diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus07.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus07.lean new file mode 100644 index 0000000000000000000000000000000000000000..94f4dcb773f2f5360c19076f282817cb8ea8215c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus07.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus07 : Fin 20 → RI := + ![⟨-3157620568658079683423400785178708576437630537324, 3157620567147838372710022693341604137238876750298⟩, + ⟨-49772070815213840130010346671498595834630117349677, 49772070799941209397105677271559994706875600665318⟩, + ⟨-7869107327615297337406780794448719126743758485296, 7869107324528045727471467744139532083242242288117⟩, + ⟨-46096706185658971634781747452368879214737938817836, 46096706173428800069489099881352431936113111884332⟩, + ⟨-2181669866813058846664176424987457814157101991540, 2181669867619818211515982651705843933183437264520⟩, + ⟨-11146819775589694022058852300221826678024936363728, 11146819771836308580850341083974351935709612947142⟩, + ⟨-9974682380421860182744454092815900137452148542, 9974682378249761522103001866817914413310680018⟩, + ⟨-22110638999179604808313533739102288250387606525, 22110639008296641426265835809855013557188017303⟩, + ⟨-648000357210315253857863031068565598748411959, 648000357074449388739060951799198014012621066⟩, + ⟨-5446332793760267886457023265283891852847368982, 5446332796844752470225982111182428897424810543⟩, + ⟨-690434751528493312262491926213726817539213144, 690434751297913656774839453834896254482233789⟩, + ⟨-4929150393744273770104199162697222899713143603, 4929150392230774874011927914792824950867175242⟩, + ⟨-339665876635886425607236878288044048596788290, 339665876762516586929744524642657540437819500⟩, + ⟨-961486693582799036172022331279628525051362203, 961486693288421471176215140778723644389620955⟩, + ⟨-366835808700844938057701862963579124623339, 366835808028043517026078131119028981293479⟩, + ⟨-1612437591759009256591968655271653370280209, 1612437594408680260509369334933796243926791⟩, + ⟨-14960759715328725404925234476523927459046, 14960759690919172554845270149418495043541⟩, + ⟨-178531621305756946062660516029191786704171, 178531620928914083210669342713969119747881⟩, + ⟨-5975531974443267939240577383084444505467, 5975531954246401456978538823671068977357⟩, + ⟨-9163655230693914134399711113310242932322, 9163655217674493798098365187151924816116⟩] + +theorem residualMinus07_exact (i : Fin 20) : + residual 1 i 7 = residualMinus07 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus07_bound : + matrixColBound (residual 1) 7 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus07_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus08.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus08.lean new file mode 100644 index 0000000000000000000000000000000000000000..6dc1ef5d8072d307bd19e64b81e4373cb1d00022 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus08.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus08 : Fin 20 → RI := + ![⟨-466186447597031595086393570979840600757693156347, 466186447832573562971869681421791418949411040411⟩, + ⟨-9088545400193004890166758288788459212980568564140, 9088545402617528540709426499515227243897368140026⟩, + ⟨-1081655000816702997641086016224466245509924686941, 1081655001303903966840614068414199618232645693410⟩, + ⟨-7000677208445894378719824445992239562986186740590, 7000677210354411631515719122712100663057895147823⟩, + ⟨-304051232180957215585034377490998718791017428737, 304051232054513111944129025336795335014822756332⟩, + ⟨-1630577713169044111427875890798900402168950855061, 1630577713758788814994350762120649315981311044905⟩, + ⟨-954252827540109875912113712971027942700737528, 954252827879774756131342158753722466507148212⟩, + ⟨-3175051292959262051676220778098851151637962186, 3175051290432340487260621653863847413951690925⟩, + ⟨-46062823983344508327261134453399492777239400, 46062824003953235926050749231335154371286639⟩, + ⟨-505235817148290814769422087651599765285132769, 505235816663742172113903399281096859694827270⟩, + ⟨-64050302977213304844069057341895663977976902, 64050303013251876599083470832072566492992997⟩, + ⟨-367997665864501357678425998979742241893109089, 367997666101230776537225181939291287644587281⟩, + ⟨-27075748681149866657412208436594448644880654, 27075748661315717641853004618616404191867101⟩, + ⟨-96173390114633828002799090827263499663913074, 96173390160624940730677929916677370515846360⟩, + ⟨-26777248107353351532953875965749950677391, 26777248213157864258641444603575689636562⟩, + ⟨-120485134482004640631339489493193214176674, 120485134065358652941541987683684007117045⟩, + ⟨-1178254674940212717024425893605408831013, 1178254678762558061136790954232783398573⟩, + ⟨-12911030530501239721928246580403753887798, 12911030589770054755366798323681097043547⟩, + ⟨-423119765009371300622483500198669225308, 423119768186884929803054319638286376830⟩, + ⟨-684485248176631613697289972389555239108, 684485250223381475899327723751925244470⟩] + +theorem residualMinus08_exact (i : Fin 20) : + residual 1 i 8 = residualMinus08 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus08_bound : + matrixColBound (residual 1) 8 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus08_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus09.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus09.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b3e05c0fbebb4347d8260fd3cf19693cf69e183 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus09.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus09 : Fin 20 → RI := + ![⟨-2169289073847007109526087649525465120869084761319, 2169289073511133393053805874201915621246605631216⟩, + ⟨-37038924809312660272616158221463637430751759091479, 37038924805582146827255686255060083558283517173210⟩, + ⟨-5110030878824669121164767476049279187109800020180, 5110030877990359413264646506965797313813892185988⟩, + ⟨-35847300057933561216447207722424106318144140530243, 35847300055844401816985331737604389153139016637951⟩, + ⟨-1433922906266199729636405812033406246438734191788, 1433922906453815784067448413046081904749384005499⟩, + ⟨-10018479986227287372751856915221922082727483667250, 10018479985417637517075816045054222427425276087505⟩, + ⟨-7983111599756541680186057387669817207095166851, 7983111599259076043563962310387008675071976223⟩, + ⟨-15193960186813038494749732775030716151200319620, 15193960193589173196666176270069761516096051238⟩, + ⟨-585342407961489708613038990555279149050053091, 585342407978908699959938993252251773632188564⟩, + ⟨-4401019241713823697249607141016766834182351668, 4401019242689434979959325362901207904529546933⟩, + ⟨-549682359233528548511341548683474788513870513, 549682359153348764866623030361019976533284818⟩, + ⟨-4213017131189701125779816212741753384512686212, 4213017130669554666135650031331425146306087540⟩, + ⟨-280006303489438040579629807199229187571466201, 280006303542402222250121020010222626375232045⟩, + ⟨-773016483323729163310280908828318293157012315, 773016483255671161558488662818905485119212246⟩, + ⟨-312193366374852016305349736106648536830460, 312193365872934820827797027836698561875409⟩, + ⟨-1347035671903097875535369367852867960614680, 1347035673845563724259772836333085112046541⟩, + ⟨-12342943246968530622286213743838295033007, 12342943227989657119643242243386886513889⟩, + ⟨-150836048336293647446878646057788564908997, 150836048052671462163512834468865841639996⟩, + ⟨-5020047535736230777942081943996761651186, 5020047520019844188263875877459343108145⟩, + ⟨-7769914682496645570571293271961213509499, 7769914673254839964881916052744302610980⟩] + +theorem residualMinus09_exact (i : Fin 20) : + residual 1 i 9 = residualMinus09 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus09_bound : + matrixColBound (residual 1) 9 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus09_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus10.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus10.lean new file mode 100644 index 0000000000000000000000000000000000000000..5044e5bdc0a7661d3b4aa08c7793623512a978a0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus10.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus10 : Fin 20 → RI := + ![⟨-311732259349534652323544615465387877665746863673, 311732259416803228204501262631083341732317927566⟩, + ⟨-7426382752726593666963516028712624377537854886568, 7426382753498726290629289752139014804315588085263⟩, + ⟨-492801777754173620655373684060139088769158260503, 492801777916257209951149205401958615261611265833⟩, + ⟨-6545342616899392344901672116376646744341721800527, 6545342617326650553145103101991694982109562456143⟩, + ⟨-135827352356179105437443185863252619145709235349, 135827352319241278838518730992890124219596441845⟩, + ⟨-1650312175898434019835658234890753500498216307941, 1650312176078260617928510470066653673869871719549⟩, + ⟨-633656906938548046595723906235307153635880529, 633656907008613598888952130972099251322132292⟩, + ⟨-1542639696499063643918680050820392541513790163, 1542639695286630242607602809955528915526837990⟩, + ⟨-28852285995536049741388038153357947808695645, 28852285990041660803285193444751067830378394⟩, + ⟨-325432527351301599822095279225111708432940912, 325432527069513414266023350020234799808099817⟩, + ⟨-37189291768729971838392137323050962003783950, 37189291782548440771344562006744578795990176⟩, + ⟨-218163718262777228331882623991841318235092134, 218163718352312572169016296082950584995204014⟩, + ⟨-15584274236802321738945237260997647297047922, 15584274228019274349598224783315320888345001⟩, + ⟨-56265668407873856537098777306997635872747909, 56265668421043155754612495993343358689602258⟩, + ⟨-12832903885646248297875307176797320484967, 12832903961873288601842231444136721941586⟩, + ⟨-66009471930933687187584631487948479553170, 66009471635026115586498082188462401093035⟩, + ⟨-655409911422708415908608634051310763355, 655409914316737017322202278451866764079⟩, + ⟨-6381180642468163390784404156992963162933, 6381180685527114491189240848486634758751⟩, + ⟨-215588801389022148365925763403638352220, 215588803766616221300301040520630507071⟩, + ⟨-365490981592819141219931496487657182089, 365490983005790290573415501962597385893⟩] + +theorem residualMinus10_exact (i : Fin 20) : + residual 1 i 10 = residualMinus10 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus10_bound : + matrixColBound (residual 1) 10 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus10_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus11.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus11.lean new file mode 100644 index 0000000000000000000000000000000000000000..46d726f8fc1012dd9ab8455128b700bc8653ae6e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus11.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus11 : Fin 20 → RI := + ![⟨-1499161722939384424047785808931054028872615760638, 1499161722723945487311126531245867901555814700335⟩, + ⟨-27620677993560420903757083973332580207843786206978, 27620677991100650172788264991618187213835893985240⟩, + ⟨-2995146283431618962676499427283911920183951657810, 2995146282887213460705994277609363538975239486873⟩, + ⟨-28072211747288683133574555016203155016246390898445, 28072211746083420296937004916102469768644792116641⟩, + ⟨-840263414650933146996797389843585902061503114948, 840263414769311937300792067649661103555344534658⟩, + ⟨-9549795080071298297058218737453020944235702948808, 9549795079494434469749723267801280128731549469277⟩, + ⟨-5769945944549654088570143669706213986244240189, 5769945944350133515535819358826257886287050504⟩, + ⟨-9270436657188234364679871958335058809115225780, 9270436661945193228946657436474251068993957998⟩, + ⟨-504191251946650773803162890339136257437110579, 504191251978869045684364372374009877262100762⟩, + ⟨-3320248530363282011460570612862910827557973312, 3320248531513124518442039056697319212997316724⟩, + ⟨-411196023278063433467267704746964672897329916, 411196023228196066742303066540684710928220897⟩, + ⟨-3562014736287058261844291875794522470340403162, 3562014735964017830830576161336069201016733911⟩, + ⟨-222707807278825574848517345858123826011780599, 222707807312076340278928078277334051068924149⟩, + ⟨-634012761420396678490582585282103992978348041, 634012761378367981788797932362909288145150453⟩, + ⟨-264548763124365643689292730030742288004718, 264548762804880827833866447177146634101798⟩, + ⟨-1104482409609496849984852346924568216587442, 1104482410847094238765429967316308422456585⟩, + ⟨-9891581304676936235878088198726277003098, 9891581292688834741283210576784883866968⟩, + ⟨-126923384821327068362798093062332776092036, 126923384640592038553108568230418377296793⟩, + ⟨-4183824299460406223701582378027886097898, 4183824289435646825498092622186972826324⟩, + ⟨-6616174737960037753731034238706605084421, 6616174732076565107511503936455055308295⟩] + +theorem residualMinus11_exact (i : Fin 20) : + residual 1 i 11 = residualMinus11 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus11_bound : + matrixColBound (residual 1) 11 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus11_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus12.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus12.lean new file mode 100644 index 0000000000000000000000000000000000000000..a298b5d0e437a7495f36fdfe80a42c8d83c29fa4 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus12.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus12 : Fin 20 → RI := + ![⟨-288566724023513704542903551155454085399389205233, 288566724097904069567941613595850856322264284370⟩, + ⟨-9278001795307357536228964551514263002440702084557, 9278001796199667272540708951056024649880556143291⟩, + ⟨-412460571801176188977211090166441888532562164192, 412460571984649461670503049581738343925214210203⟩, + ⟨-6891144083776167891352972860775121736019981013125, 6891144084257469972867499966257407235373051348859⟩, + ⟨-111153681014090960670997359963711806496871074925, 111153680972672667118861183327508802405654429995⟩, + ⟨-1638433108960364730401413751112946472480568862499, 1638433109164484657596841775690525690660087415656⟩, + ⟨-574117086787789933744250940474420475815024929, 574117086868899683068315276980265908068948244⟩, + ⟨-1240916498316728127870046099980593495858146909, 1240916496983164879953058939443660807956976422⟩, + ⟨-30224560562853567302330643089531521572773497, 30224560557154999992085431057628192916347486⟩, + ⟨-295972237855540670850568615621344605470391169, 295972237545843614260322058760414617180673009⟩, + ⟨-32601467020976690250596633049304043172638432, 32601467036333423424050130851228379212709400⟩, + ⟨-201009854177334475188032505347171797308855535, 201009854276702538053967272093140555016779305⟩, + ⟨-13970084435717386861169601839476173124730029, 13970084426017926047929606272276725280764205⟩, + ⟨-49268784431197008410111179609598019126848032, 49268784445938660893837712149429979550901322⟩, + ⟨-11218673140795097189446965075222332886926, 11218673223924823164156617172013173611268⟩, + ⟨-58919553611737081175453805804441452816919, 58919553288911302566511736000600332332651⟩, + ⟨-582400901079546018950100763622405420019, 582400904211283527270465851965859007600⟩, + ⟨-5494254215005459228233451866861885049246, 5494254261957058416045084001256204096241⟩, + ⟨-189053819622995509253005307866723761533, 189053822214031266018931608104321511920⟩, + ⟨-322110124553071592497242442480320956926, 322110126095434189738409387273119937011⟩] + +theorem residualMinus12_exact (i : Fin 20) : + residual 1 i 12 = residualMinus12 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus12_bound : + matrixColBound (residual 1) 12 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus12_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus13.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus13.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fb649bfcd0c49bbdd86554db6d8436bb6528378 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus13.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus13 : Fin 20 → RI := + ![⟨-1331971280484960455182492116096415766916063042350, 1331971280261720445118141580348104447053100773249⟩, + ⟨-28359319642251920066305342347831397477587956476830, 28359319639686126205582346855854326540926238755743⟩, + ⟨-2544843519285840230979541399983371149564728636517, 2544843518725448644305879958347575089183262620945⟩, + ⟨-28289186117527353765929226091616158948506610653781, 28289186116264007125488869982674189596641474849681⟩, + ⟨-717454467313428164641272718079032827903997395336, 717454467436291781178274949077909535710871390009⟩, + ⟨-9891619058402064423898457833138661023928453290450, 9891619057800235065166542735769470110100643210450⟩, + ⟨-5166665344005271693880472984340572472596793399, 5166665343802824005923521960375884849439556666⟩, + ⟨-8221848616363160902048184839574169895986969985, 8221848621169770477069462878994371688805865436⟩, + ⟨-474651291037405587435654640548578219016790880, 474651291070012088479951987144917831473733080⟩, + ⟨-3056446263650095320698891933890937734352717309, 3056446264798813801092999239148951229085226903⟩, + ⟨-376364168600210124564653558477546749788309134, 376364168549345304585922385194570735194600046⟩, + ⟨-3395377853435274362225827075141745238640681735, 3395377853108259260939011388168718029042171390⟩, + ⟨-207963779172768573555363149966024355391448732, 207963779206191778781344969390211630437201601⟩, + ⟨-617812284505252197939303113141297108598751459, 617812284461670247801669900475915289184956058⟩, + ⟨-252728107816773915319829579598741891877122, 252728107500170754247095038848477111426395⟩, + ⟨-1044832907961646410183852971342982521690579, 1044832909188396391646885831421625903158329⟩, + ⟨-9274269892217387279059183307519742716280, 9274269880201261906712599771914769193461⟩, + ⟨-121206223029102666915216403429981793938802, 121206222850044424072826747751145534356100⟩, + ⟨-3982239991630905023528186293931821238640, 3982239981705351410137859383892842299248⟩, + ⟨-6361176507986002066988116980941339682754, 6361176502150937144881282558974371738347⟩] + +theorem residualMinus13_exact (i : Fin 20) : + residual 1 i 13 = residualMinus13 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus13_bound : + matrixColBound (residual 1) 13 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus13_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus14.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus14.lean new file mode 100644 index 0000000000000000000000000000000000000000..08cd26ebe0d95848e460d1d66b45b89c9e6498c3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus14.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus14 : Fin 20 → RI := + ![⟨-247556158302465533771562210405367340944406794254, 247556158404016874693621842037993697730544326584⟩, + ⟨-21923827087159982400727297724214136553562604517179, 21923827088697607277160649040486933973950439897406⟩, + ⟨-279494893091494351158902448042922767776374433230, 279494893386855521203119257071320564356146906514⟩, + ⟨-6230086602921028431317507085500338390932810579313, 6230086603649418643980465480132387290310027809812⟩, + ⟨-69965413372042257664592531567254892379408382755, 69965413310459250595901367516177695155726475293⟩, + ⟨-1096685955546625254579016798415001975052404861796, 1096685955862814896161813663698931879378122243633⟩, + ⟨-431666362203779603845534598483951351082637379, 431666362359900796058963865745857181485906853⟩, + ⟨-1153528821528840496008861727817793310777070776, 1153528819704532965670183939230919741042392407⟩, + ⟨-32856301810204011659525978600200564757069817, 32856301806492011223961129923324725714785625⟩, + ⟨-222115893073188329848002376011067619931111751, 222115892611919627327111072477073507262815213⟩, + ⟨-21906405010197432825583687508027002758546787, 21906405032428533279084134973421232167612584⟩, + ⟨-167690879727524129127714849384346635765074326, 167690879880883148932135930628422184166076229⟩, + ⟨-10626028687804978324008288163008892945310624, 10626028672827722206952510451853327710990685⟩, + ⟨-32334078969019661302404945894611325534612027, 32334078990864210665582106130101911263796290⟩, + ⟨-9466136519594927590234418369896540872867, 9466136647503502575957131296838241758806⟩, + ⟨-45904063180808560353374129291124893853444, 45904062683759593774060046166263195139506⟩, + ⟨-436630766085986346846396385225243724864, 436630770402800119789150953299557491737⟩, + ⟨-4323482716522298311420786686434504925040, 4323482788804088428964577138376089525721⟩, + ⟨-145350471836420799855422769961305720104, 145350475825238111823397033782478724069⟩, + ⟨-241355351638978460927501795040687897390, 241355354014682894480102108730335942738⟩] + +theorem residualMinus14_exact (i : Fin 20) : + residual 1 i 14 = residualMinus14 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus14_bound : + matrixColBound (residual 1) 14 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus14_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus15.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus15.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c3d26d6f4e4e746f14ed6830a790367b99c4aa1 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus15.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus15 : Fin 20 → RI := + ![⟨-928025442227252497860487955624248545816788327333, 928025441847042406892866721239813687817735684449⟩, + ⟨-48012064721804046265409711897706691580967462689674, 48012064717214660847973386655671296151542515698551⟩, + ⟨-1536000934176458285203538083886280679168251577290, 1536000933231267840951655067998248164021566786412⟩, + ⟨-36095121340959358267369299365138351228921545975120, 36095121338531441370654375286005557725097548501723⟩, + ⟨-454653290366583892509877431522276244430952797119, 454653290579827395343631023789872047741567311190⟩, + ⟨-11092948501230734750713523922898938298839679454907, 11092948500173043127086147269017378222878667968224⟩, + ⟨-3670357850417135807429247197834459976503562850, 3670357850024748346566832615814897204853588747⟩, + ⟨-6918782686980057798471785154856650412028130564, 6918782693856339290925107026257515201539821564⟩, + ⟨-379251896108419661533290277002651083278407667, 379251896142123229005103513781692556909815568⟩, + ⟨-2446018086572645138593977640071010400400925505, 2446018088171037697772746690373859358914850161⟩, + ⟨-295470082324017766152599224698063391805220080, 295470082244437962711426528678339381827947982⟩, + ⟨-2959795861219192655748006507138874155166368864, 2959795860708511540002007044860521975686076959⟩, + ⟨-171454051472666839118658471094933204265397216, 171454051522627031164306029161093367145365682⟩, + ⟨-576289793218934915062434856824519591486654124, 576289793143178289413882965095895135030201238⟩, + ⟨-222265067060679137022982602490643254227834, 222265066630422265009005015328318278726637⟩, + ⟨-898053873637287442789982780225202304445441, 898053875305783962097635653567913519489342⟩, + ⟨-7764758204540088501820354082379927678797, 7764758188103500934975471378801012715179⟩, + ⟨-107135938483589900855527060436056540805133, 107135938240584677806964554101232948668904⟩, + ⟨-3490513017678892330590919793770093537112, 3490513004265963117238278067877882031585⟩, + ⟨-5766440436137915525419143985492948137425, 5766440428158606771183408555546728884674⟩] + +theorem residualMinus15_exact (i : Fin 20) : + residual 1 i 15 = residualMinus15 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus15_bound : + matrixColBound (residual 1) 15 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus15_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus16.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus16.lean new file mode 100644 index 0000000000000000000000000000000000000000..da7b25a6cddbdad26b72200e44ffa8fa726a987e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus16.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus16 : Fin 20 → RI := + ![⟨-232057973008361956602470799932350520761943884392, 232057973165245592531169292252488283272777394386⟩, + ⟨-21785100793909859661795759242340269466116510030603, 21785100795893300792298396996166156002853560276920⟩, + ⟨-240096152885917883587604231610954465229563099470, 240096153209691018518123377595291266268335198760⟩, + ⟨-10264521508913461449248177377914049652140452647153, 10264521509818770758076887348815334884600907278686⟩, + ⟨-64688659989498069184619992707633030359592305839, 64688659904739125471849942276440553019574149099⟩, + ⟨-1932467272923700831408256524656904161182172087733, 1932467273366464926561603769770299701065207212489⟩, + ⟨-335129556502163233920460965354497669847511128, 335129556499229326527848254725889731012972194⟩, + ⟨-1268344654791973527725563514147916665260088973, 1268344654283085632095372249224898871950822447⟩, + ⟨-32535652043243729929130034152896666248472497, 32535652021203028180009298590897510926873568⟩, + ⟨-175702353403770583455381107174517360993596658, 175702353016474527270240952831328807720666027⟩, + ⟨-14610312772284449474363706749845308360638083, 14610312801510282196199890244989991503317360⟩, + ⟨-150070765342329953093887952481603066112815771, 150070765484259700536836456381590566469780625⟩, + ⟨-8329623202783746653580209656842038626682189, 8329623190556458410039946116516004762596892⟩, + ⟨-34331614488508384238699947710546071008958886, 34331614518416997693575721187559000912723595⟩, + ⟨-9107961505358687786359685546828124004206, 9107961578336986677595804465204887146015⟩, + ⟨-38831579726763274136383579157062904951730, 38831579441693640247900867366931431139034⟩, + ⟨-341606913906298903920057509406292561924, 341606919323760738592023439969538593616⟩, + ⟨-3970741248530293155069738447708809333294, 3970741289191557385155893351151686485638⟩, + ⟨-128593643499635842042885501237827114144, 128593645691219528520732758104164396950⟩, + ⟨-197226111419863466831304759737693984235, 197226112800355069336059040945172858191⟩] + +theorem residualMinus16_exact (i : Fin 20) : + residual 1 i 16 = residualMinus16 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus16_bound : + matrixColBound (residual 1) 16 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus16_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus17.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus17.lean new file mode 100644 index 0000000000000000000000000000000000000000..323e621f983e20c25c314ac564795d030e829cff --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus17.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus17 : Fin 20 → RI := + ![⟨-628583204442600019453960262434072595030093840475, 628583203009071404585187615236294231171922108374⟩, + ⟨-72214238414024397617100237629395841750980364773725, 72214238398571608805050156235797649408329453963476⟩, + ⟨-904108911302979180711112741794420710997441379091, 904108908282466945009620910643641401270376125003⟩, + ⟨-38134995445225372970724353249127774581178366340102, 38134995433473237967253630215597860249500489620506⟩, + ⟨-307469306745476440643419416197834858980166294448, 307469307527544000945058599470440028105596438581⟩, + ⟨-10306014406888168706823255024480626128252993647231, 10306014403169476556506388340564215545065778834691⟩, + ⟨-2658779293941691545889224838322813422812540924, 2658779291874901799279066147104910175062190741⟩, + ⟨-7279734361172596844184681217964704646540724710, 7279734376368578498883672532395108687395182233⟩, + ⟨-288088696856445817516812135681206369339277887, 288088696729349194584215774397473932043758516⟩, + ⟨-2082478699540540849878586492912055567062404426, 2082478702313048441140889043442458844097919808⟩, + ⟨-251103398948006278840312151014225766536077420, 251103398731257344942025734800302818634481217⟩, + ⟨-2617033119695501075335979534777314512847796984, 2617033118287947571164354863240278208640405210⟩, + ⟨-147550079394780146235837039155113485205233588, 147550079510249450010168816476730959627327620⟩, + ⟨-533900017949367779323238100048545866730803578, 533900017665872710784031670729340000366053559⟩, + ⟨-199185557660512562707509664895673550385137, 199185557103648230964233492334111362216717⟩, + ⟨-799802147926273241915658798746567759858844, 799802150127826681676281404794391426027956⟩, + ⟨-6797453681437306084625971071810431143205, 6797453660559350485010797343873588733547⟩, + ⟨-97334396250977995683166108955320523247767, 97334395939873144038221106757419224653615⟩, + ⟨-3159681784590397006925675499821243624077, 3159681768053362219588123460864404003840⟩, + ⟨-5380370661489624654999194532989494477541, 5380370650597352785510234082331268534260⟩] + +theorem residualMinus17_exact (i : Fin 20) : + residual 1 i 17 = residualMinus17 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus17_bound : + matrixColBound (residual 1) 17 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus17_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus18.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus18.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e6e91885e1e31ba46806ca8b7d7303c1ee8aad8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus18.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus18 : Fin 20 → RI := + ![⟨-227003766965379207440778828329925515567918867977, 227003767152049119040489503072667050926233838365⟩, + ⟨-35943684552321810819476423854795777526817133064588, 35943684554992019352596014939770637813496396297106⟩, + ⟨-248013229590498281787362878238528256269139747555, 248013229990900817431867442867701694051726262586⟩, + ⟨-9774227619595350572137298188523893550595666841096, 9774227620616430548777773077767305458120334929521⟩, + ⟨-69381660199848796314764098746071775970610692752, 69381660096237396864608577631069344655997487163⟩, + ⟨-2225139509935356448386434210430871159078500422302, 2225139510496931442220468646342530039882957361813⟩, + ⟨-290971075924087371549453405616066941874668478, 290971075862808711245158130636729519172315304⟩, + ⟨-1328080099908007196259753582738992077675057560, 1328080099378435993102626497801804402898171969⟩, + ⟨-31287968867138216538845839242842183018638676, 31287968834165363410859064695299772283450894⟩, + ⟨-152421666124836568535106798415762081188281891, 152421665676893076893356281875431889172153252⟩, + ⟨-17934386895543905016095166492805424418962804, 17934386931689576019215895359546289514262461⟩, + ⟨-148439736903686557753047379836746802150311325, 148439737066840854912380896019574195849173440⟩, + ⟨-7209458702468249507242925550558546237999833, 7209458688670117349932752490747121268120144⟩, + ⟨-38803676523868559869157889290977264148296859, 38803676560119383452758527756813620858172360⟩, + ⟨-9168304470892709939278571550801497320641, 9168304547214509159196741689857442419565⟩, + ⟨-36176372249921384317564471344560195592349, 36176371951550697800009854299152167051636⟩, + ⟨-299339618357817567137770285796936302973, 299339625252034878681197141855142608504⟩, + ⟨-3986104502145811224173701238897707513777, 3986104544445986888376471448471076284101⟩, + ⟨-125702590751402363373574262188374801381, 125702593015279116465502992152355338460⟩, + ⟨-195917459569464566614034035895207513141, 195917461016898032300820419646660142962⟩] + +theorem residualMinus18_exact (i : Fin 20) : + residual 1 i 18 = residualMinus18 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus18_bound : + matrixColBound (residual 1) 18 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus18_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus19.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus19.lean new file mode 100644 index 0000000000000000000000000000000000000000..de0da54e65570d229b9ce61623b785b47c7bb973 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualMinus19.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix +open AtomicTriangular.Interval + +def residualMinus19 : Fin 20 → RI := + ![⟨-566519433582462804153332765699741596498535857526, 566519434011580098898545487122614791375671717367⟩, + ⟨-79996113554000789379777363323374230194606204557857, 79996113560787327518376645201007970776830570269241⟩, + ⟨-605005737661219458145152987551928051667287432035, 605005738499449447273231744067270946340497683273⟩, + ⟨-41026153499812257743043011330893372996042250806498, 41026153503490641838283641202813369215527953640587⟩, + ⟨-247203647868927912541647244379502949143617798754, 247203647666457478993235033238055613863223710766⟩, + ⟨-9942672948687214951393958973439729256125206754113, 9942672950010040856466001548339329582300379720293⟩, + ⟨-2178443340032940192225251097479685839537305605, 2178443340732270352835890929053869786165343474⟩, + ⟨-7855329329141386682856809601202369140699325704, 7855329332245064811834178383113240593827339719⟩, + ⟨-232616022674104653918663370377806631852934400, 232616022685818949550148610401228771034378983⟩, + ⟨-1927558528078343376263127302175346750905043361, 1927558529416886058546669859932610354672386712⟩, + ⟨-236778628924817293598207932978858611323606759, 236778628925054670215516588010437419915716201⟩, + ⟨-2414127876059068718303926814363719786113315722, 2414127876035877291347752519033144138290783316⟩, + ⟨-136890090524086669693809605547736180578463874, 136890090543360843394659226524069291724568521⟩, + ⟨-496468858073592624009394640905012120370460838, 496468858137568579265731593311120065921015143⟩, + ⟨-186035495002095402822860370522034667237518, 186035494481819359955607742306035071295437⟩, + ⟨-751904482216434201551483288046230542496741, 751904484202519882680581620896085426959491⟩, + ⟨-6374031897643410567289061715393332843946, 6374031878917807088580401273158611623927⟩, + ⟨-92026209746314020609365615738354992865714, 92026209449682789385688092601102507192539⟩, + ⟨-2990222170028562650849755451975493403430, 2990222153137618289177066496165564021822⟩, + ⟨-5163927134007994876234457423589534601821, 5163927124835429711461170897562425035068⟩] + +theorem residualMinus19_exact (i : Fin 20) : + residual 1 i 19 = residualMinus19 i := by + fin_cases i <;> decide +kernel + +theorem residualMinus19_bound : + matrixColBound (residual 1) 19 ≤ minusEpsilonNumerator := by + unfold matrixColBound + simp_rw [residualMinus19_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus00.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus00.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac8eb2afcb6955b9ae553b98c96a15eeccdb20f6 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus00.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus00 : Fin 20 → RI := ![ + ⟨-17721807902065955573555783544366620496685934826027, 17721808185191316491784444716543907493762438434827⟩, + ⟨-318291302511429929739027852752616907143079095460548, 318291303168094893187053128601030380532151493694842⟩, + ⟨-45957774167818342930592894247393201108774192487753, 45957774816553097225001063111036199259589578643718⟩, + ⟨-163453903439758543120297501033937849330676149734628, 163453903839841282611341355366919215547809408697224⟩, + ⟨-10187257796279646953571868664241151441255971794600, 10187257582925834597506940970532708505275464819507⟩, + ⟨-55438712421812397529205045057861705787384272560621, 55438712460816356028706683363760852489902139898836⟩, + ⟨-29432691778457254282181440309887620232528902698, 29432695752555171402167984984271767234235357809⟩, + ⟨-99140127584091246002328607609914167563607268015, 99140116434775486670170110898241108236456112760⟩, + ⟨-1527565155462629061691297034695559562313703937, 1527565493702015020140141084569439092198173439⟩, + ⟨-17804775708672544031628737283835324953432308446, 17804771926766109471098276766344776551088738350⟩, + ⟨-2330447537963181771950230058904889338058419974, 2330447771848237039225823227587912063030197522⟩, + ⟨-15392966788634492795702159685617109961083164214, 15392967879571496333165021915685732418745055625⟩, + ⟨-1091701209662712316311370411124635571089306184, 1091701074792143056175058252207789476799129218⟩, + ⟨-3479319654592559199247849123390418607599924355, 3479319756692468583223247066773363026002641300⟩, + ⟨-1142946334472924166855042070483257983563889, 1142948005539661527038199989069403281562202⟩, + ⟨-5184399701545829712366985153031313643507250, 5184393227468135290967612953458500005129632⟩, + ⟨-48610407112347111770262564783610120320646, 48610493251631122562819537280213954366063⟩, + ⟨-568776996010930569830095626870114678586547, 568777952447054168434061553024822678525112⟩, + ⟨-19148641485099896750633714150113667631597, 19148695164808266101246736657371906931608⟩, + ⟨-29494052725515066441912776119301595340508, 29494083501983313294635279871442327471045⟩] + +theorem residualPlus00_exact (i : Fin 20) : + residual 0 i 0 = residualPlus00 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus00_bound : + matrixColBound (residual 0) 0 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 0).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus00_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus01.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus01.lean new file mode 100644 index 0000000000000000000000000000000000000000..630aa1b3235b95605535d87ad6aded9c022c9a5c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus01.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus01 : Fin 20 → RI := ![ + ⟨-28687778583439044304703993844185607673016656346423, 28687778058861223412230942896381146988429170859325⟩, + ⟨-571955143534314258002551832651339972704456801650961, 571955142326716142139511068895239172614530571516326⟩, + ⟨-85895466681710881440068459063459951773051905346426, 85895465479661244035331038922002980433185969991479⟩, + ⟨-288345214934755546940396831666224034731324173617393, 288345214204190231745243313591992483282307873128636⟩, + ⟨-19024510948517214597141375619744921178484128800564, 19024511343696396479258622398159973423888000555383⟩, + ⟨-101784228742121595103329742317513825565979587551675, 101784228667640939828301421094970490138697934475923⟩, + ⟨-54147032746905724535011487203188964627334887560, 54147025389869425881081394571531245489709147718⟩, + ⟨-184513648368569150271431647045819102580490204406, 184513669009493031472099900046447050843443856026⟩, + ⟨-2784487153879534687167467721380031295329912431, 2784486527739108671054659219271807322538292255⟩, + ⟨-33019627129764268852738788536890099922735152564, 33019634130781763587238853093167658669892918229⟩, + ⟨-4342801095438446772694233677541428986833311766, 4342800662446281879979512303038933974449453693⟩, + ⟨-28590412975731496765325482208345446987834427146, 28590410955984804158662420226233226142814758850⟩, + ⟨-2031310035879975970829336090881573270780307412, 2031310285559988988136610757736318927880254343⟩, + ⟨-6478418776248415998570966552094741379022712456, 6478418587173724626969901794458166473784442642⟩, + ⟨-2126627098592905730736964118076749951128255, 2126624005283110101285678439807393261960373⟩, + ⟨-9652506033575175679601445432053824820511938, 9652518017754463742473376213795503507492568⟩, + ⟨-90545668144684678361276035943325926369669, 90545508692467485223316793859973235624291⟩, + ⟨-1059514012613564082971226191867002732141818, 1059512242157301145070109389299087677059951⟩, + ⟨-35679014402015183284455136415274140322927, 35678915035915944252591687383867088153111⟩, + ⟨-54967554499254188856890470465534210516791, 54967497528778040756321999775379749329925⟩] + +theorem residualPlus01_exact (i : Fin 20) : + residual 0 i 1 = residualPlus01 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus01_bound : + matrixColBound (residual 0) 1 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 1).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus01_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus02.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus02.lean new file mode 100644 index 0000000000000000000000000000000000000000..d5803239e2df34585133d5858c60d5ee1e80c367 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus02.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus02 : Fin 20 → RI := ![ + ⟨-3297407235746062622699773988374924055264748582359, 3297407258626130212764634450769295955469980858056⟩, + ⟨-50790253888813663913432143944813122865942547533395, 50790253964705306663981140296983307993772929222061⟩, + ⟨-8111570717299919486682955996300668270881192121890, 8111570769530521011263810393100974643737507248180⟩, + ⟨-30185851587076786032236617256806352310914325490097, 30185851651891178371299224261199194963651991794808⟩, + ⟨-1709025133961621665686680221880006140406067559059, 1709025116244887624028662211291845509221246527306⟩, + ⟨-9762524021839495647413679522538734688216897116912, 9762523986948004402431689100208668271064055862362⟩, + ⟨-4824415757738721351484611231527203766679718815, 4824416104610504309879404025489340357491690043⟩, + ⟨-16257284941697363493719458122945214040397881860, 16257283990732695312847203255826245642792371406⟩, + ⟨-274242282831484530251257465993102106771441522, 274242312793404380565125825699996908911496752⟩, + ⟨-2802790428483084837219714103101288702048381472, 2802790099791000528939835526390751018369430660⟩, + ⟨-362254903374724870040330713343045879439216048, 362254923532131891199246504508551502161532382⟩, + ⟨-2440451274348247492783099919622569598543690388, 2440451368565684533044876342860684334906828868⟩, + ⟨-169477828473180639286003229170366276002233803, 169477816802472029516404465692153998618017020⟩, + ⟨-549974664210910577277838736838330039021851171, 549974672768547420738764106822081079974233496⟩, + ⟨-178960177845924776759590843221906571437762, 178960323250245450896656674328581198147224⟩, + ⟨-805022355153028384386806518604269083009826, 805021792290218063251231634240186139636980⟩, + ⟨-7502794592298814809121031583296538351282, 7502802078023901306630331440813439953935⟩, + ⟨-88320537486850034983746998460357900800837, 88320620629014606342644496177685860910249⟩, + ⟨-2964391319844454767805390051892975616608, 2964395985592122687124448864210756099865⟩, + ⟨-4562464723039717315531678240767280426945, 4562467395818530201849072650009686475007⟩] + +theorem residualPlus02_exact (i : Fin 20) : + residual 0 i 2 = residualPlus02 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus02_bound : + matrixColBound (residual 0) 2 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 2).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus02_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus03.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus03.lean new file mode 100644 index 0000000000000000000000000000000000000000..908e14c7b4035bf5d1befedabe03e0a185d0f124 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus03.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus03 : Fin 20 → RI := ![ + ⟨-1642571459251064309761222693825333426220417051819, 1642571443887569381813131260304307379682012479191⟩, + ⟨-24897836834895894013834214121699263884017543902806, 24897836828246120827558947953498716498307148481560⟩, + ⟨-4887573392007044654493362911508537737263100808622, 4887573355457936149180915610764583256856690571361⟩, + ⟨-21932371381029471889508684357267231300237914504851, 21932371318957146484742580207972649258511344813689⟩, + ⟨-1220973741417007490468115773975469952842060610363, 1220973753152170612115890001017128914378259523857⟩, + ⟨-5148699181019622769603748422435548811545196402089, 5148699195431560694120939516491577232838645513193⟩, + ⟨-4067234430490256232151154338395761762403913983, 4067234220536037325719912362802557858421698465⟩, + ⟨-11557744610547215900464664235283246441713360515, 11557745187525321289875257729681718531515841174⟩, + ⟨-225420885612027911449260511921929816863677667, 225420867572253271215208531364101912806743180⟩, + ⟨-2307453490312314536269617890312068327436709903, 2307453688011395853350068310818127631466644991⟩, + ⟨-298261346591933806618236774497500808808135167, 298261334331302670672008220286520288680285870⟩, + ⟨-2003088300142918780134022923962808790464284774, 2003088242303296031594753926896519530624172080⟩, + ⟨-141514359899700521695831440956547930702756722, 141514366969870406631962573156047764920565894⟩, + ⟨-427984935511000712851531458597354316402040891, 427984930015113880602079457318660402848522875⟩, + ⟨-148636210488155680453190803659432860687108, 148636123852050716600617791681036948709668⟩, + ⟨-668220003944774769337149029684669918291953, 668220339381910252498532703482537610528154⟩, + ⟨-6261165784037546603707669235510918517492, 6261161325653082018783989289245109912180⟩, + ⟨-73323891405774106705756164062847984175832, 73323841885131737148140943963106804955952⟩, + ⟨-2466132304678826544331630843135168898138, 2466129527283283864141515930068057642134⟩, + ⟨-3771643654977463834871749036869232268948, 3771642061910712999794443425053635225989⟩] + +theorem residualPlus03_exact (i : Fin 20) : + residual 0 i 3 = residualPlus03 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus03_bound : + matrixColBound (residual 0) 3 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 3).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus03_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus04.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus04.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8a1739ae377c9c59bbbcbcda936c6cb8772f564 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus04.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus04 : Fin 20 → RI := ![ + ⟨-1100055363513728839378935082609480002701627706110, 1100055375062888837350454691291616560278558410614⟩, + ⟨-19864936007604032457864253049961379842814036139530, 19864935997106157816119831382966663304402237838858⟩, + ⟨-3554849109938581352192742993762644058687687653852, 3554849137280776442289946073435800712869648829270⟩, + ⟨-9887680489293945703058051348505246236753266784698, 9887680513062350508230352568212977537117511928316⟩, + ⟨-707466655999453461427751945031138641960968877758, 707466647365360972272766492012477896327733953684⟩, + ⟨-4285965969804878342157280641946781556672339818686, 4285965956700835544447593287382429173204847905487⟩, + ⟨-1514775331767376402863710908313778028887458912, 1514775480235313327359247776295138500343988713⟩, + ⟨-6360421511680613056691396399073021756862822126, 6360421103943939405367855331400272395949993414⟩, + ⟨-98326438932182823229246645942792581533195135, 98326451654103367519690876116077529991637150⟩, + ⟨-885981634989636103596408085201154627811131205, 885981496560892886750572281739911604383353105⟩, + ⟨-118995703430252152000717585917599924506733664, 118995712085854711861240320654339771725947513⟩, + ⟨-798691871836933163806039996322699888611074634, 798691912869209887060612027798017445394682807⟩, + ⟨-53075513626982815904620583020719075878849943, 53075508664918349971357857356095056115721314⟩, + ⟨-190471987554513000483003219283188460941900912, 190471991539276318213284392608042629835528197⟩, + ⟨-57378695668252623261859582660651282026272, 57378755994855755031594315311740010536736⟩, + ⟨-254961005408457553809784983581325002669950, 254960771867954589814561865025150278571663⟩, + ⟨-2382206760142912862478627078452592689291, 2382209862867853583020384296839602791095⟩, + ⟨-28107969912968413149310401825314951944870, 28108004377504186824433286461426519087336⟩, + ⟨-937676871942400123299923649311091628636, 937678804184469981723304786542750001645⟩, + ⟨-1455720532086626728212977478511584883776, 1455721640880309788001108021283908820218⟩] + +theorem residualPlus04_exact (i : Fin 20) : + residual 0 i 4 = residualPlus04 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus04_bound : + matrixColBound (residual 0) 4 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 4).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus04_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus05.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus05.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9faef6e97f7b4675109c9f0bfe116beda663155 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus05.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus05 : Fin 20 → RI := ![ + ⟨-1965110368241573381383939024881512617429894142209, 1965110391384685322203080468344448841594581211827⟩, + ⟨-34294305199172318334395752362923867730525591180559, 34294305230092414485609128100525230495469079861811⟩, + ⟨-6651734247521384893055186453042606401285570047579, 6651734300687445727655266915113138722348751805594⟩, + ⟨-34876946178924976656444555442805570889986819941422, 34876946224942414463836391498285856649961354383377⟩, + ⟨-1831931431718657800307616919937565854297091422386, 1831931414072347058224938955280978941063939092218⟩, + ⟨-6543507021438592383940095016528643914394658066507, 6543506973724422789670999088630911310888565126792⟩, + ⟨-6944199300857440777889819564145794303320032281, 6944199630186985261212656696432921158849312161⟩, + ⟨-17667297078969064360103358351880779484433813110, 17667296181765446382962303626381699006215556958⟩, + ⟨-401432157160577211949244952067437725577431410, 401432185598069599279844604439177103170009992⟩, + ⟨-3840886983587748795998925876536581417788204753, 3840886675473297057980443758734217525937728155⟩, + ⟨-493636257662325129658446121175837499672562300, 493636276722903720743172434243270313936060707⟩, + ⟨-3359099687774230416015944162112866810303509959, 3359099777519495580492657390020780057599122539⟩, + ⟨-236854412087003652962180175422001266888406681, 236854401118545588662133660522372419493492285⟩, + ⟨-691610039916963600094497616211852460926883700, 691610048275297722735164100453760486539923228⟩, + ⟨-250057208651949667082787202993210143964116, 250057343989215725757845709511900093743937⟩, + ⟨-1116948735660879871596628261169327660934582, 1116948211939335862583518472350099694527354⟩, + ⟨-10452747279700707187215189051397841275734, 10452754240268362525616982471859345454420⟩, + ⟨-122782278414975960036232524178414148753462, 122782355735019631202895330732569811160794⟩, + ⟨-4126503544359321756587748011386823729883, 4126507881132024025040769462355555765511⟩, + ⟨-6298270747798941180289545720163238389724, 6298273233250741300072325714654126688240⟩] + +theorem residualPlus05_exact (i : Fin 20) : + residual 0 i 5 = residualPlus05 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus05_bound : + matrixColBound (residual 0) 5 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 5).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus05_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus06.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus06.lean new file mode 100644 index 0000000000000000000000000000000000000000..203aa82963b79ef8c921efe745ea7467814d9119 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus06.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus06 : Fin 20 → RI := ![ + ⟨-383243203487448504963768174695517186892859608901, 383243211044966084192919980745900195060776081711⟩, + ⟨-7185506364147700712906670822935041926990155067403, 7185506380086039285876825517678033034629177506023⟩, + ⟨-1056202899256588859762616913513321902873468122555, 1056202916467315225870564018725708103516110418998⟩, + ⟨-5812397907788388440738165803211151486160998413029, 5812397915999101164563258914551028063514381272808⟩, + ⟨-291156216157643949598115741793536671347341887349, 291156210494158999530002874157180904224869003609⟩, + ⟨-1415141805999633892548069789680233582405760232339, 1415141808552932225680035679731816780679674450798⟩, + ⟨-552376716557480007032250009528066098218105868, 552376821115501220265636049175044300923341554⟩, + ⟨-2799752720574402875684171685334711464776803159, 2799752425834149533639339968797655636127902307⟩, + ⟨-41169989666708147830859386792567783122065194, 41169998547894574167659638159289678021668550⟩, + ⟨-322949137707230429099269736428255944803773238, 322949038171944284338126026536270260546944680⟩, + ⟨-42345987939453363785548325391850195980459187, 42345994103130979811438061948111777974539419⟩, + ⟨-249761146037945510747260193556455022178283085, 249761174839488254834736690125011367411528389⟩, + ⟨-16507742580349349596001273637017180163623426, 16507739028440453639482559223105792619891694⟩, + ⟨-69376632852119493032838488914505737525484363, 69376635561293802496176520221600799650671016⟩, + ⟨-17278199788771282225778756708158010250933, 17278243746962966090650046247173938757235⟩, + ⟨-73157767226331600583430083788161833153654, 73157596903408794256999507592575788111461⟩, + ⟨-730184443095850797038402212900927837159, 730186709202876303605530508339093882521⟩, + ⟨-8096111471168391457592512768406991504356, 8096136633509250284487632810489445135071⟩, + ⟨-260150231865041065003177024067823706527, 260151644090246599989379328527207146334⟩, + ⟨-428570784826705111227161928024649632857, 428571594612866197769461530237595135493⟩] + +theorem residualPlus06_exact (i : Fin 20) : + residual 0 i 6 = residualPlus06 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus06_bound : + matrixColBound (residual 0) 6 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 6).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus06_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus07.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus07.lean new file mode 100644 index 0000000000000000000000000000000000000000..48cbf4b0673e71c9d74c1d00b62e6a5d4b2f6378 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus07.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus07 : Fin 20 → RI := ![ + ⟨-1476401450062268960191229083903871085779666054504, 1476401467461328792582646337438049772389988005745⟩, + ⟨-27398134642094839275970273140404794126202253904543, 27398134666352689721333172474916009804081235563566⟩, + ⟨-3805007448864831961649930166397190472968225383169, 3805007488839403832252758574989556618361182844447⟩, + ⟨-28690240522418407332252760404132432376318606141052, 28690240559830027425572703504127165119632845056882⟩, + ⟨-1236541102956134073565815017057564696095132757489, 1236541089666375649947461555569556620117746241166⟩, + ⟨-6581362405134075937764895071987909815899055498374, 6581362368595714355892598559953770892924896339891⟩, + ⟨-7066579932762450670963043997155934472911540014, 7066580181293980633973657936629325888074383492⟩, + ⟨-13226630265801894808027077946469657547147970941, 13226629588961324445070537376301153634683314009⟩, + ⟨-486357127218643582196105950736756479625328766, 486357148684208351117931594991916271118412409⟩, + ⟨-3789533686860343633929078401323711458540039273, 3789533454332413934511027224510252675678981289⟩, + ⟨-476763378952780145260846412247621258882108626, 476763393334093251582783781848974596914232387⟩, + ⟨-3495124008732250061392675462867105495917417269, 3495124076438679868973134653275205483729906690⟩, + ⟨-239032775019228954415586242985306003052169803, 239032766742711422871883797014725974109060149⟩, + ⟨-647603610024973044498553436375036889642168312, 647603616324516589113921470804400081102758924⟩, + ⟨-261153368430600929450534801134952347720461, 261153470581137754142986489067814910129588⟩, + ⟨-1136715057853472133090050395387980681850224, 1136714662561743765157812966598784116627261⟩, + ⟨-10508410974721728035230019659314465566806, 10508416228391166631885687802939763204076⟩, + ⟨-126395697478808381628867596748863211361921, 126395755838353398589777515734904441710230⟩, + ⟨-4223234090654924016698692874594024965230, 4223237363977534545768978403830101716248⟩, + ⟨-6478930129362424440777824625825887097890, 6478932005288905078886421937040895092065⟩] + +theorem residualPlus07_exact (i : Fin 20) : + residual 0 i 7 = residualPlus07 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus07_bound : + matrixColBound (residual 0) 7 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 7).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus07_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus08.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus08.lean new file mode 100644 index 0000000000000000000000000000000000000000..d419754c7aad43c5a47d527a3f7aaacbc45b9a63 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus08.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus08 : Fin 20 → RI := ![ + ⟨-217486972653906511339291843808021261346650910252, 217486969522051342776860773273607866737165131020⟩, + ⟨-5693601521527496746324285634924038518389122377110, 5693601515903410273193725597064057625186715280067⟩, + ⟨-459856991572431162390622870933461373987169051312, 459856984462967345739837185921909755514800059192⟩, + ⟨-4227271258937786618863135378230808201536835410171, 4227271253938416985080124063126602755785676750310⟩, + ⟨-155296672204479478104674074444817814214788833763, 155296674591091252441074464313205453566531980853⟩, + ⟨-940595606727513976713649535918466120220588288888, 940595613083471943074987994311239354649245613129⟩, + ⟨-474702450789367069893195157061834806468871817, 474702405663890192177439087108946610870691531⟩, + ⟨-1769459264918755692936340154579656850229992635, 1769459387594722091651641867621909520019108951⟩, + ⟨-19027874287224288422438025817648140393294300, 19027870391241253325610931659626039087549142⟩, + ⟨-234185296337154934894474936447508612821379549, 234185338630534141650380692126917493137184271⟩, + ⟨-29148088657133662666461089201946247092225767, 29148086044874288083773013414128045059139337⟩, + ⟨-132632732232685467613509437044969777246218613, 132632720002083869799138803210898235697176023⟩, + ⟨-10559753411820727934726500928313126132863749, 10559754915720456018788546429491639921828591⟩, + ⟨-45408109262128701683550553614740416824070651, 45408108130043899068572329026662968709764085⟩, + ⟨-9399127368372771542972145393818263938212, 9399108762199564963023303978062865542876⟩, + ⟨-42439840907559804465520182505549755968105, 42439912911755254382550328127259657481159⟩, + ⟨-448080816145397081695359824517777170856, 448079858873264754070742811237777867762⟩, + ⟨-4350710920591338192795723330289418874493, 4350700288964454893746029725416915216302⟩, + ⟨-135460756165072368863883083262023871019, 135460159774107639353246155997800899328⟩, + ⟨-244087818591875066764394909855001795847, 244087476851547732431603139803088161978⟩] + +theorem residualPlus08_exact (i : Fin 20) : + residual 0 i 8 = residualPlus08 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus08_bound : + matrixColBound (residual 0) 8 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 8).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus08_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus09.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus09.lean new file mode 100644 index 0000000000000000000000000000000000000000..c850c31b94607ac4318cc25f1093981f69665d69 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus09.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus09 : Fin 20 → RI := ![ + ⟨-1158131167177430320448501256405473288313835944252, 1158131181599960263635520937997935305971009018259⟩, + ⟨-24087227238281450349213252393291764529925547552101, 24087227260667857899592331104484034452960338666078⟩, + ⟨-2762860483678995419486961620876215973380435280784, 2762860516727264464340622634399012474554214456921⟩, + ⟨-25755208631930160762622735722896990795407425157573, 25755208661133185235740288992028866175758100398290⟩, + ⟨-892188722621374317942170531193268401932275971805, 892188711601148615804467557428925166415693297006⟩, + ⟨-7362416670937795522268635052053431254787895878463, 7362416640123777006750390969971282050684078800793⟩, + ⟨-6329881583402177422072704164766336738911869141, 6329881790552734670205462096418723451206067631⟩, + ⟨-10112653197612517980711085921147657636949118123, 10112652633580757046173934618016360674378451095⟩, + ⟨-493236546783873099385187142610033517507546742, 493236564681778506135769630588751243589420232⟩, + ⟨-3461578957139926858814107459442471257384891792, 3461578763256835291162565012313258705977824329⟩, + ⟨-428678044925473994640708416292696350874634187, 428678056908503340113483093031715327240738957⟩, + ⟨-3400880053368951339517730848141606703387041739, 3400880109755987977862198788653333114002836646⟩, + ⟨-223078961599725106598135697089058410894760141, 223078954701613161645013801270536866177373752⟩, + ⟨-594795879515691276111752087948264768701044029, 594795884748244973121538376091974605389995717⟩, + ⟨-252425536943455990472716877253890827131811, 252425622163185802770239540624993966582877⟩, + ⟨-1077988759225774206768613800951223698949001, 1077988429455370309860416801312967063083596⟩, + ⟨-9825240882693479340883204834564116648311, 9825245265692067791339358742903984978677⟩, + ⟨-121362700631940535138229547741576264466616, 121362749319680877608098693973377278254010⟩, + ⟨-4029569754794476459446429839604467684569, 4029572485725338502267018325569744540246⟩, + ⟨-6252520632146494840811755767099832574224, 6252522197114064965257321414206225236318⟩] + +theorem residualPlus09_exact (i : Fin 20) : + residual 0 i 9 = residualPlus09 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus09_bound : + matrixColBound (residual 0) 9 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 9).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus09_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus10.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus10.lean new file mode 100644 index 0000000000000000000000000000000000000000..aaaa65ee577c48e76a8408f425143c324aefa363 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus10.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus10 : Fin 20 → RI := ![ + ⟨-214544260691037519092034541525758925752934434743, 214544257835396441489380594317612079281479170037⟩, + ⟨-6193756035069058409100972526412805129587696663624, 6193756028289591622055166662602559610418772091271⟩, + ⟨-270813600464984670712670318354602125005303040973, 270813594058826196915944090091263009239926724659⟩, + ⟨-5577732957381857485045782239197643209860731749507, 5577732953706296273124873780172164494312513574220⟩, + ⟨-84341677724130853194582832951426085904505555284, 84341679894369753729768318119880030942602317618⟩, + ⟨-1396945258759350874908226115302112074674322223256, 1396945262981828838149215539034985496992508598060⟩, + ⟨-474619334341909804447186622295138058172931641, 474619292829879255478703230508241539782818870⟩, + ⟨-1058937298827019518504833668604700758456658942, 1058937412438037074727888209747785253442208357⟩, + ⟨-19940358718492069984840059571785787427700012, 19940355147256922569164845430053299155043950⟩, + ⟨-235157483369122498446317572815869154593794091, 235157522415984890522845353582191813843668192⟩, + ⟨-25572591835553429438630568038179417437616194, 25572589424957946572947207986183719454453764⟩, + ⟨-139976284420887684664916714073381202069617513, 139976273175889262803820488640895714586114244⟩, + ⟨-10108926107013526652302212849725128764759817, 10108927495056072364567897118185329384672810⟩, + ⟨-39181744567019420937209000891743074663300416, 39181743529594976982026616686768533303243752⟩, + ⟨-7077866870481299589143460362085509147352, 7077849649804824146224689185335310761369⟩, + ⟨-40125565167268519069888994048129386543716, 40125631825742834383777633866049230948602⟩, + ⟨-413269222803625029518630008072423943647, 413268336440170371382284942409108577205⟩, + ⟨-3544519760644792152605347797528216613413, 3544509916235658216196908222972139282220⟩, + ⟨-120277952222589431937441146829505769666, 120277399875050155774967147387819874859⟩, + ⟨-219452962241016694854637569415630583805, 219452645756945262572518670451649341165⟩] + +theorem residualPlus10_exact (i : Fin 20) : + residual 0 i 10 = residualPlus10 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus10_bound : + matrixColBound (residual 0) 10 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 10).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus10_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus11.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus11.lean new file mode 100644 index 0000000000000000000000000000000000000000..2889a61e27dcedd02c2aebecf2f197be78644b0d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus11.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus11 : Fin 20 → RI := ![ + ⟨-939781633570194275503234717577707247402806106488, 939781644665924667608631431435382887669969998117⟩, + ⟨-20505161460501689844528795459042290989423125524211, 20505161480387339560114081592411815063707157855067⟩, + ⟨-1715284715415380426049796668376613165288341815608, 1715284740618668959821477594624040390388622662317⟩, + ⟨-22522879703797515501854327468596358863212194284801, 22522879723660091169494158524626328230537272095831⟩, + ⟨-545413643939785775516662716619082999460198928617, 545413635458612530257941055017445663570500686879⟩, + ⟨-8080416329057546018643952965441188580325129314711, 8080416303935989445897316135208963368011000421112⟩, + ⟨-4862589360767141182356800301058140487240583968, 4862589521557928144161382122191250087678652227⟩, + ⟨-6501329328232723787276076097474568550088162817, 6501328892706804159683227487448120791654141373⟩, + ⟨-453066950679478908311300054987699215638422750, 453066964584909836232980821656051344208636324⟩, + ⟨-2805228702534489944567031917888296165563206295, 2805228552012128413397837384634108599349127520⟩, + ⟨-344947798425985401152715388347734419116304120, 344947807718203267968417210207169521252044227⟩, + ⟨-3115265267365409516111959878090527274745613008, 3115265310890006784795740695969637271684295580⟩, + ⟨-191476135761511546663173035230470923476703852, 191476130410334842877454338123397735776812970⟩, + ⟨-536347659496722995945843254339478575554719835, 536347663515392979053007867777606677674882088⟩, + ⟨-231685090083278386272481896725060313756035, 231685156294974152673382231325412448640121⟩, + ⟨-956769050938433842522543198799016661633394, 956768794734987296584666718803970456147552⟩, + ⟨-8510538361674312795299445345211242514061, 8510541766996049413603889450565997769870⟩, + ⟨-110730358792832648141069867301581239099743, 110730396620376015276432555996554441396167⟩, + ⟨-3639881146400753938434877487825326681283, 3639883268261337518066854553480695340059⟩, + ⟨-5782428358059059385180329379232372002685, 5782429573821239424395367432806761912229⟩] + +theorem residualPlus11_exact (i : Fin 20) : + residual 0 i 11 = residualPlus11 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus11_bound : + matrixColBound (residual 0) 11 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 11).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus11_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus12.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus12.lean new file mode 100644 index 0000000000000000000000000000000000000000..d561985efa431bd3f06303750a7ecf55df8f158b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus12.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus12 : Fin 20 → RI := ![ + ⟨-210450151893874879886445719840635267084179365078, 210450148238809494137342475574195425017101789391⟩, + ⟨-8301179141617323028384424750551307940891333213160, 8301179132340674334530166969631445843369797200803⟩, + ⟨-237141132368278717036049573743872824014459696148, 237141124160864768509632800654502247121999211826⟩, + ⟨-6122438940892740469738580660644021543424124016725, 6122438937146263093401751724962106164766576086690⟩, + ⟨-70490755694483206229251770833154148562824062314, 70490758469161351812404696908377297521822611278⟩, + ⟨-1437804308668194006538710092900405304412902454976, 1437804313765504801932547395127268781247670484332⟩, + ⟨-448483370967978629888072745341512334232663377, 448483317687869275482914782135266146462114117⟩, + ⟨-858978589007434790459741002423660451842874017, 858978735578647785052075869755806107477360038⟩, + ⟨-23182543696687259251872658528893174087547510, 23182539115254080910410324911296799302518272⟩, + ⟨-224714902080680737575229243095615788668909000, 224714952241706694283099908596725524759464009⟩, + ⟨-23436976422028124536254105077159300757801073, 23436973326547754497013486450676524293229579⟩, + ⟨-139314480981386001433943080821578391761214265, 139314466496023570523770800247899263483459808⟩, + ⟨-9650537022678562835524325837192016663973950, 9650538805070727006836549283688904504194944⟩, + ⟨-35787809048802279915547127745800379008037643, 35787807714570274469193474857382134168765200⟩, + ⟨-6678973381071106702503466046369391508331, 6678951247408664239401010521847680192831⟩, + ⟨-38501582808111730617781991762706248186885, 38501668487429640799471535383006773968057⟩, + ⟨-391391368692462117241475909992897051707, 391390229140206093301474863380798966737⟩, + ⟨-3256866403397995132411605812708850772601, 3256853749217078104206763452653865536686⟩, + ⟨-113880081926487634725642225516814745348, 113879371891178261579259557505808313909⟩, + ⟨-206929786288720346952954984672446400737, 206929379468154529051549248500566171576⟩] + +theorem residualPlus12_exact (i : Fin 20) : + residual 0 i 12 = residualPlus12 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus12_bound : + matrixColBound (residual 0) 12 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 12).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus12_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus13.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus13.lean new file mode 100644 index 0000000000000000000000000000000000000000..00bfdd4ad6bc8f02c4b795121ec3dd7cb58cc13d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus13.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus13 : Fin 20 → RI := ![ + ⟨-861248641284464651129281221823415333879910028270, 861248652750447245427662964277991026788310402385⟩, + ⟨-22361370694536838231959029175514465680313734629447, 22361370716833271946084888510194571897947257489029⟩, + ⟨-1464176216671115861074099128186691213973407471226, 1464176242750378179850962193622152056615501807608⟩, + ⟨-23623862338061988413134816065811864932881873261798, 23623862356475523341667320472857769048067283820686⟩, + ⟨-468759365925129418706510371110302101651544570431, 468759357159026170164987307093646867098565944572⟩, + ⟨-8655958155876706272482512778882114595758724927892, 8655958129594581108362152558520443080765278629089⟩, + ⟨-4404441190088299869231749926005594397496334037, 4404441357093394155495742853483668077435646226⟩, + ⟨-5887296490813242709481288517419296934228057138, 5887296036799193923824883233409487556932045575⟩, + ⟨-431849022013122256335384551436438078927138182, 431849036460875981368297288435943137307939153⟩, + ⟨-2623719432521844886432191688855565124304025422, 2623719276130082101230604958377553887009890406⟩, + ⟨-320682716448481614822506104819567770788720479, 320682726096876579186198755984589530104081197⟩, + ⟨-3020522538665538844974718601121637993187774030, 3020522584014400971244941485419890958142999972⟩, + ⟨-181737785738893900054448917406774793449726011, 181737780181309750119486747981499170775095548⟩, + ⟨-535732244545094976187527805747802729074211123, 535732248721795625204888667947835154154971089⟩, + ⟨-225154609764882870229900800285321433369502, 225154678594335284281442453142494431189197⟩, + ⟨-920829440050220844715984152658752179623716, 920829173721191724904069590350850278306608⟩, + ⟨-8114580413846383413793560096341367107473, 8114583953864963906524720604667393472556⟩, + ⟨-107616703753271554905505590513237893335923, 107616743077068814673017543203432343888075⟩, + ⟨-3525689424139172505178981470593508971135, 3525691629997496575455400546215532907822⟩, + ⟨-5661522386623356999764030292743443710999, 5661523650426629547674511921697733380478⟩] + +theorem residualPlus13_exact (i : Fin 20) : + residual 0 i 13 = residualPlus13 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus13_bound : + matrixColBound (residual 0) 13 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 13).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus13_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus14.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus14.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc8ac764555dfee3ffdf7db532206f426de0cf1a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus14.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus14 : Fin 20 → RI := ![ + ⟨-199608528033815933371916145177801170991918060216, 199608519810843696538265178817502406209105605825⟩, + ⟨-21349131384365850432849691272551054948249881026154, 21349131352489502504616104868465715666066168312917⟩, + ⟨-177455037834431923987459438668992047664413816210, 177455019480231359428037569866562478778694354501⟩, + ⟨-5773496604588831668554025524105755259133612262681, 5773496580622354426012417085492885895762126779057⟩, + ⟨-46199511034695740329926637169072921771918517295, 46199517411277186171324698671235899969915437786⟩, + ⟨-979997781052722604605759788477864850715913733465, 979997792022646313767303572416122715734718995689⟩, + ⟨-358199259704745596394937124360168357627207521, 358199133253287292205655901686837584893604335⟩, + ⟨-930270858134038493396575688646956400800606213, 930271207209945359938893066047687368116222485⟩, + ⟨-28790204107609648706896856191258540141715582, 28790193248346231621678856365610058661785435⟩, + ⟨-180423456273411620428203465250230096050703729, 180423575849870513860193421228031428690452415⟩, + ⟨-16551404904253067799875340259807963276416523, 16551397546773587747005991496915130081797981⟩, + ⟨-131725830766888178195444495969658506917028521, 131725796498708612047781387060592151315341064⟩, + ⟨-8102075147474099123985670014406256163178291, 8102079389310188515637004516183519060522997⟩, + ⟨-24461114015752724609550228025614250852442176, 24461110903391533932262296271097160247428504⟩, + ⟨-6819667103876980512239534416416764669644, 6819614129130050959858470460339619487842⟩, + ⟨-33982815486266133015086585590850393956778, 33983020575195129530764550147334223170450⟩, + ⟨-325042546421138151485760670158681787880, 325039818140857616010633283563140291785⟩, + ⟨-3018191593671423927143635083045936199855, 3018161295275195469286902225236114891207⟩, + ⟨-101476821439889357259021701575345817119, 101475120914281770814867048751253263457⟩, + ⟨-174157842107777341338804404554407717978, 174156868092233162811504727028628628771⟩] + +theorem residualPlus14_exact (i : Fin 20) : + residual 0 i 14 = residualPlus14 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus14_bound : + matrixColBound (residual 0) 14 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 14).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus14_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus15.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus15.lean new file mode 100644 index 0000000000000000000000000000000000000000..d50d339601a175037c6eb8ff434df699a39f0ceb --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus15.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus15 : Fin 20 → RI := ![ + ⟨-650945724157420636897084609190134538339093092807, 650945744441334392902781474328956593372675379454⟩, + ⟨-44333367588574892926154996131912978713724064095442, 44333367636469854895800890586050178501103545981383⟩, + ⟨-871788917397750377162587514213058452358532517783, 871788963144724290441052343236943631704379378240⟩, + ⟨-33264749741931278871743858241580274630145455750120, 33264749761642624666460200470660801796454262304491⟩, + ⟨-300972322183246881038314157993018257667908749933, 300972306716436462709834751887631448907971910260⟩, + ⟨-10338176094403358774886476591335887128915460377452, 10338176050533133527979968339970025920279406174522⟩, + ⟨-3197957702971965659052486302956719281248160228, 3197958000777957357932464516446643440226703477⟩, + ⟨-5473284291259768386433895345761471550002396284, 5473283479694551931594138956253599243652615448⟩, + ⟨-352892988985007670734382742910097938376050085, 352893014731039361960048193514260362188555019⟩, + ⟨-2176693294538397286740827065795831066594060289, 2176693015101789025473476179104709983800965858⟩, + ⟨-260744166334536613070248820098211467247353053, 260744183552811814258939838832616867294396863⟩, + ⟨-2726427490720481816127017115113500756843069942, 2726427571495230817024506111635838055906134759⟩, + ⟨-155094264143585294002609858852301614878331960, 155094254220670958750873397800888313821587787⟩, + ⟨-525212168139309480140431951888317302164628527, 525212175542933980252225054204220979715708407⟩, + ⟨-205071173801817536615983507525073158660714, 205071296984002882985567375078351128266990⟩, + ⟨-820687752426240290598345654822792327800796, 820687275748332670576869439396928848287178⟩, + ⟨-7040914664105178820659581835982201545317, 7040921001141533527574707187836509224352⟩, + ⟨-98655276920283411142450478332858881104877, 98655347311084257346430225439829570258245⟩, + ⟨-3205520919987791510401192352777788152699, 3205524869031559082540598386900049151151⟩, + ⟨-5329659317943845271204905571344001576113, 5329661580204930778689577336368444871689⟩] + +theorem residualPlus15_exact (i : Fin 20) : + residual 0 i 15 = residualPlus15 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus15_bound : + matrixColBound (residual 0) 15 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 15).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus15_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus16.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus16.lean new file mode 100644 index 0000000000000000000000000000000000000000..a52d6a6198eb217e0674a9565ebd7279ed0bad59 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus16.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus16 : Fin 20 → RI := ![ + ⟨-196632328840299715513559273988508299593483218553, 196632320925339248802178865165964829984541780015⟩, + ⟨-21379204697098745568431502121152043363881626298879, 21379204665462404174299209399992725766245329919617⟩, + ⟨-169113588510528404364569040743096925759506552914, 169113570863920129584128622305722039108811393397⟩, + ⟨-9936648995195672126052667412291078798938230898638, 9936648970823439901668919766513307857326207785223⟩, + ⟨-47969931473210791271599833793043215339284768801, 47969937629914652539833760144879588797436596986⟩, + ⟨-1851250091684918153793740342797437842363870978058, 1851250103783419242461009626173725844665499503747⟩, + ⟨-282849902544592576994226851633498828177828264, 282849779775684579761663472749768633436625622⟩, + ⟨-1110970131427486115241821650998992595518628676, 1110970469545527373259983904917049102925722906⟩, + ⟨-29682413917275673246411470078410252466784858, 29682403359658452897526241046162526914628359⟩, + ⟨-146025921577585333727044109186023830330343888, 146026037593294043023995575157657276241164216⟩, + ⟨-10805385747805501047040478096254588443662576, 10805378614417897015959964339222356732790401⟩, + ⟨-124566030243159992474618563946261772142319423, 124565997005346805964497027311624686630593353⟩, + ⟨-6534032617744747038249999086558754328657658, 6534036731285134373231206441241499669461617⟩, + ⟨-28754228116333976964613174451127603063539839, 28754225107462652028881216272349157405371916⟩, + ⟨-7229809635387566922626560742332692457271, 7229758221595573493535164021485976359754⟩, + ⟨-30358512729393205902447687210427427143265, 30358711757318795603075897681650614705321⟩, + ⟨-262240034362717903161009512754226712858, 262237387413588569562636377667499457561⟩, + ⟨-3043666041081785590597826302969204870874, 3043636638553152995960440056138873065199⟩, + ⟨-97417267356623877935549611034860411989, 97415617135639466483750105864205881623⟩, + ⟨-149500978153163195019959228508390477295, 149500033036781259087763453108018137326⟩] + +theorem residualPlus16_exact (i : Fin 20) : + residual 0 i 16 = residualPlus16 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus16_bound : + matrixColBound (residual 0) 16 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 16).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus16_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus17.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus17.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ce6bdab0a4a52f992a03f680fe700b812c2fb6e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus17.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus17 : Fin 20 → RI := ![ + ⟨-511327553712155001004396215953603078307398982512, 511327488136553935769225289005960897759466327528⟩, + ⟨-70654946519948628898459161525565852202067376771678, 70654946490476749800972707099699785180746412209788⟩, + ⟨-591424167685222724475466961218111710812562484132, 591424013512504598273800089470329855191022314454⟩, + ⟨-36644879669228121499468484213172709654136165151830, 36644879536485893529370352658558530171246717244881⟩, + ⟨-229360566575130870467163132806897865489917478361, 229360615436273129862425171669233705516563590209⟩, + ⟨-9974664789612955204672686068375731760356075439839, 9974664747258581858906627504706358445078931592489⟩, + ⟨-2393983488228821081659647182082179120946479120, 2393982634990408037121507486815531635911098033⟩, + ⟨-6544209998384289506140162395578549640271704416, 6544212405764347647671791388655162499140074089⟩, + ⟨-272923899867968212322668152336825463319948129, 272923827689077876534970711352467122767607105⟩, + ⟨-1935084370136860827566624930229735116872474333, 1935085179409251383921550851774367568015079116⟩, + ⟨-232173421016292031527550079300858706127172796, 232173370533535171867352336500503370494536471⟩, + ⟨-2488764384330120197358308807228927252536098623, 2488764147538688200740301650421042575228082194⟩, + ⟨-138551300135803708386429615442046793381664042, 138551329151686381541875947910689893013337474⟩, + ⟨-506733813429239640978928742737178359106384613, 506733790519489023652407276991901969909258545⟩, + ⟨-189704625214292076775873249634148392497921, 189704269865489038149886237963972516251131⟩, + ⟨-757336513298779935913880275870046371321366, 757337890385937459040402319421930121988666⟩, + ⟨-6400225346292757599006999496258123532552, 6400207029446233201813599506354929658991⟩, + ⟨-92674729762211817985681615759335031346518, 92674526387904830118416019152799303317337⟩, + ⟨-3003134662837911109103561563728261285628, 3003123252479673076672714691875246009629⟩, + ⟨-5141136205013378119074305275804509335188, 5141129656673190984961979022098299532404⟩] + +theorem residualPlus17_exact (i : Fin 20) : + residual 0 i 17 = residualPlus17 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus17_bound : + matrixColBound (residual 0) 17 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 17).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus17_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus18.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus18.lean new file mode 100644 index 0000000000000000000000000000000000000000..a91fc6c2b1bdf0295c6ee86b382d6b7b8ced4c94 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus18.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus18 : Fin 20 → RI := ![ + ⟨-195921953636906696882221757636576840832850049080, 195921940246287321994059657553150870777295815238⟩, + ⟨-35600788570703554232001701747006678084061379656211, 35600788517277988690664212642036780447515180051999⟩, + ⟨-188913151200233984432255315052478318918126303654, 188913120752673442800772473537558860136636955713⟩, + ⟨-9492539474917390159683765032748697912392455371772, 9492539435757579749501107160237396852760664556893⟩, + ⟨-55281060226258717139847252544413722655495586794, 55281070633613002196012860909163943165194825154⟩, + ⟨-2157470936263636057436138580472363388757426261968, 2157470954314130029300893758941020504868830107862⟩, + ⟨-246249934720966749465736541887698970973250022, 246249727601847711700438373049347967472905460⟩, + ⟨-1195021536383465838330454797555881613500591506, 1195022107857415491051829112332532456691965823⟩, + ⟨-28876904220294159541772771807469424580599478, 28876886425519676406837854662582455683340506⟩, + ⟨-127032938251816391808512781757327883730173679, 127033134125147222768137497414028988496752644⟩, + ⟨-14684292511653168737048836233970993280463827, 14684280464468107980629866521664157800889143⟩, + ⟨-126686920257163886074946143806249094798200528, 126686864145347021844100403030031655563659703⟩, + ⟨-5673375181552336684674230846297302903063651, 5673382127150448959981255027551877128711799⟩, + ⟨-34056409082588028333968436325866248783866903, 34056403996290917499404113217094758988497417⟩, + ⟨-7564936186906068311740565830792394054449, 7564849380864349180591092461419947214647⟩, + ⟨-28933908160359222933114311685862720659980, 28934244214979366794329457988852549614746⟩, + ⟨-231457911662925222646828491935688425217, 231453441398056520116824742256614403803⟩, + ⟨-3194132235142025609520374422178014825662, 3194082587827666796445917407610421811899⟩, + ⟨-99057783037068224734884672310228891431, 99054996508557712632629858567802372262⟩, + ⟨-155149034898261118315622556427653542844, 155147438898976887103928064862501975948⟩] + +theorem residualPlus18_exact (i : Fin 20) : + residual 0 i 18 = residualPlus18 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus18_bound : + matrixColBound (residual 0) 18 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 18).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus18_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus19.lean b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus19.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a89f2579a540c520c927c1a6df3ae68c7dd3277 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/ResidualPlus19.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.Triangular.Certificate.AtomicResidual + +namespace OAI + +open scoped BigOperators + +namespace AtomicTriangular.FiniteCertificate.AtomicMatrix + +open AtomicTriangular.Interval + +def residualPlus19 : Fin 20 → RI := ![ + ⟨-619886860193411409473982091756940193385456292726, 619886830792804078399996579713598607948238639409⟩, + ⟨-81152422545433073515540742815682974668983629219913, 81152422424069584278133567718816075590852480067953⟩, + ⟨-814883809835990753552194005120340839496819141874, 814883743353012758510408852357154903849036457430⟩, + ⟨-41809199868340075473716280781825235074104098782299, 41809199777176385989282509022841528820136307814037⟩, + ⟨-298045129286504856782002354025270698267105871261, 298045152200224365949068396126337386827937859325⟩, + ⟨-10166769794437190668124483828959175089869453102357, 10166769841062936781673315230675051654496135149960⟩, + ⟨-2337400933284266379118765047324034482128219308, 2337400474509916073402011797398459507262765977⟩, + ⟨-8342238477303014165594760995985377283573954584, 8342239735776499459490016878290467369449309052⟩, + ⟨-240882081248925795074059314470565237457023736, 240882041594040534903465909254617655391187471⟩, + ⟨-2021810676045790820199973695142844602901616644, 2021811111646850172287962029409611144002470145⟩, + ⟨-249138400077472398172384678167162691284656036, 249138373429971938297131820926504057384580602⟩, + ⟨-2495756676024715427351503187997328634634740151, 2495756551769920092548766514658407978053538138⟩, + ⟨-142718715008438609903177647022612775877835995, 142718730452194113376652112651289598387898652⟩, + ⟨-514349876406939755929993631870879671423367483, 514349865234419135134652535371761538538137940⟩, + ⟨-192131767592121969032774450995366816457563, 192131574460395468175426945684689537680632⟩, + ⟨-779498274697651406076858651896476264208173, 779499022308123043587105327685203088719900⟩, + ⟨-6633205655477896379331057230564473036855, 6633195711084109889706339106179893399317⟩, + ⟨-95055521647285779410994992703198397456872, 95055411199697415545509590371219211681557⟩, + ⟨-3092282266458174211204531785906692991273, 3092276067508684309909150393439480084061⟩, + ⟨-5320448442262813711463942121995825969838, 5320444892113181216112631604089798917805⟩] + +theorem residualPlus19_exact (i : Fin 20) : + residual 0 i 19 = residualPlus19 i := by + fin_cases i <;> decide +kernel + +theorem residualPlus19_bound : + matrixColBound (residual 0) 19 ≤ plusEpsilonNumerator := by + change (∑ i : Fin 20, ((residual 0 i 19).abs).hi) ≤ plusEpsilonNumerator + simp only [residualPlus19_exact] + decide +kernel + +end AtomicTriangular.FiniteCertificate.AtomicMatrix + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/TargetInterval.lean b/lean/OAI/Analysis/Triangular/Certificate/TargetInterval.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac3606a60f77ac3b765de247e56e5180245dace3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/TargetInterval.lean @@ -0,0 +1,343 @@ +import OAI.Analysis.Triangular.Envelope.TargetEnvelope + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def targetZBox : RI := (RI.point 391).divNat 1000 +lemma targetZBox_mem : targetZBox.Mem Z := by + simpa [Z,targetZBox] using RI.mem_divNat (RI.mem_point 391) (by norm_num : 0<1000) +def targetRateBox (q : Fin 2) : RI := if q.val=0 then RI.point 0 else piBox.mul ((RI.point 1).divNat 5) +lemma targetRateBox_mem (q : Fin 2) : (targetRateBox q).Mem (Real.pi*(damping q-h)) := by + fin_cases q + · simpa [targetRateBox,damping] using ri0_mem + · convert RI.mem_mul piBox_mem (RI.mem_divNat (RI.mem_point 1) (by norm_num : 0<5)) using 1 <;> norm_num [targetRateBox,damping,H,h] +def targetExpInput (q : Fin 2) (n : ℤ) : RI := + ((targetRateBox q).mul (RI.point n)).add ((RI.point (1-n)).mul targetZBox.invPos) +lemma targetExpInput_mem (q : Fin 2) (n : ℤ) : + (targetExpInput q n).Mem (Real.pi*(damping q-h)*n+(1-n)/Z) := by + apply RI.mem_add (RI.mem_mul (targetRateBox_mem q) (RI.mem_point n)) + rw [div_eq_mul_inv] + exact RI.mem_mul (by simpa using RI.mem_point (1-n)) + (RI.mem_invPos targetZBox_mem (by decide +kernel)) +def targetEnvBox (q : Fin 2) (qb db eb : RI) : RI := + ((QBox1.mul qb.invPos).mul (((RI.point 1).add targetZBox).add + (targetZBox.mul ((targetRateBox q).sub db).abs))).mul eb +lemma targetEnvBox_mem (q : Fin 2) (n : ℤ) {qb db eb : RI} + (hq : qb.Mem (Q n)) (hd : db.Mem (D n)) + (he : eb.Mem (Real.exp (Real.pi*(damping q-h)*n+(1-n)/Z))) (hp : 0 fin_cases n + · exact waveExp0_1_mem j + · exact waveExp0_3_mem j + · exact waveExp0_4_mem j + · exact waveExp0_7_mem j + · exact waveExp0_9_mem j + · exact waveExp0_12_mem j + · exact waveExp0_13_mem j + · exact waveExp0_16_mem j + · exact waveExp0_19_mem j + · exact waveExp0_21_mem j + · exact waveExp1_1_mem j + · exact waveExp1_3_mem j + · exact waveExp1_4_mem j + · exact waveExp1_7_mem j + · exact waveExp1_9_mem j + · exact waveExp1_12_mem j + · exact waveExp1_13_mem j + · exact waveExp1_16_mem j + · exact waveExp1_19_mem j + · exact waveExp1_21_mem j +def QTable : Fin 10 → RI := ![QBox1,QBox3,QBox4,QBox7,QBox9,QBox12,QBox13,QBox16,QBox19,QBox21] +lemma QTable_mem (a : Fin 10) : (QTable a).Mem (Q (finiteNode a)) := by + fin_cases a + · exact QBox1_mem + · exact QBox3_mem + · exact QBox4_mem + · exact QBox7_mem + · exact QBox9_mem + · exact QBox12_mem + · exact QBox13_mem + · exact QBox16_mem + · exact QBox19_mem + · exact QBox21_mem +def DTable : Fin 10 → RI := ![DBox1,DBox3,DBox4,DBox7,DBox9,DBox12,DBox13,DBox16,DBox19,DBox21] +lemma DTable_mem (a : Fin 10) : (DTable a).Mem (D (finiteNode a)) := by + fin_cases a + · exact DBox1_mem + · exact DBox3_mem + · exact DBox4_mem + · exact DBox7_mem + · exact DBox9_mem + · exact DBox12_mem + · exact DBox13_mem + · exact DBox16_mem + · exact DBox19_mem + · exact DBox21_mem +lemma QTable_pos (n : Fin 10) : 0 < (QTable n).lo := by + revert n + decide +kernel + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/WaveIntervals.lean b/lean/OAI/Analysis/Triangular/Certificate/WaveIntervals.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b896946c94fa990ef3bfe7cc6ad901693db78e0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/WaveIntervals.lean @@ -0,0 +1,3988 @@ +import OAI.Analysis.Triangular.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Topology +open Complex Filter Set +namespace AtomicTriangular.Construction + +def TailNodes : Set ℤ := {n | 0 < n ∧ n % 36 ∈ residues ∧ n ∉ FiniteNodes} + +def rootProduct (s : ℂ) : ℂ := ∏ a : Fin 15, sineFactor a s + +theorem P_eq_square (s : ℂ) : P s = rootProduct s ^ 2 := by + simp only [P, rootProduct, Finset.prod_pow] + +theorem differentiable_rootProduct : Differentiable ℂ rootProduct := by + unfold rootProduct sineFactor + fun_prop + +theorem differentiable_P : Differentiable ℂ P := by + unfold P sineFactor + fun_prop + +theorem node_residue (n : Node) : ∃ a : Fin 15, n.val % 36 = residue a := by + have hn := n.property.2 + simp only [residues, Finset.mem_insert, Finset.mem_singleton] at hn + rcases hn with h | h | h | h | h | h | h | h | h | h | h | h | h | h | h + all_goals first + | exact ⟨0,h⟩ | exact ⟨1,h⟩ | exact ⟨2,h⟩ | exact ⟨3,h⟩ + | exact ⟨4,h⟩ | exact ⟨5,h⟩ | exact ⟨6,h⟩ | exact ⟨7,h⟩ + | exact ⟨8,h⟩ | exact ⟨9,h⟩ | exact ⟨10,h⟩ | exact ⟨11,h⟩ + | exact ⟨12,h⟩ | exact ⟨13,h⟩ | exact ⟨14,h⟩ + +theorem rootProduct_node (n : Node) : rootProduct n.val = 0 := by + obtain ⟨a,ha⟩ := node_residue n + apply Finset.prod_eq_zero (Finset.mem_univ a) + have hn : (n.val : ℂ) - residue a = 36 * (n.val / 36 : ℤ) := by + have hh := Int.emod_add_mul_ediv n.val 36 + rw [ha] at hh + have hc := congrArg (fun x : ℤ => (x : ℂ)) hh + push_cast at hc + linear_combination -hc + unfold sineFactor + rw [hn] + have he : (kappa : ℂ) * (36 * (n.val / 36 : ℤ)) = + (n.val / 36 : ℤ) * (Real.pi : ℂ) := by + unfold kappa + push_cast + ring + rw [he] + have hz := congrArg Complex.ofReal (Real.sin_int_mul_pi (n.val / 36)) + have hh : Complex.sin ((n.val / 36 : ℤ) * (Real.pi : ℂ)) = 0 := by + simpa only [Complex.ofReal_zero, Complex.ofReal_sin, Complex.ofReal_mul, + Complex.ofReal_intCast] using hz + rw [hh, mul_zero] + +theorem P_node (n : Node) : P n.val = 0 := by + rw [P_eq_square, rootProduct_node] + norm_num + +theorem hasDerivAt_P_node (n : Node) : HasDerivAt P 0 (n.val : ℂ) := by + have hh := (differentiable_rootProduct (n.val : ℂ)).hasDerivAt.pow 2 + have he : (rootProduct ^ 2) = P := funext fun s => (P_eq_square s).symm + simpa [he, rootProduct_node] using hh + +theorem deriv_P_node (n : Node) : deriv P n.val = 0 := (hasDerivAt_P_node n).deriv + +theorem differentiable_dBasis (n : Node) : Differentiable ℂ (dBasis n) := by + rw [← differentiableOn_univ] + exact (Complex.differentiableOn_dslope (Filter.univ_mem)).mpr + differentiable_P.differentiableOn + +theorem differentiable_cBasis (n : Node) : Differentiable ℂ (cBasis n) := by + rw [← differentiableOn_univ] + exact (Complex.differentiableOn_dslope (Filter.univ_mem)).mpr + (differentiable_dBasis n).differentiableOn + +theorem dBasis_node (n : Node) : dBasis n n.val = 0 := by + simp [dBasis, dslope_same, deriv_P_node] + +theorem dBasis_eq (n : Node) {s : ℂ} (hs : s ≠ (n.val : ℂ)) : + dBasis n s = P s / (s-n.val) := by + simp [dBasis, dslope_of_ne _ hs, slope_def_field, P_node] + +theorem cBasis_eq (n : Node) {s : ℂ} (hs : s ≠ (n.val : ℂ)) : + cBasis n s = P s / (s-n.val)^2 := by + rw [cBasis, dslope_of_ne _ hs, slope_def_field, dBasis_node, + sub_zero, dBasis_eq n hs, div_div, pow_two] + +theorem differentiable_finiteC (a : Fin 15) : Differentiable ℂ (finiteC a) := by + unfold finiteC sineFactor + fun_prop + +theorem differentiable_finiteD (a : Fin 15) : Differentiable ℂ (finiteD a) := by + unfold finiteD sineFactor + fun_prop + +theorem P_factor (a : Fin 15) (s : ℂ) : + P s = (sineFactor a s)^2 * ∏ r ∈ Finset.univ.erase a, (sineFactor r s)^2 := by + exact (Finset.mul_prod_erase _ _ (Finset.mem_univ a)).symm + +theorem finiteC_eq (a : Fin 15) (s : ℂ) + (hs : Complex.sin ((kappa : ℂ) * (s - (residue a : ℂ))) ≠ 0) : + finiteC a s = (kappa : ℂ)^2 * P s / + (Complex.sin ((kappa : ℂ) * (s - (residue a : ℂ))))^2 := by + rw [P_factor a s] + unfold finiteC sineFactor + field_simp + ring + +theorem finiteD_eq (a : Fin 15) (s : ℂ) + (hs : Complex.sin ((kappa : ℂ) * (s - (residue a : ℂ))) ≠ 0) : + finiteD a s = (kappa : ℂ) * P s * + (Complex.cos ((kappa : ℂ) * (s - (residue a : ℂ)))) / + Complex.sin ((kappa : ℂ) * (s - (residue a : ℂ))) := by + rw [P_factor a s] + unfold finiteD sineFactor + field_simp + +theorem phase_add (s t : ℂ) : phase (s+t) = phase s * phase t := by + unfold phase + rw [← Complex.exp_add] + congr 1 + ring + +@[simp] theorem phase_zero : phase 0 = 1 := by simp [phase] + +theorem phase_neg_mul (s : ℂ) : phase (-s) * phase s = 1 := by + rw [← phase_add, neg_add_cancel, phase_zero] + +theorem sineFactor_sq (a : Fin 15) (s : ℂ) : + sineFactor a s ^ 2 = 2 - phase ((residue a : ℂ)-s) - + phase (s-(residue a : ℂ)) := by + let z : ℂ := (kappa : ℂ) * (s-(residue a : ℂ)) + have hpos : phase (s-(residue a : ℂ)) = Complex.exp ((2*z)*Complex.I) := by + unfold phase z kappa + push_cast + congr 1 + ring + have hneg : phase ((residue a : ℂ)-s) = Complex.exp (-(2*z)*Complex.I) := by + unfold phase z kappa + push_cast + congr 1 + ring + change (2 * Complex.sin z)^2 = _ + rw [hpos,hneg] + have hc := Complex.two_cos (2*z) + rw [Complex.cos_two_mul] at hc + have hs := Complex.sin_sq_add_cos_sq z + linear_combination 4*hs - hc + +open Polynomial + +theorem eval_atomFactor (a : Fin 15) (s : ℂ) : + phase (-s) * (atomFactor a).eval (phase s) = sineFactor a s ^ 2 := by + simp only [atomFactor,eval_sub,eval_add,eval_neg,eval_C,eval_mul,eval_X,eval_pow] + rw [sineFactor_sq] + have h1 : phase (-s) * phase (residue a) = phase ((residue a : ℂ)-s) := by + rw [← phase_add] + congr 1 + ring + have h2 : phase (-residue a) * phase s = phase (s-(residue a : ℂ)) := by + rw [← phase_add] + congr 1 + ring + have h0 := phase_neg_mul s + linear_combination -h1 - phase (-residue a) * phase s * h0 - h2 + 2*h0 + +theorem P_spectral (s : ℂ) : + P s = phase (-s)^15 * atomPolynomial.eval (phase s) := by + unfold P atomPolynomial + simp only [Polynomial.eval_prod] + calc + (∏ a : Fin 15, sineFactor a s ^ 2) = + ∏ a : Fin 15, phase (-s) * (atomFactor a).eval (phase s) := by + apply Finset.prod_congr rfl + intro a ha + exact (eval_atomFactor a s).symm + _ = _ := by rw [Finset.prod_mul_distrib]; simp + +theorem finiteC_spectral (a : Fin 15) (s : ℂ) : + finiteC a s = phase (-s)^14 * (cAtomPolynomial a).eval (phase s) := by + unfold finiteC cAtomPolynomial + simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod] + have hp : (∏ r ∈ Finset.univ.erase a, sineFactor r s ^ 2) = + phase (-s)^14 * ∏ r ∈ Finset.univ.erase a, (atomFactor r).eval (phase s) := by + calc + _ = ∏ r ∈ Finset.univ.erase a, phase (-s) * (atomFactor r).eval (phase s) := by + apply Finset.prod_congr rfl + intro r hr + exact (eval_atomFactor r s).symm + _ = _ := by rw [Finset.prod_mul_distrib]; simp + rw [hp] + ring + +theorem finiteD_factor (a : Fin 15) (s : ℂ) : + 2 * (kappa : ℂ) * sineFactor a s * + Complex.cos ((kappa : ℂ) * (s - (residue a : ℂ))) = + Complex.I * (kappa : ℂ) * + (phase ((residue a : ℂ)-s)-phase (s-(residue a : ℂ))) := by + let z : ℂ := (kappa : ℂ) * (s-(residue a : ℂ)) + have hpos : phase (s-(residue a : ℂ)) = Complex.exp ((2*z)*Complex.I) := by + unfold phase z kappa + push_cast + congr 1 + ring + have hneg : phase ((residue a : ℂ)-s) = Complex.exp (-(2*z)*Complex.I) := by + unfold phase z kappa + push_cast + congr 1 + ring + rw [hpos,hneg] + change 2 * (kappa : ℂ) * (2 * Complex.sin z) * Complex.cos z = _ + have hs := Complex.two_sin (2*z) + rw [Complex.sin_two_mul] at hs + linear_combination (kappa : ℂ)*hs + +theorem rest_spectral (a : Fin 15) (s : ℂ) : + (∏ r ∈ Finset.univ.erase a, sineFactor r s ^ 2) = + phase (-s)^14 * ∏ r ∈ Finset.univ.erase a, (atomFactor r).eval (phase s) := by + calc + _ = ∏ r ∈ Finset.univ.erase a, phase (-s) * (atomFactor r).eval (phase s) := by + apply Finset.prod_congr rfl + intro r hr + exact (eval_atomFactor r s).symm + _ = _ := by rw [Finset.prod_mul_distrib]; simp + +theorem finiteD_spectral (a : Fin 15) (s : ℂ) : + finiteD a s = phase (-s)^15 * (dAtomPolynomial a).eval (phase s) := by + unfold finiteD dAtomPolynomial + rw [finiteD_factor a s, rest_spectral a s] + simp only [Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_prod, + Polynomial.eval_sub, Polynomial.eval_pow, Polynomial.eval_X] + have hh : phase (-s) * + (phase (residue a) - phase (-residue a) * phase s^2) = + phase ((residue a : ℂ)-s) - phase (s-(residue a : ℂ)) := by + have h1 : phase (-s) * phase (residue a) = phase ((residue a : ℂ)-s) := by + rw [← phase_add] + congr 1 + ring + have h2 : phase (-residue a) * phase s = phase (s-(residue a : ℂ)) := by + rw [← phase_add] + congr 1 + ring + have h0 := phase_neg_mul s + linear_combination h1 - phase (-residue a) * phase s * h0 - h2 + rw [← hh] + ring + +theorem atomFactor_degree (a : Fin 15) : (atomFactor a).natDegree ≤ 2 := by + unfold atomFactor + compute_degree! + +theorem atomPolynomial_degree : atomPolynomial.natDegree ≤ 30 := by + unfold atomPolynomial + apply le_trans (Polynomial.natDegree_prod_le _ _) + calc + ∑ a : Fin 15, (atomFactor a).natDegree ≤ ∑ a : Fin 15, 2 := + Finset.sum_le_sum (fun a _ => atomFactor_degree a) + _ = 30 := by norm_num + +end AtomicTriangular.Construction + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex Polynomial + +lemma phase_nat_mul (n : ℕ) (s : ℂ) : phase s ^ n = phase (n*s) := by + unfold phase + rw [← Complex.exp_nat_mul] + congr 1 + ring + +lemma phase_offset (j : Fin 31) (s : ℂ) : + phase (-s)^15 * phase s^j.val = + Complex.exp (Complex.I * (Real.pi:ℂ) * (frequency j:ℂ) * s) := by + rw [phase_nat_mul, phase_nat_mul, ← phase_add] + unfold phase frequency + push_cast + congr 1 + ring + +lemma P_fourier (s : ℂ) : P s = ∑ j : Fin 31, + fourierCoeff j * Complex.exp (Complex.I * (Real.pi:ℂ) * (frequency j:ℂ) * s) := by + rw [P_spectral, Polynomial.eval_eq_sum_range' (n := 31) (by have := atomPolynomial_degree; omega)] + rw [← Fin.sum_univ_eq_sum_range, Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + change phase (-s)^15 * (fourierCoeff j * phase s^j.val) = _ + rw [mul_left_comm, phase_offset] + +lemma phase_int_mod (n : ℤ) : phase (n:ℂ) = phase ((n%36:ℤ):ℂ) := by + have hn : (n:ℂ) = ((n%36:ℤ):ℂ) + 36*((n/36:ℤ):ℂ) := by + have h := congrArg (fun x : ℤ => (x:ℂ)) (Int.emod_add_mul_ediv n 36) + push_cast at h + exact h.symm + rw [hn, phase_add] + have hp : phase (36*((n/36:ℤ):ℂ)) = 1 := by + unfold phase + convert Complex.exp_int_mul_two_pi_mul_I (n/36) using 1 + congr 1 + ring + rw [hp, mul_one] + +lemma wave_phase_integer (j : Fin 31) (n : ℤ) : + exp (I*Real.pi*frequency j*(n:ℂ)) = phase ((((j.val:ℤ)-15)*n : ℤ):ℂ) := by + unfold phase frequency + push_cast + congr 1 + ring + +lemma waveDerivative_zero : waveDerivative 0 = P := by + ext s + simp only [waveDerivative, pow_zero, mul_one, P_fourier] + +lemma hasDerivAt_waveDerivative (k : ℕ) (s : ℂ) : + HasDerivAt (waveDerivative k) (waveDerivative (k+1) s) s := by + have hh (j : Fin 31) : HasDerivAt + (fun x : ℂ => fourierCoeff j * (I*Real.pi*frequency j)^k * exp (I*Real.pi*frequency j*x)) + (fourierCoeff j * (I*Real.pi*frequency j)^(k+1) * exp (I*Real.pi*frequency j*s)) s := by + have hj := ((hasDerivAt_id s).const_mul (I*(Real.pi:ℂ)*(frequency j:ℂ))).cexp.const_mul + (fourierCoeff j * (I*Real.pi*frequency j)^k) + simpa only [mul_one, one_mul, pow_succ, mul_assoc, id_eq, mul_comm, mul_left_comm] using hj + exact HasDerivAt.sum (u := Finset.univ) (fun j _ => hh j) + +lemma waveDerivative_eq_iterated (k : ℕ) : waveDerivative k = iteratedDeriv k P := by + induction k with + | zero => simpa only [iteratedDeriv_zero] using waveDerivative_zero + | succ k hk => + rw [iteratedDeriv_succ, ← hk] + exact funext fun s => (hasDerivAt_waveDerivative k s).deriv.symm + +lemma hasDerivAt_P (s : ℂ) : HasDerivAt P (waveDerivative 1 s) s := by + simpa only [waveDerivative_zero] using hasDerivAt_waveDerivative 0 s + +lemma fourier_node_cancel (n : Node) : waveDerivative 0 n.val = 0 := by + rw [waveDerivative_zero, P_node] + +lemma fourier_node_deriv_cancel (n : Node) : waveDerivative 1 n.val = 0 := by + rw [← (hasDerivAt_P n.val).deriv, deriv_P_node] + +end AtomicTriangular.Construction + +namespace AtomicTriangular.Interval + +def scale : ℤ := 10^60 +lemma scale_pos : (0:ℝ) < (scale:ℤ) := by norm_num [scale] +lemma scale_int_pos : 0 < scale := by norm_num [scale] + +structure RI where + lo : ℤ + hi : ℤ + deriving DecidableEq, Repr + +def RI.Mem (a : RI) (x : ℝ) : Prop := (a.lo:ℝ) ≤ (scale:ℝ)*x ∧ (scale:ℝ)*x ≤ a.hi + +def RI.point (n : ℤ) : RI := ⟨scale*n,scale*n⟩ +def RI.add (a b : RI) : RI := ⟨a.lo+b.lo,a.hi+b.hi⟩ +def RI.neg (a : RI) : RI := ⟨-a.hi,-a.lo⟩ +def RI.sub (a b : RI) : RI := a.add b.neg + +def imin4 (a b c d : ℤ) : ℤ := min (min a b) (min c d) +def imax4 (a b c d : ℤ) : ℤ := max (max a b) (max c d) +def RI.mul (a b : RI) : RI := + ⟨imin4 (a.lo*b.lo) (a.lo*b.hi) (a.hi*b.lo) (a.hi*b.hi) / scale, + imax4 (a.lo*b.lo) (a.lo*b.hi) (a.hi*b.lo) (a.hi*b.hi) / scale + 1⟩ + +def RI.divNat (a : RI) (n : ℕ) : RI := ⟨a.lo/n,a.hi/n+1⟩ +def RI.widen (a : RI) (r : ℤ) : RI := ⟨a.lo-r,a.hi+r⟩ + +def RI.pow (a : RI) : ℕ → RI + | 0 => .point 1 + | n+1 => (a.pow n).mul a + +lemma RI.mem_point (n : ℤ) : (RI.point n).Mem (n:ℝ) := by + simp [RI.Mem,RI.point] + +lemma RI.mem_add {a b : RI} {x y : ℝ} (hx : a.Mem x) (hy : b.Mem y) : + (a.add b).Mem (x+y) := by + rcases hx with ⟨hx₀,hx₁⟩; rcases hy with ⟨hy₀,hy₁⟩ + constructor <;> simp only [RI.add,Int.cast_add] <;> nlinarith + +lemma RI.mem_neg {a : RI} {x : ℝ} (hx : a.Mem x) : a.neg.Mem (-x) := by + rcases hx with ⟨hx₀,hx₁⟩ + constructor <;> simp only [RI.neg,Int.cast_neg] <;> nlinarith + +lemma RI.mem_sub {a b : RI} {x y : ℝ} (hx : a.Mem x) (hy : b.Mem y) : + (a.sub b).Mem (x-y) := by simpa [RI.sub,sub_eq_add_neg] using RI.mem_add hx (RI.mem_neg hy) + +lemma mul_bounds {a b x t : ℝ} (h : a ≤ x ∧ x ≤ b) : + min (a*t) (b*t) ≤ x*t ∧ x*t ≤ max (a*t) (b*t) := by + rcases le_total 0 t with ht | ht + · exact ⟨(min_le_left _ _).trans (mul_le_mul_of_nonneg_right h.1 ht), + (mul_le_mul_of_nonneg_right h.2 ht).trans (le_max_right _ _)⟩ + · exact ⟨(min_le_right _ _).trans (mul_le_mul_of_nonpos_right h.2 ht), + (mul_le_mul_of_nonpos_right h.1 ht).trans (le_max_left _ _)⟩ + +lemma four_bounds {a b c d x y : ℝ} (hx : a ≤ x ∧ x ≤ b) (hy : c ≤ y ∧ y ≤ d) : + min (min (a*c) (a*d)) (min (b*c) (b*d)) ≤ x*y ∧ + x*y ≤ max (max (a*c) (a*d)) (max (b*c) (b*d)) := by + have hxy := mul_bounds (t := y) hx + have ha := mul_bounds (t := a) hy + have hb := mul_bounds (t := b) hy + simp only [mul_comm c,mul_comm d,mul_comm y] at ha hb + constructor + · apply le_trans _ hxy.1 + exact le_min ((min_le_left _ _).trans ha.1) ((min_le_right _ _).trans hb.1) + · apply le_trans hxy.2 + exact max_le (ha.2.trans (le_max_left _ _)) (hb.2.trans (le_max_right _ _)) + +lemma div_floor_bounds (a n : ℤ) (hn : 0 < n) : + ((a/n:ℤ):ℝ)*(n:ℝ) ≤ a ∧ (a:ℝ) ≤ ((a/n+1:ℤ):ℝ)*(n:ℝ) := by + constructor + · exact_mod_cast Int.ediv_mul_le a (ne_of_gt hn) + · exact_mod_cast (Int.lt_ediv_add_one_mul_self a hn).le + +lemma RI.mem_mul {a b : RI} {x y : ℝ} (hx : a.Mem x) (hy : b.Mem y) : + (a.mul b).Mem (x*y) := by + have hh := four_bounds hx hy + have hl := (div_floor_bounds (imin4 (a.lo*b.lo) (a.lo*b.hi) (a.hi*b.lo) (a.hi*b.hi)) scale scale_int_pos).1 + have hu := (div_floor_bounds (imax4 (a.lo*b.lo) (a.lo*b.hi) (a.hi*b.lo) (a.hi*b.hi)) scale scale_int_pos).2 + simp only [imin4,imax4,Int.cast_min,Int.cast_max,Int.cast_mul] at hl hu + constructor + · apply (mul_le_mul_iff_right₀ scale_pos).mp + dsimp only [RI.mul,imin4,imax4] + nlinarith [hh.1] + · apply (mul_le_mul_iff_right₀ scale_pos).mp + dsimp only [RI.mul,imin4,imax4] + nlinarith [hh.2] + +lemma RI.mem_divNat {a : RI} {x : ℝ} (hx : a.Mem x) {n : ℕ} (hn : 0 < n) : + (a.divNat n).Mem (x/n) := by + have hn' : (0:ℝ) < n := by exact_mod_cast hn + have hnl : (0:ℤ) < n := by exact_mod_cast hn + have hl := (div_floor_bounds a.lo n hnl).1 + have hu := (div_floor_bounds a.hi n hnl).2 + constructor + · simpa only [RI.divNat,mul_div_assoc,Int.cast_natCast] using + (le_div_iff₀ hn').mpr (hl.trans hx.1) + · change (scale:ℝ)*(x/(n:ℝ)) ≤ ((a.hi/(n:ℤ)+1:ℤ):ℝ) + rw [← mul_div_assoc] + exact (div_le_iff₀ hn').mpr (hx.2.trans hu) + +lemma RI.mem_pow {a : RI} {x : ℝ} (hx : a.Mem x) (n : ℕ) : (a.pow n).Mem (x^n) := by + induction n with + | zero => simpa [RI.pow] using RI.mem_point 1 + | succ n ih => simpa [RI.pow,pow_succ] using RI.mem_mul ih hx + +lemma RI.mem_widen {a : RI} {x y : ℝ} {r : ℤ} (hx : a.Mem x) + (hxy : |y-x| ≤ (r:ℝ)/(scale:ℝ)) : (a.widen r).Mem y := by + have hh := abs_le.mp hxy + have hl := (div_le_iff₀ scale_pos).mp (show -(r:ℝ)/(scale:ℝ) ≤ y-x by simpa only [neg_div] using hh.1) + have hu := (le_div_iff₀ scale_pos).mp hh.2 + rcases hx with ⟨hx₀,hx₁⟩ + constructor <;> simp only [RI.widen,Int.cast_sub,Int.cast_add] <;> nlinarith + +def RI.invPos (a : RI) : RI := ⟨scale^2/a.hi,scale^2/a.lo+1⟩ + +lemma RI.mem_invPos {a : RI} {x : ℝ} (hx : a.Mem x) (ha : 0 < a.lo) : + a.invPos.Mem x⁻¹ := by + have halo : (0:ℝ) < a.lo := by exact_mod_cast ha + have hsx : 0 < (scale:ℝ)*x := halo.trans_le hx.1 + have hahi : (0:ℝ) < a.hi := hsx.trans_le hx.2 + have hahi' : (0:ℤ) < a.hi := by exact_mod_cast hahi + have hl := (div_floor_bounds (scale^2) a.hi hahi').1 + have hu := (div_floor_bounds (scale^2) a.lo ha).2 + push_cast at hl hu + have hlow : (((scale^2/a.hi:ℤ):ℝ)) ≤ (scale:ℝ)^2/((scale:ℝ)*x) := by + exact ((le_div_iff₀ hahi).mpr hl).trans + (div_le_div_of_nonneg_left (sq_nonneg _) hsx hx.2) + have hupp : (scale:ℝ)^2/((scale:ℝ)*x) ≤ (((scale^2/a.lo+1:ℤ):ℝ)) := by + exact (div_le_div_of_nonneg_left (sq_nonneg _) halo hx.1).trans + ((div_le_iff₀ halo).mpr (by simpa only [Int.cast_add,Int.cast_one] using hu)) + have heq : (scale:ℝ)^2/((scale:ℝ)*x) = (scale:ℝ)*x⁻¹ := by + field_simp [ne_of_gt scale_pos] + simpa only [heq,RI.Mem,RI.invPos] using And.intro hlow hupp + +structure CI where + re : RI + im : RI + deriving DecidableEq, Repr + +def CI.Mem (a : CI) (z : ℂ) : Prop := a.re.Mem z.re ∧ a.im.Mem z.im + +def CI.ofReal (a : RI) : CI := ⟨a,RI.point 0⟩ +def CI.point (n : ℤ) : CI := .ofReal (.point n) +def CI.imag : CI := ⟨RI.point 0,RI.point 1⟩ +def CI.add (a b : CI) : CI := ⟨a.re.add b.re,a.im.add b.im⟩ +def CI.neg (a : CI) : CI := ⟨a.re.neg,a.im.neg⟩ +def CI.sub (a b : CI) : CI := a.add b.neg + +def CI.mul (a b : CI) : CI := + ⟨(a.re.mul b.re).sub (a.im.mul b.im), (a.re.mul b.im).add (a.im.mul b.re)⟩ +def CI.conj (a : CI) : CI := ⟨a.re,a.im.neg⟩ +def CI.divNat (a : CI) (n : ℕ) : CI := ⟨a.re.divNat n,a.im.divNat n⟩ +def CI.widen (a : CI) (r : ℤ) : CI := ⟨a.re.widen r,a.im.widen r⟩ +def CI.normSq (a : CI) : RI := (a.re.mul a.re).add (a.im.mul a.im) +def CI.inv (a : CI) : CI := a.conj.mul (.ofReal a.normSq.invPos) + +def CI.pow (a : CI) : ℕ → CI + | 0 => .point 1 + | n+1 => (a.pow n).mul a + +lemma CI.mem_ofReal {a : RI} {x : ℝ} (h : a.Mem x) : (CI.ofReal a).Mem (x:ℂ) := by + exact ⟨h,by simpa [CI.ofReal] using RI.mem_point 0⟩ +lemma CI.mem_point (n : ℤ) : (CI.point n).Mem (n:ℂ) := by + exact CI.mem_ofReal (RI.mem_point n) +lemma CI.mem_imag : CI.imag.Mem Complex.I := by + exact ⟨by simpa [CI.imag] using RI.mem_point 0,by simpa [CI.imag] using RI.mem_point 1⟩ +lemma CI.mem_add {a b : CI} {x y : ℂ} (hx : a.Mem x) (hy : b.Mem y) : + (a.add b).Mem (x+y) := by exact ⟨RI.mem_add hx.1 hy.1,RI.mem_add hx.2 hy.2⟩ +lemma CI.mem_neg {a : CI} {x : ℂ} (hx : a.Mem x) : a.neg.Mem (-x) := by + exact ⟨RI.mem_neg hx.1,RI.mem_neg hx.2⟩ +lemma CI.mem_sub {a b : CI} {x y : ℂ} (hx : a.Mem x) (hy : b.Mem y) : + (a.sub b).Mem (x-y) := by simpa [sub_eq_add_neg,CI.sub] using CI.mem_add hx (CI.mem_neg hy) +lemma CI.mem_mul {a b : CI} {x y : ℂ} (hx : a.Mem x) (hy : b.Mem y) : + (a.mul b).Mem (x*y) := by + exact ⟨RI.mem_sub (RI.mem_mul hx.1 hy.1) (RI.mem_mul hx.2 hy.2), + RI.mem_add (RI.mem_mul hx.1 hy.2) (RI.mem_mul hx.2 hy.1)⟩ +lemma CI.mem_divNat {a : CI} {x : ℂ} (hx : a.Mem x) {n : ℕ} (hn : 0 < n) : + (a.divNat n).Mem (x/n) := by + simpa only [CI.Mem,CI.divNat,Complex.div_natCast_re,Complex.div_natCast_im] using + And.intro (RI.mem_divNat hx.1 hn) (RI.mem_divNat hx.2 hn) +lemma CI.mem_conj {a : CI} {x : ℂ} (hx : a.Mem x) : a.conj.Mem (starRingEnd ℂ x) := by + exact ⟨hx.1,RI.mem_neg hx.2⟩ +lemma CI.mem_normSq {a : CI} {x : ℂ} (hx : a.Mem x) : a.normSq.Mem (Complex.normSq x) := by + exact RI.mem_add (RI.mem_mul hx.1 hx.1) (RI.mem_mul hx.2 hx.2) +lemma CI.mem_inv {a : CI} {x : ℂ} (hx : a.Mem x) (ha : 0 < a.normSq.lo) : + a.inv.Mem x⁻¹ := by + have hh := CI.mem_mul (CI.mem_conj hx) (CI.mem_ofReal (RI.mem_invPos (CI.mem_normSq hx) ha)) + simpa only [CI.inv,Complex.inv_def] using hh +lemma CI.mem_pow {a : CI} {x : ℂ} (hx : a.Mem x) (n : ℕ) : (a.pow n).Mem (x^n) := by + induction n with + | zero => simpa [CI.pow] using CI.mem_point 1 + | succ n ih => simpa [CI.pow,pow_succ] using CI.mem_mul ih hx + +noncomputable section +open scoped BigOperators + +lemma CI.mem_widen {a : CI} {x y : ℂ} {r : ℤ} (hx : a.Mem x) + (hxy : ‖y-x‖ ≤ (r:ℝ)/(scale:ℝ)) : (a.widen r).Mem y := by + constructor + · apply RI.mem_widen hx.1 + exact (Complex.abs_re_le_norm (y-x)).trans hxy + · apply RI.mem_widen hx.2 + exact (Complex.abs_im_le_norm (y-x)).trans hxy + +def CI.taylor (a : CI) : ℕ → CI × CI + | 0 => (CI.point 1, CI.point 1) + | n+1 => + let previous := a.taylor n + let term := (previous.1.mul a).divNat (n+1) + (term, previous.2.add term) + +lemma CI.mem_taylor {a : CI} {x : ℂ} (hx : a.Mem x) (n : ℕ) : + (a.taylor n).1.Mem (x^n/(n.factorial : ℂ)) ∧ + (a.taylor n).2.Mem (∑ j ∈ Finset.range (n+1), x^j/(j.factorial : ℂ)) := by + induction n with + | zero => simpa [CI.taylor] using And.intro (CI.mem_point 1) (CI.mem_point 1) + | succ n ih => + have hf : x^(n+1)/((n+1).factorial : ℂ) = (x^n/(n.factorial : ℂ))*x/((n+1:ℕ):ℂ) := by + rw [Nat.factorial_succ, Nat.cast_mul, pow_succ] + push_cast + field_simp + constructor + · rw [hf] + exact CI.mem_divNat (CI.mem_mul ih.1 hx) (Nat.succ_pos n) + · rw [Finset.sum_range_succ, hf] + exact CI.mem_add ih.2 (CI.mem_divNat (CI.mem_mul ih.1 hx) (Nat.succ_pos n)) + +lemma small_taylor_error {x : ℂ} (hx : ‖x‖ ≤ 1) : + ‖Complex.exp x - ∑ j ∈ Finset.range 61, x^j/(j.factorial : ℂ)‖ ≤ + (1:ℝ)/(scale:ℝ) := by + have hh := Complex.exp_bound' (n := 61) (x := x) (by norm_num; linarith : ‖x‖ / 62 ≤ 1/2) + calc + _ ≤ ‖x‖^61/(Nat.factorial 61 : ℝ)*2 := hh + _ ≤ (1:ℝ)^61/(Nat.factorial 61 : ℝ)*2 := by gcongr + _ ≤ _ := by norm_num [scale] + +def CI.square (a : CI) : ℕ → CI + | 0 => a + | n+1 => (a.square n).mul (a.square n) + +lemma CI.mem_square {a : CI} {x : ℂ} (hx : a.Mem x) (n : ℕ) : + (a.square n).Mem (x^(2^n)) := by + induction n with + | zero => simpa [CI.square] using hx + | succ n ih => + rw [CI.square, show 2^(n+1) = 2^n*2 by rw [pow_succ], pow_mul, pow_two] + exact CI.mem_mul ih ih + +def CI.exp (a : CI) : CI := + (((a.divNat 1024).taylor 60).2.widen 1).square 10 + +lemma CI.mem_exp {a : CI} {x : ℂ} (hx : a.Mem x) (hn : ‖x/1024‖ ≤ 1) : + a.exp.Mem (Complex.exp x) := by + have hs := CI.mem_taylor (CI.mem_divNat hx (by norm_num : 0 < (1024:ℕ))) 60 + have he := CI.mem_widen (r := 1) hs.2 (by simpa only [Int.cast_one, Nat.cast_ofNat] using small_taylor_error hn) + have hh := CI.mem_square he 10 + have hpow : Complex.exp (x/1024) ^ (2^10) = Complex.exp x := by + rw [← Complex.exp_nat_mul] + norm_num + congr 1 + ring + simpa only [hpow, CI.exp] using hh + +lemma RI.mem_of_subset {a b : RI} {x : ℝ} (hx : a.Mem x) + (hl : b.lo ≤ a.lo) (hu : a.hi ≤ b.hi) : b.Mem x := by + have hl' : (b.lo:ℝ) ≤ a.lo := by exact_mod_cast hl + have hu' : (a.hi:ℝ) ≤ b.hi := by exact_mod_cast hu + exact ⟨hl'.trans hx.1, hx.2.trans hu'⟩ + +lemma CI.mem_of_subset {a b : CI} {x : ℂ} (hx : a.Mem x) + (hrl : b.re.lo ≤ a.re.lo) (hru : a.re.hi ≤ b.re.hi) + (hil : b.im.lo ≤ a.im.lo) (hiu : a.im.hi ≤ b.im.hi) : b.Mem x := by + exact ⟨RI.mem_of_subset hx.1 hrl hru, RI.mem_of_subset hx.2 hil hiu⟩ + +lemma CI.norm_le_of_mem {a : CI} {x : ℂ} (hx : a.Mem x) + (ha : a.normSq.hi ≤ scale * 1024^2) : ‖x / 1024‖ ≤ 1 := by + have hh := (CI.mem_normSq hx).2 + have hu : (a.normSq.hi : ℝ) ≤ (scale : ℝ) * 1024^2 := by exact_mod_cast ha + rw [Complex.normSq_eq_norm_sq] at hh + have hn : ‖x‖ ≤ 1024 := by + have hns : ‖x‖^2 ≤ 1024^2 := by nlinarith [scale_pos] + nlinarith [norm_nonneg x] + simpa using (div_le_one (by norm_num : (0:ℝ) < 1024)).mpr hn + +lemma CI.mem_exp_checked {a : CI} {x : ℂ} (hx : a.Mem x) + (ha : a.normSq.hi ≤ scale * 1024^2) : a.exp.Mem (Complex.exp x) := + CI.mem_exp hx (CI.norm_le_of_mem hx ha) + +def RI.abs (a : RI) : RI := ⟨max 0 (max a.lo (-a.hi)), max a.hi (-a.lo)⟩ +def RI.imax (a b : RI) : RI := ⟨max a.lo b.lo, max a.hi b.hi⟩ +def RI.imin (a b : RI) : RI := ⟨min a.lo b.lo, min a.hi b.hi⟩ +def RI.inv (a : RI) : RI := if a.hi < 0 then a.neg.invPos.neg else a.invPos + +lemma RI.mem_abs {a : RI} {x : ℝ} (hx : a.Mem x) : a.abs.Mem |x| := by + rcases hx with ⟨hl,hu⟩ + change (↑(max 0 (max a.lo (-a.hi))) : ℝ) ≤ (scale:ℝ)*|x| ∧ + (scale:ℝ)*|x| ≤ ↑(max a.hi (-a.lo)) + push_cast + rw [← abs_of_pos scale_pos, ← abs_mul] + constructor + · exact max_le (abs_nonneg _) (max_le (hl.trans (le_abs_self _)) (by simpa using (neg_le_neg hu).trans (neg_le_abs _))) + · exact (abs_le.mpr ⟨by linarith [le_max_right (a.hi:ℝ) (-(a.lo:ℝ))], hu.trans (le_max_left _ _)⟩) + +lemma RI.mem_max {a b : RI} {x y : ℝ} (hx : a.Mem x) (hy : b.Mem y) : + (a.imax b).Mem (max x y) := by + constructor + · simp only [RI.imax, Int.cast_max, mul_max_of_nonneg _ _ scale_pos.le] + exact max_le_max hx.1 hy.1 + · simp only [RI.imax, Int.cast_max, mul_max_of_nonneg _ _ scale_pos.le] + exact max_le_max hx.2 hy.2 + +lemma RI.mem_min {a b : RI} {x y : ℝ} (hx : a.Mem x) (hy : b.Mem y) : + (a.imin b).Mem (min x y) := by + constructor + · simp only [RI.imin, Int.cast_min, mul_min_of_nonneg _ _ scale_pos.le] + exact min_le_min hx.1 hy.1 + · simp only [RI.imin, Int.cast_min, mul_min_of_nonneg _ _ scale_pos.le] + exact min_le_min hx.2 hy.2 + +lemma RI.mem_inv {a : RI} {x : ℝ} (hx : a.Mem x) (ha : 0 < a.lo ∨ a.hi < 0) : + a.inv.Mem x⁻¹ := by + unfold RI.inv + split_ifs with hh + · have hp : 0 < a.neg.lo := by simpa [RI.neg] using neg_pos.mpr hh + simpa using RI.mem_neg (RI.mem_invPos (RI.mem_neg hx) hp) + · exact RI.mem_invPos hx (ha.resolve_right hh) + +lemma RI.mem_sqrt {a r : RI} {x : ℝ} (hx : a.Mem x) (h₀ : 0 ≤ x) + (hr₀ : 0 ≤ r.lo) (hr₁ : r.lo * r.lo ≤ scale * max 0 a.lo) + (hr₂ : scale * a.hi ≤ r.hi * r.hi) (hr₃ : 0 ≤ r.hi) : + r.Mem (Real.sqrt x) := by + have hs := Real.sq_sqrt h₀ + have hp := Real.sqrt_nonneg x + have hrl : (0:ℝ) ≤ r.lo := by exact_mod_cast hr₀ + have hrh : (0:ℝ) ≤ r.hi := by exact_mod_cast hr₃ + have hrls : (r.lo:ℝ) * r.lo ≤ (scale:ℝ) * max (0:ℝ) (a.lo:ℝ) := by exact_mod_cast hr₁ + have hrhs : (scale:ℝ) * a.hi ≤ (r.hi:ℝ) * r.hi := by exact_mod_cast hr₂ + have hsl := mul_le_mul_of_nonneg_left (max_le (mul_nonneg scale_pos.le h₀) hx.1) scale_pos.le + have hsh := mul_le_mul_of_nonneg_left hx.2 scale_pos.le + have he : ((scale:ℝ) * Real.sqrt x)^2 = (scale:ℝ) * ((scale:ℝ)*x) := by + rw [mul_pow, hs] + ring + constructor <;> nlinarith [mul_nonneg scale_pos.le hp] + +lemma CI.mem_norm {a : CI} {r : RI} {x : ℂ} (hx : a.Mem x) + (hr₀ : 0 ≤ r.lo) (hr₁ : r.lo * r.lo ≤ scale * max 0 a.normSq.lo) + (hr₂ : scale * a.normSq.hi ≤ r.hi * r.hi) (hr₃ : 0 ≤ r.hi) : + r.Mem ‖x‖ := by + have hh := RI.mem_sqrt (CI.mem_normSq hx) (Complex.normSq_nonneg x) hr₀ hr₁ hr₂ hr₃ + simpa [Complex.normSq_eq_norm_sq] using hh + +end +end AtomicTriangular.Interval + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Interval + +def RI.sum {ι : Type*} [Fintype ι] (v : ι → RI) : RI := + ⟨∑ i, (v i).lo, ∑ i, (v i).hi⟩ + +lemma RI.mem_sum {ι : Type*} [Fintype ι] {v : ι → RI} {x : ι → ℝ} + (hv : ∀ i, (v i).Mem (x i)) : (RI.sum v).Mem (∑ i, x i) := by + constructor + · simp only [RI.sum, Int.cast_sum, Finset.mul_sum] + exact Finset.sum_le_sum fun i _ => (hv i).1 + · simp only [RI.sum, Int.cast_sum, Finset.mul_sum] + exact Finset.sum_le_sum fun i _ => (hv i).2 + +def CI.sum {ι : Type*} [Fintype ι] (v : ι → CI) : CI := + ⟨RI.sum (fun i => (v i).re), RI.sum (fun i => (v i).im)⟩ + +lemma CI.mem_sum {ι : Type*} [Fintype ι] {v : ι → CI} {x : ι → ℂ} + (hv : ∀ i, (v i).Mem (x i)) : (CI.sum v).Mem (∑ i, x i) := by + constructor + · simp only [Complex.re_sum] + exact RI.mem_sum fun i => (hv i).1 + · simp only [Complex.im_sum] + exact RI.mem_sum fun i => (hv i).2 + +end AtomicTriangular.Interval + +noncomputable section +open scoped BigOperators Topology +open Finset Filter +namespace AtomicTriangular.Constants + +def eps : ℝ := (10^80)⁻¹ +def pStar : ℝ := 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899 +def bStar : ℝ := 0.86602540378443864676372317075293618347140262690519031402790348972596650845440001 + +def arctanPoly (x : ℝ) (n : ℕ) : ℝ := + ∑ j ∈ range n, (-1)^j*x^(2*j+1)/(2*j+1) + +lemma arctan_bracket {x : ℝ} (h₀ : 0 ≤ x) (h₁ : x < 1) (n : ℕ) : + arctanPoly x (2*n) ≤ Real.arctan x ∧ + Real.arctan x ≤ arctanPoly x (2*n) + x^(4*n+1)/(4*n+1) := by + have ha : Antitone (fun j : ℕ => x^(2*j+1)/(2*j+1)) := by + intro j k hjk + apply div_le_div₀ (pow_nonneg h₀ _) + (pow_le_pow_of_le_one h₀ h₁.le (by omega)) (by positivity) + exact_mod_cast (by omega : 2*j+1 ≤ 2*k+1) + have ht : Tendsto (fun n : ℕ => ∑ j ∈ range n, + (-1:ℝ)^j * (x^(2*j+1)/(2*j+1))) atTop (𝓝 (Real.arctan x)) := by + simpa only [mul_div_assoc, Nat.cast_add, Nat.cast_mul, Nat.cast_ofNat, Nat.cast_one] using + (Real.hasSum_arctan (x := x) (by simpa [Real.norm_eq_abs, abs_of_nonneg h₀])).tendsto_sum_nat + constructor + · simpa only [arctanPoly, mul_div_assoc] using ha.alternating_series_le_tendsto ht n + · have hh := ha.tendsto_le_alternating_series ht n + simpa [arctanPoly, sum_range_succ, mul_div_assoc, ← mul_assoc, show (2:ℝ)*2=4 by norm_num] using hh + +lemma bStar_bracket : bStar < Real.sqrt 3 / 2 ∧ Real.sqrt 3 / 2 < bStar + eps := by + have hs := Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 3) + have hn := Real.sqrt_nonneg (3:ℝ) + have hp : 0 < bStar := by norm_num [bStar] + have he : 0 < eps := by norm_num [eps] + have h₁ : bStar^2 < (3:ℝ)/4 := by norm_num [bStar] + have h₂ : (3:ℝ)/4 < (bStar+eps)^2 := by norm_num [bStar, eps] + constructor <;> nlinarith + +lemma arctanPoly_inv5 : arctanPoly (1/5) 66 = + (1127735820047281249826929962540366709009681070146611148630124134909087293535356022585063476519722124011352752446574182801704731339148829291186 : ℝ) / 5713075921793397351900334790776425890382017146109705783051183673650632561398172069707387162692372481291591679308794482494704425334930419921875 := by + norm_num [arctanPoly, Finset.sum_range_succ] + +lemma arctanPoly_inv239 : arctanPoly (1/239) 66 = + (1118499394876416155561248293203315319858384148339754901282838013788591793901685995599875876925744187341881465177415079642435790204501443414217256735370408712354720598117442228707319810097027336706847276448482833107456896007088774973302196447103862002632135039862371139157305730782208439937297739381319965159523409065323737874075361079721743262198339765260034519498 : ℝ) / 267322915339442907721699424219844204360421434646325545345832816547242287762014829735766747100513282387541656695398803852049344802256469797061373857157082424828915581864219799259751119529925859323776796465869821218865822100577138580956944108601031719877043720686956487215878943801043900609923763261313848030486279699763172497745026116723198663028174351830029321704625 := by + norm_num [arctanPoly, Finset.sum_range_succ] + +theorem pStar_bracket : pStar < Real.pi ∧ Real.pi < pStar + eps := by + have h₅ := arctan_bracket (x := 1/5) (by norm_num) (by norm_num) 33 + have h₂₃₉ := arctan_bracket (x := 1/239) (by norm_num) (by norm_num) 33 + norm_num only [show 2*33 = (66:ℕ) by rfl, show 4*33+1 = (133:ℕ) by rfl] at h₅ h₂₃₉ + have hm := Real.four_mul_arctan_inv_5_sub_arctan_inv_239 + rw [inv_eq_one_div, inv_eq_one_div] at hm + have hl : pStar < 16*arctanPoly (1/5) 66 - + 4*(arctanPoly (1/239) 66 + (1/239:ℝ)^133/133) := by + rw [arctanPoly_inv5, arctanPoly_inv239] + norm_num [pStar] + have hu : 16*(arctanPoly (1/5) 66 +(1/5:ℝ)^133/133) - + 4*arctanPoly (1/239) 66 < pStar + eps := by + rw [arctanPoly_inv5, arctanPoly_inv239] + norm_num [pStar, eps] + constructor <;> linarith + +end AtomicTriangular.Constants + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Polynomial + +def piBox : RI := + ⟨3141592653589793238462643383279502884197169399375100000000000, + 3141592653589793238462643383279502884197169399375110000000000⟩ + +lemma piBox_mem : piBox.Mem Real.pi := by + obtain ⟨hl,hu⟩ := Constants.pStar_bracket + constructor <;> dsimp [RI.Mem, piBox] + · have hstar : (piBox.lo:ℝ) / (scale:ℝ) ≤ Constants.pStar := by + norm_num [piBox,scale,Constants.pStar] + have hpi := hstar.trans hl.le + simpa only [mul_comm, piBox] using (div_le_iff₀ scale_pos).mp hpi + · have hstar : Constants.pStar + Constants.eps ≤ (piBox.hi:ℝ) / (scale:ℝ) := by + norm_num [piBox,scale,Constants.pStar,Constants.eps] + have hpi := hu.le.trans hstar + simpa only [mul_comm, piBox] using (le_div_iff₀ scale_pos).mp hpi + +lemma phase_conj (s : ℝ) : starRingEnd ℂ (phase (s:ℂ)) = phase (-(s:ℂ)) := by + unfold phase + rw [← Complex.exp_conj] + congr 1 + simp only [map_div₀, map_mul, map_ofNat, Complex.conj_ofReal, Complex.conj_I] + ring + +def partialPolynomial (n : ℕ) : Polynomial ℂ := + ∏ a ∈ Finset.univ.filter (fun a : Fin 15 => a.val < n), atomFactor a + +lemma partialPolynomial_zero : partialPolynomial 0 = 1 := by simp [partialPolynomial] +lemma partialPolynomial_fifteen : partialPolynomial 15 = atomPolynomial := by simp [partialPolynomial, atomPolynomial] +lemma partialPolynomial_succ {n : ℕ} (hn : n < 15) : + partialPolynomial (n+1) = atomFactor ⟨n,hn⟩ * partialPolynomial n := by + have he : Finset.univ.filter (fun a : Fin 15 => a.val < n+1) = + insert ⟨n,hn⟩ (Finset.univ.filter (fun a : Fin 15 => a.val < n)) := by + ext a + simp only [Finset.mem_filter, Finset.mem_univ, true_and, Finset.mem_insert] + simp only [Fin.ext_iff] + omega + rw [partialPolynomial, he, Finset.prod_insert] + · rfl + · simp + +lemma coeff_X_mul' (p : Polynomial ℂ) (n : ℕ) : + (X*p).coeff n = if n=0 then 0 else p.coeff (n-1) := by + cases n with + | zero => simp + | succ n => simp [coeff_X_mul] + +lemma coeff_X_sq_mul (p : Polynomial ℂ) (n : ℕ) : + (X^2*p).coeff n = if n<2 then 0 else p.coeff (n-2) := by + rw [pow_two, mul_assoc, coeff_X_mul'] + cases n with + | zero => simp + | succ n => + cases n with + | zero => simp + | succ n => simp [coeff_X_mul] + +lemma coeff_atom_mul (a : Fin 15) (p : Polynomial ℂ) (n : ℕ) : + (atomFactor a*p).coeff n = + -(phase (residue a))*p.coeff n + + (if n=0 then 0 else 2*p.coeff (n-1)) - + (if n<2 then 0 else phase (-(residue a : ℂ))*p.coeff (n-2)) := by + unfold atomFactor + rw [sub_mul, add_mul, neg_mul, mul_assoc, mul_assoc, coeff_sub, coeff_add, + coeff_neg, coeff_C_mul, coeff_C_mul, + coeff_C_mul, coeff_X_mul', coeff_X_sq_mul] + split_ifs <;> ring + +def coeffStep (e : CI) (v : Fin 31 → CI) (j : Fin 31) : CI := + ((e.neg.mul (v j)).add (if h : j.val=0 then CI.point 0 + else (CI.point 2).mul (v ⟨j.val-1,by omega⟩))).sub + (if h : j.val<2 then CI.point 0 else e.conj.mul (v ⟨j.val-2,by omega⟩)) + +lemma coeffStep_mem (a : Fin 15) (p : Polynomial ℂ) (e : CI) + (v : Fin 31 → CI) (he : e.Mem (phase (residue a))) + (hv : ∀ j : Fin 31, (v j).Mem (p.coeff j.val)) (j : Fin 31) : + (coeffStep e v j).Mem ((atomFactor a*p).coeff j.val) := by + rw [coeff_atom_mul] + apply CI.mem_sub + · apply CI.mem_add + · exact CI.mem_mul (CI.mem_neg he) (hv j) + · split_ifs with hn + · simpa using CI.mem_point 0 + · exact CI.mem_mul (CI.mem_point 2) (hv ⟨j.val-1,by omega⟩) + · split_ifs with hn + · simpa using CI.mem_point 0 + · have he' : e.conj.Mem (phase (-(residue a : ℂ))) := by + have hh := CI.mem_conj he + simpa only [← Complex.ofReal_intCast, phase_conj] using hh + exact CI.mem_mul he' (hv ⟨j.val-2,by omega⟩) + +def phaseInputBox (n : ℤ) : CI := + (CI.imag.mul (CI.ofReal (piBox.mul (RI.point n)))).divNat 18 + +lemma phaseInputBox_mem (n : ℤ) : + (phaseInputBox n).Mem ((Real.pi : ℂ) * Complex.I * (n:ℂ) / 18) := by + have hp := CI.mem_mul CI.mem_imag (CI.mem_ofReal (RI.mem_mul piBox_mem (RI.mem_point n))) + have hh := CI.mem_divNat hp (by norm_num : 0 < (18:ℕ)) + change ((CI.imag.mul (CI.ofReal (piBox.mul (RI.point n)))).divNat 18).Mem _ + convert hh using 1 + push_cast + ring + +end AtomicTriangular.FiniteCertificate + +noncomputable section +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Polynomial +def phaseBox0 : CI := ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩ +lemma phaseBox0_calc : (phaseInputBox 0).exp = phaseBox0 := by decide +kernel +lemma phaseBox0_mem : phaseBox0.Mem (phase ((0:ℤ):ℂ)) := by + rw [← phaseBox0_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 0) (by decide +kernel) +def phaseBox1 : CI := ⟨⟨984807753012208059366743024589523013670643251719842378260439,984807753012208059366743024589523013670643251719842475161964⟩,⟨173648177666930348851716626769314796000375677184069063062132,173648177666930348851716626769314796000375677184069621580864⟩⟩ +lemma phaseBox1_calc : (phaseInputBox 1).exp = phaseBox1 := by decide +kernel +lemma phaseBox1_mem : phaseBox1.Mem (phase ((1:ℤ):ℂ)) := by + rw [← phaseBox1_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 1) (by decide +kernel) +def phaseBox2 : CI := ⟨⟨939692620785908384054109277324731469936208134264464471960044,939692620785908384054109277324731469936208134264464856618258⟩,⟨342020143325668733044099614682259580763083367514159975976700,342020143325668733044099614682259580763083367514161109522372⟩⟩ +lemma phaseBox2_calc : (phaseInputBox 2).exp = phaseBox2 := by decide +kernel +lemma phaseBox2_mem : phaseBox2.Mem (phase ((2:ℤ):ℂ)) := by + rw [← phaseBox2_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 2) (by decide +kernel) +def phaseBox3 : CI := ⟨⟨866025403784438646763723170752936183471402626905189954512964,866025403784438646763723170752936183471402626905190810370953⟩,⟨499999999999999999999999999999999999999999999999999011153642,500000000000000000000000000000000000000000000000000751856976⟩⟩ +lemma phaseBox3_calc : (phaseInputBox 3).exp = phaseBox3 := by decide +kernel +lemma phaseBox3_mem : phaseBox3.Mem (phase ((3:ℤ):ℂ)) := by + rw [← phaseBox3_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 3) (by decide +kernel) +def phaseBox4 : CI := ⟨⟨766044443118978035202392650555416673935832457080394614080696,766044443118978035202392650555416673935832457080396112163801⟩,⟨642787609686539326322643409907263432907559884205680453940922,642787609686539326322643409907263432907559884205682847200174⟩⟩ +lemma phaseBox4_calc : (phaseInputBox 4).exp = phaseBox4 := by decide +kernel +lemma phaseBox4_mem : phaseBox4.Mem (phase ((4:ℤ):ℂ)) := by + rw [← phaseBox4_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 4) (by decide +kernel) +def phaseBox5 : CI := ⟨⟨642787609686539326322643409907263432907559884205680817903044,642787609686539326322643409907263432907559884205683112135181⟩,⟨766044443118978035202392650555416673935832457080393548649076,766044443118978035202392650555416673935832457080396649890976⟩⟩ +lemma phaseBox5_calc : (phaseInputBox 5).exp = phaseBox5 := by decide +kernel +lemma phaseBox5_mem : phaseBox5.Mem (phase ((5:ℤ):ℂ)) := by + rw [← phaseBox5_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 5) (by decide +kernel) +def phaseBox6 : CI := ⟨⟨499999999999999999999999999999999999999999999999998625582869,500000000000000000000000000000000000000000000000001848404295⟩,⟨866025403784438646763723170752936183471402626905188241914124,866025403784438646763723170752936183471402626905192112487718⟩⟩ +lemma phaseBox6_calc : (phaseInputBox 6).exp = phaseBox6 := by decide +kernel +lemma phaseBox6_mem : phaseBox6.Mem (phase ((6:ℤ):ℂ)) := by + rw [← phaseBox6_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 6) (by decide +kernel) +def phaseBox7 : CI := ⟨⟨342020143325668733044099614682259580763083367514158799320630,342020143325668733044099614682259580763083367514163057632021⟩,⟨939692620785908384054109277324731469936208134264462172730300,939692620785908384054109277324731469936208134264466875061792⟩⟩ +lemma phaseBox7_calc : (phaseInputBox 7).exp = phaseBox7 := by decide +kernel +lemma phaseBox7_mem : phaseBox7.Mem (phase ((7:ℤ):ℂ)) := by + rw [← phaseBox7_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 7) (by decide +kernel) +def phaseBox8 : CI := ⟨⟨173648177666930348851716626769314796000375677184067060768548,173648177666930348851716626769314796000375677184072432368187⟩,⟨984807753012208059366743024589523013670643251719839559295028,984807753012208059366743024589523013670643251719845151568286⟩⟩ +lemma phaseBox8_calc : (phaseInputBox 8).exp = phaseBox8 := by decide +kernel +lemma phaseBox8_mem : phaseBox8.Mem (phase ((8:ℤ):ℂ)) := by + rw [← phaseBox8_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 8) (by decide +kernel) +def phaseBox9 : CI := ⟨⟨-2854777273,3675745116⟩,⟨999999999999999999999999999999999999999999999999996734740088,1000000000000000000000000000000000000000000000000003265262478⟩⟩ +lemma phaseBox9_calc : (phaseInputBox 9).exp = phaseBox9 := by decide +kernel +lemma phaseBox9_mem : phaseBox9.Mem (phase ((9:ℤ):ℂ)) := by + rw [← phaseBox9_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 9) (by decide +kernel) +def phaseBox10 : CI := ⟨⟨-173648177666930348851716626769314796000375677184072788297342,-173648177666930348851716626769314796000375677184065087845911⟩,⟨984807753012208059366743024589523013670643251719838747234178,984807753012208059366743024589523013670643251719846248746530⟩⟩ +lemma phaseBox10_calc : (phaseInputBox 10).exp = phaseBox10 := by decide +kernel +lemma phaseBox10_mem : phaseBox10.Mem (phase ((10:ℤ):ℂ)) := by + rw [← phaseBox10_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 10) (by decide +kernel) +def phaseBox11 : CI := ⟨⟨-342020143325668733044099614682259580763083367514164579490877,-342020143325668733044099614682259580763083367514155734542861⟩,⟨939692620785908384054109277324731469936208134264460562604050,939692620785908384054109277324731469936208134264469046765440⟩⟩ +lemma phaseBox11_calc : (phaseInputBox 11).exp = phaseBox11 := by decide +kernel +lemma phaseBox11_mem : phaseBox11.Mem (phase ((11:ℤ):ℂ)) := by + rw [← phaseBox11_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 11) (by decide +kernel) +def phaseBox12 : CI := ⟨⟨-500000000000000000000000000000000000000000000000004489253604,-499999999999999999999999999999999999999999999999994562770708⟩,⟨866025403784438646763723170752936183471402626905185861538948,866025403784438646763723170752936183471402626905195313833830⟩⟩ +lemma phaseBox12_calc : (phaseInputBox 12).exp = phaseBox12 := by decide +kernel +lemma phaseBox12_mem : phaseBox12.Mem (phase ((12:ℤ):ℂ)) := by + rw [← phaseBox12_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 12) (by decide +kernel) +def phaseBox13 : CI := ⟨⟨-642787609686539326322643409907263432907559884205686789753345,-642787609686539326322643409907263432907559884205675882485247⟩,⟨766044443118978035202392650555416673935832457080390439298182,766044443118978035202392650555416673935832457080400814661650⟩⟩ +lemma phaseBox13_calc : (phaseInputBox 13).exp = phaseBox13 := by decide +kernel +lemma phaseBox13_mem : phaseBox13.Mem (phase ((13:ℤ):ℂ)) := by + rw [← phaseBox13_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 13) (by decide +kernel) +def phaseBox14 : CI := ⟨⟨-766044443118978035202392650555416673935832457080400710407312,-766044443118978035202392650555416673935832457080388960420236⟩,⟨642787609686539326322643409907263432907559884205676669856626,642787609686539326322643409907263432907559884205687889085620⟩⟩ +lemma phaseBox14_calc : (phaseInputBox 14).exp = phaseBox14 := by decide +kernel +lemma phaseBox14_mem : phaseBox14.Mem (phase ((14:ℤ):ℂ)) := by + rw [← phaseBox14_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 14) (by decide +kernel) +def phaseBox15 : CI := ⟨⟨-866025403784438646763723170752936183471402626905196181323615,-866025403784438646763723170752936183471402626905183762590658⟩,⟨499999999999999999999999999999999999999999999999994618824454,500000000000000000000000000000000000000000000000006566147044⟩⟩ +lemma phaseBox15_calc : (phaseInputBox 15).exp = phaseBox15 := by decide +kernel +lemma phaseBox15_mem : phaseBox15.Mem (phase ((15:ℤ):ℂ)) := by + rw [← phaseBox15_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 15) (by decide +kernel) +def phaseBox16 : CI := ⟨⟨-939692620785908384054109277324731469936208134264470823413628,-939692620785908384054109277324731469936208134264457943587609⟩,⟨342020143325668733044099614682259580763083367514155053298568,342020143325668733044099614682259580763083367514167575120924⟩⟩ +lemma phaseBox16_calc : (phaseInputBox 16).exp = phaseBox16 := by decide +kernel +lemma phaseBox16_mem : phaseBox16.Mem (phase ((16:ℤ):ℂ)) := by + rw [← phaseBox16_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 16) (by decide +kernel) +def phaseBox17 : CI := ⟨⟨-984807753012208059366743024589523013670643251719848835505828,-984807753012208059366743024589523013670643251719835732797643⟩,⟨173648177666930348851716626769314796000375677184063698304240,173648177666930348851716626769314796000375677184076603333880⟩⟩ +lemma phaseBox17_calc : (phaseInputBox 17).exp = phaseBox17 := by decide +kernel +lemma phaseBox17_mem : phaseBox17.Mem (phase ((17:ℤ):ℂ)) := by + rw [← phaseBox17_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 17) (by decide +kernel) +def phaseBox18 : CI := ⟨⟨-1000000000000000000000000000000000000000000000000006530375474,-999999999999999999999999999999999999999999999999993469625023⟩,⟨-5709403374,7351347078⟩⟩ +lemma phaseBox18_calc : (phaseInputBox 18).exp = phaseBox18 := by decide +kernel +lemma phaseBox18_mem : phaseBox18.Mem (phase ((18:ℤ):ℂ)) := by + rw [← phaseBox18_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 18) (by decide +kernel) +def phaseBox19 : CI := ⟨⟨-984807753012208059366743024589523013670643251719850175773758,-984807753012208059366743024589523013670643251719834962769522⟩,⟨-173648177666930348851716626769314796000375677184076234168892,-173648177666930348851716626769314796000375677184060833470644⟩⟩ +lemma phaseBox19_calc : (phaseInputBox 19).exp = phaseBox19 := by decide +kernel +lemma phaseBox19_mem : phaseBox19.Mem (phase ((19:ℤ):ℂ)) := by + rw [← phaseBox19_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 19) (by decide +kernel) +def phaseBox20 : CI := ⟨⟨-939692620785908384054109277324731469936208134264473669623711,-939692620785908384054109277324731469936208134264456220534602⟩,⟨-342020143325668733044099614682259580763083367514168657202328,-342020143325668733044099614682259580763083367514150885369606⟩⟩ +lemma phaseBox20_calc : (phaseInputBox 20).exp = phaseBox20 := by decide +kernel +lemma phaseBox20_mem : phaseBox20.Mem (phase ((20:ℤ):ℂ)) := by + rw [← phaseBox20_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 20) (by decide +kernel) +def phaseBox21 : CI := ⟨⟨-866025403784438646763723170752936183471402626905200655848102,-866025403784438646763723170752936183471402626905180930009073⟩,⟨-500000000000000000000000000000000000000000000000009235181440,-499999999999999999999999999999999999999999999999989105858860⟩⟩ +lemma phaseBox21_calc : (phaseInputBox 21).exp = phaseBox21 := by decide +kernel +lemma phaseBox21_mem : phaseBox21.Mem (phase ((21:ℤ):ℂ)) := by + rw [← phaseBox21_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 21) (by decide +kernel) +def phaseBox22 : CI := ⟨⟨-766044443118978035202392650555416673935832457080406888294869,-766044443118978035202392650555416673935832457080384893374795⟩,⟨-642787609686539326322643409907263432907559884205692234760934,-642787609686539326322643409907263432907559884205669808574574⟩⟩ +lemma phaseBox22_calc : (phaseInputBox 22).exp = phaseBox22 := by decide +kernel +lemma phaseBox22_mem : phaseBox22.Mem (phase ((22:ℤ):ℂ)) := by + rw [← phaseBox22_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 22) (by decide +kernel) +def phaseBox23 : CI := ⟨⟨-642787609686539326322643409907263432907559884205694695891306,-642787609686539326322643409907263432907559884205670491952222⟩,⟨-766044443118978035202392650555416673935832457080406878657306,-766044443118978035202392650555416673935832457080382264458734⟩⟩ +lemma phaseBox23_calc : (phaseInputBox 23).exp = phaseBox23 := by decide +kernel +lemma phaseBox23_mem : phaseBox23.Mem (phase ((23:ℤ):ℂ)) := by + rw [← phaseBox23_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 23) (by decide +kernel) +def phaseBox24 : CI := ⟨⟨-500000000000000000000000000000000000000000000000014096951365,-499999999999999999999999999999999999999999999999987799006330⟩,⟨-866025403784438646763723170752936183471402626905203089251490,-866025403784438646763723170752936183471402626905176444175326⟩⟩ +lemma phaseBox24_calc : (phaseInputBox 24).exp = phaseBox24 := by decide +kernel +lemma phaseBox24_mem : phaseBox24.Mem (phase ((24:ℤ):ℂ)) := by + rw [← phaseBox24_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 24) (by decide +kernel) +def phaseBox25 : CI := ⟨⟨-342020143325668733044099614682259580763083367514175810431770,-342020143325668733044099614682259580763083367514147589449286⟩,⟨-939692620785908384054109277324731469936208134264478478914456,-939692620785908384054109277324731469936208134264450007296924⟩⟩ +lemma phaseBox25_calc : (phaseInputBox 25).exp = phaseBox25 := by decide +kernel +lemma phaseBox25_mem : phaseBox25.Mem (phase ((25:ℤ):ℂ)) := by + rw [← phaseBox25_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 25) (by decide +kernel) +def phaseBox26 : CI := ⟨⟨-173648177666930348851716626769314796000375677184085513919999,-173648177666930348851716626769314796000375677184055596221926⟩,⟨-984807753012208059366743024589523013670643251719857237281372,-984807753012208059366743024589523013670643251719827188460900⟩⟩ +lemma phaseBox26_calc : (phaseInputBox 26).exp = phaseBox26 := by decide +kernel +lemma phaseBox26_mem : phaseBox26.Mem (phase ((26:ℤ):ℂ)) := by + rw [← phaseBox26_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 26) (by decide +kernel) +def phaseBox27 : CI := ⟨⟨-16899068771,14436150239⟩,⟨-1000000000000000000000000000000000000000000000000015667611120,-999999999999999999999999999999999999999999999999984332392110⟩⟩ +lemma phaseBox27_calc : (phaseInputBox 27).exp = phaseBox27 := by decide +kernel +lemma phaseBox27_mem : phaseBox27.Mem (phase ((27:ℤ):ℂ)) := by + rw [← phaseBox27_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 27) (by decide +kernel) +def phaseBox28 : CI := ⟨⟨173648177666930348851716626769314796000375677184051917148030,173648177666930348851716626769314796000375677184084341989196⟩,⟨-984807753012208059366743024589523013670643251719858787552808,-984807753012208059366743024589523013670643251719826493551508⟩⟩ +lemma phaseBox28_calc : (phaseInputBox 28).exp = phaseBox28 := by decide +kernel +lemma phaseBox28_mem : phaseBox28.Mem (phase ((28:ℤ):ℂ)) := by + rw [← phaseBox28_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 28) (by decide +kernel) +def phaseBox29 : CI := ⟨⟨342020143325668733044099614682259580763083367514142813650362,342020143325668733044099614682259580763083367514175957454200⟩,⟨-939692620785908384054109277324731469936208134264481532580062,-939692620785908384054109277324731469936208134264448638369502⟩⟩ +lemma phaseBox29_calc : (phaseInputBox 29).exp = phaseBox29 := by decide +kernel +lemma phaseBox29_mem : phaseBox29.Mem (phase ((29:ℤ):ℂ)) := by + rw [← phaseBox29_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 29) (by decide +kernel) +def phaseBox30 : CI := ⟨⟨499999999999999999999999999999999999999999999999982086571115,500000000000000000000000000000000000000000000000015543483824⟩,⟨-866025403784438646763723170752936183471402626905207554081534,-866025403784438646763723170752936183471402626905174442267480⟩⟩ +lemma phaseBox30_calc : (phaseInputBox 30).exp = phaseBox30 := by decide +kernel +lemma phaseBox30_mem : phaseBox30.Mem (phase ((30:ℤ):ℂ)) := by + rw [← phaseBox30_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 30) (by decide +kernel) +def phaseBox31 : CI := ⟨⟨642787609686539326322643409907263432907559884205664038197821,642787609686539326322643409907263432907559884205697376234924⟩,⟨-766044443118978035202392650555416673935832457080412620035652,-766044443118978035202392650555416673935832457080379689347294⟩⟩ +lemma phaseBox31_calc : (phaseInputBox 31).exp = phaseBox31 := by decide +kernel +lemma phaseBox31_mem : phaseBox31.Mem (phase ((31:ℤ):ℂ)) := by + rw [← phaseBox31_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 31) (by decide +kernel) +def phaseBox32 : CI := ⟨⟨766044443118978035202392650555416673935832457080377922011624,766044443118978035202392650555416673935832457080410693391161⟩,⟨-642787609686539326322643409907263432907559884205699080092946,-642787609686539326322643409907263432907559884205666736654508⟩⟩ +lemma phaseBox32_calc : (phaseInputBox 32).exp = phaseBox32 := by decide +kernel +lemma phaseBox32_mem : phaseBox32.Mem (phase ((32:ℤ):ℂ)) := by + rw [← phaseBox32_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 32) (by decide +kernel) +def phaseBox33 : CI := ⟨⟨866025403784438646763723170752936183471402626905173685228535,866025403784438646763723170752936183471402626905205437711262⟩,⟨-500000000000000000000000000000000000000000000000016979488526,-499999999999999999999999999999999999999999999999985627454324⟩⟩ +lemma phaseBox33_calc : (phaseInputBox 33).exp = phaseBox33 := by decide +kernel +lemma phaseBox33_mem : phaseBox33.Mem (phase ((33:ℤ):ℂ)) := by + rw [← phaseBox33_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 33) (by decide +kernel) +def phaseBox34 : CI := ⟨⟨939692620785908384054109277324731469936208134264448958204507,939692620785908384054109277324731469936208134264479247218206⟩,⟨-342020143325668733044099614682259580763083367514177069829976,-342020143325668733044099614682259580763083367514147101516694⟩⟩ +lemma phaseBox34_calc : (phaseInputBox 34).exp = phaseBox34 := by decide +kernel +lemma phaseBox34_mem : phaseBox34.Mem (phase ((34:ℤ):ℂ)) := by + rw [← phaseBox34_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 34) (by decide +kernel) +def phaseBox35 : CI := ⟨⟨984807753012208059366743024589523013670643251719827941038041,984807753012208059366743024589523013670643251719856342140171⟩,⟨-173648177666930348851716626769314796000375677184085066392648,-173648177666930348851716626769314796000375677184056852251010⟩⟩ +lemma phaseBox35_calc : (phaseInputBox 35).exp = phaseBox35 := by decide +kernel +lemma phaseBox35_mem : phaseBox35.Mem (phase ((35:ℤ):ℂ)) := by + rw [← phaseBox35_calc] + exact CI.mem_exp_checked (phaseInputBox_mem 35) (by decide +kernel) +def coeffBox0 (j : Fin 31) : CI := if j.val=0 then CI.point 1 else CI.point 0 +lemma coeffBox0_mem (j : Fin 31) : (coeffBox0 j).Mem ((partialPolynomial 0).coeff j.val) := by + rw [partialPolynomial_zero] + simp only [coeffBox0, coeff_one] + split_ifs + · simpa using CI.mem_point 1 + · simpa using CI.mem_point 0 + +def coeffBox1 : Fin 31 → CI := + ![⟨⟨-1000000000000000000000000000000000000000000000000000000066559,-999999999999999999999999999999999999999999999999999999935488⟩,⟨-68606,63488⟩⟩, + ⟨⟨1999999999999999999999999999999999999999999999999999999999998,2000000000000000000000000000000000000000000000000000000000002⟩,⟨0,4⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000000000066561,-999999999999999999999999999999999999999999999999999999935486⟩,⟨-63488,68610⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩] +lemma coeffBox1_calc (j : Fin 31) : coeffStep phaseBox0 coeffBox0 j = coeffBox1 j := by + revert j + decide +kernel +lemma coeffBox1_mem (j : Fin 31) : (coeffBox1 j).Mem ((partialPolynomial 1).coeff j.val) := by + rw [← coeffBox1_calc, partialPolynomial_succ (by norm_num : 0 < 15)] + apply coeffStep_mem ⟨0,by norm_num⟩ (partialPolynomial 0) phaseBox0 coeffBox0 + · have hr : residue ⟨0,by norm_num⟩ = (0:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox0_mem + · exact coeffBox0_mem +def coeffBox2 : Fin 31 → CI := + ![⟨⟨984807753012208059366743024589523013670643251719842378184993,984807753012208059366743024589523013670643251719842475238537⟩,⟨173648177666930348851716626769314796000375677184069062988405,173648177666930348851716626769314796000375677184069621659986⟩⟩, + ⟨⟨-3969615506024416118733486049179046027341286503439684950457050,-3969615506024416118733486049179046027341286503439684756391850⟩,⟨-347296355333860697703433253538629592000751354368139243298945,-347296355333860697703433253538629592000751354368138125997284⟩⟩, + ⟨⟨5969615506024416118733486049179046027341286503439684756371757,5969615506024416118733486049179046027341286503439684950478860⟩,⟨-558671585,558671592⟩⟩, + ⟨⟨-3969615506024416118733486049179046027341286503439684950457058,-3969615506024416118733486049179046027341286503439684756391842⟩,⟨347296355333860697703433253538629592000751354368138125997278,347296355333860697703433253538629592000751354368139243298954⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719842378184979,984807753012208059366743024589523013670643251719842475238550⟩,⟨-173648177666930348851716626769314796000375677184069621660000,-173648177666930348851716626769314796000375677184069062988392⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩, + ⟨⟨-15,15⟩,⟨-14,16⟩⟩] +lemma coeffBox2_calc (j : Fin 31) : coeffStep phaseBox1 coeffBox1 j = coeffBox2 j := by + revert j + decide +kernel +lemma coeffBox2_mem (j : Fin 31) : (coeffBox2 j).Mem ((partialPolynomial 2).coeff j.val) := by + rw [← coeffBox2_calc, partialPolynomial_succ (by norm_num : 1 < 15)] + apply coeffStep_mem ⟨1,by norm_num⟩ (partialPolynomial 1) phaseBox1 coeffBox1 + · have hr : residue ⟨1,by norm_num⟩ = (1:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox1_mem + · exact coeffBox1_mem +def coeffBox3 : Fin 31 → CI := + ![⟨⟨-766044443118978035202392650555416673935832457080396117377661,-766044443118978035202392650555416673935832457080394608865489⟩,⟨-642787609686539326322643409907263432907559884205682848189797,-642787609686539326322643409907263432907559884205680452962922⟩⟩, + ⟨⟨5233755199831249482665717691795751742155756671410853883156340,5233755199831249482665717691795751742155756671410858805946723⟩,⟨2632871574706939350348720073353156457815871122779497054238603,2632871574706939350348720073353156457815871122779506443385298⟩⟩, + ⟨⟨-14048762311877381627832475986574716402376432240109459794605323,-14048762311877381627832475986574716402376432240109452062046354⟩,⟨-3337380320354260721729509916984522616909062592941966588825188,-3337380320354260721729509916984522616909062592941950502964245⟩⟩, + ⟨⟨19162103110330220360738301890668762668313016051557984971001343,19162103110330220360738301890668762668313016051557994816582159⟩,⟨-9389146712,9389146726⟩⟩, + ⟨⟨-14048762311877381627832475986574716402376432240109459794605361,-14048762311877381627832475986574716402376432240109452062046323⟩,⟨3337380320354260721729509916984522616909062592941950502964210,3337380320354260721729509916984522616909062592941966588825220⟩⟩, + ⟨⟨5233755199831249482665717691795751742155756671410853883156279,5233755199831249482665717691795751742155756671410858805946781⟩,⟨-2632871574706939350348720073353156457815871122779506443385357,-2632871574706939350348720073353156457815871122779497054238545⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080396117377731,-766044443118978035202392650555416673935832457080394608865417⟩,⟨642787609686539326322643409907263432907559884205680452962854,642787609686539326322643409907263432907559884205682848189871⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩, + ⟨⟨-74,74⟩,⟨-72,76⟩⟩] +lemma coeffBox3_calc (j : Fin 31) : coeffStep phaseBox3 coeffBox2 j = coeffBox3 j := by + revert j + decide +kernel +lemma coeffBox3_mem (j : Fin 31) : (coeffBox3 j).Mem ((partialPolynomial 3).coeff j.val) := by + rw [← coeffBox3_calc, partialPolynomial_succ (by norm_num : 2 < 15)] + apply coeffStep_mem ⟨2,by norm_num⟩ (partialPolynomial 2) phaseBox3 coeffBox2 + · have hr : residue ⟨2,by norm_num⟩ = (3:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox3_mem + · exact coeffBox2_mem +def coeffBox4 : Fin 31 → CI := + ![⟨⟨173648177666930348851716626769314796000375677184067055979553,173648177666930348851716626769314796000375677184072437144710⟩,⟨984807753012208059366743024589523013670643251719839555037241,984807753012208059366743024589523013670643251719845155832624⟩⟩, + ⟨⟨-3849000747596232886841704603828508967213702771968629488887413,-3849000747596232886841704603828508967213702771968602523815191⟩,⟨-6666664853207267609891776724753869180900487454540783066994312,-6666664853207267609891776724753869180900487454540751449734765⟩⟩, + ⟨⟨20084259982640082076513803988265308500673999989471170101688802,20084259982640082076513803988265308500673999989471230625140459⟩,⟨16852695143901897122188587307880678000655273393900321520999821,16852695143901897122188587307880678000655273393900401814969538⟩⟩, + ⟨⟨-48478213543489407248647662562791111952021410423330865453927342,-48478213543489407248647662562791111952021410423330777721731770⟩,⟨-17644626740230823652168816539857840513291657431057853768631887,-17644626740230823652168816539857840513291657431057728196598947⟩⟩, + ⟨⟨64138612261557255420247693103169995245121475057288279826121600,64138612261557255420247693103169995245121475057288390110694792⟩,⟨-74693174411,74693174447⟩⟩, + ⟨⟨-48478213543489407248647662562791111952021410423330865453927510,-48478213543489407248647662562791111952021410423330777721731632⟩,⟨17644626740230823652168816539857840513291657431057728196598787,17644626740230823652168816539857840513291657431057853768632026⟩⟩, + ⟨⟨20084259982640082076513803988265308500673999989471170101688538,20084259982640082076513803988265308500673999989471230625140728⟩,⟨-16852695143901897122188587307880678000655273393900401814969806,-16852695143901897122188587307880678000655273393900321520999559⟩⟩, + ⟨⟨-3849000747596232886841704603828508967213702771968629488887740,-3849000747596232886841704603828508967213702771968602523814856⟩,⟨6666664853207267609891776724753869180900487454540751449734441,6666664853207267609891776724753869180900487454540783066994648⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184067055979197,173648177666930348851716626769314796000375677184072437145063⟩,⟨-984807753012208059366743024589523013670643251719845155832977,-984807753012208059366743024589523013670643251719839555036885⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩, + ⟨⟨-359,359⟩,⟨-358,362⟩⟩] +lemma coeffBox4_calc (j : Fin 31) : coeffStep phaseBox4 coeffBox3 j = coeffBox4 j := by + revert j + decide +kernel +lemma coeffBox4_mem (j : Fin 31) : (coeffBox4 j).Mem ((partialPolynomial 4).coeff j.val) := by + rw [← coeffBox4_calc, partialPolynomial_succ (by norm_num : 3 < 15)] + apply coeffStep_mem ⟨3,by norm_num⟩ (partialPolynomial 3) phaseBox4 coeffBox3 + · have hr : residue ⟨3,by norm_num⟩ = (4:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox4_mem + · exact coeffBox3_mem +def coeffBox5 : Fin 31 → CI := + ![⟨⟨866025403784438646763723170752936183471402626905183735048403,866025403784438646763723170752936183471402626905196208881899⟩,⟨-500000000000000000000000000000000000000000000000006583676919,-499999999999999999999999999999999999999999999999994601281521⟩⟩, + ⟨⟨-4600883625124310132316997618442595284339885548631398205006316,-4600883625124310132316997618442595284339885548631300770460832⟩,⟨7866626774538188833014437765148908199971627794190314318391088,7866626774538188833014437765148908199971627794190408160613198⟩⟩, + ⟨⟨284322541021897412154482253411142429365827116374327333764321,284322541021897412154482253411142429365827116374654661624875⟩,⟨-38143969992255195427604056742112035636044052309928576801899610,-38143969992255195427604056742112035636044052309928251042517266⟩⟩, + ⟨⟨47749571520445274333396758921864998335504508004721094284979159,47749571520445274333396758921864998335504508004721739415601413⟩,⟨83958083658808470377564491603083021265181338999591417977106533,83958083658808470377564491603083021265181338999592089692084061⟩⟩, + ⟨⟨-141598699190317800022480092434120163989670454080447340694763832,-141598699190317800022480092434120163989670454080446453087511678⟩,⟨-82450764439004109804374564040425568422117032246160186905322725,-82450764439004109804374564040425568422117032246159228891032639⟩⟩, + ⟨⟨194599326700380999524964251413067364651337203762153749421765467,194599326700380999524964251413067364651337203762154844813919778⟩,⟨-577872755749,577872755858⟩⟩, + ⟨⟨-141598699190317800022480092434120163989670454080447340694764545,-141598699190317800022480092434120163989670454080446453087511097⟩,⟨82450764439004109804374564040425568422117032246159228891031967,82450764439004109804374564040425568422117032246160186905323332⟩⟩, + ⟨⟨47749571520445274333396758921864998335504508004721094284978035,47749571520445274333396758921864998335504508004721739415602586⟩,⟨-83958083658808470377564491603083021265181338999592089692085231,-83958083658808470377564491603083021265181338999591417977105406⟩⟩, + ⟨⟨284322541021897412154482253411142429365827116374327333762875,284322541021897412154482253411142429365827116374654661626344⟩,⟨38143969992255195427604056742112035636044052309928251042515828,38143969992255195427604056742112035636044052309928576801901082⟩⟩, + ⟨⟨-4600883625124310132316997618442595284339885548631398205007919,-4600883625124310132316997618442595284339885548631300770459247⟩,⟨-7866626774538188833014437765148908199971627794190408160614786,-7866626774538188833014437765148908199971627794190314318389487⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905183735046769,866025403784438646763723170752936183471402626905196208883536⟩,⟨499999999999999999999999999999999999999999999999994601279887,500000000000000000000000000000000000000000000000006583678559⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩, + ⟨⟨-1643,1643⟩,⟨-1640,1648⟩⟩] +lemma coeffBox5_calc (j : Fin 31) : coeffStep phaseBox7 coeffBox4 j = coeffBox5 j := by + revert j + decide +kernel +lemma coeffBox5_mem (j : Fin 31) : (coeffBox5 j).Mem ((partialPolynomial 5).coeff j.val) := by + rw [← coeffBox5_calc, partialPolynomial_succ (by norm_num : 4 < 15)] + apply coeffStep_mem ⟨4,by norm_num⟩ (partialPolynomial 4) phaseBox7 coeffBox4 + · have hr : residue ⟨4,by norm_num⟩ = (7:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox7_mem + · exact coeffBox4_mem +def coeffBox6 : Fin 31 → CI := + ![⟨⟨-500000000000000000000000000000000000000000000000011399596808,-499999999999999999999999999999999999999999999999990496341924⟩,⟨-866025403784438646763723170752936183471402626905200464070792,-866025403784438646763723170752936183471402626905179069377810⟩⟩, + ⟨⟨9598677582107066126541884106654780566914433048000642967408834,9598677582107066126541884106654780566914433048000843176653748⟩,⟨3600883625124310132316997618442595284339885548631243664311187,3600883625124310132316997618442595284339885548631446483003275⟩⟩, + ⟨⟨-46845737242503815692238051978997226204723823407191509021720497,-46845737242503815692238051978997226204723823407190716533167499⟩,⟨16314956411838918900638116447639610154048831098911043634092672,16314956411838918900638116447639610154048831098911830997915191⟩⟩, + ⟨⟨76660101966314076368859018344756397923941365438149176002703563,76660101966314076368859018344756397923941365438151537754771158⟩,⟨-128638395130079975320921870024531664891932498173210799686614747,-128638395130079975320921870024531664891932498173208464063535513⟩⟩, + ⟨⟨51192348594141634290023010545416463884936036073209453655943824,51192348594141634290023010545416463884936036073213741807724123⟩,⟨309799189048956638189763557893697348949398959196002808819438913,309799189048956638189763557893697348949398959196007081301370058⟩⟩, + ⟨⟨-367155482039444070422524676471323349244522247160488513912326776,-367155482039444070422524676471323349244522247160482780282282390⟩,⟨-311751284057943944800316620572053503160066760249755224280743448,-311751284057943944800316620572053503160066760249749436774335611⟩⟩, + ⟨⟨554100182278770218658677630906985866146908472016624609713747195,554100182278770218658677630906985866146908472016631642846714388⟩,⟨-3506512802851,3506512803203⟩⟩, + ⟨⟨-367155482039444070422524676471323349244522247160488513912329481,-367155482039444070422524676471323349244522247160482780282280210⟩,⟨311751284057943944800316620572053503160066760249749436774333096,311751284057943944800316620572053503160066760249755224280745788⟩⟩, + ⟨⟨51192348594141634290023010545416463884936036073209453655939531,51192348594141634290023010545416463884936036073213741807728613⟩,⟨-309799189048956638189763557893697348949398959196007081301374578,-309799189048956638189763557893697348949398959196002808819434630⟩⟩, + ⟨⟨76660101966314076368859018344756397923941365438149176002697956,76660101966314076368859018344756397923941365438151537754776867⟩,⟨128638395130079975320921870024531664891932498173208464063529930,128638395130079975320921870024531664891932498173210799686620469⟩⟩, + ⟨⟨-46845737242503815692238051978997226204723823407191509021726809,-46845737242503815692238051978997226204723823407190716533161251⟩,⟨-16314956411838918900638116447639610154048831098911830997921448,-16314956411838918900638116447639610154048831098911043634086365⟩⟩, + ⟨⟨9598677582107066126541884106654780566914433048000642967402323,9598677582107066126541884106654780566914433048000843176660260⟩,⟨-3600883625124310132316997618442595284339885548631446483009789,-3600883625124310132316997618442595284339885548631243664304675⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000011399603377,-499999999999999999999999999999999999999999999999990496335353⟩,⟨866025403784438646763723170752936183471402626905179069371251,866025403784438646763723170752936183471402626905200464077372⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩, + ⟨⟨-6579,6579⟩,⟨-6570,6588⟩⟩] +lemma coeffBox6_calc (j : Fin 31) : coeffStep phaseBox9 coeffBox5 j = coeffBox6 j := by + revert j + decide +kernel +lemma coeffBox6_mem (j : Fin 31) : (coeffBox6 j).Mem ((partialPolynomial 6).coeff j.val) := by + rw [← coeffBox6_calc, partialPolynomial_succ (by norm_num : 5 < 15)] + apply coeffStep_mem ⟨5,by norm_num⟩ (partialPolynomial 5) phaseBox9 coeffBox5 + · have hr : residue ⟨5,by norm_num⟩ = (9:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox9_mem + · exact coeffBox5_mem +def coeffBox7 : Fin 31 → CI := + ![⟨⟨-1000000000000000000000000000000000000000000000000021064579145,-999999999999999999999999999999999999999999999999978935435132⟩,⟨-19419482911,22703347133⟩⟩, + ⟨⟨6917795486482586948753916921160270903681923406438942996395084,6917795486482586948753916921160270903681923406439389871389727⟩,⟨-8244307623847633411984384969508491764631092645119045359892662,-8244307623847633411984384969508491764631092645118601301227783⟩⟩, + ⟨⟨10403653257250540448686234131604908102467273346226538973686726,10403653257250540448686234131604908102467273346228678869857872⟩,⟨55062818563402723511256155041554773494989859649215310169708880,55062818563402723511256155041554773494989859649217442676911621⟩⟩, + ⟨⟨-165084659490935790669487097141401509335117754010472993686228301,-165084659490935790669487097141401509335117754010465823162448457⟩,⟨-87965740059492470667549121704228599039092155747508840626619456,-87965740059492470667549121704228599039092155747501649940149410⟩⟩, + ⟨⟨409658310682373061938766591695979016771084187651579803715918016,409658310682373061938766591695979016771084187651595505195632065⟩,⟨-179123190402696503470650774138165392847142764409030348970581920,-179123190402696503470650774138165392847142764409014583986566430⟩⟩, + ⟨⟨-201443406420170187339928907039772853380241319507540216335880830,-201443406420170187339928907039772853380241319507511989283855915⟩,⟨783759108848314465844577513638772579929776019388219385226335817,783759108848314465844577513638772579929776019388247569157895248⟩⟩, + ⟨⟨-699958666430646530314576599847496095627217909672167995896284820,-699958666430646530314576599847496095627217909672132157718356598⟩,⟨-904133933324497355691380683436857502048917864934765436894996171,-904133933324497355691380683436857502048917864934729617988374113⟩⟩, + ⟨⟨1281013945831292637975571722559852525130687197571760813056944388,1281013945831292637975571722559852525130687197571803819863436107⟩,⟨-21437303759894,21437303760967⟩⟩, + ⟨⟨-699958666430646530314576599847496095627217909672167995896296595,-699958666430646530314576599847496095627217909672132157718346589⟩,⟨904133933324497355691380683436857502048917864934729617988363113,904133933324497355691380683436857502048917864934765436895006887⟩⟩, + ⟨⟨-201443406420170187339928907039772853380241319507540216335900433,-201443406420170187339928907039772853380241319507511989283835858⟩,⟨-783759108848314465844577513638772579929776019388247569157915623,-783759108848314465844577513638772579929776019388219385226316474⟩⟩, + ⟨⟨409658310682373061938766591695979016771084187651579803715892372,409658310682373061938766591695979016771084187651595505195658228⟩,⟨179123190402696503470650774138165392847142764409014583986540750,179123190402696503470650774138165392847142764409030348970608014⟩⟩, + ⟨⟨-165084659490935790669487097141401509335117754010472993686257580,-165084659490935790669487097141401509335117754010465823162419376⟩,⟨87965740059492470667549121704228599039092155747501649940120353,87965740059492470667549121704228599039092155747508840626648772⟩⟩, + ⟨⟨10403653257250540448686234131604908102467273346226538973656122,10403653257250540448686234131604908102467273346228678869888423⟩,⟨-55062818563402723511256155041554773494989859649217442676942211,-55062818563402723511256155041554773494989859649215310169678311⟩⟩, + ⟨⟨6917795486482586948753916921160270903681923406438942996364070,6917795486482586948753916921160270903681923406439389871420762⟩,⟨8244307623847633411984384969508491764631092645118601301196787,8244307623847633411984384969508491764631092645119045359923713⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000021064610266,-999999999999999999999999999999999999999999999999978935404011⟩,⟨-22703378225,19419514063⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩, + ⟨⟨-31135,31135⟩,⟨-31108,31164⟩⟩] +lemma coeffBox7_calc (j : Fin 31) : coeffStep phaseBox12 coeffBox6 j = coeffBox7 j := by + revert j + decide +kernel +lemma coeffBox7_mem (j : Fin 31) : (coeffBox7 j).Mem ((partialPolynomial 7).coeff j.val) := by + rw [← coeffBox7_calc, partialPolynomial_succ (by norm_num : 6 < 15)] + apply coeffStep_mem ⟨6,by norm_num⟩ (partialPolynomial 6) phaseBox12 coeffBox6 + · have hr : residue ⟨6,by norm_num⟩ = (12:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox12_mem + · exact coeffBox6_mem +def coeffBox8 : Fin 31 → CI := + ![⟨⟨-642787609686539326322643409907263432907559884205715205990796,-642787609686539326322643409907263432907559884205644950671034⟩,⟨766044443118978035202392650555416673935832457080361820302316,766044443118978035202392650555416673935832457080431544495687⟩⟩, + ⟨⟨-3868832817555432838789551276936722917397080294821431008893657,-3868832817555432838789551276936722917397080294820558344285185⟩,⟨-10598677582107066126541884106654780566914433048001170265550136,-10598677582107066126541884106654780566914433048000296560859766⟩⟩, + ⟨⟨62060708955477453960923877148516799656043731889319834405748786,62060708955477453960923877148516799656043731889324492277286679⟩,⟨10169377070305564859724257431925253462504015971578085941037352,10169377070305564859724257431925253462504015971582762313946973⟩⟩, + ⟨⟨-141930554245348113630828032308910091907912775884948329464179964,-141930554245348113630828032308910091907912775884930430457098204⟩,⟨180044535386876843869158452121621522566314576656835597773329493,180044535386876843869158452121621522566314576656853439550084625⟩⟩, + ⟨⟨-239555584085579127298262843034489804366753137625289066027813840,-239555584085579127298262843034489804366753137625242534997781282⟩,⟨-561522761700274177377124604258583402652768405083680639217263737,-561522761700274177377124604258583402652768405083634173646730087⟩⟩, + ⟨⟨1251496898429272207070423830816425442487874994080484684714885271,1251496898429272207070423830816425442487874994080578981609054392⟩,⟨116853391598027836019101484059740395430096723577773211491488973,116853391598027836019101484059740395430096723577867906940471597⟩⟩, + ⟨⟨-1144878735419732574051742458397655413283608858240397601100012363,-1144878735419732574051742458397655413283608858240245160313601803⟩,⟨1721229879768017096080962796089755917357404834773775078467099799,1721229879768017096080962796089755917357404834773927413539632397⟩⟩, + ⟨⟨-1306377076422343307053265617545683906128011426452724152473114895,-1306377076422343307053265617545683906128011426452527952531204663⟩,⟨-2440105439355440960610695384981918413423708827380975627250822799,-2440105439355440960610695384981918413423708827380779815883036971⟩⟩, + ⟨⟨3047391926430990866335726876017281919785344224824540086495050736,3047391926430990866335726876017281919785344224824761081240298219⟩,⟨-110476150741195,110476150744512⟩⟩, + ⟨⟨-1306377076422343307053265617545683906128011426452724152473167476,-1306377076422343307053265617545683906128011426452527952531157758⟩,⟨2440105439355440960610695384981918413423708827380779815882987202,2440105439355440960610695384981918413423708827380975627250872373⟩⟩, + ⟨⟨-1144878735419732574051742458397655413283608858240397601100103503,-1144878735419732574051742458397655413283608858240245160313510024⟩,⟨-1721229879768017096080962796089755917357404834773927413539725785,-1721229879768017096080962796089755917357404834773775078467010137⟩⟩, + ⟨⟨1251496898429272207070423830816425442487874994080484684714765487,1251496898429272207070423830816425442487874994080578981609176368⟩,⟨-116853391598027836019101484059740395430096723577867906940592023,-116853391598027836019101484059740395430096723577773211491367713⟩⟩, + ⟨⟨-239555584085579127298262843034489804366753137625289066027951977,-239555584085579127298262843034489804366753137625242534997643575⟩,⟨561522761700274177377124604258583402652768405083634173646592757,561522761700274177377124604258583402652768405083680639217402280⟩⟩, + ⟨⟨-141930554245348113630828032308910091907912775884948329464326130,-141930554245348113630828032308910091907912775884930430456952416⟩,⟨-180044535386876843869158452121621522566314576656853439550230607,-180044535386876843869158452121621522566314576656835597773183514⟩⟩, + ⟨⟨62060708955477453960923877148516799656043731889319834405599846,62060708955477453960923877148516799656043731889324492277435689⟩,⟨-10169377070305564859724257431925253462504015971582762314095896,-10169377070305564859724257431925253462504015971578085940888331⟩⟩, + ⟨⟨-3868832817555432838789551276936722917397080294821431009043466,-3868832817555432838789551276936722917397080294820558344135361⟩,⟨10598677582107066126541884106654780566914433048000296560710054,10598677582107066126541884106654780566914433048001170265700058⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205715206140780,-642787609686539326322643409907263432907559884205644950521053⟩,⟨-766044443118978035202392650555416673935832457080431544645576,-766044443118978035202392650555416673935832457080361820152239⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩, + ⟨⟨-150004,150004⟩,⟨-149910,150096⟩⟩] +lemma coeffBox8_calc (j : Fin 31) : coeffStep phaseBox13 coeffBox7 j = coeffBox8 j := by + revert j + decide +kernel +lemma coeffBox8_mem (j : Fin 31) : (coeffBox8 j).Mem ((partialPolynomial 8).coeff j.val) := by + rw [← coeffBox8_calc, partialPolynomial_succ (by norm_num : 7 < 15)] + apply coeffStep_mem ⟨7,by norm_num⟩ (partialPolynomial 7) phaseBox13 coeffBox7 + · have hr : residue ⟨7,by norm_num⟩ = (13:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox13_mem + · exact coeffBox7_mem +def coeffBox9 : Fin 31 → CI := + ![⟨⟨-342020143325668733044099614682259580763083367514211711020077,-342020143325668733044099614682259580763083367514103974270900⟩,⟨939692620785908384054109277324731469936208134264411915337969,939692620785908384054109277324731469936208134264519378773918⟩⟩, + ⟨⟨-8546050094779084377999995279403332120772903723070439782024673,-8546050094779084377999995279403332120772903723068997865637239⟩,⟨-7104191472993727658220477472822081860370109043820363676439438,-7104191472993727658220477472822081860370109043818919791367384⟩⟩, + ⟨⟨53192431010427477720931580224837648280116394338512048806212770,53192431010427477720931580224837648280116394338520804923691523⟩,⟨-32367279145103585003648839828133711987418689984026164839430940,-32367279145103585003648839828133711987418689984017414434627835⟩⟩, + ⟨⟨52318628796553873942328933638360685806200044358742822194261277,52318628796553873942328933638360685806200044358780443681535818⟩,⟨226785666093013813713357576348077107247170054189914163336179144,226785666093013813713357576348077107247170054189951804297088302⟩⟩, + ⟨⟨-646181960118240802195224849480853572707850039843872265453185230,-646181960118240802195224849480853572707850039843759830638340523⟩,⟨-54854788433103423019729288476666748903659658107071858586761288,-54854788433103423019729288476666748903659658106959469610007987⟩⟩, + ⟨⟨541927493675297551999659729871028089280460199295238151919751795,541927493675297551999659729871028089280460199295496798444641212⟩,⟨-1320632989363895133292426257567093585605520632694305134173278950,-1320632989363895133292426257567093585605520632694046807128722444⟩⟩, + ⟨⟨1982798468468676290624971051539277517788815640382742221282187773,1982798468468676290624971051539277517788815640383232196738845857⟩,⟨1633113758292559146271181035052996054187082431105413424990840548,1633113758292559146271181035052996054187082431105904416852759211⟩⟩, + ⟨⟨-3215859394967511030987679175935174189434921531107857777705497725,-3215859394967511030987679175935174189434921531107115596460315526⟩,⟨2134161377520389784686638956331344866464578186393619252205296584,2134161377520389784686638956331344866464578186394361227660281172⟩⟩, + ⟨⟨-1413671836478236560593936860673999082623840470010028390836039547,-1413671836478236560593936860673999082623840470009081855886079859⟩,⟨-4696624874642840501363796288174842396467577340902915864233076807,-4696624874642840501363796288174842396467577340901971079622760932⟩⟩, + ⟨⟨5308728479702275905199987371421216990625111499351098268029990317,5308728479702275905199987371421216990625111499352137696612587995⟩,⟨-519845486379990,519845486388385⟩⟩, + ⟨⟨-1413671836478236560593936860673999082623840470010028390836263428,-1413671836478236560593936860673999082623840470009081855885870274⟩,⟨4696624874642840501363796288174842396467577340901971079622545367,4696624874642840501363796288174842396467577340902915864233294501⟩⟩, + ⟨⟨-3215859394967511030987679175935174189434921531107857777705900119,-3215859394967511030987679175935174189434921531107115596459914776⟩,⟨-2134161377520389784686638956331344866464578186394361227660687578,-2134161377520389784686638956331344866464578186393619252204899715⟩⟩, + ⟨⟨1982798468468676290624971051539277517788815640382742221281655119,1982798468468676290624971051539277517788815640383232196739384780⟩,⟨-1633113758292559146271181035052996054187082431105904416853295136,-1633113758292559146271181035052996054187082431105413424990304947⟩⟩, + ⟨⟨541927493675297551999659729871028089280460199295238151919134207,541927493675297551999659729871028089280460199295496798445259357⟩,⟨1320632989363895133292426257567093585605520632694046807128106615,1320632989363895133292426257567093585605520632694305134173898869⟩⟩, + ⟨⟨-646181960118240802195224849480853572707850039843872265453845644,-646181960118240802195224849480853572707850039843759830637681582⟩,⟨54854788433103423019729288476666748903659658106959469609348825,54854788433103423019729288476666748903659658107071858587421509⟩⟩, + ⟨⟨52318628796553873942328933638360685806200044358742822193584141,52318628796553873942328933638360685806200044358780443682212828⟩,⟨-226785666093013813713357576348077107247170054189951804297765240,-226785666093013813713357576348077107247170054189914163335501945⟩⟩, + ⟨⟨53192431010427477720931580224837648280116394338512048805530022,53192431010427477720931580224837648280116394338520804924374394⟩,⟨32367279145103585003648839828133711987418689984017414433945386,32367279145103585003648839828133711987418689984026164840114109⟩⟩, + ⟨⟨-8546050094779084377999995279403332120772903723070439782708922,-8546050094779084377999995279403332120772903723068997864952990⟩,⟨7104191472993727658220477472822081860370109043818919790683513,7104191472993727658220477472822081860370109043820363677124067⟩⟩, + ⟨⟨-342020143325668733044099614682259580763083367514211711704585,-342020143325668733044099614682259580763083367514103973586396⟩,⟨-939692620785908384054109277324731469936208134264519379458060,-939692620785908384054109277324731469936208134264411914653102⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩, + ⟨⟨-684534,684534⟩,⟨-684170,684894⟩⟩] +lemma coeffBox9_calc (j : Fin 31) : coeffStep phaseBox16 coeffBox8 j = coeffBox9 j := by + revert j + decide +kernel +lemma coeffBox9_mem (j : Fin 31) : (coeffBox9 j).Mem ((partialPolynomial 9).coeff j.val) := by + rw [← coeffBox9_calc, partialPolynomial_succ (by norm_num : 8 < 15)] + apply coeffStep_mem ⟨8,by norm_num⟩ (partialPolynomial 8) phaseBox16 coeffBox8 + · have hr : residue ⟨8,by norm_num⟩ = (16:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox16_mem + · exact coeffBox8_mem +def coeffBox10 : Fin 31 → CI := + ![⟨⟨-500000000000000000000000000000000000000000000000068900041209,-499999999999999999999999999999999999999999999999924464149127⟩,⟨866025403784438646763723170752936183471402626905120178627774,866025403784438646763723170752936183471402626905264280639668⟩⟩, + ⟨⟨-7866626774538188833014437765148908199971627794191447572472821,-7866626774538188833014437765148908199971627794189321939919936⟩,⟨-6600883625124310132316997618442595284339885548632392067331037,-6600883625124310132316997618442595284339885548630265113858998⟩⟩, + ⟨⟨40739089132994957938266150337677580374796016120999326709445850,40739089132994957938266150337677580374796016121013805257717580⟩,⟨-35862353928348965355102339748684407766208223521464442119466510,-35862353928348965355102339748684407766208223521449960692840977⟩⟩, + ⟨⟨108877889354584710277382157412267909524345878968498729683739106,108877889354584710277382157412267909524345878968566026875498444⟩,⟨162178501682506075077549880652292596695568517409507797601787543,162178501682506075077549880652292596695568517409575068285548190⟩⟩, + ⟨⟨-475438513119195896047496353023017527047845748907274948211267956,-475438513119195896047496353023017527047845748907047336967802849⟩,⟨246229275274842394008708420720993397345433834098107007805216966,246229275274842394008708420720993397345433834098334731077378558⟩⟩, + ⟨⟨-438439302020856399511006174874507873620850883672122444324611414,-438439302020856399511006174874507873620850883671521541758222176⟩,⟨-1101919214279253664965036074552028736211323059678545729369954823,-1101919214279253664965036074552028736211323059677945340737831230⟩⟩, + ⟨⟨2107052625480202631622812170529616016695483076943670515473892952,2107052625480202631622812170529616016695483076944951833397253151⟩,⟨-630466648402993797186286626795947565118181981844940778313336508,-630466648402993797186286626795947565118181981843659135443493893⟩⟩, + ⟨⟨732369323494674050945093748080595320877318083173653365613099094,732369323494674050945093748080595320877318083175903013653380885⟩,⟨3414863735263651370248900480843071354523797739444510657740251927,3414863735263651370248900480843071354523797739446761969382716412⟩⟩, + ⟨⟨-4772090891587912160068984993141075852513232383268143574840789589,-4772090891587912160068984993141075852513232383264846052884953550⟩,⟨661562377266063277832866418891398493301858391615309584455957107,661562377266063277832866418891398493301858391618605548936594535⟩⟩, + ⟨⟨-395676738216551395942468658603011383907053058832324840458132646,-395676738216551395942468658603011383907053058828205292091748011⟩,⟨-5811231928726367914873172624412156411733338670420282818800812792,-5811231928726367914873172624412156411733338670416165525757318008⟩⟩, + ⟨⟨6201946288513195379238832782093209435634021294520380696586048632,6201946288513195379238832782093209435634021294524839658914149146⟩,⟨-2227707558823541,2227707558839947⟩⟩, + ⟨⟨-395676738216551395942468658603011383907053058832324840459044147,-395676738216551395942468658603011383907053058828205292090862151⟩,⟨5811231928726367914873172624412156411733338670416165525756425041,5811231928726367914873172624412156411733338670420282818801716877⟩⟩, + ⟨⟨-4772090891587912160068984993141075852513232383268143574842469856,-4772090891587912160068984993141075852513232383264846052883284048⟩,⟨-661562377266063277832866418891398493301858391618605548938276306,-661562377266063277832866418891398493301858391615309584454289056⟩⟩, + ⟨⟨732369323494674050945093748080595320877318083173653365610851080,732369323494674050945093748080595320877318083175903013655638000⟩,⟨-3414863735263651370248900480843071354523797739446761969384971797,-3414863735263651370248900480843071354523797739444510657738002168⟩⟩, + ⟨⟨2107052625480202631622812170529616016695483076943670515471275124,2107052625480202631622812170529616016695483076944951833399876575⟩,⟨630466648402993797186286626795947565118181981843659135440877045,630466648402993797186286626795947565118181981844940778315960920⟩⟩, + ⟨⟨-438439302020856399511006174874507873620850883672122444327431830,-438439302020856399511006174874507873620850883671521541755403619⟩,⟨1101919214279253664965036074552028736211323059677945340735014857,1101919214279253664965036074552028736211323059678545729372777483⟩⟩, + ⟨⟨-475438513119195896047496353023017527047845748907274948214178077,-475438513119195896047496353023017527047845748907047336964894250⟩,⟨-246229275274842394008708420720993397345433834098334731080286641,-246229275274842394008708420720993397345433834098107007802306327⟩⟩, + ⟨⟨108877889354584710277382157412267909524345878968498729680796473,108877889354584710277382157412267909524345878968566026878441112⟩,⟨-162178501682506075077549880652292596695568517409575068288489601,-162178501682506075077549880652292596695568517409507797598843663⟩⟩, + ⟨⟨40739089132994957938266150337677580374796016120999326706493436,40739089132994957938266150337677580374796016121013805260670111⟩,⟨35862353928348965355102339748684407766208223521449960689889965,35862353928348965355102339748684407766208223521464442122420444⟩⟩, + ⟨⟨-7866626774538188833014437765148908199971627794191447575427510,-7866626774538188833014437765148908199971627794189321936965249⟩,⟨6600883625124310132316997618442595284339885548630265110905772,6600883625124310132316997618442595284339885548632392070287178⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000068902996253,-499999999999999999999999999999999999999999999999924461194087⟩,⟨-866025403784438646763723170752936183471402626905264283593264,-866025403784438646763723170752936183471402626905120175671299⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩, + ⟨⟨-2955075,2955075⟩,⟨-2953630,2956506⟩⟩] +lemma coeffBox10_calc (j : Fin 31) : coeffStep phaseBox19 coeffBox9 j = coeffBox10 j := by + revert j + decide +kernel +lemma coeffBox10_mem (j : Fin 31) : (coeffBox10 j).Mem ((partialPolynomial 10).coeff j.val) := by + rw [← coeffBox10_calc, partialPolynomial_succ (by norm_num : 9 < 15)] + apply coeffStep_mem ⟨9,by norm_num⟩ (partialPolynomial 9) phaseBox19 coeffBox9 + · have hr : residue ⟨9,by norm_num⟩ = (19:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox19_mem + · exact coeffBox9_mem +def coeffBox11 : Fin 31 → CI := + ![⟨⟨-866025403784438646763723170752936183471402626905300135331630,-866025403784438646763723170752936183471402626905075703749691⟩,⟨499999999999999999999999999999999999999999999999892066551761,500000000000000000000000000000000000000000000000116228239841⟩⟩, + ⟨⟨-4512256816278756118456938628002619397688287391310210258601118,-4512256816278756118456938628002619397688287391306729011161763⟩,⟨-7917795486482586948753916921160270903681923406440902367120502,-7917795486482586948753916921160270903681923406437420793245015⟩⟩, + ⟨⟨37479009531310300006850551367648045830356516272975173259066998,37479009531310300006850551367648045830356516273000953957285842⟩,⟨-22889932225210003527102216006623810505049214605872261630584365,-22889932225210003527102216006623810505049214605846475539188021⟩⟩, + ⟨⟨84566805074835469890392359665795136636243630399272057735912200,84566805074835469890392359665795136636243630399401535878753250⟩,⟨121381719705828735132196132309283011763066550975407946779191505,121381719705828735132196132309283011763066550975537400464415412⟩⟩, + ⟨⟨-299750780074938820892870618696196975276591632812947607225200506,-299750780074938820892870618696196975276591632812466394232953526⟩,⟨248451300240902940453703357514742017998730609444749611284910637,248451300240902940453703357514742017998730609445230907769899359⟩⟩, + ⟨⟨-604236723733589874827210830126948470617931639818156534941066558,-604236723733589874827210830126948470617931639816752563109322821⟩,⟨-595039375217310207796535860555470977619951030889314574994364411,-595039375217310207796535860555470977619951030887910866129977077⟩⟩, + ⟨⟨974488628275034602578873981907047468197760479003212676092985921,974488628275034602578873981907047468197760479006544524387294622⟩,⟨-1245352185471187400689490389926650304580367250250293562839532824,-1245352185471187400689490389926650304580367250246961894209428518⟩⟩, + ⟨⟨2210264641720184399458528892806094123089498209837111502924387214,2210264641720184399458528892806094123089498209843682653112047789⟩,⟨1327539728668295680366779456141429382576698545712764835792456056,1327539728668295680366779456141429382576698545719335706635143205⟩⟩, + ⟨⟨-1489266706352089832437996636617520920431595336759118253573183980,-1489266706352089832437996636617520920431595336748203057615419668⟩,⟨3417085403137856514915335216318419154734627839609709884206031347,3417085403137856514915335216318419154734627839620630210540134859⟩⟩, + ⟨⟨-4639549619064101962223905076772006585891620777935289384345743994,-4639549619064101962223905076772006585891620777919786185490421580⟩,⟨-1316214008683221051638572465024791207886463407483165695530457535,-1316214008683221051638572465024791207886463407467669095640152811⟩⟩, + ⟨⟨777718809675506040434076078185698975229654914678180647433936594,777718809675506040434076078185698975229654914697242535293211849⟩,⟨-5562515442501746475711344878311556406629592958595178622871523014,-5562515442501746475711344878311556406629592958576118953188695391⟩⟩, + ⟨⟨5907328434335825745556963920158289517630770654238313011961097868,5907328434335825745556963920158289517630770654258733059173516545⟩,⟨-10203465802847119,10203465802876741⟩⟩, + ⟨⟨777718809675506040434076078185698975229654914678180647429832615,777718809675506040434076078185698975229654914697242535297278488⟩,⟨5562515442501746475711344878311556406629592958576118953184627078,5562515442501746475711344878311556406629592958595178622875624720⟩⟩, + ⟨⟨-4639549619064101962223905076772006585891620777935289384353412110,-4639549619064101962223905076772006585891620777919786185482780945⟩,⟨1316214008683221051638572465024791207886463407467669095632495781,1316214008683221051638572465024791207886463407483165695538109256⟩⟩, + ⟨⟨-1489266706352089832437996636617520920431595336759118253583555359,-1489266706352089832437996636617520920431595336748203057605045205⟩,⟨-3417085403137856514915335216318419154734627839620630210550512005,-3417085403137856514915335216318419154734627839609709884195662599⟩⟩, + ⟨⟨2210264641720184399458528892806094123089498209837111502912223146,2210264641720184399458528892806094123089498209843682653124223363⟩,⟨-1327539728668295680366779456141429382576698545719335706647307936,-1327539728668295680366779456141429382576698545712764835780281101⟩⟩, + ⟨⟨974488628275034602578873981907047468197760479003212676079794002,974488628275034602578873981907047468197760479006544524400488857⟩,⟨1245352185471187400689490389926650304580367250246961894196244270,1245352185471187400689490389926650304580367250250293562852734855⟩⟩, + ⟨⟨-604236723733589874827210830126948470617931639818156534954757873,-604236723733589874827210830126948470617931639816752563095634221⟩,⟨595039375217310207796535860555470977619951030887910866116293932,595039375217310207796535860555470977619951030889314575008061203⟩⟩, + ⟨⟨-299750780074938820892870618696196975276591632812947607239093884,-299750780074938820892870618696196975276591632812466394219061477⟩,⟨-248451300240902940453703357514742017998730609445230907783786811,-248451300240902940453703357514742017998730609444749611271012680⟩⟩, + ⟨⟨84566805074835469890392359665795136636243630399272057721951365,84566805074835469890392359665795136636243630399401535892714124⟩,⟨-121381719705828735132196132309283011763066550975537400478371018,-121381719705828735132196132309283011763066550975407946765225406⟩⟩, + ⟨⟨37479009531310300006850551367648045830356516272975173245087868,37479009531310300006850551367648045830356516273000953971265088⟩,⟨22889932225210003527102216006623810505049214605846475525214243,22889932225210003527102216006623810505049214605872261644568939⟩⟩, + ⟨⟨-4512256816278756118456938628002619397688287391310210272584080,-4512256816278756118456938628002619397688287391306728997178791⟩,⟨7917795486482586948753916921160270903681923406437420779267455,7917795486482586948753916921160270903681923406440902381108840⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905300149315147,-866025403784438646763723170752936183471402626905075689766175⟩,⟨-500000000000000000000000000000000000000000000000116242217967,-499999999999999999999999999999999999999999999999892052562895⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩, + ⟨⟨-13983563,13983563⟩,⟨-13978174,13988910⟩⟩] +lemma coeffBox11_calc (j : Fin 31) : coeffStep phaseBox21 coeffBox10 j = coeffBox11 j := by + revert j + decide +kernel +lemma coeffBox11_mem (j : Fin 31) : (coeffBox11 j).Mem ((partialPolynomial 11).coeff j.val) := by + rw [← coeffBox11_calc, partialPolynomial_succ (by norm_num : 10 < 15)] + apply coeffStep_mem ⟨10,by norm_num⟩ (partialPolynomial 10) phaseBox21 coeffBox10 + · have hr : residue ⟨10,by norm_num⟩ = (21:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox21_mem + · exact coeffBox10_mem +def coeffBox12 : Fin 31 → CI := + ![⟨⟨-766044443118978035202392650555416673935832457080562096652337,-766044443118978035202392650555416673935832457080236017549845⟩,⟨-642787609686539326322643409907263432907559884205840414350480,-642787609686539326322643409907263432907559884205514082201062⟩⟩, + ⟨⟨4164960460944895420753505374463989805687536036937630069585979,4164960460944895420753505374463989805687536036942893971542901⟩,⟨-5948179980458170830020430871981224876340636903002152336580431,-5948179980458170830020430871981224876340636902996890023060468⟩⟩, + ⟨⟨25477211159031679358278123031647999502929370960248315501705463,25477211159031679358278123031647999502929370960290362001457720⟩,⟨12539147570602880986363505153869713185588833690183522327102303,12539147570602880986363505153869713185588833690225570165954082⟩⟩, + ⟨⟨-19163513165526571608310526597599643507403362702645028136533031,-19163513165526571608310526597599643507403362702416878403368227⟩,⟨76734020298984841702151163516356146062697505998502220494739912,76734020298984841702151163516356146062697505998730385356147211⟩⟩, + ⟨⟨-175545972265297872977636312095087520787949684318523106819706685,-175545972265297872977636312095087520787949684317597004244411097⟩,⟨3017626026941955946172733161320399232757925021759570412525128,3017626026941955946172733161320399232757925022685587461900545⟩⟩, + ⟨⟨-104023523936948958656788248009339890290094622406474404712293441,-104023523936948958656788248009339890290094622403506970033646322⟩,⟨-312361451936102397590849479031690449706967037533931724840415957,-312361451936102397590849479031690449706967037530963958312219338⟩⟩, + ⟨⟨426016600509389744267675357995167981740501768593429106316840020,426016600509389744267675357995167981740501768601202700219568473⟩,⟨-333645564941496505330156441043791850901932563697869088192493758,-333645564941496505330156441043791850901932563690096017775894835⟩⟩, + ⟨⟨691637758446381399752768983892442473125789657431896307916978934,691637758446381399752768983892442473125789657448915477516976156⟩,⟨404591669239809112237179302448884957676218351285791985628551978,404591669239809112237179302448884957676218351302811343572272978⟩⟩, + ⟨⟨-136793385495221344071117481140581595312270513033450123604522478,-136793385495221344071117481140581595312270513001840275876863081⟩,⟨1082683256337036005873538115278089101822862201784558741076117848,1082683256337036005873538115278089101822862201816164520142611328⟩⟩, + ⟨⟨-1325081930669853424216987020725719034212270184125814200847167152,-1325081930669853424216987020725719034212270184075428717067404263⟩,⟨401324516035198882288909637595247763921496262372573659196652356,401324516035198882288909637595247763921496262422974568891847956⟩⟩, + ⟨⟨-1084398299482169539681976256669389237589600402521795869462639473,-1084398299482169539681976256669389237589600402452045083900697697⟩,⟨-1235938746085208377803587501985608315899680631093981910785557973,-1235938746085208377803587501985608315899680631024247746112040974⟩⟩, + ⟨⟨752206920120831188962900784972055024446461760496889522806109841,752206920120831188962900784972055024446461760581373173903096310⟩,⟨-1664379109791823342528998810652508607724895010423173937634051990,-1664379109791823342528998810652508607724895010338680626505117385⟩⟩, + ⟨⟨1892538437523115562971282965244989739504309015782542821407619223,1892538437523115562971282965244989739504309015872603120591642892⟩,⟨-45017160490578568,45017160490614147⟩⟩, + ⟨⟨752206920120831188962900784972055024446461760496889522788116802,752206920120831188962900784972055024446461760581373173921065928⟩,⟨1664379109791823342528998810652508607724895010338680626487166361,1664379109791823342528998810652508607724895010423173937652062427⟩⟩, + ⟨⟨-1084398299482169539681976256669389237589600402521795869496492968,-1084398299482169539681976256669389237589600402452045083866871608⟩,⟨1235938746085208377803587501985608315899680631024247746078218979,1235938746085208377803587501985608315899680631093981910819415889⟩⟩, + ⟨⟨-1325081930669853424216987020725719034212270184125814200893328886,-1325081930669853424216987020725719034212270184075428717021256420⟩,⟨-401324516035198882288909637595247763921496262422974568937992022,-401324516035198882288909637595247763921496262372573659150486766⟩⟩, + ⟨⟨-136793385495221344071117481140581595312270513033450123659066914,-136793385495221344071117481140581595312270513001840275822318386⟩,⟨-1082683256337036005873538115278089101822862201816164520197144414,-1082683256337036005873538115278089101822862201784558741021561822⟩⟩, + ⟨⟨691637758446381399752768983892442473125789657431896307857450152,691637758446381399752768983892442473125789657448915477576509361⟩,⟨-404591669239809112237179302448884957676218351302811343631788890,-404591669239809112237179302448884957676218351285791985569005694⟩⟩, + ⟨⟨426016600509389744267675357995167981740501768593429106254744724,426016600509389744267675357995167981740501768601202700281665515⟩,⟨333645564941496505330156441043791850901932563690096017713815451,333645564941496505330156441043791850901932563697869088254606691⟩⟩, + ⟨⟨-104023523936948958656788248009339890290094622406474404775519580,-104023523936948958656788248009339890290094622403506969970420793⟩,⟨312361451936102397590849479031690449706967037530963958249009458,312361451936102397590849479031690449706967037533931724903657696⟩⟩, + ⟨⟨-175545972265297872977636312095087520787949684318523106883352453,-175545972265297872977636312095087520787949684317597004180765943⟩,⟨-3017626026941955946172733161320399232757925022685587525531199,-3017626026941955946172733161320399232757925021759570348864841⟩⟩, + ⟨⟨-19163513165526571608310526597599643507403362702645028200307351,-19163513165526571608310526597599643507403362702416878339593927⟩,⟨-76734020298984841702151163516356146062697505998730385419907086,-76734020298984841702151163516356146062697505998502220430951193⟩⟩, + ⟨⟨25477211159031679358278123031647999502929370960248315437899460,25477211159031679358278123031647999502929370960290362065263834⟩,⟨-12539147570602880986363505153869713185588833690225570229745717,-12539147570602880986363505153869713185588833690183522263281852⟩⟩, + ⟨⟨4164960460944895420753505374463989805687536036937630005773943,4164960460944895420753505374463989805687536036942894035354977⟩,⟨5948179980458170830020430871981224876340636902996889959262847,5948179980458170830020430871981224876340636903002152400406886⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080562160465188,-766044443118978035202392650555416673935832457080235953736992⟩,⟨642787609686539326322643409907263432907559884205514018402637,642787609686539326322643409907263432907559884205840478177725⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩, + ⟨⟨-63812912,63812912⟩,⟨-63798486,63827304⟩⟩] +lemma coeffBox12_calc (j : Fin 31) : coeffStep phaseBox25 coeffBox11 j = coeffBox12 j := by + revert j + decide +kernel +lemma coeffBox12_mem (j : Fin 31) : (coeffBox12 j).Mem ((partialPolynomial 12).coeff j.val) := by + rw [← coeffBox12_calc, partialPolynomial_succ (by norm_num : 11 < 15)] + apply coeffStep_mem ⟨11,by norm_num⟩ (partialPolynomial 11) phaseBox25 coeffBox11 + · have hr : residue ⟨11,by norm_num⟩ = (25:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox25_mem + · exact coeffBox11_mem +def coeffBox13 : Fin 31 → CI := + ![⟨⟨642787609686539326322643409907263432907559884205491065819110,642787609686539326322643409907263432907559884205861544029453⟩,⟨-766044443118978035202392650555416673935832457080584961250795,-766044443118978035202392650555416673935832457080214736087377⟩⟩, + ⟨⟨4416091094220214759615645570870391528468971988835612510009246,4416091094220214759615645570870391528468971988841843879204807⟩,⟨2879385241571816768108218554649462939872416268525783467215086,2879385241571816768108218554649462939872416268532016930941459⟩⟩, + ⟨⟨-4852014258399629471179137814848997007121321500556737708852509,-4852014258399629471179137814848997007121321500502600336949783⟩,⟨14346895641234315733439653938240966424183929611323643797525692,14346895641234315733439653938240966424183929611377776400408053⟩⟩, + ⟨⟨-31727777961379653815615348325041371933179400981237586093399075,-31727777961379653815615348325041371933179400980916744051283054⟩,⟨1749821514734294943662978335675793058086768640777548782127838,1749821514734294943662978335675793058086768641098379962637368⟩⟩, + ⟨⟨-28805504787392218176430281202649973061975816737795699501608560,-28805504787392218176430281202649973061975816736364548566665293⟩,⟨-47555142826359868931612108094023228165484043281812401964669468,-47555142826359868931612108094023228165484043280381136586420562⟩⟩, + ⟨⟨38003527704491493337728018357871554193765174892411787226043433,38003527704491493337728018357871554193765174897475976250863618⟩,⟨-78824758717538475156132255089099448317175409660546701891908565,-78824758717538475156132255089099448317175409655483030896720717⟩⟩, + ⟨⟨128616143094540543962752678186432469554501243898892387453858944,128616143094540543962752678186432469554501243913555743786915243⟩,⟨-23160331097517177936387287973125396885482622156852446028342108,-23160331097517177936387287973125396885482622142187816984137108⟩⟩, + ⟨⟨135080079842867978707321934509760556097818148350092168791020538,135080079842867978707321934509760556097818148385673879172008278⟩,⟨128370152500337347749244349814198661612019152439641516092871830,128370152500337347749244349814198661612019152475221659308327233⟩⟩, + ⟨⟨-33053304385769711698156588536996006473215450650271644710815224,-33053304385769711698156588536996006473215450576792439279750964⟩,⟨246373352475007136135565765762020338299664420936901061467521013,246373352475007136135565765762020338299664421010385235733328276⟩⟩, + ⟨⟨-270319617785832458193965297427525996869818937204127834489685805,-270319617785832458193965297427525996869818937073399423482140873⟩,⟨148646823557837187777320225938016696307664561994344572281134593,148646823557837187777320225938016696307664562125049231707191204⟩⟩, + ⟨⟨-331541858917462464756848424187740650701997535442878878768821570,-331541858917462464756848424187740650701997535240657046632136044⟩,⟨-144955881916550431033039500338312114434337364774863924340469611,-144955881916550431033039500338312114434337364572590550823327969⟩⟩, + ⟨⟨-103092973137316854546044065091022103532809532332403069480718896,-103092973137316854546044065091022103532809532057877455956093534⟩,⟨-394588641379732142427287198273442573140629317615712047882835767,-394588641379732142427287198273442573140629317341244762082440806⟩⟩, + ⟨⟨268475094156454000122214067958501732993242889854714963837750484,268475094156454000122214067958501732993242890183582763062357644⟩,⟨-351821482578361582404738399390638238355880602611827497651162635,-351821482578361582404738399390638238355880602282897779271403473⟩⟩, + ⟨⟨456318655462584440884568309184962263558828010718663895895607726,456318655462584440884568309184962263558828011067922565062493381⟩,⟨-174593696348640465,174593696348688204⟩⟩, + ⟨⟨268475094156454000122214067958501732993242889854714963767942069,268475094156454000122214067958501732993242890183582763132154454⟩,⟨351821482578361582404738399390638238355880602282897779201647932,351821482578361582404738399390638238355880602611827497721009600⟩⟩, + ⟨⟨-103092973137316854546044065091022103532809532332403069612542500,-103092973137316854546044065091022103532809532057877455824286853⟩,⟨394588641379732142427287198273442573140629317341244761950665466,394588641379732142427287198273442573140629317615712048014692483⟩⟩, + ⟨⟨-331541858917462464756848424187740650701997535442878878949523059,-331541858917462464756848424187740650701997535240657046451449356⟩,⟨144955881916550431033039500338312114434337364572590550642669314,144955881916550431033039500338312114434337364774863924521198983⟩⟩, + ⟨⟨-270319617785832458193965297427525996869818937204127834704465027,-270319617785832458193965297427525996869818937073399423267369981⟩,⟨-148646823557837187777320225938016696307664562125049231921933999,-148646823557837187777320225938016696307664561994344572066327600⟩⟩, + ⟨⟨-33053304385769711698156588536996006473215450650271644946518807,-33053304385769711698156588536996006473215450576792439044049144⟩,⟨-246373352475007136135565765762020338299664421010385235969000089,-246373352475007136135565765762020338299664420936901061231786965⟩⟩, + ⟨⟨135080079842867978707321934509760556097818148350092168544072295,135080079842867978707321934509760556097818148385673879418958526⟩,⟨-128370152500337347749244349814198661612019152475221659555245343,-128370152500337347749244349814198661612019152439641515845891651⟩⟩, + ⟨⟨128616143094540543962752678186432469554501243898892387201666995,128616143094540543962752678186432469554501243913555744039109888⟩,⟨23160331097517177936387287973125396885482622142187816731974540,23160331097517177936387287973125396885482622156852446280566038⟩⟩, + ⟨⟨38003527704491493337728018357871554193765174892411786971753298,38003527704491493337728018357871554193765174897475976505155540⟩,⟨78824758717538475156132255089099448317175409655483030642459562,78824758717538475156132255089099448317175409660546702146229580⟩⟩, + ⟨⟨-28805504787392218176430281202649973061975816737795699756608305,-28805504787392218176430281202649973061975816736364548311664771⟩,⟨47555142826359868931612108094023228165484043280381136331449657,47555142826359868931612108094023228165484043281812402219698790⟩⟩, + ⟨⟨-31727777961379653815615348325041371933179400981237586348597411,-31727777961379653815615348325041371933179400980916743796084486⟩,⟨-1749821514734294943662978335675793058086768641098380217806972,-1749821514734294943662978335675793058086768640777548526900538⟩⟩, + ⟨⟨-4852014258399629471179137814848997007121321500556737964095461,-4852014258399629471179137814848997007121321500502600081706755⟩,⟨-14346895641234315733439653938240966424183929611377776655622258,-14346895641234315733439653938240966424183929611323643542253924⟩⟩, + ⟨⟨4416091094220214759615645570870391528468971988835612254758617,4416091094220214759615645570870391528468971988841844134455456⟩,⟨-2879385241571816768108218554649462939872416268532017186163297,-2879385241571816768108218554649462939872416268525783211935644⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205490810567554,642787609686539326322643409907263432907559884205861799281011⟩,⟨766044443118978035202392650555416673935832457080214480864638,766044443118978035202392650555416673935832457080585216531170⟩⟩, + ⟨⟨-255251619,255251619⟩,⟨-255222800,255280438⟩⟩, + ⟨⟨-255251619,255251619⟩,⟨-255222800,255280438⟩⟩, + ⟨⟨-255251619,255251619⟩,⟨-255222800,255280438⟩⟩, + ⟨⟨-255251619,255251619⟩,⟨-255222800,255280438⟩⟩] +lemma coeffBox13_calc (j : Fin 31) : coeffStep phaseBox27 coeffBox12 j = coeffBox13 j := by + revert j + decide +kernel +lemma coeffBox13_mem (j : Fin 31) : (coeffBox13 j).Mem ((partialPolynomial 13).coeff j.val) := by + rw [← coeffBox13_calc, partialPolynomial_succ (by norm_num : 12 < 15)] + apply coeffStep_mem ⟨12,by norm_num⟩ (partialPolynomial 12) phaseBox27 coeffBox12 + · have hr : residue ⟨12,by norm_num⟩ = (27:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox27_mem + · exact coeffBox12_mem +def coeffBox14 : Fin 31 → CI := + ![⟨⟨642787609686539326322643409907263432907559884205450996833679,642787609686539326322643409907263432907559884205925511237456⟩,⟨766044443118978035202392650555416673935832457080152454279948,766044443118978035202392650555416673935832457080627190072069⟩⟩, + ⟨⟨-2316911861358276816436919302717675619342037857811904592355163,-2316911861358276816436919302717675619342037857803706628700402⟩,⟨2316911861358276816436919302717675619342037857803752185672144,2316911861358276816436919302717675619342037857811947743171944⟩⟩, + ⟨⟨-5320233840503559348056640499798215665394454341561169511136765,-5320233840503559348056640499798215665394454341484900550899844⟩,⟨-2010843059532065689344682916953785201566447671125286878603763,-2010843059532065689344682916953785201566447671049008397171332⟩⟩, + ⟨⟨-3849000747596232886841704603828508967213702772212946019771931,-3849000747596232886841704603828508967213702771724458321926955⟩,⟨-7704824504620151700561164434554927892577748850961087228412744,-7704824504620151700561164434554927892577748850472606080485304⟩⟩, + ⟨⟨3350618334479143229323154450619169638053167836900476341232371,3350618334479143229323154450619169638053167839265999885604826⟩,⟨-14323388547977786674655271161271114832315840465663052602267255,-14323388547977786674655271161271114832315840463297636048945315⟩⟩, + ⟨⟨20649689227276910505519285647892239573321723705644426012368686,20649689227276910505519285647892239573321723714749391304555665⟩,⟨-13054432816245680790053223023741599995750160087097180291817853,-13054432816245680790053223023741599995750160077991555679094312⟩⟩, + ⟨⟨34650920231336140889453197522086290546366560007430250801020899,34650920231336140889453197522086290546366560036212160384630619⟩,⟨9660155070742856944098328839855123822586247826602732959292736,9660155070742856944098328839855123822586247855382469935395477⟩⟩, + ⟨⟨23129478202423733314021160428172685570569378041712087217341210,23129478202423733314021160428172685570569378118135532952750343⟩,⟨40677611644359167120709705604477237119124201289801032600985812,40677611644359167120709705604477237119124201366228719647835037⟩⟩, + ⟨⟨-11873014388882054365633557151108253877307628421271330143326997,-11873014388882054365633557151108253877307628247978542810385229⟩,⟨58766445303134472372956339264977712973917686115537060117177540,58766445303134472372956339264977712973917686288821664342281817⟩⟩, + ⟨⟨-62591132321930049398796132326675493332278272129412017369259849,-62591132321930049398796132326675493332278271789793503143591423⟩,⟨45402446581159540598010074247522168936488176517847320698825791,45402446581159540598010074247522168936488176857496293340483687⟩⟩, + ⟨⟨-91943885868744270868448469111380909817943368805007762289403883,-91943885868744270868448469111380909817943368224083326984445685⟩,⟨-14271154518609465659180464386073774789042228127769770775875415,-14271154518609465659180464386073774789042227546938673938175168⟩⟩, + ⟨⟨-63258804321523326560999460015259942968689732093376830127474469,-63258804321523326560999460015259942968689731219515418949094375⟩,⟨-82518319196160990928914593099031920866390976299640431529572296,-82518319196160990928914593099031920866390975425609335955906455⟩⟩, + ⟨⟨8488329860743371322815627353293936177409191429859269337371577,8488329860743371322815627353293936177409192594301664757692089⟩,⟨-112011451382787227670045121456915246974862834403076913965405324,-112011451382787227670045121456915246974862833238843222101281880⟩⟩, + ⟨⟨87019238990653242817878034046992465001508058966083036625388139,87019238990653242817878034046992465001508060346348483287452360⟩,⟨-84210457682694112133159822455607856199924578538509339816142758,-84210457682694112133159822455607856199924577158014946726396551⟩⟩, + ⟨⟨126443841787877377679759560303609900616067107737665094907574481,126443841787877377679759560303609900616067109198302229144863183⟩,⟨-730197075238485835,730197075238554012⟩⟩, + ⟨⟨87019238990653242817878034046992465001508058966083036333076816,87019238990653242817878034046992465001508060346348483579757299⟩,⟨84210457682694112133159822455607856199924577158014946434159596,84210457682694112133159822455607856199924578538509340108515189⟩⟩, + ⟨⟨8488329860743371322815627353293936177409191429859268783548881,8488329860743371322815627353293936177409192594301665311505917⟩,⟨112011451382787227670045121456915246974862833238843221547526409,112011451382787227670045121456915246974862834403076914519292247⟩⟩, + ⟨⟨-63258804321523326560999460015259942968689732093376830890376980,-63258804321523326560999460015259942968689731219515418186200163⟩,⟨82518319196160990928914593099031920866390975425609335193071141,82518319196160990928914593099031920866390976299640432292532231⟩⟩, + ⟨⟨-91943885868744270868448469111380909817943368805007763201334195,-91943885868744270868448469111380909817943368224083326072520803⟩,⟨14271154518609465659180464386073774789042227546938673026307097,14271154518609465659180464386073774789042228127769771687861638⟩⟩, + ⟨⟨-62591132321930049398796132326675493332278272129412018375552415,-62591132321930049398796132326675493332278271789793502137299189⟩,⟨-45402446581159540598010074247522168936488176857496294346720396,-45402446581159540598010074247522168936488176517847319692476356⟩⟩, + ⟨⟨-11873014388882054365633557151108253877307628421271331202429326,-11873014388882054365633557151108253877307628247978541751278194⟩,⟨-58766445303134472372956339264977712973917686288821665401332616,-58766445303134472372956339264977712973917686115537059058019670⟩⟩, + ⟨⟨23129478202423733314021160428172685570569378041712086132293345,23129478202423733314021160428172685570569378118135534037805116⟩,⟨-40677611644359167120709705604477237119124201366228720732835625,-40677611644359167120709705604477237119124201289801031515883883⟩⟩, + ⟨⟨34650920231336140889453197522086290546366560007430249704880607,34650920231336140889453197522086290546366560036212161480776782⟩,⟨-9660155070742856944098328839855123822586247855382471031490356,-9660155070742856944098328839855123822586247826602731863100822⟩⟩, + ⟨⟨20649689227276910505519285647892239573321723705644424912148919,20649689227276910505519285647892239573321723714749392404778766⟩,⟨13054432816245680790053223023741599995750160077991554578920411,13054432816245680790053223023741599995750160087097181392086646⟩⟩, + ⟨⟨3350618334479143229323154450619169638053167836900475239741897,3350618334479143229323154450619169638053167839266000987096459⟩,⟨14323388547977786674655271161271114832315840463297634947501526,14323388547977786674655271161271114832315840465663053703805610⟩⟩, + ⟨⟨-3849000747596232886841704603828508967213702772212947121590589,-3849000747596232886841704603828508967213702771724457220108098⟩,⟨7704824504620151700561164434554927892577748850472604978714005,7704824504620151700561164434554927892577748850961088330278944⟩⟩, + ⟨⟨-5320233840503559348056640499798215665394454341561170613023497,-5320233840503559348056640499798215665394454341484899449013156⟩,⟨2010843059532065689344682916953785201566447671049007295332185,2010843059532065689344682916953785201566447671125287980538045⟩⟩, + ⟨⟨-2316911861358276816436919302717675619342037857811905694252664,-2316911861358276816436919302717675619342037857803705526802935⟩,⟨-2316911861358276816436919302717675619342037857811948845021805,-2316911861358276816436919302717675619342037857803751083727038⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205449894935006,642787609686539326322643409907263432907559884205926613136127⟩,⟨-766044443118978035202392650555416673935832457080628291923111,-766044443118978035202392650555416673935832457080151352333646⟩⟩, + ⟨⟨-1101898745,1101898745⟩,⟨-1101851114,1101946376⟩⟩, + ⟨⟨-1101898745,1101898745⟩,⟨-1101851114,1101946376⟩⟩] +lemma coeffBox14_calc (j : Fin 31) : coeffStep phaseBox28 coeffBox13 j = coeffBox14 j := by + revert j + decide +kernel +lemma coeffBox14_mem (j : Fin 31) : (coeffBox14 j).Mem ((partialPolynomial 14).coeff j.val) := by + rw [← coeffBox14_calc, partialPolynomial_succ (by norm_num : 13 < 15)] + apply coeffStep_mem ⟨13,by norm_num⟩ (partialPolynomial 13) phaseBox28 coeffBox13 + · have hr : residue ⟨13,by norm_num⟩ = (28:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox28_mem + · exact coeffBox13_mem +def coeffBox15 : Fin 31 → CI := + ![⟨⟨-1000000000000000000000000000000000000000000000000357668187167,-999999999999999999999999999999999999999999999999642331844290⟩,⟨-347827970497,367531293270⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999993651414841229,1000000000000000000000000000000000000000000000006301693187769⟩,⟨-1732050807568877293527446341505872366942805253816719729498660,-1732050807568877293527446341505872366942805253804068711800391⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999937613287990976,500000000000000000000000000000000000000000000062425585717517⟩,⟨866025403784438646763723170752936183471402626842770407098962,866025403784438646763723170752936183471402626967575393807880⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999573590116305701,1000000000000000000000000000000000000000000000426403438220127⟩,⟨-1732050807568877293527446341505872366942805254236801333268779,-1732050807568877293527446341505872366942805253383966294401230⟩⟩, + ⟨⟨2999999999999999999999999999999999999999999997791129033444059,3000000000000000000000000000000000000000000002208932276369331⟩,⟨1732050807568877293527446341505872366942805251601454706010736,1732050807568877293527446341505872366942805256019259984594612⟩⟩, + ⟨⟨-9124260591446541,9124350972912394⟩,⟨3464101615137754587054892683011744733885610498496628994962483,3464101615137754587054892683011744733885610516744944595527729⟩⟩, + ⟨⟨-1500000000000000000000000000000000000000000031045869893592982,-1499999999999999999999999999999999999999999968954126738405517⟩,⟨866025403784438646763723170752936183471402595858574772131640,866025403784438646763723170752936183471402657951911834279273⟩⟩, + ⟨⟨-89032996610118055,89032972484916236⟩,⟨3464101615137754587054892683011744733885610418590275204646281,3464101615137754587054892683011744733885610596651299102579322⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000218766062218846020,-5999999999999999999999999999999999999999999781233989257513064⟩,⟨1732050807568877293527446341505872366942805035039511932291892,1732050807568877293527446341505872366942805472581352851209727⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000000466375630056524966,-1999999999999999999999999999999999999999999533624532919605091⟩,⟨-3464101615137754587054892683011744733885610973985977696155229,-3464101615137754587054892683011744733885610041255523607013701⟩⟩, + ⟨⟨-2500000000000000000000000000000000000000000870865308128601628,-2499999999999999999999999999999999999999999129134785455383937⟩,⟨866025403784438646763723170752936183471401756003179879816604,866025403784438646763723170752936183471403497807120074975169⟩⟩, + ⟨⟨-5000000000000000000000000000000000000000001435800045040879251,-4999999999999999999999999999999999999999998564200033688553946⟩,⟨-5196152422706631880582339024517617100828417197125514277083081,-5196152422706631880582339024517617100828414325736847984876077⟩⟩, + ⟨⟨1999999999999999999999999999999999999999997896786134701370754,2000000000000000000000000000000000000000002103213821259903458⟩,⟨-6928203230275509174109785366023489467771223118643747514259613,-6928203230275509174109785366023489467771218911839452891656829⟩⟩, + ⟨⟨2999999999999999999999999999999999999999997247556623475161820,3000000000000000000000000000000000000000002752443452126372415⟩,⟨-1732050807568877293527446341505872366942808006020615696087887,-1732050807568877293527446341505872366942802501600321429033324⟩⟩, + ⟨⟨1499999999999999999999999999999999999999996770755461509639462,1500000000000000000000000000000000000000003229244711808191594⟩,⟨-6062177826491070527346062195270553284299821617837770478031202,-6062177826491070527346062195270553284299815158834963112515012⟩⟩, + ⟨⟨11999999999999999999999999999999999999999996594619670830608816,12000000000000000000000000000000000000000003405380459998996233⟩,⟨-3405109190468067794,3405109190468112178⟩⟩, + ⟨⟨1499999999999999999999999999999999999999996770755460144782377,1500000000000000000000000000000000000000003229244713173045367⟩,⟨6062177826491070527346062195270553284299815158834961747712830,6062177826491070527346062195270553284299821617837771842925403⟩⟩, + ⟨⟨2999999999999999999999999999999999999999997247556620880919775,3000000000000000000000000000000000000000002752443454720614479⟩,⟨1732050807568877293527446341505872366942802501600318834832012,1732050807568877293527446341505872366942808006020618290383453⟩⟩, + ⟨⟨1999999999999999999999999999999999999999997896786131110583771,2000000000000000000000000000000000000000002103213824850693222⟩,⟨6928203230275509174109785366023489467771218911839449300915955,6928203230275509174109785366023489467771223118643751105091926⟩⟩, + ⟨⟨-5000000000000000000000000000000000000000001435800049357225148,-4999999999999999999999999999999999999999998564200029372204250⟩,⟨5196152422706631880582339024517617100828414325736843668574096,5196152422706631880582339024517617100828417197125518593474909⟩⟩, + ⟨⟨-2500000000000000000000000000000000000000000870865312918035125,-2499999999999999999999999999999999999999999129134780665942151⟩,⟨-866025403784438646763723170752936183471403497807124864370027,-866025403784438646763723170752936183471401756003175090333297⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000000466375635121079910,-1999999999999999999999999999999999999999999533624527855036240⟩,⟨3464101615137754587054892683011744733885610041255518542493621,3464101615137754587054892683011744733885610973985982760757402⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000218766067425323507,-5999999999999999999999999999999999999999999781233984051020872⟩,⟨-1732050807568877293527446341505872366942805472581358057658275,-1732050807568877293527446341505872366942805035039506725770962⟩⟩, + ⟨⟨-89033001881081646,89032977755889927⟩,⟨-3464101615137754587054892683011744733885610596651304373515719,-3464101615137754587054892683011744733885610418590269933644684⟩⟩, + ⟨⟨-1500000000000000000000000000000000000000000031045875190131590,-1499999999999999999999999999999999999999999968954121441862869⟩,⟨-866025403784438646763723170752936183471402657951917130788193,-866025403784438646763723170752936183471402595858569475559699⟩⟩, + ⟨⟨-9124265896733358,9124356278199251⟩,⟨-3464101615137754587054892683011744733885610516744949900782247,-3464101615137754587054892683011744733885610498496623689643227⟩⟩, + ⟨⟨2999999999999999999999999999999999999999999997791123725616932,3000000000000000000000000000000000000000000002208937584195704⟩,⟨-1732050807568877293527446341505872366942805256019265292387869,-1732050807568877293527446341505872366942805251601449398150530⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999573584807865983,1000000000000000000000000000000000000000000000426408746659388⟩,⟨1732050807568877293527446341505872366942805253383960985995665,1732050807568877293527446341505872366942805254236806641742215⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999937607979432453,500000000000000000000000000000000000000000000062430894275904⟩,⟨-866025403784438646763723170752936183471402626967580702332263,-866025403784438646763723170752936183471402626842765098506436⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999993646106265121,1000000000000000000000000000000000000000000000006307001763882⟩,⟨1732050807568877293527446341505872366942805253804063403258327,1732050807568877293527446341505872366942805253816725038108817⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000362976765098,-999999999999999999999999999999999999999999999999637023266358⟩,⟨-372839837171,353136582460⟩⟩] +lemma coeffBox15_calc (j : Fin 31) : coeffStep phaseBox31 coeffBox14 j = coeffBox15 j := by + revert j + decide +kernel +lemma coeffBox15_mem (j : Fin 31) : (coeffBox15 j).Mem ((partialPolynomial 15).coeff j.val) := by + rw [← coeffBox15_calc, partialPolynomial_succ (by norm_num : 14 < 15)] + apply coeffStep_mem ⟨14,by norm_num⟩ (partialPolynomial 14) phaseBox31 coeffBox14 + · have hr : residue ⟨14,by norm_num⟩ = (31:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox31_mem + · exact coeffBox14_mem +lemma atomPolynomial_coeff_mem (j : Fin 31) : (coeffBox15 j).Mem (atomPolynomial.coeff j.val) := by + simpa only [partialPolynomial_fifteen] using coeffBox15_mem j +end AtomicTriangular.FiniteCertificate + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def phaseTable : Fin 36 → CI := ![phaseBox0, phaseBox1, phaseBox2, phaseBox3, phaseBox4, phaseBox5, phaseBox6, phaseBox7, phaseBox8, phaseBox9, phaseBox10, phaseBox11, phaseBox12, phaseBox13, phaseBox14, phaseBox15, phaseBox16, phaseBox17, phaseBox18, phaseBox19, phaseBox20, phaseBox21, phaseBox22, phaseBox23, phaseBox24, phaseBox25, phaseBox26, phaseBox27, phaseBox28, phaseBox29, phaseBox30, phaseBox31, phaseBox32, phaseBox33, phaseBox34, phaseBox35] +lemma phaseTable_mem (j : Fin 36) : (phaseTable j).Mem (phase ((j.val:ℤ):ℂ)) := by + fin_cases j + · exact phaseBox0_mem + · exact phaseBox1_mem + · exact phaseBox2_mem + · exact phaseBox3_mem + · exact phaseBox4_mem + · exact phaseBox5_mem + · exact phaseBox6_mem + · exact phaseBox7_mem + · exact phaseBox8_mem + · exact phaseBox9_mem + · exact phaseBox10_mem + · exact phaseBox11_mem + · exact phaseBox12_mem + · exact phaseBox13_mem + · exact phaseBox14_mem + · exact phaseBox15_mem + · exact phaseBox16_mem + · exact phaseBox17_mem + · exact phaseBox18_mem + · exact phaseBox19_mem + · exact phaseBox20_mem + · exact phaseBox21_mem + · exact phaseBox22_mem + · exact phaseBox23_mem + · exact phaseBox24_mem + · exact phaseBox25_mem + · exact phaseBox26_mem + · exact phaseBox27_mem + · exact phaseBox28_mem + · exact phaseBox29_mem + · exact phaseBox30_mem + · exact phaseBox31_mem + · exact phaseBox32_mem + · exact phaseBox33_mem + · exact phaseBox34_mem + · exact phaseBox35_mem +def phaseModBox (n : ℤ) : CI := phaseTable ⟨(n%36).toNat, by omega⟩ +lemma phaseModBox_mem (n : ℤ) : (phaseModBox n).Mem (phase (n:ℂ)) := by + rw [phase_int_mod] + have hh := phaseTable_mem ⟨(n%36).toNat, by omega⟩ + simpa only [phaseModBox, Int.toNat_of_nonneg (show 0 ≤ n%36 by omega)] using hh + +def frequencyBox (j : Fin 31) : CI := + ((CI.imag.mul (CI.ofReal piBox)).mul (CI.point ((j.val:ℤ)-15))).divNat 18 +lemma frequencyBox_mem (j : Fin 31) : + (frequencyBox j).Mem (Complex.I*Real.pi*(frequency j:ℂ)) := by + have hh := CI.mem_divNat + (CI.mem_mul (CI.mem_mul CI.mem_imag (CI.mem_ofReal piBox_mem)) + (CI.mem_point ((j.val:ℤ)-15))) (by norm_num : 0 < (18:ℕ)) + change (((CI.imag.mul (CI.ofReal piBox)).mul (CI.point ((j.val:ℤ)-15))).divNat 18).Mem _ + convert hh using 1 + unfold frequency + push_cast + ring + +def waveDerivativeBox (k : ℕ) (n : ℤ) : CI := CI.sum (fun j : Fin 31 => + ((coeffBox15 j).mul ((frequencyBox j).pow k)).mul (phaseModBox (((j.val:ℤ)-15)*n))) +lemma waveDerivativeBox_mem (k : ℕ) (n : ℤ) : + (waveDerivativeBox k n).Mem (waveDerivative k (n:ℂ)) := by + apply CI.mem_sum + intro j + rw [wave_phase_integer] + exact CI.mem_mul (CI.mem_mul (atomPolynomial_coeff_mem j) + (CI.mem_pow (frequencyBox_mem j) k)) (phaseModBox_mem (((j.val:ℤ)-15)*n)) + +def jetBox2_0 : CI := ⟨⟨2193245422464301915296553555528033585625259535611342042812338,2193245422464301915296553555528033585625273534273468147240545⟩,⟨-6999331474201310627,6999331474198725149⟩⟩ +lemma jetBox2_0_calc : waveDerivativeBox 2 0 = jetBox2_0 := by decide +kernel +lemma jetBox2_0_mem : jetBox2_0.Mem (waveDerivative 2 ((0:ℤ):ℂ)) := by + rw [← jetBox2_0_calc] + exact waveDerivativeBox_mem 2 0 +def jetBox3_0 : CI := ⟨⟨-18564500046751676991604216254291247962706875647535313484106627,-18564500046751676991604216254291247962706864169406508811803393⟩,⟨-5739065054797930332,5739065054797752994⟩⟩ +lemma jetBox3_0_calc : waveDerivativeBox 3 0 = jetBox3_0 := by decide +kernel +lemma jetBox3_0_mem : jetBox3_0.Mem (waveDerivative 3 ((0:ℤ):ℂ)) := by + rw [← jetBox3_0_calc] + exact waveDerivativeBox_mem 3 0 +def QBox0 : RI := ⟨1096622711232150957648276777764016792812629767805671021406169,1096622711232150957648276777764016792812636767136734073620273⟩ +lemma QBox0_calc : jetBox2_0.re.divNat 2 = QBox0 := by decide +kernel +lemma QBox0_mem : QBox0.Mem (Q 0) := by + rw [← QBox0_calc] + exact RI.mem_divNat jetBox2_0_mem.1 (by norm_num) +def DBox0 : RI := ⟨-2821465677697672212035232845221131139108557373444433241507405,-2821465677697672212035232845221131139108537620621874649857953⟩ +lemma DBox0_calc : jetBox3_0.re.mul ((RI.point 6).mul QBox0).inv = DBox0 := by decide +kernel +lemma DBox0_mem : DBox0.Mem (D 0) := by + rw [← DBox0_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_0_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox0_mem + · left; decide +kernel +lemma Q_0_bounds : (157/1000:ℝ) < Q 0 ∧ Q 0 < 40 := by + have hh := QBox0_mem + norm_num [RI.Mem, QBox0, scale] at hh + constructor <;> linarith +lemma D_0_bound : |D 0| < (283/100:ℝ) := by + have hh := DBox0_mem + norm_num [RI.Mem, DBox0, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_1 : CI := ⟨⟨649358508339545667567100424194258763912824850100094785805590,649358508339545667567100424194258763912843619077633365447908⟩,⟨-9384489787203357955,9384489786138007847⟩⟩ +lemma jetBox2_1_calc : waveDerivativeBox 2 1 = jetBox2_1 := by decide +kernel +lemma jetBox2_1_mem : jetBox2_1.Mem (waveDerivative 2 ((1:ℤ):ℂ)) := by + rw [← jetBox2_1_calc] + exact waveDerivativeBox_mem 2 1 +def jetBox3_1 : CI := ⟨⟨639966476654750180084024766787116611503084547391679860744363,639966476654750180084024766787116611503099798483826564847070⟩,⟨-7625547005894580539,7625547004847671723⟩⟩ +lemma jetBox3_1_calc : waveDerivativeBox 3 1 = jetBox3_1 := by decide +kernel +lemma jetBox3_1_mem : jetBox3_1.Mem (waveDerivative 3 ((1:ℤ):ℂ)) := by + rw [← jetBox3_1_calc] + exact waveDerivativeBox_mem 3 1 +def QBox1 : RI := ⟨324679254169772833783550212097129381956412425050047392902795,324679254169772833783550212097129381956421809538816682723955⟩ +lemma QBox1_calc : jetBox2_1.re.divNat 2 = QBox1 := by decide +kernel +lemma QBox1_mem : QBox1.Mem (Q 1) := by + rw [← QBox1_calc] + exact RI.mem_divNat jetBox2_1_mem.1 (by norm_num) +def DBox1 : RI := ⟨328512148751844566334421943996284209005041942242243381121812,328512148751844566334421943996284209005059266315738736466798⟩ +lemma DBox1_calc : jetBox3_1.re.mul ((RI.point 6).mul QBox1).inv = DBox1 := by decide +kernel +lemma DBox1_mem : DBox1.Mem (D 1) := by + rw [← DBox1_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_1_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox1_mem + · left; decide +kernel +lemma Q_1_bounds : (157/1000:ℝ) < Q 1 ∧ Q 1 < 40 := by + have hh := QBox1_mem + norm_num [RI.Mem, QBox1, scale] at hh + constructor <;> linarith +lemma D_1_bound : |D 1| < (283/100:ℝ) := by + have hh := DBox1_mem + norm_num [RI.Mem, DBox1, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_3 : CI := ⟨⟨314935873091926165719798041528741690796860352768042068448118,314935873091926165719798041528741690796877767398780082367638⟩,⟨-8707279535569115420,8707279520646445484⟩⟩ +lemma jetBox2_3_calc : waveDerivativeBox 2 3 = jetBox2_3 := by decide +kernel +lemma jetBox2_3_mem : jetBox2_3.Mem (waveDerivative 2 ((3:ℤ):ℂ)) := by + rw [← jetBox2_3_calc] + exact waveDerivativeBox_mem 2 3 +def jetBox3_3 : CI := ⟨⟨-1014910349844130235681633870102975669842297425304771309994680,-1014910349844130235681633870102975669842283153998726586069992⟩,⟨-7135672221752091992,7135672275674907079⟩⟩ +lemma jetBox3_3_calc : waveDerivativeBox 3 3 = jetBox3_3 := by decide +kernel +lemma jetBox3_3_mem : jetBox3_3.Mem (waveDerivative 3 ((3:ℤ):ℂ)) := by + rw [← jetBox3_3_calc] + exact waveDerivativeBox_mem 3 3 +def QBox3 : RI := ⟨157467936545963082859899020764370845398430176384021034224059,157467936545963082859899020764370845398438883699390041183820⟩ +lemma QBox3_calc : jetBox2_3.re.divNat 2 = QBox3 := by decide +kernel +lemma QBox3_mem : QBox3.Mem (Q 3) := by + rw [← QBox3_calc] + exact RI.mem_divNat jetBox2_3_mem.1 (by norm_num) +def DBox3 : RI := ⟨-1074197888689855660750076301760101438086369445867264880330882,-1074197888689855660750076301760101438086294942250526538305496⟩ +lemma DBox3_calc : jetBox3_3.re.mul ((RI.point 6).mul QBox3).inv = DBox3 := by decide +kernel +lemma DBox3_mem : DBox3.Mem (D 3) := by + rw [← DBox3_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_3_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox3_mem + · left; decide +kernel +lemma Q_3_bounds : (157/1000:ℝ) < Q 3 ∧ Q 3 < 40 := by + have hh := QBox3_mem + norm_num [RI.Mem, QBox3, scale] at hh + constructor <;> linarith +lemma D_3_bound : |D 3| < (283/100:ℝ) := by + have hh := DBox3_mem + norm_num [RI.Mem, DBox3, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_4 : CI := ⟨⟨480190930161026078211119768145913141800720940178075083063726,480190930161026078211119768145913141800738985786865741678330⟩,⟨-9022785599708981683,9022785611075412461⟩⟩ +lemma jetBox2_4_calc : waveDerivativeBox 2 4 = jetBox2_4 := by decide +kernel +lemma jetBox2_4_mem : jetBox2_4.Mem (waveDerivative 2 ((4:ℤ):ℂ)) := by + rw [← jetBox2_4_calc] + exact waveDerivativeBox_mem 2 4 +def jetBox3_4 : CI := ⟨⟨2821037415057641454037448174285971970813200215885054810691223,2821037415057641454037448174285971970813214970229555343141501⟩,⟨-7377190765466621317,7377190749811915498⟩⟩ +lemma jetBox3_4_calc : waveDerivativeBox 3 4 = jetBox3_4 := by decide +kernel +lemma jetBox3_4_mem : jetBox3_4.Mem (waveDerivative 3 ((4:ℤ):ℂ)) := by + rw [← jetBox3_4_calc] + exact waveDerivativeBox_mem 3 4 +def QBox4 : RI := ⟨240095465080513039105559884072956570900360470089037541531863,240095465080513039105559884072956570900369492893432870839166⟩ +lemma QBox4_calc : jetBox2_4.re.divNat 2 = QBox4 := by decide +kernel +lemma QBox4_mem : QBox4.Mem (Q 4) := by + rw [← QBox4_calc] + exact RI.mem_divNat jetBox2_4_mem.1 (by norm_num) +def DBox4 : RI := ⟨1958274815194615409462416280349205188070741451787576794058652,1958274815194615409462416280349205188070825285890898180544800⟩ +lemma DBox4_calc : jetBox3_4.re.mul ((RI.point 6).mul QBox4).inv = DBox4 := by decide +kernel +lemma DBox4_mem : DBox4.Mem (D 4) := by + rw [← DBox4_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_4_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox4_mem + · left; decide +kernel +lemma Q_4_bounds : (157/1000:ℝ) < Q 4 ∧ Q 4 < 40 := by + have hh := QBox4_mem + norm_num [RI.Mem, QBox4, scale] at hh + constructor <;> linarith +lemma D_4_bound : |D 4| < (283/100:ℝ) := by + have hh := DBox4_mem + norm_num [RI.Mem, DBox4, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_7 : CI := ⟨⟨3189148019972792007764637656494857305488305163218904078244812,3189148019972792007764637656494857305488323055140130853335833⟩,⟨-8946107184572060955,8946107179335551303⟩⟩ +lemma jetBox2_7_calc : waveDerivativeBox 2 7 = jetBox2_7 := by decide +kernel +lemma jetBox2_7_mem : jetBox2_7.Mem (waveDerivative 2 ((7:ℤ):ℂ)) := by + rw [← jetBox2_7_calc] + exact waveDerivativeBox_mem 2 7 +def jetBox3_7 : CI := ⟨⟨-1382299550539964033879229599493438562522051079640409546599351,-1382299550539964033879229599493438562522036475971189370307881⟩,⟨-7301729767200386216,7301729769468893611⟩⟩ +lemma jetBox3_7_calc : waveDerivativeBox 3 7 = jetBox3_7 := by decide +kernel +lemma jetBox3_7_mem : jetBox3_7.Mem (waveDerivative 3 ((7:ℤ):ℂ)) := by + rw [← jetBox3_7_calc] + exact waveDerivativeBox_mem 3 7 +def QBox7 : RI := ⟨1594574009986396003882318828247428652744152581609452039122406,1594574009986396003882318828247428652744161527570065426667917⟩ +lemma QBox7_calc : jetBox2_7.re.divNat 2 = QBox7 := by decide +kernel +lemma QBox7_mem : QBox7.Mem (Q 7) := by + rw [← QBox7_calc] + exact RI.mem_divNat jetBox2_7_mem.1 (by norm_num) +def DBox7 : RI := ⟨-144479501723029361026896582559914730386716021226816443856874,-144479501723029361026896582559914730386713684268620369124310⟩ +lemma DBox7_calc : jetBox3_7.re.mul ((RI.point 6).mul QBox7).inv = DBox7 := by decide +kernel +lemma DBox7_mem : DBox7.Mem (D 7) := by + rw [← DBox7_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_7_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox7_mem + · left; decide +kernel +lemma Q_7_bounds : (157/1000:ℝ) < Q 7 ∧ Q 7 < 40 := by + have hh := QBox7_mem + norm_num [RI.Mem, QBox7, scale] at hh + constructor <;> linarith +lemma D_7_bound : |D 7| < (283/100:ℝ) := by + have hh := DBox7_mem + norm_num [RI.Mem, DBox7, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_9 : CI := ⟨⟨4386490844928603830593107111056067171250526070359086629539213,4386490844928603830593107111056067171250540069410481046659986⟩,⟨-6999139762929181309,6999139749324919077⟩⟩ +lemma jetBox2_9_calc : waveDerivativeBox 2 9 = jetBox2_9 := by decide +kernel +lemma jetBox2_9_mem : jetBox2_9.Mem (waveDerivative 2 ((9:ℤ):ℂ)) := by + rw [← jetBox2_9_calc] + exact waveDerivativeBox_mem 2 9 +def jetBox3_9 : CI := ⟨⟨6179663307388343146755102523626297746929090687276536865680881,6179663307388343146755102523626297746929102165152230001774040⟩,⟨-5739196860913024693,5739196877860715941⟩⟩ +lemma jetBox3_9_calc : waveDerivativeBox 3 9 = jetBox3_9 := by decide +kernel +lemma jetBox3_9_mem : jetBox3_9.Mem (waveDerivative 3 ((9:ℤ):ℂ)) := by + rw [← jetBox3_9_calc] + exact waveDerivativeBox_mem 3 9 +def QBox9 : RI := ⟨2193245422464301915296553555528033585625263035179543314769606,2193245422464301915296553555528033585625270034705240523329994⟩ +lemma QBox9_calc : jetBox2_9.re.divNat 2 = QBox9 := by decide +kernel +lemma QBox9_mem : QBox9.Mem (Q 9) := by + rw [← QBox9_calc] + exact RI.mem_divNat jetBox2_9_mem.1 (by norm_num) +def DBox9 : RI := ⟨469598100611783043885383549212716193991642259249781619427619,469598100611783043885383549212716193991644630139606133123372⟩ +lemma DBox9_calc : jetBox3_9.re.mul ((RI.point 6).mul QBox9).inv = DBox9 := by decide +kernel +lemma DBox9_mem : DBox9.Mem (D 9) := by + rw [← DBox9_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_9_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox9_mem + · left; decide +kernel +lemma Q_9_bounds : (157/1000:ℝ) < Q 9 ∧ Q 9 < 40 := by + have hh := QBox9_mem + norm_num [RI.Mem, QBox9, scale] at hh + constructor <;> linarith +lemma D_9_bound : |D 9| < (283/100:ℝ) := by + have hh := DBox9_mem + norm_num [RI.Mem, DBox9, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_12 : CI := ⟨⟨2193245422464301915296553555528033585625257827702944738164265,2193245422464301915296553555528033585625275242181781766130093⟩,⟨-8707354858304197389,8707354880361310085⟩⟩ +lemma jetBox2_12_calc : waveDerivativeBox 2 12 = jetBox2_12 := by decide +kernel +lemma jetBox2_12_mem : jetBox2_12.Mem (waveDerivative 2 ((12:ℤ):ℂ)) := by + rw [← jetBox2_12_calc] + exact waveDerivativeBox_mem 2 12 +def jetBox3_12 : CI := ⟨⟨-9282250023375838495802108127145623981353442089922621766704147,-9282250023375838495802108127145623981353427818548128082380784⟩,⟨-7135636939508369437,7135637012310946188⟩⟩ +lemma jetBox3_12_calc : waveDerivativeBox 3 12 = jetBox3_12 := by decide +kernel +lemma jetBox3_12_mem : jetBox3_12.Mem (waveDerivative 3 ((12:ℤ):ℂ)) := by + rw [← jetBox3_12_calc] + exact waveDerivativeBox_mem 3 12 +def QBox12 : RI := ⟨1096622711232150957648276777764016792812628913851472369082132,1096622711232150957648276777764016792812637621090890883065047⟩ +lemma QBox12_calc : jetBox2_12.re.divNat 2 = QBox12 := by decide +kernel +lemma QBox12_mem : QBox12.Mem (Q 12) := by + rw [← QBox12_calc] + exact RI.mem_divNat jetBox2_12_mem.1 (by norm_num) +def DBox12 : RI := ⟨-1410732838848836106017616422610565569554280433655814469824868,-1410732838848836106017616422610565569554267063377368789475445⟩ +lemma DBox12_calc : jetBox3_12.re.mul ((RI.point 6).mul QBox12).inv = DBox12 := by decide +kernel +lemma DBox12_mem : DBox12.Mem (D 12) := by + rw [← DBox12_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_12_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox12_mem + · left; decide +kernel +lemma Q_12_bounds : (157/1000:ℝ) < Q 12 ∧ Q 12 < 40 := by + have hh := QBox12_mem + norm_num [RI.Mem, QBox12, scale] at hh + constructor <;> linarith +lemma D_12_bound : |D 12| < (283/100:ℝ) := by + have hh := DBox12_mem + norm_num [RI.Mem, DBox12, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_13 : CI := ⟨⟨2807621397887934342703697530467294183654949971789532816313407,2807621397887934342703697530467294183654968017377691935889251⟩,⟨-9022795908507912539,9022795903898093804⟩⟩ +lemma jetBox2_13_calc : waveDerivativeBox 2 13 = jetBox2_13 := by decide +kernel +lemma jetBox2_13_mem : jetBox2_13.Mem (waveDerivative 2 ((13:ℤ):ℂ)) := by + rw [← jetBox2_13_calc] + exact waveDerivativeBox_mem 2 13 +def jetBox3_13 : CI := ⟨⟨16063736884637908466488652459875696207303396032822641395711849,16063736884637908466488652459875696207303410787163987127954303⟩,⟨-7377192311139094782,7377192284763907304⟩⟩ +lemma jetBox3_13_calc : waveDerivativeBox 3 13 = jetBox3_13 := by decide +kernel +lemma jetBox3_13_mem : jetBox3_13.Mem (waveDerivative 3 ((13:ℤ):ℂ)) := by + rw [← jetBox3_13_calc] + exact waveDerivativeBox_mem 3 13 +def QBox13 : RI := ⟨1403810698943967171351848765233647091827474985894766408156703,1403810698943967171351848765233647091827484008688845967944626⟩ +lemma QBox13_calc : jetBox2_13.re.divNat 2 = QBox13 := by decide +kernel +lemma QBox13_mem : QBox13.Mem (Q 13) := by + rw [← QBox13_calc] + exact RI.mem_divNat jetBox2_13_mem.1 (by norm_num) +def DBox13 : RI := ⟨1907158481401378911137652754194682428075739824095418915998981,1907158481401378911137652754194682428075753833787153364714690⟩ +lemma DBox13_calc : jetBox3_13.re.mul ((RI.point 6).mul QBox13).inv = DBox13 := by decide +kernel +lemma DBox13_mem : DBox13.Mem (D 13) := by + rw [← DBox13_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_13_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox13_mem + · left; decide +kernel +lemma Q_13_bounds : (157/1000:ℝ) < Q 13 ∧ Q 13 < 40 := by + have hh := QBox13_mem + norm_num [RI.Mem, QBox13, scale] at hh + constructor <;> linarith +lemma D_13_bound : |D 13| < (283/100:ℝ) := by + have hh := DBox13_mem + norm_num [RI.Mem, DBox13, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_16 : CI := ⟨⟨33007531783833052762588798763964826898017254795610847195476874,33007531783833052762588798763964826898017272687668020675686737⟩,⟨-8946039095198659698,8946039053156332177⟩⟩ +lemma jetBox2_16_calc : waveDerivativeBox 2 16 = jetBox2_16 := by decide +kernel +lemma jetBox2_16_mem : jetBox2_16.Mem (waveDerivative 2 ((16:ℤ):ℂ)) := by + rw [← jetBox2_16_calc] + exact waveDerivativeBox_mem 2 16 +def jetBox3_16 : CI := ⟨⟨34108203020399732998460324303738196235955754478236087890457408,34108203020399732998460324303738196235955769081806548159520529⟩,⟨-7301779014900085682,7301778947873190120⟩⟩ +lemma jetBox3_16_calc : waveDerivativeBox 3 16 = jetBox3_16 := by decide +kernel +lemma jetBox3_16_mem : jetBox3_16.Mem (waveDerivative 3 ((16:ℤ):ℂ)) := by + rw [← jetBox3_16_calc] + exact waveDerivativeBox_mem 3 16 +def QBox16 : RI := ⟨16503765891916526381294399381982413449008627397805423597738437,16503765891916526381294399381982413449008636343834010337843369⟩ +lemma QBox16_calc : jetBox2_16.re.divNat 2 = QBox16 := by decide +kernel +lemma QBox16_mem : QBox16.Mem (Q 16) := by + rw [← QBox16_calc] + exact RI.mem_divNat jetBox2_16_mem.1 (by norm_num) +def DBox16 : RI := ⟨344448687689171438118652015972695976450937488262806548151181,344448687689171438118652015972695976450937822451757900078321⟩ +lemma DBox16_calc : jetBox3_16.re.mul ((RI.point 6).mul QBox16).inv = DBox16 := by decide +kernel +lemma DBox16_mem : DBox16.Mem (D 16) := by + rw [← DBox16_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_16_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox16_mem + · left; decide +kernel +lemma Q_16_bounds : (157/1000:ℝ) < Q 16 ∧ Q 16 < 40 := by + have hh := QBox16_mem + norm_num [RI.Mem, QBox16, scale] at hh + constructor <;> linarith +lemma D_16_bound : |D 16| < (283/100:ℝ) := by + have hh := DBox16_mem + norm_num [RI.Mem, DBox16, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_19 : CI := ⟨⟨41594368450902491745324397900324124587329585672093445575455224,41594368450902491745324397900324124587329604441070992504609025⟩,⟨-9384489826205149675,9384489757909251186⟩⟩ +lemma jetBox2_19_calc : waveDerivativeBox 2 19 = jetBox2_19 := by decide +kernel +lemma jetBox2_19_mem : jetBox2_19.Mem (waveDerivative 2 ((19:ℤ):ℂ)) := by + rw [← jetBox2_19_calc] + exact waveDerivativeBox_mem 2 19 +def jetBox3_19 : CI := ⟨⟨-32819491150273111802401255112050382324380964413390713987725980,-32819491150273111802401255112050382324380949162298530836575429⟩,⟨-7625546992712991152,7625547046600646651⟩⟩ +lemma jetBox3_19_calc : waveDerivativeBox 3 19 = jetBox3_19 := by decide +kernel +lemma jetBox3_19_mem : jetBox3_19.Mem (waveDerivative 3 ((19:ℤ):ℂ)) := by + rw [← jetBox3_19_calc] + exact waveDerivativeBox_mem 3 19 +def QBox19 : RI := ⟨20797184225451245872662198950162062293664792836046722787727612,20797184225451245872662198950162062293664802220535496252304513⟩ +lemma QBox19_calc : jetBox2_19.re.divNat 2 = QBox19 := by decide +kernel +lemma QBox19_mem : QBox19.Mem (Q 19) := by + rw [← QBox19_calc] + exact RI.mem_divNat jetBox2_19_mem.1 (by norm_num) +def DBox19 : RI := ⟨-263012296877102942861247435249124951652992134611952558172030,-263012296877102942861247435249124951652991893709886672401469⟩ +lemma DBox19_calc : jetBox3_19.re.mul ((RI.point 6).mul QBox19).inv = DBox19 := by decide +kernel +lemma DBox19_mem : DBox19.Mem (D 19) := by + rw [← DBox19_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_19_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox19_mem + · left; decide +kernel +lemma Q_19_bounds : (157/1000:ℝ) < Q 19 ∧ Q 19 < 40 := by + have hh := QBox19_mem + norm_num [RI.Mem, QBox19, scale] at hh + constructor <;> linarith +lemma D_19_bound : |D 19| < (283/100:ℝ) := by + have hh := DBox19_mem + norm_num [RI.Mem, DBox19, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_21 : CI := ⟨⟨61095935955908527462583701513256198706710585210988786004672484,61095935955908527462583701513256198706710602625619514804300734⟩,⟨-8707279582232183985,8707279467511139628⟩⟩ +lemma jetBox2_21_calc : waveDerivativeBox 2 21 = jetBox2_21 := by decide +kernel +lemma jetBox2_21_mem : jetBox2_21.Mem (waveDerivative 2 ((21:ℤ):ℂ)) := by + rw [← jetBox2_21_calc] + exact waveDerivativeBox_mem 2 21 +def jetBox3_21 : CI := ⟨⟨123010196371355150466223626398302605139058856838234045349168451,123010196371355150466223626398302605139058871109540066707038290⟩,⟨-7135672310732575004,7135672161010809294⟩⟩ +lemma jetBox3_21_calc : waveDerivativeBox 3 21 = jetBox3_21 := by decide +kernel +lemma jetBox3_21_mem : jetBox3_21.Mem (waveDerivative 3 ((21:ℤ):ℂ)) := by + rw [← jetBox3_21_calc] + exact waveDerivativeBox_mem 3 21 +def QBox21 : RI := ⟨30547967977954263731291850756628099353355292605494393002336242,30547967977954263731291850756628099353355301312809757402150368⟩ +lemma QBox21_calc : jetBox2_21.re.divNat 2 = QBox21 := by decide +kernel +lemma QBox21_mem : QBox21.Mem (Q 21) := by + rw [← QBox21_calc] + exact RI.mem_divNat jetBox2_21_mem.1 (by norm_num) +def DBox21 : RI := ⟨671131363304473916173614466728511275356539559902564587441891,671131363304473916173614466728511275356539829062969650231253⟩ +lemma DBox21_calc : jetBox3_21.re.mul ((RI.point 6).mul QBox21).inv = DBox21 := by decide +kernel +lemma DBox21_mem : DBox21.Mem (D 21) := by + rw [← DBox21_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_21_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox21_mem + · left; decide +kernel +lemma Q_21_bounds : (157/1000:ℝ) < Q 21 ∧ Q 21 < 40 := by + have hh := QBox21_mem + norm_num [RI.Mem, QBox21, scale] at hh + constructor <;> linarith +lemma D_21_bound : |D 21| < (283/100:ℝ) := by + have hh := DBox21_mem + norm_num [RI.Mem, DBox21, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_25 : CI := ⟨⟨29914105240374937967757202440552063373006499439127337250121405,29914105240374937967757202440552063373006517331048559738158075⟩,⟨-8946107202121091217,8946107153004074020⟩⟩ +lemma jetBox2_25_calc : waveDerivativeBox 2 25 = jetBox2_25 := by decide +kernel +lemma jetBox2_25_mem : jetBox2_25.Mem (waveDerivative 2 ((25:ℤ):ℂ)) := by + rw [← jetBox2_25_calc] + exact waveDerivativeBox_mem 2 25 +def jetBox3_25 : CI := ⟨⟨-99387107842092179114509517405599866691407272393792300141857654,-99387107842092179114509517405599866691407257790123109234565532⟩,⟨-7301729678326190191,7301729841514152467⟩⟩ +lemma jetBox3_25_calc : waveDerivativeBox 3 25 = jetBox3_25 := by decide +kernel +lemma jetBox3_25_mem : jetBox3_25.Mem (waveDerivative 3 ((25:ℤ):ℂ)) := by + rw [← jetBox3_25_calc] + exact waveDerivativeBox_mem 3 25 +def QBox25 : RI := ⟨14957052620187468983878601220276031686503249719563668625060702,14957052620187468983878601220276031686503258665524279869079038⟩ +lemma QBox25_calc : jetBox2_25.re.divNat 2 = QBox25 := by decide +kernel +lemma QBox25_mem : QBox25.Mem (Q 25) := by + rw [← QBox25_calc] + exact RI.mem_divNat jetBox2_25_mem.1 (by norm_num) +def DBox25 : RI := ⟨-1107472066476851987530274715096997578953247529853022359790164,-1107472066476851987530274715096997578953246704734152800617070⟩ +lemma DBox25_calc : jetBox3_25.re.mul ((RI.point 6).mul QBox25).inv = DBox25 := by decide +kernel +lemma DBox25_mem : DBox25.Mem (D 25) := by + rw [← DBox25_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_25_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox25_mem + · left; decide +kernel +lemma Q_25_bounds : (157/1000:ℝ) < Q 25 ∧ Q 25 < 40 := by + have hh := QBox25_mem + norm_num [RI.Mem, QBox25, scale] at hh + constructor <;> linarith +lemma D_25_bound : |D 25| < (283/100:ℝ) := by + have hh := DBox25_mem + norm_num [RI.Mem, DBox25, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_27 : CI := ⟨⟨4386490844928603830593107111056067171250526070358973263547709,4386490844928603830593107111056067171250540069410367680668482⟩,⟨-6999139762929185781,6999139749324914605⟩⟩ +lemma jetBox2_27_calc : waveDerivativeBox 2 27 = jetBox2_27 := by decide +kernel +lemma jetBox2_27_mem : jetBox2_27.Mem (waveDerivative 2 ((27:ℤ):ℂ)) := by + rw [← jetBox2_27_calc] + exact waveDerivativeBox_mem 2 27 +def jetBox3_27 : CI := ⟨⟨-16787949048389301427671797526078439439904456398564410022812338,-16787949048389301427671797526078439439904444920688716886719179⟩,⟨-5739196842056526685,5739196896717213949⟩⟩ +lemma jetBox3_27_calc : waveDerivativeBox 3 27 = jetBox3_27 := by decide +kernel +lemma jetBox3_27_mem : jetBox3_27.Mem (waveDerivative 3 ((27:ℤ):ℂ)) := by + rw [← jetBox3_27_calc] + exact waveDerivativeBox_mem 3 27 +def QBox27 : RI := ⟨2193245422464301915296553555528033585625263035179486631773854,2193245422464301915296553555528033585625270034705183840334242⟩ +lemma QBox27_calc : jetBox2_27.re.divNat 2 = QBox27 := by decide +kernel +lemma QBox27_mem : QBox27.Mem (Q 27) := by + rw [← QBox27_calc] + exact RI.mem_divNat jetBox2_27_mem.1 (by norm_num) +def DBox27 : RI := ⟨-1275731151382546533038307219275896519451230915638914889554237,-1275731151382546533038307219275896519451225972055242963562159⟩ +lemma DBox27_calc : jetBox3_27.re.mul ((RI.point 6).mul QBox27).inv = DBox27 := by decide +kernel +lemma DBox27_mem : DBox27.Mem (D 27) := by + rw [← DBox27_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_27_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox27_mem + · left; decide +kernel +lemma Q_27_bounds : (157/1000:ℝ) < Q 27 ∧ Q 27 < 40 := by + have hh := QBox27_mem + norm_num [RI.Mem, QBox27, scale] at hh + constructor <;> linarith +lemma D_27_bound : |D 27| < (283/100:ℝ) := by + have hh := DBox27_mem + norm_num [RI.Mem, DBox27, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_28 : CI := ⟨⟨5990694890363355634538045467393864501436794539821908259433758,5990694890363355634538045467393864501436813308861036652393856⟩,⟨-9384458612011244997,9384458614328773767⟩⟩ +lemma jetBox2_28_calc : waveDerivativeBox 2 28 = jetBox2_28 := by decide +kernel +lemma jetBox2_28_mem : jetBox2_28.Mem (waveDerivative 2 ((28:ℤ):ℂ)) := by + rw [← jetBox2_28_calc] + exact waveDerivativeBox_mem 2 28 +def jetBox3_28 : CI := ⟨⟨34676688316299093943689918788527788220814664076904630179661918,34676688316299093943689918788527788220814679327997751505498025⟩,⟨-7625545977313401335,7625545909352621894⟩⟩ +lemma jetBox3_28_calc : waveDerivativeBox 3 28 = jetBox3_28 := by decide +kernel +lemma jetBox3_28_mem : jetBox3_28.Mem (waveDerivative 3 ((28:ℤ):ℂ)) := by + rw [← jetBox3_28_calc] + exact waveDerivativeBox_mem 3 28 +def QBox28 : RI := ⟨2995347445181677817269022733696932250718397269910954129716879,2995347445181677817269022733696932250718406654430518326196929⟩ +lemma QBox28_calc : jetBox2_28.re.divNat 2 = QBox28 := by decide +kernel +lemma QBox28_mem : QBox28.Mem (Q 28) := by + rw [← QBox28_calc] + exact RI.mem_divNat jetBox2_28_mem.1 (by norm_num) +def DBox28 : RI := ⟨1929475013662721470471780971509795544141096774500119863158648,1929475013662721470471780971509795544141103668206190962350573⟩ +lemma DBox28_calc : jetBox3_28.re.mul ((RI.point 6).mul QBox28).inv = DBox28 := by decide +kernel +lemma DBox28_mem : DBox28.Mem (D 28) := by + rw [← DBox28_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_28_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox28_mem + · left; decide +kernel +lemma Q_28_bounds : (157/1000:ℝ) < Q 28 ∧ Q 28 < 40 := by + have hh := QBox28_mem + norm_num [RI.Mem, QBox28, scale] at hh + constructor <;> linarith +lemma D_28_bound : |D 28| < (283/100:ℝ) := by + have hh := DBox28_mem + norm_num [RI.Mem, DBox28, scale] at hh + rw [abs_lt] + constructor <;> linarith +def jetBox2_31 : CI := ⟨⟨79759068799952036170234820045985819951626970713036857794209793,79759068799952036170234820045985819951626988758625018626937983⟩,⟨-9022795974534550414,9022795843574071670⟩⟩ +lemma jetBox2_31_calc : waveDerivativeBox 2 31 = jetBox2_31 := by decide +kernel +lemma jetBox2_31_mem : jetBox2_31.Mem (waveDerivative 2 ((31:ℤ):ℂ)) := by + rw [← jetBox2_31_calc] + exact waveDerivativeBox_mem 2 31 +def jetBox3_31 : CI := ⟨⟨116885195181612596304217324890480874759503762697504943840671500,116885195181612596304217324890480874759503777451846306500043617⟩,⟨-7377192398215642046,7377192206297317323⟩⟩ +lemma jetBox3_31_calc : waveDerivativeBox 3 31 = jetBox3_31 := by decide +kernel +lemma jetBox3_31_mem : jetBox3_31.Mem (waveDerivative 3 ((31:ℤ):ℂ)) := by + rw [← jetBox3_31_calc] + exact waveDerivativeBox_mem 3 31 +def QBox31 : RI := ⟨39879534399976018085117410022992909975813485356518428897104896,39879534399976018085117410022992909975813494379312509313468992⟩ +lemma QBox31_calc : jetBox2_31.re.divNat 2 = QBox31 := by decide +kernel +lemma QBox31_mem : QBox31.Mem (Q 31) := by + rw [← QBox31_calc] + exact RI.mem_divNat jetBox2_31_mem.1 (by norm_num) +def DBox31 : RI := ⟨488492811079906047675729539809841112101533963618228618120530,488492811079906047675729539809841112101534135802458981613029⟩ +lemma DBox31_calc : jetBox3_31.re.mul ((RI.point 6).mul QBox31).inv = DBox31 := by decide +kernel +lemma DBox31_mem : DBox31.Mem (D 31) := by + rw [← DBox31_calc] + unfold D + rw [div_eq_mul_inv] + apply RI.mem_mul jetBox3_31_mem.1 + apply RI.mem_inv + · simpa only [Int.cast_ofNat] using RI.mem_mul (RI.mem_point 6) QBox31_mem + · left; decide +kernel +lemma Q_31_bounds : (157/1000:ℝ) < Q 31 ∧ Q 31 < 40 := by + have hh := QBox31_mem + norm_num [RI.Mem, QBox31, scale] at hh + constructor <;> linarith +lemma D_31_bound : |D 31| < (283/100:ℝ) := by + have hh := DBox31_mem + norm_num [RI.Mem, DBox31, scale] at hh + rw [abs_lt] + constructor <;> linarith +end AtomicTriangular.FiniteCertificate + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Polynomial Complex + +def restPolynomial (a : Fin 15) : Polynomial ℂ := + ∏ r ∈ Finset.univ.erase a, atomFactor r + +lemma atomPolynomial_factor (a : Fin 15) : + atomPolynomial = atomFactor a * restPolynomial a := by + exact (Finset.mul_prod_erase _ _ (Finset.mem_univ a)).symm + +lemma restPolynomial_degree (a : Fin 15) : (restPolynomial a).natDegree ≤ 28 := by + unfold restPolynomial + apply le_trans (Polynomial.natDegree_prod_le _ _) + calc + ∑ r ∈ Finset.univ.erase a, (atomFactor r).natDegree ≤ + ∑ r ∈ Finset.univ.erase a, 2 := Finset.sum_le_sum (fun r _ => atomFactor_degree r) + _ = 28 := by simp + +lemma restPolynomial_coeff (a : Fin 15) (n : ℕ) : + (restPolynomial a).coeff n = phase (-(residue a:ℂ)) * + (-(atomPolynomial.coeff n) + + (if n=0 then 0 else 2*(restPolynomial a).coeff (n-1)) - + (if n<2 then 0 else phase (-(residue a:ℂ))*(restPolynomial a).coeff (n-2))) := by + have hh := coeff_atom_mul a (restPolynomial a) n + rw [← atomPolynomial_factor] at hh + have he : -(atomPolynomial.coeff n) + + (if n=0 then 0 else 2*(restPolynomial a).coeff (n-1)) - + (if n<2 then 0 else phase (-(residue a:ℂ))*(restPolynomial a).coeff (n-2)) = + phase (residue a)*(restPolynomial a).coeff n := by + linear_combination -hh + rw [he, ← mul_assoc, phase_neg_mul, one_mul] + +def recoverRest (e : CI) (v : Fin 31 → CI) (j : Fin 31) : CI := + e.conj.mul (((coeffBox15 j).neg.add + (if h : j.val=0 then CI.point 0 else (CI.point 2).mul (v ⟨j.val-1,by omega⟩))).sub + (if h : j.val<2 then CI.point 0 else e.conj.mul (v ⟨j.val-2,by omega⟩))) + +lemma recoverRest_mem (a : Fin 15) (e : CI) (he : e.Mem (phase (residue a))) + (v : Fin 31 → CI) (hv : ∀ j, recoverRest e v j = v j) : + ∀ j : Fin 31, (v j).Mem ((restPolynomial a).coeff j.val) := by + have he' : e.conj.Mem (phase (-(residue a:ℂ))) := by + simpa only [← Complex.ofReal_intCast, phase_conj] using CI.mem_conj he + suffices hs : ∀ n (hn : n<31), (v ⟨n,hn⟩).Mem ((restPolynomial a).coeff n) from + fun j => hs j.val j.isLt + intro n + induction n using Nat.strong_induction_on with + | h n ih => + intro hn + rw [← hv, restPolynomial_coeff] + simp only [recoverRest] + apply CI.mem_mul he' + apply CI.mem_sub + · apply CI.mem_add (CI.mem_neg (atomPolynomial_coeff_mem ⟨n,hn⟩)) + split_ifs with hz + · simpa using CI.mem_point 0 + · exact CI.mem_mul (by simpa using CI.mem_point 2) (ih (n-1) (by omega) (by omega)) + · split_ifs with hz + · simpa using CI.mem_point 0 + · exact CI.mem_mul he' (ih (n-2) (by omega) (by omega)) + +lemma cCoefficient_eq (a : Fin 15) (j : Fin 31) : + cCoefficient a j = if j.val=0 then 0 + else 4*(kappa:ℂ)^2*(restPolynomial a).coeff (j.val-1) := by + simp only [cCoefficient, cShiftPolynomial, coeff_X_mul', cAtomPolynomial, coeff_C_mul, + restPolynomial] + +lemma dCoefficient_eq (a : Fin 15) (j : Fin 31) : + dCoefficient a j = I*(kappa:ℂ) * + (phase (residue a)*(restPolynomial a).coeff j.val - + (if j.val<2 then 0 else phase (-(residue a:ℂ))*(restPolynomial a).coeff (j.val-2))) := by + change (C (I*(kappa:ℂ)) * + (C (phase (residue a)) - C (phase (-(residue a:ℂ))) * X^2) * restPolynomial a).coeff j.val = _ + rw [mul_assoc, coeff_C_mul, sub_mul, coeff_sub, coeff_C_mul] + rw [show C (phase (-(residue a:ℂ))) * X^2 * restPolynomial a = + C (phase (-(residue a:ℂ))) * (X^2 * restPolynomial a) from mul_assoc _ _ _, + coeff_C_mul, coeff_X_sq_mul] + split_ifs <;> ring + +lemma cShift_degree (a : Fin 15) : (cShiftPolynomial a).natDegree ≤ 30 := by + have hr := restPolynomial_degree a + change (X * (C (4*(kappa:ℂ)^2) * restPolynomial a)).natDegree ≤ 30 + calc + _ ≤ X.natDegree + (C (4*(kappa:ℂ)^2) * restPolynomial a).natDegree := natDegree_mul_le + _ ≤ 1 + 28 := add_le_add (by simp) ((natDegree_C_mul_le _ _).trans hr) + _ ≤ 30 := by norm_num + +lemma dAtom_degree (a : Fin 15) : (dAtomPolynomial a).natDegree ≤ 30 := by + have hr := restPolynomial_degree a + have hf : (C (I*(kappa:ℂ)) * + (C (phase (residue a)) - C (phase (-(residue a:ℂ))) * X^2)).natDegree ≤ 2 := by + compute_degree! + exact (natDegree_mul_le).trans (add_le_add hf hr) + +lemma polynomial_fourier {p : Polynomial ℂ} (hp : p.natDegree ≤ 30) (s : ℂ) : + phase (-s)^15 * p.eval (phase s) = + ∑ j : Fin 31, p.coeff j.val * exp (I*Real.pi*frequency j*s) := by + rw [Polynomial.eval_eq_sum_range' (n:=31) (by omega)] + rw [← Fin.sum_univ_eq_sum_range, Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + rw [mul_left_comm, phase_offset] + +lemma finiteC_fourier (a : Fin 15) (s : ℂ) : finiteC a s = + ∑ j : Fin 31, cCoefficient a j * exp (I*Real.pi*frequency j*s) := by + change finiteC a s = ∑ j : Fin 31, (cShiftPolynomial a).coeff j.val * _ + rw [← polynomial_fourier (cShift_degree a) s, finiteC_spectral] + simp only [cShiftPolynomial, eval_mul, eval_X] + have hp := phase_neg_mul s + have he : phase (-s)^15 * phase s = phase (-s)^14 := by + nth_rw 1 [show 15=14+1 by norm_num] + rw [pow_succ, mul_assoc, hp, mul_one] + rw [← mul_assoc, he] + +lemma finiteD_fourier (a : Fin 15) (s : ℂ) : finiteD a s = + ∑ j : Fin 31, dCoefficient a j * exp (I*Real.pi*frequency j*s) := by + rw [finiteD_spectral, polynomial_fourier (dAtom_degree a)] + rfl + +end AtomicTriangular.FiniteCertificate + +noncomputable section +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Polynomial Complex +def kappaBox : CI := (CI.ofReal piBox).divNat 36 +lemma kappaBox_mem : kappaBox.Mem (kappa:ℂ) := by + have hh := CI.mem_divNat (CI.mem_ofReal piBox_mem) (by norm_num : 0 < (36:ℕ)) + simpa only [kappaBox, kappa, Complex.ofReal_div, Complex.ofReal_ofNat, Nat.cast_ofNat] using hh + +def cCoeffBox (r : Fin 31 → CI) (j : Fin 31) : CI := if h : j.val=0 then CI.point 0 + else ((CI.point 4).mul (kappaBox.pow 2)).mul (r ⟨j.val-1,by omega⟩) +def dCoeffBox (e : CI) (r : Fin 31 → CI) (j : Fin 31) : CI := + (CI.imag.mul kappaBox).mul ((e.mul (r j)).sub + (if h : j.val<2 then CI.point 0 else e.conj.mul (r ⟨j.val-2,by omega⟩))) +lemma cCoeffBox_mem (a : Fin 15) (r : Fin 31 → CI) + (hr : ∀ j, (r j).Mem ((restPolynomial a).coeff j.val)) (j : Fin 31) : + (cCoeffBox r j).Mem (cCoefficient a j) := by + rw [cCoefficient_eq] + unfold cCoeffBox + split_ifs + · simpa using CI.mem_point 0 + · exact CI.mem_mul (CI.mem_mul (by simpa using CI.mem_point 4) + (CI.mem_pow kappaBox_mem 2)) (hr ⟨j.val-1,by omega⟩) +lemma dCoeffBox_mem (a : Fin 15) (e : CI) (r : Fin 31 → CI) + (he : e.Mem (phase (residue a))) + (hr : ∀ j, (r j).Mem ((restPolynomial a).coeff j.val)) (j : Fin 31) : + (dCoeffBox e r j).Mem (dCoefficient a j) := by + rw [dCoefficient_eq] + apply CI.mem_mul (CI.mem_mul CI.mem_imag kappaBox_mem) + apply CI.mem_sub (CI.mem_mul he (hr j)) + split_ifs + · simpa using CI.mem_point 0 + · have hh : e.conj.Mem (phase (-(residue a:ℂ))) := by + simpa only [← Complex.ofReal_intCast, phase_conj] using CI.mem_conj he + exact CI.mem_mul hh (hr ⟨j.val-2,by omega⟩) + +def restBox0 : Fin 31 → CI := + ![⟨⟨999999999999999999999999999999999999999999999999642331779778,1000000000000000000000000000000000000000000000000357668253727⟩,⟨-367531361878,347828033985⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999992982970197314,1000000000000000000000000000000000000000000000007063921851615⟩,⟨1732050807568877293527446341505872366942805253803333648896291,1732050807568877293527446341505872366942805253817415385745401⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999923182686159625,500000000000000000000000000000000000000000000076872224208513⟩,⟨2598076211353315940291169512258808550414207880638744075685320,2598076211353315940291169512258808550414207880792427896026995⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000587101988334324,-999999999999999999999999999999999999999999999412828637490517⟩,⟨5196152422706631880582339024517617100828415760844039059449004,5196152422706631880582339024517617100828415762018323477021277⟩⟩, + ⟨⟨-5500000000000000000000000000000000000000000003460008478208951,-5499999999999999999999999999999999999999999996539968993616806⟩,⟨6062177826491070527346062195270553284299818384876390237331482,6062177826491070527346062195270553284299818391796448173329230⟩⟩, + ⟨⟨-10000000000000000000000000000000000000000000016631539293146282,-9999999999999999999999999999999999999999999983368575406173535⟩,⟨3464101615137754587054892683011744733885610490989512400841171,3464101615137754587054892683011744733885610524252228293562296⟩⟩, + ⟨⟨-13000000000000000000000000000000000000000000067768982855906211,-12999999999999999999999999999999999999999999932231272438955558⟩,⟨-67769335207532302,67769491579293604⟩⟩, + ⟨⟨-16000000000000000000000000000000000000000000241202362792978139,-15999999999999999999999999999999999999999999758798008972289255⟩,⟨-6928203230275509174109785366023489467771221256442197813599752,-6928203230275509174109785366023489467771220774040804444497265⟩⟩, + ⟨⟨-13000000000000000000000000000000000000000000768939463892261018,-12999999999999999999999999999999999999999999231060972867132730⟩,⟨-15588457268119895641747017073552851302485248053235240060457571,-15588457268119895641747017073552851302485246515351785611031292⟩⟩, + ⟨⟨-8000000000000000000000000000000000000000002245456385896058125,-7999999999999999999999999999999999999999997754543952881386488⟩,⟨-20784609690826527522329356098070468403313665291174152072840091,-20784609690826527522329356098070468403313660800275395708941011⟩⟩, + ⟨⟨-500000000000000000000000000000000000000006130717013473303007,-499999999999999999999999999999999999999993869283133738238960⟩,⟨-26846787517317598049675418293341021687613487564803638613340178,-26846787517317598049675418293341021687613475303318731233611979⟩⟩, + ⟨⟨11999999999999999999999999999999999999999984057309959618823401,12000000000000000000000000000000000000000015942690163464975944⟩,⟨-27712812921102036696439141464093957871084900003595033537420736,-27712812921102036696439141464093957871084868118337796112859897⟩⟩, + ⟨⟨22499999999999999999999999999999999999999959880689231711308789,22500000000000000000000000000000000000000040119311205706631342⟩,⟨-21650635094610966169093079268823404586785105792031882954323541,-21650635094610966169093079268823404586785025553228206093476247⟩⟩, + ⟨⟨29999999999999999999999999999999999999999901066244847825825182,30000000000000000000000000000000000000000098933755828324829291⟩,⟨-13856406460551018348219570732046978935542540964125648372283912,-13856406460551018348219570732046978935542343096840762947977614⟩⟩, + ⟨⟨35999999999999999999999999999999999999999758783933778131632961,36000000000000000000000000000000000000000241216066963434043284⟩,⟨-241216188127543871524,241216188127541669674⟩⟩, + ⟨⟨29999999999999999999999999999999999999999415228731267933748950,30000000000000000000000000000000000000000584771269408217485908⟩,⟨13856406460551018348219570732046978935541857259355317386371844,13856406460551018348219570732046978935543026801611093929498328⟩⟩, + ⟨⟨22499999999999999999999999999999999999998586012150859255187147,22500000000000000000000000000000000000001413987849578163861796⟩,⟨21650635094610966169093079268823404586783651684684735382922772,21650635094610966169093079268823404586786479660575353660494629⟩⟩, + ⟨⟨11999999999999999999999999999999999999996584500588855566793024,12000000000000000000000000000000000000003415499411267518569849⟩,⟨27712812921102036696439141464093957871081468561737758540525872,27712812921102036696439141464093957871088299560195071105343819⟩⟩, + ⟨⟨-500000000000000000000000000000000000008247089885691885689567,-499999999999999999999999999999999999991752910114455323931101⟩,⟨26846787517317598049675418293341021687605234344256412310832072,26846787517317598049675418293341021687621728523865957531610427⟩⟩, + ⟨⟨-8000000000000000000000000000000000000019911114982621922296694,-7999999999999999999999999999999999999980088885017716852954532⟩,⟨20784609690826527522329356098070468403293751931192234918390348,20784609690826527522329356098070468403333574160257312858664175⟩⟩, + ⟨⟨-13000000000000000000000000000000000000048070190716007858449148,-12999999999999999999999999999999999999951929809284428898538590⟩,⟨15588457268119895641747017073552851302437177094521687391851447,15588457268119895641747017073552851302533317474065338274559381⟩⟩, + ⟨⟨-16000000000000000000000000000000000000116051962789771012354335,-15999999999999999999999999999999999999883948037210600750341085⟩,⟨6928203230275509174109785366023489467655169054800079160886362,6928203230275509174109785366023489467887272975682923091642345⟩⟩, + ⟨⟨-13000000000000000000000000000000000000280174335061129077922570,-12999999999999999999999999999999999999719825664939126214215966⟩,⟨-280174329425673229770431,280174329425516851814346⟩⟩, + ⟨⟨-10000000000000000000000000000000000000676400721944635163804716,-9999999999999999999999999999999999999323599278055479532626145⟩,⟨-3464101615137754587054892683011744734562011215943999619962773,-3464101615137754587054892683011744733209209799297741081369692⟩⟩, + ⟨⟨-5500000000000000000000000000000000001632975809996022673151214,-5499999999999999999999999999999999998367024190003954795593198⟩,⟨-6062177826491070527346062195270553285932794165454946617824734,-6062177826491070527346062195270553282666842611217891800587026⟩⟩, + ⟨⟨-1000000000000000000000000000000000003942352351060922093163614,-999999999999999999999999999999999996057647648939008529350687⟩,⟨-5196152422706631880582339024517617104770768033115528465955416,-5196152422706631880582339024517617096886063489746834079159789⟩⟩, + ⟨⟨499999999999999999999999999999999990482319485673173024120090,500000000000000000000000000000000009517680514326881889813103⟩,⟨-2598076211353315940291169512258808559931888203411715734148915,-2598076211353315940291169512258808540896527558019456247154963⟩⟩, + ⟨⟨999999999999999999999999999999999977022286619858945830353743,1000000000000000000000000000000000022977713380141101065523405⟩,⟨-1732050807568877293527446341505872389920518171313404031467961,-1732050807568877293527446341505872343965092336307345013765616⟩⟩, + ⟨⟨999999999999999999999999999999999944526892725328578876355744,1000000000000000000000000000000000055473107274671421127771328⟩,⟨-55473106157764586717542480,55473106157764606409220663⟩⟩, + ⟨⟨-133923927929490250314752322,133923927929490250319107136⟩,⟨-133923925233038553459603387,133923925233038553446834853⟩⟩, + ⟨⟨-323320963133652284734076177,323320963133652284738688141⟩,⟨-323320956623842066465073387,323320956623842066451117969⟩⟩] +lemma restBox0_calc (j : Fin 31) : recoverRest phaseBox0 restBox0 j = restBox0 j := by + revert j + decide +kernel +lemma restBox0_mem (j : Fin 31) : (restBox0 j).Mem ((restPolynomial ⟨0,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨0,by norm_num⟩ phaseBox0 + · have hr : residue ⟨0,by norm_num⟩ = (0:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox0_mem + · exact restBox0_calc +def cBox0 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651966740766375,30461741978670859934674354937889355355906479651988725086961⟩,⟨-11195645515,10595447836⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651763885012090,30461741978670859934674354937889355355906479652193009253703⟩,⟨52761284794111633070194360652541195326313997272545860379138,52761284794111633070194360652541195326313997272975150502454⟩⟩, + ⟨⟨15230870989335429967337177468944677677953239823648828787981,15230870989335429967337177468944677677953239828330576803617⟩,⟨79141927191167449605291540978811792989470995906800505278779,79141927191167449605291540978811792989470995911482485993522⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906479669861979172758,-30461741978670859934674354937889355355906479634091373421386⟩,⟨158283854382334899210583081957623585978941991800397396158541,158283854382334899210583081957623585978941991836169152762599⟩⟩, + ⟨⟨-167539580882689729640708952158391454457485638191275949896232,-167539580882689729640708952158391454457485637980478426044136⟩,⟨184664496779390715745680262283894183642098990349265973467019,184664496779390715745680262283894183642098990560064168401675⟩⟩, + ⟨⟨-304617419786708599346743549378893553559064797026403957544993,-304617419786708599346743549378893553559064796013154194919287⟩,⟨105522569588223266140388721305082390652627994038904235867635,105522569588223266140388721305082390652627995052145176679232⟩⟩, + ⟨⟨-396002645722721179150766614192561619626784237540073058469299,-396002645722721179150766614192561619626784233411355774337017⟩,⟨-2064372003158035,2064376766514151⟩⟩, + ⟨⟨-487387871658733758954789679006229685694503681779089418267878,-487387871658733758954789679006229685694503667084209359986761⟩,⟨-211045139176446532280777442610164781305255996438436174227140,-211045139176446532280777442610164781305255981743648055710895⟩⟩, + ⟨⟨-396002645722721179150766614192561619626784258898947334859268,-396002645722721179150766614192561619626784212052487025672644⟩,⟨-474851563147004697631749245872870757936825998878154882865656,-474851563147004697631749245872870757936825952031542877160927⟩⟩, + ⟨⟨-243693935829366879477394839503114842847251905616335690635717,-243693935829366879477394839503114842847251768815318355933710⟩,⟨-633135417529339596842332327830494343915768035673436184600418,-633135417529339596842332327830494343915767898872832985243856⟩⟩, + ⟨⟨-15230870989335429967337177468944677677953426578308723615810,-15230870989335429967337177468944677677953053073673493630087⟩,⟨-817799914308730312588012590114388527557867144480896772022716,-817799914308730312588012590114388527557866770974702041778144⟩⟩, + ⟨⟨365540903744050319216092259254672264270877270181621175543864,365540903744050319216092259254672264270878241465848164031142⟩,⟨-844180556705786129123109770440659125221024442004423090698659,-844180556705786129123109770440659125221023470723938826503224⟩⟩, + ⟨⟨685389194520094348530172986102510495507894570065403823455342,685389194520094348530172986102510495507897014273607482734414⟩,⟨-659516059926395413377429508156764941578926188016386617556272,-659516059926395413377429508156764941578923743802648137184295⟩⟩, + ⟨⟨913852259360125798040230648136680660677191375864806652373917,913852259360125798040230648136680660677197403253877919922476⟩,⟨-422090278352893064561554885220329562610514991873180869451196,-422090278352893064561554885220329562610508964490999982384792⟩⟩, + ⟨⟨1096622711232150957648276777764016792812625919609624534145246,1096622711232150957648276777764016792812640615332794825920420⟩,⟨-7347865283819770646,7347865283819703935⟩⟩, + ⟨⟨913852259360125798040230648136680660677176576407824422701341,913852259360125798040230648136680660677212202710860149612455⟩,⟨422090278352893064561554885220329562610494165034874773428189,422090278352893064561554885220329562610529791329306078274633⟩⟩, + ⟨⟨685389194520094348530172986102510495507852719636475308031328,685389194520094348530172986102510495507938864702535998191770⟩,⟨659516059926395413377429508156764941578881893373564320049679,659516059926395413377429508156764941578968038445470434557845⟩⟩, + ⟨⟨365540903744050319216092259254672264270773713761941047576948,365540903744050319216092259254672264270981797885528292045131⟩,⟨844180556705786129123109770440659125220919914307946594403482,844180556705786129123109770440659125221127998420415322664279⟩⟩, + ⟨⟨-15230870989335429967337177468944677678204460550161767322786,-15230870989335429967337177468944677677702019101820449865123⟩,⟨817799914308730312588012590114388527557615737006088893400812,817799914308730312588012590114388527558118178449509920262666⟩⟩, + ⟨⟨-243693935829366879477394839503114842847858364462930915631641,-243693935829366879477394839503114842846645309968723130871386⟩,⟨633135417529339596842332327830494343915161440039734603754723,633135417529339596842332327830494343916374494506534565945411⟩⟩, + ⟨⟨-396002645722721179150766614192561619628248537222168319379171,-396002645722721179150766614192561619625319933729266041079761⟩,⟨474851563147004697631749245872870757935361673737152278783225,474851563147004697631749245872870757938290277172545481088411⟩⟩, + ⟨⟨-487387871658733758954789679006229685698038819378265594470704,-487387871658733758954789679006229685690968529485033183705727⟩,⟨211045139176446532280777442610164781301720844215955929603010,211045139176446532280777442610164781308791133966128300165084⟩⟩, + ⟨⟨-396002645722721179150766614192561619635318833779389579120861,-396002645722721179150766614192561619618249637172039253602500⟩,⟨-8534598132011988586676,8534598132007225041597⟩⟩, + ⟨⟨-304617419786708599346743549378893553579669140785842467794314,-304617419786708599346743549378893553538460452253715684581895⟩,⟨-105522569588223266140388721305082390673232338396654413253765,-105522569588223266140388721305082390632023650694394999504372⟩⟩, + ⟨⟨-167539580882689729640708952158391454507228925867387958309946,-167539580882689729640708952158391454407742350304366417536438⟩,⟨-184664496779390715745680262283894183691842277234669775125708,-184664496779390715745680262283894183592355703674660366979207⟩⟩, + ⟨⟨-30461741978670859934674354937889355475997399759002079490308,-30461741978670859934674354937889355235815559544951273002888⟩,⟨-158283854382334899210583081957623586099032909507359284279546,-158283854382334899210583081957623585858851074129207264904953⟩⟩, + ⟨⟨15230870989335429967337177468944677388028111763141651750909,15230870989335429967337177468944677967878367888837753949337⟩,⟨-79141927191167449605291540978811793279396118134584059643984,-79141927191167449605291540978811792699545873683698931920482⟩⟩, + ⟨⟨30461741978670859934674354937889354655965303406267787305561,30461741978670859934674354937889356055847655897689107076882⟩,⟨-52761284794111633070194360652541196026255159425710385465258,-52761284794111633070194360652541194626372835119810625738959⟩⟩, + ⟨⟨30461741978670859934674354937889353666098999095807345841914,30461741978670859934674354937889357045713960208148120136120⟩,⟨-1689807446533242486228767,1689807446533243086071598⟩⟩, + ⟨⟨-4079556137358243979696731,4079556137358243979829386⟩,⟨-4079556055219628132145969,4079556055219628131757017⟩⟩] +lemma cBox0_calc (j : Fin 31) : cCoeffBox restBox0 j = cBox0 j := by + revert j + decide +kernel +lemma cBox0_mem (j : Fin 31) : (cBox0 j).Mem (cCoefficient ⟨0,by norm_num⟩ j) := by + rw [← cBox0_calc] + exact cCoeffBox_mem ⟨0,by norm_num⟩ restBox0 restBox0_mem j +def dBox0 : Fin 31 → CI := + ![⟨⟨-30353728110,32073167388⟩,⟨87266462599716478846184538424430635672143594427054898665117,87266462599716478846184538424430635672143594427117601337988⟩⟩, + ⟨⟨-151149947019518154216173188136846311023672187341675814129132,-151149947019518154216173188136846311023672187340446469610477⟩,⟨87266462599716478846184538424430635672143594426473759726270,87266462599716478846184538424430635672143594427702832376369⟩⟩, + ⟨⟨-226724920529277231324259782205269466535508281018331981224134,-226724920529277231324259782205269466535508281004857389245287⟩,⟨-43633231299858239423092269212215317836071797220277982157179,-43633231299858239423092269212215317836071797206803476013412⟩⟩, + ⟨⟨-302299894039036308432346376273692622047344374733980056895279,-302299894039036308432346376273692622047344374630274583972932⟩,⟨-174532925199432957692369076848861271344287188906023535010153,-174532925199432957692369076848861271344287188802319503057679⟩⟩, + ⟨⟨-302299894039036308432346376273692622047344374990780321669751,-302299894039036308432346376273692622047344374373478938831407⟩,⟨-523598775598298873077107230546583814032861566871169400957225,-523598775598298873077107230546583814032861566253868424927244⟩⟩, + ⟨⟨151149947019518154216173188136846311023672185838457751561125,151149947019518154216173188136846311023672188843653432536882⟩,⟨-785398163397448309615660845819875721049292351346393469562707,-785398163397448309615660845819875721049292348341175093885552⟩⟩, + ⟨⟨529024814568313539756606158478962088582852649477774322823855,529024814568313539756606158478962088582852661909658942706383⟩,⟨-654498469497873591346384038183229767541076964419051991037620,-654498469497873591346384038183229767541076951987266003600019⟩⟩, + ⟨⟨906899682117108925297039128821077866142033101546284908714656,906899682117108925297039128821077866142033146546470500797662⟩,⟨-523598775598298873077107230546583814032861589062760897475544,-523598775598298873077107230546583814032861544062296535759882⟩⟩, + ⟨⟨1360349523175663387945558693231616799213049613052745882550075,1360349523175663387945558693231616799213049759086393132190771⟩,⟨-73016564096571369,73016548260810557⟩⟩, + ⟨⟨1209199576156145233729385505094770488189377281727355593179296,1209199576156145233729385505094770488189377715729670956614124⟩,⟨698131700797731830769476307395445085377148538414808640509039,698131700797731830769476307395445085377148972418574238235405⟩⟩, + ⟨⟨982474655626868002405125722889501021653868615605885079972972,982474655626868002405125722889501021653869819827951255202748⟩,⟨1090830782496455985577306730305382945901794328230000570111444,1090830782496455985577306730305382945901795532447180947726563⟩⟩, + ⟨⟨604599788078072616864692752547385244094687162155027795458020,604599788078072616864692752547385244094690336573486274137310⟩,⟨1745329251994329576923690768488612713442870301326551918860897,1745329251994329576923690768488612713442873475756938386161364⟩⟩, + ⟨⟨-453449841058554462648519564410538933071020598109672717748782,-453449841058554462648519564410538933071012525936697073941848⟩,⟨2007128639793479013462244383761904620459298635746673748806726,2007128639793479013462244383761904620459306707899344769765927⟩⟩, + ⟨⟨-1209199576156145233729385505094770488189387523574321826698668,-1209199576156145233729385505094770488189367473882693623361613⟩,⟨1570796326794896619231321691639751442098574674826531273931836,1570796326794896619231321691639751442098594724548621990278003⟩⟩, + ⟨⟨-1889374337743976927702164851710578887795926892925038698284974,-1889374337743976927702164851710578887795877790601553213756724⟩,⟨1178097245096172464423491268729813581573913973622470238953377,1178097245096172464423491268729813581573963075908885052955751⟩⟩, + ⟨⟨-2418399152312290467458771010189540976378814661953788024188019,-2418399152312290467458771010189540976378695332960241652105071⟩,⟨-59664518955038107737,59664518955038158357⟩⟩, + ⟨⟨-1889374337743976927702164851710578887796046785572904411810588,-1889374337743976927702164851710578887795757897953687500232942⟩,⟨-1178097245096172464423491268729813581574082968556305860041990,-1178097245096172464423491268729813581573794080975049431770421⟩⟩, + ⟨⟨-1209199576156145233729385505094770488189726588171967799833196,-1209199576156145233729385505094770488189028409285047650225339⟩,⟨-1570796326794896619231321691639751442098933789159288190768408,-1570796326794896619231321691639751442098235610215865073355663⟩⟩, + ⟨⟨-453449841058554462648519564410538933071859650103336079928956,-453449841058554462648519564410538933070173473943033711750521⟩,⟨-2007128639793479013462244383761904620460145759901844842228617,-2007128639793479013462244383761904620458459583744173676273143⟩⟩, + ⟨⟨604599788078072616864692752547385244092653118296886694919197,604599788078072616864692752547385244096724380431627374703718⟩,⟨-1745329251994329576923690768488612713444907519664310139155635,-1745329251994329576923690768488612713440836257419180165811646⟩⟩, + ⟨⟨982474655626868002405125722889501021648954607945027633057576,982474655626868002405125722889501021658783827488808702167770⟩,⟨-1090830782496455985577306730305382945906709540199912984058611,-1090830782496455985577306730305382945896880320477268533737075⟩⟩, + ⟨⟨1209199576156145233729385505094770488177512482131353740590625,1209199576156145233729385505094770488201242515325672809276267⟩,⟨-698131700797731830769476307395445085389013772258028418632780,-698131700797731830769476307395445085365283738575354460078598⟩⟩, + ⟨⟨1360349523175663387945558693231616799184404948011463729859736,1360349523175663387945558693231616799241694424127675284978565⟩,⟨-28644738632254078130981,28644738632269913919509⟩⟩, + ⟨⟨906899682117108925297039128821077866072878582865589039799025,906899682117108925297039128821077866211187665227166369832023⟩,⟨523598775598298873077107230546583813963707023988129138467709,523598775598298873077107230546583814102016109136928294795399⟩⟩, + ⟨⟨529024814568313539756606158478962088415898813473339532266821,529024814568313539756606158478962088749806497914093733399211⟩,⟨654498469497873591346384038183229767374123112621896022025412,654498469497873591346384038183229767708030803784421972643490⟩⟩, + ⟨⟨151149947019518154216173188136846310620609953153903873170292,151149947019518154216173188136846311426734421528207311077439⟩,⟨785398163397448309615660845819875720646230107541019991284768,785398163397448309615660845819875721452354592146548572200284⟩⟩, + ⟨⟨-302299894039036308432346376273692623020422688178906309793345,-302299894039036308432346376273692621074266061185352950547209⟩,⟨523598775598298873077107230546583813059783233473702718086202,523598775598298873077107230546583815005939899651335107840473⟩⟩, + ⟨⟨-302299894039036308432346376273692624396563236696277526961234,-302299894039036308432346376273692619698125512667977113737076⟩,⟨174532925199432957692369076848861268995068279540319661357124,174532925199432957692369076848861273693506098168023376755879⟩⟩, + ⟨⟨-226724920529277231324259782205269472207024318734880386270074,-226724920529277231324259782205269460863992243288308984019743⟩,⟨43633231299858239423092269212215312164555645298812217286590,43633231299858239423092269212215323507587949128269240930116⟩⟩, + ⟨⟨-151149947019518154216173188136846324715923124839546668173443,-151149947019518154216173188136846297331421249842575615376216⟩,⟨-87266462599716478846184538424430649364394807608160799538944,-87266462599716478846184538424430621979892381246015792517745⟩⟩, + ⟨⟨-33056017912725732836921781,33056017912725734556562273⟩,⟨-87266462599716478846184538424430668728162172709437663280394,-87266462599716478846184538424430602616125016144734836677472⟩⟩] +lemma dBox0_calc (j : Fin 31) : dCoeffBox phaseBox0 restBox0 j = dBox0 j := by + revert j + decide +kernel +lemma dBox0_mem (j : Fin 31) : (dBox0 j).Mem (dCoefficient ⟨0,by norm_num⟩ j) := by + rw [← dBox0_calc] + apply dCoeffBox_mem ⟨0,by norm_num⟩ phaseBox0 restBox0 + · have hr : residue ⟨0,by norm_num⟩ = (0:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox0_mem + · exact restBox0_mem +def restBox1 : Fin 31 → CI := + ![⟨⟨984807753012208059366743024589523013670643251719426322748378,984807753012208059366743024589523013670643251720255109258911⟩,⟨-173648177666930348851716626769314796000375677184493677676862,-173648177666930348851716626769314796000375677183664410956623⟩⟩, + ⟨⟨1195344954920479302020019325284943778346249533492338608247804,1195344954920479302020019325284943778346249533508914786050570⟩,⟨1195344954920479302020019325284943778346249533492310266667859,1195344954920479302020019325284943778346249533508887631620981⟩⟩, + ⟨⟨1260695890999055218561659595274285933505145287681579916751251,1260695890999055218561659595274285933505145287865687984080234⟩,⟨1673186568929854202264579447802675380746740549706926998707437,1673186568929854202264579447802675380746740549891031258577320⟩⟩, + ⟨⟨848048599586618604316586071746314186345498178414123771722695,848048599586618604316586071746314186345498179850884222238540⟩,⟨4022659583452580810172358095205882342427056962576472052285654,4022659583452580810172358095205882342427056964013242889300646⟩⟩, + ⟨⟨-1944736177650392684649858824638805095031312027148787396791589,-1944736177650392684649858824638805095031312018455026112470990⟩,⟨5302678289647511163687600994724989038497643171096649544162527,5302678289647511163687600994724989038497643179790425724667813⟩⟩, + ⟨⟨-4763052238228233069358536264446930351891114282284258425762440,-4763052238228233069358536264446930351891114239073243867824078⟩,⟨4218149218596521816155176253340347579159344840095733687330492,4218149218596521816155176253340347579159344883306538950797868⟩⟩, + ⟨⟨-6575774351329494088867824310925138753973559383598216316714926,-6575774351329494088867824310925138753973559199884138905984306⟩,⟨3200955386427089527797902528550531989217245763841336778956815,3200955386427089527797902528550531989217245947556378422075712⟩⟩, + ⟨⟨-9408488879558106265608053330141915187880848776142571838725428,-9408488879558106265608053330141915187880848086222206980060741⟩,⟨-415903802171449818665693088196866634357132904572967116237202,-415903802171449818665693088196866634357132214655183515840017⟩⟩, + ⟨⟨-7983052994534488614659010571533693637444122720786134118112324,-7983052994534488614659010571533693637444120368890703010561404⟩,⟨-5556224252817590106615339307859771982121934118568383840045422,-5556224252817590106615339307859771982121931766668581257762942⟩⟩, + ⟨⟨-6098715906229370868735544076173868274732371156550539708277738,-6098715906229370868735544076173868274732363700980993266842479⟩,⟨-7934033442590758774230660593512715466092010894763346608338458,-7934033442590758774230660593512715466092003439205150053507597⟩⟩, + ⟨⟨-3053994058500630795791247119733610295119461556417234324124356,-3053994058500630795791247119733610295119439108500307803267626⟩,⟨-12305144463075410749779676595309481179566829691481880364760645,-12305144463075410749779676595309481179566807243520941842133041⟩⟩, + ⟨⟨3982132875870569530526401085239845821366295448966369119199826,3982132875870569530526401085239845821366360790932650923001220⟩,⟨-13557123038515227382545171608645942668048159385092107501328466,-13557123038515227382545171608645942668048094043233330384299749⟩⟩, + ⟨⟨9446808552295449412636903832767264422570750831644394817245444,9446808552295449412636903832767264422570937221782036910825751⟩,⟨-10396529412979611231410237052261207791904090717636058724408615,-10396529412979611231410237052261207791903904327338377600203026⟩⟩, + ⟨⟨13237076327392490421449572266123032620913883908027651693501459,13237076327392490421449572266123032620914409824889955918108320⟩,⟨-7429827988160338734983041586749502851392052497035808510027594,-7429827988160338734983041586749502851391526580363038941181523⟩⟩, + ⟨⟨17745799303907691677584378593137503638707098032293656768015324,17745799303907691677584378593137503638708574156582527174478881⟩,⟨-738062251635092861237,738062251635091840550⟩⟩, + ⟨⟨13237076327392490421449572266123032620912080001069634253500715,13237076327392490421449572266123032620916213731847973357881976⟩,⟨7429827988160338734983041586749502851389722673418684968871736,7429827988160338734983041586749502851393856403980162480316979⟩⟩, + ⟨⟨9446808552295449412636903832767264422565061046531169243218308,9446808552295449412636903832767264422576627006895262484346846⟩,⟨10396529412979611231410237052261207791898214542202254853308314,10396529412979611231410237052261207791909780502772181469326800⟩⟩, + ⟨⟨3982132875870569530526401085239845821350152501043359954514962,3982132875870569530526401085239845821382503738855660086826211⟩,⟨13557123038515227382545171608645942668031951095350169151242578,13557123038515227382545171608645942668064302332975268732461830⟩⟩, + ⟨⟨-3053994058500630795791247119733610295164691128175953986877415,-3053994058500630795791247119733610295074209536741588141834584⟩,⟨12305144463075410749779676595309481179521577671715617638636988,12305144463075410749779676595309481179612059263287204566394812⟩⟩, + ⟨⟨-6098715906229370868735544076173868274858896034667515723755317,-6098715906229370868735544076173868274605838822864017253250038⟩,⟨7934033442590758774230660593512715465965478561118496927483580,7934033442590758774230660593512715466218535772849999732559313⟩⟩, + ⟨⟨-7983052994534488614659010571533693637797992240682225758159486,-7983052994534488614659010571533693637090250848994611373054665⟩,⟨5556224252817590106615339307859771981768062246758154949509073,5556224252817590106615339307859771982475803638478810146573406⟩⟩, + ⟨⟨-9408488879558106265608053330141915188870540121864238767395041,-9408488879558106265608053330141915186891156740500540054671591⟩,⟨415903802171449818665693088196866633367440868937481310550790,415903802171449818665693088196866635346824250290669319926886⟩⟩, + ⟨⟨-6575774351329494088867824310925138756741489564360236901829819,-6575774351329494088867824310925138751205629019122118324941461⟩,⟨-3200955386427089527797902528550531991985176128324223642129180,-3200955386427089527797902528550531986449315583073491560296002⟩⟩, + ⟨⟨-4763052238228233069358536264446930359632351028440338476183952,-4763052238228233069358536264446930344149877492917163822274990⟩,⟨-4218149218596521816155176253340347586900581629467493071841212,-4218149218596521816155176253340347571418108093934779567343377⟩⟩, + ⟨⟨-1944736177650392684649858824638805116681693528756458954339307,-1944736177650392684649858824638805073380930516847354560567652⟩,⟨-5302678289647511163687600994724989060148024681410623112210727,-5302678289647511163687600994724989016847261669476452157179967⟩⟩, + ⟨⟨848048599586618604316586071746314125794576777889114745193125,848048599586618604316586071746314246896419580375893242424634⟩,⟨-4022659583452580810172358095205882402977978364561597425017742,-4022659583452580810172358095205882281876135562028117516459588⟩⟩, + ⟨⟨1260695890999055218561659595274285764158749182812238169301522,1260695890999055218561659595274286102851541392735029724587214⟩,⟨-1673186568929854202264579447802675550093136654806504069743438,-1673186568929854202264579447802675211400344444791454186578045⟩⟩, + ⟨⟨1195344954920479302020019325284943304725019501722534900703777,1195344954920479302020019325284944251967479565278718486177353⟩,⟨-1195344954920479302020019325284944251967479565368899570334461,-1195344954920479302020019325284943304725019501632298325967892⟩⟩, + ⟨⟨984807753012208059366743024589521689065722827411097463066609,984807753012208059366743024589524338275563676028583961206545⟩,⟨173648177666930348851716626769313471395455252698639129054574,173648177666930348851716626769316120605296101669518962733457⟩⟩, + ⟨⟨-3704602082754043222517421888,3704602082754043222509558652⟩,⟨-3704602082754389236791793120,3704602082754389236796230833⟩⟩, + ⟨⟨-10360882992303317198793262409,10360882992303317198785487232⟩,⟨-10360882992303994807389477089,10360882992303994807395273014⟩⟩] +lemma restBox1_calc (j : Fin 31) : recoverRest phaseBox1 restBox1 j = restBox1 j := by + revert j + decide +kernel +lemma restBox1_mem (j : Fin 31) : (restBox1 j).Mem ((restPolynomial ⟨1,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨1,by norm_num⟩ phaseBox1 + · have hr : residue ⟨1,by norm_num⟩ = (1:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox1_mem + · exact restBox1_calc +def cBox1 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨29998959670852502253334400260293903887583974252636250420687,29998959670852502253334400260293903887583974252661687680853⟩,⟨-5289625983156427915144478140897837194877087266739372873631,-5289625983156427915144478140897837194877087266714078289949⟩⟩, + ⟨⟨36412289592293591044594635370036879032997090597570579815332,36412289592293591044594635370036879032997090598075750874416⟩,⟨36412289592293591044594635370036879032997090597569716481448,36412289592293591044594635370036879032997090598074923703201⟩⟩, + ⟨⟨38402992945183783072679524751971870167446745480084862608775,38402992945183783072679524751971870167446745485693359533024⟩,⟨50968177544918804122872932493175650349786646604338390837379,50968177544918804122872932493175650349786646609946851772242⟩⟩, + ⟨⟨25833037625980735214305679088241204643242916042487596882031,25833037625980735214305679088241204643242916086253987469083⟩,⟨122537218299160116183036736211972226603476706118328900023201,122537218299160116183036736211972226603476706162096222639055⟩⟩, + ⟨⟨-59240051660172877835280117946062529857582891401905659235794,-59240051660172877835280117946062529857582891137078169034699⟩,⟨161528817855142188049118274010326962840075429476452896709668,161528817855142188049118274010326962840075429741281491865022⟩⟩, + ⟨⟨-145090868311839164547035042169459007435786558940932784430327,-145090868311839164547035042169459007435786557624649084652554⟩,⟨128492173124419354161201274990896540545587163684794076080978,128492173124419354161201274990896540545587165001071294714001⟩⟩, + ⟨⟨-200309541600160793748134069426613698940469498888235470632013,-200309541600160793748134069426613698940469493291983371486502⟩,⟨97506677066578677226719567201531313276360803273568181323512,97506677066578677226719567201531313276360808869848998203869⟩⟩, + ⟨⟨-286598960658293129956382401874164573017518273096364630117975,-286598960658293129956382401874164573017518252080186665417088⟩,⟨-12669154309694873691924785757906602296744271317032127469626,-12669154309694873691924785757906602296744250300934536283404⟩⟩, + ⟨⟨-243177700521565346812336769081884319932887644337835195409863,-243177700521565346812336769081884319932887572695001864079290⟩,⟨-169252269564962717566763251966816636863469610616029977255517,-169252269564962717566763251966816636863469538973063953813524⟩⟩, + ⟨⟨-185777510336774922443142335881866333568546523226014003364454,-185777510336774922443142335881866333568546296116376992932794⟩,⟨-241684479578345394784854522305757340442852915620391299861896,-241684479578345394784854522305757340442852688511099670832640⟩⟩, + ⟨⟨-93029979014440055106215379400418445592445819575023903969084,-93029979014440055106215379400418445592445135772369937405145⟩,⟨-374836135644473539026813299217339788680138391086965768541989,-374836135644473539026813299217339788680137707282969325702396⟩⟩, + ⟨⟨121302704189551844563774955811481578009262117237016166795833,121302704189551844563774955811481578009264107667134194351766⟩,⟨-412973583972345143427081836236749430808142395989435198796855,-412973583972345143427081836236749430808140405562590094436365⟩⟩, + ⟨⟨287766244641925184999571079890553431412716506825232030628449,287766244641925184999571079890553431412722184593514085007126⟩,⟨-316696396451847336548801001834400465401944646120432080077270,-316696396451847336548801001834400465401938968347274773866101⟩⟩, + ⟨⟨403224403637002120913307323409929281316674460903887621134964,403224403637002120913307323409929281316690481247651931602566⟩,⟨-226325503121247451356911273837859885637148418488787751569604,-226325503121247451356911273837859885637132398150798123055203⟩⟩, + ⟨⟨540567959600913056773917034395921519750579614255447896976580,540567959600913056773917034395921519750624579572667357670754⟩,⟨-22482661873505043743,22482661873505012830⟩⟩, + ⟨⟨403224403637002120913307323409929281316619510755578964830259,403224403637002120913307323409929281316745431395960587900205⟩,⟨226325503121247451356911273837859885637077448002905679778041,226325503121247451356911273837859885637203368636680194785487⟩⟩, + ⟨⟨287766244641925184999571079890553431412543186059198870628151,287766244641925184999571079890553431412895505359547244991802⟩,⟨316696396451847336548801001834400465401765647580544126094068,316696396451847336548801001834400465402117966887162727789285⟩⟩, + ⟨⟨121302704189551844563774955811481578008770374922610340954749,121302704189551844563774955811481578009755849981540020166385⟩,⟨412973583972345143427081836236749430807648663249398106007083,412973583972345143427081836236749430808634138302627187167615⟩⟩, + ⟨⟨-93029979014440055106215379400418445593823591119743800715182,-93029979014440055106215379400418445591067364227650040699505⟩,⟨374836135644473539026813299217339788678759935736829773461244,374836135644473539026813299217339788681516162633105320726365⟩⟩, + ⟨⟨-185777510336774922443142335881866333572400691417096105721093,-185777510336774922443142335881866333564692127925294890633737⟩,⟨241684479578345394784854522305757340438998520320941256510601,241684479578345394784854522305757340446707083810549714128887⟩⟩, + ⟨⟨-243177700521565346812336769081884319943667126347026073202678,-243177700521565346812336769081884319922108090685810986363972⟩,⟨169252269564962717566763251966816636852690056963436417056422,169252269564962717566763251966816636874249092625657513959887⟩⟩, + ⟨⟨-286598960658293129956382401874164573047665995508261586574708,-286598960658293129956382401874164572987370529668289709060293⟩,⟨12669154309694873691924785757906602266596527889158352207212,12669154309694873691924785757906602326891993728808311496905⟩⟩, + ⟨⟨-200309541600160793748134069426613699024785473869583934577925,-200309541600160793748134069426613698856153518310634907664567⟩,⟨-97506677066578677226719567201531313360676783851374890676496,-97506677066578677226719567201531313192044828292042288893437⟩⟩, + ⟨⟨-145090868311839164547035042169459007671598115298144863819963,-145090868311839164547035042169459007199975001267437005411255⟩,⟨-128492173124419354161201274990896540781398721358431846785394,-128492173124419354161201274990896540309775607327433524041853⟩⟩, + ⟨⟨-59240051660172877835280117946062530517091226443667115926973,-59240051660172877835280117946062529198074556095316712515351⟩,⟨-161528817855142188049118274010326963499583764783424507157654,-161528817855142188049118274010326962180567094434309881434143⟩⟩, + ⟨⟨25833037625980735214305679088241202798756371768915191004578,25833037625980735214305679088241206487729460359826393153383⟩,⟨-122537218299160116183036736211972228447963250436379773393770,-122537218299160116183036736211972224758990161844045349265148⟩⟩, + ⟨⟨38402992945183783072679524751971865008860522315763032667024,38402992945183783072679524751971875326032968650015189263320⟩,⟨-50968177544918804122872932493175655508372869775673914274126,-50968177544918804122872932493175645191200423438611328306125⟩⟩, + ⟨⟨36412289592293591044594635370036864605669385749080569144928,36412289592293591044594635370036893460324795446565761318901⟩,⟨-36412289592293591044594635370036893460324795449312834235839,-36412289592293591044594635370036864605669385746331805888273⟩⟩, + ⟨⟨29998959670852502253334400260293863537810664609509287195509,29998959670852502253334400260293944237357283895788650670433⟩,⟨5289625983156427915144478140897796845103777618204634242553,5289625983156427915144478140897877544650396915248817017140⟩⟩, + ⟨⟨-112848632778500337391816203,112848632778500337391576675⟩,⟨-112848632778510877589363037,112848632778510877589498217⟩⟩] +lemma cBox1_calc (j : Fin 31) : cCoeffBox restBox1 j = cBox1 j := by + revert j + decide +kernel +lemma cBox1_mem (j : Fin 31) : (cBox1 j).Mem (cCoefficient ⟨1,by norm_num⟩ j) := by + rw [← cBox1_calc] + exact cCoeffBox_mem ⟨1,by norm_num⟩ restBox1 restBox1_mem j +def dBox1 : Fin 31 → CI := + ![⟨⟨-41078466350,42797905629⟩,⟨87266462599716478846184538424430635672143594427044206261316,87266462599716478846184538424430635672143594427128293741945⟩⟩, + ⟨⟨-120842622615757954989806784943385483777488657250454979128321,-120842622615757954989806784943385483777488657248778666141097⟩,⟨84614915292584877405267514585930721146779762463498237790715,84614915292584877405267514585930721146779762465174351426722⟩⟩, + ⟨⟨-192745854186654778030905517416873603034825852314726806916004,-192745854186654778030905517416873603034825852296030283027681⟩,⟨986518410711267646848346420326177536587103883604397555515,986518410711267646848346420326177536587103902300530521149⟩⟩, + ⟨⟨-273946262714078519363244623147248542328670506579953565591203,-273946262714078519363244623147248542328670506433027431786528⟩,⟨-108918766188261799001159249611462746692647109646154963228352,-108918766188261799001159249611462746692647109499230046101670⟩⟩, + ⟨⟨-301555303566433744803763851245664044375061566772028019182001,-301555303566433744803763851245664044375061565874523449424623⟩,⟨-381186939982665997204627535420101085550660212905292066306987,-381186939982665997204627535420101085550660212007787876125167⟩⟩, + ⟨⟨42526128733004569348934294027425715933541879674810855849377,42526128733004569348934294027425715933541884188432084780242⟩,⟨-607100304604663942637492387094525792213327545684508254174286,-607100304604663942637492387094525792213327541170871042109718⟩⟩, + ⟨⟨309740452620390924462611119479835563004846063978111780002448,309740452620390924462611119479835563004846083429543008790431⟩,⟨-526855803397671773616560872029050303896874041140956332842642,-526855803397671773616560872029050303896874021689593723235379⟩⟩, + ⟨⟨613004456196778685761592063819536537409760968296400831934949,613004456196778685761592063819536537409761042411604799453125⟩,⟨-456849968060734038620080407949651178552847648407384900168365,-456849968060734038620080407949651178552847574291984278979346⟩⟩, + ⟨⟨973217603076608428958465219050453071392107198673660857745283,973217603076608428958465219050453071392107455009921322021447⟩,⟨-85251547340354678018038376846560435026242137270708542305871,-85251547340354678018038376846560435026241880934828837067870⟩⟩, + ⟨⟨881104183903313356849043297310709158045419908512806056780455,881104183903313356849043297310709158045420731974629801378128⟩,⟨410976297997245055461030110569485862966928351105015857957293,410976297997245055461030110569485862966929174567823962094835⟩⟩, + ⟨⟨747258535260107629183722599194757550390940690958699024136991,747258535260107629183722599194757550390943198083799088383764⟩,⟨694271868802801645833572922671994030574529998126355690101929,694271868802801645833572922671994030574532505248030938150679⟩⟩, + ⟨⟨515326178143969869791379336022821403248060878803180267901860,515326178143969869791379336022821403248068238212617869365945⟩,⟨1192024815138059185542968415968115033644867714728197058047435,1192024815138059185542968415968115033644875074146050635023917⟩⟩, + ⟨⟨-260902243696474705934731452710099736859428924177386095909747,-260902243696474705934731452710099736859407811812226546746985⟩,⟨1418341086086638108125565285911980755702865535116597169396061,1418341086086638108125565285911980755702886647467316647842496⟩⟩, + ⟨⟨-787518037653591518317529097894762201208413534789144057194991,-787518037653591518317529097894762201208353761887031850160319⟩,⟨1113405382887101827566158704131505197060832890956619645866471,1113405382887101827566158704131505197060892663879759573895379⟩⟩, + ⟨⟨-1305552494241480659616681533352383178504853387043380855649583,-1305552494241480659616681533352383178504685316193973235773930⟩,⟨870766477547492771885223515006479966583789104583413672925025,870766477547492771885223515006479966583957175406313822248496⟩⟩, + ⟨⟨-1678229438519403166598170136390244418672365853545498562219756,-1678229438519403166598170136390244418671894789525608488010864⟩,⟨-235532024325923238987,235532024325923250068⟩⟩, + ⟨⟨-1305552494241480659616681533352383178505428592179541918609272,-1305552494241480659616681533352383178504110111057812172812126⟩,⟨-870766477547492771885223515006479966584532380540854062464459,-870766477547492771885223515006479966583213899448873432691696⟩⟩, + ⟨⟨-787518037653591518317529097894762201210227860433890504189687,-787518037653591518317529097894762201206539436242285403157428⟩,⟨-1113405382887101827566158704131505197062706989528293933847309,-1113405382887101827566158704131505197059018565308085285909172⟩⟩, + ⟨⟨-260902243696474705934731452710099736864576583527203446692233,-260902243696474705934731452710099736854260152462409195946649⟩,⟨-1418341086086638108125565285911980755708034306812214179050904,-1418341086086638108125565285911980755697717875771699638199446⟩⟩, + ⟨⟨515326178143969869791379336022821403233637967505998365720918,515326178143969869791379336022821403262491149509799771578144⟩,⟨-1192024815138059185542968415968115033659297985448199721059600,-1192024815138059185542968415968115033630444803426047972043374⟩⟩, + ⟨⟨747258535260107629183722599194757550350594027238850253126245,747258535260107629183722599194757550431289861803647859441337⟩,⟨-694271868802801645833572922671994030614879168963566003786739,-694271868802801645833572922671994030534183334410820624516366⟩⟩, + ⟨⟨881104183903313356849043297310709157932576753625880065166559,881104183903313356849043297310709158158263886861555793052812⟩,⟨-410976297997245055461030110569485863079772329457177071877569,-410976297997245055461030110569485862854085196215662748242890⟩⟩, + ⟨⟨973217603076608428958465219050453071076510883519779787642753,973217603076608428958465219050453071707703770163802392195541⟩,⟨85251547340354678018038376846560434710645565782374784141937,85251547340354678018038376846560435341838452423162595147454⟩⟩, + ⟨⟨613004456196778685761592063819536536527113457927827404204261,613004456196778685761592063819536538292408552780178227260656⟩,⟨456849968060734038620080407949651177670200063923475221344020,456849968060734038620080407949651179435495158775893957707135⟩⟩, + ⟨⟨309740452620390924462611119479835560536292688316990889954393,309740452620390924462611119479835565473399459090663898914184⟩,⟨526855803397671773616560872029050301428320646029771808223524,526855803397671773616560872029050306365427416800778247748973⟩⟩, + ⟨⟨42526128733004569348934294027425709029590463334956857750034,42526128733004569348934294027425722837493300528286082949395⟩,⟨607100304604663942637492387094525785309376124833014624433556,607100304604663942637492387094525799117278962022364671738379⟩⟩, + ⟨⟨-301555303566433744803763851245664063683756870268597624130420,-301555303566433744803763851245664025066366262377953844416414⟩,⟨381186939982665997204627535420101066241964908515370418651668,381186939982665997204627535420101104859355516397709523662793⟩⟩, + ⟨⟨-273946262714078519363244623147248596330457556985196009238792,-273946262714078519363244623147248488326883456027784988091771⟩,⟨108918766188261799001159249611462692690860059102025734585244,108918766188261799001159249611462800694434160043359274620738⟩⟩, + ⟨⟨-192745854186654778030905517416873754064864843597441218223498,-192745854186654778030905517416873452004786861013315871686098⟩,⟨-986518410711267646848346420326328566626095169241646039328,-986518410711267646848346420326026506548112616663282167753⟩⟩, + ⟨⟨-120842622615757954989806784943385906172263414945360694022736,-120842622615757954989806784943385061382713899553872951225784⟩,⟨-84614915292584877405267514585931143541554520129201171465061,-84614915292584877405267514585930298752005004799471417888058⟩⟩, + ⟨⟨-1181336818385429267109384281,1181336818385429268828831583⟩,⟨-87266462599716478846184538424431817008961979795880611680030,-87266462599716478846184538424429454335325209058291888462391⟩⟩] +lemma dBox1_calc (j : Fin 31) : dCoeffBox phaseBox1 restBox1 j = dBox1 j := by + revert j + decide +kernel +lemma dBox1_mem (j : Fin 31) : (dBox1 j).Mem (dCoefficient ⟨1,by norm_num⟩ j) := by + rw [← dBox1_calc] + apply dCoeffBox_mem ⟨1,by norm_num⟩ phaseBox1 restBox1 + · have hr : residue ⟨1,by norm_num⟩ = (1:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox1_mem + · exact restBox1_mem +def restBox3 : Fin 31 → CI := + ![⟨⟨866025403784438646763723170752936183471402626904696439157358,866025403784438646763723170752936183471402626905674474092415⟩,⟨-500000000000000000000000000000000000000000000000497877387218,-499999999999999999999999999999999999999999999999518949217189⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999990032334660266,1000000000000000000000000000000000000000000000009988141106391⟩,⟨267949192431122706472553658494127633057194746179631476965235,267949192431122706472553658494127633057194746199588207926258⟩⟩, + ⟨⟨1133974596215561353236276829247063816528597372981397206321753,1133974596215561353236276829247063816528597373208241485492006⟩,⟨-35898384862245412945107316988255266114389492492661997556718,-35898384862245412945107316988255266114389492265819068737019⟩⟩, + ⟨⟨1196152422706631880582339024517617100828415760520179621310291,1196152422706631880582339024517617100828415762342148446289059⟩,⟨1535898384862245412945107316988255266114389491468253488335434,1535898384862245412945107316988255266114389493290228165632572⟩⟩, + ⟨⟨-392304845413263761164678049035234201656831528580188162952852,-392304845413263761164678049035234201656831517144335800862852⟩,⟨2464101615137754587054892683011744733885610501902858717675095,2464101615137754587054892683011744733885610513338715959914096⟩⟩, + ⟨⟨-1875644347017858945307875609458893431400363253112890436202470,-1875644347017858945307875609458893431400363193541783305682768⟩,⟨1928203230275509174109785366023489467771220985456061655573675,1928203230275509174109785366023489467771221045027066345002388⟩⟩, + ⟨⟨-2392304845413263761164678049035234201656831657317550418219571,-2392304845413263761164678049035234201656831388407061557885431⟩,⟨2143593539448981651780429267953021064457557835061488558695953,2143593539448981651780429267953021064457558103972488017567796⟩⟩, + ⟨⟨-4464101615137754587054892683011744733885611052160262693703487,-4464101615137754587054892683011744733885609963081345194346195⟩,⟨516660498395404815856802439576340770256467754996242299553555,516660498395404815856802439576340770256468844073711844003905⟩⟩, + ⟨⟨-3545517328095665711489259755694212514043352126249729979388515,-3545517328095665711489259755694212514043348051353169326499372⟩,⟨-2284609690826527522329356098070468403313665083174140388423850,-2284609690826527522329356098070468403313661008274997516838680⟩⟩, + ⟨⟨-3176914536239791283494034147105702604970501788199945362052149,-3176914536239791283494034147105702604970487348973862413441285⟩,⟨-2535898384862245412945107316988255266114396711989388436125008,-2535898384862245412945107316988255266114382272769165799092074⟩⟩, + ⟨⟨-2555136271329086010033412194400169761972335401144076186132026,-2555136271329086010033412194400169761972285969303049969420724⟩,⟨-5143593539448981651780429267953021064457582685448988505361385,-5143593539448981651780429267953021064457533253585038050608633⟩⟩, + ⟨⟨1143593539448981651780429267953021064457475011089632556900541,1143593539448981651780429267953021064457640927944272339310034⟩,⟨-5837168574084177751131265854635064439684603796035472241239438,-5837168574084177751131265854635064439684437879242193846326432⟩⟩, + ⟨⟨3607695154586736238835321950964765798342892836846901801248656,3607695154586736238835321950964765798343444117428616244260981⟩,⟨-3894882233484699542396180486870807927258560056510560540211167,-3894882233484699542396180486870807927258008775832844105313877⟩⟩, + ⟨⟨5105117766515300457603819513129192072740803958203947216915473,5105117766515300457603819513129192072742627209452957368956193⟩,⟨-3444863728670913989966587805599830238028600940346665729648940,-3444863728670913989966587805599830238026777689206358010553516⟩⟩, + ⟨⟨8698729810778067661813841462353190826426859284086074641111060,8698729810778067661813841462353190826432878025395055616403830⟩,⟨-3009370715122378170851,3009370715122378495923⟩⟩, + ⟨⟨5105117766515300457603819513129192072731788062013407879663170,5105117766515300457603819513129192072751643105643496706222636⟩,⟨3444863728670913989966587805599830238017761793023632097392830,3444863728670913989966587805599830238037616836529391643525586⟩⟩, + ⟨⟨3607695154586736238835321950964765798310426009706186379014139,3607695154586736238835321950964765798375910944569331666626908⟩,⟨3894882233484699542396180486870807927225541948683527116023814,3894882233484699542396180486870807927291026883659877530364827⟩⟩, + ⟨⟨1143593539448981651780429267953021064349575117231453697541806,1143593539448981651780429267953021064565540821802451199068785⟩,⟨5837168574084177751131265854635064439576537985405609909566213,5837168574084177751131265854635064439792503689872056178969612⟩⟩, + ⟨⟨-2555136271329086010033412194400169762328426473158101463041166,-2555136271329086010033412194400169761616194897289024691740326⟩,⟨5143593539448981651780429267953021064101442181544235270038084,5143593539448981651780429267953021064813673757489791286840515⟩⟩, + ⟨⟨-3176914536239791283494034147105702606144921701418758301426843,-3176914536239791283494034147105702603796067435755049472944327⟩,⟨2535898384862245412945107316988255264939962359565111042708557,2535898384862245412945107316988255267288816625193443193098860⟩⟩, + ⟨⟨-3545517328095665711489259755694212517916466982117947490387426,-3545517328095665711489259755694212510170233195484951814216117⟩,⟨2284609690826527522329356098070468399440546152402459046733516,2284609690826527522329356098070468407186779939046678858560786⟩⟩, + ⟨⟨-4464101615137754587054892683011744746658674145638760331068782,-4464101615137754587054892683011744721112546869602847555869603⟩,⟨-516660498395404815856802439576340783029531937550894564913098,-516660498395404815856802439576340757483404661519059579278562⟩⟩, + ⟨⟨-2392304845413263761164678049035234243780825163838415819255315,-2392304845413263761164678049035234159532837881886196156287694⟩,⟨-2143593539448981651780429267953021106581551610494144376561270,-2143593539448981651780429267953021022333564328539832200895695⟩⟩, + ⟨⟨-1875644347017858945307875609458893570320115422498534182102234,-1875644347017858945307875609458893292480611024156139560047481⟩,⟨-1928203230275509174109785366023489606690973214412348808491998,-1928203230275509174109785366023489328851468816070779193506015⟩⟩, + ⟨⟨-392304845413263761164678049035234659797094991202175168000071,-392304845413263761164678049035233743516568054522348796968062⟩,⟨-2464101615137754587054892683011745192025873975960829832497470,-2464101615137754587054892683011744275745347039280744846272739⟩⟩, + ⟨⟨1196152422706631880582339024517615589938152269378556372125684,1196152422706631880582339024517618611718679253483771693642532⟩,⟨-1535898384862245412945107316988256777004652984431834183258565,-1535898384862245412945107316988253755224126000326647471185175⟩⟩, + ⟨⟨1133974596215561353236276829247058833798262720243073238834656,1133974596215561353236276829247068799258932025946565450911297⟩,⟨35898384862245412945107316988250283384054839527487376244236,35898384862245412945107316988260248844724145230993690594343⟩⟩, + ⟨⟨999999999999999999999999999999983567567951306417324286605584,1000000000000000000000000000000016432432048693582696187425078⟩,⟨-267949192431122706472553658494144065489243439772303280707662,-267949192431122706472553658494111200625146052606916402573352⟩⟩, + ⟨⟨866025403784438646763723170752881991330769003257787799392142,866025403784438646763723170752990375612036250552583112990416⟩,⟨499999999999999999999999999999945807859366376352605653083397,500000000000000000000000000000054192140633623647411175929812⟩⟩, + ⟨⟨-178719017230801457175936915294,178719017230801457175937260236⟩,⟨-178719017230801457180929741536,178719017230801457180932417157⟩⟩, + ⟨⟨-589393346461127869114286582548,589393346461127869114288165778⟩,⟨-589393346461127869118689449433,589393346461127869118691726358⟩⟩] +lemma restBox3_calc (j : Fin 31) : recoverRest phaseBox3 restBox3 j = restBox3 j := by + revert j + decide +kernel +lemma restBox3_mem (j : Fin 31) : (restBox3 j).Mem ((restPolynomial ⟨2,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨2,by norm_num⟩ phaseBox3 + · have hr : residue ⟨2,by norm_num⟩ = (3:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox3_mem + · exact restBox3_calc +def cBox3 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨26380642397055816535097180326270597663156998636365217531135,26380642397055816535097180326270597663156998636395178123378⟩,⟨-15230870989335429967337177468944677677953239826004081156957,-15230870989335429967337177468944677677953239825974164336873⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651674003513703,30461741978670859934674354937889355355906479652282086066131⟩,⟨8162199163230086799154349223237515385498962030890499607046,8162199163230086799154349223237515385498962031498468358507⟩⟩, + ⟨⟨34542841560285903334251529549508113048655960664120268414546,34542841560285903334251529549508113048655960671030560222546⟩,⟨-1093527337124743630971520977530353093044684239855755441141,-1093527337124743630971520977530353093044684232945717712125⟩⟩, + ⟨⟨36436886467651459471885662206066164555316073182621529662938,36436886467651459471885662206066164555316073238122105867080⟩,⟨46786140305131033532983053384364386126904403686616934735997,46786140305131033532983053384364386126904403742117755097349⟩⟩, + ⟨⟨-11950288977961199074422614536353618398819187290964186611494,-11950288977961199074422614536353618398819186942608126573401⟩,⟨75060827609552406205714366367193035296721514719366139531590,75060827609552406205714366367193035296721515067722750001698⟩⟩, + ⟨⟨-57135394142610607594080444562662607698492735125683487744903,-57135394142610607594080444562662607698492733311043429215990⟩,⟨58736429283092232607405667920718004525723589923836891411945,58736429283092232607405667920718004525723591738473839599284⟩⟩, + ⟨⟨-72873772935302918943771324412132329110632150516484158423908,-72873772935302918943771324412132329110632142325001767473263⟩,⟨65297593305840694393234793785900123083991692153810260682257,65297593305840694393234793785900123083991700345308157122355⟩⟩, + ⟨⟨-135984311566894126075063076242971746008534490785121338932540,-135984311566894126075063076242971746008534457609879493953867⟩,⟨15738378792692311349690879849469721412139395614781260660934,15738378792692311349690879849469721412139428789978232901438⟩⟩, + ⟨⟨-108002634029356684526640672558645751518146681012554241328537,-108002634029356684526640672558645751518146556884105933380720⟩,⟨-69593190923928688050856761479541269831498155775803644164493,-69593190923928688050856761479541269831498031647276921859138⟩⟩, + ⟨⟨-96774350891225317092616553484839565908270740576307491628901,-96774350891225317092616553484839565908270300732327565069270⟩,⟨-77247882283801893467657408322253741482811103288246826794015,-77247882283801893467657408322253741482810663444445539842948⟩⟩, + ⟨⟨-77833901817569755716275226919259050841670148116350408327648,-77833901817569755716275226919259050841668642336363041531516⟩,⟨-156682819241853274197257858599568189151711888095836259409370,-156682819241853274197257858599568189151710382315150078421154⟩⟩, + ⟨⟨34835851327169834458560438848010767728082689539372298495118,34835851327169834458560438848010767728087743655788469957974⟩,⟨-177810322989758322835542227120209410404404156163529334656166,-177810322989758322835542227120209410404399102048981427742909⟩⟩, + ⟨⟨109896678936722240664274805215203803024798335007706046668806,109896678936722240664274805215203803024815127974544783232856⟩,⟨-118644897633720189712046973035446627769172601867213477479660,-118644897633720189712046973035446627769155808897450297316481⟩⟩, + ⟨⟨155510780174317549700022221405557570433966341780917105481829,155510780174317549700022221405557570434021881190027732119890⟩,⟨-104936550054455403891770902708077081293797252388411475274061,-104936550054455403891770902708077081293741712982612436066387⟩⟩, + ⟨⟨264978463038093889848207440456716595349195339411431168236273,264978463038093889848207440456716595349378680756223401317563⟩,⟨-91670674242226092776,91670674242226102765⟩⟩, + ⟨⟨155510780174317549700022221405557570433691701877454414662226,155510780174317549700022221405557570434296521093490422939854⟩,⟨104936550054455403891770902708077081293467073079387755755520,104936550054455403891770902708077081294071892291636155606841⟩⟩, + ⟨⟨109896678936722240664274805215203803023809338896479465284800,109896678936722240664274805215203803025804124085771364620788⟩,⟨118644897633720189712046973035446627768166812785961697216292,118644897633720189712046973035446627770161597978702077606229⟩⟩, + ⟨⟨34835851327169834458560438848010767724795870813138481440555,34835851327169834458560438848010767731374562382022287024605⟩,⟨177810322989758322835542227120209410401112283323405429648661,177810322989758322835542227120209410407690974889105332779984⟩⟩, + ⟨⟨-77833901817569755716275226919259050852517302472949950343385,-77833901817569755716275226919259050830821487979763499492388⟩,⟨156682819241853274197257858599568189140863227957734846998077,156682819241853274197257858599568189162559042453251490860074⟩⟩, + ⟨⟨-96774350891225317092616553484839565944045616947391994109868,-96774350891225317092616553484839565872495424361243062554168⟩,⟨77247882283801893467657408322253741447035787073810597324326,77247882283801893467657408322253741518585979658881769330557⟩⟩, + ⟨⟨-108002634029356684526640672558645751636128506405768859898583,-108002634029356684526640672558645751400164731490891314771595⟩,⟨69593190923928688050856761479541269713516206253930679347684,69593190923928688050856761479541269949479981169149886676845⟩⟩, + ⟨⟨-135984311566894126075063076242971746397624243015946764725521,-135984311566894126075063076242971745619444705379054068127023⟩,⟨-15738378792692311349690879849469721801229181020763604048659,-15738378792692311349690879849469721023049643383995889533120⟩⟩, + ⟨⟨-72873772935302918943771324412132330393802371823329520275513,-72873772935302918943771324412132327827461921018156405604495⟩,⟨-65297593305840694393234793785900124367161921652177612931228,-65297593305840694393234793785900121800821470846940804909777⟩⟩, + ⟨⟨-57135394142610607594080444562662611930230381450410414175244,-57135394142610607594080444562662603466755086986316502793667⟩,⟨-58736429283092232607405667920718008757461238063189760738102,-58736429283092232607405667920718000293985943599120970316478⟩⟩, + ⟨⟨-11950288977961199074422614536353632354569682929643949327113,-11950288977961199074422614536353604443068691303928363892837⟩,⟨-75060827609552406205714366367193049252472010706406377323496,-75060827609552406205714366367193021340971019080682512245773⟩⟩, + ⟨⟨36436886467651459471885662206066118530966708629436170124419,36436886467651459471885662206066210579665437791307465349850⟩,⟨-46786140305131033532983053384364432151253768295302589732578,-46786140305131033532983053384364340102555039133432100115236⟩⟩, + ⟨⟨34542841560285903334251529549507961266010157176099065759718,34542841560285903334251529549508264831301764159051762814384⟩,⟨1093527337124743630971520977530201310398880744924279740179,1093527337124743630971520977530504875690487727877193429708⟩⟩, + ⟨⟨30461741978670859934674354937888854795401330306269893243792,30461741978670859934674354937889855916411628997686196283165⟩,⟨-8162199163230086799154349223238015946004111376902792613822,-8162199163230086799154349223237014824993812685486175302651⟩⟩, + ⟨⟨26380642397055816535097180326268946876151745348066001833047,26380642397055816535097180326272248450162251924694393795037⟩,⟨15230870989335429967337177468943026890947986537674806797702,15230870989335429967337177468946328464958493114303438769523⟩⟩, + ⟨⟨-5444092589566305490864327246,5444092589566305490864337753⟩,⟨-5444092589566305491016417430,5444092589566305491016498934⟩⟩] +lemma cBox3_calc (j : Fin 31) : cCoeffBox restBox3 j = cBox3 j := by + revert j + decide +kernel +lemma cBox3_mem (j : Fin 31) : (cBox3 j).Mem (cCoefficient ⟨2,by norm_num⟩ j) := by + rw [← cBox3_calc] + exact cCoeffBox_mem ⟨2,by norm_num⟩ restBox3 restBox3_mem j +def dBox3 : Fin 31 → CI := + ![⟨⟨-57553376622,59272815901⟩,⟨87266462599716478846184538424430635672143594427027726413884,87266462599716478846184538424430635672143594427144773589200⟩⟩, + ⟨⟨-63883484419801675369988649712415675351528592915164813409672,-63883484419801675369988649712415675351528592912785472412528⟩,⟨63883484419801675369988649712415675351528592912786995933470,63883484419801675369988649712415675351528592915166250872993⟩⟩, + ⟨⟨-122340929869588684060478371492453076153066096710332673449973,-122340929869588684060478371492453076153066096683173685658060⟩,⟨43633231299858239423092269212215317836071797199965343974023,43633231299858239423092269212215317836071797227123982778611⟩⟩, + ⟨⟨-191650453259405026109965949137247026054585778851715610668774,-191650453259405026109965949137247026054585778632141491428845⟩,⟨-63883484419801675369988649712415675351528593023760913061179,-63883484419801675369988649712415675351528592804187447272732⟩⟩, + ⟨⟨-221298881559262564644760854272891191985517192575542895317234,-221298881559262564644760854272891191985517191185252375724027⟩,⟨-221298881559262564644760854272891191985517192575539518297850,-221298881559262564644760854272891191985517191185249036264460⟩⟩, + ⟨⟨-3659279797584541,3659272000464133⟩,⟨-383300906518810052219931898274494052109171561143134271015312,-383300906518810052219931898274494052109171553824578137375556⟩⟩, + ⟨⟨145723908049503487536674260204468036473681081500050632623718,145723908049503487536674260204468036473681114919674882969381⟩,⟨-352198575458837282914037661909537145493732600230833697931909,-352198575458837282914037661909537145493732566811225114870516⟩⟩, + ⟨⟨383300906518810052219931898274494052109171489019659069759819,383300906518810052219931898274494052109171625948051654998898⟩,⟨-302299894039036308432346376273692622047344443146350316862233,-302299894039036308432346376273692622047344306217908767860475⟩⟩, + ⟨⟨593747710138043283505694896682628694994706312193017759914422,593747710138043283505694896682628694994706830010695034001761⟩,⟨-81001012479773743787585522000801430061827441710522248269854,-81001012479773743787585522000801430061826923892945512845455⟩⟩, + ⟨⟨564099281838185744970899991546984529063774232412984430263652,564099281838185744970899991546984529063776083513798132104895⟩,⟨185385003139462291051366932713617820444268441566046087580085,185385003139462291051366932713617820444270292667091668392013⟩⟩, + ⟨⟨482258858208483932804214381054932167941619463445470994226505,482258858208483932804214381054932167941625841889534610612101⟩,⟨398964531818666889866429439333567066134959397325625750910310,398964531818666889866429439333567066134965775768874484005865⟩⟩, + ⟨⟨338213772458836582025740297832965993588581449486187949731371,338213772458836582025740297832965993588602949405719485037438⟩,⟨691866250677789095710877290971815879766821593830501700478230,691866250677789095710877290971815879766843093752181852605590⟩⟩, + ⟨⟨-140297869079488820857175332272089761923725814007919819228619,-140297869079488820857175332272089761923654204149408164759152⟩,⟨860133725757279318344647351397047945500767316092802267063981,860133725757279318344647351397047945500838925947517723913392⟩⟩, + ⟨⟨-453449841058554462648519564410538933071135124596116704132131,-453449841058554462648519564410538933070897999450265527544273⟩,⟨704397150917674565828075323819074290987346604466416153693731,704397150917674565828075323819074290987583729617700498008392⟩⟩, + ⟨⟨-831324708607349848188952534752654710630588630641637432593240,-831324708607349848188952534752654710629805430110063082418413⟩,⟨554701106658271642383001466911540720647908940263036226791737,554701106658271642383001466911540720648692140787669199609009⟩⟩, + ⟨⟨-966196538716824002366628939092366198005188065622451152095471,-966196538716824002366628939092366198002603835024186467293264⟩,⟨-1292115302852395923905,1292115302852395893723⟩⟩, + ⟨⟨-831324708607349848188952534752654710634458942821596342067659,-831324708607349848188952534752654710625935117930104172965848⟩,⟨-554701106658271642383001466911540720652562452967353360051386,-554701106658271642383001466911540720644038628083352066405498⟩⟩, + ⟨⟨-453449841058554462648519564410538933085072446039499986120912,-453449841058554462648519564410538933056960678006882245592743⟩,⟨-704397150917674565828075323819074291001521051062023133809238,-704397150917674565828075323819074290973409283022093517937295⟩⟩, + ⟨⟨-140297869079488820857175332272089761970045103633426552130169,-140297869079488820857175332272089761877334914523901431900369⟩,⟨-860133725757279318344647351397047945547158215571894387637691,-860133725757279318344647351397047945454448026468425603368655⟩⟩, + ⟨⟨338213772458836582025740297832965993435718407295472331422087,338213772458836582025740297832965993741465991596435103309007⟩,⟨-691866250677789095710877290971815879919706135944058652429430,-691866250677789095710877290971815879613958551638624900667879⟩⟩, + ⟨⟨482258858208483932804214381054932167437463417010086688006308,482258858208483932804214381054932168445781888324918916808880⟩,⟨-398964531818666889866429439333567066639121822203265451152436,-398964531818666889866429439333567065630803350891234783765981⟩⟩, + ⟨⟨564099281838185744970899991546984527401119821573169024549201,564099281838185744970899991546984530726430494353613537814436⟩,⟨-185385003139462291051366932713617822106924703507420476938893,-185385003139462291051366932713617818781614030725717279032108⟩⟩, + ⟨⟨593747710138043283505694896682628689511473597878792263225304,593747710138043283505694896682628700477939544324920530702893⟩,⟨81001012479773743787585522000801424578594209578883299637399,81001012479773743787585522000801435545060156024584461474009⟩⟩, + ⟨⟨383300906518810052219931898274494034026143299016833528034224,383300906518810052219931898274494070192199815950877196747072⟩,⟨302299894039036308432346376273692603964316116215029685358024,302299894039036308432346376273692640130372633149229399350435⟩⟩, + ⟨⟨145723908049503487536674260204467976838077077791373129513586,145723908049503487536674260204468096109285118628352386104346⟩,⟨352198575458837282914037661909537085858128563102576928651814,352198575458837282914037661909537205129336603939481884124643⟩⟩, + ⟨⟨-196670890247477338048124737,196670890247477330251024249⟩,⟨383300906518810052219931898274493855438281310006507796415149,383300906518810052219931898274494248780061804961204611940121⟩⟩, + ⟨⟨-221298881559262564644760854272891840581933795336493790511131,-221298881559262564644760854272890543389100588424301480520059⟩,⟨221298881559262564644760854272890543389100588424302440206359,221298881559262564644760854272891840581933795336486114314525⟩⟩, + ⟨⟨-191650453259405026109965949137249165045826934743286571274740,-191650453259405026109965949137244887063344622740570530824901⟩,⟨63883484419801675369988649712413536360287436912616160697714,63883484419801675369988649712417814342769748915332199593870⟩⟩, + ⟨⟨-122340929869588684060478371492460130283204065679432215147624,-122340929869588684060478371492446022022928127714074143973211⟩,⟨-43633231299858239423092269212222371966209766196223128912221,-43633231299858239423092269212208263705933828230866197878557⟩⟩, + ⟨⟨-63883484419801675369988649712438939005463196604387953178991,-63883484419801675369988649712392411697593989223562332663009⟩,⟨-63883484419801675369988649712438939005463196604389006695040,-63883484419801675369988649712392411697593989223564240141174⟩⟩, + ⟨⟨-76720670558088461129672871711,76720670558088461131392289717⟩,⟨-87266462599716478846184538424507356342701682888216603652120,-87266462599716478846184538424353915001585505965955896370225⟩⟩] +lemma dBox3_calc (j : Fin 31) : dCoeffBox phaseBox3 restBox3 j = dBox3 j := by + revert j + decide +kernel +lemma dBox3_mem (j : Fin 31) : (dBox3 j).Mem (dCoefficient ⟨2,by norm_num⟩ j) := by + rw [← dBox3_calc] + apply dCoeffBox_mem ⟨2,by norm_num⟩ phaseBox3 restBox3 + · have hr : residue ⟨2,by norm_num⟩ = (3:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox3_mem + · exact restBox3_mem +def restBox4 : Fin 31 → CI := + ![⟨⟨766044443118978035202392650555416673935832457079884379816046,766044443118978035202392650555416673935832457080893681400799⟩,⟨-642787609686539326322643409907263432907559884206194297184146,-642787609686539326322643409907263432907559884205184097598091⟩⟩, + ⟨⟨694592710667721395406866507077259184001502708725950459214356,694592710667721395406866507077259184001502708746619945012527⟩,⟨-10342827125332,10327047811568⟩⟩, + ⟨⟨624485151690003756755461324896935225807121693939080319847734,624485151690003756755461324896935225807121694175164719683479⟩,⟨-368945915932827368044695487312014399547051711525047209775293,-368945915932827368044695487312014399547051711288963053701272⟩⟩, + ⟨⟨709140630618410393378777589590240772383502547827509094901566,709140630618410393378777589590240772383502549735231099682616⟩,⟨1285575219373078652645286819814526865815119767457502091747698,1285575219373078652645286819814526865815119769365225759571202⟩⟩, + ⟨⟨-417403914311578336354838435718953550195132375081208194789277,-417403914311578336354838435718953550195132363013351128032336⟩,⟨2338561421957243486778181536491060426888338208812779894957904,2338561421957243486778181536491060426888338220880637915459682⟩⟩, + ⟨⟨-1248970303380007513510922649793870451614243419863571977533248,-1248970303380007513510922649793870451614243356364890911097954⟩,⟨1940961697309137109203566155524044207672009457830802173403472,1940961697309137109203566155524044207672009521329448318036801⟩⟩, + ⟨⟨-1056436985952271091082210843128870364384254048323586667971966,-1056436985952271091082210843128870364384253757975424228543402⟩,⟨2134626213883608677795709327008068941815713761556090663535191,2134626213883608677795709327008068941815714051904441853503744⟩⟩, + ⟨⟨-2795607109568652581887619033417685387867908739819309190388717,-2795607109568652581887619033417685387867907544820949006642448⟩,⟨407870416147269617964944418965982970145248018734017961314442,407870416147269617964944418965982970145249213731815361265101⟩⟩, + ⟨⟨-2194592710667721395406866507077259184001504988638448352052645,-2194592710667721395406866507077259184001500428834212324064155⟩,⟨-2375757886063565362169106447119781996601228729608479583535292,-2375757886063565362169106447119781996601224169803178327391760⟩⟩, + ⟨⟨-2573977952239538163515085061726722123873927244223217552562296,-2573977952239538163515085061726722123873910710307276373387108⟩,⟨-2274439185243762976386660753232584038391489903051555695963735,-2274439185243762976386660753232584038391473369137907191098825⟩⟩, + ⟨⟨-2788333149593308082901663492161194593676937267901275089223036,-2788333149593308082901663492161194593676879176693895990436807⟩,⟨-4194689588586428426605329165297306019302753102392731914665387,-4194689588586428426605329165297306019302695011176856596279324⟩⟩, + ⟨⟨192533317427736422428711806665000087229889213150035834591007,192533317427736422428711806665000087230089756779445748295499⟩,⟨-4215400882552900085590226908756628246063591397477567469372517,-4215400882552900085590226908756628246063390853872147864415016⟩⟩, + ⟨⟨2412189347576218810347037594874721852775302527378946895519409,2412189347576218810347037594874721852775988818213713706123130⟩,⟨-2130570001025132413421078418179534782910338436204506692629240,-2130570001025132413421078418179534782909652145329102575027828⟩⟩, + ⟨⟨3889814375042535820123820236337926334710219894635308575635420,3889814375042535820123820236337926334712559427426676924811659⟩,⟨-2188477759097925947796901072267578579384820360887723356539638,-2188477759097925947796901072267578579382480828144202628053782⟩⟩, + ⟨⟨7573044299142945062032276626054111049533785330878594295603305,7573044299142945062032276626054111049541748603053716905699829⟩,⟨-3981636113622586730025,3981636113622587461722⟩⟩, + ⟨⟨3889814375042535820123820236337926334697844189089415525691116,3889814375042535820123820236337926334724935132972569975541008⟩,⟨2188477759097925947796901072267578579370105122601753594319143,2188477759097925947796901072267578579397196066430172391473168⟩⟩, + ⟨⟨2412189347576218810347037594874721852729571750917835337560955,2412189347576218810347037594874721852821719594674825265328889⟩,⟨2130570001025132413421078418179534782863921368863011367682485,2130570001025132413421078418179534782956069212670597900484624⟩⟩, + ⟨⟨192533317427736422428711806665000087073279613768973724019540,192533317427736422428711806665000087386699356160507860053516⟩,⟨4215400882552900085590226908756628245906781254502022035716260,4215400882552900085590226908756628246220200996847693297749299⟩⟩, + ⟨⟨-2788333149593308082901663492161194594209914841908508898468356,-2788333149593308082901663492161194593143901602686662180572387⟩,⟨4194689588586428426605329165297306018769717437155928169524283,4194689588586428426605329165297306019835730676413660340479220⟩⟩, + ⟨⟨-2573977952239538163515085061726722125686793587452566310470580,-2573977952239538163515085061726722122061044367077927615696409⟩,⟨2274439185243762976386660753232584036578607025916360934107271,2274439185243762976386660753232584040204356246273101951877088⟩⟩, + ⟨⟨-2194592710667721395406866507077259190167491323778000991604884,-2194592710667721395406866507077259177835514093694659685480787⟩,⟨2375757886063565362169106447119781990435237834661565941888227,2375757886063565362169106447119782002767215064750091968376301⟩⟩, + ⟨⟨-2795607109568652581887619033417685408839801177100841039759252,-2795607109568652581887619033417685366896015107539417158576253⟩,⟨-407870416147269617964944418965982991117141651012859416267193,-407870416147269617964944418965982949173355581452973906166038⟩⟩, + ⟨⟨-1056436985952271091082210843128870435714306450294228513519835,-1056436985952271091082210843128870293054201356004782384045783⟩,⟨-2134626213883608677795709327008069013145766453875440281616770,-2134626213883608677795709327008068870485661359585092234410791⟩⟩, + ⟨⟨-1248970303380007513510922649793870694223548117759128578977025,-1248970303380007513510922649793870209004938658469334309930640⟩,⟨-1940961697309137109203566155524044450281314219224816333748257,-1940961697309137109203566155524043965062704759935434156150143⟩⟩, + ⟨⟨-417403914311578336354838435718954375363103355097316600888515,-417403914311578336354838435718952725027161382997242721229915⟩,⟨-2338561421957243486778181536491061252056309200896799680560928,-2338561421957243486778181536491059601720367228796618128397439⟩⟩, + ⟨⟨709140630618410393378777589590237965804500608345493948984223,709140630618410393378777589590243578962504489217246247043874⟩,⟨-1285575219373078652645286819814529672394121708847232313682138,-1285575219373078652645286819814524059236117827975495536896764⟩⟩, + ⟨⟨624485151690003756755461324896925680010422011271487922117095,624485151690003756755461324896944771603821376842757118978916⟩,⟨368945915932827368044695487312004853750352028621371807078809,368945915932827368044695487312023945343751394192638456062928⟩⟩, + ⟨⟨694592710667721395406866507077226716633020059030275016887668,694592710667721395406866507077291651369985358442295388285179⟩,⟨-32467368482649706003209638324,32467368482649706018987669518⟩⟩, + ⟨⟨766044443118978035202392650555306245225757039169817872347193,766044443118978035202392650555527102645907874990960188684716⟩,⟨642787609686539326322643409907153004197484466295118632238011,642787609686539326322643409907373861617635302116259760911137⟩⟩, + ⟨⟨-375592497292700020722111969989,375592497292700020722110642124⟩,⟨-375592497292700020722063253452,375592497292700020722062091971⟩⟩, + ⟨⟨-1277473257871277388862129844617,1277473257871277388862127912947⟩,⟨-1277473257871277388862116092042,1277473257871277388862116069556⟩⟩] +lemma restBox4_calc (j : Fin 31) : recoverRest phaseBox4 restBox4 j = restBox4 j := by + revert j + decide +kernel +lemma restBox4_mem (j : Fin 31) : (restBox4 j).Mem ((restPolynomial ⟨3,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨3,by norm_num⟩ phaseBox4 + · have hr : residue ⟨3,by norm_num⟩ = (4:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox4_mem + · exact restBox4_calc +def cBox4 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨23335048170484914988453136141165932166689530925471369991158,23335048170484914988453136141165932166689530925502263631162⟩,⟨-19580430313357954872034103663248574042515901359362555589565,-19580430313357954872034103663248574042515901359331658497519⟩⟩, + ⟨⟨21158503932625711660577912563591348779508349066591077148821,21158503932625711660577912563591348779508349067220840391269⟩,⟨-315060531222,314579865845⟩⟩, + ⟨⟨19022905560292027148203397875765926271331786028172343959152,19022905560292027148203397875765926271331786035364007135730⟩,⟨-11238735295230177498455422922862826664475463368651476346283,-11238735295230177498455422922862826664475463361459870150680⟩⟩, + ⟨⟨21601658916489958016749400216749190355793343262982881056958,21601658916489958016749400216749190355793343321095554054087⟩,⟨39160860626715909744068207326497148085031802689637355611586,39160860626715909744068207326497148085031802747750191053237⟩⟩, + ⟨⟨-12714850338646540342663470969621096897930737752393996691233,-12714850338646540342663470969621096897930737384785967542922⟩,⟨71236654636935182005124223443450634439643411686550076528697,71236654636935182005124223443450634439643412054158507291123⟩⟩, + ⟨⟨-38045811120584054296406795751531852542663573030676277380368,-38045811120584054296406795751531852542663571096395596541509⟩,⟨59125074413913984959846074110538630118742239627151362529417,59125074413913984959846074110538630118742241561431113784116⟩⟩, + ⟨⟨-32180910882802813847038356498544864745547522247747482630740,-32180910882802813847038356498544864745547513403236469549574⟩,⟨65024432948229564068934758643956150365648921792069863860970,65024432948229564068934758643956150365648930636586835700744⟩⟩, + ⟨⟨-85159062445418130629484555687021558452327646340510013820065,-85159062445418130629484555687021558452327609938777758828528⟩,⟨12424443377411235872378929598988968147988953111195515492406,12424443377411235872378929598988968147988989512910164066197⟩⟩, + ⟨⟨-66851116900632001562589444970425381813368137994664201440015,-66851116900632001562589444970425381813367999095083664717544⟩,⟨-72369723729060850949380130035345095086138671827902371781602,-72369723729060850949380130035345095086138532928289351221381⟩⟩, + ⟨⟨-78407852239908397467773141127718887502641837277274721908420,-78407852239908397467773141127718887502641333625392925515468⟩,⟨-69283379607073882943713190525738676973741082716764745100086,-69283379607073882943713190525738676973740579064952845648613⟩⟩, + ⟨⟨-84937484953486007451398811860442637664186015806762699234014,-84937484953486007451398811860442637664184246247391746937189⟩,⟨-127777551928136805667194335637589149099039311909684515108860,-127777551928136805667194335637589149099037542350054480434448⟩⟩, + ⟨⟨5864900237781240449368439252986987797112999783897117405259,5864900237781240449368439252986987797119108692191705722769⟩,⟨-128408454020987867903559264636277307092486125938932354241285,-128408454020987867903559264636277307092480017031367772382309⟩⟩, + ⟨⟨73479489509565178277798732860480570126029801955687251582191,73479489509565178277798732860480570126050707570018712588640⟩,⟨-64900873638724093122624175705008525364534325102598926976923,-64900873638724093122624175705008525364513419487029637423169⟩⟩, + ⟨⟨118490521837470569544970834409744724402317446785651263385886,118490521837470569544970834409744724402388713029893319977031⟩,⟨-66664844823700824303245011295591144004499340279227755035756,-66664844823700824303245011295591144004428074036443550252889⟩⟩, + ⟨⟨230688121433536691022465447089643199439542397220200823347795,230688121433536691022465447089643199439784972362506805973619⟩,⟨-121287571946129047987,121287571946129070351⟩⟩, + ⟨⟨118490521837470569544970834409744724401940461236508263295864,118490521837470569544970834409744724402765698579036320090923⟩,⟨66664844823700824303245011295591144004051088487405460896076,66664844823700824303245011295591144004876325828265844429167⟩⟩, + ⟨⟨73479489509565178277798732860480570124636762842644596406857,73479489509565178277798732860480570127443746683061367801926⟩,⟨64900873638724093122624175705008525363120380373835293453113,64900873638724093122624175705008525365927364215793270962566⟩⟩, + ⟨⟨5864900237781240449368439252986987792342398576168191787787,5864900237781240449368439252986987801889709899920631376300⟩,⟨128408454020987867903559264636277307087709415823971984961494,128408454020987867903559264636277307097256727146328141652297⟩⟩, + ⟨⟨-84937484953486007451398811860442637680421441146589008337286,-84937484953486007451398811860442637647948820907565437815142⟩,⟨127777551928136805667194335637589149082802117009811009426113,127777551928136805667194335637589149115274737249927986088470⟩⟩, + ⟨⟨-78407852239908397467773141127718887557864904066543710445411,-78407852239908397467773141127718887447418266836123936985150⟩,⟨69283379607073882943713190525738676918517512275921534881333,69283379607073882943713190525738677028964149505796055834472⟩⟩, + ⟨⟨-66851116900632001562589444970425382001194822779695601758422,-66851116900632001562589444970425381625541314310052264428698⟩,⟨72369723729060850949380130035345094898311848143195207453267,72369723729060850949380130035345095273965356612996515529493⟩⟩, + ⟨⟨-85159062445418130629484555687021559091168022569418787150648,-85159062445418130629484555687021557813487233709868985537669⟩,⟨-12424443377411235872378929598988968786829365741804078330620,-12424443377411235872378929598988967509148576882301601223579⟩⟩, + ⟨⟨-32180910882802813847038356498544866918385173841648787555553,-32180910882802813847038356498544862572709861809335164656712⟩,⟨-65024432948229564068934758643956152538486582230499002751681,-65024432948229564068934758643956148192811270198157696779245⟩⟩, + ⟨⟨-38045811120584054296406795751531859932965614362710824467245,-38045811120584054296406795751531845152361529764361049463015⟩,⟨-59125074413913984959846074110538637509044282893459916221105,-59125074413913984959846074110538622728440198295122560045484⟩⟩, + ⟨⟨-12714850338646540342663470969621122033984558809008616348506,-12714850338646540342663470969621071761876916328171347864182⟩,⟨-71236654636935182005124223443450659575697233110774752356574,-71236654636935182005124223443450609303589590629933831418804⟩⟩, + ⟨⟨21601658916489958016749400216749104862507943426898758811011,21601658916489958016749400216749275849078743157179676344043⟩,⟨-39160860626715909744068207326497233578317202583834051577799,-39160860626715909744068207326497062591746402853553495064467⟩⟩, + ⟨⟨19022905560292027148203397875765635489735739446905115233216,19022905560292027148203397875766217052927832616631235909325⟩,⟨11238735295230177498455422922862535882879416780192676489515,11238735295230177498455422922863117446071509949918669997263⟩⟩, + ⟨⟨21158503932625711660577912563590359766906904161134952283649,21158503932625711660577912563592337792109793972676965285256⟩,⟨-989012601444905770726648235,989012601444905771207274557⟩⟩, + ⟨⟨23335048170484914988453136141162568315816176093977176663676,23335048170484914988453136141169296017562885756996456952997⟩,⟨19580430313357954872034103663245210191642546527837496914500,19580430313357954872034103663251937893389256190856717122854⟩⟩, + ⟨⟨-11441201741654861532390186640,11441201741654861532390146191⟩,⟨-11441201741654861532388702650,11441201741654861532388667269⟩⟩] +lemma cBox4_calc (j : Fin 31) : cCoeffBox restBox4 j = cBox4 j := by + revert j + decide +kernel +lemma cBox4_mem (j : Fin 31) : (cBox4 j).Mem (cCoefficient ⟨3,by norm_num⟩ j) := by + rw [← cBox4_calc] + exact cCoeffBox_mem ⟨3,by norm_num⟩ restBox4 restBox4_mem j +def dBox4 : Fin 31 → CI := + ![⟨⟨-61335988179,63055427458⟩,⟨87266462599716478846184538424430635672143594427023925048585,87266462599716478846184538424430635672143594427148574954246⟩⟩, + ⟨⟨-38962345218975078297758095199889543471863545038551833303255,-38962345218975078297758095199889543471863545036010353287715⟩,⟨46433514890609389663463594161459210988561205761973717378190,46433514890609389663463594161459210988561205764515162728764⟩⟩, + ⟨⟨-96306404382542279143365458941938201307087263235465373886153,-96306404382542279143365458941938201307087263206315402763496⟩,⟨47288741911422358256006940368167163902478793046216315502016,47288741911422358256006940368167163902478793075366093968368⟩⟩, + ⟨⟨-164681427509327871503793225800508945836502570138465118564352,-164681427509327871503793225800508945836502569901380238169132⟩,⟨-71140272112867288409087347456432251929765918873828194412247,-71140272112867288409087347456432251929765918636743643071795⟩⟩, + ⟨⟨-192612808765084558286730917883876402614174527198130001245637,-192612808765084558286730917883876402614174525685435577640316⟩,⟨-180133492380935258173111726747349057649266006709920564139917,-180133492380935258173111726747349057649266005197226057778012⟩⟩, + ⟨⟨-13531480489809717287620037663662634812830386699517068165393,-13531480489809717287620037663662634812830378658207357022005⟩,⟨-311888413301322945034931880590702964071398988912407574160020,-311888413301322945034931880590702964071398980871096456491571⟩⟩, + ⟨⟨96306404382542279143365458941938201307087244630796738802841,96306404382542279143365458941938201307087281810982107267203⟩,⟨-293637450281380315362594123400925662349090694886749434460276,-293637450281380315362594123400925662349090657706565244061075⟩⟩, + ⟨⟨329362855018655743007586451601017891673005062677664649917670,329362855018655743007586451601017891673005217402022402347355⟩,⟨-235147574006953356145101883235782925836654326399248428436730,-235147574006953356145101883235782925836654171674884679339598⟩⟩, + ⟨⟨483881738840902475204256891041046937967327014360385252523699,483881738840902475204256891041046937967327610656588115341453⟩,⟨-62559705377458580100560785129457594730939179583140563009939,-62559705377458580100560785129457594730938583286952430952939⟩⟩, + ⟨⟨480512802038173897223759639737864202696676237551049044637938,480512802038173897223759639737864202696678417210771667622804⟩,⟨119518843573414859720378920360427403156897855940808174710755,119518843573414859720378920360427403156900035600560152533052⟩⟩, + ⟨⟨401106814948169913348511469762771371473066580689739835917033,401106814948169913348511469762771371473074283243175278833362⟩,⟨328869830808985104064572417765409300727690396584432340267883,328869830808985104064572417765409300727698099137764832534003⟩⟩, + ⟨⟨263337548820061230134588281073803078575467485477687884484926,263337548820061230134588281073803078575494173812005523839513⟩,⟨548981043878214482827861742569021830146611711013670732982564,548981043878214482827861742569021830146638399348272277133707⟩⟩, + ⟨⟨-116887035656925234893274285599668630415636393688088877388385,-116887035656925234893274285599668630415544876535596590951387⟩,⟨702462722466953660607521737278861906616068768314366488566048,702462722466953660607521737278861906616160285466332237369951⟩⟩, + ⟨⟨-364494186657385914538182970894237759433254026641385685056314,-364494186657385914538182970894237759432941740025025708960188⟩,⟨606381090603516228990069350198336579334251105177390491943041,606381090603516228990069350198336579334563391794524121607853⟩⟩, + ⟨⟨-702538288711068969573160229280421806368935320615150504822212,-702538288711068969573160229280421806367871910553732132283435⟩,⟨464514864869249154222048529093835087626439164273373723793110,464514864869249154222048529093835087627502574333792982484521⟩⟩, + ⟨⟨-728988373314771829076365941788475518868004913829704509216440,-728988373314771829076365941788475518864386619503120285591789⟩,⟨-1809147163842521171360,1809147163842521156582⟩⟩, + ⟨⟨-702538288711068969573160229280421806374557635577040680039044,-702538288711068969573160229280421806362249595591841957072827⟩,⟨-464514864869249154222048529093835087633124889295629595671665,-464514864869249154222048529093835087620816849311537110633298⟩⟩, + ⟨⟨-364494186657385914538182970894237759454029720422533539144787,-364494186657385914538182970894237759412166046243877854880625⟩,⟨-606381090603516228990069350198336579355339085575826652896376,-606381090603516228990069350198336579313475411396087960676875⟩⟩, + ⟨⟨-116887035656925234893274285599668630486784991395373874717031,-116887035656925234893274285599668630344396278828311593630402⟩,⟨-702462722466953660607521737278861906687308883173416370793424,-702462722466953660607521737278861906544920170607282355160387⟩⟩, + ⟨⟨263337548820061230134588281073803078333332649478902443346565,263337548820061230134588281073803078817629009810790964974087⟩,⟨-548981043878214482827861742569021830388773235347259276158244,-548981043878214482827861742569021829904476875014683733973347⟩⟩, + ⟨⟨401106814948169913348511469762771370649470571000186738690862,401106814948169913348511469762771372296670292932728376060531⟩,⟨-328869830808985104064572417765409301551294108827148472882746,-328869830808985104064572417765409299904094386895048699935326⟩⟩, + ⟨⟨480512802038173897223759639737864199895431646918507475251495,480512802038173897223759639737864205497923007843313237012761⟩,⟨-119518843573414859720378920360427405958144626233190893901638,-119518843573414859720378920360427400355653265308177433362533⟩⟩, + ⟨⟨483881738840902475204256891041046928439670329510506639545240,483881738840902475204256891041046947494984295506466728321270⟩,⟨62559705377458580100560785129457585203281898437099808457455,62559705377458580100560785129457604258595864432993185480426⟩⟩, + ⟨⟨329362855018655743007586451601017859267333807598702567288492,329362855018655743007586451601017924078676472480984484971906⟩,⟨235147574006953356145101883235782893430982916595915321445908,235147574006953356145101883235782958242325581478217786304444⟩⟩, + ⟨⟨96306404382542279143365458941938091088222840407995347926217,96306404382542279143365458941938311525951686033783498133350⟩,⟨293637450281380315362594123400925552130226253483768262602661,293637450281380315362594123400925772567955099109546415897323⟩⟩, + ⟨⟨-13531480489809717287620037663663009691596147243796956896614,-13531480489809717287620037663662259934064618113927468302674⟩,⟨311888413301322945034931880590702589192633220326814446887146,311888413301322945034931880590703338950164749456689583751452⟩⟩, + ⟨⟨-192612808765084558286730917883877677659873417383717136350221,-192612808765084558286730917883875127568475635499848442543025⟩,⟨180133492380935258173111726747347782603567115011639484226100,180133492380935258173111726747350332694964896895507137686354⟩⟩, + ⟨⟨-164681427509327871503793225800513282549282079572755888821349,-164681427509327871503793225800504609123723060467089467910986⟩,⟨71140272112867288409087347456427915216986409202452788121019,71140272112867288409087347456436588642545428308119049360167⟩⟩, + ⟨⟨-96306404382542279143365458941952951427611035953798227593934,-96306404382542279143365458941923451186563490487982549046326⟩,⟨-47288741911422358256006940368181914023002565793698971292794,-47288741911422358256006940368152413781955020327883438184174⟩⟩, + ⟨⟨-38962345218975078297758095199939711898164173859584310227619,-38962345218975078297758095199839375045562916214977876350022⟩,⟨-46433514890609389663463594161509379414861834585547632463264,-46433514890609389663463594161409042562260576940941247658600⟩⟩, + ⟨⟨-170633927595723044306530696515,170633927595723044308250146856⟩,⟨-87266462599716478846184538424601269599739317471393781034627,-87266462599716478846184538424260001744547871382778718992105⟩⟩] +lemma dBox4_calc (j : Fin 31) : dCoeffBox phaseBox4 restBox4 j = dBox4 j := by + revert j + decide +kernel +lemma dBox4_mem (j : Fin 31) : (dBox4 j).Mem (dCoefficient ⟨3,by norm_num⟩ j) := by + rw [← dBox4_calc] + apply dCoeffBox_mem ⟨3,by norm_num⟩ phaseBox4 restBox4 + · have hr : residue ⟨3,by norm_num⟩ = (4:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox4_mem + · exact restBox4_mem +def restBox7 : Fin 31 → CI := + ![⟨⟨342020143325668733044099614682259580763083367513691103162557,342020143325668733044099614682259580763083367514612238733838⟩,⟨-939692620785908384054109277324731469936208134264928676323564,-939692620785908384054109277324731469936208134264007110431366⟩⟩, + ⟨⟨-246513666864877417759498481296306482056545145758707866258727,-246513666864877417759498481296306482056545145740129038821682⟩,⟨246513666864877417759498481296306482056545145740135080714678,246513666864877417759498481296306482056545145758713026752619⟩⟩, + ⟨⟨175886518778109536558524572450594315659981404517893873006913,175886518778109536558524572450594315659981404727007324883701⟩,⟨305567604364255416675318168040276472948042207022865735656495,305567604364255416675318168040276472948042207231984904021702⟩⟩, + ⟨⟨1632871574706939350348720073353156457815871121949677148292397,1632871574706939350348720073353156457815871123609353032578964⟩,⟨1440935404311204426605243448647971429895524423650007856456401,1440935404311204426605243448647971429895524425309663066211543⟩⟩, + ⟨⟨1109688700594969116086762247363932550155138358658768046617590,1109688700594969116086762247363932550155138368919082889904536⟩,⟨490680765332304413541039565847551542718045593517326417934072,490680765332304413541039565847551542718045603777666332861224⟩⟩, + ⟨⟨-1249303987978785148392932270700133014746848192209638186224581,-1249303987978785148392932270700133014746848139792330365879377⟩,⟨-781269510372114663792792468177562062658431769749167708465714,-781269510372114663792792468177562062658431717331720907754349⟩⟩, + ⟨⟨-2088980765480347785649045523925948407891981456154149400725228,-2088980765480347785649045523925948407891981225345187063447078⟩,⟨1196944014492146480511454820272565722183162482051152304209636,1196944014492146480511454820272565722183162712859004796133128⟩⟩, + ⟨⟨-2889450827866001743028935483364600953764676299031221894598141,-2889450827866001743028935483364600953764675393036316026203526⟩,⟨2158440725242289687679159534245333208672239896760773002600677,2158440725242289687679159534245333208672240802760011110129898⟩⟩, + ⟨⟨134933479342122020923095880818356301143238112200712119068805,134933479342122020923095880818356301143241374628356638760641⟩,⟨250441022487950603356984063488132476140545447423325542243169,250441022487950603356984063488132476140548709839556804763191⟩⟩, + ⟨⟨901339404704036405765308325039959101351425788815958431086048,901339404704036405765308325039959101351436835644432522893597⟩,⟨-980714619102555931115762168789675922467388249604686280160567,-980714619102555931115762168789675922467377202748683973028599⟩⟩, + ⟨⟨-1242950783778116894475798936050070671044289384323213530605367,-1242950783778116894475798936050070671044253474613720524194192⟩,⟨-4731659446453817158441276292761447091328023342518627366906282,-4731659446453817158441276292761447091327987432889996083940791⟩⟩, + ⟨⟨-1829095289378406254482923044729394898601357708080230527128535,-1829095289378406254482923044729394898601243828387709840692170⟩,⟨-3993837815412523754966373456987727649181392994089861559804276,-3993837815412523754966373456987727649181279114164534634929931⟩⟩, + ⟨⟨-841497024979908779662793480564746315319362357985849688565623,-841497024979908779662793480564746315319006051677524654746638⟩,⟨530984242622468915817790625379992691306302415007610956345819,530984242622468915817790625379992691306658720783680148072525⟩⟩, + ⟨⟨2189862196111392626767932357097715556516959201621989257869140,2189862196111392626767932357097715556518066700851175967831808⟩,⟨1121008776750763536467085681576508492455144293967028948333875,1121008776750763536467085681576508492456251794194440653683579⟩⟩, + ⟨⟨7802380657526412467914968299650453760035380967298305716689666,7802380657526412467914968299650453760038813574628130310088204⟩,⟨-1716302819765961135167,1716302819765961021998⟩⟩, + ⟨⟨2189862196111392626767932357097715556512199278404885795032916,2189862196111392626767932357097715556522826624068279430455933⟩,⟨-1121008776750763536467085681576508492461011718263053318165161,-1121008776750763536467085681576508492450384369898416284043897⟩⟩, + ⟨⟨-841497024979908779662793480564746315335629073012725816273574,-841497024979908779662793480564746315302739336650648527465682⟩,⟨-530984242622468915817790625379992691322925434006857952993064,-530984242622468915817790625379992691290035701784433151349953⟩⟩, + ⟨⟨-1829095289378406254482923044729394898652188723628191062883116,-1829095289378406254482923044729394898550412812839749305213994⟩,⟨3993837815412523754966373456987727649130448095636943922820052,3993837815412523754966373456987727649232224012617452272468790⟩⟩, + ⟨⟨-1242950783778116894475798936050070671201737039477009808285491,-1242950783778116894475798936050070670886805819459924246128585⟩,⟨4731659446453817158441276292761447091170539782248507502325994,4731659446453817158441276292761447091485470993160115949187806⟩⟩, + ⟨⟨901339404704036405765308325039959100864180011495495472791986,901339404704036405765308325039959101838682612964895482039638⟩,⟨980714619102555931115762168789675921980131418830792878115053,980714619102555931115762168789675922954634033522577375035815⟩⟩, + ⟨⟨134933479342122020923095880818356299635523641645327058784866,134933479342122020923095880818356302650955845183741699322629⟩,⟨-250441022487950603356984063488132477648263170849759277043524,-250441022487950603356984063488132474632830986413123070845122⟩⟩, + ⟨⟨-2889450827866001743028935483364600958430044774322278000384363,-2889450827866001743028935483364600949099306917745259921299820⟩,⟨-2158440725242289687679159534245333213337609291833276486697713,-2158440725242289687679159534245333204006871407687507626658554⟩⟩, + ⟨⟨-2088980765480347785649045523925948422328164781181657040907853,-2088980765480347785649045523925948393455797900317679424343372⟩,⟨-1196944014492146480511454820272565736619346017995368371490963,-1196944014492146480511454820272565707746979176914788728133865⟩⟩, + ⟨⟨-1249303987978785148392932270700133059417139682914314008410441,-1249303987978785148392932270700132970076556649087654543428129⟩,⟨781269510372114663792792468177562017988140197924245102052322,781269510372114663792792468177562107328723289156643515617571⟩⟩, + ⟨⟨1109688700594969116086762247363932411930589368109148567877701,1109688700594969116086762247363932688379687359468702370203153⟩,⟨-490680765332304413541039565847551680942594552911405273019935,-490680765332304413541039565847551404493496644383587477453345⟩⟩, + ⟨⟨1632871574706939350348720073353156030103732222742778957314150,1632871574706939350348720073353156885528010022816251224439768⟩,⟨-1440935404311204426605243448647971857607663384275929656845514,-1440935404311204426605243448647971002183385464683741267278267⟩⟩, + ⟨⟨175886518778109536558524572450592992178189284207505999186556,175886518778109536558524572450595639141773525037395197500813⟩,⟨-305567604364255416675318168040277796429834241315060918697889,-305567604364255416675318168040275149466250172939789722409709⟩⟩, + ⟨⟨-246513666864877417759498481296310577343759380164147380848626,-246513666864877417759498481296302386769330911334689526186215⟩,⟨-246513666864877417759498481296310577343759504582308355369232,-246513666864877417759498481296302386769330786916539751387109⟩⟩, + ⟨⟨342020143325668733044099614682246908599803073492178609074678,342020143325668733044099614682272252926363661536124732756409⟩,⟨939692620785908384054109277324718797772928019766570089464509,939692620785908384054109277324744142099488248762365699560901⟩⟩, + ⟨⟨-39211833943912350493900778248,39211833943912350493902982417⟩,⟨-39211833944171387398005210764,39211833944171387398006150440⟩⟩, + ⟨⟨-121334288965435312593627614730,121334288965435312593629313862⟩,⟨-121334288965061545913201840468,121334288965061545913200018092⟩⟩] +lemma restBox7_calc (j : Fin 31) : recoverRest phaseBox7 restBox7 j = restBox7 j := by + revert j + decide +kernel +lemma restBox7_mem (j : Fin 31) : (restBox7 j).Mem ((restPolynomial ⟨4,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨4,by norm_num⟩ phaseBox7 + · have hr : residue ⟨4,by norm_num⟩ = (7:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox7_mem + · exact restBox7_calc +def cBox7 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨10418529357494547381300296597045329845068072893287803787370,10418529357494547381300296597045329845068072893315929507905⟩,⟨-28624674153641342903597614282063769361566618192227664229079,-28624674153641342903597614282063769361566618192199409496302⟩⟩, + ⟨⟨-7509235714253920232838064955834716248347259132562987419194,-7509235714253920232838064955834716248347259131996996166254⟩,⟨7509235714253920232838064955834716248347259131997180212836,7509235714253920232838064955834716248347259132563144616826⟩⟩, + ⟨⟨5357809752545419755764515889149380569211502603878860165129,5357809752545419755764515889149380569211502610248854289353⟩,⟨9308121521184528291954824159550550848464515168299328735854,9308121521184528291954824159550550848464515174669522142738⟩⟩, + ⟨⟨49740112593028765574357163608292822474785977226868545977842,49740112593028765574357163608292822474785977277425481188632⟩,⟨43893402494059683888866544216759155523444029429723315439943,43893402494059683888866544216759155523444029480279583647177⟩⟩, + ⟨⟨33803050874170489988303691437347767515820299955356646671301,33803050874170489988303691437347767515820300267903925244362⟩,⟨14946990867449402539614548792702473980315691853579131451891,14946990867449402539614548792702473980315692166127053709378⟩⟩, + ⟨⟨-38055975734734274920007803100166521663631428322898542959083,-38055975734734274920007803100166521663631426726175794647268⟩,⟨-23798830240757874067377565132660970840774551580566094937794,-23798830240757874067377565132660970840774549983839203805733⟩⟩, + ⟨⟨-63633993076468696976011006099943188745384411788441831054304,-63633993076468696976011006099943188745384404757598368864753⟩,⟨36460999732374240580091803746531394625031629001370789669331,36460999732374240580091803746531394625031636032180271047401⟩⟩, + ⟨⟨-88017705578511054248272639605993386190225719676074503945904,-88017705578511054248272639605993386190225692077890887054495⟩,⟨65749864448585831403947273135173936122999424590181578278377,65749864448585831403947273135173936122999452188497020959013⟩⟩, + ⟨⟨4110308832004035653488103502900775162587179721767121001310,4110308832004035653488103502900775162587279100996278610145⟩,⟨7628869807902457741455914363961597237620502005939169594733,7628869807902457741455914363961597237620601384820681908320⟩⟩, + ⟨⟨27456368381303148941700505651964321648584504721212232143052,27456368381303148941700505651964321648584841226851067354720⟩,⟨-29874275681812530839267214391716508155935840223414489547522,-29874275681812530839267214391716508155935503716937081550632⟩⟩, + ⟨⟨-37862446067635710723853266524430712285886367692057808841194,-37862446067635710723853266524430712285885273819752462812432⟩,⟨-144134589188816766120776605320194517972889934444950792350903,-144134589188816766120776605320194517972888840575107958728205⟩⟩, + ⟨⟨-55717428759447322075265775556947068802152507916101316961383,-55717428759447322075265775556947068802149038942290786729173⟩,⟨-121659257037754796029528978434130885369024549572342570547865,-121659257037754796029528978434130885369021080591439936950606⟩⟩, + ⟨⟨-25633465250757128519271554480928865854432441362051549245719,-25633465250757128519271554480928865854421587651221816132814⟩,⟨16174704993505614233285762222089071561655631438729284378839,16174704993505614233285762222089071561666485133345517146951⟩⟩, + ⟨⟨66707017186790767952685539845954535442870471739582161628465,66707017186790767952685539845954535442904208095343648721099⟩,⟨34147880113207203937091553486344969025766748189463291879653,34147880113207203937091553486344969025800484575632243940518⟩⟩, + ⟨⟨237674106408941864895840587583179054262162347063678734449317,237674106408941864895840587583179054262266910262475458636615⟩,⟨-52281573652975945245,52281573652975941876⟩⟩, + ⟨⟨66707017186790767952685539845954535442725476186704471025250,66707017186790767952685539845954535443049203648221339317876⟩,⟨-34147880113207203937091553486344969025945480154448388136706,-34147880113207203937091553486344969025621752610647147689257⟩⟩, + ⟨⟨-25633465250757128519271554480928865854927953838040817870702,-25633465250757128519271554480928865853926075175232547520827⟩,⟨-16174704993505614233285762222089071562161997554390992855835,-16174704993505614233285762222089071561160119017683808667676⟩⟩, + ⟨⟨-55717428759447322075265775556947068803700909196237097577474,-55717428759447322075265775556947068800600637662155006121580⟩,⟨121659257037754796029528978434130885367472679220539430710539,121659257037754796029528978434130885370572950943243076804791⟩⟩, + ⟨⟨-37862446067635710723853266524430712290682497538499498282761,-37862446067635710723853266524430712281089143973310773359217⟩,⟨144134589188816766120776605320194517968092710866119022052586,144134589188816766120776605320194517977686064153939729046808⟩⟩, + ⟨⟨27456368381303148941700505651964321633742149572279371617639,27456368381303148941700505651964321663427196375783927906067⟩,⟨29874275681812530839267214391716508141093148367035067404713,29874275681812530839267214391716508170778195573316503692296⟩⟩, + ⟨⟨4110308832004035653488103502900775116659570542200637705282,4110308832004035653488103502900775208514888280562761914647⟩,⟨-7628869807902457741455914363961597283548210273624276069280,-7628869807902457741455914363961597191692893117135575460645⟩⟩, + ⟨⟨-88017705578511054248272639605993386332340970405815732282030,-88017705578511054248272639605993386048110441348149658745209⟩,⟨-65749864448585831403947273135173936265114703338068351997783,-65749864448585831403947273135173935980884173440610247258723⟩⟩, + ⟨⟨-63633993076468696976011006099943189185135703392220535544335,-63633993076468696976011006099943188305633113153819664407565⟩,⟨-36460999732374240580091803746531395064782927030040077374200,-36460999732374240580091803746531394185280338003510983320702⟩⟩, + ⟨⟨-38055975734734274920007803100166523024366321824760872083989,-38055975734734274920007803100166520302896533224313465514293⟩,⟨23798830240757874067377565132660969480039655607639587517554,23798830240757874067377565132660972201509445956765711270113⟩⟩, + ⟨⟨33803050874170489988303691437347763305259753487084465797656,33803050874170489988303691437347771726380846736176106165498⟩,⟨-14946990867449402539614548792702478190876237372799367797300,-14946990867449402539614548792702469769755146646906817354136⟩⟩, + ⟨⟨49740112593028765574357163608292809445929160933796126885211,49740112593028765574357163608292835503642793570497900308176⟩,⟨-43893402494059683888866544216759168552300847593726463738455,-43893402494059683888866544216759142494587211316276435392978⟩⟩, + ⟨⟨5357809752545419755764515889149340253650637566079382875187,5357809752545419755764515889149420884772367648048331542649⟩,⟨-9308121521184528291954824159550591164025377585834874065046,-9308121521184528291954824159550510532903652757133976857084⟩⟩, + ⟨⟨-7509235714253920232838064955834840997929707690794409166329,-7509235714253920232838064955834591498764810573765574478649⟩,⟨-7509235714253920232838064955834840997929711480788326232914,-7509235714253920232838064955834591498764806783771998575095⟩⟩, + ⟨⟨10418529357494547381300296597044943828899916989465883810347,10418529357494547381300296597045715861236228797137849482920⟩,⟨28624674153641342903597614282063383345398467756993555540937,28624674153641342903597614282064155377734768627433518253615⟩⟩, + ⟨⟨-1194460768109945792950781064,1194460768109945792950848207⟩,⟨-1194460768117836508286563994,1194460768117836508286592618⟩⟩] +lemma cBox7_calc (j : Fin 31) : cCoeffBox restBox7 j = cBox7 j := by + revert j + decide +kernel +lemma cBox7_mem (j : Fin 31) : (cBox7 j).Mem (cCoefficient ⟨4,by norm_num⟩ j) := by + rw [← cBox7_calc] + exact cCoeffBox_mem ⟨4,by norm_num⟩ restBox7 restBox7_mem j +def dBox7 : Fin 31 → CI := + ![⟨⟨-50906230822,52625670101⟩,⟨87266462599716478846184538424430635672143594427034322360779,87266462599716478846184538424430635672143594427138177642275⟩⟩, + ⟨⟨12857354874567913519841347642504362883216142939672660061547,12857354874567913519841347642504362883216142941750919308168⟩,⟨-27572686507958198513147578351026046405028879840484576875770,-27572686507958198513147578351026046405028879838406316759717⟩⟩, + ⟨⟨-79637379670349583992794578166399770257764864418094730890415,-79637379670349583992794578166399770257764864394601136846005⟩,⟨47041994810902043904089784075808370606840687191941990873560,47041994810902043904089784075808370606840687215435829944856⟩⟩, + ⟨⟨-149336181839478271622650209607928595407769882778170655945566,-149336181839478271622650209607928595407769882590455731611585⟩,⟨-82283183723363853841780708012936955700962478189876136723454,-82283183723363853841780708012936955700962478002162557550507⟩⟩, + ⟨⟨-110946913346870379921289029357933553247009749699602350298043,-110946913346870379921289029357933553247009748528589057016026⟩,⟨-37424184198063284701723429399378371912813499259205647570713,-37424184198063284701723429399378371912813498088191001470153⟩⟩, + ⟨⟨34871958806900217767181397003796513891332384743442562863524,34871958806900217767181397003796513891332390791987987906139⟩,⟨-140118983056299762701352785020324224329480601749917678825444,-140118983056299762701352785020324224329480595701365773894360⟩⟩, + ⟨⟨59225764535476959834945930558390873542060228968576877061987,59225764535476959834945930558390873542060255932275215471376⟩,⟨-233861722824026611984891540336725309174974970023971013679618,-233861722824026611984891540336725309174974943060328756222192⟩⟩, + ⟨⟨251651802984221159988421230709758327497339493561837340036218,251651802984221159988421230709758327497339600760897062323279⟩,⟨-161886346707445246676559305981991369784561781298776643180508,-161886346707445246676559305981991369784561674099484048751043⟩⟩, + ⟨⟨188489180423934660731141422275046334749853636937437277397718,188489180423934660731141422275046334749854027657462858952712⟩,⟨-52313937869636745271689587136145061116754932740448493428106,-52313937869636745271689587136145061116754542021076539910633⟩⟩, + ⟨⟨256726413310086561297183187145562146834857678546172488283743,256726413310086561297183187145562146834859015476864498744458⟩,⟨16565451157827194514200858984828854779076553066644286286222,16565451157827194514200858984828854779077889998997245210405⟩⟩, + ⟨⟨239561659206079747230586298432101351708054946035130098045539,239561659206079747230586298432101351708059327457031493346358⟩,⟨326350714114826777905596572153666713233787554907585910877682,326350714114826777905596572153666713233791936324674957807264⟩⟩, + ⟨⟨166011720439607261140270631775496585393004052961139655851956,166011720439607261140270631775496585393018026067621103166372⟩,⟨326436482826874819126047531568882090998387794563617920545645,326436482826874819126047531568882090998401767683678167843043⟩⟩, + ⟨⟨13858793513509547446850748240510488772503023037220484427199,13858793513509547446850748240510488772546892591918293575120⟩,⟨356452848551332215120554873932884519926223981295360249679320,356452848551332215120554873932884519926267850818081044990618⟩⟩, + ⟨⟨-182246457101120321030550091126100444634115876962262167921662,-182246457101120321030550091126100444633979265034808020096722⟩,⟨355535843847510148051367987736493850798072964784689095281271,355535843847510148051367987736493850798209576776350441353578⟩⟩, + ⟨⟨-554969644442649694436752473313240883218652065214051462336594,-554969644442649694436752473313240883218228273247757438588214⟩,⟨214450202981646454168531579929041947902953902226490751513736,214450202981646454168531579929041947903377694076862441149885⟩⟩, + ⟨⟨-292236143387831555904771624423127477015099068958375160266568,-292236143387831555904771624423127477013786520121720529123568⟩,⟨-656274514802956987871,656274514802956997250⟩⟩, + ⟨⟨-554969644442649694436752473313240883220471506003617041790804,-554969644442649694436752473313240883216408832458191859107989⟩,⟨-214450202981646454168531579929041947905197134772352954863538,-214450202981646454168531579929041947901134461531000237800455⟩⟩, + ⟨⟨-182246457101120321030550091126100444640333753540604695623538,-182246457101120321030550091126100444627761388456465492377052⟩,⟨-355535843847510148051367987736493850804427453554512797282097,-355535843847510148051367987736493850791855088006526739384445⟩⟩, + ⟨⟨13858793513509547446850748240510488753072977290209393107262,13858793513509547446850748240510488791976938338929384880817⟩,⟨-356452848551332215120554873932884519945697896235669707934543,-356452848551332215120554873932884519906793935877771586771996⟩⟩, + ⟨⟨166011720439607261140270631775496585332819873373378158536069,166011720439607261140270631775496585453202205655382600452765⟩,⟨-326436482826874819126047531568882091058585947770948024867415,-326436482826874819126047531568882090938203614476348063529932⟩⟩, + ⟨⟨239561659206079747230586298432101351521805665183530474562151,239561659206079747230586298432101351894308608308631116821575⟩,⟨-326350714114826777905596572153666713420041216443081393524805,-326350714114826777905596572153666713047538274789179475145665⟩⟩, + ⟨⟨256726413310086561297183187145562146258534996560692474211663,256726413310086561297183187145562147411181697462344512836574⟩,⟨-16565451157827194514200858984828855355400573047413175544149,-16565451157827194514200858984828854202753870018228355949791⟩⟩, + ⟨⟨188489180423934660731141422275046332966520075732009789612954,188489180423934660731141422275046336533187588862890346755386⟩,⟨52313937869636745271689587136145059333420982350952561999586,52313937869636745271689587136145062900088492410572471312133⟩⟩, + ⟨⟨251651802984221159988421230709758321979119333525636952490332,251651802984221159988421230709758333015559760797097449857820⟩,⟨161886346707445246676559305981991364266341511847403106626424,161886346707445246676559305981991375302781943550857585271812⟩⟩, + ⟨⟨59225764535476959834945930558390856466875038246887107545348,59225764535476959834945930558390890617245446653964984960480⟩,⟨233861722824026611984891540336725292099789755536214933117103,233861722824026611984891540336725326250160157548084836778154⟩⟩, + ⟨⟨34871958806900217767181397003796461055102932204973042521349,34871958806900217767181397003796566727561843330457508240900⟩,⟨140118983056299762701352785020324171493251138548995911511508,140118983056299762701352785020324277165710058902287541227209⟩⟩, + ⟨⟨-110946913346870379921289029357933716739651848511697757886028,-110946913346870379921289029357933389754367649716493649404917⟩,⟨37424184198063284701723429399378208420171405933551315748748,37424184198063284701723429399378535405455591413845333300490⟩⟩, + ⟨⟨-149336181839478271622650209607929101307685400908173327637356,-149336181839478271622650209607928089507854364460453059896571⟩,⟨82283183723363853841780708012936449801046950266056423690372,82283183723363853841780708012937461600878005925982270559993⟩⟩, + ⟨⟨-79637379670349583992794578166401335678209759664557109059879,-79637379670349583992794578166398204837319969148138758682943⟩,⟨-47041994810902043904089784075809936027285568601166108439314,-47041994810902043904089784075806805186395805806211712414112⟩⟩, + ⟨⟨12857354874567913519841347642499518958372360996106785114326,12857354874567913519841347642509206808059924885316794228084⟩,⟨27572686507958198513147578351021202480185077895065798365325,27572686507958198513147578351030890329872681783825095258925⟩⟩, + ⟨⟨-14988693912197598164293063394,14988693912197598166012490855⟩,⟨-87266462599716478846184538424445624366055763167396793605629,-87266462599716478846184538424415646978231425686775706381508⟩⟩] +lemma dBox7_calc (j : Fin 31) : dCoeffBox phaseBox7 restBox7 j = dBox7 j := by + revert j + decide +kernel +lemma dBox7_mem (j : Fin 31) : (dBox7 j).Mem (dCoefficient ⟨4,by norm_num⟩ j) := by + rw [← dBox7_calc] + apply dCoeffBox_mem ⟨4,by norm_num⟩ phaseBox7 restBox7 + · have hr : residue ⟨4,by norm_num⟩ = (7:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox7_mem + · exact restBox7_mem +def restBox9 : Fin 31 → CI := + ![⟨⟨-370386070545,351503715615⟩,⟨-1000000000000000000000000000000000000000000000000360933449647,-999999999999999999999999999999999999999999999999639066584377⟩⟩, + ⟨⟨-267949192431122706472553658494127633057194746196657705768465,-267949192431122706472553658494127633057194746182554673969061⟩,⟨999999999999999999999999999999999999999999999992944157237150,1000000000000000000000000000000000000000000000007046495526604⟩⟩, + ⟨⟨1133974596215561353236276829247063816528597373017935845143496,1133974596215561353236276829247063816528597373171681568621576⟩,⟨35898384862245412945107316988255266114389492302355082754507,35898384862245412945107316988255266114389492456109481349218⟩⟩, + ⟨⟨1535898384862245412945107316988255266114389491792008423429527,1535898384862245412945107316988255266114389492966475351723490⟩,⟨-267949192431122706472553658494127633057194746776838373445398,-267949192431122706472553658494127633057194745602411205847772⟩⟩, + ⟨⟨-1133974596215561353236276829247063816528597376555008526223611,-1133974596215561353236276829247063816528597369634587909203003⟩,⟨-35898384862245412945107316988255266114389495839474227130112,-35898384862245412945107316988255266114389488918967449258807⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000000016631904288416306,-1999999999999999999999999999999999999999999983368070301657931⟩,⟨1999999999999999999999999999999999999999999983368057711931761,2000000000000000000000000000000000000000000016631975580086093⟩⟩, + ⟨⟨1999999999999999999999999999999999999999999932229175670224741,2000000000000000000000000000000000000000000067770805878498896⟩,⟨2464101615137754587054892683011744733885610439850778441686762,2464101615137754587054892683011744733885610575390733141059531⟩⟩, + ⟨⟨-535898384862245412945107316988255266114389733581667849040730,-535898384862245412945107316988255266114389251176857882773031⟩,⟨-2000000000000000000000000000000000000000000241206573037544972,-1999999999999999999999999999999999999999999758793382974977294⟩⟩, + ⟨⟨-3732050807568877293527446341505872366942806022765358064590990,-3732050807568877293527446341505872366942804484855437195235965⟩,⟨-2464101615137754587054892683011744733885611276561603531106043,-2464101615137754587054892683011744733885609738679886320837241⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000002245449378027322102,-1999999999999999999999999999999999999999997754550627307196149⟩,⟨3464101615137754587054892683011744733885608262128644133368794,3464101615137754587054892683011744733885612753112825315745521⟩⟩, + ⟨⟨2330127018922193233818615853764680917357007003684780545818946,2330127018922193233818615853764680917357019265367065952231973⟩,⟨-964101615137754587054892683011744733885616638325688609359935,-964101615137754587054892683011744733885604376915885308475555⟩⟩, + ⟨⟨1267949192431122706472553658494127633057178803636051646335768,1267949192431122706472553658494127633057210688743159688358140⟩,⟨-6196152422706631880582339024517617100828431704405575326433325,-6196152422706631880582339024517617100828399818456727550984578⟩⟩, + ⟨⟨-3133974596215561353236276829247063816528637493286942091572167,-3133974596215561353236276829247063816528557252902614736350150⟩,⟨-1500000000000000000000000000000000000000040119025899502329482,-1499999999999999999999999999999999999999959880974141783558946⟩⟩, + ⟨⟨-98932815459049250633,98932815527502287673⟩,⟨3071796769724490825890214633976510532228680048956243739437391,3071796769724490825890214633976510532228877920560643681461073⟩⟩, + ⟨⟨9071796769724490825890214633976510532228537763460464362627737,9071796769724490825890214633976510532229020206056488473260092⟩,⟨-241213901535312810146,241213901535313435906⟩⟩, + ⟨⟨-584765727740203420685,584765727808657664863⟩,⟨-3071796769724490825890214633976510532229363768537082436911563,-3071796769724490825890214633976510532228194200979804984360582⟩⟩, + ⟨⟨-3133974596215561353236276829247063816530011391451517722762447,-3133974596215561353236276829247063816527183354738039105968773⟩,⟨1499999999999999999999999999999999999998586025398265201101575,1500000000000000000000000000000000000001413974601776083628485⟩⟩, + ⟨⟨1267949192431122706472553658494127633053779279048136223442730,1267949192431122706472553658494127633060610213331075110053838⟩,⟨6196152422706631880582339024517617100825000188495582773962370,6196152422706631880582339024517617100831831334366720104715709⟩⟩, + ⟨⟨2330127018922193233818615853764680917348765866895869820940886,2330127018922193233818615853764680917365260402155976678725921⟩,⟨964101615137754587054892683011744733877363495522219873959972,964101615137754587054892683011744733893857519719354045127257⟩⟩, + ⟨⟨-2000000000000000000000000000000000000019910927032985957536430,-1999999999999999999999999999999999999980089072967019375769284⟩,⟨-3464101615137754587054892683011744733905522051616462455166531,-3464101615137754587054892683011744733865698963625006995901563⟩⟩, + ⟨⟨-3732050807568877293527446341505872366990876480333912394855974,-3732050807568877293527446341505872366894734027286882867358290⟩,⟨2464101615137754587054892683011744733837540770590914143427648,2464101615137754587054892683011744733933680244650575707368180⟩⟩, + ⟨⟨-535898384862245412945107316988255266230440359837165952541178,-535898384862245412945107316988255265998338624921359780450065⟩,⟨1999999999999999999999999999999999999883945536581640995433186,2000000000000000000000000000000000000116054463418315019916316⟩⟩, + ⟨⟨1999999999999999999999999999999999999719819627868841513265300,2000000000000000000000000000000000000280180372131140038644236⟩,⟨-2464101615137754587054892683011744734165782198332469240488576,-2464101615137754587054892683011744733605438816909042341035504⟩⟩, + ⟨⟨-2000000000000000000000000000000000000676394337911855841292272,-1999999999999999999999999999999999999323605662088118747593235⟩,⟨-2000000000000000000000000000000000000676415296713663345297818,-1999999999999999999999999999999999999323584703286369950254498⟩⟩, + ⟨⟨-1133974596215561353236276829247063818161608369699933101429765,-1133974596215561353236276829247063814895586376489663337938445⟩,⟨35898384862245412945107316988255264481429094797875023654069,35898384862245412945107316988255267747349889960566651571185⟩⟩, + ⟨⟨1535898384862245412945107316988255262172074350180499655559228,1535898384862245412945107316988255270056704634577984118388073⟩,⟨267949192431122706472553658494127629114757447141378292258963,267949192431122706472553658494127636999632045237871291374087⟩⟩, + ⟨⟨1133974596215561353236276829247063807010711776184265241356992,1133974596215561353236276829247063826046482970005352177079299⟩,⟨-35898384862245412945107316988255275631980176566977127386843,-35898384862245412945107316988255256596798808191487435469869⟩⟩, + ⟨⟨-267949192431122706472553658494127656034691257190270970678753,-267949192431122706472553658494127610079698235188941407831822⟩,⟨-1000000000000000000000000000000000022978208493295750763780628,-999999999999999999999999999999999977021791506704239893989899⟩⟩, + ⟨⟨-55474302583564478668646631,55474302583564459780887055⟩,⟨999999999999999999999999999999999944527416293748507047986784,1000000000000000000000000000000000055472583706251492950845163⟩⟩, + ⟨⟨-133922663923509985642515723,133922663923509985641269055⟩,⟨-133926813660431028469465035,133926813660431028475262425⟩⟩, + ⟨⟨-323327929904426892419904281,323327929904426892426026355⟩,⟨-323317911553271830476576340,323317911553271830477872734⟩⟩] +lemma restBox9_calc (j : Fin 31) : recoverRest phaseBox9 restBox9 j = restBox9 j := by + revert j + decide +kernel +lemma restBox9_mem (j : Fin 31) : (restBox9 j).Mem ((restPolynomial ⟨5,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨5,by norm_num⟩ phaseBox9 + · have hr : residue ⟨5,by norm_num⟩ = (9:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox9_mem + · exact restBox9_calc +def cBox9 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-11282604915,10707415501⟩,⟨-30461741978670859934674354937889355355906479651988824550517,-30461741978670859934674354937889355355906479651966641302835⟩⟩, + ⟨⟨-8162199163230086799154349223237515385498962031409200157909,-8162199163230086799154349223237515385498962030979545279929⟩,⟨30461741978670859934674354937889355355906479651762702701727,30461741978670859934674354937889355355906479652192478417488⟩⟩, + ⟨⟨34542841560285903334251529549508113048655960665233299002586,34542841560285903334251529549508113048655960669916881468076⟩,⟨1093527337124743630971520977530353093044684234058668344067,1093527337124743630971520977530353093044684238742302123769⟩⟩, + ⟨⟨46786140305131033532983053384364386126904403696479074033154,46786140305131033532983053384364386126904403732255680415173⟩,⟨-8162199163230086799154349223237515385498962049082513957686,-8162199163230086799154349223237515385498962013307364643391⟩⟩, + ⟨⟨-34542841560285903334251529549508113048655960772978914280032,-34542841560285903334251529549508113048655960562170627153898⟩,⟨-1093527337124743630971520977530353093044684341805486029478,-1093527337124743630971520977530353093044684130994787238694⟩⟩, + ⟨⟨-60923483957341719869348709875778710711812959810592436825510,-60923483957341719869348709875778710711812958797317720848540⟩,⟨60923483957341719869348709875778710711812958797317337343529,60923483957341719869348709875778710711812959810594608493941⟩⟩, + ⟨⟨60923483957341719869348709875778710711812957239537907511361,60923483957341719869348709875778710711812961368372462135226⟩,⟨75060827609552406205714366367193035296721512829151680924666,75060827609552406205714366367193035296721516957935286629821⟩⟩, + ⟨⟨-16324398326460173598308698446475030770997931409835760527768,-16324398326460173598308698446475030770997916714944806141195⟩,⟨-60923483957341719869348709875778710711812966651528051206931,-60923483957341719869348709875778710711812951956381540562509⟩⟩, + ⟨⟨-113684768751453352939543070528319906038126980000424635193031,-113684768751453352939543070528319906038126933153008715492825⟩,⟨-75060827609552406205714366367193035296721538316821423411503,-75060827609552406205714366367193035296721491470264882184886⟩⟩, + ⟨⟨-60923483957341719869348709875778710711813027704255239413088,-60923483957341719869348709875778710711812890903655854790298⟩,⟨105522569588223266140388721305082390652627926143919560347670,105522569588223266140388721305082390652628062947121589595266⟩⟩, + ⟨⟨70979728027937362806137191755574277603971847121844173218071,70979728027937362806137191755574277603972220634046627578478⟩,⟨-29368214641546116303702833960359002262861982167528788736116,-29368214641546116303702833960359002262861608663626878875255⟩⟩, + ⟨⟨38623941141900946733828704161126870741404956045219123054166,38623941141900946733828704161126870741405927321125056402189⟩,⟨-188745596361005759145257436895512941334848957121033972539901,-188745596361005759145257436895512941334847985819486224914892⟩⟩, + ⟨⟨-95466325517627623203600239425286823760470142102471761831227,-95466325517627623203600239425286823760467697840587504793743⟩,⟨-45692612968006289902011532406834033033860941573382131086950,-45692612968006289902011532406834033033858497382552325331635⟩⟩, + ⟨⟨-3013665897737017992,3013665899822216713⟩,⟨93572280610262067065966106768728772253805793671854167824026,93572280610262067065966106768728772253811821185612900191285⟩⟩, + ⟨⟨276342732482287226674012236396064904389240337319660244966488,276342732482287226674012236396064904389255033361541610817247⟩,⟨-7347795630237217621,7347795630237236774⟩⟩, + ⟨⟨-17812982716391769518,17812982718477005071⟩,⟨-93572280610262067065966106768728772253826620961312036919079,-93572280610262067065966106768728772253790993896155031107615⟩⟩, + ⟨⟨-95466325517627623203600239425286823760511993433866034181660,-95466325517627623203600239425286823760425846509193232467982⟩,⟨45692612968006289902011532406834033033816647348484014610954,45692612968006289902011532406834033033902791607450441772284⟩⟩, + ⟨⟨38623941141900946733828704161126870741301400604371896060208,38623941141900946733828704161126870741509482761972283359551⟩,⟨188745596361005759145257436895512941334744427168786873876219,188745596361005759145257436895512941334952515771733323616987⟩⟩, + ⟨⟨70979728027937362806137191755574277603720807739369442616662,70979728027937362806137191755574277604223260016521358229091⟩,⟨29368214641546116303702833960359002262610577060936212888255,29368214641546116303702833960359002263113013770219454761294⟩⟩, + ⟨⟨-60923483957341719869348709875778710712419480825790620554384,-60923483957341719869348709875778710711206437782120473611996⟩,⟨-105522569588223266140388721305082390653234534861115721981561,-105522569588223266140388721305082390652021454229925428020931⟩⟩, + ⟨⟨-113684768751453352939543070528319906039591289875674582992085,-113684768751453352939543070528319906036662623277758767766540⟩,⟨75060827609552406205714366367193035295257226967157648424585,75060827609552406205714366367193035298185802819928657136776⟩⟩, + ⟨⟨-16324398326460173598308698446475030774533035643293909776036,-16324398326460173598308698446475030767462812481486656928836⟩,⟨60923483957341719869348709875778710708277738183832123771789,60923483957341719869348709875778710715348180424077468083764⟩⟩, + ⟨⟨60923483957341719869348709875778710703278177100607938343546,60923483957341719869348709875778710720347741507302431400138⟩,⟨-75060827609552406205714366367193035305256032645731912934640,-75060827609552406205714366367193035288186997141355054582574⟩⟩, + ⟨⟨-60923483957341719869348709875778710732417109101260521583726,-60923483957341719869348709875778710691208809506649636054072⟩,⟨-60923483957341719869348709875778710732417747542873363871208,-60923483957341719869348709875778710691208171065038582073968⟩⟩, + ⟨⟨-34542841560285903334251529549508113098400320294492655098416,-34542841560285903334251529549508112998911601040656886455582⟩,⟨1093527337124743630971520977530353043301865943889393979095,1093527337124743630971520977530353142787502528910879253607⟩⟩, + ⟨⟨46786140305131033532983053384364386006814617054102021552635,46786140305131033532983053384364386246994190374632732858958⟩,⟨8162199163230086799154349223237515265405454260499180313796,8162199163230086799154349223237515505592469801890698419513⟩⟩, + ⟨⟨34542841560285903334251529549508112758724585431978323177668,34542841560285903334251529549508113338587335903171857435288⟩,⟨-1093527337124743630971520977530353382967075916729026967663,-1093527337124743630971520977530352803122292556071943462162⟩⟩, + ⟨⟨-8162199163230086799154349223237516085433532065106569647860,-8162199163230086799154349223237514685564391997282175752582⟩,⟨-30461741978670859934674354937889356055862737906856291947733,-30461741978670859934674354937889354655950221397098889324002⟩⟩, + ⟨⟨-1689843891747255419737726,1689843891747254844383656⟩,⟨30461741978670859934674354937889353666114947901923378200508,30461741978670859934674354937889357045698011402032087616227⟩⟩, + ⟨⟨-4079517633534213660319942,4079517633534213660281966⟩,⟨-4079644041749581830965399,4079644041749581831141998⟩⟩] +lemma cBox9_calc (j : Fin 31) : cCoeffBox restBox9 j = cBox9 j := by + revert j + decide +kernel +lemma cBox9_mem (j : Fin 31) : (cBox9 j).Mem (cCoefficient ⟨5,by norm_num⟩ j) := by + rw [← cBox9_calc] + exact cCoeffBox_mem ⟨5,by norm_num⟩ restBox9 restBox9_mem j +def dBox9 : Fin 31 → CI := + ![⟨⟨-30923612170,32643051449⟩,⟨87266462599716478846184538424430635672143594427054328781012,87266462599716478846184538424430635672143594427118171222183⟩⟩, + ⟨⟨23382978179914803476195888712014960320615001512493879330783,23382978179914803476195888712014960320615001513725398056837⟩,⟨-87266462599716478846184538424430635672143594427701682524998,-87266462599716478846184538424430635672143594426470020971659⟩⟩, + ⟨⟨-98957951689673880584282482780438115832451095190381487096765,-98957951689673880584282482780438115832451095176900093306985⟩,⟨84133737539745111316885030212616032866985388607667278962474,84133737539745111316885030212616032866985388621149380611832⟩⟩, + ⟨⟨-110649440779631282322380427136445595992758595992060653530901,-110649440779631282322380427136445595992758595888336254749724⟩,⟨-63883484419801675369988649712415675351528592965834839693915,-63883484419801675369988649712415675351528592862114120068880⟩⟩, + ⟨⟨-308670315674931,308668490113275⟩,⟨-308674620800051,308672460987551⟩⟩, + ⟨⟨40500506239886871893792761000400715030913589898207068313620,40500506239886871893792761000400715030913592903519203619067⟩,⟨-151149947019518154216173188136846311023672188843720950533018,-151149947019518154216173188136846311023672185838404612762080⟩⟩, + ⟨⟨-75574973509759077108086594068423155511836099886612463607379,-75574973509759077108086594068423155511836087454449782042997⟩,⟨-211900706379348462056862329637447383570042580658371758301655,-211900706379348462056862329637447383570042568226347339581214⟩⟩, + ⟨⟨221298881559262564644760854272891191985517169380103859064395,221298881559262564644760854272891191985517214380686719633537⟩,⟨-22500663708280804,22500657069265169⟩⟩, + ⟨⟨151149947019518154216173188136846311023672114322962264992947,151149947019518154216173188136846311023672260359166015903378⟩,⟨-73016799063760448,73016796756729058⟩⟩, + ⟨⟨221298881559262564644760854272891191985516974879089072181829,221298881559262564644760854272891191985517408881703511438727⟩,⟨-127766968839603350739977299424831350703057402833350835278034,-127766968839603350739977299424831350703056968822550178143231⟩⟩, + ⟨⟨122340929869588684060478371492453076153065494575954909619430,122340929869588684060478371492453076153066698817557867872334⟩,⟨299167168979064940903046868061878019242185566761763991564447,299167168979064940903046868061878019242186770977127729640718⟩⟩, + ⟨⟨63883484419801675369988649712415675351527005711296013986330,63883484419801675369988649712415675351530180116658385794300⟩,⟨238416409619234633062357726561276946695814194525014296016601,238416409619234633062357726561276946695817369011288086584757⟩⟩, + ⟨⟨70148934539744410428587666136044880961840968375261635995156,70148934539744410428587666136044880961849040703402836579816⟩,⟨215033431439319829586161837849261986375196744204636943283809,215033431439319829586161837849261986375204816305444954638309⟩⟩, + ⟨⟨-110649440779631282322380427136445595992768620707298970573206,-110649440779631282322380427136445595992748571173099424898048⟩,⟨272651465739178769897551471138048456116402936479192028649604,272651465739178769897551471138048456116422986608126395192408⟩⟩, + ⟨⟨-518172736628284206397608302614205539482895029107956725634870,-518172736628284206397608302614205539482845925754686927183863⟩,⟨130899693899574718269276807636645953508190840711239242239646,130899693899574718269276807636645953508239942570023985037102⟩⟩, + ⟨⟨-59663953363056169541,59663953351548900629⟩,⟨-59665789231704591616,59665789231704624226⟩⟩, + ⟨⟨-518172736628284206397608302614205539483014924340751483999223,-518172736628284206397608302614205539482726030521892168748916⟩,⟨-130899693899574718269276807636645953508359834086253630718743,-130899693899574718269276807636645953508070949195009596566146⟩⟩, + ⟨⟨-110649440779631282322380427136445595993107682112276403077941,-110649440779631282322380427136445595992409509768121992394162⟩,⟨-272651465739178769897551471138048456116762058523248552125487,-272651465739178769897551471138048456116063864564069871793888⟩⟩, + ⟨⟨70148934539744410428587666136044880961001898287098252159091,70148934539744410428587666136044880962688110791566220345462⟩,⟨-215033431439319829586161837849261986376043860389603604428436,-215033431439319829586161837849261986374357700120478293501828⟩⟩, + ⟨⟨63883484419801675369988649712415675349492981009162290475544,63883484419801675369988649712415675353564204818792109303767⟩,⟨-238416409619234633062357726561276946697851456745399444478384,-238416409619234633062357726561276946693780106790902938062444⟩⟩, + ⟨⟨122340929869588684060478371492453076148151380933028779949511,122340929869588684060478371492453076157980812460483997609579⟩,⟨-299167168979064940903046868061878019247100732350999989126742,-299167168979064940903046868061878019237271605387891732087520⟩⟩, + ⟨⟨221298881559262564644760854272891191973652287026464386009995,221298881559262564644760854272891191997382096734328197607501⟩,⟨127766968839603350739977299424831350691191913327115769471290,127766968839603350739977299424831350714922458328785243873757⟩⟩, + ⟨⟨151149947019518154216173188136846310995026831483766479928079,151149947019518154216173188136846311052317543198361800898556⟩,⟨-28644468277686892876731,28644468277689199901601⟩⟩, + ⟨⟨221298881559262564644760854272891191916363302003667254356918,221298881559262564644760854272891192054671081757123324340032⟩,⟨-69156032683962588382257,69156032683969227459616⟩⟩, + ⟨⟨-75574973509759077108086594068423155678793536696458167791148,-75574973509759077108086594068423155344878650644604077793285⟩,⟨211900706379348462056862329637447383403090304611013865642909,211900706379348462056862329637447383736994844273705232234849⟩⟩, + ⟨⟨40500506239886871893792761000400714627855153295832860211370,40500506239886871893792761000400715433972029505893411722796⟩,⟨151149947019518154216173188136846310620601260039402258485372,151149947019518154216173188136846311426743114642723304739439⟩⟩, + ⟨⟨-973099300531343411659438,973099300531341586034111⟩,⟨-973069148943430061604117,973069148943432221409344⟩⟩, + ⟨⟨-110649440779631282322380427136445598341955332765537391914596,-110649440779631282322380427136445593643561859114859516367884⟩,⟨63883484419801675369988649712415673002259063716170864344294,63883484419801675369988649712415677700798122111778095476697⟩⟩, + ⟨⟨-98957951689673880584282482780438121504089454308799651160693,-98957951689673880584282482780438110160812736058481929179051⟩,⟨-84133737539745111316885030212616038538448011406726535581033,-84133737539745111316885030212616027195522765822090123997197⟩⟩, + ⟨⟨23382978179914803476195888712014946628493019065370330232431,23382978179914803476195888712014974012736983960848947156908⟩,⟨87266462599716478846184538424430621979597346941201405984972,87266462599716478846184538424430649364689841912970297442691⟩⟩, + ⟨⟨-33056730854102404089591485,33056730854102405808968159⟩,⟨-87266462599716478846184538424430668727850182120360953386403,-87266462599716478846184538424430602616437006733811546625023⟩⟩] +lemma dBox9_calc (j : Fin 31) : dCoeffBox phaseBox9 restBox9 j = dBox9 j := by + revert j + decide +kernel +lemma dBox9_mem (j : Fin 31) : (dBox9 j).Mem (dCoefficient ⟨5,by norm_num⟩ j) := by + rw [← dBox9_calc] + apply dCoeffBox_mem ⟨5,by norm_num⟩ phaseBox9 restBox9 + · have hr : residue ⟨5,by norm_num⟩ = (9:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox9_mem + · exact restBox9_mem +def restBox12 : Fin 31 → CI := + ![⟨⟨-500000000000000000000000000000000000000000000000501614783846,-499999999999999999999999999999999999999999999999514500834255⟩,⟨-866025403784438646763723170752936183471402626905678977555292,-866025403784438646763723170752936183471402626904692346183342⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999990016663915292,1000000000000000000000000000000000000000000000010013768378936⟩,⟨1732050807568877293527446341505872366942805253800365259264217,1732050807568877293527446341505872366942805253820361498001671⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999886472156547683,500000000000000000000000000000000000000000000113490099350089⟩,⟨-2598076211353315940291169512258808550414207880829073389760285,-2598076211353315940291169512258808550414207880602052392424732⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000911269410354242,-999999999999999999999999999999999999999999999088679217578619⟩,⟨1732050807568877293527446341505872366942805252899089569673915,1732050807568877293527446341505872366942805254721669681505651⟩⟩, + ⟨⟨1999999999999999999999999999999999999999999994281044178437498,2000000000000000000000000000000000000000000005718967031343953⟩,⟨1732050807568877293527446341505872366942805248091408037812722,1732050807568877293527446341505872366942805259529336795645903⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000029788934480247761,-999999999999999999999999999999999999999999970211080269035440⟩,⟨-1732050807568877293527446341505872366942805283599330861160112,-1732050807568877293527446341505872366942805224021375068411787⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000134466852007252806,-999999999999999999999999999999999999999999865533137076550312⟩,⟨1732050807568877293527446341505872366942805119343856381265939,1732050807568877293527446341505872366942805388276914723430734⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000544575871285199866,-999999999999999999999999999999999999999999455424140847550371⟩,⟨1732050807568877293527446341505872366942804709233369833110464,1732050807568877293527446341505872366942805798387404824111692⟩⟩, + ⟨⟨499999999999999999999999999999999999999997962426522407977378,500000000000000000000000000000000000000002037573412475852019⟩,⟨-2598076211353315940291169512258808550414209918286334725579730,-2598076211353315940291169512258808550414205843144795248767273⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000007220014883767123633,-1999999999999999999999999999999999999999992779985126700565970⟩,⟨-7220020776185843208,7220020762636797087⟩⟩, + ⟨⟨-2000000000000000000000000000000000000000024717275076351545385,-1999999999999999999999999999999999999999975282724933923232571⟩,⟨-24717256979890161958,24717256948155683070⟩⟩, + ⟨⟨2999999999999999999999999999999999999999917037195949211816987,3000000000000000000000000000000000000000082962804017742329453⟩,⟨-1732050807568877293527446341505872366942888216667166039432925,-1732050807568877293527446341505872366942722290953648634242596⟩⟩, + ⟨⟨-275654941235961514027,275654941258306067781⟩,⟨-3464101615137754587054892683011744733885886162452067952109463,-3464101615137754587054892683011744733885334852789467798497448⟩⟩, + ⟨⟨-3000000000000000000000000000000000000000911673565585319980372,-2999999999999999999999999999999999999999088326434330734277231⟩,⟨1732050807568877293527446341505872366941893580071795468971720,1732050807568877293527446341505872366943716927548916487839366⟩⟩, + ⟨⟨8999999999999999999999999999999999999996990470718768182653566,9000000000000000000000000000000000000003009529281210668992365⟩,⟨-3009529045908244164974,3009529045908243371055⟩⟩, + ⟨⟨-3000000000000000000000000000000000000009928044280043698817476,-2999999999999999999999999999999999999990071955719872356976526⟩,⟨-1732050807568877293527446341505872366952733298385138783640028,-1732050807568877293527446341505872366932877209235573172550023⟩⟩, + ⟨⟨-32744191244465626490736,32744191244487972223114⟩,⟨3464101615137754587054892683011744733852866316717537302028878,3464101615137754587054892683011744733918354698523998449845194⟩⟩, + ⟨⟨2999999999999999999999999999999999999892011463660955806560446,3000000000000000000000000000000000000107988536339011148290177⟩,⟨1732050807568877293527446341505872366834816717096706633054521,1732050807568877293527446341505872367050793790524108039018338⟩⟩, + ⟨⟨-2000000000000000000000000000000000000356134534161877982055633,-1999999999999999999999999999999999999643865465838132294588374⟩,⟨-356134533772934769050120,356134533772966503581836⟩⟩, + ⟨⟨-2000000000000000000000000000000000001174488954684901549605723,-1999999999999999999999999999999999998825511045315108917232976⟩,⟨-1174488955058476139056612,1174488955058489689910184⟩⟩, + ⟨⟨499999999999999999999999999999999996126679224995226571887158,500000000000000000000000000000000003873320775004708313259649⟩,⟨2598076211353315940291169512258808546540887106049850735280804,2598076211353315940291169512258808554287528655381279237500946⟩⟩, + ⟨⟨-1000000000000000000000000000000000012773736014039527439052131,-999999999999999999999999999999999987226263985960484695810228⟩,⟨-1732050807568877293527446341505872379716541268151922164113165,-1732050807568877293527446341505872354169069239468852493605649⟩⟩, + ⟨⟨-1000000000000000000000000000000000042126211055066924622842600,-999999999999999999999999999999999957873788944933064460453137⟩,⟨-1732050807568877293527446341505872409069016308609017161418289,-1732050807568877293527446341505872324816594199011753941002466⟩⟩, + ⟨⟨-1000000000000000000000000000000000138927064957662564334793177,-999999999999999999999999999999999861072935042337450412608331⟩,⟨1732050807568877293527446341505872228015740295910020614815939,1732050807568877293527446341505872505869870211710685313232256⟩⟩, + ⟨⟨1999999999999999999999999999999999541835619952714726614551954,2000000000000000000000000000000000458164380047285284592880811⟩,⟨-1732050807568877293527446341505872825107185300885351290886167,-1732050807568877293527446341505871908778425206735393543583238⟩⟩, + ⟨⟨-1000000000000000000000000000000001510969797003994550734928491,-999999999999999999999999999999998489030202996005397892841168⟩,⟨-1732050807568877293527446341505873877912602257990815903695818,-1732050807568877293527446341505870855973008249629943344763970⟩⟩, + ⟨⟨499999999999999999999999999999995017007373602514231086775181,500000000000000000000000000000004982992626397485731171562125⟩,⟨2598076211353315940291169512258803567421581483394047317194802,2598076211353315940291169512258813533406834278037078463549213⟩⟩, + ⟨⟨999999999999999999999999999999983566702945380058907967887589,1000000000000000000000000000000016433297054619941122461844097⟩,⟨-1732050807568877293527446341505888800239859873896595237244436,-1732050807568877293527446341505855933645750633724131521562613⟩⟩, + ⟨⟨-500000000000000000000000000000054194993316822105929779799993,-499999999999999999999999999999945805006683177894086336001964⟩,⟨866025403784438646763723170752881988478085804927504534127600,866025403784438646763723170752990378464719448882866792800258⟩⟩, + ⟨⟨-178728425029270456427932046446,178728425029270456427935074168⟩,⟨-178728425029270569749375908762,178728425029270569749374511823⟩⟩, + ⟨⟨-589424372223849901636762021447,589424372223849901636759187793⟩,⟨-589424372223849801498691190926,589424372223849801498689135994⟩⟩] +lemma restBox12_calc (j : Fin 31) : recoverRest phaseBox12 restBox12 j = restBox12 j := by + revert j + decide +kernel +lemma restBox12_mem (j : Fin 31) : (restBox12 j).Mem ((restPolynomial ⟨6,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨6,by norm_num⟩ phaseBox12 + · have hr : residue ⟨6,by norm_num⟩ = (12:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox12_mem + · exact restBox12_calc +def cBox12 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-15230870989335429967337177468944677677953239826004195004570,-15230870989335429967337177468944677677953239825974028831380⟩,⟨-26380642397055816535097180326270597663156998636395315306702,-26380642397055816535097180326270597663156998636365092852016⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651673526155498,30461741978670859934674354937889355355906479652282866717495⟩,⟨52761284794111633070194360652541195326313997272455438060074,52761284794111633070194360652541195326313997273064894213844⟩⟩, + ⟨⟨15230870989335429967337177468944677677953239822530562107067,15230870989335429967337177468944677677953239829446021068013⟩,⟨-79141927191167449605291540978811792989470995912598771568301,-79141927191167449605291540978811792989470995905682812690526⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906479679736683540186,-30461741978670859934674354937889355355906479624217217429494⟩,⟨52761284794111633070194360652541195326313997245001010552114,52761284794111633070194360652541195326313997300520311542997⟩⟩, + ⟨⟨60923483957341719869348709875778710711812959129745915302957,60923483957341719869348709875778710711812959478165357871127⟩,⟨52761284794111633070194360652541195326313997098550656212948,52761284794111633070194360652541195326313997446970226693299⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906480559400665845742,-30461741978670859934674354937889355355906478744555249295417⟩,⟨-52761284794111633070194360652541195326313998180184175345121,-52761284794111633070194360652541195326313996365335522480955⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906483748072380417974,-30461741978670859934674354937889355355906475555882752907987⟩,⟨52761284794111633070194360652541195326313993176675957265611,52761284794111633070194360652541195326314001368845725908280⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906496240707508788551,-30461741978670859934674354937889355355906463063248326648490⟩,⟨52761284794111633070194360652541195326313980683996133288533,52761284794111633070194360652541195326314013861525658101473⟩⟩, + ⟨⟨15230870989335429967337177468944677677953177757951280990422,15230870989335429967337177468944677677953301894024468383774⟩,⟨-79141927191167449605291540978811792989471057977096158949397,-79141927191167449605291540978811792989470933841185553009987⟩⟩, + ⟨⟨-60923483957341719869348709875778710711813179238186131255203,-60923483957341719869348709875778710711812739369725119313489⟩,⟨-219934409964816087,219934409552088520⟩⟩, + ⟨⟨-60923483957341719869348709875778710711813712235211451430658,-60923483957341719869348709875778710711812206372699793261609⟩,⟨-752930704541915487,752930703575227960⟩⟩, + ⟨⟨91385225936012579804023064813668066067716911764402085750984,91385225936012579804023064813668066067721966147463305171717⟩,⟨-52761284794111633070194360652541195326316524465898070153161,-52761284794111633070194360652541195326311470079624940207701⟩⟩, + ⟨⟨-8396929695075537912,8396929695756191977⟩,⟨-105522569588223266140388721305082390652636391471868157673493,-105522569588223266140388721305082390652619597619175011928424⟩⟩, + ⟨⟨-91385225936012579804023064813668066067747210120857124549777,-91385225936012579804023064813668066067691667791006715873644⟩,⟨52761284794111633070194360652541195326286226102567012295809,52761284794111633070194360652541195326341768442952869130433⟩⟩, + ⟨⟨274155677808037739412069194441004198203066641363356585280105,274155677808037739412069194441004198203249992372241963175034⟩,⟨-91675497273772422876,91675497273772398783⟩⟩, + ⟨⟨-91385225936012579804023064813668066068021864479144999921784,-91385225936012579804023064813668066067417013432718840548403⟩,⟨-52761284794111633070194360652541195326616422804949885523343,-52761284794111633070194360652541195326011571740569995884040⟩⟩, + ⟨⟨-997445104989165400686,997445104989846090585⟩,⟨105522569588223266140388721305082390651630549450926697656660,105522569588223266140388721305082390653625439640116471983856⟩⟩, + ⟨⟨91385225936012579804023064813668066064429920025318621760098,91385225936012579804023064813668066071008957886546769184018⟩,⟨52761284794111633070194360652541195323024478330734361157201,52761284794111633070194360652541195329603516214788649154903⟩⟩, + ⟨⟨-60923483957341719869348709875778710722661437593288929741425,-60923483957341719869348709875778710700964481014622315007686⟩,⟨-10848478277485382164713,10848478277486348853810⟩⟩, + ⟨⟨-60923483957341719869348709875778710747589938798365982657641,-60923483957341719869348709875778710676035979809545267885131⟩,⟨-35776979505790055633500,35776979505790468416085⟩⟩, + ⟨⟨15230870989335429967337177468944677559965141777167962374065,15230870989335429967337177468944677795941337874807787040211⟩,⟨79141927191167449605291540978811792871482897870648081597001,79141927191167449605291540978811793107459093947633630314715⟩⟩, + ⟨⟨-30461741978670859934674354937889355745016730215305487938286,-30461741978670859934674354937889354966796229088650347563059⟩,⟨-52761284794111633070194360652541195715424247845288393075109,-52761284794111633070194360652541194937203746700233398330046⟩⟩, + ⟨⟨-30461741978670859934674354937889356639144251350458424468389,-30461741978670859934674354937889354072668707953496708842081⟩,⟨-52761284794111633070194360652541196609551768963068931550623,-52761284794111633070194360652541194043076225582452751553959⟩⟩, + ⟨⟨-30461741978670859934674354937889359587866886246340960367212,-30461741978670859934674354937889351123946073057614954716662⟩,⟨52761284794111633070194360652541191094353590671153722561235,52761284794111633070194360652541199558274403874365975218407⟩⟩, + ⟨⟨60923483957341719869348709875778696755327830485855708631481,60923483957341719869348709875778724668298088122055564471093⟩,⟨-52761284794111633070194360652541209282799126084454235550375,-52761284794111633070194360652541181369828868461066647386620⟩⟩, + ⟨⟨-30461741978670859934674354937889401382678573552346369007348,-30461741978670859934674354937889309329134385751607531957326⟩,⟨-52761284794111633070194360652541241353086091178791765564254,-52761284794111633070194360652541149299541903366729556448028⟩⟩, + ⟨⟨15230870989335429967337177468944525887317572886335549592283,15230870989335429967337177468944829468588906765641033657058⟩,⟨79141927191167449605291540978811641198835328974490714665140,79141927191167449605291540978811944780106662843790869549803⟩⟩, + ⟨⟨30461741978670859934674354937888854769051742967518648375050,30461741978670859934674354937889855942761216336437744419918⟩,⟨-52761284794111633070194360652541695913168733961640533615358,-52761284794111633070194360652540694739459260583879798705484⟩⟩, + ⟨⟨-15230870989335429967337177468946328551856192652636350680894,-15230870989335429967337177468943026804050286999341873160674⟩,⟨26380642397055816535097180326268946789254045813639361718829,26380642397055816535097180326272248537059951459121046537029⟩⟩, + ⟨⟨-5444379167495855480825544275,5444379167495855480825636505⟩,⟨-5444379167495858932794127859,5444379167495858932794085306⟩⟩] +lemma cBox12_calc (j : Fin 31) : cCoeffBox restBox12 j = cBox12 j := by + revert j + decide +kernel +lemma cBox12_mem (j : Fin 31) : (cBox12 j).Mem (cCoefficient ⟨6,by norm_num⟩ j) := by + rw [← cBox12_calc] + exact cCoeffBox_mem ⟨6,by norm_num⟩ restBox12 restBox12_mem j +def dBox12 : Fin 31 → CI := + ![⟨⟨-58547107015,60266546294⟩,⟨87266462599716478846184538424430635672143594427026719566435,87266462599716478846184538424430635672143594427145780436758⟩⟩, + ⟨⟨-1195051335308,1191055070473⟩,⟨-174532925199432957692369076848861271344287188855365162313091,-174532925199432957692369076848861271344287188852978558297341⟩⟩, + ⟨⟨-75574973509759077108086594068423155511836093684120708362741,-75574973509759077108086594068423155511836093656936456431401⟩,⟨218166156499291197115461346061076589180358986054122917910475,218166156499291197115461346061076589180358986081307603910109⟩⟩, + ⟨⟨-109830230664856,109825466116866⟩,⟨-174532925199432957692369076848861271344287188963999663950375,-174532925199432957692369076848861271344287188744343821854377⟩⟩, + ⟨⟨-695281373491471,695281482044894⟩,⟨-695282506156716,695280559828450⟩⟩, + ⟨⟨-3659722639500399,3659722755389623⟩,⟨-3659724700841848,3659723556150935⟩⟩, + ⟨⟨-75574973509759077108086594068423155511836110381819596497721,-75574973509759077108086594068423155511836076959242652267563⟩,⟨-130899693899574718269276807636645953508215408351907485574731,-130899693899574718269276807636645953508215374929351168413537⟩⟩, + ⟨⟨302299894039036308432346376273692622047344306213072256927694,302299894039036308432346376273692622047344443151174454817804⟩,⟨-68469091669726268,68469086361468135⟩⟩, + ⟨⟨-151149947019518154216173188136846311023672446265956304480929,-151149947019518154216173188136846311023671928416162477585038⟩,⟨-258924799755137831,258924801593737981⟩⟩, + ⟨⟨151149947019518154216173188136846311023671261737828896753851,151149947019518154216173188136846311023673112944295272188396⟩,⟨-87266462599716478846184538424430635672144520030544446372771,-87266462599716478846184538424430635672142668823628280552394⟩⟩, + ⟨⟨226724920529277231324259782205269466535505091615037052361394,226724920529277231324259782205269466535511470408151623074597⟩,⟨305432619099007675961645884485507224852499391098907806547697,305432619099007675961645884485507224852505769890694966067366⟩⟩, + ⟨⟨-151149947019518154216173188136846311023682937875568746956982,-151149947019518154216173188136846311023661436806552958839645⟩,⟨-87266462599716478846184538424430635672154344963463114034712,-87266462599716478846184538424430635672132843890702843447907⟩⟩, + ⟨⟨-35806827096762438432,35806827097039407626⟩,⟨174532925199432957692369076848861271344251382031166780598908,174532925199432957692369076848861271344322995677180525843980⟩⟩, + ⟨⟨151149947019518154216173188136846311023553618515143600891341,151149947019518154216173188136846311023790756166975795734394⟩,⟨261799387799149436538553615273291907016312214448135606268560,261799387799149436538553615273291907016549352114384055475480⟩⟩, + ⟨⟨-529024814568313539756606158478962088583244276592286553643963,-529024814568313539756606158478962088582461034795145401516222⟩,⟨-130899693899574718269276807636645953508607012528169320111891,-130899693899574718269276807636645953507823770753085621609288⟩⟩, + ⟨⟨302299894039036308432346376273692622046052191356680549619523,302299894039036308432346376273692622048636558007558337978784⟩,⟨-1292183340375393640764,1292183340375393660871⟩⟩, + ⟨⟨-529024814568313539756606158478962088587114792507698120574329,-529024814568313539756606158478962088578590518879733834550362⟩,⟨130899693899574718269276807636645953503953254845062153060011,130899693899574718269276807636645953512477528436192788633964⟩⟩, + ⟨⟨151149947019518154216173188136846311009615563418955684308100,151149947019518154216173188136846311037728811263163712283509⟩,⟨-261799387799149436538553615273291907030487407224744922753261,-261799387799149436538553615273291907002374159337774739014353⟩⟩, + ⟨⟨-46357534712485639920928,46357534712485916889093⟩,⟨-174532925199432957692369076848861271390644723543336827242477,-174532925199432957692369076848861271297929654165010479167320⟩⟩, + ⟨⟨-151149947019518154216173188136846311176554026787416975659353,-151149947019518154216173188136846310870790347894704730106007⟩,⟨87266462599716478846184538424430635519261754956826173791627,87266462599716478846184538424430635825025433897339783669109⟩⟩, + ⟨⟨226724920529277231324259782205269466031322506315097564572456,226724920529277231324259782205269467039694055708091110834405⟩,⟨-305432619099007675961645884485507225356688355168046328914929,-305432619099007675961645884485507224348316805821556443724732⟩⟩, + ⟨⟨151149947019518154216173188136846309360929328509262769580131,151149947019518154216173188136846312686415046172861399356895⟩,⟨87266462599716478846184538424430634009400735573707281013562,87266462599716478846184538424430637334886453280465445941829⟩⟩, + ⟨⟨-151149947019518154216173188136846316507193798860257176971343,-151149947019518154216173188136846305540150575821861605064930⟩,⟨-5483521611499799384663152,5483521611499797546044634⟩⟩, + ⟨⟨302299894039036308432346376273692603963364222640912838206726,302299894039036308432346376273692640131324526723333873511374⟩,⟨-18083980152058449148466366,18083980152058454456702930⟩⟩, + ⟨⟨-75574973509759077108086594068423215150579342103364052325111,-75574973509759077108086594068423095873092845237698196444430⟩,⟨130899693899574718269276807636645893869472143223083593290696,130899693899574718269276807636646013146958640058175060726577⟩⟩, + ⟨⟨-196681243035488620510877320,196681243035488620626797158⟩,⟨-196681243035502151614042649,196681243035502152758718153⟩⟩, + ⟨⟨-648630558825536174642862142,648630558825536174751389928⟩,⟨-648630558825524210398953626,648630558825524212345258260⟩⟩, + ⟨⟨-2139103838006827478422170310,2139103838006827473657617728⟩,⟨174532925199432957692369076848859132240449182016123234944913,174532925199432957692369076848863410448125195692220250889699⟩⟩, + ⟨⟨-75574973509759077108086594068430210013304633633446857112423,-75574973509759077108086594068416101010367553707610307650154⟩,⟨-218166156499291197115461346061083643681827526021291548581864,-218166156499291197115461346061069534678890446114138973256377⟩⟩, + ⟨⟨-23264878537174032626175113526,23264878537174032622178819825⟩,⟨174532925199432957692369076848838006465750014813292203511692,174532925199432957692369076848884536222824362895051517076865⟩⟩, + ⟨⟨-76724709146808372605482454668,76724709146808372607201893177⟩,⟨-87266462599716478846184538424507360381290402792397911096354,-87266462599716478846184538424353910962996786061774588876945⟩⟩] +lemma dBox12_calc (j : Fin 31) : dCoeffBox phaseBox12 restBox12 j = dBox12 j := by + revert j + decide +kernel +lemma dBox12_mem (j : Fin 31) : (dBox12 j).Mem (dCoefficient ⟨6,by norm_num⟩ j) := by + rw [← dBox12_calc] + apply dCoeffBox_mem ⟨6,by norm_num⟩ phaseBox12 restBox12 + · have hr : residue ⟨6,by norm_num⟩ = (12:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox12_mem + · exact restBox12_mem +def restBox13 : Fin 31 → CI := + ![⟨⟨-642787609686539326322643409907263432907559884206198239737317,-642787609686539326322643409907263432907559884205179526142416⟩,⟨-766044443118978035202392650555416673935832457080898383898648,-766044443118978035202392650555416673935832457079880205033532⟩⟩, + ⟨⟨1622319150690555421030052795640416435340535149061199048322284,1622319150690555421030052795640416435340535149081918309846068⟩,⟨1622319150690555421030052795640416435340535149061164446332861,1622319150690555421030052795640416435340535149081882639197323⟩⟩, + ⟨⟨-808121704448264933562500704645117726092205315238339912840664,-808121704448264933562500704645117726092205315002038824764664⟩,⟨-3131457817960248921236464362304322261694031402676392896268604,-3131457817960248921236464362304322261694031402440091470703850⟩⟩, + ⟨⟨90230264452599350625267494529583087468870233956524634882790,90230264452599350625267494529583087468870235865054979400758⟩,⟨3600582784712126904031969058367812923420748439592616632647309,3600582784712126904031969058367812923420748441501143897298760⟩⟩, + ⟨⟨2777737210472681052295986753824163753433491812524515746292283,2777737210472681052295986753824163753433491824595164238027771⟩,⟨-1103514084499157157088170676503207557465596762491463644801740,-1103514084499157157088170676503207557465596750420813782893697⟩⟩, + ⟨⟨-4353777418318757851458945400985351077826047832890109088556545,-4353777418318757851458945400985351077826047769381888341189932⟩,⟨-74033175772932835464251942751710852011338412185500819052971,-74033175772932835464251942751710852011338348677243976864831⟩⟩, + ⟨⟨3251687369806599027837100309841561387583083877033808586187486,3251687369806599027837100309841561387583084167414787180557867⟩,⟨3245992595986006103297083061499160471362269045782688198208887,3245992595986006103297083061499160471362269336163459346119849⟩⟩, + ⟨⟨-2689729275466474278886959458636871020868891261429629794082706,-2689729275466474278886959458636871020868890066320875332035867⟩,⟨-2653382097173519678216383079625354895350805326832273935443075,-2653382097173519678216383079625354895350804131722859788736980⟩⟩, + ⟨⟨-2029593212260685551656740680819598056642017989511685165536511,-2029593212260685551656740680819598056642013429328604772081711⟩,⟨1410474508180377524042737816673675976221704632248600496943752,1410474508180377524042737816673675976221709192430312340409865⟩⟩, + ⟨⟨3058109782595500226908538589892048910070446767543530998455239,3058109782595500226908538589892048910070463302741340938663456⟩,⟨-274413076174114954951380211890201539924460011376393850373073,-274413076174114954951380211890201539924443476175691716584342⟩⟩, + ⟨⟨-5585627282889308501828257651556422625976986543646250635168333,-5585627282889308501828257651556422625976928448060916231593257⟩,⟨-3447272609893326880671648238880571139217942509463571824590087,-3447272609893326880671648238880571139217884413888022565356547⟩⟩, + ⟨⟨2926552672576453703453196886790535020797856832805083073553371,2926552672576453703453196886790535020798057391267579011615846⟩,⟨2759859559463095882700335100210078921515725489901973276741718,2759859559463095882700335100210078921515926048392973354636380⟩⟩, + ⟨⟨2694098577531239004734848780376805374062097386488865265406300,2694098577531239004734848780376805374062783727910818435912317⟩,⟨-6050863743816623415844361919207507386937591500667905142187912,-6050863743816623415844361919207507386936905159299545045111069⟩⟩, + ⟨⟨-6252615108643266929774053794178576630876762482732503826391195,-6252615108643266929774053794178576630874422778102616576120348⟩,⟨2433187348258195477901500437954032906179854603202159600389533,2433187348258195477901500437954032906182194307903197112720106⟩⟩, + ⟨⟨11883033167175339173210218979668173204860889213313902812004022,11883033167175339173210218979668173204868853070219388825402074⟩,⟨-3981928411916720749446,3981928411916722570290⟩⟩, + ⟨⟨-6252615108643266929774053794178576630889139096608441352315799,-6252615108643266929774053794178576630862046164226679047704950⟩,⟨-2433187348258195477901500437954032906194570921787591392624107,-2433187348258195477901500437954032906167477989317765323081993⟩⟩, + ⟨⟨2694098577531239004734848780376805374016363253503550620264226,2694098577531239004734848780376805374108517860896133077417927⟩,⟨6050863743816623415844361919207507386891171026330559096150843,6050863743816623415844361919207507386983325633636891091323428⟩⟩, + ⟨⟨2926552672576453703453196886790535020641235738677179274601744,2926552672576453703453196886790535020954678485395482813310808⟩,⟨-2759859559463095882700335100210078921672547142546677892541032,-2759859559463095882700335100210078921359104395748268736315556⟩⟩, + ⟨⟨-5585627282889308501828257651556422626510003237002357261861110,-5585627282889308501828257651556422625443911754704809605085871⟩,⟨3447272609893326880671648238880571138684867720560760492637701,3447272609893326880671648238880571139750959202790833893548465⟩⟩, + ⟨⟨3058109782595500226908538589892048908257447364044792274251690,3058109782595500226908538589892048911883462706240079660242493⟩,⟨274413076174114954951380211890201538111444072656449072323187,274413076174114954951380211890201541737459414895636497530084⟩⟩, + ⟨⟨-2029593212260685551656740680819598062808456894143167042007142,-2029593212260685551656740680819598050475574524697122891595836⟩,⟨-1410474508180377524042737816673675982388148097052029973831655,-1410474508180377524042737816673675970055265727626882863601572⟩⟩, + ⟨⟨-2689729275466474278886959458636871041842322988338682914463974,-2689729275466474278886959458636870999895458339411822214608159⟩,⟨2653382097173519678216383079625354874377372404809954127175621,2653382097173519678216383079625354916324237053745179594104035⟩⟩, + ⟨⟨3251687369806599027837100309841561316247796009984919113577790,3251687369806599027837100309841561458918372034463676653103255⟩,⟨-3245992595986006103297083061499160542697557203210661937039012,-3245992595986006103297083061499160400026981178735485602955584⟩⟩, + ⟨⟨-4353777418318757851458945400985351320453159506951991651871188,-4353777418318757851458945400985350835198936095320005774578868⟩,⟨74033175772932835464251942751710609384226674614569573650299,74033175772932835464251942751711094638450086248175219268858⟩⟩, + ⟨⟨2777737210472681052295986753824162928204955363213078863834584,2777737210472681052295986753824164578662028273906601115865849⟩,⟨1103514084499157157088170676503206732237060301109702990636584,1103514084499157157088170676503208382694133211802574436706240⟩⟩, + ⟨⟨90230264452599350625267494529580280683871721235483465853580,90230264452599350625267494529585894253868748586096151394644⟩,⟨-3600582784712126904031969058367815730205746954222297421931711,-3600582784712126904031969058367810116635749926871463104204388⟩⟩, + ⟨⟨-808121704448264933562500704645127272589544961226256606922359,-808121704448264933562500704645108179594865669014122129853500⟩,⟨3131457817960248921236464362304312715196691756452207074217255,3131457817960248921236464362304331808191371048664277287849405⟩⟩, + ⟨⟨1622319150690555421030052795640383965589020828101257778863855,1622319150690555421030052795640448905092049470041859574924666⟩,⟨-1622319150690555421030052795640448905092049470041833145066767,-1622319150690555421030052795640383965589020828101213937656921⟩⟩, + ⟨⟨-642787609686539326322643409907373869722853736040525112184417,-642787609686539326322643409907152996092266032370852648489965⟩,⟨766044443118978035202392650555306237120538605245555107448638,766044443118978035202392650555527110751126308915223482974047⟩⟩, + ⟨⟨-375620064935486225040450475719,375620064935486225040448010319⟩,⟨-375620064935486225041042360782,375620064935486225041037302159⟩⟩, + ⟨⟨-1277567021529219894102778263393,1277567021529219894102776006253⟩,⟨-1277567021529219894102592308686,1277567021529219894102597770254⟩⟩] +lemma restBox13_calc (j : Fin 31) : recoverRest phaseBox13 restBox13 j = restBox13 j := by + revert j + decide +kernel +lemma restBox13_mem (j : Fin 31) : (restBox13 j).Mem ((restPolynomial ⟨7,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨7,by norm_num⟩ phaseBox13 + · have hr : residue ⟨7,by norm_num⟩ = (13:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox13_mem + · exact restBox13_calc +def cBox13 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-19580430313357954872034103663248574042515901359362675686604,-19580430313357954872034103663248574042515901359331519243016⟩,⟨-23335048170484914988453136141165932166689530925502406877438,-23335048170484914988453136141165932166689530925471242820010⟩⟩, + ⟨⟨49418667375392148676379844238792133385413773971529833621446,49418667375392148676379844238792133385413773972161293029020⟩,⟨49418667375392148676379844238792133385413773971528779584589,49418667375392148676379844238792133385413773972160206438938⟩⟩, + ⟨⟨-24616794848266757729821300182897265522355200689708846035122,-24616794848266757729821300182897265522355200682510546545444⟩,⟨-95389660067796766486550332777764559842356706726739447912613,-95389660067796766486550332777764559842356706719540687588378⟩⟩, + ⟨⟨2748571034422318699473571956460269052034712091803621418638,2748571034422318699473571956460269052034712149940797829794⟩,⟨109680023760745019489955393763268478675276265989531292381066,109680023760745019489955393763268478675276266047669055720905⟩⟩, + ⟨⟨84614714189971762236490100703485073297523149007559936634433,84614714189971762236490100703485073297523149375253455178964⟩,⟨-33614961311842518064331204109038671679705146777507723682087,-33614961311842518064331204109038671679705146409814488074231⟩⟩, + ⟨⟨-132623644349389747063044049248511665268141227927079522528765,-132623644349389747063044049248511665268141225992507644289607⟩,⟨-2255179498256666641698735281523932059658868196293732895779,-2255179498256666641698735281523932059658866261721585096920⟩⟩, + ⟨⟨99052061654351514124169269104978288693487545143439659380805,99052061654351514124169269104978288693487553988950735421549⟩,⟨98878588923601722798265571154258660966427594784104373029266,98878588923601722798265571154258660966427603629609128785127⟩⟩, + ⟨⟨-81933839181737056678859311030386106895880925851922875448197,-81933839181737056678859311030386106895880889446827838967533⟩,⟨-80826640814924327272308978941164710039431112244352602723210,-80826640814924327272308978941164710039431075839237478147313⟩⟩, + ⟨⟨-61824944753546762117752942748156556037288900635407776845961,-61824944753546762117752942748156556037288761724287012810200⟩,⟨42965510535683341256438101791449475845397669139727944934782,42965510535683341256438101791449475845397808050806900491014⟩⟩, + ⟨⟨93155351139873366384907378193769418560875209697719936404903,93155351139873366384907378193769418560875713388649782132442⟩,⟨-8359100321989241898595993093700805108257950856059410432234,-8359100321989241898595993093700805108257447165042003279803⟩⟩, + ⟨⟨-170147937080398503471648542021284028301549223875923609546263,-170147937080398503471648542021284028301547454183191969894190⟩,⟨-105009928772709810620909074317698163797551192201251254984705,-105009928772709810620909074317698163797549422508818102556235⟩⟩, + ⟨⟨89147892399013556127599509751844042930252370797417099600352,89147892399013556127599509751844042930258480157553857335300⟩,⟨84070129797733054195663568217845295907894905121802695453260,84070129797733054195663568217845295907901014482807706615059⟩⟩, + ⟨⟨82066935733860793592611363413259760554744295765701398224633,82066935733860793592611363413259760554765202921006732222787⟩,⟨-184319850112236357496544192525942586754381678137409120680980,-184319850112236357496544192525942586754360770983735674095188⟩⟩, + ⟨⟨-190465548131430263825085779272647499309539206234723277514354,-190465548131430263825085779272647499309467934755980137953826⟩,⟨74119125188407506277224867176381668326210288306369327569065,74119125188407506277224867176381668326281559787279087369825⟩⟩, + ⟨⟨361977890262483171833229981609085417805657015812970977097240,361977890262483171833229981609085417805899608767183252625568⟩,⟨-121296475861345764128,121296475861345819713⟩⟩, + ⟨⟨-190465548131430263825085779272647499309916219453181723906269,-190465548131430263825085779272647499309090921537521691485988⟩,⟨-74119125188407506277224867176381668326658573005995141219524,-74119125188407506277224867176381668325833275087653273798583⟩⟩, + ⟨⟨82066935733860793592611363413259760553351154407084523443643,82066935733860793592611363413259760556158344279623606892882⟩,⟨184319850112236357496544192525942586752967629625616199844226,184319850112236357496544192525942586755774819495528594937337⟩⟩, + ⟨⟨89147892399013556127599509751844042925481419439675772329734,89147892399013556127599509751844042935029431515295184689540⟩,⟨-84070129797733054195663568217845295912671965841334969338521,-84070129797733054195663568217845295903123953763275432652929⟩⟩, + ⟨⟨-170147937080398503471648542021284028317785840859261656023354,-170147937080398503471648542021284028285310837199853923422816⟩,⟨105009928772709810620909074317698163781312805526358711439767,105009928772709810620909074317698163813787809183710645986512⟩⟩, + ⟨⟨93155351139873366384907378193769418505648089660857178278379,93155351139873366384907378193769418616102833425512540179013⟩,⟨8359100321989241898595993093700805053030327127554660030966,8359100321989241898595993093700805163485070893546753769345⟩⟩, + ⟨⟨-61824944753546762117752942748156556225129371475529743743513,-61824944753546762117752942748156555849448290884165045790307⟩,⟨-42965510535683341256438101791449476033238278890631431536230,-42965510535683341256438101791449475657557198299903413892032⟩⟩, + ⟨⟨-81933839181737056678859311030386107534768191524295646111784,-81933839181737056678859311030386106256993623774455068393970⟩,⟨80826640814924327272308978941164709400543810166747352368336,80826640814924327272308978941164710678318377916842728413784⟩⟩, + ⟨⟨99052061654351514124169269104978286520490412163186433396295,99052061654351514124169269104978290866484686969203961404165⟩,⟨-98878588923601722798265571154258663139424736609810969414831,-98878588923601722798265571154258658793430461803902532267471⟩⟩, + ⟨⟨-132623644349389747063044049248511672658985700772513032665281,-132623644349389747063044049248511657877296753147074134052677⟩,⟨2255179498256666641698735281523924668814393416263954137642,2255179498256666641698735281523939450503341041751363763627⟩⟩, + ⟨⟨84614714189971762236490100703485048159624398252453908502764,84614714189971762236490100703485098435421900130359483169888⟩,⟨33614961311842518064331204109038646541806395654718393218153,33614961311842518064331204109038696817603897532603818527479⟩⟩, + ⟨⟨2748571034422318699473571956460183552474297793221913888987,2748571034422318699473571956460354551595126448522505449827⟩,⟨-109680023760745019489955393763268564174836680346254185798002,-109680023760745019489955393763268393175715851690946162187909⟩⟩, + ⟨⟨-24616794848266757729821300182897556325293961053585208919839,-24616794848266757729821300182896974719416440318634183635523⟩,⟨95389660067796766486550332777764269039417946355665308544692,95389660067796766486550332777764850645295467090614826806844⟩⟩, + ⟨⟨49418667375392148676379844238791144300221033169020845607289,49418667375392148676379844238793122470606514774670280909792⟩,⟨-49418667375392148676379844238793122470606514774669475810263,-49418667375392148676379844238791144300221033169019510127739⟩⟩, + ⟨⟨-19580430313357954872034103663251938140288328805824396555650,-19580430313357954872034103663245209944743473912869798215421⟩,⟨23335048170484914988453136141162568068917103479009576016360,23335048170484914988453136141169296264461958371964073726480⟩⟩, + ⟨⟨-11442041500076375055380442254,11442041500076375055380367154⟩,⟨-11442041500076375055398472105,11442041500076375055398318010⟩⟩] +lemma cBox13_calc (j : Fin 31) : cCoeffBox restBox13 j = cBox13 j := by + revert j + decide +kernel +lemma cBox13_mem (j : Fin 31) : (cBox13 j).Mem (cCoefficient ⟨7,by norm_num⟩ j) := by + rw [← cBox13_calc] + exact cCoeffBox_mem ⟨7,by norm_num⟩ restBox13 restBox13_mem j +def dBox13 : Fin 31 → CI := + ![⟨⟨-62403109972,64122549251⟩,⟨87266462599716478846184538424430635672143594427022854019608,87266462599716478846184538424430635672143594427149645983688⟩⟩, + ⟨⟨-17449969529192285706525055550956464362967387152009327851502,-17449969529192285706525055550956464362967387149459014652869⟩,⟨-199454064400259554764599631361387403223952236732141357604549,-199454064400259554764599631361387403223952236729590476563590⟩⟩, + ⟨⟨-35691755575021880690632652555016546814720203052589639133049,-35691755575021880690632652555016546814720203023407517333674⟩,⟨269822200080984273853445433615046568555591386463261753849392,269822200080984273853445433615046568555591386492444505222983⟩⟩, + ⟨⟨-3515582712801591269172999617852814154799638706789304100634,-3515582712801591269172999617852814154799638469593745939152⟩,⟨-263210246652608341982344575532768607236995722172921234093306,-263210246652608341982344575532768607236995721935725056861922⟩⟩, + ⟨⟨-17913702388310802049758239027145398638305701765648211350435,-17913702388310802049758239027145398638305700252577760499729⟩,⟨81963367985453275964350490747430806621415929745046274620155,81963367985453275964350490747430806621415931258116917585046⟩⟩, + ⟨⟨78894903178015150724851413936118612884647943077053228858507,78894903178015150724851413936118612884647951119646138792269⟩,⟨13531480489809717287620037663662634812830378657561649360297,13531480489809717287620037663662634812830386700154742064070⟩⟩, + ⟨⟨-159086603581942902614981469893983888613689989785873256024490,-159086603581942902614981469893983888613689952601325491646657⟩,⟨-169810330253978055405292504988094187077236638427638688695388,-169810330253978055405292504988094187077236601243093028800645⟩⟩, + ⟨⟨326172858356647899232637378931667217363271892003456629971013,326172858356647899232637378931667217363272046742646314846469⟩,⟨88984895086233237835393820183014048068347509662350003102838,88984895086233237835393820183014048068347664401546617262248⟩⟩, + ⟨⟨-184658166843689753963979846368376659038083328726847309286164,-184658166843689753963979846368376659038082732380198581238576⟩,⟨-15037672036791746335724694693473638253093931677123700235227,-15037672036791746335724694693473638253093335330492434818040⟩⟩, + ⟨⟨108819181856341709266850522493336923706585251380214666540503,108819181856341709266850522493336923706587431211502845214836⟩,⟨-126695065343300956952164063819954919071080892249051018313688,-126695065343300956952164063819954919071078712417724447169896⟩⟩, + ⟨⟨236587904727616980696697421237547250207621484823505026510259,236587904727616980696697421237547250207629187960503707121559⟩,⟨335631397328104005734830019296362576600023403205450474352280,335631397328104005734830019296362576600031106342329626992271⟩⟩, + ⟨⟨-229870732671268424244129766028553797505914209590530456147721,-229870732671268424244129766028553797505887519271454274686557⟩,⟨-158772531098149656329482146620440468616322987031944450952765,-158772531098149656329482146620440468616296296712530653994847⟩⟩, + ⟨⟨47253338717496890611777665403712505595256961135764283732220,47253338717496890611777665403712505595348485039054086625957⟩,⟨170509014422273446120534918987054794222194429249124612969591,170509014422273446120534918987054794222285953151733043627222⟩⟩, + ⟨⟨204022950441796539435409655519514609635307395843648514769738,204022950441796539435409655519514609635619705420526431912217⟩,⟨167739282615654754559132956965827017335393727990339025561819,167739282615654754559132956965827017335706037568288913701626⟩⟩, + ⟨⟨-635065146950070759430295951592764626426121801514301266688196,-635065146950070759430295951592764626425058313358306757392904⟩,⟨-110942094184458769587637694457872359816207682868357969176138,-110942094184458769587637694457872359815144194713819459995609⟩⟩, + ⟨⟨563001045948766460002503846225506152320508691072178650400694,563001045948766460002503846225506152324127251014597988877246⟩,⟨-1809279972065218456323,1809279972065218490184⟩⟩, + ⟨⟨-635065146950070759430295951592764626431744529138748177731152,-635065146950070759430295951592764626419435585733859846301296⟩,⟨110942094184458769587637694457872359809521467089548183405623,110942094184458769587637694457872359821830410492629245714928⟩⟩, + ⟨⟨204022950441796539435409655519514609614530177178342056071686,204022950441796539435409655519514609656396924085832890547458⟩,⟨-167739282615654754559132956965827017356483256233963852373372,-167739282615654754559132956965827017314616509324664086899225⟩⟩, + ⟨⟨47253338717496890611777665403712505524103141287457150330451,47253338717496890611777665403712505666502304887361220062449⟩,⟨-170509014422273446120534918987054794293439772999554285060342,-170509014422273446120534918987054794151040609401303371490384⟩⟩, + ⟨⟨-229870732671268424244129766028553797748066817734673766113212,-229870732671268424244129766028553797263734911127310964708014⟩,⟨158772531098149656329482146620440468374143688567889282353395,158772531098149656329482146620440468858475595176585822533164⟩⟩, + ⟨⟨236587904727616980696697421237547249383965025047756247078164,236587904727616980696697421237547251031285647736252486504110⟩,⟨-335631397328104005734830019296362577423687566117663122874560,-335631397328104005734830019296362575776366943430116978448907⟩⟩, + ⟨⟨108819181856341709266850522493336920905135055711813225470964,108819181856341709266850522493336926508037626879904286332133⟩,⟨126695065343300956952164063819954916269628516749061023383575,126695065343300956952164063819954921872531087917714442118772⟩⟩, + ⟨⟨-184658166843689753963979846368376668566439322101613837573185,-184658166843689753963979846368376649509726739005432052968090⟩,⟨15037672036791746335724694693473628724737341955849076958595,15037672036791746335724694693473647781449925051767058039090⟩⟩, + ⟨⟨326172858356647899232637378931667184955222133692005391956693,326172858356647899232637378931667249771321805054097552832360⟩,⟨-88984895086233237835393820183014080476397422713047811042217,-88984895086233237835393820183014015660297751350848809279095⟩⟩, + ⟨⟨-159086603581942902614981469893983998840644210242632305902346,-159086603581942902614981469893983778386735732144566441718583⟩,⟨169810330253978055405292504988094076850282380786355630749541,169810330253978055405292504988094297304190858884376086735848⟩⟩, + ⟨⟨78894903178015150724851413936118237978366926032716243210578,78894903178015150724851413936118987790928968163983124403565⟩,⟨-13531480489809717287620037663663009719111403744501453378872,-13531480489809717287620037663662259906549361613214938081121⟩⟩, + ⟨⟨-17913702388310802049758239027146673777590072535672511878258,-17913702388310802049758239027144123499021329482553459973938⟩,⟨-81963367985453275964350490747432081760700302028137363194572,-81963367985453275964350490747429531482131558975025828964765⟩⟩, + ⟨⟨-3515582712801591269172999617857151185884092019388622830257,-3515582712801591269172999617848477123715185156994427171220⟩,⟨263210246652608341982344575532764270205911268623124430188234,263210246652608341982344575532772944268080175485521860736665⟩⟩, + ⟨⟨-35691755575021880690632652555031298017869578209241693375896,-35691755575021880690632652555001795611570827866755463135456⟩,⟨-269822200080984273853445433615061319758740761649096192911515,-269822200080984273853445433615031817352442011306610066178008⟩⟩, + ⟨⟨-17449969529192285706525055551006636471517436210947157738759,-17449969529192285706525055550906292254417338090521184749197⟩,⟨199454064400259554764599631361337231115402187670652540950009,199454064400259554764599631361437575332502285791079293261297⟩⟩, + ⟨⟨-170646451741431684825163837459,170646451741431684826883302404⟩,⟨-87266462599716478846184538424601282123885026111912385677699,-87266462599716478846184538424259989220402162742260114371743⟩⟩] +lemma dBox13_calc (j : Fin 31) : dCoeffBox phaseBox13 restBox13 j = dBox13 j := by + revert j + decide +kernel +lemma dBox13_mem (j : Fin 31) : (dBox13 j).Mem (dCoefficient ⟨7,by norm_num⟩ j) := by + rw [← dBox13_calc] + apply dCoeffBox_mem ⟨7,by norm_num⟩ phaseBox13 restBox13 + · have hr : residue ⟨7,by norm_num⟩ = (13:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox13_mem + · exact restBox13_mem +def restBox16 : Fin 31 → CI := + ![⟨⟨-939692620785908384054109277324731469936208134264932624675400,-939692620785908384054109277324731469936208134264002881288675⟩,⟨-342020143325668733044099614682259580763083367514616756222741,-342020143325668733044099614682259580763083367513687357140495⟩⟩, + ⟨⟨3064177772475912140809570602221666695743329828312251538515964,3064177772475912140809570602221666695743329828330899116012093⟩,⟨-9356007407618,9290944777211⟩⟩, + ⟨⟨-5085122305476703187364720482529611083744456859978470030636908,-5085122305476703187364720482529611083744456859769068170473925⟩,⟨-245187885038432948748028028940247213691231159043736269919611,-245187885038432948748028028940247213691231158834340978251123⟩⟩, + ⟨⟨8573977952239538163515085061726722123873918976434848978267220,8573977952239538163515085061726722123873918978095518979052628⟩,⟨684040286651337466088199229364519161526166734197911443828900,684040286651337466088199229364519161526166735858583545172718⟩⟩, + ⟨⟨-9681388964190571398579076385862111127359451607487916867995426,-9681388964190571398579076385862111127359451597224319228644048⟩,⟨-1040387334334645703897258790874279652123888614603985955213819,-1040387334334645703897258790874279652123888604340390519163067⟩⟩, + ⟨⟨10170244610953406374729440965059222167488913693533664305400963,10170244610953406374729440965059222167488913745961462441214482⟩,⟨5797687355428373067139426614967624805117368768600293658541464,5797687355428373067139426614967624805117368821027907907209078⟩⟩, + ⟨⟨-10106066838477494233919870362837555471745584006846160343003504,-10106066838477494233919870362837555471745583776005870667783734⟩,⟨-10532117816773418059755629475259749298232599367647135073843909,-10532117816773418059755629475259749298232599136806117592528959⟩⟩, + ⟨⟨6539829672761597120132145060203629679230740386283748692996556,6539829672761597120132145060203629679230741292382109651564087⟩,⟨18983460964877544711716741368770939292217420832460714967280694,18983460964877544711716741368770939292217421738556924735649535⟩⟩, + ⟨⟨-4564177772475912140809570602221666695743331459687097116766735,-4564177772475912140809570602221666695743328196956287813903158⟩,⟨-26011143958356558786970939037268334324696666122349075092041614,-26011143958356558786970939037268334324696662859614735620335081⟩⟩, + ⟨⟨-2716881417142051443106137348683037103742583997857550890571102,-2716881417142051443106137348683037103742572950049116343467298⟩,⟨29321914265076491202880227672546663856306310596685603908920215,29321914265076491202880227672546663856306321644485162195431314⟩⟩, + ⟨⟨9294729762643410131484902289956157393296017457490349177034200,9294729762643410131484902289956157393296053370118733596293173⟩,⟨-30430480048983093681543638155507954055832797881104647012318050,-30430480048983093681543638155507954055832761968441716768977298⟩⟩, + ⟨⟨-20276311449430900608649311327896777639234554555705541087400728,-20276311449430900608649311327896777639234440666641291396416739⟩,⟨23524226909648118135740801057579039051188890381283203494771248,23524226909648118135740801057579039051189004270259273674768017⟩⟩, + ⟨⟨31766978096215571136685201086228027748271806300139485826223381,31766978096215571136685201086228027748272162634619165710188555⟩,⟨-18831049125267871282890154016744170286692501886487247974058665,-18831049125267871282890154016744170286692145551875538186577067⟩⟩, + ⟨⟨-38518474619383860173915682654270462833826370878416902575133014,-38518474619383860173915682654270462833825263290412291416388961⟩,⟨8072126540672136043526087368200208843508296636982807116557881,8072126540672136043526087368200208843509404224834902136428312⟩⟩, + ⟨⟨44956356240147933006084266752461055234852284040204704563434235,44956356240147933006084266752461055234855716919524458320254339⟩,⟨-1716439745766806092058,1716439745766808388410⟩⟩, + ⟨⟨-38518474619383860173915682654270462833831131180218848646237355,-38518474619383860173915682654270462833820502988610345345919233⟩,⟨-8072126540672136043526087368200208843514164526626433578904744,-8072126540672136043526087368200208843503536335191275679130522⟩⟩, + ⟨⟨31766978096215571136685201086228027748255538293680817381320694,31766978096215571136685201086228027748288430641077834155737764⟩,⟨18831049125267871282890154016744170286675877545402348145559380,18831049125267871282890154016744170286708769892960438021529262⟩⟩, + ⟨⟨-20276311449430900608649311327896777639285389611179783023728051,-20276311449430900608649311327896777639183605611167049459666945⟩,⟨-23524226909648118135740801057579039051239839325703490994979731,-23524226909648118135740801057579039051138055325838986182737372⟩⟩, + ⟨⟨9294729762643410131484902289956157393138557295645023051461015,9294729762643410131484902289956157393453513531964059719091401⟩,⟨30430480048983093681543638155507954055675301806560943276741988,30430480048983093681543638155507954055990258042985420514345333⟩⟩, + ⟨⟨-2716881417142051443106137348683037104229868489458696261685679,-2716881417142051443106137348683037103255288458447970966055386⟩,⟨-29321914265076491202880227672546663856793606136064135356800277,-29321914265076491202880227672546663855819026105106630757970764⟩⟩, + ⟨⟨-4564177772475912140809570602221666697251165711253487890994711,-4564177772475912140809570602221666694235493945389897050210921⟩,⟨26011143958356558786970939037268334323188828608041140240048627,26011143958356558786970939037268334326204500373922670481959096⟩⟩, + ⟨⟨6539829672761597120132145060203629674565001247113106058086273,6539829672761597120132145060203629683896480431552752301288457⟩,⟨-18983460964877544711716741368770939296883160877723696803584120,-18983460964877544711716741368770939287551681693293942906204353⟩⟩, + ⟨⟨-10106066838477494233919870362837555486182914256484566494043658,-10106066838477494233919870362837555457308253526367464534988037⟩,⟨10532117816773418059755629475259749283795268887167861000037915,10532117816773418059755629475259749312669929617285391668534255⟩⟩, + ⟨⟨10170244610953406374729440965059222122815073196331358411648830,10170244610953406374729440965059222212162754243163768354963735⟩,⟨-5797687355428373067139426614967624849791209318227318915310916,-5797687355428373067139426614967624760443528271400882646279993⟩⟩, + ⟨⟨-9681388964190571398579076385862111265594982324311200505368068,-9681388964190571398579076385862110989123920880401035610618372⟩,⟨1040387334334645703897258790874279513888357887520123948984510,1040387334334645703897258790874279790359419331424252513997156⟩⟩, + ⟨⟨8573977952239538163515085061726721696127798916457933429911305,8573977952239538163515085061726722551620039038072434543296176⟩,⟨-684040286651337466088199229364519589272286795830733685633017,-684040286651337466088199229364518733780046674225761284708354⟩⟩, + ⟨⟨-5085122305476703187364720482529612407331397713450222956356258,-5085122305476703187364720482529609760157516006297315254365709⟩,⟨245187885038432948748028028940245890104290305369358739716268,245187885038432948748028028940248537278172012508718483765882⟩⟩, + ⟨⟨3064177772475912140809570602221662600130750693549596276877756,3064177772475912140809570602221670791355908963093554378610966⟩,⟨-4095612579134762152694523502,4095612579134762217785665778⟩⟩, + ⟨⟨-939692620785908384054109277324744143106273977447159714751185,-939692620785908384054109277324718796766142291081775782033889⟩,⟨342020143325668733044099614682246907593017524345589531959311,342020143325668733044099614682272253933149210682714552329197⟩⟩, + ⟨⟨-39214949269374853546020360585,39214949269374853546000780568⟩,⟨-39214949269374833157846006298,39214949269374833157871967897⟩⟩, + ⟨⟨-121343928804708931904354784186,121343928804708931904383601183⟩,⟨-121343928804708902486230631857,121343928804708902486211671145⟩⟩] +lemma restBox16_calc (j : Fin 31) : recoverRest phaseBox16 restBox16 j = restBox16 j := by + revert j + decide +kernel +lemma restBox16_mem (j : Fin 31) : (restBox16 j).Mem ((restPolynomial ⟨8,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨8,by norm_num⟩ phaseBox16 + · have hr : residue ⟨8,by norm_num⟩ = (16:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox16_mem + · exact restBox16_calc +def cBox16 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-28624674153641342903597614282063769361566618192227784502755,-28624674153641342903597614282063769361566618192199280669248⟩,⟨-10418529357494547381300296597045329845068072893316067118486,-10418529357494547381300296597045329845068072893287689677013⟩⟩, + ⟨⟨93340192681939659953812544564663728666758123701663536299024,93340192681939659953812544564663728666758123702232168215405⟩,⟨-285000283602,283018362573⟩⟩, + ⟨⟨-154901683599415233601257511394191273285249104983283173365574,-154901683599415233601257511394191273285249104976903441796616⟩,⟨-7468850090336757826755954330336569721614730086471311426294,-7468850090336757826755954330336569721614730080092718531707⟩⟩, + ⟨⟨261178304111933557075819270755055019638080463337904020762708,261178304111933557075819270755055019638080463388492584551201⟩,⟨20837058714989094762600593194090659690136145761308483228732,20837058714989094762600593194090659690136145811895580943977⟩⟩, + ⟨⟨-294911972622324723531976328241186866285386290689339128454102,-294911972622324723531976328241186866285386290376690187923212⟩,⟨-31692010536379151917312252996160578363417072791731181985610,-31692010536379151917312252996160578363417072479083984281450⟩⟩, + ⟨⟨309803367198830467202515022788382546570498209161665366154789,309803367198830467202515022788382546570498210758709397747470⟩,⟨176607656294061714192050696090030074373837647951850226226723,176607656294061714192050696090030074373837649548887808346365⟩⟩, + ⟨⟨-307848400452903387052725543037386883971459528730073216028106,-307848400452903387052725543037386883971459521698273913835891⟩,⟨-320826655423514117295944595797029698565975891829001637404294,-320826655423514117295944595797029698565975884797180082348458⟩⟩, + ⟨⟨199214604076119255887703525162118794322309092882697309509577,199214604076119255887703525162118794322309120484033056565874⟩,⟨578269289774269930757264685601738240405117617554728521658685,578269289774269930757264685601738240405117645156001152851324⟩⟩, + ⟨⟨-139032805649945949855824076971497761700617892874150491853235,-139032805649945949855824076971497761700617793485685547898792⟩,⟨-792344755829520905029405736282398788388154034135956367763185,-792344755829520905029405736282398788388153934747379729603180⟩⟩, + ⟨⟨-82760940715626804123523588282868054277004117436237098749000,-82760940715626804123523588282868054277003780900746608918646⟩,⟨893196586663468468944120596865350418724186665780808326445463,893196586663468468944120596865350418724187002316033589309566⟩⟩, + ⟨⟨283133659791116204448706888257314439807969729533373843914499,283133659791116204448706888257314439807970823494595268470598⟩,⟨-926965431539214390869154465718170579554632088563982254418505,-926965431539214390869154465718170579554630994601704405122353⟩⟩, + ⟨⟨-617651767651733854255240565825769430541959469804002641907474,-617651767651733854255240565825769430541956000544709343459155⟩,⟨716588930369406754752069900775320344350347450669746696488840,716588930369406754752069900775320344350350919926354523279213⟩⟩, + ⟨⟨967677490209007579082037607943258413042295271772168364572309,967677490209007579082037607943258413042306126341152637559076⟩,⟨-573626559641585491538742490599162805805836617449089213633386,-573626559641585491538742490599162805805825762876085588398417⟩⟩, + ⟨⟨-1173339835267653407322365386058602635768160983198890757088215,-1173339835267653407322365386058602635768127244138868151345925⟩,⟨245891035901135597135763886615768751347561610113543097931396,245891035901135597135763886615768751347595349168913892081192⟩⟩, + ⟨⟨1369448924088595957991831509245547466286884315921547727343606,1369448924088595957991831509245547466286988887405638699606788⟩,⟨-52285744657483855590,52285744657483925991⟩⟩, + ⟨⟨-1173339835267653407322365386058602635768305990284122240260142,-1173339835267653407322365386058602635767982237053636668193169⟩,⟨-245891035901135597135763886615768751347740356253828127523518,-245891035901135597135763886615768751347416603028628862643644⟩⟩, + ⟨⟨967677490209007579082037607943258413041799719956917055328295,967677490209007579082037607943258413042801678156403946822408⟩,⟨573626559641585491538742490599162805805330211060391926040935,573626559641585491538742490599162805806332169264782876188070⟩⟩, + ⟨⟨-617651767651733854255240565825769430543507994147330419398784,-617651767651733854255240565825769430540407476201381565954505⟩,⟨-716588930369406754752069900775320344351899444268767698661838,-716588930369406754752069900775320344348798926327333521355730⟩⟩, + ⟨⟨283133659791116204448706888257314439803173218711321765417832,283133659791116204448706888257314439812767334316647346882125⟩,⟨926965431539214390869154465718170579549834483778572538088999,926965431539214390869154465718170579559428599387114121750326⟩⟩, + ⟨⟨-82760940715626804123523588282868054291847651889598996775071,-82760940715626804123523588282868054262160246447384710700159⟩,⟨-893196586663468468944120596865350418739030536768720083203590,-893196586663468468944120596865350418709343131328121832868890⟩⟩, + ⟨⟨-139032805649945949855824076971497761746549150791968175542253,-139032805649945949855824076971497761654686535567867864531232⟩,⟨792344755829520905029405736282398788342222676829342581063566,792344755829520905029405736282398788434085292053993516596087⟩⟩, + ⟨⟨199214604076119255887703525162118794180182551085495303198571,199214604076119255887703525162118794464435662281235063328521⟩,⟨-578269289774269930757264685601738240547244186953085254949928,-578269289774269930757264685601738240262991075757644419768863⟩⟩, + ⟨⟨-307848400452903387052725543037386884411245757655418098428508,-307848400452903387052725543037386883531673292772929031991457⟩,⟨320826655423514117295944595797029698126189655871839755761993,320826655423514117295944595797029699005762120754341964057551⟩⟩, + ⟨⟨309803367198830467202515022788382545209655206739591603435134,309803367198830467202515022788382547931341213180783161076387⟩,⟨-176607656294061714192050696090030075734680651970873387806238,-176607656294061714192050696090030073012994645529864646639937⟩⟩, + ⟨⟨-294911972622324723531976328241186870496281359669840057544830,-294911972622324723531976328241186862074491221396189259421848⟩,⟨31692010536379151917312252996160574152522003498674960313035,31692010536379151917312252996160582574312141772140205606715⟩⟩, + ⟨⟨261178304111933557075819270755055006608188521693319600531754,261178304111933557075819270755055032667972405033077005266132⟩,⟨-20837058714989094762600593194090672720028087456334838549111,-20837058714989094762600593194090646660244204116869225055003⟩⟩, + ⟨⟨-154901683599415233601257511394191313604012983600028265176995,-154901683599415233601257511394191232966485226360158350277972⟩,⟨7468850090336757826755954330336529402850851463553873646271,7468850090336757826755954330336610040378608703010155559573⟩⟩, + ⟨⟨93340192681939659953812544564663603907264493499834654159023,93340192681939659953812544564663853426251753904061050384669⟩,⟨-124759493630201813573070226,124759493630201815555859838⟩⟩, + ⟨⟨-28624674153641342903597614282064155408403215722437839044596,-28624674153641342903597614282063383314730020661989225847806⟩,⟨10418529357494547381300296597044943798231475363508037156734,10418529357494547381300296597045715891904670423095718753081⟩⟩, + ⟨⟨-1194555666350364144385521532,1194555666350364144384925090⟩,⟨-1194555666350363523326214935,1194555666350363523327005771⟩⟩] +lemma cBox16_calc (j : Fin 31) : cCoeffBox restBox16 j = cBox16 j := by + revert j + decide +kernel +lemma cBox16_mem (j : Fin 31) : (cBox16 j).Mem (cCoefficient ⟨8,by norm_num⟩ j) := by + rw [← cBox16_calc] + exact cCoeffBox_mem ⟨8,by norm_num⟩ restBox16 restBox16_mem j +def dBox16 : Fin 31 → CI := + ![⟨⟨-51827941654,53547380933⟩,⟨87266462599716478846184538424430635672143594427033405136294,87266462599716478846184538424430635672143594427139094866778⟩⟩, + ⟨⟨-91456170927759873883136228063441721756557472754468701734531,-91456170927759873883136228063441721756557472752379371969706⟩,⟨-251273764493802546582199074203781309579031924709903813854885,-251273764493802546582199074203781309579031924707813847030483⟩⟩, + ⟨⟨187762575310302153026501687005379923063644735962547860162886,187762575310302153026501687005379923063644735986080837714502⟩,⟨357466701171119366105852128545454222146042603345675412360282,357466701171119366105852128545454222146042603369209460526278⟩⟩, + ⟨⟨-291268930075817916917525973157170535353152786160628234151195,-291268930075817916917525973157170535353152785972781123499439⟩,⟨-472240204583844893938031745214101791911880319420195626268930,-472240204583844893938031745214101791911880319232347674286498⟩⟩, + ⟨⟨375525150620604306053003374010759846127289471362910749752655,375525150620604306053003374010759846127289472534339445503007⟩,⟨415281066387888614318213609983131983485920254404913612294509,415281066387888614318213609983131983485920255576343313267848⟩⟩, + ⟨⟨-140118983056299762701352785020324224329480601750559470784084,-140118983056299762701352785020324224329480595700721849772709⟩,⟨-324359093176608016639114400402749501747369667741221701316476,-324359093176608016639114400402749501747369661691373629349324⟩⟩, + ⟨⟨-187762575310302153026501687005379923063644749458155446952510,-187762575310302153026501687005379923063644722490460968107522⟩,⟨380228401823439083203647903097891322848675481613506502721070,380228401823439083203647903097891322848675508581164005760027⟩⟩, + ⟨⟨582537860151635833835051946314341070706305518527635944714130,582537860151635833835051946314341070706305625739159960766820⟩,⟨-441932880180084694711665342020640964665696842840655237799204,-441932880180084694711665342020640964665696735629010131384827⟩⟩, + ⟨⟨-831475508205750094474322572968439327316945023414347321292541,-831475508205750094474322572968439327316944632656127969866805⟩,⟨636247506477930961674046280993452465818768454229054543571711,636247506477930961674046280993452465818768844987050508027601⟩⟩, + ⟨⟨733687807171153988051225134451187381729977090949416429886203,733687807171153988051225134451187381729978427999497031783251⟩,⟨-682681021368540351337509875154911676807330523896621262348090,-682681021368540351337509875154911676807329186845966886621520⟩⟩, + ⟨⟨-503593949839148178746468100942735179923821684229410347089265,-503593949839148178746468100942735179923817302441166731323818⟩,⟨548125816857401514235318396362313877232705276990288960099566,548125816857401514235318396362313877232709658776545466722127⟩⟩, + ⟨⟨210843723111276434549210148210250900290779914804360714895439,210843723111276434549210148210250900290793889053036803851779⟩,⟨-137355488101889987342562803741841692727118783164445062276136,-137355488101889987342562803741841692727104808910708025030880⟩⟩, + ⟨⟨-274368512783279621649408684190325165269694354792371435016301,-274368512783279621649408684190325165269650481728155098156608⟩,⟨-372503062108843343487664686977624618563787981602400698185687,-372503062108843343487664686977624618563744108546872355859917⟩⟩, + ⟨⟨487712752421147381971418466947716613679029802827960042122948,487712752421147381971418466947716613679166425676843013960114⟩,⟨552871157018090846123517700054093710623700386254549234813696,552871157018090846123517700054093710623837009115987169723273⟩⟩, + ⟨⟨-745737991008909878059113192539536272263140249628853250133353,-745737991008909878059113192539536272262716423998006291597924⟩,⟨-519528946495267252194038685582268955814571025194565349312008,-519528946495267252194038685582268955814147199579563035848909⟩⟩, + ⟨⟨975425504842294763942836933895433227357539901880496759083580,975425504842294763942836933895433227358852555129109354681592⟩,⟨-656326632803637980808,656326632803638183559⟩⟩, + ⟨⟨-745737991008909878059113192539536272264959834920786478906111,-745737991008909878059113192539536272260896838706073062691931⟩,⟨519528946495267252194038685582268955812327614288387206415115,519528946495267252194038685582268955816390610485741178363089⟩⟩, + ⟨⟨487712752421147381971418466947716613672811432154430502020559,487712752421147381971418466947716613685384796350372553812277⟩,⟨-552871157018090846123517700054093710630055379791625889985887,-552871157018090846123517700054093710617482015578910514242972⟩⟩, + ⟨⟨-274368512783279621649408684190325165289125944059523963683945,-274368512783279621649408684190325165250218892461002569151630⟩,⟨372503062108843343487664686977624618544312519282326046744591,372503062108843343487664686977624618583219570866947007096722⟩⟩, + ⟨⟨210843723111276434549210148210250900230590953425631818185635,210843723111276434549210148210250900350982850431765700177187⟩,⟨137355488101889987342562803741841692666915847529256710419065,137355488101889987342562803741841692787307744545896376961268⟩⟩, + ⟨⟨-503593949839148178746468100942735180110085761954910665096901,-503593949839148178746468100942735179737553224715666412932085⟩,⟨-548125816857401514235318396362313877418973736499821195211372,-548125816857401514235318396362313877046441199267013231553637⟩⟩, + ⟨⟨733687807171153988051225134451187381153608620406462762869432,733687807171153988051225134451187382306346898542450698461933⟩,⟨682681021368540351337509875154911676230960716301654911750575,682681021368540351337509875154911677383698994440933237036334⟩⟩, + ⟨⟨-831475508205750094474322572968439329100420267205491447023085,-831475508205750094474322572968439325533469388864983843886677⟩,⟨-636247506477930961674046280993452467602244088777826664244165,-636247506477930961674046280993452464035293210438278387076122⟩⟩, + ⟨⟨582537860151635833835051946314341065187646942515669395978917,582537860151635833835051946314341076224964201751126509366523⟩,⟨441932880180084694711665342020640959147038159616690717458407,441932880180084694711665342020640970184355418852974651381155⟩⟩, + ⟨⟨-187762575310302153026501687005379940140186538148104757251849,-187762575310302153026501687005379905987102933800511657800988⟩,⟨-380228401823439083203647903097891339925217297271278476088102,-380228401823439083203647903097891305772133692923392032028120⟩⟩, + ⟨⟨-140118983056299762701352785020324277169907821085461274618368,-140118983056299762701352785020324171489053376365820045820378⟩,⟨324359093176608016639114400402749448906942442356072288829022,324359093176608016639114400402749554587796887076523041492664⟩⟩, + ⟨⟨375525150620604306053003374010759682621658114260562200732469,375525150620604306053003374010760009632920829636687994297407⟩,⟨-415281066387888614318213609983132146991551612679202359806114,-415281066387888614318213609983131819980288897302054565477619⟩⟩, + ⟨⟨-291268930075817916917525973157171041293261349414375659019999,-291268930075817916917525973157170029413044222719033698325645⟩,⟨472240204583844893938031745214101285971771755977840903836599,472240204583844893938031745214102297851988882674702396534948⟩⟩, + ⟨⟨187762575310302153026501687005378357518829383983514747744779,187762575310302153026501687005381488608460087965113949785835⟩,⟨-357466701171119366105852128545455787690857955349332647975118,-357466701171119366105852128545452656601227251365552224847630⟩⟩, + ⟨⟨-91456170927759873883136228063446566066244314844293260917129,-91456170927759873883136228063436877446870630662554812440516⟩,⟨251273764493802546582199074203776465269345082616415110556504,251273764493802546582199074203786153888718766801302550387410⟩⟩, + ⟨⟨-14989884742938991971769901044,14989884742938991973489035649⟩,⟨-87266462599716478846184538424445625556886533421330329851216,-87266462599716478846184538424415645787400655432842170328534⟩⟩] +lemma dBox16_calc (j : Fin 31) : dCoeffBox phaseBox16 restBox16 j = dBox16 j := by + revert j + decide +kernel +lemma dBox16_mem (j : Fin 31) : (dBox16 j).Mem (dCoefficient ⟨8,by norm_num⟩ j) := by + rw [← dBox16_calc] + apply dCoeffBox_mem ⟨8,by norm_num⟩ phaseBox16 restBox16 + · have hr : residue ⟨8,by norm_num⟩ = (16:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox16_mem + · exact restBox16_mem +def restBox19 : Fin 31 → CI := + ![⟨⟨-984807753012208059366743024589523013670643251720262809870705,-984807753012208059366743024589523013670643251719418907257461⟩,⟨173648177666930348851716626769314796000375677183656181365135,173648177666930348851716626769314796000375677184500290264890⟩⟩, + ⟨⟨2563425528223154234196417784013982101398583003548877429215100,2563425528223154234196417784013982101398583003565564867365967⟩,⟨-2563425528223154234196417784013982101398583003565618772693437,-2563425528223154234196417784013982101398583003548930233049741⟩⟩, + ⟨⟨-2649881312334498009375392609428804301508150705338367928412568,-2649881312334498009375392609428804301508150705153819740399317⟩,⟨6205275455167810272669364748913508728618405463867500131171246,6205275455167810272669364748913508728618405464052044066412373⟩⟩, + ⟨⟨2216129172889293536492984530475352509397831648469878501569179,2216129172889293536492984530475352509397831649908131774825052⟩,⟨-11736110899691052726044079014093043537317775574482130042370372,-11736110899691052726044079014093043537317775573043866632749489⟩⟩, + ⟨⟨3333921598985835475463591838793323463034317435925509576272319,3333921598985835475463591838793323463034317444623761591938188⟩,⟨18332707782645482261114231595423563289597794861483518749723828,18332707782645482261114231595423563289597794870181782042918456⟩⟩, + ⟨⟨-10400385239298125357126353377192106558574875565808021887346118,-10400385239298125357126353377192106558574875522583926307022033⟩,⟨-19752754941502100187901001581633689244076655479820558844722369,-19752754941502100187901001581633689244076655436596682533892399⟩⟩, + ⟨⟨16614975070383998179689882148945360466495915795640010697879175,16614975070383998179689882148945360466495915979391345654550316⟩,⟨20319815451004787858884250486978013060201084038262728490219441,20319815451004787858884250486978013060201084222015003882891272⟩⟩, + ⟨⟨-22651570106437835929245207871255233314319455294608910915727390,-22651570106437835929245207871255233314319454604583551943104085⟩,⟨-15836052369601456808388865138722570327796442022786179133705504,-15836052369601456808388865138722570327796441332763451511154573⟩⟩, + ⟨⟨21943852275479984523836952733513471924921763772968787922621568,21943852275479984523836952733513471924921766125158649634443812⟩,⟨12660028210617368307180710818639857154912260111679354306844956,12660028210617368307180710818639857154912262463873489313473639⟩⟩, + ⟨⟨-23487121619013778290463210145470168374043657649411572454463894,-23487121619013778290463210145470168374043650193017748177471589⟩,⟨-13244817425817193383400277931626790409050303121098691911522913,-13244817425817193383400277931626790409050295664716409434062214⟩⟩, + ⟨⟨23598379384402492121177250973878129186502381434608163930733227,23598379384402492121177250973878129186502403884831104535081216⟩,⟨14825899428823491534127706531729519275399727431338347082917538,14825899428823491534127706531729519275399749881604930055312417⟩⟩, + ⟨⟨-30854386729697745393252702307774918645135236670995975198724971,-30854386729697745393252702307774918645135171322579415538050201⟩,⟨-20841672060906067883107101738191756694368709894576292176824403,-20841672060906067883107101738191756694368644546267957782255354⟩⟩, + ⟨⟨41530081700476328740341200274376512742880393557248709088115429,41530081700476328740341200274376512742880579965427034363534576⟩,⟨17303552603924967470733296684429551678585765480307813711061896,17303552603924967470733296684429551678585951888644771997236832⟩⟩, + ⟨⟨-49032186650524844161151932256984477953055341022523723096004917,-49032186650524844161151932256984477953054815055205147974980501⟩,⟨-12852837434656129612042348593732908804957619600849638178499916,-12852837434656129612042348593732908804957093633723347369297127⟩⟩, + ⟨⟨56519149358955896777566522617398199531350797981232755549910846,56519149358955896777566522617398199531352274246635911072142642⟩,⟨-738132806087677603555,738132806087674730702⟩⟩, + ⟨⟨-49032186650524844161151932256984477953057145101584503947843187,-49032186650524844161151932256984477953053010976144367126012083⟩,⟨12852837434656129612042348593732908804955289554680118240787668,12852837434656129612042348593732908804959423679892867313415768⟩⟩, + ⟨⟨41530081700476328740341200274376512742874703229270263024136061,41530081700476328740341200274376512742886270293405480432861726⟩,⟨-17303552603924967470733296684429551678591642216636515097919742,-17303552603924967470733296684429551678580075152316070618493322⟩⟩, + ⟨⟨-30854386729697745393252702307774918645151381159181628564140904,-30854386729697745393252702307774918645119026834393762179773308⟩,⟨20841672060906067883107101738191756694352500058141963754572618,20841672060906067883107101738191756694384854382702286215397881⟩⟩, + ⟨⟨23598379384402492121177250973878129186457147547245496441898426,23598379384402492121177250973878129186547637772193772031916122⟩,⟨-14825899428823491534127706531729519275444983768974887679442536,-14825899428823491534127706531729519275354493543968389473095882⟩⟩, + ⟨⟨-23487121619013778290463210145470168374170194600033593733692218,-23487121619013778290463210145470168373917113242395726906036202⟩,⟨13244817425817193383400277931626790408923758714201964071660407,13244817425817193383400277931626790409176840071613137292213345⟩⟩, + ⟨⟨21943852275479984523836952733513471924567860488199888881449575,21943852275479984523836952733513471925275669409927548682037085⟩,⟨-12660028210617368307180710818639857155266165748505300438668130,-12660028210617368307180710818639857154558356827047543204064541⟩⟩, + ⟨⟨-22651570106437835929245207871255233315309241072873061849793030,-22651570106437835929245207871255233313329668826319401012831186⟩,⟨15836052369601456808388865138722570326806655554799869247737491,15836052369601456808388865138722570328786227800749761423704061⟩⟩, + ⟨⟨16614975070383998179689882148945360463727721509714436888151052,16614975070383998179689882148945360469264110265316919464177733⟩,⟨-20319815451004787858884250486978013062969278507365522185632844,-20319815451004787858884250486978013057432889752912210217827658⟩⟩, + ⟨⟨-10400385239298125357126353377192106566316850950528839661444054,-10400385239298125357126353377192106550832900137863108527664260⟩,⟨19752754941502100187901001581633689236334680053008555216383007,19752754941502100187901001581633689251818630863408686195746723⟩⟩, + ⟨⟨3333921598985835475463591838793323441381870139971829459391429,3333921598985835475463591838793323484686764740577441697282852⟩,⟨-18332707782645482261114231595423563311250242163920272859161982,-18332707782645482261114231595423563267945347567745027969086691⟩⟩, + ⟨⟨2216129172889293536492984530475352448841132717838118501794637,2216129172889293536492984530475352569954530580539891793319412⟩,⟨11736110899691052726044079014093043476761076646751328095038699,11736110899691052726044079014093043597874474500774668616522814⟩⟩, + ⟨⟨-2649881312334498009375392609428804470870705173593455028518258,-2649881312334498009375392609428804132145596236898732666788605⟩,⟨-6205275455167810272669364748913508897980959923809992431739958,-6205275455167810272669364748913508559255851004109551801478313⟩⟩, + ⟨⟨2563425528223154234196417784013981627732161910666087995379969,2563425528223154234196417784013982575065004096448354335700890⟩,⟨2563425528223154234196417784013981627732161927306324677286769,2563425528223154234196417784013982575065004079808224361628501⟩⟩, + ⟨⟨-984807753012208059366743024589524338401952221963611027628808,-984807753012208059366743024589521688939334281476070731856562⟩,⟨-173648177666930348851716626769316120731684614841209605379448,-173648177666930348851716626769313471269066739526946895090601⟩⟩, + ⟨⟨-3704955561172471201459926339,3704955561172471201509600522⟩,⟨-3704955561108656368161953370,3704955561108656368184734104⟩⟩, + ⟨⟨-10361871586584749055940097430,10361871586584749055884030068⟩,⟨-10361871586459779677888990151,10361871586459779677874052430⟩⟩] +lemma restBox19_calc (j : Fin 31) : recoverRest phaseBox19 restBox19 j = restBox19 j := by + revert j + decide +kernel +lemma restBox19_mem (j : Fin 31) : (restBox19 j).Mem ((restPolynomial ⟨9,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨9,by norm_num⟩ phaseBox19 + · have hr : residue ⟨9,by norm_num⟩ = (19:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox19_mem + · exact restBox19_calc +def cBox19 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-29998959670852502253334400260293903887583974252661922254902,-29998959670852502253334400260293903887583974252636024531917⟩,⟨5289625983156427915144478140897837194877087266713827602257,5289625983156427915144478140897837194877087266739574304582⟩⟩, + ⟨⟨78086407022271780569795821758218198413269382170775846533150,78086407022271780569795821758218198413269382171284672081956⟩,⟨-78086407022271780569795821758218198413269382171286314132106,-78086407022271780569795821758218198413269382170777455029911⟩⟩, + ⟨⟨-80720000810435206393835349879154567726463443619508748554834,-80720000810435206393835349879154567726463443613886575389358⟩,⟨189023499821901213903802269589175580750885147411238541307570,189023499821901213903802269589175580750885147416861274407702⟩⟩, + ⟨⟨67507155055958924739506865476422524023515207615668978818468,67507155055958924739506865476422524023515207659481108692414⟩,⟨-357502382059455574647445980170955115113667522474281043405528,-357502382059455574647445980170955115113667522430466758593259⟩⟩, + ⟨⟨101557059525424301156435943073245227416599589270826380034608,101557059525424301156435943073245227416599589535790935133826⟩,⟨558446214245317866030907332236726730461939952322224489699378,558446214245317866030907332236726730461939952587192296978519⟩⟩, + ⟨⟨-316813851638276482210105745845552627547356702942999283715638,-316813851638276482210105745845552627547356701626316019986436⟩,⟨-601703324395952791558640268212132304843598359512603356451727,-601703324395952791558640268212132304843598358195924958390532⟩⟩, + ⟨⟨506121083576086063020068714933506598554881096112685948901954,506121083576086063020068714933506598554881101710074924655714⟩,⟨618976975322717298666015133405325669399951741549123731773832,618976975322717298666015133405325669399951747146542073309327⟩⟩, + ⟨⟨-690006283994083385615241844205971094361649671524974608116270,-690006283994083385615241844205971094361649650505595771635579⟩,⟨-482393741243518841048223492776900887676042270870130483109826,-482393741243518841048223492776900887676042249850833123838616⟩⟩, + ⟨⟨668447966033740715972586642084335948860231481516704581744113,668447966033740715972586642084335948860231553168509489527479⟩,⟨385646512794520419157083715915497786976514590509616856569899,385646512794520419157083715915497786976514662161550135987056⟩⟩, + ⟨⟨-715458638580059901986008458442524668361845996529158190953812,-715458638580059901986008458442524668361845769394408869721595⟩,⟨-403460210979846917994325574928498767314801919771670706277635,-403460210979846917994325574928498767314801692637274954608435⟩⟩, + ⟨⟨718847743922454399947720228927531466340474793034918292267314,718847743922454399947720228927531466340475476907821448921677⟩,⟨451622723002544877139974661387162452885423166620231768972962,451622723002544877139974661387162452885423850494462646974757⟩⟩, + ⟨⟨-939878367470178921963504273211870500198541921428454833740560,-939878367470178921963504273211870500198539930801844895202854⟩,⟨-634873636723393983507044971236595974941072115797798745401444,-634873636723393983507044971236595974941070125174487478715883⟩⟩, + ⟨⟨1265078633113030273681581575773852304879836996777787625007695,1265078633113030273681581575773852304879842675095626537354899⟩,⟨527096354735120649335024318014269194272578787681612380576866,527096354735120649335024318014269194272584466004278832625825⟩⟩, + ⟨⟨-1493605818398317590648981886871000986505573365232055247199583,-1493605818398317590648981886871000986505557343351298089895170⟩,⟨-391519817628296909079952779285602707159119367006676357123971,-391519817628296909079952779285602707159103345131783531010332⟩⟩, + ⟨⟨1721671744626475063966632333378512160200365871519935349965516,1721671744626475063966632333378512160200410841135749272501570⟩,⟨-22484811085035126531,22484811085035039585⟩⟩, + ⟨⟨-1493605818398317590648981886871000986505628320622913876371973,-1493605818398317590648981886871000986505502387960439460810458⟩,⟨391519817628296909079952779285602707159048389741459557904904,391519817628296909079952779285602707159174322397000330423569⟩⟩, + ⟨⟨1265078633113030273681581575773852304879663659475134189248483,1265078633113030273681581575773852304880016012398279973277361⟩,⟨-527096354735120649335024318014269194272757803307337319285939,-527096354735120649335024318014269194272405450378553894163097⟩⟩, + ⟨⟨-939878367470178921963504273211870500199033710661943906609705,-939878367470178921963504273211870500198048141568355822551594⟩,⟨634873636723393983507044971236595974940578335942815733199285,634873636723393983507044971236595974941563905029470491249177⟩⟩, + ⟨⟨718847743922454399947720228927531466339096890029384454710045,718847743922454399947720228927531466341853379913355286722940⟩,⟨-451622723002544877139974661387162452886801753500218554752292,-451622723002544877139974661387162452884045263614475861630815⟩⟩, + ⟨⟨-715458638580059901986008458442524668365700532469774018337051,-715458638580059901986008458442524668357991233453793042576007⟩,⟨403460210979846917994325574928498767310947156699936077046583,403460210979846917994325574928498767318656455709009584396123⟩⟩, + ⟨⟨668447966033740715972586642084335948849450970970670302258425,668447966033740715972586642084335948871012063714543769209023⟩,⟨-385646512794520419157083715915497786987295172703408478747750,-385646512794520419157083715915497786965734079967758514491537⟩⟩, + ⟨⟨-690006283994083385615241844205971094391800270516615102219731,-690006283994083385615241844205971094331499051513955277647968⟩,⟨482393741243518841048223492776900887645891650868348475027256,482393741243518841048223492776900887706192869852615132730453⟩⟩, + ⟨⟨506121083576086063020068714933506598470557076027990091960802,506121083576086063020068714933506598639205121794770781594205⟩,⟨-618976975322717298666015133405325669484275767213720737773276,-618976975322717298666015133405325669315627721481945068234056⟩⟩, + ⟨⟨-316813851638276482210105745845552627783190759517585899416406,-316813851638276482210105745845552627311522645051729404125838⟩,⟨601703324395952791558640268212132304607764301655842067120159,601703324395952791558640268212132305079432416052686248742816⟩⟩, + ⟨⟨101557059525424301156435943073245226757028326534715813496313,101557059525424301156435943073245228076170852271901501321075⟩,⟨-558446214245317866030907332236726731121511215255824338607035,-558446214245317866030907332236726729802368689653592449155427⟩⟩, + ⟨⟨67507155055958924739506865476422522178852669710710722084500,67507155055958924739506865476422525868177745564439365996386⟩,⟨357502382059455574647445980170955113269004984657688746425127,357502382059455574647445980170955116958330060247059056683781⟩⟩, + ⟨⟨-80720000810435206393835349879154572885541878680084755910964,-80720000810435206393835349879154562567385008553310568840187⟩,⟨-189023499821901213903802269589175585909963582218599634068138,-189023499821901213903802269589175575591806712609500182732679⟩⟩, + ⟨⟨78086407022271780569795821758218183984565078878919718290927,78086407022271780569795821758218212841973685463140801375051⟩,⟨78086407022271780569795821758218183984565079385810314559212,78086407022271780569795821758218212841973684956253455613337⟩⟩, + ⟨⟨-29998959670852502253334400260293944241207299171120834931905,-29998959670852502253334400260293863533960649334177113145186⟩,⟨-5289625983156427915144478140897877548500411192552700777149,-5289625983156427915144478140897796841253763340900702008225⟩⟩, + ⟨⟨-112859400346877519141247487,112859400346877519142760649⟩,⟨-112859400344933608154912740,112859400344933608155606681⟩⟩] +lemma cBox19_calc (j : Fin 31) : cCoeffBox restBox19 j = cBox19 j := by + revert j + decide +kernel +lemma cBox19_mem (j : Fin 31) : (cBox19 j).Mem (cCoefficient ⟨9,by norm_num⟩ j) := by + rw [← cBox19_calc] + exact cCoeffBox_mem ⟨9,by norm_num⟩ restBox19 restBox19_mem j +def dBox19 : Fin 31 → CI := + ![⟨⟨-42583077798,44302517076⟩,⟨87266462599716478846184538424430635672143594427042682259620,87266462599716478846184538424430635672143594427129817743561⟩⟩, + ⟨⟨-181457271423278353442539591330307138269855717433356022029335,-181457271423278353442539591330307138269855717431661495719402⟩,⟨-259147840492017835097636591434791992491066951319352075211822,-259147840492017835097636591434791992491066951317657379576528⟩⟩, + ⟨⟨463283353389689492913152625700529092592727468812342369416043,463283353389689492913152625700529092592727468831098942901547⟩,⟨239761622777744388978996186713944534605045962234127162870132,239761622777744388978996186713944534605045962252883356251452⟩⟩, + ⟨⟨-715879142894163214074909965167889506994367295814875328814300,-715879142894163214074909965167889506994367295667760389729781⟩,⟨-186843456626211955596675440011241833636374199720804791858584,-186843456626211955596675440011241833636374199573692176309978⟩⟩, + ⟨⟨1052605604807642356909770599267183736629640509771488434136173,1052605604807642356909770599267183736629640510669533929643382⟩,⟨-142411835615632875872479695126482728482201354555008845572373,-142411835615632875872479695126482728482201353656966440657340⟩⟩, + ⟨⟨-812977363793342802495857965562931326390239989956313477922380,-812977363793342802495857965562931326390239985441158924785590⟩,⟨607100304604663942637492387094525792213327541170105197216736,607100304604663942637492387094525792213327545685274208056550⟩⟩, + ⟨⟨473072243456819281193494896531721261739175618631327382456264,473072243456819281193494896531721261739175638087054928004015⟩,⟨-555655604929565712607196180868459947826557188629096385673297,-555655604929565712607196180868459947826557169173435639871565⟩⟩, + ⟨⟨-164254048994606382087931692071709467202526473202483808889137,-164254048994606382087931692071709467202526399075258764761691⟩,⟨513574503728378073777157256851500952568070991964542419784128,513574503728378073777157256851500952568071066091970404268698⟩⟩, + ⟨⟨-73979948119989317195749242042714556673615934468193110335190,-73979948119989317195749242042714556673615678098319371228723⟩,⟨41798032003651696182358695113588094931528895375612307123387,41798032003651696182358695113588094931529151745116787909188⟩⟩, + ⟨⟨-476477632554014619234664538028970434614952517268193604596324,-476477632554014619234664538028970434614951693712348011581435⟩,⟨-368873804775857495635611946291443473217333740325247339358974,-368873804775857495635611946291443473217332916768399093134400⟩⟩, + ⟨⟨876268059154901152680500126938744620329962096201600764848496,876268059154901152680500126938744620329964603589648311986013⟩,⟨274321263132523281150547859763576604296978576265731550490534,274321263132523281150547859763576604296981083650385078512737⟩⟩, + ⟨⟨-1476351782220317664238898615498549808641422893342140070345224,-1476351782220317664238898615498549808641415533197243729743287⟩,⟨116612691931377481974974485439858545954561218550214706597736,116612691931377481974974485439858545954568578703584341729182⟩⟩, + ⟨⟨1199865919846385717352609925952783968864379288314723116838990,1199865919846385717352609925952783968864400402736798595624681⟩,⟨-1054183988184891228483685874932210759927210994084364144085838,-1054183988184891228483685874932210759927189879676608142172871⟩⟩, + ⟨⟨-524008195812816144593888790208054388364147579789167579969521,-524008195812816144593888790208054388364087801134272743537150⟩,⟨1051617433767373144881355401663515306385969753876802285604678,1051617433767373144881355401663515306386029532552970224401118⟩⟩, + ⟨⟨-1274305368544844319877162087721548204034037842402078145887,-1274305368544844319877162087721548203865950903760215312707⟩,⟨-1025958610177857886849970202129735948881281829755629925325420,-1025958610177857886849970202129735948881113742843011174864403⟩⟩, + ⟨⟨723129021051270681269578775215770990398059333624373763243050,723129021051270681269578775215770990398530442642206701094991⟩,⟨-235554523768393966555,235554523768394310280⟩⟩, + ⟨⟨-1274305368544844319877162087721548204609297858345324896986,-1274305368544844319877162087721548203290690887816968684155⟩,⟨1025958610177857886849970202129735948880538482828009185056048,1025958610177857886849970202129735948881857089770631914464153⟩⟩, + ⟨⟨-524008195812816144593888790208054388365962078542347073364442,-524008195812816144593888790208054388362273302381093249908488⟩,⟨-1051617433767373144881355401663515306387844031311615258076303,-1051617433767373144881355401663515306384155255118157251300493⟩⟩, + ⟨⟨1199865919846385717352609925952783968859231137805321372349553,1199865919846385717352609925952783968869548553246200339784035⟩,⟨1054183988184891228483685874932210759922041729168663700993446,1054183988184891228483685874932210759932359144592308584697561⟩⟩, + ⟨⟨-1476351782220317664238898615498549808655847180804897084663307,-1476351782220317664238898615498549808626991245734486715015697⟩,⟨-116612691931377481974974485439858545968992866178179440878699,-116612691931377481974974485439858545940136931075619606949883⟩⟩, + ⟨⟨876268059154901152680500126938744620289611582777055085794183,876268059154901152680500126938744620370315117014193990562267⟩,⟨-274321263132523281150547859763576604337331597084118758321068,-274321263132523281150547859763576604256628062831997871102978⟩⟩, + ⟨⟨-476477632554014619234664538028970434727806439181664033672643,-476477632554014619234664538028970434502097771798877581967996⟩,⟨368873804775857495635611946291443473104478994826037324126640,368873804775857495635611946291443473330187662267609108702891⟩⟩, + ⟨⟨-73979948119989317195749242042714556989242362537191895726437,-73979948119989317195749242042714556357989250029320586423697⟩,⟨-41798032003651696182358695113588095247155579864526090745176,-41798032003651696182358695113588094615902467256203004526464⟩⟩, + ⟨⟨-164254048994606382087931692071709468085258202230848564634619,-164254048994606382087931692071709466319794670046894008398097⟩,⟨-513574503728378073777157256851500953450802795221791310352994,-513574503728378073777157256851500951685339262834721513567140⟩⟩, + ⟨⟨473072243456819281193494896531721259270386703532419843836687,473072243456819281193494896531721264207964553185962465995482⟩,⟨555655604929565712607196180868459945357768253877014965814812,555655604929565712607196180868459950295346103925517059713359⟩⟩, + ⟨⟨-812977363793342802495857965562931333294850153667297664325809,-812977363793342802495857965562931319485629821730174737767245⟩,⟨-607100304604663942637492387094525799117937709783598768516423,-607100304604663942637492387094525785308717377071780636853541⟩⟩, + ⟨⟨1052605604807642356909770599267183717319102847799473667510702,1052605604807642356909770599267183755940178172641548695690108⟩,⟨142411835615632875872479695126482709171663690926657822112488,142411835615632875872479695126482747792739017285317464323252⟩⟩, + ⟨⟨-715879142894163214074909965167889561001306981065662840569987,-715879142894163214074909965167889452987427610416972877448614⟩,⟨186843456626211955596675440011241779629434512837834937830075,186843456626211955596675440011241887643313886456662030037232⟩⟩, + ⟨⟨463283353389689492913152625700528941548277793773606174441511,463283353389689492913152625700529243637177143869835137416657⟩,⟨-239761622777744388978996186713944685649495640199818017024074,-239761622777744388978996186713944383560596284287192501711318⟩⟩, + ⟨⟨-181457271423278353442539591330307560704933700533129825904107,-181457271423278353442539591330306715834777734331887691462133⟩,⟨259147840492017835097636591434791570055988962522712121732101,259147840492017835097636591434792414926144940114297332600038⟩⟩, + ⟨⟨-1181449536837289227599044726,1181449536837289229318187288⟩,⟨-87266462599716478846184538424431817121680442869236817196463,-87266462599716478846184538424429454222606745984935682291851⟩⟩] +lemma dBox19_calc (j : Fin 31) : dCoeffBox phaseBox19 restBox19 j = dBox19 j := by + revert j + decide +kernel +lemma dBox19_mem (j : Fin 31) : (dBox19 j).Mem (dCoefficient ⟨9,by norm_num⟩ j) := by + rw [← dBox19_calc] + apply dCoeffBox_mem ⟨9,by norm_num⟩ phaseBox19 restBox19 + · have hr : residue ⟨9,by norm_num⟩ = (19:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox19_mem + · exact restBox19_mem +def restBox21 : Fin 31 → CI := + ![⟨⟨-866025403784438646763723170752936183471402626905684319569564,-866025403784438646763723170752936183471402626904687414653467⟩,⟨499999999999999999999999999999999999999999999999509043922407,500000000000000000000000000000000000000000000000506360711682⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999989904136672550,1000000000000000000000000000000000000000000000010018001015467⟩,⟨-3732050807568877293527446341505872366942805253820445830920759,-3732050807568877293527446341505872366942805253800331394444234⟩⟩, + ⟨⟨2866025403784438646763723170752936183471402626791502487420769,2866025403784438646763723170752936183471402627019016010849316⟩,⟨6964101615137754587054892683011744733885610507506959717117229,6964101615137754587054892683011744733885610507734468484436884⟩⟩, + ⟨⟨-9196152422706631880582339024517617100828415762343449384998767,-9196152422706631880582339024517617100828415760518923897346850⟩,⟨-8464101615137754587054892683011744733885610508532910868072301,-8464101615137754587054892683011744733885610506708384547022069⟩⟩, + ⟨⟨20392304845413263761164678049035234201656831517139802285951370,20392304845413263761164678049035234201656831528584729114001330⟩,⟨4464101615137754587054892683011744733885610501898116250187917,4464101615137754587054892683011744733885610513343043742176236⟩⟩, + ⟨⟨-26124355652982141054692124390541106568599636806473359987518362,-26124355652982141054692124390541106568599636746871607498444412⟩,⟨11928203230275509174109785366023489467771220985440881136748830,11928203230275509174109785366023489467771221045042536433994291⟩⟩, + ⟨⟨18392304845413263761164678049035234201656831388355613096297502,18392304845413263761164678049035234201656831657368371656722899⟩,⟨-29856406460551018348219570732046978935542442164989702323283288,-29856406460551018348219570732046978935542441895976423332550518⟩⟩, + ⟨⟨2464101615137754587054892683011744733885609962912148302178454,2464101615137754587054892683011744733885611052329890432278932⟩,⟨44516660498395404815856802439576340770256467754826637266112423,44516660498395404815856802439576340770256468844242931452610859⟩⟩, + ⟨⟨-36454482671904334288510740244305787485956651949206565562470963,-36454482671904334288510740244305787485956647873190887325725757⟩,⟨-39284609690826527522329356098070468403313665083733353094386435,-39284609690826527522329356098070468403313661007715107742605232⟩⟩, + ⟨⟨59176914536239791283494034147105702604970487347127286573037142,59176914536239791283494034147105702604970501790046039998112829⟩,⟨9464101615137754587054892683011744733885603286164000743567619,9464101615137754587054892683011744733885617729076880872417741⟩⟩, + ⟨⟨-61444863728670913989966587805599830238027714036786805148495941,-61444863728670913989966587805599830238027664592765478891842804⟩,⟨32856406460551018348219570732046978935542417308460992418503102,32856406460551018348219570732046978935542466752505262496181209⟩⟩, + ⟨⟨28856406460551018348219570732046978935542359051969474715816138,28856406460551018348219570732046978935542525008995999925370386⟩,⟨-73837168574084177751131265854635064439684603816121188560209648,-73837168574084177751131265854635064439684437859155999499463918⟩⟩, + ⟨⟨24392304845413263761164678049035234201656555816329004134222882,24392304845413263761164678049035234201657107229395701179794098⟩,⟨80105117766515300457603819513129192072741439877246652525266771,80105117766515300457603819513129192072741991290409349348919980⟩⟩, + ⟨⟨-71105117766515300457603819513129192072742627427913933711460772,-71105117766515300457603819513129192072740803739742311788253747⟩,⟨-55444863728670913989966587805599830238028601158807663866792469,-55444863728670913989966587805599830238026777470744772851920634⟩⟩, + ⟨⟨95301270189221932338186158537646809173567121254144454573423320,95301270189221932338186158537646809173573141436373931189439133⟩,⟨-3010091175361187798582,3010091175361189900351⟩⟩, + ⟨⟨-71105117766515300457603819513129192072751645481634208895007591,-71105117766515300457603819513129192072731785686022036607751768⟩,⟨55444863728670913989966587805599830238017759417032287713549943,55444863728670913989966587805599830238037619212520149002131946⟩⟩, + ⟨⟨24392304845413263761164678049035234201624081219702949054289295,24392304845413263761164678049035234201689581826021756264413788⟩,⟨-80105117766515300457603819513129192072774465887044020795220131,-80105117766515300457603819513129192072708965280611981078779403⟩⟩, + ⟨⟨28856406460551018348219570732046978935434433336928410318384809,28856406460551018348219570732046978935650450724037064318707893⟩,⟨73837168574084177751131265854635064439576512144136542281887771,73837168574084177751131265854635064439792529531140645781093513⟩⟩, + ⟨⟨-61444863728670913989966587805599830238383890324039624424219378,-61444863728670913989966587805599830237671488305512659614797419⟩,⟨-32856406460551018348219570732046978935898643039784842293115011,-32856406460551018348219570732046978935186241021181412627323364⟩⟩, + ⟨⟨59176914536239791283494034147105702603795786386287994591639185,59176914536239791283494034147105702606145202750885331982187813⟩,⟨-9464101615137754587054892683011744735060318689901418850492394,-9464101615137754587054892683011744732710902325339462759347951⟩⟩, + ⟨⟨-36454482671904334288510740244305787489830693671104683825056273,-36454482671904334288510740244305787482082606151292769069527417⟩,⟨39284609690826527522329356098070468399439619285812655723557261,39284609690826527522329356098070468407187706805635805109564611⟩⟩, + ⟨⟨2464101615137754587054892683011744721109490177542482940239373,2464101615137754587054892683011744746661730837699555802525541⟩,⟨-44516660498395404815856802439576340783032588629611285976009086,-44516660498395404815856802439576340757480347969458282743077786⟩⟩, + ⟨⟨18392304845413263761164678049035234159522757287270040814171046,18392304845413263761164678049035234243790905758453943931420058⟩,⟨29856406460551018348219570732046978893408367794890067700665553,29856406460551018348219570732046978977676516266076057960544559⟩⟩, + ⟨⟨-26124355652982141054692124390541106707552633537542289434293789,-26124355652982141054692124390541106429646640015802678047964467⟩,⟨-11928203230275509174109785366023489606724217776111096319646772,-11928203230275509174109785366023489328818224254372321260398317⟩⟩, + ⟨⟨20392304845413263761164678049035233743406931577247080184942723,20392304845413263761164678049035234659906731468477451216975492⟩,⟨-4464101615137754587054892683011745192135510453235892796652801,-4464101615137754587054892683011744275635710562005267184968140⟩⟩, + ⟨⟨-9196152422706631880582339024517618612080246876430644812127425,-9196152422706631880582339024517615589576584646431728478116647⟩,⟨8464101615137754587054892683011743222633779392621203584393903,8464101615137754587054892683011746245137441622620091821965779⟩⟩, + ⟨⟨2866025403784438646763723170752931199548662406013279708276621,2866025403784438646763723170752941167394142847797238802151612⟩,⟨-6964101615137754587054892683011749717808350728512702239807401,-6964101615137754587054892683011739749962870286728725958115248⟩⟩, + ⟨⟨999999999999999999999999999999983563635544341698266677114464,1000000000000000000000000000000016436364455658301655447429170⟩,⟨3732050807568877293527446341505855930578349595508686342809146,3732050807568877293527446341505888803307260912112090886002304⟩⟩, + ⟨⟨-866025403784438646763723170752990388580630955779865021834173,-866025403784438646763723170752881978362174298030506702255156⟩,⟨-500000000000000000000000000000054205109228328874692077449878,-499999999999999999999999999999945794890771671125323337520322⟩⟩, + ⟨⟨-178761786061733091426931244780,178761786061733091426927646844⟩,⟨-178761786061733091431726216416,178761786061733091431741204222⟩⟩, + ⟨⟨-589534392807384755736683412775,589534392807384755736678576100⟩,⟨-589534392807384755740934991867,589534392807384755740919436862⟩⟩] +lemma restBox21_calc (j : Fin 31) : recoverRest phaseBox21 restBox21 j = restBox21 j := by + revert j + decide +kernel +lemma restBox21_mem (j : Fin 31) : (restBox21 j).Mem ((restPolynomial ⟨10,by norm_num⟩).coeff j.val) := by + apply recoverRest_mem ⟨10,by norm_num⟩ phaseBox21 + · have hr : residue ⟨10,by norm_num⟩ = (21:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox21_mem + · exact restBox21_calc +def cBox21 : Fin 31 → CI := + ![⟨⟨0,0⟩,⟨0,0⟩⟩, + ⟨⟨-26380642397055816535097180326270597663156998636395478033762,-26380642397055816535097180326270597663156998636364942629027⟩,⟨15230870989335429967337177468944677677953239825973862604340,15230870989335429967337177468944677677953239826004339573799⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651670098379681,30461741978670859934674354937889355355906479652282995651015⟩,⟨-113684768751453352939543070528319906038126956577023122919257,-113684768751453352939543070528319906038126956576409678405484⟩⟩, + ⟨⟨87304126354397536404445890202049308374969957936872404506549,87304126354397536404445890202049308374969957943803418549328⟩,⟨212138666513571275911748963587695134398300673323976180034379,212138666513571275911748963587695134398300673330907843919176⟩⟩, + ⟨⟨-280130822297018338949280501709181007402567910453984373837594,-280130822297018338949280501709181007402567910398404365830818⟩,⟨-257831279481577565813760495994529167432160392833196534627727,-257831279481577565813760495994529167432160392777616643197488⟩⟩, + ⟨⟨621185128551378397767909713294140725516948779982022747080166,621185128551378397767909713294140725516948780330659109668665⟩,⟨135984311566894126075063076242971746008534474023176947637487,135984311566894126075063076242971746008534474371810241566312⟩⟩, + ⟨⟨-795793381260173470576801493698239342266888696944796735028317,-795793381260173470576801493698239342266888695129218463051055⟩,⟨363353849069800831954149217299611558084788386443150825998307,363353849069800831954149217299611558084788388258723384347552⟩⟩, + ⟨⟨560261644594036677898561003418362014805135816755076733125810,560261644594036677898561003418362014805135824949677540100926⟩,⟨-909478150011626823516344564226559248305015656711039243503645,-909478150011626823516344564226559248305015648516420360133426⟩⟩, + ⟨⟨75060827609552406205714366367193035296721498300770189953784,75060827609552406205714366367193035296721531486332835559642⟩,⟨1356055025854210148475362497116601357072024500296630778284272,1356055025854210148475362497116601357072024533482157472068222⟩⟩, + ⟨⟨-1110467045117477712860333524956928462718112629212057074373401,-1110467045117477712860333524956928462718112505049512113454899⟩,⟨-1196677644134750505633807894181447418000037902916017943214385,-1196677644134750505633807894181447418000037778753394234666298⟩⟩, + ⟨⟨1802631901696793473434380430006643465839033161186825262226003,1802631901696793473434380430006643465839033601143301223879245⟩,⟨288293021460248425748434850932418522788066652479234314199099,288293021460248425748434850932418522788067092435521724437244⟩⟩, + ⟨⟨-1871717584817365280102883489105659691936346055575725171141848,-1871717584817365280102883489105659691936344549424693227086919⟩,⟨1000863375947639403320367629040227314372734338493802314931264,1000863375947639403320367629040227314372735844645527623712077⟩⟩, + ⟨⟨879016408032955963581670209288669892949106645291678576191403,879016408032955963581670209288669892949111700631805730554065⟩,⟨-2249208777539376798393398362896685574606044773109867675066683,-2249208777539376798393398362896685574606039717771600203727289⟩⟩, + ⟨⟨743032096466061837506607133045698146940566300262971447282248,743032096466061837506607133045698146940583097265537570600442⟩,⟨2440141428574632044800598841747259222126971686881038015216650,2440141428574632044800598841747259222126988483886539263138552⟩⟩, + ⟨⟨-2165985750766594305388529647306255023923849544875266398541216,-2165985750766594305388529647306255023923793992156719108400310⟩,⟨-1688947132945340120494837359478323559800934200945961187154186,-1688947132945340120494837359478323559800878648230729066810312⟩⟩, + ⟨⟨2903042702743675543357925473083776361664895181102970879358692,2903042702743675543357925473083776361665078566340728256865948⟩,⟨-91692620716126603246,91692620716126668223⟩⟩, + ⟨⟨-2165985750766594305388529647306255023924124250500843214021059,-2165985750766594305388529647306255023923519286531142293014327⟩,⟨1688947132945340120494837359478323559800603942605389549676469,1688947132945340120494837359478323559801208906571300704194271⟩⟩, + ⟨⟨743032096466061837506607133045698146939577067479687142180325,743032096466061837506607133045698146941572330048821875846715⟩,⟨-2440141428574632044800598841747259222127977716670086037770084,-2440141428574632044800598841747259222125982454097491240578927⟩⟩, + ⟨⟨879016408032955963581670209288669892945819040007234115803487,879016408032955963581670209288669892952399305916250190815798⟩,⟨2249208777539376798393398362896685574602752112487813935678036,2249208777539376798393398362896685574609332378393653943217273⟩⟩, + ⟨⟨-1871717584817365280102883489105659691947195805736941506772471,-1871717584817365280102883489105659691925494799263476891415370⟩,⟨-1000863375947639403320367629040227314383585594807559131435967,-1000863375947639403320367629040227314361884588331770807383881⟩⟩, + ⟨⟨1802631901696793473434380430006643465803249723615642007754697,1802631901696793473434380430006643465874817038714484478432286⟩,⟨-288293021460248425748434850932418522823850530006255546265665,-288293021460248425748434850932418522752283214908500492182306⟩⟩, + ⟨⟨-1110467045117477712860333524956928462836122688559123324668875,-1110467045117477712860333524956928462600102445702445863354769⟩,⟨1196677644134750505633807894181447417882027719406195970599688,1196677644134750505633807894181447418118047962263216207162386⟩⟩, + ⟨⟨75060827609552406205714366367193034907538633910247717466032,75060827609552406205714366367193035685904395876855308301347⟩,⟨-1356055025854210148475362497116601357461207397872640014130987,-1356055025854210148475362497116601356682841635906148236232532⟩⟩, + ⟨⟨560261644594036677898561003418362013521658522977609678369889,560261644594036677898561003418362016088613118727144594629941⟩,⟨909478150011626823516344564226559247021538354738929443179764,909478150011626823516344564226559249588492950488530160621446⟩⟩, + ⟨⟨-795793381260173470576801493698239346499639030529713918278368,-795793381260173470576801493698239338034138361544301279687919⟩,⟨-363353849069800831954149217299611562317538721843629310122411,-363353849069800831954149217299611553852038052858244900507325⟩⟩, + ⟨⟨621185128551378397767909713294140711557858566261271439501020,621185128551378397767909713294140739476038994051410417307773⟩,⟨-135984311566894126075063076242971759967624688092565416369081,-135984311566894126075063076242971732049444260302421772507053⟩⟩, + ⟨⟨-280130822297018338949280501709181053437931254645179106630229,-280130822297018338949280501709180961367204566207209633278953⟩,⟨257831279481577565813760495994529121396797048586422351018729,257831279481577565813760495994529213467523737024390826540231⟩⟩, + ⟨⟨87304126354397536404445890202049156556001403701289343920384,87304126354397536404445890202049460193938512179386479505991⟩,⟨-212138666513571275911748963587695286217269227566491238860357,-212138666513571275911748963587694982579332119088392784982519⟩⟩, + ⟨⟨30461741978670859934674354937888854675613363991869716804655,30461741978670859934674354937889856036199595312083376825565⟩,⟨113684768751453352939543070528319405357833840916609065562616,113684768751453352939543070528320406718420072236823735867133⟩⟩, + ⟨⟨-26380642397055816535097180326272248845208237661284933745271,-26380642397055816535097180326268946481105759611475486608816⟩,⟨-15230870989335429967337177468946328860004478850893948034922,-15230870989335429967337177468943026495902000801084254458089⟩⟩, + ⟨⟨-5445395402658874330671108695,5445395402658874330670999096⟩,⟨-5445395402658874330817171884,5445395402658874330817628439⟩⟩] +lemma cBox21_calc (j : Fin 31) : cCoeffBox restBox21 j = cBox21 j := by + revert j + decide +kernel +lemma cBox21_mem (j : Fin 31) : (cBox21 j).Mem (cCoefficient ⟨10,by norm_num⟩ j) := by + rw [← cBox21_calc] + exact cCoeffBox_mem ⟨10,by norm_num⟩ restBox21 restBox21_mem j +def dBox21 : Fin 31 → CI := + ![⟨⟨-59766454282,61485893561⟩,⟨87266462599716478846184538424430635672143594427025497960562,87266462599716478846184538424430635672143594427147002042267⟩⟩, + ⟨⟨-238416409619234633062357726561276946695815781769353816009653,-238416409619234633062357726561276946695815781766947095224861⟩,⟨-238416409619234633062357726561276946695815781769348502303695,-238416409619234633062357726561276946695815781766941703596748⟩⟩, + ⟨⟨575790770928143146708997935902992009224082658706306080633642,575790770928143146708997935902992009224082658733567307571768⟩,⟨43633231299858239423092269212215317836071797199905931980442,43633231299858239423092269212215317836071797227165735178653⟩⟩, + ⟨⟨-715249228857703899187073179683830840087447345414406563501297,-715249228857703899187073179683830840087447345194469129676810⟩,⟨238416409619234633062357726561276946695815781658186309688711,238416409619234633062357726561276946695815781878122251233225⟩⟩, + ⟨⟨825898669637335181509453606820276436080205940548874392649522,825898669637335181509453606820276436080205941940387900831653⟩,⟨-825898669637335181509453606820276436080205941940402412345543,-825898669637335181509453606820276436080205940548889189998016⟩⟩, + ⟨⟨-3661288260996330,3661317930385404⟩,⟨1430498457715407798374146359367661680174894686947577405792627,1430498457715407798374146359367661680174894694270190702817772⟩⟩, + ⟨⟨-901473643147094258617540200888699591592042051631690409369429,-901473643147094258617540200888699591592042018198663748900234⟩,⟨-956798363536909899778730414456922389588421349601761350369224,-956798363536909899778730414456922389588421316168751315637655⟩⟩, + ⟨⟨1430498457715407798374146359367661680174894622122590108938247,1430498457715407798374146359367661680174894759095176516924212⟩,⟨302299894039036308432346376273692622047344306195796620180014,302299894039036308432346376273692622047344443168429772156317⟩⟩, + ⟨⟨-1500647392255152208802734025503706561136739954129956463393579,-1500647392255152208802734025503706561136739436166463183885931⟩,⟨1128198563676371489941799983093969058127550056945074769801394,1128198563676371489941799983093969058127550574908468745498298⟩⟩, + ⟨⟨40500506239886871893792761000400715030912665610050812131877,40500506239886871893792761000400715030914517191648974808234⟩,⟨-1930714255133791867975057701202230533887142181449206798164193,-1930714255133791867975057701202230533887140329867369035317395⟩⟩, + ⟨⟨1180390559006215763573690688450377253318768218069304311264865,1180390559006215763573690688450377253318774598099064862114710⟩,⟨1608164107974812123595814944428337554324336895261252133143302,1608164107974812123595814944428337554324343275290198274929643⟩⟩, + ⟨⟨-2454313030732090741052164931748814347920013574795232326020356,-2454313030732090741052164931748814347919992069646381410705601⟩,⟨-517333325478356138018508214122954608422555907512648146207158,-517333325478356138018508214122954608422534402361656776341194⟩⟩, + ⟨⟨1954097233313706671451253589914245494207720443619317140013093,1954097233313706671451253589914245494207792070723468146801285⟩,⟨-1558265426555011149114123658792493030877987689987018924398753,-1558265426555011149114123658792493030877916062886667488298168⟩⟩, + ⟨⟨-453449841058554462648519564410538933071135153033089707064645,-453449841058554462648519564410538933070897971013263741473922⟩,⟨1913596727073819799557460828913844779176724074757897824114755,1913596727073819799557460828913844779176961256783161707987198⟩⟩, + ⟨⟨-831324708607349848188952534752654710630588724423214778697916,-831324708607349848188952534752654710629805336328453470189140⟩,⟨-1863698045654018825075769543278000255730846150975547704346222,-1863698045654018825075769543278000255730062762887723704651118⟩⟩, + ⟨⟨2175396114872969236096014444187136686191981024472437880972001,2175396114872969236096014444187136686194565873631157920255994⟩,⟨-1292424583077888194849,1292424583077888292726⟩⟩, + ⟨⟨-831324708607349848188952534752654710634459962789574441976460,-831324708607349848188952534752654710625934097962093807009701⟩,⟨1863698045654018825075769543278000255726191524521639263022248,1863698045654018825075769543278000255734717389341632145812503⟩⟩, + ⟨⟨-453449841058554462648519564410538933085075809768578308664653,-453449841058554462648519564410538933056957314277775139706288⟩,⟨-1913596727073819799557460828913844779190901913519589308090563,-1913596727073819799557460828913844779162783418021470223920058⟩⟩, + ⟨⟨1954097233313706671451253589914245494161390069451771881504425,1954097233313706671451253589914245494254122444891013405123054⟩,⟨1558265426555011149114123658792493030831585688720252229126955,1558265426555011149114123658792493030924318064153434183581357⟩⟩, + ⟨⟨-2454313030732090741052164931748814348072913198265108501052589,-2454313030732090741052164931748814347767092446176505235520772⟩,⟨517333325478356138018508214122954608269634778890619161817070,517333325478356138018508214122954608575455530983685760631972⟩⟩, + ⟨⟨1180390559006215763573690688450377252814491523242757780719687,1180390559006215763573690688450377253823051292925611392581324⟩,⟨-1608164107974812123595814944428337554828619970115751600025358,-1608164107974812123595814944428337553820060200435698807884878⟩⟩, + ⟨⟨40500506239886871893792761000400713367860368834929242100754,40500506239886871893792761000400716693966813966770544826717⟩,⟨1930714255133791867975057701202230532224088033091734326085394,1930714255133791867975057701202230535550194478224841507222930⟩⟩, + ⟨⟨-1500647392255152208802734025503706566621284848061178130654815,-1500647392255152208802734025503706555652194542235241516528743⟩,⟨-1128198563676371489941799983093969063612095468839526963202777,-1128198563676371489941799983093969052643005163014016551952441⟩⟩, + ⟨⟨1430498457715407798374146359367661662087539024848815588009641,1430498457715407798374146359367661698262250356368951037701431⟩,⟨-302299894039036308432346376273692640134700040442257968285228,-302299894039036308432346376273692603959988708921968424124939⟩⟩, + ⟨⟨-901473643147094258617540200888699651241917312558934380578712,-901473643147094258617540200888699531942166757271419777523772⟩,⟨956798363536909899778730414456922329938546055241536421357135,956798363536909899778730414456922449238296610528976244643058⟩⟩, + ⟨⟨-196717955099245915430176123,196717955099245945099425105⟩,⟨-1430498457715407798374146359367661876892849789854830138551116,-1430498457715407798374146359367661483456939591362937969969386⟩⟩, + ⟨⟨825898669637335181509453606820275787328575242979800167375297,825898669637335181509453606820277084831836639509462126184650⟩,⟨825898669637335181509453606820275787328575242979819370331614,825898669637335181509453606820277084831836639509472231868869⟩⟩, + ⟨⟨-715249228857703899187073179683832979590565503399579747430081,-715249228857703899187073179683828700584329187209295945745598⟩,⟨-238416409619234633062357726561279086198933939863295654345936,-238416409619234633062357726561274807192697623673012906410297⟩⟩, + ⟨⟨575790770928143146708997935902984953405837268852526573231673,575790770928143146708997935902999065042328048587346814890806⟩,⟨-43633231299858239423092269212222373654317187080944732301207,-43633231299858239423092269212208262017826407346126934997422⟩⟩, + ⟨⟨-238416409619234633062357726561300215916921117469708674019543,-238416409619234633062357726561253677474710446066592237073261⟩,⟨238416409619234633062357726561253677474710446066587241783152,238416409619234633062357726561300215916921117469702964200159⟩⟩, + ⟨⟨-76739030402714413924509991930,76739030402714413926229267919⟩,⟨-87266462599716478846184538424507374702546308841011450021670,-87266462599716478846184538424353896641740880013161049979486⟩⟩] +lemma dBox21_calc (j : Fin 31) : dCoeffBox phaseBox21 restBox21 j = dBox21 j := by + revert j + decide +kernel +lemma dBox21_mem (j : Fin 31) : (dBox21 j).Mem (dCoefficient ⟨10,by norm_num⟩ j) := by + rw [← dBox21_calc] + apply dCoeffBox_mem ⟨10,by norm_num⟩ phaseBox21 restBox21 + · have hr : residue ⟨10,by norm_num⟩ = (21:ℤ) := by norm_num [residue] + rw [hr] + exact phaseBox21_mem + · exact restBox21_mem +end AtomicTriangular.FiniteCertificate + +noncomputable section +open scoped BigOperators FourierTransform +namespace AtomicTriangular.Construction +open Complex + +def damping (q : Fin 2) : ℝ := if q.val=0 then h else H +lemma b_pos : 0 < b := by unfold b; positivity +lemma b_sq : b^2 = 3/4 := by + unfold b + have hh := Real.sq_sqrt (by norm_num : (0:ℝ) ≤ 3) + nlinarith +lemma damping_pos (q : Fin 2) : 0 < damping q := by + unfold damping h H + split_ifs <;> norm_num + +lemma waveDen_pos {k : ℝ} (hk : 0 < k) (t : ℝ) : 0 < waveDen k t := by + unfold waveDen + positivity +lemma transformedWave_hasDeriv (k v t : ℝ) (s : ℂ) : + HasDerivAt (transformedWave k v t) (I*Real.pi*zeta k v t*transformedWave k v t s) s := by + unfold transformedWave + have hh := ((hasDerivAt_id s).const_mul (I*(Real.pi:ℂ)*zeta k v t)).cexp.const_mul (lambda k t) + simpa only [transformedWave,mul_one,one_mul,id_eq,mul_assoc,mul_comm,mul_left_comm] using hh + +lemma complex_gaussian_transform (a : ℂ) (ha : 0 < a.re) (w : Plane) : + 𝓕 (fun x : Plane => Complex.exp (-(Real.pi : ℂ) * a * ‖x‖ ^ 2)) w = + a⁻¹ * Complex.exp (-(Real.pi : ℂ) * ‖w‖ ^ 2 / a) := by + have hp : (Real.pi : ℂ) ≠ 0 := by exact_mod_cast Real.pi_ne_zero + have ha0 : a ≠ 0 := by intro h; subst a; simp at ha + have hh : 0 < ((Real.pi : ℂ) * a).re := by + simpa using mul_pos Real.pi_pos ha + have hg := fourier_gaussian_innerProductSpace hh w + have hf : Module.finrank ℝ Plane = 2 := by simp [Plane] + rw [hf] at hg + norm_num at hg + have hfun : (fun x : Plane => Complex.exp (-(Real.pi : ℂ) * a * ‖x‖ ^ 2)) = + (fun x : Plane => Complex.exp (-((Real.pi : ℂ) * a * ‖x‖ ^ 2))) := by + funext x + congr 1 + ring + rw [hfun, hg] + have hquot : (Real.pi : ℂ) / ((Real.pi : ℂ) * a) = a⁻¹ := by field_simp + rw [hquot] + congr 2 + field_simp + +def spectralParameter (k t : ℝ) : ℂ := (b:ℂ)*((k:ℂ)-I*t) +lemma spectralParameter_pos {k : ℝ} (hk : 0 < k) (t : ℝ) : 0 < (spectralParameter k t).re := by + simpa [spectralParameter] using mul_pos b_pos hk +lemma spectralParameter_inv {k : ℝ} (hk : 0 < k) (t : ℝ) : + (spectralParameter k t)⁻¹ = lambda k t := by + have hb : (b:ℂ) ≠ 0 := by exact_mod_cast b_pos.ne' + have hd : (waveDen k t:ℂ) ≠ 0 := by exact_mod_cast (waveDen_pos hk t).ne' + apply inv_eq_of_mul_eq_one_right + unfold lambda spectralParameter + push_cast + field_simp + simp only [waveDen] + push_cast + ring_nf + simp [I_sq] + +lemma spectral_exponent {k : ℝ} (hk : 0 < k) (v t : ℝ) (x : Plane) : + -(Real.pi:ℂ)*(‖x‖:ℂ)^2/spectralParameter k t = + -(Real.pi:ℂ)*v*(radial x:ℂ)+I*Real.pi*zeta k v t*(radial x:ℂ) := by + have hb : (b:ℂ) ≠ 0 := by exact_mod_cast b_pos.ne' + have hd : (waveDen k t:ℂ) ≠ 0 := by exact_mod_cast (waveDen_pos hk t).ne' + have hbs := congrArg (fun r : ℝ => (r:ℂ)) b_sq + push_cast at hbs + rw [div_eq_mul_inv,spectralParameter_inv hk] + unfold lambda zeta Xwave radial + push_cast + field_simp + ring_nf + simp only [I_sq] + rw [hbs] + ring + +lemma transformed_spectral_wave {k : ℝ} (hk : 0 < k) (v t : ℝ) (w : Plane) : + 𝓕 (fun x : Plane => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))* + exp (I*Real.pi*t*(radial x:ℂ))) w = + exp (-(Real.pi:ℂ)*v*(radial w:ℂ))*transformedWave k v t (radial w) := by + have hfun : (fun x : Plane => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))* + exp (I*Real.pi*t*(radial x:ℂ))) = + (fun x : Plane => exp (-(Real.pi:ℂ)*spectralParameter k t*‖x‖^2)) := by + funext x + rw [← exp_add] + congr 1 + unfold spectralParameter radial + push_cast + ring + rw [hfun,complex_gaussian_transform _ (spectralParameter_pos hk t), + spectralParameter_inv hk,spectral_exponent hk,exp_add] + unfold transformedWave + ring + +end AtomicTriangular.Construction + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex + +def bBox : RI := + ⟨866025403784438646763723170752936183471402626905190314027903, + 866025403784438646763723170752936183471402626905190314027904⟩ +lemma bBox_mem : bBox.Mem b := by + obtain ⟨hl,hu⟩ := Constants.bStar_bracket + constructor <;> dsimp [RI.Mem, bBox] + · have hr : (bBox.lo:ℝ)/(scale:ℝ) ≤ Constants.bStar := by norm_num [bBox,scale,Constants.bStar] + simpa only [b, mul_comm, bBox] using (div_le_iff₀ scale_pos).mp (hr.trans hl.le) + · have hr : Constants.bStar+Constants.eps ≤ (bBox.hi:ℝ)/(scale:ℝ) := by + norm_num [bBox,scale,Constants.bStar,Constants.eps] + simpa only [b,mul_comm,bBox] using (le_div_iff₀ scale_pos).mp (hu.le.trans hr) + +def dampingBox (q : Fin 2) : RI := (RI.point (if q.val=0 then 17 else 27)).divNat 50 +lemma dampingBox_mem (q : Fin 2) : (dampingBox q).Mem (damping q) := by + unfold dampingBox damping h H + split_ifs + · simpa using RI.mem_divNat (RI.mem_point 17) (by norm_num : 0<(50:ℕ)) + · simpa using RI.mem_divNat (RI.mem_point 27) (by norm_num : 0<(50:ℕ)) +def realFrequencyBox (j : Fin 31) : RI := (RI.point ((j.val:ℤ)-15)).divNat 18 +lemma realFrequencyBox_mem (j : Fin 31) : (realFrequencyBox j).Mem (frequency j) := by + have hh := RI.mem_divNat (RI.mem_point ((j.val:ℤ)-15)) (by norm_num : 0<(18:ℕ)) + simpa only [realFrequencyBox, frequency, Int.cast_sub, Int.cast_natCast, Int.cast_ofNat, + Nat.cast_ofNat] using hh + +def denBox (q : Fin 2) (j : Fin 31) : RI := + ((dampingBox q).pow 2).add ((realFrequencyBox j).pow 2) +lemma denBox_mem (q : Fin 2) (j : Fin 31) : + (denBox q j).Mem (waveDen (damping q) (frequency j)) := by + exact RI.mem_add (RI.mem_pow (dampingBox_mem q) 2) (RI.mem_pow (realFrequencyBox_mem j) 2) +lemma denBox_pos (q : Fin 2) (j : Fin 31) : 0 < (denBox q j).lo := by + revert q j + decide +kernel +lemma bdenBox_pos (q : Fin 2) (j : Fin 31) : 0 < (bBox.mul (denBox q j)).lo := by + revert q j + decide +kernel + +def xwaveBox (q : Fin 2) (j : Fin 31) : RI := + ((RI.point 4).divNat 3).mul (denBox q j).invPos +lemma xwaveBox_mem (q : Fin 2) (j : Fin 31) : + (xwaveBox q j).Mem (Xwave (damping q) (frequency j)) := by + unfold Xwave + rw [div_eq_mul_inv] + exact RI.mem_mul (by simpa using RI.mem_divNat (RI.mem_point 4) (by norm_num : 0<(3:ℕ))) + (RI.mem_invPos (denBox_mem q j) (denBox_pos q j)) + +def lambdaBox (q : Fin 2) (j : Fin 31) : CI := + ((CI.ofReal (dampingBox q)).add (CI.imag.mul (CI.ofReal (realFrequencyBox j)))).mul + (CI.ofReal (bBox.mul (denBox q j)).invPos) +lemma lambdaBox_mem (q : Fin 2) (j : Fin 31) : + (lambdaBox q j).Mem (lambda (damping q) (frequency j)) := by + unfold lambda + rw [div_eq_mul_inv,← Complex.ofReal_inv] + exact CI.mem_mul (CI.mem_add (CI.mem_ofReal (dampingBox_mem q)) + (CI.mem_mul CI.mem_imag (CI.mem_ofReal (realFrequencyBox_mem j)))) + (CI.mem_ofReal (RI.mem_invPos (RI.mem_mul bBox_mem (denBox_mem q j)) (bdenBox_pos q j))) + +def zetaBox (q v : Fin 2) (j : Fin 31) : CI := + (CI.ofReal ((realFrequencyBox j).mul (xwaveBox q j)).neg).add + (CI.imag.mul (CI.ofReal (((dampingBox q).mul (xwaveBox q j)).sub (dampingBox v)))) +lemma zetaBox_mem (q v : Fin 2) (j : Fin 31) : + (zetaBox q v j).Mem (zeta (damping q) (damping v) (frequency j)) := by + have hh := CI.mem_add (CI.mem_ofReal (RI.mem_neg + (RI.mem_mul (realFrequencyBox_mem j) (xwaveBox_mem q j)))) + (CI.mem_mul CI.mem_imag (CI.mem_ofReal + (RI.mem_sub (RI.mem_mul (dampingBox_mem q) (xwaveBox_mem q j)) (dampingBox_mem v)))) + simpa only [zetaBox,zeta,Complex.ofReal_neg,Complex.ofReal_mul,neg_mul] using hh + +def wavePhaseBox (q v : Fin 2) (j : Fin 31) : CI := + (CI.imag.mul (CI.ofReal piBox)).mul (zetaBox q v j) +lemma wavePhaseBox_mem (q v : Fin 2) (j : Fin 31) : + (wavePhaseBox q v j).Mem (I*Real.pi*zeta (damping q) (damping v) (frequency j)) := + CI.mem_mul (CI.mem_mul CI.mem_imag (CI.mem_ofReal piBox_mem)) (zetaBox_mem q v j) +end AtomicTriangular.FiniteCertificate +end +end +end +end +end +end +end +end +end +end +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Certificate/WaveJetsData.lean b/lean/OAI/Analysis/Triangular/Certificate/WaveJetsData.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc215582ea33dcfa76f006de8e0921144d62491f --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Certificate/WaveJetsData.lean @@ -0,0 +1,1639 @@ +import OAI.Analysis.Triangular.Certificate.WaveExpData + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def jetMultiplierBox (q : Fin 2) (i : Fin 20) (j : Fin 31) : CI := + let n : Fin 10 := ⟨i.val/2,by omega⟩ + (((CI.ofReal (QTable n).invPos).mul (lambdaTable q j)).mul (waveExpTable q n j)).mul + (if i.val%2=0 then CI.point (-1) else (CI.ofReal (DTable n)).sub (phaseHTable q j)) +lemma jetMultiplierBox_mem (q : Fin 2) (i : Fin 20) (j : Fin 31) : (jetMultiplierBox q i j).Mem + (jetMultiplier (damping q) H (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ (frequency j)) := by + let n : Fin 10 := ⟨i.val/2,by omega⟩ + have hq := CI.mem_ofReal (RI.mem_invPos (QTable_mem n) (QTable_pos n)) + have he := waveExpTable_mem q n j + have hp := phaseHTable_mem q j + have hh := CI.mem_mul (CI.mem_mul hq (lambdaTable_mem q j)) he + unfold jetMultiplier transformedWave + rw [← mul_assoc,← Complex.ofReal_inv] + change ((jetMultiplierBox q i j)).Mem _ + unfold jetMultiplierBox + split_ifs with hi + · simpa only [damping, Fin.val_one, one_ne_zero, ↓reduceIte, Fin.val_mk, hi, + Complex.ofReal_intCast, Int.cast_neg, Int.cast_ofNat, Nat.cast_one, Int.cast_one] using CI.mem_mul hh (CI.mem_point (-1)) + · simpa only [damping, Fin.val_one, one_ne_zero, ↓reduceIte, Fin.val_mk, hi] using + CI.mem_mul hh (CI.mem_sub (CI.mem_ofReal (DTable_mem n)) hp) + +def jetTable0_0 : Fin 31 → CI := + ![⟨⟨3714580992456358396211655320383486520505013794992590885469929,3714580992456358396211655320383486520505121160779603923848917⟩,⟨-58645605783406393326144728386148323286645752276094116752325,-58645605783406393326144728386148323286569433249647426145089⟩⟩, + ⟨⟨3089015391097191220541068927761190858927282552155423453990068,3089015391097191220541068927761190858927371836672116703806763⟩,⟨694881116216370823103185727453530852646153279604413415840630,694881116216370823103185727453530852646205176012818968539846⟩⟩, + ⟨⟨2311801544552761836058870994299793984892780493284082909741375,2311801544552761836058870994299793984892849571264429535057452⟩,⟨1189683206214118665272761753412359415127918769407526915308027,1189683206214118665272761753412359415127953155863033010260289⟩⟩, + ⟨⟨1497627792055136763001612271923693359952529049858106567077939,1497627792055136763001612271923693359952586815330263015388560⟩,⟨1382609790212815790933165771903807832630218493868444769236901,1382609790212815790933165771903807832630258456649916463752551⟩⟩, + ⟨⟨776939777781654483590108040811355153439455915840246279494532,776939777781654483590108040811355153439499496798377783741152⟩,⟨1292379450853492494154865353670096300672410000480549061803594,1292379450853492494154865353670096300672447355255496443106190⟩⟩, + ⟨⟨255365245614940090478023575450451179715392516356189014107307,255365245614940090478023575450451179715421759890999971100623⟩,⟨1005700166331637139757629582292547358713870347289825591991838,1005700166331637139757629582292547358713899415922375902519989⟩⟩, + ⟨⟨-27810312606049923396364171846571714165132514006669361764482,-27810312606049923396364171846571714165115289996602305999904⟩,⟨651768107085705401716501698611212793395549449840062092897792,651768107085705401716501698611212793395568288464383081506546⟩⟩, + ⟨⟨-113779779903878459393611774413895250640307776759942410248237,-113779779903878459393611774413895250640298903985303934294149⟩,⟨348900561289575568070670681958888800881026846780603313961516,348900561289575568070670681958888800881036931359043217114919⟩⟩, + ⟨⟨-92851710139409032458065136647229378378761711165172257324708,-92851710139409032458065136647229378378757632950899797565413⟩,⟨154883028485743752308816085130420704513427030997494811393106,154883028485743752308816085130420704513431507717292835275888⟩⟩, + ⟨⟨-47358065462377411753036621743249055825485289217951447134861,-47358065462377411753036621743249055825483537845853755583742⟩,⟨59666990298613153758047792759949945081450381176980022074596,59666990298613153758047792759949945081452105784249719019899⟩⟩, + ⟨⟨-16292307149166291993695965131213632788431659282550105141141,-16292307149166291993695965131213632788430944113695324508469⟩,⟨21934622031936287854157214272064366115514877760565544874751,21934622031936287854157214272064366115515511756154075959681⟩⟩, + ⟨⟨-2925222119652055668767190755928081237411107584367081448750,-2925222119652055668767190755928081237410862005368796629746⟩,⟨7994511438719294727025235621347259602130715940877971149257,7994511438719294727025235621347259602130947013242861013988⟩⟩, + ⟨⟨732486010257776358557468296756235071435599627571932046134,732486010257776358557468296756235071435640954711801477511⟩,⟨2376458578039693787715061824279055396598653500563855679743,2376458578039693787715061824279055396598722189427234713656⟩⟩, + ⟨⟨781552155387233948703560211706524173287412669887984184826,781552155387233948703560211706524173287435259774322770885⟩,⟨142377744106635877910719567220148206442133250472667206883,142377744106635877910719567220148206442149911533030181127⟩⟩, + ⟨⟨78216847055545220097252767463785624645971529365568981583,78216847055545220097252767463785624645976774465755095123⟩,⟨-337161530760815811904126413260198361774595320650406310831,-337161530760815811904126413260198361774585575375444511654⟩⟩, + ⟨⟨-254567898502973777029768478219996688132837362755266157063,-254567898502973777029768478219996688132830004756389742056⟩,⟨-22,23⟩⟩, + ⟨⟨78216847055545220097252767463785624645971529365568981583,78216847055545220097252767463785624645976774465755095123⟩,⟨337161530760815811904126413260198361774585575375444511656,337161530760815811904126413260198361774595320650406310833⟩⟩, + ⟨⟨781552155387233948703560211706524173287412669887984184835,781552155387233948703560211706524173287435259774322770885⟩,⟨-142377744106635877910719567220148206442149911533030181122,-142377744106635877910719567220148206442133250472667206881⟩⟩, + ⟨⟨732486010257776358557468296756235071435599627571932046151,732486010257776358557468296756235071435640954711801477527⟩,⟨-2376458578039693787715061824279055396598722189427234713645,-2376458578039693787715061824279055396598653500563855679733⟩⟩, + ⟨⟨-2925222119652055668767190755928081237411107584367081448724,-2925222119652055668767190755928081237410862005368796629657⟩,⟨-7994511438719294727025235621347259602130947013242861014040,-7994511438719294727025235621347259602130715940877971149250⟩⟩, + ⟨⟨-16292307149166291993695965131213632788431659282550105141034,-16292307149166291993695965131213632788430944113695324508362⟩,⟨-21934622031936287854157214272064366115515511756154075959759,-21934622031936287854157214272064366115514877760565544874828⟩⟩, + ⟨⟨-47358065462377411753036621743249055825485289217951447134579,-47358065462377411753036621743249055825483537845853755583233⟩,⟨-59666990298613153758047792759949945081452105784249719020345,-59666990298613153758047792759949945081450381176980022074815⟩⟩, + ⟨⟨-92851710139409032458065136647229378378761711165172257323523,-92851710139409032458065136647229378378757632950899797563839⟩,⟨-154883028485743752308816085130420704513431507717292835276867,-154883028485743752308816085130420704513427030997494811393696⟩⟩, + ⟨⟨-113779779903878459393611774413895250640307776759942410246217,-113779779903878459393611774413895250640298903985303934291583⟩,⟨-348900561289575568070670681958888800881036931359043217115879,-348900561289575568070670681958888800881026846780603313961927⟩⟩, + ⟨⟨-27810312606049923396364171846571714165132514006669361760096,-27810312606049923396364171846571714165115289996602305996945⟩,⟨-651768107085705401716501698611212793395568288464383081505860,-651768107085705401716501698611212793395549449840062092898536⟩⟩, + ⟨⟨255365245614940090478023575450451179715392516356189014115029,255365245614940090478023575450451179715421759890999971105647⟩,⟨-1005700166331637139757629582292547358713899415922375902517470,-1005700166331637139757629582292547358713870347289825591992004⟩⟩, + ⟨⟨776939777781654483590108040811355153439455915840246279508079,776939777781654483590108040811355153439499496798377783746295⟩,⟨-1292379450853492494154865353670096300672447355255496443096315,-1292379450853492494154865353670096300672410000480549061802147⟩⟩, + ⟨⟨1497627792055136763001612271923693359952529049858106567092051,1497627792055136763001612271923693359952586815330263015389065⟩,⟨-1382609790212815790933165771903807832630258456649916463738229,-1382609790212815790933165771903807832630218493868444769236195⟩⟩, + ⟨⟨2311801544552761836058870994299793984892780493284082909740824,2311801544552761836058870994299793984892849571264429535072986⟩,⟨-1189683206214118665272761753412359415127953155863033010254029,-1189683206214118665272761753412359415127918769407526915285683⟩⟩, + ⟨⟨3089015391097191220541068927761190858927282552155423453987581,3089015391097191220541068927761190858927371836672116703818936⟩,⟨-694881116216370823103185727453530852646205176012818968529878,-694881116216370823103185727453530852646153279604413415816007⟩⟩, + ⟨⟨3714580992456358396211655320383486520505013794992590885468092,3714580992456358396211655320383486520505121160779603923849513⟩,⟨58645605783406393326144728386148323286569433249647426174437,58645605783406393326144728386148323286645752276094116784116⟩⟩] +lemma jetTable0_0_calc (j : Fin 31) : jetMultiplierBox 0 0 j = jetTable0_0 j := by + revert j + decide +kernel +lemma jetTable0_0_mem (j : Fin 31) : (jetTable0_0 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨0,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_0_calc] + exact jetMultiplierBox_mem 0 0 j +def jetTable0_1 : Fin 31 → CI := + ![⟨⟨-1196762040082139379937020675308328440632405800603248889658939,-1196762040082139379937020675308328440631970678014563181303494⟩,⟨16029825417220113957398578802335994977466104618298405024364706,16029825417220113957398578802335994977466598077610991716256873⟩⟩, + ⟨⟨-5021956703329961151091643407569323219764475206116615829265522,-5021956703329961151091643407569323219764132699887398426377783⟩,⟨13544214905867830542652562972998640392168795104497120768672879,13544214905867830542652562972998640392169242431735673798351027⟩⟩, + ⟨⟨-7652802352181265680617631072033573913902882464750831899478629,-7652802352181265680617631072033573913902619261391371749444556⟩,⟨9944081894475498895655251872458140174910414750512101806632530,9944081894475498895655251872458140174910793136746609134686125⟩⟩, + ⟨⟨-8653829950777123730027949222907199917846777700221170609368399,-8653829950777123730027949222907199917846484613426272355046306⟩,⟨5842932648530789007885155718134761104125374836737871074899318,5842932648530789007885155718134761104125733780832930284700449⟩⟩, + ⟨⟨-7964283153552219148730641776583332852993753320081080180116470,-7964283153552219148730641776583332852993477042125725856237786⟩,⟨2071003183557080375836041622067711074810254912627032873081085,2071003183557080375836041622067711074810563094868584472432874⟩⟩, + ⟨⟨-6024533396563504023221670607897559500262519431036546085321800,-6024533396563504023221670607897559500262297388644342779092571⟩,⟨-599648157612289295896231801592230635722655280437383333074272,-599648157612289295896231801592230635722419627685061949007840⟩⟩, + ⟨⟨-3663460999382253570551743370546591873361127748633200722417674,-3663460999382253570551743370546591873360975812631664959891412⟩,⟨-1806682526948396375647448886586792539578295589348514993233663,-1806682526948396375647448886586792539578138012424567887532373⟩⟩, + ⟨⟨-1712498386181152762756879431739116399723863793130740923774502,-1712498386181152762756879431739116399723773647413043759770966⟩,⟨-1786064363815448609685684798688254869743835160912237774187574,-1786064363815448609685684798688254869743744292720628504016683⟩⟩, + ⟨⟨-576965754047952316116225502239919564384835837370431204792759,-576965754047952316116225502239919564384790711223031601548579⟩,⟨-1181634469870130795355994558635727746564405407723136865721302,-1181634469870130795355994558635727746564360057913120124733785⟩⟩, + ⟨⟨-134757944605872581831745574472228738433497765270865590446720,-134757944605872581831745574472228738433477717110546273136047⟩,⟨-584871739785134349292772573721444292881705522835005220585584,-584871739785134349292772573721444292881685228117850299444871⟩⟩, + ⟨⟨-34316319779438743869261984137137991092889427417296721766186,-34316319779438743869261984137137991092881012575869098445747⟩,⟨-230400638208186176934758892581042768467660828052022571949738,-230400638208186176934758892581042768467652314178133498434718⟩⟩, + ⟨⟨-23855515730568692802916202901159729020518860000194627266847,-23855515730568692802916202901159729020515721614671241077160⟩,⟨-74579628331060068337618227678883287766559354203420672102872,-74579628331060068337618227678883287766556151531899591769439⟩⟩, + ⟨⟨-17845264910403129798859866403589971850994015119448232833042,-17845264910403129798859866403589971850993313997544549232030⟩,⟨-16788173067444780969206628690748071428819217704458723836199,-16788173067444780969206628690748071428818386973442727497690⟩⟩, + ⟨⟨-8148408952525538143462827800206414264522273481728971777140,-8148408952525538143462827800206414264521978784308878159101⟩,⟨1452940847148384003702142420281497535934668168948029989421,1452940847148384003702142420281497535934915475625759889378⟩⟩, + ⟨⟨-170495129521180329077373654344720793097104903898688338938,-170495129521180329077373654344720793097028677089889563664⟩,⟨3737942723939977492906385218255710782292927044170443435730,3737942723939977492906385218255710782293046777642354324838⟩⟩, + ⟨⟨2788033557456054157502507978059780825141870706590280120373,2788033557456054157502507978059780825141955701718454631785⟩,⟨-231,242⟩⟩, + ⟨⟨-170495129521180329077373654344720793097104903898688338938,-170495129521180329077373654344720793097028677089889563664⟩,⟨-3737942723939977492906385218255710782293046777642354324838,-3737942723939977492906385218255710782292927044170443435730⟩⟩, + ⟨⟨-8148408952525538143462827800206414264522273481728971777129,-8148408952525538143462827800206414264521978784308878159188⟩,⟨-1452940847148384003702142420281497535934915475625759889378,-1452940847148384003702142420281497535934668168948029989483⟩⟩, + ⟨⟨-17845264910403129798859866403589971850994015119448232833135,-17845264910403129798859866403589971850993313997544549232137⟩,⟨16788173067444780969206628690748071428818386973442727497543,16788173067444780969206628690748071428819217704458723836040⟩⟩, + ⟨⟨-23855515730568692802916202901159729020518860000194627267798,-23855515730568692802916202901159729020515721614671241077320⟩,⟨74579628331060068337618227678883287766556151531899591768900,74579628331060068337618227678883287766559354203420672103117⟩⟩, + ⟨⟨-34316319779438743869261984137137991092889427417296721767312,-34316319779438743869261984137137991092881012575869098446868⟩,⟨230400638208186176934758892581042768467652314178133498434547,230400638208186176934758892581042768467660828052022571949572⟩⟩, + ⟨⟨-134757944605872581831745574472228738433497765270865590451982,-134757944605872581831745574472228738433477717110546273138794⟩,⟨584871739785134349292772573721444292881685228117850299442822,584871739785134349292772573721444292881705522835005220586048⟩⟩, + ⟨⟨-576965754047952316116225502239919564384835837370431204804998,-576965754047952316116225502239919564384790711223031601556893⟩,⟨1181634469870130795355994558635727746564360057913120124726521,1181634469870130795355994558635727746564405407723136865717961⟩⟩, + ⟨⟨-1712498386181152762756879431739116399723863793130740923788383,-1712498386181152762756879431739116399723773647413043759779846⟩,⟨1786064363815448609685684798688254869743744292720628504002740,1786064363815448609685684798688254869743835160912237774178624⟩⟩, + ⟨⟨-3663460999382253570551743370546591873361127748633200722421222,-3663460999382253570551743370546591873360975812631664959906770⟩,⟨1806682526948396375647448886586792539578138012424567887517299,1806682526948396375647448886586792539578295589348514993206793⟩⟩, + ⟨⟨-6024533396563504023221670607897559500262519431036546085317969,-6024533396563504023221670607897559500262297388644342779108836⟩,⟨599648157612289295896231801592230635722419627685061948980611,599648157612289295896231801592230635722655280437383333026902⟩⟩, + ⟨⟨-7964283153552219148730641776583332852993753320081080180072734,-7964283153552219148730641776583332852993477042125725856251121⟩,⟨-2071003183557080375836041622067711074810563094868584472462032,-2071003183557080375836041622067711074810254912627032873167228⟩⟩, + ⟨⟨-8653829950777123730027949222907199917846777700221170609297568,-8653829950777123730027949222907199917846484613426272355059357⟩,⟨-5842932648530789007885155718134761104125733780832930284703789,-5842932648530789007885155718134761104125374836737871074986506⟩⟩, + ⟨⟨-7652802352181265680617631072033573913902882464750831899462370,-7652802352181265680617631072033573913902619261391371749338006⟩,⟨-9944081894475498895655251872458140174910793136746609134779228,-9944081894475498895655251872458140174910414750512101806635344⟩⟩, + ⟨⟨-5021956703329961151091643407569323219764475206116615829227855,-5021956703329961151091643407569323219764132699887398426264928⟩,⟨-13544214905867830542652562972998640392169242431735673798421036,-13544214905867830542652562972998640392168795104497120768667684⟩⟩, + ⟨⟨-1196762040082139379937020675308328440632405800603248889532714,-1196762040082139379937020675308328440631970678014563181165781⟩,⟨-16029825417220113957398578802335994977466598077610991716271845,-16029825417220113957398578802335994977466104618298405024368219⟩⟩] +lemma jetTable0_1_calc (j : Fin 31) : jetMultiplierBox 0 1 j = jetTable0_1 j := by + revert j + decide +kernel +lemma jetTable0_1_mem (j : Fin 31) : (jetTable0_1 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨0,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_1_calc] + exact jetMultiplierBox_mem 0 1 j +def jetTable0_2 : Fin 31 → CI := + ![⟨⟨-4608570963735512608192364970269309444919439861033234569536730,-4608570963735512608192364970269309444919185026418878724595270⟩,⟨4960184075974062690177100643818301161604872525490824994200494,4960184075974062690177100643818301161605246789149047493554969⟩⟩, + ⟨⟨-3680411579246968181654501848031310685369647845013627779721237,-3680411579246968181654501848031310685369444333714123648053764⟩,⟨595506889331227645038842655136404228181330786180842994965935,595506889331227645038842655136404228181502530423054827117336⟩⟩, + ⟨⟨-1560352653895831523442587449726359046781780826790131190410841,-1560352653895831523442587449726359046781685461453412717442910⟩,⟨-947724681495527811118707715174406171180124265488420476331466,-947724681495527811118707715174406171180071860294544923683914⟩⟩, + ⟨⟨-211843163221037469738704129355804908714780789951784032839022,-211843163221037469738704129355804908714740632696029860986900⟩,⟨-743504728491923488810677769028795047192589592654082465128750,-743504728491923488810677769028795047192548479965872120968418⟩⟩, + ⟨⟨131615233028073645937924174246364569436422187989942451296051,131615233028073645937924174246364569436429608227828495806975⟩,⟨-239595517732944429254954808539877984984167384342352459159257,-239595517732944429254954808539877984984154135716700354376968⟩⟩, + ⟨⟨74386597757625808962387954129783567273986694428927237350472,74386597757625808962387954129783567273990807695311307422971⟩,⟨-20874430327224685098974219034242329652395099961302300804430,-20874430327224685098974219034242329652390911967251800661774⟩⟩, + ⟨⟨14485997265678863561248504476603750254141053084065630419108,14485997265678863561248504476603750254141854098865463980763⟩,⟨7996177428908269961016081771067716463106327979678562973515,7996177428908269961016081771067716463106910363150762929058⟩⟩, + ⟨⟨889602555490321298621573626697757905929566815104703609044,889602555490321298621573626697757905929705683778762292187⟩,⟨2360859386232550264589608755066859434099612947619513463625,2360859386232550264589608755066859434099743493226646765273⟩⟩, + ⟨⟨-46689740587388535389619747819191255077183962058385856118,-46689740587388535389619747819191255077170504501954843734⟩,⟨251865182222939613419969607239831191238802758278989110370,251865182222939613419969607239831191238816685365580518544⟩⟩, + ⟨⟨-6692625166881045414321238520057242802907816225498415110,-6692625166881045414321238520057242802906984962193175660⟩,⟨14903435502014139641702824050581771283804687992554002949,14903435502014139641702824050581771283805512089934465572⟩⟩, + ⟨⟨-92624472149869761395876746873595534505860459297529545,-92624472149869761395876746873595534505825070100947314⟩,⟨634266401369191501634921299245453229937524897350385739,634266401369191501634921299245453229937559969618158828⟩⟩, + ⟨⟨13315206655947314225246986142344569856246986950156503,13315206655947314225246986142344569856247723225158297⟩,⟨9899615761648790107487755177864288543517221136892239,9899615761648790107487755177864288543518115213271038⟩⟩, + ⟨⟨5243597061027549947314287298390573133023792479284,5243597061027549947314287298390573133039679138229⟩,⟨-359403411163614963255266476568282346818847925929519,-359403411163614963255266476568282346818828052430471⟩⟩, + ⟨⟨4057557713643105519072257453428479456081347987094,4057557713643105519072257453428479456081572353045⟩,⟨9637522326760270646213659531300285576018731603826,9637522326760270646213659531300285576019294169300⟩⟩, + ⟨⟨-678407728953930900214532529643451808254562678338,-678407728953930900214532529643451808254519580225⟩,⟨428167471581884953072800282065240693582297764992,428167471581884953072800282065240693582321440907⟩⟩, + ⟨⟨-310886234132095984767035464694474416016543901856,-310886234132095984767035464694474416016526711083⟩,⟨-45,46⟩⟩, + ⟨⟨-678407728953930900214532529643451808254562678338,-678407728953930900214532529643451808254519580225⟩,⟨-428167471581884953072800282065240693582321440905,-428167471581884953072800282065240693582297764990⟩⟩, + ⟨⟨4057557713643105519072257453428479456081347987094,4057557713643105519072257453428479456081572353045⟩,⟨-9637522326760270646213659531300285576019294169298,-9637522326760270646213659531300285576018731603824⟩⟩, + ⟨⟨5243597061027549947314287298390573133023792479284,5243597061027549947314287298390573133039679138229⟩,⟨359403411163614963255266476568282346818828052430473,359403411163614963255266476568282346818847925929521⟩⟩, + ⟨⟨13315206655947314225246986142344569856246986950156503,13315206655947314225246986142344569856247723225158297⟩,⟨-9899615761648790107487755177864288543518115213271036,-9899615761648790107487755177864288543517221136892237⟩⟩, + ⟨⟨-92624472149869761395876746873595534505860459297529545,-92624472149869761395876746873595534505825070100947314⟩,⟨-634266401369191501634921299245453229937559969618158826,-634266401369191501634921299245453229937524897350385737⟩⟩, + ⟨⟨-6692625166881045414321238520057242802907816225498415110,-6692625166881045414321238520057242802906984962193175660⟩,⟨-14903435502014139641702824050581771283805512089934465570,-14903435502014139641702824050581771283804687992554002947⟩⟩, + ⟨⟨-46689740587388535389619747819191255077183962058385856118,-46689740587388535389619747819191255077170504501954843734⟩,⟨-251865182222939613419969607239831191238816685365580518542,-251865182222939613419969607239831191238802758278989110368⟩⟩, + ⟨⟨889602555490321298621573626697757905929566815104703609052,889602555490321298621573626697757905929705683778762292232⟩,⟨-2360859386232550264589608755066859434099743493226646765275,-2360859386232550264589608755066859434099612947619513463592⟩⟩, + ⟨⟨14485997265678863561248504476603750254141053084065630418939,14485997265678863561248504476603750254141854098865463981060⟩,⟨-7996177428908269961016081771067716463106910363150762929177,-7996177428908269961016081771067716463106327979678562973156⟩⟩, + ⟨⟨74386597757625808962387954129783567273986694428927237350673,74386597757625808962387954129783567273990807695311307422441⟩,⟨20874430327224685098974219034242329652390911967251800662687,20874430327224685098974219034242329652395099961302300804620⟩⟩, + ⟨⟨131615233028073645937924174246364569436422187989942451294368,131615233028073645937924174246364569436429608227828495805354⟩,⟨239595517732944429254954808539877984984154135716700354377850,239595517732944429254954808539877984984167384342352459160206⟩⟩, + ⟨⟨-211843163221037469738704129355804908714780789951784032843094,-211843163221037469738704129355804908714740632696029860994133⟩,⟨743504728491923488810677769028795047192548479965872120968278,743504728491923488810677769028795047192589592654082465125453⟩⟩, + ⟨⟨-1560352653895831523442587449726359046781780826790131190432912,-1560352653895831523442587449726359046781685461453412717435422⟩,⟨947724681495527811118707715174406171180071860294544923655745,947724681495527811118707715174406171180124265488420476332862⟩⟩, + ⟨⟨-3680411579246968181654501848031310685369647845013627779710909,-3680411579246968181654501848031310685369444333714123648060159⟩,⟨-595506889331227645038842655136404228181502530423054827131796,-595506889331227645038842655136404228181330786180842994997119⟩⟩, + ⟨⟨-4608570963735512608192364970269309444919439861033234569487559,-4608570963735512608192364970269309444919185026418878724565302⟩,⟨-4960184075974062690177100643818301161605246789149047493579128,-4960184075974062690177100643818301161604872525490824994243864⟩⟩] +lemma jetTable0_2_calc (j : Fin 31) : jetMultiplierBox 0 2 j = jetTable0_2 j := by + revert j + decide +kernel +lemma jetTable0_2_mem (j : Fin 31) : (jetTable0_2 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨1,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_2_calc] + exact jetMultiplierBox_mem 0 2 j +def jetTable0_3 : Fin 31 → CI := + ![⟨⟨-26040680208440882022998044152186511828456584438996552905763508,-26040680208440882022998044152186511828454370280687567986795260⟩,⟨-14837168866952977830122284881002604970715867142850636824082496,-14837168866952977830122284881002604970714020512416396628594080⟩⟩, + ⟨⟨-5615211919425586577298367444868270178670464600486099158382073,-5615211919425586577298367444868270178669252239319244065395776⟩,⟨-16168265840767012137810615579846627908521634074828124042917630,-16168265840767012137810615579846627908520533140049243465791609⟩⟩, + ⟨⟨3663753953151214255668125001478173762164718872445888831136226,3663753953151214255668125001478173762165135004678964200506588⟩,⟨-7915639294401384859883672517479684879331137945558113285777927,-7915639294401384859883672517479684879330586505376139315208262⟩⟩, + ⟨⟨3659077924684305858244498584000797770486885792297068507626284,3659077924684305858244498584000797770487115716331140351917798⟩,⟨-1225575456208353945606562593964387004219566120429889096672850,-1225575456208353945606562593964387004219301132201080326094523⟩⟩, + ⟨⟨1235470848093835517069011943001490814325387271100836426313517,1235470848093835517069011943001490814325467472368517216569361⟩,⟨722791176093272346665251900215987025663409732458151259482938,722791176093272346665251900215987025663468296213157022201297⟩⟩, + ⟨⟨70885603983209985636753616725255070154749373801884967412077,70885603983209985636753616725255070154780300248611487530067⟩,⟨420274729990101379549806587093123740176255536151785053440690,420274729990101379549806587093123740176282109660311884188942⟩⟩, + ⟨⟨-62101532686304301089516623467823828078619019879323442031940,-62101532686304301089516623467823828078613703346280807792657⟩,⟨73990931723288692918783773986133495056378037848130792125592,73990931723288692918783773986133495056383877406823876275752⟩⟩, + ⟨⟨-15617550966217240693310900576660248723426802023085188053020,-15617550966217240693310900576660248723425712752209466658024⟩,⟨1092453788874346746595310225573819313854809354379838947732,1092453788874346746595310225573819313856042928289849461673⟩⟩, + ⟨⟨-1417750688560966413630055378620399043975307727261817746529,-1417750688560966413630055378620399043975184685146522971969⟩,⟨-931491532690531386148472153935434095102602471435627061206,-931491532690531386148472153935434095102465804261718136558⟩⟩, + ⟨⟨-68287165069833149799237742146476062202141704044982409948,-68287165069833149799237742146476062202133211176180736957⟩,⟨-93548760534301516003318689480152636387611768339991505833,-93548760534301516003318689480152636387602644764464101399⟩⟩, + ⟨⟨-3400883646989233793495890395298374788946013617276476152,-3400883646989233793495890395298374788945631593384571029⟩,⟨-3487974478073767527734139632841542161652720889807410249,-3487974478073767527734139632841542161652298062058115992⟩⟩, + ⟨⟨-133903870314165816725096112626607623794384637734116382,-133903870314165816725096112626607623794374285453228538⟩,⟨17096679035428449149934055914524022790034381266821445,17096679035428449149934055914524022790044513732304407⟩⟩, + ⟨⟨1712441565154513488568185899052125551321623417712013,1712441565154513488568185899052125551321834363544718⟩,⟨2599745296737637672127952904394634323981532334823367,2599745296737637672127952904394634323981778809806124⟩⟩, + ⟨⟨-68981271391576724754209765195349892556388145053495,-68981271391576724754209765195349892556383920516045⟩,⟨-65814930352957619186896641915542463445945607303728,-65814930352957619186896641915542463445939369758376⟩⟩, + ⟨⟨5421464981760546055111813902727659101736191440286,5421464981760546055111813902727659101736686155546⟩,⟨-5281695633069418197900021188266894918720830568696,-5281695633069418197900021188266894918720495661986⟩⟩, + ⟨⟨2968750040722151945857511159043480357089695108753,2968750040722151945857511159043480357089882430963⟩,⟨-422,431⟩⟩, + ⟨⟨5421464981760546055111813902727659101736191440286,5421464981760546055111813902727659101736686155546⟩,⟨5281695633069418197900021188266894918720495661986,5281695633069418197900021188266894918720830568696⟩⟩, + ⟨⟨-68981271391576724754209765195349892556388145053495,-68981271391576724754209765195349892556383920516045⟩,⟨65814930352957619186896641915542463445939369758376,65814930352957619186896641915542463445945607303728⟩⟩, + ⟨⟨1712441565154513488568185899052125551321623417712013,1712441565154513488568185899052125551321834363544718⟩,⟨-2599745296737637672127952904394634323981778809806124,-2599745296737637672127952904394634323981532334823367⟩⟩, + ⟨⟨-133903870314165816725096112626607623794384637734116382,-133903870314165816725096112626607623794374285453228538⟩,⟨-17096679035428449149934055914524022790044513732304407,-17096679035428449149934055914524022790034381266821445⟩⟩, + ⟨⟨-3400883646989233793495890395298374788946013617276476152,-3400883646989233793495890395298374788945631593384571029⟩,⟨3487974478073767527734139632841542161652298062058115992,3487974478073767527734139632841542161652720889807410249⟩⟩, + ⟨⟨-68287165069833149799237742146476062202141704044982409948,-68287165069833149799237742146476062202133211176180736957⟩,⟨93548760534301516003318689480152636387602644764464101399,93548760534301516003318689480152636387611768339991505833⟩⟩, + ⟨⟨-1417750688560966413630055378620399043975307727261817746529,-1417750688560966413630055378620399043975184685146522971969⟩,⟨931491532690531386148472153935434095102465804261718136558,931491532690531386148472153935434095102602471435627061206⟩⟩, + ⟨⟨-15617550966217240693310900576660248723426802023085188053124,-15617550966217240693310900576660248723425712752209466657853⟩,⟨-1092453788874346746595310225573819313856042928289849461996,-1092453788874346746595310225573819313854809354379838947771⟩⟩, + ⟨⟨-62101532686304301089516623467823828078619019879323442032966,-62101532686304301089516623467823828078613703346280807790422⟩,⟨-73990931723288692918783773986133495056383877406823876277855,-73990931723288692918783773986133495056378037848130792124488⟩⟩, + ⟨⟨70885603983209985636753616725255070154749373801884967417386,70885603983209985636753616725255070154780300248611487530980⟩,⟨-420274729990101379549806587093123740176282109660311884186143,-420274729990101379549806587093123740176255536151785053442325⟩⟩, + ⟨⟨1235470848093835517069011943001490814325387271100836426318350,1235470848093835517069011943001490814325467472368517216574556⟩,⟨-722791176093272346665251900215987025663468296213157022192946,-722791176093272346665251900215987025663409732458151259474250⟩⟩, + ⟨⟨3659077924684305858244498584000797770486885792297068507624640,3659077924684305858244498584000797770487115716331140351899694⟩,⟨1225575456208353945606562593964387004219301132201080326130558,1225575456208353945606562593964387004219566120429889096692406⟩⟩, + ⟨⟨3663753953151214255668125001478173762164718872445888830990659,3663753953151214255668125001478173762165135004678964200517204⟩,⟨7915639294401384859883672517479684879330586505376139315157625,7915639294401384859883672517479684879331137945558113285883446⟩⟩, + ⟨⟨-5615211919425586577298367444868270178670464600486099158439274,-5615211919425586577298367444868270178669252239319244065541872⟩,⟨16168265840767012137810615579846627908520533140049243465809016,16168265840767012137810615579846627908521634074828124042846143⟩⟩, + ⟨⟨-26040680208440882022998044152186511828456584438996552905817851,-26040680208440882022998044152186511828454370280687567986951787⟩,⟨14837168866952977830122284881002604970714020512416396628440436,14837168866952977830122284881002604970715867142850636823826693⟩⟩] +lemma jetTable0_3_calc (j : Fin 31) : jetMultiplierBox 0 3 j = jetTable0_3 j := by + revert j + decide +kernel +lemma jetTable0_3_mem (j : Fin 31) : (jetTable0_3 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨1,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_3_calc] + exact jetMultiplierBox_mem 0 3 j +def jetTable0_4 : Fin 31 → CI := + ![⟨⟨3928183755179881421230715233589079995893662440634068623380271,3928183755179881421230715233589079995893810062055878927714322⟩,⟨1413891738726241936447859295537986534277400527403161263697618,1413891738726241936447859295537986534277465827192319040354153⟩⟩, + ⟨⟨635807313316935732641811141995492813841819721358654568230513,635807313316935732641811141995492813841883808295707774499276⟩,⟨1735034686033992992716494036849909893798388365362149099263582,1735034686033992992716494036849909893798453568087652739384529⟩⟩, + ⟨⟨-383566591628600121168395412476700680015421566372734689483690,-383566591628600121168395412476700680015407151913209078554029⟩,⟨584037079383937458086704772492969214532124545042545900155719,584037079383937458086704772492969214532149639261607144922752⟩⟩, + ⟨⟨-217467392805788104029020320919392348405159027101100778727420,-217467392805788104029020320919392348405150854661169953295570⟩,⟨804545412916355720444732080637922603986578677866975388026,804545412916355720444732080637922603993211690747160389360⟩⟩, + ⟨⟨-27636046804312688578165150052407287446274803145240678274976,-27636046804312688578165150052407287446272805394381780456981⟩,⟨-45414006334243716159852044298510403320028340809486910647425,-45414006334243716159852044298510403320026634147925463848228⟩⟩, + ⟨⟨4611024349168642850607773821057768423504627296744313476995,4611024349168642850607773821057768423504831335126273717141⟩,⟨-8453418273835761340252427403997745058259992282321552738289,-8453418273835761340252427403997745058259674602267362103934⟩⟩, + ⟨⟨1202101543601551056133078993646290568202463176643759477378,1202101543601551056133078993646290568202508351704521942820⟩,⟨-60349235400815907745331804979205819285988732969423796625,-60349235400815907745331804979205819285945887427129242119⟩⟩, + ⟨⟨61416473271577093382914853286709235215719012209483340413,61416473271577093382914853286709235215722270760894183979⟩,⟨73189637755010223903110303560973894082308413524797689787,73189637755010223903110303560973894082311163996554745789⟩⟩, + ⟨⟨-21673527862238647385019205307918486453278366135857128,-21673527862238647385019205307918486453114362788554494⟩,⟨4406468876628413313446658758114183732090286542624001191,4406468876628413313446658758114183732090452138034768788⟩⟩, + ⟨⟨-32050341908669908360821803795586560653652416643989640,-32050341908669908360821803795586560653648467508220064⟩,⟨104471789134071803558189087292616029595354825132926577,104471789134071803558189087292616029595358751190122082⟩⟩, + ⟨⟨144269299499777562551380468191112129440763166627372,144269299499777562551380468191112129440814034473855⟩,⟨1410689064319721820581375540323226423166829941817108,1410689064319721820581375540323226423166882955611763⟩⟩, + ⟨⟨10580087152595902593179688399512973355026330617169,10580087152595902593179688399512973355026728217633⟩,⟨-19144887089545572595529422901781344783198746832,-19144887089545572595529422901781344782834865038⟩⟩, + ⟨⟨-61502333123674086783211529063021222631824249999,-61502333123674086783211529063021222631821938699⟩,⟨-10644447459074502568124180401810297856398348062,-10644447459074502568124180401810297856396276061⟩⟩, + ⟨⟨53375860234471775179503928856937248436452201,53375860234471775179503928856937248436465961⟩,⟨-545361048958958654246379737046258325298023508,-545361048958958654246379737046258325298002976⟩⟩, + ⟨⟨-3037961414760493408800915860219877013712623,-3037961414760493408800915860219877013712472⟩,⟨-17376928832419569231148556964596896245968605,-17376928832419569231148556964596896245967913⟩⟩, + ⟨⟨-4962235796584713691779219174438882287987959,-4962235796584713691779219174438882287987725⟩,⟨-30,31⟩⟩, + ⟨⟨-3037961414760493408800915860219877013712623,-3037961414760493408800915860219877013712472⟩,⟨17376928832419569231148556964596896245967915,17376928832419569231148556964596896245968607⟩⟩, + ⟨⟨53375860234471775179503928856937248436452201,53375860234471775179503928856937248436465961⟩,⟨545361048958958654246379737046258325298002978,545361048958958654246379737046258325298023510⟩⟩, + ⟨⟨-61502333123674086783211529063021222631824249999,-61502333123674086783211529063021222631821938699⟩,⟨10644447459074502568124180401810297856396276063,10644447459074502568124180401810297856398348064⟩⟩, + ⟨⟨10580087152595902593179688399512973355026330617169,10580087152595902593179688399512973355026728217633⟩,⟨19144887089545572595529422901781344782834865040,19144887089545572595529422901781344783198746834⟩⟩, + ⟨⟨144269299499777562551380468191112129440763166627372,144269299499777562551380468191112129440814034473855⟩,⟨-1410689064319721820581375540323226423166882955611761,-1410689064319721820581375540323226423166829941817106⟩⟩, + ⟨⟨-32050341908669908360821803795586560653652416643989640,-32050341908669908360821803795586560653648467508220064⟩,⟨-104471789134071803558189087292616029595358751190122080,-104471789134071803558189087292616029595354825132926575⟩⟩, + ⟨⟨-21673527862238647385019205307918486453278366135857128,-21673527862238647385019205307918486453114362788554494⟩,⟨-4406468876628413313446658758114183732090452138034768786,-4406468876628413313446658758114183732090286542624001189⟩⟩, + ⟨⟨61416473271577093382914853286709235215719012209483340413,61416473271577093382914853286709235215722270760894183979⟩,⟨-73189637755010223903110303560973894082311163996554745787,-73189637755010223903110303560973894082308413524797689785⟩⟩, + ⟨⟨1202101543601551056133078993646290568202463176643759477378,1202101543601551056133078993646290568202508351704521942807⟩,⟨60349235400815907745331804979205819285945887427129242130,60349235400815907745331804979205819285988732969423796627⟩⟩, + ⟨⟨4611024349168642850607773821057768423504627296744313476944,4611024349168642850607773821057768423504831335126273717074⟩,⟨8453418273835761340252427403997745058259674602267362103974,8453418273835761340252427403997745058259992282321552738316⟩⟩, + ⟨⟨-27636046804312688578165150052407287446274803145240678275222,-27636046804312688578165150052407287446272805394381780457325⟩,⟨45414006334243716159852044298510403320026634147925463848133,45414006334243716159852044298510403320028340809486910647231⟩⟩, + ⟨⟨-217467392805788104029020320919392348405159027101100778727397,-217467392805788104029020320919392348405150854661169953295487⟩,⟨-804545412916355720444732080637922603993211690747160390801,-804545412916355720444732080637922603986578677866975389399⟩⟩, + ⟨⟨-383566591628600121168395412476700680015421566372734689483276,-383566591628600121168395412476700680015407151913209078547295⟩,⟨-584037079383937458086704772492969214532149639261607144928138,-584037079383937458086704772492969214532124545042545900154783⟩⟩, + ⟨⟨635807313316935732641811141995492813841819721358654568240578,635807313316935732641811141995492813841883808295707774515808⟩,⟨-1735034686033992992716494036849909893798453568087652739382260,-1735034686033992992716494036849909893798388365362149099254836⟩⟩, + ⟨⟨3928183755179881421230715233589079995893662440634068623438568,3928183755179881421230715233589079995893810062055878927675893⟩,⟨-1413891738726241936447859295537986534277465827192319040275114,-1413891738726241936447859295537986534277400527403161263715299⟩⟩] +lemma jetTable0_4_calc (j : Fin 31) : jetMultiplierBox 0 4 j = jetTable0_4 j := by + revert j + decide +kernel +lemma jetTable0_4_mem (j : Fin 31) : (jetTable0_4 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨2,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_4_calc] + exact jetMultiplierBox_mem 0 4 j +def jetTable0_5 : Fin 31 → CI := + ![⟨⟨-14027605065774620272520230088136566819906836336874539923108985,-14027605065774620272520230088136566819905927438333674963274270⟩,⟨14071374821419805101850777901849204275445844705847061454838083,14071374821419805101850777901849204275446731275157041568588417⟩⟩, + ⟨⟨-9268217964307480412845383336166787850125827088078513881643716,-9268217964307480412845383336166787850125335517808503760300506⟩,⟨-1008828710005495348601441424816522661795165395610947627252343,-1008828710005495348601441424816522661794584220135043484458303⟩⟩, + ⟨⟨-1815097853207115034620465749708369063669561467038456631175716,-1815097853207115034620465749708369063669374181019584357200351⟩,⟨-3279311830478008040370596584386248564328370417840232666648320,-3279311830478008040370596584386248564328190363529590696651120⟩⟩, + ⟨⟨605942395847238857326467738481771565935848856208091975616287,605942395847238857326467738481771565935923083430747386005677⟩,⟨-1086605398096565650087428033900081027799693396230067377103804,-1086605398096565650087428033900081027799633974556323929177508⟩⟩, + ⟨⟨325420363498174015448893857450290634621675750725408576379285,325420363498174015448893857450290634621693341276845418902300⟩,⟨-511544608577946870324794338754680754096745782891213711877,-511544608577946870324794338754680754077065111851644308395⟩⟩, + ⟨⟨29683223750445246454014130043362448955305832882450931244471,29683223750445246454014130043362448955308700403435289769875⟩,⟨55884494743653881006756740902762903504753699418753381601245,55884494743653881006756740902762903504756676952134624340358⟩⟩, + ⟨⟨-4651774603456343408701517594580204895358782458911101475004,-4651774603456343408701517594580204895358248428422187012700⟩,⟨7137310942212730510461655847097175835600150076582357135064,7137310942212730510461655847097175835600592049788002235919⟩⟩, + ⟨⟨-730556298802967576771334742915821934474918927788131587141,-730556298802967576771334742915821934474881752618940544618⟩,⟨13099927602689419953800509240188361025126616582964139484,13099927602689419953800509240188361025165355593808103858⟩⟩, + ⟨⟨-26779295565563117756507737501100959123819190437311744520,-26779295565563117756507737501100959123817259410773152632⟩,⟨-24804844689015249618516737078672628144737244611835779531,-24804844689015249618516737078672628144734946794932821557⟩⟩, + ⟨⟨-433688543206668081037301606321562207098822669351608144,-433688543206668081037301606321562207098769960495685605⟩,⟨-881030125889934189733352148909005530027863437367431232,-881030125889934189733352148909005530027804666009447804⟩⟩, + ⟨⟨-9618977634571541124833189699022450428034595476415508,-9618977634571541124833189699022450428033874227407352⟩,⟨-9921205365648340607009633917940353313224595077373668,-9921205365648340607009633917940353313223764195773962⟩⟩, + ⟨⟨-93993029700305398333135172355936181231207037820544,-93993029700305398333135172355936181231200561481455⟩,⟨59863756928172503741592246838410418671084805334086,59863756928172503741592246838410418671090286649353⟩⟩, + ⟨⟨678841967158495103268686059080269971751974582044,678841967158495103268686059080269971752013390500⟩,⟨-190946265370907091157946743583327068621211871374,-190946265370907091157946743583327068621178600992⟩⟩, + ⟨⟨1375718785083171534731180342294030429245665307,1375718785083171534731180342294030429245901209⟩,⟨6407467834367059396837175962961180720361673301,6407467834367059396837175962961180720362002968⟩⟩, + ⟨⟨71320934513864208616251231892207841472718753,71320934513864208616251231892207841472722189⟩,⟨207109016540764229849645613184970156046712212,207109016540764229849645613184970156046722424⟩⟩, + ⟨⟨62433788739217100329514085904491260548966370,62433788739217100329514085904491260548969708⟩,⟨-366,379⟩⟩, + ⟨⟨71320934513864208616251231892207841472718753,71320934513864208616251231892207841472722189⟩,⟨-207109016540764229849645613184970156046722424,-207109016540764229849645613184970156046712212⟩⟩, + ⟨⟨1375718785083171534731180342294030429245665307,1375718785083171534731180342294030429245901209⟩,⟨-6407467834367059396837175962961180720362002968,-6407467834367059396837175962961180720361673301⟩⟩, + ⟨⟨678841967158495103268686059080269971751974582044,678841967158495103268686059080269971752013390500⟩,⟨190946265370907091157946743583327068621178600992,190946265370907091157946743583327068621211871374⟩⟩, + ⟨⟨-93993029700305398333135172355936181231207037820544,-93993029700305398333135172355936181231200561481455⟩,⟨-59863756928172503741592246838410418671090286649353,-59863756928172503741592246838410418671084805334086⟩⟩, + ⟨⟨-9618977634571541124833189699022450428034595476415508,-9618977634571541124833189699022450428033874227407352⟩,⟨9921205365648340607009633917940353313223764195773962,9921205365648340607009633917940353313224595077373668⟩⟩, + ⟨⟨-433688543206668081037301606321562207098822669351608144,-433688543206668081037301606321562207098769960495685605⟩,⟨881030125889934189733352148909005530027804666009447804,881030125889934189733352148909005530027863437367431232⟩⟩, + ⟨⟨-26779295565563117756507737501100959123819190437311744520,-26779295565563117756507737501100959123817259410773152632⟩,⟨24804844689015249618516737078672628144734946794932821557,24804844689015249618516737078672628144737244611835779531⟩⟩, + ⟨⟨-730556298802967576771334742915821934474918927788131587141,-730556298802967576771334742915821934474881752618940544618⟩,⟨-13099927602689419953800509240188361025165355593808103858,-13099927602689419953800509240188361025126616582964139484⟩⟩, + ⟨⟨-4651774603456343408701517594580204895358782458911101474899,-4651774603456343408701517594580204895358248428422187012700⟩,⟨-7137310942212730510461655847097175835600592049788002235844,-7137310942212730510461655847097175835600150076582357135101⟩⟩, + ⟨⟨29683223750445246454014130043362448955305832882450931244921,29683223750445246454014130043362448955308700403435289770197⟩,⟨-55884494743653881006756740902762903504756676952134624340080,-55884494743653881006756740902762903504753699418753381601104⟩⟩, + ⟨⟨325420363498174015448893857450290634621675750725408576379868,325420363498174015448893857450290634621693341276845418902055⟩,⟨511544608577946870324794338754680754077065111851644310818,511544608577946870324794338754680754096745782891213713472⟩⟩, + ⟨⟨605942395847238857326467738481771565935848856208091975608858,605942395847238857326467738481771565935923083430747385998755⟩,⟨1086605398096565650087428033900081027799633974556323929180950,1086605398096565650087428033900081027799693396230067377107735⟩⟩, + ⟨⟨-1815097853207115034620465749708369063669561467038456631218105,-1815097853207115034620465749708369063669374181019584357196951⟩,⟨3279311830478008040370596584386248564328190363529590696616817,3279311830478008040370596584386248564328370417840232666659802⟩⟩, + ⟨⟨-9268217964307480412845383336166787850125827088078513881670458,-9268217964307480412845383336166787850125335517808503760283485⟩,⟨1008828710005495348601441424816522661794584220135043484363977,1008828710005495348601441424816522661795165395610947627201759⟩⟩, + ⟨⟨-14027605065774620272520230088136566819906836336874539922690771,-14027605065774620272520230088136566819905927438333674963468208⟩,⟨-14071374821419805101850777901849204275446731275157041568387103,-14071374821419805101850777901849204275445844705847061455248925⟩⟩] +lemma jetTable0_5_calc (j : Fin 31) : jetMultiplierBox 0 5 j = jetTable0_5 j := by + revert j + decide +kernel +lemma jetTable0_5_mem (j : Fin 31) : (jetTable0_5 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨2,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_5_calc] + exact jetMultiplierBox_mem 0 5 j +def jetTable0_6 : Fin 31 → CI := + ![⟨⟨397254206831308904839413308219641387147337835315208882276886,397254206831308904839413308219641387147340759285970412346497⟩,⟨339235467075405847105201855146990735589749258466376091470056,339235467075405847105201855146990735589751161662822241482866⟩⟩, + ⟨⟨-72384834879886581786073997311686547663074436340961320512503,-72384834879886581786073997311686547663074030243807892185605⟩,⟨95809713458808006673459694708765574211132057083590890017594,95809713458808006673459694708765574211132720209647507226105⟩⟩, + ⟨⟨-16166128036756825750081596583653300182861737187418303343735,-16166128036756825750081596583653300182861622064872239776235⟩,⟨-13259601350717140635111713883010482606409806821436670817370,-13259601350717140635111713883010482606409732431726599135740⟩⟩, + ⟨⟨1885208647487634249173338598305028702631682551443324139868,1885208647487634249173338598305028702631693127939185758434⟩,⟨-1766440326658464558877259519857320532831080380192581301732,-1766440326658464558877259519857320532831065999933992949956⟩⟩, + ⟨⟨109442608674458472527090514538341833348552713720917051264,109442608674458472527090514538341833348553884473706087126⟩,⟨177680993620209863271409608289535401964084056233888352080,177680993620209863271409608289535401964085053069043289982⟩⟩, + ⟨⟨-9433923509904317025758182729225747447625880462336199862,-9433923509904317025758182729225747447625827535648848533⟩,⟨3162230633396728393608944352124349953338105165519638287,3162230633396728393608944352124349953338160368135017384⟩⟩, + ⟨⟨-35229450842366698219214965164504526298787810821369640,-35229450842366698219214965164504526298786461261185963⟩,⟨-244738686447259318545162226583129010270922738998825645,-244738686447259318545162226583129010270921365953047733⟩⟩, + ⟨⟨2742295956442832931892717367797070767245782224590618,2742295956442832931892717367797070767245797609563458⟩,⟨-388551369781066948956852166506785136295398181910727,-388551369781066948956852166506785136295382762544672⟩⟩, + ⟨⟨6054670356848845066821745535376570708537334834388,6054670356848845066821745535376570708537396798027⟩,⟨10328655287309322618429227408046892212494136190592,10328655287309322618429227408046892212494194136970⟩⟩, + ⟨⟨1317472170053862549155615215756327747922366318,1317472170053862549155615215756327747922463806⟩,⟨17404672998075450124707891586259729056718946927,17404672998075450124707891586259729056719044579⟩⟩, + ⟨⟨6116541500135676220878739457211614713913566,6116541500135676220878739457211614713913609⟩,⟨5453037623691980587749516852585806607396963,5453037623691980587749516852585806607397011⟩⟩, + ⟨⟨-508072747474988515198240430958421299098,-508072747474988515198240430958421299089⟩,⟨-1373121957739597435559201196681395933979,-1373121957739597435559201196681395933970⟩⟩, + ⟨⟨104414494733720210407580221976301612,104414494733720210407580221976301620⟩,⟨-139731724070647746859301683489239785,-139731724070647746859301683489239776⟩⟩, + ⟨⟨-42080552009627335691963211738082,-42080552009627335691963211738073⟩,⟨-628166061720417655990386227421,-628166061720417655990386227412⟩⟩, + ⟨⟨-54367493672926573737383116230,-54367493672926573737383116221⟩,⟨-84058352585898382792535294106,-84058352585898382792535294098⟩⟩, + ⟨⟨-10770102851604436922667870360,-10770102851604436922667870349⟩,⟨-6,7⟩⟩, + ⟨⟨-54367493672926573737383116230,-54367493672926573737383116221⟩,⟨84058352585898382792535294100,84058352585898382792535294108⟩⟩, + ⟨⟨-42080552009627335691963211738082,-42080552009627335691963211738073⟩,⟨628166061720417655990386227414,628166061720417655990386227423⟩⟩, + ⟨⟨104414494733720210407580221976301612,104414494733720210407580221976301620⟩,⟨139731724070647746859301683489239778,139731724070647746859301683489239787⟩⟩, + ⟨⟨-508072747474988515198240430958421299098,-508072747474988515198240430958421299089⟩,⟨1373121957739597435559201196681395933972,1373121957739597435559201196681395933981⟩⟩, + ⟨⟨6116541500135676220878739457211614713913566,6116541500135676220878739457211614713913609⟩,⟨-5453037623691980587749516852585806607397009,-5453037623691980587749516852585806607396961⟩⟩, + ⟨⟨1317472170053862549155615215756327747922366318,1317472170053862549155615215756327747922463806⟩,⟨-17404672998075450124707891586259729056719044577,-17404672998075450124707891586259729056718946925⟩⟩, + ⟨⟨6054670356848845066821745535376570708537334834388,6054670356848845066821745535376570708537396798027⟩,⟨-10328655287309322618429227408046892212494194136968,-10328655287309322618429227408046892212494136190590⟩⟩, + ⟨⟨2742295956442832931892717367797070767245782224590618,2742295956442832931892717367797070767245797609563458⟩,⟨388551369781066948956852166506785136295382762544674,388551369781066948956852166506785136295398181910729⟩⟩, + ⟨⟨-35229450842366698219214965164504526298787810821369640,-35229450842366698219214965164504526298786461261185963⟩,⟨244738686447259318545162226583129010270921365953047735,244738686447259318545162226583129010270922738998825647⟩⟩, + ⟨⟨-9433923509904317025758182729225747447625880462336199862,-9433923509904317025758182729225747447625827535648848533⟩,⟨-3162230633396728393608944352124349953338160368135017382,-3162230633396728393608944352124349953338105165519638285⟩⟩, + ⟨⟨109442608674458472527090514538341833348552713720917051264,109442608674458472527090514538341833348553884473706087126⟩,⟨-177680993620209863271409608289535401964085053069043289980,-177680993620209863271409608289535401964084056233888352077⟩⟩, + ⟨⟨1885208647487634249173338598305028702631682551443324139882,1885208647487634249173338598305028702631693127939185758394⟩,⟨1766440326658464558877259519857320532831065999933992949997,1766440326658464558877259519857320532831080380192581301718⟩⟩, + ⟨⟨-16166128036756825750081596583653300182861737187418303343600,-16166128036756825750081596583653300182861622064872239776552⟩,⟨13259601350717140635111713883010482606409732431726599135856,13259601350717140635111713883010482606409806821436670817036⟩⟩, + ⟨⟨-72384834879886581786073997311686547663074436340961320512094,-72384834879886581786073997311686547663074030243807892184760⟩,⟨-95809713458808006673459694708765574211132720209647507226826,-95809713458808006673459694708765574211132057083590890017880⟩⟩, + ⟨⟨397254206831308904839413308219641387147337835315208882275524,397254206831308904839413308219641387147340759285970412351959⟩,⟨-339235467075405847105201855146990735589751161662822241483746,-339235467075405847105201855146990735589749258466376091464112⟩⟩] +lemma jetTable0_6_calc (j : Fin 31) : jetMultiplierBox 0 6 j = jetTable0_6 j := by + revert j + decide +kernel +lemma jetTable0_6_mem (j : Fin 31) : (jetTable0_6 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨3,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_6_calc] + exact jetMultiplierBox_mem 0 6 j +def jetTable0_7 : Fin 31 → CI := + ![⟨⟨-1428955687106739235612036754223510018479006577753275239402214,-1428955687106739235612036754223510018478997206055880367407739⟩,⟨1739936541357264210695561644796018040546146912210535723908779,1739936541357264210695561644796018040546160462562071916481858⟩⟩, + ⟨⟨-423391139203324732195829741616005306980738411259381986323784,-423391139203324732195829741616005306980735188667205987605658⟩,⟨-340285423955704242961101452689930592087321571811974397995032,-340285423955704242961101452689930592087319421786271506317511⟩⟩, + ⟨⟨69323518378674995746812546629481337020064625489115671255303,69323518378674995746812546629481337020065061817994528224309⟩,⟨-71525579441793901068588173608863443732078935050378708561926,-71525579441793901068588173608863443732078328181435251833916⟩⟩, + ⟨⟨7484413646466887577702933943420183622885899342472211362669,7484413646466887577702933943420183622885982877081154779908⟩,⟨10640273285169008709007672488386232479121857108649985793874,10640273285169008709007672488386232479121924069597037351981⟩⟩, + ⟨⟨-1047248133452288266160859234811739399248693226974323247919,-1047248133452288266160859234811739399248686499507362094043⟩,⟨382516247111849826217101632411757517623479000198415896176,382516247111849826217101632411757517623486611157630728397⟩⟩, + ⟨⟨-3043282558537173571357451597341900297895562816711421824,-3043282558537173571357451597341900297895157724566853814⟩,⟨-56542343991981604802040192077066334036645222883269916715,-56542343991981604802040192077066334036644841481527889945⟩⟩, + ⟨⟨1474403165722720031088072858559636232634378803916267479,1474403165722720031088072858559636232634389524677578964⟩,⟨301009068343828974409626316790260007360980680787271511,301009068343828974409626316790260007360991804874293590⟩⟩, + ⟨⟨-5114080902236349895824906306518591220915198722146955,-5114080902236349895824906306518591220915058987932981⟩,⟨17355932227003845015908164176172034305331860422250682,17355932227003845015908164176172034305331994544493109⟩⟩, + ⟨⟨-84224058154313543217906626801340931870030847017429,-84224058154313543217906626801340931870030262466260⟩,⟨849416713743212769291633936404232683447891226972,849416713743212769291633936404232683448496244895⟩⟩, + ⟨⟨-113042429388199210313086968308389332376991810165,-113042429388199210313086968308389332376990772742⟩,⟨-69180378138691250344416033792149909897306768733,-69180378138691250344416033792149909897305693997⟩⟩, + ⟨⟨-66847141666461972800818839094448523246209420,-66847141666461972800818839094448523246208900⟩,⟨6670619919168707207917319443379559913490210,6670619919168707207917319443379559913490728⟩⟩, + ⟨⟨11197766460409560700797305377820364035511,11197766460409560700797305377820364035599⟩,⟨6458859267957874988654692227975520423847,6458859267957874988654692227975520423937⟩⟩, + ⟨⟨-164562510948489665390671193957341222,-164562510948489665390671193957341137⟩,⟨1639146925699070518906343731726453333,1639146925699070518906343731726453421⟩⟩, + ⟨⟨393224245029384420579856026376508,393224245029384420579856026376601⟩,⟨-147238341962015182103813701531881,-147238341962015182103813701531789⟩⟩, + ⟨⟨717115201438271008463470084762,717115201438271008463470084847⟩,⟨747320322339441262222615777100,747320322339441262222615777177⟩⟩, + ⟨⟨112860248719118416056303831419,112860248719118416056303831516⟩,⟨-54,64⟩⟩, + ⟨⟨717115201438271008463470084762,717115201438271008463470084847⟩,⟨-747320322339441262222615777177,-747320322339441262222615777100⟩⟩, + ⟨⟨393224245029384420579856026376508,393224245029384420579856026376601⟩,⟨147238341962015182103813701531789,147238341962015182103813701531881⟩⟩, + ⟨⟨-164562510948489665390671193957341222,-164562510948489665390671193957341137⟩,⟨-1639146925699070518906343731726453421,-1639146925699070518906343731726453333⟩⟩, + ⟨⟨11197766460409560700797305377820364035511,11197766460409560700797305377820364035599⟩,⟨-6458859267957874988654692227975520423937,-6458859267957874988654692227975520423847⟩⟩, + ⟨⟨-66847141666461972800818839094448523246209420,-66847141666461972800818839094448523246208900⟩,⟨-6670619919168707207917319443379559913490728,-6670619919168707207917319443379559913490210⟩⟩, + ⟨⟨-113042429388199210313086968308389332376991810165,-113042429388199210313086968308389332376990772742⟩,⟨69180378138691250344416033792149909897305693997,69180378138691250344416033792149909897306768733⟩⟩, + ⟨⟨-84224058154313543217906626801340931870030847017429,-84224058154313543217906626801340931870030262466260⟩,⟨-849416713743212769291633936404232683448496244895,-849416713743212769291633936404232683447891226972⟩⟩, + ⟨⟨-5114080902236349895824906306518591220915198722146955,-5114080902236349895824906306518591220915058987932981⟩,⟨-17355932227003845015908164176172034305331994544493109,-17355932227003845015908164176172034305331860422250682⟩⟩, + ⟨⟨1474403165722720031088072858559636232634378803916267479,1474403165722720031088072858559636232634389524677578964⟩,⟨-301009068343828974409626316790260007360991804874293590,-301009068343828974409626316790260007360980680787271511⟩⟩, + ⟨⟨-3043282558537173571357451597341900297895562816711421824,-3043282558537173571357451597341900297895157724566853814⟩,⟨56542343991981604802040192077066334036644841481527889945,56542343991981604802040192077066334036645222883269916715⟩⟩, + ⟨⟨-1047248133452288266160859234811739399248693226974323247919,-1047248133452288266160859234811739399248686499507362094038⟩,⟨-382516247111849826217101632411757517623486611157630728398,-382516247111849826217101632411757517623479000198415896176⟩⟩, + ⟨⟨7484413646466887577702933943420183622885899342472211362891,7484413646466887577702933943420183622885982877081154779818⟩,⟨-10640273285169008709007672488386232479121924069597037351770,-10640273285169008709007672488386232479121857108649985793972⟩⟩, + ⟨⟨69323518378674995746812546629481337020064625489115671255969,69323518378674995746812546629481337020065061817994528222660⟩,⟨71525579441793901068588173608863443732078328181435251835553,71525579441793901068588173608863443732078935050378708561240⟩⟩, + ⟨⟨-423391139203324732195829741616005306980738411259381986327167,-423391139203324732195829741616005306980735188667205987607015⟩,⟨340285423955704242961101452689930592087319421786271506313729,340285423955704242961101452689930592087321571811974397993280⟩⟩, + ⟨⟨-1428955687106739235612036754223510018479006577753275239406127,-1428955687106739235612036754223510018478997206055880367381679⟩,⟨-1739936541357264210695561644796018040546160462562071916505469,-1739936541357264210695561644796018040546146912210535723902416⟩⟩] +lemma jetTable0_7_calc (j : Fin 31) : jetMultiplierBox 0 7 j = jetTable0_7 j := by + revert j + decide +kernel +lemma jetTable0_7_mem (j : Fin 31) : (jetTable0_7 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨3,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_7_calc] + exact jetMultiplierBox_mem 0 7 j +def jetTable0_8 : Fin 31 → CI := + ![⟨⟨-334044061183121089882496660159805715081207178128024997313941,-334044061183121089882496660159805715081206112059246897544122⟩,⟨33367020950538070126912273377701867637523012675561903286835,33367020950538070126912273377701867637523834538389616362942⟩⟩, + ⟨⟨13074201617393014191367359947773847076189541129613939807894,13074201617393014191367359947773847076189625499989007160598⟩,⟨-48112965040038646574730204022078235735654689525233419995402,-48112965040038646574730204022078235735654535977430909465800⟩⟩, + ⟨⟨3761219052221330957967658389189109560161451587184953893487,3761219052221330957967658389189109560161467984598065647200⟩,⟨3557002357752730228440158794815300130320884306726611583335,3557002357752730228440158794815300130320895658552657342744⟩⟩, + ⟨⟨-338274478992595971751520945834555710791360263073347574037,-338274478992595971751520945834555710791359183503505814752⟩,⟨70385291440889190264487889449836774612372178837940117591,70385291440889190264487889449836774612373184602041944395⟩⟩, + ⟨⟨6296005654259992705194333306295260817319139203259183372,6296005654259992705194333306295260817319160500021561743⟩,⟨-11760221629394431103866726364802981505038641287145761178,-11760221629394431103866726364802981505038603755551947775⟩⟩, + ⟨⟨89171067576363041042715737360257828865137125369026266,89171067576363041042715737360257828865137952661927038⟩,⟨245542774790312454384884069030511277265121753128167666,245542774790312454384884069030511277265122536753819607⟩⟩, + ⟨⟨-2099992293750917270506656542551860768663307243349599,-2099992293750917270506656542551860768663300541429842⟩,⟨-693036158947846407687915519016141058209741117444532,-693036158947846407687915519016141058209735697880184⟩⟩, + ⟨⟨4598316594344716949805102794158786789579325712307,4598316594344716949805102794158786789579340387394⟩,⟨-4892116092270123493582869978685947945816926716881,-4892116092270123493582869978685947945816908467962⟩⟩, + ⟨⟨4641916645921427233375373599778073572159696781,4641916645921427233375373599778073572159711602⟩,⟨3783245451797399851901218235045527482763633446,3783245451797399851901218235045527482763646522⟩⟩, + ⟨⟨420677315141388154656759975592185845087451,420677315141388154656759975592185845087462⟩,⟨1251110813819406377725280945490416999503200,1251110813819406377725280945490416999503212⟩⟩, + ⟨⟨65932937789073674563595163434520860714,65932937789073674563595163434520860721⟩,⟨15734691972581834697291442438418068665,15734691972581834697291442438418068672⟩⟩, + ⟨⟨-1004035810089554791358259931753044,-1004035810089554791358259931753036⟩,⟨66208354075699458988074862548048,66208354075699458988074862548055⟩⟩, + ⟨⟨-7258902451397374173018806628,-7258902451397374173018806620⟩,⟨5132852196579312162907194016,5132852196579312162907194023⟩⟩, + ⟨⟨-104380704698974720159227,-104380704698974720159219⟩,⟨-165106284042868485338279,-165106284042868485338272⟩⟩, + ⟨⟨-16713777069271780046,-16713777069271780038⟩,⟨80090866369706051836,80090866369706051843⟩⟩, + ⟨⟨-4637807856762325294,-4637807856762325284⟩,⟨-5,6⟩⟩, + ⟨⟨-16713777069271780046,-16713777069271780038⟩,⟨-80090866369706051841,-80090866369706051834⟩⟩, + ⟨⟨-104380704698974720159227,-104380704698974720159219⟩,⟨165106284042868485338274,165106284042868485338281⟩⟩, + ⟨⟨-7258902451397374173018806628,-7258902451397374173018806620⟩,⟨-5132852196579312162907194021,-5132852196579312162907194014⟩⟩, + ⟨⟨-1004035810089554791358259931753044,-1004035810089554791358259931753036⟩,⟨-66208354075699458988074862548053,-66208354075699458988074862548046⟩⟩, + ⟨⟨65932937789073674563595163434520860714,65932937789073674563595163434520860721⟩,⟨-15734691972581834697291442438418068670,-15734691972581834697291442438418068663⟩⟩, + ⟨⟨420677315141388154656759975592185845087451,420677315141388154656759975592185845087462⟩,⟨-1251110813819406377725280945490416999503210,-1251110813819406377725280945490416999503198⟩⟩, + ⟨⟨4641916645921427233375373599778073572159696781,4641916645921427233375373599778073572159711602⟩,⟨-3783245451797399851901218235045527482763646520,-3783245451797399851901218235045527482763633444⟩⟩, + ⟨⟨4598316594344716949805102794158786789579325712307,4598316594344716949805102794158786789579340387394⟩,⟨4892116092270123493582869978685947945816908467964,4892116092270123493582869978685947945816926716883⟩⟩, + ⟨⟨-2099992293750917270506656542551860768663307243349599,-2099992293750917270506656542551860768663300541429842⟩,⟨693036158947846407687915519016141058209735697880186,693036158947846407687915519016141058209741117444534⟩⟩, + ⟨⟨89171067576363041042715737360257828865137125369026266,89171067576363041042715737360257828865137952661927038⟩,⟨-245542774790312454384884069030511277265122536753819605,-245542774790312454384884069030511277265121753128167664⟩⟩, + ⟨⟨6296005654259992705194333306295260817319139203259183372,6296005654259992705194333306295260817319160500021561743⟩,⟨11760221629394431103866726364802981505038603755551947777,11760221629394431103866726364802981505038641287145761180⟩⟩, + ⟨⟨-338274478992595971751520945834555710791360263073347574040,-338274478992595971751520945834555710791359183503505814749⟩,⟨-70385291440889190264487889449836774612373184602041944398,-70385291440889190264487889449836774612372178837940117588⟩⟩, + ⟨⟨3761219052221330957967658389189109560161451587184953893549,3761219052221330957967658389189109560161467984598065647187⟩,⟨-3557002357752730228440158794815300130320895658552657342676,-3557002357752730228440158794815300130320884306726611583340⟩⟩, + ⟨⟨13074201617393014191367359947773847076189541129613939807711,13074201617393014191367359947773847076189625499989007160198⟩,⟨48112965040038646574730204022078235735654535977430909466009,48112965040038646574730204022078235735654689525233419995392⟩⟩, + ⟨⟨-334044061183121089882496660159805715081207178128024997314866,-334044061183121089882496660159805715081206112059246897542756⟩,⟨-33367020950538070126912273377701867637523834538389616366716,-33367020950538070126912273377701867637523012675561903288317⟩⟩] +lemma jetTable0_8_calc (j : Fin 31) : jetMultiplierBox 0 8 j = jetTable0_8 j := by + revert j + decide +kernel +lemma jetTable0_8_mem (j : Fin 31) : (jetTable0_8 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨4,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_8_calc] + exact jetMultiplierBox_mem 0 8 j +def jetTable0_9 : Fin 31 → CI := + ![⟨⟨33691563503998462867293558690543164715160558203382834147418,33691563503998462867293558690543164715165458173053412573928⟩,⟨-1457196719538877324697178005540146211915671074022936561106930,-1457196719538877324697178005540146211915665964335028083790628⟩⟩, + ⟨⟨207743319517980479074641851089670007080056731567753186950614,207743319517980479074641851089670007080057520091398122920081⟩,⟨95185922107101923206158141502261831185969857299816908738740,95185922107101923206158141502261831185970467969824815005011⟩⟩, + ⟨⟨-20679504008749300599398320825361854368206346119872068688572,-20679504008749300599398320825361854368206266775963678237926⟩,⟨14270870207128936474317489689908885302305121615805824708586,14270870207128936474317489689908885302305219343379656673347⟩⟩, + ⟨⟨94253978120302456571992399736448785664364309493811184924,94253978120302456571992399736448785664371547360485527702⟩,⟨-1779360471407837271755343882426151809966453113381513058665,-1779360471407837271755343882426151809966446239773999399280⟩⟩, + ⟨⟨50944885596475786772940996417631026926949602898607972324,50944885596475786772940996417631026926949850163635774404⟩,⟨52773417672854555854636678210594093352451148929938753889,52773417672854555854636678210594093352451351533593787043⟩⟩, + ⟨⟨-1536830685444487467066553859914381906633990480860471988,-1536830685444487467066553859914381906633984208738883467⟩,⟨-33912446422251487736345383231432516129658875229517807,-33912446422251487736345383231432516129652085856862169⟩⟩, + ⟨⟨9574247011898237542720353276590378906564891814672832,9574247011898237542720353276590378906564945725206139⟩,⟨-10180673603129666816038442080118818188831227309233331,-10180673603129666816038442080118818188831172810391313⟩⟩, + ⟨⟨13812864255075962050826408877414719607250550222491,13812864255075962050826408877414719607250718362730⟩,⟨43587255867497615863798079918484958999674138012352,43587255867497615863798079918484958999674297471323⟩⟩, + ⟨⟨-42176518291052959735637558655790834751992375545,-42176518291052959735637558655790834751992223810⟩,⟨12787038940576729191337898980266883270461496590,12787038940576729191337898980266883270461649769⟩⟩, + ⟨⟨-9831876115568505265004636420817539235224062,-9831876115568505265004636420817539235223951⟩,⟨-3733621599577489658805869254972142807938325,-3733621599577489658805869254972142807938215⟩⟩, + ⟨⟨-501226015105224193050011965137338570056,-501226015105224193050011965137338569993⟩,⟨301038822023544736649153887551330628739,301038822023544736649153887551330628802⟩⟩, + ⟨⟨7061824485940700272398239354831687,7061824485940700272398239354831761⟩,⟨-6155134806243507501456802643571055,-6155134806243507501456802643570982⟩⟩, + ⟨⟨38205114808856506589135289986,38205114808856506589135290064⟩,⟨-80032812721460934111533830771,-80032812721460934111533830696⟩⟩, + ⟨⟨1634419838277306970418696,1634419838277306970418776⟩,⟨1255568011720247174414388,1255568011720247174414461⟩⟩, + ⟨⟨23017435450420585155,23017435450420585232⟩,⟨-895568321466941501785,-895568321466941501718⟩⟩, + ⟨⟨51447709273702579072,51447709273702579164⟩,⟨-46,57⟩⟩, + ⟨⟨23017435450420585155,23017435450420585232⟩,⟨895568321466941501718,895568321466941501785⟩⟩, + ⟨⟨1634419838277306970418696,1634419838277306970418776⟩,⟨-1255568011720247174414461,-1255568011720247174414388⟩⟩, + ⟨⟨38205114808856506589135289986,38205114808856506589135290064⟩,⟨80032812721460934111533830696,80032812721460934111533830771⟩⟩, + ⟨⟨7061824485940700272398239354831687,7061824485940700272398239354831761⟩,⟨6155134806243507501456802643570982,6155134806243507501456802643571055⟩⟩, + ⟨⟨-501226015105224193050011965137338570056,-501226015105224193050011965137338569993⟩,⟨-301038822023544736649153887551330628802,-301038822023544736649153887551330628739⟩⟩, + ⟨⟨-9831876115568505265004636420817539235224062,-9831876115568505265004636420817539235223951⟩,⟨3733621599577489658805869254972142807938215,3733621599577489658805869254972142807938325⟩⟩, + ⟨⟨-42176518291052959735637558655790834751992375545,-42176518291052959735637558655790834751992223810⟩,⟨-12787038940576729191337898980266883270461649769,-12787038940576729191337898980266883270461496590⟩⟩, + ⟨⟨13812864255075962050826408877414719607250550222491,13812864255075962050826408877414719607250718362730⟩,⟨-43587255867497615863798079918484958999674297471323,-43587255867497615863798079918484958999674138012352⟩⟩, + ⟨⟨9574247011898237542720353276590378906564891814672832,9574247011898237542720353276590378906564945725206139⟩,⟨10180673603129666816038442080118818188831172810391313,10180673603129666816038442080118818188831227309233331⟩⟩, + ⟨⟨-1536830685444487467066553859914381906633990480860471988,-1536830685444487467066553859914381906633984208738883467⟩,⟨33912446422251487736345383231432516129652085856862169,33912446422251487736345383231432516129658875229517807⟩⟩, + ⟨⟨50944885596475786772940996417631026926949602898607972324,50944885596475786772940996417631026926949850163635774404⟩,⟨-52773417672854555854636678210594093352451351533593787043,-52773417672854555854636678210594093352451148929938753889⟩⟩, + ⟨⟨94253978120302456571992399736448785664364309493811184895,94253978120302456571992399736448785664371547360485527711⟩,⟨1779360471407837271755343882426151809966446239773999399264,1779360471407837271755343882426151809966453113381513058686⟩⟩, + ⟨⟨-20679504008749300599398320825361854368206346119872068688245,-20679504008749300599398320825361854368206266775963678238021⟩,⟨-14270870207128936474317489689908885302305219343379656673279,-14270870207128936474317489689908885302305121615805824708947⟩⟩, + ⟨⟨207743319517980479074641851089670007080056731567753186951849,207743319517980479074641851089670007080057520091398122920164⟩,⟨-95185922107101923206158141502261831185970467969824815003193,-95185922107101923206158141502261831185969857299816908738067⟩⟩, + ⟨⟨33691563503998462867293558690543164715160558203382834130419,33691563503998462867293558690543164715165458173053412568024⟩,⟨1457196719538877324697178005540146211915665964335028083785529,1457196719538877324697178005540146211915671074022936561112922⟩⟩] +lemma jetTable0_9_calc (j : Fin 31) : jetMultiplierBox 0 9 j = jetTable0_9 j := by + revert j + decide +kernel +lemma jetTable0_9_mem (j : Fin 31) : (jetTable0_9 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨4,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_9_calc] + exact jetMultiplierBox_mem 0 9 j +def jetTable0_10 : Fin 31 → CI := + ![⟨⟨-538954948733379316385099966322716068228368240358948361658145,-538954948733379316385099966322716068228363961029193215364588⟩,⟨-144370750267100617153428316739172533473425567326107526470829,-144370750267100617153428316739172533473423392855466597757549⟩⟩, + ⟨⟨41020393301129879903681628065917597771666872926175837798732,41020393301129879903681628065917597771667198630207113151827⟩,⟨-13013078376855653336342320351100409291250366717916277583287,-13013078376855653336342320351100409291250057474269626781712⟩⟩, + ⟨⟨-1563810890053033024363175895889832026833501193681166502219,-1563810890053033024363175895889832026833488776941903975670⟩,⟨1337247862220004441200444383475973996332755818198935937345,1337247862220004441200444383475973996332772153421285719999⟩⟩, + ⟨⟨31522053523682957966361913751107652266387766092249413377,31522053523682957966361913751107652266388016379017797400⟩,⟨-44485738015594957089378148555632540161495076801268410157,-44485738015594957089378148555632540161494666802651566807⟩⟩, + ⟨⟨-324965786859373814959226575649460590341389542445451431,-324965786859373814959226575649460590341386754014772589⟩,⟨614946076766533903158736178874330243216886377185045927,614946076766533903158736178874330243216891259888433852⟩⟩, + ⟨⟨1395134277794117000352545353523598926252047096909525,1395134277794117000352545353523598926252065409129763⟩,⟨-3302874915706121139024244016178781915319139167874400,-3302874915706121139024244016178781915319112942874157⟩⟩, + ⟨⟨-1351932308085569216849730668396573411784165792362,-1351932308085569216849730668396573411784126313592⟩,⟨5880883912361056715141786924150882327191179838249,5880883912361056715141786924150882327191226532784⟩⟩, + ⟨⟨-661960326394838945258445277610382937087158571,-661960326394838945258445277610382937087138035⟩,⟨-2499022418338155500755704152205192640894306973,-2499022418338155500755704152205192640894287122⟩⟩, + ⟨⟨213730495732954513049236173578002264984302,213730495732954513049236173578002264984313⟩,⟨32018350541243202890035919028402977517212,32018350541243202890035919028402977517223⟩⟩, + ⟨⟨1798903133128507975213902858397822246,1798903133128507975213902858397822256⟩,⟨2146213830480762085561911280434418517,2146213830480762085561911280434418527⟩⟩, + ⟨⟨4549655378047644401983910305642,4549655378047644401983910305652⟩,⟨-2524053084995686739599891834071,-2524053084995686739599891834060⟩⟩, + ⟨⟨751515379551092678111554,751515379551092678111565⟩,⟨1689979449121768375586234,1689979449121768375586244⟩⟩, + ⟨⟨-47724605000891964,-47724605000891953⟩,⟨-326550519080096903,-326550519080096891⟩⟩, + ⟨⟨-159069922990,-159069922978⟩,⟨120023903223,120023903234⟩⟩, + ⟨⟨1196806,1196817⟩,⟨6049965,6049976⟩⟩, + ⟨⟨-133713,-133699⟩,⟨-8,9⟩⟩, + ⟨⟨1196806,1196817⟩,⟨-6049974,-6049963⟩⟩, + ⟨⟨-159069922990,-159069922978⟩,⟨-120023903232,-120023903221⟩⟩, + ⟨⟨-47724605000891964,-47724605000891953⟩,⟨326550519080096893,326550519080096905⟩⟩, + ⟨⟨751515379551092678111554,751515379551092678111565⟩,⟨-1689979449121768375586242,-1689979449121768375586232⟩⟩, + ⟨⟨4549655378047644401983910305642,4549655378047644401983910305652⟩,⟨2524053084995686739599891834062,2524053084995686739599891834073⟩⟩, + ⟨⟨1798903133128507975213902858397822246,1798903133128507975213902858397822256⟩,⟨-2146213830480762085561911280434418525,-2146213830480762085561911280434418515⟩⟩, + ⟨⟨213730495732954513049236173578002264984302,213730495732954513049236173578002264984313⟩,⟨-32018350541243202890035919028402977517221,-32018350541243202890035919028402977517210⟩⟩, + ⟨⟨-661960326394838945258445277610382937087158571,-661960326394838945258445277610382937087138035⟩,⟨2499022418338155500755704152205192640894287124,2499022418338155500755704152205192640894306975⟩⟩, + ⟨⟨-1351932308085569216849730668396573411784165792362,-1351932308085569216849730668396573411784126313592⟩,⟨-5880883912361056715141786924150882327191226532782,-5880883912361056715141786924150882327191179838247⟩⟩, + ⟨⟨1395134277794117000352545353523598926252047096909525,1395134277794117000352545353523598926252065409129763⟩,⟨3302874915706121139024244016178781915319112942874159,3302874915706121139024244016178781915319139167874402⟩⟩, + ⟨⟨-324965786859373814959226575649460590341389542445451431,-324965786859373814959226575649460590341386754014772589⟩,⟨-614946076766533903158736178874330243216891259888433850,-614946076766533903158736178874330243216886377185045925⟩⟩, + ⟨⟨31522053523682957966361913751107652266387766092249413377,31522053523682957966361913751107652266388016379017797396⟩,⟨44485738015594957089378148555632540161494666802651566811,44485738015594957089378148555632540161495076801268410158⟩⟩, + ⟨⟨-1563810890053033024363175895889832026833501193681166502200,-1563810890053033024363175895889832026833488776941903975671⟩,⟨-1337247862220004441200444383475973996332772153421285719996,-1337247862220004441200444383475973996332755818198935937362⟩⟩, + ⟨⟨41020393301129879903681628065917597771666872926175837798630,41020393301129879903681628065917597771667198630207113151734⟩,⟨13013078376855653336342320351100409291250057474269626782041,13013078376855653336342320351100409291250366717916277583623⟩⟩, + ⟨⟨-538954948733379316385099966322716068228368240358948361661661,-538954948733379316385099966322716068228363961029193215362636⟩,⟨144370750267100617153428316739172533473423392855466597752282,144370750267100617153428316739172533473425567326107526471031⟩⟩] +lemma jetTable0_10_calc (j : Fin 31) : jetMultiplierBox 0 10 j = jetTable0_10 j := by + revert j + decide +kernel +lemma jetTable0_10_mem (j : Fin 31) : (jetTable0_10 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨5,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_10_calc] + exact jetMultiplierBox_mem 0 10 j +def jetTable0_11 : Fin 31 → CI := + ![⟨⟨-104942216448154609287849708932284386497380600933531826230046,-104942216448154609287849708932284386497358251735086631105572⟩,⟨-2517235356759112533662934545531753061889839601102642421646751,-2517235356759112533662934545531753061889816296828686662078088⟩⟩, + ⟨⟨105218167700723039682616639444320637082038860803525882211916,105218167700723039682616639444320637082041175768394555251081⟩,⟨170762665721880754302712208044146750301070843056365436797967,170762665721880754302712208044146750301072839371427795432415⟩⟩, + ⟨⟨-7712665884328242342146258095307923078832902278307353743818,-7712665884328242342146258095307923078832792986413939782880⟩,⟨-6258191340445474378659788815246177375186192511109337555572,-6258191340445474378659788815246177375186101434628788143161⟩⟩, + ⟨⟨239602186487799809662569944797342364251530006152836362797,239602186487799809662569944797342364251532613182830032062⟩,⟨132078249596084166432201716417673062596245379146879187093,132078249596084166432201716417673062596247453249786682869⟩⟩, + ⟨⟨-3282138962928144017965276521596196710258096146431990325,-3282138962928144017965276521596196710258065700584409710⟩,⟨-1580969162545168056915306931510741159818545745447977615,-1580969162545168056915306931510741159818521975754468664⟩⟩, + ⟨⟨17768804701881999335003790058629631199635015797496946,17768804701881999335003790058629631199635182878398540⟩,⟨8477913532712284517754099324944594310593698961000583,8477913532712284517754099324944594310593850121570080⟩⟩, + ⟨⟨-32623821073364262698353749123609204352579583329424,-32623821073364262698353749123609204352579266636256⟩,⟨-12380593563917573454744138173100098561436744382519,-12380593563917573454744138173100098561436402784496⟩⟩, + ⟨⟨15811562399612003082567771873036671684315879307,15811562399612003082567771873036671684316035760⟩,⟨-334447122304897235582104805419763221445061260,-334447122304897235582104805419763221444877160⟩⟩, + ⟨⟨-672117840865081633744138155920767075487726,-672117840865081633744138155920767075487646⟩,⟨1233377916002819290962123104244225954339907,1233377916002819290962123104244225954339984⟩⟩, + ⟨⟨-18929141438560926985341125365640583172,-18929141438560926985341125365640583096⟩,⟨4265329746155137398530846371848469860,4265329746155137398530846371848469936⟩⟩, + ⟨⟨-4242101500816081093461629894354,-4242101500816081093461629894263⟩,⟨38268866913136213317351618446024,38268866913136213317351618446112⟩⟩, + ⟨⟨-13687205377112742293734973,-13687205377112742293734876⟩,⟨-5097308898940462545495855,-5097308898940462545495758⟩⟩, + ⟨⟨1915796776483340537,1915796776483340649⟩,⟨1996630518165651776,1996630518165651890⟩⟩, + ⟨⟨839773341948,839773342063⟩,⟨-1541712526128,-1541712526018⟩⟩, + ⟨⟨-22504859,-22504759⟩,⟨-51452187,-51452087⟩⟩, + ⟨⟨1231747,1231861⟩,⟨-66,75⟩⟩, + ⟨⟨-22504859,-22504759⟩,⟨51452087,51452187⟩⟩, + ⟨⟨839773341948,839773342063⟩,⟨1541712526018,1541712526128⟩⟩, + ⟨⟨1915796776483340537,1915796776483340649⟩,⟨-1996630518165651890,-1996630518165651776⟩⟩, + ⟨⟨-13687205377112742293734973,-13687205377112742293734876⟩,⟨5097308898940462545495758,5097308898940462545495855⟩⟩, + ⟨⟨-4242101500816081093461629894354,-4242101500816081093461629894263⟩,⟨-38268866913136213317351618446112,-38268866913136213317351618446024⟩⟩, + ⟨⟨-18929141438560926985341125365640583172,-18929141438560926985341125365640583096⟩,⟨-4265329746155137398530846371848469936,-4265329746155137398530846371848469860⟩⟩, + ⟨⟨-672117840865081633744138155920767075487726,-672117840865081633744138155920767075487646⟩,⟨-1233377916002819290962123104244225954339984,-1233377916002819290962123104244225954339907⟩⟩, + ⟨⟨15811562399612003082567771873036671684315879307,15811562399612003082567771873036671684316035760⟩,⟨334447122304897235582104805419763221444877160,334447122304897235582104805419763221445061260⟩⟩, + ⟨⟨-32623821073364262698353749123609204352579583329424,-32623821073364262698353749123609204352579266636256⟩,⟨12380593563917573454744138173100098561436402784496,12380593563917573454744138173100098561436744382519⟩⟩, + ⟨⟨17768804701881999335003790058629631199635015797496946,17768804701881999335003790058629631199635182878398540⟩,⟨-8477913532712284517754099324944594310593850121570080,-8477913532712284517754099324944594310593698961000583⟩⟩, + ⟨⟨-3282138962928144017965276521596196710258096146431990325,-3282138962928144017965276521596196710258065700584409710⟩,⟨1580969162545168056915306931510741159818521975754468664,1580969162545168056915306931510741159818545745447977615⟩⟩, + ⟨⟨239602186487799809662569944797342364251530006152836362807,239602186487799809662569944797342364251532613182830032055⟩,⟨-132078249596084166432201716417673062596247453249786682848,-132078249596084166432201716417673062596245379146879187093⟩⟩, + ⟨⟨-7712665884328242342146258095307923078832902278307353743796,-7712665884328242342146258095307923078832792986413939782971⟩,⟨6258191340445474378659788815246177375186101434628788143167,6258191340445474378659788815246177375186192511109337555465⟩⟩, + ⟨⟨105218167700723039682616639444320637082038860803525882213280,105218167700723039682616639444320637082041175768394555252486⟩,⟨-170762665721880754302712208044146750301072839371427795431624,-170762665721880754302712208044146750301070843056365436797128⟩⟩, + ⟨⟨-104942216448154609287849708932284386497380600933531826257497,-104942216448154609287849708932284386497358251735086631102077⟩,⟨2517235356759112533662934545531753061889816296828686662062565,2517235356759112533662934545531753061889839601102642421662172⟩⟩] +lemma jetTable0_11_calc (j : Fin 31) : jetMultiplierBox 0 11 j = jetTable0_11 j := by + revert j + decide +kernel +lemma jetTable0_11_mem (j : Fin 31) : (jetTable0_11 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨5,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_11_calc] + exact jetMultiplierBox_mem 0 11 j +def jetTable0_12 : Fin 31 → CI := + ![⟨⟨57767857958841527124346738521584274297109642570826899912218,57767857958841527124346738521584274297111731976814126005429⟩,⟨405689378355084887013343021187209291420631473285956168033502,405689378355084887013343021187209291420634080797258245681629⟩⟩, + ⟨⟨-12136076694369722119965492543103859670061563678703368068630,-12136076694369722119965492543103859670061405407359310777095⟩,⟨-22319130914722332790392893567199772631506837804509649605723,-22319130914722332790392893567199772631506694351423172677632⟩⟩, + ⟨⟨584084920492403995421598475182482558675195844813981451990,584084920492403995421598475182482558675201872610235415734⟩,⟨733950174432854622943999923624167794475766859075176530452,733950174432854622943999923624167794475771576437154918063⟩⟩, + ⟨⟨-11492873522784276728955018194444101116031642041205837166,-11492873522784276728955018194444101116031524794947358656⟩,⟨-14198867120529930814063232268923513658498291845179145716,-14198867120529930814063232268923513658498200583937999113⟩⟩, + ⟨⟨85966268309169288059972844469007813800058413257512725,85966268309169288059972844469007813800059448717680850⟩,⟨136253757480284703583467361877574691249175406872627302,136253757480284703583467361877574691249176282624703817⟩⟩, + ⟨⟨-206383269238860188200239916862239422160492193341441,-206383269238860188200239916862239422160488781766002⟩,⟨-490612602731709399710884320681968592084503985041907,-490612602731709399710884320681968592084500831697575⟩⟩, + ⟨⟨168709731939408698562712621900056099437705563633,168709731939408698562712621900056099437708920129⟩,⟨494848982228911898816916119155101692339973411788,494848982228911898816916119155101692339976592367⟩⟩, + ⟨⟨-65529272605945902405176276949657395488194605,-65529272605945902405176276949657395488193888⟩,⟨-96457557329213776757715561251327023850262750,-96457557329213776757715561251327023850262122⟩⟩, + ⟨⟨4426150766610022654113259054583093793444,4426150766610022654113259054583093793453⟩,⟨-131386296206750457758709853365105215493,-131386296206750457758709853365105215484⟩⟩, + ⟨⟨16342814407278613442712840361526135,16342814407278613442712840361526143⟩,⟨15188319103391309781801879519476578,15188319103391309781801879519476587⟩⟩, + ⟨⟨9999025931321384364863023098,9999025931321384364863023108⟩,⟨-9379291251015484102088024431,-9379291251015484102088024422⟩⟩, + ⟨⟨1225120705823671805459,1225120705823671805469⟩,⟨687280597654622873438,687280597654622873448⟩⟩, + ⟨⟨-68253163058977,-68253163058967⟩,⟨-796358375341,-796358375331⟩⟩, + ⟨⟨12297349,12297358⟩,⟨-1862891,-1862882⟩⟩, + ⟨⟨-162,-153⟩,⟨-34,-24⟩⟩, + ⟨⟨-10,2⟩,⟨-6,7⟩⟩, + ⟨⟨-162,-153⟩,⟨26,36⟩⟩, + ⟨⟨12297349,12297358⟩,⟨1862884,1862893⟩⟩, + ⟨⟨-68253163058977,-68253163058967⟩,⟨796358375333,796358375343⟩⟩, + ⟨⟨1225120705823671805459,1225120705823671805469⟩,⟨-687280597654622873446,-687280597654622873436⟩⟩, + ⟨⟨9999025931321384364863023098,9999025931321384364863023108⟩,⟨9379291251015484102088024424,9379291251015484102088024433⟩⟩, + ⟨⟨16342814407278613442712840361526135,16342814407278613442712840361526143⟩,⟨-15188319103391309781801879519476585,-15188319103391309781801879519476576⟩⟩, + ⟨⟨4426150766610022654113259054583093793444,4426150766610022654113259054583093793453⟩,⟨131386296206750457758709853365105215486,131386296206750457758709853365105215495⟩⟩, + ⟨⟨-65529272605945902405176276949657395488194605,-65529272605945902405176276949657395488193888⟩,⟨96457557329213776757715561251327023850262124,96457557329213776757715561251327023850262752⟩⟩, + ⟨⟨168709731939408698562712621900056099437705563633,168709731939408698562712621900056099437708920129⟩,⟨-494848982228911898816916119155101692339976592365,-494848982228911898816916119155101692339973411786⟩⟩, + ⟨⟨-206383269238860188200239916862239422160492193341441,-206383269238860188200239916862239422160488781766002⟩,⟨490612602731709399710884320681968592084500831697577,490612602731709399710884320681968592084503985041909⟩⟩, + ⟨⟨85966268309169288059972844469007813800058413257512725,85966268309169288059972844469007813800059448717680850⟩,⟨-136253757480284703583467361877574691249176282624703815,-136253757480284703583467361877574691249175406872627300⟩⟩, + ⟨⟨-11492873522784276728955018194444101116031642041205837166,-11492873522784276728955018194444101116031524794947358656⟩,⟨14198867120529930814063232268923513658498200583937999115,14198867120529930814063232268923513658498291845179145718⟩⟩, + ⟨⟨584084920492403995421598475182482558675195844813981452004,584084920492403995421598475182482558675201872610235415729⟩,⟨-733950174432854622943999923624167794475771576437154918047,-733950174432854622943999923624167794475766859075176530456⟩⟩, + ⟨⟨-12136076694369722119965492543103859670061563678703368068884,-12136076694369722119965492543103859670061405407359310777142⟩,⟨22319130914722332790392893567199772631506694351423172677458,22319130914722332790392893567199772631506837804509649605757⟩⟩, + ⟨⟨57767857958841527124346738521584274297109642570826899916158,57767857958841527124346738521584274297111731976814126006678⟩,⟨-405689378355084887013343021187209291420634080797258245679993,-405689378355084887013343021187209291420631473285956168034558⟩⟩] +lemma jetTable0_12_calc (j : Fin 31) : jetMultiplierBox 0 12 j = jetTable0_12 j := by + revert j + decide +kernel +lemma jetTable0_12_mem (j : Fin 31) : (jetTable0_12 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨6,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_12_calc] + exact jetMultiplierBox_mem 0 12 j +def jetTable0_13 : Fin 31 → CI := + ![⟨⟨-1861940974998960131254911038173206663538576142668934463683435,-1861940974998960131254911038173206663538559983276083827440661⟩,⟨-549811103291957718608455990870130077327235645608934319506376,-549811103291957718608455990870130077327215824495225743641413⟩⟩, + ⟨⟨127461770279190304779648507720470253810295622134961694225368,127461770279190304779648507720470253810296786968256748747245⟩,⟨-6056090363010038219536492996003540904805822581803482399417,-6056090363010038219536492996003540904804480496995052066354⟩⟩, + ⟨⟨-4913079858988411325005273174188208824746543547848916198823,-4913079858988411325005273174188208824746498226022614425123⟩,⟨977979326496345020609076740695719597111586020389524539170,977979326496345020609076740695719597111636458288099158349⟩⟩, + ⟨⟨102447051482007701302438734084664393192166445986510372938,102447051482007701302438734084664393192167384910264398862⟩,⟨-18207159143592877370200944912246163917470285499008612018,-18207159143592877370200944912246163917469250651784865779⟩⟩, + ⟨⟨-981634528752531745324350790071339111186929833774263005,-981634528752531745324350790071339111186920812013506344⟩,⟨24468992221023068211390474878356556884208740840171088,24468992221023068211390474878356556884218804317401534⟩⟩, + ⟨⟨3427487553861300582037078032952831381534725776785508,3427487553861300582037078032952831381534758136813731⟩,⟨618287910854069535612404100296417952795732752025388,618287910854069535612404100296417952795769589205029⟩⟩, + ⟨⟨-3527570329221021439899922085138798844220583245706,-3527570329221021439899922085138798844220548879341⟩,⟨-1065460513892549001847106269546810039414551965768,-1065460513892549001847106269546810039414512744872⟩⟩, + ⟨⟨885326212262136275532415935602257299654793749,885326212262136275532415935602257299654801794⟩,⟨69436875019316744235865769401478865566064602,69436875019316744235865769401478865566073185⟩⟩, + ⟨⟨-23754397242025311803137718811989139381479,-23754397242025311803137718811989139381395⟩,⟨27749740462380345289003321842912954024455,27749740462380345289003321842912954024539⟩⟩, + ⟨⟨-199649692073353937881979532086389472,-199649692073353937881979532086389388⟩,⟨2039295290800035757325516165657260,2039295290800035757325516165657345⟩⟩, + ⟨⟨-19367569831956824897115833035,-19367569831956824897115832930⟩,⟨131630753204482681288071284330,131630753204482681288071284435⟩⟩, + ⟨⟨-14711480542363644432553,-14711480542363644432435⟩,⟨834547548459602039206,834547548459602039323⟩⟩, + ⟨⟨696225302930913,696225302931035⟩,⟨-324258580290220,-324258580290098⟩⟩, + ⟨⟨-132698836,-132698729⟩,⟨65862047,65862153⟩⟩, + ⟨⟨1930,2033⟩,⟨1,115⟩⟩, + ⟨⟨-14,114⟩,⟨-64,77⟩⟩, + ⟨⟨1930,2033⟩,⟨-115,-1⟩⟩, + ⟨⟨-132698836,-132698729⟩,⟨-65862153,-65862047⟩⟩, + ⟨⟨696225302930913,696225302931035⟩,⟨324258580290098,324258580290220⟩⟩, + ⟨⟨-14711480542363644432553,-14711480542363644432435⟩,⟨-834547548459602039323,-834547548459602039206⟩⟩, + ⟨⟨-19367569831956824897115833035,-19367569831956824897115832930⟩,⟨-131630753204482681288071284435,-131630753204482681288071284330⟩⟩, + ⟨⟨-199649692073353937881979532086389472,-199649692073353937881979532086389388⟩,⟨-2039295290800035757325516165657345,-2039295290800035757325516165657260⟩⟩, + ⟨⟨-23754397242025311803137718811989139381479,-23754397242025311803137718811989139381395⟩,⟨-27749740462380345289003321842912954024539,-27749740462380345289003321842912954024455⟩⟩, + ⟨⟨885326212262136275532415935602257299654793749,885326212262136275532415935602257299654801794⟩,⟨-69436875019316744235865769401478865566073185,-69436875019316744235865769401478865566064602⟩⟩, + ⟨⟨-3527570329221021439899922085138798844220583245706,-3527570329221021439899922085138798844220548879341⟩,⟨1065460513892549001847106269546810039414512744872,1065460513892549001847106269546810039414551965768⟩⟩, + ⟨⟨3427487553861300582037078032952831381534725776785508,3427487553861300582037078032952831381534758136813731⟩,⟨-618287910854069535612404100296417952795769589205029,-618287910854069535612404100296417952795732752025388⟩⟩, + ⟨⟨-981634528752531745324350790071339111186929833774263005,-981634528752531745324350790071339111186920812013506344⟩,⟨-24468992221023068211390474878356556884218804317401534,-24468992221023068211390474878356556884208740840171088⟩⟩, + ⟨⟨102447051482007701302438734084664393192166445986510372938,102447051482007701302438734084664393192167384910264398862⟩,⟨18207159143592877370200944912246163917469250651784865779,18207159143592877370200944912246163917470285499008612018⟩⟩, + ⟨⟨-4913079858988411325005273174188208824746543547848916198745,-4913079858988411325005273174188208824746498226022614425186⟩,⟨-977979326496345020609076740695719597111636458288099158310,-977979326496345020609076740695719597111586020389524539272⟩⟩, + ⟨⟨127461770279190304779648507720470253810295622134961694224675,127461770279190304779648507720470253810296786968256748747944⟩,⟨6056090363010038219536492996003540904804480496995052066497,6056090363010038219536492996003540904805822581803482400950⟩⟩, + ⟨⟨-1861940974998960131254911038173206663538576142668934463678853,-1861940974998960131254911038173206663538559983276083827452975⟩,⟨549811103291957718608455990870130077327215824495225743638112,549811103291957718608455990870130077327235645608934319486181⟩⟩] +lemma jetTable0_13_calc (j : Fin 31) : jetMultiplierBox 0 13 j = jetTable0_13 j := by + revert j + decide +kernel +lemma jetTable0_13_mem (j : Fin 31) : (jetTable0_13 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨6,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_13_calc] + exact jetMultiplierBox_mem 0 13 j +def jetTable0_14 : Fin 31 → CI := + ![⟨⟨-6316758411638209246013747637935840468894228650864080825086,-6316758411638209246013747637935840468894220378112821424274⟩,⟨28268854612790599474663785411485593247020798679350548220347,28268854612790599474663785411485593247020814002796812648205⟩⟩, + ⟨⟨447320802023891066930438555617477570462322792434883053170,447320802023891066930438555617477570462323034910936163080⟩,⟨-818352743064714469170449782096355033179827467943314107894,-818352743064714469170449782096355033179826988701962354680⟩⟩, + ⟨⟨-13380542810005478402359702463466529199869150286092816207,-13380542810005478402359702463466529199869143033019297202⟩,⟨8507658281707347228840990326435746613536111887627970654,8507658281707347228840990326435746613536120416162616208⟩⟩, + ⟨⟨121374114906075104589747987772085410681292633156312326,121374114906075104589747987772085410681292698948676267⟩,⟨17246798450678992062585272966245654999654477802237306,17246798450678992062585272966245654999654525569173364⟩⟩, + ⟨⟨-192260202303642578302674082572304447215633007222377,-192260202303642578302674082572304447215632813581071⟩,⟨-301115591541835619820359433395981083289879450347144,-301115591541835619820359433395981083289879287123314⟩⟩, + ⟨⟨-106483704591699159279588519638978961363129958682,-106483704591699159279588519638978961363129844056⟩,⟨291873769290508122891287793949070602855571421405,291873769290508122891287793949070602855571579623⟩⟩, + ⟨⟨55366920574428704466228680686034758827804194,55366920574428704466228680686034758827804228⟩,⟨-24816889800225964596851050246747288165895923,-24816889800225964596851050246747288165895886⟩⟩, + ⟨⟨-1908164965002717459283158918090986412690,-1908164965002717459283158918090986412685⟩,⟨75092639698089034180634520689504248613,75092639698089034180634520689504248619⟩⟩, + ⟨⟨5741037832905462343776369678930532,5741037832905462343776369678930536⟩,⟨-3637889832737895498309804278117810,-3637889832737895498309804278117806⟩⟩, + ⟨⟨1872830283024237057855492106,1872830283024237057855492110⟩,⟨738446513811687977578082700,738446513811687977578082704⟩⟩, + ⟨⟨3424735543734399329,3424735543734399335⟩,⟨-44623013698337454655,-44623013698337454651⟩⟩, + ⟨⟨17350266221,17350266225⟩,⟨-108435835162,-108435835158⟩⟩, + ⟨⟨47,53⟩,⟨-97,-93⟩⟩, + ⟨⟨-3,3⟩,⟨-2,3⟩⟩, + ⟨⟨-2,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-2,3⟩,⟨-2,3⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨47,53⟩,⟨95,99⟩⟩, + ⟨⟨17350266221,17350266225⟩,⟨108435835160,108435835164⟩⟩, + ⟨⟨3424735543734399329,3424735543734399335⟩,⟨44623013698337454653,44623013698337454657⟩⟩, + ⟨⟨1872830283024237057855492106,1872830283024237057855492110⟩,⟨-738446513811687977578082702,-738446513811687977578082698⟩⟩, + ⟨⟨5741037832905462343776369678930532,5741037832905462343776369678930536⟩,⟨3637889832737895498309804278117808,3637889832737895498309804278117812⟩⟩, + ⟨⟨-1908164965002717459283158918090986412690,-1908164965002717459283158918090986412685⟩,⟨-75092639698089034180634520689504248617,-75092639698089034180634520689504248611⟩⟩, + ⟨⟨55366920574428704466228680686034758827804194,55366920574428704466228680686034758827804228⟩,⟨24816889800225964596851050246747288165895888,24816889800225964596851050246747288165895925⟩⟩, + ⟨⟨-106483704591699159279588519638978961363129958682,-106483704591699159279588519638978961363129844056⟩,⟨-291873769290508122891287793949070602855571579621,-291873769290508122891287793949070602855571421403⟩⟩, + ⟨⟨-192260202303642578302674082572304447215633007222377,-192260202303642578302674082572304447215632813581071⟩,⟨301115591541835619820359433395981083289879287123316,301115591541835619820359433395981083289879450347146⟩⟩, + ⟨⟨121374114906075104589747987772085410681292633156312326,121374114906075104589747987772085410681292698948676267⟩,⟨-17246798450678992062585272966245654999654525569173362,-17246798450678992062585272966245654999654477802237304⟩⟩, + ⟨⟨-13380542810005478402359702463466529199869150286092816207,-13380542810005478402359702463466529199869143033019297202⟩,⟨-8507658281707347228840990326435746613536120416162616206,-8507658281707347228840990326435746613536111887627970652⟩⟩, + ⟨⟨447320802023891066930438555617477570462322792434883053172,447320802023891066930438555617477570462323034910936163066⟩,⟨818352743064714469170449782096355033179826988701962354693,818352743064714469170449782096355033179827467943314107891⟩⟩, + ⟨⟨-6316758411638209246013747637935840468894228650864080824910,-6316758411638209246013747637935840468894220378112821424002⟩,⟨-28268854612790599474663785411485593247020814002796812648297,-28268854612790599474663785411485593247020798679350548220344⟩⟩] +lemma jetTable0_14_calc (j : Fin 31) : jetMultiplierBox 0 14 j = jetTable0_14 j := by + revert j + decide +kernel +lemma jetTable0_14_mem (j : Fin 31) : (jetTable0_14 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨7,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_14_calc] + exact jetMultiplierBox_mem 0 14 j +def jetTable0_15 : Fin 31 → CI := + ![⟨⟨-119251121030183164298081482250485990089314390216569944738200,-119251121030183164298081482250485990089314318713524309899929⟩,⟨-38701681892029524992801617768764613107370671330916671736449,-38701681892029524992801617768764613107370620011070282781817⟩⟩, + ⟨⟨3420846141227534761799842408354863563485130096131315631317,3420846141227534761799842408354863563485132563972090084943⟩,⟨2533685060035599623537232593298225661028571512030229099180,2533685060035599623537232593298225661028573181192213079540⟩⟩, + ⟨⟨-28575919575898056791901482764724710202415398772241821997,-28575919575898056791901482764724710202415347405175524159⟩,⟨-71039013792778632469768273373087743340065880043623577820,-71039013792778632469768273373087743340065835234198083035⟩⟩, + ⟨⟨-230551259196141253010449938683357157316198622885974248,-230551259196141253010449938683357157316198265788310023⟩,⟨584662198444262268781207136019664758876945396442312386,584662198444262268781207136019664758876945787153296166⟩⟩, + ⟨⟨1876041737738120965011482592400881151393673552100474,1876041737738120965011482592400881151393674772796402⟩,⟨-536555504976103439421074031208922430368826478553536,-536555504976103439421074031208922430368825109722844⟩⟩, + ⟨⟨-1387522148545574761430126213906934675337366470241,-1387522148545574761430126213906934675337365336964⟩,⟨-1169307213086383579505632135607565619096388615068,-1169307213086383579505632135607565619096387571550⟩⟩, + ⟨⟨1343114778990261093486042526575234722234199,1343114778990261093486042526575234722234502⟩,⟨380298871386373038501775073780845852399066651,380298871386373038501775073780845852399066933⟩⟩, + ⟨⟨5652442204245761759323233303379473965225,5652442204245761759323233303379473965260⟩,⟨-11584793299417773995715586000190273975656,-11584793299417773995715586000190273975624⟩⟩, + ⟨⟨-671341350964043810465680345020114,-671341350964043810465680345020092⟩,⟨49546149123741396653168578012696632,49546149123741396653168578012696654⟩⟩, + ⟨⟨-13780873194922954176712141104,-13780873194922954176712141080⟩,⟨7893847293806778054985476552,7893847293806778054985476576⟩⟩, + ⟨⟨248683217614214973328,248683217614214973366⟩,⟨290033768575954041905,290033768575954041943⟩⟩, + ⟨⟨485485585858,485485585887⟩,⟨887340912558,887340912586⟩⟩, + ⟨⟨15,62⟩,⟨1048,1087⟩⟩, + ⟨⟨-24,28⟩,⟨-18,28⟩⟩, + ⟨⟨-26,15⟩,⟨-24,26⟩⟩, + ⟨⟨-23,23⟩,⟨-23,23⟩⟩, + ⟨⟨-26,13⟩,⟨-15,24⟩⟩, + ⟨⟨-28,28⟩,⟨-28,28⟩⟩, + ⟨⟨15,62⟩,⟨-1087,-1048⟩⟩, + ⟨⟨485485585858,485485585887⟩,⟨-887340912586,-887340912558⟩⟩, + ⟨⟨248683217614214973328,248683217614214973366⟩,⟨-290033768575954041943,-290033768575954041905⟩⟩, + ⟨⟨-13780873194922954176712141104,-13780873194922954176712141080⟩,⟨-7893847293806778054985476576,-7893847293806778054985476552⟩⟩, + ⟨⟨-671341350964043810465680345020114,-671341350964043810465680345020092⟩,⟨-49546149123741396653168578012696654,-49546149123741396653168578012696632⟩⟩, + ⟨⟨5652442204245761759323233303379473965225,5652442204245761759323233303379473965260⟩,⟨11584793299417773995715586000190273975624,11584793299417773995715586000190273975656⟩⟩, + ⟨⟨1343114778990261093486042526575234722234199,1343114778990261093486042526575234722234502⟩,⟨-380298871386373038501775073780845852399066933,-380298871386373038501775073780845852399066651⟩⟩, + ⟨⟨-1387522148545574761430126213906934675337366470241,-1387522148545574761430126213906934675337365336964⟩,⟨1169307213086383579505632135607565619096387571550,1169307213086383579505632135607565619096388615068⟩⟩, + ⟨⟨1876041737738120965011482592400881151393673552100474,1876041737738120965011482592400881151393674772796402⟩,⟨536555504976103439421074031208922430368825109722844,536555504976103439421074031208922430368826478553536⟩⟩, + ⟨⟨-230551259196141253010449938683357157316198622885974248,-230551259196141253010449938683357157316198265788310023⟩,⟨-584662198444262268781207136019664758876945787153296166,-584662198444262268781207136019664758876945396442312386⟩⟩, + ⟨⟨-28575919575898056791901482764724710202415398772241821997,-28575919575898056791901482764724710202415347405175524159⟩,⟨71039013792778632469768273373087743340065835234198083035,71039013792778632469768273373087743340065880043623577820⟩⟩, + ⟨⟨3420846141227534761799842408354863563485130096131315631375,3420846141227534761799842408354863563485132563972090084919⟩,⟨-2533685060035599623537232593298225661028573181192213079474,-2533685060035599623537232593298225661028571512030229099196⟩⟩, + ⟨⟨-119251121030183164298081482250485990089314390216569944738717,-119251121030183164298081482250485990089314318713524309899996⟩,⟨38701681892029524992801617768764613107370620011070282780644,38701681892029524992801617768764613107370671330916671735729⟩⟩] +lemma jetTable0_15_calc (j : Fin 31) : jetMultiplierBox 0 15 j = jetTable0_15 j := by + revert j + decide +kernel +lemma jetTable0_15_mem (j : Fin 31) : (jetTable0_15 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨7,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_15_calc] + exact jetMultiplierBox_mem 0 15 j +def jetTable0_16 : Fin 31 → CI := + ![⟨⟨-10486317576367223889001071498362044609783242284602999468791,-10486317576367223889001071498362044609783237552744947422527⟩,⟨15966270186448027146904420681116031141147293479246840537304,15966270186448027146904420681116031141147301937712109369956⟩⟩, + ⟨⟨318574801180192086635210651783943356004678992156640499308,318574801180192086635210651783943356004679135910603903810⟩,⟨-23069025474739936933781305761816962489493043827095010665,-23069025474739936933781305761816962489492931239248517179⟩⟩, + ⟨⟨-1111289473577782200187305179555220923700124179376630268,-1111289473577782200187305179555220923700123080781800961⟩,⟨-2240134755671936603810523044299773693938080420282890091,-2240134755671936603810523044299773693938079409441750808⟩⟩, + ⟨⟨-6299926060800951670448379349776936642137581041798972,-6299926060800951670448379349776936642137578199015331⟩,⟨4384728600075813334095738329247868471621716516736985,4384728600075813334095738329247868471621719979619290⟩⟩, + ⟨⟨4011068913446564448498684407346037796529823190299,4011068913446564448498684407346037796529826524902⟩,⟨6208021923464933314752170667506552525749764425176,6208021923464933314752170667506552525749767226489⟩⟩, + ⟨⟨1506231168833037235791089467177417082031294788,1506231168833037235791089467177417082031295472⟩,⟨-770726919975682505556565926790542943908344162,-770726919975682505556565926790542943908343394⟩⟩, + ⟨⟨-32308816058808698364081512811260406263223,-32308816058808698364081512811260406263219⟩,⟨-57197733659953909110009121845854872916464,-57197733659953909110009121845854872916460⟩⟩, + ⟨⟨-144478403762242785306877124094967017,-144478403762242785306877124094967013⟩,⟨253468907523500034874665711043542615,253468907523500034874665711043542619⟩⟩, + ⟨⟨44151268284937513708773327941,44151268284937513708773327945⟩,⟨-86732801499483653533846344793,-86732801499483653533846344789⟩⟩, + ⟨⟨1694693306585616876195,1694693306585616876199⟩,⟨3992981983209739604,3992981983209739608⟩⟩, + ⟨⟨-840168164664,-840168164659⟩,⟨-1073269833900,-1073269833895⟩⟩, + ⟨⟨-81,-77⟩,⟨14,18⟩⟩, + ⟨⟨-2,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,3⟩⟩, + ⟨⟨-2,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-2,3⟩,⟨-2,3⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-2,3⟩,⟨-2,3⟩⟩, + ⟨⟨-81,-77⟩,⟨-16,-12⟩⟩, + ⟨⟨-840168164664,-840168164659⟩,⟨1073269833897,1073269833902⟩⟩, + ⟨⟨1694693306585616876195,1694693306585616876199⟩,⟨-3992981983209739606,-3992981983209739602⟩⟩, + ⟨⟨44151268284937513708773327941,44151268284937513708773327945⟩,⟨86732801499483653533846344791,86732801499483653533846344795⟩⟩, + ⟨⟨-144478403762242785306877124094967017,-144478403762242785306877124094967013⟩,⟨-253468907523500034874665711043542617,-253468907523500034874665711043542613⟩⟩, + ⟨⟨-32308816058808698364081512811260406263223,-32308816058808698364081512811260406263219⟩,⟨57197733659953909110009121845854872916462,57197733659953909110009121845854872916466⟩⟩, + ⟨⟨1506231168833037235791089467177417082031294788,1506231168833037235791089467177417082031295472⟩,⟨770726919975682505556565926790542943908343396,770726919975682505556565926790542943908344164⟩⟩, + ⟨⟨4011068913446564448498684407346037796529823190299,4011068913446564448498684407346037796529826524902⟩,⟨-6208021923464933314752170667506552525749767226487,-6208021923464933314752170667506552525749764425174⟩⟩, + ⟨⟨-6299926060800951670448379349776936642137581041798972,-6299926060800951670448379349776936642137578199015331⟩,⟨-4384728600075813334095738329247868471621719979619288,-4384728600075813334095738329247868471621716516736983⟩⟩, + ⟨⟨-1111289473577782200187305179555220923700124179376630268,-1111289473577782200187305179555220923700123080781800961⟩,⟨2240134755671936603810523044299773693938079409441750810,2240134755671936603810523044299773693938080420282890093⟩⟩, + ⟨⟨318574801180192086635210651783943356004678992156640499305,318574801180192086635210651783943356004679135910603903813⟩,⟨23069025474739936933781305761816962489492931239248517181,23069025474739936933781305761816962489493043827095010673⟩⟩, + ⟨⟨-10486317576367223889001071498362044609783242284602999468566,-10486317576367223889001071498362044609783237552744947422507⟩,⟨-15966270186448027146904420681116031141147301937712109369915,-15966270186448027146904420681116031141147293479246840537467⟩⟩] +lemma jetTable0_16_calc (j : Fin 31) : jetMultiplierBox 0 16 j = jetTable0_16 j := by + revert j + decide +kernel +lemma jetTable0_16_mem (j : Fin 31) : (jetTable0_16 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨8,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_16_calc] + exact jetMultiplierBox_mem 0 16 j +def jetTable0_17 : Fin 31 → CI := + ![⟨⟨-70913159821176529970851750916002405187051213053090313112841,-70913159821176529970851750916002405187051173124963584442017⟩,⟨-41973644938054575946739753090397987241475651639434567589015,-41973644938054575946739753090397987241475625699733054242761⟩⟩, + ⟨⟨98863308219119898003902917270149967612533117549321402232,98863308219119898003902917270149967612533705822660803428⟩,⟨1440845304204741482700855107551497791970142936467496173846,1440845304204741482700855107551497791970143593939339015529⟩⟩, + ⟨⟨10941668799642852965851120963195736949274983688490400452,10941668799642852965851120963195736949274989058095005715⟩,⟨-4658688876094287484935260279510006202475171670075193178,-4658688876094287484935260279510006202475165636087550649⟩⟩, + ⟨⟨-18187261417863050009526048259218540907495528149974025,-18187261417863050009526048259218540907495507706658927⟩,⟨-33971641113080818609476701483572548117339493525768499,-33971641113080818609476701483572548117339476273961203⟩⟩, + ⟨⟨-36315074887388308794784177320583385341126279806840,-36315074887388308794784177320583385341126261001292⟩,⟨15080682829795594090603593759361756549165990731298,15080682829795594090603593759361756549166012349405⟩⟩, + ⟨⟨2122659240356939719024324786604000618731317763,2122659240356939719024324786604000618731323283⟩,⟨9339296842483222077606101003052490067474033048,9339296842483222077606101003052490067474038048⟩⟩, + ⟨⟨390216120689057025316437725693298329380219,390216120689057025316437725693298329380237⟩,⟨-74350521705139683439660301223067555233645,-74350521705139683439660301223067555233628⟩⟩, + ⟨⟨-1132952631289587943390874769619506156,-1132952631289587943390874769619506137⟩,⟨-1515147730423724879791374925596709130,-1515147730423724879791374925596709111⟩⟩, + ⟨⟨380349704675326592198442407024,380349704675326592198442407045⟩,⟨562507572657357800945119244351,562507572657357800945119244372⟩⟩, + ⟨⟨-7349871883927891279330,-7349871883927891279307⟩,⟨10419980249718008174715,10419980249718008174737⟩⟩, + ⟨⟨11039737144480,11039737144516⟩,⟨755212676031,755212676068⟩⟩, + ⟨⟨429,456⟩,⟨-559,-533⟩⟩, + ⟨⟨-26,18⟩,⟨-21,26⟩⟩, + ⟨⟨-23,27⟩,⟨-18,27⟩⟩, + ⟨⟨-25,15⟩,⟨-23,25⟩⟩, + ⟨⟨-22,22⟩,⟨-22,22⟩⟩, + ⟨⟨-25,13⟩,⟨-15,23⟩⟩, + ⟨⟨-27,27⟩,⟨-27,27⟩⟩, + ⟨⟨-26,13⟩,⟨-18,21⟩⟩, + ⟨⟨429,456⟩,⟨533,559⟩⟩, + ⟨⟨11039737144480,11039737144516⟩,⟨-755212676068,-755212676031⟩⟩, + ⟨⟨-7349871883927891279330,-7349871883927891279307⟩,⟨-10419980249718008174737,-10419980249718008174715⟩⟩, + ⟨⟨380349704675326592198442407024,380349704675326592198442407045⟩,⟨-562507572657357800945119244372,-562507572657357800945119244351⟩⟩, + ⟨⟨-1132952631289587943390874769619506156,-1132952631289587943390874769619506137⟩,⟨1515147730423724879791374925596709111,1515147730423724879791374925596709130⟩⟩, + ⟨⟨390216120689057025316437725693298329380219,390216120689057025316437725693298329380237⟩,⟨74350521705139683439660301223067555233628,74350521705139683439660301223067555233645⟩⟩, + ⟨⟨2122659240356939719024324786604000618731317763,2122659240356939719024324786604000618731323283⟩,⟨-9339296842483222077606101003052490067474038048,-9339296842483222077606101003052490067474033048⟩⟩, + ⟨⟨-36315074887388308794784177320583385341126279806840,-36315074887388308794784177320583385341126261001292⟩,⟨-15080682829795594090603593759361756549166012349405,-15080682829795594090603593759361756549165990731298⟩⟩, + ⟨⟨-18187261417863050009526048259218540907495528149974025,-18187261417863050009526048259218540907495507706658927⟩,⟨33971641113080818609476701483572548117339476273961203,33971641113080818609476701483572548117339493525768499⟩⟩, + ⟨⟨10941668799642852965851120963195736949274983688490400452,10941668799642852965851120963195736949274989058095005715⟩,⟨4658688876094287484935260279510006202475165636087550649,4658688876094287484935260279510006202475171670075193178⟩⟩, + ⟨⟨98863308219119898003902917270149967612533117549321402232,98863308219119898003902917270149967612533705822660803455⟩,⟨-1440845304204741482700855107551497791970143593939339015543,-1440845304204741482700855107551497791970142936467496173833⟩⟩, + ⟨⟨-70913159821176529970851750916002405187051213053090313112628,-70913159821176529970851750916002405187051173124963584442724⟩,⟨41973644938054575946739753090397987241475625699733054242682,41973644938054575946739753090397987241475651639434567588012⟩⟩] +lemma jetTable0_17_calc (j : Fin 31) : jetMultiplierBox 0 17 j = jetTable0_17 j := by + revert j + decide +kernel +lemma jetTable0_17_mem (j : Fin 31) : (jetTable0_17 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨8,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_17_calc] + exact jetMultiplierBox_mem 0 17 j +def jetTable0_18 : Fin 31 → CI := + ![⟨⟨-2567001717928039636263072600293436970767378543117312603491,-2567001717928039636263072600293436970767375786051722062495⟩,⟨-11204659015776973185127223248804074673007911411146231828071,-11204659015776973185127223248804074673007908217374305055149⟩⟩, + ⟨⟨-111608372803862372112900285439149744870149233221607984820,-111608372803862372112900285439149744870149201408812086648⟩,⟨54460550759321957991167530173940895314677692528124988611,54460550759321957991167530173940895314677726421704912333⟩⟩, + ⟨⟨220394196845031400581965704902347680549697701468149897,220394196845031400581965704902347680549697859301102122⟩,⟨536243113197748945153504994305652876832072618691458540,536243113197748945153504994305652876832072771541517007⟩⟩, + ⟨⟨959525304064155511748969131886503734071322103449156,959525304064155511748969131886503734071322376952412⟩,⟨-57923480317776629630147467073981591949107760024571,-57923480317776629630147467073981591949107528939768⟩⟩, + ⟨⟨200349441196845535915094106466271146963736438398,200349441196845535915094106466271146963736503828⟩,⟨-394448184839842069815774274242238539938990592037,-394448184839842069815774274242238539938990479600⟩⟩, + ⟨⟨-19865583318419094733993094942112141365681852,-19865583318419094733993094942112141365681836⟩,⟨-36547709156321680157899316866339065248423144,-36547709156321680157899316866339065248423130⟩⟩, + ⟨⟨-549401430199081580282409501661870904804,-549401430199081580282409501661870904800⟩,⟨28843912317102700394940260363439363665,28843912317102700394940260363439363669⟩⟩, + ⟨⟨103890329322574822011930621614522,103890329322574822011930621614526⟩,⟨654063306298485059032892945830008,654063306298485059032892945830012⟩⟩, + ⟨⟨5190124649359789201324371,5190124649359789201324375⟩,⟨-45286978460233132070433734,-45286978460233132070433730⟩⟩, + ⟨⟨116380394646259163,116380394646259167⟩,⟨-29278150473445950,-29278150473445946⟩⟩, + ⟨⟨-9671149,-9671145⟩,⟨-4235359,-4235355⟩⟩, + ⟨⟨-2,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,3⟩⟩, + ⟨⟨-3,3⟩,⟨-2,3⟩⟩, + ⟨⟨-2,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-2,3⟩,⟨-2,3⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-3,3⟩,⟨-2,4⟩⟩, + ⟨⟨-2,3⟩,⟨-2,3⟩⟩, + ⟨⟨-9671149,-9671145⟩,⟨4235357,4235361⟩⟩, + ⟨⟨116380394646259163,116380394646259167⟩,⟨29278150473445948,29278150473445952⟩⟩, + ⟨⟨5190124649359789201324371,5190124649359789201324375⟩,⟨45286978460233132070433732,45286978460233132070433736⟩⟩, + ⟨⟨103890329322574822011930621614522,103890329322574822011930621614526⟩,⟨-654063306298485059032892945830010,-654063306298485059032892945830006⟩⟩, + ⟨⟨-549401430199081580282409501661870904804,-549401430199081580282409501661870904800⟩,⟨-28843912317102700394940260363439363667,-28843912317102700394940260363439363663⟩⟩, + ⟨⟨-19865583318419094733993094942112141365681852,-19865583318419094733993094942112141365681836⟩,⟨36547709156321680157899316866339065248423132,36547709156321680157899316866339065248423146⟩⟩, + ⟨⟨200349441196845535915094106466271146963736438398,200349441196845535915094106466271146963736503828⟩,⟨394448184839842069815774274242238539938990479602,394448184839842069815774274242238539938990592039⟩⟩, + ⟨⟨959525304064155511748969131886503734071322103449156,959525304064155511748969131886503734071322376952412⟩,⟨57923480317776629630147467073981591949107528939770,57923480317776629630147467073981591949107760024573⟩⟩, + ⟨⟨220394196845031400581965704902347680549697701468149897,220394196845031400581965704902347680549697859301102122⟩,⟨-536243113197748945153504994305652876832072771541517005,-536243113197748945153504994305652876832072618691458538⟩⟩, + ⟨⟨-111608372803862372112900285439149744870149233221607984820,-111608372803862372112900285439149744870149201408812086647⟩,⟨-54460550759321957991167530173940895314677726421704912333,-54460550759321957991167530173940895314677692528124988610⟩⟩, + ⟨⟨-2567001717928039636263072600293436970767378543117312603829,-2567001717928039636263072600293436970767375786051722062340⟩,⟨11204659015776973185127223248804074673007908217374305054875,11204659015776973185127223248804074673007911411146231828292⟩⟩] +lemma jetTable0_18_calc (j : Fin 31) : jetMultiplierBox 0 18 j = jetTable0_18 j := by + revert j + decide +kernel +lemma jetTable0_18_mem (j : Fin 31) : (jetTable0_18 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨9,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_18_calc] + exact jetMultiplierBox_mem 0 18 j +def jetTable0_19 : Fin 31 → CI := + ![⟨⟨50164506120164064849548322526477377409198679874321184411387,50164506120164064849548322526477377409198696348384832389359⟩,⟨-2850633261186918049070484242089222445010365372616877302842,-2850633261186918049070484242089222445010348135468444899405⟩⟩, + ⟨⟨-140080340793164156315303387423025925383382551382463506047,-140080340793164156315303387423025925383382337829083838731⟩,⟨-556447244899316858275194879262638270713952190904650775972,-556447244899316858275194879262638270713952000162253420302⟩⟩, + ⟨⟨-2812521029541996469638145290883122451040522273381750661,-2812521029541996469638145290883122451040521297444226100⟩,⟨397650525666262777503710491667475203924767794925949944,397650525666262777503710491667475203924768873506674437⟩⟩, + ⟨⟨-1167415096695562386924074095278951127106844264975487,-1167415096695562386924074095278951127106842439374609⟩,⟨4872350298250292703253649429143006171554528473348311,4872350298250292703253649429143006171554530203406154⟩⟩, + ⟨⟨1686600605955410181574001833335330388124512865443,1686600605955410181574001833335330388124513631326⟩,⟨1792905753949234973986177936231264554953810748178,1792905753949234973986177936231264554953811408953⟩⟩, + ⟨⟨246796513117318763491184633060670904668588647,246796513117318763491184633060670904668588753⟩,⟨-23751241154822879508629353357705889675094481,-23751241154822879508629353357705889675094365⟩⟩, + ⟨⟨1411630290913872411251495977029563436660,1411630290913872411251495977029563436679⟩,⟨-3230115985048212308488427582084619461154,-3230115985048212308488427582084619461135⟩⟩, + ⟨⟨-4254654786297335083805159983905897,-4254654786297335083805159983905876⟩,⟨-1686526891538933526646429650242115,-1686526891538933526646429650242094⟩⟩, + ⟨⟨254088423773913381054370069,254088423773913381054370092⟩,⟨226962997069881189150480109,226962997069881189150480131⟩⟩, + ⟨⟨-431450449493467547,-431450449493467523⟩,⟨870665267494241968,870665267494241993⟩⟩, + ⟨⟨87103767,87103793⟩,⟨-31427770,-31427743⟩⟩, + ⟨⟨-28,20⟩,⟨-22,28⟩⟩, + ⟨⟨-23,28⟩,⟨-19,28⟩⟩, + ⟨⟨-25,29⟩,⟨-19,29⟩⟩, + ⟨⟨-26,15⟩,⟨-24,26⟩⟩, + ⟨⟨-24,24⟩,⟨-24,24⟩⟩, + ⟨⟨-26,13⟩,⟨-15,24⟩⟩, + ⟨⟨-29,29⟩,⟨-29,29⟩⟩, + ⟨⟨-28,28⟩,⟨-28,28⟩⟩, + ⟨⟨-28,14⟩,⟨-20,22⟩⟩, + ⟨⟨87103767,87103793⟩,⟨31427743,31427770⟩⟩, + ⟨⟨-431450449493467547,-431450449493467523⟩,⟨-870665267494241993,-870665267494241968⟩⟩, + ⟨⟨254088423773913381054370069,254088423773913381054370092⟩,⟨-226962997069881189150480131,-226962997069881189150480109⟩⟩, + ⟨⟨-4254654786297335083805159983905897,-4254654786297335083805159983905876⟩,⟨1686526891538933526646429650242094,1686526891538933526646429650242115⟩⟩, + ⟨⟨1411630290913872411251495977029563436660,1411630290913872411251495977029563436679⟩,⟨3230115985048212308488427582084619461135,3230115985048212308488427582084619461154⟩⟩, + ⟨⟨246796513117318763491184633060670904668588647,246796513117318763491184633060670904668588753⟩,⟨23751241154822879508629353357705889675094365,23751241154822879508629353357705889675094481⟩⟩, + ⟨⟨1686600605955410181574001833335330388124512865443,1686600605955410181574001833335330388124513631326⟩,⟨-1792905753949234973986177936231264554953811408953,-1792905753949234973986177936231264554953810748178⟩⟩, + ⟨⟨-1167415096695562386924074095278951127106844264975487,-1167415096695562386924074095278951127106842439374609⟩,⟨-4872350298250292703253649429143006171554530203406154,-4872350298250292703253649429143006171554528473348311⟩⟩, + ⟨⟨-2812521029541996469638145290883122451040522273381750661,-2812521029541996469638145290883122451040521297444226100⟩,⟨-397650525666262777503710491667475203924768873506674437,-397650525666262777503710491667475203924767794925949944⟩⟩, + ⟨⟨-140080340793164156315303387423025925383382551382463506057,-140080340793164156315303387423025925383382337829083838735⟩,⟨556447244899316858275194879262638270713952000162253420299,556447244899316858275194879262638270713952190904650775974⟩⟩, + ⟨⟨50164506120164064849548322526477377409198679874321184410085,50164506120164064849548322526477377409198696348384832390550⟩,⟨2850633261186918049070484242089222445010348135468444898576,2850633261186918049070484242089222445010365372616877304501⟩⟩] +lemma jetTable0_19_calc (j : Fin 31) : jetMultiplierBox 0 19 j = jetTable0_19 j := by + revert j + decide +kernel +lemma jetTable0_19_mem (j : Fin 31) : (jetTable0_19 j).Mem + (jetMultiplier (damping 0) H (finiteNode ⟨9,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable0_19_calc] + exact jetMultiplierBox_mem 0 19 j +def jetTable1_0 : Fin 31 → CI := + ![⟨⟨1629253316781639126399410153653620033952267139198969306636186,1629253316781639126399410153653620033952314230934201060362041⟩,⟨-1108326722468075993752400823267547170803307719720718411181074,-1108326722468075993752400823267547170803251649572252620626967⟩⟩, + ⟨⟨1464136081331984769607783996801471297325979207857616273240007,1464136081331984769607783996801471297326021527064813368813888⟩,⟨-746660161622165505883440198940896052659425138192857146800052,-746660161622165505883440198940896052659377945111065230570819⟩⟩, + ⟨⟨1251644625154472799492599247473827269161803519323659410414327,1251644625154472799492599247473827269161839696704238102190147⟩,⟨-457205147113119910452029812525431608310813518716087807360695,-457205147113119910452029812525431608310775080838007900947874⟩⟩, + ⟨⟨1016981720032055001740026878875864432508350781859646308245502,1016981720032055001740026878875864432508380176572803269907233⟩,⟨-246303399450048887327924251023659027667859995018141297704491,-246303399450048887327924251023659027667829762724407875951913⟩⟩, + ⟨⟨785245521887491572093147453757904867434225767056637463426078,785245521887491572093147453757904867434248463695546168515416⟩,⟨-110393582316044960502294650059594679818574007742335428009616,-110393582316044960502294650059594679818551090946738239973207⟩⟩, + ⟨⟨576934442117974227362356563487754188396580858057495196457981,576934442117974227362356563487754188396597533698862537404845⟩,⟨-37114922188066004905791335741786884085646565674028909456931,-37114922188066004905791335741786884085629866297329219589371⟩⟩, + ⟨⟨404616987227579859110041491483134831165628731403104589633828,404616987227579859110041491483134831165640426402186436243481⟩,⟨-8699273478526635260393966170191634851847742729457740107441,-8699273478526635260393966170191634851836101593033903847667⟩⟩, + ⟨⟨272006285910839601896646287093239775864628733173171063565684,272006285910839601896646287093239775864636595209033660985047⟩,⟨-6562395918840771889399251550335101625297611087816750702767,-6562395918840771889399251550335101625289932295534262803309⟩⟩, + ⟨⟨175662386731724025467578962089032164516133965816860965673333,175662386731724025467578962089032164516139043140642563102608⟩,⟨-15358168185958910031101479755377447658400809665510902367578,-15358168185958910031101479755377447658396134858172418868121⟩⟩, + ⟨⟨108293804894877534756955453896286603306634695039308847244758,108293804894877534756955453896286603306637825149978416444355⟩,⟨-25066897454670264547997011011214021210288737772469784143658,-25066897454670264547997011011214021210286264361353187585715⟩⟩, + ⟨⟨62017344267646720854483673949603334567314836544885285475936,62017344267646720854483673949603334567316629086491437459109⟩,⟨-30833752296889993832231513843670353482250186500093327799033,-30833752296889993832231513843670353482249246456905006771152⟩⟩, + ⟨⟨30379103864448450639773675267886474624800609745516189984630,30379103864448450639773675267886474624801872528305622209690⟩,⟨-31411941575852551463879067679496155280493986770103596688196,-31411941575852551463879067679496155280493078843250205031926⟩⟩, + ⟨⟨8951589646004145978340917609063951505716978544784836336980,8951589646004145978340917609063951505717638652124247914183⟩,⟨-27401824158912975240171698673672646718987383692077487472459,-27401824158912975240171698673672646718986591673159755476324⟩⟩, + ⟨⟨-4951806272642872404216774992763019726282255274004756289803,-4951806272642872404216774992763019726282112147611566949062⟩,⟨-20021299891555338121304266311460914987062895633584808560986,-20021299891555338121304266311460914987062307443834271473138⟩⟩, + ⟨⟨-12816103263366276878474978000910025186155318490369504974409,-12816103263366276878474978000910025186154948055314818214659⟩,⟨-10516734076126229024449888717090248695009947617415357199330,-10516734076126229024449888717090248695009574587541079679287⟩⟩, + ⟨⟨-15365751189413714877958007716825558071888842785177465290452,-15365751189413714877958007716825558071888398655416434289651⟩,⟨-1055,990⟩⟩, + ⟨⟨-12816103263366276878474978000910025186155318490369504974454,-12816103263366276878474978000910025186154948055314818214719⟩,⟨10516734076126229024449888717090248695009574587541079679218,10516734076126229024449888717090248695009947617415357199260⟩⟩, + ⟨⟨-4951806272642872404216774992763019726282255274004756289899,-4951806272642872404216774992763019726282112147611566949216⟩,⟨20021299891555338121304266311460914987062307443834271473133,20021299891555338121304266311460914987062895633584808560932⟩⟩, + ⟨⟨8951589646004145978340917609063951505716978544784836336887,8951589646004145978340917609063951505717638652124247914049⟩,⟨27401824158912975240171698673672646718986591673159755476386,27401824158912975240171698673672646718987383692077487472475⟩⟩, + ⟨⟨30379103864448450639773675267886474624800609745516189984298,30379103864448450639773675267886474624801872528305622209593⟩,⟨31411941575852551463879067679496155280493078843250205032016,31411941575852551463879067679496155280493986770103596688514⟩⟩, + ⟨⟨62017344267646720854483673949603334567314836544885285475890,62017344267646720854483673949603334567316629086491437458791⟩,⟨30833752296889993832231513843670353482249246456905006771663,30833752296889993832231513843670353482250186500093327799274⟩⟩, + ⟨⟨108293804894877534756955453896286603306634695039308847244691,108293804894877534756955453896286603306637825149978416444067⟩,⟨25066897454670264547997011011214021210286264361353187586546,25066897454670264547997011011214021210288737772469784144271⟩⟩, + ⟨⟨175662386731724025467578962089032164516133965816860965673537,175662386731724025467578962089032164516139043140642563102189⟩,⟨15358168185958910031101479755377447658396134858172418869595,15358168185958910031101479755377447658400809665510902368429⟩⟩, + ⟨⟨272006285910839601896646287093239775864628733173171063566528,272006285910839601896646287093239775864636595209033660984121⟩,⟨6562395918840771889399251550335101625289932295534262806055,6562395918840771889399251550335101625297611087816750703739⟩⟩, + ⟨⟨404616987227579859110041491483134831165628731403104589633810,404616987227579859110041491483134831165640426402186436243323⟩,⟨8699273478526635260393966170191634851836101593033903849853,8699273478526635260393966170191634851847742729457740109486⟩⟩, + ⟨⟨576934442117974227362356563487754188396580858057495196455230,576934442117974227362356563487754188396597533698862537406846⟩,⟨37114922188066004905791335741786884085629866297329219591474,37114922188066004905791335741786884085646565674028909463784⟩⟩, + ⟨⟨785245521887491572093147453757904867434225767056637463425136,785245521887491572093147453757904867434248463695546168514921⟩,⟨110393582316044960502294650059594679818551090946738239977758,110393582316044960502294650059594679818574007742335428014614⟩⟩, + ⟨⟨1016981720032055001740026878875864432508350781859646308240746,1016981720032055001740026878875864432508380176572803269908200⟩,⟨246303399450048887327924251023659027667829762724407875956330,246303399450048887327924251023659027667859995018141297714619⟩⟩, + ⟨⟨1251644625154472799492599247473827269161803519323659410416855,1251644625154472799492599247473827269161839696704238102182346⟩,⟨457205147113119910452029812525431608310775080838007900960599,457205147113119910452029812525431608310813518716087807363133⟩⟩, + ⟨⟨1464136081331984769607783996801471297325979207857616273237850,1464136081331984769607783996801471297326021527064813368807204⟩,⟨746660161622165505883440198940896052659377945111065230581435,746660161622165505883440198940896052659425138192857146806150⟩⟩, + ⟨⟨1629253316781639126399410153653620033952267139198969306623237,1629253316781639126399410153653620033952314230934201060358648⟩,⟨1108326722468075993752400823267547170803251649572252620633897,1108326722468075993752400823267547170803307719720718411197527⟩⟩] +lemma jetTable1_0_calc (j : Fin 31) : jetMultiplierBox 1 0 j = jetTable1_0 j := by + revert j + decide +kernel +lemma jetTable1_0_mem (j : Fin 31) : (jetTable1_0 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨0,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_0_calc] + exact jetMultiplierBox_mem 1 0 j +def jetTable1_1 : Fin 31 → CI := + ![⟨⟨2414836717890286514293140142428728851485269530650264930239181,2414836717890286514293140142428728851485539855285220918347678⟩,⟨6793982008928892558420171872780000272025467268366879850218068,6793982008928892558420171872780000272025705098412625667709640⟩⟩, + ⟨⟨1022181065382877857374160082004016979745986116304125177782523,1022181065382877857374160082004016979746231856943451837718899⟩,⟨6182967989978241027095149026574326836358374262420533610392255,6182967989978241027095149026574326836358595491660189365696811⟩⟩, + ⟨⟨-68423539566152095322171406648278604480944246889870227566086,-68423539566152095322171406648278604480728429587293505857723⟩,⟨5302587966654793473556275273048425526140654731286742709454779,5302587966654793473556275273048425526140851571669814119616551⟩⟩, + ⟨⟨-799653857507034499535426026760931193029101835064070909214049,-799653857507034499535426026760931193028919393738146156383998⟩,⟨4278380588588043511282202178576449436808552070635824329819979,4278380588588043511282202178576449436808719411134558559211376⟩⟩, + ⟨⟨-1171642644631526744885018482463017282220324059094942256891739,-1171642644631526744885018482463017282220176101789287466604460⟩,⟨3246875558619449483495002821243470858844149863481143272932746,3246875558619449483495002821243470858844285729834261319379687⟩⟩, + ⟨⟨-1241006007380499921255773160982816529172458093133353538392133,-1241006007380499921255773160982816529172343326762977291337640⟩,⟨2325835899026832583623830943809752149894948549011920024946124,2325835899026832583623830943809752149895053928463987424435369⟩⟩, + ⟨⟨-1102713223339046894471313421292577876748059426983097380809101,-1102713223339046894471313421292577876747974555466560802393160⟩,⟨1589106363912393914599380847847984178201217568501832604604944,1589106363912393914599380847847984178201295638128935015631866⟩⟩, + ⟨⟨-860803791354446301144895774891411505713101334637021101606247,-860803791354446301144895774891411505713041793569917078040644⟩,⟨1056655362229091769288557964879858605205716168289351880400101,1056655362229091769288557964879858605205771211504050130405126⟩⟩, + ⟨⟨-600470485111834953067419341830979974797077988327321218366965,-600470485111834953067419341830979974797038759930080974777463⟩,⟨703615407385037913749936209529709622102445083740178001217971,703615407385037913749936209529709622102481510293492191690826⟩⟩, + ⟨⟨-373213161572128055500087395265158495569290020416561971461028,-373213161572128055500087395265158495569266269248313782878142⟩,⟨481977300797167743934124094823094351391126664338364949783567,481977300797167743934124094823094351391148460341673493213695⟩⟩, + ⟨⟨-198282846066211861999581253828051021023817122380374676817018,-198282846066211861999581253828051021023804538661695714763172⟩,⟨342636554099209759616511960366566431654359005922960475327633,342636554099209759616511960366566431654369676327475401411604⟩⟩, + ⟨⟨-74215262778649011610259219873880244683999576959486112462221,-74215262778649011610259219873880244683989922748499695877052⟩,⟨248336044592849957079613853517927866844892483103330388943765,248336044592849957079613853517927866844901255369952822396175⟩⟩, + ⟨⟨8744949835206316654117510341169179197690238784151638875816,8744949835206316654117510341169179197695897267655253265502⟩,⟨176152557946724321838051890869818479108457364255371601174352,176152557946724321838051890869818479108463807821423135654601⟩⟩, + ⟨⟨60735151430046669997280189959485408621554578340049663406813,60735151430046669997280189959485408621556434148558168335329⟩,⟨114026773387011840119407790752054738580900401076224793907974,114026773387011840119407790752054738580904539753254005521732⟩⟩, + ⟨⟨89146713337528774820018697470313497128941049774776537429159,89146713337528774820018697470313497128943903019761911452567⟩,⟨56217009127092494066460348960728682874221143245528486175459,56217009127092494066460348960728682874223970974646922520788⟩⟩, + ⟨⟨98172875525949410260646489102408862159896950521532099702748,98172875525949410260646489102408862159900054295517778007460⟩,⟨-6314,6742⟩⟩, + ⟨⟨89146713337528774820018697470313497128941049774776537429482,89146713337528774820018697470313497128943903019761911452794⟩,⟨-56217009127092494066460348960728682874223970974646922520287,-56217009127092494066460348960728682874221143245528486174975⟩⟩, + ⟨⟨60735151430046669997280189959485408621554578340049663407737,60735151430046669997280189959485408621556434148558168335827⟩,⟨-114026773387011840119407790752054738580904539753254005521156,-114026773387011840119407790752054738580900401076224793907785⟩⟩, + ⟨⟨8744949835206316654117510341169179197690238784151638876713,8744949835206316654117510341169179197695897267655253266064⟩,⟨-176152557946724321838051890869818479108463807821423135654388,-176152557946724321838051890869818479108457364255371601174490⟩⟩, + ⟨⟨-74215262778649011610259219873880244683999576959486112461469,-74215262778649011610259219873880244683989922748499695874441⟩,⟨-248336044592849957079613853517927866844901255369952822397574,-248336044592849957079613853517927866844892483103330388943322⟩⟩, + ⟨⟨-198282846066211861999581253828051021023817122380374676813896,-198282846066211861999581253828051021023804538661695714762200⟩,⟨-342636554099209759616511960366566431654369676327475401411739,-342636554099209759616511960366566431654359005922960475329913⟩⟩, + ⟨⟨-373213161572128055500087395265158495569290020416561971456930,-373213161572128055500087395265158495569266269248313782875738⟩,⟨-481977300797167743934124094823094351391148460341673493215293,-481977300797167743934124094823094351391126664338364949786858⟩⟩, + ⟨⟨-600470485111834953067419341830979974797077988327321218359983,-600470485111834953067419341830979974797038759930080974775100⟩,⟨-703615407385037913749936209529709622102481510293492191692460,-703615407385037913749936209529709622102445083740178001224225⟩⟩, + ⟨⟨-860803791354446301144895774891411505713101334637021101592787,-860803791354446301144895774891411505713041793569917078039700⟩,⟨-1056655362229091769288557964879858605205771211504050130404761,-1056655362229091769288557964879858605205716168289351880412250⟩⟩, + ⟨⟨-1102713223339046894471313421292577876748059426983097380800205,-1102713223339046894471313421292577876747974555466560802385206⟩,⟨-1589106363912393914599380847847984178201295638128935015636990,-1589106363912393914599380847847984178201217568501832604611007⟩⟩, + ⟨⟨-1241006007380499921255773160982816529172458093133353538388787,-1241006007380499921255773160982816529172343326762977291304472⟩,⟨-2325835899026832583623830943809752149895053928463987424459569,-2325835899026832583623830943809752149894948549011920024940497⟩⟩, + ⟨⟨-1171642644631526744885018482463017282220324059094942256873224,-1171642644631526744885018482463017282220176101789287466583313⟩,⟨-3246875558619449483495002821243470858844285729834261319387940,-3246875558619449483495002821243470858844149863481143272938367⟩⟩, + ⟨⟨-799653857507034499535426026760931193029101835064070909198945,-799653857507034499535426026760931193028919393738146156337466⟩,⟨-4278380588588043511282202178576449436808719411134558559232308,-4278380588588043511282202178576449436808552070635824329809456⟩⟩, + ⟨⟨-68423539566152095322171406648278604480944246889870227507722,-68423539566152095322171406648278604480728429587293505852233⟩,⟨-5302587966654793473556275273048425526140851571669814119590973,-5302587966654793473556275273048425526140654731286742709482168⟩⟩, + ⟨⟨1022181065382877857374160082004016979745986116304125177828811,1022181065382877857374160082004016979746231856943451837743540⟩,⟨-6182967989978241027095149026574326836358595491660189365679558,-6182967989978241027095149026574326836358374262420533610396672⟩⟩, + ⟨⟨2414836717890286514293140142428728851485269530650264930266848,2414836717890286514293140142428728851485539855285220918417911⟩,⟨-6793982008928892558420171872780000272025705098412625667712863,-6793982008928892558420171872780000272025467268366879850178640⟩⟩] +lemma jetTable1_1_calc (j : Fin 31) : jetMultiplierBox 1 1 j = jetTable1_1 j := by + revert j + decide +kernel +lemma jetTable1_1_mem (j : Fin 31) : (jetTable1_1 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨0,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_1_calc] + exact jetMultiplierBox_mem 1 1 j +def jetTable1_2 : Fin 31 → CI := + ![⟨⟨1205447898206776722897649818052517873856608745178837699041569,1205447898206776722897649818052517873856675401383712644619002⟩,⟨243829065003530039808979623031280222474135727532700028558768,243829065003530039808979623031280222474191058856420972562468⟩⟩, + ⟨⟨565295588186402095876417100870870180711720643083225947686116,565295588186402095876417100870870180711751901554552793385899⟩,⟨318481578660154025874365111770303770655924367891614887467040,318481578660154025874365111770303770655947500213299236534654⟩⟩, + ⟨⟨216982500337853067500447149721104756122508809615533412741784,216982500337853067500447149721104756122524216663768596998499⟩,⟨226507624232154222178699356161180846968614430445995157506459,226507624232154222178699356161180846968626955366110255585705⟩⟩, + ⟨⟨66348694653673070265389695118021727826482473570873358848843,66348694653673070265389695118021727826489747857836201214598⟩,⟨120398993865684461944379331471475517393327081296805588548979,120398993865684461944379331471475517393333738855394408640149⟩⟩, + ⟨⟨15748428532910521241695853765894971764508860756514000670707,15748428532910521241695853765894971764511805701207023424755⟩,⟨51712865133382536760982458577090132878373897333831148827439,51712865133382536760982458577090132878376756838037066541655⟩⟩, + ⟨⟨3093115225332665061223997900753451741576542355275030310733,3093115225332665061223997900753451741577578203280594109399⟩,⟨18652551851551469635136214078329801711984824788180673121908,18652551851551469635136214078329801711985856195942265087701⟩⟩, + ⟨⟨824651937060431503071655559806814967560751118003105083885,824651937060431503071655559806814967561067061460197805860⟩,⟨5794155487243784229889934274307400147909075524795650879179,5794155487243784229889934274307400147909395917254040495856⟩⟩, + ⟨⟨422030331056826166713837716476574827659350856699990612226,422030331056826166713837716476574827659430458980577331510⟩,⟨1549664774787077974083187372241982297349464521988547085083,1549664774787077974083187372241982297349550211940817938108⟩⟩, + ⟨⟨218280412629248368482463401713667741835482107561247690817,218280412629248368482463401713667741835495596999991113794⟩,⟨330163679333387849238452995548701644016748869599337013819,330163679333387849238452995548701644016767126263889100395⟩⟩, + ⟨⟨82193248918846304380915810155070646088073290442589546960,82193248918846304380915810155070646088077835383985684886⟩,⟨37067374307366989517815326361185910809576235205534653478,37067374307366989517815326361185910809581216745709505864⟩⟩, + ⟨⟨18120458402014219183670919592681826444136794894989579236,18120458402014219183670919592681826444137796880219525227⟩,⟨-8397399053814258723466045204280930858042044495530446996,-8397399053814258723466045204280930858041499365177706133⟩⟩, + ⟨⟨-253778060570581962092630847360736337232936222788440478,-253778060570581962092630847360736337232765931281683385⟩,⟨-4631565037885518023915717129180500277079068587815667766,-4631565037885518023915717129180500277078812481725014250⟩⟩, + ⟨⟨-1246803821179415095585365567219628894508627200770221357,-1246803821179415095585365567219628894508558257756540010⟩,⟨30946653901886173054807828866640431851392927221043948,30946653901886173054807828866640431851430369665288984⟩⟩, + ⟨⟨137369409763473716025127551446201398293539943600457023,137369409763473716025127551446201398293547539551805675⟩,⟨412417577976534545095332363388349807068475798998924845,412417577976534545095332363388349807068499750310486119⟩⟩, + ⟨⟨140306665402688440394745766110572316039797263865490244,140306665402688440394745766110572316039806751406749540⟩,⟨-168022014693546168184020318324333507916214794590350299,-168022014693546168184020318324333507916205503678773220⟩⟩, + ⟨⟨-172457328883768861076504111430090986617894201006159865,-172457328883768861076504111430090986617884664840354543⟩,⟨-29,30⟩⟩, + ⟨⟨140306665402688440394745766110572316039797263865490244,140306665402688440394745766110572316039806751406749540⟩,⟨168022014693546168184020318324333507916205503678773222,168022014693546168184020318324333507916214794590350301⟩⟩, + ⟨⟨137369409763473716025127551446201398293539943600457023,137369409763473716025127551446201398293547539551805675⟩,⟨-412417577976534545095332363388349807068499750310486117,-412417577976534545095332363388349807068475798998924843⟩⟩, + ⟨⟨-1246803821179415095585365567219628894508627200770221357,-1246803821179415095585365567219628894508558257756540010⟩,⟨-30946653901886173054807828866640431851430369665288982,-30946653901886173054807828866640431851392927221043946⟩⟩, + ⟨⟨-253778060570581962092630847360736337232936222788440478,-253778060570581962092630847360736337232765931281683385⟩,⟨4631565037885518023915717129180500277078812481725014252,4631565037885518023915717129180500277079068587815667768⟩⟩, + ⟨⟨18120458402014219183670919592681826444136794894989579236,18120458402014219183670919592681826444137796880219525227⟩,⟨8397399053814258723466045204280930858041499365177706135,8397399053814258723466045204280930858042044495530446998⟩⟩, + ⟨⟨82193248918846304380915810155070646088073290442589546960,82193248918846304380915810155070646088077835383985684886⟩,⟨-37067374307366989517815326361185910809581216745709505862,-37067374307366989517815326361185910809576235205534653476⟩⟩, + ⟨⟨218280412629248368482463401713667741835482107561247690817,218280412629248368482463401713667741835495596999991113794⟩,⟨-330163679333387849238452995548701644016767126263889100393,-330163679333387849238452995548701644016748869599337013817⟩⟩, + ⟨⟨422030331056826166713837716476574827659350856699990612256,422030331056826166713837716476574827659430458980577331531⟩,⟨-1549664774787077974083187372241982297349550211940817938108,-1549664774787077974083187372241982297349464521988547085092⟩⟩, + ⟨⟨824651937060431503071655559806814967560751118003105083948,824651937060431503071655559806814967561067061460197805867⟩,⟨-5794155487243784229889934274307400147909395917254040495820,-5794155487243784229889934274307400147909075524795650879199⟩⟩, + ⟨⟨3093115225332665061223997900753451741576542355275030310759,3093115225332665061223997900753451741577578203280594109600⟩,⟨-18652551851551469635136214078329801711985856195942265087764,-18652551851551469635136214078329801711984824788180673121798⟩⟩, + ⟨⟨15748428532910521241695853765894971764508860756514000671380,15748428532910521241695853765894971764511805701207023424908⟩,⟨-51712865133382536760982458577090132878376756838037066541278,-51712865133382536760982458577090132878373897333831148827582⟩⟩, + ⟨⟨66348694653673070265389695118021727826482473570873358850253,66348694653673070265389695118021727826489747857836201214579⟩,⟨-120398993865684461944379331471475517393333738855394408639049,-120398993865684461944379331471475517393327081296805588549309⟩⟩, + ⟨⟨216982500337853067500447149721104756122508809615533412743790,216982500337853067500447149721104756122524216663768596999484⟩,⟨-226507624232154222178699356161180846968626955366110255583697,-226507624232154222178699356161180846968614430445995157505469⟩⟩, + ⟨⟨565295588186402095876417100870870180711720643083225947688434,565295588186402095876417100870870180711751901554552793387392⟩,⟨-318481578660154025874365111770303770655947500213299236530654,-318481578660154025874365111770303770655924367891614887463866⟩⟩, + ⟨⟨1205447898206776722897649818052517873856608745178837699039680,1205447898206776722897649818052517873856675401383712644623471⟩,⟨-243829065003530039808979623031280222474191058856420972558712,-243829065003530039808979623031280222474135727532700028548661⟩⟩] +lemma jetTable1_2_calc (j : Fin 31) : jetMultiplierBox 1 2 j = jetTable1_2 j := by + revert j + decide +kernel +lemma jetTable1_2_mem (j : Fin 31) : (jetTable1_2 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨1,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_2_calc] + exact jetMultiplierBox_mem 1 2 j +def jetTable1_3 : Fin 31 → CI := + ![⟨⟨-288535749283507661266639251171276424040149717708587388576119,-288535749283507661266639251171276424039832256300824148309928⟩,⟨4383593101162821955492780429812772060939838496478233111710330,4383593101162821955492780429812772060940119006041799682904508⟩⟩, + ⟨⟨-1017324299094769657426081325738131996737393580712696931125215,-1017324299094769657426081325738131996737259661068590730831115⟩,⟨2133120038866265812745711611933076163329020968590056616777406,2133120038866265812745711611933076163329164016790999553695717⟩⟩, + ⟨⟨-844997517740278211778223776733179684466929995132765303195126,-844997517740278211778223776733179684466867067307852936758647⟩,⟨804744988712465222217613251182899025817678820454876360502061,804744988712465222217613251182899025817753148551023732424403⟩⟩, + ⟨⟨-476856965233979146605772253564893158477212893362401415858499,-476856965233979146605772253564893158477180491466177489633976⟩,⟨215309503159182805917151740996401009129069752565911005184099,215309503159182805917151740996401009129108334718971881568912⟩⟩, + ⟨⟨-208972796041202922594157909568028509720041619929051676000891,-208972796041202922594157909568028509720027583613339106405663⟩,⟨28012319372383744689841078197766993960795777757750581979310,28012319372383744689841078197766993960812768548011206011864⟩⟩, + ⟨⟨-75401039233532313965589213772535404993192116808229956644999,-75401039233532313965589213772535404993186854147602836776751⟩,⟨-6618435428173509563484673930970690963021364221030337608057,-6618435428173509563484673930970690963014929541694708905345⟩⟩, + ⟨⟨-23565558600521627184064179572164860574568324590689046759579,-23565558600521627184064179572164860574566580037041037587625⟩,⟨-4956207271814166016526645872531453031195541440385508710887,-4956207271814166016526645872531453031193437591048947706266⟩⟩, + ⟨⟨-6680534318007124949360259402307084908742733044742916846693,-6680534318007124949360259402307084908742227893091960893602⟩,⟨-1266417590416539178135028693710856785277975134317689369213,-1266417590416539178135028693710856785277397855056840507278⟩⟩, + ⟨⟨-1724682553642240527830781147021337166963060189260861207862,-1724682553642240527830781147021337166962945241310277305669⟩,⟨31281458104284847581822879961116030067310831419231480046,31281458104284847581822879961116030067427720837093574781⟩⟩, + ⟨⟨-362451923984399387773271934121744233301439606416079931446,-362451923984399387773271934121744233301403275393543507504⟩,⟨179478135837818982025993128592437539863930935645507391090,179478135837818982025993128592437539863963633490855853924⟩⟩, + ⟨⟨-34447440166825918448398987794490924816342280637156365044,-34447440166825918448398987794490924816335840606315404940⟩,⟨85418261184601875112848889984501221558051585222073682313,85418261184601875112848889984501221558057205845681432005⟩⟩, + ⟨⟨13623954553921146563720630301021032162632362386896274856,13623954553921146563720630301021032162633738261560500189⟩,⟨17198734690957685513208055902352470507770035954135563213,17198734690957685513208055902352470507771835223868026645⟩⟩, + ⟨⟨5308193378256219975657430374349351047406624229025064529,5308193378256219975657430374349351047407096227676489223⟩,⟨-2858835959618313735894402956988474077997025048970414487,-2858835959618313735894402956988474077996710599508514724⟩⟩, + ⟨⟨-1273212074479667325909134658881094409253769049511523418,-1273212074479667325909134658881094409253686656346478435⟩,⟨-1716171616724793169791547149190341244932204027061644105,-1716171616724793169791547149190341244932049785624848272⟩⟩, + ⟨⟨-555535543667286792633391128218218276583409465088471726,-555535543667286792633391128218218276583345137303076524⟩,⟨934966289381055989308875239609778685444483553273389967,934966289381055989308875239609778685444549136737155525⟩⟩, + ⟨⟨859934494792647388228495987434406558936698472157858435,859934494792647388228495987434406558936758871617630137⟩,⟨-141,146⟩⟩, + ⟨⟨-555535543667286792633391128218218276583409465088471726,-555535543667286792633391128218218276583345137303076524⟩,⟨-934966289381055989308875239609778685444549136737155525,-934966289381055989308875239609778685444483553273389967⟩⟩, + ⟨⟨-1273212074479667325909134658881094409253769049511523418,-1273212074479667325909134658881094409253686656346478435⟩,⟨1716171616724793169791547149190341244932049785624848272,1716171616724793169791547149190341244932204027061644105⟩⟩, + ⟨⟨5308193378256219975657430374349351047406624229025064529,5308193378256219975657430374349351047407096227676489223⟩,⟨2858835959618313735894402956988474077996710599508514724,2858835959618313735894402956988474077997025048970414487⟩⟩, + ⟨⟨13623954553921146563720630301021032162632362386896274856,13623954553921146563720630301021032162633738261560500189⟩,⟨-17198734690957685513208055902352470507771835223868026645,-17198734690957685513208055902352470507770035954135563213⟩⟩, + ⟨⟨-34447440166825918448398987794490924816342280637156365044,-34447440166825918448398987794490924816335840606315404940⟩,⟨-85418261184601875112848889984501221558057205845681432005,-85418261184601875112848889984501221558051585222073682313⟩⟩, + ⟨⟨-362451923984399387773271934121744233301439606416079931446,-362451923984399387773271934121744233301403275393543507504⟩,⟨-179478135837818982025993128592437539863963633490855853924,-179478135837818982025993128592437539863930935645507391090⟩⟩, + ⟨⟨-1724682553642240527830781147021337166963060189260861207862,-1724682553642240527830781147021337166962945241310277305669⟩,⟨-31281458104284847581822879961116030067427720837093574781,-31281458104284847581822879961116030067310831419231480046⟩⟩, + ⟨⟨-6680534318007124949360259402307084908742733044742916846740,-6680534318007124949360259402307084908742227893091960893700⟩,⟨1266417590416539178135028693710856785277397855056840507218,1266417590416539178135028693710856785277975134317689369103⟩⟩, + ⟨⟨-23565558600521627184064179572164860574568324590689046759457,-23565558600521627184064179572164860574566580037041037587798⟩,⟨4956207271814166016526645872531453031193437591048947706270,4956207271814166016526645872531453031195541440385508710595⟩⟩, + ⟨⟨-75401039233532313965589213772535404993192116808229956645452,-75401039233532313965589213772535404993186854147602836776358⟩,⟨6618435428173509563484673930970690963014929541694708904458,6618435428173509563484673930970690963021364221030337608021⟩⟩, + ⟨⟨-208972796041202922594157909568028509720041619929051675999544,-208972796041202922594157909568028509720027583613339106406644⟩,⟨-28012319372383744689841078197766993960812768548011206012362,-28012319372383744689841078197766993960795777757750581982138⟩⟩, + ⟨⟨-476856965233979146605772253564893158477212893362401415854327,-476856965233979146605772253564893158477180491466177489635661⟩,⟨-215309503159182805917151740996401009129108334718971881568739,-215309503159182805917151740996401009129069752565911005189780⟩⟩, + ⟨⟨-844997517740278211778223776733179684466929995132765303187674,-844997517740278211778223776733179684466867067307852936754993⟩,⟨-804744988712465222217613251182899025817753148551023732428078,-804744988712465222217613251182899025817678820454876360509546⟩⟩, + ⟨⟨-1017324299094769657426081325738131996737393580712696931110111,-1017324299094769657426081325738131996737259661068590730819217⟩,⟨-2133120038866265812745711611933076163329164016790999553700151,-2133120038866265812745711611933076163329020968590056616785041⟩⟩, + ⟨⟨-288535749283507661266639251171276424040149717708587388563730,-288535749283507661266639251171276424039832256300824148272022⟩,⟨-4383593101162821955492780429812772060940119006041799682918540,-4383593101162821955492780429812772060939838496478233111698825⟩⟩] +lemma jetTable1_3_calc (j : Fin 31) : jetMultiplierBox 1 3 j = jetTable1_3 j := by + revert j + decide +kernel +lemma jetTable1_3_mem (j : Fin 31) : (jetTable1_3 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨1,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_3_calc] + exact jetMultiplierBox_mem 1 3 j +def jetTable1_4 : Fin 31 → CI := + ![⟨⟨-366760085024190985095675912050355629687306895158134472017556,-366760085024190985095675912050355629687292693662478420180668⟩,⟨-249865104529795221352194489122041115017057834916259007861383,-249865104529795221352194489122041115017048444968031321662755⟩⟩, + ⟨⟨-99760755572467919759961133883139131975305625750636646901266,-99760755572467919759961133883139131975298779512416194520907⟩,⟨-157226331047628438658821326484095543984280451635974608450034,-157226331047628438658821326484095543984274543059393937982144⟩⟩, + ⟨⟨-12811569493812510386227710085495560216256480877133409321231,-12811569493812510386227710085495560216253882134073347901924⟩,⟨-68318146514023470925580107001530848385711409024638860087506,-68318146514023470925580107001530848385708841623888389343069⟩⟩, + ⟨⟨3371857432984659083545507871559147993414205212332831731587,3371857432984659083545507871559147993415006290814929697654⟩,⟨-22507386275928606071848667454756972981376161334038229791696,-22507386275928606071848667454756972981375315504878876931488⟩⟩, + ⟨⟨2580419967230538813260426547284972333572778680324642732391,2580419967230538813260426547284972333572987068683359935499⟩,⟨-5907706586976685631014469321514453435567237861055422524246,-5907706586976685631014469321514453435567015849026160086082⟩⟩, + ⟨⟨844106595669160346517729464854223953821192267358309895124,844106595669160346517729464854223953821240725888012256092⟩,⟨-1313969600165995836252465258735728012625415475675077150019,-1313969600165995836252465258735728012625366096604981898292⟩⟩, + ⟨⟨177262287743305300660991389994780672536479104360942488852,177262287743305300660991389994780672536489663901138930647⟩,⟨-268164565201102814501539790049182902573120309132201599075,-268164565201102814501539790049182902573110231488949888543⟩⟩, + ⟨⟨21876986366618704584900803531748952596463179334676339474,21876986366618704584900803531748952596465253020880508716⟩,⟨-51942760620166595167168792326394574636910072500744485760,-51942760620166595167168792326394574636908120488140768626⟩⟩, + ⟨⟨-404408996579991849200450592430102094309437069527671505,-404408996579991849200450592430102094309136957958335702⟩,⟨-8555257240903233749753919775527895100494580336493201920,-8555257240903233749753919775527895100494258829323294926⟩⟩, + ⟨⟨-858818647792888618282969323290159850056888802054999872,-858818647792888618282969323290159850056856527589623599⟩,⟨-798843582736092573602260798410671237264115610527814648,-798843582736092573602260798410671237264073304290356250⟩⟩, + ⟨⟨-141424501621560757408539153776070398078450414096668256,-141424501621560757408539153776070398078445099353962504⟩,⟨63197600761569743446299774571436616499820450104107269,63197600761569743446299774571436616499823392760333778⟩⟩, + ⟨⟨9816351115089030324116161410710157834462132304019569,9816351115089030324116161410710157834462501203189852⟩,⟨19495922975654477920874916852423483043837616718859837,19495922975654477920874916852423483043838396811974651⟩⟩, + ⟨⟨2085580115033448128970159868254157379795320132154410,2085580115033448128970159868254157379795450805026670⟩,⟨-3112852035467055800113465143470881609279763687610150,-3112852035467055800113465143470881609279646706411359⟩⟩, + ⟨⟨-852735537271646970210910127286349632413298867507263,-852735537271646970210910127286349632413264647415671⟩,⟨322002172800083707092766728807032308648761268523452,322002172800083707092766728807032308648773369387831⟩⟩, + ⟨⟨361982017298540545912223945688265601304365415297055,361982017298540545912223945688265601304379018606684⟩,⟨-30973102037419721849776115012401027957110547221964,-30973102037419721849776115012401027957108917092357⟩⟩, + ⟨⟨-263889774699589060443832045403489696723736467882089,-263889774699589060443832045403489696723726550885813⟩,⟨-19,20⟩⟩, + ⟨⟨361982017298540545912223945688265601304365415297055,361982017298540545912223945688265601304379018606684⟩,⟨30973102037419721849776115012401027957108917092359,30973102037419721849776115012401027957110547221966⟩⟩, + ⟨⟨-852735537271646970210910127286349632413298867507263,-852735537271646970210910127286349632413264647415671⟩,⟨-322002172800083707092766728807032308648773369387829,-322002172800083707092766728807032308648761268523450⟩⟩, + ⟨⟨2085580115033448128970159868254157379795320132154410,2085580115033448128970159868254157379795450805026670⟩,⟨3112852035467055800113465143470881609279646706411361,3112852035467055800113465143470881609279763687610152⟩⟩, + ⟨⟨9816351115089030324116161410710157834462132304019569,9816351115089030324116161410710157834462501203189852⟩,⟨-19495922975654477920874916852423483043838396811974649,-19495922975654477920874916852423483043837616718859835⟩⟩, + ⟨⟨-141424501621560757408539153776070398078450414096668256,-141424501621560757408539153776070398078445099353962504⟩,⟨-63197600761569743446299774571436616499823392760333776,-63197600761569743446299774571436616499820450104107267⟩⟩, + ⟨⟨-858818647792888618282969323290159850056888802054999872,-858818647792888618282969323290159850056856527589623599⟩,⟨798843582736092573602260798410671237264073304290356252,798843582736092573602260798410671237264115610527814650⟩⟩, + ⟨⟨-404408996579991849200450592430102094309437069527671505,-404408996579991849200450592430102094309136957958335702⟩,⟨8555257240903233749753919775527895100494258829323294928,8555257240903233749753919775527895100494580336493201922⟩⟩, + ⟨⟨21876986366618704584900803531748952596463179334676339474,21876986366618704584900803531748952596465253020880508716⟩,⟨51942760620166595167168792326394574636908120488140768628,51942760620166595167168792326394574636910072500744485762⟩⟩, + ⟨⟨177262287743305300660991389994780672536479104360942488852,177262287743305300660991389994780672536489663901138930638⟩,⟨268164565201102814501539790049182902573110231488949888554,268164565201102814501539790049182902573120309132201599077⟩⟩, + ⟨⟨844106595669160346517729464854223953821192267358309895111,844106595669160346517729464854223953821240725888012256083⟩,⟨1313969600165995836252465258735728012625366096604981898299,1313969600165995836252465258735728012625415475675077150030⟩⟩, + ⟨⟨2580419967230538813260426547284972333572778680324642732427,2580419967230538813260426547284972333572987068683359935398⟩,⟨5907706586976685631014469321514453435567015849026160086169,5907706586976685631014469321514453435567237861055422524196⟩⟩, + ⟨⟨3371857432984659083545507871559147993414205212332831731489,3371857432984659083545507871559147993415006290814929697450⟩,⟨22507386275928606071848667454756972981375315504878876931562,22507386275928606071848667454756972981376161334038229791662⟩⟩, + ⟨⟨-12811569493812510386227710085495560216256480877133409321403,-12811569493812510386227710085495560216253882134073347902546⟩,⟨68318146514023470925580107001530848385708841623888389343212,68318146514023470925580107001530848385711409024638860087197⟩⟩, + ⟨⟨-99760755572467919759961133883139131975305625750636646902853,-99760755572467919759961133883139131975298779512416194521218⟩,⟨157226331047628438658821326484095543984274543059393937980890,157226331047628438658821326484095543984280451635974608450055⟩⟩, + ⟨⟨-366760085024190985095675912050355629687306895158134472023067,-366760085024190985095675912050355629687292693662478420179063⟩,⟨249865104529795221352194489122041115017048444968031321656089,249865104529795221352194489122041115017057834916259007861836⟩⟩] +lemma jetTable1_4_calc (j : Fin 31) : jetMultiplierBox 1 4 j = jetTable1_4 j := by + revert j + decide +kernel +lemma jetTable1_4_mem (j : Fin 31) : (jetTable1_4 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨2,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_4_calc] + exact jetMultiplierBox_mem 1 4 j +def jetTable1_5 : Fin 31 → CI := + ![⟨⟨1821894220414437568042132281735537812072916310095587830029893,1821894220414437568042132281735537812073016593925000655187989⟩,⟨-659754470469666835771602964419000295275936918302988887488875,-659754470469666835771602964419000295275841698315601347006092⟩⟩, + ⟨⟨849160909275600129551315806845613876588566104117594105545501,849160909275600129551315806845613876588615004120580415279381⟩,⟨75320259397189648416760374004432315755712394871642429094694,75320259397189648416760374004432315755766908642808921239865⟩⟩, + ⟨⟨293143075677608169559337157932347461881645911819280978645391,293143075677608169559337157932347461881664445807639487922086⟩,⟨160254217781788544891679375565007751950471549663069858418312,160254217781788544891679375565007751950494758208188762689622⟩⟩, + ⟨⟨74147337749024574391743931326328167241097529645057351537113,74147337749024574391743931326328167241103692905616166910528⟩,⟨87853184811418804370682064253750118017780221051765460578446,87853184811418804370682064253750118017787967979940128739261⟩⟩, + ⟨⟨13286930991127017910295634331884507179591208070934232808724,13286930991127017910295634331884507179593042242364718963843⟩,⟨31571707300975474061250345991351368426831988810503991699151,31571707300975474061250345991351368426834099387053791279763⟩⟩, + ⟨⟨1692265424654296836553824244710677579788933615509240369445,1692265424654296836553824244710677579789391118279542284030⟩,⟨8568124045223616570925384777836526268192337857807042065479,8568124045223616570925384777836526268192834892203301053847⟩⟩, + ⟨⟨250275310887564784810311061167757785116848864932231501624,250275310887564784810311061167757785116949561995364913809⟩,⟨1875658530409028970390173472351680517587066219217187500024,1875658530409028970390173472351680517587174261741872453678⟩⟩, + ⟨⟨90803619676411796497577789107909151726394404834118670091,90803619676411796497577789107909151726413800959340924113⟩,⟨337070697307277329269640549439037397207330597585679469531,337070697307277329269640549439037397207352382825083108655⟩⟩, + ⟨⟨33642202879283201546920714842949312959217470943544349826,33642202879283201546920714842949312959220299024147243444⟩,⟨44451512231519070887584705512793977737698237059233008306,44451512231519070887584705512793977737701784642721518040⟩⟩, + ⟨⟨7818379356194232897018740946254098814854758905253940133,7818379356194232897018740946254098814855167315056177219⟩,⟨1718430901040753361852686292977137733385145548791299608,1718430901040753361852686292977137733385573121787454375⟩⟩, + ⟨⟨705105473990402278686997240020819075074078466019464269,705105473990402278686997240020819075074133598876972735⟩,⟨-850432803028232314374384411072073649557254137899244721,-850432803028232314374384411072073649557213249692805671⟩⟩, + ⟨⟨-120909472402569416011891969696429823386998327676700163,-120909472402569416011891969696429823386992831453399958⟩,⟨-107635219511382306434321272078459039980558375137669720,-107635219511382306434321272078459039980550354589370257⟩⟩, + ⟨⟨-8512433405850535337536180132227266337998679954083900,-8512433405850535337536180132227266337997289717022042⟩,⟨27420207465774324665593871481511365036343306230991505,27420207465774324665593871481511365036344711963295662⟩⟩, + ⟨⟨6076198455272763630370535879611103678190043786480754,6076198455272763630370535879611103678190397427749997⟩,⟨-3786390445705031339418225338883109692532986196605340,-3786390445705031339418225338883109692532813579701333⟩⟩, + ⟨⟨-2848805719928235934925799521535492300195049682168070,-2848805719928235934925799521535492300194910070940990⟩,⟨531704931249680789449246695561069900089935205544822,531704931249680789449246695561069900089961483828810⟩⟩, + ⟨⟨2116088213170973261707022302650230624372868379991064,2116088213170973261707022302650230624372970025697436⟩,⟨-146,154⟩⟩, + ⟨⟨-2848805719928235934925799521535492300195049682168070,-2848805719928235934925799521535492300194910070940990⟩,⟨-531704931249680789449246695561069900089961483828810,-531704931249680789449246695561069900089935205544822⟩⟩, + ⟨⟨6076198455272763630370535879611103678190043786480754,6076198455272763630370535879611103678190397427749997⟩,⟨3786390445705031339418225338883109692532813579701333,3786390445705031339418225338883109692532986196605340⟩⟩, + ⟨⟨-8512433405850535337536180132227266337998679954083900,-8512433405850535337536180132227266337997289717022042⟩,⟨-27420207465774324665593871481511365036344711963295662,-27420207465774324665593871481511365036343306230991505⟩⟩, + ⟨⟨-120909472402569416011891969696429823386998327676700163,-120909472402569416011891969696429823386992831453399958⟩,⟨107635219511382306434321272078459039980550354589370257,107635219511382306434321272078459039980558375137669720⟩⟩, + ⟨⟨705105473990402278686997240020819075074078466019464269,705105473990402278686997240020819075074133598876972735⟩,⟨850432803028232314374384411072073649557213249692805671,850432803028232314374384411072073649557254137899244721⟩⟩, + ⟨⟨7818379356194232897018740946254098814854758905253940133,7818379356194232897018740946254098814855167315056177219⟩,⟨-1718430901040753361852686292977137733385573121787454375,-1718430901040753361852686292977137733385145548791299608⟩⟩, + ⟨⟨33642202879283201546920714842949312959217470943544349826,33642202879283201546920714842949312959220299024147243444⟩,⟨-44451512231519070887584705512793977737701784642721518040,-44451512231519070887584705512793977737698237059233008306⟩⟩, + ⟨⟨90803619676411796497577789107909151726394404834118670091,90803619676411796497577789107909151726413800959340924113⟩,⟨-337070697307277329269640549439037397207352382825083108655,-337070697307277329269640549439037397207330597585679469531⟩⟩, + ⟨⟨250275310887564784810311061167757785116848864932231501699,250275310887564784810311061167757785116949561995364913809⟩,⟨-1875658530409028970390173472351680517587174261741872453643,-1875658530409028970390173472351680517587066219217187500064⟩⟩, + ⟨⟨1692265424654296836553824244710677579788933615509240369500,1692265424654296836553824244710677579789391118279542284118⟩,⟨-8568124045223616570925384777836526268192834892203301053849,-8568124045223616570925384777836526268192337857807042065449⟩⟩, + ⟨⟨13286930991127017910295634331884507179591208070934232809421,13286930991127017910295634331884507179593042242364718963511⟩,⟨-31571707300975474061250345991351368426834099387053791279184,-31571707300975474061250345991351368426831988810503991699600⟩⟩, + ⟨⟨74147337749024574391743931326328167241097529645057351538066,74147337749024574391743931326328167241103692905616166910718⟩,⟨-87853184811418804370682064253750118017787967979940128738367,-87853184811418804370682064253750118017780221051765460578314⟩⟩, + ⟨⟨293143075677608169559337157932347461881645911819280978647809,293143075677608169559337157932347461881664445807639487921452⟩,⟨-160254217781788544891679375565007751950494758208188762686362,-160254217781788544891679375565007751950471549663069858418101⟩⟩, + ⟨⟨849160909275600129551315806845613876588566104117594105541803,849160909275600129551315806845613876588615004120580415283868⟩,⟨-75320259397189648416760374004432315755766908642808921238788,-75320259397189648416760374004432315755712394871642429085430⟩⟩, + ⟨⟨1821894220414437568042132281735537812072916310095587830002185,1821894220414437568042132281735537812073016593925000655203670⟩,⟨659754470469666835771602964419000295275841698315601346999258,659754470469666835771602964419000295275936918302988887525426⟩⟩] +lemma jetTable1_5_calc (j : Fin 31) : jetMultiplierBox 1 5 j = jetTable1_5 j := by + revert j + decide +kernel +lemma jetTable1_5_mem (j : Fin 31) : (jetTable1_5 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨2,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_5_calc] + exact jetMultiplierBox_mem 1 5 j +def jetTable1_6 : Fin 31 → CI := + ![⟨⟨-2457473676515418535117468607158759662015856397821188180414,-2457473676515418535117468607158759662015806451331975396337⟩,⟨10853839775706586848853862053110701801473589317066261250468,10853839775706586848853862053110701801473650209835425040507⟩⟩, + ⟨⟨-1856774144252888076800468826299710046125756925645754961730,-1856774144252888076800468826299710046125746508675988314112⟩,⟨1438733061652211020534652091933407977889249174395510421415,1438733061652211020534652091933407977889261755467652811984⟩⟩, + ⟨⟨-403627640559673964468124844762018300163005353775669818661,-403627640559673964468124844762018300163003089323097616206⟩,⟨8285660545019488406000718307208531900205447950841695437,8285660545019488406000718307208531900207633088466476899⟩⟩, + ⟨⟨-47412725196294599711076047338668596238358725612489060675,-47412725196294599711076047338668596238358459615166925250⟩,⟨-28100956140889676142070133877277567089958315782682473466,-28100956140889676142070133877277567089958088321386916603⟩⟩, + ⟨⟨-3331049209855707426813648876029645157875149987681345840,-3331049209855707426813648876029645157875121010571171995⟩,⟨-4791467050831427613204281232170272387036976052783178480,-4791467050831427613204281232170272387036949171446325291⟩⟩, + ⟨⟨-167461371442393773946743614839183596440017315015409080,-167461371442393773946743614839183596440014827092682456⟩,⟨-438882471035765724385782087597769141942591022180312625,-438882471035765724385782087597769141942588559939129159⟩⟩, + ⟨⟨-10574949328001877329076690528659569241580708292289719,-10574949328001877329076690528659569241580565235194583⟩,⟨-26389444528512474957789212477495752939631988874597547,-26389444528512474957789212477495752939631840823166924⟩⟩, + ⟨⟨-885560180405722402866938068183462260906917497413262,-885560180405722402866938068183462260906912529197370⟩,⟨-951684752199006643652909243890630239792995848023420,-951684752199006643652909243890630239792989945724305⟩⟩, + ⟨⟨-46319128724001438013967978649297964198090886486121,-46319128724001438013967978649297964198090626624148⟩,⟨336369216407092790446944393155665683964798819966,336369216407092790446944393155665683965044684113⟩⟩, + ⟨⟨-212926755209568429911197939984637241665781504221,-212926755209568429911197939984637241665774140633⟩,⟨1361490334587712944685348614606517825859273089464,1361490334587712944685348614606517825859280727774⟩⟩, + ⟨⟨35836236857053215072307828212312864604919332650,35836236857053215072307828212312864604919533707⟩,⟨-14275991344039019202764108474747729274812562896,-14275991344039019202764108474747729274812445902⟩⟩, + ⟨⟨-1203625428134270835040435822804963901789982479,-1203625428134270835040435822804963901789975719⟩,⟨158323963692461371229976969214424591725264581,158323963692461371229976969214424591725268710⟩⟩, + ⟨⟨41267258597271473492616151682000459142686105,41267258597271473492616151682000459142686415⟩,⟨-35180494931009689447747235473853001325622022,-35180494931009689447747235473853001325621817⟩⟩, + ⟨⟨2069896242841901589037435887946383183346888,2069896242841901589037435887946383183346907⟩,⟨3979259436960116310919256380686179309692198,3979259436960116310919256380686179309692230⟩⟩, + ⟨⟨-579780755969473495436450449132687359005251,-579780755969473495436450449132687359005240⟩,⟨670572248673711484933076312665190217268594,670572248673711484933076312665190217268605⟩⟩, + ⟨⟨-504614843750166297603855794433462453150649,-504614843750166297603855794433462453150637⟩,⟨-4,5⟩⟩, + ⟨⟨-579780755969473495436450449132687359005251,-579780755969473495436450449132687359005240⟩,⟨-670572248673711484933076312665190217268603,-670572248673711484933076312665190217268592⟩⟩, + ⟨⟨2069896242841901589037435887946383183346888,2069896242841901589037435887946383183346907⟩,⟨-3979259436960116310919256380686179309692228,-3979259436960116310919256380686179309692196⟩⟩, + ⟨⟨41267258597271473492616151682000459142686105,41267258597271473492616151682000459142686415⟩,⟨35180494931009689447747235473853001325621819,35180494931009689447747235473853001325622024⟩⟩, + ⟨⟨-1203625428134270835040435822804963901789982479,-1203625428134270835040435822804963901789975719⟩,⟨-158323963692461371229976969214424591725268708,-158323963692461371229976969214424591725264579⟩⟩, + ⟨⟨35836236857053215072307828212312864604919332650,35836236857053215072307828212312864604919533707⟩,⟨14275991344039019202764108474747729274812445904,14275991344039019202764108474747729274812562898⟩⟩, + ⟨⟨-212926755209568429911197939984637241665781504221,-212926755209568429911197939984637241665774140633⟩,⟨-1361490334587712944685348614606517825859280727772,-1361490334587712944685348614606517825859273089462⟩⟩, + ⟨⟨-46319128724001438013967978649297964198090886486121,-46319128724001438013967978649297964198090626624148⟩,⟨-336369216407092790446944393155665683965044684111,-336369216407092790446944393155665683964798819964⟩⟩, + ⟨⟨-885560180405722402866938068183462260906917497413262,-885560180405722402866938068183462260906912529197370⟩,⟨951684752199006643652909243890630239792989945724307,951684752199006643652909243890630239792995848023422⟩⟩, + ⟨⟨-10574949328001877329076690528659569241580708292289719,-10574949328001877329076690528659569241580565235194583⟩,⟨26389444528512474957789212477495752939631840823166926,26389444528512474957789212477495752939631988874597549⟩⟩, + ⟨⟨-167461371442393773946743614839183596440017315015409080,-167461371442393773946743614839183596440014827092682456⟩,⟨438882471035765724385782087597769141942588559939129161,438882471035765724385782087597769141942591022180312627⟩⟩, + ⟨⟨-3331049209855707426813648876029645157875149987681345840,-3331049209855707426813648876029645157875121010571171995⟩,⟨4791467050831427613204281232170272387036949171446325293,4791467050831427613204281232170272387036976052783178482⟩⟩, + ⟨⟨-47412725196294599711076047338668596238358725612489060675,-47412725196294599711076047338668596238358459615166925250⟩,⟨28100956140889676142070133877277567089958088321386916604,28100956140889676142070133877277567089958315782682473468⟩⟩, + ⟨⟨-403627640559673964468124844762018300163005353775669818659,-403627640559673964468124844762018300163003089323097616207⟩,⟨-8285660545019488406000718307208531900207633088466476899,-8285660545019488406000718307208531900205447950841695440⟩⟩, + ⟨⟨-1856774144252888076800468826299710046125756925645754961717,-1856774144252888076800468826299710046125746508675988314105⟩,⟨-1438733061652211020534652091933407977889261755467652811993,-1438733061652211020534652091933407977889249174395510421428⟩⟩, + ⟨⟨-2457473676515418535117468607158759662015856397821188180314,-2457473676515418535117468607158759662015806451331975396297⟩,⟨-10853839775706586848853862053110701801473650209835425040490,-10853839775706586848853862053110701801473589317066261250512⟩⟩] +lemma jetTable1_6_calc (j : Fin 31) : jetMultiplierBox 1 6 j = jetTable1_6 j := by + revert j + decide +kernel +lemma jetTable1_6_mem (j : Fin 31) : (jetTable1_6 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨3,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_6_calc] + exact jetMultiplierBox_mem 1 6 j +def jetTable1_7 : Fin 31 → CI := + ![⟨⟨-37309979780247618151524077593938314804274998214294147246352,-37309979780247618151524077593938314804274754280308607683050⟩,⟨-13616622979946602050060139535307353336457243996317681669695,-13616622979946602050060139535307353336457014231994720527400⟩⟩, + ⟨⟨-3961848010355811209141466494913189583537269791403064508207,-3961848010355811209141466494913189583537212628817254728117⟩,⟨-7728639722188997408571913778222254192018184074437071388230,-7728639722188997408571913778222254192018134276967717484233⟩⟩, + ⟨⟨348820897043382734797756836266229260419902864722017979799,348820897043382734797756836266229260419914066906308667423⟩,⟨-1509345241801722575076394398541059183707253530495533811775,-1509345241801722575076394398541059183707243031748278465587⟩⟩, + ⟨⟨165034676770933063242256200607341645762333897506194124393,165034676770933063242256200607341645762335199042394118235⟩,⟨-145257003453279174685316024207175409015214393924198044021,-145257003453279174685316024207175409015213038797476755971⟩⟩, + ⟨⟨23639529609592576266105354957180500352140274803466449929,23639529609592576266105354957180500352140431264669119090⟩,⟨-5345655364434361658959642774576179684096138358803782532,-5345655364434361658959642774576179684095973687806503580⟩⟩, + ⟨⟨2024297336055980594017880320863353670391789477123050234,2024297336055980594017880320863353670391804209800513087⟩,⟨196686168325209100136138600345938551945265526071444221,196686168325209100136138600345938551945280943114683608⟩⟩, + ⟨⟨126746883005014447051242949885014908626950735793766594,126746883005014447051242949885014908626951667135918476⟩,⟨20738043271184307517071339353973772740579452847035078,20738043271184307517071339353973772740580413497799629⟩⟩, + ⟨⟨6087154000698794331298183699935914136245133502457834,6087154000698794331298183699935914136245171865692007⟩,⟨-721540808317954838462032799294207487616017054535486,-721540808317954838462032799294207487615979491989185⟩⟩, + ⟨⟨150084588284984194122769243525628555044910754159488,150084588284984194122769243525628555044912615774612⟩,⟨-171484547159454039811097447990544601026351283767490,-171484547159454039811097447990544601026349523851021⟩⟩, + ⟨⟨-3916522134765103031917954117102711004011549723672,-3916522134765103031917954117102711004011494938988⟩,⟨-5879044838716744782622795641305881505760228159628,-5879044838716744782622795641305881505760170605993⟩⟩, + ⟨⟨-108799055099264050489155328980038102168748522267,-108799055099264050489155328980038102168747206246⟩,⟨174360881473047099375639394843374249447742523463,174360881473047099375639394843374249447743693462⟩⟩, + ⟨⟨5336375701681686107875945000324250421672702491,5336375701681686107875945000324250421672748961⟩,⟨-4044549042620358025608869759257820264042193221,-4044549042620358025608869759257820264042154621⟩⟩, + ⟨⟨-139397371444745494799694416181814857012193750,-139397371444745494799694416181814857012191594⟩,⟨274602173897627534628168747556528852327043012,274602173897627534628168747556528852327044834⟩⟩, + ⟨⟨-17686795496564605107672304225899421218130912,-17686795496564605107672304225899421218130764⟩,⟨-19118291729488050825375387771647253463415272,-19118291729488050825375387771647253463415067⟩⟩, + ⟨⟨2853382030873517482351810308020384116564596,2853382030873517482351810308020384116564659⟩,⟨-4370525241220116209199614607870873658848771,-4370525241220116209199614607870873658848708⟩⟩, + ⟨⟨2985341463419777674201379128499351076248278,2985341463419777674201379128499351076248342⟩,⟨-19,25⟩⟩, + ⟨⟨2853382030873517482351810308020384116564596,2853382030873517482351810308020384116564659⟩,⟨4370525241220116209199614607870873658848708,4370525241220116209199614607870873658848771⟩⟩, + ⟨⟨-17686795496564605107672304225899421218130912,-17686795496564605107672304225899421218130764⟩,⟨19118291729488050825375387771647253463415067,19118291729488050825375387771647253463415272⟩⟩, + ⟨⟨-139397371444745494799694416181814857012193750,-139397371444745494799694416181814857012191594⟩,⟨-274602173897627534628168747556528852327044834,-274602173897627534628168747556528852327043012⟩⟩, + ⟨⟨5336375701681686107875945000324250421672702491,5336375701681686107875945000324250421672748961⟩,⟨4044549042620358025608869759257820264042154621,4044549042620358025608869759257820264042193221⟩⟩, + ⟨⟨-108799055099264050489155328980038102168748522267,-108799055099264050489155328980038102168747206246⟩,⟨-174360881473047099375639394843374249447743693462,-174360881473047099375639394843374249447742523463⟩⟩, + ⟨⟨-3916522134765103031917954117102711004011549723672,-3916522134765103031917954117102711004011494938988⟩,⟨5879044838716744782622795641305881505760170605993,5879044838716744782622795641305881505760228159628⟩⟩, + ⟨⟨150084588284984194122769243525628555044910754159488,150084588284984194122769243525628555044912615774612⟩,⟨171484547159454039811097447990544601026349523851021,171484547159454039811097447990544601026351283767490⟩⟩, + ⟨⟨6087154000698794331298183699935914136245133502457834,6087154000698794331298183699935914136245171865692007⟩,⟨721540808317954838462032799294207487615979491989185,721540808317954838462032799294207487616017054535486⟩⟩, + ⟨⟨126746883005014447051242949885014908626950735793766594,126746883005014447051242949885014908626951667135918476⟩,⟨-20738043271184307517071339353973772740580413497799629,-20738043271184307517071339353973772740579452847035078⟩⟩, + ⟨⟨2024297336055980594017880320863353670391789477123050234,2024297336055980594017880320863353670391804209800513087⟩,⟨-196686168325209100136138600345938551945280943114683608,-196686168325209100136138600345938551945265526071444221⟩⟩, + ⟨⟨23639529609592576266105354957180500352140274803466449929,23639529609592576266105354957180500352140431264669119090⟩,⟨5345655364434361658959642774576179684095973687806503580,5345655364434361658959642774576179684096138358803782532⟩⟩, + ⟨⟨165034676770933063242256200607341645762333897506194124389,165034676770933063242256200607341645762335199042394118235⟩,⟨145257003453279174685316024207175409015213038797476755971,145257003453279174685316024207175409015214393924198044023⟩⟩, + ⟨⟨348820897043382734797756836266229260419902864722017979793,348820897043382734797756836266229260419914066906308667402⟩,⟨1509345241801722575076394398541059183707243031748278465595,1509345241801722575076394398541059183707253530495533811769⟩⟩, + ⟨⟨-3961848010355811209141466494913189583537269791403064508252,-3961848010355811209141466494913189583537212628817254728181⟩,⟨7728639722188997408571913778222254192018134276967717484217,7728639722188997408571913778222254192018184074437071388191⟩⟩, + ⟨⟨-37309979780247618151524077593938314804274998214294147246317,-37309979780247618151524077593938314804274754280308607683258⟩,⟨13616622979946602050060139535307353336457014231994720527279,13616622979946602050060139535307353336457243996317681669335⟩⟩] +lemma jetTable1_7_calc (j : Fin 31) : jetMultiplierBox 1 7 j = jetTable1_7 j := by + revert j + decide +kernel +lemma jetTable1_7_mem (j : Fin 31) : (jetTable1_7 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨3,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_7_calc] + exact jetMultiplierBox_mem 1 7 j +def jetTable1_8 : Fin 31 → CI := + ![⟨⟨-2086423692049963673523962742551292365386262213133009979881,-2086423692049963673523962742551292365386255554516858552847⟩,⟨1282634781410078705952838503765992793502906217316910816585,1282634781410078705952838503765992793502913967230153992372⟩⟩, + ⟨⟨-309821228664997576873886440619802179862835172130402031904,-309821228664997576873886440619802179862834183366330391197⟩,⟨-104543146008941496628370321122083422107664173291040566609,-104543146008941496628370321122083422107663363487422452104⟩⟩, + ⟨⟨-14097331885368685810125273017835159283638297130821044154,-14097331885368685810125273017835159283638191351812890846⟩,⟨-30398998191010840286341405626357470964429032746551240154,-30398998191010840286341405626357470964428935731123761338⟩⟩, + ⟨⟨678486827920888829963118493212246200826485123566718773,678486827920888829963118493212246200826492357924270490⟩,⟨-2461373076846901276195377538903535233661799060998373370,-2461373076846901276195377538903535233661791205767369649⟩⟩, + ⟨⟨101343256971901935064851127734568530576812054245993882,101343256971901935064851127734568530576812377673094745⟩,⟨-96988315097392655007769492108686340686627846036811781,-96988315097392655007769492108686340686627486971376914⟩⟩, + ⟨⟨4842851291398462609991635821776477773802404075818843,4842851291398462609991635821776477773802419531305200⟩,⟨-2427205991787259121093656207606883746347270270816622,-2427205991787259121093656207606883746347254601632289⟩⟩, + ⟨⟨127148516429470283836793596763454594095326191965706,127148516429470283836793596763454594095326597747778⟩,⟨-69628570985498135899247808873503429913177508650131,-69628570985498135899247808873503429913177121134857⟩⟩, + ⟨⟨1481956017751971377155374957246824385778197091545,1481956017751971377155374957246824385778205091233⟩,⟨-2263888495030810893835686736237245357072119659507,-2263888495030810893835686736237245357072112434521⟩⟩, + ⟨⟨-17711633024379656724959476324031960253116518007,-17711633024379656724959476324031960253116438759⟩,⟨-32098853252845348865783886433945120792024054728,-32098853252845348865783886433945120792023952282⟩⟩, + ⟨⟨-284458965401583766053284977258622890121623973,-284458965401583766053284977258622890121622782⟩,⟨272826708843075931839733436100788520350128370,272826708843075931839733436100788520350129247⟩⟩, + ⟨⟨3682225065721282887914012447402343117519635,3682225065721282887914012447402343117519653⟩,⟨-1351082070812357708281823180485519411517029,-1351082070812357708281823180485519411517016⟩⟩, + ⟨⟨-26274612949740355071022636846531177494579,-26274612949740355071022636846531177494573⟩,⟨37070939264567792994153112096070263969523,37070939264567792994153112096070263969529⟩⟩, + ⟨⟨-716158341908739731652604088018428006897,-716158341908739731652604088018428006890⟩,⟨-414130102957672499872774297636261708745,-414130102957672499872774297636261708740⟩⟩, + ⟨⟨-17670716047538864263718660459923187225,-17670716047538864263718660459923187218⟩,⟨-28265659863682798799245493389733501346,-28265659863682798799245493389733501340⟩⟩, + ⟨⟨-3098743049796752261001860862929579265,-3098743049796752261001860862929579259⟩,⟨-2726009460880054219709367088037442565,-2726009460880054219709367088037442559⟩⟩, + ⟨⟨-1997022356188288102317070919259488097,-1997022356188288102317070919259488090⟩,⟨-3,4⟩⟩, + ⟨⟨-3098743049796752261001860862929579265,-3098743049796752261001860862929579259⟩,⟨2726009460880054219709367088037442561,2726009460880054219709367088037442567⟩⟩, + ⟨⟨-17670716047538864263718660459923187225,-17670716047538864263718660459923187218⟩,⟨28265659863682798799245493389733501342,28265659863682798799245493389733501348⟩⟩, + ⟨⟨-716158341908739731652604088018428006897,-716158341908739731652604088018428006890⟩,⟨414130102957672499872774297636261708742,414130102957672499872774297636261708747⟩⟩, + ⟨⟨-26274612949740355071022636846531177494579,-26274612949740355071022636846531177494573⟩,⟨-37070939264567792994153112096070263969527,-37070939264567792994153112096070263969521⟩⟩, + ⟨⟨3682225065721282887914012447402343117519635,3682225065721282887914012447402343117519653⟩,⟨1351082070812357708281823180485519411517018,1351082070812357708281823180485519411517031⟩⟩, + ⟨⟨-284458965401583766053284977258622890121623973,-284458965401583766053284977258622890121622782⟩,⟨-272826708843075931839733436100788520350129245,-272826708843075931839733436100788520350128368⟩⟩, + ⟨⟨-17711633024379656724959476324031960253116518007,-17711633024379656724959476324031960253116438759⟩,⟨32098853252845348865783886433945120792023952284,32098853252845348865783886433945120792024054730⟩⟩, + ⟨⟨1481956017751971377155374957246824385778197091545,1481956017751971377155374957246824385778205091233⟩,⟨2263888495030810893835686736237245357072112434523,2263888495030810893835686736237245357072119659509⟩⟩, + ⟨⟨127148516429470283836793596763454594095326191965706,127148516429470283836793596763454594095326597747778⟩,⟨69628570985498135899247808873503429913177121134859,69628570985498135899247808873503429913177508650133⟩⟩, + ⟨⟨4842851291398462609991635821776477773802404075818843,4842851291398462609991635821776477773802419531305200⟩,⟨2427205991787259121093656207606883746347254601632291,2427205991787259121093656207606883746347270270816624⟩⟩, + ⟨⟨101343256971901935064851127734568530576812054245993882,101343256971901935064851127734568530576812377673094745⟩,⟨96988315097392655007769492108686340686627486971376916,96988315097392655007769492108686340686627846036811783⟩⟩, + ⟨⟨678486827920888829963118493212246200826485123566718773,678486827920888829963118493212246200826492357924270490⟩,⟨2461373076846901276195377538903535233661791205767369651,2461373076846901276195377538903535233661799060998373372⟩⟩, + ⟨⟨-14097331885368685810125273017835159283638297130821044154,-14097331885368685810125273017835159283638191351812890846⟩,⟨30398998191010840286341405626357470964428935731123761339,30398998191010840286341405626357470964429032746551240156⟩⟩, + ⟨⟨-309821228664997576873886440619802179862835172130402031907,-309821228664997576873886440619802179862834183366330391195⟩,⟨104543146008941496628370321122083422107663363487422452101,104543146008941496628370321122083422107664173291040566612⟩⟩, + ⟨⟨-2086423692049963673523962742551292365386262213133009979865,-2086423692049963673523962742551292365386255554516858552847⟩,⟨-1282634781410078705952838503765992793502913967230153992373,-1282634781410078705952838503765992793502906217316910816603⟩⟩] +lemma jetTable1_8_calc (j : Fin 31) : jetMultiplierBox 1 8 j = jetTable1_8 j := by + revert j + decide +kernel +lemma jetTable1_8_mem (j : Fin 31) : (jetTable1_8 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨4,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_8_calc] + exact jetMultiplierBox_mem 1 8 j +def jetTable1_9 : Fin 31 → CI := + ![⟨⟨-2314187589677726486415961628860172202763863017373109460149,-2314187589677726486415961628860172202763823530120974737635⟩,⟨-8754766656865277804677518708114565241382706679474082620893,-8754766656865277804677518708114565241382671796655058927766⟩⟩, + ⟨⟨781465782525995034725912332797366682979217046643514287083,781465782525995034725912332797366682979222005510114493222⟩,⟨-990365319456163686801064898634344640728230670454549037527,-990365319456163686801064898634344640728225779905370882239⟩⟩, + ⟨⟨135005118694403081534464791605335692123933830286089888929,135005118694403081534464791605335692123934389070727594925⟩,⟨-5183986364539773770281498656690641885350548561994361608,-5183986364539773770281498656690641885349932150523822121⟩⟩, + ⟨⟨8085707041718219730787093227667027930207224734720884258,8085707041718219730787093227667027930207269502239444796⟩,⟨7118464417645250534536790776912440261929655457858279380,7118464417645250534536790776912440261929703243118990396⟩⟩, + ⟨⟨152962140739874225777218696965320908728321032646839971,152962140739874225777218696965320908728323358188471325⟩,⟨600951028055205872330729543317277157901757931801732890,600951028055205872330729543317277157901760187333056062⟩⟩, + ⟨⟨-2898103033753099553791750074250742509417581005059201,-2898103033753099553791750074250742509417469494037891⟩,⟨24944288096394930845651874338125150974591145985898360,24944288096394930845651874338125150974591251484315038⟩⟩, + ⟨⟨-105774106893404158111074691776528075322195704220470,-105774106893404158111074691776528075322192707347812⟩,⟨697063073232616907570698011447731822329666474954637,697063073232616907570698011447731822329669352213588⟩⟩, + ⟨⟨3581570339192280539686179674161846692310264486583,3581570339192280539686179674161846692310322678603⟩,⟨13332176923842975959381148582321331273843328294785,13332176923842975959381148582321331273843388657185⟩⟩, + ⟨⟨186815342734641756618449084114238986770513906870,186815342734641756618449084114238986770514633262⟩,⟨59423770587346012357810596849752999288664692829,59423770587346012357810596849752999288665458029⟩⟩, + ⟨⟨302822949379089299354575420293024430349499631,302822949379089299354575420293024430349508561⟩,⟨-2183956063562205894717068121482125592450459415,-2183956063562205894717068121482125592450450803⟩⟩, + ⟨⟨-13805805953749130533213544852168169732244663,-13805805953749130533213544852168169732244538⟩,⟨18248388959127621819999053512711863692472105,18248388959127621819999053512711863692472215⟩⟩, + ⟨⟨40860984197019801358431210682981954015354,40860984197019801358431210682981954015388⟩,⟨-272159836867254604341443747082004653424500,-272159836867254604341443747082004653424465⟩⟩, + ⟨⟨5098711943548373609208232706924209170850,5098711943548373609208232706924209170887⟩,⟨859476752114658460195396386767605965292,859476752114658460195396386767605965322⟩⟩, + ⟨⟨153107142497292310718992947505889566803,153107142497292310718992947505889566842⟩,⟨148614859975966041776252050719290414314,148614859975966041776252050719290414349⟩⟩, + ⟨⟨22136224302680222597278963664023686806,22136224302680222597278963664023686837⟩,⟨15132755863377583451848745842777390154,15132755863377583451848745842777390184⟩⟩, + ⟨⟨13040869449374133496946307783451395707,13040869449374133496946307783451395743⟩,⟨-15,21⟩⟩, + ⟨⟨22136224302680222597278963664023686806,22136224302680222597278963664023686837⟩,⟨-15132755863377583451848745842777390184,-15132755863377583451848745842777390154⟩⟩, + ⟨⟨153107142497292310718992947505889566803,153107142497292310718992947505889566842⟩,⟨-148614859975966041776252050719290414349,-148614859975966041776252050719290414314⟩⟩, + ⟨⟨5098711943548373609208232706924209170850,5098711943548373609208232706924209170887⟩,⟨-859476752114658460195396386767605965322,-859476752114658460195396386767605965292⟩⟩, + ⟨⟨40860984197019801358431210682981954015354,40860984197019801358431210682981954015388⟩,⟨272159836867254604341443747082004653424465,272159836867254604341443747082004653424500⟩⟩, + ⟨⟨-13805805953749130533213544852168169732244663,-13805805953749130533213544852168169732244538⟩,⟨-18248388959127621819999053512711863692472215,-18248388959127621819999053512711863692472105⟩⟩, + ⟨⟨302822949379089299354575420293024430349499631,302822949379089299354575420293024430349508561⟩,⟨2183956063562205894717068121482125592450450803,2183956063562205894717068121482125592450459415⟩⟩, + ⟨⟨186815342734641756618449084114238986770513906870,186815342734641756618449084114238986770514633262⟩,⟨-59423770587346012357810596849752999288665458029,-59423770587346012357810596849752999288664692829⟩⟩, + ⟨⟨3581570339192280539686179674161846692310264486583,3581570339192280539686179674161846692310322678603⟩,⟨-13332176923842975959381148582321331273843388657185,-13332176923842975959381148582321331273843328294785⟩⟩, + ⟨⟨-105774106893404158111074691776528075322195704220470,-105774106893404158111074691776528075322192707347812⟩,⟨-697063073232616907570698011447731822329669352213588,-697063073232616907570698011447731822329666474954637⟩⟩, + ⟨⟨-2898103033753099553791750074250742509417581005059201,-2898103033753099553791750074250742509417469494037891⟩,⟨-24944288096394930845651874338125150974591251484315038,-24944288096394930845651874338125150974591145985898360⟩⟩, + ⟨⟨152962140739874225777218696965320908728321032646839971,152962140739874225777218696965320908728323358188471325⟩,⟨-600951028055205872330729543317277157901760187333056062,-600951028055205872330729543317277157901757931801732890⟩⟩, + ⟨⟨8085707041718219730787093227667027930207224734720884258,8085707041718219730787093227667027930207269502239444796⟩,⟨-7118464417645250534536790776912440261929703243118990396,-7118464417645250534536790776912440261929655457858279380⟩⟩, + ⟨⟨135005118694403081534464791605335692123933830286089888925,135005118694403081534464791605335692123934389070727594925⟩,⟨5183986364539773770281498656690641885349932150523822121,5183986364539773770281498656690641885350548561994361609⟩⟩, + ⟨⟨781465782525995034725912332797366682979217046643514287061,781465782525995034725912332797366682979222005510114493230⟩,⟨990365319456163686801064898634344640728225779905370882230,990365319456163686801064898634344640728230670454549037544⟩⟩, + ⟨⟨-2314187589677726486415961628860172202763863017373109460160,-2314187589677726486415961628860172202763823530120974737722⟩,⟨8754766656865277804677518708114565241382671796655058927788,8754766656865277804677518708114565241382706679474082620839⟩⟩] +lemma jetTable1_9_calc (j : Fin 31) : jetMultiplierBox 1 9 j = jetTable1_9 j := by + revert j + decide +kernel +lemma jetTable1_9_mem (j : Fin 31) : (jetTable1_9 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨4,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_9_calc] + exact jetMultiplierBox_mem 1 9 j +def jetTable1_10 : Fin 31 → CI := + ![⟨⟨652273877089567882101546438751504843015820850907722569354,652273877089567882101546438751504843015826517415550910690⟩,⟨489929883909097603784739441498344460761173173729254801845,489929883909097603784739441498344460761177063798052832227⟩⟩, + ⟨⟨-12577117798749566757163418559191580144217798109301445380,-12577117798749566757163418559191580144217436296716723422⟩,⟨53326649509296507594954126441737861710195439407265504449,53326649509296507594954126441737861710195862823586989705⟩⟩, + ⟨⟨-2491888364872298064140185422062132991023203162159221512,-2491888364872298064140185422062132991023183376437844212⟩,⟨687971110669856288112884673938937183133152619823313265,687971110669856288112884673938937183133173142658014859⟩⟩, + ⟨⟨-65117125857971428328099367098810599737933987297787981,-65117125857971428328099367098810599737933470264430852⟩,⟨-50048524892068435033348646947229457722256640938663216,-50048524892068435033348646947229457722256217695877573⟩⟩, + ⟨⟨-354829958389448542957748530158324099645102156149725,-354829958389448542957748530158324099645088816668970⟩,⟨-1648888518848739355436364408021505672546473510832801,-1648888518848739355436364408021505672546460418572854⟩⟩, + ⟨⟨3675645770294238741900103847690087911174308473108,3675645770294238741900103847690087911174476922813⟩,⟨-21328145768823987772500652943617890018174358592730,-21328145768823987772500652943617890018174189246145⟩⟩, + ⟨⟨17775109068239118174728595525926354653936408033,17775109068239118174728595525926354653937759672⟩,⟨-169364192705814002280943343220493459392067500623,-169364192705814002280943343220493459392066155852⟩⟩, + ⟨⟨-446247698892140763695304591288047530920405919,-446247698892140763695304591288047530920401149⟩,⟨-698601552587298145226409125520044259223683663,-698601552587298145226409125520044259223678108⟩⟩, + ⟨⟨-2354871410441718798707642205027074181127537,-2354871410441718798707642205027074181127510⟩,⟨1179175950428653113721608775314713768969861,1179175950428653113721608775314713768969884⟩⟩, + ⟨⟨6013058632917304137818471229934691807745,6013058632917304137818471229934691807754⟩,⟨1295288732619344763579776696421599727816,1295288732619344763579776696421599727823⟩⟩, + ⟨⟨-12353584532151588424760709375629471187,-12353584532151588424760709375629471178⟩,⟨3964316422602054834439606941051437793,3964316422602054834439606941051437802⟩⟩, + ⟨⟨-19464155316792042908454568776447389,-19464155316792042908454568776447381⟩,⟨-27347973229591649337387709372082962,-27347973229591649337387709372082953⟩⟩, + ⟨⟨-110932197071557548075502577388294,-110932197071557548075502577388285⟩,⟨-113954351776733987971742866039554,-113954351776733987971742866039545⟩⟩, + ⟨⟨-1697899713286477722854830075067,-1697899713286477722854830075060⟩,⟨1365501473897559527214468688353,1365501473897559527214468688362⟩⟩, + ⟨⟨133586740617017063577682616539,133586740617017063577682616548⟩,⟨-6823157264249278345039753402,-6823157264249278345039753393⟩⟩, + ⟨⟨-50723721066900475157731611656,-50723721066900475157731611645⟩,⟨-5,6⟩⟩, + ⟨⟨133586740617017063577682616539,133586740617017063577682616548⟩,⟨6823157264249278345039753395,6823157264249278345039753404⟩⟩, + ⟨⟨-1697899713286477722854830075067,-1697899713286477722854830075060⟩,⟨-1365501473897559527214468688360,-1365501473897559527214468688351⟩⟩, + ⟨⟨-110932197071557548075502577388294,-110932197071557548075502577388285⟩,⟨113954351776733987971742866039547,113954351776733987971742866039556⟩⟩, + ⟨⟨-19464155316792042908454568776447389,-19464155316792042908454568776447381⟩,⟨27347973229591649337387709372082955,27347973229591649337387709372082964⟩⟩, + ⟨⟨-12353584532151588424760709375629471187,-12353584532151588424760709375629471178⟩,⟨-3964316422602054834439606941051437800,-3964316422602054834439606941051437791⟩⟩, + ⟨⟨6013058632917304137818471229934691807745,6013058632917304137818471229934691807754⟩,⟨-1295288732619344763579776696421599727821,-1295288732619344763579776696421599727814⟩⟩, + ⟨⟨-2354871410441718798707642205027074181127537,-2354871410441718798707642205027074181127510⟩,⟨-1179175950428653113721608775314713768969882,-1179175950428653113721608775314713768969859⟩⟩, + ⟨⟨-446247698892140763695304591288047530920405919,-446247698892140763695304591288047530920401149⟩,⟨698601552587298145226409125520044259223678110,698601552587298145226409125520044259223683665⟩⟩, + ⟨⟨17775109068239118174728595525926354653936408033,17775109068239118174728595525926354653937759672⟩,⟨169364192705814002280943343220493459392066155854,169364192705814002280943343220493459392067500625⟩⟩, + ⟨⟨3675645770294238741900103847690087911174308473108,3675645770294238741900103847690087911174476922813⟩,⟨21328145768823987772500652943617890018174189246147,21328145768823987772500652943617890018174358592732⟩⟩, + ⟨⟨-354829958389448542957748530158324099645102156149725,-354829958389448542957748530158324099645088816668970⟩,⟨1648888518848739355436364408021505672546460418572856,1648888518848739355436364408021505672546473510832803⟩⟩, + ⟨⟨-65117125857971428328099367098810599737933987297787981,-65117125857971428328099367098810599737933470264430852⟩,⟨50048524892068435033348646947229457722256217695877575,50048524892068435033348646947229457722256640938663218⟩⟩, + ⟨⟨-2491888364872298064140185422062132991023203162159221512,-2491888364872298064140185422062132991023183376437844212⟩,⟨-687971110669856288112884673938937183133173142658014857,-687971110669856288112884673938937183133152619823313263⟩⟩, + ⟨⟨-12577117798749566757163418559191580144217798109301445380,-12577117798749566757163418559191580144217436296716723422⟩,⟨-53326649509296507594954126441737861710195862823586989703,-53326649509296507594954126441737861710195439407265504447⟩⟩, + ⟨⟨652273877089567882101546438751504843015820850907722569352,652273877089567882101546438751504843015826517415550910700⟩,⟨-489929883909097603784739441498344460761177063798052832225,-489929883909097603784739441498344460761173173729254801832⟩⟩] +lemma jetTable1_10_calc (j : Fin 31) : jetMultiplierBox 1 10 j = jetTable1_10 j := by + revert j + decide +kernel +lemma jetTable1_10_mem (j : Fin 31) : (jetTable1_10 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨5,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_10_calc] + exact jetMultiplierBox_mem 1 10 j +def jetTable1_11 : Fin 31 → CI := + ![⟨⟨-1203931754459745907649538528515490554903975310954812948361,-1203931754459745907649538528515490554903948210597272477895⟩,⟨2707516978304943444300688180895633266415932688750945520817,2707516978304943444300688180895633266415962462570206291032⟩⟩, + ⟨⟨-201132487267919680080418221172681563018377484428240202161,-201132487267919680080418221172681563018375566231690012793⟩,⟨-14550034644020921903019442314549933323968884375573692270,-14550034644020921903019442314549933323966609219667285430⟩⟩, + ⟨⟨-3370887470816820634344127063022547584798832031868944205,-3370887470816820634344127063022547584798715923129753553⟩,⟨-9046124351991957152653088795595106915022609166503323085,-9046124351991957152653088795595106915022519678748916867⟩⟩, + ⟨⟨187663072506756724741186831271714051862882275903646498,187663072506756724741186831271714051862884769927195086⟩,⟨-248757809363497390978870400692188191405150380428723218,-248757809363497390978870400692188191405147735234930191⟩⟩, + ⟨⟨6450902099829845801141614128772386062589790255164700,6450902099829845801141614128772386062589849312708631⟩,⟨-881072472291575969905963806633802618897128392017831,-881072472291575969905963806633802618897051153661196⟩⟩, + ⟨⟨80257735787707099034627792574333840741915664339729,80257735787707099034627792574333840741916481410380⟩,⟨28352418875045255377609286730407586336862463051455,28352418875045255377609286730407586336863513256806⟩⟩, + ⟨⟨635934507252354238714440421738287800935060831753,635934507252354238714440421738287800935067714905⟩,⟨249825313461681277455617884390629093776555041245,249825313461681277455617884390629093776563970401⟩⟩, + ⟨⟨3336011704462022085619265042296398494725589208,3336011704462022085619265042296398494725623545⟩,⟨-638529153165427601223062367014912832879634229,-638529153165427601223062367014912832879598315⟩⟩, + ⟨⟨373748186702027714925554115568283642537072,373748186702027714925554115568283642537233⟩,⟨-11021596246789299296730561048030541091646078,-11021596246789299296730561048030541091645926⟩⟩, + ⟨⟨-19581370826150872305891784895529424844465,-19581370826150872305891784895529424844427⟩,⟨17597567152266996442065113526883113193858,17597567152266996442065113526883113193897⟩⟩, + ⟨⟨24882269170004684732912519095744960699,24882269170004684732912519095744960744⟩,⟨-50978257690005430007823280871416725127,-50978257690005430007823280871416725082⟩⟩, + ⟨⟨143295465895033713892347126573246717,143295465895033713892347126573246759⟩,⟨43305560252071735537160183196109461,43305560252071735537160183196109504⟩⟩, + ⟨⟨690067616305695302749542143932627,690067616305695302749542143932672⟩,⟨210498976003535800155956462187354,210498976003535800155956462187399⟩⟩, + ⟨⟨5269029124715485277628043741583,5269029124715485277628043741616⟩,⟨-8519042030680595664054976695173,-8519042030680595664054976695134⟩⟩, + ⟨⟨-604913850677686760351706988908,-604913850677686760351706988869⟩,⟨136664109338513289516308352666,136664109338513289516308352705⟩⟩, + ⟨⟨235856478350675740409748253297,235856478350675740409748253342⟩,⟨-20,25⟩⟩, + ⟨⟨-604913850677686760351706988908,-604913850677686760351706988869⟩,⟨-136664109338513289516308352705,-136664109338513289516308352666⟩⟩, + ⟨⟨5269029124715485277628043741583,5269029124715485277628043741616⟩,⟨8519042030680595664054976695134,8519042030680595664054976695173⟩⟩, + ⟨⟨690067616305695302749542143932627,690067616305695302749542143932672⟩,⟨-210498976003535800155956462187399,-210498976003535800155956462187354⟩⟩, + ⟨⟨143295465895033713892347126573246717,143295465895033713892347126573246759⟩,⟨-43305560252071735537160183196109504,-43305560252071735537160183196109461⟩⟩, + ⟨⟨24882269170004684732912519095744960699,24882269170004684732912519095744960744⟩,⟨50978257690005430007823280871416725082,50978257690005430007823280871416725127⟩⟩, + ⟨⟨-19581370826150872305891784895529424844465,-19581370826150872305891784895529424844427⟩,⟨-17597567152266996442065113526883113193897,-17597567152266996442065113526883113193858⟩⟩, + ⟨⟨373748186702027714925554115568283642537072,373748186702027714925554115568283642537233⟩,⟨11021596246789299296730561048030541091645926,11021596246789299296730561048030541091646078⟩⟩, + ⟨⟨3336011704462022085619265042296398494725589208,3336011704462022085619265042296398494725623545⟩,⟨638529153165427601223062367014912832879598315,638529153165427601223062367014912832879634229⟩⟩, + ⟨⟨635934507252354238714440421738287800935060831753,635934507252354238714440421738287800935067714905⟩,⟨-249825313461681277455617884390629093776563970401,-249825313461681277455617884390629093776555041245⟩⟩, + ⟨⟨80257735787707099034627792574333840741915664339729,80257735787707099034627792574333840741916481410380⟩,⟨-28352418875045255377609286730407586336863513256806,-28352418875045255377609286730407586336862463051455⟩⟩, + ⟨⟨6450902099829845801141614128772386062589790255164700,6450902099829845801141614128772386062589849312708631⟩,⟨881072472291575969905963806633802618897051153661196,881072472291575969905963806633802618897128392017831⟩⟩, + ⟨⟨187663072506756724741186831271714051862882275903646498,187663072506756724741186831271714051862884769927195086⟩,⟨248757809363497390978870400692188191405147735234930191,248757809363497390978870400692188191405150380428723218⟩⟩, + ⟨⟨-3370887470816820634344127063022547584798832031868944205,-3370887470816820634344127063022547584798715923129753553⟩,⟨9046124351991957152653088795595106915022519678748916867,9046124351991957152653088795595106915022609166503323085⟩⟩, + ⟨⟨-201132487267919680080418221172681563018377484428240202161,-201132487267919680080418221172681563018375566231690012793⟩,⟨14550034644020921903019442314549933323966609219667285430,14550034644020921903019442314549933323968884375573692270⟩⟩, + ⟨⟨-1203931754459745907649538528515490554903975310954812948363,-1203931754459745907649538528515490554903948210597272477848⟩,⟨-2707516978304943444300688180895633266415962462570206291067,-2707516978304943444300688180895633266415932688750945520801⟩⟩] +lemma jetTable1_11_calc (j : Fin 31) : jetMultiplierBox 1 11 j = jetTable1_11 j := by + revert j + decide +kernel +lemma jetTable1_11_mem (j : Fin 31) : (jetTable1_11 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨5,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_11_calc] + exact jetMultiplierBox_mem 1 11 j +def jetTable1_12 : Fin 31 → CI := + ![⟨⟨-176676625908632104266358797817813265550552223996233504914,-176676625908632104266358797817813265550549983423579397293⟩,⟨-302845740601204635700156857951291332499950069717504854596,-302845740601204635700156857951291332499948123219105257961⟩⟩, + ⟨⟨12404518708626597580670556300086178811400546343071475161,12404518708626597580670556300086178811400626071370806930⟩,⟨-14031129230265978647430345545592810567690091795185042811,-14031129230265978647430345545592810567689985575975471473⟩⟩, + ⟨⟨649974007976025136732840086632411703356890309930384380,649974007976025136732840086632411703356894487546763429⟩,⟨207613328228846878330490018619167613958981416034221893,207613328228846878330490018619167613958985045649428652⟩⟩, + ⟨⟨4212279218958257854645591563400489239068784319665367,4212279218958257854645591563400489239068888256800036⟩,⟨15637204412106128459993257147395243131960304740007419,15637204412106128459993257147395243131960405245932827⟩⟩, + ⟨⟨-113903316655507944175664976648232525533507362316063,-113903316655507944175664976648232525533506108064695⟩,⟨210764630766457376483115912768589686057704555665837,210764630766457376483115912768589686057705910325734⟩⟩, + ⟨⟨-1675837834408567147370150888759942822475787031678,-1675837834408567147370150888759942822475776260460⟩,⟨1313513903054754669055028691592553914968084323704,1313513903054754669055028691592553914968095330275⟩⟩, + ⟨⟨-8221387907232204887171441853639483991201142849,-8221387907232204887171441853639483991201089999⟩,⟨7518454001247603356796769831705049036104918215,7518454001247603356796769831705049036104967197⟩⟩, + ⟨⟨-3323670806347083526172778026129539932015707,-3323670806347083526172778026129539932015478⟩,⟨34488949142310550036844398618003981033838662,34488949142310550036844398618003981033838890⟩⟩, + ⟨⟨67700112080939407361755656253676899790300,67700112080939407361755656253676899790307⟩,⟨4929435694014915452878549651309615992105,4929435694014915452878549651309615992112⟩⟩, + ⟨⟨-81854044994799598762617081292931264756,-81854044994799598762617081292931264748⟩,⟨-48814256983784636351870439309634239467,-48814256983784636351870439309634239459⟩⟩, + ⟨⟨114615824094799938047128298002958375,114615824094799938047128298002958383⟩,⟨-35054338122857758828454861496091577,-35054338122857758828454861496091569⟩⟩, + ⟨⟨161320065508213908164082997717204,161320065508213908164082997717212⟩,⟨96817359579158067033378293206411,96817359579158067033378293206419⟩⟩, + ⟨⟨562092914451876159350258814013,562092914451876159350258814021⟩,⟨-88891453236343946680664218716,-88891453236343946680664218708⟩⟩, + ⟨⟨-3575360411763121029687728206,-3575360411763121029687728198⟩,⟨-4102514577354699456671266216,-4102514577354699456671266209⟩⟩, + ⟨⟨195505175709268332977371225,195505175709268332977371232⟩,⟨178032686075113842843263032,178032686075113842843263040⟩⟩, + ⟨⟨-92446935917358946380866829,-92446935917358946380866819⟩,⟨-5,6⟩⟩, + ⟨⟨195505175709268332977371225,195505175709268332977371232⟩,⟨-178032686075113842843263038,-178032686075113842843263030⟩⟩, + ⟨⟨-3575360411763121029687728206,-3575360411763121029687728198⟩,⟨4102514577354699456671266211,4102514577354699456671266218⟩⟩, + ⟨⟨562092914451876159350258814013,562092914451876159350258814021⟩,⟨88891453236343946680664218710,88891453236343946680664218718⟩⟩, + ⟨⟨161320065508213908164082997717204,161320065508213908164082997717212⟩,⟨-96817359579158067033378293206417,-96817359579158067033378293206409⟩⟩, + ⟨⟨114615824094799938047128298002958375,114615824094799938047128298002958383⟩,⟨35054338122857758828454861496091571,35054338122857758828454861496091579⟩⟩, + ⟨⟨-81854044994799598762617081292931264756,-81854044994799598762617081292931264748⟩,⟨48814256983784636351870439309634239461,48814256983784636351870439309634239469⟩⟩, + ⟨⟨67700112080939407361755656253676899790300,67700112080939407361755656253676899790307⟩,⟨-4929435694014915452878549651309615992110,-4929435694014915452878549651309615992103⟩⟩, + ⟨⟨-3323670806347083526172778026129539932015707,-3323670806347083526172778026129539932015478⟩,⟨-34488949142310550036844398618003981033838888,-34488949142310550036844398618003981033838660⟩⟩, + ⟨⟨-8221387907232204887171441853639483991201142849,-8221387907232204887171441853639483991201089999⟩,⟨-7518454001247603356796769831705049036104967195,-7518454001247603356796769831705049036104918213⟩⟩, + ⟨⟨-1675837834408567147370150888759942822475787031678,-1675837834408567147370150888759942822475776260460⟩,⟨-1313513903054754669055028691592553914968095330273,-1313513903054754669055028691592553914968084323702⟩⟩, + ⟨⟨-113903316655507944175664976648232525533507362316063,-113903316655507944175664976648232525533506108064695⟩,⟨-210764630766457376483115912768589686057705910325732,-210764630766457376483115912768589686057704555665835⟩⟩, + ⟨⟨4212279218958257854645591563400489239068784319665367,4212279218958257854645591563400489239068888256800036⟩,⟨-15637204412106128459993257147395243131960405245932825,-15637204412106128459993257147395243131960304740007417⟩⟩, + ⟨⟨649974007976025136732840086632411703356890309930384380,649974007976025136732840086632411703356894487546763429⟩,⟨-207613328228846878330490018619167613958985045649428650,-207613328228846878330490018619167613958981416034221891⟩⟩, + ⟨⟨12404518708626597580670556300086178811400546343071475160,12404518708626597580670556300086178811400626071370806929⟩,⟨14031129230265978647430345545592810567689985575975471476,14031129230265978647430345545592810567690091795185042814⟩⟩, + ⟨⟨-176676625908632104266358797817813265550552223996233504917,-176676625908632104266358797817813265550549983423579397294⟩,⟨302845740601204635700156857951291332499948123219105257962,302845740601204635700156857951291332499950069717504854598⟩⟩] +lemma jetTable1_12_calc (j : Fin 31) : jetMultiplierBox 1 12 j = jetTable1_12 j := by + revert j + decide +kernel +lemma jetTable1_12_mem (j : Fin 31) : (jetTable1_12 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨6,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_12_calc] + exact jetMultiplierBox_mem 1 12 j +def jetTable1_13 : Fin 31 → CI := + ![⟨⟨1514607348181413885095687970060375171204082034057253210462,1514607348181413885095687970060375171204097011837085668822⟩,⟨133078987123702299205938659178831289598488475036162184862,133078987123702299205938659178831289598505524891876260671⟩⟩, + ⟨⟨17078048737494143930635398803562111073064635912803288089,17078048737494143930635398803562111073065413639754643696⟩,⟨83433596223434875969451381635804523698094836051547791087,83433596223434875969451381635804523698095612718563457755⟩⟩, + ⟨⟨-2717215886319619826992433058089880349388684112131423057,-2717215886319619826992433058089880349388649003168599980⟩,⟨1796770562673335530258925416783392312174052791831401758,1796770562673335530258925416783392312174082102359495409⟩⟩, + ⟨⟨-73159329786639582091851067886563780513881563997777542,-73159329786639582091851067886563780513880782359282691⟩,⟨-35368369173108604596354247379332576614689818192358800,-35368369173108604596354247379332576614688874743735819⟩⟩, + ⟨⟨-399837472253973951717567785493208558551711302090643,-399837472253973951717567785493208558551699962083835⟩,⟨-1199662390552450755586348249886800384515061979136458,-1199662390552450755586348249886800384515049305948137⟩⟩, + ⟨⟨1575887000504465545328533282965349490021844341059,1575887000504465545328533282965349490021953350541⟩,⟨-11723722498464518420708994127139335526539939451092,-11723722498464518420708994127139335526539835493617⟩⟩, + ⟨⟨6993917752009137577621862158856149881966504911,6993917752009137577621862158856149881967041350⟩,⟨-64776846062226332870460648969245314784531856864,-64776846062226332870460648969245314784531332284⟩⟩, + ⟨⟨-115198296755109790805797547621979917415231154,-115198296755109790805797547621979917415229148⟩,⟨-179408413118121317646390001833910233671663144,-179408413118121317646390001833910233671660702⟩⟩, + ⟨⟨-378201498521878792572411104939938950755722,-378201498521878792572411104939938950755674⟩,⟨222818333830989305444243798167751755429238,222818333830989305444243798167751755429284⟩⟩, + ⟨⟨646250889263026234506843406587810822908,646250889263026234506843406587810822965⟩,⟨663900271449751289470509550264812397,663900271449751289470509550264812455⟩⟩, + ⟨⟨-616586243755585245484888767123164490,-616586243755585245484888767123164431⟩,⟨584054532947066716925614683126745884,584054532947066716925614683126745943⟩⟩, + ⟨⟨-1368424334350185150622214542425426,-1368424334350185150622214542425367⟩,⟨-222263377209492776232396767947088,-222263377209492776232396767947029⟩⟩, + ⟨⟨-3905064618562114025955878639203,-3905064618562114025955878639144⟩,⟨1876975712645444382405445090796,1876975712645444382405445090855⟩⟩, + ⟨⟨33642988378117883652636401828,33642988378117883652636401884⟩,⟨25920255679061273240750076710,25920255679061273240750076760⟩⟩, + ⟨⟨-1682436834366440218119472466,-1682436834366440218119472419⟩,⟨-1249661837373725879407181183,-1249661837373725879407181130⟩⟩, + ⟨⟨736591054913210513589183652,736591054913210513589183719⟩,⟨-33,41⟩⟩, + ⟨⟨-1682436834366440218119472466,-1682436834366440218119472419⟩,⟨1249661837373725879407181130,1249661837373725879407181183⟩⟩, + ⟨⟨33642988378117883652636401828,33642988378117883652636401884⟩,⟨-25920255679061273240750076760,-25920255679061273240750076710⟩⟩, + ⟨⟨-3905064618562114025955878639203,-3905064618562114025955878639144⟩,⟨-1876975712645444382405445090855,-1876975712645444382405445090796⟩⟩, + ⟨⟨-1368424334350185150622214542425426,-1368424334350185150622214542425367⟩,⟨222263377209492776232396767947029,222263377209492776232396767947088⟩⟩, + ⟨⟨-616586243755585245484888767123164490,-616586243755585245484888767123164431⟩,⟨-584054532947066716925614683126745943,-584054532947066716925614683126745884⟩⟩, + ⟨⟨646250889263026234506843406587810822908,646250889263026234506843406587810822965⟩,⟨-663900271449751289470509550264812455,-663900271449751289470509550264812397⟩⟩, + ⟨⟨-378201498521878792572411104939938950755722,-378201498521878792572411104939938950755674⟩,⟨-222818333830989305444243798167751755429284,-222818333830989305444243798167751755429238⟩⟩, + ⟨⟨-115198296755109790805797547621979917415231154,-115198296755109790805797547621979917415229148⟩,⟨179408413118121317646390001833910233671660702,179408413118121317646390001833910233671663144⟩⟩, + ⟨⟨6993917752009137577621862158856149881966504911,6993917752009137577621862158856149881967041350⟩,⟨64776846062226332870460648969245314784531332284,64776846062226332870460648969245314784531856864⟩⟩, + ⟨⟨1575887000504465545328533282965349490021844341059,1575887000504465545328533282965349490021953350541⟩,⟨11723722498464518420708994127139335526539835493617,11723722498464518420708994127139335526539939451092⟩⟩, + ⟨⟨-399837472253973951717567785493208558551711302090643,-399837472253973951717567785493208558551699962083835⟩,⟨1199662390552450755586348249886800384515049305948137,1199662390552450755586348249886800384515061979136458⟩⟩, + ⟨⟨-73159329786639582091851067886563780513881563997777542,-73159329786639582091851067886563780513880782359282691⟩,⟨35368369173108604596354247379332576614688874743735819,35368369173108604596354247379332576614689818192358800⟩⟩, + ⟨⟨-2717215886319619826992433058089880349388684112131423057,-2717215886319619826992433058089880349388649003168599980⟩,⟨-1796770562673335530258925416783392312174082102359495409,-1796770562673335530258925416783392312174052791831401758⟩⟩, + ⟨⟨17078048737494143930635398803562111073064635912803288095,17078048737494143930635398803562111073065413639754643703⟩,⟨-83433596223434875969451381635804523698095612718563457754,-83433596223434875969451381635804523698094836051547791085⟩⟩, + ⟨⟨1514607348181413885095687970060375171204082034057253210460,1514607348181413885095687970060375171204097011837085668829⟩,⟨-133078987123702299205938659178831289598505524891876260668,-133078987123702299205938659178831289598488475036162184848⟩⟩] +lemma jetTable1_13_calc (j : Fin 31) : jetMultiplierBox 1 13 j = jetTable1_13 j := by + revert j + decide +kernel +lemma jetTable1_13_mem (j : Fin 31) : (jetTable1_13 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨6,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_13_calc] + exact jetMultiplierBox_mem 1 13 j +def jetTable1_14 : Fin 31 → CI := + ![⟨⟨-3073797789058066491429634831371235667734792597945454164,-3073797789058066491429634831371235667734790931758399829⟩,⟨3901465931128540882024751850308760074627539974350546683,3901465931128540882024751850308760074627542359147164288⟩⟩, + ⟨⟨-107832383457712254446035764449057972792539260562100934,-107832383457712254446035764449057972792539200191993727⟩,⟨-78643486622479427651885277864699960647095636752073414,-78643486622479427651885277864699960647095594122344011⟩⟩, + ⟨⟨1021933871949547362422951232781799270814115744365445,1021933871949547362422951232781799270814116623343351⟩,⟨-1991920114345883721015914998943840937272852984610269,-1991920114345883721015914998943840937272851904866525⟩⟩, + ⟨⟨21987493772289674909247265761099895471768242360339,21987493772289674909247265761099895471768254278930⟩,⟨2722443578405549508412112308452322441020897235795,2722443578405549508412112308452322441020908588139⟩⟩, + ⟨⟨61281913120845125235852146235821056440728173484,61281913120845125235852146235821056440728234643⟩,⟨106082271727811343326447547954161762601912268527,106082271727811343326447547954161762601912326035⟩⟩, + ⟨⟨10678160007265573636212181943500606654408625,10678160007265573636212181943500606654408825⟩,⟨361642943991174805439502007905331167263180199,361642943991174805439502007905331167263180399⟩⟩, + ⟨⟨75017913759843467159499347784979100289882,75017913759843467159499347784979100289887⟩,⟨551530750063335763426642925314271159621820,551530750063335763426642925314271159621824⟩⟩, + ⟨⟨392052356679975743238582167300520528424,392052356679975743238582167300520528429⟩,⟨223860338538073370523327376542206197621,223860338538073370523327376542206197626⟩⟩, + ⟨⟨23314168482356373624456141269262849,23314168482356373624456141269262853⟩,⟨-206070618484043788542629662638882932,-206070618484043788542629662638882928⟩⟩, + ⟨⟨3563229331456411288189221686617,3563229331456411288189221686621⟩,⟨63154657583191944890720798231250,63154657583191944890720798231254⟩⟩, + ⟨⟨-16313442972816493277255389105,-16313442972816493277255389101⟩,⟨4264048840565740387245386591,4264048840565740387245386595⟩⟩, + ⟨⟨-4541690506221878750746733,-4541690506221878750746728⟩,⟨3783676520586736368050086,3783676520586736368050090⟩⟩, + ⟨⟨4620500704685909620220,4620500704685909620224⟩,⟨546385232809858227461,546385232809858227466⟩⟩, + ⟨⟨-10148495156417426013,-10148495156417426009⟩,⟨11218713531638116561,11218713531638116565⟩⟩, + ⟨⟨-364266998290888105,-364266998290888101⟩,⟨12342329612185524,12342329612185529⟩⟩, + ⟨⟨-99865664973370141,-99865664973370136⟩,⟨-2,3⟩⟩, + ⟨⟨-364266998290888105,-364266998290888101⟩,⟨-12342329612185527,-12342329612185522⟩⟩, + ⟨⟨-10148495156417426013,-10148495156417426009⟩,⟨-11218713531638116563,-11218713531638116559⟩⟩, + ⟨⟨4620500704685909620220,4620500704685909620224⟩,⟨-546385232809858227464,-546385232809858227459⟩⟩, + ⟨⟨-4541690506221878750746733,-4541690506221878750746728⟩,⟨-3783676520586736368050088,-3783676520586736368050084⟩⟩, + ⟨⟨-16313442972816493277255389105,-16313442972816493277255389101⟩,⟨-4264048840565740387245386593,-4264048840565740387245386589⟩⟩, + ⟨⟨3563229331456411288189221686617,3563229331456411288189221686621⟩,⟨-63154657583191944890720798231252,-63154657583191944890720798231248⟩⟩, + ⟨⟨23314168482356373624456141269262849,23314168482356373624456141269262853⟩,⟨206070618484043788542629662638882930,206070618484043788542629662638882934⟩⟩, + ⟨⟨392052356679975743238582167300520528424,392052356679975743238582167300520528429⟩,⟨-223860338538073370523327376542206197624,-223860338538073370523327376542206197619⟩⟩, + ⟨⟨75017913759843467159499347784979100289882,75017913759843467159499347784979100289887⟩,⟨-551530750063335763426642925314271159621822,-551530750063335763426642925314271159621818⟩⟩, + ⟨⟨10678160007265573636212181943500606654408625,10678160007265573636212181943500606654408825⟩,⟨-361642943991174805439502007905331167263180397,-361642943991174805439502007905331167263180197⟩⟩, + ⟨⟨61281913120845125235852146235821056440728173484,61281913120845125235852146235821056440728234643⟩,⟨-106082271727811343326447547954161762601912326033,-106082271727811343326447547954161762601912268525⟩⟩, + ⟨⟨21987493772289674909247265761099895471768242360339,21987493772289674909247265761099895471768254278930⟩,⟨-2722443578405549508412112308452322441020908588137,-2722443578405549508412112308452322441020897235793⟩⟩, + ⟨⟨1021933871949547362422951232781799270814115744365445,1021933871949547362422951232781799270814116623343351⟩,⟨1991920114345883721015914998943840937272851904866527,1991920114345883721015914998943840937272852984610271⟩⟩, + ⟨⟨-107832383457712254446035764449057972792539260562100934,-107832383457712254446035764449057972792539200191993727⟩,⟨78643486622479427651885277864699960647095594122344013,78643486622479427651885277864699960647095636752073416⟩⟩, + ⟨⟨-3073797789058066491429634831371235667734792597945454164,-3073797789058066491429634831371235667734790931758399829⟩,⟨-3901465931128540882024751850308760074627542359147164286,-3901465931128540882024751850308760074627539974350546681⟩⟩] +lemma jetTable1_14_calc (j : Fin 31) : jetMultiplierBox 1 14 j = jetTable1_14 j := by + revert j + decide +kernel +lemma jetTable1_14_mem (j : Fin 31) : (jetTable1_14 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨7,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_14_calc] + exact jetMultiplierBox_mem 1 14 j +def jetTable1_15 : Fin 31 → CI := + ![⟨⟨-10916071123241574848115041537578843390389924870421184538,-10916071123241574848115041537578843390389913831400917452⟩,⟨-14556416224723571555688208917839822967647011107713490787,-14556416224723571555688208917839822967647001659124662079⟩⟩, + ⟨⟨412052272617174594204660576468230353244849750730527128,412052272617174594204660576468230353244850012371333564⟩,⟨-299765271153948417519976076310876712272413321925766966,-299765271153948417519976076310876712272413026345859949⟩⟩, + ⟨⟨5949360054705249724628867269298452895986312266063018,5949360054705249724628867269298452895986317880888974⟩,⟨6649207794624333953902799020945845022136185809483532,6649207794624333953902799020945845022136191288587584⟩⟩, + ⟨⟨-48171536279823543792830367002008148449626514632845,-48171536279823543792830367002008148449626443701392⟩,⟨78734181792576710066715089793623996416753045684324,78734181792576710066715089793623996416753111351363⟩⟩, + ⟨⟨-533886787635967110680215518354347517822931640887,-533886787635967110680215518354347517822931273745⟩,⟨18499750842474004443684695272528048028192013335,18499750842474004443684695272528048028192402020⟩⟩, + ⟨⟨-1427872624560581075453722709924022320623093035,-1427872624560581075453722709924022320623091783⟩,⟨-832468155847893412070282147376952701034919481,-832468155847893412070282147376952701034918113⟩⟩, + ⟨⟨-2344678742306065851428982540488981874051638,-2344678742306065851428982540488981874051620⟩,⟨-1267647681809833350486051382248162948718429,-1267647681809833350486051382248162948718409⟩⟩, + ⟨⟨-2134992113735754956497204690408839099566,-2134992113735754956497204690408839099542⟩,⟨759630740462900384876011171410111100587,759630740462900384876011171410111100610⟩⟩, + ⟨⟨670469031559123231582304566660655031,670469031559123231582304566660655048⟩,⟨859736123000484448238033839562805206,859736123000484448238033839562805222⟩⟩, + ⟨⟨-234163641987811982745251064483600,-234163641987811982745251064483582⟩,⟨-256986819000011383839372829670737,-256986819000011383839372829670720⟩⟩, + ⟨⟨64554978799981583926585184381,64554978799981583926585184398⟩,⟨-71864217075035070017807740913,-71864217075035070017807740896⟩⟩, + ⟨⟨13658404228951127279185520,13658404228951127279185543⟩,⟨-32382139785226896109592914,-32382139785226896109592893⟩⟩, + ⟨⟨-27671405591330405771615,-27671405591330405771595⟩,⟨6969032705671118693500,6969032705671118693524⟩⟩, + ⟨⟨44624837375343869837,44624837375343869854⟩,⟨-83861236661658318934,-83861236661658318917⟩⟩, + ⟨⟨2293791875347591892,2293791875347591910⟩,⟨-365707548716593225,-365707548716593203⟩⟩, + ⟨⟨639640338390195898,639640338390195920⟩,⟨-8,14⟩⟩, + ⟨⟨2293791875347591892,2293791875347591910⟩,⟨365707548716593203,365707548716593225⟩⟩, + ⟨⟨44624837375343869837,44624837375343869854⟩,⟨83861236661658318917,83861236661658318934⟩⟩, + ⟨⟨-27671405591330405771615,-27671405591330405771595⟩,⟨-6969032705671118693524,-6969032705671118693500⟩⟩, + ⟨⟨13658404228951127279185520,13658404228951127279185543⟩,⟨32382139785226896109592893,32382139785226896109592914⟩⟩, + ⟨⟨64554978799981583926585184381,64554978799981583926585184398⟩,⟨71864217075035070017807740896,71864217075035070017807740913⟩⟩, + ⟨⟨-234163641987811982745251064483600,-234163641987811982745251064483582⟩,⟨256986819000011383839372829670720,256986819000011383839372829670737⟩⟩, + ⟨⟨670469031559123231582304566660655031,670469031559123231582304566660655048⟩,⟨-859736123000484448238033839562805222,-859736123000484448238033839562805206⟩⟩, + ⟨⟨-2134992113735754956497204690408839099566,-2134992113735754956497204690408839099542⟩,⟨-759630740462900384876011171410111100610,-759630740462900384876011171410111100587⟩⟩, + ⟨⟨-2344678742306065851428982540488981874051638,-2344678742306065851428982540488981874051620⟩,⟨1267647681809833350486051382248162948718409,1267647681809833350486051382248162948718429⟩⟩, + ⟨⟨-1427872624560581075453722709924022320623093035,-1427872624560581075453722709924022320623091783⟩,⟨832468155847893412070282147376952701034918113,832468155847893412070282147376952701034919481⟩⟩, + ⟨⟨-533886787635967110680215518354347517822931640887,-533886787635967110680215518354347517822931273745⟩,⟨-18499750842474004443684695272528048028192402020,-18499750842474004443684695272528048028192013335⟩⟩, + ⟨⟨-48171536279823543792830367002008148449626514632845,-48171536279823543792830367002008148449626443701392⟩,⟨-78734181792576710066715089793623996416753111351363,-78734181792576710066715089793623996416753045684324⟩⟩, + ⟨⟨5949360054705249724628867269298452895986312266063018,5949360054705249724628867269298452895986317880888974⟩,⟨-6649207794624333953902799020945845022136191288587584,-6649207794624333953902799020945845022136185809483532⟩⟩, + ⟨⟨412052272617174594204660576468230353244849750730527128,412052272617174594204660576468230353244850012371333564⟩,⟨299765271153948417519976076310876712272413026345859949,299765271153948417519976076310876712272413321925766966⟩⟩, + ⟨⟨-10916071123241574848115041537578843390389924870421184538,-10916071123241574848115041537578843390389913831400917452⟩,⟨14556416224723571555688208917839822967647001659124662079,14556416224723571555688208917839822967647011107713490787⟩⟩] +lemma jetTable1_15_calc (j : Fin 31) : jetMultiplierBox 1 15 j = jetTable1_15 j := by + revert j + decide +kernel +lemma jetTable1_15_mem (j : Fin 31) : (jetTable1_15 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨7,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_15_calc] + exact jetMultiplierBox_mem 1 15 j +def jetTable1_16 : Fin 31 → CI := + ![⟨⟨628659471267778203596703461716906360003796018909704458,628659471267778203596703461716906360003796302586646295⟩,⟨188904736098255282648509057660341633837353039803021339,188904736098255282648509057660341633837353263900925688⟩⟩, + ⟨⟨-4533995133478532688492835156987042422439928144892411,-4533995133478532688492835156987042422439925635161182⟩,⟨7627476137051747645628578845794042192202947639492058,7627476137051747645628578845794042192202951081316017⟩⟩, + ⟨⟨-55013549183456239016170783935851066480542507405539,-55013549183456239016170783935851066480542482581117⟩,⟨-40863857383231484166363158483090716521069583097289,-40863857383231484166363158483090716521069564501834⟩⟩, + ⟨⟨137923861798718349977881882478346723634045923844,137923861798718349977881882478346723634046019889⟩,⟨-246858046614567737533336736522169757882582957104,-246858046614567737533336736522169757882582845707⟩⟩, + ⟨⟨584247672680777245591125846397350616584185042,584247672680777245591125846397350616584185310⟩,⟨16149547972949157148998284960463098055968854,16149547972949157148998284960463098055969119⟩⟩, + ⟨⟨471493464252372691764256880100478010383527,471493464252372691764256880100478010383532⟩,⟨326558445258696248114836676783978263508593,326558445258696248114836676783978263508598⟩⟩, + ⟨⟨231261781270584814850750114595634182876,231261781270584814850750114595634182880⟩,⟨117587238288920861781754667626261577152,117587238288920861781754667626261577156⟩⟩, + ⟨⟨44368981438639031036765872091689493,44368981438639031036765872091689497⟩,⟨-32297702366108106039572318009775575,-32297702366108106039572318009775570⟩⟩, + ⟨⟨-5842419889532407152173204500085,-5842419889532407152173204500080⟩,⟨-898723946689566541126624616211,-898723946689566541126624616207⟩⟩, + ⟨⟨311701382102254118193524091,311701382102254118193524095⟩,⟨-237182401152406507958893049,-237182401152406507958893045⟩⟩, + ⟨⟨21622901539039987954938,21622901539039987954942⟩,⟨-4710973790093102767187,-4710973790093102767182⟩⟩, + ⟨⟨-608668806884027294,-608668806884027289⟩,⟨-1622290256100819148,-1622290256100819144⟩⟩, + ⟨⟨327932871582463,327932871582467⟩,⟨135664161204950,135664161204954⟩⟩, + ⟨⟨320052479290,320052479294⟩,⟨226924850974,226924850978⟩⟩, + ⟨⟨3243906455,3243906459⟩,⟨-3383078763,-3383078759⟩⟩, + ⟨⟨-1006451608,-1006451603⟩,⟨-2,3⟩⟩, + ⟨⟨3243906455,3243906459⟩,⟨3383078761,3383078765⟩⟩, + ⟨⟨320052479290,320052479294⟩,⟨-226924850976,-226924850972⟩⟩, + ⟨⟨327932871582463,327932871582467⟩,⟨-135664161204952,-135664161204948⟩⟩, + ⟨⟨-608668806884027294,-608668806884027289⟩,⟨1622290256100819146,1622290256100819150⟩⟩, + ⟨⟨21622901539039987954938,21622901539039987954942⟩,⟨4710973790093102767184,4710973790093102767189⟩⟩, + ⟨⟨311701382102254118193524091,311701382102254118193524095⟩,⟨237182401152406507958893047,237182401152406507958893051⟩⟩, + ⟨⟨-5842419889532407152173204500085,-5842419889532407152173204500080⟩,⟨898723946689566541126624616209,898723946689566541126624616213⟩⟩, + ⟨⟨44368981438639031036765872091689493,44368981438639031036765872091689497⟩,⟨32297702366108106039572318009775572,32297702366108106039572318009775577⟩⟩, + ⟨⟨231261781270584814850750114595634182876,231261781270584814850750114595634182880⟩,⟨-117587238288920861781754667626261577154,-117587238288920861781754667626261577150⟩⟩, + ⟨⟨471493464252372691764256880100478010383527,471493464252372691764256880100478010383532⟩,⟨-326558445258696248114836676783978263508596,-326558445258696248114836676783978263508591⟩⟩, + ⟨⟨584247672680777245591125846397350616584185042,584247672680777245591125846397350616584185310⟩,⟨-16149547972949157148998284960463098055969117,-16149547972949157148998284960463098055968852⟩⟩, + ⟨⟨137923861798718349977881882478346723634045923844,137923861798718349977881882478346723634046019889⟩,⟨246858046614567737533336736522169757882582845709,246858046614567737533336736522169757882582957106⟩⟩, + ⟨⟨-55013549183456239016170783935851066480542507405539,-55013549183456239016170783935851066480542482581117⟩,⟨40863857383231484166363158483090716521069564501836,40863857383231484166363158483090716521069583097291⟩⟩, + ⟨⟨-4533995133478532688492835156987042422439928144892411,-4533995133478532688492835156987042422439925635161182⟩,⟨-7627476137051747645628578845794042192202951081316015,-7627476137051747645628578845794042192202947639492056⟩⟩, + ⟨⟨628659471267778203596703461716906360003796018909704458,628659471267778203596703461716906360003796302586646295⟩,⟨-188904736098255282648509057660341633837353263900925686,-188904736098255282648509057660341633837353039803021337⟩⟩] +lemma jetTable1_16_calc (j : Fin 31) : jetMultiplierBox 1 16 j = jetTable1_16 j := by + revert j + decide +kernel +lemma jetTable1_16_mem (j : Fin 31) : (jetTable1_16 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨8,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_16_calc] + exact jetMultiplierBox_mem 1 16 j +def jetTable1_17 : Fin 31 → CI := + ![⟨⟨-879013452118387215609257905871196170899578762976583296,-879013452118387215609257905871196170899577723324235006⟩,⟨2162307185295065110459063011311784973123250132034122288,2162307185295065110459063011311784973123251256733673955⟩⟩, + ⟨⟨-25162700656518029380183357365964751252712645277967898,-25162700656518029380183357365964751252712630264158868⟩,⟨-20774302721241972407085256010839356529660126439713657,-20774302721241972407085256010839356529660113542588739⟩⟩, + ⟨⟨197243149789778742475339579295627937850097211962568,197243149789778742475339579295627937850097314800047⟩,⟨-171066098210183466927865486966516439310668849920234,-171066098210183466927865486966516439310668732439321⟩⟩, + ⟨⟨782973342580606762981419383342995832454196481508,782973342580606762981419383342995832454197044322⟩,⟨798189105159015980590753956944097074184164573437,798189105159015980590753956944097074184165121344⟩⟩, + ⟨⟨-904446909574084180890364989406004794933895319,-904446909574084180890364989406004794933893780⟩,⟨2225498235084281484482494551081095959435331478,2225498235084281484482494551081095959435332887⟩⟩, + ⟨⟨-2118942956807470048713417265755821535626905,-2118942956807470048713417265755821535626887⟩,⟨1237236850182746766217436283136872985303728,1237236850182746766217436283136872985303748⟩⟩, + ⟨⟨-967410167248011182834751220044397376311,-967410167248011182834751220044397376297⟩,⟨633616981143015216039107854286328129353,633616981143015216039107854286328129367⟩⟩, + ⟨⟨4687491410684322969436063921959947,4687491410684322969436063921959965⟩,⟨254944799776839474480405555598386142,254944799776839474480405555598386160⟩⟩, + ⟨⟨21700301440467712186166266374011,21700301440467712186166266374029⟩,⟨-18661882906050320822900139377921,-18661882906050320822900139377902⟩⟩, + ⟨⟨-317644204110377239617441410,-317644204110377239617441394⟩,⟨1948171347569410270910552799,1948171347569410270910552816⟩⟩, + ⟨⟨-75399060396433550740823,-75399060396433550740803⟩,⟨87892613412196473020150,87892613412196473020171⟩⟩, + ⟨⟨7273661922307918105,7273661922307918127⟩,⟨5921216225212512840,5921216225212512860⟩⟩, + ⟨⟨-1976511442709017,-1976511442709001⟩,⟨21840840719061,21840840719077⟩⟩, + ⟨⟨-2102160536449,-2102160536433⟩,⟨-754024157686,-754024157670⟩⟩, + ⟨⟨-15871572349,-15871572334⟩,⟨21900379424,21900379439⟩⟩, + ⟨⟨5834950041,5834950061⟩,⟨-7,13⟩⟩, + ⟨⟨-15871572349,-15871572334⟩,⟨-21900379439,-21900379424⟩⟩, + ⟨⟨-2102160536449,-2102160536433⟩,⟨754024157670,754024157686⟩⟩, + ⟨⟨-1976511442709017,-1976511442709001⟩,⟨-21840840719077,-21840840719061⟩⟩, + ⟨⟨7273661922307918105,7273661922307918127⟩,⟨-5921216225212512860,-5921216225212512840⟩⟩, + ⟨⟨-75399060396433550740823,-75399060396433550740803⟩,⟨-87892613412196473020171,-87892613412196473020150⟩⟩, + ⟨⟨-317644204110377239617441410,-317644204110377239617441394⟩,⟨-1948171347569410270910552816,-1948171347569410270910552799⟩⟩, + ⟨⟨21700301440467712186166266374011,21700301440467712186166266374029⟩,⟨18661882906050320822900139377902,18661882906050320822900139377921⟩⟩, + ⟨⟨4687491410684322969436063921959947,4687491410684322969436063921959965⟩,⟨-254944799776839474480405555598386160,-254944799776839474480405555598386142⟩⟩, + ⟨⟨-967410167248011182834751220044397376311,-967410167248011182834751220044397376297⟩,⟨-633616981143015216039107854286328129367,-633616981143015216039107854286328129353⟩⟩, + ⟨⟨-2118942956807470048713417265755821535626905,-2118942956807470048713417265755821535626887⟩,⟨-1237236850182746766217436283136872985303748,-1237236850182746766217436283136872985303728⟩⟩, + ⟨⟨-904446909574084180890364989406004794933895319,-904446909574084180890364989406004794933893780⟩,⟨-2225498235084281484482494551081095959435332887,-2225498235084281484482494551081095959435331478⟩⟩, + ⟨⟨782973342580606762981419383342995832454196481508,782973342580606762981419383342995832454197044322⟩,⟨-798189105159015980590753956944097074184165121344,-798189105159015980590753956944097074184164573437⟩⟩, + ⟨⟨197243149789778742475339579295627937850097211962568,197243149789778742475339579295627937850097314800047⟩,⟨171066098210183466927865486966516439310668732439321,171066098210183466927865486966516439310668849920234⟩⟩, + ⟨⟨-25162700656518029380183357365964751252712645277967898,-25162700656518029380183357365964751252712630264158868⟩,⟨20774302721241972407085256010839356529660113542588739,20774302721241972407085256010839356529660126439713657⟩⟩, + ⟨⟨-879013452118387215609257905871196170899578762976583296,-879013452118387215609257905871196170899577723324235006⟩,⟨-2162307185295065110459063011311784973123251256733673955,-2162307185295065110459063011311784973123250132034122288⟩⟩] +lemma jetTable1_17_calc (j : Fin 31) : jetMultiplierBox 1 17 j = jetTable1_17 j := by + revert j + decide +kernel +lemma jetTable1_17_mem (j : Fin 31) : (jetTable1_17 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨8,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_17_calc] + exact jetMultiplierBox_mem 1 17 j +def jetTable1_18 : Fin 31 → CI := + ![⟨⟨62702794764591968226242109650147249153368882963848962,62702794764591968226242109650147249153368921451442319⟩,⟨119868696800672293720997885412281778278645288154562962,119868696800672293720997885412281778278645322321854603⟩⟩, + ⟨⟨-1155216491974263820065026462394364220465727282625049,-1155216491974263820065026462394364220465726953343112⟩,⟨57611268145866646441957869822047339694217860610997,57611268145866646441957869822047339694218174866830⟩⟩, + ⟨⟨1189257231952575373523230584170439666598693525837,1189257231952575373523230584170439666598694849433⟩,⟨-5191890735334108069053637581137787613627104295147,-5191890735334108069053637581137787613627102815246⟩⟩, + ⟨⟨11904723673109387057625345720245420608970151940,11904723673109387057625345720245420608970155337⟩,⟨2956972940221834981825621266394696518231091461,2956972940221834981825621266394696518231094610⟩⟩, + ⟨⟨1683408980062346774165649171394468228961946,1683408980062346774165649171394468228961953⟩,⟨13047880954361069024363322719359920803918077,13047880954361069024363322719359920803918085⟩⟩, + ⟨⟨-2999957724029157329475518192065030341757,-2999957724029157329475518192065030341753⟩,⟨5418327927442559230672233812469185734361,5418327927442559230672233812469185734365⟩⟩, + ⟨⟨-425374356232090534714003110462127587,-425374356232090534714003110462127583⟩,⟨1163462569329530105458171687965290311,1163462569329530105458171687965290315⟩⟩, + ⟨⟨81824314787306912731304337808804,81824314787306912731304337808808⟩,⟨68891752928027196363824010846248,68891752928027196363824010846252⟩⟩, + ⟨⟨-1478820607531986836229811532,-1478820607531986836229811528⟩,⟨-4123828625175625851496706132,-4123828625175625851496706128⟩⟩, + ⟨⟨104903938063831426880638,104903938063831426880642⟩,⟨70687184728345260525,70687184728345260530⟩⟩, + ⟨⟨2070303058936142559,2070303058936142563⟩,⟨-391910508753857432,-391910508753857428⟩⟩, + ⟨⟨-56204671029987,-56204671029983⟩,⟨-23000451452194,-23000451452190⟩⟩, + ⟨⟨261943083,261943087⟩,⟨-5062943292,-5062943288⟩⟩, + ⟨⟨-2345078,-2345073⟩,⟨-1398363,-1398359⟩⟩, + ⟨⟨14625,14629⟩,⟨14268,14272⟩⟩, + ⟨⟨-3732,-3727⟩,⟨-2,3⟩⟩, + ⟨⟨14625,14629⟩,⟨-14270,-14266⟩⟩, + ⟨⟨-2345078,-2345073⟩,⟨1398361,1398365⟩⟩, + ⟨⟨261943083,261943087⟩,⟨5062943290,5062943294⟩⟩, + ⟨⟨-56204671029987,-56204671029983⟩,⟨23000451452192,23000451452196⟩⟩, + ⟨⟨2070303058936142559,2070303058936142563⟩,⟨391910508753857430,391910508753857434⟩⟩, + ⟨⟨104903938063831426880638,104903938063831426880642⟩,⟨-70687184728345260528,-70687184728345260523⟩⟩, + ⟨⟨-1478820607531986836229811532,-1478820607531986836229811528⟩,⟨4123828625175625851496706130,4123828625175625851496706134⟩⟩, + ⟨⟨81824314787306912731304337808804,81824314787306912731304337808808⟩,⟨-68891752928027196363824010846250,-68891752928027196363824010846246⟩⟩, + ⟨⟨-425374356232090534714003110462127587,-425374356232090534714003110462127583⟩,⟨-1163462569329530105458171687965290313,-1163462569329530105458171687965290309⟩⟩, + ⟨⟨-2999957724029157329475518192065030341757,-2999957724029157329475518192065030341753⟩,⟨-5418327927442559230672233812469185734363,-5418327927442559230672233812469185734359⟩⟩, + ⟨⟨1683408980062346774165649171394468228961946,1683408980062346774165649171394468228961953⟩,⟨-13047880954361069024363322719359920803918083,-13047880954361069024363322719359920803918075⟩⟩, + ⟨⟨11904723673109387057625345720245420608970151940,11904723673109387057625345720245420608970155337⟩,⟨-2956972940221834981825621266394696518231094608,-2956972940221834981825621266394696518231091459⟩⟩, + ⟨⟨1189257231952575373523230584170439666598693525837,1189257231952575373523230584170439666598694849433⟩,⟨5191890735334108069053637581137787613627102815248,5191890735334108069053637581137787613627104295149⟩⟩, + ⟨⟨-1155216491974263820065026462394364220465727282625049,-1155216491974263820065026462394364220465726953343112⟩,⟨-57611268145866646441957869822047339694218174866828,-57611268145866646441957869822047339694217860610995⟩⟩, + ⟨⟨62702794764591968226242109650147249153368882963848962,62702794764591968226242109650147249153368921451442319⟩,⟨-119868696800672293720997885412281778278645322321854601,-119868696800672293720997885412281778278645288154562960⟩⟩] +lemma jetTable1_18_calc (j : Fin 31) : jetMultiplierBox 1 18 j = jetTable1_18 j := by + revert j + decide +kernel +lemma jetTable1_18_mem (j : Fin 31) : (jetTable1_18 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨9,by norm_num⟩) ⟨0,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_18_calc] + exact jetMultiplierBox_mem 1 18 j +def jetTable1_19 : Fin 31 → CI := + ![⟨⟨-503889365352608913055724860370426714239229299741004541,-503889365352608913055724860370426714239229113082986971⟩,⟨69902575106463575731292473552497860072605907142787276,69902575106463575731292473552497860072606119000866773⟩⟩, + ⟨⟨1520754976424824277113313599709393375195201848212801,1520754976424824277113313599709393375195203794280756⟩,⟨-4284245276025255484869988505363218055691623028094328,-4284245276025255484869988505363218055691621345358418⟩⟩, + ⟨⟨17226003176933740665193702272364219028851800526806,17226003176933740665193702272364219028851808676829⟩,⟨13542164394067445996266302613249682139062446444199,13542164394067445996266302613249682139062455364597⟩⟩, + ⟨⟨-35596941381017610393366922209762865891123780699,-35596941381017610393366922209762865891123758601⟩,⟨39110865347482126382495308135846722207280979856,39110865347482126382495308135846722207280999980⟩⟩, + ⟨⟨-54220992632495879873048406486018085311063063,-54220992632495879873048406486018085311063026⟩,⟨-24519741139196168461842855325200541216216730,-24519741139196168461842855325200541216216691⟩⟩, + ⟨⟨-12777491990576968899499584030919691926685,-12777491990576968899499584030919691926669⟩,⟨-26493487334293941798172519315348232083805,-26493487334293941798172519315348232083791⟩⟩, + ⟨⟨-3158778103967093953068148607166507003,-3158778103967093953068148607166506987⟩,⟨-5311116292815812863221319967229494583,-5311116292815812863221319967229494567⟩⟩, + ⟨⟨-556702609934277198086941079096108,-556702609934277198086941079096092⟩,⟨63484385743898978002771753553111,63484385743898978002771753553128⟩⟩, + ⟨⟨21206932852266493401996743027,21206932852266493401996743045⟩,⟨11395885199178262373912980258,11395885199178262373912980275⟩⟩, + ⟨⟨-481908232080020035823095,-481908232080020035823074⟩,⟨363394061531272320275240,363394061531272320275263⟩⟩, + ⟨⟨-9339730309989200073,-9339730309989200054⟩,⟨8534553162212880656,8534553162212880674⟩⟩, + ⟨⟨378000163251148,378000163251166⟩,⟨-24439042023777,-24439042023757⟩⟩, + ⟨⟨9480552141,9480552159⟩,⟨31238963895,31238963913⟩⟩, + ⟨⟨17188697,17188721⟩,⟨5381811,5381831⟩⟩, + ⟨⟨-108552,-108536⟩,⟨-83353,-83336⟩⟩, + ⟨⟨25094,25117⟩,⟨-8,15⟩⟩, + ⟨⟨-108552,-108536⟩,⟨83336,83353⟩⟩, + ⟨⟨17188697,17188721⟩,⟨-5381831,-5381811⟩⟩, + ⟨⟨9480552141,9480552159⟩,⟨-31238963913,-31238963895⟩⟩, + ⟨⟨378000163251148,378000163251166⟩,⟨24439042023757,24439042023777⟩⟩, + ⟨⟨-9339730309989200073,-9339730309989200054⟩,⟨-8534553162212880674,-8534553162212880656⟩⟩, + ⟨⟨-481908232080020035823095,-481908232080020035823074⟩,⟨-363394061531272320275263,-363394061531272320275240⟩⟩, + ⟨⟨21206932852266493401996743027,21206932852266493401996743045⟩,⟨-11395885199178262373912980275,-11395885199178262373912980258⟩⟩, + ⟨⟨-556702609934277198086941079096108,-556702609934277198086941079096092⟩,⟨-63484385743898978002771753553128,-63484385743898978002771753553111⟩⟩, + ⟨⟨-3158778103967093953068148607166507003,-3158778103967093953068148607166506987⟩,⟨5311116292815812863221319967229494567,5311116292815812863221319967229494583⟩⟩, + ⟨⟨-12777491990576968899499584030919691926685,-12777491990576968899499584030919691926669⟩,⟨26493487334293941798172519315348232083791,26493487334293941798172519315348232083805⟩⟩, + ⟨⟨-54220992632495879873048406486018085311063063,-54220992632495879873048406486018085311063026⟩,⟨24519741139196168461842855325200541216216691,24519741139196168461842855325200541216216730⟩⟩, + ⟨⟨-35596941381017610393366922209762865891123780699,-35596941381017610393366922209762865891123758601⟩,⟨-39110865347482126382495308135846722207280999980,-39110865347482126382495308135846722207280979856⟩⟩, + ⟨⟨17226003176933740665193702272364219028851800526806,17226003176933740665193702272364219028851808676829⟩,⟨-13542164394067445996266302613249682139062455364597,-13542164394067445996266302613249682139062446444199⟩⟩, + ⟨⟨1520754976424824277113313599709393375195201848212801,1520754976424824277113313599709393375195203794280756⟩,⟨4284245276025255484869988505363218055691621345358418,4284245276025255484869988505363218055691623028094328⟩⟩, + ⟨⟨-503889365352608913055724860370426714239229299741004541,-503889365352608913055724860370426714239229113082986971⟩,⟨-69902575106463575731292473552497860072606119000866773,-69902575106463575731292473552497860072605907142787276⟩⟩] +lemma jetTable1_19_calc (j : Fin 31) : jetMultiplierBox 1 19 j = jetTable1_19 j := by + revert j + decide +kernel +lemma jetTable1_19_mem (j : Fin 31) : (jetTable1_19 j).Mem + (jetMultiplier (damping 1) H (finiteNode ⟨9,by norm_num⟩) ⟨1,by norm_num⟩ (frequency j)) := by + rw [← jetTable1_19_calc] + exact jetMultiplierBox_mem 1 19 j +def jetTable : Fin 2 → Fin 20 → Fin 31 → CI := + ![![jetTable0_0,jetTable0_1,jetTable0_2,jetTable0_3,jetTable0_4,jetTable0_5,jetTable0_6,jetTable0_7,jetTable0_8,jetTable0_9,jetTable0_10,jetTable0_11,jetTable0_12,jetTable0_13,jetTable0_14,jetTable0_15,jetTable0_16,jetTable0_17,jetTable0_18,jetTable0_19], + ![jetTable1_0,jetTable1_1,jetTable1_2,jetTable1_3,jetTable1_4,jetTable1_5,jetTable1_6,jetTable1_7,jetTable1_8,jetTable1_9,jetTable1_10,jetTable1_11,jetTable1_12,jetTable1_13,jetTable1_14,jetTable1_15,jetTable1_16,jetTable1_17,jetTable1_18,jetTable1_19]] +lemma jetTable_mem (q : Fin 2) (i : Fin 20) (j : Fin 31) : (jetTable q i j).Mem + (jetMultiplier (damping q) H (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ (frequency j)) := by + fin_cases q <;> fin_cases i + · exact jetTable0_0_mem j + · exact jetTable0_1_mem j + · exact jetTable0_2_mem j + · exact jetTable0_3_mem j + · exact jetTable0_4_mem j + · exact jetTable0_5_mem j + · exact jetTable0_6_mem j + · exact jetTable0_7_mem j + · exact jetTable0_8_mem j + · exact jetTable0_9_mem j + · exact jetTable0_10_mem j + · exact jetTable0_11_mem j + · exact jetTable0_12_mem j + · exact jetTable0_13_mem j + · exact jetTable0_14_mem j + · exact jetTable0_15_mem j + · exact jetTable0_16_mem j + · exact jetTable0_17_mem j + · exact jetTable0_18_mem j + · exact jetTable0_19_mem j + · exact jetTable1_0_mem j + · exact jetTable1_1_mem j + · exact jetTable1_2_mem j + · exact jetTable1_3_mem j + · exact jetTable1_4_mem j + · exact jetTable1_5_mem j + · exact jetTable1_6_mem j + · exact jetTable1_7_mem j + · exact jetTable1_8_mem j + · exact jetTable1_9_mem j + · exact jetTable1_10_mem j + · exact jetTable1_11_mem j + · exact jetTable1_12_mem j + · exact jetTable1_13_mem j + · exact jetTable1_14_mem j + · exact jetTable1_15_mem j + · exact jetTable1_16_mem j + · exact jetTable1_17_mem j + · exact jetTable1_18_mem j + · exact jetTable1_19_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/ActualCorrection.lean b/lean/OAI/Analysis/Triangular/Construction/ActualCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3437b200e94b5a01e036c8f035da2ba09626810 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/ActualCorrection.lean @@ -0,0 +1,137 @@ +import OAI.Analysis.Triangular.Construction.ConcreteSchur +import OAI.Analysis.Triangular.Certificate.ParamActual +import OAI.Analysis.Triangular.Certificate.TargetInterval +import OAI.Analysis.Triangular.Certificate.ParamNorm + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel AtomicTriangular.FiniteCertificate + +def finiteResidual (z : ℝ) : FiniteCoefficients := + column (fun i (_ : Unit) => if i.val<8 then 0 else + gaussianTarget H z (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩) + (fun _ => (hasSum_fintype _).summable) () +lemma finiteResidual_norm {z : ℝ} (hz : 0 |if i.val<8 then 0 else + gaussianTarget H z (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩|) = + (fun i : Fin 20 => (fun n : Fin 10 => fun d : Fin 2 => + if n.val<4 then (0:ℝ) else |gaussianTarget H z (finiteNode n) d|) + ⟨i.val/2,by omega⟩ ⟨i.val%2,by omega⟩) by + funext i; by_cases hi : i.val<8 <;> simp [hi,show i.val/2<4 ↔ i.val<8 by omega]] + rw [sum_fin20_pairs (fun n d => if n.val<4 then (0:ℝ) else |gaussianTarget H z (finiteNode n) d|)] + apply Finset.sum_congr rfl + intro n _; by_cases hn : n.val<4 <;> simp [hn] + rw [he] + have hb : (∑ n : Fin 10, if n.val<4 then 0 else ∑ d : Fin 2, |gaussianTarget H z (finiteNode n) d|) ≤ + ∑ n : Fin 10, if n.val<4 then 0 else targetEnvelope H (finiteNode n) := by + apply Finset.sum_le_sum + intro n _ + split_ifs with hn + · rfl + · exact gaussianTarget_pair_bound hz hzB H + ⟨finiteNode n, by fin_cases n <;> decide +kernel⟩ (by fin_cases n <;> norm_num [finiteNode,residue]) + have he2 : (∑ n : Fin 10, if n.val<4 then 0 else targetEnvelope H (finiteNode n)) = finiteTargetEnvelope := by + simp [finiteTargetEnvelope,Fin.sum_univ_succ] + exact hb.trans ((he2 ▸ finiteTargetEnvelope_bound.le).trans (by norm_num [finiteResidualBound])) + +def finiteApprox (side : Fin 2) (e : Fin 8 → ℝ) : TrigonometricCoefficients := + column (fun i (_ : Unit) => ∑ j : Fin 8, Acoefficient side ⟨i.val,by omega⟩ j*e j) + (fun _ => (hasSum_fintype _).summable) () +lemma finiteApprox_norm (side : Fin 2) (e : Fin 8 → ℝ) (he : ParameterPolytope e) : + ‖finiteApprox side e‖ < 3 := by + rw [l1_norm,tsum_fintype] + have hb : (∑ i : Fin 22, |∑ j : Fin 8, Acoefficient side i.castSucc j*e j|) ≤ + ∑ i : Fin 23, |∑ j : Fin 8, Acoefficient side i j*e j| := by + conv_rhs => rw [Fin.sum_univ_castSucc] + exact le_add_of_nonneg_right (abs_nonneg _) + change (∑ i : Fin 22, |∑ j : Fin 8, Acoefficient side i.castSucc j*e j|) < 3 + refine hb.trans_lt ?_ + fin_cases side + · exact (A1_norm_bound e he).trans (by norm_num) + · exact (A2_norm_bound e he).trans (by norm_num) + +def approximationTailResidual (e : Fin 2) (z : ℝ) (hz : 0 simp only [approximationTailResidual,tailResidualBound,↓reduceIte,Nat.one_ne_zero] + · change ‖tailTarget z hz hzB + _‖ ≤ 1/10^26+6*beta+0 + exact (norm_add_le _ _).trans (by linarith [hc _ _ hp hp]) + · change ‖tailTarget z hz hzB + (_+_)‖ ≤ 1/10^26+6*beta+(12/1000)*(13/10^8) + have hh := (norm_add_le _ _).trans (add_le_add ht + ((norm_add_le _ _).trans (add_le_add (hc _ _ hm' hm) hv))) + simpa only [add_assoc] using hh + +def actualTailSplit (e : Fin 2) (z : ℝ) (hz : 0 (try simp only [norm_neg] at hh) <;> norm_num [tailErrorBound] at hp hm <;> linarith +lemma actualFiniteError_norm (side : Fin 2) {z : ℝ} (hz : 0 (try simp only [norm_neg] at hh) <;> norm_num [finiteErrorBound] at hp hm <;> linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/ActualInput.lean b/lean/OAI/Analysis/Triangular/Construction/ActualInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffcfa72674edf443add54bb15ea070ccc1aa3fc8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/ActualInput.lean @@ -0,0 +1,86 @@ +import OAI.Analysis.Triangular.Construction.ActualCorrection + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel AtomicTriangular.MatrixBounds + +lemma tail_pairs_summable (w : TailCoefficients) : + Summable (fun n => |w (n,0)|+|w (n,1)|) := by + have hh := (l1_summable w).prod + simpa [tsum_fintype,Fin.sum_univ_succ] using hh +lemma tail_pairs_norm (w : TailCoefficients) : + (∑' n, (|w (n,0)| + |w (n,1)|))=‖w‖ := by + rw [l1_norm] + symm + calc + (∑' p, |w p|) = ∑' n : TailNode, ∑' d : Fin 2, |w (n,d)| := (l1_summable w).tsum_prod + _ = _ := by simp only [tsum_fintype,Fin.sum_univ_succ,Finset.univ_eq_empty,Finset.sum_empty,add_zero] + rfl + +def coefficientInput (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) : InputCoefficients where + C := C + finiteC j := a ⟨2*j.val,by omega⟩ + finiteD j := a ⟨2*j.val+1,by omega⟩ + tailC n := w (n,0) + tailD n := w (n,1) + summable := tail_pairs_summable w + +def extendFiniteError (u : FiniteCoefficients) : TrigonometricCoefficients := + column (fun i (_ : Unit) => if hi : i.val<2 then 0 else u ⟨i.val-2,by omega⟩) + (fun _ => (hasSum_fintype _).summable) () +lemma extendFiniteError_norm (u : FiniteCoefficients) : ‖extendFiniteError u‖=‖u‖ := by + rw [l1_norm,l1_norm,tsum_fintype,tsum_fintype] + change (∑ i : Fin 22, |if hi : i.val<2 then 0 else u ⟨i.val-2,by omega⟩|)=_ + rw [Fin.sum_univ_succ,Fin.sum_univ_succ] + simp only [Fin.val_zero,Fin.val_succ,show 0<2 by omega,show 0+1<2 by omega,↓reduceDIte,abs_zero,zero_add] + apply Finset.sum_congr rfl + intro i _ + simp only [show ¬(i.val+1+1<2) by omega,↓reduceDIte] + congr 2 + +def actualTrigonometric (side : Fin 2) (z : ℝ) (hz : 0 T (r+Boperator (correctionTail 0 r s))) Lplus_left_inverse + change correctionFinite 0 r s-Roperator (correctionFinite 0 r s)=r+Boperator (correctionTail 0 r s) at hh + exact sub_eq_iff_eq_add.mp hh |>.trans (by abel) +lemma correctionFinite_minus (r : FiniteCoefficients) (s : TailCoefficients) : + correctionFinite 1 r s = -Roperator (correctionFinite 1 r s)-Boperator (correctionTail 1 r s)+r := by + have hh := congrArg (fun T : FiniteCoefficients →L[ℝ] FiniteCoefficients => T (r-Boperator (correctionTail 1 r s))) Lminus_left_inverse + change correctionFinite 1 r s+Roperator (correctionFinite 1 r s)=r-Boperator (correctionTail 1 r s) at hh + exact eq_sub_of_add_eq hh |>.trans (by abel) +lemma actualFiniteError_equations {z : ℝ} (hz : 0 ext i + all_goals + have hp' := congrArg (fun u : FiniteCoefficients => u i) hp + have hm' := congrArg (fun u : FiniteCoefficients => u i) hm + simp only [actualFiniteError,actualTail,Fin.val_zero,Fin.val_one,Nat.one_ne_zero,↓reduceIte, + map_smul,map_add,map_neg,lp.coeFn_add,lp.coeFn_sub,lp.coeFn_neg,lp.coeFn_smul, + Pi.add_apply,Pi.sub_apply,Pi.neg_apply,Pi.smul_apply,smul_eq_mul] at hp' hm' ⊢ + linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/ActualInterpolation.lean b/lean/OAI/Analysis/Triangular/Construction/ActualInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..16723f4f987b9f47e1342759c759389e1ae01191 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/ActualInterpolation.lean @@ -0,0 +1,94 @@ +import OAI.Analysis.Triangular.Construction.FiniteInterpolation + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +lemma otherSide_zero : otherSide 0=1 := rfl +lemma otherSide_one : otherSide 1=0 := rfl +def actualJ (side : Fin 2) (z : ℝ) (hz : 0 first | rfl | (simp only [Pi.sub_apply,id_eq]; field_simp; ring) +lemma negativeJet_gaussian {z : ℝ} (hz : 0 ring +lemma negativeJet_injective (v : ℝ) (n : Node) (a b c d : ℂ) + (h0 : (negativeJet v n.val 0 a b).re=(negativeJet v n.val 0 c d).re) + (h1 : (negativeJet v n.val 1 a b).re=(negativeJet v n.val 1 c d).re) : + a.re=c.re ∧ b.re=d.re := by + simp only [negativeJet_re,Fin.val_zero,Fin.val_one,Nat.one_ne_zero,↓reduceIte] at h0 h1 + have hp : Real.exp (Real.pi*(v-h)*n.val)/Q n.val≠0 := div_ne_zero (Real.exp_ne_zero _) (Q_node_ne n) + have ha : a.re=c.re := by + have hh := mul_left_cancel₀ hp h0 + linarith + have hb := mul_left_cancel₀ hp h1 + constructor + · exact ha + · rw [ha] at hb + linarith +lemma finiteNode_surj {n : ℤ} (hn : n∈FiniteNodes) : ∃ i : Fin 10,finiteNode i=n := by + have hall : ∀ n∈FiniteNodes,∃ i : Fin 10,finiteNode i=n := by decide +kernel + exact hall n hn +lemma rowNode_cover (n : Node) (hn : n.val∈FiniteNodes) (d : Fin 2) : + ∃ i : Fin 20,rowNode i=n ∧ rowDerivative i=d := by + obtain ⟨j,hj⟩ := finiteNode_surj hn + refine ⟨⟨2*j.val+d.val,by omega⟩,?_,?_⟩ + · apply Subtype.ext + change finiteNode ⟨(2*j.val+d.val)/2,by omega⟩=n.val + convert hj using 1 + congr 1 + apply Fin.ext + dsimp + omega + · apply Fin.ext + change (2*j.val+d.val)%2=d.val + omega +lemma actual_node_negative {z : ℝ} (hz : 0 ext i + all_goals + have hp' := congrArg (fun u : TailCoefficients => u i) hp + have hm' := congrArg (fun u : TailCoefficients => u i) hm + simp only [actualFiniteError,actualTail,approximationTailResidual, + Fin.val_zero,Fin.val_one,Nat.one_ne_zero,↓reduceIte, + map_smul,map_add,map_sub,map_neg,sub_apply,neg_apply, + lp.coeFn_add,lp.coeFn_sub,lp.coeFn_neg,lp.coeFn_smul, + Pi.add_apply,Pi.sub_apply,Pi.neg_apply,Pi.smul_apply,smul_eq_mul] at hp' hm' ⊢ + linarith +lemma CallOperator_extend (u : FiniteCoefficients) : + CallOperator (extendFiniteError u)=Coperator u := by + ext p + unfold CallOperator Coperator + erw [operator_apply,operator_apply,tsum_fintype,tsum_fintype] + change (∑ i : Fin 22, (if hi : i.val<2 then 0 else u ⟨i.val-2,by omega⟩)*CallKernel p i)=_ + rw [Fin.sum_univ_succ,Fin.sum_univ_succ] + simp only [Fin.val_zero,Fin.val_succ,show 0<2 by omega,show 0+1<2 by omega,↓reduceDIte,zero_mul,zero_add] + apply Finset.sum_congr rfl + intro i _ + simp only [show ¬(i.val+1+1<2) by omega,↓reduceDIte] + congr 1 +lemma AallOperator_extend (u : FiniteCoefficients) : + AallOperator (extendFiniteError u)=Aoperator u := by + ext p + unfold AallOperator Aoperator + erw [operator_apply,operator_apply,tsum_fintype,tsum_fintype] + change (∑ i : Fin 22, (if hi : i.val<2 then 0 else u ⟨i.val-2,by omega⟩)*AallKernel p i)=_ + rw [Fin.sum_univ_succ,Fin.sum_univ_succ] + simp only [Fin.val_zero,Fin.val_succ,show 0<2 by omega,show 0+1<2 by omega,↓reduceDIte,zero_mul,zero_add] + apply Finset.sum_congr rfl + intro i _ + simp only [show ¬(i.val+1+1<2) by omega,↓reduceDIte] + congr 1 + unfold AallKernel Akernel + congr 1 <;> apply Fin.ext <;> dsimp <;> omega +lemma actualTail_full_equations {z : ℝ} (hz : 0 (a+b*y)*sqrt y*exp (-δ*y)) + ((b*sqrt x+(a+b*x)/(2*sqrt x)-δ*((a+b*x)*sqrt x))*exp (-δ*x)) x := by + have hd := (((hasDerivAt_const x a).add ((hasDerivAt_id x).const_mul b)).mul + (hasDerivAt_sqrt (ne_of_gt hx))).mul + (((hasDerivAt_id x).const_mul (-δ)).exp) + convert hd using 1 <;> first | rfl | (dsimp; ring) + +lemma linear_sqrt_exp_antitone {a b δ x y : ℝ} (hx : 0 (a+b*u)*sqrt u*exp (-δ*u)) (Ici x) := by + apply antitoneOn_of_deriv_nonpos (convex_Ici x) + · exact (by fun_prop : ContinuousOn (fun u : ℝ => (a+b*u)*sqrt u*exp (-δ*u)) (Ici x)) + · intro u hu + exact (linear_sqrt_exp_hasDerivAt (a:=a) (b:=b) (δ:=δ) (hx.trans_le (mem_Ici.mp (interior_subset hu)))).differentiableAt.differentiableWithinAt + · intro u hu + have hux : x≤u := mem_Ici.mp (interior_subset hu) + have hu0 := hx.trans_le hux + rw [(linear_sqrt_exp_hasDerivAt (a:=a) (b:=b) (δ:=δ) hu0).deriv] + apply mul_nonpos_of_nonpos_of_nonneg _ (exp_pos _).le + have hs := sq_sqrt hu0.le + have hsp : 0 g p.1 p.2)) +def Bkernel (i : Fin 20) (p : TailNode × Fin 2) : ℝ := + tailJet h H (finiteNode ⟨i.val/2,by omega⟩) p.1.val.val p.2 ⟨i.val%2,by omega⟩ +lemma Bkernel_bound (p : TailNode × Fin 2) : (∑' i, |Bkernel i p|) ≤ 335 := by + rw [tsum_fintype] + change (∑ i : Fin 20, |tailJet h H (finiteNode ⟨i.val/2,by omega⟩) p.1.val.val p.2 ⟨i.val%2,by omega⟩|) ≤ 335 + exact (sum_fin20_pairs (fun n d => |tailJet h H (finiteNode n) p.1.val.val p.2 d|)).trans_le (finite_tail_column_bound _ _).le +def Boperator : TailCoefficients →L[ℝ] FiniteCoefficients := + operator Bkernel (fun _ => (hasSum_fintype _).summable) 335 Bkernel_bound +lemma Boperator_norm : ‖Boperator‖ ≤ 335 := operator_norm _ _ _ (by norm_num) _ +def Ckernel (p : TailNode × Fin 2) (i : Fin 20) : ℝ := + jet H h p.1.val.val p.2 (finiteColumn ⟨i.val+2,by omega⟩) +lemma Ckernel_summable (i : Fin 20) : Summable (fun p => |Ckernel p i|) := + (tail_atom_column_bounds 1 0 _).1 +lemma Ckernel_bound (i : Fin 20) : (∑' p, |Ckernel p i|) ≤ 7/10^15 := + (tail_finite_column_bound ⟨i.val+2,by omega⟩).le +def Coperator : FiniteCoefficients →L[ℝ] TailCoefficients := + operator Ckernel Ckernel_summable (7/10^15) Ckernel_bound +lemma Coperator_norm : ‖Coperator‖ ≤ 7/10^15 := operator_norm _ _ _ (by norm_num) _ +def Dkernel (p q : TailNode × Fin 2) : ℝ := + tailJet h h p.1.val.val q.1.val.val q.2 p.2 +lemma Dkernel_summable (q : TailNode × Fin 2) : Summable (fun p => |Dkernel p q|) := + (tail_tail_column_bounds 0 0 q.1.val.val q.2).1 +lemma Dkernel_bound (q : TailNode × Fin 2) : (∑' p, |Dkernel p q|) ≤ 23/10^9 := + (tail_tail_column_bound q.1.val.val q.2).le +def Doperator : TailCoefficients →L[ℝ] TailCoefficients := + operator Dkernel Dkernel_summable (23/10^9) Dkernel_bound +lemma Doperator_norm : ‖Doperator‖ ≤ 23/10^9 := operator_norm _ _ _ (by norm_num) _ +def tailFixedColumn (c : Fin 23) : TailCoefficients := + column (fun p (_ : Unit) => jet (if c.val=22 then h else H) h p.1.val.val p.2 (finiteColumn c)) + (fun _ => by + by_cases hc : c.val=22 + · have hh := (tail_atom_column_bounds 0 0 (finiteColumn c)).1 + simpa [hc,damping] using hh + · have hh := (tail_atom_column_bounds 1 0 (finiteColumn c)).1 + simpa [hc,damping] using hh) () +lemma tailFixedColumn_apply (c : Fin 23) (p : TailNode × Fin 2) : + tailFixedColumn c p = jet (if c.val=22 then h else H) h p.1.val.val p.2 (finiteColumn c) := rfl +lemma tailFixedColumn_norm_finite (c : Fin 22) : ‖tailFixedColumn ⟨c.val,by omega⟩‖ ≤ 7/10^15 := by + rw [l1_norm] + have hc : c.val≠22 := by omega + simp only [tailFixedColumn_apply,hc,↓reduceIte] + exact (tail_finite_column_bound c).le +lemma tailFixedColumn_norm_constant : ‖tailFixedColumn 22‖ ≤ 127/10^9 := by + rw [l1_norm] + simp only [tailFixedColumn_apply,Fin.isValue] + have hh := tail_constant_column_bound + convert hh.le using 1 + rfl + +def Roperator : FiniteCoefficients →L[ℝ] FiniteCoefficients := l1Matrix R +def Lplus : FiniteCoefficients →L[ℝ] FiniteCoefficients := l1Matrix (1-R)⁻¹ +def Lminus : FiniteCoefficients →L[ℝ] FiniteCoefficients := l1Matrix (1+R)⁻¹ +lemma Lplus_norm : ‖Lplus‖ ≤ 17 := + ((l1Matrix_norm _).trans_lt FiniteCertificate.minusInverse_bound).le.trans (by norm_num) +lemma Lminus_norm : ‖Lminus‖ ≤ 5 := + ((l1Matrix_norm _).trans_lt FiniteCertificate.plusInverse_bound).le.trans (by norm_num) +lemma Lplus_left_inverse : (1-Roperator).comp Lplus=1 := by + have hh := (l1Matrix_inverse (1-R) FiniteCertificate.minusBlock_isUnit).1 + simpa [Lplus,l1Matrix_sub,l1Matrix_one,Roperator] using hh +lemma Lminus_left_inverse : (1+Roperator).comp Lminus=1 := by + have hh := (l1Matrix_inverse (1+R) FiniteCertificate.plusBlock_isUnit).1 + simpa [Lminus,l1Matrix_add,l1Matrix_one,Roperator] using hh +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/CoefficientAddition.lean b/lean/OAI/Analysis/Triangular/Construction/CoefficientAddition.lean new file mode 100644 index 0000000000000000000000000000000000000000..353d7acd45dd052c22f2e2114be848711b13e21c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/CoefficientAddition.lean @@ -0,0 +1,35 @@ +import OAI.Analysis.Triangular.Construction.ActualInterpolation +import OAI.Analysis.Triangular.Construction.FinitePairBridge + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +lemma inputJJet_split (C : ℝ) (a da : TrigonometricCoefficients) (w : TailCoefficients) (br : Fin 2) (k : ℕ) (s : ℂ) : + inputJJet (coefficientInput C (a+da) w) br k s= + inputJJet (coefficientInput C a 0) br k s+inputJJet (coefficientInput 0 da w) br k s := by + have hzero (T : C(Spectrum,ℂ) →L[ℂ] ℂ) : (0:ℂ) • T=0 := by + ext f + exact zero_mul _ + simp only [hzero,inputJJet,tailSpectral_coefficient,finiteSpectral_coefficient_apply, + lp.coeFn_add,lp.coeFn_zero,Pi.zero_apply,add_zero,tsum_zero,Pi.add_apply,ofReal_add,ofReal_zero,zero_add,_root_.add_apply, + _root_.smul_apply,smul_eq_mul,add_mul,Finset.sum_add_distrib] + ring +lemma gamma_actual_constant (side : Fin 2) (z : ℝ) : + (gamma side *ᵥ actualParameter z) 2=if side.val=0 then -(3/500:ℝ) else 3/500 := by + rw [gamma_actual] + rfl +lemma actualJ_split (side : Fin 2) {z : ℝ} (hz : 0 simp only [splitB,↓reduceIte,Nat.one_ne_zero,norm_neg] <;> linarith +lemma splitK_norm (e : Fin 2) : ‖splitK e‖ ≤ beta := by + have ha := AC_bound + fin_cases e + · exact (norm_sub_le _ _).trans (by linarith) + · exact (norm_sub_le _ _).trans (by simpa only [norm_neg] using (show ‖Coperator‖+‖Aoperator‖≤beta by linarith)) +lemma splitD_norm (e : Fin 2) : ‖splitD e‖ ≤ delta := by + have hh := Doperator_norm + fin_cases e <;> simp only [splitD,↓reduceIte,Nat.one_ne_zero,norm_neg] <;> + norm_num [delta] at * <;> linarith +lemma splitN_nonneg (e : Fin 2) : 0 ≤ splitN e := by fin_cases e <;> norm_num [splitN] +lemma splitQ_nonneg (e : Fin 2) : 0 ≤ splitQ e := by fin_cases e <;> norm_num [splitQ,splitN,beta,delta] +lemma splitQ_lt (e : Fin 2) : splitQ e<1 := by fin_cases e <;> norm_num [splitQ,splitN,beta,delta] +lemma splitOperator_norm (e : Fin 2) : + ‖tailOperator (splitL e) (splitB e) (splitK e) (splitD e)‖ ≤ splitQ e := by + have hb : 0≤beta := by norm_num [beta] + have hN := splitN_nonneg e + calc + _ ≤ ‖splitD e‖+‖(splitK e).comp ((splitL e).comp (splitB e))‖ := norm_add_le _ _ + _ ≤ delta+‖splitK e‖*(‖splitL e‖*‖splitB e‖) := + add_le_add (splitD_norm e) ((ContinuousLinearMap.opNorm_comp_le _ _).trans + (mul_le_mul_of_nonneg_left (ContinuousLinearMap.opNorm_comp_le _ _) (norm_nonneg _))) + _ ≤ delta+beta*(splitN e*340) := by + gcongr + · exact splitK_norm e + · exact splitL_norm e + · exact splitB_norm e + _ = splitQ e := by unfold splitQ; ring + +def correctionTail (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) : TailCoefficients := + tailSolution (splitL e) (splitB e) (splitK e) (splitD e) r s +def correctionFinite (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) : FiniteCoefficients := + AtomicTriangular.Schur.finiteSolution (splitL e) (splitB e) (splitK e) (splitD e) r s +lemma correctionTail_equation (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) : + correctionTail e r s = splitD e (correctionTail e r s) + + splitK e (correctionFinite e r s)+s := + solution_equations _ _ _ _ _ _ ((splitOperator_norm e).trans_lt (splitQ_lt e)) +lemma correctionTail_norm (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) : + ‖correctionTail e r s‖ ≤ (‖s‖+beta*splitN e*‖r‖)/(1-splitQ e) := by + have hn := neumann_norm (tailOperator (splitL e) (splitB e) (splitK e) (splitD e)) + (splitQ_nonneg e) (splitQ_lt e) (splitOperator_norm e) + have hq : 0≤1/(1-splitQ e) := by exact div_nonneg (by norm_num) (sub_pos.mpr (splitQ_lt e)).le + have hbeta : 0≤beta := by norm_num [beta] + have hN := splitN_nonneg e + calc + _ ≤ ‖neumann (tailOperator (splitL e) (splitB e) (splitK e) (splitD e))‖* + ‖s+splitK e (splitL e r)‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ (1/(1-splitQ e))*(‖s‖+‖splitK e‖*(‖splitL e‖*‖r‖)) := by + apply mul_le_mul hn _ (norm_nonneg _) hq + exact (norm_add_le _ _).trans (add_le_add_right ((ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul_of_nonneg_left (ContinuousLinearMap.le_opNorm _ _) (norm_nonneg _))) _) + _ ≤ (1/(1-splitQ e))*(‖s‖+beta*(splitN e*‖r‖)) := by + gcongr + · exact splitK_norm e + · exact splitL_norm e + _ = _ := by ring +lemma correctionFinite_norm (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) : + ‖correctionFinite e r s‖ ≤ splitN e*(‖r‖+340*‖correctionTail e r s‖) := by + have hN := splitN_nonneg e + calc + _ ≤ ‖splitL e‖*‖r+splitB e (correctionTail e r s)‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ splitN e*(‖r‖+‖splitB e‖*‖correctionTail e r s‖) := + mul_le_mul (splitL_norm e) ((norm_add_le _ _).trans + (add_le_add_right (ContinuousLinearMap.le_opNorm _ _) _)) (norm_nonneg _) (splitN_nonneg e) + _ ≤ _ := by gcongr; exact splitB_norm e + +def finiteResidualBound : ℝ := 82/10^9 +def tailResidualBound (e : Fin 2) : ℝ := 1/10^26+6*beta+(if e.val=0 then 0 else (12/1000)*(13/10^8)) +def tailErrorBound (e : Fin 2) : ℝ := if e.val=0 then 1801/10^12 else 3361/10^12 +def finiteErrorBound (e : Fin 2) : ℝ := if e.val=0 then 11804/10^9 else 6124/10^9 +lemma correctionTail_small (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) + (hr : ‖r‖≤finiteResidualBound) (hs : ‖s‖≤tailResidualBound e) : + ‖correctionTail e r s‖ ≤ tailErrorBound e := by + have hh := correctionTail_norm e r s + have hb : (‖s‖+beta*splitN e*‖r‖)/(1-splitQ e) ≤ + (tailResidualBound e+beta*splitN e*finiteResidualBound)/(1-splitQ e) := by + apply div_le_div_of_nonneg_right _ (sub_pos.mpr (splitQ_lt e)).le + apply add_le_add hs + exact mul_le_mul_of_nonneg_left hr (mul_nonneg (by norm_num [beta]) (splitN_nonneg e)) + refine (hh.trans hb).trans ?_ + fin_cases e <;> norm_num [tailResidualBound,tailErrorBound,finiteResidualBound,splitQ,splitN,beta,delta] +lemma correctionFinite_small (e : Fin 2) (r : FiniteCoefficients) (s : TailCoefficients) + (hr : ‖r‖≤finiteResidualBound) (hs : ‖s‖≤tailResidualBound e) : + ‖correctionFinite e r s‖ ≤ finiteErrorBound e := by + have hN := splitN_nonneg e + have hh := correctionFinite_norm e r s + have hb := correctionTail_small e r s hr hs + calc + _ ≤ splitN e*(‖r‖+340*‖correctionTail e r s‖) := hh + _ ≤ splitN e*(finiteResidualBound+340*tailErrorBound e) := by gcongr + _ ≤ _ := by fin_cases e <;> norm_num [splitN,finiteResidualBound,tailErrorBound,finiteErrorBound] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/CurvatureAnalytic.lean b/lean/OAI/Analysis/Triangular/Construction/CurvatureAnalytic.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a88419d2840c83ba60df61fe2bc28b375dff515 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/CurvatureAnalytic.lean @@ -0,0 +1,98 @@ +import OAI.Analysis.Triangular.Envelope.TailEnvelopeSeries +import OAI.Analysis.Triangular.Construction.CurvatureBoxes +import OAI.Analysis.Triangular.Construction.AtomicCurvature + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex + +lemma taylorPhase_re_nonpos (q br : Fin 2) {t : ℝ} (ht : |t|≤5/6) : + (taylorPhase q br t).re≤0 := by + fin_cases br + · simp only [taylorPhase,↓reduceIte,sub_re,mul_re,mul_im,I_re,I_im, + ofReal_re,ofReal_im,mul_zero,zero_mul,sub_zero,zero_sub] + have hh : h≤damping q := by fin_cases q <;> norm_num [damping,h,H] + exact neg_nonpos.mpr (mul_nonneg Real.pi_pos.le (sub_nonneg.mpr hh)) + · change (I*Real.pi*zeta (damping q) h t).re≤0 + rw [wavePhase_re] + have hh := (frequencyDecay_pos q 0 ht).le + change 0≤Real.pi*(damping q*Xwave (damping q) t-h) at hh + nlinarith + +lemma curvatureWave_nonneg (q br : Fin 2) (s t : ℝ) : 0≤curvatureWave q br s t := by + unfold curvatureWave; positivity +lemma curvatureWave_antitone (q br : Fin 2) {s u t : ℝ} (ht : |t|≤5/6) (hsu : s≤ u) : + curvatureWave q br u t≤curvatureWave q br s t := by + unfold curvatureWave + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact Real.exp_le_exp.mpr (mul_le_mul_of_nonpos_left hsu (taylorPhase_re_nonpos q br ht)) +lemma curvatureWave_direct (q : Fin 2) (s t : ℝ) : + curvatureWave q 0 s t = Real.pi^2*(t^2+(damping q-h)^2)*Real.exp (-Real.pi*(damping q-h)*s) := by + unfold curvatureWave + rw [←Complex.normSq_eq_norm_sq] + simp only [taylorPhase,taylorAmplitude,Fin.val_zero,↓reduceIte,norm_one,mul_one, + Complex.normSq_apply,sub_re,sub_im,mul_re,mul_im,ofReal_re,ofReal_im,I_re,I_im, + zero_mul,mul_zero,one_mul,sub_zero,zero_sub,zero_add] + ring_nf +lemma curvatureWave_transformed (q : Fin 2) (s t : ℝ) : + curvatureWave q 1 s t = Real.pi^2*(h^2+(4/3-2*damping q*h)*Xwave (damping q) t)* + Real.sqrt (Xwave (damping q) t)*Real.exp (-Real.pi*(damping q*Xwave (damping q) t-h)*s) := by + simp only [curvatureWave,taylorPhase,taylorAmplitude,Fin.val_one,Nat.one_ne_zero,↓reduceIte] + rw [norm_wavePhase (damping_pos q),norm_lambda (damping_pos q),wavePhase_re,mul_pow, + Real.sq_sqrt] + rw [←normSq_zeta (damping_pos q)] + exact normSq_nonneg _ +lemma curvatureWave_even (q br : Fin 2) (s t : ℝ) : + curvatureWave q br s (-t)=curvatureWave q br s t := by + fin_cases br + · simp [curvatureWave_direct] + · simp [curvatureWave_transformed,Xwave,waveDen] +lemma curvatureWave_abs (q br : Fin 2) (s t : ℝ) : + curvatureWave q br s |t|=curvatureWave q br s t := by + rcases le_total 0 t with ht|ht + · rw [abs_of_nonneg ht] + · rw [abs_of_nonpos ht,curvatureWave_even] +lemma curvature_tail_direct {s t : ℝ} (ht : |t|≤5/6) : + curvatureWave 0 0 s t≤curvatureWave 0 0 s (5/6) := by + rw [curvatureWave_direct,curvatureWave_direct] + norm_num [damping] + have hh : t^2≤(5/6:ℝ)^2 := by simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg t) (by norm_num)).mpr ht + nlinarith [mul_nonneg (sq_nonneg Real.pi) (sub_nonneg.mpr hh)] +lemma curvature_tail_zero {t : ℝ} (_ht : |t|≤5/6) : + curvatureWave 0 1 0 t≤curvatureWave 0 1 0 0 := by + rw [curvatureWave_transformed,curvatureWave_transformed] + simp only [mul_zero,Real.exp_zero,mul_one] + have hx : Xwave (damping 0) t≤Xwave (damping 0) 0 := by + rw [←show Xwave (damping 0) |t|=Xwave (damping 0) t by simp [Xwave,waveDen]] + exact Xwave_antitone (damping_pos 0) le_rfl (abs_nonneg t) + have h1 : 0≤4/3-2*damping 0*h := by norm_num [damping,h] + apply mul_le_mul (mul_le_mul_of_nonneg_left (add_le_add_right (mul_le_mul_of_nonneg_left hx h1) _) (sq_nonneg _)) (Real.sqrt_le_sqrt hx) (Real.sqrt_nonneg _) + exact mul_nonneg (sq_nonneg _) (add_nonneg (sq_nonneg _) (mul_nonneg h1 (Xwave_pos (damping_pos 0) 0).le)) +lemma curvature_tail_positive {s t : ℝ} (hs : 1 ≤ s) (ht : |t| ≤ 5/6) : + curvatureWave 0 1 s t≤curvatureWave 0 1 s (5/6) := by + rw [←curvatureWave_abs 0 1 s t] + rw [curvatureWave_transformed,curvatureWave_transformed] + have hx := Xwave_pos (damping_pos 0) (5/6) + have hxy := Xwave_antitone (damping_pos 0) (abs_nonneg t) ht + have hbase : (3/2:ℝ)≤Real.pi*h*Xwave h (5/6) := by + have hp := Real.pi_gt_three + norm_num [Xwave,waveDen,h] at * + linarith + have hb : (3/2:ℝ)≤(Real.pi*damping 0*s)*Xwave (damping 0) (5/6) := by + change (3/2:ℝ)≤(Real.pi*h*s)*Xwave h (5/6) + have hh : 0 ≤ h := by norm_num [h] + nlinarith [mul_nonneg (sub_nonneg.mpr hs) (mul_nonneg Real.pi_pos.le (mul_nonneg hh hx.le))] + have hh := Envelope.linear_sqrt_exp_antitone hx hxy (sq_nonneg h) + (show 0≤4/3-2*damping 0*h by norm_num [damping,h]) hb + have he (x : ℝ) : Real.exp (-Real.pi*(damping 0*x-h)*s) = + Real.exp (Real.pi*h*s)*Real.exp (-(Real.pi*damping 0*s)*x) := by + rw [←Real.exp_add]; congr 1; ring + rw [he,he] + convert mul_le_mul_of_nonneg_left hh (show 0≤Real.pi^2*Real.exp (Real.pi*h*s) by positivity) using 1 <;> first | rfl | ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/CurvatureBoxes.lean b/lean/OAI/Analysis/Triangular/Construction/CurvatureBoxes.lean new file mode 100644 index 0000000000000000000000000000000000000000..85f1a74c26342b96277bae0e415572d82120e9a6 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/CurvatureBoxes.lean @@ -0,0 +1,54 @@ +import OAI.Analysis.Triangular.Envelope.EnvelopeBoxes +import OAI.Analysis.Triangular.Envelope.EnvelopeWaves +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex + +def curvatureWave (q br : Fin 2) (s t : ℝ) : ℝ := + ‖taylorPhase q br t‖^2 * ‖taylorAmplitude q br t‖ * Real.exp ((taylorPhase q br t).re*s) +def curvaturePoint : Fin 5 → ℝ := ![0,1,2,29/2,23] +def rawCurvatureColumn (br : Fin 2) (s : ℝ) (c : Fin 22) : ℝ := + ∑ j : Fin 31, curvatureWave 1 br s (frequency j)*‖finiteColumn ⟨c.val,by omega⟩ j‖ +def rawConstantCurvature (s : ℝ) : ℝ := + (∑ j : Fin 31, curvatureWave 0 1 s (frequency j)*‖fourierCoeff j‖)/2 +def rawTailCurvature (i : Fin 5) : ℝ := + 60*(curvatureWave 0 0 (curvaturePoint i) (frequency 30)+ + curvatureWave 0 1 (curvaturePoint i) (frequency (if i.val=0 then 15 else 30))) +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvaturePointBox : Fin 5 → RI := + ![RI.point 0,RI.point 1,RI.point 2,(RI.point 29).divNat 2,RI.point 23] +lemma curvaturePointBox_mem (i : Fin 5) : (curvaturePointBox i).Mem (curvaturePoint i) := by + fin_cases i <;> norm_num [curvaturePointBox,curvaturePoint,RI.Mem,RI.point,RI.divNat,scale] +def amplitudeNormBox (q br : Fin 2) (j : Fin 31) : RI := + if br.val=0 then RI.point 1 else if q.val=0 then lambdaNorm0 j else lambdaNorm1 j +lemma amplitudeNormBox_mem (q br : Fin 2) (j : Fin 31) : + (amplitudeNormBox q br j).Mem ‖taylorAmplitude q br (frequency j)‖ := by + fin_cases br + · simpa [amplitudeNormBox,taylorAmplitude] using ri1_mem + · fin_cases q + · simpa [amplitudeNormBox,taylorAmplitude] using lambdaNorm0_mem j + · simpa [amplitudeNormBox,taylorAmplitude] using lambdaNorm1_mem j + +def curvatureExpInput (q br : Fin 2) (i : Fin 5) (j : Fin 31) : CI := + CI.ofReal ((taylorPhaseTable q br j).re.mul (curvaturePointBox i)) +def curvatureBox (q br : Fin 2) (i : Fin 5) (j : Fin 31) : RI := + ((taylorPhaseTable q br j).normSq.mul (amplitudeNormBox q br j)).mul + (curvatureExpInput q br i j).exp.re +lemma curvatureBox_mem (q br : Fin 2) (i : Fin 5) (j : Fin 31) + (hp : (curvatureExpInput q br i j).normSq.hi ≤ scale*1024^2) : + (curvatureBox q br i j).Mem (curvatureWave q br (curvaturePoint i) (frequency j)) := by + have hs := CI.mem_normSq (taylorPhaseTable_mem q br j) + rw [Complex.normSq_eq_norm_sq] at hs + exact RI.mem_mul (RI.mem_mul hs (amplitudeNormBox_mem q br j)) + (ri_exp_mem (RI.mem_mul (taylorPhaseTable_mem q br j).1 (curvaturePointBox_mem i)) hp) +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/CurvatureEnvelope.lean b/lean/OAI/Analysis/Triangular/Construction/CurvatureEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf4113acc5023ebe30e941d65f911211ff05559e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/CurvatureEnvelope.lean @@ -0,0 +1,101 @@ +import OAI.Analysis.Triangular.Construction.CurvatureAnalytic +import OAI.Analysis.Triangular.Taylor.CoefficientSpectral +import OAI.Analysis.Triangular.Construction.CurvatureSums + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open Complex AtomicTriangular.FiniteCertificate + +def finiteCurvatureCap (br : Fin 2) : Fin 5 → ℝ := + if br.val=0 then ![828/10,44164/1000,23561/1000,9147/1000000,43834/1000000000] + else ![291294/100,45877/1000,3893/1000,635/10000000000,167/100000000000000] +def finiteCurvatureEnvelope : Fin 5 → ℝ := ![1510,46,14,465/100000,23/1000000] +def tailCurvatureEnvelope : Fin 5 → ℝ := ![26500,1160,800,800,800] +lemma finiteCurvatureCap_bound (br : Fin 2) (i : Fin 5) (c : Fin 22) : + rawCurvatureColumn br (curvaturePoint i) c≤finiteCurvatureCap br i := by + fin_cases br <;> fin_cases i + all_goals first + | exact (curvatureColumn0_0_bound c).le | exact (curvatureColumn0_1_bound c).le + | exact (curvatureColumn0_2_bound c).le | exact (curvatureColumn0_3_bound c).le + | exact (curvatureColumn0_4_bound c).le | exact (curvatureColumn1_0_bound c).le + | exact (curvatureColumn1_1_bound c).le | exact (curvatureColumn1_2_bound c).le + | exact (curvatureColumn1_3_bound c).le | exact (curvatureColumn1_4_bound c).le +lemma finiteCurvatureCap_sum (i : Fin 5) : + (finiteCurvatureCap 0 i+finiteCurvatureCap 1 i)/2≤finiteCurvatureEnvelope i := by + fin_cases i <;> norm_num [finiteCurvatureCap,finiteCurvatureEnvelope] +lemma finiteCurvatureCap_nonneg (br : Fin 2) (i : Fin 5) : 0≤finiteCurvatureCap br i := by + fin_cases br <;> fin_cases i <;> norm_num [finiteCurvatureCap] +lemma rawCurvatureColumn_antitone (br : Fin 2) (c : Fin 22) {u s : ℝ} (hus : u≤ s) : + rawCurvatureColumn br s c≤rawCurvatureColumn br u c := by + apply Finset.sum_le_sum + intro j _ + exact mul_le_mul_of_nonneg_right (curvatureWave_antitone 1 br (abs_le.mpr (frequency_mem j)) hus) (norm_nonneg _) +lemma finiteSpectral_curvature (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (br : Fin 2) (i : Fin 5) {s : ℝ} (hs : curvaturePoint i≤ s) : + ‖finiteSpectral (coefficientInput C a w) (waveFunctionJet 1 br 2 s)‖≤‖a‖*finiteCurvatureCap br i := by + apply finiteSpectral_wave_bound + intro c + exact (rawCurvatureColumn_antitone br c hs).trans (finiteCurvatureCap_bound br i c) +def tailCurvatureCap (br : Fin 2) (i : Fin 5) : ℝ := + curvatureWave 0 br (curvaturePoint i) (if br.val=1 ∧ i.val=0 then 0 else 5/6) +lemma tailCurvatureCap_nonneg (br : Fin 2) (i : Fin 5) : 0≤tailCurvatureCap br i := curvatureWave_nonneg _ _ _ _ +lemma tailCurvatureCap_bound (br : Fin 2) (i : Fin 5) {s t : ℝ} + (hs : curvaturePoint i≤ s) (ht : |t|≤5/6) : curvatureWave 0 br s t≤tailCurvatureCap br i := by + apply (curvatureWave_antitone 0 br ht hs).trans + fin_cases br + · exact curvature_tail_direct ht + · by_cases hi : i=0 + · subst i + exact curvature_tail_zero ht + · have hu : 1≤curvaturePoint i := by fin_cases i <;> norm_num [curvaturePoint] at * + have hval : ¬i.val=0 := by simpa only [Fin.val_eq_zero_iff] using hi + simp only [tailCurvatureCap,true_and,hval,↓reduceIte] + convert curvature_tail_positive hu ht using 1 <;> rfl +lemma tailCurvatureCap_sum (i : Fin 5) : + (119/2)*(tailCurvatureCap 0 i+tailCurvatureCap 1 i)≤tailCurvatureEnvelope i := by + have he : 60*(tailCurvatureCap 0 i+tailCurvatureCap 1 i)=rawTailCurvature i := by + fin_cases i <;> norm_num [tailCurvatureCap,rawTailCurvature,frequency] + have hb : rawTailCurvature i tailCurvatureCap_bound br i hs ht)) + (norm_nonneg _) (by positivity)) +lemma pairJ_curvature (a b : TrigonometricCoefficients) (w v : TailCoefficients) + (i : Fin 5) {s aL aT : ℝ} (hs : curvaturePoint i≤ s) + (ha : ‖a‖≤aL) (hb : ‖b‖≤aL) (hw : ‖w‖≤aT) (hv : ‖v‖≤aT) : + |iteratedDeriv 2 (pairJ (coefficientInput 0 a w) (coefficientInput 0 b v)) s|/2≤ + aL*finiteCurvatureEnvelope i+aT*tailCurvatureEnvelope i := by + rw [←pairJJet_iterated] + have hTa := tailSpectral_curvature a w 0 i hs + have hTb := tailSpectral_curvature b v 1 i hs + have hLa := finiteSpectral_curvature 0 a w 0 i hs + have hLb := finiteSpectral_curvature 0 b v 1 i hs + have hh := Complex.abs_re_le_norm (pairJJet (coefficientInput 0 a w) (coefficientInput 0 b v) 2 s) + have hN := norm_add_le (inputJJet (coefficientInput 0 a w) 0 2 s) (inputJJet (coefficientInput 0 b v) 1 2 s) + have hNa := norm_add_le (tailSpectral (coefficientInput 0 a w) (waveFunctionJet 0 0 2 s)) (finiteSpectral (coefficientInput 0 a w) (waveFunctionJet 1 0 2 s)) + have hNb := norm_add_le (tailSpectral (coefficientInput 0 b v) (waveFunctionJet 0 1 2 s)) (finiteSpectral (coefficientInput 0 b v) (waveFunctionJet 1 1 2 s)) + have hL0 := mul_le_mul_of_nonneg_right ha (finiteCurvatureCap_nonneg 0 i) + have hL1 := mul_le_mul_of_nonneg_right hb (finiteCurvatureCap_nonneg 1 i) + have hT0 := mul_le_mul_of_nonneg_right hw (tailCurvatureCap_nonneg 0 i) + have hT1 := mul_le_mul_of_nonneg_right hv (tailCurvatureCap_nonneg 1 i) + have hLf := mul_le_mul_of_nonneg_left (finiteCurvatureCap_sum i) ((norm_nonneg a).trans ha) + have hTf := mul_le_mul_of_nonneg_left (tailCurvatureCap_sum i) ((norm_nonneg w).trans hw) + change |(pairJJet _ _ 2 s).re|/2≤_ + dsimp only [pairJJet,inputJJet] at hh hN ⊢ + nlinarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/CurvatureSums.lean b/lean/OAI/Analysis/Triangular/Construction/CurvatureSums.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c12131d275b74534a817b4561495254fe153fd5 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/CurvatureSums.lean @@ -0,0 +1,177 @@ +import OAI.Analysis.Triangular.Envelope.EnvelopeSumsBase +import OAI.Analysis.Triangular.Envelope.EnvelopeNorms +import OAI.Analysis.Triangular.Taylor.CurvatureData00 +import OAI.Analysis.Triangular.Taylor.CurvatureData01 +import OAI.Analysis.Triangular.Taylor.CurvatureData10 +import OAI.Analysis.Triangular.Taylor.CurvatureData11 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvatureColumn0_0 : Fin 22 → RI := ![⟨18931278953418004980981475350303064450074551871382092339685998,18931278953418004980981475350323566839439921866716315086729279⟩,⟨53153971995326934122877094040140299390063339738708527238055811,53153971995326934122877094040140300227771194920246741417165810⟩,⟨10906661929182473281713140014972139345824732340463494747135871,10906661929182473281713140014992642614594582274364751588478823⟩,⟨39910794816684720571431237362312035443007220174642251180355223,39910794816684720571431237362312062710999669093301784031260291⟩,⟨5171459074464329276346267760914009460734455361639903528531148,5171459074464329276346267760934549495431818609173876445333941⟩,⟨25552119883320652976287576564643637183688623268688467964614394,25552119883320652976287576564645303496653581345673454036276311⟩,⟨4050667990041770235350762754727619171544511661115989064320886,4050667990041770235350762754748197851927653664513364582633457⟩,⟨21189146532965609575648057106675042960720483923249955867507375,21189146532965609575648057106678708303162073897146027459888648⟩,⟨3170024831191457863357988051835930047935532821096119276246995,3170024831191457863357988051856441383748919647718543468991344⟩,⟨13641100870844811559736685323914012826011918252890656293489020,13641100870844811559736685323914344708045339139810406967306356⟩,⟨4257338934769909478475186436649126153387702488665189820909304,4257338934769909478475186436669628541156838573647247232029314⟩,⟨12056225255145991332415226171747301433641240891321531621118492,12056225255145991332415226171759402395082195433248858729169900⟩,⟨4687058798308615317454560150776022606226564183537041405362170,4687058798308615317454560150796563640182762162300082072790461⟩,⟨13405653299561784449405535281100747885199663356148886958002555,13405653299561784449405535281123551230330284418991753439916629⟩,⟨6959348639004267529004408373125516740656320733551809531984855,6959348639004267529004408373146099324023897202292721578977076⟩,⟨17421475348538079960123039275314841127751640054818818610532594,17421475348538079960123039275318249088860636594975958561765259⟩,⟨23692305685851956133903664854954503341660492352698432530051452,23692305685851956133903664854975013940435526148636252024482656⟩,⟨38953628097574911294595585002706736098602568869154574558311259,38953628097574911294595585002707065091648242008295457224700586⟩,⟨31898183105943367001537947368084484460791891565102351882507821,31898183105943367001537947368104987724493390620932233311848909⟩,⟨51870935959559777069906569196424487810808541920297387509966171,51870935959559777069906569196424515586567374225863168686094767⟩,⟨48697204576559363243147058658536891341040415083104777792831871,48697204576559363243147058658557431788360499096354193678391084⟩,⟨82782070552052637321534860770614371769314130420709126926616388,82782070552052637321534860770616022460080603773879098429307209⟩] +lemma curvatureColumn0_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable10 0 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn0_0 c := by + revert c + decide +kernel +lemma curvatureColumn0_0_bound (c : Fin 22) : rawCurvatureColumn 0 (curvaturePoint 0) c < (828/10:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable10_mem 0 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn0_0_calc] at hh + have hb := ri_mem_lt hh 828 10 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn0_1 : Fin 22 → RI := ![⟨10099611870772150463903374712483665635789245849855202842367989,10099611870772150463903374712494603416354583624502812411580649⟩,⟨28357011053696926667774517557794339456067415376376488197676815,28357011053696926667774517557794339902974579929197734449562675⟩,⟨5818574252775567222942745269580739056234852583591372264104688,5818574252775567222942745269591677305952007657629504776169146⟩,⟨21291933740681829691328782995547616246799309597217530103449399,21291933740681829691328782995547630793948549057451026330799143⟩,⟨2758911829791738608239320561600807893057901176074696414532469,2758911829791738608239320561611765756959542521675353728166545⟩,⟨13631751659883759092995686955172465915957457774875153957929387,13631751659883759092995686955173354874080293615789516463073547⟩,⟨2160983133651220036444169192958627165103911722834548554054316,2160983133651220036444169192969605646018688083496744741393808⟩,⟨11304157335721491759955944093328278841884413009650144925714390,11304157335721491759955944093330234258426772048441823867550833⟩,⟨1691170495903727679459132502248422186353122759603429941932935,1691170495903727679459132502259364739741935079361335141774572⟩,⟨7277364863968184715208718587326380089037083832518719351890280,7277364863968184715208718587326557144149560975213330037116524⟩,⟨2271239621438229950229096209008056180750654575953111224462865,2271239621438229950229096209018993960464420568832041196120037⟩,⟨6431852597132184159883505885306866794481647895840513502877020,6431852597132184159883505885313322513301149780560738702960088⟩,⟨2500490051141423509539923377665623967568102649324399930145950,2500490051141423509539923377676582364562432241608678774382479⟩,⟨7151756388612366122191593453940482907416203538514365994444500,7151756388612366122191593453952648220480430173853894047880101⟩,⟨3712729620659854111980538528224259005982073891756769470626533,3712729620659854111980538528235239569092565753624268995197334⟩,⟨9294149627682292963261072081765979914098420476064636780504649,9294149627682292963261072081767798020764971759535602859757906⟩,⟨12639562933892051862322384183918321501192700581010544162522880,12639562933892051862322384183929263661380328881497886900055192⟩,⟨20781296694848003320827528692249623672431249942091575745532252,20781296694848003320827528692249799186303168353237939261578176⟩,⟨17017300814464205803313101021243084884391469225703580586630825,17017300814464205803313101021254023131404719464819520450176593⟩,⟨27672526608174409576854076499561611981512702306951422823717722,27672526608174409576854076499561626799549260360498829007157527⟩,⟨25979378711021591704856352723377551477205137972313807230429251,25979378711021591704856352723388509561236086960033372331191720⟩,⟨44163248795383593382531747115579451958004733308925423515917645,44163248795383593382531747115580332581870720888206040328333088⟩] +lemma curvatureColumn0_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable10 1 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn0_1 c := by + revert c + decide +kernel +lemma curvatureColumn0_1_bound (c : Fin 22) : rawCurvatureColumn 0 (curvaturePoint 1) c < (44164/1000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable10_mem 1 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn0_1_calc] at hh + have hb := ri_mem_lt hh 44164 1000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn0_2 : Fin 22 → RI := ![⟨5388022657699280723992928518703689853912306170355691151179656,5388022657699280723992928518709525029586881587892792393350225⟩,⟨15128127696086087801175958661940776654546401796890999599715860,15128127696086087801175958661940776892966051909113200959158862⟩,⟨3104140070985079840845152154853575630971934357239231202673152,3104140070985079840845152154859411056933417217750209259490534⟩,⟨11358993086954602748008476581125002234807521578523896409320255,11358993086954602748008476581125009995538400155558348581034202⟩,⟨1471846605564257395081805206638268607525111838522796424106333,1471846605564257395081805206644114497420434588781346007761935⟩,⟨7272377171259364815861742713032459091351210499307157502840454,7272377171259364815861742713032933339923222122558104468780125⟩,⟨1152858766851659826275096276718949803634436956611335792515198,1152858766851659826275096276724806692460741106257247489727253⟩,⟨6030633318427550231777347479019357138944372090288755007368684,6030633318427550231777347479020400330382843179334746574002767⟩,⟨902219319569274129967815879512436833262938955427714915564785,902219319569274129967815879518274555181998922842527972394853⟩,⟨3882387489451853147551613139111923731711241451225965570614188,3882387489451853147551613139112018188505214802659639766951459⟩,⟨1211679290051561284278905489992744524226615678470282613227501,1211679290051561284278905489998579699446887691724553031900304⟩,⟨3431316764223403684798503424303957699265276521760357150378044,3431316764223403684798503424307401748374913492783792025167282⟩,⟨1333981664175733172318528326744139214539098581783744102213078,1333981664175733172318528326749985388833021959390152817733372⟩,⟨3815376863709413600140459324842183747818274092671935569273080,3815376863709413600140459324848673797462434020322302830814200⟩,⟨1980697038063221469717550014902855785352557875954285418934202,1980697038063221469717550014908713785005479566412123520719711⟩,⟨4958318143187314475468451981984269122153397637516668401251673,4958318143187314475468451981985239060408336090717510995126622⟩,⟨6743056301827935224821194428173157978848228739054049593026270,6743056301827935224821194428178995490999139629266608563778145⟩,⟨11086574304132314519338071208534244642352470379693483100597473,11086574304132314519338071208534338276912960141248090157397440⟩,⟨9078527327031585772273737145670387083129124243923266340359134,9078527327031585772273737145676222507648106075559611179076075⟩,⟨14762963395862727902459620085164850163883472798653845072446523,14762963395862727902459620085164858069129509872822862689545707⟩,⟨13859689156275755482504897634461963172242957290387694426265182,13859689156275755482504897634467809179574644167846491792560468⟩,⟨23560567296230658394109238891965789521227584001231156296564775,23560567296230658394109238891966259323572818982428585417944630⟩] +lemma curvatureColumn0_2_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable10 2 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn0_2 c := by + revert c + decide +kernel +lemma curvatureColumn0_2_bound (c : Fin 22) : rawCurvatureColumn 0 (curvaturePoint 2) c < (23561/1000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable10_mem 2 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn0_2_calc] at hh + have hb := ri_mem_lt hh 23561 1000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn0_3 : Fin 22 → RI := ![⟨2091647658548870926330018214280994892214515139338851753764,2091647658548870926330018214283260126106860845953738992876⟩,⟨5872787641033867980711936500282481093497733108333233962585,5872787641033867980711936500282481186053005160996636198832⟩,⟨1205037120993867603897779706893130424988403495650970066041,1205037120993867603897779706895395756042928572550291454102⟩,⟨4409597509737765697906659839950682466633488578083523576662,4409597509737765697906659839950685479374080455075924764114⟩,⟨571375567968780098227917713716909732156901575153899657133,571375567968780098227917713719179125344068974963075092240⟩,⟨2823160118046758664730596647312655018685039329687982609447,2823160118046758664730596647312839123500151935556640113929⟩,⟨447543466966875163370650848946382253174806035040012606238,447543466966875163370650848948655916182220183462770293605⟩,⟨2341111175921081332373917898546971726297348474838822973918,2341111175921081332373917898547376696556071923644011793963⟩,⟨350244430501419210616447220271366824830985345142027093916,350244430501419210616447220273633047183597934876856375940⟩,⟨1507155262290403790066985026813606471333709694888275825490,1507155262290403790066985026813643139763762800379987538553⟩,⟨470377782529725594198326207045435885661878919346804872921,470377782529725594198326207047701119377862588864218847388⟩,⟨1332048161559149678646172881045321130630094056979195446432,1332048161559149678646172881046658121528936255766367826143⟩,⟨517855956012579153152552834511696593119886476319760742169,517855956012579153152552834513966096711501831954206943724⟩,⟨1481141522680051318584080496194004004907455800084452718512,1481141522680051318584080496196523462972962453195682250967⟩,⟨768912936184398651913159612937001947738672563825116449685,768912936184398651913159612939276041972538648723671050620⟩,⟨1924834989273530006491791254861456813570808933294285808264,1924834989273530006491791254861833346708987177431344188831⟩,⟨2617676060628176192874849746171282511020214816525811920232,2617676060628176192874849746173548651940159852703249422122⟩,⟨4303843665436323494715746401391359818295440747540283382303,4303843665436323494715746401391396167531821147574834259507⟩,⟨3524313395290362780236926789070842418914673968534176848970,3524313395290362780236926789073107749409215524356768037853⟩,⟨5731029689727484104467202143541648399032303728226466574941,5731029689727484104467202143541651467874143149790977209748⟩,⟨5380375735895307936724282246038064726512455166350564778448,5380375735895307936724282246040334165288795377849356977632⟩,⟨9146287710728929951189203722741628289142951515661081138483,9146287710728929951189203722741810667918584044106235693263⟩] +lemma curvatureColumn0_3_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable10 3 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn0_3 c := by + revert c + decide +kernel +lemma curvatureColumn0_3_bound (c : Fin 22) : rawCurvatureColumn 0 (curvaturePoint 3) c < (9147/1000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable10_mem 3 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn0_3_calc] at hh + have hb := ri_mem_lt hh 9147 1000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn0_4 : Fin 22 → RI := ![⟨10024177015858215932838726634059815047242158049720294777,10024177015858215932838726634070671132599740912213449237⟩,⟨28145210140751058852955064512256060187280944403205323059,28145210140751058852955064512256060630850121561125855721⟩,⟨5775114829762064553976883764877752675987806184314541072,5775114829762064553976883764888609226993071759303002440⟩,⟨21132902487489458734796150046167424676159298654241028494,21132902487489458734796150046167439114654650585811609064⟩,⟨2738305284088436636902884596714567876179200572905427944,2738305284088436636902884596725443894868950250172836543⟩,⟨13529934954267377840065211580614063243345078502912595110,13529934954267377840065211580614945561764539727076042995⟩,⟨2144842567930056691188415032373355095314565267559747502,2144842567930056691188415032384251577027235831032241914⟩,⟨11219725628894004985686161663108534629526006612793405232,11219725628894004985686161663110475440896894058765107360⟩,⟨1678539000493253950567320195242269218480893705563733732,1678539000493253950567320195253130041013329073139321291⟩,⟨7223009610549200161218045656700245845209505632184731036,7223009610549200161218045656700421577882378918845907884⟩,⟨2254275540688374991510978476415391350211019404151217776,2254275540688374991510978476426247434723390946507774482⟩,⟨6383812546316312047511384681867524806917531847696840749,6383812546316312047511384681873932307427385259798533953⟩,⟨2481813679550604242826044836430667603005191773836409409,2481813679550604242826044836441544150805915340036229658⟩,⟨7098339315515127168140112725370001549063106791808789962,7098339315515127168140112725382075998375565076464260701⟩,⟨3684998929237973657362595100066738325102547644164597486,3684998929237973657362595100077636873458837874763549514⟩,⟨9224730838358163157933307657323308293140631775954084777,9224730838358163157933307657325112820214782458814339403⟩,⟨12545156969752679841302531312306172378460356244500977460,12545156969752679841302531312317032810728460478640538029⟩,⟨20626079432921735331321394208831988439722456585052487348,20626079432921735331321394208832162642666427174379248531⟩,⟨16890197155987898025755310864236240080038523712906256343,16890197155987898025755310864247096628360080146781195673⟩,⟨27465838167420494263614374387691835736186262493467847646,27465838167420494263614374387691850443545652734161949846⟩,⟨25785336535055254940617645130668766206884107787483524150,25785336535055254940617645130679642444059000697707450799⟩,⟨43833389756438856736036931141894651599373411099242844407,43833389756438856736036931141895525645785293064228745766⟩] +lemma curvatureColumn0_4_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable10 4 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn0_4 c := by + revert c + decide +kernel +lemma curvatureColumn0_4_bound (c : Fin 22) : rawCurvatureColumn 0 (curvaturePoint 4) c < (43834/1000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable10_mem 4 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn0_4_calc] at hh + have hb := ri_mem_lt hh 43834 1000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn1_0 : Fin 22 → RI := ![⟨1058499932694297960295845242156766039153190046624018212610135487,1058499932694297960295845242156812199561029336678790007456361467⟩,⟨2422019594396479840112235111927886942388328603172501572816687649,2422019594396479840112235111927886944751436743301852524841070739⟩,⟨512929371103136489128038858862251381154513195020104627419606229,512929371103136489128038858862297544629981831238889059496542592⟩,⟨1710812219114451314420354774967307022862246709922899168329053899,1710812219114451314420354774967307095886959757785903360867337506⟩,⟨220722556479815099731798455180928928745767189634487947797423821,220722556479815099731798455180975212849025500603782749698527938⟩,⟨1050380114163500856414032728698156134501460941336323789223313591,1050380114163500856414032728698160464539801088034831272687315696⟩,⟨167428954823840485917511441512051139687057474093271616617038055,167428954823840485917511441512097549064080690776007140342770918⟩,⟨861852346726326464114200873982381134783905630825990199679877536,861852346726326464114200873982390622202968045439660740437014328⟩,⟨123690710020062520758016987182361092613217718621934961529529800,123690710020062520758016987182407283336368586252934200296459631⟩,⟨511216114745745943443653892216227294351336465403333715248075398,511216114745745943443653892216228169103115356815094201791204539⟩,⟨170832868374401166609870222505323671970080505807538944366000695,170832868374401166609870222505369832370816429133219135812587836⟩,⟨384627149369005958233521415715264632052800161851321640645078603,384627149369005958233521415715481063304381741551419365986192192⟩,⟨142949747028953210297425020919416258288498325617985070199562411,142949747028953210297425020919462546620603105033455495586625873⟩,⟨396398463401248617919267216535216163376367963464099827127769974,396398463401248617919267216535395265894679537601909413880945906⟩,⟨238059293790868663995364503248530352563243939025592309015755308,238059293790868663995364503248576775791311955261183134267174086⟩,⟨483099045015476558457052171035507155017706393628534625003319415,483099045015476558457052171035515818611231742698425938372298945⟩,⟨1260577198657405506011828913972117831340287470875556470158080162,1260577198657405506011828913972164018894536393113441234236523849⟩,⟨1053084952382937612174359381168037551795251616276329462120548551,1053084952382937612174359381168038419169821377691563374149584073⟩,⟨1510326873385029286950778038402781511134585271232170315685743424,1510326873385029286950778038402827674581303317840960817374782937⟩,⟨1478079488516475082264873232116025962363823329170199354291498963,1478079488516475082264873232116026037256637681071698570074246760⟩,⟨2808301589493704590979127227184162915950583115106120455280573563,2808301589493704590979127227184209202178538149831867257756356932⟩,⟨2912933586518956541139929332473683756538058684744762080888513837,2912933586518956541139929332473688025683657170033607150130266758⟩] +lemma curvatureColumn1_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable11 0 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn1_0 c := by + revert c + decide +kernel +lemma curvatureColumn1_0_bound (c : Fin 22) : rawCurvatureColumn 1 (curvaturePoint 0) c < (291294/100:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable11_mem 0 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn1_0_calc] at hh + have hb := ri_mem_lt hh 291294 100 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn1_1 : Fin 22 → RI := ![⟨9270259362346716978466799944457304084114037333341404923620760,9270259362346716978466799944470852947668652837833837981935356⟩,⟨27872111694533796162667262297548217267220090721459286275602402,27872111694533796162667262297548217830568099466141286890817868⟩,⟨5666026977098111673216153849428611006268414737730139484890449,5666026977098111673216153849442160475650652811769389304088025⟩,⟨21314071875525581465196204539713715341700720345180361152283212,21314071875525581465196204539713733634682358176092258693154921⟩,⟨2765544057976893594882064717794268832948198932882768124481396,2765544057976893594882064717807843592246589575847879741117312⟩,⟨13803961780347957739080071808413588040745118084177704522445195,13803961780347957739080071808414704262611245108059010194152248⟩,⟨2182069542415650330586295068199032939551792961385605379304877,2182069542415650330586295068212634258235120460331981285581498⟩,⟨11478120585351167333785359299521166686954476456570090729873530,11478120585351167333785359299523621344848954597040371561352305⟩,⟨1740537632190099241930054432317353484763512262818070517075116,1740537632190099241930054432330908508128523074694959054728486⟩,⟨7545201734234663671084394356751160887545154111332571527361903,7545201734234663671084394356751383367971029787866359146796613⟩,⟨2307435542176419854279345516466552719764801004753261267134835,2307435542176419854279345516480101582207319844307205873149155⟩,⟨6860901960868398845947545357672339167202965457021621918194102,6860901960868398845947545357680378068660545574164344317543727⟩,⟨2776039856083173213030980089771677863514643166940299869715061,2776039856083173213030980089785253319804845666905399907903065⟩,⟨7867199364802920160885877260151455413588226676621315798706886,7867199364802920160885877260166669893165748086822032339287282⟩,⟨4005911433086196820315416305739695047758724459661875034240667,4005911433086196820315416305753299096944557151534940341603772⟩,⟨10385980574123612329244027411133114197399764373032731384686132,10385980574123612329244027411135391843431099203513751257034385⟩,⟨11834881908768397279563847846071356820849847179573371909860792,11834881908768397279563847846084911330341523761192402365734668⟩,⟨22744854138567463076442858393702819738451661324648470087714999,22744854138567463076442858393703040231975389397319063148514865⟩,⟨16632110560540465780749888314401211898461731510228923054606859,16632110560540465780749888314414761364330992276476380650878282⟩,⟨30839664347490436475292992345200376683394552663207878087124915,30839664347490436475292992345200395330947461948655006260875933⟩,⟨23563627475565198277634050028845244599404887934752247079436683,23563627475565198277634050028858819646623892715617886980414484⟩,⟨45876472112082918662366993203297603245388858626401184781017299,45876472112082918662366993203298708541513383365798219266894991⟩] +lemma curvatureColumn1_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable11 1 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn1_1 c := by + revert c + decide +kernel +lemma curvatureColumn1_1_bound (c : Fin 22) : rawCurvatureColumn 1 (curvaturePoint 1) c < (45877/1000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable11_mem 1 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn1_1_calc] at hh + have hb := ri_mem_lt hh 45877 1000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn1_2 : Fin 22 → RI := ![⟨492737994145033258700847028046463667588492418873980399900044,492737994145033258700847028050440491097563524774734674439459⟩,⟨2088225632928948965862684975488287924817843951890290961125088,2088225632928948965862684975488288068920447118821604914009135⟩,⟨373259149351668988056358864045218250189980081629738817969576,373259149351668988056358864049195200175335144260500511298646⟩,⟨1730740367376542488918229535524054157407011376294068374878621,1730740367376542488918229535524058969784406138827643301889767⟩,⟨219272662534707682167763991420799780154700399892488090903117,219272662534707682167763991424782227867682253103174660269307⟩,⟨1204796664817511404320493407604269445398193685512890150121326,1204796664817511404320493407604567767730513142964726992135074⟩,⟨178686680211071685234108861684963464727159670710887448489495,178686680211071685234108861688951745768145011599439292576608⟩,⟨1021065582736533232735111218482377889096478055674461397327563,1021065582736533232735111218483035447415013645602860319770280⟩,⟨150101691034635769719078825107773978472035350010418773478875,150101691034635769719078825111752112037074136280076271457321⟩,⟨768863569952289287926862957712573757772030933970583739067370,768863569952289287926862957712632760930932724388281382835873⟩,⟨198469835165894648430327472150392663053309590747421413645226,198469835165894648430327472154369486381987855089091999344079⟩,⟨834494366484370953353125088747187130385162605937530597745682,834494366484370953353125088747950906379540149131122186007742⟩,⟨294188263747599027157576910856834958495359851064983130884618,294188263747599027157576910860817524454698224763826032828141⟩,⟨1135548606651355606860482908266551594232553299527499636403108,1135548606651355606860482908268017408079263282959352781623739⟩,⟨371385030865852095875809226481846514902983741735185942181989,371385030865852095875809226485835314301186787736098384090502⟩,⟨1411179907701577172759281232326094485496625845649448157584513,1411179907701577172759281232326713078263324436152987205493851⟩,⟨689198484301338120805034581534468972446045660363658863837789,689198484301338120805034581538447019802160348578856082547394⟩,⟨2432278457694674313559771427280971762529699907023985993746813,2432278457694674313559771427281030285293109522087730778178041⟩,⟨977312728288406147189024143737030731493125833943428704124525,977312728288406147189024143741007681040864560130667115369395⟩,⟨3334579168264614880614730288335750974819194761209570545796425,3334579168264614880614730288335755853863555589647297285521655⟩,⟨1126968346473033480137737149160140766837091109860588827712525,1126968346473033480137737149164123253683200381973453232401409⟩,⟨3892280461323035124905217620209048740852949672501748608844940,3892280461323035124905217620209345115188615995110685068087506⟩] +lemma curvatureColumn1_2_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable11 2 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn1_2 c := by + revert c + decide +kernel +lemma curvatureColumn1_2_bound (c : Fin 22) : rawCurvatureColumn 1 (curvaturePoint 2) c < (3893/1000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable11_mem 2 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn1_2_calc] at hh + have hb := ri_mem_lt hh 3893 1000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn1_3 : Fin 22 → RI := ![⟨828291193688351065221289482776556229364831097352885,828291193688351065221289483657518019560837852255545⟩,⟨59023234651583563077564286501807644410579526107038576,59023234651583563077564286501807665488871694472325990⟩,⟨821514986992793647703932763469964337554816767102428,821514986992793647703932764350927302192507881171724⟩,⟨58300047068333113679285032194627224059617204093666593,58300047068333113679285032194627975218168093954641754⟩,⟨807245979127971556650196989563876474730587402626466,807245979127971556650196990444896750215062510251413⟩,⟨56781954717707114801063844314479127287888655370811338,56781954717707114801063844314527773178852725300839792⟩,⟨799861065510841784000286263802705631310823796875988,799861065510841784000286264683790173817278747241084⟩,⟨55999929334559295782400124046843776375377214548104542,55999929334559295782400124046951904918051598273509148⟩,⟨792381090351517351169531645997916081537869248844767,792381090351517351169531646878890698658342313713051⟩,⟨55211609170930812194673482619002051087927615099543873,55211609170930812194673482619011555412401876707758614⟩,⟨807244573466176795237307810854725234698106138372522,807244573466176795237307811735687024824275615472456⟩,⟨56781046956026617019652650653619876835845309135386360,56781046956026617019652650653619898030134226043802547⟩,⟨828279377991535332502114094166439089828785638184964,828279377991535332502114095047459417961883713062077⟩,⟨59021115987766726911233527608358573531825890873866951,59021115987766726911233527608406973829222237240058202⟩,⟨834747110639239283341368853634373515552796919651387,834747110639239283341368854515458352251344366484857⟩,⟨59712676867531556757295528327508957891604456608782133,59712676867531556757295528327616671392308448075366674⟩,⟨851782656720845330124515675910226934324330289719864,851782656720845330124515676791201516279189139624652⟩,⟨61538913962159813190420892026634397545673897368232435,61538913962159813190420892026643896711483493235059028⟩,⟨864304828848271133703899648529360152712070406524289,864304828848271133703899649410323117460706971138485⟩,⟨62884815823075131562678055504605269022076259280912375,62884815823075131562678055504606020288339035320627235⟩,⟨869652553692509682954881910877302387656899972160165,869652553692509682954881911758322677636330280389834⟩,⟨63460083219929588203904981288693286943491044026426131,63460083219929588203904981288741943466566456123485412⟩] +lemma curvatureColumn1_3_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable11 3 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn1_3 c := by + revert c + decide +kernel +lemma curvatureColumn1_3_bound (c : Fin 22) : rawCurvatureColumn 1 (curvaturePoint 3) c < (635/10000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable11_mem 3 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn1_3_calc] at hh + have hb := ri_mem_lt hh 635 10000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureColumn1_4 : Fin 22 → RI := ![⟨3363994217262576426026759788738909011532115958,3363994217262576426026759815032114576133903227⟩,⟨1641702348658942796387296095868126236366780573291,1641702348658942796387296095868126853003078038708⟩,⟨3360874979691564559664658327453458167727166099,3360874979691564559664658353746668684385148024⟩,⟨1638724646252702774593086094723728011882128575789,1638724646252702774593086094723750040045954225543⟩,⟨3354275192893685854228300473131200167139716013,3354275192893685854228300499424653286477127664⟩,⟨1632427446509710339480629826955186881717697983701,1632427446509710339480629826956616894846367448539⟩,⟨3350844778800741105768102958990001255712974844,3350844778800741105768102985283727182575505922⟩,⟨1629156424562103617443300916909936099642520059103,1629156424562103617443300916913116308433823852781⟩,⟨3347361753625311826816310743325360026955249978,3347361753625311826816310769618619775086224861⟩,⟨1625837344319338801695032959870056516559762570220,1625837344319338801695032959870335895248514068416⟩,⟨3354275189524729012367889053063324012034852024,3354275189524729012367889079356529576602238880⟩,⟨1632427411850071157167235552141188504637379464678,1632427411850071157167235552141189121056405117038⟩,⟨3363994188668989003144924388286232301292948893,3363994188668989003144924414579685457019503825⟩,⟨1641702267225306201235397266577579811427347654033,1641702267225306201235397266579008841985455793190⟩,⟨3366960955963685075437729729998795678679450118,3366960955963685075437729756292521778924211533⟩,⟨1644535214707477572708230739910382443526742864052,1644535214707477572708230739913561092095918525234⟩,⟨3374726216469945217393809000283666505918872620,3374726216469945217393809026576926241310360899⟩,⟨1651953715875160642804910734195658411112439473246,1651953715875160642804910734195937786880845754239⟩,⟨3380389537948522881303619586036679798009370040,3380389537948522881303619612329890315157378183⟩,⟨1657367270612848520494907948264097688418356103821,1657367270612848520494907948264119718701097622593⟩,⟨3382797814785111546996181070700560350180601040,3382797814785111546996181096994013528823613237⟩,⟨1659670116207951544873702557793619978360077817422,1659670116207951544873702557795050333224277373680⟩] +lemma curvatureColumn1_4_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (curvatureTable11 4 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=curvatureColumn1_4 c := by + revert c + decide +kernel +lemma curvatureColumn1_4_bound (c : Fin 22) : rawCurvatureColumn 1 (curvaturePoint 4) c < (167/100000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable11_mem 4 j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [curvatureColumn1_4_calc] at hh + have hb := ri_mem_lt hh 167 100000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawCurvatureColumn, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureConstant0 : RI := ⟨13522464111263058769274694040018732303032654392195743820811661829,13522464111263058769274694040018732303032665260832714006879471591⟩ +lemma curvatureConstant0_calc : (RI.sum (fun j : Fin 31 => (curvatureTable01 0 j).mul (columnNorm22 j))).divNat 2=curvatureConstant0 := by decide +kernel +lemma curvatureConstant0_bound : rawConstantCurvature (curvaturePoint 0) < (13530/1:ℝ) := by + have hh := RI.mem_divNat (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable01_mem 0 j) (fourierNorm_mem j))) (by norm_num : 0<2) + rw [curvatureConstant0_calc] at hh + have hb := ri_mem_lt hh 13530 1 (by norm_num) (by decide +kernel) + simpa only [rawConstantCurvature, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureTail0 : RI := ⟨26209350125794453268038359194214686316500054332137775901261727180,26209350125794453268038359194214686316500054332137942758578330681⟩ +lemma curvatureTail0_calc : ((curvatureTable00 0 30).add (curvatureTable01 0 15)).mul (RI.point 60)=curvatureTail0 := by decide +kernel +lemma curvatureTail0_bound : rawTailCurvature 0 < (26500:ℝ) := by + have hh := RI.mem_mul (RI.mem_add (curvatureTable00_mem 0 30) (curvatureTable01_mem 0 15)) (RI.mem_point 60) + rw [curvatureTail0_calc] at hh + have hh' := ri_mem_lt hh 26500 1 (by norm_num) (by decide +kernel) + simpa [rawTailCurvature,mul_comm] using hh' +def curvatureConstant1 : RI := ⟨150371258648440095142820936910505736961983543519393796861914761,150371258648440095142820936910505736961983548419330132820503909⟩ +lemma curvatureConstant1_calc : (RI.sum (fun j : Fin 31 => (curvatureTable01 1 j).mul (columnNorm22 j))).divNat 2=curvatureConstant1 := by decide +kernel +lemma curvatureConstant1_bound : rawConstantCurvature (curvaturePoint 1) < (151/1:ℝ) := by + have hh := RI.mem_divNat (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable01_mem 1 j) (fourierNorm_mem j))) (by norm_num : 0<2) + rw [curvatureConstant1_calc] at hh + have hb := ri_mem_lt hh 151 1 (by norm_num) (by decide +kernel) + simpa only [rawConstantCurvature, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureTail1 : RI := ⟨1146570904437445124234805277954807889641704200443903319238089820,1146570904437445124234805277954807889641704200443912235954319601⟩ +lemma curvatureTail1_calc : ((curvatureTable00 1 30).add (curvatureTable01 1 30)).mul (RI.point 60)=curvatureTail1 := by decide +kernel +lemma curvatureTail1_bound : rawTailCurvature 1 < (1160:ℝ) := by + have hh := RI.mem_mul (RI.mem_add (curvatureTable00_mem 1 30) (curvatureTable01_mem 1 30)) (RI.mem_point 60) + rw [curvatureTail1_calc] at hh + have hh' := ri_mem_lt hh 1160 1 (by norm_num) (by decide +kernel) + simpa [rawTailCurvature,mul_comm] using hh' +def curvatureConstant2 : RI := ⟨30877143611153424423463150047039229594938245849736446159092976,30877143611153424423463150047039229594938245932926941674785634⟩ +lemma curvatureConstant2_calc : (RI.sum (fun j : Fin 31 => (curvatureTable01 2 j).mul (columnNorm22 j))).divNat 2=curvatureConstant2 := by decide +kernel +lemma curvatureConstant2_bound : rawConstantCurvature (curvaturePoint 2) < (31/1:ℝ) := by + have hh := RI.mem_divNat (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable01_mem 2 j) (fourierNorm_mem j))) (by norm_num : 0<2) + rw [curvatureConstant2_calc] at hh + have hb := ri_mem_lt hh 31 1 (by norm_num) (by decide +kernel) + simpa only [rawConstantCurvature, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureTail2 : RI := ⟨780053907590041165674185831867232483829602501942465790620589260,780053907590041165674185831867232483829602501942472381224322021⟩ +lemma curvatureTail2_calc : ((curvatureTable00 2 30).add (curvatureTable01 2 30)).mul (RI.point 60)=curvatureTail2 := by decide +kernel +lemma curvatureTail2_bound : rawTailCurvature 2 < (800:ℝ) := by + have hh := RI.mem_mul (RI.mem_add (curvatureTable00_mem 2 30) (curvatureTable01_mem 2 30)) (RI.mem_point 60) + rw [curvatureTail2_calc] at hh + have hh' := ri_mem_lt hh 800 1 (by norm_num) (by decide +kernel) + simpa [rawTailCurvature,mul_comm] using hh' +def curvatureConstant3 : RI := ⟨1215198976953092218551294390379033113285331535323125796493,1215198976953092218551294390379033113285331535325211480446⟩ +lemma curvatureConstant3_calc : (RI.sum (fun j : Fin 31 => (curvatureTable01 3 j).mul (columnNorm22 j))).divNat 2=curvatureConstant3 := by decide +kernel +lemma curvatureConstant3_bound : rawConstantCurvature (curvaturePoint 3) < (122/100000:ℝ) := by + have hh := RI.mem_divNat (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable01_mem 3 j) (fourierNorm_mem j))) (by norm_num : 0<2) + rw [curvatureConstant3_calc] at hh + have hb := ri_mem_lt hh 122 100000 (by norm_num) (by decide +kernel) + simpa only [rawConstantCurvature, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureTail3 : RI := ⟨411299725916832894558639495174632402962049280878910989332766820,411299725916832894558639495174632402962049280878913609952289521⟩ +lemma curvatureTail3_calc : ((curvatureTable00 3 30).add (curvatureTable01 3 30)).mul (RI.point 60)=curvatureTail3 := by decide +kernel +lemma curvatureTail3_bound : rawTailCurvature 3 < (800:ℝ) := by + have hh := RI.mem_mul (RI.mem_add (curvatureTable00_mem 3 30) (curvatureTable01_mem 3 30)) (RI.mem_point 60) + rw [curvatureTail3_calc] at hh + have hh' := ri_mem_lt hh 800 1 (by norm_num) (by decide +kernel) + simpa [rawTailCurvature,mul_comm] using hh' +def curvatureConstant4 : RI := ⟨3178971454699645734361456476976127512300929112829300349,3178971454699645734361456476976127512300929112832218312⟩ +lemma curvatureConstant4_calc : (RI.sum (fun j : Fin 31 => (curvatureTable01 4 j).mul (columnNorm22 j))).divNat 2=curvatureConstant4 := by decide +kernel +lemma curvatureConstant4_bound : rawConstantCurvature (curvaturePoint 4) < (4/1000000:ℝ) := by + have hh := RI.mem_divNat (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (curvatureTable01_mem 4 j) (fourierNorm_mem j))) (by norm_num : 0<2) + rw [curvatureConstant4_calc] at hh + have hb := ri_mem_lt hh 4 1000000 (by norm_num) (by decide +kernel) + simpa only [rawConstantCurvature, Nat.cast_ofNat, Nat.cast_one, Int.cast_ofNat, Int.cast_one] using hb +def curvatureTail4 : RI := ⟨411233704517733732772216847552037848865353700964006719747166500,411233704517733732772216847552037848865353700964009337805933001⟩ +lemma curvatureTail4_calc : ((curvatureTable00 4 30).add (curvatureTable01 4 30)).mul (RI.point 60)=curvatureTail4 := by decide +kernel +lemma curvatureTail4_bound : rawTailCurvature 4 < (800:ℝ) := by + have hh := RI.mem_mul (RI.mem_add (curvatureTable00_mem 4 30) (curvatureTable01_mem 4 30)) (RI.mem_point 60) + rw [curvatureTail4_calc] at hh + have hh' := ri_mem_lt hh 800 1 (by norm_num) (by decide +kernel) + simpa [rawTailCurvature,mul_comm] using hh' +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/DirectCoordinates.lean b/lean/OAI/Analysis/Triangular/Construction/DirectCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0234387f3eedfe9a8ff85b8ae5f0a5d9b727e3c9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/DirectCoordinates.lean @@ -0,0 +1,93 @@ +import OAI.Analysis.Triangular.Construction.NormalizedJets +import OAI.Analysis.Triangular.Construction.DirectWaveJets + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +lemma negativeJet_re (v : ℝ) (n : ℤ) (d : Fin 2) (a b : ℂ) : + (negativeJet v n d a b).re= + Real.exp (Real.pi*(v-h)*n)/(Q n)* + (if d.val=0 then -a.re else (D n-Real.pi*(v-h))*a.re-b.re) := by + have he : exp (Real.pi*(v-h)*(n:ℂ))=(Real.exp (Real.pi*(v-h)*n):ℂ) := by + rw [ofReal_exp]; congr 1; push_cast; rfl + unfold negativeJet + rw [he,←ofReal_inv] + split_ifs <;> simp only [mul_re,mul_im,ofReal_re,ofReal_im,neg_re,sub_re,sub_im, + zero_mul,mul_zero,sub_zero,add_zero] + all_goals ring +lemma damped_wave_re (T : C(Spectrum,ℂ) →L[ℂ] ℂ) (q : Fin 2) (n : ℤ) : + (T (waveFunctionJet q 0 0 n)).re=Real.exp (-Real.pi*(damping q-h)*n)*(T (waveFunctionJet 0 0 0 n)).re ∧ + (T (waveFunctionJet q 0 1 n)).re=Real.exp (-Real.pi*(damping q-h)*n)* + ((T (waveFunctionJet 0 0 1 n)).re-Real.pi*(damping q-h)*(T (waveFunctionJet 0 0 0 n)).re) := by + have he : exp (-(Real.pi:ℂ)*(damping q-h)*(n:ℂ))=(Real.exp (-Real.pi*(damping q-h)*n):ℂ) := by + rw [ofReal_exp]; congr 1; push_cast; rfl + constructor + · rw [waveFunctionJet_direct_zero,map_smul,←waveFunctionJet_zero_phase,he] + simp only [smul_eq_mul,mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero] + · rw [waveFunctionJet_direct_one,map_smul,map_sub,map_smul,←waveFunctionJet_zero_phase,he] + simp only [smul_eq_mul,mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero,sub_re,mul_im,sub_im,mul_zero,add_zero] +lemma negativeJet_direct_re (T : C(Spectrum,ℂ) →L[ℂ] ℂ) (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : + (negativeJet v n d (T (waveFunctionJet q 0 0 n)) (T (waveFunctionJet q 0 1 n))).re= + Real.exp (Real.pi*(v-damping q)*n)/(Q n)* + (if d.val=0 then -(T (waveFunctionJet 0 0 0 n)).re else + (D n-Real.pi*(v-damping q))*(T (waveFunctionJet 0 0 0 n)).re-(T (waveFunctionJet 0 0 1 n)).re) := by + rw [negativeJet_re,(damped_wave_re T q n).1,(damped_wave_re T q n).2] + have he : Real.exp (Real.pi*(v-h)*n)*Real.exp (-Real.pi*(damping q-h)*n)= + Real.exp (Real.pi*(v-damping q)*n) := by rw [←Real.exp_add]; congr 1; ring + split_ifs + · linear_combination (-(T (waveFunctionJet 0 0 0 n)).re/(Q n))*he + · linear_combination (((D n-Real.pi*(v-damping q))*(T (waveFunctionJet 0 0 0 n)).re-(T (waveFunctionJet 0 0 1 n)).re)/(Q n))*he + +def directJetFunction (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : C(Spectrum,ℂ) := + (exp (Real.pi*(v-h)*(n:ℂ))*(Q n:ℂ)⁻¹) • + (if d.val=0 then -waveFunctionJet q 0 0 n else + ((D n:ℂ)-Real.pi*(v-h)) • waveFunctionJet q 0 0 n-waveFunctionJet q 0 1 n) +lemma negativeJet_direct_linear (T : C(Spectrum,ℂ) →L[ℂ] ℂ) (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : + negativeJet v n d (T (waveFunctionJet q 0 0 n)) (T (waveFunctionJet q 0 1 n))= + T (directJetFunction q v n d) := by + unfold directJetFunction negativeJet + split_ifs <;> simp only [map_smul,map_neg,map_sub,smul_eq_mul] +lemma Q_node_ne (n : Node) : Q n.val≠0 := + (lt_trans (by norm_num) (FiniteCertificate.Q_node_bounds n.val n.property.2).1).ne' +lemma spectralP_directJet (q : Fin 2) (v : ℝ) (n : Node) (d : Fin 2) : + (spectralPCLM (directJetFunction q v n.val d)).re=0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(spectralP_direct _).1,(spectralP_direct _).2,P_node,deriv_P_node] + split_ifs <;> simp +lemma spectralC_directJet (n m : Node) (d : Fin 2) : + (spectralCCLM m (directJetFunction 0 h n.val d)).re= + if n.val=m.val ∧ d.val=0 then -1 else 0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(spectralC_direct m _).1,(spectralC_direct m _).2] + simp only [damping,Fin.val_zero,↓reduceIte,sub_self,mul_zero,zero_mul,Real.exp_zero,sub_zero] + by_cases hm : n=m + · subst m + rw [cBasis_at_node,cBasis_deriv_re] + by_cases hd : d.val=0 + · simp only [hd,↓reduceIte,and_self] + field_simp [Q_node_ne n] + · simp only [hd,↓reduceIte,and_false] + ring + · have hmn : n.val≠m.val := fun he => hm (Subtype.ext he) + rw [cBasis_other_node hmn,deriv_cBasis_other_node hmn] + simp [hmn] +lemma spectralD_directJet (n m : Node) (d : Fin 2) : + (spectralDCLM m (directJetFunction 0 h n.val d)).re= + if n.val=m.val ∧ d.val=1 then -1 else 0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(spectralD_direct m _).1,(spectralD_direct m _).2] + simp only [damping,Fin.val_zero,↓reduceIte,sub_self,mul_zero,zero_mul,Real.exp_zero,sub_zero] + by_cases hm : n=m + · subst m + have hd0 : dBasis n n.val=0 := by rw [dBasis_cBasis]; simp + rw [hd0,deriv_dBasis_at_node,cBasis_at_node] + fin_cases d <;> simp only [Nat.one_ne_zero,↓reduceIte,zero_re,mul_zero,zero_sub,neg_zero,mul_zero,and_true] + · norm_num + · field_simp [Q_node_ne n] + · have hmn : n.val≠m.val := fun he => hm (Subtype.ext he) + rw [dBasis_other_node hmn,deriv_dBasis_other_node hmn] + simp [hmn] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/DirectWaveJets.lean b/lean/OAI/Analysis/Triangular/Construction/DirectWaveJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..49271df02c6a7352c2ca375a12109efba4762892 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/DirectWaveJets.lean @@ -0,0 +1,106 @@ +import OAI.Analysis.Triangular.Construction.TailEnumeration +import OAI.Analysis.Triangular.Taylor.WaveFunction +import OAI.Analysis.Triangular.Construction.NodeJets +import OAI.Analysis.Triangular.Construction.FiniteJets + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +lemma waveFunctionJet_direct_zero (q : Fin 2) (s : ℂ) : + waveFunctionJet q 0 0 s=exp (-(Real.pi:ℂ)*(damping q-h)*s) • phaseFunction s := by + ext t + rw [waveFunctionJet_apply] + simp only [finiteWaveJet,taylorAmplitude,taylorPhase,Fin.val_zero,↓reduceIte,pow_zero,mul_one,one_mul, + ContinuousMap.smul_apply,smul_eq_mul,phaseFunction] + simp only [ofReal_mul,ofReal_sub,ContinuousMap.coe_mk] + rw [show (I*Real.pi*(t.val:ℂ)-(Real.pi:ℂ)*(damping q-h))*s= + -(Real.pi:ℂ)*(damping q-h)*s+I*Real.pi*(t.val:ℂ)*s by ring,exp_add] +lemma waveFunctionJet_zero_phase (s : ℂ) : waveFunctionJet 0 0 0 s=phaseFunction s := by + rw [waveFunctionJet_direct_zero] + simp only [damping,Fin.val_zero,↓reduceIte,sub_self,mul_zero,zero_mul,exp_zero,one_smul] +lemma hasDerivAt_phaseFunction (s : ℂ) : HasDerivAt phaseFunction (waveFunctionJet 0 0 1 s) s := by + have he : phaseFunction=waveFunctionJet 0 0 0 := (funext waveFunctionJet_zero_phase).symm + rw [he] + exact hasDerivAt_waveFunctionJet 0 0 0 s +lemma spectralC_direct (n : Node) (s : ℂ) : + spectralCCLM n (waveFunctionJet 0 0 0 s)=cBasis n s ∧ + spectralCCLM n (waveFunctionJet 0 0 1 s)=deriv (cBasis n) s := by + constructor + · rw [waveFunctionJet_zero_phase,spectralCCLM_apply,spectralC_phase] + · have he : (fun s => spectralCCLM n (phaseFunction s))=cBasis n := funext fun s => by rw [spectralCCLM_apply,spectralC_phase] + have hh := ((spectralCCLM n).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_phaseFunction s)).deriv + simp only [Function.comp_def] at hh + rw [he] at hh + exact hh.symm +lemma spectralD_direct (n : Node) (s : ℂ) : + spectralDCLM n (waveFunctionJet 0 0 0 s)=dBasis n s ∧ + spectralDCLM n (waveFunctionJet 0 0 1 s)=deriv (dBasis n) s := by + constructor + · rw [waveFunctionJet_zero_phase,spectralDCLM_apply,spectralD_phase] + · have he : (fun s => spectralDCLM n (phaseFunction s))=dBasis n := funext fun s => by rw [spectralDCLM_apply,spectralD_phase] + have hh := ((spectralDCLM n).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_phaseFunction s)).deriv + simp only [Function.comp_def] at hh + rw [he] at hh + exact hh.symm +lemma spectralP_direct (s : ℂ) : + spectralPCLM (waveFunctionJet 0 0 0 s)=P s ∧ + spectralPCLM (waveFunctionJet 0 0 1 s)=deriv P s := by + constructor + · rw [waveFunctionJet_zero_phase,spectralPCLM_apply,spectralP_phase] + · have he : (fun s => spectralPCLM (phaseFunction s))=P := funext fun s => by rw [spectralPCLM_apply,spectralP_phase] + have hh := (spectralPCLM.hasFDerivAt.comp_hasDerivAt s (hasDerivAt_phaseFunction s)).deriv + simp only [Function.comp_def] at hh + rw [he] at hh + exact hh.symm +lemma atomC_direct (a : Fin 15) (s : ℂ) : + atomSpectral (FiniteCertificate.cCoefficient a) (waveFunctionJet 0 0 0 s)=finiteC a s ∧ + atomSpectral (FiniteCertificate.cCoefficient a) (waveFunctionJet 0 0 1 s)=deriv (finiteC a) s := by + constructor + · rw [waveFunctionJet_zero_phase,atomSpectral_finiteC_phase] + · have he : (fun s => atomSpectral (FiniteCertificate.cCoefficient a) (phaseFunction s))=finiteC a := funext (atomSpectral_finiteC_phase a) + have hh := ((atomSpectral (FiniteCertificate.cCoefficient a)).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_phaseFunction s)).deriv + simp only [Function.comp_def] at hh + rw [he] at hh + exact hh.symm +lemma atomD_direct (a : Fin 15) (s : ℂ) : + atomSpectral (FiniteCertificate.dCoefficient a) (waveFunctionJet 0 0 0 s)=finiteD a s ∧ + atomSpectral (FiniteCertificate.dCoefficient a) (waveFunctionJet 0 0 1 s)=deriv (finiteD a) s := by + constructor + · rw [waveFunctionJet_zero_phase,atomSpectral_finiteD_phase] + · have he : (fun s => atomSpectral (FiniteCertificate.dCoefficient a) (phaseFunction s))=finiteD a := funext (atomSpectral_finiteD_phase a) + have hh := ((atomSpectral (FiniteCertificate.dCoefficient a)).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_phaseFunction s)).deriv + simp only [Function.comp_def] at hh + rw [he] at hh + exact hh.symm +lemma waveFunctionJet_direct_one (q : Fin 2) (s : ℂ) : + waveFunctionJet q 0 1 s= exp (-(Real.pi:ℂ)*(damping q-h)*s) • + (waveFunctionJet 0 0 1 s-(Real.pi*(damping q-h):ℂ) • phaseFunction s) := by + have he : waveFunctionJet q 0 0 = fun t => exp (-(Real.pi:ℂ)*(damping q-h)*t) • phaseFunction t := funext (waveFunctionJet_direct_zero q) + have hh := (((hasDerivAt_id s).const_mul (-(Real.pi:ℂ)*(damping q-h))).cexp.smul (hasDerivAt_phaseFunction s)).deriv + have hj := (hasDerivAt_waveFunctionJet q 0 0 s).deriv + rw [he] at hj + change deriv (fun t => exp (-(Real.pi:ℂ)*(damping q-h)*t) • phaseFunction t) s = _ at hh + rw [←hj,hh] + simp only [id_eq,mul_one] + module +lemma cBasis_deriv_re (n : Node) : (deriv (cBasis n) n.val).re=Q n.val*D n.val := by + have hQ : Q n.val≠0 := (lt_trans (by norm_num) (FiniteCertificate.Q_node_bounds n.val n.property.2).1).ne' + have hh := cBasis_deriv_at_node n + unfold D + field_simp + linarith +lemma finiteC_deriv_re (a : Fin 15) (n : ℤ) (hn : n%36=residue a) : + (deriv (finiteC a) n).re=Q n*D n := by + have hmem : n%36∈residues := by rw [hn]; exact residue_mem a + have hQ : Q n≠0 := (lt_trans (by norm_num) (FiniteCertificate.Q_node_bounds n hmem).1).ne' + have hh := (finiteC_matching_jets a n hn).2 + unfold D + field_simp + linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FarCurvature.lean b/lean/OAI/Analysis/Triangular/Construction/FarCurvature.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4f3bf9495852d47a5ccf15ae252c7f59bd8f32e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FarCurvature.lean @@ -0,0 +1,121 @@ +import OAI.Analysis.Triangular.Construction.CurvatureEnvelope +import OAI.Analysis.Triangular.Construction.ActualInterpolation +import OAI.Analysis.Triangular.Signs.SineGridAnalytic + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Set +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate + +def transformedP (s : ℝ) : ℝ := (spectralPCLM (waveFunctionJet 0 1 0 s)).re +lemma hasDerivAt_spectralP_wave (br : Fin 2) (k : ℕ) (s : ℂ) : + HasDerivAt (fun t => spectralPCLM (waveFunctionJet 0 br k t)) + (spectralPCLM (waveFunctionJet 0 br (k+1) s)) s := + spectralPCLM.hasFDerivAt.comp_hasDerivAt s (hasDerivAt_waveFunctionJet 0 br k s) +lemma transformedP_contDiff : ContDiff ℝ ⊤ transformedP := by + exact (show Differentiable ℂ (fun s => spectralPCLM (waveFunctionJet 0 1 0 s)) from + fun s => (hasDerivAt_spectralP_wave 1 0 s).differentiableAt).contDiff.real_of_complex +lemma transformedP_jet (k : ℕ) : + (fun s : ℝ => (spectralPCLM (waveFunctionJet 0 1 k s)).re)=iteratedDeriv k transformedP := by + induction k with + | zero => rfl + | succ k hk => + rw [iteratedDeriv_succ,←hk] + exact funext fun s => ((hasDerivAt_spectralP_wave 1 k s).real_of_complex).deriv.symm +lemma realP_contDiff : ContDiff ℝ ⊤ realP := by unfold realP; fun_prop +lemma realP_jet_zero (n : Node) : realP n.val=0 ∧ deriv realP n.val=0 := by + have he (s : ℝ) : (spectralPCLM (waveFunctionJet 0 0 0 s)).re=realP s := by + rw [(spectralP_direct _).1,P_ofReal,ofReal_re] + constructor + · rw [←he,(spectralP_direct _).1] + norm_cast + rw [P_node,zero_re] + · have hh := ((hasDerivAt_spectralP_wave 0 0 (n.val:ℂ)).real_of_complex).deriv + simp only [he] at hh + rw [hh,(spectralP_direct _).2] + norm_cast + rw [deriv_P_node,zero_re] +lemma rawConstantCurvature_antitone {u s : ℝ} (hus : u ≤ s) : + rawConstantCurvature s ≤ rawConstantCurvature u := by + unfold rawConstantCurvature + apply div_le_div_of_nonneg_right _ (by norm_num) + apply Finset.sum_le_sum + intro j _ + exact mul_le_mul_of_nonneg_right (curvatureWave_antitone 0 1 (abs_le.mpr (frequency_mem j)) hus) (norm_nonneg _) +lemma transformedP_curvature {s : ℝ} (hs : 29/2 ≤ s) : + |iteratedDeriv 2 transformedP s|/2 ≤ 2/1000 := by + rw [←transformedP_jet] + have hh := abs_re_le_norm (spectralPCLM (waveFunctionJet 0 1 2 s)) + have hn := norm_sum_le (s:=Finset.univ) (fun j : Fin 31 => fourierCoeff j*(waveFunctionJet 0 1 2 (s:ℂ)) ⟨frequency j,frequency_mem j⟩) + have he (j : Fin 31) : + ‖fourierCoeff j*(waveFunctionJet 0 1 2 (s:ℂ)) ⟨frequency j,frequency_mem j⟩‖= + curvatureWave 0 1 s (frequency j)*‖fourierCoeff j‖ := by + rw [norm_mul,waveFunctionJet_apply,norm_finiteWaveJet_two] + ring + simp only [he] at hn + change ‖spectralPCLM (waveFunctionJet 0 1 2 s)‖ ≤ _ at hn + have hb := (rawConstantCurvature_antitone hs).trans curvatureConstant3_bound.le + change rawConstantCurvature s ≤ 122/100000 at hb + dsimp only [rawConstantCurvature] at hb + nlinarith +lemma inputJJet_constant (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (br : Fin 2) (k : ℕ) (s : ℂ) : + inputJJet (coefficientInput C a w) br k s= + (C:ℂ)*spectralPCLM (waveFunctionJet 0 br k s)+inputJJet (coefficientInput 0 a w) br k s := by + simp only [inputJJet,tailSpectral_coefficient,finiteSpectral_coefficient_apply, + add_apply,smul_apply,smul_eq_mul,ofReal_zero,zero_mul,zero_add] + ring + +def sideConstant (side : Fin 2) : ℝ := if side.val=0 then -(3/500) else 3/500 +def actualJ0 (side : Fin 2) (z : ℝ) (hz : 0 _+sideConstant (otherSide side)*transformedP s) + exact (pairJ_contDiff _ _).add (by simpa only [smul_eq_mul] using transformedP_contDiff.const_smul (sideConstant (otherSide side))) +lemma actualJ_decompose (side : Fin 2) {z : ℝ} (hz : 0 sideConstant (otherSide side)*transformedP s) + simpa only [smul_eq_mul] using (transformedP_contDiff.const_smul (sideConstant (otherSide side))).of_le (show (2:WithTop ℕ∞) ≤ ⊤ by exact le_top) + have hl (side : Fin 2) : ‖actualTrigonometric side z hz hzB‖ ≤ 301/100 := by + have hh := actualTrigonometric_norm side hz hzB + linarith + have ht (side : Fin 2) : ‖actualTail side z hz hzB‖ ≤ (3/1000000000:ℝ) := by + simpa only [show (10:ℝ)^9=1000000000 by norm_num] using (actualTail_norm side hz hzB).le + have hh := pairJ_curvature _ _ _ _ i hs (hl side) (hl (otherSide side)) (ht side) (ht (otherSide side)) + have hT := transformedP_curvature hs14 + change |iteratedDeriv 2 (f+sideConstant (otherSide side) • transformedP) s|/2 ≤ _ + rw [iteratedDeriv_add hf.contDiffAt hg.contDiffAt,iteratedDeriv_const_smul ((transformedP_contDiff.of_le (by norm_num)).contDiffAt)] + simp only [smul_eq_mul] + have hc : |sideConstant (otherSide side)|=(3/500:ℝ) := by unfold sideConstant; split_ifs <;> norm_num + have ha := abs_add_le (iteratedDeriv 2 f s) (sideConstant (otherSide side)*iteratedDeriv 2 transformedP s) + rw [abs_mul,hc] at ha + change |iteratedDeriv 2 f s|/2 ≤ _ at hh + nlinarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteAssembly.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd83d7b12efd69e0a9854f028469bdb98aebefb0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteAssembly.lean @@ -0,0 +1,75 @@ +import OAI.Analysis.Triangular.Construction.FiniteProjection + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel AtomicTriangular.MatrixBounds +lemma finiteRow_sum (C : ℝ) (a : Fin 22 → ℝ) (i : Fin 20) : + C*jet h H (rowNode i).val (rowDerivative i) (finiteColumn 22)+ + (∑ c : Fin 22,a c*jet H H (rowNode i).val (rowDerivative i) (finiteColumn ⟨c.val,by omega⟩))= + (∑ j : Fin 20,R i j*a ⟨j.val+2,by omega⟩)+ + R0 i 0*a 0+R0 i 1*a 1+R0 i 2*C := by + have hR (j : Fin 20) : R i j=jet H H (rowNode i).val (rowDerivative i) (finiteColumn ⟨j.val+2,by omega⟩) := by + simp only [R,fullJetMatrix,show j.val+2≠22 by omega,↓reduceIte,rowNode,rowDerivative] + simp_rw [hR] + rw [Fin.sum_univ_succ,Fin.sum_univ_succ] + have hh : (∑ j : Fin 20,a j.succ.succ*jet H H (rowNode i).val (rowDerivative i) + (finiteColumn ⟨j.succ.succ.val,by omega⟩))= + ∑ j : Fin 20,jet H H (rowNode i).val (rowDerivative i) (finiteColumn ⟨j.val+2,by omega⟩)*a ⟨j.val+2,by omega⟩ := by + apply Finset.sum_congr rfl + intro j _ + have he : j.succ.succ=(⟨j.val+2,by omega⟩:Fin 22) := Fin.ext (by simp) + simp only [he] + exact mul_comm _ _ + rw [hh] + simp only [R0,fullJetMatrix,Fin.val_zero,Fin.val_one,Fin.val_two,show 0<2 by omega, + show 1<2 by omega,lt_self_iff_false,↓reduceIte,show (0:ℕ)≠22 by omega,show (1:ℕ)≠22 by omega] + change _= _ + dsimp [rowNode,rowDerivative] + ring +lemma finiteApprox_shift (side : Fin 2) (e : Fin 8 → ℝ) (i : Fin 20) : + finiteApprox side e ⟨i.val+2,by omega⟩=(finiteSolution side *ᵥ e) i := by + change (∑ j : Fin 8,Acoefficient side ⟨i.val+2,by omega⟩ j*e j)=_ + simp only [Acoefficient,show ¬(i.val+2<2) by omega,show i.val+2≠22 by omega,↓reduceDIte] + rfl +lemma finiteApprox_fixed (side : Fin 2) (e : Fin 8 → ℝ) (i : Fin 2) : + finiteApprox side e ⟨i.val,by omega⟩=(gamma side *ᵥ e) ⟨i.val,by omega⟩ := by + change (∑ j : Fin 8,Acoefficient side ⟨i.val,by omega⟩ j*e j)=_ + simp only [Acoefficient,show i.val<2 from i.isLt,↓reduceDIte] + rfl +lemma finiteApprox_transformed (side : Fin 2) (e : Fin 8 → ℝ) (i : Fin 20) : + (gamma side *ᵥ e) 2*jet h H (rowNode i).val (rowDerivative i) (finiteColumn 22)+ + (∑ c : Fin 22,finiteApprox side e c*jet H H (rowNode i).val (rowDerivative i) (finiteColumn ⟨c.val,by omega⟩))= + (R *ᵥ (finiteSolution side *ᵥ e)+R0 *ᵥ (gamma side *ᵥ e)) i := by + rw [finiteRow_sum] + simp only [finiteApprox_shift] + have h0 : finiteApprox side e 0=(gamma side *ᵥ e) 0 := finiteApprox_fixed side e 0 + have h1 : finiteApprox side e 1=(gamma side *ᵥ e) 1 := finiteApprox_fixed side e 1 + erw [h0,h1] + change (∑ j : Fin 20,R i j*(finiteSolution side *ᵥ e) j)+_+_+_= + (∑ j : Fin 20,R i j*(finiteSolution side *ᵥ e) j)+(∑ j : Fin 3,R0 i j*(gamma side *ᵥ e) j) + rw [Fin.sum_univ_three] + abel +lemma gamma_actual (side : Fin 2) (z : ℝ) : + (gamma side *ᵥ actualParameter z)= ![11/25,0,if side.val=0 then -(3/500) else 3/500] := by + ext i + fin_cases i <;> simp [Matrix.mulVec,dotProduct,gamma,Fin.sum_univ_succ,actualParameter] +lemma inputJJet_row_transformed (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) (i : Fin 20) : + (negativeJet H (rowNode i).val (rowDerivative i) (inputJJet (coefficientInput C a w) 1 0 (rowNode i).val) + (inputJJet (coefficientInput C a w) 1 1 (rowNode i).val)).re= + Boperator w i + C*jet h H (rowNode i).val (rowDerivative i) (finiteColumn 22)+ + (∑ c : Fin 22,a c*jet H H (rowNode i).val (rowDerivative i) (finiteColumn ⟨c.val,by omega⟩)) := by + rw [inputJJet_negative_coefficient] + have hb : Boperator w i=∑' p : TailNode × Fin 2,w p*tailJet h H (rowNode i).val p.1.val.val p.2 (rowDerivative i) := by + unfold Boperator + erw [operator_apply] + rfl + rw [hb] + ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteCoordinates.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..4af955310eabdf65b2b1ab231c8fee18e963e4c7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteCoordinates.lean @@ -0,0 +1,71 @@ +import OAI.Analysis.Triangular.Construction.DirectCoordinates + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +lemma atomC_directJet (a : Fin 15) (v : ℝ) (n : Node) (d : Fin 2) : + (atomSpectral (FiniteCertificate.cCoefficient a) (directJetFunction 1 v n.val d)).re= + if n.val%36=residue a then Real.exp (Real.pi*(v-H)*n.val)* + (if d.val=0 then -1 else -Real.pi*(v-H)) else 0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(atomC_direct a _).1,(atomC_direct a _).2] + simp only [damping,Fin.val_one,Nat.one_ne_zero,↓reduceIte] + by_cases hm : n.val%36=residue a + · rw [(finiteC_matching_jets a n.val hm).1,finiteC_deriv_re a n.val hm,ite_eq_left hm] + split_ifs <;> field_simp [Q_node_ne n] + ring + · rw [(finiteC_other_jets a n hm).1,(finiteC_other_jets a n hm).2,ite_eq_right hm] + split_ifs <;> simp +lemma atomD_directJet (a : Fin 15) (v : ℝ) (n : Node) (d : Fin 2) : + (atomSpectral (FiniteCertificate.dCoefficient a) (directJetFunction 1 v n.val d)).re= + if n.val%36=residue a then Real.exp (Real.pi*(v-H)*n.val)* + (if d.val=0 then 0 else -1) else 0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(atomD_direct a _).1,(atomD_direct a _).2] + simp only [damping,Fin.val_one,Nat.one_ne_zero,↓reduceIte] + by_cases hm : n.val%36=residue a + · rw [(finiteD_matching_jets a n.val hm).1,(finiteD_matching_jets a n.val hm).2, + (finiteC_matching_jets a n.val hm).1,ite_eq_left hm] + split_ifs <;> simp only [zero_re,neg_zero,mul_zero,zero_sub] + field_simp [Q_node_ne n] + · rw [(finiteD_other_jets a n hm).1,(finiteD_other_jets a n hm).2,ite_eq_right hm] + split_ifs <;> simp +lemma finiteColumn_directJet (c : Fin 22) (v : ℝ) (n : Node) (d : Fin 2) : + (atomSpectral (finiteColumn ⟨c.val,by omega⟩) (directJetFunction 1 v n.val d)).re= + if n.val%36=residue ⟨c.val/2,by omega⟩ then Real.exp (Real.pi*(v-H)*n.val)* + (if c.val%2=0 then (if d.val=0 then -1 else -Real.pi*(v-H)) + else (if d.val=0 then 0 else -1)) else 0 := by + unfold finiteColumn + simp only [show c.val<22 from c.isLt,↓reduceDIte] + by_cases hc : c.val%2=0 + · simp only [hc,↓reduceIte] + exact atomC_directJet _ _ _ _ + · simp only [hc,↓reduceIte] + exact atomD_directJet _ _ _ _ +lemma finiteColumn_tail_directJet (c : Fin 22) (p : TailNode × Fin 2) : + (atomSpectral (finiteColumn ⟨c.val,by omega⟩) (directJetFunction 1 h p.1.val.val p.2)).re= -AallKernel p c := by + rw [finiteColumn_directJet] + unfold AallKernel repetitionKernel repetitionEntry + have he : h-H= -eta := by norm_num [h,H,eta] + simp only [he,mul_neg] + split_ifs <;> ring_nf +lemma finiteSpectral_directJet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (v : ℝ) (n : ℤ) (d : Fin 2) : + (finiteSpectral (coefficientInput C a w) (directJetFunction 1 v n d)).re= + ∑ c : Fin 22,a c*(atomSpectral (finiteColumn ⟨c.val,by omega⟩) (directJetFunction 1 v n d)).re := by + rw [finiteSpectral_coefficient] + simp only [sum_apply,smul_apply,smul_eq_mul,re_sum,mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero] +lemma finiteSpectral_tail_directJet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (p : TailNode × Fin 2) : + (finiteSpectral (coefficientInput C a w) (directJetFunction 1 h p.1.val.val p.2)).re= -AallOperator a p := by + rw [finiteSpectral_directJet] + simp_rw [finiteColumn_tail_directJet,mul_neg] + rw [Finset.sum_neg_distrib] + congr 1 + unfold AallOperator + erw [AtomicTriangular.L1Kernel.operator_apply,tsum_fintype] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteInterpolation.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..31a00693fc427057b0663f9cb151fe762f128c4b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteInterpolation.lean @@ -0,0 +1,87 @@ +import OAI.Analysis.Triangular.Construction.FiniteSystem +import OAI.Analysis.Triangular.Construction.FiniteAssembly +import OAI.Analysis.Triangular.Construction.FiniteTargetBridge +import OAI.Analysis.Triangular.Construction.TailInterpolation + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel +lemma Roperator_apply (u : FiniteCoefficients) (i : Fin 20) : + Roperator u i=∑ j : Fin 20,R i j*u j := by + unfold Roperator + erw [operator_apply,tsum_fintype] + apply Finset.sum_congr rfl + intro j _ + exact mul_comm _ _ +lemma extendFiniteError_fixed (u : FiniteCoefficients) (i : Fin 2) : + extendFiniteError u ⟨i.val,by omega⟩=0 := by + change (if hi : i.val<2 then _ else _)=_ + simp only [i.isLt,↓reduceDIte] +lemma extendFiniteError_shift (u : FiniteCoefficients) (i : Fin 20) : + extendFiniteError u ⟨i.val+2,by omega⟩=u i := by + change (if hi : i.val+2<2 then 0 else u ⟨i.val+2-2,by omega⟩)=_ + simp only [show ¬(i.val+2<2) by omega,↓reduceDIte] + congr 1 +lemma extendFiniteError_transformed (u : FiniteCoefficients) (i : Fin 20) : + (∑ c : Fin 22,extendFiniteError u c*jet H H (rowNode i).val (rowDerivative i) + (finiteColumn ⟨c.val,by omega⟩))=Roperator u i := by + have hh := finiteRow_sum 0 (extendFiniteError u) i + have h0 : extendFiniteError u 0=0 := extendFiniteError_fixed u 0 + have h1 : extendFiniteError u 1=0 := extendFiniteError_fixed u 1 + erw [h0] at hh + simp only [extendFiniteError_shift,zero_mul,zero_add,mul_zero,add_zero] at hh + rw [hh,Roperator_apply] +lemma actualTrigonometric_shift (side : Fin 2) {z : ℝ} (hz : 0 u i) (actualFiniteError_equations hz hzB).1 + have h1 := congrArg (fun u : FiniteCoefficients => u i) (actualFiniteError_equations hz hzB).2 + simp only [lp.coeFn_add,Pi.add_apply] at h0 h1 + have hf0 := congrArg (fun A : Matrix (Fin 20) (Fin 8) ℝ => (A *ᵥ actualParameter z) i) finiteSolution_equations.1 + have hf1 := congrArg (fun A : Matrix (Fin 20) (Fin 8) ℝ => (A *ᵥ actualParameter z) i) finiteSolution_equations.2 + simp only [Matrix.add_mulVec,←Matrix.mulVec_mulVec,Pi.add_apply] at hf0 hf1 + have hy := Yf_residual z i + simp only [pairJJet_negative,add_re,actualInput_row_transformed,Pi.add_apply] + have hd (side : Fin 2) : + (negativeJet H (rowNode i).val (rowDerivative i) + (inputJJet (actualInput side z hz hzB) 0 0 (rowNode i).val) + (inputJJet (actualInput side z hz hzB) 0 1 (rowNode i).val)).re= + -((finiteSolution side *ᵥ actualParameter z) i+actualFiniteError side z hz hzB i) := by + rw [actualInput,inputJJet_row_direct_negative,actualTrigonometric_shift] + simp only [hd] + change _= -gaussianTarget H z (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ ∧ _=0 + constructor <;> linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteJets.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..da82bc035f1d75c9db7f4588f3decd0ce4c75eec --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteJets.lean @@ -0,0 +1,202 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ComplexConjugate +namespace AtomicTriangular.Construction +open Complex + +lemma sineFactor_deriv (a : Fin 15) : deriv (sineFactor a) = + fun s => 2*(kappa:ℂ)*cos ((kappa:ℂ)*(s-(residue a:ℂ))) := by + funext s + have hh := ((((hasDerivAt_id s).sub_const (residue a:ℂ)).const_mul + (kappa:ℂ)).csin.const_mul 2).deriv + change deriv (fun y => 2*sin ((kappa:ℂ)*(y-(residue a:ℂ)))) s = _ + simpa only [id_eq,mul_one,mul_assoc,mul_comm,mul_left_comm] using hh +lemma sineFactor_second (a : Fin 15) : iteratedDeriv 2 (sineFactor a) = + fun s => -(kappa:ℂ)^2*sineFactor a s := by + rw [show 2 = 1+1 from rfl,iteratedDeriv_succ,iteratedDeriv_one,sineFactor_deriv] + funext s + have hh := ((((hasDerivAt_id s).sub_const (residue a:ℂ)).const_mul + (kappa:ℂ)).ccos.const_mul (2*(kappa:ℂ))).deriv + convert hh using 1 <;> simp only [sineFactor,id_eq,mul_one] + ring + +lemma square_zero_jets (f : ℂ → ℂ) (hf : Differentiable ℂ f) (n : ℂ) + (h0 : f n=0) (h2 : iteratedDeriv 2 f n=0) : + iteratedDeriv 0 (fun s => f s*f s) n=0 ∧ + iteratedDeriv 1 (fun s => f s*f s) n=0 ∧ + iteratedDeriv 2 (fun s => f s*f s) n=2*(deriv f n)^2 ∧ + iteratedDeriv 3 (fun s => f s*f s) n=0 := by + constructor + · simp [iteratedDeriv_zero,h0] + constructor + · rw [iteratedDeriv_fun_mul hf.contDiff.contDiffAt hf.contDiff.contDiffAt] + simp [Finset.sum_range_succ,iteratedDeriv_zero,h0] + constructor + · rw [iteratedDeriv_fun_mul hf.contDiff.contDiffAt hf.contDiff.contDiffAt] + norm_num [Finset.sum_range_succ,iteratedDeriv_zero,iteratedDeriv_one,h0,h2] + ring + · rw [iteratedDeriv_fun_mul hf.contDiff.contDiffAt hf.contDiff.contDiffAt] + norm_num [Finset.sum_range_succ,iteratedDeriv_zero,iteratedDeriv_one,h0,h2] + +lemma square_zero_product_jets (f g : ℂ → ℂ) (hf : Differentiable ℂ f) + (hg : Differentiable ℂ g) (n : ℂ) (h0 : f n=0) (h2 : iteratedDeriv 2 f n=0) : + iteratedDeriv 2 (fun s => f s^2*g s) n=2*(deriv f n)^2*g n ∧ + iteratedDeriv 3 (fun s => f s^2*g s) n=6*(deriv f n)^2*deriv g n := by + obtain ⟨hj0,hj1,hj2,hj3⟩ := square_zero_jets f hf n h0 h2 + have hh : (fun s => f s^2) = (fun s => f s*f s) := by funext s; ring + have hd : Differentiable ℂ (fun s => f s^2) := hf.pow 2 + constructor + · rw [iteratedDeriv_fun_mul hd.contDiff.contDiffAt hg.contDiff.contDiffAt,hh] + norm_num [Finset.sum_range_succ,hj0,hj1,hj2,iteratedDeriv_zero] + · rw [iteratedDeriv_fun_mul hd.contDiff.contDiffAt hg.contDiff.contDiffAt,hh] + norm_num [Finset.sum_range_succ,hj0,hj1,hj2,hj3,iteratedDeriv_one] + ring_nf + simp + +lemma sineFactor_at_residue (a : Fin 15) (n : ℤ) (hn : n%36=residue a) : + sineFactor a n=0 := by + have he : (kappa:ℂ)*((n:ℂ)-(residue a:ℂ))=(n/36:ℤ)*(Real.pi:ℂ) := by + have hh := congrArg (fun z : ℤ => (z:ℂ)) (Int.emod_add_mul_ediv n 36) + rw [hn] at hh + push_cast at hh + unfold kappa + push_cast + linear_combination -(Real.pi:ℂ)/36*hh + unfold sineFactor + rw [he] + have hz := congrArg Complex.ofReal (Real.sin_int_mul_pi (n/36)) + have hh : Complex.sin ((n/36:ℤ)*(Real.pi:ℂ))=0 := by + simpa only [Complex.ofReal_zero,Complex.ofReal_sin,Complex.ofReal_mul,Complex.ofReal_intCast] using hz + simp [hh] + +lemma finiteC_matching_jets (a : Fin 15) (n : ℤ) (hn : n%36=residue a) : + (finiteC a n).re=Q n ∧ 6*(deriv (finiteC a) n).re=(waveDerivative 3 n).re := by + let g : ℂ → ℂ := fun s => ∏ r ∈ Finset.univ.erase a, (sineFactor r s)^2 + have hf : Differentiable ℂ (sineFactor a) := by unfold sineFactor; fun_prop + have hg : Differentiable ℂ g := by unfold g sineFactor; fun_prop + have h0 := sineFactor_at_residue a n hn + have h2 : iteratedDeriv 2 (sineFactor a) n=0 := by simp only [sineFactor_second,h0,mul_zero] + have hc : cos ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))^2=1 := by + have hsin : sin ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))=0 := by + simpa [sineFactor] using h0 + simpa [hsin] using (sin_sq_add_cos_sq ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))) + have hd : (deriv (sineFactor a) n)^2=4*(kappa:ℂ)^2 := by + rw [sineFactor_deriv] + calc + _ = 4*(kappa:ℂ)^2*cos ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))^2 := by ring + _ = _ := by rw [hc,mul_one] + obtain ⟨hp2,hp3⟩ := square_zero_product_jets (sineFactor a) g hf hg n h0 h2 + have hp : (fun s => sineFactor a s^2*g s)=P := (funext (P_factor a)).symm + rw [hp,←waveDerivative_eq_iterated,hd] at hp2 hp3 + have hfc : deriv (finiteC a) n=4*(kappa:ℂ)^2*deriv g n := + ((hg n).hasDerivAt.const_mul (4*(kappa:ℂ)^2)).deriv + constructor + · have hr := congrArg Complex.re hp2 + change (4*(kappa:ℂ)^2*g n).re= Q n + unfold Q + rw [hp2] + norm_num [←Complex.ofReal_pow,Complex.mul_re,Complex.mul_im] + ring + · rw [hfc,hp3] + norm_num [←Complex.ofReal_pow,Complex.mul_re,Complex.mul_im] + ring + +lemma kappa_ne_zero : (kappa:ℂ)≠0 := by + unfold kappa + exact_mod_cast div_ne_zero Real.pi_ne_zero (by norm_num : (36:ℝ)≠0) +lemma residue_bounds (a : Fin 15) : 0≤residue a ∧ residue a<36 := by + fin_cases a <;> norm_num [residue] +lemma sineFactor_ne_zero {a : Fin 15} {n : ℤ} (hn : n%36≠residue a) : + sineFactor a n≠0 := by + intro hz + have hsin : sin ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))=0 := by simpa [sineFactor] using hz + obtain ⟨k,hk⟩ := Complex.sin_eq_zero_iff.mp hsin + have hprod : ((n:ℂ)-(residue a:ℂ)-36*(k:ℂ))*(Real.pi:ℂ)=0 := by + unfold kappa at hk + push_cast at hk + linear_combination 36*hk + have hzero := (mul_eq_zero.mp hprod).resolve_right (by exact_mod_cast Real.pi_ne_zero) + have hnint : n-residue a-36*k=0 := by exact_mod_cast hzero + obtain ⟨hr0,hr36⟩ := residue_bounds a + have hh := Int.emod_add_mul_ediv n 36 + omega + +lemma finiteC_P (a : Fin 15) : + (fun s => (sineFactor a s)^2*finiteC a s) = fun s => 4*(kappa:ℂ)^2*P s := by + funext s + rw [P_factor a] + unfold finiteC + ring +lemma finiteC_other_jets (a : Fin 15) (n : Node) (hn : n.val%36≠residue a) : + finiteC a n.val=0 ∧ deriv (finiteC a) n.val=0 := by + have hne : (sineFactor a n.val)^2≠0 := pow_ne_zero 2 (sineFactor_ne_zero hn) + have hh := congrFun (finiteC_P a) (n.val:ℂ) + have hc : finiteC a n.val=0 := by + apply (mul_eq_zero.mp (show (sineFactor a n.val)^2*finiteC a n.val=0 by + simpa [P_node] using hh)).resolve_left hne + refine ⟨hc,?_⟩ + have hf : Differentiable ℂ (sineFactor a) := by unfold sineFactor; fun_prop + have hd := (((hf (n.val:ℂ)).hasDerivAt.pow 2).mul + ((differentiable_finiteC a (n.val:ℂ)).hasDerivAt)).deriv + change deriv (fun s => (sineFactor a s)^2*finiteC a s) n.val = _ at hd + rw [finiteC_P] at hd + have hr := ((differentiable_P (n.val:ℂ)).hasDerivAt.const_mul (4*(kappa:ℂ)^2)).deriv + rw [deriv_P_node,mul_zero] at hr + rw [hr,hc,mul_zero,zero_add] at hd + apply (mul_eq_zero.mp (show (sineFactor a n.val)^2*deriv (finiteC a) n.val=0 by simpa using hd.symm)).resolve_left hne + +def finiteRatio (a : Fin 15) (s : ℂ) : ℂ := + sin ((kappa:ℂ)*(s-(residue a:ℂ)))*cos ((kappa:ℂ)*(s-(residue a:ℂ)))/(kappa:ℂ) +lemma finiteD_eq_ratio (a : Fin 15) : finiteD a =fun s => finiteRatio a s*finiteC a s := by + funext s + unfold finiteD finiteRatio finiteC sineFactor + field_simp [kappa_ne_zero] + ring +lemma differentiable_finiteRatio (a : Fin 15) : Differentiable ℂ (finiteRatio a) := by + unfold finiteRatio + fun_prop +lemma finiteRatio_matching (a : Fin 15) (n : ℤ) (hn : n%36=residue a) : + finiteRatio a n=0 ∧ deriv (finiteRatio a) n=1 := by + have hz := sineFactor_at_residue a n hn + have hsin : sin ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))=0 := by simpa [sineFactor] using hz + have hc : cos ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))^2=1 := by + simpa [hsin] using sin_sq_add_cos_sq ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ))) + constructor + · simp [finiteRatio,hsin] + · have hθ := ((hasDerivAt_id (n:ℂ)).sub_const (residue a:ℂ)).const_mul (kappa:ℂ) + have hh := ((hθ.csin.mul hθ.ccos).div_const (kappa:ℂ)).deriv + change deriv (finiteRatio a) n = _ at hh + rw [hh] + simp only [id_eq,mul_one,hsin,zero_mul,add_zero] + calc + _ = ((kappa:ℂ)*cos ((kappa:ℂ)*((n:ℂ)-(residue a:ℂ)))^2)/(kappa:ℂ) := by ring + _ = _ := by rw [mul_div_cancel_left₀ _ kappa_ne_zero,hc] +lemma finiteD_matching_jets (a : Fin 15) (n : ℤ) (hn : n%36=residue a) : + finiteD a n=0 ∧ deriv (finiteD a) n=finiteC a n := by + obtain ⟨h0,h1⟩ := finiteRatio_matching a n hn + constructor + · rw [finiteD_eq_ratio] + simp only [h0,zero_mul] + · have hh := (((differentiable_finiteRatio a (n:ℂ)).hasDerivAt).mul + ((differentiable_finiteC a (n:ℂ)).hasDerivAt)).deriv + change deriv (fun s => finiteRatio a s*finiteC a s) _ = _ at hh + rw [←finiteD_eq_ratio,h0,h1,zero_mul,one_mul,add_zero] at hh + exact hh +lemma finiteD_other_jets (a : Fin 15) (n : Node) (hn : n.val%36≠residue a) : + finiteD a n.val=0 ∧ deriv (finiteD a) n.val=0 := by + obtain ⟨h0,h1⟩ := finiteC_other_jets a n hn + constructor + · rw [finiteD_eq_ratio] + simp only [h0,mul_zero] + · have hh := (((differentiable_finiteRatio a (n.val:ℂ)).hasDerivAt).mul + ((differentiable_finiteC a (n.val:ℂ)).hasDerivAt)).deriv + change deriv (fun s => finiteRatio a s*finiteC a s) _ = _ at hh + rw [←finiteD_eq_ratio,h0,h1,mul_zero,mul_zero,add_zero] at hh + exact hh +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FinitePairBridge.lean b/lean/OAI/Analysis/Triangular/Construction/FinitePairBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..69468492007ba7d33592ff57f9a86c98481f1b47 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FinitePairBridge.lean @@ -0,0 +1,63 @@ +import OAI.Analysis.Triangular.Taylor.CoefficientSpectral + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +lemma Acoefficient_constant (side : Fin 2) (r : Fin 8) : Acoefficient side 22 r=gamma side 2 r := by + simp [Acoefficient] +lemma finiteSpectrum_dot (side q : Fin 2) (j : Fin 31) (e : Fin 8 → ℝ) : + (∑ r : Fin 8,(e r:ℂ)*finiteSpectrum side q j r)= + if q.val=0 then ((gamma side *ᵥ e) 2:ℂ)*fourierCoeff j + else ∑ c : Fin 22,(finiteApprox side e c:ℂ)*finiteColumn ⟨c.val,by omega⟩ j := by + by_cases hq : q.val=0 + · simp only [finiteSpectrum,hq,↓reduceIte,Acoefficient_constant,Matrix.mulVec,dotProduct, + ofReal_sum,ofReal_mul,Finset.sum_mul] + apply Finset.sum_congr rfl + intro r _ + ring + · simp only [finiteSpectrum,hq,↓reduceIte,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro c _ + change (∑ r : Fin 8,(e r:ℂ)*(finiteColumn ⟨c.val,by omega⟩ j*(Acoefficient side ⟨c.val,by omega⟩ r:ℂ)))= + ((∑ r : Fin 8,Acoefficient side ⟨c.val,by omega⟩ r*e r:ℝ):ℂ)*finiteColumn ⟨c.val,by omega⟩ j + simp only [ofReal_sum,ofReal_mul,Finset.sum_mul] + apply Finset.sum_congr rfl + intro r _ + ring +lemma finiteSpectrum_input (side : Fin 2) (e : Fin 8 → ℝ) (br : Fin 2) (k : ℕ) (s : ℂ) : + (∑ q : Fin 2,∑ j : Fin 31,(∑ r : Fin 8,(e r:ℂ)*finiteSpectrum side q j r)*finiteWaveJet q br (frequency j) k s)= + inputJJet (coefficientInput ((gamma side *ᵥ e) 2) (finiteApprox side e) 0) br k s := by + simp only [finiteSpectrum_dot,Fin.sum_univ_two,Fin.val_zero,Fin.val_one,Nat.one_ne_zero,↓reduceIte] + rw [inputJJet,tailSpectral_zero_coeff,finiteSpectral_coefficient_apply] + simp only [_root_.smul_apply,smul_eq_mul,spectralPCLM_apply,spectralP, + waveFunctionJet_apply,Finset.mul_sum,Finset.sum_mul] + congr 1 + · apply Finset.sum_congr rfl + intro j _ + ring + · rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro c _ + apply Finset.sum_congr rfl + intro j _ + ring +lemma finiteJJet_pair (side : Fin 2) (e : Fin 8 → ℝ) (k : ℕ) (s : ℂ) : + finiteJJet side e k s= + pairJJet (coefficientInput ((gamma side *ᵥ e) 2) (finiteApprox side e) 0) + (coefficientInput ((gamma (otherSide side) *ᵥ e) 2) (finiteApprox (otherSide side) e) 0) k s := by + unfold finiteJJet + simp only [Finset.mul_sum,mul_add,Finset.sum_add_distrib,←mul_assoc] + rw [Finset.sum_comm (f:=fun r q => ∑ j : Fin 31,(e r:ℂ)*finiteSpectrum side q j r*finiteWaveJet q 0 (frequency j) k s)] + rw [Finset.sum_comm (f:=fun r q => ∑ j : Fin 31,(e r:ℂ)*finiteSpectrum (otherSide side) q j r*finiteWaveJet q 1 (frequency j) k s)] + simp_rw [Finset.sum_comm (f:=fun r j => (e r:ℂ)*finiteSpectrum side _ j r*finiteWaveJet _ 0 (frequency j) k s),←Finset.sum_mul] + simp_rw [Finset.sum_comm (f:=fun r j => (e r:ℂ)*finiteSpectrum (otherSide side) _ j r*finiteWaveJet _ 1 (frequency j) k s),←Finset.sum_mul] + rw [finiteSpectrum_input,finiteSpectrum_input] + rfl +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteProjection.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..45fc4b7b0b5ba8d8346066ff2ccfa1dc179e71cf --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteProjection.lean @@ -0,0 +1,51 @@ +import OAI.Analysis.Triangular.Construction.TailCoordinates + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +def rowNode (i : Fin 20) : Node := ⟨finiteNode ⟨i.val/2,by omega⟩,by + have hh : ∀ n : Fin 10,0 norm_num at * <;> (try omega) + all_goals split_ifs <;> norm_num at * <;> try omega + all_goals simp_all only [↓reduceIte] + all_goals + split_ifs <;> norm_num at * + omega +lemma finiteSpectral_row_directJet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (i : Fin 20) : + (finiteSpectral (coefficientInput C a w) (directJetFunction 1 H (rowNode i).val (rowDerivative i))).re= + -a ⟨i.val+2,by omega⟩ := by + rw [finiteSpectral_directJet] + simp only [finiteColumn_row_directJet,mul_ite,mul_neg,mul_one,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,↓reduceIte] +lemma inputJJet_row_direct_negative (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (i : Fin 20) : + (negativeJet H (rowNode i).val (rowDerivative i) (inputJJet (coefficientInput C a w) 0 0 (rowNode i).val) + (inputJJet (coefficientInput C a w) 0 1 (rowNode i).val)).re= -a ⟨i.val+2,by omega⟩ := by + rw [inputJJet_direct_negative,add_re,tailSpectral_finite_directJet C a w _ (rowNode_mem i), + finiteSpectral_row_directJet,zero_add] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteRemainder.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..74d057a5abbace93a42da13a1b40176a5a7f677f --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteRemainder.lean @@ -0,0 +1,88 @@ +import OAI.Analysis.Triangular.Construction.CurvatureAnalytic +import OAI.Analysis.Triangular.Taylor.CoefficientSpectral +import OAI.Analysis.Triangular.Signs.RemainderPre +import OAI.Analysis.Triangular.Signs.DeletedJets + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate + +def complexError (F : ℕ → ℝ → ℂ) (m v : ℝ) : ℂ := complexDeleted F m v-complexTaylor F m v +lemma complexError_add (F G : ℕ → ℝ → ℂ) (m v : ℝ) : + complexError (fun k s => F k s+G k s) m v=complexError F m v+complexError G m v := by + simp only [complexError,complexDeleted_add,complexTaylor_add] + ring +lemma complexError_mul (a : ℂ) (F : ℕ → ℝ → ℂ) (m v : ℝ) : + complexError (fun k s => a*F k s) m v=a*complexError F m v := by + simp only [complexError,complexDeleted_mul,complexTaylor_mul] + ring +lemma complexError_sum {ι : Type*} (S : Finset ι) (F : ι → ℕ → ℝ → ℂ) (m v : ℝ) : + complexError (fun k s => ∑ i∈S,F i k s) m v=∑ i∈S,complexError (F i) m v := by + simp only [complexError,complexDeleted_sum,complexTaylor_sum,Finset.sum_sub_distrib] +lemma finiteWave_error (q br : Fin 2) (n : Fin 7) (j : Fin 31) {v : ℝ} (hv : |v|≤nearRadius n) : + ‖complexError (fun k s => finiteWaveJet q br (frequency j) k s) (nearNode n) v‖≤ + remainderWave q br (nearNode n) (nearRadius n) (frequency j) := by + have he : (fun (k : ℕ) (s : ℝ) => finiteWaveJet q br (frequency j) k s)= + (fun (k : ℕ) (s : ℝ) => taylorAmplitude q br (frequency j)*(Complex.exp (taylorPhase q br (frequency j)*(s:ℂ))*(taylorPhase q br (frequency j))^k)) := by + funext k s; simp only [finiteWaveJet,mul_assoc] + rw [he,complexError_mul,complexError,complexDeleted_exp,complexTaylor_exp,norm_mul] + have hb := Envelope.expDeleted_error (taylorPhase q br (frequency j)) (nearNode n) v (nearRadius n) + (nearRadius_nonneg n) hv (remainder_ratio_lt_one q br n j) + have hh := mul_le_mul_of_nonneg_left hb (norm_nonneg (taylorAmplitude q br (frequency j))) + convert hh using 1 + first | rfl | (simp only [remainderWave,curvatureWave,Complex.norm_exp,mul_re,ofReal_re,ofReal_im,mul_zero,sub_zero]; ring) +lemma remainderWave_nonneg (q br : Fin 2) (n : Fin 7) (j : Fin 31) : + 0≤remainderWave q br (nearNode n) (nearRadius n) (frequency j) := by + unfold remainderWave + have hp := sub_pos.mpr (remainder_ratio_lt_one q br n j) + have hy := nearRadius_nonneg n + have hc := curvatureWave_nonneg q br (nearNode n) (frequency j) + positivity +lemma rawRemainderColumn_nonneg (br : Fin 2) (n : Fin 7) (c : Fin 22) : + 0≤rawRemainderColumn br n c := Finset.sum_nonneg fun j _ => mul_nonneg (remainderWave_nonneg 1 br n j) (norm_nonneg _) +lemma rawRemainderConstant_nonneg (br : Fin 2) (n : Fin 7) : + 0≤rawRemainderConstant br n := Finset.sum_nonneg fun j _ => mul_nonneg (remainderWave_nonneg 0 br n j) (norm_nonneg _) +lemma inputJJet_zero_tail (C : ℝ) (a : TrigonometricCoefficients) (br : Fin 2) (k : ℕ) (s : ℂ) : + inputJJet (coefficientInput C a 0) br k s= + (C:ℂ)*(∑ j : Fin 31,fourierCoeff j*finiteWaveJet 0 br (frequency j) k s)+ + ∑ c : Fin 22,(a c:ℂ)*(∑ j : Fin 31,finiteColumn ⟨c.val,by omega⟩ j*finiteWaveJet 1 br (frequency j) k s) := by + rw [inputJJet,tailSpectral_zero_coeff,finiteSpectral_coefficient_apply] + simp only [_root_.smul_apply,smul_eq_mul,spectralPCLM_apply,spectralP,waveFunctionJet_apply] +lemma atom_remainder_bound (S : Fin 31 → ℂ) (q br : Fin 2) (n : Fin 7) {v : ℝ} (hv : |v|≤nearRadius n) : + ‖complexError (fun k s => ∑ j : Fin 31,S j*finiteWaveJet q br (frequency j) k s) (nearNode n) v‖≤ + ∑ j : Fin 31,remainderWave q br (nearNode n) (nearRadius n) (frequency j)*‖S j‖ := by + rw [complexError_sum] + simp only [complexError_mul] + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro j _ + rw [norm_mul,mul_comm] + exact mul_le_mul_of_nonneg_right (finiteWave_error q br n j hv) (norm_nonneg _) +lemma finite_input_error (C : ℝ) (a : TrigonometricCoefficients) (br : Fin 2) (n : Fin 7) {v M : ℝ} + (hv : |v|≤nearRadius n) (hM : ∀ c : Fin 22,rawRemainderColumn br n c≤M) : + ‖complexError (fun k s => inputJJet (coefficientInput C a 0) br k s) (nearNode n) v‖≤ + |C| *rawRemainderConstant br n+‖a‖*M := by + simp only [inputJJet_zero_tail] + rw [complexError_add,complexError_mul] + apply (norm_add_le _ _).trans + apply add_le_add + · rw [norm_mul,Complex.norm_real,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (atom_remainder_bound fourierCoeff 0 br n hv) (abs_nonneg _) + · rw [complexError_sum] + simp only [complexError_mul] + calc + _ ≤ ∑ c : Fin 22,‖(a c:ℂ)*complexError (fun k s => ∑ j : Fin 31,finiteColumn ⟨c.val,by omega⟩ j*finiteWaveJet 1 br (frequency j) k s) (nearNode n) v‖ := norm_sum_le _ _ + _ ≤ ∑ c : Fin 22,|a c| *M := by + apply Finset.sum_le_sum + intro c _ + rw [norm_mul,Complex.norm_real,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left ((atom_remainder_bound _ 1 br n hv).trans (hM c)) (abs_nonneg _) + _ = ‖a‖*M := by rw [←Finset.sum_mul,AtomicTriangular.L1Kernel.l1_norm,tsum_fintype] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteSystem.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8d17fe7cc8110c859f36c81e3f977585b9c0236 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteSystem.lean @@ -0,0 +1,44 @@ +import OAI.Analysis.Triangular.Certificate.Inverse + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Matrix + +lemma Uplus_equation : (1-R)*Uplus = Yf+R0*(gamma 1+gamma 0) := by + unfold Uplus + apply Matrix.mul_nonsing_inv_cancel_left + exact (Matrix.isUnit_iff_isUnit_det _).mp FiniteCertificate.minusBlock_isUnit +lemma Uminus_equation : (1+R)*Uminus = Yf+R0*(gamma 1-gamma 0) := by + unfold Uminus + apply Matrix.mul_nonsing_inv_cancel_left + exact (Matrix.isUnit_iff_isUnit_det _).mp FiniteCertificate.plusBlock_isUnit +lemma finiteSolution_equations : + finiteSolution 0 = R*finiteSolution 1+R0*gamma 1+Yf ∧ + finiteSolution 1 = R*finiteSolution 0+R0*gamma 0 := by + have hp := Uplus_equation + have hm := Uminus_equation + simp only [Matrix.sub_mul,Matrix.add_mul,Matrix.one_mul,Matrix.mul_add,Matrix.mul_sub] at hp hm + constructor + · simp only [finiteSolution,Fin.val_zero,Fin.val_one,one_ne_zero,ite_true,ite_false, + Matrix.mul_smul,Matrix.mul_sub] + ext i j + have hpij := congrFun (congrFun hp i) j + have hmij := congrFun (congrFun hm i) j + simp only [Matrix.add_apply,Matrix.sub_apply] at hpij hmij + simp only [Matrix.add_apply,Matrix.sub_apply,Matrix.smul_apply,smul_eq_mul] + linarith + · simp only [finiteSolution,Fin.val_zero,Fin.val_one,one_ne_zero,ite_true,ite_false, + Matrix.mul_smul,Matrix.mul_add] + ext i j + have hpij := congrFun (congrFun hp i) j + have hmij := congrFun (congrFun hm i) j + simp only [Matrix.add_apply,Matrix.sub_apply] at hpij hmij + simp only [Matrix.add_apply,Matrix.sub_apply,Matrix.smul_apply,smul_eq_mul] + linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/FiniteTargetBridge.lean b/lean/OAI/Analysis/Triangular/Construction/FiniteTargetBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..acf6e5bab51f43aa20168eca99b835bf3a7e73b7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/FiniteTargetBridge.lean @@ -0,0 +1,30 @@ +import OAI.Analysis.Triangular.Construction.ActualCorrection + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Matrix +namespace AtomicTriangular.Construction +lemma gaussianTarget_factor (z : ℝ) (n : Fin 10) (d : Fin 2) : + gaussianTarget H z (finiteNode n) d=targetCoefficient n * Real.exp ((1-finiteNode n)/z)* + (if d.val=0 then z else -1+(Real.pi*eta-D (finiteNode n))*z) := by + have he : H-h=eta := by norm_num [H,h,eta] + simp only [gaussianTarget,targetCoefficient,he,Real.exp_add] + ring +lemma Yf_actual (z : ℝ) (i : Fin 20) : + (Yf *ᵥ actualParameter z) i= + if i.val<8 then gaussianTarget H z (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ else 0 := by + rw [gaussianTarget_factor] + fin_cases i <;> norm_num [Matrix.mulVec,dotProduct,Yf,actualParameter,Fin.sum_univ_succ, + finiteNode,residue] <;> ring +lemma Yf_residual (z : ℝ) (i : Fin 20) : + (Yf *ᵥ actualParameter z) i+finiteResidual z i= + gaussianTarget H z (finiteNode ⟨i.val/2,by omega⟩) ⟨i.val%2,by omega⟩ := by + rw [Yf_actual] + change (if i.val<8 then _ else 0)+(if i.val<8 then 0 else _)=_ + split_ifs <;> ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/L1Kernel.lean b/lean/OAI/Analysis/Triangular/Construction/L1Kernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..7213cb358e104539f6fc8079f794c6f71ac0e3bf --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/L1Kernel.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Topology lp +namespace AtomicTriangular.L1Kernel +variable {α β : Type*} + +lemma l1_norm (a : ℓ¹(α,ℝ)) : ‖a‖ = ∑' i, |a i| := by + simpa only [ENNReal.toReal_one,Real.rpow_one,one_div_one,Real.norm_eq_abs] using + lp.norm_eq_tsum_rpow (by norm_num : 0 < (1:ENNReal).toReal) a +lemma l1_summable (a : ℓ¹(α,ℝ)) : Summable (fun i => |a i|) := by + simpa only [ENNReal.toReal_one,Real.rpow_one,Real.norm_eq_abs] using + a.property.summable (by norm_num : 0 < (1:ENNReal).toReal) + +def column (K : β → α → ℝ) (hK : ∀ j, Summable (fun i => |K i j|)) (j : α) : ℓ¹(β,ℝ) := + ⟨fun i => K i j, by + apply (memℓp_gen_iff (by norm_num : 0 < (1:ENNReal).toReal)).mpr + simpa only [ENNReal.toReal_one,Real.rpow_one,Real.norm_eq_abs] using hK j⟩ +lemma column_norm (K : β → α → ℝ) (hK : ∀ j, Summable (fun i => |K i j|)) (j : α) : + ‖column K hK j‖ = ∑' i, |K i j| := l1_norm _ + +variable (K : β → α → ℝ) (hK : ∀ j, Summable (fun i => |K i j|)) + (C : ℝ) (hC : 0 ≤ C) (hB : ∀ j, ∑' i, |K i j| ≤ C) +include C hB +lemma summable_columns (a : ℓ¹(α,ℝ)) : + Summable (fun j => a j • column K hK j) := by + apply Summable.of_norm_bounded ((l1_summable a).mul_right C) + intro j + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left ((column_norm K hK j).trans_le (hB j)) (abs_nonneg _) + +omit C hB in +def applyKernel (a : ℓ¹(α,ℝ)) : ℓ¹(β,ℝ) := ∑' j, a j • column K hK j +lemma applyKernel_norm (a : ℓ¹(α,ℝ)) : ‖applyKernel K hK a‖ ≤ C*‖a‖ := by + have hs : Summable (fun j => ‖a j • column K hK j‖) := + ((l1_summable a).mul_right C).of_nonneg_of_le (fun _ => norm_nonneg _) (fun j => by + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left ((column_norm K hK j).trans_le (hB j)) (abs_nonneg _)) + calc + _ ≤ ∑' j, ‖a j • column K hK j‖ := norm_tsum_le_tsum_norm hs + _ ≤ ∑' j, |a j| * C := hs.tsum_le_tsum (fun j => by + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left ((column_norm K hK j).trans_le (hB j)) (abs_nonneg _)) + ((l1_summable a).mul_right C) + _ = C*‖a‖ := by rw [tsum_mul_right,l1_norm,mul_comm] + +lemma applyKernel_add (a b : ℓ¹(α,ℝ)) : + applyKernel K hK (a+b) = applyKernel K hK a + applyKernel K hK b := by + simp only [applyKernel,lp.coeFn_add,Pi.add_apply,add_smul] + exact (summable_columns K hK C hB a).tsum_add (summable_columns K hK C hB b) +lemma applyKernel_smul (r : ℝ) (a : ℓ¹(α,ℝ)) : + applyKernel K hK (r • a) = r • applyKernel K hK a := by + simp only [applyKernel,lp.coeFn_smul,Pi.smul_apply,smul_eq_mul,mul_smul] + exact (summable_columns K hK C hB a).tsum_const_smul r + +def operator : ℓ¹(α,ℝ) →L[ℝ] ℓ¹(β,ℝ) := + LinearMap.mkContinuous + { toFun := applyKernel K hK + map_add' := applyKernel_add K hK C hB + map_smul' := fun r a => applyKernel_smul K hK C hB r a } + C (applyKernel_norm K hK C hB) +include hC in +lemma operator_norm : ‖operator K hK C hB‖ ≤ C := + ContinuousLinearMap.opNorm_le_bound _ hC (applyKernel_norm K hK C hB) +end AtomicTriangular.L1Kernel +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/L1Matrix.lean b/lean/OAI/Analysis/Triangular/Construction/L1Matrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..57f0da13570c1ee99049eee39be049ca85134077 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/L1Matrix.lean @@ -0,0 +1,66 @@ +import OAI.Analysis.Triangular.Construction.L1Kernel +import OAI.Analysis.Triangular.Auxiliary.MatrixNorm + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.L1Kernel +lemma operator_apply {α β : Type*} (K : β → α → ℝ) + (hK : ∀ j, Summable (fun i => |K i j|)) (C : ℝ) + (hB : ∀ j, ∑' i, |K i j| ≤ C) (a : ℓ¹(α,ℝ)) (i : β) : + operator K hK C hB a i = ∑' j, a j * K i j := by + have hh := (lp.evalCLM ℝ (fun _ : β => ℝ) 1 i).map_tsum (summable_columns K hK C hB a) + change (∑' j, a j • column K hK j) i = ∑' j, a j*K i j at ⊢ + change (∑' j, a j • column K hK j) i = ∑' j, (a j • column K hK j) i at hh + simpa only [lp.coeFn_smul,Pi.smul_apply,smul_eq_mul,column] using hh +end AtomicTriangular.L1Kernel +namespace AtomicTriangular.MatrixBounds +open L1Kernel +variable {m n p : Type*} [Fintype m] [Fintype n] [Fintype p] + [Nonempty m] [Nonempty n] [Nonempty p] +def l1Matrix (A : Matrix m n ℝ) : ℓ¹(n,ℝ) →L[ℝ] ℓ¹(m,ℝ) := + operator A (fun j => (hasSum_fintype _).summable) (matNorm A) + (fun j => by simpa [tsum_fintype,colNorm] using colNorm_le_matNorm A j) +omit [Nonempty m] in +lemma l1Matrix_apply (A : Matrix m n ℝ) (x : ℓ¹(n,ℝ)) (i : m) : + l1Matrix A x i = ∑ j, A i j*x j := by + have hh := operator_apply A (fun j => (hasSum_fintype _).summable) (matNorm A) + (fun j => by simpa [tsum_fintype,colNorm] using colNorm_le_matNorm A j) x i + simpa only [l1Matrix,tsum_fintype,mul_comm] using hh +omit [Nonempty m] in +lemma l1Matrix_norm (A : Matrix m n ℝ) : ‖l1Matrix A‖ ≤ matNorm A := + operator_norm _ _ _ (matNorm_nonneg A) _ +omit [Nonempty m] in +lemma l1Matrix_mul (A : Matrix m n ℝ) (B : Matrix n p ℝ) : + l1Matrix (A*B) = (l1Matrix A).comp (l1Matrix B) := by + ext x i + simp only [l1Matrix_apply,ContinuousLinearMap.comp_apply,Matrix.mul_apply, + Finset.sum_mul,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro k _ + apply Finset.sum_congr rfl + intro j _ + ring +lemma l1Matrix_one [DecidableEq n] : l1Matrix (1:Matrix n n ℝ) = 1 := by + ext x i + simp [l1Matrix_apply,Matrix.one_apply] +omit [Nonempty m] in +lemma l1Matrix_add (A B : Matrix m n ℝ) : l1Matrix (A+B)=l1Matrix A+l1Matrix B := by + ext x i + simp [l1Matrix_apply,add_mul,Finset.sum_add_distrib] +omit [Nonempty m] in +lemma l1Matrix_sub (A B : Matrix m n ℝ) : l1Matrix (A-B)=l1Matrix A-l1Matrix B := by + ext x i + simp [l1Matrix_apply,sub_mul,Finset.sum_sub_distrib] +lemma l1Matrix_inverse [DecidableEq n] (A : Matrix n n ℝ) (hA : IsUnit A) : + (l1Matrix A).comp (l1Matrix A⁻¹)=1 ∧ (l1Matrix A⁻¹).comp (l1Matrix A)=1 := by + have hd := (Matrix.isUnit_iff_isUnit_det A).mp hA + constructor + · rw [←l1Matrix_mul,Matrix.mul_nonsing_inv A hd,l1Matrix_one] + · rw [←l1Matrix_mul,Matrix.nonsing_inv_mul A hd,l1Matrix_one] +end AtomicTriangular.MatrixBounds +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/NodeJets.lean b/lean/OAI/Analysis/Triangular/Construction/NodeJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f372afa69f9ccc3b496319f8423cbcfe9814a25 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/NodeJets.lean @@ -0,0 +1,82 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ComplexConjugate +namespace AtomicTriangular.Construction + +lemma factor_second_third (g : ℂ → ℂ) (hg : Differentiable ℂ g) (n : ℂ) : + iteratedDeriv 2 (fun s => (s-n)^2*g s) n = 2*g n ∧ + iteratedDeriv 3 (fun s => (s-n)^2*g s) n = 6*deriv g n := by + have hp (k : ℕ) : iteratedDeriv k (fun s : ℂ => (s-n)^2) n = + (2:ℕ).descFactorial k * (n-n)^(2-k) := by + have hh := congrFun (iteratedDeriv_comp_sub_const k (fun s : ℂ => s^2) n) n + exact hh.trans (iteratedDeriv_pow 2 k) + have hpoly : ContDiff ℂ 3 (fun s : ℂ => (s-n)^2) := by fun_prop + constructor + · rw [iteratedDeriv_fun_mul (hpoly.of_le (by norm_num)).contDiffAt hg.contDiff.contDiffAt] + simp [Finset.sum_range_succ,hp,iteratedDeriv_zero] + · rw [iteratedDeriv_fun_mul hpoly.contDiffAt hg.contDiff.contDiffAt] + norm_num [Finset.sum_range_succ,hp,iteratedDeriv_one] + +lemma P_cBasis (n : Node) : P = fun s => (s-(n.val:ℂ))^2*cBasis n s := by + funext s + by_cases hs : s = (n.val:ℂ) + · simp [hs,P_node] + · rw [cBasis_eq n hs] + field_simp + +lemma cBasis_at_node (n : Node) : (cBasis n n.val).re = Q n.val := by + have hh := (factor_second_third (cBasis n) (differentiable_cBasis n) n.val).1 + rw [← P_cBasis n] at hh + have he := congrArg Complex.re hh + rw [← waveDerivative_eq_iterated] at he + norm_num [Complex.mul_re] at he + unfold Q + linarith +lemma cBasis_deriv_at_node (n : Node) : 6*(deriv (cBasis n) n.val).re = + (waveDerivative 3 n.val).re := by + have hh := (factor_second_third (cBasis n) (differentiable_cBasis n) n.val).2 + rw [← P_cBasis n,← waveDerivative_eq_iterated] at hh + have he := congrArg Complex.re hh + simpa using he.symm + +lemma dBasis_cBasis (n : Node) : dBasis n = fun s => (s-(n.val:ℂ))*cBasis n s := by + funext s + by_cases hs : s = (n.val:ℂ) + · simp [hs,dBasis_node] + · rw [dBasis_eq n hs,cBasis_eq n hs] + field_simp +lemma deriv_dBasis_at_node (n : Node) : deriv (dBasis n) n.val = cBasis n n.val := by + have hh := (((hasDerivAt_id (n.val:ℂ)).sub_const (n.val:ℂ)).mul + ((differentiable_cBasis n _).hasDerivAt)).deriv + rw [dBasis_cBasis n] + simpa using! hh + +lemma cBasis_other_node {m n : Node} (hmn : m.val ≠ n.val) : cBasis n m.val = 0 := by + rw [cBasis_eq n (by exact_mod_cast hmn),P_node,zero_div] +lemma dBasis_other_node {m n : Node} (hmn : m.val ≠ n.val) : dBasis n m.val = 0 := by + rw [dBasis_eq n (by exact_mod_cast hmn),P_node,zero_div] + +lemma deriv_cBasis_other_node {m n : Node} (hmn : m.val ≠ n.val) : + deriv (cBasis n) m.val = 0 := by + have hh := ((((hasDerivAt_id (m.val:ℂ)).sub_const (n.val:ℂ)).pow 2).mul + ((differentiable_cBasis n _).hasDerivAt)).deriv + change deriv (fun s => (s-(n.val:ℂ))^2*cBasis n s) m.val = _ at hh + rw [← P_cBasis n,deriv_P_node m,cBasis_other_node hmn] at hh + have hne : ((m.val:ℂ)-(n.val:ℂ))^2 ≠ 0 := pow_ne_zero 2 (sub_ne_zero.mpr (by exact_mod_cast hmn)) + have hzero : ((m.val:ℂ)-(n.val:ℂ))^2 * deriv (cBasis n) m.val = 0 := by simpa using hh.symm + exact (mul_eq_zero.mp hzero).resolve_left hne +lemma deriv_dBasis_other_node {m n : Node} (hmn : m.val ≠ n.val) : + deriv (dBasis n) m.val = 0 := by + have hh := (((hasDerivAt_id (m.val:ℂ)).sub_const (n.val:ℂ)).mul + ((differentiable_cBasis n _).hasDerivAt)).deriv + change deriv (fun s => (s-(n.val:ℂ))*cBasis n s) m.val = _ at hh + rw [← dBasis_cBasis n,cBasis_other_node hmn,deriv_cBasis_other_node hmn] at hh + simpa using hh + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/Normalization.lean b/lean/OAI/Analysis/Triangular/Construction/Normalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..58632350cf08bd91eba7e1da906180f33f383872 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/Normalization.lean @@ -0,0 +1,91 @@ +import OAI.Analysis.Triangular.Schwartz.FourierPair +import OAI.Analysis.Triangular.Signs.FarSigns + +namespace OAI + +noncomputable section +open scoped BigOperators FourierTransform SchwartzMap +open Complex +namespace AtomicTriangular.Construction +lemma waveFunctionJet_transformed_zero (q : Fin 2) (s : ℂ) : + waveFunctionJet q 1 0 s=transformedFunction (damping q) h (damping_pos q) s := by + simp only [waveFunctionJet,waveAmplitudeFunction,wavePhaseFunction,Fin.val_one,Nat.one_ne_zero,↓reduceIte,pow_zero,mul_one,transformedFunction] +lemma inputJJet_transformed_zero (a : InputCoefficients) (s : ℂ) : + inputJJet a 1 0 s=transformedInput a s := by + rw [inputJJet,waveFunctionJet_transformed_zero,waveFunctionJet_transformed_zero] + rfl +lemma inputComplex_radialJ (a : InputCoefficients) (x : Plane) : + inputComplex a x=exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*inputJJet a 0 0 (radial x) := by + rw [inputComplex_spectral,inputJJet,waveFunctionJet_zero_phase,waveFunctionJet_direct_zero] + simp only [map_smul,smul_eq_mul,mul_add,←mul_assoc,damping,Fin.val_one,Nat.one_ne_zero,↓reduceIte] + rw [←exp_add] + congr 3 + ring +lemma pairComplex_radialJ (a₁ a₂ : InputCoefficients) (x : Plane) : + pairComplex a₁ a₂ x=exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*pairJJet a₁ a₂ 0 (radial x) := by + simp only [pairComplex,Pi.add_apply,inputComplex_radialJ,outputComplex,pairJJet,inputJJet_transformed_zero,mul_add] +lemma pairSchwartz_radialJ (a₁ a₂ : InputCoefficients) (x : Plane) : + pairSchwartz a₁ a₂ x=Real.exp (-Real.pi*h*radial x)*pairJ a₁ a₂ (radial x) := by + rw [pairSchwartz_apply,pairComplex_radialJ] + have he : exp (-(Real.pi:ℂ)*h*(radial x:ℂ))=(Real.exp (-Real.pi*h*radial x):ℝ) := by simp + rw [he,mul_re] + simp only [ofReal_re,ofReal_im,zero_mul,sub_zero,pairJ] + +lemma normalizingDen_pos {z : ℝ} (hz : 0 (pairSchwartz (actualInput side z hz hzB) (actualInput (otherSide side) z hz hzB) x:ℂ))) x=_ + rw [complex_fourier_smul] + change (((normalizingDen z)⁻¹:ℝ):ℂ)*realFourier (pairSchwartz (actualInput side z hz hzB) (actualInput (otherSide side) z hz hzB)) x=_ + rw [pairSchwartz_fourier] + fin_cases side <;> rfl +lemma actualSchwartz_fourier {z : ℝ} (hz : 0 jetMultiplier (damping q) v n d t.val, + (continuous_jetMultiplier (damping_pos q) v n d).comp continuous_subtype_val⟩ +lemma jetFunction_apply (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) (t : Spectrum) : + jetFunction q v n d t=jetMultiplier (damping q) v n d t.val := rfl + +def negativeJet (v : ℝ) (n : ℤ) (d : Fin 2) (a b : ℂ) : ℂ := + exp (Real.pi*(v-h)*(n:ℂ))*(Q n:ℂ)⁻¹* + (if d.val=0 then -a else ((D n:ℂ)-Real.pi*(v-h))*a-b) +lemma zeta_change (k v t : ℝ) : I*Real.pi*zeta k v t = + (Real.pi*(v-h):ℂ)+I*Real.pi*zeta k h t := by + unfold zeta + push_cast + ring_nf + simp [I_sq] + ring +lemma transformedWave_change (k v t : ℝ) (s : ℂ) : transformedWave k v t s= + exp (Real.pi*(v-h)*s)*transformedWave k h t s := by + unfold transformedWave + rw [zeta_change,add_mul,exp_add] + ring +lemma negativeJet_wave (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) (t : ℝ) : + negativeJet v n d (finiteWaveJet q 1 t 0 n) (finiteWaveJet q 1 t 1 n)= + jetMultiplier (damping q) v n d t := by + simp only [finiteWaveJet,taylorPhase,taylorAmplitude,Fin.val_one,Nat.one_ne_zero,↓reduceIte,pow_zero,pow_one,mul_one] + unfold negativeJet jetMultiplier + rw [transformedWave_change] + unfold transformedWave + rw [zeta_change (damping q) v t] + split_ifs <;> ring +lemma negativeJet_linear (T : C(Spectrum,ℂ) →L[ℂ] ℂ) (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : + negativeJet v n d (T (waveFunctionJet q 1 0 n)) (T (waveFunctionJet q 1 1 n))= + T (jetFunction q v n d) := by + have he : jetFunction q v n d = + (exp (Real.pi*(v-h)*(n:ℂ))*(Q n:ℂ)⁻¹) • + (if d.val=0 then -waveFunctionJet q 1 0 n else + ((D n:ℂ)-Real.pi*(v-h)) • waveFunctionJet q 1 0 n-waveFunctionJet q 1 1 n) := by + ext t + simp only [ContinuousMap.smul_apply,smul_eq_mul,jetFunction_apply] + split_ifs with hd + · simpa only [negativeJet,hd,↓reduceIte,ContinuousMap.neg_apply,ContinuousMap.sub_apply,ContinuousMap.smul_apply,smul_eq_mul,waveFunctionJet_apply] using (negativeJet_wave q v n d t.val).symm + · simpa only [negativeJet,hd,↓reduceIte,ContinuousMap.neg_apply,ContinuousMap.sub_apply,ContinuousMap.smul_apply,smul_eq_mul,waveFunctionJet_apply] using (negativeJet_wave q v n d t.val).symm + rw [he] + unfold negativeJet + split_ifs <;> simp only [map_smul,map_neg,map_sub,smul_eq_mul] +lemma finiteSpectral_jet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : + (finiteSpectral (coefficientInput C a w) (jetFunction q v n d)).re= + ∑ c : Fin 22, a c*jet (damping q) v n d (finiteColumn ⟨c.val,by omega⟩) := by + rw [finiteSpectral_coefficient_apply] + simp only [Complex.re_sum] + apply Finset.sum_congr rfl + intro c _ + rw [mul_re] + simp only [ofReal_re,ofReal_im,zero_mul,sub_zero] + congr 1 + unfold jet + congr 1 + apply Finset.sum_congr rfl + intro j _ + rw [jetFunction_apply,mul_comm] +lemma spectralP_jet (q : Fin 2) (v : ℝ) (n : ℤ) (d : Fin 2) : + (spectralP (jetFunction q v n d)).re=jet (damping q) v n d (finiteColumn 22) := by + unfold spectralP jet + congr 1 + apply Finset.sum_congr rfl + intro j _ + change fourierCoeff j*jetMultiplier _ _ _ _ _ = jetMultiplier _ _ _ _ _*fourierCoeff j + ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/PeriodicJets.lean b/lean/OAI/Analysis/Triangular/Construction/PeriodicJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..316d41557d2612ebf5a1039377f137c4fe98a7b8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/PeriodicJets.lean @@ -0,0 +1,61 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma P_periodic : Function.Periodic P 36 := by + intro s + unfold P + apply Finset.prod_congr rfl + intro a _ + unfold sineFactor + have hh : (kappa:ℂ)*(s+36-(residue a:ℂ)) = (kappa:ℂ)*(s-(residue a:ℂ))+(Real.pi:ℂ) := by + unfold kappa + push_cast + ring + rw [hh,Complex.sin_add_pi] + ring +lemma waveDerivative_periodic (k : ℕ) : Function.Periodic (waveDerivative k) 36 := by + have he : (fun s : ℂ => P (s+36)) = P := funext P_periodic + have hh := iteratedDeriv_comp_add_const k P 36 + rw [he] at hh + rw [waveDerivative_eq_iterated] + intro s + exact (congrFun hh s).symm +lemma waveDerivative_emod (k : ℕ) (n : ℤ) : waveDerivative k n = waveDerivative k ((n%36:ℤ):ℂ) := by + have hh := (waveDerivative_periodic k).int_mul (n/36) ((n%36:ℤ):ℂ) + have hn : (((n%36:ℤ):ℂ)+(n/36:ℤ)*36) = (n:ℂ) := by + exact_mod_cast (by simpa [mul_comm] using Int.emod_add_mul_ediv n 36) + rw [hn] at hh + exact hh +lemma Q_emod (n : ℤ) : Q n = Q (n%36) := by simp only [Q,waveDerivative_emod 2 n] +lemma D_emod (n : ℤ) : D n = D (n%36) := by simp only [D,waveDerivative_emod 3 n,Q_emod n] +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction +lemma Q_node_bounds (n : ℤ) (hn : n%36 ∈ residues) : (157/1000:ℝ) repetitionEnvelope_nonneg a _)).mpr + refine ⟨fun r => ?_,(hasSum_fintype _).summable⟩ + change Summable (fun l : ℕ => repetitionEnvelope a (enumerateTail (r,l))) + simp_rw [repetitionEnvelope_enumerate] + split_ifs + · exact (summable_geometric_of_lt_one repetitionRatio_pos.le repetitionRatio_lt).mul_left _ + · exact summable_zero +lemma tsum_repetitionEnvelope (a : Fin 11) : + (∑' n, repetitionEnvelope a n) = + (1+Real.pi*eta)*Real.exp (-Real.pi*eta*tailBase ⟨a.val,by omega⟩)/(1-repetitionRatio) := by + rw [← tailEnumeration.tsum_eq] + have hs := tailEnumeration.summable_iff.mpr (summable_repetitionEnvelope a) + change Summable (fun p : Fin 15 × ℕ => repetitionEnvelope a (enumerateTail p)) at hs + change (∑' p : Fin 15 × ℕ, repetitionEnvelope a (enumerateTail p)) = _ + rw [hs.tsum_prod,tsum_fintype] + simp_rw [repetitionEnvelope_enumerate] + have hi (P : Prop) [Decidable P] (f : ℕ → ℝ) : + (∑' l, if P then f l else 0) = if P then ∑' l, f l else 0 := by + by_cases hh : P <;> simp [hh] + simp_rw [hi] + simp only [Finset.sum_ite_eq',Finset.mem_univ,↓reduceIte,tsum_mul_left, + tsum_geometric_of_lt_one repetitionRatio_pos.le repetitionRatio_lt,div_eq_mul_inv] +lemma repetitionEnvelope_bound (a : Fin 11) : (∑' n, repetitionEnvelope a n) ≤ repetitionNorm := by + rw [tsum_repetitionEnvelope] + have ht : 36 ≤ tailBase ⟨a.val,by omega⟩ := by revert a; decide +kernel + have he : Real.exp (-Real.pi*eta*(tailBase ⟨a.val,by omega⟩:ℝ)) ≤ repetitionRatio := by + unfold repetitionRatio + apply Real.exp_le_exp.mpr + have ht' : (36:ℝ) ≤ (tailBase ⟨a.val,by omega⟩:ℝ) := by exact_mod_cast ht + nlinarith [pi_eta_pos] + apply div_le_div_of_nonneg_right _ (sub_pos.mpr repetitionRatio_lt).le + exact mul_le_mul_of_nonneg_left he (by linarith [pi_eta_pos]) + +def repetitionEntry (c d : Fin 2) : ℝ := + if c.val=0 then if d.val=0 then 1 else -Real.pi*eta + else if d.val=0 then 0 else 1 +lemma repetitionEntry_bound (c : Fin 2) : (∑ d : Fin 2, |repetitionEntry c d|) ≤ 1+Real.pi*eta := by + fin_cases c <;> norm_num [Fin.sum_univ_succ,repetitionEntry,abs_of_pos Real.pi_pos,abs_of_pos (by norm_num [eta] : 0 |repetitionKernel p a c|) ∧ + (∑' p, |repetitionKernel p a c|) ≤ repetitionNorm := by + obtain ⟨hs,hb⟩ := paired_summable_bound (fun n d => repetitionKernel (n,d) a c) + (repetitionEnvelope a) (summable_repetitionEnvelope a) (repetitionKernel_pair a c) + exact ⟨hs,hb.trans (repetitionEnvelope_bound a)⟩ +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/RepetitionBound.lean b/lean/OAI/Analysis/Triangular/Construction/RepetitionBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e12bce336769f908734a59371a9ee28507a449b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/RepetitionBound.lean @@ -0,0 +1,36 @@ +import OAI.Analysis.Triangular.Construction.Repetition + +namespace OAI + +noncomputable section +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def repetitionExpInput : CI := CI.ofReal (((RI.point (-36)).mul piBox).mul ((RI.point 1).divNat 5)) +def repetitionExpData : RI := ⟨150137870720187118741303133902997840703988265412221,150137870720187118741303133902997840703988265412235⟩ +lemma repetitionExpData_calc : repetitionExpInput.exp.re=repetitionExpData := by decide +kernel +lemma repetitionExpData_mem : repetitionExpData.Mem repetitionRatio := by + rw [← repetitionExpData_calc] + apply ri_exp_mem + exact RI.mem_mul (RI.mem_mul (by simpa using RI.mem_point (-36)) piBox_mem) + (by simpa [Construction.eta] using RI.mem_divNat (RI.mem_point 1) (by norm_num : 0<5)) + decide +kernel +def repetitionNormBox : RI := ⟨244472277092922460276322364678166776718535796684152,244472277092922460276322364678166776718535796684177⟩ +lemma repetitionNormBox_calc : + (((RI.point 1).add (piBox.mul ((RI.point 1).divNat 5))).mul repetitionExpData).mul + (((RI.point 1).sub repetitionExpData).invPos)=repetitionNormBox := by decide +kernel +lemma repetitionNormBox_mem : repetitionNormBox.Mem repetitionNorm := by + rw [← repetitionNormBox_calc] + unfold repetitionNorm + rw [div_eq_mul_inv] + apply RI.mem_mul + · apply RI.mem_mul + · exact RI.mem_add ri1_mem (RI.mem_mul piBox_mem + (by simpa [Construction.eta] using RI.mem_divNat (RI.mem_point 1) (by norm_num : 0<5))) + · exact repetitionExpData_mem + · exact RI.mem_invPos (RI.mem_sub ri1_mem repetitionExpData_mem) (by decide +kernel) +lemma repetitionNorm_bound : repetitionNorm < (1/4000000000:ℝ) := by + simpa using ri_mem_lt repetitionNormBox_mem 1 4000000000 (by norm_num) (by decide +kernel) +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/RepetitionOperators.lean b/lean/OAI/Analysis/Triangular/Construction/RepetitionOperators.lean new file mode 100644 index 0000000000000000000000000000000000000000..79eeba8750462a29037445bd7c07c11062456d5d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/RepetitionOperators.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Construction.BlockOperators +import OAI.Analysis.Triangular.Construction.RepetitionBound + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel AtomicTriangular.FiniteCertificate +lemma repetitionNorm_nonneg : 0≤repetitionNorm := by + unfold repetitionNorm + exact div_nonneg (mul_nonneg (by linarith [pi_eta_pos]) repetitionRatio_pos.le) + (sub_pos.mpr repetitionRatio_lt).le +abbrev TrigonometricCoefficients := ℓ¹(Fin 22,ℝ) +def AallKernel (p : TailNode × Fin 2) (i : Fin 22) : ℝ := + repetitionKernel p ⟨i.val/2,by omega⟩ ⟨i.val%2,by omega⟩ +def AallOperator : TrigonometricCoefficients →L[ℝ] TailCoefficients := + operator AallKernel (fun _ => (repetitionKernel_bounds _ _).1) repetitionNorm + (fun _ => (repetitionKernel_bounds _ _).2) +lemma AallOperator_norm : ‖AallOperator‖ ≤ repetitionNorm := + operator_norm _ _ _ repetitionNorm_nonneg _ +def Akernel (p : TailNode × Fin 2) (i : Fin 20) : ℝ := + repetitionKernel p ⟨i.val/2+1,by omega⟩ ⟨i.val%2,by omega⟩ +def Aoperator : FiniteCoefficients →L[ℝ] TailCoefficients := + operator Akernel (fun _ => (repetitionKernel_bounds _ _).1) repetitionNorm + (fun _ => (repetitionKernel_bounds _ _).2) +lemma Aoperator_norm : ‖Aoperator‖ ≤ repetitionNorm := + operator_norm _ _ _ repetitionNorm_nonneg _ +def CallKernel (p : TailNode × Fin 2) (i : Fin 22) : ℝ := + jet H h p.1.val.val p.2 (finiteColumn ⟨i.val,by omega⟩) +def CallOperator : TrigonometricCoefficients →L[ℝ] TailCoefficients := + operator CallKernel (fun _ => (tail_atom_column_bounds 1 0 _).1) (7/10^15) + (fun i => (tail_finite_column_bound i).le) +lemma CallOperator_norm : ‖CallOperator‖ ≤ 7/10^15 := + operator_norm _ _ _ (by norm_num) _ +def beta : ℝ := 3/10^10 +def delta : ℝ := 3/10^8 +lemma AC_bound : ‖Aoperator‖+‖Coperator‖ ≤ beta := by + have hA := Aoperator_norm + have hC := Coperator_norm + have hr := repetitionNorm_bound + norm_num [beta] at * + linarith +lemma AC_all_bound : ‖AallOperator‖+‖CallOperator‖ ≤ beta := by + have hA := AallOperator_norm + have hC := CallOperator_norm + have hr := repetitionNorm_bound + norm_num [beta] at * + linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/Schur.lean b/lean/OAI/Analysis/Triangular/Construction/Schur.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a4d5e44788220ad228d9b759038be571814e68b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/Schur.lean @@ -0,0 +1,60 @@ +import OAI.Analysis.Triangular.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Schur +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] + +def neumann (T : F →L[ℝ] F) : F →L[ℝ] F := ∑' n : ℕ, T^n +lemma neumann_equation (T : F →L[ℝ] F) (hT : ‖T‖<1) (y : F) : + neumann T y - T (neumann T y) = y := by + have hh := congrArg (fun A : F →L[ℝ] F => A y) (mul_neg_geom_series T hT) + simpa only [neumann,sub_apply,mul_apply_eq_comp, + one_apply_eq_self] using hh +omit [CompleteSpace F] in +lemma neumann_norm (T : F →L[ℝ] F) {q : ℝ} (hq0 : 0≤q) (hq : q<1) + (hT : ‖T‖≤q) : ‖neumann T‖ ≤ 1/(1-q) := by + have hs := summable_geometric_of_lt_one hq0 hq + have hb (n : ℕ) : ‖T^n‖ ≤ q^n := by + cases n with + | zero => + rw [pow_zero,pow_zero] + exact ContinuousLinearMap.norm_id_le + | succ n => + exact (norm_pow_le' T (Nat.succ_pos n)).trans + (pow_le_pow_left₀ (norm_nonneg _) hT (n+1)) + have ht : Summable (fun n : ℕ => ‖T^n‖) := + hs.of_nonneg_of_le (fun _ => norm_nonneg _) hb + calc + ‖neumann T‖ ≤ ∑' n : ℕ, ‖T^n‖ := norm_tsum_le_tsum_norm ht + _ ≤ ∑' n : ℕ, q^n := ht.tsum_le_tsum hb hs + _ = 1/(1-q) := by rw [tsum_geometric_of_lt_one hq0 hq,one_div] + +def tailOperator (L : E →L[ℝ] E) (B : F →L[ℝ] E) (K : E →L[ℝ] F) + (D : F →L[ℝ] F) : F →L[ℝ] F := D+K.comp (L.comp B) +def tailSolution (L : E →L[ℝ] E) (B : F →L[ℝ] E) (K : E →L[ℝ] F) + (D : F →L[ℝ] F) (r : E) (s : F) : F := + neumann (tailOperator L B K D) (s+K (L r)) +def finiteSolution (L : E →L[ℝ] E) (B : F →L[ℝ] E) (K : E →L[ℝ] F) + (D : F →L[ℝ] F) (r : E) (s : F) : E := + L (r+B (tailSolution L B K D r s)) +omit [CompleteSpace E] in +lemma solution_equations (L : E →L[ℝ] E) (B : F →L[ℝ] E) (K : E →L[ℝ] F) + (D : F →L[ℝ] F) (r : E) (s : F) (h : ‖tailOperator L B K D‖<1) : + tailSolution L B K D r s = D (tailSolution L B K D r s)+ + K (finiteSolution L B K D r s)+s := by + have hh := neumann_equation (tailOperator L B K D) h (s+K (L r)) + change tailSolution L B K D r s - _ = _ at hh + simp only [tailOperator,add_apply,ContinuousLinearMap.comp_apply] at hh + simp only [finiteSolution,map_add] + rw [sub_eq_iff_eq_add] at hh + calc + _ = s+K (L r)+(D (tailSolution L B K D r s)+K (L (B (tailSolution L B K D r s)))) := hh + _ = _ := by abel +end AtomicTriangular.Schur +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/SpectralJetBridge.lean b/lean/OAI/Analysis/Triangular/Construction/SpectralJetBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fb689b6d1a88d43e74c50d1e2476e0f56df39f0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/SpectralJetBridge.lean @@ -0,0 +1,79 @@ +import OAI.Analysis.Triangular.Construction.NormalizedJets + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Set MeasureTheory +namespace AtomicTriangular.Construction +lemma spectralCVector_map {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + (L : E →L[ℂ] F) (n : ℤ) (f : ℝ → E) (hf : Continuous f) : + L (spectralCVector n f)=spectralCVector n (fun t => L (f t)) := by + unfold spectralCVector + simp only [map_sum,map_smul] + apply Finset.sum_congr rfl + intro l _ + congr 2 + rw [←L.intervalIntegral_comp_comm ((by fun_prop : Continuous (fun t : ℝ => + (frequency l-t) • (exp (-I*Real.pi*(t:ℂ)*n) • f t))).intervalIntegrable 0 (frequency l))] + apply intervalIntegral.integral_congr + intro t _ + change L (((frequency l-t:ℝ):ℂ) • (exp (-I*Real.pi*(t:ℂ)*n) • f t)) = + ((frequency l-t:ℝ):ℂ) • (exp (-I*Real.pi*(t:ℂ)*n) • L (f t)) + simp only [map_smul] +lemma spectralDVector_map {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + (L : E →L[ℂ] F) (n : ℤ) (f : ℝ → E) (hf : Continuous f) : + L (spectralDVector n f)=spectralDVector n (fun t => L (f t)) := by + unfold spectralDVector + simp only [map_sum,map_smul] + apply Finset.sum_congr rfl + intro l _ + congr 2 + rw [←L.intervalIntegral_comp_comm ((by fun_prop : Continuous (fun t : ℝ => exp (-I*Real.pi*(t:ℂ)*n) • f t)).intervalIntegrable 0 (frequency l))] + apply intervalIntegral.integral_congr + intro t _ + simp only [map_smul] +lemma spectralC_of_restriction (n : Node) (f : C(Spectrum,ℂ)) (g : ℝ → ℂ) + (hg : ∀ t (ht : t∈Spectrum), f ⟨t,ht⟩=g t) : spectralC n f=spectralCVector n.val g := by + unfold spectralC spectralCVector + apply Finset.sum_congr rfl + intro l _ + simp only [smul_eq_mul] + congr 2 + apply intervalIntegral.integral_congr + intro t ht + dsimp only + change ((frequency l:ℂ)-(t:ℂ))*exp (-I*Real.pi*(t:ℂ)*(n.val:ℂ))*extend f t = + (frequency l-t) • (exp (-I*Real.pi*(t:ℂ)*(n.val:ℂ))*g t) + have hm := interval_frequency_subset l ht + rw [extend_on f t hm,hg] + simp only [Complex.real_smul,ofReal_sub] + ring +lemma spectralD_of_restriction (n : Node) (f : C(Spectrum,ℂ)) (g : ℝ → ℂ) + (hg : ∀ t (ht : t∈Spectrum), f ⟨t,ht⟩=g t) : spectralD n f=spectralDVector n.val g := by + unfold spectralD spectralDVector + apply Finset.sum_congr rfl + intro l _ + simp only [smul_eq_mul] + congr 2 + apply intervalIntegral.integral_congr + intro t ht + dsimp only + have hm := interval_frequency_subset l ht + rw [extend_on f t hm,hg] +lemma spectralC_jetFunction (q : Fin 2) (v : ℝ) (m : ℤ) (d : Fin 2) (n : Node) : + spectralC n (jetFunction q v m d)=(tailJetVector (damping q) v m n.val 0 d) := by + rw [spectralC_of_restriction n _ (jetMultiplier (damping q) v m d) (fun _ _ => rfl)] + symm + exact spectralCVector_map (PiLp.proj 1 (fun _ : Fin 2 => ℂ) d) n.val _ (continuous_jetVector (damping_pos q) v m) +lemma spectralD_jetFunction (q : Fin 2) (v : ℝ) (m : ℤ) (d : Fin 2) (n : Node) : + spectralD n (jetFunction q v m d)=(tailJetVector (damping q) v m n.val 1 d) := by + rw [spectralD_of_restriction n _ (jetMultiplier (damping q) v m d) (fun _ _ => rfl)] + symm + exact spectralDVector_map (PiLp.proj 1 (fun _ : Fin 2 => ℂ) d) n.val _ (continuous_jetVector (damping_pos q) v m) +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/SpectralProduct.lean b/lean/OAI/Analysis/Triangular/Construction/SpectralProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..48935c51d60ce76f198f5f34621f5ba3171fc54a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/SpectralProduct.lean @@ -0,0 +1,86 @@ +import OAI.Analysis.Triangular.Construction.SpectralJetBridge + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel AtomicTriangular.FiniteCertificate + +def tailColumnSpectral (p : TailNode × Fin 2) : C(Spectrum,ℂ) →L[ℂ] ℂ := + if p.2.val=0 then spectralCCLM p.1.val else spectralDCLM p.1.val +lemma tailColumnSpectral_norm (p : TailNode × Fin 2) : ‖tailColumnSpectral p‖≤119 := by + unfold tailColumnSpectral + split_ifs + · exact (spectralCCLM_norm _).trans cVariation_lt.le + · exact (spectralDCLM_norm _).trans dVariation_lt.le +lemma summable_l1_complex_smul {ι E : Type*} [NormedAddCommGroup E] [CompleteSpace E] + [NormedSpace ℂ E] (w : ℓ¹(ι,ℝ)) (T : ι → E) (M : ℝ) (hM : ∀ i, ‖T i‖≤M) : + Summable (fun i => (w i:ℂ) • T i) := by + apply Summable.of_norm_bounded ((l1_summable w).mul_right M) + intro i + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (hM i) (abs_nonneg _) +lemma summable_tail_columns (w : TailCoefficients) : + Summable (fun p => (w p:ℂ) • tailColumnSpectral p) := by + exact summable_l1_complex_smul w tailColumnSpectral 119 tailColumnSpectral_norm +lemma tsum_prod_fin_two {ι E : Type*} [NormedAddCommGroup E] [CompleteSpace E] + (g : ι × Fin 2 → E) (hg : Summable g) : + (∑' p, g p)=∑' i, (g (i,0)+g (i,1)) := by + rw [hg.tsum_prod] + simp only [tsum_fintype,Fin.sum_univ_two] +lemma tailSpectral_product (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) : + tailSpectral (coefficientInput C a w)= (C:ℂ) • spectralPCLM+ + ∑' p : TailNode × Fin 2,(w p:ℂ) • tailColumnSpectral p := by + have he := tsum_prod_fin_two (fun p => (w p:ℂ) • tailColumnSpectral p) (summable_tail_columns w) + rw [he,tailSpectral_coefficient] + rfl +lemma summable_tail_columns_apply (w : TailCoefficients) (f : C(Spectrum,ℂ)) : + Summable (fun p => (w p:ℂ)*tailColumnSpectral p f) := by + simpa only [ContinuousLinearMap.apply_apply,smul_apply,smul_eq_mul] using + ((ContinuousLinearMap.apply ℂ ℂ f).summable (summable_tail_columns w)) +lemma tailSpectral_product_apply (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (f : C(Spectrum,ℂ)) : + tailSpectral (coefficientInput C a w) f=(C:ℂ)*spectralP f+ + ∑' p : TailNode × Fin 2,(w p:ℂ)*tailColumnSpectral p f := by + rw [tailSpectral_product,add_apply,smul_apply,smul_eq_mul,spectralPCLM_apply] + congr 1 + exact (ContinuousLinearMap.apply ℂ ℂ f).map_tsum (summable_tail_columns w) +lemma tailColumnSpectral_jet (q : Fin 2) (v : ℝ) (m : ℤ) (d : Fin 2) (p : TailNode × Fin 2) : + (tailColumnSpectral p (jetFunction q v m d)).re=tailJet (damping q) v m p.1.val.val p.2 d := by + unfold tailColumnSpectral tailJet tailJetVector + split_ifs with hc + · rw [spectralCCLM_apply,spectralC_jetFunction] + rfl + · rw [spectralDCLM_apply,spectralD_jetFunction] + rfl +lemma tailSpectral_jet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (q : Fin 2) (v : ℝ) (m : ℤ) (d : Fin 2) : + (tailSpectral (coefficientInput C a w) (jetFunction q v m d)).re= + C*jet (damping q) v m d (finiteColumn 22)+ + ∑' p : TailNode × Fin 2,w p*tailJet (damping q) v m p.1.val.val p.2 d := by + rw [tailSpectral_product_apply,add_re,re_tsum (summable_tail_columns_apply _ _)] + simp only [mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero,spectralP_jet,tailColumnSpectral_jet] +lemma negativeJet_add (v : ℝ) (n : ℤ) (d : Fin 2) (a b c e : ℂ) : + negativeJet v n d (a+c) (b+e)=negativeJet v n d a b+negativeJet v n d c e := by + unfold negativeJet + split_ifs <;> ring +lemma inputJJet_negative (a : InputCoefficients) (v : ℝ) (n : ℤ) (d : Fin 2) : + negativeJet v n d (inputJJet a 1 0 n) (inputJJet a 1 1 n)= + tailSpectral a (jetFunction 0 v n d)+finiteSpectral a (jetFunction 1 v n d) := by + unfold inputJJet + rw [negativeJet_add,negativeJet_linear,negativeJet_linear] +lemma inputJJet_negative_coefficient (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (v : ℝ) (n : ℤ) (d : Fin 2) : + (negativeJet v n d (inputJJet (coefficientInput C a w) 1 0 n) + (inputJJet (coefficientInput C a w) 1 1 n)).re= + C*jet h v n d (finiteColumn 22)+ + (∑' p : TailNode × Fin 2,w p*tailJet h v n p.1.val.val p.2 d)+ + ∑ c : Fin 22,a c*jet H v n d (finiteColumn ⟨c.val,by omega⟩) := by + rw [inputJJet_negative,add_re,tailSpectral_jet,finiteSpectral_jet] + rfl +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/TailCoordinates.lean b/lean/OAI/Analysis/Triangular/Construction/TailCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..8515c70a9a87e896566977ed34a3d25d3bdefce3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/TailCoordinates.lean @@ -0,0 +1,80 @@ +import OAI.Analysis.Triangular.Construction.SpectralProduct +import OAI.Analysis.Triangular.Construction.FiniteCoordinates + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +attribute [local instance] Classical.propDecidable +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel +lemma tailColumnSpectral_directJet (p q : TailNode × Fin 2) : + (tailColumnSpectral q (directJetFunction 0 h p.1.val.val p.2)).re=if q=p then -1 else 0 := by + unfold tailColumnSpectral + by_cases hc : q.2.val=0 + · simp only [hc,↓reduceIte,spectralC_directJet] + congr 1 + apply propext + constructor + · rintro ⟨hn,hd⟩ + apply Prod.ext + · exact Subtype.ext (Subtype.ext hn.symm) + · exact Fin.ext (hc.trans hd.symm) + · intro he; subst q; exact ⟨rfl,hc⟩ + · simp only [hc,↓reduceIte,spectralD_directJet] + have hc1 : q.2.val=1 := by omega + congr 1 + apply propext + constructor + · rintro ⟨hn,hd⟩ + apply Prod.ext + · exact Subtype.ext (Subtype.ext hn.symm) + · exact Fin.ext (hc1.trans hd.symm) + · intro he; subst q; exact ⟨rfl,hc1⟩ +lemma tailSpectral_tail_directJet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (p : TailNode × Fin 2) : + (tailSpectral (coefficientInput C a w) (directJetFunction 0 h p.1.val.val p.2)).re= -w p := by + rw [tailSpectral_product_apply,add_re,re_tsum (summable_tail_columns_apply _ _)] + simp only [mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero,←spectralPCLM_apply, + spectralP_directJet,tailColumnSpectral_directJet,mul_zero,zero_add,mul_ite,mul_neg,mul_one, + tsum_ite_eq] +lemma spectralC_other_directJet (q : Fin 2) (v : ℝ) (n m : Node) (hne : n.val≠m.val) (d : Fin 2) : + (spectralCCLM m (directJetFunction q v n.val d)).re=0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(spectralC_direct m _).1,(spectralC_direct m _).2, + cBasis_other_node hne,deriv_cBasis_other_node hne] + split_ifs <;> simp +lemma spectralD_other_directJet (q : Fin 2) (v : ℝ) (n m : Node) (hne : n.val≠m.val) (d : Fin 2) : + (spectralDCLM m (directJetFunction q v n.val d)).re=0 := by + rw [←negativeJet_direct_linear,negativeJet_direct_re,(spectralD_direct m _).1,(spectralD_direct m _).2, + dBasis_other_node hne,deriv_dBasis_other_node hne] + split_ifs <;> simp +lemma tailColumnSpectral_other_directJet (n : Node) (hn : n.val∈FiniteNodes) + (q : TailNode × Fin 2) (v : ℝ) (d : Fin 2) : + (tailColumnSpectral q (directJetFunction 0 v n.val d)).re=0 := by + have hne : n.val≠q.1.val.val := fun he => q.1.property (he ▸ hn) + unfold tailColumnSpectral + split_ifs + · exact spectralC_other_directJet _ _ _ _ hne _ + · exact spectralD_other_directJet _ _ _ _ hne _ +lemma tailSpectral_finite_directJet (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (n : Node) (hn : n.val∈FiniteNodes) (v : ℝ) (d : Fin 2) : + (tailSpectral (coefficientInput C a w) (directJetFunction 0 v n.val d)).re=0 := by + rw [tailSpectral_product_apply,add_re,re_tsum (summable_tail_columns_apply _ _)] + simp only [mul_re,ofReal_re,ofReal_im,zero_mul,sub_zero,←spectralPCLM_apply, + spectralP_directJet,tailColumnSpectral_other_directJet n hn,mul_zero,zero_add,tsum_zero] +lemma inputJJet_direct_negative (a : InputCoefficients) (v : ℝ) (n : ℤ) (d : Fin 2) : + negativeJet v n d (inputJJet a 0 0 n) (inputJJet a 0 1 n)= + tailSpectral a (directJetFunction 0 v n d)+finiteSpectral a (directJetFunction 1 v n d) := by + unfold inputJJet + rw [negativeJet_add,negativeJet_direct_linear,negativeJet_direct_linear] +lemma inputJJet_tail_direct_negative (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (p : TailNode × Fin 2) : + (negativeJet h p.1.val.val p.2 (inputJJet (coefficientInput C a w) 0 0 p.1.val.val) + (inputJJet (coefficientInput C a w) 0 1 p.1.val.val)).re= -w p-AallOperator a p := by + rw [inputJJet_direct_negative,add_re,tailSpectral_tail_directJet,finiteSpectral_tail_directJet] + ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/TailEnumeration.lean b/lean/OAI/Analysis/Triangular/Construction/TailEnumeration.lean new file mode 100644 index 0000000000000000000000000000000000000000..a37963eab7ce1c6ea831a714530b97195c511d77 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/TailEnumeration.lean @@ -0,0 +1,86 @@ +import OAI.Analysis.Triangular.Construction.PeriodicJets +import OAI.Analysis.Triangular.Envelope.EnvelopeBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma residue_injective : Function.Injective residue := by decide +kernel +lemma residue_mod (a : Fin 15) : residue a % 36 = residue a := by revert a; decide +kernel +lemma residue_mem (a : Fin 15) : residue a ∈ residues := by revert a; decide +kernel +lemma finiteNode_lt25 {n : ℤ} (hn : n ∈ FiniteNodes) : n<25 := by + simp only [FiniteNodes,Finset.mem_insert,Finset.mem_singleton] at hn + rcases hn with h|h|h|h|h|h|h|h|h|h <;> omega +lemma tailBase_node (a : Fin 15) (l : ℕ) : + 0 < tailBase a+36*l ∧ (tailBase a+36*l)%36 ∈ residues := by + constructor + · have hh := tailBase_pos a + omega + · simpa [Int.add_emod,Int.mul_emod,tailBase_mod,residue_mod] using residue_mem a + +def enumerateTail (p : Fin 15 × ℕ) : TailNode := + ⟨⟨tailBase p.1+36*p.2,tailBase_node p.1 p.2⟩,by + intro hh + have hlt := finiteNode_lt25 hh + change tailBase p.1+36*(p.2:ℤ)<25 at hlt + have hge := tailBase_pos p.1 + omega⟩ +lemma tailBase_le (n : TailNode) (a : Fin 15) (ha : n.val.val%36=residue a) : + tailBase a ≤ n.val.val := by + have hn := n.val.property.1 + have hf := n.property + have hdiv := Int.emod_add_mul_ediv n.val.val 36 + have hq : 0≤n.val.val/36 := Int.ediv_nonneg hn.le (by norm_num) + rw [ha] at hdiv + fin_cases a <;> norm_num [tailBase,residue] at * + all_goals by_contra hlt + all_goals have hn' : n.val.val = (n.val.val%36) := by omega + all_goals simp only [FiniteNodes,Finset.mem_insert,Finset.mem_singleton] at hf + all_goals omega +lemma enumerateTail_injective : Function.Injective enumerateTail := by + intro p q hpq + have hh := congrArg (fun n : TailNode => n.val.val) hpq + change tailBase p.1+36*p.2=tailBase q.1+36*q.2 at hh + have hm := congrArg (fun n : ℤ => n%36) hh + simp only [Int.add_emod,Int.mul_emod,Int.emod_self,zero_mul,Int.zero_emod, + add_zero,tailBase_mod,residue_mod] at hm + have ha := residue_injective hm + apply Prod.ext ha + rw [ha] at hh + omega +lemma enumerateTail_surjective : Function.Surjective enumerateTail := by + intro n + obtain ⟨a,ha⟩ := node_residue n.val + have hle := tailBase_le n a ha + have hm : (n.val.val-tailBase a)%36=0 := by + rw [Int.sub_emod,ha,tailBase_mod] + simp + have hd := Int.emod_add_mul_ediv (n.val.val-tailBase a) 36 + rw [hm,zero_add] at hd + have hq : 0 ≤ (n.val.val-tailBase a)/36 := Int.ediv_nonneg (sub_nonneg.mpr hle) (by norm_num) + refine ⟨(a,((n.val.val-tailBase a)/36).toNat),?_⟩ + apply Subtype.ext + apply Subtype.ext + change tailBase a+36*(((n.val.val-tailBase a)/36).toNat:ℤ)=n.val.val + rw [Int.toNat_of_nonneg hq] + omega + +def tailEnumeration : (Fin 15 × ℕ) ≃ TailNode := + Equiv.ofBijective enumerateTail ⟨enumerateTail_injective,enumerateTail_surjective⟩ +lemma Q_enumerateTail (a : Fin 15) (l : ℕ) : + Q (enumerateTail (a,l)).val.val=Q (tailBase a) := by + rw [Q_emod,Q_emod (tailBase a)] + congr 1 + change (tailBase a+36*(l:ℤ))%36=tailBase a%36 + simp +lemma D_enumerateTail (a : Fin 15) (l : ℕ) : + D (enumerateTail (a,l)).val.val=D (tailBase a) := by + rw [D_emod,D_emod (tailBase a)] + congr 1 + change (tailBase a+36*(l:ℤ))%36=tailBase a%36 + simp +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/TailInterpolation.lean b/lean/OAI/Analysis/Triangular/Construction/TailInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc49f16cd74ee41cdcc8784556977c0ed6d6dfcb --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/TailInterpolation.lean @@ -0,0 +1,52 @@ +import OAI.Analysis.Triangular.Construction.ActualTail +import OAI.Analysis.Triangular.Construction.TailCoordinates + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex +namespace AtomicTriangular.Construction +open AtomicTriangular.L1Kernel +lemma inputJJet_tail_transformed (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (p : TailNode × Fin 2) : + (negativeJet h p.1.val.val p.2 (inputJJet (coefficientInput C a w) 1 0 p.1.val.val) + (inputJJet (coefficientInput C a w) 1 1 p.1.val.val)).re= + Doperator w p+CallOperator a p+C*tailFixedColumn 22 p := by + rw [inputJJet_negative_coefficient] + have hd : Doperator w p=∑' q : TailNode × Fin 2,w q*tailJet h h p.1.val.val q.1.val.val q.2 p.2 := by + unfold Doperator + erw [operator_apply] + rfl + have hc : CallOperator a p=∑ c : Fin 22,a c*jet H h p.1.val.val p.2 (finiteColumn ⟨c.val,by omega⟩) := by + unfold CallOperator + erw [operator_apply,tsum_fintype] + rfl + rw [hd,hc,tailFixedColumn_apply] + simp only [show (22:Fin 23).val=22 from rfl,↓reduceIte] + ring +lemma pairJJet_negative (a₁ a₂ : InputCoefficients) (v : ℝ) (n : ℤ) (d : Fin 2) : + negativeJet v n d (pairJJet a₁ a₂ 0 n) (pairJJet a₁ a₂ 1 n)= + negativeJet v n d (inputJJet a₁ 0 0 n) (inputJJet a₁ 0 1 n)+ + negativeJet v n d (inputJJet a₂ 1 0 n) (inputJJet a₂ 1 1 n) := by + exact negativeJet_add _ _ _ _ _ _ _ +lemma actual_tail_negative {z : ℝ} (hz : 0 w p) (actualTail_full_equations hz hzB).1 + have h1 := congrArg (fun w : TailCoefficients => w p) (actualTail_full_equations hz hzB).2 + simp only [lp.coeFn_add,lp.coeFn_sub,lp.coeFn_smul,Pi.add_apply,Pi.sub_apply, + Pi.smul_apply,smul_eq_mul] at h0 h1 + change _=_+_ -_ +gaussianTarget h z p.1.val.val p.2+(3/500)*tailFixedColumn 22 p at h0 + simp only [pairJJet_negative,add_re,actualInput,Fin.val_zero,Fin.val_one,Nat.one_ne_zero,↓reduceIte, + inputJJet_tail_direct_negative,inputJJet_tail_transformed] + constructor <;> linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Construction/TailJetVector.lean b/lean/OAI/Analysis/Triangular/Construction/TailJetVector.lean new file mode 100644 index 0000000000000000000000000000000000000000..3078e4a07542b02e5c29853406e3e6e52108908a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Construction/TailJetVector.lean @@ -0,0 +1,68 @@ +import OAI.Analysis.Triangular.Schwartz.SpectralEnvelope +import OAI.Analysis.Triangular.Envelope.JetEnvelopeAnalytic + +namespace OAI + +noncomputable section +open scoped BigOperators +open Complex Set MeasureTheory +namespace AtomicTriangular.Construction +abbrev JetVector := PiLp 1 (fun _ : Fin 2 => ℂ) +def jetVector (k v : ℝ) (n : ℤ) (t : ℝ) : JetVector := + WithLp.toLp 1 (fun d => jetMultiplier k v n d t) +lemma continuous_jetMultiplier {k : ℝ} (hk : 0 (waveDen_pos hk t).ne') + have hz : Continuous (zeta k v) := by unfold zeta; fun_prop + unfold jetMultiplier transformedWave + split_ifs <;> fun_prop +lemma continuous_jetVector {k : ℝ} (hk : 0 ℂ)).symm.continuous.comp + (continuous_pi (fun d => continuous_jetMultiplier hk v n d)) +lemma jetVector_norm_bound (k v t : ℝ) (n : ℤ) (hQ : 0 Complex.abs_re_le_norm _) +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Basic.lean b/lean/OAI/Analysis/Triangular/Energy/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..74d533d7830745af6e389a93d4b4f30360764b23 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Basic.lean @@ -0,0 +1,53 @@ +import Mathlib + +namespace OAI + +open scoped BigOperators Topology ENNReal NNReal +open Classical +open Filter + +noncomputable section +namespace TriangularUniversal + +abbrev Plane := EuclideanSpace ℝ (Fin 2) + +def LocallyFinite (C : Set Plane) : Prop := + ∀ R : ℝ, (C ∩ Metric.closedBall (0 : Plane) R).Finite + +def diskPoints (C : Set Plane) (R : ℝ) : Finset Plane := + if h : (C ∩ Metric.closedBall (0 : Plane) R).Finite then h.toFinset else ∅ + +def diskCount (C : Set Plane) (R : ℝ) : ℕ := (diskPoints C R).card + +def DensityOne (C : Set Plane) : Prop := + Tendsto (fun R : ℝ => (diskCount C R : ℝ) / (Real.pi * R ^ 2)) + atTop (𝓝 1) + +def AdmissiblePotential (g : ℝ → ℝ) : Prop := + ContDiffOn ℝ (⊤ : ℕ∞) g (Set.Ioi 0) ∧ + (∀ t : ℝ, 0 < t → 0 ≤ g t) ∧ + ∀ (r : ℕ) (t : ℝ), 0 < t → 0 ≤ (-1 : ℝ) ^ r * iteratedDeriv r g t + +def diskEnergy (g : ℝ → ℝ) (C : Set Plane) (R : ℝ) : ℝ≥0∞ := + (diskCount C R : ℝ≥0∞)⁻¹ * + ∑ x ∈ diskPoints C R, ∑ y ∈ (diskPoints C R).erase x, + ENNReal.ofReal (g (‖x - y‖ ^ 2)) + +def energy (g : ℝ → ℝ) (C : Set Plane) : ℝ≥0∞ := + Filter.liminf (diskEnergy g C) atTop + +def triangularPoint (jk : ℤ × ℤ) : Plane := + Real.sqrt (2 / Real.sqrt 3) • + (EuclideanSpace.single 0 ((jk.1 : ℝ) + (jk.2 : ℝ) / 2) + + EuclideanSpace.single 1 ((jk.2 : ℝ) * Real.sqrt 3 / 2)) + +def triangularLattice : Set Plane := Set.range triangularPoint + +def latticeEnergy (g : ℝ → ℝ) : ℝ≥0∞ := + ∑' a : {x : Plane // x ∈ triangularLattice ∧ x ≠ 0}, + ENNReal.ofReal (g (‖a.val‖ ^ 2)) + +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Cutoff.lean b/lean/OAI/Analysis/Triangular/Energy/Cutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee668c86131da623e25fce16d4caa9c95d42ea77 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Cutoff.lean @@ -0,0 +1,178 @@ +import OAI.Analysis.Triangular.Energy.Spectral + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal RealInnerProductSpace FourierTransform +open Classical Filter MeasureTheory Complex ComplexConjugate FourierTransform +namespace TriangularUniversal +/-- A comparison density, equal to one on the competitor disk. It adds no +spacing or local-count hypothesis to the density-only LP argument. -/ +def radialCutoff (R T : ℝ) (x : Plane) : ℝ := + max 0 (min 1 ((R + T - ‖x‖) / T)) + +lemma radialCutoff_nonneg (R T : ℝ) (x : Plane) : 0 ≤ radialCutoff R T x := le_max_left _ _ +lemma radialCutoff_le_one (R T : ℝ) (x : Plane) : radialCutoff R T x ≤ 1 := + max_le zero_le_one (min_le_left _ _) +lemma radialCutoff_continuous (R T : ℝ) : Continuous (radialCutoff R T) := by + unfold radialCutoff + fun_prop +lemma radialCutoff_eq_one {R T : ℝ} (hT : 0 < T) {x : Plane} (hx : ‖x‖ ≤ R) : + radialCutoff R T x = 1 := by + have h : 1 ≤ (R+T-‖x‖)/T := (le_div_iff₀ hT).mpr (by linarith) + simp [radialCutoff, min_eq_left h] +lemma radialCutoff_eq_zero {R T : ℝ} (hT : 0 < T) {x : Plane} (hx : R+T ≤ ‖x‖) : + radialCutoff R T x = 0 := by + have h : (R+T-‖x‖)/T ≤ 0 := div_nonpos_of_nonpos_of_nonneg (by linarith) hT.le + exact max_eq_left ((min_le_right _ _).trans h) + +lemma radialCutoff_compactSupport {R T : ℝ} (hT : 0 < T) : + HasCompactSupport (radialCutoff R T) := by + apply HasCompactSupport.of_support_subset_isCompact (isCompact_closedBall (0 : Plane) (R+T)) + intro x hx + simp only [Metric.mem_closedBall, dist_zero_right] + by_contra h + exact hx (radialCutoff_eq_zero hT (le_of_not_ge h)) + +lemma radialCutoff_integrable {R T : ℝ} (hT : 0 < T) : Integrable (radialCutoff R T) := + (radialCutoff_continuous R T).integrable_of_hasCompactSupport (radialCutoff_compactSupport hT) + +lemma clip_lipschitz : LipschitzWith 1 (fun x : ℝ => max 0 (min 1 x)) := by + simpa using (LipschitzWith.const (0 : ℝ)).max + ((LipschitzWith.const (1 : ℝ)).min LipschitzWith.id) + +lemma radialCutoff_lipschitz {R T : ℝ} (hT : 0 < T) : + LipschitzWith (T⁻¹).toNNReal (radialCutoff R T) := by + have h : LipschitzWith (T⁻¹).toNNReal (fun x : Plane => (R+T-‖x‖)/T) := by + apply LipschitzWith.of_dist_le' + intro x y + rw [Real.dist_eq, dist_eq_norm] + calc + |(R+T-‖x‖)/T - (R+T-‖y‖)/T| = |‖y‖-‖x‖|/T := by + rw [← sub_div, abs_div, abs_of_pos hT] + congr 2 + ring + _ ≤ ‖x-y‖/T := by + apply div_le_div_of_nonneg_right _ hT.le + simpa [norm_sub_rev] using abs_norm_sub_norm_le y x + _ = T⁻¹ * ‖x-y‖ := by ring + change LipschitzWith (T⁻¹).toNNReal (fun x : Plane => max 0 (min 1 ((R+T-‖x‖)/T))) + simpa only [one_mul, Function.comp_def] using clip_lipschitz.comp h + +lemma radialCutoff_sub_bound {R T : ℝ} (hT : 0 < T) (x z : Plane) : + |radialCutoff R T (x-z) - radialCutoff R T x| ≤ ‖z‖/T := by + have H := (radialCutoff_lipschitz (R := R) hT).norm_sub_le (x-z) x + simpa [Real.norm_eq_abs, Real.coe_toNNReal _ (inv_nonneg.mpr hT.le), + sub_sub_cancel_left, div_eq_mul_inv, mul_comm] using H + +lemma plane_disk_volume {R : ℝ} (hR : 0 ≤ R) : + volume.real (Metric.closedBall (0 : Plane) R) = Real.pi * R^2 := by + rw [measureReal_def, EuclideanSpace.volume_closedBall_fin_two] + simp [Real.pi_pos.le, hR, mul_comm] + +lemma radialCutoff_integral_bound {R T : ℝ} (hR : 0 ≤ R) (hT : 0 < T) : + (∫ x, radialCutoff R T x) ≤ Real.pi*(R+T)^2 := by + have hs := measurableSet_closedBall (x := (0 : Plane)) (ε := R+T) + calc + _ ≤ ∫ x, (Metric.closedBall (0 : Plane) (R+T)).indicator (fun _ => (1 : ℝ)) x := by + apply integral_mono (radialCutoff_integrable hT) + ((integrable_indicator_iff hs).mpr (integrableOn_const (by rw [EuclideanSpace.volume_closedBall_fin_two]; finiteness))) + intro x + by_cases hx : x ∈ Metric.closedBall (0 : Plane) (R+T) + · simpa [hx] using radialCutoff_le_one R T x + · simp only [Set.indicator_of_notMem hx] + have hx' : R+T ≤ ‖x‖ := le_of_lt (by + simpa only [Metric.mem_closedBall, dist_zero_right, not_le] using hx) + rw [radialCutoff_eq_zero hT hx'] + _ = _ := by rw [integral_indicator_const 1 hs, smul_eq_mul, mul_one, plane_disk_volume (by linarith)] + +def cutoffConvolution (f : Plane → ℂ) (R T : ℝ) (x : Plane) : ℂ := + ∫ z, radialCutoff R T (x-z) • f z + +def firstMoment (f : Plane → ℂ) : ℝ := ∫ z, ‖z‖ * ‖f z‖ + +lemma cutoffConvolution_integrable {f : Plane → ℂ} (hf : Integrable f) + (R T : ℝ) (x : Plane) : + Integrable (fun z => radialCutoff R T (x-z) • f z) := by + exact hf.bdd_smul 1 ((radialCutoff_continuous R T).comp + (continuous_const.sub continuous_id)).aestronglyMeasurable + (Eventually.of_forall fun z => by + simpa [Real.norm_eq_abs, abs_of_nonneg (radialCutoff_nonneg R T (x-z))] + using radialCutoff_le_one R T (x-z)) + +lemma cutoffConvolution_error {f : Plane → ℂ} (hf : Integrable f) + (hm : Integrable (fun z => ‖z‖ * ‖f z‖)) + {R T : ℝ} (hT : 0 < T) (x : Plane) : + ‖cutoffConvolution f R T x - radialCutoff R T x • (∫ z, f z)‖ ≤ firstMoment f / T := by + have hi2 : Integrable (fun z => radialCutoff R T x • f z) := by + simpa only [Pi.smul_def] using hf.smul (radialCutoff R T x) + have hi := (cutoffConvolution_integrable hf R T x).sub hi2 + have he : cutoffConvolution f R T x - radialCutoff R T x • (∫ z, f z) = + ∫ z, (radialCutoff R T (x-z) - radialCutoff R T x) • f z := by + simp_rw [sub_smul] + rw [integral_sub (cutoffConvolution_integrable hf R T x) + hi2, integral_smul] + rfl + rw [he] + calc + _ ≤ ∫ z, ‖(radialCutoff R T (x-z) - radialCutoff R T x) • f z‖ := + norm_integral_le_integral_norm _ + _ ≤ ∫ z, (‖z‖ * ‖f z‖) / T := by + apply integral_mono + · simpa only [sub_smul, Pi.sub_apply] using hi.norm + · exact hm.div_const T + · intro z + dsimp only + rw [norm_smul, Real.norm_eq_abs] + calc + _ ≤ (‖z‖ / T) * ‖f z‖ := mul_le_mul_of_nonneg_right + (radialCutoff_sub_bound hT x z) (norm_nonneg _) + _ = _ := by ring + _ = _ := by rw [integral_div]; rfl + +lemma cutoffConvolution_re_bounds {f : Plane → ℂ} (hf : Integrable f) + (hm : Integrable (fun z => ‖z‖ * ‖f z‖)) + {R T : ℝ} (hT : 0 < T) (x : Plane) : + radialCutoff R T x * (∫ z, f z).re - firstMoment f / T ≤ + (cutoffConvolution f R T x).re ∧ + (cutoffConvolution f R T x).re ≤ + radialCutoff R T x * (∫ z, f z).re + firstMoment f / T := by + have h := (Complex.abs_re_le_norm _).trans (cutoffConvolution_error hf hm (R := R) hT x) + rw [Complex.sub_re, Complex.real_smul, Complex.mul_re] at h + simp only [Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] at h + constructor <;> linarith [abs_le.mp h] + + + +def cutoffMeasure (R T : ℝ) : Measure Plane := + volume.withDensity (fun x => ENNReal.ofReal (radialCutoff R T x)) + +lemma cutoffMeasure_finite {R T : ℝ} (hT : 0 < T) : IsFiniteMeasure (cutoffMeasure R T) := by + apply isFiniteMeasure_withDensity + rw [← ofReal_integral_eq_lintegral_ofReal (radialCutoff_integrable hT) + (Eventually.of_forall (radialCutoff_nonneg R T))] + exact ENNReal.ofReal_ne_top + +lemma integral_cutoffMeasure (R T : ℝ) (f : Plane → ℂ) : + (∫ x, f x ∂cutoffMeasure R T) = ∫ x, radialCutoff R T x • f x := by + rw [cutoffMeasure, integral_withDensity_eq_integral_toReal_smul] + · simp only [ENNReal.toReal_ofReal (radialCutoff_nonneg _ _ _)] + · exact (radialCutoff_continuous R T).measurable.ennreal_ofReal + · exact Eventually.of_forall fun _ => ENNReal.ofReal_lt_top + +lemma cutoffMeasure_mass {R T : ℝ} (hT : 0 < T) : + (cutoffMeasure R T).real Set.univ = ∫ x, radialCutoff R T x := by + rw [measureReal_def, cutoffMeasure, withDensity_apply _ MeasurableSet.univ, + Measure.restrict_univ, ← ofReal_integral_eq_lintegral_ofReal (radialCutoff_integrable hT) + (Eventually.of_forall (radialCutoff_nonneg R T)), ENNReal.toReal_ofReal] + exact integral_nonneg (radialCutoff_nonneg R T) + +lemma cutoffConvolution_eq_integral (f : Plane → ℂ) (R T : ℝ) (x : Plane) : + cutoffConvolution f R T x = ∫ y, f (x-y) ∂cutoffMeasure R T := by + rw [integral_cutoffMeasure] + have h := integral_sub_left_eq_self (fun y => radialCutoff R T y • f (x-y)) volume x + simpa only [sub_sub_cancel, cutoffConvolution] using h +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Definitions.lean b/lean/OAI/Analysis/Triangular/Energy/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6b4375dca6e32afc774510101b863e3b1c7559e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Definitions.lean @@ -0,0 +1,26 @@ +import OAI.Analysis.Triangular.Basic +import OAI.Analysis.Triangular.Energy.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal +open Filter +namespace AtomicTriangular + +abbrev LocallyFinite := TriangularUniversal.LocallyFinite +abbrev diskPoints := TriangularUniversal.diskPoints +abbrev diskCount := TriangularUniversal.diskCount +abbrev DensityOne := TriangularUniversal.DensityOne +abbrev AdmissiblePotential := TriangularUniversal.AdmissiblePotential +abbrev diskEnergy := TriangularUniversal.diskEnergy +abbrev energy := TriangularUniversal.energy + +/-- The full nonzero-lattice energy, allowing a divergent series. -/ +def latticeEnergy (g : ℝ → ℝ) : ℝ≥0∞ := + ∑' a : {x : Plane // x ∈ A ∧ x ≠ 0}, ENNReal.ofReal (g (‖a.val‖ ^ 2)) + +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Density.lean b/lean/OAI/Analysis/Triangular/Energy/Density.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a710439afcdb410aa0202872a94fe14e90fb1b8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Density.lean @@ -0,0 +1,276 @@ +import OAI.Analysis.Triangular.Energy.Cutoff + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal RealInnerProductSpace FourierTransform +open Classical Filter MeasureTheory Complex ComplexConjugate FourierTransform +namespace TriangularUniversal +/-- Regularity actually used by the density LP proof. Gaussian-bounded Fourier +pairs are put into this class below; no separation of a competitor is assumed. -/ +structure LPFunction where + toFun : Plane → ℂ + continuous : Continuous toFun + integrable : Integrable toFun + fourierIntegrable : Integrable (𝓕 toFun) + momentIntegrable : Integrable (fun z => ‖z‖ * ‖toFun z‖) + bound : ℝ + norm_bound : ∀ x, ‖toFun x‖ ≤ bound + +instance : CoeFun LPFunction (fun _ => Plane → ℂ) := ⟨LPFunction.toFun⟩ + +lemma regular_kernel_integrable (f : LPFunction) + (μ ν : Measure Plane) [IsFiniteMeasure μ] [IsFiniteMeasure ν] : + Integrable (fun xy : Plane × Plane => f (xy.1-xy.2)) (μ.prod ν) := by + exact (integrable_const f.bound).mono' + (f.continuous.comp (continuous_fst.sub continuous_snd)).aestronglyMeasurable + (Eventually.of_forall fun xy => f.norm_bound (xy.1-xy.2)) + +lemma regular_firstMoment_integrable (f : LPFunction) : + Integrable (fun z => ‖z‖ * ‖f z‖) := f.momentIntegrable + +lemma firstMoment_nonneg (f : Plane → ℂ) : 0 ≤ firstMoment f := + integral_nonneg fun z => mul_nonneg (norm_nonneg z) (norm_nonneg (f z)) + +lemma kernelForm_cutoff (f : LPFunction) {R T : ℝ} (hT : 0 < T) + (μ : Measure Plane) [IsFiniteMeasure μ] : + kernelForm f μ (cutoffMeasure R T) = ∫ x, cutoffConvolution f R T x ∂μ := by + let := cutoffMeasure_finite (R := R) hT + rw [kernelForm, integral_prod _ (regular_kernel_integrable f μ (cutoffMeasure R T))] + simp_rw [cutoffConvolution_eq_integral] + +lemma kernelForm_cutoff_self_upper (f : LPFunction) + (ha : 0 ≤ (∫ z, f z).re) {R T : ℝ} (hR : 0 ≤ R) (hT : 0 < T) : + (kernelForm f (cutoffMeasure R T) (cutoffMeasure R T)).re ≤ + ((∫ z, f z).re + firstMoment f / T) * Real.pi * (R+T)^2 := by + let := cutoffMeasure_finite (R := R) hT + have hi : Integrable (fun x => cutoffConvolution f R T x) (cutoffMeasure R T) := by + simpa only [cutoffConvolution_eq_integral] using + (regular_kernel_integrable f (cutoffMeasure R T) (cutoffMeasure R T)).integral_prod_left + rw [kernelForm_cutoff f hT, integral_reC hi] + calc + _ ≤ ∫ _ : Plane, ((∫ z, f z).re + firstMoment f / T) ∂cutoffMeasure R T := by + apply integral_mono hi.re (integrable_const _) + intro x + change (cutoffConvolution f R T x).re ≤ + (∫ z, f z).re + firstMoment f / T + have hb := (cutoffConvolution_re_bounds f.integrable + (regular_firstMoment_integrable f) (R := R) hT x).2 + have hm := mul_le_mul_of_nonneg_right (radialCutoff_le_one R T x) ha + linarith + _ = ((∫ z, f z).re + firstMoment f / T) * (∫ x, radialCutoff R T x) := by + rw [integral_const, smul_eq_mul, cutoffMeasure_mass hT]; ring + _ ≤ ((∫ z, f z).re + firstMoment f / T) * (Real.pi*(R+T)^2) := by + gcongr + · exact add_nonneg ha (div_nonneg (firstMoment_nonneg f) hT.le) + · exact radialCutoff_integral_bound hR hT + _ = _ := by ring + + +def pointsMeasure (S : Finset Plane) : Measure Plane := ∑ x ∈ S, Measure.dirac x + +instance pointsMeasure_finite (S : Finset Plane) : IsFiniteMeasure (pointsMeasure S) := by + unfold pointsMeasure + infer_instance + +lemma integral_pointsMeasure (S : Finset Plane) (f : Plane → ℂ) : + (∫ x, f x ∂pointsMeasure S) = ∑ x ∈ S, f x := by + rw [pointsMeasure, integral_finsetSum_measure] + · simp only [integral_dirac] + · intro i hi + exact integrable_dirac (by finiteness) + +lemma kernelForm_points_points (f : LPFunction) (S : Finset Plane) : + kernelForm f (pointsMeasure S) (pointsMeasure S) = + ∑ x ∈ S, ∑ y ∈ S, f (x-y) := by + rw [kernelForm, integral_prod _ (regular_kernel_integrable f _ _), integral_pointsMeasure] + simp only [integral_pointsMeasure] + +lemma kernelForm_points_cutoff_lower (f : LPFunction) + (S : Finset Plane) {R T : ℝ} (hT : 0 < T) (hS : ∀ x ∈ S, ‖x‖ ≤ R) : + (S.card : ℝ) * ((∫ z, f z).re - firstMoment f / T) ≤ + (kernelForm f (pointsMeasure S) (cutoffMeasure R T)).re := by + rw [kernelForm_cutoff f hT, integral_pointsMeasure, Complex.re_sum] + calc + _ = ∑ _x ∈ S, ((∫ z, f z).re - firstMoment f / T) := by simp; ring + _ ≤ _ := by + apply Finset.sum_le_sum + intro x hx + have h := (cutoffConvolution_re_bounds f.integrable + (regular_firstMoment_integrable f) (R := R) hT x).1 + rwa [radialCutoff_eq_one hT (hS x hx), one_mul] at h + +lemma fourier_zero_eq_integral (f : Plane → ℂ) : 𝓕 f 0 = ∫ x, f x := by + rw [Real.fourier_eq] + simp + +/-- The exact finite-disk estimate underlying the density-only bound. +The correction uses a cutoff of thickness T and its first moment, never a +uniform spacing or local-count bound on S. -/ +lemma finite_disk_lp (f : LPFunction) + (hreal : ∀ w, (𝓕 (f : Plane → ℂ) w).im = 0) + (hpos : ∀ w, 0 ≤ (𝓕 (f : Plane → ℂ) w).re) + (S : Finset Plane) {R T : ℝ} (hR : 0 ≤ R) (hT : 0 < T) + (hS : ∀ x ∈ S, ‖x‖ ≤ R) : + 2*(S.card : ℝ)*((∫ z, f z).re - firstMoment f/T) - + ((∫ z, f z).re + firstMoment f/T)*Real.pi*(R+T)^2 ≤ + ∑ x ∈ S, ∑ y ∈ S, (f (x-y)).re := by + let := cutoffMeasure_finite (R := R) hT + have ha : 0 ≤ (∫ z, f z).re := by simpa only [fourier_zero_eq_integral] using hpos 0 + have hc := kernelForm_comparison f f.continuous f.integrable + f.fourierIntegrable hreal hpos (pointsMeasure S) (cutoffMeasure R T) + have hl := kernelForm_points_cutoff_lower f S hT hS + have hu := kernelForm_cutoff_self_upper f ha hR hT + rw [kernelForm_points_points] at hc + simp only [Complex.re_sum] at hc + nlinarith + +lemma ofReal_finset_sum_le {ι : Type*} (S : Finset ι) (f : ι → ℝ) : + ENNReal.ofReal (∑ x ∈ S, f x) ≤ ∑ x ∈ S, ENNReal.ofReal (f x) := by + classical + induction S using Finset.induction_on with + | empty => simp + | @insert x S hx ih => + simp only [Finset.sum_insert hx] + exact ENNReal.ofReal_add_le.trans (add_le_add le_rfl ih) + +lemma offdiag_sum_eq (f : Plane → ℝ) (S : Finset Plane) : + (∑ x ∈ S, ∑ y ∈ S.erase x, f (x-y)) = + (∑ x ∈ S, ∑ y ∈ S, f (x-y)) - (S.card : ℝ)*f 0 := by + have he : (∑ x ∈ S, ∑ y ∈ S.erase x, f (x-y)) + (S.card : ℝ)*f 0 = + ∑ x ∈ S, ∑ y ∈ S, f (x-y) := by + calc + _ = ∑ x ∈ S, ((∑ y ∈ S.erase x, f (x-y)) + f 0) := by + rw [Finset.sum_add_distrib]; simp + _ = _ := by + apply Finset.sum_congr rfl + intro x hx + simpa only [sub_self] using Finset.sum_erase_add S (fun y => f (x-y)) hx + linarith + +lemma normalized_offdiag_minorization (f : Plane → ℂ) (g : ℝ → ℝ) + (hminor : ∀ x : Plane, x ≠ 0 → (f x).re ≤ g (‖x‖^2)) + (S : Finset Plane) (hN : 0 < S.card) : + ENNReal.ofReal ((∑ x ∈ S, ∑ y ∈ S.erase x, (f (x-y)).re)/(S.card : ℝ)) ≤ + (S.card : ℝ≥0∞)⁻¹ * ∑ x ∈ S, ∑ y ∈ S.erase x, ENNReal.ofReal (g (‖x-y‖^2)) := by + rw [ENNReal.ofReal_div_of_pos (by exact_mod_cast hN), ENNReal.ofReal_natCast, + div_eq_mul_inv, mul_comm] + gcongr + calc + _ ≤ ∑ x ∈ S, ENNReal.ofReal (∑ y ∈ S.erase x, (f (x-y)).re) := ofReal_finset_sum_le _ _ + _ ≤ _ := by + apply Finset.sum_le_sum + intro x hx + calc + _ ≤ ∑ y ∈ S.erase x, ENNReal.ofReal ((f (x-y)).re) := ofReal_finset_sum_le _ _ + _ ≤ _ := by + apply Finset.sum_le_sum + intro y hy + apply ENNReal.ofReal_le_ofReal + apply hminor + exact sub_ne_zero.mpr (Ne.symm (Finset.mem_erase.mp hy).1) + +lemma finite_disk_energy_lp (f : LPFunction) + (hreal : ∀ w, (𝓕 (f : Plane → ℂ) w).im = 0) + (hpos : ∀ w, 0 ≤ (𝓕 (f : Plane → ℂ) w).re) + (g : ℝ → ℝ) (hminor : ∀ x : Plane, x ≠ 0 → (f x).re ≤ g (‖x‖^2)) + (C : Set Plane) {R T : ℝ} (hR : 0 ≤ R) (hT : 0 < T) + (hN : 0 < diskCount C R) : + ENNReal.ofReal (2*((∫ z, f z).re - firstMoment f/T) - + ((∫ z, f z).re + firstMoment f/T) * (Real.pi*(R+T)^2/(diskCount C R : ℝ)) - + (f 0).re) ≤ diskEnergy g C R := by + have hS : ∀ x ∈ diskPoints C R, ‖x‖ ≤ R := by + intro x hx + unfold diskPoints at hx + split_ifs at hx with h + · simpa only [Metric.mem_closedBall, dist_zero_right] using (h.mem_toFinset.mp hx).2 + · simp at hx + have hl := finite_disk_lp f hreal hpos (diskPoints C R) hR hT hS + have hN' : (0 : ℝ) < diskCount C R := by exact_mod_cast hN + have he : 2*((∫ z, f z).re - firstMoment f/T) - + ((∫ z, f z).re + firstMoment f/T)*(Real.pi*(R+T)^2/(diskCount C R : ℝ)) - + (f 0).re ≤ + (∑ x ∈ diskPoints C R, ∑ y ∈ (diskPoints C R).erase x, (f (x-y)).re) / + (diskCount C R : ℝ) := by + rw [le_div_iff₀ hN', offdiag_sum_eq (fun z => (f z).re)] + change _ ≤ _ - (diskCount C R : ℝ)*(f 0).re + have hN0 : (diskCount C R : ℝ) ≠ 0 := ne_of_gt hN' + have hid : (2*((∫ z, f z).re - firstMoment f/T) - + ((∫ z, f z).re + firstMoment f/T)*(Real.pi*(R+T)^2/(diskCount C R : ℝ)) - + (f 0).re) * (diskCount C R : ℝ) = + 2*(diskCount C R : ℝ)*((∫ z, f z).re - firstMoment f/T) - + ((∫ z, f z).re + firstMoment f/T)*Real.pi*(R+T)^2 - + (diskCount C R : ℝ)*(f 0).re := by + field_simp [hN0] + rw [hid] + exact sub_le_sub_right hl _ + exact (ENNReal.ofReal_le_ofReal he).trans + (normalized_offdiag_minorization f g hminor (diskPoints C R) hN) + +lemma density_count_eventually_pos {C : Set Plane} (hD : DensityOne C) : + ∀ᶠ R : ℝ in atTop, 0 < diskCount C R := by + have hp := hD.eventually (lt_mem_nhds (show (1/2 : ℝ) < 1 by norm_num)) + filter_upwards [hp, eventually_gt_atTop (0 : ℝ)] with R h hR + have hden : 0 < Real.pi * R^2 := mul_pos Real.pi_pos (sq_pos_of_pos hR) + have hn := (lt_div_iff₀ hden).mp h + have hpR : (0 : ℝ) < diskCount C R := by nlinarith + exact_mod_cast hpR + +lemma density_volume_ratio {C : Set Plane} (hD : DensityOne C) (ε : ℝ) : + Tendsto (fun R : ℝ => Real.pi*(R+ε*R)^2/(diskCount C R : ℝ)) + atTop (𝓝 ((1+ε)^2)) := by + have h := (hD.inv₀ (show (1 : ℝ) ≠ 0 by norm_num)).const_mul ((1+ε)^2) + convert h using 1 + · ext R + simp only [inv_div] + ring + · simp + +lemma density_lp_epsilon (f : LPFunction) + (hreal : ∀ w, (𝓕 (f : Plane → ℂ) w).im = 0) + (hpos : ∀ w, 0 ≤ (𝓕 (f : Plane → ℂ) w).re) + (g : ℝ → ℝ) (hminor : ∀ x : Plane, x ≠ 0 → (f x).re ≤ g (‖x‖^2)) + {C : Set Plane} (hD : DensityOne C) {ε : ℝ} (hε : 0 < ε) : + ENNReal.ofReal (2*(∫ z, f z).re - (∫ z, f z).re*(1+ε)^2 - (f 0).re) ≤ energy g C := by + have hm : Tendsto (fun R : ℝ => firstMoment f/(ε*R)) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop (tendsto_id.const_mul_atTop hε) + have ha : Tendsto (fun _ : ℝ => (∫ z, f z).re) atTop (𝓝 (∫ z, f z).re) := tendsto_const_nhds + have hL : Tendsto (fun R : ℝ => + 2*((∫ z, f z).re-firstMoment f/(ε*R)) - + ((∫ z, f z).re+firstMoment f/(ε*R))*(Real.pi*(R+ε*R)^2/(diskCount C R : ℝ)) - + (f 0).re) atTop + (𝓝 (2*(∫ z, f z).re - (∫ z, f z).re*(1+ε)^2 - (f 0).re)) := by + simpa only [sub_zero, add_zero] using + (((ha.sub hm).const_mul 2).sub ((ha.add hm).mul (density_volume_ratio hD ε))).sub_const (f 0).re + have hLe := ENNReal.continuous_ofReal.continuousAt.tendsto.comp hL + change _ ≤ Filter.liminf (diskEnergy g C) atTop + rw [← hLe.liminf_eq] + refine liminf_le_liminf ?_ + filter_upwards [density_count_eventually_pos hD, eventually_gt_atTop (0 : ℝ)] with R hN hR + exact finite_disk_energy_lp f hreal hpos g hminor C hR.le (mul_pos hε hR) hN + +/-- Source §2, density-only linear programming bound, for the exact ordered-pair +centered-disk ENNReal liminf. This requires no uniform separation, special +local-count bound, finite energy, or decay of the potential. -/ +lemma density_lp (f : LPFunction) + (hreal : ∀ w, (𝓕 (f : Plane → ℂ) w).im = 0) + (hpos : ∀ w, 0 ≤ (𝓕 (f : Plane → ℂ) w).re) + (g : ℝ → ℝ) (hminor : ∀ x : Plane, x ≠ 0 → (f x).re ≤ g (‖x‖^2)) + {C : Set Plane} (hD : DensityOne C) : + ENNReal.ofReal ((∫ z, f z).re - (f 0).re) ≤ energy g C := by + let a := (∫ z, f z).re + let b := (f 0).re + have hc : Continuous (fun ε : ℝ => 2*a-a*(1+ε)^2-b) := by fun_prop + have ht : Tendsto (fun ε : ℝ => 2*a-a*(1+ε)^2-b) (𝓝[>] (0 : ℝ)) (𝓝 (a-b)) := by + convert (hc.continuousAt (x := 0)).tendsto.mono_left nhdsWithin_le_nhds using 1 + congr 1 + ring + have he := ENNReal.continuous_ofReal.continuousAt.tendsto.comp ht + apply le_of_tendsto he + filter_upwards [self_mem_nhdsWithin] with ε hε + exact density_lp_epsilon f hreal hpos g hminor hD hε + +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Gaussian.lean b/lean/OAI/Analysis/Triangular/Energy/Gaussian.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd179d5d86af6401548172fbc769135658c95ac9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Gaussian.lean @@ -0,0 +1,84 @@ +import OAI.Analysis.Triangular.Energy.GaussianPoisson +import OAI.Analysis.Triangular.Energy.Schwartz +import OAI.Analysis.Triangular.Energy.Lattice +import OAI.Analysis.Triangular.Energy.Definitions + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal +open Complex MeasureTheory +namespace AtomicTriangular + +lemma schwartzLP_integral {α : ℝ} (p : GaussianPair α) : + (∫ z, schwartzLP p.first z)=(p.second 0:ℂ) := by + rw [←TriangularUniversal.fourier_zero_eq_integral,schwartzLP_fourier,p.fourier_first] + +def gaussPot (α : ℝ) (s : ℝ) : ℝ := Real.exp (-Real.pi*α*s) +lemma triangularPoint_zero : triangularPoint (0 : ℤ × ℤ)=0 := by + rw [triangularPoint_eq_support] + exact TriangularUniversal.triangularPoint_zero +lemma triangularPoint_ne_zero {v : ℤ × ℤ} (hv : v≠0) : triangularPoint v≠0 := by + rw [triangularPoint_eq_support] + exact mt (TriangularUniversal.triangularPoint_eq_zero_iff v).mp hv +lemma GaussianPair.lattice_contact {α : ℝ} (p : GaussianPair α) (v : ℤ × ℤ) (hv : v≠0) : + p.first (triangularPoint v)=gaussPot α (‖triangularPoint v‖^2) := by + obtain ⟨n,hn⟩ := A_radial_node (show triangularPoint v∈A from ⟨v,rfl⟩) (triangularPoint_ne_zero hv) + exact p.contact _ n hn +lemma GaussianPair.lattice_zeros {α : ℝ} (p : GaussianPair α) (v : ℤ × ℤ) (hv : v≠0) : + p.second (triangularPoint v)=0 := by + obtain ⟨n,hn⟩ := A_radial_node (show triangularPoint v∈A from ⟨v,rfl⟩) (triangularPoint_ne_zero hv) + exact p.zeros _ n hn +lemma latticeEnergy_eq_support (g : ℝ → ℝ) : latticeEnergy g=TriangularUniversal.latticeEnergy g := by + unfold latticeEnergy TriangularUniversal.latticeEnergy + rw [A_eq_support] +lemma GaussianPair.sharp_value {α : ℝ} (p : GaussianPair α) (hp : GaussianLatticePoisson p) : + latticeEnergy (gaussPot α)=ENNReal.ofReal (p.second 0-p.first 0) := by + classical + have hsum : (∑' v : ℤ × ℤ, p.first (triangularPoint v))=p.second 0 := by + rw [hp.poisson,tsum_eq_single 0 (fun v hv => p.lattice_zeros v hv),triangularPoint_zero] + have hadd : p.first 0+(∑' v : {v : ℤ × ℤ // v≠0},p.first (triangularPoint v.val))=p.second 0 := by + have hh := hp.first_summable.sum_add_tsum_subtype_compl ({0}:Finset (ℤ × ℤ)) + simp only [Finset.sum_singleton,triangularPoint_zero,hsum] at hh + let e : {x : ℤ × ℤ // x ∉ ({0} : Finset (ℤ × ℤ))} ≃ {v : ℤ × ℤ // v≠0} := + Equiv.subtypeEquivRight (fun v => by simp only [Finset.mem_singleton]) + have he : (∑' x : {x : ℤ × ℤ // x ∉ ({0} : Finset (ℤ × ℤ))},p.first (triangularPoint x.val))= + ∑' v : {v : ℤ × ℤ // v≠0},p.first (triangularPoint v.val) := + e.tsum_eq (fun v => p.first (triangularPoint v.val)) + exact he ▸ hh + have hs := hp.first_summable.subtype (fun v : ℤ × ℤ => v≠0) + have he (v : {v : ℤ × ℤ // v≠0}) : p.first (triangularPoint v.val)=gaussPot α (‖triangularPoint v.val‖^2) := + p.lattice_contact v.val v.property + have hs' : Summable (fun v : {v : ℤ × ℤ // v≠0} => gaussPot α (‖triangularPoint v.val‖^2)) := by + exact hs.congr (fun v => he v) + rw [latticeEnergy_eq_support,TriangularUniversal.latticeEnergy_nonzero_index] + simp_rw [←triangularPoint_eq_support] + rw [←ENNReal.ofReal_tsum_of_nonneg (f := fun v : {v : ℤ × ℤ // v≠0} => gaussPot α (‖triangularPoint v.val‖^2)) (fun v : {v : ℤ × ℤ // v≠0} => (Real.exp_pos (-Real.pi*α*‖triangularPoint v.val‖^2)).le) hs'] + congr 1 + simp_rw [he] at hadd + linarith +lemma GaussianPair.energy_bound {α : ℝ} (p : GaussianPair α) (hp : GaussianLatticePoisson p) + {C : Set Plane} (hD : DensityOne C) : latticeEnergy (gaussPot α)≤energy (gaussPot α) C := by + rw [p.sharp_value hp] + have he : (∫ z,schwartzLP p.first z).re-(schwartzLP p.first 0).re=p.second 0-p.first 0 := by + rw [schwartzLP_integral,schwartzLP_apply] + rfl + rw [←he] + apply TriangularUniversal.density_lp (schwartzLP p.first) + · intro w + rw [schwartzLP_fourier,p.fourier_first] + rfl + · intro w + rw [schwartzLP_fourier,p.fourier_first] + exact p.positive w + · intro x _ + rw [schwartzLP_apply] + exact p.minorant x + · exact hD +lemma gaussian_energy_bound {C : Set Plane} (hD : DensityOne C) (α : ℝ) (hα : 0<α) : + latticeEnergy (gaussPot α)≤energy (gaussPot α) C := + (gaussianPair α hα).energy_bound (gaussianPair_poisson α hα) hD +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/GaussianPoisson.lean b/lean/OAI/Analysis/Triangular/Energy/GaussianPoisson.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc01f7eacf12d41bfea1452670bdf11efc710cd6 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/GaussianPoisson.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.Triangular.Energy.PairPoisson +import OAI.Analysis.Triangular.Schwartz.GaussianPair + +namespace OAI + +noncomputable section +open scoped BigOperators FourierTransform SchwartzMap +open Complex +namespace AtomicTriangular.Construction +lemma actualSchwartz_lattice_summable (side : Fin 2) {z : ℝ} (hz : 0 actualSchwartz side z hz hzB (AtomicTriangular.triangularPoint v)) := by + exact (pairSchwartz_lattice_summable _ _).const_smul (normalizingDen z)⁻¹ +lemma actualSchwartz_lattice_poisson {z : ℝ} (hz : 0 gaussian α (triangularPoint v)) := by + simp_rw [gaussian_eq_radial] + exact Construction.lattice_gaussian_summable (div_pos hα b_pos) +lemma complex_gaussian_lattice (α : ℝ) : + (∑' v : ℤ × ℤ, (gaussian α (triangularPoint v):ℂ))= + TriangularUniversal.Theta.theta ((α/b:ℝ):ℂ) := by + apply tsum_congr + intro v + rw [gaussian_eq_radial,Construction.gaussian,Construction.radial_triangularPoint,ofReal_exp] + congr 1 + push_cast + ring +lemma gaussian_lattice_theta {α : ℝ} (hα : 0<α) : + (∑' v : ℤ × ℤ, gaussian α (triangularPoint v))= + α⁻¹*∑' v : ℤ × ℤ, gaussian α⁻¹ (triangularPoint v) := by + have ha0 : (α:ℂ)≠0 := by exact_mod_cast hα.ne' + have hb0 : (b:ℂ)≠0 := by exact_mod_cast b_pos.ne' + have hr := congrArg (fun r : ℝ => (r:ℂ)) b_sq + push_cast at hr + have he1 : (2:ℂ)/((Real.sqrt 3:ℂ)*((α/b:ℝ):ℂ))=((α⁻¹:ℝ):ℂ) := by + unfold b + push_cast + field_simp + have he2 : (4:ℂ)/(3*((α/b:ℝ):ℂ))=((α⁻¹/b:ℝ):ℂ) := by + push_cast + field_simp [ha0,hb0] + linear_combination 4*hr + have ht := TriangularUniversal.Theta.theta_transform (show 0<((α/b:ℝ):ℂ).re from div_pos hα b_pos) + rw [he1,he2,←complex_gaussian_lattice,←complex_gaussian_lattice] at ht + have hfirst := Complex.ofRealCLM.map_tsum (gaussian_lattice_summable hα) + have hsecond := Complex.ofRealCLM.map_tsum (gaussian_lattice_summable (inv_pos.mpr hα)) + simp only [Complex.ofRealCLM_apply] at hfirst hsecond + rw [←hfirst,←hsecond,←ofReal_mul] at ht + exact_mod_cast ht + +structure GaussianLatticePoisson {α : ℝ} (p : GaussianPair α) : Prop where + first_summable : Summable (fun v : ℤ × ℤ => p.first (triangularPoint v)) + second_summable : Summable (fun v : ℤ × ℤ => p.second (triangularPoint v)) + poisson : (∑' v : ℤ × ℤ, p.first (triangularPoint v))=∑' v : ℤ × ℤ, p.second (triangularPoint v) +lemma largeGaussianPair_poisson {α : ℝ} (hα : 1 ≤ α) : + GaussianLatticePoisson (largeGaussianPair hα) where + first_summable := Construction.actualSchwartz_lattice_summable 0 _ _ + second_summable := Construction.actualSchwartz_lattice_summable 1 _ _ + poisson := Construction.actualSchwartz_lattice_poisson _ _ +lemma reciprocalGaussianPair_poisson {α : ℝ} (hα : 0<α) (p : GaussianPair α⁻¹) + (hp : GaussianLatticePoisson p) : GaussianLatticePoisson (reciprocalGaussianPair hα p) where + first_summable := by + change Summable (fun v => gaussianSchwartz α hα (triangularPoint v)-α⁻¹*p.second (triangularPoint v)) + simp_rw [gaussianSchwartz_apply] + exact (gaussian_lattice_summable hα).sub (hp.second_summable.mul_left _) + second_summable := by + change Summable (fun v => α⁻¹*(gaussianSchwartz α⁻¹ (inv_pos.mpr hα) (triangularPoint v)-p.first (triangularPoint v))) + simp_rw [gaussianSchwartz_apply] + exact ((gaussian_lattice_summable (inv_pos.mpr hα)).sub hp.first_summable).mul_left _ + poisson := by + change (∑' v, (gaussianSchwartz α hα (triangularPoint v)-α⁻¹*p.second (triangularPoint v)))= + ∑' v, α⁻¹*(gaussianSchwartz α⁻¹ (inv_pos.mpr hα) (triangularPoint v)-p.first (triangularPoint v)) + simp_rw [gaussianSchwartz_apply] + rw [(gaussian_lattice_summable hα).tsum_sub (hp.second_summable.mul_left _), + tsum_mul_left,tsum_mul_left,(gaussian_lattice_summable (inv_pos.mpr hα)).tsum_sub hp.first_summable, + gaussian_lattice_theta hα,hp.poisson,mul_sub] +lemma gaussianPair_poisson (α : ℝ) (hα : 0<α) : GaussianLatticePoisson (gaussianPair α hα) := by + unfold gaussianPair + split_ifs with h + · exact largeGaussianPair_poisson h + · exact reciprocalGaussianPair_poisson hα _ (largeGaussianPair_poisson _) +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Lattice.lean b/lean/OAI/Analysis/Triangular/Energy/Lattice.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bfd8480324dc5cb40fdefefea7b6752a0bf6a8f --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Lattice.lean @@ -0,0 +1,31 @@ +import OAI.Analysis.Triangular.Energy.Mixtures + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace TriangularUniversal +lemma triangularPoint_eq_zero_iff (v : ℤ × ℤ) : triangularPoint v=0 ↔ v=0 := by + rw [← triangularPoint_zero] + exact triangularPoint_injective.eq_iff + +def nonzeroLatticeEquiv : {v : ℤ × ℤ // v≠0} ≃ NonzeroSite := Equiv.ofBijective + (fun v => ⟨triangularPoint v.val,⟨⟨v.val,rfl⟩,fun h => v.property ((triangularPoint_eq_zero_iff _).mp h)⟩⟩) + (by + constructor + · intro v w he + apply Subtype.ext + exact triangularPoint_injective (congrArg Subtype.val he) + · intro x + obtain ⟨v,hv⟩ := x.property.1 + refine ⟨⟨v,?_⟩,?_⟩ + · intro h + exact x.property.2 (hv.symm.trans ((triangularPoint_eq_zero_iff _).mpr h)) + · exact Subtype.ext hv) +lemma latticeEnergy_nonzero_index (g : ℝ → ℝ) : + latticeEnergy g=∑' v : {v : ℤ × ℤ // v≠0}, ENNReal.ofReal (g (‖triangularPoint v.val‖^2)) := by + exact (nonzeroLatticeEquiv.tsum_eq (fun x : NonzeroSite => ENNReal.ofReal (g (‖x.val‖^2)))).symm +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/LatticePoisson.lean b/lean/OAI/Analysis/Triangular/Energy/LatticePoisson.lean new file mode 100644 index 0000000000000000000000000000000000000000..6434d7975503b60f1b23b031a660ef6163d9d059 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/LatticePoisson.lean @@ -0,0 +1,121 @@ +import OAI.Analysis.Triangular.Energy.Theta +import OAI.Analysis.Triangular.Schwartz.FourierPair +import OAI.Analysis.Triangular.Envelope.Analytic +import OAI.Analysis.Triangular.Lattice.LatticeGeometry + +namespace OAI + +noncomputable section +open scoped BigOperators FourierTransform SchwartzMap +open Complex +namespace AtomicTriangular.Construction +lemma radial_triangularPoint (v : ℤ × ℤ) : + radial (AtomicTriangular.triangularPoint v)=(v.1:ℝ)^2+(v.1:ℝ)*v.2+(v.2:ℝ)^2 := + AtomicTriangular.triangularPoint_norm_sq v.1 v.2 +lemma lattice_gaussian_summable {k : ℝ} (hk : 0 gaussian k (AtomicTriangular.triangularPoint v)) := by + have H := (TriangularUniversal.Theta.triangular_summable (show 0<(k:ℂ).re from hk)).norm + convert H using 1 + ext v + rw [gaussian,radial_triangularPoint,Complex.norm_exp] + congr 1 + simp [pow_two,mul_re,mul_im] +lemma atom_lattice_summable {k : ℝ} (hk : 0 atomFunction k (AtomicTriangular.triangularPoint v)) := by + exact Summable.of_norm ((lattice_gaussian_summable hk).of_nonneg_of_le + (fun _ => norm_nonneg _) (fun v => atomFunction_bound k _)) +def dualAtomFunction (q : Fin 2) (x : Plane) : C(Spectrum,ℂ) := + exp (-(Real.pi:ℂ)*h*(radial x:ℂ)) • transformedFunction (damping q) h (damping_pos q) (radial x:ℂ) +lemma dualAtomFunction_apply (q : Fin 2) (x : Plane) (t : Spectrum) : + dualAtomFunction q x t=exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*transformedWave (damping q) h t.val (radial x:ℂ) := by + simp only [dualAtomFunction,ContinuousMap.smul_apply,smul_eq_mul,transformedFunction_apply] +lemma dualAtomFunction_bound (q : Fin 2) (x : Plane) : + ‖dualAtomFunction q x‖ ≤ ‖lambdaFunction (damping q) (damping_pos q)‖*Real.exp (-radial x) := by + apply (ContinuousMap.norm_le _ (by positivity)).mpr + intro t + have ht : |t.val|≤5/6 := abs_le.mpr t.property + have hx := damping_Xwave_lower q (abs_nonneg t.val) ht + have he : Xwave (damping q) |t.val|=Xwave (damping q) t.val := by simp [Xwave,waveDen] + rw [he] at hx + have hl : ‖lambda (damping q) t.val‖ ≤ ‖lambdaFunction (damping q) (damping_pos q)‖ := + (lambdaFunction (damping q) (damping_pos q)).norm_coe_le_norm t + rw [dualAtomFunction_apply,transformedWave,norm_mul,norm_mul,norm_exp,norm_exp] + have h1 : (-(Real.pi:ℂ)*h*(radial x:ℂ)).re=-Real.pi*h*radial x := by simp + have h2 : (I*Real.pi*zeta (damping q) h t.val*(radial x:ℂ)).re= + -Real.pi*(damping q*Xwave (damping q) t.val-h)*radial x := by + rw [mul_re] + simp only [ofReal_re,ofReal_im,mul_zero,sub_zero,wavePhase_re] + rw [h1,h2] + calc + _ = ‖lambda (damping q) t.val‖*Real.exp (-(Real.pi*damping q*Xwave (damping q) t.val)*radial x) := by + rw [mul_left_comm,←Real.exp_add] + congr 2 + ring + _ ≤ _ := mul_le_mul hl (Real.exp_le_exp.mpr (by nlinarith [show 0 ≤ radial x from mul_nonneg b_pos.le (sq_nonneg ‖x‖)])) (Real.exp_pos _).le (norm_nonneg _) +lemma dualAtom_lattice_summable (q : Fin 2) : + Summable (fun v : ℤ × ℤ => dualAtomFunction q (AtomicTriangular.triangularPoint v)) := by + have hs := lattice_gaussian_summable (inv_pos.mpr Real.pi_pos) + have he (v : ℤ × ℤ) : gaussian Real.pi⁻¹ (AtomicTriangular.triangularPoint v)= + Real.exp (-radial (AtomicTriangular.triangularPoint v)) := by + unfold gaussian + congr 1 + field_simp + simp_rw [he] at hs + exact Summable.of_norm ((hs.mul_left ‖lambdaFunction (damping q) (damping_pos q)‖).of_nonneg_of_le + (fun _ => norm_nonneg _) (fun v => dualAtomFunction_bound q _)) +lemma dualAtom_gaussian (q : Fin 2) (x : Plane) (t : Spectrum) : + dualAtomFunction q x t=(spectralParameter (damping q) t.val)⁻¹* + exp (-(Real.pi:ℂ)*(‖x‖:ℂ)^2/spectralParameter (damping q) t.val) := by + rw [spectralParameter_inv (damping_pos q),spectral_exponent (damping_pos q) h] + rw [dualAtomFunction_apply,transformedWave,exp_add] + ring +lemma scalar_lattice_poisson (q : Fin 2) (t : Spectrum) : + (∑' v : ℤ × ℤ, atomFunction (damping q) (AtomicTriangular.triangularPoint v) t)= + ∑' v : ℤ × ℤ, dualAtomFunction q (AtomicTriangular.triangularPoint v) t := by + let c : ℂ := (damping q:ℂ)-I*(t.val:ℂ) + have hc : 0 (r:ℂ)) b_sq + push_cast at hr + have hatom (v : ℤ × ℤ) : atomFunction (damping q) (AtomicTriangular.triangularPoint v) t= + exp (-Real.pi*c*((v.1:ℂ)^2+(v.1:ℂ)*v.2+(v.2:ℂ)^2)) := by + rw [atomFunction_apply,←exp_add,radial_triangularPoint] + congr 1 + dsimp [c] + push_cast + ring + have hlam : (spectralParameter (damping q) t.val)⁻¹=2/((Real.sqrt 3:ℂ)*c) := by + change ((b:ℂ)*c)⁻¹=_ + unfold b + push_cast + ring_nf + have hdual (v : ℤ × ℤ) : dualAtomFunction q (AtomicTriangular.triangularPoint v) t= + (2/((Real.sqrt 3:ℂ)*c))*exp (-Real.pi*(4/(3*c))*((v.1:ℂ)^2+(v.1:ℂ)*v.2+(v.2:ℂ)^2)) := by + rw [dualAtom_gaussian,hlam] + congr 1 + congr 1 + have hv := congrArg (fun r : ℝ => (r:ℂ)) (radial_triangularPoint v) + dsimp [radial] at hv + push_cast at hv + change -(Real.pi:ℂ)*(‖AtomicTriangular.triangularPoint v‖:ℂ)^2/((b:ℂ)*c)=_ + field_simp [hb,hc0] + linear_combination -(4:ℂ)*(b:ℂ)*hv + (4:ℂ)*(‖AtomicTriangular.triangularPoint v‖:ℂ)^2*hr + simp_rw [hatom,hdual] + rw [tsum_mul_left] + exact TriangularUniversal.Theta.theta_transform hc +lemma atom_lattice_poisson (q : Fin 2) : + (∑' v : ℤ × ℤ, atomFunction (damping q) (AtomicTriangular.triangularPoint v))= + ∑' v : ℤ × ℤ, dualAtomFunction q (AtomicTriangular.triangularPoint v) := by + ext t + have h1 := (ContinuousMap.evalCLM ℂ t).map_tsum (atom_lattice_summable (damping_pos q)) + have h2 := (ContinuousMap.evalCLM ℂ t).map_tsum (dualAtom_lattice_summable q) + change (∑' v : ℤ × ℤ, atomFunction (damping q) (AtomicTriangular.triangularPoint v)) t= + ∑' v : ℤ × ℤ, atomFunction (damping q) (AtomicTriangular.triangularPoint v) t at h1 + change (∑' v : ℤ × ℤ, dualAtomFunction q (AtomicTriangular.triangularPoint v)) t= + ∑' v : ℤ × ℤ, dualAtomFunction q (AtomicTriangular.triangularPoint v) t at h2 + rw [h1,h2,scalar_lattice_poisson] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Mixtures.lean b/lean/OAI/Analysis/Triangular/Energy/Mixtures.lean new file mode 100644 index 0000000000000000000000000000000000000000..396f5831a6148f1c65354d74988e36483b4c4fe0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Mixtures.lean @@ -0,0 +1,1056 @@ +import OAI.Analysis.Triangular.Energy.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal +open Classical Filter +namespace TriangularUniversal +def b : ℝ := Real.sqrt 3 / 2 + +def nodeResidues : Finset ℕ := {0, 1, 3, 4, 7, 9} + +def IsPositiveNode (s : ℝ) : Prop := + 0 < s ∧ ∃ q : ℤ, ∃ a ∈ nodeResidues, s = 12 * (q : ℝ) + a + +lemma sqrt_three_pos : 0 < Real.sqrt (3 : ℝ) := Real.sqrt_pos.2 (by norm_num) +lemma scale_pos : 0 < Real.sqrt (2 / Real.sqrt (3 : ℝ)) := by positivity +lemma b_pos : 0 < b := by unfold b; positivity + +lemma triangularPoint_coord_zero (j k : ℤ) : + triangularPoint (j, k) 0 = Real.sqrt (2 / Real.sqrt 3) * ((j : ℝ) + (k : ℝ) / 2) := by + simp [triangularPoint] + +lemma triangularPoint_coord_one (j k : ℤ) : + triangularPoint (j, k) 1 = Real.sqrt (2 / Real.sqrt 3) * ((k : ℝ) * Real.sqrt 3 / 2) := by + simp [triangularPoint] + +lemma triangularPoint_norm_sq (j k : ℤ) : + b * ‖triangularPoint (j, k)‖ ^ 2 = (j : ℝ) ^ 2 + (j : ℝ) * (k : ℝ) + (k : ℝ) ^ 2 := by + rw [EuclideanSpace.norm_sq_eq, Fin.sum_univ_two] + simp only [triangularPoint_coord_zero, triangularPoint_coord_one, Real.norm_eq_abs, + sq_abs, mul_pow] + have hs : (Real.sqrt (3 : ℝ)) ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have hc : (Real.sqrt (2 / Real.sqrt (3 : ℝ))) ^ 2 = 2 / Real.sqrt 3 := + Real.sq_sqrt (by positivity) + rw [hc] + dsimp [b] + field_simp + nlinarith [hs] + +lemma triangularPoint_injective : Function.Injective triangularPoint := by + intro jk lm he + rcases jk with ⟨j, k⟩ + rcases lm with ⟨l, m⟩ + have hzero := congrArg (fun v : Plane => v 0) he + have hone := congrArg (fun v : Plane => v 1) he + simp only [triangularPoint_coord_zero, triangularPoint_coord_one] at hzero hone + have hk : k = m := by + have hr : (k : ℝ) = (m : ℝ) := by + have H := (mul_left_cancel₀ (ne_of_gt scale_pos)) hone + have H' : (k : ℝ) * Real.sqrt 3 = (m : ℝ) * Real.sqrt 3 := by linarith + exact mul_right_cancel₀ (ne_of_gt sqrt_three_pos) H' + exact_mod_cast hr + subst m + have hj : j = l := by + have hr : (j : ℝ) = (l : ℝ) := by + have H := (mul_left_cancel₀ (ne_of_gt scale_pos)) hzero + linarith + exact_mod_cast hr + subst l + rfl + +lemma triangularPoint_zero : triangularPoint (0, 0) = 0 := by + ext i + fin_cases i <;> simp [triangularPoint] + +lemma triangularPoint_sub (j k : ℤ × ℤ) : + triangularPoint (j - k) = triangularPoint j - triangularPoint k := by + ext i + fin_cases i <;> simp [triangularPoint] <;> ring + +lemma eisenstein_mod_twelve : ∀ j k : ZMod 12, + j ^ 2 + j * k + k ^ 2 = 0 ∨ j ^ 2 + j * k + k ^ 2 = 1 ∨ + j ^ 2 + j * k + k ^ 2 = 3 ∨ j ^ 2 + j * k + k ^ 2 = 4 ∨ + j ^ 2 + j * k + k ^ 2 = 7 ∨ j ^ 2 + j * k + k ^ 2 = 9 := by decide + +lemma eisenstein_mod_twelve_int (j k : ℤ) : + (j ^ 2 + j * k + k ^ 2) % 12 = 0 ∨ + (j ^ 2 + j * k + k ^ 2) % 12 = 1 ∨ + (j ^ 2 + j * k + k ^ 2) % 12 = 3 ∨ + (j ^ 2 + j * k + k ^ 2) % 12 = 4 ∨ + (j ^ 2 + j * k + k ^ 2) % 12 = 7 ∨ + (j ^ 2 + j * k + k ^ 2) % 12 = 9 := by + have H := eisenstein_mod_twelve (j : ZMod 12) (k : ZMod 12) + have hm (r : ℤ) (hr : (j : ZMod 12)^2 + (j : ZMod 12)*k + (k : ZMod 12)^2 = r) : + (j ^ 2 + j * k + k ^ 2) % 12 = r % 12 := by + apply (ZMod.intCast_eq_intCast_iff' _ _ 12).mp + push_cast + exact hr + rcases H with H | H | H | H | H | H + · exact Or.inl (by simpa using hm 0 H) + · exact Or.inr (Or.inl (by simpa using hm 1 H)) + · exact Or.inr (Or.inr (Or.inl (by simpa using hm 3 H))) + · exact Or.inr (Or.inr (Or.inr (Or.inl (by simpa using hm 4 H)))) + · exact Or.inr (Or.inr (Or.inr (Or.inr (Or.inl (by simpa using hm 7 H))))) + · exact Or.inr (Or.inr (Or.inr (Or.inr (Or.inr (by simpa using hm 9 H))))) + +lemma triangular_shell_node (a : Plane) (ha : a ∈ triangularLattice) (ha0 : a ≠ 0) : + IsPositiveNode (b * ‖a‖ ^ 2) := by + rcases ha with ⟨⟨j, k⟩, rfl⟩ + have hpos : 0 < b * ‖triangularPoint (j, k)‖ ^ 2 := + mul_pos b_pos (sq_pos_of_pos (norm_pos_iff.mpr ha0)) + refine ⟨hpos, ?_⟩ + rw [triangularPoint_norm_sq] + let n : ℤ := j ^ 2 + j * k + k ^ 2 + have hn : (j : ℝ) ^ 2 + (j : ℝ) * (k : ℝ) + (k : ℝ) ^ 2 = (n : ℝ) := by + dsimp [n]; push_cast; ring + rw [hn] + have he := Int.emod_add_mul_ediv n 12 + refine ⟨n / 12, ?_⟩ + have H := eisenstein_mod_twelve_int j k + change n % 12 = 0 ∨ n % 12 = 1 ∨ n % 12 = 3 ∨ n % 12 = 4 ∨ + n % 12 = 7 ∨ n % 12 = 9 at H + rcases H with H | H | H | H | H | H + all_goals rw [H] at he + · refine ⟨0, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + · refine ⟨1, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + · refine ⟨3, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + · refine ⟨4, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + · refine ⟨7, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + · refine ⟨9, by simp [nodeResidues], ?_⟩ + exact_mod_cast (by linarith [he] : n = 12 * (n / 12) + _) + +lemma triangularLattice_sub {x y : Plane} (hx : x ∈ triangularLattice) + (hy : y ∈ triangularLattice) : x - y ∈ triangularLattice := by + rcases hx with ⟨j, rfl⟩ + rcases hy with ⟨k, rfl⟩ + exact ⟨j - k, triangularPoint_sub j k⟩ + +lemma diskPoints_subset (C : Set Plane) (R : ℝ) : + (diskPoints C R : Set Plane) ⊆ C := by + intro x hx + unfold diskPoints at hx + split_ifs at hx with h + · exact (h.mem_toFinset.mp hx).1 + · simp at hx + +lemma finite_lattice_row_le (g : ℝ → ℝ) (s : Finset Plane) + (hs : (s : Set Plane) ⊆ triangularLattice) (x : Plane) + (hx : x ∈ triangularLattice) : + ∑ y ∈ s.erase x, ENNReal.ofReal (g (‖x - y‖ ^ 2)) ≤ latticeEnergy g := by + let f : {y : Plane // y ∈ s.erase x} → + {a : Plane // a ∈ triangularLattice ∧ a ≠ 0} := + fun y => ⟨x - y.val, triangularLattice_sub hx (hs (Finset.mem_of_mem_erase y.property)), + sub_ne_zero.mpr (Ne.symm (Finset.ne_of_mem_erase y.property))⟩ + have hf : Function.Injective f := by + intro a b h + apply Subtype.ext + have H := congrArg Subtype.val h + dsimp [f] at H + exact sub_right_injective H + have H := ENNReal.tsum_comp_le_tsum_of_injective hf + (fun a : {a : Plane // a ∈ triangularLattice ∧ a ≠ 0} => + ENNReal.ofReal (g (‖a.val‖ ^ 2))) + change (∑' y : (s.erase x), ENNReal.ofReal (g (‖x - (y : Plane)‖ ^ 2))) ≤ + latticeEnergy g at H + rw [tsum_fintype] at H + have he := Finset.sum_subtype (F := inferInstance) (s.erase x) (fun _ => Iff.rfl) + (fun y : Plane => ENNReal.ofReal (g (‖x - y‖ ^ 2))) + exact he ▸ H + +lemma lattice_disk_energy_le (g : ℝ → ℝ) (R : ℝ) : + diskEnergy g triangularLattice R ≤ latticeEnergy g := by + let s := diskPoints triangularLattice R + have hs : (s : Set Plane) ⊆ triangularLattice := diskPoints_subset _ _ + by_cases hn : s.card = 0 + · have he : s = ∅ := Finset.card_eq_zero.mp hn + change (s.card : ℝ≥0∞)⁻¹ * (∑ x ∈ s, ∑ y ∈ s.erase x, + ENNReal.ofReal (g (‖x - y‖ ^ 2))) ≤ _ + simp [he] + have hn' : (s.card : ℝ≥0∞) ≠ 0 := by exact_mod_cast hn + have H : (∑ x ∈ s, ∑ y ∈ s.erase x, ENNReal.ofReal (g (‖x - y‖ ^ 2))) ≤ + (s.card : ℝ≥0∞) * latticeEnergy g := by + calc + _ ≤ ∑ x ∈ s, latticeEnergy g := Finset.sum_le_sum fun x hx => + finite_lattice_row_le g s hs x (hs hx) + _ = _ := by simp + change (s.card : ℝ≥0∞)⁻¹ * _ ≤ _ + calc + _ ≤ (s.card : ℝ≥0∞)⁻¹ * ((s.card : ℝ≥0∞) * latticeEnergy g) := + mul_le_mul_of_nonneg_left H zero_le + _ = latticeEnergy g := by + rw [← mul_assoc, ENNReal.inv_mul_cancel hn' (by simp), one_mul] + +lemma lattice_energy_upper (g : ℝ → ℝ) : + energy g triangularLattice ≤ latticeEnergy g := by + apply Filter.liminf_le_of_frequently_le' + exact Filter.Eventually.frequently (Filter.Eventually.of_forall (lattice_disk_energy_le g)) + +def triangularEquiv : (Fin 2 → ℝ) ≃ₗ[ℝ] Plane where + toFun v := Real.sqrt (2 / Real.sqrt 3) • + (EuclideanSpace.single 0 (v 0 + v 1 / 2) + + EuclideanSpace.single 1 (v 1 * Real.sqrt 3 / 2)) + invFun v := ![v 0 / Real.sqrt (2 / Real.sqrt 3) - + v 1 / (Real.sqrt (2 / Real.sqrt 3) * Real.sqrt 3), + 2 * v 1 / (Real.sqrt (2 / Real.sqrt 3) * Real.sqrt 3)] + left_inv v := by + ext i + fin_cases i <;> simp + all_goals field_simp [ne_of_gt scale_pos, ne_of_gt sqrt_three_pos] <;> ring + right_inv v := by + ext i + fin_cases i <;> simp + all_goals field_simp [ne_of_gt scale_pos, ne_of_gt sqrt_three_pos] <;> ring + map_add' u v := by + ext i + fin_cases i <;> simp <;> ring + map_smul' c v := by + ext i + fin_cases i <;> simp <;> ring + +def triangularBasis : Module.Basis (Fin 2) ℝ Plane := + Module.Basis.ofEquivFun triangularEquiv.symm + +def triangularModule : Submodule ℤ Plane := + Submodule.span ℤ (Set.range triangularBasis) + +lemma triangularPoint_equiv (j k : ℤ) : + triangularPoint (j, k) = triangularEquiv ![(j : ℝ), (k : ℝ)] := rfl + +lemma triangularModule_coe : (triangularModule : Set Plane) = triangularLattice := by + ext x + change x ∈ Submodule.span ℤ (Set.range triangularBasis) ↔ _ + rw [triangularBasis.mem_span_iff_repr_mem ℤ x] + constructor + · intro h + rcases h 0 with ⟨j, hj⟩ + rcases h 1 with ⟨k, hk⟩ + refine ⟨(j, k), ?_⟩ + apply triangularEquiv.symm.injective + rw [triangularPoint_equiv, LinearEquiv.symm_apply_apply] + ext i + fin_cases i + · exact hj + · exact hk + · rintro ⟨⟨j, k⟩, rfl⟩ i + fin_cases i + · refine ⟨j, ?_⟩ + change (j : ℝ) = (triangularEquiv.symm (triangularPoint (j, k))) 0 + rw [triangularPoint_equiv, LinearEquiv.symm_apply_apply] + rfl + · refine ⟨k, ?_⟩ + change (k : ℝ) = (triangularEquiv.symm (triangularPoint (j, k))) 1 + rw [triangularPoint_equiv, LinearEquiv.symm_apply_apply] + rfl + +instance : DiscreteTopology triangularModule := + inferInstanceAs (DiscreteTopology (Submodule.span ℤ (Set.range triangularBasis))) + +instance : IsZLattice ℝ triangularModule := + inferInstanceAs (IsZLattice ℝ (Submodule.span ℤ (Set.range triangularBasis))) + +lemma triangular_locallyFinite : LocallyFinite triangularLattice := by + intro R + rw [← triangularModule_coe, Set.inter_comm] + exact ZSpan.setFinite_inter triangularBasis Metric.isBounded_closedBall + +lemma triangularBasis_apply (i : Fin 2) : + triangularBasis i = triangularEquiv (Pi.single i 1) := by + simp [triangularBasis, Module.Basis.coe_ofEquivFun] + +lemma triangular_det : + (EuclideanSpace.basisFun (Fin 2) ℝ).toBasis.det triangularBasis = 1 := by + rw [Module.Basis.det_apply, Matrix.det_fin_two] + simp only [Module.Basis.toMatrix_apply, OrthonormalBasis.coe_toBasis_repr_apply, + EuclideanSpace.basisFun_repr, triangularBasis_apply] + simp only [triangularEquiv, LinearEquiv.coe_mk, LinearMap.coe_mk, AddHom.coe_mk] + have hs := Real.sq_sqrt (le_of_lt (show 0 < 2 / Real.sqrt 3 from div_pos (by norm_num) sqrt_three_pos)) + generalize Real.sqrt (2 / Real.sqrt 3) = a at hs ⊢ + simp + field_simp [ne_of_gt sqrt_three_pos] at hs ⊢ + nlinarith + +lemma triangular_covolume : ZLattice.covolume triangularModule = 1 := by + rw [ZLattice.covolume_eq_measure_fundamentalDomain triangularModule + MeasureTheory.volume (ZSpan.isAddFundamentalDomain triangularBasis MeasureTheory.volume)] + rw [ZSpan.measureReal_fundamentalDomain triangularBasis MeasureTheory.volume + (EuclideanSpace.basisFun (Fin 2) ℝ).toBasis, triangular_det, abs_one, one_mul] + rw [MeasureTheory.measureReal_def, MeasureTheory.measure_congr + (ZSpan.fundamentalDomain_ae_parallelepiped + (EuclideanSpace.basisFun (Fin 2) ℝ).toBasis MeasureTheory.volume)] + change (MeasureTheory.volume (parallelepiped (EuclideanSpace.basisFun (Fin 2) ℝ))).toReal = 1 + rw [OrthonormalBasis.volume_parallelepiped, ENNReal.toReal_one] + +lemma diskCount_eq_card (C : Set Plane) (hC : LocallyFinite C) (R : ℝ) : + diskCount C R = Nat.card (C ∩ Metric.closedBall (0 : Plane) R : Set Plane) := by + unfold diskCount diskPoints + rw [dite_eq_left (hC R)] + exact (Set.ncard_eq_toFinset_card _ (hC R)).symm + +lemma norm_square_sublevel (R : ℝ) (hR : 0 ≤ R) : + {x : Plane | x ∈ (Set.univ : Set Plane) ∧ ‖x‖ ^ 2 ≤ R ^ 2} = + Metric.closedBall (0 : Plane) R := by + ext x + simp only [Set.mem_ofPred_eq, Set.mem_univ, true_and, Metric.mem_closedBall, dist_zero_right] + constructor <;> intro h <;> nlinarith [norm_nonneg x] + +lemma triangular_count_asymptotic : + Tendsto (fun R : ℝ => (diskCount triangularLattice R : ℝ) / R ^ 2) + atTop (𝓝 Real.pi) := by + have hunit : {x : Plane | x ∈ (Set.univ : Set Plane) ∧ ‖x‖ ^ 2 ≤ 1} = + Metric.closedBall (0 : Plane) 1 := by + simpa only [one_pow] using norm_square_sublevel 1 zero_le_one + have H := ZLattice.covolume.tendsto_card_le_div' triangularModule + (X := Set.univ) (F := fun x => ‖x‖ ^ 2) + (fun _ _ _ _ => Set.mem_univ _) + (by + intro x r hr + simp only [norm_smul, Real.norm_eq_abs, abs_of_nonneg hr, mul_pow, + finrank_euclideanSpace, Fintype.card_fin]) + (by rw [hunit]; exact Metric.isBounded_closedBall) + (by rw [hunit]; exact Metric.isClosed_closedBall.measurableSet) + (by + rw [hunit, frontier_closedBall (0 : Plane) one_ne_zero] + exact MeasureTheory.Measure.addHaar_sphere MeasureTheory.volume _ _) + have hvol : MeasureTheory.volume.real (Metric.closedBall (0 : Plane) 1) = Real.pi := by + rw [MeasureTheory.measureReal_def, EuclideanSpace.volume_closedBall_fin_two] + simp [Real.pi_pos.le] + rw [hunit, hvol, triangular_covolume, div_one] at H + apply (H.comp (tendsto_pow_atTop (by decide : (2 : ℕ) ≠ 0))).congr' + filter_upwards [eventually_ge_atTop (0 : ℝ)] with R hR + dsimp + rw [norm_square_sublevel R hR, diskCount_eq_card _ triangular_locallyFinite, + ← triangularModule_coe, Set.inter_comm] + rfl + +lemma triangular_densityOne : DensityOne triangularLattice := by + have H := triangular_count_asymptotic.div_const Real.pi + rw [div_self Real.pi_ne_zero] at H + apply H.congr' + exact Filter.Eventually.of_forall fun R => by dsimp; ring + +lemma mem_diskPoints_iff (C : Set Plane) (hC : LocallyFinite C) (R : ℝ) (x : Plane) : + x ∈ diskPoints C R ↔ x ∈ C ∧ ‖x‖ ≤ R := by + simp [diskPoints, hC R, Metric.mem_closedBall, dist_zero_right] + +lemma triangular_count_pos {R : ℝ} (hR : 0 ≤ R) : 0 < diskCount triangularLattice R := by + apply Finset.card_pos.mpr + refine ⟨0, (mem_diskPoints_iff _ triangular_locallyFinite _ _).mpr ?_⟩ + exact ⟨⟨(0, 0), triangularPoint_zero⟩, by simpa using hR⟩ + +lemma lattice_interior_count_ratio (M : ℝ) : + Tendsto (fun R : ℝ => (diskCount triangularLattice (R - M) : ℝ) / + (diskCount triangularLattice R : ℝ)) atTop (𝓝 1) := by + have hshift : Tendsto (fun R : ℝ => R - M) atTop atTop := by + apply tendsto_atTop.2 + intro b + filter_upwards [eventually_ge_atTop (b + M)] with R hR + linarith + have hrat : Tendsto (fun R : ℝ => (R - M) / R) atTop (𝓝 1) := by + have H := (tendsto_const_nhds : Tendsto (fun _ : ℝ => (1 : ℝ)) atTop (𝓝 1)).sub + (tendsto_id.const_div_atTop M) + simp only [sub_zero] at H + apply H.congr' + filter_upwards [eventually_gt_atTop (0 : ℝ)] with R hR + dsimp only [id] + field_simp [ne_of_gt hR] + have H := ((triangular_count_asymptotic.comp hshift).mul (hrat.pow 2)).div + triangular_count_asymptotic Real.pi_ne_zero + simp only [one_pow, mul_one, div_self Real.pi_ne_zero] at H + apply H.congr' + filter_upwards [eventually_gt_atTop (|M| + 1)] with R hR + have hR0 : 0 < R := by linarith [abs_nonneg M] + have hRM : 0 < R - M := by linarith [le_abs_self M] + have hc : (diskCount triangularLattice R : ℝ) ≠ 0 := by + exact_mod_cast ne_of_gt (triangular_count_pos hR0.le) + dsimp + field_simp [ne_of_gt hR0, ne_of_gt hRM, hc] + +lemma lattice_interior_count_ratio_ennreal (M : ℝ) : + Tendsto (fun R : ℝ => (diskCount triangularLattice R : ℝ≥0∞)⁻¹ * + (diskCount triangularLattice (R - M) : ℝ≥0∞)) atTop (𝓝 1) := by + have H := ENNReal.continuous_ofReal.continuousAt.tendsto.comp (lattice_interior_count_ratio M) + rw [ENNReal.ofReal_one] at H + apply H.congr' + filter_upwards [eventually_ge_atTop (0 : ℝ)] with R hR + have hc : 0 < (diskCount triangularLattice R : ℝ) := by + exact_mod_cast triangular_count_pos hR + dsimp only [Function.comp_apply] + rw [ENNReal.ofReal_div_of_pos hc] + simp only [ENNReal.ofReal_natCast, div_eq_mul_inv, mul_comm] + +abbrev NonzeroSite := {x : Plane // x ∈ triangularLattice ∧ x ≠ 0} + +lemma finite_lattice_row_ge (g : ℝ → ℝ) (F : Finset NonzeroSite) (M : ℝ) + (hM : ∀ a ∈ F, ‖a.val‖ ≤ M) (R : ℝ) (x : Plane) + (hx : x ∈ diskPoints triangularLattice (R - M)) : + ∑ a ∈ F, ENNReal.ofReal (g (‖a.val‖ ^ 2)) ≤ + ∑ y ∈ (diskPoints triangularLattice R).erase x, + ENNReal.ofReal (g (‖x - y‖ ^ 2)) := by + have hx' := (mem_diskPoints_iff _ triangular_locallyFinite _ _).mp hx + have hinj : Function.Injective (fun a : NonzeroSite => x - a.val) := by + intro a b h + exact Subtype.ext (sub_right_injective h) + have hsub : F.image (fun a : NonzeroSite => x - a.val) ⊆ + (diskPoints triangularLattice R).erase x := by + intro y hy + rcases Finset.mem_image.mp hy with ⟨a, ha, rfl⟩ + apply Finset.mem_erase.mpr + constructor + · intro he + have : a.val = 0 := by exact sub_eq_self.mp he + exact a.property.2 this + · apply (mem_diskPoints_iff _ triangular_locallyFinite _ _).mpr + refine ⟨triangularLattice_sub hx'.1 a.property.1, ?_⟩ + have := norm_sub_le x a.val + linarith [hx'.2, hM a ha] + calc + _ = ∑ a ∈ F, ENNReal.ofReal (g (‖x - (x - a.val)‖ ^ 2)) := by simp + _ = ∑ y ∈ F.image (fun a : NonzeroSite => x - a.val), + ENNReal.ofReal (g (‖x - y‖ ^ 2)) := by + rw [Finset.sum_image (fun _ _ _ _ h => hinj h)] + _ ≤ _ := Finset.sum_le_sum_of_subset hsub + +lemma finite_lattice_disk_energy_ge (g : ℝ → ℝ) (F : Finset NonzeroSite) (M : ℝ) + (hM0 : 0 ≤ M) (hM : ∀ a ∈ F, ‖a.val‖ ≤ M) (R : ℝ) : + ((diskCount triangularLattice R : ℝ≥0∞)⁻¹ * + (diskCount triangularLattice (R - M) : ℝ≥0∞)) * + (∑ a ∈ F, ENNReal.ofReal (g (‖a.val‖ ^ 2))) ≤ + diskEnergy g triangularLattice R := by + have hsub : diskPoints triangularLattice (R - M) ⊆ diskPoints triangularLattice R := by + intro x hx + rw [mem_diskPoints_iff _ triangular_locallyFinite] at hx ⊢ + exact ⟨hx.1, by linarith [hx.2]⟩ + have H : (diskCount triangularLattice (R - M) : ℝ≥0∞) * + (∑ a ∈ F, ENNReal.ofReal (g (‖a.val‖ ^ 2))) ≤ + ∑ x ∈ diskPoints triangularLattice R, + ∑ y ∈ (diskPoints triangularLattice R).erase x, + ENNReal.ofReal (g (‖x - y‖ ^ 2)) := by + calc + _ = ∑ x ∈ diskPoints triangularLattice (R - M), + (∑ a ∈ F, ENNReal.ofReal (g (‖a.val‖ ^ 2))) := by simp [diskCount] + _ ≤ ∑ x ∈ diskPoints triangularLattice (R - M), + ∑ y ∈ (diskPoints triangularLattice R).erase x, + ENNReal.ofReal (g (‖x - y‖ ^ 2)) := + Finset.sum_le_sum fun x hx => finite_lattice_row_ge g F M hM R x hx + _ ≤ _ := Finset.sum_le_sum_of_subset hsub + rw [mul_assoc] + apply mul_le_mul_of_nonneg_left H zero_le + +lemma lattice_energy_lower (g : ℝ → ℝ) : + latticeEnergy g ≤ energy g triangularLattice := by + apply ENNReal.summable.tsum_le_of_sum_le + intro F + let M : ℝ := ∑ a ∈ F, ‖a.val‖ + have hM0 : 0 ≤ M := Finset.sum_nonneg fun _ _ => norm_nonneg _ + have hM : ∀ a ∈ F, ‖a.val‖ ≤ M := fun a ha => + Finset.single_le_sum (fun i _ => norm_nonneg i.val) ha + have H := ENNReal.Tendsto.mul_const (lattice_interior_count_ratio_ennreal M) + (b := ∑ a ∈ F, ENNReal.ofReal (g (‖a.val‖ ^ 2))) (Or.inl one_ne_zero) + simp only [one_mul] at H + rw [← H.liminf_eq] + exact liminf_le_liminf (Filter.Eventually.of_forall + (finite_lattice_disk_energy_ge g F M hM0 hM)) + +lemma lattice_energy_eq (g : ℝ → ℝ) : + latticeEnergy g = energy g triangularLattice := + le_antisymm (lattice_energy_lower g) (lattice_energy_upper g) + +end TriangularUniversal + +open scoped BigOperators Topology NNReal ENNReal Polynomial +open Filter Finset MeasureTheory +noncomputable section +namespace TriangularUniversal.PositiveMixture + +def difference (m : ℕ → ℝ) : ℕ → ℕ → ℝ + | 0, j => m j + | r+1, j => difference m r j - difference m r (j+1) + +def momentFunctional (m : ℕ → ℝ) : ℝ[X] →ₗ[ℝ] ℝ := + Polynomial.lsum fun j => LinearMap.mulRight ℝ (m j) + +@[simp] lemma moment_monomial (m : ℕ → ℝ) (j : ℕ) (a : ℝ) : + momentFunctional m (Polynomial.monomial j a) = a*m j := by + simp [momentFunctional, Polynomial.lsum, Polynomial.sum_monomial_index] + +@[simp] lemma moment_pow (m : ℕ → ℝ) (j : ℕ) : + momentFunctional m (Polynomial.X^j) = m j := by + rw [← Polynomial.monomial_one_right_eq_X_pow, moment_monomial, one_mul] + +lemma moment_difference (m : ℕ → ℝ) (r j : ℕ) : + momentFunctional m (Polynomial.X^j*(1-Polynomial.X)^r) = difference m r j := by + induction r generalizing j with + | zero => simp [difference] + | succ r ih => + rw [show (Polynomial.X^j*(1-Polynomial.X)^(r+1) : ℝ[X]) = + Polynomial.X^j*(1-Polynomial.X)^r-Polynomial.X^(j+1)*(1-Polynomial.X)^r by ring] + rw [map_sub, ih, ih, difference] + +@[simp] lemma moment_bernstein (m : ℕ → ℝ) (n p : ℕ) : + momentFunctional m (bernsteinPolynomial ℝ n p) = + (n.choose p : ℝ)*difference m (n-p) p := by + rw [bernsteinPolynomial, mul_assoc] + rw [show (n.choose p : ℝ[X]) = Polynomial.C (n.choose p : ℝ) by simp] + rw [← Polynomial.smul_eq_C_mul, map_smul, moment_difference] + rfl + +def weight (m : ℕ → ℝ) (n p : ℕ) : ℝ := + (n.choose p : ℝ)*difference m (n-p) p + +lemma weight_nonneg {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) (n p : ℕ) : + 0 ≤ weight m n p := mul_nonneg (Nat.cast_nonneg _) (hm _ _) + +lemma weight_sum (m : ℕ → ℝ) (n : ℕ) : + ∑ p ∈ range (n+1), weight m n p = m 0 := by + simp_rw [weight, ← moment_bernstein] + rw [← map_sum, bernsteinPolynomial.sum] + simpa using moment_pow m 0 + +def bernsteinBasis (n d : ℕ) (x : ℝ) : ℝ := + (n.choose d : ℝ) * x^d * (1-x)^(n-d) + +lemma bernsteinBasis_sum (n : ℕ) (x : ℝ) : + ∑ d ∈ range (n+1), bernsteinBasis n d x = 1 := by + calc + _ = (x+(1-x))^n := by + rw [add_pow] + apply Finset.sum_congr rfl + intro d hd + dsimp [bernsteinBasis] + ring + _ = 1 := by simp + +lemma bernsteinBasis_nonneg (n d : ℕ) {x : ℝ} (hx : x ∈ Set.Icc 0 1) : + 0 ≤ bernsteinBasis n d x := by + exact mul_nonneg (mul_nonneg (Nat.cast_nonneg _) (pow_nonneg hx.1 _)) + (pow_nonneg (by linarith [hx.2]) _) + +lemma choose_ratio (n r d : ℕ) (hr : r ≤ n) (hd : r ≤ d) : + (d.choose r : ℝ)/(n.choose r : ℝ)*(n.choose d : ℝ) = + ((n-r).choose (d-r) : ℝ) := by + have h : (n.choose d : ℝ)*(d.choose r : ℝ) = + (n.choose r : ℝ)*((n-r).choose (d-r) : ℝ) := by + exact_mod_cast Nat.choose_mul (n:=n) hd + have hn : (n.choose r : ℝ) ≠ 0 := by exact_mod_cast Nat.choose_ne_zero hr + rw [div_mul_eq_mul_div] + apply (div_eq_iff hn).mpr + convert h using 1 <;> ring + +lemma bernstein_monomial (n r : ℕ) (hr : r ≤ n) (x : ℝ) : + ∑ d ∈ range (n+1), ((d.choose r : ℝ)/(n.choose r : ℝ))*bernsteinBasis n d x = x^r := by + let f : ℕ → ℝ := fun d => ((d.choose r : ℝ)/(n.choose r : ℝ))*bernsteinBasis n d x + have hlo : ∑ d ∈ range r, f d = 0 := by + apply Finset.sum_eq_zero + intro d hd + simp [f, Nat.choose_eq_zero_of_lt (Finset.mem_range.mp hd)] + have heq : ∀ d, r ≤ d → + f d = x^r * ((n-r).choose (d-r) : ℝ)*x^(d-r)*(1-x)^((n-r)-(d-r)) := by + intro d hd + dsimp [f,bernsteinBasis] + rw [show n-d = (n-r)-(d-r) by omega] + rw [show d = r+(d-r) by omega, pow_add] + have hratio := choose_ratio n r d hr hd + rw [show r+(d-r)=d by omega] + calc + _ = (((d.choose r : ℝ)/(n.choose r : ℝ))*(n.choose d : ℝ))* + x^r*x^(d-r)*(1-x)^((n-r)-(d-r)) := by ring + _ = _ := by rw [hratio]; ring + change (∑ d ∈ range (n+1), f d) = _ + rw [← Finset.sum_range_add_sum_Ico f (show r ≤ n+1 by omega), hlo, zero_add] + rw [Finset.sum_Ico_eq_sum_range] + have he : n+1-r = n-r+1 := by omega + rw [he] + calc + _ = x^r * ∑ j ∈ range (n-r+1), bernsteinBasis (n-r) j x := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j hj + rw [heq _ (by omega)] + simp only [Nat.add_sub_cancel_left, bernsteinBasis] + ring + _ = x^r := by rw [bernsteinBasis_sum, mul_one] + +lemma weighted_binomial_moment (m : ℕ → ℝ) (n j : ℕ) (hjn : j ≤ n) : + ∑ p ∈ range (n+1), ((p.choose j : ℝ)/(n.choose j : ℝ))*weight m n p = m j := by + have hp : (∑ p ∈ range (n+1), ((p.choose j : ℝ)/(n.choose j : ℝ)) • + bernsteinPolynomial ℝ n p) = Polynomial.X^j := by + apply Polynomial.funext + intro x + simpa [Polynomial.eval_finsetSum, Polynomial.eval_smul, bernsteinPolynomial, + bernsteinBasis] using bernstein_monomial n j hjn x + apply_fun momentFunctional m at hp + simpa [weight] using hp + +abbrev I := Set.Icc (0 : ℝ) 1 + +def coordinate : C(I, ℝ) := ⟨Subtype.val, continuous_subtype_val⟩ + +def falling (n j : ℕ) : C(I, ℝ) := + ∏ r ∈ range j, ((1-(r : ℝ)/n)⁻¹) • (coordinate - ((r : ℝ)/n) • 1) + +lemma falling_tendsto (j : ℕ) : + Tendsto (fun n => falling n j) atTop (𝓝 (coordinate^j)) := by + have hf (r : ℕ) : Tendsto (fun n : ℕ => + ((1-(r : ℝ)/n)⁻¹) • (coordinate - ((r : ℝ)/n) • (1 : C(I,ℝ)))) atTop + (𝓝 coordinate) := by + have h : Tendsto (fun n : ℕ => (r : ℝ)/n) atTop (𝓝 0) := + tendsto_const_nhds.div_atTop tendsto_natCast_atTop_atTop + have h₁ := (tendsto_const_nhds.sub h).inv₀ (by norm_num : (1 : ℝ)-0 ≠ 0) + simpa using h₁.smul (tendsto_const_nhds.sub (h.smul_const (1 : C(I,ℝ)))) + simpa [falling] using tendsto_finsetProd (range j) (fun _ _ => hf _) + +lemma falling_grid (n p j : ℕ) (hn : 0 < n) (hjn : j ≤ n) (hp : p ≤ n) : + falling n j ⟨(p : ℝ)/n, div_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _), + (div_le_one (by positivity)).mpr (by exact_mod_cast hp)⟩ = + (p.choose j : ℝ)/(n.choose j : ℝ) := by + have hn0 : (n : ℝ) ≠ 0 := by positivity + simp only [falling, ContinuousMap.prod_apply, ContinuousMap.smul_apply, + ContinuousMap.sub_apply, coordinate, ContinuousMap.coe_mk, ContinuousMap.one_apply, + smul_eq_mul, mul_one] + calc + _ = ∏ r ∈ range j, ((p : ℝ)-r)/((n : ℝ)-r) := by + apply Finset.prod_congr rfl + intro r hr + have hnr : (n : ℝ)-r ≠ 0 := by + have : r < n := lt_of_lt_of_le (mem_range.mp hr) hjn + exact sub_ne_zero.mpr (by exact_mod_cast this.ne') + field_simp + _ = (∏ r ∈ range j, ((p : ℝ)-r))/(∏ r ∈ range j, ((n : ℝ)-r)) := by + rw [Finset.prod_div_distrib] + _ = (p.descFactorial j : ℝ)/(n.descFactorial j : ℝ) := by + rw [← descPochhammer_eval_eq_prod_range, + ← descPochhammer_eval_eq_prod_range, + descPochhammer_eval_eq_descFactorial, + descPochhammer_eval_eq_descFactorial] + _ = _ := by + rw [Nat.descFactorial_eq_factorial_mul_choose, Nat.descFactorial_eq_factorial_mul_choose] + push_cast + exact mul_div_mul_left _ _ (by positivity : (j.factorial : ℝ) ≠ 0) + +def gridMeasure (m : ℕ → ℝ) (n : ℕ) : Measure I := + ∑ p : Fin (n+1), ENNReal.ofReal (weight m n p) • Measure.dirac (bernstein.z p) + +instance gridMeasure_finite (m : ℕ → ℝ) (n : ℕ) : IsFiniteMeasure (gridMeasure m n) := by + constructor + simp only [gridMeasure, Measure.finsetSum_apply, Measure.smul_apply, + Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] + exact ENNReal.sum_lt_top.mpr (fun _ _ => ENNReal.ofReal_lt_top) + +def gridFiniteMeasure (m : ℕ → ℝ) (n : ℕ) : FiniteMeasure I := + ⟨gridMeasure m n, inferInstance⟩ + +lemma gridMeasure_mass {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) (n : ℕ) : + gridMeasure m n Set.univ = ENNReal.ofReal (m 0) := by + simp only [gridMeasure, Measure.finsetSum_apply, Measure.smul_apply, Measure.dirac_apply_of_mem + (Set.mem_univ _), smul_eq_mul, mul_one] + rw [← ENNReal.ofReal_sum_of_nonneg (s := Finset.univ) + (f := fun p : Fin (n+1) => weight m n p) (fun p _ => weight_nonneg hm n p)] + congr 1 + simpa [Finset.sum_range] using weight_sum m n + +lemma gridFiniteMeasure_mass {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) (n : ℕ) : + (gridFiniteMeasure m n).mass = (m 0).toNNReal := by + apply ENNReal.coe_injective + rw [FiniteMeasure.ennreal_mass] + change gridMeasure m n _ = _ + rw [gridMeasure_mass hm] + rfl + +lemma integral_grid {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) (n : ℕ) + (f : C(I,ℝ)) : + ∫ x, f x ∂gridMeasure m n = ∑ p : Fin (n+1), weight m n p * f (bernstein.z p) := by + rw [gridMeasure, integral_finsetSum_measure] + · apply Finset.sum_congr rfl + intro p hp + simp [ENNReal.toReal_ofReal (weight_nonneg hm n p)] + · intro p hp + exact (integrable_dirac (by finiteness)).smul_measure ENNReal.ofReal_ne_top + +lemma integral_falling {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) + (n j : ℕ) (hn : 0 < n) (hjn : j ≤ n) : + ∫ x, falling n j x ∂gridMeasure m n = m j := by + rw [integral_grid hm] + have he (p : Fin (n+1)) : falling n j (bernstein.z p) = + (p.val.choose j : ℝ)/(n.choose j : ℝ) := falling_grid n p j hn hjn p.is_le + simp_rw [he, mul_comm (weight m n _) ] + simpa [Finset.sum_range] using weighted_binomial_moment m n j hjn + +lemma grid_moments_tendsto {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) (j : ℕ) : + Tendsto (fun n => ∫ x : I, (x : ℝ)^j ∂gridMeasure m n) atTop (𝓝 (m j)) := by + have herr : Tendsto (fun n => ‖coordinate^j-falling n j‖*(m 0)) atTop (𝓝 0) := by + simpa using ((tendsto_const_nhds (x := coordinate^j)).sub (falling_tendsto j)).norm.mul_const (m 0) + apply tendsto_iff_norm_sub_tendsto_zero.mpr + apply squeeze_zero' _ _ herr + · filter_upwards [] with n using norm_nonneg _ + · filter_upwards [eventually_gt_atTop 0, eventually_ge_atTop j] with n hn hjn + rw [← integral_falling hm n j hn hjn] + rw [← integral_sub (by exact (coordinate^j).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + ((falling n j).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + have h := norm_integral_le_of_norm_le_const (μ := gridMeasure m n) + (C := ‖coordinate^j-falling n j‖) + (Filter.Eventually.of_forall (fun x => (coordinate^j-falling n j).norm_coe_le_norm x)) + simpa [coordinate, Measure.real, gridMeasure_mass hm, ENNReal.toReal_ofReal (show 0 ≤ m 0 from hm 0 0)] using h + +theorem hausdorff {m : ℕ → ℝ} (hm : ∀ r j, 0 ≤ difference m r j) : + ∃ μ : FiniteMeasure I, (μ.mass : ℝ) = m 0 ∧ + ∀ j : ℕ, (∫ x : I, (x : ℝ)^j ∂(μ : Measure I)) = m j := by + have h0 : 0 ≤ m 0 := hm 0 0 + obtain ⟨μ, hμ, hlim⟩ := + (isCompact_setOfPred_finiteMeasure_eq_of_compactSpace I (m 0).toNNReal).exists_mapClusterPt + (Filter.le_principal_iff.mpr + (show ∀ᶠ ν in Filter.map (gridFiniteMeasure m) atTop, ν.mass = (m 0).toNNReal from + Filter.eventually_map.mpr (Filter.Eventually.of_forall (fun n => gridFiniteMeasure_mass hm n)))) + refine ⟨μ, by simpa [Real.toNNReal_of_nonneg h0] using congrArg NNReal.toReal hμ, fun j => ?_⟩ + have hw := FiniteMeasure.tendsto_iff_forall_integral_tendsto.mp + (show Tendsto (id : FiniteMeasure I → FiniteMeasure I) (𝓝 μ) (𝓝 μ) from tendsto_id) (ContinuousMap.equivBoundedOfCompact I ℝ (coordinate^j)) + have hc := hlim.tendsto_comp hw + have hd := grid_moments_tendsto hm j + apply eq_of_nhds_neBot + exact (show NeBot (𝓝 (∫ x : I, (x : ℝ)^j ∂(μ : Measure I)) ⊓ Filter.map (fun n => ∫ x : I, (x : ℝ)^j ∂gridMeasure m n) atTop) from hc).mono (inf_le_inf_left _ hd) + +def CM (g : ℝ → ℝ) : Prop := + ContDiffOn ℝ (⊤ : ℕ∞) g (Set.Ioi 0) ∧ + ∀ r : ℕ, ∀ t : ℝ, 0 < t → 0 ≤ (-1 : ℝ)^r * iteratedDeriv r g t + +lemma CM.deriv_differentiableOn {g : ℝ → ℝ} (hg : CM g) (r : ℕ) : + DifferentiableOn ℝ (iteratedDeriv r g) (Set.Ioi 0) := by + have hd := hg.1.differentiableOn_iteratedDerivWithin (m := r) + (ENat.natCast_lt_of_coe_top_le_withTop le_rfl r) isOpen_Ioi.uniqueDiffOn + exact hd.congr (fun x hx => (iteratedDerivWithin_of_isOpen isOpen_Ioi hx).symm) + +lemma CM.signed_antitone {g : ℝ → ℝ} (hg : CM g) (r : ℕ) : + AntitoneOn (fun x => (-1 : ℝ)^r * iteratedDeriv r g x) (Set.Ioi 0) := by + have hd := (hg.deriv_differentiableOn r).const_mul ((-1 : ℝ)^r) + apply antitoneOn_of_deriv_nonpos (convex_Ioi _) hd.continuousOn + · simpa only [interior_Ioi] using hd + · intro x hx + have hx' : 0 < x := by simpa only [interior_Ioi, Set.mem_Ioi] using hx + have hdx := (hg.deriv_differentiableOn r x hx').differentiableAt (Ioi_mem_nhds hx') + rw [deriv_const_mul_field, ← iteratedDeriv_succ] + have hs := hg.2 (r+1) x hx' + simp only [pow_succ, mul_neg_one] at hs + linarith + +lemma CM.shift {g : ℝ → ℝ} (hg : CM g) {d : ℝ} (hd : 0 ≤ d) : + CM (fun x => g (x+d)) := by + constructor + · exact hg.1.comp ((contDiff_id.add contDiff_const).contDiffOn) (fun x hx => add_pos_of_pos_of_nonneg hx hd) + · intro r x hx + rw [iteratedDeriv_comp_add_const] + exact hg.2 r _ (by linarith) + +lemma CM.sub_shift {g : ℝ → ℝ} (hg : CM g) {d : ℝ} (hd : 0 ≤ d) : + CM (fun x => g x-g (x+d)) := by + refine ⟨hg.1.sub (hg.shift hd).1, ?_⟩ + intro r x hx + have hgx : ContDiffAt ℝ r g x := (hg.1.contDiffAt (Ioi_mem_nhds hx)).of_le + (ENat.natCast_le_of_coe_top_le_withTop le_rfl r) + have hgdx : ContDiffAt ℝ r (fun x => g (x+d)) x := + ((hg.shift hd).1.contDiffAt (Ioi_mem_nhds hx)).of_le + (ENat.natCast_le_of_coe_top_le_withTop le_rfl r) + rw [iteratedDeriv_fun_sub hgx hgdx, iteratedDeriv_comp_add_const, mul_sub] + exact sub_nonneg.mpr (hg.signed_antitone r hx (add_pos_of_pos_of_nonneg hx hd) (le_add_of_nonneg_right hd)) + +lemma difference_shift (m : ℕ → ℝ) (r j : ℕ) : + difference (fun k => m k-m (k+1)) r j = difference m (r+1) j := by + induction r generalizing j with + | zero => rfl + | succ r ih => simp only [difference, ih] + +lemma CM.sample_difference {g : ℝ → ℝ} (hg : CM g) {ε d : ℝ} + (hε : 0 < ε) (hd : 0 ≤ d) (r j : ℕ) : + 0 ≤ difference (fun j : ℕ => g (ε+j*d)) r j := by + induction r generalizing g j with + | zero => simpa [difference] using hg.2 0 (ε+j*d) (by positivity) + | succ r ih => + have h := ih (hg.sub_shift hd) j + have he : (fun j : ℕ => g (ε+j*d)-g (ε+j*d+d)) = + (fun j : ℕ => g (ε+j*d)-g (ε+((j+1 : ℕ) : ℝ)*d)) := by + funext j + congr 2; push_cast; ring + rw [he, difference_shift] at h + exact h + +abbrev Positive := {t : ℝ // 0 < t} + +def powerTest (t : Positive) : C(I, ℝ) := + ⟨fun v => (v : ℝ) ^ (t : ℝ), (Real.continuous_rpow_const t.property.le).comp continuous_subtype_val⟩ + +lemma continuous_powerTest : Continuous powerTest := by + apply ContinuousMap.continuous_of_continuous_uncurry + exact (continuous_subtype_val.comp continuous_snd).rpow + (continuous_subtype_val.comp continuous_fst) (fun p => Or.inr p.1.property) + +def unitPower (n : ℕ) : C(I, I) := + ⟨fun v => ⟨(v : ℝ)^n, ⟨pow_nonneg v.property.1 _, pow_le_one₀ v.property.1 v.property.2⟩⟩, + (continuous_subtype_val.pow n).subtype_mk _⟩ + +lemma mass_map_unitPower (μ : FiniteMeasure I) (n : ℕ) : + (μ.map (unitPower n)).mass = μ.mass := by + exact μ.map_apply (unitPower n).continuous.measurable MeasurableSet.univ + +lemma integral_power_map (μ : FiniteMeasure I) {n : ℕ} (hn : 0 < n) (j : ℕ) : + ∫ v : I, (v : ℝ) ^ ((j : ℝ)/n) ∂(μ.map (unitPower n) : Measure I) = + ∫ v : I, (v : ℝ)^j ∂(μ : Measure I) := by + rw [FiniteMeasure.toMeasure_map] + have hmap := integral_map (μ := (μ : Measure I)) (f := fun v : I => (v : ℝ)^((j : ℝ)/n)) + (unitPower n).continuous.measurable.aemeasurable + (((Real.continuous_rpow_const (by positivity : 0 ≤ (j : ℝ)/n)).comp continuous_subtype_val).aestronglyMeasurable) + rw [hmap] + congr 1 + funext v + change ((v : ℝ)^n) ^ ((j : ℝ)/n) = (v : ℝ)^j + rw [← Real.rpow_natCast, ← Real.rpow_mul v.property.1] + rw [mul_div_cancel₀ _ (by exact_mod_cast hn.ne' : (n : ℝ) ≠ 0), Real.rpow_natCast] + +def gridTime (t : ℝ) (n : ℕ) : ℝ := (⌊t*((n : ℝ)+1)⌋₊ + 1 : ℕ) / ((n : ℝ)+1) + +lemma gridTime_pos (t : ℝ) (n : ℕ) : 0 < gridTime t n := by + unfold gridTime + positivity + +lemma gridTime_tendsto {t : ℝ} (ht : 0 ≤ t) : Tendsto (gridTime t) atTop (𝓝 t) := by + have hn : Tendsto (fun n : ℕ => (n : ℝ)+1) atTop atTop := + tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop + have hf := (tendsto_nat_floor_mul_div_atTop ht).comp hn + have hi := tendsto_inv_atTop_zero.comp hn + convert hf.add hi using 1 + · funext n + simp [gridTime, add_div, one_div] + · simp + +theorem mixture_of_differences {F : ℝ → ℝ} + (hF : ContinuousOn F (Set.Ici 0)) + (hD : ∀ d : ℝ, 0 < d → ∀ r j : ℕ, + 0 ≤ difference (fun j : ℕ => F (j*d)) r j) : + ∃ ρ : FiniteMeasure I, (ρ.mass : ℝ) = F 0 ∧ + ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = F t := by + have h0 : 0 ≤ F 0 := by simpa [difference] using hD 1 zero_lt_one 0 0 + have hex (n : ℕ) := hausdorff (hD (1/((n : ℝ)+1)) (by positivity)) + choose η hηmass hηmoment using hex + let ρseq (n : ℕ) : FiniteMeasure I := (η n).map (unitPower (n+1)) + have hm (n : ℕ) : ((ρseq n).mass : ℝ) = F 0 := by + simpa [ρseq, mass_map_unitPower] using hηmass n + obtain ⟨ρ, hρ, hlim⟩ := + (isCompact_setOfPred_finiteMeasure_eq_of_compactSpace I (F 0).toNNReal).exists_mapClusterPt + (Filter.le_principal_iff.mpr + (show ∀ᶠ ν in Filter.map ρseq atTop, ν.mass = (F 0).toNNReal from + Filter.eventually_map.mpr (Filter.Eventually.of_forall (fun n => by + apply NNReal.eq + simpa [Real.toNNReal_of_nonneg h0] using hm n)))) + refine ⟨ρ, by simpa [Real.toNNReal_of_nonneg h0] using congrArg NNReal.toReal hρ, ?_⟩ + intro t ht + let tj (n : ℕ) : ℕ := ⌊t*((n : ℝ)+1)⌋₊+1 + let tn (n : ℕ) : Positive := ⟨gridTime t n, gridTime_pos t n⟩ + have he (n : ℕ) : ∫ v : I, (v : ℝ)^(gridTime t n) ∂(ρseq n : Measure I) = F (gridTime t n) := by + have h := integral_power_map (η n) (Nat.succ_pos n) (tj n) + have hh := hηmoment n (tj n) + simp only [div_eq_mul_inv] at h hh + simpa [ρseq, gridTime, tj, Nat.cast_add, Nat.cast_one, div_eq_mul_inv] using h.trans hh + have htest : Tendsto (fun n => powerTest (tn n)) atTop (𝓝 (powerTest ⟨t, ht⟩)) := + continuous_powerTest.tendsto _ |>.comp (tendsto_subtype_rng.mpr (gridTime_tendsto ht.le)) + have herr : Tendsto (fun n => ‖powerTest ⟨t, ht⟩ - powerTest (tn n)‖ * F 0) atTop (𝓝 0) := by + simpa using ((tendsto_const_nhds (x := powerTest ⟨t, ht⟩)).sub htest).norm.mul_const (F 0) + have hdiff : Tendsto (fun n => + (∫ v : I, (v : ℝ)^t ∂(ρseq n : Measure I)) - F (gridTime t n)) atTop (𝓝 0) := by + apply tendsto_zero_iff_norm_tendsto_zero.mpr + apply squeeze_zero (fun n => norm_nonneg _) _ herr + intro n + rw [← he n] + change ‖(∫ v, powerTest ⟨t, ht⟩ v ∂(ρseq n : Measure I)) - + (∫ v, powerTest (tn n) v ∂(ρseq n : Measure I))‖ ≤ _ + rw [← integral_sub + ((powerTest ⟨t, ht⟩).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + ((powerTest (tn n)).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + have hb := norm_integral_le_of_norm_le_const (μ := (ρseq n : Measure I)) + (C := ‖powerTest ⟨t, ht⟩ - powerTest (tn n)‖) + (Filter.Eventually.of_forall (fun v => (powerTest ⟨t, ht⟩ - powerTest (tn n)).norm_coe_le_norm v)) + simpa only [Measure.real, ← FiniteMeasure.ennreal_mass, ENNReal.coe_toReal, hm, ContinuousMap.sub_apply] using hb + have hFt : Tendsto (fun n => F (gridTime t n)) atTop (𝓝 (F t)) := + (hF.continuousAt (Ici_mem_nhds ht)).tendsto.comp (gridTime_tendsto ht.le) + have hd : Tendsto (fun n => ∫ v : I, (v : ℝ)^t ∂(ρseq n : Measure I)) atTop (𝓝 (F t)) := by + convert hdiff.add hFt using 1 <;> simp + have hw := FiniteMeasure.tendsto_iff_forall_integral_tendsto.mp + (show Tendsto (id : FiniteMeasure I → FiniteMeasure I) (𝓝 ρ) (𝓝 ρ) from tendsto_id) + (ContinuousMap.equivBoundedOfCompact I ℝ (powerTest ⟨t, ht⟩)) + have hc := hlim.tendsto_comp hw + apply eq_of_nhds_neBot + exact (show NeBot (𝓝 (∫ v : I, (v : ℝ)^t ∂(ρ : Measure I)) ⊓ + Filter.map (fun n => ∫ v : I, (v : ℝ)^t ∂(ρseq n : Measure I)) atTop) from hc).mono + (inf_le_inf_left _ hd) + +theorem CM.shifted_mixture {g : ℝ → ℝ} (hg : CM g) {ε : ℝ} (hε : 0 < ε) : + ∃ ρ : FiniteMeasure I, (ρ.mass : ℝ) = g ε ∧ + ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = g (ε+t) := by + have hc : ContinuousOn (fun t => g (ε+t)) (Set.Ici 0) := + hg.1.continuousOn.comp (continuous_const.add continuous_id).continuousOn + (fun t ht => add_pos_of_pos_of_nonneg hε ht) + have hd (d : ℝ) (hd : 0 < d) (r j : ℕ) : + 0 ≤ difference (fun j : ℕ => g (ε+j*d)) r j := + hg.sample_difference hε hd.le r j + simpa using mixture_of_differences hc hd + +end TriangularUniversal.PositiveMixture + +open MeasureTheory +namespace TriangularUniversal +open PositiveMixture + +def powerPotential (v : I) (t : ℝ) : ℝ := (v : ℝ)^t + +lemma powerPotential_continuous {t : ℝ} (ht : 0 ≤ t) : + Continuous (fun v : I => powerPotential v t) := + (Real.continuous_rpow_const ht).comp continuous_subtype_val + +lemma measurable_diskEnergy_power (C : Set Plane) (R : ℝ) : + Measurable (fun v : I => diskEnergy (powerPotential v) C R) := by + unfold diskEnergy + apply Measurable.const_mul + apply Finset.measurable_sum + intro x hx + apply Finset.measurable_sum + intro y hy + exact ENNReal.continuous_ofReal.measurable.comp (powerPotential_continuous (sq_nonneg _)).measurable + +lemma lintegral_power_eq (ρ : FiniteMeasure I) (F : ℝ → ℝ) + (hF : ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = F t) + {t : ℝ} (ht : 0 < t) : + ∫⁻ v : I, ENNReal.ofReal (powerPotential v t) ∂(ρ : Measure I) = ENNReal.ofReal (F t) := by + rw [← hF t ht] + exact (ofReal_integral_eq_lintegral_ofReal + ((powerTest ⟨t, ht⟩).continuous.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + (Filter.Eventually.of_forall (fun v => Real.rpow_nonneg v.property.1 _))).symm + +lemma lintegral_diskEnergy_power (ρ : FiniteMeasure I) (F : ℝ → ℝ) + (hF : ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = F t) + (C : Set Plane) (R : ℝ) : + ∫⁻ v : I, diskEnergy (powerPotential v) C R ∂(ρ : Measure I) = diskEnergy F C R := by + unfold diskEnergy + rw [lintegral_const_mul] + · congr 1 + rw [lintegral_finsetSum] + · apply Finset.sum_congr rfl + intro x hx + rw [lintegral_finsetSum] + · apply Finset.sum_congr rfl + intro y hy + exact lintegral_power_eq ρ F hF (sq_pos_of_pos (norm_pos_iff.mpr + (sub_ne_zero.mpr (Finset.ne_of_mem_erase hy).symm))) + · intro y hy + exact (ENNReal.continuous_ofReal.measurable.comp + (powerPotential_continuous (sq_nonneg _)).measurable) + · intro x hx + apply Finset.measurable_sum + intro y hy + exact ENNReal.continuous_ofReal.measurable.comp + (powerPotential_continuous (sq_nonneg _)).measurable + · apply Finset.measurable_sum + intro x hx + apply Finset.measurable_sum + intro y hy + exact ENNReal.continuous_ofReal.measurable.comp + (powerPotential_continuous (sq_nonneg _)).measurable + +lemma mixture_energy_lower (ρ : FiniteMeasure I) (F : ℝ → ℝ) + (hF : ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = F t) + (C : Set Plane) : + ∫⁻ v : I, energy (powerPotential v) C ∂(ρ : Measure I) ≤ energy F C := by + have h := lintegral_liminf_le (μ := (ρ : Measure I)) (u := (atTop : Filter ℝ)) + (fun R : ℝ => measurable_diskEnergy_power C R) + simpa only [energy, lintegral_diskEnergy_power ρ F hF C] using h + +instance nonzeroSite_countable : Countable NonzeroSite := + ((Set.countable_range triangularPoint).mono (fun _ h => h.1)).to_subtype + +lemma lintegral_latticeEnergy_power (ρ : FiniteMeasure I) (F : ℝ → ℝ) + (hF : ∀ t : ℝ, 0 < t → ∫ v : I, (v : ℝ)^t ∂(ρ : Measure I) = F t) : + ∫⁻ v : I, latticeEnergy (powerPotential v) ∂(ρ : Measure I) = latticeEnergy F := by + unfold latticeEnergy + rw [lintegral_tsum] + · apply tsum_congr + intro a + exact lintegral_power_eq ρ F hF (sq_pos_of_pos (norm_pos_iff.mpr a.property.2)) + · intro a + exact (ENNReal.continuous_ofReal.measurable.comp + (powerPotential_continuous (sq_nonneg _)).measurable).aemeasurable + +theorem shifted_mixture_energy (g : ℝ → ℝ) (hg : AdmissiblePotential g) + {ε : ℝ} (hε : 0 < ε) (C : Set Plane) : + ∃ ρ : FiniteMeasure I, (ρ.mass : ℝ) = g ε ∧ + (∫⁻ v : I, latticeEnergy (powerPotential v) ∂(ρ : Measure I)) = + latticeEnergy (fun t => g (ε+t)) ∧ + (∫⁻ v : I, energy (powerPotential v) C ∂(ρ : Measure I)) ≤ + energy (fun t => g (ε+t)) C := by + obtain ⟨ρ, hm, hρ⟩ := CM.shifted_mixture ⟨hg.1, hg.2.2⟩ hε + exact ⟨ρ, hm, lintegral_latticeEnergy_power ρ _ hρ, mixture_energy_lower ρ _ hρ C⟩ +end TriangularUniversal + +namespace TriangularUniversal +open PositiveMixture + +lemma potential_antitone {g : ℝ → ℝ} (hg : AdmissiblePotential g) : + AntitoneOn g (Set.Ioi 0) := by + simpa using (CM.signed_antitone ⟨hg.1, hg.2.2⟩ 0) + +lemma diskEnergy_mono {f g : ℝ → ℝ} (hfg : ∀ t, 0 < t → f t ≤ g t) + (C : Set Plane) (R : ℝ) : diskEnergy f C R ≤ diskEnergy g C R := by + unfold diskEnergy + gcongr with x hx y hy + exact hfg _ (sq_pos_of_pos (norm_pos_iff.mpr + (sub_ne_zero.mpr (Finset.ne_of_mem_erase hy).symm))) + +lemma energy_mono {f g : ℝ → ℝ} (hfg : ∀ t, 0 < t → f t ≤ g t) (C : Set Plane) : + energy f C ≤ energy g C := + liminf_le_liminf (Filter.Eventually.of_forall (diskEnergy_mono hfg C)) + +lemma latticeEnergy_mono {f g : ℝ → ℝ} (hfg : ∀ t, 0 < t → f t ≤ g t) : + latticeEnergy f ≤ latticeEnergy g := by + apply ENNReal.tsum_le_tsum + intro a + exact ENNReal.ofReal_le_ofReal (hfg _ (sq_pos_of_pos (norm_pos_iff.mpr a.property.2))) + +lemma shifted_energy_le {g : ℝ → ℝ} (hg : AdmissiblePotential g) + {ε : ℝ} (hε : 0 ≤ ε) (C : Set Plane) : + energy (fun t => g (ε+t)) C ≤ energy g C := by + apply energy_mono + intro t ht + exact potential_antitone hg ht (add_pos_of_nonneg_of_pos hε ht) (le_add_of_nonneg_left hε) + +lemma latticeEnergy_shift_iSup {g : ℝ → ℝ} (hg : AdmissiblePotential g) : + latticeEnergy g = ⨆ n : ℕ, latticeEnergy (fun t => g (1/((n:ℝ)+1)+t)) := by + apply le_antisymm + · apply ENNReal.summable.tsum_le_of_sum_le + intro F + have hc (a : NonzeroSite) : + Tendsto (fun n : ℕ => ENNReal.ofReal (g (1/((n:ℝ)+1)+‖a.val‖^2))) atTop + (𝓝 (ENNReal.ofReal (g (‖a.val‖^2)))) := by + have ht : 0 < ‖a.val‖^2 := sq_pos_of_pos (norm_pos_iff.mpr a.property.2) + have hg' := hg.1.continuousOn.continuousAt (IsOpen.mem_nhds isOpen_Ioi ht) + apply ENNReal.continuous_ofReal.continuousAt.tendsto.comp + apply hg'.tendsto.comp + simpa using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).add_const (‖a.val‖^2) + have hf := tendsto_finsetSum F (fun a _ => hc a) + apply le_of_tendsto hf + apply Filter.Eventually.of_forall + intro n + exact (ENNReal.sum_le_tsum F).trans (le_iSup (fun n : ℕ => + latticeEnergy (fun t => g (1/((n:ℝ)+1)+t))) n) + · apply iSup_le + intro n + apply latticeEnergy_mono + intro t ht + have hε : 0 < 1/((n:ℝ)+1) := by positivity + exact potential_antitone hg ht (add_pos hε ht) (le_add_of_nonneg_left hε.le) + +end TriangularUniversal +end +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/PairPoisson.lean b/lean/OAI/Analysis/Triangular/Energy/PairPoisson.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c8520bbb54cbaba75e33b00c38334702e4ea87a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/PairPoisson.lean @@ -0,0 +1,65 @@ +import OAI.Analysis.Triangular.Energy.LatticePoisson + +namespace OAI + +noncomputable section +open scoped BigOperators FourierTransform SchwartzMap +open Complex +namespace AtomicTriangular.Construction +lemma inputComplex_spectral_atoms (a : InputCoefficients) (x : Plane) : + inputComplex a x=tailSpectral a (atomFunction h x)+finiteSpectral a (atomFunction H x) := by + simp only [inputComplex_spectral,atomFunction,map_smul,smul_eq_mul] +lemma outputComplex_spectral_atoms (a : InputCoefficients) (x : Plane) : + outputComplex a x=tailSpectral a (dualAtomFunction 0 x)+finiteSpectral a (dualAtomFunction 1 x) := by + simp only [dualAtomFunction,map_smul,smul_eq_mul,outputComplex,transformedInput,mul_add] + rfl +lemma inputComplex_lattice_summable (a : InputCoefficients) : + Summable (fun v : ℤ × ℤ => inputComplex a (AtomicTriangular.triangularPoint v)) := by + simp_rw [inputComplex_spectral_atoms] + exact ((tailSpectral a).summable (atom_lattice_summable h_pos)).add + ((finiteSpectral a).summable (atom_lattice_summable H_pos)) +lemma outputComplex_lattice_summable (a : InputCoefficients) : + Summable (fun v : ℤ × ℤ => outputComplex a (AtomicTriangular.triangularPoint v)) := by + simp_rw [outputComplex_spectral_atoms] + exact ((tailSpectral a).summable (dualAtom_lattice_summable 0)).add + ((finiteSpectral a).summable (dualAtom_lattice_summable 1)) +lemma input_output_lattice_poisson (a : InputCoefficients) : + (∑' v : ℤ × ℤ, inputComplex a (AtomicTriangular.triangularPoint v))= + ∑' v : ℤ × ℤ, outputComplex a (AtomicTriangular.triangularPoint v) := by + simp_rw [inputComplex_spectral_atoms,outputComplex_spectral_atoms] + rw [((tailSpectral a).summable (atom_lattice_summable h_pos)).tsum_add + ((finiteSpectral a).summable (atom_lattice_summable H_pos)), + ((tailSpectral a).summable (dualAtom_lattice_summable 0)).tsum_add + ((finiteSpectral a).summable (dualAtom_lattice_summable 1)), + ←(tailSpectral a).map_tsum (atom_lattice_summable h_pos), + ←(finiteSpectral a).map_tsum (atom_lattice_summable H_pos), + ←(tailSpectral a).map_tsum (dualAtom_lattice_summable 0), + ←(finiteSpectral a).map_tsum (dualAtom_lattice_summable 1)] + change tailSpectral a (∑' v : ℤ × ℤ, atomFunction (damping 0) (AtomicTriangular.triangularPoint v))+ + finiteSpectral a (∑' v : ℤ × ℤ, atomFunction (damping 1) (AtomicTriangular.triangularPoint v))=_ + rw [atom_lattice_poisson,atom_lattice_poisson] +lemma pairComplex_lattice_summable (a₁ a₂ : InputCoefficients) : + Summable (fun v : ℤ × ℤ => pairComplex a₁ a₂ (AtomicTriangular.triangularPoint v)) := + (inputComplex_lattice_summable a₁).add (outputComplex_lattice_summable a₂) +lemma pairComplex_lattice_poisson (a₁ a₂ : InputCoefficients) : + (∑' v : ℤ × ℤ, pairComplex a₁ a₂ (AtomicTriangular.triangularPoint v))= + ∑' v : ℤ × ℤ, pairComplex a₂ a₁ (AtomicTriangular.triangularPoint v) := by + simp only [pairComplex,Pi.add_apply] + rw [(inputComplex_lattice_summable a₁).tsum_add (outputComplex_lattice_summable a₂), + (inputComplex_lattice_summable a₂).tsum_add (outputComplex_lattice_summable a₁), + input_output_lattice_poisson,input_output_lattice_poisson,add_comm] +lemma pairSchwartz_lattice_summable (a₁ a₂ : InputCoefficients) : + Summable (fun v : ℤ × ℤ => pairSchwartz a₁ a₂ (AtomicTriangular.triangularPoint v)) := by + simpa only [pairSchwartz_apply,Complex.reCLM_apply] using Complex.reCLM.summable (pairComplex_lattice_summable a₁ a₂) +lemma pairSchwartz_lattice_poisson (a₁ a₂ : InputCoefficients) : + (∑' v : ℤ × ℤ, pairSchwartz a₁ a₂ (AtomicTriangular.triangularPoint v))= + ∑' v : ℤ × ℤ, pairSchwartz a₂ a₁ (AtomicTriangular.triangularPoint v) := by + simp only [pairSchwartz_apply] + change (∑' v : ℤ × ℤ, Complex.reCLM (pairComplex a₁ a₂ (AtomicTriangular.triangularPoint v)))= + ∑' v : ℤ × ℤ, Complex.reCLM (pairComplex a₂ a₁ (AtomicTriangular.triangularPoint v)) + rw [←Complex.reCLM.map_tsum (pairComplex_lattice_summable a₁ a₂), + ←Complex.reCLM.map_tsum (pairComplex_lattice_summable a₂ a₁),pairComplex_lattice_poisson] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Potentials.lean b/lean/OAI/Analysis/Triangular/Energy/Potentials.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d88de312caac23fe1432513586e825c204bdcc4 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Potentials.lean @@ -0,0 +1,115 @@ +import OAI.Analysis.Triangular.Energy.Density +import OAI.Analysis.Triangular.Energy.Mixtures + +namespace OAI + +noncomputable section +open scoped BigOperators Topology NNReal ENNReal +open Filter MeasureTheory +namespace TriangularUniversal +open PositiveMixture +/-- The shift/Fatou/Tonelli assembly applies to the exact extended ordered-pair +energy. It does not presume finite lattice energy or spacing of a competitor. -/ +lemma universal_from_power_bounds (C : Set Plane) + (hpower : ∀ v : I, latticeEnergy (powerPotential v) ≤ energy (powerPotential v) C) + {g : ℝ → ℝ} (hg : AdmissiblePotential g) : latticeEnergy g ≤ energy g C := by + rw [latticeEnergy_shift_iSup hg] + apply iSup_le + intro n + have hε : 0<(1:ℝ)/(n+1) := by positivity + obtain ⟨ρ,_,he,hl⟩ := shifted_mixture_energy g hg hε C + rw [← he] + apply (lintegral_mono (fun v => hpower v)).trans + exact hl.trans (shifted_energy_le hg hε.le C) +end TriangularUniversal +end + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal +open Filter +namespace TriangularUniversal +lemma diskEnergy_one {C : Set Plane} {R : ℝ} (hN : 0 1) C R=((diskCount C R-1:ℕ):ℝ≥0∞) := by + classical + have hs : (∑ x ∈ diskPoints C R, ∑ _y ∈ (diskPoints C R).erase x, (1:ℝ≥0∞))= + (diskCount C R:ℝ≥0∞)*((diskCount C R-1:ℕ):ℝ≥0∞) := by + calc + _=∑ _x ∈ diskPoints C R, ((diskCount C R-1:ℕ):ℝ≥0∞) := by + apply Finset.sum_congr rfl + intro x hx + simp only [Finset.sum_const,Finset.card_erase_of_mem hx,nsmul_eq_mul,mul_one,diskCount] + _=_ := by simp only [Finset.sum_const,nsmul_eq_mul,diskCount] + unfold diskEnergy + simp only [ENNReal.ofReal_one] + rw [hs,← mul_assoc,ENNReal.inv_mul_cancel (by exact_mod_cast hN.ne') (by simp),one_mul] +lemma count_sub_one_tendsto {C : Set Plane} (hD : DensityOne C) : + Tendsto (fun R : ℝ => ((diskCount C R-1:ℕ):ℝ)) atTop atTop := by + apply tendsto_atTop.2 + intro K + have hp := hD.eventually (lt_mem_nhds (show (1/2:ℝ)<1 by norm_num)) + filter_upwards [hp,eventually_ge_atTop (max (1:ℝ) (K+2)),density_count_eventually_pos hD] with R h hR hn + have hR1 : 1≤R := le_trans (le_max_left _ _) hR + have hRK : K+2≤R := le_trans (le_max_right _ _) hR + have hrp : 0 1) C=∞ := by + have ht := ENNReal.tendsto_ofReal_atTop.comp (count_sub_one_tendsto hD) + have he : (fun R : ℝ => diskEnergy (fun _ => 1) C R)=ᶠ[atTop] + (fun R : ℝ => ENNReal.ofReal ((diskCount C R-1:ℕ):ℝ)) := by + filter_upwards [density_count_eventually_pos hD] with R hR + rw [diskEnergy_one hR,ENNReal.ofReal_natCast] + exact (ht.congr' he.symm).liminf_eq +end TriangularUniversal +end + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal +open Filter MeasureTheory +namespace TriangularUniversal +def gaussPot (α s : ℝ) : ℝ := Real.exp (-Real.pi*α*s) +open PositiveMixture +lemma power_bounds_from_gaussians {C : Set Plane} (hD : DensityOne C) + (hgauss : ∀ α : ℝ, 0<α → latticeEnergy (gaussPot α)≤energy (gaussPot α) C) + (v : I) : latticeEnergy (powerPotential v)≤energy (powerPotential v) C := by + by_cases h0 : (v:ℝ)=0 + · have hl : latticeEnergy (powerPotential v)=0 := by + unfold latticeEnergy + apply ENNReal.tsum_eq_zero.mpr + intro x + have ht : 0<‖x.val‖^2 := sq_pos_of_pos (norm_pos_iff.mpr x.property.2) + simp only [powerPotential,h0,Real.zero_rpow ht.ne',ENNReal.ofReal_zero] + rw [hl] + exact zero_le + by_cases h1 : (v:ℝ)=1 + · have he : powerPotential v=(fun _ => (1:ℝ)) := by + funext t + simp only [powerPotential,h1,Real.one_rpow] + rw [he,energy_one hD] + exact le_top + have hv : 0<(v:ℝ) := lt_of_le_of_ne v.property.1 (Ne.symm h0) + have hv1 : (v:ℝ)<1 := lt_of_le_of_ne v.property.2 h1 + let α : ℝ := -Real.log (v:ℝ)/Real.pi + have hα : 0<α := div_pos (neg_pos.mpr (Real.log_neg hv hv1)) Real.pi_pos + have he : powerPotential v=gaussPot α := by + funext t + rw [powerPotential,Real.rpow_def_of_pos hv] + unfold gaussPot + congr 1 + dsimp [α] + field_simp + rw [he] + exact hgauss α hα +lemma universal_from_gaussian_bounds {C : Set Plane} (hD : DensityOne C) + (hgauss : ∀ α : ℝ, 0<α → latticeEnergy (gaussPot α)≤energy (gaussPot α) C) + {g : ℝ → ℝ} (hg : AdmissiblePotential g) : + latticeEnergy g≤energy g C ∧ latticeEnergy g=energy g triangularLattice := + ⟨universal_from_power_bounds C (power_bounds_from_gaussians hD hgauss) hg,lattice_energy_eq g⟩ +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Schwartz.lean b/lean/OAI/Analysis/Triangular/Energy/Schwartz.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ccf941be4a33afbbd5b326d1dde7e13aaf1e792 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Schwartz.lean @@ -0,0 +1,30 @@ +import OAI.Analysis.Triangular.Energy.Density +import OAI.Analysis.Triangular.Basic + +namespace OAI + +noncomputable section +open scoped FourierTransform SchwartzMap +open Complex MeasureTheory FourierTransform +namespace AtomicTriangular + +def complexSchwartz (f : 𝓢(Plane,ℝ)) : 𝓢(Plane,ℂ) := f.postcompCLM Complex.ofRealCLM +lemma complexSchwartz_apply (f : 𝓢(Plane,ℝ)) (x : Plane) : complexSchwartz f x=(f x:ℂ) := by + simp only [complexSchwartz,SchwartzMap.postcompCLM_apply,Complex.ofRealCLM_apply] +def schwartzLP (f : 𝓢(Plane,ℝ)) : TriangularUniversal.LPFunction where + toFun := complexSchwartz f + continuous := (complexSchwartz f).continuous + integrable := (complexSchwartz f).integrable + fourierIntegrable := (𝓕 (complexSchwartz f)).integrable + momentIntegrable := by simpa only [pow_one] using (complexSchwartz f).integrable_pow_mul volume 1 + bound := SchwartzMap.seminorm ℝ 0 0 (complexSchwartz f) + norm_bound := SchwartzMap.norm_le_seminorm ℝ (complexSchwartz f) +lemma schwartzLP_apply (f : 𝓢(Plane,ℝ)) (x : Plane) : schwartzLP f x=(f x:ℂ) := + complexSchwartz_apply f x +lemma schwartzLP_fourier (f : 𝓢(Plane,ℝ)) (w : Plane) : + 𝓕 (schwartzLP f : Plane → ℂ) w=realFourier f w := by + congr 1 +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Spectral.lean b/lean/OAI/Analysis/Triangular/Energy/Spectral.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c2070e345d6354b767ed269199cfe6a15b7884e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Spectral.lean @@ -0,0 +1,165 @@ +import OAI.Analysis.Triangular.Energy.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators Topology ENNReal NNReal RealInnerProductSpace FourierTransform +open Classical Filter MeasureTheory Complex ComplexConjugate FourierTransform +namespace TriangularUniversal +/- Necessary analytic transfer from §2. We use finite positive measures for the + comparison form; the eventual quadratic inequality also handles real signed + linear combinations, without imposing spacing on the configuration. -/ +def phase (w x : Plane) : ℂ := Complex.exp ((2 * Real.pi * ⟪w, x⟫ : ℝ) * I) +def pattern (μ : Measure Plane) (w : Plane) : ℂ := + charFun μ ((2 * Real.pi) • w) + +def kernelForm (f : Plane → ℂ) (μ ν : Measure Plane) : ℂ := + ∫ xy : Plane × Plane, f (xy.1 - xy.2) ∂(μ.prod ν) + +lemma phase_continuous : Continuous (fun wx : Plane × Plane => phase wx.1 wx.2) := by + unfold phase + fun_prop + +lemma phase_norm (w x : Plane) : ‖phase w x‖ = 1 := by + simp [phase, Complex.norm_exp] + +lemma phase_sub (w x y : Plane) : + phase w (x-y) = phase w x * conj (phase w y) := by + simp only [phase, inner_sub_right, Complex.ofReal_mul, Complex.ofReal_sub, + ← Complex.exp_conj, map_mul, Complex.conj_ofReal, Complex.conj_I, ← Complex.exp_add] + congr 1 + ring + +lemma pattern_eq (μ : Measure Plane) (w : Plane) : + pattern μ w = ∫ x, phase w x ∂μ := by + simp only [pattern, charFun_apply, phase, inner_smul_right] + congr 1 + funext x + rw [real_inner_comm x w] + +lemma pattern_continuous (μ : Measure Plane) [IsFiniteMeasure μ] : + Continuous (pattern μ) := by + unfold pattern + fun_prop + +lemma pattern_bound (μ : Measure Plane) (w : Plane) : + ‖pattern μ w‖ ≤ μ.real Set.univ := norm_charFun_le _ + +lemma spectral_integrable (h : Plane → ℂ) (hh : Integrable h) + (μ ν : Measure Plane) [IsFiniteMeasure μ] [IsFiniteMeasure ν] : + Integrable (fun w => h w * pattern μ w * conj (pattern ν w)) := by + exact (hh.mul_bdd (pattern_continuous μ).aestronglyMeasurable + (Eventually.of_forall (pattern_bound μ))).mul_bdd + ((pattern_continuous ν).star.aestronglyMeasurable) + (Eventually.of_forall fun w => by simpa using pattern_bound ν w) + +lemma integral_phase_sub (μ ν : Measure Plane) [IsFiniteMeasure μ] [IsFiniteMeasure ν] + (w : Plane) : + (∫ xy : Plane × Plane, phase w (xy.1 - xy.2) ∂(μ.prod ν)) = + pattern μ w * conj (pattern ν w) := by + simp_rw [phase_sub] + rw [integral_prod_mul (phase w) (fun y => conj (phase w y)), + integral_conj, ← pattern_eq, ← pattern_eq] + +lemma kernelForm_spectral (f : Plane → ℂ) (hc : Continuous f) + (hf : Integrable f) (hF : Integrable (𝓕 f)) + (μ ν : Measure Plane) [IsFiniteMeasure μ] [IsFiniteMeasure ν] : + kernelForm f μ ν = ∫ w, 𝓕 f w * pattern μ w * conj (pattern ν w) := by + have hm : AEStronglyMeasurable + (fun p : (Plane × Plane) × Plane => phase p.2 (p.1.1 - p.1.2) * 𝓕 f p.2) + ((μ.prod ν).prod volume) := by + apply AEStronglyMeasurable.mul + · exact (phase_continuous.comp (continuous_snd.prodMk + (continuous_fst.fst.sub continuous_fst.snd))).aestronglyMeasurable + · exact hF.aestronglyMeasurable.comp_snd + have hint : Integrable + (fun p : (Plane × Plane) × Plane => phase p.2 (p.1.1 - p.1.2) * 𝓕 f p.2) + ((μ.prod ν).prod volume) := by + apply (hF.norm.comp_snd (μ.prod ν)).mono' hm + exact Eventually.of_forall fun p => by simp [phase_norm] + have hp (x : Plane) : f x = ∫ w, phase w x * 𝓕 f w := by + calc + f x = 𝓕⁻ (𝓕 f) x := (congrFun (hc.fourierInv_fourier_eq hf hF) x).symm + _ = _ := by rw [Real.fourierInv_eq']; rfl + unfold kernelForm + simp_rw [hp] + rw [integral_integral_swap hint] + apply integral_congr_ae + exact Eventually.of_forall fun w => by + dsimp only + rw [integral_mul_const, integral_phase_sub] + ring + +lemma integral_reC {α : Type*} [MeasurableSpace α] {μ : Measure α} {f : α → ℂ} + (hf : Integrable f μ) : (∫ x, f x ∂μ).re = ∫ x, (f x).re ∂μ := by + exact (integral_re hf).symm + +lemma integral_sub_sub_add {α : Type*} [MeasurableSpace α] {μ : Measure α} + {A B C D : α → ℂ} (hA : Integrable A μ) (hB : Integrable B μ) + (hC : Integrable C μ) (hD : Integrable D μ) : + (∫ x, A x - B x - C x + D x ∂μ) = + (∫ x, A x ∂μ) - (∫ x, B x ∂μ) - (∫ x, C x ∂μ) + ∫ x, D x ∂μ := by + calc + _ = (∫ x, A x - B x - C x ∂μ) + ∫ x, D x ∂μ := integral_add ((hA.sub hB).sub hC) hD + _ = ((∫ x, A x - B x ∂μ) - ∫ x, C x ∂μ) + ∫ x, D x ∂μ := by + exact congrArg (fun z => z + ∫ x, D x ∂μ) (integral_sub (hA.sub hB) hC) + _ = _ := by rw [integral_sub hA hB] + +lemma spectral_re_nonneg (z p : ℂ) (hz : z.im = 0) (hn : 0 ≤ z.re) : + 0 ≤ (z * p * conj p).re := by + simp only [Complex.mul_re, Complex.mul_im, Complex.conj_re, Complex.conj_im, hz, + zero_mul, sub_zero] + nlinarith [sq_nonneg p.re, sq_nonneg p.im] + +lemma kernelForm_diag_re_nonneg (f : Plane → ℂ) (hc : Continuous f) + (hf : Integrable f) (hF : Integrable (𝓕 f)) + (hreal : ∀ w, (𝓕 f w).im = 0) (hpos : ∀ w, 0 ≤ (𝓕 f w).re) + (μ : Measure Plane) [IsFiniteMeasure μ] : 0 ≤ (kernelForm f μ μ).re := by + rw [kernelForm_spectral f hc hf hF, integral_reC (spectral_integrable _ hF μ μ)] + exact integral_nonneg fun w => spectral_re_nonneg _ _ (hreal w) (hpos w) + +lemma kernelForm_comparison (f : Plane → ℂ) (hc : Continuous f) + (hf : Integrable f) (hF : Integrable (𝓕 f)) + (hreal : ∀ w, (𝓕 f w).im = 0) (hpos : ∀ w, 0 ≤ (𝓕 f w).re) + (μ ν : Measure Plane) [IsFiniteMeasure μ] [IsFiniteMeasure ν] : + 2 * (kernelForm f μ ν).re - (kernelForm f ν ν).re ≤ (kernelForm f μ μ).re := by + have hsym : (kernelForm f ν μ).re = (kernelForm f μ ν).re := by + rw [kernelForm_spectral f hc hf hF, kernelForm_spectral f hc hf hF, + integral_reC (spectral_integrable _ hF ν μ), + integral_reC (spectral_integrable _ hF μ ν)] + apply integral_congr_ae + filter_upwards [] with w + simp only [Complex.mul_re, Complex.mul_im, Complex.conj_re, Complex.conj_im, + hreal w, zero_mul, sub_zero] + ring + have hn : 0 ≤ (kernelForm f μ μ - kernelForm f μ ν - kernelForm f ν μ + + kernelForm f ν ν).re := by + simp only [kernelForm_spectral f hc hf hF] + rw [← integral_sub_sub_add (spectral_integrable _ hF μ μ) (spectral_integrable _ hF μ ν) + (spectral_integrable _ hF ν μ) (spectral_integrable _ hF ν ν)] + have hh := integral_reC ((((spectral_integrable _ hF μ μ).sub (spectral_integrable _ hF μ ν)).sub + (spectral_integrable _ hF ν μ)).add (spectral_integrable _ hF ν ν)) + simp only [Pi.add_apply, Pi.sub_apply] at hh + rw [hh] + apply integral_nonneg + intro w + change (0 : ℝ) ≤ (𝓕 f w * pattern μ w * conj (pattern μ w) - + 𝓕 f w * pattern μ w * conj (pattern ν w) - + 𝓕 f w * pattern ν w * conj (pattern μ w) + + 𝓕 f w * pattern ν w * conj (pattern ν w)).re + have hp := spectral_re_nonneg (𝓕 f w) (pattern μ w - pattern ν w) (hreal w) (hpos w) + have he : 𝓕 f w * pattern μ w * conj (pattern μ w) - + 𝓕 f w * pattern μ w * conj (pattern ν w) - + 𝓕 f w * pattern ν w * conj (pattern μ w) + + 𝓕 f w * pattern ν w * conj (pattern ν w) = + 𝓕 f w * (pattern μ w - pattern ν w) * conj (pattern μ w - pattern ν w) := by + simp only [map_sub] + ring + rw [he] + exact hp + simp only [Complex.sub_re, Complex.add_re, hsym] at hn + linarith +end TriangularUniversal +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Theta.lean b/lean/OAI/Analysis/Triangular/Energy/Theta.lean new file mode 100644 index 0000000000000000000000000000000000000000..11be7cf835e18e244feb30edfd010a2d11002d93 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Theta.lean @@ -0,0 +1,189 @@ +import Mathlib.Analysis.SpecialFunctions.Gaussian.PoissonSummation +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Ring + +namespace OAI + +noncomputable section +open Filter Asymptotics +open scoped Topology +namespace TriangularUniversal.Theta + +lemma intGaussian_summable {a : ℝ} (ha : 0 < a) : + Summable (fun n : ℤ => Real.exp (-a * (n : ℝ)^2)) := by + have h := (isLittleO_exp_neg_mul_sq_cocompact + (show 0 < (a : ℂ).re from ha) (-2)).isBigO.comp_tendsto Int.tendsto_coe_cofinite + have H : Summable (fun n : ℤ => Complex.exp (-(a : ℂ) * (n : ℂ)^2)) := + summable_of_isBigO (Real.summable_abs_int_rpow (by norm_num : (1 : ℝ) < 2)) + (by simpa only [Function.comp_def, Complex.ofReal_intCast] using h) + simpa [Complex.norm_exp, pow_two, Complex.mul_re, Complex.mul_im] using H.norm + +lemma real_Q_ge (m n : ℝ) : (m^2+n^2)/2 ≤ m^2+m*n+n^2 := by nlinarith [sq_nonneg (m+n)] + +lemma triangular_summable {c : ℂ} (hc : 0 < c.re) : + Summable (fun p : ℤ × ℤ => Complex.exp (-Real.pi*c* + ((p.1:ℂ)^2+(p.1:ℂ)*p.2+(p.2:ℂ)^2))) := by + have hg := intGaussian_summable (div_pos (mul_pos Real.pi_pos hc) (by norm_num : (0:ℝ)<2)) + apply Summable.of_norm + refine (hg.mul_of_nonneg hg (fun _ => (Real.exp_pos _).le) + (fun _ => (Real.exp_pos _).le)).of_nonneg_of_le (fun _ => norm_nonneg _) ?_ + rintro ⟨m,n⟩ + rw [Complex.norm_exp, ← Real.exp_add] + apply Real.exp_le_exp.mpr + simp only [Complex.mul_re, Complex.neg_re, Complex.neg_im, Complex.ofReal_re, Complex.ofReal_im, + Complex.intCast_re, Complex.intCast_im, Complex.add_re, Complex.add_im, + pow_two, Complex.mul_re, Complex.mul_im, mul_zero, zero_mul, sub_zero, add_zero] + nlinarith [mul_le_mul_of_nonneg_left (real_Q_ge (m:ℝ) (n:ℝ)) (mul_pos Real.pi_pos hc).le] + +lemma inv_re_pos {c : ℂ} (hc : 0 < c.re) : 0 < (c⁻¹).re := by + rw [Complex.inv_re] + exact div_pos hc (Complex.normSq_pos.mpr (by intro h; simp [h] at hc)) + +def theta (c : ℂ) : ℂ := ∑' p : ℤ × ℤ, + Complex.exp (-Real.pi*c*((p.1:ℂ)^2+(p.1:ℂ)*p.2+(p.2:ℂ)^2)) + + +lemma middle_summable {c : ℂ} (hc : 0 < c.re) : + Summable (fun p : ℤ × ℤ => Complex.exp + (-3*Real.pi*c*(p.2:ℂ)^2/4 + Real.pi*Complex.I*p.1*p.2 - Real.pi/c*(p.1:ℂ)^2)) := by + have ha := intGaussian_summable (mul_pos Real.pi_pos (inv_re_pos hc)) + have hb := intGaussian_summable (show 0 < 3*Real.pi*c.re/4 by positivity) + apply Summable.of_norm + refine (ha.mul_of_nonneg hb (fun _ => (Real.exp_pos _).le) + (fun _ => (Real.exp_pos _).le)).of_nonneg_of_le (fun _ => norm_nonneg _) ?_ + rintro ⟨j,n⟩ + rw [Complex.norm_exp, ← Real.exp_add] + apply le_of_eq + congr 1 + simp only [div_eq_mul_inv, pow_two, Complex.mul_re, Complex.mul_im, + Complex.add_re, Complex.sub_re, Complex.ofReal_re, Complex.ofReal_im, + Complex.intCast_re, Complex.intCast_im, Complex.neg_re, Complex.neg_im, + Complex.I_re, Complex.I_im, + Complex.inv_re, Complex.inv_im] + norm_num + ring + +lemma first_step {c : ℂ} (hc : 0 < c.re) (n : ℤ) : + (∑' m : ℤ, Complex.exp (-Real.pi*c*((m:ℂ)^2+(m:ℂ)*n+(n:ℂ)^2))) = + 1 / c^(1/2:ℂ) * ∑' j : ℤ, Complex.exp + (-3*Real.pi*c*(n:ℂ)^2/4 + Real.pi*Complex.I*j*n - Real.pi/c*(j:ℂ)^2) := by + have hc0 : c ≠ 0 := by intro h; simp [h] at hc + have h := Complex.tsum_exp_neg_quadratic hc (-c*n/2) + have hsplit (m : ℤ) : + Complex.exp (-Real.pi*c*((m:ℂ)^2+(m:ℂ)*n+(n:ℂ)^2)) = + Complex.exp (-Real.pi*c*(n:ℂ)^2) * + Complex.exp (-Real.pi*c*(m:ℂ)^2+2*Real.pi*(-c*n/2)*m) := by + rw [← Complex.exp_add]; congr 1; ring + simp_rw [hsplit] + rw [tsum_mul_left, h, ← mul_assoc, mul_comm (Complex.exp _) _, mul_assoc, + ← tsum_mul_left] + congr 1 + apply tsum_congr + intro j + rw [← Complex.exp_add] + congr 1 + field_simp [hc0] + ring_nf + norm_num [show Complex.I^4 = 1 by norm_num [pow_succ, Complex.I_sq], Complex.I_sq] + ring + + +lemma second_step {c : ℂ} (hc : 0 < c.re) (j : ℤ) : + (∑' n : ℤ, Complex.exp + (-3*Real.pi*c*(n:ℂ)^2/4 + Real.pi*Complex.I*j*n - Real.pi/c*(j:ℂ)^2)) = + 1 / (3*c/4)^(1/2:ℂ) * ∑' k : ℤ, + Complex.exp (-Real.pi*(4/(3*c))*((j:ℂ)^2-(j:ℂ)*k+(k:ℂ)^2)) := by + have hc0 : c ≠ 0 := by intro h; simp [h] at hc + have hpos : 0 < (3*c/4).re := by simp; linarith + have h := Complex.tsum_exp_neg_quadratic hpos (Complex.I*j/2) + have hsplit (n : ℤ) : Complex.exp + (-3*Real.pi*c*(n:ℂ)^2/4 + Real.pi*Complex.I*j*n - Real.pi/c*(j:ℂ)^2) = + Complex.exp (-Real.pi/c*(j:ℂ)^2) * + Complex.exp (-Real.pi*(3*c/4)*(n:ℂ)^2+2*Real.pi*(Complex.I*j/2)*n) := by + rw [← Complex.exp_add]; congr 1; ring + simp_rw [hsplit] + rw [tsum_mul_left, h, ← mul_assoc, mul_comm (Complex.exp _) _, mul_assoc, + ← tsum_mul_left] + congr 1 + apply tsum_congr + intro k + rw [← Complex.exp_add] + congr 1 + field_simp [hc0] + ring_nf + norm_num [show Complex.I^4 = 1 by norm_num [pow_succ, Complex.I_sq], Complex.I_sq] + ring + + +lemma dual_re_pos {c : ℂ} (hc : 0 < c.re) : 0 < (4/(3*c)).re := by + have : (4/(3*c):ℂ) = (4/3:ℝ) * c⁻¹ := by push_cast; ring + rw [this, Complex.re_ofReal_mul] + exact mul_pos (by norm_num) (inv_re_pos hc) + +lemma theta_raw {c : ℂ} (hc : 0 < c.re) : + theta c = (1/c^(1/2:ℂ)) * (1/(3*c/4)^(1/2:ℂ)) * theta (4/(3*c)) := by + have hstart : theta c = ∑' n : ℤ, ∑' m : ℤ, + Complex.exp (-Real.pi*c*((m:ℂ)^2+(m:ℂ)*n+(n:ℂ)^2)) := by + rw [theta, (triangular_summable hc).tsum_prod] + apply tsum_congr; intro n + apply tsum_congr; intro m + congr 1; ring + rw [hstart] + simp_rw [first_step hc] + rw [tsum_mul_left, (middle_summable hc).tsum_comm] + simp_rw [second_step hc] + rw [tsum_mul_left, ← mul_assoc] + congr 1 + rw [theta, (triangular_summable (dual_re_pos hc)).tsum_prod] + calc + _ = (∑' j : ℤ, ∑' k : ℤ, Complex.exp + (-Real.pi*(4/(3*c))*(((-j:ℤ):ℂ)^2+((-j:ℤ):ℂ)*k+(k:ℂ)^2))) := by + apply tsum_congr; intro j + apply tsum_congr; intro k + congr 1; push_cast; ring + _ = _ := by + simpa only using! (Equiv.neg ℤ).tsum_eq (fun j => ∑' k : ℤ, Complex.exp + (-Real.pi*(4/(3*c))*((j:ℂ)^2+(j:ℂ)*k+(k:ℂ)^2))) + +lemma cpow_scale {c : ℂ} (hc0 : c ≠ 0) : + (3*c/4)^(1/2:ℂ) = ((Real.sqrt 3 / 2 : ℝ):ℂ) * c^(1/2:ℂ) := by + have hscale : (3*c/4:ℂ) = ((3/4:ℝ):ℂ)*c := by push_cast; ring + rw [hscale, Complex.cpow_def_of_ne_zero (mul_ne_zero (by norm_num) hc0), + Complex.log_ofReal_mul (by norm_num) hc0, add_mul, Complex.exp_add, + ← Complex.cpow_def_of_ne_zero hc0] + congr 1 + have hpow : ((3/4:ℝ):ℂ)^(1/2:ℂ) = ((Real.sqrt 3/2:ℝ):ℂ) := by + calc + _ = Complex.ofReal ((3/4:ℝ)^(1/2:ℝ)) := by + convert (Complex.ofReal_cpow (by norm_num : (0:ℝ) ≤ 3/4) (1/2)).symm using 1; push_cast; rfl + _ = _ := by + congr 1 + rw [← Real.sqrt_eq_rpow, Real.sqrt_div (by norm_num)] + rw [show Real.sqrt (4 : ℝ) = 2 from + (Real.sqrt_eq_iff_eq_sq (by norm_num) (by norm_num)).mpr (by norm_num)] + rw [Complex.cpow_def_of_ne_zero (by norm_num), ← Complex.ofReal_log (by norm_num)] at hpow + exact hpow + + +lemma theta_transform {c : ℂ} (hc : 0 < c.re) : + theta c = 2/((Real.sqrt 3:ℂ)*c) * theta (4/(3*c)) := by + have hc0 : c ≠ 0 := by intro h; simp [h] at hc + rw [theta_raw hc] + congr 1 + rw [div_mul_div_comm, one_mul, cpow_scale hc0] + have h : c^(1/2:ℂ) * (((Real.sqrt 3/2:ℝ):ℂ) * c^(1/2:ℂ)) = + ((Real.sqrt 3/2:ℝ):ℂ)*c := by + rw [mul_left_comm, ← Complex.cpow_add _ _ hc0] + norm_num + rw [h] + push_cast + ring + +end TriangularUniversal.Theta + +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Energy/Universal.lean b/lean/OAI/Analysis/Triangular/Energy/Universal.lean new file mode 100644 index 0000000000000000000000000000000000000000..67105df7ccf22afc7930a13a56bb2128478982e7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Energy/Universal.lean @@ -0,0 +1,26 @@ +import OAI.Analysis.Triangular.Energy.Gaussian +import OAI.Analysis.Triangular.Energy.Potentials + +namespace OAI + +noncomputable section +namespace AtomicTriangular +/-- The triangular lattice minimizes every nonnegative completely monotone energy. -/ +theorem universal_energy_minimum (g : ℝ → ℝ) (C : Set Plane) + (hg : AdmissiblePotential g) (_hC : LocallyFinite C) (hd : DensityOne C) : + latticeEnergy g ≤ energy g C ∧ latticeEnergy g = energy g A := by + have hb (α : ℝ) (hα : 0<α) : + TriangularUniversal.latticeEnergy (TriangularUniversal.gaussPot α)≤ + TriangularUniversal.energy (TriangularUniversal.gaussPot α) C := by + rw [←latticeEnergy_eq_support] + exact gaussian_energy_bound hd α hα + have hu := TriangularUniversal.universal_from_gaussian_bounds hd hb hg + constructor + · rw [latticeEnergy_eq_support] + exact hu.1 + · rw [latticeEnergy_eq_support,A_eq_support] + exact hu.2 +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Envelope/Analytic.lean b/lean/OAI/Analysis/Triangular/Envelope/Analytic.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2e60b8cf004e20365e51254c20cea2ab091d9d6 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Envelope/Analytic.lean @@ -0,0 +1,94 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals +import OAI.Analysis.Triangular.Envelope.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex + +lemma Xwave_pos {k : ℝ} (hk : 0 norm_num [damping,h,H,Xwave,waveDen] + have hp := Real.pi_gt_three + have hq := damping_pos q + have hxpos := Xwave_pos hq t + calc + 1 ≤ 3*damping q*Xwave (damping q) (5/6) := hl.le + _ ≤ 3*damping q*Xwave (damping q) t := mul_le_mul_of_nonneg_left hx (by positivity) + _ ≤ Real.pi*damping q*Xwave (damping q) t := by + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hp.le hq.le) hxpos.le + +lemma jetEnvelope_monotone {q v : Fin 2} {n : ℤ} (hn : 1≤n) (hQ : 0 ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Envelope/Basic.lean b/lean/OAI/Analysis/Triangular/Envelope/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..6bb2dfde43078288c64fe9e269a85bd92e2cd899 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Envelope/Basic.lean @@ -0,0 +1,52 @@ +import Mathlib + +namespace OAI + +noncomputable section +namespace AtomicTriangular.Envelope +open Real + +lemma mul_exp_neg_le {x y δ : ℝ} (hx : 0 norm_num [tailBase,residue] +lemma tailBase_pos (a : Fin 15) : 25 ≤ tailBase a := by + fin_cases a <;> norm_num [tailBase,residue] +lemma tailBase_lt (a : Fin 15) : tailBase a < 61 := by + fin_cases a <;> norm_num [tailBase,residue] + +def normJetEnvelope (k v : ℝ) (n : ℤ) (t : ℝ) : ℝ := + (1+|D n|+‖I*Real.pi*zeta k v t‖)*‖lambda k t‖*(Q n)⁻¹ * + Real.exp (-frequencyDecay k v t*n) +lemma normJetEnvelope_eq {k : ℝ} (hk : 0 + if i.val < frequencyDistance l then + (((RI.point ((frequencyDistance l:ℤ)-i.val)).sub ((RI.point 1).divNat 2)).mul (pn l)) else RI.point 0)) + else (piBox.divNat 18).mul (RI.sum (fun l : Fin 31 => + if i.val < frequencyDistance l then pn l else RI.point 0)) +lemma fullTailWBox_mem (pn : Fin 31 → RI) (hp : ∀ l, (pn l).Mem ‖fourierCoeff l‖) + (i : Fin 15) (d : Fin 2) : (fullTailWBox pn i d).Mem (fullTailW i d) := by + unfold fullTailWBox fullTailW + split_ifs with hd + · apply RI.mem_mul (by norm_num at *; simpa using RI.mem_divNat (RI.mem_pow piBox_mem 2) (by norm_num : 0<(18^2:ℕ))) + apply RI.mem_sum + intro l + split_ifs + · apply RI.mem_mul _ (hp l) + apply RI.mem_sub + · simpa using RI.mem_point ((frequencyDistance l:ℤ)-i.val) + · simpa using RI.mem_divNat ri1_mem (by norm_num : 0<(2:ℕ)) + · exact ri0_mem + · apply RI.mem_mul (by simpa using RI.mem_divNat piBox_mem (by norm_num : 0<(18:ℕ))) + apply RI.mem_sum + intro l + split_ifs + · exact hp l + · exact ri0_mem + +def decayBox (q v : Fin 2) (j : Fin 31) : RI := (wavePhaseBox q v j).re.neg +lemma decayBox_mem (q v : Fin 2) (j : Fin 31) : + (decayBox q v j).Mem (frequencyDecay (damping q) (damping v) (frequency j)) := by + have hh := RI.mem_neg (wavePhaseBox_mem q v j).1 + convert hh using 1 + · rfl + · rw [wavePhase_re] + unfold frequencyDecay + ring + +def decayExpBox (q v : Fin 2) (n : ℤ) (j : Fin 31) : RI := + (CI.ofReal ((decayBox q v j).neg.mul (RI.point n))).exp.re +lemma decayExpBox_mem (q v : Fin 2) (n : ℤ) (j : Fin 31) + (hh : (CI.ofReal ((decayBox q v j).neg.mul (RI.point n))).normSq.hi ≤ scale*1024^2) : + (decayExpBox q v n j).Mem (Real.exp (-frequencyDecay (damping q) (damping v) (frequency j)*n)) := + ri_exp_mem (RI.mem_mul (RI.mem_neg (decayBox_mem q v j)) (RI.mem_point n)) hh + +def psiBox (_q _v : Fin 2) (_n : ℤ) (_j : Fin 31) (qb db lell dnorm ex : RI) : RI := + ((((RI.point 1).add db.abs).add dnorm).mul lell).mul qb.invPos |>.mul ex +lemma psiBox_mem (q v : Fin 2) (n : ℤ) (j : Fin 31) {qb db lell dnorm ex : RI} + (hq : qb.Mem (Q n)) (hd : db.Mem (D n)) + (hl : lell.Mem ‖lambda (damping q) (frequency j)‖) + (hn : dnorm.Mem ‖I*Real.pi*zeta (damping q) (damping v) (frequency j)‖) + (he : ex.Mem (Real.exp (-frequencyDecay (damping q) (damping v) (frequency j)*n))) + (hqp : 0 psiTableB i j)=envelopeSumBoxB j := by + revert j + decide +kernel +lemma envelopeSumBoxB_mem (j : Fin 31) : (envelopeSumBoxB j).Mem (finiteEnvelopeSum 0 1 j) := by + rw [← envelopeSumBoxB_calc] + exact RI.mem_sum (fun i => psiTableB_mem i j) +def psiTableC : Fin 15 → Fin 31 → RI := ![psiC36,psiC37,psiC39,psiC40,psiC43,psiC45,psiC48,psiC49,psiC52,psiC55,psiC57,psiC25,psiC27,psiC28,psiC31] +lemma psiTableC_mem (i : Fin 15) (j : Fin 31) : (psiTableC i j).Mem (normJetEnvelope (damping 1) (damping 0) (tailBase i) (frequency j)) := by + fin_cases i + · exact psiC36_mem j + · exact psiC37_mem j + · exact psiC39_mem j + · exact psiC40_mem j + · exact psiC43_mem j + · exact psiC45_mem j + · exact psiC48_mem j + · exact psiC49_mem j + · exact psiC52_mem j + · exact psiC55_mem j + · exact psiC57_mem j + · exact psiC25_mem j + · exact psiC27_mem j + · exact psiC28_mem j + · exact psiC31_mem j +def periodExpC : Fin 31 → RI := ![⟨68361776647808579508237600856739182297445,68361776647808579508237600856739182297448⟩,⟨17955801160625005646399209631805285949,17955801160625005646399209631805285952⟩,⟨1629268718960852109745906263580431,1629268718960852109745906263580434⟩,⟨44987515851966072680122151052,44987515851966072680122151055⟩,⟨334661137933036658416343,334661137933036658416346⟩,⟨606274037063543301,606274037063543304⟩,⟨253147110772,253147110775⟩,⟨25059,25062⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨25059,25062⟩,⟨253147110772,253147110775⟩,⟨606274037063543301,606274037063543304⟩,⟨334661137933036658416343,334661137933036658416346⟩,⟨44987515851966072680122151052,44987515851966072680122151055⟩,⟨1629268718960852109745906263580431,1629268718960852109745906263580434⟩,⟨17955801160625005646399209631805285949,17955801160625005646399209631805285952⟩,⟨68361776647808579508237600856739182297445,68361776647808579508237600856739182297448⟩] +lemma periodExpC_calc (j : Fin 31) : (CI.ofReal ((envelopePhase10 j).re.mul (RI.point 36))).exp.re=periodExpC j := by + revert j + decide +kernel +lemma periodExpC_pre (j : Fin 31) : (CI.ofReal ((envelopePhase10 j).re.mul (RI.point 36))).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma periodExpC_mem (j : Fin 31) : (periodExpC j).Mem (Real.exp (-frequencyDecay (damping 1) (damping 0) (frequency j)*36)) := by + rw [← periodExpC_calc] + have hh := decayExpBox_mem 1 0 36 j + unfold decayExpBox decayBox RI.neg at hh + rw [envelopePhase10_calc] at hh + simp only [neg_neg] at hh + exact hh (periodExpC_pre j) +lemma periodDenC_pos (j : Fin 31) : 0<((RI.point 1).sub (periodExpC j)).lo := by + revert j + decide +kernel +def envelopeSumBoxC : Fin 31 → RI := ![⟨39053611270643973960107761311711604088563212835,39053611270643973960107761311711604088563297318⟩,⟨114291749546675412938455971557584137324642299,114291749546675412938455971557584137324642929⟩,⟨167100690065369722344822769626625009526715,167100690065369722344822769626625009527172⟩,⟨111876318662397262916987787284135269063,111876318662397262916987787284135269559⟩,⟨31326565279161147691437357686554618,31326565279161147691437357686555156⟩,⟨3385514150625127811095634250100,3385514150625127811095634250684⟩,⟨134493106298664852337861442,134493106298664852337862077⟩,⟨1985741424794787333986,1985741424794787334678⟩,⟨12125101806019278,12125101806020028⟩,⟨39142832021,39142832830⟩,⟨102163,103035⟩,⟨-316,619⟩,⟨-364,654⟩,⟨-387,682⟩,⟨-407,699⟩,⟨-410,705⟩,⟨-407,699⟩,⟨-387,682⟩,⟨-364,654⟩,⟨-316,619⟩,⟨102163,103035⟩,⟨39142832021,39142832830⟩,⟨12125101806019278,12125101806020028⟩,⟨1985741424794787333986,1985741424794787334678⟩,⟨134493106298664852337861442,134493106298664852337862077⟩,⟨3385514150625127811095634250100,3385514150625127811095634250684⟩,⟨31326565279161147691437357686554618,31326565279161147691437357686555156⟩,⟨111876318662397262916987787284135269063,111876318662397262916987787284135269559⟩,⟨167100690065369722344822769626625009526715,167100690065369722344822769626625009527172⟩,⟨114291749546675412938455971557584137324642299,114291749546675412938455971557584137324642929⟩,⟨39053611270643973960107761311711604088563212835,39053611270643973960107761311711604088563297318⟩] +lemma envelopeSumBoxC_calc (j : Fin 31) : (RI.sum (fun i : Fin 15 => psiTableC i j)).mul ((RI.point 1).sub (periodExpC j)).invPos=envelopeSumBoxC j := by + revert j + decide +kernel +lemma envelopeSumBoxC_mem (j : Fin 31) : (envelopeSumBoxC j).Mem (tailEnvelopeSum 1 0 j) := by + rw [← envelopeSumBoxC_calc] + exact RI.mem_mul (RI.mem_sum (fun i => psiTableC_mem i j)) + (RI.mem_invPos (RI.mem_sub ri1_mem (periodExpC_mem j)) (periodDenC_pos j)) +def psiTableD : Fin 15 → Fin 31 → RI := ![psiD36,psiD37,psiD39,psiD40,psiD43,psiD45,psiD48,psiD49,psiD52,psiD55,psiD57,psiD25,psiD27,psiD28,psiD31] +lemma psiTableD_mem (i : Fin 15) (j : Fin 31) : (psiTableD i j).Mem (normJetEnvelope (damping 0) (damping 0) (tailBase i) (frequency j)) := by + fin_cases i + · exact psiD36_mem j + · exact psiD37_mem j + · exact psiD39_mem j + · exact psiD40_mem j + · exact psiD43_mem j + · exact psiD45_mem j + · exact psiD48_mem j + · exact psiD49_mem j + · exact psiD52_mem j + · exact psiD55_mem j + · exact psiD57_mem j + · exact psiD25_mem j + · exact psiD27_mem j + · exact psiD28_mem j + · exact psiD31_mem j +def periodExpD : Fin 31 → RI := ![⟨16286131234248036362329242544210653242743306973698,16286131234248036362329242544210653242743306973702⟩,⟨6269103470793856878409612229549759403842514412,6269103470793856878409612229549759403842514415⟩,⟨569847002264645700083601590661629870321890,569847002264645700083601590661629870321893⟩,⟨8735682716488280888885382058801505278,8735682716488280888885382058801505281⟩,⟨14799248660747234791321075685903,14799248660747234791321075685906⟩,⟨1637954401556249319695831,1637954401556249319695834⟩,⟨6246535011584471,6246535011584474⟩,⟨389339,389342⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-2,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨-1,2⟩,⟨389339,389342⟩,⟨6246535011584471,6246535011584474⟩,⟨1637954401556249319695831,1637954401556249319695834⟩,⟨14799248660747234791321075685903,14799248660747234791321075685906⟩,⟨8735682716488280888885382058801505278,8735682716488280888885382058801505281⟩,⟨569847002264645700083601590661629870321890,569847002264645700083601590661629870321893⟩,⟨6269103470793856878409612229549759403842514412,6269103470793856878409612229549759403842514415⟩,⟨16286131234248036362329242544210653242743306973698,16286131234248036362329242544210653242743306973702⟩] +lemma periodExpD_calc (j : Fin 31) : (CI.ofReal ((envelopePhase00 j).re.mul (RI.point 36))).exp.re=periodExpD j := by + revert j + decide +kernel +lemma periodExpD_pre (j : Fin 31) : (CI.ofReal ((envelopePhase00 j).re.mul (RI.point 36))).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma periodExpD_mem (j : Fin 31) : (periodExpD j).Mem (Real.exp (-frequencyDecay (damping 0) (damping 0) (frequency j)*36)) := by + rw [← periodExpD_calc] + have hh := decayExpBox_mem 0 0 36 j + unfold decayExpBox decayBox RI.neg at hh + rw [envelopePhase00_calc] at hh + simp only [neg_neg] at hh + exact hh (periodExpD_pre j) +lemma periodDenD_pos (j : Fin 31) : 0<((RI.point 1).sub (periodExpD j)).lo := by + revert j + decide +kernel +def envelopeSumBoxD : Fin 31 → RI := ![⟨62665322477703134578267571243527404039013362709439210,62665322477703134578267571243527404039013567886778613⟩,⟨209987463004216784503623116701360867966118124593393,209987463004216784503623116701360867966118686068450⟩,⟨267239016509638400779480111539475851649736461880,267239016509638400779480111539475851649737044736⟩,⟨104756510295030106372679955534269317994410230,104756510295030106372679955534269317994411049⟩,⟨9642098677820156186215979474514789552781,9642098677820156186215979474514789553504⟩,⟨144820548830970846254748476628611866,144820548830970846254748476628612676⟩,⟨223245480111176070810716735760,223245480111176070810716736679⟩,⟨20524030305561976635038,20524030305561976636085⟩,⟨63549000175288,63549000176492⟩,⟨3598,4988⟩,⟨-601,1064⟩,⟨-1156,1220⟩,⟨-1352,1385⟩,⟨-1511,1533⟩,⟨-1638,1641⟩,⟨-1683,1683⟩,⟨-1638,1641⟩,⟨-1511,1533⟩,⟨-1352,1385⟩,⟨-1156,1220⟩,⟨-601,1064⟩,⟨3598,4988⟩,⟨63549000175288,63549000176492⟩,⟨20524030305561976635038,20524030305561976636085⟩,⟨223245480111176070810716735760,223245480111176070810716736679⟩,⟨144820548830970846254748476628611866,144820548830970846254748476628612676⟩,⟨9642098677820156186215979474514789552781,9642098677820156186215979474514789553504⟩,⟨104756510295030106372679955534269317994410230,104756510295030106372679955534269317994411049⟩,⟨267239016509638400779480111539475851649736461880,267239016509638400779480111539475851649737044736⟩,⟨209987463004216784503623116701360867966118124593393,209987463004216784503623116701360867966118686068450⟩,⟨62665322477703134578267571243527404039013362709439210,62665322477703134578267571243527404039013567886778613⟩] +lemma envelopeSumBoxD_calc (j : Fin 31) : (RI.sum (fun i : Fin 15 => psiTableD i j)).mul ((RI.point 1).sub (periodExpD j)).invPos=envelopeSumBoxD j := by + revert j + decide +kernel +lemma envelopeSumBoxD_mem (j : Fin 31) : (envelopeSumBoxD j).Mem (tailEnvelopeSum 0 0 j) := by + rw [← envelopeSumBoxD_calc] + exact RI.mem_mul (RI.mem_sum (fun i => psiTableD_mem i j)) + (RI.mem_invPos (RI.mem_sub ri1_mem (periodExpD_mem j)) (periodDenD_pos j)) +def boundB : Fin 2 → RI := ![⟨106992734143269554352850967031322302145957125684055638576194107,106992734143269554352850967031322302145961173439079333035328504⟩,⟨334702182249134137883567462407238680064117422331211329138320346,334702182249134137883567462407238680064131247872720098964606091⟩] +lemma boundB_calc (c : Fin 2) : RI.sum (fun i : Fin 15 => (envelopeSumBoxB ⟨i.val+16,by omega⟩).mul (fullWTable i c))=boundB c := by + revert c + decide +kernel +lemma boundB_mem (c : Fin 2) : (boundB c).Mem (finiteTailEnvelope c) := by + rw [← boundB_calc] + exact RI.mem_sum (fun i => RI.mem_mul (envelopeSumBoxB_mem _) (fullWTable_mem i c)) +lemma finiteTailEnvelope_bound (c : Fin 2) : finiteTailEnvelope c < (335/1:ℝ) := by + have hh := ri_mem_lt (boundB_mem c) 335 1 (by norm_num) (by revert c; decide +kernel) + simpa only [Int.cast_ofNat, Nat.cast_one] using hh +def boundD : Fin 2 → RI := ![⟨1940975560916008880594700779419633448871449394572498,1940975560916008880594700779419633448871455730573482⟩,⟨22094595793730221032656813304955042774557130899799804,22094595793730221032656813304955042774557203109259892⟩] +lemma boundD_calc (c : Fin 2) : RI.sum (fun i : Fin 15 => (envelopeSumBoxD ⟨i.val+16,by omega⟩).mul (fullWTable i c))=boundD c := by + revert c + decide +kernel +lemma boundD_mem (c : Fin 2) : (boundD c).Mem (tailTailEnvelope c) := by + rw [← boundD_calc] + exact RI.mem_sum (fun i => RI.mem_mul (envelopeSumBoxD_mem _) (fullWTable_mem i c)) +lemma tailTailEnvelope_bound (c : Fin 2) : tailTailEnvelope c < (23/1000000000:ℝ) := by + apply ri_mem_lt (boundD_mem c) 23 1000000000 (by norm_num) + revert c + decide +kernel +def boundC : Fin 22 → RI := ![⟨6983430325648370090762786336118446593363754,6983430325648370090762786446578740417141912⟩,⟨6856113601763651669234484249463260417292237909,6856113601763651669234484249463263003483720803⟩,⟨6980275474701897361264833427827823165781882,6980275474701897361264833538288127294569656⟩,⟨6849926501624327130340125007838659162779128828,6849926501624327130340125007838751568239066090⟩,⟨6973598786895930262447651247794129162920230,6973598786895930262447651358254938264699275⟩,⟨6836835820083327838570406946101411437962929601,6836835820083327838570406946107411399810476915⟩,⟨6970127717751114871303779034145933886275183,6970127717751114871303779144607310934352254⟩,⟨6830032419816511259075261648126221145691191044,6830032419816511259075261648139565050473184385⟩,⟨6966603083247449730494732527001762407925335,6966603083247449730494732637462168998477775⟩,⟨6823126181462009803004838304747855282887858411,6823126181462009803004838304749027480297356046⟩,⟨6973598786155837885597122670431812071336839,6973598786155837885597122780892105895067075⟩,⟨6836835803450007218291346535708063526022658801,6836835803450007218291346535708066111748162278⟩,⟨6983430319365317341592722342903761446494632,6983430319365317341592722453364570599057920⟩,⟨6856113562673563870668110733543919108677854686,6856113562673563870668110733549917183576988372⟩,⟨6986430469537304015669954082576071774519466,6986430469537304015669954193037449039042045⟩,⟨6861998095658831191648932715642117935687677355,6861998095658831191648932715655459086026521348⟩,⟨6994280707523134943003159481072253806359477,6994280707523134943003159591532660388642822⟩,⟨6877399299610182510026301010869972298375284114,6877399299610182510026301010871144536623494991⟩,⟨7000003726719105447955797071924050152776533,7000003726719105447955797182384354282597204⟩,⟨6888630442760375097555168696099136027582442669,6888630442760375097555168696099228441876634200⟩,⟨7002436798840667900299665935692288640605379,7002436798840667900299666046153097865828986⟩,⟨6893406056783168904034913493915297148668338947,6893406056783168904034913493921298545869113913⟩] +lemma boundC_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (envelopeSumBoxC j).mul (columnNormTable ⟨c.val,by omega⟩ j))=boundC c := by + revert c + decide +kernel +lemma boundC_mem (c : Fin 22) : (boundC c).Mem (tailFiniteEnvelope c) := by + rw [← boundC_calc] + exact RI.mem_sum (fun j => RI.mem_mul (envelopeSumBoxC_mem j) (columnNormTable_mem _ j)) +lemma tailFiniteEnvelope_bound (c : Fin 22) : tailFiniteEnvelope c < (7/1000000000000000:ℝ) := by + apply ri_mem_lt (boundC_mem c) 7 1000000000000000 (by norm_num) + revert c + decide +kernel +def boundV : Fin 1 → RI := ![⟨126171129704549000174024895793069760796707492960977549,126171129704549000174024895793069760796707905563055481⟩] +lemma boundV_calc (c : Fin 1) : RI.sum (fun j : Fin 31 => (envelopeSumBoxD j).mul (columnNorm22 j))=boundV c := by + revert c + decide +kernel +lemma boundV_mem (c : Fin 1) : (boundV c).Mem (tailConstantEnvelope) := by + rw [← boundV_calc] + exact RI.mem_sum (fun j => RI.mem_mul (envelopeSumBoxD_mem j) (fourierNorm_mem j)) +lemma tailConstantEnvelope_bound : tailConstantEnvelope < (127/1000000000:ℝ) := by + apply ri_mem_lt (boundV_mem 0) 127 1000000000 (by norm_num) + decide +kernel +def totalWBox : Fin 2 → RI := ![⟨88890187770204148499732172106287369988458349510745144130957436,88890187770204148499732172106287369988458358605727501024302752⟩,⟨118906512357901551576953185138697525813015585545738674518407447,118906512357901551576953185138697525813015613364859218088825868⟩] +lemma totalWBox_calc (d : Fin 2) : RI.sum (fun i : Fin 15 => fullWTable i d)=totalWBox d := by + revert d + decide +kernel +lemma fullW_column_bound (d : Fin 2) : (∑ i : Fin 15, fullTailW i d)<119 := by + have hh := RI.mem_sum (fun i : Fin 15 => fullWTable_mem i d) + rw [totalWBox_calc] at hh + have hh' := ri_mem_lt hh 119 1 (by norm_num) (by clear hh; revert d; decide +kernel) + simpa using hh' +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Envelope/EnvelopeSumsBase.lean b/lean/OAI/Analysis/Triangular/Envelope/EnvelopeSumsBase.lean new file mode 100644 index 0000000000000000000000000000000000000000..b20ad5ae713429a1679d23ee7563a5f28570d66b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Envelope/EnvelopeSumsBase.lean @@ -0,0 +1,36 @@ +import OAI.Analysis.Triangular.Envelope.EnvelopeBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction + +def finiteEnvelopeSum (q v : Fin 2) (j : Fin 31) : ℝ := + ∑ n : Fin 10, normJetEnvelope (damping q) (damping v) (finiteNode n) (frequency j) +def tailEnvelopeSum (q v : Fin 2) (j : Fin 31) : ℝ := + (∑ a : Fin 15, normJetEnvelope (damping q) (damping v) (tailBase a) (frequency j)) * + (1-Real.exp (-frequencyDecay (damping q) (damping v) (frequency j)*36))⁻¹ + +def finiteTailEnvelope (d : Fin 2) : ℝ := + ∑ i : Fin 15, finiteEnvelopeSum 0 1 ⟨i.val+16,by omega⟩ * fullTailW i d +def tailTailEnvelope (d : Fin 2) : ℝ := + ∑ i : Fin 15, tailEnvelopeSum 0 0 ⟨i.val+16,by omega⟩ * fullTailW i d +def tailFiniteEnvelope (c : Fin 22) : ℝ := + ∑ j : Fin 31, tailEnvelopeSum 1 0 j * ‖finiteColumn ⟨c.val,by omega⟩ j‖ +def tailConstantEnvelope : ℝ := + ∑ j : Fin 31, tailEnvelopeSum 0 0 j * ‖fourierCoeff j‖ +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +lemma ri_mem_lt {a : RI} {x : ℝ} (hx : a.Mem x) (p : ℤ) (q : ℕ) (hq : 0 jetMultiplier k v n d (frequency j)*S j) + _ = ∑ j : Fin 31, (∑ d : Fin 2, ‖jetMultiplier k v n d (frequency j)‖)*‖S j‖ := by + rw [Finset.sum_comm] + simp only [Finset.sum_mul] + _ ≤ _ := Finset.sum_le_sum (fun j _ => + mul_le_mul_of_nonneg_right (jetMultiplier_pair_bound k v (frequency j) n hQ) (norm_nonneg _)) +lemma normJetEnvelope_nonneg (k v t : ℝ) (n : ℤ) (hQ : 0 |K p.1 p.2|) ∧ + (∑' p : α × Fin 2, |K p.1 p.2|) ≤ ∑' a, G a := by + have hs : Summable (fun a => ∑ d : Fin 2, |K a d|) := + hG.of_nonneg_of_le (fun a => Finset.sum_nonneg (fun d _ => abs_nonneg _)) hdom + have hp : Summable (fun p : α × Fin 2 => |K p.1 p.2|) := by + apply (summable_prod_of_nonneg (fun _ => abs_nonneg _)).mpr + exact ⟨fun a => (hasSum_fintype _).summable,by simpa only [tsum_fintype] using hs⟩ + refine ⟨hp,?_⟩ + rw [hp.tsum_prod] + simp only [tsum_fintype] + exact hs.tsum_le_tsum hdom hG +lemma tail_atom_column_bounds (q v : Fin 2) (S : Fin 31 → ℂ) : + Summable (fun p : TailNode × Fin 2 => |jet (damping q) (damping v) p.1.val.val p.2 S|) ∧ + (∑' p : TailNode × Fin 2, |jet (damping q) (damping v) p.1.val.val p.2 S|) ≤ + ∑ j : Fin 31, tailEnvelopeSum q v j*‖S j‖ := by + have hs (j : Fin 31) : Summable (fun n : TailNode => + normJetEnvelope (damping q) (damping v) n.val.val (frequency j)*‖S j‖) := + (summable_tailEnvelope q v (abs_le.mpr (frequency_mem j))).mul_right _ + have hsum := summable_sum (s:=Finset.univ) (fun j _ => hs j) + have hh := paired_summable_bound (fun n d => jet (damping q) (damping v) n.val.val d S) + (fun n : TailNode => ∑ j : Fin 31, normJetEnvelope (damping q) (damping v) n.val.val (frequency j)*‖S j‖) + hsum (fun n => jet_pair_bound _ _ _ n.val.Qpos S) + refine ⟨hh.1,?_⟩ + calc + _ ≤ _ := hh.2 + _ = _ := by + rw [Summable.tsum_finsetSum (fun j _ => hs j)] + simp only [tsum_mul_right,tsum_tailEnvelope] +lemma tail_tail_column_bounds (q v : Fin 2) (n : ℤ) (c : Fin 2) : + Summable (fun p : TailNode × Fin 2 => |tailJet (damping q) (damping v) p.1.val.val n c p.2|) ∧ + (∑' p : TailNode × Fin 2, |tailJet (damping q) (damping v) p.1.val.val n c p.2|) ≤ + ∑ i : Fin 15, tailEnvelopeSum q v ⟨i.val+16,by omega⟩*fullTailW i c := by + have hs (i : Fin 15) : Summable (fun m : TailNode => + normJetEnvelope (damping q) (damping v) m.val.val (frequency ⟨i.val+16,by omega⟩)*fullTailW i c) := + (summable_tailEnvelope q v (abs_le.mpr (frequency_mem _))).mul_right _ + have hsum := summable_sum (s:=Finset.univ) (fun i _ => hs i) + have hh := paired_summable_bound (fun m d => tailJet (damping q) (damping v) m.val.val n c d) + (fun m : TailNode => ∑ i : Fin 15, normJetEnvelope (damping q) (damping v) m.val.val (frequency ⟨i.val+16,by omega⟩)*fullTailW i c) + hsum (fun m => tailJet_pair_bound q v _ n (by have h := m.val.property.1; omega) m.val.Qpos c) + refine ⟨hh.1,?_⟩ + calc + _ ≤ _ := hh.2 + _ = _ := by + rw [Summable.tsum_finsetSum (fun i _ => hs i)] + simp only [tsum_mul_right,tsum_tailEnvelope] +lemma tail_finite_column_bound (c : Fin 22) : + (∑' p : TailNode × Fin 2, |jet H h p.1.val.val p.2 (finiteColumn ⟨c.val,by omega⟩)|) < 7/10^15 := by + exact (tail_atom_column_bounds 1 0 _).2.trans_lt (by norm_num [tailFiniteEnvelope,damping,H,h] at ⊢; simpa [tailFiniteEnvelope] using FiniteCertificate.tailFiniteEnvelope_bound c) +lemma tail_tail_column_bound (n : ℤ) (c : Fin 2) : + (∑' p : TailNode × Fin 2, |tailJet h h p.1.val.val n c p.2|) < 23/10^9 := by + exact (tail_tail_column_bounds 0 0 n c).2.trans_lt (by norm_num [tailTailEnvelope,damping,H,h] at ⊢; simpa [tailTailEnvelope] using FiniteCertificate.tailTailEnvelope_bound c) +lemma tail_constant_column_bound : + (∑' p : TailNode × Fin 2, |jet h h p.1.val.val p.2 fourierCoeff|) < 127/10^9 := by + exact (tail_atom_column_bounds 0 0 _).2.trans_lt (by norm_num [tailConstantEnvelope,damping,H,h] at ⊢; simpa [tailConstantEnvelope] using FiniteCertificate.tailConstantEnvelope_bound) +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Envelope/TailEnvelopeSeries.lean b/lean/OAI/Analysis/Triangular/Envelope/TailEnvelopeSeries.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f918e95f26ca5ab8440a118bfbce86ecd50ef6b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Envelope/TailEnvelopeSeries.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Schwartz.SpectralCLM +import OAI.Analysis.Triangular.Envelope.JetEnvelopeAnalytic +import OAI.Analysis.Triangular.Construction.TailEnumeration +import OAI.Analysis.Triangular.Envelope.EnvelopeSumsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma frequencyDecay_pos (q v : Fin 2) {t : ℝ} (ht : |t|≤5/6) : + 0 < frequencyDecay (damping q) (damping v) t := by + have hx := Xwave_antitone (damping_pos q) (abs_nonneg t) ht + have he : Xwave (damping q) |t|=Xwave (damping q) t := by simp [Xwave,waveDen,sq_abs] + rw [he] at hx + have hb : damping v < damping q * Xwave (damping q) (5/6) := by + fin_cases q <;> fin_cases v <;> norm_num [damping,h,H,Xwave,waveDen] + unfold frequencyDecay + exact mul_pos Real.pi_pos (sub_pos.mpr (hb.trans_le (mul_le_mul_of_nonneg_left hx (damping_pos q).le))) +lemma normJetEnvelope_enumerateTail (a : Fin 15) (l : ℕ) (k v t : ℝ) : + normJetEnvelope k v (enumerateTail (a,l)).val.val t = + normJetEnvelope k v (tailBase a) t * (Real.exp (-frequencyDecay k v t*36))^l := by + unfold normJetEnvelope + rw [Q_enumerateTail,D_enumerateTail] + change _ * Real.exp (-frequencyDecay k v t * ((tailBase a + 36*(l:ℤ):ℤ):ℝ)) = _ + rw [show -frequencyDecay k v t * ((tailBase a + 36*(l:ℤ):ℤ):ℝ) = + -frequencyDecay k v t*(tailBase a:ℝ) + (l:ℝ)*(-frequencyDecay k v t*36) by push_cast; ring, + Real.exp_add,Real.exp_nat_mul] + ring +lemma summable_envelope_period (q v : Fin 2) (a : Fin 15) {t : ℝ} (ht : |t|≤5/6) : + Summable (fun l : ℕ => normJetEnvelope (damping q) (damping v) (enumerateTail (a,l)).val.val t) := by + simp_rw [normJetEnvelope_enumerateTail] + apply Summable.mul_left + apply summable_geometric_of_norm_lt_one + rw [Real.norm_eq_abs,abs_of_pos (Real.exp_pos _),Real.exp_lt_one_iff] + have hh := frequencyDecay_pos q v ht + nlinarith +lemma tsum_envelope_period (q v : Fin 2) (a : Fin 15) {t : ℝ} (ht : |t|≤5/6) : + (∑' l : ℕ, normJetEnvelope (damping q) (damping v) (enumerateTail (a,l)).val.val t) = + normJetEnvelope (damping q) (damping v) (tailBase a) t * + (1-Real.exp (-frequencyDecay (damping q) (damping v) t*36))⁻¹ := by + simp_rw [normJetEnvelope_enumerateTail] + rw [tsum_mul_left,tsum_geometric_of_norm_lt_one] + rw [Real.norm_eq_abs,abs_of_pos (Real.exp_pos _),Real.exp_lt_one_iff] + have hh := frequencyDecay_pos q v ht + nlinarith +lemma summable_tailEnvelope (q v : Fin 2) {t : ℝ} (ht : |t|≤5/6) : + Summable (fun n : TailNode => normJetEnvelope (damping q) (damping v) n.val.val t) := by + apply (tailEnumeration.summable_iff).mp + apply (summable_prod_of_nonneg (fun p => normJetEnvelope_nonneg _ _ _ _ (by + have hh := FiniteCertificate.Q_node_bounds (enumerateTail p).val.val (enumerateTail p).val.property.2 + change 0 < Q (enumerateTail p).val.val + linarith [hh.1]))).mpr + exact ⟨fun a => summable_envelope_period q v a ht, (hasSum_fintype _).summable⟩ +lemma tsum_tailEnvelope (q v : Fin 2) (j : Fin 31) : + (∑' n : TailNode, normJetEnvelope (damping q) (damping v) n.val.val (frequency j)) = + tailEnvelopeSum q v j := by + have ht : |frequency j|≤5/6 := abs_le.mpr (frequency_mem j) + rw [←tailEnumeration.tsum_eq] + have hs := tailEnumeration.summable_iff.mpr (summable_tailEnvelope q v ht) + change Summable (fun p : Fin 15 × ℕ => normJetEnvelope (damping q) (damping v) (enumerateTail p).val.val (frequency j)) at hs + change (∑' p : Fin 15 × ℕ, normJetEnvelope (damping q) (damping v) (enumerateTail p).val.val (frequency j)) = _ + rw [hs.tsum_prod] + simp_rw [tsum_envelope_period q v _ ht] + rw [tsum_fintype,←Finset.sum_mul] + rfl +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Envelope/TargetEnvelope.lean b/lean/OAI/Analysis/Triangular/Envelope/TargetEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3ba10655f2bb44cd1a135f3e157fb13e202cacc --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Envelope/TargetEnvelope.lean @@ -0,0 +1,105 @@ +import OAI.Analysis.Triangular.Envelope.KernelBounds +import OAI.Analysis.Triangular.Construction.L1Kernel + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate AtomicTriangular.L1Kernel + +def gaussianTarget (v z : ℝ) (n : ℤ) (d : Fin 2) : ℝ := + Q 1/Q n * Real.exp (Real.pi*(v-h)*n+(1-n)/z) * + (if d.val=0 then z else -1+(Real.pi*(v-h)-D n)*z) +def targetEnvelope (v : ℝ) (n : ℤ) : ℝ := + Q 1/Q n * (1+Z+Z*|Real.pi*(v-h)-D n|) * + Real.exp (Real.pi*(v-h)*n+(1-n)/Z) +lemma Q_one_pos : 0 targetEnvelope h n.val.val) := by + apply tailEnumeration.summable_iff.mp + apply (summable_prod_of_nonneg (fun p => targetEnvelope_nonneg h (enumerateTail p).val)).mpr + refine ⟨fun a => ?_,(hasSum_fintype _).summable⟩ + change Summable (fun l : ℕ => targetEnvelope h (enumerateTail (a,l)).val.val) + simp_rw [targetEnvelope_enumerate] + exact (summable_geometric_of_lt_one (Real.exp_pos _).le targetRatio_lt).mul_left _ +def finiteTargetEnvelope : ℝ := ∑ i : Fin 6, targetEnvelope H (finiteNode ⟨i.val+4,by omega⟩) +def tailTargetEnvelope : ℝ := (∑ a : Fin 15, targetEnvelope h (tailBase a))/(1-Real.exp (-36/Z)) +lemma tsum_targetEnvelope : (∑' n : TailNode, targetEnvelope h n.val.val)=tailTargetEnvelope := by + rw [←tailEnumeration.tsum_eq] + have hs := tailEnumeration.summable_iff.mpr summable_targetEnvelope + change Summable (fun p : Fin 15 × ℕ => targetEnvelope h (enumerateTail p).val.val) at hs + change (∑' p : Fin 15 × ℕ, targetEnvelope h (enumerateTail p).val.val)=_ + rw [hs.tsum_prod] + simp_rw [targetEnvelope_enumerate,tsum_mul_left, + tsum_geometric_of_lt_one (Real.exp_pos _).le targetRatio_lt] + rw [tsum_fintype,←Finset.sum_mul] + rfl +lemma tailTarget_bounds {z : ℝ} (hz : 0 |gaussianTarget h z p.1.val.val p.2|) ∧ + (∑' p : TailNode × Fin 2, |gaussianTarget h z p.1.val.val p.2|) ≤ tailTargetEnvelope := by + obtain ⟨hs,hb⟩ := paired_summable_bound (fun (n : TailNode) d => gaussianTarget h z n.val.val d) + (fun n => targetEnvelope h n.val.val) summable_targetEnvelope + (fun n => gaussianTarget_pair_bound hz hzB h n.val (by have := n.val.property.1; omega)) + exact ⟨hs,hb.trans_eq tsum_targetEnvelope⟩ +def tailTarget (z : ℝ) (hz : 0 gaussianTarget h z p.1.val.val p.2) + (fun _ => (tailTarget_bounds hz hzB).1) () +lemma tailTarget_norm {z : ℝ} (hz : 0 |(a side).tailC n| + |(a side).tailD n|) ∧ + (∑' n, (|(a side).tailC n| + |(a side).tailD n|)) < (3 / 10 ^ 9 : ℝ)) ∧ + (∀ x, (f x : ℂ) = + (inputComplex (a 0) x + 𝓕 (inputComplex (a 1)) x) / + (normalizingDen (gaussianZ α) : ℂ)) + +lemma Construction.HasAtomicConstruction.atomicConstruction {α : ℝ} {f : Plane → ℝ} + (hf : HasAtomicConstruction α f) : AtomicConstruction α f := by + obtain ⟨hminus, hplus, heqplus, heqminus, a, δ, ha, hδ, hf⟩ := hf + refine ⟨hminus, hplus, heqplus, heqminus, δ, a, + (fun side => (hδ side).1), (fun side => (ha side).1), ?_, + (fun side => (hδ side).2), hf⟩ + intro side j + constructor + · have hj := (ha side).2.2.2 ⟨2 * j.val, by omega⟩ + simpa [finiteCoordinates, correctedFinite] using hj + · have hj := (ha side).2.2.2 ⟨2 * j.val + 1, by omega⟩ + simpa [finiteCoordinates, correctedFinite, Nat.add_div] using hj + +/-- Sharp radial Gaussian minorants have nonnegative Fourier transform, exact +lattice contacts, and the atomic construction when the parameter is at least one. -/ +theorem sharp_gaussian_minorants_with_construction (α : ℝ) (hα : 0 < α) : + ∃ f : SchwartzMap Plane ℝ, + Radial f ∧ (∀ x, f x ≤ gaussian α x) ∧ + (∀ w, (realFourier f w).im = 0 ∧ 0 ≤ (realFourier f w).re) ∧ + (∀ a ∈ A, a ≠ 0 → f a = gaussian α a) ∧ + (∀ w ∈ dualA, w ≠ 0 → realFourier f w = 0) ∧ + (1 ≤ α → AtomicConstruction α f) := by + obtain ⟨f, hradial, hminorant, hfourier, hcontact, hzero, hconstruction⟩ := + sharp_gaussian_minorants_atomic α hα + exact ⟨f, hradial, hminorant, hfourier, hcontact, hzero, + fun hlarge => (hconstruction hlarge).atomicConstruction⟩ + +end AtomicTriangular + +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Lattice/LatticeGeometry.lean b/lean/OAI/Analysis/Triangular/Lattice/LatticeGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef6a2398c083280a254317de8cca8e49407f184b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Lattice/LatticeGeometry.lean @@ -0,0 +1,101 @@ +import OAI.Analysis.Triangular.Energy.Mixtures +import OAI.Analysis.Triangular.Basic + +namespace OAI + +noncomputable section +open scoped BigOperators RealInnerProductSpace +namespace AtomicTriangular +lemma triangular_scale_eq : (Real.sqrt b)⁻¹=Real.sqrt (2/Real.sqrt 3) := by + rw [←Real.sqrt_inv] + congr 1 + simp [b,inv_div] +lemma triangularPoint_eq_support (v : ℤ × ℤ) : triangularPoint v=TriangularUniversal.triangularPoint v := by + unfold triangularPoint TriangularUniversal.triangularPoint + rw [triangular_scale_eq] + congr 2 + unfold b + ring_nf +lemma b_pos : 0 < b := by unfold b; positivity +lemma b_sq : b^2=3/4 := by + unfold b + rw [div_pow, Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3)] + norm_num +lemma triangularPoint_norm_sq (j k : ℤ) : + b*‖triangularPoint (j,k)‖^2=(j:ℝ)^2+(j:ℝ)*k+(k:ℝ)^2 := by + rw [triangularPoint_eq_support] + exact TriangularUniversal.triangularPoint_norm_sq j k +lemma A_eq_support : A=TriangularUniversal.triangularLattice := by + unfold A TriangularUniversal.triangularLattice + congr 1 + exact funext triangularPoint_eq_support +lemma eisenstein_mod36_finite : ∀ j k : Fin 36, + ((j.val:ℤ)^2+(j.val:ℤ)*k.val+(k.val:ℤ)^2)%36∈Construction.residues := by decide +kernel +lemma eisenstein_mod36 (j k : ℤ) : + (j^2+j*k+k^2)%36∈Construction.residues := by + let j' : Fin 36 := ⟨(j%36).toNat,by have := Int.emod_nonneg j (by norm_num : (36:ℤ)≠0); have := Int.emod_lt_of_pos j (by norm_num : (0:ℤ)<36); omega⟩ + let k' : Fin 36 := ⟨(k%36).toNat,by have := Int.emod_nonneg k (by norm_num : (36:ℤ)≠0); have := Int.emod_lt_of_pos k (by norm_num : (0:ℤ)<36); omega⟩ + have hj : (j'.val:ℤ)=j%36 := Int.toNat_of_nonneg (Int.emod_nonneg j (by norm_num)) + have hk : (k'.val:ℤ)=k%36 := Int.toNat_of_nonneg (Int.emod_nonneg k (by norm_num)) + have hh := eisenstein_mod36_finite j' k' + rw [hj,hk] at hh + simpa [Int.add_emod,Int.mul_emod,pow_two,Int.emod_emod] using hh +lemma A_radial_node {x : Plane} (hx : x∈A) (hx0 : x≠0) : + ∃ n : Construction.Node,Construction.radial x=n.val := by + obtain ⟨⟨j,k⟩,rfl⟩ := hx + let n : ℤ := j^2+j*k+k^2 + have he : Construction.radial (triangularPoint (j,k))=(n:ℝ) := by + change b*‖triangularPoint (j,k)‖^2=_ + rw [triangularPoint_norm_sq] + dsimp [n] + push_cast + rfl + have hn : 0 < n := by + have hp : 0 < Construction.radial (triangularPoint (j,k)) := + mul_pos b_pos (sq_pos_of_pos (norm_pos_iff.mpr hx0)) + rw [he] at hp + exact_mod_cast hp + exact ⟨⟨n,hn,eisenstein_mod36 j k⟩,he⟩ +lemma dualA_integer_coordinates {w : Plane} (hw : w∈dualA) : + ∃ j k : ℤ,w 0=(Real.sqrt b)*(j:ℝ) ∧ (Real.sqrt b)*w 1=(k:ℝ)-(j:ℝ)/2 := by + obtain ⟨j,hj⟩ := hw (triangularPoint (1,0)) ⟨(1,0),rfl⟩ + obtain ⟨k,hk⟩ := hw (triangularPoint (0,1)) ⟨(0,1),rfl⟩ + have hr : (Real.sqrt b)^2=b := Real.sq_sqrt b_pos.le + have hp : 0 < Real.sqrt b := Real.sqrt_pos.mpr b_pos + simp [triangularPoint,inner_smul_left,inner_add_left,EuclideanSpace.inner_single_left] at hj hk + refine ⟨j,k,?_,?_⟩ + · field_simp at hj + nlinarith + · field_simp at hj hk + apply (mul_left_cancel₀ hp.ne') + nlinarith [congrArg (fun t : ℝ => t*w 1) hr] +lemma dualA_radial_node {w : Plane} (hw : w∈dualA) (hw0 : w≠0) : + ∃ n : Construction.Node,Construction.radial w=n.val := by + obtain ⟨j,k,hj,hk⟩ := dualA_integer_coordinates hw + let n : ℤ := j^2-j*k+k^2 + have he : Construction.radial w=(n:ℝ) := by + change b*‖w‖^2=_ + rw [EuclideanSpace.norm_sq_eq,Fin.sum_univ_two] + simp only [Real.norm_eq_abs,sq_abs] + have hr : (Real.sqrt b)^2=b := Real.sq_sqrt b_pos.le + have hb := b_sq + have hk' := congrArg (fun t : ℝ => t^2) hk + rw [mul_pow,hr] at hk' + rw [hj,mul_pow,hr] + dsimp [n] + push_cast + nlinarith + have hn : 0 < n := by + have hpos : 0 < Construction.radial w := mul_pos b_pos (sq_pos_of_pos (norm_pos_iff.mpr hw0)) + rw [he] at hpos + exact_mod_cast hpos + have hm : n%36∈Construction.residues := by + convert eisenstein_mod36 j (-k) using 1 + dsimp [n] + congr 1 + ring + exact ⟨⟨n,hn,hm⟩,he⟩ +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Main.lean b/lean/OAI/Analysis/Triangular/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c673bde297afccf2f246051adc62a0b843eef2c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Main.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.Triangular.Schwartz.GaussianPair + +namespace OAI + +noncomputable section +open scoped BigOperators FourierTransform SchwartzMap lp +open Complex Matrix + +namespace AtomicTriangular.Construction + +end AtomicTriangular.Construction + +namespace AtomicTriangular.Construction + +lemma finiteCoordinates_coefficientInput (C : ℝ) (a : TrigonometricCoefficients) + (w : TailCoefficients) (i : Fin 22) : + finiteCoordinates (coefficientInput C a w) i = a i := by + unfold finiteCoordinates coefficientInput + split_ifs with hi + · exact congrArg (fun j : Fin 22 => a j) (Fin.ext (by dsimp; omega)) + · exact congrArg (fun j : Fin 22 => a j) (Fin.ext (by dsimp; omega)) + +lemma actualInput_fixed_zero (side : Fin 2) {z : ℝ} (hz : 0 < z) (hzB : z ≤ Z) : + (actualInput side z hz hzB).finiteC 0 = 11/25 ∧ + (actualInput side z hz hzB).finiteD 0 = 0 := by + constructor + · change finiteApprox side (actualParameter z) 0 + + extendFiniteError (actualFiniteError side z hz hzB) 0 = 11/25 + erw [finiteApprox_fixed side (actualParameter z) 0, + extendFiniteError_fixed (actualFiniteError side z hz hzB) 0, + add_zero, gamma_actual] + rfl + · change finiteApprox side (actualParameter z) 1 + + extendFiniteError (actualFiniteError side z hz hzB) 1 = 0 + erw [finiteApprox_fixed side (actualParameter z) 1, + extendFiniteError_fixed (actualFiniteError side z hz hzB) 1, + add_zero, gamma_actual] + rfl + +lemma largeGaussian_hasAtomicConstruction {α : ℝ} (hα : 1 ≤ α) : + HasAtomicConstruction α (largeGaussianPair hα).first := by + let z := gaussianZ α + have hz : 0 < z := (gaussianZ_bounds hα).1 + have hzB : z ≤ Z := (gaussianZ_bounds hα).2.le + refine ⟨FiniteCertificate.minusBlock_isUnit, FiniteCertificate.plusBlock_isUnit, + Uplus_equation, Uminus_equation, + (fun side => actualInput side z hz hzB), + (fun side i => actualFiniteError side z hz hzB i), ?_, ?_, ?_⟩ + · intro side + obtain ⟨hc, hd⟩ := actualInput_fixed_zero side hz hzB + refine ⟨rfl, hc, hd, ?_⟩ + intro i + dsimp only + rw [actualInput, finiteCoordinates_coefficientInput] + rfl + · intro side + refine ⟨?_, (actualInput side z hz hzB).summable, ?_⟩ + · simpa only [AtomicTriangular.L1Kernel.l1_norm, tsum_fintype] using + actualFiniteError_norm side hz hzB + · change (∑' n : TailNode, + (|actualTail side z hz hzB (n,0)| + |actualTail side z hz hzB (n,1)|)) < _ + rw [tail_pairs_norm] + exact actualTail_norm side hz hzB + · intro x + change ((((normalizingDen z)⁻¹ * + pairSchwartz (actualInput 0 z hz hzB) (actualInput 1 z hz hzB) x : ℝ) : ℂ)) = _ + rw [Complex.ofReal_mul, Complex.ofReal_inv, ← pairComplex_eq, fourier_inputComplex] + simp only [pairComplex, Pi.add_apply] + ring + +end AtomicTriangular.Construction + +namespace AtomicTriangular + +theorem sharp_gaussian_minorants_atomic (α : ℝ) (hα : 0 < α) : + ∃ f : SchwartzMap Plane ℝ, + Radial f ∧ (∀ x, f x ≤ gaussian α x) ∧ + (∀ w, (realFourier f w).im = 0 ∧ 0 ≤ (realFourier f w).re) ∧ + (∀ a ∈ A, a ≠ 0 → f a = gaussian α a) ∧ + (∀ w ∈ dualA, w ≠ 0 → realFourier f w = 0) ∧ + (1 ≤ α → Construction.HasAtomicConstruction α f) := by + let p := gaussianPair α hα + refine ⟨p.first, p.first_radial, p.minorant, ?_, ?_, ?_, ?_⟩ + · intro w + rw [p.fourier_first] + exact ⟨rfl, p.positive w⟩ + · intro a ha ha0 + obtain ⟨n, hn⟩ := A_radial_node ha ha0 + exact p.contact a n hn + · intro w hw hw0 + obtain ⟨n, hn⟩ := dualA_radial_node hw hw0 + rw [p.fourier_first, p.zeros w n hn, ofReal_zero] + · intro hlarge + change Construction.HasAtomicConstruction α (gaussianPair α hα).first + rw [gaussianPair, dite_eq_left hlarge] + exact Construction.largeGaussian_hasAtomicConstruction hlarge + +end AtomicTriangular + +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/FourierCLM.lean b/lean/OAI/Analysis/Triangular/Schwartz/FourierCLM.lean new file mode 100644 index 0000000000000000000000000000000000000000..646371e047972ac295e5a8bb71ccf031553245d4 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/FourierCLM.lean @@ -0,0 +1,104 @@ +import OAI.Analysis.Triangular.Schwartz.SpectralCLM + +namespace OAI + +noncomputable section +open scoped BigOperators Topology FourierTransform RealInnerProductSpace +open Complex Filter Set MeasureTheory GaussianFourier +namespace AtomicTriangular.Construction + +def lambdaFunction (k : ℝ) (hk : 0 < k) : C(Spectrum,ℂ) := + ⟨fun t => lambda k t.val, by + unfold lambda + apply Continuous.div + · fun_prop + · unfold waveDen; fun_prop + · intro t; exact_mod_cast (mul_pos b_pos (waveDen_pos hk t.val)).ne'⟩ + +def zetaFunction (k v : ℝ) (hk : 0 < k) : C(Spectrum,ℂ) := + ⟨fun t => I*Real.pi*zeta k v t.val, by + have hX : Continuous (Xwave k) := by + unfold Xwave + exact continuous_const.div (by unfold waveDen; fun_prop) (fun t => (waveDen_pos hk t).ne') + unfold zeta + fun_prop⟩ + +def transformedFunction (k v : ℝ) (hk : 0 < k) (s : ℂ) : C(Spectrum,ℂ) := + lambdaFunction k hk * NormedSpace.exp (s • zetaFunction k v hk) +lemma transformedFunction_apply (k v : ℝ) (hk : 0 < k) (s : ℂ) (t : Spectrum) : + transformedFunction k v hk s t = transformedWave k v t.val s := by + simp only [transformedFunction,ContinuousMap.mul_apply,exponential_apply] + change lambda k t.val * exp (s*(I*Real.pi*zeta k v t.val)) = _ + unfold transformedWave + congr 2 + ring +lemma differentiable_transformedFunction (k v : ℝ) (hk : 0 < k) : + Differentiable ℂ (transformedFunction k v hk) := + (differentiable_exp_smul_const ℂ (zetaFunction k v hk)).const_mul (lambdaFunction k hk) + +def atomFunction (k : ℝ) (x : Plane) : C(Spectrum,ℂ) := + exp (-(Real.pi:ℂ)*k*(radial x:ℂ)) • phaseFunction (radial x:ℂ) +def gaussian (k : ℝ) (x : Plane) : ℝ := Real.exp (-Real.pi*k*radial x) +lemma atomFunction_apply (k : ℝ) (x : Plane) (t : Spectrum) : + atomFunction k x t = exp (-(Real.pi:ℂ)*k*(radial x:ℂ))* + exp (I*Real.pi*(t.val:ℂ)*(radial x:ℂ)) := rfl +lemma continuous_atomFunction (k : ℝ) : Continuous (atomFunction k) := by + have hs : Continuous (fun x : Plane => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))) := by + unfold radial; fun_prop + have ht : Continuous (fun x : Plane => phaseFunction (radial x:ℂ)) := by + apply differentiable_phaseFunction.continuous.comp + unfold radial; fun_prop + simpa only [atomFunction] using! hs.smul ht +lemma atomFunction_bound (k : ℝ) (x : Plane) : ‖atomFunction k x‖ ≤ gaussian k x := by + apply (ContinuousMap.norm_le _ (by unfold gaussian; positivity)).mpr + intro t + rw [atomFunction_apply,norm_mul] + have hp : ‖exp (I*Real.pi*(t.val:ℂ)*(radial x:ℂ))‖ = 1 := by + rw [Complex.norm_exp] + simp + rw [hp,mul_one,Complex.norm_exp] + simp [gaussian] +lemma integrable_gaussian {k : ℝ} (hk : 0 < k) : Integrable (gaussian k) := by + have hc : 0 < ((Real.pi*k*b:ℝ):ℂ).re := by + simpa only [Complex.ofReal_re] using mul_pos (mul_pos Real.pi_pos hk) b_pos + have hi := (integrable_cexp_neg_mul_sq_norm_add hc 0 (0:Plane)).norm + convert! hi using 1 + ext x + simp [gaussian,radial,Complex.norm_exp,mul_assoc,pow_two] +lemma integrable_atomFunction {k : ℝ} (hk : 0 < k) : Integrable (atomFunction k) := + (integrable_gaussian hk).mono' (continuous_atomFunction k).aestronglyMeasurable + (ae_of_all _ (atomFunction_bound k)) +lemma clm_fourier {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace E] [CompleteSpace F] + (L : E →L[ℂ] F) (f : Plane → E) (hf : Integrable f) (w : Plane) : + 𝓕 (fun x => L (f x)) w = L (𝓕 f w) := by + simp only [Real.fourier_eq] + have hh := L.integral_comp_comm ((Real.fourierIntegral_convergent_iff w).mpr hf) + simpa only [Circle.smul_def,map_smul] using hh +lemma fourier_atomFunction {k : ℝ} (hk : 0 < k) (v : ℝ) (w : Plane) : + 𝓕 (atomFunction k) w = exp (-(Real.pi:ℂ)*v*(radial w:ℂ)) • + transformedFunction k v hk (radial w:ℂ) := by + ext t + have hh := clm_fourier (ContinuousMap.evalCLM ℂ t) (atomFunction k) (integrable_atomFunction hk) w + have ha := transformed_spectral_wave hk v t.val w + change 𝓕 (fun x => atomFunction k x t) w = (𝓕 (atomFunction k) w) t at hh + rw [← hh] + change 𝓕 (fun x => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))* + exp (I*Real.pi*(t.val:ℂ)*(radial x:ℂ))) w = + exp (-(Real.pi:ℂ)*v*(radial w:ℂ))*transformedFunction k v hk (radial w:ℂ) t + rw [transformedFunction_apply] + exact ha +lemma fourier_spectral (S : C(Spectrum,ℂ) →L[ℂ] ℂ) {k : ℝ} (hk : 0 < k) (v : ℝ) (w : Plane) : + 𝓕 (fun x => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))*S (phaseFunction (radial x:ℂ))) w = + exp (-(Real.pi:ℂ)*v*(radial w:ℂ))*S (transformedFunction k v hk (radial w:ℂ)) := by + have hh := clm_fourier S (atomFunction k) (integrable_atomFunction hk) w + have he : (fun x => S (atomFunction k x)) = + (fun x => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))*S (phaseFunction (radial x:ℂ))) := by + ext x + simp only [atomFunction,map_smul,smul_eq_mul] + rw [he,fourier_atomFunction hk v,map_smul] at hh + exact hh +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/FourierPair.lean b/lean/OAI/Analysis/Triangular/Schwartz/FourierPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..7af439b5e60c77575306d87882df3445f6857ac5 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/FourierPair.lean @@ -0,0 +1,98 @@ +import OAI.Analysis.Triangular.Schwartz.InputCLM +import OAI.Analysis.Triangular.Schwartz.FourierCLM +import OAI.Analysis.Triangular.Schwartz.Realness + +namespace OAI + +noncomputable section +open scoped BigOperators Topology FourierTransform ComplexConjugate SchwartzMap +open Complex MeasureTheory +namespace AtomicTriangular.Construction + +lemma h_pos : 0 < h := by norm_num [h] +lemma H_pos : 0 < H := by norm_num [H] + +def transformedInput (a : InputCoefficients) (s : ℂ) : ℂ := + tailSpectral a (transformedFunction h h h_pos s) + + finiteSpectral a (transformedFunction H h H_pos s) +def outputComplex (a : InputCoefficients) (x : Plane) : ℂ := + exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*transformedInput a (radial x) +lemma integrable_spectral (S : C(Spectrum,ℂ) →L[ℂ] ℂ) {k : ℝ} (hk : 0 < k) : + Integrable (fun x : Plane => exp (-(Real.pi:ℂ)*k*(radial x:ℂ))*S (phaseFunction (radial x:ℂ))) := by + have hh := S.integrable_comp (integrable_atomFunction hk) + simpa only [atomFunction,map_smul,smul_eq_mul,Function.comp_def] using hh +lemma inputComplex_spectral (a : InputCoefficients) (x : Plane) : inputComplex a x = + exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*tailSpectral a (phaseFunction (radial x:ℂ)) + + exp (-(Real.pi:ℂ)*H*(radial x:ℂ))*finiteSpectral a (phaseFunction (radial x:ℂ)) := by + rw [tailSpectral_phase,finiteSpectral_phase] + rfl +lemma fourier_inputComplex (a : InputCoefficients) : 𝓕 (inputComplex a) = outputComplex a := by + ext w + simp only [Real.fourier_eq,inputComplex_spectral,smul_add] + rw [integral_add ((Real.fourierIntegral_convergent_iff w).mpr (integrable_spectral (tailSpectral a) h_pos)) + ((Real.fourierIntegral_convergent_iff w).mpr (integrable_spectral (finiteSpectral a) H_pos))] + change 𝓕 (fun x => exp (-(Real.pi:ℂ)*h*(radial x:ℂ))*tailSpectral a (phaseFunction (radial x:ℂ))) w + + 𝓕 (fun x => exp (-(Real.pi:ℂ)*H*(radial x:ℂ))*finiteSpectral a (phaseFunction (radial x:ℂ))) w = _ + rw [fourier_spectral _ h_pos h,fourier_spectral _ H_pos h] + simp only [outputComplex,transformedInput,mul_add] + +lemma coe_complexInputSchwartz (a : InputCoefficients) : + (complexInputSchwartz a : Plane → ℂ) = inputComplex a := funext (complexInputSchwartz_apply a) +lemma coe_fourier_input (a : InputCoefficients) : + ((𝓕 (complexInputSchwartz a) : 𝓢(Plane,ℂ)) : Plane → ℂ) = outputComplex a := by + rw [SchwartzMap.fourier_coe,coe_complexInputSchwartz,fourier_inputComplex] +lemma outputComplex_real (a : InputCoefficients) (x : Plane) : conj (outputComplex a x) = outputComplex a x := by + rw [← fourier_inputComplex] + exact fourier_conj_even _ (inputComplex_real a) (inputComplex_even a) x +lemma inputComplex_radial (a : InputCoefficients) (x y : Plane) (hxy : ‖x‖=‖y‖) : inputComplex a x = inputComplex a y := by + simp only [inputComplex,radial,hxy] +lemma outputComplex_radial (a : InputCoefficients) (x y : Plane) (hxy : ‖x‖=‖y‖) : outputComplex a x = outputComplex a y := by + simp only [outputComplex,radial,hxy] +lemma fourier_outputComplex (a : InputCoefficients) : 𝓕 (outputComplex a) = inputComplex a := by + have hh := (complexInputSchwartz a).continuous.fourierInv_fourier_eq + (complexInputSchwartz a).integrable (𝓕 (complexInputSchwartz a)).integrable + rw [coe_complexInputSchwartz,fourier_inputComplex,Real.fourierInv_eq_fourier_comp_neg] at hh + have he : (fun x => outputComplex a (-x)) = outputComplex a := by + ext x + exact outputComplex_radial a (-x) x (norm_neg x) + rwa [he] at hh + +def pairComplex (a₁ a₂ : InputCoefficients) : Plane → ℂ := inputComplex a₁ + outputComplex a₂ +def pairSchwartz (a₁ a₂ : InputCoefficients) : 𝓢(Plane,ℝ) := + (complexInputSchwartz a₁ + 𝓕 (complexInputSchwartz a₂)).postcompCLM Complex.reCLM +lemma pairSchwartz_apply (a₁ a₂ : InputCoefficients) (x : Plane) : + pairSchwartz a₁ a₂ x = (pairComplex a₁ a₂ x).re := by + simp only [pairSchwartz,SchwartzMap.postcompCLM_apply,Complex.reCLM_apply,add_apply, + coe_fourier_input,complexInputSchwartz_apply,pairComplex,Pi.add_apply] +lemma pairComplex_real (a₁ a₂ : InputCoefficients) (x : Plane) : conj (pairComplex a₁ a₂ x) = pairComplex a₁ a₂ x := by + simp only [pairComplex,Pi.add_apply,map_add,inputComplex_real,outputComplex_real] +lemma pairComplex_eq (a₁ a₂ : InputCoefficients) (x : Plane) : + pairComplex a₁ a₂ x = (pairSchwartz a₁ a₂ x:ℂ) := by + rw [pairSchwartz_apply] + exact (Complex.conj_eq_iff_re.mp (pairComplex_real a₁ a₂ x)).symm +lemma fourier_pairComplex (a₁ a₂ : InputCoefficients) : 𝓕 (pairComplex a₁ a₂) = pairComplex a₂ a₁ := by + have hi : Integrable (inputComplex a₁) := by + rw [← coe_complexInputSchwartz] + exact (complexInputSchwartz a₁).integrable + have ho : Integrable (outputComplex a₂) := by + rw [← coe_fourier_input] + exact (𝓕 (complexInputSchwartz a₂)).integrable + ext w + simp only [pairComplex,Pi.add_apply,Real.fourier_eq,smul_add] + rw [integral_add ((Real.fourierIntegral_convergent_iff w).mpr hi) + ((Real.fourierIntegral_convergent_iff w).mpr ho)] + change 𝓕 (inputComplex a₁) w + 𝓕 (outputComplex a₂) w = _ + rw [fourier_inputComplex,fourier_outputComplex] + exact add_comm _ _ +lemma pairSchwartz_radial (a₁ a₂ : InputCoefficients) : Radial (pairSchwartz a₁ a₂) := by + intro x y hxy + simp only [pairSchwartz_apply,pairComplex,Pi.add_apply,inputComplex_radial a₁ x y hxy, + outputComplex_radial a₂ x y hxy] +lemma pairSchwartz_fourier (a₁ a₂ : InputCoefficients) (w : Plane) : + realFourier (pairSchwartz a₁ a₂) w = (pairSchwartz a₂ a₁ w:ℂ) := by + simp only [realFourier,← pairComplex_eq] + rw [fourier_pairComplex,pairComplex_eq] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/Gaussian.lean b/lean/OAI/Analysis/Triangular/Schwartz/Gaussian.lean new file mode 100644 index 0000000000000000000000000000000000000000..b07bd0ac98256457297ea101b1e75e486add5d34 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/Gaussian.lean @@ -0,0 +1,114 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped SchwartzMap +namespace AtomicTriangular.Analysis + +lemma polynomial_gaussian_bound {c : ℝ} (hc : 0 < c) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ r : ℝ, 0 ≤ r → (1+r)^m * Real.exp (-c*r^2) ≤ C := by + let B : ℝ := 2+c⁻¹ + refine ⟨B^m*(m.factorial:ℝ)*Real.exp 1, by positivity, ?_⟩ + intro r hr + have hc' : 0 < c⁻¹ := inv_pos.mpr hc + have hB : 0 ≤ B := by dsimp [B]; positivity + have h : 1+r ≤ B*(1+c*r^2) := by + dsimp [B] + have hsq := sq_nonneg (r-1) + have hmul : c⁻¹*c=1 := inv_mul_cancel₀ hc.ne' + nlinarith [sq_nonneg r, mul_nonneg hc.le (sq_nonneg r)] + have hp : (1+c*r^2)^m ≤ (m.factorial:ℝ)*Real.exp (1+c*r^2) := by + have hh := Real.pow_div_factorial_le_exp (1+c*r^2) (by positivity : 0 ≤ 1+c*r^2) m + exact (div_le_iff₀ (by positivity : (0 : ℝ) < (m.factorial : ℝ))).mp hh |>.trans_eq (mul_comm _ _) + calc + (1+r)^m * Real.exp (-c*r^2) ≤ (B*(1+c*r^2))^m * Real.exp (-c*r^2) := by gcongr + _ = B^m * ((1+c*r^2)^m * Real.exp (-c*r^2)) := by rw [mul_pow]; ring + _ ≤ B^m * (((m.factorial:ℝ)*Real.exp (1+c*r^2))*Real.exp (-c*r^2)) := by gcongr + _ = B^m*(m.factorial:ℝ)*Real.exp 1 := by + rw [mul_assoc (m.factorial:ℝ), ← Real.exp_add] + rw [show 1+c*r^2 + -c*r^2 = 1 by ring] + ring + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma gaussian_schwartz_decay {c : ℝ} (hc : 0 < c) (k n : ℕ) : + ∃ C : ℝ, ∀ x : E, ‖x‖^k * ‖iteratedFDeriv ℝ n (fun y : E => Real.exp (-c*‖y‖^2)) x‖ ≤ C := by + have ht : (fun x : E => -c*‖x‖^2).HasTemperateGrowth := by fun_prop + obtain ⟨l,B,hB,hder⟩ := ht.norm_iteratedFDeriv_le_uniform n + obtain ⟨C,hC,hCbound⟩ := polynomial_gaussian_bound hc (k+l*n) + refine ⟨(n.factorial:ℝ)*(B+1)^n*C, fun x => ?_⟩ + have hw : 1 ≤ (B+1)*(1+‖x‖)^l := by + have hh : 1 ≤ (1+‖x‖)^l := one_le_pow₀ (by linarith [norm_nonneg x]) + nlinarith + have hD (i : ℕ) (hi : 1 ≤ i) (hin : i ≤ n) : + ‖iteratedFDeriv ℝ i (fun x : E => -c*‖x‖^2) x‖ ≤ ((B+1)*(1+‖x‖)^l)^i := by + calc + _ ≤ B*(1+‖x‖)^l := hder i hin x + _ ≤ (B+1)*(1+‖x‖)^l := by gcongr; linarith + _ ≤ ((B+1)*(1+‖x‖)^l)^i := le_self_pow₀ hw (by omega) + have hexp (i : ℕ) (_hi : i ≤ n) : + ‖iteratedFDeriv ℝ i Real.exp (-c*‖x‖^2)‖ ≤ Real.exp (-c*‖x‖^2) := by + rw [norm_iteratedFDeriv_eq_norm_iteratedDeriv,iteratedDeriv_eq_iterate,Real.iter_deriv_exp] + exact le_of_eq (Real.norm_of_nonneg (Real.exp_pos _).le) + have hd := norm_iteratedFDeriv_comp_le (𝕜 := ℝ) Real.contDiff_exp ht.1 (by exact_mod_cast (show (n : ℕ∞) ≤ ⊤ from le_top)) x hexp hD + calc + _ ≤ ‖x‖^k * ((n.factorial:ℝ)*Real.exp (-c*‖x‖^2)*((B+1)*(1+‖x‖)^l)^n) := + mul_le_mul_of_nonneg_left hd (by positivity) + _ ≤ (1+‖x‖)^k * ((n.factorial:ℝ)*Real.exp (-c*‖x‖^2)*((B+1)*(1+‖x‖)^l)^n) := by gcongr; linarith + _ = (n.factorial:ℝ)*(B+1)^n*((1+‖x‖)^(k+l*n)*Real.exp (-c*‖x‖^2)) := by + rw [mul_pow,pow_add,pow_mul] + ring + _ ≤ (n.factorial:ℝ)*(B+1)^n*C := by gcongr; exact hCbound ‖x‖ (norm_nonneg _) + +def gaussianSchwartz (c : ℝ) (hc : 0 < c) : 𝓢(E,ℝ) where + toFun x := Real.exp (-c*‖x‖^2) + smooth' := Real.contDiff_exp.comp (contDiff_const.mul (contDiff_norm_sq ℝ)) + decay' := gaussian_schwartz_decay hc + +@[simp] lemma gaussianSchwartz_apply (c : ℝ) (hc : 0 < c) (x : E) : + gaussianSchwartz c hc x = Real.exp (-c*‖x‖^2) := rfl + +lemma iteratedDeriv_real_of_complex {f : ℂ → ℂ} (hf : Differentiable ℂ f) (n : ℕ) : + iteratedDeriv n (fun x : ℝ => (f x).re) = fun x : ℝ => (iteratedDeriv n f x).re := by + induction n with + | zero => simp only [iteratedDeriv_zero] + | succ n ih => + rw [iteratedDeriv_succ, ih, iteratedDeriv_succ] + funext x + exact ((hf.contDiff (n := ⊤)).differentiable_iteratedDeriv n (by simp) (x : ℂ)).hasDerivAt.real_of_complex.deriv + +lemma entire_real_temperate {f : ℂ → ℂ} (hf : Differentiable ℂ f) + (hstrip : ∃ M : ℝ, ∀ z : ℂ, |z.im| ≤ 1 → ‖f z‖ ≤ M) : + Function.HasTemperateGrowth (fun x : ℝ => (f x).re) := by + obtain ⟨M,hM⟩ := hstrip + refine ⟨hf.contDiff.real_of_complex, fun n => ⟨0,(n.factorial:ℝ)*M,?_⟩⟩ + intro x + rw [pow_zero,mul_one,norm_iteratedFDeriv_eq_norm_iteratedDeriv,iteratedDeriv_real_of_complex hf] + apply (Complex.abs_re_le_norm _).trans + have hh := Complex.norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le (f := f) n + (by norm_num : (0:ℝ)<1) hf.diffContOnCl (c := (x:ℂ)) (C := M) (fun z hz => hM z (by + have hi := Complex.abs_im_le_norm (z-(x:ℂ)) + have he := Metric.mem_sphere.mp hz + simpa only [Complex.sub_im,Complex.ofReal_im,sub_zero,← dist_eq_norm,he] using hi)) + simpa using hh + +def dampedEntireSchwartz (c : ℝ) (hc : 0 < c) (b : ℝ) (f : ℂ → ℂ) + (_hf : Differentiable ℂ f) (_hstrip : ∃ M : ℝ, ∀ z : ℂ, |z.im| ≤ 1 → ‖f z‖ ≤ M) : 𝓢(E,ℝ) := + SchwartzMap.smulLeftCLM ℝ (fun x : E => (f (b*‖x‖^2)).re) (gaussianSchwartz c hc) + +lemma dampedEntireSchwartz_apply (c : ℝ) (hc : 0 < c) (b : ℝ) (f : ℂ → ℂ) + (hf : Differentiable ℂ f) (hstrip : ∃ M : ℝ, ∀ z : ℂ, |z.im| ≤ 1 → ‖f z‖ ≤ M) (x : E) : + dampedEntireSchwartz c hc b f hf hstrip x = Real.exp (-c*‖x‖^2)*(f (b*‖x‖^2)).re := by + have ht := entire_real_temperate hf hstrip + have hg : Function.HasTemperateGrowth (fun x : E => (f (b*‖x‖^2)).re) := by + convert ht.comp (by fun_prop : Function.HasTemperateGrowth (fun x : E => b*‖x‖^2)) using 1 + funext x + simp + rw [dampedEntireSchwartz,SchwartzMap.smulLeftCLM_apply_apply hg,gaussianSchwartz_apply] + simp [mul_comm] + +end AtomicTriangular.Analysis +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/GaussianPair.lean b/lean/OAI/Analysis/Triangular/Schwartz/GaussianPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ab6c0f49c6d468f5da58416cb836e058d64d693 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/GaussianPair.lean @@ -0,0 +1,135 @@ +import OAI.Analysis.Triangular.Construction.Normalization +import OAI.Analysis.Triangular.Lattice.LatticeGeometry + +namespace OAI + +noncomputable section +open scoped FourierTransform SchwartzMap +open Complex MeasureTheory +namespace AtomicTriangular +open Construction + +def gaussianSchwartz (α : ℝ) (hα : 0<α) : 𝓢(Plane,ℝ) := + Analysis.gaussianSchwartz (Real.pi*α) (mul_pos Real.pi_pos hα) +lemma gaussianSchwartz_apply (α : ℝ) (hα : 0<α) (x : Plane) : + gaussianSchwartz α hα x=gaussian α x := by + simp only [gaussianSchwartz,Analysis.gaussianSchwartz_apply,gaussian,neg_mul] +lemma gaussianSchwartz_coe (α : ℝ) (hα : 0<α) : + (gaussianSchwartz α hα : Plane → ℝ)=gaussian α := funext (gaussianSchwartz_apply α hα) +lemma gaussian_radial (α : ℝ) : Radial (gaussian α) := by + intro x y hxy + simp only [gaussian,hxy] +lemma realFourier_gaussian {α : ℝ} (hα : 0<α) (w : Plane) : + realFourier (gaussian α) w=(α⁻¹*gaussian α⁻¹ w:ℝ) := by + have he : (fun x => (gaussian α x:ℂ))=(fun x : Plane => exp (-(Real.pi:ℂ)*(α:ℂ)*‖x‖^2)) := by + ext x + simp [gaussian] + rw [realFourier,he,complex_gaussian_transform (α:ℂ) hα] + simp only [gaussian,ofReal_mul,ofReal_inv] + congr 1 + rw [ofReal_exp] + congr 1 + push_cast + ring +lemma realFourier_smul (c : ℝ) (f : Plane → ℝ) (w : Plane) : + realFourier (c • f) w=(c:ℂ)*realFourier f w := by + unfold realFourier + simp only [Pi.smul_apply,smul_eq_mul,ofReal_mul] + change 𝓕 ((c:ℂ) • (fun x => (f x:ℂ))) w=_ + rw [complex_fourier_smul] + rfl +lemma realFourier_sub (f g : 𝓢(Plane,ℝ)) (w : Plane) : + realFourier ((f-g : 𝓢(Plane,ℝ)) : Plane → ℝ) w=realFourier f w-realFourier g w := by + have hf : Integrable (fun x => (f x:ℂ)) := f.integrable.ofReal + have hg : Integrable (fun x => (g x:ℂ)) := g.integrable.ofReal + simp only [realFourier,sub_apply,ofReal_sub,Real.fourier_eq,smul_sub] + rw [integral_sub ((Real.fourierIntegral_convergent_iff w).mpr hf) + ((Real.fourierIntegral_convergent_iff w).mpr hg)] + +structure GaussianPair (α : ℝ) where + first : 𝓢(Plane,ℝ) + second : 𝓢(Plane,ℝ) + first_radial : Radial first + second_radial : Radial second + fourier_first : ∀ w, realFourier first w=(second w:ℂ) + fourier_second : ∀ w, realFourier second w=(first w:ℂ) + minorant : ∀ x, first x ≤ gaussian α x + positive : ∀ x, 0 ≤ second x + contact : ∀ x (n : Construction.Node), Construction.radial x=n.val → first x=gaussian α x + zeros : ∀ x (n : Construction.Node), Construction.radial x=n.val → second x=0 + +def largeGaussianPair {α : ℝ} (hα : 1 ≤ α) : GaussianPair α where + first := actualSchwartz 0 (gaussianZ α) (gaussianZ_bounds hα).1 (gaussianZ_bounds hα).2.le + second := actualSchwartz 1 (gaussianZ α) (gaussianZ_bounds hα).1 (gaussianZ_bounds hα).2.le + first_radial := actualSchwartz_radial 0 _ _ + second_radial := actualSchwartz_radial 1 _ _ + fourier_first := actualSchwartz_fourier _ _ + fourier_second := actualSchwartz_fourier_side 1 _ _ + minorant x := (actualSchwartz_signs hα x).1 + positive x := (actualSchwartz_signs hα x).2 + contact x n hx := (actualSchwartz_node hα x n hx).1 + zeros x n hx := (actualSchwartz_node hα x n hx).2 + +def reciprocalGaussianPair {α : ℝ} (hα : 0<α) (p : GaussianPair α⁻¹) : GaussianPair α where + first := gaussianSchwartz α hα-α⁻¹ • p.second + second := α⁻¹ • (gaussianSchwartz α⁻¹ (inv_pos.mpr hα)-p.first) + first_radial := by + intro x y hxy + simp only [sub_apply,smul_apply,smul_eq_mul,gaussianSchwartz_apply, + gaussian_radial α x y hxy,p.second_radial x y hxy] + second_radial := by + intro x y hxy + simp only [sub_apply,smul_apply,smul_eq_mul,gaussianSchwartz_apply, + gaussian_radial α⁻¹ x y hxy,p.first_radial x y hxy] + fourier_first w := by + rw [realFourier_sub,gaussianSchwartz_coe] + change realFourier (gaussian α) w-realFourier (α⁻¹ • (p.second:Plane → ℝ)) w=_ + rw [realFourier_gaussian hα,realFourier_smul,p.fourier_second] + simp only [smul_apply,sub_apply,smul_eq_mul,gaussianSchwartz_apply,ofReal_mul,ofReal_sub] + ring + fourier_second w := by + change realFourier (α⁻¹ • ((gaussianSchwartz α⁻¹ (inv_pos.mpr hα)-p.first : 𝓢(Plane,ℝ)):Plane → ℝ)) w=_ + rw [realFourier_smul,realFourier_sub,gaussianSchwartz_coe] + rw [realFourier_gaussian (inv_pos.mpr hα),p.fourier_first,inv_inv] + simp only [sub_apply,smul_apply,smul_eq_mul,gaussianSchwartz_apply,ofReal_mul,ofReal_sub,ofReal_inv] + field_simp [hα.ne'] + minorant x := by + change gaussianSchwartz α hα x-α⁻¹*p.second x ≤ _ + rw [gaussianSchwartz_apply] + exact sub_le_self _ (mul_nonneg (inv_nonneg.mpr hα.le) (p.positive x)) + positive x := by + change 0 ≤ α⁻¹*(gaussianSchwartz α⁻¹ (inv_pos.mpr hα) x-p.first x) + rw [gaussianSchwartz_apply] + exact mul_nonneg (inv_nonneg.mpr hα.le) (sub_nonneg.mpr (p.minorant x)) + contact x n hx := by + change gaussianSchwartz α hα x-α⁻¹*p.second x=_ + rw [p.zeros x n hx,mul_zero,sub_zero,gaussianSchwartz_apply] + zeros x n hx := by + change α⁻¹*(gaussianSchwartz α⁻¹ (inv_pos.mpr hα) x-p.first x)=0 + rw [p.contact x n hx,gaussianSchwartz_apply,sub_self,mul_zero] + +def gaussianPair (α : ℝ) (hα : 0<α) : GaussianPair α := + if h : 1 ≤ α then largeGaussianPair h else + reciprocalGaussianPair hα (largeGaussianPair ((one_le_inv₀ hα).mpr (le_of_not_ge h))) + +theorem sharp_gaussian_minorants (α : ℝ) (hα : 0 < α) : + ∃ f : SchwartzMap Plane ℝ, + Radial f ∧ (∀ x, f x ≤ gaussian α x) ∧ + (∀ w, (realFourier f w).im = 0 ∧ 0 ≤ (realFourier f w).re) ∧ + (∀ a ∈ A, a ≠ 0 → f a = gaussian α a) ∧ + (∀ w ∈ dualA, w ≠ 0 → realFourier f w = 0) := by + let p := gaussianPair α hα + refine ⟨p.first,p.first_radial,p.minorant,?_,?_,?_⟩ + · intro w + rw [p.fourier_first] + exact ⟨rfl,p.positive w⟩ + · intro a ha ha0 + obtain ⟨n,hn⟩ := A_radial_node ha ha0 + exact p.contact a n hn + · intro w hw hw0 + obtain ⟨n,hn⟩ := dualA_radial_node hw hw0 + rw [p.fourier_first,p.zeros w n hn,ofReal_zero] +end AtomicTriangular +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/InputCLM.lean b/lean/OAI/Analysis/Triangular/Schwartz/InputCLM.lean new file mode 100644 index 0000000000000000000000000000000000000000..70d8d013c34c2679106d733e6812d400f1ee7a3c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/InputCLM.lean @@ -0,0 +1,87 @@ +import OAI.Analysis.Triangular.Schwartz.SpectralCLM + +namespace OAI + +noncomputable section +open scoped BigOperators Topology +open Complex Filter Set MeasureTheory +namespace AtomicTriangular.Construction + +def tailVariation : ℝ := cVariation+dVariation +lemma tailVariation_nonneg : 0 ≤ tailVariation := by + unfold tailVariation cVariation dVariation coeffAbs + positivity +lemma tailSpectral_term_bound (a : InputCoefficients) (n : TailNode) : + ‖(a.tailC n:ℂ) • spectralCCLM n.val + (a.tailD n:ℂ) • spectralDCLM n.val‖ ≤ + (|a.tailC n|+|a.tailD n|)*tailVariation := by + have hc : cVariation ≤ tailVariation := by + exact le_add_of_nonneg_right (by unfold dVariation coeffAbs; positivity) + have hd : dVariation ≤ tailVariation := by + exact le_add_of_nonneg_left (by unfold cVariation coeffAbs; positivity) + calc + _ ≤ ‖(a.tailC n:ℂ) • spectralCCLM n.val‖ + ‖(a.tailD n:ℂ) • spectralDCLM n.val‖ := by + convert! norm_add_le ((a.tailC n:ℂ) • spectralCCLM n.val) ((a.tailD n:ℂ) • spectralDCLM n.val) using 1 + _ ≤ |a.tailC n| * ‖spectralCCLM n.val‖ + |a.tailD n| * ‖spectralDCLM n.val‖ := by + have hn (r : ℝ) (T : C(Spectrum,ℂ) →L[ℂ] ℂ) : ‖(r:ℂ) • T‖ ≤ |r| * ‖T‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (mul_nonneg (abs_nonneg r) (norm_nonneg T)) + intro f + change ‖(r:ℂ) * T f‖ ≤ _ + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs, mul_assoc] + exact mul_le_mul_of_nonneg_left (T.le_opNorm f) (abs_nonneg r) + exact add_le_add (hn _ _) (hn _ _) + _ ≤ |a.tailC n| *tailVariation+|a.tailD n| *tailVariation := + add_le_add (mul_le_mul_of_nonneg_left ((spectralCCLM_norm n.val).trans hc) (abs_nonneg _)) + (mul_le_mul_of_nonneg_left ((spectralDCLM_norm n.val).trans hd) (abs_nonneg _)) + _ = _ := by ring + +lemma summable_tailSpectral (a : InputCoefficients) : + Summable (fun n => (a.tailC n:ℂ) • spectralCCLM n.val + (a.tailD n:ℂ) • spectralDCLM n.val) := + Summable.of_norm_bounded (E := C(Spectrum,ℂ) →L[ℂ] ℂ) + (f := fun n => (a.tailC n:ℂ) • spectralCCLM n.val + (a.tailD n:ℂ) • spectralDCLM n.val) + (a.summable.mul_right tailVariation) (tailSpectral_term_bound a) + +def tailSpectral (a : InputCoefficients) : C(Spectrum,ℂ) →L[ℂ] ℂ := + (a.C:ℂ) • spectralPCLM + ∑' n : TailNode, + ((a.tailC n:ℂ) • spectralCCLM n.val + (a.tailD n:ℂ) • spectralDCLM n.val) + +lemma tailSpectral_apply (a : InputCoefficients) (f : C(Spectrum,ℂ)) : + tailSpectral a f = (a.C:ℂ)*spectralP f + + ∑' n : TailNode, ((a.tailC n:ℂ)*spectralC n.val f + (a.tailD n:ℂ)*spectralD n.val f) := by + have ht := (ContinuousLinearMap.apply ℂ ℂ f).map_tsum (summable_tailSpectral a) + simpa only [tailSpectral,add_apply, smul_apply, + ContinuousLinearMap.apply_apply,smul_eq_mul,spectralPCLM_apply, + spectralCCLM_apply,spectralDCLM_apply] using congrArg (fun x => (a.C:ℂ)*spectralP f+x) ht + +lemma tailSpectral_phase (a : InputCoefficients) (s : ℂ) : + tailSpectral a (phaseFunction s) = tailInput a s := by + simp only [tailSpectral_apply,spectralP_phase,spectralC_phase,spectralD_phase,tailInput] + +def atomSpectral (S : Fin 31 → ℂ) : C(Spectrum,ℂ) →L[ℂ] ℂ := + ∑ j : Fin 31, S j • ContinuousMap.evalCLM ℂ ⟨frequency j,frequency_mem j⟩ +lemma atomSpectral_apply (S : Fin 31 → ℂ) (f : C(Spectrum,ℂ)) : + atomSpectral S f = ∑ j : Fin 31, S j*f ⟨frequency j,frequency_mem j⟩ := by + simp [atomSpectral] + +lemma atomSpectral_finiteC_phase (j : Fin 15) (s : ℂ) : + atomSpectral (FiniteCertificate.cCoefficient j) (phaseFunction s) = finiteC j s := by + rw [atomSpectral_apply,FiniteCertificate.finiteC_fourier] + rfl +lemma atomSpectral_finiteD_phase (j : Fin 15) (s : ℂ) : + atomSpectral (FiniteCertificate.dCoefficient j) (phaseFunction s) = finiteD j s := by + rw [atomSpectral_apply,FiniteCertificate.finiteD_fourier] + rfl + +def finiteSpectral (a : InputCoefficients) : C(Spectrum,ℂ) →L[ℂ] ℂ := + ∑ j : Fin 11, + ((a.finiteC j:ℂ) • atomSpectral (FiniteCertificate.cCoefficient ⟨j.val,by omega⟩) + + (a.finiteD j:ℂ) • atomSpectral (FiniteCertificate.dCoefficient ⟨j.val,by omega⟩)) + +lemma finiteSpectral_phase (a : InputCoefficients) (s : ℂ) : + finiteSpectral a (phaseFunction s) = finiteInput a s := by + simp only [finiteSpectral,sum_apply,add_apply, + smul_apply,smul_eq_mul,atomSpectral_finiteC_phase,atomSpectral_finiteD_phase,finiteInput] + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/Realness.lean b/lean/OAI/Analysis/Triangular/Schwartz/Realness.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f430484bca5e4a84b3bde5fea9a234278f66df9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/Realness.lean @@ -0,0 +1,78 @@ +import OAI.Analysis.Triangular.Schwartz.Regularity + +namespace OAI + +noncomputable section +open scoped BigOperators Topology FourierTransform ComplexConjugate SchwartzMap +open Complex MeasureTheory +namespace AtomicTriangular.Construction + +lemma P_conj (s : ℂ) : conj (P s) = P (conj s) := by + simp only [P,sineFactor,map_prod,map_pow,map_mul,← Complex.sin_conj,map_sub, + Complex.conj_ofReal,map_ofNat,map_intCast] + +lemma dslope_conj_real {f : ℂ → ℂ} (hf : ∀ s, conj (f s) = f (conj s)) + (r : ℝ) (s : ℂ) : conj (dslope f (r:ℂ) s) = dslope f (r:ℂ) (conj s) := by + have he : conj ∘ f ∘ conj = f := by + ext z + simp only [Function.comp_apply,hf,RCLike.conj_conj] + have hd := congrFun (deriv_conj_conj (f := f)) (r:ℂ) + rw [he] at hd + simp only [Function.comp_apply,Complex.conj_ofReal] at hd + by_cases hs : s = (r:ℂ) + · subst s + simpa only [Complex.conj_ofReal,dslope_same] using hd.symm + · have hc : conj s ≠ (r:ℂ) := by + intro h; apply hs + have hh := congrArg conj h + simpa using hh + rw [dslope_of_ne _ hs,dslope_of_ne _ hc] + simp only [slope_def_field,map_div₀,map_sub,hf,Complex.conj_ofReal] + +lemma dBasis_conj (n : Node) (s : ℂ) : conj (dBasis n s) = dBasis n (conj s) := by + simpa only [dBasis,Complex.ofReal_intCast] using dslope_conj_real P_conj (n.val:ℝ) s +lemma cBasis_conj (n : Node) (s : ℂ) : conj (cBasis n s) = cBasis n (conj s) := by + simpa only [cBasis,Complex.ofReal_intCast] using dslope_conj_real (dBasis_conj n) (n.val:ℝ) s +lemma finiteC_conj (j : Fin 15) (s : ℂ) : conj (finiteC j s) = finiteC j (conj s) := by + simp only [finiteC,sineFactor,map_prod,map_pow,map_mul,← Complex.sin_conj,map_sub, + Complex.conj_ofReal,map_ofNat,map_intCast] +lemma finiteD_conj (j : Fin 15) (s : ℂ) : conj (finiteD j s) = finiteD j (conj s) := by + simp only [finiteD,sineFactor,map_prod,map_pow,map_mul,← Complex.sin_conj,← Complex.cos_conj,map_sub, + Complex.conj_ofReal,map_ofNat,map_intCast] +lemma tailInput_conj (a : InputCoefficients) (s : ℂ) : conj (tailInput a s) = tailInput a (conj s) := by + simp only [tailInput,map_add,map_mul,Complex.conj_ofReal,P_conj,Complex.conj_tsum,cBasis_conj,dBasis_conj] +lemma finiteInput_conj (a : InputCoefficients) (s : ℂ) : conj (finiteInput a s) = finiteInput a (conj s) := by + simp only [finiteInput,map_sum,map_add,map_mul,Complex.conj_ofReal,finiteC_conj,finiteD_conj] + +lemma inputComplex_real (a : InputCoefficients) (x : Plane) : conj (inputComplex a x) = inputComplex a x := by + simp only [inputComplex,map_add,map_mul,← Complex.exp_conj,map_neg,Complex.conj_ofReal,tailInput_conj,finiteInput_conj] +lemma inputComplex_re (a : InputCoefficients) (x : Plane) : (inputComplex a x).re = inputSchwartz a x := by + rw [inputSchwartz_apply] + simp [inputComplex,Complex.mul_re,← Complex.ofReal_mul,← Complex.ofReal_neg,Complex.exp_ofReal_re] +lemma inputComplex_eq (a : InputCoefficients) (x : Plane) : inputComplex a x = (inputSchwartz a x:ℂ) := by + rw [← inputComplex_re] + exact (Complex.conj_eq_iff_re.mp (inputComplex_real a x)).symm + +def complexInputSchwartz (a : InputCoefficients) : 𝓢(Plane,ℂ) := + SchwartzMap.postcompCLM Complex.ofRealCLM (inputSchwartz a) +lemma complexInputSchwartz_apply (a : InputCoefficients) (x : Plane) : + complexInputSchwartz a x = inputComplex a x := by + exact (inputComplex_eq a x).symm + +lemma radial_neg (x : Plane) : radial (-x) = radial x := by simp [radial] +lemma inputComplex_even (a : InputCoefficients) (x : Plane) : inputComplex a (-x) = inputComplex a x := by + simp only [inputComplex,radial_neg] +lemma fourier_conj_even (f : Plane → ℂ) (hre : ∀ x, conj (f x) = f x) + (hev : ∀ x, f (-x) = f x) (w : Plane) : conj (𝓕 f w) = 𝓕 f w := by + have he : (fun x => f (-x)) = f := funext hev + have hi : conj (𝓕 f w) = 𝓕⁻ f w := by + simp only [Real.fourier_eq',Real.fourierInv_eq',smul_eq_mul,← integral_conj] + apply integral_congr_ae + filter_upwards [] with x + simp [← Complex.exp_conj,hre,map_ofNat] + rw [hi,Real.fourierInv_eq_fourier_comp_neg,he] + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/Regularity.lean b/lean/OAI/Analysis/Triangular/Schwartz/Regularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e0277021d71cf3ed46c88db3dd821b380ac208c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/Regularity.lean @@ -0,0 +1,182 @@ +import OAI.Analysis.Triangular.Schwartz.Gaussian + +namespace OAI + +noncomputable section +open scoped BigOperators Topology SchwartzMap +open Complex Filter Set +namespace AtomicTriangular.Construction + +lemma norm_two_sin_le (z : ℂ) : ‖2 * sin z‖ ≤ 2 * Real.exp |z.im| := by + rw [Complex.two_sin, norm_mul, Complex.norm_I, mul_one] + calc + ‖exp (-z * I) - exp (z * I)‖ ≤ ‖exp (-z * I)‖ + ‖exp (z * I)‖ := norm_sub_le _ _ + _ = Real.exp z.im + Real.exp (-z.im) := by simp [Complex.norm_exp] + _ ≤ Real.exp |z.im| + Real.exp |z.im| := + add_le_add (Real.exp_le_exp.mpr (le_abs_self _)) + (Real.exp_le_exp.mpr (neg_le_abs _)) + _ = 2 * Real.exp |z.im| := by ring + +def stripBound (R : ℝ) : ℝ := (2 * Real.exp (Real.pi * R / 36))^30 + +lemma stripBound_nonneg (R : ℝ) : 0 ≤ stripBound R := by unfold stripBound; positivity + +lemma P_strip_bound (R : ℝ) (s : ℂ) (hs : |s.im| ≤ R) : ‖P s‖ ≤ stripBound R := by + unfold P sineFactor + rw [norm_prod] + calc + ∏ a : Fin 15, ‖(2 * sin ((kappa : ℂ) * (s-residue a)))^2‖ ≤ + ∏ _a : Fin 15, (2 * Real.exp (Real.pi * R / 36))^2 := by + apply Finset.prod_le_prod₀ (by intros; positivity) + intro a _ + rw [norm_pow] + apply pow_le_pow_left₀ (norm_nonneg _) + refine (norm_two_sin_le _).trans ?_ + apply mul_le_mul_of_nonneg_left _ (by norm_num : (0 : ℝ) ≤ 2) + apply Real.exp_le_exp.mpr + have he : (((kappa : ℂ) * (s-residue a))).im = Real.pi * s.im / 36 := by + simp [kappa, div_eq_mul_inv]; ring + rw [he, abs_div, abs_mul, abs_of_pos Real.pi_pos] + norm_num only [abs_of_pos (by norm_num : (0 : ℝ) < 36)] + exact div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hs Real.pi_pos.le) (by norm_num) + _ = stripBound R := by simp [stripBound, ← pow_mul] + +lemma im_le_dist_int (w : ℂ) (n : ℤ) : |w.im| ≤ dist w (n : ℂ) := by + simpa [dist_eq_norm] using Complex.abs_im_le_norm (w - (n : ℂ)) + +lemma uniform_basis_bound (R : ℝ) : ∃ M : ℝ, 0 ≤ M ∧ + ∀ (n : Node) (s : ℂ), |s.im| ≤ R → ‖cBasis n s‖ ≤ M ∧ ‖dBasis n s‖ ≤ M := by + let A := max R 2 + let M := stripBound A + have hM : 0 ≤ M := stripBound_nonneg A + refine ⟨M,hM,?_⟩ + intro n s hs + have hmapP : Set.MapsTo P (Metric.ball (n.val : ℂ) 2) (Metric.closedBall (P n.val) M) := by + intro w hw + simp only [Metric.mem_closedBall, P_node, dist_zero_right] + exact P_strip_bound A w ((im_le_dist_int w n.val).trans + ((Metric.mem_ball.mp hw).le.trans (le_max_right _ _))) + have hd : ∀ w ∈ Metric.ball (n.val : ℂ) 2, ‖dBasis n w‖ ≤ M/2 := by + intro w hw + exact Complex.norm_dslope_le_div_of_mapsTo_ball differentiable_P.differentiableOn hmapP hw + have hmapD : Set.MapsTo (dBasis n) (Metric.ball (n.val : ℂ) 1) + (Metric.closedBall (dBasis n n.val) (M/2)) := by + intro w hw + simp only [Metric.mem_closedBall, dBasis_node, dist_zero_right] + apply hd w + exact (Metric.ball_subset_ball (by norm_num : (1 : ℝ) ≤ 2)) hw + have hc : ∀ w ∈ Metric.ball (n.val : ℂ) 1, ‖cBasis n w‖ ≤ M/2 := by + intro w hw + simpa [cBasis] using Complex.norm_dslope_le_div_of_mapsTo_ball + (differentiable_dBasis n).differentiableOn hmapD hw + have hPs : ‖P s‖ ≤ M := P_strip_bound A s (hs.trans (le_max_left _ _)) + have hhalf : M/2 ≤ M := by linarith + by_cases hnear : dist s (n.val : ℂ) < 1 + · exact ⟨(hc s hnear).trans hhalf, + (hd s (lt_trans hnear (by norm_num : (1 : ℝ) < 2))).trans hhalf⟩ + · have hfar : 1 ≤ ‖s - (n.val : ℂ)‖ := by simpa [dist_eq_norm] using le_of_not_gt hnear + have hne : s ≠ (n.val : ℂ) := by intro he; norm_num [he] at hfar + rw [cBasis_eq n hne, dBasis_eq n hne, norm_div, norm_div, norm_pow] + constructor + · exact (div_le_self (norm_nonneg _) (one_le_pow₀ hfar)).trans hPs + · exact (div_le_self (norm_nonneg _) hfar).trans hPs + +def spectralBound (S : Fin 31 → ℂ) (R : ℝ) : ℝ := + ∑ j : Fin 31, ‖S j‖*Real.exp (|Real.pi*frequency j| *R) +lemma spectralBound_nonneg (S : Fin 31 → ℂ) (R : ℝ) : 0 ≤ spectralBound S R := by + unfold spectralBound; positivity +lemma finiteSpectral_strip (S : Fin 31 → ℂ) (R : ℝ) (s : ℂ) (hs : |s.im| ≤ R) : + ‖∑ j : Fin 31, S j*exp (I*Real.pi*frequency j*s)‖ ≤ spectralBound S R := by + refine (norm_sum_le _ _).trans ?_ + apply Finset.sum_le_sum + intro j _ + rw [norm_mul,Complex.norm_exp] + apply mul_le_mul_of_nonneg_left _ (norm_nonneg _) + apply Real.exp_le_exp.mpr + have hi : (I*Real.pi*frequency j*s).re = -(Real.pi*frequency j)*s.im := by simp + rw [hi] + calc + -(Real.pi*frequency j)*s.im ≤ |-(Real.pi*frequency j)*s.im| := le_abs_self _ + _ = |Real.pi*frequency j| *|s.im| := by rw [abs_mul,abs_neg] + _ ≤ |Real.pi*frequency j| *R := mul_le_mul_of_nonneg_left hs (abs_nonneg _) + +lemma tail_summand_norm_bound (a : InputCoefficients) {R M : ℝ} + (hM : ∀ (n : Node) (s : ℂ), |s.im| ≤ R → ‖cBasis n s‖ ≤ M ∧ ‖dBasis n s‖ ≤ M) + (n : TailNode) (s : ℂ) (hs : |s.im| ≤ R) : + ‖(a.tailC n:ℂ)*cBasis n.val s+(a.tailD n:ℂ)*dBasis n.val s‖ ≤ + (|a.tailC n|+|a.tailD n|)*M := by + refine (norm_add_le _ _).trans ?_ + simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs] + calc + _ ≤ |a.tailC n| *M+|a.tailD n| *M := + add_le_add (mul_le_mul_of_nonneg_left (hM n.val s hs).1 (abs_nonneg _)) + (mul_le_mul_of_nonneg_left (hM n.val s hs).2 (abs_nonneg _)) + _ = _ := by ring + +lemma differentiable_tailInput (a : InputCoefficients) : Differentiable ℂ (tailInput a) := by + intro s + obtain ⟨M,hM,hB⟩ := uniform_basis_bound (|s.im|+1) + let U : Set ℂ := {w | |w.im| < |s.im|+1} + have hU : IsOpen U := isOpen_lt Complex.continuous_im.abs continuous_const + have hs : s ∈ U := by dsimp [U]; linarith + have hd : DifferentiableOn ℂ + (fun w => ∑' n : TailNode, ((a.tailC n:ℂ)*cBasis n.val w+(a.tailD n:ℂ)*dBasis n.val w)) U := by + apply Complex.differentiableOn_tsum_of_summable_norm (a.summable.mul_right M) + · intro n + exact ((differentiable_cBasis n.val).const_mul _ |>.add + ((differentiable_dBasis n.val).const_mul _)).differentiableOn + · exact hU + · intro n w hw + exact tail_summand_norm_bound a hB n w (le_of_lt hw) + exact ((differentiable_P s).const_mul _).add (hd.differentiableAt (hU.mem_nhds hs)) + +lemma tailInput_strip (a : InputCoefficients) (R : ℝ) : + ∃ M : ℝ, ∀ s : ℂ, |s.im| ≤ R → ‖tailInput a s‖ ≤ M := by + obtain ⟨M,hM,hB⟩ := uniform_basis_bound R + refine ⟨|a.C| *stripBound R + ∑' n : TailNode, (|a.tailC n|+|a.tailD n|)*M,?_⟩ + intro s hs + have hsum := (a.summable.mul_right M).of_norm_bounded + (fun n => tail_summand_norm_bound a hB n s hs) + unfold tailInput + refine (norm_add_le _ _).trans (add_le_add ?_ ?_) + · simpa only [norm_mul,Complex.norm_real,Real.norm_eq_abs] using + mul_le_mul_of_nonneg_left (P_strip_bound R s hs) (abs_nonneg a.C) + · exact (norm_tsum_le_tsum_norm hsum.norm).trans + (hsum.norm.tsum_le_tsum (fun n => tail_summand_norm_bound a hB n s hs) (a.summable.mul_right M)) + +lemma differentiable_finiteInput (a : InputCoefficients) : Differentiable ℂ (finiteInput a) := by + unfold finiteInput + apply Differentiable.fun_sum + intro j _ + exact ((differentiable_finiteC _).const_mul _).add ((differentiable_finiteD _).const_mul _) + +lemma finiteInput_strip (a : InputCoefficients) (R : ℝ) : + ∃ M : ℝ, ∀ s : ℂ, |s.im| ≤ R → ‖finiteInput a s‖ ≤ M := by + refine ⟨∑ j : Fin 11, (|a.finiteC j| *spectralBound (FiniteCertificate.cCoefficient ⟨j.val,by omega⟩) R + + |a.finiteD j| *spectralBound (FiniteCertificate.dCoefficient ⟨j.val,by omega⟩) R), ?_⟩ + intro s hs + unfold finiteInput + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun j _ => ?_) + refine (norm_add_le _ _).trans ?_ + simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs] + rw [FiniteCertificate.finiteC_fourier,FiniteCertificate.finiteD_fourier] + exact add_le_add (mul_le_mul_of_nonneg_left (finiteSpectral_strip _ R s hs) (abs_nonneg _)) + (mul_le_mul_of_nonneg_left (finiteSpectral_strip _ R s hs) (abs_nonneg _)) + +def inputSchwartz (a : InputCoefficients) : 𝓢(Plane,ℝ) := + Analysis.dampedEntireSchwartz (Real.pi*h*b) (mul_pos (mul_pos Real.pi_pos (by norm_num [h])) b_pos) b + (tailInput a) (differentiable_tailInput a) (tailInput_strip a 1) + + Analysis.dampedEntireSchwartz (Real.pi*H*b) (mul_pos (mul_pos Real.pi_pos (by norm_num [H])) b_pos) b + (finiteInput a) (differentiable_finiteInput a) (finiteInput_strip a 1) + +lemma inputSchwartz_apply (a : InputCoefficients) (x : Plane) : + inputSchwartz a x = Real.exp (-Real.pi*h*radial x)*(tailInput a (radial x)).re + + Real.exp (-Real.pi*H*radial x)*(finiteInput a (radial x)).re := by + simp only [inputSchwartz,add_apply,Analysis.dampedEntireSchwartz_apply,radial] + push_cast + congr 3 <;> ring + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/SpectralCLM.lean b/lean/OAI/Analysis/Triangular/Schwartz/SpectralCLM.lean new file mode 100644 index 0000000000000000000000000000000000000000..7211abc3b54e9b554a3887c2bba8398f74f35a46 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/SpectralCLM.lean @@ -0,0 +1,273 @@ +import OAI.Analysis.Triangular.Schwartz.TailSpectral + +namespace OAI + +noncomputable section +open scoped BigOperators Topology +open Complex Filter Set MeasureTheory +namespace AtomicTriangular.Construction +abbrev Spectrum := Set.Icc (-(5/6):ℝ) (5/6) + +def coeffAbs (l : Fin 31) : ℝ := ‖fourierCoeff l‖ +lemma fourierCoeff_norm (l : Fin 31) : ‖fourierCoeff l‖ = coeffAbs l := rfl +def pVariation : ℝ := ∑ l : Fin 31, coeffAbs l +def dVariation : ℝ := (∑ l : Fin 31, coeffAbs l * |frequency l|)*Real.pi +def cVariation : ℝ := (∑ l : Fin 31, coeffAbs l * (frequency l)^2)*Real.pi^2/2 +lemma coeffAbs_nonneg (l : Fin 31) : 0 ≤ coeffAbs l := norm_nonneg _ + + def extend (f : C(Spectrum,ℂ)) (t : ℝ) : ℂ := f (Set.projIcc (-(5/6)) (5/6) (by norm_num) t) +lemma continuous_extend (f : C(Spectrum,ℂ)) : Continuous (extend f) := by + exact f.continuous.comp continuous_projIcc +lemma norm_extend_le (f : C(Spectrum,ℂ)) (t : ℝ) : ‖extend f t‖ ≤ ‖f‖ := + f.norm_coe_le_norm _ + +lemma frequency_mem (l : Fin 31) : frequency l ∈ Set.Icc (-(5/6):ℝ) (5/6) := by + unfold frequency + have hn : (l.val:ℝ) ≤ 30 := by exact_mod_cast (show l.val ≤ 30 by omega) + constructor <;> nlinarith [Nat.cast_nonneg (α := ℝ) l.val] + +def spectralC (n : Node) (f : C(Spectrum,ℂ)) : ℂ := + ∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * + (-(Real.pi:ℂ)^2 * ∫ t in (0:ℝ)..frequency l, + ((frequency l:ℂ)-t)*exp (-I*Real.pi*(t:ℂ)*n.val)*extend f t) + +def spectralD (n : Node) (f : C(Spectrum,ℂ)) : ℂ := + ∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * + (I*Real.pi * ∫ t in (0:ℝ)..frequency l, + exp (-I*Real.pi*(t:ℂ)*n.val)*extend f t) + +def spectralP (f : C(Spectrum,ℂ)) : ℂ := + ∑ l : Fin 31, fourierCoeff l * f ⟨frequency l,frequency_mem l⟩ + +lemma norm_exp_phase (t : ℝ) (n : ℤ) : ‖exp (I*Real.pi*(t:ℂ)*n)‖ = 1 := by + rw [Complex.norm_exp] + simp [Complex.mul_re,Complex.mul_im] + +lemma norm_exp_neg_phase (t : ℝ) (n : ℤ) : ‖exp (-I*Real.pi*(t:ℂ)*n)‖ = 1 := by + rw [Complex.norm_exp] + simp [Complex.mul_re,Complex.mul_im] + +lemma norm_first_integral_le (f : ℝ → ℂ) (M : ℝ) (hM : ∀ t, ‖f t‖ ≤ M) (t : ℝ) : + ‖∫ r in (0:ℝ)..t, f r‖ ≤ M*|t| := by + simpa only [sub_zero] using intervalIntegral.norm_integral_le_of_norm_le_const + (fun r _ => hM r) (a := 0) (b := t) + +lemma norm_second_integral_le (f : ℝ → ℂ) (M : ℝ) (hM : ∀ t, ‖f t‖ ≤ M) (t : ℝ) : + ‖∫ r in (0:ℝ)..t, ((t:ℂ)-r)*f r‖ ≤ M*t^2/2 := by + by_cases ht : 0 ≤ t + · calc + _ ≤ ∫ r in (0:ℝ)..t, (t-r)*M := by + apply intervalIntegral.norm_integral_le_of_norm_le ht + · exact ae_of_all volume fun r hr => by + rw [norm_mul, ← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonneg (sub_nonneg.mpr hr.2)] + exact mul_le_mul_of_nonneg_left (hM r) (sub_nonneg.mpr hr.2) + · exact (show Continuous (fun r : ℝ => (t-r)*M) by fun_prop).intervalIntegrable 0 t + _ = _ := by + rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_sub (f := fun _ : ℝ => t) (g := fun x : ℝ => x) + intervalIntegrable_const (continuous_id.intervalIntegrable _ _), integral_id] + simp only [intervalIntegral.integral_const, sub_zero, zero_pow, ne_eq, + OfNat.ofNat_ne_zero, not_false_eq_true, smul_eq_mul] + ring + · have ht' := le_of_not_ge ht + rw [intervalIntegral.integral_symm, norm_neg] + calc + _ ≤ ∫ r in t..(0:ℝ), (r-t)*M := by + apply intervalIntegral.norm_integral_le_of_norm_le ht' + · exact ae_of_all volume fun r hr => by + rw [norm_mul, ← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs, + abs_of_nonpos (sub_nonpos.mpr hr.1.le)] + calc + _ ≤ (-(t-r))*M := mul_le_mul_of_nonneg_left (hM r) (by linarith [hr.1]) + _ = _ := by ring + · exact (show Continuous (fun r : ℝ => (r-t)*M) by fun_prop).intervalIntegrable t 0 + _ = _ := by + rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_sub (f := fun x : ℝ => x) (g := fun _ : ℝ => t) + (continuous_id.intervalIntegrable _ _) intervalIntegrable_const, integral_id] + simp only [intervalIntegral.integral_const, zero_sub, zero_pow, ne_eq, + OfNat.ofNat_ne_zero, not_false_eq_true, smul_eq_mul] + ring + +lemma spectralP_bound (f : C(Spectrum,ℂ)) : ‖spectralP f‖ ≤ pVariation*‖f‖ := by + calc + _ ≤ ∑ l : Fin 31, coeffAbs l * ‖f‖ := by + unfold spectralP + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro l hl + rw [norm_mul,fourierCoeff_norm] + exact mul_le_mul_of_nonneg_left (f.norm_coe_le_norm _) (by rw [←fourierCoeff_norm]; positivity) + _ = _ := by rw [←Finset.sum_mul]; rfl + +lemma spectralD_bound (n : Node) (f : C(Spectrum,ℂ)) : + ‖spectralD n f‖ ≤ dVariation*‖f‖ := by + have hb (l : Fin 31) : ‖∫ t in (0:ℝ)..frequency l, + exp (-I*Real.pi*(t:ℂ)*n.val)*extend f t‖ ≤ ‖f‖*|frequency l| := by + apply norm_first_integral_le + intro t + rw [norm_mul,norm_exp_neg_phase,one_mul] + exact norm_extend_le f t + calc + _ ≤ ∑ l : Fin 31, (coeffAbs l * |frequency l|) * (Real.pi*‖f‖) := by + unfold spectralD + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro l hl + simp only [norm_mul,norm_exp_phase,fourierCoeff_norm,mul_one,Complex.norm_I, + Complex.norm_real,Real.norm_eq_abs,abs_of_pos Real.pi_pos,one_mul] + calc + _ ≤ coeffAbs l * (Real.pi * (‖f‖*|frequency l|)) := by + have hp : 0 ≤ coeffAbs l := by rw [←fourierCoeff_norm]; positivity + gcongr + exact hb l + _ = _ := by ring + _ = _ := by rw [←Finset.sum_mul]; dsimp [dVariation]; ring + +lemma spectralC_bound (n : Node) (f : C(Spectrum,ℂ)) : + ‖spectralC n f‖ ≤ cVariation*‖f‖ := by + have hb (l : Fin 31) : ‖∫ t in (0:ℝ)..frequency l, + ((frequency l:ℂ)-t)*exp (-I*Real.pi*(t:ℂ)*n.val)*extend f t‖ ≤ + ‖f‖*(frequency l)^2/2 := by + have hi := norm_second_integral_le (fun t => exp (-I*Real.pi*(t:ℂ)*n.val)*extend f t) ‖f‖ + (fun t => by rw [norm_mul,norm_exp_neg_phase,one_mul]; exact norm_extend_le f t) (frequency l) + simpa only [mul_assoc] using hi + calc + _ ≤ ∑ l : Fin 31, (coeffAbs l * (frequency l)^2) * (Real.pi^2/2*‖f‖) := by + unfold spectralC + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro l hl + simp only [norm_mul,norm_exp_phase,fourierCoeff_norm,mul_one,norm_neg,norm_pow, + Complex.norm_real,Real.norm_eq_abs,abs_of_pos Real.pi_pos] + calc + _ ≤ coeffAbs l * (Real.pi^2 * (‖f‖*(frequency l)^2/2)) := by + have hp : 0 ≤ coeffAbs l := by rw [←fourierCoeff_norm]; positivity + gcongr + exact hb l + _ = _ := by ring + _ = _ := by rw [←Finset.sum_mul]; dsimp [cVariation]; ring + +def integralLinear (w : ℝ → ℂ) (hw : Continuous w) (t : ℝ) : C(Spectrum,ℂ) →ₗ[ℂ] ℂ where + toFun f := ∫ r in (0:ℝ)..t, w r * extend f r + map_add' f g := by + simp only [extend,ContinuousMap.add_apply,mul_add] + apply intervalIntegral.integral_add + · exact (hw.mul (continuous_extend f)).intervalIntegrable 0 t + · exact (hw.mul (continuous_extend g)).intervalIntegrable 0 t + map_smul' c f := by + simp only [extend,ContinuousMap.smul_apply,smul_eq_mul,RingHom.id_apply] + simp_rw [mul_left_comm (w _) c] + exact intervalIntegral.integral_const_mul _ _ + +def spectralCLinear (n : Node) : C(Spectrum,ℂ) →ₗ[ℂ] ℂ := + ∑ l : Fin 31, (fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * (-(Real.pi:ℂ)^2)) • + integralLinear (fun t => ((frequency l:ℂ)-t)*exp (-I*Real.pi*(t:ℂ)*n.val)) + (by fun_prop) (frequency l) + +def spectralDLinear (n : Node) : C(Spectrum,ℂ) →ₗ[ℂ] ℂ := + ∑ l : Fin 31, (fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * (I*Real.pi)) • + integralLinear (fun t => exp (-I*Real.pi*(t:ℂ)*n.val)) + (by fun_prop) (frequency l) + +lemma spectralCLinear_apply (n : Node) (f : C(Spectrum,ℂ)) : + spectralCLinear n f = spectralC n f := by + simp [spectralCLinear,spectralC,integralLinear,mul_assoc] +lemma spectralDLinear_apply (n : Node) (f : C(Spectrum,ℂ)) : + spectralDLinear n f = spectralD n f := by + simp [spectralDLinear,spectralD,integralLinear,mul_assoc] + +def spectralCCLM (n : Node) : C(Spectrum,ℂ) →L[ℂ] ℂ := + (spectralCLinear n).mkContinuous cVariation (by + intro f; rw [spectralCLinear_apply]; exact spectralC_bound n f) +def spectralDCLM (n : Node) : C(Spectrum,ℂ) →L[ℂ] ℂ := + (spectralDLinear n).mkContinuous dVariation (by + intro f; rw [spectralDLinear_apply]; exact spectralD_bound n f) +def spectralPCLM : C(Spectrum,ℂ) →L[ℂ] ℂ := + ∑ l : Fin 31, fourierCoeff l • ContinuousMap.evalCLM ℂ ⟨frequency l,frequency_mem l⟩ + +lemma spectralCCLM_apply (n : Node) (f : C(Spectrum,ℂ)) : spectralCCLM n f = spectralC n f := + spectralCLinear_apply n f +lemma spectralDCLM_apply (n : Node) (f : C(Spectrum,ℂ)) : spectralDCLM n f = spectralD n f := + spectralDLinear_apply n f +lemma spectralPCLM_apply (f : C(Spectrum,ℂ)) : spectralPCLM f = spectralP f := by + simp [spectralPCLM,spectralP] + +lemma spectralCCLM_norm (n : Node) : ‖spectralCCLM n‖ ≤ cVariation := + LinearMap.mkContinuous_norm_le _ (by simp only [cVariation, coeffAbs]; positivity) _ +lemma spectralDCLM_norm (n : Node) : ‖spectralDCLM n‖ ≤ dVariation := + LinearMap.mkContinuous_norm_le _ (by simp only [dVariation, coeffAbs]; positivity) _ +lemma spectralPCLM_norm : ‖spectralPCLM‖ ≤ pVariation := by + apply ContinuousLinearMap.opNorm_le_bound _ (by unfold pVariation coeffAbs; positivity) + intro f + rw [spectralPCLM_apply] + exact spectralP_bound f + +def phaseFunction (s : ℂ) : C(Spectrum,ℂ) := + ⟨fun t => exp (I*Real.pi*(t.val:ℂ)*s), by fun_prop⟩ + +lemma extend_on (f : C(Spectrum,ℂ)) (t : ℝ) (ht : t ∈ Spectrum) : + extend f t = f ⟨t,ht⟩ := by + simp only [extend,Set.projIcc_of_mem _ ht] + +lemma interval_frequency_subset (l : Fin 31) : Set.uIcc 0 (frequency l) ⊆ Spectrum := by + have h := Set.uIcc_subset_uIcc (show (0:ℝ) ∈ Set.uIcc (-(5/6)) (5/6) by norm_num) + (show frequency l ∈ Set.uIcc (-(5/6)) (5/6) by simpa [Set.uIcc_of_le (by norm_num : (-(5/6):ℝ) ≤ 5/6)] using frequency_mem l) + simpa [Set.uIcc_of_le (by norm_num : (-(5/6):ℝ) ≤ 5/6)] using h + +lemma spectralD_phase (n : Node) (s : ℂ) : spectralD n (phaseFunction s) = dBasis n s := by + rw [← integralDBasis_eq] + unfold spectralD integralDBasis + apply Finset.sum_congr rfl + intro l hl + congr 2 + apply intervalIntegral.integral_congr + intro t ht + dsimp only + rw [extend_on _ t (interval_frequency_subset l ht)] + change exp (-I*Real.pi*(t:ℂ)*n.val)*exp (I*Real.pi*(t:ℂ)*s) = _ + rw [← exp_add] + congr 1 + ring + +lemma spectralC_phase (n : Node) (s : ℂ) : spectralC n (phaseFunction s) = cBasis n s := by + rw [← integralCBasis_eq] + unfold spectralC integralCBasis + apply Finset.sum_congr rfl + intro l hl + congr 2 + apply intervalIntegral.integral_congr + intro t ht + dsimp only + rw [extend_on _ t (interval_frequency_subset l ht)] + change ((frequency l:ℂ)-t)*exp (-I*Real.pi*(t:ℂ)*n.val)*exp (I*Real.pi*(t:ℂ)*s) = _ + rw [mul_assoc,← exp_add] + congr 2 + ring + +lemma spectralP_phase (s : ℂ) : spectralP (phaseFunction s) = P s := by + exact (P_fourier s).symm + +lemma exponential_apply (f : C(Spectrum,ℂ)) (t : Spectrum) : + (NormedSpace.exp f) t = exp (f t) := by + have h := NormedSpace.map_exp (ContinuousMap.evalAlgHom ℂ ℂ t) + (ContinuousMap.evalCLM ℂ t).continuous f + simpa only [ContinuousMap.evalAlgHom_apply,Complex.exp_eq_exp_ℂ] using h + +def frequencyFunction : C(Spectrum,ℂ) := ⟨fun t => I*Real.pi*(t.val:ℂ), by fun_prop⟩ + +lemma phaseFunction_exp (s : ℂ) : phaseFunction s = NormedSpace.exp (s • frequencyFunction) := by + ext t + rw [exponential_apply] + change exp (I*Real.pi*(t.val:ℂ)*s) = exp (s*(I*Real.pi*(t.val:ℂ))) + congr 1 + ring + +lemma differentiable_phaseFunction : Differentiable ℂ phaseFunction := by + have he : phaseFunction = fun s => NormedSpace.exp (s • frequencyFunction) := funext phaseFunction_exp + rw [he] + exact differentiable_exp_smul_const ℂ frequencyFunction + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/SpectralEnvelope.lean b/lean/OAI/Analysis/Triangular/Schwartz/SpectralEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7919300459b71b2b949dad8e4d567d821640e09 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/SpectralEnvelope.lean @@ -0,0 +1,110 @@ +import OAI.Analysis.Triangular.Auxiliary.IntegralBounds +import OAI.Analysis.Triangular.Envelope.EnvelopeBoxes +import OAI.Analysis.Triangular.Schwartz.SpectralCLM + +namespace OAI + +noncomputable section +open scoped BigOperators +open Complex Set MeasureTheory +namespace AtomicTriangular.Construction +lemma frequencyDistance_le (l : Fin 31) : frequencyDistance l≤15 := by revert l; decide +kernel +lemma frequencyDistance_eq (l : Fin 31) : |frequency l| = (frequencyDistance l:ℝ)*(1/18) := by + fin_cases l <;> norm_num [frequency,frequencyDistance] +lemma range_sum_15 (N : ℕ) (hN : N≤15) (F : ℕ → ℝ) : + (∑ i ∈ Finset.range N, F i) = ∑ i : Fin 15, if i.val if i if hi : i<15 then M ⟨i,hi⟩ else 0 + have hb (l : Fin 31) : + ‖∫ t in (0:ℝ)..frequency l, (frequency l-t) • (exp (-I*Real.pi*(t:ℂ)*n) • f t)‖ ≤ + (1/18:ℝ)^2 * ∑ i : Fin 15, if i.val exp (-I*Real.pi*(t:ℂ)*n) • f t) (by fun_prop) M' + (fun i hi x h1 h2 => by + have hi15 : i<15 := lt_of_lt_of_le hi (frequencyDistance_le l) + rw [norm_smul,norm_exp_neg_phase,one_mul] + simpa [M',hi15] using hM ⟨i,hi15⟩ x (by convert h1 using 1; ring) (by convert h2 using 1; ring)) + rw [range_sum_15 _ (frequencyDistance_le l)] at hh + simpa [M',Fin.is_lt] using hh + unfold spectralCVector + calc + _ ≤ ∑ l : Fin 31, ‖(fourierCoeff l*exp (I*Real.pi*frequency l*n)) • + (-(Real.pi:ℂ)^2 • ∫ t in (0:ℝ)..frequency l, + (frequency l-t) • (exp (-I*Real.pi*(t:ℂ)*n) • f t))‖ := norm_sum_le _ _ + _ ≤ ∑ l : Fin 31, ‖fourierCoeff l‖ * Real.pi^2*((1/18:ℝ)^2 * + ∑ i : Fin 15, if i.val ring +omit [CompleteSpace E] in +lemma spectralDVector_bound (n : ℤ) (f : ℝ → E) (hf : Continuous f) (M : Fin 15 → ℝ) + (hM : ∀ i : Fin 15, ∀ x, (i.val:ℝ)/18≤|x| → |x|≤(i.val+1:ℕ)/18 → ‖f x‖≤M i) : + ‖spectralDVector n f‖ ≤ ∑ i : Fin 15, M i * fullTailW i 1 := by + let M' : ℕ → ℝ := fun i => if hi : i<15 then M ⟨i,hi⟩ else 0 + have hb (l : Fin 31) : + ‖∫ t in (0:ℝ)..frequency l, exp (-I*Real.pi*(t:ℂ)*n) • f t‖ ≤ + (1/18:ℝ) * ∑ i : Fin 15, if i.val exp (-I*Real.pi*(t:ℂ)*n) • f t) (by fun_prop) M' + (fun i hi x h1 h2 => by + have hi15 : i<15 := lt_of_lt_of_le hi (frequencyDistance_le l) + rw [norm_smul,norm_exp_neg_phase,one_mul] + simpa [M',hi15] using hM ⟨i,hi15⟩ x (by convert h1 using 1; ring) (by convert h2 using 1; ring)) + rw [range_sum_15 _ (frequencyDistance_le l)] at hh + simpa [M',Fin.is_lt] using hh + unfold spectralDVector + calc + _ ≤ ∑ l : Fin 31, ‖(fourierCoeff l*exp (I*Real.pi*frequency l*n)) • + ((I*Real.pi) • ∫ t in (0:ℝ)..frequency l, exp (-I*Real.pi*(t:ℂ)*n) • f t)‖ := norm_sum_le _ _ + _ ≤ ∑ l : Fin 31, ‖fourierCoeff l‖ * Real.pi*((1/18:ℝ) * + ∑ i : Fin 15, if i.val ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Schwartz/TailSpectral.lean b/lean/OAI/Analysis/Triangular/Schwartz/TailSpectral.lean new file mode 100644 index 0000000000000000000000000000000000000000..40d8279f45a07ad9ad210d82a58b86d537eb2306 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Schwartz/TailSpectral.lean @@ -0,0 +1,139 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators Topology +open Complex Filter Set +namespace AtomicTriangular.Construction +open MeasureTheory + +lemma continuous_intervalIntegral_complex {f : ℂ → ℝ → ℂ} + (hf : Continuous f.uncurry) (a b : ℝ) : + Continuous (fun s => ∫ t in a..b, f s t) := by + have h₁ := continuous_parametric_integral_of_continuous (μ := volume) hf (isCompact_Icc (a := a) (b := b)) + have h₂ := continuous_parametric_integral_of_continuous (μ := volume) hf (isCompact_Icc (a := b) (b := a)) + simpa only [intervalIntegral, integral_Icc_eq_integral_Ioc] using! h₁.sub h₂ + +lemma exponential_first_integral (u : ℂ) (hu : u ≠ 0) (t : ℝ) : + I*Real.pi * (∫ r in (0:ℝ)..t, exp (I*Real.pi*(r:ℂ)*u)) = + (exp (I*Real.pi*(t:ℂ)*u)-1)/u := by + have hc : I*(Real.pi:ℂ)*u ≠ 0 := mul_ne_zero (mul_ne_zero I_ne_zero + (by exact_mod_cast Real.pi_ne_zero)) hu + have hi := integral_exp_mul_complex (a := 0) (b := t) hc + simp only [Complex.ofReal_zero, mul_zero, exp_zero] at hi + simp_rw [show ∀ r : ℝ, I*(Real.pi:ℂ)*(r:ℂ)*u = (I*Real.pi*u)*(r:ℂ) by intro r; ring] + rw [hi] + field_simp + +lemma exponential_second_integral (u : ℂ) (hu : u ≠ 0) (t : ℝ) : + -(Real.pi:ℂ)^2 * (∫ r in (0:ℝ)..t, ((t:ℂ)-r)*exp (I*Real.pi*(r:ℂ)*u)) = + (exp (I*Real.pi*(t:ℂ)*u)-1-I*Real.pi*(t:ℂ)*u)/u^2 := by + let c : ℂ := I*Real.pi*u + have hc : c ≠ 0 := mul_ne_zero (mul_ne_zero I_ne_zero + (by exact_mod_cast Real.pi_ne_zero)) hu + let F : ℝ → ℂ := fun r => (((t:ℂ)-(r:ℂ))/c+1/c^2)*exp (c*(r:ℂ)) + have hd (x : ℝ) : HasDerivAt F (((t:ℂ)-(x:ℂ))*exp (c*(x:ℂ))) x := by + have hx : HasDerivAt (fun x : ℝ => (x:ℂ)) 1 x := by + simpa using! (Complex.ofRealCLM.hasDerivAt (x := x)) + have hf := ((hx.const_sub (t:ℂ)).div_const c).add_const (1/c^2) + have hh := hf.mul ((hx.const_mul c).cexp) + convert! hh using 1 + field_simp + ring + have hi := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun x _ => hd x) + (show IntervalIntegrable (fun x : ℝ => ((t:ℂ)-(x:ℂ))*exp (c*(x:ℂ))) volume 0 t from + (by fun_prop : Continuous (fun x : ℝ => ((t:ℂ)-(x:ℂ))*exp (c*(x:ℂ)))).intervalIntegrable 0 t) + have he : ∀ r : ℝ, I*(Real.pi:ℂ)*(r:ℂ)*u = c*(r:ℂ) := by intro r; dsimp [c]; ring + simp_rw [he] + rw [hi] + dsimp [F] + simp only [sub_self, zero_div, zero_add, mul_zero, exp_zero, + mul_one, sub_zero] + dsimp [c] + field_simp + simp [Complex.I_sq] + ring + +def integralDBasis (n : Node) (s : ℂ) : ℂ := + ∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * + (I*Real.pi * ∫ t in (0:ℝ)..frequency l, exp (I*Real.pi*(t:ℂ)*(s-n.val))) + +def integralCBasis (n : Node) (s : ℂ) : ℂ := + ∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val) * + (-(Real.pi:ℂ)^2 * ∫ t in (0:ℝ)..frequency l, + ((frequency l:ℂ)-t)*exp (I*Real.pi*(t:ℂ)*(s-n.val))) + +lemma continuous_integralDBasis (n : Node) : Continuous (integralDBasis n) := by + unfold integralDBasis + refine continuous_finsetSum _ fun l _ => ?_ + exact continuous_const.mul <| continuous_const.mul + (continuous_intervalIntegral_complex (by fun_prop) 0 (frequency l)) + +lemma continuous_integralCBasis (n : Node) : Continuous (integralCBasis n) := by + unfold integralCBasis + refine continuous_finsetSum _ fun l _ => ?_ + exact continuous_const.mul <| continuous_const.mul + (continuous_intervalIntegral_complex (by fun_prop) 0 (frequency l)) + +lemma exp_frequency_sub (s n : ℂ) (l : Fin 31) : + exp (I*Real.pi*frequency l*n) * exp (I*Real.pi*frequency l*(s-n)) = + exp (I*Real.pi*frequency l*s) := by + rw [← exp_add] + congr 1 + ring + +lemma integralDBasis_eq (n : Node) : integralDBasis n = dBasis n := by + apply (continuous_integralDBasis n).ext_on (dense_compl_singleton (n.val:ℂ)) + (differentiable_dBasis n).continuous + intro s hs + have hsn : s ≠ (n.val:ℂ) := hs + rw [dBasis_eq n hsn] + unfold integralDBasis + simp_rw [exponential_first_integral (s-n.val) (sub_ne_zero.mpr hsn), ← mul_div_assoc, + ← Finset.sum_div] + congr 1 + calc + _ = (∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*s)) - + ∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val) := by + rw [← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro l hl + rw [mul_sub, mul_one, mul_assoc, exp_frequency_sub] + _ = P s := by + have hz : (∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val)) = 0 := by + simpa [waveDerivative] using fourier_node_cancel n + rw [hz, sub_zero, P_fourier] + +lemma integralCBasis_eq (n : Node) : integralCBasis n = cBasis n := by + apply (continuous_integralCBasis n).ext_on (dense_compl_singleton (n.val:ℂ)) + (differentiable_cBasis n).continuous + intro s hs + have hsn : s ≠ (n.val:ℂ) := hs + rw [cBasis_eq n hsn] + unfold integralCBasis + simp_rw [exponential_second_integral (s-n.val) (sub_ne_zero.mpr hsn), ← mul_div_assoc, + ← Finset.sum_div] + congr 1 + calc + _ = (∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*s)) - + (∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val)) - + (∑ l : Fin 31, fourierCoeff l * (I*Real.pi*frequency l) * + exp (I*Real.pi*frequency l*n.val)) * (s-n.val) := by + rw [Finset.sum_mul, ← Finset.sum_sub_distrib, ← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro l hl + rw [mul_sub, mul_sub, mul_one, mul_assoc, exp_frequency_sub] + ring + _ = P s := by + have hd : (∑ l : Fin 31, fourierCoeff l * (I*Real.pi*frequency l) * + exp (I*Real.pi*frequency l*n.val)) = 0 := by + simpa [waveDerivative] using fourier_node_deriv_cancel n + have hz : (∑ l : Fin 31, fourierCoeff l * exp (I*Real.pi*frequency l*n.val)) = 0 := by + simpa [waveDerivative] using fourier_node_cancel n + rw [hd, hz, zero_mul, sub_zero, sub_zero, P_fourier] + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/DeletedAccuracy.lean b/lean/OAI/Analysis/Triangular/Signs/DeletedAccuracy.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0cf34ad7d0d27042553b04e2410b3dea3fd1d6d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/DeletedAccuracy.lean @@ -0,0 +1,77 @@ +import OAI.Analysis.Triangular.Construction.CurvatureEnvelope +import OAI.Analysis.Triangular.Construction.CoefficientAddition +import OAI.Analysis.Triangular.Taylor.FiniteTaylorError + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix Set +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate +lemma deletedSecond_add {f g : ℝ → ℝ} (hf : ContDiff ℝ 2 f) (hg : ContDiff ℝ 2 g) (m s : ℝ) : + deletedSecond (f+g) m s=deletedSecond f m s+deletedSecond g m s := by + unfold deletedSecond + split_ifs with hs + · rw [iteratedDeriv_add hf.contDiffAt hg.contDiffAt] + ring + · rw [deriv_add (hf.differentiable (by norm_num) m) (hg.differentiable (by norm_num) m)] + simp only [Pi.add_apply] + ring +lemma finiteJ_contDiff (side : Fin 2) (e : Fin 8 → ℝ) : ContDiff ℝ ⊤ (finiteJ side e) := by + have he : finiteJ side e=pairJ (coefficientInput ((gamma side *ᵥ e) 2) (finiteApprox side e) 0) + (coefficientInput ((gamma (otherSide side) *ᵥ e) 2) (finiteApprox (otherSide side) e) 0) := by + funext s; exact congrArg Complex.re (finiteJJet_pair side e 0 s) + rw [he] + exact pairJ_contDiff _ _ +def nearBase (n : Fin 7) (y : Fin 2) : Fin 5 := if n.val=0 then (if y.val=0 then 0 else 1) else 2 +def nearError (n : Fin 7) (y : Fin 2) : ℝ := if n.val=0 then (if y.val=0 then 18/1000 else 3/1000) else 16/100000 +lemma nearDisplacement_radius (n : Fin 7) (y : Fin 2) : |nearDisplacement n y| ≤ nearRadius n := by + fin_cases n <;> fin_cases y <;> norm_num [nearDisplacement,nearDisplacementNum,nearRadius,Matrix.cons_val,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.vecHead,Matrix.vecTail] +lemma nearDisplacement_mul_radius (n : Fin 7) (y : Fin 2) {τ : ℝ} (hτ : τ∈Icc 0 1) : + |nearDisplacement n y*τ| ≤ nearRadius n := by + rw [abs_mul,abs_of_nonneg hτ.1] + exact (mul_le_of_le_one_right (abs_nonneg _) hτ.2).trans (nearDisplacement_radius n y) +lemma nearBase_le_node (n : Fin 7) (y : Fin 2) : curvaturePoint (nearBase n y) ≤ (nearNode n:ℝ) := by + fin_cases n <;> fin_cases y <;> norm_num [nearBase,curvaturePoint,nearNode,finiteNode,residue,Matrix.cons_val,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.vecHead,Matrix.vecTail] +lemma nearBase_le_cell (n : Fin 7) (y : Fin 2) {τ : ℝ} (hτ : τ∈Icc 0 1) : + curvaturePoint (nearBase n y) ≤ (nearNode n:ℝ)+nearDisplacement n y*τ := by + obtain ⟨ht0,ht1⟩ := hτ + fin_cases n <;> fin_cases y <;> norm_num [nearBase,curvaturePoint,nearNode,finiteNode,residue,nearDisplacement,nearDisplacementNum,Matrix.cons_val,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.vecHead,Matrix.vecTail] <;> linarith +lemma near_error_arithmetic (n : Fin 7) (y : Fin 2) : + (1/100000:ℝ)*finiteCurvatureEnvelope (nearBase n y)+(3/1000000000)*tailCurvatureEnvelope (nearBase n y)+ + (if n.val=0 then (161/100000:ℝ) else 75/10000000) fin_cases y <;> norm_num [nearBase,nearError,finiteCurvatureEnvelope,tailCurvatureEnvelope,Matrix.cons_val,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two,Matrix.vecHead,Matrix.vecTail] +lemma deleted_accuracy (side : Fin 2) {z : ℝ} (hz : 0 F k s+G k s) m v=complexDeleted F m v+complexDeleted G m v := by + unfold complexDeleted + split_ifs <;> ring +lemma complexDeleted_mul (a : ℂ) (F : ℕ → ℝ → ℂ) (m v : ℝ) : + complexDeleted (fun k s => a*F k s) m v=a*complexDeleted F m v := by + unfold complexDeleted + split_ifs <;> ring +lemma complexDeleted_sum {ι : Type*} (S : Finset ι) (F : ι → ℕ → ℝ → ℂ) (m v : ℝ) : + complexDeleted (fun k s => ∑ i∈S,F i k s) m v=∑ i∈S,complexDeleted (F i) m v := by + unfold complexDeleted + by_cases hv : v=0 + · simp only [hv,↓reduceIte,Finset.sum_div] + · simp only [ite_eq_right hv,sub_div,Finset.sum_div,Finset.sum_sub_distrib,Finset.mul_sum] +lemma complexTaylor_add (F G : ℕ → ℝ → ℂ) (m v : ℝ) : + complexTaylor (fun k s => F k s+G k s) m v=complexTaylor F m v+complexTaylor G m v := by + simp [complexTaylor,add_mul,add_div,Finset.sum_add_distrib] +lemma complexTaylor_mul (a : ℂ) (F : ℕ → ℝ → ℂ) (m v : ℝ) : + complexTaylor (fun k s => a*F k s) m v=a*complexTaylor F m v := by + simp [complexTaylor,Finset.mul_sum,mul_assoc,mul_div_assoc] +lemma complexTaylor_sum {ι : Type*} (S : Finset ι) (F : ι → ℕ → ℝ → ℂ) (m v : ℝ) : + complexTaylor (fun k s => ∑ i∈S,F i k s) m v=∑ i∈S,complexTaylor (F i) m v := by + simp only [complexTaylor,Finset.sum_mul,Finset.sum_div] + exact Finset.sum_comm +lemma complexDeleted_exp (w : ℂ) (m v : ℝ) : + complexDeleted (fun k s => exp (w*(s:ℂ))*w^k) m v=Envelope.expDeleted w m v := by + unfold complexDeleted Envelope.expDeleted + split_ifs <;> simp only [pow_zero,pow_one,mul_one] + ring +lemma complexTaylor_exp (w : ℂ) (m v : ℝ) : + complexTaylor (fun k s => exp (w*(s:ℂ))*w^k) m v=Envelope.expDeletedTaylor w m v := by + simp only [complexTaylor,Envelope.expDeletedTaylor,Finset.mul_sum] + apply Finset.sum_congr rfl + intro j _ + rw [pow_add,mul_pow] + ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/DeletedQuotient.lean b/lean/OAI/Analysis/Triangular/Signs/DeletedQuotient.lean new file mode 100644 index 0000000000000000000000000000000000000000..d1020a8d6a54de7de79daa5c7f1846b9f833f0d0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/DeletedQuotient.lean @@ -0,0 +1,59 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators +open Set +namespace AtomicTriangular.Construction + +def deletedSecond (f : ℝ → ℝ) (m s : ℝ) : ℝ := + if s=m then iteratedDeriv 2 f m/2 else (f s-f m-deriv f m*(s-m))/(s-m)^2 + +def deleted (f : ℝ → ℝ) (m : ℝ) (ν : ℕ) (s : ℝ) : ℝ := + if ν=0 then f s else deletedSecond f m s + +lemma taylor_one_eval {f : ℝ → ℝ} (hf : ContDiff ℝ 2 f) {m s : ℝ} (hms : m≠s) : + taylorWithinEval f 1 (uIcc m s) m s=f m+deriv f m*(s-m) := by + have he : iteratedDerivWithin 1 f (uIcc m s) m=iteratedDeriv 1 f m := + iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_uIcc hms) + (hf.of_le (by norm_num)).contDiffAt (left_mem_uIcc) + rw [show (1:ℕ)=0+1 from rfl,taylorWithinEval_succ,he] + simp [mul_comm] + +lemma deletedSecond_eq_at_mean {f : ℝ → ℝ} (hf : ContDiff ℝ 2 f) {m s : ℝ} (hms : m≠s) : + ∃ c∈uIoo m s,deletedSecond f m s=iteratedDeriv 2 f c/2 := by + obtain ⟨c,hc,he⟩ := taylor_mean_remainder_lagrange_iteratedDeriv (n:=1) hms hf.contDiffOn + refine ⟨c,hc,?_⟩ + rw [taylor_one_eval hf hms] at he + have hn : s-m≠0 := sub_ne_zero.mpr hms.symm + rw [deletedSecond,ite_eq_right hms.symm] + norm_num at he + apply (div_eq_iff (pow_ne_zero 2 hn)).mpr + linarith + +lemma deletedSecond_bound {f : ℝ → ℝ} (hf : ContDiff ℝ 2 f) {m s C : ℝ} + (hb : ∀ t∈uIcc m s,|iteratedDeriv 2 f t|≤C) : |deletedSecond f m s|≤C/2 := by + by_cases h : m=s + · subst s + rw [deletedSecond,ite_eq_left rfl,abs_div,show |(2:ℝ)|=2 by norm_num] + exact div_le_div_of_nonneg_right (hb m (left_mem_uIcc)) (by norm_num) + · obtain ⟨c,hc,he⟩ := deletedSecond_eq_at_mean hf h + rw [he,abs_div,show |(2:ℝ)|=2 by norm_num] + apply div_le_div_of_nonneg_right _ (by norm_num) + exact hb c (Ioo_subset_Icc_self hc) + +lemma deletedSecond_of_jets {f : ℝ → ℝ} {m s : ℝ} (hfm : f m=0) (hdfm : deriv f m=0) + (hsm : s≠m) : deletedSecond f m s=f s/(s-m)^2 := by + simp [deletedSecond,hsm,hfm,hdfm] + +lemma real_function_nonneg_of_deleted {f : ℝ → ℝ} {m s : ℝ} (hfm : f m=0) + (hdfm : deriv f m=0) (hb : 0≤deletedSecond f m s) : 0≤f s := by + by_cases hsm : s=m + · simp [hsm,hfm] + · rw [deletedSecond_of_jets hfm hdfm hsm] at hb + simpa only [zero_mul] using (le_div_iff₀ (sq_pos_of_ne_zero (sub_ne_zero.mpr hsm))).mp hb +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Exceptional.lean b/lean/OAI/Analysis/Triangular/Signs/Exceptional.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b9c447f049d08023962882b241a908428808314 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Exceptional.lean @@ -0,0 +1,115 @@ +import OAI.Analysis.Triangular.Certificate.Param +import OAI.Analysis.Triangular.Taylor.Taylor +import OAI.Analysis.Triangular.Auxiliary.PolynomialShift + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction + +def freezeParameter (z : ℝ) (e : Fin 8 → ℝ) : Fin 8 → ℝ := + fun r => if r.val=0 then z else e r +lemma polytope_one (e : Fin 8 → ℝ) (he : ParameterPolytope e) : e 1=1 := by + rcases he with ⟨z,w,d,u,a,r,p,_,_,_,_,_,_,_,_,_,_,_,_,_,_,rfl⟩ + rfl +lemma freezeParameter_mem (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {z : ℝ} (hz : 0≤z) (hzZ : z≤Z) : ParameterPolytope (freezeParameter z e) := by + rcases he with ⟨z₀,w,d,u,a,r,p,h₀,h₁,hw,hwB,hd,hdB,hu,huB,ha,haB,hr,hrB,hp,hpB,rfl⟩ + refine ⟨z,w,d,u,a,r,p,hz,hzZ,hw,hwB,hd,hdB,hu,huB,ha,haB,hr,hrB,hp,hpB,?_⟩ + ext j + fin_cases j <;> rfl + +def frozenTaylorRow (z : ℝ) (l : ℕ) (r : Fin 8) : ℝ := + (if r.val=0 then 0 else -taylorRow 0 1 1 l r) - + (if r.val=1 then z*taylorRow 0 1 1 l 0 else 0) +lemma frozenTaylorRow_eval (z : ℝ) (l : ℕ) (e : Fin 8 → ℝ) (he : e 1=1) : + (∑ r : Fin 8, frozenTaylorRow z l r*e r) = + -∑ r : Fin 8, taylorRow 0 1 1 l r*freezeParameter z e r := by + simp only [frozenTaylorRow,freezeParameter,Fin.sum_univ_succ,Fin.val_zero, + ite_true,Fin.val_succ,Fin.succ_zero_eq_one] + norm_num + rw [he] + ring + +def frozenTaylor (z : ℝ) (e : Fin 8 → ℝ) (τ : ℝ) : ℝ := + ∑ l : Fin 21, (∑ r : Fin 8, frozenTaylorRow z l.val r*e r)*τ^l.val +lemma frozenTaylor_eq (z : ℝ) (e : Fin 8 → ℝ) (he : e 1=1) (τ : ℝ) : + frozenTaylor z e τ = -finiteTaylor 0 1 1 (freezeParameter z e) τ := by + simp_rw [frozenTaylor,frozenTaylorRow_eval z _ e he,neg_mul,Finset.sum_neg_distrib] + rw [finiteTaylor,←Fin.sum_univ_eq_sum_range] + +def exceptionalWeight (test : Fin 4) (endpt : Fin 2) (j : Fin 3) : ℝ := + if test.val=0 then (if endpt.val=0 ∧ j.val=1 then 1 else 0) + else if test.val=1 then (if endpt.val=0 then + (if j.val=1 then 4*Z/3 else if j.val=2 then 2/3 else 0) + else if j.val=2 then 1/3 else 0) + else if test.val=2 then (if endpt.val=0 then + (if j.val=0 then 2*Z^2 else if j.val=1 then 4*Z/3 else 1/3) + else (if j.val=1 then 4*Z/3 else if j.val=2 then 2/3 else 0)) + else (if endpt.val=1 then (if j.val=0 then 6*Z^2 else if j.val=1 then 4*Z else 1) else 0) + +def exceptionalOffset (test : Fin 4) (l : ℕ) (r : Fin 8) : ℝ := + if r.val=1 then (if l=0 then Q 1*(if test.val=0 then 1 else test.val*Z) + else if l=1 ∧ test.val≠0 then Q 1 else 0) else 0 + +def exceptionalRow (test : Fin 4) (l : Fin 23) (r : Fin 8) : ℝ := + exceptionalOffset test l.val r + + ∑ ep : Fin 2, ∑ j : Fin 3, if j.val≤l.val ∧ l.val-j.val<21 then + exceptionalWeight test ep j * frozenTaylorRow (if ep.val=0 then 0 else Z) (l.val-j.val) r else 0 + +def exceptionalValue (test : Fin 4) (e : Fin 8 → ℝ) (τ : ℝ) : ℝ := + let A := frozenTaylor 0 e τ + let D := frozenTaylor Z e τ + if test.val=0 then Q 1+τ*A + else if test.val=1 then Q 1*(τ+Z)+(2*(τ^2+2*Z*τ)*A+τ^2*D)/3 + else if test.val=2 then Q 1*(τ+2*Z)+((τ^2+4*Z*τ+6*Z^2)*A+2*(τ^2+2*Z*τ)*D)/3 + else Q 1*(τ+3*Z)+(τ^2+4*Z*τ+6*Z^2)*D +lemma exceptionalRow_eval (test : Fin 4) (e : Fin 8 → ℝ) (he : e 1=1) (τ : ℝ) : + (∑ l : Fin 23, (∑ r : Fin 8, exceptionalRow test l r*e r)*τ^l.val) = + exceptionalValue test e τ := by + have hoff : (∑ l : Fin 23, (∑ r : Fin 8, exceptionalOffset test l.val r*e r)*τ^l.val) = + (if test.val=0 then Q 1 else Q 1*(τ+test.val*Z)) := by + simp only [exceptionalOffset,ite_mul,zero_mul] + fin_cases test <;> norm_num [Fin.sum_univ_succ,Fin.succ,he] <;> ring + have hshift (ep : Fin 2) (j : Fin 3) : + (∑ l : Fin 23, (∑ r : Fin 8, + (if j.val≤l.val ∧ l.val-j.val<21 then + exceptionalWeight test ep j*frozenTaylorRow (if ep.val=0 then 0 else Z) (l.val-j.val) r else 0)*e r)*τ^l.val) = + exceptionalWeight test ep j*τ^j.val*frozenTaylor (if ep.val=0 then 0 else Z) e τ := by + simp only [ite_mul,zero_mul,Finset.sum_ite_irrel,Finset.sum_const_zero] + simp_rw [mul_assoc,←Finset.mul_sum] + have hh := PolynomialShift.shift_sum (N:=20) (M:=22) (d:=j.val) (by omega) + (fun l => ∑ r : Fin 8, frozenTaylorRow (if ep.val=0 then 0 else Z) l r*e r) τ + have hcond (l : Fin 23) : (j.val≤l.val ∧ l.val-j.val<21) ↔ (j.val≤l.val ∧ l.val-j.val≤20) := by omega + have hfac (c : Prop) [Decidable c] (x : ℝ) : + (if c then exceptionalWeight test ep j*x else 0) = + exceptionalWeight test ep j*(if c then x else 0) := by split_ifs <;> simp + simp only [hcond,hfac, mul_assoc,←Finset.mul_sum] + simp only [ite_mul,zero_mul] at hh + rw [hh] + rfl + simp only [exceptionalRow,add_mul,Finset.sum_add_distrib,Finset.sum_mul] + simp only [Finset.sum_mul] at hoff + rw [hoff] + have hex : (∑ l : Fin 23, (∑ r : Fin 8, ∑ ep : Fin 2, ∑ j : Fin 3, + (if j.val≤l.val ∧ l.val-j.val<21 then + exceptionalWeight test ep j*frozenTaylorRow (if ep.val=0 then 0 else Z) (l.val-j.val) r else 0)*e r)*τ^l.val) = + ∑ ep : Fin 2, ∑ j : Fin 3, + exceptionalWeight test ep j*τ^j.val*frozenTaylor (if ep.val=0 then 0 else Z) e τ := by + simp_rw [Finset.sum_comm (s:=Finset.univ (α:=Fin 8)) (t:=Finset.univ (α:=Fin 2)), + Finset.sum_comm (s:=Finset.univ (α:=Fin 8)) (t:=Finset.univ (α:=Fin 3)),Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro ep _ + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro j _ + simpa only [Finset.sum_mul] using hshift ep j + simp only [Finset.sum_mul] at hex + rw [hex] + fin_cases test <;> norm_num [exceptionalValue,exceptionalWeight,Fin.sum_univ_succ,Fin.succ] <;> ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/ExceptionalComparison.lean b/lean/OAI/Analysis/Triangular/Signs/ExceptionalComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c515af25aba5a56aa55036d8ca2ee6016b3d167 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/ExceptionalComparison.lean @@ -0,0 +1,91 @@ +import OAI.Analysis.Triangular.Signs.ExceptionalSign0 +import OAI.Analysis.Triangular.Signs.ExceptionalSign1 +import OAI.Analysis.Triangular.Signs.ExceptionalSign2 +import OAI.Analysis.Triangular.Signs.ExceptionalSign3 + +namespace OAI + +noncomputable section +open scoped BigOperators +open Set +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate +lemma frozenTaylor_affine (z : ℝ) (e : Fin 8 → ℝ) (v : ℝ) : + frozenTaylor z e v=(1-z/Z)*frozenTaylor 0 e v+(z/Z)*frozenTaylor Z e v := by + unfold frozenTaylor + simp only [Finset.mul_sum,←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro l hl + simp only [←mul_assoc,Finset.mul_sum] + rw [←add_mul,←Finset.sum_add_distrib] + congr 1 + apply Finset.sum_congr rfl + intro r hr + unfold frozenTaylorRow + split_ifs <;> (try omega) <;> norm_num [Z] <;> ring +lemma frozenTaylor_actual (e : Fin 8 → ℝ) (he : e 1=1) (v : ℝ) : + frozenTaylor (e 0) e v= -finiteTaylor 0 1 1 e v := by + have heq : freezeParameter (e 0) e=e := by + ext r + unfold freezeParameter + split_ifs with hr + · rw [show r=0 from Fin.ext hr] + · rfl + rw [frozenTaylor_eq _ _ he,heq] +lemma exceptional_adjusted_nonneg (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {v z : ℝ} (hv : v∈Icc 0 1) (hz : 0 ≤ z) (hzB : z ≤ Z) : + 0 ≤ Q 1*(v+3*z)+(v^2+4*z*v+6*z^2)* + ((1-z/Z)*(frozenTaylor 0 e v-3/1000)+(z/Z)*(frozenTaylor Z e v-3/1000)) := by + let A := frozenTaylor 0 e v + let D := frozenTaylor Z e v + let B0 := v^2 + let B1 := v^2+2*Z*v + let B2 := v^2+4*Z*v+6*Z^2 + have h0 := exceptional_sign_0 e he hv + have h1 := exceptional_sign_1 e he hv + have h2 := exceptional_sign_2 e he hv + have h3 := exceptional_sign_3 e he hv + change 46/1000 < Q 1+v*A at h0 + change 56/1000 < Q 1*(v+Z)+(2*B1*A+B0*D)/3 at h1 + change 24/1000 < Q 1*(v+2*Z)+(B2*A+2*B1*D)/3 at h2 + change 27/1000 < Q 1*(v+3*Z)+B2*D at h3 + have hv2 : v^2 ≤ 1 := by nlinarith [hv.1,hv.2] + have hB0 : B0 ≤ 7/2 := by dsimp[B0]; linarith + have hB1 : B1 ≤ 7/2 := by dsimp[B1,Z]; nlinarith [hv.1,hv.2] + have hB2 : B2 ≤ 7/2 := by dsimp[B2,Z]; nlinarith [hv.1,hv.2] + let b0 := v*(Q 1+v*(A-3/1000)) + let b1 := Q 1*(v+Z)+(2*B1*(A-3/1000)+B0*(D-3/1000))/3 + let b2 := Q 1*(v+2*Z)+(B2*(A-3/1000)+2*B1*(D-3/1000))/3 + let b3 := Q 1*(v+3*Z)+B2*(D-3/1000) + have hb0 : 0 ≤ b0 := by dsimp[b0]; apply mul_nonneg hv.1; nlinarith [hv.2] + have hb1 : 0 ≤ b1 := by dsimp[b1]; nlinarith + have hb2 : 0 ≤ b2 := by dsimp[b2]; nlinarith + have hb3 : 0 ≤ b3 := by dsimp[b3]; nlinarith + let t := z/Z + have ht0 : 0 ≤ t := div_nonneg hz (by norm_num[Z]) + have ht1 : t ≤ 1 := (div_le_one (by norm_num[Z])).mpr hzB + have hzt : z=t*Z := by dsimp[t]; rw [div_mul_cancel₀ _ (by norm_num[Z] : Z≠0)] + have hid : Q 1*(v+3*z)+(v^2+4*z*v+6*z^2)* + ((1-z/Z)*(A-3/1000)+(z/Z)*(D-3/1000)) = + b0*(1-t)^3+3*b1*t*(1-t)^2+3*b2*t^2*(1-t)+b3*t^3 := by + change Q 1*(v+3*z)+(v^2+4*z*v+6*z^2)*((1-t)*(A-3/1000)+t*(D-3/1000))=_ + rw[hzt] + dsimp[b0,b1,b2,b3,B0,B1,B2] + ring + change 0 ≤ Q 1*(v+3*z)+(v^2+4*z*v+6*z^2)*((1-z/Z)*(A-3/1000)+(z/Z)*(D-3/1000)) + rw[hid] + positivity +lemma exceptional_rational_comparison (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {v : ℝ} (hv : v∈Icc 0 1) (hz : 0 RI.sum (fun j : Fin 3 => + if h : j.val≤l.val ∧ l.val-j.val<21 then + (exceptionalWeightBox test ep j).mul (frozenTaylorRowBox (if ep.val=0 then RI.point 0 else ZBox) ⟨l.val-j.val,h.2⟩ r) else RI.point 0))) +lemma exceptionalRowBox_mem (test : Fin 4) (l : Fin 23) (r : Fin 8) : + (exceptionalRowBox test l r).Mem (exceptionalRow test l r) := by + unfold exceptionalRowBox exceptionalRow + apply RI.mem_add (exceptionalOffsetBox_mem test l.val r) + apply RI.mem_sum + intro ep + apply RI.mem_sum + intro j + split + · apply RI.mem_mul (exceptionalWeightBox_mem test ep j) + apply frozenTaylorRowBox_mem + split_ifs + · exact ep0 + · exact ZBox_mem + · exact ep0 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign0.lean b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign0.lean new file mode 100644 index 0000000000000000000000000000000000000000..5cd9496aa030a2afb3fe860b46d951a03ec85cd8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign0.lean @@ -0,0 +1,586 @@ +import OAI.Analysis.Triangular.Signs.ExceptionalInterval + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def ex0r0 : Fin 8 → RI := ![⟨0,2⟩, + ⟨324679254169772833783550212097129381956412425050047392902795,324679254169772833783550212097129381956421809538816682723958⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩] +lemma ex0r0_calc (r : Fin 8) : exceptionalRowBox 0 0 r = ex0r0 r := by + revert r + decide +kernel +def ex0r1 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-353829196146230030175099839368987204335446960136762780186308,-353829196146230030168047907444064791912456424396982714640027⟩, + ⟨483169025561007177361993851881727100628698146249150156641063,483169025561007177509694290870217463910395993362159738691843⟩, + ⟨-696790370593526751623657129039898498341987982476803480155038,-696790370593526751569004199663519520613599376826935327342036⟩, + ⟨-776720069120214335967184999696320074536128050804987504525818,-776720069120214335810638029134608472751440717954793103515591⟩, + ⟨-400251014916968479706971544397951880890928862379172327314014,-400251014916968479639782742773764022416132335844181590740209⟩, + ⟨-18843983881606130606751317837848826285292126167312083414141,-18843983881606130488631914581623292223121193130096760516815⟩, + ⟨-16573469530357650255368719055320262986766741782515978285771,-16573469530357650188739920338582793346555232044366137412886⟩] +lemma ex0r1_calc (r : Fin 8) : exceptionalRowBox 0 1 r = ex0r1 r := by + revert r + decide +kernel +def ex0r2 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-35451251294094030500569367568157322893084497862269584218028,-35451251294094030492702942955324976517438578386846130780359⟩, + ⟨336782035691014382083402458412061487548933723583074750503616,336782035691014382248162183968253954675720463993102011534437⟩, + ⟨-394931271231936737542245810492086366610001448742865353265669,-394931271231936737481280510004858509165077145005780153020937⟩, + ⟨-416184336883695304263971476682482995166597881916890011618547,-416184336883695304089343451994581302717220429454876492162858⟩, + ⟨-85697311296417866236094825021741692065552604934025140161199,-85697311296417866161145768731041316428213437759606587564103⟩, + ⟨-8149259177356756488351239014761275823283383869095245654658,-8149259177356756356589135959297566172843693999598518343125⟩, + ⟨30626106585741779527406085750623940297918674249621991271283,30626106585741779601730459232755974229889191011741241312752⟩] +lemma ex0r2_calc (r : Fin 8) : exceptionalRowBox 0 2 r = ex0r2 r := by + revert r + decide +kernel +def ex0r3 : Fin 8 → RI := ![⟨0,6⟩, + ⟨159451040449110267639165191347994999016166829968082332957170,159451040449110267647169552816616859367735830546809888906229⟩, + ⟨-1666535864210167886028019435428117994029457642335508463820101,-1666535864210167885860370666933481255769783134999083245687690⟩, + ⟨1380979967538296985073856540314182467828105199852579785478570,1380979967538296985135890860369783436173480196485993283105665⟩, + ⟨1859068084469084587400631984478217705474261228951905702158128,1859068084469084587578322091598461687683524195868019118958850⟩, + ⟨908576948893789337062063686158772194497833750853919682235119,908576948893789337138326965573797198414279888315333362040240⟩, + ⟨-25090120990239926515911018311990352463658735941954294787794,-25090120990239926381838481850162951624735366018506468731303⟩, + ⟨118634622075890481117736475546199922811205190232054280932372,118634622075890481193364118415346665268325789109881082984081⟩] +lemma ex0r3_calc (r : Fin 8) : exceptionalRowBox 0 3 r = ex0r3 r := by + revert r + decide +kernel +def ex0r4 : Fin 8 → RI := ![⟨0,6⟩, + ⟨6243336948650992409374591893493747833521840946962133636181,6243336948650992417177805007802594631376627492716829162520⟩, + ⟨497398756531122887893280383694219722332262439521326618609446,497398756531122888056716164798311624808205585963024049548675⟩, + ⟨-215531977705961793239519421904880118097175912276525687429803,-215531977705961793179044014634254198567317303882961394877665⟩, + ⟨-461359523054432928099092273285187572663105602115945952428763,-461359523054432927925867490830871686255435241682973074254598⟩, + ⟨-310868335238695666436676417170144119382598780653253854346420,-310868335238695666362329622070944089077772566493955333185121⟩, + ⟨28240583021383660526700500684231793487260541955782982430666,28240583021383660657403815233091913927831432656157786757744⟩, + ⟨-82662311031408695625943384270484350638744576477231472387595,-82662311031408695552216252263838191469623073422539346073838⟩] +lemma ex0r4_calc (r : Fin 8) : exceptionalRowBox 0 4 r = ex0r4 r := by + revert r + decide +kernel +def ex0r5 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-119788470406866064899397397566522547283325368907068004159549,-119788470406866064892907750929239696159749827416430231294126⟩, + ⟨1436656371599224983861604806389814143200760083870811630478418,1436656371599224983997528361428775758274347143376747905319331⟩, + ⟨-1105385996906680818673564893499778660807888664709707155621626,-1105385996906680818623269711545959878291985413429294850708170⟩, + ⟨-1542575271106656205582651308157709955727198950389813007416297,-1542575271106656205438586599115733819579889220177810341117504⟩, + ⟨-839792634656722166779216224180696464018550611589481022607843,-839792634656722166717384716863968292952811933899253292028988⟩, + ⟨106664617571168683676027342015918871076208204946513531756399,106664617571168683784728503104699467976788049041047051386855⟩, + ⟨-252894027454933840301425225581540361077998923210870932943108,-252894027454933840240109069366790782777886025890277081042597⟩] +lemma ex0r5_calc (r : Fin 8) : exceptionalRowBox 0 5 r = ex0r5 r := by + revert r + decide +kernel +def ex0r6 : Fin 8 → RI := ![⟨0,6⟩, + ⟨88691651882274763659295065829271395605548526651961687486576,88691651882274763664201804201493040298428275137718012221389⟩, + ⟨-1287906440747212684470443964406488977185112584941000067131692,-1287906440747212684367673912281426749285885463047549287574561⟩, + ⟨893875095641785585811182446602686164035627165857675921712010,893875095641785585849209986931913339103035213603669852044746⟩, + ⟨1334339719287427306158582332896866896828103044641917635474799,1334339719287427306267507806875927155706455658712334318918999⟩, + ⟨773651376158511304958873977231431841002153581956034565662388,773651376158511305005623984821408610186789708751190374929528⟩, + ⟨-120129390782426617053399680064522351422282013021722218430711,-120129390782426616971212129950948059315164547904211147159693⟩, + ⟨266727266539863665214946223577192971143279068705982168455681,266727266539863665261306580827453238117149792516299431385315⟩] +lemma ex0r6_calc (r : Fin 8) : exceptionalRowBox 0 6 r = ex0r6 r := by + revert r + decide +kernel +def ex0r7 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-3216104658021610145451852248989384097575217993041942395849,-3216104658021610141806575263664805102954445640541373261472⟩, + ⟨-199721730118340535089941228464863719049469920555680967767729,-199721730118340535013592078098874128969747639454039020930586⟩, + ⟨82441031634189291371425774299849504219902078949254223166494,82441031634189291399676907140286402505256829719340078977219⟩, + ⟨174916808643277697517488688125935762662240016328567767290744,174916808643277697598410777971405569953463476947519150357606⟩, + ⟨150343866868917542575538160553073305698552655699781901023715,150343866868917542610269322844277158124934145085826774381881⟩, + ⟨-48665264576868693533119862486496012566140584879723726578106,-48665264576868693472061708946906319188627998667185870847107⟩, + ⟨102221903212858917992483352045064801466232263963170293144661,102221903212858918026925038251693775054535047388845292821023⟩] +lemma ex0r7_calc (r : Fin 8) : exceptionalRowBox 0 7 r = ex0r7 r := by + revert r + decide +kernel +def ex0r8 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-37448776453321247472690425124256959620446643122870050683507,-37448776453321247470442070360543951507281403173266931528098⟩, + ⟨864779603731521850459293646556267450553621349474986702089407,864779603731521850506384711685359299483063838675673049600837⟩, + ⟨-498855306566003550528713327227783647770570388879863518533620,-498855306566003550511288432121944681863551118850196920728343⟩, + ⟨-837422573775900003778216975101496029565744411474159549536744,-837422573775900003728305386236081194855660184858914276229581⟩, + ⟨-567519996209029152837529745628691904361721335818768454355559,-567519996209029152816108060939246614184066329031801764615381⟩, + ⟨141205059726866726646101224506034699483658509931941358525579,141205059726866726683761021258668067168657821014333189347725⟩, + ⟨-288389779632864447593076502644858943908824820750843098201536,-288389779632864447571833362668336726910144496785346880905829⟩] +lemma ex0r8_calc (r : Fin 8) : exceptionalRowBox 0 8 r = ex0r8 r := by + revert r + decide +kernel +def ex0r9 : Fin 8 → RI := ![⟨0,6⟩, + ⟨21084148065618402893790524592315952305917170848946597209839,21084148065618402895069614549519559190917941034142592196055⟩, + ⟨-435057870624175325188809425578993603986250056646565771167213,-435057870624175325162019299104087195899528253546262952147664⟩, + ⟨249777948438764233589322298148826619896313525035387159416673,249777948438764233599235328198466221063268059316467538574339⟩, + ⟨419585978126755012184110116509692075109159370573879176321928,419585978126755012212504840107516242178091923295760566960928⟩, + ⟨284527348119613632024866376612759867633958386290545565690113,284527348119613632037053181913488917424447766403048504354136⟩, + ⟨-77801059232223445789344808977548036241261228008898623129058,-77801059232223445767920134991892234140031513802439562039460⟩, + ⟨151373632138106339016070725938284337148194037145038459725283,151373632138106339028155957077886030912930186794438253199484⟩] +lemma ex0r9_calc (r : Fin 8) : exceptionalRowBox 0 9 r = ex0r9 r := by + revert r + decide +kernel +def ex0r10 : Fin 8 → RI := ![⟨0,6⟩, + ⟨4755985693107399414648461924737657620267526539427375750421,4755985693107399415363145409096837714088020768684995443747⟩, + ⟨-97669371574098591174599088309456297880422003857005709330412,-97669371574098591159630273311258724867546301410335968493085⟩, + ⟨59817689834703228911115338390128084413659531663954753085989,59817689834703228916654181703273393420704438656834566689961⟩, + ⟨97495021974685701882012509862251462264586686697573135790692,97495021974685701897877883430340126106155224068147951738810⟩, + ⟨63298916796669821880941718049646210794430726887230925475894,63298916796669821887751019011165485294463539909973062310757⟩, + ⟨-8660840132054647393979257184546010146169653818860730693209,-8660840132054647382008355084111252667775620345280721532216⟩, + ⟨23950591509078240641406734208208717824742542956771546232947,23950591509078240648159281244840925619353777382005444213410⟩] +lemma ex0r10_calc (r : Fin 8) : exceptionalRowBox 0 10 r = ex0r10 r := by + revert r + decide +kernel +def ex0r11 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-11658440396884611719610823917896155444237020463505067174687,-11658440396884611719266450810671022649939244318371948678248⟩, + ⟨246709102970326547582380754383568997030822622310401540896545,246709102970326547589593538007667235889292849692974853435114⟩, + ⟨-144773361787699658203915889967441026741181010618663233847749,-144773361787699658201246976072104024395890321218614428815109⟩, + ⟨-240650516382449062235795067929723140679228831314611823533201,-240650516382449062228150273957997118871222221689455850097255⟩, + ⟨-160742810436336105624860464020380112689764400525209630436538,-160742810436336105621579375004808578795139847724663319284177⟩, + ⟨37048836224391924862209785558307635899588331257651799261582,37048836224391924867978012812518855424308594737735406552985⟩, + ⟨-77626317199057980517763749794804821055105795488072656676593,-77626317199057980514510007885866981849802159279989991027346⟩] +lemma ex0r11_calc (r : Fin 8) : exceptionalRowBox 0 11 r = ex0r11 r := by + revert r + decide +kernel +def ex0r12 : Fin 8 → RI := ![⟨0,6⟩, + ⟨6269614602744564553281120812012069614719049420397452905427,6269614602744564553436743928946332255984756676851487524220⟩, + ⟨-167063256076138048041343131948906271818128103950298995185131,-167063256076138048038083655974148046481920869223087189407510⟩, + ⟨97340214218289147180987543237849206557441741177140926132192,97340214218289147182193632477996562231164892990053273946664⟩, + ⟨162338705437383502051828462661926917092222490026728449283186,162338705437383502055283165254080757332798608404891990002336⟩, + ⟨108921063881184700169139093875027850735204598341849451504425,108921063881184700170621826669278415973047591761004360162171⟩, + ⟨-26784933098171201068894926375207381399899423407693860020873,-26784933098171201066288249240286176258476471146731010106011⟩, + ⟨54452171117154631815673256491254405580200601747861518808232,54452171117154631817143631055772446513177810351977893396524⟩] +lemma ex0r12_calc (r : Fin 8) : exceptionalRowBox 0 12 r = ex0r12 r := by + revert r + decide +kernel +def ex0r13 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-1448501915866153204452617268411531637668381765014088967086,-1448501915866153204387110074149365782818051111037622101991⟩, + ⟨72271774149173424050450236288247127847711996288999639524876,72271774149173424051822263337167781234548886538726745046346⟩, + ⟨-41906238027218011343687897709983290443565542174781775018182,-41906238027218011343180212709784721014261399983766524827874⟩, + ⟨-70045434886813400554643264808456856882191636834349112922409,-70045434886813400553189060071524265776876012689587765531389⟩, + ⟨-47120291696349198843562573826522085570628272353724369763874,-47120291696349198842938439911811355695174444490123819985438⟩, + ⟨12060173336968802673366522743127697673239609462303690989797,12060173336968802674463764006635892424814113083015873811950⟩, + ⟨-24068917686788897673230952850057239962816338622309467163219,-24068917686788897672612020944994434249044847787647429404888⟩] +lemma ex0r13_calc (r : Fin 8) : exceptionalRowBox 0 13 r = ex0r13 r := by + revert r + decide +kernel +def ex0r14 : Fin 8 → RI := ![⟨0,6⟩, + ⟨415773315364664524490245947036680796407873565035994696997,415773315364664524517081884436688156719756523328085928599⟩, + ⟨-23939885009392314948815641722815089745999330328765281217308,-23939885009392314948253571672179560046240054392796874982726⟩, + ⟨13798033071993787147305899444965039655480343867264944296542,13798033071993787147513879698701834433289396104894172279766⟩, + ⟨23127904812381173676066607066925362720995019210133829900640,23127904812381173676662342355646633451595180165236155851659⟩, + ⟨15587506973168430910094618039136475613173318348958857535383,15587506973168430910350303217734473740907282814269795136997⟩, + ⟨-4141939113787536645594916053911323414464111655247330510976,-4141939113787536645145415839593366692934387235358442484125⟩, + ⟨8123803106624551287658293936159851184094774746838879634505,8123803106624551287911848038822951078209827040327167612347⟩] +lemma ex0r14_calc (r : Fin 8) : exceptionalRowBox 0 14 r = ex0r14 r := by + revert r + decide +kernel +def ex0r15 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-751475133540229161808315652633527444266979492877887957378,-751475133540229161797880664450467151412577886250570402605⟩, + ⟨7073979010062790300516055196661544062444726648015773390858,7073979010062790300734612657465185732198820454938728508381⟩, + ⟨-4032712565788352436739623523626764424371587424830581006322,-4032712565788352436658751689052784772281235125252302937978⟩, + ⟨-6794709992560023794605429521449820455598898378093638374396,-6794709992560023794373781541154788238438211113027128450295⟩, + ⟨-4582190100567610831646578773487746093373589740896194738867,-4582190100567610831547157174104728303259732613901550412824⟩, + ⟨1269412072119566604822955766201848987844726279264117562274,1269412072119566604997741142795013155225329320808206980480⟩, + ⟨-2442044503361454520652060905042679661190199577138804189895,-2442044503361454520553467961348682817022458260519457997396⟩] +lemma ex0r15_calc (r : Fin 8) : exceptionalRowBox 0 15 r = ex0r15 r := by + revert r + decide +kernel +def ex0r16 : Fin 8 → RI := ![⟨0,6⟩, + ⟨705775493707539539170077895055516744097303502221240482016,705775493707539539173978019483796896972346988110028013782⟩, + ⟨-2240100139145552601111494253700573472519720006188866365681,-2240100139145552601029807405866214015465720151632230099735⟩, + ⟨1255158290959608403045875312675821615894031618002963456309,1255158290959608403076101529711091968590592388696285231686⟩, + ⟨2132482822101919960789472810169463686187336073907287108451,2132482822101919960876052299370693571207200358388681752888⟩, + ⟨1435523292825944866297034102903121802545483706290571525259,1435523292825944866334193379142810835298068392410473106121⟩, + ⟨-413199268435074891186750218069646475952526418272527190289,-413199268435074891121423386357104741995587254673033727068⟩, + ⟨780992849925438481929037919655139349277216505722007949515,780992849925438481965887482051495421497837654745907606240⟩] +lemma ex0r16_calc (r : Fin 8) : exceptionalRowBox 0 16 r = ex0r16 r := by + revert r + decide +kernel +def ex0r17 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-311993036178078131301840147669691058166808313722353578931,-311993036178078131300533673998657279230306586733287489060⟩, + ⟨821818252882863284260638290809103869034022414365781961441,821818252882863284288001960334996811775943354895121913038⟩, + ⟨-453166905097450521459568844751043739637927697673128291292,-453166905097450521449443589145048758590378369436317641675⟩, + ⟨-775969278794149510777526126090476649459033188949136245447,-775969278794149510748523507027159478305205621636600642380⟩, + ⟨-520658337475351699423563896073075410598198691901407631704,-520658337475351699411116186535967097497851160147030347502⟩, + ⟨152782525211649212839790982878999738533391651219375960683,152782525211649212861674332298732952406920503387607118144⟩, + ⟨-286247630648574929658978846597656226480057708296193486296,-286247630648574929646634885797108429111237707468550260341⟩] +lemma ex0r17_calc (r : Fin 8) : exceptionalRowBox 0 17 r = ex0r17 r := by + revert r + decide +kernel +def ex0r18 : Fin 8 → RI := ![⟨0,6⟩, + ⟨28049984189099274045059869318805452162570597916393060628,28049984189099274045425252631134078638315746645381485359⟩, + ⟨-314673842506490431784070487494455591395913057128721876493,-314673842506490431776417651903115523334498738773160654214⟩, + ⟨171960314552655345414765081118108886246638222523475273503,171960314552655345417596825464372274275514278236121539387⟩, + ⟨295769662666442079806626126174139008467805110026682779028,295769662666442079814737329066711922012199342089786507632⟩, + ⟨197946026424584299756696418088765006726713130335411165900,197946026424584299760177686362601550449384685447778020855⟩, + ⟨-58286259988346729012032055434770193556503286968426585737,-58286259988346729005911908605098521675496032906388985541⟩, + ⟨109037584140931064201564696947935948188668590331549359509,109037584140931064205016949668030715262400436824649028084⟩] +lemma ex0r18_calc (r : Fin 8) : exceptionalRowBox 0 18 r = ex0r18 r := by + revert r + decide +kernel +def ex0r19 : Fin 8 → RI := ![⟨0,6⟩, + ⟨33415771111297036223953133136809430933307298090720927657,33415771111297036224091286429627785844484747476623943114⟩, + ⟨112499732680328376531378081489858179631918669114586732910,112499732680328376534271657634874114600400084038655982060⟩, + ⟨-61230728363972173842447386876236882119147561520876513485,-61230728363972173841376689904985781252162677661407754361⟩, + ⟨-105528281139937179939845348053719048276792072862650727950,-105528281139937179936778460895723343244675397457703464273⟩, + ⟨-70526470091688242023160563477019507318154774327648751995,-70526470091688242021844278198008399245115460468255721164⟩, + ⟨20739417316750459807699454858253916870929393570559711712,20739417316750459810013513570082801001503945623581085737⟩, + ⟨-38824503839810975731105845419877702548509248502865301684,-38824503839810975729800531069633928042804422860146670010⟩] +lemma ex0r19_calc (r : Fin 8) : exceptionalRowBox 0 19 r = ex0r19 r := by + revert r + decide +kernel +def ex0r20 : Fin 8 → RI := ![⟨0,6⟩, + ⟨3507921960787311741741676981350333449041904622011339194,3507921960787311741784817635752828270770395548906891190⟩, + ⟨-36370970121290621806499201582118749138411253654333286738,-36370970121290621805595634494336357505413540735873195219⟩, + ⟨19767258755075506817691114076483126059249996526294884469,19767258755075506818025456943484265413109620933925814850⟩, + ⟨34092699399081148135263895852776800393903323539042101020,34092699399081148136221582175523333393498545340454503486⟩, + ⟨22773285409829154771112630979855309820492835048466999468,22773285409829154771523662864499319749893249711410298299⟩, + ⟨-6688867330633045652945707854111247077403632360910548318,-6688867330633045652223104685431450075898360821687219999⟩, + ⟨12530068104863504831196158203238690344590955604961377257,12530068104863504831603764233624952032716912257858668657⟩] +lemma ex0r20_calc (r : Fin 8) : exceptionalRowBox 0 20 r = ex0r20 r := by + revert r + decide +kernel +def ex0r21 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-33126050848891842307586721635228246746489568440262906313,-33126050848891842307574251095155523201906000525032131058⟩, + ⟨10883040173460042234116393541451935377535615597864109430,10883040173460042234377584979844500984622232190557329384⟩, + ⟨-5917706646138368128695988930689199272806764318506701947,-5917706646138368128599341437072930238802613251305548476⟩, + ⟨-10203930988021550245739457543559762826153818446593627441,-10203930988021550245462622019613260120882764262408059956⟩, + ⟨-6818386692787811254179034565870354246251668656114741800,-6818386692787811254060218807055078478995553437724776767⟩, + ⟨2002525905641920967559531738264494907645025420295326484,2002525905641920967768412477245063114872381683441454314⟩, + ⟨-3752247592010364693050619874864475974676000653062721417,-3752247592010364692932794417503737006791958244977074485⟩] +lemma ex0r21_calc (r : Fin 8) : exceptionalRowBox 0 21 r = ex0r21 r := by + revert r + decide +kernel +def ex0r22 : Fin 8 → RI := ![⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩] +lemma ex0r22_calc (r : Fin 8) : exceptionalRowBox 0 22 r = ex0r22 r := by + revert r + decide +kernel +def ex0r : Fin 23 → Fin 8 → RI := ![ex0r0,ex0r1,ex0r2,ex0r3,ex0r4,ex0r5,ex0r6,ex0r7,ex0r8,ex0r9,ex0r10,ex0r11,ex0r12,ex0r13,ex0r14,ex0r15,ex0r16,ex0r17,ex0r18,ex0r19,ex0r20,ex0r21,ex0r22] +lemma ex0r_mem (l : Fin 23) (r : Fin 8) : (ex0r l r).Mem (exceptionalRow 0 l r) := by + have he : exceptionalRowBox 0 l r = ex0r l r := by + fin_cases l + · exact ex0r0_calc r + · exact ex0r1_calc r + · exact ex0r2_calc r + · exact ex0r3_calc r + · exact ex0r4_calc r + · exact ex0r5_calc r + · exact ex0r6_calc r + · exact ex0r7_calc r + · exact ex0r8_calc r + · exact ex0r9_calc r + · exact ex0r10_calc r + · exact ex0r11_calc r + · exact ex0r12_calc r + · exact ex0r13_calc r + · exact ex0r14_calc r + · exact ex0r15_calc r + · exact ex0r16_calc r + · exact ex0r17_calc r + · exact ex0r18_calc r + · exact ex0r19_calc r + · exact ex0r20_calc r + · exact ex0r21_calc r + · exact ex0r22_calc r + rw [←he] + exact exceptionalRowBox_mem 0 l r +def ex0b0 : Fin 8 → RI := ![⟨0,25⟩, + ⟨324679254169772833783550212097129381956412425050047392902785,324679254169772833783550212097129381956421809538816682723981⟩, + ⟨-12,26⟩, + ⟨-12,26⟩, + ⟨-12,27⟩, + ⟨-11,25⟩, + ⟨-12,25⟩, + ⟨-10,25⟩] +lemma ex0b0_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 0 r = ex0b0 r := by + revert r + decide +kernel +def ex0b1 : Fin 8 → RI := ![⟨0,25⟩, + ⟨308596108890398741502863855762175418122983017771103630167044,308596108890398741503184398122399164142219244793499286603979⟩, + ⟨21962228434591235334636084176442140937668097556779552574581,21962228434591235341349740494100793814108908789189079031473⟩, + ⟨-31672289572433034164711687683631749924635817385309249097968,-31672289572433034162227463621069069118799971673951605788248⟩, + ⟨-35305457687282469816690227258923639751642184127499432023913,-35305457687282469809574455869754930579610941725217868341591⟩, + ⟨-18193227950771294532135070199906903676860402835416923968830,-18193227950771294529081033762443819200733287992917345033621⟩, + ⟨-856544721891187754852332628993128467513278462150549246109,-856544721891187749483268844619240555596417869549852750740⟩, + ⟨-753339524107165920698578138878193772125760990114362649363,-753339524107165917669996379026490606661601456562097155107⟩] +lemma ex0b1_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 1 r = ex0b1 r := by + revert r + decide +kernel +def ex0b2 : Fin 8 → RI := ![⟨0,25⟩, + ⟨292359494990703895843387155844675318692613850761154371395728,292359494990703895844062294351325548161274521700186885588824⟩, + ⟨45382387759619762366602914926096669267322921189676311861311,45382387759619762380743473126592297388718771967958686251382⟩, + ⟨-65054238327688305288480716538224912691739173509765101456815,-65054238327688305283248349363371291956929281637971523927263⟩, + ⟨-72412579170598252638852192512143742685823753025201851111098,-72412579170598252623864684258966923075746647214309660891707⟩, + ⟨-36757439933128813593430724057916585241450470627258199193758,-36757439933128813586998196393853185225831136322456363606506⟩, + ⟨-1748367622039331165498393565409465921274536941050428559975,-1748367622039331154189867282135873172547137444725673113379⟩, + ⟨-1374098500224107687598861534247192997507285295165426635204,-1374098500224107681219947479989102537003336285367738720140⟩] +lemma ex0b2_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 2 r = ex0b2 r := by + revert r + decide +kernel +def ex0b3 : Fin 8 → RI := ![⟨0,25⟩, + ⟨276072952107343563212678011819530379119211525857841228493352,276072952107343563213746997896127116389800455733260525060923⟩, + ⟨69178311829494562988090090018166105772062225676394493143413,69178311829494563010479658503361860557745314773322403967745⟩, + ⟨-99249106027104581562817569329809239945577532529307440332736,-99249106027104581554532857966926289659729825868367550986430⟩, + ⟨-110114177382110280552589381484025102500288692908073552260165,-110114177382110280528858787705559054314586646210218222378267⟩, + ⟨-55102650915323343328651855284315556255784597043800501205811,-55102650915323343318466859994504853141258298307892813275746⟩, + ⟨-2691760986801728885519943210750304797948488901597010860303,-2691760986801728867614495625439614053205882989175841911745⟩, + ⟨-1785241459470376936338683643544530193799634479937572294590,-1785241459470376926238577901319428865526291636345573342487⟩] +lemma ex0b3_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 3 r = ex0b3 r := by + revert r + decide +kernel +def ex0b4 : Fin 8 → RI := ![⟨0,25⟩, + ⟨259840873374847056633797997063472857775046762717117086383387,259840873374847056635306346512222424217630009547893146073108⟩, + ⟨92335831594527711762222720603082529638583528260738288001946,92335831594527711793814613165334196330060954935248431583508⟩, + ⟨-133389616817216251383366634418659853134669510467583124468914,-133389616817216251371676828451266226666947781585997444081282⟩, + ⟨-147266135592061380781134342410659811262249630538191691160407,-147266135592061380747650250496030050019953043335132190157284⟩, + ⟨-72681373245679312489048207407185289883980060070566336548219,-72681373245679312474677082874117949043612168767681392860685⟩, + ⟨-3699156462341368746827285985562155334133236661461998118088,-3699156462341368721562530357586537306429751092911534530625⟩, + ⟨-1921033317248698056571728010915938063297479757400720835717,-1921033317248698042320383431095520382585228353672033585635⟩] +lemma ex0b4_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 4 r = ex0b4 r := by + revert r + decide +kernel +def ex0b5 : Fin 8 → RI := ![⟨0,25⟩, + ⟨243763956611521629340478326904068538320797562579901109159844,243763956611521629342479133083271040539742086637396876674250⟩, + ⟨113963330290863715369551201274267653422749566239149071410447,113963330290863715411457441173548800793735493310189499316669⟩, + ⟨-166679934850506216219150284322884232904235998807679477392860,-166679934850506216203643906783756079562064965402142289706567⟩, + ⟨-182845984733567571659846128559353767722951788527789389872961,-182845984733567571615429910511703078533200390089429482112156⟩, + ⟨-89020506704795624898625324491023801224299953225163773961307,-89020506704795624879562212297994471628169902267116532801059⟩, + ⟨-4775074602072391089055639003317814949246418265666248062332,-4775074602072391055542265017987853732876666886742771380865⟩, + ⟨-1736642700785597562374660690150776711021150402290150200799,-1736642700785597543470435067295807929877981979260751782451⟩] +lemma ex0b5_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 5 r = ex0b5 r := by + revert r + decide +kernel +def ex0b6 : Fin 8 → RI := ![⟨0,26⟩, + ⟨227935844194350005871966301854890995014699572506837856269102,227935844194350005874521861054899153846815623387299280896569⟩, + ⟨133329037476980532422781495268482601029679572935660967559734,133329037476980532476306858207441755276059498073871254984237⟩, + ⟨-198425659753964905932514424770441483210696566692600788307932,-198425659753964905912708675372610246863033123457281864583444⟩, + ⟨-215993597252423254295523361587204270739432360970599638731986,-215993597252423254238792092041469981961493284784644180820176⟩, + ⟨-103742859702772713740943307010270107409587655061942212523859,-103742859702772713716594665821544908835940707545630096102136⟩, + ⟨-5913684447086164403398038608745516681008385468508838380819,-5913684447086164360592587435213233296514561599481870977278⟩, + ⟨-1214170467100780950823684266754646166018699761235089530940,-1214170467100780926677983292957298076530776669651567120166⟩] +lemma ex0b6_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 6 r = ex0b6 r := by + revert r + decide +kernel +def ex0b7 : Fin 8 → RI := ![⟨0,26⟩, + ⟨212440932764964191970616857733953069748072052515617346594119,212440932764964191973800693888602944116489535145545081603554⟩, + ⟨149879890830531633225368120626441180435316311846676901248349,149879890830531633292052541678078680659616766822014808488459⟩, + ⟨-228051358545091673531602072630541075281204504725393694886879,-228051358545091673506927136122508092127039300794365246916972⟩, + ⟨-246032971841563650800726710368376740679433054968528622528005,-246032971841563650730048219696726299586245591819847073865424⟩, + ⟨-116577420066753433076293173878291229068962134316967870363983,-116577420066753433045958488564481663329382497372804903069415⟩, + ⟨-7098258492690167145208757948014488224398234549706075586672,-7098258492690167091879708453871771164596637650795129263520⟩, + ⟨-364504024131516202284511020250954864473759052090403318189,-364504024131516172202658195421761916158389221114603567601⟩] +lemma ex0b7_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 7 r = ex0b7 r := by + revert r + decide +kernel +def ex0b8 : Fin 8 → RI := ![⟨0,26⟩, + ⟨197353216797177825183700607058402749999279978503312649157848,197353216797177825187600011334406885606929431588590848576641⟩, + ⟨163243498999333270075799795264223551571576433346372380937044,163243498999333270157471559752374275478096846930542045037924⟩, + ⟨-255106710639089552557747955469207685440259345325267728143316,-255106710639089552527527319652587117269190228780609033926765⟩, + ⟨-272476702247655389294876532313518869358218257772771765200503,-272476702247655389208313029872120749590923809982665676097488⟩, + ⟨-127359268639673523552569804881119007377425048991803472400251,-127359268639673523515417390033776218957219144309405783796880⟩, + ⟨-8302366810992298419426172301920106192164679692002910759879,-8302366810992298354111403095255423226229718870710282616838⟩, + ⟨774700065983977097140934987450108388599510607756861609565,774700065983977133983693168960516104825692501809230816025⟩] +lemma ex0b8_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 8 r = ex0b8 r := by + revert r + decide +kernel +def ex0b9 : Fin 8 → RI := ![⟨0,26⟩, + ⟨182735955331972067599793609826736695727560365290927778024261,182735955331972067604512848641711078105910453155868045225682⟩, + ⟨173216568551509949284184107580615080379679996625777932634773,173216568551509949383027041982508373913286901823453998776208⟩, + ⟨-279263400488143816609492675017421132261130484414569489033596,-279263400488143816572918268399358361928959887991637073108621⟩, + ⟨-295016498640568790317526232715913172610645872415894789567823,-295016498640568790212763091537002923331353782954326351560530⟩, + ⟨-136021231680477029435386748108606818841762815579683600471013,-136021231680477029390423182956913653886890580791667777076706⟩, + ⟨-9492368925453553342198588384648379128821077508824232193015,-9492368925453553263151643719755744906499047759834238839716⟩, + ⟨2144005173725191249100928520936106296307597016850832589378,2144005173725191293689732900848802561875483424399880819330⟩] +lemma ex0b9_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 9 r = ex0b9 r := by + revert r + decide +kernel +def ex0b10 : Fin 8 → RI := ![⟨0,27⟩, + ⟨168641926203108003780935722863075607123519242772276476627088,168641926203108003786600119170328078084648212964289183789970⟩, + ⟨179743962152256195018966668267174850952274974379574029022648,179743962152256195137605621406567668567804344061315785348067⟩, + ⟨-300305355639300417656290163814039469803995065851094661879760,-300305355639300417612390725385642634489535419426535364177314⟩, + ⟨-313503911044908837116916504242552477456095777582644558359915,-313503911044908836991171659937266338644437502763917293695849⟩, + ⟨-142579900931111940386055102233544520880152370613120837640130,-142579900931111940332086345323687083063934509505486482903770⟩, + ⟨-10630646661991985875844645663731003045021688365734756529539,-10630646661991985780966374185092413255126044898864393110483⟩, + ⟨3668999158359832481723775751993533964462958474089630251514,3668999158359832535242715728708517678693768771989575625202⟩] +lemma ex0b10_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 10 r = ex0b10 r := by + revert r + decide +kernel +def ex0b11 : Fin 8 → RI := ![⟨0,28⟩, + ⟨155114047663865884143004282764599190949252793954757410634643,155114047663865884149765445279592577155819162980825758948522⟩, + ⟨182892532196105148041837888487772293636462225882187993498405,182892532196105148183448255996093973913865327589213127097435⟩, + ⟨-318114909313564040869892843486431086363802821993637637387335,-318114909313564040817493395878839876481125925626754275803541⟩, + ⟨-327925381415241373865989371570676417776255408744982444782088,-327925381415241373715897237890094029587444222103678826560662⟩, + ⟨-147118643172689133854370284472392817414527068153871253133213,-147118643172689133789951851085163786440480324604782223436579⟩, + ⟨-11679036506671663748032325440869495321616013922181767104952,-11679036506671663634783290978394056921309480715901816152259⟩, + ⟨5267770332787142570461742820169986320082771638281272092711,5267770332787142634343263671632131414420468561624446881170⟩] +lemma ex0b11_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 11 r = ex0b11 r := by + revert r + decide +kernel +def ex0b12 : Fin 8 → RI := ![⟨0,28⟩, + ⟨142186187479894803123922431430641914355188064415747720856030,142186187479894803131965002452438572712748291008557476798107⟩, + ⟨182823314305956218638701218191799074826054068244801895140942,182823314305956218807150273451231166123887538448350346702880⟩, + ⟨-332657133413024190970212388272172073722760246075960538635716,-332657133413024190907881941703119513495711788216096499368287⟩, + ⟨-338375204553995451569211844363500017491052581094334671586667,-338375204553995451390673517225551073548577804319480489175238⟩, + ⟨-149769863532911962576066177003304985358735593240961533254667,-149769863532911962499438847830657237302554804042007500648135⟩, + ⟨-12602015758337759506751736226567325900099327749441222658950,-12602015758337759372039192223192758168478086163685602811359⟩, + ⟨6858092453144883645184558537669709163964178974090261366277,6858092453144883721173216891724116085819951562594398455059⟩] +lemma ex0b12_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 12 r = ex0b12 r := by + revert r + decide +kernel +def ex0b13 : Fin 8 → RI := ![⟨0,30⟩, + ⟨129884028224384508217227130311826615817601153834274806613272,129884028224384508226777555928516932249323591918041976340440⟩, + ⟨179764836749301090446573085102883197489233562715930988655373,179764836749301090646603668369492767162221648492050023102985⟩, + ⟨-343964095984589879815794967838437099915812386382910359310084,-343964095984589879741778550451890516378814648053903606138086⟩, + ⟨-345029168546283571066141239926587360884700383984105291357740,-345029168546283570854129806215761198555837831765736099154729⟩, + ⟨-150698253843623063941286735727899746703876686911878693734806,-150698253843623063850292996850126702574357857824099869265210⟩, + ⟨-13369328829683821604932707970539448335559270864454480945787,-13369328829683821444963697109014529549450222760332342429290⟩, + ⟨8363618692177491817489195235398315372285027239423730334973,8363618692177491907724522639432825884715742390350980900614⟩] +lemma ex0b13_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 13 r = ex0b13 r := by + revert r + decide +kernel +def ex0b14 : Fin 8 → RI := ![⟨0,30⟩, + ⟨118225903773572024064692025776578728175179208780435673931567,118225903773572024076030038664968532208745178934979447909297⟩, + ⟨173989408975024823065986596754519627735181363329280470743190,173989408975024823303457618692969493872248896872020296984658⟩, + ⟨-352120265663259613024984811534262242172770515820105383428537,-352120265663259612937114476958788768073602132432662325906700⟩, + ⟨-348120771165303761441692666011141847835444895365812102538059,-348120771165303761189998295062141641285551290869458109506602⟩, + ⟨-150086182081898180556510458790334312412795684658322644197141,-150086182081898180448485096826693557595276175419107855176983⟩, + ⟨-13957876237201963582053971020744766719674836584624079082441,-13957876237201963392142989072165510563826512626094002684502⟩, + ⟨9718661536860664776373975604473835254102438304176780495820,9718661536860664883498971511055890751261099967800674472575⟩] +lemma ex0b14_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 14 r = ex0b14 r := by + revert r + decide +kernel +def ex0b15 : Fin 8 → RI := ![⟨0,31⟩, + ⟨107223560504873936957586160822361403637552595380236706507374,107223560504873936971059929437758104474682002821245191920792⟩, + ⟨165793429286144023063869276100112075440357112615698277212748,165793429286144023346073012676085209013289685010414414991020⟩, + ⟨-357249793172484374979020284783685546433041099401942673282493,-357249793172484374874597704929980388921077541655067804023090⟩, + ⟨-347921100621562640177293189620768906689857616334348445535345,-347921100621562639878186833918921816450630977690285591083900⟩, + ⟨-148121848826081724782327082826145064129334751089369655685325,-148121848826081724653952847763451586531956062483458206018779⟩, + ⟨-14352809005696412873348594004642191351557056368450370660100,-14352809005696412647663841880165721188733653702585175564897⟩, + ⟨10871384907159166364550624829472315047890352867341705740006,10871384907159166491854890751312419314030234124781288172036⟩] +lemma ex0b15_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 15 r = ex0b15 r := by + revert r + decide +kernel +def ex0b16 : Fin 8 → RI := ![⟨0,33⟩, + ⟨96882825359280966579973316991329171406066313326546280345984,96882825359280966596019591528133788133191436435988826655966⟩, + ⟨155482071885106414248251390215872425538862908985761920958150,155482071885106414584335433340895441713124965314661201070787⟩, + ⟨-359505990215612426603546629175707045519225662263350774282894,-359505990215612426479186961736599061249394349085830816747568⟩, + ⟨-344722799362174204935088866835264860677145645676480781140585,-344722799362174204578875038598485695228307048203161057801016⟩, + ⟨-144990399784048620719994856160691495137587516949585538765355,-144990399784048620567110516370902645019436893268620214375237⟩, + ⟨-14547865255726042324585008141728414409347925405986295083399,-14547865255726042055810948356737036721504043191012182359692⟩, + ⟨11785434302741953735772963214579257266193334241954251483620,11785434302741953887383047890574036540173546961785442154938⟩] +lemma ex0b16_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 16 r = ex0b16 r := by + revert r + decide +kernel +def ex0b17 : Fin 8 → RI := ![⟨0,35⟩, + ⟨87204182439835641571467150162931779552821828104607334683317,87204182439835641590638279909262307250587009996839027920024⟩, + ⟨143358205849265725977625781480771728736793357132867364861798,143358205849265726379158908788076020391745194493890896354391⟩, + ⟨-359063016411234489504249754371290948547573415732577762979538,-359063016411234489355672256572758168420484896571440579176032⟩, + ⟨-338828026834276426211927421998594693795794496405227636968762,-338828026834276425786344430578540349048445167518842406885434⟩, + ⟨-140867858469518915523384615385891020387915051853611517680982,-140867858469518915340727543955790129776473598968233735892835⟩, + ⟨-14545050661853420093778445605880734097180317119542579554886,-14545050661853419772663263338917377573540596324415555060060⟩, + ⟨12440172864907610692657660044150002558730579567639558110232,12440172864907610873792327627182116017788656105312802041814⟩] +lemma ex0b17_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 17 r = ex0b17 r := by + revert r + decide +kernel +def ex0b18 : Fin 8 → RI := ![⟨0,39⟩, + ⟨78183271894557119096131140153665620212127183920838360538526,78183271894557119119131633757222216684973826261434101069733⟩, + ⟨129715060524093614249399342579035749791697928496543868512958,129715060524093614731137260396505887325277289769709490558266⟩, + ⟨-356109574422801299625129360233805423924992390223341588125295,-356109574422801299446874044405512718749557511563788612111197⟩, + ⟨-330539999300338338961689336956978537316341235885298513037209,-330539999300338338451097681619340813925533492923154797549742⟩, + ⟨-135917528360277451462836459502093245601327258987511808244395,-135917528360277451243694298418949933166301905994109685725960⟩, + ⟨-14353802047098570206451243283557469285638172691957208631351,-14353802047098569821194464289688383942444018733567684833007⟩, + ⟨12829778218698191367722222996490160602247761779619500708949,12829778218698191585037885570525863874906774508618905149112⟩] +lemma ex0b18_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 18 r = ex0b18 r := by + revert r + decide +kernel +def ex0b19 : Fin 8 → RI := ![⟨0,45⟩, + ⟨69811325417109179890618784464009924773431175759666710696034,69811325417109179918355269390380782170860351485903574154484⟩, + ⟨114831964448519013873254021664171221958583928126200901337322,114831964448519014454185749749920854154630544554761503568054⟩, + ⟨-350844291452778800219161307760913602683003158794854564762863,-350844291452778800004201752297105562254668278164871855751583⟩, + ⟨-320157493883847688525599716003193189449294329474351421887954,-320157493883847687909873027880826478545679657467828454867544⟩, + ⟨-130288396968108404460452124314159805899738259157333146199789,-130288396968108404196186784956946187283994960297328312515804⟩, + ⟨-13989787654533642534693430727130359748473490437993552183792,-13989787654533642070109103645277242838322200765871717992666⟩, + ⟨12961494121839313439697002789883379217565409706384071583872,12961494121839313701759752534591487168680915874980707544681⟩] +lemma ex0b19_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 19 r = ex0b19 r := by + revert r + decide +kernel +def ex0b20 : Fin 8 → RI := ![⟨0,54⟩, + ⟨62075602831881453319180913925997992093002334834710408417692,62075602831881453352831145167878983033512215899645584403192⟩, + ⟨98972411968388786870327586306518933008774961045312459294508,98972411968388787575120822998908212319452521378671448322309⟩, + ⟨-343472411223551349549302534238316410848324918446965619693548,-343472411223551349288511061629791864328965498743182140737424⟩, + ⟨-307971625264596102285733449493328822791929235771691408956020,-307971625264596101538726556155815255661767137357188149422037⟩, + ⟨-124115031675147032160216134809814018049077925676756607836423,-124115031675147031839606302595891403557053903990825694227249⟩, + ⟨-13473495302721035935735422547261647752512594697996758728480,-13473495302721035372096227487816101358979088179515154565323⟩, + ⟨12853335037442787223281819351938613459452270534733085510594,12853335037442787541219443826583436454976809983669707215796⟩] +lemma ex0b20_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 20 r = ex0b20 r := by + revert r + decide +kernel +def ex0b21 : Fin 8 → RI := ![⟨0,76⟩, + ⟨54959213471629847478268341338007132775744140981330116573772,54959213471629847519377687089466967713484282820982814711693⟩, + ⟨82383781112280823701984843452357564093299020164366579141793,82383781112280824563006826987868234117658305712798718224545⟩, + ⟨-334203448701154050893000277983167510944693341937787209265918,-334203448701154050574400184589723865445293517095395450346713⟩, + ⟨-294264262218131884898614683690136129969747493481692270541237,-294264262218131883986021708148864242208252167563192953614189⟩, + ⟨-117518505778610708772487899991735600778508892063768416096622,-117518505778610708380809746315859485866870308490091076368015⟩, + ⟨-12828735147608524281739714478392655781772601125689865101823,-12828735147608523593160834224945540764191041195666941264043⟩, + ⟨12531500881144552647140784089047495642710440947949237033744,12531500881144553035554392243304884639466189511227244900927⟩] +lemma ex0b21_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 21 r = ex0b21 r := by + revert r + decide +kernel +def ex0b22 : Fin 8 → RI := ![⟨0,149⟩, + ⟨48424218805761664786086181433324814648639098668139311127255,48424218805761664836704442844018715574916170679863672133143⟩, + ⟨65300286957891976699274345765988885681404877714047867789500,65300286957891977759457499888448692218177199224175613736484⟩, + ⟨-323250684482633636315000533639678842823042913087242849481994,-323250684482633635922705727729425288715566414818031835998313⟩, + ⟨-279309568758480948457671841680501639489739341370930272748409,-279309568758480947333988918668504043889155837697066567972457⟩, + ⟨-110609317448830947146916802841912482250881355079420766032160,-110609317448830946664640405373709857563425320663324373920662⟩, + ⟨-12080758959155603178355373044892032920925804204442266018706,-12080758959155602330502771027713582103309137214017467196502⟩, + ⟨12026965366636476906799215853794203747226990932563125534121,12026965366636477385055952699482318368125249040084224358328⟩] +lemma ex0b22_calc (r : Fin 8) : bernsteinRowsBox 22 ex0r 22 r = ex0b22 r := by + revert r + decide +kernel +def ex0b : Fin 23 → Fin 8 → RI := ![ex0b0,ex0b1,ex0b2,ex0b3,ex0b4,ex0b5,ex0b6,ex0b7,ex0b8,ex0b9,ex0b10,ex0b11,ex0b12,ex0b13,ex0b14,ex0b15,ex0b16,ex0b17,ex0b18,ex0b19,ex0b20,ex0b21,ex0b22] +lemma ex0b_mem (l : Fin 23) (r : Fin 8) : (ex0b l r).Mem (bernsteinRows 22 (exceptionalRow 0) l r) := by + have he : bernsteinRowsBox 22 ex0r l r = ex0b l r := by + fin_cases l + · exact ex0b0_calc r + · exact ex0b1_calc r + · exact ex0b2_calc r + · exact ex0b3_calc r + · exact ex0b4_calc r + · exact ex0b5_calc r + · exact ex0b6_calc r + · exact ex0b7_calc r + · exact ex0b8_calc r + · exact ex0b9_calc r + · exact ex0b10_calc r + · exact ex0b11_calc r + · exact ex0b12_calc r + · exact ex0b13_calc r + · exact ex0b14_calc r + · exact ex0b15_calc r + · exact ex0b16_calc r + · exact ex0b17_calc r + · exact ex0b18_calc r + · exact ex0b19_calc r + · exact ex0b20_calc r + · exact ex0b21_calc r + · exact ex0b22_calc r + rw [←he] + exact bernsteinRowsBox_mem 22 ex0r_mem l r +lemma ex0b_lower (d : Fin 23) : (46/1000:ℝ) < rowLower (bernsteinRows 22 (exceptionalRow 0) d) := by + have hc : ∀ d : Fin 23, (46:ℤ)*scale < 1000*(rowLowerBox (ex0b d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (ex0b_mem d)).1 + have hnum : (46:ℝ)*(scale:ℝ) < 1000*((rowLowerBox (ex0b d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma exceptional_sign_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (46/1000:ℝ) < exceptionalValue 0 e τ := by + rw [←exceptionalRow_eval 0 e (polytope_one e he)] + exact polytope_polynomial_lower 22 (exceptionalRow 0) _ ex0b_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign1.lean b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign1.lean new file mode 100644 index 0000000000000000000000000000000000000000..61e207a8199d42d7cb9e503f69603952785a6fd7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign1.lean @@ -0,0 +1,586 @@ +import OAI.Analysis.Triangular.Signs.ExceptionalInterval + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def ex1r0 : Fin 8 → RI := ![⟨0,2⟩, + ⟨126949588380381178009368132929977588344957258194568530624992,126949588380381178009368132929977588344960927529677322945070⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩, + ⟨0,2⟩] +lemma ex1r0_calc (r : Fin 8) : exceptionalRowBox 1 0 r = ex1r0 r := by + revert r + decide +kernel +def ex1r1 : Fin 8 → RI := ![⟨0,4⟩, + ⟨140216299912204911385598162506097386096199409832081730165665,140216299912204911389274569682956937106061193619856360824956⟩, + ⟨251892118659138408464719461447673728461094633577890281662207,251892118659138408541720623640340037851953111206139277104684⟩, + ⟨-363260046536091946513133249939467083802289734864573547654162,-363260046536091946484640856091248176746556475119108950654313⟩, + ⟨-404930062701338407150892446508348198858168090486333485692796,-404930062701338407069279292522175883794417760960432137966126⟩, + ⟨-208664195776712900753901165146132247237804246920341839973041,-208664195776712900718873403232722310352943657753433335972561⟩, + ⟨-9823996930277329422986353699465188103398961775225366153239,-9823996930277329361406771468552943012320515351823777816098⟩, + ⟨-8640302115159788333132225534173630437101061382618330012982,-8640302115159788298396411803181162931337460972462879637916⟩] +lemma ex1r1_calc (r : Fin 8) : exceptionalRowBox 1 1 r = ex1r1 r := by + revert r + decide +kernel +def ex1r2 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-331826052511898007535170254596443947251017381269708995903410,-331826052511898007522739282083009301956116121061459150899663⟩, + ⟨658744726834589341888141000200548489470875594143793126570280,658744726834589342121736176112333858948004928590563587371795⟩, + ⟨-902681206662443104129014611576439524134668737754750617657544,-902681206662443104042578438879385756724992928423282047116954⟩, + ⟨-993690836748914154590135462873454542682981079910992830582956,-993690836748914154342549082107783525234684968510602048096497⟩, + ⟨-444927879872834327304722313175953216354436953751444100384721,-444927879872834327198460070205546895380707608062856491723631⟩, + ⟨-23092464332734786322678430444211038081163863624400404815438,-23092464332734786135867050795070423387897038935220788079700⟩, + ⟨-607059296990935861747679683994982111451806273713046836345,-607059296990935756371107591906012114706333796911703608507⟩] +lemma ex1r2_calc (r : Fin 8) : exceptionalRowBox 1 2 r = ex1r2 r := by + revert r + decide +kernel +def ex1r3 : Fin 8 → RI := ![⟨0,6⟩, + ⟨56122920917543290291614821207492885469873817584107881203042,56122920917543290305079806798423226035164869937825075582278⟩, + ⟨-532038661517219809165871673924464026671756860621170328634603,-532038661517219808913711057059734273332259810386420053884082⟩, + ⟨325019618511362090676258065858374093284384062113612908230490,325019618511362090769563925201255255560030530762251011904816⟩, + ⟨553009824486187460634224664558827835287316972110036827773221,553009824486187460901488465092083390461790184657650808521024⟩, + ⟨387974138060210974818927710029031545332651390511151654177375,387974138060210974933635355988098289678431144015453871846207⟩, + ⟨-21229575586935171511979516561412246241004138206834084670696,-21229575586935171310320931163849184953205731483913224041715⟩, + ⟨92474289561306017016786035002042833390160313423932956397358,92474289561306017130537619633290035723109702401025912575116⟩] +lemma ex1r3_calc (r : Fin 8) : exceptionalRowBox 1 3 r = ex1r3 r := by + revert r + decide +kernel +def ex1r4 : Fin 8 → RI := ![⟨0,6⟩, + ⟨131488172846351856979852493216233179075444300890508965062089,131488172846351856993375548413852379737269589577460699997044⟩, + ⟨-1407225312471942487139655928728864778786904823865056853318379,-1407225312471942486886802639685294795369771956183693374522982⟩, + ⟨1268615963160922236864987081694438299593444157585751060431830,1268615963160922236958549247407125580653718775395009409242773⟩, + ⟨1618545986450040220884971879338873250925895508382125878958596,1618545986450040221152969839711967248582357289870629156247449⟩, + ⟨746510923456015996293076380674070393593038919873356672835849,746510923456015996408099122600811679975067790316484648339727⟩, + ⟨-10367363708425244827991157288610844125633573402339433280608,-10367363708425244625778626175311033830359245793762875901603⟩, + ⟨75540003924849414464744657879854081344873017695257606660971,75540003924849414578808712235132354782162293498930570564249⟩] +lemma ex1r4_calc (r : Fin 8) : exceptionalRowBox 1 4 r = ex1r4 r := by + revert r + decide +kernel +def ex1r5 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-56648251571345958791064016933418252997128025705306058471777,-56648251571345958778463369899817715154994209872783311862698⟩, + ⟨1246375611591518846146463689425442828987592029912643081965526,1246375611591518846380760950556513386788565230043435290855152⟩, + ⟨-791806544093311393374671253049431393265021869478519684560548,-791806544093311393287975290920214615116872366084100443713529⟩, + ⟨-1265555431058036363276181155271407029582218654919168466961799,-1265555431058036363027850637836540917529750821802338198757194⟩, + ⟨-748680228773066822717574475376347209290936499495236627465980,-748680228773066822610992854462692892470505188033432716096237⟩, + ⟨83848403648486267616469421655197498274990419467898703652999,83848403648486267803842274851675236566396935556223649547421⟩, + ⟨-214504397344580871036419735206994058880741348444498852095271,-214504397344580870930726447093725119557827654920003797657382⟩] +lemma ex1r5_calc (r : Fin 8) : exceptionalRowBox 1 5 r = ex1r5 r := by + revert r + decide +kernel +def ex1r6 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-49434811661601206114974150971581942359638248647695338098323,-49434811661601206104750348972810122390947236008386240590058⟩, + ⟨765227813823011437691013352945897889761588056254903595480422,765227813823011437880514361826058612979972188641292210063790⟩, + ⟨-639379113712096599937335111337578273957315035575905441769102,-639379113712096599867214905025455724172936388737248301175509⟩, + ⟨-846939497451477436638643718607476680180814563116493280122105,-846939497451477436437792529131083795738257003435780049521065⟩, + ⟨-436462383886084939793989924050709997576094544196401669042521,-436462383886084939707786079443740604175432232403632709899062⟩, + ⟨44037161843263607318854975475614551868058515491189015214519,44037161843263607470403246023605213053815598066984973334264⟩, + ⟨-113840212498818249502699927689963758788636102058818895788215,-113840212498818249417214571895411827972811934058446310813723⟩] +lemma ex1r6_calc (r : Fin 8) : exceptionalRowBox 1 6 r = ex1r6 r := by + revert r + decide +kernel +def ex1r7 : Fin 8 → RI := ![⟨0,6⟩, + ⟨69696087193165141134844264039228751520299115048949273321885,69696087193165141142540647772583722229947126657265998194345⟩, + ⟨-1392028036048907550097333324846171262716236236857361744994604,-1392028036048907549954759915663639795188780565749588297153042⟩, + ⟨936854353467076269712819083604341038902269449683220456722806,936854353467076269765574881187715983609109107497352479884866⟩, + ⟨1425529682193456079131033102306521407762684173154544298155704,1425529682193456079282145959125019926175527951360974302638762⟩, + ⟨852030645419506983821587871599767391039665699794187530062749,852030645419506983886444391797558435289255376389268066640612⟩, + ⟨-145500215381834162615332835040815605973429971272351521220099,-145500215381834162501313634215268553718835944542704047827989⟩, + ⟨320018952081500781128360877776686754307674822318781614615095,320018952081500781192676834102669592845580730555017444042671⟩] +lemma ex1r7_calc (r : Fin 8) : exceptionalRowBox 1 7 r = ex1r7 r := by + revert r + decide +kernel +def ex1r8 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-22995415875174061240907898244119603842549238781553295786825,-22995415875174061235429850802797437291460121916070587001532⟩, + ⟨251116703293692856282837192606470378505818009637278766254880,251116703293692856383736484926426519160756308442211862261315⟩, + ⟨-177628868188887226304210106961568370817821950453447957829037,-177628868188887226266874795472620758306274486907895915695828⟩, + ⟨-261659493151891504452221761560310834084701403519960744534417,-261659493151891504345279096719671426297954032758928158983420⟩, + ⟨-145523224488056322437094013501351407108691400707069386513654,-145523224488056322391195012925383410069692434449419212237609⟩, + ⟨24949639894071159958380909222650077431340051631461701666560,24949639894071160039072370135945966495298945354953165199503⟩, + ⟨-48125301902407747352707198000454994624901742588269242051075,-48125301902407747307190754819399105241286950268582214424554⟩] +lemma ex1r8_calc (r : Fin 8) : exceptionalRowBox 1 8 r = ex1r8 r := by + revert r + decide +kernel +def ex1r9 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-18833566850646925321294771662838357981986524751917350680329,-18833566850646925317972118649832262363625350789226233669648⟩, + ⟨637969433846118447594194332687752118342122986609910413387564,637969433846118447655251983752428508020776442493554630547851⟩, + ⟨-368637736113261130084146635792862036597958937828081679424396,-368637736113261130061553747687810958615900703926545177284925⟩, + ⟨-618678417179151724092900901027776561075502659614977205614248,-618678417179151724028186196260029393933481595514057767320621⟩, + ⟨-419186405389337246008566074621239760035217697099297366109116,-419186405389337245980791002101681058566787560147012477678761⟩, + ⟨100644774180467570241256130759072989923214323063302209667628,100644774180467570290085324216228249103654725151994697671149⟩, + ⟨-209473659411531676186031630855700042808899662719229714531423,-209473659411531676158488057045065476127536892736513071571169⟩] +lemma ex1r9_calc (r : Fin 8) : exceptionalRowBox 1 9 r = ex1r9 r := by + revert r + decide +kernel +def ex1r10 : Fin 8 → RI := ![⟨0,6⟩, + ⟨19554148140643356542430385431199480218546425404303098823791,19554148140643356544313871298303293693247599766339506184893⟩, + ⟨-485976169671472057387833750284323487281243394657351414298136,-485976169671472057353239881590356744463809058681518103722064⟩, + ⟨280962904072589516928317094562880061237301360876195570692166,280962904072589516941117708259772750166595306669563959342034⟩, + ⟨470413382916224491431932638317879170769763896572213971114140,470413382916224491468598510002533561254767513443288365800757⟩, + ⟨317527183409610832498797325622642092194788271907755288171544,317527183409610832514534046491309857091294758542781127505473⟩, + ⟨-82316243887734601964072661723091356197464340866464684063787,-82316243887734601936407157442408900530831870542445911531593⟩, + ⟨163859873844839128470457436705497148707493149539835359161390,163859873844839128486062995700196433469153289402923758116071⟩] +lemma ex1r10_calc (r : Fin 8) : exceptionalRowBox 1 10 r = ex1r10 r := by + revert r + decide +kernel +def ex1r11 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-2145290730673451183111254324078451889637753402998656223319,-2145290730673451182087516625864731129756884069077041516588⟩, + ⟨30948307441098315631682078309177672571646856574150293990318,30948307441098315650411157836738460776071704229601588431085⟩, + ⟨-15657489443950859565859478912897837527409501871908346159973,-15657489443950859558929241822316837964353048805136422198986⟩, + ⟨-27964113899364409230248652218444201742851277361111161544620,-27964113899364409210397792726429038532041960839288364778563⟩, + ⟨-20501668377473401184818870526311954621166447253245028525023,-20501668377473401176299028491341387117402700703818081476064⟩, + ⟨10653953152928342767519444353185037369482396210128407321827,10653953152928342782497515595481910626763927044658670417403⟩, + ⟨-16518595190697319868520767351482862218652611757676998781119,-16518595190697319860071936199657727585009748322629337775517⟩] +lemma ex1r11_calc (r : Fin 8) : exceptionalRowBox 1 11 r = ex1r11 r := by + revert r + decide +kernel +def ex1r12 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-6168192815425962398575852383542368589677807111564725842583,-6168192815425962398087937527633492966526468352833405082616⟩, + ⟨159613458802633245203493868260872527322971837450978998073361,159613458802633245212405925359811387656718103204672065357328⟩, + ⟨-94026663441898249473561050759442307055901382884980431024169,-94026663441898249470263362340241816619376357006466655330918⟩, + ⟨-156017937947759796499441829395305241235150173180677391973569,-156017937947759796489995983805536350715056547174372159309374⟩, + ⟨-103958629132945148603349283080198926506477736589658783052234,-103958629132945148599295196034558097934524369886593046186303⟩, + ⟨23084957769212005371625897274699521063107431854440733570699,23084957769212005378753072208582995534889527779906306617713⟩, + ⟨-49238585323314699131192758744030857612627881776854184871236,-49238585323314699127172461562124279734265460816492182603295⟩] +lemma ex1r12_calc (r : Fin 8) : exceptionalRowBox 1 12 r = ex1r12 r := by + revert r + decide +kernel +def ex1r13 : Fin 8 → RI := ![⟨0,6⟩, + ⟨3992647537006749338565984662687958286314090925098813123468,3992647537006749338783962211554779759755380657971665638572⟩, + ⟨-129385571153035636303041742097300102500187583218300516446165,-129385571153035636299066982687704576531642716374230979656685⟩, + ⟨75493095460099490600478252565044584472862905190021360756045,75493095460099490601949014918628794342396616465182992336394⟩, + ⟨125821685383058115896007773941784742370973250023754445079635,125821685383058115900220601936792773441120580456053568238634⟩, + ⟨84355685143487984505361805386801003457717059021441146734189,84355685143487984507169919995254095870629981366819808676425⟩, + ⟨-20497562731831465275179845851790141679583840341346202451527,-20497562731831465272001140271493331007673380192785401225385⟩, + ⟨41904242029775353162028853072091231146252350546097516593806,41904242029775353163821897469782014791342429705351033533439⟩] +lemma ex1r13_calc (r : Fin 8) : exceptionalRowBox 1 13 r = ex1r13 r := by + revert r + decide +kernel +def ex1r14 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-567016893326876698565825561583192148087953164079291208417,-567016893326876698474456126407985919558436523022358546902⟩, + ⟨59791114097610230523801015070086194393464345410936672916917,59791114097610230525466067972071503930442404848615307555347⟩, + ⟨-34712863452351916977559088799341516436508456238647650724920,-34712863452351916976942976760194831329706528147748363012694⟩, + ⟨-57988087177958682011520540324233101116979566819466009600877,-57988087177958682009755758923447154204111058763444649614062⟩, + ⟨-38994004727670723529099912955452269617627249054467152035429,-38994004727670723528342481834299116718248114382951166787355⟩, + ⟨9900842412314233568796373173688594399832319252701416016740,9900842412314233570127953882261217255564319204315672463555⟩, + ⟨-19833708333868631601931762278005904212174929387624131247099,-19833708333868631601180644167421402420271457957290199356322⟩] +lemma ex1r14_calc (r : Fin 8) : exceptionalRowBox 1 14 r = ex1r14 r := by + revert r + decide +kernel +def ex1r15 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-200114964495582256273914347760497337105080440084892471508,-200114964495582256236774865826655815396386373794012841810⟩, + ⟨-20251983952146246938813271613622204774778146169599724689542,-20251983952146246938137260273421043217853735995622151187027⟩, + ⟨11695645587696126076952309047980953135574622956453268065244,11695645587696126077202450484808982638673445526262638348096⟩, + ⟨19585596002926547937812309809742856323476126855687679761453,19585596002926547938528810912191270516622726104978012886234⟩, + ⟨13198658534072516463196201638558197316494553564038308011519,13198658534072516463503718610967875385474542211555786855107⟩, + ⟨-3480152286855869255613881781131426142134394354990970555180,-3480152286855869255073260123816233168010248882777097244972⟩, + ⟨6850683905538779664225019517664267520727617367290516383504,6850683905538779664529973408306504436268785467176356843034⟩] +lemma ex1r15_calc (r : Fin 8) : exceptionalRowBox 1 15 r = ex1r15 r := by + revert r + decide +kernel +def ex1r16 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-314462259989607967445140541105329869089198327987501807061,-314462259989607967430781170533325453597602389294176345514⟩, + ⟨5906140137521575544469929525732311758771112618122644392214,5906140137521575544731073063206932825469358349221125883049⟩, + ⟨-3378356710101409922618373860618436088618832274645036057768,-3378356710101409922521744091563402159322672959945306237196⟩, + ⟨-5682975614637556188380517696414806720533233838229972695192,-5682975614637556188103732942416199989982190659520495696460⟩, + ⟨-3833803957241018241350391661174251926979877568683376783700,-3833803957241018241231597692444942921124339625324890433504⟩, + ⟨1053997520175414228217596652514873291714809173204706720402,1053997520175414228426439084040842549731629832038665397431⟩, + ⟨-2034886897600325925406389136262467013767010705489064045549,-2034886897600325925288585287372503203948252229845258165348⟩] +lemma ex1r16_calc (r : Fin 8) : exceptionalRowBox 1 16 r = ex1r16 r := by + revert r + decide +kernel +def ex1r17 : Fin 8 → RI := ![⟨0,6⟩, + ⟨519628899435652671182297690300009083770474451190530197469,519628899435652671187585736800892730125672582815880586283⟩, + ⟨-1811658889975953208916948158092093988796649654166172036451,-1811658889975953208820995717211569010926528349280239875742⟩, + ⟨1018907277768804197858286754945610812962791978282705907114,1018907277768804197893791605236806549112141798763484967821⟩, + ⟨1727944171423903349170789189767628526269360104735137412489,1727944171423903349272488711040534429850753160975467284657⟩, + ⟨1164086746222128180330882791750358488486956121579304346596,1164086746222128180374531473895393321802521987587154618285⟩, + ⟨-333548645291401768226272518995394612263784904103492522788,-333548645291401768149537167785365296140779365573627882813⟩, + ⟨631762418480648085266823614295561236538946420463592411991,631762418480648085310108494922602893787845729918970070512⟩] +lemma ex1r17_calc (r : Fin 8) : exceptionalRowBox 1 17 r = ex1r17 r := by + revert r + decide +kernel +def ex1r18 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-288162019135418576322987005097210758335972104528825400692,-288162019135418576321253274629222219896245473815649583858⟩, + ⟨657768289656146272490542876661994354052953073916008289828,657768289656146272521896224476172585610891345748047491971⟩, + ⟨-363518261110666201383337982461469640274680304330889848707,-363518261110666201371736444136289346268076925715886279145⟩, + ⟨-621774694657377706505005038978358846377817458255225623315,-621774694657377706471773779473713662962845697960458609738⟩, + ⟨-417462475699335084483739496776132587091338913286546610550,-417462475699335084469476886045597489196905277466922072634⟩, + ⟨122395955004391118114851604645672877625934604279836233984,122395955004391118139925590612608256440095238232409660345⟩, + ⟨-229402703449769534855229784588798952157698483203345753540,-229402703449769534841086049370175082887772946403966567038⟩] +lemma ex1r18_calc (r : Fin 8) : exceptionalRowBox 1 18 r = ex1r18 r := by + revert r + decide +kernel +def ex1r19 : Fin 8 → RI := ![⟨0,6⟩, + ⟨41811986634069406204785853625143010748603976031829498192,41811986634069406205289478733003955500893215677080112157⟩, + ⟨-256023981869145904819045381011076193747806124296983993072,-256023981869145904809884027722801151589490161627674668905⟩, + ⟨140038694832237852118235843426630725035189293783924984471,140038694832237852121625777793906353649386802281974296777⟩, + ⟨240754252098821496664653418055466811299504176040954199521,240754252098821496674363491453074819067308568215170434920⟩, + ⟨161178226683450829581955377662745503578181774652596949858,161178226683450829586122869328706504976264492056994038217⟩, + ⟨-47474110427214155965618072968667151561125429786974789367,-47474110427214155958291530197228688086711975921295379515⟩, + ⟨88797076139109608853748182869039705926712435445388915563,88797076139109608857880939470394894109418397706892564115⟩] +lemma ex1r19_calc (r : Fin 8) : exceptionalRowBox 1 19 r = ex1r19 r := by + revert r + decide +kernel +def ex1r20 : Fin 8 → RI := ![⟨0,6⟩, + ⟨36574776927375797730765988768558146700278694532740428143,36574776927375797730951670040066360851991930784556196100⟩, + ⟨93538333590428865696256497731713605081093602209460979422,93538333590428865699621133518493426887577824801687422948⟩, + ⟨-50925397466326142954824419404363679066925229998501447051,-50925397466326142953579418351782650883461528614521096223⟩, + ⟨-87754620519882874711994437015804743004770473524296779287,-87754620519882874708428276054883845435531489153546516460⟩, + ⟨-58653997298030642669153845192854939131737842989047956275,-58653997298030642667623275291316087215504446285373818989⟩, + ⟨17252287815047098673963759163643920061242966566405012521,17252287815047098676654534994077871695268933515208148373⟩, + ⟨-32292161667808801879108914943255931982195830314145437010,-32292161667808801877591101982504119716414672603049684088⟩] +lemma ex1r20_calc (r : Fin 8) : exceptionalRowBox 1 20 r = ex1r20 r := by + revert r + decide +kernel +def ex1r21 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-14194487840545231484302673632119161483632132442385080557,-14194487840545231484245213352312617497879991486968097989⟩, + ⟨-30697278510860119788446521749175140161589352722646797690,-30697278510860119787406786858177424325430483687195974172⟩, + ⟨16682161023555370899930938513950490171693403394913390519,16682161023555370900315666940956911115280525225578522240⟩, + ⟨28773050043992579940485058653400977373868466188884623246,28773050043992579941587068562631620450478330904985768224⟩, + ⟨19218633147322442503933960959514898473446965122412514075,19218633147322442504406935459754605502843567852543114672⟩, + ⟨-5644883825158390855191338641229357065551359108463251447,-5644883825158390854359838980627690505344892504053075156⟩, + ⟨10573896360228768037885768375142676869793200597831345157,10573896360228768038354800743966337139842704692810620488⟩] +lemma ex1r21_calc (r : Fin 8) : exceptionalRowBox 1 21 r = ex1r21 r := by + revert r + decide +kernel +def ex1r22 : Fin 8 → RI := ![⟨0,2⟩, + ⟨-32996824530753464808227593656130898375864664965061311657,-32996824530753464808212863098470629988060815194553206258⟩, + ⟨10883040173460042234116393541451935377535615597864109429,10883040173460042234377584979844500984622232190557329381⟩, + ⟨-5917706646138368128695988930689199272806764318506701948,-5917706646138368128599341437072930238802613251305548479⟩, + ⟨-10203930988021550245739457543559762826153818446593627442,-10203930988021550245462622019613260120882764262408059959⟩, + ⟨-6818386692787811254179034565870354246251668656114741801,-6818386692787811254060218807055078478995553437724776770⟩, + ⟨2002525905641920967559531738264494907645025420295326483,2002525905641920967768412477245063114872381683441454311⟩, + ⟨-3752247592010364693050619874864475974676000653062721418,-3752247592010364692932794417503737006791958244977074487⟩] +lemma ex1r22_calc (r : Fin 8) : exceptionalRowBox 1 22 r = ex1r22 r := by + revert r + decide +kernel +def ex1r : Fin 23 → Fin 8 → RI := ![ex1r0,ex1r1,ex1r2,ex1r3,ex1r4,ex1r5,ex1r6,ex1r7,ex1r8,ex1r9,ex1r10,ex1r11,ex1r12,ex1r13,ex1r14,ex1r15,ex1r16,ex1r17,ex1r18,ex1r19,ex1r20,ex1r21,ex1r22] +lemma ex1r_mem (l : Fin 23) (r : Fin 8) : (ex1r l r).Mem (exceptionalRow 1 l r) := by + have he : exceptionalRowBox 1 l r = ex1r l r := by + fin_cases l + · exact ex1r0_calc r + · exact ex1r1_calc r + · exact ex1r2_calc r + · exact ex1r3_calc r + · exact ex1r4_calc r + · exact ex1r5_calc r + · exact ex1r6_calc r + · exact ex1r7_calc r + · exact ex1r8_calc r + · exact ex1r9_calc r + · exact ex1r10_calc r + · exact ex1r11_calc r + · exact ex1r12_calc r + · exact ex1r13_calc r + · exact ex1r14_calc r + · exact ex1r15_calc r + · exact ex1r16_calc r + · exact ex1r17_calc r + · exact ex1r18_calc r + · exact ex1r19_calc r + · exact ex1r20_calc r + · exact ex1r21_calc r + · exact ex1r22_calc r + rw [←he] + exact exceptionalRowBox_mem 1 l r +def ex1b0 : Fin 8 → RI := ![⟨0,25⟩, + ⟨126949588380381178009368132929977588344957258194568530624979,126949588380381178009368132929977588344960927529677322945093⟩, + ⟨-11,26⟩, + ⟨-13,26⟩, + ⟨-14,27⟩, + ⟨-13,25⟩, + ⟨-11,25⟩, + ⟨-13,25⟩] +lemma ex1b0_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 0 r = ex1b0 r := by + revert r + decide +kernel +def ex1b1 : Fin 8 → RI := ![⟨0,25⟩, + ⟨133323056558208673981440776680254742258420867732390427450690,133323056558208673981607886097384721849781890876034430255318⟩, + ⟨11449641757233564021123611883985169475504301526267740075543,11449641757233564024623664710924547175088777782097239868420⟩, + ⟨-16511820297095088477869693179066685627376806130207888529747,-16511820297095088476574584367784008033934385232686770484261⟩, + ⟨-18405911940969927597767838477652190857189458658469703895141,-18405911940969927594058149660098903808837170952746915362070⟩, + ⟨-9484736171668768216086416597551465783536556678197356362424,-9484736171668768214494245601487377743315620806974242544183⟩, + ⟨-446545315012605882863016077248417641063589171601153006976,-446545315012605880063944157661497409650932515991989900707⟩, + ⟨-392741005234535833324192069735165019868230062846287727875,-392741005234535831745291445599143769606248226021039983517⟩] +lemma ex1b1_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 1 r = ex1b1 r := by + revert r + decide +kernel +def ex1b2 : Fin 8 → RI := ![⟨0,25⟩, + ⟨138260048318235745678469393354356814149152800295018778839592,138260048318235745678857425922441165735745208676670935180695⟩, + ⟨25750992288642839478992422903037648429237501728482636543177,25750992288642839487003763084673050449519568242075707387775⟩, + ⟨-36931351445542744506081440953702373523734862207406039473584,-36931351445542744503117040765348906789621986605734069311046⟩, + ⟨-41113515815917838548739726578133189258461086494043272857727,-41113515815917838540248546428889511190118865578699900196447⟩, + ⟨-20895567061401754299292843208851646789386693242764600605288,-20895567061401754295648491506894871916850755068766045658623⟩, + ⟨-993058008088998719503860857718528087673342254996247160328,-993058008088998713097009747336286695439947451616970226027⟩, + ⟨-788109972793707752629975826414031260998156256747610290527,-788109972793707749015998941379698847068368026920485610386⟩] +lemma ex1b2_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 2 r = ex1b2 r := by + revert r + decide +kernel +def ex1b3 : Fin 8 → RI := ![⟨0,25⟩, + ⟨141797007115603654977266719849171786410315311608157550948306,141797007115603654977938232799171870149626962015962048809266⟩, + ⟨42558571943891969354667555346816875804919239008838734644037,42558571943891969368365158071206721334115579295268896029595⟩, + ⟨-61047541745010914779001309514908119472655737022429769124880,-61047541745010914773932847163343231815400446631633941277793⟩, + ⟨-67763714336216338397958375558222977128952989368986916739868,-67763714336216338383440353640727612150038726615094246185880⟩, + ⟨-33980561410718301772464131970245327728373363336226958927192,-33980561410718301766233104368178262851983044899651088647290⟩, + ⟨-1653323517921993556358884676839819811414326872397512385178,-1653323517921993545404599971078815380063931645500858653884⟩, + ⟨-1126058662702641720893464234320986493915648508052063170828,-1126058662702641714714370786281087287111612842697670703585⟩] +lemma ex1b3_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 3 r = ex1b3 r := by + revert r + decide +kernel +def ex1b4 : Fin 8 → RI := ![⟨0,25⟩, + ⟨143988351548699918280548412062710844877186234198726090516516,143988351548699918281576554797393152617524799933112436870219⟩, + ⟨61334525773605870041767936572825234527296232449794596795849,61334525773605870062525084098315165762752681610778762235372⟩, + ⟨-88475912842650673504752714734929758710954978291939991718150,-88475912842650673497072040760384469366284958229522995856028⟩, + ⟨-97776146236963249338329111592085149073102535550436001117656,-97776146236963249316328712779017258178237784729463176775797⟩, + ⟨-48385735886844382183558863469112963797499556292172766662356,-48385735886844382174116455058400533657947266003745586063898⟩, + ⟨-2442544557805693921727457850532363764271560553522624872294,-2442544557805693905127494466510900915656594799672684670277⟩, + ⟨-1336212108544242318388822936089037206666074621755006703768,-1336212108544242309025114785430682975659846872955629623293⟩] +lemma ex1b4_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 4 r = ex1b4 r := by + revert r + decide +kernel +def ex1b5 : Fin 8 → RI := ![⟨0,25⟩, + ⟨144904324214190912806946295292189436841399232273506299391971,144904324214190912808417136554263551780896710812379019790401⟩, + ⟨81395953050582030497611275071169403474079229943104693307656,81395953050582030527043020275480457662147081020910047406823⟩, + ⟨-118688627574825291722197308901253859122016396165276660595789,-118688627574825291711306812548674618590309757562050490294690⟩, + ⟨-130397244127329374939232170946905683811935875671468912578144,-130397244127329374908037608617770591400896649254877550151356⟩, + ⟨-63683485257724863155422171779010665004748590918935978975077,-63683485257724863142033696406009332547819625737892041213654⟩, + ⟨-3374157079649751479921873104702704716889485543088141470763,-3374157079649751456384636491645468997885591187791360145341⟩, + ⟨-1346014147851255508353813646609089156909718423385771432738,-1346014147851255495076928076493539172918928826233519375073⟩] +lemma ex1b5_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 5 r = ex1b5 r := by + revert r + decide +kernel +def ex1b6 : Fin 8 → RI := ![⟨0,26⟩, + ⟨144628178012476505836724843638434685304145636506805024965071,144628178012476505838740314196566955533543450411734682696267⟩, + ⟨101972492749264584878033363541410030489652322904516225440077,101972492749264584918051430395240657103860298533685045558552⟩, + ⟨-151053127081133841036850065715133147554103995599948719171248,-151053127081133841022042360358768521405810511037991487285577⟩, + ⟨-164759643439206178796792596966777027786872424087153870989825,-164759643439206178754377644265317849759396142185789421864339⟩, + ⟨-79406862249850917026873675306452263106801408928705033552740,-79406862249850917008669491394575463947745938678899517402777⟩, + ⟨-4456056030364348433365744178657493278054982957806489908518,-4456056030364348401362385159419811598958493499085167733747⟩, + ⟨-1090398694828740557219591764403878370437910593080159759967,-1090398694828740539167135456844967460745847641971940091176⟩] +lemma ex1b6_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 6 r = ex1b6 r := by + revert r + decide +kernel +def ex1b7 : Fin 8 → RI := ![⟨0,26⟩, + ⟨143253108572808621991662369584318047900364317006640115648014,143253108572808621994344002589861391915162675286461879236410⟩, + ⟨122266002702567528275748633896331991596392908391768721545737,122266002702567528328631130638823672983431928087723988856717⟩, + ⟨-184873843861421545654436036001144339058666906903011222981569,-184873843861421545634868163491659494055108186656116994074267⟩, + ⟨-199944583753341191065377521248832167017108269374811379532593,-199944583753341191009327622430418480408430795127043491793750⟩, + ⟨-95084711130994818965259791126228574635424693032581835189445,-95084711130994818941203589212879607244634096388916048733782⟩, + ⟨-5687084054144504289599663929406436696105055795954769083175,-5687084054144504247308327487126323654203856480686575130489⟩, + ⟨-521110295654151240859817534844914259611680084099282041871,-521110295654151217004118423581033592985208008953945085744⟩] +lemma ex1b7_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 7 r = ex1b7 r := by + revert r + decide +kernel +def ex1b8 : Fin 8 → RI := ![⟨0,26⟩, + ⟨140879269554954043794361917102114647877055154429434615322222,140879269554954043797855630529040722330671046706780380102312⟩, + ⟨141504955459269085104109706748874157813556055623318083512554,141504955459269085172590179071309803096838069890901007367985⟩, + ⟨-219432052935940244250759045492588086748618163382046358630991,-219432052935940244225419524207886252745668116401114310523815⟩, + ⟨-235039762056199530340552813046074493831570257008103768190322,-235039762056199530267970696445261775690971834392678873759360⟩, + ⟨-110273114147114812352414866669460788390892099216597251126518,-110273114147114812321263159189991866985501256805345047536321⟩, + ⟨-7054558270478102239449071957671026769130897474452045783359,-7054558270478102184683679377587257109960201846138159705082⟩, + ⟨386051993657640286705553094898991578123532230365198586916,386051993657640317597618397300425399290680690355618478705⟩] +lemma ex1b8_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 8 r = ex1b8 r := by + revert r + decide +kernel +def ex1b9 : Fin 8 → RI := ![⟨0,26⟩, + ⟨137611097809415897834091280773770001856571317360294625185191,137611097809415897838573532424920744362594262315678064477792⟩, + ⟨158988241726195475079740131610447431985274601914858030416714,158988241726195475167122072969337247884024004756927776196339⟩, + ⟨-254020219857839354156500295303208325164788465333496644049000,-254020219857839354124166748412121197562207723857787991576642⟩, + ⟨-269187159529552373435094687633660108852106624749381038062253,-269187159529552373342478996745223332757234983852704178896355⟩, + ⟨-124579907751115589439223431947796618234291981987427280185960,-124579907751115589399473462593385545875846566545790317586465⟩, + ⟨-8533329900408140318857257187781273061606868198850517007630,-8533329900408140248975929553181609832009276958021327389676⟩, + ⟨1627221746797341502176786735158211024398315994888721809629,1627221746797341541595449416145144157995175038699382297480⟩] +lemma ex1b9_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 9 r = ex1b9 r := by + revert r + decide +kernel +def ex1b10 : Fin 8 → RI := ![⟨0,27⟩, + ⟨133555057980198038120454848470121101370067643070028237513965,133555057980198038126140613506986169413503252151281160522654⟩, + ⟨174115671163710840770861256945488419962359276093340079257387,174115671163710840881166397472817912466725435383827686306490⟩, + ⟨-287968807523127160439741754855535928756645359681038687778536,-287968807523127160398926039639076045025967479999615212662340⟩, + ⟨-301617941831642945212825717856514125744205595497188108066206,-301617941831642945095913840647092631678067703708981941891179⟩, + ⟨-137680675053714664414964629842444714447296242121536256174809,-137680675053714664364786917063414834871236039954450230476575⟩, + ⟨-10086516119925051841023056253253656038527407676649782482542,-10086516119925051752809524428346226894245153228253991786583⟩, + ⟨3170098323401784552873604723854104953768977428143607881126,3170098323401784602633098033499656554547269717967208802091⟩] +lemma ex1b10_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 10 r = ex1b10 r := by + revert r + decide +kernel +def ex1b11 : Fin 8 → RI := ![⟨0,28⟩, + ⟨128817818311139633301620716207631613998177463708038211889133,128817818311139633308773903994801279061199575345318617552019⟩, + ⟨186404882548497602437305406267295521261646659945244894431592,186404882548497602575467176917417328438653733049509333579583⟩, + ⟨-320665001229144772015307287790019181165175632769185302411265,-320665001229144771964183908972926670495930020251816768155039⟩, + ⟨-331673939668212115869758778204627595485328035491047510149637,-331673939668212115723321795412715199089618314633476220755223⟩, + ⟨-149326160128833044267402751853057276298395489982285493275575,-149326160128833044204553082186223630869608709136087181984214⟩, + ⟨-11667725283842575927228178289411647661026492740983674997527,-11667725283842575816737065237095935773594284323506987452976⟩, + ⟨4956963963327423095279374200412450525912099172547768102935,4956963963327423157605206609105155489636817241683732869014⟩] +lemma ex1b11_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 11 r = ex1b11 r := by + revert r + decide +kernel +def ex1b12 : Fin 8 → RI := ![⟨0,28⟩, + ⟨123504805787351992794816222143396661173915508495204439377652,123504805787351992803763383918704712284204815809595118336512⟩, + ⟨195496203966364965020381776025678348356664170277891746436001,195496203966364965192499667267334300652072820699669936384354⟩, + ⟨-351563958553749447856447358165412593101599922689324252857972,-351563958553749447792759348712951828104395441519102990871483⟩, + ⟨-358817044861855792162966983552905057945885319806497632133809,-358817044861855791980540075159251615592382374996408495807791⟩, + ⟨-159342206571638372529342278255721419561462665921407431872505,-159342206571638372451045998775964444091498961751341554633135⟩, + ⟨-13224376978348598828065965192987438750382452921697742894474,-13224376978348598690419369538698188883253951471585037257172⟩, + ⟨6910338347581926396992315292190644494009012180118724691310,6910338347581926474636013643799535418742462065615374379520⟩] +lemma ex1b12_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 12 r = ex1b12 r := by + revert r + decide +kernel +def ex1b13 : Fin 8 → RI := ![⟨0,30⟩, + ⟨117719059833760457719945335533555588763477638431174196850170,117719059833760457731093847514956293595918523803816311435373⟩, + ⟨201148099215727659435364482125448677680038341904665619802273,201148099215727659649041145809375890048293400211535253763867⟩, + ⟨-380193903908810285085407591650219286327990655277465427882777,-380193903908810285006341776479731111827360356491849108551039⟩, + ⟨-382628969434971909654107126122123736737543942484902127939889,-382628969434971909427632278734336281103153644994653254600712⟩, + ⟨-167624005898503358498684470292376935561869587684654087268361,-167624005898503358401483141265397450410989300716233011769031⟩, + ⟨-14701613323811852088705630797580648033597488213456757730284,-14701613323811851917823538792074353445287972828119185618946⟩, + ⟨8940271407331769299297364808107123375750300596356008895392,8940271407331769395688543553077425703662251884598019653989⟩] +lemma ex1b13_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 13 r = ex1b13 r := by + revert r + decide +kernel +def ex1b14 : Fin 8 → RI := ![⟨0,30⟩, + ⟨111560300779287796654942072651953074886868452787351518379358,111560300779287796668804456449986454375970589670949996106393⟩, + ⟨203226250466860377346879738236355503859661860500893419467012,203226250466860377611671455957983743122769152427189085868961⟩, + ⟨-406156695271754270372688986031549712269224388864914656464477,-406156695271754270274709297229525942118356644278396931782168⟩, + ⟨-402804259706938170274923234666402285860877499920432351053508,-402804259706938169994271792311661462197288184407649238806509⟩, + ⟨-174126684401473963931894471545288766789440524496906625530635,-174126684401473963811440948760057088412619499949861515620076⟩, + ⟨-16046294119119796923116130039822396658664580220561786185348,-16046294119119796711356165755195231929111058016225508801988⟩, + ⟨10952231875566274962668162127003158603065088778254024523557,10952231875566275082117733049243358570027175546944879408662⟩] +lemma ex1b14_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 14 r = ex1b14 r := by + revert r + decide +kernel +def ex1b15 : Fin 8 → RI := ![⟨0,31⟩, + ⟨105124142051893631408866385549219268686855380298814763902049,105124142051893631426093118689855059707427686850410797785349⟩, + ⟨201689210610404850960957773989292430373978358501248083147877,201689210610404851288981608008941718547659506645221076159748⟩, + ⟨-429125479677163976694039901226222066833457593743348405696952,-429125479677163976572662716723080262215553133125017052721355⟩, + ⟨-419139379922561233326042780986238691649107022329142020536921,-419139379922561232978371928830125030456715327809989156090468⟩, + ⟨-178854158323848150184997135398709148526725223957423466866357,-178854158323848150035779377740382426045523488551724359842508⟩, + ⟨-17210638254905378464938608853094249090821462164172296389268,-17210638254905378202610481770887454995958371615791385181669⟩, + ⟨12854662598807259450989687168062259593213667764945446308447,12854662598807259598963749812973172318219095564682419942119⟩] +lemma ex1b15_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 15 r = ex1b15 r := by + revert r + decide +kernel +def ex1b16 : Fin 8 → RI := ![⟨0,33⟩, + ⟨98501395189318795478095919511445733194568663689835276629568,98501395189318795499520100495927891376232936035716596884144⟩, + ⟨196573094947147300822851099358662802562149891007855453082638,196573094947147301229610610354541290884481036166419114950428⟩, + ⟨-448840831095435855409985262542896898526900537785995360817929,-448840831095435855259473869485301040799265968838596598671896⟩, + ⟨-431520258234434963442188443125716720840781715822226452044199,-431520258234434963011066033277407935901335540176387751036868⟩, + ⟨-181847865998421188631775908685982310593525630912279324075387,-181847865998421188446741359846122588685582245895911279564553⟩, + ⟨-18155186543628828510281484418195719326200637510199409474826,-18155186543628828184986644145913374395576702632133083057394⟩, + ⟨14565482926860067640794392607314837244436842778490211542632,14565482926860067824286721881291923274049867702899983379274⟩] +lemma ex1b16_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 16 r = ex1b16 r := by + revert r + decide +kernel +def ex1b17 : Fin 8 → RI := ![⟨0,35⟩, + ⟨91777437332747351572440341321038085942195343803815670432752,91777437332747351599139073340699317179371850382836037203066⟩, + ⟨187977141933701872183442396121826040250317766906749731552736,187977141933701872688961315224394170660307992748735032088754⟩, + ⟨-465106429388040709939700398323178371335787899435422566730392,-465106429388040709752645505508203196439626367529411848474003⟩, + ⟨-439910088376057725584710629368766102995458022448883218788708,-439910088376057725048913607454473668104243564388216777555459⟩, + ⟨-183176553133513848192990599310657512210307107508471540877779,-183176553133513847963030481361915387590322410386229739598483⟩, + ⟨-18850889508168578445309046663223741129121912179404574792115,-18850889508168578041034059601851765673541601376321196537836⟩, + ⟨16017068309754015306141007154112352073014288562470849374630,16017068309754015534184461457858179822965036539742503774121⟩] +lemma ex1b17_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 17 r = ex1b17 r := by + revert r + decide +kernel +def ex1b18 : Fin 8 → RI := ![⟨0,39⟩, + ⟨85031630859579219054096603376167256636817430468563355553771,85031630859579219087476215562832861296331640039966652181824⟩, + ⟨176051295720492592402555111239854163269264417537187153736655,176051295720492593032949668596094136696645867708637426711901⟩, + ⟨-477784973949856240538521060579134691202743011419762733332939,-477784973949856240305258996784891060330759407798504905972221⟩, + ⟨-444338538847400373017886546741250258984744314737706759307936,-444338538847400372349734448573994256153092455980220395953140⟩, + ⟨-182927834103702654406332111580838841876919513313518168906629,-182927834103702654119566174076588552591995323097057978341857⟩, + ⟨-19280246702652650034123137738510097092844310984528021887742,-19280246702652649529982260137607214565344854761236090776401⟩, + ⟨17159483876092870905812365697166470278109365825594907145701,17159483876092871190188176377695716010335511991664129853450⟩] +lemma ex1b18_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 18 r = ex1b18 r := by + revert r + decide +kernel +def ex1b19 : Fin 8 → RI := ![⟨0,45⟩, + ⟨78336795601796812269404817707642055076341663510781545811129,78336795601796812311320488879751457996388708755730492580459⟩, + ⟨160986341827429919758029100828585994763475568520345264812190,160986341827429920547712801083461966431774973917698568916118⟩, + ⟨-486794685652867996814007524198022436742346351758451959421037,-486794685652867996521804415025028573141545639704179331416725⟩, + ⟨-444892928896972439899872600218838556082350499680983589276147,-444892928896972439062890721083961322451838693214205305720570⟩, + ⟨-181201838067604529849582045982090637024087073398234541555773,-181201838067604529490355615501897521196164594606083055418871⟩, + ⟨-19437528985980085814554105342568458572310351101479309878087,-19437528985980085183026074158821758577071874591740970957291⟩, + ⟨17961964525130455490903324506555198443114355128809472333396,17961964525130455847135686955122445242879957039868406971859⟩] +lemma ex1b19_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 19 r = ex1b19 r := by + revert r + decide +kernel +def ex1b20 : Fin 8 → RI := ![⟨0,54⟩, + ⟨71758741359049826272004368041230749628372287614050121766964,71758741359049826324930089646215554893453012999011381902234⟩, + ⟨143006640241188954318273120304508476472019885040389827149861,143006640241188955313086008186214990392338766911715816250234⟩, + ⟨-492106482010941334138880023464558672007120860737818865988307,-492106482010941333770773883260562751282765352082417079149117⟩, + ⟨-441711463737861725172116378740428867170032043088950947131777,-441711463737861724117719080156360754900480994365665534907153⟩, + ⟨-178106924423605915896764583666524025974350835473626566193278,-178106924423605915444225063615124352111431246344455466513959⟩, + ⟨-19328190878599204700448959867789263861869803934921515845077,-19328190878599203904874447842714928803785321349177474017212⟩, + ⟨18412795547705195441442360074059880304917704846570816820810,18412795547705195890210069387165968670127530124390314735775⟩] +lemma ex1b20_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 20 r = ex1b20 r := by + revert r + decide +kernel +def ex1b21 : Fin 8 → RI := ![⟨0,76⟩, + ⟨65356195798189053680277310045192786441789598383717753294079,65356195798189053747550708053484520200216820394786408934415⟩, + ⟨122364997470427530548046532182823509673268990659417816289384,122364997470427531809757833098977690524716720641487376640585⟩, + ⟨-493741633692993561107869247133558286522206671788297114538298,-493741633692993560641003887137829060840671700303945013188182⟩, + ⟨-434978141432162779598895267195722479083836186384802525488806,-434978141432162778261613650239479525757253274660513308826948⟩, + ⟨-173757123876852290984654767482491678124482981350009042808096,-173757123876852290410703390787298328548946029892168055669700⟩, + ⟨-18967656997327422674937198972905661863234029109317290561953,-18967656997327421665917950451139259253651009889885967225050⟩, + ⟨18517909763243224416268396988662095928054378513696933567893,18517909763243224985436023610110756087502203171561402014159⟩] +lemma ex1b21_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 21 r = ex1b21 r := by + revert r + decide +kernel +def ex1b22 : Fin 8 → RI := ![⟨0,149⟩, + ⟨59149351124209224777393496686753534168741094496541014162265,59149351124209224863574217917612854043524241839230457016587⟩, + ⟨99343503225272993885162704691991091416643953962304822863715,99343503225272995498054676496959943761253579086379167031021⟩, + ⟨-491772041326246638713887478510498079548122618443392121678653,-491772041326246638117076313785699005899281705743165766498856⟩, + ⟨-424922957271235682920271428476603160877056784672308588274632,-424922957271235681210775141601017485436702414416470605408851⟩, + ⟨-168273641612154814259509429390162856331007501527492125390304,-168273641612154813525806270041870596639824387835804147524730⟩, + ⟨-18378861296528724302004640858962412750368456796358167369825,-18378861296528723012138215656828262906500967414925240095046⟩, + ⟨18297023311109626867543873718905581967447995538739368312540,18297023311109627595131789373479100344041212206314799990374⟩] +lemma ex1b22_calc (r : Fin 8) : bernsteinRowsBox 22 ex1r 22 r = ex1b22 r := by + revert r + decide +kernel +def ex1b : Fin 23 → Fin 8 → RI := ![ex1b0,ex1b1,ex1b2,ex1b3,ex1b4,ex1b5,ex1b6,ex1b7,ex1b8,ex1b9,ex1b10,ex1b11,ex1b12,ex1b13,ex1b14,ex1b15,ex1b16,ex1b17,ex1b18,ex1b19,ex1b20,ex1b21,ex1b22] +lemma ex1b_mem (l : Fin 23) (r : Fin 8) : (ex1b l r).Mem (bernsteinRows 22 (exceptionalRow 1) l r) := by + have he : bernsteinRowsBox 22 ex1r l r = ex1b l r := by + fin_cases l + · exact ex1b0_calc r + · exact ex1b1_calc r + · exact ex1b2_calc r + · exact ex1b3_calc r + · exact ex1b4_calc r + · exact ex1b5_calc r + · exact ex1b6_calc r + · exact ex1b7_calc r + · exact ex1b8_calc r + · exact ex1b9_calc r + · exact ex1b10_calc r + · exact ex1b11_calc r + · exact ex1b12_calc r + · exact ex1b13_calc r + · exact ex1b14_calc r + · exact ex1b15_calc r + · exact ex1b16_calc r + · exact ex1b17_calc r + · exact ex1b18_calc r + · exact ex1b19_calc r + · exact ex1b20_calc r + · exact ex1b21_calc r + · exact ex1b22_calc r + rw [←he] + exact bernsteinRowsBox_mem 22 ex1r_mem l r +lemma ex1b_lower (d : Fin 23) : (56/1000:ℝ) < rowLower (bernsteinRows 22 (exceptionalRow 1) d) := by + have hc : ∀ d : Fin 23, (56:ℤ)*scale < 1000*(rowLowerBox (ex1b d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (ex1b_mem d)).1 + have hnum : (56:ℝ)*(scale:ℝ) < 1000*((rowLowerBox (ex1b d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma exceptional_sign_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (56/1000:ℝ) < exceptionalValue 1 e τ := by + rw [←exceptionalRow_eval 1 e (polytope_one e he)] + exact polytope_polynomial_lower 22 (exceptionalRow 1) _ ex1b_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign2.lean b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign2.lean new file mode 100644 index 0000000000000000000000000000000000000000..26a822148b3373eb3c4e552ad1f9e07d2a2b52df --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign2.lean @@ -0,0 +1,586 @@ +import OAI.Analysis.Triangular.Signs.ExceptionalInterval + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def ex2r0 : Fin 8 → RI := ![⟨0,2⟩, + ⟨145711654088698769532337388774814911117899582963800200054657,145711654088698769534493601584043037785185353822884417096370⟩, + ⟨147734727593584676564557964139060641742432002593432650194884,147734727593584676609719145765059432200170499722400686021898⟩, + ⟨-213052017293417926629952651089497444650042929498072385699169,-213052017293417926613241862097517055661855372657357399558755⟩, + ⟨-237491481774334975793998419877146218630315585070234589358828,-237491481774334975746132305064256155845426016803293448917134⟩, + ⟨-122381550823042116292163033358206563004972190818780489144190,-122381550823042116271619250995991635022001455272388651547908⟩, + ⟨-5761774199607653706581496444736332822643491081169677248875,-5761774199607653670465071466306301076725982253844645689142⟩, + ⟨-5067537190541215857382050275792834251359772500905650552614,-5067537190541215837009495522565752059229420860349478907639⟩] +lemma ex2r0_calc (r : Fin 8) : exceptionalRowBox 2 0 r = ex2r0 r := by + revert r + decide +kernel +def ex2r1 : Fin 8 → RI := ![⟨0,4⟩, + ⟨8232338129040237319687801776614576586759759687793640396445,8232338129040237331444679406652070997291903125519637015322⟩, + ⟨606759386115232756424024225384336201478126340345988665187900,606759386115232756628403812975181341393463862923737411460156⟩, + ⟨-847275068426603333770658663386615479231986732699663091453544,-847275068426603333695033003482601900972445268249475252456620⟩, + ⟨-937113480616909257924145339670085763284465482543339095118105,-937113480616909257707524417613118935870258274871846221928958⟩, + ⟨-443531372850041121123883156180562277724955989430521074852051,-443531372850041121030911059004185275699610712663119501371904⟩, + ⟨-22139727645141615423363958942561813425076697569033032808338,-22139727645141615259916950326292628452782064268352797797833⟩, + ⟨-7916304628449998674405711477064983640829913089323740730874,-7916304628449998582208514930436393670195543122793733849569⟩] +lemma ex2r1_calc (r : Fin 8) : exceptionalRowBox 2 1 r = ex2r1 r := by + revert r + decide +kernel +def ex2r2 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-247857685254899971266075310640359842435556334152355506184704,-247857685254899971243588197454282296797500096245572629161043⟩, + ⟨324757089195542153246588869903997664222618014402646357584927,324757089195542153617339405491535158258933432895377744683783⟩, + ⟨-686320845896914693884219570633435490199292390915373254792550,-686320845896914693747032416846866269825110828181678488662914⟩, + ⟨-642229228734177731600293889212560208768613047130205565336820,-642229228734177731207337215709629735168439493889413730826301⟩, + ⟨-211796439781037359623702365146676048083898401795119683575853,-211796439781037359455048267989554389363735833070458433262904⟩, + ⟨-35012550358081182449963527831684044027028823500572555299640,-35012550358081182153465884895987078967355219724895390534809⟩, + ⟨51633310251544203819394699923287479562462850610823265659526,51633310251544203986643104729683996182916394380358189891248⟩] +lemma ex2r2_calc (r : Fin 8) : exceptionalRowBox 2 2 r = ex2r2 r := by + revert r + decide +kernel +def ex2r3 : Fin 8 → RI := ![⟨0,6⟩, + ⟨100781542878310748910841960160836881903753255667118872728100,100781542878310748934560200308254887546254150094054011960304⟩, + ⟨-1248773720130984803967120609581877530152690216792495538213560,-1248773720130984803577586650106661142315633528390715959864499⟩, + ⟨979069019687330629070260004728354598509140871680596122486737,979069019687330629214397504404770188022798133060420134809982⟩, + ⟨1381137775367900704570986154135913143148615331022787800858465,1381137775367900704983851286447319095107966408402708896074669⟩, + ⟨766593863497585751512939190413027176500193217586228243503278,766593863497585751690137850803581889220477830314189560671167⟩, + ⟨-25674994850729275725642795617851135018473134715088807412768,-25674994850729275414123621015100153947166174456415812545686⟩, + ⟨129047478991284668914186283192149890462398133405412672063257,129047478991284669089908034309128404116195323614488108303249⟩] +lemma ex2r3_calc (r : Fin 8) : exceptionalRowBox 2 3 r = ex2r3 r := by + revert r + decide +kernel +def ex2r4 : Fin 8 → RI := ![⟨0,6⟩, + ⟨66207464612558517536003056003739435006325599448393023189886,66207464612558517559240846021613382229581736852640191159347⟩, + ⟨-708639835240794858735800413218249211491001200630098137058313,-708639835240794858356182345589923001568279846115142310332021⟩, + ⟨818266925597366948176851074108414808472841461419952856067906,818266925597366948317319440902751940827643310323057483237646⟩, + ⟨906362988386882439637949144914611084894469982343256050985436,906362988386882440040304472106647805338804296133231548015275⟩, + ⟨327668222460333972365342364051430480457004016791970767001957,327668222460333972538030293830065488346018009784732449561844⟩, + ⟨36969380371185115918078175884240050070395162298131298723479,36969380371185116221667386065840002691535541881869345454243⟩, + ⟨-44879997848867133066491539610754704005390261600341385808981,-44879997848867132895242923212810639027733189160282842709331⟩] +lemma ex2r4_calc (r : Fin 8) : exceptionalRowBox 2 4 r = ex2r4 r := by + revert r + decide +kernel +def ex2r5 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-54704279251795497995986964615992615165704117282177250008757,-54704279251795497975249154908010363213171171380534209514809⟩, + ⟨1601559617516165559570595107711809053000847226107229482795280,1601559617516165559907177025547721543053773963171501766894255⟩, + ⟨-1094768073487037349221024316955852141545006393193538976516785,-1094768073487037349096480423181899345275605175303354191248484⟩, + ⟨-1661760957812877450467609585986414670393377264586588961436788,-1661760957812877450110868062796212909820949106802502557238474⟩, + ⟨-949938930230459245371637308556313236630773734811178359719475,-949938930230459245218526486007478156395304614645728627588149⟩, + ⟨102725221491172547422756749650274719847140504114466595923522,102725221491172547691928971192196778692639095960002103559254⟩, + ⟨-264791421185991252443443698930094089880026825806087712011601,-264791421185991252291609019156648290652856281558099502501690⟩] +lemma ex2r5_calc (r : Fin 8) : exceptionalRowBox 2 5 r = ex2r5 r := by + revert r + decide +kernel +def ex2r6 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-7151278436027124356635876297342212684543218462119937139271,-7151278436027124340172558894913591851433232143863847538991⟩, + ⟨32731940402353852830251289604107975858412006790049436415831,32731940402353853096674421239673516263549256171090635690469⟩, + ⟨-148164895802979395092795441573907302997455706978421858132742,-148164895802979394994212088023923319051075025276556890414618⟩, + ⟨-97820810551912792346293752798481033971298343970518015165559,-97820810551912792063913182852340862016513887055322407472986⟩, + ⟨12837308306126252844218075126305268963362380308754398143616,12837308306126252965413726667998957024543583161720438419415⟩, + ⟨-33470282512193994510391186458285761134339451478129587413335,-33470282512193994297326543308513011836910127035553190960281⟩, + ⟨56469176027467509779243064889615947326644828587140016539176,56469176027467509899428579121881518880486902933092573838692⟩] +lemma ex2r6_calc (r : Fin 8) : exceptionalRowBox 2 6 r = ex2r6 r := by + revert r + decide +kernel +def ex2r7 : Fin 8 → RI := ![⟨0,6⟩, + ⟨38849701070296437213341489257540871233022012423596756515531,38849701070296437225548202263105366919925394476993699741010⟩, + ⟨-1231732890154444831684088141327516100031183517715552538853253,-1231732890154444831487312716831514010963135103010476163739471⟩, + ⟨827302615046132575997695276246174330059286590264080162579724,827302615046132576070507201861048578299219884189161196849244⟩, + ⟨1260667644096618115148248692975192289705184158926008988651152,1260667644096618115356809999867796038343143874566782939430013⟩, + ⟨756883865599637490854392995885182847015729178549722214322444,756883865599637490943905965844802337145572555129923987199366⟩, + ⟨-127695898509035484104500787409694678741055536209170570343988,-127695898509035483947135001097496182568884188512212403854947⟩, + ⟨285132001823033997816821274374483177064620481089161773382211,285132001823033997905588174741689973280512066967654223700498⟩] +lemma ex2r7_calc (r : Fin 8) : exceptionalRowBox 2 7 r = ex2r7 r := by + revert r + decide +kernel +def ex2r8 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-24405091408476562667599772859583980973241377759753975466285,-24405091408476562659260581006193986754843484740429328082721⟩, + ⟨568930972067937151875234866093920233719062150009871256953858,568930972067937152008875703019063258098628698477650292678641⟩, + ⟨-361326162941430314389107623696404720902809363814280090187006,-361326162941430314339657105664908490433058835182410162839308⟩, + ⟨-569942347103067840386494333802320962562116035903078811649031,-569942347103067840244849066489794041308513799814617125849338⟩, + ⟨-354392664829280884094538994509905437268441073004950880794481,-354392664829280884033745893686811779894785016033736282068770⟩, + ⟨74775936892047908218440033449203124771620172544190269106040,74775936892047908325315652903407298884101573653830675877802⟩, + ⟨-152188202507862742267665930741633095220929643954167527724289,-152188202507862742207379526142443396953109588151368692495351⟩] +lemma ex2r8_calc (r : Fin 8) : exceptionalRowBox 2 8 r = ex2r8 r := by + revert r + decide +kernel +def ex2r9 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-5034943293126750096462614207791978136987984672634404259927,-5034943293126750091484592828316591280217347825153998294101⟩, + ⟨381295681569475511294367252379560809578111031001508344989436,381295681569475511373968384191300626325538354099609065096480⟩, + ⟨-220130189181280180961259496261098082078858121055665707102093,-220130189181280180931805047347720956049148858430302383061252⟩, + ⟨-370123987673379594828736917913555360980316353257771504546117,-370123987673379594744368068890549935372832772547676204392100⟩, + ⟨-251498411172061981101641902019491691003787330465332775627311,-251498411172061981065431416189223521834903030372270007263881⟩, + ⟨57436332833611120739933151376850123208457010503700566071460,57436332833611120803591988506560406200447220061642482017438⟩, + ⟨-123234358429200123763988953201570827729445575268067949342031,-123234358429200123728080273269809174245704439007802513602930⟩] +lemma ex2r9_calc (r : Fin 8) : exceptionalRowBox 2 9 r = ex2r9 r := by + revert r + decide +kernel +def ex2r10 : Fin 8 → RI := ![⟨0,6⟩, + ⟨13171731976595447603860124628240886659251821881309013679928,13171731976595447606655873512361123236288366034400000654037⟩, + ⟨-461460199976355803744974170767824546906098346025264061481449,-461460199976355803700371164708325943648107903508949878160437⟩, + ⟨267881667059484177375566160628708799359852208548220274259904,267881667059484177392070410423320608562586337626214395126362⟩, + ⟨447659004515563580512413988565738259490006056650130425519194,447659004515563580559688495831605765271140454642604765003148⟩, + ⟨301377975494973032644659689432724852739370414891575863631438,301377975494973032664949558208910516088582200562525244825840⟩, + ⟨-75503302281603234409081526016755416785737526382028615552695,-75503302281603234373411486739344176649384782738252807645273⟩, + ⟨152610937552153551685771667807950848571341003694608186946750,152610937552153551705892425291308375921017184185640963396153⟩] +lemma ex2r10_calc (r : Fin 8) : exceptionalRowBox 2 10 r = ex2r10 r := by + revert r + decide +kernel +def ex2r11 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-3654836437326946821006178529369296141571966977789271012425,-3654836437326946819528193381493084287501559248449237173984⟩, + ⟨108484391151943100592746086216850163540061231685254975945253,108484391151943100616232054166768191431284621054149560147634⟩, + ⟨-61369730142792421822481183020432510373062033741966481549903,-61369730142792421813790775894169884488485096256682741939455⟩, + ⟨-103786242521469265988138639898703767726337108424242914770205,-103786242521469265963245977708779962646647977643628096648842⟩, + ⟨-70998331217177827957463151480853854340265992995520410535044,-70998331217177827946779405027796352504517963565581010090981⟩, + ⟨21778931723948310147790695412579925533538398739134255309162,21778931723948310166572958610866692096159191663831295254986⟩, + ⟨-40338377145349445845224382659895512703034470080495910081342,-40338377145349445834629682725281285998611000378422655123738⟩] +lemma ex2r11_calc (r : Fin 8) : exceptionalRowBox 2 11 r = ex2r11 r := by + revert r + decide +kernel +def ex2r12 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-3500960320116144846522285184691413958416015937547727344868,-3500960320116144845826688933109587419739748241134427234219⟩, + ⟨94615776842339507309120747286143075920093168000873563030583,94615776842339507320151591594454634549981493362223444298402⟩, + ⟨-56093300247775074327674910531043498223227242457743253293697,-56093300247775074323593216806948804709624986976155302011150⟩, + ⟨-92802591774932369743477424795250727265084194308487213879317,-92802591774932369731785887038664985111360036051282202885904⟩, + ⟨-61582042459213315318643481838362786251437514465527406415670,-61582042459213315313625560328622880813976820544712012534818⟩, + ⟨12808622033890340924055903718075617322591621919642569044239,12808622033890340932877521014844139385066473666566306290929⟩, + ⟨-28210213857319364674984210298596095975660617395470300364639,-28210213857319364670008111986564965823585213102241027488944⟩] +lemma ex2r12_calc (r : Fin 8) : exceptionalRowBox 2 12 r = ex2r12 r := by + revert r + decide +kernel +def ex2r13 : Fin 8 → RI := ![⟨0,6⟩, + ⟨2882443579099478321829146440746987263494149033341304018501,2882443579099478322136251283182194296039131531271312270252⟩, + ⟨-99027793350175037568120120490145320653163309726285967622764,-99027793350175037563258217982890073220223015036625127994331⟩, + ⟨57864890890068798365703508318331362843423050104444459277898,57864890890068798367502536243695496753619772272137362630729⟩, + ⟨96376299759976022165728563131639800406020889084509380974164,96376299759976022170881669742852015486869197984898083960446⟩, + ⟨64556373712921194613516867499456603236664619866047200161688,64556373712921194615728542733690703928179663580492018291356⟩, + ⟨-15476639952801634261295158050848936029121632982930279153878,-15476639952801634257406983940646232743635293348697460435592⟩, + ⟨31840263227883810559201424923436165130055285860476463894186,31840263227883810561394666363838166237082642194228689093838⟩] +lemma ex2r13_calc (r : Fin 8) : exceptionalRowBox 2 13 r = ex2r13 r := by + revert r + decide +kernel +def ex2r14 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-265826907519813576172790204850084895298517654318013018580,-265826907519813576044761489872303133438115026679812622992⟩, + ⟨49473408016121855885018183920966887974837919042224305212495,49473408016121855887043089242347096746184498898446845570526⟩, + ⟨-28752539137026400829192660656530909173376075616704574541313,-28752539137026400828443394044553099222693911326097595848437⟩, + ⟨-48008303585849101463883961181346885353912327170465573335977,-48008303585849101461737773966956612992707449143642934545955⟩, + ⟨-32268777368522002037743173303321613885628321301565836602729,-32268777368522002036822045628655487676783086639270279446599⟩, + ⟨8129649461655087388450100205234900876646408239699496157760,8129649461655087390069463085189830898682532469404430097924⟩, + ⟨-16345183392385170587776187152402228280098357956043910377689,-16345183392385170586862736860646266546996489009585919823957⟩] +lemma ex2r14_calc (r : Fin 8) : exceptionalRowBox 2 14 r = ex2r14 r := by + revert r + decide +kernel +def ex2r15 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-492180654300998663346937697040849314221117559060833921352,-492180654300998663295344452925931350150005526640475282840⟩, + ⟨-17249020393645601383231954210429314549661536638966488319479,-17249020393645601382417024846694991719264247123450801331086⟩, + ⟨9977037812758856791130831578351251184587892941225413946275,9977037812758856791432376226843653746557691657583657981435⟩, + ⟨16695319406123449450608923337943385481573246753871569543121,16695319406123449451472662971896089589369728040701510030934⟩, + ⟨11248738568037648570506498979351783348405700968120576218362,11248738568037648570877209640194741156664209596641989651089⟩, + ⟨-2944706094639447234511890628528940115584873437438455058140,-2944706094639447233860173065498420703208165280359088144277⟩, + ⟨5816362640231909961903331591558278575074160260964725727164,5816362640231909962270952466077087137395765731015964275218⟩] +lemma ex2r15_calc (r : Fin 8) : exceptionalRowBox 2 15 r = ex2r15 r := by + revert r + decide +kernel +def ex2r16 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-9589968667081958642998257761779479117245059541856083437,-9589968667081958623209578016950127710797324596589782977⟩, + ⟨4989582057618330831945905139877452672301079349690825617666,4989582057618330832258001524344629213902132235582965524089⟩, + ⟨-2862562073650874074839644886718876388785249173155422161816,-2862562073650874074724161264778187944888222065633896891170⟩, + ⟨-4808503155337745324869963814745469306759462204285772812668,-4808503155337745324539174388233250077931726487296713228243⟩, + ⟨-3244615348497564137373352292851853444281491824903717028818,-3244615348497564137231379918212767910654084603177106747298⟩, + ⟨885298058705026138228557709334946313638338965205434711021,885298058705026138478148292478997129231775170225925342039⟩, + ⟨-1715252939881566897803106057575646929464817238843384613959,-1715252939881566897662316989347419058375956463082057198004⟩] +lemma ex2r16_calc (r : Fin 8) : exceptionalRowBox 2 16 r = ex2r16 r := by + revert r + decide +kernel +def ex2r17 : Fin 8 → RI := ![⟨0,6⟩, + ⟨356459650375773060130501140923432957938853379404977692018,356459650375773060137659138573450299156455259248610286315⟩, + ⟨-1479432944238823344125563022880894235609976470317269965621,-1479432944238823344013005042638124415033139550293008799704⟩, + ⟨835235194276248996395407597948235219308096934757671204496,835235194276248996437056921310158524960721005572717698081⟩, + ⟨1413840644342103400757939186957050457858517161614966296410,1413840644342103400877238837920471259192600058798310118570⟩, + ⟨953174572549945239026938490785252140415201797025653156841,953174572549945239078141018385577583575480342955719633660⟩, + ⟨-271719745574285517821971765254988952497266947964497904995,-271719745574285517731956586212537984470514494487745347557⟩, + ⟨515871536837957052657008133804177915190740020722132069730,515871536837957052707783900358106773637915887456410870907⟩] +lemma ex2r17_calc (r : Fin 8) : exceptionalRowBox 2 17 r = ex2r17 r := by + revert r + decide +kernel +def ex2r18 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-259836018613046408629503019559913725578296202094112987902,-259836018613046408627196225505289091574748774929014176494⟩, + ⟨528116469693231825785434687467386855792498449572048886844,528116469693231825821662459199102738474286867096800601288⟩, + ⟨-292591647089906741125521518077947482461947707694397650638,-292591647089906741112116318586258196392999246642562274406⟩, + ⟨-499846648818515374245250945177842286935810225343944813062,-499846648818515374206853307680666008497664213161778903741⟩, + ⟨-335830928471493249801400717689050202181092774779656127103,-335830928471493249784920735745607325065944388210508603582⟩, + ⟨98350710514737277481634027128715450848766670577217985858,98350710514737277510606200862699217873091822498969602481⟩, + ⟨-184428834194032423612975108087214323921976542951231121157,-184428834194032423596632482924155145770532151281947039852⟩] +lemma ex2r18_calc (r : Fin 8) : exceptionalRowBox 2 18 r = ex2r18 r := by + revert r + decide +kernel +def ex2r19 : Fin 8 → RI := ![⟨0,6⟩, + ⟨58727025451096304673203113077582826367437366780858716029,58727025451096304673897329118361336545666423262676667859⟩, + ⟨-208494981798027440958819083401848589073758093205102364069,-208494981798027440947872935936744053188051839524670743514⟩, + ⟨114161151683289755937297476157406197413868762482247671905,114161151683289755941347829889394068984502550243826079165⟩, + ⟨196163093484862763538815269260531354173243910067170210908,196163093484862763550417037248590081587480696560942412102⟩, + ⟨131373632235797541428339277510388519670983949199872100508,131373632235797541433318670499586500508511158484470291206⟩, + ⟨-38707162318830604224140076027452872694628662043459724070,-38707162318830604215386192724185745536034753537762501252⟩, + ⟨72387786821167428470127868514682132101899100326912672250,72387786821167428475065759432360705539863947114923482390⟩] +lemma ex2r19_calc (r : Fin 8) : exceptionalRowBox 2 19 r = ex2r19 r := by + revert r + decide +kernel +def ex2r20 : Fin 8 → RI := ![⟨0,6⟩, + ⟨28928359746935240778132698675225004362048136048430039408,28928359746935240778381948790765483819431879655938090112⟩, + ⟨77904554630046844294722810695590457195174580200769351762,77904554630046844298638368540719953484815628523768053982⟩, + ⟨-42429476388216671782967794899915866962754840347681626816,-42429476388216671781518938635061813810437144200580125200⟩, + ⟨-73100934246588014730381313995324357933999318021810191336,-73100934246588014726231233448005337267468936615791981876⟩, + ⟨-48866328056333230059847416875620022200363314362078116236,-48866328056333230058066233007506550091788070512717520009⟩, + ⟨14377454639304622579111001012389151743507897824810652947,14377454639304622582242361753940347377163530575127636962⟩, + ⟨-26907114224034901156388528100812473318851295437107336160,-26907114224034901154622189982059089024695645082853378415⟩] +lemma ex2r20_calc (r : Fin 8) : exceptionalRowBox 2 20 r = ex2r20 r := by + revert r + decide +kernel +def ex2r21 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-31694787680309352301349348086280403564648820471566206261,-31694787680309352301274033513562890280076508665974048774⟩, + ⟨-25023586900429617770393841916231531184767451790960308641,-25023586900429617769217939222018491145447426638518753122⟩, + ⟨13597063292035234982170762951417854284136810263531896570,13597063292035234982605876938429556817451429517231229632⟩, + ⟨23453400688904011745706221454025154353833608838727145473,23453400688904011746952554949739907507458116469517032964⟩, + ⟨15663980884815730236755290939174487126401095196358028683,15663980884815730237290208055009891255793885993675931048⟩, + ⟨-4600900319683736057436969428347467053699085856015954574,-4600900319683736056496573275823930934791424186418930310⟩, + ⟨8617724615594031244575378547046663394995445590701313058,8617724615594031245105837254307722246968497127762572321⟩] +lemma ex2r21_calc (r : Fin 8) : exceptionalRowBox 2 21 r = ex2r21 r := by + revert r + decide +kernel +def ex2r22 : Fin 8 → RI := ![⟨0,2⟩, + ⟨-32867598212615087308868465677033550005239761489859716999,-32867598212615087308851475101785736774215629864074281455⟩, + ⟨10883040173460042234116393541451935377535615597864109429,10883040173460042234377584979844500984622232190557329381⟩, + ⟨-5917706646138368128695988930689199272806764318506701948,-5917706646138368128599341437072930238802613251305548479⟩, + ⟨-10203930988021550245739457543559762826153818446593627442,-10203930988021550245462622019613260120882764262408059959⟩, + ⟨-6818386692787811254179034565870354246251668656114741801,-6818386692787811254060218807055078478995553437724776770⟩, + ⟨2002525905641920967559531738264494907645025420295326483,2002525905641920967768412477245063114872381683441454311⟩, + ⟨-3752247592010364693050619874864475974676000653062721418,-3752247592010364692932794417503737006791958244977074487⟩] +lemma ex2r22_calc (r : Fin 8) : exceptionalRowBox 2 22 r = ex2r22 r := by + revert r + decide +kernel +def ex2r : Fin 23 → Fin 8 → RI := ![ex2r0,ex2r1,ex2r2,ex2r3,ex2r4,ex2r5,ex2r6,ex2r7,ex2r8,ex2r9,ex2r10,ex2r11,ex2r12,ex2r13,ex2r14,ex2r15,ex2r16,ex2r17,ex2r18,ex2r19,ex2r20,ex2r21,ex2r22] +lemma ex2r_mem (l : Fin 23) (r : Fin 8) : (ex2r l r).Mem (exceptionalRow 2 l r) := by + have he : exceptionalRowBox 2 l r = ex2r l r := by + fin_cases l + · exact ex2r0_calc r + · exact ex2r1_calc r + · exact ex2r2_calc r + · exact ex2r3_calc r + · exact ex2r4_calc r + · exact ex2r5_calc r + · exact ex2r6_calc r + · exact ex2r7_calc r + · exact ex2r8_calc r + · exact ex2r9_calc r + · exact ex2r10_calc r + · exact ex2r11_calc r + · exact ex2r12_calc r + · exact ex2r13_calc r + · exact ex2r14_calc r + · exact ex2r15_calc r + · exact ex2r16_calc r + · exact ex2r17_calc r + · exact ex2r18_calc r + · exact ex2r19_calc r + · exact ex2r20_calc r + · exact ex2r21_calc r + · exact ex2r22_calc r + rw [←he] + exact exceptionalRowBox_mem 2 l r +def ex2b0 : Fin 8 → RI := ![⟨0,25⟩, + ⟨145711654088698769532337388774814911117899582963800200054644,145711654088698769534493601584043037785185353822884417096393⟩, + ⟨147734727593584676564557964139060641742432002593432650194873,147734727593584676609719145765059432200170499722400686021922⟩, + ⟨-213052017293417926629952651089497444650042929498072385699184,-213052017293417926613241862097517055661855372657357399558732⟩, + ⟨-237491481774334975793998419877146218630315585070234589358843,-237491481774334975746132305064256155845426016803293448917109⟩, + ⟨-122381550823042116292163033358206563004972190818780489144203,-122381550823042116271619250995991635022001455272388651547885⟩, + ⟨-5761774199607653706581496444736332822643491081169677248887,-5761774199607653670465071466306301076725982253844645689119⟩, + ⟨-5067537190541215857382050275792834251359772500905650552627,-5067537190541215837009495522565752059229420860349478907616⟩] +lemma ex2b0_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 0 r = ex2b0 r := by + revert r + decide +kernel +def ex2b1 : Fin 8 → RI := ![⟨0,25⟩, + ⟨146085851276382416683232288855570119144570481131427183709027,146085851276382416685922905193436313739607713055862582415271⟩, + ⟨175314699689731620038377247111075923627801381700068498612504,175314699689731620092828409991204038627146129855297841088293⟩, + ⟨-251564520403718078164982590334343602796951417348057071674345,-251564520403718078144834271346726232978784703032333547397669⟩, + ⟨-280087549075103578426914117134877389688700379731295457318757,-280087549075103578369201596773943380203165029297468277186607⟩, + ⟨-142542067770771258161430449548232121083379281247440538001114,-142542067770771258136660662768909147553801942211621356155699⟩, + ⟨-6768125456204999862188949123943687978328795516125724194720,-6768125456204999818643114662955966006397894266042500134476⟩, + ⟨-5427369219107124888036855342932151689579314004965820585848,-5427369219107124863473518928494679044238309184112830446233⟩] +lemma ex2b1_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 1 r = ex2b1 r := by + revert r + decide +kernel +def ex2b2 : Fin 8 → RI := ![⟨0,25⟩, + ⟨145387071471620609413061927851302124390135074822204143527114,145387071471620609416384294528135726937330937673059048040811⟩, + ⟨204300546630880910495947997052372580682965643985936582344356,204300546630880910561294121860169143574723203420642518858923⟩, + ⟨-293048109426991886383493999581931905923077621176030386458132,-293048109426991886359314266816051714494091136559611333715668⟩, + ⟨-325463829487275547863294290103485444767728520916729509544198,-325463829487275547794034253053802161856005511462160048013796⟩, + ⟨-163619452423180215440324282903394804911067317138417122284761,-163619452423180215410598387390266289476787432757219681686730⟩, + ⟨-7926046194871961526237802356534956744520718234634033284708,-7926046194871961473979018833181332576621127575750724235827⟩, + ⟨-5563680424073275460599042661485809043112869142745370421410,-5563680424073275431120905517411986998152321341727445232074⟩] +lemma ex2b2_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 2 r = ex2b2 r := by + revert r + decide +kernel +def ex2b3 : Fin 8 → RI := ![⟨0,25⟩, + ⟨143680757234723939117222956385491989764920476539811026828856,143680757234723939121289821666263520811826621278430991902857⟩, + ⟨233881376390973466895733122658027315810423042557015800391590,233881376390973466973832134196560811236203257088310877801430⟩, + ⟨-336867025259546279448428268439581604289129891065316618282696,-336867025259546279419529642333802090994772856269671005178433⟩, + ⟨-372723480299573026502768168553011998709511297372625844865778,-372723480299573026419991409432113462430500731863341028349273⟩, + ⟨-185115916557218607770719248235114726711088121077693210668194,-185115916557218607735192075606294501122632941305083505049631⟩, + ⟨-9252208490186934332316135879924328169932553480016090757428,-9252208490186934269858578536083115173075660218330626962359⟩, + ⟨-5392673741159612595254205554056306383088750814630395726803,-5392673741159612560023143578727332801415486343833266051956⟩] +lemma ex2b3_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 3 r = ex2b3 r := by + revert r + decide +kernel +def ex2b4 : Fin 8 → RI := ![⟨0,25⟩, + ⟨141041402043926791930351396654553620207279270503505141566222,141041402043926791935294086990251113558320230577350853748228⟩, + ⟨263149422051914556130749763598753434891278665625145598831637,263149422051914556223764426640352170329622170679769624256259⟩, + ⟨-382273647290429488742388187598124126582546195491390437764872,-382273647290429488707970390027547367903395011247630804694567⟩, + ⟨-420845754085969437341050019964378418771075312953434019249998,-420845754085969437242464235002147081857327157386035674952528⟩, + ⟨-206488877934462119870038202205249260431653187009174947386045,-206488877934462119827725912641170531710457635633233724007527⟩, + ⟨-10758230502801972818192743283079752061982941338068006050545,-10758230502801972743806799897943731530355819437361990373421⟩, + ⟨-4836687444137874495108852112844333077150021102360422297448,-4836687444137874453149225560867845738986902673272598350618⟩] +lemma ex2b4_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 4 r = ex2b4 r := by + revert r + decide +kernel +def ex2b5 : Fin 8 → RI := ![⟨0,25⟩, + ⟨137550472970284751494683089493808700307377554566656806917486,137550472970284751500655473744638596487128495398198932763197⟩, + ⟨291160858983550863187283143148975268029757265824730885737424,291160858983550863297745739543197977838277765480644232295659⟩, + ⟨-428450065820109830569970333745587132934185281282125760174578,-428450065820109830529096355842581101654837480177535850970179⟩, + ⟨-468749101954638100870161964505689706095859159260552433015817,-468749101954638100753083200594972329477452181232604317180608⟩, + ⟨-227187033018141075209590855155232417201310667161661014213719,-227187033018141075159341515838316943567846911201753235708715⟩, + ⟨-12446775620420569246071451261112052880627145153931687216766,-12446775620420569157731998395655866688122304199416366417204⟩, + ⟨-3834250260696481710481566576535305880510921238869907071050,-3834250260696481660651043720217014425633244409551190943961⟩] +lemma ex2b5_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 5 r = ex2b5 r := by + revert r + decide +kernel +def ex2b6 : Fin 8 → RI := ![⟨0,26⟩, + ⟨133294237507632969292721210776201270570192174324066287036761,133294237507632969299904672576063731343774016715749990746655⟩, + ⟨316997060713157463785109410552476527081954203691949325701184,316997060713157463916002768335729302482621421548049082961850⟩, + ⟨-474551640257715904495202500457338084471050394334306632040291,-474551640257715904446768619774413923677334796775664703411774⟩, + ⟨-515355587839353935392972610224221950839050187169099347325177,-515355587839353935254239382565135787221560083586742671098548⟩, + ⟨-246686257638270464851492834642354714997343066327341769370176,-246686257638270464791949559685313140001144370917148837570869⟩, + ⟨-14308100183908213493094730430134482909005161665134487378202,-14308100183908213388416332603633386042074639940841357783019⟩, + ⟨-2349379660728094370289995254317243175575527398984186222005,-2349379660728094311242999532010312080853630521876734976121⟩] +lemma ex2b6_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 6 r = ex2b6 r := by + revert r + decide +kernel +def ex2b7 : Fin 8 → RI := ![⟨0,26⟩, + ⟨128361722356303025156775434856771793739468914477559753975996,128361722356303025165385145343613956689266012400263684654767⟩, + ⟨339819071108448710869714361622776838163237494426466903630359,339819071108448711024573960673286628924950509589756344841291⟩, + ⟨-519747692133948595471793290556189028823787590787883254483796,-519747692133948595414491289369560923547735650449680535862268⟩, + ⟨-559649221795844156069417418432204726973770798951288250975490,-559649221795844155905282489249437730933437374535826847737841⟩, + ⟨-264520897548628501775042443814598982631716398433787131574174,-264520897548628501704596946486525623058932314518682073762091⟩, + ⟨-16317798554859668219597914082842391585926019885229545988767,-16317798554859668095753167556289088859610896887374159688236⟩, + ⟨-378451420040687501655380298498367779804668638949223688787,-378451420040687431797029671995013420785573720287354683616⟩] +lemma ex2b7_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 7 r = ex2b7 r := by + revert r + decide +kernel +def ex2b8 : Fin 8 → RI := ![⟨0,26⟩, + ⟨122842955638529598370849829891109425587221779038484958673440,122842955638529598381142710681632397269234131976107530189785⟩, + ⟨358909849686206190515480009838301823708357813153644349085137,358909849686206190698523460358461961480668853696844566070761⟩, + ⟨-563255611923190632437596419990874694117501158741180039271417,-563255611923190632369865674959776518748214416827753409250266⟩, + ⟨-600722602616483294046855637226275444120014266924849635260492,-600722602616483293852848782160966692204235663915065099206685⟩, + ⟨-280307119092980047943981898100053066837140501281028501250445,-280307119092980047860715591177086426391182980562793007417029⟩, + ⟨-18436260438069537773457451406822405172242769970040602634061,-18436260438069537627073437293187393694779020560525027976796⟩, + ⟨2046555507299331704513964153084425933295312734872375940924,2046555507299331787086265933136284449954455314188023624324⟩] +lemma ex2b8_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 8 r = ex2b8 r := by + revert r + decide +kernel +def ex2b9 : Fin 8 → RI := ![⟨0,26⟩, + ⟨116827557580595359114067805485103393132197826875933667088415,116827557580595359126352705512572079847389004601220940225049⟩, + ⟨373701392593440386731398219814059080573529839548509546742558,373701392593440386947690559616476765428243028653103584106256⟩, + ⟨-604366231168659733464183546832841432968757484839384261578447,-604366231168659733384149864787952290543454239658632251599863⟩, + ⟨-637808786515093937863271231011847282785742960432621612760657,-637808786515093937634024041339177903938536134386038194170667⟩, + ⟨-293756604077338542110311720390140429664523705746675983904799,-293756604077338542011920522563381269601308793639909900271658⟩, + ⟨-20610006060992313832588459758975320385586344829546259421826,-20610006060992313659614552020777788650926413693767227377041⟩, + ⟨4858911097483914629142208235083394518566373427047605056218,4858911097483914726713338500317437379725025325537276132682⟩] +lemma ex2b9_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 9 r = ex2b9 r := by + revert r + decide +kernel +def ex2b10 : Fin 8 → RI := ![⟨0,27⟩, + ⟨110403668501071544531554298997083078849463846795216895301685,110403668501071544546205092988805864852701875240655796564267⟩, + ⟨383786430468516686170031339532475503086814514118466664578688,383786430468516686425697552760308215140540863166851123501224⟩, + ⟨-642459912185436608769812296415167542224176254684749678304243,-642459912185436608675209277012016849536161665447271199802838⟩, + ⟨-670297876881130446527243695338114143775239212761334388190853,-670297876881130446256264330418399655682204055736645692778046⟩, + ⟨-304680526366894820211363512677529867943712903352558468714518,-304680526366894820095061173971451170979334981084941232436876⟩, + ⟨-22774716793850136639767680136780380052596284609387204756447,-22774716793850136435305589527722875428887243464852796020896⟩, + ⟨7961820215278215783490995928117155255019042378557222566133,7961820215278215898823981914088374388642601271092757170982⟩] +lemma ex2b10_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 10 r = ex2b10 r := by + revert r + decide +kernel +def ex2b11 : Fin 8 → RI := ![⟨0,28⟩, + ⟨103657152184330952359824655681611123827985542488327092916354,103657152184330952377297227377772704183897411780462342497658⟩, + ⟨388916496139162225105141343645749838714877878828793324283744,388916496139162225407641598445004404322607907197142885156767⟩, + ⟨-677014109410563804376086172712012950490090982590908381015155,-677014109410563804264153363472577824042398536889538227838746⟩, + ⟨-697739915005247179225387118773583182123876879230967141676691,-697739915005247178904768582993927518927085582049697738255984⟩, + ⟨-312985075272383796205145644623989998437622463348198662312963,-312985075272383796067538541017988501212955045202555675967004⟩, + ⟨-24859517956782808732573029518468121993934253411669504250871,-24859517956782808490656689751469969860461403245835139563638⟩, + ⟨11236110948584394462335297104137270563592413225488700559443,11236110948584394598795477771325027183303826187358514725696⟩] +lemma ex2b11_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 11 r = ex2b11 r := by + revert r + decide +kernel +def ex2b12 : Fin 8 → RI := ![⟨0,28⟩, + ⟨96670991987138201106558932438271457839602886200601052979120,96670991987138201127413362485428462936547249853499270081651⟩, + ⟨388989480218077515417527454766349267234767147463014424026374,388989480218077515776016274441155734053638201777346363915546⟩, + ⟨-707604005750813652478790959121526643508883159762124478304158,-707604005750813652346140952946492707827445264450130633782021⟩, + ⟨-719836988720368863246056426628964178365597714569690579874249,-719836988720368862866095885658150349998501250598544754277566⟩, + ⟨-318660622921167632886962577425534661901487926794302247812388,-318660622921167632723886324206863815458263454398743319481365⟩, + ⟨-26791932111602721828274500862356895766611129858749540509166,-26791932111602721541582831260614006252632517751355561901354⟩, + ⟨14549770594652437999005246115551669539902004955302807421542,14549770594652438160722297007069513306548401067436445097657⟩] +lemma ex2b12_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 12 r = ex2b12 r := by + revert r + decide +kernel +def ex2b13 : Fin 8 → RI := ![⟨0,30⟩, + ⟨89524800702597161888878169560133020486769168965868989070551,89524800702597161913807951143429759136086764154364773211242⟩, + ⟨384030338717302656001925835675719952611800903974809020769173,384030338717302656427724470695511751002036771372220010002186⟩, + ⟨-733898214676709475560163087279949162668160134320087720122007,-733898214676709475402606732758696592559021990068295287936164⟩, + ⟨-736428050967583917080062820089909874786696814729095090563810,-736428050967583916628760936105804907212482517275553336465338⟩, + ⟨-321766961312012355159025128987145500168088837375821635256918,-321766961312012354965329699134483703615415921648005356229279⟩, + ⟨-28502900907667430111191117915843628871822825425094247348360,-28502900907667429770670256765745517165630152213737502827456⟩, + ⟨17768094004518517518736787220511316209077687462636399908168,17768094004518517710817811090699373026222028125658924922718⟩] +lemma ex2b13_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 13 r = ex2b13 r := by + revert r + decide +kernel +def ex2b14 : Fin 8 → RI := ![⟨0,30⟩, + ⟨82294382799075767928927657817568140285818758887434828313661,82294382799075767958798479346418741281367537874088163180110⟩, + ⟨374168521626402841738278836527325816686924653380233033049650,374168521626402842245501557044379666008639600891533981333685⟩, + ⟨-755651543112599290407371913890966458239037816309496282962802,-755651543112599290219686571097141345139001430558986904792081⟩, + ⟨-747469885810562265804934921622349945515513004526982793621606,-747469885810562265267332048945631122345749833313373771922133⟩, + ⟨-322416949327634447056218418161480064145039856717990396193293,-322416949327634446825483242421815996797035086457956145727643⟩, + ⟨-29931344997993632242259353379240912783348166367443032273402,-29931344997993631836621797547348045606527777778027522490929⟩, + ⟨20763321554674052663282242617102174327127656394086091982934,20763321554674052892094294780652121125196532083292368186583⟩] +lemma ex2b14_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 14 r = ex2b14 r := by + revert r + decide +kernel +def ex2b15 : Fin 8 → RI := ![⟨0,31⟩, + ⟨75051310391403019151882564110310363998708075060229343481725,75051310391403019187784228498300323189034150535825706776629⟩, + ⟨359615155073188154933744143217550354033718375852570656346841,359615155073188155540135627330788396379718902026625002727316⟩, + ⟨-772696547323308244613067387364280918645114179030320895210846,-772696547323308244388687072841473744597871478096662948237413⟩, + ⟨-753017169117980277687623973339336952053591902988321527226986,-753017169117980277044912614721551848333562731786532512944533⟩, + ⟨-320760540898317818074001056648608717634078720552692747099948,-320760540898317817798154096342214475189431663923325988688706⟩, + ⟨-31027860268382093077938592545229584568702409714581395458481,-31027860268382092592993519021637607764937156343181796930523⟩, + ⟨23422882181321845258777009152160020499869012040590738795652,23422882181321845532324849740382494661824358097128071235831⟩] +lemma ex2b15_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 15 r = ex2b15 r := by + revert r + decide +kernel +def ex2b16 : Fin 8 → RI := ![⟨0,33⟩, + ⟨67862496242535455418753201135969817011399041359763671807347,67862496242535455462069749736185105309288038495979558728926⟩, + ⟨340642235162746045635581462867335506865717346931421052231252,340642235162746046363646366506214331696607608137339989241429⟩, + ⟨-784935202387182668431795146142586943246432926056452419126731,-784935202387182668162392563238793124066285919225595114869051⟩, + ⟨-753203842224339999675463774142852734179832678222297094886388,-753203842224339998903791355189015755132669243010294044373961⟩, + ⟨-316970644852538747223341868394478645017695864842036765664421,-316970644852538746892145775054286149813773001185807717155953⟩, + ⟨-31757301693826551744921757991518854785736374092111336550833,-31757301693826551162671681140494187079987536729496663403469⟩, + ⟨25655654334853894495376954249589497902232743185738834377926,25655654334853894823812605832243871449765901530701170598674⟩] +lemma ex2b16_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 16 r = ex2b16 r := by + revert r + decide +kernel +def ex2b17 : Fin 8 → RI := ![⟨0,35⟩, + ⟨60789764397184420371866552894676817714142785926070278649863,60789764397184420424371868968225318618535221667468315000929⟩, + ⟨317565249524437788588405684893606295967065764781499999627852,317565249524437789466946654556258734193878457935548419098174⟩, + ⟨-792331545660658551274375129065877386085657517139527929869088,-792331545660658550949292563994978132421618519846012777459034⟩, + ⟨-748227215747137545302830159733234356216199472542097285136401,-748227215747137544371668896747334159266000050772038926917086⟩, + ⟨-311231705742117628276937294882089239615487899227057084051420,-311231705742117627877289769592870657314725545932885945722192⟩, + ⟨-32100157261885829395430801682453507447394882004897856705902,-32100157261885828692841589444836885842135454311243877758209⟩, + ⟨27395960189875062871459781581952175513235210218288661618496,27395960189875063267776338487386894795325296876080545793185⟩] +lemma ex2b17_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 17 r = ex2b17 r := by + revert r + decide +kernel +def ex2b18 : Fin 8 → RI := ![⟨0,39⟩, + ⟨53889432915880401979358411080729255329001806093337576984492,53889432915880402043347873452496942311860579111086735169053⟩, + ⟨290729859282749323199769735799954242983601666770918959300693,290729859282749324266002602565994298768826735322966902484604⟩, + ⟨-794905720529892356037511766937169322025138619024319937157514,-794905720529892355642978413048385353249398341446614372532390⟩, + ⟨-738335470937116222879580661110493342560806211402579162670973,-738335470937116221749485677340078349388453928138558578287792⟩, + ⟨-303731375072639175033587165387938165490178329259048541492220,-303731375072639174548558758864177304080751071093877081172872⟩, + ⟨-32052745276203696032311246622571226788155696896040309031228,-32052745276203695179620551714028583358993709373277124477927⟩, + ⟨28605277224412808357151553276040092553862430290484643535764,28605277224412808838137361802835892893485849840289684557941⟩] +lemma ex2b18_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 18 r = ex2b18 r := by + revert r + decide +kernel +def ex2b19 : Fin 8 → RI := ![⟨0,45⟩, + ⟨47211925781114150860767105980278890878876658570522587515794,47211925781114150939240866619638198446570392347454547405827⟩, + ⟨260502624134541010214856192478225655945578886194398632264230,260502624134541011517350662463724831194700241986001687204165⟩, + ⟨-792729483550181555668675561982037608620049905606728959219755,-792729483550181555186719389292361126859567556446387002564324⟩, + ⟨-723818601032621086804246570507335175968153622930552356300834,-723818601032621085423739072759559949963651777918669321983626⟩, + ⟨-294655212234666252700040316764176499472674713475338520645066,-294655212234666252107536711812273322383377954993661675389685⟩, + ⟨-31626369499981728806467896801302291569609512230129065660740,-31626369499981727764833419614382998852406879268914965077908⟩, + ⟨29271865040488970279458761275357840087481380296533933468529,29271865040488970867023987668466806891091148288591556158050⟩] +lemma ex2b19_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 19 r = ex2b19 r := by + revert r + decide +kernel +def ex2b20 : Fin 8 → RI := ![⟨0,54⟩, + ⟨40801446328311089676365807331723162955331009909587361819308,40801446328311089773287011509521286013778407701073964699905⟩, + ⟨227265291707125868335502937762625593971632690085768317819102,227265291707125869938320146842244127134889355505711086089083⟩, + ⟨-785922978546665637340919352882833183703326568184978205404871,-785922978546665636747836107305849629768770022480015778968703⟩, + ⟨-705002389159418921008966345480688587002140821478516566636095,-705002389159418919310148250174336637951524038689865043928792⟩, + ⟨-284184049191389310513728643499784760291157857423428508665147,-284184049191389309784608484963062572892408787823196129374450⟩, + ⟨-30845631178235320596293103813071037422392635861849204769603,-30845631178235319314483695719710568661242067197954336363215⟩, + ⟨29408648667555428183335049966285173723006574632883852103074,29408648667555428906378163026452165680967056059373307196744⟩] +lemma ex2b20_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 20 r = ex2b20 r := by + revert r + decide +kernel +def ex2b21 : Fin 8 → RI := ![⟨0,76⟩, + ⟨34695367454452448107745667516136086531148098454942081395669,34695367454452448228409221097272473463248554007857815378052⟩, + ⟨191411799568059762214456231902245989644858010518586587951275,191411799568059764203049511914885374897885460623958160272184⟩, + ⟨-774652372669841366332881391226384432270386879996326185109577,-774652372669841365597051160583340578593416239565963374547540⟩, + ⟨-682244660041498279335909096312882012559889404292916002225446,-682244660041498277228208836330672527612188158513699624101290⟩, + ⟨-272493410046728913241990188355632694719735294671961383339176,-272493410046728912337380829684566368940999267538791524533819⟩, + ⟨-29746145653250532247630512437481159102336989337865216108112,-29746145653250530657307198730833928105268884523394957390017⟩, + ⟨29049809706447415953653613844352128715804137294302643439762,29049809706447416850723265735685898899807039752730990208515⟩] +lemma ex2b21_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 21 r = ex2b21 r := by + revert r + decide +kernel +def ex2b22 : Fin 8 → RI := ![⟨0,149⟩, + ⟨28879921033410577946791354667103509695368439686232763679722,28879921033410578098358988134439316195752990883416877745551⟩, + ⟨153353065833472977650574586128093590815600748430164482088988,153353065833472980140339097186363044334344255737765104332823⟩, + ⟨-759131173958638667019721616548052798612461570990922942018620,-759131173958638666098445248563977258211246014795890747237949⟩, + ⟨-655938598146721069145185672928618224558035908469945285856947,-655938598146721066506296484283450060451885058381805110801665⟩, + ⟨-259758091897268129433637631408962074809127632867357337011960,-259758091897268128301045914337907609184531507904943308347559⟩, + ⟨-28370800654771180964674204245985070349779225133432744863337,-28370800654771178973552848560918704000764806028665421798567⟩, + ⟨28244470240016279280265273421904783513828619346437977480541,28244470240016280403417104256774994948831887769539608230630⟩] +lemma ex2b22_calc (r : Fin 8) : bernsteinRowsBox 22 ex2r 22 r = ex2b22 r := by + revert r + decide +kernel +def ex2b : Fin 23 → Fin 8 → RI := ![ex2b0,ex2b1,ex2b2,ex2b3,ex2b4,ex2b5,ex2b6,ex2b7,ex2b8,ex2b9,ex2b10,ex2b11,ex2b12,ex2b13,ex2b14,ex2b15,ex2b16,ex2b17,ex2b18,ex2b19,ex2b20,ex2b21,ex2b22] +lemma ex2b_mem (l : Fin 23) (r : Fin 8) : (ex2b l r).Mem (bernsteinRows 22 (exceptionalRow 2) l r) := by + have he : bernsteinRowsBox 22 ex2r l r = ex2b l r := by + fin_cases l + · exact ex2b0_calc r + · exact ex2b1_calc r + · exact ex2b2_calc r + · exact ex2b3_calc r + · exact ex2b4_calc r + · exact ex2b5_calc r + · exact ex2b6_calc r + · exact ex2b7_calc r + · exact ex2b8_calc r + · exact ex2b9_calc r + · exact ex2b10_calc r + · exact ex2b11_calc r + · exact ex2b12_calc r + · exact ex2b13_calc r + · exact ex2b14_calc r + · exact ex2b15_calc r + · exact ex2b16_calc r + · exact ex2b17_calc r + · exact ex2b18_calc r + · exact ex2b19_calc r + · exact ex2b20_calc r + · exact ex2b21_calc r + · exact ex2b22_calc r + rw [←he] + exact bernsteinRowsBox_mem 22 ex2r_mem l r +lemma ex2b_lower (d : Fin 23) : (24/1000:ℝ) < rowLower (bernsteinRows 22 (exceptionalRow 2) d) := by + have hc : ∀ d : Fin 23, (24:ℤ)*scale < 1000*(rowLowerBox (ex2b d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (ex2b_mem d)).1 + have hnum : (24:ℝ)*(scale:ℝ) < 1000*((rowLowerBox (ex2b d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma exceptional_sign_2 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (24/1000:ℝ) < exceptionalValue 2 e τ := by + rw [←exceptionalRow_eval 2 e (polytope_one e he)] + exact polytope_polynomial_lower 22 (exceptionalRow 2) _ ex2b_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign3.lean b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign3.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f8cf2ac350baa7acceca9f7115b3aa59bb15ef1 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/ExceptionalSign3.lean @@ -0,0 +1,586 @@ +import OAI.Analysis.Triangular.Signs.ExceptionalInterval + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def ex3r0 : Fin 8 → RI := ![⟨0,2⟩, + ⟨167695340637721408578548721641744432321217624437952376082754,167695340637721408588534265479427092905836349541249313954645⟩, + ⟨443204182780754029693673892417181925227296007780297950584654,443204182780754029829157437295178296600511499167202058065690⟩, + ⟨-639156051880253779889857953268492333950128788494217157097504,-639156051880253779839725586292551166985566117972072198676269⟩, + ⟨-712474445323004927381995259631438655890946755210703768076480,-712474445323004927238396915192768467536278050409880346751405⟩, + ⟨-367144652469126348876489100074619689014916572456341467432568,-367144652469126348814857752987974905066004365817165954643726⟩, + ⟨-17285322598822961119744489334208998467930473243509031746624,-17285322598822961011395214398918903230177946761533937067429⟩, + ⟨-15202611571623647572146150827378502754079317502716951657842,-15202611571623647511028486567697256177688262581048436722919⟩] +lemma ex3r0_calc (r : Fin 8) : exceptionalRowBox 3 0 r = ex3r0 r := by + revert r + decide +kernel +def ex3r1 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-48027604673574939437677589331284790690670982381155585205201,-48027604673574939409513072704546379480440782892575523307453⟩, + ⟨1064601802368283043877914291809987419051095120304295150577081,1064601802368283044260049568004523910624532255152794403066418⟩, + ⟨-1452045065671534161772576240341445186289090993505268631398141,-1452045065671534161631176442174061172677666379391098905406916⟩, + ⟨-1596550253746712552319758679485212693278892176171016828275920,-1596550253746712551914735375272829156227521541734242251888492⟩, + ⟨-704601531219984661109945973103290091461455227530537704637027,-704601531219984660936112967314388896040001164729058496198022⟩, + ⟨-36947192144592858001132815729289875965033207381422999965296,-36947192144592857695530536573219056321384646749587059945199⟩, + ⟨2171992460129368976179542171325940388813444879883767846324,2171992460129369148563690618234307783425753549007437365047⟩] +lemma ex3r1_calc (r : Fin 8) : exceptionalRowBox 3 1 r = ex3r1 r := by + revert r + decide +kernel +def ex3r2 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-187830846892129824693054740447207046732744583884639872524836,-187830846892129824651842490035088029544517694812263035708894⟩, + ⟨-518793887356134388562662539007925375116074592974290150314989,-518793887356134388003496020992178638156818493723397789372188⟩, + ⟨-47709288296941520889272006210886396535858941958671391560052,-47709288296941520682366133565961059913953076102124651979914⟩, + ⟨277664754923994933002339721286362927206976047537374291212592,277664754923994933594997570059852897447295705908771848294997⟩, + ⟨299143305358422423336088299689879623920686793489800923112593,299143305358422423590452663874213495634782989133012584641975⟩, + ⟨-54604241957645318988606610000267844122887005795828534866744,-54604241957645318541428416884373258961495735499120567882138⟩, + ⟨140147639115247768788058419766527122034977228871092959201846,140147639115247769040302716626187231546312952487443543086381⟩] +lemma ex3r2_calc (r : Fin 8) : exceptionalRowBox 3 2 r = ex3r2 r := by + revert r + decide +kernel +def ex3r3 : Fin 8 → RI := ![⟨0,6⟩, + ⟨97308662244595875924806174957323196471391200393689601655441,97308662244595875967323943973561871556736708530408110739797⟩, + ⟨-1813423140150280602320344348560179022893866344930900878233247,-1813423140150280601743464595172526652274400690019785706406814⟩, + ⟨1567216932295968877639760006117855149064268979958084289503076,1567216932295968877853220227605686288223225661888727215694560⟩, + ⟨2068199515761444427546312992048772928417297194821362907637188,2068199515761444428157745012071125811221308241780297770498074⟩, + ⟨1050161865015706463845939616130245201437072876291204627816512,1050161865015706464108361715715409482197926621136600478910774⟩, + ⟨-21485516968739069129341076184077942155690373393859413880873,-21485516968739068667997205513050473154725022917106283855035⟩, + ⟨140345674875677735219606830320945111514632134194061138268983,140345674875677735479841703260271079409146054652127828497152⟩] +lemma ex3r3_calc (r : Fin 8) : exceptionalRowBox 3 3 r = ex3r3 r := by + revert r + decide +kernel +def ex3r4 : Fin 8 → RI := ![⟨0,6⟩, + ⟨29972019434767885298521337047097049259828142404362095698826,29972019434767885338906388184958795734521934734909760234561⟩, + ⟨429220567483274999183547111103728707858253227369367684960098,429220567483274999731490215352634125634693195206569946885191⟩, + ⟨29932854847631119009448517556111994466297111355185172386803,29932854847631119212201440856662516695253801270137505090287⟩, + ⟨-277480909720388756340436218794568792620015349164703781761346,-277480909720388755759674011217496642047134785344173705737668⟩, + ⟨-347951154093256734721138363709147544910270958390238035266553,-347951154093256734471879520738441376472869453279923234293407⟩, + ⟨116920111248591155722296981206562330124427471159457901224467,116920111248591156160499554873290157940948997008390195336237⟩, + ⟨-242625383245259161475972116925626433239584647654742696477483,-242625383245259161228790787928482316161360658867759156836658⟩] +lemma ex3r4_calc (r : Fin 8) : exceptionalRowBox 3 4 r = ex3r4 r := by + revert r + decide +kernel +def ex3r5 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-35583905463184804116694583397980540391755120570379980079352,-35583905463184804082032817412334249921470850905986034456681⟩, + ⟨1562950774305063028165674638553318394372028028105085821098713,1562950774305063028635964389771936093603831785347223477665981⟩, + ⟨-1124416565887139660778578613624142362937129483421583563298510,-1124416565887139660604559411419308389043515731540722637482531⟩, + ⟨-1649976103318956189673377565430210495096581431118207435853724,-1649976103318956189174919765709887663129030096683466149698440⟩, + ⟨-914644439610872934398864916710042201402110486601079051106902,-914644439610872934184930516705299880852170846330843067660857⟩, + ⟨84871036549442499945562484669463458203710795895486659242239,84871036549442500321663904254656540306557913867493148793244⟩, + ⟨-233523382555639839847015275439784443636601008561998052136581,-233523382555639839634863968452607704754708953336826460606762⟩] +lemma ex3r5_calc (r : Fin 8) : exceptionalRowBox 3 5 r = ex3r5 r := by + revert r + decide +kernel +def ex3r6 : Fin 8 → RI := ![⟨0,6⟩, + ⟨6357610253984040286620402382157206534190197222985107312662,6357610253984040313646550151971809985805244927938045780757⟩, + ⟨-760831248662747770720681383635555598508768064523750846715347,-760831248662747770353991460330379531874921654033856817800632⟩, + ⟨368256656820670795860054115791234252071689321082743595287457,368256656820670795995738739458637337073598676952779381574499⟩, + ⟨704780789592037727294398589269276982901349707048112787453345,704780789592037727683051439720494981585340128963562585026730⟩, + ⟨508106441919911411135407773350349335599820161925987178950570,508106441919911411302214701471250390647115512796806152926442⟩, + ⟨-125857715495204121811711143785782067930985695961442276127160,-125857715495204121518460864891655206695389126266567441496780⟩, + ⟨258034138123923437544403752157198757267843868727005804039070,258034138123923437709820383685089257782010485084339572914647⟩] +lemma ex3r6_calc (r : Fin 8) : exceptionalRowBox 3 6 r = ex3r6 r := by + revert r + decide +kernel +def ex3r7 : Fin 8 → RI := ![⟨0,6⟩, + ⟨17130843810765337318154432666423552710877821796258852624960,17130843810765337337713447477380805978037581223771351454222⟩, + ⟨-807021003063824529230708413850523489129954427515572448707639,-807021003063824528965332315785049396608949074830212887333848⟩, + ⟨565219880378954504665811024528186037506678587600255039282769,565219880378954504764006948951911123173367543679096002937882⟩, + ⟨839753604996913414210229104902879542655603001956311706961149,839753604996913414491499929104255492209303428329760229292753⟩, + ⟨488211036698902826057289350087678208930344018222638618441477,488211036698902826178008706963140315755741244973158136605791⟩, + ⟨-66716440164030581520903537171159569725158707832179365802376,-66716440164030581308676230597630945865309279812736215240565⟩, + ⟨162066415764463315280327413370582239414116045017122644757032,162066415764463315400040602744514379421943801754209770358796⟩] +lemma ex3r7_calc (r : Fin 8) : exceptionalRowBox 3 7 r = ex3r7 r := by + revert r + decide +kernel +def ex3r8 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-18478578772121880191772304153542602695359939243669210811482,-18478578772121880178905692370035789572381976852392373288206⟩, + ⟨753721076204392351687251791997485846590262500562096504329209,753721076204392351861825576179036087843869530652276270321390⟩, + ⟨-468650852623439972883266775904659546035060161133242173907409,-468650852623439972818670023436576793875096215104202662453221⟩, + ⟨-749931753210251310285329028600094622770003880820786434053092,-749931753210251310100299131338962275078215824219547750240148⟩, + ⟨-476264454154756142396796782472588784780696361193862581818763,-476264454154756142317383319440007951350343599667124435111599⟩, + ⟨100813626417061551247057510193163129454699777858461975740336,100813626417061551386668139355477677977779886229446661187792⟩, + ⟨-209966798603506066752392846178469500321851440134524563874978,-209966798603506066673641275717439100080932866259514141391365⟩] +lemma ex3r8_calc (r : Fin 8) : exceptionalRowBox 3 8 r = ex3r8 r := by + revert r + decide +kernel +def ex3r9 : Fin 8 → RI := ![⟨0,6⟩, + ⟨1681371665196989824842027136989000437014286163888986034210,1681371665196989832412910493565857850843726936133424470056⟩, + ⟨94758346901593041559812405631693524261585482649780496895025,94758346901593041662533913001975654397349573493836353246727⟩, + ⟨-53332665770060703160051908632491784213267938562615601566710,-53332665770060703122042331101674674163295582361468538057323⟩, + ⟨-91759285258583615985725025758832429280185492402542446332349,-91759285258583615876851004127642819173713715959769587444016⟩, + ⟨-64456013557203358116757227823447697267430235916874682910143,-64456013557203358070029303201874003988412739707574353370741⟩, + ⟨11579735686297378142132286359366099339386572253136427737079,11579735686297378224281014129664538459035305743276542386594⟩, + ⟨-29671876685869790326948469682471298670462558397357802633359,-29671876685869790280610011342567821264647135599215207001109⟩] +lemma ex3r9_calc (r : Fin 8) : exceptionalRowBox 3 9 r = ex3r9 r := by + revert r + decide +kernel +def ex3r10 : Fin 8 → RI := ![⟨0,6⟩, + ⟨8050670850921024279120311926422252470665341676385261945939,8050670850921024283307935026452062403827457466838177538327⟩, + ⟨-361509961538826564260230687029496782860814910750303712717150,-361509961538826564203413148457994793452424788028558275462780⟩, + ⟨210534237399448214931069496346312834263966068051461270119890,210534237399448214952093434689109796251241152186418845927326⟩, + ⟨351322842924772279425554167253269341269885850807628539537091,351322842924772279485774797594732854227210746893709764568100⟩, + ⟨236079724375700232462453468043008149267704815242007292069798,236079724375700232488299717066290894416310092462280856315238⟩, + ⟨-57362234413829343124371401858540218006080784555590417595778,-57362234413829343078933122882698062495690250389860250380500⟩, + ⟨117626823260049608662013419245645436739737599609356943081365,117626823260049608687644245851221858268521871142589869039731⟩] +lemma ex3r10_calc (r : Fin 8) : exceptionalRowBox 3 10 r = ex3r10 r := by + revert r + decide +kernel +def ex3r11 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-3960469476026999074391421096278398199384929735260948800413,-3960469476026999072236383654137166707074410269623183683299⟩, + ⟨134938879558435763708592935413561175024821121476308336534393,134938879558435763737832415678830467098092449063307946656562⟩, + ⟨-77319032261821457858749773932475934123298063946219653083799,-77319032261821457847930420512285746151691703697804392531444⟩, + ⟨-129971363891628868391657453178527235685870806491822123886060,-129971363891628868360666671516712646237662826344871243872028⟩, + ⟨-88191071722443458436991124813979488362867910339595220554166,-88191071722443458423690110598199410866882248675315723533993⟩, + ⟨24714095581005254746834495993638654345998353768156813268798,24714095581005254770217973962043091740410173512237152980535⟩, + ⟨-47508754354878137288704111717029233628403032011685187667718,-47508754354878137275513958332029749621449978785374507831250⟩] +lemma ex3r11_calc (r : Fin 8) : exceptionalRowBox 3 11 r = ex3r11 r := by + revert r + decide +kernel +def ex3r12 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-1827504376483544057463586907835807352839399652511819014026,-1827504376483544056463500182247328884298055044979279644780⟩, + ⟨51716057089445333899261391459380642822186613960085235768214,51716057089445333912830536711596976569083020165628990258335⟩, + ⟨-30973272205330132766257469282244600243158589336951700656330,-30973272205330132761236539472224988666636211127680368855803⟩, + ⟨-51004477863966781967901854129559598769030894698041289250445,-51004477863966781953519983657383022060132688320185980826843⟩, + ⟨-33613050415140605770743060294871691924643734152815500526844,-33613050415140605764570467887002927433497199699020218329719⟩, + ⟨6219829018426931519499804888435924678040901453257305682202,6219829018426931530351359231302286974839432397715405572637⟩, + ⟨-14541202801071977149138104458500536144204002343921003156800,-14541202801071977143016959159189040117761416137236525684290⟩] +lemma ex3r12_calc (r : Fin 8) : exceptionalRowBox 3 12 r = ex3r12 r := by + revert r + decide +kernel +def ex3r13 : Fin 8 → RI := ![⟨0,6⟩, + ⟨2322258395638019777231043641713042567724834344427605893392,2322258395638019777667432128362008583125222241426567430851⟩, + ⟨-75989922667556251836578267127441926277055283474255348714925,-75989922667556251830657361859704536547661765210269634420445⟩, + ⟨44455600508197070476663310497709541669122175920410221697752,44455600508197070478854196453196669464834360410916384829671⟩, + ⟨74002548568137220860990830231492091197365407208993256966775,74002548568137220867266368672258483470044460991425537167773⟩, + ⟨49523129589484330493604280212994650072047280875667611786926,49523129589484330496297694884588240145696638402020989006966⟩, + ⟨-11722164761081708027240862972383764448512801332446090127923,-11722164761081708022505780247744881466362210614467187736630⟩, + ⟨24260234711480004007190972045289207531609407690998360709373,24260234711480004009861937737940900850398447818610860077722⟩] +lemma ex3r13_calc (r : Fin 8) : exceptionalRowBox 3 13 r = ex3r13 r := by + revert r + decide +kernel +def ex3r14 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-354865026232564572464937470829098517511621930366760160905,-354865026232564572284248350281934590553543481787270118091⟩, + ⟨41318655904708300134101742840889208591832717182862536411612,41318655904708300136553327147994559681775168688221359091886⟩, + ⟨-24025265081241462898588613281551468654168400308952546467357,-24025265081241462897681464562859524693223549518814223335102⟩, + ⟨-40106084110484658911733527379798209592989917887347804127706,-40106084110484658909135105202052642142665183830182620327067⟩, + ⟨-26944609618903034369492354870130118374631489095020423465772,-26944609618903034368377131294880468570779361259081157963168⟩, + ⟨6746594484991364132327703837766617103681876423297931412858,6746594484991364134288291615421733354168752878282146715060⟩, + ⟨-13603342862338514630764227473246212166586624327568804554987,-13603342862338514629658299024669026629219940944534590807792⟩] +lemma ex3r14_calc (r : Fin 8) : exceptionalRowBox 3 14 r = ex3r14 r := by + revert r + decide +kernel +def ex3r15 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-525076524368210631459973603490944811252684202736301896434,-525076524368210631387831328341049160931072894743931082235⟩, + ⟨-14930994333890378282071689513236419070649501736865572107118,-14930994333890378281092865392001405550471587776282825414900⟩, + ⟨8642209747181979289841467036075933802520153821581381939637,8642209747181979290203656924805847756942134498857231179785⟩, + ⟨14457075021971878214456447651526950195286378904685499245646,14457075021971878215493898534761090669836185972406647285762⟩, + ⟨9737747075063827232025510061517233708906760561205662155912,9737747075063827232470776305415071054476284969528403524945⟩, + ⟨-2535600537138270582288942596103865334815548902589784019852,-2535600537138270581506154664639929298528136428104415182037⟩, + ⟨5020839310703942180693230157841884347134403427861507665487,5020839310703942181134785212134699181590767831845989908901⟩] +lemma ex3r15_calc (r : Fin 8) : exceptionalRowBox 3 15 r = ex3r15 r := by + revert r + decide +kernel +def ex3r16 : Fin 8 → RI := ![⟨0,6⟩, + ⟨188479817730004271737294273291959485800658654254686953897,188479817730004271764668747228889810984708036676910648110⟩, + ⟨4324304770353056162943982039096966803034626842720317067214,4324304770353056163315398040878274897497142114024247431503⟩, + ⟨-2485328656436744893403436601928085324870838120361739318462,-2485328656436744893266003208697142128977882442318074899898⟩, + ⟨-4171292614660591204073767876441808214277583476261038726821,-4171292614660591203680105878605938502286818596355781045640⟩, + ⟨-2814624274337248519715460668520550645278432509557215474218,-2814624274337248519546503851408203271848967547458199354206⟩, + ⟨763313687708402334855838936662068053615315655266301534133,763313687708402335152868768109476893725765335369986814304⟩, + ⟨-1483142630205177437842211668982219408283619177201765895125,-1483142630205177437674663067273430380305570960229855095360⟩] +lemma ex3r16_calc (r : Fin 8) : exceptionalRowBox 3 16 r = ex3r16 r := by + revert r + decide +kernel +def ex3r17 : Fin 8 → RI := ![⟨0,6⟩, + ⟨206199378105461282562037459407578756360812607376771612246,206199378105461282571729659482988906516144453763359610115⟩, + ⟨-1243422301934163006737338848066974212959700454642160153189,-1243422301934163006605835382145880227785553754670536871620⟩, + ⟨704142040481942798657237841683694834929946487427859348458,704142040481942798705897477931147896136330009123983422468⟩, + ⟨1190172240856520115550922801737729480954807244546773760214,1190172240856520115690302680010504059232741051857210254630⟩, + ⟨802786771809396042385201200007802758330220732629617955996,802786771809396042445022012613363620616943458516168152250⟩, + ⟨-227712569283726139973847956848429496652972549855543336906,-227712569283726139868681641638622806984792641415386121298⟩, + ⟨433320204997365384099591478180989385232597306497626922734,433320204997365384158913698358007061048048127358230007426⟩] +lemma ex3r17_calc (r : Fin 8) : exceptionalRowBox 3 17 r = ex3r17 r := by + revert r + decide +kernel +def ex3r18 : Fin 8 → RI := ![⟨0,6⟩, + ⟨-223354487872561140798729520030336540378881834694211684683,-223354487872561140795634956456856438177904268362487717826⟩, + ⟨432862792994119944145313723225281374252658541333903752489,432862792994119944187300664503787270366129918941381240991⟩, + ⟨-240387063035172140686119451600477266199729907763651697083,-240387063035172140670583212494955308965145332216345627457⟩, + ⟨-410185141277562513998263844688926971133011490215293814687,-410185141277562513953762091648016514909661167240561524388⟩, + ⟨-275763695791826195376547558811828255867460276380736181360,-275763695791826195357447735635996605104968492377789940345⟩, + ⟨80646791742687690940138250328127458201887850111521216307,80646791742687690973716163049005836705910256187286944553⟩, + ⟨-151326022881363595932214817092902341772891887539849589145,-151326022881363595913274186459048617759515322102491678781⟩] +lemma ex3r18_calc (r : Fin 8) : exceptionalRowBox 3 18 r = ex3r18 r := by + revert r + decide +kernel +def ex3r19 : Fin 8 → RI := ![⟨0,6⟩, + ⟨77604384639024005965440430985163014513169332827650291721,77604384639024005966399101994921197266654121077055907457⟩, + ⟨-172086842293135040203391594666772777373768963853076989481,-172086842293135040190384376544944228130183772464148878038⟩, + ⟨94327685105811056871949979310435303382676628618443335807,94327685105811056876762981750835420280861522121676886551⟩, + ⟨161996186824565880429111679789332637089024312105330813190,161996186824565880442897966453257709572715727127102439178⟩, + ⟨108532243081624435295848117631694055005119653977236617853,108532243081624435301765089875241537046124684730206779824⟩, + ⟨-31985415663196073787598064611127356957012983737881389845,-31985415663196073777195896185969694023464365755790350748⟩, + ⟨59809716187104523050703753884863226714228584976120629573,59809716187104523056571409553928149553737085048741782910⟩] +lemma ex3r19_calc (r : Fin 8) : exceptionalRowBox 3 19 r = ex3r19 r := by + revert r + decide +kernel +def ex3r20 : Fin 8 → RI := ![⟨0,6⟩, + ⟨10832132047355004594684674059112874811106728265251071329,10832132047355004595019753131506451616470178103930698201⟩, + ⟨65598395799182312326777020381488735974161603088511849933,65598395799182312331323362701553694392113495204897875165⟩, + ⟨-35742965129643760326877513362893445806636392568417052779,-35742965129643760325195250754823270033089524419584841289⟩, + ⟨-61567222320052599995005978992277893064478606355190964096,-61567222320052599990187333075087818740487739844439860520⟩, + ⟨-41163462366596004195241278525314756524031188446739231875,-41163462366596004193173151346579787873966333150286824220⟩, + ⟨12114917789523031523141180404489611917724187345776632991,12114917789523031526776993849670228047187736803339551507⟩, + ⟨-22669361508489273562944684892547326558475643871750999133,-22669361508489273560893795068298835967647340299557752990⟩] +lemma ex3r20_calc (r : Fin 8) : exceptionalRowBox 3 20 r = ex3r20 r := by + revert r + decide +kernel +def ex3r21 : Fin 8 → RI := ![⟨0,4⟩, + ⟨-48992977558505050709398346381133392794008159465532037920,-48992977558505050709301642847997990075819155988110961165⟩, + ⟨-19349895289999115752341162083287922207945550859273819590,-19349895289999115751029091585859557965464369589841532071⟩, + ⟨10511965560515099064410587388885218396580217132150402623,10511965560515099064896086935902202519622333808883937025⟩, + ⟨18133751333815443550927384254649331333798751488569667702,18133751333815443552318041336848194564437902034048297706⟩, + ⟨12109328622309017969576620918834075779355225270303543292,12109328622309017970173480650265177008744204134808747427⟩, + ⟨-3556916814209081259682600215465577041846812603568657698,-3556916814209081258633307571020171364237955868784785461⟩, + ⟨6661552870959294451264988718950649920197690583571280960,6661552870959294451856873764649107354094289562714524154⟩] +lemma ex3r21_calc (r : Fin 8) : exceptionalRowBox 3 21 r = ex3r21 r := by + revert r + decide +kernel +def ex3r22 : Fin 8 → RI := ![⟨0,2⟩, + ⟨-32738371894476709809509337697936201634614858014658122339,-32738371894476709809490087105100843560370444533595356652⟩, + ⟨10883040173460042234116393541451935377535615597864109430,10883040173460042234377584979844500984622232190557329382⟩, + ⟨-5917706646138368128695988930689199272806764318506701947,-5917706646138368128599341437072930238802613251305548478⟩, + ⟨-10203930988021550245739457543559762826153818446593627441,-10203930988021550245462622019613260120882764262408059958⟩, + ⟨-6818386692787811254179034565870354246251668656114741800,-6818386692787811254060218807055078478995553437724776769⟩, + ⟨2002525905641920967559531738264494907645025420295326484,2002525905641920967768412477245063114872381683441454312⟩, + ⟨-3752247592010364693050619874864475974676000653062721417,-3752247592010364692932794417503737006791958244977074487⟩] +lemma ex3r22_calc (r : Fin 8) : exceptionalRowBox 3 22 r = ex3r22 r := by + revert r + decide +kernel +def ex3r : Fin 23 → Fin 8 → RI := ![ex3r0,ex3r1,ex3r2,ex3r3,ex3r4,ex3r5,ex3r6,ex3r7,ex3r8,ex3r9,ex3r10,ex3r11,ex3r12,ex3r13,ex3r14,ex3r15,ex3r16,ex3r17,ex3r18,ex3r19,ex3r20,ex3r21,ex3r22] +lemma ex3r_mem (l : Fin 23) (r : Fin 8) : (ex3r l r).Mem (exceptionalRow 3 l r) := by + have he : exceptionalRowBox 3 l r = ex3r l r := by + fin_cases l + · exact ex3r0_calc r + · exact ex3r1_calc r + · exact ex3r2_calc r + · exact ex3r3_calc r + · exact ex3r4_calc r + · exact ex3r5_calc r + · exact ex3r6_calc r + · exact ex3r7_calc r + · exact ex3r8_calc r + · exact ex3r9_calc r + · exact ex3r10_calc r + · exact ex3r11_calc r + · exact ex3r12_calc r + · exact ex3r13_calc r + · exact ex3r14_calc r + · exact ex3r15_calc r + · exact ex3r16_calc r + · exact ex3r17_calc r + · exact ex3r18_calc r + · exact ex3r19_calc r + · exact ex3r20_calc r + · exact ex3r21_calc r + · exact ex3r22_calc r + rw [←he] + exact exceptionalRowBox_mem 3 l r +def ex3b0 : Fin 8 → RI := ![⟨0,25⟩, + ⟨167695340637721408578548721641744432321217624437952376082743,167695340637721408588534265479427092905836349541249313954668⟩, + ⟨443204182780754029693673892417181925227296007780297950584643,443204182780754029829157437295178296600511499167202058065715⟩, + ⟨-639156051880253779889857953268492333950128788494217157097519,-639156051880253779839725586292551166985566117972072198676245⟩, + ⟨-712474445323004927381995259631438655890946755210703768076495,-712474445323004927238396915192768467536278050409880346751380⟩, + ⟨-367144652469126348876489100074619689014916572456341467432581,-367144652469126348814857752987974905066004365817165954643702⟩, + ⟨-17285322598822961119744489334208998467930473243509031746636,-17285322598822961011395214398918903230177946761533937067406⟩, + ⟨-15202611571623647572146150827378502754079317502716951657854,-15202611571623647511028486567697256177688262581048436722896⟩] +lemma ex3b0_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 0 r = ex3b0 r := by + revert r + decide +kernel +def ex3b1 : Fin 8 → RI := ![⟨0,25⟩, + ⟨165512267698013456785927013035776941835278034329718031300689,165512267698013456797192762174674984747634495773404971986147⟩, + ⟨491595173797494168051760905681272262456891240521402275610873,491595173797494168204614235840838474356172056219601803659642⟩, + ⟨-705158100319868969061338691465830751508723833653547549433797,-705158100319868969004779060936826674834550953398940330740195⟩, + ⟨-785044911402400952487438835971675596494532763218477260270854,-785044911402400952325430341341533429182983575034164085473584⟩, + ⟨-399171994797307469836032098852041965899528173707729544916082,-399171994797307469766499251502265309431458964213941340834521⟩, + ⟨-18964740423577181937977799140085811011795619033573713563240,-18964740423577181815737511515883405790240885250151530701279⟩, + ⟨-15103884641617767164137989819590960009133251826358598573931,-15103884641617767095184682448686605823896182874275371388122⟩] +lemma ex3b1_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 1 r = ex3b1 r := by + revert r + decide +kernel +def ex3b2 : Fin 8 → RI := ![⟨0,25⟩, + ⟨162516074208988925665629742782851845086426130005532864559652,162516074208988925678354105233407343994001829473905811681223⟩, + ⟨537740303830008616416070159036237381612390912253959890029680,537740303830008616588713908754497878786478420658480346702176⟩, + ⟨-771366682475055333647924503283129716238469783323521540867739,-771366682475055333584041912782686429696150304306770041384147⟩, + ⟨-856413365555719077450015140791192351266053939851630084537888,-856413365555719077267030877576619373957622884481353573770270⟩, + ⟨-429904344461599316235678611483620608048552386242711557797365,-429904344461599316157143119437013664032260822398019702849402⟩, + ⟨-20880540248148049158759189508734345824591011601975315444202,-20880540248148049020692052861784589125028913502834581338971⟩, + ⟨-14398457975182242735402303185108494657975163514194648264025,-14398457975182242657521386049908911177695821987902983356004⟩] +lemma ex3b2_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 2 r = ex3b2 r := by + revert r + decide +kernel +def ex3b3 : Fin 8 → RI := ![⟨0,25⟩, + ⟨158769947613663786565660031775798572721721256400717453523046,158769947613663786580049024489373236795299867985953396748171⟩, + ⟨580462025384693296473406623684310932678928876000742936127924,580462025384693296668636024480849674402940721905902761409932⟩, + ⟨-836764125013153153599199960144988023497117112192478037704861,-836764125013153153526960102721295570344245192993036183065438⟩, + ⟨-925236821084412909784304490328918288433810741477161355872635,-925236821084412909577381806357720376008753570802240826076177⟩, + ⟨-458659778173030650111892313543297014681835266635124386188235,-458659778173030650023082628405391780892956741264766884533206⟩, + ⟨-23046673706930847891912907892222185985638527814554005840095,-23046673706930847735783511946695862632694450365633157995973⟩, + ⟨-12995198017202997834497787787359064420400745985579606482508,-12995198017202997746428310551065294914795526639689631179465⟩] +lemma ex3b3_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 3 r = ex3b3 r := by + revert r + decide +kernel +def ex3b4 : Fin 8 → RI := ![⟨0,25⟩, + ⟨154341172691955551214786349005470765511156432837797346749115,154341172691955551231079118728910240415456023654080105626667⟩, + ⟨618641467737251481243341305976202810167661985909249375424861,618641467737251481464401093394231951776622704311508499299176⟩, + ⟨-900328662618611713496463994580918192224854258433191327635181,-900328662618611713414666235329279705475246340483679754857257⟩, + ⟨-990210224428653813499260466198874309895634727038852787189720,-990210224428653813264960282189809729805103716107131756170646⟩, + ⟨-484803939444283446998706414215909255907112177126390725379623,-484803939444283446898146508601670370380741897574658767083400⟩, + ⟨-25461108823760563704444022387701458343210908860983246721486,-25461108823760563527657478267720944644002225142969388444391⟩, + ⟨-10836139412599484261722849596664082441118827950046344355791,-10836139412599484162001087216331039972853248558858848962606⟩] +lemma ex3b4_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 4 r = ex3b4 r := by + revert r + decide +kernel +def ex3b5 : Fin 8 → RI := ![⟨0,25⟩, + ⟨149299780307342982180349274886355829275113667254475632234265,149299780307342982198824935252825952526035090463060577297988⟩, + ⟨651277787991184911620634186373602127156719897055306888034979,651277787991184911871311365413489576710071697221067143096252⟩, + ⟨-961077136275281667543266035207256700471114684137420391784677,-961077136275281667450509085693795898305536390112189725287455⟩, + ⟨-1050129110901488992040021769934314653090806860686231938637390,-1050129110901488991774330257869274600688588108488101947897965⟩, + ⟨-507784771043540046870778219406355513222833110699059037199177,-507784771043540046756745388024911047732415573080885538931867⟩, + ⟨-28102607142748464890609601106867728347895331653118108052276,-28102607142748464690137354707632327655856027885711147481019⟩, + ⟨-7905352758377375918885749329922467735700967126777580042998,-7905352758377375805803354859247083730285487637665262152471⟩] +lemma ex3b5_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 5 r = ex3b5 r := by + revert r + decide +kernel +def ex3b6 : Fin 8 → RI := ![⟨0,26⟩, + ⟨143717281361334817627065230531849858543897248668604728412345,143717281361334817648051377605625029721893910621938993987499⟩, + ⟨677537325102944037362851418374640590929751681243024275135585,677537325102944037647590802137893624822891315914265610170011⟩, + ⟨-1018102755992479660452423183161424465057766715033946580140505,-1018102755992479660347062349178117252855788766555281523594649⟩, + ⟨-1103942814605386125345933124231649303797914975813651021670277,-1103942814605386125044139248513818644883296133920921336632697⟩, + ⟨-527160437556730719070452709259472136115561350285656034209280,-527160437556730718940925010485156412968137479859858987805790⟩, + ⟨-30929187665915023236914525471729132807873147455541207908369,-30929187665915023009201958575836035969724008043823855812064⟩, + ⟨-4234354055678261527401388169742550584633012201935012470622,-4234354055678261398953272392279263257171151377907974420683⟩] +lemma ex3b6_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 6 r = ex3b6 r := by + revert r + decide +kernel +def ex3b7 : Fin 8 → RI := ![⟨0,26⟩, + ⟨137665586403982633074414412368637993821476027342945864274561,137665586403982633098297795547554814297763777557083119767770⟩, + ⟨696787824833893917936153903522415195896648429253129043282125,696787824833893918260202895680707521957440798157277336651800⟩, + ⟨-1070604613757494902638699252468222994440761010094122071220555,-1070604613757494902518792860826829563837427422556011870712208⟩, + ⟨-1150793308560781569460051687793569439412884758780649071983349,-1150793308560781569116593751018916254465821164817979951784171⟩, + ⟨-542617575389095077617500241209457304536347549878951807927211,-542617575389095077470090635662201214205144008814525167685171⟩, + ⟨-33878668795434188941225581912816081504581668451865665727431,-33878668795434188682076226353996135903281930605468134747667⟩, + ⟨96894429100137090211152586085556315821673970507356613922,96894429100137236392133637056905469237601770986906113899⟩] +lemma ex3b7_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 7 r = ex3b7 r := by + revert r + decide +kernel +def ex3b8 : Fin 8 → RI := ![⟨0,26⟩, + ⟨131216153561579826777772514812940621502309303583439313050459,131216153561579826805012494915345178810799310775652786774799⟩, + ⟨708615360661761323205370322752741943945312814296388078968451,708615360661761323574961516448528489299082598442275763996553⟩, + ⟨-1117907098084512722077831901536167635512411944096541158280218,-1117907098084512721941073733818008300283635845076740763682668⟩, + ⟨-1190037096298606478507065653407229507471484501706136355809632,-1190037096298606478115337760685710907777361710022207844295830⟩, + ⟨-553978496933894055515042902683214247883539713202164124553637,-553978496933894055346916189147000209719516180844385378558990⟩, + ⟨-36871364209121757265480032478390813283617995281786865525979,-36871364209121756969909541644061172889142231218035137182630⟩, + ⟨4963685566849734480154645495997971470382328880376153463150,4963685566849734646880062299389920155299543537576288250149⟩] +lemma ex3b8_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 8 r = ex3b8 r := by + revert r + decide +kernel +def ex3b9 : Fin 8 → RI := ![⟨0,26⟩, + ⟨124439353035780664720841505173401310571945598173701350316986,124439353035780664751987141916919408450799035911081273055679⟩, + ⟨712824123256409689807893081469255049178767143241573683847319,712824123256409690230476101690541434916554171628161181897443⟩, + ⟨-1159468934335814849020467868649692098291226164643030603021158,-1159468934335814848864101373614082317153649516320680644199001⟩, + ⟨-1221250105861560537367420641778992229998665583646282945196105,-1221250105861560536919526972139129522271059329939184086772388⟩, + ⟨-561197594613695756106840005927541030968814805409631674296924,-561197594613695755914607356455168398825867625042092931192704⟩, + ⟨-39814670049024208384318000823500060047719909683004044533594,-39814670049024208046368740030070817944172516933132110836655⟩, + ⟨10204548434954994511875100499352404757760794379913804159462,10204548434954994702505535916352848087593640540625925935956⟩] +lemma ex3b9_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 9 r = ex3b9 r := by + revert r + decide +kernel +def ex3b10 : Fin 8 → RI := ![⟨0,27⟩, + ⟨117403997851539245630045302866296166643352952478572616665484,117403997851539245665757201479858699131423688194186254711559⟩, + ⟨709421430142752147298483548316495847039272303525501908090818,709421430142752147783021466041998209274823054028932035129248⟩, + ⟨-1194882929436766887691807440799378192234755283695134308962336,-1194882929436766887512516053590183431776005571014882737559380⟩, + ⟨-1244217708022026308739127179422863488256861848576541585348510,-1244217708022026308225567817913718852477176675017717645438334⟩, + ⟨-564348573974502106882897885049945631384360123268295897104211,-564348573974502106662482006425441643891535005723729616603632⟩, + ⟨-42609007681915150933983252631142065159929398273525662900198,-42609007681915150546487249984647994387832379197442434214578⟩, + ⟨15632492437806152244253783244603960150712483261559058031692,15632492437806152462832547208699102840340912924213288482843⟩] +lemma ex3b10_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 10 r = ex3b10 r := by + revert r + decide +kernel +def ex3b11 : Fin 8 → RI := ![⟨0,28⟩, + ⟨110176974620150054919394210232442354462332187305621859725125,110176974620150054960472652857750692133793700128340606118204⟩, + ⟨698591749868921986595001732537699851205531342835976176710873,698591749868921987152352750707548231023421131375900211384357⟩, + ⟨-1223868419717930482457473140151741082782259144368338116598330,-1223868419717930482251239048753711608863175254271566584753903⟩, + ⟨-1258913433501504803027841340865981716266953413618422223517740,-1258913433501504802437107731469649804510432529092089545010531⟩, + ⟨-563605052918790031631219721860914653903969631882473453754288,-563605052918790031377681226982452854568677308108199531447632⟩, + ⟨-45154432270518446975955212980074440432080626161610401506841,-45154432270518446530228916416815269692552965143934630297566⟩, + ⟨21048140652271973536379754321338291104083223050613262288124,21048140652271973787805065301620552726586639801914533465028⟩] +lemma ex3b11_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 11 r = ex3b11 r := by + revert r + decide +kernel +def ex3b12 : Fin 8 → RI := ![⟨0,28⟩, + ⟨102822913233536382300788116724058654529690618692154949920831,102822913233536382348209553917450727468262096660009301270736⟩, + ⟨680664144863330774228175910497033187314990247588303057873648,680664144863330774871588479562890086250848927221625904896837⟩, + ⟨-1246258847925618783497674102614529036555983958953457501721110,-1246258847925618783259595042472348160904447164722194277932408⟩, + ⟨-1265470603129912043327486204586244410086353758485563333234611,-1265470603129912042645536379675693859134080439817594776193745⟩, + ⟨-559217433431734717112547342154104814214517625930470600355383,-559217433431734716819859522399613251811393868519646938839908⟩, + ⟨-47357191496097549205838333714978710563150034199477778325685,-47357191496097548691286655825421149732889741390895183590716⟩, + ⟨26253282889887261862674891244635244587541331867178583289725,26253282889887262152923226660723963229419477656446040139379⟩] +lemma ex3b12_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 12 r = ex3b12 r := by + revert r + decide +kernel +def ex3b13 : Fin 8 → RI := ![⟨0,30⟩, + ⟨95403852414150985671680502929686380478066574937487972590950,95403852414150985726645250487235245004230865526689201651413⟩, + ⟨656077416161817013982235107742626062184272264085857133950644,656077416161817014727995074691154576962285294279734110434477⟩, + ⟨-1261986887505874999165706301972970373925722234971041703946803,-1261986887505874998889756094347708631483523220702419233373075⟩, + ⟨-1264151007497345430216159241610421273410445425700434123917141,-1264151007497345429425731911874925321250696805543483080501910⟩, + ⟨-551488849135221524478315628150537561432239623981430638900281,-551488849135221524139070065848123489082170600299252646639489⟩, + ⟨-49135599312170087159457173730395024816001933304366957184773,-49135599312170086563055951953588269867867794852587542724652⟩, + ⟨31063505987370148223431264929265380128314533661044277185756,31063505987370148559849295029918954443443106908277757417336⟩] +lemma ex3b13_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 13 r = ex3b13 r := by + revert r + decide +kernel +def ex3b14 : Fin 8 → RI := ![⟨0,30⟩, + ⟨87978879512234239220350541349517876107069337624366929028562,87978879512234239284345616413547686928552642578894695145814⟩, + ⟨625346585399841496096009354001243543082175688389914041467475,625346585399841496964292520671903415641648072917610524101812⟩, + ⟨-1271069206961843318886379021196604567925926975617777929398695,-1271069206961843318565092104844523606757919758078605558239206⟩, + ⟨-1255314175983632095900022518987103314819905408289373635967947,-1255314175983632094979733451054507266985805724818212010397256⟩, + ⟨-540752549587925828508072192211168370651701037558285732343833,-540752549587925828113090932599684238872862280022317177443826⟩, + ⟨-50424740610746679199768329832596339982858190521754837887866,-50424740610746678505382516162031386787419662052561209802606⟩, + ⟨35318838698339581494427437648834512996114053789839398669875,35318838698339581886116621095705841857211125039440594117409⟩] +lemma ex3b14_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 14 r = ex3b14 r := by + revert r + decide +kernel +def ex3b15 : Fin 8 → RI := ![⟨0,31⟩, + ⟨80603742044573092037562008084119310146799215333669588037999,80603742044573092112444593852154456227913052188858860614655⟩, + ⟨589033402864245012188686365733874439356958902511565100891193,589033402864245013204690935366015996411576003670670140847151⟩, + ⟨-1273592457108341592962059784506503890728001923116053093900679,-1273592457108341592586112181574764266604986409657112724105477⟩, + ⟨-1239389880384777043331690841856572616174915893657706884334678,-1239389880384777042254832583754674243777661923370417005167567⟩, + ⟨-527352448859259881332155713301710895749359196841973260403166,-527352448859259880869976115578532479698588254091819701643286⟩, + ⟨-51179706533699125725966159588413459766519226095314133692768,-51179706533699124913444177289611517323168247667681548900373⟩, + ⟨38891706014752038142965927375923975401546196630373847844280,38891706014752038601293366550183598079987121104966728922920⟩] +lemma ex3b15_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 15 r = ex3b15 r := by + revert r + decide +kernel +def ex3b16 : Fin 8 → RI := ![⟨0,33⟩, + ⟨73330442357779584137568963701825375935149533420868051597304,73330442357779584225678238784281405435023839257972476732158⟩, + ⟨547722528784508057966287131785472757625258395560641702402308,547722528784508059161751006227840256374418270161805031665203⟩, + ⟨-1269701488738270349406099270665031759621474724004072998751505,-1269701488738270348963747148027096980002308232676179014798948⟩, + ⟨-1216855524136669919969188106933673346824916006409766400002789,-1216855524136669918702121812222887517816312574214858666247865⟩, + ⟨-511627874140023183471116469466364147734307373865167721299475,-511627874140023182927300989602582693133354744741559920577770⟩, + ⟨-51377244907570154815651987560277378992734462144281002199365,-51377244907570153859612314053010237304665097073976139692078⟩, + ⟨41691857401012076323625772711604833096382419082097263608390,41691857401012076862908678100528503418254160036892734527386⟩] +lemma ex3b16_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 16 r = ex3b16 r := by + revert r + decide +kernel +def ex3b17 : Fin 8 → RI := ![⟨0,35⟩, + ⟨66206834693244444811236775785801446377182789490420829090531,66206834693244444915545129722131348581451590759423433914257⟩, + ⟨502004053389825756255330021691857812819113490345732349563486,502004053389825757670582488771804229296789560246360072484271⟩, + ⟨-1259590258983503986748842385272375734409261811812488115713132,-1259590258983503986225162877875263412582390031733303613485294⟩, + ⟨-1188219125833027741207251057793570162292141508602600076425393,-1188219125833027739707231912191442772952256942873193384184051⟩, + ⟨-493902900743882660485306173203774842463616435631212032514339,-493902900743882659841509053139162609106730247430759170324122⟩, + ⟨-51015873024274081620117815411713884041277482997562889058854,-51015873024274080488308201176784866670983995963960597494281⟩, + ⟨43668267163211990294325137001281621059725511381994863144766,43668267163211990932756359076806714922771998165853555700202⟩] +lemma ex3b17_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 17 r = ex3b17 r := by + revert r + decide +kernel +def ex3b18 : Fin 8 → RI := ![⟨0,39⟩, + ⟨59276248417680569620561271625382063237213295561919802555215,59276248417680569744880799877076824481506407071247756187738⟩, + ⟨452462201520701980565512127655617098187537645182184366977361,452462201520701982252275578752416220320943910151683972952319⟩, + ⟨-1243495422224210842830925739851348022663700468130332263530654,-1243495422224210842206780243758633308378573559380911509205394⟩, + ⟨-1154007815481304868557608182182074698925344107090788344600282,-1154007815481304866769815876854696858199332078144630241834484⟩, + ⟨-474480118892020904925471865448378867343204016797953130631972,-474480118892020904158164634196942241900897173429252770676401⟩, + ⟨-50114626956085066761057549558865525524532434688991191885044,-50114626956085065412114420817180443450963936830925905521346⟩, + ⟨44808272876371359493457409511617133378063392745822483279641,44808272876371360254369314975682096293001793760380804749213⟩] +lemma ex3b18_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 18 r = ex3b18 r := by + revert r + decide +kernel +def ex3b19 : Fin 8 → RI := ![⟨0,45⟩, + ⟨52577156511565277975704394217951328974274932603913301252738,52577156511565278124971908053557087304947271601978005934013⟩, + ⟨399669457949601945229253945816583714595377100346045963937814,399669457949601947254510881021291822087936720894725593253464⟩, + ⟨-1221692255400759992197088875770711660843384699851565445720782,-1221692255400759991447692157629468534506844327580849150727669⟩, + ⟨-1114761171825805785661648525807997032973527758997061349072587,-1114761171825805783515088637575553000838796952567702786705441⟩, + ⟨-453638276282749183542241150852566245560786447855523465271472,-453638276282749182620953527208803645787081969800478421739710⟩, + ⟨-48710707897421475815541971166359330015336988139087938687545,-48710707897421474195897897825100943470031581290655164338937⟩, + ⟨45134407135687104450007597358503921677457997038387959753095,45134407135687105363616504773788501543574546643214578997163⟩] +lemma ex3b19_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 19 r = ex3b19 r := by + revert r + decide +kernel +def ex3b20 : Fin 8 → RI := ![⟨0,54⟩, + ⟨46142921925892684122072938800060873230451426338403060412789,46142921925892684302748006898795538805725274782997868903567⟩, + ⟨344184977199479675481565124351061291895616953818235737045419,344184977199479677932958768430871585930782618214954244041446⟩, + ⟨-1194492354566902806846628290536473251573477925595612141171059,-1194492354566902805939550121933425228137278683263767555903393⟩, + ⟨-1071028366031257211357703907292019267050832603342006017775622,-1071028366031257208759483812267723384101942193062716640073353⟩, + ⟨-431632995546979446981464084885456520848519276070216615390131,-431632995546979445866327241905614296066619768833460326504922⟩, + ⟨-46856329559688985653484658082328845515128400346482272401516,-46856329559688983693049358210053720867674460924587493808452⟩, + ⟨44699482907735720594716174595258430075656530500069074088095,44699482907735721700558613590099061497451530991186151423552⟩] +lemma ex3b20_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 20 r = ex3b20 r := by + revert r + decide +kernel +def ex3b21 : Fin 8 → RI := ![⟨0,76⟩, + ⟨40000236449108015292776174279361773235915573904157192230413,40000236449108015513404469780633990197604163249224939697396⟩, + ⟨286555992543455156123974199621261872840729494391234354682537,286555992543455159117451977077025437590883743877293995767696⟩, + ⟨-1162242452700668664917354867823478728060913834148817927821441,-1162242452700668663809691744574920905580092297844267269152112⟩, + ⟨-1023367928557116522816125632783410110421100813507354051989825,-1023367928557116519643353224664783973050822462863794328165734⟩, + ⟨-408699668040566441583270671572889901371043952253288130142919,-408699668040566440221540226399767704426510688672537647782138⟩, + ⟨-44615075708143507400803501551896782366312127074768084193970,-44615075708143505006851180380951657223439704313738572340900⟩, + ⟨43580520466819105581714652117308766562903944974649860943287,43580520466819106932095393497326571332375006116550362922268⟩] +lemma ex3b21_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 21 r = ex3b21 r := by + revert r + decide +kernel +def ex3b22 : Fin 8 → RI := ![⟨0,149⟩, + ⟨34107955964664116176407134625054911378068429309779366839775,34107955964664116448430227454096728231635721369061183141840⟩, + ⟨227328974782491927995509990074296383878275261117626845465379,227328974782491931686310761956657993937449229178333425641910⟩, + ⟨-1125328082379809721232502947752343000016059770729835310501826,-1125328082379809719866812532064260045651459341976206778215567⟩, + ⟨-972356491384937107132414575036546830532676712763840365495290,-972356491384937103220552946715801768934703769593070084150885⟩, + ⟨-385062668304170892669301408898310137685241749099016400897075,-385062668304170890990359338261820895197546680870741856389116⟩, + ⟨-42056577033882973166364063205960005719158109215665998499193,-42056577033882970214746669739984905386100653055238012307022⟩, + ⟨41869306153356434144963414962791808386368862355658953038167,41869306153356435809911897349370002182497275729758649079127⟩] +lemma ex3b22_calc (r : Fin 8) : bernsteinRowsBox 22 ex3r 22 r = ex3b22 r := by + revert r + decide +kernel +def ex3b : Fin 23 → Fin 8 → RI := ![ex3b0,ex3b1,ex3b2,ex3b3,ex3b4,ex3b5,ex3b6,ex3b7,ex3b8,ex3b9,ex3b10,ex3b11,ex3b12,ex3b13,ex3b14,ex3b15,ex3b16,ex3b17,ex3b18,ex3b19,ex3b20,ex3b21,ex3b22] +lemma ex3b_mem (l : Fin 23) (r : Fin 8) : (ex3b l r).Mem (bernsteinRows 22 (exceptionalRow 3) l r) := by + have he : bernsteinRowsBox 22 ex3r l r = ex3b l r := by + fin_cases l + · exact ex3b0_calc r + · exact ex3b1_calc r + · exact ex3b2_calc r + · exact ex3b3_calc r + · exact ex3b4_calc r + · exact ex3b5_calc r + · exact ex3b6_calc r + · exact ex3b7_calc r + · exact ex3b8_calc r + · exact ex3b9_calc r + · exact ex3b10_calc r + · exact ex3b11_calc r + · exact ex3b12_calc r + · exact ex3b13_calc r + · exact ex3b14_calc r + · exact ex3b15_calc r + · exact ex3b16_calc r + · exact ex3b17_calc r + · exact ex3b18_calc r + · exact ex3b19_calc r + · exact ex3b20_calc r + · exact ex3b21_calc r + · exact ex3b22_calc r + rw [←he] + exact bernsteinRowsBox_mem 22 ex3r_mem l r +lemma ex3b_lower (d : Fin 23) : (27/1000:ℝ) < rowLower (bernsteinRows 22 (exceptionalRow 3) d) := by + have hc : ∀ d : Fin 23, (27:ℤ)*scale < 1000*(rowLowerBox (ex3b d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (ex3b_mem d)).1 + have hnum : (27:ℝ)*(scale:ℝ) < 1000*((rowLowerBox (ex3b d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma exceptional_sign_3 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (27/1000:ℝ) < exceptionalValue 3 e τ := by + rw [←exceptionalRow_eval 3 e (polytope_one e he)] + exact polytope_polynomial_lower 22 (exceptionalRow 3) _ ex3b_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/FarSigns.lean b/lean/OAI/Analysis/Triangular/Signs/FarSigns.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5988dde560b4683b24e8a43f133a65bca8eb165 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/FarSigns.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.Triangular.Signs.SineGlobal +import OAI.Analysis.Triangular.Construction.FarCurvature +import OAI.Analysis.Triangular.Signs.NearSigns + +namespace OAI + +noncomputable section +open Set +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate +lemma deletedSecond_identity (f : ℝ → ℝ) (m s : ℝ) : + f s=f m+deriv f m*(s-m)+(s-m)^2*deletedSecond f m s := by + by_cases hsm : s=m + · simp [hsm] + · rw [deletedSecond,ite_eq_right hsm] + field_simp [sub_ne_zero.mpr hsm] + ring +lemma actualJ0_jets (side : Fin 2) {z : ℝ} (hz : 0 nlinarith +lemma middle_signs {z s : ℝ} (hz : 0 norm_num [residues] + have hm14 : 29/2 ≤ (m:ℝ) := by + simp only [Finset.mem_insert,Finset.mem_singleton] at hm + rcases hm with rfl|rfl|rfl <;> norm_num + apply far_signs_of_barrier hz hzB ⟨m,hn⟩ 3 hs.1 hm14 hs.1 hm14 + have hK : farK 3=(140109/10000000:ℝ) := by + change (301/100:ℝ)*(465/100000)+(3/1000000000)*800+(3/500)*(2/1000)=_ + norm_num + change farK 3*(s-m)^2 ≤ (3/500)*realP s + rw [hK] + nlinarith [sq_nonneg (s-m)] +lemma later_signs {z s : ℝ} (hz : 0 -Q 1*Real.exp ((1-t)/z) := funext fun t => (gaussianG_deriv hz t).deriv + rw [he] + have hh := ((((hasDerivAt_const s (1:ℝ)).sub (hasDerivAt_id s)).div_const z).exp.const_mul (-Q 1)) + convert hh.deriv using 1 <;> first | rfl | (simp only [Pi.sub_apply,id_eq]; ring) +lemma deletedSecond_lower {f : ℝ → ℝ} (hf : ContDiff ℝ 2 f) (m s L : ℝ) + (hb : ∀ t∈uIcc m s,L ≤ iteratedDeriv 2 f t/2) : L ≤ deletedSecond f m s := by + by_cases hms : m=s + · subst s + simpa [deletedSecond] using hb m (left_mem_uIcc) + · obtain ⟨c,hc,he⟩ := deletedSecond_eq_at_mean hf hms + rw [he] + exact hb c (Ioo_subset_Icc_self hc) +lemma gaussian_deleted_nonneg {z : ℝ} (hz : 0 first | rfl | (dsimp [pade1]; ring) +lemma pade1_deriv (x : ℝ) : HasDerivAt pade1 (x^2*Real.exp (-x)) x := by + have he := ((hasDerivAt_id x).neg).exp + have hp := (((hasDerivAt_const x (2:ℝ)).add ((hasDerivAt_id x).const_mul 2)).add ((hasDerivAt_id x).pow 2)) + have hh := (he.mul hp).const_sub 2 + convert hh using 1 <;> first | rfl | (dsimp; ring) +lemma pade1_nonneg {x : ℝ} (hx : 0 ≤ x) : 0 ≤ pade1 x := by + have hm := monotone_of_hasDerivAt_nonneg pade1_deriv (fun t => mul_nonneg (sq_nonneg t) (Real.exp_pos _).le) + have hh := hm hx + simpa [pade1] using hh +lemma pade0_nonneg {x : ℝ} (hx : 0 ≤ x) : 0 ≤ pade0 x := by + have hm : MonotoneOn pade0 (Ici 0) := monotoneOn_of_deriv_nonneg (convex_Ici 0) + (by unfold pade0; fun_prop) (fun s _ => (pade0_deriv s).differentiableAt.differentiableWithinAt) + (fun s hs => by rw [(pade0_deriv s).deriv]; exact pade1_nonneg (interior_subset hs)) + have hh := hm (mem_Ici.mpr le_rfl) (mem_Ici.mpr hx) hx + simpa [pade0] using hh +lemma pade_rational {x : ℝ} (hx : 0 first | rfl | field_simp [hz0,hv0,hd] +lemma gaussian_deleted_three {z v : ℝ} (hz : 0 linarith [hs.1,hs.2] + · norm_num only [show nearNode (0:Fin 7)=(1:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (0:Fin 7) (0:Fin 2)=(-2:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h1 : s ≤ 2 + · refine ⟨0,1,(s-1)/1,?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (0:Fin 7)=(1:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (0:Fin 7) (1:Fin 2)=(2:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h2 : s ≤ 3 + · refine ⟨1,0,(s-3)/(-1),?_,?_⟩ + · constructor <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (1:Fin 7)=(3:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (1:Fin 7) (0:Fin 2)=(-2:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h3 : s ≤ (7/2) + · refine ⟨1,1,(s-3)/(1/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (1:Fin 7)=(3:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (1:Fin 7) (1:Fin 2)=(1:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h4 : s ≤ 4 + · refine ⟨2,0,(s-4)/(-1/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (2:Fin 7)=(4:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (2:Fin 7) (0:Fin 2)=(-1:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h5 : s ≤ (11/2) + · refine ⟨2,1,(s-4)/(3/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (2:Fin 7)=(4:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (2:Fin 7) (1:Fin 2)=(3:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h6 : s ≤ 7 + · refine ⟨3,0,(s-7)/(-3/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (3:Fin 7)=(7:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (3:Fin 7) (0:Fin 2)=(-3:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h7 : s ≤ 8 + · refine ⟨3,1,(s-7)/1,?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (3:Fin 7)=(7:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (3:Fin 7) (1:Fin 2)=(2:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h8 : s ≤ 9 + · refine ⟨4,0,(s-9)/(-1),?_,?_⟩ + · constructor <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (4:Fin 7)=(9:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (4:Fin 7) (0:Fin 2)=(-2:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h9 : s ≤ (21/2) + · refine ⟨4,1,(s-9)/(3/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (4:Fin 7)=(9:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (4:Fin 7) (1:Fin 2)=(3:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h10 : s ≤ 12 + · refine ⟨5,0,(s-12)/(-3/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (5:Fin 7)=(12:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (5:Fin 7) (0:Fin 2)=(-3:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h11 : s ≤ (25/2) + · refine ⟨5,1,(s-12)/(1/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (5:Fin 7)=(12:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (5:Fin 7) (1:Fin 2)=(1:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + by_cases h12 : s ≤ 13 + · refine ⟨6,0,(s-13)/(-1/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (6:Fin 7)=(13:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (6:Fin 7) (0:Fin 2)=(-1:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring + refine ⟨6,1,(s-13)/(3/2),?_,?_⟩ + · constructor <;> norm_num <;> linarith [hs.1,hs.2] + · norm_num only [show nearNode (6:Fin 7)=(13:ℤ) by rfl,nearDisplacement,show nearDisplacementNum (6:Fin 7) (1:Fin 2)=(3:ℤ) by rfl,Int.cast_ofNat,Int.cast_neg] + ring +lemma near_signs {z s : ℝ} (hz : 0 fin_cases y + · have hh := ordinary_sign_1_0_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_0_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_1_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_1_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_2_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_2_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_3_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_3_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_4_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_4_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_5_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_5_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_6_0 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_1_6_1 e he hτ + change _ < finiteTaylor 1 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh +lemma near_negative_polynomial (e : Fin 8 → ℝ) (he : ParameterPolytope e) + (n : Fin 7) (y : Fin 2) (hne : ¬(n=0 ∧ y=1)) {τ : ℝ} (hτ : τ∈Icc 0 1) : + nearError n y < (∑ r : Fin 8,ordinaryOffset n r*e r)- + finiteTaylor 0 (nearNode n) (nearDisplacement n y) e τ := by + fin_cases n <;> fin_cases y + · have hh := ordinary_sign_0_0_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 0 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · exact False.elim (hne ⟨rfl,rfl⟩) + · have hh := ordinary_sign_0_1_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 1 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_1_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 1 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_2_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 2 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_2_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 2 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_3_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 3 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_3_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 3 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_4_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 4 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_4_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 4 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_5_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 5 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_5_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 5 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_6_0 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 6 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh + · have hh := ordinary_sign_0_6_1 e he hτ + change _ < (∑ r : Fin 8,ordinaryOffset 6 r*e r)-finiteTaylor 0 _ _ e τ at hh + exact lt_trans (by norm_num [nearError]) hh +lemma ordinaryOffset_actual (n : Fin 7) (z : ℝ) : + (∑ r : Fin 8,ordinaryOffset n r*actualParameter z r)= + if n.val=0 then Q 1/(2*Z) else if n.val=1 then (4/5)*Q 1*Real.exp (-2/z) else 0 := by + fin_cases n <;> norm_num [ordinaryOffset,actualParameter,Fin.sum_univ_succ] +lemma gaussian_ordinary_lower {z : ℝ} (hz : 0 simp_all + subst y + norm_num [nearNode,finiteNode,residue,nearDisplacement,nearDisplacementNum] + have hh := gaussian_deleted_left (m:=1) hz (neg_nonpos.mpr hτ.1) + norm_num at hh + have hd := div_le_div_of_nonneg_left Q_one_pos.le (show 0<2*z by positivity) (show 2*z ≤ 2*Z by linarith) + exact hd.trans hh + · have hnval : n.val≠0 := by exact fun hh => hn0 (Fin.ext hh) + simp only [hnval,ite_false] + by_cases hn1 : n=1 + · subst n + simp only [Fin.val_one,ite_true] + have hv : nearDisplacement 1 y*τ ≤ 1/2 := by + fin_cases y <;> norm_num[nearDisplacement,nearDisplacementNum] <;> nlinarith [hτ.1,hτ.2] + have hh := gaussian_deleted_three hz hzB hv + convert hh using 1 + norm_num [nearNode,finiteNode,residue] + · have hnval1 : n.val≠1 := by exact fun hh => hn1 (Fin.ext hh) + simp only [hnval1,ite_false] + exact gaussian_deleted_nonneg hz _ _ +lemma near_positive_deleted {z : ℝ} (hz : 0 fin_cases y <;> norm_num [nearDisplacement,nearDisplacementNum,nearRadius] +lemma nearRadius_nonneg (n : Fin 7) : 0≤nearRadius n := by + fin_cases n <;> norm_num [nearRadius] +def rawRemainderColumn (br : Fin 2) (n : Fin 7) (c : Fin 22) : ℝ := + ∑ j : Fin 31, remainderWave 1 br (nearNode n) (nearRadius n) (frequency j)* + ‖finiteColumn ⟨c.val,by omega⟩ j‖ +def rawRemainderConstant (br : Fin 2) (n : Fin 7) : ℝ := + ∑ j : Fin 31, remainderWave 0 br (nearNode n) (nearRadius n) (frequency j)*‖fourierCoeff j‖ +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def nearRadiusBox (n : Fin 7) : RI := if n.val<2 then RI.point 1 else (RI.point 3).divNat 2 +lemma nearRadiusBox_mem (n : Fin 7) : (nearRadiusBox n).Mem (nearRadius n) := by + fin_cases n <;> norm_num [nearRadiusBox,nearRadius,RI.Mem,RI.point,RI.divNat,scale] +def remainderExpInput (q br : Fin 2) (n : Fin 7) (j : Fin 31) : CI := + CI.ofReal ((taylorPhaseTable q br j).re.mul (RI.point (nearNode n))) +def remainderBox (q br : Fin 2) (n : Fin 7) (j : Fin 31) (dnorm : RI) : RI := + (((((taylorPhaseTable q br j).normSq.mul (amplitudeNormBox q br j)).mul + (remainderExpInput q br n j).exp.re).mul (((nearRadiusBox n).mul dnorm).pow 21)).divNat (23).factorial).mul + ((RI.point 1).sub (((nearRadiusBox n).mul dnorm).divNat 24)).invPos +lemma remainderBox_mem (q br : Fin 2) (n : Fin 7) (j : Fin 31) {dnorm : RI} + (hd : dnorm.Mem ‖taylorPhase q br (frequency j)‖) + (hp : (remainderExpInput q br n j).normSq.hi ≤ scale*1024^2) + (hden : 0<((RI.point 1).sub (((nearRadiusBox n).mul dnorm).divNat 24)).lo) : + (remainderBox q br n j dnorm).Mem + (remainderWave q br (nearNode n) (nearRadius n) (frequency j)) := by + have hs := CI.mem_normSq (taylorPhaseTable_mem q br j) + rw [Complex.normSq_eq_norm_sq] at hs + have he := ri_exp_mem (RI.mem_mul (taylorPhaseTable_mem q br j).1 (RI.mem_point (nearNode n))) hp + have hy := RI.mem_mul (nearRadiusBox_mem n) hd + have hc := RI.mem_mul (RI.mem_mul hs (amplitudeNormBox_mem q br j)) he + have hh := RI.mem_mul (RI.mem_divNat (RI.mem_mul hc (RI.mem_pow hy 21)) (by decide : 0<(23).factorial)) + (RI.mem_invPos (RI.mem_sub ri1_mem (RI.mem_divNat hy (by norm_num : 0<24))) hden) + simpa only [remainderBox,remainderWave,curvatureWave,div_eq_mul_inv,Nat.cast_ofNat,remainderExpInput] using hh +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData0.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData0.lean new file mode 100644 index 0000000000000000000000000000000000000000..9553103640c9f2ade259e665a70ff4543ea4fdad --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData0.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData0_00 : Fin 31 → RI := ![⟨178216034769887001582742986211624021445029346267,178216034769887001582742986211624021445029346270⟩,⟨36162800319226310452834861349498425189204734205,36162800319226310452834861349498425189204734207⟩,⟨6523973987387611711245159729853305145031415121,6523973987387611711245159729853305145031415123⟩,⟨1026856311310114177523789946699395715493149324,1026856311310114177523789946699395715493149326⟩,⟨137697560619893799986013120901100156968560337,137697560619893799986013120901100156968560339⟩,⟨15257208965761874526492619874887960461048922,15257208965761874526492619874887960461048924⟩,⟨1341714552657171984181002464854622874306355,1341714552657171984181002464854622874306357⟩,⟨88671842120912638193069022733149656994362,88671842120912638193069022733149656994364⟩,⟨4079720969483283390697807818252217266726,4079720969483283390697807818252217266728⟩,⟨116825946393027516935349626779337328800,116825946393027516935349626779337328802⟩,⟨1750172152411831413712562034469986168,1750172152411831413712562034469986170⟩,⟨10253811398590028915721585214110079,10253811398590028915721585214110081⟩,⟨13616127303136001796970669978152,13616127303136001796970669978154⟩,⟨1204308826132687441199327508,1204308826132687441199327510⟩,⟨142513118840669283570,142513118840669283572⟩,⟨-2,2⟩,⟨142513118840669283570,142513118840669283572⟩,⟨1204308826132687441199327508,1204308826132687441199327510⟩,⟨13616127303136001796970669978152,13616127303136001796970669978154⟩,⟨10253811398590028915721585214110079,10253811398590028915721585214110081⟩,⟨1750172152411831413712562034469986168,1750172152411831413712562034469986170⟩,⟨116825946393027516935349626779337328800,116825946393027516935349626779337328802⟩,⟨4079720969483283390697807818252217266726,4079720969483283390697807818252217266728⟩,⟨88671842120912638193069022733149656994362,88671842120912638193069022733149656994364⟩,⟨1341714552657171984181002464854622874306355,1341714552657171984181002464854622874306357⟩,⟨15257208965761874526492619874887960461048922,15257208965761874526492619874887960461048924⟩,⟨137697560619893799986013120901100156968560337,137697560619893799986013120901100156968560339⟩,⟨1026856311310114177523789946699395715493149324,1026856311310114177523789946699395715493149326⟩,⟨6523973987387611711245159729853305145031415121,6523973987387611711245159729853305145031415123⟩,⟨36162800319226310452834861349498425189204734205,36162800319226310452834861349498425189204734207⟩,⟨178216034769887001582742986211624021445029346267,178216034769887001582742986211624021445029346270⟩] +lemma remainderData0_00_calc (j : Fin 31) : remainderBox 0 0 0 j (taylorNormTable 0 0 j)=remainderData0_00 j := by + revert j + decide +kernel +lemma remainderData0_00_pre (j : Fin 31) : (remainderExpInput 0 0 0 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 0).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData0_00_mem (j : Fin 31) : (remainderData0_00 j).Mem (remainderWave 0 0 (nearNode 0) (nearRadius 0) (frequency j)) := by + rw [← remainderData0_00_calc] + exact remainderBox_mem 0 0 0 j (taylorNormTable_mem 0 0 j) (remainderData0_00_pre j).1 (remainderData0_00_pre j).2 +def remainderData0_01 : Fin 31 → RI := ![⟨15878869194791562377538952682219967432882947647803246,15878869194791562377538952682219967432882947647804457⟩,⟨48813163093952462799487821899785938386992871470434601,48813163093952462799487821899785938386992871470438355⟩,⟨155589381114811419830856357394942471403352906220576310,155589381114811419830856357394942471403352906220588410⟩,⟨511792917416093661697285023227460804233780552188719882,511792917416093661697285023227460804233780552188760213⟩,⟨1723911290167689540586846132420638930375648089453323209,1723911290167689540586846132420638930375648089453461226⟩,⟨5875436661520337834706663350636617083246545488199605709,5875436661520337834706663350636617083246545488200085015⟩,⟨19904955363304970298063604155889611144683707807015553140,19904955363304970298063604155889611144683707807017213525⟩,⟨65356725458310094146827273230712605851510016997672196282,65356725458310094146827273230712605851510016997677793822⟩,⟨200938364038333781279183765843354956342922868369551164556,200938364038333781279183765843354956342922868369568916903⟩,⟨553568134832091990542781577500492020371342418979155371018,553568134832091990542781577500492020371342418979206072145⟩,⟨1299149137819243495452851378476471345478302436855878584442,1299149137819243495452851378476471345478302436856002526148⟩,⟨2476887817445266759576741394699359699595222468667192723727,2476887817445266759576741394699359699595222468667439694068⟩,⟨3739145952685753309147772973693625098447762108004860947879,3739145952685753309147772973693625098447762108005250719704⟩,⟨4556808032218625655593602009965474605135724397338189560427,4556808032218625655593602009965474605135724397338683700522⟩,⟨4817958649464199014546144242227674545195006964514586667529,4817958649464199014546144242227674545195006964515123869883⟩,⟨4839319663395203975420535190872979432508523932435991583359,4839319663395203975420535190872979432508523932436536648640⟩,⟨4817958649464199014546144242227674545195006964514586667529,4817958649464199014546144242227674545195006964515123869883⟩,⟨4556808032218625655593602009965474605135724397338189560427,4556808032218625655593602009965474605135724397338683700522⟩,⟨3739145952685753309147772973693625098447762108004860947879,3739145952685753309147772973693625098447762108005250719704⟩,⟨2476887817445266759576741394699359699595222468667192723727,2476887817445266759576741394699359699595222468667439694068⟩,⟨1299149137819243495452851378476471345478302436855878584442,1299149137819243495452851378476471345478302436856002526148⟩,⟨553568134832091990542781577500492020371342418979155371018,553568134832091990542781577500492020371342418979206072145⟩,⟨200938364038333781279183765843354956342922868369551164556,200938364038333781279183765843354956342922868369568916903⟩,⟨65356725458310094146827273230712605851510016997672196282,65356725458310094146827273230712605851510016997677793822⟩,⟨19904955363304970298063604155889611144683707807015553140,19904955363304970298063604155889611144683707807017213525⟩,⟨5875436661520337834706663350636617083246545488199605709,5875436661520337834706663350636617083246545488200085015⟩,⟨1723911290167689540586846132420638930375648089453323209,1723911290167689540586846132420638930375648089453461226⟩,⟨511792917416093661697285023227460804233780552188719882,511792917416093661697285023227460804233780552188760213⟩,⟨155589381114811419830856357394942471403352906220576310,155589381114811419830856357394942471403352906220588410⟩,⟨48813163093952462799487821899785938386992871470434601,48813163093952462799487821899785938386992871470438355⟩,⟨15878869194791562377538952682219967432882947647803246,15878869194791562377538952682219967432882947647804457⟩] +lemma remainderData0_01_calc (j : Fin 31) : remainderBox 0 1 0 j (taylorNormTable 0 1 j)=remainderData0_01 j := by + revert j + decide +kernel +lemma remainderData0_01_pre (j : Fin 31) : (remainderExpInput 0 1 0 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 0).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData0_01_mem (j : Fin 31) : (remainderData0_01 j).Mem (remainderWave 0 1 (nearNode 0) (nearRadius 0) (frequency j)) := by + rw [← remainderData0_01_calc] + exact remainderBox_mem 0 1 0 j (taylorNormTable_mem 0 1 j) (remainderData0_01_pre j).1 (remainderData0_01_pre j).2 +def remainderData0_10 : Fin 31 → RI := ![⟨181668952263524704981560700364347687793354171330,181668952263524704981560700364347687793354171332⟩,⟨40436423828440530805454004881041141529397607498,40436423828440530805454004881041141529397607500⟩,⟨8172838549353331597550402334978733803062166885,8172838549353331597550402334978733803062166887⟩,⟨1482078720375009440240492391410681975556451554,1482078720375009440240492391410681975556451556⟩,⟨237798249252683052949557539716674344002224756,237798249252683052949557539716674344002224758⟩,⟨33218408608587065393601092211684031221945181,33218408608587065393601092211684031221945184⟩,⟨3966441465284783912063071413760231268415417,3966441465284783912063071413760231268415419⟩,⟨396723381116239791494848057924420818715532,396723381116239791494848057924420818715534⟩,⟨32560507128109845516155086218348781469725,32560507128109845516155086218348781469727⟩,⟨2156090396864401268114809070904931167820,2156090396864401268114809070904931167822⟩,⟨114807216314225287771078754846443076175,114807216314225287771078754846443076177⟩,⟨5079614980783420582378422604876820356,5079614980783420582378422604876820358⟩,⟨209719999595883373950128379107557510,209719999595883373950128379107557512⟩,⟨10700703672869015263111423708227373,10700703672869015263111423708227375⟩,⟨1137511109726457580950628211131444,1137511109726457580950628211131446⟩,⟨483379864925016738175670500269635,483379864925016738175670500269637⟩,⟨1137511109726457580950628211131444,1137511109726457580950628211131446⟩,⟨10700703672869015263111423708227373,10700703672869015263111423708227375⟩,⟨209719999595883373950128379107557510,209719999595883373950128379107557512⟩,⟨5079614980783420582378422604876820356,5079614980783420582378422604876820358⟩,⟨114807216314225287771078754846443076175,114807216314225287771078754846443076177⟩,⟨2156090396864401268114809070904931167820,2156090396864401268114809070904931167822⟩,⟨32560507128109845516155086218348781469725,32560507128109845516155086218348781469727⟩,⟨396723381116239791494848057924420818715532,396723381116239791494848057924420818715534⟩,⟨3966441465284783912063071413760231268415417,3966441465284783912063071413760231268415419⟩,⟨33218408608587065393601092211684031221945181,33218408608587065393601092211684031221945184⟩,⟨237798249252683052949557539716674344002224756,237798249252683052949557539716674344002224758⟩,⟨1482078720375009440240492391410681975556451554,1482078720375009440240492391410681975556451556⟩,⟨8172838549353331597550402334978733803062166885,8172838549353331597550402334978733803062166887⟩,⟨40436423828440530805454004881041141529397607498,40436423828440530805454004881041141529397607500⟩,⟨181668952263524704981560700364347687793354171330,181668952263524704981560700364347687793354171332⟩] +lemma remainderData0_10_calc (j : Fin 31) : remainderBox 1 0 0 j (taylorNormTable 1 0 j)=remainderData0_10 j := by + revert j + decide +kernel +lemma remainderData0_10_pre (j : Fin 31) : (remainderExpInput 1 0 0 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 0).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData0_10_mem (j : Fin 31) : (remainderData0_10 j).Mem (remainderWave 1 0 (nearNode 0) (nearRadius 0) (frequency j)) := by + rw [← remainderData0_10_calc] + exact remainderBox_mem 1 0 0 j (taylorNormTable_mem 1 0 j) (remainderData0_10_pre j).1 (remainderData0_10_pre j).2 +def remainderData0_11 : Fin 31 → RI := ![⟨243889224636482034616080352146409734518335021088565,243889224636482034616080352146409734518335021088585⟩,⟨562716768111973870617259064902310789961699628761562,562716768111973870617259064902310789961699628761609⟩,⟨1305221707082623852520751520776045278903117811631381,1305221707082623852520751520776045278903117811631487⟩,⟨3023775961046259287475448188345475656667420377965002,3023775961046259287475448188345475656667420377965247⟩,⟨6939795949184659440218592033110809922103456895372809,6939795949184659440218592033110809922103456895373377⟩,⟨15622855253826849245300600827770883606429211777902091,15622855253826849245300600827770883606429211777903384⟩,⟨34095420644373444547808814218000747640522325646189836,34095420644373444547808814218000747640522325646192703⟩,⟨71183825514816553008951638419402330140005553820234680,71183825514816553008951638419402330140005553820240767⟩,⟨140161033741930653166885271059541355001322830510086528,140161033741930653166885271059541355001322830510098739⟩,⟨256620847802268639713871560187544844705255156253318771,256620847802268639713871560187544844705255156253341566⟩,⟨431460843384051064022375584396991880666327538507539832,431460843384051064022375584396991880666327538507578903⟩,⟨660088104232474818226384434447464879696735624700425987,660088104232474818226384434447464879696735624700486868⟩,⟨914860314041697427990279973279701461550313136696320582,914860314041697427990279973279701461550313136696406342⟩,⟨1149292042620926328681229357496666388899643342520591975,1149292042620926328681229357496666388899643342520701103⟩,⟨1313867779726808114105330921158677236455135140454074591,1313867779726808114105330921158677236455135140454200381⟩,⟨1372932117779466782191534914783497471801766638876667215,1372932117779466782191534914783497471801766638876799037⟩,⟨1313867779726808114105330921158677236455135140454074591,1313867779726808114105330921158677236455135140454200381⟩,⟨1149292042620926328681229357496666388899643342520591975,1149292042620926328681229357496666388899643342520701103⟩,⟨914860314041697427990279973279701461550313136696320582,914860314041697427990279973279701461550313136696406342⟩,⟨660088104232474818226384434447464879696735624700425987,660088104232474818226384434447464879696735624700486868⟩,⟨431460843384051064022375584396991880666327538507539832,431460843384051064022375584396991880666327538507578903⟩,⟨256620847802268639713871560187544844705255156253318771,256620847802268639713871560187544844705255156253341566⟩,⟨140161033741930653166885271059541355001322830510086528,140161033741930653166885271059541355001322830510098739⟩,⟨71183825514816553008951638419402330140005553820234680,71183825514816553008951638419402330140005553820240767⟩,⟨34095420644373444547808814218000747640522325646189836,34095420644373444547808814218000747640522325646192703⟩,⟨15622855253826849245300600827770883606429211777902091,15622855253826849245300600827770883606429211777903384⟩,⟨6939795949184659440218592033110809922103456895372809,6939795949184659440218592033110809922103456895373377⟩,⟨3023775961046259287475448188345475656667420377965002,3023775961046259287475448188345475656667420377965247⟩,⟨1305221707082623852520751520776045278903117811631381,1305221707082623852520751520776045278903117811631487⟩,⟨562716768111973870617259064902310789961699628761562,562716768111973870617259064902310789961699628761609⟩,⟨243889224636482034616080352146409734518335021088565,243889224636482034616080352146409734518335021088585⟩] +lemma remainderData0_11_calc (j : Fin 31) : remainderBox 1 1 0 j (taylorNormTable 1 1 j)=remainderData0_11 j := by + revert j + decide +kernel +lemma remainderData0_11_pre (j : Fin 31) : (remainderExpInput 1 1 0 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 0).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData0_11_mem (j : Fin 31) : (remainderData0_11 j).Mem (remainderWave 1 1 (nearNode 0) (nearRadius 0) (frequency j)) := by + rw [← remainderData0_11_calc] + exact remainderBox_mem 1 1 0 j (taylorNormTable_mem 1 1 j) (remainderData0_11_pre j).1 (remainderData0_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData1.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData1.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d9f095ccc2078b62b662bb0668a6b46fbbc0dff --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData1.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData1_00 : Fin 31 → RI := ![⟨178216034769887001582742986211624021445029346267,178216034769887001582742986211624021445029346270⟩,⟨36162800319226310452834861349498425189204734205,36162800319226310452834861349498425189204734207⟩,⟨6523973987387611711245159729853305145031415121,6523973987387611711245159729853305145031415123⟩,⟨1026856311310114177523789946699395715493149324,1026856311310114177523789946699395715493149326⟩,⟨137697560619893799986013120901100156968560337,137697560619893799986013120901100156968560339⟩,⟨15257208965761874526492619874887960461048922,15257208965761874526492619874887960461048924⟩,⟨1341714552657171984181002464854622874306355,1341714552657171984181002464854622874306357⟩,⟨88671842120912638193069022733149656994362,88671842120912638193069022733149656994364⟩,⟨4079720969483283390697807818252217266726,4079720969483283390697807818252217266728⟩,⟨116825946393027516935349626779337328800,116825946393027516935349626779337328802⟩,⟨1750172152411831413712562034469986168,1750172152411831413712562034469986170⟩,⟨10253811398590028915721585214110079,10253811398590028915721585214110081⟩,⟨13616127303136001796970669978152,13616127303136001796970669978154⟩,⟨1204308826132687441199327508,1204308826132687441199327510⟩,⟨142513118840669283570,142513118840669283572⟩,⟨-2,2⟩,⟨142513118840669283570,142513118840669283572⟩,⟨1204308826132687441199327508,1204308826132687441199327510⟩,⟨13616127303136001796970669978152,13616127303136001796970669978154⟩,⟨10253811398590028915721585214110079,10253811398590028915721585214110081⟩,⟨1750172152411831413712562034469986168,1750172152411831413712562034469986170⟩,⟨116825946393027516935349626779337328800,116825946393027516935349626779337328802⟩,⟨4079720969483283390697807818252217266726,4079720969483283390697807818252217266728⟩,⟨88671842120912638193069022733149656994362,88671842120912638193069022733149656994364⟩,⟨1341714552657171984181002464854622874306355,1341714552657171984181002464854622874306357⟩,⟨15257208965761874526492619874887960461048922,15257208965761874526492619874887960461048924⟩,⟨137697560619893799986013120901100156968560337,137697560619893799986013120901100156968560339⟩,⟨1026856311310114177523789946699395715493149324,1026856311310114177523789946699395715493149326⟩,⟨6523973987387611711245159729853305145031415121,6523973987387611711245159729853305145031415123⟩,⟨36162800319226310452834861349498425189204734205,36162800319226310452834861349498425189204734207⟩,⟨178216034769887001582742986211624021445029346267,178216034769887001582742986211624021445029346270⟩] +lemma remainderData1_00_calc (j : Fin 31) : remainderBox 0 0 1 j (taylorNormTable 0 0 j)=remainderData1_00 j := by + revert j + decide +kernel +lemma remainderData1_00_pre (j : Fin 31) : (remainderExpInput 0 0 1 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 1).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData1_00_mem (j : Fin 31) : (remainderData1_00 j).Mem (remainderWave 0 0 (nearNode 1) (nearRadius 1) (frequency j)) := by + rw [← remainderData1_00_calc] + exact remainderBox_mem 0 0 1 j (taylorNormTable_mem 0 0 j) (remainderData1_00_pre j).1 (remainderData1_00_pre j).2 +def remainderData1_01 : Fin 31 → RI := ![⟨3994625985463441965193459319424115472828616687737893,3994625985463441965193459319424115472828616687738217⟩,⟨7934011187422461229591156368498881872756160389507491,7934011187422461229591156368498881872756160389508150⟩,⟨15080334270457141489481322795556678681688939452821013,15080334270457141489481322795556678681688939452822301⟩,⟨26795089235396890814281806772373298746181429747195175,26795089235396890814281806772373298746181429747197544⟩,⟨43138154557357729621855503064950533922755368633278242,43138154557357729621855503064950533922755368633282211⟩,⟨60387326790816050450067506773300749809305872524693473,60387326790816050450067506773300749809305872524699298⟩,⟨69688863915302415683681197232156228417162034537249947,69688863915302415683681197232156228417162034537257044⟩,⟨62019864786866718300588596023457862423490579840354638,62019864786866718300588596023457862423490579840361364⟩,⟨39343964345712388478743564876409127199170432068516692,39343964345712388478743564876409127199170432068521277⟩,⟨16387453687427067924213461317520431905823390439510817,16387453687427067924213461317520431905823390439512887⟩,⟨4206932861287586902646561602064868565522666391376575,4206932861287586902646561602064868565522666391377157⟩,⟨666373442276323778450856586850170034850390945226263,666373442276323778450856586850170034850390945226384⟩,⟨74601909614841495308586395558212550061317413004670,74601909614841495308586395558212550061317413004758⟩,⟨8279441280936647148288412874379621626063498234627,8279441280936647148288412874379621626063498234951⟩,⟨1541435628426100378092537053059425588672370407993,1541435628426100378092537053059425588672370408804⟩,⟨815772799906125576263961531220898963882070848772,815772799906125576263961531220898963882070849895⟩,⟨1541435628426100378092537053059425588672370407993,1541435628426100378092537053059425588672370408804⟩,⟨8279441280936647148288412874379621626063498234627,8279441280936647148288412874379621626063498234951⟩,⟨74601909614841495308586395558212550061317413004670,74601909614841495308586395558212550061317413004758⟩,⟨666373442276323778450856586850170034850390945226263,666373442276323778450856586850170034850390945226384⟩,⟨4206932861287586902646561602064868565522666391376575,4206932861287586902646561602064868565522666391377157⟩,⟨16387453687427067924213461317520431905823390439510817,16387453687427067924213461317520431905823390439512887⟩,⟨39343964345712388478743564876409127199170432068516692,39343964345712388478743564876409127199170432068521277⟩,⟨62019864786866718300588596023457862423490579840354638,62019864786866718300588596023457862423490579840361364⟩,⟨69688863915302415683681197232156228417162034537249947,69688863915302415683681197232156228417162034537257044⟩,⟨60387326790816050450067506773300749809305872524693473,60387326790816050450067506773300749809305872524699298⟩,⟨43138154557357729621855503064950533922755368633278242,43138154557357729621855503064950533922755368633282211⟩,⟨26795089235396890814281806772373298746181429747195175,26795089235396890814281806772373298746181429747197544⟩,⟨15080334270457141489481322795556678681688939452821013,15080334270457141489481322795556678681688939452822301⟩,⟨7934011187422461229591156368498881872756160389507491,7934011187422461229591156368498881872756160389508150⟩,⟨3994625985463441965193459319424115472828616687737893,3994625985463441965193459319424115472828616687738217⟩] +lemma remainderData1_01_calc (j : Fin 31) : remainderBox 0 1 1 j (taylorNormTable 0 1 j)=remainderData1_01 j := by + revert j + decide +kernel +lemma remainderData1_01_pre (j : Fin 31) : (remainderExpInput 0 1 1 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 1).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData1_01_mem (j : Fin 31) : (remainderData1_01 j).Mem (remainderWave 0 1 (nearNode 1) (nearRadius 1) (frequency j)) := by + rw [← remainderData1_01_calc] + exact remainderBox_mem 0 1 1 j (taylorNormTable_mem 0 1 j) (remainderData1_01_pre j).1 (remainderData1_01_pre j).2 +def remainderData1_10 : Fin 31 → RI := ![⟨51704717542056669102473617424609121236181196307,51704717542056669102473617424609121236181196309⟩,⟨11508592119954592264736582153159880205007308361,11508592119954592264736582153159880205007308363⟩,⟨2326067847290547705746247906632969104753848988,2326067847290547705746247906632969104753848990⟩,⟨421813747793978070889749862277190765744694161,421813747793978070889749862277190765744694163⟩,⟨67679651125913389732940008155273902359376291,67679651125913389732940008155273902359376293⟩,⟨9454276104439588488712240304914415615703105,9454276104439588488712240304914415615703107⟩,⟨1128887094103793184266209956040788359885789,1128887094103793184266209956040788359885791⟩,⟨112911260330218509097268411180723809256471,112911260330218509097268411180723809256474⟩,⟨9267031064520869356610089528157276541476,9267031064520869356610089528157276541479⟩,⟨613643903242775381809211642196119049634,613643903242775381809211642196119049636⟩,⟨32675229406872389801711699319591389710,32675229406872389801711699319591389712⟩,⟨1445706900003622479184427348723914568,1445706900003622479184427348723914570⟩,⟨59688313313416612231286170296035898,59688313313416612231286170296035900⟩,⟨3045522385709421684818363118458642,3045522385709421684818363118458644⟩,⟨323746517478906986448086903251557,323746517478906986448086903251559⟩,⟨137574522614140531152642396812499,137574522614140531152642396812501⟩,⟨323746517478906986448086903251557,323746517478906986448086903251559⟩,⟨3045522385709421684818363118458642,3045522385709421684818363118458644⟩,⟨59688313313416612231286170296035898,59688313313416612231286170296035900⟩,⟨1445706900003622479184427348723914568,1445706900003622479184427348723914570⟩,⟨32675229406872389801711699319591389710,32675229406872389801711699319591389712⟩,⟨613643903242775381809211642196119049634,613643903242775381809211642196119049636⟩,⟨9267031064520869356610089528157276541476,9267031064520869356610089528157276541479⟩,⟨112911260330218509097268411180723809256471,112911260330218509097268411180723809256474⟩,⟨1128887094103793184266209956040788359885789,1128887094103793184266209956040788359885791⟩,⟨9454276104439588488712240304914415615703105,9454276104439588488712240304914415615703107⟩,⟨67679651125913389732940008155273902359376291,67679651125913389732940008155273902359376293⟩,⟨421813747793978070889749862277190765744694161,421813747793978070889749862277190765744694163⟩,⟨2326067847290547705746247906632969104753848988,2326067847290547705746247906632969104753848990⟩,⟨11508592119954592264736582153159880205007308361,11508592119954592264736582153159880205007308363⟩,⟨51704717542056669102473617424609121236181196307,51704717542056669102473617424609121236181196309⟩] +lemma remainderData1_10_calc (j : Fin 31) : remainderBox 1 0 1 j (taylorNormTable 1 0 j)=remainderData1_10 j := by + revert j + decide +kernel +lemma remainderData1_10_pre (j : Fin 31) : (remainderExpInput 1 0 1 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 1).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData1_10_mem (j : Fin 31) : (remainderData1_10 j).Mem (remainderWave 1 0 (nearNode 1) (nearRadius 1) (frequency j)) := by + rw [← remainderData1_10_calc] + exact remainderBox_mem 1 0 1 j (taylorNormTable_mem 1 0 j) (remainderData1_10_pre j).1 (remainderData1_10_pre j).2 +def remainderData1_11 : Fin 31 → RI := ![⟨21011643365898233577317056579438761225869606898916,21011643365898233577317056579438761225869606898919⟩,⟨30664406754990310861367650447874445491141513782725,30664406754990310861367650447874445491141513782730⟩,⟨42409354398643783277714052291314889793958169754081,42409354398643783277714052291314889793958169754086⟩,⟨54834605317163790770614119551197081672626293106697,54834605317163790770614119551197081672626293106704⟩,⟨65303413567941393790312315451763408067702942153269,65303413567941393790312315451763408067702942153278⟩,⟨70526629566408353514564186378787163173048904986652,70526629566408353514564186378787163173048904986660⟩,⟨68058667249428054270524613167350400168140782019673,68058667249428054270524613167350400168140782019683⟩,⟨58001174122076315422810538514775343670651252184403,58001174122076315422810538514775343670651252184412⟩,⟨43426346587452873619058649729046298834803066637955,43426346587452873619058649729046298834803066637963⟩,⟨28732912263996594885457124954768023900739351948241,28732912263996594885457124954768023900739351948246⟩,⟨17173690860183184951093323184584820417376295873517,17173690860183184951093323184584820417376295873522⟩,⟨9671558985324047805892092931645925209327996267456,9671558985324047805892092931645925209327996267460⟩,⟨5463558093981561197560422911633183709875633726485,5463558093981561197560422911633183709875633726487⟩,⟨3343612391498916935264194782948654312713397151795,3343612391498916935264194782948654312713397151799⟩,⟨2394605421298605490436180926367676780037682282711,2394605421298605490436180926367676780037682282713⟩,⟨2126982804219164443630790784802800983127015264460,2126982804219164443630790784802800983127015264463⟩,⟨2394605421298605490436180926367676780037682282711,2394605421298605490436180926367676780037682282713⟩,⟨3343612391498916935264194782948654312713397151795,3343612391498916935264194782948654312713397151799⟩,⟨5463558093981561197560422911633183709875633726485,5463558093981561197560422911633183709875633726487⟩,⟨9671558985324047805892092931645925209327996267456,9671558985324047805892092931645925209327996267460⟩,⟨17173690860183184951093323184584820417376295873517,17173690860183184951093323184584820417376295873522⟩,⟨28732912263996594885457124954768023900739351948241,28732912263996594885457124954768023900739351948246⟩,⟨43426346587452873619058649729046298834803066637955,43426346587452873619058649729046298834803066637963⟩,⟨58001174122076315422810538514775343670651252184403,58001174122076315422810538514775343670651252184412⟩,⟨68058667249428054270524613167350400168140782019673,68058667249428054270524613167350400168140782019683⟩,⟨70526629566408353514564186378787163173048904986652,70526629566408353514564186378787163173048904986660⟩,⟨65303413567941393790312315451763408067702942153269,65303413567941393790312315451763408067702942153278⟩,⟨54834605317163790770614119551197081672626293106697,54834605317163790770614119551197081672626293106704⟩,⟨42409354398643783277714052291314889793958169754081,42409354398643783277714052291314889793958169754086⟩,⟨30664406754990310861367650447874445491141513782725,30664406754990310861367650447874445491141513782730⟩,⟨21011643365898233577317056579438761225869606898916,21011643365898233577317056579438761225869606898919⟩] +lemma remainderData1_11_calc (j : Fin 31) : remainderBox 1 1 1 j (taylorNormTable 1 1 j)=remainderData1_11 j := by + revert j + decide +kernel +lemma remainderData1_11_pre (j : Fin 31) : (remainderExpInput 1 1 1 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 1).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData1_11_mem (j : Fin 31) : (remainderData1_11 j).Mem (remainderWave 1 1 (nearNode 1) (nearRadius 1) (frequency j)) := by + rw [← remainderData1_11_calc] + exact remainderBox_mem 1 1 1 j (taylorNormTable_mem 1 1 j) (remainderData1_11_pre j).1 (remainderData1_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData2.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData2.lean new file mode 100644 index 0000000000000000000000000000000000000000..310e671dc8d9210cc6e0708dbae0975b53f40984 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData2.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData2_00 : Fin 31 → RI := ![⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨-2,2⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩] +lemma remainderData2_00_calc (j : Fin 31) : remainderBox 0 0 2 j (taylorNormTable 0 0 j)=remainderData2_00 j := by + revert j + decide +kernel +lemma remainderData2_00_pre (j : Fin 31) : (remainderExpInput 0 0 2 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 2).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData2_00_mem (j : Fin 31) : (remainderData2_00 j).Mem (remainderWave 0 0 (nearNode 2) (nearRadius 2) (frequency j)) := by + rw [← remainderData2_00_calc] + exact remainderBox_mem 0 0 2 j (taylorNormTable_mem 0 0 j) (remainderData2_00_pre j).1 (remainderData2_00_pre j).2 +def remainderData2_01 : Fin 31 → RI := ![⟨11242958935166771346110355907155343828235805717466863387,11242958935166771346110355907155343828235805717467799234⟩,⟨18108392224543201874724344932461119594440629843644921499,18108392224543201874724344932461119594440629843646481525⟩,⟨26852297460492335521930550504511331403701963016618971024,26852297460492335521930550504511331403701963016621377144⟩,⟨35488823677316328039344824020340296365491997351578200240,35488823677316328039344824020340296365491997351581526963⟩,⟨40061866755282253125638889135524125997349687661419863932,40061866755282253125638889135524125997349687661423818864⟩,⟨36552297044933978665102247437966364975975528930907361725,36552297044933978665102247437966364975975528930911191003⟩,⟨25124199274784537909456807296168628120967106010487721069,25124199274784537909456807296168628120967106010490538251⟩,⟨11931253082006923629148866328398053918641114242816348756,11931253082006923629148866328398053918641114242817794266⟩,⟨3543481154639334893504313043927507722469248808159150450,3543481154639334893504313043927507722469248808159619162⟩,⟨595568229289053218580422846042803645199274352940485651,595568229289053218580422846042803645199274352940574686⟩,⟨52911709292696164686468426498826120341251604429170235,52911709292696164686468426498826120341251604429189475⟩,⟨2550255765974446504049047997245229554109771669881361,2550255765974446504049047997245229554109771669987461⟩,⟨82666323676050851970553098369822576502241645970460,82666323676050851970553098369822576502241646594237⟩,⟨2945029013727863742158861277857361070021650499167,2945029013727863742158861277857361070021653178209⟩,⟨241546072381602486243774889585284861458695155660,241546072381602486243774889585284861458702239536⟩,⟨94560209443878324186826129074832448573631216556,94560209443878324186826129074832448573641208000⟩,⟨241546072381602486243774889585284861458695155660,241546072381602486243774889585284861458702239536⟩,⟨2945029013727863742158861277857361070021650499167,2945029013727863742158861277857361070021653178209⟩,⟨82666323676050851970553098369822576502241645970460,82666323676050851970553098369822576502241646594237⟩,⟨2550255765974446504049047997245229554109771669881361,2550255765974446504049047997245229554109771669987461⟩,⟨52911709292696164686468426498826120341251604429170235,52911709292696164686468426498826120341251604429189475⟩,⟨595568229289053218580422846042803645199274352940485651,595568229289053218580422846042803645199274352940574686⟩,⟨3543481154639334893504313043927507722469248808159150450,3543481154639334893504313043927507722469248808159619162⟩,⟨11931253082006923629148866328398053918641114242816348756,11931253082006923629148866328398053918641114242817794266⟩,⟨25124199274784537909456807296168628120967106010487721069,25124199274784537909456807296168628120967106010490538251⟩,⟨36552297044933978665102247437966364975975528930907361725,36552297044933978665102247437966364975975528930911191003⟩,⟨40061866755282253125638889135524125997349687661419863932,40061866755282253125638889135524125997349687661423818864⟩,⟨35488823677316328039344824020340296365491997351578200240,35488823677316328039344824020340296365491997351581526963⟩,⟨26852297460492335521930550504511331403701963016618971024,26852297460492335521930550504511331403701963016621377144⟩,⟨18108392224543201874724344932461119594440629843644921499,18108392224543201874724344932461119594440629843646481525⟩,⟨11242958935166771346110355907155343828235805717466863387,11242958935166771346110355907155343828235805717467799234⟩] +lemma remainderData2_01_calc (j : Fin 31) : remainderBox 0 1 2 j (taylorNormTable 0 1 j)=remainderData2_01 j := by + revert j + decide +kernel +lemma remainderData2_01_pre (j : Fin 31) : (remainderExpInput 0 1 2 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 2).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData2_01_mem (j : Fin 31) : (remainderData2_01 j).Mem (remainderWave 0 1 (nearNode 2) (nearRadius 2) (frequency j)) := by + rw [← remainderData2_01_calc] + exact remainderBox_mem 0 1 2 j (taylorNormTable_mem 0 1 j) (remainderData2_01_pre j).1 (remainderData2_01_pre j).2 +def remainderData2_10 : Fin 31 → RI := ![⟨146863576402091853297978234027314338108616771396662,146863576402091853297978234027314338108616771396677⟩,⟨32535082960586066693469401641025999468145939260500,32535082960586066693469401641025999468145939260505⟩,⟨6545582928424411139794206920861676840474054763195,6545582928424411139794206920861676840474054763198⟩,⟨1181662795384622732631689593625424865098906257319,1181662795384622732631689593625424865098906257321⟩,⟨188768381372232160263339207372809050720007323045,188768381372232160263339207372809050720007323047⟩,⟨26257339853411590914784159632578695664910123965,26257339853411590914784159632578695664910123967⟩,⟨3122338178231840433152358212994480257015392857,3122338178231840433152358212994480257015392859⟩,⟨311052503154827288673571725400222896006589122,311052503154827288673571725400222896006589124⟩,⟨25431440514876602370618828512631419723990851,25431440514876602370618828512631419723990853⟩,⟨1677870084453183402718147218392628611918462,1677870084453183402718147218392628611918464⟩,⟨89036253792514772493029519562835363249848,89036253792514772493029519562835363249850⟩,⟨3926963762483703160020760185057744365475,3926963762483703160020760185057744365477⟩,⟨161681384778519403850151754883853318221,161681384778519403850151754883853318223⟩,⟨8231127349369799148812066069089618285,8231127349369799148812066069089618288⟩,⟨873683160239656033599792288257395139,873683160239656033599792288257395141⟩,⟨371070566331736867115704051477079492,371070566331736867115704051477079494⟩,⟨873683160239656033599792288257395139,873683160239656033599792288257395141⟩,⟨8231127349369799148812066069089618285,8231127349369799148812066069089618288⟩,⟨161681384778519403850151754883853318221,161681384778519403850151754883853318223⟩,⟨3926963762483703160020760185057744365475,3926963762483703160020760185057744365477⟩,⟨89036253792514772493029519562835363249848,89036253792514772493029519562835363249850⟩,⟨1677870084453183402718147218392628611918462,1677870084453183402718147218392628611918464⟩,⟨25431440514876602370618828512631419723990851,25431440514876602370618828512631419723990853⟩,⟨311052503154827288673571725400222896006589122,311052503154827288673571725400222896006589124⟩,⟨3122338178231840433152358212994480257015392857,3122338178231840433152358212994480257015392859⟩,⟨26257339853411590914784159632578695664910123965,26257339853411590914784159632578695664910123967⟩,⟨188768381372232160263339207372809050720007323045,188768381372232160263339207372809050720007323047⟩,⟨1181662795384622732631689593625424865098906257319,1181662795384622732631689593625424865098906257321⟩,⟨6545582928424411139794206920861676840474054763195,6545582928424411139794206920861676840474054763198⟩,⟨32535082960586066693469401641025999468145939260500,32535082960586066693469401641025999468145939260505⟩,⟨146863576402091853297978234027314338108616771396662,146863576402091853297978234027314338108616771396677⟩] +lemma remainderData2_10_calc (j : Fin 31) : remainderBox 1 0 2 j (taylorNormTable 1 0 j)=remainderData2_10 j := by + revert j + decide +kernel +lemma remainderData2_10_pre (j : Fin 31) : (remainderExpInput 1 0 2 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 2).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData2_10_mem (j : Fin 31) : (remainderData2_10 j).Mem (remainderWave 1 0 (nearNode 2) (nearRadius 2) (frequency j)) := by + rw [← remainderData2_10_calc] + exact remainderBox_mem 1 0 2 j (taylorNormTable_mem 1 0 j) (remainderData2_10_pre j).1 (remainderData2_10_pre j).2 +def remainderData2_11 : Fin 31 → RI := ![⟨33896578379472435376684226377882843137147798146029644,33896578379472435376684226377882843137147798146032695⟩,⟨39559208108092072923804998486513335765803465649830399,39559208108092072923804998486513335765803465649834079⟩,⟨42502964786796029006339894670211173641690621502124955,42502964786796029006339894670211173641690621502129055⟩,⟨41331359215836399659209276967523147383672502136050887,41331359215836399659209276967523147383672502136055035⟩,⟨35719539362828564445184117850206290834814704960571061,35719539362828564445184117850206290834814704960574803⟩,⟨26936829335953856227867257713764824192119046542621518,26936829335953856227867257713764824192119046542624474⟩,⟨17439067995604041021101276713251539456495400413249674,17439067995604041021101276713251539456495400413251685⟩,⟨9586889395009746610551386203936591474436493487665890,9586889395009746610551386203936591474436493487667057⟩,⟨4471721131654862628520630895348912005985368408161564,4471721131654862628520630895348912005985368408162139⟩,⟨1797713772235142433949394836405250229598569477086841,1797713772235142433949394836405250229598569477087086⟩,⟨647601717261763643240582397419674177806240210419062,647601717261763643240582397419674177806240210419157⟩,⟨223584412193194527645578188852973722331557770494214,223584412193194527645578188852973722331557770494253⟩,⟨81392587011658141397633773687980566953514555166815,81392587011658141397633773687980566953514555166836⟩,⟨35027267903706297805624823025483841833155908616081,35027267903706297805624823025483841833155908616102⟩,⟨19952066920275389860186771132629519627970149138050,19952066920275389860186771132629519627970149138071⟩,⟨16367027190164132418650993876934262269490721980955,16367027190164132418650993876934262269490721980980⟩,⟨19952066920275389860186771132629519627970149138050,19952066920275389860186771132629519627970149138071⟩,⟨35027267903706297805624823025483841833155908616081,35027267903706297805624823025483841833155908616102⟩,⟨81392587011658141397633773687980566953514555166815,81392587011658141397633773687980566953514555166836⟩,⟨223584412193194527645578188852973722331557770494214,223584412193194527645578188852973722331557770494253⟩,⟨647601717261763643240582397419674177806240210419062,647601717261763643240582397419674177806240210419157⟩,⟨1797713772235142433949394836405250229598569477086841,1797713772235142433949394836405250229598569477087086⟩,⟨4471721131654862628520630895348912005985368408161564,4471721131654862628520630895348912005985368408162139⟩,⟨9586889395009746610551386203936591474436493487665890,9586889395009746610551386203936591474436493487667057⟩,⟨17439067995604041021101276713251539456495400413249674,17439067995604041021101276713251539456495400413251685⟩,⟨26936829335953856227867257713764824192119046542621518,26936829335953856227867257713764824192119046542624474⟩,⟨35719539362828564445184117850206290834814704960571061,35719539362828564445184117850206290834814704960574803⟩,⟨41331359215836399659209276967523147383672502136050887,41331359215836399659209276967523147383672502136055035⟩,⟨42502964786796029006339894670211173641690621502124955,42502964786796029006339894670211173641690621502129055⟩,⟨39559208108092072923804998486513335765803465649830399,39559208108092072923804998486513335765803465649834079⟩,⟨33896578379472435376684226377882843137147798146029644,33896578379472435376684226377882843137147798146032695⟩] +lemma remainderData2_11_calc (j : Fin 31) : remainderBox 1 1 2 j (taylorNormTable 1 1 j)=remainderData2_11 j := by + revert j + decide +kernel +lemma remainderData2_11_pre (j : Fin 31) : (remainderExpInput 1 1 2 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 2).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData2_11_mem (j : Fin 31) : (remainderData2_11 j).Mem (remainderWave 1 1 (nearNode 2) (nearRadius 2) (frequency j)) := by + rw [← remainderData2_11_calc] + exact remainderBox_mem 1 1 2 j (taylorNormTable_mem 1 1 j) (remainderData2_11_pre j).1 (remainderData2_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData3.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData3.lean new file mode 100644 index 0000000000000000000000000000000000000000..d54c5c78741c72b484ee4b28d6c2aa6a4041c4c2 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData3.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData3_00 : Fin 31 → RI := ![⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨-2,2⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩] +lemma remainderData3_00_calc (j : Fin 31) : remainderBox 0 0 3 j (taylorNormTable 0 0 j)=remainderData3_00 j := by + revert j + decide +kernel +lemma remainderData3_00_pre (j : Fin 31) : (remainderExpInput 0 0 3 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 3).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData3_00_mem (j : Fin 31) : (remainderData3_00 j).Mem (remainderWave 0 0 (nearNode 3) (nearRadius 3) (frequency j)) := by + rw [← remainderData3_00_calc] + exact remainderBox_mem 0 0 3 j (taylorNormTable_mem 0 0 j) (remainderData3_00_pre j).1 (remainderData3_00_pre j).2 +def remainderData3_01 : Fin 31 → RI := ![⟨1418617953811944071968196930405730611332050822137134474,1418617953811944071968196930405730611332050822137262047⟩,⟨1186625506225787861003528838599887276752830750517890548,1186625506225787861003528838599887276752830750518003272⟩,⟨810266664575432675004521506349056251498709577777886722,810266664575432675004521506349056251498709577777968587⟩,⟨425141018527348920913736524122549237375550002929051157,425141018527348920913736524122549237375550002929097191⟩,⟨158581000838217648079496712704675486963402297304536012,158581000838217648079496712704675486963402297304554576⟩,⟨38086683621708192299489587166931966336482296684255324,38086683621708192299489587166931966336482296684260192⟩,⟨5204697513556562711354526662346747994156482652056428,5204697513556562711354526662346747994156482652057169⟩,⟨348776209415150267820009164455506677104061464756680,348776209415150267820009164455506677104061464756775⟩,⟨9708519583978338784495453720485856553899137802068,9708519583978338784495453720485856553899137802352⟩,⟨95927276401506290366565502258135892195113337325,95927276401506290366565502258135892195113339372⟩,⟨308327065135105782552731238806012329650018407,308327065135105782552731238806012329650033557⟩,⟨355877681898168251974688344325165635678636,355877681898168251974688344325165635784416⟩,⟨232967272107666233455278234980282155567,232967272107666233455278234980282779337⟩,⟨228086732459251905465788739421322414,228086732459251905465788739424001456⟩,⟨1382271860794403353054385036299923,1382271860794403353054385043383799⟩,⟨206959702109490781554785848872369,206959702109490781554785858863813⟩,⟨1382271860794403353054385036299923,1382271860794403353054385043383799⟩,⟨228086732459251905465788739421322414,228086732459251905465788739424001456⟩,⟨232967272107666233455278234980282155567,232967272107666233455278234980282779337⟩,⟨355877681898168251974688344325165635678636,355877681898168251974688344325165635784416⟩,⟨308327065135105782552731238806012329650018407,308327065135105782552731238806012329650033557⟩,⟨95927276401506290366565502258135892195113337325,95927276401506290366565502258135892195113339372⟩,⟨9708519583978338784495453720485856553899137802068,9708519583978338784495453720485856553899137802352⟩,⟨348776209415150267820009164455506677104061464756680,348776209415150267820009164455506677104061464756775⟩,⟨5204697513556562711354526662346747994156482652056428,5204697513556562711354526662346747994156482652057169⟩,⟨38086683621708192299489587166931966336482296684255324,38086683621708192299489587166931966336482296684260192⟩,⟨158581000838217648079496712704675486963402297304536012,158581000838217648079496712704675486963402297304554576⟩,⟨425141018527348920913736524122549237375550002929051157,425141018527348920913736524122549237375550002929097191⟩,⟨810266664575432675004521506349056251498709577777886722,810266664575432675004521506349056251498709577777968587⟩,⟨1186625506225787861003528838599887276752830750517890548,1186625506225787861003528838599887276752830750518003272⟩,⟨1418617953811944071968196930405730611332050822137134474,1418617953811944071968196930405730611332050822137262047⟩] +lemma remainderData3_01_calc (j : Fin 31) : remainderBox 0 1 3 j (taylorNormTable 0 1 j)=remainderData3_01 j := by + revert j + decide +kernel +lemma remainderData3_01_pre (j : Fin 31) : (remainderExpInput 0 1 3 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 3).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData3_01_mem (j : Fin 31) : (remainderData3_01 j).Mem (remainderWave 0 1 (nearNode 3) (nearRadius 3) (frequency j)) := by + rw [← remainderData3_01_calc] + exact remainderBox_mem 0 1 3 j (taylorNormTable_mem 0 1 j) (remainderData3_01_pre j).1 (remainderData3_01_pre j).2 +def remainderData3_10 : Fin 31 → RI := ![⟨22299148904757917343369062667557947759474837830836,22299148904757917343369062667557947759474837830841⟩,⟨4939990413827529755771238199483343581119658064266,4939990413827529755771238199483343581119658064269⟩,⟨993853833368164746120544518699269653788325198842,993853833368164746120544518699269653788325198844⟩,⟨179418718207919600656348550844093583385600123810,179418718207919600656348550844093583385600123812⟩,⟨28661798574241852282837349098566434372694520849,28661798574241852282837349098566434372694520851⟩,⟨3986804254521202588974457554160615825722880714,3986804254521202588974457554160615825722880716⟩,⟨474082721346629714825698101465428921211068869,474082721346629714825698101465428921211068871⟩,⟨47228906274601519373210239609766988346225520,47228906274601519373210239609766988346225522⟩,⟨3861403166099455169833951649906155843730542,3861403166099455169833951649906155843730544⟩,⟨254760749892288179604095176384705911904196,254760749892288179604095176384705911904198⟩,⟨13518890999939071459630300635725257402076,13518890999939071459630300635725257402078⟩,⟨596253692225659461255585721502508739374,596253692225659461255585721502508739376⟩,⟨24549022723188371290308352562712079417,24549022723188371290308352562712079419⟩,⟨1249779822296416171916688386386489944,1249779822296416171916688386386489946⟩,⟨132656383311975944403120915107173827,132656383311975944403120915107173829⟩,⟨56341797030392836767824358040299364,56341797030392836767824358040299366⟩,⟨132656383311975944403120915107173827,132656383311975944403120915107173829⟩,⟨1249779822296416171916688386386489944,1249779822296416171916688386386489946⟩,⟨24549022723188371290308352562712079417,24549022723188371290308352562712079419⟩,⟨596253692225659461255585721502508739374,596253692225659461255585721502508739376⟩,⟨13518890999939071459630300635725257402076,13518890999939071459630300635725257402078⟩,⟨254760749892288179604095176384705911904196,254760749892288179604095176384705911904198⟩,⟨3861403166099455169833951649906155843730542,3861403166099455169833951649906155843730544⟩,⟨47228906274601519373210239609766988346225520,47228906274601519373210239609766988346225522⟩,⟨474082721346629714825698101465428921211068869,474082721346629714825698101465428921211068871⟩,⟨3986804254521202588974457554160615825722880714,3986804254521202588974457554160615825722880716⟩,⟨28661798574241852282837349098566434372694520849,28661798574241852282837349098566434372694520851⟩,⟨179418718207919600656348550844093583385600123810,179418718207919600656348550844093583385600123812⟩,⟨993853833368164746120544518699269653788325198842,993853833368164746120544518699269653788325198844⟩,⟨4939990413827529755771238199483343581119658064266,4939990413827529755771238199483343581119658064269⟩,⟨22299148904757917343369062667557947759474837830836,22299148904757917343369062667557947759474837830841⟩] +lemma remainderData3_10_calc (j : Fin 31) : remainderBox 1 0 3 j (taylorNormTable 1 0 j)=remainderData3_10 j := by + revert j + decide +kernel +lemma remainderData3_10_pre (j : Fin 31) : (remainderExpInput 1 0 3 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 3).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData3_10_mem (j : Fin 31) : (remainderData3_10 j).Mem (remainderWave 1 0 (nearNode 3) (nearRadius 3) (frequency j)) := by + rw [← remainderData3_10_calc] + exact remainderBox_mem 1 0 3 j (taylorNormTable_mem 1 0 j) (remainderData3_10_pre j).1 (remainderData3_10_pre j).2 +def remainderData3_11 : Fin 31 → RI := ![⟨857150283671077402210325251036123174105245876582100,857150283671077402210325251036123174105245876582189⟩,⟨503227834741909234731340837026391129986502778668820,503227834741909234731340837026391129986502778668877⟩,⟨248934611913562414911183442277411384144225928274428,248934611913562414911183442277411384144225928274459⟩,⟨100933969961227170716575109118227505585527222010138,100933969961227170716575109118227505585527222010153⟩,⟨32605406815053973225632143276678127745327320892503,32605406815053973225632143276678127745327320892509⟩,⟨8170253949997494769194820555412940754159173064400,8170253949997494769194820555412940754159173064403⟩,⟨1555264833862486668372971234018309462360594044042,1555264833862486668372971234018309462360594044045⟩,⟨222977431648498550140824079059542513959699253188,222977431648498550140824079059542513959699253191⟩,⟨24387299694320781749616657115017267821000291864,24387299694320781749616657115017267821000291867⟩,⟨2129865174890430757543405881789470146407260066,2129865174890430757543405881789470146407260068⟩,⟨162626520883832371020517864160763789654468107,162626520883832371020517864160763789654468110⟩,⟨12539591541241562124733170577256641054882399,12539591541241562124733170577256641054882405⟩,⟨1187862076835538357388350829852678312906435,1187862076835538357388350829852678312906444⟩,⟨173813919688238258726868089672811382960471,173813919688238258726868089672811382960487⟩,⟨49092069590199730014777374374203165124687,49092069590199730014777374374203165124708⟩,⟨31560376455436284112819468734846903394098,31560376455436284112819468734846903394121⟩,⟨49092069590199730014777374374203165124687,49092069590199730014777374374203165124708⟩,⟨173813919688238258726868089672811382960471,173813919688238258726868089672811382960487⟩,⟨1187862076835538357388350829852678312906435,1187862076835538357388350829852678312906444⟩,⟨12539591541241562124733170577256641054882399,12539591541241562124733170577256641054882405⟩,⟨162626520883832371020517864160763789654468107,162626520883832371020517864160763789654468110⟩,⟨2129865174890430757543405881789470146407260066,2129865174890430757543405881789470146407260068⟩,⟨24387299694320781749616657115017267821000291864,24387299694320781749616657115017267821000291867⟩,⟨222977431648498550140824079059542513959699253188,222977431648498550140824079059542513959699253191⟩,⟨1555264833862486668372971234018309462360594044042,1555264833862486668372971234018309462360594044045⟩,⟨8170253949997494769194820555412940754159173064400,8170253949997494769194820555412940754159173064403⟩,⟨32605406815053973225632143276678127745327320892503,32605406815053973225632143276678127745327320892509⟩,⟨100933969961227170716575109118227505585527222010138,100933969961227170716575109118227505585527222010153⟩,⟨248934611913562414911183442277411384144225928274428,248934611913562414911183442277411384144225928274459⟩,⟨503227834741909234731340837026391129986502778668820,503227834741909234731340837026391129986502778668877⟩,⟨857150283671077402210325251036123174105245876582100,857150283671077402210325251036123174105245876582189⟩] +lemma remainderData3_11_calc (j : Fin 31) : remainderBox 1 1 3 j (taylorNormTable 1 1 j)=remainderData3_11 j := by + revert j + decide +kernel +lemma remainderData3_11_pre (j : Fin 31) : (remainderExpInput 1 1 3 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 3).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData3_11_mem (j : Fin 31) : (remainderData3_11 j).Mem (remainderWave 1 1 (nearNode 3) (nearRadius 3) (frequency j)) := by + rw [← remainderData3_11_calc] + exact remainderBox_mem 1 1 3 j (taylorNormTable_mem 1 1 j) (remainderData3_11_pre j).1 (remainderData3_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData4.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData4.lean new file mode 100644 index 0000000000000000000000000000000000000000..26cd16da731f5b2573345184c8aea567aa9e36b8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData4.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData4_00 : Fin 31 → RI := ![⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨-2,2⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩] +lemma remainderData4_00_calc (j : Fin 31) : remainderBox 0 0 4 j (taylorNormTable 0 0 j)=remainderData4_00 j := by + revert j + decide +kernel +lemma remainderData4_00_pre (j : Fin 31) : (remainderExpInput 0 0 4 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 4).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData4_00_mem (j : Fin 31) : (remainderData4_00 j).Mem (remainderWave 0 0 (nearNode 4) (nearRadius 4) (frequency j)) := by + rw [← remainderData4_00_calc] + exact remainderBox_mem 0 0 4 j (taylorNormTable_mem 0 0 j) (remainderData4_00_pre j).1 (remainderData4_00_pre j).2 +def remainderData4_01 : Fin 31 → RI := ![⟨356879830183433655329128003452498831258546857707489275,356879830183433655329128003452498831258546857707522972⟩,⟨192872156708128669706114499583642793210207542404573722,192872156708128669706114499583642793210207542404593195⟩,⟨78534229408556310762307038048573778586800443303660866,78534229408556310762307038048573778586800443303669408⟩,⟨22258400109523707972295901195517634489209149355037961,22258400109523707972295901195517634489209149355040593⟩,⟨3968238831682618906740813112193096219237911642485598,3968238831682618906740813112193096219237911642486116⟩,⟨391452268612725425460859419720024505491986151660332,391452268612725425460859419720024505491986151660391⟩,⟨18222068330342276839077442306903767514952778933721,18222068330342276839077442306903767514952778933732⟩,⟨330969050195172324178472181474351234419730131711,330969050195172324178472181474351234419730131754⟩,⟨1900939376060730929509817698671601128524017651,1900939376060730929509817698671601128524017930⟩,⟨2839765695450514358955105105162644065845297,2839765695450514358955105105162644065847344⟩,⟨998431376799872619933999657859966183455,998431376799872619933999657859966198605⟩,⟨95744116566571680448374159583473232,95744116566571680448374159583579151⟩,⟨4648067659543681998687714261608,4648067659543681998687714885381⟩,⟨414419632120785413806478013,414419632120785413809157055⟩,⟨442237729590370740451018,442237729590370747534893⟩,⟨34887568377565399363629,34887568377565409355073⟩,⟨442237729590370740451018,442237729590370747534893⟩,⟨414419632120785413806478013,414419632120785413809157055⟩,⟨4648067659543681998687714261608,4648067659543681998687714885381⟩,⟨95744116566571680448374159583473232,95744116566571680448374159583579151⟩,⟨998431376799872619933999657859966183455,998431376799872619933999657859966198605⟩,⟨2839765695450514358955105105162644065845297,2839765695450514358955105105162644065847344⟩,⟨1900939376060730929509817698671601128524017651,1900939376060730929509817698671601128524017930⟩,⟨330969050195172324178472181474351234419730131711,330969050195172324178472181474351234419730131754⟩,⟨18222068330342276839077442306903767514952778933721,18222068330342276839077442306903767514952778933732⟩,⟨391452268612725425460859419720024505491986151660332,391452268612725425460859419720024505491986151660391⟩,⟨3968238831682618906740813112193096219237911642485598,3968238831682618906740813112193096219237911642486116⟩,⟨22258400109523707972295901195517634489209149355037961,22258400109523707972295901195517634489209149355040593⟩,⟨78534229408556310762307038048573778586800443303660866,78534229408556310762307038048573778586800443303669408⟩,⟨192872156708128669706114499583642793210207542404573722,192872156708128669706114499583642793210207542404593195⟩,⟨356879830183433655329128003452498831258546857707489275,356879830183433655329128003452498831258546857707522972⟩] +lemma remainderData4_01_calc (j : Fin 31) : remainderBox 0 1 4 j (taylorNormTable 0 1 j)=remainderData4_01 j := by + revert j + decide +kernel +lemma remainderData4_01_pre (j : Fin 31) : (remainderExpInput 0 1 4 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 4).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData4_01_mem (j : Fin 31) : (remainderData4_01 j).Mem (remainderWave 0 1 (nearNode 4) (nearRadius 4) (frequency j)) := by + rw [← remainderData4_01_calc] + exact remainderBox_mem 0 1 4 j (taylorNormTable_mem 0 1 j) (remainderData4_01_pre j).1 (remainderData4_01_pre j).2 +def remainderData4_10 : Fin 31 → RI := ![⟨6346550586565268334383715930282122511211547843648,6346550586565268334383715930282122511211547843652⟩,⟨1405968415763815547145228352856287716422141030846,1405968415763815547145228352856287716422141030848⟩,⟨282860285657675507308881867497645738389495468496,282860285657675507308881867497645738389495468499⟩,⟨51064279455091719242211144604947068669327577588,51064279455091719242211144604947068669327577590⟩,⟨8157421403404228691411764728236783640623563710,8157421403404228691411764728236783640623563712⟩,⟨1134682538249418116266883033749787739084877303,1134682538249418116266883033749787739084877305⟩,⟨134928466825966303296099950455899145239440074,134928466825966303296099950455899145239440076⟩,⟨13441797447074466312015022083327127570927269,13441797447074466312015022083327127570927271⟩,⟨1098992191739863554575805645925920000298443,1098992191739863554575805645925920000298446⟩,⟨72507340686788509409431466422356015509546,72507340686788509409431466422356015509548⟩,⟨3847605393902215366640088324424472881808,3847605393902215366640088324424472881810⟩,⟨169699491056766291106416608199837568822,169699491056766291106416608199837568824⟩,⟨6986886146592448289062704409773189802,6986886146592448289062704409773189804⟩,⟨355699264494366831216246090951948807,355699264494366831216246090951948809⟩,⟨37755272675030728950623855688662888,37755272675030728950623855688662890⟩,⟨16035413123551355879504473217776958,16035413123551355879504473217776960⟩,⟨37755272675030728950623855688662888,37755272675030728950623855688662890⟩,⟨355699264494366831216246090951948807,355699264494366831216246090951948809⟩,⟨6986886146592448289062704409773189802,6986886146592448289062704409773189804⟩,⟨169699491056766291106416608199837568822,169699491056766291106416608199837568824⟩,⟨3847605393902215366640088324424472881808,3847605393902215366640088324424472881810⟩,⟨72507340686788509409431466422356015509546,72507340686788509409431466422356015509548⟩,⟨1098992191739863554575805645925920000298443,1098992191739863554575805645925920000298446⟩,⟨13441797447074466312015022083327127570927269,13441797447074466312015022083327127570927271⟩,⟨134928466825966303296099950455899145239440074,134928466825966303296099950455899145239440076⟩,⟨1134682538249418116266883033749787739084877303,1134682538249418116266883033749787739084877305⟩,⟨8157421403404228691411764728236783640623563710,8157421403404228691411764728236783640623563712⟩,⟨51064279455091719242211144604947068669327577588,51064279455091719242211144604947068669327577590⟩,⟨282860285657675507308881867497645738389495468496,282860285657675507308881867497645738389495468499⟩,⟨1405968415763815547145228352856287716422141030846,1405968415763815547145228352856287716422141030848⟩,⟨6346550586565268334383715930282122511211547843648,6346550586565268334383715930282122511211547843652⟩] +lemma remainderData4_10_calc (j : Fin 31) : remainderBox 1 0 4 j (taylorNormTable 1 0 j)=remainderData4_10 j := by + revert j + decide +kernel +lemma remainderData4_10_pre (j : Fin 31) : (remainderExpInput 1 0 4 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 4).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData4_10_mem (j : Fin 31) : (remainderData4_10 j).Mem (remainderWave 1 0 (nearNode 4) (nearRadius 4) (frequency j)) := by + rw [← remainderData4_10_calc] + exact remainderBox_mem 1 0 4 j (taylorNormTable_mem 1 0 j) (remainderData4_10_pre j).1 (remainderData4_10_pre j).2 +def remainderData4_11 : Fin 31 → RI := ![⟨73845558770869724905556787822437871867591913091524,73845558770869724905556787822437871867591913091535⟩,⟨27422646506045345894130853782416280684200772679581,27422646506045345894130853782416280684200772679587⟩,⟨8088400707285223314086217919081469569768595711911,8088400707285223314086217919081469569768595711913⟩,⟨1830385080514794608591295269313673506096908536420,1830385080514794608591295269313673506096908536422⟩,⟨306816566565563705604352221629773264044267849179,306816566565563705604352221629773264044267849181⟩,⟨36883173045708889173515619386901444854338150860,36883173045708889173515619386901444854338150862⟩,⟨3104500540310876903108186126481420227431671404,3104500540310876903108186126481420227431671407⟩,⟨181683869120605296014318141491531537894671005,181683869120605296014318141491531537894671007⟩,⟨7555961172544002158132469957967360442831937,7555961172544002158132469957967360442831940⟩,⟨238473334214148365299270016572360195537062,238473334214148365299270016572360195537065⟩,⟨6473119491958285110964797282017438635013,6473119491958285110964797282017438635018⟩,⟨183729108986148103850953216681212043554,183729108986148103850953216681212043560⟩,⟨7093928291366187932706523737006986399,7093928291366187932706523737006986410⟩,⟨505673365978640527563607558861776822,505673365978640527563607558861776838⟩,⟨89473338030942560625541361654917473,89473338030942560625541361654917493⟩,⟨48894171201972820246534913680948356,48894171201972820246534913680948380⟩,⟨89473338030942560625541361654917473,89473338030942560625541361654917493⟩,⟨505673365978640527563607558861776822,505673365978640527563607558861776838⟩,⟨7093928291366187932706523737006986399,7093928291366187932706523737006986410⟩,⟨183729108986148103850953216681212043554,183729108986148103850953216681212043560⟩,⟨6473119491958285110964797282017438635013,6473119491958285110964797282017438635018⟩,⟨238473334214148365299270016572360195537062,238473334214148365299270016572360195537065⟩,⟨7555961172544002158132469957967360442831937,7555961172544002158132469957967360442831940⟩,⟨181683869120605296014318141491531537894671005,181683869120605296014318141491531537894671007⟩,⟨3104500540310876903108186126481420227431671404,3104500540310876903108186126481420227431671407⟩,⟨36883173045708889173515619386901444854338150860,36883173045708889173515619386901444854338150862⟩,⟨306816566565563705604352221629773264044267849179,306816566565563705604352221629773264044267849181⟩,⟨1830385080514794608591295269313673506096908536420,1830385080514794608591295269313673506096908536422⟩,⟨8088400707285223314086217919081469569768595711911,8088400707285223314086217919081469569768595711913⟩,⟨27422646506045345894130853782416280684200772679581,27422646506045345894130853782416280684200772679587⟩,⟨73845558770869724905556787822437871867591913091524,73845558770869724905556787822437871867591913091535⟩] +lemma remainderData4_11_calc (j : Fin 31) : remainderBox 1 1 4 j (taylorNormTable 1 1 j)=remainderData4_11 j := by + revert j + decide +kernel +lemma remainderData4_11_pre (j : Fin 31) : (remainderExpInput 1 1 4 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 4).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData4_11_mem (j : Fin 31) : (remainderData4_11 j).Mem (remainderWave 1 1 (nearNode 4) (nearRadius 4) (frequency j)) := by + rw [← remainderData4_11_calc] + exact remainderBox_mem 1 1 4 j (taylorNormTable_mem 1 1 j) (remainderData4_11_pre j).1 (remainderData4_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData5.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData5.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9db8cb35578ecdcb5f5e0a1666126e9b6750b0c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData5.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData5_00 : Fin 31 → RI := ![⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨-2,2⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩] +lemma remainderData5_00_calc (j : Fin 31) : remainderBox 0 0 5 j (taylorNormTable 0 0 j)=remainderData5_00 j := by + revert j + decide +kernel +lemma remainderData5_00_pre (j : Fin 31) : (remainderExpInput 0 0 5 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 5).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData5_00_mem (j : Fin 31) : (remainderData5_00 j).Mem (remainderWave 0 0 (nearNode 5) (nearRadius 5) (frequency j)) := by + rw [← remainderData5_00_calc] + exact remainderBox_mem 0 0 5 j (taylorNormTable_mem 0 0 j) (remainderData5_00_pre j).1 (remainderData5_00_pre j).2 +def remainderData5_01 : Fin 31 → RI := ![⟨45030506414819252471630631375239756583548939285413690,45030506414819252471630631375239756583548939285418249⟩,⟨12638726715917266662976377067776120845358218423470811,12638726715917266662976377067776120845358218423472202⟩,⟨2369766244824924436261136948149448448475624642347989,2369766244824924436261136948149448448475624642348277⟩,⟨266646169492528945664488280383840142951565766722305,266646169492528945664488280383840142951565766722342⟩,⟨15707887236940504598580327878167888599430792470381,15707887236940504598580327878167888599430792470387⟩,⟨407884590380870670161210944773888964351835971975,407884590380870670161210944773888964351835971980⟩,⟨3774860750526489121247606334905364977264025518,3774860750526489121247606334905364977264025525⟩,⟨9674937742699188641381096015500153152447597,9674937742699188641381096015500153152447641⟩,⟨5208241939223633737281736559773847687699,5208241939223633737281736559773847687979⟩,⟨457396777373739347798257032054677194,457396777373739347798257032054679243⟩,⟨5818058427192065979289269419110,5818058427192065979289269434283⟩,⟨13360696881349958718301652,13360696881349958718407572⟩,⟨13099017774869903110,13099017774870526880⟩,⟨32095987673995,32095990353040⟩,⟨2527343815,2534427690⟩,⟨69878167,79869611⟩,⟨2527343815,2534427690⟩,⟨32095987673995,32095990353040⟩,⟨13099017774869903110,13099017774870526880⟩,⟨13360696881349958718301652,13360696881349958718407572⟩,⟨5818058427192065979289269419110,5818058427192065979289269434283⟩,⟨457396777373739347798257032054677194,457396777373739347798257032054679243⟩,⟨5208241939223633737281736559773847687699,5208241939223633737281736559773847687979⟩,⟨9674937742699188641381096015500153152447597,9674937742699188641381096015500153152447641⟩,⟨3774860750526489121247606334905364977264025518,3774860750526489121247606334905364977264025525⟩,⟨407884590380870670161210944773888964351835971975,407884590380870670161210944773888964351835971980⟩,⟨15707887236940504598580327878167888599430792470381,15707887236940504598580327878167888599430792470387⟩,⟨266646169492528945664488280383840142951565766722305,266646169492528945664488280383840142951565766722342⟩,⟨2369766244824924436261136948149448448475624642347989,2369766244824924436261136948149448448475624642348277⟩,⟨12638726715917266662976377067776120845358218423470811,12638726715917266662976377067776120845358218423472202⟩,⟨45030506414819252471630631375239756583548939285413690,45030506414819252471630631375239756583548939285418249⟩] +lemma remainderData5_01_calc (j : Fin 31) : remainderBox 0 1 5 j (taylorNormTable 0 1 j)=remainderData5_01 j := by + revert j + decide +kernel +lemma remainderData5_01_pre (j : Fin 31) : (remainderExpInput 0 1 5 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 5).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData5_01_mem (j : Fin 31) : (remainderData5_01 j).Mem (remainderWave 0 1 (nearNode 5) (nearRadius 5) (frequency j)) := by + rw [← remainderData5_01_calc] + exact remainderBox_mem 0 1 5 j (taylorNormTable_mem 0 1 j) (remainderData5_01_pre j).1 (remainderData5_01_pre j).2 +def remainderData5_10 : Fin 31 → RI := ![⟨963633598121895124589867611747316688010257810020,963633598121895124589867611747316688010257810023⟩,⟨213476341966961322327802734031484912525051203629,213476341966961322327802734031484912525051203631⟩,⟨42948318321308596723794125749571531117551402590,42948318321308596723794125749571531117551402592⟩,⟨7753385823627823526701432892731436562508359919,7753385823627823526701432892731436562508359921⟩,⟨1238588620879991409227618052988850889764230031,1238588620879991409227618052988850889764230033⟩,⟨172285433188538705566607867251320377184954250,172285433188538705566607867251320377184954252⟩,⟨20486971970539972061619998796757615703924340,20486971970539972061619998796757615703924342⟩,⟨2040946095437990403306075761418093244226073,2040946095437990403306075761418093244226075⟩,⟨166866360803293235961993410235273985583018,166866360803293235961993410235273985583020⟩,⟨11009210222662666379087245758530694747156,11009210222662666379087245758530694747158⟩,⟨584204250688213332561660841110031374854,584204250688213332561660841110031374856⟩,⟨25766458320312063289288505128177613130,25766458320312063289288505128177613132⟩,⟨1060859461415349928951639115320666486,1060859461415349928951639115320666488⟩,⟨54007883088429135596879375012968586,54007883088429135596879375012968588⟩,⟨5732602105611369552546445844482329,5732602105611369552546445844482331⟩,⟨2434749811705442114912473718960664,2434749811705442114912473718960666⟩,⟨5732602105611369552546445844482329,5732602105611369552546445844482331⟩,⟨54007883088429135596879375012968586,54007883088429135596879375012968588⟩,⟨1060859461415349928951639115320666486,1060859461415349928951639115320666488⟩,⟨25766458320312063289288505128177613130,25766458320312063289288505128177613132⟩,⟨584204250688213332561660841110031374854,584204250688213332561660841110031374856⟩,⟨11009210222662666379087245758530694747156,11009210222662666379087245758530694747158⟩,⟨166866360803293235961993410235273985583018,166866360803293235961993410235273985583020⟩,⟨2040946095437990403306075761418093244226073,2040946095437990403306075761418093244226075⟩,⟨20486971970539972061619998796757615703924340,20486971970539972061619998796757615703924342⟩,⟨172285433188538705566607867251320377184954250,172285433188538705566607867251320377184954252⟩,⟨1238588620879991409227618052988850889764230031,1238588620879991409227618052988850889764230033⟩,⟨7753385823627823526701432892731436562508359919,7753385823627823526701432892731436562508359921⟩,⟨42948318321308596723794125749571531117551402590,42948318321308596723794125749571531117551402592⟩,⟨213476341966961322327802734031484912525051203629,213476341966961322327802734031484912525051203631⟩,⟨963633598121895124589867611747316688010257810020,963633598121895124589867611747316688010257810023⟩] +lemma remainderData5_10_calc (j : Fin 31) : remainderBox 1 0 5 j (taylorNormTable 1 0 j)=remainderData5_10 j := by + revert j + decide +kernel +lemma remainderData5_10_pre (j : Fin 31) : (remainderExpInput 1 0 5 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 5).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData5_10_mem (j : Fin 31) : (remainderData5_10 j).Mem (remainderWave 1 0 (nearNode 5) (nearRadius 5) (frequency j)) := by + rw [← remainderData5_10_calc] + exact remainderBox_mem 1 0 5 j (taylorNormTable_mem 1 0 j) (remainderData5_10_pre j).1 (remainderData5_10_pre j).2 +def remainderData5_11 : Fin 31 → RI := ![⟨1867348997284998235093457553432198445549612774098,1867348997284998235093457553432198445549612774100⟩,⟨348840123048548645978443602075696725206957776254,348840123048548645978443602075696725206957776256⟩,⟨47372763315912009210468629543313504810010534012,47372763315912009210468629543313504810010534015⟩,⟨4469923956998035358602298614488027667094123558,4469923956998035358602298614488027667094123560⟩,⟨280067412651989562082684037555337127797190588,280067412651989562082684037555337127797190590⟩,⟨11187095797608404770346552254744727271786936,11187095797608404770346552254744727271786938⟩,⟨276868036655955272063778580717700673947745,276868036655955272063778580717700673947748⟩,⟨4225708761129744674743549521203250586307,4225708761129744674743549521203250586309⟩,⟨41207732809869765390402731600390305005,41207732809869765390402731600390305007⟩,⟨282534437643661450247874699354743347,282534437643661450247874699354743350⟩,⟨1625537539791590473192738727999072,1625537539791590473192738727999076⟩,⟨10304331855352292259384157166489,10304331855352292259384157166495⟩,⟨103530416005792392828088876619,103530416005792392828088876628⟩,⟨2509275632467824146325402394,2509275632467824146325402410⟩,⟨220149188283790570629625134,220149188283790570629625153⟩,⟨94282146151633480550239707,94282146151633480550239730⟩,⟨220149188283790570629625134,220149188283790570629625153⟩,⟨2509275632467824146325402394,2509275632467824146325402410⟩,⟨103530416005792392828088876619,103530416005792392828088876628⟩,⟨10304331855352292259384157166489,10304331855352292259384157166495⟩,⟨1625537539791590473192738727999072,1625537539791590473192738727999076⟩,⟨282534437643661450247874699354743347,282534437643661450247874699354743350⟩,⟨41207732809869765390402731600390305005,41207732809869765390402731600390305007⟩,⟨4225708761129744674743549521203250586307,4225708761129744674743549521203250586309⟩,⟨276868036655955272063778580717700673947745,276868036655955272063778580717700673947748⟩,⟨11187095797608404770346552254744727271786936,11187095797608404770346552254744727271786938⟩,⟨280067412651989562082684037555337127797190588,280067412651989562082684037555337127797190590⟩,⟨4469923956998035358602298614488027667094123558,4469923956998035358602298614488027667094123560⟩,⟨47372763315912009210468629543313504810010534012,47372763315912009210468629543313504810010534015⟩,⟨348840123048548645978443602075696725206957776254,348840123048548645978443602075696725206957776256⟩,⟨1867348997284998235093457553432198445549612774098,1867348997284998235093457553432198445549612774100⟩] +lemma remainderData5_11_calc (j : Fin 31) : remainderBox 1 1 5 j (taylorNormTable 1 1 j)=remainderData5_11 j := by + revert j + decide +kernel +lemma remainderData5_11_pre (j : Fin 31) : (remainderExpInput 1 1 5 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 5).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData5_11_mem (j : Fin 31) : (remainderData5_11 j).Mem (remainderWave 1 1 (nearNode 5) (nearRadius 5) (frequency j)) := by + rw [← remainderData5_11_calc] + exact remainderBox_mem 1 1 5 j (taylorNormTable_mem 1 1 j) (remainderData5_11_pre j).1 (remainderData5_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderData6.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderData6.lean new file mode 100644 index 0000000000000000000000000000000000000000..c74a5df862b6a1ba0059a6bd6d738e03be063c5e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderData6.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.Triangular.Signs.RemainderBoxes +import OAI.Analysis.Triangular.Signs.RemainderNorm + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderData6_00 : Fin 31 → RI := ![⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨-2,2⟩,⟨713452250561951767889359,713452250561951767889361⟩,⟨6051612134727111909764742212511,6051612134727111909764742212513⟩,⟨68681587883296366977423005735291797,68681587883296366977423005735291799⟩,⟨51922642841345563082377611901927701689,51922642841345563082377611901927701691⟩,⟨8897522877618511602453277456630480094678,8897522877618511602453277456630480094681⟩,⟨596317578958743104080445539935387944136157,596317578958743104080445539935387944136159⟩,⟨20909939989024102467612996236431366518115444,20909939989024102467612996236431366518115446⟩,⟨456380582804495190010573309644175873552510810,456380582804495190010573309644175873552510812⟩,⟨6935165067359228808695657332929407305033901845,6935165067359228808695657332929407305033901847⟩,⟨79207126564394222925663549427388453975568598340,79207126564394222925663549427388453975568598343⟩,⟨718036136889165317671468700419631094081695705916,718036136889165317671468700419631094081695705918⟩,⟨5378983629188006688820675827628202030899927933392,5378983629188006688820675827628202030899927933394⟩,⟨34333186171640899806213241720951529438615730443114,34333186171640899806213241720951529438615730443118⟩,⟨191213010972738726252905144908417001606006462373738,191213010972738726252905144908417001606006462373754⟩,⟨946889243390580745138394265960910445429739348252548,946889243390580745138394265960910445429739348252620⟩] +lemma remainderData6_00_calc (j : Fin 31) : remainderBox 0 0 6 j (taylorNormTable 0 0 j)=remainderData6_00 j := by + revert j + decide +kernel +lemma remainderData6_00_pre (j : Fin 31) : (remainderExpInput 0 0 6 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 6).mul (taylorNormTable 0 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData6_00_mem (j : Fin 31) : (remainderData6_00 j).Mem (remainderWave 0 0 (nearNode 6) (nearRadius 6) (frequency j)) := by + rw [← remainderData6_00_calc] + exact remainderBox_mem 0 0 6 j (taylorNormTable_mem 0 0 j) (remainderData6_00_pre j).1 (remainderData6_00_pre j).2 +def remainderData6_01 : Fin 31 → RI := ![⟨22585780696832380372058333410362792647633894175819287,22585780696832380372058333410362792647633894175821626⟩,⟨5095434838777358610894570160895732351341250189058659,5095434838777358610894570160895732351341250189059239⟩,⟨737770042464751110449133098468432262138065021764895,737770042464751110449133098468432262138065021764989⟩,⟨61012078070969238035073641578786132649292447739590,61012078070969238035073641578786132649292447739602⟩,⟨2484798058281440318033957595379483795315656237163,2484798058281440318033957595379483795315656237166⟩,⟨41351391293335441332535202034322544840570086369,41351391293335441332535202034322544840570086374⟩,⟨223358263237387023454267897634364070242320279,223358263237387023454267897634364070242320288⟩,⟨298035806603969542290958586878909650730022,298035806603969542290958586878909650730065⟩,⟨72878391415409682741506732025658013060,72878391415409682741506732025658013342⟩,⟨2488646993453753842323441149705546,2488646993453753842323441149707591⟩,⟨10469630730206957659388905545,10469630730206957659388920694⟩,⟨6930024703426257628953,6930024703426257734873⟩,⟨1850237568038260,1850237568661367⟩,⟨1366681835,1369360880⟩,⟨-2363196,4720680⟩,⟨-3327901,6655802⟩,⟨-2363196,4720680⟩,⟨1366681835,1369360880⟩,⟨1850237568038260,1850237568661367⟩,⟨6930024703426257628953,6930024703426257734873⟩,⟨10469630730206957659388905545,10469630730206957659388920694⟩,⟨2488646993453753842323441149705546,2488646993453753842323441149707591⟩,⟨72878391415409682741506732025658013060,72878391415409682741506732025658013342⟩,⟨298035806603969542290958586878909650730022,298035806603969542290958586878909650730065⟩,⟨223358263237387023454267897634364070242320279,223358263237387023454267897634364070242320288⟩,⟨41351391293335441332535202034322544840570086369,41351391293335441332535202034322544840570086374⟩,⟨2484798058281440318033957595379483795315656237163,2484798058281440318033957595379483795315656237166⟩,⟨61012078070969238035073641578786132649292447739590,61012078070969238035073641578786132649292447739602⟩,⟨737770042464751110449133098468432262138065021764895,737770042464751110449133098468432262138065021764989⟩,⟨5095434838777358610894570160895732351341250189058659,5095434838777358610894570160895732351341250189059239⟩,⟨22585780696832380372058333410362792647633894175819287,22585780696832380372058333410362792647633894175821626⟩] +lemma remainderData6_01_calc (j : Fin 31) : remainderBox 0 1 6 j (taylorNormTable 0 1 j)=remainderData6_01 j := by + revert j + decide +kernel +lemma remainderData6_01_pre (j : Fin 31) : (remainderExpInput 0 1 6 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 6).mul (taylorNormTable 0 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData6_01_mem (j : Fin 31) : (remainderData6_01 j).Mem (remainderWave 0 1 (nearNode 6) (nearRadius 6) (frequency j)) := by + rw [← remainderData6_01_calc] + exact remainderBox_mem 0 1 6 j (taylorNormTable_mem 0 1 j) (remainderData6_01_pre j).1 (remainderData6_01_pre j).2 +def remainderData6_10 : Fin 31 → RI := ![⟨514087048773301169050728357458806103941178260794,514087048773301169050728357458806103941178260796⟩,⟨113887086169065769721787543454819216700293573100,113887086169065769721787543454819216700293573102⟩,⟨22912416356807979319667222071624746244962338666,22912416356807979319667222071624746244962338668⟩,⟨4136339002540028923897154886714278348554623564,4136339002540028923897154886714278348554623566⟩,⟨660772279000428807236674229231813453330031252,660772279000428807236674229231813453330031254⟩,⟨91912226874557320206035820013459285895129886,91912226874557320206035820013459285895129888⟩,⟨10929555568800307687609257471520566580570562,10929555568800307687609257471520566580570564⟩,⟨1088820436475054133904893756701934672058692,1088820436475054133904893756701934672058694⟩,⟨89021216292268202947619041187134024831858,89021216292268202947619041187134024831860⟩,⟨5873282546108965667710802695990325965604,5873282546108965667710802695990325965606⟩,⟨311666010506963273577446777707631868112,311666010506963273577446777707631868114⟩,⟨13746098663481757292738106927026753703,13746098663481757292738106927026753705⟩,⟨565955888986410937668869237556710921,565955888986410937668869237556710923⟩,⟨28812562452717537476834013701661454,28812562452717537476834013701661456⟩,⟨3058274954307448620001566325126026,3058274954307448620001566325126028⟩,⟨1298910029331159391841523622803546,1298910029331159391841523622803548⟩,⟨3058274954307448620001566325126026,3058274954307448620001566325126028⟩,⟨28812562452717537476834013701661454,28812562452717537476834013701661456⟩,⟨565955888986410937668869237556710921,565955888986410937668869237556710923⟩,⟨13746098663481757292738106927026753703,13746098663481757292738106927026753705⟩,⟨311666010506963273577446777707631868112,311666010506963273577446777707631868114⟩,⟨5873282546108965667710802695990325965604,5873282546108965667710802695990325965606⟩,⟨89021216292268202947619041187134024831858,89021216292268202947619041187134024831860⟩,⟨1088820436475054133904893756701934672058692,1088820436475054133904893756701934672058694⟩,⟨10929555568800307687609257471520566580570562,10929555568800307687609257471520566580570564⟩,⟨91912226874557320206035820013459285895129886,91912226874557320206035820013459285895129888⟩,⟨660772279000428807236674229231813453330031252,660772279000428807236674229231813453330031254⟩,⟨4136339002540028923897154886714278348554623564,4136339002540028923897154886714278348554623566⟩,⟨22912416356807979319667222071624746244962338666,22912416356807979319667222071624746244962338668⟩,⟨113887086169065769721787543454819216700293573100,113887086169065769721787543454819216700293573102⟩,⟨514087048773301169050728357458806103941178260794,514087048773301169050728357458806103941178260796⟩] +lemma remainderData6_10_calc (j : Fin 31) : remainderBox 1 0 6 j (taylorNormTable 1 0 j)=remainderData6_10 j := by + revert j + decide +kernel +lemma remainderData6_10_pre (j : Fin 31) : (remainderExpInput 1 0 6 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 6).mul (taylorNormTable 1 0 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData6_10_mem (j : Fin 31) : (remainderData6_10 j).Mem (remainderWave 1 0 (nearNode 6) (nearRadius 6) (frequency j)) := by + rw [← remainderData6_10_calc] + exact remainderBox_mem 1 0 6 j (taylorNormTable_mem 1 0 j) (remainderData6_10_pre j).1 (remainderData6_10_pre j).2 +def remainderData6_11 : Fin 31 → RI := ![⟨548099236003802137295755724077885398169742157690,548099236003802137295755724077885398169742157693⟩,⟨81432690929296480861385250328551003394612172443,81432690929296480861385250328551003394612172446⟩,⟨8539204318381225752574540616814191353358544868,8539204318381225752574540616814191353358544870⟩,⟨601939288813930285232129056820837802111373497,601939288813930285232129056820837802111373499⟩,⟨27167968841171101186454169048209702875774287,27167968841171101186454169048209702875774290⟩,⟨751646634676664815003199566307032776505343,751646634676664815003199566307032776505345⟩,⟨12369909286132495219473475160408430346734,12369909286132495219473475160408430346736⟩,⟨120622213131569569719409476723550500579,120622213131569569719409476723550500582⟩,⟨725340157126000576050042263383395546,725340157126000576050042263383395549⟩,⟨2989614880175040524390030602644912,2989614880175040524390030602644916⟩,⟨10255530484891463076853110600563,10255530484891463076853110600566⟩,⟨39442744487798429880909295006,39442744487798429880909295012⟩,⟨253004559253427205179986169,253004559253427205179986178⟩,⟨4279974015536724688908557,4279974015536724688908571⟩,⟨297206455256462615960983,297206455256462615961005⟩,⟨117351032984470545647860,117351032984470545647883⟩,⟨297206455256462615960983,297206455256462615961005⟩,⟨4279974015536724688908557,4279974015536724688908571⟩,⟨253004559253427205179986169,253004559253427205179986178⟩,⟨39442744487798429880909295006,39442744487798429880909295012⟩,⟨10255530484891463076853110600563,10255530484891463076853110600566⟩,⟨2989614880175040524390030602644912,2989614880175040524390030602644916⟩,⟨725340157126000576050042263383395546,725340157126000576050042263383395549⟩,⟨120622213131569569719409476723550500579,120622213131569569719409476723550500582⟩,⟨12369909286132495219473475160408430346734,12369909286132495219473475160408430346736⟩,⟨751646634676664815003199566307032776505343,751646634676664815003199566307032776505345⟩,⟨27167968841171101186454169048209702875774287,27167968841171101186454169048209702875774290⟩,⟨601939288813930285232129056820837802111373497,601939288813930285232129056820837802111373499⟩,⟨8539204318381225752574540616814191353358544868,8539204318381225752574540616814191353358544870⟩,⟨81432690929296480861385250328551003394612172443,81432690929296480861385250328551003394612172446⟩,⟨548099236003802137295755724077885398169742157690,548099236003802137295755724077885398169742157693⟩] +lemma remainderData6_11_calc (j : Fin 31) : remainderBox 1 1 6 j (taylorNormTable 1 1 j)=remainderData6_11 j := by + revert j + decide +kernel +lemma remainderData6_11_pre (j : Fin 31) : (remainderExpInput 1 1 6 j).normSq.hi ≤ scale*1024^2 ∧ 0<((RI.point 1).sub (((nearRadiusBox 6).mul (taylorNormTable 1 1 j)).divNat 24)).lo := by + revert j + decide +kernel +lemma remainderData6_11_mem (j : Fin 31) : (remainderData6_11 j).Mem (remainderWave 1 1 (nearNode 6) (nearRadius 6) (frequency j)) := by + rw [← remainderData6_11_calc] + exact remainderBox_mem 1 1 6 j (taylorNormTable_mem 1 1 j) (remainderData6_11_pre j).1 (remainderData6_11_pre j).2 +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderNorm.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff821ddf8a32d79023d45f020d0092220cb1329c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderNorm.lean @@ -0,0 +1,47 @@ +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorNorm00 : Fin 31 → RI := ![⟨2617993877991494365385536152732919070164307832812583333333330,2617993877991494365385536152732919070164307832812591666666672⟩,⟨2443460952792061407693167075884057798820020643958411111111106,2443460952792061407693167075884057798820020643958418888888893⟩,⟨2268928027592628450000797999035196527475733455104238888888886,2268928027592628450000797999035196527475733455104246111111116⟩,⟨2094395102393195492308428922186335256131446266250066666666662,2094395102393195492308428922186335256131446266250073333333337⟩,⟨1919862177193762534616059845337473984787159077395894444444442,1919862177193762534616059845337473984787159077395900555555561⟩,⟨1745329251994329576923690768488612713442871888541722222222218,1745329251994329576923690768488612713442871888541727777777782⟩,⟨1570796326794896619231321691639751442098584699687549999999994,1570796326794896619231321691639751442098584699687555000000002⟩,⟨1396263401595463661538952614790890170754297510833377777777774,1396263401595463661538952614790890170754297510833382222222226⟩,⟨1221730476396030703846583537942028899410010321979205555555550,1221730476396030703846583537942028899410010321979209444444447⟩,⟨1047197551196597746154214461093167628065723133125033333333330,1047197551196597746154214461093167628065723133125036666666671⟩,⟨872664625997164788461845384244306356721435944270861111111105,872664625997164788461845384244306356721435944270863888888892⟩,⟨698131700797731830769476307395445085377148755416688888888885,698131700797731830769476307395445085377148755416691111111115⟩,⟨523598775598298873077107230546583814032861566562516666666661,523598775598298873077107230546583814032861566562518333333337⟩,⟨349065850398865915384738153697722542688574377708344444444440,349065850398865915384738153697722542688574377708345555555561⟩,⟨174532925199432957692369076848861271344287188854172222222216,174532925199432957692369076848861271344287188854172777777785⟩,⟨0,1414213562373095048801688724210⟩,⟨174532925199432957692369076848861271344287188854172222222216,174532925199432957692369076848861271344287188854172777777785⟩,⟨349065850398865915384738153697722542688574377708344444444442,349065850398865915384738153697722542688574377708345555555563⟩,⟨523598775598298873077107230546583814032861566562516666666662,523598775598298873077107230546583814032861566562518333333338⟩,⟨698131700797731830769476307395445085377148755416688888888887,698131700797731830769476307395445085377148755416691111111117⟩,⟨872664625997164788461845384244306356721435944270861111111107,872664625997164788461845384244306356721435944270863888888893⟩,⟨1047197551196597746154214461093167628065723133125033333333331,1047197551196597746154214461093167628065723133125036666666672⟩,⟨1221730476396030703846583537942028899410010321979205555555551,1221730476396030703846583537942028899410010321979209444444448⟩,⟨1396263401595463661538952614790890170754297510833377777777775,1396263401595463661538952614790890170754297510833382222222227⟩,⟨1570796326794896619231321691639751442098584699687549999999999,1570796326794896619231321691639751442098584699687555000000007⟩,⟨1745329251994329576923690768488612713442871888541722222222219,1745329251994329576923690768488612713442871888541727777777783⟩,⟨1919862177193762534616059845337473984787159077395894444444443,1919862177193762534616059845337473984787159077395900555555562⟩,⟨2094395102393195492308428922186335256131446266250066666666663,2094395102393195492308428922186335256131446266250073333333338⟩,⟨2268928027592628450000797999035196527475733455104238888888887,2268928027592628450000797999035196527475733455104246111111117⟩,⟨2443460952792061407693167075884057798820020643958411111111107,2443460952792061407693167075884057798820020643958418888888894⟩,⟨2617993877991494365385536152732919070164307832812583333333331,2617993877991494365385536152732919070164307832812591666666673⟩] +lemma taylorNorm00_check (j : Fin 31) : 0≤(taylorNorm00 j).lo ∧ (taylorNorm00 j).lo*(taylorNorm00 j).lo ≤ scale*max 0 (taylorPhaseTable 0 0 j).normSq.lo ∧ scale*(taylorPhaseTable 0 0 j).normSq.hi ≤ (taylorNorm00 j).hi*(taylorNorm00 j).hi ∧ 0≤(taylorNorm00 j).hi := by + revert j + decide +kernel +lemma taylorNorm00_mem (j : Fin 31) : (taylorNorm00 j).Mem ‖taylorPhase 0 0 (frequency j)‖ := by + have hh := taylorNorm00_check j + exact CI.mem_norm (taylorPhaseTable_mem 0 0 j) hh.1 hh.2.1 hh.2.2.1 hh.2.2.2 +def taylorNorm01 : Fin 31 → RI := ![⟨4364114019078930395506949137035023305561809390136870737255307,4364114019078930395506949137035023305561809390136884628661737⟩,⟨4611899695887358844995637039695154067095869894877011496858080,4611899695887358844995637039695154067095869894877026176990820⟩,⟨4888971143093415650917242710537244632891008160292508381299030,4888971143093415650917242710537244632891008160292523943377598⟩,⟨5199804436677893598710238374563744707402885399801781865583788,5199804436677893598710238374563744707402885399801798417075460⟩,⟨5549502474848950499312790602574225517987959979518953401773044,5549502474848950499312790602574225517987959979518971066388147⟩,⟨5943716695046413732682694536587510791822881528105484167607413,5943716695046413732682694536587510791822881528105503087045381⟩,⟨6388373254427959649465615914813456220253660689649920624587598,6388373254427959649465615914813456220253660689649940959411375⟩,⟨6889020278985694859191246535124629875120800326380915636751494,6889020278985694859191246535124629875120800326380937565184253⟩,⟨7449483434673926326901002287925384986842198889814264922855200,7449483434673926326901002287925384986842198889814288635297626⟩,⟨8069348327943070292450096949301649553532059586023233166342195,8069348327943070292450096949301649553532059586023258851875890⟩,⟨8739675710644063363430080476194098350342868287171455240763493,8739675710644063363430080476194098350342868287171483060015571⟩,⟨9436635758297873051424462228152933894950882020670570308418372,9436635758297873051424462228152933894950882020670600346163241⟩,⟨10114184242707371284032499132953329917554733398912921613152937,10114184242707371284032499132953329917554733398912953807601602⟩,⟨10700353943168908603806370578879843877614654298383756232798242,10700353943168908603806370578879843877614654298383790293083057⟩,⟨11105900882773752412252857410648416430561328085348253357434793,11105900882773752412252857410648416430561328085348288708615640⟩,⟨11251829688327679077207577262545764643675587499801093450980060,11251829688327679077207577262545764643675587499801129266666730⟩,⟨11105900882773752412252857410648416430561328085348253357434793,11105900882773752412252857410648416430561328085348288708615640⟩,⟨10700353943168908603806370578879843877614654298383756232798242,10700353943168908603806370578879843877614654298383790293083057⟩,⟨10114184242707371284032499132953329917554733398912921613152860,10114184242707371284032499132953329917554733398912953807601602⟩,⟨9436635758297873051424462228152933894950882020670570308418372,9436635758297873051424462228152933894950882020670600346163241⟩,⟨8739675710644063363430080476194098350342868287171455240763493,8739675710644063363430080476194098350342868287171483060015521⟩,⟨8069348327943070292450096949301649553532059586023233166342195,8069348327943070292450096949301649553532059586023258851875890⟩,⟨7449483434673926326901002287925384986842198889814264922855172,7449483434673926326901002287925384986842198889814288635297626⟩,⟨6889020278985694859191246535124629875120800326380915636751494,6889020278985694859191246535124629875120800326380937565184253⟩,⟨6388373254427959649465615914813456220253660689649920624587590,6388373254427959649465615914813456220253660689649940959411348⟩,⟨5943716695046413732682694536587510791822881528105484167607397,5943716695046413732682694536587510791822881528105503087045364⟩,⟨5549502474848950499312790602574225517987959979518953401773031,5549502474848950499312790602574225517987959979518971066388147⟩,⟨5199804436677893598710238374563744707402885399801781865583777,5199804436677893598710238374563744707402885399801798417075450⟩,⟨4888971143093415650917242710537244632891008160292508381299030,4888971143093415650917242710537244632891008160292523943377588⟩,⟨4611899695887358844995637039695154067095869894877011496858073,4611899695887358844995637039695154067095869894877026176990813⟩,⟨4364114019078930395506949137035023305561809390136870737255301,4364114019078930395506949137035023305561809390136884628661737⟩] +lemma taylorNorm01_check (j : Fin 31) : 0≤(taylorNorm01 j).lo ∧ (taylorNorm01 j).lo*(taylorNorm01 j).lo ≤ scale*max 0 (taylorPhaseTable 0 1 j).normSq.lo ∧ scale*(taylorPhaseTable 0 1 j).normSq.hi ≤ (taylorNorm01 j).hi*(taylorNorm01 j).hi ∧ 0≤(taylorNorm01 j).hi := by + revert j + decide +kernel +lemma taylorNorm01_mem (j : Fin 31) : (taylorNorm01 j).Mem ‖taylorPhase 0 1 (frequency j)‖ := by + have hh := taylorNorm01_check j + exact CI.mem_norm (taylorPhaseTable_mem 0 1 j) hh.1 hh.2.1 hh.2.2.1 hh.2.2.2 +def taylorNorm10 : Fin 31 → RI := ![⟨2692336554230268929818587182652119793478196580904575182285828,2692336554230268929818587182652119793478196580904583752259260⟩,⟨2522951764077756380748527690257151045469137557434837719390936,2522951764077756380748527690257151045469137557434845750195836⟩,⟨2354319130967369443406243312575522018839135488582683636662595,2354319130967369443406243312575522018839135488582691130693151⟩,⟨2186612681974605711023183821710422872458173518920470402585602,2186612681974605711023183821710422872458173518920477362789953⟩,⟨2020063106802049488102896228558104304243039650215261670106613,2020063106802049488102896228558104304243039650215268100167200⟩,⟨1854982041398422902322339606060106598721319966910831528301214,1854982041398422902322339606060106598721319966910837432892450⟩,⟨1691799419646405363863102998125894629437779576233249025938338,1691799419646405363863102998125894629437779576233254411103157⟩,⟨1531122353921628753310722123946057004580280764443313941128922,1531122353921628753310722123946057004580280764443318814842756⟩,⟨1373830241695984242811564724360161094371279336572333989915758,1373830241695984242811564724360161094371279336572338362953249⟩,⟨1221231709085432035483758383591137448378420752955884436947850,1221231709085432035483758383591137448378420752955888324249126⟩,⟨1075326799401161508650965908559654958351731161206770345968771,1075326799401161508650965908559654958351731161206773768840295⟩,⟨939240143787683355058496605997954082530343152124566556789233,939240143787683355058496605997954082530343152124569546483479⟩,⟨817887433484346966932096663025588207831386282149277857792008,817887433484346966932096663025588207831386282149280461208581⟩,⟨718770578111164608966311563089586083244613308507332911157167,718770578111164608966311563089586083244613308507335199074991⟩,⟨652108823757388828577784905448600372400579035250749491613149,652108823757388828577784905448600372400579035250751567340018⟩,⟨628318530717958647692528676655900576839433879875019999999994,628318530717958647692528676655900576839433879875022000000008⟩,⟨652108823757388828577784905448600372400579035250749491613149,652108823757388828577784905448600372400579035250751567340018⟩,⟨718770578111164608966311563089586083244613308507332911157168,718770578111164608966311563089586083244613308507335199074991⟩,⟨817887433484346966932096663025588207831386282149277857792009,817887433484346966932096663025588207831386282149280461208582⟩,⟨939240143787683355058496605997954082530343152124566556789234,939240143787683355058496605997954082530343152124569546483480⟩,⟨1075326799401161508650965908559654958351731161206770345968772,1075326799401161508650965908559654958351731161206773768840296⟩,⟨1221231709085432035483758383591137448378420752955884436947851,1221231709085432035483758383591137448378420752955888324249127⟩,⟨1373830241695984242811564724360161094371279336572333989915759,1373830241695984242811564724360161094371279336572338362953250⟩,⟨1531122353921628753310722123946057004580280764443313941128923,1531122353921628753310722123946057004580280764443318814842757⟩,⟨1691799419646405363863102998125894629437779576233249025938343,1691799419646405363863102998125894629437779576233254411103161⟩,⟨1854982041398422902322339606060106598721319966910831528301215,1854982041398422902322339606060106598721319966910837432892451⟩,⟨2020063106802049488102896228558104304243039650215261670106614,2020063106802049488102896228558104304243039650215268100167201⟩,⟨2186612681974605711023183821710422872458173518920470402585603,2186612681974605711023183821710422872458173518920477362789953⟩,⟨2354319130967369443406243312575522018839135488582683636662596,2354319130967369443406243312575522018839135488582691130693152⟩,⟨2522951764077756380748527690257151045469137557434837719390937,2522951764077756380748527690257151045469137557434845750195837⟩,⟨2692336554230268929818587182652119793478196580904575182285829,2692336554230268929818587182652119793478196580904583752259261⟩] +lemma taylorNorm10_check (j : Fin 31) : 0≤(taylorNorm10 j).lo ∧ (taylorNorm10 j).lo*(taylorNorm10 j).lo ≤ scale*max 0 (taylorPhaseTable 1 0 j).normSq.lo ∧ scale*(taylorPhaseTable 1 0 j).normSq.hi ≤ (taylorNorm10 j).hi*(taylorNorm10 j).hi ∧ 0≤(taylorNorm10 j).hi := by + revert j + decide +kernel +lemma taylorNorm10_mem (j : Fin 31) : (taylorNorm10 j).Mem ‖taylorPhase 1 0 (frequency j)‖ := by + have hh := taylorNorm10_check j + exact CI.mem_norm (taylorPhaseTable_mem 1 0 j) hh.1 hh.2.1 hh.2.2.1 hh.2.2.2 +def taylorNorm11 : Fin 31 → RI := ![⟨3746287589126386216234442849891985538031664914646490779972690,3746287589126386216234442849891985538031664914646502704776512⟩,⟨3914322626389740480211397923282249148046220163319436918458381,3914322626389740480211397923282249148046220163319449378134341⟩,⟨4095744360335558774071246738065476325283162214317818994274850,4095744360335558774071246738065476325283162214317832031434135⟩,⟨4291162414609712309916274437663463747241579636454153180560675,4291162414609712309916274437663463747241579636454166839754944⟩,⟨4500866313301158376752011741524653971560144020379556401515245,4500866313301158376752011741524653971560144020379570728217759⟩,⟨4724622650721114800360960951916923029963768299711176064048233,4724622650721114800360960951916923029963768299711191102989300⟩,⟨4961396533385852578350965103787121888467985002542113443193219,4961396533385852578350965103787121888467985002542129235808975⟩,⟨5208989497225192879661979231722435192071369751014700379065565,5208989497225192879661979231722435192071369751014716959794203⟩,⟨5463605207760699929794603502772186256276201555257177921523107,5463605207760699929794603502772186256276201555257195312718736⟩,⟨5719393399942962505049982764621700422047174371763009963778849,5719393399942962505049982764621700422047174371763028169173589⟩,⟨5968086842068290549061827420846197370035182798895778304828649,5968086842068290549061827420846197370035182798895797301839211⟩,⟨6198927484591655654986821237250460391822741141388913757430623,6198927484591655654986821237250460391822741141388933489229776⟩,⟨6399138350540043117314088862279781606588307761744966683029417,6399138350540043117314088862279781606588307761744987052119540⟩,⟨6555160395430741620937271894290824104008259338752330629218378,6555160395430741620937271894290824104008259338752351494942095⟩,⟨6654654867649358898653990636465250372689241507474024084878477,6654654867649358898653990636465250372689241507474045267302941⟩,⟨6688877395532046196361326887412136634674615242175675876543117,6688877395532046196361326887412136634674615242175697167901270⟩,⟨6654654867649358898653990636465250372689241507474024084878477,6654654867649358898653990636465250372689241507474045267302941⟩,⟨6555160395430741620937271894290824104008259338752330629218378,6555160395430741620937271894290824104008259338752351494942095⟩,⟨6399138350540043117314088862279781606588307761744966683029395,6399138350540043117314088862279781606588307761744987052119540⟩,⟨6198927484591655654986821237250460391822741141388913757430623,6198927484591655654986821237250460391822741141388933489229776⟩,⟨5968086842068290549061827420846197370035182798895778304828649,5968086842068290549061827420846197370035182798895797301839194⟩,⟨5719393399942962505049982764621700422047174371763009963778849,5719393399942962505049982764621700422047174371763028169173589⟩,⟨5463605207760699929794603502772186256276201555257177921523093,5463605207760699929794603502772186256276201555257195312718736⟩,⟨5208989497225192879661979231722435192071369751014700379065565,5208989497225192879661979231722435192071369751014716959794203⟩,⟨4961396533385852578350965103787121888467985002542113443193213,4961396533385852578350965103787121888467985002542129235808960⟩,⟨4724622650721114800360960951916923029963768299711176064048224,4724622650721114800360960951916923029963768299711191102989292⟩,⟨4500866313301158376752011741524653971560144020379556401515241,4500866313301158376752011741524653971560144020379570728217759⟩,⟨4291162414609712309916274437663463747241579636454153180560667,4291162414609712309916274437663463747241579636454166839754940⟩,⟨4095744360335558774071246738065476325283162214317818994274850,4095744360335558774071246738065476325283162214317832031434134⟩,⟨3914322626389740480211397923282249148046220163319436918458379,3914322626389740480211397923282249148046220163319449378134338⟩,⟨3746287589126386216234442849891985538031664914646490779972689,3746287589126386216234442849891985538031664914646502704776512⟩] +lemma taylorNorm11_check (j : Fin 31) : 0≤(taylorNorm11 j).lo ∧ (taylorNorm11 j).lo*(taylorNorm11 j).lo ≤ scale*max 0 (taylorPhaseTable 1 1 j).normSq.lo ∧ scale*(taylorPhaseTable 1 1 j).normSq.hi ≤ (taylorNorm11 j).hi*(taylorNorm11 j).hi ∧ 0≤(taylorNorm11 j).hi := by + revert j + decide +kernel +lemma taylorNorm11_mem (j : Fin 31) : (taylorNorm11 j).Mem ‖taylorPhase 1 1 (frequency j)‖ := by + have hh := taylorNorm11_check j + exact CI.mem_norm (taylorPhaseTable_mem 1 1 j) hh.1 hh.2.1 hh.2.2.1 hh.2.2.2 +def taylorNormTable : Fin 2 → Fin 2 → Fin 31 → RI := ![![taylorNorm00,taylorNorm01],![taylorNorm10,taylorNorm11]] +lemma taylorNormTable_mem (q br : Fin 2) (j : Fin 31) : (taylorNormTable q br j).Mem ‖taylorPhase q br (frequency j)‖ := by + fin_cases q <;> fin_cases br + · exact taylorNorm00_mem j + · exact taylorNorm01_mem j + · exact taylorNorm10_mem j + · exact taylorNorm11_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderPre.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderPre.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a910797f63bd2989d6b87a20c5750097d249008 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderPre.lean @@ -0,0 +1,68 @@ +import OAI.Analysis.Triangular.Signs.RemainderSums0 +import OAI.Analysis.Triangular.Signs.RemainderSums1 +import OAI.Analysis.Triangular.Signs.RemainderSums2 +import OAI.Analysis.Triangular.Signs.RemainderSums3 +import OAI.Analysis.Triangular.Signs.RemainderSums4 +import OAI.Analysis.Triangular.Signs.RemainderSums5 +import OAI.Analysis.Triangular.Signs.RemainderSums6 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +lemma remainder_all_pre (q br : Fin 2) (n : Fin 7) (j : Fin 31) : + 0<((RI.point 1).sub (((nearRadiusBox n).mul (taylorNormTable q br j)).divNat 24)).lo := by + fin_cases n <;> fin_cases q <;> fin_cases br + · exact (remainderData0_00_pre j).2 + · exact (remainderData0_01_pre j).2 + · exact (remainderData0_10_pre j).2 + · exact (remainderData0_11_pre j).2 + · exact (remainderData1_00_pre j).2 + · exact (remainderData1_01_pre j).2 + · exact (remainderData1_10_pre j).2 + · exact (remainderData1_11_pre j).2 + · exact (remainderData2_00_pre j).2 + · exact (remainderData2_01_pre j).2 + · exact (remainderData2_10_pre j).2 + · exact (remainderData2_11_pre j).2 + · exact (remainderData3_00_pre j).2 + · exact (remainderData3_01_pre j).2 + · exact (remainderData3_10_pre j).2 + · exact (remainderData3_11_pre j).2 + · exact (remainderData4_00_pre j).2 + · exact (remainderData4_01_pre j).2 + · exact (remainderData4_10_pre j).2 + · exact (remainderData4_11_pre j).2 + · exact (remainderData5_00_pre j).2 + · exact (remainderData5_01_pre j).2 + · exact (remainderData5_10_pre j).2 + · exact (remainderData5_11_pre j).2 + · exact (remainderData6_00_pre j).2 + · exact (remainderData6_01_pre j).2 + · exact (remainderData6_10_pre j).2 + · exact (remainderData6_11_pre j).2 +lemma remainder_ratio_lt_one (q br : Fin 2) (n : Fin 7) (j : Fin 31) : + nearRadius n*‖taylorPhase q br (frequency j)‖/24<1 := by + have hh := (RI.mem_sub ri1_mem (RI.mem_divNat + (RI.mem_mul (nearRadiusBox_mem n) (taylorNormTable_mem q br j)) (by norm_num : 0<24))).1 + have hp : (0:ℝ)<((RI.point 1).sub (((nearRadiusBox n).mul (taylorNormTable q br j)).divNat 24)).lo := + by exact_mod_cast remainder_all_pre q br n j + have hs := AtomicTriangular.Interval.scale_pos + nlinarith +lemma remainder_table (n : Fin 7) (c d : Fin 22) : + 3*(rawRemainderColumn 0 n c+rawRemainderColumn 1 n d)+(6/1000)*(rawRemainderConstant 0 n+rawRemainderConstant 1 n) < + (if n.val=0 then (161/100000:ℝ) else 75/10000000) := by + fin_cases n + · exact remainderTable0 c d + · exact remainderTable1 c d + · exact remainderTable2 c d + · exact remainderTable3 c d + · exact remainderTable4 c d + · exact remainderTable5 c d + · exact remainderTable6 c d +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums0.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums0.lean new file mode 100644 index 0000000000000000000000000000000000000000..2124a2ba6170e76d0ac60206c87bcd82ae29d5d3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums0.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData0 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns0_0 : Fin 22 → RI := ![⟨3794392291666101960124510382318341944527414128,3794392291666101960124510382832179490200113461⟩,⟨50979136281963717743138536850981048730436574993,50979136281963717743138536850981062372315397680⟩,⟨3567130492242302438857770589144670371535879278,3567130492242302438857770589658511900135219104⟩,⟨47939272834633124720219064729583800649719093725,47939272834633124720219064729584280152733503881⟩,⟨3115442018320102524411497229820077963660758490,3115442018320102524411497230334108242222800553⟩,⟨41913360124998782393876179518649094252461709200,41913360124998782393876179518679786286355050203⟩,⟨2901569663662656305589444683591562958351874608,2901569663662656305589444684105801019101862690⟩,⟨39043733169670158387359723281515296593074526509,39043733169670158387359723281583350837378869458⟩,⟨2703375429337252004165950292011759277457055530,2703375429337252004165950292525639738624551391⟩,⟨36252333622857533116256647126643001224883770807,36252333622857533116256647126649004966860616656⟩,⟨3107100353423360391926598510312065939265939752,3107100353423360391926598510825903483198991431⟩,⟨41527875329441075232541105629276429568403894576,41527875329441075232541105629277115670256687285⟩,⟨3733122679430878155478925420092448729925592001,3733122679430878155478925420606480236996370710⟩,⟨50114958500669878190157468950558363036243122395,50114958500669878190157468950589041122968691295⟩,⟨3957316820615246118058201159350345256647274859,3957316820615246118058201159864589899573738495⟩,⟨53175705687734959418707175622155795108919329141,53175705687734959418707175622222477627695945208⟩,⟨4596464092510958016114862970926538513290606030,4596464092510958016114862971440418092975737937⟩,⟨61871054236196239997830811457980259851664278741,61871054236196239997830811457986245118385499930⟩,⟨5094668752538099143722042590695403120596526794,5094668752538099143722042591209244648223984296⟩,⟨68590807945464950509026609156093684106469754653,68590807945464950509026609156094164486173936067⟩,⟨5298516048514389393300743674463206378007540923,5298516048514389393300743674977236826365438925⟩,⟨71310971938275050410473230149074138988007918000,71310971938275050410473230149104814710903922492⟩] +lemma remainderColumns0_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData0_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns0_0 c := by + revert c + decide +kernel +lemma remainderColumns0_0_bound (c : Fin 22) : rawRemainderColumn 0 0 c < (72/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData0_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns0_0_calc] at hh + have hb := ri_mem_lt hh 72 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns0_1 : Fin 22 → RI := ![⟨10240807025516515847841559650827555877167599250637958181,10240807025516515847841559650827556567007962796167309717⟩,⟨22538760140005821059192851914199516799282585770361959337,22538760140005821059192851914199516799448706550379183500⟩,⟨4786354451654085278563737820015415928784437692601932584,4786354451654085278563737820015416618877817160573108025⟩,⟨15747491805213114778906268548883080386076195975265589652,15747491805213114778906268548883080389415332577288829803⟩,⟨2025204680599317951807052251839822731674972185322934567,2025204680599317951807052251839823428923265607468431367⟩,⟨9615899038900609002315979502089522614939302161212026283,9615899038900609002315979502089522760938785818971926636⟩,⟨1520286970980595152341857583845876476877834128114736455,1520286970980595152341857583845877181110754333679195471⟩,⟨7879104272892039623738355088213937147289660079376998719,7879104272892039623738355088213937455624731983132069503⟩,⟨1120439345711830762088553667642224201280318898806438798,1120439345711830762088553667642224893215269780635100404⟩,⟨4621900025007416327362895788285682861419578814637919118,4621900025007416327362895788285682894432044437868718660⟩,⟨1536924976777917353648050773472807064240737494490078965,1536924976777917353648050773472807754080650825708823473⟩,⟨3325886305670456932675055740938093392806349706023571084,3325886305670456932675055740940054640878468090252766684⟩,⟨1297628782823871480446921046735153590133686421374741124,1297628782823871480446921046735154287763190475333106543⟩,⟨3607153334050774012037208365013382926732541996301093503,3607153334050774012037208365013446855385026982500987137⟩,⟨2171728096874525913854129002964557973369915648481080334,2171728096874525913854129002964558677993669878192280842⟩,⟨4328931863703087099556961305879132605593180859409584022,4328931863703087099556961305879132877283888836849024466⟩,⟨12086777520067105644667994777166404112488411762713761150,12086777520067105644667994777166404804109864413751944084⟩,⟨8207519032011336484409639334041615935256977011837380601,8207519032011336484409639334041615968858120836344448009⟩,⟨14292802214895309100405905799009249935868586893706331535,14292802214895309100405905799009250625959247441538698364⟩,⟨12571595742733038628120670296546029194492217510192541369,12571595742733038628120670296546029197946997231825420055⟩,⟨27319409895010237867923524880367217380708621946121826756,27319409895010237867923524880367218078192711417631360780⟩,⟨24357922181964735035625382145474171808262786697320430676,24357922181964735035625382145474171950586305149424749990⟩] +lemma remainderColumns0_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData0_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns0_1 c := by + revert c + decide +kernel +lemma remainderColumns0_1_bound (c : Fin 22) : rawRemainderColumn 1 0 c < (27319409896/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData0_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns0_1_calc] at hh + have hb := ri_mem_lt hh 27319409896 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst0_0 : RI := ⟨519303659837231508609753465144172443307032014319,519303659837231508609753465144172443307032014635⟩ +lemma remainderConst0_0_calc : RI.sum (fun j : Fin 31 => (remainderData0_00 j).mul (columnNorm22 j))=remainderConst0_0 := by decide +kernel +lemma remainderConst0_0_bound : rawRemainderConstant 0 0 < (520/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData0_00_mem j) (fourierNorm_mem j)) + rw [remainderConst0_0_calc] at hh + have hb := ri_mem_lt hh 520 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst0_1 : RI := ⟨253857234449456888984536148167494600049643340549163441513275,253857234449456888984536148167494600049643583879658232965768⟩ +lemma remainderConst0_1_calc : RI.sum (fun j : Fin 31 => (remainderData0_01 j).mul (columnNorm22 j))=remainderConst0_1 := by decide +kernel +lemma remainderConst0_1_bound : rawRemainderConstant 1 0 < (253857234449457/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData0_01_mem j) (fourierNorm_mem j)) + rw [remainderConst0_1_calc] at hh + have hb := ri_mem_lt hh 253857234449457 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable0 (c d : Fin 22) : 3*(rawRemainderColumn 0 0 c+rawRemainderColumn 1 0 d)+(6/1000)*(rawRemainderConstant 0 0+rawRemainderConstant 1 0) < (161/100000:ℝ) := by + have h0 := remainderColumns0_0_bound c + have h1 := remainderColumns0_1_bound d + have h2 := remainderConst0_0_bound + have h3 := remainderConst0_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums1.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums1.lean new file mode 100644 index 0000000000000000000000000000000000000000..35e410f40a9f0bf4429904ccade96125a4b80339 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums1.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData1 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns1_0 : Fin 22 → RI := ![⟨1079920257368838897707063964090727912277811850,1079920257368838897707063964236970981500624938⟩,⟨14509148696874895315197382747094383185227181108,14509148696874895315197382747094387067836083153⟩,⟨1015239380417107033777570274825655720884805551,1015239380417107033777570274971899923686550921⟩,⟨13643974549326247539169153407353726503677765427,13643974549326247539169153407353862974811725014⟩,⟨886684530123961745843800698852963532809830292,886684530123961745843800698999261455652265030⟩,⟨11928942284854442562705464584904636313402731512,11928942284854442562705464584913371559153169275⟩,⟨825814416932704682585615097530294389154477280,825814416932704682585615097676651448790536697⟩,⟨11112219067553602789392678499751191385286533150,11112219067553602789392678499770560272680070811⟩,⟨769406446409517385183818186287049201634372090,769406446409517385183818186433304485016561239⟩,⟨10317760117266862424123409991397784681499204963,10317760117266862424123409991399493403761542446⟩,⟨884310412687037781678210652247310971125336986,884310412687037781678210652393554039853029729⟩,⟨11819229633227780919043308461968979345164348555,11819229633227780919043308461969174616299353921⟩,⟨1062482341010196258471800462098110605041655812,1062482341010196258471800462244408877529401070⟩,⟨14263195453179712653568078535907338126028231282,14263195453179712653568078535916069402281618578⟩,⟨1126290133151292498913640547911089962948785192,1126290133151292498913640548057448895935085472⟩,⟨15134313312357341607168719925400635195810351606,15134313312357341607168719925419613677027860535⟩,⟨1308197546330000003542155312799330114513799424,1308197546330000003542155312945585147017695534⟩,⟨17609092491882511739081271726555050406468123668,17609092491882511739081271726556753870496394819⟩,⟨1449991347108206360726081215755801290835194165,1449991347108206360726081215902045493360332576⟩,⟨19521598526408068303351490730465934368365514511,19521598526408068303351490730466071089013749538⟩,⟨1508008232926302727614449329665715210879497468,1508008232926302727614449329812013182047453283⟩,⟨20295783158200860870386827156911996212148061425,20295783158200860870386827156920726815632995933⟩] +lemma remainderColumns1_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData1_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns1_0 c := by + revert c + decide +kernel +lemma remainderColumns1_0_bound (c : Fin 22) : rawRemainderColumn 0 1 c < (21/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData1_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns1_0_calc] at hh + have hb := ri_mem_lt hh 21 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns1_1 : Fin 22 → RI := ![⟨306265255414930709426318100483428454306998164637833,306265255414930709426318100483487884464385415906050⟩,⟨836134197792525579488131324195593316024348546921376,836134197792525579488131324195593319762617513707701⟩,⟨176894495996256126190616798790428189340791873649049,176894495996256126190616798790487625099398193510082⟩,⟨619431981855105636359647101871512512799474808639231,619431981855105636359647101871512624314545180895878⟩,⟨80736966460453709504389751727238036817412557127066,80736966460453709504389751727297685943195116505792⟩,⟨390360266424999060523220520826315406858735967966584,390360266424999060523220520826321871664343501236981⟩,⟨63020405550555517198888652213709743958185053591454,63020405550555517198888652213769613160621583566731⟩,⟨322165860177508166216018050509346558767292153445504,322165860177508166216018050509360679507013504338671⟩,⟨49286986704661995982021205729543804294688925286490,49286986704661995982021205729603289073174144446821⟩,⟨198088494959349604894845033893804371574640443224137,198088494959349604894845033893805693490670807602716⟩,⟨65179397532859063069739857511933456833239775301225,65179397532859063069739857511992886975673054982331⟩,⟨163290610605589814931247314697386972053483303825585,163290610605589814931247314697574689565695090110271⟩,⟨66700438956218286766751938299802650521966850212130,66700438956218286766751938299862308256240044292709⟩,⟨155517448641879394811694802240618785988043023799822,155517448641879394811694802241008632063126764332791⟩,⟨105902039448447422338522959986665040424207532323570,105902039448447422338522959986724936006116228484333⟩,⟨214222910009656114379620997419424861889039293287754,214222910009656114379620997419437539186422290634562⟩,⟨378392107308142980402807722160472700733412336792204,378392107308142980402807722160532179022507189019819⟩,⟨576040805463972188666192670015076457654950769257508,576040805463972188666192670015077768275002103416872⟩,⟨541386103292863123863336135891774314295561077953492,541386103292863123863336135891833749989338512575417⟩,⟨726138218419978575361490523018349114391436626984645,726138218419978575361490523018349229466502372572338⟩,⟨797725942849026757724574443889666641497851350616913,797725942849026757724574443889726295330691435364008⟩,⟨1304808082582113282062288265674259992939581006013773,1304808082582113282062288265674266337058063434960741⟩] +lemma remainderColumns1_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData1_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns1_1 c := by + revert c + decide +kernel +lemma remainderColumns1_1_bound (c : Fin 22) : rawRemainderColumn 1 1 c < (1304809/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData1_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns1_1_calc] at hh + have hb := ri_mem_lt hh 1304809 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst1_0 : RI := ⟨519303659837231508609753465144172443307032014319,519303659837231508609753465144172443307032014635⟩ +lemma remainderConst1_0_calc : RI.sum (fun j : Fin 31 => (remainderData1_00 j).mul (columnNorm22 j))=remainderConst1_0 := by decide +kernel +lemma remainderConst1_0_bound : rawRemainderConstant 0 1 < (520/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData1_00_mem j) (fourierNorm_mem j)) + rw [remainderConst1_0_calc] at hh + have hb := ri_mem_lt hh 520 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst1_1 : RI := ⟨2220946914991851539663952795577454335007644206646516624,2220946914991851539663952795577454335007644352721486683⟩ +lemma remainderConst1_1_calc : RI.sum (fun j : Fin 31 => (remainderData1_01 j).mul (columnNorm22 j))=remainderConst1_1 := by decide +kernel +lemma remainderConst1_1_bound : rawRemainderConstant 1 1 < (2220946915/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData1_01_mem j) (fourierNorm_mem j)) + rw [remainderConst1_1_calc] at hh + have hb := ri_mem_lt hh 2220946915 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable1 (c d : Fin 22) : 3*(rawRemainderColumn 0 1 c+rawRemainderColumn 1 1 d)+(6/1000)*(rawRemainderConstant 0 1+rawRemainderConstant 1 1) < (75/10000000:ℝ) := by + have h0 := remainderColumns1_0_bound c + have h1 := remainderColumns1_1_bound d + have h2 := remainderConst1_0_bound + have h3 := remainderConst1_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums2.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums2.lean new file mode 100644 index 0000000000000000000000000000000000000000..7309de6881e95eb7c852bc12578fb7c03c6217b9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums2.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData2 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns2_0 : Fin 22 → RI := ![⟨3046417626717783676393528491828909555296839798899,3046417626717783676393528492244302601762035633916⟩,⟨41113172132831486659592796485090844291940524668745,41113172132831486659592796485090855313513174418661⟩,⟨2864774913042028101062473740659556663927121930342,2864774913042028101062473741074952913711304954596⟩,⟨38671610076517926965109862240130312280016236472564,38671610076517926965109862240130699713921326417827⟩,⟨2503634299199213175261968073630174778480049530200,2503634299199213175261968074045722856743444874156⟩,⟨33830118968321273739764590349041914359110334386121,33830118968321273739764590349066714850578665149359⟩,⟨2332531120024979908285496520571331338987735791786,2332531120024979908285496520987046570205461998492⟩,⟨31523410101219901818657381391195386947868083119522,31523410101219901818657381391250378464225487599955⟩,⟨2173873923835232377816485376590341873388473152727,2173873923835232377816485377005769437687970841034⟩,⟨29279463568304022912092673923959410938500053930232,29279463568304022912092673923964262169085407685831⟩,⟨2497021673643041538245869632719167353534733523635,2497021673643041538245869633134560398607100264194⟩,⟨33523409226307663517532227399318815945587458263475,33523409226307663517532227399319360776038162143044⟩,⟨2997835320469705735290772384895858592860845705807,2997835320469705735290772385311407654842966990404⟩,⟨40425592925592177125460364914064742621235773445626,40425592925592177125460364914089523334889865827840⟩,⟨3177019910980893873354058003149522432361398637140,3177019910980893873354058003565242935876285969356⟩,⟨42883329740823218309144255651168726713333221260921,42883329740823218309144255651222614781226155506295⟩,⟨3687622536528806982866157667689194723519505082141,3687622536528806982866157668104621582008334785285⟩,⟨49862586495301022555732504618652609158894531241570,49862586495301022555732504618657445527464672629637⟩,⟨4085523505694071203469284317241677952001626582531,4085523505694071203469284317657074201013760968089⟩,⟨55254916842906022028099341735443467426841012763057,55254916842906022028099341735443855563268713157578⟩,⟨4248399686442519999729483411499745755745057667265,4248399686442519999729483411915293969712929347779⟩,⟨57438842019705616479184200961319844136051742160483,57438842019705616479184200961344631616633648177899⟩] +lemma remainderColumns2_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData2_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns2_0 c := by + revert c + decide +kernel +lemma remainderColumns2_0_bound (c : Fin 22) : rawRemainderColumn 0 2 c < (57439/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData2_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns2_0_calc] at hh + have hb := ri_mem_lt hh 57439 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns2_1 : Fin 22 → RI := ![⟨66527905759778968433862053877226831461097288969641169,66527905759778968433862053877322705720816797811020244⟩,⟨224434006148300575494138624338258385092114364096460752,224434006148300575494138624338258389773434623593309957⟩,⟨45635001454786316858841975680432951794691489264323884,45635001454786316858841975680528832042087104860856843⟩,⟨176381141436489562412300699282115083173759115224870159,176381141436489562412300699282115230985391611142108190⟩,⟨22990413762197747129692393222414684882643241401651421,22990413762197747129692393222510808071842212426000816⟩,⟨115371782324624433740532549159337850262049512069594540,115371782324624433740532549159346723655365396816596398⟩,⟨18336893797504975202451353287681446714068084689590901,18336893797504975202451353287777822947859668767941872⟩,⟨96155938675649864620289100791746381673449980201674862,96155938675649864620289100791765846495273792276823898⟩,⟨15066305783263017816938103851909914171122107475022465,15066305783263017816938103852005848557279408913633970⟩,⟨64052241484401279836077642273516118752031263565242093,64052241484401279836077642273517902388661093010975174⟩,⟨19354162124645572257248432171837233048730367616183838,19354162124645572257248432171933107295716826034346313⟩,⟨58065313224738230130539888208467735765313721432942139,58065313224738230130539888208568793574100640404259969⟩,⟨27212385309352795293963830647346589001630362207903427,27212385309352795293963830647442720039746348195951761⟩,⟨67473215182917037782645173649553292987555859160541920,67473215182917037782645173649738497050093407669977639⟩,⟨38106064180722719733596803232917175074004947086802099,38106064180722719733596803233013580588386356426599978⟩,⟨94553498377724113593526786396241887129244766499548858,94553498377724113593526786396259665076961673772396393⟩,⟨89084877581348352913088252711265528840205360238423177,89084877581348352913088252711361457414829006376908806⟩,⟨209326814855516250308572542545056954968283880518096910,209326814855516250308572542545058720891472719487914382⟩,⟨136523853874895370879176378505650380518123926901434440,136523853874895370879176378505746260721803892107476317⟩,⟨307957273390217324905891671364235189665082538570435564,307957273390217324905891671364235341278971977508953132⟩,⟨165886329434447202582843121134420339463390107660184086,165886329434447202582843121134516466205035173865067419⟩,⟨406492931676005343875719320205155588907660958208909524,406492931676005343875719320205164341560724359001735795⟩] +lemma remainderColumns2_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData2_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns2_1 c := by + revert c + decide +kernel +lemma remainderColumns2_1_bound (c : Fin 22) : rawRemainderColumn 1 2 c < (406492932/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData2_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns2_1_calc] at hh + have hb := ri_mem_lt hh 406492932 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst2_0 : RI := ⟨2754363752882702151881500878729181939270482946869770,2754363752882702151881500878729181939270482946915417⟩ +lemma remainderConst2_0_calc : RI.sum (fun j : Fin 31 => (remainderData2_00 j).mul (columnNorm22 j))=remainderConst2_0 := by decide +kernel +lemma remainderConst2_0_bound : rawRemainderConstant 0 2 < (2754364/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData2_00_mem j) (fourierNorm_mem j)) + rw [remainderConst2_0_calc] at hh + have hb := ri_mem_lt hh 2754364 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst2_1 : RI := ⟨1040413389771822233684589810260266695275990073926812837302,1040413389771822233684589810260266695275990089961190387322⟩ +lemma remainderConst2_1_calc : RI.sum (fun j : Fin 31 => (remainderData2_01 j).mul (columnNorm22 j))=remainderConst2_1 := by decide +kernel +lemma remainderConst2_1_bound : rawRemainderConstant 1 2 < (1040413389772/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData2_01_mem j) (fourierNorm_mem j)) + rw [remainderConst2_1_calc] at hh + have hb := ri_mem_lt hh 1040413389772 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable2 (c d : Fin 22) : 3*(rawRemainderColumn 0 2 c+rawRemainderColumn 1 2 d)+(6/1000)*(rawRemainderConstant 0 2+rawRemainderConstant 1 2) < (75/10000000:ℝ) := by + have h0 := remainderColumns2_0_bound c + have h1 := remainderColumns2_1_bound d + have h2 := remainderConst2_0_bound + have h3 := remainderConst2_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums3.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums3.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5f2672ec2a0e0f105731133ffab9e0ba717664b --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums3.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData3 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns3_0 : Fin 22 → RI := ![⟨462555263520679740069992902145453791645058609065,462555263520679740069992902208525327992286565981⟩,⟨6242451462756933663250371495201388587029811533225,6242451462756933663250371495201390260499133896077⟩,⟨434975396415780013032937926395875268562749501565,434975396415780013032937926458947291288484878188⟩,⟨5871734929851042107098771940461110996843073806300,5871734929851042107098771940461169823180767632811⟩,⟨380141321685172379706239233991226487457271406833,380141321685172379706239234054321563181911488287⟩,⟨5136623244655822733004614484899722549663200701712,5136623244655822733004614484903488152174808943686⟩,⟨354161733253814010854749066588546492378889758827,354161733253814010854749066651666947906404101609⟩,⟨4786382253883611896279413288757406933709241437904,4786382253883611896279413288765756614697499918827⟩,⟨330071890630342543738838707649366841988324420249,330071890630342543738838707712443619378606234191⟩,⟨4445670832456632887154329373064055107126898348549,4445670832456632887154329373064791697613418588813⟩,⟨379137288380653324815388113555843054750438556256,379137288380653324815388113618914590886185190573⟩,⟨5090053725001908304908506540298805651861702582106,5090053725001908304908506540298888376630128684091⟩,⟨455178730089433336627862193193529384663563275832,455178730089433336627862193256624609751925033863⟩,⟨6138052322400534317225648382146397125778586173601,6138052322400534317225648382150159725309908106681⟩,⟨482385366092273756263695017396540665466807225292,482385366092273756263695017459661921517789307862⟩,⟨6511224762798505327520769213438807181873919909772,6511224762798505327520769213446989319879631236995⟩,⟨559913125235766103507714162396263139530991410124,559913125235766103507714162459339809753944404070⟩,⟨7570925809343503439568605474512714003712706221518,7570925809343503439568605474513448337613227643367⟩,⟨620328737997851440321019453311300224289044672443,620328737997851440321019453374372246897555424868⟩,⟨8389674612216699719141630110223140798152672522641,8389674612216699719141630110223199731158450316256⟩,⟨645059173525337288159313633336890767448168354985,645059173525337288159313633399985863777606433423⟩,⟨8721272642901796552760469259518564603864895478173,8721272642901796552760469259522328230858128939780⟩] +lemma remainderColumns3_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData3_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns3_0 c := by + revert c + decide +kernel +lemma remainderColumns3_0_bound (c : Fin 22) : rawRemainderColumn 0 3 c < (8722/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData3_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns3_0_calc] at hh + have hb := ri_mem_lt hh 8722 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns3_1 : Fin 22 → RI := ![⟨93053418859128225473884797682456870662937617739762,93053418859128225473884797684881260030940764004325⟩,⟨566329818486441379472859167471475462724432421401335,566329818486441379472859167471475542266489957819347⟩,⟨80873875845333918644445305508149486141053689292325,80873875845333918644445305510573932072527221061406⟩,⟨497484129265108677597548376414512279594403953668246,497484129265108677597548376414514988474539726879113⟩,⟨58750762036531846154514724887556969175789606365177,58750762036531846154514724889983967172622767608219⟩,⟨374084884187450508952648615030495863160039947939038,374084884187450508952648615030665594807447684812409⟩,⟨50007403831382150815475472479449272405712772989054,50007403831382150815475472481879010092442419865603⟩,⟨323702822820590619765305123871557235720204940928095,323702822820590619765305123871931992511022674993650⟩,⟨43221282739910885662140871494928338776305152006779,43221282739910885662140871497353324089301809332315⟩,⟨271579089537921998418795495021586914407858048604495,271579089537921998418795495021620309096149825153238⟩,⟨57312523258119100589814636593004983746149849780548,57312523258119100589814636595429373056319068289430⟩,⟨334352928178358793602978365385603422193300461453690,334352928178358793602978365385695722392694698666516⟩,⟨82769534379350102769677480180487942648140071501370,82769534379350102769677480182914980225460027670324⟩,⟨476057127305531786437193368626446823521895708206244,476057127305531786437193368626721999245147961169206⟩,⟨94464041951294325855451520927346324811453740266345,94464041951294325855451520929776256159220821419057⟩,⟨547417749186891705123748182042886054486392987961060,547417749186891705123748182043242536187972105513521⟩,⟨131709237937786571437723001170636402256447246117729,131709237937786571437723001173061358996113485677978⟩,⟨775745953180515658553728486993288311531513462269779,775745953180515658553728486993321467096453219613630⟩,⟨162646305339084600498394963235781096891679256138899,162646305339084600498394963238205542733722087934126⟩,⟨965435071648158855510457819098984109381530603017533,965435071648158855510457819098986843115071805683630⟩,⟨174053391994331403866069926529650429485420068559638,174053391994331403866069926532077436548170703112693⟩,⟨1033018548531149131961443964546409493356670927864372,1033018548531149131961443964546578545111225226802802⟩] +lemma remainderColumns3_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData3_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns3_1 c := by + revert c + decide +kernel +lemma remainderColumns3_1_bound (c : Fin 22) : rawRemainderColumn 1 3 c < (1033019/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData3_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns3_1_calc] at hh + have hb := ri_mem_lt hh 1033019 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst3_0 : RI := ⟨2754363752882702151881500878729181939270482946869770,2754363752882702151881500878729181939270482946915417⟩ +lemma remainderConst3_0_calc : RI.sum (fun j : Fin 31 => (remainderData3_00 j).mul (columnNorm22 j))=remainderConst3_0 := by decide +kernel +lemma remainderConst3_0_bound : rawRemainderConstant 0 3 < (2754364/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData3_00_mem j) (fourierNorm_mem j)) + rw [remainderConst3_0_calc] at hh + have hb := ri_mem_lt hh 2754364 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst3_1 : RI := ⟨12287957044502690722447256922551839140954374467733388519,12287957044502690722447256922551839140954374473604059139⟩ +lemma remainderConst3_1_calc : RI.sum (fun j : Fin 31 => (remainderData3_01 j).mul (columnNorm22 j))=remainderConst3_1 := by decide +kernel +lemma remainderConst3_1_bound : rawRemainderConstant 1 3 < (12287957045/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData3_01_mem j) (fourierNorm_mem j)) + rw [remainderConst3_1_calc] at hh + have hb := ri_mem_lt hh 12287957045 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable3 (c d : Fin 22) : 3*(rawRemainderColumn 0 3 c+rawRemainderColumn 1 3 d)+(6/1000)*(rawRemainderConstant 0 3+rawRemainderConstant 1 3) < (75/10000000:ℝ) := by + have h0 := remainderColumns3_0_bound c + have h1 := remainderColumns3_1_bound d + have h2 := remainderConst3_0_bound + have h3 := remainderConst3_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums4.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums4.lean new file mode 100644 index 0000000000000000000000000000000000000000..5cf9fb318aff4d4e8225d6aa79397756ee47deb9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums4.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData4 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns4_0 : Fin 22 → RI := ![⟨131647642318297344085200609557219399767088776388,131647642318297344085200609575170160924375097525⟩,⟨1776661260112578881165594725970799909729771900272,1776661260112578881165594725970800386015111524893⟩,⟨123798148936303456823417142508804622153026836513,123798148936303456823417142526755521738278042815⟩,⟨1671151796975117013682422900485469050864854030403,1671151796975117013682422900485485793401961201477⟩,⟨108191847967971515532464483813132536680673642674,108191847967971515532464483831089997369415643000⟩,⟨1461931995950726711456046655227149942765217365812,1461931995950726711456046655228221669176431192502⟩,⟨100797809168464620906128325669915231472179281851,100797809168464620906128325687879915495027284130⟩,⟨1362250067509489340119890014323400854628324002626,1362250067509489340119890014325777253521393774577⟩,⟨93941610060361593101867092839552274969581991158,93941610060361593101867092857504527777738474987⟩,⟨1265280345447787422792947180788984518355015299900,1265280345447787422792947180789194159037009489145⟩,⟨107906090507678182896657838061954102999540767023,107906090507678182896657838079904864096637485490⟩,⟨1448677866228647885749874324465253163848431590644,1448677866228647885749874324465276708106995922331⟩,⟨129548210507027352062492007455031362978756828955,129548210507027352062492007472988866177839446620⟩,⟨1746948268451070038189354336098016320225005445344,1746948268451070038189354336099087191959371338546⟩,⟨137291478755505336907375390931616851634578499637,137291478755505336907375390949581763494045085119⟩,⟨1853156706298328172062597098978981712191442956465,1853156706298328172062597098981310426752760826675⟩,⟨159356618881200362374453913866209607777833743172,159356618881200362374453913884161830085145711023⟩,⟨2154757737228212393476624939270947545641748089751,2154757737228212393476624939271156544077831656831⟩,⟨176551478839783852676074303750705646340106502943,176551478839783852676074303768656545891994462516⟩,⟨2387781460120873444380167444700019325307491979673,2387781460120873444380167444700036098203353817149⟩,⟨183589996801762714215544299658930649194043348163,183589996801762714215544299676888115747107496994⟩,⟨2482157424205285478646025606548666319127926303438,2482157424205285478646025606549737483287757632000⟩] +lemma remainderColumns4_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData4_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns4_0 c := by + revert c + decide +kernel +lemma remainderColumns4_0_bound (c : Fin 22) : rawRemainderColumn 0 4 c < (2483/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData4_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns4_0_calc] at hh + have hb := ri_mem_lt hh 2483 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns4_1 : Fin 22 → RI := ![⟨3070724391919902373638319930401549505051926797003,3070724391919902373638319930610416396001164983835⟩,⟨27909255842527326921135379213786107816911502617203,27909255842527326921135379213786113844848181951307⟩,⟨2828146997128326837033290251751869545894093806459,2828146997128326837033290251960739248933476875700⟩,⟨25523845616756697764515386765921212218824506716845,25523845616756697764515386765921421685839008844991⟩,⟨2349898755217578202553206596843500789873333841726,2349898755217578202553206597052501779538215028707⟩,⟨20907074513342316562274694909257987989338247914077,20907074513342316562274694909271279646906659208102⟩,⟨2127090142902764074413823990340996187588184656238,2127090142902764074413823990550140416935630531118⟩,⟨18792154615108484561299428574695161896272658064936,18792154615108484561299428574724580772626094195642⟩,⟨1925532480161838597462518561806567108976466105014,1925532480161838597462518562015464092998678845705⟩,⟨16761583828577833467635093234933941810365440248540,16761583828577833467635093234936545889310484359493⟩,⟨2339620264683555173470025689323950758100458683261,2339620264683555173470025689532817647298549593238⟩,⟨20425410812685567977154740263473467533145905710364,20425410812685567977154740263474341284335191489603⟩,⟨2994998264735350282291391540619298955416640940794,2994998264735350282291391540828301173132788538984⟩,⟨26835753024619500462207787582036435335896381037729,26835753024619500462207787582050168010832897376966⟩,⟨3236813409476613361691187769392275547125670814381,3236813409476613361691187769601426245823333621664⟩,⟨29294861742641575771344927611448123869730034256182,29294861742641575771344927611476592805853371279834⟩,⟨3933389280314545091840157103419852373615119182166,3933389280314545091840157103628748474303516626429⟩,⟨36489649123557665083057616094788011087512405616016,36489649123557665083057616094790602388650063255805⟩,⟨4479174362691430597523781482716944221741285668677,4479174362691430597523781482925813923371627490880⟩,⟨42117834420300139454248911013567240587072662258637,42117834420300139454248911013567450892586289997274⟩,⟨4700771693789197888378114384679676061788215155487,4700771693789197888378114384888677236270631798017⟩,⟨44312886385438804453349972871833071119335373792978,44312886385438804453349972871846342546254833880285⟩] +lemma remainderColumns4_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData4_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns4_1 c := by + revert c + decide +kernel +lemma remainderColumns4_1_bound (c : Fin 22) : rawRemainderColumn 1 4 c < (44313/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData4_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns4_1_calc] at hh + have hb := ri_mem_lt hh 44313 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst4_0 : RI := ⟨2754363752882702151881500878729181939270482946869770,2754363752882702151881500878729181939270482946915417⟩ +lemma remainderConst4_0_calc : RI.sum (fun j : Fin 31 => (remainderData4_00 j).mul (columnNorm22 j))=remainderConst4_0 := by decide +kernel +lemma remainderConst4_0_bound : rawRemainderConstant 0 4 < (2754364/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData4_00_mem j) (fourierNorm_mem j)) + rw [remainderConst4_0_calc] at hh + have hb := ri_mem_lt hh 2754364 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst4_1 : RI := ⟨1761620612301284616264175299424284357879253364655522097,1761620612301284616264175299424284357879253365044476950⟩ +lemma remainderConst4_1_calc : RI.sum (fun j : Fin 31 => (remainderData4_01 j).mul (columnNorm22 j))=remainderConst4_1 := by decide +kernel +lemma remainderConst4_1_bound : rawRemainderConstant 1 4 < (1761620613/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData4_01_mem j) (fourierNorm_mem j)) + rw [remainderConst4_1_calc] at hh + have hb := ri_mem_lt hh 1761620613 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable4 (c d : Fin 22) : 3*(rawRemainderColumn 0 4 c+rawRemainderColumn 1 4 d)+(6/1000)*(rawRemainderConstant 0 4+rawRemainderConstant 1 4) < (75/10000000:ℝ) := by + have h0 := remainderColumns4_0_bound c + have h1 := remainderColumns4_1_bound d + have h2 := remainderConst4_0_bound + have h3 := remainderConst4_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums5.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums5.lean new file mode 100644 index 0000000000000000000000000000000000000000..33fa9f66eb5567bd4b538f8bcdc337ab116343d7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums5.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData5 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns5_0 : Fin 22 → RI := ![⟨19988825350260288095494341073450261954160722068,19988825350260288095494341076175830170640371618⟩,⟨269760787277143651694142436155097462998786009210,269760787277143651694142436155097535315952522826⟩,⟨18796991227463450298353806194992465879886788645,18796991227463450298353806197718055114687503073⟩,⟨253740673325119418356555837766368410592685157427,253740673325119418356555837766370952709234015588⟩,⟨16427396003985392685608857038777490154041593344,16427396003985392685608857041504075599252710510⟩,⟨221973617046349331293033047032084217787883834631,221973617046349331293033047032246944227034328754⟩,⟨15304716192986229016693973604237344512231224262,15304716192986229016693973606965026718169300412⟩,⟨206838331498496401416871679364710572469822024528,206838331498496401416871679365071394901577199681⟩,⟨14263699702868396175902596375904031639552754550,14263699702868396175902596378629826342038550368⟩,⟨192114855981417269375185040766060156920849185256,192114855981417269375185040766091987881927543193⟩,⟨16384007790829801094536683598429757628487691774,16384007790829801094536683601155325835828404713⟩,⟨219961165630441937848243969810933745953254465333,219961165630441937848243969810937320814635620429⟩,⟨19670056437492422560655117834430333977149479704,19670056437492422560655117837156925876952256976⟩,⟨265249291358974123453453762494287495599732933026,265249291358974123453453762494450092268338786856⟩,⟨20845761781951371809146476726069608687688185739,20845761781951371809146476728797325487381965030⟩,⟨281375534696624464216306895188043963419765580374,281375534696624464216306895188397545662767294193⟩,⟨24196040028751671785825207999259697106195949119,24196040028751671785825208001985487177561556793⟩,⟨327169369106053925075976021711019590796901166229,327169369106053925075976021711051324242056616078⟩,⟨26806835380508143139633037496053783327628201087,26806835380508143139633037498779372557363180219⟩,⟨362550712951977607233324023045121178366135920968,362550712951977607233324023045123725092230641032⟩,⟨27875534400020405931263690772002435243818805520,27875534400020405931263690774729021579443979241⟩,⟨376880363146431224197962580458137311529799037347,376880363146431224197962580458299952599059955188⟩] +lemma remainderColumns5_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData5_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns5_0 c := by + revert c + decide +kernel +lemma remainderColumns5_0_bound (c : Fin 22) : rawRemainderColumn 0 5 c < (377/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData5_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns5_0_calc] at hh + have hb := ri_mem_lt hh 377 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns5_1 : Fin 22 → RI := ![⟨27841330962253803901093713722311922288609403643,27841330962253803901093713727593584116548290889⟩,⟨473035034979631329752896155626820379997520168188,473035034979631329752896155626820517159813586214⟩,⟨26776067698547083686432186311765706328830001124,26776067698547083686432186317047401495039938154⟩,⟨450020559543250645150837368713242333515758162740,450020559543250645150837368713247170909004250566⟩,⟨24584406202060290510369558081209608508801226638,24584406202060290510369558086492901865193633842⟩,⟨403242230573203034029561397433665357622562389160,403242230573203034029561397433975718410451392333⟩,⟨23481463250743543006933081685822920754602179935,23481463250743543006933081691107985017639572531⟩,⟨380127375946074253129456074963242369947149710454,380127375946074253129456074963930869782250456640⟩,⟨22392745599803939401456638810316298651381889420,22392745599803939401456638815598321610076034127⟩,⟨357496064210754966968418241459970772443585029642,357496064210754966968418241460031451204361553967⟩,⟨24576867096081032813193529959798303654320504452,24576867096081032813193529965079965472516570648⟩,⟨402397978130770312427154625163874252215990346109,402397978130770312427154625163875180305428254966⟩,⟨27781245897593840543316126578280745304523827429,27781245897593840543316126583564045636427676215⟩,⟨471117795961101115123922367483415490825714355358,471117795961101115123922367483719959146314268560⟩,⟨28818457414595430768990047896038394480059726263,28818457414595430768990047901323497399754556927⟩,⟨493789915905890930262181778959450524643345014333,493789915905890930262181778960127368265473701148⟩,⟨31636125226308541705538843304656191658728096683,31636125226308541705538843309938209632759391333⟩,⟨556011727356668826331061853830442962947455025531,556011727356668826331061853830503484191389974212⟩,⟨33769729356186625743757854705839632975895332098,33769729356186625743757854711121328141327420144⟩,⟨603288951429949937157952828936872402387771370690,603288951429949937157952828936877245105002617529⟩,⟨34682430764619025155313003647224946190986783650,34682430764619025155313003652508240310515764654⟩,⟨623289027131803866839270524800603883697901823792,623289027131803866839270524800914181639348782797⟩] +lemma remainderColumns5_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData5_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns5_1 c := by + revert c + decide +kernel +lemma remainderColumns5_1_bound (c : Fin 22) : rawRemainderColumn 1 5 c < (624/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData5_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns5_1_calc] at hh + have hb := ri_mem_lt hh 624 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst5_0 : RI := ⟨2754363752882702151881500878729181939270482946869770,2754363752882702151881500878729181939270482946915417⟩ +lemma remainderConst5_0_calc : RI.sum (fun j : Fin 31 => (remainderData5_00 j).mul (columnNorm22 j))=remainderConst5_0 := by decide +kernel +lemma remainderConst5_0_bound : rawRemainderConstant 0 5 < (2754364/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData5_00_mem j) (fourierNorm_mem j)) + rw [remainderConst5_0_calc] at hh + have hb := ri_mem_lt hh 2754364 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst5_1 : RI := ⟨146533703346956179568504891011525835004474070315426277,146533703346956179568504891011525835004474070555138294⟩ +lemma remainderConst5_1_calc : RI.sum (fun j : Fin 31 => (remainderData5_01 j).mul (columnNorm22 j))=remainderConst5_1 := by decide +kernel +lemma remainderConst5_1_bound : rawRemainderConstant 1 5 < (146533704/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData5_01_mem j) (fourierNorm_mem j)) + rw [remainderConst5_1_calc] at hh + have hb := ri_mem_lt hh 146533704 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable5 (c d : Fin 22) : 3*(rawRemainderColumn 0 5 c+rawRemainderColumn 1 5 d)+(6/1000)*(rawRemainderConstant 0 5+rawRemainderConstant 1 5) < (75/10000000:ℝ) := by + have h0 := remainderColumns5_0_bound c + have h1 := remainderColumns5_1_bound d + have h2 := remainderConst5_0_bound + have h3 := remainderConst5_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/RemainderSums6.lean b/lean/OAI/Analysis/Triangular/Signs/RemainderSums6.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cfc79fc3ad34d1cbc168289b12cc4dc0ca7ef20 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/RemainderSums6.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.Triangular.Signs.RemainderData6 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def remainderColumns6_0 : Fin 22 → RI := ![⟨10663800279263814425767889973680351318170006038,10663800279263814425767889975134409503118317169⟩,⟨143914167455716539435749603283131985431950888797,143914167455716539435749603283132024012298005312⟩,⟨10027970968195689885085773064220099984484038094,10027970968195689885085773065674169382456332062⟩,⟨135367627444389181141506869184996943928053249354,135367627444389181141506869184998300116958230838⟩,⟨8763820135763784720045118238609630424914982110,8763820135763784720045118240064231289277446913⟩,⟨118420281230644481458805916436185445007621314027,118420281230644481458805916436272257625013763736⟩,⟨8164883826487320310907781679792218983969818531,8164883826487320310907781681247404957118892376⟩,⟨110345786635601659029533260568892551796406856545,110345786635601659029533260569085046266746774837⟩,⟨7609513926379997316839599784532666153510184568,7609513926379997316839599785986845166045573508⟩,⟨102490987787768518492464732841584366615744585356,102490987787768518492464732841601348054407873758⟩,⟨8740673040751554268867191756717863281291808466,8740673040751554268867191758171921461364605743⟩,⟨117346662366358458230337110365816464527617087072,117346662366358458230337110365818371673591234834⟩,⟨10493740860492099431114913141226149424793391931,10493740860492099431114913142680753732603640255⟩,⟨141507338110366973654442729201359051798863770637,141507338110366973654442729201445795185216080328⟩,⟨11120965660393112272863346170275175597786437220,11120965660393112272863346171730380026292204805⟩,⟨150110496885040675570827653164140723977766459018,150110496885040675570827653164329355893629153950⟩,⟨12908299206902652406275863472733654437681197053,12908299206902652406275863474187830979569117226⟩,⟨174540962187869278242513853464745771024500873469,174540962187869278242513853464762700439580598664⟩,⟨14301127435340737750414489579806268312612245708,14301127435340737750414489581260337707882030231⟩,⟨193416487776469057023658300494783901220241787222,193416487776469057023658300494785259868284591372⟩,⟨14871265635211268533417741018286426415084714948,14871265635211268533417741019741027754472475098⟩,⟨201061185504711373647094213759239929024719278549,201061185504711373647094213759326696098292301577⟩] +lemma remainderColumns6_0_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData6_10 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns6_0 c := by + revert c + decide +kernel +lemma remainderColumns6_0_bound (c : Fin 22) : rawRemainderColumn 0 6 c < (202/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData6_10_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns6_0_calc] at hh + have hb := ri_mem_lt hh 202 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderColumns6_1 : Fin 22 → RI := ![⟨6107806242734841682967628869937065790471730789,6107806242734841682967628871487324828594448272⟩,⟨128484196778396176211305042172651437256174854096,128484196778396176211305042172651476655716246200⟩,⟨5924507012128719127086968511679193299048890697,5924507012128719127086968513229460015375436166⟩,⟨123361609743011348383211234431234802697038627037,123361609743011348383211234431236196165737915193⟩,⟨5544698025976363993705488899677557003467318392,5544698025976363993705488901228193675858062814⟩,⟨112854511302765511076712219734073606755082041645,112854511302765511076712219734163223321326627086⟩,⟨5351656910365103196377882946552530772765424776,5351656910365103196377882948103578730990424773⟩,⟨107596504420595097967446133627726406734118697725,107596504420595097967446133627925310640661109430⟩,⟨5159121039295990318264215289223540446603480001,5159121039295990318264215290773882852647734478⟩,⟨102407726839584314166451776523124348718051168528,102407726839584314166451776523141865156220117007⟩,⟨5543994222540256914967032033092951170067140085,5543994222540256914967032034643210206449713948⟩,⟨112747772810674275956479849132288046504674994605,112747772810674275956479849132288162454524088801⟩,⟨6102098030761666536875266266543185075592171610,6102098030761666536875266268093823001179182150⟩,⟨128240009220484054716700804553203632674234360336,128240009220484054716700804553291762049116517248⟩,⟨6279449979712292015099264463082617029803732020,6279449979712292015099264464633671988276311193⟩,⟨133239470625040952503984462087764326563103505696,133239470625040952503984462087960529485804746474⟩,⟨6756655940132499547101360413228981378700137969,6756655940132499547101360414779322893128425298⟩,⟨146806381188850435379548823446951522338806523872,146806381188850435379548823446969002415184304001⟩,⟨7115227342708737897244827280402729788408688932,7115227342708737897244827281952996504947012844⟩,⟨157044520370752437606840408572794731303110043028,157044520370752437606840408572796125783222657127⟩,⟨7269044580356335647738549955505583702062205782,7269044580356335647738549957056220515031613286⟩,⟨161410046947172560877462442316716698880702006273,161410046947172560877462442316806312176566127540⟩] +lemma remainderColumns6_1_calc (c : Fin 22) : RI.sum (fun j : Fin 31 => (remainderData6_11 j).mul (columnNormTable ⟨c.val,by omega⟩ j))=remainderColumns6_1 c := by + revert c + decide +kernel +lemma remainderColumns6_1_bound (c : Fin 22) : rawRemainderColumn 1 6 c < (162/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData6_11_mem j) (columnNormTable_mem ⟨c.val,by omega⟩ j)) + rw [remainderColumns6_1_calc] at hh + have hb := ri_mem_lt hh 162 1000000000000000 (by norm_num) (by clear hh; revert c; decide +kernel) + simpa only [rawRemainderColumn,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst6_0 : RI := ⟨2754363752882702151881500878729181939270482946869770,2754363752882702151881500878729181939270482946915417⟩ +lemma remainderConst6_0_calc : RI.sum (fun j : Fin 31 => (remainderData6_00 j).mul (columnNorm22 j))=remainderConst6_0 := by decide +kernel +lemma remainderConst6_0_bound : rawRemainderConstant 0 6 < (2754364/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData6_00_mem j) (fourierNorm_mem j)) + rw [remainderConst6_0_calc] at hh + have hb := ri_mem_lt hh 2754364 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +def remainderConst6_1 : RI := ⟨67290391598565760365398400264026350993117874248924688,67290391598565760365398400264026350993117874487023557⟩ +lemma remainderConst6_1_calc : RI.sum (fun j : Fin 31 => (remainderData6_01 j).mul (columnNorm22 j))=remainderConst6_1 := by decide +kernel +lemma remainderConst6_1_bound : rawRemainderConstant 1 6 < (67290392/1000000000000000:ℝ) := by + have hh := RI.mem_sum (fun j : Fin 31 => RI.mem_mul (remainderData6_01_mem j) (fourierNorm_mem j)) + rw [remainderConst6_1_calc] at hh + have hb := ri_mem_lt hh 67290392 1000000000000000 (by norm_num) (by decide +kernel) + simpa only [rawRemainderConstant,Nat.cast_ofNat,Nat.cast_one,Int.cast_ofNat,Int.cast_one] using hb +lemma remainderTable6 (c d : Fin 22) : 3*(rawRemainderColumn 0 6 c+rawRemainderColumn 1 6 d)+(6/1000)*(rawRemainderConstant 0 6+rawRemainderConstant 1 6) < (75/10000000:ℝ) := by + have h0 := remainderColumns6_0_bound c + have h1 := remainderColumns6_1_bound d + have h2 := remainderConst6_0_bound + have h3 := remainderConst6_1_bound + linarith +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SignBase.lean b/lean/OAI/Analysis/Triangular/Signs/SignBase.lean new file mode 100644 index 0000000000000000000000000000000000000000..f7e0f65ca8776cc4a7a61006100e5b6a9658f571 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SignBase.lean @@ -0,0 +1,73 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate + +def ordinaryOffset (n : Fin 7) (r : Fin 8) : ℝ := + if n.val=0 ∧ r.val=1 then Q 1/(2*Z) + else if n.val=1 ∧ r.val=3 then (4/5:ℝ)*Q 1 else 0 +def ordinarySignRow (side : Fin 2) (n : Fin 7) (y : Fin 2) (l : Fin 21) (r : Fin 8) : ℝ := + if side.val=0 then (if l.val=0 then ordinaryOffset n r else 0) - + taylorRow side (nearNode n) (nearDisplacement n y) l.val r + else taylorRow side (nearNode n) (nearDisplacement n y) l.val r +def ordinarySignValue (side : Fin 2) (n : Fin 7) (y : Fin 2) (e : Fin 8 → ℝ) (τ : ℝ) : ℝ := + if side.val=0 then (∑ r : Fin 8, ordinaryOffset n r*e r) - + finiteTaylor side (nearNode n) (nearDisplacement n y) e τ + else finiteTaylor side (nearNode n) (nearDisplacement n y) e τ +lemma ordinarySignValue_eq (side : Fin 2) (n : Fin 7) (y : Fin 2) (e : Fin 8 → ℝ) (τ : ℝ) : + ordinarySignValue side n y e τ = + ∑ l : Fin 21, (∑ r : Fin 8, ordinarySignRow side n y l r*e r)*τ^l.val := by + have ht : (∑ l : Fin 21, (∑ r : Fin 8, + taylorRow side (nearNode n) (nearDisplacement n y) l.val r*e r)*τ^l.val) = + finiteTaylor side (nearNode n) (nearDisplacement n y) e τ := by + rw [finiteTaylor,← Fin.sum_univ_eq_sum_range] + unfold ordinarySignValue ordinarySignRow + split_ifs with h + · simp only [sub_mul,Finset.sum_sub_distrib,ite_mul,zero_mul, + Finset.sum_ite_irrel,ht,Finset.sum_const_zero] + congr 1 + symm + rw [Finset.sum_eq_single (0:Fin 21)] + · simp + · intro b hb hb0 + have hne : b.val ≠ 0 := by intro hh; apply hb0; exact Fin.ext hh + simp [hne] + · simp + · exact ht.symm +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def ordinaryOffsetBox (n : Fin 7) (r : Fin 8) : RI := + if n.val=0 ∧ r.val=1 then QBox1.mul ((RI.point 2).mul ZBox).invPos + else if n.val=1 ∧ r.val=3 then ((RI.point 4).divNat 5).mul QBox1 else RI.point 0 +lemma ordinaryOffsetBox_mem (n : Fin 7) (r : Fin 8) : + (ordinaryOffsetBox n r).Mem (ordinaryOffset n r) := by + unfold ordinaryOffsetBox ordinaryOffset + split_ifs + · rw [div_eq_mul_inv] + exact RI.mem_mul QBox1_mem (RI.mem_invPos (RI.mem_mul (RI.mem_point 2) ZBox_mem) (by decide +kernel)) + · exact RI.mem_mul (RI.mem_divNat (RI.mem_point 4) (by norm_num)) QBox1_mem + · simpa using RI.mem_point 0 + +def ordinarySignRowBox (side : Fin 2) (n : Fin 7) (a : Fin 21 → Fin 8 → RI) + (l : Fin 21) (r : Fin 8) : RI := + if side.val=0 then ((if l.val=0 then ordinaryOffsetBox n r else RI.point 0).sub (a l r)) else a l r +lemma ordinarySignRowBox_mem (side : Fin 2) (n : Fin 7) (y : Fin 2) + {a : Fin 21 → Fin 8 → RI} + (ha : ∀ l r, (a l r).Mem (taylorRow side (nearNode n) (nearDisplacement n y) l.val r)) + (l : Fin 21) (r : Fin 8) : + (ordinarySignRowBox side n a l r).Mem (ordinarySignRow side n y l r) := by + unfold ordinarySignRowBox ordinarySignRow + split_ifs + · exact RI.mem_sub (ordinaryOffsetBox_mem n r) (ha l r) + · exact RI.mem_sub (by simpa using RI.mem_point 0) (ha l r) + · exact ha l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs00.lean b/lean/OAI/Analysis/Triangular/Signs/Signs00.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5c5c2d01e026585b5f7bb67d2d5798e0fabecdd --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs00.lean @@ -0,0 +1,281 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows00 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_0_0_0 : Fin 8 → RI := ![⟨310627079097082178063118274154035356158754197590155965641161,310627079097082178072923986867761465837071218935033349773874⟩, + ⟨61361665963453900494401710627341928601141818699614960098580,61361665963453900501453642552264341024144355064419692935381⟩, + ⟨483169025561007177361993851881727100628698146249150156641056,483169025561007177509694290870217463910395993362159738691862⟩, + ⟨-696790370593526751623657129039898498341987982476803480155054,-696790370593526751569004199663519520613599376826935327342018⟩, + ⟨-776720069120214335967184999696320074536128050804987504525835,-776720069120214335810638029134608472751440717954793103515573⟩, + ⟨-400251014916968479706971544397951880890928862379172327314029,-400251014916968479639782742773764022416132335844181590740192⟩, + ⟨-18843983881606130606751317837848826285292126167312083414147,-18843983881606130488631914581623292223121193130096760516798⟩, + ⟨-16573469530357650255368719055320262986766741782515978285787,-16573469530357650188739920338582793346555232044366137412869⟩] +lemma bs0_0_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 0 r = bs0_0_0_0 r := by + revert r + decide +kernel +def bs0_0_0_1 : Fin 8 → RI := ![⟨307386530583974313127929646448657371554320501170871700572289,307386530583974313138282272410128927905154336036177642930114⟩, + ⟨63134228528158602019036857775108177427013747618957266637598,63134228528158602026482110930672207168798579957533172146282⟩, + ⟨466329923776456458249585742683314402894912123049495056064335,466329923776456458405524167949614389532949307183006001166681⟩, + ⟨-677043807031929914749593103539655572883734125226514472504007,-677043807031929914691891909138915202283099304389792059678735⟩, + ⟨-755910852276029570762717827096591009400267029332243679917692,-755910852276029570597439455300484322993110823858948602934646⟩, + ⟨-395966149352147586398914255961399815069518190491191997935824,-395966149352147586327978001522676937812854705597480333732133⟩, + ⟨-18436520922738292788921861039883947976649941467332157496991,-18436520922738292664214352630885228431957023936641998234066⟩, + ⟨-18104774859644739235455242016958061698261201333103040351424,-18104774859644739165110224626113990361451165756847236976434⟩] +lemma bs0_0_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 1 r = bs0_0_0_1 r := by + revert r + decide +kernel +def bs0_0_0_2 : Fin 8 → RI := ![⟨302885338891488801347860147076612141271682527641966101801812,302885338891488801358818265581511106665997289342643558275912⟩, + ⟨65746007095227041794404453298390189405602344064447374929022,65746007095227041802285155902851740994335625011419334983005⟩, + ⟨440719580601325908158082794351069505192550006995442542520139,440719580601325908323141567834624571704082709767014983401038⟩, + ⟨-650028927851710462164614043616706423910595503766475044929389,-650028927851710462103538087770259392183265125655354090525422⟩, + ⟨-725317066566218044571931538789081851077699369812384562140297,-725317066566218044396986554668473532773288697153272422780250⟩, + ⟨-386899299845780433422109263913485790329697867282927880756382,-386899299845780433347024170979096183744238760149119427450177⟩, + ⟨-18161111232240138794860356969876913628342802745994096289243,-18161111232240138662859098479358548596712514564337269997288⟩, + ⟨-19011687441163983578079994054668492394959844092995079885839,-19011687441163983503620717764090731243355911105592120313766⟩] +lemma bs0_0_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 2 r = bs0_0_0_2 r := by + revert r + decide +kernel +def bs0_0_0_3 : Fin 8 → RI := ![⟨297126477945779123065922329998211798044194393264078114771763,297126477945779123077554038210073961509694817318527093966736⟩, + ⟨69191525053300754037682411403321471032844996959337287754289,69191525053300754046047536598720930441252400891914179573939⟩, + ⟨405901681336904015782172097968502660482306354590533822982550,405901681336904015957376946329025010667364391956711837483874⟩, + ⟨-615556669914529830892247103644178898616811313444156283926922,-615556669914529830827416841327810967403485282805834993840474⟩, + ⟨-684534010654767096931733268553765519141885216770249648496934,-684534010654767096746034509454992604221217227660469873620434⟩, + ⟨-372777774875727814051677331743621259224908443134648436009751,-372777774875727813971976798145504089930124325130104789565951⟩, + ⟨-18042527251358496397073300202593593340307404242469968024904,-18042527251358496256957994671503105167815086541213964387543⟩, + ⟨-19221696475765024778372610034886784733468263857435483427562,-19221696475765024699336361696135398140831972848076900168387⟩] +lemma bs0_0_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 3 r = bs0_0_0_3 r := by + revert r + decide +kernel +def bs0_0_0_4 : Fin 8 → RI := ![⟨290151111824837164472900798961076739962775021777329290145869,290151111824837164485285574420045336283532300269730598470950⟩, + ⟨73440581648522435800950731456496514863031350052697982506979,73440581648522435809857436761009065886338955555376628664339⟩, + ⟨361736434787389326572755730131278882125949150632194688869501,361736434787389326759303799146072330145882533685101952429888⟩, + ⟨-573666119926612240374734312070226598306178621364451300173051,-573666119926612240305706768814346031014219835239842418886872⟩, + ⟨-633475368194540570207839778923588660711326448260170657757848,-633475368194540570010118395911363247684834844773974400252573⟩, + ⟨-353502214732989163908823684494196146230988518088456898134851,-353502214732989163823963129656346653436677915941080986521367⟩, + ⟨-18083526020396711699609800928482846093579262031856193150197,-18083526020396711550423063627298936464014805760826473690477⟩, + ⟨-18714488073988925144734432816944255132224458740183813146280,-18714488073988925060581170805368162837690129431331926039448⟩] +lemma bs0_0_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 4 r = bs0_0_0_4 r := by + revert r + decide +kernel +def bs0_0_0_5 : Fin 8 → RI := ![⟨282047165553255889705387331838244623749325320909598778816918,282047165553255889718618335038236023493143508034166621872701⟩, + ⟨78432531418754066503978894669426327563479615885161302445901,78432531418754066513494177911805419748225071995937500095714⟩, + ⟨308463642560764230964786645227421854280365595457804114423043,308463642560764231164081182804039831584839802981407602790685⟩, + ⟨-524682168921177728179034197449177737611550756173834391957102,-524682168921177728105290135739577589967157556267802346935069⟩, + ⟨-572459272050659061614015561533212357825450735183483935624563,-572459272050659061402784259035686534652397557128009624894518⟩, + ⟨-329196491636263868449550961803975481428462331483788643575713,-329196491636263868358892049470063429791008459732591555675525⟩, + ⟨-18257100894995452374841047535594028260398805063105419249587,-18257100894995452215460669169589886231761170278109925951349⟩, + ⟨-17539149027129820512026162026341491319881000277780274040419,-17539149027129820422122870468559282481262348308550787159576⟩] +lemma bs0_0_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 5 r = bs0_0_0_5 r := by + revert r + decide +kernel +def bs0_0_0_6 : Fin 8 → RI := ![⟨272957845218062957564510271452869334462305194642881952207351,272957845218062957578697219260070229449853796791980058096161⟩, + ⟨84070480652958649200497640250170196633193860466271934585363,84070480652958649210700406033678006980308110718093148560424⟩, + ⟨246780615590253934737842185332882525890187627228932213165780,246780615590253934951535822929440335955319946110977609675078⟩, + ⟨-469271039779274716422860271392851706255506495004506037967836,-469271039779274716343788175441346639434936877670393684909175⟩, + ⟨-502289855706319719150363633838028223474709681100977623667729,-502289855706319718923870795881776611933906114468968533844517⟩, + ⟨-300253731005778078256711295353958545193452259935124766479023,-300253731005778078159502244906761276594283406081286545543108⟩, + ⟨-18499988816195163859309251128091160938171081795123507523032,-18499988816195163688413584700264862686499109353913541020573⟩, + ⟨-15828733274292113230349092008825327781482191381489149909423,-15828733274292113133950256202689762344342024912887425759280⟩] +lemma bs0_0_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 6 r = bs0_0_0_6 r := by + revert r + decide +kernel +def bs0_0_0_7 : Fin 8 → RI := ![⟨263089352876434123019885330046716563353407823356648755542623,263089352876434123035158111061766232224687003793560917451636⟩, + ⟨90215883961097138609527237147922340573318400064419201608236,90215883961097138620510896894685494781294558836644847646575⟩, + ⟨177903782308727016026327540221031658669870720741896731057672,177903782308727016256376749936374489751701267335573897219024⟩, + ⟨-408487252607038863260920051511804402177243407342212442384345,-408487252607038863175795976743997091881868110262551505270500⟩, + ⟨-424323489186275190593747872433245602471747909668951882317912,-424323489186275190349919843840604164202060095850768809679686⟩, + ⟨-267371132946993530727337447402220915452760804839627850398249,-267371132946993530622688261380530547518995874951656495377400⟩, + ⟨-18709254664978409503572333088449136242304477913758853894868,-18709254664978409319596743324870468133658750746531746056163⟩, + ⟨-13808470867047528643460549990002992691614358847746990519687,-13808470867047528539683590394340343580751441769081829618192⟩] +lemma bs0_0_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 7 r = bs0_0_0_7 r := by + revert r + decide +kernel +def bs0_0_0_8 : Fin 8 → RI := ![⟨252716797516580049142589368917961381435888462702674400839539,252716797516580049159102626332641742214157913717502403012523⟩, + ⟨96684191414251616207309074117305273896810960101021331970756,96684191414251616219184841901503714544857025454187205071719⟩, + ⟨103599379245850318853626362498523199739148752089124108468268,103599379245850319102360487235019078154829015735120575081193⟩, + ⟨-343803609950630811005513787909252617944184483514070767008502,-343803609950630810913475818043757972198921285585359752605669⟩, + ⟨-340505565992688621686109821717440261191453295720397529385422,-340505565992688621422477743375676572203287289426932254775122⟩, + ⟨-231564014303474719458695488442385451990573978074134982258050,-231564014303474719345546550779816770640831264226875385278072⟩, + ⟨-18744391847765766041263459092624039113024026063137701895314,-18744391847765765842345117449865638199431843259778512452359⟩, + ⟨-11792697569153005835053904370315809985252649651181428926276,-11792697569153005722848036570042690850977149731320158009006⟩] +lemma bs0_0_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 8 r = bs0_0_0_8 r := by + revert r + decide +kernel +def bs0_0_0_9 : Fin 8 → RI := ![⟨242187096734971079523249445564154290039569769368165805975384,242187096734971079541188427547606147680201895878043017218010⟩, + ⟨103242335772864670729315566332539480477354645371842877709334,103242335772864670742216666277312663191651502408248797407525⟩, + ⟨26165742659027543357586957560291333146794024835956824481175,26165742659027543627796333594581772154821900376165236374233⟩, + ⟨-277114157135804714212325059635058457202265219588975983451650,-277114157135804714112340699084851625550542979300955948099439⟩, + ⟨-253360957173296764064825383091696738435208819866473753130304,-253360957173296763778431791272667870751448966534472740131464⟩, + ⟨-194147609815847955849444184303353452058041573879425566019507,-194147609815847955726526173447328827477909844000477998019588⟩, + ⟨-18437944310217195980420935137546535562904808581262944561114,-18437944310217195764328346176856765557000718336331437480057⟩, + ⟨-10164524161643403680254494658069297201683303334652246307620,-10164524161643403558360976597921449252601308627633409806950⟩] +lemma bs0_0_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 9 r = bs0_0_0_9 r := by + revert r + decide +kernel +def bs0_0_0_10 : Fin 8 → RI := ![⟨231917587069649104894575734483780564163145465259384219349239,231917587069649104914163815161679828589604241823824168940331⟩, + ⟨109608896961160315280870930977601659904897084239907696067551,109608896961160315294958006085055332044231338178818539050430⟩, + ⟨-51651235521969515196970083884865090182429439836551671901221,-51651235521969514901920840702446346403279301991736081698725⟩, + ⟨-210699586059439069752648111554939023094467961731616993793669,-210699586059439069643472366644324250498540030410807827157639⟩, + ⟨-165920381264281847283625940936451485416516783065633298235051,-165920381264281846970904695809708610226292118918838585934089⟩, + ⟨-156674535997992642366362241282084187384636482851454540191053,-156674535997992642232144596399959364192941398281248761349353⟩, + ⟨-17617969134211507152203138863012153540278142567051678422211,-17617969134211506916245542697823906926293279638465963040258⟩, + ⟨-9331768209328486403852803639955752072372952210179125944260,-9331768209328486270753831352689241665885377327431400843551⟩] +lemma bs0_0_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 10 r = bs0_0_0_10 r := by + revert r + decide +kernel +def bs0_0_0_11 : Fin 8 → RI := ![⟨222389275862505107982726776089254750766669249813291585579777,222389275862505108004235194140678118249918094403382732504297⟩, + ⟨115457636738138527433186577496074777515770420235034981078313,115457636738138527448654693311792872839098684315340649672628⟩, + ⟨-126824632675355486069125808495449252104695283914169520405455,-126824632675355485745151113247296318765101575259805131114845⟩, + ⟨-147146566671652014860561768388470807590245855329729518933284,-147146566671652014740682868499294700571630017022143051053397⟩, + ⟨-81568223533455177674883344123371256387727914302442328026157,-81568223533455177331504154281684984918447154280727909273306⟩, + ⟨-120817951833982944070286134537847653304543758645427651476018,-120817951833982943922910326593491128799112313256680982666810⟩, + ⟨-16145360736484134392959771405182486955651699413555886853826,-16145360736484134133869832773897472464293268529841037360843⟩, + ⟨-9653481836423715521892720626507312988715947034172375469540,-9653481836423715375745255479391007786707554939453945288586⟩] +lemma bs0_0_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 11 r = bs0_0_0_11 r := by + revert r + decide +kernel +def bs0_0_0_12 : Fin 8 → RI := ![⟨214134445900978110397022635909593207424888925773571989506883,214134445900978110420783200980764214697930438890038541256457⟩, + ⟨120424611203361622038841492111342640489221889986162510839202,120424611203361622055929274740905916737217597122855420122589⟩, + ⟨-196298709969457380030678491478820610383273530624430742141580,-196298709969457379672780397372309810486317316278395279018079⟩, + ⟨-89219284517976686167732715980500298234866040327725648924540,-89219284517976686035301293332012700805901216977147606392985⟩, + ⟨-3808566337258873608710886463488074708968945840253226658338,-3808566337258873229376452625038257215578342750517179886228⟩, + ⟨-88197887385168669613472802910773682922397841341249511522976,-88197887385168669450665270242299079802821828025785096388717⟩, + ⟨-13967532245991131031768094433097811712795092522052594484790,-13967532245991130745548841513917895315098810417395231461678⟩, + ⟨-11334786575755900010981114082694341634939983894172784950061,-11334786575755899849530544016764425009045272501417958855278⟩] +lemma bs0_0_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 12 r = bs0_0_0_12 r := by + revert r + decide +kernel +def bs0_0_0_13 : Fin 8 → RI := ![⟨207720110375667340460482614770065624559638856793136519024739,207720110375667340486904421679621632971418964429230647429497⟩, + ⟨124118027413399604247782168351062130440757654535779818126080,124118027413399604266783824742629748176217047950663339323864⟩, + ⟨-257304593785845165059810159725989327267766494474594807821707,-257304593785845164661826597152963679284916766923100652151449⟩, + ⟨-39696733284161496639892966003140880681760994659806804823757,-39696733284161496492628897683105145844759251131293511660058⟩, + ⟨64028466881721001195841144690382919764700703663398555239406,64028466881721001617661969867527818356252092190037700489401⟩, + ⟨-60165093642031536591262946262291260511616487202352848823371,-60165093642031536410220568748544376958659533228221518708470⟩, + ⟨-11186177299933226267128528841834408378423926649407088191695,-11186177299933225948852014297612340881806048740538737962860⟩, + ⟨-14295741347509888230812188479502043329410800955466464752682,-14295741347509888051278756721987178920710227606244494502662⟩] +lemma bs0_0_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 13 r = bs0_0_0_13 r := by + revert r + decide +kernel +def bs0_0_0_14 : Fin 8 → RI := ![⟨203732325549760321190309176386636267505748435734344687399924,203732325549760321219900785244938209401971625091672308597318⟩, + ⟨126128090724018488106761572526837101242418679428618935189705,126128090724018488128042841651447349454863995463778355271444⟩, + ⟨-307666601813675441310714603325235772725564401584899586353626,-307666601813675440864985287537005280970360538151136891469864⟩, + ⟨-1218972096134289794441349716753998532138185679677635451375,-1218972096134289629510135000522775153502018650454797037485⟩, + ⟨119068624748540882640143515579704976868716759648957164050815,119068624748540883112569830313542376738211192629555433137081⟩, + ⟨-37589725350175742468615548247058815438280430017659421438375,-37589725350175742265853668998701281115728108099911703135479⟩, + ⟨-8129156945021594807768704079315205297432708706075997831864,-8129156945021594451308823820062871574245492794005839870751⟩, + ⟨-18035967635734973498159710493016743851425892717961144994994,-18035967635734973297087803951950013897811561883670922794181⟩] +lemma bs0_0_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 14 r = bs0_0_0_14 r := by + revert r + decide +kernel +def bs0_0_0_15 : Fin 8 → RI := ![⟨202772748513475740960928034186294885039150123943192682697380,202772748513475740994327186142789226689330172157194566451572⟩, + ⟨126030730688198496835285001668812625195229001509889692719884,126030730688198496859304525065659222663402205721567524884585⟩, + ⟨-345934932173368546289187240726136811100735285541606460014139,-345934932173368545786106072657539775150108798043185411681599⟩, + ⟨23761002524323609266558849782707285331889764632565732908169,23761002524323609452711712542836401183862541726323432512088⟩, + ⟨159003263195837142400744193882037290525805104372434475706877,159003263195837142933957455436943524574604772261289971562766⟩, + ⟨-20761750638836218237344965474009265149241699477107156227669,-20761750638836218008493778356544259762022627806830828357580⟩, + ⟨-5402291577639704016004303431669327833393398609709116975071,-5402291577639703613678841364529157018612755230321594395118⟩, + ⟨-21546102149517072061095010551792162034479114150737664623739,-21546102149517071834151244401234111662485167522275615020153⟩] +lemma bs0_0_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 15 r = bs0_0_0_15 r := by + revert r + decide +kernel +def bs0_0_0_16 : Fin 8 → RI := ![⟨205489927255940409501380187374908117192236894124689975338182,205489927255940409539394034698425902823465016733031269902014⟩, + ⟨123373100264144955131035365486410240898834241160195302996033,123373100264144955158373619355379997193238371489101964782819⟩, + ⟨-371022255188590763404748729065506532032379803637527390698441,-371022255188590762832157821991198426549822812329029197720634⟩, + ⟨32730949992691482921442678113276636526024765380851762909572,32730949992691483133315917079947517784593006356655111438305⟩, + ⟨181712758334537770756772569892028735442930794580830692942996,181712758334537771363658862752388872054717621401316356774561⟩, + ⟨-9613016814145129843017857437486525940738496079656640421839,-9613016814145129582546750322708525974122452094605181534196⟩, + ⟨-3871642154995102989914807933188785287030417218642423871418,-3871642154995102532000825285248264671721993593286198284943⟩, + ⟨-23368475360928512266448194238342017880497398604266463196003,-23368475360928512008148052704117938858115305928226919617123⟩] +lemma bs0_0_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 16 r = bs0_0_0_16 r := by + revert r + decide +kernel +def bs0_0_0_17 : Fin 8 → RI := ![⟨212686684934545655237408866471690928825934178976013352883310,212686684934545655281069073175849288721858982444291894592907⟩, + ⟨117617252216938108955855256732141826887700715081887387628229,117617252216938108987254178411841856670585235681299970365380⟩, + ⟨-380754809106207969263607161441081113195167335784108454261245,-380754809106207968605966877178123845655566980675746366293063⟩, + ⟨22234720686084502572168087037967986009058396692837500927128,22234720686084502815511764661161598869183843944471532436956⟩, + ⟨183830447579018693380874665560436339531652309380351981850462,183830447579018694077904375987081150689241312733710084944020⟩, + ⟨-4644701052786397619829561104045312134199576215151580198010,-4644701052786397320669566058348890534238414777289994310734⟩, + ⟨-4483563037316501393884653675539682946384492152323068208715,-4483563037316500867954748051960264609282804660420915912037⟩, + ⟨-21996866358803261749541494402069793030164569761790809828158,-21996866358803261452874927739126366209059798623879358214154⟩] +lemma bs0_0_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 17 r = bs0_0_0_17 r := by + revert r + decide +kernel +def bs0_0_0_18 : Fin 8 → RI := ![⟨225576901096659368430996045793330415860706468235718503997319,225576901096659368481635253129492467268557982637469375111589⟩, + ⟨107994693468977112209163045949072955907557222626546198578574,107994693468977112245581025274089200326262937645770022669954⟩, + ⟨-368301835862865020238020062575452174265627537909063776441654,-368301835862865019475257235247646129072114988033008265117767⟩, + ⟨-14253394689981444009253147850965956287693869990210348020921,-14253394689981443727011448251894042608258573656996790357148⟩, + ⟨157241248538862378515975089909943619000121518498730909255959,157241248538862379324423667920836514115464313589347391807118⟩, + ⟨-9234459608548283203796759475229956887135356161584615934078,-9234459608548282856816610748834946127719797186609689819385⟩, + ⟨-7756065545159191236761929950095663126667543202954538565427,-7756065545159190626763133659710067666998793969801006796629⟩, + ⟨-16952847695840129434563642828412476090710091003597876142778,-16952847695840129090475492243702056781981457306651746986779⟩] +lemma bs0_0_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 18 r = bs0_0_0_18 r := by + revert r + decide +kernel +def bs0_0_0_19 : Fin 8 → RI := ![⟨246319986986855690968060398201684512486075573234895275274672,246319986986855691027419971675694362154425500639275028687834⟩, + ⟨93174273061954560340361569888024338945835715209619330151468,93174273061954560383050937144095462331038164544467993031087⟩, + ⟨-314691184744437140958573959789157043166630954344313443413309,-314691184744437140064458935606218296466674356316544477719706⟩, + ⟨-90733645563947231135443357291684645473300112151485551024908,-90733645563947230804597994854409313129334129738315166888032⟩, + ⟨81778712232808028931176110565964840834961677505662659996474,81778712232808029878844237510764037592577360832318723377358⟩, + ⟨-34488341914584978935757661568375493836417178452801502145326,-34488341914584978529025512398321898667987538242561248049502⟩, + ⟨-12647985172860227992513106440010679113173698526197994965327,-12647985172860227277468968262077775134714815952694018684940⟩, + ⟨-11128284892737034760923632004805958905086585149908330686541,-11128284892737034357581499877407236739700174635678576973914⟩] +lemma bs0_0_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 19 r = bs0_0_0_19 r := by + revert r + decide +kernel +def bs0_0_0_20 : Fin 8 → RI := ![⟨279061558171982991316153950474900920308910128753814042897484,279061558171982991386538652812934157640942237965238946356203⟩, + ⟨70508490556503696222738190971374375306413972141574339691172,70508490556503696273356452382068276232693660289554078166252⟩, + ⟨-174280308232196320089808079086764122699788135598186755296349,-174280308232196319029624924964304316163015814088059009349505⟩, + ⟨-237169410736907650489661981061374306736231455495457298013968,-237169410736907650097367175151120752628754957226246284530413⟩, + ⟨-88904094722514730616254271996575478090549444547426318230880,-88904094722514729492571348984577882489965940873562613455061⟩, + ⟨-108668244788934808832119642075273763915716685157765135637761,-108668244788934808349843244607071139228260650741668743526390⟩, + ⟨-14282971056554751289227343578727581044707388372855383887811,-14282971056554750441374741561549130227090721382430585065733⟩, + ⟨-15433852026085439955437983632532469990055533396390293209284,-15433852026085439477181246786844355369157275288869194385198⟩] +lemma bs0_0_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) 20 r = bs0_0_0_20 r := by + revert r + decide +kernel +def bs0_0_0 : Fin 21 → Fin 8 → RI := ![bs0_0_0_0,bs0_0_0_1,bs0_0_0_2,bs0_0_0_3,bs0_0_0_4,bs0_0_0_5,bs0_0_0_6,bs0_0_0_7,bs0_0_0_8,bs0_0_0_9,bs0_0_0_10,bs0_0_0_11,bs0_0_0_12,bs0_0_0_13,bs0_0_0_14,bs0_0_0_15,bs0_0_0_16,bs0_0_0_17,bs0_0_0_18,bs0_0_0_19,bs0_0_0_20] +lemma bs0_0_0_mem (d : Fin 21) (r : Fin 8) : (bs0_0_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 0 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 0 tr0_0_0) d r = bs0_0_0 d r := by + fin_cases d + · exact bs0_0_0_0_calc r + · exact bs0_0_0_1_calc r + · exact bs0_0_0_2_calc r + · exact bs0_0_0_3_calc r + · exact bs0_0_0_4_calc r + · exact bs0_0_0_5_calc r + · exact bs0_0_0_6_calc r + · exact bs0_0_0_7_calc r + · exact bs0_0_0_8_calc r + · exact bs0_0_0_9_calc r + · exact bs0_0_0_10_calc r + · exact bs0_0_0_11_calc r + · exact bs0_0_0_12_calc r + · exact bs0_0_0_13_calc r + · exact bs0_0_0_14_calc r + · exact bs0_0_0_15_calc r + · exact bs0_0_0_16_calc r + · exact bs0_0_0_17_calc r + · exact bs0_0_0_18_calc r + · exact bs0_0_0_19_calc r + · exact bs0_0_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 0 0 tr0_0_0_mem) d r +lemma bs0_0_0_lower (d : Fin 21) : (57000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 0 0) d) := by + have hc : ∀ d : Fin 21, (57000:ℤ)*scale < 1000000*(rowLowerBox (bs0_0_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_0_0_mem d)).1 + have hnum : (57000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_0_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_0_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (57000/1000000:ℝ) < ordinarySignValue 0 0 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 0 0) _ bs0_0_0_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs01.lean b/lean/OAI/Analysis/Triangular/Signs/Signs01.lean new file mode 100644 index 0000000000000000000000000000000000000000..f77def25c2f5c439b2c33226c0aac89f6359b209 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs01.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows01 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_1_0_0 : Fin 8 → RI := ![⟨-36667751636365443940845858708717326459367581500199434198912,-36667751636365443939434531135596698870174490489317241911122⟩, + ⟨18492631635635764028483427952068908172679474522565510083326,18492631635635764029498406287610906925035647960641436095566⟩, + ⟨745537937317760844698907463863366616376624276963191837497245,745537937317760844720165857638602368292625502816135098100475⟩, + ⟨-160983113086922546203391027763078878971748810926919291314386,-160983113086922546195524879891932835966029102572974096290028⟩, + ⟨-706469331166926317236637733770915719054228104314591754885615,-706469331166926317214106066515242328673484006251263510532332⟩, + ⟨-240501608250212125714906167318212105252783951746337172396312,-240501608250212125705235742420881014091091484266233578734422⟩, + ⟨-7887414792121986614748266162055072016658786841169803114401,-7887414792121986597747444744014003187463176148367589675676⟩, + ⟨3479582196311526050779543998556839177502592504038835278954,3479582196311526060369368168808262596827225045408801281733⟩] +lemma bs0_1_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 0 r = bs0_1_0_0 r := by + revert r + decide +kernel +def bs0_1_0_1 : Fin 8 → RI := ![⟨-40590569999221706637520108108544921181764095728564937454236,-40590569999221706636066253219489888833601539325241432013768⟩, + ⟨20451386706487244225676089989611260004557214526524373962632,20451386706487244226721652510681637668011638206780602616694⟩, + ⟨744103822685633274381434118644226682546716686665929897900401,744103822685633274403333088318056487966234958135897093511047⟩, + ⟨-148575825427697818234402173862512915758580104823238819846923,-148575825427697818226298996571603610820886825192442480927274⟩, + ⟨-701336596943239207153052052393128054769612215653445830998451,-701336596943239207129841441885538182663708265153003838451757⟩, + ⟨-241800677567740298962322484370202249356567639857130267993931,-241800677567740298952360662051899906701560320097499858527959⟩, + ⟨-8897349742439224080241587699575163804535606738488580207382,-8897349742439224062728483153750324205323851346816812494783⟩, + ⟨4831558262479267377108127167716311035725135205225504993817,4831558262479267386986920029567427881586281256132106591188⟩] +lemma bs0_1_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 1 r = bs0_1_0_1 r := by + revert r + decide +kernel +def bs0_1_0_2 : Fin 8 → RI := ![⟨-44679631241527322932311277837753306784600076850111323525367,-44679631241527322930812589063123323638133265708087946290812⟩, + ⟨22482593533626365595922095385579546607651155859923112019943,22482593533626365596999900897872085842476388605031417937092⟩, + ⟨739909313390323979903102063319701960370405778789702557169701,739909313390323979925676352042210111917322806879209033645270⟩, + ⟨-134304754864733440608905782889099996062490763317452090192593,-134304754864733440600552720326803496271555359862843135584558⟩, + ⟨-693322372626058777689677572613559129283902528214586343862830,-693322372626058777665751194759744254229706413932069085591409⟩, + ⟨-241725435806049614158685445114969289126546497715693314707238,-241725435806049614148416420746836523986551046440305522593586⟩, + ⟨-9931831652944816555420228909464960109181140155308729807026,-9931831652944816537367056347866405395356385535471486392581⟩, + ⟨6278603346895417093928367008075971744396649611680140803184,6278603346895417104111801462494985884499105685431152890553⟩] +lemma bs0_1_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 2 r = bs0_1_0_2 r := by + revert r + decide +kernel +def bs0_1_0_3 : Fin 8 → RI := ![⟨-48910925802279709403611801208662279562270060768253699447527,-48910925802279709402065783213128800391803515896644933758343⟩, + ⟨24570754464131260374639423460427764498647265157740319971315,24570754464131260375751266523438129145446487161196012035033⟩, + ⟨733045720455463053007059681687048893789606652923072499891582,733045720455463053030346875927902811471069703795707142714923⟩, + ⟨-118270315980576436274241568876646817200448108277828627293847,-118270315980576436265624713090576996591022124781420944882751⟩, + ⟨-682534842218673580566948393859092373923782287383754662612254,-682534842218673580542266410944268425804115400332954807081680⟩, + ⟨-240325693835620615119002030265628238359648428589348148064063,-240325693835620615108408705795191849845908573343065161353861⟩, + ⟨-10971631434181618812809963786557576448120896710760779623822,-10971631434181618794186664453801741633334278944101847727584⟩, + ⟨7788974539608436576240498784888612319671448306088510877455,7788974539608436586745530376073807025926164412010900748493⟩] +lemma bs0_1_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 3 r = bs0_1_0_3 r := by + revert r + decide +kernel +def bs0_1_0_4 : Fin 8 → RI := ![⟨-53257222159055267245635717577119196410771694412736789376212,-53257222159055267244039665755132998116173776320266889137135⟩, + ⟨26698260804840335077318873073132868493400285862695213528955,26698260804840335078466698746314518925419400727560231677955⟩, + ⟨723639614681357547253268131427952640736354883561223100223923,723639614681357547277308969829881084666945276625729875223291⟩, + ⟨-100597103519998595719884507402172408577866467454301502946957,-100597103519998595710988784055516955987320320880869745807241⟩, + ⟨-669118876073128303159196074500320583492025219870475032230775,-669118876073128303133715307836941775208427774412184287799150⟩, + ⟨-237671319372944121059419574028594990076434682284255878240034,-237671319372944121048483417482588199018510104447340421386181⟩, + ⟨-11995231040744828009373306942774980573602866502524539463313,-11995231040744827990147301218927672137234646286890719279347⟩, + ⟨9325862775373226330068810773537286739053911306961731685085,9325862775373226340913817015085383537612029588797762712944⟩] +lemma bs0_1_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 4 r = bs0_1_0_4 r := by + revert r + decide +kernel +def bs0_1_0_5 : Fin 8 → RI := ![⟨-57688412993350822515895901006304883354031049131350820364310,-57688412993350822514246877715430658405356655871640318896574⟩, + ⟨28845594234427694989273774772520870310818194792321519695004,28845594234427694990459695707454837187064034721694605687931⟩, + ⟨711849350804263156768794914876126842827549641201766614836456,711849350804263156793633646244901510039304011754020468397559⟩, + ⟨-81431573102458648540579872640539014115874057492359417365440,-81431573102458648531388908546636004064164291668014029057266⟩, + ⟨-653252533221323352642972561496215264028901923650863007750699,-653252533221323352616646111992149079056506389346424270872199⟩, + ⟨-233849989479114539062145184729015390727775241279953798668565,-233849989479114539050846067364045494712667978544674534909292⟩, + ⟨-12979431945687172626895766590957533653176388440522130255171,-12979431945687172607031667698796658349252644983937417836610⟩, + ⟨10848606929027162047606882680521474958481087193176472548490,10848606929027162058811824547448820908144386112057899544032⟩] +lemma bs0_1_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 5 r = bs0_1_0_5 r := by + revert r + decide +kernel +def bs0_1_0_6 : Fin 8 → RI := ![⟨-62171955805745315360949067198092827779371088795005225725541,-62171955805745315359243874243959601031115827142016389994074⟩, + ⟨30991596219747389199719451229077698954687177618130008922224,30991596219747389200945767457351562727565388218006341226867⟩, + ⟨697860493133584744975221623127253419871018368495235248389653,697860493133584745000906420882430155858458015504240932160242⟩, + ⟨-60939029233229923820055621733485484126639805499198774714984,-60939029233229923810551591498478906241633312167391923865523⟩, + ⟨-635142466458070185947924521058931279079802862113241047294140,-635142466458070185920701329943151372920078349177417799773707⟩, + ⟨-228964261010756684618602122153268493686855254475511092479875,-228964261010756684606918129922533914880891619511851727904268⟩, + ⟨-13900117067151033557366745825262040444124125419495580674424,-13900117067151033536826028384585639535285450568104714415432⟩, + ⟨12314209350066729513069185714665772709116818864449833380724,12314209350066729524655794605310410743303587205295102088846⟩] +lemma bs0_1_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 6 r = bs0_1_0_6 r := by + revert r + decide +kernel +def bs0_1_0_7 : Fin 8 → RI := ![⟨-66673397648229593768360348861675795924404168075549548637705,-66673397648229593766595495625236731771038774026157412924489⟩, + ⟨33113799627813402946374476395592999262080750031447477511623,33113799627813402947643698250581342612881649661922488524724⟩, + ⟨681880298156031021845138994232009195006269042175703004374095,681880298156031021871722436496224484838916885249384517379431⟩, + ⟨-39300012674565708320313837866763328727785835423409854777044,-39300012674565708310477286244319107703063714991526457491184⟩, + ⟨-615018382269412652004171805022232240398968403470955830373684,-615018382269412651975996145000528662577214827237385661242699⟩, + ⟨-223128062173033737113177718623346442914574438031928765458485,-223128062173033737101084933784431876315402552333058339749620⟩, + ⟨-14733143684515963934838057689470589031001790904571790379065,-14733143684515963913578673778758068330937625040486030102355⟩, + ⟨13679102665593232075657194736667344288547977734442352642569,13679102665593232087649189044645849365714878300951794223290⟩] +lemma bs0_1_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 7 r = bs0_1_0_7 r := by + revert r + decide +kernel +def bs0_1_0_8 : Fin 8 → RI := ![⟨-71156968158833111276611185790793892974100330732999680770410,-71156968158833111274782852235309321138670147508159761946153⟩, + ⟨35188812620840024037922622366363953478670577065285303314083,35188812620840024039237497087336079337940367852625916426656⟩, + ⟨664131483317006433587647398828943454403944568543806708614293,664131483317006433615187025642367485247759358457492828812579⟩, + ⟨-16706222524282996464218545383144709235898036056015999275078,-16706222524282996454028181090891781277222488684789804422289⟩, + ⟨-593126779365572262734212476000644743356044645288326295919577,-593126779365572262705023360666759131078317643304033782880709⟩, + ⟨-216462756074214564884133057218663765583755187229403031271391,-216462756074214564871605304857168457223440346704807204934917⟩, + ⟨-15455332332048658517658080939988010066661922519230703957058,-15455332332048658495634014479318040022924356174491013825748⟩, + ⟨14901093130675311511256502753002502951966765238434246644831,14901093130675311523679839230915359647403948117333521041063⟩] +lemma bs0_1_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 8 r = bs0_1_0_8 r := by + revert r + decide +kernel +def bs0_1_0_9 : Fin 8 → RI := ![⟨-75586219856936006841001128386078253803405658395848157889940,-75586219856936006839105121990006195054626479343753174205499⟩, + ⟨37192741071315045521339935082560685077629951265348286188910,37192741071315045522703477787067117576166206249751259636465⟩, + ⟨644845580096940113363750537322235499176537910605398709998090,644845580096940113392309499349215020229392486412773691078602⟩, + ⟨6643851311659676410115623496453755627664899557432677857336,6643851311659676420683167814926022410952575099382580698022⟩, + ⟨-569724256409759186874039331806145529999662110561831196311960,-569724256409759186843769828080783250897505742128236978174097⟩, + ⟨-209092971746735436737976982966472356759463663261498002319827,-209092971746735436724985535899920551714068208098747586806111⟩, + ⟨-16045504348456804859489012545538860625365887435451680864159,-16045504348456804836649760511120434527483974938645804161199⟩, + ⟨15941382302962298366268405331334291020081136735402705618776,15941382302962298379151571727298484203882111593802245701107⟩] +lemma bs0_1_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 9 r = bs0_1_0_9 r := by + revert r + decide +kernel +def bs0_1_0_10 : Fin 8 → RI := ![⟨-79924690210024437442038905661674161780693625704017047090384,-79924690210024437440070611083972310856142609324554958523612⟩, + ⟨39101632580112991339428119901931983442602147419879859756826,39101632580112991340843649784791129194094495578164742375378⟩, + ⟨624256226143489538746620816245498896008819865479117056026851,624256226143489538776268632950654209615066433675682213874388⟩, + ⟨30549376494074344691726137519573268285607623470857242587864,30549376494074344702696585839207607696782714622979123328713⟩, + ⟨-545070734309773981717094723266117598600204249001185227798027,-545070734309773981685671147809822583121093444566046588544235⟩, + ⟨-201142434619979845485600495814764893758362052528372770430295,-201142434619979845472113729698956492808339997516474891785937⟩, + ⟨-16485509921113676696010447214095979585929191020589787202933,-16485509921113676672300413307585119987687659756860558078656⟩, + ⟨16766548837793556076223954111080754137888868102143573876966,16766548837793556089598311187771134432693807630769322468822⟩] +lemma bs0_1_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 10 r = bs0_1_0_10 r := by + revert r + decide +kernel +def bs0_1_0_11 : Fin 8 → RI := ![⟨-84136556904799353921070118897863791231021194115564192500349,-84136556904799353919024438879798112125591610359279993843486⟩, + ⟨40891923162188002519117941875326987968619695493175227323566,40891923162188002520589124710015362925102617548455916377827⟩, + ⟨602592787269785407382428590566519157808857562586489701359835,602592787269785407413242040392650483119783150377802760600922⟩, + ⟨54811477714850871992271969591510546618413217893318968549492,54811477714850872003673731894310389903876356731530012217444⟩, + ⟨-519422973107297361089640051580241391159839198594259821861698,-519422973107297361056981027298200892594147155013038008031678⟩, + ⟨-192730051467950873573019130510986939892790983495708992748404,-192730051467950873559002118898839498906580113819705491516123⟩, + ⟨-16761180536119069579347189748179185080929604047494213457975,-16761180536119069554704972501143900345480323478554543550849⟩, + ⟨17350358579825053459429840577046046692799647632398091940119,17350358579825053473330023677763411344829160364478340793978⟩] +lemma bs0_1_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 11 r = bs0_1_0_11 r := by + revert r + decide +kernel +def bs0_1_0_12 : Fin 8 → RI := ![⟨-88187256649225904907557722508913715940509280354429966547053,-88187256649225904905429008131856279720725591573872661408437⟩, + ⟨42540867133138529263244543522230739679440012974982108865351,42540867133138529264775441817080289825851552641866375714790⟩, + ⟨580074707177821005881431228274837748094683676170407684508938,580074707177821005913495399148296536769583074869389799283151⟩, + ⟨79237153384780128626213131533631911371346347018627730555598,79237153384780128638077692522441030037863968456501600861580⟩, + ⟨-493028769961670198990402998576547537895223383706659658165063,-493028769961670198956418341193103455594657220051801118323186⟩, + ⟨-183966508919667576952476085579547258580556699796484714872549,-183966508919667576937890122047113163509215048980471009263181⟩, + ⟨-16863136264537976995997436821946770623478595309495210785695,-16863136264537976970354989482808707815862887047230399856454⟩, + ⟨17675266819761485325133132271015409662446923952043098600133,17675266819761485339597525210701371373652341281634499045996⟩] +lemma bs0_1_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 12 r = bs0_1_0_12 r := by + revert r + decide +kernel +def bs0_1_0_13 : Fin 8 → RI := ![⟨-92044039225995916771347052420154516135948348505560942912611,-92044039225995916769129020345326281562337274944844020166116⟩, + ⟨44026931863607547282268237081681262294000108499395178173709,44026931863607547283863369598214930092564317503219594170108⟩, + ⟨556906953529376811354669196927087860633078001903184282037317,556906953529376811388078732850113212042458970746341879548869⟩, + ⟨103642592600023942952074526298349765358725207041490500906162,103642592600023942964436906667810030548929678750302668646444⟩, + ⟨-466122195998427920628809355685861866072322627386540438743601,-466122195998427920593398752487409885472345653023231165382008⟩, + ⟨-174951624946773815544398960846585359823392783742780650194652,-174951624946773815529200991919278561236185075913405742520202⟩, + ⟨-16787380717887368644545135750067741595670423653405687536731,-16787380717887368617826769355834261197591550770358111459281⟩, + ⟨17733484267148306515942785608667179017043119516002770216674,17733484267148306531014083021250088141994905831722482856364⟩] +lemma bs0_1_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 13 r = bs0_1_0_13 r := by + revert r + decide +kernel +def bs0_1_0_14 : Fin 8 → RI := ![⟨-95676432756669710759807860639398776504100325752913313332368,-95676432756669710757493494316155084909983220922914564030454⟩, + ⟨45330141816044456681183926030052725987088401072542534798934,45330141816044456682848338830593685745434092553164753128789⟩, + ⟨533276858872850865784383421660274432468498978319569110794933,533276858872850865819244010780246872038949999894067450324079⟩, + ⟨127855715935685988593955582620301876066515839610982317288556,127855715935685988606854889680429102769791953721895676714522⟩, + ⟨-438920161535093114134020804329306127443159491764441331376311,-438920161535093114097072236966994986372503720138606942563296⟩, + ⟨-165772646318921313370525514252964267765596885383621079861061,-165772646318921313354667462484146640741720456795181816707388⟩, + ⟨-16535625867852992418704865049979573532400192635133547251794,-16535625867852992390826058383388191975527850922338786111950⟩, + ⟨17527499838536260185702970493513879428563194702141144397323,17527499838536260201428849111340738491902351956702151172929⟩] +lemma bs0_1_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 14 r = bs0_1_0_14 r := by + revert r + decide +kernel +def bs0_1_0_15 : Fin 8 → RI := ![⟨-99056603251820120184741823266075744862609779217316938395321,-99056603251820120182323254258602988285224996843363991088598⟩, + ⟨46432360380453375624649549145855183380145992881336326942522,46432360380453375626388900939292162710280075641738091860356⟩, + ⟨509352543861100622990959969474467745560189741508768096801393,509352543861100623027390131623429278881287014842479391071765⟩, + ⟨151717827583112379133918525532996317103440857574931432483731,151717827583112379147398614644392359833932620115265239495495⟩, + ⟨-411620491459771531248752515850432927585475515172178845919988,-411620491459771531210140365735797851353294785878657629606301⟩, + ⟨-156503611768809374538181968636630387684762558098824271611495,-156503611768809374521609919457433574458944691155967573846546⟩, + ⟨-16115305642332211399738796902855194214003972272070758931529,-16115305642332211370604766956329143265297204518187555316872⟩, + ⟨17069989226988845755867936596122283591963714458820446106615,17069989226988845772301861622720304181368852443490802513162⟩] +lemma bs0_1_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 15 r = bs0_1_0_15 r := by + revert r + decide +kernel +def bs0_1_0_16 : Fin 8 → RI := ![⟨-102159601111282017559832174762644886141754106612262268776519,-102159601111282017557300539237948034705444514972704652928728⟩, + ⟨47317503123661097594068248897414273211600120055587694360000,47317503123661097595888914248113696925617250178597389782832⟩, + ⟨485282964346203305064973519787795948462810782047682812161326,485282964346203305103106768159817202180870055724318490153376⟩, + ⟨175084350045719863065361162662402879646839227991216574228629,175084350045719863079471437112013209734620278362643793466778⟩, + ⟨-384401551459878596960859407721494016915657224430998031642964,-384401551459878596920442164875221791344966391652273947606534⟩, + ⟨-147205804548628119683128271212382184055764940594694945821719,-147205804548628119665781489586547143072649496475244436385444⟩, + ⟨-15539260671038750881899066666139926006666533446653892721767,-15539260671038750851403039899190765616216647170725934073458⟩, + ⟨16383086807736385718376343429254275711109609704218517150787,16383086807736385735578543688539383410612147480645530589008⟩] +lemma bs0_1_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 16 r = bs0_1_0_16 r := by + revert r + decide +kernel +def bs0_1_0_17 : Fin 8 → RI := ![⟨-104963498374215183791824964535213724495451875993468972836689,-104963498374215183789170228473280181452971577276742139806230⟩, + ⟨47971681810963368280330362277770142986871853469218115099979,47971681810963368282239557308425195624711912690892440250809⟩, + ⟨461199456929197780722234054346716023192533262322814987149591,461199456929197780762221528303515018733566087729637465492765⟩, + ⟨197824707985806170834888831841200975336429935837175538217794,197824707985806170849685217047541075085945089889133976163751⟩, + ⟨-357423304717911305257935019344176713409111354956385296515026,-357423304717911305215552491898348520240207852117154119814026⟩, + ⟨-137929208056645022709413914405429945770274630668549830403442,-137929208056645022691223647168313268291427887452505484739673⟩, + ⟨-14825104888974884060948479228254816658649962750635487770253,-14825104888974884028969586052897751853155998955373237546628⟩, + ⟨15497055647799509187753128353170432550975219050460785516298,15497055647799509205791783968216700401853686836449894012228⟩] +lemma bs0_1_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 17 r = bs0_1_0_17 r := by + revert r + decide +kernel +def bs0_1_0_18 : Fin 8 → RI := ![⟨-107449431761062175133950291808143905503501779587532552984351,-107449431761062175131161036484583063159120432837270630111228⟩, + ⟨48383284503265986968258817106683477918625031552300102496651,48383284503265986970264753771834671145754053941160548136897⟩, + ⟨437218490251267942536966859300863160875555806458302154009776,437218490251267942578980555580921107850907450181776439952622⟩, + ⟨219821522647537319057383441401534655977908644710568907024941,219821522647537319072929580544472062931021226969252454036311⟩, + ⟨-330829517951228938157548273097855007024215722140121698576465,-330829517951228938113018162553258938561287679004421318275493⟩, + ⟨-128714767879898135760527702197758271243513636992112929046734,-128714767879898135741415708182106486409777597293365485990722⟩, + ⟨-13994314738248391805989703033455551071085085739500347666576,-13994314738248391772390393742726494236432622061369901899268⟩, + ⟨14448449597744720520854654426802956953008251778803935586769,14448449597744720539807354443010490887903155560911589143624⟩] +lemma bs0_1_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 18 r = bs0_1_0_18 r := by + revert r + decide +kernel +def bs0_1_0_19 : Fin 8 → RI := ![⟨-109601576106445577832995383136851216459112373194999081755776,-109601576106445577830058539657989133381499251109166364069240⟩, + ⟨48543002444914411267845809035918073507201590793284788727084,48543002444914411269957886035198901106562605974095557546030⟩, + ⟨413445187440947712525216098161127920302100658427001191448165,413445187440947712569452869496026017891064490816298577854160⟩, + ⟨240969357616421841023550501468417885175516224376985204500696,240969357616421841039919235079198048222669592286991555602455⟩, + ⟨-304750700231874603608453717215711165016908850762767286970145,-304750700231874603561567380328006615957715162746129744984339⟩, + ⟨-119597169709896332704604013070050276703192795688677224363873,-119597169709896332684480744138894631071805240266405547948195⟩, + ⟨-13071109273547798741647133015822665335514495526967056512560,-13071109273547798706269979999271860903685991432173693240557⟩, + ⟨13277914211289944892240481639316273064596976496314378215646,13277914211289944912196027830851214151740031423347248127427⟩] +lemma bs0_1_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 19 r = bs0_1_0_19 r := by + revert r + decide +kernel +def bs0_1_0_20 : Fin 8 → RI := ![⟨-111407078888418076488360029247527419917930957465128754771871,-111407078888418076485260547026688738786439316433983655535113⟩, + ⟨48443819850000707621931687647023202340781455172318412029164,48443819850000707624160728845635926053780417075624599821067⟩, + ⟨389977093815373440587812870513910746352525507509305123912028,389977093815373440634499419268274958916788302754098733455126⟩, + ⟨261173305977493332943018327931175518571404800716815464471977,261173305977493332960293541666559790384708172111257374328654⟩, + ⟨-279307272209548746521689255728645149886746609652902740877591,-279307272209548746472206411773887391254699580931526280960155⟩, + ⟨-110607781563847457868461579867904192394769952442842010027930,-110607781563847457847223909312078822523087179538931984812410⟩, + ⟨-12081210263738491887325578457363295891331769706741525269045,-12081210263738491849989282673519509817777563793301495760939⟩, + ⟨12027811043406165333436516005829799059808625516246837213174,12027811043406165354497175544831074742560871475620722759892⟩] +lemma bs0_1_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) 20 r = bs0_1_0_20 r := by + revert r + decide +kernel +def bs0_1_0 : Fin 21 → Fin 8 → RI := ![bs0_1_0_0,bs0_1_0_1,bs0_1_0_2,bs0_1_0_3,bs0_1_0_4,bs0_1_0_5,bs0_1_0_6,bs0_1_0_7,bs0_1_0_8,bs0_1_0_9,bs0_1_0_10,bs0_1_0_11,bs0_1_0_12,bs0_1_0_13,bs0_1_0_14,bs0_1_0_15,bs0_1_0_16,bs0_1_0_17,bs0_1_0_18,bs0_1_0_19,bs0_1_0_20] +lemma bs0_1_0_mem (d : Fin 21) (r : Fin 8) : (bs0_1_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 1 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_0) d r = bs0_1_0 d r := by + fin_cases d + · exact bs0_1_0_0_calc r + · exact bs0_1_0_1_calc r + · exact bs0_1_0_2_calc r + · exact bs0_1_0_3_calc r + · exact bs0_1_0_4_calc r + · exact bs0_1_0_5_calc r + · exact bs0_1_0_6_calc r + · exact bs0_1_0_7_calc r + · exact bs0_1_0_8_calc r + · exact bs0_1_0_9_calc r + · exact bs0_1_0_10_calc r + · exact bs0_1_0_11_calc r + · exact bs0_1_0_12_calc r + · exact bs0_1_0_13_calc r + · exact bs0_1_0_14_calc r + · exact bs0_1_0_15_calc r + · exact bs0_1_0_16_calc r + · exact bs0_1_0_17_calc r + · exact bs0_1_0_18_calc r + · exact bs0_1_0_19_calc r + · exact bs0_1_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 1 0 tr0_1_0_mem) d r +lemma bs0_1_0_lower (d : Fin 21) : (550/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 1 0) d) := by + have hc : ∀ d : Fin 21, (550:ℤ)*scale < 1000000*(rowLowerBox (bs0_1_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_1_0_mem d)).1 + have hnum : (550:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_1_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_1_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (550/1000000:ℝ) < ordinarySignValue 0 1 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 1 0) _ bs0_1_0_lower e he hτ +def bs0_1_1_0 : Fin 8 → RI := ![⟨-36667751636365443940845858708717326459367581500199434198910,-36667751636365443939434531135596698870174490489317241911122⟩, + ⟨18492631635635764028483427952068908172679474522565510083326,18492631635635764029498406287610906925035647960641436095566⟩, + ⟨745537937317760844698907463863366616376624276963191837497245,745537937317760844720165857638602368292625502816135098100475⟩, + ⟨-160983113086922546203391027763078878971748810926919291314386,-160983113086922546195524879891932835966029102572974096290028⟩, + ⟨-706469331166926317236637733770915719054228104314591754885615,-706469331166926317214106066515242328673484006251263510532332⟩, + ⟨-240501608250212125714906167318212105252783951746337172396310,-240501608250212125705235742420881014091091484266233578734422⟩, + ⟨-7887414792121986614748266162055072016658786841169803114401,-7887414792121986597747444744014003187463176148367589675676⟩, + ⟨3479582196311526050779543998556839177502592504038835278954,3479582196311526060369368168808262596827225045408801281733⟩] +lemma bs0_1_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 0 r = bs0_1_1_0 r := by + revert r + decide +kernel +def bs0_1_1_1 : Fin 8 → RI := ![⟨-34706342454937312592529997666770731477654057082237339147588,-34706342454937312591097406435682901508976233375134490283460⟩, + ⟨17513254100210023929871804840533542801191479399495926822762,17513254100210023930902075268839731009096777958662004155912⟩, + ⟨746254994633824629857323848523639556539819549303310839791958,746254994633824629878902530248172335207579297964766067898897⟩, + ⟨-167186756916534910188003969423243491544319949617185098995763,-167186756916534910180019306842215817572613455624814332023760⟩, + ⟨-709035698278769872278770046085767792059115974863721590925902,-709035698278769872255898907204136160815791950581836472475915⟩, + ⟨-239852073591448039091343707502702658947549533830704032499542,-239852073591448039081527583894885942039199640210837030935613⟩, + ⟨-7382447316963367882257746957186911507728449241945191704848,-7382447316963367865000783975253957293524766199708201129186⟩, + ⟨2803594163227655387470768068177256535123064398677182624227,2803594163227655397205076584228526667715953694815466424301⟩] +lemma bs0_1_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 1 r = bs0_1_1_1 r := by + revert r + decide +kernel +def bs0_1_1_2 : Fin 8 → RI := ![⟨-32786493993371519643743366707169334216050399387570464800216,-32786493993371519642288935175704165358054145647682319699398⟩, + ⟨16551989503856194124523517568604661122507534608786312106699,16551989503856194125569494791098484451030097994710484416076⟩, + ⟨746281953284092983975525555657566299616413992248688491803208,746281953284092983997433211118917178191902691469284523878231⟩, + ⟨-172924455020212361758490026815196364996160929456924342130424,-172924455020212361750383635561381076828150511689387635262502⟩, + ⟨-710881692867240097475955158800174549763730395718423036154076,-710881692867240097452735342269007547352043367381740664224554⟩, + ⟨-238858961162879237955017908610387436558863908352013380381696,-238858961162879237945052135134870301155938268783325329204826⟩, + ⟨-6883616581851837902188557670411177127990290022595923421960,-6883616581851837884668506902588851442629320998600175352368⟩, + ⟨2151373384705886821784906305597721105355779219632521493125,2151373384705886831667617392690888918143124398866066814346⟩] +lemma bs0_1_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 2 r = bs0_1_1_2 r := by + revert r + decide +kernel +def bs0_1_1_3 : Fin 8 → RI := ![⟨-30911207446793388022186935261584160036052377633850292529785,-30911207446793388020710063191620515880608910319033841779533⟩, + ⟨15610775053189508083011301752000278424500566649711399687851,15610775053189508084073417439330417686249862239414552411550⟩, + ⟨745607399390612145585618681875541899190760023955620265504522,745607399390612145607864352276179841752856295881120130465173⟩, + ⟨-178183655575136523046431867197306936293148323171481410140759,-178183655575136523038200401795202776568019355533160315388448⟩, + ⟨-711993791931925923863139186188335006863991748410634146178837,-711993791931925923839561109281496059366402850977758414636563⟩, + ⟨-237516044605695654329053059730078815099246461554213392239951,-237516044605695654318933523551694714716691382075283244101082⟩, + ⟨-6393326222969539827975260785797932017972621654400718720922,-6393326222969539810184891776664546195086151842652196381411⟩, + ⟨1526887724490162681846768972257874085655678707066731814565,1526887724490162691881961186038750471089448084724881430569⟩] +lemma bs0_1_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 3 r = bs0_1_1_3 r := by + revert r + decide +kernel +def bs0_1_1_4 : Fin 8 → RI := ![⟨-29083282637739427194050523139406706836755955477873904779302,-29083282637739427192550585415579158659436687911922564751004⟩, + ⟨14691416014810216418412444227596094888741550572029712068698,14691416014810216419491147941271210753387879791307115977149⟩, + ⟨744222122811470663333260122155738203471592592262065425967640,744222122811470663355853223416422453317343784563621441479636⟩, + ⟨-182953318018628064154795611674395413156686641353804664127525,-182953318018628064146435587993176850873539433343564241306573⟩, + ⟨-712360765369213540953636833708430013273076069555029406349544,-712360765369213540929690516537705217654838470841173785679388⟩, + ⟨-235818351113962862449144722043920476532693663839929698936976,-235818351113962862438867139868477389174282510527867237193081⟩, + ⟨-5913836816751888212079715075985292582873911638547628187864,-5913836816751888194011497699372642382592295934748734903819⟩, + ⟨933788411618577741470169642730498108562083815880777786096,933788411618577751662090577134176312747142309195030000376⟩] +lemma bs0_1_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 4 r = bs0_1_1_4 r := by + revert r + decide +kernel +def bs0_1_1_5 : Fin 8 → RI := ![⟨-27305307198490413156279137233946658159262807193935057997917,-27305307198490413154755482480170544755481450416251272016961⟩, + ⟨13795579421176229871004104475383621934102929984771030336923,13795579421176229872099864662720032712922125409105256144082⟩, + ⟨742119225760822156016710894222100631736385553260968826599008,742119225760822156039661237820738830428951169157811894105366⟩, + ⟨-187223985525882260296582865857955541393063477469487633702673,-187223985525882260288090653400563789996118462634812713895780⟩, + ⟨-711973785274439534734496308078711925890055216448766115240415,-711973785274439534710171351506806575607577821902059808860938⟩, + ⟨-233762231669041037749030997631347524098728980971814306954469,-233762231669041037738590906226049455590016097115101182665135⟩, + ⟨-5447246865062406851604006424421638558749831624212035427719,-5447246865062406833250094218105807946339426747622141101253⟩, + ⟨375372099942878093434635811382798759028100757304761116612,375372099942878103787711499202077698236099973576591607503⟩] +lemma bs0_1_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 5 r = bs0_1_1_5 r := by + revert r + decide +kernel +def bs0_1_1_6 : Fin 8 → RI := ![⟨-25579647229182909819124742264060116349041195644571471476836,-25579647229182909817576691350517277237419759916576947330641⟩, + ⟨12924788839042462613963788357310882963142357673025249014429,12924788839042462615077093425157165270987445484188402896700⟩, + ⟨739294214264500710906781871880819013663384949171312124259675,739294214264500710930099687341282554436556028230033481572098⟩, + ⟨-190987846664246197196304271578164911432930589401689276227994,-190987846664246197187676085159872689421401098858480421014263⟩, + ⟨-710826518099543334190029092994533894407696667111899629991666,-710826518099543334165314654799287427978470000596953489060699⟩, + ⟨-231345420617009126909686250721750882687786082892826063062798,-231345420617009126899078996685055254324787002595584977651776⟩, + ⟨-4995476178058612448668920027241706031729261320992231320736,-4995476178058612430021132208125512239456226063195722689712⟩, + ⟨-145452362364530620195593600177586927316980387075546462472,-145452362364530609676748542415440108072277134681845674699⟩] +lemma bs0_1_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 6 r = bs0_1_1_6 r := by + revert r + decide +kernel +def bs0_1_1_7 : Fin 8 → RI := ![⟨-23908439512423076657515092191468831110015678079432966056788,-23908439512423076655941936623494967151478922551045267022090⟩, + ⟨12080420245846821764714098778186586197139738500467927346254,12080420245846821765845458251580470480332080919099278528229⟩, + ⟨735745071236470910202734637138754630301266918052401546762827,735745071236470910226430596298573526254011639986435542730341⟩, + ⟨-194238785504808154371579253782777778388987793254513087590781,-194238785504808154362811144551523280635207220232431271135997⟩, + ⟨-708915198477989979896520584761952135422540090520470196263494,-708915198477989979871405353915127415494926237579102993210531⟩, + ⟨-228567083783236825637375136191380131946234772370845187449809,-228567083783236825626595864913644418842695138086642405139380⟩, + ⟨-4560251830238877940233868318456058705344779660676956655443,-4560251830238877921283670375141056226838915775962630039690⟩, + ⟨-626192061356444321619722516623902362506764161535562788103,-626192061356444310930293941314222853050850159449871757446⟩] +lemma bs0_1_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 7 r = bs0_1_1_7 r := by + revert r + decide +kernel +def bs0_1_1_8 : Fin 8 → RI := ![⟨-22293585343711689321817233157552851424067195229156292741803,-22293585343711689320218233336788034393665586955935350628864⟩, + ⟨11263699043391764377180367711802803646878032547603025462433,11263699043391764378330313484492027367476573458344428463504⟩, + ⟨731472310249328138625090570976586912997073626176613487721621,731472310249328138649175814178705620906841731446861103284535⟩, + ⟨-196972419641155666556708494578050327456934774393372294336735,-196972419641155666547796340322819571394622572095135392803963⟩, + ⟨-706238683808679726863770666843861220103871058326379454418433,-706238683808679726838242835750631046240289708115414745441454⟩, + ⟨-225427854504769346022322819890646851757708094049719688321786,-225427854504769346011366463639521560305706318964104084826646⟩, + ⟨-4143096816139500696574872795787477825794119612597876728267,-4143096816139500677313355542430618310578212519340061521835⟩, + ⟨-1064792747848878768495422367659138077185847778925254094355,-1064792747848878757630384780818307729492247805933733138981⟩] +lemma bs0_1_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 8 r = bs0_1_1_8 r := by + revert r + decide +kernel +def bs0_1_1_9 : Fin 8 → RI := ![⟨-20736746015075399806551782954975990744536623175261428591315,-20736746015075399804926166301927257438659261276729523132593⟩, + ⟨10475698221644220660159022010784132956722632426672233013468,10475698221644220661328109695414964410105913221410008508922⟩, + ⟨726479009369440521457517836334957762123088974011399809447955,726479009369440521482004000706998212515914082514832606982691⟩, + ⟨-199186125740000229267404259412943607466429113409472566311539,-199186125740000229258343754099721872853779561256117559103891⟩, + ⟨-702798488979948218549553822916096036409762657263007959023743,-702798488979948218523601057441991012499227967914533475233496⟩, + ⟨-221929857153931625331872342803712355830406038969849501404295,-221929857153931625320733607859928782541319873762806770392052⟩, + ⟨-3745321482662297215708947446370876419342291582400515753110,-3745321482662297196126804407114137261774060022138294080110⟩, + ⟨-1459655971836135284756074560178273596198016997852265922460,-1459655971836135273710178364451684129851355537625153122313⟩] +lemma bs0_1_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 9 r = bs0_1_1_9 r := by + revert r + decide +kernel +def bs0_1_1_10 : Fin 8 → RI := ![⟨-19239339967397739157200450684715456000524137244560773560049,-19239339967397739155547409610516884214788323058069692908957⟩, + ⟨9717337668888075733586981681829051413603946812802486075978,9717337668888075734775792068586807049260622567756138244612⟩, + ⟨720770824726825851116606314500920024740263074052738273827351,720770824726825851141505564505936666693066418921029409739668⟩, + ⟨-200879052424744394448668994073243802244485327234265537970645,-200879052424744394439455636540457092989256923935802465398258⟩, + ⟨-698598800906537149446502053993360530183763693746818080124442,-698598800906537149420111461083673690723813752511024943735658⟩, + ⟨-218076717920772615870536741136362289549961902392347509171254,-218076717920772615859210093896220531388435858238495390997263⟩, + ⟨-3368017766257349063517269315818759476422568776779205207078,-3368017766257349043604772292654901663577838683936270988787⟩, + ⟨-1809650520244360014241010100173306572538786361328220291700,-1809650520244360003008767813155886103972178887651137923737⟩] +lemma bs0_1_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 10 r = bs0_1_1_10 r := by + revert r + decide +kernel +def bs0_1_1_11 : Fin 8 → RI := ![⟨-17802541605532841461737916771957061060791076563104543508540,-17802541605532841460056606485577235848527719557025482780726⟩, + ⟨8989384608246872163530613363779742974854965085973052532749,8989384608246872164739753997369892007245315988950230479613⟩, + ⟨714355983784638900262790964080887996377452789248623755594437,714355983784638900288116024546728263616742279499088384286248⟩, + ⟨-202052120466998568491946341862692468558985572076564391327191,-202052120466998568482575423599501753925563112747623512902171⟩, + ⟨-693646472839932715749524959281640404437555775006165292272904,-693646472839932715722683051953770116295780249776952671524654⟩, + ⟨-213873562813191018665893787274428081829174565802247358287031,-213873562813191018654373439224769588933473716769212928905821⟩, + ⟨-3012056216260995311675371063675871037876653630899805655665,-3012056216260995291422343722117020443952868094347327144627⟩, + ⟨-2114118152455045180745552941940531521231253817819031793357,-2114118152455045169321224296379391208613812209244861668216⟩] +lemma bs0_1_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 11 r = bs0_1_1_11 r := by + revert r + decide +kernel +def bs0_1_1_12 : Fin 8 → RI := ![⟨-16427281749797565015218141190471465532775486147590526812771,-16427281749797565013507677325886015412965768908923795647924⟩, + ⟨8292455125166110776099643130211327238061700202110624416347,8292455125166110777329750016315536772133300241761862554514⟩, + ⟨707245258556985803075138455141896816335854699804653196585650,707245258556985803100902647002372450704972437783763958012711⟩, + ⟨-202708010428909131870204999054279015809525149860898172250012,-202708010428909131860671590975435291955953078513234298676659⟩, + ⟨-687950998689676070676956497774501672988251752723785360577447,-687950998689676070649649157236059515203303759067654358472784⟩, + ⟨-209327003017754645421206349519703886726454558577577998261861,-209327003017754645409486240979283606806013500850115151803666⟩, + ⟨-2678085741561226337458916414010421112809108517387703015090,-2678085741561226316854705700059777486926803983988994089502⟩, + ⟨-2372873718395458154900381650249371815749090526447330867537,-2372873718395458143277957470927815158525671558891406368012⟩] +lemma bs0_1_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 12 r = bs0_1_1_12 r := by + revert r + decide +kernel +def bs0_1_1_13 : Fin 8 → RI := ![⟨-15114249678249197320898699080905606030842018318333398163849,-15114249678249197319158155126794222552972474098228132684179⟩, + ⟨7627016736182346937077532233362439174849483986070974440534,7627016736182346938329271687112230932552323631647503081158⟩, + ⟨699451919291235337004731287403969432798120055347753220367933,699451919291235337030948566414540864418933078082657876149649⟩, + ⟨-202851138057744173280018739944172002481951687442129416048221,-202851138057744173270317678064225660582335837630610145390992⟩, + ⟨-681524467854835533763200748900106819384895286421274463282199,-681524467854835533735413183514353668925446481393714701145281⟩, + ⟨-204445107937794944684728544455691680092566079383087912063918,-204445107937794944672802326963446791761886628686315138602754⟩, + ⟨-2366535977243788455970407150876142534446172551073657444744,-2366535977243788435003852329213887408104414476128659996757⟩, + ⟨-2586199828040283403300452021456240487051868492189539288466,-2586199828040283391473636760252162109294365521587482580749⟩] +lemma bs0_1_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 13 r = bs0_1_1_13 r := by + revert r + decide +kernel +def bs0_1_1_14 : Fin 8 → RI := ![⟨-13863896696578508031334915657370686423965900161653123901975,-13863896696578508029563320169679054747777503808557580089598⟩, + ⟨6993391936532417722911881346469844532934856158564436853119,6993391936532417724185951997076352633372116513210594114540⟩, + ⟨690991669377486612819588827855672402111853568154577147405314,690991669377486612846273826579772286395089113886099912648481⟩, + ⟨-202487617880803279749415783319595718108093009388359229074657,-202487617880803279739541653216886009562458319918860269654798⟩, + ⟨-674381501306321344090303839830670858320403148336533135723506,-674381501306321344062020540615418581233138939887819512428806⟩, + ⟨-199237366385343578199395302911850303768484650563752665484305,-199237366385343578187256320127358032567034240787897218628798⟩, + ⟨-2077622131610425224334871765004445640879140238515097216436,-2077622131610425202994270841569066047168749621343856513440⟩, + ⟨-2754836317495826033106282981481850622121524593969249253372,-2754836317495826021068475777015773835713568914818381129284⟩] +lemma bs0_1_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 14 r = bs0_1_1_14 r := by + revert r + decide +kernel +def bs0_1_1_15 : Fin 8 → RI := ![⟨-12676441156727120000403258119925955223651545034813748630832,-12676441156727119998599591695112177342628499146873673475890⟩, + ⟨6391762653124341972236122963579058744473749477298649789593,6391762653124341973533257931070283905925886691606862317461⟩, + ⟨681882562469727200903307491346417002698964878287043083196810,681882562469727200930475564746509743867589103248238838271910⟩, + ⟨-201625215581207733920850608685857096324859520751201138380410,-201625215581207733910797728632657347230172723048330543333473⟩, + ⟨-666539169878536633513484255897399961258209610785170519386183,-666539169878536633484688948203271118738672850748003050244579⟩, + ⟨-193714636547499139359609341975172380896461877258732782444037,-193714636547499139347250608939316539809455751163011874804013⟩, + ⟨-1811352142435289177807178013708362681984006282174704056317,-1811352142435289156080251275488550846113767083458305597155⟩, + ⟨-2879964824366503883614407368284914083801758431712874519255,-2879964824366503871358681479444029768605592704190707137241⟩] +lemma bs0_1_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 15 r = bs0_1_1_15 r := by + revert r + decide +kernel +def bs0_1_1_16 : Fin 8 → RI := ![⟨-11551874831652533312877277686814327818790116685476588369579,-11551874831652533311040469670727786589263725979220856090381⟩, + ⟨5822175520279823702745799078480131665642488718417284824983,5822175520279823704066768340562267394973383738515557028638⟩, + ⟨672144902997756562126481491515982394015788640730592769882063,672144902997756562154148766526711017754921047878203253902516⟩, + ⟨-200273289851857937781372391425236509590599642620850256621312,-200273289851857937771134794044425456287268363736595688916248⟩, + ⟨-658016895920309664536364881155489075350274063194694863794853,-658016895920309664507040472123581787034347589327876416241959⟩, + ⟨-187889085474097344110638674858812187026337450509072436405966,-187889085474097344098052855443001633783287963316408338494672⟩, + ⟨-1567535944851149232655638993365486071949832109165484552125,-1567535944851149210529489363626140612388511722819095266600⟩, + ⟨-2963188843075919535772963872293232029535380194689729203188,-2963188843075919523292044315405350428426826210532641623655⟩] +lemma bs0_1_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 16 r = bs0_1_1_16 r := by + revert r + decide +kernel +def bs0_1_1_17 : Fin 8 → RI := ![⟨-10489970542127361975513802688218469924478076738446383284336,-10489970542127361973642727592278294911990772020586796097310⟩, + ⟨5284547888567846372848691695646536601705464281686434318773,5284547888567846374194304665065372415413730196004299837563⟩, + ⟨661801131414345279490747738812830714627789766281109015337156,661801131414345279518931168323019941691373992271364346974673⟩, + ⟨-198442724524709874520126752633069168608187626111783748230489,-198442724524709874509698164923413054757323181753322180647717⟩, + ⟨-648836339618335456505858967112264989736801577559551150526707,-648836339618335456475987488458892742166471201603973563309297⟩, + ⟨-181774118940926537348817907219065041677787381697025959059166,-181774118940926537335997289568867272104959685896656836624168⟩, + ⟨-1345796631992080980304582589584427467320751571662583873327,-1345796631992080957765652457229990609148083187533832617114⟩, + ⟨-3006509678781884006464424894681700336169806543210625917171,-3006509678781883993750664091820419671943365374901237670271⟩] +lemma bs0_1_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 17 r = bs0_1_1_17 r := by + revert r + decide +kernel +def bs0_1_1_18 : Fin 8 → RI := ![⟨-9490290922124525442650923437298206198164827970654106722921,-9490290922124525440744397029878680645650736724307983567420⟩, + ⟨4778674472006848664703832539705158045714557469072553098284,4778674472006848666074940875187499452198397302808990853774⟩, + ⟨650875695657391856646832175326032074643933725891187049361222,650875695657391856675549597052949486869257225495926495594769⟩, + ⟨-196145851854909175780711781762460120666007100026977197491895,-196145851854909175770085603313634527278150949323064216206830⟩, + ⟨-639021271440488197846171371645716350798134576133425392574283,-639021271440488197815733917261867458202423573957371342360032⟩, + ⟨-175384302630556722740989249569835090910619649265928297622741,-175384302630556722727925719323125866990018641214762956840263⟩, + ⟨-1145583273479759057079869589305392174463499145311563893319,-1145583273479759034113893725793026529635592589704336240821⟩, + ⟨-3012298756321212726052907728121340965121463706255785155728,-3012298756321212713098258948476139070849053761576539212190⟩] +lemma bs0_1_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 18 r = bs0_1_1_18 r := by + revert r + decide +kernel +def bs0_1_1_19 : Fin 8 → RI := ![⟨-8552198202205488905619231641548644273424661828207982948461,-8552198202205488903676006678156007775714321798623794858520⟩, + ⟨4304234535880250877907631959259560446447252103301531171374,4304234535880250879305132636223475691582646575845107159416⟩, + ⟨639394910411843210860970796175353935925662468078951825376381,639394910411843210890240996979745410958448016902746189766319⟩, + ⟨-193396367904068091104506441539938648257720821872922956517493,-193396367904068091093675720734325082017380224238077382794894⟩, + ⟨-628597432251121072750583196782748646322132567387967768726859,-628597432251121072719559854566895759836465574808504285843575⟩, + ⟨-168735275641014973094058960071157825257392412041303896182227,-168735275641014973080743971101267304819446878256928545062936⟩, + ⟨-966185145916071056526329585556902596403964442522493448968,-966185145916071033118283710698635245039214909799034497593⟩, + ⟨-2983266768335830547654518449163959787286111729070485347838,-2983266768335830534450506796035362576186387803853043924239⟩] +lemma bs0_1_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 19 r = bs0_1_1_19 r := by + revert r + decide +kernel +def bs0_1_1_20 : Fin 8 → RI := ![⟨-7674864885344198984774134849156842596932899900329739864781,-7674864885344198982792896399994438853475452249703118830005⟩, + ⟨3860799526289987930809808098996927002244720230007589077911,3860799526289987932234646769806473092688981586876581445033⟩, + ⟨627386805831366422791566646550894327806974611986330621700617,627386805831366422821409432816435178046119047068058799947873⟩, + ⟨-190209241014315798833412296772080821519030020900067216981287,-190209241014315798822369704742574824841084116720124886705623⟩, + ⟨-617592382726286392246053601135994459689453993206624841069040,-617592382726286392214423378399259627521705148172184696870904⟩, + ⟨-161843657381370562082596789668519968093530767268457936062661,-161843657381370562069021332068681387791146534386296423611061⟩, + ⟨-806747123517569485165891866240446709728125934776403159589,-806747123517569461299936364154028419717129910972312128001⟩, + ⟨-2922430164678013275687134089914063189775195741307255998780,-2922430164678013262224824752004464256642882634806545675873⟩] +lemma bs0_1_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) 20 r = bs0_1_1_20 r := by + revert r + decide +kernel +def bs0_1_1 : Fin 21 → Fin 8 → RI := ![bs0_1_1_0,bs0_1_1_1,bs0_1_1_2,bs0_1_1_3,bs0_1_1_4,bs0_1_1_5,bs0_1_1_6,bs0_1_1_7,bs0_1_1_8,bs0_1_1_9,bs0_1_1_10,bs0_1_1_11,bs0_1_1_12,bs0_1_1_13,bs0_1_1_14,bs0_1_1_15,bs0_1_1_16,bs0_1_1_17,bs0_1_1_18,bs0_1_1_19,bs0_1_1_20] +lemma bs0_1_1_mem (d : Fin 21) (r : Fin 8) : (bs0_1_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 1 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 1 tr0_1_1) d r = bs0_1_1 d r := by + fin_cases d + · exact bs0_1_1_0_calc r + · exact bs0_1_1_1_calc r + · exact bs0_1_1_2_calc r + · exact bs0_1_1_3_calc r + · exact bs0_1_1_4_calc r + · exact bs0_1_1_5_calc r + · exact bs0_1_1_6_calc r + · exact bs0_1_1_7_calc r + · exact bs0_1_1_8_calc r + · exact bs0_1_1_9_calc r + · exact bs0_1_1_10_calc r + · exact bs0_1_1_11_calc r + · exact bs0_1_1_12_calc r + · exact bs0_1_1_13_calc r + · exact bs0_1_1_14_calc r + · exact bs0_1_1_15_calc r + · exact bs0_1_1_16_calc r + · exact bs0_1_1_17_calc r + · exact bs0_1_1_18_calc r + · exact bs0_1_1_19_calc r + · exact bs0_1_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 1 1 tr0_1_1_mem) d r +lemma bs0_1_1_lower (d : Fin 21) : (550/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 1 1) d) := by + have hc : ∀ d : Fin 21, (550:ℤ)*scale < 1000000*(rowLowerBox (bs0_1_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_1_1_mem d)).1 + have hnum : (550:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_1_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_1_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (550/1000000:ℝ) < ordinarySignValue 0 1 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 1 1) _ bs0_1_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs02.lean b/lean/OAI/Analysis/Triangular/Signs/Signs02.lean new file mode 100644 index 0000000000000000000000000000000000000000..57bd161735edc4449a1b44a3f688eafaa9785a56 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs02.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows02 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_2_0_0 : Fin 8 → RI := ![⟨-20652456903227746481567526807749473840494437677494819037491,-20652456903227746480776601110582301368942362186943916208726⟩, + ⟨10304471390399633489876378887268279104445348174050735525203,10304471390399633490445185493879071692629751594849082672239⟩, + ⟨-899013312094494093452844344614760460740572155281698330667359,-899013312094494093440930873754083574582347550094497248306792⟩, + ⟨370683870197844953611699940412796721656902451512765617742129,370683870197844953616108228472325540681271192323625469013461⟩, + ⟨934384170158308385259065624808185094495249391889946912747699,934384170158308385271692654118335387005904926485447104732151⟩, + ⟨558359944564634581228558918328539221943159382525064656217459,558359944564634581233978345893588571783897722357541999359954⟩, + ⟨2694110906225691968816864063420700384641415736103311911762,2694110906225691978344337903873189775887177880435667884528⟩, + ⟨-28985677204130445349865796585653469128278643734499054786172,-28985677204130445344491538679730221996582249001122863601257⟩] +lemma bs0_2_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 0 r = bs0_2_0_0 r := by + revert r + decide +kernel +def bs0_2_0_1 : Fin 8 → RI := ![⟨-20144039530656855346568352515816230221172306237457534574738,-20144039530656855345767935183163380276167041213503260356437⟩, + ⟨10050314930889808138028068398982367534947495329634207691744,10050314930889808138603701063958038491236500488559186038601⟩, + ⟨-894173962653435425549452173043882066866657928578242132778150,-894173962653435425537395732593028604233077844662211656119726⟩, + ⟨365260315951896807188411529615046796374198236990906228910558,365260315951896807192872720069243807786573145780082593191390⟩, + ⟨928055851239005881285751685094749952777523115846002421187299,928055851239005881298530247172046274529311129298534077770754⟩, + ⟨559062129392197791515993261424460229670645592804258229027302,559062129392197791521477725732144513940868530630897535249006⟩, + ⟨2329020528826302074708600100622736057606019556085919103545,2329020528826302084350409976812912855005530745042706455800⟩, + ⟨-26842212646327165137027919034992630264245786693426630129857,-26842212646327165131589166452479378693163095907684962283694⟩] +lemma bs0_2_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 1 r = bs0_2_0_1 r := by + revert r + decide +kernel +def bs0_2_0_2 : Fin 8 → RI := ![⟨-19609383905910485046613452095037353208520236905194962650131,-19609383905910485045803258945591381303919626607119896000334⟩, + ⟨9783963686764033676101016817027462163305200007169275894657,9783963686764033676683679913807506681867952095776946743650⟩, + ⟨-888535654448552050881701523958858356603014092339097829505676,-888535654448552050869497833382074159881244038205118167916051⟩, + ⟨359417546387063025753988466447016596883426375886815073297340,359417546387063025758504143203281983632795148975601871209050⟩, + ⟨920937281278562511970714016405733947089972205929382760920876,920937281278562511983648648169019897083114648142317524021499⟩, + ⟨559266435612933482931736388881493929091756372165115034127552,559266435612933482937287837143817460266909022095694501166797⟩, + ⟨1980739405512470997409859527873212166623452758191751145284,1980739405512471007169428681682730916741791652629237360391⟩, + ⟨-24782038030851514737781321617042197701500784655748000330881,-24782038030851514732276143375491976697306050365302614779470⟩] +lemma bs0_2_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 2 r = bs0_2_0_2 r := by + revert r + decide +kernel +def bs0_2_0_3 : Fin 8 → RI := ![⟨-19049885343041908429484895166424119133516349647554572919158,-19049885343041908428664632868095466074775354589614449699029⟩, + ⟨9505976926204522309607959703965827724747133190179059077731,9505976926204522310197864186918062089137479620413759970432⟩, + ⟨-882107059783997646707401029824239255733918873814329957127767,-882107059783997646695045670750349625020973103061136581470678⟩, + ⟨353164868552349276459383470439357752607952264136085078447709,353164868552349276463955268407712675870629062932754622379573⟩, + ⟨913039546706740592061579172776495965202829450593806988429320,913039546706740592074674557235701110510465734575659331689775⟩, + ⟨558975226690670775253718817004818226686414729378392347205085,558975226690670775259339259134998678187339550785262137608037⟩, + ⟨1650589747981902196052457746921822396898985258289869330333,1650589747981902205933319650355700140452566296792348163960⟩, + ⟨-22808069435737283375600325038513871710732206193176557539748,-22808069435737283370026727976866362132232466941872268967089⟩] +lemma bs0_2_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 3 r = bs0_2_0_3 r := by + revert r + decide +kernel +def bs0_2_0_4 : Fin 8 → RI := ![⟨-18467078710319634400202699313834879975135319497579636419869,-18467078710319634399372064952372678822021628980169921508523⟩, + ⟨9216984170848738618155517974506108665044172098894511320622,9216984170848738618752881689159775199399218154653343403212⟩, + ⟨-874899300942311291327183384468387364384608181479894548271666,-874899300942311291314671794193064760901326350104579721309113⟩, + ⟨346513016859146527070142067571066386494417293822807807691719,346513016859146527074771675068479655045839525711751560109674⟩, + ⟨904376162417329732536491450322168094804176084061737616793802,904376162417329732549752423465222552134524435027786194160822⟩, + ⟨558192407525917054661988438408417657534465086327160100278703,558192407525917054667679949976698855458243071777730875633064⟩, + ⟨1339716284918084270552148510730114768937890382022301445375,1339716284918084280557952062301155914202072710961674631391⟩, + ⟨-20922740606001737066395070796837075674798057094457330448722,-20922740606001737060750996644241824422446050659415630541001⟩] +lemma bs0_2_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 4 r = bs0_2_0_4 r := by + revert r + decide +kernel +def bs0_2_0_5 : Fin 8 → RI := ![⟨-17862635072607676396977262773804440374201631215747358005575,-17862635072607676396135943391757511229203302746325250587949⟩, + ⟨8917685312787294825667861614515862796112268180611024425644,8917685312787294826272909629125053412897671880047253112596⟩, + ⟨-866925932195960039411442456932243855647929501216678254625078,-866925932195960039398769921473518963714858646788711437551057⟩, + ⟨339474130960271498979752633142187243523126785913639209180796,339474130960271498984441794462213334617173744341265148326874⟩, + ⟨894963046779899221628337306236150731985694172411581152936216,894963046779899221641768864389414921559651597128685356785333⟩, + ⟨556923418743150811499308327804775550283899088397375031995837,556923418743150811505073053197469474187734342465524261153656⟩, + ⟨1049079151774348998334380597452526941506468593254435384945,1049079151774349008468895675847203815984700121776532550177⟩, + ⟨-19127992571752011078942926207383108259046877778447554288220,-19127992571752011073226248450487407525626169238911633601141⟩] +lemma bs0_2_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 5 r = bs0_2_0_5 r := by + revert r + decide +kernel +def bs0_2_0_6 : Fin 8 → RI := ![⟨-17238357316456286438416355893280381797803614000167729562890,-17238357316456286437564027997560590289433616131902700820466⟩, + ⟨8608850178936812141437795162273109390192603278750403629229,8608850178936812142050760121960291183894130486464726876314⟩, + ⟨-858202906903757852704137165595294865115448133381619997680878,-858202906903757852691298812276134701542735518722259567780091⟩, + ⟨332061724690301901288775994376377012614121387013683792559349,332061724690301901293526512533791347102768219789408496125868⟩, + ⟨884818481902266316485116066041489472749144369353870751854147,884818481902266316498723373731443188249083874751338402398830⟩, + ⟨555175221462668316529530419857221069616172762046990681014598,555175221462668316535370575650886643614692177553287204153932⟩, + ⟨779448475066488956847148627310902196137596777846545851411,779448475066488967114272023270483149184344774534734242599⟩, + ⟨-17425267125854477432436970062759398134663049751959132029370,-17425267125854477426645490599652489375347394945306397245595⟩] +lemma bs0_2_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 6 r = bs0_2_0_6 r := by + revert r + decide +kernel +def bs0_2_0_7 : Fin 8 → RI := ![⟨-16596174749153516814111941741634784124097513622964424224111,-16596174749153516813248270777753153624799707706094540051244⟩, + ⟨8291317507607984497352635469000276120528637136333277003474,8291317507607984497973757973867628240613153435890995967727⟩, + ⟨-848748529520770146039070613159189486118553830235759058072689,-848748529520770146026061402688077434815212768041118315006605⟩, + ⟨324290646016683146636346417194185633507593718922626394362811,324290646016683146641160156855371941697944050646898785093542⟩, + ⟨873963059012415778846585497664136723005616733092100472166088,873963059012415778860373896011133498005564974637051476716646⟩, + ⟨552956272429807753208189773575625261643282247280094404562189,552956272429807753214107652139605634721121009291292134387017⟩, + ⟨531400743458019318995889188747306893841404426152860714797,531400743458019329399650938408271775198209498150711591175⟩, + ⟨-15815504301063263549956252237429301057632140229738476727671,-15815504301063263544087697805131404559548468492061543131780⟩] +lemma bs0_2_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 7 r = bs0_2_0_7 r := by + revert r + decide +kernel +def bs0_2_0_8 : Fin 8 → RI := ![⟨-15938136673396607655990109612240631978791509262788316369173,-15938136673396607655114749403074525157126751962174612981585⟩, + ⟨7965993307645601064960358468346806037734131604872674119930,7965993307645601065589887477095593730239835941581380544780⟩, + ⟨-838583392499326241292133419410239480812635675467779391640770,-838583392499326241278948137427497718264689517450280030179283⟩, + ⟨316177028040107410623100415488904968031527138359900147105766,316177028040107410627979306099931596745999480811548903633092⟩, + ⟨862419608975186179681922417792812767168341879366044232790880,862419608975186179695897433471091260226245263257792548244146⟩, + ⟨550276489470622171620493498158076225108537773949658124433162,550276489470622171626491471500069374871255202244779903350530⟩, + ⟨305317037865922980324214204511799585740085129470628691119,305317037865922990868784350004226540584081361654818421655⟩, + ⟨-14299143943063841114632423954207866982275968943067537315182,-14299143943063841108684442315151514136257711996179197802518⟩] +lemma bs0_2_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 8 r = bs0_2_0_8 r := by + revert r + decide +kernel +def bs0_2_0_9 : Fin 8 → RI := ![⟨-15266404950296619527560461137586692135942781990576740653215,-15266404950296619526673053284301606385976315983069148538113⟩, + ⟨7633848577094299095110873338021898805768236608213842486381,7633848577094299095749066598788949796421954462062873739894⟩, + ⟨-827730298216276813190099537904172395300280591282965277989180,-827730298216276813176732785958230888244407242176302579287131⟩, + ⟨307738231176252330525866575290914797913889799868612973313695,307738231176252330530812614416545324609060729352524784221420⟩, + ⟨850213118113554442276213647060118414234623100643158311317101,850213118113554442290381001862010625230349269994414370412462⟩, + ⟨547147207344903308065314815257561027222913277947565968397011,547147207344903308071395339128507173982939284880462511946533⟩, + ⟨101383170638149486044221082498091120709526581055289865907,101383170638149496733916888428745711480339186416020805546⟩, + ⟨-12876131428814344355951356807848645263726283545094506841953,-12876131428814344349921512679204545711842575748923960450225⟩] +lemma bs0_2_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 9 r = bs0_2_0_9 r := by + revert r + decide +kernel +def bs0_2_0_10 : Fin 8 → RI := ![⟨-14583245574990842777892731361549355396963181753278614236270,-14583245574990842776992904604038601054405998954937530905324⟩, + ⟨7295916365888792290897407129963994980673038528782028998419,7295916365888792291544531640271524671810226021902826247829⟩, + ⟨-816214166225602639221260435770936491696450964388463711897253,-816214166225602639207706621684832296388588110089987093448604⟩, + ⟨298992776747894993991555206871666061249115576031193382106026,298992776747894993996570463760000248249943646847095510484448⟩, + ⟨837370629664789325223443629478196219528471642600487242048012,837370629664789325237809250524627617592964021996139695281322⟩, + ⟨543581124173539897977549356242641805526000511136831080612504,543581124173539897983714974518994533804197805725688199892975⟩, + ⟨-80408240167465412056955717911688524207338813890783179570,-80408240167465401217662060329556211295971489128219040257⟩, + ⟨-11545927529467888542911327402434408494235599180250918282644,-11545927529467888536797098110365538450394539755572657106069⟩] +lemma bs0_2_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 10 r = bs0_2_0_10 r := by + revert r + decide +kernel +def bs0_2_0_11 : Fin 8 → RI := ![⟨-13891019301041627242105579700470870241071332477403802039493,-13891019301041627241192949234387349231023637707133259411824⟩, + ⟨6953288175492460333898947110775777625416643340249384499617,6953288175492460334555279608698685324449388983535355767547⟩, + ⟨-804061926303528486070464582922236620522496032963970270182609,-804061926303528486056717910506273322576740347215602515416256⟩, + ⟨289960272315281766269109156427785768801208340703516211194376,289960272315281766274195775816837941206987002927878063598814⟩, + ⟨823921131365780904706455043771145483161543685054857206262075,823921131365780904721025074415136793640553194997319699870269⟩, + ⟨539592238725980339633859197499786989912812043543700326918982,539592238725980339640112546863215555416729372421100607490425⟩, + ⟨-240253760898104365011690745600472962398501905944319884751,-240253760898104354018163891526712288201263426388968627817⟩, + ⟨-10307522364762820798083899236614637167309155272470901484352,-10307522364762820791882670075578161907887841305610752127622⟩] +lemma bs0_2_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 11 r = bs0_2_0_11 r := by + revert r + decide +kernel +def bs0_2_0_12 : Fin 8 → RI := ![⟨-13192171361860736597896334735961478066787717099506844877093,-13192171361860736596970501483094143955457635869141355456627⟩, + ⟨6607109697588557701173293996367537789426546314489042456588,6607109697588557701839121485253606238575497930224019065297⟩, + ⟨-791302397922743331254500017377535571827702538005905115413580,-791302397922743331240554475439187991187410206791487848936345⟩, + ⟨280661329171861808956864321379951540871486598861353204673691,280661329171861808962024527564266139583638397475783337986612⟩, + ⟨809895429826873243622372537127218471306306832516697980047617,809895429826873243637153348602233758238122989269165551714726⟩, + ⟨535195778963317274886815517815569550786832019575692839682444,535195778963317274893159332752343707314541258688742817177955⟩, + ⟨-378533222932443651743492270026275050408690499834093579261,-378533222932443640590924931964460536120578440291533535884⟩, + ⟨-9159453341919323072957047913562844723604355715034560607695,-9159453341919323066666107188594000485761597902045483424091⟩] +lemma bs0_2_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 12 r = bs0_2_0_12 r := by + revert r + decide +kernel +def bs0_2_0_13 : Fin 8 → RI := ![⟨-12489220349408251915065322657650285649483355324763661805589,-12489220349408251914125872486039204481146099509448054564813⟩, + ⟨6258575903701525593911784513321247328654763213599387819664,6258575903701525594587404822657614907921661571120630313503⟩, + ⟨-777966156960235725313365205645493042338083791241844831335817,-777966156960235725299214556242239918549739440978889165021980⟩, + ⟨271117472530363563693106020401745629862013065169662240285706,271117472530363563698342121579148720443021264036813122122519⟩, + ⟨795326012516671329003814423925713412107568707535811893803263,795326012516671329018812627796425079900884107442235590626803⟩, + ⟨530408122341307596577243654260233716568073641130430612246252,530408122341307596583680772404999948636385880176540742641713⟩, + ⟨-495801947191935082251507457178370188745872328666637892018,-495801947191935070934911010498699871014422923904609571379⟩, + ⟨-8099826917728660801539101835550188387218041425304203435823,-8099826917728660795155635563025180679417812810199948592675⟩] +lemma bs0_2_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 13 r = bs0_2_0_13 r := by + revert r + decide +kernel +def bs0_2_0_14 : Fin 8 → RI := ![⟨-11784746322151165992911475514441012955132198332363388002454,-11784746322151165991957978404224078470413953839195802605174⟩, + ⟨5908925507793893358484478885906496630285436619430989162710,5908925507793893359170201271214060515268567120005179899798⟩, + ⟨-764085390606476743230735133776883379553864391442012436305059,-764085390606476743216372899651612634309787809624602247822825⟩, + ⟨261351045018879925905707034601266795321311387467079190440788,261351045018879925911021427522086571127410402542568329271527⟩, + ⟨780246898338509692557809149925538853334194900423064237032682,780246898338509692573031611404979963190850931835788725840892⟩, + ⟨525246708483439100969574263790105691363687883348496638560106,525246708483439100976107631641510473097559512293812119647906⟩, + ⟨-592781193283115241178986316940272994599614225880743094295,-592781193283115229693180751687149747635906929485318175649⟩, + ⟨-7126343968700681495036867786558820474062481016795169199859,-7126343968700681488557954026209954458081973536990540080082⟩] +lemma bs0_2_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 14 r = bs0_2_0_14 r := by + revert r + decide +kernel +def bs0_2_0_15 : Fin 8 → RI := ![⟨-11081378225494512999134023989999600428362375747838138255483,-11081378225494512998166033140534834578810399735908719582314⟩, + ⟨5559434834217462512505466912706339871698768596238603560777,5559434834217462513201612697666742040218888218362115282235⟩, + ⟨-749693741598945859987718514127510432468344136343202108400973,-749693741598945859973137965259376609377365448666693941107906⟩, + ⟨251385104196231527959598224164670632257551878344016326082008,251385104196231527964993399108263171716517818013809466157387⟩, + ⟨764693477929386351415075645708904155616427686836684313364991,764693477929386351430529497913148639378607926922600923226092⟩, + ⟨519729944934821673826318008999756733532931800315078620604349,519729944934821673832950688038449825628097653302946296889234⟩, + ⟨-670346940952234522334501517630621190000463063158118048606,-670346940952234510674104682937205241255124682531895256522⟩, + ⟨-6236328501944582581936306834929943098385884459103087039650,-6236328501944582575358909622834459764604471918228847656731⟩] +lemma bs0_2_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 15 r = bs0_2_0_15 r := by + revert r + decide +kernel +def bs0_2_0_16 : Fin 8 → RI := ![⟨-10381780718377327695084474086534049163242170945863427276445,-10381780718377327694101524959836949898987538298523985931840⟩, + ⟨5211411133641702120458041906927060371280818399149387278340,5211411133641702121164945171309705092985042425718017956352⟩, + ⟨-734826143046974293726942958766319544088308057166049254528209,-734826143046974293712137097962334364955412452366400629703316⟩, + ⟨241243314878482209875119351952564622515055981876589634190265,241243314878482209880597898058792858669453519460608170045254⟩, + ⟨748702344950971920602960277683390996425279686710033474187122,748702344950971920618652936902956133696172348179577287037955⟩, + ⟨513877106801053677993614375099302820005888129558264691883134,513877106801053678000349548342310240733424107153759904739317⟩, + ⟨-729517137449213482394121926848608767637620949633157525396,-729517137449213470553538008203807720369286251195947959162⟩, + ⟨-5426759390031548647159713476185209489022949428669543114807,-5426759390031548640480676325021487345326592641727582120307⟩] +lemma bs0_2_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 16 r = bs0_2_0_16 r := by + revert r + decide +kernel +def bs0_2_0_17 : Fin 8 → RI := ![⟨-9688640509218918079457763194309951188501987175251509683705,-9688640509218918078459372489277207738062115788332711356601⟩, + ⟨4866185399468284257165596663579090440231462421942042238054,4866185399468284257883604980944229929300659615523718359826⟩, + ⟨-719518645244305550008073441415014819756222700487918063739380,-719518645244305549993034988859094051848160906727174755101252⟩, + ⟨230949837142208650613237864268923679348326061637189918988320,230949837142208650618802475255404123620859067012379774727135⟩, + ⟨732311119766648211173988729571346736003510430649078724957771,732311119766648211189927911647582572119076836617925384798643⟩, + ⟨507708231160164444890615045911180184134010033475662942617479,507708231160164444897456024940529401049747608676143568176634⟩, + ⟨-771437568703295420405057831352861109280557047955337670547,-771437568703295408378464994122400464872468011920018609935⟩, + ⟨-4694304767562151185530614346425908363912919570507849290102,-4694304767562151178746653275430226165865779075423382797965⟩] +lemma bs0_2_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 17 r = bs0_2_0_17 r := by + revert r + decide +kernel +def bs0_2_0_18 : Fin 8 → RI := ![⟨-9004652312679434453480670629193235399449831763752738222751,-9004652312679434452466335180442504852152314890444362947083⟩, + ⟨4525104746495708714414520383252410398901422284378886573582,4525104746495708715143995612867770993830966240069814040702⟩, + ⟨-703808235977533728888302991341440824929422462019182206309381,-703808235977533728873024368007966032173515085305120697175509⟩, + ⟨220529210933199896256392220623071496218598922728158231122434,220529210933199896262045700922579414811069154380817238769055⟩, + ⟨715558267005423439964959859802891655604060483547206720619928,715558267005423439981153597707865522972774843096173913492035⟩, + ⟨501244007208236928285783298566735731841819173812688747563589,501244007208236928292733531074612048820882144623736571975071⟩, + ⟨-797366534325768101895966475006889388853042586963121415176,-797366534325768089677303599881088727658647398886789634791⟩, + ⟨-4035358686638964622189028718376368110615671310181981570913,-4035358686638964615296724771073639403443396227185902289868⟩] +lemma bs0_2_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 18 r = bs0_2_0_18 r := by + revert r + decide +kernel +def bs0_2_0_19 : Fin 8 → RI := ![⟨-8332504545551757080708767830179344488733113406534131316319,-8332504545551757079677963424608066033085976461453576136661⟩, + ⟨4189524421958525477594824842790061039799507893754477080607,4189524421958525478336143980721112518754720835845780072882⟩, + ⟨-687732655929837643321884786907631095676532010763840156689462,-687732655929837643306358096735638524879210232904783624082981⟩, + ⟨210006238260068982651036432955627611759421048228959380857085,210006238260068982656781704312101771362862836006660317036147⟩, + ⟨698482908600291567112451474613315813453861538083225114277312,698482908600291567128908137343302071612428773618333283377430⟩, + ⟨494505663158522746736227726553697844007664280619016252777082,494505663158522746743290804451390430551309007856493673435628⟩, + ⟨-808658525822598568536412502262040664527859384139730957307,-808658525822598556119364929548897879751027635240779940319⟩, + ⟨-3446079593955766665244169392245446820530990061138768760610,-3446079593955766658239960595089367475318671350607524389914⟩] +lemma bs0_2_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 19 r = bs0_2_0_19 r := by + revert r + decide +kernel +def bs0_2_0_20 : Fin 8 → RI := ![⟨-7674864885344203149272224832294078984384116203770017447401,-7674864885344203148224404935634703333366260948422572985829⟩, + ⟨3860799526290386920178162702433972798028158101710856980400,3860799526290386920931718797361685765729508824434228643778⟩, + ⟨-671330210847724960289637594612410167717014016201777902708522,-671330210847724960273854605324083279393449320345539773923427⟩, + ⟨199405863989411628140677308880634191208544180617521255155325,199405863989411628146517417446823832219411527298727817436484⟩, + ⟨681124633952804988171474760794556272489517689644109210690699,681124633952804988188203073700421963616289823210066647138591⟩, + ⟨487514850958175135781550743972688532342684382094056506237422,487514850958175135788730412116241550132231667642895207428618⟩, + ⟨-806747123517578064945338171308690651386270479987058494553,-806747123517578052323322361045731080576207906227903721474⟩, + ⟨-2922430164677996908882148669349175405692882619268774573944,-2922430164677996901762321378797367145025978278865088142845⟩] +lemma bs0_2_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) 20 r = bs0_2_0_20 r := by + revert r + decide +kernel +def bs0_2_0 : Fin 21 → Fin 8 → RI := ![bs0_2_0_0,bs0_2_0_1,bs0_2_0_2,bs0_2_0_3,bs0_2_0_4,bs0_2_0_5,bs0_2_0_6,bs0_2_0_7,bs0_2_0_8,bs0_2_0_9,bs0_2_0_10,bs0_2_0_11,bs0_2_0_12,bs0_2_0_13,bs0_2_0_14,bs0_2_0_15,bs0_2_0_16,bs0_2_0_17,bs0_2_0_18,bs0_2_0_19,bs0_2_0_20] +lemma bs0_2_0_mem (d : Fin 21) (r : Fin 8) : (bs0_2_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 2 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_0) d r = bs0_2_0 d r := by + fin_cases d + · exact bs0_2_0_0_calc r + · exact bs0_2_0_1_calc r + · exact bs0_2_0_2_calc r + · exact bs0_2_0_3_calc r + · exact bs0_2_0_4_calc r + · exact bs0_2_0_5_calc r + · exact bs0_2_0_6_calc r + · exact bs0_2_0_7_calc r + · exact bs0_2_0_8_calc r + · exact bs0_2_0_9_calc r + · exact bs0_2_0_10_calc r + · exact bs0_2_0_11_calc r + · exact bs0_2_0_12_calc r + · exact bs0_2_0_13_calc r + · exact bs0_2_0_14_calc r + · exact bs0_2_0_15_calc r + · exact bs0_2_0_16_calc r + · exact bs0_2_0_17_calc r + · exact bs0_2_0_18_calc r + · exact bs0_2_0_19_calc r + · exact bs0_2_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 2 0 tr0_2_0_mem) d r +lemma bs0_2_0_lower (d : Fin 21) : (470/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 2 0) d) := by + have hc : ∀ d : Fin 21, (470:ℤ)*scale < 1000000*(rowLowerBox (bs0_2_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_2_0_mem d)).1 + have hnum : (470:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_2_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_2_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (470/1000000:ℝ) < ordinarySignValue 0 2 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 2 0) _ bs0_2_0_lower e he hτ +def bs0_2_1_0 : Fin 8 → RI := ![⟨-20652456903227746481567526807749473840494437677494819037491,-20652456903227746480776601110582301368942362186943916208726⟩, + ⟨10304471390399633489876378887268279104445348174050735525203,10304471390399633490445185493879071692629751594849082672239⟩, + ⟨-899013312094494093452844344614760460740572155281698330667359,-899013312094494093440930873754083574582347550094497248306791⟩, + ⟨370683870197844953611699940412796721656902451512765617742129,370683870197844953616108228472325540681271192323625469013461⟩, + ⟨934384170158308385259065624808185094495249391889946912747698,934384170158308385271692654118335387005904926485447104732151⟩, + ⟨558359944564634581228558918328539221943159382525064656217457,558359944564634581233978345893588571783897722357541999359954⟩, + ⟨2694110906225691968816864063420700384641415736103311911764,2694110906225691978344337903873189775887177880435667884528⟩, + ⟨-28985677204130445349865796585653469128278643734499054786174,-28985677204130445344491538679730221996582249001122863601257⟩] +lemma bs0_2_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 0 r = bs0_2_1_0 r := by + revert r + decide +kernel +def bs0_2_1_1 : Fin 8 → RI := ![⟨-22177709020940419886593524590006237118820400597816786594359,-22177709020940419885774123986382032226908756507055769596986⟩, + ⟨11066940768929109545400832177031378708625101492920425426116,11066940768929109545990116958736806401123310128098666172617⟩, + ⟨-913531360417670097163449768097925371788381271578555107228559,-913531360417670097151107388466718756204090230204865841974419⟩, + ⟨386954532935689392881406465622041920340996591143394245208341,386954532935689392885973460865575316529383835889203635508175⟩, + ⟨953369126916215897178552845647052431925030783450685993631888,953369126916215897191634473258640812159083754617280579413353⟩, + ⟨556253390081944950366060778812871395472246957704998048550299,556253390081944950371675316605825548601439091519961280930424⟩, + ⟨3789382038423861650798647844601531147286357142282196197945,3789382038423861660669129792267082756993366420487846309181⟩, + ⟨-35416070877540285988572913267405999038536103014812758738864,-35416070877540285983005171331712738588680820124340137570204⟩] +lemma bs0_2_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 1 r = bs0_2_1_1 r := by + revert r + decide +kernel +def bs0_2_1_2 : Fin 8 → RI := ![⟨-23466816869073780807017987212652299857176922488111166994542,-23466816869073780806167554070804062169626308130683246450921⟩, + ⟨11719657085915043610216615623773534093504872509354479654372,11719657085915043610828217941529053637839193082917165721186⟩, + ⟨-920858779866423739994828893953782435328623902054218935340370,-920858779866423739982019080730258671802756001091963371492575⟩, + ⟨399452257803563117050901119498764651152481911533936971639724,399452257803563117055641077092904271045776927106341186560470⟩, + ⟨965241824303855621022526505705691993626390470157348556161876,965241824303855621036103563888310852585838427025382313003838⟩, + ⟨549665928137807649658341698547217794243955654619900531496798,549665928137807649664168871476115562940607609405353432759536⟩, + ⟨5035936457392060684066142136218325834406762987570104133745,5035936457392060694310441368031830581660727347355455733701⟩, + ⟨-42596074031898794949601551143552185660384257325670616407618,-42596074031898794943822946336066226948838359207057395859200⟩] +lemma bs0_2_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 2 r = bs0_2_1_2 r := by + revert r + decide +kernel +def bs0_2_1_3 : Fin 8 → RI := ![⟨-24482106968189462352725281979500298246032625359221043155533,-24482106968189462351841011596543930260685777952944666072342⟩, + ⟨12247520100437706135479691353248927994523584717745228267773,12247520100437706136115628253074665551603283904180369835585⟩, + ⟨-920761418228605735986152367195838297019871793584855275080259,-920761418228605735972832874001855325202832727004047357359802⟩, + ⟨407925754478313113044459097644604507522678165074968175581730,407925754478313113049387649826718409799584775714029078448945⟩, + ⟨969702928717645058605065701570092671834271659920663618792199,969702928717645058619182967052655538489883655459337780519564⟩, + ⟨538533745208836445101276044359014197774635914369882611699749,538533745208836445107335070264655139843482039203272011301597⟩, + ⟨6398074447292295672057354877698567603374279544845671446361,6398074447292295682709256783925703749346972932573841237587⟩, + ⟨-50446952560293663199146729955436683666846533333868535072814,-50446952560293663193138204611574779768463514813013050404706⟩] +lemma bs0_2_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 3 r = bs0_2_1_3 r := by + revert r + decide +kernel +def bs0_2_1_4 : Fin 8 → RI := ![⟨-25197209730283218269873561184975995963577091583849409982269,-25197209730283218268952366845195667031363502255310601051761⟩, + ⟨12641120101452809873950735015068499701038866785819647329046,12641120101452809874613226356930751892243178986822189632321⟩, + ⟨-913203571541284283645339803306426224138268872343840790827829,-913203571541284283631464135891171318378489693637210486873120⟩, + ⟨412239348989995717568372917977105058268260792185451734149668,412239348989995717573507268805787932860836631500049189032534⟩, + ⟨966649812140212706412186638287872552129341667919580184599960,966649812140212706426893390098695199955727536168281676544658⟩, + ⟨522917884142584681262245664089033302174272640152379958687670,522917884142584681268557693165813851143911828732167008826638⟩, + ⟨7825720168135169621709300456629940770860829278597819822756,7825720168135169632805987548005588664826414974114752037482⟩, + ⟨-58850903381474201890704953492539719816670772285764981897652,-58850903381474201884445533699838897142835322290091396234726⟩] +lemma bs0_2_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 4 r = bs0_2_1_4 r := by + revert r + decide +kernel +def bs0_2_1_5 : Fin 8 → RI := ![⟨-25597875360379683284453625692914028166217447005122732172728,-25597875360379683283492096518713180114280510024737696122298⟩, + ⟨12896709477302959215644846879386847783972502688428998821159,12896709477302959216336345649347001699091266019180230234896⟩, + ⟨-898352355285899261503341231548456608757641259460169632270568,-898352355285899261488858012910266485176680836628873795341327⟩, + ⟨412378359115046534866891962491952203239181482122908411213803,412378359115046534872251122768144006776189029922997301865424⟩, + ⟨956182624284569466715308697669780678748577378315100772384580,956182624284569466730659390040849104910841730711167365802352⟩, + ⟨503005632345385705454873030311490832978069288775615803421821,503005632345385705461461433912938228188645185529866331319958⟩, + ⟨9256149438253779019099041111975022375756809474282723826907,9256149438253779030681600746235409018661198782940693158500⟩, + ⟨-67653577239997974480242836950095963604254354513112130669754,-67653577239997974473709346149806509183076532391744102346211⟩] +lemma bs0_2_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 5 r = bs0_2_1_5 r := by + revert r + decide +kernel +def bs0_2_1_6 : Fin 8 → RI := ![⟨-25682048154056534890421130319518118237883599737519954539257,-25682048154056534889415480648162321286225284857557278063465⟩, + ⟨13015771421579365156671727605830658546298964117555478435083,13015771421579365157394956322553665324581722142146062776458⟩, + ⟨-876571202458279493404286780356325340275363797005022651937701,-876571202458279493389138988220111567570945066304447893310267⟩, + ⟨408447953453345751431461062092564514419834005699216991529472,408447953453345751437066131512350614218922324008422452066934⟩, + ⟨938599612510178912435364642942018642004645209232078236766084,938599612510178912451419713502924717144666707696966570650353⟩, + ⟨479104973209941556792365117729557353357624055324692946053034,479104973209941556799255835239188108749023319974138154057783⟩, + ⟨10616952813517548943876358506633390588048420696786797121471,10616952813517548955990392695176239206282949809817415234751⟩, + ⟨-76669415127786230899717515065818159064217717570305697841316,-76669415127786230892884230073133024320448318428163498860543⟩] +lemma bs0_2_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 6 r = bs0_2_1_6 r := by + revert r + decide +kernel +def bs0_2_1_7 : Fin 8 → RI := ![⟨-25459218326356204844435796452120636298802089839056197417687,-25459218326356204843381805051962894803554287465091459604602⟩, + ⟨13004262713476982366566997609143270635170407932349434096981,13004262713476982367324992037501496672769330397152740345232⟩, + ⟨-848402863345071604355713841677221726778250141986750701323761,-848402863345071604339837892927140854712297639063529851133201⟩, + ⟨400665604683634446086938069991100237579436235176825277849143,400665604683634446092812575928974298779869344094507327061281⟩, + ⟨914381976586752303416353622643725347219280421566852580093145,914381976586752303433180462826987697016150963125637096955880⟩, + ⟨451632378917408416028877442094248160136106105080376543408805,451632378917408416036099397416353092506013818597118921761315⟩, + ⟨11830032137993014158349849533235809180803164691916767852587,11830032137993014171046207141155040610949694882573364322298⟩, + ⟨-85689492374150971963084557796100038223604359381913418571697,-85689492374150971955922795780723555025888082247011172783868⟩] +lemma bs0_2_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 7 r = bs0_2_1_7 r := by + revert r + decide +kernel +def bs0_2_1_8 : Fin 8 → RI := ![⟨-24949138798605168887066879604988328717722451230315320347296,-24949138798605168885959816492318253499020076697438994162843⟩, + ⟨12871643967114327444510199964714548196349336033544436728972,12871643967114327445306361746597229407691865625967375649205⟩, + ⟨-814543259512636452946623782985065988600024983950005964465756,-814543259512636452929948431329195172007180827970121033368306⟩, + ⟨389347831579258815198802107974192409852664287968523923815604,389347831579258815204972413375240624388309834898689982790190⟩, + ⟨884169507094231107183757259429118493736279282074085808396665,884169507094231107201431382829984403375948146981737938756266⟩, + ⟨421094854230202863423641416816742845976326500934336697950506,421094854230202863431227019827770961781920832354901219572472⟩, + ⟨12816297151732298957572494804527782016621349529975321550690,12816297151732298970908153113264814199783202546875854418714⟩, + ⟨-94491279439829822589465349310488493452327476438979589676711,-94491279439829822581942970524733031934250441026427665005363⟩] +lemma bs0_2_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 8 r = bs0_2_1_8 r := by + revert r + decide +kernel +def bs0_2_1_9 : Fin 8 → RI := ![⟨-24180049949741794402225443462272225222291151495914379002165,-24180049949741794401059981346870946646084985071410245575536⟩, + ⟨12629827114212271992565384304259178975913613537189291555834,12629827114212271993403544643888958154105425339177796202415⟩, + ⟨-775808354848861886268800864394501943925028157690142145508122,-775808354848861886251245866496430094172367676966030562527658⟩, + ⟨374892418654526826516341078251430706384681295829948810445207,374892418654526826522836875196662352595370670819592365925979⟩, + ⟨848729061760630757581527090160276420093464115378176599684267,848729061760630757600133546297303981081103181166981866964648⟩, + ⟨388067662484413756965270392675826810569568735980230000881934,388067662484413756973256145999968684861851369932134261101494⟩, + ⟨13500638886666567411500875820410086879898102189203088734721,13500638886666567425540007252683166587447960008873371439753⟩, + ⟨-102849514947431318060358006222816539238713559599250218007526,-102849514947431318052438812283352337526015537005978757489819⟩] +lemma bs0_2_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 9 r = bs0_2_1_9 r := by + revert r + decide +kernel +def bs0_2_1_10 : Fin 8 → RI := ![⟨-23186589994549740806580353551146690626898342083705530983815,-23186589994549740805350459954045833605887293311489482965374⟩, + ⟨12292163065810859583358261003072511281437945424159452363931,12292163065810859584242758252209225839824828454563000539474⟩, + ⟨-733096728600326544829757684888249602913426238355326559046896,-733096728600326544811232175370014434453659258751780512753373⟩, + ⟨357757634740515057809109141941670971327936045271781810444092,357757634740515057815964052938376009053621279305486248748800⟩, + ⟨808918464519126128293343475867641044397246443808344070815301,808918464519126128312978572509113392817624263109088392703305⟩, + ⟨353169498039818555934074132208146200637610069433873511289453,353169498039818555942501370427089827522584084948268259772835⟩, + ⟨13816724716700723967182570515240348894965115083715066262552,13816724716700723981997842182185524549221839533020720428775⟩, + ⟨-110547280321262379626325113551546051560061403690750173078250,-110547280321262379617968114390786540184450370619183227725411⟩] +lemma bs0_2_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 10 r = bs0_2_1_10 r := by + revert r + decide +kernel +def bs0_2_1_11 : Fin 8 → RI := ![⟨-22007578527121540555536412688909627693121918357529250916553,-22007578527121540554235217433929321994704501688942149874311⟩, + ⟨11872565634465089276250963233264154667255297741703243789082,11872565634465089277186738186741241003410641120235570571320⟩, + ⟨-687350706574649673989733595396724393991427461583939287749548,-687350706574649673970134090904546490397995282301444902762186⟩, + ⟨338440103074339222771009289612633521658511532244274048843978,338440103074339222778261606140965764487212116438325757753916⟩, + ⟨765648604248174860958476316476123389538211374633982577781626,765648604248174860979249735120984408517962738910569270504193⟩, + ⟨317036973247347630408428481676807484099453232548621724105267,317036973247347630417344279278506317127814816431627226148563⟩, + ⟨13711190539140357466171193796878915187472799664440175092439,13711190539140357481845363692115870151855975695316900246130⟩, + ⟨-117386380763250893856413747370278293615003491202039105804101,-117386380763250893847572260855153565565501371388150464830783⟩] +lemma bs0_2_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 11 r = bs0_2_1_11 r := by + revert r + decide +kernel +def bs0_2_1_12 : Fin 8 → RI := ![⟨-20683847238493442532093607789749602375812817242373448718174,-20683847238493442530713238712688763639561856400597573666729⟩, + ⟨11384829273867997473569050109808167339571200807745822633343,11384829273867997474561764157842356861485461130511270836602⟩, + ⟨-639518736734015846220173782788462108117114482672456289416188,-639518736734015846199381707330736407978275301570934614538406⟩, + ⟨317452907766775746706189941298010133632950386211205190417338,317452907766775746713883539499044767319938629343707678532788⟩, + ⟨719846370434192930775448065004640069012631508087649907668427,719846370434192930797485483764615600683514297850012372377975⟩, + ⟨280300169003937433922448258824237689644789622791307160097520,280300169003937433931906555924513918140748475147928548811706⟩, + ⟨13146890067441595674710103253261908395399255019566297109452,13146890067441595691337999296432812961986234150568433264384⟩, + ⟨-123196263098310025013127856958525801185812591280284397417045,-123196263098310025003748392551506653933445522475449930061369⟩] +lemma bs0_2_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 12 r = bs0_2_1_12 r := by + revert r + decide +kernel +def bs0_2_1_13 : Fin 8 → RI := ![⟨-19256260642451142923124245983825955025897877585278711011928,-19256260642451142921655623089556652654132401159331384024421⟩, + ⟨10842158103339214324806002740604846692869379325999581339950,10842158103339214325862185903946618866494931912356788520522⟩, + ⟨-590521257129641389332129331029925589234772344919056279149132,-590521257129641389310007915428753975106072547375909350681580⟩, + ⟨295305293708001037782886312859773032706278286780721450649882,295305293708001037791071800817516689344116468698788947413310⟩, + ⟨672420659104215402696388766183709245601474132027865913222538,672420659104215402719835146039415196726081872419773492609429⟩, + ⟨243560703854782003959468474133646850231978386680838378728211,243560703854782003969531486913002423872290205215980547751210⟩, + ⟨12104980894616227931819144670610185604505853637105913159639,12104980894616227949510144286566789340568657882558065778026⟩, + ⟨-127840905573635552915527438171040568916566577096078091872489,-127840905573635552905548298248989654304535377985366617046069⟩] +lemma bs0_2_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 13 r = bs0_2_1_13 r := by + revert r + decide +kernel +def bs0_2_1_14 : Fin 8 → RI := ![⟨-17764028739605596071320320610969956706987169661500465390176,-17764028739605596069752895168841393567461222477120343942525⟩, + ⟨10256889984614273132234409498935471689536215839534623040524,10256889984614273133361648062496780695199121611885337364257⟩, + ⟨-541221704819390761107282360886492312287050843094320898848309,-541221704819390761083672712851884919437836893204937286989441⟩, + ⟨272484988856763207181592932614694979400551950468718469659588,272484988856763207190329104528861029510870110098366841690380⟩, + ⟨624233116237308723231266773518219859755125581335213366009575,624233116237308723256290523628234400032813761807189936593977⟩, + ⟨207373377649546812433341753882305350736292337083479657835611,207373377649546812444081762305762232054367480206208179222486⟩, + ⟨10585759088518378487167992876074879400738512296567917674746,10585759088518378506049165845996569293735259957036975569075⟩, + ⟨-131223356607058250224303176800447494477225976027036581806665,-131223356607058250213652683835007273529258250812900215606872⟩] +lemma bs0_2_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 14 r = bs0_2_1_14 r := by + revert r + decide +kernel +def bs0_2_1_15 : Fin 8 → RI := ![⟨-16243370539536545518754384441601569586096801717188475302166,-16243370539536545517075804059950317494711236893088259235567⟩, + ⟨9640376775046816806201560599414470697324523398954871172332,9640376775046816807408737979181866287140152865352991459025⟩, + ⟨-492403662701098075368339107451115226476582307090915126805994,-492403662701098075343055166701203251827395376313540307091389⟩, + ⟨249443811284637674059361278771774055875117795570684140151448,249443811284637674068716981691969703558619735233732212586107⟩, + ⟨576074661842995054054627706807116722579861976449734284044780,576074661842995054081426031551314358217238419534260598996470⟩, + ⟨172232013272954127618795985430548906697327701324408813578806,172232013272954127630297628159092401192701571204860555790722⟩, + ⟨8608278100432692968150154949956061007317655549911582985196,8608278100432692988370297916552278095040425559429513273129⟩, + ⟨-133287839574089968043377862965545590769468492167632045086355,-133287839574089968031972083739246862246346540081739040612796⟩] +lemma bs0_2_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 15 r = bs0_2_1_15 r := by + revert r + decide +kernel +def bs0_2_1_16 : Fin 8 → RI := ![⟨-14726548091910861558648030824170460384725827275905833863950,-14726548091910861556843703441063388397327010766868408319794⟩, + ⟨9002972330029460367513793119116478172450577673784948164311,9002972330029460368811403425039128363938446697460270408082⟩, + ⟨-444754525311014355977444417211407361208969594322802927745535,-444754525311014355950266387998914705625190859960354916480977⟩, + ⟨226586869613480591156896383833506838437030399774870284113477,226586869613480591166952947791937042313075595854658325465558⟩, + ⟨528648241713278174827856334880422408804326909737046177357234,528648241713278174856662194692943657985903262874662182018112⟩, + ⟨138559712041480986315258860817060367597408018048443198381455,138559712041480986327622122745655692257192366185083935292585⟩, + ⟨6208889100634443677875195749313909444103591672677215951627,6208889100634443699610084374900294001535808478757639518376⟩, + ⟨-134019549357626832752756336229624354154241486095783859599970,-134019549357626832740496119198302343041929984346828911368165⟩] +lemma bs0_2_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 16 r = bs0_2_1_16 r := by + revert r + decide +kernel +def bs0_2_1_17 : Fin 8 → RI := ![⟨-13241258768069483317746276246373377656466495438552178693467,-13241258768069483315798793637710048917590092879092259299533⟩, + ⟨8354080282958430626194604909658160661021634556696045531532,8354080282958430627595167538827704896989860135137069542870⟩, + ⟨-398855543820089622611822676633379954631579360982818862446986,-398855543820089622582488344225226889785336954104149543050569⟩, + ⟨204265360032091444705522879191680198815264360872397197105068,204265360032091444716377330327160894054754824427341811911117⟩, + ⟨482557743969039717130511434305922399417530040811283177796127,482557743969039717161602749295836325479872975624304610696238⟩, + ⟨106703394111820104352145792518529592688104150581210770516145,106703394111820104365489954902024667134203775101547199932046⟩, + ⟨3438910730871704151961828782076985089597285596049269801072,3438910730871704175421162157499637293594633789923191829628⟩, + ⟨-133442425838708053813746776120946274397891402835240837958527,-133442425838708053800513834211215737499152184162989905524551⟩] +lemma bs0_2_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 17 r = bs0_2_1_17 r := by + revert r + decide +kernel +def bs0_2_1_18 : Fin 8 → RI := ![⟨-11810350349026772077894767427097421792965317889910400725407,-11810350349026772075783129518196893608204369244393539832725⟩, + ⟨7702222998601364050987755515168090601840565878295322824168,7702222998601364052506373000293429074209957693584733490573⟩, + ⟨-355177713013107954112339911808065966173294252832967844253550,-355177713013107954080532958529037503204332699313050167505894⟩, + ⟨182772724017711391066092703313325334726062450296108244810274,182772724017711391077862087233116504062533129617283478932518⟩, + ⟨438302622926627859334181560932073585390970544690675857006640,438302622926627859367893594651366264062565139829728377502918⟩, + ⟨76932233513321153128121898913548615295258255477271639662523,76932233513321153142590854388283190782879264035976675047582⟩, + ⟨361675384033942314197129778779893962091439534689852787969,361675384033942339633874349256422518631302912628177706345⟩, + ⟨-131615293910027909917221543081306980416164221526823643346329,-131615293910027909902873182968417821951309604019816199518218⟩] +lemma bs0_2_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 18 r = bs0_2_1_18 r := by + revert r + decide +kernel +def bs0_2_1_19 : Fin 8 → RI := ![⟨-10451809775359622814428950960392633548451415035847586173175,-10451809775359622812127500878377521041517807230214208250773⟩, + ⟨7055113837543852825886654789251375894082396384581721231841,7055113837543852827541778672420838367890942641294132412227⟩, + ⟨-314082704965405636746920570875164873367525103128766664060637,-314082704965405636712254535129048400114764182215307887871182⟩, + ⟨162343769045904515634924045298468402428180129399364695211050,162343769045904515647751362649565948338404295842678553962963⟩, + ⟨396277510432968800949029793452233098467502596481912572324708,396277510432968800985772154650598208436835410460068237107906⟩, + ⟨49439428561442563724219296774912136098929715161167666795914,49439428561442563739988846386099557962874338614708398899933⟩, + ⟨-2950792384176561065630153148831172091258289329455884309403,-2950792384176561037906935247773128148536279523567184955635⟩, + ⟨-128626807797702812923055090098314586494689011247979068473164,-128626807797702812907416975997789734734920335149280975316338⟩] +lemma bs0_2_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 19 r = bs0_2_1_19 r := by + revert r + decide +kernel +def bs0_2_1_20 : Fin 8 → RI := ![⟨-9178961087655233675113381885294294211259871784627735100010,-9178961087655233672590308089945797125583350601653736147645⟩, + ⟨6419384613463018291092849600768829992437028155813490227613,6419384613463018292907357649512404454658430964763690619846⟩, + ⟨-275827807892484018567379215593739138686862295690972780907992,-275827807892484018529374929920433278444522746729445837427796⟩, + ⟨143156200841093753118095715903254096705894404232230554656951,143156200841093753132158270866684331944941578749896586312161⟩, + ⟨356775845330526233941645600168564704155151020964003395563382,356775845330526233981926156085972249167458433129388821754701⟩, + ⟨24346591276997627552396898180902093474032109842605241701485,24346591276997627569685014790895252731703776418691442307943⟩, + ⟨-6421204808203235928027159063594863791278597930469169487614,-6421204808203235897634266706807223404558097110977673668811⟩, + ⟨-124589677748266911491212475065207161837997830402991419704052,-124589677748266911474068450867687343823496095709236658840362⟩] +lemma bs0_2_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) 20 r = bs0_2_1_20 r := by + revert r + decide +kernel +def bs0_2_1 : Fin 21 → Fin 8 → RI := ![bs0_2_1_0,bs0_2_1_1,bs0_2_1_2,bs0_2_1_3,bs0_2_1_4,bs0_2_1_5,bs0_2_1_6,bs0_2_1_7,bs0_2_1_8,bs0_2_1_9,bs0_2_1_10,bs0_2_1_11,bs0_2_1_12,bs0_2_1_13,bs0_2_1_14,bs0_2_1_15,bs0_2_1_16,bs0_2_1_17,bs0_2_1_18,bs0_2_1_19,bs0_2_1_20] +lemma bs0_2_1_mem (d : Fin 21) (r : Fin 8) : (bs0_2_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 2 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 2 tr0_2_1) d r = bs0_2_1 d r := by + fin_cases d + · exact bs0_2_1_0_calc r + · exact bs0_2_1_1_calc r + · exact bs0_2_1_2_calc r + · exact bs0_2_1_3_calc r + · exact bs0_2_1_4_calc r + · exact bs0_2_1_5_calc r + · exact bs0_2_1_6_calc r + · exact bs0_2_1_7_calc r + · exact bs0_2_1_8_calc r + · exact bs0_2_1_9_calc r + · exact bs0_2_1_10_calc r + · exact bs0_2_1_11_calc r + · exact bs0_2_1_12_calc r + · exact bs0_2_1_13_calc r + · exact bs0_2_1_14_calc r + · exact bs0_2_1_15_calc r + · exact bs0_2_1_16_calc r + · exact bs0_2_1_17_calc r + · exact bs0_2_1_18_calc r + · exact bs0_2_1_19_calc r + · exact bs0_2_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 2 1 tr0_2_1_mem) d r +lemma bs0_2_1_lower (d : Fin 21) : (470/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 2 1) d) := by + have hc : ∀ d : Fin 21, (470:ℤ)*scale < 1000000*(rowLowerBox (bs0_2_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_2_1_mem d)).1 + have hnum : (470:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_2_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_2_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (470/1000000:ℝ) < ordinarySignValue 0 2 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 2 1) _ bs0_2_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs03.lean b/lean/OAI/Analysis/Triangular/Signs/Signs03.lean new file mode 100644 index 0000000000000000000000000000000000000000..db528e6f40da2bcb003b4e64c4fd49d25db81379 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs03.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows03 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_3_0_0 : Fin 8 → RI := ![⟨-6143646843334063460195708629053276910607080844165297533144,-6143646843334063460085241780186167184745633146690839349821⟩, + ⟨12688037359324949881537512401317387533083723131296658291746,12688037359324949881616956366373410513137332679436753698281⟩, + ⟨-207837781210653771207131112260890982010541518102335853347533,-207837781210653771205467184043901386629627055216646934839142⟩, + ⟨114527054806539052468760546830813454828083425764815598083191,114527054806539052469376242707907747280951614708176189367861⟩, + ⟨186798171897991910196711678966516572206050601118011232179159,186798171897991910198475268319428038829140916280098272278394⟩, + ⟨165850365769303261383709390648162461208633756929522686581676,165850365769303261384466310151385760390805241033284969382924⟩, + ⟨281813115136500132032360960913553711929450896229534060488592,281813115136500132033691642185630669988122339683719788041938⟩, + ⟨-216452729427083700478140365083133729945819919395371060633609,-216452729427083700477389754326660641132062567320566214855739⟩] +lemma bs0_3_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 0 r = bs0_3_0_0 r := by + revert r + decide +kernel +def bs0_3_0_1 : Fin 8 → RI := ![⟨-6702431293062945955036399511729858844513481459548810569434,-6702431293062945954921157136009469469510940512517733413516⟩, + ⟨13061105025339611979222137151378980069653738214693435657769,13061105025339611979305015511389857422506614531501045369062⟩, + ⟨-224773148801982098035163048350398444479939453276430746540728,-224773148801982098033427187839114611412556173105116263675621⟩, + ⟨123633564859312644273679371968263076566785507919130107764754,123633564859312644274321684628809080600530306943770309249900⟩, + ⟨201489502554838562798527036949724262829976236932221109476710,201489502554838562800366866988419939152294617508078181740860⟩, + ⟨179622955521683529176663231078768430176700313305510485449658,179622955521683529177452872520306946302446900031450328609301⟩, + ⟨282686768143272333218558827235906572675870317814476388855732,282686768143272333219947034401157868528064630641737242587604⟩, + ⟨-205563530986720197206205515494815376333836806377000157404008,-205563530986720197205422455529729199485546153758349063923346⟩] +lemma bs0_3_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 1 r = bs0_3_0_1 r := by + revert r + decide +kernel +def bs0_3_0_2 : Fin 8 → RI := ![⟨-7269871440310711596032977495609199984462062687310291342919,-7269871440310711595912635805545569549895681957209098486104⟩, + ⟨13357621887637725472858853935130654413697664227674549535142,13357621887637725472945399546942550407626219861460755650416⟩, + ⟨-241677213003566437968624836820415053342630814433250446356634,-241677213003566437966812166903319491939660181928376637076795⟩, + ⟨132676675583395492690091084754597254754618938224996118403912,132676675583395492690761818854242675120602816393905805440609⟩, + ⟨216028496383864813331769351285490878208428220891167079135181,216028496383864813333690591236539223389725073493760746946611⟩, + ⟨193438484206774671218835479431026658764851940467463693271639,193438484206774671219660061404682660257344795756298409924230⟩, + ⟨282412738103227102083812890135054208300967179532033264631766,282412738103227102085262523530579250644690798854679805362220⟩, + ⟨-193310578927729589997909735949312684690784659651843501385042,-193310578927729589997092026673272889776556857469149365315511⟩] +lemma bs0_3_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 2 r = bs0_3_0_2 r := by + revert r + decide +kernel +def bs0_3_0_3 : Fin 8 → RI := ![⟨-7838546724256477822470608671872503312453526529763489934254,-7838546724256477822344810035735922007687872173060976425127⟩, + ⟨13571083248929681384074370805798927951262089290964460384982,13571083248929681384164840865873254893630361505687918303439⟩, + ⟨-258311239930383640653364665339338316537123503214347113939744,-258311239930383640651469799119524653202553501018863506374222⟩, + ⟨141522573220257991216118677271719747628618338919907663926178,141522573220257991216819826099707806090958095583984794094226⟩, + ⟨230188378077970818694325545656633896982682000999169127640002,230188378077970818696333905065635912528323373987328853109856⟩, + ⟨207115332204467358900868890886540251232912780063212530455937,207115332204467358901730863887047656212548510157916202844258⟩, + ⟨280967365412261037522655890700128854595206375504671524242889,280967365412261037524171258350006825393562421122054517769987⟩, + ⟨-179759671629934702577852692460984863061103243728199383719734,-179759671629934702576997903803559540762268890884287636016581⟩] +lemma bs0_3_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 3 r = bs0_3_0_3 r := by + revert r + decide +kernel +def bs0_3_0_4 : Fin 8 → RI := ![⟨-8399989583578067687723943112882943067515922376706978331208,-8399989583578067687592291906773127466222816505032286536098⟩, + ⟨13696503946156205083859549631732923138272858670953748559026,13696503946156205083954228659195778997116751584781723922553⟩, + ⟨-274415000441092900265240220749873698259461820502847328541253,-274415000441092900263257199066038590693461659012943814629179⟩, + ⟨150026650340974456290882825605995287061064285780705197476224,150026650340974456291616594203991190046375111360310479820438⟩, + ⟨243724135482631417516707343902442389019913394341636026506845,243724135482631417518809138855225759598842409910167321821146⟩, + ⟨220454610328250335946408200409750996641843981623462032783194,220454610328250335947310275254422021456772672630710749694916⟩, + ⟨278345568792707696585159622902749007449877109819365950111357,278345568792707696586745490483923830694226984583942274436353⟩, + ⟨-165003764142276697519203293355434730164769855954985087312951,-165003764142276697518308737093341765314783845933991823561789⟩] +lemma bs0_3_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 4 r = bs0_3_0_4 r := by + revert r + decide +kernel +def bs0_3_0_5 : Fin 8 → RI := ![⟨-8944790823236432643800522846684316435817044460671501502006,-8944790823236432643662580715673986181878313730424621019559⟩, + ⟨13730670682553886689858784013796426434928873886580027603760,13730670682553886689957987258461434172486063962073554992055⟩, + ⟨-289711559613737840805465206563696359529296532842955879725774,-289711559613737840803387426610200614680466540077403830088316⟩, + ⟨158036384031744733638652826476118293975243148033163336584533,158036384031744733639421658050607106285844616930318095306524⟩, + ⟨256377355835100381934076436447646612020569460361382486921604,256377355835100381936278665225512729259761946669449990322210⟩, + ⟨233243632827916772841977743107412409458331920915699111807557,233243632827916772842922923406809926402962497635674713752489⟩, + ⟨274562013659024556124470374824833543918885402942587636862971,274562013659024556126132022751275821537226568978341809251703⟩, + ⟨-149162793623438705031244182283890149236174195965068629679045,-149162793623438705030306879840960375512248473178380234099990⟩] +lemma bs0_3_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 5 r = bs0_3_0_5 r := by + revert r + decide +kernel +def bs0_3_0_6 : Fin 8 → RI := ![⟨-9462766173110147324641379742928298680411789225215530618890,-9462766173110147324496660158193528878295114930799552925033⟩, + ⟨13672339557396598775303487865891806520693565041159047671736,13672339557396598775407565222585093224250371808562525874262⟩, + ⟨-303913445750249566628889632054634239702421454496092111788429,-303913445750249566626709765397228954059074655966066976486533⟩, + ⟨165394960279933574609839107802980693354362089265242968992837,165394960279933574610645714061539609082599972829515925579855⟩, + ⟨267882335993511095048432176793380682817933559062249206020279,267882335993511095050742606767834286955226640127863974274192⟩, + ⟨245260419336263257757359113756044080931511254076746576583345,245260419336263257758350733208556771729115297546378630513725⟩, + ⟨269651709072571188901114779433417364566628775445259219538759,269651709072571188902858068420814377435444433950530539074758⟩, + ⟨-132382552911516247982406648202247244335655434099508651762788,-132382552911516247981423293665690914424748939575297945323352⟩] +lemma bs0_3_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 6 r = bs0_3_0_6 r := by + revert r + decide +kernel +def bs0_3_0_7 : Fin 8 → RI := ![⟨-9943188502648052153960700051917124739433782793126192081094,-9943188502648052153808662032242268528960159620514532637839⟩, + ⟨13522355689360992914464247920334531000865545920190352338411,13522355689360992914573588444172826332032072145290129380995⟩, + ⟨-316730147818784489899520613554544293502651589768068542005900,-316730147818784489897230511559327785355482952472533823767054⟩, + ⟨171945600330161619948854626753810369687109481051847096939686,171945600330161619949702022898806606072650150346970665080390⟩, + ⟨277973399527553233352532029855746365069240267147635319364594,277973399527553233354959297723880119392972243980362809283331⟩, + ⟨256279188741032495832411840782028845574912001062121368405687,256279188741032495833453606194156764854156407003053019980529⟩, + ⟨263669947284766858227554538020333782507275287331089634252591,263669947284766858229385984716705336116958256259722822813511⟩, + ⟨-114832540771085774493928734829676928631388054461536554778568,-114832540771085774492895652288362243032506774667216825477244⟩] +lemma bs0_3_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 7 r = bs0_3_0_7 r := by + revert r + decide +kernel +def bs0_3_0_8 : Fin 8 → RI := ![⟨-10375086509703410275583813072740653898470092437405968951995,-10375086509703410275423853914812249778098659942559514689056⟩, + ⟨13283674639818547617513466002672106980195016952834707849211,13283674639818547617628503137185772209070343972688137715102⟩, + ⟨-327876797074773815742494413922695144191446582302665832478291,-327876797074773815740084998254762788637171257206820728390578⟩, + ⟨177536491694850428708055004644164616688425193225534708146611,177536491694850428708946549891047720149394777801989655099293⟩, + ⟨286393264182873093295844304345523410613087096338536309648866,286393264182873093298398032189961720114430944003541985107736⟩, + ⟨266076740248912169149691922262469386891740016227858039745956,266076740248912169150787963360893291593707815907511761214313⟩, + ⟨256691525682212234185184115055568787335259955849105196290036,256691525682212234187110979611989497255476433558421886064366⟩, + ⟨-96702765237381187702300964662581932079895180729820738873155,-96702765237381187701214058810137744964608982986734436219878⟩] +lemma bs0_3_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 8 r = bs0_3_0_8 r := by + revert r + decide +kernel +def bs0_3_0_9 : Fin 8 → RI := ![⟨-10747605803510330889036034096284279878052221649135998182079,-10747605803510330888867480927490019415297506464166898641225⟩, + ⟨12961272339579772824086868176331085494169109901173841908652,12961272339579772824208085828401075757978324592057222953937⟩, + ⟨-337083782482929848671037350899341479209704264679070636152589,-337083782482929848668498486285190905639461058424295875113081⟩, + ⟨182026167339928672687519106670895315031802956487118178117808,182026167339928672688458551329352332682474348379441298411514⟩, + ⟨292902202816399198871553940971489615605837528079965592539054,292902202816399198874244871118891122916438129746847362717890⟩, + ⟨274439540418441607149104912256509366179496626265581869362452,274439540418441607150259839568362367659758157040439882796735⟩, + ⟨248809225635972126983569178042416762661324155409278079002550,248809225635972126985599565867816901216390737604642346752480⟩, + ⟨-78199535636344266573378700003426948707272470018611180786543,-78199535636344266572233398740389747041126136172757542047279⟩] +lemma bs0_3_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 9 r = bs0_3_0_9 r := by + revert r + decide +kernel +def bs0_3_0_10 : Fin 8 → RI := ![⟨-11050422278628152025545756883298867478633760072902908918769,-11050422278628152025367856811605813296306068189947674298870⟩, + ⟨12561941403589798752994868610164977000344478380742284683002,12561941403589798753122808233892239777622400072173608271803⟩, + ⟨-344106936938790041813852376072010285141113732099629663030953,-344106936938790041811172721930182193336058361927870625403984⟩, + ⟨185289115269814926290395079876755182942726100038409626116962,185289115269814926291386620251157605169781442294854589162342⟩, + ⟨297287635876816900335266616841923063490589862316843644270340,297287635876816900338106769118936540384509225310139676713090⟩, + ⟨281171254442480284553639079243131913468819735872471947631822,281171254442480284554858051589092442940984403346618623469407⟩, + ⟨240131565078543406923121090515319873028979148279681865706081,240131565078543406925264070930839207132293731433236063470880⟩, + ⟨-59540346574569079109154554698256824693497691684195081782340,-59540346574569079107945742201517031552909973999775648437815⟩] +lemma bs0_3_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 10 r = bs0_3_0_10 r := by + revert r + decide +kernel +def bs0_3_0_11 : Fin 8 → RI := ![⟨-11274190894324149874371442775658475297433304732424644560827,-11274190894324149874183351361222864509871424251777801072541⟩, + ⟨12093985827214232141097017543253052176751598048162234231739,12093985827214232141232286430780948882885698413500917290283⟩, + ⟨-348737821943805248399795500661141903283402321245844792278015,-348737821943805248396962337453619188898196905361992151707505⟩, + ⟨187221343040337222216441045815717620758355608075396875770359,187221343040337222217489388459532477816805844877541814286317⟩, + ⟨299373693410332403375858985859664573157035360283297873020943,299373693410332403378861841642229060406247467155653962828154⟩, + ⟨286100382494855513125978163382173113461775421444591260925135,286100382494855513127266966869063036770364042727148101137888⟩, + ⟨230779889091465582422371699197789355323507621570052691977186,230779889091465582424637444307515986751078019417169171094109⟩, + ⟨-40948028856592358202614151956466380186831874548030495261326,-40948028856592358201336090345055219295648603677309992777719⟩] +lemma bs0_3_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 11 r = bs0_3_0_11 r := by + revert r + decide +kernel +def bs0_3_0_12 : Fin 8 → RI := ![⟨-11411006089410540613906817782681837286564242336798075599830,-11411006089410540613707585491949856623260111126775882940336⟩, + ⟨11566840417239661939287217223562583533912543433392806706141,11566840417239661939430498246822536343551349632486077373141⟩, + ⟨-350813545408363239442430259959211973014402524706749166481883,-350813545408363239439429285153699986485401759705247812338544⟩, + ⟨187745575058774418871815851909326847790828978807833653281627,187745575058774418872926289124276839506414163578976444676646⟩, + ⟨299030201926967506780253667525772491488075035757358680222751,299030201926967506783434385997695437237502545932737008777370⟩, + ⟨289087596724718130752753845760640036248636007987163100489071,289087596724718130754118986598006620009874684650626492200881⟩, + ⟨220884911566507005081264095329937854808797592625639067645187,220884911566507005083664043194517154080803872632640310552216⟩, + ⟨-22644411390487622481871588298235943119643116750623677159540,-22644411390487622480517825590348154638066293769440299206332⟩] +lemma bs0_3_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 12 r = bs0_3_0_12 r := by + revert r + decide +kernel +def bs0_3_0_13 : Fin 8 → RI := ![⟨-11454844031563983659400084188681795097785062065311464813497,-11454844031563983659188640409489188952510136348245392968092⟩, + ⟨10990652256631280516216121557224943933412931620682346919452,10990652256631280516368184663727982720293727961115973233536⟩, + ⟨-350225486213686359502788700628032726137692909877577053476170,-350225486213686359499603787922314029452985767343723881050321⟩, + ⟨186815733464720825306207654499732640547047437459345115116031,186815733464720825307386153428925676437524840542757206166694⟩, + ⟨296180500921223843861080644058054272201314159803920445205242,296180500921223843864456317407936675271787353698748798891686⟩, + ⟨290032332224773085405164754669275373842847735258820288931753,290032332224773085406613568698023743420545732161516307488976⟩, + ⟨210582866128109298085981663604306576233139505381557851438499,210582866128109298088528710794705390978690883047762805819212⟩, + ⟨-4843796635209935980377908889817822855149041165484680951300,-4843796635209935978941170387074957313138951546316475584049⟩] +lemma bs0_3_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 13 r = bs0_3_0_13 r := by + revert r + decide +kernel +def bs0_3_0_14 : Fin 8 → RI := ![⟨-11401952897883734408675270480093082438110901948256853923630,-11401952897883734408450404569559626787370485001854572251972⟩, + ⟨10375865628619200335615643324824954809066030667343526158654,10375865628619200335777359167365322194001563366702971354975⟩, + ⟨-346926286164608524378756165133307867356175931110958025629290,-346926286164608524375369078985497357363299638503188600502400⟩, + ⟨184420354501341250967575741733411591173372812238137295625757,184420354501341250968829049992427086731691188969435469361087⟩, + ⟨290807490283080856498838162915377419142667630272381309409335,290807490283080856502428118904595906947960737108584455103920⟩, + ⟨288878176905459120824474622627965652086282172593736385884513,288878176905459120826015405180298463965082498208690350188980⟩, + ⟨200011460338275920976932273012352395280341895647018825055533,200011460338275920979641002906512087625180137749289168106997⟩, + ⟨12253408680655581022416519204922166026199127718455661412457,12253408680655581023944459695058930378305556239887938407341⟩] +lemma bs0_3_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 14 r = bs0_3_0_14 r := by + revert r + decide +kernel +def bs0_3_0_15 : Fin 8 → RI := ![⟨-11251156603681764763502577717087608806651460491975484006678,-11251156603681764763262916414298868395389929468376113308624⟩, + ⟨9732847719545404584188367260847383062476965197179301283922,9732847719545404584360723441526315884980322200800811613630⟩, + ⟨-340934518383282075088215384257454236499811329112839367927269,-340934518383282075084605439660161579618964383104766243628297⟩, + ⟨180584628312875250872486541096716706169223941168421246212032,180584628312875250873822312665842690615995662136106046546625⟩, + ⟨282957365242948231577207640684538308966947876887731933296235,282957365242948231581033803250941226268748595028966781527224⟩, + ⟨285616639489381612032314180788282830885767334029731303546009,285616639489381612033956341456139087167779107888951464984671⟩, + ⟨189305848332589202627013564428782067447762928846583657938047,189305848332589202629900519297965261459529583615420946517079⟩, + ⟨28466553847887227975022434590262004891482013743642784480106,28466553847887227976650908232971612468227577727242673585057⟩] +lemma bs0_3_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 15 r = bs0_3_0_15 r := by + revert r + decide +kernel +def bs0_3_0_16 : Fin 8 → RI := ![⟨-11004040726481867059427842541136818343276646914528335226590,-11004040726481867059171822891221670926570768106147197994451⟩, + ⟨9071581679479778882785282723307104574835552291624307002411,9071581679479778882969403265606670233271217464986584148942⟩, + ⟨-332336557388885132239592274465444471947397101412559697955316,-332336557388885132235735929109469539247154674019526360176591⟩, + ⟨175370823592035421168269019790154725182318255419228674080376,175370823592035421169695965924222098876232999842193982710457⟩, + ⟨272740614945631140730408915130451098850882673936123582458726,272740614945631140734496236652056877715571808863261224008957⟩, + ⟨280288955712483364748890816824574569431807236447845224383622,280288955712483364750645064984011317792934264089278931587757⟩, + ⟨178594839446481263951453695257973902143621090365546407115614,178594839446481263954537702422740673479253645288086054991546⟩, + ⟨43639762039172966664405671314014774685477236925352239447269,43639762039172966666145298225195261880637523369940856717000⟩] +lemma bs0_3_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 16 r = bs0_3_0_16 r := by + revert r + decide +kernel +def bs0_3_0_17 : Fin 8 → RI := ![⟨-10664997029228133203515480133538460187609443237806947698277,-10664997029228133203241316820205624010549037540539503479166⟩, + ⟨8401439661070315345692886932728647862706679258010916340703,8401439661070315345890055774829888220017221028240567010202⟩, + ⟨-321285355476090412720551522381271930856840344442811261809526,-321285355476090412716421884595635499409812957485290713065919⟩, + ⟨168876965767461678394840015534657769129166093524544464325237,168876965767461678396368086837778582188857460139931287737859⟩, + ⟨260330038803943674212442947055064754913335887906411547970976,260330038803943674216819929882009342018957875984422808992600⟩, + ⟨272985716767710166027634149445185383522029799315905563170808,272985716767710166029512718094031566621443073609127679466462⟩, + ⟨167997542639080109819685900279068863423529233301248566152325,167997542639080109822988465620834753801327047667505819691888⟩, + ⟨57645825362566906811206247283451184201559858350705785147026,57645825362566906813069158501738538546807768355219839265446⟩] +lemma bs0_3_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 17 r = bs0_3_0_17 r := by + revert r + decide +kernel +def bs0_3_0_18 : Fin 8 → RI := ![⟨-10241114321539740750433122602664865098076402831592014501912,-10241114321539740750138768243942232124950474220773930564994⟩, + ⟨7731034491010170536221096391354374604449333979037884412267,7731034491010170536432785940078393731110229588242845976859⟩, + ⟨-307996055795772712437929869000497745735865763521546152151165,-307996055795772712433496099699357237864759248139385283076312⟩, + ⟨161233768099611084119608728593516498109528911841700527664591,161233768099611084121249336313978052303908705624117076064157⟩, + ⟨245955754554626669776814944529453105116824674628792947993759,245955754554626669781514274857519945211665079270254216066890⟩, + ⟨263844259454511547529626402062609125742903151320849578389011,263844259454511547531643319874295639245440018733025470545227⟩, + ⟨157620610302730948221826035478767028163110207153258341514606,157620610302730948225371821716467754604288276454306072402320⟩, + ⟨70388777677015471705784696312677692936767070044655962072127,70388777677015471707784803585770244111348630710665075226197⟩] +lemma bs0_3_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 18 r = bs0_3_0_18 r := by + revert r + decide +kernel +def bs0_3_0_19 : Fin 8 → RI := ![⟨-9741917017810165231002677147141091498085943400825124542099,-9741917017810165230685773627866308615567887571666563397467⟩, + ⟨7068140406629465151612406288168571759316640051295750858896,7068140406629465151840312418978385634703784653779861481755⟩, + ⟨-292738618791980425133252362870562399610606684721945177428677,-292738618791980425128478942489464507303531786277785541589575⟩, + ⟨152599953914495359823698159136719461350176365208013711079817,152599953914495359825464446419267128464569800753208612355653⟩, + ⟨229897408047800471611748985262327958394070632053369708577166,229897408047800471616808310103617463928587726997893118425285⟩, + ⟨253043926735992770297407515091043261732617955663000539287892,253043926735992770299578939884666749962366826325939654393424⟩, + ⟨147556194846900923097581868346212742751458513822274789723146,147556194846900923101399281284069364334233157903088100736930⟩, + ⟨81805045268897506091934622103156532223227360784378262250700,81805045268897506094087948578482974642869606494996434533745⟩] +lemma bs0_3_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 19 r = bs0_3_0_19 r := by + revert r + decide +kernel +def bs0_3_0_20 : Fin 8 → RI := ![⟨-9178966412554627008246324323841084253460343636730870411742,-9178966412554627007904142538739895493730602000936197091076⟩, + ⟨6419642668560889787842469470275724941212636798297554729759,6419642668560889788088554861985486913524395844786196891412⟩, + ⟨-275827870957299614766733743938099136113017096132461136592387,-275827870957299614761579564802475288884563145605417306273257⟩, + ⟨143156235811310767967585810413071862712357404677716866654048,143156235811310767969492988145714297508147818199037831145176⟩, + ⟨212474014308184159689539662751070184425606453886728554263868,212474014308184159695002551928178602027224318126725857978860⟩, + ⟨240799467456952246581809405019023485147745859719519490759259,240799467456952246584154036640131701886324045974774851066551⟩, + ⟨137880674414028444739608659079093349040182362381555030745988,137880674414028444743730573460186404991786490670027216557141⟩, + ⟨91863180153356801259665634651084010724989274601366344059934,91863180153356801261990724315322988294506108328041688459395⟩] +lemma bs0_3_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) 20 r = bs0_3_0_20 r := by + revert r + decide +kernel +def bs0_3_0 : Fin 21 → Fin 8 → RI := ![bs0_3_0_0,bs0_3_0_1,bs0_3_0_2,bs0_3_0_3,bs0_3_0_4,bs0_3_0_5,bs0_3_0_6,bs0_3_0_7,bs0_3_0_8,bs0_3_0_9,bs0_3_0_10,bs0_3_0_11,bs0_3_0_12,bs0_3_0_13,bs0_3_0_14,bs0_3_0_15,bs0_3_0_16,bs0_3_0_17,bs0_3_0_18,bs0_3_0_19,bs0_3_0_20] +lemma bs0_3_0_mem (d : Fin 21) (r : Fin 8) : (bs0_3_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 3 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_0) d r = bs0_3_0 d r := by + fin_cases d + · exact bs0_3_0_0_calc r + · exact bs0_3_0_1_calc r + · exact bs0_3_0_2_calc r + · exact bs0_3_0_3_calc r + · exact bs0_3_0_4_calc r + · exact bs0_3_0_5_calc r + · exact bs0_3_0_6_calc r + · exact bs0_3_0_7_calc r + · exact bs0_3_0_8_calc r + · exact bs0_3_0_9_calc r + · exact bs0_3_0_10_calc r + · exact bs0_3_0_11_calc r + · exact bs0_3_0_12_calc r + · exact bs0_3_0_13_calc r + · exact bs0_3_0_14_calc r + · exact bs0_3_0_15_calc r + · exact bs0_3_0_16_calc r + · exact bs0_3_0_17_calc r + · exact bs0_3_0_18_calc r + · exact bs0_3_0_19_calc r + · exact bs0_3_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 3 0 tr0_3_0_mem) d r +lemma bs0_3_0_lower (d : Fin 21) : (2800/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 3 0) d) := by + have hc : ∀ d : Fin 21, (2800:ℤ)*scale < 1000000*(rowLowerBox (bs0_3_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_3_0_mem d)).1 + have hnum : (2800:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_3_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_3_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2800/1000000:ℝ) < ordinarySignValue 0 3 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 3 0) _ bs0_3_0_lower e he hτ +def bs0_3_1_0 : Fin 8 → RI := ![⟨-6143646843334063460195708629053276910607080844165297533142,-6143646843334063460085241780186167184745633146690839349821⟩, + ⟨12688037359324949881537512401317387533083723131296658291746,12688037359324949881616956366373410513137332679436753698281⟩, + ⟨-207837781210653771207131112260890982010541518102335853347533,-207837781210653771205467184043901386629627055216646934839142⟩, + ⟨114527054806539052468760546830813454828083425764815598083191,114527054806539052469376242707907747280951614708176189367861⟩, + ⟨186798171897991910196711678966516572206050601118011232179159,186798171897991910198475268319428038829140916280098272278394⟩, + ⟨165850365769303261383709390648162461208633756929522686581676,165850365769303261384466310151385760390805241033284969382924⟩, + ⟨281813115136500132032360960913553711929450896229534060488592,281813115136500132033691642185630669988122339683719788041938⟩, + ⟨-216452729427083700478140365083133729945819919395371060633611,-216452729427083700477389754326660641132062567320566214855739⟩] +lemma bs0_3_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 0 r = bs0_3_1_0 r := by + revert r + decide +kernel +def bs0_3_1_1 : Fin 8 → RI := ![⟨-5771123876848141796971765058504408720763542600280701490680,-5771123876848141796858114525068445895474699403101830658961⟩, + ⟨12439325581981841816412139637973089593504201896587130511226,12439325581981841816493873199665682155423989290505568787598⟩, + ⟨-196547536149768219988491109730748832155255439510022967456548,-196547536149768219986779226650896411650028431767250339377012⟩, + ⟨108456048104689991265463585550212565948364297607752851495165,108456048104689991266097025949607999455150226605299849580151⟩, + ⟨177003951460094141795450613187188638657281466966024625870848,177003951460094141797265029663956245079857159070625020746693⟩, + ⟨156668639267716416188385015735548337267539317597412447097425,156668639267716416189163749864315114412094203449293103470935⟩, + ⟨281230679798651997908190699436535579569489368924189090791482,281230679798651997909559731304062096157176058627091569130510⟩, + ⟨-223712195053992702659451897614421357710164195103515827921873,-223712195053992702658679654052206210206717975999480150342141⟩] +lemma bs0_3_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 1 r = bs0_3_1_1 r := by + revert r + decide +kernel +def bs0_3_1_2 : Fin 8 → RI := ![⟨-5402447887037279309817104644045655733605417961897424442525,-5402447887037279309700126520489745848701291916785920194275⟩, + ⟨12156591225209156593932141111824383568357529963915085624638,12156591225209156594016267762085174275821900780639014370503⟩, + ⟨-185243378471218674594486597147499636252544216910032217842323,-185243378471218674592724591599665505890063093177760874832524⟩, + ⟨102356863923422821889496796558004813268259101962490771999403,102356863923422821890148783548878145496234979486664121485184⟩, + ⟨167142025765387305808157083564553560554968487545031838389613,167142025765387305810024624599207733070251959531241838434229⟩, + ⟨147505996736223292881602155454779662046482687503509056037172,147505996736223292882403690250779814230385937743826891820524⟩, + ⟨280138163106662782752489858660315124933384481677783919942768,280138163106662782753898974606446492804755945239318953876394⟩, + ⟨-230365547961511880869047461275849279682922233608644705081530,-230365547961511880868252607084629615698052103466401842417235⟩] +lemma bs0_3_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 2 r = bs0_3_1_2 r := by + revert r + decide +kernel +def bs0_3_1_3 : Fin 8 → RI := ![⟨-5039817558589144905610206719916586961936258131298120653112,-5039817558589144905489747072766747642351128612983478302239⟩, + ⟨11841761606722333911393299817584820442789125752133254369436,11841761606722333911479930260083289130317263262215028088148⟩, + ⟨-173996044140937920315236781064326023934522096426086433739951,-173996044140937920313422334395868666997580550072903826792496⟩, + ⟨96269150783783353674749607790338559676719260302984288142795,96269150783783353675420999333302257037677096393011513549472⟩, + ⟨157279587497456540931753322986952072421514302929052755597908,157279587497456540933676446108051398017725184919927988604579⟩, + ⟨138416251395597025866133258077697989928560286810749701692313,138416251395597025866958648294008569694621438984195898755155⟩, + ⟨278542575313600160966878246354933234226895767290464609748613,278542575313600160968329300658966901178131660521152509264419⟩, + ⟨-236393292333397435484823519461115916973079453449625687080182,-236393292333397435484005008678935536704008723200354019631238⟩] +lemma bs0_3_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 3 r = bs0_3_1_3 r := by + revert r + decide +kernel +def bs0_3_1_4 : Fin 8 → RI := ![⟨-4685224761277571563148461036392716358219337251503186985812,-4685224761277571563024355084907716277618528039683098035096⟩, + ⟨11497064199146509140039873577646490475006976992818539313322,11497064199146509140129126317034301605308815916100862511722⟩, + ⟨-162872023148302168520862744414520838415038909217281168948815,-162872023148302168518993374583743644818081890223860084148379⟩, + ⟨90230425123776195548394940320045817175831197271454287824168,90230425123776195549086654833829826213686568626003267761593⟩, + ⟨147480226999654824230099796472398309515301873010593936944415,147480226999654824232081132383759242703896317540826079978374⟩, + ⟨129449805194235060129047459240656220442772142177454251933960,129449805194235060129897833955893860200737267164982785449445⟩, + ⟨276454596465408243131847581970921906762118424728205952088475,276454596465408243133342559578101913905113292207283316495959⟩, + ⟨-241781296633725238755998855032807317489727452491868791949497,-241781296633725238755155567991656510913134547840637421507381⟩] +lemma bs0_3_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 4 r = bs0_3_1_4 r := by + revert r + decide +kernel +def bs0_3_1_5 : Fin 8 → RI := ![⟨-4340440674501233168105414524088639790183222410592765148584,-4340440674501233167977485743098275421996875546354454268782⟩, + ⟨11124993401102534013487392955842596279891258842732257151323,11124993401102534013579394942961507835300838640129672690887⟩, + ⟨-151932928793281399338643461840707752881417323003814699072987,-151932928793281399336716509903187522883961580501253294032001⟩, + ⟨84275692278049153549354928202378527179848864524941568632102,84275692278049153550067949564233383382239666542018504301601⟩, + ⟨137803295404096649912987770602255859901955043977740028892853,137803295404096649915030137506026842118901294477401947603755⟩, + ⟨120653191458008520205677314532699832859239593737109212317735,120653191458008520206553883298378200949497551375430034485397⟩, + ⟨273888422542051679822723906733646169267671476191803207378493,273888422542051679824264934062353856582621888900994708772308⟩, + ⟨-246520816594133813728211592347206582761340678988266580546501,-246520816594133813727342329576901470066126571482359128701890⟩] +lemma bs0_3_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 5 r = bs0_3_1_5 r := by + revert r + decide +kernel +def bs0_3_1_6 : Fin 8 → RI := ![⟨-4007007283946333155835014154737757229234802403827214361610,-4007007283946333155703073289735635092795257350065526058750⟩, + ⟨10728272497115023088361128694447939484563144158690274235886,10728272497115023088456016034641258911710024055343293435571⟩, + ⟨-141234988084485811017288085781682416132519115541613057638819,-141234988084485811015300701054914429139530714168505082318140⟩, + ⟨78437132967636801570083319709342841327205592845556973480641,78437132967636801570818702744499357381401071925253016988183⟩, + ⟨128303379606129583621538469956241054907355531574986447301378,128303379606129583623644889276822422389284228436617949012940⟩, + ⟨112068707872643168629719966249387083595694098772024668447574,112068707872643168630624025838506990041484268883587316000094⟩, + ⟨270861561433641710179036449445476027732917830012801948889829,270861561433641710180625806251401067625393911799114528817725⟩, + ⟨-250608434634893095005476832016741640541404790890859122600577,-250608434634893095004580307552581997596344699534044052329243⟩] +lemma bs0_3_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 6 r = bs0_3_1_6 r := by + revert r + decide +kernel +def bs0_3_1_7 : Fin 8 → RI := ![⟨-3686233989095978164720568705689198718519463086652118584366,-3686233989095978164584412689167690983506332583214763748546⟩, + ⟨10309812158568594923110931546294209148514381828995252527241,10309812158568594923208850278741487538750726283695253655225⟩, + ⟨-130828656238343251196947611336253118778344888383094282586294,-130828656238343251194896735076737390412417036980028186805121⟩, + ⟨72743857888469063825988521477392934009298266985358308815107,72743857888469063826747397998956587451100324569928674986641⟩, + ⟨119029893013147438837859305950485148805878986058539374937333,119029893013147438840033019635105327040459077767688940473718⟩, + ⟨103734141965252833064662181508094631869937543674646340275980,103734141965252833065595123340423349050016070388758531448605⟩, + ⟨267394583784964873049567642413872807908467004136221563270454,267394583784964873051207774843818881380818123064626469554812⟩, + ⟨-254045919901697019885403162632386999176618364660538043012685,-254045919901697019884477996651764915776356935600955204280888⟩] +lemma bs0_3_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 7 r = bs0_3_1_7 r := by + revert r + decide +kernel +def bs0_3_1_8 : Fin 8 → RI := ![⟨-3379198918047485487597337949122485230631327292094856481585,-3379198918047485487456748705840722486968472372977258620224⟩, + ⟨9872666947594123307668287105810510218342927975337567163842,9872666947594123307769394062737782859741302124299713520545⟩, + ⟨-120758354634366148907182294232537887821120206206538077199259,-120758354634366148905064641639897877234932844911723354963483⟩, + ⟨67221730916051510485342925065801293172182344058807721012899,67221730916051510486126510533687275211972207430790258024583⟩, + ⟨110026782509939080128049044895481075065427445646257037563039,110026782509939080130293534487942871640254601635269372901075⟩, + ⟨95682588609534264438302061106993195089990961395401807514787,95682588609534264439265379435375267665464932658303252332137⟩, + ⟨263510834749068737268916549782264147963719061964769514290968,263510834749068737270610084765864851602554910469534485406794⟩, + ⟨-256840014967943841421188108811695389250580909733712371452762,-256840014967943841420232819516015459112030525114178067070125⟩] +lemma bs0_3_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 8 r = bs0_3_1_8 r := by + revert r + decide +kernel +def bs0_3_1_9 : Fin 8 → RI := ![⟨-3086754436409989841032542293082726578759128207121352239152,-3086754436409989840887285420415888002411430157624856387705⟩, + ⟨9419991286512393098085140312232371553038571232908305621502,9419991286512393098189604067959640519137453122039668735340⟩, + ⟨-111062328283061678614085178655212331095704344636628712424772,-111062328283061678611897218994701596588627586894673806307145⟩, + ⟨61893259530542327855332217928138428581139611334406064952917,61893259530542327856141818804251141148836708226864755140935⟩, + ⟨101332348883673806556482284485812490698742368555317200769496,101332348883673806558801292194550770543721073879515819544767⟩, + ⟨87942356665291942224214277040521142312553021235510162749414,87942356665291942225209577993132889620190667566006694597537⟩, + ⟨259236113466951329730593711133072797299695879332767730437817,259236113466951329732343472279275538578347279910271492697782⟩, + ⟨-259002156826514984089701662511264336807538466965884507372930,-259002156826514984088714657159054247322990716999598515396982⟩] +lemma bs0_3_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 9 r = bs0_3_1_9 r := by + revert r + decide +kernel +def bs0_3_1_10 : Fin 8 → RI := ![⟨-2809536262145350641657793652818309017341508537639195447335,-2809536262145350641507616960507198853441371289893874365032⟩, + ⟨8954996247243990105967107610195428761406197847591279451862,8954996247243990106075109531298632321988008166222205493802⟩, + ⟨-101772616013279498829031317330710118656250715290851461950772,-101772616013279498826769251937908667745083024024619082346055⟩, + ⟨56777549379810493277488604820124411533334824473060767982155,56777549379810493278325626707180790532774599821135506358546⟩, + ⟨92979175151915377996212756541858853851308370751493038683401,92979175151915377998610308552654967347801793474575442062436⟩, + ⟨80536959760099072155723883233573706553663243020534993547582,80536959760099072156752894819567798563088544369766010935076⟩, + ⟨254598327614420691245888342286193626410283429474317421469205,254598327614420691247697367473404627400731278978077801428981⟩, + ⟨-260548141028322902491326386702944948582786457269395482522044,-260548141028322902490305951687605629925416487075217868838050⟩] +lemma bs0_3_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 10 r = bs0_3_1_10 r := by + revert r + decide +kernel +def bs0_3_1_11 : Fin 8 → RI := ![⟨-2547975557535806120792364687874607875123880299835994541340,-2547975557535806120636996579327999644328842347672883199679⟩, + ⟨8480908312337253414725594389629774178115954473321728983270,8480908312337253414837329799052565638582677860416488823877⟩, + ⟨-92915124257852700903455194256148712685483656170577237256837,-92915124257852700901114932155017355460301762408812570414405⟩, + ⟨51890318485709147764323325425093942069047361687857683766122,51890318485709147765189282088565188935365550432776798709762⟩, + ⟨84994154912821202506176669340010743442920665314741025144716,84994154912821202508657101658297097992055026182765301026219⟩, + ⟨73485184485513498387856687422271586360067692695121120037855,73485184485513498388921270623102996669879516001110453191417⟩, + ⟨249627130621792972132796614644272186334721080620924095145751,249627130621792972134668175519153418562747227667986627627648⟩, + ⟨-261497738691496878778629129707914771667728603143914760882494,-261497738691496878777573419558838071463666252296060975441064⟩] +lemma bs0_3_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 11 r = bs0_3_1_11 r := by + revert r + decide +kernel +def bs0_3_1_12 : Fin 8 → RI := ![⟨-2302313360113877282614580103436541429521419455862526971816,-2302313360113877282453727778172257221597195447757376896225⟩, + ⟨8000930989567701880165771206426346422241847618464481131222,8000930989567701880281450676222753779508815368921769396547⟩, + ⟨-84509793544561659417754365742646131055516663822770768775154,-84509793544561659415331496569448532877603330540985186633846⟩, + ⟨47243965487058890032948978325270920259558158110198105913786,47243965487058890033845501712221896603316546578497498490544⟩, + ⟨77398611027473526669245714168061796844951882574720889365947,77398611027473526671813701316724036512889924267326107745801⟩, + ⟨66801227941880022698804764470556302810581590872555130021799,66801227941880022699906925556866711633795882079852073628077⟩, + ⟨244353549184183448382282162686826065126484927212503825285518,244353549184183448384219786317651110900889623975495733967573⟩, + ⟨-261874276600852031199927951150831277402054205761282076554833,-261874276600852031198834976319173931031693950910196774090041⟩] +lemma bs0_3_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 12 r = bs0_3_1_12 r := by + revert r + decide +kernel +def bs0_3_1_13 : Fin 8 → RI := ![⟨-2072616731771187701488122020653008396265440038833310307954,-2072616731771187701321469474419009982247315859182325893160⟩, + ⟨7518209861769056114727106835857692276096541551830973064583,7518209861769056114846957625436367046761636752320497742544⟩, + ⟨-76570845582866659979760652079771576286757481618254828687081,-76570845582866659977250415959512465985148582928867611660941⟩, + ⟨42847685508111268846847220243533298821954920159789539481494,42847685508111268847776071629108667369733749707108801058752⟩, + ⟨70208493656121662263335976179206936884120414743884246723743,70208493656121662265996563126399297924072923332374543256873⟩, + ⟨60494895628909734556602673211449807004724612537232809166619,60494895628909734557744577446249765413036188402320330414910⟩, + ⟨238809608458818478815112563955927779036640478747428621943836,238809608458818478817120056923079892041134730956905847133192⟩, + ⟨-261704190757455422398674302537081612328048659070353050988369,-261704190757455422397541915806795922535508412430274771725184⟩] +lemma bs0_3_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 13 r = bs0_3_1_13 r := by + revert r + decide +kernel +def bs0_3_1_14 : Fin 8 → RI := ![⟨-1858796043809911665642751760065035034478908422036471663736,-1858796043809911665469957555561153331286290893492069632857⟩, + ⟨7035801360921160808968345868566497246773946520584638082747,7035801360921160809092613527911108135346228929433679986055⟩, + ⟨-69107098145999002298119349862569949073535140665402843012235,-69107098145999002295516603830061196862596900915356706996334⟩, + ⟨38707626733206342436997185257896224467032172343301916140833,38707626733206342437960267670382404950728721009493718666342⟩, + ⟨63434645881204686264193687406966256867266373801281911895809,63434645881204686266952325156258892145084333326626259998634⟩, + ⟨54571850127512742233229064577954263616092729022809049570654,54571850127512742234413051491651146995520876917877471504945⟩, + ⟨233027961919749816326983136742678575485986398961422877467566,233027961919749816329064611992488487329846325350814520384221⟩, + ⟨-261016563553677888181114623351930055873963338704917431976973,-261016563553677888179940504692049753602156045252871095526639⟩] +lemma bs0_3_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 14 r = bs0_3_1_14 r := by + revert r + decide +kernel +def bs0_3_1_15 : Fin 8 → RI := ![⟨-1660622869588466188626933800988483140322343773755337402247,-1660622869588466188447628577789713375600990025026133133934⟩, + ⟨6556645303319966690688219614398738830816505285280643619740,6556645303319966690817169774845645249457618450625409917464⟩, + ⟨-62122334732460280740738727021365015354017426295961394467445,-62122334732460280738037907513964992540040680990166702997212⟩, + ⟨34827080533850205553092083992563085745985303950436467749230,34827080533850205554091456092031285668021232412571604551163⟩, + ⟨57083124817817307335135504677466973058111489115558420020881,57083124817817307337998090021607492856742627555432469572361⟩, + ⟨49033900819424288961382819528608281749287996893136722079665,49033900819424288962611419981026664930742103961086606174271⟩, + ⟨227041532244831652185582778784500667728200482144854242992833,227041532244831652187742685624656690043013393612508633312531⟩, + ⟨-259842654282601979676392174179422928218095707248202976274763,-259842654282601979675173813824250779607079345166460716779174⟩] +lemma bs0_3_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 15 r = bs0_3_1_15 r := by + revert r + decide +kernel +def bs0_3_1_16 : Fin 8 → RI := ![⟨-1477748020105905072395854903490962155585311276939256218154,-1477748020105905072209638590598241042463459141437550758403⟩, + ⟨6083541032769955862475580067095128933874278268662223776932,6083541032769955862609500445971159646644006845792300413733⟩, + ⟨-55615716187029153978811345385779154592898404137873526865535,-55615716187029153976006426256901185244446595330066500104434⟩, + ⟨31206698001731713260684976987818701491279429374460580022588,31206698001731713261722868602197622453219152593363261438373⟩, + ⟨51155566180463512628538858364213379759553550896076076481231,51155566180463512631511778386403257075994613139613077852425⟩, + ⟨43879325001861320400659104941596547038702897372924732613494,43879325001861320401935060221596839975050952853841327591166⟩, + ⟨220883168883597208227168023461446828360987729823319751721603,220883168883597208229411181138547870974869071955726610997323⟩, + ⟨-258215431991654165426281612592440179505029106790456156808426,-258215431991654165425016292101120241878576086667761871695290⟩] +lemma bs0_3_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 16 r = bs0_3_1_16 r := by + revert r + decide +kernel +def bs0_3_1_17 : Fin 8 → RI := ![⟨-1309719326488215033020802936331749776625697186938350411971,-1309719326488215032827241624545270564627434208147937273795⟩, + ⟨5619126900298306284476127518016238431674616015204777421689,5619126900298306284615330167920421498830955705131619204969⟩, + ⟨-49582221998574886844554197879842205199802100590108725101708,-49582221998574886841638643288474382748427533892224332144913⟩, + ⟨27844725953459582277130478361871830768894632184230077941911,27844725953459582278209307919026853499661642748889783786359⟩, + ⟨45649580679653307026088883792984732837831144909585953564814,45649580679653307029179065799046124942529412072105393849238⟩, + ⟨39103211125485166386805379474596722881106806017846244516568,39103211125485166388131662730591798555699047214182720069883⟩, + ⟨214585327137323679374807886185956099194816657659680404414670,214585327137323679377139521560835034938599610743448455562404⟩, + ⟨-256169118811573331649283677325765482325038608868648688671142,-256169118811573331647968448330384862913485501977193732796832⟩] +lemma bs0_3_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 17 r = bs0_3_1_17 r := by + revert r + decide +kernel +def bs0_3_1_18 : Fin 8 → RI := ![⟨-1155998842858876503248260393585194272790538568836202583859,-1155998842858876503046882817347768000666764803902796472113⟩, + ⟨5165862759233894071648957590338177997557974494039185843649,5165862759233894071793781429279205251335079202368557556766⟩, + ⟨-44013109798473954213808182094514796393760896914278436375187,-44013109798473954210774893512307047569014405184341081624884⟩, + ⟨24737255851238210000328990250310217139179239897017940106895,24737255851238210001451384386772732376057234354227631332232⟩, + ⟨40559171296810400117016669506845662218485300848188521008489,40559171296810400120231637192149847876594566992462888918223⟩, + ⟨34697815463772575960169245360217410252181060974691206432496,34697815463772575961549085706602797136880588049387689783130⟩, + ⟨208179772712240458983852220179364505484055163537805442579742,208179772712240458986278010106726906473150701464681752241344⟩, + ⟨-253738750885822740872830910191165038920512273662595482244125,-253738750885822740871462570491245209023379269749813277060618⟩] +lemma bs0_3_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 18 r = bs0_3_1_18 r := by + revert r + decide +kernel +def bs0_3_1_19 : Fin 8 → RI := ![⟨-1015979210376340328753556666081284079651745436573904379011,-1015979210376340328543850235230068459961017132337392973158⟩, + ⟨4726015162391930443575900875860195419574926455447135336631,4726015162391930443726714541084335732746660271971607286123⟩, + ⟨-38896382589828389404790766451075434731385266048063091045373,-38896382589828389401632022889834559392562022699110239953544⟩, + ⟨21878479589862957022453540261572718825567534513047465397308,21878479589862957023622355939891415977745113449872365879049⟩, + ⟨35875161366079089774040342774454520983597263224981523589224,35875161366079089777388279576506663777562500037035550319579⟩, + ⟨30652924259684261975278077024989718070876226939549933277146,30652924259684261976714986732604332829894430550063201239522⟩, + ⟨201697314818527109134404110696392962039487979848014310705119,201697314818527109136930229826249898267086757111399025731177⟩, + ⟨-250959762942003507239036914214224889510257420766218554146618,-250959762942003507237611980812887139048286024483367110731433⟩] +lemma bs0_3_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 19 r = bs0_3_1_19 r := by + revert r + decide +kernel +def bs0_3_1_20 : Fin 8 → RI := ![⟨-888998986113544502319130177609719681635844996390560688016,-888998986113544502100536488137760039705340023439692694971⟩, + ⟨4301644998895521866069208448520244230506755604698106997020,4301644998895521866226413525017512545202092160594804620199⟩, + ⟨-34217254380493250488332351550433785331534852302160170866939,-34217254380493250485039741942103304240241694763248233395760⟩, + ⟨19260946698301038314585112100137790484901523499832910319833,19260946698301038315803461630010712964096961191467953706766⟩, + ⟨31585624416696644440354480389178540766791028192646533709585,31585624416696644443844301157745305133929066308046760167340⟩, + ⟨26956214243826513551879627840357295492749895705162846198881,26956214243826513553377433096772040301214428207960152296970⟩, + ⟨195167570012045022317661967842580137605048284166973440009749,195167570012045022320295142697517503692144232246266638665563⟩, + ⟨-247867601430524371660273896611836725253097210187052912098921,-247867601430524371658788575211893441751550741195894576979844⟩] +lemma bs0_3_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) 20 r = bs0_3_1_20 r := by + revert r + decide +kernel +def bs0_3_1 : Fin 21 → Fin 8 → RI := ![bs0_3_1_0,bs0_3_1_1,bs0_3_1_2,bs0_3_1_3,bs0_3_1_4,bs0_3_1_5,bs0_3_1_6,bs0_3_1_7,bs0_3_1_8,bs0_3_1_9,bs0_3_1_10,bs0_3_1_11,bs0_3_1_12,bs0_3_1_13,bs0_3_1_14,bs0_3_1_15,bs0_3_1_16,bs0_3_1_17,bs0_3_1_18,bs0_3_1_19,bs0_3_1_20] +lemma bs0_3_1_mem (d : Fin 21) (r : Fin 8) : (bs0_3_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 3 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 3 tr0_3_1) d r = bs0_3_1 d r := by + fin_cases d + · exact bs0_3_1_0_calc r + · exact bs0_3_1_1_calc r + · exact bs0_3_1_2_calc r + · exact bs0_3_1_3_calc r + · exact bs0_3_1_4_calc r + · exact bs0_3_1_5_calc r + · exact bs0_3_1_6_calc r + · exact bs0_3_1_7_calc r + · exact bs0_3_1_8_calc r + · exact bs0_3_1_9_calc r + · exact bs0_3_1_10_calc r + · exact bs0_3_1_11_calc r + · exact bs0_3_1_12_calc r + · exact bs0_3_1_13_calc r + · exact bs0_3_1_14_calc r + · exact bs0_3_1_15_calc r + · exact bs0_3_1_16_calc r + · exact bs0_3_1_17_calc r + · exact bs0_3_1_18_calc r + · exact bs0_3_1_19_calc r + · exact bs0_3_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 3 1 tr0_3_1_mem) d r +lemma bs0_3_1_lower (d : Fin 21) : (2800/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 3 1) d) := by + have hc : ∀ d : Fin 21, (2800:ℤ)*scale < 1000000*(rowLowerBox (bs0_3_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_3_1_mem d)).1 + have hnum : (2800:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_3_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_3_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2800/1000000:ℝ) < ordinarySignValue 0 3 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 3 1) _ bs0_3_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs04.lean b/lean/OAI/Analysis/Triangular/Signs/Signs04.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3237d4ff278f857c4e941d299c267488ff69662 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs04.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows04 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_4_0_0 : Fin 8 → RI := ![⟨-1126100095393391792847814518521087500235653407971284349815,-1126100095393391792814214104313031554745351192502200774594⟩, + ⟨13414299502971684260605635227727422571904132839814142356410,13414299502971684260629799492025340378867054497022966185078⟩, + ⟨-47841433185506003411795842615279821646181381762012326612555,-47841433185506003411289729895697873590064785698748452642431⟩, + ⟨27295673554034197466320122145180993214479687281843705839915,27295673554034197466507396759322460063012889480624124166968⟩, + ⟨44797544380013551200537691361617037928085277998113863529856,44797544380013551201074117749805088932823490531910205600929⟩, + ⟨37462228884243262046242331055601618139917924644165491507368,37462228884243262046472561292933166177269503251781498742688⟩, + ⟨-84839093422376457483826236618592412250812810543075842358393,-84839093422376457483421486755820265896182261972719666631722⟩, + ⟨70742726550787769488373258936394084582280017776716964894606,70742726550787769488601570258613586708503525939832649718976⟩] +lemma bs0_4_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 0 r = bs0_4_0_0 r := by + revert r + decide +kernel +def bs0_4_0_1 : Fin 8 → RI := ![⟨-1151526850853891958585107383671556175890082658529009241017,-1151526850853891958550607161454331597802611251592475268217⟩, + ⟨13112981420379645463600130184545419694587930183379425887411,13112981420379645463624941559870433549858168617527988450215⟩, + ⟨-48751447232146195502923407829170147182068114526189906363703,-48751447232146195502403741577901847246742038369124036724319⟩, + ⟨27800835122221591961178573121348752297178175668699968913401,27800835122221591961370862887883894336115057612936462738346⟩, + ⟨45625844472724079669891507227794966876676379405933145270243,45625844472724079670442298937717059866791331820495695796974⟩, + ⟨38184371603573319809226758165583150139216074439324664788783,38184371603573319809463153892729705799506929145833016401692⟩, + ⟨-88388359535235510860722698327857822756209015270738368240940,-88388359535235510860307109397271584227720720735781838930112⟩, + ⟨72997236254475888196401269699943415230328130613240340186776,72997236254475888196635695124061557092241361088117487853829⟩] +lemma bs0_4_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 1 r = bs0_4_0_1 r := by + revert r + decide +kernel +def bs0_4_0_2 : Fin 8 → RI := ![⟨-1174180001620255912140585950750245066279142888673346405081,-1174180001620255912105143346265760835097613147369681833171⟩, + ⟨12777232185146350892812434849071728734769412374057037958249,12777232185146350892837923953368553271905122230875243731539⟩, + ⟨-49528570717823313896223140559761817333168234590349355022871,-49528570717823313895689279493833232351496915465669121082533⟩, + ⟨28229203169766669884552269692928726634153928300016705125092,28229203169766669884749811902913228431547967808441032246577⟩, + ⟨46328065385221861036853004614512307870526794736327888354925,46328065385221861037418841338846142384897429257744272455782⟩, + ⟨38802918148834814960492576056975620782311642350144758078467,38802918148834814960735428993006219693504581826424884710227⟩, + ⟨-91906176037112851980424407115658630340913435208796722154389,-91906176037112851979997466268666363320683770275367922724624⟩, + ⟨75139967400683793729200444661943226350325436977808716498995,75139967400683793729441273475618661908228779184378819344371⟩] +lemma bs0_4_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 2 r = bs0_4_0_2 r := by + revert r + decide +kernel +def bs0_4_0_3 : Fin 8 → RI := ![⟨-1193766690071034316696755368409249805133077205521866841997,-1193766690071034316660325240684026606585783270676171977496⟩, + ⟨12409546339977738147507031972014337112154885659458112867161,12409546339977738147533231269121270833068900832362498824363⟩, + ⟨-50161349716036670950564439390227489030313349254333510501160,-50161349716036670950015703565019096592269101187160373561768⟩, + ⟨28574340814767703722916093549226881014890594247028287654400,28574340814767703723119139799511326586709807530499550990163⟩, + ⟨46893639257675669799044956055949813741175010731164868059978,46893639257675669799626558464661566499034838264818530113875⟩, + ⟨39308826798268096201912606643015252226339172195115328701065,39308826798268096202162226094148007184782552061598668755577⟩, + ⟨-95374946630667874118736163495647538757697756338812854966340,-95374946630667874118297326965059271797751395661896487518348⟩, + ⟨77152683854848513015547130300560429375778405230460463101225,77152683854848513015794669232016095979166933114879317048206⟩] +lemma bs0_4_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 3 r = bs0_4_0_3 r := by + revert r + decide +kernel +def bs0_4_0_4 : Fin 8 → RI := ![⟨-1210002955449779157942528668798598160307288973475243315886,-1210002955449779157905063100460052727278382518846149725530⟩, + ⟨12012675995443136919768126557237353201303200028933363188167,12012675995443136919795070507683607670959151178717861355568⟩, + ⟨-50639078402427097702411825166117451625007094777674130892924,-50639078402427097701847492816962730320472165591294485369379⟩, + ⟨28830261824199385568928837202823828977069709060586135526122,28830261824199385569137654564742775728539914296908614267585⟩, + ⟨47312737193440616953997611589746683303835507569933325070996,47312737193440616954595744677665166754619669024264603665518⟩, + ⟨39693631511833570454344991108538681050195552227068047818198,39693631511833570454601705404894846719808518116656621063533⟩, + ⟨-98776455478002331760023148576329331835282094711522892450160,-98776455478002331759571839150511556335808565384464421928774⟩, + ⟨79017076321445976527172000677676619390769598143362753770824,79017076321445976527426575320478791464571432743418565188374⟩] +lemma bs0_4_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 4 r = bs0_4_0_4 r := by + revert r + decide +kernel +def bs0_4_0_5 : Fin 8 → RI := ![⟨-1222618081166190197666486329032615267918416433288611817580,-1222618081166190197627934393741969835928879794380399327142⟩, + ⟨11589591023412123392269656248673388021922497488122129930676,11589591023412123392297381476933354621219263415512319704079⟩, + ⟨-50951999795585485360759527323217714528562690771897656080772,-50951999795585485360178831362316486354418547759540336625696⟩, + ⟨28991545377023857261092494496972339787247949520768276519013,28991545377023857261307366812575725061389712649899849149750⟩, + ⟨47576457779142075127628105416467416240771436671226972549902,47576457779142075128243582216188440221777702404459223272106⟩, + ⟨39949599636243894271055383153356112983116745919928817632673,39949599636243894271319541242511171197584556076230344930374⟩, + ⟨-102092012891767856175114924476081403792163044834710307126453,-102092012891767856174650528697458933237417317950125639557276⟩, + ⟨80714961878993383661509830108304562663290524756290657710781,80714961878993383661771786501632059273611336270997531829268⟩] +lemma bs0_4_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 5 r = bs0_4_0_5 r := by + revert r + decide +kernel +def bs0_4_0_6 : Fin 8 → RI := ![⟨-1231359203068069077225824015482343896791369359701288186268,-1231359203068069077186131519960365147470963296629383228044⟩, + ⟨11143436599261676055982118556307758348309311668275192057820,11143436599261676056010664036327239749415795053965985532720⟩, + ⟨-51091508562119167239718808352721308872567562776798508086441,-51091508562119167239120932483352675398998366551681852303287⟩, + ⟨29053451425077837747201165143419889853908049891459574433079,29053451425077837747422394463313348245384827445286136889006⟩, + ⟨47677016678530958891000306137906796830555519953884826912254,47677016678530958891633991838319813227914945458854655226916⟩, + ⟨40069891421201713610048411797828168606613206010036448521314,40069891421201713610320385012452996908964918971975009372479⟩, + ⟨-105302617447859161413338424765346366105791515921012111920818,-105302617447859161412860289822849969057230881191224381084243⟩, + ⟨82228497234358551528468976802437855193485679741962364204528,82228497234358551528738683183990330453082671216450015989855⟩] +lemma bs0_4_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 6 r = bs0_4_0_6 r := by + revert r + decide +kernel +def bs0_4_0_7 : Fin 8 → RI := ![⟨-1235996129523948180619515762848374323149433224958493160505,-1235996129523948180578624960611045734472157374069538951677⟩, + ⟨10677489290694104200259227032131751488517464930849855739014,10677489290694104200288634293199437734767713264053090975439⟩, + ⟨-51050351993759532882134686664602790571382668650165352197292,-51050351993759532881518761069213484601748587682313874276405⟩, + ⟨29012034352137911918403173006218892786823747897574181850718,29012034352137911918631081185081037680893308701913475271027⟩, + ⟨47607933534510230491718933043832776546752927643924399596718,47607933534510230492371749560294880469981962255472693029189⟩, + ⟨40048718294909251149290954388690033000027769851302572886419,40048718294909251149571138408035777504713010547667150276723⟩, + ⟨-108389133005815730560470935638297359185365685126870966392173,-108389133005815730559978365919029862226596576303822680084352⟩, + ⟨83540402996676608498572646591460654666067936625145647781213,83540402996676608498850495342594950204348001787463981128468⟩] +lemma bs0_4_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 7 r = bs0_4_0_7 r := by + revert r + decide +kernel +def bs0_4_0_8 : Fin 8 → RI := ![⟨-1236326312122959681478386258910615420684340087132442780111,-1236326312122959681436235532425605666212726532650501913223⟩, + ⟨10195112899276704178716287056938135775183625580307002532132,10195112899276704178746600412267759626056984280447791844368⟩, + ⟨-50822824873326549964060398930096583467199331248878754174853,-50822824873326549963425495482721470343570511507959842374329⟩, + ⟨28864252418372072962234007416938051928633281916055429037795,28864252418372072962468937885046993193552294281653495879713⟩, + ⟨47364212059183478995566156144182152687291318683812544036592,47364212059183478996239087192850104577455364331930048185455⟩, + ⟨39881496537655170582796409487514086078751471935695295931880,39881496537655170583085226515277927384064396347599171137626⟩, + ⟨-111332478662829896727330988361816107979109743340093847244648,-111332478662829896726823241622316091182549155158751230934716⟩, + ⟨84634195754865317949477171852915522712826701265657896896814,84634195754865317949763581658359428684402677721438775138902⟩] +lemma bs0_4_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 8 r = bs0_4_0_8 r := by + revert r + decide +kernel +def bs0_4_0_9 : Fin 8 → RI := ![⟨-1232179892851956892221145638765843304116137664669234284037,-1232179892851956892177669146279482486731492453560182474559⟩, + ⟨9699715200015827716768382099746851535200749118024709223832,9699715200015827716799648900467101600191315143862543756427⟩, + ⟨-50404953630571222069950571238812106593795277225738297761275,-50404953630571222069295698185337395574723261394699359205660⟩, + ⟨28608070311858821262154180771710275709247990242472063894023,28608070311858821262396500503381906906386177663957509197830⟩, + ⟨46942508913714274078101150377717920791997894540097040327947,46942508913714274078795247113911069339238184919670393332962⟩, + ⟨39564992743237314862077442708517266762927023729825306404039,39564992743237314862375343892786076055035508325573412667874⟩, + ⟨-114113829213486164481644095080035037035081593880601969866776,-114113829213486164481120378191962231280632867862545104976781⟩, + ⟨85494424258793619828704187205539815604850131918216959889224,85494424258793619828999605453166058850306201137073436041262⟩] +lemma bs0_4_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 9 r = bs0_4_0_9 r := by + revert r + decide +kernel +def bs0_4_0_10 : Fin 8 → RI := ![⟨-1223424739952931370177374057635405559135009106895157949956,-1223424739952931370132501340394627393545358894631432662266⟩, + ⟨9194706596740142167136419830625551750065277276772543360638,9194706596740142167168690748252566341771307676611172195321⟩, + ⟨-49794664969652236455063308507769536830945788760115821034847,-49794664969652236454387404549637528236329043183874709332208⟩, + ⟨28242552023439321070841271130110365763027201701756856229160,28242552023439321071091372832878497873222499940414732272871⟩, + ⟨46341286798571932814128164597670062477419517756318904134857,46341286798571932814844551886522657053250790674668392912575⟩, + ⟨39097457286288549730365600530504162111369517511228423055440,39097457286288549730673068655072085880612712181828357910033⟩, + ⟨-116714823256167203947535703673948479167975737396576696106091,-116714823256167203946995167892687780289615173222459515870730⟩, + ⟨86106905573400870851808567696562096352318370710772556781080,86106905573400870852113473146274418425500605295026406938644⟩] +lemma bs0_4_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 10 r = bs0_4_0_10 r := by + revert r + decide +kernel +def bs0_4_0_11 : Fin 8 → RI := ![⟨-1209971370641234245929341647392971107369845274707797784342,-1209971370641234245882997192386423761993220413778314544431⟩, + ⟨8683461526528438804147434423856299968436029970133746813591,8683461526528438804180763764755247682664436690965099111982⟩, + ⟨-48991934048116246016290775639257254966239537318895238123213,-48991934048116246015592703347169985990290794895322581576927⟩, + ⟨27767941227760607076336368774072067623900545116433612020877,27767941227760607076594673325786058118914244580299892275876⟩, + ⟨45560947109981845560328291783682348861498257963974370702010,45560947109981845561068175180926732232137369181167828236305⟩, + ⟨38478741935846660326685952697496820962894986242285738768749,38478741935846660327003505177965786350075920552060911504616⟩, + ⟨-119117775695888045188610323535953477778993030918236476859746,-119117775695888045188052059233403828914583244162390262812286⟩, + ⟨86458956719125021851492373484626708480686051789686650813235,86458956719125021851807279239488569334130992678237237269889⟩] +lemma bs0_4_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 11 r = bs0_4_0_11 r := by + revert r + decide +kernel +def bs0_4_0_12 : Fin 8 → RI := ![⟨-1191777645003915184421818863017295736756231844019349005647,-1191777645003915184373921615671584588927273738944306266695⟩, + ⟨8169283221930041404816532340026817060653160404944608171734,8169283221930041404850978395864028278870747053150457818021⟩, + ⟨-47998907322043103975819352963214812183286113940484843971124,-47998907322043103975097891437027224714892049176005130497503⟩, + ⟨27185726402655040629006682894302518228949236160643302179976,27185726402655040629273642059154002351750362231253815167847⟩, + ⟨44603937587901002511335313891959351819482345393672121868683,44603937587901002512099987423669180312481039444610077676786⟩, + ⟨37710397786920926638739463826959848587219087191679423978796,37710397786920926639067656049747802229348606459137447577826⟩, + ⟨-121305891060194449998663773768502897435769624403549808308761,-121305891060194449998086804563026773357616944196963873239999⟩, + ⟨86539617052367839308040355561993280345739323045203904045054,86539617052367839308365812379406239037817660334221062888732⟩] +lemma bs0_4_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 12 r = bs0_4_0_12 r := by + revert r + decide +kernel +def bs0_4_0_13 : Fin 8 → RI := ![⟨-1168853102440074943627349823636313174664555858961840996004,-1168853102440074943577812644111553249091997964171189564683⟩, + ⟨7655372198149477123314551829063302093923999087853936728138,7655372198149477123350177267819840538694401676506838795285⟩, + ⟨-46819995360077468872108197818026590913813358945275262921171,-46819995360077468871362034497093423132793252614076431025114⟩, + ⟨26498688059732776600288659276378361563265330275418170775625,26498688059732776600564758735281772837914211982236890043179⟩, + ⟨43474830599450710950719323381532118617615776061149083857575,43474830599450710951510178224295512630531515255683102466912⟩, + ⟨36795749835091191331856186393930544223051093314852314003425,36795749835091191332195615441737556315756648560126206678984⟩, + ⟨-123263473787442244966767645132857558890171296745806075335011,-123263473787442244966170921339828955291934644995529619031079⟩, + ⟨86339856496582018705596048921898674648237543046482693257706,86339856496582018705932648908017598500840106994022188571805⟩] +lemma bs0_4_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 13 r = bs0_4_0_13 r := by + revert r + decide +kernel +def bs0_4_0_14 : Fin 8 → RI := ![⟨-1141262800924801954072437765049538550140961675230338176682,-1141262800924801954021166820864273907341346985014521697742⟩, + ⟨7144798599309963537655004098338229781900166701129345176422,7144798599309963537691876401113197336837355328374202014221⟩, + ⟨-45461931283008267811102575941264107637886577908498672745930,-45461931283008267810330297455735594762665854670943189168949⟩, + ⟨25710925697290474828590164931678564287762188490339564638214,25710925697290474828875927667525055517834142791862742020935⟩, + ⟨42180368080123052273537363419094851238852038718469337534570,42180368080123052274355897596681197897944249281116565181824⟩, + ⟨35739944803561024711678545491871013310383466686864770929437,35739944803561024712029854305416937731754001288920625383190⟩, + ⟨-124976131481722154737898856166995811448792180895041741115051,-124976131481722154737281247482373166369757765881688882140660⟩, + ⟨85852764725463098717369243089109196856552425449556508478599,85852764725463098717717623825892804297083361979957368057863⟩] +lemma bs0_4_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 14 r = bs0_4_0_14 r := by + revert r + decide +kernel +def bs0_4_0_15 : Fin 8 → RI := ![⟨-1109130511361698711793143037308559803921638445901140687635,-1109130511361698711740037123964789973349816408129931105722⟩, + ⟨6640478337495394376472449362911825628272094086407705597506,6640478337495394376510641312505518173998439223500639910522⟩, + ⟨-43933791012668405446260588697662070244430145936830499685832,-43933791012668405445460670635267370584520790810649989647301⟩, + ⟨24827862424943132720661369816133989285787782741059511997698,24827862424943132720957359900342554864821095801403451875513⟩, + ⟨40729469698447466350047101775080143699210612641277765255598,40729469698447466350894931004576138960506625641331461833095⟩, + ⟨34549969252226879625165851722734916906476897759862062141543,34549969252226879625529733755840745813810702450898732747987⟩, + ⟨-126430967069957306131551627311262632232105188663598792156851,-126430967069957306130911914627852595076194097829125030254299⟩, + ⟨85073716538217309976025748396246803548489055559329532856482,85073716538217309976386597557739995947458746139841509812684⟩] +lemma bs0_4_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 15 r = bs0_4_0_15 r := by + revert r + decide +kernel +def bs0_4_0_16 : Fin 8 → RI := ![⟨-1072641115670888345012457690065199820622512343025071135480,-1072641115670888344957407470111692936267535870088459933082⟩, + ⟨6145152808745649165987949205395606002069867223112054585102,6145152808745649166027539433549053167690293758020830999056⟩, + ⟨-42246972214800867253014952301179996902849937776489998538881,-42246972214800867252185747745471580054276786084094929596321⟩, + ⟨23856225646142183863802076940045249919131222016152666647095,23856225646142183864108903773704625129743896388427382502217⟩, + ⟨39133201516662402359429779319974592898331333373094778655090,39133201516662402360308649160042782814629708518449677961393⟩, + ⟨33234635553263037705662839903397492524524988307582854131178,33234635553263037706040044336928055285071717987055886381339⟩, + ⟨-127616755854785298776487895275025157793023480996847007124296,-127616755854785298775824761516255725057267746054552803712276⟩, + ⟨84000508961142160668507045220171303662576975138921677668583,84000508961142160668881105742990861533804858557045582423935⟩] +lemma bs0_4_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 16 r = bs0_4_0_16 r := by + revert r + decide +kernel +def bs0_4_0_17 : Fin 8 → RI := ![⟨-1032042059400625045274097112188831349508568723278420852723,-1032042059400625045216984261720388677799511153134345896576⟩, + ⟨5661371880859622613067007064964708767042909721083372002369,5661371880859622613108080666168099403491724344519532611109⟩, + ⟨-40415129687741974631433578595144395094741706888705125126004,-40415129687741974630573305269478594568636542499635409100412⟩, + ⟨22804002713471369158078727532829010505809712931497336684920,22804002713471369158397050603752749662450325838238549326342⟩, + ⟨37404703280923451358202722660047322781291079116465583176418,37404703280923451359114522136958044035352709038634491243121⟩, + ⟨31804533999997375665992269464488503433946106983363981760807,31804533999997375666383607054544576884784352913307228144886⟩, + ⟨-128524103637673935216593538622900576457709871898627972073716,-128524103637673935215905558461569701164309721152498287535285⟩, + ⟨82633466061423824098222970347210919052492525473443389503878,82633466061423824098611046229994287461541359977019369313650⟩] +lemma bs0_4_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 17 r = bs0_4_0_17 r := by + revert r + decide +kernel +def bs0_4_0_18 : Fin 8 → RI := ![⟨-987643718767453149589620452167725955972266208745694635253,-987643718767453149530316702066217525892662880824418894368⟩, + ⟨5191479818423882553891199164581360653145914963932694312520,5191479818423882553933848385580572657153785620930625950862⟩, + ⟨-38454065965763174152385505024309710839325059812810824912449,-38454065965763174151492230850354902083861459069097777026225⟩, + ⟨21680371080517808764841148843126855645796406893738334343388,21680371080517808765171683069573625176306020591865904031951⟩, + ⟨35559073471585437908617741897480084895450241982805017938995,35559073471585437909564518811577797124048190395867529805788⟩, + ⟨30271950110879160410175220638785516151478662247841791877026,30271950110879160410581570286125945056581694860759211476953⟩, + ⟨-129145582390842565952005312926205240127869517074879682866876,-129145582390842565951290941235291093949741327653812147326089⟩, + ⟨80975508062294686250592628503228752263392925158793319360237,80975508062294686250995591321301551076586140371571398756648⟩] +lemma bs0_4_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 18 r = bs0_4_0_18 r := by + revert r + decide +kernel +def bs0_4_0_19 : Fin 8 → RI := ![⟨-939818559003281989880293177492516593627510422895729605097,-939818559003281989818659234717533653854321862270810661380⟩, + ⟨4737603832017925174446247097296320689895453399973226837775,4737603832017925174490572112863648099648428104551422448947⟩, + ⟨-36381577046477109610428140376532195790157887812463058150549,-36381577046477109609499767226001192050531690266387509672664⟩, + ⟨20495603145975331468445647755439181867578629720781644571471,20495603145975331468789169498386173332032995989641308722436⟩, + ⟨33613212349922635017848338862008299442102569572476834777110,33613212349922635018832317009170705384111065980066143312788⟩, + ⟨28650747076243685868928293677333021276029941730108559148252,28650747076243685869350609818697577487473433683884384225373⟩, + ⟨-129475840378627020010427100082699994824287324368545275219737,-129475840378627020009684658941251510521648836268937470305573⟩, + ⟨79032182089811908273991569457537282078041091831098193578783,79032182089811908274410365692631202241600362631352696973876⟩] +lemma bs0_4_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 19 r = bs0_4_0_19 r := by + revert r + decide +kernel +def bs0_4_0_20 : Fin 8 → RI := ![⟨-888998986079233512222251008941924094145513437265647203746,-888998986079233512158135340804641035546723015611831706008⟩, + ⟨4301644998144315330347618772798920494716376208686122803862,4301644998144315330393728560041572081243057052302548969733⟩, + ⟨-34217254380119846725013157064970265584732736944782471237644,-34217254380119846724047402447510878989706964227417290705531⟩, + ⟨19260946698098778413304965830420784179839076183569028912678,19260946698098778413662319669511243002352867771961589960170⟩, + ⟨31585624416347267469802205355528759194649457951540695056641,31585624416347267470825803936081760757230753703069730621756⟩, + ⟨26956214243592808545277742443601945743364506598535975332012,26956214243592808545717063381874050855813304534606818059442⟩, + ⟨-129511684157656767544103294745943353717763924802363624896902,-129511684157656767543330958794469474222100547023239939126890⟩, + ⟨76811652739117649706795810120066760953557840236633609326668,76811652739117649707231469421052310932643857449851972159349⟩] +lemma bs0_4_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) 20 r = bs0_4_0_20 r := by + revert r + decide +kernel +def bs0_4_0 : Fin 21 → Fin 8 → RI := ![bs0_4_0_0,bs0_4_0_1,bs0_4_0_2,bs0_4_0_3,bs0_4_0_4,bs0_4_0_5,bs0_4_0_6,bs0_4_0_7,bs0_4_0_8,bs0_4_0_9,bs0_4_0_10,bs0_4_0_11,bs0_4_0_12,bs0_4_0_13,bs0_4_0_14,bs0_4_0_15,bs0_4_0_16,bs0_4_0_17,bs0_4_0_18,bs0_4_0_19,bs0_4_0_20] +lemma bs0_4_0_mem (d : Fin 21) (r : Fin 8) : (bs0_4_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 4 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_0) d r = bs0_4_0 d r := by + fin_cases d + · exact bs0_4_0_0_calc r + · exact bs0_4_0_1_calc r + · exact bs0_4_0_2_calc r + · exact bs0_4_0_3_calc r + · exact bs0_4_0_4_calc r + · exact bs0_4_0_5_calc r + · exact bs0_4_0_6_calc r + · exact bs0_4_0_7_calc r + · exact bs0_4_0_8_calc r + · exact bs0_4_0_9_calc r + · exact bs0_4_0_10_calc r + · exact bs0_4_0_11_calc r + · exact bs0_4_0_12_calc r + · exact bs0_4_0_13_calc r + · exact bs0_4_0_14_calc r + · exact bs0_4_0_15_calc r + · exact bs0_4_0_16_calc r + · exact bs0_4_0_17_calc r + · exact bs0_4_0_18_calc r + · exact bs0_4_0_19_calc r + · exact bs0_4_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 4 0 tr0_4_0_mem) d r +lemma bs0_4_0_lower (d : Fin 21) : (3900/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 4 0) d) := by + have hc : ∀ d : Fin 21, (3900:ℤ)*scale < 1000000*(rowLowerBox (bs0_4_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_4_0_mem d)).1 + have hnum : (3900:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_4_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_4_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (3900/1000000:ℝ) < ordinarySignValue 0 4 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 4 0) _ bs0_4_0_lower e he hτ +def bs0_4_1_0 : Fin 8 → RI := ![⟨-1126100095393391792847814518521087500235653407971284349817,-1126100095393391792814214104313031554745351192502200774594⟩, + ⟨13414299502971684260605635227727422571904132839814142356410,13414299502971684260629799492025340378867054497022966185078⟩, + ⟨-47841433185506003411795842615279821646181381762012326612555,-47841433185506003411289729895697873590064785698748452642431⟩, + ⟨27295673554034197466320122145180993214479687281843705839915,27295673554034197466507396759322460063012889480624124166968⟩, + ⟨44797544380013551200537691361617037928085277998113863529856,44797544380013551201074117749805088932823490531910205600929⟩, + ⟨37462228884243262046242331055601618139917924644165491507368,37462228884243262046472561292933166177269503251781498742688⟩, + ⟨-84839093422376457483826236618592412250812810543075842358393,-84839093422376457483421486755820265896182261972719666631722⟩, + ⟨70742726550787769488373258936394084582280017776716964894606,70742726550787769488601570258613586708503525939832649718976⟩] +lemma bs0_4_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 0 r = bs0_4_1_0 r := by + revert r + decide +kernel +def bs0_4_1_1 : Fin 8 → RI := ![⟨-1087959962202641544243224932809137435649763319335872609383,-1087959962202641544208274806587328541263707316665613437790⟩, + ⟨13866276626859742456112922125959782815417461659056608958703,13866276626859742456138057056798344694841358481675040888577⟩, + ⟨-46476412115545715275124825091973861161165502756448950489724,-46476412115545715274598382074862385286234686552482083015709⟩, + ⟨26537931201753105724024922952338841804826435083375197982847,26537931201753105724219720295070821438965156900339729556738⟩, + ⟨43555094240947758496485419579749081527133516065235628235788,43555094240947758497043393950538195509936838420181282990348⟩, + ⟨36379014805248175401756442155906808706561785803088215018862,36379014805248175401995920627960868178322278559042738820565⟩, + ⟨-79515194253087877418497802656415434753505122398482583910809,-79515194253087877418076794191922150138087954881225877807901⟩, + ⟨67360961995255591426322071638222129006673265054289707692326,67360961995255591426559554113289590736431356685047586780719⟩] +lemma bs0_4_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 1 r = bs0_4_1_1 r := by + revert r + decide +kernel +def bs0_4_1_2 : Fin 8 → RI := ![⟨-1043579218450084818229553176435682854216792934770338482885,-1043579218450084818193157546119416214816982573374623261480⟩, + ⟨14240783657304975160610280866535844873300581384301814775632,14240783657304975160636455354290658750691301325222139878499⟩, + ⟨-44812387283418511318341184481245926060379745175844779409938,-44812387283418511317792968279913572740579242365097089010723⟩, + ⟨25607403428026801695889026349174174717297027434942754686741,25607403428026801696091880325371957415161593962237854554427⟩, + ⟨42028965946403284812050431219094802228015210458152180966382,42028965946403284812631482881009803151361262642944304920985⟩, + ⟨35062709334598822880903682514386611221749837722248008548959,35062709334598822881153065589068512290835564136019767859887⟩, + ⟨-74120533459090444774481174620943100684640918477279938532750,-74120533459090444774042753645396821093198977036910889850353⟩, + ⟨63727695685392933720006003786563754492952197769963702785152,63727695685392933720253308311711147236920749063209633892761⟩] +lemma bs0_4_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 2 r = bs0_4_1_2 r := by + revert r + decide +kernel +def bs0_4_1_3 : Fin 8 → RI := ![⟨-993946258608113126565853035364336483587178185181745630677,-993946258608113126527907446208471811565606476107428120687⟩, + ⟨14529401512674842976580075935925305648347665968919796873022,14529401512674842976607365100862825004908099441976684898293⟩, + ⟨-42888015691064212330260831047942162897027674849328559397359,-42888015691064212329689268292643718811541778499623892677508⟩, + ⟨24525814709273615740059658352221575150672581647700576694151,24525814709273615740271151148818236827094885050902489679521⟩, + ⟨40254826023310516217755730678445548740591299130439765160882,40254826023310516218361527238359871050654370446398904836077⟩, + ⟨33543828283234027614863218817240640461851774059504589928082,33543828283234027615123222219083848734480274595310329889974⟩, + ⟨-68714498543908707245935255128865903442675249166805234151279,-68714498543908707245478163382666403595910888252003118580914⟩, + ⟨59904474575349830484804827155701178514500424932602429278670,59904474575349830485062663490064930121887372359189294768973⟩] +lemma bs0_4_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 3 r = bs0_4_1_3 r := by + revert r + decide +kernel +def bs0_4_1_4 : Fin 8 → RI := ![⟨-940094517528187176199868205766992480419978803972860394011,-940094517528187176160258478838143472640170727457229254162⟩, + ⟨14725015048645228976404515727200724377293892058837207337843,14725015048645228976433001682889727298073066882242198151251⟩, + ⟨-40745741607514077405024981510195482353965004214454194903882,-40745741607514077404428352358724733591402167479875534339596⟩, + ⟨23317170931848752470990093520843535591486015335864159339903,23317170931848752471210861523318374626059786701494190263908⟩, + ⟨38272081999730667314905927217851052567082436813638355394205,38272081999730667315538291528080918852334233806248889239956⟩, + ⟨31855801850800407468427396563145609213409157171574628286340,31855801850800407468698802646879178278724486254394399097613⟩, + ⟨-63353340586994166145355873558312991810552092079590059153872,-63353340586994166144878735644498823880031976895789970338049⟩, + ⟨55952475241910765022304596912472204525743033512471439097141,55952475241910765022573740890037158570870084306637686910752⟩] +lemma bs0_4_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 4 r = bs0_4_1_4 r := by + revert r + decide +kernel +def bs0_4_1_5 : Fin 8 → RI := ![⟨-883069458122755987294217672909243470045729571480938252963,-883069458122755987252818669791339247420612580559080157883⟩, + ⟨14822115339289325619299636039451754587631846587498338257200,14822115339289325619329408781144692392166683122456452650979⟩, + ⟨-38430272193375941964940646729706806986441126409104616661518,-38430272193375941964317066260535801396576025323875795406077⟩, + ⟨22006887909669905636401916698156050943627118800771617247852,22006887909669905636632657375547613244635224344902458114909⟩, + ⟨36122450830468474791196737864066768881495630340981834158837,36122450830468474791857667743691597381268117372698246534429⟩, + ⟨30033777053064171494326958930713059348898077230822831876398,30033777053064171494610625145506458522703887723735289807604⟩, + ⟨-58089067901877579983867284990527243334838194440087589691937,-58089067901877579983368593494445657508151517449205943305580⟩, + ⟨51930988665570457695041564227135413733400497803786269119542,51930988665570457695322866150432144824784587310442194946612⟩] +lemma bs0_4_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 5 r = bs0_4_1_5 r := by + revert r + decide +kernel +def bs0_4_1_6 : Fin 8 → RI := ![⟨-823898531667781898117841797538830665765093529870274518068,-823898531667781898074515982520439617673897436502702983527⟩, + ⟨14817071759003236279717087884751841906846280043483499392786,14817071759003236279748246323410351155217742233584766379930⟩, + ⟨-35987076638506319518459339747359647426519285396400895562067,-35987076638506319517806736302307942511805162766107841395493⟩, + ⟨20620926710886230433975857067264483395453865495001482738657,20620926710886230434217336985935292531979944313171299851170⟩, + ⟨33848539553611733667831417956204278794246396535054457474093,33848539553611733668523109145565293316887643134629325565671⟩, + ⟨28113440780086115663257164252923510395905562788600257583334,28113440780086115663554032994287619238152797046459315358165⟩, + ⟨-52968526746445772924951696179797272218138092813449493610209,-52968526746445772924429794349243829192457119374605113973908⟩, + ⟨47896061283090761637658109179606945459465334016715376658633,47896061283090761637952503589499449508943836133009069450012⟩] +lemma bs0_4_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 6 r = bs0_4_1_6 r := by + revert r + decide +kernel +def bs0_4_1_7 : Fin 8 → RI := ![⟨-763564950672829511675450521973839786905992889509610985092,-763564950672829511630046286834078336991492419460181019030⟩, + ⟨14708353399040864597425702359731582083689181714524210893814,14708353399040864597458355526782943547271140044870752277661⟩, + ⟨-33460975315039172117084973080286163560592660736228271686831,-33460975315039172116401063031285470925679923230422307210228⟩, + ⟨19184975084377278675558596223491671597457902969547097996528,19184975084377278675811660384068862744194961011075272828979⟩, + ⟨31492502516806143542551855631953861775541983306469732577839,31492502516806143543276728537236447175759089089103449233263⟩, + ⟨26129915630308284155778111623672784211087009237484829361741,26129915630308284156089221712036793291279133236225572904580⟩, + ⟨-48032694951354343378281517563590649694472758032699800763114,-48032694951354343377734579129216524046405270347885258111090⟩, + ⟨43899338438437960925338075573897573487077069046276317324111,43899338438437960925646592632488898193845323652635951590547⟩] +lemma bs0_4_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 7 r = bs0_4_1_7 r := by + revert r + decide +kernel +def bs0_4_1_8 : Fin 8 → RI := ![⟨-702985805865315865458323993554634644639439457533731125530,-702985805865315865410673702720747825871158705653163196186⟩, + ⟨14496679564394120118105165363782336764624619400720427364969,14496679564394120118139433816975027479104454883912588198363⟩, + ⟨-30894875427866110142812374587478973355817199103588424281798,-30894875427866110142094632891382176388897864968892305757631⟩, + ⟨17723708812940175667081689415589482754904040250778207141164,17723708812940175667347272148436441098256517838488873785637⟩, + ⟨29094830425370280352047094238618070255840774114072273168071,29094830425370280352807825140665232727887487834482066471105⟩, + ⟨24116772739682924988225101270802068872305936760230339686203,24116772739682924988551601346105346460823312793682712535370⟩, + ⟨-43316202537527482787090607147426657047826492487729534361126,-43316202537527482786516612774749149988473692750954022149624⟩, + ⟨39987143126562863033687413246095635639121077031131922180344,39987143126562863034011192019678936731211094864977472055553⟩] +lemma bs0_4_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 8 r = bs0_4_1_8 r := by + revert r + decide +kernel +def bs0_4_1_9 : Fin 8 → RI := ![⟨-642994785543618584575227525386742381679540432817031414281,-642994785543618584525145230385882605565299234496917978823⟩, + ⟨14185081963952882026113572987409462674526111870814800194770,14185081963952882026149590454500966435956541617462084654500⟩, + ⟨-28328696734682543769914974974373095384847898859743887495088,-28328696734682543769160600746443342196437954334835354171714⟩, + ⟨16260159523608337840733368121767939347858746615394777698977,16260159523608337841012505825671355288057088772304666231508⟩, + ⟨26693314437239416045422681164344547204742639256153007627606,26693314437239416046222238707146924454050330781126932332236⟩, + ⟨22105195584126656942380071262210675602708753227878508006086,22105195584126656942723235444492753178951644654325756714516⟩, + ⟨-38847081350606808362281908000740174976198802287462197397572,-38847081350606808361678617758478294743865084206968495859332⟩, + ⟨36199808447546209470540122218343230053686332782580253962929,36199808447546209470880426207464377517275614493489223333022⟩] +lemma bs0_4_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 9 r = bs0_4_1_9 r := by + revert r + decide +kernel +def bs0_4_1_10 : Fin 8 → RI := ![⟨-584329529066859554136805791351612738985052720723560673821,-584329529066859554084084552741158143769858587754465606108⟩, + ⟨13778866863621397225441741128991921710907408956251434098316,13778866863621397225479656433724497347993167174636833289611⟩, + ⟨-25798516339369762877512257038534161136558250847039888104235,-25798516339369762876718133213503752064421026637421736825310⟩, + ⟨14815207074215843271910297944742387373031030629799728047764,14815207074215843272204144013349279688348242963506052175676⟩, + ⟨24322214736385916240647504235856868725437404701144935024429,24322214736385916241489192181598508693268651706948573269567⟩, + ⟨20123317166366385214901091235798224310046686597945602670453,20123317166366385215262337475348161282451822157995527574482⟩, + ⟨-34646734379336367459558938260661253816740000738593735694739,-34646734379336367458923859360766277874761572601470648946922⟩, + ⟨32571267667037841117004952179986332005676572417463807277038,32571267667037841117363187516649041476044541567875737460901⟩] +lemma bs0_4_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 10 r = bs0_4_1_10 r := by + revert r + decide +kernel +def bs0_4_1_11 : Fin 8 → RI := ![⟨-527623465980127040623604468942068823369820207412498491285,-527623465980127040568013210789747198025441413442397740585⟩, + ⟨13285473411802910194380048054724089214965378280953298567317,13285473411802910194420027378974669571620667730782576916885⟩, + ⟨-23335946611317601985844340840806965918395819537169675847424,-23335946611317601985006986792877527656110302931883633304953⟩, + ⟨13407205873921411649157625516164957251167121669263205972256,13407205873921411649467467869790997050204116395833163994583⟩, + ⟨22011648696353671185719671687113393960994351402031544478380,22011648696353671186607179134001120891052469854571568365379⟩, + ⟨18195741139120309084567935878688502361670204453498246700818,18195741139120309084948847509165760976425865556200220792806⟩, + ⟨-30730105564007209252311781337997925381567519500290087820225,-30730105564007209251642130244789036301856590367043532740444⟩, + ⟨29128892340633784811009259625588206919002872944832853173774,29128892340633784811386996446734655687879936799592492424920⟩] +lemma bs0_4_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 11 r = bs0_4_1_11 r := by + revert r + decide +kernel +def bs0_4_1_12 : Fin 8 → RI := ![⟨-473401850547337053809891163083252364087154817728280910749,-473401850547337053751170968949793033323766942677448362630⟩, + ⟨12714233409854527409978261985441150065349041091602165557373,12714233409854527410020491533023447786010130674017305595751⟩, + ⟨-20967746134090500114736194617550778143589851896699573614812,-20967746134090500113851710367917544492071005706963894483639⟩, + ⟨12051746109847616791540768925361168584131298281017280481711,12051746109847616791868050655629637708118385108840761499542⟩, + ⟨19787200068028320229273777956620986640649613464795325201140,19787200068028320230211238473055695769582502352322823072346⟩, + ⟨16343246228579634966258528951978227017280309674334770694693,16343246228579634966660880070361545176075082055739494707558⟩, + ⟨-27106023154886883054276054564995841489322639978808658538412,-27106023154886883053568712376647300958404883193632069454830⟩, + ⟨25893557534037004777151388453460800469381931014029970492275,25893557534037004777550386069384516031246022187225053065361⟩] +lemma bs0_4_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 12 r = bs0_4_1_12 r := by + revert r + decide +kernel +def bs0_4_1_13 : Fin 8 → RI := ![⟨-422081589990723995157885855916979748985385036391901635754,-422081589990723995095745595342460575324532701811554460174⟩, + ⟨12076046437864952183516006778342457708122728511263616758474,12076046437864952183560695920287827430710699966179482508907⟩, + ⟨-18715651223221717558546623283339949940738154518792202272823,-18715651223221717557610623623298820328363060666903766200866⟩, + ⟨10761543455029127561923240402564068288414775386377233940101,10761543455029127562269584148536385587657328618288690564126⟩, + ⟨17669738574606586170359395289261277065030149956291499240862,17669738574606586171351456736433570348496573023773152256506⟩, + ⟨14582663598566172059863409099450624415950724104992564807908,14582663598566172060289194533379549292446904072581395021820⟩, + ⟨-23777684404258240936817066975228868496031308715732011808231,-23777684404258240936068526740519191470932771274115255301792⟩, + ⟨22879904397680224277383974307357962491567527678918674652452,22879904397680224277806210919274515552926580223895956562503⟩] +lemma bs0_4_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 13 r = bs0_4_1_13 r := by + revert r + decide +kernel +def bs0_4_1_14 : Fin 8 → RI := ![⟨-373974378991850196041775402141112729638825877798896695231,-373974378991850195975886551749264417911917519761979452404⟩, + ⟨11382991022098528363145479989225382703345969580218258361108,11382991022098528363192864988266796862386115103714699821562⟩, + ⟨-16596405677818981839387493926142201133652112298374433325051,-16596405677818981838395030408974441794104487277176019525020⟩, + ⟨9546444869179347928012290511402922290720667658931146674787,9546444869179347928379527324570840193934550166115792471813⟩, + ⟨15675429585671956150420945035438470770144368556438495469549,15675429585671956151472852247747355397304123460070986920882⟩, + ⟨12926909091421997397852417636543060495547401204006622305551,12926909091421997398303888430142026824276359623211335838396⟩, + ⟨-20743246652009328833087093296174863262608653596448806259690,-20743246652009328832293397629621335755118696454808230945817⟩, + ⟨20096764544622101248319850030265196378611103323552747431997,20096764544622101248767557920370162762571929345896921519770⟩] +lemma bs0_4_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 14 r = bs0_4_1_14 r := by + revert r + decide +kernel +def bs0_4_1_15 : Fin 8 → RI := ![⟨-329292592535721855490300238084400986823648856551592010543,-329292592535721855420290730105524379861027521547966886917⟩, + ⟨10647896607345994323417883270899234475504813043036549718547,10647896607345994323468231705402400600297251104007616063390⟩, + ⟨-14621959422463979753920690872275763465857408101009494121089,-14621959422463979752866159155437978601631334616900495994590⟩, + ⟨8413533819829063392942033249791902606864164402859758671517,8413533819829063393332236879830383900700304653589804180705⟩, + ⟨13815906567293282348307082792758562723478719840283020525743,13815906567293282349424775785369725488506249647438402203121⟩, + ⟨11385146881044269115655021578865256012550117635346936279131,11385146881044269116134727142701111030019944192423533555397⟩, + ⟨-17996489532257438088392145305301891270239601261713713292925,-17996489532257438087548812286600749243649740246910691266347⟩, + ⟨17547707826300318330893535038285165702678820719703315257709,17547707826300318331369242368401522958279843945185391142065⟩] +lemma bs0_4_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 15 r = bs0_4_1_15 r := by + revert r + decide +kernel +def bs0_4_1_16 : Fin 8 → RI := ![⟨-288157355169856261683996719883800909513885731032559455170,-288157355169856261609443611105144513808743206296489793255⟩, + ⟨9883902345787950452519789416242273295871883627617748717852,9883902345787950452573405452444823127307726140515695150147⟩, + ⟨-12799802610707599657888003502359071949426631712821106576608,-12799802610707599656765032922134282466199139728649090905644⟩, + ⟨7367315696094155752308461668673844717667672307418984999132,7367315696094155752723989423636478299526163546480590293299⟩, + ⟨12098574844346421495615836873047875087984189521976147982113,12098574844346421496806067881179265409983607050377836757854⟩, + ⟨9963057999755450199912537616315275789818851666999659730295,9963057999755450200423375959792861180555187741825034871852⟩, + ⟨-15527514740627652505484105430541696314941306962305806741901,-15527514740627652504586040294903020006024226868743491276994⟩, + ⟨15231674930645391832268433314400473365892926327915514137090,15231674930645391832775013939698800306599420295325782570702⟩] +lemma bs0_4_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 16 r = bs0_4_1_16 r := by + revert r + decide +kernel +def bs0_4_1_17 : Fin 8 → RI := ![⟨-250608198101830249806603734012893550651230225998678403463,-250608198101830249727024437019652720505915063896329547724⟩, + ⟨9104027438256878681889355472867437397053699460182294700473,9104027438256878681946586171069339361256288663651035000922⟩, + ⟨-11133400386222086162433580873512798627455919649940870021531,-11133400386222086161234902363886708631120696250711853136296⟩, + ⟨6409963244247080247723871783532938632207749771199648383555,6409963244247080248167413403236351656533366715528487581718⟩, + ⟨10527013676100999109040081052583686951028307917873245610720,10527013676100999110310554523640585835541243117797917186274⟩, + ⟨8663186264148908814584790925390382467996399250406707287936,8663186264148908815130068740341327319480077512740753336998⟩, + ⟨-13323453099798230051553473013294760344863958180085959641942,-13323453099798230050594862523161314287735102188297892629092⟩, + ⟨13143658287333445287828314686254664000500555618341417290403,13143658287333445288369047738059130337309791758545957697869⟩] +lemma bs0_4_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 17 r = bs0_4_1_17 r := by + revert r + decide +kernel +def bs0_4_1_18 : Fin 8 → RI := ![⟨-216613735058195677392408511288629472723985229948718029849,-216613735058195677307250263236143772067160224354243799830⟩, + ⟨8320774679759232212939449597907323831374412390096522007921,8320774679759232213000692486168346073856975289094799107971⟩, + ⟨-9622694422713630094702466221657403878109374907283013989069,-9622694422713630093419753685668399906283894064052644906625⟩, + ⟨5541602286309196739546151978683785799528630835218267040193,5541602286309196740020788331353851802624148556954312548670⟩, + ⟨9101444351925958793376076848934442940951354571225089427749,9101444351925958794735617572237388211125298557897216585405⟩, + ⟨7485334985633861613030639070153579918339844490007738117749,7485334985633861613614143890871807122539226696745674629764⟩, + ⟨-11369153043812310400820460052623905574845504896025076832138,-11369153043812310399794645638728939111051563325422282433872⟩, + ⟨11275398504128906910420403890839357306557854708808836698071,11275398504128906910999045335226030170698769843210101700295⟩] +lemma bs0_4_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 18 r = bs0_4_1_18 r := by + revert r + decide +kernel +def bs0_4_1_19 : Fin 8 → RI := ![⟨-186082830435837572079017902385898666893997900675798853820,-186082830435837571987645058357452650486127128295196834367⟩, + ⟨7545784311820217890272153833789467250013989415729400335676,7545784311820217890337866046109985054381857078636033788722⟩, + ⟨-8264640076283035938941602100468444797306027304779446498291,-8264640076283035937565281013958658740249595015953616166618⟩, + ⟨4760619488905127673282851163199309715403404805568959111617,4760619488905127673792125066964679645580707078261098741788⟩, + ⟨7819234471732636572629298572315735338881947907792391117420,7819234471732636574088054539045812120740303119842778022839⟩, + ⟨6426990093400524311554390497097266315321946784173227301244,6426990093400524312180477766326885479987844443584370161246⟩, + ⟨-9647829625811987981464959718499363227360670261977436513811,-9647829625811987980364284415929676289832684987490180895469⟩, + ⟨9616068406787197165853065178461509075502814385582732485265,9616068406787197166473934156571370879106753111084166517532⟩] +lemma bs0_4_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 19 r = bs0_4_1_19 r := by + revert r + decide +kernel +def bs0_4_1_20 : Fin 8 → RI := ![⟨-158875803979057455199075095272749511103431733976967021967,-158875803979057455100753714137286900327260521459783563378⟩, + ⟨6789549901488072411773680344453902512203110405663146441901,6789549901488072411844389706096809911657153950326264922692⟩, + ⟨-7053752003213250869052907207568645117465136504242965313664,-7053752003213250867571922440692747384668190327001016874251⟩, + ⟨4063976237602789204334598558686279064495947199265021485126,4063976237602789204882600693541677619834034032112811783749⟩, + ⟨6675412317713499401666228293721033178580441746675369390018,6675412317713499403235916781763682538538759480494423133050⟩, + ⟨5483748519997805702454071275586363447619427244658158641021,5483748519997805703127769962316265481889740180862870495422⟩, + ⟨-8141658320529410704843428730192219952853817188240140748245,-8141658320529410703659051499963790764178120990535043561300⟩, + ⟨8152922197029953780437627301884787399811416025814020428828,8152922197029953781105710867418423251160287197846864619965⟩] +lemma bs0_4_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) 20 r = bs0_4_1_20 r := by + revert r + decide +kernel +def bs0_4_1 : Fin 21 → Fin 8 → RI := ![bs0_4_1_0,bs0_4_1_1,bs0_4_1_2,bs0_4_1_3,bs0_4_1_4,bs0_4_1_5,bs0_4_1_6,bs0_4_1_7,bs0_4_1_8,bs0_4_1_9,bs0_4_1_10,bs0_4_1_11,bs0_4_1_12,bs0_4_1_13,bs0_4_1_14,bs0_4_1_15,bs0_4_1_16,bs0_4_1_17,bs0_4_1_18,bs0_4_1_19,bs0_4_1_20] +lemma bs0_4_1_mem (d : Fin 21) (r : Fin 8) : (bs0_4_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 4 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 4 tr0_4_1) d r = bs0_4_1 d r := by + fin_cases d + · exact bs0_4_1_0_calc r + · exact bs0_4_1_1_calc r + · exact bs0_4_1_2_calc r + · exact bs0_4_1_3_calc r + · exact bs0_4_1_4_calc r + · exact bs0_4_1_5_calc r + · exact bs0_4_1_6_calc r + · exact bs0_4_1_7_calc r + · exact bs0_4_1_8_calc r + · exact bs0_4_1_9_calc r + · exact bs0_4_1_10_calc r + · exact bs0_4_1_11_calc r + · exact bs0_4_1_12_calc r + · exact bs0_4_1_13_calc r + · exact bs0_4_1_14_calc r + · exact bs0_4_1_15_calc r + · exact bs0_4_1_16_calc r + · exact bs0_4_1_17_calc r + · exact bs0_4_1_18_calc r + · exact bs0_4_1_19_calc r + · exact bs0_4_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 4 1 tr0_4_1_mem) d r +lemma bs0_4_1_lower (d : Fin 21) : (3900/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 4 1) d) := by + have hc : ∀ d : Fin 21, (3900:ℤ)*scale < 1000000*(rowLowerBox (bs0_4_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_4_1_mem d)).1 + have hnum : (3900:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_4_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_4_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (3900/1000000:ℝ) < ordinarySignValue 0 4 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 4 1) _ bs0_4_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs05.lean b/lean/OAI/Analysis/Triangular/Signs/Signs05.lean new file mode 100644 index 0000000000000000000000000000000000000000..29a08eb74d0d8766b0962b53cd928a1635382d49 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs05.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows05 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_5_0_0 : Fin 8 → RI := ![⟨-48493744738479334835193394622433269929361140598964193475,-48493744738479334830472686839441545025926438723957673877⟩, + ⟨6581533089339978584580372721824974209865908136211308835996,6581533089339978584583767692786784785046734744723583704288⟩, + ⟨-2073723659479442102323870433797633360824380334278213420559,-2073723659479442102252763862324682354285103463465106426799⟩, + ⟨1196355380615890843178915466706458063391764806206831570586,1196355380615890843205226711653156839646989114713372349989⟩, + ⟨1969226453678954602951334536906384654945472404058153327599,1969226453678954603026700043118803102831470225854148884340⟩, + ⟨1602459147203947836687331432060538868088957823687171072192,1602459147203947836719677749773649258655650640130827967820⟩, + ⟨-1987458510310430438353627870062111018572548546861301663160,-1987458510310430438296762326217515977455602631829460845530⟩, + ⟨2149169242876001125025947278860499098962381249632872576007,2149169242876001125058023997589929285085100879674428452467⟩] +lemma bs0_5_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 0 r = bs0_5_0_0 r := by + revert r + decide +kernel +def bs0_5_0_1 : Fin 8 → RI := ![⟨-56385069554091126460442482045245839410667034137089113290,-56385069554091126455523979834767934691186720230707094063⟩, + ⟨7279817481825030786406624170607478550501062021848090533269,7279817481825030786410161388530663672640314273716566651743⟩, + ⟨-2417308215877670600559788822159821325330489583614324705129,-2417308215877670600485702933973746974632215080297474239494⟩, + ⟨1394689780616753331910755197418137494476116746048108883118,1394689780616753331938168865533282464115227455913591133445⟩, + ⟨2295411672931937320179332825203570494625256712803601826360,2295411672931937320257856094582230443423789524951662307225⟩, + ⟨1868373973280561086984856045906473662485222291090864125439,1868373973280561087018557652209710270052404380507926482184⟩, + ⟨-2329045614251680948250320850214578051918058033085734097845,-2329045614251680948191072678975104569776066742972811311968⟩, + ⟨2513004613203585124874500330416235077178690524700009147499,2513004613203585124907921041722204832498737851112649260641⟩] +lemma bs0_5_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 1 r = bs0_5_0_1 r := by + revert r + decide +kernel +def bs0_5_0_2 : Fin 8 → RI := ![⟨-64856037452324308221327160533225158270229661573825375951,-64856037452324308216196295084491904780177122092047383076⟩, + ⟨7950900990850560661142806348472103507543766965214268789212,7950900990850560661146496290745176643916669906827339368893⟩, + ⟨-2787612586879349854207140427568461969824737033318541141721,-2787612586879349854129855777147119589139430632963478423898⟩, + ⟨1608460186449259040917415165994779637780575874419919458844,1608460186449259040946012457718318662564377258029837541335⟩, + ⟨2646916463460364647330630751226787456970469834252050166300,2646916463460364647412544373003927755349168614312105894609⟩, + ⟨2155087785725198632387769348984003457543432616429142506166,2155087785725198632422926069455192285255156485657141331699⟩, + ⟨-2701118767875075783176061149660961816303313824664305889098,-2701118767875075783114254855447256178884221539282840404698⟩, + ⟨2907599841689978513825311145177344577822607144689663628012,2907599841689978513860174842614780658335269413806563206937⟩] +lemma bs0_5_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 2 r = bs0_5_0_2 r := by + revert r + decide +kernel +def bs0_5_0_3 : Fin 8 → RI := ![⟨-73825407845839795576828817637388303464082574984138383527,-73825407845839795571469647561882222064380972484149497725⟩, + ⟨8579396585593665411012985189945734422246969266707811001368,8579396585593665411016839321068000740683734033025284917443⟩, + ⟨-3181311390422633338940672438093851909721503309470776118805,-3181311390422633338859948905198028168756393232486119520780⟩, + ⟨1835742310591378041272197569673198554482426589316665744215,1835742310591378041302067335617685310997841504739848660167⟩, + ⟨3020565902093308841442550116684390477767088591061230119141,3020565902093308841528108593123435916276776037304218896306⟩, + ⟨2460053029681162271318688520322612908711048551410906595942,2460053029681162271355409585450458912186712842181163745491⟩, + ⟨-3101372743349443447948302403695513527578658392777604105441,-3101372743349443447883745956886361965023578086378191395784⟩, + ⟨3330057212597640626179999629912076702830499460861064506230,3330057212597640626216414633559042283357851214330648738896⟩] +lemma bs0_5_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 3 r = bs0_5_0_3 r := by + revert r + decide +kernel +def bs0_5_0_4 : Fin 8 → RI := ![⟨-83189721959025924332578217650090188224659519479855106977,-83189721959025924326973242942773696280639785373143589812⟩, + ⟨9150833757806026592109718919641718222801989213238508220603,9150833757806026592113749825015971970914541714479745880081⟩, + ⟨-3594061189674980312731564964413509038541153712289718819123,-3594061189674980312647138951842039740164893722273200598942⟩, + ⟨2074021728587284012600942167361350786904106384541078721161,2074021728587284012632181945214019990599097724454584421886⟩, + ⟨3412216444729419553639381216483818182387887369485917032828,3412216444729419553728863932964981727916538183952282646567⟩, + ⟨2779933166840650644937091300528403529537918891893253972050,2779933166840650644975496620451259335547362594496074761297⟩, + ⟨-3526514760417100347778429155399666533158927608502820851210,-3526514760417100347710911751312975248082553913943538292698⟩, + ⟨3776412721177565522377792577768428360224677157727111478458,3776412721177565522415877798340240810507589889258873060777⟩] +lemma bs0_5_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 4 r = bs0_5_0_4 r := by + revert r + decide +kernel +def bs0_5_0_5 : Fin 8 → RI := ![⟨-92823834203399927720527587291337931105984658050011713127,-92823834203399927714657539573009272324594349109831795958⟩, + ⟨9652140566368867450788020487655411799534075200285405187653,9652140566368867450792242024438432280007597066345062199298⟩, + ⟨-4020507622292321532396998634185821519665913579454463023758,-4020507622292321532308579908260620923641735641963758988012⟩, + ⟨2320198033176701807000091161611724881260582895298982634029,2320198033176701807032808345235612119198619573485973171412⟩, + ⟨3816763410650305519140279023781767793790954905481627030347,3816763410650305519233993597556466789866326925286506952366⟩, + ⟨3110606737596798784635754392279485933892626854820205317569,3110606737596798784675975994045974290457207190207402722733⟩, + ⟨-3972228029356958264080735362029151452769427630026434593259,-3972228029356958264010024894185904428694502090370191397313⟩, + ⟨4241615256074854238995525230990937579097426160635248270290,4241615256074854239035411595121558046846813606056022905495⟩] +lemma bs0_5_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 5 r = bs0_5_0_5 r := by + revert r + decide +kernel +def bs0_5_0_6 : Fin 8 → RI := ![⟨-102582377886670178338385535162485747948042634705706399795,-102582377886670178332229139886093523634737713648405072475⟩, + ⟨10072075549009436027199447135446454174020935944910781330818,10072075549009436027203874603562060125608404513114917486017⟩, + ⟨-4454334708089139458233076486656976214039080705959769900251,-4454334708089139458140344595409785331750696404071297409383⟩, + ⟨2570613542664531534098080570193138834650769189109772711044,2570613542664531534132393734989334753826075108973328072641⟩, + ⟨4228188794720102121305876762336732076566934029703253125745,4228188794720102121404162838873880698002905503883186661143⟩, + ⟨3447203918634494501033467056890349708748300664626588610374,3447203918634494501075650713823108147166945480631613324924⟩, + ⟨-4433168657719009143796789163589824419352511875879824399321,-4433168657719009143722629359256493193143970624360173554634⟩, + ⟨4719545117106106835091488182100765352949287262521271835256,4719545117106106835133320248126175611660063982850994779070⟩] +lemma bs0_5_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 6 r = bs0_5_0_6 r := by + revert r + decide +kernel +def bs0_5_0_7 : Fin 8 → RI := ![⟨-112302233866143534496168770921531992852885978821005597149,-112302233866143534489702476408335142340124192879979841325⟩, + ⟨10401588809199394516123913888425623459226855541432936139534,10401588809199394516128564225432563751334760153268013051827⟩, + ⟨-4888360634705944267204862849970421374523460984379242753817,-4888360634705944267107463041697705629682139822721137662554⟩, + ⟨2821109069523419649549373071127872299660156460119401584668,2821109069523419649585413484274304238934713848298901044426⟩, + ⟨4639653481884756078698511862383640350611509073884027171766,4639653481884756078801745441273289348902458751572751383120⟩, + ⟨3784178981472571312209569299423772226610288740556679224331,3784178981472571312253876387765293772602403073891779176171⟩, + ⟨-4903001533579605398597175267130598778711989466626855928529,-4903001533579605398519282423294588250532093543069955044291⟩, + ⟨5203077391678549128995244427065437454279182530698246703945,5203077391678549129039182226194769247554722309924389174674⟩] +lemma bs0_5_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 7 r = bs0_5_0_7 r := by + revert r + decide +kernel +def bs0_5_0_8 : Fin 8 → RI := ![⟨-121806022367637338412553909918640240932335877150088428211,-121806022367637338405751577103960660081135702989632650152⟩, + ⟨10634095325676620282721031449355718530976685574259770518140,10634095325676620282725923453571874864782939311320990837743⟩, + ⟨-5314682278532699027514691633533300368814927600171534122724,-5314682278532699027412230183531808203194565342928975750678⟩, + ⟨3067108060061904796286932178080014086011175452501994847354,3067108060061904796324845527758477040818764585335018825876⟩, + ⟨5043635972156634993672546569887310115371324200124673213919,5043635972156634993781144958010700576536934327864026496890⟩, + ⟨4115420502395294424132055469492040488156728137136761471432,4115420502395294424178665094268619068748132089176201133586⟩, + ⟨-5374479650232011208508629215826431834384303617849057233739,-5374479650232011208426688461880129202310630058212180524659⟩, + ⟨5684194135743050479553797029854988615068318095164868987569,5684194135743050479600018174315887211247801826650048772137⟩] +lemma bs0_5_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 8 r = bs0_5_0_8 r := by + revert r + decide +kernel +def bs0_5_0_9 : Fin 8 → RI := ![⟨-130906579107182811196713053397461216249037649722403158974,-130906579107182811189545598963649459476987008274326834438⟩, + ⟨10765648417932589645655435341297354914264905030788868208656,10765648417932589645660589928446260503994901493701550118591⟩, + ⟨-5724868093876829428317676418115845988804422199213396775591,-5724868093876829428209715253304074054964200169160355578387⟩, + ⟨3303728879829503336784950862563919299684815148708622032571,3303728879829503336824899246987228319213501179807357589213⟩, + ⟨5432117201316357973238007245149147526732718386746430421798,5432117201316357973352434754016047703290360111592814173958⟩, + ⟨4434399165814408708699635738088905379248561340901731284668,4434399165814408708748747178365674171107196443919528205222⟩, + ⟨-5839569660143916112008241993066608023536434587296066990437,-5839569660143916111921902991994809198046006938345431142957⟩, + ⟨6154147134097576413780911523637967860982389739488556683785,6154147134097576413829613631550997803783360004838176745883⟩] +lemma bs0_5_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 9 r = bs0_5_0_9 r := by + revert r + decide +kernel +def bs0_5_0_10 : Fin 8 → RI := ![⟨-139412310182466548299934367907465845015332195955511361961,-139412310182466548292369352005879409729334719342932427966⟩, + ⟨10795006915825960743480952165111315335447571303833061960700,10795006915825960743486392664818353298104561395198086893734⟩, + ⟨-6110195899277538634086859091153557420994424292921899492634,-6110195899277538633972909580054530342363737182227673146816⟩, + ⟨3525923202320180887413661180663866105293256163662485867655,3525923202320180887455825405940609114204484989556015717717⟩, + ⟨5796808062300201914948401776944470520195622627554435519718,5796808062300201915069176304659960686790409484140630494660⟩, + ⟨4734350616625226665411305082738749525718306404635170069896,4734350616625226665463140616551134399152419177638182390199⟩, + ⟨-6289624258326274560212728117431061782294232118923555958327,-6289624258326274560121600099518842457731423223077727997561⟩, + ⟨6603670298898759653298928438798803225059637436098662820447,6603670298898759653350331935563754199996366677240184942800⟩] +lemma bs0_5_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 10 r = bs0_5_0_10 r := by + revert r + decide +kernel +def bs0_5_0_11 : Fin 8 → RI := ![⟨-147133250752335300150952891739887132988409882849232072845,-147133250752335300142954039681381734471650931552806157085⟩, + ⟨10723595443318813012392354781512002543421538593215185156580,10723595443318813012398107281288182665445463660985937465790⟩, + ⟨-6461928689605179565329306070406242082507521850379268371391,-6461928689605179565208821818518283223385404996966592683037⟩, + ⟨3728636468508903537837434966763017303152479202591312616669,3728636468508903537882017212794118071223426836590206643464⟩, + ⟨6129412972592917400554272914595874604393636244832089383308,6129412972592917400681973582011520793107981057158343669961⟩, + ⟨5008488190396630770908340457745234278021553319846561703361,5008488190396630770963148639478548706815070982108409040170⟩, + ⟨-6715599372375668067753497083878467097645069833091319840788,-6715599372375668067657143085005190254367790345966920783703⟩, + ⟨7023237623447084348319874139399855834437369016384198699398,7023237623447084348374225507759139481642533055027188710907⟩] +lemma bs0_5_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 11 r = bs0_5_0_11 r := by + revert r + decide +kernel +def bs0_5_0_12 : Fin 8 → RI := ![⟨-153887586598407184026531366812335938044222398841208633113,-153887586598407184018058011843882072319299345401809314424⟩, + ⟨10555362873545448858037501506664258083241206093440515683372,10555362873545448858043595252642142903041902523180921710818⟩, + ⟨-6771618171183601168104738817934976158957038479845042363001,-6771618171183601167977107274447019912356904875331364317424⟩, + ⟨3906984377773014237034143800849891555147227048108559157076,3906984377773014237081370727058008071107675620030666956268⟩, + ⟨6421919550074947927593386495028601834967160081348669763923,6421919550074947927728662541743718653435588825287332444786⟩, + ⟨5250237684213260799168193023871113769144315562329670079632,5250237684213260799226252502358492372877192688133124746946⟩, + ⟨-7108311217919882800081492104421706262220013690707290651691,-7108311217919882799979422253760202654427229719937839644802⟩, + ⟨7403359235784187868094145925291011508120067377554998218046,7403359235784187868151721491604634620451155510668185566856⟩] +lemma bs0_5_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 12 r = bs0_5_0_12 r := by + revert r + decide +kernel +def bs0_5_0_13 : Fin 8 → RI := ![⟨-159508342460723380326722493295771366417038634558024526255,-159508342460723380317728924759022021842401105733495262532⟩, + ⟨10296549082856981518638231051994545861786492583864133684292,10296549082856981518644698917710228930469307934723714674695⟩, + ⟨-7031422585985298434745424045711361352398942874471843602325,-7031422585985298434609956685015654987318456619802169890093⟩, + ⟨4056437541833956876146538632809487769787709323085248535539,4056437541833956876196665011229725218658700333400436926383⟩, + ⟨6666901473329535367905240035906969341835599412962719554570,6666901473329535368048821226835137820433641196660141853337⟩, + ⟨5453483878999985905228825051402520092419175700620021863147,5453483878999985905290449036346285439819955050448964881223⟩, + ⟨-7458725267127710025548794393611458009258062730888062630402,-7458725267127710025440458061560237857482653836872994828784⟩, + ⟨7734904759522823809231813274154551761017483391451741567831,7734904759522823809292923637594896844769203129234881957689⟩] +lemma bs0_5_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 13 r = bs0_5_0_13 r := by + revert r + decide +kernel +def bs0_5_0_14 : Fin 8 → RI := ![⟨-163849903626653225232338278945260715461977286569620857960,-163849903626653225222772976574434963930517176382458193907⟩, + ⟨9955374398591036413336539129351456919330216971868117709465,9955374398591036413343418166411235858564182126631659196961⟩, + ⟨-7234422924153707818936835840749277248790008940691035210408,-7234422924153707818792756628905567095229379100619869219934⟩, + ⟨4173004996871413378432159858778993654937378367307717684070,4173004996871413378485472841761309257553830090665826649563⟩, + ⟨6857819263009187764706837187042303821776060032124567190420,6857819263009187764859546036749397365174794442007569341227⟩, + ⟨5612816567208988462795721596502112585959897935335495191334,5612816567208988462861263105069226614822886352446796509605⟩, + ⟨-7758266329181097590519348725305922088587941303075256449294,-7758266329181097590404125299858050020987576194485613750723⟩, + ⟨8009440205255045321608983180149649511048353462944424442912,8009440205255045321673978415567769272628679982907360681308⟩] +lemma bs0_5_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 14 r = bs0_5_0_14 r := by + revert r + decide +kernel +def bs0_5_0_15 : Fin 8 → RI := ![⟨-166794023233763941956921365685140343157972428792413939683,-166794023233763941946726096340369564525371973732251483801⟩, + ⟨9541669471481891122302342241349064746157106270307612305643,9541669471481891122309674329027806521793039135155742978242⟩, + ⟨-7374920167512488716507213840849328119284711382961676672890,-7374920167512488716353645629956668612041673424625535285879⟩, + ⟨4253406428417725637615583900319772534769189610685595062221,4253406428417725637672408054958407166512991430479527769871⟩, + ⟨6989302360447055481860502535747476357546511770735687425238,6989302360447055482023268728990232077737609623696980348109⟩, + ⟨5723762648071854771568693105057116024945611725643427969273,5723762648071854771638551151067659574528691818790168884493⟩, + ⟨-7999136536775539689568002024102610867522162374482087295820,-7999136536775539689445190030115140972076910124139471649824⟩, + ⟨8219562318498999922933828839991691586840617222700924474006,8219562318498999923003104635520336359868722116449703543686⟩] +lemma bs0_5_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 15 r = bs0_5_0_15 r := by + revert r + decide +kernel +def bs0_5_0_16 : Fin 8 → RI := ![⟨-168254979985647685827503118788830320383569581433799819619,-168254979985647685816611866263501074014954036176661977296⟩, + ⟨9066465588810479398623419821410389208789651449244580807377,9066465588810479398631252436297345875089125382378110450020⟩, + ⟨-7448696026725339174587335142799582557682071994324743801639,-7448696026725339174423283551013023532519915135121984292700⟩, + ⟨4295222875584110248875279821719749286843924026076772593581,4295222875584110248935983094658181006444451882881006805600⟩, + ⟨7057395752512228244626033557656535550564992919000746847222,7057395752512228244799911034873784451141161008600548051707⟩, + ⟨5782990639042965342096484201646303752421022744223254771414,5782990639042965342171111128539923882736529272946171743623⟩, + ⟨-8174626343769622694450203254056026665877635002940211130707,-8174626343769622694319007461732413924772082231443973568099⟩, + ⟨8359213001124750439813569939740729110923754557385060899521,8359213001124750439887574868642216745368031596824745548803⟩] +lemma bs0_5_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 16 r = bs0_5_0_16 r := by + revert r + decide +kernel +def bs0_5_0_17 : Fin 8 → RI := ![⟨-168183588937470986885770054508653215920324057319318763677,-168183588937470986874107745827435590524141462929573477694⟩, + ⟨8541566521261238166531394676487004924983124804554482361271,8541566521261238166539781808488541197732983176801078069872⟩, + ⟨-7453220863810632776529054875137036918386731567660256893340,-7453220863810632776353389101286008545792231392213388772715⟩, + ⟨4297016422770464713639624900295727361869585712885497835454,4297016422770464713704625716807177685253584410504994021117⟩, + ⟨7059755621564806016735349192227694192422942136591172929790,7059755621564806016921536484032214188228075285026153683190⟩, + ⟨5788474829125357176931618910527709848846242280740494775214,5788474829125357177011529118777100816215436420255014358288⟩, + ⟨-8279402887028986213274581333591766704319826894775418088664,-8279402887028986213134097415495480346946635697896060890235⟩, + ⟨8423956321704040231344564960114761300257331821381824768419,8423956321704040231423809135453486403564104911091506655336⟩] +lemma bs0_5_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 17 r = bs0_5_0_17 r := by + revert r + decide +kernel +def bs0_5_0_18 : Fin 8 → RI := ![⟨-166569828128712563086389437496197907652381621127179208971,-166569828128712563073870419832269238184160205734259756930⟩, + ⟨7979122772478005431722604892786613947062827874864819233794,7979122772478005431731608140475047362353790459875629663079⟩, + ⟨-7387795099116481001885055625994991411345594762099435314915,-7387795099116481001696485507855219335743727782532281644021⟩, + ⟨4258410938519790241808167548614268210786699536613553117546,4258410938519790241877943301626205283287979670687581198465⟩, + ⟨6995781051659195263450191048540268891476695016853056444664,6995781051659195263650055591543833889722252196805403476034⟩, + ⟨5739608254936693073031938592994051176784602765108862676445,5739608254936693073117718976277192360633161283462244465103⟩, + ⟨-8309760384856132250248702548975978332269845463494146996360,-8309760384856132250097898733008340174885293390277056921133⟩, + ⟨8411201834058397097448507884959239640404911512518815950546,8411201834058397097533573308790829547464682947077698822383⟩] +lemma bs0_5_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 18 r = bs0_5_0_18 r := by + revert r + decide +kernel +def bs0_5_0_19 : Fin 8 → RI := ![⟨-163443920373701543685110323424670134748733526975027970901,-163443920373701543671636533711356652167717548485502249797⟩, + ⟨7391227515042203198425978083842465148810233274948445993436,7391227515042203198435667970808529973637835567309397882092⟩, + ⟨-7253614193171840241011453111742834030322246996233077363080,-7253614193171840240808501555458652148260207176940394284668⟩, + ⟨4180128165538323584810608597259835148114842601920357746678,4180128165538323584885705849170885524998487128356415331744⟩, + ⟨6866672503753946908456377761092834576467864100061028519260,6866672503753946908671485119826249802214593384176094274895⟩, + ⟨5637256573089804774732256066440207518946681134594262419462,5637256573089804774824578553472278119039451016227367058931⟩, + ⟨-8263818661247875398419215924196399624747516244573289641438,-8263818661247875398256910944778032309181928306707587006153⟩, + ⟨8320360389731256026722708760687138051992498760868475258671,8320360389731256026814261761357097423294436451730966167813⟩] +lemma bs0_5_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 19 r = bs0_5_0_19 r := by + revert r + decide +kernel +def bs0_5_0_20 : Fin 8 → RI := ![⟨-158875795754805962293438954082141649387978258697614554245,-158875795754805962278897707577687570603162295135269857472⟩, + ⟨6789550706790026597171590188453877983458631182622366885931,6789550706790026597182047753695017196924724163750307176288⟩, + ⟨-7053751937839588676954692932993437546606622381529116548904,-7053751937839588676735662602908087231240296307169776858909⟩, + ⟨4063976204885718554549589420225140687590461131819234914968,4063976204885718554630636228517430686704270148843853584621⟩, + ⟨6675412258845251055432256255373712964974830622400783454489,6675412258845251055664405427572269492734598775086198903239⟩, + ⟨5483748482632527986545208009421462767077461674172275537261,5483748482632527986644844716722194779453905105308275399888⟩, + ⟨-8141658310560238000560668182851058492537655293829886290519,-8141658310560238000385504642020954650207879811534935326295⟩, + ⟨8152922178033863431532838955307543027986923525363934355345,8152922178033863431631645213923791212608159388560630217481⟩] +lemma bs0_5_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) 20 r = bs0_5_0_20 r := by + revert r + decide +kernel +def bs0_5_0 : Fin 21 → Fin 8 → RI := ![bs0_5_0_0,bs0_5_0_1,bs0_5_0_2,bs0_5_0_3,bs0_5_0_4,bs0_5_0_5,bs0_5_0_6,bs0_5_0_7,bs0_5_0_8,bs0_5_0_9,bs0_5_0_10,bs0_5_0_11,bs0_5_0_12,bs0_5_0_13,bs0_5_0_14,bs0_5_0_15,bs0_5_0_16,bs0_5_0_17,bs0_5_0_18,bs0_5_0_19,bs0_5_0_20] +lemma bs0_5_0_mem (d : Fin 21) (r : Fin 8) : (bs0_5_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 5 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_0) d r = bs0_5_0 d r := by + fin_cases d + · exact bs0_5_0_0_calc r + · exact bs0_5_0_1_calc r + · exact bs0_5_0_2_calc r + · exact bs0_5_0_3_calc r + · exact bs0_5_0_4_calc r + · exact bs0_5_0_5_calc r + · exact bs0_5_0_6_calc r + · exact bs0_5_0_7_calc r + · exact bs0_5_0_8_calc r + · exact bs0_5_0_9_calc r + · exact bs0_5_0_10_calc r + · exact bs0_5_0_11_calc r + · exact bs0_5_0_12_calc r + · exact bs0_5_0_13_calc r + · exact bs0_5_0_14_calc r + · exact bs0_5_0_15_calc r + · exact bs0_5_0_16_calc r + · exact bs0_5_0_17_calc r + · exact bs0_5_0_18_calc r + · exact bs0_5_0_19_calc r + · exact bs0_5_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 5 0 tr0_5_0_mem) d r +lemma bs0_5_0_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 5 0) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs0_5_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_5_0_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_5_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_5_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 0 5 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 5 0) _ bs0_5_0_lower e he hτ +def bs0_5_1_0 : Fin 8 → RI := ![⟨-48493744738479334835193394622433269929361140598964193473,-48493744738479334830472686839441545025926438723957673877⟩, + ⟨6581533089339978584580372721824974209865908136211308835998,6581533089339978584583767692786784785046734744723583704288⟩, + ⟨-2073723659479442102323870433797633360824380334278213420559,-2073723659479442102252763862324682354285103463465106426799⟩, + ⟨1196355380615890843178915466706458063391764806206831570586,1196355380615890843205226711653156839646989114713372349989⟩, + ⟨1969226453678954602951334536906384654945472404058153327599,1969226453678954603026700043118803102831470225854148884340⟩, + ⟨1602459147203947836687331432060538868088957823687171072192,1602459147203947836719677749773649258655650640130827967820⟩, + ⟨-1987458510310430438353627870062111018572548546861301663162,-1987458510310430438296762326217515977455602631829460845530⟩, + ⟨2149169242876001125025947278860499098962381249632872576009,2149169242876001125058023997589929285085100879674428452467⟩] +lemma bs0_5_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 0 r = bs0_5_1_0 r := by + revert r + decide +kernel +def bs0_5_1_1 : Fin 8 → RI := ![⟨-45863303133275404293509630290657806707607713430047720078,-45863303133275404288722991031837355198824474211249367272⟩, + ⟨6348771625178294517304908156577014580668048293213647853513,6348771625178294517308350543192616671501683449511323138530⟩, + ⟨-1959195474013365936246224076581278487375343128667424149661,-1959195474013365936174124399537286366116400380353069331943⟩, + ⟨1130243913948936680267934748746416188569018692473425309434,1130243913948936680294613468082597029285538468099613245811⟩, + ⟨1860498047261293697207615853085242208081365971025648853304,1860498047261293697284033947019741156271542122938999384752⟩, + ⟨1513820871845076753254371464581851864290039910228138234071,1513820871845076753287169545158337660523562484329596950070⟩, + ⟨-1873596142330013601722191085809581487799060509813518174350,-1873596142330013601664531332833360299673766136421316700635⟩, + ⟨2027890786100139791742648264149740583157835592486798973285,2027890786100139791775172980404683959012997787985382928636⟩] +lemma bs0_5_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 1 r = bs0_5_1_1 r := by + revert r + decide +kernel +def bs0_5_1_2 : Fin 8 → RI := ![⟨-43297266315029405989118709410567537861216145583199173665,-43297266315029405984264519919166229863248078626828934982⟩, + ⟨6112987840632219080352769227893735019959916345519253155325,6112987840632219080356260194317407900588051721423261436071⟩, + ⟨-1847636156836562076325403632370085022813876834208646562320,-1847636156836562076252286466919257932854375512333658500610⟩, + ⟨1065847559041053986276378501660259059548506710798967188636,1065847559041053986303433717657027282699744650476523877682⟩, + ⟨1754582926540904414788708240122547663735640517182366583584,1754582926540904414866204765027153650970842885608619903442⟩, + ⟨1427493594971541702610899129240008749453560425428503765668,1427493594971541702644160064410739507258807480169712191782⟩, + ⟨-1763121113203168356760648448145264927141099840027305725156,-1763121113203168356702174986528600512646117494920581291995⟩, + ⟨1910030091341923946137377889795134680956357418109894027117,1910030091341923946170361602859471997210105206435858864596⟩] +lemma bs0_5_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 2 r = bs0_5_1_2 r := by + revert r + decide +kernel +def bs0_5_1_3 : Fin 8 → RI := ![⟨-40798643194383528238354705501671027583835202681523333613,-40798643194383528233431296184723832835640453745697658410⟩, + ⟨5874751625732230155123064568307073415081959241684814257666,5874751625732230155126605315252755311518693401185399804410⟩, + ⟨-1739168870247617430869752563632451931178883557901028786657,-1739168870247617430795592761208734216891088836218728992486⟩, + ⟨1003237585800466091905235249618008162404176898825022501286,1003237585800466091932676267886195227253411943399867117953⟩, + ⟨1651598681264858153582117486361280989402030540922056916595,1651598681264858153660719097077768181900262261171983337754⟩, + ⟨1343571670466924099630150478481662723286082114228908732574,1343571670466924099663885708307540552363331562773066271415⟩, + ⟨-1656118801738456610697983768133887589922980942479751601800,-1656118801738456610638676485996042126896718097283529172628⟩, + ⟨1795694481406447686939705443452556002700052072925325202413,1795694481406447686973159498036950840345446529423662612618⟩] +lemma bs0_5_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 3 r = bs0_5_1_3 r := by + revert r + decide +kernel +def bs0_5_1_4 : Fin 8 → RI := ![⟨-38370168383359310226028844882752615825612418163394875212,-38370168383359310221034493014306643277696136969893352235⟩, + ⟨5634644185602319010099699011461146191484974226396796277428,5634644185602319010103290777854195977656648782279294506860⟩, + ⟨-1633904207967702930191273998547978439201931884202222355660,-1633904207967702930116045610259436813405416967491553182418⟩, + ⟨942477978494238347714166820020192915075966838585851954494,942477978494238347742003242311616610127382585767791306209⟩, + ⟨1551650942897134674365311954134534296890156930312507825507,1551650942897134674445046153766147972722551204921464339159⟩, + ⟨1262139711678371986873470954402561020779382401127379350941,1262139711678371986907692283012036247817815028469124481116⟩, + ⟨-1552662394739174689286562719899276743438950239430617226749,-1552662394739174689226400865320690185784751635491941447840⟩, + ⟨1684978115036935171226578075572690860040727882779144793804,1684978115036935171260514177420936763435921089494742361476⟩] +lemma bs0_5_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 4 r = bs0_5_1_4 r := by + revert r + decide +kernel +def bs0_5_1_5 : Fin 8 → RI := ![⟨-36014300008627594774648963206985825321204623782068605096,-36014300008627594769581890533716834836092728798283172523⟩, + ⟨5393256056737541916750986915353181041243440666069032369039,5393256056737541916754630980052336637069895417024125051698⟩, + ⟨-1531940165802058441352340330854774486768726566535187014865,-1531940165802058441276016571417734923236485771980394304433⟩, + ⟨883625418653095623858471038912778921972820440116774856354,883625418653095623886712776465532543081893246884226279188⟩, + ⟨1454833353818978554756307367569137402515456232089987712874,1454833353818978554837202545706625312384920576486322040836⟩, + ⟨1183272574699924974724074900833893694211925287111935804367,1183272574699924974758794512829294738969671113490650234497⟩, + ⟨-1452813037032311742251478609263578393557712799744804802499,-1452813037032311742190440761443176775213388396198321078408⟩, + ⟨1577962072583853485821497747039374446508030842072424366908,1577962072583853485855927979197981858089168211221456149528⟩] +lemma bs0_5_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 5 r = bs0_5_1_5 r := by + revert r + decide +kernel +def bs0_5_1_6 : Fin 8 → RI := ![⟨-33733218806443310695065248463119992929063075219561994629,-33733218806443310689923618706418336402511525507088940687⟩, + ⟨5151185054512246012023422038565515116306743476759872472670,5151185054512246012027119722159307517604015472558034409397⟩, + ⟨-1433362170159380171922119355088037678664451109133176097928,-1433362170159380171844672565201773116787046868084613328251⟩, + ⟨826729301658325237152715656154631767566437287813308315245,826729301658325237181372943615409268029748065626200759890⟩, + ⟨1361227591848715431743179882127695406542949046797577070102,1361227591848715431825265354728191678027886418156264774519⟩, + ⟨1107035386231201015322583230704457179280058164576006490523,1107035386231201015357813708277712515266131618012565498480⟩, + ⟨-1356620027263998378250893185270135795472583934039272423019,-1356620027263998378188957224435512521382279498949933246441⟩, + ⟨1474714495632011554079629377546560786977928059709812980647,1474714495632011554114566217337823448197950773145149835913⟩] +lemma bs0_5_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 6 r = bs0_5_1_6 r := by + revert r + decide +kernel +def bs0_5_1_7 : Fin 8 → RI := ![⟨-31528828467873029693600636256577675535503440708504197003,-31528828467873029688382552504808079237388960332003900450⟩, + ⟨4909034161380322685669129531081340268977843437796304002836,4909034161380322685672882197763490780068073370257057557236⟩, + ⟨-1338243162463135948512962130319103926537222583009231997648,-1338243162463135948434363737386244276597074249016558241044⟩, + ⟨771831785864906745569736086076693198461540140717703180010,771831785864906745598819496035239278887447176996248551814⟩, + ⟨1270903448218013157964443926511232095825640496536991995071,1270903448218013158047749977530501955260395411561706110445⟩, + ⟨1033483614454283327772219655904020726444546129916040131449,1033483614454283327807973996704910333975047650800773136452⟩, + ⟨-1264121056895030614762844835082169811297561639810970040588,-1264121056895030614699987911076803416154519108623390473505⟩, + ⟨1375290778060144431102231998637529744465480559522117569869,1375290778060144431137688335378848430424468152469436356466⟩] +lemma bs0_5_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 7 r = bs0_5_1_7 r := by + revert r + decide +kernel +def bs0_5_1_8 : Fin 8 → RI := ![⟨-29402757195567915148461660971190245167661882074253969816,-29402757195567915143165162955430511506028434724183062649⟩, + ⟨4667409365798788596573589189705148767700053422314865187704,4667409365798788596577398249233764194625725767209575730016⟩, + ⟨-1246643737177550730723322622957293614417370053698853350062,-1246643737177550730643543100049114512620958265071052061443⟩, + ⟨718967872932848787864399271193875373440040345287579955982,718967872932848787893919729366875197153719342490226902248⟩, + ⟨1183918956841888814087896844394752919395655825895720953322,1183918956841888814172454769279681816210319192258816782891⟩, + ⟨962663181134627855305933356989830526449036198119882022043,962663181134627855342224992792640482021743071025858283938⟩, + ⟨-1175342489655106058415838603483367205117848017724227627075,-1175342489655106058352037102950228696798617972308245382206⟩, + ⟨1279733805767065062792332112928757255145916803212307278014,1279733805767065062828321266443712140652948164857220127940⟩] +lemma bs0_5_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 8 r = bs0_5_1_8 r := by + revert r + decide +kernel +def bs0_5_1_9 : Fin 8 → RI := ![⟨-27356360426502681573793229719458435498547027061636634010,-27356360426502681568416290965594643477145725623019818340⟩, + ⟨4426917462417694053094857859416911522913518793736340193599,4426917462417694053098724769162599527708356776929319247161⟩, + ⟨-1158612330889287412069855071015005689654549372801934945817,-1158612330889287411988863893974313166934891184378418324008⟩, + ⟨668165517873876540406659683599328558942932835633338050215,668165517873876540436628484703434478408995297691938470124⟩, + ⟨1100320572448362937127070218842104341514528855853319428940,1100320572448362937212912369997140026582986532913879098577⟩, + ⟨894610612937824840149038741713868551239334843151018716629,894610612937824840185881557931251622403928539449860718744⟩, + ⟨-1090299678566349637387591891277742408463843634407458061769,-1090299678566349637322821403353495670178716208237497214996⟩, + ⟨1188074242088211282400193963703950043762502867724141112530,1188074242088211282436729703673517809385244972006299476528⟩] +lemma bs0_5_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 9 r = bs0_5_1_9 r := by + revert r + decide +kernel +def bs0_5_1_10 : Fin 8 → RI := ![⟨-25390724668865146496904834210455023224889957443089631151,-25390724668865146491445359060052580483787927269017566398⟩, + ⟨4188163824525739483094356544369169082305667105172026275172,4188163824525739483098282811457525439455047078208617200394⟩, + ⟨-1074185459635425862273189226546061999898076854009056679143,-1074185459635425862190954829113488105257865325540004704709⟩, + ⟨619445767174118409966869788605390166020313488929384717787,619445767174118409997298612961636807399747974265248138735⟩, + ⟨1020143394892230960318892513514689925872905307809714586435,1020143394892230960406052347863261561982979298742806995145⟩, + ⟨829353229764366658579479647932151535921146491957441384705,829353229764366658616888004028136420709531786833132227599⟩, + ⟨-1008997317525850915499266779604196580704007203648083812023,-1008997317525850915433502060032675520823697326135254094001⟩, + ⟨1100330855747151171956154666235926677263624348110082026048,1100330855747151171993251232441352064550855260270409923758⟩] +lemma bs0_5_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 10 r = bs0_5_1_10 r := by + revert r + decide +kernel +def bs0_5_1_11 : Fin 8 → RI := ![⟨-23506672395683914745290291601173102621863116433896373380,-23506672395683914739746112093051277664777734196401276642⟩, + ⟨3951750160115334818144205073881700512050470715724309864301,3951750160115334818148192257435973639498049712473304733432⟩, + ⟨-993388001450485615670196179533027303892957661450297247439,-993388001450485615586685906375145031159325312786339753896⟩, + ⟨572822923226033431253739694125203025141632545902644890112,572822923226033431284640625039802743005331905197985335064⟩, + ⟨943411436767199147240974570392565670641416314744032809497,943411436767199147329486699162354369610848851404156407399⟩, + ⟨766909367740118829253985583370399623397659625154534802704,766909367740118829291974334227860771111622879826588117557⟩, + ⟨-931429824343279305399607614896393980103704313060752313547,-931429824343279305332822548464116818517212440013267277089⟩, + ⟨1016510888038765124497043909930560107526146833398157770355,1016510888038765124534716033442732848001143816000048036084⟩] +lemma bs0_5_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 11 r = bs0_5_1_11 r := by + revert r + decide +kernel +def bs0_5_1_12 : Fin 8 → RI := ![⟨-21704767932856737085655799818659778747937419837298686891,-21704767932856737080024672422569115424848120692060941753⟩, + ⟨3718272263226977953405279142089997836409995655605942212770,3718272263226977953409328855580115855855435901750694257508⟩, + ⟨-916233520920753561066095898514662439172795537278459439803,-916233520920753560981275956024371791966353848739998320845⟩, + ⟨528304733194976703370708979041297532940753424026297433583,528304733194976703402094521010752360292776989219514105561⟩, + ⟨870137931252414979056128477110985769322874745887479439241,870137931252414979146028717980354020514490866331677319214⟩, + ⟨707288634361530581118220757549640265589514249551048940148,707288634361530581156805275851159627104514861524626887800⟩, + ⟨-857581752062876060541619731254322683811509596570279007284,-857581752062876060473787292444440758261452775106157078541⟩, + ⟨936610455824442663850500812204177727184408882320534766467,936610455824442663888763737577955014108979919698691053436⟩] +lemma bs0_5_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 12 r = bs0_5_1_12 r := by + revert r + decide +kernel +def bs0_5_1_13 : Fin 8 → RI := ![⟨-19985324275012052776685950548845333850872464132720148514,-19985324275012052770965552742079355227711780513598593694⟩, + ⟨3488317772445256093126076092653619450815353590175451804693,3488317772445256093130190006358173514505289832640563029119⟩, + ⟨-842724632383425171975723014453599626825985568919215769644,-842724632383425171889558419184681123258193159977249248795⟩, + ⟨485892600357728787476752934343957892386670350528030823262,485892600357728787508636032135589876670410114036776279547⟩, + ⟨800325676983571633890449360053673130527925096308467650648,800325676983571633981774791805628553280047310865677953651⟩, + ⟨650492193181979687809417980250935697658303871323530300079,650492193181979687848614179935879658088606700252470306990⟩, + ⟨-787428225358643715238647619149292982264345007674764256718,-787428225358643715169739830903529403392072658721957366588⟩, + ⟨860614986834393151066458878209652017693646328185086239679,860614986834393151105328386745426156160039442489813102012⟩] +lemma bs0_5_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 13 r = bs0_5_1_13 r := by + revert r + decide +kernel +def bs0_5_1_14 : Fin 8 → RI := ![⟨-18348410759114053687701523802045598083353726051809548317,-18348410759114053681889450479206884841515182058708309817⟩, + ⟨3262463948542829817225711435000049714072953732909016300080,3262463948542829817229891278588266977073061974053151033303⟩, + ⟨-772853398290970579624936204880404689688095884558606111317,-772853398290970579537390729468928452930051278066721120426⟩, + ⟨445581815881971040451884566315832579331789404089034216863,445581815881971040484278624978241647427437132502007944210⟩, + ⟨733967416625226337935332030160949689071269804806221163753,733967416625226338028121050000778220265909199064720619358⟩, + ⟨596513075338917755379583819796784450024161795577627619745,596513075338917755419408180661607978501362303828540473560⟩, + ⟨-720935398776500987840368925810388485033207626362608831042,-720935398776500987770356816281157997417781603333376133351⟩, + ⟨788499683717404677696320584829982805270392026782953632249,788499683717404677735813018968947545552773992342724674697⟩] +lemma bs0_5_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 14 r = bs0_5_1_14 r := by + revert r + decide +kernel +def bs0_5_1_15 : Fin 8 → RI := ![⟨-16793861522910484987544740232811856098928931544895309418,-16793861522910484981638499938294050513045085440757186389⟩, + ⟨3041275483300774258916266565871817290130661061083420430218,3041275483300774258920514131113030502177513261737082203369⟩, + ⟨-706601759177211593236444431480081307920280559637262425648,-706601759177211593147480547895440591973966711669229925926⟩, + ⟨407361808966787201206718243015372698666417887982061309653,407361808966787201239637148877001586693807303209989920747⟩, + ⟨671046245739292658566532340252627545213989347203947283168,671046245739292658660824723955844587236785910354093725501⟩, + ⟨545336515160251483481521656593839168537371647847401555205,545336515160251483521991250107141499387292388203252838808⟩, + ⟨-658060933606442359733005064488767105547595567248673655942,-658060933606442359661858621655735824577013185049854020316⟩, + ⟨720230013253112155915707485770455166234526805420450510170,720230013253112155955839774694498896053864985405796425333⟩] +lemma bs0_5_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 15 r = bs0_5_1_15 r := by + revert r + decide +kernel +def bs0_5_1_16 : Fin 8 → RI := ![⟨-15321284673216323615491753829037300266069677474403429267,-15321284673216323609488764801074591514103163868304289559⟩, + ⟨2825302351471067168170148655401834742791798173513238794229,2825302351471067168174465799010466038062296174011753289361⟩, + ⟨-643941991609983128739228463181817401267010402463633922152,-643941991609983128648807283139460960205255828769724729547⟩, + ⟨371216413234305926225141808640771650590760794252057924948,371216413234305926258599951358714650280425265563197044422⟩, + ⟨611536048494033816001236384120690471065751561841932649465,611536048494033816097073349189293511034120767255578281854⟩, + ⟨496940307051962667712774657743932888856646999053718426259,496940307051962667753907174152653940442192720509823159783⟩, + ⟨-598754490200026052145855736940781504793711076273651358415,-598754490200026052073543860957572611258332130710182929399⟩, + ⟨655762217144788784117854924921349866029121081366894645473,655762217144788784158644611433328181613357108924607757148⟩] +lemma bs0_5_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 16 r = bs0_5_1_16 r := by + revert r + decide +kernel +def bs0_5_1_17 : Fin 8 → RI := ![⟨-13930072087610941124016484206515204575842542070438252696,-13930072087610941117914070220884739515272595235015398804⟩, + ⟨2615077717688480586949316263379962457268433284699072705247,2615077717688480586953704910004589881578599802114864650293⟩, + ⟨-584837190494754032716179481973745405550637843998673415244,-584837190494754032624260694330143410445510297051738185894⟩, + ⟨337124147250863899360434013898154446377471346353716285563,337124147250863899394446309623616704582715137318669746241⟩, + ⟨555401956737156846255148755102731971488240639625907388114,555401956737156846352573027119969058334711310410726627213⟩, + ⟨451295180856379031374921924880805728949272457056227243245,451295180856379031416735701689201867828303933454119860088⟩, + ⟨-542958232602323489835134470496829445364384146125245735409,-542958232602323489761624923624352355667694395482601783526⟩, + ⟨595043840840342783859698814911336005337909245231681742480,595043840840342783901164083676681829988713925858702576129⟩] +lemma bs0_5_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 17 r = bs0_5_1_17 r := by + revert r + decide +kernel +def bs0_5_1_18 : Fin 8 → RI := ![⟨-12619409772379150564325434909190568492779362021335530247,-12619409772379150558120820909825895869704009965364943943⟩, + ⟨2411115909884574338804642846187285907871573316814050452015,2411115909884574338809104991552956214582391381844708605512⟩, + ⟨-529241772102701444887356448431773399681362111381138647134,-529241772102701444793898253369689696850521457144169617778⟩, + ⟨305058507061683905478462230961480620427439026523419491629,305058507061683905513044146692905953101656449892115579204⟩, + ⟨502600828964356658837880125995206723939997319074494732324,502600828964356658936936008382283507840071189277140922932⟩, + ⟨408365192880579052280926725798224927813113589676881212482,408365192880579052323440777706931598200437150054189880861⟩, + ⟨-490607342441162992807058249661747035475120750775178111112,-490607342441162992732317603634661491797926226950549875288⟩, + ⟨538014276883862329796906437155300472771034172059816427151,538014276883862329839066144391551554908912498003423404225⟩] +lemma bs0_5_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 18 r = bs0_5_1_18 r := by + revert r + decide +kernel +def bs0_5_1_19 : Fin 8 → RI := ![⟨-11388288699418643666167506712313612458996002357089108856,-11388288699418643659857814215193093480836639607295164827⟩, + ⟨2213910470407129525397132874078658733516311207975414361697,2213910470407129525401670588292253039410105582198812628388⟩, + ⟨-477101994233718031818416433545883469299113460716753984750,-477101994233718031723375473344558289550739762704060078203⟩, + ⟨274988268644996315530716197517813050654305447434983915988,274988268644996315565883776717681989189105718695467696318⟩, + ⟨453081745749208565406251433525504042455902521129844378079,453081745749208565506984880917927473136403424708398750174⟩, + ⟨368108129825775092340436200682992108485518704449078611510,368108129825775092383670251081607739677685827753029730222⟩, + ⟨-441630539108341556706317016601747552938722926942126547567,-441630539108341556630310597263802864562698432824075270061⟩, + ⟨484605319377813637618332538741761281918542616103672829186,484605319377813637661206243448660731007233631563466822026⟩] +lemma bs0_5_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 19 r = bs0_5_1_19 r := by + revert r + decide +kernel +def bs0_5_1_20 : Fin 8 → RI := ![⟨-10235516045332883959089026271085558640881126236964420544,-10235516045332883952671268526792482522754859066709936362⟩, + ⟨2023932295606717377846809799625256954542192810321923073602,2023932295606717377851425230654411419881237312871910666297⟩, + ⟨-428356489987720156127046368169850543613483415570156692971,-428356489987720156030377654340129221164981836796775625442⟩, + ⟨246877798228631429373566270331950984046928044183572392987,246877798228631429409336159888641507300315825080954195908⟩, + ⟨406786518259777298074574420832026992914798693132620529980,406786518259777298177033116308724909123232506506213311180⟩, + ⟨330475922899641093623196573431953673373545230259308708879,330475922899641093667171087545206499036873768876134629560⟩, + ⟨-395950603375629354845733248237709716558520196247936467321,-395950603375629354768425077270048581704624593069448641913⟩, + ⟨434741726234835014996926804730671002057827351050237955922,434741726234835015040534801560068505686490429545634660367⟩] +lemma bs0_5_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) 20 r = bs0_5_1_20 r := by + revert r + decide +kernel +def bs0_5_1 : Fin 21 → Fin 8 → RI := ![bs0_5_1_0,bs0_5_1_1,bs0_5_1_2,bs0_5_1_3,bs0_5_1_4,bs0_5_1_5,bs0_5_1_6,bs0_5_1_7,bs0_5_1_8,bs0_5_1_9,bs0_5_1_10,bs0_5_1_11,bs0_5_1_12,bs0_5_1_13,bs0_5_1_14,bs0_5_1_15,bs0_5_1_16,bs0_5_1_17,bs0_5_1_18,bs0_5_1_19,bs0_5_1_20] +lemma bs0_5_1_mem (d : Fin 21) (r : Fin 8) : (bs0_5_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 5 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 5 tr0_5_1) d r = bs0_5_1 d r := by + fin_cases d + · exact bs0_5_1_0_calc r + · exact bs0_5_1_1_calc r + · exact bs0_5_1_2_calc r + · exact bs0_5_1_3_calc r + · exact bs0_5_1_4_calc r + · exact bs0_5_1_5_calc r + · exact bs0_5_1_6_calc r + · exact bs0_5_1_7_calc r + · exact bs0_5_1_8_calc r + · exact bs0_5_1_9_calc r + · exact bs0_5_1_10_calc r + · exact bs0_5_1_11_calc r + · exact bs0_5_1_12_calc r + · exact bs0_5_1_13_calc r + · exact bs0_5_1_14_calc r + · exact bs0_5_1_15_calc r + · exact bs0_5_1_16_calc r + · exact bs0_5_1_17_calc r + · exact bs0_5_1_18_calc r + · exact bs0_5_1_19_calc r + · exact bs0_5_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 5 1 tr0_5_1_mem) d r +lemma bs0_5_1_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 5 1) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs0_5_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_5_1_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_5_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_5_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 0 5 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 5 1) _ bs0_5_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs06.lean b/lean/OAI/Analysis/Triangular/Signs/Signs06.lean new file mode 100644 index 0000000000000000000000000000000000000000..3cf6d4cec14f61d758d0fbd65533b06c43adfa61 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs06.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows06 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs0_6_0_0 : Fin 8 → RI := ![⟨-29280925492483197661529090510135276643002449089894503508,-29280925492483197658937258199671573469788883995361141617⟩, + ⟨8415036147828304469747236139636678373430653912212722629295,8415036147828304469749100096449206599937300617821340337732⟩, + ⟨-1194697631141871243000266083118494003340415018386147030546,-1194697631141871242961226109051013265826686999138067184371⟩, + ⟨687372558927168941907864001324247237692149698837177433359,687372558927168941922309787404249446929952009046054347176⟩, + ⟨1134015354857086076204513848146876118737750005557528020455,1134015354857086076245892125106379592623864487108491994198⟩, + ⟨920374832323633262213516438321183098835416731841491427879,920374832323633262231275688675349226521846918325144650531⟩, + ⟨-1074683599071395642677643063866124309106244693977616625866,-1074683599071395642646421907914967083685583379162534831880⟩, + ⟨1194006103070178174427172199685732067670440761042588201207,1194006103070178174444783430848396767893660187988910156309⟩] +lemma bs0_6_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 0 r = bs0_6_0_0 r := by + revert r + decide +kernel +def bs0_6_0_1 : Fin 8 → RI := ![⟨-28429816638694856337625427106248260280909681619677273650,-28429816638694856334998530511465258373441898640839539501⟩, + ⟨8013693228314021947961659303854061933245824389842897257036,8013693228314021947963548477696011561709829434565795534090⟩, + ⟨-1161608224352969149410882913854298222755991014478675781028,-1161608224352969149371314777241327118218100435185058745420⟩, + ⟨668406051655446704674712938725722578224963444829829538161,668406051655446704689354158417825648166595914189057850848⟩, + ⟨1102647031855174348514686433942864309714419345343904760912,1102647031855174348556624507792890427822071185600171850729⟩, + ⟨894946603781069716579040010296209139327763221526849432018,894946603781069716597039521334451037940925551377111089762⟩, + ⟨-1046164903260474993861814554433313490402968838486884540730,-1046164903260474993830171014871729035790541923978414575784⟩, + ⟨1161703993418671278260911871283771420992262669746252772864,1161703993418671278278761360613900856902474017481209558986⟩] +lemma bs0_6_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 1 r = bs0_6_0_1 r := by + revert r + decide +kernel +def bs0_6_0_2 : Fin 8 → RI := ![⟨-27553175176960801761834727681594415435692812679707753755,-27553175176960801759171920270209560101204194957558919752⟩, + ⟨7617611560294714745938077811408673358749720676023849027741,7617611560294714745939992811076997973160420831092397141438⟩, + ⟨-1127365945857109900040798159985931282792305338881228029915,-1127365945857109900000689109771690457432829412007804474920⟩, + ⟨648770681133510146618820966792852153272003947328297229723,648770681133510146633662338312898226099903477888614051999⟩, + ⟨1070180527809122237487829949070530765110068098854120598135,1070180527809122237530341334592538409318220316812707328095⟩, + ⟨868626834407299792305835901307555936586051459610049923430,868626834407299792324081473474095826295026660433593848747⟩, + ⟨-1016559435706617664065000651397424703018539126115047285553,-1016559435706617664032924530915850497734255477614131760924⟩, + ⟨1128220451354455372246639636852618853169357284776461416899,1128220451354455372264733136449086346395885999770651312600⟩] +lemma bs0_6_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 2 r = bs0_6_0_2 r := by + revert r + decide +kernel +def bs0_6_0_3 : Fin 8 → RI := ![⟨-26653061580193747781384360453410529662954498062350156080,-26653061580193747778684768284381660804594082347626011984⟩, + ⟨7227488872103603992134967254001588796877221977089719834655,7227488872103603992136908708004680861046438391589890233105⟩, + ⟨-1092051222666739204797001277762831335341906043825136741191,-1092051222666739204756338150041813438593524030055825847418⟩, + ⟨628512625903897079021909726371672918485059012177628846508,628512625903897079036956120700432863191805921927419781316⟩, + ⟨1036692198082074215197320545926619780020749803387316259293,1036692198082074215240419195479468997273199840455929888194⟩, + ⟨841477259688765410169694503036557450921056002740962036585,841477259688765410188192124580601065468781594855676137995⟩, + ⟨-985933674528882860010240066446114610258817346626323620539,-985933674528882859977720837569662922288071399714564663683⟩, + ⟨1093632092772412952688280127855727035925898257515562629852,1093632092772412952706623576057078607688083590412597664525⟩] +lemma bs0_6_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 3 r = bs0_6_0_3 r := by + revert r + decide +kernel +def bs0_6_0_4 : Fin 8 → RI := ![⟨-25731656095754346160482261637917195406690679169049916656,-25731656095754346157744982168686318617154702511349764507⟩, + ⟨6843995028117202722820383511416509063453266756921129421500,6843995028117202722822352068831989249718152666275653086877⟩, + ⟨-1055749972655723073227652826596978511512164563678348169686,-1055749972655723073186422026647827445443822288458915024579⟩, + ⟨607681255143058218089515586382324047055984898891342972622,607681255143058218104772033913420347934952337811256393389⟩, + ⟨1002263632963470070736931917634722146392347711209195325900,1002263632963470070780632240196877388350690123467475649946⟩, + ⟨813563862025776223327591723303143723280728303862612044566,813563862025776223346347578451653073732714807385835222334⟩, + ⟨-954359239077389031495510425714516155420124838122783372555,-954359239077389031462537216435058316445440886813300091713⟩, + ⟨1058021137468222637608108115517016619135307049487017717323,1058021137468222637626707645006125592126237707174868233627⟩] +lemma bs0_6_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 4 r = bs0_6_0_4 r := by + revert r + decide +kernel +def bs0_6_0_5 : Fin 8 → RI := ![⟨-24791253844992619417530808878090957022027578507050359505,-24791253844992619414754909719351447820330724544409669940⟩, + ⟨6467770054025379540140267599406842855713759994697319528993,6467770054025379540142263930777088718829534143559503683880⟩, + ⟨-1018553435198733760566114857653743239602614426582477449227,-1018553435198733760524302341182694998569936024310226519219⟩, + ⟨586329031913429151248637696579946333912441827877118828260,586329031913429151264109394060258350175530565773328154769⟩, + ⟨966981496637236121435580943999631284849169577334177962448,966981496637236121479897825049146440217249842197268629841⟩, + ⟨784956742270680575092628340874806699550800809449784574109,784956742270680575111648818364842586009515969679684421664⟩, + ⟨-921912790507981435420755062231325531233578842631475867869,-921912790507981435387316641007444622089370136722425404766⟩, + ⟨1021475274119139876888975307108335999278159576415948752794,1021475274119139876907837253373630416957438445803683851517⟩] +lemma bs0_6_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 5 r = bs0_6_0_5 r := by + revert r + decide +kernel +def bs0_6_0_6 : Fin 8 → RI := ![⟨-23834259243641684502553196002759936787956667236696165472,-23834259243641684499737713617336024606146624688674685622⟩, + ⟨6099422312978942211726108983850970468315758586181691300105,6099422312978942211728133782118837648942663714202965428329⟩, + ⟨-980557971044448735957155177121044865903743205108579833557,-980557971044448735914746430663548810529940392356876592370⟩, + ⟨564511398503294906487180435901488892787129768454984219485,564511398503294906502872753683052827433246265656598727974⟩, + ⟨930937336749127502473871911855524177246243286606131469027,930937336749127502518820734142268031844367945695371143671⟩, + ⟨755729967544463481612385635984728250767408140977770139876,755729967544463481631677337978735765370588461521460771492⟩, + ⟨-888675906193933357057839016488454393876230629793322390653,-888675906193933357023923776572175661266254036740794179296⟩, + ⟨984087495578260097812712523965080679749968433347401008962,984087495578260097831843434141521975799675098313964428817⟩] +lemma bs0_6_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 6 r = bs0_6_0_6 r := by + revert r + decide +kernel +def bs0_6_0_7 : Fin 8 → RI := ![⟨-22863179748351501366663678030708948727192452659153270637,-22863179748351501363807616372962039806525409682562697220⟩, + ⟨5739526840589547812052049954377810024241355619901521232452,5739526840589547812054103935865124507978390285387133601775⟩, + ⟨-941864831341735201145727343276243296343455404900617063876,-941864831341735201102707363702757467626181950531641081898⟩, + ⟨542286643798371418790573267314969206523337375069744205798,542286643798371418806491756938356527703684241288672681413⟩, + ⟨894227364494402964440351100046473585810588937446260179230,894227364494402964485947765313836822663399464482887381643⟩, + ⟨725961395253838675029723576834367080955421942081988954480,725961395253838675049293328242971564101784188752656789719⟩, + ⟨-854734927567150183799374456452366291925153334043826556367,-854734927567150183764970399499475153624196224158591482350⟩, + ⟨945955904180255832063815984711043714723039946518983313844,945955904180255832083222626825219330509929807689034951877⟩] +lemma bs0_6_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 7 r = bs0_6_0_7 r := by + revert r + decide +kernel +def bs0_6_0_8 : Fin 8 → RI := ![⟨-21880618939336563517630888467479063413326935521228991142,-21880618939336563514733217559465948467815926046062711263⟩, + ⟨5388623845667517190902782736786385042222356747371817869842,5388623845667517190904866642217921291600208652530928982318⟩, + ⟨-902579895943653474394592945093776740754794697518234874995,-902579895943653474350946218162876239436175821640390756635⟩, + ⟨519715752749053520831328471467575182792524103635884564327,519715752749053520847478873597789508566344171743077669481⟩, + ⟨856952205344201843720948304115315464756866134291039846303,856952205344201843767209255831665872494567754795616633775⟩, + ⟨695732473388595710702642979351291791914311900234970288960,695732473388595710722497837589471249929713312623041791480⟩, + ⟨-820180781131989720009337682883305604603813922853261887390,-820180781131989719974432401801780227235506277228166390947⟩, + ⟨907183486938505583063124695781564768306824478199792329887,907183486938505583082814068426545139380196614292817446641⟩] +lemma bs0_6_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 8 r = bs0_6_0_8 r := by + revert r + decide +kernel +def bs0_6_0_9 : Fin 8 → RI := ![⟨-20889268953946717180584454558629070097057767920629269310,-20889268953946717177644108999031212639818886471523150017⟩, + ⟨5047217382448408360933556381898635767615677653283425314305,5047217382448408360935670977474443584686778482969483900269⟩, + ⟨-862813381329045835266693729314111909229745615992315173946,-862813381329045835222404207212948710803094621966575071430⟩, + ⟨496862238122793865691590312272435429022095465095964485746,496862238122793865707978565009515207739068222530876152751⟩, + ⟨819216620735082443641571442349529696611952563479121774789,819216620735082443688513689512968623257635550711617237589⟩, + ⟨665128017343906663927645017861334479621439761968086082241,665128017343906663947792283065244957245649533877931085671⟩, + ⟨-785108772555072801750949295999784899336021638457154075306,-785108772555072801715529956988390668625630694446945849886⟩, + ⟨867877860705584475164481495959557286399826263326429488046,867877860705584475184460838426566348153534990307316172926⟩] +lemma bs0_6_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 9 r = bs0_6_0_9 r := by + revert r + decide +kernel +def bs0_6_0_10 : Fin 8 → RI := ![⟨-19891902290914878132503516157696669485421334388215026459,-19891902290914878129519393559316371049534488021994433814⟩, + ⟨4715774198890486198416394382399381611235714502728013281172,4715774198890486198418540460918485249767404724851458361381⟩, + ⟨-822679518704051743587808454980473514837329081359979048188,-822679518704051743542859532789261090040750548497201936665⟩, + ⟨473791954861126999460739784112092718387919936110111332496,473791954861126999477372031699852172948975615292053012210⟩, + ⟨781129201259600965784682626958581490598568925042175974265,781129201259600965832323769042121127361216972751777728472⟩, + ⟨634235963683250705867284065451456199271213492177030991687,634235963683250705887731291184717336169746322468094214066⟩, + ⟨-749618353903385505298558822347570891389767553538545313909,-749618353903385505262612146073973027276726437270591385563⟩, + ⟨828150987569999394886568841585914126837787882811065529996,828150987569999394906845644481380466959591927633499632929⟩] +lemma bs0_6_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 10 r = bs0_6_0_10 r := by + revert r + decide +kernel +def bs0_6_0_11 : Fin 8 → RI := ![⟨-18891363010045490862871507661194263160312847629111530124,-18891363010045490859842467012571225040528540821020408849⟩, + ⟨4394722764434429504094274954727194957715895815886112174342,4394722764434429504096453336765862241009099421075416675172⟩, + ⟨-782296203074272708682141483971905419706260675669127176667,-782296203074272708636515974985452192255073929515051856829⟩, + ⟨450572897494364291128338999447508096444967445823413973317,450572897494364291145221601405199248863421757273809594249⟩, + ⟨742802032114795310577349339515041210769342127387124635069,742802032114795310625707592623190206009821555791115079072⟩, + ⟨603147101433184361327539293287696630916550804156933831910,603147101433184361348294297767604712162982156456137904534⟩, + ⟨-713812864279457759394177277354072066267750164157505657311,-713812864279457759357689519218904176517703621861069699017⟩, + ⟨788118860970372431264307680387074504958370288966281193729,788118860970372431284889696765276534641147268502647703647⟩] +lemma bs0_6_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 11 r = bs0_6_0_11 r := by + revert r + decide +kernel +def bs0_6_0_12 : Fin 8 → RI := ![⟨-17890557357135653332245479630160464763009614243943500689,-17890557357135653329170339576599657824196499357751083210⟩, + ⟨4084452479415873128961669897502971477034148880503661592120,4084452479415873128963881432650939536105176347235201765348⟩, + ⟨-741784614310479295192400988094536128554886125672035899638,-741784614310479295146081097929896217002076701786746932276⟩, + ⟨427274981202774124200690042018383714086268470928431362852,427274981202774124217829582721525974054789266290090016423⟩, + ⟨704350331788042357001267081669944780802679274988242781294,704350331788042357050361305981882189331032722448005633237⟩, + ⟨571954781679830767461058782283851413743688028845809794265,571954781679830767482129660159786616346868751382095554596⟩, + ⟨-677799244285176589632545903747817373170871908020428950395,-677799244285176589595502833177980367873648271675826129450⟩, + ⟨747901163222375424747415860937794433765861077117724936622,747901163222375424768311117981097344266258352899192030970⟩] +lemma bs0_6_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 12 r = bs0_6_0_12 r := by + revert r + decide +kernel +def bs0_6_0_13 : Fin 8 → RI := ![⟨-16892443848916242676057478766528948707742892518433522138,-16892443848916242672935015805546166998911120880551266955⟩, + ⟨3785313067122835098512796596807766184756637539323253866359,3785313067122835098515042164966015060003085346640947801588⟩, + ⟨-701268811464517700639687972457787010808522893295260368761,-701268811464517700592655271872810825948064861087512286390⟩, + ⟨403969807249842805748371062522869818325285711044695939170,403969807249842805765774361261079502727962822956676690278⟩, + ⟨665892065183871170784483314048091501227805585051006187092,665892065183871170834333042627151652480217577154525106220⟩, + ⟨540754606417011482204126403545017698749437125328677643283,540754606417011482225521538263261877342328541066721988718⟩, + ⟨-641687724933440589540563070088218159494761246960190077769,-641687724933440589502949948799256436661029420637935340418⟩, + ⟨707620895371798012334076249248191754965199854584985828696,707620895371798012355293060528807417329555842403691189259⟩] +lemma bs0_6_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 13 r = bs0_6_0_13 r := by + revert r + decide +kernel +def bs0_6_0_14 : Fin 8 → RI := ![⟨-15900022857709879799650674636326650738067031473830467718,-15900022857709879796479621222209907162975053054313505982⟩, + ⟨3497614148305669069678753840483484513663711995183818219720,3497614148305669069681034353227371522570509991935255001828⟩, + ⟨-660875301825096323266798552238868050507406305634082941638,-660875301825096323219033948581792734376686338904009925606⟩, + ⟨380730413649613524302708530673149519470703712388875388815,380730413649613524320382652214519544768078947874226166321⟩, + ⟨627547532618687589787678090893638740112239385493510413149,627547532618687589838303559947750262202543209063159042297⟩, + ⟨509644097775614027318494172104196612562938865770561952297,509644097775614027340222248895489875429647654618202839338⟩, + ⟨-605591491817832899888785609552842046107673170157423831899,-605591491817832899850587168716531077389461172616632858855⟩, + ⟨667403980507243507726487657757656575687596328049475650455,667403980507243507748034636116951847258553350356243199906⟩] +lemma bs0_6_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 14 r = bs0_6_0_14 r := by + revert r + decide +kernel +def bs0_6_0_15 : Fin 8 → RI := ![⟨-14916325740271064852782648011180620954173193683698197455,-14916325740271064849561690563031714627948452816299967839⟩, + ⟨3221624996788446833711590906616266392335158146101216584796,3221624996788446833713907308628074243859971548138818871404⟩, + ⟨-620732586432957674582343651876387992788858360353394802204,-620732586432957674533827359081579327325876790129706025247⟩, + ⟨357631012064681778300913744728463311893920639487368241878,357631012064681778318866010421903922013823949951292431359⟩, + ⟨589438936330633875606273491587090824314236715636887176173,589438936330633875657695672270142592932115285341639084769⟩, + ⟨478722348941199334605625232936857821431649400944280673934,478722348941199334627695252465309543749983641526164808141⟩, + ⟨-569626325543107025685884998314333474808253253832653244680,-569626325543107025647085414563591628018140069256541521368⟩, + ⟨627378841886012309119705252160160596774143707575640367670,627378841886012309141591323243807828876747015184900078207⟩] +lemma bs0_6_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 15 r = bs0_6_0_15 r := by + revert r + decide +kernel +def bs0_6_0_16 : Fin 8 → RI := ![⟨-13944403559845164509190891507749218786966782472452135025,-13944403559845164505918668315008239107241508979154366558⟩, + ⟨2957574473708547111789311499719895454929686001661511098267,2957574473708547111791664770295107116054110070563660255710⟩, + ⟨-580970683999026219668773497794482403745440008787177793604,-580970683999026219619485004833993680617240305166794660168⟩, + ⟨334746712062693612531391548285642681558664103469982696320,334746712062693612549629547734609283345175507257891470175⟩, + ⟨551689926366524866174792433735830811366179012954753004461,551689926366524866227033065585709925895219139529795796818⟩, + ⟨448089658240059553024965873556332277522686276068937337406,448089658240059553047387166270779641495906696820006661996⟩, + ⟨-533910219611761650916145166713289813052403303387887602381,-533910219611761650876728036912171848798926601453862108826⟩, + ⟨587675957444565678922597048668569765995314092151132095088,587675957444565678944831465158290101083558348072372538685⟩] +lemma bs0_6_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 16 r = bs0_6_0_16 r := by + revert r + decide +kernel +def bs0_6_0_17 : Fin 8 → RI := ![⟨-12987315454800866448543712073775186439574192359426121683,-12987315454800866445218811092839075764196738464355715994⟩, + ⟨2705651136835858559002235208403300474653449356120871238849,2705651136835858559004626363035195450883703187134982844559⟩, + ⟨-541720635384877864442353418437313433515917170331081710795,-541720635384877864392271456132027576352818554143838862335⟩, + ⟨312153233985626264282875070554057688152897234250506462552,312153233985626264301406673897274720985116771244570571168⟩, + ⟨514425127914477376403315694651867305334317745308555681492,514425127914477376456397320767166728002429570844931469683⟩, + ⟨417847148040952121690358556333333713089336892951297766767,417847148040952121713140797564924405741503364995475211367⟩, + ⟨-498562977152460932354803500429239972577374444740657781078,-498562977152460932314751815131051927589242839563856134390⟩, + ⟨548427392478299299542043535000026029165831757192901404939,548427392478299299564635891585337250115189611997023059919⟩] +lemma bs0_6_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 17 r = bs0_6_0_17 r := by + revert r + decide +kernel +def bs0_6_0_18 : Fin 8 → RI := ![⟨-12048116711199803544298658043945475470505764227285708740,-12048116711199803540919614579067465235344661947352442881⟩, + ⟨2466003520403616577570512948139885077607216848723686418608,2466003520403616577572943040187356916276618536377688602143⟩, + ⟨-503113991009702902757124905900123046552883845164448433777,-503113991009702902706227411987853069914364260898380736054⟩, + ⟨289926611806202512850237905822753654904091127109019206880,289926611806202512869071276659908330656021765132637765378⟩, + ⟨477769652346983121927044253380801865538319287603293670007,477769652346983121980990257444969368262669277406283731686⟩, + ⟨388096370278564802706664453998711152575986127568874928943,388096370278564802729817679851394206474726082081489413840⟩, + ⟨-463705788062608340263137900266860325250151767201949499037,-463705788062608340222434015778324301318310443019949833875⟩, + ⟨509766312481883897984357186241196568247332920262013097579,509766312481883898007317435377460384838936004342558920091⟩] +lemma bs0_6_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 18 r = bs0_6_0_18 r := by + revert r + decide +kernel +def bs0_6_0_19 : Fin 8 → RI := ![⟨-11129846600313700967066829858954552273823212498714097986,-11129846600313700963632124120151459822896179032875921079⟩, + ⟨2238740579927648633802586077945313788767882564302363545264,2238740579927648633805056200389139306187989987076781400127⟩, + ⟨-465282283739266310390966978942496373270538307522721939459,-465282283739266310339231061293493021336181037426748719061⟩, + ⟨268142887457992828407834614937061781057955186070203912572,268142887457992828426978223940004416512924138101969130276⟩, + ⟨441848594422301489220820306433472480842012089158627671211,441848594422301489275654951702513633641366866878892248189⟩, + ⟨358938900553435312793800221880857923311479374392925078311,358938900553435312817334845964617426667693913557810712657⟩, + ⟨-429460788318043023413049059316588128563822782156822671740,-429460788318043023371674668280446433179762559137711891087⟩, + ⟨471826478338823394675210756833813484537595625097787881096,471826478338823394698549225336001622663960417992192620921⟩] +lemma bs0_6_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 19 r = bs0_6_0_19 r := by + revert r + decide +kernel +def bs0_6_0_20 : Fin 8 → RI := ![⟨-10235516045332883938271520986353910854541110776317395561,-10235516045332883934779575516549776285993048348010575325⟩, + ⟨2023932295606717373452650979256639520526532184963170219611,2023932295606717373455162266549788763849417466135779528765⟩, + ⟨-428356489987720155700392242958118924537108631326310510336,-428356489987720155647794140820925460086135244092326966089⟩, + ⟨246877798228631429148934192018364493948241190389670227966,246877798228631429168396831271130632089119435030224909141⟩, + ⟨406786518259777297710108084021868444268284014696781977861,406786518259777297765856554399674996168561183514261109361⟩, + ⟨330475922899641093346300606592090512548969751161517094325,330475922899641093370227437652172694710653434866225730097⟩, + ⟨-395950603375629354654928159333272367750838901232050399435,-395950603375629354612864259735715436318380868949935299749⟩, + ⟨434741726234835014763465700117076309679896354474997028627,434741726234835014787193106642062078634260016453680743984⟩] +lemma bs0_6_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) 20 r = bs0_6_0_20 r := by + revert r + decide +kernel +def bs0_6_0 : Fin 21 → Fin 8 → RI := ![bs0_6_0_0,bs0_6_0_1,bs0_6_0_2,bs0_6_0_3,bs0_6_0_4,bs0_6_0_5,bs0_6_0_6,bs0_6_0_7,bs0_6_0_8,bs0_6_0_9,bs0_6_0_10,bs0_6_0_11,bs0_6_0_12,bs0_6_0_13,bs0_6_0_14,bs0_6_0_15,bs0_6_0_16,bs0_6_0_17,bs0_6_0_18,bs0_6_0_19,bs0_6_0_20] +lemma bs0_6_0_mem (d : Fin 21) (r : Fin 8) : (bs0_6_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 6 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_0) d r = bs0_6_0 d r := by + fin_cases d + · exact bs0_6_0_0_calc r + · exact bs0_6_0_1_calc r + · exact bs0_6_0_2_calc r + · exact bs0_6_0_3_calc r + · exact bs0_6_0_4_calc r + · exact bs0_6_0_5_calc r + · exact bs0_6_0_6_calc r + · exact bs0_6_0_7_calc r + · exact bs0_6_0_8_calc r + · exact bs0_6_0_9_calc r + · exact bs0_6_0_10_calc r + · exact bs0_6_0_11_calc r + · exact bs0_6_0_12_calc r + · exact bs0_6_0_13_calc r + · exact bs0_6_0_14_calc r + · exact bs0_6_0_15_calc r + · exact bs0_6_0_16_calc r + · exact bs0_6_0_17_calc r + · exact bs0_6_0_18_calc r + · exact bs0_6_0_19_calc r + · exact bs0_6_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 6 0 tr0_6_0_mem) d r +lemma bs0_6_0_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 6 0) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs0_6_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_6_0_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_6_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_6_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 0 6 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 6 0) _ bs0_6_0_lower e he hτ +def bs0_6_1_0 : Fin 8 → RI := ![⟨-29280925492483197661529090510135276643002449089894503506,-29280925492483197658937258199671573469788883995361141617⟩, + ⟨8415036147828304469747236139636678373430653912212722629295,8415036147828304469749100096449206599937300617821340337732⟩, + ⟨-1194697631141871243000266083118494003340415018386147030548,-1194697631141871242961226109051013265826686999138067184371⟩, + ⟨687372558927168941907864001324247237692149698837177433361,687372558927168941922309787404249446929952009046054347176⟩, + ⟨1134015354857086076204513848146876118737750005557528020457,1134015354857086076245892125106379592623864487108491994198⟩, + ⟨920374832323633262213516438321183098835416731841491427881,920374832323633262231275688675349226521846918325144650531⟩, + ⟨-1074683599071395642677643063866124309106244693977616625868,-1074683599071395642646421907914967083685583379162534831880⟩, + ⟨1194006103070178174427172199685732067670440761042588201209,1194006103070178174444783430848396767893660187988910156309⟩] +lemma bs0_6_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 0 r = bs0_6_1_0 r := by + revert r + decide +kernel +def bs0_6_1_1 : Fin 8 → RI := ![⟨-31834252053848221633345273574754221932043405153459309856,-31834252053848221630648248411332622556067186406012831193⟩, + ⟨9619064906371152035103890995896263488113067461979357040218,9619064906371152035105830603797055920491789184930816454511⟩, + ⟨-1293965851508577523770000078547552446166174710245172347401,-1293965851508577523729375616843600607579959010860480932927⟩, + ⟨744272080742335653606730888283518633982217983408166922342,744272080742335653621762975199823425331510771068098032771⟩, + ⟨1228120323862821259272316700087343613143129910082488450863,1228120323862821259315374367718415019693856467749361772826⟩, + ⟨996659517951323899116224940343877664578180832685592110186,996659517951323899134704972750271105044807449269070638116⟩, + ⟨-1160239686504157589126395742995838452791369059529977394158,-1160239686504157589093907436213399539795410945634731087289⟩, + ⟨1290912432024698862925238410389219800643999272565689993177,1290912432024698862943564416054278707928194461877916441338⟩] +lemma bs0_6_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 1 r = bs0_6_1_1 r := by + revert r + decide +kernel +def bs0_6_1_2 : Fin 8 → RI := ![⟨-34157785143701826338178132452471710872967447989253505866,-34157785143701826335368295645549223059329023857833362074⟩, + ⟨10870444928368777478318503942190899393994013288702985737831,10870444928368777478320524680352538288148840970079610270198⟩, + ⟨-1382858226512669402513419812539070454578579356894409149897,-1382858226512669402471096103696633330743070889564682197540⟩, + ⟨795151833305573477900929591233678140900327076531496692164,795151833305573477916590442928864794003042460099115995668⟩, + ⟨1312341663471292992306857916012915487319324538122000752156,1312341663471292992351716607348684763445330342877932138976⟩, + ⟨1064920336098157128270384313693459041214420669110275177955,1064920336098157128289637332150079775982970264253643503485⟩, + ⟨-1236014828250489406746279879697850878346108713152391632074,-1236014828250489406712432646298067584454033591485464313823⟩, + ⟨1377185869264838462791197466829980243315012141027688436540,1377185869264838462810290015887293252324112110941203884806⟩] +lemma bs0_6_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 2 r = bs0_6_1_2 r := by + revert r + decide +kernel +def bs0_6_1_3 : Fin 8 → RI := ![⟨-36195891993400737900889465314403825374780223740395391946,-36195891993400737897958458036928110978302689956989003236⟩, + ⟨12150337548824210331012233470382680368624674619287491742265,12150337548824210331014341350186597735666717402245890667209⟩, + ⟨-1459203226818112711741821113300873840266076246196777625290,-1459203226818112711697672250875281334217225225004680950623⟩, + ⟨838764995968361510183971682678652331974333990074352314234,838764995968361510200307887748375750346276318322803097321⟩, + ⟨1384617778877600529326969566621664316922358977510615453117,1384617778877600529373762729285092856284840605417403459021⟩, + ⟨1123490428630201088729648912239355433859089808366293947435,1123490428630201088749732191478758310945422333732396615928⟩, + ⟨-1300214115095792514015259172869212360944084944433145877261,-1300214115095792513979952322602241308403182993080827985916⟩, + ⟨1450757785628769573819079291023628370200418066433802852249,1450757785628769573838995180834218264528724547855363080055⟩] +lemma bs0_6_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 3 r = bs0_6_1_3 r := by + revert r + decide +kernel +def bs0_6_1_4 : Fin 8 → RI := ![⟨-37902641564584653721767078249354843306343512885582393794,-37902641564584653718705705024509676855727894464025737944⟩, + ⟨13437647122247124657382241407026298869651034541901463962196,13437647122247124657384443041543712100829144158727116089217⟩, + ⟨-1521274082863917554901359165206688731317806619080874519415,-1521274082863917554855246640554834035203644400036412821405⟩, + ⟨874123189429124144678361709124647401477640483050009256689,874123189429124144695424519299392080251089035492700635205⟩, + ⟨1443311104306763803003684521486228922444465228374474284153,1443311104306763803052558960108571987345126733743153318223⟩, + ⟨1171046937436810242423699897077277579238470417450129962252,1171046937436810242444676444561166176798592002051781744496⟩, + ⟨-1351459077541267018481349391652552354986142458326463066790,-1351459077541267018444472156003595694375001614772306610640⟩, + ⟨1510013467919150654989275125583685385906228370219390094676,1510013467919150655010076838456760590661003624506031711554⟩] +lemma bs0_6_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 4 r = bs0_6_1_4 r := by + revert r + decide +kernel +def bs0_6_1_5 : Fin 8 → RI := ![⟨-39242995360608063033553555066991258188338321627187937966,-39242995360608063030351674403136239253265857591719857608⟩, + ⟨14709500882028370143603614867637164011091183770173217968157,14709500882028370143605917550280672383864847531369006935951⟩, + ⟨-1567829939493353417673664273296533874378222423749698778262,-1567829939493353417625435328244559100710263662813231176883⟩, + ⟨900519985479743264107120299108377760983719463563604586115,900519985479743264124966238808427938531776493089431462531⟩, + ⟨1487247233743259099477044278564298715693207972301882724812,1487247233743259099528161900784543468136579760619380461540⟩, + ⟨1206642220655082634847981930575074684986049188890686809636,1206642220655082634869921235864343930619453358471073801500⟩, + ⟨-1388811846159693658195107964644921491909716428433041474011,-1388811846159693658156538179425077042118308301224566571698⟩, + ⟨1553824928573413459907425949221660359462148064125591127892,1553824928573413459929182395538832324240267125274740559363⟩] +lemma bs0_6_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 5 r = bs0_6_1_5 r := by + revert r + decide +kernel +def bs0_6_1_6 : Fin 8 → RI := ![⟨-40193503139292089973388497635831982593749598157138886145,-40193503139292089970034897422905678294764616814212160524⟩, + ⟨15941838789526540569423610120463107083296395043229502381786,15941838789526540569426021914597320579314242457484289980344⟩, + ⟨-1598134582032857450081212268265323693641114314533088072120,-1598134582032857450030698018242909274774305156054536590510⟩, + ⟨917541358752878046833421653351711140702346088488629413367,917541358752878046852113214175331626291647387538547053739⟩, + ⟨1515732618441690888084067526807377773848522190176387231770,1515732618441690888137607332553001897831967386490409243162⟩, + ⟨1229717775867618310343904862397831188798847670312650649087,1229717775867618310366883750937153113520207023632861561607⟩, + ⟨-1411780239148751873237516291185697367196688496466568429152,-1411780239148751873197118895559726991477723733410533274419⟩, + ⟨1581562073862745876055164172075474317215495510148828057217,1581562073862745876077951536959247007263160800579843735766⟩] +lemma bs0_6_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 6 r = bs0_6_1_6 r := by + revert r + decide +kernel +def bs0_6_1_7 : Fin 8 → RI := ![⟨-40742491962721987814460422905920099419288059139256363077,-40742491962721987810942677705409146225837211130035914403⟩, + ⟨17110095931964545002497587026444713209194902305537400616042,17110095931964545002500116868018407040875132729423789086918⟩, + ⟨-1611952910590316570158583663503593925330302792121008563316,-1611952910590316570105596947946592978062625258229434466740⟩, + ⟨925063203107661292345700540432033179412510809860006232715,925063203107661292365306976561318351744197724876698913682⟩, + ⟨1528551003594813406584794184168866448740468190299048512571,1528551003594813406640954544003539940826642452036680478047⟩, + ⟨1240101040712972070639035442826583426258135348482114994155,1240101040712972070663139053794386565490013696867709423314⟩, + ⟨-1420304668351744026342012626588890587006615096900822193097,-1420304668351744026299637943993275930890099180225899119734⟩, + ⟨1593082891112258914711930355172886687841787464950822977090,1593082891112258914735833068186483410545186602068563053465⟩] +lemma bs0_6_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 7 r = bs0_6_1_7 r := by + revert r + decide +kernel +def bs0_6_1_8 : Fin 8 → RI := ![⟨-40889767765862852993367694933181101154666647496964051099,-40889767765862852989672001812694317710538724474357796900⟩, + ⟨18189952881803892833492476765714770100371515195298602515268,18189952881803892833495134581323022679186658878601735976707⟩, + ⟨-1609526688682824173708967735130638192813454600853167362202,-1609526688682824173653300644707685630399139016055834125969⟩, + ⟨923236822777551637542108034504879371290898140886543506020,923236822777551637562706277694973873083875343298321048142⟩, + ⟨1525940070287127770333872972264291071018396075306102816895,1525940070287127770392874248268261717023849192184113753770⟩, + ⟨1237986275978317797538497926098714982967053285221343900233,1237986275978317797563820837269657744911633017192711515136⟩, + ⟨-1414728743392148603598037183199242632938655443060993485153,-1414728743392148603553518943809017112334406467816708012642⟩, + ⟨1588704509052708750327392645398602696907399662622154188908,1588704509052708750352504496032971817971053704510876853434⟩] +lemma bs0_6_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 8 r = bs0_6_1_8 r := by + revert r + decide +kernel +def bs0_6_1_9 : Fin 8 → RI := ![⟨-40645876437343826938852803561378993678729869985899335334,-40645876437343826934963792522041243246852808326192912424⟩, + ⟨19158123179300002179111374010788625342515526908218914898591,19158123179300002179114170854006927971083890369243296020083⟩, + ⟨-1591532259133925412553975462014212907689635939513637293179,-1591532259133925412495396483152781593639874291824133626838⟩, + ⟨912463987841535894613581442700975565730405258144609399495,912463987841535894635257158878260073030866770464515208218⟩, + ⟨1508550867409263164893235015235149986331689563416056191053,1508550867409263164955322587508067418722207288195117754174⟩, + ⟨1223901628180996765402761413347901391267255291093682923771,1223901628180996765429408940045495491928587153686607546020⟩, + ⟨-1395756252663865861547825850575749640212510618930572051652,-1395756252663865861500978907716986938622458369119426272467⟩, + ⟨1569157979720593555940845541481231616466274126655506614113,1569157979720593555967270967281201270324602806756209242418⟩] +lemma bs0_6_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 9 r = bs0_6_1_9 r := by + revert r + decide +kernel +def bs0_6_1_10 : Fin 8 → RI := ![⟨-40030993934280674549892986805297973802024488044773161320,-40030993934280674545793501097692558079309305980055956939⟩, + ⟨19993142423528877971368580353503478449350040363446531594942,19993142423528877971371528562876967084173011314658506219531⟩, + ⟨-1559023808163832950976085799542819221607488928995792848099,-1559023808163832950914336505395730597113719013977478351302⟩, + ⟨893363658611061414527212733568775932483574861392517564724,893363658611061414550061547257652454158994977644735498270⟩, + ⟨1477393468783782048611673545349371017626061061469851125991,1477393468783782048677121319238647952688950902360158860893⟩, + ⟨1198665144709705059501895818249278414339836893140211739318,1198665144709705059529985518622356730586268053296732031604⟩, + ⟨-1364397753642006744111389296549005664344871018882876865110,-1364397753642006744062006980389415448192919994784681152669⟩, + ⟨1535530350581091709088446173324444897927543853576983025077,1535530350581091709116301752619060660084940720560535805952⟩] +lemma bs0_6_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 10 r = bs0_6_1_10 r := by + revert r + decide +kernel +def bs0_6_1_11 : Fin 8 → RI := ![⟨-39073530566657234162994554746201980910611526151752901216,-39073530566657234158665395432385335488899580137932247268⟩, + ⟨20676120960975466206026536645425181305118956218212051100647,20676120960975466206029650028170865569241304020022643748600⟩, + ⟨-1513366307098347622334006791728026593752484974100573927223,-1513366307098347622268797994589529266375986723152116735658⟩, + ⟨866732798861019125937391999379045952359293611590759037295,866732798861019125961520917406118298877863034332119835357⟩, + ⟨1433772814964206286608329998098344622298077567051237980574,1433772814964206286677444482234478941505054307029459501925⟩, + ⟨1163332929097046080856234728064911705966698002691707843707,1163332929097046080885898153350221217923441748860169765537⟩, + ⟨-1321910285647735249344790534170512994658801086797440574351,-1321910285647735249292641574718997293771290722821038021758⟩, + ⟨1489198000017628199455513132215757271007298532038669620341,1489198000017628199484929319792842295571350821969342418640⟩] +lemma bs0_6_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 11 r = bs0_6_1_11 r := by + revert r + decide +kernel +def bs0_6_1_12 : Fin 8 → RI := ![⟨-37808542570316283121483232026959860029331089439404992485,-37808542570316283116902859975215789917821991514117026034⟩, + ⟨21191422272233624296645892770266079900592005205663654793365,21191422272233624296649186816587984343605899456460774158801⟩, + ⟨-1456162452292802909982619122396257987097310838887065292200,-1456162452292802909913626384940535424775257686583928385010⟩, + ⟨833503803403574841582248961013760129064049645539731395924,833503803403574841607778033464068357592841187513875441757⟩, + ⟨1379218879865523423799556436778930510013657815799643849018,1379218879865523423872681500691789192440223042612930191909⟩, + ⟨1119142764010647135779183926413648993629116909077586128300,1119142764010647135810568662869565410355106818230392226836⟩, + ⟨-1269733728815980888910785741388026120466316299343760671497,-1269733728815980888855610678729937380332751381845360260223⟩, + ⟨1431755293367863131893134964194425865493284020820206268021,1431755293367863131924258116215251425690714452629932991891⟩] +lemma bs0_6_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 12 r = bs0_6_1_12 r := by + revert r + decide +kernel +def bs0_6_1_13 : Fin 8 → RI := ![⟨-36276044658916528944406187222918100361426067542030060674,-36276044658916528939550374256957679608116205242641137871⟩, + ⟨21527232036402296749602849592632168353609017061262753646781,21527232036402296749606341726602850692644761306027656380106⟩, + ⟨-1389177781804940356717657736594495945472795684275082881600,-1389177781804940356644516117243205075447332509649593604625⟩, + ⟨794700975933982569171082203204896042483362750139453266487,794700975933982569198146467769942428277852566491865493167⟩, + ⟨1315415162878173210329396206685560417162906889456581825146,1315415162878173210406918650163546361589408943340540665911⟩, + ⟨1067456414183013264166361479471697623521017785812000714726,1067456414183013264199633538705980559278536008543830163383⟩, + ⟨-1209427104367328630217891552255136050253080961853396928475,-1209427104367328630159398534303087987921202879231800659969⟩, + ⟨1364942410378113774403889854619443079857287700759587439981,1364942410378113774436884599023655952424249394690112348058⟩] +lemma bs0_6_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 13 r = bs0_6_1_13 r := by + revert r + decide +kernel +def bs0_6_1_14 : Fin 8 → RI := ![⟨-34519311390633880764885234374642268519507921519276847888,-34519311390633880759726653458916469668213336458885723064⟩, + ⟨21675988347650824206361448356851541752705775614366787093581,21675988347650824206365158231136745743759035569668637421699⟩, + ⟨-1314267729610287672605487924840552122244582677368377294285,-1314267729610287672527785804850051414856289443185649946609⟩, + ⟨751398242644148197943863269396604146434051107502933933667,751398242644148197972615035509514099186803026372024206687⟩, + ⟨1244129102992623293829694515264260573739536140021744466270,1244129102992623293912050610994275606564669911966160696178⟩, + ⟨1009703495336396190293824279669369556413766026947016163631,1009703495336396190329170906691835703811729055232427787047⟩, + ⟨-1142607694586786409945799500569707514874612580977092766975,-1142607694586786409883659346444719242835807283021847810429⟩, + ⟨1290575754900919686785298672672563484956093872855145382959,1290575754900919686820350693826390765179058797543728795695⟩] +lemma bs0_6_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 14 r = bs0_6_1_14 r := by + revert r + decide +kernel +def bs0_6_1_15 : Fin 8 → RI := ![⟨-32583244381847627164671026599954551396618099165273588523,-32583244381847627159178768620176959649157234585094824883⟩, + ⟨21634651224932818670773138396469448751708993083738398760803,21634651224932818670777088239842961734647810929891691712962⟩, + ⟨-1233309762357807697141561939218353070467758379309819678774,-1233309762357807697058833744093124443371462681730053600048⟩, + ⟨704679921793657648427028670876756775668920018827879659478,704679921793657648457640212974947438968199167064385981724⟩, + ⟨1167147417634242583507484919831953154553243827461818149212,1167147417634242583595168127937603989560990574638969651688⟩, + ⟨947329318017636541371904160589380607640682732729620010826,947329318017636541409537144834633838584394128191910959353⟩, + ⟨-1070895317993259466097473916858152642855809861883217377205,-1070895317993259466031314296038282063233274716223640762912⟩, + ⟨1210483755318473345171092259918416885349166232446888797608,1210483755318473345208411582040788594549975709851003951879⟩] +lemma bs0_6_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 15 r = bs0_6_1_15 r := by + revert r + decide +kernel +def bs0_6_1_16 : Fin 8 → RI := ![⟨-30512868325187226743441054809484455145029426745615437955,-30512868325187226737580056558598573005108729919725404114⟩, + ⟨21404798728523637910286995036143243211312474558793105965938,21404798728523637910291210064859749287967597456866097085373⟩, + ⟨-1148143013429882885465252495669308671471192493019029991810,-1148143013429882885376970079090262111439493215211942506784⟩, + ⟨655605938619975692099447484489326554186789291489427493893,655605938619975692132114230180780387878969348106774431030⟩, + ⟨1086218666014613007400948457809994024830979963890252756472,1086218666014613007494518557983712635821706313466244782054⟩, + ⟨881748551424849763533499331352469968639134701451820741975,881748551424849763573658926123453093019602617372340829154⟩, + ⟨-995863488908587516238942431608015906653769698417324816778,-995863488908587516168340973459700331855021343751082410074⟩, + ⟨1126450174028798278963729710947271760119329972739970205733,1126450174028798279003554584885718158576412846338131537219⟩] +lemma bs0_6_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 16 r = bs0_6_1_16 r := by + revert r + decide +kernel +def bs0_6_1_17 : Fin 8 → RI := ![⟨-28352003064197380600823617671532099117699551514097063056,-28352003064197380594553981881987923334202422222693815457⟩, + ⟨20992546879267140448610606527155905519460561030943017187152,20992546879267140448615115433960426685546325581841066941603⟩, + ⟨-1060517062576169387930802522856178424109871517510434147945,-1060517062576169387836364924535668216639892507287564716516⟩, + ⟨605182424654648688355792550875583181955422350473282008219,605182424654648688390736870793710090075851183003929570273⟩, + ⟨1003004600147013015779942834670664453955659910175273167172,1003004600147013015880036781772929730694074754010910917845⟩, + ⟨814305961783808937696138795723021309442753769333595789449,814305961783808937739098377333898701255582905669200368158⟩, + ⟨-918998577479662551362746509745260990227761157265282574428,-918998577479662551287222612646835644935268248080919368937⟩, + ⟨1040166334557283893886359843514598317372684974452322194135,1040166334557283893928961367055254995957270828229837648466⟩] +lemma bs0_6_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 17 r = bs0_6_1_17 r := by + revert r + decide +kernel +def bs0_6_1_18 : Fin 8 → RI := ![⟨-26142143070551227861795348330273283158812049260669283601,-26142143070551227855071531738091857109662228843394855006⟩, + ⟨20408300345377822912875276455023358206503137905554756798887,20408300345377822912880111993067702650954492382887863675286⟩, + ⟨-972050771549543380369980299595918069610503299349845406735,-972050771549543380268701515336111717811592064944346675187⟩, + ⟨554338208717002587182093750160184684411666880229256016756,554338208717002587219569483354141011570186934128436550077⟩, + ⟨919041158670297610957216255395452564157487263926853271549,919041158670297611064561141909926928156006929123057524845⟩, + ⟨746244912365567616004110971644078155471335415592300579037,746244912365567616050182602810092099827766599525749565253⟩, + ⟨-841667511523597483487551671610470992595842300337526824333,-841667511523597483406556722389461663998169318223744942663⟩, + ⟨953193001133572075104880634566878239154536105640345181849,953193001133572075150568269454775111732016057288744287862⟩] +lemma bs0_6_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 18 r = bs0_6_1_18 r := by + revert r + decide +kernel +def bs0_6_1_19 : Fin 8 → RI := ![⟨-23921560728399387423611353683552800134121034430627839188,-23921560728399387416381192799680325077879882436956305883⟩, + ⟨19666349779395416054477471789770485253244329508561881448929,19666349779395416054482671473245040938461543093014414390347⟩, + ⟨-884201425614261088780508489754897241746143853361049098198,-884201425614261088671602796940890722804330379631109375541⟩, + ⟨503907321877935885814767758404987666553147764878054749913,503907321877935885855065642281486011993891039831456211349⟩, + ⟨835709325907272765156769968925246706214480114748234185928,835709325907272765272198578396632892944471754568260699223⟩, + ⟨678683804974549274336053592417118431576096534079517408491,678683804974549274385594697675062857754279410892367064989⟩, + ⟨-765094057912893051398601124720253619007421411689973004586,-765094057912893051311506763116191943111672418704474402933⟩, + ⟨866932048719864456398537555330014523137323594763465234463,866932048719864456447665747051463500420624271510973946801⟩] +lemma bs0_6_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 19 r = bs0_6_1_19 r := by + revert r + decide +kernel +def bs0_6_1_20 : Fin 8 → RI := ![⟨-21724636347776322586004027928715028423735733772265824767,-21724636347776322578207563905874092086134348451892984537⟩, + ⟨18784338779241099832222723556660725928787907933484222719554,18784338779241099832228330505909874894681242200214265166230⟩, + ⟨-798243873916726886915411375654056142472578494968875485223,-798243873916726886797975632584164444869943779221494235224⟩, + ⟨454617315837438399725977354272557087767259466542657599796,454617315837438399769431574295101522532107205901463400481⟩, + ⟨754215546424871569087680733067865683385502013695129820748,754215546424871569212150300954896271878466669854375825814⟩, + ⟨612600216197081954152516368347707620763065125216579305550,612600216197081954205937786075250919637278875954138337618⟩, + ⟨-690343306302699812610151306122749069497519296765239676598,-690343306302699812516235269158694534610930524100484938122⟩, + ⟨782607564285551909303409626132584246295696944534312492102,782607564285551909356385788822781874554142459876655283179⟩] +lemma bs0_6_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) 20 r = bs0_6_1_20 r := by + revert r + decide +kernel +def bs0_6_1 : Fin 21 → Fin 8 → RI := ![bs0_6_1_0,bs0_6_1_1,bs0_6_1_2,bs0_6_1_3,bs0_6_1_4,bs0_6_1_5,bs0_6_1_6,bs0_6_1_7,bs0_6_1_8,bs0_6_1_9,bs0_6_1_10,bs0_6_1_11,bs0_6_1_12,bs0_6_1_13,bs0_6_1_14,bs0_6_1_15,bs0_6_1_16,bs0_6_1_17,bs0_6_1_18,bs0_6_1_19,bs0_6_1_20] +lemma bs0_6_1_mem (d : Fin 21) (r : Fin 8) : (bs0_6_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 0 6 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 0 6 tr0_6_1) d r = bs0_6_1 d r := by + fin_cases d + · exact bs0_6_1_0_calc r + · exact bs0_6_1_1_calc r + · exact bs0_6_1_2_calc r + · exact bs0_6_1_3_calc r + · exact bs0_6_1_4_calc r + · exact bs0_6_1_5_calc r + · exact bs0_6_1_6_calc r + · exact bs0_6_1_7_calc r + · exact bs0_6_1_8_calc r + · exact bs0_6_1_9_calc r + · exact bs0_6_1_10_calc r + · exact bs0_6_1_11_calc r + · exact bs0_6_1_12_calc r + · exact bs0_6_1_13_calc r + · exact bs0_6_1_14_calc r + · exact bs0_6_1_15_calc r + · exact bs0_6_1_16_calc r + · exact bs0_6_1_17_calc r + · exact bs0_6_1_18_calc r + · exact bs0_6_1_19_calc r + · exact bs0_6_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 0 6 1 tr0_6_1_mem) d r +lemma bs0_6_1_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 0 6 1) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs0_6_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs0_6_1_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs0_6_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_0_6_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 0 6 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 0 6 1) _ bs0_6_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs10.lean b/lean/OAI/Analysis/Triangular/Signs/Signs10.lean new file mode 100644 index 0000000000000000000000000000000000000000..26ff53baff6a29d2d8e4bc60a68093f1d4f2fff8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs10.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows10 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_0_0_0 : Fin 8 → RI := ![⟨-376225907036466717497512999227363635142277521605628478070254,-376225907036466717487707286513582077147026032135913192168319⟩, + ⟨321944781721467240656724111722731508592203035973484717430551,321944781721467240663776043647698306044843837986636396825850⟩, + ⟨-48616828985707993868775808265770014295961991842083399197330,-48616828985707993721075369274777667599695294424594740596251⟩, + ⟨788162705153727894034682243291809208871421428516441901290291,788162705153727894089335172669177490547308770178274436147084⟩, + ⟨405094550931871463200294195904828087641189561151440673005774,405094550931871463356841166472128937729524781512142279693763⟩, + ⟨111354014587842592164691465872401835894066811988800580811706,111354014587842592231880267500501186993689506705309337902279⟩, + ⟨20790397299857525087523259796120619741139325646798039995269,20790397299857525205642663052184377691165436114394125222365⟩, + ⟨33967791675520508834299113028100662359868284115313909529848,33967791675520508900927911744650360187823782851427037287065⟩] +lemma bs1_0_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 0 r = bs1_0_0_0 r := by + revert r + decide +kernel +def bs1_0_0_1 : Fin 8 → RI := ![⟨-398084715839313237712908617239324826353246554288835175590607,-398084715839313237702555991277787969779607373741532102038016⟩, + ⟨348713417363603320924951475005571621266779694541102113245666,348713417363603320932396728161187918901132028505919602364850⟩, + ⟨5304927677537298955587177061628812983457347805142501034889,5304927677537299111525602330874795009462356200951475349874⟩, + ⟨782562104401593839213307144142782966451031272281491155466596,782562104401593839271008338544688149991293610431295525820150⟩, + ⟨369423790956618154424771516479354188575706840823772349619910,369423790956618154590049888282042738928091392300559622361124⟩, + ⟨110991846768146709735503648513981519831353357024057305143798,110991846768146709806439902957310556737791037702116023605413⟩, + ⟨23228264923868416083220932138028104322026903167240424277513,23228264923868416207928440546836229079256427389523996669410⟩, + ⟨38364326014013823732482480421189505486054673840779613405930,38364326014013823802827497811812375892327270283887537475118⟩] +lemma bs1_0_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 1 r = bs1_0_0_1 r := by + revert r + decide +kernel +def bs1_0_0_2 : Fin 8 → RI := ![⟨-419042367889254901037880676727453861676333457228879833826503,-419042367889254901026922558222478499206071122618157876371052⟩, + ⟨376733609060816035449864182452349346115389015645099500415235,376733609060816035457744885056872043842269358161784657816787⟩, + ⟨59894202952899080070326508197970445008808986883633971930128,59894202952899080235385281684971510047411129859284970174151⟩, + ⟨770543149328816800079274968946617604484350687678305964675419,770543149328816800140350924794427077771687464881042940148047⟩, + ⟨332470808802408102398204446608927390626652926504172963280688,332470808802408102573149430737235520728310477172846472818447⟩, + ⟨113074073303292418906968692569619702175979206353290621020650,113074073303292418982053785509397849625808132500407275259657⟩, + ⟨25933254944136723109738694437867042495278206533981538278345,25933254944136723241739952928162336500530394046939133820085⟩, + ⟨41489240231629720593898955757159651643178935718286968063928,41489240231629720668358232047478544559269554642583418457850⟩] +lemma bs1_0_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 2 r = bs1_0_0_2 r := by + revert r + decide +kernel +def bs1_0_0_3 : Fin 8 → RI := ![⟨-438563254407092513359983453749475512633035835397317447127893,-438563254407092513348351745537524444123834747810028598902514⟩, + ⟨405899725947403602324772152302498380758635514462037666150193,405899725947403602333137277497968992838728969155435883286157⟩, + ⟨113958719480059142205890192223423256997868387796349627784087,113958719480059142381095040587955081952873180163858872507674⟩, + ⟨751589305042662859349980231382704804754884935018423328522767,751589305042662859414810493700657882433035903146030327059608⟩, + ⟨295168184183700332507823620321460444213216555457962150234373,295168184183700332693522379429193187839367495145301741395322⟩, + ⟨117549002001494527548504423737925263349299718778968514388970,117549002001494527628204957342312782127790783275259765571172⟩, + ⟨28720141632081435090568741460445176950128507351930135362156,28720141632081435230684046991275973517350357452652279526051⟩, + ⟨42989220140619685162952956555280929178292441287000230838638,42989220140619685241989204893730977697492653533672153950983⟩] +lemma bs1_0_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 3 r = bs1_0_0_3 r := by + revert r + decide +kernel +def bs1_0_0_4 : Fin 8 → RI := ![⟨-456003852986527602045196261486634557946741096381233159395886,-456003852986527602032811486027562946559559194985489616698994⟩, + ⟨436063769173147644966396818257334044658201063663221475776586,436063769173147644975303523561929035932724956821855899480093⟩, + ⟨166334243921701987305380977381448623571596817130753725986715,166334243921701987491929046400887099369784213846830100489137⟩, + ⟨725165780459374291127368886172949772286600702110602066953489,725165780459374291196396429430666667826916627869480732495899⟩, + ⟨258344705352490612758288814861695523108198346878944064685175,258344705352490612956010197884302088470016439390424405426131⟩, + ⟨124040288612217709460791192664437075540451502757251824879208,124040288612217709545651747509551617130663170740900349179353⟩, + ⟨31328462968856341226457250241824556391152497432782064992523,31328462968856341375643987542707451049637094049101102586512⟩, + ⟨42592522870527601970596736080507021873000040048383020583811,42592522870527602054749998091733856050717985253150375928178⟩] +lemma bs1_0_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 4 r = bs1_0_0_4 r := by + revert r + decide +kernel +def bs1_0_0_5 : Fin 8 → RI := ![⟨-470597680080659908156754248331720572186797921812171750142895,-470597680080659908143523245131610224807069443437303825848844⟩, + ⟨467027917543206679544838501338263604157615352154137704037941,467027917543206679554353784580737881660186663395680794764310⟩, + ⟨215956857159344357784456052139849178486791716868424694349340,215956857159344357983750589721829755252081256759172084740725⟩, + ⟨690727805760480860826534777799679635362667177476093360440550,690727805760480860900278839511399700159000558411263644446028⟩, + ⟨222617802122111097406802822718741401278067043276308030182692,222617802122111097618034125228253228137032267829461892358283⟩, + ⟨131783663198232111192053323683346565147405907536460585466817,131783663198232111282712236025646806607178730090587231588900⟩, + ⟨33431459230386831107025633868872308417539983178401317111974,33431459230386831266406012234528765401778047726625944475552⟩, + ⟨40167440776064870133651454972510727781379732369156206522918,40167440776064870223554746529889561201631400080490492137251⟩] +lemma bs1_0_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 5 r = bs1_0_0_5 r := by + revert r + decide +kernel +def bs1_0_0_6 : Fin 8 → RI := ![⟨-481439701172893522122778755106295502614862732896603045726234,-481439701172893522108591807298957648976967731582277989340776⟩, + ⟨498536808527018143880120004637359457589947599440651057834342,498536808527018143890322770420976860625103243549793211887048⟩, + ⟨261928435099993942894209814375831459348458981502594974092998,261928435099993943107903451978563004547344995562873917026559⟩, + ⟨647746885186140460002743254728960989228755755747236214950482,647746885186140460081815350682906534059226196201711918102429⟩, + ⟨188282869433254385692835183551618846140403543587813254671124,188282869433254385919328021521670635866530770604442025238067⟩, + ⟨139590721442621440473120330130142332402782841205487444789521,139590721442621440570329380586997425966877030566672036576871⟩, + ⟨34660992109675842756554514839817691862138505848287550532932,34660992109675842927450181267243541961214610981423421595233⟩, + ⟨35784315530686467161224658169159082219846302459012511267884,35784315530686467257623493974830091557208589185569311640229⟩] +lemma bs1_0_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 6 r = bs1_0_0_6 r := by + revert r + decide +kernel +def bs1_0_0_7 : Fin 8 → RI := ![⟨-487470775733148862570130921576291938161865873678841976733508,-487470775733148862554858140561084922706380105908237207949871⟩, + ⟨530269967182005254424682101357277318175438218817353619947789,530269967182005254435665761104166373682594356662910987466343⟩, + ⟨303560272869828805900795863275265249629106692997948462232970,303560272869828806130845072997699988806347977757022784555726⟩, + ⟨595765959476825127475420092210537135867068554850418653599194,595765959476825127560544166981147784858890401887139553724010⟩, + ⟨155215970061379683017669225152201093646270059171274321797353,155215970061379683261497253760696301333370837158765393257050⟩, + ⟨145860240394217834494418240662920670754212780758889058476540,145860240394217834599067426695706053159623516329866916856804⟩, + ⟨34652617562631626824441496385657125959224080302432246916209,34652617562631627008417086148775620283478193012832256990916⟩, + ⟨29771917470043389671438630227571650020800639424774479800000,29771917470043389775215589822700489653057471382816948896680⟩] +lemma bs1_0_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 7 r = bs1_0_0_7 r := by + revert r + decide +kernel +def bs1_0_0_8 : Fin 8 → RI := ![⟨-487462892421722827690583937565139061327278656496690920343550,-487462892421722827674070680150278239283463753896660980908418⟩, + ⟨561834936271307765269560076990705741007594574621962322398486,561834936271307765281435844775048572897636616624726042473279⟩, + ⟨340375515396990111889373294003025381522746493041618208868060,340375515396990112138107418747654176788812722875015826072155⟩, + ⟨534497252729526341450776413000537441611381411336635145528404,534497252729526341542814382869246834666737267554750295859345⟩, + ⟨122814143582296421444600020143832947187616003844368058125290,122814143582296421708232098503778691175678741156786155832662⟩, + ⟨148662307163189196702829412206767227939947462359400979222360,148662307163189196815978349882060355667554066234078189495159⟩, + ⟨33112946991627071845826212269964731810187670454494190182116,33112946991627072044744553912195252710699254125999215213917⟩, + ⟨22754091510413961166663463757903663118382882929362757646837,22754091510413961278869331557564464634863393230383992153802⟩] +lemma bs1_0_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 8 r = bs1_0_0_8 r := by + revert r + decide +kernel +def bs1_0_0_9 : Fin 8 → RI := ![⟨-480006086166923974709327097484159439159426034707709392404419,-480006086166923974691388115500500866898390558069718469080547⟩, + ⟨592761771830231531218572315024817877173251725159131717342652,592761771830231531231473414969756452256420026453804800628091⟩, + ⟨372048327700241342529729210583676245319009943596565493760817,372048327700241342799938586627282055598136842497596565502457⟩, + ⟨463978768694999233491895076813181409593485280177777655171781,463978768694999233591879437367070305787193555434371826578343⟩, + ⟨90006236985199347803604423787343110043417341779048625475277,90006236985199348089998015627198558655707952227608656386417⟩, + ⟨145923870457251272972938334856684213622469710759419288402105,145923870457251273095856345727284033539837649385013753750006⟩, + ⟨29906949246618100418280654131870762829037363538351794396535,29906949246618100634373243091955768206654605481447019130770⟩, + ⟨15647193007890669100879735261994947185018582851474188253817,15647193007890669222773253321441323627283808372573408562749⟩] +lemma bs1_0_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 9 r = bs1_0_0_9 r := by + revert r + decide +kernel +def bs1_0_0_10 : Fin 8 → RI := ![⟨-463497944388521850461370999132172992733884471589463734533257,-463497944388521850441782918454037134478963841360844709739760⟩, + ⟨622499592519801095170199840566944667677167620299046888795127,622499592519801095184286915674587634650074091049202760083578⟩, + ⟨398258971029970269293676104037036554514487192258144356015244,398258971029970269588725347230116586120252920767238885047340⟩, + ⟨384805726236189451784506905834244063561742905597580545985781,384805726236189451893682650749072835354240871417694621907856⟩, + ⟨55375717063707113785535747607071481528345745748336573891350,55375717063707114098256992757650845961875510051787332326561⟩, + ⟨135743852012113559406567742913280181118639966305845746958569,135743852012113559540785387812086656042156482819967256608887⟩, + ⟨25154900742383577962841882427281058261862857390495486599850,25154900742383578198799478591777061618128306742574457690845⟩, + ⟨9594137281863928400771630460662048235307336790514386763840,9594137281863928533870602747125643276906048011887778223225⟩] +lemma bs1_0_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 10 r = bs1_0_0_10 r := by + revert r + decide +kernel +def bs1_0_0_11 : Fin 8 → RI := ![⟨-436136370357179660582233078111800744659094262428563093273959,-436136370357179660560724660060106699734491431163864885142448⟩, + ⟨650415719435620384786729373191253880566772281364496450135670,650415719435620384802197489007188537894806852187485520144641⟩, + ⟨418453275611855615533770871905328928960084440290970207612370,418453275611855615857745567165678681191855382514605525931217⟩, + ⟨298449591430600218381206837756276181255623350795972875635006,298449591430600218501085737650273185042821104938422829041766⟩, + ⟨17443140893079117412840939433918206645132326762675215118060,17443140893079117756220129302874622840282026487401984451671⟩, + ⟨116857847088109077512401143745655862409420091852764565215550,116857847088109077659776951709097046961050851576965406538687⟩, + ⟨19316439467318182448669001714665498056559605829177617242682,19316439467318182707758940345158516481369084906415256744609⟩, + ⟨5809143186185800299064645620559862555848191294679171573506,5809143186185800445212110766757566844201169860351688104956⟩] +lemma bs1_0_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 11 r = bs1_0_0_11 r := by + revert r + decide +kernel +def bs1_0_0_12 : Fin 8 → RI := ![⟨-395915555502078970539906529844883704453889060235513342987501,-395915555502078970516145964773403042028170089636762608927482⟩, + ⟨675797487240956376487489588495555683680578003001153150233367,675797487240956376504577371125366706234126660171472667791448⟩, + ⟨431519208833055667703074846388288241779087377510358355607418,431519208833055668060972940508752189100231848375635039607139⟩, + ⟨207666311097657291117386307555841086224113570932381093172451,207666311097657291249817730209843777119392794557051001255016⟩, + ⟨-24844119548134643622243543040632667462674625205543321879745,-24844119548134643242909109170985719700468813701753881202158⟩, + ⟨89250459400333839340599680220132354745650440998731303565214,89250459400333839503407212910439873104063755066115400330542⟩, + ⟨13222704243756836071286158558905334987416699202460233189183,13222704243756836357505411477179226370833137078068183609167⟩, + ⟨5312568141932741360856323310655331228136034712623842595892,5312568141932741522306893375534393929863908464446476316137⟩] +lemma bs1_0_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 12 r = bs1_0_0_12 r := by + revert r + decide +kernel +def bs1_0_0_13 : Fin 8 → RI := ![⟨-340623562076925305472091218580885210541691118334837257539920,-340623562076925305445669411670974850042843760381450054356044⟩, + ⟨697855868909004649977757898009067821617115098252949299199621,697855868909004649996759554400918948028717795082940228641185⟩, + ⟨435443240128684184121029605944483806580297154605369137074446,435443240128684184519013168533477040977178576894455296331039⟩, + ⟨116971284282858504115230857908496042108655443618761718961942,116971284282858504262494926234843128239370397754422402414709⟩, + ⟨-71380510471195541908269096405103329433714525512425585814740,-71380510471195541486448271192257732233243557491374913596087⟩, + ⟨54867537138767244407070386118675514496203239582747155141337,54867537138767244588112763657407076524650246779439104423990⟩, + ⟨7999504996084336863655631741896289533065700527825048542828,7999504996084337181932146285081632873266345131693402298980⟩, + ⟨8554521709932732528772379453011567947149516875132925414147,8554521709932732708305811209323976420927107833199526366301⟩] +lemma bs1_0_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 13 r = bs1_0_0_13 r := by + revert r + decide +kernel +def bs1_0_0_14 : Fin 8 → RI := ![⟨-267836967164229842537000517002308526625632494443305667632451,-267836967164229842507408908143600826020688793348627743141251⟩, + ⟨715728374803837064734975756400964723305507610673628252470103,715728374803837064756257025525899614058626207785007605492776⟩, + ⟨427102275247260293371190854704596780436516562580489159682714,427102275247260293816920170511112205354641743168417706668442⟩, + ⟨33112621732433365414815253918075818471203448403628624837776,33112621732433365579746468641534435868123186386062461392371⟩, + ⟨-119932636406633887543666767645457218824094668918515612161163,-119932636406633887071240452870739027241128130393260750647627⟩, + ⟨18295455130621387004985349770743430219214411234577046483519,18295455130621387207747229047710854643154028120973628073840⟩, + ⟨4813536223034907767719769192507133334425237835120439614207,4813536223034908124179649450572500917041100383649022338835⟩, + ⟨14970227320977352938845095080169384704115672550890769381924,14970227320977353139917001619859369847142866493870326761509⟩] +lemma bs1_0_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 14 r = bs1_0_0_14 r := by + revert r + decide +kernel +def bs1_0_0_15 : Fin 8 → RI := ![⟨-174902780574212986545551810025210459070877316229373316653682,-174902780574212986512152658068251049663787047156710181413340⟩, + ⟨728475807963873173872251188639632168660520461296514295468569,728475807963873173896270712036850869538791803102895407975683⟩, + ⟨402510250337815346640284890036207631809794697980108138714245,402510250337815347143366058125763810196170890012572461030224⟩, + ⟨-34607738263178990225102532846842234945815543088125177210734,-34607738263178990038949670078428549684034702611940783026048⟩, + ⟨-165015659796599663814805703491862380399441928555870635377406,-165015659796599663281592441890098376134166805273726675785829⟩, + ⟨-12874095607651821902353807744248600502632176774791266273381,-12874095607651821673502620593990815619063908958631486089033⟩, + ⟨4391360695372999717787378422575487965329288352496714017507,4391360695373000120112840488355449861587926893210587252354⟩, + ⟨22595999432864759556684960394265726464424192775286626480817,22595999432864759783628726543246038007854655025519608603516⟩] +lemma bs1_0_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 15 r = bs1_0_0_15 r := by + revert r + decide +kernel +def bs1_0_0_16 : Fin 8 → RI := ![⟨-58888930430138740134059886789144873043193798139967200082909,-58888930430138740096046039465093367387732610552682946935451⟩, + ⟨735062373367666128178225775567863766979597658226417619529296,735062373367666128205564029437260568851785571224659955389131⟩, + ⟨358114929133384706810583775543256294413471061229294589449210,358114929133384707383174682641619801085634983281255444141051⟩, + ⟨-74455809371878033787234942448505969454939552439119613925996,-74455809371878033575361703472326417669584203179388707501353⟩, + ⟨-196855122665605361007556435668168649336219533738616836993350,-196855122665605360400670142754031476069679381783277751642146⟩, + ⟨-28525415243689120208105926181599244959530935515088858629136,-28525415243689119947634819029186144599390727778593881589782⟩, + ⟨6355352168165899945591226719423234846515044314052103755147,6355352168165900403505209365803127608890843841855462056297⟩, + ⟨28025546618524505607522192808629254939879119324821863891425,28025546618524505865822334341043043630719770938458676741198⟩] +lemma bs1_0_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 16 r = bs1_0_0_16 r := by + revert r + decide +kernel +def bs1_0_0_17 : Fin 8 → RI := ![⟨83530193150380752726900290894260083898170378133342531661806,83530193150380752770560497599031905134690137847969845085202⟩, + ⟨734298832191077063000257053581402773378729567761100128451807,734298832191077063031655975261593670967556196153170831575722⟩, + ⟨294198811581030120349428929609799233206400461434651700783696,294198811581030121007069213900409213321023303997742455465100⟩, + ⟨-73355736213609257121827868425518867948344267616407000175885,-73355736213609256878484190791394296342892251133053423584092⟩, + ⟨-200953773497578730122826726151029397689779052044166233762627,-200953773497578729425797015662569794823245771921548999088335⟩, + ⟨-18289172517972530909940647973838251761352375604016133116075,-18289172517972530610780652884881671115127581116580502627603⟩, + ⟨8693903110760428894784026772613170206289070542181516664000,8693903110760429420713932394399308597204061024611460654836⟩, + ⟨27230953112389175079773274509625878418995589020005056695270,27230953112389175376439841170489028447313754815885805895815⟩] +lemma bs1_0_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 17 r = bs1_0_0_17 r := by + revert r + decide +kernel +def bs1_0_0_18 : Fin 8 → RI := ![⟨256310914213929867102780246882285364299580749887905718051672,256310914213929867153419454219153829574107693353234951393039⟩, + ⟨724707839765671483965838383772749351250293971729689117746968,724707839765671484002256363098330866165088729445957136532420⟩, + ⟨222192686669384923660929349444005717869996496005608980091553,222192686669384924423692176803658893840088437307801968256268⟩, + ⟨-19863672629026916844672446400607270679345858666574866740194,-19863672629026916562430746788945912337203489522475217857463⟩, + ⟨-159277013168242934838579546091741152701606688541881970358503,-159277013168242934030130968009663019845576449092873236360068⟩, + ⟨22784327421398388937156621704813195311567335409671476438137,22784327421398389284136770481026061238849126382215994181694⟩, + ⟨8346258408364636075100206349475052010247996986075456642122,8346258408364636685099002637796338458990264571335393807644⟩, + ⟨18136237302415256732643823543502815153297183384451171914262,18136237302415257076731974125818394876924116872015694287960⟩] +lemma bs1_0_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 18 r = bs1_0_0_18 r := by + revert r + decide +kernel +def bs1_0_0_19 : Fin 8 → RI := ![⟨464497816686631127446623456242503342076582339197675620456948,464497816686631127505983029717328357559547238457683768345525⟩, + ⟨704226525167582398379777915009917301500809719097313790146775,704226525167582398422467282266640752538238128460840292600774⟩, + ⟨178965192181774100340476670523138885387153996269674129861115,178965192181774101234591694742833466755566123736543911983300⟩, + ⟨89404892636448226758928670419326672195588415790771235758746,89404892636448227089774032871132505964966015986262538016281⟩, + ⟨-54943598585047366003849291216255909347808405569710345743854,-54943598585047365056181164189307065842645121044458651725437⟩, + ⟨82432929198874173183653212903046124955691850418132075244081,82432929198874173590385362130590747645840191156898106543870⟩, + ⟨5375125592922214368563345443601906215823072930959714089737,5375125592922215083607483619153606735746384661932399554225⟩, + ⟨6299407108621070608917061219130206429441198886985421209123,6299407108621071012259193343766244511428875134870754046758⟩] +lemma bs1_0_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 19 r = bs1_0_0_19 r := by + revert r + decide +kernel +def bs1_0_0_20 : Fin 8 → RI := ![⟨715066645209841276144674092525427890183969021074263555447768,715066645209841276215058794864404012637744173026924856272299⟩, + ⟨669537301741269626663725427154335772781364832472742696204563,669537301741269626714343688565784251785925866112321711982387⟩, + ⟨253326568573157568620357896661415829933935241089984302448735,253326568573157569680541050826397929257277345282832990583716⟩, + ⟨237175605302323242850761826050529127215031490109265663332881,237175605302323243243056631977593591969488152735641924738921⟩, + ⟨116082256879744641770854583663917042657738177578277663529107,116082256879744642894537506770942490986469152695537328641992⟩, + ⟨108676126769142183240141947217978799576092349061810535518495,108676126769142183722418344752684920271909374578498746293853⟩, + ⟨16480098171824913405889018394517455306622483812734543728371,16480098171824914253741620408942783788435776888878166892071⟩, + ⟨15442628821662364425060635643359695182185820139643677253346,15442628821662364903317372485853350447652564150837341163748⟩] +lemma bs1_0_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) 20 r = bs1_0_0_20 r := by + revert r + decide +kernel +def bs1_0_0 : Fin 21 → Fin 8 → RI := ![bs1_0_0_0,bs1_0_0_1,bs1_0_0_2,bs1_0_0_3,bs1_0_0_4,bs1_0_0_5,bs1_0_0_6,bs1_0_0_7,bs1_0_0_8,bs1_0_0_9,bs1_0_0_10,bs1_0_0_11,bs1_0_0_12,bs1_0_0_13,bs1_0_0_14,bs1_0_0_15,bs1_0_0_16,bs1_0_0_17,bs1_0_0_18,bs1_0_0_19,bs1_0_0_20] +lemma bs1_0_0_mem (d : Fin 21) (r : Fin 8) : (bs1_0_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 0 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_0) d r = bs1_0_0 d r := by + fin_cases d + · exact bs1_0_0_0_calc r + · exact bs1_0_0_1_calc r + · exact bs1_0_0_2_calc r + · exact bs1_0_0_3_calc r + · exact bs1_0_0_4_calc r + · exact bs1_0_0_5_calc r + · exact bs1_0_0_6_calc r + · exact bs1_0_0_7_calc r + · exact bs1_0_0_8_calc r + · exact bs1_0_0_9_calc r + · exact bs1_0_0_10_calc r + · exact bs1_0_0_11_calc r + · exact bs1_0_0_12_calc r + · exact bs1_0_0_13_calc r + · exact bs1_0_0_14_calc r + · exact bs1_0_0_15_calc r + · exact bs1_0_0_16_calc r + · exact bs1_0_0_17_calc r + · exact bs1_0_0_18_calc r + · exact bs1_0_0_19_calc r + · exact bs1_0_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 0 0 tr1_0_0_mem) d r +lemma bs1_0_0_lower (d : Fin 21) : (174000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 0 0) d) := by + have hc : ∀ d : Fin 21, (174000:ℤ)*scale < 1000000*(rowLowerBox (bs1_0_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_0_0_mem d)).1 + have hnum : (174000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_0_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_0_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (174000/1000000:ℝ) < ordinarySignValue 1 0 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 0 0) _ bs1_0_0_lower e he hτ +def bs1_0_1_0 : Fin 8 → RI := ![⟨-376225907036466717497512999227363635142277521605628478070260,-376225907036466717487707286513582077147026032135913192168319⟩, + ⟨321944781721467240656724111722731508592203035973484717430557,321944781721467240663776043647698306044843837986636396825850⟩, + ⟨-48616828985707993868775808265770014295961991842083399197336,-48616828985707993721075369274777667599695294424594740596251⟩, + ⟨788162705153727894034682243291809208871421428516441901290297,788162705153727894089335172669177490547308770178274436147084⟩, + ⟨405094550931871463200294195904828087641189561151440673005777,405094550931871463356841166472128937729524781512142279693762⟩, + ⟨111354014587842592164691465872401835894066811988800580811713,111354014587842592231880267500501186993689506705309337902278⟩, + ⟨20790397299857525087523259796120619741139325646798039995263,20790397299857525205642663052184377691165436114394125222365⟩, + ⟨33967791675520508834299113028100662359868284115313909529850,33967791675520508900927911744650360187823782851427037287065⟩] +lemma bs1_0_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 0 r = bs1_0_1_0 r := by + revert r + decide +kernel +def bs1_0_1_1 : Fin 8 → RI := ![⟨-354367098233620197282664294463157742509696180000009568200564,-354367098233620197272311668501620885936056999452706494647966⟩, + ⟨295176146079331160388103427209241895735914845454201511891557,295176146079331160395548680364858193370267179419019001010734⟩, + ⟨-102538585648953286701376779871422476905119642467629615143461,-102538585648953286545438354602176494879114634071820640828471⟩, + ⟨793763305905861948853009077416298549427436588263420811617230,793763305905861948910710271818203732967698926413225181970779⟩, + ⟨440765310907124771967085474094914286442622950363023330338416,440765310907124772132363845897602836795007501839810603079626⟩, + ⟨111716182407538474590131830415592466149965280991993895108578,111716182407538474661068084858921503056402961670052613570186⟩, + ⟨18352529675846634085237482301468768353048334371668168548218,18352529675846634209944990710276893110277858593951740940120⟩, + ⟨29571257337027193932399526960938646655364796682853409341797,29571257337027194002744544351561517061637393125961333410982⟩] +lemma bs1_0_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 1 r = bs1_0_1_1 r := by + revert r + decide +kernel +def bs1_0_1_2 : Fin 8 → RI := ![⟨-331607132677868820177392031175119693989232708651228619046411,-331607132677868820166433912670144331518970374040506661590953⟩, + ⟨269659066492271714376168086859689895053659317471298297707011,269659066492271714384048789464212592780539659987983455108556⟩, + ⟨-155792823700082091243601405668132134768344993661910260426566,-155792823700082091078542632181131069729742850686259262182538⟩, + ⟨792945552337353019358678835493648770437161319642165276976682,792945552337353019419754791341458243724498096844902252449305⟩, + ⟨475153848703421337482832361840047586360485145582674924717697,475153848703421337657777345968355716462142696251348434255453⟩, + ⟨114522744582075948616225056372841594813203054289163800950205,114522744582075948691310149312619742263031980436280455189205⟩, + ⟨16181784448093159113771794764748370557321068942837026819760,16181784448093159245773053255043664562573256455794622361505⟩, + ⟨23903102877656460993733048836657933981799181402434559935660,23903102877656461068192325126976826897889800326731010329579⟩] +lemma bs1_0_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 2 r = bs1_0_1_2 r := by + revert r + decide +kernel +def bs1_0_1_3 : Fin 8 → RI := ![⟨-308481619148411780294151451173378710883469638515047546872714,-308481619148411780282519742961427642374268550927758698647329⟩, + ⟨245499173825990684527601327510857194574963309823570754772424,245499173825990684535966452706327806655056764516968971908382⟩, + ⟨-207187265778776200226041057456341592324360199038378463677747,-207187265778776200050836209091809767369355406670869218954154⟩, + ⟨786225979340935022834243955241596263356050053034161649439819,786225979340935022899074217559549341034201021161768647976657⟩, + ⟨507327584606302134360152273548742082685590687794096545814029,507327584606302134545851032656474826311741627481436136974974⟩, + ⟨119825393303240206373488101558599505413730139705233625630432,119825393303240206453188635162987024192221204201524876812628⟩, + ⟨14463387345178111249519350390846152791594507994291871958227,14463387345178111389634655921676949358816358095014016122128⟩, + ⟨17316642485156824273830588213176412830329420667899887595716,17316642485156824352866836551626461349529632914571810708059⟩] +lemma bs1_0_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 3 r = bs1_0_1_3 r := by + revert r + decide +kernel +def bs1_0_1_4 : Fin 8 → RI := ![⟨-285418252797348993223822833391584021696879303162758417495543,-285418252797348993211438057932512410309697401767014874798645⟩, + ⟨222759730961673258072497901461407104170431037804558641098417,222759730961673258081404606766002095444954930963193064801919⟩, + ⟨-255501590501714697166632365873200454608701608025981710433846,-255501590501714696980084296853761978810514211309905335931418⟩, + ⟨774102865618318067946808315420390942880018646318118101416658,774102865618318068015835858678107838420334572076996766959065⟩, + ⟨536250147438844879829091766846341294062365999909473801255765,536250147438844880026813149868947859424184092420954141996717⟩, + ⟨127351168704066305923700448734246473249277794718819550126845,127351168704066306008561003579361014839489462702468074426983⟩, + ⟨13307327805417301846127284655903147508845050366807057211142,13307327805417301995314021956786042167329646983126094805137⟩, + ⟨10246761664569196814770890394095827126666974835391280125198,10246761664569196898924152405322661304384920040158635469564⟩] +lemma bs1_0_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 4 r = bs1_0_1_4 r := by + revert r + decide +kernel +def bs1_0_1_5 : Fin 8 → RI := ![⟨-262751862663183603816881135867292149197903281780873160591869,-262751862663183603803650132667181801818174803406005236297814⟩, + ⟨201469087156094540134396388131581075129769780436670625754786,201469087156094540143911671374055352632341091678213716481150⟩, + ⟨-299559702658403487630563548068946947358507531869274566113356,-299559702658403487431269010486966370593217991978527175721966⟩, + ⟨757047956223877154819428334358158579898383301178027581620250,757047956223877154893172396069878644694716682113197865625723⟩, + ⟨560888941537864390102005644910613948680396956176928433520963,560888941537864390313236947420125775539362180730082295696551⟩, + ⟨136565732486783564443619641515003122716403460522349440168697,136565732486783564534278553857303364176176283076476086290775⟩, + ⟨12739420391824542422870160473190045150479602736466285197868,12739420391824542582250538838846502134717667284690912561452⟩, + ⟨3151453330351774645856474580545644626991750929713369330081,3151453330351774735759766137924478047243418641047654944411⟩] +lemma bs1_0_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 5 r = bs1_0_1_5 r := by + revert r + decide +kernel +def bs1_0_1_6 : Fin 8 → RI := ![⟨-240738916868733137413365196851556985683306836272349209182749,-240738916868733137399178249044219132045411834958024152797286⟩, + ⟨181627867770734607766887728615258079806736842332067313251284,181627867770734607777090494398875482841892486441209467303985⟩, + ⟨-338308792796175655387197665259275152137584103720600083331134,-338308792796175655173504027656543606938698089660321140397568⟩, + ⟨735516160445370210000941233981672278131358111594555695807065,735516160445370210080013329935617822961828552049031398959008⟩, + ⟨580319604272337351833045918705357986883364243314254000490931,580319604272337352059538756675409776609491470330882771057870⟩, + ⟨146763706485712433027476586847762841826296022992128759960874,146763706485712433124685637304617935390390212353313351748219⟩, + ⟨12708346744343992487186132939988825579193593127271345193444,12708346744343992658081799367414675678269698260407216255750⟩, + ⟨-3543095915794131008614022682533210534188968574546372329170,-3543095915794130912215186876862201196826681847989571956828⟩] +lemma bs1_0_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 6 r = bs1_0_1_6 r := by + revert r + decide +kernel +def bs1_0_1_7 : Fin 8 → RI := ![⟨-219570908402552094804222845207988912896367687511318943470871,-219570908402552094788950064192781897440881919740714174687227⟩, + ⟨163215486824105818837424283723850289874651916224024826259811,163215486824105818848407943470739345381808054069582193778359⟩, + ⟨-370890118970554189177769570213750585828800515466136753513998,-370890118970554188947720360491315846651559230707062431191235⟩, + ⟨709962290710369404935682101501973907268308114389932540705157,709962290710369405020806176272584556260129961426653440829969⟩, + ⟨593810865504893821317046536118280361650151550639858756982607,593810865504893821560874564726775569337252328627349828442299⟩, + ⟨157165616661639554885100003284580600834760352899329423781820,157165616661639554989749189317365983240171088470307282162077⟩, + ⟨13104504883098987080864269478147323256825492154980960487134,13104504883098987264839859241265817581079604865380970561845⟩, + ⟨-9484684385572742417691845903121488082014237131069091437280,-9484684385572742313914886307992648449757405173026622340602⟩] +lemma bs1_0_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 7 r = bs1_0_1_7 r := by + revert r + decide +kernel +def bs1_0_1_8 : Fin 8 → RI := ![⟨-199386222744413920855279975391538309913794896632639736058786,-199386222744413920838766717976677487869979994032609796623646⟩, + ⟨146195710554918876457307206574712700311624443261000692677815,146195710554918876469182974359055532201666485263764412752601⟩, + ⟨-396690713211267591713784377273633402640278286412991491005819,-396690713211267591465050252529004607374212056579593873801717⟩, + ⟨680856748661947539837683927179228174807070198458717228157812,680856748661947539929721897047937567862426054676832378488746⟩, + ⟨600881058914855433588203942568316894995485906489842761627214,600881058914855433851836020928262638983548643802260859334581⟩, + ⟨167005812032448099167307425453213921286712700766892084050173,167005812032448099280456363128507049014319304641569294322965⟩, + ⟨13784454104361752554353863318689218552663849492951930147943,13784454104361752753272204960919739453175433164456955179748⟩, + ⟨-14420267586465312586477846407329960606375987366275548755057,-14420267586465312474271978607669159089895477065254314248092⟩] +lemma bs1_0_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 8 r = bs1_0_1_8 r := by + revert r + decide +kernel +def bs1_0_1_9 : Fin 8 → RI := ![⟨-180280309154506009818507294953342417428708867026787453436267,-180280309154506009800568312969683845167673390388796530112390⟩, + ⟨130521170675083896186935068892786752710680199589743648581007,130521170675083896199836168837725327793848500884416731866441⟩, + ⟨-415371025117067420868154357062744711310452866061902509526060,-415371025117067420597944981019138901031325967160871437784416⟩, + ⟨648695555196531175333065074703848442635981481127117738194025,648695555196531175433049435257737338829689756383711909600583⟩, + ⟨601324323864096991197188199632681008687694522974691898613929,601324323864096991483581791472536457299985133423251929525066⟩, + ⟨175602064682536661383197067217159366193080735516838558370484,175602064682536661506115078087759186110448674142433023718380⟩, + ⟨14595148701244807583226792736749532564101920232100802432668,14595148701244807799319381696834537941719162175196027166908⟩, + ⟨-18204302507892888306883697554848449290933784507363108833439,-18204302507892888184990179495402072848668558986263888524508⟩] +lemma bs1_0_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 9 r = bs1_0_1_9 r := by + revert r + decide +kernel +def bs1_0_1_10 : Fin 8 → RI := ![⟨-162314161882546091569830412821162629606051544879201113077359,-162314161882546091550242332143026771351130914650582088283857⟩, + ⟨116136869107019878287751244366462080593155685305080956550847,116136869107019878301838319474105047566062156055236827839294⟩, + ⟨-426868442517812017612116236355035590057855545019736682531306,-426868442517812017317066993161955558452089816510642153499204⟩, + ⟨614003046728504539457622530562649891193045684045145648732757,614003046728504539566798275477478662985543649865259724654827⟩, + ⟨595209282208922200957032984208224253404542004077129221261342,595209282208922201269754229358803617838071768380579979696549⟩, + ⟨182403114674716075886197179596327467724813601432761614704142,182403114674716076020414824495133942648330117946883124354453⟩, + ⟨15393982809207025441514477250781947811235054532948459909777,15393982809207025677472073415277951167500503885027431000777⟩, + ⟨-20793284994462464703993285961377256376645372817272129421776,-20793284994462464570894313674913661335046661595898737962393⟩] +lemma bs1_0_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 10 r = bs1_0_1_10 r := by + revert r + decide +kernel +def bs1_0_1_11 : Fin 8 → RI := ![⟨-145521243636518605867616676133861809868722071775027517282892,-145521243636518605846108258082167764944119240510329309151376⟩, + ⟨102982806333733392992127433069991408465116326042824283208004,102982806333733393007595548885926065793150896865813353216971⟩, + ⟨-431379958736506828860509514648076900174283972317680077979218,-431379958736506828536534819387727147942513030094044759660367⟩, + ⟨577327580859992352617747820357231785832871460687563206521217,577327580859992352737626720251228789620069214830013159927974⟩, + ⟨582855675602547307722586063326433456026868929320722865350135,582855675602547308065965253195389872222018629045449634683742⟩, + ⟨187014470069805608323513157340689177721045692527170611125042,187014470069805608470888965304130362272676452251371452448175⟩, + ⟨16062726148251352444915614449214360712258456225830936407942,16062726148251352704005553079707379137067935303068575909873⟩, + ⟨-22230730203515454159958514354344707645007036458692887525343,-22230730203515454013811049208147003356654057893020370993894⟩] +lemma bs1_0_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 11 r = bs1_0_1_11 r := by + revert r + decide +kernel +def bs1_0_1_12 : Fin 8 → RI := ![⟨-129913053771640315746844467092779369604679553221440864244510,-129913053771640315723083902021298707178960582622690130184489⟩, + ⟨90995901580351876271276277579209840897328431337974478079809,90995901580351876288364060209020863450877088508293995637887⟩, + ⟨-429329023266590494658763619001715167892298384189013063141296,-429329023266590494300865524881251220571153913323736379141569⟩, + ⟨539231751425277995783971986466245622378452082730491901013638,539231751425277995916403409120248313273731306355161809096200⟩, + ⟨564795504515443158820283156626214770937723041628468323529848,564795504515443159199617590495861718699928853132257764207433⟩, + ⟨189205283435213565994949634337506922549136501485375793657816,189205283435213566157757167027814440907549815552759890423137⟩, + ⟨16515095000469390123384622397329976557462667019495505904422,16515095000469390409603875315603867940879104895103456324409⟩, + ⟨-22626898932781288593137264689490756157412980895621020306418,-22626898932781288431686694624611693455685107143798386586174⟩] +lemma bs1_0_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 12 r = bs1_0_1_12 r := by + revert r + decide +kernel +def bs1_0_1_13 : Fin 8 → RI := ![⟨-115483569693840161889397798445082134786318575330329806923502,-115483569693840161862975991535171774287471217376942603739622⟩, + ⟨80111372570624410670363798658915736819687450498059682458930,80111372570624410689365455050766863231290147328050611900490⟩, + ⟨-421322149922305634505579649386092755745929703440925533368267,-421322149922305634107596086797099521349048281151839374111671⟩, + ⟨500279092824748956567856902020556521635176708990315890283894,500279092824748956715120970346903607765891663125976573736657⟩, + ⟨541725118582472738912665555997848001288220127487548795296520,541725118582472739334486381210693598488691095508599467515171⟩, + ⟨188900373170025705500612836764801785866114737259725932818680,188900373170025705681655214303533347894561744456417882101332⟩, + ⟨16698777080024076397339615282242175451967765193998097572874,16698777080024076715616129825427518792168409797866451329030⟩, + ⟨-22136932639579069426522889560905440610956573673715240818735,-22136932639579069246989457804593032137178982715648639866583⟩] +lemma bs1_0_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 13 r = bs1_0_1_13 r := by + revert r + decide +kernel +def bs1_0_1_14 : Fin 8 → RI := ![⟨-102212785492346075715675664542041999881260964391835626577118,-102212785492346075686084055683334299276317263297157702085914⟩, + ⟨70263723058299175736103009349949878963407603500839711024065,70263723058299175757384278474884769716526200612219064046735⟩, + ⟨-408100552180784451381201455602194365421507700357395712095255,-408100552180784450935472139795678940503382519769467165109522⟩, + ⟨461019267530544551890317543151951775225515039894454597056078,461019267530544552055248757875410392622434777876888433610671⟩, + ⟨514453916737419731941393712795799737391310797432027130801835,514453916737419732413820027570517928974277335957281992315368⟩, + ⟨186161784649735119483046604463550280112949880001050898291807,186161784649735119685808483740517704536889496887447479882124⟩, + ⟨16593259098326102000955469331571495689475163916345763337420,16593259098326102357415349589636863272091026464874346062054⟩, + ⟨-20940122393281312176379719356487148577519846464822050777840,-20940122393281311975307812816797163434492652521842493398258⟩] +lemma bs1_0_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 14 r = bs1_0_1_14 r := by + revert r + decide +kernel +def bs1_0_1_15 : Fin 8 → RI := ![⟨-90069548945852906087699973586168880122342837736106239398867,-90069548945852906054300821629209470715252568663443104158523⟩, + ⟨61387457078042022782817878873020673875863759579440402381889,61387457078042022806837402270239374754135101385821514889000⟩, + ⟨-390491279972238905197666278651272623836479905942160327837346,-390491279972238904694585110561716445450103713909696005521360⟩, + ⟨421973466429996195714892900439351646949457564315657159309942,421973466429996195901045763207765332211238404791841553494627⟩, + ⟨483854180171200467693793978813802830468515624212302791341077,483854180171200468227007240415566834733790747494446750932654⟩, + ⟨181164016691170550680378183349528801884525672728491349091122,181164016691170550909229370499786586768093940544651129275469⟩, + ⟨16204925675565378593055885320285734882379641421767169407052,16204925675565378995381347386065696778638279962481042641901⟩, + ⟨-19222064260777562673563912557641282767219220326500682416142,-19222064260777562446620146408660971223788758076267700293442⟩] +lemma bs1_0_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 15 r = bs1_0_1_15 r := by + revert r + decide +kernel +def bs1_0_1_16 : Fin 8 → RI := ![⟨-79013866055542366666146890580569388271103931342080024689328,-79013866055542366628133043256517882615642743754795771541868⟩, + ⟨53417612624132932028794687711745361609252320778338728195331,53417612624132932056132941581142163481440233776581064055162⟩, + ⟨-369361310976052626185549464610674128011368196557561498776790,-369361310976052625612958557512310621339204274505600644084948⟩, + ⟨383621350273154628164938496393917743962739808185493539222578,383621350273154628376811735370097295748095157445224445647222⟩, + ⟨450815327519082982959481672534438046260462095109003384084733,450815327519082983566367965448575219527002247064342469435938⟩, + ⟨174166430313659903823163056044691814656295949319033961852675,174166430313659904083634163197104915016436157055528938892028⟩, + ⟨15560765067865607582041408067296344139936839771986227882828,15560765067865608039955390713676236902312639299789586183983⟩, + ⟨-17160603913376136247094764469939380590134341848949921292944,-17160603913376135988794622937525591899293690235313108443172⟩] +lemma bs1_0_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 16 r = bs1_0_1_16 r := by + revert r + decide +kernel +def bs1_0_1_17 : Fin 8 → RI := ![⟨-68998808044713612692250682480390607830851556407686414214852,-68998808044713612648590475775618786594331796693059100791457⟩, + ⟨46290179166116290941429292656439041283833100372188522824550,46290179166116290972828214336629938872659728764259225948465⟩, + ⟨-345577004458748895544616949837148509115453924451619376681176,-345577004458748894886976665546538529000831081888528621999767⟩, + ⟨346390429662295046874901641465235722531686721391274490555553,346390429662295047118245319099360294137138737874628067147348⟩, + ⟨416204723188223220398597202465513358278922293923970081002721,416204723188223221095626912953972961145455574046587315677015⟩, + ⟨165485611244031799356582044346430506231754101965757489232413,165485611244031799655742039435387086877978896453193119720887⟩, + ⟨14701740619149863956948903447343984763141912524277775154807,14701740619149864482878809069130123154056903006707719145643⟩, + ⟨-14915798942062726959928343190958451239469776918153198579894,-14915798942062726663261776530095301211151611122272449379347⟩] +lemma bs1_0_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 17 r = bs1_0_1_17 r := by + revert r + decide +kernel +def bs1_0_1_18 : Fin 8 → RI := ![⟨-59972122342265913075048218959526467294624996835213169501685,-59972122342265913024409011622658002020098053369883936160318⟩, + ⟨39942409288753168440595684083972617073853583559762250747259,39942409288753168477013663409554131988648341276030269532709⟩, + ⟨-319970323224934668128780843884592816019922986026086637627199,-319970323224934667366018016524939640049831044723893649462480⟩, + ⟨310648353816863038272887019623307475152390018147054380743607,310648353816863038555128719234968833494532387291154029626337⟩, + ⟨380836127776357995866393607858885746281584448710400296144928,380836127776357996674842185940963879137614688159409030143369⟩, + ⟨155469664042806083024455364114839656349437056971762154940957,155469664042806083371435512891052522276718847944306672684516⟩, + ⟨13676625010885233550143039765212040763862077915231524827587,13676625010885234160141836053533327212604345500491461993112⟩, + ⟨-12623704003710897007387071868604087126016085157720925843613,-12623704003710896663298921286288507402389151670156403469915⟩] +lemma bs1_0_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 18 r = bs1_0_1_18 r := by + revert r + decide +kernel +def bs1_0_1_19 : Fin 8 → RI := ![⟨-51877627357502359789706167937667225085118215311951864366147,-51877627357502359730346594462842209602153316051943716477572⟩, + ⟨34313786065572932478756588541309847791667578410370533209565,34313786065572932521445955798033298829095987773897035663559⟩, + ⟨-293312701566713864663131219386637332746106452360470357369721,-293312701566713863769016195166942751377694324893600575247528⟩, + ⟨276698400926610248828449795584366283471570257398567128054467,276698400926610249159295158036172117240947857594058430312005⟩, + ⟨345446342185312234830037946991141091349926600749124226060475,345446342185312235777706074018089934855089885274375920078901⟩, + ⟨144475939209121254794316366070406578544599908393518221931537,144475939209121255201048515297951201234748249132284253231333⟩, + ⟨12536457721489664074039109225370614000451138686465274920930,12536457721489664789083247400922314520374450417437960385426⟩, + ⟨-10393163102716666526549526038129025904939358726150208736300,-10393163102716666123207393913492987822951682478264875898659⟩] +lemma bs1_0_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 19 r = bs1_0_1_19 r := by + revert r + decide +kernel +def bs1_0_1_20 : Fin 8 → RI := ![⟨-44656327314205709639816135314933040113907639384513493922472,-44656327314205709569431432975956917660132487431852193097942⟩, + ⟨29323862212335576929704784437470486066097008878180301574896,29323862212335576980323045848918965070658042517759317352704⟩, + ⟨-266291729220086153189159403590453956146257794858382528003626,-266291729220086152128976249425471856822915690665533839868628⟩, + ⟨244775287158022057098909854595838676427114419357044673121468,244775287158022057491204660522903141181571081983420934527505⟩, + ⟨310675200040814902937885327559920618502875291519765148323971,310675200040814904061568250666946066831606266637024813436864⟩, + ⟨132849172863955408998685768252042583460247820032259712768267,132849172863955409480962165786748704156064845548947923543626⟩, + ⟨11335435646395838524400174881772197280333591921946869152923,11335435646395839372252776896197525762146884998090492316633⟩, + ⟨-8310443393130602033194874832715048025748915141936882244568,-8310443393130601554938137990221392760282171130743218334163⟩] +lemma bs1_0_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) 20 r = bs1_0_1_20 r := by + revert r + decide +kernel +def bs1_0_1 : Fin 21 → Fin 8 → RI := ![bs1_0_1_0,bs1_0_1_1,bs1_0_1_2,bs1_0_1_3,bs1_0_1_4,bs1_0_1_5,bs1_0_1_6,bs1_0_1_7,bs1_0_1_8,bs1_0_1_9,bs1_0_1_10,bs1_0_1_11,bs1_0_1_12,bs1_0_1_13,bs1_0_1_14,bs1_0_1_15,bs1_0_1_16,bs1_0_1_17,bs1_0_1_18,bs1_0_1_19,bs1_0_1_20] +lemma bs1_0_1_mem (d : Fin 21) (r : Fin 8) : (bs1_0_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 0 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 0 tr1_0_1) d r = bs1_0_1 d r := by + fin_cases d + · exact bs1_0_1_0_calc r + · exact bs1_0_1_1_calc r + · exact bs1_0_1_2_calc r + · exact bs1_0_1_3_calc r + · exact bs1_0_1_4_calc r + · exact bs1_0_1_5_calc r + · exact bs1_0_1_6_calc r + · exact bs1_0_1_7_calc r + · exact bs1_0_1_8_calc r + · exact bs1_0_1_9_calc r + · exact bs1_0_1_10_calc r + · exact bs1_0_1_11_calc r + · exact bs1_0_1_12_calc r + · exact bs1_0_1_13_calc r + · exact bs1_0_1_14_calc r + · exact bs1_0_1_15_calc r + · exact bs1_0_1_16_calc r + · exact bs1_0_1_17_calc r + · exact bs1_0_1_18_calc r + · exact bs1_0_1_19_calc r + · exact bs1_0_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 0 1 tr1_0_1_mem) d r +lemma bs1_0_1_lower (d : Fin 21) : (11000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 0 1) d) := by + have hc : ∀ d : Fin 21, (11000:ℤ)*scale < 1000000*(rowLowerBox (bs1_0_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_0_1_mem d)).1 + have hnum : (11000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_0_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_0_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (11000/1000000:ℝ) < ordinarySignValue 1 0 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 0 1) _ bs1_0_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs11.lean b/lean/OAI/Analysis/Triangular/Signs/Signs11.lean new file mode 100644 index 0000000000000000000000000000000000000000..67343e3f668b5e3a45d06a64ec199d097e61c41c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs11.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows11 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_1_0_0 : Fin 8 → RI := ![⟨-26648003543229076746733690503528086388752483009574850576591,-26648003543229076745322362930448771049231802689910862853119⟩, + ⟨15361991517777810404594272527701125590719206693703705676215,15361991517777810405609250863210114645660157480515109945842⟩, + ⟨-314271869427859622949421580600453425733341907840465361781108,-314271869427859622928163186827072320396361281065109507991859⟩, + ⟨213585000772797176853948913483664133784798278411487820901180,213585000772797176861815061354077846679831303344281033146584⟩, + ⟨328226630718745444905117275756307693380372408571991496452962,328226630718745444927648943007825017700948076341925150801397⟩, + ⟨187286378943957914874672514022443934712903458305327786618506,187286378943957914884342938916866323764022538849514016607036⟩, + ⟨229602882781737100756080264355605460012664823598479175529,229602882781737117756901682518511004878652338619312250781⟩, + ⟨30620974801986520234121834860368692264889175228362269882225,30620974801986520243711659030761166128625322911701549580677⟩] +lemma bs1_1_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 0 r = bs1_1_0_0 r := by + revert r + decide +kernel +def bs1_1_0_1 : Fin 8 → RI := ![⟨-29067339379064313764262745874957941641030650262210831804939,-29067339379064313762808890985945890145199557262811397381793⟩, + ⟨16851498071881027405991694305357372623343687172447068851666,16851498071881027407037256826393408068066482334985228926134⟩, + ⟨-337384262959469404229442254084185243458466823037407870026432,-337384262959469404207543284412284867882258313188132896141457⟩, + ⟨230884534993942350487847326289623890734565081798525233850380,230884534993942350495950503579771349561603191425149113101542⟩, + ⟨353349185158311645850744884031907699598602552534697941129640,353349185158311645873955494535173759022795920253075181638921⟩, + ⟨200095552087938223678151180446756391911639777621159708977514,200095552087938223688113002762032629691233594408142619572682⟩, + ⟨1327754472553537760441302425948357409876187727077474292507,1327754472553537777954406971899974022683784353303497939948⟩, + ⟨30719539354673341314225132625295889528288175217201952376785,30719539354673341324103925487293771701614769028387052240035⟩] +lemma bs1_1_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 1 r = bs1_1_0_1 r := by + revert r + decide +kernel +def bs1_1_0_2 : Fin 8 → RI := ![⟨-31498547423383541148389456927985511568246663109122937364385,-31498547423383541146890768153400273601722881564822896658367⟩, + ⟨18366713806100258153446677449959338532176285558971392163471,18366713806100258154524482962216126709205550835002021277015⟩, + ⟨-359346988734364990972362085789452889111182167273519620837069,-359346988734364990949787797068953220231746993631841378142159⟩, + ⟨247752977908790204480917477035553998162429779029340830748171,247752977908790204489270539597057452893181958356870712469052⟩, + ⟨377472129361484634926375641688658445651821524549543494519772,377472129361484634950302019537972156476424098467618821605554⟩, + ⟨212025600135372072579333089567998362374402897832266754131336,212025600135372072589602113932980897182177669459267958954744⟩, + ⟨2566670178748002003241976357507227680907713790891438389535,2566670178748002021295148919237786080504225043478380496734⟩, + ⟨30359904056265112080094227776928470175309692032274759504180,30359904056265112090277662231500295036708616982464196805566⟩] +lemma bs1_1_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 2 r = bs1_1_0_2 r := by + revert r + decide +kernel +def bs1_1_0_3 : Fin 8 → RI := ![⟨-33912473777923332958410293439077741686756163452795576932843,-33912473777923332956864275443590868698852509547584180607328⟩, + ⟨19891146614689030697683812969141812304029539037797477919386,19891146614689030698795656032114939971947503573866114795765⟩, + ⟨-379727217605419430072744123889193857352866623198644089105324,-379727217605419430049456929650431788220835948460668138062127⟩, + ⟨263912160454265585749321634647164360243480187547602795948787,263912160454265585757938490432408236628589244124473143105813⟩, + ⟨400147418488365492971213186726537189792006784832021683978242,400147418488365492995895169636672920867962953388961043476967⟩, + ⟨222817254222706892234647818977283194870465887562262330310730,222817254222706892245241143444438437493164079305284457832281⟩, + ⟨3923636162133322649359824070162775537378657036405730066813,3923636162133322667983123403056129763016760310291332638486⟩, + ⟨29525639655511470444143809046141548972701471538188740030186,29525639655511470454648840637485933437118797046318761455747⟩] +lemma bs1_1_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 3 r = bs1_1_0_3 r := by + revert r + decide +kernel +def bs1_1_0_4 : Fin 8 → RI := ![⟨-36278029375325092302848333916485707164219838145954800462155,-36278029375325092301252282094548072637187286599166389548283⟩, + ⟨21406716350836018564611724828551273690493537589645589169857,21406716350836018565759550501694124205628319581419076958356⟩, + ⟨-398095202567948143935470591242267658054574138871456443984109,-398095202567948143911429752842518738918847040782751012108106⟩, + ⟨279077568181445483159287362064087302161991912945124448370652,279077568181445483168183085409882212058826588098481789689086⟩, + ⟨420924405296905500056232504606016349216705976856528393302271,420924405296905500081713271264510194375352779302978591669302⟩, + ⟨232219697324041905432077728026129963439542055703995774717422,232219697324041905443013884568717908570327446364618062858053⟩, + ⟨5368532016390880982311089922224390491763238415073157749997,5368532016390881001537095646215022630782216600873032390319⟩, + ⟨28216101464365879002361704850436071379811851443016559297065,28216101464365879013206711092150070107498062522656986988753⟩] +lemma bs1_1_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 4 r = bs1_1_0_4 r := by + revert r + decide +kernel +def bs1_1_0_5 : Fin 8 → RI := ![⟨-38562710650306004587479640312334262539225010562046273475554,-38562710650306004585830617021510654129986237573890389441212⟩, + ⟨22894020478760250822146901771271196544566519974594184394444,22894020478760250823332822706164724650662095185202638030024⟩, + ⟨-414037224565281417054857016227970780666248528396522015740019,-414037224565281417030018284861467564411459795223670238968226⟩, + ⟨292965512932136637780422149616347628792173756047505957837282,292965512932136637789613113709353822011183782007636269437597⟩, + ⟨439362577867242200365241703057391050650615950614306518310723,439362577867242200391568152556365971555764366495141435044443⟩, + ⟨239999135688244568516371171529440594114833518374248412178290,239999135688244568527670288890847256595288686850078220783457⟩, + ⟨6864506361526338869342526346217281057263244692471806890768,6864506361526338889206625238527568486296057782106087551422⟩, + ⟨26447826976611779331966373138341282918526566195181039096541,26447826976611779343171315005441571047880818273466763928112⟩] +lemma bs1_1_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 5 r = bs1_1_0_5 r := by + revert r + decide +kernel +def bs1_1_0_6 : Fin 8 → RI := ![⟨-40733205865373318588815234772249895706504936450647459722475,-40733205865373318587110041818169430445836433127579021142498⟩, + ⟨24332664831450786055905154540813186215579005914981710221928,24332664831450786057131470769044898836643703819134646631124⟩, + ⟨-427169420495327319127286582977733346510657702912543325031299,-427169420495327319101601785224924105473980056022791471122459⟩, + ⟨305301044253046258135054135547767459885744642160740720969090,305301044253046258144558165781839322960752479284950943081516⟩, + ⟨455045388259672597720962600037784084263636466984356394542149,455045388259672597748185791148257170654984109398666419972635⟩, + ⟨245947678259455007936970209962624742473572991653732655122043,245947678259455007948654202189645222653602690655901382136590⟩, + ⟨8369150380834060507273102911715642723894477570421393140455,8369150380834060527813820352547818985451969917663354634300⟩, + ⟨24255184600128813295552620618367346862551859211406705054342,24255184600128813307139229509192284723529890506880636770355⟩] +lemma bs1_1_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 6 r = bs1_1_0_6 r := by + revert r + decide +kernel +def bs1_1_0_7 : Fin 8 → RI := ![⟨-42756074768230087437440684176669287739540364230651266725895,-42756074768230087435675830940285217197810417479127629470757⟩, + ⟨25701653272606178452333985887789661851242421849881033496656,25701653272606178453603207742734072110830759820353141881884⟩, + ⟨-437151981126452137989952576468671532274859105125742356132756,-437151981126452137963369134206923678809990100380100663282601⟩, + ⟨315826355096793356320640957759694191957185751662413784905768,315826355096793356330477509381164262957152071601517620722794⟩, + ⟨467594701579127361212048263767057093865428162538115129844171,467594701579127361240223923783229540830545783649316931848323⟩, + ⟨249892134354662049703404411038282117081895754181964152571400,249892134354662049715497195873325592048362415341727402192998⟩, + ⟨9836168671725486328047196916605581180980770635874596025375,9836168671725486349306580827480499926277408951001479004325⟩, + ⟨21690118087332035177459491747053387833594393705389816945238,21690118087332035189451486055219850171850410243711713211580⟩] +lemma bs1_1_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 7 r = bs1_1_0_7 r := by + revert r + decide +kernel +def bs1_1_0_8 : Fin 8 → RI := ![⟨-44598484578646598836079950409827092457243082330130988015536,-44598484578646598834251616854399826092061455852094357659005⟩, + ⟨26979826339619654392955793028784991294422046495039326512506,26979826339619654394270667749711338479407965065893882193535⟩, + ⟨-443703095246529219667310979773153471444513502475820312730641,-443703095246529219639771352962300386968800393336485322060961⟩, + ⟨324309369806131791539495542528916431051327169728537356574539,324309369806131791549685906820154365827996841429561061862039⟩, + ⟨476685277485899245815819187821728686788984736751574712721115,476685277485899245845008303149850845629853228756754151270360⟩, + ⟨251702273914543796733501147962642666612671797669999099644924,251702273914543796746028900320104283141363758937118010351140⟩, + ⟨11217503280883510185586332163913488759625358149582873108294,11217503280883510207610398624752716298951466012193466268706⟩, + ⟨18820871303423601483678624630543883711651538577649342989057,18820871303423601496101961108652628794081490604831825319424⟩] +lemma bs1_1_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 8 r = bs1_1_0_8 r := by + revert r + decide +kernel +def bs1_1_0_9 : Fin 8 → RI := ![⟨-46228980952818684385509583572396989263938573211077483906347,-46228980952818684383613577176384617150569801684564813847093⟩, + ⟨28146335504930658317047051326974993935655113639350400912249,28146335504930658318410594031433746825752383614472355694548⟩, + ⟨-446611924223068153204308863808081253320248672832713364123454,-446611924223068153175749901783779295603595988909746242504350⟩, + ⟨330552143391860961712182155067510034015533859819101703014190,330552143391860961722749699384925238102426944519518786772319⟩, + ⟨482058593566944307123891948754381228306424238858888215602569,482058593566944307154161452473740763077535473247767183869412⟩, + ⟨251298047395879911318661326935617252511514803359212295036928,251298047395879911331652773997967888539733161890027196354013⟩, + ⟨12465816494646078915040156583633277701023556969189344405539,12465816494646078937879408618228025796222161834390469164512⟩, + ⟨15729638681443626833597453656346890725725711715326199486210,15729638681443626846480620052515140647789519891433146869364⟩] +lemma bs1_1_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 9 r = bs1_1_0_9 r := by + revert r + decide +kernel +def bs1_1_0_10 : Fin 8 → RI := ![⟨-47618268962560036913158942220284429331861728739284193005697,-47618268962560036911190647642644701435779734752972506703602⟩, + ⟨29181136931558048234848806445882889090230843286974857148441,29181136931558048236264336328692410148676371846484132748553⟩, + ⟨-445749831229778575516743857744866398731466280517336788059164,-445749831229778575487096041042497748366605693616425689648422⟩, + ⟨334398656498278004731435169346634376747654911434625714712556,334398656498278004742405617665168603152653719725271389275248⟩, + ⟨483535244690263408362580888997927867012096639123243435720815,483535244690263408394004464447975288053856221101880931625644⟩, + ⟨248655243313002640145382504255840483884370964495659970058085,248655243313002640158869270367276347975573448313298089031486⟩, + ⟨13537185114559787311995495861014689393736038729109089459605,13537185114559787335705529767709097853317545693465683156070⟩, + ⟨12509167378796913199983012464817610538628361057286815094725,12509167378796913213357369541720404021567376433426302413812⟩] +lemma bs1_1_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 10 r = bs1_1_0_10 r := by + revert r + decide +kernel +def bs1_1_0_11 : Fin 8 → RI := ![⟨-48739976699303309497140110105148100402906723146133675360204,-48739976699303309495094430087147017404705304851676212484946⟩, + ⟨30065486894271825577321096183425817484971371335951531425014,30065486894271825578792279018062593270469834213427621796542⟩, + ⟨-441079075509361607727542204020246785341447673192862080003378,-441079075509361607696728754197012883357161517657279889611762⟩, + ⟨335741567607159482004205111030591531173815994161591955760823,335741567607159482015606873332247554204855625781344953758913⟩, + ⟨481025118259025748138980449665662825150790074808952495019235,481025118259025748171639473941207176597537178608486024479030⟩, + ⟨243809080152328891869789529564021465113168628263514200271341,243809080152328891883806541171622410318649658739946649782836⟩, + ⟨14393809954542028904932221509061177809963985471461957494610,14393809954542028929574438756287344536397107593307555087262⟩, + ⟨9258433992555378227994381704983798351931088342227965411574,9258433992555378241894564805922056152466436763895247844642⟩] +lemma bs1_1_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 11 r = bs1_1_0_11 r := by + revert r + decide +kernel +def bs1_1_0_12 : Fin 8 → RI := ![⟨-49571373301278818101790737503073873179005612668891598903117,-49571373301278818099662023126083518823393141357227067368248⟩, + ⟨30782420673771105586472347641358157262634072980938669595185,30782420673771105588003245936154123479651881172968093638022⟩, + ⟨-432658227366147599875498993745493226908628570484970632220349,-432658227366147599843434822875043215572843162798779960471776⟩, + ⟨334527490237012192205682602093330868356422631216638208453653,334527490237012192217547163080952222390483102175438246718660⟩, + ⟨474534565873859981502326855490944262863163054243385511998633,474534565873859981536311512867642347551577618610319972886142⟩, + ⟨236855294318049187807591034749788978412169498858521452716125,236855294318049187822176998277501710926256753987371005191642⟩, + ⟨15006507478462213439329172323729651957246863326293239726014,15006507478462213464971619663065963661542896162019435585483⟩, + ⟨6077624078490742890365456374717286237773780064349213345838,6077624078490742904829849314632661070160206083433202721319⟩] +lemma bs1_1_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 12 r = bs1_1_0_12 r := by + revert r + decide +kernel +def bs1_1_0_13 : Fin 8 → RI := ![⟨-50094014360155935830306601133521769996710423225181805250401,-50094014360155935828088569058763085007082242118833499181380⟩, + ⟨31317197814934189745523003360649306775299574662828839304198,31317197814934189747118135877127420065595428500039886987576⟩, + ⟨-420643674565760050250036649005068532126417305647043614924517,-420643674565760050216627113085162540699421326796005715627145⟩, + ⟨330760404236635347249349181825256255747157991220931239957624,330760404236635347261711562193485112467157147031856883819807⟩, + ⟨464169879103164518843482592972979204439978392290780775872970,464169879103164518878893196164437116793974513523022428777080⟩, + ⟨227948402494361011471993633243507281479798929081623794426962,227948402494361011487191602165919097087954989653902135919521⟩, + ⟨15356735324582018191551033004991449960543911429102170136231,15356735324582018218269399399430487355020996983215711475449⟩, + ⟨3062744804718273640036555943882259820124414326685093896470,3062744804718273655107853356703035368232892550146346457989⟩] +lemma bs1_1_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 13 r = bs1_1_0_13 r := by + revert r + decide +kernel +def bs1_1_0_14 : Fin 8 → RI := ![⟨-50294290980159618543451182283824289168787373454283728291902,-50294290980159618541136815960652557867668069877617622028204⟩, + ⟨31657699059248437381985198412038580953783048145733618245517,31657699059248437383649611212522060849032551609088016097318⟩, + ⟨-405286780560145104590205283293913915964598555768366880843984,-405286780560145104555344694177168913969658541883109734243659⟩, + ⟨324502890295840229054839630076597975875569703003985605504511,324502890295840229067738937135451133694861496169338634487972⟩, + ⟨450136538291055774375533146045384321988692576682225658969536,450136538291055774412481713400459010355026523345775818119164⟩, + ⟨217296985959878150661179276458708102661646536273430784772656,217296985959878150677037328222461106832951412524683825190868⟩, + ⟨15437918915643067138991155309481967359775355748111384240793,15437918915643067166869961976286037918290241308777074415501⟩, + ⟨300284240864693465162824997853556848727573091981562750973,300284240864693480888703615926533766651795759620921869913⟩] +lemma bs1_1_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 14 r = bs1_1_0_14 r := by + revert r + decide +kernel +def bs1_1_0_15 : Fin 8 → RI := ![⟨-50163864166330845270753068895915549122865209632636970394616,-50163864166330845268334499888517057358328085030275041717402⟩, + ⟨31794763716817696831511009637037594006094558241060739712175,31794763716817696833250361430415252524696787190586334180962⟩, + ⟨-386926516271419905177303648754327256969068909113867026721855,-386926516271419905140873486608696544640838728867126382021451⟩, + ⟨315874994973871194003964916744841612479662412150475512638500,315874994973871194017445005854922771777407004252593697268831⟩, + ⟨432733938813366129470247857927959668487303766275276683861716,432733938813366129508860008035126524202717339169327322779754⟩, + ⟨205156059443591637749209819204938120313998387110929044981999,205156059443591637765781868378908102375823942245034112136383⟩, + ⟨15255898363614059505795912851562854706125272447128958767147,15255898363614059534929942798308402783227920028625713050866⟩, + ⟨-2137622620090100150976460960751650065551484147796415003153,-2137622620090100134542535933899632468028692217049324094072⟩] +lemma bs1_1_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 15 r = bs1_1_0_15 r := by + revert r + decide +kernel +def bs1_1_0_16 : Fin 8 → RI := ![⟨-49699973285880998504785256261657960915450131876809263363253,-49699973285880998502253620737037510782865734329542468160990⟩, + ⟨31722460371943932911359575365701209646492751377104469900055,31722460371943932913180240716339605287872524529467038394269⟩, + ⟨-365977705896837129743989883119517028848346564840052526203406,-365977705896837129705856634750922530886742469404810730648307⟩, + ⟨305050683846209627709503485164291549019658531278470302840690,305050683846209627723613759612549112347983883256500343279198⟩, + ⟨412345599060202684950111248560540042241137224927742702920901,412345599060202684990528491399129097546255524587440745766801⟩, + ⟨191816832561526614790670095778755170298200933283752599187210,191816832561526614808016877399212943931198629427963549507881⟩, + ⟨14828403127331078162519872947611666868261801678649713382149,14828403127331078193015899714786623051383094023556154503565⟩, + ⟨-4197067323993308319939874226271536234521655183504769623201,-4197067323993308302737673966725138708827486156637651218022⟩] +lemma bs1_1_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 16 r = bs1_1_0_16 r := by + revert r + decide +kernel +def bs1_1_0_17 : Fin 8 → RI := ![⟨-48905615248920538159488804967573497036109454574051859668391,-48905615248920538156834068905718246140587630757491343009119⟩, + ⟨31438288312265331759558625952777332500621336961963000429565,31438288312265331761467820983369845359756251352932000427989⟩, + ⟨-342915376631064959925502162731691666462187504206926014011582,-342915376631064959885514688778404453473493104499563339826906⟩, + ⟨292252010382865933903694715501707507517889130546712472708450,292252010382865933918491100706661251704588206837784285579301⟩, + ⟨389425196648356890138253053578358959448314240933278416182679,389425196648356890180635581016313636211374110002821571925392⟩, + ⟨177594422526222818937865933047031591321888871316389092169054,177594422526222818956056200278637786694876739767975781001753⟩, + ⟨14183576948301708151158281437729689719228741705260800470396,14183576948301708183137174613318106869132256229981593290175⟩, + ⟨-5844896453680486330499287755946899290035828828859503442924,-5844896453680486312460632140632903548853526212364073648237⟩] +lemma bs1_1_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 17 r = bs1_1_0_17 r := by + revert r + decide +kernel +def bs1_1_0_18 : Fin 8 → RI := ![⟨-47789598583860602910047002347205461992175356047984827517210,-47789598583860602907257747023724459616366617744301895998496⟩, + ⟨30943311586336850817921410673637079703734752611462860128172,30943311586336850819927347338724494629528689863413897702237⟩, + ⟨-318256043877761887751419867055837929432577000364964795249086,-318256043877761887709406170779361541748574731229017134786588⟩, + ⟨277741299433994493660983315964890047841191143166130708240437,277741299433994493676529455106413516398806089158273524900927⟩, + ⟨364479129531776284344225757632192139233892544896186188370479,364479129531776284388755868168758717927399974535707080044067⟩, + ⟨162814299291866476146946288424025659835839864662196789999899,162814299291866476166058282434057806889720662954782215855055⟩, + ⟨13357698488128799378610455872598954109139682549703652443907,13357698488128799412209765163563886194978634641458356725239⟩, + ⟨-7069641705080847116741486029209842055984358738116371488579,-7069641705080847097788786012729333359324889539648234815440⟩] +lemma bs1_1_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 18 r = bs1_1_0_18 r := by + revert r + decide +kernel +def bs1_1_0_19 : Fin 8 → RI := ![⟨-46366482303813947737229983361484068177907504627023711845011,-46366482303813947734293139882702907640468657517259222308544⟩, + ⟨30242231544455215999330682849282527348578258643050786632816,30242231544455216001442759848498708766687453673783577073866⟩, + ⟨-292537051789167122236299705354097913842757602498948264144531,-292537051789167122192062934022830449159007774197219074669120⟩, + ⟨261811794473821328605682582868910161115813264135742592943333,261811794473821328622051316478256958534117700350981129974894⟩, + ⟨338046613046739239737099034663638764384248914591465070610696,338046613046739239783985371543204488189732718681881410600041⟩, + ⟨147798401802279590083589893553468037556225343579971684822915,147798401802279590103713162478927533375481036986389021255543⟩, + ⟨12392349539736071931429846085140580996156558813348019746062,12392349539736071966806999101930384377773214203378512298970⟩, + ⟨-7880775060755438316731878121221170688369219635945577697402,-7880775060755438296776331929409621131567675181079076701115⟩] +lemma bs1_1_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 19 r = bs1_1_0_19 r := by + revert r + decide +kernel +def bs1_1_0_20 : Fin 8 → RI := ![⟨-44656412016799179536721912759941406345105901150102014461771,-44656412016799179533622430539184111416831064379568480806902⟩, + ⟨29343407782343560420150073992933085609349684691873790728766,29343407782343560422379115191480788443110920496635653988073⟩, + ⟨-266295280189764331808944451609512978349225722122686239857841,-266295280189764331762257902858800910805586121879158124393950⟩, + ⟨244777325780441647624080635211510135721107776420054220738758,244777325780441647641355848945452474208501144182623954923890⟩, + ⟨310678557156086083052687713554869310289421186537818073438341,310678557156086083102170557501440967802605733506220633082145⟩, + ⟨132851924910096499178119336923042978227325142716076107448039,132851924910096499199357007473139123784685253272104703240808⟩, + ⟨11331349366048696661716954698757692694542396060567074956115,11331349366048696699053250482841743084837643774726785311612⟩, + ⟨-8306407392849225551118711658518951194603558480851132164090,-8306407392849225530058052119239576579031033995495555405360⟩] +lemma bs1_1_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) 20 r = bs1_1_0_20 r := by + revert r + decide +kernel +def bs1_1_0 : Fin 21 → Fin 8 → RI := ![bs1_1_0_0,bs1_1_0_1,bs1_1_0_2,bs1_1_0_3,bs1_1_0_4,bs1_1_0_5,bs1_1_0_6,bs1_1_0_7,bs1_1_0_8,bs1_1_0_9,bs1_1_0_10,bs1_1_0_11,bs1_1_0_12,bs1_1_0_13,bs1_1_0_14,bs1_1_0_15,bs1_1_0_16,bs1_1_0_17,bs1_1_0_18,bs1_1_0_19,bs1_1_0_20] +lemma bs1_1_0_mem (d : Fin 21) (r : Fin 8) : (bs1_1_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 1 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_0) d r = bs1_1_0 d r := by + fin_cases d + · exact bs1_1_0_0_calc r + · exact bs1_1_0_1_calc r + · exact bs1_1_0_2_calc r + · exact bs1_1_0_3_calc r + · exact bs1_1_0_4_calc r + · exact bs1_1_0_5_calc r + · exact bs1_1_0_6_calc r + · exact bs1_1_0_7_calc r + · exact bs1_1_0_8_calc r + · exact bs1_1_0_9_calc r + · exact bs1_1_0_10_calc r + · exact bs1_1_0_11_calc r + · exact bs1_1_0_12_calc r + · exact bs1_1_0_13_calc r + · exact bs1_1_0_14_calc r + · exact bs1_1_0_15_calc r + · exact bs1_1_0_16_calc r + · exact bs1_1_0_17_calc r + · exact bs1_1_0_18_calc r + · exact bs1_1_0_19_calc r + · exact bs1_1_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 1 0 tr1_1_0_mem) d r +lemma bs1_1_0_lower (d : Fin 21) : (970/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 1 0) d) := by + have hc : ∀ d : Fin 21, (970:ℤ)*scale < 1000000*(rowLowerBox (bs1_1_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_1_0_mem d)).1 + have hnum : (970:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_1_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_1_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (970/1000000:ℝ) < ordinarySignValue 1 1 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 1 0) _ bs1_1_0_lower e he hτ +def bs1_1_1_0 : Fin 8 → RI := ![⟨-26648003543229076746733690503528086388752483009574850576591,-26648003543229076745322362930448771049231802689910862853119⟩, + ⟨15361991517777810404594272527701125590719206693703705676215,15361991517777810405609250863210114645660157480515109945842⟩, + ⟨-314271869427859622949421580600453425733341907840465361781108,-314271869427859622928163186827072320396361281065109507991859⟩, + ⟨213585000772797176853948913483664133784798278411487820901180,213585000772797176861815061354077846679831303344281033146584⟩, + ⟨328226630718745444905117275756307693380372408571991496452962,328226630718745444927648943007825017700948076341925150801397⟩, + ⟨187286378943957914874672514022443934712903458305327786618506,187286378943957914884342938916866323764022538849514016607036⟩, + ⟨229602882781737100756080264355605460012664823598479175529,229602882781737117756901682518511004878652338619312250781⟩, + ⟨30620974801986520234121834860368692264889175228362269882223,30620974801986520243711659030761166128625322911701549580677⟩] +lemma bs1_1_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 0 r = bs1_1_1_0 r := by + revert r + decide +kernel +def bs1_1_1_1 : Fin 8 → RI := ![⟨-25438335625311458237990426475779526840768605723124583312255,-25438335625311458236557835244733843423092719063592872238945⟩, + ⟨14617238240726201903880269546109478879516044266468646186069,14617238240726201904910539974381991129347917241143428358116⟩, + ⟨-302715672662054732309731531807847151990393391778953667706310,-302715672662054732288152850085206411533798823466638253869197⟩, + ⟨204935233662224590036881192370817382343912334371053780923701,204935233662224590044865854951097968204947901650762326671983⟩, + ⟨315665353498962344431963999992633322719448486616416481034200,315665353498962344454835138870025014591833004360571928463057⟩, + ⟨180881792371967760472787482099860781749297930526013485135683,180881792371967760482603605704710095164654379191598055427531⟩, + ⟨-319472912104163229342672380335126048889901183743613669054,-319472912104163212085709398277864970053109113120185307709⟩, + ⟨30571692525643109693925701632102389478394452170019518552544,30571692525643109703660010148297567496925822917281708333396⟩] +lemma bs1_1_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 1 r = bs1_1_1_1 r := by + revert r + decide +kernel +def bs1_1_1_2 : Fin 8 → RI := ![⟨-24231635759514837320896576368430395961519189835243347130692,-24231635759514837319442144837008231887092527869552622811747⟩, + ⟨13878912258703596839680656906254261887364911316178826730011,13878912258703596840726634128713723917718862913158415113037⟩, + ⟨-290872058957071293035766272570624835229342482977234284272840,-290872058957071293013858617111204453887134277948338273209312⟩, + ⟨196177693725077673309606405742963218522550863791564286933370,196177693725077673317712796996016239842516219669957000050521⟩, + ⟨302854173720080940991311511574246637017271771673876242793802,302854173720080941014531328101087425515663015955067108406995⟩, + ⟨174257424525840991095328260851510007101699102970517964351564,174257424525840991105294034323999356956219474406806278352130⟩, + ⟨-833357677884397663662562082534327977500466401001964268626,-833357677884397646142511314585153684981043395987008649294⟩, + ⟨30407860286525936575171017750512432537805358318235048381074,30407860286525936585053728837752448305752423382209777562659⟩] +lemma bs1_1_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 2 r = bs1_1_1_2 r := by + revert r + decide +kernel +def bs1_1_1_3 : Fin 8 → RI := ![⟨-23031548183122142238040105055133325340997893601976289541343,-23031548183122142236563232985213568251686773869979563361784⟩, + ⟨13149075084928304205654843762955890938907040268671668833382,13149075084928304206716959450250964387421427348494969922136⟩, + ⟨-278795131956300174265705777282117174103188103177253063472177,-278795131956300174243460106883449260623695309178979131650665⟩, + ⟨187347152094240820807604138471792632326461161674890924948098,187347152094240820815835603873118923570650280221406530237916⟩, + ⟨289849096987088599478258979048591047423075970943945160134809,289849096987088599501837055951015093190940928598473999713850⟩, + ⟨167445684013521677910240991400550696863068311226041921381263,167445684013521677920360527575844940542558690917187009351988⟩, + ⟨-1309212184654990304729088327057523148903629065819994212855,-1309212184654990286938719317794675047939077262651827599001⟩, + ⟨30131531741041296138805786793835671780220402388960637095501,30131531741041296148840979007766419209261656073409751172742⟩] +lemma bs1_1_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 3 r = bs1_1_1_3 r := by + revert r + decide +kernel +def bs1_1_1_4 : Fin 8 → RI := ![⟨-21841596185347853047585640455277454672404940588758660570769,-21841596185347853046085702731494699947365258791840162704012⟩, + ⟨12429688980052079587661241330910513031582260599547060317940,12429688980052079588739945044549839349258158301371801226862⟩, + ⟨-266539187937034893607124968753524993215533878209007838187091,-266539187937034893584531867494851379679141659142561935590379⟩, + ⟨178477983315982935538233056304866765074464759782164351896062,178477983315982935546593079985291433326025349836246023741177⟩, + ⟨276705966254838322239891280179390912520192928079879008737907,276705966254838322263837597345609699796907681756510397191791⟩, + ⟨160479507682807129093693863730167294955769405896613298900587,160479507682807129103971445902456761495626976839540542621617⟩, + ⟨-1744660112954890976110592952021557495671311982710659477317,-1744660112954890958042375575276759280968384931661355400116⟩, + ⟨29745747080795722688501333570723071961025630088364600959547,29745747080795722698693254505279727480450104197200651981654⟩] +lemma bs1_1_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 4 r = bs1_1_1_4 r := by + revert r + decide +kernel +def bs1_1_1_5 : Fin 8 → RI := ![⟨-20665165836363909334273649426177277952393617544484018848732,-20665165836363909332749994672446888470913866590300472950038⟩, + ⟨11722608650532149849169018067020032024859865119756129579657,11722608650532149850264778254319910318916012303817715739632⟩, + ⟨-254158311254047476931396403160856381597992999725744117493427,-254158311254047476908446059564270501120927190868411255095084⟩, + ⟨169603941235064379060314823004422237517229040603376915624416,169603941235064379068807035461003645670104644785777912982938⟩, + ⟨263480063774163247047745819856374462669570731184954916161266,263480063774163247072070776423680281017867992410737810889662⟩, + ⟨153392092763938001035539203056846792458266846769388785879619,153392092763938001045979294458925784345398094268084890745938⟩, + ⟨-2137809166060071851181260930801389161926843675361719938071,-2137809166060071832827348724350652818633786802564530814215⟩, + ⟨29254489357013922248850506869919234225958973221301757675911,29254489357013922259203582557894679843343877246268858600105⟩] +lemma bs1_1_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 5 r = bs1_1_1_5 r := by + revert r + decide +kernel +def bs1_1_1_6 : Fin 8 → RI := ![⟨-19505491054677857417692357437098024122966736405024534684252,-19505491054677857416144306523601863385591323060671112217738⟩, + ⟨11029573964278932565245911499652850986630312764311005148288,11029573964278932566359216567461838747907435743502856929493⟩, + ⟨-241705983567554793738929208419944795061416831163388103249780,-241705983567554793715611392961576324745359185811620254014371⟩, + ⟨160757946438243813429280925097847333838958093860750347713509,160757946438243813437909111515312341422744244240879158154084⟩, + ⟨250225730083829225236607766960429183780424237701201406629720,250225730083829225261322205150980187748484206894735573739149⟩, + ⟨146216633824428846968567970211376975538503378633850678336982,146216633824428846979175224244786386824812893638507337979116⟩, + ⟨-2487264401909603306486844226865062305040888128971031917905,-2487264401909603287839056407611133419893070235050111245032⟩, + ⟨28662629103607331290542260794075514150664384851831295656586,28662629103607331301061105851997099723561616178795148203316⟩] +lemma bs1_1_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 6 r = bs1_1_1_6 r := by + revert r + decide +kernel +def bs1_1_1_7 : Fin 8 → RI := ![⟨-18365640109135517275913021356124700926148577901821488289418,-18365640109135517274339865788198493581691322922680625719680⟩, + ⟨10352203732028236703570742896486794519594573172860471590251,10352203732028236704702102369842603223715741289407473848395⟩, + ⟨-229234710857854062835145933226961132978641342130249163786306,-229234710857854062811449974069281121632686054468271318847490⟩, + ⟨151971887173768939190093013265147438308385573273881045943111,151971887173768939198861122495557431777310244318619865583686⟩, + ⟨236996003724318730951384349708441330932925968496177803136794,236996003724318730976499580550472270202694367954816052851181⟩, + ⟨138986067580875949913863304185936175919563775309459714410549,138986067580875949924642575460316860327061466547858282950037⟩, + ⟨-2792133779744260738262216218947422271426871364820344441796,-2792133779744260719312018275491784305997715810757367937205⟩, + ⟨27975858473076638035124068261988211584757938856237463036818,27975858473076638045813496837460683936098290716692295231470⟩] +lemma bs1_1_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 7 r = bs1_1_1_7 r := by + revert r + decide +kernel +def bs1_1_1_8 : Fin 8 → RI := ![⟨-17248503633541645094924729728467305790741096604508094817636,-17248503633541645093325729907751147105198795372495754678430⟩, + ⟨9691990588348803668907939682462242065639359244868867318351,9691990588348803670057885455112590439175452481997574959479⟩, + ⟨-216795671793810612994556050649604220460634930362295367523806,-216795671793810612970470807449669260222528459515538336773010⟩, + ⟨143276435404462959648027083301532482650115653652985688450357,143276435404462959656939237555901030991748913327264642857043⟩, + ⟨223842284890716263871304409721008241693753449948200014678685,223842284890716263896832240809343958601447477399314892249657⟩, + ⟨131732828354832839011124574108827744063824080132611303133356,131732828354832839022080930356527544736239648732225760581916⟩, + ⟨-3052026086459497562730718457833667407033537829826146107874,-3052026086459497543469201204333201903696671169409081006667⟩, + ⟨27200616255896862883704184157224744150004881135534591315351,27200616255896862894569221744231802382249509564437965504300⟩] +lemma bs1_1_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 8 r = bs1_1_1_8 r := by + revert r + decide +kernel +def bs1_1_1_9 : Fin 8 → RI := ![⟨-16156784212969472298002433317906655912826838863656495080609,-16156784212969472296376816664907605761753818855118915113937⟩, + ⟨9050296991106979527211125729839548087165471249052629903159,9050296991106979528380213414430686016619024010215331321573⟩, + ⟨-204438390549710105226944194065394880934600724187904760097628,-204438390549710105202458029695584072103951560009731568219475⟩, + ⟨134700879377267167775985092573502318415491703484614232432699,134700879377267167785045597885843735393943683028307717734672⟩, + ⟨210814025754321076925424177688110370831835304699539821520289,210814025754321076951376943157217944455270633393968868821316⟩, + ⟨124488616665655243516432817877021425904067261790895713434816,124488616665655243527571552817307424615340805337134842055985⟩, + ⟨-3267041564315219000126999208800878020869589045142246198761,-3267041564315218980544856169397493538986040119171800570574⟩, + ⟨26344005270158540778437527530055699511069046583090598138660,26344005270158540789483423725952031400903997933466750007967⟩] +lemma bs1_1_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 9 r = bs1_1_1_9 r := by + revert r + decide +kernel +def bs1_1_1_10 : Fin 8 → RI := ![⟨-15092987581663477544782860793294543066124907997120579949305,-15092987581663477543129819719146701784527477259753712647839⟩, + ⟨8428352342956658338168062781465204432099750494056676956228,8428352342956658339356873168182430386583151310302305836370⟩, + ⟨-192210436667421788993155691316204641897088520458303517829539,-192210436667421788968256441313464542450162890946962620918255⟩, + ⟨126272973809212220995847932957922215571869241472241915707213,126272973809212221005061290489810100139994071916517002360459⟩, + ⟨197958449678279857977053168668278339127926246939547413149580,197958449678279858003443761572862471824006977623409310694805⟩, + ⟨117284183131741710313978182135391366795614687542096755217161,117284183131741710325304829371961882588980996068663823454643⟩, + ⟨-3437755700846203934352730559647949786912480995803730262945,-3437755700846203914440233536334340137414898895427108604144⟩, + ⟨25413703683341639981709766799287020618546458808997385771230,25413703683341639992942009086477775642287124936917682528174⟩] +lemma bs1_1_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 10 r = bs1_1_1_10 r := by + revert r + decide +kernel +def bs1_1_1_11 : Fin 8 → RI := ![⟨-14059415453412181049728745811577638854718684256342141218436,-14059415453412181048047435525249613353014234143150646971956⟩, + ⟨7827251223399119892337083787087690248492219310993249992362,7827251223399119893546224420636456004060123067156988816249⟩, + ⟨-180157154050634812695840400830496817692944808003979779927121,-180157154050634812670515340366980970853301368122811706785806⟩, + ⟨118018808505115265029753554615563176333027132604033033899336,118018808505115265039124472877836173917950491767367813238627⟩, + ⟨185320301043143465511666272997408343274530294337712020555733,185320301043143465538508180320068473194821589442326688821854⟩, + ⟨110149129512033870960800606572030956808708198136550983402966,110149129512033870972320954618043003269661099844845494178309⟩, + ⟨-3565196760461056693415479108329922107860154643411692133686,-3565196760461056673162451766618148077890779628628418166588⟩, + ⟨24417871863003192484990365471798129265385387957468544793316,24417871863003192496414694117536271458499594180634057258968⟩] +lemma bs1_1_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 11 r = bs1_1_1_11 r := by + revert r + decide +kernel +def bs1_1_1_12 : Fin 8 → RI := ![⟨-13058159986733694211040302991352272959960804421565934837536,-13058159986733694209329839126819712773313739164293695234989⟩, + ⟨7247952705547518690535574705821624576718475000298127741302,7247952705547518691765681591883580468169766192295338578621⟩, + ⟨-168321420666638418447886530282951472142613854690014848190177,-168321420666638418422122338424849075866306594471324478290764⟩, + ⟨109962695941713211338868759976451576140759812236566581791171,109962695941713211348402168054358319882006692559450674894171⟩, + ⟨172941626894533334392524886591053700584433744718959351503202,172941626894533334419832227124176137764026274130504051403686⟩, + ⟨103111728370828012218880289997894397689475695634251139143162,103111728370828012230600398534591549670352420384263312269393⟩, + ⟨-3650817733272979289368136546312996919756581396470885345752,-3650817733272979268763925832206195738814505792557175520598⟩, + ⟨23365056350004721650079910422754766450299345578019718127972,23365056350004721661702334602257064556752752255708923034114⟩] +lemma bs1_1_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 12 r = bs1_1_1_12 r := by + revert r + decide +kernel +def bs1_1_1_13 : Fin 8 → RI := ![⟨-12091099869493568157369071991451672306720471335698555555522,-12091099869493568155628528037394288983484617268282958410506⟩, + ⟨6691280718287557272113052752725896391739351826466531480838,6691280718287557273364792206432548179621236065171599770558⟩, + ⟨-156743440029183420522844273812454348971070157838087900173242,-156743440029183420496626994804305867942705591012086798030238⟩, + ⟨102127078081708647340902323389786200889895821750715202662562,102127078081708647350603385268775946605430574807398885973721⟩, + ⟨160861591136636039892691656157805919667066060192023051519001,160861591136636039920479221538127777942891939515460407982820⟩, + ⟨96198762499106843527712845824772358273415193676689045834753,96198762499106843539639063313216030932660123552100032925904⟩, + ⟨-3696463449200599403784895737047442358034329381267145158820,-3696463449200599382818340915225736137041897551305313646276⟩, + ⟨22264092509909263301623104053232010803978175179714265654851,22264092509909263313449919314620638880282381873317390526222⟩] +lemma bs1_1_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 13 r = bs1_1_1_13 r := by + revert r + decide +kernel +def bs1_1_1_14 : Fin 8 → RI := ![⟨-11159897990936049468232139844990954296346582200921635729280,-11159897990936049466460544357354451781628760157898178272714⟩, + ⟨6157925402354649198394633156349934629936280855033212773460,6157925402354649199668703806912401436952361111206583061290⟩, + ⟨-145460565052597188443539035189211745084591814447006768417119,-145460565052597188416854036467585364982214187680301330584591⟩, + ⟨94532452423879345480306252040160256676595392357096893488245,94532452423879345490180382141893421089344063848606629378783⟩, + ⟨149116321530304595671593189899072892266954348884087751696778,149116321530304595699876489108780417791529388626903034604146⟩, + ⟨89435384882136523029454541502891070360790755422052421407528,89435384882136523041593524283502716905174092450342741678285⟩, + ⟨-3704333654311157826398015027127130736383115987163528253184,-3704333654311157805057414103528950777591892080408591527507⟩, + ⟨21124007349372729044366692017874105303136313307220085577310,21124007349372729056404499222528604474351072988401354624666⟩] +lemma bs1_1_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 14 r = bs1_1_1_14 r := by + revert r + decide +kernel +def bs1_1_1_15 : Fin 8 → RI := ![⟨-10266000653782817270555487753721931900557998799720713564537,-10266000653782817268751821328964429541530616194204352026528⟩, + ⟨5648445398193408924223290512955015056296160148723774486914,5648445398193408925520425480401283743126920210512618722524⟩, + ⟨-134507154410354231479505587150255404421767151277261081703646,-134507154410354231452337513752687498686844262021770449497805⟩, + ⟨87197317055773639479316582716452438362736622044775441397203,87197317055773639489369462768655388453079408583900157982832⟩, + ⟨137738789320012050375004229815573335620936436769675901837577,137738789320012050403799537504042222660608988079770396665339⟩, + ⟨82844999672454872222818272052834632031637343269111714081073,82844999672454872235177005084729218502542049039918948646715⟩, + ⟨-3676942872591862340520326443166943572696254904154298607988,-3676942872591862318793399704780930716566734527367012741068⟩, + ⟨19953923889321615725732172631094981057539117602900495490190,19953923889321615737987898520128219880471604499388504009943⟩] +lemma bs1_1_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 15 r = bs1_1_1_15 r := by + revert r + decide +kernel +def bs1_1_1_16 : Fin 8 → RI := ![⟨-9410638265215549471442946974947856266413716299205291725213,-9410638265215549469606138958918752598738537102551440917285⟩, + ⟨5163270994504165310242740432039556021636493455222049288945,5163270994504165311563709694075807569687537226222275369457⟩, + ⟨-123914461107112523277869788074863663093354553312063512348868,-123914461107112523250202513066711909479817940826508513306485⟩, + ⟨80138134256582552113342166232946550114322664019989946482413,80138134256582552123579763612740271828660360977759715086873⟩, + ⟨126758720915232930954516948315109642767257949055516347699739,126758720915232930983841357341240194739746880929592908563391⟩, + ⟨76449164315047380410423688589823388004998039234006515135281,76449164315047380423009508001590953008663837954080253545847⟩, + ⟨-3617077881353885861192148638118465504780190040056075659730,-3617077881353885839065999008209472060593992434565858723004⟩, + ⟨18762968370326790930084761115606797839894164311711977461250,18762968370326790942565680672691019666987154574545681743215⟩] +lemma bs1_1_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 16 r = bs1_1_1_16 r := by + revert r + decide +kernel +def bs1_1_1_17 : Fin 8 → RI := ![⟨-8594827433339861498641869531336130688918243586587715723653,-8594827433339861496770794435454569013073433157912469904370⟩, + ⟨4702708059219584044085901720340905090986232371646907236044,4702708059219584045431514689712918038605165007225280533603⟩, + ⟨-113710552586751792359680426584052225261704880398300680038000,-113710552586751792331496997076492520206061826969925863564816⟩, + ⟨73369312001767983606974810421419580589133331169539656076319,73369312001767983617403398130037586499656339114970140053120⟩, + ⟨116202540693079864561877195012527304501288937619544195582809,116202540693079864591748673660004652585578296611551753613394⟩, + ⟨70267512681865101862364009706799909833080248996442830971214,70267512681865101875184627352871990139329144705518331215697⟩, + ⟨-3527753614344381156741442616530976533550088849106367209248,-3527753614344381134202512484003404303812402772838903812797⟩, + ⟨17560181432802783969438222383863324692350477352219047012066,17560181432802783982151983186924978119468934634289464417440⟩] +lemma bs1_1_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 17 r = bs1_1_1_17 r := by + revert r + decide +kernel +def bs1_1_1_18 : Fin 8 → RI := ![⟨-7819374385211639543103645171993923458803634329091395282929,-7819374385211639541197118764634198507626683499835459786044⟩, + ⟨4266942669330795625888344700417109335355376049354643704853,4266942669330795627259453035851679999675495659468636579291⟩, + ⟨-103920261353740906342387207731032514813985924231692776740318,-103920261353740906313669786006797794030154865248971614899692⟩, + ⟨66903202549414375377827107184223235506430349938249490059903,66903202549414375388453285631989740058708462802441383129460⟩, + ⟨106093343672927291427542847243262403478731656311325332217667,106093343672927291457980301621097075982409547927840915317547⟩, + ⟨64317698809246133739312471202780654832665390159530555763895,64317698809246133752376001445280678417631845456519711673961⟩, + ⟨-3412168275772902110637552663093719457933338969611531395178,-3412168275772902087671576799404697420896342006034679667224⟩, + ⟨16354434270319606276439305003975448258419699077063608800483,16354434270319606289393953783825094453821960233848692889174⟩] +lemma bs1_1_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 18 r = bs1_1_1_18 r := by + revert r + decide +kernel +def bs1_1_1_19 : Fin 8 → RI := ![⟨-7084879613732920558983195401626202763692612606071827581545,-7084879613732920557039970438294563041953095154611178382680⟩, + ⟨3856046352473532616689857916534510044370532858452102380979,3856046352473532618087358593449699533829978476465218103740⟩, + ⟨-94565164783459539138891692821737965792344316729501781468447,-94565164783459539109621492020082754623100015947759114799745⟩, + ⟨60750117141851085156500648274827812803506191553402597146079,60750117141851085167331369079361149872816059738809767224313⟩, + ⟨96450896541816831364154854671697543221575146976136896209794,96450896541816831395178196881415989953536507396747662338530⟩, + ⟨58615360596637045315993347658074276394410496422219132698680,58615360596637045329308336623671456259892712960485360674421⟩, + ⟨-3273658403470450121760012240914812625595167529354493994596,-3273658403470450098351966365876342020969766680859737759275⟩, + ⟨15154350602978887684837144681907258957917873092985248980839,15154350602978887698041156335244402033679619777071509027094⟩] +lemma bs1_1_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 19 r = bs1_1_1_19 r := by + revert r + decide +kernel +def bs1_1_1_20 : Fin 8 → RI := ![⟨-6391743653694761627941105490988427232785157213276525819591,-6391743653694761625959867041888222396468847302400212921276⟩, + ⟨3469981851413961152116530685063737166815441982642016288630,3469981851413961153541369355823597702126322287492971046825⟩, + ⟨-85663592539958899724645398355576358806940484214357386662388,-85663592539958899694802612092825616634310492067145881705033⟩, + ⟨54918355735036863301027119433511099354074174541572253476333,54918355735036863312069711461915618748816183238304250079721⟩, + ⟨87291665282063778141756947125453769635664882043563879619854,87291665282063778173387169855933339199163878398028276137332⟩, + ⟨53174102619735557084858807065300405381918452363679487787318,53174102619735557098434264660761082799899758843590189152281⟩, + ⟨-3115654562995367015275443440649119634789026295670753674167,-3115654562995366991409487938378934302448672432104911926969⟩, + ⟨13968235163667397765155323858160756857499084307057143102511,13968235163667397778617633196283022976886622626976687862428⟩] +lemma bs1_1_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) 20 r = bs1_1_1_20 r := by + revert r + decide +kernel +def bs1_1_1 : Fin 21 → Fin 8 → RI := ![bs1_1_1_0,bs1_1_1_1,bs1_1_1_2,bs1_1_1_3,bs1_1_1_4,bs1_1_1_5,bs1_1_1_6,bs1_1_1_7,bs1_1_1_8,bs1_1_1_9,bs1_1_1_10,bs1_1_1_11,bs1_1_1_12,bs1_1_1_13,bs1_1_1_14,bs1_1_1_15,bs1_1_1_16,bs1_1_1_17,bs1_1_1_18,bs1_1_1_19,bs1_1_1_20] +lemma bs1_1_1_mem (d : Fin 21) (r : Fin 8) : (bs1_1_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 1 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 1 tr1_1_1) d r = bs1_1_1 d r := by + fin_cases d + · exact bs1_1_1_0_calc r + · exact bs1_1_1_1_calc r + · exact bs1_1_1_2_calc r + · exact bs1_1_1_3_calc r + · exact bs1_1_1_4_calc r + · exact bs1_1_1_5_calc r + · exact bs1_1_1_6_calc r + · exact bs1_1_1_7_calc r + · exact bs1_1_1_8_calc r + · exact bs1_1_1_9_calc r + · exact bs1_1_1_10_calc r + · exact bs1_1_1_11_calc r + · exact bs1_1_1_12_calc r + · exact bs1_1_1_13_calc r + · exact bs1_1_1_14_calc r + · exact bs1_1_1_15_calc r + · exact bs1_1_1_16_calc r + · exact bs1_1_1_17_calc r + · exact bs1_1_1_18_calc r + · exact bs1_1_1_19_calc r + · exact bs1_1_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 1 1 tr1_1_1_mem) d r +lemma bs1_1_1_lower (d : Fin 21) : (970/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 1 1) d) := by + have hc : ∀ d : Fin 21, (970:ℤ)*scale < 1000000*(rowLowerBox (bs1_1_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_1_1_mem d)).1 + have hnum : (970:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_1_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_1_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (970/1000000:ℝ) < ordinarySignValue 1 1 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 1 1) _ bs1_1_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs12.lean b/lean/OAI/Analysis/Triangular/Signs/Signs12.lean new file mode 100644 index 0000000000000000000000000000000000000000..58dc026127b9291f106db20b2ed401136719eee8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs12.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows12 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_2_0_0 : Fin 8 → RI := ![⟨-19161310605243970596138914178477271333449753394552133298562,-19161310605243970595347988481334459320489691444497830672045⟩, + ⟨9938250019542961465016365256426227767440728224088244901397,9938250019542961465585171863017529452010501813708298315791⟩, + ⟨-273735616716711908419479425147467262930460388010366657359482,-273735616716711908407565954287888134718455970697704029887172⟩, + ⟨169072214849163758267170545538179038528093795652206100925157,169072214849163758271578833597273949734576245866150658480926⟩, + ⟨274153343269704808297912775034566776608120432857364165913921,274153343269704808310539804342262791494795787088259531081143⟩, + ⟨174220562142018446893851815261078551177969286543447843387994,174220562142018446899271242824410309901292650819235975302072⟩, + ⟨-20495853512325440608433804533167029583977161789518125640042,-20495853512325440598906330692643259106621463100516657286882⟩, + ⟨60320423906192361440541038454229555574770341473311591586808,60320423906192361445915296360235482668468035603890458420437⟩] +lemma bs1_2_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 0 r = bs1_2_0_0 r := by + revert r + decide +kernel +def bs1_2_0_1 : Fin 8 → RI := ![⟨-18592086968679229680408088752510811033665869811137566136369,-18592086968679229679607671419882871438364015301392824570991⟩, + ⟨9658052427494265089081490433954766197050815487292667651768,9658052427494265089657123098910506888949976549375307926745⟩, + ⟨-265043944291717674779374469796570343736942943229334802770041,-265043944291717674767318029346839319573085629315652466382534⟩, + ⟨163961796881845010288043332010849049608857442315990975364536,163961796881845010292504522464602408280687606261400459599769⟩, + ⟨265651328041175908851069428183534611834454202614718581355127,265651328041175908863847990258321344026335440824291380491745⟩, + ⟨168521193872236343720132027632563905172598899403456712209006,168521193872236343725616491938491887231913364577473801589894⟩, + ⟨-19330449869239408678824279800492133252667294020944458153565,-19330449869239408669182469924229052105710867857678117617573⟩, + ⟨57688488022801402905333930077275313025328114699276956091594,57688488022801402910772682659873123688363720604386881036635⟩] +lemma bs1_2_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 1 r = bs1_2_0_1 r := by + revert r + decide +kernel +def bs1_2_0_2 : Fin 8 → RI := ![⟨-18003734400577307974719166142197155841566205918959923269335,-18003734400577307973908972992776661162114821227987415266077⟩, + ⟨9368090936554446406088310657779835221764424884978244712477,9368090936554446406670973754539496556377393826399841884780⟩, + ⟨-256086838296288124550943047369322934330165234642551198163564,-256086838296288124538739356793686617024599775796913994966251⟩, + ⟨158675463529673225154212630705502549116575835161553565438632,158675463529673225158728307461314238155183083338040728848390⟩, + ⟨256873098218571706167849410744169256690889413745679770562247,256873098218571706180784042504888598447078790608070923412343⟩, + ⟨162659641751955628541322715286746535954455524179321602701506,162659641751955628546874163547273859295159081552595279263436⟩, + ⟨-18177368525730664078302601006431746887562462712811414750199,-18177368525730664068543031852547650122133562319820939231034⟩, + ⟨55038543760759884443254032782759292037903540253405502746633,55038543760759884448759211024396009540719106589719122547858⟩] +lemma bs1_2_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 2 r = bs1_2_0_2 r := by + revert r + decide +kernel +def bs1_2_0_3 : Fin 8 → RI := ![⟨-17397913925907474143026014235406661740594308610730098272430,-17397913925907474142205751937104070332166514788416445981580⟩, + ⟨9069026073085017695274520054039539886900411677430943759474,9069026073085017695864424536970924137857148838888264008095⟩, + ⟨-246892103829456574522396098290083685333570687795227674972564,-246892103829456574510040739217368160685736241419818980655752⟩, + ⟨153229179840306829999782574706740150519900403784771270194206,153229179840306830004354372674631021082924412369994215650738⟩, + ⟨247845596672582957246494869271333089177786477494995354696553,247845596672582957259590253727912844045039613718777198073282⟩, + ⟨156654529819490292359423155778840327463142001206978869955942,156654529819490292365043597907183431231965066860033930658465⟩, + ⟨-17040719306375373262090071100208811035801518854296420331576,-17040719306375373252209209196698629526376529282958861933046⟩, + ⟨52379854950140668655889517789659105384935006700023268873649,52379854950140668661463114851395109089521140378689611211286⟩] +lemma bs1_2_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 3 r = bs1_2_0_3 r := by + revert r + decide +kernel +def bs1_2_0_4 : Fin 8 → RI := ![⟨-16776386652804471836428120852723707021153337051510033785057,-16776386652804471835597486491288170076747717714729945788878⟩, + ⟨8761574609775053724533744359541403560985853760544574423148,8761574609775053725131108074173738576878471074417646017337⟩, + ⟨-237489010300003946616882377889666465387620578547151279295135,-237489010300003946604370787615545006413399894235312411607262⟩, + ⟨147639881147073919347063472243060767969123592461356089327290,147639881147073919351693079739999308521188951452661848994817⟩, + ⟨238597296858982698873009165695042959012248025012339771511287,238597296858982698886270138835411421564048438193846564545092⟩, + ⟨150525376295366836227114383987287630058183003286123592796435,150525376295366836232805895553689065058099205492038539910328⟩, + ⟨-15924476144770255760183197878396999096918263927926984240026,-15924476144770255750177394326747874614324253041422246120314⟩, + ⟨49721717167785953340297156764040330669476141695472818988559,49721717167785953345941230916726135902277570425090397323521⟩] +lemma bs1_2_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 4 r = bs1_2_0_4 r := by + revert r + decide +kernel +def bs1_2_0_5 : Fin 8 → RI := ![⟨-16141007366734313183608917813877043827382683364195217358639,-16141007366734313182767598431857400184518754670892305550161⟩, + ⟨8446508605076850095308301791625117786571435281012962877327,8446508605076850095913349806212480524090726686715852622232⟩, + ⟨-227908156541022199163104488566576799951074610777980673822766,-227908156541022199150431953109080929678965484702296106740855⟩, + ⟨141925402236767063189365389215528636886096175163266454912520,141925402236767063194054550535068993754300203688588380206489⟩, + ⟨229158077343541871149398912776421512098657936257261136961998,229158077343541871162830470926937219973761579859339250632810⟩, + ⟨144292497366587879495683253845991279069369509362730568153401,144292497366587879501447979236761707256373591405375593038010⟩, + ⟨-14832444135211621335825819927167892498981496708711914649564,-14832444135211621325691304848693297104667210568071531628031⟩, + ⟨47073392551235982871239606043237462409928477034518422763754,47073392551235982876956283800225841273720963267104314059775⟩] +lemma bs1_2_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 5 r = bs1_2_0_5 r := by + revert r + decide +kernel +def bs1_2_0_6 : Fin 8 → RI := ![⟨-15493717284436878834511426841167075807471146338947975733994,-15493717284436878833659098945475210449846656493340997622570⟩, + ⟨8124653960274809622305743359958143532417226773808913385545,8124653960274809622918708319622985635383476744327182798337⟩, + ⟨-218181320814900707758451234651930852512820754862323883143177,-218181320814900707745612881334028454197052931154042649162981⟩, + ⟨136104397194995881549174786840314102057925099185419430578000,136104397194995881553925304997231354226500269041929020753285⟩, + ⟨219559080993220109508585083301199880989076768872289855402451,219559080993220109522192390988340682994702038410864205751725⟩, + ⟨137976901238502269659483129210777996696038473691217731802946,137976901238502269665323285002474980984754145414142313544808⟩, + ⟨-13768227531928475660385615661798434957583335769537142977990,-13768227531928475650118492265757042846748415281627569115483⟩, + ⟨44444043182459930673123996698857990885360583983604225077413,44444043182459930678915476162059768351971884812241592887733⟩] +lemma bs1_2_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 6 r = bs1_2_0_6 r := by + revert r + decide +kernel +def bs1_2_0_7 : Fin 8 → RI := ![⟨-14836535988592974650835134201623900917026893051517652835215,-14836535988592974649971463237770857210723961351537763248957⟩, + ⟨7796888470031859710506101283743596248378036049693167972194,7796888470031859711127223788588080906082919079195854359220⟩, + ⟨-208341296378671462963366009874307577634303497616392341499381,-208341296378671462950356799404482930185032107244634711135902⟩, + ⟨130196250205906437015313078181647034304886922304579238432389,130196250205906437020126817842324558948142025865474268465671⟩, + ⟨209832559381816134761175837412947221195921723808391103661094,209832559381816134774964235757064641897550092388335047315034⟩, + ⟨131600173010669183299167078377630438914002236711034830205400,131600173010669183305084956939595722202237331809896443113488⟩, + ⟨-12735199147764660233633267837031791064428479939790892728992,-12735199147764660223229506087287063033404892279843766041789⟩, + ⟨41842663753075919776006415010751125855889058261159442919668,41842663753075919781874969443146150259227133778523751411860⟩] +lemma bs1_2_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 7 r = bs1_2_0_7 r := by + revert r + decide +kernel +def bs1_2_0_8 : Fin 8 → RI := ![⟨-14171552573510823449254963687985981671313850829610938479386,-14171552573510823448379603478849142935088269121056055718335⟩, + ⟨7464139347353644530994959237274114481361189929733649905283,7464139347353644531624488245999490455695565403488514089127⟩, + ⟨-198421713490308549960869281838652161399992398019569604380193,-198421713490308549947683999857228365673650260765336481743149⟩, + ⟨124220977703101684917111186618732076692783991044347795882787,124220977703101684921990077229237855914629256781880174741574⟩, + ⟨200011703163733077492769068462226655997959386996102776088397,200011703163733077506744084137557278990924575027391659027148⟩, + ⟨125184351078807918911557079688534384987905643597759722689442,125184351078807918917555053028464492633327126639014806992473⟩, + ⟨-11736471607882418032438481116043041863046571885640465481528,-11736471607882418021893910970464838460767256156908736091230⟩, + ⟨39278014273728448715416379886375275914372806999941849009106,39278014273728448721364361525531086740573819597525041919500⟩] +lemma bs1_2_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 8 r = bs1_2_0_8 r := by + revert r + decide +kernel +def bs1_2_0_9 : Fin 8 → RI := ![⟨-13500916041710185939254940010720210073202789639332259479598,-13500916041710185938367532157465095025602795215532032170053⟩, + ⟨7127380209870124517052392370751127724682954065482305954402,7127380209870124517690585631494205719087656365806914116376⟩, + ⟨-188456848950571186951822081275515674051802990188028160745229,-188456848950571186938455329330923651320456451622271483315627⟩, + ⟨118199122391946762731045154855881471066725153988956400840790,118199122391946762735991193980978705705347813255556357370437⟩, + ⟨190130459379926787353636995197268035034122068319149806783184,190130459379926787367804349996141717498159823444998421105215⟩, + ⟨118751795911336824991284690140156053839416603730521521542849,118751795911336824997365214008989706497312279825523533911630⟩, + ⟨-10774870909008641455168941641220792173874889612525807168265,-10774870909008641444479245835202284527690101907424546643701⟩, + ⟨36758553631404794204931161858554509923136967828569659016839,36758553631404794210961005987300470723640773469197420347708⟩] +lemma bs1_2_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 9 r = bs1_2_0_9 r := by + revert r + decide +kernel +def bs1_2_0_10 : Fin 8 → RI := ![⟨-12826825000969932398154941265522030011178200656192297192866,-12826825000969932397255114508041971003835878382326360194860⟩, + ⟨6787627521108539165188327452407169871793974799098539789608,6787627521108539165835451962690147714476135410408834879512⟩, + ⟨-178481424488772561051237104033845344828671076638634608177441,-178481424488772561037683289949123136818521622072469312010989⟩, + ⟨112151639788245666629239703892593113875778087862761931051791,112151639788245666634254960780381177433862379257682903968303⟩, + ⟨180223336872183348678256571939553053891030450051450851290093,180223336872183348692622192982893052794204847944372559319128⟩, + ⟨112325052193467156438111523966221440299177063119663155768950,112325052193467156444277142240410674216586693429877590022616⟩, + ⟨-9852912720233398695445520009643548951842814254233597085243,-9852912720233398684606226351971421610408823919224863672745⟩, + ⟨34292374827866721485617223616088061465674424304168239408366,34292374827866721491731452908261271595202084782151942969487⟩] +lemma bs1_2_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 10 r = bs1_2_0_10 r := by + revert r + decide +kernel +def bs1_2_0_11 : Fin 8 → RI := ![⟨-12151516721050564304431338835107711652866262759336084118726,-12151516721050564303518708369055633334560769169827525442538⟩, + ⟨6445936487941045329375120891181373185302260073767619750655,6445936487941045330031453389079132044660713358195777518029⟩, + ⟨-168530395510521132691968989049498029352735974300204196451393,-168530395510521132678222316634950238816031748773603805208201⟩, + ⟨106099778042425169469787025775133009379695438961121801462087,106099778042425169474873645163625825640894918088385152500647⟩, + ⟨170325201191935854796537448172030362148399850356460504581596,170325201191935854811107478812855119568776735041013282193175⟩, + ⟨105926705471414252860417599144006240625220445040264549667507,105926705471414252866670948505218713469972724894796713704927⟩, + ⟨-8972781836864966141433704140514605914355886019774994575442,-8972781836864966130440177286348640770384762852395063895655⟩, + ⟨31887142748306909751964818226573537052077871694436590013401,31887142748306909758166047387716909233694254962166082724627⟩] +lemma bs1_2_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 11 r = bs1_2_0_11 r := by + revert r + decide +kernel +def bs1_2_0_12 : Fin 8 → RI := ![⟨-11477255618747613086229824896506610245842972654823896834000,-11477255618747613085303991643671489629414988658920056797761⟩, + ⟨6103396423521657861992428983467730574983927143463462252629,6103396423521657862658256472328034477193568911716886064631⟩, + ⟨-158638731926754277107956189729644993698568193131998635549494,-158638731926754277094010647792747490067772375995433356372659⟩, + ⟨100064951939543179878311437096894099836136400397840747596250,100064951939543179883471643280635695623054591441284821208329⟩, + ⟨160471060593844840472287802810773447224511682596575460739419,160471060593844840487068614282544671298436944877849067276163⟩, + ⟨99579234560892552067056563279460859960991711454357935586550,99579234560892552073400378213964676655143143935259525737437⟩, + ⟨-8136315164063277682649013879345582614769083710308995630624,-8136315164063277671496446541189284573599703419558754951960⟩, + ⟨29550035310252287783126955054654093129665676186552537111197,29550035310252287789417895779732471608251374545762133699031⟩] +lemma bs1_2_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 12 r = bs1_2_0_12 r := by + revert r + decide +kernel +def bs1_2_0_13 : Fin 8 → RI := ![⟨-10806321249005451906791817305827040148219340618253315271615,-10806321249005451905852367134248967461257284699063191458882⟩, + ⟨5761125593633805896604652837279385156504392683804966466049,5761125593633805897280273146589353177510686142031366857487⟩, + ⟨-148841192971747540410760820097162594913954022855055138493452,-148841192971747540396610170695395200193411968975789190202704⟩, + ⟨94068612081169416322167960489673513555197744425314403911689,94068612081169416327404061666489527344208965997556646569302⟩, + ⟨150695844898009736883254927736811128070252796408023889239119,150695844898009736898253131604198793287909888349987012401839⟩, + ⟨93304861104400687660389557866149313130902521286429066054311,93304861104400687666826676008589257511549716856403364887244⟩, + ⟨-7344988561929800772298620619886601028141549694628087836937,-7344988561929800760982024173110096322581238458931911583238⟩, + ⟨27287688827337795354515780381954361219083148648146959100979,27287688827337795360899246654591623497490895771588443187353⟩] +lemma bs1_2_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 13 r = bs1_2_0_13 r := by + revert r + decide +kernel +def bs1_2_0_14 : Fin 8 → RI := ![⟨-10140995888347417688426715307321857427262653366146277639348,-10140995888347417687473218197138751342242284884136811272450⟩, + ⟨5420265573273322647157753012050307823427706493532888229225,5420265573273322647843475397330817237274316054431390482856⟩, + ⟨-139172098088563389848469579237761661074575366989701357809669,-139172098088563389834107345114013412917847803199340678715817⟩, + ⟨88132110362867306743773375648031754449580053749064709754836,88132110362867306749087768568249939292162416752136869581881⟩, + ⟨141034179183431632901498926038381117324983248021297239913549,141034179183431632916721387514415779758325844298525517430795⟩, + ⟨87125397767542735539045907796772224790430789364540692037171,87125397767542735545579275645793017662948637361139789371401⟩, + ⟨-6599907828782734477501751173939364662022014500575058676560,-6599907828782734466015945608586982139830275558831868758767⟩, + ⟨25106148389925272848899426073077742777493505456718472025039,25106148389925272855378339833541669274717278833693414528584⟩] +lemma bs1_2_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 14 r = bs1_2_0_14 r := by + revert r + decide +kernel +def bs1_2_0_15 : Fin 8 → RI := ![⟨-9483551804678098337992713183445328653405130812235392649076,-9483551804678098337024722334015236811775433183600266038009⟩, + ⟨5081975149285312743230480083876655501777268131122507795279,5081975149285312743926625868809327779607588052037889209340⟩, + ⟨-129665096108896619644280944993891296363939326757040026732860,-129665096108896619629700396127317888275096322124808752114868⟩, + ⟨82276562957986308622443389470250515397931474208509308242122,82276562957986308627838564413226496028059537538643973599176⟩, + ⟨131520154434606248800785287933433551051607080068328010164705,131520154434606248816239140134186561241192493031175142263625⟩, + ⟨81062096652469453099473334478733283702389323824317899887306,81062096652469453106106013514982879131000906691715680331865⟩, + ⟨-5901804035221236427737132804664091676700608048689584878181,-5901804035221236416076735969868915288692722308811811039152⟩, + ⟨23010824014139549540798817491959603761164840967286931110143,23010824014139549547376214704173041669098525719934963955907⟩] +lemma bs1_2_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 15 r = bs1_2_0_15 r := by + revert r + decide +kernel +def bs1_2_0_16 : Fin 8 → RI := ![⟨-8836238314410091327611144749073300939371355942415415203343,-8836238314410091326628195622411747745849399479666895020198⟩, + ⟨4747423813728588623867874046920274310055584008208221614862,4747423813728588624574777311274492604388713009756965832093⟩, + ⟨-120352935075885861040021153295104189374310009688815860607018,-120352935075885861025215292492718527290007934053322219019481⟩, + ⟨76522712102125332544559521194934658209888821055716501951762,76522712102125332550038067300530900467365112472047610540842⟩, + ⟨122187097398331232740696480906533693528403652849970055122019,122187097398331232756389140122519672932639277629756269065812⟩, + ⟨75135499573300860768592649166479050361172822543254763474722,75135499573300860775327822406981606203694095696519903469854⟩, + ⟨-5251033349399436202571148941366549951042811972639468585842,-5251033349399436190730565022617408754778432632455706240302⟩, + ⟨21006453242742542628514593378967279612605383691132262568816,21006453242742542635193630530251941229169005211034725455065⟩] +lemma bs1_2_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 16 r = bs1_2_0_16 r := by + revert r + decide +kernel +def bs1_2_0_17 : Fin 8 → RI := ![⟨-8201268733690734072722234466262645987740250160502565066668,-8201268733690734071723843761266347893232736093890817158078⟩, + ⟨4417784901116724422429656609417135807612210625320359860229,4417784901116724423147664926753130602520251424681350177303⟩, + ⟨-111267235148866707189048892320278037673551765587812943346316,-111267235148866707174010439765997107374897493750533255171341⟩, + ⟨70890788040429944253614570686217727574468156305781963625769,70890788040429944259179181672050262111866055309690054484027⟩, + ⟨113067342014596575505764597632933067681747469844474484238886,113067342014596575521703779705499326329267828445110933633205⟩, + ⟨69365291881214690596570334896382032155522424891584679479241,69365291881214690603411313923163101549356917301054212705792⟩, + ⟨-4647581415194271794871724689610231295622933561424027877608,-4647581415194271782845131852272769969430705839972683003479⟩, + ⟨19097070795938888847243117060240882946261615938843313256015,19097070795938888854027078131360582955058830303756118565320⟩] +lemma bs1_2_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 17 r = bs1_2_0_17 r := by + revert r + decide +kernel +def bs1_2_0_18 : Fin 8 → RI := ![⟨-7580807335097471046942454723230914092055151435840137636366,-7580807335097471045928119274517556174960896137917941960967⟩, + ⟨4094228430536465062271600234289740487384675911016959345891,4094228430536465063001075463875215779120489886284269760793⟩, + ⟨-102438267084351802796231635448950993734372539256827353347331,-102438267084351802780953012117157612003456090424757528406367⟩, + ⟨65400372549515343551007122784614868596291916821135058547078,65400372549515343556660603083458467293754950041596605932146⟩, + ⟨104192004859773857653478063917357627079310895523572669340418,104192004859773857669671801818568685014240060947205758892609⟩, + ⟨63770161543249207940161549225307431638571693268237672742242,63770161543249207947111781730550350109244059918473885671067⟩, + ⟨-4091072261523370562720394033974094832419388088530354646884,-4091072261523370550501731158738549860727881782881719087147⟩, + ⟨17285985768879455632592334186015776660816078746436085423105,17285985768879455639484638133445697584254820685942518562500⟩] +lemma bs1_2_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 18 r = bs1_2_0_18 r := by + revert r + decide +kernel +def bs1_2_0_19 : Fin 8 → RI := ![⟨-6976956424395558536397519597269819351389056976737333268697,-6976956424395558535366715191736869549768373191083318303082⟩, + ⟨3777913720637982932809867051403176707310783775749028597188,3777913720637982933551186189303579324555973559504080829683⟩, + ⟨-93894738804450179540655779971114994212223513100847850296726,-93894738804450179525129089800846694782533099718739085094893⟩, + ⟨60070265475230092756625105309691584384122454438361084785241,60070265475230092762370376665484506164291361285517771053081⟩, + ⟨95590767078723608390023119513130305783505518278639233899961,95590767078723608406479782239257633735719779245156353622881⟩, + ⟨58367665166781290600613512808926494534832929876850172395721,58367665166781290607676590703918409733113346888969301889611⟩, + ⟨-3580781635119470045100357678636068807076756636249516545299,-3580781635119470032683310105810352734082886982059859901419⟩, + ⟨15575766757089297721622013662260397118102317210464634286306,15575766757089297728626222459546941758664362843206758563884⟩] +lemma bs1_2_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 19 r = bs1_2_0_19 r := by + revert r + decide +kernel +def bs1_2_0_20 : Fin 8 → RI := ![⟨-6391743653694763448928639802074407119514883084523831587779,-6391743653694763447880819905454345644132269705908517234977⟩, + ⟨3469981851414359198288677987063895465107782812716418229207,3469981851414359199042234081960172465566550932808202375882⟩, + ⟨-85663592539958970957328438704403644885972493047302325223293,-85663592539958970941545449417845208735007450504495973359360⟩, + ⟨54918355735036903428542639514317017724410046335205669928587,54918355735036903434382748079807981979306753557537491593435⟩, + ⟨87291665282063843285664914156548397822143277822682177618564,87291665282063843302393227058456073941216726003992780922009⟩, + ⟨53174102619735613626296277915602024606532088629948505204812,53174102619735613633475946056385023716807373453338925714440⟩, + ⟨-3115654562995419003233773173605827383980028054817857709078,-3115654562995418990611757363227377983145507756851605648823⟩, + ⟨13968235163667368605583011558209313130334864936976032572912,13968235163667368612702838848894961001410834360366566611551⟩] +lemma bs1_2_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) 20 r = bs1_2_0_20 r := by + revert r + decide +kernel +def bs1_2_0 : Fin 21 → Fin 8 → RI := ![bs1_2_0_0,bs1_2_0_1,bs1_2_0_2,bs1_2_0_3,bs1_2_0_4,bs1_2_0_5,bs1_2_0_6,bs1_2_0_7,bs1_2_0_8,bs1_2_0_9,bs1_2_0_10,bs1_2_0_11,bs1_2_0_12,bs1_2_0_13,bs1_2_0_14,bs1_2_0_15,bs1_2_0_16,bs1_2_0_17,bs1_2_0_18,bs1_2_0_19,bs1_2_0_20] +lemma bs1_2_0_mem (d : Fin 21) (r : Fin 8) : (bs1_2_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 2 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_0) d r = bs1_2_0 d r := by + fin_cases d + · exact bs1_2_0_0_calc r + · exact bs1_2_0_1_calc r + · exact bs1_2_0_2_calc r + · exact bs1_2_0_3_calc r + · exact bs1_2_0_4_calc r + · exact bs1_2_0_5_calc r + · exact bs1_2_0_6_calc r + · exact bs1_2_0_7_calc r + · exact bs1_2_0_8_calc r + · exact bs1_2_0_9_calc r + · exact bs1_2_0_10_calc r + · exact bs1_2_0_11_calc r + · exact bs1_2_0_12_calc r + · exact bs1_2_0_13_calc r + · exact bs1_2_0_14_calc r + · exact bs1_2_0_15_calc r + · exact bs1_2_0_16_calc r + · exact bs1_2_0_17_calc r + · exact bs1_2_0_18_calc r + · exact bs1_2_0_19_calc r + · exact bs1_2_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 2 0 tr1_2_0_mem) d r +lemma bs1_2_0_lower (d : Fin 21) : (970/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 2 0) d) := by + have hc : ∀ d : Fin 21, (970:ℤ)*scale < 1000000*(rowLowerBox (bs1_2_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_2_0_mem d)).1 + have hnum : (970:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_2_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_2_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (970/1000000:ℝ) < ordinarySignValue 1 2 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 2 0) _ bs1_2_0_lower e he hτ +def bs1_2_1_0 : Fin 8 → RI := ![⟨-19161310605243970596138914178477271333449753394552133298560,-19161310605243970595347988481334459320489691444497830672045⟩, + ⟨9938250019542961465016365256426227767440728224088244901399,9938250019542961465585171863017529452010501813708298315791⟩, + ⟨-273735616716711908419479425147467262930460388010366657359480,-273735616716711908407565954287888134718455970697704029887172⟩, + ⟨169072214849163758267170545538179038528093795652206100925155,169072214849163758271578833597273949734576245866150658480926⟩, + ⟨274153343269704808297912775034566776608120432857364165913919,274153343269704808310539804342262791494795787088259531081143⟩, + ⟨174220562142018446893851815261078551177969286543447843387992,174220562142018446899271242824410309901292650819235975302072⟩, + ⟨-20495853512325440608433804533167029583977161789518125640044,-20495853512325440598906330692643259106621463100516657286882⟩, + ⟨60320423906192361440541038454229555574770341473311591586808,60320423906192361445915296360235482668468035603890458420437⟩] +lemma bs1_2_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 0 r = bs1_2_1_0 r := by + revert r + decide +kernel +def bs1_2_1_1 : Fin 8 → RI := ![⟨-20868981514938193343359865362832034979826781823867151601724,-20868981514938193342540464759233840219841342194741532158626⟩, + ⟨10778842795689050592800511548747295456622304017087216068536,10778842795689050593389796330431914163180240024095030064678⟩, + ⟨-299810633991694609340223199970613708366571412156521347873394,-299810633991694609327880820340578892299008305040799593655498⟩, + ⟨184403468751120002204393478936193662889759714466456697568624,184403468751120002208960474179263916492285305874796035162789⟩, + ⟨299659388955291506637988217286391119013501471649268617682112,299659388955291506651069844895359285815794477816196284757525⟩, + ⟨191318666951364756414816067918833819186107145268734364524525,191318666951364756420430605709954247917403812239209368839036⟩, + ⟨-23992064441583536397605386838409650586708947518033744647971,-23992064441583536387734904890667948100551066406237659746316⟩, + ⟨68216231556365237045968879555316632515083286471822323738211,68216231556365237051536621491098210316794715925994364906080⟩] +lemma bs1_2_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 1 r = bs1_2_1_1 r := by + revert r + decide +kernel +def bs1_2_1_2 : Fin 8 → RI := ![⟨-22404492040797788980957941888062044595361787474314488561313,-22404492040797788980107508746241619572081331572281604810469⟩, + ⟨11531560481815038957059913257737138501735579020416576028713,11531560481815038957671515575470408948741461106699480937295⟩, + ⟨-323496749132759460966028771106605741883340062050910288233990,-323496749132759460953218957884334663251521030153712986219017⟩, + ⟨198151484189398911749285022332059683094018348916706734924546,198151484189398911754024979925704225205451416015955625012648⟩, + ⟨322679503294200475850673624243216748089795482803634033343523,322679503294200475864250682423034097139626432973862280023875⟩, + ⟨206957117106223557889974598120864578279288111236725080704444,206957117106223557895801771047801738527140002611135624847485⟩, + ⟨-27599176067037218148567582591182861285286061390514980403911,-27599176067037218138323283359287882250480277056790913750674⟩, + ⟨75949963798683073309541620398347703513555102423801695241892,75949963798683073315320225205928141457258705111620641446946⟩] +lemma bs1_2_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 2 r = bs1_2_1_2 r := by + revert r + decide +kernel +def bs1_2_1_3 : Fin 8 → RI := ![⟨-23722994508652503582178957852784770488595820114253377121834,-23722994508652503581294687469858185824233893473923922103277⟩, + ⟨12178568866160095018376651292602263446541882993204501690543,12178568866160095019012588192404177585085073033800523682983⟩, + ⟨-344043224466006910015204468654113755936844893178613622970711,-344043224466006910001884975461471880743021656315724758899876⟩, + ⟨209885204877222954281032205370794392569602846607041978546257,209885204877222954285960757552378312220485977200939653767983⟩, + ⟨342486228777781276983427094464439853060630479782626380678847,342486228777781276997544359944003019456560548953071745525819⟩, + ⟨220633063572117094265345218943636289652260026330714888862047,220633063572117094271404244847177915361224532864733155885255⟩, + ⟨-31206223125129991570348188375798099676559967914590858151746,-31206223125129991559696286469483666783660118344385946955937⟩, + ⟨83271497221178579988376959248366609242538225221584143154007,83271497221178579994385484592329731234023511923966280356456⟩] +lemma bs1_2_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 3 r = bs1_2_1_3 r := by + revert r + decide +kernel +def bs1_2_1_4 : Fin 8 → RI := ![⟨-24787747980735557179063941905453489831798523572478024446199,-24787747980735557178142747565705099735464771397604411127834⟩, + ⟨12706589689495948818463267026772061014668579178814368272224,12706589689495948819125758368608767902513561548804371149181⟩, + ⟨-360817931407093419136021630134680802361610336505303884524994,-360817931407093419122145962720863679718067672387899937262986⟩, + ⟨219252167667057655623522244353177439958168544208150846578435,219252167667057655628656595181292162209465838880790891854493⟩, + ⟨358476085289048133892365171896968832205754288347483771418384,358476085289048133907071923704575014678022533564481978964017⟩, + ⟨231916086073780922592168086645120194513439161998455308358769,231916086073780922598480115719649718911822923951756580276114⟩, + ⟨-34691233182970161428766593411976164801373121559247242832042,-34691233182970161417669906320506848884539234924878554882803⟩, + ⟨89933279900200617672549230584542341654219457210842807260158,89933279900200617678808650377351755776437577560387659141358⟩] +lemma bs1_2_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 4 r = bs1_2_1_4 r := by + revert r + decide +kernel +def bs1_2_1_5 : Fin 8 → RI := ![⟨-25571674873395825585936396309116219112488852086417857593609,-25571674873395825584974867134949668510362391870142561623414⟩, + ⟨13107134062261914171221865737983173431430587743584073248530,13107134062261914171913364507915898037102771674546151154708⟩, + ⟨-373340127622317668147018893874131831387015209089089540364214,-373340127622317668132535675237485268187566163426062352657097⟩, + ⟨225995714776473235926501947599006410119076076340573215721672,225995714776473235931861107874588304820225750058209544161509⟩, + ⟨370200060548183415879448115014865577748838548179445808922089,370200060548183415894798807382480366295610882135505975783068⟩, + ⟨240471573519107109781358650347715009177494070940461540556698,240471573519107109787947053946745388798835801993395089561143⟩, + ⟨-37929233080324802037707262408177378874295609962956339123069,-37929233080324802026124702773816349892732520628885703907101⟩, + ⟨95706171615737331901429289651109839220543969986107446153271,95706171615737331907962780451515955608996669375942295666848⟩] +lemma bs1_2_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 5 r = bs1_2_1_5 r := by + revert r + decide +kernel +def bs1_2_1_6 : Fin 8 → RI := ![⟨-26058305052101999532897175176933776063102941110469824503161,-26058305052101999531891525505614857992258549286902336363811⟩, + ⟨13376384236323148240338433217412533344670973962633052144364,13376384236323148241061661934106048948390722815061943948272⟩, + ⟨-381302219308037008221705743368556347944112325862957860489344,-381302219308037008206557951234001885944002065145057080122711⟩, + ⟨229965409953618006100984298824328915390179841366917095011312,229965409953618006106589368243459415004817538855403516686079⟩, + ⟨377382922272638947111419920633932567350598291290597654745578,377382922272638947127474991191125444458338101465231576319928⟩, + ⟨246077009508227092233163240575847081531686943457648349764942,246077009508227092240053958082879161025854792353294947562406⟩, + ⟨-40800946138529676209188496317675200809754787008706896871145,-40800946138529676197074462129024073910330082281100514473875⟩, + ⟨100394241452522011672276353510370190640676146302113584758390,100394241452522011679109638503180822754037439712276988260367⟩] +lemma bs1_2_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 6 r = bs1_2_1_6 r := by + revert r + decide +kernel +def bs1_2_1_7 : Fin 8 → RI := ![⟨-26242061591227966441322588205986578936941615796658123714583,-26242061591227966440268596805868541615834908808141960822470⟩, + ⟨13514776559861569588239378216696723155570768912825086775406,13514776559861569588997372645023201495989421376428458634577⟩, + ⟨-384579043438672517937659765852567705136664292826150111341787,-384579043438672517921783817104272809055582470408725472110973⟩, + ⟨231120053200907886438187136904403892789473215876061229016382,231120053200907886444061642841572355984849036495138869430364⟩, + ⟨379930153172487727484189788147234534677811359987049045927658,379930153172487727501016628326499623337762034630039111275510⟩, + ⟨248629946108294657952159723920282475688316548593445638772783,248629946108294657959381679239589922617068797166168431358926⟩, + ⟨-43201191842025053343004795001720647948663787994486853916122,-43201191842025053330308437393684778170474205415933172259029⟩, + ⟨103846966327524855665735336474228762067901690704237242725913,103846966327524855672897098489740415169507489087508299175868⟩] +lemma bs1_2_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 7 r = bs1_2_1_7 r := by + revert r + decide +kernel +def bs1_2_1_8 : Fin 8 → RI := ![⟨-26127903713929717284953600150768309903332983644355952680205,-26127903713929717283846537038141030044042757973213803400654⟩, + ⟨13526371878376700907599488481123433134001178497420925958807,13526371878376700908395650262971897881883933967808667462212⟩, + ⟨-383224586971182800506416080016118933403991331609064533481752,-383224586971182800489740728362172659312541570812948144617071⟩, + ⟨229523476160795890290762461248984885378296189740586631604950,229523476160795890296932766649272808455286463188943533779034⟩, + ⟨377922657996297990368152255499550601914094489742097333765137,377922657996297990385826378896108470897507717298414403230164⟩, + ⟨248147405039859754760645228128081447830703657895921759031850,248147405039859754768230831136094570049756654410295937154146⟩, + ⟨-45046023825817749435206475896799804848363486810678989338397,-45046023825817749421870817587936984751815372211446417665844⟩, + ⟨105967608472744870733546812392450085600690226125863367217587,105967608472744870741069191178351302274668878921605736319234⟩] +lemma bs1_2_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 8 r = bs1_2_1_8 r := by + revert r + decide +kernel +def bs1_2_1_9 : Fin 8 → RI := ![⟨-25730399112272977901459633028033673485416049828757480192379,-25730399112272977900294170912678569721442584046435740451374⟩, + ⟨13418116083996909460048857690140839286674533395952597710471,13418116083996909460887018029733703125988458140583358727263⟩, + ⟨-377457376504179378533319851575079498310220142695060549196294,-377457376504179378515764853679083661093053471692359849096526⟩, + ⟨225334022319489386632934105369688765391601233109099892815944,225334022319489386639429902314100335527233058789828950441337⟩, + ⟨371600642667824830820068233390141517679554004870679850238384,371600642667824830838674689522521293118672675090800348967290⟩, + ⟨244757387459715659791368062290027916888821236265121347155907,244757387459715659799353815610917016833297836815712171221655⟩, + ⟨-46277837934019746454983974212411499339587581606333304763630,-46277837934019746440944842780002626328919029977611363073534⟩, + ⟨106717078622294330190338120480528128761150266616361953507684,106717078622294330198257314420149660304358227931650515917538⟩] +lemma bs1_2_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 9 r = bs1_2_1_9 r := by + revert r + decide +kernel +def bs1_2_1_10 : Fin 8 → RI := ![⟨-25072342126135408800442813015058659589696074058405552637866,-25072342126135408799212919418007666744217236366366982457510⟩, + ⟨13199090094627832802004661674962361820300775918999722877027,13199090094627832802889158924059214769470283269152740835812⟩, + ⟨-367636814030862458779806763000581326081647537976313730856921,-367636814030862458761281253484587514046128151619056428328811⟩, + ⟨218789162314911095960785786360272664569502450019515401913208,218789162314911095967640697356092367425002744066608291845526⟩, + ⟨361339025644004865659306398528140081803953098967721112492151,361339025644004865678941495164593758302330605219926672689160⟩, + ⟨238683944749040731268168830783616486316338585409138238269129,238683944749040731276596068999047762464247704281295542061855⟩, + ⟨-46868006628931126743717667636076095078044871961792614099479,-46868006628931126728902395968984200880488829279284842151285⟩, + ⟨106113205331569434236265991021413057978275086440793981573108,106113205331569434244622990182342537358699930423324027522003⟩] +lemma bs1_2_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 10 r = bs1_2_1_10 r := by + revert r + decide +kernel +def bs1_2_1_11 : Fin 8 → RI := ![⟨-24183061004719839399012192243321697163109751356800713221692,-24183061004719839397710996988395274101019143348263369362011⟩, + ⟨12879827959685320994922471172944925918033727226048566414663,12879827959685320995858246126378941646011697207521650959598⟩, + ⟨-354233363005592799829131645893502815345254048942269618664354,-354233363005592799809532141403746347700572881892604256985344⟩, + ⟨210186996083574491621025403576881663148620497019769345455961,210186996083574491628277720104257497803322927034098671166521⟩, + ⟨347617288984084376188334433253164939110692137096689718633301,347617288984084376209107851892603327733620793300692020257227⟩, + ⟨230227752193459790833976478457933626436462271796954371210631,230227752193459790842892276055837385566090416937245678464061⟩, + ⟨-46816970691446054454072547265731909651058583077991039571071,-46816970691446054438398377370336334519332434247794606939819⟩, + ⟨104225901193366336653351558184229212260060643315410686738873,104225901193366336662193044699537675453410312672083183491957⟩] +lemma bs1_2_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 11 r = bs1_2_1_11 r := by + revert r + decide +kernel +def bs1_2_1_12 : Fin 8 → RI := ![⟨-23096565231864682838996452640072275488582490771819611601859,-23096565231864682837616083563069681020584361937500552345031⟩, + ⟨12471751348732341677481924781783198314703610467414176452681,12471751348732341678474638829770834235813168287300760957741⟩, + ⟨-337795664930683641516961901819719469148976196874086509081775,-337795664930683641496169826364610655172834819079528593366846⟩, + ⟨199866438055881493810042824936808681710570729198285313644331,199866438055881493817736423136809768309554565294663133244086⟩, + ⟨330986786283008181470275276135044797090164706139991578139231,330986786283008181492312694889159249173333677051511963162269⟩, + ⟨219744296270752767684161236560654302148070045230209010634524,219744296270752767693619533656828593941694654978308627289593⟩, + ⟨-46152057501364876306084929286618679378260040782778541246661,-46152057501364876289457033243276235599760589242977876555858⟩, + ⟨101169137369150432155264878561190778384647487559554842841356,101169137369150432164644342968408604512587269402533968749846⟩] +lemma bs1_2_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 12 r = bs1_2_1_12 r := by + revert r + decide +kernel +def bs1_2_1_13 : Fin 8 → RI := ![⟨-21849674765712040234529066571662389172828618606809901393114,-21849674765712040233060443677456040826861843919929821290540⟩, + ⟨11986737055556983408685297740941606041142052067710764170411,11986737055556983409741480904233063622026929680424418015332⟩, + ⟨-318917447382035431477533422136237578630394850798413588037017,-318917447382035431455412006537893901715099170685211755099645⟩, + ⟨188187709105010434240149860575206701651999049282538938925442,188187709105010434248335348531833514986904708512570777818239⟩, + ⟨312038261542196559717008296588395604208642720092743814461741,312038261542196559740454676437767030312704422826616648307756⟩, + ⟨207621667896449079122807619018322187286464846442906626716428,207621667896449079132870631793244468199332589097486236768049⟩, + ⟨-44923533907569661483693666522980502830644804568888638257727,-44923533907569661466002666906838409935250232843405418622690⟩, + ⟨97090856222343936000965464534592798856324227565899841157987,97090856222343936010944604456858528560586936354659426167010⟩] +lemma bs1_2_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 13 r = bs1_2_1_13 r := by + revert r + decide +kernel +def bs1_2_1_14 : Fin 8 → RI := ![⟨-20480251502533261456569856828125983170161357484892353418961,-20480251502533261455002431386065421821866346640503793235127⟩, + ⟨11436807944877494831451570996060667373571654391796059193179,11436807944877494832578809559567630791432982802807228490336⟩, + ⟨-298206588274511485736475675930442973275155162888925745153139,-298206588274511485712866027898889729880133560874887634984136⟩, + ⟨175514440914870629207097846060108852023413847401807938420386,175514440914870629215834017973068777380463907799941063492889⟩, + ⟨291371816624988846475499478403115812302756434460467182820996,291371816624988846500523228506288390584545500552838487735872⟩, + ⟨194259629720156482209123388627890189065866709963746691435869,194259629720156482219863397046558631799344045842123737897123⟩, + ⟨-43199517801968477702967371624846309834182648259132898040778,-43199517801968477684086198654724181909566180711159571151735⟩, + ⟨92161974509018836114924239860382110097430229063185923062487,92161974509018836125574732826054438352415295334926831272366⟩] +lemma bs1_2_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 14 r = bs1_2_1_14 r := by + revert r + decide +kernel +def bs1_2_1_15 : Fin 8 → RI := ![⟨-19025624603041856033918591801707824301354795279830846174585,-19025624603041856032240011420129925804663063287624558082158⟩, + ⟨10833920716659360317919287386557124799689770576856548015160,10833920716659360319126464766265900796807664194176865549869⟩, + ⟨-276258062063355637386753909235580570552655577384517228113121,-276258062063355637361469968488962618529029880660950013624548⟩, + ⟨162198312057262451198538622066466759549175039677032799138630,162198312057262451207894324985361605584095830038240051124302⟩, + ⟨269570925418307653030885280621911854319172049590760237668448,269570925418307653057683605358729494397934525051106312851337⟩, + ⟨180051190683172284200248210851851622463417176953489521563015,180051190683172284211749853575230119148338385802102612853459⟩, + ⟨-41060377456057724680934370150728244759168338171237885891899,-41060377456057724660714227183915745668305202276776879600932⟩, + ⟨86565501850806549030461578980665627724416252699754782071006,86565501850806549041867358207214792474877474601102209328913⟩] +lemma bs1_2_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 15 r = bs1_2_1_15 r := by + revert r + decide +kernel +def bs1_2_1_16 : Fin 8 → RI := ![⟨-17521270391483760632188900893410204362685118207234614748523,-17521270391483760630384573510382071069124301831416531717795⟩, + ⟨10189817600427236884095171251223593374705930811515182410523,10189817600427236885392781557083163244726374690451475037646⟩, + ⟨-253631828495006082092650666830502208014475598778823996688902,-253631828495006082065472637621553972933091813816342936729469⟩, + ⟨148566745832867006035961224079529336344061624924977465274892,148566745832867006046017788036559900439624471677809853910704⟩, + ⟨247181441508854258735694604390271837574559498807448392370936,247181441508854258764500464194851541836935718846335657261076⟩, + ⟨165367460313667248292618892253727035966974763295551779735874,165367460313667248304982154176764346548584792933181920244568⟩, + ⟨-38593170688957926769693780929284844709087406948290756594579,-38593170688957926747958892303465653549522543802064155169001⟩, + ⟨80486579859734482463287788331872254387709420847440162662806,80486579859734482475548005363463820508690884426208463156347⟩] +lemma bs1_2_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 16 r = bs1_2_1_16 r := by + revert r + decide +kernel +def bs1_2_1_17 : Fin 8 → RI := ![⟨-15999778165039979950233374502128679658417729076820910381905,-15999778165039979948285891893549981433422849494681729871934⟩, + ⟨9515910593053886585049998072876841577910970541033358043146,9515910593053886586450560701978758808369807922005506774104⟩, + ⟨-230836118803923024594777199658371347953638739231882582998069,-230836118803923024565442867254018004908228827729084070275065⟩, + ⟨134913854084687719349814985346582524167150146658686028801998,134913854084687719360669436480562793469199864758348664513220⟩, + ⟨224695962431809973427022046904960474431026651602846990934200,224695962431809973458113361886360468502677012325825956084212⟩, + ⟨150546131347340447242876712079554053591761256146832745818005,150546131347340447256220874457090514729312569359439435031478⟩, + ⟨-35886553226054099394218341885664525774320234661377109365210,-35886553226054099370759008509992244045829669964189570995380⟩, + ⟨74103993258826567128206552432556066314124403312098968629502,74103993258826567141439494342575626502233772509868459603376⟩] +lemma bs1_2_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 17 r = bs1_2_1_17 r := by + revert r + decide +kernel +def bs1_2_1_18 : Fin 8 → RI := ![⟨-14490107886946501330559717672217991761221357913632412305226,-14490107886946501328448079763407681919064587522888571645988⟩, + ⟨8823175436781398357495852902653977777973731490208171086991,8823175436781398359014470387707224417732707279001383425381⟩, + ⟨-208316075649528559301027656044839849121535730665166661442047,-208316075649528559269220702769861944883329645376040444314266⟩, + ⟨121494533180797001492090034443731327164429704839754093924692,121494533180797001503859418361923025723003327569286876019237⟩, + ⟨202543440248759887550722282764387225929570559835656625481321,202543440248759887584434316474603862280712619939709072407481⟩, + ⟨135883587718712241436714573181090863152196648255318168731907,135883587718712241451183528649473422107306423702633737080907⟩, + ⟨-33026443181688291107876924016419374268277625690312959561803,-33026443181688291082440179445676729931065069414535673106967⟩, + ⟨67583453680086215903590166782785563882973612569085262564208,67583453680086215917938526895982831640865501080168940881877⟩] +lemma bs1_2_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 18 r = bs1_2_1_18 r := by + revert r + decide +kernel +def bs1_2_1_19 : Fin 8 → RI := ![⟨-13017126059298882435148759728642989274502864936126509020026,-13017126059298882432847309646723241605211371654090205099838⟩, + ⟨8122051007092580781558497919026878837599484661690211061175,8122051007092580783213621802120135238527584885579660347141⟩, + ⟨-186447346390600747357041042198745749090170002624982120887251,-186447346390600747322375006456911198352774312465079168324736⟩, + ⟨108521425245906590136682320982810293746452650659526260900862,108521425245906590149509638332216977505870644772430260206276⟩, + ⟨181083595061684770646927277524497434409131999350887655532791,181083595061684770683669638713268482081833437114727438290909⟩, + ⟨121630383097103271892339345049899094163484188832948087957702,121630383097103271908108894654371959762311785955474137946025⟩, + ⟨-30092610555729807704885321027369541744303738211293084284303,-30092610555729807677162103126030247385016552376857840198841⟩, + ⟨61072762243997149467538766416761222970827185964451666239033,61072762243997149483176880517611717686150452222626051421469⟩] +lemma bs1_2_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 19 r = bs1_2_1_19 r := by + revert r + decide +kernel +def bs1_2_1_20 : Fin 8 → RI := ![⟨-11601387832805280217106574800746185058142946354952351468361,-11601387832805280214583501005497229190281385492130466729592⟩, + ⟨7422008502159368470680465534081517095494268146036569305333,7422008502159368472494973582745543149811377316277729684106⟩, + ⟨-165533837694977978504763871763247699035666864166750416173821,-165533837694977978466759586094412111622221777729371102339621⟩, + ⟨96164248312266835596624502545406333385394939709809732094688,96164248312266835610687057507071242921304528091373693804677⟩, + ⟨160605332753350057078086547818734961939863850785947469350427,160605332753350057118367103726127530328175845418033220445996⟩, + ⟨107989542635261417043111569522222707734520115958654233997446,107989542635261417060399686125206741729747254167288263666299⟩, + ⟨-27156107151505751184834639004535645449211487972599565591193,-27156107151505751154441746647454560505668396194617164920532⟩, + ⟨54698567734414696745215718941519252285538181438194817279614,54698567734414696762359743139378862367794082222118510827616⟩] +lemma bs1_2_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) 20 r = bs1_2_1_20 r := by + revert r + decide +kernel +def bs1_2_1 : Fin 21 → Fin 8 → RI := ![bs1_2_1_0,bs1_2_1_1,bs1_2_1_2,bs1_2_1_3,bs1_2_1_4,bs1_2_1_5,bs1_2_1_6,bs1_2_1_7,bs1_2_1_8,bs1_2_1_9,bs1_2_1_10,bs1_2_1_11,bs1_2_1_12,bs1_2_1_13,bs1_2_1_14,bs1_2_1_15,bs1_2_1_16,bs1_2_1_17,bs1_2_1_18,bs1_2_1_19,bs1_2_1_20] +lemma bs1_2_1_mem (d : Fin 21) (r : Fin 8) : (bs1_2_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 2 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 2 tr1_2_1) d r = bs1_2_1 d r := by + fin_cases d + · exact bs1_2_1_0_calc r + · exact bs1_2_1_1_calc r + · exact bs1_2_1_2_calc r + · exact bs1_2_1_3_calc r + · exact bs1_2_1_4_calc r + · exact bs1_2_1_5_calc r + · exact bs1_2_1_6_calc r + · exact bs1_2_1_7_calc r + · exact bs1_2_1_8_calc r + · exact bs1_2_1_9_calc r + · exact bs1_2_1_10_calc r + · exact bs1_2_1_11_calc r + · exact bs1_2_1_12_calc r + · exact bs1_2_1_13_calc r + · exact bs1_2_1_14_calc r + · exact bs1_2_1_15_calc r + · exact bs1_2_1_16_calc r + · exact bs1_2_1_17_calc r + · exact bs1_2_1_18_calc r + · exact bs1_2_1_19_calc r + · exact bs1_2_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 2 1 tr1_2_1_mem) d r +lemma bs1_2_1_lower (d : Fin 21) : (970/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 2 1) d) := by + have hc : ∀ d : Fin 21, (970:ℤ)*scale < 1000000*(rowLowerBox (bs1_2_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_2_1_mem d)).1 + have hnum : (970:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_2_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_2_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (970/1000000:ℝ) < ordinarySignValue 1 2 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 2 1) _ bs1_2_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs13.lean b/lean/OAI/Analysis/Triangular/Signs/Signs13.lean new file mode 100644 index 0000000000000000000000000000000000000000..b33efd21ac24fe42ca03b8aeeeb3446cf0a4f56c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs13.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows13 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_3_0_0 : Fin 8 → RI := ![⟨-11059279082733179871736344042652584899983799582811302550029,-11059279082733179871625877193789854995975247140571299380440⟩, + ⟨14645945883342238012277545534511090050227016598512045841949,14645945883342238012356989499563611806386811634382731673103⟩, + ⟨-140158703513230320023153974522042976349751372884128290582635,-140158703513230320021490046305250249130589294832643903642134⟩, + ⟨78575171898651585589792777071146745382508764051600267949787,78575171898651585590408472948163275251018236431427613365358⟩, + ⟨133435711463314910123075859956898532027036433856296461694122,133435711463314910124839449309369182905147038128775202771895⟩, + ⟨90293374102516596230115029893447074059130171756555456756960,90293374102516596230871949396361865306213342576153164253865⟩, + ⟨-27254235177819368704240546533312916089377140660648410235176,-27254235177819368702909865261223071333658870054130018625056⟩, + ⟨50438045375783019843166297611874032702356933125888931677966,50438045375783019843916908368362050152683600901006125002110⟩] +lemma bs1_3_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 0 r = bs1_3_0_0 r := by + revert r + decide +kernel +def bs1_3_0_1 : Fin 8 → RI := ![⟨-11867751994342143446852244199033479631435284370828400242844,-11867751994342143446737001823317782697249452646123330701767⟩, + ⟨15119587659300662197708049235111957778127100032221733291992,15119587659300662197790927595119084234876407071948796861506⟩, + ⟨-151315437287889022925980862212463319851710857772976664339835,-151315437287889022924245001701390367983071502348495023295941⟩, + ⟨84945278802518438835780281493005586532835260230435973582352,84945278802518438836422594153468296940796510581481714421486⟩, + ⟨144158498301402584551679833316202656714918435293335839881828,144158498301402584553519663354426088327642902168976129767935⟩, + ⟨97575523973107287035933228574085671461331233670912950181065,97575523973107287036722870015293683184028762008601270379185⟩, + ⟨-29384730083072215195321465140758159993083919997547516653777,-29384730083072215193933257975493051926414196480170745905494⟩, + ⟨54442707942320676758971142689122626378430666950496168119999,54442707942320676759754202654224802604352610998629430459294⟩] +lemma bs1_3_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 1 r = bs1_3_0_1 r := by + revert r + decide +kernel +def bs1_3_0_2 : Fin 8 → RI := ![⟨-12656523017888089165244654663754004181324548243282454201978,-12656523017888089165124312973695414481196940627655247637767⟩, + ⟨15505617648676215808329993668487310440494737048390102818577,15505617648676215808416539280295177406460004074405205749815⟩, + ⟨-162374706244115173311702207543453455775877664163481175508120,-162374706244115173309889537626584382518978649764932031410274⟩, + ⟨91282697234857447184994922049476986717121942992520251014073,91282697234857447185665656149032953839298952965782764075972⟩, + ⟨154808005022003684595328631772127059897085792233628002473135,154808005022003684597249871722668149524550082820635079138337⟩, + ⟨104809075136683791336886125507250178720440795751679162827823,104809075136683791337710707480551172364875951530029136471118⟩, + ⟨-31475942289818744560143142371636622092099725216482648743427,-31475942289818744558693508976096735652542901464350642315394⟩, + ⟨58396140180263977521055400735731400169909075616167225928216,58396140180263977521873110011788388064581186656555261452109⟩] +lemma bs1_3_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 2 r = bs1_3_0_2 r := by + revert r + decide +kernel +def bs1_3_0_3 : Fin 8 → RI := ![⟨-13412346928199297551983635798577942402467834236091709436668,-13412346928199297551857837162446790543438948767270099440751⟩, + ⟨15795220113588383613570546692989669466904806632720428960808,15795220113588383613661016753059657008887822948968623115463⟩, + ⟨-173164237056324133928163858816554543459501223911143713853552,-173164237056324133926268992596984780578200402156886194346786⟩, + ⟨97491254812642378102759742780540515121020113256590845116484,97491254812642378103460891608432248806881102765679069691252⟩, + ⟨165220664228157879578242321918222496790612228080903193698482,165220664228157879580250681326678188254173964941697548473865⟩, + ⟨111882003634195307528236287887601054544955908532609931246048,111882003634195307529098260887726108227785417663447099138562⟩, + ⟨-33489894608905741361881769758611861837312367903178366083055,-33489894608905741360366402108717894490196151207016516733053⟩, + ⟨62231427266526400753729857617312276971703666117182648047438,62231427266526400754584646274756125109803922678867722286209⟩] +lemma bs1_3_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 3 r = bs1_3_0_3 r := by + revert r + decide +kernel +def bs1_3_0_4 : Fin 8 → RI := ![⟨-14121329310620468036999426775113095314107743431717864615385,-14121329310620468036867775569009143730743845562739263597458⟩, + ⟨15981250541288522335539136130196202264383426010915170838896,15981250541288522335633815157654371770967460693096488698846⟩, + ⟨-183497424637439641128966746893255105685057268091056587041762,-183497424637439641126983725209683358874260284736309952767317⟩, + ⟨103466064980991736454148921724173440357794480925126967464145,103466064980991736454882690322065339493532529427584046812784⟩, + ⟨175218670980065172703524662343425352429053024051401487121255,175218670980065172705626457295618726694279926445632289839228⟩, + ⟨118672369106086423116588576601341027672467590547268355717489,118672369106086423117490651445599135565710952626551595504592⟩, + ⟨-35385801996227942549725676926051243386875624747539802499638,-35385801996227942548139809344859134259908796425595452541652⟩, + ⟨65876221078377241918141226905067540425056018108270065969483,65876221078377241919035783167180522047453119330603439524862⟩] +lemma bs1_3_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 4 r = bs1_3_0_4 r := by + revert r + decide +kernel +def bs1_3_0_5 : Fin 8 → RI := ![⟨-14769271531189731207357387992976464627927373521311134843805,-14769271531189731207219445861972485077669147361869104943108⟩, + ⟨16058582043984904739765454438556915141538416050975243386930,16058582043984904739864657683216848011609751812021561071949⟩, + ⟨-193177153268601781336555620678735308803301412514146434582244,-193177153268601781334477840725524711688033044358472203431361⟩, + ⟨109095556286205834949227061097176081895979792173833337863419,109095556286205834949995892671552293914894395916938436336416⟩, + ⟨184613515757047838639183872691621089617178986953017225288500,184613515757047838641386101468848307421943557795026506172419⟩, + ⟨125050747990381629610907690601563086127936998235829853920835,125050747990381629611852870900513459366487452457637423211642⟩, + ⟨-37121101476249326553621460170643079558501623319202840500000,-37121101476249326551959812244182071103207269398139689145665⟩, + ⟨69254388906887543468810574952505445117690652647787200301904,69254388906887543469747877395456906242563535128929991777470⟩] +lemma bs1_3_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 5 r = bs1_3_0_5 r := by + revert r + decide +kernel +def bs1_3_0_6 : Fin 8 → RI := ![⟨-15342076770256947663834853899953314791623148174004436257139,-15342076770256947663690134315225441682606089063795918090298⟩, + ⟨16024397081298638049381588039970854222678797598508652934563,16024397081298638049485665396658630249285614973972144375087⟩, + ⟨-202000687786359823352647084172523777802872344679289119112035,-202000687786359823350467217515428073973893230202695236710385⟩, + ⟨114264121928226274628539921466164652235793177177978746023136,114264121928226274629346527724601327585189056571638278020777⟩, + ⟨193210552581246612010333371842666833660729776140882919450706,193210552581246612012643801816426683169039878300685555982976⟩, + ⟨130883397098861507283253810781211815089208934169087276437347,130883397098861507284245430233238969460409600550936076234971⟩, + ⟨-38652755256309523323330420212356512135945051747669793972443,-38652755256309523321587131224939146300970615463390392630900⟩, + ⟨72288128575482613171004997418405289918674423248874947560366,72288128575482613171988351954985182421798385370050724652668⟩] +lemma bs1_3_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 6 r = bs1_3_0_6 r := by + revert r + decide +kernel +def bs1_3_0_7 : Fin 8 → RI := ![⟨-15826206859981442116865266078283539993701148516473336225855,-15826206859981442116713228058616194047003839268204445304508⟩, + ⟨15878395656816981823890537099610061248532656977856089153876,15878395656816981823999877623442356201623363494581262992026⟩, + ⟨-209765589849663714579295466710323881690728473813205185077743,-209765589849663714577005364715444405391795185486957631859422⟩, + ⟨118855375290081200872523131259188814984254000545606602054570,118855375290081200873370527404051981903357768908854217822472⟩, + ⟨200814569363063445781353520698935243635531429119199965049099,200814569363063445783780788566313605834560694426543185301343⟩, + ⟨136036126949785919998188863948701297332505571302528204765234,136036126949785919999230629360300540430114186497801760086122⟩, + ⟨-39938805248286178955883534458790165975104096975783594698931,-39938805248286178954052087762396435275327782240553128356793⟩, + ⟨74900525041426378923244556806845882517139200448214896496635,74900525041426378924277639348186239095529094771076000203909⟩] +lemma bs1_3_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 7 r = bs1_3_0_7 r := by + revert r + decide +kernel +def bs1_3_0_8 : Fin 8 → RI := ![⟨-16209174433300427829680283034808163607180650890636480430940,-16209174433300427829520323876887960443685225128990420182885⟩, + ⟨15622893323249308575533973086435627178978924495703147044657,15622893323249308575649010220942740832704912025207737880813⟩, + ⟨-216276534068301623272561982401778226747446553272691142138436,-216276534068301623270152566734213794146160214889809652267886⟩, + ⟨122755952386856703994357722468387517717281084959873126234048,122755952386856703995249267715125366098858329716386261453007⟩, + ⟨207236251595831684956720594068919082239115977978077535209868,207236251595831684959274321912532622890661842481402081030334⟩, + ⟨140378809785468384237317633142126853582230080669811103148448,140378809785468384238413674239973525531286727443491650453176⟩, + ⟨-40940130775316960852861651591451027197208782318225630352919,-40940130775316960850934787035006085454303493209978868196332⟩, + ⟨77018483010459720439000454648775378546816901244665208511550,77018483010459720440087360501247611233818875873779702863937⟩] +lemma bs1_3_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 8 r = bs1_3_0_8 r := by + revert r + decide +kernel +def bs1_3_0_9 : Fin 8 → RI := ![⟨-16480049638187459360405552971833648224274694461981691305035,-16480049638187459360236999803048367545708686033402175659758⟩, + ⟨15262789179786244059894287685436756071617105639334823032587,15262789179786244060015505337499573291099631378215615725773⟩, + ⟨-221352805789514237127684533806742043219126412867544768099771,-221352805789514237125145669192994215386210327372241351747079⟩, + ⟨125859749205965020195887235268523501384499133974739301617483,125859749205965020196826679926821528488451103718153502803033⟩, + ⟨212299341541084275501934505184930635418312353390551815781410,212299341541084275504625435331429153531154945484458876560153⟩, + ⟨143790382973594160908265079692825666643896028641412635647926,143790382973594160909420007004046688987019603940766858702626⟩, + ⟨-41622331383905927644064599907523529188894005725710299639592,-41622331383905927642034212082096840440695466228232033889111⟩, + ⟨78575923233001059844842193381265702513799584694726846988670,78575923233001059845987494644333628649823197010485838826326⟩] +lemma bs1_3_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 9 r = bs1_3_0_9 r := by + revert r + decide +kernel +def bs1_3_0_10 : Fin 8 → RI := ![⟨-16629955901690234817729361760904994345533313716069601085629,-16629955901690234817551461689221799635260979632793109581778⟩, + ⟨14805395705243386831186155566005617321850352662612062091378,14805395705243386831314095189725005171079472100495086449533⟩, + ⟨-224836162409280737807595079343411974221904283823568134214475,-224836162409280737804915425202025949586940396752347668398204⟩, + ⟨128072423710675117658407822284696358212968613574410351360991,128072423710675117659399362658924281155187458501609325281223⟩, + ⟨215848198251707044583758738575988603813647829705073178557223,215848198251707044586598890852010751215052351188050435780289⟩, + ⟨146164138303357436550688255633348815721007927711739680920869,146164138303357436551907227978615536522333317882274054060310⟩, + ⟨-41957626185793042401347641048732631464543153387438837040935,-41957626185793042399204660633184126983926033175463089087105⟩, + ⟨79517080626662230226579075956222835420928550385785311098708,79517080626662230227787888452996380272509401888727286015370⟩] +lemma bs1_3_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 10 r = bs1_3_0_10 r := by + revert r + decide +kernel +def bs1_3_0_11 : Fin 8 → RI := ![⟨-16652525562918159407037315440736170900003620894538383312890,-16652525562918159406849224026311414861727764835056451981345⟩, + ⟨14260137585455675057177487329127725076068788393720787312826,14260137585455675057312756216646952817664850356463541735692⟩, + ⟨-226598642566786280455387305279581848031294648727031612846618,-226598642566786280452554142072545677058982203612888427430434⟩, + ⟨129315933939572322714980216013632647549677667397536508394715,129315933939572322716028558657255464753195787119219695121295⟩, + ⟨217755367892357072799722745531688757515081104965754630254790,217755367892357072802725601313161977895720370715828852913919⟩, + ⟨147413017986871809497762492593435144192289363986861501325195,147413017986871809499051296079561312256790909001998698049981⟩, + ⟨-41926634226519053760915482171170290989239308715435700112337,-41926634226519053758649737061411523000968424915726265329472⟩, + ⟨79799695988840204025776717957060067999806195361137814021055,79799695988840204027054779568508407154640401870709463040852⟩] +lemma bs1_3_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 11 r = bs1_3_0_11 r := by + revert r + decide +kernel +def bs1_3_0_12 : Fin 8 → RI := ![⟨-16544284318865607535334670371659961751907977870853781814472,-16544284318865607535135438080939963776140990495794460518084⟩, + ⟨13638142997235854966019219185361642576535984932703933604329,13638142997235854966162500208612026627044072780309470544120⟩, + ⟨-226549825556441391972505234281048149992113931353497025774654,-226549825556441391969504259476073098457355662262846395720203⟩, + ⟨129532832499214313660586150089063900429775972568386858617291,129532832499214313661696587303801980201875919914974141779703⟩, + ⟨217928691213363268800334704748884287952371191580264653459497,217928691213363268803515423219602720285716537342831024260581⟩, + ⟨147474578188515554853074080566883940197977535508987016795714,147474578188515554854439221403407506759778490725826636080873⟩, + ⟨-41519882483468981125264640144170959832154066925104472887290,-41519882483468981122864692279556160602012482509585707876904⟩, + ⟨79397857707404486692628255279686245284239412596152915506856,79397857707404486693982017987615096970463400192608240760627⟩] +lemma bs1_3_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 12 r = bs1_3_0_12 r := by + revert r + decide +kernel +def bs1_3_0_13 : Fin 8 → RI := ![⟨-16304934007788105506386348284532669327485231009996345950791,-16304934007788105506174904505353326286302612083647007559932⟩, + ⟨12951764327691376250603775744794863921042886526229790615774,12951764327691376250755838851287312602545827329454344392991⟩, + ⟨-224642992748908584720519335322318768997025925459658321295982,-224642992748908584717334422617194197081630928566314137316012⟩, + ⟨128690003068922381027122788857223471093804040237003182077064,128690003068922381028301287786182043543211182541605789293697⟩, + ⟨216317421123069711126488534531141883188516269524948110671280,216317421123069711129864207879691229669855873445155331585541⟩, + ⟨146315242144309769482284962935878682936221152615585101684655,146315242144309769483733776963694066899348418035164203192423⟩, + ⟨-40738885276996582715247663119728226811735255938713982386301,-40738885276996582712700615929290092046324279005799113812495⟩, + ⟨78304234764151341689610985653175249427214423365619985896363,78304234764151341691047724155963590080108449602409347411224⟩] +lemma bs1_3_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 13 r = bs1_3_0_13 r := by + revert r + decide +kernel +def bs1_3_0_14 : Fin 8 → RI := ![⟨-15937506809870929450651381334119650199087397245504441564381,-15937506809870929450426515423600913586826023524478767487604⟩, + ⟨12214072374947747918857629774760969731665113418317994543301,12214072374947747919019345617289585751566965401170765465715⟩, + ⟨-220879640565972106630272109693778810219405533509042296974312,-220879640565972106626885023546627439402501275068694421959529⟩, + ⟨126781516345711082547092871491460760160877579053451274000106,126781516345711082548346179750216156898384440541768003575333⟩, + ⟨212916814577808849025726178717300911597321880826357727877563,212916814577808849029316134705040192377630297174315383486298⟩, + ⟨143933459696347656448766244099009511314518222268536879548859,143933459696347656450307026650307045421397952234967072596548⟩, + ⟨-39596656395439000689355177008016123863813245423913805688902,-39596656395439000686646447113812765660714383671830435841424⟩, + ⟨76531456310266950451399289985452224779041358973133254879526,76531456310266950452927230475639482837089720556652943672987⟩] +lemma bs1_3_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 14 r = bs1_3_0_14 r := by + revert r + decide +kernel +def bs1_3_0_15 : Fin 8 → RI := ![⟨-15448370684586773850915576061349791493060860453113948403803,-15448370684586773850675914758577428397378452977984051634584⟩, + ⟨11438366897650018706550609344085467674846547809509388340218,11438366897650018706722965524751326580319739536876334580080⟩, + ⟨-215311854458799118269031856399441282084498463356811693974105,-215311854458799118265421911802881798556346237714001642278939⟩, + ⟨123830309833848204254522441932426784919819233718007505673533,123830309833848204255858213501263480327047591747522677042145⟩, + ⟨207770713478036834749644539012091011292086287311464971155240,207770713478036834753470701576848273548773161770909220541933⟩, + ⟨140361428667145311191031565537416778203107275060897520138032,140361428667145311192673726204121257780312646794635617883156⟩, + ⟨-38117555579381296718410506410892787223728955289291066924655,-38117555579381296715523551541660975279116204595802500482563⟩, + ⟨74112441956270067280768838032761785012682307351840904987228,74112441956270067282397311675527604394350398146902015752979⟩] +lemma bs1_3_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 15 r = bs1_3_0_15 r := by + revert r + decide +kernel +def bs1_3_0_16 : Fin 8 → RI := ![⟨-14847075534178452652002178432433285504250837772339149728352,-14847075534178452651746158782536407295807696798642546202629⟩, + ⟨10637738109432334017913542911352943586647731041518403053245,10637738109432334018097663453637926559246345230801030516737⟩, + ⟨-208042181208497290201703116913324781928369233448730559039287,-208042181208497290197846771558167469929330654697011055609765⟩, + ⟨119888462394961530523038975672026733414301436244769830319202,119888462394961530524465921805771523916600800848390464266394⟩, + ⟨200971745541787277455125220389729383940503578770203925885215,200971745541787277459212541909499625658201055725306119072436⟩, + ⟨135665120495522415974861909591541007336962851496853162477087,135665120495522415976616157749693077961945988570893482795448⟩, + ⟨-36336431808946197557536493842213126322837517586776390721500,-36336431808946197554452486677392084954921915993157314453251⟩, + ⟨71099570167971207048995357161688180049864474249830604801307,71099570167971207050734984072931404847380904639369625691503⟩] +lemma bs1_3_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 16 r = bs1_3_0_16 r := by + revert r + decide +kernel +def bs1_3_0_17 : Fin 8 → RI := ![⟨-14146041376688819581622347974041956091034679268085407118565,-14146041376688819581348184660729551124873540539167565436793⟩, + ⟨9824701368646180985764300625342240745050946892483685238808,9824701368646180985961469467427174344083679547476166026951⟩, + ⟨-199220825786080937253387207418860163484155918269281903010424,-199220825786080937249257569634137839440423420100780505175655⟩, + ⟨115035937719048886279130688606335420765911724427058143769546,115035937719048886280658759909095611709125796079724559697895⟩, + ⟨192658952783915884445074488976982073736521694442023951021989,192658952783915884449451471801874147213782709680092241101260⟩, + ⟨129942483253546117949624043140901485364970010383801462984900,129942483253546117951502611788311125655539764156488681569795⟩, + ⟨-34297098914455249774283384944895539176621986579991896562484,-34297098914455249770980819603068917211793533911122308959704⟩, + ⟨67562680893547737843485257587982943072827858276847274990536,67562680893547737845348168806340494760078277816458822863031⟩] +lemma bs1_3_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 17 r = bs1_3_0_17 r := by + revert r + decide +kernel +def bs1_3_0_18 : Fin 8 → RI := ![⟨-13360102438903416378317465528952761330648685625812848852634,-13360102438903416378023111170253034286506379423137390369440⟩, + ⟨9010913855065870081760903858967410501670158708585910969618,9010913855065870081972593407673149535316180395985186097604⟩, + ⟨-189040228258976397187740122169300063568009745650496744222408,-189040228258976397183306352869184087828288162976828186637122⟩, + ⟨109377799997862866971557738925410190308097775480065593871869,109377799997862866973198346645467590447375849158404011417930⟩, + ⟨183012873434850585058621606838511056522607501519174270754931,183012873434850585063320937164277038742542777643590556743522⟩, + ⟨123319854815529937761190131716503167283450453315262363496658,123319854815529937763207049526579317806630225940344988505212⟩, + ⟨-32050252175466146751506278490606690022560367020617603229754,-32050252175466146747960492252837833253972870524422700835597⟩, + ⟨63586026667212328457250763811784234613961502097879987421761,63586026667212328459250871084955524174433269287811977809218⟩] +lemma bs1_3_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 18 r = bs1_3_0_18 r := by + revert r + decide +kernel +def bs1_3_0_19 : Fin 8 → RI := ![⟨-12505932995791738271681363624705816147634315530100513701774,-12505932995791738271364460105456776339860676411377344641748⟩, + ⟨8206973148840299395328728857925180690647342140291456934183,8206973148840299395556634988714452251338898315521053176997⟩, + ⟨-177727315493052171862058585644263160521406315511049984475966,-177727315493052171857285165264316378726638518464079319352103⟩, + ⟨103040043319380628247857363327842700600728026419728571943916,103040043319380628249623650609936315532276739906024557397646⟩, + ⟨172248334399878013262013272479322401529480010644267174656925,172248334399878013267072597318026350759226359217540372281629⟩, + ⟨115946785886228248729144081894203643637756159032680697344757,115946785886228248731315506686017503497839287108552939802273⟩, + ⟨-29650995096245375344734378552865805233945366692097638295927,-29650995096245375340916965614932568396029343586975382168875⟩, + ⟨59264395004655776331775195271865791609239404879215559470615,59264395004655776333928521747280766675006411620985077139291⟩] +lemma bs1_3_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 19 r = bs1_3_0_19 r := by + revert r + decide +kernel +def bs1_3_0_20 : Fin 8 → RI := ![⟨-11601390358647615147310501217091922935605066992473154114395,-11601390358647615146968319432019734699372042593542970898269⟩, + ⟨7422265431848286487346266758080908977711401751859026813203,7422265431848286487592352149767531393191651264387985163781⟩, + ⟨-165533932141056644673512304373083882991536662534094421372677,-165533932141056644668358125238756458112431013044657799186820⟩, + ⟨96164300997392539960224492809898362534543461454142448247063,96164300997392539962131670542029464095553029957278798416192⟩, + ⟨160605417748433077073827945876585264649772140024377107671903,160605417748433077079290835050781267800120768881136161137816⟩, + ⟨107989618281196752921343721105679774346967622461065030430993,107989618281196752923688352724749588670967488944942179702074⟩, + ⟨-27156179960462899753962193866206026726663094002412878102935,-27156179960462899749840279485026610985314324601148396538539⟩, + ⟨54698701877770971806359694355650441732065587475976467788003,54698701877770971808684784019989199521894374879155022372990⟩] +lemma bs1_3_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) 20 r = bs1_3_0_20 r := by + revert r + decide +kernel +def bs1_3_0 : Fin 21 → Fin 8 → RI := ![bs1_3_0_0,bs1_3_0_1,bs1_3_0_2,bs1_3_0_3,bs1_3_0_4,bs1_3_0_5,bs1_3_0_6,bs1_3_0_7,bs1_3_0_8,bs1_3_0_9,bs1_3_0_10,bs1_3_0_11,bs1_3_0_12,bs1_3_0_13,bs1_3_0_14,bs1_3_0_15,bs1_3_0_16,bs1_3_0_17,bs1_3_0_18,bs1_3_0_19,bs1_3_0_20] +lemma bs1_3_0_mem (d : Fin 21) (r : Fin 8) : (bs1_3_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 3 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_0) d r = bs1_3_0 d r := by + fin_cases d + · exact bs1_3_0_0_calc r + · exact bs1_3_0_1_calc r + · exact bs1_3_0_2_calc r + · exact bs1_3_0_3_calc r + · exact bs1_3_0_4_calc r + · exact bs1_3_0_5_calc r + · exact bs1_3_0_6_calc r + · exact bs1_3_0_7_calc r + · exact bs1_3_0_8_calc r + · exact bs1_3_0_9_calc r + · exact bs1_3_0_10_calc r + · exact bs1_3_0_11_calc r + · exact bs1_3_0_12_calc r + · exact bs1_3_0_13_calc r + · exact bs1_3_0_14_calc r + · exact bs1_3_0_15_calc r + · exact bs1_3_0_16_calc r + · exact bs1_3_0_17_calc r + · exact bs1_3_0_18_calc r + · exact bs1_3_0_19_calc r + · exact bs1_3_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 3 0 tr1_3_0_mem) d r +lemma bs1_3_0_lower (d : Fin 21) : (2800/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 3 0) d) := by + have hc : ∀ d : Fin 21, (2800:ℤ)*scale < 1000000*(rowLowerBox (bs1_3_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_3_0_mem d)).1 + have hnum : (2800:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_3_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_3_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2800/1000000:ℝ) < ordinarySignValue 1 3 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 3 0) _ bs1_3_0_lower e he hτ +def bs1_3_1_0 : Fin 8 → RI := ![⟨-11059279082733179871736344042652584899983799582811302550031,-11059279082733179871625877193789854995975247140571299380440⟩, + ⟨14645945883342238012277545534511090050227016598512045841949,14645945883342238012356989499563611806386811634382731673103⟩, + ⟨-140158703513230320023153974522042976349751372884128290582635,-140158703513230320021490046305250249130589294832643903642134⟩, + ⟨78575171898651585589792777071146745382508764051600267949787,78575171898651585590408472948163275251018236431427613365358⟩, + ⟨133435711463314910123075859956898532027036433856296461694122,133435711463314910124839449309369182905147038128775202771895⟩, + ⟨90293374102516596230115029893447074059130171756555456756960,90293374102516596230871949396361865306213342576153164253865⟩, + ⟨-27254235177819368704240546533312916089377140660648410235178,-27254235177819368702909865261223071333658870054130018625056⟩, + ⟨50438045375783019843166297611874032702356933125888931677966,50438045375783019843916908368362050152683600901006125002110⟩] +lemma bs1_3_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 0 r = bs1_3_1_0 r := by + revert r + decide +kernel +def bs1_3_1_1 : Fin 8 → RI := ![⟨-10520297141660537488328927622967299765800995912443281669147,-10520297141660537488215277089535925175007590615226567585230⟩, + ⟨14330184699369955221988253470807441764567286306801335716347,14330184699369955222069987032496366654453422678576273373074⟩, + ⟨-132720880996791184754650670924616230448096567873560877480098,-132720880996791184752938787844970020129282971573411654470668⟩, + ⟨74328433962740350092450029600943397589323247951564200579035,74328433962740350093083470000257381150800572312203809610314⟩, + ⟨126287186904589793837289050593527261745372524496162510363429,126287186904589793839103467069833099779892370504082283980090⟩, + ⟨85438607522122802359547749480825862140586558801590052673413,85438607522122802360326483609269467038079301299914835304461⟩, + ⟨-25833905240984137710224951390466262360873589709954592048220,-25833905240984137708855919522926242064521017162863947679322⟩, + ⟨47768270331424581899274768087965531067910926394140061373177,47768270331424581900047011650196321035301111684601300707420⟩] +lemma bs1_3_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 1 r = bs1_3_1_1 r := by + revert r + decide +kernel +def bs1_3_1_2 : Fin 8 → RI := ![⟨-9972558805893220501933293562544072328701649612936130239960,-9972558805893220501816315438992974946339170745872896063209⟩, + ⟨13975484943583063287339601732781342338670913162850039846986,13975484943583063287423728383038286277228478862721078939669⟩, + ⟨-125239740783270915034100459611887170067422794641507303226932,-125239740783270915032338454064269300320609954936662022392769⟩, + ⟨70067167817261183529874898190567853811231148110749720674575,70067167817261183530526885181355769365571427408200871898986⟩, + ⟨119106093404759533380411052384209448572279884248585352101002,119106093404759533382278593418379308109931621373370708465778⟩, + ⟨80562241516389370042373668291549499047335612587250746022157,80562241516389370043175203087210700460181602285445288562441⟩, + ⟨-24396116327034987993427471191367705608062939151276785270616,-24396116327034987992018355245222169743549110297437507457793⟩, + ⟨45075726252135318998174088772661553929200330702864000564469,45075726252135318998968942963897628810611762717219821095233⟩] +lemma bs1_3_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 2 r = bs1_3_1_2 r := by + revert r + decide +kernel +def bs1_3_1_3 : Fin 8 → RI := ![⟨-9419988586593219868084248819153557345538727297000055891414,-9419988586593219867963789172008772057283693299645619626453⟩, + ⟨13584458686464677832205014854368268605797091149705072373882,13584458686464677832291645296862697658541645672534696657599⟩, + ⟨-117766326820990884862141758801292095107022004276876822234499,-117766326820990884860327312133061820271311154002246299329603⟩, + ⟨65819868983110747393823462047849742830349341808757329758647,65819868983110747394494853590723752729211897743496505454622⟩, + ⟨111940895377738300804524648465957589764556917600099654287355,111940895377738300806447771586548324867983687505905589049572⟩, + ⟨75697468369479499754070475482479680963368294143756696326479,75697468369479499754895865698434318547780378707927979865193⟩, + ⟨-22952120936461761164758984796555387467048547147475194679166,-22952120936461761163307930492506836755665279358376754381527⟩, + ⟨42380239752163089325253588307827784670985266110109903531646,42380239752163089326072099090025403731975107482037821589306⟩] +lemma bs1_3_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 3 r = bs1_3_1_3 r := by + revert r + decide +kernel +def bs1_3_1_4 : Fin 8 → RI := ![⟨-8866382759962806819819845547572635186286451487773602777738,-8866382759962806819695739596092949470196272599861471256806⟩, + ⟨13160048117042481779753178596807331172528715631153927107401,13160048117042481779842431336190894802678366705387173569687⟩, + ⟨-110348852093039554383759669685071722936848132899608894919015,-110348852093039554381890299854533272794771203309180453607315⟩, + ⟨61613311663288367353780419441951572328076367359013004257797,61613311663288367354472133955641291935283875443909671437857⟩, + ⟨104837244883299099545195820394625788468677398481686470344081,104837244883299099547177156305451965875055859360931940670390⟩, + ⟨70875521570394987350134091063128429016694126081535905328523,70875521570394987350984465777991813913453943632854730583771⟩, + ⟨-21512616931739079553354990936533633219813468672112360704607,-21512616931739079551860013329337970442311888224890268230569⟩, + ⟨39700564201381591428734383524088496455078706532780670440345,39700564201381591429577670565257434518132962269333170405019⟩] +lemma bs1_3_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 4 r = bs1_3_1_4 r := by + revert r + decide +kernel +def bs1_3_1_5 : Fin 8 → RI := ![⟨-8315363939073074464089619212869733903289088499071663546959,-8315363939073074463961690431884964733533298052814294003423⟩, + ⟨12705479926450859463955792363637607646881570404559634714267,12705479926450859464047794350752047485111654234607324285726⟩, + ⟨-103032195423236851588619971283563239269126338005523191744680,-103032195423236851586693019346294329560328278754740581618679⟩, + ⟨57472281513524896408203295970114835146686819071209385011691,57472281513524896408916317331870438970425060781183758432642⟩, + ⟨97837516381054085397800229989371802118505667701715436092778,97837516381054085399842596892579805329038524919227675987018⟩, + ⟨66125355391829292063969359107263199958392014895631832955679,66125355391829292064845927872547560139342257353401193807058⟩, + ⟨-20087611909537534473934143657061488225021061660097454869777,-20087611909537534472393116328337312210614677368788470737298⟩, + ⟨37054162610762505104405059560399407617666018473720561526247,37054162610762505105274322330723615158127546918123921149386⟩] +lemma bs1_3_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 5 r = bs1_3_1_5 r := by + revert r + decide +kernel +def bs1_3_1_6 : Fin 8 → RI := ![⟨-7770341006543291919555587013330217452942872408442193361715,-7770341006543291919423646148333993714670549556166651552694⟩, + ⟨12224214891285041655636369596198443646055898813658133234639,12224214891285041655731256936387049300718520505766892388806⟩, + ⟨-95857492224045098283323163721376302715256026981122604879597,-95857492224045098281335778994873211450726023270189725693092⟩, + ⟨53419362868169512524897095095147843133806902855665607782062,53419362868169512525632478130199750122013343509852618686727⟩, + ⟨90980432362831310069975240304380249617101321445131308287410,90980432362831310072081659624368169854069277898130247798761⟩, + ⟨61473388590005332723795773019172153646686024782182446699687,61473388590005332724699832607876727824704160689672373820485⟩, + ⟨-18686311556762374823972781985157214742050540661613802291255,-18686311556762374822383425179214786304746455995449869975644⟩, + ⟨34457031464249308058537498258737088013978707468569732429269,34457031464249308059434022722916866276651669079187408288719⟩] +lemma bs1_3_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 6 r = bs1_3_1_6 r := by + revert r + decide +kernel +def bs1_3_1_7 : Fin 8 → RI := ![⟨-7234475008539254340418669008889269227632982077779043716828,-7234475008539254340282512992373987508019069860817113233527⟩, + ⟨11719894345184520205361773381391300684788121526296370206849,11719894345184520205459692113833603773648404454563376374141⟩, + ⟨-88861821818865361253684544374468987722233546760454292310759,-88861821818865361251633668115232820565911361746641121033836⟩, + ⟨49474781258422648858352351161211621975749251163111730903884,49474781258422648859111227682664879891059022572892699105814⟩, + ⟨84300781791348400876761731521255753995072370909465928801608,84300781791348400878935445205249565941340349210514605624317⟩, + ⟨56943313432428838185154459350386267368671894212174280879209,56943313432428838186087401182276612573977634264794133289277⟩, + ⟨-17317033265352907393208808724210556396550861731525022174077,-17317033265352907391568676294246121603453672107993177309225⟩, + ⟨31923566955669425053111498070678636269169669430006757749485,31923566955669425054036664051321979668494844676719612395763⟩] +lemma bs1_3_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 7 r = bs1_3_1_7 r := by + revert r + decide +kernel +def bs1_3_1_8 : Fin 8 → RI := ![⟨-6710651406381277535486020688821341065457720850126165724465,-6710651406381277535345431445546158630132013627949912023310⟩, + ⟨11196285312261761290763781708299001129060858130876025763834,11196285312261761290864888665221015666722915053542203699049⟩, + ⟨-82077990840292295628580035925594157725502103000401008470220,-82077990840292295626462383333249564503594779478098934198378⟩, + ⟨45656300313731971735281580424219356261229895616176612810915,45656300313731971736065165891988686883426279012082808986421⟩, + ⟨77829230310314591344497124754993986255367802774236308632922,77829230310314591346741614346793820193992862128301143753695⟩, + ⟨52555969135927995507296442828103680862225013086288983180780,52555969135927995508259761156022467874099864228886855733925⟩, + ⟨-15987145249172407707116248654856553711312816130703101470334,-15987145249172407705422713671236436274995168934217423222701⟩, + ⟨29466473507217053534306125282945301889066511513504665826608,29466473507217053535261414578647708727922802526572026996321⟩] +lemma bs1_3_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 8 r = bs1_3_1_8 r := by + revert r + decide +kernel +def bs1_3_1_9 : Fin 8 → RI := ![⟨-6201458878419259141151150573342045957283508850702407423549,-6201458878419259141005893700682171144903074257566921319724⟩, + ⟨10657226039796177000836559077063751131998995994660263903280,10657226039796177000941022832785455936354542747273132013408⟩, + ⟨-75534409406541928891054094160462661852577578686371383542614,-75534409406541928888866134500264502357617250938768694047231⟩, + ⟨41979170604607464909878197030644720814920041009589974520145,41979170604607464910687797906634012971988336853917666463190⟩, + ⟨71592218567876958343022469067299534831333342013165802344348,71592218567876958345341476775337328948186602369810838660973⟩, + ⟨48329276927171063131968580035587244029673401662454459118351,48329276927171063132963880987708743713471138116833117103189⟩, + ⟨-14703030463638265000339379600081256569593480511364511600949,-14703030463638264998589618453857961858708489375198735534312⟩, + ⟨27096713028181808974014484623377754428707135618290394170513,27096713028181808975001489975611637937517011589556711377063⟩] +lemma bs1_3_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 9 r = bs1_3_1_9 r := by + revert r + decide +kernel +def bs1_3_1_10 : Fin 8 → RI := ![⟨-5709174670507145073135505410342727510401512065472837808083,-5709174670507145072985328718038996469398827181364654386065⟩, + ⟨10106573512553962517127041560068751170752440803622878044991,10106573512553962517235043481166059071661848275786689248802⟩, + ⟨-69255054410977748376296798236093783833331970885816667390881,-69255054410977748374034732843623489189064817351193979758972⟩, + ⟨38456126718055392491771409419601466182477223885644668142117,38456126718055392492608431306527094555001803417101581148822⟩, + ⟨65611942802631524734726063181612409895830045657511898987806,65611942802631524737123615191666312957376511807566911021994⟩, + ⟨44278232388315015336512673724367003818109368943380557386758,44278232388315015337541685309841645282196347748201949266111⟩, + ⟨-13470073823193843459352482605271667641981002967319208272274,-13470073823193843457543457418038878207843911330359240070333⟩, + ⟨24823492182325916584911391838671135283961831141171979128462,24823492182325916585931826854035675393406401560671843617885⟩] +lemma bs1_3_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 10 r = bs1_3_1_10 r := by + revert r + decide +kernel +def bs1_3_1_11 : Fin 8 → RI := ![⟨-5235756315835741027117955393913069395253068833942212594316,-5235756315835741026962587285374290571593316493252481442286⟩, + ⟨9548154274722025885668411551260805051644741349774700303435,9548154274722025885780146960677341506077579103570425708854⟩, + ⟨-63259512383746136978488517256927929777658227514595061551754,-63259512383746136976148255156147868326568018304975274875442⟩, + ⟨35097427882762480641896995804341153782706187159025649574174,35097427882762480642762952467673705523623834681547598439080⟩, + ⟨59906410130111962753110286454905529772150553605592522796320,59906410130111962755590718772404444476542741274021635217193⟩, + ⟨40414949557454878386660104242044117515194710739995435629456,40414949557454878387724687442324421356923343969803736608415⟩, + ⟨-12292670575016649965939257060551446363831581082682942399389,-12292670575016649964067696185647086240448792189267900265574⟩, + ⟨22654284008081841644378985157581831189819901743495537186962,22654284008081841645434695306685300833111473981157862533877⟩] +lemma bs1_3_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 11 r = bs1_3_1_11 r := by + revert r + decide +kernel +def bs1_3_1_12 : Fin 8 → RI := ![⟨-4782839389816328379584507710381055369967535034227930450119,-4782839389816328379423655385125089113215563004309823184837⟩, + ⟨8985719558735803330203212361219423045716061758414670184426,8985719558735803330318891831009185544635257643597836452630⟩, + ⟨-57563093019007179540432547907246722877373222770510488311210,-57563093019007179538009678734422266795341513870246772910571⟩, + ⟨31910936784417479164591775743511224108618713145306615122266,31910936784417479165488299130314888003899853471486832017467⟩, + ⟨54489559750024641922228721059934987919953166287635012733810,54489559750024641924796708207760719207465510862936072750587⟩, + ⟨36748750423882006788375536070762546245032659180119037901600,36748750423882006789477697156487505603923497513500917227960⟩, + ⟨-11174253233396845837833573088644988445715901557765328074896,-11174253233396845835895949457795360882532167117801719896935⟩, + ⟨20594879590558190812250455903167459665486461828842222571303,20594879590558190813343430734853255558937827765871856289908⟩] +lemma bs1_3_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 12 r = bs1_3_1_12 r := by + revert r + decide +kernel +def bs1_3_1_13 : Fin 8 → RI := ![⟨-4351740837045480232076030412911888978146319526117846529992,-4351740837045480231909377866686739000924877169482004277438⟩, + ⟨8422905362900234610029896196951860344224419218598207570486,8422905362900234610149746986523466963997827936536596197169⟩, + ⟨-52177003590341639916039068331584935957307079123698377893110,-52177003590341639913528832211722684918357754586147279783190⟩, + ⟨28902230817034749334198173055355645115911146923278246966318,28902230817034749335127024440774346430289650684580752694277⟩, + ⟨49371440549988222761139848934472747484142241691917958139659,49371440549988222763800435880775323232513349975210178813797⟩, + ⟨33286292973957939461878468845280779087871516616889427356316,33286292973957939463020373079457999513591361112203065875169⟩, + ⟨-10117334205428893759410354157208004831607014721765508780873,-10117334205428893757402861190029730659216908489219027049618⟩, + ⟨18649465108627244013422663717746660566688931658472459764771,18649465108627244014555050448062624802536939780056700808705⟩] +lemma bs1_3_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 13 r = bs1_3_1_13 r := by + revert r + decide +kernel +def bs1_3_1_14 : Fin 8 → RI := ![⟨-3943467307182396525911772613907703332728239510027642072165,-3943467307182396525738978409413246561645249689194748131355⟩, + ⟨7863197772875912282273485033738563639115842815127844913864,7863197772875912282397752693075646401887446011739799251251⟩, + ⟨-47108574058491641549515576596392759602511202664562281485231,-47108574058491641546912830564306635903638124425698439444870⟩, + ⟨26074739874548673877697403411094710369242328792686254150064,26074739874548673878660485823414059955276528806193495567689⟩, + ⟨44558435265251884287458008979095777244612474360665727393068,44558435265251884290216646727440733954326032949457338242868⟩, + ⟨30031730768754156202564932246872774947851320322863339562802,30031730768754156203748919159906400740319940075954432817511⟩, + ⟨-9123561129364188233200415157970820863928461904198059772839,-9123561129364188231118939908133030784103994622278925687176⟩, + ⟨16820719447302281988617024001361015640220533721129799580100,16820719447302281989791142661273576188742394687317363238964⟩] +lemma bs1_3_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 14 r = bs1_3_1_14 r := by + revert r + decide +kernel +def bs1_3_1_15 : Fin 8 → RI := ![⟨-3558727865220351473772783449324769012587374046254945448372,-3558727865220351473593478226136051183137627493731938200059⟩, + ⟨7309903521023863480696538093550907343297337723089746550548,7309903521023863480825488253989785393998565545241508819851⟩, + ⟨-42361522650435547106479617981179979897303227064855357119263,-42361522650435547103778798474230607322533866281774713195310⟩, + ⟨23429904860371986017286601618141635076653688972744481112768,23429904860371986018285973717431952591066808133485551384531⟩, + ⟨40053521405628151373532792298981893174075023713887171458622,40053521405628151376395377642111773644056083672766921483871⟩, + ⟨26986897122610150754801450250273298129990314755252020874111,26986897122610150756030050701984357282828593535274944739954⟩, + ⟨-8193781977815073895129699358272505559210538903061459942960,-8193781977815073892969792518086736757778711498599167817454⟩, + ⟨15109927637473303732036293410857235472196799104942824071659,15109927637473303733254653766063800671775482996513278086848⟩] +lemma bs1_3_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 15 r = bs1_3_1_15 r := by + revert r + decide +kernel +def bs1_3_1_16 : Fin 8 → RI := ![⟨-3197950398108544325897176760625233247435444264562077197019,-3197950398108544325710960447743246557874290328908686151312⟩, + ⟨6766125545907320722261685665802974260174821333987774687024,6766125545907320722395606044670432128931430269873758023506⟩, + ⟨-37936251989070558186030074994178830918078815931002598430537,-37936251989070558183225155865782007753606113354828965051829⟩, + ⟨20967351339474153635747172239061385590545107894417452694684,20967351339474153636785063853250397411867962111001779247144⟩, + ⟨35856559513382174675887425428090113513924656515131900841704,35856559513382174678860345449200824088198921294308353890141⟩, + ⟨24151507250860695294074278534271166639086065650449595183939,24151507250860695295350233813516172884876817612308602578528⟩, + ⟨-7328117120279548926433452798608553955695349396269152423396,-7328117120279548924190295121475730491018023396465527245649⟩, + ⟨13517105619173967903094148342991910298452207638713721739628,13517105619173967904359468834348614526972351035508791615598⟩] +lemma bs1_3_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 16 r = bs1_3_1_16 r := by + revert r + decide +kernel +def bs1_3_1_17 : Fin 8 → RI := ![⟨-2861301021850133238351090613948619082830441451280322214037,-2861301021850133238157529302173617779200830351349714068421⟩, + ⟨6234743162131299866070199799187328878494993847133225483279,6234743162131299866209402449082345999243994041019506821724⟩, + ⟨-33830166408784110067819584425761751213823393671794377530292,-33830166408784110064904029834908290645914781251873891890237⟩, + ⟨18685073136409055865554135092630503103547645972818721445810,18685073136409055866632964649582517982729390308817288764699⟩, + ⟨31964599901055188512859983520289993979009784724145481288726,31964599901055188515950165525197572538277385021616442662187⟩, + ⟨21523372213831152029969824226445858849225815430209176115319,21523372213831152031296107481633402074391131781404412396021⟩, + ⟨-6526035763719895385722535327222422566909146324787590176419,-6526035763719895383390899952309488961726184762221812189020⟩, + ⟨12041132178018773117173853398809133701900108470953978262981,12041132178018773118489082394229080501894609307501381881264⟩] +lemma bs1_3_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 17 r = bs1_3_1_17 r := by + revert r + decide +kernel +def bs1_3_1_18 : Fin 8 → RI := ![⟨-2548705798147377591564987378335587052986976743482569615062,-2548705798147377591363609802110449277655330075098797565221⟩, + ⟨5718396375926573091477822570827136721912375173011054096179,5718396375926573091622646409758351433392194976404616815980⟩, + ⟨-30038001837251185364801876174211301128152394786249211468674,-30038001837251185361768587592554121722228710986945891870534⟩, + ⟨16579621154975623532621745997925455096269667409381337316494,16579621154975623533744140134170684577337012187524541334312⟩, + ⟨28372199771959086979298717176516367184146499475554266836227,28372199771959086982513684860585360619686201450318738094260⟩, + ⟨19098619055043213282540066847814787726471585297971718990543,19098619055043213283919907193335684610485651836833382185280⟩, + ⟨-5786434468589970303948018294281313125127515066589298192095,-5786434468589970301522228366882496298370641610986263619803⟩, + ⟨10679884337550793304158376455259940924931831381915617444500,10679884337550793305526716155221890901732548931900368007377⟩] +lemma bs1_3_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 18 r = bs1_3_1_18 r := by + revert r + decide +kernel +def bs1_3_1_19 : Fin 8 → RI := ![⟨-2259874093970953813077840594992899688361681865618991166348,-2259874093970953812868134164154857029145937013926107839247⟩, + ⟨5219473873100766689622337000744083287371913455790614139089,5219473873100766689773150665957705572009799855259128671656⟩, + ⟨-26552160497238148773734748217644240106281088707288807515109,-26552160497238148770576004656993435253425231876816618413972⟩, + ⟨14646293226533412913263034010420349237576637840189002669818,14646293226533412914431849688506184650414910899286433907669⟩, + ⟨25071743490669517626432521164062480274501592706597947076353,25071743490669517629780457964790641155995001180522563017793⟩, + ⟨16871912172185502723768151340560762942342011469005109179753,16871912172185502725205061047248743008124678164658631915938⟩, + ⟨-5107715746552166811922964160832153336051985920623584636352,-5107715746552166809396845030936162017313284012390190829432⟩, + ⟨9430372968296099558772102131873848879713908373301340867233,9430372968296099560197035533256767447954827060161220913719⟩] +lemma bs1_3_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 19 r = bs1_3_1_19 r := by + revert r + decide +kernel +def bs1_3_1_20 : Fin 8 → RI := ![⟨-1994322957472917573374758042206110320082835531080280977819,-1994322957472917573156164352748289490450153401152283237179⟩, + ⟨4740104247958393948129611253109257664445133462626451725523,4740104247958393948286816329595237586348089185400937819503⟩, + ⟨-23363043632098357931538756579325903637551210591142433305933,-23363043632098357928246146971628622363081759612487266893381⟩, + ⟨12879321355785310804075062139004287084031444697597371020996,12879321355785310805293411668627341855585957432272656757542⟩, + ⟨22053759697475780092065561895787770644595696776963445173348,22053759697475780095555382662933598907710569706056899605731⟩, + ⟨14836671634808452671224549263641319043498050816289431305893,14836671634808452672722354519061569936511361361563035799261⟩, + ⟨-4487865066014105942536628569583384971567522905732887385715,-4487865066014105939903453714604080729333698488381825842927⟩, + ⟨8288875869664955227303579094193740217972202982838656481126,8288875869664955228788900494185521181638882220982187372639⟩] +lemma bs1_3_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) 20 r = bs1_3_1_20 r := by + revert r + decide +kernel +def bs1_3_1 : Fin 21 → Fin 8 → RI := ![bs1_3_1_0,bs1_3_1_1,bs1_3_1_2,bs1_3_1_3,bs1_3_1_4,bs1_3_1_5,bs1_3_1_6,bs1_3_1_7,bs1_3_1_8,bs1_3_1_9,bs1_3_1_10,bs1_3_1_11,bs1_3_1_12,bs1_3_1_13,bs1_3_1_14,bs1_3_1_15,bs1_3_1_16,bs1_3_1_17,bs1_3_1_18,bs1_3_1_19,bs1_3_1_20] +lemma bs1_3_1_mem (d : Fin 21) (r : Fin 8) : (bs1_3_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 3 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 3 tr1_3_1) d r = bs1_3_1 d r := by + fin_cases d + · exact bs1_3_1_0_calc r + · exact bs1_3_1_1_calc r + · exact bs1_3_1_2_calc r + · exact bs1_3_1_3_calc r + · exact bs1_3_1_4_calc r + · exact bs1_3_1_5_calc r + · exact bs1_3_1_6_calc r + · exact bs1_3_1_7_calc r + · exact bs1_3_1_8_calc r + · exact bs1_3_1_9_calc r + · exact bs1_3_1_10_calc r + · exact bs1_3_1_11_calc r + · exact bs1_3_1_12_calc r + · exact bs1_3_1_13_calc r + · exact bs1_3_1_14_calc r + · exact bs1_3_1_15_calc r + · exact bs1_3_1_16_calc r + · exact bs1_3_1_17_calc r + · exact bs1_3_1_18_calc r + · exact bs1_3_1_19_calc r + · exact bs1_3_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 3 1 tr1_3_1_mem) d r +lemma bs1_3_1_lower (d : Fin 21) : (2800/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 3 1) d) := by + have hc : ∀ d : Fin 21, (2800:ℤ)*scale < 1000000*(rowLowerBox (bs1_3_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_3_1_mem d)).1 + have hnum : (2800:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_3_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_3_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2800/1000000:ℝ) < ordinarySignValue 1 3 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 3 1) _ bs1_3_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs14.lean b/lean/OAI/Analysis/Triangular/Signs/Signs14.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9feef4194afe58974635d03bdfdf44a329cbdc2 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs14.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows14 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_4_0_0 : Fin 8 → RI := ![⟨-2946607129678650591428544195018807550492732897531297656977,-2946607129678650591394943780812306399562399785622954156934⟩, + ⟨14136712778783721381660678601791686921142657916809929314748,14136712778783721381684842866088363267549300286314056766009⟩, + ⟨-32790934767767703636327448509989075033396547411061893105837,-32790934767767703635821335790476779557956632794483725859391⟩, + ⟨17885384950528793585582837468982183683651575361231608276346,17885384950528793585770112083096162664985216264388555407178⟩, + ⟨30791532522048055462727496202852602995176844702642867309368,30791532522048055463263922590884376748946223591266574065478⟩, + ⟨20599046934206389869961359134786673184058170937662031435298,20599046934206389870191589372008845168513611864392263137883⟩, + ⟨-6091195798446442546949508036752844538167733646419604785513,-6091195798446442546544758173976090179809811592209589040744⟩, + ⟨11367889231890578388315753409197607384483138267928459522102,11367889231890578388544064731422438937449918104523189245689⟩] +lemma bs1_4_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 0 r = bs1_4_0_0 r := by + revert r + decide +kernel +def bs1_4_0_1 : Fin 8 → RI := ![⟨-2996792119209006372496461762553425270436778494494742949683,-2996792119209006372461961540337826595291244357605449557961⟩, + ⟨13845148982440590051550375149575810207912660737719559615091,13845148982440590051575186524899525857012893957938075242159⟩, + ⟨-33407576737690203817972268574280961544422063480770208042157,-33407576737690203817452602323085494364092906529015419392892⟩, + ⟨18228415760201261083543407217572746779054441293113335560382,18228415760201261083735696984079146485867065149273740008017⟩, + ⟨31376214415166384400269599866200332889642974431150025362931,31376214415166384400820391575959006187953967252475424789926⟩, + ⟨20994450955433894325041294512980943644886606086943711424222,20994450955433894325277690240013124272185667798421001813645⟩, + ⟨-6214301940696358753705654066280709661886888045556083801655,-6214301940696358753290065135689651591290025514817750316596⟩, + ⟨11592079910913563287381331410960494498157533041040427636604,11592079910913563287615756835084210247540463444345931855136⟩] +lemma bs1_4_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 1 r = bs1_4_0_1 r := by + revert r + decide +kernel +def bs1_4_0_2 : Fin 8 → RI := ![⟨-3038352682020883541822922267296499298399967389566481086369,-3038352682020883541787479662813716924081753136515290946688⟩, + ⟨13516835903867184956728974275814175395391664800746897475584,13516835903867184956754463380109641116064147048451199387735⟩, + ⟨-33933088815337609939371551386668524653555045354946868811731,-33933088815337609938837690320816168955322409229519382134848⟩, + ⟨18522291828576327371074492503935072350198145526417473717674,18522291828576327371272034713889492043882008114434111132818⟩, + ⟨31875786508310957840086396199930550340852448045070934207490,31875786508310957840652232924093336333828219046770918551369⟩, + ⟨21333281629481479835863520184259997838255578470223674984984,21333281629481479836106373120170882307525480155880358256191⟩, + ⟨-6321162420472820012436258791903456567597412539805560310132,-6321162420472820012009317944906144000466687265513255729846⟩, + ⟨11785540308265998844236214588094276218177914105544424570848,11785540308265998844477043401775546829300674629510729971068⟩] +lemma bs1_4_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 2 r = bs1_4_0_2 r := by + revert r + decide +kernel +def bs1_4_0_3 : Fin 8 → RI := ![⟨-3070622276747669362755892112752743675423925850075818109987,-3070622276747669362719461985029303527312225476195306984799⟩, + ⟨13154120848507711280824264708552554719931024116119410076196,13154120848507711280850464005658064835243468929313071141741⟩, + ⟨-34359692287493228939570094736968946094939142115211627078710,-34359692287493228939021358911840413392544004161373014009117⟩, + ⟨18762730308602372896219737273035576024706314072549644604610,18762730308602372896422783523288507489921305871303039414438⟩, + ⟨32282911025985340105097422149081080496486433725378719797683,32282911025985340105679024557613629978936970516669008527306⟩, + ⟨21610601203516839270388598010015164855257964910820223267497,21610601203516839270638217461022497862063097666446272815349⟩, + ⟨-6410259745089891704989138968681573322129064590716607393461,-6410259745089891704550302438088019163467403351130451379167⟩, + ⟨11945492471597279635794285884327779539482423475892210747930,11945492471597279636041824815789560429164816513027547644442⟩] +lemma bs1_4_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 3 r = bs1_4_0_3 r := by + revert r + decide +kernel +def bs1_4_0_4 : Fin 8 → RI := ![⟨-3092991191405296219753855583787781423246391568889216402183,-3092991191405296219716390015451105903381661003330310497561⟩, + ⟨12759627652633820807927092678130207713661953167247603181921,12759627652633820807954036628574969267362352398775614700253⟩, + ⟨-34680120198593778594919170615262610283191937136715785387058,-34680120198593778594354838266191632236308215271801969387666⟩, + ⟨18945714180623152877591061210939953973738708052503856649142,18945714180623152877799878572825854838626611631361442449535⟩, + ⟨32590719637651547675900638531313779928648654207127776508713,32590719637651547676498771619044336340664983998721186510693⟩, + ⟨21821776327903326598610063374844906498412135324069816012572,21821776327903326598866777671069544449704718108818773779111⟩, + ⟨-6480151171634962186239053830075593591213277766681915917597,-6480151171634962185787744404252272307340930184860167557662⟩, + ⟨12069311250534195946143388505402703742595787117744330103270,12069311250534195946397963148211288887923071274578651523153⟩] +lemma bs1_4_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 4 r = bs1_4_0_4 r := by + revert r + decide +kernel +def bs1_4_0_5 : Fin 8 → RI := ![⟨-3104919134803355864581868739229298876261995326693421432291,-3104919134803355864543316803940616358215866864132371299414⟩, + ⟨12336220119659589524781935530921234086434095279877753584972,12336220119659589524809660759179633564445501634780211333981⟩, + ⟨-34887753199165571535462622240756227628700389772959345474020,-34887753199165571534881926279942900204522062613673838070529⟩, + ⟨19067565849250683411214591900907321260968552754564997611206,19067565849250683411429464216476020854356154468866525646063⟩, + ⟨32792940594216633528744109929612565339341410088769535226292,32792940594216633529359586729136322473920057833200854478981⟩, + ⟨21962562825316874802263494468611936567892456522667014034878,21962562825316874802527652557628930119455744975350038681032⟩, + ⟨-6529493866633769085999369760342577890666902279513794318667,-6529493866633769085534973981714284626920287350402384963623⟩, + ⟨12154571033536654171952254596764594492114732880542810547616,12154571033536654172214210990098824132519917490973557083881⟩] +lemma bs1_4_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 5 r = bs1_4_0_5 r := by + revert r + decide +kernel +def bs1_4_0_6 : Fin 8 → RI := ![⟨-3105947693916576323432459052771632735152767770382277608016,-3105947693916576323392766557251716551487255387070624781638⟩, + ⟨11886962648783630601640957239662675048269741039070239192086,11886962648783630601669502719680509818969880746528505126663⟩, + ⟨-34976756914543553165944676316732201341517117180130167129263,-34976756914543553165346800447455922940544831825698571892914⟩, + ⟨19125021881825207634986768621449785488824933901621019432025,19125021881825207635207997941306801381949330275151542469985⟩, + ⟨32884027548260378735172951625083464584307628905024538214146,32884027548260378735806637325289206837009935829302065901594⟩, + ⟨22029191856652656521004003277506398574487083218207922786495,22029191856652656521275976491986158082903697303312571786697⟩, + ⟨-6557071030374376959902134228251069772058935833042933255792,-6557071030374376959423999285748553213949278185814489056429⟩, + ⟨12199093789271470079413236036942121791605465931446984534721,12199093789271470079682942418501672986577425879587996934113⟩] +lemma bs1_4_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 6 r = bs1_4_0_6 r := by + revert r + decide +kernel +def bs1_4_0_7 : Fin 8 → RI := ![⟨-3095712376433604106515450261564084271544764040844180960056,-3095712376433604106474559459328925113330584279212186517578⟩, + ⟨11415079162951956553660125948357439865302803121860016122467,11415079162951956553689533209423394220142950228580847771793⟩, + ⟨-34942218269756063928672844657684792435736441990666079767560,-34942218269756063928056919062392617747163145296421971440288⟩, + ⟨19115307549396923889089867207622492420747035328370916554385,19115307549396923889317775386446311101064432143488626046531⟩, + ⟨32859287699706127572768576686423534677842334460628939224634,32859287699706127573421393202667633278848799052000293338251⟩, + ⟨22018455953152088208045936504940845163326229526771238871421,22018455953152088208326120524134010088654758350693347984403⟩, + ⟨-6561818601226315914497456962120056242404478504879680266374,-6561818601226315914004887242846121412715064773303315445892⟩, + ⟨12200997640103992778386204933738900631966541442802453117674,12200997640103992778664053684880639901594365838188756632889⟩] +lemma bs1_4_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 7 r = bs1_4_0_7 r := by + revert r + decide +kernel +def bs1_4_0_8 : Fin 8 → RI := ![⟨-3073953937724365647673683045805198525863254006220484525582,-3073953937724365647631532319322472897309139312033263760780⟩, + ⟨10923911448329294793450077429393838342350961605467034084306,10923911448329294793480390784721638796696142101750553373770⟩, + ⟨-34780277938660357966899445640457048711788082086693563336655,-34780277938660357966264542193184192486477408413821825619301⟩, + ⟨19036209681386986819070788309239425679377771192251496731870,19036209681386986819305718777308019270661113384220488171560⟩, + ⟨32715006654433886145888973351557738299072683167459389478345,32715006654433886146561904399996167866800183047958885341315⟩, + ⟨21927793208372122546197064726525479852568559741981609054237,21927793208372122546485881754128680782978268347524631329328⟩, + ⟨-6542852083757195358643312120924447288580136516949396461060,-6542852083757195358135565381417650847882891474468417014200⟩, + ⟨12158745080476473203784458143870053119148259795966852598287,12158745080476473204070867949321797644330781752975932133399⟩] +lemma bs1_4_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 8 r = bs1_4_0_8 r := by + revert r + decide +kernel +def bs1_4_0_9 : Fin 8 → RI := ![⟨-3040528678632716147672087690020494752830537791996068267964,-3040528678632716147628611197536541267434372062120699795619⟩, + ⟨10416877956741267691013234087430725636696594165493297669359,10416877956741267691044500888149054013947497927046660421723⟩, + ⟨-34488255860356059702584706088486680289896333424876243712633,-34488255860356059701929833035119731499087063381846143865951⟩, + ⟨18886146215109244136210202190202063849575778008507340067555,18886146215109244136452521921831176226186452333047882791810⟩, + ⟨32448567166440369625450355601561895756010845873951272827376,32448567166440369626144452337513150954440062823251003283684⟩, + ⟨21755367769109390948036800401321641644689547916600662117022,21755367769109390948334701585421152018793925798201786383807⟩, + ⟨-6499492971482747103455134762359617970055180810754768438066,-6499492971482747102931417874279665348139288000318053763859⟩, + ⟨12071189842141693010505111705474065924912479330502922413738,12071189842141693010800529953108571924120582299663612675904⟩] +lemma bs1_4_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 9 r = bs1_4_0_9 r := by + revert r + decide +kernel +def bs1_4_0_10 : Fin 8 → RI := ![⟨-2995417396319706703507880308949427267240468048772408420475,-2995417396319706703463007591711188900835792310658105906108⟩, + ⟨9897433998744241674182811728651303000346235920376686448437,9897433998744241674215082646276290228811676573832568601734⟩, + ⟨-34064766596704269758470420122309939426010084277666289379967,-34064766596704269757794516164291611548742414785460121382078⟩, + ⟨18664230717906557185869796445339712377964087712480772367095,18664230717906557186119898148062991652865608032676593500670⟩, + ⟨32058558766531164695226674514839811605100157693347982089244,32058558766531164695943061803437212501778550450415953754179⟩, + ⟨21500144638923154637070665674676591646848795271229477143876,21500144638923154637378133799065907518498283253422932354073⟩, + ⟨-6431294163069877874860633228203556645354037468731940809530,-6431294163069877874320097446935315976209726745115815001996⟩, + ⟨11937621305666682755603699316037443189202085413348474807538,11937621305666682755908604765758484189860610970373397380033⟩] +lemma bs1_4_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 10 r = bs1_4_0_10 r := by + revert r + decide +kernel +def bs1_4_0_11 : Fin 8 → RI := ![⟨-2938732676198025821266566971919558441360096063699472679175,-2938732676198025821220222516915693453909898651655630990931⟩, + ⟨9369034078220790531508820855544509958580818443362724372340,9369034078220790531542150196441316587896696571446361349823⟩, + ⟨-33509821204878642531969271566543992243703921422014850357922,-33509821204878642531271199274576772639781142364360809352692⟩, + ⟨18370330089878773150929613284552973382733166069218248868335,18370330089878773151187917836219599576123066245580026012822⟩, + ⟨31544875174588385853900335855750781985722216074883101694403,31544875174588385854640219252725658750977422218145601120301⟩, + ⟨21161956719774311402176053956241986163997424244456233365504,21161956719774311402493606436522325939257909020458960680731⟩, + ⟨-6338063703070268692836583901272201163457771972532477395861,-6338063703070268692278319598714585395357823919724573682666⟩, + ⟨11757805268579630840939318518053271909915965726191745718258,11757805268579630841254224272924342710368160260448007827017⟩] +lemma bs1_4_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 11 r = bs1_4_0_11 r := by + revert r + decide +kernel +def bs1_4_0_12 : Fin 8 → RI := ![⟨-2870724229874320833725082112150871139338926608222131909321,-2870724229874320833677184864807995920879936470371151363438⟩, + ⟨8835096906949670895672799577381132001985286411452685404776,8835096906949670895707245633216079633252522146733881566588⟩, + ⟨-32824912281675001723669340901723481545375661848719972593884,-32824912281675001722947879375662803317887939809117128048705⟩, + ⟨18005113626394250673449293684804778983698764557096439257713,18005113626394250673716252849606193710488522125130691999929⟩, + ⟨30908796360759326613073967352617219538716326880957456022438,30908796360759326613838640884042123512494797744968917342969⟩, + ⟨20741561975282129918595006444545676180416528237091076608965,20741561975282129918923198667134213094097602561083930439428⟩, + ⟨-6219886119208314374668760443316825490012115861699995331063,-6219886119208314374091791237832276443828999575608493753926⟩, + ⟨11532019811451805825685562387345722740431742626306181861364,11532019811451805826011019204768420431111616891267373769772⟩] +lemma bs1_4_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 12 r = bs1_4_0_12 r := by + revert r + decide +kernel +def bs1_4_0_13 : Fin 8 → RI := ![⟨-2791782012624671608693702398098973990015015295376375704371,-2791782012624671608644165218577215602369344082742412042478⟩, + ⟨8298973412291362320240673833521095836204915707516873577169,8298973412291362320276299272275238595139746199183888711601⟩, + ⟨-32013078914715999110383701158546873935187618093786325990673,-32013078914715999109637537837748012126241460936670472790678⟩, + ⟨17570091639188053705438025576997277210330740173576642392776,17570091639188053705714125035847702377648681670605333773527⟩, + ⟨30153052175818604195771270732359224855809595528073173644601,30153052175818604196562125574821068701565910834993313191203⟩, + ⟨20240688612263882739345533970065120264361836815876404217528,20240688612263882739684963017661079194802207264776542764937⟩, + ⟨-6077140583436950026485193507976959711057139885867107237168,-6077140583436950025888469714939437057337776643111304888856⟩, + ⟨11261084961744627892369705201384216721032885181782484756313,11261084961744627892706305187513450199534486531327750166690⟩] +lemma bs1_4_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 13 r = bs1_4_0_13 r := by + revert r + decide +kernel +def bs1_4_0_14 : Fin 8 → RI := ![⟨-2702436894440723704001031476273048336403136218841666321448,-2702436894440723703949760532090964019344499057609032551780⟩, + ⟨7763917838259831170270045713393314452540749557962803797009,7763917838259831170306918016165743715605653066808089526687⟩, + ⟨-31078948461495435253696517341765206335734787650340753658836,-31078948461495435252924238856378983918151334642707139489751⟩, + ⟨17067641910046756859878747653971427144348914182975303811634,17067641910046756860164510389761783883643401061123480923865⟩, + ⟨29281864624091016665420421115772670248012601787612925380275,29281864624091016666238955293039518805021861308927544917718⟩, + ⟨19662066254616999696491032885777653672901872730352507690058,19662066254616999696842341699099963002163793279933148927365⟩, + ⟨-5910515099981492050170087042659715717438093581191628880773,-5910515099981492049552478358027618047342708963237696564749⟩, + ⟨10946384850105611866910225787776426924590914366635253183075,10946384850105611867258606524570960145208672288448430797730⟩] +lemma bs1_4_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 14 r = bs1_4_0_14 r := by + revert r + decide +kernel +def bs1_4_0_15 : Fin 8 → RI := ![⟨-2603358710681490424635435564441608859399083596105055848426,-2603358710681490424582329651101212598273321935951627065744⟩, + ⟨7233061863316165991798972499922381171712896220361414123193,7233061863316165991837164449513381294900905673407293402935⟩, + ⟨-30028752380209772956761967037943660932829396081829351372735,-30028752380209772955962048975699880852547714355993564581421⟩, + ⟨16501022388388724884019153551637322332360932273434569494713,16501022388388724884315143635786350949673655769046246313414⟩, + ⟨28300966113780870678221239357239846034428094336200095250733,28300966113780870679069068586396944932463018322175883340701⟩, + ⟨19009441233717900482994705220067588602168430953863721992747,19009441233717900483358587252936225373238816248031973684846⟩, + ⟨-5721015927622603874808343212105132704525031095972774976887,-5721015927622603874168630528685066145131696135452579009197⟩, + ⟨10589881094212989283736284065508129751413234953899330235226,10589881094212989284097133227012914028358422430764893263987⟩] +lemma bs1_4_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 15 r = bs1_4_0_15 r := by + revert r + decide +kernel +def bs1_4_0_16 : Fin 8 → RI := ![⟨-2495351580781800644483199268352394238877414794777415992794,-2495351580781800644428149048402470054094415406238522844274⟩, + ⟨6709391534532202464241322028439218452215331080300616263707,6709391534532202464280912256589806399889995255236630932180⟩, + ⟨-28870313763130167513388270353106382628584963972488860197415,-28870313763130167512559065797558222853658413753876776044311⟩, + ⟨15874368748658427887312010658765163198971119453761020795805,15874368748658427887618837492361319773651252844388989152731⟩, + ⟨27217591396774471561230616222174874252419504492505465971713,27217591396774471562109486061883175746963533012411498970479⟩, + ⟨18287574349412699619582668734279666254829347767166676582886,18287574349412699619959873167558344301155667597084288970167⟩, + ⟨-5509971482657886687027770361674744135714213982130997496056,-5509971482657886686364636602894657616444503827925650398848⟩, + ⟨10194116240160279912313770433289803621392961129647261353434,10194116240160279912687830956121674361892984123511830765684⟩] +lemma bs1_4_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 16 r = bs1_4_0_16 r := by + revert r + decide +kernel +def bs1_4_0_17 : Fin 8 → RI := ![⟨-2379346454571494935825418274161671325896925752865793759491,-2379346454571494935768305423697037977216612747832702980607⟩, + ⟨6195726755441113677780069098924942416301450780372925477443,6195726755441113677821142700125293093997664266023957346328⟩, + ⟨-27613004775771499288535756391110450030573213795646217691599,-27613004775771499287675483065615024033816410505613581514012⟩, + ⟨15192675698295600016301366097433696503462068157527615827224,15192675698295600016619689168290227936397765230086399010463⟩, + ⟨26040441406257612690027029586454864958024739431597525864848,26040441406257612690938829062982950777832719356012699109878⟩, + ⟨17502219769811839449073532046376637589001055298535206889077,17502219769811839449464869636164905415612642878920809151917⟩, + ⟨-5279030049361982433961377470053702798953228188472231161708,-5279030049361982433273397308711496953954474982977717635334⟩, + ⟨9762206248024890676969900936709781488896060901824434078257,9762206248024890677357976819506244212488862586518104187950⟩] +lemma bs1_4_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 17 r = bs1_4_0_17 r := by + revert r + decide +kernel +def bs1_4_0_18 : Fin 8 → RI := ![⟨-2256390923189952331862383585554311190506530185067033269408,-2256390923189952331803079835456858009595640868679836252799⟩, + ⟨5694703062201664856947364946985971085534219184031547056700,5694703062201664856990014167981947002618077278925044321124⟩, + ⟨-26267672878811999295511045804827499710947102161693211357497,-26267672878811999294617771631054043505444512200407815546649⟩, + ⟨14461761271717775686448513511118170772765329988219953334911,14461761271717775686779047737493404316678713358570846980365⟩, + ⟨24779617813271609090757434716023408491722477239224864381686,24779617813271609091704211629713801864890712193584483334539⟩, + ⟨16660084136899459068829486251655022327605912622243150937725,16660084136899459069235835898710369360935616482200381590437⟩, + ⟨-5030150750081273454123757434273445734151168220180492701166,-5030150750081273453409385743347234419758569696861175757279⟩, + ⟨9297821230802252257285615995866219052572367748058509772459,9297821230802252257688578813952960341376632187051008862692⟩] +lemma bs1_4_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 18 r = bs1_4_0_18 r := by + revert r + decide +kernel +def bs1_4_0_19 : Fin 8 → RI := ![⟨-2127636412443176109799229623590581854705415965431231490971,-2127636412443176109737595680819921434940288702313871473329⟩, + ⟨5208755469264845301907821645303469293856010315044354299014,5208755469264845301952146660867347473803429788233498712785⟩, + ⟨-24846535492255786599336551811032116333821290222308890995621,-24846535492255786598408178660694394690861667551605302201885⟩, + ⟨13688213755550654517285442095908984141133320577050174127772,13688213755550654517628963838779736338610673794139030242952⟩, + ⟨23446527842716272968710462035496239498909780044691660480662,23446527842716272969694440182224501973895076976179640019558⟩, + ⟨15768765423521545421239140752711937876795131266143459331638,15768765423521545421661456893772637298458016047807675909583⟩, + ⟨-4765587397726040419220072054118580336495640980878206733406,-4765587397726040418477630912657232368779506541553274995298⟩, + ⟨8805153943841297346880603663812213358649721743752511179347,8805153943841297347299399898920997942598715132191216943371⟩] +lemma bs1_4_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 19 r = bs1_4_0_19 r := by + revert r + decide +kernel +def bs1_4_0_20 : Fin 8 → RI := ![⟨-1994322957460916469935434756311969585960391259697199416292,-1994322957460916469871319088179299972644923212477861693654⟩, + ⟨4740104247216011481456021512876210476240983050547399772193,4740104247216011481502131300115180834721084159824390952340⟩, + ⟨-23363043631558774657622495630679340164634965839284159019941,-23363043631558774656656741013426219617463922409560090317619⟩, + ⟨12879321355474918051457117888472328784295040577166343667646,12879321355474918051814471727481429504618737108286141645852⟩, + ⟨22053759696964865022549017956741960408359195763127167244794,22053759696964865023572616536831621079577923174958025414890⟩, + ⟨14836671634388721179653749264603998040532247685843864760554,14836671634388721180093070202551810655123633359887903003947⟩, + ⟨-4487865065556224006333562921758284945668343287647987724904,-4487865065556224005561226970270672379829088568524193537207⟩, + ⟨8288875869124359902812998974827675648960152335176706581730,8288875869124359903248658275829093772582763682156890036943⟩] +lemma bs1_4_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) 20 r = bs1_4_0_20 r := by + revert r + decide +kernel +def bs1_4_0 : Fin 21 → Fin 8 → RI := ![bs1_4_0_0,bs1_4_0_1,bs1_4_0_2,bs1_4_0_3,bs1_4_0_4,bs1_4_0_5,bs1_4_0_6,bs1_4_0_7,bs1_4_0_8,bs1_4_0_9,bs1_4_0_10,bs1_4_0_11,bs1_4_0_12,bs1_4_0_13,bs1_4_0_14,bs1_4_0_15,bs1_4_0_16,bs1_4_0_17,bs1_4_0_18,bs1_4_0_19,bs1_4_0_20] +lemma bs1_4_0_mem (d : Fin 21) (r : Fin 8) : (bs1_4_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 4 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_0) d r = bs1_4_0 d r := by + fin_cases d + · exact bs1_4_0_0_calc r + · exact bs1_4_0_1_calc r + · exact bs1_4_0_2_calc r + · exact bs1_4_0_3_calc r + · exact bs1_4_0_4_calc r + · exact bs1_4_0_5_calc r + · exact bs1_4_0_6_calc r + · exact bs1_4_0_7_calc r + · exact bs1_4_0_8_calc r + · exact bs1_4_0_9_calc r + · exact bs1_4_0_10_calc r + · exact bs1_4_0_11_calc r + · exact bs1_4_0_12_calc r + · exact bs1_4_0_13_calc r + · exact bs1_4_0_14_calc r + · exact bs1_4_0_15_calc r + · exact bs1_4_0_16_calc r + · exact bs1_4_0_17_calc r + · exact bs1_4_0_18_calc r + · exact bs1_4_0_19_calc r + · exact bs1_4_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 4 0 tr1_4_0_mem) d r +lemma bs1_4_0_lower (d : Fin 21) : (3900/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 4 0) d) := by + have hc : ∀ d : Fin 21, (3900:ℤ)*scale < 1000000*(rowLowerBox (bs1_4_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_4_0_mem d)).1 + have hnum : (3900:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_4_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_4_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (3900/1000000:ℝ) < ordinarySignValue 1 4 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 4 0) _ bs1_4_0_lower e he hτ +def bs1_4_1_0 : Fin 8 → RI := ![⟨-2946607129678650591428544195018807550492732897531297656979,-2946607129678650591394943780812306399562399785622954156934⟩, + ⟨14136712778783721381660678601791686921142657916809929314748,14136712778783721381684842866088363267549300286314056766009⟩, + ⟨-32790934767767703636327448509989075033396547411061893105837,-32790934767767703635821335790476779557956632794483725859391⟩, + ⟨17885384950528793585582837468982183683651575361231608276346,17885384950528793585770112083096162664985216264388555407178⟩, + ⟨30791532522048055462727496202852602995176844702642867309368,30791532522048055463263922590884376748946223591266574065478⟩, + ⟨20599046934206389869961359134786673184058170937662031435298,20599046934206389870191589372008845168513611864392263137883⟩, + ⟨-6091195798446442546949508036752844538167733646419604785515,-6091195798446442546544758173976090179809811592209589040744⟩, + ⟨11367889231890578388315753409197607384483138267928459522102,11367889231890578388544064731422438937449918104523189245689⟩] +lemma bs1_4_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 0 r = bs1_4_1_0 r := by + revert r + decide +kernel +def bs1_4_1_1 : Fin 8 → RI := ![⟨-2871329645383116919828017555730527256899466039557554555439,-2871329645383116919793067429510379819646331390177786217874⟩, + ⟨14574058473298418376825163113574943036947267409373901600522,14574058473298418376850298044412178337394296054949611315495⟩, + ⟨-31865971812883953363880548711076002824192136809264352805587,-31865971812883953363354105694038949791418358689921253454911⟩, + ⟨17370838736020092338634460117507707952328802033903831375087,17370838736020092338829257460210318021880917366565964481123⟩, + ⟨29914509682370562056392792725240658836665229210829591222695,29914509682370562056950767095862781907247028998505836985132⟩, + ⟨20005940902365133187332207832780254528550087036618923421655,20005940902365133187571686304717439477270959140469743154496⟩, + ⟨-5906536585071568236831547594182502420947412762507362871738,-5906536585071568236410539129684292494231079993504870516530⟩, + ⟨11031603213356101039708215253704950419347320258194345607932,11031603213356101039945697728778108266938325944855237073935⟩] +lemma bs1_4_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 1 r = bs1_4_1_1 r := by + revert r + decide +kernel +def bs1_4_1_2 : Fin 8 → RI := ![⟨-2776647200971006371809212525161273656349271602327470352851,-2776647200971006371772816894846786039119007460319146751138⟩, + ⟨14928718282794999401389678426880243429347129696702715896633,14928718282794999401415852914633636913811525516085653621189⟩, + ⟨-30735966600381241455881190095378202960729524267520590630155,-30735966600381241455332973894125529541339849758796386769456⟩, + ⟨16745694353592238368219742726019697791422914884776478938651,16745694353592238368422596702186037287326080149362543233980⟩, + ⟨28845989792752118780176147755989311680826137461197254415763,28845989792752118780757199417725513655997477705190046738025⟩, + ⟨19285544839369058880123209690214599271258211912071953444643,19285544839369058880372592764771361382280758369266113146371⟩, + ⟨-5685324631131420293656119217825644313207674592599365315712,-5685324631131420293217698242274089553469356007996676301462⟩, + ⟨10626174061062887671126613742796806318489971404092296538180,10626174061062887671373918267950299457683481937206909791773⟩] +lemma bs1_4_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 2 r = bs1_4_1_2 r := by + revert r + decide +kernel +def bs1_4_1_3 : Fin 8 → RI := ![⟨-2664809373554636933572751154147071021690389266621498316029,-2664809373554636933534805564993115169464939343810627861758⟩, + ⟨15192770051399271960610431354662262305268363150120080658942,15192770051399271960637720519598257699115168885204481950687⟩, + ⟨-29427172287365906993053310605316491487475046265181881836527,-29427172287365906992481747850103530454986290350642463936509⟩, + ⟨16024406412044447662191338698198738191675909012761925081137,16024406412044447662402831494761667718090966824284317900433⟩, + ⟨27610737845493196044223985807247424603417597997754514914513,27610737845493196044829782366969912121773627100534903227253⟩, + ⟨18454523661027203518967409068265929679268631101364822823585,18454523661027203519227412469974875201104550272082106732538⟩, + ⟨-5432681474441028053686945709621495538017847176129694034415,-5432681474441028053229853963416334131974208202958572242041⟩, + ⟨10160977364194231585486535079483922937695447826713683640868,10160977364194231585744371413854221401769156782803515971256⟩] +lemma bs1_4_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 3 r = bs1_4_1_3 r := by + revert r + decide +kernel +def bs1_4_1_4 : Fin 8 → RI := ![⟨-2538353438995461266941252267913545340545122805001945676423,-2538353438995461266901642540986748692085933519678366482906⟩, + ⟨15359691560550991974587857315236453306522629786438837179969,15359691560550991974616343270923817735866766225924323498012⟩, + ⟨-27968432804064681419984873822144148018794331642602978010740,-27968432804064681419388244670765298834109397016849611233132⟩, + ⟨15222775271365020984403797377040521895481463509063750935170,15222775271365020984624565379479098006182201634328021219379⟩, + ⟨26235895397996428306929752246323019766336821794546452124011,26235895397996428307562116556346636207798936718561020596689⟩, + ⟨17531083324326638003539778789346577371258988920183160744187,17531083324326638003811184872935794566083130130902902718968⟩, + ⟨-5154107073542868404136646168409512262886993843430777223489,-5154107073542868403659508254589255325733526546593825419083⟩, + ⟨9646162271943991853271739293217214078530186900144344775166,9646162271943991853540883270789208843955952649148896081427⟩] +lemma bs1_4_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 4 r = bs1_4_1_4 r := by + revert r + decide +kernel +def bs1_4_1_5 : Fin 8 → RI := ![⟨-2400008755875917902308047392906536613029088177296683110812,-2400008755875917902266648389790843749973905850248550625739⟩, + ⟨15424638184487002611631951827960781504277851125648038318023,15424638184487002611661724569651953959654213896745772400628⟩, + ⟨-26390151254762416170695947270471172463256207601708842126385,-26390151254762416170072366801399172959422658216584523074597⟩, + ⟨14357388166477865000852265765991398606579236546455368841139,14357388166477865001083006443343895191296178322052788034437⟩, + ⟨24750015130071614258461466336281396128900750819598682726149,24750015130071614259122396215684008111735716232977313298013⟩, + ⟨16534327111950872185703974085806360663757776915535183705463,16534327111950872185987640300444232844523659516597936868469⟩, + ⟨-4855288751500572303025034477155827539209646866074080319358,-4855288751500572302526342981067679051096992708415202642260⟩, + ⟨9092296585518466483975294412918568800623766185197336383254,9092296585518466484256596336222887821307660744551478347413⟩] +lemma bs1_4_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 5 r = bs1_4_1_5 r := by + revert r + decide +kernel +def bs1_4_1_6 : Fin 8 → RI := ![⟨-2252599622676038366182967785391499494739674276701437896049,-2252599622676038366139641970375496232747450728442215794224⟩, + ⟨15384688564575649544216325487225886848777500374613475402536,15384688564575649544247483925882489994565372192065054963998⟩, + ⟨-24723275635711693051538505719927158985280550420804284975120,-24723275635711693050885902274982344250623307258968328918405⟩, + ⟨13445073334379347187027051609346460632659066653019045486137,13445073334379347187268531527975094717929329070390493738303⟩, + ⟨23182114580104266906809112905205345129264618811870033465713,23182114580104266907500804094326427684214068175009968709924⟩, + ⟨15483627827106422850244702577781096184344128037987859462394,15483627827106422850541571318977278913198230493380787022838⟩, + ⟨-4541921127760999008380704532385450892306852630100798326778,-4541921127760999007858802701824919451724924360532327660580⟩, + ⟨8510026709414439172065706614023746848393554839609975484465,8510026709414439172360101023924446178606122870858961002319⟩] +lemma bs1_4_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 6 r = bs1_4_1_6 r := by + revert r + decide +kernel +def bs1_4_1_7 : Fin 8 → RI := ![⟨-2098951405596579328828157429951760856507580536515599263540,-2098951405596579328782753194814583303470673653761513671471⟩, + ⟨15239039388478774309486179583935533449360513174848561153512,15239039388478774309518832750984832361485693345405110668506⟩, + ⟨-22998345680359335770260856001991015884184299625080645394739,-22998345680359335769576945953105975739467196238419105507151⟩, + ⟨12502390023851817335469919014067495448528685390067061285964,12502390023851817335722983174599056008870292603493925227146⟩, + ⟨21560789353819328586078033281072571429523855906609873324585,21560789353819328586802906186095534150648139705155716590304⟩, + ⟨14398042049870639658362156808882448817727106552405806383472,14398042049870639658673266897064750144947134141457406650467⟩, + ⟨-4219543610426158872850637584478416630744800381948645475497,-4219543610426158872303699150096617947230937635069025891999⟩, + ⟨7909765659155661709586179789716264364348852443143952892156,7909765659155661709894696848316459654588549782559112019518⟩] +lemma bs1_4_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 7 r = bs1_4_1_7 r := by + revert r + decide +kernel +def bs1_4_1_8 : Fin 8 → RI := ![⟨-1941804222515908105643190808137151002273018281026731350195,-1941804222515908105595540517306066481957631969765806227798⟩, + ⟨14989130493236443595755925465018383782788694180872469116205,14989130493236443595790193918208837723936597090148767326014⟩, + ⟨-21244637778869147243051046741991111637602801616736535985410,-21244637778869147242333305046019723847274823040343439403948⟩, + ⟨11545173428315054747418316304767355231432493987269811227356,11545173428315054747683899037564835475764672992901954658993⟩, + ⟨19913419584428956845875664180824455640911975309611170140738,19913419584428956846636395082590068019645767461815904038783⟩, + ⟨13295788100490320531192586483018825368876712746522959691672,13295788100490320531519086558125048055289728943119862738770⟩, + ⟨-3893400187940964780358487752993397654219134070603247531850,-3893400187940964779784493380307566257813692660252591987944⟩, + ⟨7301419379681096734946064709600413218628811486177705032676,7301419379681096735269843483193337163256312346604640232188⟩] +lemma bs1_4_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 8 r = bs1_4_1_8 r := by + revert r + decide +kernel +def bs1_4_1_9 : Fin 8 → RI := ![⟨-1783737682085341665985860171762594876034401993027351071193,-1783737682085341665935777876764781114996410966523350719478⟩, + ⟨14638684178650978204609760186404448193784109251887377714236,14638684178650978204645777653493520776554984162261292266787⟩, + ⟨-19489436412485791577635137783642033611976103834974209507973,-19489436412485791576880763555848575432019417072759921978953⟩, + ⟨10588148982530148182734428749918648538707101828418357173929,10588148982530148183013566453768293779476363237830602240199⟩, + ⟨18265495473747221437190900307893366540045301357534751345731,18265495473747221437990457850389726245452156852888584063256⟩, + ⟨12193804030461474810013605087500461240823236192720264263114,12193804030461474810356769269568358944954907591945796259599⟩, + ⟨-3568324480936037419860084291373276511521933725434104968656,-3568324480936037419256794049102344892425159406288336131464⟩, + ⟨6694158530645416668633671919357610352433770299379498192343,6694158530645416668973975908489220364420544230590767887837⟩] +lemma bs1_4_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 9 r = bs1_4_1_9 r := by + revert r + decide +kernel +def bs1_4_1_10 : Fin 8 → RI := ![⟨-1627109203151593264364150156610957137326215105492978714576,-1627109203151593264311428918003821116011937459774613311219⟩, + ⟨14193647982505884435531447177025058138790865491340518464018,14193647982505884435569362481754985197199224526874525792804⟩, + ⟨-17757451150254245198826247533019585077487733137943559326951,-17757451150254245198032123708137643163514466382284938208579⟩, + ⟨9644625491885832467486025103717956685285210890911320162360,9644625491885832467779871172266278674767475895708425221338⟩, + ⟨16640079050430072339995601269377314473251207286059489756672,16640079050430072340837289214785575642259535216554965889287⟩, + ⟨11107396265220084412213024509220474776615777905185415993510,11107396265220084412574270748537081474163771588018522245360⟩, + ⟨-3248651429150866081084868086382001058575818815597130184399,-3248651429150866080449789186477160356116230885097956860390⟩, + ⟨6096239885146600744923356128806131312191859126982305743150,6096239885146600745281591465480242654545022869929252928629⟩] +lemma bs1_4_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 10 r = bs1_4_1_10 r := by + revert r + decide +kernel +def bs1_4_1_11 : Fin 8 → RI := ![⟨-1474007380329555859777053558271678775128820648147103523235,-1474007380329555859721462300122981259909946820439661230810⟩, + ⟨13662037765513644567972542265120907777686445608923607241960,13662037765513644568012521589368595865153274896599222841399⟩, + ⟨-16070388704662935113380286468532706583336798057345228109157,-16070388704662935112542932420765378203588390014403445177694⟩, + ⟨8726271577244649439780140882849710738645356015149693459180,8726271577244649440089983236411800948960270970968570910228⟩, + ⟨15057410496155250079767723793236123976939914958093730055469,15057410496155250080655231239759802304440101217604669855581⟩, + ⟨10049983850881608219694399400194738323103793606029558252953,10049983850881608220075311030417200536338069066101933851196⟩, + ⟨-2938155650913954598377213611539830797442639749170937444076,-2938155650913954597707562518320164858907613094791968712028⟩, + ⟨5514878719233493723119108083738315409636479260960928204328,5514878719233493723496844904897219307457316166540827750098⟩] +lemma bs1_4_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 11 r = bs1_4_1_11 r := by + revert r + decide +kernel +def bs1_4_1_12 : Fin 8 → RI := ![⟨-1326220818680950737781802184872578995446169837508960283972,-1326220818680950737723081990743087161599387472138036544820⟩, + ⟨13053686664652592100524667144724368100304710540297531983701,13053686664652592100566896692303499686891141408365228517307⟩, + ⟨-14446680488425858605656279877300301990657164875511882104780,-14446680488425858604771795627844508645100853252466690439892⟩, + ⟨7842975231317920174925857369906838064001546244349563879275,7842975231317920175253139100105313138800111586997907435602⟩, + ⟨13534659092424857780235238335767073497076549462950576517560,13534659092424857781172698851803266924564746336665873411025⟩, + ⟨9032937949420076471698518244713817681179154128453960381284,9032937949420076472100869362818215500466119248474616007298⟩, + ⟨-2640015417180763952548726479981154041210646479507205558303,-2640015417180763951841384291620811212686817605358194966573⟩, + ⟨4956171120049046927013701266207596209312862531118652690883,4956171120049046927412698882144950951058027063537752715627⟩] +lemma bs1_4_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 12 r = bs1_4_1_12 r := by + revert r + decide +kernel +def bs1_4_1_13 : Fin 8 → RI := ![⟨-1185221922712966473679389103745617065220202844855425982966,-1185221922712966473617248843175452397693411529485917075787⟩, + ⟨12379913787624672251379346401651261617372778544686705390448,12379913787624672251424035543593156566618704332751680542834⟩, + ⟨-12901358110648263935555016497261374302624281221994223617412,-12901358110648263934619016837414960263269527666400386849409⟩, + ⟨7002782157013560826344542561016960251833688721970767186673,7002782157013560826690886306912472514441471824895253673800⟩, + ⟨12085811518892414294866512056588322393654230266100916561643,12085811518892414295858573503323256721433804910208381808610⟩, + ⟨8065511562744751862867196167618249155443101417811458719551,8065511562744751863292981601241066782092086916774850611642⟩, + ⟨-2356800297802610839604428977939826965689472927625835496923,-2356800297802610838855888743217191549458306279784741436881⟩, + ⟨4425063054611143654430597709365924192234947303650804322245,4425063054611143654852834321297451251177015837180021640534⟩] +lemma bs1_4_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 13 r = bs1_4_1_13 r := by + revert r + decide +kernel +def bs1_4_1_14 : Fin 8 → RI := ![⟨-1052164357283011777119396333459328171367369562006851260461,-1052164357283011777053507483072271867000648478380467549406⟩, + ⟨11653133029394617859605862965539308744478879387524478474731,11653133029394617859653247964576899241849295107461957301830⟩, + ⟨-11446062725027094637222814104292470246774221847812089756488,-11446062725027094636230350587338952610986880434176258799222⟩, + ⟨6211905200588084091578607381982322688467650237566217657260,6211905200588084091945844195065737454691729585135702288638⟩, + ⟨10721684269538184163344342823573717254144516606831534919590,10721684269538184164396250035401334591877015110417224455753⟩, + ⟨7154850668930358688592751872554621510653701463524093552697,7154850668930358689044222665816748508336834160657822136665⟩, + ⟨-2090479842895783750469888950638052555651340131699289776002,-2090479842895783749676193284070259297209795645151416800016⟩, + ⟨3925361359261674228573445196368185672253624480089409450237,3925361359261674229021153086489635413486227307780135895302⟩] +lemma bs1_4_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 14 r = bs1_4_1_14 r := by + revert r + decide +kernel +def bs1_4_1_15 : Fin 8 → RI := ![⟨-927892336979187904206512672590775086314354567156884710179,-927892336979187904136503164617186693921766994515275438037⟩, + ⟨10886426271372363201103670199951963871918686353434392341815,10886426271372363201154018634450910651814943475222925173902⟩, + ⟨-10089169364781045860747699829674280138598485778560100915721,-10089169364781045859693168113072879840735381207248734882084⟩, + ⟨5474794736488505355431164780776303270454399796982460256782,5474794736488505355821368410721552049529295045046279699819⟩, + ⟨9450042588286134517994984373477408258586137354304014243623,9450042588286134519112677365557506609435720035886645569907⟩, + ⟨6306075170947524111272599280314077395247839987323626621483,6306075170947524111752304843778239288680384592282812704172⟩, + ⟨-1842450154192751555215798877429439403667319303053587554464,-1842450154192751554372465858712548348825565551260238343535⟩, + ⟨3459780571515542095189311521996591084952036808560975612842,3459780571515542095665018852131144032935540731676816895012⟩] +lemma bs1_4_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 15 r = bs1_4_1_15 r := by + revert r + decide +kernel +def bs1_4_1_16 : Fin 8 → RI := ![⟨-812959554988159032481355693469264520557311015536852208276,-812959554988159032406802584696461116915214546409189776426⟩, + ⟨10093106348504820993175100405705775611409807550943210245075,10093106348504820993228716441903655759151329306332846975469⟩, + ⟨-8836004456293021089090828577818028417320700197405904539789,-8836004456293021087967857997854822417399594332592065419202⟩, + ⟨4794258352439164167660769123942666766525175322832092719520,4794258352439164168076296878802134076260931255040431404693⟩, + ⟨8275805641605183291239710308703741628850479246891675899276,8275805641605183292429941316247392461252134878253200571306⟩, + ⟨5522416342794693032981105273525305472706235891655564465766,5522416342794693033491943616591529890464229389097144324048⟩, + ⟨-1613574884993150245575378812355157645929223713276112174406,-1613574884993150244677313676699043502015695132930154470561⟩, + ⟨3030018753487265014654337861938122735077944802166172118480,3030018753487265015160918487256594832058489146596014770417⟩] +lemma bs1_4_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 16 r = bs1_4_1_16 r := by + revert r + decide +kernel +def bs1_4_1_17 : Fin 8 → RI := ![⟨-707655418611813928152963430776516569206337693949546807072,-707655418611813928073384133789773973177980642238487996053⟩, + ⟨9286293838272004434228771303531892537365366841549848509070,9286293838272004434286002001728610345619607288944263183017⟩, + ⟨-7689133515642276451755511957211743305634495741125712789507,-7689133515642276450556833447876021422641984503459537597234⟩, + ⟨4171617584603187011042425680804788788888117338884351389338,4171617584603187011485967300393688715278597930915212814651⟩, + ⟨7201316571338648507014368530620586505185633081514725273107,7201316571338648508284842001025000219545748102637180107342⟩, + ⟨4805396770726552105997665529273899623165621304808009815088,4805396770726552106542943343768166818852833584743000824854⟩, + ⟨-1404237085344782484561144974455538503809309027238055098859,-1404237085344782483602534484302724559231980011313981002099⟩, + ⟨2636855143912132300759800537630482535366596375340270324917,2636855143912132301300533589457321812342278767188500913333⟩] +lemma bs1_4_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 17 r = bs1_4_1_17 r := by + revert r + decide +kernel +def bs1_4_1_18 : Fin 8 → RI := ![⟨-612036286917441922479944524376140569280479523577994613855,-612036286917441922394786276330893204967208735702762591841⟩, + ⟨8478528643239249006095695488579164061287114421306660437912,8478528643239249006156938376834412071622529338656500181294⟩, + ⟨-6648696378935098919157509883746421072584793774020802682594,-6648696378935098917874797348080796508709417972551796187619⟩, + ⟨3606889652776580129258376090258226115184765167312001295122,3606889652776580129733012442800766597111022258782975340152⟩, + ⟨6226656406902912492756411089031510157763346587412003799065,6226656406902912494115951811607710589206949313261893678895⟩, + ⟨4155039006624503361390948636548813852900370535256366519633,4155039006624503361974453456758387611946235015697567684871⟩, + ⟨-1214398371041083410933438917310973866562517625711888560885,-1214398371041083409907624503394424976402924414658744982090⟩, + ⟨2280262583227409237517264303443200735877493066480506312982,2280262583227409238095905747854802509844613907875354439806⟩] +lemma bs1_4_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 18 r = bs1_4_1_18 r := by + revert r + decide +kernel +def bs1_4_1_19 : Fin 8 → RI := ![⟨-525959568775623790636249158178140497900674484242867095454,-525959568775623790544876314157785262507039243514383969753⟩, + ⟨7681432834994481117970190271173058642742621348826617397820,7681432834994481118035902483487122605586272679291464322260⟩, + ⟨-5712768896663518727678033584729800566489164449867644088633,-5712768896663518726301712498581410140988460111326777421930⟩, + ⟨3098982990603505046489077219601276896676306960588931900226,3098982990603505046998351123224136668580788770418219507195⟩, + ⟨5349982287139944683832818492270659640688448161076994321962,5349982287139944685291574458188465164573503800428574321626⟩, + ⟨3570090104798649875070568589806866160554992201258215790736,3570090104798649875696655858467970163965543152849026647670⟩, + ⟨-1043662113611396071275398751951772705411946113008654092725,-1043662113611396070174723449357951786822899069942069643019⟩, + ⟨1959528113306162065683280284110783529273135787145699430912,1959528113306162066304149262248518971293312721849604056436⟩] +lemma bs1_4_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 19 r = bs1_4_1_19 r := by + revert r + decide +kernel +def bs1_4_1_20 : Fin 8 → RI := ![⟨-449118795258812180841790757135661595520494416327170620889,-449118795258812180743469376009275848331060448589336868034⟩, + ⟨6905435916024075032388204138851492559563526119171438480947,6905435916024075032458913500487160008389704483505795229148⟩, + ⟨-4877732604229114784289122032090115023653551415485280111529,-4877732604229114782808137265619581946494849137345888421614⟩, + ⟨2645896747037150062820577771584389253373389503557524180142,2645896747037150063368579906279947377708222772888734029524⟩, + ⟨4567872842970593414161456114931708304175386658188929716512,4567872842970593415731144602063158296535704145236147949028⟩, + ⟨3048250798646115760999958129929970748388729087604299805112,3048250798646115761673656816022115656505762870906874547776⟩, + ⟨-891337841560001923167876190691815615535763463302328698056,-891337841560001921983498960436299867394576427795606515397⟩, + ⟨1673376032538433444152281244442663254544437802985564681956,1673376032538433444820364810007580036036715789995198669330⟩] +lemma bs1_4_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) 20 r = bs1_4_1_20 r := by + revert r + decide +kernel +def bs1_4_1 : Fin 21 → Fin 8 → RI := ![bs1_4_1_0,bs1_4_1_1,bs1_4_1_2,bs1_4_1_3,bs1_4_1_4,bs1_4_1_5,bs1_4_1_6,bs1_4_1_7,bs1_4_1_8,bs1_4_1_9,bs1_4_1_10,bs1_4_1_11,bs1_4_1_12,bs1_4_1_13,bs1_4_1_14,bs1_4_1_15,bs1_4_1_16,bs1_4_1_17,bs1_4_1_18,bs1_4_1_19,bs1_4_1_20] +lemma bs1_4_1_mem (d : Fin 21) (r : Fin 8) : (bs1_4_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 4 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 4 tr1_4_1) d r = bs1_4_1 d r := by + fin_cases d + · exact bs1_4_1_0_calc r + · exact bs1_4_1_1_calc r + · exact bs1_4_1_2_calc r + · exact bs1_4_1_3_calc r + · exact bs1_4_1_4_calc r + · exact bs1_4_1_5_calc r + · exact bs1_4_1_6_calc r + · exact bs1_4_1_7_calc r + · exact bs1_4_1_8_calc r + · exact bs1_4_1_9_calc r + · exact bs1_4_1_10_calc r + · exact bs1_4_1_11_calc r + · exact bs1_4_1_12_calc r + · exact bs1_4_1_13_calc r + · exact bs1_4_1_14_calc r + · exact bs1_4_1_15_calc r + · exact bs1_4_1_16_calc r + · exact bs1_4_1_17_calc r + · exact bs1_4_1_18_calc r + · exact bs1_4_1_19_calc r + · exact bs1_4_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 4 1 tr1_4_1_mem) d r +lemma bs1_4_1_lower (d : Fin 21) : (3900/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 4 1) d) := by + have hc : ∀ d : Fin 21, (3900:ℤ)*scale < 1000000*(rowLowerBox (bs1_4_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_4_1_mem d)).1 + have hnum : (3900:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_4_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_4_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (3900/1000000:ℝ) < ordinarySignValue 1 4 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 4 1) _ bs1_4_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs15.lean b/lean/OAI/Analysis/Triangular/Signs/Signs15.lean new file mode 100644 index 0000000000000000000000000000000000000000..372f901b1c87e03f0887097c86975e89e94a1a13 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs15.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows15 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_5_0_0 : Fin 8 → RI := ![⟨-131587480702055847553296911351804815793742116057753537024,-131587480702055847548576203569038974503107360166538805748⟩, + ⟨6615160235433789647905209889417838062729156954275809251421,6615160235433789647908604860379468395971753557550991973604⟩, + ⟨-1442242746807410599991692534443923015669485057637475817126,-1442242746807410599920585962981072136752913559299239963500⟩, + ⟨783628801166012795002434298586263221711567096693474353569,783628801166012795028745543528978110007760857016391688450⟩, + ⟨1351668816280008548469632871183185432563757030553685951901,1351668816280008548544998377372916379623901539984287150705⟩, + ⟨903645452556859809247263742520682606302449429738982010704,903645452556859809279610060217913992662868240531012566948⟩, + ⟨-267094008327254985208940152689482777853773311648174972724,-267094008327254985152074608844215626789797151517423552226⟩, + ⟨499158347052195404862733432982234631908443640045929107982,499158347052195404894810151712441432233901586821083482184⟩] +lemma bs1_5_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 0 r = bs1_5_0_0 r := by + revert r + decide +kernel +def bs1_5_0_1 : Fin 8 → RI := ![⟨-153498876476980012100355258302225596102678980818630014339,-153498876476980012095436756091989378282531038313177737359⟩, + ⟨7319087782836330694959901655610892588796641650538753969283,7319087782836330694963438873533884865268082754539119772792⟩, + ⟨-1681165879311828357830442486510581526378182379914750936413,-1681165879311828357756356598335312858301519632748995496148⟩, + ⟨913299588517936386462911223530580079583483012303875348601,913299588517936386490324891641462974943198394307948493845⟩, + ⟨1575463358520737173485539763429699840629878715354714138971,1575463358520737173564063032784086008933679357136879608484⟩, + ⟨1053147334492528472258002822186755764097130782081816213382,1053147334492528472291704428473003110439369833202335018656⟩, + ⟨-311148189990037206479031718790634046856753414668485164637,-311148189990037206419783547550441271195888763770485256930⟩, + ⟨581595700076906892400736287584111609375312288073194635567,581595700076906892434156998890912460589096480696697024177⟩] +lemma bs1_5_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 1 r = bs1_5_0_1 r := by + revert r + decide +kernel +def bs1_5_0_2 : Fin 8 → RI := ![⟨-177135341070324758486254108043656633412208795457189520802,-177135341070324758481123242595182528927837162837025398159⟩, + ⟨7996268158583331419841205927131945419272462851816289822364,7996268158583331419844895869404811783695612044701684413230⟩, + ⟨-1938611955243654158738068922288237365379332765790436345355,-1938611955243654158660784271878480210987643700841529424167⟩, + ⟨1052991204902017468977628705853911946442730113166759265662,1052991204902017469006225997572881545815266356967214415185⟩, + ⟨1816581084051463389263987875451530918786230172552293207368,1816581084051463389345901497202644716209178692699927805921⟩, + ⟨1214192338757601236838079811375092350633077180212487687156,1214192338757601236873236531828065164908425193076545592779⟩, + ⟨-358560880573302743407412874361493033703470167019602605428,-358560880573302743345606580147015955640516214524009757488⟩, + ⟨670352515284754296902092213272284191090474708674212705334,670352515284754296936955910710611577958625886829706797947⟩] +lemma bs1_5_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 2 r = bs1_5_0_2 r := by + revert r + decide +kernel +def bs1_5_0_3 : Fin 8 → RI := ![⟨-202285827128616267849208892575638355157061573571997487063,-202285827128616267843849722500410754237055153469402054229⟩, + ⟨8631260938698065388266511647818458117173545933632451468760,8631260938698065388270365778940502246944585949184195486085⟩, + ⟨-2212241009065732639494634982981495530589280915944850042162,-2212241009065732639413911450098119941576741058138997228630⟩, + ⟨1201430129799564564369682921829499973999399292092893818518,1201430129799564564399552687769077086262462763180354836475⟩, + ⟨2072827399991184531113254164240968273271094190341784691065,2072827399991184531198812640652046922089429455829418999446⟩, + ⟨1385309416315869783173481099111657756507477845000783507855,1385309416315869783210202164219929711652074818794864171201⟩, + ⟨-408888568477985650618271519389246981267912875458445147143,-408888568477985650553715072579266237648944373252348072101⟩, + ⟨764607102845516948754382448023850553724223085470961572783,764607102845516948790797451671774106755827080574647645617⟩] +lemma bs1_5_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 3 r = bs1_5_0_3 r := by + revert r + decide +kernel +def bs1_5_0_4 : Fin 8 → RI := ![⟨-228673017848358750672356360152267709812025542061820324516,-228673017848358750666751385445251139213098139332777420571⟩, + ⟨9209524696214632314862768870970637916515534717622242304169,9209524696214632314866799776344652377423637890243355793052⟩, + ⟨-2499001463663275117933516495550594149876955466186994156601,-2499001463663275117849090482992530020118598090227497099903⟩, + ⟨1356958071595957863230082574598851860471102403774734795743,1356958071595957863261322352446234111733769138977000461668⟩, + ⟨2341342414256273266252660063418276236522683355158100465222,2341342414256273266342142779869321049513494508121754443853⟩, + ⟨1564583893498728170365242630944636018216323378978542869228,1564583893498728170403647950846411600236604974340714791112⟩, + ⟨-461557560918077389420625014465458487026075754876143513280,-461557560918077389353107610377873969360567345231360872847⟩, + ⟨863293720877290975448427502933228470476308983913882969091,863293720877290975486512723506072843698985969396587976176⟩] +lemma bs1_5_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 4 r = bs1_5_0_4 r := by + revert r + decide +kernel +def bs1_5_0_5 : Fin 8 → RI := ![⟨-255953613158882563521994476297421730927939285909197820267,-255953613158882563516124428579416818143706806831770870314⟩, + ⟨9717899020021731323122524310922173585700270106559497656432,9717899020021731323126745847704935779808817009367357502060⟩, + ⟨-2795136547400176529108903995638565601924035598237427618901,-2795136547400176529020485269727833525270402791612407910623⟩, + ⟨1517535777419313375861526518385020065936733433318995843454,1517535777419313375894243702003201127491059317709384189014⟩, + ⟨2618607209416178090243565710465089732881258499281177685686,2618607209416178090337280284207278864065166189835788561050⟩, + ⟨1749662042394615767585122958382589831585813371697500645673,1749662042394615767625344560126324375265271744180844985914⟩, + ⟨-515866080068723981847894532514964959542184347377202837348,-515866080068723981777184064670753519717497649801166010360⟩, + ⟨965105863742798690943350544723685066705283786930275344790,965105863742798690983236908855419639310359816880715561988⟩] +lemma bs1_5_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 5 r = bs1_5_0_5 r := by + revert r + decide +kernel +def bs1_5_0_6 : Fin 8 → RI := ![⟨-283721387941634905803569620402852506540013063253334514311,-283721387941634905797413225126810551404507159024688791579⟩, + ⟨10145037135137255609501123478811014697634220756509061000255,10145037135137255609505550946926341212102232717956543340244⟩, + ⟨-3096220600317800359580996866050102950229546221029222119594,-3096220600317800359488264974818564315624945320237430788341⟩, + ⟨1680763002011201280833285477060592008107787063886260224060,1680763002011201280867598641850615074977464425209971333357⟩, + ⟨2900478054949434109666430948321545476130478310343207971587,2900478054949434109764717024823522326502632699641215392516⟩, + ⟨1937774312490024135723342677424739131079460939847721980868,1937774312490024135765526334332880648106779479587311027620⟩, + ⟨-570991941200635325170517371236115627215721535816482590315,-570991941200635325096357566901740729305959154400919006257⟩, + ⟨1068509924795220724553042064347892812354635638331963826491,1068509924795220724594874130374508675764555345207241141301⟩] +lemma bs1_5_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 6 r = bs1_5_0_6 r := by + revert r + decide +kernel +def bs1_5_0_7 : Fin 8 → RI := ![⟨-311513318433581835002006011330778760632808117569718049852,-311513318433581834995539716817961763407962809021879072238⟩, + ⟨10481768518796625377854407313510004183610512177513505502139,10481768518796625377859057650516641447277624209914756138631⟩, + ⟨-3397228207228842073608291867876951468383892368697336857362,-3397228207228842073510892059621208246721993690910594634976⟩, + ⟨1843916198628679228615559410112775991835599812654320450552,1843916198628679228651599823252514576582237486774867942519⟩, + ⟨3182251283801302691136446641699427070128608059396982398564,3182251283801302691239680220550935250799376766036900737741⟩, + ⟨2125779014730864366400837445985442411879017688986235250239,2125779014730864366445144534300268954808002783155987975854⟩, + ⟨-626006285115873070874476429832079261125148228306930809204,-626006285115873070796583585994936648782177771590430937450⟩, + ⟨1171770165745562131585326703262926104885264454919108502970,1171770165745562131629264502393565571638173470376586230926⟩] +lemma bs1_5_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 7 r = bs1_5_0_7 r := by + revert r + decide +kernel +def bs1_5_0_8 : Fin 8 → RI := ![⟨-338818938103255970972176114146005968121455067385250257142,-338818938103255970965373781331739304630835393392353700085⟩, + ⟨10721374611249699389324867546416587305923415573823397093354,10721374611249699389329759550632414245277081161385539546145⟩, + ⟨-3692637605536686363033768296975275773237629999290074738486,-3692637605536686362931306846992231648784293134401018966789⟩, + ⟨2004004687201171681072976897733104945528034527574007042641,2004004687201171681110890247404292847407964963009185327648⟩, + ⟨3458760165002257483465465759847332626986562181803721447229,3458760165002257483574064147929264035056896786406126102353⟩, + ⟨2310227312521341923482624312427411759953718033740383652991,2310227312521341923529233937174972852164942008766513082225⟩, + ⟨-679893541171033963509164850204006354340507367808267014398,-679893541171033963427224096256472815897436186455274098700⟩, + ⟨1272985388320755223185066107049449776416329483552392700554,1272985388320755223231287251511770130433657464179254535938⟩] +lemma bs1_5_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 8 r = bs1_5_0_8 r := by + revert r + decide +kernel +def bs1_5_0_9 : Fin 8 → RI := ![⟨-365092909435607507220632830959637096592348430877749242534,-365092909435607507213465376526275287921797157842491785115⟩, + ⟨10859765559816823108545106301881475442308198743964654598987,10859765559816823108550260889030022108813213482918136099941⟩, + ⟨-3976567915681203991759091088352286505910032769149049598658,-3976567915681203991651129923560615086076848746638414109487⟩, + ⟨2157845027865034314421319184652857308487419812070388384235,2157845027865034314461267569068239821516324680260591660460⟩, + ⟨3724503328635848584815136798388093900241698909341070513766,3724503328635848584929564307209818762007624680849965733185⟩, + ⟨2487449185007515710140886279891315848158974085037282483077,2487449185007515710189997720136466080581488760328923979601⟩, + ⟨-731577429970127230079703641416388471816533775067406498441,-731577429970127229993364640343248052066125240331934752822⟩, + ⟨1370137031236716161848380264085586410909873643414970332958,1370137031236716161897082372000165892048081443761249792484⟩] +lemma bs1_5_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 9 r = bs1_5_0_9 r := by + revert r + decide +kernel +def bs1_5_0_10 : Fin 8 → RI := ![⟨-389770589766637150809864371456819025547946932208782550540,-389770589766637150802299355555724103770574078820358999760⟩, + ⟨10895551493448562739633625438119288276695730018605150637451,10895551493448562739639065937825934171728997489556277140269⟩, + ⟨-4242947512815845640472322460560489862789110181077082233607,-4242947512815845640358372949483418061172400816364958233264⟩, + ⟨2302152125937528591757429066481331516446742176636634754105,2302152125937528591799593291749416823334017646163330278763⟩, + ⟨3973802218568179843909430021850345507266806028950474741205,3973802218568179844030204549516489079945218005667400514601⟩, + ⟨2653658638375712629837151039162754509629681163836912550919,2653658638375712629888986572940601277610520713986565891038⟩, + ⟨-779952395862694162323682358644883079495779815218040649447,-779952395862694162232554340731197907472757438086481000823⟩, + ⟨1461147639449029131490293779336813722882912032571825694210,1461147639449029131541697276103457674501229332333860725761⟩] +lemma bs1_5_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 10 r = bs1_5_0_10 r := by + revert r + decide +kernel +def bs1_5_0_11 : Fin 8 → RI := ![⟨-412286139709617560014240228041200851055703157713138102385,-412286139709617560006241375983233732255664442904661563039⟩, + ⟨10830007623838382697710765294548593376659297249245321147958,10830007623838382697716517794324344139956696218020241957927⟩, + ⟨-4485708440055636655350941946589519420779077792745716603611,-4485708440055636655230457694725602599218609663549821972746⟩, + ⟨2433644293895472488662339178298897191174185803136607958548,2433644293895472488706921424320517610134843482967535754168⟩, + ⟨4200982793708523498785444565532138847499657249327066828623,4200982793708523498913145232893745312487949831441335116638⟩, + ⟨2805074940149135755954545221266751581417662379400685701812,2805074940149135756009353402962243105821418601795933400867⟩, + ⟨-823919419564975367138630442139426010031649820264324992315,-823919419564975367042276443264543506751554976529054236064⟩, + ⟨1543947826914661049957376938467723218251306774473646682596,1543947826914661050011728306828861239643181375822506522859⟩] +lemma bs1_5_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 11 r = bs1_5_0_11 r := by + revert r + decide +kernel +def bs1_5_0_12 : Fin 8 → RI := ![⟨-432092489621879104465529407187166877731376018100905485622,-432092489621879104457056052219304043889953702909255432306⟩, + ⟨10666938050998948096082417075878424604032480897904748606454,10666938050998948096088510821855838001376521085406313159305⟩, + ⟨-4698999355027574991960839004856502257379148353094987061097,-4698999355027574991833207461394941814410369881654174266465⟩, + ⟨2549158204646675301778594279927094827036913754830577229752,2549158204646675301825821206124803097107417636928221288673⟩, + ⟨4400574455937745694377631617641470053664225099847003381463,4400574455937745694512907664297253399677737843318954296059⟩, + ⟨2938055164788294576025526227265437237231337627124070604090,2938055164788294576083585705711287753087645091270377068376⟩, + ⟨-862424741548526830986584259649148812967919631489245144136,-862424741548526830884514408985881821914035172257606911101⟩, + ⟨1616549051862078915685494066153259847611793995391938992871,1616549051862078915743069632468919404245480904658667455565⟩] +lemma bs1_5_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 12 r = bs1_5_0_12 r := by + revert r + decide +kernel +def bs1_5_0_13 : Fin 8 → RI := ![⟨-448682265542424605313789491923633580047499973969056829947,-448682265542424605304795923387534935625234818322645768748⟩, + ⟨10412448160030378833293322131627134535641100030408141561034,10412448160030378833299789997342298604066375284611402482819⟩, + ⟨-4877407346099866295024441089820487926330180685340848745094,-4877407346099866294888973729153839598987788956716234799144⟩, + ⟨2645768519677293469823105853583813320612222252324590689821,2645768519677293469873232231992593036050613953147486463680⟩, + ⟨4567517179551123104574044450319645561002259872964434333276,4567517179551123104717625641182492894931240005134036139846⟩, + ⟨3049232018516796435688159574693639866694234699943059180445,3049232018516796435749783559591686252062804390170178460210⟩, + ⟨-894499674485315612361906320039866302983946188536348121086,-894499674485315612253569987986704346984478390466736365041⟩, + ⟨1677118831181533219107471052250698693463087350679648814242,1677118831181533219168581415693286180021073507546383232204⟩] +lemma bs1_5_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 13 r = bs1_5_0_13 r := by + revert r + decide +kernel +def bs1_5_0_14 : Fin 8 → RI := ![⟨-461608606242779349450606383185855861369168697386568731425,-461608606242779349441041080815748501845288957622832427938⟩, + ⟨10074639712101231688733492725868008797280532183000308671508,10074639712101231688740371762927214761658809331208233570916⟩, + ⟨-5016177313839856654337694432591149808299809379011406140275,-5016177313839856654193615220779517749369715861699646843967⟩, + ⟨2720906105547114802631805460202519127236200160278503820477,2720906105547114802685118443172186467974617090929487016416⟩, + ⟨4697366296307425564267960084084251090148337742590035596268,4697366296307425564420668933719230810737985172603245577559⟩, + ⟨3135649918750056796283372279541375272681767489589479391955,3135649918750056796348913788058016025162332974294491835280⟩, + ⟨-919299444436749040831401393247563980216954417891169988612,-919299444436749040716177967797547669523919374715724017768⟩, + ⟨1724054526156944146252142985933605137379206607576407381937,1724054526156944146317138221354200979204756245484944159498⟩] +lemma bs1_5_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 14 r = bs1_5_0_14 r := by + revert r + decide +kernel +def bs1_5_0_15 : Fin 8 → RI := ![⟨-470504701793031136469133940296953210627045144391980875986,-470504701793031136458938670952977864695381847166533052224⟩, + ⟨9663246036062871142990149122824452530746992336303945999773,9663246036062871142997481210502559903934514798071930028205⟩, + ⟨-5111416725875990083061073947738887063280259766196139190332,-5111416725875990082907505736881742573324322324327454403679⟩, + ⟨2772468289558799763561660316609209720894516868546373666261,2772468289558799763618484471233841255021240576202872806970⟩, + ⟨4786483573481217567698623810074764793747342973634548501080,4786483573481217567861390003237676096869946369170587028355⟩, + ⟨3194891784151943961981934468769432919481890192808520214860,3194891784151943962051792514724092410483215217932992834181⟩, + ⟨-936138912367481987611424497107724781407832523863656173529,-936138912367481987488612503117880210686737722271428756514⟩, + ⟨1756051609783784328187656801530978758397121712995947361303,1756051609783784328256932597062365593904462942293365449955⟩] +lemma bs1_5_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 15 r = bs1_5_0_15 r := by + revert r + decide +kernel +def bs1_5_0_16 : Fin 8 → RI := ![⟨-475100870588158545960299102309523650890196856116713129265,-475100870588158545949407849785077820425351557699263056781⟩, + ⟨9189227003856406139199452215474197316747596028745661149779,9189227003856406139207284830360449430016620151874902325880⟩, + ⟨-5160273590566037931413052143464855849180600407129278777010,-5160273590566037931249000551717736610804493113506145066312⟩, + ⟨2798914639526781929325622969028349506564599748075074490588,2798914639526781929386326241951231017019622188662369328410⟩, + ⟨4832203267186392784662714227646014730471269834859362905442,4832203267186392784836591704774590891781434541343635670353⟩, + ⟨3225189046018767625216787146183451407941427241152031203068,3225189046018767625291414073015008372367762356441653981544⟩, + ⟨-944523108465817704362491309407786154654940420390507860320,-944523108465817704231295517081535529249867703140641444613⟩, + ⟨1772162421156279173524583108081804754416239756791639485362,1772162421156279173598588036986338255681035332051758973407⟩] +lemma bs1_5_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 16 r = bs1_5_0_16 r := by + revert r + decide +kernel +def bs1_5_0_17 : Fin 8 → RI := ![⟨-475238076232834816428223704516416609350784451752498115499,-475238076232834816416561395836183251318683806242331660743⟩, + ⟨8664344569617200637948572051985083947554343908700108150582,8664344569617200637956959183985835259232054449678364032815⟩, + ⟨-5161076523277278118122099179258434190612382526137624986052,-5161076523277278117946433405451343967438709556807054089601⟩, + ⟨2799342315840506923671700511489814584769962031752550042913,2799342315840506923736701327983941527999264958743339074674⟩, + ⟨4832962799245896621153121262209120544826633831944907188588,4832962799245896621339308553914848661544698193212547063029⟩, + ⟨3225508054836563001477637977812685553399376497700391980205,3225508054836563001557548185992930772519032576167541542050⟩, + ⟨-944170757719312724361490403106681259228147725769616194640,-944170757719312724221006485007455247817507480873528842276⟩, + ⟨1771841830033682265563421782183146514759061046884158760475,1771841830033682265642665957525265781520159960853733606687⟩] +lemma bs1_5_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 17 r = bs1_5_0_17 r := by + revert r + decide +kernel +def bs1_5_0_18 : Fin 8 → RI := ![⟨-470876966565264860204384129701712283400862669148272614793,-470876966565264860191865112038883939119213958375155755729⟩, + ⟨8100739477249035745425983855557836957949558386198790537086,8100739477249035745434987103245392883812112039602028077921⟩, + ⟨-5113427746970534278894104988353804042554657424233192084858,-5113427746970534278705534870263146148549017950074556841284⟩, + ⟨2773536105746129998959662840486380349214515703332869900035,2773536105746129999029438593478953808664630885797669699065⟩, + ⟨4788389542698769209928576440763723177805463742758844093623,4788389542698769210128440983656851931110358591354048579933⟩, + ⟨3195607289181928347143634047643591377847738010769136298231,3195607289181928347229414430849436685157076580909185711240⟩, + ⟨-935029362567598547101538062361246863347023546988778656881,-935029362567598546950734246390321694755360121306762417461⟩, + ⟨1754976941171936405643789531540044608848191043086610126596,1754976941171936405728854955375429570648497918198848772842⟩] +lemma bs1_5_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 18 r = bs1_5_0_18 r := by + revert r + decide +kernel +def bs1_5_0_19 : Fin 8 → RI := ![⟨-462101780961514720442929906471541277612650473074361557296,-462101780961514720429456116759462236521595596280703815606⟩, + ⟨7510528230613931161894504121631018108549366990557383944228,7510528230613931161904194008596098523114607790189079910867⟩, + ⟨-5018242613182176328604322097456041400882421582938600200118,-5018242613182176328401370541226954322287776660426722050780⟩, + ⟨2721989720787699825797724914570619916496740108908942514249,2721989720787699825872822166459949387435803871339834174652⟩, + ⟨4699337755639018797703145306883150061010969716585273741607,4699337755639018797918252665492673541267968594946862472578⟩, + ⟨3136061472780634231371200205266919018987280864686102904849,3136061472780634231463522692212275949881390411347219191552⟩, + ⟨-917280899152403820404866827018309662246508452002243198491,-917280899152403820242561847596253814165112684004330667052⟩, + ⟨1721898897979360557960091971499236083824351072109741051488,1721898897979360558051644972173453884084977976512095716133⟩] +lemma bs1_5_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 19 r = bs1_5_0_19 r := by + revert r + decide +kernel +def bs1_5_0_20 : Fin 8 → RI := ![⟨-449118795123619809053239156936986955050145673495589380617,-449118795123619809038697910433922988028606297428094804324⟩, + ⟨6905436724355365165396907834488494242004632743156482227443,6905436724355365165407365399728524947456000396158770753572⟩, + ⟨-4877732502099589530818681721860034604220377367293578939312,-4877732502099589530599651391836719810644944416092915933118⟩, + ⟨2645896685696968011892128305384305755890515847145900069977,2645896685696968011973175113652139241504428194930648868692⟩, + ⟨4567872744454067917511922873650361714326183906496514054165,4567872744454067917744072045709409497275247533998989802663⟩, + ⟨3048250715618277185924665888086938642867207996770119115474,3048250715618277186024302595290026294946276824498556869144⟩, + ⟨-891337733713873117200122105045105486427732018110771828558,-891337733713873117024958564210846908509411397912542366681⟩, + ⟨1673375914194660186607836193836285140155446501020785839524,1673375914194660186706642452457329735299604569671640039698⟩] +lemma bs1_5_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) 20 r = bs1_5_0_20 r := by + revert r + decide +kernel +def bs1_5_0 : Fin 21 → Fin 8 → RI := ![bs1_5_0_0,bs1_5_0_1,bs1_5_0_2,bs1_5_0_3,bs1_5_0_4,bs1_5_0_5,bs1_5_0_6,bs1_5_0_7,bs1_5_0_8,bs1_5_0_9,bs1_5_0_10,bs1_5_0_11,bs1_5_0_12,bs1_5_0_13,bs1_5_0_14,bs1_5_0_15,bs1_5_0_16,bs1_5_0_17,bs1_5_0_18,bs1_5_0_19,bs1_5_0_20] +lemma bs1_5_0_mem (d : Fin 21) (r : Fin 8) : (bs1_5_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 5 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_0) d r = bs1_5_0 d r := by + fin_cases d + · exact bs1_5_0_0_calc r + · exact bs1_5_0_1_calc r + · exact bs1_5_0_2_calc r + · exact bs1_5_0_3_calc r + · exact bs1_5_0_4_calc r + · exact bs1_5_0_5_calc r + · exact bs1_5_0_6_calc r + · exact bs1_5_0_7_calc r + · exact bs1_5_0_8_calc r + · exact bs1_5_0_9_calc r + · exact bs1_5_0_10_calc r + · exact bs1_5_0_11_calc r + · exact bs1_5_0_12_calc r + · exact bs1_5_0_13_calc r + · exact bs1_5_0_14_calc r + · exact bs1_5_0_15_calc r + · exact bs1_5_0_16_calc r + · exact bs1_5_0_17_calc r + · exact bs1_5_0_18_calc r + · exact bs1_5_0_19_calc r + · exact bs1_5_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 5 0 tr1_5_0_mem) d r +lemma bs1_5_0_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 5 0) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs1_5_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_5_0_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_5_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_5_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 1 5 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 5 0) _ bs1_5_0_lower e he hτ +def bs1_5_1_0 : Fin 8 → RI := ![⟨-131587480702055847553296911351804815793742116057753537024,-131587480702055847548576203569038974503107360166538805748⟩, + ⟨6615160235433789647905209889417838062729156954275809251423,6615160235433789647908604860379468395971753557550991973604⟩, + ⟨-1442242746807410599991692534443923015669485057637475817124,-1442242746807410599920585962981072136752913559299239963500⟩, + ⟨783628801166012795002434298586263221711567096693474353567,783628801166012795028745543528978110007760857016391688450⟩, + ⟨1351668816280008548469632871183185432563757030553685951899,1351668816280008548544998377372916379623901539984287150705⟩, + ⟨903645452556859809247263742520682606302449429738982010702,903645452556859809279610060217913992662868240531012566948⟩, + ⟨-267094008327254985208940152689482777853773311648174972722,-267094008327254985152074608844215626789797151517423552226⟩, + ⟨499158347052195404862733432982234631908443640045929107980,499158347052195404894810151712441432233901586821083482184⟩] +lemma bs1_5_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 0 r = bs1_5_1_0 r := by + revert r + decide +kernel +def bs1_5_1_1 : Fin 8 → RI := ![⟨-124283682110414459371010060510821347867267556675540559821,-124283682110414459366223421252232047733461738579579979977⟩, + ⟨6380517719632942632220265218366365906297047221946433318361,6380517719632942632223707604981783553949258658796677067649⟩, + ⟨-1362601702639271347379768989325842775153283033154223972909,-1362601702639271347307669312292185966516681118540148257071⟩, + ⟨740405205382038264515241182548768266733087917596288751769,740405205382038264541919901880872490717122218479591356772⟩, + ⟨1277070635533099006796611319379462222793831091502821799306,1277070635533099006873029413290744910268527645050611088348⟩, + ⟨853811491911636921576565619768986233710282232181874526800,853811491911636921609363700329222940064641123083401166055⟩, + ⟨-252409281106327578119703839787407563051742774230487737821,-252409281106327578062044086810498537122137117177320154922⟩, + ⟨471679229377291575682951150589410955790045342087391260649,471679229377291575715475866845149106411612037478661639655⟩] +lemma bs1_5_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 1 r = bs1_5_1_1 r := by + revert r + decide +kernel +def bs1_5_1_2 : Fin 8 → RI := ![⟨-117171557831930913615261043313283464051969991724181252523,-117171557831930913610406853822118759504469722145644346338⟩, + ⟨6142903295870368914071610825684671339243641545729789733656,6142903295870368914075101792108155428496897103728410699611⟩, + ⟨-1285018763296399655108831720175651126669575793515239938654,-1285018763296399655035714554735402755295728454963587483462⟩, + ⟨698295035046081233034074795108941646086534425749379030195,698295035046081233061130011101537283197220293872536482422⟩, + ⟨1204397252929522530763872125328551976367264016051574411304,1204397252929522530841368650209394449576011696606985663730⟩, + ⟨805260100414125600746905042519763575422700039712304517463,805260100414125600780165977673862213765586646436110667652⟩, + ⟨-238097721543231650548055259048633205787905197849556863906,-238097721543231650489581797431264674125425509337268179379⟩, + ⟨444902274167180626165763653872842346810346352192603695782,444902274167180626198747366937993234924248545053728267324⟩] +lemma bs1_5_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 2 r = bs1_5_1_2 r := by + revert r + decide +kernel +def bs1_5_1_3 : Fin 8 → RI := ![⟨-110258924435252388762412302002828485540514998250663753423,-110258924435252388757488892686123538429659828879599851844⟩, + ⟨5902888831700762065099343380596893135802634572990859623561,5902888831700762065102884127542381739502930915474932326597⟩, + ⟨-1209580594169060536631471746753068598115939068551554992839,-1209580594169060536557311944340181577241302061136953272366⟩, + ⟨657345457584759903454375735287307683340851138997702026477,657345457584759903481816753551222815162496161239272705628⟩, + ⟨1133729949687094033878515330881437862890017659416388704323,1133729949687094033957116941573595012130120998794323412631⟩, + ⟨758045761361963191936578462849428351603330982010226801881,758045761361963191970313692658277540039882987593963772635⟩, + ⟨-224175755993488163433839915438147611339102624376702683637,-224175755993488163374532633299581176952477538858122519967⟩, + ⟨418857914378537395926445366369557126361445289792879937746,418857914378537395959899420954784996413652139782506392764⟩] +lemma bs1_5_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 3 r = bs1_5_1_3 r := by + revert r + decide +kernel +def bs1_5_1_4 : Fin 8 → RI := ![⟨-103552780347667767354812961739816653538408378157534237616,-103552780347667767349818609871618773088052968270279251520⟩, + ⟨5661057293407344374831331911703253350096594018330561999979,5661057293407344374834923678096105182494120745573761568808⟩, + ⟨-1136365075319400075536740739259243286895536044083443427915,-1136365075319400075461512350981793262347664862850159064708⟩, + ⟨617598890164248919026744016016344610046556908048951468056,617598890164248919054580438303393503855915386374999559464⟩, + ⟨1065141793453225655967530415872164468340892516298148487893,1065141793453225656047264615478861476740549188499714821426⟩, + ⟨712217481205473489446290352050717969402208144084757336503,712217481205473489480511680642753969778797777454896813445⟩, + ⟨-210658203637470638293259233187659368372325304425643219445,-210658203637470638233097378608334385924184086178534486534⟩, + ⟨393573569979744339359323048321735709619755087675440467396,393573569979744339393259150170834797599502723902583655486⟩] +lemma bs1_5_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 4 r = bs1_5_1_4 r := by + revert r + decide +kernel +def bs1_5_1_5 : Fin 8 → RI := ![⟨-97059304677400442104756691188588942876835895454374282387,-97059304677400442099689618515574097768870292536514789905⟩, + ⟨5418000762385225808461176508343725898624413228120238138424,5418000762385225808464820573042678713148534603868202887749⟩, + ⟨-1065441275073806261203782698724993358331425713698631036007,-1065441275073806261127458939299315618176951500552743632517⟩, + ⟨579092984011930951213137509587347435126681505776112964474,579092984011930951241379247135619715245043079745689524231⟩, + ⟨998697612486590547143100847064742283382866418305131035966,998697612486590547223996025176705949135500110057640364374⟩, + ⟨667818770739479728752010512517631739412342718310629514044,667818770739479728786730124495168306418953913133590027478⟩, + ⟨-197558267854281300617884654289376031980972647236186580547,-197558267854281300556846806468217910609815296298165131411⟩, + ⟨369073634418807947903763189501077677235307425217941175590,369073634418807947938193421660559146712943185086458013753⟩] +lemma bs1_5_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 5 r = bs1_5_1_5 r := by + revert r + decide +kernel +def bs1_5_1_6 : Fin 8 → RI := ![⟨-90783859838420247622606568997156797992268897144791701720,-90783859838420247617464939240715557893501835141719572739⟩, + ⟨5174318383762665325948720062543598206406830894606951200172,5174318383762665325952417746137182825245269644278918666413⟩, + ⟨-996869464615465253808164803538352294853360158610775313819,-996869464615465253730718013663729492168392787795949385638⟩, + ⟨541860630904073053246240631909848718218892281539370223216,541860630904073053274897919366034508963476917997115166000⟩, + ⟨934454008163066912791565783169138248371057691131656794372,934454008163066912873651255743480848264950660943674100963⟩, + ⟨624887651893542220465227914169590105248211692726324798605,624887651893542220500458391724540418604032619107019457232⟩, + ⟨-184887535252672918967050389885134035736561083581870984646,-184887535252672918905114429049735528816312930627526879522⟩, + ⟨345379475322344476479598909970190830884975949699489164728,345379475322344476514535749762349175350435821779699799554⟩] +lemma bs1_5_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 6 r = bs1_5_1_6 r := by + revert r + decide +kernel +def bs1_5_1_7 : Fin 8 → RI := ![⟨-84730997842361774861694823141155212774242868218725362046,-84730997842361774856476739389652531106192576335274701558⟩, + ⟨4930614256682098797986689033291475835411381748016967205935,4930614256682098797990441699973413381778095398589343561895⟩, + ⟨-930701172233833421390651636896606908412636349973030710755,-930701172233833421312053243975679085698747476242565093314⟩, + ⟨505929991104850476805140727148482620955993988238314805203,505929991104850476834224137102322628964113500346280844973⟩, + ⟨872459404559551108529755212307973439971201083134801120444,872459404559551108613061263300437408225909193757130885642⟩, + ⟨583456689301613403289365368539917863148076632911200212272,583456689301613403325119709322045950530577623900334863437⟩, + ⟨-172655982143051517438127394649765078182979118790160175479,-172655982143051517375270470643604040783857303287209320818⟩, + ⟨322509448999401772792393579170971842141583575466707870706,322509448999401772827849915913208621114696283205075864021⟩] +lemma bs1_5_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 7 r = bs1_5_1_7 r := by + revert r + decide +kernel +def bs1_5_1_8 : Fin 8 → RI := ![⟨-78904470101581663832001622223796597229869644783896098988,-78904470101581663826705124208310513386662952407657538801⟩, + ⟨4687495276227423866780469886494204631048990434130599466496,4687495276227423866784278946022601722036491858614038307928⟩, + ⟨-866979275660657822872987525126623620234050812502210815724,-866979275660657822793208002230676984704334311772191841907⟩, + ⟨471324541918922873016107485788031159679659810644194250125,471324541918922873045627943956206381328939429637798063205⟩, + ⟨812754133656739303980464672711431278166753758322911114129,812754133656739304065022597568878285225960046641391419928⟩, + ⟨543553045689342591695209302219889456989828864255965353591,543553045689342591731500938003464751530372808717526450649⟩, + ⟨-160871988189475637673714061991496502661834189738317669429,-160871988189475637609912561457543233627881837526454572469⟩, + ⟨300478928242112508665457176867897248597978872256860418673,300478928242112508701446330383793455256573702718339036597⟩] +lemma bs1_5_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 8 r = bs1_5_1_8 r := by + revert r + decide +kernel +def bs1_5_1_9 : Fin 8 → RI := ![⟨-73307240568864675808600814392378775358726901168131853629,-73307240568864675803223875638795615645309626604540268692⟩, + ⟨4445568937490986932503735513399297981873180399297083478874,4445568937490986932507602423144762082340138387564031900485⟩, + ⟨-805738130715920669662193355832311882682349086904450442853,-805738130715920669581202178804163496512799109562758359926⟩, + ⟨438063145907792885272208023441811954979791145920413057749,438063145907792885302176824540970394355024169406511729187⟩, + ⟨755370554508861463322215463071179621259365299922109056239,755370554508861463408057614198032603902178219727154481265⟩, + ⟨505198559987331452483321150912489439369659015542074534700,505198559987331452520163967110147340762085480472200076002⟩, + ⟨-149542356939064372836707728826913072618105689555198730125,-149542356939064372771937240901830715280533852106934535796⟩, + ⟨279300342840319352187287949647591636806565766710765071885,279300342840319352223823689618124805695075591926200150712⟩] +lemma bs1_5_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 9 r = bs1_5_1_9 r := by + revert r + decide +kernel +def bs1_5_1_10 : Fin 8 → RI := ![⟨-67941502022908351428403987402571755313458841955028784843,-67941502022908351422944512252457185495708946880999188451⟩, + ⟨4205441112715954216193719052955638443702058103223406717483,4205441112715954216197645320043765122327437376183160287760⟩, + ⟨-747003734303022341407370166957910284785411580414315044599,-747003734303022341325135769538203711191583851032839084553⟩, + ⟨406160137720096407528793458009992282035594687445908231871,406160137720096407559222282361164026523704281447055861015⟩, + ⟨700333204555894881091983811305564933126676637574203696905,700333204555894881179143645625227153809255703581880070140⟩, + ⟨468409846962421094453628959739699673018474958087273063169,468409846962421094491037315815450751163746780125259627180⟩, + ⟨-138672342888668066526517474468666355968625180789115473835,-138672342888668066460752754896288046448916665356083880385⟩, + ⟨258983232159928809512288134109958575250335580264216575290,258983232159928809549384700316374339261108313266325648980⟩] +lemma bs1_5_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 10 r = bs1_5_1_10 r := by + revert r + decide +kernel +def bs1_5_1_11 : Fin 8 → RI := ![⟨-62808695294558251501973947204272971750032865843845971697,-62808695294558251496429767696446529822612326939564051200⟩, + ⟨3967713812820575405442929612628830259093005981293438797717,3967713812820575405446916796182867718951705063252853200604⟩, + ⟨-690793919631681086270282487920221071847315423286677111283,-690793919631681086186772214775541325954062793442826780850⟩, + ⟨375625428398356997994708627429454785940720410728492731604,375625428398356998025609558338847451437963469689361520986⟩, + ⟨647658981102958506176052288807906805386086013181581210906,647658981102958506264564417548032335118999311107734367746⟩, + ⟨433198417057254174539648855962996932382511184791154073497,433198417057254174577637606799696710213839313678314601936⟩, + ⟨-128265684715306859483988084048140092268299296573117016896,-128265684715306859417203017614983244219419166404797170023⟩, + ⟨239534309075273140223878251622242861768212287220377266898,239534309075273140261550375135431883001037810231596600160⟩] +lemma bs1_5_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 11 r = bs1_5_1_11 r := by + revert r + decide +kernel +def bs1_5_1_12 : Fin 8 → RI := ![⟨-57909531216878148804345226436077764100327606341703622103,-57909531216878148798714099040290275343182359469685767154⟩, + ⟨3732982944904086581167298854715723976027891201829700687391,3732982944904086581171348568205600114430885182044616920978⟩, + ⟨-637118581410103726499419225123261937610305291018603627353,-637118581410103726414599282646521577021955178662294232243⟩, + ⟨346464625949970387609150154214513813063975353411529102825,346464625949970387640535696178624483907305690319054205560⟩, + ⟨597357350863047536671804442354597501269599655963989152886,597357350863047536761704683193520590548114873464996435060⟩, + ⟨399570815041359368205298501869195499059624590304901216855,399570815041359368243883020149406162541582581000985317062⟩, + ⟨-118324644267940649042971215955507115897351869340756477379,-118324644267940648975138777144722225122245957982557965053⟩, + ⟨220957534494502736712212134863995787185947981751410760441,220957534494502736750475060238816230693773592057454656184⟩] +lemma bs1_5_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 12 r = bs1_5_1_12 r := by + revert r + decide +kernel +def bs1_5_1_13 : Fin 8 → RI := ![⟨-53244015072539479219839870301665805892104290182719668634,-53244015072539479214119472495211087349964042286414449130⟩, + ⟨3501836077544147696525607908102310756632892638729308752388,3501836077544147696529721821806616491431996358462312970715⟩, + ⟨-585979928635322919092055374837812652062041511225333326805,-585979928635322919005890779582805308760347728810498150449⟩, + ⟨318679170908473575891238994427886049359834554807199435652,318679170908473575923122092214031603610991396279834067729⟩, + ⟨549430585353350462403850429386838604904174533061999912576,549430585353350462495175861107537374952099354198506410107⟩, + ⟨367528776005098988849111455749717596714988092079300736205,367528776005098988888307655412784884683015546609402952241⟩, + ⟨-108850050893729196497783826303511470056989734023609130110,-108850050893729196428876038056820767728988524171804444946⟩, + ⟨203254201674186631090215648989322085133297506668203069004,203254201674186631129085157526167271120232909332638579874⟩] +lemma bs1_5_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 13 r = bs1_5_1_13 r := by + revert r + decide +kernel +def bs1_5_1_14 : Fin 8 → RI := ![⟨-48811473304690002692905690831351990779176948183819425544,-48811473304690002687093617508832930309552308176266618950⟩, + ⟨3274850225818102982643805919998593857040074140775096569460,3274850225818102982647985763586556098382987157577438790164⟩, + ⟨-537372762522230831615729615517747979336214463798393412864,-537372762522230831528184140120557479171765876049856803968⟩, + ⟨292266485562525960176211632635409551424033719069539026072,292266485562525960208605691292184514466485839812570976949⟩, + ⟨503874019852134884034086639889887506559339402187045166280,503874019852134884126875659697617071832479193883507608149⟩, + ⟨337069397171047396664992141481525967657583937317299935774,337069397171047396704816502323883276056423892438172628249⟩, + ⟨-99841350652135878935446618191242247635377049551985397359,-99841350652135878865434508661059559396253318771582891925⟩, + ⟨186423029484939098589676295329514295500452870103025752480,186423029484939098629168729469579034913353166572949984656⟩] +lemma bs1_5_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 14 r = bs1_5_1_14 r := by + revert r + decide +kernel +def bs1_5_1_15 : Fin 8 → RI := ![⟨-44610582252373701553640617333226263472848212854089739217,-44610582252373701547734377039036824413966206334522528393⟩, + ⟨3052589668011305513133830569158489890554811105205346089897,3052589668011305513138078134399441132186750338197020287601⟩, + ⟨-491284777047487674627709772319374889741242492694690669424,-491284777047487674538745888749408808982058744234154954867⟩, + ⟨267220135494350232763617627188618729020038073301967921576,267220135494350232796536533044460191230608756049777218152⟩, + ⟨460676333562344052071882102547204411181421460753218277167,460676333562344052166174486217447958085344547568135893806⟩, + ⟨308185323955578411183913718999943210999006003785199689738,308185323955578411224383312490167225595570804575937780339⟩, + ⟨-91296659955021246632913214097206508672988125203863649035,-91296659955021246561766771263196989438026571044957480679⟩, + ⟨170460263763974328692776609495414515212674664269645475392,170460263763974328732908898420588304390525650867153375830⟩] +lemma bs1_5_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 15 r = bs1_5_1_15 r := by + revert r + decide +kernel +def bs1_5_1_16 : Fin 8 → RI := ![⟨-40639398668658059442414128652436725901553968807132243283,-40639398668658059436411139624811433117510426316958692371⟩, + ⟨2835603805912680792960514289455792128005867255303322668691,2835603805912680792964831433064154236453004618044401938340⟩, + ⟨-447696879543583451906867811315639783734512000737583390635,-447696879543583451816446631288361851081794769212395989757⟩, + ⟨243530002046357064850060001119307104177991255370711278438,243530002046357064883518143831303454379425244899239395913⟩, + ⟨419819848589097222736885040591309415570426885920205722530,419819848589097222832722005626030747944891112578155062179⟩, + ⟨280864948686304806411094978686593885731959667754122426793,280864948686304806452227495071600949343354900034398344997⟩, + ⟨-83212823160200671433816333333421339166114265331567441313,-83212823160200671361504457349207165516384067585042308096⟩, + ⟨155359785872870757820198736275915275340330275181100822853,155359785872870757860988422789054869614578492053311211561⟩] +lemma bs1_5_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 16 r = bs1_5_1_16 r := by + revert r + decide +kernel +def bs1_5_1_17 : Fin 8 → RI := ![⟨-36895391778794088041363774116261848303619662765528879712,-36895391778794088035261360130978199744036223611214572655⟩, + ⟨2624425080439242484273921093983475441107097731676818613934,2624425080439242484278309740607826182250790069741855585704⟩, + ⟨-406583528760062402312479352644686658517704818726120656627,-406583528760062402220560565016582706964130255843139759484⟩, + ⟨221182464323878658515640874833759792330636245195718202804,221182464323878658549653170553110003536617071243814381325⟩, + ⟨381280845320476792340288931026377094508564468466954319049,381280845320476792437713203008789032114487316426228187070⟩, + ⟨255092620368039594370643485418073356853111768622922537630,255092620368039594412457262202095178493122113743369208001⟩, + ⟨-75585473639685599874668484579879089456087031221397298015,-75585473639685599801158937706368627502464373356631155758⟩, + ⟨141113227569256217812894434604536863596824210224635514148,141113227569256217854359703371076398566133737572574076784⟩] +lemma bs1_5_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 17 r = bs1_5_1_17 r := by + revert r + decide +kernel +def bs1_5_1_18 : Fin 8 → RI := ![⟨-33375476636882165098563415107965205728927819455746633006,-33375476636882165092358801108957117473732399976080066993⟩, + ⟨2419566954077307458226191000000282096501472910507675385589,2419566954077307458230653145365667930817951543825755142282⟩, + ⟨-367913087812234551572131998585231252757212291923704383421,-367913087812234551478673803539081515085982249807782539240⟩, + ⟨200160589342807101127714714773864004818153794910077033426,200160589342807101162296630499005433528590401441998930288⟩, + ⟨345029891803343952652224006735216813785531049357394225901,345029891803343952751279889086488147903350666779440882464⟩, + ⟨230848863890500215297217276386524628611557480452422917488,230848863890500215339731328270170854278370188210257725458⟩, + ⟨-68409097841821691327953173469090521561407534069512700358,-68409097841821691253212527440942414604969700114309426283⟩, + ⟨127710091299271768827145337671346938010895789288705014995,127710091299271768869305044908825430475315009159556396245⟩] +lemma bs1_5_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 18 r = bs1_5_1_18 r := by + revert r + decide +kernel +def bs1_5_1_19 : Fin 8 → RI := ![⟨-30076048542519543289623073089721014631649196015121373032,-30076048542519543283313380592967232355784689820110480623⟩, + ⟨2221521971279875465115495242397666813353701225437029085581,2221521971279875465120032956610968551079436355364111884212⟩, + ⟨-331648189461355002406776724407027504139054734983600421938,-331648189461355002311735764222089361927188898967858675198⟩, + ⟨180444328942812578428247469496062900735474594586857681358,180444328942812578463415048689469317605619671517374430142⟩, + ⟨311032184727299391177493998296330012901423393970527315662,311032184727299391278227445651929115164351439339725236690⟩, + ⟨208110607084291519930721950824408905601296958222401976161,208110607084291519973956001197250963076448490702611862227⟩, + ⟨-61677101868566958817595939029794894408221192397442673324,-61677101868566958741589519690757301590496899739270008741⟩, + ⟨115137875023127513422388883385943535065009380245964092886,115137875023127513465262588094105422034819032823330312560⟩] +lemma bs1_5_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 19 r = bs1_5_1_19 r := by + revert r + decide +kernel +def bs1_5_1_20 : Fin 8 → RI := ![⟨-26993018283626202819068209159920356093719518832800705893,-26993018283626202812650451416004571566312040915744237970⟩, + ⟨2030759907519520462941593572329166947770527959918770594286,2030759907519520462946209003358020428201396721643433701451⟩, + ⟨-297746111212844309747174302893285959260243909674336984191,-297746111212844309650505589080422704259618681270131925976⟩, + ⟨162010722108953646759622690014169688937682663478729585389,162010722108953646795392579564211994072260146865788520432⟩, + ⟨279247899668991114400219517331007545595046611802510987166,279247899668991114502678212769821861890433326488858821226⟩, + ⟨186851414056916354297017048323951565878749930666031515327,186851414056916354340991562410689417124616328226310514146⟩, + ⟨-55381880094969244554720963584208969995056419576093276495,-55381880094969244477412792615423385280154276871392721904⟩, + ⟨103382200698355714856744484552513567896366265820099913919,103382200698355714900352481383209926969638324579856079110⟩] +lemma bs1_5_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) 20 r = bs1_5_1_20 r := by + revert r + decide +kernel +def bs1_5_1 : Fin 21 → Fin 8 → RI := ![bs1_5_1_0,bs1_5_1_1,bs1_5_1_2,bs1_5_1_3,bs1_5_1_4,bs1_5_1_5,bs1_5_1_6,bs1_5_1_7,bs1_5_1_8,bs1_5_1_9,bs1_5_1_10,bs1_5_1_11,bs1_5_1_12,bs1_5_1_13,bs1_5_1_14,bs1_5_1_15,bs1_5_1_16,bs1_5_1_17,bs1_5_1_18,bs1_5_1_19,bs1_5_1_20] +lemma bs1_5_1_mem (d : Fin 21) (r : Fin 8) : (bs1_5_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 5 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 5 tr1_5_1) d r = bs1_5_1 d r := by + fin_cases d + · exact bs1_5_1_0_calc r + · exact bs1_5_1_1_calc r + · exact bs1_5_1_2_calc r + · exact bs1_5_1_3_calc r + · exact bs1_5_1_4_calc r + · exact bs1_5_1_5_calc r + · exact bs1_5_1_6_calc r + · exact bs1_5_1_7_calc r + · exact bs1_5_1_8_calc r + · exact bs1_5_1_9_calc r + · exact bs1_5_1_10_calc r + · exact bs1_5_1_11_calc r + · exact bs1_5_1_12_calc r + · exact bs1_5_1_13_calc r + · exact bs1_5_1_14_calc r + · exact bs1_5_1_15_calc r + · exact bs1_5_1_16_calc r + · exact bs1_5_1_17_calc r + · exact bs1_5_1_18_calc r + · exact bs1_5_1_19_calc r + · exact bs1_5_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 5 1 tr1_5_1_mem) d r +lemma bs1_5_1_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 5 1) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs1_5_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_5_1_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_5_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_5_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 1 5 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 5 1) _ bs1_5_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/Signs16.lean b/lean/OAI/Analysis/Triangular/Signs/Signs16.lean new file mode 100644 index 0000000000000000000000000000000000000000..41ec5783de5d23dcf812299fb99b63a9a757eb26 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/Signs16.lean @@ -0,0 +1,549 @@ +import OAI.Analysis.Triangular.Signs.SignBase +import OAI.Analysis.Triangular.Taylor.TaylorRows16 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval +def bs1_6_0_0 : Fin 8 → RI := ![⟨-74541206746406249598923412993462138866580890752299198333,-74541206746406249596331580683104443775957504504680772236⟩, + ⟨8433633009406306648163801054470921070999191506226784427020,8433633009406306648165665011283364572539639966352888621467⟩, + ⟨-828684848786432567776334588926587363637824758386380370268,-828684848786432567737294614863868587561096436889962063709⟩, + ⟨451748043174978794916628641286437667624973820754943414112,451748043174978794931074427364559221799604004398385604112⟩, + ⟨777934673149641413096024282507909434665669072000515354108,777934673149641413137402559456746262862125081676017801447⟩, + ⟨521021863092228098981188792934788609028759080204465104019,521021863092228098998948043281489560335425286904902023399⟩, + ⟨-154648778034000800826257437332815722246535215603516484980,-154648778034000800795036281381346138082623561773501451952⟩, + ⟨288546023285045339344242740313954962053254922555760856067,288546023285045339361853971476981407211214170196362682904⟩] +lemma bs1_6_0_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 0 r = bs1_6_0_0 r := by + revert r + decide +kernel +def bs1_6_0_1 : Fin 8 → RI := ![⟨-72519583658190886067089073249084086844174097602763686672,-72519583658190886064462176654409577864693488150259014597⟩, + ⟨8031800360861946617357016630521714181403875184523071124547,8031800360861946617358905804363577100988046833156265725916⟩, + ⟨-805852374846297727541050088853441732358456541156578134423,-805852374846297727501481952245343874758329038701038686229⟩, + ⟨439253876564845813752695633638046087291081447854552503978,439253876564845813767336853328224587350324978303173440750⟩, + ⟨756458991150259631155996473076009986626649702794629840227,756458991150259631197934546915119732220286364573845856416⟩, + ⟨506613151716035623858662386562839041587066337890096995425,506613151716035623876661897593440983464899846900846725554⟩, + ⟨-150366521861227353307337373773116994424846149253322641177,-150366521861227353275693834211212810953816062702938497930⟩, + ⟨280557973555519452382960674578450739183548708442107577469,280557973555519452400810163908950442976258934414874495369⟩] +lemma bs1_6_0_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 1 r = bs1_6_0_1 r := by + revert r + decide +kernel +def bs1_6_0_2 : Fin 8 → RI := ![⟨-70422892887502227943003307133665357329238338859917618339,-70422892887502227940340499722391572826612810863449952120⟩, + ⟨7635209202033357157844483730553127066812466467491605362472,7635209202033357157846398730221362914219897212446318766872⟩, + ⟨-782209775743982858516911960807805833265393380633645748598,-782209775743982858476802910598553693659268741384017524314⟩, + ⟨426321410405533674914151317036615757372503514955761865813,426321410405533674928992688554691708072126863726006669955⟩, + ⟨734225741700393779320256943831901629956688825365677908737,734225741700393779362768329342733835249742875323264759006⟩, + ⟨491698656445902160736095006842576765170517547151094182733,491698656445902160754340579001295380880327454317563277227⟩, + ⟨-145933875077240535969298908134305017961937404034105497556,-145933875077240535937222787652403435642062629949707608118⟩, + ⟨272289757711572839779470372681512247801833177848988375772,272289757711572839797563872278358852881809794063248410590⟩] +lemma bs1_6_0_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 2 r = bs1_6_0_2 r := by + revert r + decide +kernel +def bs1_6_0_3 : Fin 8 → RI := ![⟨-68256077266881534177651850558136149371289114369175795510,-68256077266881534174952258389221026535919449774419026746⟩, + ⟨7244558465711636627049100232865286014052751067393135738383,7244558465711636627051041686868287175516079835058330263639⟩, + ⟨-757812782785555929021958140485941255983357161996585630844,-757812782785555928981295012770031825389959787679328622642⟩, + ⟨412981119927155689827553311059525947185017427533064970610,412981119927155689842599705386268505915429123781532668939⟩, + ⟨711287323520355507360563556635113770996180299588642776712,711287323520355507403662206176518719357880731784365144326⟩, + ⟨476313539111469016939371841863784329046563043958194517720,476313539111469016957869463399818518651933197796660859317⟩, + ⟨-141361345352804152706554202914517713400796781471824041837,-141361345352804152674034974037730709454273441651920296418⟩, + ⟨263760925112003005040179992566565301884134858593324148734,263760925112003005058523440768305165140788942394037018583⟩] +lemma bs1_6_0_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 3 r = bs1_6_0_3 r := by + revert r + decide +kernel +def bs1_6_0_4 : Fin 8 → RI := ![⟨-66024439682198571642467831849534954429793568094552672241,-66024439682198571639730552380420600595835011528597655351⟩, + ⟨6860519316216495412329804520602634588336548696184221546026,6860519316216495412331773078018021655064762473403584826240⟩, + ⟨-732720997910976122618579116306777368809975812332051179381,-732720997910976122577348316362859089188972188893927513283⟩, + ⟨399265572124086459723097360990985380161233707565290232517,399265572124086459738353808520015241485460830029800663919⟩, + ⟨687699752726254759960203149801970118721402104306173364587,687699752726254760003903472352402051640885345357918254331⟩, + ⟨460495375906188486497003012856735436769497064576549713326,460495375906188486515758867997040065066883594343561705967⟩, + ⟨-136660159748193238135693761143006894348726699923476255050,-136660159748193238102720551863205496315667112731456070109⟩, + ⟨254992363846722999654723910781776913127657878857755410948,254992363846722999673323440271283708352361334023928059747⟩] +lemma bs1_6_0_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 4 r = bs1_6_0_4 r := by + revert r + decide +kernel +def bs1_6_0_5 : Fin 8 → RI := ![⟨-63733633103178883046281388767770564937935066237252263113,-63733633103178883043505489609150462058396578437622843768⟩, + ⟨6483733172414207347425921144744136715131820802389159307523,6483733172414207347427917476114287157013114030379588496074⟩, + ⟨-706997776302085886996344982852410318095981975879061498619,-706997776302085886954532466386723932605546054785754604897⟩, + ⟨385209360990141022907183292565634402233322838055565121686,385209360990141022922654990043829053326081033669430554061⟩, + ⟨663522551972174965160991843587133671366350691597867623842,663522551972174965205308724624635796884625262247685424748⟩, + ⟨444284082546609090904754882143596272067396460900291313700,444284082546609090923775359625224663577262737928396264112⟩, + ⟨-131842241773901312276603296490491002532671891946811978580,-131842241773901312243164875266257973009429506942034315206⟩, + ⟨246006258523366960087707152961116651605620441322392485872,246006258523366960106569099226818789610512435951526877077⟩] +lemma bs1_6_0_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 5 r = bs1_6_0_5 r := by + revert r + decide +kernel +def bs1_6_0_6 : Fin 8 → RI := ![⟨-61389648589264041584613450175009448184849300612401429910,-61389648589264041581797967789707937070311575725209770353⟩, + ⟨6114809881076885611757417118603750682665875840585431377495,6114809881076885611759441916871520051553840490601251766239⟩, + ⟨-680710087146048642190332708744378321605938646107009387968,-680710087146048642147923962292378159799326781289184050786⟩, + ⟨370849030945976487761818474022858631992880732523016055943,370849030945976487777510791802252317090679295477024352132⟩, + ⟨638818619176433075935408823117013420243423234954367573118,638818619176433075980357645391443347764253018340669443993⟩, + ⟨427721825789807261132968855018926498677086820246743929358,427721825789807261152260557004315922959463101349187244487⟩, + ⟨-126920184336018746977921470206498147235572124372009016513,-126920184336018746944006230289858399834629702305719615864⟩, + ⟨236826040439181669829279265771989148889549056722189155074,236826040439181669848410175948848447836960983751467015372⟩] +lemma bs1_6_0_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 6 r = bs1_6_0_6 r := by + revert r + decide +kernel +def bs1_6_0_7 : Fin 8 → RI := ![⟨-58998801259065937546090515744669040755832188112701912687,-58998801259065937543234454087047644237134767198265924418⟩, + ⟨5754326048552537088122945270998345411272957724459250985147,5754326048552537088124999252485559599807988805914787738669⟩, + ⟨-653928352487644629160762891204944042898569582865761148293,-653928352487644629117742911637093346692230405344178381280⟩, + ⟨356222988430319278965429756768124756403991524562174817182,356222988430319278981348246389286893497734095922536411455⟩, + ⟨613654075776225435060866027599557018103563081719839882850,613654075776225435106462692854293731763683480810939274448⟩, + ⟨410852921276964975762237283406840502839801968654715101515,410852921276964975781807034806608112019302802631109682202⟩, + ⟨-121907218561727244033204569860118689095173899551448091871,-121907218561727243998800512906857292845630452159693373009⟩, + ⟨227476330125771534476338068991197485335384503826259420770,227476330125771534495744711105801789123806730257135424398⟩] +lemma bs1_6_0_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 7 r = bs1_6_0_7 r := by + revert r + decide +kernel +def bs1_6_0_8 : Fin 8 → RI := ![⟨-56567714225236244852240098676489462519851937706102869229,-56567714225236244849342427768605093393549605468070244432⟩, + ⟨5402823537629679014170167930797724372010255594283777316563,5402823537629679014172251836229157745387892457868675871138⟩, + ⟨-626726264251677532032068986479288546963716011456116112364,-626726264251677531988422259554167862553717221421159153345⟩, + ⟨341371401706631672069663790234679245908126669397150895995,341371401706631672085814192362611306556265219268616243822⟩, + ⟨588098094593193342224944589169650585149643723047588214623,588098094593193342271205540873049623958937318085363145546⟩, + ⟨393723717763701183004274834393299789083180025618974805769,393723717763701183024129692622415015734188905142697773501⟩, + ⟨-116817178529019778552361942118151992142479117598769760090,-116817178529019778517456661036246748420360645911271591045⟩, + ⟨217982872306673110910988698265563631047516314215497014172,217982872306673110930678070910983796786615716182848713439⟩] +lemma bs1_6_0_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 8 r = bs1_6_0_8 r := by + revert r + decide +kernel +def bs1_6_0_9 : Fin 8 → RI := ![⟨-54103300510800017985055049764400422046706578321499460805,-54103300510800017982114704204934671699669089578005303419⟩, + ⟨5060808135349331558641044045498100569656412202618879350984,5060808135349331558643158641073802827979779434888384996102⟩, + ⟨-599180579671344780790373834004582077796596936161241079507,-599180579671344780746084311909349083939138910309545702393⟩, + ⟨326336089020435039372716206500760836136369289573951805682,326336089020435039389104459235499020618160663833376871133⟩, + ⟨562222707536939767945443879741101582492525758979656156073,562222707536939767992386126891251464221738307114961742816⟩, + ⟨376382467894524723567644481197082062808945325055603341068,376382467894524723587791746391691971514525851855514366269⟩, + ⟨-111664461954657112425574661730708244690458579604463362722,-111664461954657112390155322718924156574859456289668630187⟩, + ⟨208372463362444150635612591752505714503118037907693345893,208372463362444150655591934219966119209568613727829224502⟩] +lemma bs1_6_0_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 9 r = bs1_6_0_9 r := by + revert r + decide +kernel +def bs1_6_0_10 : Fin 8 → RI := ![⟨-51612742977790743541795647195343314833202573532942369311,-51612742977790743538811524597098618779089872677488197600⟩, + ⟨4728748396352402649666199622197847190983751151654134134593,4728748396352402649668345700716842481205278337641252331600⟩, + ⟨-571370895518589307605643734114222729340625102497541947587,-571370895518589307560694811929096871892056936665307894455⟩, + ⟨311160395329055070225916180886586236672475457523079195684,311160395329055070242548428471942412715290687751487398200⟩, + ⟨536102593523171578023707526825099121931101428864639919086,536102593523171578071348668894998595264872598915163533123⟩, + ⟨358879185778934196006104362179480325869415744133411602328,358879185778934196026551587903195147587132780841166505553⟩, + ⟨-106463986925266432728592756652049595492917025327076992124,-106463986925266432692646080378051481929673257941848081374⟩, + ⟨198672871454523415013272633046824919080168960913285268062,198672871454523415033549435942754613221007102744598456452⟩] +lemma bs1_6_0_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 10 r = bs1_6_0_10 r := by + revert r + decide +kernel +def bs1_6_0_11 : Fin 8 → RI := ![⟨-49103472314251971793293706138375596339454642965799566766,-49103472314251971790264665489891796294487299416219088144⟩, + ⟨4407074665163740596524050749370369913029817863393449869700,4407074665163740596526229131408925946503771077528749996451⟩, + ⟨-543379401696834873621772900487532614829267956303646269407,-543379401696834873576147391507328579345992932020201172678⟩, + ⟨295889057914316702166701091879714859797151729084710151743,295889057914316702183583693834938581280650789647848206259⟩, + ⟨509814847136671299218744839920912260674611290014670209321,509814847136671299267103093015055885688002404126021654923⟩, + ⟨341265491729398807807429886326096432486530135570827328031,341265491729398807828184890796202591590229820176582970195⟩, + ⟨-101231144788100459677211760354432262037536444766918201811,-101231144788100459640724002218853310446945035263093946873⟩, + ⟨188912749517060199007905709525429409460855660716728613385,188912749517060199028487725904107289322657580570782760247⟩] +lemma bs1_6_0_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 11 r = bs1_6_0_11 r := by + revert r + decide +kernel +def bs1_6_0_12 : Fin 8 → RI := ![⟨-46583143141203577228333639611180197893905573074853672681,-46583143141203577225258499557762411938993015347780568449⟩, + ⟨4096178279617543071573740631549025766679284719133416227455,4096178279617543071575952166696879557061797483220023154042⟩, + ⟨-515290614923626223701283449095238272500047970708170337183,-515290614923626223654963558937016741839522274320099734572⟩, + ⟨280568061278889277742116666430778851890159769173896127400,280568061278889277759256207131386941212357163901581847203⟩, + ⟨483438728725330377550595481114388686361420637446099062174,483438728725330377599689705411940748361170273041415409145⟩, + ⟨323594444625779961083061574802405424732782095087551588699,323594444625779961104132452668272760722791174534248308877⟩, + ⟨-95981749350004748784318219514478101563225829396052343878,-95981749350004748747275148944218781274710957075378981891⟩, + ⟨179121541384685849073206749008314286692596994761105595882,179121541384685849094102006052106052166095307319910938199⟩] +lemma bs1_6_0_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 12 r = bs1_6_0_12 r := by + revert r + decide +kernel +def bs1_6_0_13 : Fin 8 → RI := ![⟨-44059608316862471086441916012327174061911337769390407716,-44059608316862471083319453051491350631227973299528203978⟩, + ⟨3796410956434482230063180909827045282394563722869441360883,3796410956434482230065426477985176747011135742954018272591⟩, + ⟨-487191093398938841279564451992496511624769587091801538787,-487191093398938841232531751414114780018312497027639805202⟩, + ⟨265244481817693869008938461214295336432525431144670246737,265244481817693869026341759949901397455003924209156293487⟩, + ⟨457055396768496636569481209274290709131105691066264796276,457055396768496636619330937838570049284147429995862932816⟩, + ⟨305920362475684345658713245378696951810679765924338602311,305920362475684345680108380086596478721070468464130990540⟩, + ⟨-90731982565260838252663437060099716870177544726479537780,-90731982565260838215050315770703963592891521085188099510⟩, + ⟨169329381383218590371283118140668147108418207365371730510,169329381383218590392499929421786202712740197201144615064⟩] +lemma bs1_6_0_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 13 r = bs1_6_0_13 r := by + revert r + decide +kernel +def bs1_6_0_14 : Fin 8 → RI := ![⟨-41540891531101511209524078309059221946742406176528103850,-41540891531101511206353024895093535895109871492668705591⟩, + ⟨3508084358780736603136587915182573826156082612035686666660,3508084358780736603138868427926340153391521490283891056544⟩, + ⟨-459169133522572466881344221128091348612685661876865379104,-459169133522572466833579617477793778326456891789292077743⟩, + ⟨249966322846105423494582015132992544568633802059666288521,249966322846105423512256136671686648045075579040875210378⟩, + ⟨430747623519296448232579352825100080658964519757952140849,430747623519296448283204821864019080267667492939377803448⟩, + ⟨288298631844697085229299881982021086072719531716285624044,288298631844697085251027958762681540657441987648279417824⟩, + ⟨-85498336924836957251015664695417334036509780040863074565,-85498336924836957212817223858660134386986811017029064874⟩, + ⟨159566987768935208076612701310973814669508896644201869961,159566987768935208098159679670785577434137576666740656124⟩] +lemma bs1_6_0_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 14 r = bs1_6_0_14 r := by + revert r + decide +kernel +def bs1_6_0_15 : Fin 8 → RI := ![⟨-39035158298661166074631008711581329557041169246148071328,-39035158298661166071410051263587749937002487266236185732⟩, + ⟨3231469844484603088426451062968896517889980866303078535770,3231469844484603088428767464980580281238834031390019812597⟩, + ⟨-431314449889292662591891967301877061666535313255679558417,-431314449889292662543375674514037010371136698337022309959⟩, + ⟨234782340655636962597630402564484230790643217097350060740,234782340655636962615582668255173634886002570630623641053⟩, + ⟨404599495074700894338167752416732236063580906581129260716,404599495074700894389589933084162723313961351087265220052⟩, + ⟨270785506933296247086468084595316218893350621464501211913,270785506933296247108538104112835044366430488674677509021⟩, + ⟨-80297554790824180493638243951560971694065732482453200861,-80297554790824180454838660200360184451366279780962995166⟩, + ⟨149865550459656787383412623403989381595950020486416878129,149865550459656787405298694488167790204246203137671578612⟩] +lemma bs1_6_0_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 15 r = bs1_6_0_15 r := by + revert r + decide +kernel +def bs1_6_0_16 : Fin 8 → RI := ![⟨-36550685474824562811897803804007236462106991560398598131,-36550685474824562808625580611426031040764023585128889392⟩, + ⟨2966798392468384505454328026504618611201250053899901184429,2966798392468384505456681297079702635463913961672016137296⟩, + ⟨-403717839951368674718053702958115991197920605763821777410,-403717839951368674668765210004794701632961946142067381556⟩, + ⟨219741862354373576736898244142985733261787518688681073024,219741862354373576755136243589122711186891632354333720784⟩, + ⟨378696097177171863437479367649057797339478805779088540287,378696097177171863489719999482868978738127993283812085975⟩, + ⟨253437899177328639970221351049001127260976057768794954420,253437899177328639992642643752202982154271607495228456904⟩, + ⟨-75146564950092014818826965447158915463978647647984903866,-75146564950092014779409835645568766865146886874401150890⟩, + ⟨140256613556809257604684429824330654816374011393024211251,140256613556809257626918846314597468297063136142821540516⟩] +lemma bs1_6_0_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 16 r = bs1_6_0_16 r := by + revert r + decide +kernel +def bs1_6_0_17 : Fin 8 → RI := ![⟨-34095829431952355701420292532768172712736596227255510726,-34095829431952355698095391551996471122107453081680300715⟩, + ⟨2714260703881915897418092204092034338796712083711682793978,2714260703881915897420483358723797980203573753443773778037⟩, + ⟨-376470834892973071267476964952069103049665470307381411333,-376470834892973071217395002654157846293359403938039221633⟩, + ⟨204894596332605178895964481015835818016909071948170247331,204894596332605178914496084356141519360430121227658741684⟩, + ⟨353123188195974778266474993041262857017976453953131131006,353123188195974778319556619140028909160175074622734758407⟩, + ⟨236313158345042494186967053078828354849820649942695443408,236313158345042494209749294298847777643720871298157752215⟩, + ⟨-70062416690087238631091800056075423609303686959166362274,-70062416690087238591040114757401389252626765127196528431⟩, + ⟨130771953211152221068721188679676847871289668865415143201,130771953211152221091313545265550496529328234376352991892⟩] +lemma bs1_6_0_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 17 r = bs1_6_0_17 r := by + revert r + decide +kernel +def bs1_6_0_18 : Fin 8 → RI := ![⟨-31678993049272665182098213371780488517592394986544708913,-31678993049272665178719169907071718873840544600057827902⟩, + ⟨2474007473408578440503371109468132897039085164402005024935,2474007473408578440505801201515469546153516790021658925019⟩, + ⟨-349665338407655286397974227173646742881772662048875343530,-349665338407655286347076733268967299633044379978606439607⟩, + ⟨190290436272862908524956536163907646542664056333823827058,190290436272862908543789906998065828439607289566644829603⟩, + ⟨327966860872903429427592833818551240763318274324420173533,327966860872903429481538837865700206910582636241654664657⟩, + ⟨219468846194636184955617421145316860227852910939823641502,219468846194636184978770646986089074890022604747498890040⟩, + ⟨-65062211726849777336605861964816580387280780441953221017,-65062211726849777295901977475780172666881524243702053066⟩, + ⟨121443451435343184301985815670502016563705570319122397257,121443451435343184324946064807344890202558430366004015682⟩] +lemma bs1_6_0_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 18 r = bs1_6_0_18 r := by + revert r + decide +kernel +def bs1_6_0_19 : Fin 8 → RI := ![⟨-29308591681458102851748529531508748942925173688689015033,-29308591681458102848313823792879935208678990748234097175⟩, + ⟨2246149825263069481299896832589045293961087121541226068836,2246149825263069481302366955032731602406595475655764105565⟩, + ⟨-323393255206902477697500466433489693721351295655169869697,-323393255206902477645764548792302016676266890133497047110⟩, + ⟨175979259696885443697730074599888443484687618493430599829,175979259696885443716873683599745793700001891161020697028⟩, + ⟨303313194544481059278605524785151125908431796670867618822,303313194544481059333440170036667851049262502014889087005⟩, + ⟨202962503840924458608140252821559742921706371826867185372,202962503840924458631674876893054331664017525509114770661⟩, + ⟨-60163034340365378677666123384547018741169475658911920019,-60163034340365378636291732347889925885347036148496091725⟩, + ⟨112302966513255058536613123117774291549770111354157701419,112302966513255058559951591620558830521880172508691116364⟩] +lemma bs1_6_0_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 19 r = bs1_6_0_19 r := by + revert r + decide +kernel +def bs1_6_0_20 : Fin 8 → RI := ![⟨-26993018283626202794772394624764160549923020745700538860,-26993018283626202791280449155139559945363333793998877178⟩, + ⟨2030759907519520458546405151368779215843363363381684596668,2030759907519520458548916438661785057715646569135470532570⟩, + ⟨-297746111212844309324594928525807954160408432538652959932,-297746111212844309271996826396664982142253827420148316409⟩, + ⟨162010722108953646540962445051141682171053432394842945062,162010722108953646560425084300729930481883833414929458773⟩, + ⟨279247899668991114041667268667540173311620747866267386537,279247899668991114097415739027294628415394572272282488768⟩, + ⟨186851414056916354030317963389529266780306053754082432269,186851414056916354054244794436977215900045650932509611651⟩, + ⟨-55381880094969244402940888224945706540643841264224955978,-55381880094969244360876988626857713124714869077049996795⟩, + ⟨103382200698355714658975685905883544068811805479597845571,103382200698355714682703092431483808523796848686484192221⟩] +lemma bs1_6_0_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) 20 r = bs1_6_0_20 r := by + revert r + decide +kernel +def bs1_6_0 : Fin 21 → Fin 8 → RI := ![bs1_6_0_0,bs1_6_0_1,bs1_6_0_2,bs1_6_0_3,bs1_6_0_4,bs1_6_0_5,bs1_6_0_6,bs1_6_0_7,bs1_6_0_8,bs1_6_0_9,bs1_6_0_10,bs1_6_0_11,bs1_6_0_12,bs1_6_0_13,bs1_6_0_14,bs1_6_0_15,bs1_6_0_16,bs1_6_0_17,bs1_6_0_18,bs1_6_0_19,bs1_6_0_20] +lemma bs1_6_0_mem (d : Fin 21) (r : Fin 8) : (bs1_6_0 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 6 0) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_0) d r = bs1_6_0 d r := by + fin_cases d + · exact bs1_6_0_0_calc r + · exact bs1_6_0_1_calc r + · exact bs1_6_0_2_calc r + · exact bs1_6_0_3_calc r + · exact bs1_6_0_4_calc r + · exact bs1_6_0_5_calc r + · exact bs1_6_0_6_calc r + · exact bs1_6_0_7_calc r + · exact bs1_6_0_8_calc r + · exact bs1_6_0_9_calc r + · exact bs1_6_0_10_calc r + · exact bs1_6_0_11_calc r + · exact bs1_6_0_12_calc r + · exact bs1_6_0_13_calc r + · exact bs1_6_0_14_calc r + · exact bs1_6_0_15_calc r + · exact bs1_6_0_16_calc r + · exact bs1_6_0_17_calc r + · exact bs1_6_0_18_calc r + · exact bs1_6_0_19_calc r + · exact bs1_6_0_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 6 0 tr1_6_0_mem) d r +lemma bs1_6_0_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 6 0) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs1_6_0 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_6_0_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_6_0 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_6_0 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 1 6 0 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 6 0) _ bs1_6_0_lower e he hτ +def bs1_6_1_0 : Fin 8 → RI := ![⟨-74541206746406249598923412993462138866580890752299198335,-74541206746406249596331580683104443775957504504680772236⟩, + ⟨8433633009406306648163801054470921070999191506226784427020,8433633009406306648165665011283364572539639966352888621467⟩, + ⟨-828684848786432567776334588926587363637824758386380370270,-828684848786432567737294614863868587561096436889962063709⟩, + ⟨451748043174978794916628641286437667624973820754943414114,451748043174978794931074427364559221799604004398385604112⟩, + ⟨777934673149641413096024282507909434665669072000515354110,777934673149641413137402559456746262862125081676017801447⟩, + ⟨521021863092228098981188792934788609028759080204465104021,521021863092228098998948043281489560335425286904902023399⟩, + ⟨-154648778034000800826257437332815722246535215603516484982,-154648778034000800795036281381346138082623561773501451952⟩, + ⟨288546023285045339344242740313954962053254922555760856069,288546023285045339361853971476981407211214170196362682904⟩] +lemma bs1_6_1_0_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 0 r = bs1_6_1_0 r := by + revert r + decide +kernel +def bs1_6_1_1 : Fin 8 → RI := ![⟨-80606076011052340194531625079546736600372939815564471252,-80606076011052340191834599916238599843177883953287307222⟩, + ⟨9639130955039386740584078675230283485653970905816653113670,9639130955039386740586018283130985241325588931464028528888⟩, + ⟨-897182270606837088483772576782161502046126952953150502712,-897182270606837088443148115083305481399201088579368771245⟩, + ⟨489230543005377738407841363395441570972810899040579904198,489230543005377738422873450309733962801281123099558334516⟩, + ⟨842361719147786758914428320132789026591185223307031189201,842361719147786758957485987752444606979183189293674343091⟩, + ⟨564247997220805524348047229998934339640335400216630997556,564247997220805524366527262397338262660503513848006349182⟩, + ⟨-167495546552321143384284778843215703632957712815205347049,-167495546552321143351796472060442321547690760824082983362⟩, + ⟨312510172473623000227374163018047854758120629900225418673,312510172473623000245700168683494075820332812537322518699⟩] +lemma bs1_6_1_1_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 1 r = bs1_6_1_1 r := by + revert r + decide +kernel +def bs1_6_1_2 : Fin 8 → RI := ![⟨-85995336133438779459876999826265236901404298539034734129,-85995336133438779457067163019464503769048315010408098664⟩, + ⟨10891802308114401974652620011815223875343918747456749663916,10891802308114401974654640749976765473162529508955251864871⟩, + ⟨-958388565967621350091527912885323230131174657881749285327,-958388565967621350049204204048353160570669648115895418868⟩, + ⟨522768346893164262827552304927096728058477937340618842011,522768346893164262843213156620124500342686445463139598030⟩, + ⟨899970658091575475671426879447788440838227800605949265804,899970658091575475716285570771308654137898347575648513318⟩, + ⟨602922076303914057714536906928265689478207284407084554205,602922076303914057733789925376313733559159167578057320627⟩, + ⟨-178988799569721157570246501641596447248403100205684510750,-178988799569721157536399268241454071366244556730653092666⟩, + ⟨333952826632414130330631460269232330854902488929496673396,333952826632414130349724009326961111694006313747041279305⟩] +lemma bs1_6_1_2_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 2 r = bs1_6_1_2 r := by + revert r + decide +kernel +def bs1_6_1_3 : Fin 8 → RI := ![⟨-90575530634951575718345407675011497166167584408243054572,-90575530634951575715414400397666781216650301849843487835⟩, + ⟨12172775883271696699951181817913482831485039298594446056561,12172775883271696699953289697717295523700247467786346494571⟩, + ⟨-1010798989604950208012587480379660457489773319180565511794,-1010798989604950207968438617959948705208011215666476719131⟩, + ⟨551538623625278959658701612639089246220649431559581042885,551538623625278959675037817706490562897830023677805677846⟩, + ⟨949346724532593019529545875655793697407371621674822435935,949346724532593019576339038306044433147636339897393451041⟩, + ⟨636094730941238401281752674564106974646297339452377889681,636094730941238401301835953794287142810233176885132939700⟩, + ⟨-188844829975578138235023132742015125806296568045943100780,-188844829975578138199716282474657532877614308292319111386⟩, + ⟨352346153073886134980989339123848128594701281824654689837,352346153073886135000905228934885537479518422768654725306⟩] +lemma bs1_6_1_3_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 3 r = bs1_6_1_3 r := by + revert r + decide +kernel +def bs1_6_1_4 : Fin 8 → RI := ![⟨-94242367356585878849561504771951059997238588515294302571,-94242367356585878846500131547247219899493339381937785883⟩, + ⟨13460931248969189690880801739602500494600090802037780659082,13460931248969189690883003374119800808078130944573269631402⟩, + ⟨-1053222317600176952452494932944851166224117777377717369035,-1053222317600176952406382408299339282558322145286611863135⟩, + ⟨574887974893826894478917615542291016261482314453117717666,574887974893826894495980425714531309980300194009782626961⟩, + ⟨989368162082086734485158316960029329805805140672125523341,989368162082086734534032755568157067610505726429491449443⟩, + ⟨663012155201153180163408968127566008482884095876585873597,663012155201153180184385515601505739764822168028168521082⟩, + ⟨-196838201209679068725940782178754250229547269921128699816,-196838201209679068689063546529380347504112753793395835050⟩, + ⟨367270756330865806146746213622272001644003420390068501625,367270756330865806167547926495830207109816559040245798444⟩] +lemma bs1_6_1_4_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 4 r = bs1_6_1_4 r := by + revert r + decide +kernel +def bs1_6_1_5 : Fin 8 → RI := ![⟨-96923141040819876470631810646658815292399660880538943798,-96923141040819876467429929982956688586722430436231473345⟩, + ⟨14733379134120179950685802199559406780750117870772158447613,14733379134120179950688104882202793006002990383710000506115⟩, + ⟨-1084809373637775429882376900831939992792720105597420860437,-1084809373637775429834147955786825297595007960454686095060⟩, + ⟨592348173147544819726989751132216666478265755687986256874,592348173147544819744835690829558415140640358451566845765⟩, + ⟨1019233161862395059747409868967651330832557021396049999435,1019233161862395059798527491172519026815609756701805326680⟩, + ⟨683134292914409436580431887653563375202397898033782359406,683134292914409436602371192932070662820170638435425970004⟩, + ⟨-202807321510357733375371859798583133413456995049079210110,-202807321510357733336802074578287034306405550163178831384⟩, + ⟨378425936011393833443627511243812438700287448732260219120,378425936011393833465383957561507166678248598479547961054⟩] +lemma bs1_6_1_5_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 5 r = bs1_6_1_5 r := by + revert r + decide +kernel +def bs1_6_1_6 : Fin 8 → RI := ![⟨-98577679931236017996283817654647979499505008960769417539,-98577679931236017992930217441887550203893981150248198595⟩, + ⟨15966051433556700517436644652258512748036085158034641631771,15966051433556700517439056446392593737206184109472915508234⟩, + ⟨-1105065630583157820091625520579533121665488979107146790506,-1105065630583157820041111270564559219689240635687622359539⟩, + ⟨603643291573460482333884321129150732229128566297408777746,603643291573460482352575881949833846645161492381513255833⟩, + ⟨1038471917756234665339449481500531936323837367151034099290,1038471917756234665392989287229475129498001209647254477140⟩, + ⟨696143079056576789974734352738524011649194645173372680773,696143079056576789997713241266171396014845358613564935540⟩, + ⟨-206657018087872291613827708928951247755870390330053253403,-206657018087872291573430313302490572448345632303691194775⟩, + ⟨385634393527091583027551808491967241884337167218269467468,385634393527091583050339173376307353853518433011867696591⟩] +lemma bs1_6_1_6_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 6 r = bs1_6_1_6 r := by + revert r + decide +kernel +def bs1_6_1_7 : Fin 8 → RI := ![⟨-99197842062983659990966515238482730353298177959062987124,-99197842062983659987448770038152260242227772032690323410⟩, + ⟨17134383383122575761887888017148446968870556922295393868545,17134383383122575761890417858721996638824330888079547160437⟩, + ⟨-1113848033007282065375358885084576373353491218775049891615,-1113848033007282065322372169535668830877940885985423494856⟩, + ⟨608688288312704195591588849571060362030327440742550624408,608688288312704195611195285697150667595824203346269818665⟩, + ⟨1046943920267623738817653232493429719080538925205958973362,1046943920267623738873813592309955366536656395989227321659⟩, + ⟨701940806204302208082741966375011197023376127815855109449,701940806204302208106845577330113098144695832098296664252⟩, + ⟨-208358121184808431004937188084760820454499292979183138124,-208358121184808430962562505488612345175205205276805925082⟩, + ⟨388841414885162650046500439751501124239489125743036792390,388841414885162650070403152765715545908734482690138406239⟩] +lemma bs1_6_1_7_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 7 r = bs1_6_1_7 r := by + revert r + decide +kernel +def bs1_6_1_8 : Fin 8 → RI := ![⟨-98805675885011378704835705108809778058804138390889613011,-98805675885011378701140011988519954177059112981310281861⟩, + ⟨18214063352118548028926628799519452352466387704446829616059,18214063352118548028929286615127547625443350383035600176658⟩, + ⟨-1111347156264192007062077766607613661092335897605568566504,-1111347156264192007006410676193490661742245651349885193459⟩, + ⟨607579631963635910731623128917961001771966778563538984326,607579631963635910752221372104570324877405340088821281972⟩, + ⟨1044821517754333966750757305806268462902722487199835599705,1044821517754333966809758581790436939034837300904430941307⟩, + ⟨700639293653587081747440423869336341482061995758986429589,700639293653587081772763335026419993327004271655419081174⟩, + ⟨-207944256052117305495059378762849750547877713839722162735,-207944256052117305450541139372041291387230251442638293520⟩, + ⟨388108900587980745470571823809133399009978918777610441976,388108900587980745495683674444176956738404310482505576833⟩] +lemma bs1_6_1_8_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 8 r = bs1_6_1_8 r := by + revert r + decide +kernel +def bs1_6_1_9 : Fin 8 → RI := ![⟨-97450435680497628596663272307056576925382936282206023738,-97450435680497628592774261267934414934658278279219561149⟩, + ⟨19181819469381213571862872772825403896822984559306268426650,19181819469381213571865669616043534359941052643295564959480⟩, + ⟨-1098056654647406201921579489121128805123651708279586054635,-1098056654647406201863000510269359124035006816834332729567⟩, + ⟨600579009649695223356775242655075908961897733371922544452,600579009649695223378450958828547129175354573395263753117⟩, + ⟨1032561557430636249925186591645436531175640067696194913858,1032561557430636249987274163896681584704268079881463386407⟩, + ⟨692541062675948108078830651515576416264740063221462019120,692541062675948108105478178198002431780048358712681133297⟩, + ⟨-205506204580523521607924833393269284646622301419428903639,-205506204580523521561077890533868071803621276254878669692⟩, + ⟨383604912265847464816181290364937088904590326454739208138,383604912265847464842606716165645361890844139723946026054⟩] +lemma bs1_6_1_9_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 9 r = bs1_6_1_9 r := by + revert r + decide +kernel +def bs1_6_1_10 : Fin 8 → RI := ![⟨-95204698609249084502156489808630720534401941960491001740,-95204698609249084498057004101262006883528529123726936158⟩, + ⟨20016207636945146852386648777784404875400661198743998527895,20016207636945146852389596987157704504868912999175345458744⟩, + ⟨-1074732584416623913694130811001498732336145023295668017350,-1074732584416623913632381516865014515704299338884922296953⟩, + ⟨588091504099502034254289471404350976559708356234149166813,588091504099502034277138285089042478294774829016871036309⟩, + ⟨1010867512776988001986145154029290969545134218407347280731,1010867512776988002051592927894776113078002248443034476875⟩, + ⟨678114121052870534955790898202088603069027862632091607327,678114121052870534983880598558515434219076710741342704757⟩, + ⟨-201184323233240202750090069717934538011669597969687053893,-201184323233240202700707753557642785753530846351144381284⟩, + ⟨375589633138851757210353736795343787903488137330342818429,375589633138851757238209316090770948137396122190896352797⟩] +lemma bs1_6_1_10_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 10 r = bs1_6_1_10 r := by + revert r + decide +kernel +def bs1_6_1_11 : Fin 8 → RI := ![⟨-92159863242000910395537167263466209618829536809400532184,-92159863242000910391208007949910254356062455979084544441⟩, + ⟨20698362996734760702263196643107080839563059378709991344736,20698362996734760702266310025852556967650311637476440518875⟩, + ⟨-1042345573001717422519536514538804129605111532262463751176,-1042345573001717422454327717411982035892330549960373752394⟩, + ⟨570639838207603689853095766293728491202188231067161304690,570639838207603689877224684316193626935208921346239825849⟩, + ⟨980644867413425795308957023606706103703536768596342574129,980644867413425795378071507716640945636604631963678440951⟩, + ⟨657962205475972594058702580274950636371478819751316490509,657962205475972594088366005541923492269235315567031257319⟩, + ⟨-195159580832172936889368281090635398019082662042815939467,-195159580832172936837219321638346512747731597909326517888⟩, + ⟨364398779402936848680823334085636176118395761777212014095,364398779402936848710239521663615324707885297910322106920⟩] +lemma bs1_6_1_11_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 11 r = bs1_6_1_11 r := by + revert r + decide +kernel +def bs1_6_1_12 : Fin 8 → RI := ![⟨-88421318285510484209865193664034925690073952469121105795,-88421318285510484205284821612578866266046397391202813846⟩, + ⟨21212677028353280046028330271513245939820216187052606974470,21212677028353280046031624317834920460460214720986017232272⟩, + ⟨-1002028931185838485875568735569733275174771775445534123008,-1002028931185838485806575998126905208023683945037570783748⟩, + ⟨548836357468700420203449812776523383298218921980884465221,548836357468700420228978885221743721494715949511190108658⟩, + ⟨942952646358840455340633681827056018853189253257489432380,942952646358840455413758745710973350713439400610389077448⟩, + ⟨632792413551547195906391381673718954910215680651494930229,632792413551547195937776118109379636370775706685234277893⟩, + ⟨-187643805921405613627575830728918020958169454215957438555,-187643805921405613572400768069974448194767845889969113806⟩, + ⟨350425547353574655628870702494458783485885320173182782774,350425547353574655659993854516272727855901161909454743446⟩] +lemma bs1_6_1_12_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 12 r = bs1_6_1_12 r := by + revert r + decide +kernel +def bs1_6_1_13 : Fin 8 → RI := ![⟨-84103556753506171579975269308870061851275670201539848998,-84103556753506171575119456343228844390567574393433801090⟩, + ⟨21547365330301345188136775875492434750280451387179420911928,21547365330301345188140268009462862295012978949002969003641⟩, + ⟨-955025689366576983596537850889692662882839562516077141092,-955025689366576983523396231552688003861336665488354708629⟩, + ⟨523354362341726573104792620628857266168795462649672794606,523354362341726573131856885188267131150976705451541715557⟩, + ⟨898953881194647954823549251521091905649241393563785218652,898953881194647954901071694967006338939254507312157913420⟩, + ⟨603382089420564771489316148151275948386056958765958932255,603382089420564771522588207363112295029272732998521114409⟩, + ⟨-178869712483081632666615100975647663546772168696721286074,-178869712483081632608122083022651498337828534900620810655⟩, + ⟨334102143017185763292652073762034520272262063128772376839,334102143017185763325646818167343441598998912842600443520⟩] +lemma bs1_6_1_13_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 13 r = bs1_6_1_13 r := by + revert r + decide +kernel +def bs1_6_1_14 : Fin 8 → RI := ![⟨-79325479309789263714795025560565859211810336535475326188,-79325479309789263709636444645194966090659137187410603303⟩, + ⟨21694896622345246471842090198598230959939188434965360474564,21694896622345246471845800072883151691067402836005124276546⟩, + ⟨-902637225441354707827931334917810642476554342196939968290,-902637225441354707750229214943188701435826714553080639517⟩, + ⟨494900237095098709565693369658398267391938007776802411736,494900237095098709594445135765043935531477902105586431329⟩, + ⟨849867506175101988966544844553747210783656706769776895630,849867506175101989048900940248108348743448688164407861460⟩, + ⟨570546635203125683751123830350315364750485285003905066465,570546635203125683786470457347827543449238123893351441613⟩, + ⟨-169081213284609713410939656383411765136025898289830099910,-169081213284609713348799502257368580889879782210963292504⟩, + ⟨315881832666067154834399478643702080285892242693083125946,315881832666067154869451499798748688713648214114016247526⟩] +lemma bs1_6_1_14_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 14 r = bs1_6_1_14 r := by + revert r + decide +kernel +def bs1_6_1_15 : Fin 8 → RI := ![⟨-74206086387603802939030548773863700641167818631068721332,-74206086387603802933538290794481983205345178878593975974⟩, + ⟨21652261160569224058771240599532327856058828723217573799039,21652261160569224058775190442905524917209404140167404700082⟩, + ⟨-846175698134296816419997328299611678059039314057381563938,-846175698134296816337269133192088872822090963579598495820⟩, + ⟨464187579874175699511954418318366003380731092826601555305,464187579874175699542565960409572224400238969187563800891⟩, + ⟨796923761384829851547698922234140706563121074400374704942,796923761384829851635382130300027219709549428582851860375⟩, + ⟨535109640404525930073282453002433849154924657162302902425,535109640404525930110915437219856136755076271457775029023⟩, + ⟨-158524443473411326192172497258283853007939129570555792045,-158524443473411326126012876437235739114968835687247529399⟩, + ⟨296222294371651551193287135133722397853915713528369374769,296222294371651551230606457257454951066576841944903960038⟩] +lemma bs1_6_1_15_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 15 r = bs1_6_1_15 r := by + revert r + decide +kernel +def bs1_6_1_16 : Fin 8 → RI := ![⟨-68860707785282735728964608740952676974249459360726409784,-68860707785282735723103610490509804271533769431211984176⟩, + ⟨21421065915069221558388664767928948757562246547360628165312,21421065915069221558392879796645101336993108235462950034614⟩, + ⟨-786921967151088746896418764020461440744073797951581668927,-786921967151088746808136347461222329734750631094626875003⟩, + ⟨431914253598397060774599718783778992581817443508596978051,431914253598397060807266464467420046598838984714698838437⟩, + ⟨741324683856101513522838932145763707724153623824443758054,741324683856101513616409032274989263513408154602266466166⟩, + ⟨497876391315173531178933921099653921905922689274397063114,497876391315173531219093515839496354709246231222261679903⟩, + ⟨-147439815249221645045238185632785622480424850150878893530,-147439815249221644974636727483151371489262213255224098067⟩, + ⟨275570864521005517393713137624304296151238927386496012528,275570864521005517433538011564274412018028129697697080698⟩] +lemma bs1_6_1_16_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 16 r = bs1_6_1_16 r := by + revert r + decide +kernel +def bs1_6_1_17 : Fin 8 → RI := ![⟨-63397866092725188545020171614779264907948354668023795982,-63397866092725188538750535825732476845367659173447487405⟩, + ⟨21007453728064752313673068890955221150618925416300444544752,21007453728064752313677577797759345472773738340113786174872⟩, + ⟨-726090127307053898728957172892681681167334198574137725313,-726090127307053898634519574594403031933626938631637756064⟩, + ⟨398742979437634171889286695139656670252917874259827977864,398742979437634171924231015049015407978991800434444500718⟩, + ⟨684210751148123797285192978268247942057948660588719184348,684210751148123797385286925320565198827015297424222077616⟩, + ⟨459611477747062166489990509986454358213152004488276170406,459611477747062166532950091562372995734522431777876092605⟩, + ⟨-136055318591659308321155032566090765715877687476035264848,-136055318591659308245631135466183845024893950928078507337⟩, + ⟨254352079111236573415381035360045650253613566441108275292,254352079111236573457982558902414009764887336966992093828⟩] +lemma bs1_6_1_17_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 17 r = bs1_6_1_17 r := by + revert r + decide +kernel +def bs1_6_1_18 : Fin 8 → RI := ![⟨-57916820861227672628115875736460740053283331313018069342,-57916820861227672621392059144839616694147452581578573920⟩, + ⟨20421853425826847421927947139570336633185333934963729486450,20421853425826847421932782677614234085255629474343038149166⟩, + ⟨-664799254383645108437921345001028860471080287488770520939,-664799254383645108336642560766258216188544848044122341830⟩, + ⟨365285809205411769669645754268628501268323676194989748024,365285809205411769707121487452711540414581154379040973603⟩, + ⟨626634247817524340788717549180869066991175726030938709072,626634247817524340896062435639084550047263702665729841151⟩, + ⟨421020884307029002010377076735702513052848622245278575009,421020884307029002056448707862340568495202666059120144116⟩, + ⟨-124581182069517184682979153574387326419726666413796600116,-124581182069517184601984204351707875470362247429432696384⟩, + ⟨232957724078503111456419791239981411279980133826587269925,232957724078503111502107426129807503668168092963872670654⟩] +lemma bs1_6_1_18_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 18 r = bs1_6_1_18 r := by + revert r + decide +kernel +def bs1_6_1_19 : Fin 8 → RI := ![⟨-52505797036981840297496913234505370173183750371533507977,-52505797036981840290266752351266211818873004679423010941⟩, + ⟨19678576764098836874616996455864777592796824784261230150364,19678576764098836874622196139338828090854873252793391470717⟩, + ⟨-604052490533148770889427905570914968944306071762225958211,-604052490533148770780522212785197859040627932550048667361⟩, + ⟨332092558818875146580335439237509400045295968915354456840,332092558818875146620633323102852231180870748026382665906⟩, + ⟨569539485874327036090080876848397293865565000557624742248,569539485874327036205509486256201236998291185726896045649⟩, + ⟨382738659540477447250219478121489247613605679530353208993,382738659540477447299760583334931963930490868631541534185⟩, + ⟨-113205918412593205647598354516816563910464009765186834804,-113205918412593205560503992910865870796739598897676767109⟩, + ⟨211739444189794936260946366756881261993155176757552242005,211739444189794936310074558480511991790937940458216377824⟩] +lemma bs1_6_1_19_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 19 r = bs1_6_1_19 r := by + revert r + decide +kernel +def bs1_6_1_20 : Fin 8 → RI := ![⟨-47240865567455858500297732933444821314870551166338616723,-47240865567455858492501268911322212614118784838045833925⟩, + ⟨18795285168960455685662933908895137209252223069660860012238,18795285168960455685668540858143713235087798403763572420549⟩, + ⟨-544723203083029950092758285284516120584346268311523989165,-544723203083029949975322542246701514243284442297778174518⟩, + ⟨299643070809244852466255957532541196950387502608778646451,299643070809244852509710177542437526195280323922031644378⟩, + ⟨513749641077718816525875564206250091921706285994600209557,513749641077718816650345132021172345861354285054985885541⟩, + ⟨345318008647424091568092315051761523433493014226873381040,345318008647424091621513732728835457764944829048028792411⟩, + ⟨-102093703727914413144873134548648241907755040428342852296,-102093703727914413050957097582449735781312467303895694090⟩, + ⟨191003820673588766497067786767622643967666098369172742430,191003820673588766550043949460296134881568307008962875788⟩] +lemma bs1_6_1_20_calc (r : Fin 8) : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) 20 r = bs1_6_1_20 r := by + revert r + decide +kernel +def bs1_6_1 : Fin 21 → Fin 8 → RI := ![bs1_6_1_0,bs1_6_1_1,bs1_6_1_2,bs1_6_1_3,bs1_6_1_4,bs1_6_1_5,bs1_6_1_6,bs1_6_1_7,bs1_6_1_8,bs1_6_1_9,bs1_6_1_10,bs1_6_1_11,bs1_6_1_12,bs1_6_1_13,bs1_6_1_14,bs1_6_1_15,bs1_6_1_16,bs1_6_1_17,bs1_6_1_18,bs1_6_1_19,bs1_6_1_20] +lemma bs1_6_1_mem (d : Fin 21) (r : Fin 8) : (bs1_6_1 d r).Mem (bernsteinRows 20 (ordinarySignRow 1 6 1) d r) := by + have he : bernsteinRowsBox 20 (ordinarySignRowBox 1 6 tr1_6_1) d r = bs1_6_1 d r := by + fin_cases d + · exact bs1_6_1_0_calc r + · exact bs1_6_1_1_calc r + · exact bs1_6_1_2_calc r + · exact bs1_6_1_3_calc r + · exact bs1_6_1_4_calc r + · exact bs1_6_1_5_calc r + · exact bs1_6_1_6_calc r + · exact bs1_6_1_7_calc r + · exact bs1_6_1_8_calc r + · exact bs1_6_1_9_calc r + · exact bs1_6_1_10_calc r + · exact bs1_6_1_11_calc r + · exact bs1_6_1_12_calc r + · exact bs1_6_1_13_calc r + · exact bs1_6_1_14_calc r + · exact bs1_6_1_15_calc r + · exact bs1_6_1_16_calc r + · exact bs1_6_1_17_calc r + · exact bs1_6_1_18_calc r + · exact bs1_6_1_19_calc r + · exact bs1_6_1_20_calc r + rw [← he] + exact bernsteinRowsBox_mem 20 (ordinarySignRowBox_mem 1 6 1 tr1_6_1_mem) d r +lemma bs1_6_1_lower (d : Fin 21) : (2000/1000000:ℝ) < rowLower (bernsteinRows 20 (ordinarySignRow 1 6 1) d) := by + have hc : ∀ d : Fin 21, (2000:ℤ)*scale < 1000000*(rowLowerBox (bs1_6_1 d)).lo := by decide +kernel + have hh := (rowLowerBox_mem (bs1_6_1_mem d)).1 + have hnum : (2000:ℝ)*(scale:ℝ) < 1000000*((rowLowerBox (bs1_6_1 d)).lo:ℝ) := by exact_mod_cast hc d + nlinarith [scale_pos] +lemma ordinary_sign_1_6_1 (e : Fin 8 → ℝ) (he : ParameterPolytope e) + {τ : ℝ} (hτ : τ ∈ Set.Icc 0 1) : + (2000/1000000:ℝ) < ordinarySignValue 1 6 1 e τ := by + rw [ordinarySignValue_eq] + exact polytope_polynomial_lower 20 (ordinarySignRow 1 6 1) _ bs1_6_1_lower e he hτ +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineBarrierBase.lean b/lean/OAI/Analysis/Triangular/Signs/SineBarrierBase.lean new file mode 100644 index 0000000000000000000000000000000000000000..f075886f72a5517609f21c688bcbff2256eef94c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineBarrierBase.lean @@ -0,0 +1,109 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators +open Finset Set Filter +namespace AtomicTriangular.Construction + +def sinePolynomial (x : ℝ) : ℝ := x-x^3/6+x^5/120-x^7/5040+x^9/362880-x^11/39916800 +lemma sinePolynomial_lower {x : ℝ} (hx : 0≤x) (hx2 : x≤2) : sinePolynomial x≤Real.sin x := by + have ha : Antitone (fun j : ℕ => x^(2*j+1)/((2*j+1).factorial:ℝ)) := by + apply antitone_nat_of_succ_le + intro j + have hf : (0:ℝ)<((2*j+1).factorial:ℝ) := by positivity + have hn : (0:ℝ)<(2*j+2:ℕ)*(2*j+3:ℕ) := by positivity + have hd : (((2*(j+1)+1).factorial:ℕ):ℝ) = ((2*j+3:ℕ):ℝ)*((2*j+2:ℕ):ℝ)*((2*j+1).factorial:ℝ) := by + rw [show 2*(j+1)+1=(2*j+1)+1+1 by omega,Nat.factorial_succ,Nat.factorial_succ] + push_cast + ring + rw [hd,show 2*(j+1)+1=2*j+1+2 by omega,pow_add] + apply (div_le_div_iff₀ (by positivity) hf).mpr + have hb : x^2≤((2*j+3:ℕ):ℝ)*((2*j+2:ℕ):ℝ) := by + have hj : (0:ℝ)≤j := Nat.cast_nonneg j + push_cast + nlinarith + have hh := mul_le_mul_of_nonneg_left hb (mul_nonneg (pow_nonneg hx (2*j+1)) hf.le) + nlinarith + have ht : Tendsto (fun n : ℕ => ∑ j ∈ range n, (-1:ℝ)^j*(x^(2*j+1)/((2*j+1).factorial:ℝ))) atTop (nhds (Real.sin x)) := by + simpa only [mul_div_assoc] using (Real.hasSum_sin x).tendsto_sum_nat + have hh := ha.alternating_series_le_tendsto ht 3 + norm_num [sum_range_succ,sinePolynomial] at hh ⊢ + linarith + +def piLow : ℚ := 314159265358979/100000000000000 +def piHigh : ℚ := 15707963267949/5000000000000 +lemma sine_pi_bounds : (piLow:ℝ)≤Real.pi ∧ Real.pi≤(piHigh:ℝ) := by + rcases AtomicTriangular.Constants.pStar_bracket with ⟨h1,h2⟩ + constructor + · have hh : (piLow:ℝ)≤AtomicTriangular.Constants.pStar := by norm_num [piLow,AtomicTriangular.Constants.pStar] + exact hh.trans h1.le + · have hh : AtomicTriangular.Constants.pStar+AtomicTriangular.Constants.eps≤(piHigh:ℝ) := by norm_num [piHigh,AtomicTriangular.Constants.pStar,AtomicTriangular.Constants.eps] + exact h2.le.trans hh + +def sineLower (d : ℚ) : ℚ := + let l:=piLow*d/36 + let u:=piHigh*d/36 + 2*(l-u^3/6+l^5/120-u^7/5040+l^9/362880-u^11/39916800) +lemma sine_lower {d : ℚ} (hd : 0≤d) (hd18 : d≤18) : + (sineLower d:ℝ)≤2*Real.sin (Real.pi*d/36) := by + have hd0 : (0:ℝ)≤d := by exact_mod_cast hd + have hd18' : (d:ℝ)≤18 := by exact_mod_cast hd18 + have hl : 0≤(piLow:ℝ)*d/36 := by + have : (0:ℝ)≤piLow := by norm_num [piLow] + positivity + have hlay : (piLow:ℝ)*d/36≤Real.pi*d/36 := by nlinarith [sine_pi_bounds.1] + have huay : Real.pi*d/36≤(piHigh:ℝ)*d/36 := by nlinarith [sine_pi_bounds.2] + have hx : 0≤Real.pi*d/36 := by positivity + have hx2 : Real.pi*d/36≤2 := by nlinarith [Real.pi_lt_four] + have hs := sinePolynomial_lower hx hx2 + have h3 := pow_le_pow_left₀ hx huay 3 + have h5 := pow_le_pow_left₀ hl hlay 5 + have h7 := pow_le_pow_left₀ hx huay 7 + have h9 := pow_le_pow_left₀ hl hlay 9 + have h11 := pow_le_pow_left₀ hx huay 11 + unfold sineLower + push_cast + unfold sinePolynomial at hs + linarith +lemma sine_arc_lower {d : ℚ} {t : ℝ} (hd : 0≤d) (hd18 : d≤18) + (ht : t∈Icc (d:ℝ) (36-d)) : (sineLower d:ℝ)≤2*|Real.sin (Real.pi*t/36)| := by + have hd0 : (0:ℝ)≤d := by exact_mod_cast hd + have hx0 : 0≤Real.pi*d/36 := by positivity + have hleft : -(Real.pi/2)≤Real.pi*d/36 := (neg_nonpos.mpr (by positivity)).trans hx0 + have hmon : Real.sin (Real.pi*d/36)≤Real.sin (Real.pi*t/36) := by + by_cases h : t≤18 + · exact Real.sin_le_sin_of_le_of_le_pi_div_two hleft (by nlinarith [Real.pi_pos]) (by nlinarith [Real.pi_pos,ht.1]) + · rw [show Real.pi*t/36=Real.pi-(Real.pi*(36-t)/36) by ring,Real.sin_pi_sub] + exact Real.sin_le_sin_of_le_of_le_pi_div_two hleft (by nlinarith [Real.pi_pos]) (by nlinarith [Real.pi_pos,ht.2]) + linarith [sine_lower hd hd18,le_abs_self (Real.sin (Real.pi*t/36))] + +def vanishingLower (v : ℚ) : ℚ := 2*(piLow/36-(piHigh/36)^3*v^2/6) +lemma sine_vanishing_lower {v : ℚ} {u : ℝ} (hv : 0≤v) (hv3 : v≤3) (hu : |u|≤v) : + (vanishingLower v:ℝ)*|u|≤2*|Real.sin (Real.pi*u/36)| := by + have hv0 : (0:ℝ)≤v := by exact_mod_cast hv + have hv3' : (v:ℝ)≤3 := by exact_mod_cast hv3 + have hp0 : (0:ℝ)≤piHigh := by norm_num [piHigh] + have hx : 0≤Real.pi*|u|/36 := by positivity + have hl : (piLow:ℝ)/36*|u|≤Real.pi*|u|/36 := by nlinarith [sine_pi_bounds.1,abs_nonneg u] + have hq : (Real.pi/36)^3≤((piHigh:ℝ)/36)^3 := pow_le_pow_left₀ (by positivity) (by linarith [sine_pi_bounds.2]) 3 + have hu2 : |u|^2≤(v:ℝ)^2 := (sq_le_sq₀ (abs_nonneg u) hv0).mpr hu + have hc : (Real.pi*|u|/36)^3≤((piHigh:ℝ)/36)^3*(v:ℝ)^2*|u| := by + have h1 := mul_le_mul_of_nonneg_right hq (pow_nonneg (abs_nonneg u) 3) + have h2 := mul_le_mul_of_nonneg_left hu2 (mul_nonneg (pow_nonneg (by positivity : 0≤(piHigh:ℝ)/36) 3) (abs_nonneg u)) + nlinarith + have hs := Real.sin_ge_sub_cube hx + have he : |Real.sin (Real.pi*u/36)|=Real.sin (Real.pi*|u|/36) := by + have hb : |Real.pi*u/36|≤Real.pi := by + rw [abs_div,abs_mul,abs_of_pos Real.pi_pos,abs_of_pos (by norm_num : (0:ℝ)<36)] + nlinarith [Real.pi_pos] + rw [Real.abs_sin_eq_sin_abs_of_abs_le_pi hb,abs_div,abs_mul,abs_of_pos Real.pi_pos,abs_of_pos (by norm_num : (0:ℝ)<36)] + rw [he] + unfold vanishingLower + push_cast + linarith +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGlobal.lean b/lean/OAI/Analysis/Triangular/Signs/SineGlobal.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dcecac79f9749e948f33596d69954aa231e5471 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGlobal.lean @@ -0,0 +1,100 @@ +import OAI.Analysis.Triangular.Signs.SineGridAnalytic +import OAI.Analysis.Triangular.Signs.SineGridChecks +import OAI.Analysis.Triangular.Signs.SineGridCover + +namespace OAI + +noncomputable section +open scoped BigOperators +open Set +namespace AtomicTriangular.Construction +lemma realP_local_strict (u : Fin 30) {x : ℝ} (hx : x∈Icc 0 1) + (hy : (localHalf u:ℝ)*x≠0) : + (cellBarrier u:ℝ)*((localHalf u:ℝ)*x)^2 norm_num +lemma realP_far_lower {s : ℝ} (hs : (23:ℝ) ≤ s) : + ∃ m : Node, 25 ≤ m.val ∧ (27/500:ℝ)*(s-m.val)^2 ≤ realP s := by + let q : ℕ := ⌊(s+5/2)/36⌋₊ + let t : ℝ := s-36*q + have hq0 : (q:ℝ) ≤ (s+5/2)/36 := Nat.floor_le (by linarith) + have hq1 : (s+5/2)/36<(q:ℝ)+1 := Nat.lt_floor_add_one _ + have ht : t∈Ico (-(5/2)) (67/2) := by dsimp [t]; constructor <;> linarith + obtain ⟨u,x,hx,htu,hcell⟩ := local_halfGap_cover ht + let m : ℤ := 36*(q:ℤ)+localCenter u + have hm : 25 ≤ m := by + by_cases hq : q=0 + · have ht0 : t=s := by simp [t,hq] + have hg := (local_boundary_geometry u).2.2.2.2.2.1 + by_contra! hh + have hu : localCenter u<25 := by simpa [m,hq] using hh + have hhB : (localBoundary (u.val+1):ℝ) ≤ 23 := by exact_mod_cast hg hu + linarith [hcell.2] + · have hqc : (1:ℤ) ≤ q := by exact_mod_cast (show 1 ≤ q by omega) + have huc := (local_boundary_geometry u).2.2.2.1 + dsimp [m] + omega + have hmres : m%36∈residues := by + simpa only [m,Int.add_emod,Int.mul_emod_right,zero_add,Int.emod_emod] using + (local_boundary_geometry u).2.2.2.2.1 + refine ⟨⟨m,by omega,hmres⟩,hm,?_⟩ + have hp := realP_local_lower u hx + have hp' := mul_le_mul_of_nonneg_right (cellBarrier_lower u) (sq_nonneg ((localHalf u:ℝ)*x)) + have hP : realP t=realP s := by + convert realP_periodic.sub_nat_mul_eq q using 1 + dsimp [t] + ring_nf + have hsm : s-(m:ℝ)=(localHalf u:ℝ)*x := by + dsimp [m,t] at * + push_cast + linarith + change (27/500:ℝ)*(s-(m:ℝ))^2 ≤ realP s + rw [hsm,←hP,htu] + exact hp'.trans hp +lemma strong_local_geometry (u : Fin 30) (hu : 16 ≤ u.val ∧ u.val ≤ 21) : + localCenter u∈({16,19,21}:Finset ℤ) ∧ cellBarrier u=3 := by + have hh : ∀ u : Fin 30,16 ≤ u.val ∧ u.val ≤ 21 → localCenter u∈({16,19,21}:Finset ℤ) := by decide +kernel + exact ⟨hh u hu,by simp [cellBarrier,hu]⟩ +lemma realP_middle_lower {s : ℝ} (hs : s∈Icc (29/2) 23) : + ∃ m : ℤ,m∈({16,19,21}:Finset ℤ) ∧ (3:ℝ)*(s-m)^2 ≤ realP s := by + by_cases he : s=23 + · subst s + refine ⟨21,by simp,?_⟩ + have hh := realP_local_lower (21:Fin 30) (x:=1) (by simp) + have hc : localCenter (21:Fin 30)=21 ∧ localHalf (21:Fin 30)=2 ∧ cellBarrier (21:Fin 30)=3 := by decide +kernel + rw [hc.1,hc.2.1,hc.2.2] at hh + norm_num at hh ⊢ + exact hh + · obtain ⟨u,x,hx,htu,hcell⟩ := local_halfGap_cover (t:=s) (by constructor <;> linarith [hs.1,hs.2]) + have hu : 16 ≤ u.val ∧ u.val ≤ 21 := by + have hg := local_boundary_geometry u + constructor + · by_contra! h + have hh : (localBoundary (u.val+1):ℝ) ≤ 29/2 := by + have ht := Rat.cast_le (K:=ℝ) |>.mpr (hg.2.2.2.2.2.2.1 h) + norm_num at ht ⊢ + exact ht + linarith [hcell.2,hs.1,hs.2] + · by_contra! h + have hh : (23:ℝ) ≤ localBoundary u.val := by exact_mod_cast hg.2.2.2.2.2.2.2 h + have hss : s<23 := lt_of_le_of_ne hs.2 he + linarith [hcell.1,hss] + refine ⟨localCenter u,(strong_local_geometry u hu).1,?_⟩ + have hh := realP_local_lower u hx + rw [(strong_local_geometry u hu).2] at hh + norm_num only [Rat.cast_ofNat] at hh + rw [htu] + simpa only [add_sub_cancel_left] using hh +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGrid0.lean b/lean/OAI/Analysis/Triangular/Signs/SineGrid0.lean new file mode 100644 index 0000000000000000000000000000000000000000..0258aaaef8377ff0e2028626fc62a0bbb5051ebc --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGrid0.lean @@ -0,0 +1,165 @@ +import OAI.Analysis.Triangular.Signs.SineGridDefs + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors00 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 0 k j) ∧ cellBarrier 0 < ∏ j : Fin 15,(cellFactor 0 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 0 k j) ∧ cellBarrier 0 < ∏ j : Fin 15,(cellFactor 0 k j)^2 by decide +kernel) k +lemma cellGeometry00 (k : Fin 100) : + 0≤cellMagnitude 0 k ∧ cellMagnitude 0 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 0 → 0≤cellSeparation 0 k j ∧ cellSeparation 0 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 0 k ∧ cellMagnitude 0 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 0 → 0≤cellSeparation 0 k j ∧ cellSeparation 0 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors01 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 1 k j) ∧ cellBarrier 1 < ∏ j : Fin 15,(cellFactor 1 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 1 k j) ∧ cellBarrier 1 < ∏ j : Fin 15,(cellFactor 1 k j)^2 by decide +kernel) k +lemma cellGeometry01 (k : Fin 100) : + 0≤cellMagnitude 1 k ∧ cellMagnitude 1 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 1 → 0≤cellSeparation 1 k j ∧ cellSeparation 1 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 1 k ∧ cellMagnitude 1 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 1 → 0≤cellSeparation 1 k j ∧ cellSeparation 1 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors02 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 2 k j) ∧ cellBarrier 2 < ∏ j : Fin 15,(cellFactor 2 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 2 k j) ∧ cellBarrier 2 < ∏ j : Fin 15,(cellFactor 2 k j)^2 by decide +kernel) k +lemma cellGeometry02 (k : Fin 100) : + 0≤cellMagnitude 2 k ∧ cellMagnitude 2 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 2 → 0≤cellSeparation 2 k j ∧ cellSeparation 2 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 2 k ∧ cellMagnitude 2 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 2 → 0≤cellSeparation 2 k j ∧ cellSeparation 2 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors03 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 3 k j) ∧ cellBarrier 3 < ∏ j : Fin 15,(cellFactor 3 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 3 k j) ∧ cellBarrier 3 < ∏ j : Fin 15,(cellFactor 3 k j)^2 by decide +kernel) k +lemma cellGeometry03 (k : Fin 100) : + 0≤cellMagnitude 3 k ∧ cellMagnitude 3 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 3 → 0≤cellSeparation 3 k j ∧ cellSeparation 3 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 3 k ∧ cellMagnitude 3 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 3 → 0≤cellSeparation 3 k j ∧ cellSeparation 3 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors04 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 4 k j) ∧ cellBarrier 4 < ∏ j : Fin 15,(cellFactor 4 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 4 k j) ∧ cellBarrier 4 < ∏ j : Fin 15,(cellFactor 4 k j)^2 by decide +kernel) k +lemma cellGeometry04 (k : Fin 100) : + 0≤cellMagnitude 4 k ∧ cellMagnitude 4 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 4 → 0≤cellSeparation 4 k j ∧ cellSeparation 4 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 4 k ∧ cellMagnitude 4 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 4 → 0≤cellSeparation 4 k j ∧ cellSeparation 4 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors05 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 5 k j) ∧ cellBarrier 5 < ∏ j : Fin 15,(cellFactor 5 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 5 k j) ∧ cellBarrier 5 < ∏ j : Fin 15,(cellFactor 5 k j)^2 by decide +kernel) k +lemma cellGeometry05 (k : Fin 100) : + 0≤cellMagnitude 5 k ∧ cellMagnitude 5 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 5 → 0≤cellSeparation 5 k j ∧ cellSeparation 5 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 5 k ∧ cellMagnitude 5 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 5 → 0≤cellSeparation 5 k j ∧ cellSeparation 5 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors06 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 6 k j) ∧ cellBarrier 6 < ∏ j : Fin 15,(cellFactor 6 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 6 k j) ∧ cellBarrier 6 < ∏ j : Fin 15,(cellFactor 6 k j)^2 by decide +kernel) k +lemma cellGeometry06 (k : Fin 100) : + 0≤cellMagnitude 6 k ∧ cellMagnitude 6 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 6 → 0≤cellSeparation 6 k j ∧ cellSeparation 6 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 6 k ∧ cellMagnitude 6 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 6 → 0≤cellSeparation 6 k j ∧ cellSeparation 6 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors07 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 7 k j) ∧ cellBarrier 7 < ∏ j : Fin 15,(cellFactor 7 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 7 k j) ∧ cellBarrier 7 < ∏ j : Fin 15,(cellFactor 7 k j)^2 by decide +kernel) k +lemma cellGeometry07 (k : Fin 100) : + 0≤cellMagnitude 7 k ∧ cellMagnitude 7 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 7 → 0≤cellSeparation 7 k j ∧ cellSeparation 7 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 7 k ∧ cellMagnitude 7 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 7 → 0≤cellSeparation 7 k j ∧ cellSeparation 7 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors08 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 8 k j) ∧ cellBarrier 8 < ∏ j : Fin 15,(cellFactor 8 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 8 k j) ∧ cellBarrier 8 < ∏ j : Fin 15,(cellFactor 8 k j)^2 by decide +kernel) k +lemma cellGeometry08 (k : Fin 100) : + 0≤cellMagnitude 8 k ∧ cellMagnitude 8 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 8 → 0≤cellSeparation 8 k j ∧ cellSeparation 8 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 8 k ∧ cellMagnitude 8 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 8 → 0≤cellSeparation 8 k j ∧ cellSeparation 8 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors09 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 9 k j) ∧ cellBarrier 9 < ∏ j : Fin 15,(cellFactor 9 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 9 k j) ∧ cellBarrier 9 < ∏ j : Fin 15,(cellFactor 9 k j)^2 by decide +kernel) k +lemma cellGeometry09 (k : Fin 100) : + 0≤cellMagnitude 9 k ∧ cellMagnitude 9 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 9 → 0≤cellSeparation 9 k j ∧ cellSeparation 9 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 9 k ∧ cellMagnitude 9 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 9 → 0≤cellSeparation 9 k j ∧ cellSeparation 9 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGrid1.lean b/lean/OAI/Analysis/Triangular/Signs/SineGrid1.lean new file mode 100644 index 0000000000000000000000000000000000000000..65e2b329b28eeb43e09c93c8993f71774b470299 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGrid1.lean @@ -0,0 +1,165 @@ +import OAI.Analysis.Triangular.Signs.SineGridDefs + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors10 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 10 k j) ∧ cellBarrier 10 < ∏ j : Fin 15,(cellFactor 10 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 10 k j) ∧ cellBarrier 10 < ∏ j : Fin 15,(cellFactor 10 k j)^2 by decide +kernel) k +lemma cellGeometry10 (k : Fin 100) : + 0≤cellMagnitude 10 k ∧ cellMagnitude 10 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 10 → 0≤cellSeparation 10 k j ∧ cellSeparation 10 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 10 k ∧ cellMagnitude 10 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 10 → 0≤cellSeparation 10 k j ∧ cellSeparation 10 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors11 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 11 k j) ∧ cellBarrier 11 < ∏ j : Fin 15,(cellFactor 11 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 11 k j) ∧ cellBarrier 11 < ∏ j : Fin 15,(cellFactor 11 k j)^2 by decide +kernel) k +lemma cellGeometry11 (k : Fin 100) : + 0≤cellMagnitude 11 k ∧ cellMagnitude 11 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 11 → 0≤cellSeparation 11 k j ∧ cellSeparation 11 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 11 k ∧ cellMagnitude 11 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 11 → 0≤cellSeparation 11 k j ∧ cellSeparation 11 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors12 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 12 k j) ∧ cellBarrier 12 < ∏ j : Fin 15,(cellFactor 12 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 12 k j) ∧ cellBarrier 12 < ∏ j : Fin 15,(cellFactor 12 k j)^2 by decide +kernel) k +lemma cellGeometry12 (k : Fin 100) : + 0≤cellMagnitude 12 k ∧ cellMagnitude 12 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 12 → 0≤cellSeparation 12 k j ∧ cellSeparation 12 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 12 k ∧ cellMagnitude 12 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 12 → 0≤cellSeparation 12 k j ∧ cellSeparation 12 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors13 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 13 k j) ∧ cellBarrier 13 < ∏ j : Fin 15,(cellFactor 13 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 13 k j) ∧ cellBarrier 13 < ∏ j : Fin 15,(cellFactor 13 k j)^2 by decide +kernel) k +lemma cellGeometry13 (k : Fin 100) : + 0≤cellMagnitude 13 k ∧ cellMagnitude 13 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 13 → 0≤cellSeparation 13 k j ∧ cellSeparation 13 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 13 k ∧ cellMagnitude 13 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 13 → 0≤cellSeparation 13 k j ∧ cellSeparation 13 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors14 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 14 k j) ∧ cellBarrier 14 < ∏ j : Fin 15,(cellFactor 14 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 14 k j) ∧ cellBarrier 14 < ∏ j : Fin 15,(cellFactor 14 k j)^2 by decide +kernel) k +lemma cellGeometry14 (k : Fin 100) : + 0≤cellMagnitude 14 k ∧ cellMagnitude 14 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 14 → 0≤cellSeparation 14 k j ∧ cellSeparation 14 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 14 k ∧ cellMagnitude 14 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 14 → 0≤cellSeparation 14 k j ∧ cellSeparation 14 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors15 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 15 k j) ∧ cellBarrier 15 < ∏ j : Fin 15,(cellFactor 15 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 15 k j) ∧ cellBarrier 15 < ∏ j : Fin 15,(cellFactor 15 k j)^2 by decide +kernel) k +lemma cellGeometry15 (k : Fin 100) : + 0≤cellMagnitude 15 k ∧ cellMagnitude 15 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 15 → 0≤cellSeparation 15 k j ∧ cellSeparation 15 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 15 k ∧ cellMagnitude 15 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 15 → 0≤cellSeparation 15 k j ∧ cellSeparation 15 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors16 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 16 k j) ∧ cellBarrier 16 < ∏ j : Fin 15,(cellFactor 16 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 16 k j) ∧ cellBarrier 16 < ∏ j : Fin 15,(cellFactor 16 k j)^2 by decide +kernel) k +lemma cellGeometry16 (k : Fin 100) : + 0≤cellMagnitude 16 k ∧ cellMagnitude 16 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 16 → 0≤cellSeparation 16 k j ∧ cellSeparation 16 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 16 k ∧ cellMagnitude 16 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 16 → 0≤cellSeparation 16 k j ∧ cellSeparation 16 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors17 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 17 k j) ∧ cellBarrier 17 < ∏ j : Fin 15,(cellFactor 17 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 17 k j) ∧ cellBarrier 17 < ∏ j : Fin 15,(cellFactor 17 k j)^2 by decide +kernel) k +lemma cellGeometry17 (k : Fin 100) : + 0≤cellMagnitude 17 k ∧ cellMagnitude 17 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 17 → 0≤cellSeparation 17 k j ∧ cellSeparation 17 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 17 k ∧ cellMagnitude 17 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 17 → 0≤cellSeparation 17 k j ∧ cellSeparation 17 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors18 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 18 k j) ∧ cellBarrier 18 < ∏ j : Fin 15,(cellFactor 18 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 18 k j) ∧ cellBarrier 18 < ∏ j : Fin 15,(cellFactor 18 k j)^2 by decide +kernel) k +lemma cellGeometry18 (k : Fin 100) : + 0≤cellMagnitude 18 k ∧ cellMagnitude 18 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 18 → 0≤cellSeparation 18 k j ∧ cellSeparation 18 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 18 k ∧ cellMagnitude 18 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 18 → 0≤cellSeparation 18 k j ∧ cellSeparation 18 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors19 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 19 k j) ∧ cellBarrier 19 < ∏ j : Fin 15,(cellFactor 19 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 19 k j) ∧ cellBarrier 19 < ∏ j : Fin 15,(cellFactor 19 k j)^2 by decide +kernel) k +lemma cellGeometry19 (k : Fin 100) : + 0≤cellMagnitude 19 k ∧ cellMagnitude 19 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 19 → 0≤cellSeparation 19 k j ∧ cellSeparation 19 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 19 k ∧ cellMagnitude 19 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 19 → 0≤cellSeparation 19 k j ∧ cellSeparation 19 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGrid2.lean b/lean/OAI/Analysis/Triangular/Signs/SineGrid2.lean new file mode 100644 index 0000000000000000000000000000000000000000..967546262a7229d14a17333e7cdd28ef1f2a360c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGrid2.lean @@ -0,0 +1,165 @@ +import OAI.Analysis.Triangular.Signs.SineGridDefs + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors20 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 20 k j) ∧ cellBarrier 20 < ∏ j : Fin 15,(cellFactor 20 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 20 k j) ∧ cellBarrier 20 < ∏ j : Fin 15,(cellFactor 20 k j)^2 by decide +kernel) k +lemma cellGeometry20 (k : Fin 100) : + 0≤cellMagnitude 20 k ∧ cellMagnitude 20 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 20 → 0≤cellSeparation 20 k j ∧ cellSeparation 20 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 20 k ∧ cellMagnitude 20 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 20 → 0≤cellSeparation 20 k j ∧ cellSeparation 20 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors21 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 21 k j) ∧ cellBarrier 21 < ∏ j : Fin 15,(cellFactor 21 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 21 k j) ∧ cellBarrier 21 < ∏ j : Fin 15,(cellFactor 21 k j)^2 by decide +kernel) k +lemma cellGeometry21 (k : Fin 100) : + 0≤cellMagnitude 21 k ∧ cellMagnitude 21 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 21 → 0≤cellSeparation 21 k j ∧ cellSeparation 21 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 21 k ∧ cellMagnitude 21 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 21 → 0≤cellSeparation 21 k j ∧ cellSeparation 21 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors22 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 22 k j) ∧ cellBarrier 22 < ∏ j : Fin 15,(cellFactor 22 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 22 k j) ∧ cellBarrier 22 < ∏ j : Fin 15,(cellFactor 22 k j)^2 by decide +kernel) k +lemma cellGeometry22 (k : Fin 100) : + 0≤cellMagnitude 22 k ∧ cellMagnitude 22 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 22 → 0≤cellSeparation 22 k j ∧ cellSeparation 22 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 22 k ∧ cellMagnitude 22 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 22 → 0≤cellSeparation 22 k j ∧ cellSeparation 22 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors23 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 23 k j) ∧ cellBarrier 23 < ∏ j : Fin 15,(cellFactor 23 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 23 k j) ∧ cellBarrier 23 < ∏ j : Fin 15,(cellFactor 23 k j)^2 by decide +kernel) k +lemma cellGeometry23 (k : Fin 100) : + 0≤cellMagnitude 23 k ∧ cellMagnitude 23 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 23 → 0≤cellSeparation 23 k j ∧ cellSeparation 23 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 23 k ∧ cellMagnitude 23 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 23 → 0≤cellSeparation 23 k j ∧ cellSeparation 23 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors24 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 24 k j) ∧ cellBarrier 24 < ∏ j : Fin 15,(cellFactor 24 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 24 k j) ∧ cellBarrier 24 < ∏ j : Fin 15,(cellFactor 24 k j)^2 by decide +kernel) k +lemma cellGeometry24 (k : Fin 100) : + 0≤cellMagnitude 24 k ∧ cellMagnitude 24 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 24 → 0≤cellSeparation 24 k j ∧ cellSeparation 24 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 24 k ∧ cellMagnitude 24 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 24 → 0≤cellSeparation 24 k j ∧ cellSeparation 24 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors25 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 25 k j) ∧ cellBarrier 25 < ∏ j : Fin 15,(cellFactor 25 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 25 k j) ∧ cellBarrier 25 < ∏ j : Fin 15,(cellFactor 25 k j)^2 by decide +kernel) k +lemma cellGeometry25 (k : Fin 100) : + 0≤cellMagnitude 25 k ∧ cellMagnitude 25 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 25 → 0≤cellSeparation 25 k j ∧ cellSeparation 25 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 25 k ∧ cellMagnitude 25 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 25 → 0≤cellSeparation 25 k j ∧ cellSeparation 25 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors26 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 26 k j) ∧ cellBarrier 26 < ∏ j : Fin 15,(cellFactor 26 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 26 k j) ∧ cellBarrier 26 < ∏ j : Fin 15,(cellFactor 26 k j)^2 by decide +kernel) k +lemma cellGeometry26 (k : Fin 100) : + 0≤cellMagnitude 26 k ∧ cellMagnitude 26 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 26 → 0≤cellSeparation 26 k j ∧ cellSeparation 26 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 26 k ∧ cellMagnitude 26 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 26 → 0≤cellSeparation 26 k j ∧ cellSeparation 26 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors27 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 27 k j) ∧ cellBarrier 27 < ∏ j : Fin 15,(cellFactor 27 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 27 k j) ∧ cellBarrier 27 < ∏ j : Fin 15,(cellFactor 27 k j)^2 by decide +kernel) k +lemma cellGeometry27 (k : Fin 100) : + 0≤cellMagnitude 27 k ∧ cellMagnitude 27 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 27 → 0≤cellSeparation 27 k j ∧ cellSeparation 27 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 27 k ∧ cellMagnitude 27 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 27 → 0≤cellSeparation 27 k j ∧ cellSeparation 27 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors28 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 28 k j) ∧ cellBarrier 28 < ∏ j : Fin 15,(cellFactor 28 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 28 k j) ∧ cellBarrier 28 < ∏ j : Fin 15,(cellFactor 28 k j)^2 by decide +kernel) k +lemma cellGeometry28 (k : Fin 100) : + 0≤cellMagnitude 28 k ∧ cellMagnitude 28 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 28 → 0≤cellSeparation 28 k j ∧ cellSeparation 28 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 28 k ∧ cellMagnitude 28 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 28 → 0≤cellSeparation 28 k j ∧ cellSeparation 28 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cellFactors29 (k : Fin 100) : + (∀ j : Fin 15, 0≤cellFactor 29 k j) ∧ cellBarrier 29 < ∏ j : Fin 15,(cellFactor 29 k j)^2 := by + exact (show ∀ k : Fin 100, + (∀ j : Fin 15, 0≤cellFactor 29 k j) ∧ cellBarrier 29 < ∏ j : Fin 15,(cellFactor 29 k j)^2 by decide +kernel) k +lemma cellGeometry29 (k : Fin 100) : + 0≤cellMagnitude 29 k ∧ cellMagnitude 29 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 29 → 0≤cellSeparation 29 k j ∧ cellSeparation 29 k j≤18) := by + exact (show ∀ k : Fin 100, + 0≤cellMagnitude 29 k ∧ cellMagnitude 29 k≤3 ∧ + (∀ j : Fin 15,j≠localPivot 29 → 0≤cellSeparation 29 k j ∧ cellSeparation 29 k j≤18) by decide +kernel) k +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGridAnalytic.lean b/lean/OAI/Analysis/Triangular/Signs/SineGridAnalytic.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2d0f6f29afc06f2262f435e2c9296eea16e6c11 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGridAnalytic.lean @@ -0,0 +1,92 @@ +import OAI.Analysis.Triangular.Signs.SineGridDefs + +namespace OAI + +noncomputable section +open scoped BigOperators +open Set +namespace AtomicTriangular.Construction + +def realP (s : ℝ) : ℝ := ∏ a : Fin 15,(2*Real.sin (Real.pi*(s-residue a)/36))^2 +lemma P_ofReal (s : ℝ) : P (s:ℂ)=(realP s:ℂ) := by + unfold P realP sineFactor kappa + push_cast + congr 1 + funext a + ring_nf +lemma realP_nonneg (s : ℝ) : 0≤realP s := Finset.prod_nonneg (fun _ _ => sq_nonneg _) +lemma realP_periodic : Function.Periodic realP 36 := by + intro s + unfold realP + apply Finset.prod_congr rfl + intro a _ + rw [show Real.pi*(s+36-residue a)/36=Real.pi*(s-residue a)/36+Real.pi by ring,Real.sin_add_pi] + ring +lemma sin_abs_local (u : Fin 30) (j : Fin 15) (y : ℝ) : + |Real.sin (Real.pi*((localCenter u:ℝ)+y-residue j)/36)|= + |Real.sin (Real.pi*((localPhase u j:ℝ)+y)/36)| := by + have he : (localCenter u:ℝ)-residue j=localPhase u j+36*(localShift u j:ℝ) := by + exact_mod_cast (local_geometry u).2.2 j + rw [show (localCenter u:ℝ)+y-residue j=(localPhase u j:ℝ)+y+36*(localShift u j:ℝ) by linarith, + show Real.pi*((localPhase u j:ℝ)+y+36*(localShift u j:ℝ))/36= + Real.pi*((localPhase u j:ℝ)+y)/36+(localShift u j:ℝ)*Real.pi by ring, + Real.sin_add_int_mul_pi,abs_mul,abs_zpow] + norm_num +lemma abs_cell_le (u : Fin 30) (k : Fin 100) {y : ℝ} + (hy : y∈Icc (cellLo u k:ℝ) (cellHi u k:ℝ)) : |y|≤(cellMagnitude u k:ℝ) := by + unfold cellMagnitude + push_cast + rw [abs_le] + constructor + · linarith [neg_abs_le (cellLo u k:ℝ),le_max_left |(cellLo u k:ℝ)| |(cellHi u k:ℝ)|,hy.1] + · exact hy.2.trans ((le_abs_self _).trans (le_max_right _ _)) +lemma cell_factor_lower (u : Fin 30) (k : Fin 100) + (hg : 0≤cellMagnitude u k ∧ cellMagnitude u k≤3 ∧ + (∀ j : Fin 15,j≠localPivot u → 0≤cellSeparation u k j ∧ cellSeparation u k j≤18)) + (j : Fin 15) {y : ℝ} (hy : y∈Icc (cellLo u k:ℝ) (cellHi u k:ℝ)) : + (cellFactor u k j:ℝ)*(if j=localPivot u then |y| else 1)≤ + 2*|Real.sin (Real.pi*((localCenter u:ℝ)+y-residue j)/36)| := by + rw [sin_abs_local] + by_cases hj : j=localPivot u + · subst j + simpa only [cellFactor,ite_true,(local_geometry u).2.1,Int.cast_zero,zero_add] using + sine_vanishing_lower hg.1 hg.2.1 (abs_cell_le u k hy) + · have hsep : (cellSeparation u k j:ℝ)= + min ((localPhase u j:ℝ)+(cellLo u k:ℝ)) (36-((localPhase u j:ℝ)+(cellHi u k:ℝ))) := by + unfold cellSeparation + push_cast + rfl + have ht : (localPhase u j:ℝ)+y∈Icc (cellSeparation u k j:ℝ) (36-cellSeparation u k j) := by + rw [hsep] + constructor <;> linarith [min_le_left ((localPhase u j:ℝ)+(cellLo u k:ℝ)) + (36-((localPhase u j:ℝ)+(cellHi u k:ℝ))), + min_le_right ((localPhase u j:ℝ)+(cellLo u k:ℝ)) + (36-((localPhase u j:ℝ)+(cellHi u k:ℝ))),hy.1,hy.2] + simpa only [cellFactor,ite_eq_right hj,mul_one] using sine_arc_lower (hg.2.2 j hj).1 (hg.2.2 j hj).2 ht +lemma realP_cell_lower (u : Fin 30) (k : Fin 100) + (hg : 0≤cellMagnitude u k ∧ cellMagnitude u k≤3 ∧ + (∀ j : Fin 15,j≠localPivot u → 0≤cellSeparation u k j ∧ cellSeparation u k j≤18)) + (hn : ∀ j : Fin 15,0≤cellFactor u k j) + (hp : cellBarrier u < ∏ j : Fin 15,(cellFactor u k j)^2) + {y : ℝ} (hy : y∈Icc (cellLo u k:ℝ) (cellHi u k:ℝ)) (hy0 : y≠0) : + (cellBarrier u:ℝ)*y^2 sq_nonneg _) + intro j _ + have hnon : 0≤(cellFactor u k j:ℝ) := by exact_mod_cast hn j + apply (sq_le_sq₀ (by positivity) (by positivity)).mpr + exact cell_factor_lower u k hg j hy + _ = _ := by simp [realP,mul_pow,sq_abs] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGridChecks.lean b/lean/OAI/Analysis/Triangular/Signs/SineGridChecks.lean new file mode 100644 index 0000000000000000000000000000000000000000..b72c2b14c619797d94051e1b0a64440504522dc7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGridChecks.lean @@ -0,0 +1,80 @@ +import OAI.Analysis.Triangular.Signs.SineGrid0 +import OAI.Analysis.Triangular.Signs.SineGrid1 +import OAI.Analysis.Triangular.Signs.SineGrid2 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +lemma cell_geometry (u : Fin 30) (k : Fin 100) : + 0≤cellMagnitude u k ∧ cellMagnitude u k≤3 ∧ + (∀ j : Fin 15,j≠localPivot u → 0≤cellSeparation u k j ∧ cellSeparation u k j≤18) := by + fin_cases u + · exact cellGeometry00 k + · exact cellGeometry01 k + · exact cellGeometry02 k + · exact cellGeometry03 k + · exact cellGeometry04 k + · exact cellGeometry05 k + · exact cellGeometry06 k + · exact cellGeometry07 k + · exact cellGeometry08 k + · exact cellGeometry09 k + · exact cellGeometry10 k + · exact cellGeometry11 k + · exact cellGeometry12 k + · exact cellGeometry13 k + · exact cellGeometry14 k + · exact cellGeometry15 k + · exact cellGeometry16 k + · exact cellGeometry17 k + · exact cellGeometry18 k + · exact cellGeometry19 k + · exact cellGeometry20 k + · exact cellGeometry21 k + · exact cellGeometry22 k + · exact cellGeometry23 k + · exact cellGeometry24 k + · exact cellGeometry25 k + · exact cellGeometry26 k + · exact cellGeometry27 k + · exact cellGeometry28 k + · exact cellGeometry29 k +lemma cell_factors (u : Fin 30) (k : Fin 100) : + (∀ j : Fin 15,0≤cellFactor u k j) ∧ cellBarrier u < ∏ j : Fin 15,(cellFactor u k j)^2 := by + fin_cases u + · exact cellFactors00 k + · exact cellFactors01 k + · exact cellFactors02 k + · exact cellFactors03 k + · exact cellFactors04 k + · exact cellFactors05 k + · exact cellFactors06 k + · exact cellFactors07 k + · exact cellFactors08 k + · exact cellFactors09 k + · exact cellFactors10 k + · exact cellFactors11 k + · exact cellFactors12 k + · exact cellFactors13 k + · exact cellFactors14 k + · exact cellFactors15 k + · exact cellFactors16 k + · exact cellFactors17 k + · exact cellFactors18 k + · exact cellFactors19 k + · exact cellFactors20 k + · exact cellFactors21 k + · exact cellFactors22 k + · exact cellFactors23 k + · exact cellFactors24 k + · exact cellFactors25 k + · exact cellFactors26 k + · exact cellFactors27 k + · exact cellFactors28 k + · exact cellFactors29 k +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGridCover.lean b/lean/OAI/Analysis/Triangular/Signs/SineGridCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bdf71e0759c80c03005d3eb395441544631422d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGridCover.lean @@ -0,0 +1,95 @@ +import OAI.Analysis.Triangular.Signs.SineGridDefs + +namespace OAI + +noncomputable section +open scoped BigOperators +open Set +namespace AtomicTriangular.Construction +lemma unit_grid_cover {x : ℝ} (hx : x∈Icc 0 1) : + ∃ k : Fin 100, (k.val:ℝ)/100≤x ∧ x≤(k.val+1:ℝ)/100 := by + by_cases he : x=1 + · subst x + exact ⟨99,by norm_num,by norm_num⟩ + · have hx1 : x<1 := lt_of_le_of_ne hx.2 he + let n : ℕ := ⌊100*x⌋₊ + have hn1 : (n:ℝ)≤100*x := Nat.floor_le (by nlinarith [hx.1]) + have hn2 : 100*x<(n:ℝ)+1 := Nat.lt_floor_add_one _ + have hn : n<100 := by + by_contra! hh + have : (100:ℝ)≤n := by exact_mod_cast hh + nlinarith + exact ⟨⟨n,hn⟩,by dsimp; linarith,by dsimp; linarith⟩ +lemma cell_displacement (u : Fin 30) (k : Fin 100) {x : ℝ} + (hx : (k.val:ℝ)/100≤x ∧ x≤(k.val+1:ℝ)/100) : + (localHalf u:ℝ)*x∈Icc (cellLo u k:ℝ) (cellHi u k:ℝ) := by + have hlo : (cellLo u k:ℝ)=min ((localHalf u:ℝ)*k.val/100) ((localHalf u:ℝ)*(k.val+1)/100) := by + unfold cellLo; push_cast; rfl + have hhi : (cellHi u k:ℝ)=max ((localHalf u:ℝ)*k.val/100) ((localHalf u:ℝ)*(k.val+1)/100) := by + unfold cellHi; push_cast; rfl + rw [hlo,hhi] + by_cases h : 0≤(localHalf u:ℝ) + · have hab : (localHalf u:ℝ)*k.val/100≤(localHalf u:ℝ)*(k.val+1)/100 := by nlinarith + rw [min_eq_left hab,max_eq_right hab] + constructor <;> nlinarith [mul_le_mul_of_nonneg_left hx.1 h,mul_le_mul_of_nonneg_left hx.2 h] + · have h := le_of_not_ge h + have hab : (localHalf u:ℝ)*(k.val+1)/100≤(localHalf u:ℝ)*k.val/100 := by nlinarith + rw [min_eq_right hab,max_eq_left hab] + constructor <;> nlinarith [mul_le_mul_of_nonpos_left hx.1 h,mul_le_mul_of_nonpos_left hx.2 h] +def localBoundary (n : ℕ) : ℚ := + if hn : n<31 then ![-5/2,0,1/2,1,2,3,7/2,4,11/2,7,8,9,21/2,12,25/2,13,29/2,16,35/2,19,20,21,23,25,26,27,55/2,28,59/2,31,67/2] ⟨n,hn⟩ else 0 +lemma local_boundary_end : localBoundary 0= -5/2 ∧ localBoundary 30=67/2 := by decide +kernel +lemma local_boundary_geometry (u : Fin 30) : + min (localCenter u:ℚ) ((localCenter u:ℚ)+localHalf u)=localBoundary u.val ∧ + max (localCenter u:ℚ) ((localCenter u:ℚ)+localHalf u)=localBoundary (u.val+1) ∧ + localHalf u≠0 ∧ 0≤localCenter u ∧ localCenter u%36∈residues ∧ + (localCenter u<25 → localBoundary (u.val+1)≤23) ∧ + (u.val<16 → localBoundary (u.val+1)≤29/2) ∧ + (21 (q:ℝ)) hg.1 + have hg₂ : max (localCenter u:ℝ) ((localCenter u:ℝ)+(localHalf u:ℝ))=(localBoundary (u.val+1):ℝ) := by + simpa only [Rat.cast_max,Rat.cast_add,Rat.cast_intCast] using congrArg (fun q : ℚ => (q:ℝ)) hg.2.1 + have hu : t<(localBoundary (u.val+1):ℝ) := by simpa only [u,show n-1+1=n by omega] using hn.2.2 + have hb : t∈uIcc (localCenter u:ℝ) ((localCenter u:ℝ)+(localHalf u:ℝ)) := by + rw [uIcc,mem_Icc,hg₁,hg₂] + exact ⟨hl,hu.le⟩ + have hne : (localHalf u:ℝ)≠0 := by exact_mod_cast hg.2.2.1 + refine ⟨u,(t-localCenter u)/(localHalf u:ℝ),?_,?_,hl,hu⟩ + · by_cases hp : 0<(localHalf u:ℝ) + · rw [uIcc_of_le (by linarith)] at hb + exact ⟨div_nonneg (sub_nonneg.mpr hb.1) hp.le,(div_le_one hp).mpr (by linarith [hb.2])⟩ + · have hp : (localHalf u:ℝ)<0 := lt_of_le_of_ne (le_of_not_gt hp) hne + rw [uIcc_of_ge (by linarith)] at hb + exact ⟨div_nonneg_of_nonpos (sub_nonpos.mpr hb.2) hp.le,(div_le_one_of_neg hp).mpr (by linarith [hb.1])⟩ + · field_simp + ring +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Signs/SineGridDefs.lean b/lean/OAI/Analysis/Triangular/Signs/SineGridDefs.lean new file mode 100644 index 0000000000000000000000000000000000000000..3139d0340a445a2c5581a3c304625ed4398facae --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Signs/SineGridDefs.lean @@ -0,0 +1,31 @@ +import OAI.Analysis.Triangular.Signs.SineBarrierBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction + +def localCenter (u : Fin 30) : ℤ := residue ⟨u.val/2,by omega⟩ +def localNeighbor : Fin 30 → ℤ := ![-5,1,0,3,1,4,3,7,4,9,7,12,9,13,12,16,13,19,16,21,19,25,21,27,25,28,27,31,28,36] +def localPivot (u : Fin 30) : Fin 15 := ⟨u.val/2,by omega⟩ +def localHalf (u : Fin 30) : ℚ := ((localNeighbor u:ℚ)-localCenter u)/2 +def localPhase (u : Fin 30) (j : Fin 15) : ℤ := (localCenter u-residue j)%36 +def localShift (u : Fin 30) (j : Fin 15) : ℤ := (localCenter u-residue j)/36 +def cellLo (u : Fin 30) (k : Fin 100) : ℚ := min (localHalf u*k.val/100) (localHalf u*(k.val+1)/100) +def cellHi (u : Fin 30) (k : Fin 100) : ℚ := max (localHalf u*k.val/100) (localHalf u*(k.val+1)/100) +def cellMagnitude (u : Fin 30) (k : Fin 100) : ℚ := max |cellLo u k| |cellHi u k| +def cellSeparation (u : Fin 30) (k : Fin 100) (j : Fin 15) : ℚ := + min ((localPhase u j:ℚ)+cellLo u k) (36-((localPhase u j:ℚ)+cellHi u k)) +def cellFactor (u : Fin 30) (k : Fin 100) (j : Fin 15) : ℚ := + if j=localPivot u then vanishingLower (cellMagnitude u k) else sineLower (cellSeparation u k j) +def cellBarrier (u : Fin 30) : ℚ := if 16≤u.val ∧ u.val≤21 then 3 else 27/500 +lemma local_geometry (u : Fin 30) : + |localHalf u|≤5/2 ∧ localPhase u (localPivot u)=0 ∧ + ∀ j : Fin 15,localCenter u-residue j=localPhase u j+36*localShift u j := by + exact (show ∀ u : Fin 30, |localHalf u|≤5/2 ∧ localPhase u (localPivot u)=0 ∧ + ∀ j : Fin 15,localCenter u-residue j=localPhase u j+36*localShift u j by decide +kernel) u +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/CoefficientSpectral.lean b/lean/OAI/Analysis/Triangular/Taylor/CoefficientSpectral.lean new file mode 100644 index 0000000000000000000000000000000000000000..1741fcf630507a900511573be99d2cfd9aae53ac --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/CoefficientSpectral.lean @@ -0,0 +1,120 @@ +import OAI.Analysis.Triangular.Construction.ActualInput +import OAI.Analysis.Triangular.Taylor.WaveFunction +import OAI.Analysis.Triangular.Taylor.VariationBound + +namespace OAI + +noncomputable section +open scoped BigOperators lp +namespace AtomicTriangular.Construction +open Complex AtomicTriangular.L1Kernel AtomicTriangular.FiniteCertificate +lemma finiteColumn_even (j : Fin 11) (l : Fin 31) : + finiteColumn ⟨2*j.val,by omega⟩ l=cCoefficient ⟨j.val,by omega⟩ l := by + simp only [finiteColumn,show 2*j.val<22 by omega,↓reduceDIte, + show 2*j.val%2=0 by omega,↓reduceIte] + congr 2 + omega +lemma finiteColumn_odd (j : Fin 11) (l : Fin 31) : + finiteColumn ⟨2*j.val+1,by omega⟩ l=dCoefficient ⟨j.val,by omega⟩ l := by + simp only [finiteColumn,show 2*j.val+1<22 by omega,↓reduceDIte, + show ¬((2*j.val+1)%2=0) by omega,↓reduceIte] + congr 2 + omega +lemma sum_fin22_pairs {M : Type*} [AddCommMonoid M] (g : Fin 22 → M) : + (∑ c : Fin 22, g c)=∑ j : Fin 11, (g ⟨2*j.val,by omega⟩+g ⟨2*j.val+1,by omega⟩) := by + have hh := (finProdFinEquiv (m:=11) (n:=2)).sum_comp g + rw [Fintype.sum_prod_type] at hh + simp only [Fin.sum_univ_two] at hh + convert hh.symm using 1 + apply Finset.sum_congr rfl + intro i _ + congr 2 <;> apply Fin.ext <;> simp [finProdFinEquiv, mul_comm, add_comm] +lemma finiteSpectral_coefficient (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) : + finiteSpectral (coefficientInput C a w)=∑ c : Fin 22, + (a c:ℂ) • atomSpectral (finiteColumn ⟨c.val,by omega⟩) := by + rw [sum_fin22_pairs] + simp only [finiteSpectral,coefficientInput] + apply Finset.sum_congr rfl + intro j _ + congr 2 <;> congr 1 <;> funext l + · exact (finiteColumn_even j l).symm + · exact (finiteColumn_odd j l).symm +lemma finiteSpectral_coefficient_apply (C : ℝ) (a : TrigonometricCoefficients) + (w : TailCoefficients) (f : C(Spectrum,ℂ)) : + finiteSpectral (coefficientInput C a w) f=∑ c : Fin 22, + (a c:ℂ)*(∑ j : Fin 31, finiteColumn ⟨c.val,by omega⟩ j*f ⟨frequency j,frequency_mem j⟩) := by + rw [finiteSpectral_coefficient] + simp only [sum_apply,smul_apply,smul_eq_mul,atomSpectral_apply] +lemma tailSpectral_coefficient (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) : + tailSpectral (coefficientInput C a w)= (C:ℂ) • spectralPCLM+ + ∑' n : TailNode, ((w (n,0):ℂ) • spectralCCLM n.val+(w (n,1):ℂ) • spectralDCLM n.val) := rfl +lemma tailSpectral_zero_coeff (C : ℝ) (a : TrigonometricCoefficients) : + tailSpectral (coefficientInput C a 0)=(C:ℂ) • spectralPCLM := by + ext f + simp [tailSpectral_apply,coefficientInput,spectralPCLM_apply] +lemma complex_smul_clm_bound (r : ℝ) (T : C(Spectrum,ℂ) →L[ℂ] ℂ) : + ‖(r:ℂ) • T‖ ≤ |r| * ‖T‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (mul_nonneg (abs_nonneg r) (norm_nonneg T)) + intro f + change ‖(r:ℂ) * T f‖ ≤ _ + rw [norm_mul,Complex.norm_real,Real.norm_eq_abs,mul_assoc] + exact mul_le_mul_of_nonneg_left (T.le_opNorm f) (abs_nonneg r) +lemma tail_pair_norm119 (n : Node) (u v : ℝ) : + ‖(u:ℂ) • spectralCCLM n+(v:ℂ) • spectralDCLM n‖ ≤ 119*(|u|+|v|) := by + have h0 := (spectralCCLM_norm n).trans cVariation_lt.le + have h1 := (spectralDCLM_norm n).trans dVariation_lt.le + have hsum := norm_add_le ((u:ℂ) • spectralCCLM n) ((v:ℂ) • spectralDCLM n) + have hsm := add_le_add (complex_smul_clm_bound u (spectralCCLM n)) + (complex_smul_clm_bound v (spectralDCLM n)) + have hh : ‖(u:ℂ) • spectralCCLM n+(v:ℂ) • spectralDCLM n‖ ≤ + |u| * ‖spectralCCLM n‖+|v| * ‖spectralDCLM n‖ := by + exact hsum.trans hsm + nlinarith [mul_le_mul_of_nonneg_left h0 (abs_nonneg u),mul_le_mul_of_nonneg_left h1 (abs_nonneg v)] +lemma norm_series_bound {ι E : Type*} [NormedAddCommGroup E] [CompleteSpace E] + (g : ι → E) (v : ι → ℝ) (hv : Summable v) (M : ℝ) + (hb : ∀ i, ‖g i‖≤M*v i) : ‖∑' i, g i‖≤M*∑' i,v i := by + have hs : Summable (fun i => ‖g i‖) := Summable.of_nonneg_of_le (fun _ => norm_nonneg _) hb (hv.mul_left M) + exact (norm_tsum_le_tsum_norm hs).trans ((hs.tsum_le_tsum hb (hv.mul_left M)).trans_eq (tsum_mul_left)) +lemma tailSeries_norm (w : TailCoefficients) : + ‖∑' n : TailNode, ((w (n,0):ℂ) • spectralCCLM n.val+(w (n,1):ℂ) • spectralDCLM n.val)‖ ≤ 119*‖w‖ := by + have hh := norm_series_bound (fun n : TailNode => (w (n,0):ℂ) • spectralCCLM n.val+(w (n,1):ℂ) • spectralDCLM n.val) + (fun n => |w (n,0)|+|w (n,1)|) (tail_pairs_summable w) 119 + (fun n => tail_pair_norm119 n.val (w (n,0)) (w (n,1))) + rw [tail_pairs_norm] at hh + exact hh +lemma tailSpectral_zero_constant (a : TrigonometricCoefficients) (w : TailCoefficients) : + tailSpectral (coefficientInput 0 a w)= + ∑' n : TailNode, ((w (n,0):ℂ) • spectralCCLM n.val+(w (n,1):ℂ) • spectralDCLM n.val) := by + have hz : (0:ℂ) • spectralPCLM=(0:C(Spectrum,ℂ) →L[ℂ] ℂ) := by + ext f + change (0:ℂ)*_=0 + exact zero_mul _ + change (0:ℂ) • spectralPCLM+_= _ + rw [hz,zero_add] + rfl +lemma tailSpectral_zero_constant_norm (a : TrigonometricCoefficients) (w : TailCoefficients) : + ‖tailSpectral (coefficientInput 0 a w)‖ ≤ 119*‖w‖ := by + rw [tailSpectral_zero_constant] + exact tailSeries_norm w +lemma finiteSpectral_wave_bound (C : ℝ) (a : TrigonometricCoefficients) (w : TailCoefficients) + (br : Fin 2) (s : ℝ) {M : ℝ} (hb : ∀ c : Fin 22, rawCurvatureColumn br s c ≤ M) : + ‖finiteSpectral (coefficientInput C a w) (waveFunctionJet 1 br 2 s)‖ ≤ ‖a‖*M := by + rw [finiteSpectral_coefficient_apply] + calc + _ ≤ ∑ c : Fin 22, ‖(a c:ℂ)*(∑ j : Fin 31, finiteColumn ⟨c.val,by omega⟩ j * waveFunctionJet 1 br 2 s ⟨frequency j,frequency_mem j⟩)‖ := norm_sum_le _ _ + _ ≤ ∑ c : Fin 22, |a c| * rawCurvatureColumn br s c := by + apply Finset.sum_le_sum + intro c _ + rw [norm_mul,Complex.norm_real,Real.norm_eq_abs] + apply mul_le_mul_of_nonneg_left _ (abs_nonneg _) + refine (norm_sum_le _ _).trans ?_ + apply Finset.sum_le_sum + intro j _ + rw [norm_mul,waveFunctionJet_apply,norm_finiteWaveJet_two] + exact le_of_eq (mul_comm _ _) + _ ≤ ∑ c : Fin 22, |a c| * M := Finset.sum_le_sum fun c _ => mul_le_mul_of_nonneg_left (hb c) (abs_nonneg _) + _ = _ := by rw [←Finset.sum_mul,l1_norm,tsum_fintype] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/CurvatureData00.lean b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData00.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ec1193432aff7ea88b12dc40d3d44e40a94c322 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData00.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Construction.CurvatureBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvatureData00_0 : Fin 31 → RI := ![⟨6853891945200943485301729861025104955078957921694968091335063,6853891945200943485301729861025104955078957921695011725457718⟩,⟨5970501427819488547196173567826313649757670011787616648451868,5970501427819488547196173567826313649757670011787654658620941⟩,⟨5148034394395375328959965984503301055148195061184220477491670,5148034394395375328959965984503301055148195061184253251566020⟩,⟨4386490844928603830593107111056067171250533069884779578454432,4386490844928603830593107111056067171250533069884807504292938⟩,⟨3685870779419174052095596947484611998064684037889293951340190,3685870779419174052095596947484611998064684037889317416801713⟩,⟨3046174197867085993467435493788935535590647965197763596148910,3046174197867085993467435493788935535590647965197782989092322⟩,⟨2467401100272339654708622749969037783828424851810188512880611,2467401100272339654708622749969037783828424851810204221164776⟩,⟨1949551486634935035819158716024918742778014697726568701535301,1949551486634935035819158716024918742778014697726581113019088⟩,⟨1492625356954872136799043391956578412439417502946904162112959,1492625356954872136799043391956578412439417502946913664655238⟩,⟨1096622711232150957648276777764016792812633267471194894613605,1096622711232150957648276777764016792812633267471201876073241⟩,⟨761543549466771498366858873447233883897661991299440899037221,761543549466771498366858873447233883897661991299445747273083⟩,⟨487387871658733758954789679006229685694503674431642175383823,487387871658733758954789679006229685694503674431645278254776⟩,⟨274155677808037739412069194441004198203158316867798723653397,274155677808037739412069194441004198203158316867800469018313⟩,⟨121846967914683439738697419751557421423625918607910543845954,121846967914683439738697419751557421423625918607911319563697⟩,⟨30461741978670859934674354937889355355906479651977635961487,30461741978670859934674354937889355355906479651977829890927⟩,⟨-2,4⟩,⟨30461741978670859934674354937889355355906479651977635961487,30461741978670859934674354937889355355906479651977829890927⟩,⟨121846967914683439738697419751557421423625918607910543845955,121846967914683439738697419751557421423625918607911319563698⟩,⟨274155677808037739412069194441004198203158316867798723653398,274155677808037739412069194441004198203158316867800469018314⟩,⟨487387871658733758954789679006229685694503674431642175383825,487387871658733758954789679006229685694503674431645278254778⟩,⟨761543549466771498366858873447233883897661991299440899037223,761543549466771498366858873447233883897661991299445747273085⟩,⟨1096622711232150957648276777764016792812633267471194894613607,1096622711232150957648276777764016792812633267471201876073243⟩,⟨1492625356954872136799043391956578412439417502946904162112962,1492625356954872136799043391956578412439417502946913664655240⟩,⟨1949551486634935035819158716024918742778014697726568701535304,1949551486634935035819158716024918742778014697726581113019091⟩,⟨2467401100272339654708622749969037783828424851810188512880627,2467401100272339654708622749969037783828424851810204221164791⟩,⟨3046174197867085993467435493788935535590647965197763596148914,3046174197867085993467435493788935535590647965197782989092326⟩,⟨3685870779419174052095596947484611998064684037889293951340194,3685870779419174052095596947484611998064684037889317416801717⟩,⟨4386490844928603830593107111056067171250533069884779578454436,4386490844928603830593107111056067171250533069884807504292942⟩,⟨5148034394395375328959965984503301055148195061184220477491675,5148034394395375328959965984503301055148195061184253251566025⟩,⟨5970501427819488547196173567826313649757670011787616648451873,5970501427819488547196173567826313649757670011787654658620946⟩,⟨6853891945200943485301729861025104955078957921694968091335069,6853891945200943485301729861025104955078957921695011725457723⟩] +lemma curvatureData00_0_calc (j : Fin 31) : curvatureBox 0 0 0 j=curvatureData00_0 j := by + revert j + decide +kernel +lemma curvatureData00_0_pre (j : Fin 31) : (curvatureExpInput 0 0 0 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData00_0_mem (j : Fin 31) : (curvatureData00_0 j).Mem (curvatureWave 0 0 (curvaturePoint 0) (frequency j)) := by + rw [← curvatureData00_0_calc] + exact curvatureBox_mem 0 0 0 j (curvatureData00_0_pre j) +def curvatureData00_1 : Fin 31 → RI := ![⟨6853891945200943485301729861025104955078957921694968091328045,6853891945200943485301729861025104955078957921695011725457718⟩,⟨5970501427819488547196173567826313649757670011787616648445754,5970501427819488547196173567826313649757670011787654658620941⟩,⟨5148034394395375328959965984503301055148195061184220477486399,5148034394395375328959965984503301055148195061184253251566020⟩,⟨4386490844928603830593107111056067171250533069884779578449941,4386490844928603830593107111056067171250533069884807504292938⟩,⟨3685870779419174052095596947484611998064684037889293951336415,3685870779419174052095596947484611998064684037889317416801713⟩,⟨3046174197867085993467435493788935535590647965197763596145791,3046174197867085993467435493788935535590647965197782989092322⟩,⟨2467401100272339654708622749969037783828424851810188512878084,2467401100272339654708622749969037783828424851810204221164776⟩,⟨1949551486634935035819158716024918742778014697726568701533305,1949551486634935035819158716024918742778014697726581113019088⟩,⟨1492625356954872136799043391956578412439417502946904162111431,1492625356954872136799043391956578412439417502946913664655238⟩,⟨1096622711232150957648276777764016792812633267471194894612482,1096622711232150957648276777764016792812633267471201876073241⟩,⟨761543549466771498366858873447233883897661991299440899036442,761543549466771498366858873447233883897661991299445747273083⟩,⟨487387871658733758954789679006229685694503674431642175383324,487387871658733758954789679006229685694503674431645278254776⟩,⟨274155677808037739412069194441004198203158316867798723653116,274155677808037739412069194441004198203158316867800469018313⟩,⟨121846967914683439738697419751557421423625918607910543845829,121846967914683439738697419751557421423625918607911319563697⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨-2,4⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨121846967914683439738697419751557421423625918607910543845830,121846967914683439738697419751557421423625918607911319563698⟩,⟨274155677808037739412069194441004198203158316867798723653117,274155677808037739412069194441004198203158316867800469018314⟩,⟨487387871658733758954789679006229685694503674431642175383326,487387871658733758954789679006229685694503674431645278254778⟩,⟨761543549466771498366858873447233883897661991299440899036444,761543549466771498366858873447233883897661991299445747273085⟩,⟨1096622711232150957648276777764016792812633267471194894612484,1096622711232150957648276777764016792812633267471201876073243⟩,⟨1492625356954872136799043391956578412439417502946904162111434,1492625356954872136799043391956578412439417502946913664655240⟩,⟨1949551486634935035819158716024918742778014697726568701533308,1949551486634935035819158716024918742778014697726581113019091⟩,⟨2467401100272339654708622749969037783828424851810188512878100,2467401100272339654708622749969037783828424851810204221164791⟩,⟨3046174197867085993467435493788935535590647965197763596145795,3046174197867085993467435493788935535590647965197782989092326⟩,⟨3685870779419174052095596947484611998064684037889293951336419,3685870779419174052095596947484611998064684037889317416801717⟩,⟨4386490844928603830593107111056067171250533069884779578449945,4386490844928603830593107111056067171250533069884807504292942⟩,⟨5148034394395375328959965984503301055148195061184220477486404,5148034394395375328959965984503301055148195061184253251566025⟩,⟨5970501427819488547196173567826313649757670011787616648445759,5970501427819488547196173567826313649757670011787654658620946⟩,⟨6853891945200943485301729861025104955078957921694968091328051,6853891945200943485301729861025104955078957921695011725457723⟩] +lemma curvatureData00_1_calc (j : Fin 31) : curvatureBox 0 0 1 j=curvatureData00_1 j := by + revert j + decide +kernel +lemma curvatureData00_1_pre (j : Fin 31) : (curvatureExpInput 0 0 1 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData00_1_mem (j : Fin 31) : (curvatureData00_1 j).Mem (curvatureWave 0 0 (curvaturePoint 1) (frequency j)) := by + rw [← curvatureData00_1_calc] + exact curvatureBox_mem 0 0 1 j (curvatureData00_1_pre j) +def curvatureData00_2 : Fin 31 → RI := ![⟨6853891945200943485301729861025104955078957921694968091328045,6853891945200943485301729861025104955078957921695011725457718⟩,⟨5970501427819488547196173567826313649757670011787616648445754,5970501427819488547196173567826313649757670011787654658620941⟩,⟨5148034394395375328959965984503301055148195061184220477486399,5148034394395375328959965984503301055148195061184253251566020⟩,⟨4386490844928603830593107111056067171250533069884779578449941,4386490844928603830593107111056067171250533069884807504292938⟩,⟨3685870779419174052095596947484611998064684037889293951336415,3685870779419174052095596947484611998064684037889317416801713⟩,⟨3046174197867085993467435493788935535590647965197763596145791,3046174197867085993467435493788935535590647965197782989092322⟩,⟨2467401100272339654708622749969037783828424851810188512878084,2467401100272339654708622749969037783828424851810204221164776⟩,⟨1949551486634935035819158716024918742778014697726568701533305,1949551486634935035819158716024918742778014697726581113019088⟩,⟨1492625356954872136799043391956578412439417502946904162111431,1492625356954872136799043391956578412439417502946913664655238⟩,⟨1096622711232150957648276777764016792812633267471194894612482,1096622711232150957648276777764016792812633267471201876073241⟩,⟨761543549466771498366858873447233883897661991299440899036442,761543549466771498366858873447233883897661991299445747273083⟩,⟨487387871658733758954789679006229685694503674431642175383324,487387871658733758954789679006229685694503674431645278254776⟩,⟨274155677808037739412069194441004198203158316867798723653116,274155677808037739412069194441004198203158316867800469018313⟩,⟨121846967914683439738697419751557421423625918607910543845829,121846967914683439738697419751557421423625918607911319563697⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨-2,4⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨121846967914683439738697419751557421423625918607910543845830,121846967914683439738697419751557421423625918607911319563698⟩,⟨274155677808037739412069194441004198203158316867798723653117,274155677808037739412069194441004198203158316867800469018314⟩,⟨487387871658733758954789679006229685694503674431642175383326,487387871658733758954789679006229685694503674431645278254778⟩,⟨761543549466771498366858873447233883897661991299440899036444,761543549466771498366858873447233883897661991299445747273085⟩,⟨1096622711232150957648276777764016792812633267471194894612484,1096622711232150957648276777764016792812633267471201876073243⟩,⟨1492625356954872136799043391956578412439417502946904162111434,1492625356954872136799043391956578412439417502946913664655240⟩,⟨1949551486634935035819158716024918742778014697726568701533308,1949551486634935035819158716024918742778014697726581113019091⟩,⟨2467401100272339654708622749969037783828424851810188512878100,2467401100272339654708622749969037783828424851810204221164791⟩,⟨3046174197867085993467435493788935535590647965197763596145795,3046174197867085993467435493788935535590647965197782989092326⟩,⟨3685870779419174052095596947484611998064684037889293951336419,3685870779419174052095596947484611998064684037889317416801717⟩,⟨4386490844928603830593107111056067171250533069884779578449945,4386490844928603830593107111056067171250533069884807504292942⟩,⟨5148034394395375328959965984503301055148195061184220477486404,5148034394395375328959965984503301055148195061184253251566025⟩,⟨5970501427819488547196173567826313649757670011787616648445759,5970501427819488547196173567826313649757670011787654658620946⟩,⟨6853891945200943485301729861025104955078957921694968091328051,6853891945200943485301729861025104955078957921695011725457723⟩] +lemma curvatureData00_2_calc (j : Fin 31) : curvatureBox 0 0 2 j=curvatureData00_2 j := by + revert j + decide +kernel +lemma curvatureData00_2_pre (j : Fin 31) : (curvatureExpInput 0 0 2 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData00_2_mem (j : Fin 31) : (curvatureData00_2 j).Mem (curvatureWave 0 0 (curvaturePoint 2) (frequency j)) := by + rw [← curvatureData00_2_calc] + exact curvatureBox_mem 0 0 2 j (curvatureData00_2_pre j) +def curvatureData00_3 : Fin 31 → RI := ![⟨6853891945200943485301729861025104955078957921694968091328045,6853891945200943485301729861025104955078957921695011725457718⟩,⟨5970501427819488547196173567826313649757670011787616648445754,5970501427819488547196173567826313649757670011787654658620941⟩,⟨5148034394395375328959965984503301055148195061184220477486399,5148034394395375328959965984503301055148195061184253251566020⟩,⟨4386490844928603830593107111056067171250533069884779578449941,4386490844928603830593107111056067171250533069884807504292938⟩,⟨3685870779419174052095596947484611998064684037889293951336415,3685870779419174052095596947484611998064684037889317416801713⟩,⟨3046174197867085993467435493788935535590647965197763596145791,3046174197867085993467435493788935535590647965197782989092322⟩,⟨2467401100272339654708622749969037783828424851810188512878084,2467401100272339654708622749969037783828424851810204221164776⟩,⟨1949551486634935035819158716024918742778014697726568701533305,1949551486634935035819158716024918742778014697726581113019088⟩,⟨1492625356954872136799043391956578412439417502946904162111431,1492625356954872136799043391956578412439417502946913664655238⟩,⟨1096622711232150957648276777764016792812633267471194894612482,1096622711232150957648276777764016792812633267471201876073241⟩,⟨761543549466771498366858873447233883897661991299440899036442,761543549466771498366858873447233883897661991299445747273083⟩,⟨487387871658733758954789679006229685694503674431642175383324,487387871658733758954789679006229685694503674431645278254776⟩,⟨274155677808037739412069194441004198203158316867798723653116,274155677808037739412069194441004198203158316867800469018313⟩,⟨121846967914683439738697419751557421423625918607910543845829,121846967914683439738697419751557421423625918607911319563697⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨-2,4⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨121846967914683439738697419751557421423625918607910543845830,121846967914683439738697419751557421423625918607911319563698⟩,⟨274155677808037739412069194441004198203158316867798723653117,274155677808037739412069194441004198203158316867800469018314⟩,⟨487387871658733758954789679006229685694503674431642175383326,487387871658733758954789679006229685694503674431645278254778⟩,⟨761543549466771498366858873447233883897661991299440899036444,761543549466771498366858873447233883897661991299445747273085⟩,⟨1096622711232150957648276777764016792812633267471194894612484,1096622711232150957648276777764016792812633267471201876073243⟩,⟨1492625356954872136799043391956578412439417502946904162111434,1492625356954872136799043391956578412439417502946913664655240⟩,⟨1949551486634935035819158716024918742778014697726568701533308,1949551486634935035819158716024918742778014697726581113019091⟩,⟨2467401100272339654708622749969037783828424851810188512878100,2467401100272339654708622749969037783828424851810204221164791⟩,⟨3046174197867085993467435493788935535590647965197763596145795,3046174197867085993467435493788935535590647965197782989092326⟩,⟨3685870779419174052095596947484611998064684037889293951336419,3685870779419174052095596947484611998064684037889317416801717⟩,⟨4386490844928603830593107111056067171250533069884779578449945,4386490844928603830593107111056067171250533069884807504292942⟩,⟨5148034394395375328959965984503301055148195061184220477486404,5148034394395375328959965984503301055148195061184253251566025⟩,⟨5970501427819488547196173567826313649757670011787616648445759,5970501427819488547196173567826313649757670011787654658620946⟩,⟨6853891945200943485301729861025104955078957921694968091328051,6853891945200943485301729861025104955078957921695011725457723⟩] +lemma curvatureData00_3_calc (j : Fin 31) : curvatureBox 0 0 3 j=curvatureData00_3 j := by + revert j + decide +kernel +lemma curvatureData00_3_pre (j : Fin 31) : (curvatureExpInput 0 0 3 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData00_3_mem (j : Fin 31) : (curvatureData00_3 j).Mem (curvatureWave 0 0 (curvaturePoint 3) (frequency j)) := by + rw [← curvatureData00_3_calc] + exact curvatureBox_mem 0 0 3 j (curvatureData00_3_pre j) +def curvatureData00_4 : Fin 31 → RI := ![⟨6853891945200943485301729861025104955078957921694968091328045,6853891945200943485301729861025104955078957921695011725457718⟩,⟨5970501427819488547196173567826313649757670011787616648445754,5970501427819488547196173567826313649757670011787654658620941⟩,⟨5148034394395375328959965984503301055148195061184220477486399,5148034394395375328959965984503301055148195061184253251566020⟩,⟨4386490844928603830593107111056067171250533069884779578449941,4386490844928603830593107111056067171250533069884807504292938⟩,⟨3685870779419174052095596947484611998064684037889293951336415,3685870779419174052095596947484611998064684037889317416801713⟩,⟨3046174197867085993467435493788935535590647965197763596145791,3046174197867085993467435493788935535590647965197782989092322⟩,⟨2467401100272339654708622749969037783828424851810188512878084,2467401100272339654708622749969037783828424851810204221164776⟩,⟨1949551486634935035819158716024918742778014697726568701533305,1949551486634935035819158716024918742778014697726581113019088⟩,⟨1492625356954872136799043391956578412439417502946904162111431,1492625356954872136799043391956578412439417502946913664655238⟩,⟨1096622711232150957648276777764016792812633267471194894612482,1096622711232150957648276777764016792812633267471201876073241⟩,⟨761543549466771498366858873447233883897661991299440899036442,761543549466771498366858873447233883897661991299445747273083⟩,⟨487387871658733758954789679006229685694503674431642175383324,487387871658733758954789679006229685694503674431645278254776⟩,⟨274155677808037739412069194441004198203158316867798723653116,274155677808037739412069194441004198203158316867800469018313⟩,⟨121846967914683439738697419751557421423625918607910543845829,121846967914683439738697419751557421423625918607911319563697⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨-2,4⟩,⟨30461741978670859934674354937889355355906479651977635961455,30461741978670859934674354937889355355906479651977829890927⟩,⟨121846967914683439738697419751557421423625918607910543845830,121846967914683439738697419751557421423625918607911319563698⟩,⟨274155677808037739412069194441004198203158316867798723653117,274155677808037739412069194441004198203158316867800469018314⟩,⟨487387871658733758954789679006229685694503674431642175383326,487387871658733758954789679006229685694503674431645278254778⟩,⟨761543549466771498366858873447233883897661991299440899036444,761543549466771498366858873447233883897661991299445747273085⟩,⟨1096622711232150957648276777764016792812633267471194894612484,1096622711232150957648276777764016792812633267471201876073243⟩,⟨1492625356954872136799043391956578412439417502946904162111434,1492625356954872136799043391956578412439417502946913664655240⟩,⟨1949551486634935035819158716024918742778014697726568701533308,1949551486634935035819158716024918742778014697726581113019091⟩,⟨2467401100272339654708622749969037783828424851810188512878100,2467401100272339654708622749969037783828424851810204221164791⟩,⟨3046174197867085993467435493788935535590647965197763596145795,3046174197867085993467435493788935535590647965197782989092326⟩,⟨3685870779419174052095596947484611998064684037889293951336419,3685870779419174052095596947484611998064684037889317416801717⟩,⟨4386490844928603830593107111056067171250533069884779578449945,4386490844928603830593107111056067171250533069884807504292942⟩,⟨5148034394395375328959965984503301055148195061184220477486404,5148034394395375328959965984503301055148195061184253251566025⟩,⟨5970501427819488547196173567826313649757670011787616648445759,5970501427819488547196173567826313649757670011787654658620946⟩,⟨6853891945200943485301729861025104955078957921694968091328051,6853891945200943485301729861025104955078957921695011725457723⟩] +lemma curvatureData00_4_calc (j : Fin 31) : curvatureBox 0 0 4 j=curvatureData00_4 j := by + revert j + decide +kernel +lemma curvatureData00_4_pre (j : Fin 31) : (curvatureExpInput 0 0 4 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData00_4_mem (j : Fin 31) : (curvatureData00_4 j).Mem (curvatureWave 0 0 (curvaturePoint 4) (frequency j)) := by + rw [← curvatureData00_4_calc] + exact curvatureBox_mem 0 0 4 j (curvatureData00_4_pre j) +def curvatureTable00 : Fin 5 → Fin 31 → RI := ![curvatureData00_0,curvatureData00_1,curvatureData00_2,curvatureData00_3,curvatureData00_4] +lemma curvatureTable00_mem (i : Fin 5) (j : Fin 31) : (curvatureTable00 i j).Mem (curvatureWave 0 0 (curvaturePoint i) (frequency j)) := by + fin_cases i + · exact curvatureData00_0_mem j + · exact curvatureData00_1_mem j + · exact curvatureData00_2_mem j + · exact curvatureData00_3_mem j + · exact curvatureData00_4_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/CurvatureData01.lean b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData01.lean new file mode 100644 index 0000000000000000000000000000000000000000..29fbaa32bff045cea03eb68f6c039de02f92a8b9 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData01.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Construction.CurvatureBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvatureData01_0 : Fin 31 → RI := ![⟨24434706212943770910671192985539581471000472160262931606423330,24434706212943770910671192985539581471000472160263087165773107⟩,⟨28933471749921817559947782476563968170281578176186045104140302,28933471749921817559947782476563968170281578176186229304106312⟩,⟨34575203872566002581882653525004687093957180968000673194651162,34575203872566002581882653525004687093957180968000893311733582⟩,⟨41718832100522755805876473385178615210106493814880312869730858,41718832100522755805876473385178615210106493814880578465492459⟩,⟨50850803608378037790677595798057107522266026102733455776249252,50850803608378037790677595798057107522266026102733779509135004⟩,⟨62629472193697144201300870408955720895827884691984424237840042,62629472193697144201300870408955720895827884691984822957592104⟩,⟨77937566317170450108750302754669124546537830880894060187284351,77937566317170450108750302754669124546537830880894556363382699⟩,⟨97931263180800673897290503482411552022107158482347820854330090,97931263180800673897290503482411552022107158482348444316857286⟩,⟨124051105916993446529972251451940564147475582495848581558319580,124051105916993446529972251451940564147475582495849371308329986⟩,⟨157910093810840362176147317576583957648232093888063649897333876,157910093810840362176147317576583957648232093888064655204762441⟩,⟨200886609846766333891890032837946195638759693236495882813453911,200886609846766333891890032837946195638759693236497161723477221⟩,⟨253153845100863801611637024243429742038496060650697906078250779,253153845100863801611637024243429742038496060650699517738633947⟩,⟨311953718656290415546697309862431449250792094229518369713807951,311953718656290415546697309862431449250792094229520355713462531⟩,⟨369617770731914730723732256459036100170597252288154310995018306,369617770731914730723732256459036100170597252288156664102938426⟩,⟨413405680673738651581049488689514170998406929305087575129524222,413405680673738651581049488689514170998406929305090207005638203⟩,⟨429968610151373277648670923375886333653255280947267963596360384,429968610151373277648670923375886333653255280947270700917514455⟩,⟨413405680673738651581049488689514170998406929305087575129524592,413405680673738651581049488689514170998406929305090207005638573⟩,⟨369617770731914730723732256459036100170597252288154310995018993,369617770731914730723732256459036100170597252288156664102938998⟩,⟨311953718656290415546697309862431449250792094229518369713804000,311953718656290415546697309862431449250792094229520355713463349⟩,⟨253153845100863801611637024243429742038496060650697906078251492,253153845100863801611637024243429742038496060650699517738634660⟩,⟨200886609846766333891890032837946195638759693236495882813454599,200886609846766333891890032837946195638759693236497161723474327⟩,⟨157910093810840362176147317576583957648232093888063649897334332,157910093810840362176147317576583957648232093888064655204762962⟩,⟨124051105916993446529972251451940564147475582495848581558319023,124051105916993446529972251451940564147475582495849371308330319⟩,⟨97931263180800673897290503482411552022107158482347820854330374,97931263180800673897290503482411552022107158482348444316857618⟩,⟨77937566317170450108750302754669124546537830880894060187284308,77937566317170450108750302754669124546537830880894556363381926⟩,⟨62629472193697144201300870408955720895827884691984424237839716,62629472193697144201300870408955720895827884691984822957591766⟩,⟨50850803608378037790677595798057107522266026102733455776249040,50850803608378037790677595798057107522266026102733779509135189⟩,⟨41718832100522755805876473385178615210106493814880312869730826,41718832100522755805876473385178615210106493814880578465492292⟩,⟨34575203872566002581882653525004687093957180968000673194651233,34575203872566002581882653525004687093957180968000893311733492⟩,⟨28933471749921817559947782476563968170281578176186045104140239,28933471749921817559947782476563968170281578176186229304106251⟩,⟨24434706212943770910671192985539581471000472160262931606423277,24434706212943770910671192985539581471000472160263087165773164⟩] +lemma curvatureData01_0_calc (j : Fin 31) : curvatureBox 0 1 0 j=curvatureData01_0 j := by + revert j + decide +kernel +lemma curvatureData01_0_pre (j : Fin 31) : (curvatureExpInput 0 1 0 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData01_0_mem (j : Fin 31) : (curvatureData01_0 j).Mem (curvatureWave 0 1 (curvaturePoint 0) (frequency j)) := by + rw [← curvatureData01_0_calc] + exact curvatureBox_mem 0 1 0 j (curvatureData01_0_pre j) +def curvatureData01_1 : Fin 31 → RI := ![⟨12255623128756475251945024771555026538949445419036753895973473,12255623128756475251945024771555026538949445419036858873780908⟩,⟨11664831693501205286361448527182910923844477801977653423753088,11664831693501205286361448527182910923844477801977761475636615⟩,⟨10764162788205715469084123943941070557921967008592769545256486,10764162788205715469084123943941070557921967008592878147021228⟩,⟨9545806136990350353471232351746536661232585165386506988195028,9545806136990350353471232351746536661232585165386612702826445⟩,⟨8043983010713230470218579933501914214043677274027998892889725,8043983010713230470218579933501914214043677274028097488314265⟩,⟨6349383801820873272272960888924591053115713199596408313236353,6349383801820873272272960888924591053115713199596495202542926⟩,⟨4611560691642447779934264869912324461625125573291386457223396,4611560691642447779934264869912324461625125573291457548405932⟩,⟨3016765977213692365342868223884005784289099307593200730495747,3016765977213692365342868223884005784289099307593253582147292⟩,⟨1735834309932371476825160347987977861918850558891119490409057,1735834309932371476825160347987977861918850558891154327575220⟩,⟨859171947941473418976057841955741419607248362952628133403293,859171947941473418976057841955741419607248362952648007994397⟩,⟨361496648763264338934409798923104443251540169487896225119136,361496648763264338934409798923104443251540169487905889427576⟩,⟨131307701678736870678795322435967826548836621632530408864171,131307701678736870678795322435967826548836621632534453444525⟩,⟨44063493900140271764306051301948125293168357918640454909148,44063493900140271764306051301948125293168357918642000536593⟩,⟨15755166312881650925093750415837423408511882518860282603162,15755166312881650925093750415837423408511882518860897588653⟩,⟨7394479382503485209934319694098947309461032642930135991429,7394479382503485209934319694098947309461032642930445918162⟩,⟨5582506097753102943736245827407590701657690987526335390200,5582506097753102943736245827407590701657690987526575315548⟩,⟨7394479382503485209934319694098947309461032642930135991429,7394479382503485209934319694098947309461032642930445918162⟩,⟨15755166312881650925093750415837423408511882518860282603162,15755166312881650925093750415837423408511882518860897588653⟩,⟨44063493900140271764306051301948125293168357918640454909147,44063493900140271764306051301948125293168357918642000536593⟩,⟨131307701678736870678795322435967826548836621632530408864171,131307701678736870678795322435967826548836621632534453444526⟩,⟨361496648763264338934409798923104443251540169487896225119138,361496648763264338934409798923104443251540169487905889427571⟩,⟨859171947941473418976057841955741419607248362952628133403295,859171947941473418976057841955741419607248362952648007994399⟩,⟨1735834309932371476825160347987977861918850558891119490409049,1735834309932371476825160347987977861918850558891154327575225⟩,⟨3016765977213692365342868223884005784289099307593200730495756,3016765977213692365342868223884005784289099307593253582147302⟩,⟨4611560691642447779934264869912324461625125573291386457223394,4611560691642447779934264869912324461625125573291457548405886⟩,⟨6349383801820873272272960888924591053115713199596408313236320,6349383801820873272272960888924591053115713199596495202542891⟩,⟨8043983010713230470218579933501914214043677274027998892889691,8043983010713230470218579933501914214043677274028097488314294⟩,⟨9545806136990350353471232351746536661232585165386506988195020,9545806136990350353471232351746536661232585165386612702826407⟩,⟨10764162788205715469084123943941070557921967008592769545256509,10764162788205715469084123943941070557921967008592878147021200⟩,⟨11664831693501205286361448527182910923844477801977653423753063,11664831693501205286361448527182910923844477801977761475636590⟩,⟨12255623128756475251945024771555026538949445419036753895973446,12255623128756475251945024771555026538949445419036858873780937⟩] +lemma curvatureData01_1_calc (j : Fin 31) : curvatureBox 0 1 1 j=curvatureData01_1 j := by + revert j + decide +kernel +lemma curvatureData01_1_pre (j : Fin 31) : (curvatureExpInput 0 1 1 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData01_1_mem (j : Fin 31) : (curvatureData01_1 j).Mem (curvatureWave 0 1 (curvaturePoint 1) (frequency j)) := by + rw [← curvatureData01_1_calc] + exact curvatureBox_mem 0 1 1 j (curvatureData01_1_pre j) +def curvatureData01_2 : Fin 31 → RI := ![⟨6147006514633075942601367336762103108747750444012795085681784,6147006514633075942601367336762103108747750444012861294947630⟩,⟨4702798876463135577865254024543197717583837347121245152716050,4702798876463135577865254024543197717583837347121302386060368⟩,⟨3351164636889631894104931596462230250645498821333925505911753,3351164636889631894104931596462230250645498821333971849399466⟩,⟨2184203397291671318184920439872816158039481842993978787070257,2184203397291671318184920439872816158039481842994013318802838⟩,⟨1272460965906591132225220081417338643201331253767475514399477,1272460965906591132225220081417338643201331253767498660804111⟩,⟨643701331828921962221321529012873294445965467556253909341149,643701331828921962221321529012873294445965467556267471251336⟩,⟨272865743923242618558924831903771304669872739981416445610350,272865743923242618558924831903771304669872739981423148730352⟩,⟨92931273075402360995812201471353917377635718018865295889142,92931273075402360995812201471353917377635718018867974580406⟩,⟨24289350177616050618299644347417625918715121394143212204464,24289350177616050618299644347417625918715121394144038090569⟩,⟨4674662767370675029625849737801580554168244568250558505592,4674662767370675029625849737801580554168244568250746620979⟩,⟨650515368678637961536206844778320319703937389608684069342,650515368678637961536206844778320319703937389608715039662⟩,⟨68107646215219687815249680579429109096824849136511190703,68107646215219687815249680579429109096824849136515003136⟩,⟨6223972911914340989999205569149569736635127740880853352,6223972911914340989999205569149569736635127740881257338⟩,⟨671572865814938286133897082721789632136409952537598044,671572865814938286133897082721789632136409952537648153⟩,⟨132263120451461497832798125613404419467331323840840912,132263120451461497832798125613404419467331323840852504⟩,⟨72480580199747497774329401467262755209941397270828684,72480580199747497774329401467262755209941397270836026⟩,⟨132263120451461497832798125613404419467331323840840912,132263120451461497832798125613404419467331323840852504⟩,⟨671572865814938286133897082721789632136409952537598044,671572865814938286133897082721789632136409952537648153⟩,⟨6223972911914340989999205569149569736635127740880853352,6223972911914340989999205569149569736635127740881257338⟩,⟨68107646215219687815249680579429109096824849136511190703,68107646215219687815249680579429109096824849136515003136⟩,⟨650515368678637961536206844778320319703937389608684069342,650515368678637961536206844778320319703937389608715039662⟩,⟨4674662767370675029625849737801580554168244568250558505592,4674662767370675029625849737801580554168244568250746620979⟩,⟨24289350177616050618299644347417625918715121394143212204464,24289350177616050618299644347417625918715121394144038090569⟩,⟨92931273075402360995812201471353917377635718018865295889142,92931273075402360995812201471353917377635718018867974580407⟩,⟨272865743923242618558924831903771304669872739981416445610350,272865743923242618558924831903771304669872739981423148730349⟩,⟨643701331828921962221321529012873294445965467556253909341146,643701331828921962221321529012873294445965467556267471251332⟩,⟨1272460965906591132225220081417338643201331253767475514399471,1272460965906591132225220081417338643201331253767498660804116⟩,⟨2184203397291671318184920439872816158039481842993978787070255,2184203397291671318184920439872816158039481842994013318802829⟩,⟨3351164636889631894104931596462230250645498821333925505911759,3351164636889631894104931596462230250645498821333971849399457⟩,⟨4702798876463135577865254024543197717583837347121245152716040,4702798876463135577865254024543197717583837347121302386060359⟩,⟨6147006514633075942601367336762103108747750444012795085681770,6147006514633075942601367336762103108747750444012861294947644⟩] +lemma curvatureData01_2_calc (j : Fin 31) : curvatureBox 0 1 2 j=curvatureData01_2 j := by + revert j + decide +kernel +lemma curvatureData01_2_pre (j : Fin 31) : (curvatureExpInput 0 1 2 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData01_2_mem (j : Fin 31) : (curvatureData01_2 j).Mem (curvatureWave 0 1 (curvaturePoint 2) (frequency j)) := by + rw [← curvatureData01_2_calc] + exact curvatureBox_mem 0 1 2 j (curvatureData01_2_pre j) +def curvatureData01_3 : Fin 31 → RI := ![⟨1103486746271424008928391885435094288530092953548397551396,1103486746271424008928391885435094288530092953548440413769⟩,⟨55059278508684906964327495688573652038217598180756215536,55059278508684906964327495688573652038217598180758934839⟩,⟨1550206692706909044879122016900960697740625390787270345,1550206692706909044879122016900960697740625390787366619⟩,⟨21517852669565976886737258381172789265415984864159136,21517852669565976886737258381172789265415984864160901⟩,⟨124254183521428679732772667205007888744273764059515,124254183521428679732772667205007888744273764059670⟩,⟨241598791454639983393999323854382775450175248051,241598791454639983393999323854382775450175248240⟩,⟨122239797166112275565640399214611343728007299,122239797166112275565640399214611343728007533⟩,⟨11910094322486298905198663285561826361203,11910094322486298905198663285561826361498⟩,⟨161905366668708053942760279151018576,161905366668708053942760279151018949⟩,⟨232074675639099651132300605775,232074675639099651132300606250⟩,⟨31818055462944312056606,31818055462944312057210⟩,⟨588188821747781,588188821748541⟩,⟨4665267,4666204⟩,⟨-370,740⟩,⟨-414,827⟩,⟨-430,860⟩,⟨-414,827⟩,⟨-370,740⟩,⟨4665267,4666204⟩,⟨588188821747781,588188821748541⟩,⟨31818055462944312056606,31818055462944312057210⟩,⟨232074675639099651132300605775,232074675639099651132300606250⟩,⟨161905366668708053942760279151018576,161905366668708053942760279151018949⟩,⟨11910094322486298905198663285561826361203,11910094322486298905198663285561826361498⟩,⟨122239797166112275565640399214611343728007299,122239797166112275565640399214611343728007533⟩,⟨241598791454639983393999323854382775450175248051,241598791454639983393999323854382775450175248240⟩,⟨124254183521428679732772667205007888744273764059515,124254183521428679732772667205007888744273764059670⟩,⟨21517852669565976886737258381172789265415984864159136,21517852669565976886737258381172789265415984864160901⟩,⟨1550206692706909044879122016900960697740625390787270345,1550206692706909044879122016900960697740625390787366619⟩,⟨55059278508684906964327495688573652038217598180756215536,55059278508684906964327495688573652038217598180758934839⟩,⟨1103486746271424008928391885435094288530092953548397551396,1103486746271424008928391885435094288530092953548440413769⟩] +lemma curvatureData01_3_calc (j : Fin 31) : curvatureBox 0 1 3 j=curvatureData01_3 j := by + revert j + decide +kernel +lemma curvatureData01_3_pre (j : Fin 31) : (curvatureExpInput 0 1 3 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData01_3_mem (j : Fin 31) : (curvatureData01_3 j).Mem (curvatureWave 0 1 (curvaturePoint 3) (frequency j)) := by + rw [← curvatureData01_3_calc] + exact curvatureBox_mem 0 1 3 j (curvatureData01_3_pre j) +def curvatureData01_4 : Fin 31 → RI := ![⟨3130094618727568550931508859192676937094371810571124724,3130094618727568550931508859192676937094371810571307827⟩,⟨24400173317437620466607050079258256772876553786721386,24400173317437620466607050079258256772876553786723307⟩,⟨76334597646994146219481442650331529815142998989117,76334597646994146219481442650331529815142998989223⟩,⟨77336214213867363837240026783136651316480538249,77336214213867363837240026783136651316480538375⟩,⟨19376898963332861247168739909265640270903272,19376898963332861247168739909265640270903425⟩,⟨858408076959142623974166739250542693848,858408076959142623974166739250542694037⟩,⟨4467575196197407428229575959365047,4467575196197407428229575959365282⟩,⟨1695069285668308034587081602,1695069285668308034587081896⟩,⟨28149849769923765778,28149849769923766151⟩,⟨13146932135,13146932610⟩,⟨-201,402⟩,⟨-254,507⟩,⟨-312,624⟩,⟨-370,740⟩,⟨-414,827⟩,⟨-430,860⟩,⟨-414,827⟩,⟨-370,740⟩,⟨-312,624⟩,⟨-254,507⟩,⟨-201,402⟩,⟨13146932135,13146932610⟩,⟨28149849769923765778,28149849769923766151⟩,⟨1695069285668308034587081602,1695069285668308034587081896⟩,⟨4467575196197407428229575959365047,4467575196197407428229575959365282⟩,⟨858408076959142623974166739250542693848,858408076959142623974166739250542694037⟩,⟨19376898963332861247168739909265640270903272,19376898963332861247168739909265640270903425⟩,⟨77336214213867363837240026783136651316480538249,77336214213867363837240026783136651316480538375⟩,⟨76334597646994146219481442650331529815142998989117,76334597646994146219481442650331529815142998989223⟩,⟨24400173317437620466607050079258256772876553786721386,24400173317437620466607050079258256772876553786723307⟩,⟨3130094618727568550931508859192676937094371810571124724,3130094618727568550931508859192676937094371810571307827⟩] +lemma curvatureData01_4_calc (j : Fin 31) : curvatureBox 0 1 4 j=curvatureData01_4 j := by + revert j + decide +kernel +lemma curvatureData01_4_pre (j : Fin 31) : (curvatureExpInput 0 1 4 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData01_4_mem (j : Fin 31) : (curvatureData01_4 j).Mem (curvatureWave 0 1 (curvaturePoint 4) (frequency j)) := by + rw [← curvatureData01_4_calc] + exact curvatureBox_mem 0 1 4 j (curvatureData01_4_pre j) +def curvatureTable01 : Fin 5 → Fin 31 → RI := ![curvatureData01_0,curvatureData01_1,curvatureData01_2,curvatureData01_3,curvatureData01_4] +lemma curvatureTable01_mem (i : Fin 5) (j : Fin 31) : (curvatureTable01 i j).Mem (curvatureWave 0 1 (curvaturePoint i) (frequency j)) := by + fin_cases i + · exact curvatureData01_0_mem j + · exact curvatureData01_1_mem j + · exact curvatureData01_2_mem j + · exact curvatureData01_3_mem j + · exact curvatureData01_4_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/CurvatureData10.lean b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData10.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c6774dad208c4e598b2a846203793de312b4ee3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData10.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Construction.CurvatureBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvatureData10_0 : Fin 31 → RI := ![⟨7248676121244517830055109501020151000491505897984598253395958,7248676121244517830055109501020151000491505897984644400844088⟩,⟨6365285603863062891949553207821359695170217988077246810512763,6365285603863062891949553207821359695170217988077287334007311⟩,⟨5542818570438949673713345624498347100560743037473850639552565,5542818570438949673713345624498347100560743037473885926952390⟩,⟨4781275020972178175346486751051113216663081046174409740515327,4781275020972178175346486751051113216663081046174440179679308⟩,⟨4080654955462748396848976587479658043477232014178924113401084,4080654955462748396848976587479658043477232014178950092188083⟩,⟨3440958373910660338220815133783981581003195941487393758209804,3440958373910660338220815133783981581003195941487415664478692⟩,⟨2862185276315913999462002389964083829240972828099818674941505,2862185276315913999462002389964083829240972828099836896551146⟩,⟨2344335662678509380572538356019964788190562674016198863596196,2344335662678509380572538356019964788190562674016213788405458⟩,⟨1887409532998446481552423031951624457851965479236534324173854,1887409532998446481552423031951624457851965479236546340041608⟩,⟨1491406887275725302401656417759062838225181243760825056674500,1491406887275725302401656417759062838225181243760834551459611⟩,⟨1156327725510345843120238513442279929310209967589071061098116,1156327725510345843120238513442279929310209967589078422659453⟩,⟨882172047702308103708169319001275731107051650721272337444717,882172047702308103708169319001275731107051650721277953641146⟩,⟨668939853851612084165448834436050243615706293157428885714292,668939853851612084165448834436050243615706293157433144404683⟩,⟨516631143958257784492077059746603466836173894897540705906848,516631143958257784492077059746603466836173894897543994950067⟩,⟨425245918022245204688053994932935400768454455941607798022381,425245918022245204688053994932935400768454455941610505277297⟩,⟨394784176043574344753379639995046045412547976289630162060893,394784176043574344753379639995046045412547976289632675386374⟩,⟨425245918022245204688053994932935400768454455941607798022381,425245918022245204688053994932935400768454455941610505277297⟩,⟨516631143958257784492077059746603466836173894897540705906849,516631143958257784492077059746603466836173894897543994950068⟩,⟨668939853851612084165448834436050243615706293157428885714293,668939853851612084165448834436050243615706293157433144404684⟩,⟨882172047702308103708169319001275731107051650721272337444719,882172047702308103708169319001275731107051650721277953641148⟩,⟨1156327725510345843120238513442279929310209967589071061098118,1156327725510345843120238513442279929310209967589078422659455⟩,⟨1491406887275725302401656417759062838225181243760825056674502,1491406887275725302401656417759062838225181243760834551459613⟩,⟨1887409532998446481552423031951624457851965479236534324173857,1887409532998446481552423031951624457851965479236546340041610⟩,⟨2344335662678509380572538356019964788190562674016198863596199,2344335662678509380572538356019964788190562674016213788405461⟩,⟨2862185276315913999462002389964083829240972828099818674941521,2862185276315913999462002389964083829240972828099836896551161⟩,⟨3440958373910660338220815133783981581003195941487393758209808,3440958373910660338220815133783981581003195941487415664478696⟩,⟨4080654955462748396848976587479658043477232014178924113401088,4080654955462748396848976587479658043477232014178950092188087⟩,⟨4781275020972178175346486751051113216663081046174409740515331,4781275020972178175346486751051113216663081046174440179679312⟩,⟨5542818570438949673713345624498347100560743037473850639552570,5542818570438949673713345624498347100560743037473885926952395⟩,⟨6365285603863062891949553207821359695170217988077246810512768,6365285603863062891949553207821359695170217988077287334007316⟩,⟨7248676121244517830055109501020151000491505897984598253395964,7248676121244517830055109501020151000491505897984644400844093⟩] +lemma curvatureData10_0_calc (j : Fin 31) : curvatureBox 1 0 0 j=curvatureData10_0 j := by + revert j + decide +kernel +lemma curvatureData10_0_pre (j : Fin 31) : (curvatureExpInput 1 0 0 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData10_0_mem (j : Fin 31) : (curvatureData10_0 j).Mem (curvatureWave 1 0 (curvaturePoint 0) (frequency j)) := by + rw [← curvatureData10_0_calc] + exact curvatureBox_mem 1 0 0 j (curvatureData10_0_pre j) +def curvatureData10_1 : Fin 31 → RI := ![⟨3867082386860400322736827827897780484692476667213799512255356,3867082386860400322736827827897780484692476667213831875000270⟩,⟨3395804066054585860813109526464616784675323266015277971427458,3395804066054585860813109526464616784675323266015306390149841⟩,⟨2957027698407793085918613176854429891555904582140792398932528,2957027698407793085918613176854429891555904582140817145633928⟩,⟨2550753283920021998053338779067219805334220615590342794770547,2550753283920021998053338779067219805334220615590364141452523⟩,⟨2176980822591272597217286333102986526010271366363929158941533,2176980822591272597217286333102986526010271366363947377605637⟩,⟨1835710314421544883410455838961730053584056834461551491445469,1835710314421544883410455838961730053584056834461566854093256⟩,⟨1526941759410838856632847296643450388055577019883209792282364,1526941759410838856632847296643450388055577019883222570915387⟩,⟨1250675157559154516884460706148147529424831922628904061452223,1250675157559154516884460706148147529424831922628914528072036⟩,⟨1006910508866491864165296067475821477691821542698634298955035,1006910508866491864165296067475821477691821542698642725563193⟩,⟨795647813332850898475353380626472232856545880092400504790809,795647813332850898475353380626472232856545880092407163388866⟩,⟨616887070958231619814632645600099794919004934810202678959538,616887070958231619814632645600099794919004934810207841549048⟩,⟨470628281742634028183133862396704163879198706852040821461229,470628281742634028183133862396704163879198706852044760043743⟩,⟨356871445686058123580857031016285339737127196217914932295874,356871445686058123580857031016285339737127196217917918872950⟩,⟨275616562788503906007802151458843322492790402907825011463480,275616562788503906007802151458843322492790402907827318036669⟩,⟨226863633049971375463969223724378112146188326921771058964043,226863633049971375463969223724378112146188326921772957534901⟩,⟨210612656470460531949358247812889708697320968259753074797565,210612656470460531949358247812889708697320968259754837367644⟩,⟨226863633049971375463969223724378112146188326921771058964043,226863633049971375463969223724378112146188326921772957534901⟩,⟨275616562788503906007802151458843322492790402907825011463481,275616562788503906007802151458843322492790402907827318036670⟩,⟨356871445686058123580857031016285339737127196217914932295875,356871445686058123580857031016285339737127196217917918872950⟩,⟨470628281742634028183133862396704163879198706852040821461230,470628281742634028183133862396704163879198706852044760043744⟩,⟨616887070958231619814632645600099794919004934810202678959539,616887070958231619814632645600099794919004934810207841549049⟩,⟨795647813332850898475353380626472232856545880092400504790811,795647813332850898475353380626472232856545880092407163388867⟩,⟨1006910508866491864165296067475821477691821542698634298955036,1006910508866491864165296067475821477691821542698642725563194⟩,⟨1250675157559154516884460706148147529424831922628904061452225,1250675157559154516884460706148147529424831922628914528072038⟩,⟨1526941759410838856632847296643450388055577019883209792282372,1526941759410838856632847296643450388055577019883222570915395⟩,⟨1835710314421544883410455838961730053584056834461551491445471,1835710314421544883410455838961730053584056834461566854093259⟩,⟨2176980822591272597217286333102986526010271366363929158941535,2176980822591272597217286333102986526010271366363947377605639⟩,⟨2550753283920021998053338779067219805334220615590342794770549,2550753283920021998053338779067219805334220615590364141452526⟩,⟨2957027698407793085918613176854429891555904582140792398932531,2957027698407793085918613176854429891555904582140817145633931⟩,⟨3395804066054585860813109526464616784675323266015277971427461,3395804066054585860813109526464616784675323266015306390149843⟩,⟨3867082386860400322736827827897780484692476667213799512255359,3867082386860400322736827827897780484692476667213831875000273⟩] +lemma curvatureData10_1_calc (j : Fin 31) : curvatureBox 1 0 1 j=curvatureData10_1 j := by + revert j + decide +kernel +lemma curvatureData10_1_pre (j : Fin 31) : (curvatureExpInput 1 0 1 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData10_1_mem (j : Fin 31) : (curvatureData10_1 j).Mem (curvatureWave 1 0 (curvaturePoint 1) (frequency j)) := by + rw [← curvatureData10_1_calc] + exact curvatureBox_mem 1 0 1 j (curvatureData10_1_pre j) +def curvatureData10_2 : Fin 31 → RI := ![⟨2063042400658182229680043750032009103233996034429719770021938,2063042400658182229680043750032009103233996034429741176456401⟩,⟨1811621028918867703454118095506339814303983070072424958580364,1811621028918867703454118095506339814303983070072443756229321⟩,⟨1577539062127092110071359727499682200472591689463909099652008,1577539062127092110071359727499682200472591689463925468431698⟩,⟨1360796500282855449531768646012036261739821892604172193236858,1360796500282855449531768646012036261739821892604186313063526⟩,⟨1161393343386157721835344851043401998105673679493214239334925,1161393343386157721835344851043401998105673679493226290124811⟩,⟨979329591436998926982088342593779409570147050131035237946199,979329591436998926982088342593779409570147050131045399615547⟩,⟨814605244435379064971999120663168496133242004517635189070685,814605244435379064971999120663168496133242004517643641535735⟩,⟨667220302381298135805077185251569257794958542653014092708387,667220302381298135805077185251569257794958542653021015885381⟩,⟨537174765274756139481322536358981694555296664537171948859297,537174765274756139481322536358981694555296664537177522664477⟩,⟨424468633115753076000735173985405806414256370170108757523422,424468633115753076000735173985405806414256370170113161873030⟩,⟨329101905904288945363315098130841593371837659551824518700756,329101905904288945363315098130841593371837659551827933511034⟩,⟨251074583640363747569062308795289055428040532682319232391304,251074583640363747569062308795289055428040532682321837578493⟩,⟨190386666323977482617976805978748192582864989561592898595062,190386666323977482617976805978748192582864989561594874075405⟩,⟨147038153955130150510058589681219004836311030189645517312033,147038153955130150510058589681219004836311030189647043001770⟩,⟨121029046533821751245307659902701492188378654566477088542216,121029046533821751245307659902701492188378654566478344357590⟩,⟨112359344060052284823724016643195654639067862692087612285610,112359344060052284823724016643195654639067862692088778142863⟩,⟨121029046533821751245307659902701492188378654566477088542216,121029046533821751245307659902701492188378654566478344357590⟩,⟨147038153955130150510058589681219004836311030189645517312034,147038153955130150510058589681219004836311030189647043001771⟩,⟨190386666323977482617976805978748192582864989561592898595062,190386666323977482617976805978748192582864989561594874075405⟩,⟨251074583640363747569062308795289055428040532682319232391304,251074583640363747569062308795289055428040532682321837578493⟩,⟨329101905904288945363315098130841593371837659551824518700756,329101905904288945363315098130841593371837659551827933511034⟩,⟨424468633115753076000735173985405806414256370170108757523422,424468633115753076000735173985405806414256370170113161873030⟩,⟨537174765274756139481322536358981694555296664537171948859298,537174765274756139481322536358981694555296664537177522664478⟩,⟨667220302381298135805077185251569257794958542653014092708387,667220302381298135805077185251569257794958542653021015885381⟩,⟨814605244435379064971999120663168496133242004517635189070690,814605244435379064971999120663168496133242004517643641535739⟩,⟨979329591436998926982088342593779409570147050131035237946200,979329591436998926982088342593779409570147050131045399615548⟩,⟨1161393343386157721835344851043401998105673679493214239334926,1161393343386157721835344851043401998105673679493226290124813⟩,⟨1360796500282855449531768646012036261739821892604172193236859,1360796500282855449531768646012036261739821892604186313063528⟩,⟨1577539062127092110071359727499682200472591689463909099652009,1577539062127092110071359727499682200472591689463925468431700⟩,⟨1811621028918867703454118095506339814303983070072424958580366,1811621028918867703454118095506339814303983070072443756229323⟩,⟨2063042400658182229680043750032009103233996034429719770021940,2063042400658182229680043750032009103233996034429741176456402⟩] +lemma curvatureData10_2_calc (j : Fin 31) : curvatureBox 1 0 2 j=curvatureData10_2 j := by + revert j + decide +kernel +lemma curvatureData10_2_pre (j : Fin 31) : (curvatureExpInput 1 0 2 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData10_2_mem (j : Fin 31) : (curvatureData10_2 j).Mem (curvatureWave 1 0 (curvaturePoint 2) (frequency j)) := by + rw [← curvatureData10_2_calc] + exact curvatureBox_mem 1 0 2 j (curvatureData10_2_pre j) +def curvatureData10_3 : Fin 31 → RI := ![⟨800879669772273713259047564227019575267351398958357121532,800879669772273713259047564227019575267351398958385862692⟩,⟨703277087727409291992816351575382461118951707540503883490,703277087727409291992816351575382461118951707540529121987⟩,⟨612405718237363106675980394968685837601476132772157765313,612405718237363106675980394968685837601476132772179742711⟩,⟨528265561302135157308539694406929704714924674653318767001,528265561302135157308539694406929704714924674653337724862⟩,⟨450856616921725443890494249890114062459297333183986888554,450856616921725443890494249890114062459297333184003068441⟩,⟨380178885096133966421844061418238910834594108364162129972,380178885096133966421844061418238910834594108364175773448⟩,⟨316232365825360724902589128991304249840815000193844491255,316232365825360724902589128991304249840815000193855839883⟩,⟨259017059109405719332729452609310079477960008673033972403,259017059109405719332729452609310079477960008673043267746⟩,⟨208532964948268949712265032272256399746029133801730573416,208532964948268949712265032272256399746029133801738057037⟩,⟨164780083341950416041195867980143210645022375579934294294,164780083341950416041195867980143210645022375579940207755⟩,⟨127758414290450118319521959732970512174939734007645135036,127758414290450118319521959732970512174939734007649719902⟩,⟨97467957793768056547243307530738304335781209084863095644,97467957793768056547243307530738304335781209084866593476⟩,⟨73908713851904230724359911373446587127546800811588176117,73908713851904230724359911373446587127546800811590828479⟩,⟨57080682464858640850871771261095360550236509187820376454,57080682464858640850871771261095360550236509187822424909⟩,⟨46983863632631286926778887193684624603850334213559696657,46983863632631286926778887193684624603850334213561382767⟩,⟨43618257355222168952081259171214379288388275888806136724,43618257355222168952081259171214379288388275888807702053⟩,⟨46983863632631286926778887193684624603850334213559696657,46983863632631286926778887193684624603850334213561382767⟩,⟨57080682464858640850871771261095360550236509187820376454,57080682464858640850871771261095360550236509187822424909⟩,⟨73908713851904230724359911373446587127546800811588176117,73908713851904230724359911373446587127546800811590828479⟩,⟨97467957793768056547243307530738304335781209084863095644,97467957793768056547243307530738304335781209084866593476⟩,⟨127758414290450118319521959732970512174939734007645135036,127758414290450118319521959732970512174939734007649719902⟩,⟨164780083341950416041195867980143210645022375579934294294,164780083341950416041195867980143210645022375579940207755⟩,⟨208532964948268949712265032272256399746029133801730573416,208532964948268949712265032272256399746029133801738057037⟩,⟨259017059109405719332729452609310079477960008673033972403,259017059109405719332729452609310079477960008673043267746⟩,⟨316232365825360724902589128991304249840815000193844491255,316232365825360724902589128991304249840815000193855839883⟩,⟨380178885096133966421844061418238910834594108364162129972,380178885096133966421844061418238910834594108364175773448⟩,⟨450856616921725443890494249890114062459297333183986888554,450856616921725443890494249890114062459297333184003068441⟩,⟨528265561302135157308539694406929704714924674653318767001,528265561302135157308539694406929704714924674653337724862⟩,⟨612405718237363106675980394968685837601476132772157765313,612405718237363106675980394968685837601476132772179742711⟩,⟨703277087727409291992816351575382461118951707540503883490,703277087727409291992816351575382461118951707540529121987⟩,⟨800879669772273713259047564227019575267351398958357121532,800879669772273713259047564227019575267351398958385862692⟩] +lemma curvatureData10_3_calc (j : Fin 31) : curvatureBox 1 0 3 j=curvatureData10_3 j := by + revert j + decide +kernel +lemma curvatureData10_3_pre (j : Fin 31) : (curvatureExpInput 1 0 3 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData10_3_mem (j : Fin 31) : (curvatureData10_3 j).Mem (curvatureWave 1 0 (curvaturePoint 3) (frequency j)) := by + rw [← curvatureData10_3_calc] + exact curvatureBox_mem 1 0 3 j (curvatureData10_3_pre j) +def curvatureData10_4 : Fin 31 → RI := ![⟨3838198821578327410144881910184929339123057464609734853,3838198821578327410144881910184929339123057464609940919⟩,⟨3370440518393878364531326794218536034220684517586359871,3370440518393878364531326794218536034220684517586540824⟩,⟨2934941408532494770339396169008445715863302808288734888,2934941408532494770339396169008445715863302808288892459⟩,⟨2531701491994176627569090034554658384050912336716859903,2531701491994176627569090034554658384050912336716995826⟩,⟨2160720768778923936220408390857174038783513102870734917,2160720768778923936220408390857174038783513102870850923⟩,⟨1821999238886736696293351237915992680061105106750359930,1821999238886736696293351237915992680061105106750457750⟩,⟨1515536902317614907787918575731114307883688348355734942,1515536902317614907787918575731114307883688348355816309⟩,⟨1241333759071558570704110404302538922251262827686859952,1241333759071558570704110404302538922251262827686926598⟩,⟨999389809148567685041926723630266523163828544743734961,999389809148567685041926723630266523163828544743788618⟩,⟨789705052548642250801367533714297110621385499526359969,789705052548642250801367533714297110621385499526402368⟩,⟨612279489271782267982432834554630684623933692034734976,612279489271782267982432834554630684623933692034767849⟩,⟨467113119317987736585122626151267245171473122268859982,467113119317987736585122626151267245171473122268885061⟩,⟨354205942687258656609436908504206792264003790228734986,354205942687258656609436908504206792264003790228754004⟩,⟨273557959379595028055375681613449325901525695914359989,273557959379595028055375681613449325901525695914374677⟩,⟨225169169394996850922938945478994846084038839325734991,225169169394996850922938945478994846084038839325747081⟩,⟨209039572733464125212126700100843352811543220462859992,209039572733464125212126700100843352811543220462871215⟩,⟨225169169394996850922938945478994846084038839325734991,225169169394996850922938945478994846084038839325747081⟩,⟨273557959379595028055375681613449325901525695914359989,273557959379595028055375681613449325901525695914374677⟩,⟨354205942687258656609436908504206792264003790228734986,354205942687258656609436908504206792264003790228754004⟩,⟨467113119317987736585122626151267245171473122268859982,467113119317987736585122626151267245171473122268885061⟩,⟨612279489271782267982432834554630684623933692034734976,612279489271782267982432834554630684623933692034767849⟩,⟨789705052548642250801367533714297110621385499526359969,789705052548642250801367533714297110621385499526402368⟩,⟨999389809148567685041926723630266523163828544743734961,999389809148567685041926723630266523163828544743788618⟩,⟨1241333759071558570704110404302538922251262827686859952,1241333759071558570704110404302538922251262827686926598⟩,⟨1515536902317614907787918575731114307883688348355734942,1515536902317614907787918575731114307883688348355816309⟩,⟨1821999238886736696293351237915992680061105106750359930,1821999238886736696293351237915992680061105106750457750⟩,⟨2160720768778923936220408390857174038783513102870734917,2160720768778923936220408390857174038783513102870850923⟩,⟨2531701491994176627569090034554658384050912336716859903,2531701491994176627569090034554658384050912336716995826⟩,⟨2934941408532494770339396169008445715863302808288734888,2934941408532494770339396169008445715863302808288892459⟩,⟨3370440518393878364531326794218536034220684517586359871,3370440518393878364531326794218536034220684517586540824⟩,⟨3838198821578327410144881910184929339123057464609734853,3838198821578327410144881910184929339123057464609940919⟩] +lemma curvatureData10_4_calc (j : Fin 31) : curvatureBox 1 0 4 j=curvatureData10_4 j := by + revert j + decide +kernel +lemma curvatureData10_4_pre (j : Fin 31) : (curvatureExpInput 1 0 4 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData10_4_mem (j : Fin 31) : (curvatureData10_4 j).Mem (curvatureWave 1 0 (curvaturePoint 4) (frequency j)) := by + rw [← curvatureData10_4_calc] + exact curvatureBox_mem 1 0 4 j (curvatureData10_4_pre j) +def curvatureTable10 : Fin 5 → Fin 31 → RI := ![curvatureData10_0,curvatureData10_1,curvatureData10_2,curvatureData10_3,curvatureData10_4] +lemma curvatureTable10_mem (i : Fin 5) (j : Fin 31) : (curvatureTable10 i j).Mem (curvatureWave 1 0 (curvaturePoint i) (frequency j)) := by + fin_cases i + · exact curvatureData10_0_mem j + · exact curvatureData10_1_mem j + · exact curvatureData10_2_mem j + · exact curvatureData10_3_mem j + · exact curvatureData10_4_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/CurvatureData11.lean b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData11.lean new file mode 100644 index 0000000000000000000000000000000000000000..a96df6a512709befe8d766ce4cd28f33acb8b295 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/CurvatureData11.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.Triangular.Construction.CurvatureBoxes + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def curvatureData11_0 : Fin 31 → RI := ![⟨16320120090106789293985864496537135184385546154594009344188128,16320120090106789293985864496537135184385546154594113243422637⟩,⟨18685218811768685504440642466802141758940241209380357093378602,18685218811768685504440642466802141758940241209380476049606886⟩,⟨21480038157364514915514273119275200291402147690882142365397007,21480038157364514915514273119275200291402147690882279114361565⟩,⟨24783763340203992474672379584567600569630453364154667108416759,24783763340203992474672379584567600569630453364154824889978778⟩,⟨28683505677982534426813632337380945844425142009249293487198318,28683505677982534426813632337380945844425142009249476095798441⟩,⟨33269053268669058857698640087979798532665823384876725105500123,33269053268669058857698640087979798532665823384876936907199665⟩,⟨38622280903969426253328024633282607393681087540617132283791010,38622280903969426253328024633282607393681087540617378165892760⟩,⟨44798533561396089478867800778213435472585186952442495068801606,44798533561396089478867800778213435472585186952442780270952409⟩,⟨51797313042368596711044753603494177617900245626749001782804705,51797313042368596711044753603494177617900245626749331541480309⟩,⟨59521312865003297069278908682099965771973359795494747305485413,59521312865003297069278908682099965771973359795495126237676175⟩,⟨67727873860553235598094246505636618284676966128760982799684428,67727873860553235598094246505636618284676966128761413977533140⟩,⟨75986474870246811742008352261084590253862425975998118722814692,75986474870246811742008352261084590253862425975998602477624903⟩,⟨83668121907808416251953891648150719189997814481134949975888926,83668121907808416251953891648150719189997814481135482634581932⟩,⟨89999071076602702739589554175600533312532790771095259765441031,89999071076602702739589554175600533312532790771095832729031890⟩,⟨94197717597437046130244314663102731157789419905703559997260272,94197717597437046130244314663102731157789419905704159690811420⟩,⟨95671389077438269263052289242563689620426171028051325874398194,95671389077438269263052289242563689620426171028051934949825005⟩,⟨94197717597437046130244314663102731157789419905703559997260316,94197717597437046130244314663102731157789419905704159690811464⟩,⟨89999071076602702739589554175600533312532790771095259765441117,89999071076602702739589554175600533312532790771095832729031933⟩,⟨83668121907808416251953891648150719189997814481134949975888129,83668121907808416251953891648150719189997814481135482634582014⟩,⟨75986474870246811742008352261084590253862425975998118722814807,75986474870246811742008352261084590253862425975998602477625018⟩,⟨67727873860553235598094246505636618284676966128760982799684570,67727873860553235598094246505636618284676966128761413977532637⟩,⟨59521312865003297069278908682099965771973359795494747305485544,59521312865003297069278908682099965771973359795495126237676305⟩,⟨51797313042368596711044753603494177617900245626749001782804538,51797313042368596711044753603494177617900245626749331541480428⟩,⟨44798533561396089478867800778213435472585186952442495068801715,44798533561396089478867800778213435472585186952442780270952518⟩,⟨38622280903969426253328024633282607393681087540617132283790937,38622280903969426253328024633282607393681087540617378165892471⟩,⟨33269053268669058857698640087979798532665823384876725105500017,33269053268669058857698640087979798532665823384876936907199570⟩,⟨28683505677982534426813632337380945844425142009249293487198286,28683505677982534426813632337380945844425142009249476095798522⟩,⟨24783763340203992474672379584567600569630453364154667108416720,24783763340203992474672379584567600569630453364154824889978788⟩,⟨21480038157364514915514273119275200291402147690882142365397040,21480038157364514915514273119275200291402147690882279114361569⟩,⟨18685218811768685504440642466802141758940241209380357093378607,18685218811768685504440642466802141758940241209380476049606874⟩,⟨16320120090106789293985864496537135184385546154594009344188162,16320120090106789293985864496537135184385546154594113243422679⟩] +lemma curvatureData11_0_calc (j : Fin 31) : curvatureBox 1 1 0 j=curvatureData11_0 j := by + revert j + decide +kernel +lemma curvatureData11_0_pre (j : Fin 31) : (curvatureExpInput 1 1 0 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData11_0_mem (j : Fin 31) : (curvatureData11_0 j).Mem (curvatureWave 1 1 (curvaturePoint 0) (frequency j)) := by + rw [← curvatureData11_0_calc] + exact curvatureBox_mem 1 1 0 j (curvatureData11_0_pre j) +def curvatureData11_1 : Fin 31 → RI := ![⟨4790237585948495545227089171017014676099062708291786738665417,4790237585948495545227089171017014676099062708291835970707934⟩,⟨4361848158829120646243670027527487027224465776455304910017609,4361848158829120646243670027527487027224465776455352935657165⟩,⟨3871896460191312522439681576073643644023585042775762525104725,3871896460191312522439681576073643644023585042775808362386033⟩,⟨3337488740894413729760054797359381078185500123395899325555627,3337488740894413729760054797359381078185500123395941956572336⟩,⟨2782446487208078997030016210803447113340162035836588494066282,2782446487208078997030016210803447113340162035836626965229718⟩,⟨2235305067613682048046613475519055470752052457520797424018368,2235305067613682048046613475519055470752052457520830969091832⟩,⟨1725566146876322466916216880067525679936054976633885109909948,1725566146876322466916216880067525679936054976633913272030493⟩,⟨1278767318971554229491258078726676791168153238722736949115587,1278767318971554229491258078726676791168153238722759666682504⟩,⟨911738370907356326411583152287358316500051697862608555312645,911738370907356326411583152287358316500051697862626176546508⟩,⟨629819869439055881975831716986106103756615867443417540802175,629819869439055881975831716986106103756615867443430750859710⟩,⟨427295745592464063147516727688654852830926603990194043348756,427295745592464063147516727688654852830926603990203722247864⟩,⟨290859723357890021792411800566418783708886310732720513855767,290859723357890021792411800566418783708886310732727574584404⟩,⟨204465674180839182596859624096384361883566374555498069349765,204465674180839182596859624096384361883566374555503331550896⟩,⟨153507921029572909637220250066748190700294371315558600359095,153507921029572909637220250066748190700294371315562731089875⟩,⟨127169080016294172542514789774780020091173595968222538215971,127169080016294172542514789774780020091173595968226057272682⟩,⟨119080194857253556908455677845274468693624700539102541873196,119080194857253556908455677845274468693624700539105868695110⟩,⟨127169080016294172542514789774780020091173595968222538215972,127169080016294172542514789774780020091173595968226057272682⟩,⟨153507921029572909637220250066748190700294371315558600359096,153507921029572909637220250066748190700294371315562731089875⟩,⟨204465674180839182596859624096384361883566374555498069349763,204465674180839182596859624096384361883566374555503331550896⟩,⟨290859723357890021792411800566418783708886310732720513855767,290859723357890021792411800566418783708886310732727574584404⟩,⟨427295745592464063147516727688654852830926603990194043348757,427295745592464063147516727688654852830926603990203722247861⟩,⟨629819869439055881975831716986106103756615867443417540802176,629819869439055881975831716986106103756615867443430750859712⟩,⟨911738370907356326411583152287358316500051697862608555312642,911738370907356326411583152287358316500051697862626176546510⟩,⟨1278767318971554229491258078726676791168153238722736949115591,1278767318971554229491258078726676791168153238722759666682507⟩,⟨1725566146876322466916216880067525679936054976633885109909945,1725566146876322466916216880067525679936054976633913272030480⟩,⟨2235305067613682048046613475519055470752052457520797424018361,2235305067613682048046613475519055470752052457520830969091826⟩,⟨2782446487208078997030016210803447113340162035836588494066279,2782446487208078997030016210803447113340162035836626965229726⟩,⟨3337488740894413729760054797359381078185500123395899325555622,3337488740894413729760054797359381078185500123395941956572337⟩,⟨3871896460191312522439681576073643644023585042775762525104731,3871896460191312522439681576073643644023585042775808362386034⟩,⟨4361848158829120646243670027527487027224465776455304910017610,4361848158829120646243670027527487027224465776455352935657162⟩,⟨4790237585948495545227089171017014676099062708291786738665427,4790237585948495545227089171017014676099062708291835970707946⟩] +lemma curvatureData11_1_calc (j : Fin 31) : curvatureBox 1 1 1 j=curvatureData11_1 j := by + revert j + decide +kernel +lemma curvatureData11_1_pre (j : Fin 31) : (curvatureExpInput 1 1 1 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData11_1_mem (j : Fin 31) : (curvatureData11_1 j).Mem (curvatureWave 1 1 (curvaturePoint 1) (frequency j)) := by + rw [← curvatureData11_1_calc] + exact curvatureBox_mem 1 1 1 j (curvatureData11_1_pre j) +def curvatureData11_2 : Fin 31 → RI := ![⟨1406017603004263347834645793860135946466797920226079166189528,1406017603004263347834645793860135946466797920226099142294804⟩,⟨1018222989644512139902011748428669353804608340979710863029660,1018222989644512139902011748428669353804608340979726829664191⟩,⟨697930892329541495262812336442919034277463283693088008192525,697930892329541495262812336442919034277463283693100115395811⟩,⟨449440665757474772236300671720837143029591879963064069477378,449440665757474772236300671720837143029591879963072712542607⟩,⟨269911514341824193145272115473932801370584210304543681773602,269911514341824193145272115473932801370584210304549445619380⟩,⟨150187283808430960725646233661597273263919626850246986729176,150187283808430960725646233661597273263919626850250552013761⟩,⟨77094838977766737818769134906452386186831351878141419295759,77094838977766737818769134906452386186831351878143454285682⟩,⟨36502218400265340171017815098444197859918991502586666700658,36502218400265340171017815098444197859918991502587737055222⟩,⟨16048455183473504338396866342923582948819935047456738760936,16048455183473504338396866342923582948819935047457260226065⟩,⟨6664387071567115447333122827299193427028986277715588891361,6664387071567115447333122827299193427028986277715827763738⟩,⟨2695812577511913532317612317354660362145470422670468146826,2695812577511913532317612317354660362145470422670573986227⟩,⟨1113347853236891801228735309956057579734494791388700537366,1113347853236891801228735309956057579734494791388747939403⟩,⟨499667148789238899577610816352500972148213493430319011746,499667148789238899577610816352500972148213493430341778933⟩,⟨261832500457304893218745267468663460291728858206035051655,261832500457304893218745267468663460291728858206047611032⟩,⟨171681175772252902200476830328670006681448721706397134035,171681175772252902200476830328670006681448721706405637997⟩,⟨148216650181213900809792524462583464499197305648866194663,148216650181213900809792524462583464499197305648873617107⟩,⟨171681175772252902200476830328670006681448721706397134035,171681175772252902200476830328670006681448721706405637997⟩,⟨261832500457304893218745267468663460291728858206035051655,261832500457304893218745267468663460291728858206047611032⟩,⟨499667148789238899577610816352500972148213493430319011746,499667148789238899577610816352500972148213493430341778933⟩,⟨1113347853236891801228735309956057579734494791388700537366,1113347853236891801228735309956057579734494791388747939403⟩,⟨2695812577511913532317612317354660362145470422670468146826,2695812577511913532317612317354660362145470422670573986227⟩,⟨6664387071567115447333122827299193427028986277715588891361,6664387071567115447333122827299193427028986277715827763738⟩,⟨16048455183473504338396866342923582948819935047456738760936,16048455183473504338396866342923582948819935047457260226065⟩,⟨36502218400265340171017815098444197859918991502586666700658,36502218400265340171017815098444197859918991502587737055222⟩,⟨77094838977766737818769134906452386186831351878141419295759,77094838977766737818769134906452386186831351878143454285681⟩,⟨150187283808430960725646233661597273263919626850246986729176,150187283808430960725646233661597273263919626850250552013761⟩,⟨269911514341824193145272115473932801370584210304543681773601,269911514341824193145272115473932801370584210304549445619381⟩,⟨449440665757474772236300671720837143029591879963064069477377,449440665757474772236300671720837143029591879963072712542608⟩,⟨697930892329541495262812336442919034277463283693088008192526,697930892329541495262812336442919034277463283693100115395811⟩,⟨1018222989644512139902011748428669353804608340979710863029661,1018222989644512139902011748428669353804608340979726829664190⟩,⟨1406017603004263347834645793860135946466797920226079166189531,1406017603004263347834645793860135946466797920226099142294807⟩] +lemma curvatureData11_2_calc (j : Fin 31) : curvatureBox 1 1 2 j=curvatureData11_2 j := by + revert j + decide +kernel +lemma curvatureData11_2_pre (j : Fin 31) : (curvatureExpInput 1 1 2 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData11_2_mem (j : Fin 31) : (curvatureData11_2 j).Mem (curvatureWave 1 1 (curvaturePoint 2) (frequency j)) := by + rw [← curvatureData11_2_calc] + exact curvatureBox_mem 1 1 2 j (curvatureData11_2_pre j) +def curvatureData11_3 : Fin 31 → RI := ![⟨311467012276899448323139231917091766199391223710496922,311467012276899448323139231917091766199391223710517200⟩,⟨12882416568673153993447378907705244175880317362127966,12882416568673153993447378907705244175880317362129002⟩,⟨348675156843208364088016711832801915028215021634336,348675156843208364088016711832801915028215021634425⟩,⟨5865827861477831774565132741854226312431100180085,5865827861477831774565132741854226312431100180160⟩,⟨58365176326034570070869738088021702798719766842,58365176326034570070869738088021702798719766929⟩,⟨329486531580404022218130256622928058963301022,329486531580404022218130256622928058963301123⟩,⟨1030852379143930764154752227119231192329844,1030852379143930764154752227119231192329961⟩,⟨1804745185814079676450878416279368549391,1804745185814079676450878416279368549526⟩,⟨1883522219149661822326371306056274800,1883522219149661822326371306056274956⟩,⟨1350698473084867200532817884940762,1350698473084867200532817884940941⟩,⟨851537495825317095981264299566,851537495825317095981264299770⟩,⟨681509623292578586107002019,681509623292578586107002247⟩,⟨1120561382019317769846059,1120561382019317769846311⟩,⟨6556666474771068291847,6556666474771068292118⟩,⟨231199583428524638167,231199583428524638451⟩,⟨72296155941742355381,72296155941742355669⟩,⟨231199583428524638167,231199583428524638451⟩,⟨6556666474771068291847,6556666474771068292118⟩,⟨1120561382019317769846059,1120561382019317769846311⟩,⟨681509623292578586107002019,681509623292578586107002247⟩,⟨851537495825317095981264299566,851537495825317095981264299770⟩,⟨1350698473084867200532817884940762,1350698473084867200532817884940941⟩,⟨1883522219149661822326371306056274800,1883522219149661822326371306056274956⟩,⟨1804745185814079676450878416279368549391,1804745185814079676450878416279368549526⟩,⟨1030852379143930764154752227119231192329844,1030852379143930764154752227119231192329961⟩,⟨329486531580404022218130256622928058963301022,329486531580404022218130256622928058963301123⟩,⟨58365176326034570070869738088021702798719766842,58365176326034570070869738088021702798719766929⟩,⟨5865827861477831774565132741854226312431100180085,5865827861477831774565132741854226312431100180160⟩,⟨348675156843208364088016711832801915028215021634336,348675156843208364088016711832801915028215021634425⟩,⟨12882416568673153993447378907705244175880317362127966,12882416568673153993447378907705244175880317362129002⟩,⟨311467012276899448323139231917091766199391223710496922,311467012276899448323139231917091766199391223710517200⟩] +lemma curvatureData11_3_calc (j : Fin 31) : curvatureBox 1 1 3 j=curvatureData11_3 j := by + revert j + decide +kernel +lemma curvatureData11_3_pre (j : Fin 31) : (curvatureExpInput 1 1 3 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData11_3_mem (j : Fin 31) : (curvatureData11_3 j).Mem (curvatureWave 1 1 (curvaturePoint 3) (frequency j)) := by + rw [← curvatureData11_3_calc] + exact curvatureBox_mem 1 1 3 j (curvatureData11_3_pre j) +def curvatureData11_4 : Fin 31 → RI := ![⟨9296051911237295477869632416860708942584590420101,9296051911237295477869632416860708942584590420151⟩,⟨54886098130291998057643879023624251717867079582,54886098130291998057643879023624251717867079639⟩,⟨164996541655775408040335684222004891576008442,164996541655775408040335684222004891576008508⟩,⟨232796281652949854900593861390408058017569,232796281652949854900593861390408058017644⟩,⟨142530506071582726747612384204017285877,142530506071582726747612384204017285964⟩,⟨35469635794612308790294752399514470,35469635794612308790294752399514571⟩,⟨3459337020011874947742449616790,3459337020011874947742449616907⟩,⟨134400722161580528488124310,134400722161580528488124445⟩,⟨2302800193514175822326,2302800193514175822482⟩,⟨21836407082203305,21836407082203485⟩,⟨169774848202,169774848406⟩,⟨1943126,1943355⟩,⟨-84,168⟩,⟨-90,180⟩,⟨-95,189⟩,⟨-96,192⟩,⟨-95,189⟩,⟨-90,180⟩,⟨-84,168⟩,⟨1943126,1943355⟩,⟨169774848202,169774848406⟩,⟨21836407082203305,21836407082203485⟩,⟨2302800193514175822326,2302800193514175822482⟩,⟨134400722161580528488124310,134400722161580528488124445⟩,⟨3459337020011874947742449616790,3459337020011874947742449616907⟩,⟨35469635794612308790294752399514470,35469635794612308790294752399514571⟩,⟨142530506071582726747612384204017285877,142530506071582726747612384204017285964⟩,⟨232796281652949854900593861390408058017569,232796281652949854900593861390408058017644⟩,⟨164996541655775408040335684222004891576008442,164996541655775408040335684222004891576008508⟩,⟨54886098130291998057643879023624251717867079582,54886098130291998057643879023624251717867079639⟩,⟨9296051911237295477869632416860708942584590420101,9296051911237295477869632416860708942584590420151⟩] +lemma curvatureData11_4_calc (j : Fin 31) : curvatureBox 1 1 4 j=curvatureData11_4 j := by + revert j + decide +kernel +lemma curvatureData11_4_pre (j : Fin 31) : (curvatureExpInput 1 1 4 j).normSq.hi ≤ scale*1024^2 := by + revert j + decide +kernel +lemma curvatureData11_4_mem (j : Fin 31) : (curvatureData11_4 j).Mem (curvatureWave 1 1 (curvaturePoint 4) (frequency j)) := by + rw [← curvatureData11_4_calc] + exact curvatureBox_mem 1 1 4 j (curvatureData11_4_pre j) +def curvatureTable11 : Fin 5 → Fin 31 → RI := ![curvatureData11_0,curvatureData11_1,curvatureData11_2,curvatureData11_3,curvatureData11_4] +lemma curvatureTable11_mem (i : Fin 5) (j : Fin 31) : (curvatureTable11 i j).Mem (curvatureWave 1 1 (curvaturePoint i) (frequency j)) := by + fin_cases i + · exact curvatureData11_0_mem j + · exact curvatureData11_1_mem j + · exact curvatureData11_2_mem j + · exact curvatureData11_3_mem j + · exact curvatureData11_4_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/FiniteTaylorError.lean b/lean/OAI/Analysis/Triangular/Taylor/FiniteTaylorError.lean new file mode 100644 index 0000000000000000000000000000000000000000..47dbccf6f1ea4dab09dd5d36dcc66c6497ce4e4f --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/FiniteTaylorError.lean @@ -0,0 +1,59 @@ +import OAI.Analysis.Triangular.Construction.FiniteAssembly +import OAI.Analysis.Triangular.Construction.FinitePairBridge +import OAI.Analysis.Triangular.Construction.FiniteRemainder + +namespace OAI + +noncomputable section +open scoped BigOperators lp +open Complex Matrix +namespace AtomicTriangular.Construction +open AtomicTriangular.FiniteCertificate +lemma finiteJ_remainder (side : Fin 2) {z : ℝ} (hz : 0 finiteJJet side (actualParameter z) k s) (nearNode n) v‖ < + (if n.val=0 then (161/100000:ℝ) else 75/10000000) := by + obtain ⟨c,_,hc⟩ := Finset.exists_max_image Finset.univ (rawRemainderColumn 0 n) Finset.univ_nonempty + obtain ⟨d,_,hd⟩ := Finset.exists_max_image Finset.univ (rawRemainderColumn 1 n) Finset.univ_nonempty + have h0 := finite_input_error ((gamma side *ᵥ actualParameter z) 2) (finiteApprox side (actualParameter z)) 0 n hv (fun i => hc i (Finset.mem_univ i)) + have h1 := finite_input_error ((gamma (otherSide side) *ᵥ actualParameter z) 2) (finiteApprox (otherSide side) (actualParameter z)) 1 n hv (fun i => hd i (Finset.mem_univ i)) + have hg (side : Fin 2) : |(gamma side *ᵥ actualParameter z) 2|=6/1000 := by + rw [gamma_actual] + change |(if side.val=0 then -(3/500:ℝ) else 3/500)|=6/1000 + fin_cases side <;> norm_num + rw [hg] at h0 h1 + have ha := mul_le_mul_of_nonneg_right (finiteApprox_norm side (actualParameter z) (actualParameter_mem hz hzB)).le (rawRemainderColumn_nonneg 0 n c) + have hb := mul_le_mul_of_nonneg_right (finiteApprox_norm (otherSide side) (actualParameter z) (actualParameter_mem hz hzB)).le (rawRemainderColumn_nonneg 1 n d) + simp only [finiteJJet_pair,pairJJet] + rw [complexError_add] + have hh := norm_add_le + (complexError (fun k s => inputJJet (coefficientInput ((gamma side *ᵥ actualParameter z) 2) (finiteApprox side (actualParameter z)) 0) 0 k s) (nearNode n) v) + (complexError (fun k s => inputJJet (coefficientInput ((gamma (otherSide side) *ᵥ actualParameter z) 2) (finiteApprox (otherSide side) (actualParameter z)) 0) 1 k s) (nearNode n) v) + have htab := remainder_table n c d + linarith +lemma complexDeleted_finiteJ (side : Fin 2) (e : Fin 8 → ℝ) (m v : ℝ) : + (complexDeleted (fun k s => finiteJJet side e k s) m v).re=deletedSecond (finiteJ side e) m (m+v) := by + apply complexDeleted_re + · intro s; rfl + · simpa only [iteratedDeriv_one] using congrFun (finiteJJet_re_iterated side e 1) m + · exact congrFun (finiteJJet_re_iterated side e 2) m +lemma complexTaylor_finiteJ (side : Fin 2) (e : Fin 8 → ℝ) (m : ℤ) (y τ : ℝ) : + (complexTaylor (fun k s => finiteJJet side e k s) m (y*τ)).re=finiteTaylor side m y e τ := by + rw [finiteTaylor_exact] + simp only [complexTaylor,Complex.re_sum] + apply Finset.sum_congr rfl + intro j _ + rw [←Complex.ofReal_natCast,Complex.div_ofReal_re,←Complex.ofReal_pow, + Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im,mul_zero,sub_zero] + rw [congrFun (finiteJJet_re_iterated side e (j+2)) m,mul_pow] + ring +lemma finiteTaylor_error (side : Fin 2) {z : ℝ} (hz : 0 hj r q j) + have hr (r : Fin 8) := (HasDerivAt.sum (u := Finset.univ) (fun q _ => hq r q)).const_mul (e r:ℂ) + simpa only [finiteJJet,Finset.sum_apply,Pi.add_apply] using! + HasDerivAt.sum (u := Finset.univ) (fun r _ => hr r) +lemma finiteJJet_re_iterated (side : Fin 2) (e : Fin 8 → ℝ) (k : ℕ) : + (fun s : ℝ => (finiteJJet side e k s).re) = iteratedDeriv k (finiteJ side e) := by + induction k with + | zero => rfl + | succ k hk => + rw [iteratedDeriv_succ,← hk] + exact funext fun s => ((hasDerivAt_finiteJJet side e k s).real_of_complex).deriv.symm +lemma taylorWave_eq (q br : Fin 2) (m : ℤ) (l : ℕ) (t : ℝ) : + taylorWave q br m l t = finiteWaveJet q br t (l+2) m / ((l+2).factorial:ℂ) := rfl +lemma taylorRow_dot (side : Fin 2) (m : ℤ) (y : ℝ) (l : ℕ) (e : Fin 8 → ℝ) : + (∑ r : Fin 8, taylorRow side m y l r*e r) = + (iteratedDeriv (l+2) (finiteJ side e) m) * y^l / ((l+2).factorial:ℝ) := by + rw [← finiteJJet_re_iterated] + simp only [taylorRow,taylorWave_eq,finiteJJet,Complex.ofReal_intCast, + ← mul_div_assoc,← add_div,← Finset.sum_div] + simp only [Complex.re_sum,Complex.mul_re,Complex.ofReal_re,Complex.ofReal_im, + zero_mul,sub_zero] + simp only [Finset.sum_mul,Finset.sum_div,Finset.mul_sum] + apply Finset.sum_congr rfl + intro r hr + simp only [Complex.re_sum,← Complex.ofReal_natCast,Complex.div_ofReal_re, + Finset.sum_mul,Finset.mul_sum] + apply Finset.sum_congr rfl + intro q hq + apply Finset.sum_congr rfl + intro j hj + simp only [Complex.add_re] + ring +lemma finiteTaylor_exact (side : Fin 2) (m : ℤ) (y : ℝ) (e : Fin 8 → ℝ) (τ : ℝ) : + finiteTaylor side m y e τ = ∑ l ∈ Finset.range 21, + (iteratedDeriv (l+2) (finiteJ side e) m) * y^l / ((l+2).factorial:ℝ) * τ^l := by + unfold finiteTaylor + apply Finset.sum_congr rfl + intro l hl + rw [taylorRow_dot] +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/Taylor.lean b/lean/OAI/Analysis/Triangular/Taylor/Taylor.lean new file mode 100644 index 0000000000000000000000000000000000000000..945b21ff2be7f7d4bc8a8c482397656b2cba6d6a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/Taylor.lean @@ -0,0 +1,38 @@ +import OAI.Analysis.Triangular.Certificate.WaveIntervals + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex + +def otherSide (i : Fin 2) : Fin 2 := if i.val=0 then 1 else 0 + +def finiteSpectrum (side q : Fin 2) (j : Fin 31) (r : Fin 8) : ℂ := + if q.val=0 then fourierCoeff j*(Acoefficient side 22 r:ℂ) + else ∑ col : Fin 22, finiteColumn ⟨col.val,by omega⟩ j*(Acoefficient side ⟨col.val,by omega⟩ r:ℂ) + +def taylorPhase (q branch : Fin 2) (t : ℝ) : ℂ := + if branch.val=0 then I*Real.pi*t-(Real.pi*(damping q-h):ℝ) + else I*Real.pi*zeta (damping q) h t + +def taylorAmplitude (q branch : Fin 2) (t : ℝ) : ℂ := + if branch.val=0 then 1 else lambda (damping q) t + +def taylorWave (q branch : Fin 2) (m : ℤ) (l : ℕ) (t : ℝ) : ℂ := + taylorAmplitude q branch t * exp (taylorPhase q branch t*m) * + (taylorPhase q branch t)^(l+2) / ((l+2).factorial:ℂ) + +def taylorRow (side : Fin 2) (m : ℤ) (y : ℝ) (l : ℕ) (r : Fin 8) : ℝ := + y^l*(∑ q : Fin 2, ∑ j : Fin 31, + (finiteSpectrum side q j r*taylorWave q 0 m l (frequency j) + + finiteSpectrum (otherSide side) q j r*taylorWave q 1 m l (frequency j))).re + +def finiteTaylor (side : Fin 2) (m : ℤ) (y : ℝ) (e : Fin 8 → ℝ) (τ : ℝ) : ℝ := + ∑ l ∈ Finset.range 21, (∑ r : Fin 8, taylorRow side m y l r*e r)*τ^l + +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorExp.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb5ed5417f206577d15d3168c1c62d2e8cbe3e47 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp.lean @@ -0,0 +1,47 @@ +import OAI.Analysis.Triangular.Taylor.TaylorExp00 +import OAI.Analysis.Triangular.Taylor.TaylorExp01 +import OAI.Analysis.Triangular.Taylor.TaylorExp10 +import OAI.Analysis.Triangular.Taylor.TaylorExp11 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorExpTable : Fin 2 → Fin 2 → Fin 7 → Fin 31 → CI := ![![![taylorExp0_0_1,taylorExp0_0_3,taylorExp0_0_4,taylorExp0_0_7,taylorExp0_0_9,taylorExp0_0_12,taylorExp0_0_13],![taylorExp0_1_1,taylorExp0_1_3,taylorExp0_1_4,taylorExp0_1_7,taylorExp0_1_9,taylorExp0_1_12,taylorExp0_1_13]],![![taylorExp1_0_1,taylorExp1_0_3,taylorExp1_0_4,taylorExp1_0_7,taylorExp1_0_9,taylorExp1_0_12,taylorExp1_0_13],![taylorExp1_1_1,taylorExp1_1_3,taylorExp1_1_4,taylorExp1_1_7,taylorExp1_1_9,taylorExp1_1_12,taylorExp1_1_13]]] +lemma taylorExpTable_mem (q br : Fin 2) (n : Fin 7) (j : Fin 31) : + (taylorExpTable q br n j).Mem (exp (taylorPhase q br (frequency j)*(nearNode n:ℂ))) := by + fin_cases q <;> fin_cases br <;> fin_cases n + · exact taylorExp0_0_1_mem j + · exact taylorExp0_0_3_mem j + · exact taylorExp0_0_4_mem j + · exact taylorExp0_0_7_mem j + · exact taylorExp0_0_9_mem j + · exact taylorExp0_0_12_mem j + · exact taylorExp0_0_13_mem j + · exact taylorExp0_1_1_mem j + · exact taylorExp0_1_3_mem j + · exact taylorExp0_1_4_mem j + · exact taylorExp0_1_7_mem j + · exact taylorExp0_1_9_mem j + · exact taylorExp0_1_12_mem j + · exact taylorExp0_1_13_mem j + · exact taylorExp1_0_1_mem j + · exact taylorExp1_0_3_mem j + · exact taylorExp1_0_4_mem j + · exact taylorExp1_0_7_mem j + · exact taylorExp1_0_9_mem j + · exact taylorExp1_0_12_mem j + · exact taylorExp1_0_13_mem j + · exact taylorExp1_1_1_mem j + · exact taylorExp1_1_3_mem j + · exact taylorExp1_1_4_mem j + · exact taylorExp1_1_7_mem j + · exact taylorExp1_1_9_mem j + · exact taylorExp1_1_12_mem j + · exact taylorExp1_1_13_mem j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorExp00.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp00.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc6120e6b5feae62db28b842a019d884b5717ca5 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp00.lean @@ -0,0 +1,286 @@ +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorExp0_0_1 : Fin 31 → CI := ![⟨⟨-866025403784438646763723170752936183471402626905196181322913,-866025403784438646763723170752936183471402626905183762585500⟩,⟨-500000000000000000000000000000000000000000000000006566154022,-499999999999999999999999999999999999999999999999994618827156⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080400710405217,-766044443118978035202392650555416673935832457080388960416392⟩,⟨-642787609686539326322643409907263432907559884205687889089982,-642787609686539326322643409907263432907559884205676669859300⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205686789749417,-642787609686539326322643409907263432907559884205675882481224⟩,⟨-766044443118978035202392650555416673935832457080400814664902,-766044443118978035202392650555416673935832457080390439301342⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489250437,-499999999999999999999999999999999999999999999999994562765827⟩,⟨-866025403784438646763723170752936183471402626905195313836944,-866025403784438646763723170752936183471402626905185861540412⟩⟩, + ⟨⟨-342020143325668733044099614682259580763083367514164579487498,-342020143325668733044099614682259580763083367514155734537628⟩,⟨-939692620785908384054109277324731469936208134264469046767946,-939692620785908384054109277324731469936208134264460562604758⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184072788292319,-173648177666930348851716626769314796000375677184065087838959⟩,⟨-984807753012208059366743024589523013670643251719846248748820,-984807753012208059366743024589523013670643251719838747234646⟩⟩, + ⟨⟨-2854772203,3675752350⟩,⟨-1000000000000000000000000000000000000000000000000003265263816,-999999999999999999999999999999999999999999999999996734739264⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184067060774702,173648177666930348851716626769314796000375677184072432373101⟩,⟨-984807753012208059366743024589523013670643251719845151566634,-984807753012208059366743024589523013670643251719839559294668⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514158799325508,342020143325668733044099614682259580763083367514163057636786⟩,⟨-939692620785908384054109277324731469936208134264466875060012,-939692620785908384054109277324731469936208134264462172728614⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999998625587239,500000000000000000000000000000000000000000000000001848408931⟩,⟨-866025403784438646763723170752936183471402626905192112485348,-866025403784438646763723170752936183471402626905188241911538⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205680817906902,642787609686539326322643409907263432907559884205683112139860⟩,⟨-766044443118978035202392650555416673935832457080396649887844,-766044443118978035202392650555416673935832457080393548644822⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080394614083215,766044443118978035202392650555416673935832457080396112167357⟩,⟨-642787609686539326322643409907263432907559884205682847197370,-642787609686539326322643409907263432907559884205680453936792⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905189954516070,866025403784438646763723170752936183471402626905190810372959⟩,⟨-500000000000000000000000000000000000000000000000000751851462,-499999999999999999999999999999999999999999999999999011150272⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264464471961765,939692620785908384054109277324731469936208134264464856619597⟩,⟨-342020143325668733044099614682259580763083367514161109517514,-342020143325668733044099614682259580763083367514159975972882⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719842378261187,984807753012208059366743024589523013670643251719842475162830⟩,⟨-173648177666930348851716626769314796000375677184069621576840,-173648177666930348851716626769314796000375677184069063057090⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719842378260439,984807753012208059366743024589523013670643251719842475161964⟩,⟨173648177666930348851716626769314796000375677184069063062132,173648177666930348851716626769314796000375677184069621580864⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264464471960044,939692620785908384054109277324731469936208134264464856618258⟩,⟨342020143325668733044099614682259580763083367514159975976700,342020143325668733044099614682259580763083367514161109522372⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905189954512964,866025403784438646763723170752936183471402626905190810370953⟩,⟨499999999999999999999999999999999999999999999999999011153642,500000000000000000000000000000000000000000000000000751856976⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080394614080696,766044443118978035202392650555416673935832457080396112163801⟩,⟨642787609686539326322643409907263432907559884205680453940922,642787609686539326322643409907263432907559884205682847200174⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205680817903044,642787609686539326322643409907263432907559884205683112135181⟩,⟨766044443118978035202392650555416673935832457080393548649076,766044443118978035202392650555416673935832457080396649890976⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999998625582869,500000000000000000000000000000000000000000000000001848404295⟩,⟨866025403784438646763723170752936183471402626905188241914124,866025403784438646763723170752936183471402626905192112487718⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514158799320630,342020143325668733044099614682259580763083367514163057632021⟩,⟨939692620785908384054109277324731469936208134264462172730300,939692620785908384054109277324731469936208134264466875061792⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184067060768548,173648177666930348851716626769314796000375677184072432368187⟩,⟨984807753012208059366743024589523013670643251719839559295028,984807753012208059366743024589523013670643251719845151568286⟩⟩, + ⟨⟨-2854777273,3675745116⟩,⟨999999999999999999999999999999999999999999999999996734740088,1000000000000000000000000000000000000000000000000003265262478⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184072788297342,-173648177666930348851716626769314796000375677184065087845911⟩,⟨984807753012208059366743024589523013670643251719838747234178,984807753012208059366743024589523013670643251719846248746530⟩⟩, + ⟨⟨-342020143325668733044099614682259580763083367514164579490877,-342020143325668733044099614682259580763083367514155734542861⟩,⟨939692620785908384054109277324731469936208134264460562604050,939692620785908384054109277324731469936208134264469046765440⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489253604,-499999999999999999999999999999999999999999999999994562770708⟩,⟨866025403784438646763723170752936183471402626905185861538948,866025403784438646763723170752936183471402626905195313833830⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205686789753345,-642787609686539326322643409907263432907559884205675882485247⟩,⟨766044443118978035202392650555416673935832457080390439298182,766044443118978035202392650555416673935832457080400814661650⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080400710407312,-766044443118978035202392650555416673935832457080388960420236⟩,⟨642787609686539326322643409907263432907559884205676669856626,642787609686539326322643409907263432907559884205687889085620⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905196181323615,-866025403784438646763723170752936183471402626905183762590658⟩,⟨499999999999999999999999999999999999999999999999994618824454,500000000000000000000000000000000000000000000000006566147044⟩⟩] +lemma taylorExp0_0_1_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 1)).exp = taylorExp0_0_1 j := by + revert j + decide +kernel +lemma taylorExp0_0_1_mem (j : Fin 31) : (taylorExp0_0_1 j).Mem (exp (taylorPhase 0 0 (frequency j)*((1:ℤ):ℂ))) := by + rw [← taylorExp0_0_1_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 1)) (by + revert j + decide +kernel) +def taylorExp0_0_3 : Fin 31 → CI := ![⟨⟨-30932224656,35037104858⟩,⟨-1000000000000000000000000000000000000000000000000032984666370,-999999999999999999999999999999999999999999999999967015336854⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999974511166833,500000000000000000000000000000000000000000000000028806768513⟩,⟨-866025403784438646763723170752936183471402626905216651711810,-866025403784438646763723170752936183471402626905162060735860⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905171143961806,866025403784438646763723170752936183471402626905211262878518⟩,⟨-500000000000000000000000000000000000000000000000018704234480,-499999999999999999999999999999999999999999999999978214824182⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939291469,1000000000000000000000000000000000000000000000000013060713126⟩,⟨-11418759662,14702662002⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905173685226827,866025403784438646763723170752936183471402626905205437708056⟩,⟨499999999999999999999999999999999999999999999999985627459026,500000000000000000000000000000000000000000000000016979491762⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999982086566666,500000000000000000000000000000000000000000000000015543479550⟩,⟨866025403784438646763723170752936183471402626905174442270132,866025403784438646763723170752936183471402626905207554084360⟩⟩, + ⟨⟨-16899075226,14436143856⟩,⟨999999999999999999999999999999999999999999999999984332392204,1000000000000000000000000000000000000000000000000015667611286⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096955886,-499999999999999999999999999999999999999999999999987799010636⟩,⟨866025403784438646763723170752936183471402626905176444172558,866025403784438646763723170752936183471402626905203089248932⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905200655852223,-866025403784438646763723170752936183471402626905180930011496⟩,⟨499999999999999999999999999999999999999999999999989105852226,500000000000000000000000000000000000000000000000009235176542⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000006530375982,-999999999999999999999999999999999999999999999999993469624231⟩,⟨-7351353378,5709398374⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905196181322913,-866025403784438646763723170752936183471402626905183762585500⟩,⟨-500000000000000000000000000000000000000000000000006566154022,-499999999999999999999999999999999999999999999999994618827156⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489250437,-499999999999999999999999999999999999999999999999994562765827⟩,⟨-866025403784438646763723170752936183471402626905195313836944,-866025403784438646763723170752936183471402626905185861540412⟩⟩, + ⟨⟨-2854772203,3675752350⟩,⟨-1000000000000000000000000000000000000000000000000003265263816,-999999999999999999999999999999999999999999999999996734739264⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999998625587239,500000000000000000000000000000000000000000000000001848408931⟩,⟨-866025403784438646763723170752936183471402626905192112485348,-866025403784438646763723170752936183471402626905188241911538⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905189954516070,866025403784438646763723170752936183471402626905190810372959⟩,⟨-500000000000000000000000000000000000000000000000000751851462,-499999999999999999999999999999999999999999999999999011150272⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905189954512964,866025403784438646763723170752936183471402626905190810370953⟩,⟨499999999999999999999999999999999999999999999999999011153642,500000000000000000000000000000000000000000000000000751856976⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999998625582869,500000000000000000000000000000000000000000000000001848404295⟩,⟨866025403784438646763723170752936183471402626905188241914124,866025403784438646763723170752936183471402626905192112487718⟩⟩, + ⟨⟨-2854777511,3675746346⟩,⟨999999999999999999999999999999999999999999999999996734739408,1000000000000000000000000000000000000000000000000003265263266⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489253604,-499999999999999999999999999999999999999999999999994562770708⟩,⟨866025403784438646763723170752936183471402626905185861538948,866025403784438646763723170752936183471402626905195313833830⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905196181323615,-866025403784438646763723170752936183471402626905183762590658⟩,⟨499999999999999999999999999999999999999999999999994618824454,500000000000000000000000000000000000000000000000006566147044⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000006530376134,-999999999999999999999999999999999999999999999999993469624347⟩,⟨-5709403524,7351348262⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905200655848102,-866025403784438646763723170752936183471402626905180930009073⟩,⟨-500000000000000000000000000000000000000000000000009235181440,-499999999999999999999999999999999999999999999999989105858860⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096951365,-499999999999999999999999999999999999999999999999987799006330⟩,⟨-866025403784438646763723170752936183471402626905203089251490,-866025403784438646763723170752936183471402626905176444175326⟩⟩, + ⟨⟨-16899068771,14436150239⟩,⟨-1000000000000000000000000000000000000000000000000015667611120,-999999999999999999999999999999999999999999999999984332392110⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999982086571115,500000000000000000000000000000000000000000000000015543483824⟩,⟨-866025403784438646763723170752936183471402626905207554081534,-866025403784438646763723170752936183471402626905174442267480⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905173685228535,866025403784438646763723170752936183471402626905205437711262⟩,⟨-500000000000000000000000000000000000000000000000016979488526,-499999999999999999999999999999999999999999999999985627454324⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939290637,1000000000000000000000000000000000000000000000000013060713630⟩,⟨-14702658010,11418764986⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905171143959209,866025403784438646763723170752936183471402626905211262875041⟩,⟨499999999999999999999999999999999999999999999999978214829902,500000000000000000000000000000000000000000000000018704239326⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999974511164134,500000000000000000000000000000000000000000000000028806763193⟩,⟨866025403784438646763723170752936183471402626905162060739500,866025403784438646763723170752936183471402626905216651712820⟩⟩, + ⟨⟨-30932229478,35037098409⟩,⟨999999999999999999999999999999999999999999999999967015337368,1000000000000000000000000000000000000000000000000032984665254⟩⟩] +lemma taylorExp0_0_3_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 3)).exp = taylorExp0_0_3 j := by + revert j + decide +kernel +lemma taylorExp0_0_3_mem (j : Fin 31) : (taylorExp0_0_3 j).Mem (exp (taylorPhase 0 0 (frequency j)*((3:ℤ):ℂ))) := by + rw [← taylorExp0_0_3_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 3)) (by + revert j + decide +kernel) +def taylorExp0_0_4 : Fin 31 → CI := ![⟨⟨-500000000000000000000000000000000000000000000000047774925396,-499999999999999999999999999999999999999999999999956964982277⟩,⟨866025403784438646763723170752936183471402626905143414446660,866025403784438646763723170752936183471402626905234477026158⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264502941106601,-939692620785908384054109277324731469936208134264428072215687⟩,⟨342020143325668733044099614682259580763083367514120687772174,342020143325668733044099614682259580763083367514195768931970⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264498609770198,-939692620785908384054109277324731469936208134264429034067948⟩,⟨-342020143325668733044099614682259580763083367514197538629118,-342020143325668733044099614682259580763083367514128175653472⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000034328593096,-499999999999999999999999999999999999999999999999961879483450⟩,⟨-866025403784438646763723170752936183471402626905227506157030,-866025403784438646763723170752936183471402626905155311169308⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184040099111975,173648177666930348851716626769314796000375677184102628044420⟩,⟨-984807753012208059366743024589523013670643251719873387932090,-984807753012208059366743024589523013670643251719810752685130⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080373943438418,766044443118978035202392650555416673935832457080418893663530⟩,⟨-642787609686539326322643409907263432907559884205703060770884,-642787609686539326322643409907263432907559884205657724751458⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939291469,1000000000000000000000000000000000000000000000000013060713126⟩,⟨-11418759662,14702662002⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080377922009126,766044443118978035202392650555416673935832457080410693385860⟩,⟨642787609686539326322643409907263432907559884205666736660654,642787609686539326322643409907263432907559884205699080096354⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184051917143909,173648177666930348851716626769314796000375677184084341982210⟩,⟨984807753012208059366743024589523013670643251719826493553900,984807753012208059366743024589523013670643251719858787552338⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096955886,-499999999999999999999999999999999999999999999999987799010636⟩,⟨866025403784438646763723170752936183471402626905176444172558,866025403784438646763723170752936183471402626905203089248932⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264473669626395,-939692620785908384054109277324731469936208134264456220535794⟩,⟨342020143325668733044099614682259580763083367514150885363554,342020143325668733044099614682259580763083367514168657197798⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264470823412049,-939692620785908384054109277324731469936208134264457943585749⟩,⟨-342020143325668733044099614682259580763083367514167575125916,-342020143325668733044099614682259580763083367514155053303262⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489250437,-499999999999999999999999999999999999999999999999994562765827⟩,⟨-866025403784438646763723170752936183471402626905195313836944,-866025403784438646763723170752936183471402626905185861540412⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184067060774702,173648177666930348851716626769314796000375677184072432373101⟩,⟨-984807753012208059366743024589523013670643251719845151566634,-984807753012208059366743024589523013670643251719839559294668⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080394614083215,766044443118978035202392650555416673935832457080396112167357⟩,⟨-642787609686539326322643409907263432907559884205682847197370,-642787609686539326322643409907263432907559884205680453936792⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080394614080696,766044443118978035202392650555416673935832457080396112163801⟩,⟨642787609686539326322643409907263432907559884205680453940922,642787609686539326322643409907263432907559884205682847200174⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184067060768548,173648177666930348851716626769314796000375677184072432368187⟩,⟨984807753012208059366743024589523013670643251719839559295028,984807753012208059366743024589523013670643251719845151568286⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489253604,-499999999999999999999999999999999999999999999999994562770708⟩,⟨866025403784438646763723170752936183471402626905185861538948,866025403784438646763723170752936183471402626905195313833830⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264470823413628,-939692620785908384054109277324731469936208134264457943587609⟩,⟨342020143325668733044099614682259580763083367514155053298568,342020143325668733044099614682259580763083367514167575120924⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264473669623711,-939692620785908384054109277324731469936208134264456220534602⟩,⟨-342020143325668733044099614682259580763083367514168657202328,-342020143325668733044099614682259580763083367514150885369606⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096951365,-499999999999999999999999999999999999999999999999987799006330⟩,⟨-866025403784438646763723170752936183471402626905203089251490,-866025403784438646763723170752936183471402626905176444175326⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184051917148030,173648177666930348851716626769314796000375677184084341989196⟩,⟨-984807753012208059366743024589523013670643251719858787552808,-984807753012208059366743024589523013670643251719826493551508⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080377922011624,766044443118978035202392650555416673935832457080410693391161⟩,⟨-642787609686539326322643409907263432907559884205699080092946,-642787609686539326322643409907263432907559884205666736654508⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939291309,1000000000000000000000000000000000000000000000000013060712998⟩,⟨-14702656838,11418764850⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080373943437683,766044443118978035202392650555416673935832457080418893657423⟩,⟨642787609686539326322643409907263432907559884205657724757970,642787609686539326322643409907263432907559884205703060772000⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184040099108957,173648177666930348851716626769314796000375677184102628037328⟩,⟨984807753012208059366743024589523013670643251719810752687964,984807753012208059366743024589523013670643251719873387930840⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000034328599607,-499999999999999999999999999999999999999999999999961879484043⟩,⟨866025403784438646763723170752936183471402626905155311163536,866025403784438646763723170752936183471402626905227506157178⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264498609770482,-939692620785908384054109277324731469936208134264429034070760⟩,⟨342020143325668733044099614682259580763083367514128175650304,342020143325668733044099614682259580763083367514197538623430⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264502941103616,-939692620785908384054109277324731469936208134264428072215729⟩,⟨-342020143325668733044099614682259580763083367514195768934800,-342020143325668733044099614682259580763083367514120687778038⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000047774921101,-499999999999999999999999999999999999999999999999956964977865⟩,⟨-866025403784438646763723170752936183471402626905234477028914,-866025403784438646763723170752936183471402626905143414449296⟩⟩] +lemma taylorExp0_0_4_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 4)).exp = taylorExp0_0_4 j := by + revert j + decide +kernel +lemma taylorExp0_0_4_mem (j : Fin 31) : (taylorExp0_0_4 j).Mem (exp (taylorPhase 0 0 (frequency j)*((4:ℤ):ℂ))) := by + rw [← taylorExp0_0_4_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 4)) (by + revert j + decide +kernel) +def taylorExp0_0_7 : Fin 31 → CI := ![⟨⟨866025403784438646763723170752936183471402626905104443198561,866025403784438646763723170752936183471402626905271395837186⟩,⟨499999999999999999999999999999999999999999999999920791606126,500000000000000000000000000000000000000000000000087503225134⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184176510071705,-173648177666930348851716626769314796000375677183971068100676⟩,⟨984807753012208059366743024589523013670643251719738885576110,984807753012208059366743024589523013670643251719944399676604⟩⟩, + ⟨⟨-984807753012208059366743024589523013670643251719916193166116,-984807753012208059366743024589523013670643251719770085865278⟩,⟨173648177666930348851716626769314796000375677183992199073014,173648177666930348851716626769314796000375677184138400534758⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000071110434530,-499999999999999999999999999999999999999999999999922253697158⟩,⟨-866025403784438646763723170752936183471402626905266549887456,-866025403784438646763723170752936183471402626905117909390208⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205634223808659,642787609686539326322643409907263432907559884205734737465031⟩,⟨-766044443118978035202392650555416673935832457080443411753780,-766044443118978035202392650555416673935832457080342565079000⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264430671218115,939692620785908384054109277324731469936208134264496411039134⟩,⟨342020143325668733044099614682259580763083367514130910356486,342020143325668733044099614682259580763083367514196346857082⟩⟩, + ⟨⟨-49401458355,43654627080⟩,⟨999999999999999999999999999999999999999999999999953471958862,1000000000000000000000000000000000000000000000000046528044298⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264502941106601,-939692620785908384054109277324731469936208134264428072215687⟩,⟨342020143325668733044099614682259580763083367514120687772174,342020143325668733044099614682259580763083367514195768931970⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205716611566116,-642787609686539326322643409907263432907559884205643545050862⟩,⟨-766044443118978035202392650555416673935832457080433069376264,-766044443118978035202392650555416673935832457080360295438736⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999974511166833,500000000000000000000000000000000000000000000000028806768513⟩,⟨-866025403784438646763723170752936183471402626905216651711810,-866025403784438646763723170752936183471402626905162060735860⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719827941037151,984807753012208059366743024589523013670643251719856342139481⟩,⟨173648177666930348851716626769314796000375677184056852254888,173648177666930348851716626769314796000375677184085066396730⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184051917143909,173648177666930348851716626769314796000375677184084341982210⟩,⟨984807753012208059366743024589523013670643251719826493553900,984807753012208059366743024589523013670643251719858787552338⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905200655852223,-866025403784438646763723170752936183471402626905180930011496⟩,⟨499999999999999999999999999999999999999999999999989105852226,500000000000000000000000000000000000000000000000009235176542⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080400710405217,-766044443118978035202392650555416673935832457080388960416392⟩,⟨-642787609686539326322643409907263432907559884205687889089982,-642787609686539326322643409907263432907559884205676669859300⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514158799325508,342020143325668733044099614682259580763083367514163057636786⟩,⟨-939692620785908384054109277324731469936208134264466875060012,-939692620785908384054109277324731469936208134264462172728614⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514158799320630,342020143325668733044099614682259580763083367514163057632021⟩,⟨939692620785908384054109277324731469936208134264462172730300,939692620785908384054109277324731469936208134264466875061792⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080400710407312,-766044443118978035202392650555416673935832457080388960420236⟩,⟨642787609686539326322643409907263432907559884205676669856626,642787609686539326322643409907263432907559884205687889085620⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905200655848102,-866025403784438646763723170752936183471402626905180930009073⟩,⟨-500000000000000000000000000000000000000000000000009235181440,-499999999999999999999999999999999999999999999999989105858860⟩⟩, + ⟨⟨173648177666930348851716626769314796000375677184051917148030,173648177666930348851716626769314796000375677184084341989196⟩,⟨-984807753012208059366743024589523013670643251719858787552808,-984807753012208059366743024589523013670643251719826493551508⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719827941038041,984807753012208059366743024589523013670643251719856342140171⟩,⟨-173648177666930348851716626769314796000375677184085066392648,-173648177666930348851716626769314796000375677184056852251010⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999974511164134,500000000000000000000000000000000000000000000000028806763193⟩,⟨866025403784438646763723170752936183471402626905162060739500,866025403784438646763723170752936183471402626905216651712820⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205716611573728,-642787609686539326322643409907263432907559884205643545052659⟩,⟨766044443118978035202392650555416673935832457080360295431846,766044443118978035202392650555416673935832457080433069375170⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264502941103616,-939692620785908384054109277324731469936208134264428072215729⟩,⟨-342020143325668733044099614682259580763083367514195768934800,-342020143325668733044099614682259580763083367514120687778038⟩⟩, + ⟨⟨-49401448584,43654629334⟩,⟨-1000000000000000000000000000000000000000000000000046528040444,-999999999999999999999999999999999999999999999999953471962524⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264430671219882,939692620785908384054109277324731469936208134264496411041312⟩,⟨-342020143325668733044099614682259580763083367514196346852568,-342020143325668733044099614682259580763083367514130910351556⟩⟩, + ⟨⟨642787609686539326322643409907263432907559884205634223805074,642787609686539326322643409907263432907559884205734737459733⟩,⟨766044443118978035202392650555416673935832457080342565083392,766044443118978035202392650555416673935832457080443411756448⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000071110439417,-499999999999999999999999999999999999999999999999922253704095⟩,⟨866025403784438646763723170752936183471402626905117909388120,866025403784438646763723170752936183471402626905266549883326⟩⟩, + ⟨⟨-984807753012208059366743024589523013670643251719916193165428,-984807753012208059366743024589523013670643251719770085864315⟩,⟨-173648177666930348851716626769314796000375677184138400540146,-173648177666930348851716626769314796000375677183992199078128⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184176510064946,-173648177666930348851716626769314796000375677183971068098349⟩,⟨-984807753012208059366743024589523013670643251719944399675212,-984807753012208059366743024589523013670643251719738885579152⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905104443201286,866025403784438646763723170752936183471402626905271395839808⟩,⟨-500000000000000000000000000000000000000000000000087503220638,-499999999999999999999999999999999999999999999999920791601728⟩⟩] +lemma taylorExp0_0_7_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 7)).exp = taylorExp0_0_7 j := by + revert j + decide +kernel +lemma taylorExp0_0_7_mem (j : Fin 31) : (taylorExp0_0_7 j).Mem (exp (taylorPhase 0 0 (frequency j)*((7:ℤ):ℂ))) := by + rw [← taylorExp0_0_7_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 7)) (by + revert j + decide +kernel) +def taylorExp0_0_9 : Fin 31 → CI := ![⟨⟨-118972420721,106657790186⟩,⟨999999999999999999999999999999999999999999999999887184894918,1000000000000000000000000000000000000000000000000112815105824⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000093066400898,-999999999999999999999999999999999999999999999999906933603055⟩,⟨-98813226032,87319571814⟩⟩, + ⟨⟨-117085060210,127757742128⟩,⟨-1000000000000000000000000000000000000000000000000122421401584,-999999999999999999999999999999999999999999999999877578599246⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999937323745277,1000000000000000000000000000000000000000000000000062676258830⟩,⟨-57750404382,67602109166⟩⟩, + ⟨⟨-107620564764,98589835316⟩,⟨999999999999999999999999999999999999999999999999896894801822,1000000000000000000000000000000000000000000000000103105201902⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000065972860914,-999999999999999999999999999999999999999999999999934027140111⟩,⟨-70077737814,61867982992⟩⟩, + ⟨⟨-63530984543,70919764437⟩,⟨-1000000000000000000000000000000000000000000000000067225375228,-999999999999999999999999999999999999999999999999932774626248⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999973877762313,1000000000000000000000000000000000000000000000000026122239246⟩,⟨-22838336190,29406140758⟩⟩, + ⟨⟨-49401458355,43654627080⟩,⟨999999999999999999999999999999999999999999999999953471958862,1000000000000000000000000000000000000000000000000046528044298⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000031335622290,-999999999999999999999999999999999999999999999999968664379655⟩,⟨-33798548366,28872694272⟩⟩, + ⟨⟨-30932224656,35037104858⟩,⟨-1000000000000000000000000000000000000000000000000032984666370,-999999999999999999999999999999999999999999999999967015336854⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939291469,1000000000000000000000000000000000000000000000000013060713126⟩,⟨-11418759662,14702662002⟩⟩, + ⟨⟨-16899075226,14436143856⟩,⟨999999999999999999999999999999999999999999999999984332392204,1000000000000000000000000000000000000000000000000015667611286⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000006530375982,-999999999999999999999999999999999999999999999999993469624231⟩,⟨-7351353378,5709398374⟩⟩, + ⟨⟨-2854772203,3675752350⟩,⟨-1000000000000000000000000000000000000000000000000003265263816,-999999999999999999999999999999999999999999999999996734739264⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨-2854777511,3675746346⟩,⟨999999999999999999999999999999999999999999999999996734739408,1000000000000000000000000000000000000000000000000003265263266⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000006530376134,-999999999999999999999999999999999999999999999999993469624347⟩,⟨-5709403524,7351348262⟩⟩, + ⟨⟨-16899070310,14436150777⟩,⟨-1000000000000000000000000000000000000000000000000015667612148,-999999999999999999999999999999999999999999999999984332391062⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939290637,1000000000000000000000000000000000000000000000000013060713630⟩,⟨-14702658010,11418764986⟩⟩, + ⟨⟨-30932229478,35037098409⟩,⟨999999999999999999999999999999999999999999999999967015337368,1000000000000000000000000000000000000000000000000032984665254⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000031335624686,-999999999999999999999999999999999999999999999999968664377603⟩,⟨-28872701594,33798545490⟩⟩, + ⟨⟨-49401450327,43654630060⟩,⟨-1000000000000000000000000000000000000000000000000046528041624,-999999999999999999999999999999999999999999999999953471961238⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999973877760425,1000000000000000000000000000000000000000000000000026122241390⟩,⟨-29406137150,22838343822⟩⟩, + ⟨⟨-63530982328,70919748715⟩,⟨999999999999999999999999999999999999999999999999932774634934,1000000000000000000000000000000000000000000000000067225365978⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000065972862602,-999999999999999999999999999999999999999999999999934027139035⟩,⟨-61867990022,70077733542⟩⟩, + ⟨⟨-107620557212,98589839108⟩,⟨-1000000000000000000000000000000000000000000000000103105200202,-999999999999999999999999999999999999999999999999896894803880⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999937323743629,1000000000000000000000000000000000000000000000000062676260310⟩,⟨-67602104550,57750412130⟩⟩, + ⟨⟨-117085066883,127757736673⟩,⟨999999999999999999999999999999999999999999999999877578598818,1000000000000000000000000000000000000000000000000122421402374⟩⟩, + ⟨⟨-1000000000000000000000000000000000000000000000000093066401170,-999999999999999999999999999999999999999999999999906933603635⟩,⟨-87319576818,98813220714⟩⟩, + ⟨⟨-118972419569,106657799344⟩,⟨-1000000000000000000000000000000000000000000000000112815109742,-999999999999999999999999999999999999999999999999887184890828⟩⟩] +lemma taylorExp0_0_9_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 9)).exp = taylorExp0_0_9 j := by + revert j + decide +kernel +lemma taylorExp0_0_9_mem (j : Fin 31) : (taylorExp0_0_9 j).Mem (exp (taylorPhase 0 0 (frequency j)*((9:ℤ):ℂ))) := by + rw [← taylorExp0_0_9_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 9)) (by + revert j + decide +kernel) +def taylorExp0_0_12 : Fin 31 → CI := ![⟨⟨999999999999999999999999999999999999999999999999868023870717,1000000000000000000000000000000000000000000000000131976130214⟩,⟨-123766376166,140185883330⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000209831371897,-499999999999999999999999999999999999999999999999803440357983⟩,⟨866025403784438646763723170752936183471402626904983208139488,866025403784438646763723170752936183471402626905389757484914⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000144336633529,-499999999999999999999999999999999999999999999999843339620582⟩,⟨-866025403784438646763723170752936183471402626905344270799018,-866025403784438646763723170752936183471402626905043472377212⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999947747883569,1000000000000000000000000000000000000000000000000052252119774⟩,⟨-45684315022,58819921182⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000122932167786,-499999999999999999999999999999999999999999999999887495623309⟩,⟨866025403784438646763723170752936183471402626905069478196046,866025403784438646763723170752936183471402626905305129374442⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000119540019075,-499999999999999999999999999999999999999999999999870980175350⟩,⟨-866025403784438646763723170752936183471402626905317238054020,-866025403784438646763723170752936183471402626905068863172428⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999937323745277,1000000000000000000000000000000000000000000000000062676258830⟩,⟨-57750404382,67602109166⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000102545284859,-499999999999999999999999999999999999999999999999905038563252⟩,⟨866025403784438646763723170752936183471402626905089278378078,866025403784438646763723170752936183471402626905286971142372⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000071110434530,-499999999999999999999999999999999999999999999999922253697158⟩,⟨-866025403784438646763723170752936183471402626905266549887456,-866025403784438646763723170752936183471402626905117909390208⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999973877762313,1000000000000000000000000000000000000000000000000026122239246⟩,⟨-22838336190,29406140758⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000047774925396,-499999999999999999999999999999999999999999999999956964982277⟩,⟨866025403784438646763723170752936183471402626905143414446660,866025403784438646763723170752936183471402626905234477026158⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000034328593096,-499999999999999999999999999999999999999999999999961879483450⟩,⟨-866025403784438646763723170752936183471402626905227506157030,-866025403784438646763723170752936183471402626905155311169308⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939291469,1000000000000000000000000000000000000000000000000013060713126⟩,⟨-11418759662,14702662002⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096955886,-499999999999999999999999999999999999999999999999987799010636⟩,⟨866025403784438646763723170752936183471402626905176444172558,866025403784438646763723170752936183471402626905203089248932⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489250437,-499999999999999999999999999999999999999999999999994562765827⟩,⟨-866025403784438646763723170752936183471402626905195313836944,-866025403784438646763723170752936183471402626905185861540412⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000004489253604,-499999999999999999999999999999999999999999999999994562770708⟩,⟨866025403784438646763723170752936183471402626905185861538948,866025403784438646763723170752936183471402626905195313833830⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000014096951365,-499999999999999999999999999999999999999999999999987799006330⟩,⟨-866025403784438646763723170752936183471402626905203089251490,-866025403784438646763723170752936183471402626905176444175326⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999986939290637,1000000000000000000000000000000000000000000000000013060713630⟩,⟨-14702658010,11418764986⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000034328599607,-499999999999999999999999999999999999999999999999961879484043⟩,⟨866025403784438646763723170752936183471402626905155311163536,866025403784438646763723170752936183471402626905227506157178⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000047774921101,-499999999999999999999999999999999999999999999999956964977865⟩,⟨-866025403784438646763723170752936183471402626905234477028914,-866025403784438646763723170752936183471402626905143414449296⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999973877760425,1000000000000000000000000000000000000000000000000026122241390⟩,⟨-29406137150,22838343822⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000071110439417,-499999999999999999999999999999999999999999999999922253704095⟩,⟨866025403784438646763723170752936183471402626905117909388120,866025403784438646763723170752936183471402626905266549883326⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000102545280269,-499999999999999999999999999999999999999999999999905038559082⟩,⟨-866025403784438646763723170752936183471402626905286971144850,-866025403784438646763723170752936183471402626905089278380974⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999937323744669,1000000000000000000000000000000000000000000000000062676259430⟩,⟨-67602103082,57750411686⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000119540026813,-499999999999999999999999999999999999999999999999870980176282⟩,⟨866025403784438646763723170752936183471402626905068863166426,866025403784438646763723170752936183471402626905317238054814⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000122932168624,-499999999999999999999999999999999999999999999999887495610224⟩,⟨-866025403784438646763723170752936183471402626905305129385050,-866025403784438646763723170752936183471402626905069478192720⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999947747884561,1000000000000000000000000000000000000000000000000052252118302⟩,⟨-58819912734,45684320990⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000144336641906,-499999999999999999999999999999999999999999999999843339621317⟩,⟨866025403784438646763723170752936183471402626905043472371022,866025403784438646763723170752936183471402626905344270800464⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000209831371441,-499999999999999999999999999999999999999999999999803440349650⟩,⟨-866025403784438646763723170752936183471402626905389757491724,-866025403784438646763723170752936183471402626904983208138420⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999868023872429,1000000000000000000000000000000000000000000000000131976128782⟩,⟨-140185875226,123766381130⟩⟩] +lemma taylorExp0_0_12_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 12)).exp = taylorExp0_0_12 j := by + revert j + decide +kernel +lemma taylorExp0_0_12_mem (j : Fin 31) : (taylorExp0_0_12 j).Mem (exp (taylorPhase 0 0 (frequency j)*((12:ℤ):ℂ))) := by + rw [← taylorExp0_0_12_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 12)) (by + revert j + decide +kernel) +def taylorExp0_0_13 : Fin 31 → CI := ![⟨⟨-866025403784438646763723170752936183471402626905436185813957,-866025403784438646763723170752936183471402626904935548348890⟩,⟨-500000000000000000000000000000000000000000000000257946445526,-499999999999999999999999999999999999999999999999757458241020⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264298157066955,939692620785908384054109277324731469936208134264636787314938⟩,⟨-342020143325668733044099614682259580763083367514322219625194,-342020143325668733044099614682259580763083367513983436581034⟩⟩, + ⟨⟨-342020143325668733044099614682259580763083367514376555627730,-342020143325668733044099614682259580763083367513959187690435⟩,⟨939692620785908384054109277324731469936208134264253255257702,939692620785908384054109277324731469936208134264670738310606⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000144336633529,-499999999999999999999999999999999999999999999999843339620582⟩,⟨-866025403784438646763723170752936183471402626905344270799018,-866025403784438646763723170752936183471402626905043472377212⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719780911541196,984807753012208059366743024589523013670643251719901660910614⟩,⟨173648177666930348851716626769314796000375677184015525294450,173648177666930348851716626769314796000375677184136095390302⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080513642256208,-766044443118978035202392650555416673935832457080284471971421⟩,⟨642787609686539326322643409907263432907559884205562539640594,642787609686539326322643409907263432907559884205791956849680⟩⟩, + ⟨⟨-117085060210,127757742128⟩,⟨-1000000000000000000000000000000000000000000000000122421401584,-999999999999999999999999999999999999999999999999877578599246⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080303086977522,766044443118978035202392650555416673935832457080481306719052⟩,⟨642787609686539326322643409907263432907559884205596441270928,642787609686539326322643409907263432907559884205774406710724⟩⟩, + ⟨⟨-984807753012208059366743024589523013670643251719916193166116,-984807753012208059366743024589523013670643251719770085865278⟩,⟨173648177666930348851716626769314796000375677183992199073014,173648177666930348851716626769314796000375677184138400534758⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999948090137768,500000000000000000000000000000000000000000000000058071742098⟩,⟨-866025403784438646763723170752936183471402626905243661666230,-866025403784438646763723170752936183471402626905133408829730⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514113072187592,342020143325668733044099614682259580763083367514202613054202⟩,⟨939692620785908384054109277324731469936208134264420979895742,939692620785908384054109277324731469936208134264510314216312⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264498609770198,-939692620785908384054109277324731469936208134264429034067948⟩,⟨-342020143325668733044099614682259580763083367514197538629118,-342020143325668733044099614682259580763083367514128175653472⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905171143961806,866025403784438646763723170752936183471402626905211262878518⟩,⟨-500000000000000000000000000000000000000000000000018704234480,-499999999999999999999999999999999999999999999999978214824182⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184085513923553,-173648177666930348851716626769314796000375677184055596227498⟩,⟨984807753012208059366743024589523013670643251719827188461022,984807753012208059366743024589523013670643251719857237279466⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205686789749417,-642787609686539326322643409907263432907559884205675882481224⟩,⟨-766044443118978035202392650555416673935832457080400814664902,-766044443118978035202392650555416673935832457080390439301342⟩⟩, + ⟨⟨999999999999999999999999999999999999999999999999999999935489,1000000000000000000000000000000000000000000000000000000066558⟩,⟨-63486,68606⟩⟩, + ⟨⟨-642787609686539326322643409907263432907559884205686789753345,-642787609686539326322643409907263432907559884205675882485247⟩,⟨766044443118978035202392650555416673935832457080390439298182,766044443118978035202392650555416673935832457080400814661650⟩⟩, + ⟨⟨-173648177666930348851716626769314796000375677184085513919999,-173648177666930348851716626769314796000375677184055596221926⟩,⟨-984807753012208059366743024589523013670643251719857237281372,-984807753012208059366743024589523013670643251719827188460900⟩⟩, + ⟨⟨866025403784438646763723170752936183471402626905171143959209,866025403784438646763723170752936183471402626905211262875041⟩,⟨499999999999999999999999999999999999999999999999978214829902,500000000000000000000000000000000000000000000000018704239326⟩⟩, + ⟨⟨-939692620785908384054109277324731469936208134264498609770482,-939692620785908384054109277324731469936208134264429034070760⟩,⟨342020143325668733044099614682259580763083367514128175650304,342020143325668733044099614682259580763083367514197538623430⟩⟩, + ⟨⟨342020143325668733044099614682259580763083367514113072194387,342020143325668733044099614682259580763083367514202613057920⟩,⟨-939692620785908384054109277324731469936208134264510314212824,-939692620785908384054109277324731469936208134264420979895326⟩⟩, + ⟨⟨499999999999999999999999999999999999999999999999948090129132,500000000000000000000000000000000000000000000000058071741143⟩,⟨866025403784438646763723170752936183471402626905133408828796,866025403784438646763723170752936183471402626905243661672994⟩⟩, + ⟨⟨-984807753012208059366743024589523013670643251719916193165428,-984807753012208059366743024589523013670643251719770085864315⟩,⟨-173648177666930348851716626769314796000375677184138400540146,-173648177666930348851716626769314796000375677183992199078128⟩⟩, + ⟨⟨766044443118978035202392650555416673935832457080303086975913,766044443118978035202392650555416673935832457080481306728032⟩,⟨-642787609686539326322643409907263432907559884205774406711952,-642787609686539326322643409907263432907559884205596441261588⟩⟩, + ⟨⟨-117085065698,127757734484⟩,⟨999999999999999999999999999999999999999999999999877578600606,1000000000000000000000000000000000000000000000000122421400788⟩⟩, + ⟨⟨-766044443118978035202392650555416673935832457080513642253780,-766044443118978035202392650555416673935832457080284471968392⟩,⟨-642787609686539326322643409907263432907559884205791956853030,-642787609686539326322643409907263432907559884205562539643346⟩⟩, + ⟨⟨984807753012208059366743024589523013670643251719780911538556,984807753012208059366743024589523013670643251719901660915441⟩,⟨-173648177666930348851716626769314796000375677184136095388006,-173648177666930348851716626769314796000375677184015525284706⟩⟩, + ⟨⟨-500000000000000000000000000000000000000000000000144336641906,-499999999999999999999999999999999999999999999999843339621317⟩,⟨866025403784438646763723170752936183471402626905043472371022,866025403784438646763723170752936183471402626905344270800464⟩⟩, + ⟨⟨-342020143325668733044099614682259580763083367514376555621835,-342020143325668733044099614682259580763083367513959187685164⟩,⟨-939692620785908384054109277324731469936208134264670738312598,-939692620785908384054109277324731469936208134264253255260318⟩⟩, + ⟨⟨939692620785908384054109277324731469936208134264298157066371,939692620785908384054109277324731469936208134264636787312455⟩,⟨342020143325668733044099614682259580763083367513983436586982,342020143325668733044099614682259580763083367514322219629238⟩⟩, + ⟨⟨-866025403784438646763723170752936183471402626905436185823866,-866025403784438646763723170752936183471402626904935548344276⟩,⟨499999999999999999999999999999999999999999999999757458228558,500000000000000000000000000000000000000000000000257946447580⟩⟩] +lemma taylorExp0_0_13_calc (j : Fin 31) : ((taylorPhase0_0 j).mul (CI.point 13)).exp = taylorExp0_0_13 j := by + revert j + decide +kernel +lemma taylorExp0_0_13_mem (j : Fin 31) : (taylorExp0_0_13 j).Mem (exp (taylorPhase 0 0 (frequency j)*((13:ℤ):ℂ))) := by + rw [← taylorExp0_0_13_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_0_mem j) (CI.mem_point 13)) (by + revert j + decide +kernel) + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorExp01.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp01.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e9a6c9a3357cb6c6520a9cfaf597d21ddc8af09 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp01.lean @@ -0,0 +1,286 @@ +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorExp0_1_1 : Fin 31 → CI := ![⟨⟨-196782777806999373688162311963486593063301044177928565646835,-196782777806999373688162311963486593063301044177912434260513⟩,⟨-461351500662590771674280853406905168164290097992760487318240,-461351500662590771674280853406905168164290097992744236337722⟩⟩, + ⟨⟨-76473603848965862433125074098026140148570196508983315001185,-76473603848965862433125074098026140148570196508968864352754⟩,⟨-395841056496853153908697550278876369748212800791959605441490,-395841056496853153908697550278876369748212800791945108654030⟩⟩, + ⟨⟨10980939900414071109425123985355052198638333426945374208057,10980939900414071109425123985355052198638333426957649528569⟩,⟨-311132365517323742269872703596587980329413999643133969338854,-311132365517323742269872703596587980329413999643121700338716⟩⟩, + ⟨⟨61884617887855744426283476346227410047319395062123340867829,61884617887855744426283476346227410047319395062133104549559⟩,⟨-220285333770793228769982115277293779357601915427485821770594,-220285333770793228769982115277293779357601915427476090513386⟩⟩, + ⟨⟨78847572020331036775333600151016222958172233450057159833543,78847572020331036775333600151016222958172233450064323119045⟩,⟨-137136717916114654236287917029674276109980362511424938239580,-137136717916114654236287917029674276109980362511417810354838⟩⟩, + ⟨⟨70787758077077526039234005018152508881145881266469081642010,70787758077077526039234005018152508881145881266473848210311⟩,⟨-72574260708332285173001442216558132511025859723649646555234,-72574260708332285173001442216558132511025859723644905011224⟩⟩, + ⟨⟨50303093124193550582156177822774207233762594642015117763132,50303093124193550582156177822774207233762594642017946289789⟩,⟨-31155737307554334902583901388844102506046413989540223012454,-31155737307554334902583901388844102506046413989537406811436⟩⟩, + ⟨⟨29064053705112552301864455546130349018606623799388463024170,29064053705112552301864455546130349018606623799389941230928⟩,⟨-10209048166493482667914461540107054349365254026017936353786,-10209048166493482667914461540107054349365254026016462181408⟩⟩, + ⟨⟨13770871629882571323372039870488788563291304755376048765292,13770871629882571323372039870488788563291304755376728966315⟩,⟨-2482791263005977133872170608468367757433384240308110026384,-2482791263005977133872170608468367757433384240307430633520⟩⟩, + ⟨⟨5398842586979495819715875314919603174863572386447442682034,5398842586979495819715875314919603174863572386447724042348⟩,⟨-675142211107875345859193986726128886560394239559527461974,-675142211107875345859193986726128886560394239559246218562⟩⟩, + ⟨⟨1744925146353290540726899597869868149698865766425545143030,1744925146353290540726899597869868149698865766425653691468⟩,⟨-439838471514433112667912028040695415416326870922946579584,-439838471514433112667912028040695415416326870922838009804⟩⟩, + ⟨⟨415687885216269601045638653945171637830349449216552072495,415687885216269601045638653945171637830349449216591802578⟩,⟨-310225995156178397075800346085134093162769422039541944510,-310225995156178397075800346085134093162769422039502138298⟩⟩, + ⟨⟨22055624617120358626881137288998318812814505428883308726,22055624617120358626881137288998318812814505428896383477⟩,⟨-139517526220040908200524776120699291204975202034657213704,-139517526220040908200524776120699291204975202034644125048⟩⟩, + ⟨⟨-37487806604784466041494877478167045265111566993534168795,-37487806604784466041494877478167045265111566993530950684⟩,⟨-20288005023975825265645378635137325245317803275797713232,-20288005023975825265645378635137325245317803275794525402⟩⟩, + ⟨⟨-6799030456298073828575336003543888412558278761249411253,-6799030456298073828575336003543888412558278761248357265⟩,⟨16544141130949063220032070216817809673243872655183678012,16544141130949063220032070216817809673243872655184764774⟩⟩, + ⟨⟨12983520112753684388381931293787127244404199439888803817,12983520112753684388381931293787127244404199439889279168⟩,⟨-2,2⟩⟩, + ⟨⟨-6799030456298073828575336003543888412558278761249411253,-6799030456298073828575336003543888412558278761248357265⟩,⟨-16544141130949063220032070216817809673243872655184764774,-16544141130949063220032070216817809673243872655183678012⟩⟩, + ⟨⟨-37487806604784466041494877478167045265111566993534168795,-37487806604784466041494877478167045265111566993530950684⟩,⟨20288005023975825265645378635137325245317803275794525402,20288005023975825265645378635137325245317803275797713232⟩⟩, + ⟨⟨22055624617120358626881137288998318812814505428883308726,22055624617120358626881137288998318812814505428896383475⟩,⟨139517526220040908200524776120699291204975202034644125050,139517526220040908200524776120699291204975202034657213704⟩⟩, + ⟨⟨415687885216269601045638653945171637830349449216552072493,415687885216269601045638653945171637830349449216591802576⟩,⟨310225995156178397075800346085134093162769422039502138300,310225995156178397075800346085134093162769422039541944512⟩⟩, + ⟨⟨1744925146353290540726899597869868149698865766425545143025,1744925146353290540726899597869868149698865766425653691467⟩,⟨439838471514433112667912028040695415416326870922838009816,439838471514433112667912028040695415416326870922946579598⟩⟩, + ⟨⟨5398842586979495819715875314919603174863572386447442682031,5398842586979495819715875314919603174863572386447724042344⟩,⟨675142211107875345859193986726128886560394239559246218600,675142211107875345859193986726128886560394239559527462010⟩⟩, + ⟨⟨13770871629882571323372039870488788563291304755376048765258,13770871629882571323372039870488788563291304755376728966317⟩,⟨2482791263005977133872170608468367757433384240307430633588,2482791263005977133872170608468367757433384240308110026488⟩⟩, + ⟨⟨29064053705112552301864455546130349018606623799388463024128,29064053705112552301864455546130349018606623799389941230847⟩,⟨10209048166493482667914461540107054349365254026016462181598,10209048166493482667914461540107054349365254026017936353936⟩⟩, + ⟨⟨50303093124193550582156177822774207233762594642015117763086,50303093124193550582156177822774207233762594642017946289466⟩,⟨31155737307554334902583901388844102506046413989537406811854,31155737307554334902583901388844102506046413989540223012600⟩⟩, + ⟨⟨70787758077077526039234005018152508881145881266469081641588,70787758077077526039234005018152508881145881266473848209831⟩,⟨72574260708332285173001442216558132511025859723644905011694,72574260708332285173001442216558132511025859723649646555648⟩⟩, + ⟨⟨78847572020331036775333600151016222958172233450057159832731,78847572020331036775333600151016222958172233450064323118203⟩,⟨137136717916114654236287917029674276109980362511417810355330,137136717916114654236287917029674276109980362511424938240044⟩⟩, + ⟨⟨61884617887855744426283476346227410047319395062123340867069,61884617887855744426283476346227410047319395062133104547376⟩,⟨220285333770793228769982115277293779357601915427476090514480,220285333770793228769982115277293779357601915427485821770276⟩⟩, + ⟨⟨10980939900414071109425123985355052198638333426945374206295,10980939900414071109425123985355052198638333426957649527139⟩,⟨311132365517323742269872703596587980329413999643121700338652,311132365517323742269872703596587980329413999643133969339120⟩⟩, + ⟨⟨-76473603848965862433125074098026140148570196508983315002318,-76473603848965862433125074098026140148570196508968864356859⟩,⟨395841056496853153908697550278876369748212800791945108655020,395841056496853153908697550278876369748212800791959605439496⟩⟩, + ⟨⟨-196782777806999373688162311963486593063301044177928565650597,-196782777806999373688162311963486593063301044177912434262001⟩,⟨461351500662590771674280853406905168164290097992744236335556,461351500662590771674280853406905168164290097992760487318386⟩⟩] +lemma taylorExp0_1_1_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 1)).exp = taylorExp0_1_1 j := by + revert j + decide +kernel +lemma taylorExp0_1_1_mem (j : Fin 31) : (taylorExp0_1_1 j).Mem (exp (taylorPhase 0 1 (frequency j)*((1:ℤ):ℂ))) := by + rw [← taylorExp0_1_1_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 1)) (by + revert j + decide +kernel) +def taylorExp0_1_3 : Fin 31 → CI := ![⟨⟨118032702977587678708933233974386477313796367289434120501867,118032702977587678708933233974386477313796367289444663397850⟩,⟨44601074316393874876047295050074940813106055179176147503026,44601074316393874876047295050074940813106055179186722476144⟩⟩, + ⟨⟨35500745686736375444513366366841545752436211278204610099017,35500745686736375444513366366841545752436211278213108505375⟩,⟨55079504003501980989251727184459452726216370446105451221256,55079504003501980989251727184459452726216370446113964951096⟩⟩, + ⟨⟨-3187651175214694464589061912631890176348774616566746277132,-3187651175214694464589061912631890176348774616561510697163⟩,⟨30006104931011598444458872446637824268616976815255374827960,30006104931011598444458872446637824268616976815260609151982⟩⟩, + ⟨⟨-8771970002437916399823946950546705272731772978079467321071,-8771970002437916399823946950546705272731772978077106948607⟩,⟨8158600073041650987089747913584610556883051191755596191776,8158600073041650987089747913584610556883051191757954429730⟩⟩, + ⟨⟨-3958345123089704943024030608804421020891375340095414822220,-3958345123089704943024030608804421020891375340094699458291⟩,⟨21346778348543650402640862275933278121500175836616007178,21346778348543650402640862275933278121500175837331362696⟩⟩, + ⟨⟨-763811466355158448140723191584669528401048463555827255320,-763811466355158448140723191584669528401048463555551176067⟩,⟨-708738222903736141102797896691678482464520413705535536400,-708738222903736141102797896691678482464520413705259318488⟩⟩, + ⟨⟨-19197608256606127188720089950111295919828465863787974474,-19197608256606127188720089950111295919828465863723147841⟩,⟨-206267293073434679413943210246753719980381201227096136110,-206267293073434679413943210246753719980381201227031305316⟩⟩, + ⟨⟨15463390974821873097752624788805997467431654745360556154,15463390974821873097752624788805997467431654745369735916⟩,⟨-24807302924574372156392567966684116795935492840173108702,-24807302924574372156392567966684116795935492840163931526⟩⟩, + ⟨⟨2356804093411551106896401509313507736035908122626235547,2356804093411551106896401509313507736035908122627035805⟩,⟨-1397182003819833983773668137792916751897257373229907196,-1397182003819833983773668137792916751897257373229107144⟩⟩, + ⟨⟨149980118430067603046900274197335303837733572122472462,149980118430067603046900274197335303837733572122520286⟩,⟨-58728384084522991458686168046197611664422193288624316,-58728384084522991458686168046197611664422193288576496⟩⟩, + ⟨⟨4300176296577127563664227490021300645314171287981606,4300176296577127563664227490021300645314171287983845⟩,⟨-3932522504684029801317276962094175504819546499568164,-3932522504684029801317276962094175504819546499565926⟩⟩, + ⟨⟨-48188238278157711340409378729294811927282174116735,-48188238278157711340409378729294811927282174116663⟩,⟨-130961620208133468818622263195456337810425042989060,-130961620208133468818622263195456337810425042988988⟩⟩, + ⟨⟨-1277218499661844766404737950158139748773439651485,-1277218499661844766404737950158139748773439651481⟩,⟨2512123053926759966159775538637283097722952742774,2512123053926759966159775538637283097722952742776⟩⟩, + ⟨⟨-6392653224609836866255376262273551826537737666,-6392653224609836866255376262273551826537737664⟩,⟨-77183763088305550853482589818810711097025773548,-77183763088305550853482589818810711097025773546⟩⟩, + ⟨⟨5268561916081816964465922154987203127035583856,5268561916081816964465922154987203127035583858⟩,⟨-2233924941048605683757038611391534804137392444,-2233924941048605683757038611391534804137392442⟩⟩, + ⟨⟨2188655284571062460497962689035258384147796106,2188655284571062460497962689035258384147796109⟩,⟨-2,2⟩⟩, + ⟨⟨5268561916081816964465922154987203127035583856,5268561916081816964465922154987203127035583858⟩,⟨2233924941048605683757038611391534804137392442,2233924941048605683757038611391534804137392444⟩⟩, + ⟨⟨-6392653224609836866255376262273551826537737666,-6392653224609836866255376262273551826537737664⟩,⟨77183763088305550853482589818810711097025773546,77183763088305550853482589818810711097025773548⟩⟩, + ⟨⟨-1277218499661844766404737950158139748773439651485,-1277218499661844766404737950158139748773439651481⟩,⟨-2512123053926759966159775538637283097722952742776,-2512123053926759966159775538637283097722952742774⟩⟩, + ⟨⟨-48188238278157711340409378729294811927282174116735,-48188238278157711340409378729294811927282174116663⟩,⟨130961620208133468818622263195456337810425042988988,130961620208133468818622263195456337810425042989060⟩⟩, + ⟨⟨4300176296577127563664227490021300645314171287981606,4300176296577127563664227490021300645314171287983845⟩,⟨3932522504684029801317276962094175504819546499565926,3932522504684029801317276962094175504819546499568164⟩⟩, + ⟨⟨149980118430067603046900274197335303837733572122472462,149980118430067603046900274197335303837733572122520286⟩,⟨58728384084522991458686168046197611664422193288576496,58728384084522991458686168046197611664422193288624316⟩⟩, + ⟨⟨2356804093411551106896401509313507736035908122626235547,2356804093411551106896401509313507736035908122627035805⟩,⟨1397182003819833983773668137792916751897257373229107144,1397182003819833983773668137792916751897257373229907196⟩⟩, + ⟨⟨15463390974821873097752624788805997467431654745360556154,15463390974821873097752624788805997467431654745369735915⟩,⟨24807302924574372156392567966684116795935492840163931526,24807302924574372156392567966684116795935492840173108702⟩⟩, + ⟨⟨-19197608256606127188720089950111295919828465863787974475,-19197608256606127188720089950111295919828465863723147841⟩,⟨206267293073434679413943210246753719980381201227031305316,206267293073434679413943210246753719980381201227096136110⟩⟩, + ⟨⟨-763811466355158448140723191584669528401048463555827255327,-763811466355158448140723191584669528401048463555551176070⟩,⟨708738222903736141102797896691678482464520413705259318480,708738222903736141102797896691678482464520413705535536398⟩⟩, + ⟨⟨-3958345123089704943024030608804421020891375340095414822221,-3958345123089704943024030608804421020891375340094699458295⟩,⟨-21346778348543650402640862275933278121500175837331362718,-21346778348543650402640862275933278121500175836616007204⟩⟩, + ⟨⟨-8771970002437916399823946950546705272731772978079467320930,-8771970002437916399823946950546705272731772978077106948629⟩,⟨-8158600073041650987089747913584610556883051191757954429710,-8158600073041650987089747913584610556883051191755596191916⟩⟩, + ⟨⟨-3187651175214694464589061912631890176348774616566746276989,-3187651175214694464589061912631890176348774616561510696953⟩,⟨-30006104931011598444458872446637824268616976815260609152034,-30006104931011598444458872446637824268616976815255374827942⟩⟩, + ⟨⟨35500745686736375444513366366841545752436211278204610099302,35500745686736375444513366366841545752436211278213108505822⟩,⟨-55079504003501980989251727184459452726216370446113964950920,-55079504003501980989251727184459452726216370446105451220920⟩⟩, + ⟨⟨118032702977587678708933233974386477313796367289434120502361,118032702977587678708933233974386477313796367289444663397877⟩,⟨-44601074316393874876047295050074940813106055179186722475228,-44601074316393874876047295050074940813106055179176147502578⟩⟩] +lemma taylorExp0_1_3_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 3)).exp = taylorExp0_1_3 j := by + revert j + decide +kernel +lemma taylorExp0_1_3_mem (j : Fin 31) : (taylorExp0_1_3 j).Mem (exp (taylorPhase 0 1 (frequency j)*((3:ℤ):ℂ))) := by + rw [← taylorExp0_1_3_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 3)) (by + revert j + decide +kernel) +def taylorExp0_1_4 : Fin 31 → CI := ![⟨⟨-2650030596966140541283704439046115043994000807365705388352,-2650030596966140541283704439046115043994000807350482248611⟩,⟨-63231287943128324065653574910365707707259620307385015298456,-63231287943128324065653574910365707707259620307369791211874⟩⟩, + ⟨⟨19087859094078516012382165233492739500841477416434715413405,19087859094078516012382165233492739500841477416440529648014⟩,⟨-18264780848425169232741607820590102643509718914864728738104,-18264780848425169232741607820590102643509718914858919854746⟩⟩, + ⟨⟨9300867001168154116537114128498048379601046004697971119676,9300867001168154116537114128498048379601046004699618959543⟩,⟨1321276685481581576412874042925823142913442997450500523078,1321276685481581576412874042925823142913442997452149049498⟩⟩, + ⟨⟨1254369928467794623822962134277975621588295409154913753718,1254369928467794623822962134277975621588295409155712216088⟩,⟨2437228187834436844524375540060484043337883356742440512468,2437228187834436844524375540060484043337883356743239336100⟩⟩, + ⟨⟨-309178475053339578807593709042913860167477771033778964061,-309178475053339578807593709042913860167477771033565386434⟩,⟨544517600203019844878113379049888471956240519400728705302,544517600203019844878113379049888471956240519400942207524⟩⟩, + ⟨⟨-105504653859822663160342928518199252970388224805267616501,-105504653859822663160342928518199252970388224805238515487⟩,⟨5263062628385322878149984322782772877246143331121021410,5263062628385322878149984322782772877246143331150120608⟩⟩, + ⟨⟨-7392108674030097704273930191231387929659109540511245030,-7392108674030097704273930191231387929659109540506856294⟩,⟨-9777767212172151353383650082240899582067223208809527662,-9777767212172151353383650082240899582067223208805137416⟩⟩, + ⟨⟨196169875317601258345821054012818110370838341630542372,196169875317601258345821054012818110370838341630858138⟩,⟨-878867287758102346825815617010259737322227518483857110,-878867287758102346825815617010259737322227518483541390⟩⟩, + ⟨⟨28986335355239175081589709364228847868552098949203865,28986335355239175081589709364228847868552098949215283⟩,⟨-25091866629923956089798887498800923434865241285106144,-25091866629923956089798887498800923434865241285094730⟩⟩, + ⟨⟨770069039494859929152670685246815435622213284327042,770069039494859929152670685246815435622213284327298⟩,⟨-418323209839108404040928761605036569683345170825994,-418323209839108404040928761605036569683345170825740⟩⟩, + ⟨⟨5773811065993461424675112423667302704400854707324,5773811065993461424675112423667302704400854707331⟩,⟨-8753340376552468785475398068940376591725073127396,-8753340376552468785475398068940376591725073127388⟩⟩, + ⟨⟨-60658965818478760170659225042563011207483686715,-60658965818478760170659225042563011207483686713⟩,⟨-39489914774150754225939331689881527630116860690,-39489914774150754225939331689881527630116860688⟩⟩, + ⟨⟨322315342261612660101580306428246077026074887,322315342261612660101580306428246077026074889⟩,⟨233600808584715358346951628897717161255620850,233600808584715358346951628897717161255620852⟩⟩, + ⟨⟨-1326258025529277517225462351928262451295001,-1326258025529277517225462351928262451294999⟩,⟨3023144164421319935641487295121960446206048,3023144164421319935641487295121960446206050⟩⟩, + ⟨⟨1137256572322788469024147954772788212438,1137256572322788469024147954772788212440⟩,⟨102352355608074344004094453823654407088646,102352355608074344004094453823654407088648⟩⟩, + ⟨⟨28416449907113028068614327105655319331247,28416449907113028068614327105655319331250⟩,⟨-2,2⟩⟩, + ⟨⟨1137256572322788469024147954772788212438,1137256572322788469024147954772788212440⟩,⟨-102352355608074344004094453823654407088648,-102352355608074344004094453823654407088646⟩⟩, + ⟨⟨-1326258025529277517225462351928262451295001,-1326258025529277517225462351928262451294999⟩,⟨-3023144164421319935641487295121960446206050,-3023144164421319935641487295121960446206048⟩⟩, + ⟨⟨322315342261612660101580306428246077026074887,322315342261612660101580306428246077026074889⟩,⟨-233600808584715358346951628897717161255620852,-233600808584715358346951628897717161255620850⟩⟩, + ⟨⟨-60658965818478760170659225042563011207483686715,-60658965818478760170659225042563011207483686713⟩,⟨39489914774150754225939331689881527630116860688,39489914774150754225939331689881527630116860690⟩⟩, + ⟨⟨5773811065993461424675112423667302704400854707324,5773811065993461424675112423667302704400854707331⟩,⟨8753340376552468785475398068940376591725073127388,8753340376552468785475398068940376591725073127396⟩⟩, + ⟨⟨770069039494859929152670685246815435622213284327042,770069039494859929152670685246815435622213284327298⟩,⟨418323209839108404040928761605036569683345170825740,418323209839108404040928761605036569683345170825994⟩⟩, + ⟨⟨28986335355239175081589709364228847868552098949203865,28986335355239175081589709364228847868552098949215283⟩,⟨25091866629923956089798887498800923434865241285094730,25091866629923956089798887498800923434865241285106144⟩⟩, + ⟨⟨196169875317601258345821054012818110370838341630542372,196169875317601258345821054012818110370838341630858138⟩,⟨878867287758102346825815617010259737322227518483541390,878867287758102346825815617010259737322227518483857110⟩⟩, + ⟨⟨-7392108674030097704273930191231387929659109540511245030,-7392108674030097704273930191231387929659109540506856294⟩,⟨9777767212172151353383650082240899582067223208805137416,9777767212172151353383650082240899582067223208809527662⟩⟩, + ⟨⟨-105504653859822663160342928518199252970388224805267616502,-105504653859822663160342928518199252970388224805238515487⟩,⟨-5263062628385322878149984322782772877246143331150120608,-5263062628385322878149984322782772877246143331121021410⟩⟩, + ⟨⟨-309178475053339578807593709042913860167477771033778964057,-309178475053339578807593709042913860167477771033565386431⟩,⟨-544517600203019844878113379049888471956240519400942207526,-544517600203019844878113379049888471956240519400728705304⟩⟩, + ⟨⟨1254369928467794623822962134277975621588295409154913753745,1254369928467794623822962134277975621588295409155712216094⟩,⟨-2437228187834436844524375540060484043337883356743239336082,-2437228187834436844524375540060484043337883356742440512470⟩⟩, + ⟨⟨9300867001168154116537114128498048379601046004697971119703,9300867001168154116537114128498048379601046004699618959529⟩,⟨-1321276685481581576412874042925823142913442997452149049418,-1321276685481581576412874042925823142913442997450500523040⟩⟩, + ⟨⟨19087859094078516012382165233492739500841477416434715413352,19087859094078516012382165233492739500841477416440529647833⟩,⟨18264780848425169232741607820590102643509718914858919854932,18264780848425169232741607820590102643509718914864728738164⟩⟩, + ⟨⟨-2650030596966140541283704439046115043994000807365705388491,-2650030596966140541283704439046115043994000807350482249064⟩,⟨63231287943128324065653574910365707707259620307369791212010,63231287943128324065653574910365707707259620307385015298278⟩⟩] +lemma taylorExp0_1_4_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 4)).exp = taylorExp0_1_4 j := by + revert j + decide +kernel +lemma taylorExp0_1_4_mem (j : Fin 31) : (taylorExp0_1_4 j).Mem (exp (taylorPhase 0 1 (frequency j)*((4:ℤ):ℂ))) := by + rw [← taylorExp0_1_4_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 4)) (by + revert j + decide +kernel) +def taylorExp0_1_7 : Fin 31 → CI := ![⟨⟨2507393098339542548482420727187827334574413700427550672480,2507393098339542548482420727187827334574413700431468356191⟩,⟨-7581554040277590883190089217528620166616085533617806762208,-7581554040277590883190089217528620166616085533613889815242⟩⟩, + ⟨⟨1683648301267059993956570938890181697486825958926065317058,1683648301267059993956570938890181697486825958926727291334⟩,⟨402936471466664336041776309413263591480854876615551203412,402936471466664336041776309413263591480854876616213339426⟩⟩, + ⟨⟨-69294286494248783307122943823194532021079475533740704177,-69294286494248783307122943823194532021079475533547040058⟩,⟨274871022007175667842250328524472674271772781941108300340,274871022007175667842250328524472674271772781941301948386⟩⟩, + ⟨⟨-30887665455764896537830658650591164832252339200292325549,-30887665455764896537830658650591164832252339200271742874⟩,⟨-11145389962761203794529852583957499989781189257721980472,-11145389962761203794529852583957499989781189257701394986⟩⟩, + ⟨⟨1212211412373283952483375372229007450641956885615838375,1212211412373283952483375372229007450641956885617412366⟩,⟨-2161988551577237705615722413354269111283090622399446390,-2161988551577237705615722413354269111283090622397872684⟩⟩, + ⟨⟨84315798026237456362719746581213021635498876986787377,84315798026237456362719746581213021635498876986853453⟩,⟨70755193300978492435221047241685412576263945122293092,70755193300978492435221047241685412576263945122359182⟩⟩, + ⟨⟨-1874922768642643535729399965510285699344677850778167,-1874922768642643535729399965510285699344677850775832⟩,⟨1712459990860413551723800079019149019044378713504230,1712459990860413551723800079019149019044378713506564⟩⟩, + ⟨⟨-18768875558396191227606992097069103206035743173307,-18768875558396191227606992097069103206035743173277⟩,⟨-18456714007264537544711531696706288382226361273146,-18456714007264537544711531696706288382226361273116⟩⟩, + ⟨⟨33257209320650477539795836997269990687607178345,33257209320650477539795836997269990687607178347⟩,⟨-99635800099768251450680833021433825774704237176,-99635800099768251450680833021433825774704237174⟩⟩, + ⟨⟨90927599603865832901628421806237808033256049,90927599603865832901628421806237808033256051⟩,⟨-107965074876769338400554558546381858970455718,-107965074876769338400554558546381858970455716⟩⟩, + ⟨⟨-9594302535052163091322564233133928871667,-9594302535052163091322564233133928871665⟩,⟨-60346548757935409482730436841783602793796,-60346548757935409482730436841783602793794⟩⟩, + ⟨⟨-2248614522136411445553795884430598943,-2248614522136411445553795884430598941⟩,⟨9846945866458682445415894707382379702,9846945866458682445415894707382379704⟩⟩, + ⟨⟨-998501094522966542067537947112181,-998501094522966542067537947112179⟩,⟨511336527669327339165132308281066,511336527669327339165132308281068⟩⟩, + ⟨⟨241815950612053012073460692691,241815950612053012073460692693⟩,⟨83039672945267289224590578418,83039672945267289224590578420⟩⟩, + ⟨⟨234639186633706994148825366,234639186633706994148825368⟩,⟨536709176956680345361519048,536709176956680345361519050⟩⟩, + ⟨⟨62193813257951805870186129,62193813257951805870186132⟩,⟨-2,2⟩⟩, + ⟨⟨234639186633706994148825366,234639186633706994148825368⟩,⟨-536709176956680345361519050,-536709176956680345361519048⟩⟩, + ⟨⟨241815950612053012073460692691,241815950612053012073460692693⟩,⟨-83039672945267289224590578420,-83039672945267289224590578418⟩⟩, + ⟨⟨-998501094522966542067537947112181,-998501094522966542067537947112179⟩,⟨-511336527669327339165132308281068,-511336527669327339165132308281066⟩⟩, + ⟨⟨-2248614522136411445553795884430598943,-2248614522136411445553795884430598941⟩,⟨-9846945866458682445415894707382379704,-9846945866458682445415894707382379702⟩⟩, + ⟨⟨-9594302535052163091322564233133928871667,-9594302535052163091322564233133928871665⟩,⟨60346548757935409482730436841783602793794,60346548757935409482730436841783602793796⟩⟩, + ⟨⟨90927599603865832901628421806237808033256049,90927599603865832901628421806237808033256051⟩,⟨107965074876769338400554558546381858970455716,107965074876769338400554558546381858970455718⟩⟩, + ⟨⟨33257209320650477539795836997269990687607178345,33257209320650477539795836997269990687607178347⟩,⟨99635800099768251450680833021433825774704237174,99635800099768251450680833021433825774704237176⟩⟩, + ⟨⟨-18768875558396191227606992097069103206035743173307,-18768875558396191227606992097069103206035743173277⟩,⟨18456714007264537544711531696706288382226361273116,18456714007264537544711531696706288382226361273146⟩⟩, + ⟨⟨-1874922768642643535729399965510285699344677850778167,-1874922768642643535729399965510285699344677850775832⟩,⟨-1712459990860413551723800079019149019044378713506564,-1712459990860413551723800079019149019044378713504230⟩⟩, + ⟨⟨84315798026237456362719746581213021635498876986787377,84315798026237456362719746581213021635498876986853453⟩,⟨-70755193300978492435221047241685412576263945122359182,-70755193300978492435221047241685412576263945122293092⟩⟩, + ⟨⟨1212211412373283952483375372229007450641956885615838375,1212211412373283952483375372229007450641956885617412366⟩,⟨2161988551577237705615722413354269111283090622397872684,2161988551577237705615722413354269111283090622399446390⟩⟩, + ⟨⟨-30887665455764896537830658650591164832252339200292325549,-30887665455764896537830658650591164832252339200271742874⟩,⟨11145389962761203794529852583957499989781189257701394984,11145389962761203794529852583957499989781189257721980472⟩⟩, + ⟨⟨-69294286494248783307122943823194532021079475533740704175,-69294286494248783307122943823194532021079475533547040054⟩,⟨-274871022007175667842250328524472674271772781941301948386,-274871022007175667842250328524472674271772781941108300340⟩⟩, + ⟨⟨1683648301267059993956570938890181697486825958926065317050,1683648301267059993956570938890181697486825958926727291345⟩,⟨-402936471466664336041776309413263591480854876616213339426,-402936471466664336041776309413263591480854876615551203392⟩⟩, + ⟨⟨2507393098339542548482420727187827334574413700427550672432,2507393098339542548482420727187827334574413700431468356169⟩,⟨7581554040277590883190089217528620166616085533613889815242,7581554040277590883190089217528620166616085533617806762232⟩⟩] +lemma taylorExp0_1_7_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 7)).exp = taylorExp0_1_7 j := by + revert j + decide +kernel +lemma taylorExp0_1_7_mem (j : Fin 31) : (taylorExp0_1_7 j).Mem (exp (taylorPhase 0 1 (frequency j)*((7:ℤ):ℂ))) := by + rw [← taylorExp0_1_7_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 7)) (by + revert j + decide +kernel) +def taylorExp0_1_9 : Fin 31 → CI := ![⟨⟨940006719763398414289688023665283396412507153334359516940,940006719763398414289688023665283396412507153335514604359⟩,⟨1775385952585987906522000498389683365945242998931960846306,1775385952585987906522000498389683365945242998933116217338⟩⟩, + ⟨⟨-278359654946447069536226529443600036309207121777780822409,-278359654946447069536226529443600036309207121777602476177⟩,⟨41153040920358861146898106839054999196320230567270138156,41153040920358861146898106839054999196320230567448471256⟩⟩, + ⟨⟨8577771293628343865959457553959481853672191917544513373,8577771293628343865959457553959481853672191917567355754⟩,⟨-26101799768128927069656237041706974915412310053369983320,-26101799768128927069656237041706974915412310053347143018⟩⟩, + ⟨⟨1076678683498656838797785489984210885018974638229794745,1076678683498656838797785489984210885018974638231126701⟩,⟨1340291703570509909913666098526361064343198493857022382,1340291703570509909913666098526361064343198493858354576⟩⟩, + ⟨⟨-62015903902126071261926322886627903667159397095614020,-62015903902126071261926322886627903667159397095574534⟩,⟨1003406013363405129234771879749127874643305674109680,1003406013363405129234771879749127874643305674149164⟩⟩, + ⟨⟨705396425451762132485486500293537476286892248154749,705396425451762132485486500293537476286892248155402⟩,⟨-884444350556437984546748990319388067268474421890654,-884444350556437984546748990319388067268474421890000⟩⟩, + ⟨⟨2443280378646452306779107589425825253834392243314,2443280378646452306779107589425825253834392243323⟩,⟨8547830423354753483119192132768600731142413015628,8547830423354753483119192132768600731142413015636⟩⟩, + ⟨⟨-24851066796393899684169774561325273803961531818,-24851066796393899684169774561325273803961531816⟩,⟨-2529032664642750988737678852703135303261469620,-2529032664642750988737678852703135303261469618⟩⟩, + ⟨⟨-711347393503750349614136691328094814774638,-711347393503750349614136691328094814774636⟩,⟨-20554585837898615646628034815628399142908542,-20554585837898615646628034815628399142908540⟩⟩, + ⟨⟨1821803494147325853891800758527413442936,1821803494147325853891800758527413442938⟩,⟨-3760559590952001100453816754743465910002,-3760559590952001100453816754743465910000⟩⟩, + ⟨⟨-119986458489555420749795951795534706,-119986458489555420749795951795534704⟩,⟨-157339499056173011183969332206809396,-157339499056173011183969332206809394⟩⟩, + ⟨⟨2367523400844685570329091653764,2367523400844685570329091653766⟩,⟨1333795258698997625337892868854,1333795258698997625337892868856⟩⟩, + ⟨⟨22097156775176757919935369,22097156775176757919935371⟩,⟨-3559429542718374549946482,-3559429542718374549946480⟩⟩, + ⟨⟨113988255228994557529,113988255228994557531⟩,⟨450346822348455436732,450346822348455436734⟩⟩, + ⟨⟨67366375988114345,67366375988114347⟩,⟨-174877929194720710,-174877929194720708⟩⟩, + ⟨⟨10484122708827694,10484122708827697⟩,⟨-2,2⟩⟩, + ⟨⟨67366375988114345,67366375988114347⟩,⟨174877929194720708,174877929194720710⟩⟩, + ⟨⟨113988255228994557529,113988255228994557531⟩,⟨-450346822348455436734,-450346822348455436732⟩⟩, + ⟨⟨22097156775176757919935369,22097156775176757919935371⟩,⟨3559429542718374549946480,3559429542718374549946482⟩⟩, + ⟨⟨2367523400844685570329091653764,2367523400844685570329091653766⟩,⟨-1333795258698997625337892868856,-1333795258698997625337892868854⟩⟩, + ⟨⟨-119986458489555420749795951795534706,-119986458489555420749795951795534704⟩,⟨157339499056173011183969332206809394,157339499056173011183969332206809396⟩⟩, + ⟨⟨1821803494147325853891800758527413442936,1821803494147325853891800758527413442938⟩,⟨3760559590952001100453816754743465910000,3760559590952001100453816754743465910002⟩⟩, + ⟨⟨-711347393503750349614136691328094814774638,-711347393503750349614136691328094814774636⟩,⟨20554585837898615646628034815628399142908540,20554585837898615646628034815628399142908542⟩⟩, + ⟨⟨-24851066796393899684169774561325273803961531818,-24851066796393899684169774561325273803961531816⟩,⟨2529032664642750988737678852703135303261469618,2529032664642750988737678852703135303261469620⟩⟩, + ⟨⟨2443280378646452306779107589425825253834392243314,2443280378646452306779107589425825253834392243323⟩,⟨-8547830423354753483119192132768600731142413015636,-8547830423354753483119192132768600731142413015628⟩⟩, + ⟨⟨705396425451762132485486500293537476286892248154749,705396425451762132485486500293537476286892248155402⟩,⟨884444350556437984546748990319388067268474421890000,884444350556437984546748990319388067268474421890654⟩⟩, + ⟨⟨-62015903902126071261926322886627903667159397095614020,-62015903902126071261926322886627903667159397095574534⟩,⟨-1003406013363405129234771879749127874643305674149164,-1003406013363405129234771879749127874643305674109680⟩⟩, + ⟨⟨1076678683498656838797785489984210885018974638229794745,1076678683498656838797785489984210885018974638231126701⟩,⟨-1340291703570509909913666098526361064343198493858354576,-1340291703570509909913666098526361064343198493857022382⟩⟩, + ⟨⟨8577771293628343865959457553959481853672191917544513373,8577771293628343865959457553959481853672191917567355754⟩,⟨26101799768128927069656237041706974915412310053347143018,26101799768128927069656237041706974915412310053369983320⟩⟩, + ⟨⟨-278359654946447069536226529443600036309207121777780822408,-278359654946447069536226529443600036309207121777602476178⟩,⟨-41153040920358861146898106839054999196320230567448471256,-41153040920358861146898106839054999196320230567270138160⟩⟩, + ⟨⟨940006719763398414289688023665283396412507153334359516939,940006719763398414289688023665283396412507153335514604385⟩,⟨-1775385952585987906522000498389683365945242998933116217344,-1775385952585987906522000498389683365945242998931960846284⟩⟩] +lemma taylorExp0_1_9_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 9)).exp = taylorExp0_1_9 j := by + revert j + decide +kernel +lemma taylorExp0_1_9_mem (j : Fin 31) : (taylorExp0_1_9 j).Mem (exp (taylorPhase 0 1 (frequency j)*((9:ℤ):ℂ))) := by + rw [← taylorExp0_1_9_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 9)) (by + revert j + decide +kernel) +def taylorExp0_1_12 : Fin 31 → CI := ![⟨⟨31767413139200323764350737032896287040665251209549283589,31767413139200323764350737032896287040665251209705633362⟩,⟨251478912378240435789780623923285090779861117526427298466,251478912378240435789780623923285090779861117526583661732⟩⟩, + ⟨⟨-12148664401830693320440327224802109168139178813725804696,-12148664401830693320440327224802109168139178813707991105⟩,⟨-13870948089086745973872573425445989828724144041003741282,-13870948089086745973872573425445989828724144040985925082⟩⟩, + ⟨⟨755870399985873535110555978198622862696514723180227412,755870399985873535110555978198622862696514723180995349⟩,⟨340588938216926000412768092386037166736211716985439808,340588938216926000412768092386037166736211716986207842⟩⟩, + ⟨⟨-20379497104562046434182013905308975034444847236755168,-20379497104562046434182013905308975034444847236729969⟩,⟨-2972807832402394628784132563682011944188299494064944,-2972807832402394628784132563682011944188299494039744⟩⟩, + ⟨⟨245458931279219672199569014263493087477520620224082,245458931279219672199569014263493087477520620224270⟩,⟨-5295667054159186499545299671788083534161835199674,-5295667054159186499545299671788083534161835199486⟩⟩, + ⟨⟨-1165629395356616538697458682790515695132671979821,-1165629395356616538697458682790515695132671979817⟩,⟨175607327290719011695016871463397139725302944230,175607327290719011695016871463397139725302944234⟩⟩, + ⟨⟨1716232703505829288892226977162475194445696437,1716232703505829288892226977162475194445696439⟩,⟨-668066729834304495805749907091928455348982850,-668066729834304495805749907091928455348982848⟩⟩, + ⟨⟨-447020241431989181338756205037432042355199,-447020241431989181338756205037432042355197⟩,⟨577380521135509032631184723283196910492482,577380521135509032631184723283196910492484⟩⟩, + ⟨⟨-30395003877529245354390257317224393738,-30395003877529245354390257317224393736⟩,⟨-47449250264470968559442043288341282352,-47449250264470968559442043288341282350⟩⟩, + ⟨⟨52382715778361110519760415681772,52382715778361110519760415681774⟩,⟨-671000748145117893273656776587870,-671000748145117893273656776587868⟩⟩, + ⟨⟨-1134704045621133709224512179,-1134704045621133709224512177⟩,⟨-204738136089161662511551542,-204738136089161662511551540⟩⟩, + ⟨⟨60589206336129255254,60589206336129255256⟩,⟨-374327944195754553096,-374327944195754553094⟩⟩, + ⟨⟨-19281172410094,-19281172410092⟩,⟨60056946221358,60056946221360⟩⟩, + ⟨⟨34030774,34030776⟩,⟨-11676954,-11676952⟩⟩, + ⟨⟨-37,-35⟩,⟨-1072,-1070⟩⟩, + ⟨⟨21,24⟩,⟨-2,2⟩⟩, + ⟨⟨-37,-35⟩,⟨1070,1072⟩⟩, + ⟨⟨34030774,34030776⟩,⟨11676952,11676954⟩⟩, + ⟨⟨-19281172410094,-19281172410092⟩,⟨-60056946221360,-60056946221358⟩⟩, + ⟨⟨60589206336129255254,60589206336129255256⟩,⟨374327944195754553094,374327944195754553096⟩⟩, + ⟨⟨-1134704045621133709224512179,-1134704045621133709224512177⟩,⟨204738136089161662511551540,204738136089161662511551542⟩⟩, + ⟨⟨52382715778361110519760415681772,52382715778361110519760415681774⟩,⟨671000748145117893273656776587868,671000748145117893273656776587870⟩⟩, + ⟨⟨-30395003877529245354390257317224393738,-30395003877529245354390257317224393736⟩,⟨47449250264470968559442043288341282350,47449250264470968559442043288341282352⟩⟩, + ⟨⟨-447020241431989181338756205037432042355199,-447020241431989181338756205037432042355197⟩,⟨-577380521135509032631184723283196910492484,-577380521135509032631184723283196910492482⟩⟩, + ⟨⟨1716232703505829288892226977162475194445696437,1716232703505829288892226977162475194445696439⟩,⟨668066729834304495805749907091928455348982848,668066729834304495805749907091928455348982850⟩⟩, + ⟨⟨-1165629395356616538697458682790515695132671979821,-1165629395356616538697458682790515695132671979817⟩,⟨-175607327290719011695016871463397139725302944234,-175607327290719011695016871463397139725302944230⟩⟩, + ⟨⟨245458931279219672199569014263493087477520620224082,245458931279219672199569014263493087477520620224270⟩,⟨5295667054159186499545299671788083534161835199486,5295667054159186499545299671788083534161835199674⟩⟩, + ⟨⟨-20379497104562046434182013905308975034444847236755168,-20379497104562046434182013905308975034444847236729969⟩,⟨2972807832402394628784132563682011944188299494039744,2972807832402394628784132563682011944188299494064944⟩⟩, + ⟨⟨755870399985873535110555978198622862696514723180227412,755870399985873535110555978198622862696514723180995349⟩,⟨-340588938216926000412768092386037166736211716986207842,-340588938216926000412768092386037166736211716985439808⟩⟩, + ⟨⟨-12148664401830693320440327224802109168139178813725804696,-12148664401830693320440327224802109168139178813707991105⟩,⟨13870948089086745973872573425445989828724144040985925082,13870948089086745973872573425445989828724144041003741282⟩⟩, + ⟨⟨31767413139200323764350737032896287040665251209549283589,31767413139200323764350737032896287040665251209705633365⟩,⟨-251478912378240435789780623923285090779861117526583661732,-251478912378240435789780623923285090779861117526427298464⟩⟩] +lemma taylorExp0_1_12_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 12)).exp = taylorExp0_1_12 j := by + revert j + decide +kernel +lemma taylorExp0_1_12_mem (j : Fin 31) : (taylorExp0_1_12 j).Mem (exp (taylorPhase 0 1 (frequency j)*((12:ℤ):ℂ))) := by + rw [← taylorExp0_1_12_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 12)) (by + revert j + decide +kernel) +def taylorExp0_1_13 : Fin 31 → CI := ![⟨⟨109768893809422989248100374037981035495548624725996846975,109768893809422989248100374037981035495548624726103691792⟩,⟨-64142662661611725068590790019022158528255711978182820162,-64142662661611725068590790019022158528255711978075994256⟩⟩, + ⟨⟨-4561638597437469642155133578933464732193117536239914686,-4561638597437469642155133578933464732193117536229854188⟩,⟨5869701541020762052387563103297010619018594457237112978,5869701541020762052387563103297010619018594457247172678⟩⟩, + ⟨⟨114268409451212635865671454550981735869520149454856953,114268409451212635865671454550981735869520149455179727⟩,⟨-231435758910824597948790061523336025114866536263790540,-231435758910824597948790061523336025114866536263467792⟩⟩, + ⟨⟨-1916043356659674607569051682585845713863960078958629,-1916043356659674607569051682585845713863960078950550⟩,⟨4305333244997117699290051634681615485475416699891140,4305333244997117699290051634681615485475416699899218⟩⟩, + ⟨⟨18627610363087869542033905378213155217823882145672,18627610363087869542033905378213155217823882145749⟩,⟨-34078982708277830883948509362308204684668012252052,-34078982708277830883948509362308204684668012251974⟩⟩, + ⟨⟨-69767719692944248738154167666651010220356308081,-69767719692944248738154167666651010220356308079⟩,⟨97025540628724406065302284041000983852931699756,97025540628724406065302284041000983852931699758⟩⟩, + ⟨⟨65517701968605726620896144462406972361114428,65517701968605726620896144462406972361114430⟩,⟨-87076318193091875803189154926297741023407328,-87076318193091875803189154926297741023407326⟩⟩, + ⟨⟨-7097714753584192821530145485362753148057,-7097714753584192821530145485362753148055⟩,⟨21344669650745030720442745921950180529698,21344669650745030720442745921950180529700⟩⟩, + ⟨⟨-536372280580050804842137385292904711,-536372280580050804842137385292904709⟩,⟨-577953084260038947828212082932328450,-577953084260038947828212082932328448⟩⟩, + ⟨⟨-170214891991874729207766516619,-170214891991874729207766516617⟩,⟨-3657993197535403527725149979976,-3657993197535403527725149979974⟩⟩, + ⟨⟨-2070025331711298466037668,-2070025331711298466037666⟩,⟨141833770967762700315690,141833770967762700315692⟩⟩, + ⟨⟨-90940059954096598,-90940059954096596⟩,⟨-174399938331435720,-174399938331435718⟩⟩, + ⟨⟨7953738268,7953738270⟩,⟨4014654938,4014654940⟩⟩, + ⟨⟨-1514,-1512⟩,⟨-254,-252⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,2⟩,⟨-2,2⟩⟩, + ⟨⟨-1,1⟩,⟨-2,0⟩⟩, + ⟨⟨-1514,-1512⟩,⟨252,254⟩⟩, + ⟨⟨7953738268,7953738270⟩,⟨-4014654940,-4014654938⟩⟩, + ⟨⟨-90940059954096598,-90940059954096596⟩,⟨174399938331435718,174399938331435720⟩⟩, + ⟨⟨-2070025331711298466037668,-2070025331711298466037666⟩,⟨-141833770967762700315692,-141833770967762700315690⟩⟩, + ⟨⟨-170214891991874729207766516619,-170214891991874729207766516617⟩,⟨3657993197535403527725149979974,3657993197535403527725149979976⟩⟩, + ⟨⟨-536372280580050804842137385292904711,-536372280580050804842137385292904709⟩,⟨577953084260038947828212082932328448,577953084260038947828212082932328450⟩⟩, + ⟨⟨-7097714753584192821530145485362753148057,-7097714753584192821530145485362753148055⟩,⟨-21344669650745030720442745921950180529700,-21344669650745030720442745921950180529698⟩⟩, + ⟨⟨65517701968605726620896144462406972361114428,65517701968605726620896144462406972361114430⟩,⟨87076318193091875803189154926297741023407326,87076318193091875803189154926297741023407328⟩⟩, + ⟨⟨-69767719692944248738154167666651010220356308081,-69767719692944248738154167666651010220356308079⟩,⟨-97025540628724406065302284041000983852931699758,-97025540628724406065302284041000983852931699756⟩⟩, + ⟨⟨18627610363087869542033905378213155217823882145672,18627610363087869542033905378213155217823882145749⟩,⟨34078982708277830883948509362308204684668012251974,34078982708277830883948509362308204684668012252052⟩⟩, + ⟨⟨-1916043356659674607569051682585845713863960078958629,-1916043356659674607569051682585845713863960078950550⟩,⟨-4305333244997117699290051634681615485475416699899218,-4305333244997117699290051634681615485475416699891140⟩⟩, + ⟨⟨114268409451212635865671454550981735869520149454856953,114268409451212635865671454550981735869520149455179727⟩,⟨231435758910824597948790061523336025114866536263467792,231435758910824597948790061523336025114866536263790540⟩⟩, + ⟨⟨-4561638597437469642155133578933464732193117536239914686,-4561638597437469642155133578933464732193117536229854188⟩,⟨-5869701541020762052387563103297010619018594457247172678,-5869701541020762052387563103297010619018594457237112978⟩⟩, + ⟨⟨109768893809422989248100374037981035495548624725996846975,109768893809422989248100374037981035495548624726103691792⟩,⟨64142662661611725068590790019022158528255711978075994256,64142662661611725068590790019022158528255711978182820162⟩⟩] +lemma taylorExp0_1_13_calc (j : Fin 31) : ((taylorPhase0_1 j).mul (CI.point 13)).exp = taylorExp0_1_13 j := by + revert j + decide +kernel +lemma taylorExp0_1_13_mem (j : Fin 31) : (taylorExp0_1_13 j).Mem (exp (taylorPhase 0 1 (frequency j)*((13:ℤ):ℂ))) := by + rw [← taylorExp0_1_13_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase0_1_mem j) (CI.mem_point 13)) (by + revert j + decide +kernel) + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorExp10.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp10.lean new file mode 100644 index 0000000000000000000000000000000000000000..3928c9f53ba8d2cb75b5874ee6caf776241e4136 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp10.lean @@ -0,0 +1,286 @@ +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorExp1_0_1 : Fin 31 → CI := ![⟨⟨-462014239501362079054139838429754065462497112254467879319236,-462014239501362079054139838429754065462497112254459714418817⟩,⟨-266744045545551625587865651178962514545439253701523457162894,-266744045545551625587865651178962514545439253701515483631036⟩⟩, + ⟨⟨-408675587650490817184296720235119175155486461971382694512765,-408675587650490817184296720235119175155486461971374877426423⟩,⟨-342919534868685014654213810182252286997429855678248552953508,-342919534868685014654213810182252286997429855678240946467660⟩⟩, + ⟨⟨-342919534868685014654213810182252286997429855678247926768306,-342919534868685014654213810182252286997429855678240566108937⟩,⟨-408675587650490817184296720235119175155486461971382785875834,-408675587650490817184296720235119175155486461971375630652140⟩⟩, + ⟨⟨-266744045545551625587865651178962514545439253701522309819297,-266744045545551625587865651178962514545439253701515493061725⟩,⟨-462014239501362079054139838429754065462497112254467445085588,-462014239501362079054139838429754065462497112254460805627050⟩⟩, + ⟨⟨-182463673377516550714643340799306782801195315394622191561866,-182463673377516550714643340799306782801195315394615984049742⟩,⟨-501314822475470236369361435907685946271259974643758364120088,-501314822475470236369361435907685946271259974643752286250504⟩⟩, + ⟨⟨-92639234824979419185064715672566771115773512672378766849224,-92639234824979419185064715672566771115773512672373211304112⟩,⟨-525383208246201565368857150981559069798625171072866614096638,-525383208246201565368857150981559069798625171072861126559248⟩⟩, + ⟨⟨-2222733597,2660717772⟩,⟨-533488091091103251175731302357925029090878507403040750344782,-533488091091103251175731302357925029090878507403035866893414⟩⟩, + ⟨⟨92639234824979419185064715672566771115773512672374313756486,92639234824979419185064715672566771115773512672378527057625⟩,⟨-525383208246201565368857150981559069798625171072865933338446,-525383208246201565368857150981559069798625171072861655208224⟩⟩, + ⟨⟨182463673377516550714643340799306782801195315394617716277166,182463673377516550714643340799306782801195315394621282475194⟩,⟨-501314822475470236369361435907685946271259974643757016084744,-501314822475470236369361435907685946271259974643753334689890⟩⟩, + ⟨⟨266744045545551625587865651178962514545439253701517799838573,266744045545551625587865651178962514545439253701520761653748⟩,⟨-462014239501362079054139838429754065462497112254465456470346,-462014239501362079054139838429754065462497112254462356258092⟩⟩, + ⟨⟨342919534868685014654213810182252286997429855678243372935175,342919534868685014654213810182252286997429855678245790970500⟩,⟨-408675587650490817184296720235119175155486461971380196100386,-408675587650490817184296720235119175155486461971377657368562⟩⟩, + ⟨⟨408675587650490817184296720235119175155486461971378092207235,408675587650490817184296720235119175155486461971380042793355⟩,⟨-342919534868685014654213810182252286997429855678245413394766,-342919534868685014654213810182252286997429855678243414994142⟩⟩, + ⟨⟨462014239501362079054139838429754065462497112254463229482251,462014239501362079054139838429754065462497112254464802240077⟩,⟨-266744045545551625587865651178962514545439253701519830206916,-266744045545551625587865651178962514545439253701518351975736⟩⟩, + ⟨⟨501314822475470236369361435907685946271259974643754602716178,501314822475470236369361435907685946271259974643755897858635⟩,⟨-182463673377516550714643340799306782801195315394619781155938,-182463673377516550714643340799306782801195315394618806023814⟩⟩, + ⟨⟨525383208246201565368857150981559069798625171072863269578273,525383208246201565368857150981559069798625171072864395024595⟩,⟨-92639234824979419185064715672566771115773512672376446925698,-92639234824979419185064715672566771115773512672375962555592⟩⟩, + ⟨⟨533488091091103251175731302357925029090878507403037774444800,533488091091103251175731302357925029090878507403038842796271⟩,⟨-32998,35746⟩⟩, + ⟨⟨525383208246201565368857150981559069798625171072863269577810,525383208246201565368857150981559069798625171072864395023767⟩,⟨92639234824979419185064715672566771115773512672375962560474,92639234824979419185064715672566771115773512672376446928388⟩⟩, + ⟨⟨501314822475470236369361435907685946271259974643754602715257,501314822475470236369361435907685946271259974643755897857880⟩,⟨182463673377516550714643340799306782801195315394618806025900,182463673377516550714643340799306782801195315394619781158552⟩⟩, + ⟨⟨462014239501362079054139838429754065462497112254463229480601,462014239501362079054139838429754065462497112254464802238179⟩,⟨266744045545551625587865651178962514545439253701518351979150,266744045545551625587865651178962514545439253701519830209746⟩⟩, + ⟨⟨408675587650490817184296720235119175155486461971378092205532,408675587650490817184296720235119175155486461971380042791594⟩,⟨342919534868685014654213810182252286997429855678243414996290,342919534868685014654213810182252286997429855678245413396824⟩⟩, + ⟨⟨342919534868685014654213810182252286997429855678243372933095,342919534868685014654213810182252286997429855678245790967930⟩,⟨408675587650490817184296720235119175155486461971377657370866,408675587650490817184296720235119175155486461971380196102056⟩⟩, + ⟨⟨266744045545551625587865651178962514545439253701517799835802,266744045545551625587865651178962514545439253701520761650411⟩,⟨462014239501362079054139838429754065462497112254462356260200,462014239501362079054139838429754065462497112254465456471732⟩⟩, + ⟨⟨182463673377516550714643340799306782801195315394617716273529,182463673377516550714643340799306782801195315394621282471631⟩,⟨501314822475470236369361435907685946271259974643753334691202,501314822475470236369361435907685946271259974643757016086132⟩⟩, + ⟨⟨92639234824979419185064715672566771115773512672374313752651,92639234824979419185064715672566771115773512672378527054973⟩,⟨525383208246201565368857150981559069798625171072861655208180,525383208246201565368857150981559069798625171072865933339640⟩⟩, + ⟨⟨-2222735653,2660712478⟩,⟨533488091091103251175731302357925029090878507403035866895042,533488091091103251175731302357925029090878507403040750343172⟩⟩, + ⟨⟨-92639234824979419185064715672566771115773512672378766851054,-92639234824979419185064715672566771115773512672373211308186⟩,⟨525383208246201565368857150981559069798625171072861126559838,525383208246201565368857150981559069798625171072866614095044⟩⟩, + ⟨⟨-182463673377516550714643340799306782801195315394622191563926,-182463673377516550714643340799306782801195315394615984053745⟩,⟨501314822475470236369361435907685946271259974643752286250196,501314822475470236369361435907685946271259974643758364117880⟩⟩, + ⟨⟨-266744045545551625587865651178962514545439253701522309822483,-266744045545551625587865651178962514545439253701515493065751⟩,⟨462014239501362079054139838429754065462497112254460805625444,462014239501362079054139838429754065462497112254467445083188⟩⟩, + ⟨⟨-342919534868685014654213810182252286997429855678247926770256,-342919534868685014654213810182252286997429855678240566111626⟩,⟨408675587650490817184296720235119175155486461971375630650602,408675587650490817184296720235119175155486461971382785873594⟩⟩, + ⟨⟨-408675587650490817184296720235119175155486461971382694515771,-408675587650490817184296720235119175155486461971374877427749⟩,⟨342919534868685014654213810182252286997429855678240946464364,342919534868685014654213810182252286997429855678248552951820⟩⟩, + ⟨⟨-462014239501362079054139838429754065462497112254467879321468,-462014239501362079054139838429754065462497112254459714421101⟩,⟨266744045545551625587865651178962514545439253701515483627288,266744045545551625587865651178962514545439253701523457159094⟩⟩] +lemma taylorExp1_0_1_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 1)).exp = taylorExp1_0_1 j := by + revert j + decide +kernel +lemma taylorExp1_0_1_mem (j : Fin 31) : (taylorExp1_0_1 j).Mem (exp (taylorPhase 1 0 (frequency j)*((1:ℤ):ℂ))) := by + rw [← taylorExp1_0_1_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 1)) (by + revert j + decide +kernel) +def taylorExp1_0_3 : Fin 31 → CI := ![⟨⟨-5921482803,6544750736⟩,⟨-151835801980648886882511409515636401867824745654009485590446,-151835801980648886882511409515636401867824745653997019356908⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372826996671296040,75917900990324443441255704757818200933912372827007084959407⟩,⟨-131493661719225521499913208227877576693562652898795149127522,-131493661719225521499913208227877576693562652898784702025368⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898786294720961,131493661719225521499913208227877576693562652898794117372999⟩,⟨-75917900990324443441255704757818200933912372827005324077656,-75917900990324443441255704757818200933912372826997460599530⟩⟩, + ⟨⟨151835801980648886882511409515636401867824745654000664968813,151835801980648886882511409515636401867824745654005839978704⟩,⟨-2338197952,2836811938⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898786755441698,131493661719225521499913208227877576693562652898793158037853⟩,⟨75917900990324443441255704757818200933912372826998643380086,75917900990324443441255704757818200933912372827005004921980⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372826997988689899,75917900990324443441255704757818200933912372827004903939804⟩,⟨131493661719225521499913208227877576693562652898786734088010,131493661719225521499913208227877576693562652898793615679336⟩⟩, + ⟨⟨-3529707771,3155746800⟩,⟨151835801980648886882511409515636401867824745653999909746704,151835801980648886882511409515636401867824745654006595201276⟩⟩, + ⟨⟨-75917900990324443441255704757818200933912372827004687636001,-75917900990324443441255704757818200933912372826998852713254⟩,⟨131493661719225521499913208227877576693562652898787055894070,131493661719225521499913208227877576693562652898792919912526⟩⟩, + ⟨⟨-131493661719225521499913208227877576693562652898792435584876,-131493661719225521499913208227877576693562652898787851855588⟩,⟨75917900990324443441255704757818200933912372826999193493686,75917900990324443441255704757818200933912372827003807089106⟩⟩, + ⟨⟨-151835801980648886882511409515636401867824745654004844778579,-151835801980648886882511409515636401867824745654001660169031⟩,⟨-1716958508,1467651040⟩⟩, + ⟨⟨-131493661719225521499913208227877576693562652898791620784422,-131493661719225521499913208227877576693562652898788417348681⟩,⟨-75917900990324443441255704757818200933912372827003307858304,-75917900990324443441255704757818200933912372827000124537992⟩⟩, + ⟨⟨-75917900990324443441255704757818200933912372827002958837722,-75917900990324443441255704757818200933912372827000149697877⟩,⟨-131493661719225521499913208227877576693562652898791513513836,-131493661719225521499913208227877576693562652898788711600394⟩⟩, + ⟨⟨-1032387238,1157041806⟩,⟨-151835801980648886882511409515636401867824745654004347188554,-151835801980648886882511409515636401867824745654002157759510⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372827000885815171,75917900990324443441255704757818200933912372827002438628451⟩,⟨-131493661719225521499913208227877576693562652898790787150604,-131493661719225521499913208227877576693562652898789313309244⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898789538738072,131493661719225521499913208227877576693562652898790624049028⟩,⟨-75917900990324443441255704757818200933912372827001975599020,-75917900990324443441255704757818200933912372827001240890028⟩⟩, + ⟨⟨151835801980648886882511409515636401867824745654002795276924,151835801980648886882511409515636401867824745654003709670157⟩,⟨-9460,10242⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898789538737777,131493661719225521499913208227877576693562652898790624048551⟩,⟨75917900990324443441255704757818200933912372827001240890904,75917900990324443441255704757818200933912372827001975599514⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372827000885813952,75917900990324443441255704757818200933912372827002438627810⟩,⟨131493661719225521499913208227877576693562652898789313309446,131493661719225521499913208227877576693562652898790787151500⟩⟩, + ⟨⟨-1032388434,1157041264⟩,⟨151835801980648886882511409515636401867824745654002157759194,151835801980648886882511409515636401867824745654004347188892⟩⟩, + ⟨⟨-75917900990324443441255704757818200933912372827002958838527,-75917900990324443441255704757818200933912372827000149698568⟩,⟨131493661719225521499913208227877576693562652898788711599886,131493661719225521499913208227877576693562652898791513513426⟩⟩, + ⟨⟨-131493661719225521499913208227877576693562652898791620784907,-131493661719225521499913208227877576693562652898788417349149⟩,⟨75917900990324443441255704757818200933912372827000124537172,75917900990324443441255704757818200933912372827003307857502⟩⟩, + ⟨⟨-151835801980648886882511409515636401867824745654004844778800,-151835801980648886882511409515636401867824745654001660168829⟩,⟨-1467652050,1716957922⟩⟩, + ⟨⟨-131493661719225521499913208227877576693562652898792435584413,-131493661719225521499913208227877576693562652898787851855112⟩,⟨-75917900990324443441255704757818200933912372827003807089932,-75917900990324443441255704757818200933912372826999193494500⟩⟩, + ⟨⟨-75917900990324443441255704757818200933912372827004687634905,-75917900990324443441255704757818200933912372826998852712715⟩,⟨-131493661719225521499913208227877576693562652898792919912728,-131493661719225521499913208227877576693562652898787055894838⟩⟩, + ⟨⟨-3529706766,3155747542⟩,⟨-151835801980648886882511409515636401867824745654006595201164,-151835801980648886882511409515636401867824745653999909746856⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372826997988691270,75917900990324443441255704757818200933912372827004903940603⟩,⟨-131493661719225521499913208227877576693562652898793615678422,-131493661719225521499913208227877576693562652898786734087662⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898786755441908,131493661719225521499913208227877576693562652898793158038571⟩,⟨-75917900990324443441255704757818200933912372827005004921460,-75917900990324443441255704757818200933912372826998643379060⟩⟩, + ⟨⟨151835801980648886882511409515636401867824745654000664968515,151835801980648886882511409515636401867824745654005839979006⟩,⟨-2836811392,2338199098⟩⟩, + ⟨⟨131493661719225521499913208227877576693562652898786294720466,131493661719225521499913208227877576693562652898794117372807⟩,⟨75917900990324443441255704757818200933912372826997460600012,75917900990324443441255704757818200933912372827005324078446⟩⟩, + ⟨⟨75917900990324443441255704757818200933912372826996671295289,75917900990324443441255704757818200933912372827007084958989⟩,⟨131493661719225521499913208227877576693562652898784702025520,131493661719225521499913208227877576693562652898795149128010⟩⟩, + ⟨⟨-5921483439,6544749847⟩,⟨151835801980648886882511409515636401867824745653997019356984,151835801980648886882511409515636401867824745654009485590270⟩⟩] +lemma taylorExp1_0_3_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 3)).exp = taylorExp1_0_3 j := by + revert j + decide +kernel +lemma taylorExp1_0_3_mem (j : Fin 31) : (taylorExp1_0_3 j).Mem (exp (taylorPhase 1 0 (frequency j)*((3:ℤ):ℂ))) := by + rw [← taylorExp1_0_3_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 3)) (by + revert j + decide +kernel) +def taylorExp1_0_4 : Fin 31 → CI := ![⟨⟨-40501296078971564404768804529681792335858270890124425960287,-40501296078971564404768804529681792335858270890115254933543⟩,⟨70150302581168901555091400759720322880283101069933664883444,70150302581168901555091400759720322880283101069942851539482⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582673824140032,-76117538115349648829075025695232911862919340582666158175119⟩,⟨27704518179610399062670730562249053757479551686256280736008,27704518179610399062670730562249053757479551686263959536678⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582673468231188,-76117538115349648829075025695232911862919340582666241147013⟩,⟨-27704518179610399062670730562249053757479551686264102362150,-27704518179610399062670730562249053757479551686256887798892⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890123325115319,-40501296078971564404768804529681792335858270890115664677778⟩,⟨-70150302581168901555091400759720322880283101069942280693720,-70150302581168901555091400759720322880283101069934634736232⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878098600048953,14065952514524407433242722439584788018510446878105358571771⟩,⟨-79771980771228278238634540429491371248410045076800945180926,-79771980771228278238634540429491371248410045076794180836252⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704565702406852,62051585600825241395832303255648123844408893704570689925763⟩,⟨-52067462591617879175963809867242317490930493390539667287256,-52067462591617879175963809867242317490930493390534659669746⟩⟩, + ⟨⟨81002592157943128809537609059363584671716541780237808537881,81002592157943128809537609059363584671716541780240785360294⟩,⟨-1355408788,1621413622⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704566099002162,62051585600825241395832303255648123844408893704569951361295⟩,⟨52067462591617879175963809867242317490930493390535450649994,52067462591617879175963809867242317490930493390539283849974⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878099721683318,14065952514524407433242722439584788018510446878103713009819⟩,⟨79771980771228278238634540429491371248410045076795616123376,79771980771228278238634540429491371248410045076799602276778⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890121446271265,-40501296078971564404768804529681792335858270890118004256062⟩,⟨70150302581168901555091400759720322880283101069936598053706,70150302581168901555091400759720322880283101069940051371634⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582671176634667,-76117538115349648829075025695232911862919340582668714701907⟩,⟨27704518179610399062670730562249053757479551686259010473236,27704518179610399062670730562249053757479551686261479762054⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582670883060607,-76117538115349648829075025695232911862919340582668917296713⟩,⟨-27704518179610399062670730562249053757479551686261351524278,-27704518179610399062670730562249053757479551686259388674570⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890120475730438,-40501296078971564404768804529681792335858270890118744429286⟩,⟨-70150302581168901555091400759720322880283101069939260724578,-70150302581168901555091400759720322880283101069937521703556⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878101220029194,14065952514524407433242722439584788018510446878102476627891⟩,⟨-79771980771228278238634540429491371248410045076798207218434,-79771980771228278238634540429491371248410045076796964990196⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704567699068807,62051585600825241395832303255648123844408893704568522279493⟩,⟨-52067462591617879175963809867242317490930493390537582240266,-52067462591617879175963809867242317490930493390536948487702⟩⟩, + ⟨⟨81002592157943128809537609059363584671716541780238971339466,81002592157943128809537609059363584671716541780239622558722⟩,⟨-5048,5466⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704567699068546,62051585600825241395832303255648123844408893704568522279112⟩,⟨52067462591617879175963809867242317490930493390536948488178,52067462591617879175963809867242317490930493390537582240542⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878101220028765,14065952514524407433242722439584788018510446878102476627581⟩,⟨79771980771228278238634540429491371248410045076796964990206,79771980771228278238634540429491371248410045076798207218568⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890120475730959,-40501296078971564404768804529681792335858270890118744429715⟩,⟨70150302581168901555091400759720322880283101069937521703254,70150302581168901555091400759720322880283101069939260724362⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582670883060864,-76117538115349648829075025695232911862919340582668917296848⟩,⟨27704518179610399062670730562249053757479551686259388674000,27704518179610399062670730562249053757479551686261351523828⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582671176634507,-76117538115349648829075025695232911862919340582668714701755⟩,⟨-27704518179610399062670730562249053757479551686261479762516,-27704518179610399062670730562249053757479551686259010473706⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890121446271107,-40501296078971564404768804529681792335858270890118004255476⟩,⟨-70150302581168901555091400759720322880283101069940051372054,-70150302581168901555091400759720322880283101069936598053692⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878099721683656,14065952514524407433242722439584788018510446878103713010378⟩,⟨-79771980771228278238634540429491371248410045076799602276818,-79771980771228278238634540429491371248410045076795616123196⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704566099002474,62051585600825241395832303255648123844408893704569951361619⟩,⟨-52067462591617879175963809867242317490930493390539283849582,-52067462591617879175963809867242317490930493390535450649592⟩⟩, + ⟨⟨81002592157943128809537609059363584671716541780237808537990,81002592157943128809537609059363584671716541780240785360200⟩,⟨-1621413026,1355409180⟩⟩, + ⟨⟨62051585600825241395832303255648123844408893704565702406833,62051585600825241395832303255648123844408893704570689925189⟩,⟨52067462591617879175963809867242317490930493390534659670384,52067462591617879175963809867242317490930493390539667287336⟩⟩, + ⟨⟨14065952514524407433242722439584788018510446878098600048676,14065952514524407433242722439584788018510446878105358571062⟩,⟨79771980771228278238634540429491371248410045076794180836568,79771980771228278238634540429491371248410045076800945180812⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890123325115732,-40501296078971564404768804529681792335858270890115664678380⟩,⟨70150302581168901555091400759720322880283101069934634736002,70150302581168901555091400759720322880283101069942280693306⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582673468231503,-76117538115349648829075025695232911862919340582666241147073⟩,⟨27704518179610399062670730562249053757479551686256887798270,27704518179610399062670730562249053757479551686264102361782⟩⟩, + ⟨⟨-76117538115349648829075025695232911862919340582673824139808,-76117538115349648829075025695232911862919340582666158174987⟩,⟨-27704518179610399062670730562249053757479551686263959537140,-27704518179610399062670730562249053757479551686256280736564⟩⟩, + ⟨⟨-40501296078971564404768804529681792335858270890124425959705,-40501296078971564404768804529681792335858270890115254933185⟩,⟨-70150302581168901555091400759720322880283101069942851539654,-70150302581168901555091400759720322880283101069933664883840⟩⟩] +lemma taylorExp1_0_4_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 4)).exp = taylorExp1_0_4 j := by + revert j + decide +kernel +lemma taylorExp1_0_4_mem (j : Fin 31) : (taylorExp1_0_4 j).Mem (exp (taylorPhase 1 0 (frequency j)*((4:ℤ):ℂ))) := by + rw [← taylorExp1_0_4_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 4)) (by + revert j + decide +kernel) +def taylorExp1_0_7 : Fin 31 → CI := ![⟨⟨10651327451596963824602098759263947334964814536116026109946,10651327451596963824602098759263947334964814536118593514644⟩,⟨6149546771406357654763648204653757618946005395858551045110,6149546771406357654763648204653757618946005395861116177500⟩⟩, + ⟨⟨-2135715180664538212987385338027570436425916959491857556660,-2135715180664538212987385338027570436425916959488653459788⟩,⟨12112242675984347527932059689064622233160243106047044384172,12112242675984347527932059689064622233160243106050249145734⟩⟩, + ⟨⟨-12112242675984347527932059689064622233160243106049822533869,-12112242675984347527932059689064622233160243106047507816814⟩,⟨2135715180664538212987385338027570436425916959488993316878,2135715180664538212987385338027570436425916959491308878542⟩⟩, + ⟨⟨-6149546771406357654763648204653757618946005395860941671146,-6149546771406357654763648204653757618946005395858541917347⟩,⟨-10651327451596963824602098759263947334964814536118561760882,-10651327451596963824602098759263947334964814536116163884824⟩⟩, + ⟨⟨7905704939695735803870560971427314266259717483731001804384,7905704939695735803870560971427314266259717483732658109331⟩,⟨-9421652263872185137098701753264725564932473871791649658820,-9421652263872185137098701753264725564932473871789990574744⟩⟩, + ⟨⟨11557367444536723350086087091292296001358390831280481951670,11557367444536723350086087091292296001358390831281589689329⟩,⟨4206537736288611724061498717637307966900525622316343676872,4206537736288611724061498717637307966900525622317449006386⟩⟩, + ⟨⟨-843399121,772718285⟩,⟨12299093542812715309527296409307515237892010791718757144974,12299093542812715309527296409307515237892010791720373262382⟩⟩, + ⟨⟨-11557367444536723350086087091292296001358390831281733934915,-11557367444536723350086087091292296001358390831280386054677⟩,⟨4206537736288611724061498717637307966900525622316155259090,4206537736288611724061498717637307966900525622317504587600⟩⟩, + ⟨⟨-7905704939695735803870560971427314266259717483732461150369,-7905704939695735803870560971427314266259717483731090474115⟩,⟨-9421652263872185137098701753264725564932473871791550006186,-9421652263872185137098701753264725564932473871790181092816⟩⟩, + ⟨⟨6149546771406357654763648204653757618946005395859263073820,6149546771406357654763648204653757618946005395860342937468⟩,⟨-10651327451596963824602098759263947334964814536117868147118,-10651327451596963824602098759263947334964814536116786817808⟩⟩, + ⟨⟨12112242675984347527932059689064622233160243106048350743965,12112242675984347527932059689064622233160243106048955059545⟩,⟨2135715180664538212987385338027570436425916959489918871634,2135715180664538212987385338027570436425916959490522537820⟩⟩, + ⟨⟨2135715180664538212987385338027570436425916959489804512202,2135715180664538212987385338027570436425916959490567290208⟩,⟨12112242675984347527932059689064622233160243106048277730688,12112242675984347527932059689064622233160243106049040346386⟩⟩, + ⟨⟨-10651327451596963824602098759263947334964814536117617324687,-10651327451596963824602098759263947334964814536117072980681⟩,⟨6149546771406357654763648204653757618946005395859500728440,6149546771406357654763648204653757618946005395860044071388⟩⟩, + ⟨⟨-9421652263872185137098701753264725564932473871791040967975,-9421652263872185137098701753264725564932473871790644698255⟩,⟨-7905704939695735803870560971427314266259717483732003653088,-7905704939695735803870560971427314266259717483731602116048⟩⟩, + ⟨⟨4206537736288611724061498717637307966900525622316731726617,4206537736288611724061498717637307966900525622316994538463⟩,⟨-11557367444536723350086087091292296001358390831281172152968,-11557367444536723350086087091292296001358390831280923662340⟩⟩, + ⟨⟨12299093542812715309527296409307515237892010791719478366514,12299093542812715309527296409307515237892010791719652040808⟩,⟨-766,830⟩⟩, + ⟨⟨4206537736288611724061498717637307966900525622316731726528,4206537736288611724061498717637307966900525622316994538394⟩,⟨11557367444536723350086087091292296001358390831280923662356,11557367444536723350086087091292296001358390831281172153006⟩⟩, + ⟨⟨-9421652263872185137098701753264725564932473871791040968028,-9421652263872185137098701753264725564932473871790644698303⟩,⟨7905704939695735803870560971427314266259717483731602115986,7905704939695735803870560971427314266259717483732003653030⟩⟩, + ⟨⟨-10651327451596963824602098759263947334964814536117617324654,-10651327451596963824602098759263947334964814536117072980630⟩,⟨-6149546771406357654763648204653757618946005395860044071470,-6149546771406357654763648204653757618946005395859500728504⟩⟩, + ⟨⟨2135715180664538212987385338027570436425916959489804512260,2135715180664538212987385338027570436425916959490567290294⟩,⟨-12112242675984347527932059689064622233160243106049040346388,-12112242675984347527932059689064622233160243106048277730662⟩⟩, + ⟨⟨12112242675984347527932059689064622233160243106048350743955,12112242675984347527932059689064622233160243106048955059578⟩,⟨-2135715180664538212987385338027570436425916959490522537778,-2135715180664538212987385338027570436425916959489918871548⟩⟩, + ⟨⟨6149546771406357654763648204653757618946005395859263073740,6149546771406357654763648204653757618946005395860342937395⟩,⟨10651327451596963824602098759263947334964814536116786817850,10651327451596963824602098759263947334964814536117868147168⟩⟩, + ⟨⟨-7905704939695735803870560971427314266259717483732461150366,-7905704939695735803870560971427314266259717483731090474235⟩,⟨9421652263872185137098701753264725564932473871790181092830,9421652263872185137098701753264725564932473871791550006080⟩⟩, + ⟨⟨-11557367444536723350086087091292296001358390831281733934880,-11557367444536723350086087091292296001358390831280386054652⟩,⟨-4206537736288611724061498717637307966900525622317504587676,-4206537736288611724061498717637307966900525622316155259176⟩⟩, + ⟨⟨-843399017,772718352⟩,⟨-12299093542812715309527296409307515237892010791720373262364,-12299093542812715309527296409307515237892010791718757144994⟩⟩, + ⟨⟨11557367444536723350086087091292296001358390831280481951660,11557367444536723350086087091292296001358390831281589689408⟩,⟨-4206537736288611724061498717637307966900525622317449006346,-4206537736288611724061498717637307966900525622316343676744⟩⟩, + ⟨⟨7905704939695735803870560971427314266259717483731001804271,7905704939695735803870560971427314266259717483732658109314⟩,⟨9421652263872185137098701753264725564932473871789990574750,9421652263872185137098701753264725564932473871791649658920⟩⟩, + ⟨⟨-6149546771406357654763648204653757618946005395860941671242,-6149546771406357654763648204653757618946005395858541917381⟩,⟨10651327451596963824602098759263947334964814536116163884758,10651327451596963824602098759263947334964814536118561760878⟩⟩, + ⟨⟨-12112242675984347527932059689064622233160243106049822533905,-12112242675984347527932059689064622233160243106047507816746⟩,⟨-2135715180664538212987385338027570436425916959491308878686,-2135715180664538212987385338027570436425916959488993316916⟩⟩, + ⟨⟨-2135715180664538212987385338027570436425916959491857556619,-2135715180664538212987385338027570436425916959488653459657⟩,⟨-12112242675984347527932059689064622233160243106050249145796,-12112242675984347527932059689064622233160243106047044384144⟩⟩, + ⟨⟨10651327451596963824602098759263947334964814536116026110000,10651327451596963824602098759263947334964814536118593514671⟩,⟨-6149546771406357654763648204653757618946005395861116177406,-6149546771406357654763648204653757618946005395858551045042⟩⟩] +lemma taylorExp1_0_7_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 7)).exp = taylorExp1_0_7 j := by + revert j + decide +kernel +lemma taylorExp1_0_7_mem (j : Fin 31) : (taylorExp1_0_7 j).Mem (exp (taylorPhase 1 0 (frequency j)*((7:ℤ):ℂ))) := by + rw [← taylorExp1_0_7_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 7)) (by + revert j + decide +kernel) +def taylorExp1_0_9 : Fin 31 → CI := ![⟨⟨-516665222,473558615⟩,⟨3500439396667033388099062279994501318704805004487948258228,3500439396667033388099062279994501318704805004488938482066⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488857457468,-3500439396667033388099062279994501318704805004488029282818⟩,⟨-434203744,393970906⟩⟩, + ⟨⟨-534589601,571948674⟩,⟨-3500439396667033388099062279994501318704805004488996639280,-3500439396667033388099062279994501318704805004487890101006⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488154993118,3500439396667033388099062279994501318704805004488731747178⟩,⟨-271134382,305619676⟩⟩, + ⟨⟨-500150870,468539345⟩,⟨3500439396667033388099062279994501318704805004487959025046,3500439396667033388099062279994501318704805004488927715260⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488760924674,-3500439396667033388099062279994501318704805004488125815611⟩,⟨-331923406,303185656⟩⟩, + ⟨⟨-320168463,346032449⟩,⟨-3500439396667033388099062279994501318704805004488776470602,-3500439396667033388099062279994501318704805004488110269692⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488309312297,3500439396667033388099062279994501318704805004488577427983⟩,⟨-122562740,145552946⟩⟩, + ⟨⟨-259423607,239307186⟩,⟨3500439396667033388099062279994501318704805004488194004750,3500439396667033388099062279994501318704805004488692735544⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488620818337,-3500439396667033388099062279994501318704805004488265921959⟩,⟨-186069516,168826862⟩⟩, + ⟨⟨-193610761,207979647⟩,⟨-3500439396667033388099062279994501318704805004488644165356,-3500439396667033388099062279994501318704805004488242574946⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488355542251,3500439396667033388099062279994501318704805004488531198028⟩,⟨-82080326,93575450⟩⟩, + ⟨⟨-126304357,117683009⟩,⟨3500439396667033388099062279994501318704805004488321376458,3500439396667033388099062279994501318704805004488565363824⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488508085428,-3500439396667033388099062279994501318704805004488378654870⟩,⟨-67589062,61841496⟩⟩, + ⟨⟨-51722177,54595968⟩,⟨-3500439396667033388099062279994501318704805004488496529222,-3500439396667033388099062279994501318704805004488390211076⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488411516094,3500439396667033388099062279994501318704805004488475224194⟩,⟨-220,238⟩⟩, + ⟨⟨-51722201,54595951⟩,⟨3500439396667033388099062279994501318704805004488390211074,3500439396667033388099062279994501318704805004488496529226⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488508085432,-3500439396667033388099062279994501318704805004488378654865⟩,⟨-61841526,67589040⟩⟩, + ⟨⟨-126304327,117683030⟩,⟨-3500439396667033388099062279994501318704805004488565363820,-3500439396667033388099062279994501318704805004488321376462⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488355542247,3500439396667033388099062279994501318704805004488531198032⟩,⟨-93575428,82080356⟩⟩, + ⟨⟨-193610786,207979632⟩,⟨3500439396667033388099062279994501318704805004488242574940,3500439396667033388099062279994501318704805004488644165358⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488620818345,-3500439396667033388099062279994501318704805004488265921952⟩,⟨-168826888,186069504⟩⟩, + ⟨⟨-259423573,239307201⟩,⟨-3500439396667033388099062279994501318704805004488692735536,-3500439396667033388099062279994501318704805004488194004760⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488309312301,3500439396667033388099062279994501318704805004488577427978⟩,⟨-145552914,122562762⟩⟩, + ⟨⟨-320168505,346032439⟩,⟨3500439396667033388099062279994501318704805004488110269676,3500439396667033388099062279994501318704805004488776470620⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488760924677,-3500439396667033388099062279994501318704805004488125815610⟩,⟨-303185676,331923390⟩⟩, + ⟨⟨-500150845,468539360⟩,⟨-3500439396667033388099062279994501318704805004488927715254,-3500439396667033388099062279994501318704805004487959025050⟩⟩, + ⟨⟨3500439396667033388099062279994501318704805004488154993124,3500439396667033388099062279994501318704805004488731747171⟩,⟨-305619644,271134404⟩⟩, + ⟨⟨-534589619,571948643⟩,⟨3500439396667033388099062279994501318704805004487890101012,3500439396667033388099062279994501318704805004488996639274⟩⟩, + ⟨⟨-3500439396667033388099062279994501318704805004488857457479,-3500439396667033388099062279994501318704805004488029282809⟩,⟨-393970938,434203732⟩⟩, + ⟨⟨-516665198,473558626⟩,⟨-3500439396667033388099062279994501318704805004488938482060,-3500439396667033388099062279994501318704805004487948258236⟩⟩] +lemma taylorExp1_0_9_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 9)).exp = taylorExp1_0_9 j := by + revert j + decide +kernel +lemma taylorExp1_0_9_mem (j : Fin 31) : (taylorExp1_0_9 j).Mem (exp (taylorPhase 1 0 (frequency j)*((9:ℤ):ℂ))) := by + rw [← taylorExp1_0_9_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 9)) (by + revert j + decide +kernel) +def taylorExp1_0_12 : Fin 31 → CI := ![⟨⟨531492023077597742716981099472689980477443859691378544259,531492023077597742716981099472689980477443859691555079424⟩,⟨-83904166,92630998⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845874722769,-265746011538798871358490549736344990238721929845599142889⟩,⟨460285593893984768757068170938500122169187004450572165902,460285593893984768757068170938500122169187004450847809220⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845833768901,-265746011538798871358490549736344990238721929845626492969⟩,⟨-460285593893984768757068170938500122169187004450817513878,-460285593893984768757068170938500122169187004450610315398⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691430173881,531492023077597742716981099472689980477443859691503449804⟩,⟨-33147226,40128696⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845820468934,-265746011538798871358490549736344990238721929845651885194⟩,⟨460285593893984768757068170938500122169187004450626093094,460285593893984768757068170938500122169187004450794754712⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845822032833,-265746011538798871358490549736344990238721929845639740565⟩,⟨-460285593893984768757068170938500122169187004450804592506,-460285593893984768757068170938500122169187004450622364086⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691419484193,531492023077597742716981099472689980477443859691514139491⟩,⟨-44709596,49945700⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845812677001,-265746011538798871358490549736344990238721929845658165595⟩,⟨460285593893984768757068170938500122169187004450633576946,460285593893984768757068170938500122169187004450788143542⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845792402151,-265746011538798871358490549736344990238721929845670882781⟩,⟨-460285593893984768757068170938500122169187004450773773314,-460285593893984768757068170938500122169187004450652310594⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691444268739,531492023077597742716981099472689980477443859691489354947⟩,⟨-20797736,24288472⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845776837152,-265746011538798871358490549736344990238721929845692493912⟩,⟨460285593893984768757068170938500122169187004450669105888,460285593893984768757068170938500122169187004450753487282⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845769459220,-265746011538798871358490549736344990238721929845695337244⟩,⟨-460285593893984768757068170938500122169187004450749659748,-460285593893984768757068170938500122169187004450675551478⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691451313927,531492023077597742716981099472689980477443859691482309757⟩,⟨-14625230,16370600⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845753936224,-265746011538798871358490549736344990238721929845713883310⟩,⟨460285593893984768757068170938500122169187004450691781364,460285593893984768757068170938500122169187004450731684490⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845745007709,-265746011538798871358490549736344990238721929845721300288⟩,⟨-460285593893984768757068170938500122169187004450724355476,-460285593893984768757068170938500122169187004450699983066⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691460339286,531492023077597742716981099472689980477443859691473284397⟩,⟨-34,38⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845745007711,-265746011538798871358490549736344990238721929845721300292⟩,⟨460285593893984768757068170938500122169187004450699983064,460285593893984768757068170938500122169187004450724355474⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845753936219,-265746011538798871358490549736344990238721929845713883307⟩,⟨-460285593893984768757068170938500122169187004450731684492,-460285593893984768757068170938500122169187004450691781366⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691451313927,531492023077597742716981099472689980477443859691482309757⟩,⟨-16370596,14625234⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845769459219,-265746011538798871358490549736344990238721929845695337253⟩,⟨460285593893984768757068170938500122169187004450675551482,460285593893984768757068170938500122169187004450749659742⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845776837149,-265746011538798871358490549736344990238721929845692493908⟩,⟨-460285593893984768757068170938500122169187004450753487286,-460285593893984768757068170938500122169187004450669105890⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691444268740,531492023077597742716981099472689980477443859691489354946⟩,⟨-24288468,20797738⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845792402156,-265746011538798871358490549736344990238721929845670882781⟩,⟨460285593893984768757068170938500122169187004450652310590,460285593893984768757068170938500122169187004450773773316⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845812676994,-265746011538798871358490549736344990238721929845658165595⟩,⟨-460285593893984768757068170938500122169187004450788143540,-460285593893984768757068170938500122169187004450633576952⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691419484195,531492023077597742716981099472689980477443859691514139489⟩,⟨-49945694,44709598⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845822032839,-265746011538798871358490549736344990238721929845639740566⟩,⟨460285593893984768757068170938500122169187004450622364082,460285593893984768757068170938500122169187004450804592508⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845820468928,-265746011538798871358490549736344990238721929845651885194⟩,⟨-460285593893984768757068170938500122169187004450794754712,-460285593893984768757068170938500122169187004450626093098⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691430173881,531492023077597742716981099472689980477443859691503449804⟩,⟨-40128692,33147230⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845833768904,-265746011538798871358490549736344990238721929845626492971⟩,⟨460285593893984768757068170938500122169187004450610315396,460285593893984768757068170938500122169187004450817513876⟩⟩, + ⟨⟨-265746011538798871358490549736344990238721929845874722762,-265746011538798871358490549736344990238721929845599142891⟩,⟨-460285593893984768757068170938500122169187004450847809218,-460285593893984768757068170938500122169187004450572165908⟩⟩, + ⟨⟨531492023077597742716981099472689980477443859691378544259,531492023077597742716981099472689980477443859691555079424⟩,⟨-92630996,83904168⟩⟩] +lemma taylorExp1_0_12_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 12)).exp = taylorExp1_0_12 j := by + revert j + decide +kernel +lemma taylorExp1_0_12_mem (j : Fin 31) : (taylorExp1_0_12 j).Mem (exp (taylorPhase 1 0 (frequency j)*((12:ℤ):ℂ))) := by + rw [← taylorExp1_0_12_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 12)) (by + revert j + decide +kernel) +def taylorExp1_0_13 : Fin 31 → CI := ![⟨⟨-245556882843236704740379089920675176146892736636936614290,-245556882843236704740379089920675176146892736636757776005⟩,⟨-141772332410908107952163682540409815784395192694613958154,-141772332410908107952163682540409815784395192694435152552⟩⟩, + ⟨⟨266444829196274442418900678119648614503573213086631210256,266444829196274442418900678119648614503573213086753866861⟩,⟨-96977986901586283437251687980024417198726795665062502606,-96977986901586283437251687980024417198726795664939813300⟩⟩, + ⟨⟨-96977986901586283437251687980024417198726795665082198548,-96977986901586283437251687980024417198726795664928648397⟩,⟨266444829196274442418900678119648614503573213086614198970,266444829196274442418900678119648614503573213086767773102⟩⟩, + ⟨⟨-141772332410908107952163682540409815784395192694576981484,-141772332410908107952163682540409815784395192694464266974⟩,⟨-245556882843236704740379089920675176146892736636905802014,-245556882843236704740379089920675176146892736636793127554⟩⟩, + ⟨⟨279236984241772503064971480215544817100748942505300864706,279236984241772503064971480215544817100748942505347020522⟩,⟨49237014333488957945481805683087275563517867460592608182,49237014333488957945481805683087275563517867460638729254⟩⟩, + ⟨⟨-217207814862785484473418872436561338940055345626123875520,-217207814862785484473418872436561338940055345626034057935⟩,⟨182258997340186219627719792235520399902022146840274674604,182258997340186219627719792235520399902022146840364537718⟩⟩, + ⟨⟨-47864009,50890193⟩,⟨-283544664821816215904327365080819631568790385389094119892,-283544664821816215904327365080819631568790385388995365690⟩⟩, + ⟨⟨217207814862785484473418872436561338940055345626039813088,217207814862785484473418872436561338940055345626114229984⟩,⟨182258997340186219627719792235520399902022146840284736050,182258997340186219627719792235520399902022146840359112652⟩⟩, + ⟨⟨-279236984241772503064971480215544817100748942505356345643,-279236984241772503064971480215544817100748942505292590567⟩,⟨49237014333488957945481805683087275563517867460580804384,49237014333488957945481805683087275563517867460644572636⟩⟩, + ⟨⟨141772332410908107952163682540409815784395192694497873181,141772332410908107952163682540409815784395192694548616778⟩,⟨-245556882843236704740379089920675176146892736636873339120,-245556882843236704740379089920675176146892736636822564266⟩⟩, + ⟨⟨96977986901586283437251687980024417198726795664980416226,96977986901586283437251687980024417198726795665024743356⟩,⟨266444829196274442418900678119648614503573213086669865818,266444829196274442418900678119648614503573213086714176286⟩⟩, + ⟨⟨-266444829196274442418900678119648614503573213086710518292,-266444829196274442418900678119648614503573213086672488794⟩,⟨-96977986901586283437251687980024417198726795665023013318,-96977986901586283437251687980024417198726795664984989948⟩⟩, + ⟨⟨245556882843236704740379089920675176146892736636835930183,245556882843236704740379089920675176146892736636861486294⟩,⟨-141772332410908107952163682540409815784395192694534701984,-141772332410908107952163682540409815784395192694509167222⟩⟩, + ⟨⟨-49237014333488957945481805683087275563517867460626279587,-49237014333488957945481805683087275563517867460602077644⟩,⟨279236984241772503064971480215544817100748942505312119498,279236984241772503064971480215544817100748942505336291220⟩⟩, + ⟨⟨-182258997340186219627719792235520399902022146840327716801,-182258997340186219627719792235520399902022146840313813709⟩,⟨-217207814862785484473418872436561338940055345626085144896,-217207814862785484473418872436561338940055345626070843370⟩⟩, + ⟨⟨283544664821816215904327365080819631568790385389040997414,283544664821816215904327365080819631568790385389048488167⟩,⟨-18,20⟩⟩, + ⟨⟨-182258997340186219627719792235520399902022146840327716802,-182258997340186219627719792235520399902022146840313813711⟩,⟨217207814862785484473418872436561338940055345626070843370,217207814862785484473418872436561338940055345626085144894⟩⟩, + ⟨⟨-49237014333488957945481805683087275563517867460626279585,-49237014333488957945481805683087275563517867460602077642⟩,⟨-279236984241772503064971480215544817100748942505336291220,-279236984241772503064971480215544817100748942505312119498⟩⟩, + ⟨⟨245556882843236704740379089920675176146892736636835930183,245556882843236704740379089920675176146892736636861486292⟩,⟨141772332410908107952163682540409815784395192694509167224,141772332410908107952163682540409815784395192694534701986⟩⟩, + ⟨⟨-266444829196274442418900678119648614503573213086710518293,-266444829196274442418900678119648614503573213086672488795⟩,⟨96977986901586283437251687980024417198726795664984989946,96977986901586283437251687980024417198726795665023013316⟩⟩, + ⟨⟨96977986901586283437251687980024417198726795664980416228,96977986901586283437251687980024417198726795665024743358⟩,⟨-266444829196274442418900678119648614503573213086714176284,-266444829196274442418900678119648614503573213086669865816⟩⟩, + ⟨⟨141772332410908107952163682540409815784395192694497873179,141772332410908107952163682540409815784395192694548616775⟩,⟨245556882843236704740379089920675176146892736636822564268,245556882843236704740379089920675176146892736636873339120⟩⟩, + ⟨⟨-279236984241772503064971480215544817100748942505356345644,-279236984241772503064971480215544817100748942505292590565⟩,⟨-49237014333488957945481805683087275563517867460644572640,-49237014333488957945481805683087275563517867460580804384⟩⟩, + ⟨⟨217207814862785484473418872436561338940055345626039813087,217207814862785484473418872436561338940055345626114229987⟩,⟨-182258997340186219627719792235520399902022146840359112650,-182258997340186219627719792235520399902022146840284736046⟩⟩, + ⟨⟨-47864011,50890191⟩,⟨283544664821816215904327365080819631568790385388995365690,283544664821816215904327365080819631568790385389094119892⟩⟩, + ⟨⟨-217207814862785484473418872436561338940055345626123875520,-217207814862785484473418872436561338940055345626034057934⟩,⟨-182258997340186219627719792235520399902022146840364537720,-182258997340186219627719792235520399902022146840274674604⟩⟩, + ⟨⟨279236984241772503064971480215544817100748942505300864707,279236984241772503064971480215544817100748942505347020522⟩,⟨-49237014333488957945481805683087275563517867460638729252,-49237014333488957945481805683087275563517867460592608182⟩⟩, + ⟨⟨-141772332410908107952163682540409815784395192694576981485,-141772332410908107952163682540409815784395192694464266976⟩,⟨245556882843236704740379089920675176146892736636793127554,245556882843236704740379089920675176146892736636905802012⟩⟩, + ⟨⟨-96977986901586283437251687980024417198726795665082198547,-96977986901586283437251687980024417198726795664928648396⟩,⟨-266444829196274442418900678119648614503573213086767773102,-266444829196274442418900678119648614503573213086614198970⟩⟩, + ⟨⟨266444829196274442418900678119648614503573213086631210255,266444829196274442418900678119648614503573213086753866860⟩,⟨96977986901586283437251687980024417198726795664939813300,96977986901586283437251687980024417198726795665062502606⟩⟩, + ⟨⟨-245556882843236704740379089920675176146892736636936614291,-245556882843236704740379089920675176146892736636757776006⟩,⟨141772332410908107952163682540409815784395192694435152548,141772332410908107952163682540409815784395192694613958154⟩⟩] +lemma taylorExp1_0_13_calc (j : Fin 31) : ((taylorPhase1_0 j).mul (CI.point 13)).exp = taylorExp1_0_13 j := by + revert j + decide +kernel +lemma taylorExp1_0_13_mem (j : Fin 31) : (taylorExp1_0_13 j).Mem (exp (taylorPhase 1 0 (frequency j)*((13:ℤ):ℂ))) := by + rw [← taylorExp1_0_13_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_0_mem j) (CI.mem_point 13)) (by + revert j + decide +kernel) + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorExp11.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp11.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3fd01a2cb4df7e9487aa3da3b36ff326901ef19 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorExp11.lean @@ -0,0 +1,286 @@ +import OAI.Analysis.Triangular.Taylor.TaylorPhase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorExp1_1_1 : Fin 31 → CI := ![⟨⟨-270521970529611702903398075579158261710395090887346639909465,-270521970529611702903398075579158261710395090887339438158189⟩,⟨-113887088431079554458061820170275411554604026754784427219782,-113887088431079554458061820170275411554604026754777157936734⟩⟩, + ⟨⟨-205714204607833654807133324431221490992733420387176400864588,-205714204607833654807133324431221490992733420387170031473447⟩,⟨-110341139215204901096496256297087569416776099684922911560190,-110341139215204901096496256297087569416776099684916487001356⟩⟩, + ⟨⟨-150920250161901969213952375979129811914306005838620816947419,-150920250161901969213952375979129811914306005838615381883236⟩,⟨-98565448181083918991773230014233849545720819089405654914732,-98565448181083918991773230014233849545720819089400179089494⟩⟩, + ⟨⟨-107010452456385160755042648826214324590944000830932195256099,-107010452456385160755042648826214324590944000830927741872298⟩,⟨-81751105634517278326866195156396217277056901629463212704788,-81751105634517278326866195156396217277056901629458731978204⟩⟩, + ⟨⟨-73727463574733149607489488967107363381367358036881602830213,-73727463574733149607489488967107363381367358036878116153288⟩,⟨-63041665263858789247795654005040166311465965396792399600730,-63041665263858789247795654005040166311465965396788896368486⟩⟩, + ⟨⟨-49826738697283668068840891054249837765957309487917476158686,-49826738697283668068840891054249837765957309487914880811677⟩,⟨-45073496160150885641962208245748291271943874829319717156816,-45073496160150885641962208245748291271943874829317112980562⟩⟩, + ⟨⟨-33427856293680749683726216208104659832839681511496417343907,-33427856293680749683726216208104659832839681511494589965207⟩,⟨-29642905246949399567884737117936330232074534345901096796538,-29642905246949399567884737117936330232074534345899265615972⟩⟩, + ⟨⟨-22470966736957485759486360101021356681292253290928431248398,-22470966736957485759486360101021356681292253290927220917354⟩,⟨-17602953892787246498462997538343213664586857896027347805776,-17602953892787246498462997538343213664586857896026136663688⟩⟩, + ⟨⟨-15125195685275578256583317657253032258843018650157019578893,-15125195685275578256583317657253032258843018650156270873160⟩,⟨-9003347385212065020493893122358040798054623041422702788180,-9003347385212065020493893122358040798054623041421954792270⟩⟩, + ⟨⟨-10025573394950444717743502489463951290751986694881214151220,-10025573394950444717743502489463951290751986694880786689089⟩,⟨-3384416819578773013401560820764276421779274682391761373684,-3384416819578773013401560820764276421779274682391334936276⟩⟩, + ⟨⟨-6308415339597952145559978410359168560564290412732904285645,-6308415339597952145559978410359168560564290412732684550865⟩,⟨-86525789033427411152159463830990454328255768888786901358,-86525789033427411152159463830990454328255768888567230480⟩⟩, + ⟨⟨-3507922702097509039607100348400403304616795884733121292925,-3507922702097509039607100348400403304616795884732974679332⟩,⟨1531796221152942929467954553566006479279384704699701312502,1531796221152942929467954553566006479279384704699849552112⟩⟩, + ⟨⟨-1410184894390396988229908745213858139999308399420662008423,-1410184894390396988229908745213858139999308399420568507552⟩,⟨1995843682931061576563581844274712022244058949581355549814,1995843682931061576563581844274712022244058949581451266542⟩⟩, + ⟨⟨67410870021779231796548852733318945939643549960466000734,67410870021779231796548852733318945939643549960522212240⟩,⟨1704328550322052777323679381429851445467513942669284727196,1704328550322052777323679381429851445467513942669340672688⟩⟩, + ⟨⟨950505712069614354501743949649452893049747413864855738185,950505712069614354501743949649452893049747413864889881920⟩,⟨958697470678865424806482827544991733242911214078517054902,958697470678865424806482827544991733242911214078542539238⟩⟩, + ⟨⟨1244679271468168485965682906090901258794679963603088085060,1244679271468168485965682906090901258794679963603114934611⟩,⟨-80,86⟩⟩, + ⟨⟨950505712069614354501743949649452893049747413864855738190,950505712069614354501743949649452893049747413864889881926⟩,⟨-958697470678865424806482827544991733242911214078542539232,-958697470678865424806482827544991733242911214078517054896⟩⟩, + ⟨⟨67410870021779231796548852733318945939643549960466000745,67410870021779231796548852733318945939643549960522212250⟩,⟨-1704328550322052777323679381429851445467513942669340672688,-1704328550322052777323679381429851445467513942669284727194⟩⟩, + ⟨⟨-1410184894390396988229908745213858139999308399420662008408,-1410184894390396988229908745213858139999308399420568507541⟩,⟨-1995843682931061576563581844274712022244058949581451266550,-1995843682931061576563581844274712022244058949581355549826⟩⟩, + ⟨⟨-3507922702097509039607100348400403304616795884733121292910,-3507922702097509039607100348400403304616795884732974679324⟩,⟨-1531796221152942929467954553566006479279384704699849552138,-1531796221152942929467954553566006479279384704699701312534⟩⟩, + ⟨⟨-6308415339597952145559978410359168560564290412732904285653,-6308415339597952145559978410359168560564290412732684550858⟩,⟨86525789033427411152159463830990454328255768888567230428,86525789033427411152159463830990454328255768888786901320⟩⟩, + ⟨⟨-10025573394950444717743502489463951290751986694881214151240,-10025573394950444717743502489463951290751986694880786689112⟩,⟨3384416819578773013401560820764276421779274682391334936216,3384416819578773013401560820764276421779274682391761373622⟩⟩, + ⟨⟨-15125195685275578256583317657253032258843018650157019578934,-15125195685275578256583317657253032258843018650156270873240⟩,⟨9003347385212065020493893122358040798054623041421954792186,9003347385212065020493893122358040798054623041422702788056⟩⟩, + ⟨⟨-22470966736957485759486360101021356681292253290928431248534,-22470966736957485759486360101021356681292253290927220917411⟩,⟨17602953892787246498462997538343213664586857896026136663516,17602953892787246498462997538343213664586857896027347805684⟩⟩, + ⟨⟨-33427856293680749683726216208104659832839681511496417344103,-33427856293680749683726216208104659832839681511494589965337⟩,⟨29642905246949399567884737117936330232074534345899265615750,29642905246949399567884737117936330232074534345901096796384⟩⟩, + ⟨⟨-49826738697283668068840891054249837765957309487917476159103,-49826738697283668068840891054249837765957309487914880811828⟩,⟨45073496160150885641962208245748291271943874829317112980106,45073496160150885641962208245748291271943874829319717156634⟩⟩, + ⟨⟨-73727463574733149607489488967107363381367358036881602830807,-73727463574733149607489488967107363381367358036878116153656⟩,⟨63041665263858789247795654005040166311465965396788896367810,63041665263858789247795654005040166311465965396792399600288⟩⟩, + ⟨⟨-107010452456385160755042648826214324590944000830932195256551,-107010452456385160755042648826214324590944000830927741872982⟩,⟨81751105634517278326866195156396217277056901629458731977604,81751105634517278326866195156396217277056901629463212703950⟩⟩, + ⟨⟨-150920250161901969213952375979129811914306005838620816948208,-150920250161901969213952375979129811914306005838615381883730⟩,⟨98565448181083918991773230014233849545720819089400179088312,98565448181083918991773230014233849545720819089405654913854⟩⟩, + ⟨⟨-205714204607833654807133324431221490992733420387176400865495,-205714204607833654807133324431221490992733420387170031473989⟩,⟨110341139215204901096496256297087569416776099684916486999810,110341139215204901096496256297087569416776099684922911559018⟩⟩, + ⟨⟨-270521970529611702903398075579158261710395090887346639909928,-270521970529611702903398075579158261710395090887339438159190⟩,⟨113887088431079554458061820170275411554604026754777157935178,113887088431079554458061820170275411554604026754784427217680⟩⟩] +lemma taylorExp1_1_1_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 1)).exp = taylorExp1_1_1 j := by + revert j + decide +kernel +lemma taylorExp1_1_1_mem (j : Fin 31) : (taylorExp1_1_1 j).Mem (exp (taylorPhase 1 1 (frequency j)*((1:ℤ):ℂ))) := by + rw [← taylorExp1_1_1_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 1)) (by + revert j + decide +kernel) +def taylorExp1_1_3 : Fin 31 → CI := ![⟨⟨-9271147671599563783434222957051872670425332734095491188922,-9271147671599563783434222957051872670425332734092322609211⟩,⟨-23526355204376783938558351654774755548291140365371310935668,-23526355204376783938558351654774755548291140365368139050754⟩⟩, + ⟨⟨-1191668026336525821435004864048598563273755682935668472855,-1191668026336525821435004864048598563273755682933991594859⟩,⟨-12664937744998113423070223167424368799739340507368107588500,-12664937744998113423070223167424368799739340507366430285946⟩⟩, + ⟨⟨961138754784856259451306433026595204182467289829954287223,961138754784856259451306433026595204182467289830747972860⟩,⟨-5777474673529179957104752374555616533322938563319303034690,-5777474673529179957104752374555616533322938563318509667122⟩⟩, + ⟨⟨920128613796950307236165295609894125942549389467160901727,920128613796950307236165295609894125942549389467496491201⟩,⟨-2262091314189113158403107529206191605438299017665466811354,-2262091314189113158403107529206191605438299017665131485882⟩⟩, + ⟨⟨478271220554513292913336275959834981327064809524800385683,478271220554513292913336275959834981327064809524927673144⟩,⟨-777490657308671096931400036279645850843254707394280424814,-777490657308671096931400036279645850843254707394153248514⟩⟩, + ⟨⟨179981967051971090657330840160850790304201288039008608672,179981967051971090657330840160850790304201288039052367694⟩,⟨-244140213853472354711257920940427321459535799583133790290,-244140213853472354711257920940427321459535799583090062726⟩⟩, + ⟨⟨50766347768028866952803805270555797081178435972935486302,50766347768028866952803805270555797081178435972949312642⟩,⟨-73323590598691931577280938743219249752337995769190307612,-73323590598691931577280938743219249752337995769176487080⟩⟩, + ⟨⟨9542242345334731357867843173704151998954049434833479722,9542242345334731357867843173704151998954049434837530686⟩,⟨-21211014673899218317120317048329742035790163841784018658,-21211014673899218317120317048329742035790163841779968076⟩⟩, + ⟨⟨217942694143000111672839180377131364462531359210506379,217942694143000111672839180377131364462531359211594164⟩,⟨-5449315344259204764890245036591672798624457081348741530,-5449315344259204764890245036591672798624457081347653732⟩⟩, + ⟨⟨-663184564641758059654461719998490318571192536282488555,-663184564641758059654461719998490318571192536282235433⟩,⟨-981758699323675338511660337097140282949392032826797438,-981758699323675338511660337097140282949392032826544418⟩⟩, + ⟨⟨-250908665671312960042912024840294038856998442646356001,-250908665671312960042912024840294038856998442646312707⟩,⟨-10329520128637911665060188686286291187599275169813136,-10329520128637911665060188686286291187599275169769848⟩⟩, + ⟨⟨-18473852936522920506907372445251095904253396977748054,-18473852936522920506907372445251095904253396977735595⟩,⟨52954448706789914460690497428166112467139389422768690,52954448706789914460690497428166112467139389422781160⟩⟩, + ⟨⟨14047633798608232553495020507943236020341623823652538,14047633798608232553495020507943236020341623823654439⟩,⟨3956704821340300449339802196360784850871378282797400,3956704821340300449339802196360784850871378282799294⟩⟩, + ⟨⟨-587125973701824647794149340408317827039031882552884,-587125973701824647794149340408317827039031882552072⟩,⟨-4927389608517570449679970503726702954813211497492094,-4927389608517570449679970503726702954813211497491282⟩⟩, + ⟨⟨-1762086851549428543301032113532749878343023266559872,-1762086851549428543301032113532749878343023266559608⟩,⟨1717297988354928775992902594419105600564630873177064,1717297988354928775992902594419105600564630873177338⟩⟩, + ⟨⟨1928290097446816131015712092213554913313360787138922,1928290097446816131015712092213554913313360787139053⟩,⟨-2,2⟩⟩, + ⟨⟨-1762086851549428543301032113532749878343023266559872,-1762086851549428543301032113532749878343023266559608⟩,⟨-1717297988354928775992902594419105600564630873177338,-1717297988354928775992902594419105600564630873177064⟩⟩, + ⟨⟨-587125973701824647794149340408317827039031882552884,-587125973701824647794149340408317827039031882552072⟩,⟨4927389608517570449679970503726702954813211497491282,4927389608517570449679970503726702954813211497492094⟩⟩, + ⟨⟨14047633798608232553495020507943236020341623823652538,14047633798608232553495020507943236020341623823654439⟩,⟨-3956704821340300449339802196360784850871378282799294,-3956704821340300449339802196360784850871378282797400⟩⟩, + ⟨⟨-18473852936522920506907372445251095904253396977748054,-18473852936522920506907372445251095904253396977735595⟩,⟨-52954448706789914460690497428166112467139389422781160,-52954448706789914460690497428166112467139389422768690⟩⟩, + ⟨⟨-250908665671312960042912024840294038856998442646356001,-250908665671312960042912024840294038856998442646312707⟩,⟨10329520128637911665060188686286291187599275169769848,10329520128637911665060188686286291187599275169813136⟩⟩, + ⟨⟨-663184564641758059654461719998490318571192536282488555,-663184564641758059654461719998490318571192536282235433⟩,⟨981758699323675338511660337097140282949392032826544418,981758699323675338511660337097140282949392032826797438⟩⟩, + ⟨⟨217942694143000111672839180377131364462531359210506378,217942694143000111672839180377131364462531359211594164⟩,⟨5449315344259204764890245036591672798624457081347653732,5449315344259204764890245036591672798624457081348741530⟩⟩, + ⟨⟨9542242345334731357867843173704151998954049434833479722,9542242345334731357867843173704151998954049434837530686⟩,⟨21211014673899218317120317048329742035790163841779968076,21211014673899218317120317048329742035790163841784018658⟩⟩, + ⟨⟨50766347768028866952803805270555797081178435972935486302,50766347768028866952803805270555797081178435972949312642⟩,⟨73323590598691931577280938743219249752337995769176487080,73323590598691931577280938743219249752337995769190307612⟩⟩, + ⟨⟨179981967051971090657330840160850790304201288039008608671,179981967051971090657330840160850790304201288039052367693⟩,⟨244140213853472354711257920940427321459535799583090062726,244140213853472354711257920940427321459535799583133790290⟩⟩, + ⟨⟨478271220554513292913336275959834981327064809524800385677,478271220554513292913336275959834981327064809524927673140⟩,⟨777490657308671096931400036279645850843254707394153248516,777490657308671096931400036279645850843254707394280424818⟩⟩, + ⟨⟨920128613796950307236165295609894125942549389467160901713,920128613796950307236165295609894125942549389467496491184⟩,⟨2262091314189113158403107529206191605438299017665131485890,2262091314189113158403107529206191605438299017665466811358⟩⟩, + ⟨⟨961138754784856259451306433026595204182467289829954287199,961138754784856259451306433026595204182467289830747972835⟩,⟨5777474673529179957104752374555616533322938563318509667126,5777474673529179957104752374555616533322938563319303034694⟩⟩, + ⟨⟨-1191668026336525821435004864048598563273755682935668472948,-1191668026336525821435004864048598563273755682933991594987⟩,⟨12664937744998113423070223167424368799739340507366430285950,12664937744998113423070223167424368799739340507368107588470⟩⟩, + ⟨⟨-9271147671599563783434222957051872670425332734095491189085,-9271147671599563783434222957051872670425332734092322609317⟩,⟨23526355204376783938558351654774755548291140365368139050670,23526355204376783938558351654774755548291140365371310935642⟩⟩] +lemma taylorExp1_1_3_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 3)).exp = taylorExp1_1_3 j := by + revert j + decide +kernel +lemma taylorExp1_1_3_mem (j : Fin 31) : (taylorExp1_1_3 j).Mem (exp (taylorPhase 1 1 (frequency j)*((3:ℤ):ℂ))) := by + rw [← taylorExp1_1_3_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 3)) (by + revert j + decide +kernel) +def taylorExp1_1_4 : Fin 31 → CI := ![⟨⟨-171298958429712145032431180623341196407537808127702506739,-171298958429712145032431180623341196407537808126337222392⟩,⟨7420259984000650085176998149613351239979720208230037926138,7420259984000650085176998149613351239979720208231403150560⟩⟩, + ⟨⟨-1152320618678334685511476761536918593644957100058460259273,-1152320618678334685511476761536918593644957100057843929951⟩,⟨2736847602212324337963280992421009714751037275674753164252,2736847602212324337963280992421009714751037275675369169766⟩⟩, + ⟨⟨-714514681863694579281000562696170246426446686545596915458,-714514681863694579281000562696170246426446686545361399433⟩,⟨777202850903498474909612393517786605592597268013911168570,777202850903498474909612393517786605592597268014146540690⟩⟩, + ⟨⟨-283391845261676337597530753747672983743325544047027166668,-283391845261676337597530753747672983743325544046951164230⟩,⟨166845883525179483644889130139131473924795969529756708128,166845883525179483644889130139131473924795969529832674986⟩⟩, + ⟨⟨-84276029756106831619060462667524466791270490086496285950,-84276029756106831619060462667524466791270490086475431281⟩,⟨27171399924885575706120280959801936594184163056866092112,27171399924885575706120280959801936594184163056886941160⟩⟩, + ⟨⟨-19972167434184584325640853052555979499542560658898274965,-19972167434184584325640853052555979499542560658893318761⟩,⟨4052294140362499077486890799684150881428754832709599094,4052294140362499077486890799684150881428754832714554610⟩⟩, + ⟨⟨-3870534426227824164081172855612158714139697152086041709,-3870534426227824164081172855612158714139697152084998042⟩,⟨946188412848393893744909287957308597508323108043818516,946188412848393893744909287957308597508323108044862080⟩⟩, + ⟨⟨-587799923661885587209355341577704658093056200669217300,-587799923661885587209355341577704658093056200669021867⟩,⟨308660353155577152442322962050611356733691797984800000,308660353155577152442322962050611356733691797984995424⟩⟩, + ⟨⟨-52358504953021135482027686485831811579672355055828887,-52358504953021135482027686485831811579672355055797820⟩,⟨80459747147256873360208752637929358900107688359779484,80459747147256873360208752637929358900107688359810554⟩⟩, + ⟨⟨3326124872455376829214477434100466751279528946763420,3326124872455376829214477434100466751279528946767112⟩,⟨12087186891259184653689842259331348007162824675703066,12087186891259184653689842259331348007162824675706758⟩⟩, + ⟨⟨1581942305479497718463477077755595971277862285591673,1581942305479497718463477077755595971277862285591912⟩,⟨86872973502720009510989882207624910949632919340032,86872973502720009510989882207624910949632919340270⟩⟩, + ⟨⟨-16310576311058651078171063974244012761057877005249,-16310576311058651078171063974244012761057877005184⟩,⟨-214058290913907427616652931767324474594656030283412,-214058290913907427616652931767324474594656030283346⟩⟩, + ⟨⟨-27706725307620234950461482119145397344556717994152,-27706725307620234950461482119145397344556717994139⟩,⟨22457195806465367233953388881636645588244136778224,22457195806465367233953388881636645588244136778236⟩⟩, + ⟨⟨8358312115657073729634559256985945089074975647033,8358312115657073729634559256985945089074975647037⟩,⟨-1332815180062098079533833720847580838126746659724,-1332815180062098079533833720847580838126746659722⟩⟩, + ⟨⟨-3321242855398268327448573721657217831591751818188,-3321242855398268327448573721657217831591751818186⟩,⟨-57006660439904687550611434741794882678348932588,-57006660439904687550611434741794882678348932586⟩⟩, + ⟨⟨2400102713669386718647972077702188326255303663052,2400102713669386718647972077702188326255303663055⟩,⟨-2,2⟩⟩, + ⟨⟨-3321242855398268327448573721657217831591751818188,-3321242855398268327448573721657217831591751818186⟩,⟨57006660439904687550611434741794882678348932586,57006660439904687550611434741794882678348932588⟩⟩, + ⟨⟨8358312115657073729634559256985945089074975647033,8358312115657073729634559256985945089074975647037⟩,⟨1332815180062098079533833720847580838126746659722,1332815180062098079533833720847580838126746659724⟩⟩, + ⟨⟨-27706725307620234950461482119145397344556717994152,-27706725307620234950461482119145397344556717994139⟩,⟨-22457195806465367233953388881636645588244136778236,-22457195806465367233953388881636645588244136778224⟩⟩, + ⟨⟨-16310576311058651078171063974244012761057877005249,-16310576311058651078171063974244012761057877005184⟩,⟨214058290913907427616652931767324474594656030283346,214058290913907427616652931767324474594656030283412⟩⟩, + ⟨⟨1581942305479497718463477077755595971277862285591673,1581942305479497718463477077755595971277862285591912⟩,⟨-86872973502720009510989882207624910949632919340270,-86872973502720009510989882207624910949632919340032⟩⟩, + ⟨⟨3326124872455376829214477434100466751279528946763420,3326124872455376829214477434100466751279528946767112⟩,⟨-12087186891259184653689842259331348007162824675706758,-12087186891259184653689842259331348007162824675703066⟩⟩, + ⟨⟨-52358504953021135482027686485831811579672355055828887,-52358504953021135482027686485831811579672355055797820⟩,⟨-80459747147256873360208752637929358900107688359810554,-80459747147256873360208752637929358900107688359779484⟩⟩, + ⟨⟨-587799923661885587209355341577704658093056200669217300,-587799923661885587209355341577704658093056200669021867⟩,⟨-308660353155577152442322962050611356733691797984995424,-308660353155577152442322962050611356733691797984800000⟩⟩, + ⟨⟨-3870534426227824164081172855612158714139697152086041709,-3870534426227824164081172855612158714139697152084998042⟩,⟨-946188412848393893744909287957308597508323108044862080,-946188412848393893744909287957308597508323108043818516⟩⟩, + ⟨⟨-19972167434184584325640853052555979499542560658898274965,-19972167434184584325640853052555979499542560658893318761⟩,⟨-4052294140362499077486890799684150881428754832714554610,-4052294140362499077486890799684150881428754832709599094⟩⟩, + ⟨⟨-84276029756106831619060462667524466791270490086496285951,-84276029756106831619060462667524466791270490086475431280⟩,⟨-27171399924885575706120280959801936594184163056886941162,-27171399924885575706120280959801936594184163056866092112⟩⟩, + ⟨⟨-283391845261676337597530753747672983743325544047027166669,-283391845261676337597530753747672983743325544046951164227⟩,⟨-166845883525179483644889130139131473924795969529832674988,-166845883525179483644889130139131473924795969529756708130⟩⟩, + ⟨⟨-714514681863694579281000562696170246426446686545596915451,-714514681863694579281000562696170246426446686545361399431⟩,⟨-777202850903498474909612393517786605592597268014146540690,-777202850903498474909612393517786605592597268013911168578⟩⟩, + ⟨⟨-1152320618678334685511476761536918593644957100058460259256,-1152320618678334685511476761536918593644957100057843929933⟩,⟨-2736847602212324337963280992421009714751037275675369169772,-2736847602212324337963280992421009714751037275674753164258⟩⟩, + ⟨⟨-171298958429712145032431180623341196407537808127702506671,-171298958429712145032431180623341196407537808126337222370⟩,⟨-7420259984000650085176998149613351239979720208231403150538,-7420259984000650085176998149613351239979720208230037926160⟩⟩] +lemma taylorExp1_1_4_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 4)).exp = taylorExp1_1_4 j := by + revert j + decide +kernel +lemma taylorExp1_1_4_mem (j : Fin 31) : (taylorExp1_1_4 j).Mem (exp (taylorPhase 1 1 (frequency j)*((4:ℤ):ℂ))) := by + rw [← taylorExp1_1_4_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 4)) (by + revert j + decide +kernel) +def taylorExp1_1_7 : Fin 31 → CI := ![⟨⟨176159810032015541874917908506082940003251231745760282859,176159810032015541874917908506082940003251231745795543114⟩,⟨-64764285931173862762013844139291592289435360690932893166,-64764285931173862762013844139291592289435360690897669912⟩⟩, + ⟨⟨36035188136933744204914656953915166462886662643240057091,36035188136933744204914656953915166462886662643247476628⟩,⟨11332655117326605366612716151000151935459252354964154232,11332655117326605366612716151000151935459252354971579966⟩⟩, + ⟨⟨3803522035687668650889941501508494598709069374954911995,3803522035687668650889941501508494598709069374956817523⟩,⟨4875090258664883539513253335918763517342499597415359230,4875090258664883539513253335918763517342499597417265818⟩⟩, + ⟨⟨116663678188530873526059962152362546769374153336916829,116663678188530873526059962152362546769374153337243295⟩,⟨794577903204214054280535539996654292825976788414992858,794577903204214054280535539996654292825976788415319352⟩⟩, + ⟨⟨-19181290027345632856952846840591830689866665171877163,-19181290027345632856952846840591830689866665171838589⟩,⟨78519124376690459926314485192896390360087180557772960,78519124376690459926314485192896390360087180557811530⟩⟩, + ⟨⟨-2605302023070586408403839145061684807405214496438473,-2605302023070586408403839145061684807405214496435232⟩,⟨5605349098954799490460164773466873478227448919928958,5605349098954799490460164773466873478227448919932198⟩⟩, + ⟨⟨-127114964917088057898604158573007336942330336058442,-127114964917088057898604158573007336942330336058243⟩,⟨331836011687612794920238393712047343259216368870484,331836011687612794920238393712047343259216368870684⟩⟩, + ⟨⟨938069957882894696147732519477441659400615932689,938069957882894696147732519477441659400615932699⟩,⟨15413144698316216515384937551155586270788884379326,15413144698316216515384937551155586270788884379336⟩⟩, + ⟨⟨427039381094001615592486648149997875604059961267,427039381094001615592486648149997875604059961269⟩,⟨302853618506307377222235746379707598202536334136,302853618506307377222235746379707598202536334140⟩⟩, + ⟨⟨9660866205361353769835612761152727537418008130,9660866205361353769835612761152727537418008132⟩,⟨-11281487804793203676996526278303104036840391782,-11281487804793203676996526278303104036840391780⟩⟩, + ⟨⟨-396025676908430354834599093842456562619896378,-396025676908430354834599093842456562619896376⟩,⟨-38137886751261140269346350755811421730776092,-38137886751261140269346350755811421730776090⟩⟩, + ⟨⟨11636657974544056522503244544645912032929442,11636657974544056522503244544645912032929444⟩,⟨3090763809544828325733675214455091956913432,3090763809544828325733675214455091956913434⟩⟩, + ⟨⟨-478070425801304787049613429716745322470358,-478070425801304787049613429716745322470356⟩,⟨205843129224653654484308217839953854765894,205843129224653654484308217839953854765896⟩⟩, + ⟨⟨-11474681807721374028425827255885822592047,-11474681807721374028425827255885822592045⟩,⟨-40402129853076642467667794971740589778654,-40402129853076642467667794971740589778652⟩⟩, + ⟨⟨5950215789596049431013137199796444410529,5950215789596049431013137199796444410531⟩,⟨-5603112987601726786823091774888860030078,-5603112987601726786823091774888860030076⟩⟩, + ⟨⟨4628094295623909550194276608493893488168,4628094295623909550194276608493893488171⟩,⟨-2,2⟩⟩, + ⟨⟨5950215789596049431013137199796444410529,5950215789596049431013137199796444410531⟩,⟨5603112987601726786823091774888860030076,5603112987601726786823091774888860030078⟩⟩, + ⟨⟨-11474681807721374028425827255885822592047,-11474681807721374028425827255885822592045⟩,⟨40402129853076642467667794971740589778652,40402129853076642467667794971740589778654⟩⟩, + ⟨⟨-478070425801304787049613429716745322470358,-478070425801304787049613429716745322470356⟩,⟨-205843129224653654484308217839953854765896,-205843129224653654484308217839953854765894⟩⟩, + ⟨⟨11636657974544056522503244544645912032929442,11636657974544056522503244544645912032929444⟩,⟨-3090763809544828325733675214455091956913434,-3090763809544828325733675214455091956913432⟩⟩, + ⟨⟨-396025676908430354834599093842456562619896378,-396025676908430354834599093842456562619896376⟩,⟨38137886751261140269346350755811421730776090,38137886751261140269346350755811421730776092⟩⟩, + ⟨⟨9660866205361353769835612761152727537418008130,9660866205361353769835612761152727537418008132⟩,⟨11281487804793203676996526278303104036840391780,11281487804793203676996526278303104036840391782⟩⟩, + ⟨⟨427039381094001615592486648149997875604059961267,427039381094001615592486648149997875604059961269⟩,⟨-302853618506307377222235746379707598202536334140,-302853618506307377222235746379707598202536334136⟩⟩, + ⟨⟨938069957882894696147732519477441659400615932689,938069957882894696147732519477441659400615932699⟩,⟨-15413144698316216515384937551155586270788884379336,-15413144698316216515384937551155586270788884379326⟩⟩, + ⟨⟨-127114964917088057898604158573007336942330336058442,-127114964917088057898604158573007336942330336058243⟩,⟨-331836011687612794920238393712047343259216368870684,-331836011687612794920238393712047343259216368870484⟩⟩, + ⟨⟨-2605302023070586408403839145061684807405214496438473,-2605302023070586408403839145061684807405214496435232⟩,⟨-5605349098954799490460164773466873478227448919932198,-5605349098954799490460164773466873478227448919928958⟩⟩, + ⟨⟨-19181290027345632856952846840591830689866665171877163,-19181290027345632856952846840591830689866665171838589⟩,⟨-78519124376690459926314485192896390360087180557811530,-78519124376690459926314485192896390360087180557772960⟩⟩, + ⟨⟨116663678188530873526059962152362546769374153336916829,116663678188530873526059962152362546769374153337243295⟩,⟨-794577903204214054280535539996654292825976788415319352,-794577903204214054280535539996654292825976788414992858⟩⟩, + ⟨⟨3803522035687668650889941501508494598709069374954911995,3803522035687668650889941501508494598709069374956817523⟩,⟨-4875090258664883539513253335918763517342499597417265818,-4875090258664883539513253335918763517342499597415359230⟩⟩, + ⟨⟨36035188136933744204914656953915166462886662643240057091,36035188136933744204914656953915166462886662643247476628⟩,⟨-11332655117326605366612716151000151935459252354971579966,-11332655117326605366612716151000151935459252354964154232⟩⟩, + ⟨⟨176159810032015541874917908506082940003251231745760282858,176159810032015541874917908506082940003251231745795543114⟩,⟨64764285931173862762013844139291592289435360690897669912,64764285931173862762013844139291592289435360690932893168⟩⟩] +lemma taylorExp1_1_7_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 7)).exp = taylorExp1_1_7 j := by + revert j + decide +kernel +lemma taylorExp1_1_7_mem (j : Fin 31) : (taylorExp1_1_7 j).Mem (exp (taylorPhase 1 1 (frequency j)*((7:ℤ):ℂ))) := by + rw [← taylorExp1_1_7_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 7)) (by + revert j + decide +kernel) +def taylorExp1_1_9 : Fin 31 → CI := ![⟨⟨14597551698001800642589689285431842489023634880693764946,14597551698001800642589689285431842489023634880701739167⟩,⟨6955022322379493617136609679636580519037965959266331758,6955022322379493617136609679636580519037965959274307868⟩⟩, + ⟨⟨571740715964723485222368107154243960730469462728031664,571740715964723485222368107154243960730469462729512385⟩,⟨1977508825803378425265983908253455147541692132684536408,1977508825803378425265983908253455147541692132686017240⟩⟩, + ⟨⟨-95358279229655423451144174391273373151788504521773379,-95358279229655423451144174391273373151788504521609882⟩,⟨176836080990698924046549196107746382212625051950279964,176836080990698924046549196107746382212625051950443446⟩⟩, + ⟨⟨-13346037384518245450982783379364148219137779735653035,-13346037384518245450982783379364148219137779735641836⟩,⟨5829742106369279984461455313412886995414259251059010,5829742106369279984461455313412886995414259251070208⟩⟩, + ⟨⟨-757931615200969268834468596830566010329932415660014,-757931615200969268834468596830566010329932415659466⟩,⟨-63550810489444209168363372109394566711041595912794,-63550810489444209168363372109394566711041595912246⟩⟩, + ⟨⟨-26352927866455617332910188680152166684380605426807,-26352927866455617332910188680152166684380605426782⟩,⟨-9173832541757631226991653637897401957812014800464,-9173832541757631226991653637897401957812014800438⟩⟩, + ⟨⟨-687976648106694023190050156196592794996309167269,-687976648106694023190050156196592794996309167267⟩,⟨-172700318416393665979336195717112118018254707152,-172700318416393665979336195717112118018254707150⟩⟩, + ⟨⟨-12010505942193038579564088472270814233849261379,-12010505942193038579564088472270814233849261377⟩,⟨3748919080445002284462823295441390175698624160,3748919080445002284462823295441390175698624162⟩⟩, + ⟨⟨-19405097506958298467413025847248362284290973,-19405097506958298467413025847248362284290971⟩,⟨161041113320640974867324689712162936020353286,161041113320640974867324689712162936020353288⟩⟩, + ⟨⟨1625953912339360052951205536127387912491146,1625953912339360052951205536127387912491148⟩,⟨-349104711433416223066471338771876790981390,-349104711433416223066471338771876790981388⟩⟩, + ⟨⟨-15715679717925414578203073101034529277214,-15715679717925414578203073101034529277212⟩,⟨-1949787581735137062978460498613047280764,-1949787581735137062978460498613047280762⟩⟩, + ⟨⟨149106857753469870692437859407771393491,149106857753469870692437859407771393493⟩,⟨-94276071220124980263621030566936519286,-94276071220124980263621030566936519284⟩⟩, + ⟨⟨2112335336288686330432390787040087960,2112335336288686330432390787040087962⟩,⟨2280456846018559776655341596088268872,2280456846018559776655341596088268874⟩⟩, + ⟨⟨42562398830916556238700891915492763,42562398830916556238700891915492765⟩,⟨114537258305782262721707256685162940,114537258305782262721707256685162942⟩⟩, + ⟨⟨10118584752590178552196838826411083,10118584752590178552196838826411085⟩,⟨10931868780848437847560772992708244,10931868780848437847560772992708246⟩⟩, + ⟨⟨7169966275549012620746957791545190,7169966275549012620746957791545193⟩,⟨-2,2⟩⟩, + ⟨⟨10118584752590178552196838826411083,10118584752590178552196838826411085⟩,⟨-10931868780848437847560772992708246,-10931868780848437847560772992708244⟩⟩, + ⟨⟨42562398830916556238700891915492763,42562398830916556238700891915492765⟩,⟨-114537258305782262721707256685162942,-114537258305782262721707256685162940⟩⟩, + ⟨⟨2112335336288686330432390787040087960,2112335336288686330432390787040087962⟩,⟨-2280456846018559776655341596088268874,-2280456846018559776655341596088268872⟩⟩, + ⟨⟨149106857753469870692437859407771393491,149106857753469870692437859407771393493⟩,⟨94276071220124980263621030566936519284,94276071220124980263621030566936519286⟩⟩, + ⟨⟨-15715679717925414578203073101034529277214,-15715679717925414578203073101034529277212⟩,⟨1949787581735137062978460498613047280762,1949787581735137062978460498613047280764⟩⟩, + ⟨⟨1625953912339360052951205536127387912491146,1625953912339360052951205536127387912491148⟩,⟨349104711433416223066471338771876790981388,349104711433416223066471338771876790981390⟩⟩, + ⟨⟨-19405097506958298467413025847248362284290973,-19405097506958298467413025847248362284290971⟩,⟨-161041113320640974867324689712162936020353288,-161041113320640974867324689712162936020353286⟩⟩, + ⟨⟨-12010505942193038579564088472270814233849261379,-12010505942193038579564088472270814233849261377⟩,⟨-3748919080445002284462823295441390175698624162,-3748919080445002284462823295441390175698624160⟩⟩, + ⟨⟨-687976648106694023190050156196592794996309167269,-687976648106694023190050156196592794996309167267⟩,⟨172700318416393665979336195717112118018254707150,172700318416393665979336195717112118018254707152⟩⟩, + ⟨⟨-26352927866455617332910188680152166684380605426807,-26352927866455617332910188680152166684380605426782⟩,⟨9173832541757631226991653637897401957812014800438,9173832541757631226991653637897401957812014800464⟩⟩, + ⟨⟨-757931615200969268834468596830566010329932415660014,-757931615200969268834468596830566010329932415659466⟩,⟨63550810489444209168363372109394566711041595912246,63550810489444209168363372109394566711041595912794⟩⟩, + ⟨⟨-13346037384518245450982783379364148219137779735653035,-13346037384518245450982783379364148219137779735641836⟩,⟨-5829742106369279984461455313412886995414259251070208,-5829742106369279984461455313412886995414259251059010⟩⟩, + ⟨⟨-95358279229655423451144174391273373151788504521773379,-95358279229655423451144174391273373151788504521609882⟩,⟨-176836080990698924046549196107746382212625051950443446,-176836080990698924046549196107746382212625051950279964⟩⟩, + ⟨⟨571740715964723485222368107154243960730469462728031664,571740715964723485222368107154243960730469462729512385⟩,⟨-1977508825803378425265983908253455147541692132686017240,-1977508825803378425265983908253455147541692132684536408⟩⟩, + ⟨⟨14597551698001800642589689285431842489023634880693764946,14597551698001800642589689285431842489023634880701739167⟩,⟨-6955022322379493617136609679636580519037965959274307868,-6955022322379493617136609679636580519037965959266331758⟩⟩] +lemma taylorExp1_1_9_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 9)).exp = taylorExp1_1_9 j := by + revert j + decide +kernel +lemma taylorExp1_1_9_mem (j : Fin 31) : (taylorExp1_1_9 j).Mem (exp (taylorPhase 1 1 (frequency j)*((9:ℤ):ℂ))) := by + rw [← taylorExp1_1_9_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 9)) (by + revert j + decide +kernel) +def taylorExp1_1_12 : Fin 31 → CI := ![⟨⟨28290268174685853319511733648289476010743777958383047,28290268174685853319511733648289476010743777958767297⟩,⟨-407908225371495454895393522514606616137498232771186704,-407908225371495454895393522514606616137498232770802460⟩⟩, + ⟨⟨24363701038414192408781984593680379580965267848560666,24363701038414192408781984593680379580965267848578717⟩,⟨-9597594613482044537802323858419912572311691999559286,-9597594613482044537802323858419912572311691999541238⟩⟩, + ⟨⟨930013441532700256111443572962396172224781661828668,930013441532700256111443572962396172224781661829629⟩,⟨720894053845092204128036941318129485480209758496700,720894053845092204128036941318129485480209758497662⟩⟩, + ⟨⟨907338104481443817711880839594636747892971916193,907338104481443817711880839594636747892971916232⟩,⟨35554067769489191211830148442982048453746085947404,35554067769489191211830148442982048453746085947444⟩⟩, + ⟨⟨-411907040118958041271994953036342912510693801305,-411907040118958041271994953036342912510693801302⟩,⟨558890225997609318693290156319774244631283996936,558890225997609318693290156319774244631283996938⟩⟩, + ⟨⟨-6982753233584037672283978227413864485505655358,-6982753233584037672283978227413864485505655356⟩,⟨4782685018710683182225548443688101938429251926,4782685018710683182225548443688101938429251928⟩⟩, + ⟨⟨-47589069217894632999052142634780224860162344,-47589069217894632999052142634780224860162342⟩,⟨41677553662859615935457333962946858457665828,41677553662859615935457333962946858457665830⟩⟩, + ⟨⟨-35088780763909120329047705329689594987827,-35088780763909120329047705329689594987825⟩,⟨290528112179465941067448260233042639858704,290528112179465941067448260233042639858706⟩⟩, + ⟨⟨873334610643980173751409411999868738739,873334610643980173751409411999868738741⟩,⟨140842229706402573401709935726552845998,140842229706402573401709935726552846000⟩⟩, + ⟨⟨-1421044124906979466558409794646434172,-1421044124906979466558409794646434170⟩,⟨-1364773542072174639908143009584208962,-1364773542072174639908143009584208960⟩⟩, + ⟨⟨3923059858070280476215684777459554,3923059858070280476215684777459556⟩,⟨651554030457196444718180289701032,651554030457196444718180289701034⟩⟩, + ⟨⟨2237759215739136365714202726432,2237759215739136365714202726434⟩,⟨9637513725890490184108440926800,9637513725890490184108440926802⟩⟩, + ⟨⟨20650218666543306482662261968,20650218666543306482662261970⟩,⟨40392910075778780259889999186,40392910075778780259889999188⟩⟩, + ⟨⟨539380206507317021799862187,539380206507317021799862189⟩,⟨-276969321020958441724485220,-276969321020958441724485218⟩⟩, + ⟨⟨-36603101415138751153712651,-36603101415138751153712649⟩,⟨-1886277000974745377631506,-1886277000974745377631504⟩⟩, + ⟨⟨13825774968168790865468319,13825774968168790865468322⟩,⟨-2,2⟩⟩, + ⟨⟨-36603101415138751153712651,-36603101415138751153712649⟩,⟨1886277000974745377631504,1886277000974745377631506⟩⟩, + ⟨⟨539380206507317021799862187,539380206507317021799862189⟩,⟨276969321020958441724485218,276969321020958441724485220⟩⟩, + ⟨⟨20650218666543306482662261968,20650218666543306482662261970⟩,⟨-40392910075778780259889999188,-40392910075778780259889999186⟩⟩, + ⟨⟨2237759215739136365714202726432,2237759215739136365714202726434⟩,⟨-9637513725890490184108440926802,-9637513725890490184108440926800⟩⟩, + ⟨⟨3923059858070280476215684777459554,3923059858070280476215684777459556⟩,⟨-651554030457196444718180289701034,-651554030457196444718180289701032⟩⟩, + ⟨⟨-1421044124906979466558409794646434172,-1421044124906979466558409794646434170⟩,⟨1364773542072174639908143009584208960,1364773542072174639908143009584208962⟩⟩, + ⟨⟨873334610643980173751409411999868738739,873334610643980173751409411999868738741⟩,⟨-140842229706402573401709935726552846000,-140842229706402573401709935726552845998⟩⟩, + ⟨⟨-35088780763909120329047705329689594987827,-35088780763909120329047705329689594987825⟩,⟨-290528112179465941067448260233042639858706,-290528112179465941067448260233042639858704⟩⟩, + ⟨⟨-47589069217894632999052142634780224860162344,-47589069217894632999052142634780224860162342⟩,⟨-41677553662859615935457333962946858457665830,-41677553662859615935457333962946858457665828⟩⟩, + ⟨⟨-6982753233584037672283978227413864485505655358,-6982753233584037672283978227413864485505655356⟩,⟨-4782685018710683182225548443688101938429251928,-4782685018710683182225548443688101938429251926⟩⟩, + ⟨⟨-411907040118958041271994953036342912510693801305,-411907040118958041271994953036342912510693801302⟩,⟨-558890225997609318693290156319774244631283996938,-558890225997609318693290156319774244631283996936⟩⟩, + ⟨⟨907338104481443817711880839594636747892971916193,907338104481443817711880839594636747892971916232⟩,⟨-35554067769489191211830148442982048453746085947444,-35554067769489191211830148442982048453746085947404⟩⟩, + ⟨⟨930013441532700256111443572962396172224781661828668,930013441532700256111443572962396172224781661829629⟩,⟨-720894053845092204128036941318129485480209758497662,-720894053845092204128036941318129485480209758496700⟩⟩, + ⟨⟨24363701038414192408781984593680379580965267848560666,24363701038414192408781984593680379580965267848578717⟩,⟨9597594613482044537802323858419912572311691999541238,9597594613482044537802323858419912572311691999559286⟩⟩, + ⟨⟨28290268174685853319511733648289476010743777958383047,28290268174685853319511733648289476010743777958767297⟩,⟨407908225371495454895393522514606616137498232770802460,407908225371495454895393522514606616137498232771186704⟩⟩] +lemma taylorExp1_1_12_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 12)).exp = taylorExp1_1_12 j := by + revert j + decide +kernel +lemma taylorExp1_1_12_mem (j : Fin 31) : (taylorExp1_1_12 j).Mem (exp (taylorPhase 1 1 (frequency j)*((12:ℤ):ℂ))) := by + rw [← taylorExp1_1_12_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 12)) (by + revert j + decide +kernel) +def taylorExp1_1_13 : Fin 31 → CI := ![⟨⟨-54108619228075409890909177621827487865357124585240207,-54108619228075409890909177621827487865357124585132182⟩,⟨107126240649384498822051807202501244359556942592742732,107126240649384498822051807202501244359556942592850746⟩⟩, + ⟨⟨-6070968903797749410391582103180266630547104891640661,-6070968903797749410391582103180266630547104891636467⟩,⟨-713956986016405144810086993211322743793667193750842,-713956986016405144810086993211322743793667193746648⟩⟩, + ⟨⟨-69302615741726557257669130595739856172347374285454,-69302615741726557257669130595739856172347374285282⟩,⟨-200464702625631829733310707734793626628370709833076,-200464702625631829733310707734793626628370709832902⟩⟩, + ⟨⟨2809489688868818806449746225844154985427447601803,2809489688868818806449746225844154985427447601808⟩,⟨-3878832771903704283837565403736080412430899362320,-3878832771903704283837565403736080412430899362314⟩⟩, + ⟨⟨65602231843130300923597484375256692850413381151,65602231843130300923597484375256692850413381154⟩,⟨-15238253036506913129505627514262419362431194764,-15238253036506913129505627514262419362431194762⟩⟩, + ⟨⟨563500155583471579076432209145066726875775651,563500155583471579076432209145066726875775653⟩,⟨76431504362520840477063486435840629890775158,76431504362520840477063486435840629890775160⟩⟩, + ⟨⟨2826244341118604415739922676345963508889559,2826244341118604415739922676345963508889561⟩,⟨17486995102327980956238870750123145432132,17486995102327980956238870750123145432134⟩⟩, + ⟨⟨5902631788639855348953264765215000002769,5902631788639855348953264765215000002771⟩,⟨-5910781354994619851491630696811150193562,-5910781354994619851491630696811150193560⟩⟩, + ⟨⟨-11941305364159579387342856924510401556,-11941305364159579387342856924510401554⟩,⟨-9993201168216547861645075859893372994,-9993201168216547861645075859893372992⟩⟩, + ⟨⟨9627819641012883888264360398872901,9627819641012883888264360398872903⟩,⟨18492042951229855609020123956746570,18492042951229855609020123956746572⟩⟩, + ⟨⟨-24691914760228303637913424349479,-24691914760228303637913424349477⟩,⟨-4449719289957946135762671683252,-4449719289957946135762671683250⟩⟩, + ⟨⟨-22612593461347906225041504651,-22612593461347906225041504649⟩,⟨-30379862080308218133650242882,-30379862080308218133650242880⟩⟩, + ⟨⟨-109738560839363483520883499,-109738560839363483520883497⟩,⟨-15746863152567353476802206,-15746863152567353476802204⟩⟩, + ⟨⟨508406810372518548012134,508406810372518548012136⟩,⟨900610342529660801860038,900610342529660801860040⟩⟩, + ⟨⟨-32983087984718563356929,-32983087984718563356927⟩,⟨-36884217809667557426466,-36884217809667557426464⟩⟩, + ⟨⟨17208655514863170953531,17208655514863170953534⟩,⟨-2,2⟩⟩, + ⟨⟨-32983087984718563356929,-32983087984718563356927⟩,⟨36884217809667557426464,36884217809667557426466⟩⟩, + ⟨⟨508406810372518548012134,508406810372518548012136⟩,⟨-900610342529660801860040,-900610342529660801860038⟩⟩, + ⟨⟨-109738560839363483520883499,-109738560839363483520883497⟩,⟨15746863152567353476802204,15746863152567353476802206⟩⟩, + ⟨⟨-22612593461347906225041504651,-22612593461347906225041504649⟩,⟨30379862080308218133650242880,30379862080308218133650242882⟩⟩, + ⟨⟨-24691914760228303637913424349479,-24691914760228303637913424349477⟩,⟨4449719289957946135762671683250,4449719289957946135762671683252⟩⟩, + ⟨⟨9627819641012883888264360398872901,9627819641012883888264360398872903⟩,⟨-18492042951229855609020123956746572,-18492042951229855609020123956746570⟩⟩, + ⟨⟨-11941305364159579387342856924510401556,-11941305364159579387342856924510401554⟩,⟨9993201168216547861645075859893372992,9993201168216547861645075859893372994⟩⟩, + ⟨⟨5902631788639855348953264765215000002769,5902631788639855348953264765215000002771⟩,⟨5910781354994619851491630696811150193560,5910781354994619851491630696811150193562⟩⟩, + ⟨⟨2826244341118604415739922676345963508889559,2826244341118604415739922676345963508889561⟩,⟨-17486995102327980956238870750123145432134,-17486995102327980956238870750123145432132⟩⟩, + ⟨⟨563500155583471579076432209145066726875775651,563500155583471579076432209145066726875775653⟩,⟨-76431504362520840477063486435840629890775160,-76431504362520840477063486435840629890775158⟩⟩, + ⟨⟨65602231843130300923597484375256692850413381151,65602231843130300923597484375256692850413381154⟩,⟨15238253036506913129505627514262419362431194762,15238253036506913129505627514262419362431194764⟩⟩, + ⟨⟨2809489688868818806449746225844154985427447601803,2809489688868818806449746225844154985427447601808⟩,⟨3878832771903704283837565403736080412430899362314,3878832771903704283837565403736080412430899362320⟩⟩, + ⟨⟨-69302615741726557257669130595739856172347374285454,-69302615741726557257669130595739856172347374285282⟩,⟨200464702625631829733310707734793626628370709832902,200464702625631829733310707734793626628370709833076⟩⟩, + ⟨⟨-6070968903797749410391582103180266630547104891640661,-6070968903797749410391582103180266630547104891636467⟩,⟨713956986016405144810086993211322743793667193746648,713956986016405144810086993211322743793667193750842⟩⟩, + ⟨⟨-54108619228075409890909177621827487865357124585240207,-54108619228075409890909177621827487865357124585132182⟩,⟨-107126240649384498822051807202501244359556942592850746,-107126240649384498822051807202501244359556942592742732⟩⟩] +lemma taylorExp1_1_13_calc (j : Fin 31) : ((taylorPhase1_1 j).mul (CI.point 13)).exp = taylorExp1_1_13 j := by + revert j + decide +kernel +lemma taylorExp1_1_13_mem (j : Fin 31) : (taylorExp1_1_13 j).Mem (exp (taylorPhase 1 1 (frequency j)*((13:ℤ):ℂ))) := by + rw [← taylorExp1_1_13_calc] + exact CI.mem_exp_checked (CI.mem_mul (taylorPhase1_1_mem j) (CI.mem_point 13)) (by + revert j + decide +kernel) + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorPhase.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..c357f8e708bed48492a4f77f6d0f3670bff25c76 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorPhase.lean @@ -0,0 +1,182 @@ +import OAI.Analysis.Triangular.Taylor.Taylor + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorPhaseBox (q branch : Fin 2) (j : Fin 31) : CI := + if branch.val=0 then ((CI.imag.mul (CI.ofReal piBox)).mul (CI.ofReal (realFrequencyBox j))).sub + (CI.ofReal (piBox.mul ((dampingBox q).sub (dampingBox 0)))) + else wavePhaseBox q 0 j +lemma taylorPhaseBox_mem (q branch : Fin 2) (j : Fin 31) : + (taylorPhaseBox q branch j).Mem (taylorPhase q branch (frequency j)) := by + unfold taylorPhaseBox taylorPhase + split_ifs + · exact CI.mem_sub (CI.mem_mul (CI.mem_mul CI.mem_imag (CI.mem_ofReal piBox_mem)) (CI.mem_ofReal (realFrequencyBox_mem j))) + (CI.mem_ofReal (RI.mem_mul piBox_mem (RI.mem_sub (dampingBox_mem q) (dampingBox_mem 0)))) + · exact wavePhaseBox_mem q 0 j + +def taylorPhase0_0 : Fin 31 → CI := ![⟨⟨-6,5⟩,⟨-2617993877991494365385536152732919070164307832812591666666671,-2617993877991494365385536152732919070164307832812583333333331⟩⟩, + ⟨⟨-6,5⟩,⟨-2443460952792061407693167075884057798820020643958418888888892,-2443460952792061407693167075884057798820020643958411111111107⟩⟩, + ⟨⟨-6,5⟩,⟨-2268928027592628450000797999035196527475733455104246111111115,-2268928027592628450000797999035196527475733455104238888888887⟩⟩, + ⟨⟨-6,5⟩,⟨-2094395102393195492308428922186335256131446266250073333333336,-2094395102393195492308428922186335256131446266250066666666663⟩⟩, + ⟨⟨-6,5⟩,⟨-1919862177193762534616059845337473984787159077395900555555560,-1919862177193762534616059845337473984787159077395894444444443⟩⟩, + ⟨⟨-6,5⟩,⟨-1745329251994329576923690768488612713442871888541727777777781,-1745329251994329576923690768488612713442871888541722222222219⟩⟩, + ⟨⟨-6,5⟩,⟨-1570796326794896619231321691639751442098584699687555000000001,-1570796326794896619231321691639751442098584699687549999999995⟩⟩, + ⟨⟨-6,5⟩,⟨-1396263401595463661538952614790890170754297510833382222222225,-1396263401595463661538952614790890170754297510833377777777775⟩⟩, + ⟨⟨-6,5⟩,⟨-1221730476396030703846583537942028899410010321979209444444446,-1221730476396030703846583537942028899410010321979205555555551⟩⟩, + ⟨⟨-6,5⟩,⟨-1047197551196597746154214461093167628065723133125036666666670,-1047197551196597746154214461093167628065723133125033333333331⟩⟩, + ⟨⟨-6,5⟩,⟨-872664625997164788461845384244306356721435944270863888888891,-872664625997164788461845384244306356721435944270861111111107⟩⟩, + ⟨⟨-6,5⟩,⟨-698131700797731830769476307395445085377148755416691111111114,-698131700797731830769476307395445085377148755416688888888887⟩⟩, + ⟨⟨-6,5⟩,⟨-523598775598298873077107230546583814032861566562518333333335,-523598775598298873077107230546583814032861566562516666666663⟩⟩, + ⟨⟨-6,5⟩,⟨-349065850398865915384738153697722542688574377708345555555559,-349065850398865915384738153697722542688574377708344444444443⟩⟩, + ⟨⟨-6,5⟩,⟨-174532925199432957692369076848861271344287188854172777777780,-174532925199432957692369076848861271344287188854172222222219⟩⟩, + ⟨⟨-6,5⟩,⟨0,5⟩⟩, + ⟨⟨-6,5⟩,⟨174532925199432957692369076848861271344287188854172222222220,174532925199432957692369076848861271344287188854172777777781⟩⟩, + ⟨⟨-6,5⟩,⟨349065850398865915384738153697722542688574377708344444444444,349065850398865915384738153697722542688574377708345555555560⟩⟩, + ⟨⟨-6,5⟩,⟨523598775598298873077107230546583814032861566562516666666664,523598775598298873077107230546583814032861566562518333333336⟩⟩, + ⟨⟨-6,5⟩,⟨698131700797731830769476307395445085377148755416688888888888,698131700797731830769476307395445085377148755416691111111115⟩⟩, + ⟨⟨-6,5⟩,⟨872664625997164788461845384244306356721435944270861111111108,872664625997164788461845384244306356721435944270863888888892⟩⟩, + ⟨⟨-6,5⟩,⟨1047197551196597746154214461093167628065723133125033333333332,1047197551196597746154214461093167628065723133125036666666671⟩⟩, + ⟨⟨-6,5⟩,⟨1221730476396030703846583537942028899410010321979205555555552,1221730476396030703846583537942028899410010321979209444444447⟩⟩, + ⟨⟨-6,5⟩,⟨1396263401595463661538952614790890170754297510833377777777776,1396263401595463661538952614790890170754297510833382222222226⟩⟩, + ⟨⟨-6,5⟩,⟨1570796326794896619231321691639751442098584699687550000000000,1570796326794896619231321691639751442098584699687555000000006⟩⟩, + ⟨⟨-6,5⟩,⟨1745329251994329576923690768488612713442871888541722222222220,1745329251994329576923690768488612713442871888541727777777782⟩⟩, + ⟨⟨-6,5⟩,⟨1919862177193762534616059845337473984787159077395894444444444,1919862177193762534616059845337473984787159077395900555555561⟩⟩, + ⟨⟨-6,5⟩,⟨2094395102393195492308428922186335256131446266250066666666664,2094395102393195492308428922186335256131446266250073333333337⟩⟩, + ⟨⟨-6,5⟩,⟨2268928027592628450000797999035196527475733455104238888888888,2268928027592628450000797999035196527475733455104246111111116⟩⟩, + ⟨⟨-6,5⟩,⟨2443460952792061407693167075884057798820020643958411111111108,2443460952792061407693167075884057798820020643958418888888893⟩⟩, + ⟨⟨-6,5⟩,⟨2617993877991494365385536152732919070164307832812583333333332,2617993877991494365385536152732919070164307832812591666666672⟩⟩] +lemma taylorPhase0_0_calc (j : Fin 31) : taylorPhaseBox 0 0 j = taylorPhase0_0 j := by + revert j + decide +kernel +lemma taylorPhase0_0_mem (j : Fin 31) : (taylorPhase0_0 j).Mem (taylorPhase 0 0 (frequency j)) := by + rw [← taylorPhase0_0_calc] + exact taylorPhaseBox_mem 0 0 j +def taylorPhase0_1 : Fin 31 → CI := ![⟨⟨-690019644855948463759690304302050629095947583276773035641411,-690019644855948463759690304302050629095947583276770839240628⟩,⟨4309218497736466090286737878963435317948493085941923625589786,4309218497736466090286737878963435317948493085941937342258338⟩⟩, + ⟨⟨-908420639933436259150450480952802838872103313016135423472189,-908420639933436259150450480952802838872103313016132531879444⟩,⟨4521547384012340431893543993096351874671237373080282916064091,4521547384012340431893543993096351874671237373080297308596482⟩⟩, + ⟨⟨-1166914417921006787684350602452908979145581643038160462578882,-1166914417921006787684350602452908979145581643038156748174876⟩,⟨4747667804222218031683242089212944358994125834106859432397622,4747667804222218031683242089212944358994125834106874544693681⟩⟩, + ⟨⟨-1474850725905483395686367824516405367187511080795759322482375,-1474850725905483395686367824516405367187511080795754627886655⟩,⟨4986259270835319797575816813394973231008918973692722799777758,4986259270835319797575816813394973231008918973692738671534043⟩⟩, + ⟨⟨-1843971566014046497913660542302235460891028430654241160898306,-1843971566014046497913660542302235460891028430654235291354456⟩,⟨5234190155323584671388979120717308963512863773016251994264551,5234190155323584671388979120717308963512863773016268655209353⟩⟩, + ⟨⟨-2288878200017222097813046412415979329925991200527576243506542,-2288878200017222097813046412415979329925991200527568957780876⟩,⟨5485326310845999671389452880279428612014752935155396989838030,5485326310845999671389452880279428612014752935155414450174067⟩⟩, + ⟨⟨-2827341729801825153325687209987780764912851520870148230926380,-2827341729801825153325687209987780764912851520870139231218049⟩,⟨5728651811797580668239685235739429037558660465673048869438298,5728651811797580668239685235739429037558660465673067104303473⟩⟩, + ⟨⟨-3480080447337782514710218204455717095660242614634249696468998,-3480080447337782514710218204455717095660242614634238619028789⟩,⟨5945388169357270870310479679438886374231738837152643946442859,5945388169357270870310479679438886374231738837152662871201289⟩⟩, + ⟨⟨-4269205457092921446179440757866083961248451001440783620098521,-4269205457092921446179440757866083961248451001440770030795365⟩,⟨6104808613593816671698885058377092253779153624280739904504491,6104808613593816671698885058377092253779153624280759336713976⟩⟩, + ⟨⟨-5213812049360707513649022070984896370639601861892549249676601,-5213812049360707513649022070984896370639601861892532653597245⟩,⟨6158777991746310994829726295392085638496705350666732013330626,6158777991746310994829726295392085638496705350666751617329992⟩⟩, + ⟨⟨-6320243126552924705103739897660025758864179057966500054526922,-6320243126552924705103739897660025758864179057966479936568015⟩,⟨6036261951612299351455096934620144395009163932805566941640515,6036261951612299351455096934620144395009163932805586155659238⟩⟩, + ⟨⟨-7564209229604518019323511288448726233575726655241679218276596,-7564209229604518019323511288448726233575726655241655140650539⟩,⟨5642059301846436418562620940368468767452787092175940614804266,5642059301846436418562620940368468767452787092175958574036995⟩⟩, + ⟨⟨-8864978481231389403795287272453391033883541410296195396032343,-8864978481231389403795287272453391033883541410296167177929158⟩,⟨4869176462476430933761071579788442163975774022590049597024074,4869176462476430933761071579788442163975774022590065096094284⟩⟩, + ⟨⟨-10063056367228041038467672594972643756695906202222231329013199,-10063056367228041038467672594972643756695906202222199297309601⟩,⟨3637646362564892398544108282773749914157824770591416110231887,3637646362564892398544108282773749914157824770591427689220023⟩⟩, + ⟨⟨-10931450975084247668102640609968665647870097748417967218457287,-10931450975084247668102640609968665647870097748417932422567756⟩,⟨1960717725049800223722212313771845854329597278464945493883594,1960717725049800223722212313771845854329597278464951735042057⟩⟩, + ⟨⟨-11251829688327679077207577262545764643675587499801129266666729,-11251829688327679077207577262545764643675587499801093450980061⟩,⟨-45,8⟩⟩, + ⟨⟨-10931450975084247668102640609968665647870097748417967218457287,-10931450975084247668102640609968665647870097748417932422567756⟩,⟨-1960717725049800223722212313771845854329597278464951735042057,-1960717725049800223722212313771845854329597278464945493883594⟩⟩, + ⟨⟨-10063056367228041038467672594972643756695906202222231329013199,-10063056367228041038467672594972643756695906202222199297309601⟩,⟨-3637646362564892398544108282773749914157824770591427689220023,-3637646362564892398544108282773749914157824770591416110231887⟩⟩, + ⟨⟨-8864978481231389403795287272453391033883541410296195396032343,-8864978481231389403795287272453391033883541410296167177929089⟩,⟨-4869176462476430933761071579788442163975774022590065096094284,-4869176462476430933761071579788442163975774022590049597024039⟩⟩, + ⟨⟨-7564209229604518019323511288448726233575726655241679218276596,-7564209229604518019323511288448726233575726655241655140650539⟩,⟨-5642059301846436418562620940368468767452787092175958574036995,-5642059301846436418562620940368468767452787092175940614804266⟩⟩, + ⟨⟨-6320243126552924705103739897660025758864179057966500054526884,-6320243126552924705103739897660025758864179057966479936568015⟩,⟨-6036261951612299351455096934620144395009163932805586155659206,-6036261951612299351455096934620144395009163932805566941640515⟩⟩, + ⟨⟨-5213812049360707513649022070984896370639601861892549249676601,-5213812049360707513649022070984896370639601861892532653597245⟩,⟨-6158777991746310994829726295392085638496705350666751617329992,-6158777991746310994829726295392085638496705350666732013330626⟩⟩, + ⟨⟨-4269205457092921446179440757866083961248451001440783620098521,-4269205457092921446179440757866083961248451001440770030795347⟩,⟨-6104808613593816671698885058377092253779153624280759336713976,-6104808613593816671698885058377092253779153624280739904504469⟩⟩, + ⟨⟨-3480080447337782514710218204455717095660242614634249696468998,-3480080447337782514710218204455717095660242614634238619028789⟩,⟨-5945388169357270870310479679438886374231738837152662871201289,-5945388169357270870310479679438886374231738837152643946442859⟩⟩, + ⟨⟨-2827341729801825153325687209987780764912851520870148230926358,-2827341729801825153325687209987780764912851520870139231218036⟩,⟨-5728651811797580668239685235739429037558660465673067104303454,-5728651811797580668239685235739429037558660465673048869438295⟩⟩, + ⟨⟨-2288878200017222097813046412415979329925991200527576243506532,-2288878200017222097813046412415979329925991200527568957780867⟩,⟨-5485326310845999671389452880279428612014752935155414450174052,-5485326310845999671389452880279428612014752935155396989838017⟩⟩, + ⟨⟨-1843971566014046497913660542302235460891028430654241160898306,-1843971566014046497913660542302235460891028430654235291354450⟩,⟨-5234190155323584671388979120717308963512863773016268655209353,-5234190155323584671388979120717308963512863773016251994264539⟩⟩, + ⟨⟨-1474850725905483395686367824516405367187511080795759322482369,-1474850725905483395686367824516405367187511080795754627886649⟩,⟨-4986259270835319797575816813394973231008918973692738671534034,-4986259270835319797575816813394973231008918973692722799777749⟩⟩, + ⟨⟨-1166914417921006787684350602452908979145581643038160462578878,-1166914417921006787684350602452908979145581643038156748174876⟩,⟨-4747667804222218031683242089212944358994125834106874544693672,-4747667804222218031683242089212944358994125834106859432397622⟩⟩, + ⟨⟨-908420639933436259150450480952802838872103313016135423472186,-908420639933436259150450480952802838872103313016132531879440⟩,⟨-4521547384012340431893543993096351874671237373080297308596476,-4521547384012340431893543993096351874671237373080282916064085⟩⟩, + ⟨⟨-690019644855948463759690304302050629095947583276773035641411,-690019644855948463759690304302050629095947583276770839240625⟩,⟨-4309218497736466090286737878963435317948493085941937342258338,-4309218497736466090286737878963435317948493085941923625589780⟩⟩] +lemma taylorPhase0_1_calc (j : Fin 31) : taylorPhaseBox 0 1 j = taylorPhase0_1 j := by + revert j + decide +kernel +lemma taylorPhase0_1_mem (j : Fin 31) : (taylorPhase0_1 j).Mem (taylorPhase 0 1 (frequency j)) := by + rw [← taylorPhase0_1_calc] + exact taylorPhaseBox_mem 0 1 j +def taylorPhase1_0 : Fin 31 → CI := ![⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-2617993877991494365385536152732919070164307832812591666666671,-2617993877991494365385536152732919070164307832812583333333331⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-2443460952792061407693167075884057798820020643958418888888892,-2443460952792061407693167075884057798820020643958411111111107⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-2268928027592628450000797999035196527475733455104246111111115,-2268928027592628450000797999035196527475733455104238888888887⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-2094395102393195492308428922186335256131446266250073333333336,-2094395102393195492308428922186335256131446266250066666666663⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1919862177193762534616059845337473984787159077395900555555560,-1919862177193762534616059845337473984787159077395894444444443⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1745329251994329576923690768488612713442871888541727777777781,-1745329251994329576923690768488612713442871888541722222222219⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1570796326794896619231321691639751442098584699687555000000001,-1570796326794896619231321691639751442098584699687549999999995⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1396263401595463661538952614790890170754297510833382222222225,-1396263401595463661538952614790890170754297510833377777777775⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1221730476396030703846583537942028899410010321979209444444446,-1221730476396030703846583537942028899410010321979205555555551⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-1047197551196597746154214461093167628065723133125036666666670,-1047197551196597746154214461093167628065723133125033333333331⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-872664625997164788461845384244306356721435944270863888888891,-872664625997164788461845384244306356721435944270861111111107⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-698131700797731830769476307395445085377148755416691111111114,-698131700797731830769476307395445085377148755416688888888887⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-523598775598298873077107230546583814032861566562518333333335,-523598775598298873077107230546583814032861566562516666666663⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-349065850398865915384738153697722542688574377708345555555559,-349065850398865915384738153697722542688574377708344444444443⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨-174532925199432957692369076848861271344287188854172777777780,-174532925199432957692369076848861271344287188854172222222219⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨0,5⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨174532925199432957692369076848861271344287188854172222222220,174532925199432957692369076848861271344287188854172777777781⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨349065850398865915384738153697722542688574377708344444444444,349065850398865915384738153697722542688574377708345555555560⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨523598775598298873077107230546583814032861566562516666666664,523598775598298873077107230546583814032861566562518333333336⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨698131700797731830769476307395445085377148755416688888888888,698131700797731830769476307395445085377148755416691111111115⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨872664625997164788461845384244306356721435944270861111111108,872664625997164788461845384244306356721435944270863888888892⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1047197551196597746154214461093167628065723133125033333333332,1047197551196597746154214461093167628065723133125036666666671⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1221730476396030703846583537942028899410010321979205555555552,1221730476396030703846583537942028899410010321979209444444447⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1396263401595463661538952614790890170754297510833377777777776,1396263401595463661538952614790890170754297510833382222222226⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1570796326794896619231321691639751442098584699687550000000000,1570796326794896619231321691639751442098584699687555000000006⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1745329251994329576923690768488612713442871888541722222222220,1745329251994329576923690768488612713442871888541727777777782⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨1919862177193762534616059845337473984787159077395894444444444,1919862177193762534616059845337473984787159077395900555555561⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨2094395102393195492308428922186335256131446266250066666666664,2094395102393195492308428922186335256131446266250073333333337⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨2268928027592628450000797999035196527475733455104238888888888,2268928027592628450000797999035196527475733455104246111111116⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨2443460952792061407693167075884057798820020643958411111111108,2443460952792061407693167075884057798820020643958418888888893⟩⟩, + ⟨⟨-628318530717958647692528676655900576839433879875022000000006,-628318530717958647692528676655900576839433879875019999999995⟩,⟨2617993877991494365385536152732919070164307832812583333333332,2617993877991494365385536152732919070164307832812591666666672⟩⟩] +lemma taylorPhase1_0_calc (j : Fin 31) : taylorPhaseBox 1 0 j = taylorPhase1_0 j := by + revert j + decide +kernel +lemma taylorPhase1_0_mem (j : Fin 31) : (taylorPhase1_0 j).Mem (taylorPhase 1 0 (frequency j)) := by + rw [← taylorPhase1_0_calc] + exact taylorPhaseBox_mem 1 0 j +def taylorPhase1_1 : Fin 31 → CI := ![⟨⟨-1225818697371765010141254517922954538348629233288311423582462,-1225818697371765010141254517922954538348629233288307521680321⟩,⟨3540062036407862208670606895428989998419238933759014693951113,3540062036407862208670606895428989998419238933759025962318601⟩⟩, + ⟨⟨-1454836916241658766872694944401830695922804586922866061324515,-1454836916241658766872694944401830695922804586922861430434740⟩,⟨3633919532764468986759250177575726694619114254932668315440984,3633919532764468986759250177575726694619114254932679882566162⟩⟩, + ⟨⟨-1713379617648981297427950440705722268312972961002794030584090,-1713379617648981297427950440705722268312972961002788576727329⟩,⟨3720141415463337755202493773998949818541166382538497273400748,3720141415463337755202493773998949818541166382538509114978710⟩⟩, + ⟨⟨-2004970084528739694677475889448748182708156189000626478992845,-2004970084528739694677475889448748182708156189000620096974800⟩,⟨3793964921912678266363919308350344646092831833071795181450368,3793964921912678266363919308350344646092831833071807258015845⟩⟩, + ⟨⟨-2332991670428918998507278861415158369328761581699513092299950,-2332991670428918998507278861415158369328761581699505666156766⟩,⟨3849019022545672396649213346608238976287427052711670404086875,3849019022545672396649213346608238976287427052711682655894998⟩⟩, + ⟨⟨-2700249919291715189196199224017555223421924538239818135627642,-2700249919291715189196199224017555223421924538239809540465134⟩,⟨3876945906905601738964504088819533131737615364225662078667830,3876945906905601738964504088819533131737615364225674419369992⟩⟩, + ⟨⟨-3108274137706817292447633369258901952574516997177896868833129,-3108274137706817292447633369258901952574516997177886974889186⟩,⟨3867051518451247216226788999605493456668106104597612013786275,3867051518451247216226788999605493456668106104597624322993627⟩⟩, + ⟨⟨-3556278824015897261010692095449706881602235778288839322632266,-3556278824015897261010692095449706881602235778288828002645116⟩,⟨3806107264392120956451021272234352149982941048622520166786097,3806107264392120956451021272234352149982941048622532282001863⟩⟩, + ⟨⟨-4039740480220220730127436237330791894631647178270618118879544,-4039740480220220730127436237330791894631647178270605259986133⟩,⟨3678515830975849075970488159827238696173949940165326627562019,3678515830975849075970488159827238696173949940165338336641641⟩⟩, + ⟨⟨-4548655869830529835739258231158089726137573845540879110318993,-4548655869830529835739258231158089726137573845540864631497575⟩,⟨3467158871636456504207751223131555991830007062548394216973805,3467158871636456504207751223131555991830007062548405253283330⟩⟩, + ⟨⟨-5065776714205426510828497179756366299764360995809150041412059,-5065776714205426510828497179756366299764360995809133916543857⟩,⟨3155307724498948668675820951682817531065534254936557570238598,3155307724498948668675820951682817531065534254936567613895091⟩⟩, + ⟨⟨-5565469540566358656000333152857375868363495191492380310611349,-5565469540566358656000333152857375868363495191492362595171473⟩,⟨2729881087566620723077214774968068662136021723160451273733108,2729881087566620723077214774968068662136021723160459963214554⟩⟩, + ⟨⟨-6014213213637339831777533257634864193878131381373161458892342,-6014213213637339831777533257634864193878131381373142315056996⟩,⟨2185911949338848621251491360478362708180607709000208739215109,2185911949338848621251491360478362708180607709000215697188998⟩⟩, + ⟨⟨-6373802459393661498907321719264515730382845561191309339995823,-6373802459393661498907321719264515730382845561191289051552355⟩,⟨1531264189632549629626465117197437594858000649584119969455209,1531264189632549629626465117197437594858000649584124843620557⟩⟩, + ⟨⟨-6607633691220363387501536341720889529409951686460862874826602,-6607633691220363387501536341720889529409951686460841842075197⟩,⟨789688805909556902117164104118921863172529761548186815028297,789688805909556902117164104118921863172529761548189328685878⟩⟩, + ⟨⟨-6688877395532046196361326887412136634674615242175697167901269,-6688877395532046196361326887412136634674615242175675876543118⟩,⟨-22,7⟩⟩, + ⟨⟨-6607633691220363387501536341720889529409951686460862874826602,-6607633691220363387501536341720889529409951686460841842075197⟩,⟨-789688805909556902117164104118921863172529761548189328685878,-789688805909556902117164104118921863172529761548186815028297⟩⟩, + ⟨⟨-6373802459393661498907321719264515730382845561191309339995823,-6373802459393661498907321719264515730382845561191289051552355⟩,⟨-1531264189632549629626465117197437594858000649584124843620557,-1531264189632549629626465117197437594858000649584119969455209⟩⟩, + ⟨⟨-6014213213637339831777533257634864193878131381373161458892342,-6014213213637339831777533257634864193878131381373142315056974⟩,⟨-2185911949338848621251491360478362708180607709000215697188998,-2185911949338848621251491360478362708180607709000208739215103⟩⟩, + ⟨⟨-5565469540566358656000333152857375868363495191492380310611349,-5565469540566358656000333152857375868363495191492362595171473⟩,⟨-2729881087566620723077214774968068662136021723160459963214554,-2729881087566620723077214774968068662136021723160451273733108⟩⟩, + ⟨⟨-5065776714205426510828497179756366299764360995809150041412044,-5065776714205426510828497179756366299764360995809133916543857⟩,⟨-3155307724498948668675820951682817531065534254936567613895082,-3155307724498948668675820951682817531065534254936557570238598⟩⟩, + ⟨⟨-4548655869830529835739258231158089726137573845540879110318993,-4548655869830529835739258231158089726137573845540864631497575⟩,⟨-3467158871636456504207751223131555991830007062548405253283330,-3467158871636456504207751223131555991830007062548394216973805⟩⟩, + ⟨⟨-4039740480220220730127436237330791894631647178270618118879544,-4039740480220220730127436237330791894631647178270605259986121⟩,⟨-3678515830975849075970488159827238696173949940165338336641641,-3678515830975849075970488159827238696173949940165326627562012⟩⟩, + ⟨⟨-3556278824015897261010692095449706881602235778288839322632266,-3556278824015897261010692095449706881602235778288828002645116⟩,⟨-3806107264392120956451021272234352149982941048622532282001863,-3806107264392120956451021272234352149982941048622520166786097⟩⟩, + ⟨⟨-3108274137706817292447633369258901952574516997177896868833113,-3108274137706817292447633369258901952574516997177886974889176⟩,⟨-3867051518451247216226788999605493456668106104597624322993620,-3867051518451247216226788999605493456668106104597612013786275⟩⟩, + ⟨⟨-2700249919291715189196199224017555223421924538239818135627636,-2700249919291715189196199224017555223421924538239809540465128⟩,⟨-3876945906905601738964504088819533131737615364225674419369986,-3876945906905601738964504088819533131737615364225662078667823⟩⟩, + ⟨⟨-2332991670428918998507278861415158369328761581699513092299950,-2332991670428918998507278861415158369328761581699505666156763⟩,⟨-3849019022545672396649213346608238976287427052711682655894998,-3849019022545672396649213346608238976287427052711670404086872⟩⟩, + ⟨⟨-2004970084528739694677475889448748182708156189000626478992842,-2004970084528739694677475889448748182708156189000620096974794⟩,⟨-3793964921912678266363919308350344646092831833071807258015842,-3793964921912678266363919308350344646092831833071795181450362⟩⟩, + ⟨⟨-1713379617648981297427950440705722268312972961002794030584087,-1713379617648981297427950440705722268312972961002788576727329⟩,⟨-3720141415463337755202493773998949818541166382538509114978710,-3720141415463337755202493773998949818541166382538497273400748⟩⟩, + ⟨⟨-1454836916241658766872694944401830695922804586922866061324515,-1454836916241658766872694944401830695922804586922861430434740⟩,⟨-3633919532764468986759250177575726694619114254932679882566159,-3633919532764468986759250177575726694619114254932668315440981⟩⟩, + ⟨⟨-1225818697371765010141254517922954538348629233288311423582462,-1225818697371765010141254517922954538348629233288307521680318⟩,⟨-3540062036407862208670606895428989998419238933759025962318601,-3540062036407862208670606895428989998419238933759014693951113⟩⟩] +lemma taylorPhase1_1_calc (j : Fin 31) : taylorPhaseBox 1 1 j = taylorPhase1_1 j := by + revert j + decide +kernel +lemma taylorPhase1_1_mem (j : Fin 31) : (taylorPhase1_1 j).Mem (taylorPhase 1 1 (frequency j)) := by + rw [← taylorPhase1_1_calc] + exact taylorPhaseBox_mem 1 1 j +def taylorPhaseTable : Fin 2 → Fin 2 → Fin 31 → CI := ![![taylorPhase0_0,taylorPhase0_1],![taylorPhase1_0,taylorPhase1_1]] +lemma taylorPhaseTable_mem (q br : Fin 2) (j : Fin 31) : + (taylorPhaseTable q br j).Mem (taylorPhase q br (frequency j)) := by + fin_cases q <;> fin_cases br + · exact taylorPhase0_0_mem j + · exact taylorPhase0_1_mem j + · exact taylorPhase1_0_mem j + · exact taylorPhase1_1_mem j +def nearNode (n : Fin 7) : ℤ := finiteNode ⟨n.val,by omega⟩ + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows00.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows00.lean new file mode 100644 index 0000000000000000000000000000000000000000..493eb86c86df2856e49817c8293df1448f83cbf3 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows00.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_0_0_0 : Fin 8 → RI := ![⟨-310627079097082178072923986867761465837071218935033349773853,-310627079097082178063118274154035356158754197590155965641166⟩, + ⟨353829196146230030168047907444064791912456424396982714640031,353829196146230030175099839368987204335446960136762780186307⟩, + ⟨-483169025561007177509694290870217463910395993362159738691839,-483169025561007177361993851881727100628698146249150156641063⟩, + ⟨696790370593526751569004199663519520613599376826935327342040,696790370593526751623657129039898498341987982476803480155038⟩, + ⟨776720069120214335810638029134608472751440717954793103515595,776720069120214335967184999696320074536128050804987504525818⟩, + ⟨400251014916968479639782742773764022416132335844181590740213,400251014916968479706971544397951880890928862379172327314014⟩, + ⟨18843983881606130488631914581623292223121193130096760516819,18843983881606130606751317837848826285292126167312083414141⟩, + ⟨16573469530357650188739920338582793346555232044366137412890,16573469530357650255368719055320262986766741782515978285771⟩] +lemma tr0_0_0_0_calc (r : Fin 8) : taylorRowBox 0 0 0 0 r = tr0_0_0_0 r := by + revert r + decide +kernel +def tr0_0_0_1 : Fin 8 → RI := ![⟨64810970262157298692834289152650758638337657977114136875196,64810970262157298703772554107559692088673928385685301377442⟩, + ⟨-35451251294094030500569367568157322893084497862269584218026,-35451251294094030492702942955324976517438578386846130780364⟩, + ⟨336782035691014382083402458412061487548933723583074750503616,336782035691014382248162183968253954675720463993102011534431⟩, + ⟨-394931271231936737542245810492086366610001448742865353265668,-394931271231936737481280510004858509165077145005780153020942⟩, + ⟨-416184336883695304263971476682482995166597881916890011618546,-416184336883695304089343451994581302717220429454876492162863⟩, + ⟨-85697311296417866236094825021741692065552604934025140161198,-85697311296417866161145768731041316428213437759606587564108⟩, + ⟨-8149259177356756488351239014761275823283383869095245654657,-8149259177356756356589135959297566172843693999598518343130⟩, + ⟨30626106585741779527406085750623940297918674249621991271283,30626106585741779601730459232755974229889191011741241312746⟩] +lemma tr0_0_0_1_calc (r : Fin 8) : taylorRowBox 0 0 0 1 r = tr0_0_0_1 r := by + revert r + decide +kernel +def tr0_0_0_2 : Fin 8 → RI := ![⟨239522204081752900516235550487203828375631120988891783983946,239522204081752900527365616666776678858812650828053403304918⟩, + ⟨-159451040449110267647169552816616859367735830546809888906223,-159451040449110267639165191347994999016166829968082332957171⟩, + ⟨1666535864210167885860370666933481255769783134999083245687691,1666535864210167886028019435428117994029457642335508463820096⟩, + ⟨-1380979967538296985135890860369783436173480196485993283105655,-1380979967538296985073856540314182467828105199852579785478566⟩, + ⟨-1859068084469084587578322091598461687683524195868019118958838,-1859068084469084587400631984478217705474261228951905702158123⟩, + ⟨-908576948893789337138326965573797198414279888315333362040231,-908576948893789337062063686158772194497833750853919682235117⟩, + ⟨25090120990239926381838481850162951624735366018506468731308,25090120990239926515911018311990352463658735941954294787794⟩, + ⟨-118634622075890481193364118415346665268325789109881082984075,-118634622075890481117736475546199922811205190232054280932372⟩] +lemma tr0_0_0_2_calc (r : Fin 8) : taylorRowBox 0 0 0 2 r = tr0_0_0_2 r := by + revert r + decide +kernel +def tr0_0_0_3 : Fin 8 → RI := ![⟨-3390275814967591045161884109193704708001849069437897233590,-3390275814967591034311514755831316023692537128397803917207⟩, + ⟨6243336948650992409374591893493747833521840946962133636182,6243336948650992417177805007802594631376627492716829162514⟩, + ⟨497398756531122887893280383694219722332262439521326618609445,497398756531122888056716164798311624808205585963024049548667⟩, + ⟨-215531977705961793239519421904880118097175912276525687429802,-215531977705961793179044014634254198567317303882961394877670⟩, + ⟨-461359523054432928099092273285187572663105602115945952428761,-461359523054432927925867490830871686255435241682973074254602⟩, + ⟨-310868335238695666436676417170144119382598780653253854346419,-310868335238695666362329622070944089077772566493955333185125⟩, + ⟨28240583021383660526700500684231793487260541955782982430666,28240583021383660657403815233091913927831432656157786757738⟩, + ⟨-82662311031408695625943384270484350638744576477231472387595,-82662311031408695552216252263838191469623073422539346073843⟩] +lemma tr0_0_0_3_calc (r : Fin 8) : taylorRowBox 0 0 0 3 r = tr0_0_0_3 r := by + revert r + decide +kernel +def tr0_0_0_4 : Fin 8 → RI := ![⟨-185031285657076332464605074419830195088659723551767265979448,-185031285657076332455581219508545657401492238093222299116825⟩, + ⟨119788470406866064892907750929239696159749827416430231294131,119788470406866064899397397566522547283325368907068004159548⟩, + ⟨-1436656371599224983997528361428775758274347143376747905319316,-1436656371599224983861604806389814143200760083870811630478411⟩, + ⟨1105385996906680818623269711545959878291985413429294850708170,1105385996906680818673564893499778660807888664709707155621620⟩, + ⟨1542575271106656205438586599115733819579889220177810341117502,1542575271106656205582651308157709955727198950389813007416288⟩, + ⟨839792634656722166717384716863968292952811933899253292028989,839792634656722166779216224180696464018550611589481022607838⟩, + ⟨-106664617571168683784728503104699467976788049041047051386849,-106664617571168683676027342015918871076208204946513531756399⟩, + ⟨252894027454933840240109069366790782777886025890277081042601,252894027454933840301425225581540361077998923210870932943106⟩] +lemma tr0_0_0_4_calc (r : Fin 8) : taylorRowBox 0 0 0 4 r = tr0_0_0_4 r := by + revert r + decide +kernel +def tr0_0_0_5 : Fin 8 → RI := ![⟨-132881602000468207943390558702579374749720188920510599966650,-132881602000468207936567738041831711059904584295522594118096⟩, + ⟨88691651882274763659295065829271395605548526651961687486577,88691651882274763664201804201493040298428275137718012221383⟩, + ⟨-1287906440747212684470443964406488977185112584941000067131682,-1287906440747212684367673912281426749285885463047549287574559⟩, + ⟨893875095641785585811182446602686164035627165857675921712005,893875095641785585849209986931913339103035213603669852044733⟩, + ⟨1334339719287427306158582332896866896828103044641917635474791,1334339719287427306267507806875927155706455658712334318918982⟩, + ⟨773651376158511304958873977231431841002153581956034565662384,773651376158511305005623984821408610186789708751190374929516⟩, + ⟨-120129390782426617053399680064522351422282013021722218430710,-120129390782426616971212129950948059315164547904211147159698⟩, + ⟨266727266539863665214946223577192971143279068705982168455680,266727266539863665261306580827453238117149792516299431385307⟩] +lemma tr0_0_0_5_calc (r : Fin 8) : taylorRowBox 0 0 0 5 r = tr0_0_0_5 r := by + revert r + decide +kernel +def tr0_0_0_6 : Fin 8 → RI := ![⟨1964315290186501885162221415619325851992108091043888261438,1964315290186501890230979772513489484766016678683634025357⟩, + ⟨3216104658021610141806575263664805102954445640541373261477,3216104658021610145451852248989384097575217993041942395848⟩, + ⟨199721730118340535013592078098874128969747639454039020930590,199721730118340535089941228464863719049469920555680967767727⟩, + ⟨-82441031634189291399676907140286402505256829719340078977213,-82441031634189291371425774299849504219902078949254223166494⟩, + ⟨-174916808643277697598410777971405569953463476947519150357598,-174916808643277697517488688125935762662240016328567767290743⟩, + ⟨-150343866868917542610269322844277158124934145085826774381874,-150343866868917542575538160553073305698552655699781901023714⟩, + ⟨48665264576868693472061708946906319188627998667185870847112,48665264576868693533119862486496012566140584879723726578106⟩, + ⟨-102221903212858918026925038251693775054535047388845292821016,-102221903212858917992483352045064801466232263963170293144661⟩] +lemma tr0_0_0_6_calc (r : Fin 8) : taylorRowBox 0 0 0 6 r = tr0_0_0_6 r := by + revert r + decide +kernel +def tr0_0_0_7 : Fin 8 → RI := ![⟨58491102898710445852426035605814975726153196688249672566112,58491102898710445855552373341909147970262141623332683838193⟩, + ⟨-37448776453321247472690425124256959620446643122870050683506,-37448776453321247470442070360543951507281403173266931528103⟩, + ⟨864779603731521850459293646556267450553621349474986702089401,864779603731521850506384711685359299483063838675673049600821⟩, + ⟨-498855306566003550528713327227783647770570388879863518533615,-498855306566003550511288432121944681863551118850196920728345⟩, + ⟨-837422573775900003778216975101496029565744411474159549536735,-837422573775900003728305386236081194855660184858914276229580⟩, + ⟨-567519996209029152837529745628691904361721335818768454355553,-567519996209029152816108060939246614184066329031801764615382⟩, + ⟨141205059726866726646101224506034699483658509931941358525578,141205059726866726683761021258668067168657821014333189347718⟩, + ⟨-288389779632864447593076502644858943908824820750843098201532,-288389779632864447571833362668336726910144496785346880905832⟩] +lemma tr0_0_0_7_calc (r : Fin 8) : taylorRowBox 0 0 0 7 r = tr0_0_0_7 r := by + revert r + decide +kernel +def tr0_0_0_8 : Fin 8 → RI := ![⟨30763072631573175800243450571550513242569535257372355262129,30763072631573175802022025405726631151433881947813071181069⟩, + ⟨-21084148065618402895069614549519559190917941034142592196049,-21084148065618402893790524592315952305917170848946597209840⟩, + ⟨435057870624175325162019299104087195899528253546262952147666,435057870624175325188809425578993603986250056646565771167208⟩, + ⟨-249777948438764233599235328198466221063268059316467538574330,-249777948438764233589322298148826619896313525035387159416671⟩, + ⟨-419585978126755012212504840107516242178091923295760566960917,-419585978126755012184110116509692075109159370573879176321925⟩, + ⟨-284527348119613632037053181913488917424447766403048504354127,-284527348119613632024866376612759867633958386290545565690111⟩, + ⟨77801059232223445767920134991892234140031513802439562039465,77801059232223445789344808977548036241261228008898623129057⟩, + ⟨-151373632138106339028155957077886030912930186794438253199476,-151373632138106339016070725938284337148194037145038459725282⟩] +lemma tr0_0_0_8_calc (r : Fin 8) : taylorRowBox 0 0 0 8 r = tr0_0_0_8 r := by + revert r + decide +kernel +def tr0_0_0_9 : Fin 8 → RI := ![⟨-6317208415895189421503376314216729961455600568685858976992,-6317208415895189420509608790269123035881678770722207540183⟩, + ⟨4755985693107399414648461924737657620267526539427375750422,4755985693107399415363145409096837714088020768684995443741⟩, + ⟨-97669371574098591174599088309456297880422003857005709330411,-97669371574098591159630273311258724867546301410335968493090⟩, + ⟨59817689834703228911115338390128084413659531663954753085989,59817689834703228916654181703273393420704438656834566689954⟩, + ⟨97495021974685701882012509862251462264586686697573135790692,97495021974685701897877883430340126106155224068147951738803⟩, + ⟨63298916796669821880941718049646210794430726887230925475894,63298916796669821887751019011165485294463539909973062310750⟩, + ⟨-8660840132054647393979257184546010146169653818860730693209,-8660840132054647382008355084111252667775620345280721532221⟩, + ⟨23950591509078240641406734208208717824742542956771546232947,23950591509078240648159281244840925619353777382005444213404⟩] +lemma tr0_0_0_9_calc (r : Fin 8) : taylorRowBox 0 0 0 9 r = tr0_0_0_9 r := by + revert r + decide +kernel +def tr0_0_0_10 : Fin 8 → RI := ![⟨-17046203339343859340052358936676535554675622644552184907997,-17046203339343859339573508064129114287102421387006157678341⟩, + ⟨11658440396884611719266450810671022649939244318371948678253,11658440396884611719610823917896155444237020463505067174686⟩, + ⟨-246709102970326547589593538007667235889292849692974853435105,-246709102970326547582380754383568997030822622310401540896543⟩, + ⟨144773361787699658201246976072104024395890321218614428815113,144773361787699658203915889967441026741181010618663233847747⟩, + ⟨240650516382449062228150273957997118871222221689455850097258,240650516382449062235795067929723140679228831314611823533198⟩, + ⟨160742810436336105621579375004808578795139847724663319284181,160742810436336105624860464020380112689764400525209630436535⟩, + ⟨-37048836224391924867978012812518855424308594737735406552979,-37048836224391924862209785558307635899588331257651799261582⟩, + ⟨77626317199057980514510007885866981849802159279989991027351,77626317199057980517763749794804821055105795488072656676592⟩] +lemma tr0_0_0_10_calc (r : Fin 8) : taylorRowBox 0 0 0 10 r = tr0_0_0_10 r := by + revert r + decide +kernel +def tr0_0_0_11 : Fin 8 → RI := ![⟨-11676327879280772461333798056717898986960425589293821486825,-11676327879280772461117404082365855254119427414262467236366⟩, + ⟨6269614602744564553281120812012069614719049420397452905428,6269614602744564553436743928946332255984756676851487524214⟩, + ⟨-167063256076138048041343131948906271818128103950298995185128,-167063256076138048038083655974148046481920869223087189407513⟩, + ⟨97340214218289147180987543237849206557441741177140926132191,97340214218289147182193632477996562231164892990053273946656⟩, + ⟨162338705437383502051828462661926917092222490026728449283185,162338705437383502055283165254080757332798608404891990002327⟩, + ⟨108921063881184700169139093875027850735204598341849451504424,108921063881184700170621826669278415973047591761004360162163⟩, + ⟨-26784933098171201068894926375207381399899423407693860020873,-26784933098171201066288249240286176258476471146731010106016⟩, + ⟨54452171117154631815673256491254405580200601747861518808232,54452171117154631817143631055772446513177810351977893396517⟩] +lemma tr0_0_0_11_calc (r : Fin 8) : taylorRowBox 0 0 0 11 r = tr0_0_0_11 r := by + revert r + decide +kernel +def tr0_0_0_12 : Fin 8 → RI := ![⟨-5100218931937325323256383058734422794550241845423693792704,-5100218931937325323165295292377620724192766105084648516393⟩, + ⟨1448501915866153204387110074149365782818051111037622101996,1448501915866153204452617268411531637668381765014088967085⟩, + ⟨-72271774149173424051822263337167781234548886538726745046339,-72271774149173424050450236288247127847711996288999639524876⟩, + ⟨41906238027218011343180212709784721014261399983766524827879,41906238027218011343687897709983290443565542174781775018181⟩, + ⟨70045434886813400553189060071524265776876012689587765531394,70045434886813400554643264808456856882191636834349112922408⟩, + ⟨47120291696349198842938439911811355695174444490123819985443,47120291696349198843562573826522085570628272353724369763873⟩, + ⟨-12060173336968802674463764006635892424814113083015873811944,-12060173336968802673366522743127697673239609462303690989797⟩, + ⟨24068917686788897672612020944994434249044847787647429404893,24068917686788897673230952850057239962816338622309467163219⟩] +lemma tr0_0_0_12_calc (r : Fin 8) : taylorRowBox 0 0 0 12 r = tr0_0_0_12 r := by + revert r + decide +kernel +def tr0_0_0_13 : Fin 8 → RI := ![⟨-1719584989063483205177174433945517845793621709722876573328,-1719584989063483205139859057773660592171756719361647574266⟩, + ⟨415773315364664524490245947036680796407873565035994696998,415773315364664524517081884436688156719756523328085928593⟩, + ⟨-23939885009392314948815641722815089745999330328765281217308,-23939885009392314948253571672179560046240054392796874982731⟩, + ⟨13798033071993787147305899444965039655480343867264944296542,13798033071993787147513879698701834433289396104894172279760⟩, + ⟨23127904812381173676066607066925362720995019210133829900640,23127904812381173676662342355646633451595180165236155851653⟩, + ⟨15587506973168430910094618039136475613173318348958857535383,15587506973168430910350303217734473740907282814269795136991⟩, + ⟨-4141939113787536645594916053911323414464111655247330510976,-4141939113787536645145415839593366692934387235358442484130⟩, + ⟨8123803106624551287658293936159851184094774746838879634505,8123803106624551287911848038822951078209827040327167612341⟩] +lemma tr0_0_0_13_calc (r : Fin 8) : taylorRowBox 0 0 0 13 r = tr0_0_0_13 r := by + revert r + decide +kernel +def tr0_0_0_14 : Fin 8 → RI := ![⟨-529937975686116991900759230891986564143672126509202960942,-529937975686116991886249377794794214233147870069407511714⟩, + ⟨751475133540229161797880664450467151412577886250570402610,751475133540229161808315652633527444266979492877887957377⟩, + ⟨-7073979010062790300734612657465185732198820454938728508375,-7073979010062790300516055196661544062444726648015773390858⟩, + ⟨4032712565788352436658751689052784772281235125252302937983,4032712565788352436739623523626764424371587424830581006322⟩, + ⟨6794709992560023794373781541154788238438211113027128450300,6794709992560023794605429521449820455598898378093638374396⟩, + ⟨4582190100567610831547157174104728303259732613901550412829,4582190100567610831646578773487746093373589740896194738867⟩, + ⟨-1269412072119566604997741142795013155225329320808206980474,-1269412072119566604822955766201848987844726279264117562274⟩, + ⟨2442044503361454520553467961348682817022458260519457997401,2442044503361454520652060905042679661190199577138804189895⟩] +lemma tr0_0_0_14_calc (r : Fin 8) : taylorRowBox 0 0 0 14 r = tr0_0_0_14 r := by + revert r + decide +kernel +def tr0_0_0_15 : Fin 8 → RI := ![⟨-180262593946666001553101338391627023037337469131380706360,-180262593946666001547678214615888787273206430259797057789⟩, + ⟨705775493707539539170077895055516744097303502221240482017,705775493707539539173978019483796896972346988110028013776⟩, + ⟨-2240100139145552601111494253700573472519720006188866365681,-2240100139145552601029807405866214015465720151632230099740⟩, + ⟨1255158290959608403045875312675821615894031618002963456309,1255158290959608403076101529711091968590592388696285231680⟩, + ⟨2132482822101919960789472810169463686187336073907287108451,2132482822101919960876052299370693571207200358388681752882⟩, + ⟨1435523292825944866297034102903121802545483706290571525259,1435523292825944866334193379142810835298068392410473106115⟩, + ⟨-413199268435074891186750218069646475952526418272527190289,-413199268435074891121423386357104741995587254673033727073⟩, + ⟨780992849925438481929037919655139349277216505722007949515,780992849925438481965887482051495421497837654745907606234⟩] +lemma tr0_0_0_15_calc (r : Fin 8) : taylorRowBox 0 0 0 15 r = tr0_0_0_15 r := by + revert r + decide +kernel +def tr0_0_0_16 : Fin 8 → RI := ![⟨-70646741320274681152931209701308130465108723783982282656,-70646741320274681151114557807747243760225607261753933247⟩, + ⟨311993036178078131300533673998657279230306586733287489065,311993036178078131301840147669691058166808313722353578930⟩, + ⟨-821818252882863284288001960334996811775943354895121913032,-821818252882863284260638290809103869034022414365781961441⟩, + ⟨453166905097450521449443589145048758590378369436317641680,453166905097450521459568844751043739637927697673128291292⟩, + ⟨775969278794149510748523507027159478305205621636600642385,775969278794149510777526126090476649459033188949136245447⟩, + ⟨520658337475351699411116186535967097497851160147030347507,520658337475351699423563896073075410598198691901407631704⟩, + ⟨-152782525211649212861674332298732952406920503387607118138,-152782525211649212839790982878999738533391651219375960683⟩, + ⟨286247630648574929646634885797108429111237707468550260346,286247630648574929658978846597656226480057708296193486296⟩] +lemma tr0_0_0_16_calc (r : Fin 8) : taylorRowBox 0 0 0 16 r = tr0_0_0_16 r := by + revert r + decide +kernel +def tr0_0_0_17 : Fin 8 → RI := ![⟨-28072272846951836764922627383522440464430894801990327770,-28072272846951836764414561816696231388853549765585592380⟩, + ⟨28049984189099274045059869318805452162570597916393060629,28049984189099274045425252631134078638315746645381485353⟩, + ⟨-314673842506490431784070487494455591395913057128721876493,-314673842506490431776417651903115523334498738773160654219⟩, + ⟨171960314552655345414765081118108886246638222523475273503,171960314552655345417596825464372274275514278236121539381⟩, + ⟨295769662666442079806626126174139008467805110026682779028,295769662666442079814737329066711922012199342089786507626⟩, + ⟨197946026424584299756696418088765006726713130335411165900,197946026424584299760177686362601550449384685447778020849⟩, + ⟨-58286259988346729012032055434770193556503286968426585737,-58286259988346729005911908605098521675496032906388985546⟩, + ⟨109037584140931064201564696947935948188668590331549359509,109037584140931064205016949668030715262400436824649028078⟩] +lemma tr0_0_0_17_calc (r : Fin 8) : taylorRowBox 0 0 0 17 r = tr0_0_0_17 r := by + revert r + decide +kernel +def tr0_0_0_18 : Fin 8 → RI := ![⟨-10206208443900074057364951531964965746896806356282304729,-10206208443900074057172849351443032702334144494201450036⟩, + ⟨-33415771111297036224091286429627785844484747476623943108,-33415771111297036223953133136809430933307298090720927658⟩, + ⟨-112499732680328376534271657634874114600400084038655982054,-112499732680328376531378081489858179631918669114586732910⟩, + ⟨61230728363972173841376689904985781252162677661407754366,61230728363972173842447386876236882119147561520876513485⟩, + ⟨105528281139937179936778460895723343244675397457703464278,105528281139937179939845348053719048276792072862650727950⟩, + ⟨70526470091688242021844278198008399245115460468255721169,70526470091688242023160563477019507318154774327648751995⟩, + ⟨-20739417316750459810013513570082801001503945623581085731,-20739417316750459807699454858253916870929393570559711712⟩, + ⟨38824503839810975729800531069633928042804422860146670015,38824503839810975731105845419877702548509248502865301684⟩] +lemma tr0_0_0_18_calc (r : Fin 8) : taylorRowBox 0 0 0 18 r = tr0_0_0_18 r := by + revert r + decide +kernel +def tr0_0_0_19 : Fin 8 → RI := ![⟨-3319912727188716902985726861666258021770910876261058249,-3319912727188716902925739773332734061816307638042748200⟩, + ⟨3507921960787311741741676981350333449041904622011339195,3507921960787311741784817635752828270770395548906891184⟩, + ⟨-36370970121290621806499201582118749138411253654333286738,-36370970121290621805595634494336357505413540735873195224⟩, + ⟨19767258755075506817691114076483126059249996526294884469,19767258755075506818025456943484265413109620933925814844⟩, + ⟨34092699399081148135263895852776800393903323539042101020,34092699399081148136221582175523333393498545340454503480⟩, + ⟨22773285409829154771112630979855309820492835048466999468,22773285409829154771523662864499319749893249711410298293⟩, + ⟨-6688867330633045652945707854111247077403632360910548318,-6688867330633045652223104685431450075898360821687220004⟩, + ⟨12530068104863504831196158203238690344590955604961377257,12530068104863504831603764233624952032716912257858668651⟩] +lemma tr0_0_0_19_calc (r : Fin 8) : taylorRowBox 0 0 0 19 r = tr0_0_0_19 r := by + revert r + decide +kernel +def tr0_0_0_20 : Fin 8 → RI := ![⟨-991506277276553703540061355638566858147202024134972910,-991506277276553703522721067243082127556804157556992259⟩, + ⟨33126050848891842307574251095155523201906000525032131061,33126050848891842307586721635228246746489568440262906312⟩, + ⟨-10883040173460042234377584979844500984622232190557329380,-10883040173460042234116393541451935377535615597864109430⟩, + ⟨5917706646138368128599341437072930238802613251305548479,5917706646138368128695988930689199272806764318506701947⟩, + ⟨10203930988021550245462622019613260120882764262408059959,10203930988021550245739457543559762826153818446593627441⟩, + ⟨6818386692787811254060218807055078478995553437724776770,6818386692787811254179034565870354246251668656114741800⟩, + ⟨-2002525905641920967768412477245063114872381683441454310,-2002525905641920967559531738264494907645025420295326484⟩, + ⟨3752247592010364692932794417503737006791958244977074488,3752247592010364693050619874864475974676000653062721417⟩] +lemma tr0_0_0_20_calc (r : Fin 8) : taylorRowBox 0 0 0 20 r = tr0_0_0_20 r := by + revert r + decide +kernel +def tr0_0_0 : Fin 21 → Fin 8 → RI := ![tr0_0_0_0,tr0_0_0_1,tr0_0_0_2,tr0_0_0_3,tr0_0_0_4,tr0_0_0_5,tr0_0_0_6,tr0_0_0_7,tr0_0_0_8,tr0_0_0_9,tr0_0_0_10,tr0_0_0_11,tr0_0_0_12,tr0_0_0_13,tr0_0_0_14,tr0_0_0_15,tr0_0_0_16,tr0_0_0_17,tr0_0_0_18,tr0_0_0_19,tr0_0_0_20] +lemma tr0_0_0_mem (l : Fin 21) (r : Fin 8) : (tr0_0_0 l r).Mem (taylorRow 0 (nearNode 0) (nearDisplacement 0 0) l.val r) := by + have he : taylorRowBox 0 0 0 l r = tr0_0_0 l r := by + fin_cases l + · exact tr0_0_0_0_calc r + · exact tr0_0_0_1_calc r + · exact tr0_0_0_2_calc r + · exact tr0_0_0_3_calc r + · exact tr0_0_0_4_calc r + · exact tr0_0_0_5_calc r + · exact tr0_0_0_6_calc r + · exact tr0_0_0_7_calc r + · exact tr0_0_0_8_calc r + · exact tr0_0_0_9_calc r + · exact tr0_0_0_10_calc r + · exact tr0_0_0_11_calc r + · exact tr0_0_0_12_calc r + · exact tr0_0_0_13_calc r + · exact tr0_0_0_14_calc r + · exact tr0_0_0_15_calc r + · exact tr0_0_0_16_calc r + · exact tr0_0_0_17_calc r + · exact tr0_0_0_18_calc r + · exact tr0_0_0_19_calc r + · exact tr0_0_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 0 0 l r +def tr0_0_1_0 : Fin 8 → RI := ![⟨-310627079097082178072923986867761465837071218935033349773853,-310627079097082178063118274154035356158754197590155965641166⟩, + ⟨353829196146230030168047907444064791912456424396982714640031,353829196146230030175099839368987204335446960136762780186307⟩, + ⟨-483169025561007177509694290870217463910395993362159738691839,-483169025561007177361993851881727100628698146249150156641063⟩, + ⟨696790370593526751569004199663519520613599376826935327342040,696790370593526751623657129039898498341987982476803480155038⟩, + ⟨776720069120214335810638029134608472751440717954793103515595,776720069120214335967184999696320074536128050804987504525818⟩, + ⟨400251014916968479639782742773764022416132335844181590740213,400251014916968479706971544397951880890928862379172327314014⟩, + ⟨18843983881606130488631914581623292223121193130096760516819,18843983881606130606751317837848826285292126167312083414141⟩, + ⟨16573469530357650188739920338582793346555232044366137412890,16573469530357650255368719055320262986766741782515978285771⟩] +lemma tr0_0_1_0_calc (r : Fin 8) : taylorRowBox 0 0 1 0 r = tr0_0_1_0 r := by + revert r + decide +kernel +def tr0_0_1_1 : Fin 8 → RI := ![⟨-64810970262157298703772554107559692088673928385685301377442,-64810970262157298692834289152650758638337657977114136875196⟩, + ⟨35451251294094030492702942955324976517438578386846130780365,35451251294094030500569367568157322893084497862269584218027⟩, + ⟨-336782035691014382248162183968253954675720463993102011534431,-336782035691014382083402458412061487548933723583074750503616⟩, + ⟨394931271231936737481280510004858509165077145005780153020943,394931271231936737542245810492086366610001448742865353265669⟩, + ⟨416184336883695304089343451994581302717220429454876492162864,416184336883695304263971476682482995166597881916890011618547⟩, + ⟨85697311296417866161145768731041316428213437759606587564109,85697311296417866236094825021741692065552604934025140161199⟩, + ⟨8149259177356756356589135959297566172843693999598518343131,8149259177356756488351239014761275823283383869095245654658⟩, + ⟨-30626106585741779601730459232755974229889191011741241312746,-30626106585741779527406085750623940297918674249621991271283⟩] +lemma tr0_0_1_1_calc (r : Fin 8) : taylorRowBox 0 0 1 1 r = tr0_0_1_1 r := by + revert r + decide +kernel +def tr0_0_1_2 : Fin 8 → RI := ![⟨239522204081752900516235550487203828375631120988891783983947,239522204081752900527365616666776678858812650828053403304918⟩, + ⟨-159451040449110267647169552816616859367735830546809888906223,-159451040449110267639165191347994999016166829968082332957171⟩, + ⟨1666535864210167885860370666933481255769783134999083245687696,1666535864210167886028019435428117994029457642335508463820101⟩, + ⟨-1380979967538296985135890860369783436173480196485993283105659,-1380979967538296985073856540314182467828105199852579785478570⟩, + ⟨-1859068084469084587578322091598461687683524195868019118958844,-1859068084469084587400631984478217705474261228951905702158128⟩, + ⟨-908576948893789337138326965573797198414279888315333362040234,-908576948893789337062063686158772194497833750853919682235119⟩, + ⟨25090120990239926381838481850162951624735366018506468731309,25090120990239926515911018311990352463658735941954294787794⟩, + ⟨-118634622075890481193364118415346665268325789109881082984075,-118634622075890481117736475546199922811205190232054280932372⟩] +lemma tr0_0_1_2_calc (r : Fin 8) : taylorRowBox 0 0 1 2 r = tr0_0_1_2 r := by + revert r + decide +kernel +def tr0_0_1_3 : Fin 8 → RI := ![⟨3390275814967591034311514755831316023692537128397803917208,3390275814967591045161884109193704708001849069437897233590⟩, + ⟨-6243336948650992417177805007802594631376627492716829162514,-6243336948650992409374591893493747833521840946962133636182⟩, + ⟨-497398756531122888056716164798311624808205585963024049548669,-497398756531122887893280383694219722332262439521326618609446⟩, + ⟨215531977705961793179044014634254198567317303882961394877671,215531977705961793239519421904880118097175912276525687429803⟩, + ⟨461359523054432927925867490830871686255435241682973074254604,461359523054432928099092273285187572663105602115945952428763⟩, + ⟨310868335238695666362329622070944089077772566493955333185127,310868335238695666436676417170144119382598780653253854346420⟩, + ⟨-28240583021383660657403815233091913927831432656157786757738,-28240583021383660526700500684231793487260541955782982430666⟩, + ⟨82662311031408695552216252263838191469623073422539346073844,82662311031408695625943384270484350638744576477231472387595⟩] +lemma tr0_0_1_3_calc (r : Fin 8) : taylorRowBox 0 0 1 3 r = tr0_0_1_3 r := by + revert r + decide +kernel +def tr0_0_1_4 : Fin 8 → RI := ![⟨-185031285657076332464605074419830195088659723551767265979449,-185031285657076332455581219508545657401492238093222299116825⟩, + ⟨119788470406866064892907750929239696159749827416430231294132,119788470406866064899397397566522547283325368907068004159548⟩, + ⟨-1436656371599224983997528361428775758274347143376747905319325,-1436656371599224983861604806389814143200760083870811630478418⟩, + ⟨1105385996906680818623269711545959878291985413429294850708176,1105385996906680818673564893499778660807888664709707155621626⟩, + ⟨1542575271106656205438586599115733819579889220177810341117510,1542575271106656205582651308157709955727198950389813007416297⟩, + ⟨839792634656722166717384716863968292952811933899253292028994,839792634656722166779216224180696464018550611589481022607843⟩, + ⟨-106664617571168683784728503104699467976788049041047051386849,-106664617571168683676027342015918871076208204946513531756399⟩, + ⟨252894027454933840240109069366790782777886025890277081042603,252894027454933840301425225581540361077998923210870932943108⟩] +lemma tr0_0_1_4_calc (r : Fin 8) : taylorRowBox 0 0 1 4 r = tr0_0_1_4 r := by + revert r + decide +kernel +def tr0_0_1_5 : Fin 8 → RI := ![⟨132881602000468207936567738041831711059904584295522594118097,132881602000468207943390558702579374749720188920510599966651⟩, + ⟨-88691651882274763664201804201493040298428275137718012221383,-88691651882274763659295065829271395605548526651961687486577⟩, + ⟨1287906440747212684367673912281426749285885463047549287574567,1287906440747212684470443964406488977185112584941000067131692⟩, + ⟨-893875095641785585849209986931913339103035213603669852044740,-893875095641785585811182446602686164035627165857675921712010⟩, + ⟨-1334339719287427306267507806875927155706455658712334318918993,-1334339719287427306158582332896866896828103044641917635474799⟩, + ⟨-773651376158511305005623984821408610186789708751190374929522,-773651376158511304958873977231431841002153581956034565662388⟩, + ⟨120129390782426616971212129950948059315164547904211147159699,120129390782426617053399680064522351422282013021722218430711⟩, + ⟨-266727266539863665261306580827453238117149792516299431385309,-266727266539863665214946223577192971143279068705982168455681⟩] +lemma tr0_0_1_5_calc (r : Fin 8) : taylorRowBox 0 0 1 5 r = tr0_0_1_5 r := by + revert r + decide +kernel +def tr0_0_1_6 : Fin 8 → RI := ![⟨1964315290186501885162221415619325851992108091043888261439,1964315290186501890230979772513489484766016678683634025357⟩, + ⟨3216104658021610141806575263664805102954445640541373261478,3216104658021610145451852248989384097575217993041942395848⟩, + ⟨199721730118340535013592078098874128969747639454039020930592,199721730118340535089941228464863719049469920555680967767729⟩, + ⟨-82441031634189291399676907140286402505256829719340078977213,-82441031634189291371425774299849504219902078949254223166494⟩, + ⟨-174916808643277697598410777971405569953463476947519150357600,-174916808643277697517488688125935762662240016328567767290744⟩, + ⟨-150343866868917542610269322844277158124934145085826774381875,-150343866868917542575538160553073305698552655699781901023715⟩, + ⟨48665264576868693472061708946906319188627998667185870847113,48665264576868693533119862486496012566140584879723726578106⟩, + ⟨-102221903212858918026925038251693775054535047388845292821017,-102221903212858917992483352045064801466232263963170293144661⟩] +lemma tr0_0_1_6_calc (r : Fin 8) : taylorRowBox 0 0 1 6 r = tr0_0_1_6 r := by + revert r + decide +kernel +def tr0_0_1_7 : Fin 8 → RI := ![⟨-58491102898710445855552373341909147970262141623332683838193,-58491102898710445852426035605814975726153196688249672566112⟩, + ⟨37448776453321247470442070360543951507281403173266931528104,37448776453321247472690425124256959620446643122870050683506⟩, + ⟨-864779603731521850506384711685359299483063838675673049600831,-864779603731521850459293646556267450553621349474986702089407⟩, + ⟨498855306566003550511288432121944681863551118850196920728349,498855306566003550528713327227783647770570388879863518533620⟩, + ⟨837422573775900003728305386236081194855660184858914276229587,837422573775900003778216975101496029565744411474159549536744⟩, + ⟨567519996209029152816108060939246614184066329031801764615387,567519996209029152837529745628691904361721335818768454355559⟩, + ⟨-141205059726866726683761021258668067168657821014333189347719,-141205059726866726646101224506034699483658509931941358525579⟩, + ⟨288389779632864447571833362668336726910144496785346880905835,288389779632864447593076502644858943908824820750843098201536⟩] +lemma tr0_0_1_7_calc (r : Fin 8) : taylorRowBox 0 0 1 7 r = tr0_0_1_7 r := by + revert r + decide +kernel +def tr0_0_1_8 : Fin 8 → RI := ![⟨30763072631573175800243450571550513242569535257372355262130,30763072631573175802022025405726631151433881947813071181069⟩, + ⟨-21084148065618402895069614549519559190917941034142592196049,-21084148065618402893790524592315952305917170848946597209840⟩, + ⟨435057870624175325162019299104087195899528253546262952147670,435057870624175325188809425578993603986250056646565771167213⟩, + ⟨-249777948438764233599235328198466221063268059316467538574333,-249777948438764233589322298148826619896313525035387159416673⟩, + ⟨-419585978126755012212504840107516242178091923295760566960922,-419585978126755012184110116509692075109159370573879176321928⟩, + ⟨-284527348119613632037053181913488917424447766403048504354130,-284527348119613632024866376612759867633958386290545565690113⟩, + ⟨77801059232223445767920134991892234140031513802439562039466,77801059232223445789344808977548036241261228008898623129058⟩, + ⟨-151373632138106339028155957077886030912930186794438253199478,-151373632138106339016070725938284337148194037145038459725283⟩] +lemma tr0_0_1_8_calc (r : Fin 8) : taylorRowBox 0 0 1 8 r = tr0_0_1_8 r := by + revert r + decide +kernel +def tr0_0_1_9 : Fin 8 → RI := ![⟨6317208415895189420509608790269123035881678770722207540184,6317208415895189421503376314216729961455600568685858976992⟩, + ⟨-4755985693107399415363145409096837714088020768684995443741,-4755985693107399414648461924737657620267526539427375750422⟩, + ⟨97669371574098591159630273311258724867546301410335968493091,97669371574098591174599088309456297880422003857005709330412⟩, + ⟨-59817689834703228916654181703273393420704438656834566689955,-59817689834703228911115338390128084413659531663954753085989⟩, + ⟨-97495021974685701897877883430340126106155224068147951738804,-97495021974685701882012509862251462264586686697573135790692⟩, + ⟨-63298916796669821887751019011165485294463539909973062310751,-63298916796669821880941718049646210794430726887230925475894⟩, + ⟨8660840132054647382008355084111252667775620345280721532222,8660840132054647393979257184546010146169653818860730693209⟩, + ⟨-23950591509078240648159281244840925619353777382005444213404,-23950591509078240641406734208208717824742542956771546232947⟩] +lemma tr0_0_1_9_calc (r : Fin 8) : taylorRowBox 0 0 1 9 r = tr0_0_1_9 r := by + revert r + decide +kernel +def tr0_0_1_10 : Fin 8 → RI := ![⟨-17046203339343859340052358936676535554675622644552184907997,-17046203339343859339573508064129114287102421387006157678341⟩, + ⟨11658440396884611719266450810671022649939244318371948678254,11658440396884611719610823917896155444237020463505067174686⟩, + ⟨-246709102970326547589593538007667235889292849692974853435108,-246709102970326547582380754383568997030822622310401540896545⟩, + ⟨144773361787699658201246976072104024395890321218614428815115,144773361787699658203915889967441026741181010618663233847749⟩, + ⟨240650516382449062228150273957997118871222221689455850097261,240650516382449062235795067929723140679228831314611823533201⟩, + ⟨160742810436336105621579375004808578795139847724663319284183,160742810436336105624860464020380112689764400525209630436538⟩, + ⟨-37048836224391924867978012812518855424308594737735406552979,-37048836224391924862209785558307635899588331257651799261582⟩, + ⟨77626317199057980514510007885866981849802159279989991027352,77626317199057980517763749794804821055105795488072656676593⟩] +lemma tr0_0_1_10_calc (r : Fin 8) : taylorRowBox 0 0 1 10 r = tr0_0_1_10 r := by + revert r + decide +kernel +def tr0_0_1_11 : Fin 8 → RI := ![⟨11676327879280772461117404082365855254119427414262467236367,11676327879280772461333798056717898986960425589293821486825⟩, + ⟨-6269614602744564553436743928946332255984756676851487524214,-6269614602744564553281120812012069614719049420397452905428⟩, + ⟨167063256076138048038083655974148046481920869223087189407516,167063256076138048041343131948906271818128103950298995185131⟩, + ⟨-97340214218289147182193632477996562231164892990053273946658,-97340214218289147180987543237849206557441741177140926132192⟩, + ⟨-162338705437383502055283165254080757332798608404891990002330,-162338705437383502051828462661926917092222490026728449283186⟩, + ⟨-108921063881184700170621826669278415973047591761004360162165,-108921063881184700169139093875027850735204598341849451504425⟩, + ⟨26784933098171201066288249240286176258476471146731010106017,26784933098171201068894926375207381399899423407693860020873⟩, + ⟨-54452171117154631817143631055772446513177810351977893396518,-54452171117154631815673256491254405580200601747861518808232⟩] +lemma tr0_0_1_11_calc (r : Fin 8) : taylorRowBox 0 0 1 11 r = tr0_0_1_11 r := by + revert r + decide +kernel +def tr0_0_1_12 : Fin 8 → RI := ![⟨-5100218931937325323256383058734422794550241845423693792704,-5100218931937325323165295292377620724192766105084648516393⟩, + ⟨1448501915866153204387110074149365782818051111037622101997,1448501915866153204452617268411531637668381765014088967085⟩, + ⟨-72271774149173424051822263337167781234548886538726745046340,-72271774149173424050450236288247127847711996288999639524876⟩, + ⟨41906238027218011343180212709784721014261399983766524827880,41906238027218011343687897709983290443565542174781775018182⟩, + ⟨70045434886813400553189060071524265776876012689587765531395,70045434886813400554643264808456856882191636834349112922409⟩, + ⟨47120291696349198842938439911811355695174444490123819985444,47120291696349198843562573826522085570628272353724369763874⟩, + ⟨-12060173336968802674463764006635892424814113083015873811944,-12060173336968802673366522743127697673239609462303690989797⟩, + ⟨24068917686788897672612020944994434249044847787647429404894,24068917686788897673230952850057239962816338622309467163219⟩] +lemma tr0_0_1_12_calc (r : Fin 8) : taylorRowBox 0 0 1 12 r = tr0_0_1_12 r := by + revert r + decide +kernel +def tr0_0_1_13 : Fin 8 → RI := ![⟨1719584989063483205139859057773660592171756719361647574267,1719584989063483205177174433945517845793621709722876573328⟩, + ⟨-415773315364664524517081884436688156719756523328085928593,-415773315364664524490245947036680796407873565035994696998⟩, + ⟨23939885009392314948253571672179560046240054392796874982732,23939885009392314948815641722815089745999330328765281217308⟩, + ⟨-13798033071993787147513879698701834433289396104894172279760,-13798033071993787147305899444965039655480343867264944296542⟩, + ⟨-23127904812381173676662342355646633451595180165236155851653,-23127904812381173676066607066925362720995019210133829900640⟩, + ⟨-15587506973168430910350303217734473740907282814269795136991,-15587506973168430910094618039136475613173318348958857535383⟩, + ⟨4141939113787536645145415839593366692934387235358442484131,4141939113787536645594916053911323414464111655247330510976⟩, + ⟨-8123803106624551287911848038822951078209827040327167612341,-8123803106624551287658293936159851184094774746838879634505⟩] +lemma tr0_0_1_13_calc (r : Fin 8) : taylorRowBox 0 0 1 13 r = tr0_0_1_13 r := by + revert r + decide +kernel +def tr0_0_1_14 : Fin 8 → RI := ![⟨-529937975686116991900759230891986564143672126509202960942,-529937975686116991886249377794794214233147870069407511714⟩, + ⟨751475133540229161797880664450467151412577886250570402611,751475133540229161808315652633527444266979492877887957377⟩, + ⟨-7073979010062790300734612657465185732198820454938728508375,-7073979010062790300516055196661544062444726648015773390858⟩, + ⟨4032712565788352436658751689052784772281235125252302937984,4032712565788352436739623523626764424371587424830581006322⟩, + ⟨6794709992560023794373781541154788238438211113027128450301,6794709992560023794605429521449820455598898378093638374396⟩, + ⟨4582190100567610831547157174104728303259732613901550412830,4582190100567610831646578773487746093373589740896194738867⟩, + ⟨-1269412072119566604997741142795013155225329320808206980474,-1269412072119566604822955766201848987844726279264117562274⟩, + ⟨2442044503361454520553467961348682817022458260519457997402,2442044503361454520652060905042679661190199577138804189895⟩] +lemma tr0_0_1_14_calc (r : Fin 8) : taylorRowBox 0 0 1 14 r = tr0_0_1_14 r := by + revert r + decide +kernel +def tr0_0_1_15 : Fin 8 → RI := ![⟨180262593946666001547678214615888787273206430259797057790,180262593946666001553101338391627023037337469131380706360⟩, + ⟨-705775493707539539173978019483796896972346988110028013776,-705775493707539539170077895055516744097303502221240482017⟩, + ⟨2240100139145552601029807405866214015465720151632230099741,2240100139145552601111494253700573472519720006188866365681⟩, + ⟨-1255158290959608403076101529711091968590592388696285231680,-1255158290959608403045875312675821615894031618002963456309⟩, + ⟨-2132482822101919960876052299370693571207200358388681752882,-2132482822101919960789472810169463686187336073907287108451⟩, + ⟨-1435523292825944866334193379142810835298068392410473106115,-1435523292825944866297034102903121802545483706290571525259⟩, + ⟨413199268435074891121423386357104741995587254673033727074,413199268435074891186750218069646475952526418272527190289⟩, + ⟨-780992849925438481965887482051495421497837654745907606234,-780992849925438481929037919655139349277216505722007949515⟩] +lemma tr0_0_1_15_calc (r : Fin 8) : taylorRowBox 0 0 1 15 r = tr0_0_1_15 r := by + revert r + decide +kernel +def tr0_0_1_16 : Fin 8 → RI := ![⟨-70646741320274681152931209701308130465108723783982282656,-70646741320274681151114557807747243760225607261753933247⟩, + ⟨311993036178078131300533673998657279230306586733287489066,311993036178078131301840147669691058166808313722353578930⟩, + ⟨-821818252882863284288001960334996811775943354895121913032,-821818252882863284260638290809103869034022414365781961441⟩, + ⟨453166905097450521449443589145048758590378369436317641681,453166905097450521459568844751043739637927697673128291292⟩, + ⟨775969278794149510748523507027159478305205621636600642386,775969278794149510777526126090476649459033188949136245447⟩, + ⟨520658337475351699411116186535967097497851160147030347508,520658337475351699423563896073075410598198691901407631704⟩, + ⟨-152782525211649212861674332298732952406920503387607118138,-152782525211649212839790982878999738533391651219375960683⟩, + ⟨286247630648574929646634885797108429111237707468550260347,286247630648574929658978846597656226480057708296193486296⟩] +lemma tr0_0_1_16_calc (r : Fin 8) : taylorRowBox 0 0 1 16 r = tr0_0_1_16 r := by + revert r + decide +kernel +def tr0_0_1_17 : Fin 8 → RI := ![⟨28072272846951836764414561816696231388853549765585592381,28072272846951836764922627383522440464430894801990327770⟩, + ⟨-28049984189099274045425252631134078638315746645381485353,-28049984189099274045059869318805452162570597916393060629⟩, + ⟨314673842506490431776417651903115523334498738773160654220,314673842506490431784070487494455591395913057128721876493⟩, + ⟨-171960314552655345417596825464372274275514278236121539381,-171960314552655345414765081118108886246638222523475273503⟩, + ⟨-295769662666442079814737329066711922012199342089786507626,-295769662666442079806626126174139008467805110026682779028⟩, + ⟨-197946026424584299760177686362601550449384685447778020849,-197946026424584299756696418088765006726713130335411165900⟩, + ⟨58286259988346729005911908605098521675496032906388985547,58286259988346729012032055434770193556503286968426585737⟩, + ⟨-109037584140931064205016949668030715262400436824649028078,-109037584140931064201564696947935948188668590331549359509⟩] +lemma tr0_0_1_17_calc (r : Fin 8) : taylorRowBox 0 0 1 17 r = tr0_0_1_17 r := by + revert r + decide +kernel +def tr0_0_1_18 : Fin 8 → RI := ![⟨-10206208443900074057364951531964965746896806356282304729,-10206208443900074057172849351443032702334144494201450036⟩, + ⟨-33415771111297036224091286429627785844484747476623943108,-33415771111297036223953133136809430933307298090720927658⟩, + ⟨-112499732680328376534271657634874114600400084038655982054,-112499732680328376531378081489858179631918669114586732910⟩, + ⟨61230728363972173841376689904985781252162677661407754367,61230728363972173842447386876236882119147561520876513485⟩, + ⟨105528281139937179936778460895723343244675397457703464279,105528281139937179939845348053719048276792072862650727950⟩, + ⟨70526470091688242021844278198008399245115460468255721170,70526470091688242023160563477019507318154774327648751995⟩, + ⟨-20739417316750459810013513570082801001503945623581085731,-20739417316750459807699454858253916870929393570559711712⟩, + ⟨38824503839810975729800531069633928042804422860146670016,38824503839810975731105845419877702548509248502865301684⟩] +lemma tr0_0_1_18_calc (r : Fin 8) : taylorRowBox 0 0 1 18 r = tr0_0_1_18 r := by + revert r + decide +kernel +def tr0_0_1_19 : Fin 8 → RI := ![⟨3319912727188716902925739773332734061816307638042748201,3319912727188716902985726861666258021770910876261058249⟩, + ⟨-3507921960787311741784817635752828270770395548906891184,-3507921960787311741741676981350333449041904622011339195⟩, + ⟨36370970121290621805595634494336357505413540735873195225,36370970121290621806499201582118749138411253654333286738⟩, + ⟨-19767258755075506818025456943484265413109620933925814844,-19767258755075506817691114076483126059249996526294884469⟩, + ⟨-34092699399081148136221582175523333393498545340454503480,-34092699399081148135263895852776800393903323539042101020⟩, + ⟨-22773285409829154771523662864499319749893249711410298293,-22773285409829154771112630979855309820492835048466999468⟩, + ⟨6688867330633045652223104685431450075898360821687220005,6688867330633045652945707854111247077403632360910548318⟩, + ⟨-12530068104863504831603764233624952032716912257858668651,-12530068104863504831196158203238690344590955604961377257⟩] +lemma tr0_0_1_19_calc (r : Fin 8) : taylorRowBox 0 0 1 19 r = tr0_0_1_19 r := by + revert r + decide +kernel +def tr0_0_1_20 : Fin 8 → RI := ![⟨-991506277276553703540061355638566858147202024134972910,-991506277276553703522721067243082127556804157556992259⟩, + ⟨33126050848891842307574251095155523201906000525032131062,33126050848891842307586721635228246746489568440262906312⟩, + ⟨-10883040173460042234377584979844500984622232190557329380,-10883040173460042234116393541451935377535615597864109430⟩, + ⟨5917706646138368128599341437072930238802613251305548480,5917706646138368128695988930689199272806764318506701947⟩, + ⟨10203930988021550245462622019613260120882764262408059960,10203930988021550245739457543559762826153818446593627441⟩, + ⟨6818386692787811254060218807055078478995553437724776771,6818386692787811254179034565870354246251668656114741800⟩, + ⟨-2002525905641920967768412477245063114872381683441454310,-2002525905641920967559531738264494907645025420295326484⟩, + ⟨3752247592010364692932794417503737006791958244977074489,3752247592010364693050619874864475974676000653062721417⟩] +lemma tr0_0_1_20_calc (r : Fin 8) : taylorRowBox 0 0 1 20 r = tr0_0_1_20 r := by + revert r + decide +kernel +def tr0_0_1 : Fin 21 → Fin 8 → RI := ![tr0_0_1_0,tr0_0_1_1,tr0_0_1_2,tr0_0_1_3,tr0_0_1_4,tr0_0_1_5,tr0_0_1_6,tr0_0_1_7,tr0_0_1_8,tr0_0_1_9,tr0_0_1_10,tr0_0_1_11,tr0_0_1_12,tr0_0_1_13,tr0_0_1_14,tr0_0_1_15,tr0_0_1_16,tr0_0_1_17,tr0_0_1_18,tr0_0_1_19,tr0_0_1_20] +lemma tr0_0_1_mem (l : Fin 21) (r : Fin 8) : (tr0_0_1 l r).Mem (taylorRow 0 (nearNode 0) (nearDisplacement 0 1) l.val r) := by + have he : taylorRowBox 0 0 1 l r = tr0_0_1 l r := by + fin_cases l + · exact tr0_0_1_0_calc r + · exact tr0_0_1_1_calc r + · exact tr0_0_1_2_calc r + · exact tr0_0_1_3_calc r + · exact tr0_0_1_4_calc r + · exact tr0_0_1_5_calc r + · exact tr0_0_1_6_calc r + · exact tr0_0_1_7_calc r + · exact tr0_0_1_8_calc r + · exact tr0_0_1_9_calc r + · exact tr0_0_1_10_calc r + · exact tr0_0_1_11_calc r + · exact tr0_0_1_12_calc r + · exact tr0_0_1_13_calc r + · exact tr0_0_1_14_calc r + · exact tr0_0_1_15_calc r + · exact tr0_0_1_16_calc r + · exact tr0_0_1_17_calc r + · exact tr0_0_1_18_calc r + · exact tr0_0_1_19_calc r + · exact tr0_0_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 0 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows01.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows01.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4a0f4ae0c1b565e9ea441d2c2e31a79d6ba1a25 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows01.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_1_0_0 : Fin 8 → RI := ![⟨36667751636365443939434531135596698870174490489317241911143,36667751636365443940845858708717326459367581500199434198900⟩, + ⟨-18492631635635764029498406287610906925035647960641436095545,-18492631635635764028483427952068908172679474522565510083336⟩, + ⟨-745537937317760844720165857638602368292625502816135098100454,-745537937317760844698907463863366616376624276963191837497255⟩, + ⟨420726516422740813222365049569636341531166550204027442469214,420726516422740813230231197440782384536878750966957205636611⟩, + ⟨706469331166926317214106066515242328673484006251263510532353,706469331166926317236637733770915719054228104314591754885604⟩, + ⟨240501608250212125705235742420881014091091484266233578734443,240501608250212125714906167318212105252783951746337172396300⟩, + ⟨7887414792121986597747444744014003187463176148367589675697,7887414792121986614748266162055072016658786841169803114391⟩, + ⟨-3479582196311526060369368168808262596827225045408801281712,-3479582196311526050779543998556839177502592504038835278964⟩] +lemma tr0_1_0_0_calc (r : Fin 8) : taylorRowBox 0 1 0 0 r = tr0_1_0_0 r := by + revert r + decide +kernel +def tr0_1_0_1 : Fin 8 → RI := ![⟨78456367257125253932634441677863799268540976718483802052919,78456367257125253933484987996551894447930284567310065106483⟩, + ⟨-39175101417029603944464924461414614859519804922783330422577,-39175101417029603943853240750847036637554800079177277586131⟩, + ⟨28682292642551406336655386410917606527810893604760091788550,28682292642551406349466904382798676598151805945238791936884⟩, + ⟨-248145753184494559384517666406584502902845547610632307255089,-248145753184494559379777078011319264263374122073609429349272⟩, + ⟨-102654684473742201685292492594082920195514821965193441611508,-102654684473742201671713627555753285692317773222918477743282⟩, + ⟨25981386350563464942498392620377852209376716625325595870737,25981386350563464948326341039802882075673762215861911952398⟩, + ⟨20198699006344749299620768194726420357213503968984456382139,20198699006344749309866430750401835757536397946375541859631⟩, + ⟨-27039521323354826532351037215183305695181124214466106189106,-27039521323354826526571663383189437164450854023733394297267⟩] +lemma tr0_1_0_1_calc (r : Fin 8) : taylorRowBox 0 1 0 1 r = tr0_1_0_1 r := by + revert r + decide +kernel +def tr0_1_0_2 : Fin 8 → RI := ![⟨31586147095377183641776614350646519809888733915241593135617,31586147095377183642214862582350267283498709704367735003349⟩, + ⟨-13765833694651822880450411182746311982864428901213271861218,-13765833694651822880135238100927606531078252593576093820787⟩, + ⟨524474986004527590556553721507094187279105249525510502506494,524474986004527590563154920023109785816630340003426215432692⟩, + ⟨-354118751710533434738874655649468986795945710322868696192556,-354118751710533434736432043840921731754920726400189055504720⟩, + ⟨-547483117763730682166868274257058660602960923308265348156828,-547483117763730682159871696338439628207821767765577017206959⟩, + ⟨-261119105051583029703140577855632311840840802807516988302859,-261119105051583029700137698372389823422917747923709288019666⟩, + ⟨4663922435787451834931609032154432712653208139035704951133,4663922435787451840210737750243858186055568705260776265784⟩, + ⟨-18063113467197594196392618711994616449215961529390788082985,-18063113467197594193414767528035881585304624000913557955881⟩] +lemma tr0_1_0_2_calc (r : Fin 8) : taylorRowBox 0 1 0 2 r = tr0_1_0_2 r := by + revert r + decide +kernel +def tr0_1_0_3 : Fin 8 → RI := ![⟨-27370899542945100632841216839751296841415264981510121658778,-27370899542945100632626023955432224390229070106777979848016⟩, + ⟨17667324330929251623348815348299425401089673385571824768434,17667324330929251623503574682443970977998036124400883694547⟩, + ⟨-104094566938304587192398913197111310705946414585295601430539,-104094566938304587189157528872346093783213530961460428539903⟩, + ⟨114472624103606159966074603670734871205656744859168467789422,114472624103606159967273998539634941342746929827258434394300⟩, + ⟨123329763748948961291437819304985973206120428724932848646559,123329763748948961294873346647111712418899739745160812194100⟩, + ⟨56784392347819949106483510031121645823197455192633081714214,56784392347819949107958012951115728497809724746892501730176⟩, + ⟨-21921161981145559323209854718975841618209738061930551292393,-21921161981145559320617645890248310020919034191198410041138⟩, + ⟨36186917344754032498269584329527720789068670276344951722992,36186917344754032499731797611818241584083655738224285747095⟩] +lemma tr0_1_0_3_calc (r : Fin 8) : taylorRowBox 0 1 0 3 r = tr0_1_0_3 r := by + revert r + decide +kernel +def tr0_1_0_4 : Fin 8 → RI := ![⟨-15610403084819536344418063569797128958583373606055060805766,-15610403084819536344318719108968885232927077433005052261325⟩, + ⟨10227989961471113047117890730857158575141988786392156500262,10227989961471113047189335856267040527276366496696118661894⟩, + ⟨-170833617999880002459385865159059930730074139952305762329053,-170833617999880002457889470057119282133700922577240973617706⟩, + ⟨117152885978998741644788472511706985296817353250174206111825,117152885978998741645342176863748968525743496659884506770566⟩, + ⟨177745359723477243131602560445381659005393201774350620277281,177745359723477243133188582271866041658382013728033495903491⟩, + ⟨97175418919784318524331966207847915111462458797487070214425,97175418919784318525012675042759838503563980676285668558070⟩, + ⟨-11089991566401147405188411430214162023487823021018790068069,-11089991566401147403991710204510922769582081428728249470256⟩, + ⟨24545522397302410187788130633177323844006070397065160426479,24545522397302410188463165918875952258923273426187495895737⟩] +lemma tr0_1_0_4_calc (r : Fin 8) : taylorRowBox 0 1 0 4 r = tr0_1_0_4 r := by + revert r + decide +kernel +def tr0_1_0_5 : Fin 8 → RI := ![⟨5366947453689596886902627540992937500069467038886345124913,5366947453689596886953203646805792147658825163093088389482⟩, + ⟨-3122692817381289079573566758693400722437880290165475908020,-3122692817381289079537194159832754624614615913610618890436⟩, + ⟨53889434651892655447717006784703785641388824995627088068032,53889434651892655448478819133170652702650530589776651758245⟩, + ⟨-35958233986492085154667395001109578309381061078902280076872,-35958233986492085154385505002798847654245752617167440787129⟩, + ⟨-54227858632047364402106230216675231908078670973745248914672,-54227858632047364401298789046432307155330326698036198763176⟩, + ⟨-34845261809283543889649171124591618234344502837454841282563,-34845261809283543889302623347633499704813370139768910657221⟩, + ⟨9433787178049331747857022616804282751695146196583246653322,9433787178049331748466261293206463694774645576722066819748⟩, + ⟨-18823334710062998972120138351723370396439398010064795187964,-18823334710062998971776478969471416848647834871331434628168⟩] +lemma tr0_1_0_5_calc (r : Fin 8) : taylorRowBox 0 1 0 5 r = tr0_1_0_5 r := by + revert r + decide +kernel +def tr0_1_0_6 : Fin 8 → RI := ![⟨3660875032850397659066803259122509923548610020249276574780,3660875032850397659085650365276566388676689749009645946774⟩, + ⟨-2635845459484298221056905781029942912736647829962324227767,-2635845459484298221043351589366512974513032555720000901715⟩, + ⟨42578715477774887054357362729138351916300162148680987423167,42578715477774887054641250900638313176526080491860409039455⟩, + ⟨-26849103725653314422123139622523748522887894026252691628922,-26849103725653314422018093758733793196781714402633663862881⟩, + ⟨-42529334195292693107997351235879905684388728968677365088943,-42529334195292693107696459555829899044421099194523212422022⟩, + ⟨-26436167553226887535686786687951344640959252251704127247187,-26436167553226887535557646204810900568594573655396147045096⟩, + ⟨5947808315889939992340943162452329119648903896719938067186,5947808315889939992567974995408601746421075165839871563389⟩, + ⟨-11683783415211453378705626752535641157675936856739477984284,-11683783415211453378577562625137981618694888827932487100985⟩] +lemma tr0_1_0_6_calc (r : Fin 8) : taylorRowBox 0 1 0 6 r = tr0_1_0_6 r := by + revert r + decide +kernel +def tr0_1_0_7 : Fin 8 → RI := ![⟨-800987194237922777235582982127887243147439824062840781866,-800987194237922777226043759747642386534388135056702120579⟩, + ⟨450285235837084792242383768141935813076229291746944130083,450285235837084792249244049366352346052433953017634161037⟩, + ⟨-12053509241143748958013909069325318626953252747398149564419,-12053509241143748957870222692387427334701836722201962533477⟩, + ⟨7136597573640517332614072011729648716069848927558065740872,7136597573640517332667239635790096314299773968399220936141⟩, + ⟨11790273411858611215840371305871764433472607863290991682756,11790273411858611215992663791768485106991311866788511175466⟩, + ⟨7996168436034369727520024677690554059601561124084828168007,7996168436034369727585387485992842559998448163232006872814⟩, + ⟨-1741309398069053040630020412835203900916430752774223158424,-1741309398069053040515111146410271379952615551019640684240⟩, + ⟨3889242859917504040113994404773571572505428015533835061436,3889242859917504040178812429368637185944080323210287613229⟩] +lemma tr0_1_0_7_calc (r : Fin 8) : taylorRowBox 0 1 0 7 r = tr0_1_0_7 r := by + revert r + decide +kernel +def tr0_1_0_8 : Fin 8 → RI := ![⟨-690595134498961246693686356557003733491258132814778629789,-690595134498961246689878944243399161435295455294031839302⟩, + ⟨516973611530855532748723738684317268584780651621128124097,516973611530855532751461898899823235580230413433587254118⟩, + ⟨-9286666840700880628257789581351982790443965880261267280452,-9286666840700880628200439699041738693692387975170493283537⟩, + ⟨5452738488855792084354413768481551779220951079671222718167,5452738488855792084375634687594241853408148250518992232820⟩, + ⟨9027772022464714158587419486904590391874562054616086469180,9027772022464714158648204345766810260797509891901727504888⟩, + ⟨6015033564661317942431614107062868652560096852886754533780,6015033564661317942457702518805229661263950198615992184569⟩, + ⟨-1580835499348021774759361590207808891077140260252080930371,-1580835499348021774713497583845719805621601015712687298582⟩, + ⟨3092578708722756905404748246006477319677371431481759205085,3092578708722756905430619216946599161540510850394593708742⟩] +lemma tr0_1_0_8_calc (r : Fin 8) : taylorRowBox 0 1 0 8 r = tr0_1_0_8 r := by + revert r + decide +kernel +def tr0_1_0_9 : Fin 8 → RI := ![⟨42910208310873920391926087071346241251706805853855741557,42910208310873920393223587124711060429867518212768087169⟩, + ⟨-42576203141535203146678112737123370210898056515692983642,-42576203141535203145744995245994125085569542456743039009⟩, + ⟨808532731109465971682163838958019484360156757703460489019,808532731109465971701707683760738666229595233759482909885⟩, + ⟨-494946793362503500065656017268985067948232120913728528633,-494946793362503500058424296243615952602160667417080770721⟩, + ⟨-811946147198431708465893148980428651951152412940214734832,-811946147198431708445178723770224817969052163023433461505⟩, + ⟨-534830631736771809029511979345727072706748503394606170150,-534830631736771809020621501289414752532158061782839999622⟩, + ⟨40262665303102569986587534859224413472930033251399259937,40262665303102570002217192432881963767239942304250762095⟩, + ⟨-176006461091658547958817969001562000365956276794834870261,-176006461091658547950001590997039662558077516232577468709⟩] +lemma tr0_1_0_9_calc (r : Fin 8) : taylorRowBox 0 1 0 9 r = tr0_1_0_9 r := by + revert r + decide +kernel +def tr0_1_0_10 : Fin 8 → RI := ![⟨96743965108006702269312690864524431980661177180114876899,96743965108006702269825557779882183264998405037719075561⟩, + ⟨-81846308241405850493402322480373526983843662101655237242,-81846308241405850493033486203145346917441193856876530049⟩, + ⟨1376494648810188845281760183372969423590085410713976115392,1376494648810188845289485340202238925386237443104720351784⟩, + ⟨-798227439636017022777205264156634922467891944125484745259,-798227439636017022774346759106851303369538878625336853300⟩, + ⟨-1334314646597636279661559133904888289224377877110679111184,-1334314646597636279653371278086937812548013887103352643495⟩, + ⟨-898079377685937056333203418175415438128853428844742311020,-898079377685937056329689251031956719692769048550582867540⟩, + ⟨227293343760666674169133754596100175926149848365806494058,227293343760666674175311738364175312811876881456496283573⟩, + ⟨-457034217821760945158035808825753230614517945748114033715,-457034217821760945154550931441597193024761432402644236482⟩] +lemma tr0_1_0_10_calc (r : Fin 8) : taylorRowBox 0 1 0 10 r = tr0_1_0_10 r := by + revert r + decide +kernel +def tr0_1_0_11 : Fin 8 → RI := ![⟨11260413815479302503084300203752627594840747053593376999,11260413815479302503252397522986052548421066753025197349⟩, + ⟨669474575975885951000043352670520190595606783425711849,669474575975885951120933173374033541277494324004569233⟩, + ⟨147719465712753977259267145353702704598821858420187021733,147719465712753977261799143645617778707843866237771426239⟩, + ⟨-81404419794718438643281274796450663445414197521963656445,-81404419794718438642344370852246667792737895473508151525⟩, + ⟨-139318351735926723369106863953327990847319441793756630817,-139318351735926723366423211387634079047933424491796878925⟩, + ⟨-96791263653938105616308059645802416458587879196981024085,-96791263653938105615156255818307648705924196294792539621⟩, + ⟨35581824663042146805716429144030992077737469423604823367,35581824663042146807741325815395853532550162903632664937⟩, + ⟨-61309126095186619549195291958412269651052145741205914811,-61309126095186619548053088145687305893398108080726764055⟩] +lemma tr0_1_0_11_calc (r : Fin 8) : taylorRowBox 0 1 0 11 r = tr0_1_0_11 r := by + revert r + decide +kernel +def tr0_1_0_12 : Fin 8 → RI := ![⟨-7051007249028052497918527266386528590767090965653117055,-7051007249028052497865620653037834521203108867045119902⟩, + ⟨10493627196322812962691804325586635402518295806592871345,10493627196322812962729852945464609478674004409976085099⟩, + ⟨-101158786278514477002740867569844974546453996855017793866,-101158786278514477001943951502168014544360141016367982797⟩, + ⟨59248645416772248467387318428700396339990301029235167582,59248645416772248467682197698309877512235061988231857256⟩, + ⟨98587552632408672292301604154783110078510517823205057265,98587552632408672293146251584634368617801493763638823591⟩, + ⟨65818060137994530888608681699717517912232173677310410840,65818060137994530888971198127879682967230047308947803625⟩, + ⟨-15013801544323865137659277076905681245441021546538502975,-15013801544323865137021965156903756769350935182456519406⟩, + ⟨31660813666356331811114756743113092857698855381109729486,31660813666356331811474251681885908775295421664916776544⟩] +lemma tr0_1_0_12_calc (r : Fin 8) : taylorRowBox 0 1 0 12 r = tr0_1_0_12 r := by + revert r + decide +kernel +def tr0_1_0_13 : Fin 8 → RI := ![⟨-2182419302896417584321076234016860082126303284769409141,-2182419302896417584305797938290094741609500120816499259⟩, + ⟨266066239433862070054144102134362288430647250506496511,266066239433862070065131727871565869269102739554979801⟩, + ⟨-30569274857573150576048067747562811860480608074923833812,-30569274857573150575817935471449394783083836980491183459⟩, + ⟨17552050894157181713334653247849282019883943294392830688,17552050894157181713419808059309870788770471474323800274⟩, + ⟨29473089036262520360772022394825401202519444696653728391,29473089036262520361015938465072450425264263637756011238⟩, + ⟨19964887112411507955898931499079917353103018246843300453,19964887112411507956003618471929106717847524414681971676⟩, + ⟨-5538307131037668170909648757779864105524455034595020123,-5538307131037668170725606737929736573389079175131885982⟩, + ⟨10679779218840370657881578860189386320047974881503083454,10679779218840370657985393291679499794340039602113263891⟩] +lemma tr0_1_0_13_calc (r : Fin 8) : taylorRowBox 0 1 0 13 r = tr0_1_0_13 r := by + revert r + decide +kernel +def tr0_1_0_14 : Fin 8 → RI := ![⟨52500794248770538073684951904500823307026125341326625,52500794248770538078274550809923820036401134340216973⟩, + ⟨-1374552083614232740976014963774860611128100721024924707,-1374552083614232740972714281816594393601836329501483845⟩, + ⟨734379242888921799603883658327291278263143447043218535,734379242888921799673015377037760266785035330867750168⟩, + ⟨-470157722461175443109487493111927183660080810865412681,-470157722461175443083906994053126268161470082486987560⟩, + ⟨-752388981746563096275015881517555224024940031908545288,-752388981746563096201743512069723255746743881174861376⟩, + ⟨-453732807366298384235232972352434365431038863886510763,-453732807366298384203785013458397922938835923600837282⟩, + ⟨-42881017371225483593379880943561842748328186923385417,-42881017371225483538093671801327642592798035910649570⟩, + ⟨-57196248250194626361301964306703649354196702715041296,-57196248250194626330116116771242727563524399387946385⟩] +lemma tr0_1_0_14_calc (r : Fin 8) : taylorRowBox 0 1 0 14 r = tr0_1_0_14 r := by + revert r + decide +kernel +def tr0_1_0_15 : Fin 8 → RI := ![⟨124131133194411859917699062891458144050321433679596109,124131133194411859918953529868713387956016395691826398⟩, + ⟨-117992287419068630630977409048016106977540764140082054,-117992287419068630630075239467507647146364058223831619⟩, + ⟨1755008299461282751675842727959967673155868268217540902,1755008299461282751694738378754465658101160318062985161⟩, + ⟨-1018755058820306626640978448058696050505864440615217183,-1018755058820306626633986575350153648907670355421665021⟩, + ⟨-1702109925380351949090867329713091832836725346068728844,-1702109925380351949070839922152615980607191051919651522⟩, + ⟨-1142874464315993562253985401816712593084336504505748643,-1142874464315993562245389786655881459404216985704285901⟩, + ⟨284846400519110464638508751012766385119916912763707776,284846400519110464653620033087350814490902630759078779⟩, + ⟨-575854869791541616504178429978315486938565465203014296,-575854869791541616495654457252744798658424098783999585⟩] +lemma tr0_1_0_15_calc (r : Fin 8) : taylorRowBox 0 1 0 15 r = tr0_1_0_15 r := by + revert r + decide +kernel +def tr0_1_0_16 : Fin 8 → RI := ![⟨18827014881676760043199288232705805043857839321731651,18827014881676760043507243879073836475988418275711650⟩, + ⟨180398887572936131104682155699495950968337396401692115,180398887572936131104903626827349717210873930199053554⟩, + ⟨282971003167255077197205446463168193475313997857286837,282971003167255077201844087782153146112447570963813969⟩, + ⟨-164667558263205021623754921171773244392575701210755930,-164667558263205021622038505579924804159136120387228641⟩, + ⟨-274735428196375657109292540578716831787815982097102541,-274735428196375657104376067405470880759627481402608983⟩, + ⟨-186639726243850981266271575209954952206387663135719726,-186639726243850981264161461296463669329195957060140015⟩, + ⟨50973507111428065454824423065659464910343191677005872,50973507111428065458534050121022733343283120868248942⟩, + ⟨-99027025773718495388197525033711060339137463578156434,-99027025773718495386104998424456721167768985282711790⟩] +lemma tr0_1_0_16_calc (r : Fin 8) : taylorRowBox 0 1 0 16 r = tr0_1_0_16 r := by + revert r + decide +kernel +def tr0_1_0_17 : Fin 8 → RI := ![⟨-874819406614988023821743026602068970167802983018065,-874819406614988023742127946280124422380778632849785⟩, + ⟨40353529007187332456597679772511255314508806722462004,40353529007187332456654936204862449982884536602144141⟩, + ⟨-8495333300664300845190988336266587269761571817098872,-8495333300664300843991770833510716728368532747753737⟩, + ⟨4725059441519652261463501570077582274203642803365160,4725059441519652261907242630908696793491501832836519⟩, + ⟨8067250619278816572979305884654490375332103032252176,8067250619278816574250350631540895744676966791165099⟩, + ⟨5048597310768611174900648318834160656001418198160232,5048597310768611175446171320895498277248664000005110⟩, + ⟨-666372175528376616255109245453824104399185998184317,-666372175528376615296067709872627299358531409877906⟩, + ⟨1860413368342698700031719924694543633326173819140718,1860413368342698700572696120574826174413943338051382⟩] +lemma tr0_1_0_17_calc (r : Fin 8) : taylorRowBox 0 1 0 17 r = tr0_1_0_17 r := by + revert r + decide +kernel +def tr0_1_0_18 : Fin 8 → RI := ![⟨-386033744808238653236252893607102823975461785508200,-386033744808238653216693772332793425953243561747809⟩, + ⟨-16000482194764450724426940466866667828639640528156600,-16000482194764450724412874218367303747167187395022667⟩, + ⟨-6468097158705163310221855536058066518899650655567030,-6468097158705163309927242499484091921365275741693640⟩, + ⟨3887519714090988822815671401312383815700618390320113,3887519714090988822924685738646373230316447258927952⟩, + ⟨6389475550051253695103872852261912431753361647024783,6389475550051253695416131764128251877526132470018169⟩, + ⟨4297678781612785183501551367090678043406015908495832,4297678781612785183635570581942911041307447921088827⟩, + ⟨-973738384165222292460516093636585115756708612849131,-973738384165222292224907341803062438420535512356830⟩, + ⟨2059882295854390697700611793212860134882227697162377,2059882295854390697833513989366733787529639915992545⟩] +lemma tr0_1_0_18_calc (r : Fin 8) : taylorRowBox 0 1 0 18 r = tr0_1_0_18 r := by + revert r + decide +kernel +def tr0_1_0_19 : Fin 8 → RI := ![⟨14752073888763277672124070248606552843901289293219,14752073888763277676174781517586432095175746921378⟩, + ⟨-7295059201581024993105024984305855198695710728460522,-7295059201581024993102111851833807818428261006997519⟩, + ⟨-334674393890924266565151557920892102812904870104612,-334674393890924266504136938168667514137993937384739⟩, + ⟨259308637131807605760401989840535658777865261832287,259308637131807605782978955263690211201542146025205⟩, + ⟨381517813529104179812156301990172578422742449348368,381517813529104179876825398080851178420325874883511⟩, + ⟨266911295452883867748676033546100751732426432743011,266911295452883867776431531160050233026926763313170⟩, + ⟨-29410284589463303554044999152207238435698429584421,-29410284589463303505250218817138586021756255626996⟩, + ⟨96534260454273340794520512577312329720913717319229,96534260454273340822044674633615600874111100168807⟩] +lemma tr0_1_0_19_calc (r : Fin 8) : taylorRowBox 0 1 0 19 r = tr0_1_0_19 r := by + revert r + decide +kernel +def tr0_1_0_20 : Fin 8 → RI := ![⟨-4011961353142639861370808425507100445623806278637,-4011961353142639860296147620768828636834958623630⟩, + ⟨465280823551465769727816321712269368013219305782148,465280823551465769728589180866850563676992275554515⟩, + ⟨-99266901437445019240882583143091289320774981810657,-99266901437445019224695297501142376676864079846270⟩, + ⟨62590364992480977924374035324036514094916326974772,62590364992480977930363743851394780318924107593374⟩, + ⟨100640504773268035819903600813353003221431364566521,100640504773268035837060425437979143643687894553668⟩, + ⟨68502152267981240098314054414942089819640196783453,68502152267981240105677636615839720815223368543147⟩, + ⟨-13912050966358013400786408534721917675197948283886,-13912050966358013387841067723885216901166876981328⟩, + ⟨31472830367437723927178541294455547568361344145737,31472830367437723934480749766279076868924227957115⟩] +lemma tr0_1_0_20_calc (r : Fin 8) : taylorRowBox 0 1 0 20 r = tr0_1_0_20 r := by + revert r + decide +kernel +def tr0_1_0 : Fin 21 → Fin 8 → RI := ![tr0_1_0_0,tr0_1_0_1,tr0_1_0_2,tr0_1_0_3,tr0_1_0_4,tr0_1_0_5,tr0_1_0_6,tr0_1_0_7,tr0_1_0_8,tr0_1_0_9,tr0_1_0_10,tr0_1_0_11,tr0_1_0_12,tr0_1_0_13,tr0_1_0_14,tr0_1_0_15,tr0_1_0_16,tr0_1_0_17,tr0_1_0_18,tr0_1_0_19,tr0_1_0_20] +lemma tr0_1_0_mem (l : Fin 21) (r : Fin 8) : (tr0_1_0 l r).Mem (taylorRow 0 (nearNode 1) (nearDisplacement 1 0) l.val r) := by + have he : taylorRowBox 0 1 0 l r = tr0_1_0 l r := by + fin_cases l + · exact tr0_1_0_0_calc r + · exact tr0_1_0_1_calc r + · exact tr0_1_0_2_calc r + · exact tr0_1_0_3_calc r + · exact tr0_1_0_4_calc r + · exact tr0_1_0_5_calc r + · exact tr0_1_0_6_calc r + · exact tr0_1_0_7_calc r + · exact tr0_1_0_8_calc r + · exact tr0_1_0_9_calc r + · exact tr0_1_0_10_calc r + · exact tr0_1_0_11_calc r + · exact tr0_1_0_12_calc r + · exact tr0_1_0_13_calc r + · exact tr0_1_0_14_calc r + · exact tr0_1_0_15_calc r + · exact tr0_1_0_16_calc r + · exact tr0_1_0_17_calc r + · exact tr0_1_0_18_calc r + · exact tr0_1_0_19_calc r + · exact tr0_1_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 1 0 l r +def tr0_1_1_0 : Fin 8 → RI := ![⟨36667751636365443939434531135596698870174490489317241911143,36667751636365443940845858708717326459367581500199434198900⟩, + ⟨-18492631635635764029498406287610906925035647960641436095545,-18492631635635764028483427952068908172679474522565510083336⟩, + ⟨-745537937317760844720165857638602368292625502816135098100454,-745537937317760844698907463863366616376624276963191837497255⟩, + ⟨420726516422740813222365049569636341531166550204027442469214,420726516422740813230231197440782384536878750966957205636611⟩, + ⟨706469331166926317214106066515242328673484006251263510532353,706469331166926317236637733770915719054228104314591754885604⟩, + ⟨240501608250212125705235742420881014091091484266233578734443,240501608250212125714906167318212105252783951746337172396300⟩, + ⟨7887414792121986597747444744014003187463176148367589675697,7887414792121986614748266162055072016658786841169803114391⟩, + ⟨-3479582196311526060369368168808262596827225045408801281712,-3479582196311526050779543998556839177502592504038835278964⟩] +lemma tr0_1_1_0_calc (r : Fin 8) : taylorRowBox 0 1 1 0 r = tr0_1_1_0 r := by + revert r + decide +kernel +def tr0_1_1_1 : Fin 8 → RI := ![⟨-39228183628562626966742493998275947223965142283655032553242,-39228183628562626966317220838931899634270488359241901026459⟩, + ⟨19587550708514801971926620375423518318777400039588638793066,19587550708514801972232462230707307429759902461391665211289⟩, + ⟨-14341146321275703174733452191399338299075902972619395968442,-14341146321275703168327693205458803263905446802380045894275⟩, + ⟨124072876592247279689888539005659632131687061036804714674636,124072876592247279692258833203292251451422773805316153627545⟩, + ⟨51327342236871100835856813777876642846158886611459238871641,51327342236871100842646246297041460097757410982596720805755⟩, + ⟨-12990693175281732474163170519901441037836881107930955976199,-12990693175281732471249196310188926104688358312662797935368⟩, + ⟨-10099349503172374654933215375200917878768198973187770929816,-10099349503172374649810384097363210178606751984492228191069⟩, + ⟨13519760661677413263285831691594718582225427011866697148634,13519760661677413266175518607591652847590562107233053094554⟩] +lemma tr0_1_1_1_calc (r : Fin 8) : taylorRowBox 0 1 1 1 r = tr0_1_1_1 r := by + revert r + decide +kernel +def tr0_1_1_2 : Fin 8 → RI := ![⟨7896536773844295910444153587661629952472183478810398283904,7896536773844295910553715645587566820874677426091933750838⟩, + ⟨-3441458423662955720112602795686577995716107225303317965305,-3441458423662955720033809525231901632769563148394023455196⟩, + ⟨131118746501131897639138430376773546819776312381377625626624,131118746501131897640788730005777446454157585000856553858174⟩, + ⟨-88529687927633358684718663912367246698986427580717174048140,-88529687927633358684108010960230432938730181600047263876180⟩, + ⟨-136870779440932670541717068564264665150740230827066337039208,-136870779440932670539967924084609907051955441941394254301740⟩, + ⟨-65279776262895757425785144463908077960210200701879247075716,-65279776262895757425034424593097455855729436980927322004916⟩, + ⟨1165980608946862958732902258038608178163302034758926237783,1165980608946862960052684437560964546513892176315194066446⟩, + ⟨-4515778366799398549098154677998654112303990382347697020747,-4515778366799398548353691882008970396326156000228389488970⟩] +lemma tr0_1_1_2_calc (r : Fin 8) : taylorRowBox 0 1 1 2 r = tr0_1_1_2 r := by + revert r + decide +kernel +def tr0_1_1_3 : Fin 8 → RI := ![⟨3421362442868137579078252994429028048778633763347247481002,3421362442868137579105152104968912105176908122688765207348⟩, + ⟨-2208415541366156452937946835305496372249754515550110461819,-2208415541366156452918601918537428175136209173196478096054⟩, + ⟨13011820867288073398644691109043261722901691370182553567488,13011820867288073399049864149638913838243301823161950178818⟩, + ⟨-14309078012950769995909249817454367667843366228407304299288,-14309078012950769995759325458841858900707093107396058473677⟩, + ⟨-15416220468618620161859168330888964052362467468145101524263,-15416220468618620161429727413123246650765053590616606080819⟩, + ⟨-7098049043477493638494751618889466062226215593361562716272,-7098049043477493638310438753890205727899681899079135214276⟩, + ⟨2740145247643194915077205736281038752614879273899801255142,2740145247643194915401231839871980202276217257741318911550⟩, + ⟨-4523364668094254062466474701477280198010456967278035718387,-4523364668094254062283698041190965098633583784543118965374⟩] +lemma tr0_1_1_3_calc (r : Fin 8) : taylorRowBox 0 1 1 3 r = tr0_1_1_3 r := by + revert r + decide +kernel +def tr0_1_1_4 : Fin 8 → RI := ![⟨-975650192801221021526128973112320559911460850378441300361,-975650192801221021519919944310555327057942339562815766332⟩, + ⟨639249372591944565444868170678572410946374299149509781266,639249372591944565449333491016690032954772906043507416369⟩, + ⟨-10677101124992500153711616572441245670629633747019110145567,-10677101124992500153618091878569955133356307661077560851106⟩, + ⟨7322055373687421352799279531981686581051084578135887881989,7322055373687421352833886053984310532858968541242781673161⟩, + ⟨11109084982717327695725160027836353687837075110896913767330,11109084982717327695824286391991627603648875858002093493969⟩, + ⟨6073463682486519907770747887990494694466403674842941888401,6073463682486519907813292190172489906472748792267854284880⟩, + ⟨-693124472900071712824275714388385126467988938813674379255,-693124472900071712749481887781932673098880089295515591891⟩, + ⟨1534095149831400636736758164573582740250379399816572526655,1534095149831400636778947869929747016182704589136718493484⟩] +lemma tr0_1_1_4_calc (r : Fin 8) : taylorRowBox 0 1 1 4 r = tr0_1_1_4 r := by + revert r + decide +kernel +def tr0_1_1_5 : Fin 8 → RI := ![⟨-167717107927799902717287613962681004614338286346659012172,-167717107927799902715707110656029296877170844965198285153⟩, + ⟨97584150543165283735537317494773582019206747300331840326,97584150543165283736673961209168772576183759067671122126⟩, + ⟨-1684044832871645482764963097911582896957829080930520367446,-1684044832871645482741156462021993301293400781113346502126⟩, + ⟨1123694812077877661074547031337463989195179769286482524597,1123694812077877661083356093784674322168158158715696252403⟩, + ⟨1694620582251480137540587157701009598604072709313631211349,1694620582251480137565819694271100997127458467929539028584⟩, + ⟨1088914431540110746540706979613546865775417816867778458038,1088914431540110746551536597643488069823265713670463790081⟩, + ⟨-294805849314041617139570665412701990461707674272564588118,-294805849314041617120531956775133835990473318643226457916⟩, + ⟨588229209689468717868014967795981776520244839729107332130,588229209689468717878754323491355324888731187814524849624⟩] +lemma tr0_1_1_5_calc (r : Fin 8) : taylorRowBox 0 1 1 5 r = tr0_1_1_5 r := by + revert r + decide +kernel +def tr0_1_1_6 : Fin 8 → RI := ![⟨57201172388287463422918800923789217555447031566394946480,57201172388287463423213286957446349823073277328275717919⟩, + ⟨-41185085304442159704014152828592858011510122343161316059,-41185085304442159703802368583851765226766133683125014089⟩, + ⟨665292429340232610224333792642786748692190033573140428487,665292429340232610228769545322473643383220007685318891242⟩, + ⟨-419517245713333037845674056601933570670123344160198306702,-419517245713333037844032714980215518699714287541150997857⟩, + ⟨-664520846801448329812458613060623526318573890135583829515,-664520846801448329807757180559842172569079674914425194094⟩, + ⟨-413065118019170117745106041999239760014988316432876988238,-413065118019170117743088221950170321384290213365564797579⟩, + ⟨92934504935780312380327236913317642494514123386249032299,92934504935780312383874609303259402287829299466247993178⟩, + ⟨-182559115862678959042275418008369393088686513386554343505,-182559115862678959040274416017780962792107637936445110952⟩] +lemma tr0_1_1_6_calc (r : Fin 8) : taylorRowBox 0 1 1 6 r = tr0_1_1_6 r := by + revert r + decide +kernel +def tr0_1_1_7 : Fin 8 → RI := ![⟨6257712454983771697078466873028456144799907305130485317,6257712454983771697152992047874119087089373625490943609⟩, + ⟨-3517853404977224939447219135674627703534640257950266884,-3517853404977224939393623188608873539658041341773001016⟩, + ⟨94168040946435538733361114784276776052358099392202832292,94168040946435538734483664604104051773072287089048043473⟩, + ⟨-55754668544066541661462809654610127455466984128118913564,-55754668544066541661047437591637880594295694746547388600⟩, + ⟨-92111511030145400124942685873191289898369623959285243559,-92111511030145400123752900827123159636504748931960872521⟩, + ⟨-62470065906518513496760839734319082499987876275250053694,-62470065906518513496250192794457453590637196281912720062⟩, + ⟨13603979672414476879024305831330245155879808992340942845,13603979672414476879922034475275030475909615256048618426⟩, + ⟨-30384709843105500313896972104442478015188127525080371979,-30384709843105500313390581287293527910198656371358086417⟩] +lemma tr0_1_1_7_calc (r : Fin 8) : taylorRowBox 0 1 1 7 r = tr0_1_1_7 r := by + revert r + decide +kernel +def tr0_1_1_8 : Fin 8 → RI := ![⟨-2697637244136567369897212330300795833950227081307729023,-2697637244136567369882339625950777974356622872242311872⟩, + ⟨2019428170042404424799702104235614330409299420395031734,2019428170042404424810398042577434513985275052474950212⟩, + ⟨-36276042346487814954131990552156182775171741719770575315,-36276042346487814953907967574381791772235890528009739388⟩, + ⟨21299759722092937829509428783131061637581840154965713742,21299759722092937829592322998415007239875579103589813410⟩, + ⟨35264734462752789681982107370721056218260008025844087770,35264734462752789682219548225651602581240273015241123066⟩, + ⟨23496224861958273212623492605714330674062878331588884897,23496224861958273212725400464082928364312305463343719471⟩, + ⟨-6175138669328210057653756211749253480770079141609691135,-6175138669328210057474599936897342990709378967627684760⟩, + ⟨12080385580948269161737297835962802029989732154225621894,12080385580948269161838356316197652974767620509353881675⟩] +lemma tr0_1_1_8_calc (r : Fin 8) : taylorRowBox 0 1 1 8 r = tr0_1_1_8 r := by + revert r + decide +kernel +def tr0_1_1_9 : Fin 8 → RI := ![⟨-83809000607175625768014818602951289902084996509312671,-83809000607175625765480638811223127444739855183311995⟩, + ⟨83156646760810943644033193839832275557753012610826248,83156646760810943645855688939694082443160266632212859⟩, + ⟨-1579165490448175725979897819845192707479678190936490059,-1579165490448175725941726247964881805390931167389571267⟩, + ⟨966692955786139648551609953600812407426095053548985880,966692955786139648565734408728486460836390861159626033⟩, + ⟨1585832318746936930556989694863720347595805005905143479,1585832318746936930597447556602399710842094556523856904⟩, + ⟨1044591077610882439493401369705888188539371214419609374,1044591077610882439510765584659623188880368170692590177⟩, + ⟨-78638018170122207035580453970472585482890512312989770,-78638018170122207005053779021922682564316471194139179⟩, + ⟨343762619319645601464846857416093090933745148891752868,343762619319645601482066345706175781964758353114911856⟩] +lemma tr0_1_1_9_calc (r : Fin 8) : taylorRowBox 0 1 1 9 r = tr0_1_1_9 r := by + revert r + decide +kernel +def tr0_1_1_10 : Fin 8 → RI := ![⟨94476528425787795184875674672387140606114430839955934,94476528425787795185376521269416194594725004919647535⟩, + ⟨-79928035391997900872463205547239772445159826271147693,-79928035391997900872103013870259127849063665875855986⟩, + ⟨1344233055478700044220468929075165452724692783900367300,1344233055478700044228013027541248950572497503031953469⟩, + ⟨-779518984019547873805864515777963791472550726685043697,-779518984019547873803073006940284475946815311157555520⟩, + ⟨-1303041647068004179356991341703992469945681520615897570,-1303041647068004179348995388756775207566419811624367815⟩, + ⟨-877030642271422906575393963061929138797708426606193664,-877030642271422906571962159210895234074969773975178581⟩, + ⟨221966156016276048993294682222754078052880711294732904,221966156016276048999327869496264953917848517047359652⟩, + ⟨-446322478341563423005894344556399639271990181394642612,-446322478341563423002491143985934758813243586330707262⟩] +lemma tr0_1_1_10_calc (r : Fin 8) : taylorRowBox 0 1 1 10 r = tr0_1_1_10 r := by + revert r + decide +kernel +def tr0_1_1_11 : Fin 8 → RI := ![⟨-5498248933339503175416209728020533470908724000500585,-5498248933339503175334130958863587692793333522262391⟩, + ⟨-326891882800725562070768151061539815076901525392857,-326891882800725562011739918296152436814261124719585⟩, + ⟨-72128645367555652959862863108211806009689387811411830,-72128645367555652958626535817237648729893485556731944⟩, + ⟨39748251852889862618332212330198568258172800524173902,39748251852889862618789684959204425510456151133771317⟩, + ⟨68026538933557970393761333685368202660123742427635194,68026538933557970395071710914710933030917696188357730⟩, + ⟨47261359206024465632400515536283031594689548972066669,47261359206024465632962919748926961161419862889150891⟩, + ⟨-17373937823751048245967444245798756607690509230289388,-17373937823751048244978725167983882850457748741994542⟩, + ⟨29936096726165341576197796946136379830760794961292365,29936096726165341576755513651568491040552805537698201⟩] +lemma tr0_1_1_11_calc (r : Fin 8) : taylorRowBox 0 1 1 11 r = tr0_1_1_11 r := by + revert r + decide +kernel +def tr0_1_1_12 : Fin 8 → RI := ![⟨-1721437316657239379374640445895148581730246817786406,-1721437316657239379361723792245565068653102750743437⟩, + ⟨2561920702227249258469678790426424658817943312156462,2561920702227249258478968004263820673504395607904318⟩, + ⟨-24696969306277948486997282121544183238880370325932079,-24696969306277948486802722534708987925869175052824214⟩, + ⟨14465001322454162223483232038256932700192944587215617,14465001322454162223555224047438934939510513180720669⟩, + ⟨24069226716896648508862696326851345234011356890430922,24069226716896648509068909078279875150830442813388385⟩, + ⟨16068862338377571017726728930595097146541058026687112,16068862338377571017815233917939375724421398268786085⟩, + ⟨-3665478892657193637123846942603926085312749401010377,-3665478892657193636968253212134706242517318159779423⟩, + ⟨7729690836512776321072938657986594935961634614528742,7729690836512776321160705977022926947093608804911323⟩] +lemma tr0_1_1_12_calc (r : Fin 8) : taylorRowBox 0 1 1 12 r = tr0_1_1_12 r := by + revert r + decide +kernel +def tr0_1_1_13 : Fin 8 → RI := ![⟨266408606310597849646703849888927580762878432716857,266408606310597849648568876222761240493933506441579⟩, + ⟨-32478788993391365974747525374947005526013518012083,-32478788993391365973406262467573521536944244446593⟩, + ⟨3731600934762347482399650326104662449106913693907615,3731600934762347482427742644966163557187574227895976⟩, + ⟨-2142584337665671595876441413489974461519832943643043,-2142584337665671595866046539044101809067864171678812⟩, + ⟨-3597789188996889692506828425912164358552766557343264,-3597789188996889692477053514993335107729424401446988⟩, + ⟨-2437120008839295404785597957999158534893496632651608,-2437120008839295404772818786508778973767458282085363⟩, + ⟨676062882206746602871778166251188546556284078995591,676062882206746602894244233127424817568903202465213⟩, + ⟨-1303683986674849933836107579550720189738774365492342,-1303683986674849933823434919456712197271481308777231⟩] +lemma tr0_1_1_13_calc (r : Fin 8) : taylorRowBox 0 1 1 13 r = tr0_1_1_13 r := by + revert r + decide +kernel +def tr0_1_1_14 : Fin 8 → RI := ![⟨3204394180222811161723935052764942828797981283039,3204394180222811162004061939082264406518623922133⟩, + ⟨-83896001197157760069336850816336707222174116273494,-83896001197157760069135393177282372656362080658049⟩, + ⟨44822951836482043432854227192827836808053188906446,44822951836482043437073692446152360033266316581284⟩, + ⟨-28696150052561977728850554999507274393315479178798,-28696150052561977727289245242500382578214726714293⟩, + ⟨-45922179061679876481629387299655470216365968744419,-45922179061679876477157196781599319808761223216239⟩, + ⟨-27693652793353172865919981222682761561953055657136,-27693652793353172864000550137841670101247309790090⟩, + ⟨-2617249595411711645103752498996694503682140315149,-2617249595411711641729350085530251623095583246499⟩, + ⟨-3490981948864418112872434344891580160778607343448,-3490981948864418110969001267776045383515893517330⟩] +lemma tr0_1_1_14_calc (r : Fin 8) : taylorRowBox 0 1 1 14 r = tr0_1_1_14 r := by + revert r + decide +kernel +def tr0_1_1_15 : Fin 8 → RI := ![⟨-3788181555005244748503220516012981810181164419307,-3788181555005244748464937222029362306223188283679⟩, + ⟨3600838849458881549990089095077748020824098456537,3600838849458881550017621125732913420945457890018⟩, + ⟨-53558602888833091787559154625075245913731699159637,-53558602888833091786982505125731435338008675177537⟩, + ⟨31089937097787677814757891093449513211293650983327,31089937097787677814971266115072511306941663837135⟩, + ⟨51944272625132810945765378483661376361303437863758,51944272625132810946376566458529413843894206117821⟩, + ⟨34877760751830858222820733235347944928107207815682,34877760751830858223083050592551043490122573990044⟩, + ⟨-8692822281466994160571900423808313430508503135959,-8692822281466994160110740692528271030270901878775⟩, + ⟨17573695977525073745594923622215112263745852624023,17573695977525073745855054625803084928545088659760⟩] +lemma tr0_1_1_15_calc (r : Fin 8) : taylorRowBox 0 1 1 15 r = tr0_1_1_15 r := by + revert r + decide +kernel +def tr0_1_1_16 : Fin 8 → RI := ![⟨287277448756054077807606326792996292783475331447,287277448756054077812305357041531928649725620663⟩, + ⟨2752668572585085008311190119926390853398702948023,2752668572585085008314569501149745440839751132188⟩, + ⟨4317794848133164630084311622057620139699005094257,4317794848133164630155091671480608308600579390928⟩, + ⟨-2512627536975174280147627581356403265267573565838,-2512627536975174280121437157896801821275880743213⟩, + ⟨-4192129946844110978840523385295361813168578828386,-4192129946844110978765503958213361827997245504800⟩, + ⟨-2847896213437667560825677111968306765844538316891,-2847896213437667560793479328864496907488951981508⟩, + ⟨777793992789124533917608994532157362523547236282,777793992789124533974213411270488484852342542546⟩, + ⟨-1511032497767921377383385086573960271288108269931,-1511032497767921377351455664435679949459365620158⟩] +lemma tr0_1_1_16_calc (r : Fin 8) : taylorRowBox 0 1 1 16 r = tr0_1_1_16 r := by + revert r + decide +kernel +def tr0_1_1_17 : Fin 8 → RI := ![⟨6674342396659759702622436113587375048681477606,6674342396659759703229850972000648270933555474⟩, + ⟨-307872993524073276189078797949695205557895939653,-307872993524073276188641966037836115375585988788⟩, + ⟨64814249425234228851255575817189916445682775480,64814249425234228860404879274494836958019804513⟩, + ⟨-36049342662961214156396809623021673534328474677,-36049342662961214153011334000225694841031210352⟩, + ⟨-61548237756948978990557484676673093755164846735,-61548237756948978980860182835803912165314506776⟩, + ⟨-38517740713261498836106653754390703409184753419,-38517740713261498831944643545792851684581132493⟩, + ⟨5084016231753361627930204085331934351795436171,5084016231753361635247110332136719546502578722⟩, + ⟨-14193827578298177342015809025381669421493097978,-14193827578298177337888488194996213022813215783⟩] +lemma tr0_1_1_17_calc (r : Fin 8) : taylorRowBox 0 1 1 17 r = tr0_1_1_17 r := by + revert r + decide +kernel +def tr0_1_1_18 : Fin 8 → RI := ![⟨-1472601870758967030472766470364009185697409766,-1472601870758967030398154343920873359501814124⟩, + ⟨-61036995677049448869426500194040938677366792787,-61036995677049448869372841714352812756222486095⟩, + ⟨-24673832545109418145072385925514474940870859740,-24673832545109418143948526380478255925618269888⟩, + ⟨14829710823406176844847379307984862578203652917,14829710823406176845263236002526753350511349713⟩, + ⟨24373914909558310299315921219871186949742743099,24373914909558310300507094437134749899010209923⟩, + ⟨16394343496752873167043881862986290143608153947,16394343496752873167555124595424312749128143010⟩, + ⟨-3714517151509179277269424795671787703539690449,-3714517151509179276370648734295129541093961762⟩, + ⟨7857827361505091467668959782458725490120802677,7857827361505091468175941426722464704626617112⟩] +lemma tr0_1_1_18_calc (r : Fin 8) : taylorRowBox 0 1 1 18 r = tr0_1_1_18 r := by + revert r + decide +kernel +def tr0_1_1_19 : Fin 8 → RI := ![⟨-28137347962881617882108271632359375181533331,-28137347962881617874382153031552415550043657⟩, + ⟨13914221194421815859035705283801665913445016874,13914221194421815859041261643039427182570859392⟩, + ⟨638340747625206501968644977891287830615985750,638340747625206502085021129457267957330522290⟩, + ⟨-494591974509825908246953878905659124758800786,-494591974509825908203891734772750203662615321⟩, + ⟨-727687480028351173165941997682287556496288061,-727687480028351173042595485668511540265545748⟩, + ⟨-509092894464271293213713705368137804082730796,-509092894464271293160774294941140655007222047⟩, + ⟨56095666102339369783878743776585742991936217,56095666102339369876947401337065197821995601⟩, + ⟨-184124489697024041790093755023223115680906487,-184124489697024041737595582155823382798983988⟩] +lemma tr0_1_1_19_calc (r : Fin 8) : taylorRowBox 0 1 1 19 r = tr0_1_1_19 r := by + revert r + decide +kernel +def tr0_1_1_20 : Fin 8 → RI := ![⟨-3826104500906600819941337991244411893485839,-3826104500906600818916461582917050015292128⟩, + ⟨443726371337381143310371705734509819043368631,443726371337381143311108761660433353116028095⟩, + ⟨-94668294370121974221117575781909264870429022,-94668294370121974205680177212850929905761794⟩, + ⟨59690823547821977543233905147587312788883521,59690823547821977548946136332888393706249340⟩, + ⟨95978264592426334209350205243447306844169010,95978264592426334225712228239039558070838828⟩, + ⟨65328743236523857210458807387296762294426152,65328743236523857217481266609039040389273995⟩, + ⟨-13267565695150388146196754965516965556333493,-13267565695150388133851115917096344853560330⟩, + ⟨30014829986036037375620404524283931320535034,30014829986036037382584333196906163090633610⟩] +lemma tr0_1_1_20_calc (r : Fin 8) : taylorRowBox 0 1 1 20 r = tr0_1_1_20 r := by + revert r + decide +kernel +def tr0_1_1 : Fin 21 → Fin 8 → RI := ![tr0_1_1_0,tr0_1_1_1,tr0_1_1_2,tr0_1_1_3,tr0_1_1_4,tr0_1_1_5,tr0_1_1_6,tr0_1_1_7,tr0_1_1_8,tr0_1_1_9,tr0_1_1_10,tr0_1_1_11,tr0_1_1_12,tr0_1_1_13,tr0_1_1_14,tr0_1_1_15,tr0_1_1_16,tr0_1_1_17,tr0_1_1_18,tr0_1_1_19,tr0_1_1_20] +lemma tr0_1_1_mem (l : Fin 21) (r : Fin 8) : (tr0_1_1 l r).Mem (taylorRow 0 (nearNode 1) (nearDisplacement 1 1) l.val r) := by + have he : taylorRowBox 0 1 1 l r = tr0_1_1 l r := by + fin_cases l + · exact tr0_1_1_0_calc r + · exact tr0_1_1_1_calc r + · exact tr0_1_1_2_calc r + · exact tr0_1_1_3_calc r + · exact tr0_1_1_4_calc r + · exact tr0_1_1_5_calc r + · exact tr0_1_1_6_calc r + · exact tr0_1_1_7_calc r + · exact tr0_1_1_8_calc r + · exact tr0_1_1_9_calc r + · exact tr0_1_1_10_calc r + · exact tr0_1_1_11_calc r + · exact tr0_1_1_12_calc r + · exact tr0_1_1_13_calc r + · exact tr0_1_1_14_calc r + · exact tr0_1_1_15_calc r + · exact tr0_1_1_16_calc r + · exact tr0_1_1_17_calc r + · exact tr0_1_1_18_calc r + · exact tr0_1_1_19_calc r + · exact tr0_1_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 1 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows02.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows02.lean new file mode 100644 index 0000000000000000000000000000000000000000..75d3c0de41f91462638efbdb21fa3774ccae6097 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows02.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_2_0_0 : Fin 8 → RI := ![⟨20652456903227746480776601110582301368942362186943916208747,20652456903227746481567526807749473840494437677494819037480⟩, + ⟨-10304471390399633490445185493879071692629751594849082672218,-10304471390399633489876378887268279104445348174050735525214⟩, + ⟨899013312094494093440930873754083574582347550094497248306813,899013312094494093452844344614760460740572155281698330667348⟩, + ⟨-370683870197844953616108228472325540681271192323625469013440,-370683870197844953611699940412796721656902451512765617742139⟩, + ⟨-934384170158308385271692654118335387005904926485447104732130,-934384170158308385259065624808185094495249391889946912747709⟩, + ⟨-558359944564634581233978345893588571783897722357541999359933,-558359944564634581228558918328539221943159382525064656217468⟩, + ⟨-2694110906225691978344337903873189775887177880435667884507,-2694110906225691968816864063420700384641415736103311911773⟩, + ⟨28985677204130445344491538679730221996582249001122863601278,28985677204130445349865796585653469128278643734499054786162⟩] +lemma tr0_2_0_0_calc (r : Fin 8) : taylorRowBox 0 2 0 0 r = tr0_2_0_0 r := by + revert r + decide +kernel +def tr0_2_0_1 : Fin 8 → RI := ![⟨-10168347451417822700173318548378421855506419468813117045792,-10168347451417822699983485838664872386442628800745689255062⟩, + ⟨5083129190196507036829688598420664027865022125797932672754,5083129190196507036966209765718231389957056888330556669188⟩, + ⟨-96786988821173358070702823221099406985394108645711843741334,-96786988821173358067843431417567877478284534069123957784181⟩, + ⟨108471084918962928464710168061634657893960930870857516441413,108471084918962928465768215954998505654084290437187776631426⟩, + ⟨126566378386050079463248138925782249531875943738260539227933,126566378386050079466278794268702834354525520878889831208013⟩, + ⟨-14043696551264205749987596771118843139416165467110717781058,-14043696551264205748686861918420154549724205583871456196865⟩, + ⟨7301807547987797879878558541205538417632942707859228574542,7301807547987797882165279255959286540707923600347856164355⟩, + ⟨-42869291156065604258047444545016866068383061868758026351267,-42869291156065604256757551013216777280657140821448493126313⟩] +lemma tr0_2_0_1_calc (r : Fin 8) : taylorRowBox 0 2 0 1 r = tr0_2_0_1 r := by + revert r + decide +kernel +def tr0_2_0_2 : Fin 8 → RI := ![⟨-4985267913341041341641958929084797099697790259114615724635,-4985267913341041341587964480670344732688199522804617752275⟩, + ⟨2317009077030330914921976843604735515306484433545105649291,2317009077030330914960807797108822407444070829196753089440⟩, + ⟨-151802165126694285228924029480900060487179194713500243155505,-151802165126694285228110727687610114048625811780740022820454⟩, + ⟨79650910588270652115283007947217339225190549578190770451062,79650910588270652115583950353252099532852850624035688513064⟩, + ⟨150147697816764414926646490780080344224509954167670089692911,150147697816764414927508505360364154266680435808282054144268⟩, + ⟨94596935297228585620961001107769207876760193626128294539780,94596935297228585621330971388588578211331874483985864822779⟩, + ⟨-3193758276256175194459860066718046697402528166103543330539,-3193758276256175193809444109203682850037582603412721491970⟩, + ⟨15825089042249664581976338550053848436800434700555224534359,15825089042249664582343225214977197244692450644821022894695⟩] +lemma tr0_2_0_2_calc (r : Fin 8) : taylorRowBox 0 2 0 2 r = tr0_2_0_2 r := by + revert r + decide +kernel +def tr0_2_0_3 : Fin 8 → RI := ![⟨1590658020731046471548936061244249735769292875514276816864,1590658020731046471559367952855017315056762206115407256880⟩, + ⟨-637565727721914284526043579267840059245452458990508670505,-637565727721914284518541320981798160684921216355595921916⟩, + ⟨9886426735192073901683877207497183304748465228569463395756,9886426735192073901841009586915394077179065073571356728246⟩, + ⟨-10610035866460552086158407930772721788721565731304016969770,-10610035866460552086100264942857542636551366575937401570203⟩, + ⟨-12638529929038812294438144147135661191286777102552554141767,-12638529929038812294271600309132058065378837239724388215030⟩, + ⟨-2694348765196546840860067286044864865203597995334163970957,-2694348765196546840788587902813387112229998663294283040358⟩, + ⟨-1507321335381943410395220335284044466530490700679824851797,-1507321335381943410269557994650801134007704090729874421179⟩, + ⟨3324328958519714760654722032114580472344207401950581495233,3324328958519714760725605651338308584968171753267051571631⟩] +lemma tr0_2_0_3_calc (r : Fin 8) : taylorRowBox 0 2 0 3 r = tr0_2_0_3 r := by + revert r + decide +kernel +def tr0_2_0_4 : Fin 8 → RI := ![⟨676140172818697317855789961891248900452009220699594861223,676140172818697317857879994081514543309295718657698508074⟩, + ⟨-340377990697752484876034228603186133991348679402518413755,-340377990697752484874531149209697576989216849461233257332⟩, + ⟨11870145277268052482545826159430222656870208824214606649694,11870145277268052482577307672407181939965539444299812886785⟩, + ⟨-6915570756781477702158891191784226627604747362864383416067,-6915570756781477702147242229071120272201339475890377419102⟩, + ⟨-11765908212250236858493743602301270647456146917481096391891,-11765908212250236858460376501153601975719749562047228349710⟩, + ⟨-7468260706200718258702537081091502544802062061768290459018,-7468260706200718258688216168115566619246529154819928164823⟩, + ⟨859905203870992901793511896027233811618213511303974759711,859905203870992901818688378565745471483479649977339813656⟩, + ⟨-2336903465054940648462470524129705287012049763125881746638,-2336903465054940648448268972631521539076683481720955156869⟩] +lemma tr0_2_0_4_calc (r : Fin 8) : taylorRowBox 0 2 0 4 r = tr0_2_0_4 r := by + revert r + decide +kernel +def tr0_2_0_5 : Fin 8 → RI := ![⟨-52056536317548833484036731066727689954833395758848633792,-52056536317548833483576885338777219139732163994763419494⟩, + ⟨-1813935368269547682630275581317327510045784878282933608,-1813935368269547682299570321796466865322488766505713543⟩, + ⟨-278893043912131166993815248476548577883468180785928861143,-278893043912131166986888733507692357993640177441487782274⟩, + ⟨342963356816481020932738607997802326585904530185952353331,342963356816481020935301595191574945490891044626937110358⟩, + ⟨387417791084600424600505952606458334637853544341836093184,387417791084600424607847331838036895006104042870624082715⟩, + ⟨88569811843359691615885747017174242303517797205872727659,88569811843359691619036612674332627035704538373799812994⟩, + ⟨110236787964198603862987306339827125447537240948210225832,110236787964198603868526598028662892288114105097400462049⟩, + ⟨-160960878491293471499582520670660726086956125127979759968,-160960878491293471496457916744751341705707598842775980714⟩] +lemma tr0_2_0_5_calc (r : Fin 8) : taylorRowBox 0 2 0 5 r = tr0_2_0_5 r := by + revert r + decide +kernel +def tr0_2_0_6 : Fin 8 → RI := ![⟨-39430142354458173302223284791753883151078045136212491734,-39430142354458173302155926728444264165302282462360069056⟩, + ⟨21419746315094729132447174193862018874715966268593904355,21419746315094729132495615800360744310193379737688428107⟩, + ⟨-578110192465592644372670302792635816434223905633109159184,-578110192465592644371655708972543427267022881213415872832⟩, + ⟨346464214285890384264495232074059458875363532578626033228,346464214285890384264870657663983308934514317744865804737⟩, + ⟨571682251303742969866242939078143480209929157618678752647,571682251303742969867318302090116684670855053145292753823⟩, + ⟨368818693219826207198389959098560732037485808045516150996,368818693219826207198851496948212739383359950722012382609⟩, + ⟨-65679151769545107769789945084202217475437498498537568513,-65679151769545107768978551311216665810524247118392646974⟩, + ⟨149596660912438658044841346135851624659302898737481122073,149596660912438658045299037174955218342574970903151182522⟩] +lemma tr0_2_0_6_calc (r : Fin 8) : taylorRowBox 0 2 0 6 r = tr0_2_0_6 r := by + revert r + decide +kernel +def tr0_2_0_7 : Fin 8 → RI := ![⟨-678271932168849039663584972585702404995641286378137235,-678271932168849039648717735082835968117803257399481005⟩, + ⟨2727135280059071837508104833928310591235414187194077621,2727135280059071837518796840698072363369743704965869720⟩, + ⟨-13286210169791629035227370212617464829589105198231649941,-13286210169791629035003429580273914430285300053603360705⟩, + ⟨3916566162775401769261762731419039627504389869498264594,3916566162775401769344626476822138133896171432194911275⟩, + ⟨10175636956372432589093538864755871732620048743485107351,10175636956372432589330892442206862963007701575843080390⟩, + ⟨9858713170280245733354720996735592183174136598966045854,9858713170280245733456591396304596506642403564302819656⟩, + ⟨-7153862237194701414597241728951754278211764443833814735,-7153862237194701414418151307692009816140864637644083213⟩, + ⟨10844751572729739825542540359932045879449616267316613956,10844751572729739825643561693497228673178947979755110384⟩] +lemma tr0_2_0_7_calc (r : Fin 8) : taylorRowBox 0 2 0 7 r = tr0_2_0_7 r := by + revert r + decide +kernel +def tr0_2_0_8 : Fin 8 → RI := ![⟨1311175897737551941561002088364299243695728727282870474,1311175897737551941563557844632198066987105459934227406⟩, + ⟨-699954831746331839605941800297217737025354541460100628,-699954831746331839604103788137146524662055880587634291⟩, + ⟨18771171727692298565809433469692638539071083292835589948,18771171727692298565847930041407666973021248799029503933⟩, + ⟨-11214373580375967411862329062837182961168062192079935949,-11214373580375967411848084349476072190327580404285987714⟩, + ⟨-18464706731394121601293618356557479152340696814915652017,-18464706731394121601252816029082325358961550645570339549⟩, + ⟨-12124328833287677532368789654281838506036520083309431077,-12124328833287677532351277597173209417598122676119207201⟩, + ⟨2526485236604356728893891066908285664168662199037654930,2526485236604356728924677651608372461163331541023013427⟩, + ⟨-5472169183363631268304296475416734364057125785756717613,-5472169183363631268286930377215704897099625890431799912⟩] +lemma tr0_2_0_8_calc (r : Fin 8) : taylorRowBox 0 2 0 8 r = tr0_2_0_8 r := by + revert r + decide +kernel +def tr0_2_0_9 : Fin 8 → RI := ![⟨108466004005787361774300207341088413496626065012259782,108466004005787361774704656063473063473010996988479918⟩, + ⟨-171402357122184223055926862764082582011745417035383171,-171402357122184223055635997129045033120526186265941434⟩, + ⟨1427955376004408607547567309345405247135331815134673992,1427955376004408607553659396232369214421761149005643548⟩, + ⟨-766279324172087061794849772646469935595040688803616258,-766279324172087061792595545124123213814451436076670922⟩, + ⟨-1332889070262740238709384409927093094243375133064062558,-1332889070262740238702927436927032204974532952538601006⟩, + ⟨-937708953487474380366124576911563650868142665909562968,-937708953487474380363353291866861426143279611836128638⟩, + ⟨356129495154197693488534156421341505363680014133087906,356129495154197693493406136979527236507108859753748993⟩, + ⟨-610199141437495944859661353288180768155434808635109068,-610199141437495944856913166256984238516148089498259763⟩] +lemma tr0_2_0_9_calc (r : Fin 8) : taylorRowBox 0 2 0 9 r = tr0_2_0_9 r := by + revert r + decide +kernel +def tr0_2_0_10 : Fin 8 → RI := ![⟨-25698270844989537562564804106859508943509893470112293,-25698270844989537562490910266021227346991287933517192⟩, + ⟨9706450560241844327585553744913415906229581984624717,9706450560241844327638695658228312728667580814208504⟩, + ⟨-378254946133908330832463822705485032375517036756232973,-378254946133908330831350782475945607041095609322892271⟩, + ⟨225467277065657688365625878493896431037230093222516177,225467277065657688366037731765998675187200176842024938⟩, + ⟨371815085467615721131357515828266258858911335948910064,371815085467615721132537221706241820636169546122526960⟩, + ⟨246099572544066162927461087223176447785276561600334634,246099572544066162927967408258727546721995311645903375⟩, + ⟨-50861167935723408622037265347412746668941266364621858,-50861167935723408621147141739408900991630077645785041⟩, + ⟨112123634161805934444827929213853129196292050979034535,112123634161805934445330030182032062334372005236419533⟩] +lemma tr0_2_0_10_calc (r : Fin 8) : taylorRowBox 0 2 0 10 r = tr0_2_0_10 r := by + revert r + decide +kernel +def tr0_2_0_11 : Fin 8 → RI := ![⟨-4131725321086829007308411124862173493381755266791618,-4131725321086829007297805933506013334631703370820735⟩, + ⟨5921459328102181080063095976013256900156661874891257,5921459328102181080070722865525857004820288418900552⟩, + ⟨-55229210746473162432675356110182392363023662719080214,-55229210746473162432515613369959075224622356031385459⟩, + ⟨31077077566479634880278469449873639913251916556187266,31077077566479634880337578337863054125065966217758721⟩, + ⟨52688367080806688324498980652586341811746564959686396,52688367080806688324668291199139517281596847768323963⟩, + ⟨35982836528233584244082745872165557255403714083338915,35982836528233584244155412706210947454220848142716374⟩, + ⟨-11159034676174359935459411597318215798236801768179508,-11159034676174359935331661691689708509476108333551460⟩, + ⟨20542230815497076320863368333135338662689951068263105,20542230815497076320935429506127891534063064845138987⟩] +lemma tr0_2_0_11_calc (r : Fin 8) : taylorRowBox 0 2 0 11 r = tr0_2_0_11 r := by + revert r + decide +kernel +def tr0_2_0_12 : Fin 8 → RI := ![⟨206793902650864657486839089103136953374011455363260,206793902650864657488411911575154202519073508960664⟩, + ⟨237792268224075467933499914362976967341791867853474,237792268224075467934631034284770200135216071376854⟩, + ⟨3341101291551429414313294598625952739140503051639543,3341101291551429414336985540460363293266663933508322⟩, + ⟨-2049350854462268750808184139026232064851002013047607,-2049350854462268750799417886329892169721114328442993⟩, + ⟨-3338418921086264779080303308024013743904661760819430,-3338418921086264779055193395018840306531958409162904⟩, + ⟨-2182671958120098285257587087422936332276168160199347,-2182671958120098285246810098521391046253733627013232⟩, + ⟨308329497511054682898662834118925506818521212224296,308329497511054682917609019589028917259268295266229⟩, + ⟨-844770182448913290899495661705943372383108320232200,-844770182448913290888808496482953392650107537005225⟩] +lemma tr0_2_0_12_calc (r : Fin 8) : taylorRowBox 0 2 0 12 r = tr0_2_0_12 r := by + revert r + decide +kernel +def tr0_2_0_13 : Fin 8 → RI := ![⟨83502595919849385086398929999053038582606550286377,83502595919849385086623750762395479508956715503326⟩, + ⟨-122965798111717790786724004055194010030654728795327,-122965798111717790786562320681012886916867719158743⟩, + ⟨1133166910565098110874135443542917998703252546105813,1133166910565098110877521849651848928808619511326087⟩, + ⟨-646156726552050228558445700647927715610659070762162,-646156726552050228557192644020252954764472976158102⟩, + ⟨-1088666237942336773544758016738125084981471063105628,-1088666237942336773541168781519534603504058168952312⟩, + ⟨-736693531984540249077840360392339225188364026932484,-736693531984540249076299887189392217089305077880631⟩, + ⟨206145341010088142995697501987438221623647312657097,206145341010088142998405688038875106116622428860279⟩, + ⟨-396057377881930064961030250891326571302748235817483,-396057377881930064959502617171572798527286881825062⟩] +lemma tr0_2_0_13_calc (r : Fin 8) : taylorRowBox 0 2 0 13 r = tr0_2_0_13 r := by + revert r + decide +kernel +def tr0_2_0_14 : Fin 8 → RI := ![⟨2706320099659236590075464072021730370257094376990,2706320099659236590103813538023087016729775401689⟩, + ⟨-17913283312801866036731896272976186291706757164372,-17913283312801866036711508310354547235502818819982⟩, + ⟨31134776448504799636658155831031890073118438094153,31134776448504799637085175130429287390039731067068⟩, + ⟨-16303452916366523533605512430093374472918915223234,-16303452916366523533447504398566874741988845047608⟩, + ⟨-28608310885924800410723658381643262101023467296835,-28608310885924800410271062721494813274219785129058⟩, + ⟨-20121051103384422662910766943146101181382063905558,-20121051103384422662716516234088616007873961371842⟩, + ⟨8800478266702663994827482451999899603945537031107,8800478266702663995168979506159792870754889561560⟩, + ⟨-14228099059603009200399284972537057652141039436314,-14228099059603009200206653297609398862929432477448⟩] +lemma tr0_2_0_14_calc (r : Fin 8) : taylorRowBox 0 2 0 14 r = tr0_2_0_14 r := by + revert r + decide +kernel +def tr0_2_0_15 : Fin 8 → RI := ![⟨-893477269988848564453215089183692133469973101886,-893477269988848564449319152322356779392730580736⟩, + ⟨877414758909440068929441916883755824519685049246,877414758909440068932243740915025835481667463701⟩, + ⟨-12059193563998433343391005778334648311498550064744,-12059193563998433343332322477951331481328640740395⟩, + ⟨6916871651944884838607713398297795932444277507697,6916871651944884838629427716102007124055455886238⟩, + ⟨11622790060791253359265990568461762828096006148579,11622790060791253359328188710592823490215111654651⟩, + ⟨7808038942842860574823986593980398525928210689447,7808038942842860574850681576441066165608791675326⟩, + ⟨-2022868813625359905729870973666510015521520487268,-2022868813625359905682940602509905104949163052958⟩, + ⟨4018879856006925010128348871595435484698650222479,4018879856006925010154821357637662792593046293213⟩] +lemma tr0_2_0_15_calc (r : Fin 8) : taylorRowBox 0 2 0 15 r = tr0_2_0_15 r := by + revert r + decide +kernel +def tr0_2_0_16 : Fin 8 → RI := ![⟨-89485881291344777408680816622469470704831657741,-89485881291344777408239987370743435833165012571⟩, + ⟨533099271809867035195591967076091023861420552562,533099271809867035195908996338916865722554253101⟩, + ⟨-1159036520111444168020370097811506233966123432487,-1159036520111444168013730022184654467730354046531⟩, + ⟨651704281214326614101045410281568482432202801861,651704281214326614103502407612403151973842827114⟩, + ⟨1105260926261698936651089481569065929363602428944,1105260926261698936658127265144645064706498887124⟩, + ⟨749692968297013710922644500783245089249302612643,749692968297013710925665065428349877430688385551⟩, + ⟨-224514853277635412036217492947363701473639593518,-224514853277635412030907273316905508063407981565⟩, + ⟨418253341167561024726509109847544374699470643949,418253341167561024729504498794718296983614116242⟩] +lemma tr0_2_0_16_calc (r : Fin 8) : taylorRowBox 0 2 0 16 r = tr0_2_0_16 r := by + revert r + decide +kernel +def tr0_2_0_17 : Fin 8 → RI := ![⟨3301381242181875690229960835574377379561454358,3301381242181875690276766869715855522339265495⟩, + ⟨40751848635341140793737175662081988741534631878,40751848635341140793770836954841782925463441577⟩, + ⟨41448511422634799721025075307384235290857296325,41448511422634799721730100224115706145495236459⟩, + ⟨-23741076808999550444645347587628092509395046701,-23741076808999550444384470387433805935901100237⟩, + ⟨-39936328297626916562342554197003523648190075580,-39936328297626916561595301747157001775802371003⟩, + ⟨-26346337926405712480447327985770074913380832628,-26346337926405712480126612762467083593839574773⟩, + ⟨5737679070757233389192914185932669952232829438,5737679070757233389756738660703369087877038176⟩, + ⟨-12363968831000292061441110457991397935686136816,-12363968831000292061123068320861457319696695432⟩] +lemma tr0_2_0_17_calc (r : Fin 8) : taylorRowBox 0 2 0 17 r = tr0_2_0_17 r := by + revert r + decide +kernel +def tr0_2_0_18 : Fin 8 → RI := ![⟨995589944426000531678900093525529877739120099,995589944426000531684636569687765958603866063⟩, + ⟨-8454070451928762918170330087313788353804789654,-8454070451928762918166204610608459272274480264⟩, + ⟨12545837533752530614557033682394595212025607699,12545837533752530614643440460982925974313115181⟩, + ⟨-7061278737982656918256022569590065644745367543,-7061278737982656918224049857790305855352221831⟩, + ⟨-11972006565799607471454487073216284251821120005,-11972006565799607471362904952569001854475881437⟩, + ⟨-8052377164822185713610824845914582311260658792,-8052377164822185713571518477259429064782425321⟩, + ⟨2254037423164003696089965410293123350101030539,2254037423164003696159066878058126652304236546⟩, + ⟨-4318115399044449362947638241161279758770940716,-4318115399044449362908659481868536863839060999⟩] +lemma tr0_2_0_18_calc (r : Fin 8) : taylorRowBox 0 2 0 18 r = tr0_2_0_18 r := by + revert r + decide +kernel +def tr0_2_0_19 : Fin 8 → RI := ![⟨28995092601909757324831742239521466443289651,28995092601909757325456750278997564990337018⟩, + ⟨-1831007822915503171408497058694108411432022966,-1831007822915503171408047574370502422664141016⟩, + ⟨407324003196946645732446496551847781093965766,407324003196946645741860800691921672210646234⟩, + ⟨-232798469580986126677739825535490907608673895,-232798469580986126674256292901095666074804654⟩, + ⟨-391679625036509374879389959004634054150040899,-391679625036509374869411784240421395364431518⟩, + ⟨-266911204425425278976180071880081585367721778,-266911204425425278971897513090295662689568077⟩, + ⟨79546962327008330876042822917094193827707005,79546962327008330883571656241617137266960144⟩, + ⟨-148498698219924940387292395941363685680035746,-148498698219924940383045531274281940814733959⟩] +lemma tr0_2_0_19_calc (r : Fin 8) : taylorRowBox 0 2 0 19 r = tr0_2_0_19 r := by + revert r + decide +kernel +def tr0_2_0_20 : Fin 8 → RI := ![⟨-5972624782156300105068133942139193640225249,-5972624782156300105016031528767278733488497⟩, + ⟨3705278193190056673681373170507814188395292,3705278193190056673718843437374870589912580⟩, + ⟨-67290839529624704790874400591175014022024529,-67290839529624704790089597940751257990935598⟩, + ⟨36939641704451907091222428082007020061079534,36939641704451907091512825078276746160542299⟩, + ⟨63400863406950484987030018126724477394252161,63400863406950484987861826605060390286828620⟩, + ⟨42304633802787183269814516952622901596947073,42304633802787183270171522997758670502033134⟩, + ⟨-11981880497635222707272924601924482203728665,-11981880497635222706645300057414158881704739⟩, + ⟨22795181377779186438206365871515815464895728,22795181377779186438560396355035592353182261⟩] +lemma tr0_2_0_20_calc (r : Fin 8) : taylorRowBox 0 2 0 20 r = tr0_2_0_20 r := by + revert r + decide +kernel +def tr0_2_0 : Fin 21 → Fin 8 → RI := ![tr0_2_0_0,tr0_2_0_1,tr0_2_0_2,tr0_2_0_3,tr0_2_0_4,tr0_2_0_5,tr0_2_0_6,tr0_2_0_7,tr0_2_0_8,tr0_2_0_9,tr0_2_0_10,tr0_2_0_11,tr0_2_0_12,tr0_2_0_13,tr0_2_0_14,tr0_2_0_15,tr0_2_0_16,tr0_2_0_17,tr0_2_0_18,tr0_2_0_19,tr0_2_0_20] +lemma tr0_2_0_mem (l : Fin 21) (r : Fin 8) : (tr0_2_0 l r).Mem (taylorRow 0 (nearNode 2) (nearDisplacement 2 0) l.val r) := by + have he : taylorRowBox 0 2 0 l r = tr0_2_0 l r := by + fin_cases l + · exact tr0_2_0_0_calc r + · exact tr0_2_0_1_calc r + · exact tr0_2_0_2_calc r + · exact tr0_2_0_3_calc r + · exact tr0_2_0_4_calc r + · exact tr0_2_0_5_calc r + · exact tr0_2_0_6_calc r + · exact tr0_2_0_7_calc r + · exact tr0_2_0_8_calc r + · exact tr0_2_0_9_calc r + · exact tr0_2_0_10_calc r + · exact tr0_2_0_11_calc r + · exact tr0_2_0_12_calc r + · exact tr0_2_0_13_calc r + · exact tr0_2_0_14_calc r + · exact tr0_2_0_15_calc r + · exact tr0_2_0_16_calc r + · exact tr0_2_0_17_calc r + · exact tr0_2_0_18_calc r + · exact tr0_2_0_19_calc r + · exact tr0_2_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 2 0 l r +def tr0_2_1_0 : Fin 8 → RI := ![⟨20652456903227746480776601110582301368942362186943916208747,20652456903227746481567526807749473840494437677494819037480⟩, + ⟨-10304471390399633490445185493879071692629751594849082672218,-10304471390399633489876378887268279104445348174050735525214⟩, + ⟨899013312094494093440930873754083574582347550094497248306813,899013312094494093452844344614760460740572155281698330667348⟩, + ⟨-370683870197844953616108228472325540681271192323625469013440,-370683870197844953611699940412796721656902451512765617742139⟩, + ⟨-934384170158308385271692654118335387005904926485447104732130,-934384170158308385259065624808185094495249391889946912747709⟩, + ⟨-558359944564634581233978345893588571783897722357541999359933,-558359944564634581228558918328539221943159382525064656217468⟩, + ⟨-2694110906225691978344337903873189775887177880435667884507,-2694110906225691968816864063420700384641415736103311911773⟩, + ⟨28985677204130445344491538679730221996582249001122863601278,28985677204130445349865796585653469128278643734499054786162⟩] +lemma tr0_2_1_0_calc (r : Fin 8) : taylorRowBox 0 2 1 0 r = tr0_2_1_0 r := by + revert r + decide +kernel +def tr0_2_1_1 : Fin 8 → RI := ![⟨30505042354253468099950457515994617159327886402237067765189,30505042354253468100519955645135265566519258406439351137377⟩, + ⟨-15249387570589521110898629297154694169871170664991670007562,-15249387570589521110489065795261992083595066377393798018264⟩, + ⟨290360966463520074203530294252703632434853602207371873352546,290360966463520074212108469663298220956182325937135531224003⟩, + ⟨-325413254756888785397304647864995516962252871311563329894277,-325413254756888785394130504184903973681882792612572549324240⟩, + ⟨-379699135158150238398836382806108503063576562636669493624037,-379699135158150238389744416777346748595627831214781617683803⟩, + ⟨42131089653792617246060585755260463649172616751614368590598,42131089653792617249962790313356529418248496401332153343175⟩, + ⟨-21905422643963393646495837767877859622123770801043568493064,-21905422643963393639635675623616615252898828123577685723627⟩, + ⟨128607873468196812770272653039650331841971422464345479378940,128607873468196812774142333635050598205149185606274079053800⟩] +lemma tr0_2_1_1_calc (r : Fin 8) : taylorRowBox 0 2 1 1 r = tr0_2_1_1 r := by + revert r + decide +kernel +def tr0_2_1_2 : Fin 8 → RI := ![⟨-44867411220069372074777630361763173897280112332031541521707,-44867411220069372074291680326033102594193795705241559770483⟩, + ⟨20853081693272978234297791592442619637758359901905950843621,20853081693272978234647270173979401666996637462770777804958⟩, + ⟨-1366219486140248567060316265328100544384612752421502188399540,-1366219486140248567052996549188491026437632306026660205384097⟩, + ⟨716858195294435869037547071524956053026714946203716934059571,716858195294435869040255553179268895795675655616321196617571⟩, + ⟨1351329280350879734339818417020723098020589587509030807236212,1351329280350879734347576548243277388400123922274538487298407⟩, + ⟨851372417675057270588649009969922870890841742635154650858035,851372417675057270591978742497297203901986870355872783405009⟩, + ⟨-28743824486305576750138740600462420276622753494931889974843,-28743824486305576744284996982833145650338243430714493427734⟩, + ⟨142425801380246981237787046950484635931203912304997020809235,142425801380246981241089026934794775202232055803389206052247⟩] +lemma tr0_2_1_2_calc (r : Fin 8) : taylorRowBox 0 2 1 2 r = tr0_2_1_2 r := by + revert r + decide +kernel +def tr0_2_1_3 : Fin 8 → RI := ![⟨-42947766559738254732102934727085467506532579565115995935744,-42947766559738254731821273653594742865770907638885474055338⟩, + ⟨17214274648491685682000615666508550338492872841601089891742,17214274648491685682203176640231681599627216392743734103625⟩, + ⟨-266933521850185995349707258846715640083834756986426631662623,-266933521850185995345464684602423949228208561171375511685438⟩, + ⟨286470968394434906324707153457153651186886897550309842395497,286470968394434906326277014130863488295482274745208458183768⟩, + ⟨341240308084047931945333208346565567765228605472558481805823,341240308084047931949829891972662852164742981768918961827684⟩, + ⟨72747416660306764701291873375961452030209963908945642089676,72747416660306764703221816723211351360497145874022427215816⟩, + ⟨40697676055312472077278065855571630618208010449706609371839,40697676055312472080670949052669200596323248918355270998516⟩, + ⟨-89756881880032298539591352586134331794140637338210392434021,-89756881880032298537677494867093672753293599852665700371311⟩] +lemma tr0_2_1_3_calc (r : Fin 8) : taylorRowBox 0 2 1 3 r = tr0_2_1_3 r := by + revert r + decide +kernel +def tr0_2_1_4 : Fin 8 → RI := ![⟨54767353998314482746318986913191160936612746876667183759128,54767353998314482746488279520602678008052953211273579153974⟩, + ⟨-27570617246517951274958772516858076853299243031603991514095,-27570617246517951274837023085985503736126564806359893843937⟩, + ⟨961481767458712251086211918913848035206486914761383138625259,961481767458712251088761921464981737137208694988284843829493⟩, + ⟨-560161231299299693874870186534522356835984536392015056701409,-560161231299299693873926620554760742048308497547120570947292⟩, + ⟨-953038565192269185537993231786402922443947900315968807743084,-953038565192269185535290496593441760033299714525825496326621⟩, + ⟨-604929117202258178954905503568411706128967027003231527180400,-604929117202258178953745509617360896158968861540414181350713⟩, + ⟨69652321513550425045274463578205938741075294415621955536656,69652321513550425047313758663825383190161851648164524906066⟩, + ⟨-189289180669450192525460112454506128247976030813196421477629,-189289180669450192524309786783153244665211362019397367706399⟩] +lemma tr0_2_1_4_calc (r : Fin 8) : taylorRowBox 0 2 1 4 r = tr0_2_1_4 r := by + revert r + decide +kernel +def tr0_2_1_5 : Fin 8 → RI := ![⟨12649738325164366536509183137322864250954915850727510937277,12649738325164366536620925649214828659024515169400218011305⟩, + ⟨440786294489500086798795588196541448273364770260888391002,440786294489500086879156966260110584941125725422752866699⟩, + ⟨67771009670647873577813962242369242992454563118281531092718,67771009670647873579497105379801304425682767930980713257598⟩, + ⟨-83340095706404888087278287631552711754286523844345717816949,-83340095706404888086655481743465965360374800835186421859622⟩, + ⟨-94142523233557903179706901636642965486483282417561652099655,-94142523233557903177922946483369375316998411275066170643856⟩, + ⟨-21522464277936405063425896879862828369676202824833354557429,-21522464277936405062660236525173340879754824721027072821326⟩, + ⟨-26787539475300260740051963320965082826011727538668312277854,-26787539475300260738705915440577991483751549550415084877305⟩, + ⟨39113493473384313573639273768974576034486946518794563313570,39113493473384313574398552522970556439130338406099081672118⟩] +lemma tr0_2_1_5_calc (r : Fin 8) : taylorRowBox 0 2 1 5 r = tr0_2_1_5 r := by + revert r + decide +kernel +def tr0_2_1_6 : Fin 8 → RI := ![⟨-28744573776400008337320774613188580817135894904298906473551,-28744573776400008337271670585035868576505363915060490342393⟩, + ⟨15614995063704057537553989987325411759667939409804956274977,15614995063704057537589303918462982602130973828774864089867⟩, + ⟨-421442330307417037747676650735831510180549227206536577044649,-421442330307417037746937011840984158477659680404580171295268⟩, + ⟨252572412214414090128817024181989345520140015249818378223724,252572412214414090129090709437043832213260937636007171652899⟩, + ⟨416756361200428625032491102587966597073038355904016810679754,416756361200428625033275042223695063125053333742918417536651⟩, + ⟨268868827357253305047626280182850773655327154065181274076756,268868827357253305047962741275247087010469404076347026921291⟩, + ⟨-47880101639998383564176869966383416539593936405433887445944,-47880101639998383563585363905876949375872176149308239644182⟩, + ⟨109055965805167781714689341333035834376631813179623737991422,109055965805167781715022998100542354171737153788397212058095⟩] +lemma tr0_2_1_6_calc (r : Fin 8) : taylorRowBox 0 2 1 6 r = tr0_2_1_6 r := by + revert r + decide +kernel +def tr0_2_1_7 : Fin 8 → RI := ![⟨1483380715653272849711745686626162262273635723932664958908,1483380715653272849744260335044931159725467493308986131664⟩, + ⟨-5964244857489190108653608690606684258689629482760357077418,-5964244857489190108630225271801215263031850827393447758442⟩, + ⟨29056941641334292699552500492059050859033951217230549863936,29056941641334292700042258654994395582311373068532618418883⟩, + ⟨-8565530197989803669556698104810016098830926922210270956768,-8565530197989803669375475093613439665352100644592704667368⟩, + ⟨-22254118023586510072866661771106409300097843346368816812264,-22254118023586510072347569497221091479240046602001929778277⟩, + ⟨-21561005703402897419069565383718152560026936595130266587621,-21561005703402897418846774819860740104601836741938742284884⟩, + ⟨15645496712744811993332496909922425467900070962527609986967,15645496712744811993724167661217486606449128838664552824796⟩, + ⟨-23717471689559940998682469423678439108242359231724426408271,-23717471689559940998461535767171384338356310776621434722335⟩] +lemma tr0_2_1_7_calc (r : Fin 8) : taylorRowBox 0 2 1 7 r = tr0_2_1_7 r := by + revert r + decide +kernel +def tr0_2_1_8 : Fin 8 → RI := ![⟨8602625065056078288581734701758167337887676179702913180375,8602625065056078288598503018631851517502398922628466008332⟩, + ⟨-4592403651087683199654584151750045572623351146519720216080,-4592403651087683199642524953967818348307748632535468588453⟩, + ⟨123157657705389170890275692994653401454845377484294305652441,123157657705389170890528269001675703009992413370432575301211⟩, + ⟨-73577505060846722189228740981274757408223656042236459760647,-73577505060846722189135281416912509640739255032520365391861⟩, + ⟨-121146940864676831826087430037373620718507311802661592879104,-121146940864676831825819725966809136680146733785586997785858⟩, + ⟨-79547721475200452289871628921743142438105608266593177290457,-79547721475200452289756732315053426988861282878018118450348⟩, + ⟨16576269637361184498272819289985262242610592687886053998523,16576269637361184498474810072202531717692618240651991092267⟩, + ⟨-35902902012048784751344489175209194162578802280349824258022,-35902902012048784751230550204912239829870645467123039224297⟩] +lemma tr0_2_1_8_calc (r : Fin 8) : taylorRowBox 0 2 1 8 r = tr0_2_1_8 r := by + revert r + decide +kernel +def tr0_2_1_9 : Fin 8 → RI := ![⟨-2134936356845912641811511745297340308339275453724250222073,-2134936356845912641803550981094643242854090837636309301638⟩, + ⟨3373712595235952062404083331490993386911316924272525260338,3373712595235952062409808439785437461737185043507446944914⟩, + ⟨-28106445665894774622478677896041723247463524695878081952363,-28106445665894774622358767349845611479364736117295788197529⟩, + ⟨15082675937679189637263658114678117217509847616297113761685,15082675937679189637308028075000467742317185877721578788723⟩, + ⟨26235255569981516118389720741034774890513732104817283605634,26235255569981516118516813340594973373992352744099943325463⟩, + ⟨18456925331493958228691882843815433450778172599770519998707,18456925331493958228746430047350307340037652093097927889457⟩, + ⟨-7009696853120073201030712994168034596169423686533041419839,-7009696853120073200934817800841264850073313718181569267253⟩, + ⟨12010549700914232682618621851436220766713342845594246931082,12010549700914232682672714416771262059603423338364851776526⟩] +lemma tr0_2_1_9_calc (r : Fin 8) : taylorRowBox 0 2 1 9 r = tr0_2_1_9 r := by + revert r + decide +kernel +def tr0_2_1_10 : Fin 8 → RI := ![⟨-1517457195125787203531889117705947143605315699516660779266,-1517457195125787203527525760298287453612488561186256674675⟩, + ⟨573156199131720665699599363083392295846950586610104933854,573156199131720665702737339922723638315091979498197903451⟩, + ⟨-22335576314261153027326156266936185676741905503418800805609,-22335576314261153027260432354422112150169654634907465712297⟩, + ⟨13313617243450020840301842499186090356317399774696357784630,13313617243450020840326162023050455771128983242344730548335⟩, + ⟨21955308981777240717085529952143294319359855476447190415729,21955308981777240717155190404531873266745175528989094435899⟩, + ⟨14531933659154562854703649739441346065272795685938159853868,14531933659154562854733547490269602906387101157378948370366⟩, + ⟨-3003301105436531555722678481499375278054312837564556080010,-3003301105436531555670117572570356194654764454905960918013⟩, + ⟨6620788473620478623032644392148813425911849318261010296023,6620788473620478623062292952218811248782332537205336948932⟩] +lemma tr0_2_1_10_calc (r : Fin 8) : taylorRowBox 0 2 1 10 r = tr0_2_1_10 r := by + revert r + decide +kernel +def tr0_2_1_11 : Fin 8 → RI := ![⟨731922745454568498155784427702789744190002357030780837846,731922745454568498157663105535959447832097800246334653682⟩, + ⟨-1048968755595317071791288343459308990832899632542975939483,-1048968755595317071789937262862820420092052181151361510612⟩, + ⟨9783688996105481305432843361648140298816176503891840065579,9783688996105481305461141308850480259932552779696902602336⟩, + ⟨-5505211059669167880147160989817426449093060717577304008862,-5505211059669167880136690027636765689712837262178905763981⟩, + ⟨-9333586163263662416650013781053968067883036791615284908005,-9333586163263662416620020925663712692925468742913566030962⟩, + ⟨-6374251542466994748099398894667150708672860585937777460346,-6374251542466994748086526183016511971123001738721238897120⟩, + ⟨1976789515780259339464197873697756793328164162963640650781,1976789515780259339486828386230129974010254722827695292172⟩, + ⟨-3638994562272860579024748530722037601584669748121836039527,-3638994562272860579011983110109925838079536761889604274842⟩] +lemma tr0_2_1_11_calc (r : Fin 8) : taylorRowBox 0 2 1 11 r = tr0_2_1_11 r := by + revert r + decide +kernel +def tr0_2_1_12 : Fin 8 → RI := ![⟨109898758418678164439463252352060205638038021849706595000,109898758418678164440299114699411524540938944675564153657⟩, + ⟨126372560817270890754047127988974842501089212043918191767,126372560817270890754648251491332559930059364188586467065⟩, + ⟨1775598211483383199372071594788374949641568082266370556092,1775598211483383199384661932607795928936929147487595918200⟩, + ⟨-1089109067446282567198252187028239794776481360816033067375,-1089109067446282567193593440929044224568758719822073110518⟩, + ⟨-1774172689841005640459215470319589888074437350831638179126,-1774172689841005640445871033042207511343650508923943022176⟩, + ⟨-1159961368095303152815577339327132707361179083224500855041,-1159961368095303152809850005568306579012130452473539132276⟩, + ⟨163858936486772411734348275226995890269141731545692382465,163858936486772411744417054979413116817182802104579788016⟩, + ⟨-448945510530832928228918873952668251762651468812520186699,-448945510530832928223239276179397233943365799573594079068⟩] +lemma tr0_2_1_12_calc (r : Fin 8) : taylorRowBox 0 2 1 12 r = tr0_2_1_12 r := by + revert r + decide +kernel +def tr0_2_1_13 : Fin 8 → RI := ![⟨-133130109234722031179461238186754648077158397531407876397,-133130109234722031179102801272880237632137023072227696420⟩, + ⟨196047200142868243360204398795114508907961292612325405754,196047200142868243360462174317289079654103539177151853624⟩, + ⟨-1806634068352878915428583267902484739724944685155939542898,-1806634068352878915423184242755675652446565709065058546056⟩, + ⟨1030182530746644376543989047792301751598958848767314598655,1030182530746644376545986824794106059335532801674742021369⟩, + ⟨1735685622474940191802476835258568967662400532098557994015,1735685622474940191808199235519977799862913889743753726547⟩, + ⟨1174527441994188163528073665043453367726472139681881502644,1174527441994188163530529676901795450519988100511078581681⟩, + ⟨-328662258515226758409647151771203475809171820647805673232,-328662258515226758405329428461118467813678254457402230063⟩, + ⟨631443386876852386956429091116833458866419603291978766369,631443386876852386958864632691812453139111475573236089375⟩] +lemma tr0_2_1_13_calc (r : Fin 8) : taylorRowBox 0 2 1 13 r = tr0_2_1_13 r := by + revert r + decide +kernel +def tr0_2_1_14 : Fin 8 → RI := ![⟨12944245140747039173996652317093703687298204435220495436,12944245140747039174132246934144746485320997123237550174⟩, + ⟨-85678678773348628395841521184860636771458376607714908668,-85678678773348628395744006191668178436445681828593644356⟩, + ⟨148916670575128553013347222936994768231133222732756144026,148916670575128553015389643008414238278650942462119373899⟩, + ⟨-77978909891940674699005624182251277209362511026353330782,-77978909891940674698249876665709006317815644208513924312⟩, + ⟨-136832664109740856695678525605989891688070112353272672146,-136832664109740856693513774593965325551381731458946089310⟩, + ⟨-96238363674903488679599648055292564421413788816302284993,-96238363674903488678670552935642593618564913148718356769⟩, + ⟨42092414734812574104676008915959507808783781308139699192,42092414734812574106309378739597598347241643371364342693⟩, + ⟨-68052556731010345312224567645810598101403375251663217145,-68052556731010345311303216316213528870026724727231225136⟩] +lemma tr0_2_1_14_calc (r : Fin 8) : taylorRowBox 0 2 1 14 r = tr0_2_1_14 r := by + revert r + decide +kernel +def tr0_2_1_15 : Fin 8 → RI := ![⟨12820422253683879088366786729992331448325807579043848279,12820422253683879088422689165693504339792231331449702352⟩, + ⟨-12589942776018976971182354739721800615923746641566140902,-12589942776018976971142151627266742136741280440931023829⟩, + ⟨173036246944812068189174565330133205951756902420352820823,173036246944812068190016606549786483499399725513851438033⟩, + ⟨-99249548064693521675203665761570102736409199354230856285,-99249548064693521674892089034829032139621220640139010040⟩, + ⟨-166774333662818040866437762286746339128512047127190219051,-166774333662818040865545286929734967876406579297401064176⟩, + ⟨-112036824643230522002498968826966249391167150131618706501,-112036824643230522002115925006271498271480983859293039049⟩, + ⟨29025956479910622128173286191938594929740780374730547398,29025956479910622128846685723140201227286853970394420102⟩, + ⟨-57666533298016758326685587262356563108277910107998846146,-57666533298016758326305736022077845394440855067883771225⟩] +lemma tr0_2_1_15_calc (r : Fin 8) : taylorRowBox 0 2 1 15 r = tr0_2_1_15 r := by + revert r + decide +kernel +def tr0_2_1_16 : Fin 8 → RI := ![⟨-3852073765387638347918586091199605636448561722718460722,-3852073765387638347899609837391916244891656843124366252⟩, + ⟨22948175618902511311161827836565676074766913189821356045,22948175618902511311175474906791375760953256340601065769⟩, + ⟨-49892721710048226007849993917234619443300438849815440297,-49892721710048226007564160434306631353792053872273221794⟩, + ⟨28053732367938658960082367584721209905652435427153571109,28053732367938658960188133263319394622538611476590203844⟩, + ⟨47577858724988927112016123259138223291920701313714688976,47577858724988927112319076765174560744447604480829534213⟩, + ⟨32271824041943394347261730407400632831534829011033692740,32271824041943394347391755810940922664143039770711302569⟩, + ⟨-9664628249398307121643096314224632942863052436715957490,-9664628249398307121414508771343575988968773691644239318⟩, + ⟨18004434884557813681876138955565595232807571657791354193,18004434884557813682005080627861074803848778433492443071⟩] +lemma tr0_2_1_16_calc (r : Fin 8) : taylorRowBox 0 2 1 16 r = tr0_2_1_16 r := by + revert r + decide +kernel +def tr0_2_1_17 : Fin 8 → RI := ![⟨-426340911740509902288079188668105345839342887204489088,-426340911740509902282034649789691293420079084355157570⟩, + ⟨-5262700375319282482713515268994691486204965695707290484,-5262700375319282482709168244160900945445947230894512175⟩, + ⟨-5352667521226419925536579784948638822489356551946975483,-5352667521226419925445532752282875249091663657158885083⟩, + ⟨3065926528909721811314532940501874850272635636503339051,3065926528909721811348222664657948650042355362282018106⟩, + ⟨5157383945977052517951816807662039995918407647178241886,5157383945977052518048317110837369155501621015342759282⟩, + ⟨3402370374269115713814685032782879457443068482108758216,3402370374269115713856102248996809154836211606642541287⟩, + ⟨-740964810439277653382227760991634778657602033962025460,-740964810439277653309415376416357304656549807624966725⟩, + ⟨1596684950162297169821039006016184898683174358738791698,1596684950162297169862111019446013782012371225132594077⟩] +lemma tr0_2_1_17_calc (r : Fin 8) : taylorRowBox 0 2 1 17 r = tr0_2_1_17 r := by + revert r + decide +kernel +def tr0_2_1_18 : Fin 8 → RI := ![⟨385711943113003950297299465215806519217800123199857311,385711943113003950299521893615716864999863547400431098⟩, + ⟨-3275280108526692322922616267718520580473556618164266794,-3275280108526692322921017973515983878801163286329046189⟩, + ⟨4860514512240959415679156507622784768000019615603939556,4860514512240959415712632264036390601619188522153776417⟩, + ⟨-2735684061634543816789981291105619761629350573630669015,-2735684061634543816777594407465500753940121049259762343⟩, + ⟨-4638200638033294602598950923149631647603537452570090805,-4638200638033294602563470133184804504702952825275493301⟩, + ⟨-3119655898807844787215919717497577131259354635370406768,-3119655898807844787200691624932383388138819896518631104⟩, + ⟨873260280706498239136981787248847481633459450928770023,873260280706498239163753111680982798059640299393744992⟩, + ⟨-1672926379456230704928912488785802932008839890993073737,-1672926379456230704913811318799995185503055429844742692⟩] +lemma tr0_2_1_18_calc (r : Fin 8) : taylorRowBox 0 2 1 18 r = tr0_2_1_18 r := by + revert r + decide +kernel +def tr0_2_1_19 : Fin 8 → RI := ![⟨-33699878863296481550699359024320369175096943204154065,-33699878863296481549972936263472084966369103151648272⟩, + ⟨2128109838350248933043869829393651747292678586145125273,2128109838350248933044392247702999546528022583080935093⟩, + ⟨-473416993499995898400664437521987497792638824039651003,-473416993499995898389722554581361043614967516639978875⟩, + ⟨270572690770551810895068950121209134759444589234621642,270572690770551810899117725871203722842418782126532483⟩, + ⟨455234135588943314594975473778359651674451176173022810,455234135588943314606572721817795835574583973065788457⟩, + ⟨310220608014231676836761855337978740381314559586258432,310220608014231676841739308399509071489174047461429147⟩, + ⟨-92454369129582436373961399383001640412237467486942731,-92454369129582436365210926518443117095373089325244322⟩, + ⟨172594314840680249839486041106641307902939866412547929,172594314840680249844422008264754203299005238708165837⟩] +lemma tr0_2_1_19_calc (r : Fin 8) : taylorRowBox 0 2 1 19 r = tr0_2_1_19 r := by + revert r + decide +kernel +def tr0_2_1_20 : Fin 8 → RI := ![⟨-20825254923448610350226230471629576955455803582383217,-20825254923448610350044560589429930247146728721858055⟩, + ⟨12919506205380554038098159215186559760703179533739506,12919506205380554038228809957199919162300850769208782⟩, + ⟨-234628649602089598049050827131534217152951395711517506,-234628649602089598046314389492173208583920844181993003⟩, + ⟨128800566473611961900375646257686426321466188437408105,128800566473611961901388197974376962473615527690279657⟩, + ⟨221065141537286666032160954523010149003155562404513888,221065141537286666035061291349891356515085946964870053⟩, + ⟨147507137233575660947917431873755589323593045226701895,147507137233575660949162234982997690268987969676479763⟩, + ⟨-41778234013800611923880222751639419127963210793100038,-41778234013800611921691831280156093585263688255471700⟩, + ⟨79481882846006155295208706939700115587792988890999841,79481882846006155296443134907115361216870787728181105⟩] +lemma tr0_2_1_20_calc (r : Fin 8) : taylorRowBox 0 2 1 20 r = tr0_2_1_20 r := by + revert r + decide +kernel +def tr0_2_1 : Fin 21 → Fin 8 → RI := ![tr0_2_1_0,tr0_2_1_1,tr0_2_1_2,tr0_2_1_3,tr0_2_1_4,tr0_2_1_5,tr0_2_1_6,tr0_2_1_7,tr0_2_1_8,tr0_2_1_9,tr0_2_1_10,tr0_2_1_11,tr0_2_1_12,tr0_2_1_13,tr0_2_1_14,tr0_2_1_15,tr0_2_1_16,tr0_2_1_17,tr0_2_1_18,tr0_2_1_19,tr0_2_1_20] +lemma tr0_2_1_mem (l : Fin 21) (r : Fin 8) : (tr0_2_1 l r).Mem (taylorRow 0 (nearNode 2) (nearDisplacement 2 1) l.val r) := by + have he : taylorRowBox 0 2 1 l r = tr0_2_1 l r := by + fin_cases l + · exact tr0_2_1_0_calc r + · exact tr0_2_1_1_calc r + · exact tr0_2_1_2_calc r + · exact tr0_2_1_3_calc r + · exact tr0_2_1_4_calc r + · exact tr0_2_1_5_calc r + · exact tr0_2_1_6_calc r + · exact tr0_2_1_7_calc r + · exact tr0_2_1_8_calc r + · exact tr0_2_1_9_calc r + · exact tr0_2_1_10_calc r + · exact tr0_2_1_11_calc r + · exact tr0_2_1_12_calc r + · exact tr0_2_1_13_calc r + · exact tr0_2_1_14_calc r + · exact tr0_2_1_15_calc r + · exact tr0_2_1_16_calc r + · exact tr0_2_1_17_calc r + · exact tr0_2_1_18_calc r + · exact tr0_2_1_19_calc r + · exact tr0_2_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 2 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows03.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows03.lean new file mode 100644 index 0000000000000000000000000000000000000000..737739bad9608e52455aa77e6d8f8eb3e4043139 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows03.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_3_0_0 : Fin 8 → RI := ![⟨6143646843334063460085241780186167184745633146690839349842,6143646843334063460195708629053276910607080844165297533131⟩, + ⟨-12688037359324949881616956366373410513137332679436753698260,-12688037359324949881537512401317387533083723131296658291757⟩, + ⟨207837781210653771205467184043901386629627055216646934839163,207837781210653771207131112260890982010541518102335853347523⟩, + ⟨-114527054806539052469376242707907747280951614708176189367840,-114527054806539052468760546830813454828083425764815598083202⟩, + ⟨-186798171897991910198475268319428038829140916280098272278373,-186798171897991910196711678966516572206050601118011232179170⟩, + ⟨-165850365769303261384466310151385760390805241033284969382903,-165850365769303261383709390648162461208633756929522686581686⟩, + ⟨-281813115136500132033691642185630669988122339683719788041917,-281813115136500132032360960913553711929450896229534060488603⟩, + ⟨216452729427083700477389754326660641132062567320566214855760,216452729427083700478140365083133729945819919395371060633600⟩] +lemma tr0_3_0_0_calc (r : Fin 8) : taylorRowBox 0 3 0 0 r = tr0_3_0_0 r := by + revert r + decide +kernel +def tr0_3_0_1 : Fin 8 → RI := ![⟨11175688994577649896718307116466045695306147316537881273889,11175688994577649896813817653531638678128012307670260725816⟩, + ⟨-7461353320293241953761182900328938187385637041285833415627,-7461353320293241953692495001231850731400301667935547320479⟩, + ⟨338707351826566536559200075904264495658582357769386576729579,338707351826566536560638721790149249387958703481897863863904⟩, + ⟨-182130201055471836098908838418026666391573844711882397640789,-182130201055471836098376502748992434774041643086290193631271⟩, + ⟨-293826613136933052037831973379838006463074024559598189249327,-293826613136933052036307159664153812478512716284197545951026⟩, + ⟨-275451795047605355859731247378423718232833179963307184527545,-275451795047605355859076808612119379361331127519755977359657⟩, + ⟨-17473060135444023725107844310543970798845819160349090913324,-17473060135444023723957326447057214928388431698846567342817⟩, + ⟨-217783968807270065439345975938628832930328271244343018647872,-217783968807270065438696991766367072239662260367418064592038⟩] +lemma tr0_3_0_1_calc (r : Fin 8) : taylorRowBox 0 3 0 1 r = tr0_3_0_1 r := by + revert r + decide +kernel +def tr0_3_0_2 : Fin 8 → RI := ![⟨1644582528587797769557029605431581167692474984249491689805,1644582528587797769618549228524249148014316351813870067040⟩, + ⟨14544652706144234769058270798113245607438539199870463990979,14544652706144234769102513598884456579956923378976062843697⟩, + ⟨-5947644051357509969254698891585408606770722389701532708043,-5947644051357509968328047703262185274249063282286741684913⟩, + ⟨12045872451241243816008462138870371906174729237138501352731,12045872451241243816351346711934274665043851205214818057314⟩, + ⟨28943997285876393027896139965797056287416596036495408775790,28943997285876393028878293013804296639993852500142451425362⟩, + ⟨-8158397215066107351919037936360328218684978069717196824960,-8158397215066107351497505113929327816163449333427701259768⟩, + ⟨218059778895312140978581586360105120430063321564229436499493,218059778895312140979322650408992773051286374803235992310411⟩, + ⟨-259113187539149747908994711309724931869847718126684058333770,-259113187539149747908576691865024225903116404289293029979210⟩] +lemma tr0_3_0_2_calc (r : Fin 8) : taylorRowBox 0 3 0 2 r = tr0_3_0_2 r := by + revert r + decide +kernel +def tr0_3_0_3 : Fin 8 → RI := ![⟨-8459439335806119214949238486741776761663250782512282405151,-8459439335806119214910656053428600519199717362324908054972⟩, + ⟨7415354910154235345525072160387415346997366535881512353775,7415354910154235345552819321770179906889542374115074326462⟩, + ⟨-272156628926391403733647213370167509559561961023585482022586,-272156628926391403733066058026840950100992128630536295279142⟩, + ⟨152547684723751412139573984330826215240594121041587584167870,152547684723751412139789026629715609780530649256801324911188⟩, + ⟨258523850093821136408291037890976074944157684791510855802658,258523850093821136408907001588074348945989275075215406607422⟩, + ⟨207046366924634614666994725910380488963476576900831951137864,207046366924634614667259092972461143800478521473548734518858⟩, + ⟨26971948677877260232210395232309676659802448561972799210805,26971948677877260232675158389251198870020700387806474136254⟩, + ⟨75010152998019046043357092745324783178602171705389362152928,75010152998019046043619256369497170661331539460051903046020⟩] +lemma tr0_3_0_3_calc (r : Fin 8) : taylorRowBox 0 3 0 3 r = tr0_3_0_3 r := by + revert r + decide +kernel +def tr0_3_0_4 : Fin 8 → RI := ![⟨-5072717428771299736470207898197428703376787848358764548588,-5072717428771299736450111173349259702501907636037860019079⟩, + ⟨-7362143345969922669339687143546840140654032080574857498989,-7362143345969922669325234269021563565000870752350870067639⟩, + ⟨-104144516859040752104279211272127424539175422451922569529095,-104144516859040752103976500477951932236145674571944273023887⟩, + ⟨52295333068993350866108987672346974223380615234226433358474,52295333068993350866220998386582737233355101866598883200066⟩, + ⟨88357525775667005432522400209528247489573325526618256612367,88357525775667005432843241895140510512711802124836528504020⟩, + ⟨83671049217339546605270249268560008082845132269344140459149,83671049217339546605407952146572138491196807471519521077545⟩, + ⟨-90011991587062263586953300358603846011735600080318856945630,-90011991587062263586711215645930188493781778040998350911256⟩, + ⟨131574061878351721317842442818779036823153672206501019060053,131574061878351721317978997975293722979346612799015086130653⟩] +lemma tr0_3_0_4_calc (r : Fin 8) : taylorRowBox 0 3 0 4 r = tr0_3_0_4 r := by + revert r + decide +kernel +def tr0_3_0_5 : Fin 8 → RI := ![⟨1633606625690851560988074916622882541623896155548610981784,1633606625690851560997236627095803502610146154931041039975⟩, + ⟨-3912156343983279574521820034101860847025956662063516521800,-3912156343983279574515231246481718841461353081679867075661⟩, + ⟨74256031285130419052269237204560043402297495467369896612099,74256031285130419052407237235625736350309767986794372969478⟩, + ⟨-44623388326984759716172542007643413854353711740487901765899,-44623388326984759716121478476563805940557958248401063887873⟩, + ⟨-74981052622719473478326580300523468244096669358077076941550,-74981052622719473478180314744625800678019276021165538460283⟩, + ⟨-53845433959319080822688829364616783936095295605368469935107,-53845433959319080822626053270021533535737358975064459876759⟩, + ⟨-18114341610653383389591157796231561462609717861159621301959,-18114341610653383389480796030132942031019457979629680874822⟩, + ⟨-2706368571259277910242557900652427309952353240683315388777,-2706368571259277910180305030249762084024150584658890145077⟩] +lemma tr0_3_0_5_calc (r : Fin 8) : taylorRowBox 0 3 0 5 r = tr0_3_0_5 r := by + revert r + decide +kernel +def tr0_3_0_6 : Fin 8 → RI := ![⟨2371796108790671828676583696277928030926135125984768148862,2371796108790671828680966972669320251046229748315342695462⟩, + ⟨2124138082607800674267544707246095042524874753628850503870,2124138082607800674270697009134284034185800930631444646221⟩, + ⟨53470536325412428512921134741105178280481175838677797515467,53470536325412428512987158687175085042146075877723673607536⟩, + ⟨-28922732068765077579430422429036726158736399282880659944266,-28922732068765077579405991885100230694040502030619134085971⟩, + ⟨-49379848385459750699735181308099091067257313117232205126389,-49379848385459750699665202851575069446607782260079961552867⟩, + ⟨-39881869154590371781548185191481218401599671646238039081534,-39881869154590371781518150955605527946234780356220975720685⟩, + ⟨22147886824527655578873157368478089462800183826597109099677,22147886824527655578925958221034951454807465684428717784439⟩, + ⟨-36894518146177912391468233616796910463688035558926556986985,-36894518146177912391438449709311359613167500000262075289415⟩] +lemma tr0_3_0_6_calc (r : Fin 8) : taylorRowBox 0 3 0 6 r = tr0_3_0_6 r := by + revert r + decide +kernel +def tr0_3_0_7 : Fin 8 → RI := ![⟨346062309238014611083579537132061020640662821013529851303,346062309238014611085015562521193297725685168101284550002⟩, + ⟨1791026096192991724630118823180266148399759413199959046251,1791026096192991724631151563336364713380379791357115767523⟩, + ⟨-3960571698917457341489995010332596968095964287480052334971,-3960571698917457341468364600934310726539940558379737121475⟩, + ⟨3428745736922424282646974507007294828288612209081888576715,3428745736922424282654978310153812635687608291432837930813⟩, + ⟨5203787399014867876384253699802256649916753355783136201502,5203787399014867876407179664607465948228450110431627975804⟩, + ⟨2869693416908176900546093385680383385219236166450196043330,2869693416908176900555933040184098925716922049849107321166⟩, + ⟨6666775178419448749521804756969579478899593851165717157308,6666775178419448749539103087726579424738694649787353353386⟩, + ⟨-5538931806345300506709202476692323045737683071403547383882,-5538931806345300506699444833433339336655702380409473285583⟩] +lemma tr0_3_0_7_calc (r : Fin 8) : taylorRowBox 0 3 0 7 r = tr0_3_0_7 r := by + revert r + decide +kernel +def tr0_3_0_8 : Fin 8 → RI := ![⟨-459287213234025815349587605343966652001055454745660088937,-459287213234025815348901219933314190416892554603022881624⟩, + ⟨-354020328781099335827758399425441814511012063046624428853,-354020328781099335827264774604140182448474079635857407627⟩, + ⟨-11736392728588634344973702989676373328244366028503937308668,-11736392728588634344963364177041644749401382839205960346437⟩, + ⟨6687134002421571675954984500587390669017342718826286743082,6687134002421571675958810124947010501485813319731990946546⟩, + ⟨11256620238493297368756954069489050051744674981903431588194,11256620238493297368767912126279367961562277184035634023465⟩, + ⟨8529987832905543406443750041643902718728928535502383585259,8529987832905543406448453158558161609905962848897355964685⟩, + ⟨-3251826929972569708628697683355558399420439673779555920861,-3251826929972569708620429499555022011692675296310299282642⟩, + ⟨6030355040103794094749030848806861594552142449971389328614,6030355040103794094753694766329516690928594503549246596391⟩] +lemma tr0_3_0_8_calc (r : Fin 8) : taylorRowBox 0 3 0 8 r = tr0_3_0_8 r := by + revert r + decide +kernel +def tr0_3_0_9 : Fin 8 → RI := ![⟨-210319160138477034790726861260033447397440804373805399431,-210319160138477034790512517692297830423447557251226210080⟩, + ⟨-703226492312784183646056906325252788123062141659188087130,-703226492312784183645902757790574797436308008058099705685⟩, + ⟨-2175161745101166326465300776450871904853652780083690908897,-2175161745101166326462072185120144105804147008829578060099⟩, + ⟨1020955595604904808551693980406949090176991123237273155395,1020955595604904808552888641543025276059261454855414322564⟩, + ⟨1856867345888792955571340575952037882578029850131335158550,1856867345888792955574762544065021044065762417320596157622⟩, + ⟨1473936705857776784096303240829928523235455582466718878185,1473936705857776784097771924231592503684885015123608704652⟩, + ⟨-1490530063895189635068022246611376942683809532190569418787,-1490530063895189635065440268635054850803868243671965901174⟩, + ⟨1895881659674601872449789405918935806806730839437961756002,1895881659674601872451245848182665928616008148005034825637⟩] +lemma tr0_3_0_9_calc (r : Fin 8) : taylorRowBox 0 3 0 9 r = tr0_3_0_9 r := by + revert r + decide +kernel +def tr0_3_0_10 : Fin 8 → RI := ![⟨23513057411824294179179725793011645948517818223077033250,23513057411824294179261467278794365633308232473661443325⟩, + ⟨576136011448751922025103720980800671106238859715177182,576136011448751922083889391055128136919514120227924711⟩, + ⟨1190834130447800260735499434224511684456250350248866126641,1190834130447800260736730681119992137154384593509711981582⟩, + ⟨-728985752847585150680638364289493653536156016316048629697,-728985752847585150680182771535782670866972466132761397501⟩, + ⟨-1191192534240829323806377455882579685146219452559814496761,-1191192534240829323805072463338312529462408013936380025572⟩, + ⟨-881154084657151229975957447964885405786935033320934131524,-881154084657151229975397354818025952994331645420214025903⟩, + ⟨229393162714107060225785501297040399254932022850672691349,229393162714107060226770157465059621968082306704292141369⟩, + ⟨-504660870416557409231832373154526620380840946998738343401,-504660870416557409231276948254879568391347473203933620130⟩] +lemma tr0_3_0_10_calc (r : Fin 8) : taylorRowBox 0 3 0 10 r = tr0_3_0_10 r := by + revert r + decide +kernel +def tr0_3_0_11 : Fin 8 → RI := ![⟨40049510637660315109544602696274680352545492656479379154,40049510637660315109574063707963010409261865003141972827⟩, + ⟨210364205455229429076382471807243946006388978533913983121,210364205455229429076403659155342183787252833303319270405⟩, + ⟨560764700096821754902580812527319084096860437158527720576,560764700096821754903024574698130581219911470438810651233⟩, + ⟨-300373829018454048034005066629475804476216377929961670777,-300373829018454048033840863308347167772659716185517129958⟩, + ⟨-518919884596288973796943499034836762770487081471018059835,-518919884596288973796473157687077336625535131824389032986⟩, + ⟨-380784208643799091507185322846068545799424619235153633507,-380784208643799091506983455818823196626344223403537145620⟩, + ⟨210455297752061146226680343393278672177491970196310609942,210455297752061146227035230102301202321419396138382406078⟩, + ⟨-315180520717203833164814547477364579655963452128545860292,-315180520717203833164614362965115870344372596498365643753⟩] +lemma tr0_3_0_11_calc (r : Fin 8) : taylorRowBox 0 3 0 11 r = tr0_3_0_11 r := by + revert r + decide +kernel +def tr0_3_0_12 : Fin 8 → RI := ![⟨6671660501823880467697142052029229885819843275816848326,6671660501823880467704884654988554405601581882935916320⟩, + ⟨21385880993497102984490573789137741658174098941451424817,21385880993497102984496142003351104522393197708899726442⟩, + ⟨-4652457784993625488550176393615725448183517748769197867,-4652457784993625488433551943203162411860565232135977764⟩, + ⟨12288922725349801359663595422821322370185016615513405029,12288922725349801359706749443939066914445682366160924920⟩, + ⟨13375692324311879698821988958790439453005642706390696260,13375692324311879698945598641628337378750207720800210962⟩, + ⟨12436157126960458785778399851204772250449042673393616065,12436157126960458785831452212731648357339407263286899331⟩, + ⟨8811140241059918619834700917398801503647993070059901244,8811140241059918619927968144996275916652760106932866341⟩, + ⟨-2968087214353978256250401846630078705301049094212097906,-2968087214353978256197791664289439163332298337164919344⟩] +lemma tr0_3_0_12_calc (r : Fin 8) : taylorRowBox 0 3 0 12 r = tr0_3_0_12 r := by + revert r + decide +kernel +def tr0_3_0_13 : Fin 8 → RI := ![⟨-3560244201896224632280735969073897086359695397669643742,-3560244201896224632277377739953487142239209707132275554⟩, + ⟨-46970321258476258796652336499372107034155315528298096965,-46970321258476258796649921376289707200861502690024091576⟩, + ⟨-60425217481273226338728542244747411671357474291667397468,-60425217481273226338677958270918171671791226142198257748⟩, + ⟨34115687969918290231850214868855805710472121741612403434,34115687969918290231868932229292951917337518977322506871⟩, + ⟨57609622734753288549555920516044240015266929549890628323,57609622734753288549609534221723788761481589516413463389⟩, + ⟨41525500086024253742042331309258796648297056606366188971,41525500086024253742065341915137480009666024577607286694⟩, + ⟨-18193702494801784744311651005285871010778658506088476220,-18193702494801784744271197849999983126105759140898943065⟩, + ⟨29508616593433973185350768702320341008236404662141886159,29508616593433973185373587520142952305806263178330697425⟩] +lemma tr0_3_0_13_calc (r : Fin 8) : taylorRowBox 0 3 0 13 r = tr0_3_0_13 r := by + revert r + decide +kernel +def tr0_3_0_14 : Fin 8 → RI := ![⟨-1545358329896070578772359586035292097471598593166366115,-1545358329896070578771269272577930691858153111385199059⟩, + ⟨-7834551652036430330525417580065614340148280888949288746,-7834551652036430330524633464061811342995804027229060954⟩, + ⟨-13654855965284287363780617998393356679302472779635064709,-13654855965284287363764194941653882719649408674972983261⟩, + ⟨6825217778451780030806539568220564111631343162679209115,6825217778451780030812616518076834160083602243717900822⟩, + ⟨12240659977433126793148682503201493691589534776637705037,12240659977433126793166089220460669125765921383459620922⟩, + ⟨8261886903032841953045863458095648454717775618248296918,8261886903032841953053334292379269729846029181993958001⟩, + ⟨-3818031608345889603147232754912793489706829634774493473,-3818031608345889603134098862608714873092668854131314312⟩, + ⟨5854969977310068641390238292371385583381917318989873925,5854969977310068641397646858988511291035303293268714757⟩] +lemma tr0_3_0_14_calc (r : Fin 8) : taylorRowBox 0 3 0 14 r = tr0_3_0_14 r := by + revert r + decide +kernel +def tr0_3_0_15 : Fin 8 → RI := ![⟨50992339597574834946259885856863751766978842134507254,50992339597574834946597976073825353854125394440473983⟩, + ⟨8060632486745599120686145027176624393232555051519985954,8060632486745599120686388170052711289822720422985395866⟩, + ⟨2468261880569048561715089215999849316648744033852246101,2468261880569048561720181765099952431912815220345203872⟩, + ⟨-1526537915837443698831758816170348960473241076209727466,-1526537915837443698829874443120226847180007437958013178⟩, + ⟨-2470234968450991512386483700857892292761007103897053877,-2470234968450991512381086133053297279205902419424238983⟩, + ⟨-1828834194475233197641644476237472184677984276129639395,-1828834194475233197639327880063782341565920059586128338⟩, + ⟨746414807482150698175382747071971784668933254062821353,746414807482150698179455374506695253867424976712970194⟩, + ⟨-1253714748435855906516787677428281298061724212198095715,-1253714748435855906514490389544589932234750244390680142⟩] +lemma tr0_3_0_15_calc (r : Fin 8) : taylorRowBox 0 3 0 15 r = tr0_3_0_15 r := by + revert r + decide +kernel +def tr0_3_0_16 : Fin 8 → RI := ![⟨153624051234837493816289317076246502624829881124827580,153624051234837493816391187791227605362902962416104755⟩, + ⟨1782519007601104939713942910559999020167631296484082329,1782519007601104939714016172480613221845789560027737948⟩, + ⟨1721079249589761322672290532167366243399116489486219445,1721079249589761322673824979459489797709220222468569123⟩, + ⟨-924787826562135766566292484808395940932346300686540580,-924787826562135766565724700175099138672350971077270093⟩, + ⟨-1601818932978732500206386703307650967336391682849969926,-1601818932978732500204760350151586648224342420462115881⟩, + ⟨-1092937810815151132261560808590949131384111433327086022,-1092937810815151132260862789847373389450437175137959040⟩, + ⟨411098164063610158727888408817300910483388635834826616,411098164063610158729115541245056782932002723528086052⟩, + ⟨-691089952772249151137449113804155346812144531417028116,-691089952772249151136756912884101380389064524525846225⟩] +lemma tr0_3_0_16_calc (r : Fin 8) : taylorRowBox 0 3 0 16 r = tr0_3_0_16 r := by + revert r + decide +kernel +def tr0_3_0_17 : Fin 8 → RI := ![⟨23432041756466259482382561223390172810036201752102860,23432041756466259482411705805750205133496396775519424⟩, + ⟨-1098544635138628249228396140545704978871830515450775700,-1098544635138628249228375180762717086867066484861879520⟩, + ⟨156478058184218620023147815663070609460493736054733900,156478058184218620023586811555929895841848687193885500⟩, + ⟨-73055901351447550293618340923617028160275614920108565,-73055901351447550293455901246887620360273208058766624⟩, + ⟨-136282657126364327910387640507799253176472818389193311,-136282657126364327909922350914947548235743486344854369⟩, + ⟨-84464492157349697645603132286981311733954767754970738,-84464492157349697645403433435710297126095879318576031⟩, + ⟨23644028582332426944288506420657005775746690836837505,23644028582332426944639581428901523173432525779863496⟩, + ⟨-43862161468359816840241640270745011283999626294198627,-43862161468359816840043605862837867590928843612613520⟩] +lemma tr0_3_0_17_calc (r : Fin 8) : taylorRowBox 0 3 0 17 r = tr0_3_0_17 r := by + revert r + decide +kernel +def tr0_3_0_18 : Fin 8 → RI := ![⟨-7723617399243871603602003394643747716461600350994824,-7723617399243871603591412518707600388805607273965321⟩, + ⟨-306648584401961164194830611051539041037498772178207431,-306648584401961164194822994457189571392367921499073774⟩, + ⟨-98584256593557995545045721552550164676936966325253473,-98584256593557995544886194441120020944195604840038246⟩, + ⟨54691945364960227653457387862535479545108108211614034,54691945364960227653516416962410028255570156569580228⟩, + ⟨93286310772079396419916406510244632628690248851764618,93286310772079396420085488512896540381659999162024460⟩, + ⟨63986576446987503400508790708683167792766240645916231,63986576446987503400581359453415936239446743205750075⟩, + ⟨-22497811344867057820126712008186766992950999549323446,-22497811344867057819999134545877651891803291910393827⟩, + ⟨39003977184935200224778240549573380226471346716759291,39003977184935200224850204450769602242468299928278355⟩] +lemma tr0_3_0_18_calc (r : Fin 8) : taylorRowBox 0 3 0 18 r = tr0_3_0_18 r := by + revert r + decide +kernel +def tr0_3_0_19 : Fin 8 → RI := ![⟨-2862456186794296046162902056068148458122021766413525,-2862456186794296046160183257300979415404764014986662⟩, + ⟨120599498848097874993269750998227161578298217238511192,120599498848097874993271706264954066985395199474225508⟩, + ⟨-28645088338289257731167163533056495191772668508401943,-28645088338289257731126211102257445826199987357012372⟩, + ⟨15181684644013708256214553975322647013991720778977305,15181684644013708256229707419186477690898493084931043⟩, + ⟨26509585850636331397099473827109301426032800520370075,26509585850636331397142879107570294461939351488074138⟩, + ⟨17608492240886201776536747549559784744425767920498843,17608492240886201776555376774837447276827501001388034⟩, + ⟨-5446517588156462460741514592373552817422337655842857,-5446517588156462460708764001267683705283195267160205⟩, + ⟨9927854595122744910192517291820112355896656516529034,9927854595122744910210991246857876459720801853266131⟩] +lemma tr0_3_0_19_calc (r : Fin 8) : taylorRowBox 0 3 0 19 r = tr0_3_0_19 r := by + revert r + decide +kernel +def tr0_3_0_20 : Fin 8 → RI := ![⟨51906980647389123196321523261700108219434156957501,51906980647389123196945965400672217541027225962020⟩, + ⟨42819681808489766209873014172858435662045504344068640,42819681808489766209873463250205382644738388327380119⟩, + ⟨1429776901194133899994190550866013243307401483658027,1429776901194133900003596331018963679222454932297970⟩, + ⟨-871078888314277924634385803510541568643819618712460,-871078888314277924630905424965048129400527629600763⟩, + ⟨-1419378912974881194426731004465706395778608860912864,-1419378912974881194416761864233504729799140843940308⟩, + ⟨-1018100035119826900525887352485902854475327656474110,-1018100035119826900521608671246460034877795318994823⟩, + ⟨394087336275634739049644884002248983324305494466062,394087336275634739057166900493670177773483935948704⟩, + ⟨-659579093325262637395160329869815268981260098295797,-659579093325262637390917310438402207929238529634475⟩] +lemma tr0_3_0_20_calc (r : Fin 8) : taylorRowBox 0 3 0 20 r = tr0_3_0_20 r := by + revert r + decide +kernel +def tr0_3_0 : Fin 21 → Fin 8 → RI := ![tr0_3_0_0,tr0_3_0_1,tr0_3_0_2,tr0_3_0_3,tr0_3_0_4,tr0_3_0_5,tr0_3_0_6,tr0_3_0_7,tr0_3_0_8,tr0_3_0_9,tr0_3_0_10,tr0_3_0_11,tr0_3_0_12,tr0_3_0_13,tr0_3_0_14,tr0_3_0_15,tr0_3_0_16,tr0_3_0_17,tr0_3_0_18,tr0_3_0_19,tr0_3_0_20] +lemma tr0_3_0_mem (l : Fin 21) (r : Fin 8) : (tr0_3_0 l r).Mem (taylorRow 0 (nearNode 3) (nearDisplacement 3 0) l.val r) := by + have he : taylorRowBox 0 3 0 l r = tr0_3_0 l r := by + fin_cases l + · exact tr0_3_0_0_calc r + · exact tr0_3_0_1_calc r + · exact tr0_3_0_2_calc r + · exact tr0_3_0_3_calc r + · exact tr0_3_0_4_calc r + · exact tr0_3_0_5_calc r + · exact tr0_3_0_6_calc r + · exact tr0_3_0_7_calc r + · exact tr0_3_0_8_calc r + · exact tr0_3_0_9_calc r + · exact tr0_3_0_10_calc r + · exact tr0_3_0_11_calc r + · exact tr0_3_0_12_calc r + · exact tr0_3_0_13_calc r + · exact tr0_3_0_14_calc r + · exact tr0_3_0_15_calc r + · exact tr0_3_0_16_calc r + · exact tr0_3_0_17_calc r + · exact tr0_3_0_18_calc r + · exact tr0_3_0_19_calc r + · exact tr0_3_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 3 0 l r +def tr0_3_1_0 : Fin 8 → RI := ![⟨6143646843334063460085241780186167184745633146690839349842,6143646843334063460195708629053276910607080844165297533131⟩, + ⟨-12688037359324949881616956366373410513137332679436753698260,-12688037359324949881537512401317387533083723131296658291757⟩, + ⟨207837781210653771205467184043901386629627055216646934839163,207837781210653771207131112260890982010541518102335853347523⟩, + ⟨-114527054806539052469376242707907747280951614708176189367840,-114527054806539052468760546830813454828083425764815598083202⟩, + ⟨-186798171897991910198475268319428038829140916280098272278373,-186798171897991910196711678966516572206050601118011232179170⟩, + ⟨-165850365769303261384466310151385760390805241033284969382903,-165850365769303261383709390648162461208633756929522686581686⟩, + ⟨-281813115136500132033691642185630669988122339683719788041917,-281813115136500132032360960913553711929450896229534060488603⟩, + ⟨216452729427083700477389754326660641132062567320566214855760,216452729427083700478140365083133729945819919395371060633600⟩] +lemma tr0_3_1_0_calc (r : Fin 8) : taylorRowBox 0 3 1 0 r = tr0_3_1_0 r := by + revert r + decide +kernel +def tr0_3_1_1 : Fin 8 → RI := ![⟨-7450459329718433264542545102354425785418674871780173817211,-7450459329718433264478871410977363796870764877691920849259⟩, + ⟨4974235546862161302461663334154567154266867778623698213653,4974235546862161302507455266885958791590424694190555610419⟩, + ⟨-225804901217711024373759147860099499591972468987931909242603,-225804901217711024372800050602842997105721571846257717819719⟩, + ⟨121420134036981224065584335165994956516027762057526795754181,121420134036981224065939225612017777594382563141254931760527⟩, + ⟨195884408757955368024204773109435874985675144189465030634018,195884408757955368025221315586558670975382683039732126166219⟩, + ⟨183634530031736903906051205741412919574220751679837318239772,183634530031736903906487498252282478821888786642204789685031⟩, + ⟨11648706756962682482638217631371476618925621132564378228545,11648706756962682483405229540362647199230546106899393942217⟩, + ⟨145189312538180043625797994510911381493108173578278709728026,145189312538180043626230650625752555286885514162895345765249⟩] +lemma tr0_3_1_1_calc (r : Fin 8) : taylorRowBox 0 3 1 1 r = tr0_3_1_1 r := by + revert r + decide +kernel +def tr0_3_1_2 : Fin 8 → RI := ![⟨730925568261243453136457602414036074529988881888662973247,730925568261243453163799657121888510228585045250608918685⟩, + ⟨6464290091619659897359231465828109158861572977720206218213,6464290091619659897378894932837536257758632612878250152755⟩, + ⟨-2643397356158893319668755062926848269675876617645125648020,-2643397356158893319256910090338749010777361458794107415516⟩, + ⟨5353721089440552807114872061720165291633212994283778378992,5353721089440552807267265205304122073352822757873252469918⟩, + ⟨12863998793722841345731617762576469461074042682886848344796,12863998793722841346168130228357465173330601111174422855717⟩, + ⟨-3625954317807158823075127971715701430526656919874309699983,-3625954317807158822887780050635256807183755259301200559896⟩, + ⟨96915457286805395990480705048935609080028142917435305110886,96915457286805395990810066848441232467238388801438218804628⟩, + ⟨-115161416684066554626219871693211080831043430278526248148343,-115161416684066554626034085273344100401385068573019124435204⟩] +lemma tr0_3_1_2_calc (r : Fin 8) : taylorRowBox 0 3 1 2 r = tr0_3_1_2 r := by + revert r + decide +kernel +def tr0_3_1_3 : Fin 8 → RI := ![⟨2506500543942553841455009201015881635318434774022194979251,2506500543942553841466441033108674596048370602225861453379⟩, + ⟨-2197142195601254917200835354598571824263568110848910911545,-2197142195601254917192613973448123065776997492113040697414⟩, + ⟨80639001163375230735723276452397318548442112186825568971598,80639001163375230735895470628197780610240581044025328006693⟩, + ⟨-45199313992222640634011563445841662157194266446459651825538,-45199313992222640633947847209133693404620480308618543457146⟩, + ⟨-76599659287058114491528000470540547835848674096360120476274,-76599659287058114491345492708437355539009684382669883200787⟩, + ⟨-61347071681373219160669360880729227792734376732903328746329,-61347071681373219160591029899371996729918985748394652188996⟩, + ⟨-7991688497148817846718565448667021887413540855646362707039,-7991688497148817846580857846610274565867392166510459025423⟩, + ⟨-22225230517931569198109409294665828344098233914089452754377,-22225230517931569198031731183799935756622865690485736934200⟩] +lemma tr0_3_1_3_calc (r : Fin 8) : taylorRowBox 0 3 1 3 r = tr0_3_1_3 r := by + revert r + decide +kernel +def tr0_3_1_4 : Fin 8 → RI := ![⟨-1002018257535071552883004029273566163629982784860990528117,-1002018257535071552879034305846767348642352125637108151916⟩, + ⟨-1454250537475540280363394991317894348771166830730836049184,-1454250537475540280360540102522777988148320148612517544224⟩, + ⟨-20571756416600642390968733090790602378108725422601989042785,-20571756416600642390908938366015196491090503619149486029409⟩, + ⟨10329942334615970541453627194537673920667775848736085601674,10329942334615970541475752767720046860909649751426939891372⟩, + ⟨17453338424823112184201955596943851355965101338591260565406,17453338424823112184265331732373434175350479432066474766227⟩, + ⟨16527614660215219082522518374036544806487927361845756140079,16527614660215219082549718942532768097026529870917436262232⟩, + ⟨-17780146486333286634459911181946438718367525941791379149755,-17780146486333286634412091979443000196302573440197205118272⟩, + ⟨25989938148810216556610852902474871471240231546963164258776,25989938148810216556637826760551846514438837096101745408525⟩] +lemma tr0_3_1_4_calc (r : Fin 8) : taylorRowBox 0 3 1 4 r = tr0_3_1_4 r := by + revert r + decide +kernel +def tr0_3_1_5 : Fin 8 → RI := ![⟨-215125152354350822847372724555825975652364925752235857117,-215125152354350822846166244164330211242652991677183339164⟩, + ⟨515181082335246692940277365791831287764458018986649162227,515181082335246692941145025066911716480784416403426044024⟩, + ⟨-9778572021087133373156508607160590795102520887149876275817,-9778572021087133373138335763563462505652345082122784739041⟩, + ⟨5876330973100873707472787289094822181472652938061045450255,5876330973100873707479511704710243799750283027553962372465⟩, + ⟨9874048082004210499184238978716154821796777089206984488597,9874048082004210499203500286488687176177339174726199432633⟩, + ⟨7090756735383582659769686027327938572607388836222480312989,7090756735383582659777952838138835744670985429513543365941⟩, + ⟨2385427701814437318779364086272650802438776359457406534956,2385427701814437318793897322960534842812802352086863710547⟩, + ⟨356394215145254704221274736493795829994949871230800348323,356394215145254704229472645353406065508128821818378981239⟩] +lemma tr0_3_1_5_calc (r : Fin 8) : taylorRowBox 0 3 1 5 r = tr0_3_1_5 r := by + revert r + decide +kernel +def tr0_3_1_6 : Fin 8 → RI := ![⟨208223526697672149568314618054578043867315017919101730490,208223526697672149568699432442848417101452268713555462977⟩, + ⟨186481258281068920649002553173868426229892982485934749311,186481258281068920649279298469950861711784992538288693222⟩, + ⟨4694258333095192626648769030769178888821392666221370426598,4694258333095192626654565371713587712890739171706879438797⟩, + ⟨-2539169893554135754572766852480590499532413654464145728990,-2539169893554135754570622058499883078763500864142146202334⟩, + ⟨-4335130722454628319318314957089632137591862879976489887640,-4335130722454628319312171443759676878714537811584523373639⟩, + ⟨-3501288924408482570670896916673248254735773642468085735554,-3501288924408482570668260166198564867707854516869879898660⟩, + ⟨1944396099821357965772129041951437209354199951854890236460,1944396099821357965776764507745180923330147879017061643628⟩, + ⟨-3239024912696003282652903911488343305454093656750753974167,-3239024912696003282650289137717321008563401920461965457506⟩] +lemma tr0_3_1_6_calc (r : Fin 8) : taylorRowBox 0 3 1 6 r = tr0_3_1_6 r := by + revert r + decide +kernel +def tr0_3_1_7 : Fin 8 → RI := ![⟨-20254218373326872528066754459402259766295245320971386558,-20254218373326872527982707248698587399179168308062103779⟩, + ⟨-104824572616690873686688340240994368227109562548564617396,-104824572616690873686627896372690474163314679876357914000⟩, + ⟨231803007526947663332396282084861350250165702548059602903,231803007526947663333662259406754646509503168174415500173⟩, + ⟨-200676476600855193497867957795925019372662945269045841402,-200676476600855193497399513898918032931386539900540346510⟩, + ⟨-304565517637815769629684040726911587276287889407978226294,-304565517637815769628342237574160425783879483100247569177⟩, + ⟨-167956450555211085171997909987912511427419306072558636082,-167956450555211085171422018000497975906749990537551483102⟩, + ⟨-390190774045582734312302329780065005197326435835748161516,-390190774045582734311289898898996878508984002263014081451⟩, + ⟨324180736722541593441942816039994254728820258204120978763,324180736722541593442513908100876703179891830425081877064⟩] +lemma tr0_3_1_7_calc (r : Fin 8) : taylorRowBox 0 3 1 7 r = tr0_3_1_7 r := by + revert r + decide +kernel +def tr0_3_1_8 : Fin 8 → RI := ![⟨-17920671633578815535664445506486124510329248043726411031,-17920671633578815535637663816937727899211171159636314234⟩, + ⟨-13813321775333246452050929774868633518490944694396563602,-13813321775333246452031669303255584012621454715253695526⟩, + ⟨-457935762615255356243448859222245324193043393278007613325,-457935762615255356243045454857896823021910380557342760049⟩, + ⟨260921552296894124225647924424687092100051781133901753731,260921552296894124225797194328065034046695352819903929633⟩, + ⟨439215787388246323182713037919402044390586312355933316046,439215787388246323183140604226111598561186245863911341261⟩, + ⟨332826838168544293865203476704898505714769959623321170222,332826838168544293865386985000897633308325939539357281964⟩, + ⟨-126881221471266246823494376914955487006802706369084943720,-126881221471266246823171765262320627189959590893985157194⟩, + ⟨235295060244866832534027114356737779028402448893869176669,235295060244866832534209093153537002420015270981345393794⟩] +lemma tr0_3_1_8_calc (r : Fin 8) : taylorRowBox 0 3 1 8 r = tr0_3_1_8 r := by + revert r + decide +kernel +def tr0_3_1_9 : Fin 8 → RI := ![⟨5470884011121284449156246967355407670416356719637647694,5470884011121284449161822535443637914316399524431660038⟩, + ⟨18292534881072270590189616013248706817425682067050096495,18292534881072270590193625770387107022253102501117934290⟩, + ⟨56580948711669824678584614072118771639065349211032056433,56580948711669824678668597141840492571511975989577287272⟩, + ⟨-26557398005878741146119950437942841098528774317226649046,-26557398005878741146088874560197019467084258248106683714⟩, + ⟨-48301380942694812439886116067738189024115752561507149963,-48301380942694812439797102824134704866125655807917675210⟩, + ⟨-38340476218014617358027700310246169887042682911308624539,-38340476218014617357989496484525905801785970544274758198⟩, + ⟨38772107540229492107580420542658542072426994907282758797,38772107540229492107647583715136157834380454223521391172⟩, + ⟨-49316232777188241563533906125566476423888440368773958784,-49316232777188241563496020719935738103187836701327867655⟩] +lemma tr0_3_1_9_calc (r : Fin 8) : taylorRowBox 0 3 1 9 r = tr0_3_1_9 r := by + revert r + decide +kernel +def tr0_3_1_10 : Fin 8 → RI := ![⟨407752388519840763424952822436348209982933595157087877,407752388519840763426370344857413849658887196278164203⟩, + ⟨9991079878127012619243445448429946099219099262448838,9991079878127012620262878904646161869050829973638757⟩, + ⟨20650885697955045250438642833001405017582014236563513585,20650885697955045250459994537873155319244861449879677373⟩, + ⟨-12641728241222157772307298769368515998933491857739060727,-12641728241222157772299398094000600432992596069703935223⟩, + ⟨-20657100968053806628016232532706084736231413223276432196,-20657100968053806627993601965459737339658686959488782979⟩, + ⟨-15280559919540091440928388740131799954712551848814316089,-15280559919540091440918675868069883924642171838816900582⟩, + ⟨3978028393694146042629076755375524883351968558300544225,3978028393694146042646152199770039338436151028217161219⟩, + ⟨-8751591581678856323619305155214063900658455346012770135,-8751591581678856323609673237700836221320256271246389049⟩] +lemma tr0_3_1_10_calc (r : Fin 8) : taylorRowBox 0 3 1 10 r = tr0_3_1_10 r := by + revert r + decide +kernel +def tr0_3_1_11 : Fin 8 → RI := ![⟨-463013191224961897996622480052771118439309158644711796,-463013191224961897996281880709075205123502904144409831⟩, + ⟨-2432024774748146289513650775627816403305129652803591740,-2432024774748146289513405828273894570165369032709872802⟩, + ⟨-6483011881647958780229946479374595281536682480982936284,-6483011881647958780224816136067500348469746455207622887⟩, + ⟨3472627827904474195856018380528572313380452950080662287,3472627827904474195857916738398993195297076111932810050⟩, + ⟨5999243135097968457468526291402814529227680683140830720,5999243135097968457473963917104696608771006807073475626⟩, + ⟨4402253830448726421595071423828514774118404316925740059,4402253830448726421597405212556511720758588179272551280⟩, + ⟨-2433077894608552374428966627995466264482418123317962866,-2433077894608552374424863775674635870884088101757546721⟩, + ⟨3643808285936727408994395701606898804186777521655195055,3643808285936727408996710038745463706048723094149276714⟩] +lemma tr0_3_1_11_calc (r : Fin 8) : taylorRowBox 0 3 1 11 r = tr0_3_1_11 r := by + revert r + decide +kernel +def tr0_3_1_12 : Fin 8 → RI := ![⟨51420800080292289070070795902295317095064321453831772,51420800080292289070130470827115557221486636131772885⟩, + ⟨164828397788962714251390822763595939778604039327385422,164828397788962714251433738920644293766801089520103417⟩, + ⟨-35858104826940130703317061551987918575645628957793311,-35858104826940130702418196487211474536177816899390458⟩, + ⟨94714987144448370316144382634904225357617925709802042,94714987144448370316476985634105042858133856762641853⟩, + ⟨103091097149789834142218735052819861470061799005677567,103091097149789834143171437725184300615422691934565953⟩, + ⟨95849773713413227783607824369092236274279325061898219,95849773713413227784016717308880631474918593315952552⟩, + ⟨67910512036860962302198992847118477797050245681017000,67910512036860962302917835699362198540590028616529438⟩, + ⟨-22876076986897689372106491527369552550354784613706420,-22876076986897689371701006615841726199162454513346748⟩] +lemma tr0_3_1_12_calc (r : Fin 8) : taylorRowBox 0 3 1 12 r = tr0_3_1_12 r := by + revert r + decide +kernel +def tr0_3_1_13 : Fin 8 → RI := ![⟨18293357432549033155525121600641128974005647488512429,18293357432549033155542376957902109504447106826979052⟩, + ⟨241344364817817664339130876186673140505065429048365581,241344364817817664339143285647172060381616739398364078⟩, + ⟨310478730851019693102620883067836104939409219183871855,310478730851019693102880795214627648482622673948340030⟩, + ⟨-175294288453199655013112332207694339294376958409447758,-175294288453199655013016158084445096997401167333902106⟩, + ⟨-296011554398386612874807240655978291434080284433241629,-296011554398386612874531761046810724178893917275673766⟩, + ⟨-213367615410873886066373803155826163355345230132011452,-213367615410873886066255569345388645928616401895570608⟩, + ⟨93483447731366994407701358374181305650773638015787354,93483447731366994407909216034205023273388623561145890⟩, + ⟨-151622091090331826320375751315769179325121012465406994,-151622091090331826320258502956683327995313764520907200⟩] +lemma tr0_3_1_13_calc (r : Fin 8) : taylorRowBox 0 3 1 13 r = tr0_3_1_13 r := by + revert r + decide +kernel +def tr0_3_1_14 : Fin 8 → RI := ![⟨-5293605473298534939826358786268994368346245052066561,-5293605473298534939822623931268803217291180556874840⟩, + ⟨-26837157896479127198049671999085719633346867622295932,-26837157896479127198046986019601782291217704564282338⟩, + ⟨-46774536932022299155227986065909429024878002349908792,-46774536932022299155171729092130267722566446015175376⟩, + ⟨23379697439426005902345247122807135568925478374903990,23379697439426005902366063637914201592945665999732403⟩, + ⟨41930226407544006532124296463651190848822757952316262,41930226407544006532183922954137399376109035192701946⟩, + ⟨28300989410403889834682898195125058155738838309297028,28300989410403889834708489443762222848150874930987220⟩, + ⟨-13078619131995012984187073229304059577922561642391014,-13078619131995012984142083246824552799892762530153854⟩, + ⟨20056125830681353908113906693146616964928966370957055,20056125830681353908139284644677347687664797567559946⟩] +lemma tr0_3_1_14_calc (r : Fin 8) : taylorRowBox 0 3 1 14 r = tr0_3_1_14 r := by + revert r + decide +kernel +def tr0_3_1_15 : Fin 8 → RI := ![⟨-116449077545302383765545520643984186049291484363615,-116449077545302383764773438127218429800985029665571⟩, + ⟨-18407729963381865391325734256712880189753191850806857,-18407729963381865391325179001475417473780014319432615⟩, + ⟨-5636666632691018435790748109162268686313119817437778,-5636666632691018435779118467342708570621166093087814⟩, + ⟨3486090921500944645000300423730085736035119868503446,3486090921500944645004603687811900567533622148728148⟩, + ⟨5641172491131351668646499026573274552899326093596778,5641172491131351668658825226876961056977557996612472⟩, + ⟨4176432315336941093857915169004163158102012126255906,4176432315336941093863205482992501696995331335008028⟩, + ⟨-1704556340881930176141248508463772890766368590787481,-1704556340881930176131948019180441509588960669208499⟩, + ⟨2863056041602759453710782367228188383928357470586004,2863056041602759453716028587680575361934297782075472⟩] +lemma tr0_3_1_15_calc (r : Fin 8) : taylorRowBox 0 3 1 15 r = tr0_3_1_15 r := by + revert r + decide +kernel +def tr0_3_1_16 : Fin 8 → RI := ![⟨233883222411442441684334950481103794085055888214963,233883222411442441684490042414284989211215612564355⟩, + ⟨2713776170829504373378240878938493266088859233816690,2713776170829504373378352415731954777853710729929415⟩, + ⟨2620237896891486764872317041665508370019739674363789,2620237896891486764874653143821503230935323889122709⟩, + ⟨-1407932906238691899382732178007310623843852059296065,-1407932906238691899381867760628627141008747059747476⟩, + ⟨-2438671358770722934588345509242625327846870504428332,-2438671358770722934585869486029711358921635514756285⟩, + ⟨-1663930973269293719349579475561366039341048227448589,-1663930973269293719348516784714855806346407911298081⟩, + ⟨625871812165966261690196908615888129305815363685220,625871812165966261692065142686153524358608649637604⟩, + ⟨-1052142186274353402409996922234079683065307204489429,-1052142186274353402408943088668065288066371714568592⟩] +lemma tr0_3_1_16_calc (r : Fin 8) : taylorRowBox 0 3 1 16 r = tr0_3_1_16 r := by + revert r + decide +kernel +def tr0_3_1_17 : Fin 8 → RI := ![⟨-23782566985791597327306045783535915834778989075312,-23782566985791597327276465220755503696840347305830⟩, + ⟨1114978013593573378739359278127369670501655927937897,1114978013593573378739380551452507017438785247012304⟩, + ⟨-158818848961201194733907611408689667735534692858310,-158818848961201194733462048476661679010005856753998⟩, + ⟨74148761156023423263480408401157540554302459155783,74148761156023423263645278049868429506501748792191⟩, + ⟨138321340316620362232385771257885163443346205488317,138321340316620362232858021223329753055574548499745⟩, + ⟨85728015660380880654288153773550836116813938774759,85728015660380880654490839965249343007201557575699⟩, + ⟨-23997724970685346467216393532420897171921240482083,-23997724970685346466860066713469728708942935602194⟩, + ⟨44518305494014731209981479639714292298657121797132,44518305494014731210182476489262988765287519558368⟩] +lemma tr0_3_1_17_calc (r : Fin 8) : taylorRowBox 0 3 1 17 r = tr0_3_1_17 r := by + revert r + decide +kernel +def tr0_3_1_18 : Fin 8 → RI := ![⟨-5226104496263194478737658033066729729371927364460,-5226104496263194478730491828231844486477474641838⟩, + ⟨-207490540102714359608094128711645527796889642906533,-207490540102714359608088975023170504033618357271375⟩, + ⟨-66706000571027277765271897198683548120427270691839,-66706000571027277765163954856225910061238946593727⟩, + ⟨37006729723455937091618129375280667589763999082210,37006729723455937091658070794996117118184173072417⟩, + ⟨63121201240949291391510701614497133567490222735734,63121201240949291391625109173626464246731872821342⟩, + ⟨43295844108335457940694965235917195741980784573020,43295844108335457940744068113951162736655177395454⟩, + ⟨-15222907472993329491149593775547869505167412108290,-15222907472993329491063269827204598819049247946610⟩, + ⟨26391631019720418368797906015309799957658162766188,26391631019720418368846599632324935221094127565357⟩] +lemma tr0_3_1_18_calc (r : Fin 8) : taylorRowBox 0 3 1 18 r = tr0_3_1_18 r := by + revert r + decide +kernel +def tr0_3_1_19 : Fin 8 → RI := ![⟨1291233919279548726060648244483025518511604339275,1291233919279548726061874675547389044441132236100⟩, + ⟨-54401588495638854974164291324854046694158258919500,-54401588495638854974163409317740482305400920358950⟩, + ⟨12921598539672655565493938005930942350794409474674,12921598539672655565512411360376901965299438793951⟩, + ⟨-6848351515245286088661288160377805948208200506843,-6848351515245286088654452548080525806222646890665⟩, + ⟨-11958288337935943045030198701020701173139089117699,-11958288337935943045010618883287370849447497788570⟩, + ⟨-7943067409624227830506459850248115949862542285433,-7943067409624227830498056337321213475354334371563⟩, + ⟨2456885902472559034429450340451346439136070816868,2456885902472559034444223902508802057309125748473⟩, + ⟨-4478385610944214227730824512340666227485024040676,-4478385610944214227722491040730496029469026741585⟩] +lemma tr0_3_1_19_calc (r : Fin 8) : taylorRowBox 0 3 1 19 r = tr0_3_1_19 r := by + revert r + decide +kernel +def tr0_3_1_20 : Fin 8 → RI := ![⟨15609916725481156941973493007966583671859609930,15609916725481156942161280655555872776287599462⟩, + ⟨12877105524259503848022350295388741769458497346044,12877105524259503848022485345817445428020084881289⟩, + ⟨429974891340160079005787760223744531606415724047,429974891340160079008616347883719025191418740402⟩, + ⟨-261958386681744332233355580020523797187385031127,-261958386681744332232308930444865296772987272445⟩, + ⟨-426847918278142206053537948513562984033766923160,-426847918278142206050539942331958211474705949154⟩, + ⟨-306171859126029057867702918096270923271897812049,-306171859126029057866416196021328959000358652920⟩, + ⟨118513356490882147930579902203578267625233349828,118513356490882147932841988142200220979194604245⟩, + ⟨-198354336782129763597410231173502205732534418561,-198354336782129763596134233626295850112015348679⟩] +lemma tr0_3_1_20_calc (r : Fin 8) : taylorRowBox 0 3 1 20 r = tr0_3_1_20 r := by + revert r + decide +kernel +def tr0_3_1 : Fin 21 → Fin 8 → RI := ![tr0_3_1_0,tr0_3_1_1,tr0_3_1_2,tr0_3_1_3,tr0_3_1_4,tr0_3_1_5,tr0_3_1_6,tr0_3_1_7,tr0_3_1_8,tr0_3_1_9,tr0_3_1_10,tr0_3_1_11,tr0_3_1_12,tr0_3_1_13,tr0_3_1_14,tr0_3_1_15,tr0_3_1_16,tr0_3_1_17,tr0_3_1_18,tr0_3_1_19,tr0_3_1_20] +lemma tr0_3_1_mem (l : Fin 21) (r : Fin 8) : (tr0_3_1 l r).Mem (taylorRow 0 (nearNode 3) (nearDisplacement 3 1) l.val r) := by + have he : taylorRowBox 0 3 1 l r = tr0_3_1 l r := by + fin_cases l + · exact tr0_3_1_0_calc r + · exact tr0_3_1_1_calc r + · exact tr0_3_1_2_calc r + · exact tr0_3_1_3_calc r + · exact tr0_3_1_4_calc r + · exact tr0_3_1_5_calc r + · exact tr0_3_1_6_calc r + · exact tr0_3_1_7_calc r + · exact tr0_3_1_8_calc r + · exact tr0_3_1_9_calc r + · exact tr0_3_1_10_calc r + · exact tr0_3_1_11_calc r + · exact tr0_3_1_12_calc r + · exact tr0_3_1_13_calc r + · exact tr0_3_1_14_calc r + · exact tr0_3_1_15_calc r + · exact tr0_3_1_16_calc r + · exact tr0_3_1_17_calc r + · exact tr0_3_1_18_calc r + · exact tr0_3_1_19_calc r + · exact tr0_3_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 3 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows04.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows04.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0ac2664c159815a1162a163dbec60b871bf8721 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows04.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_4_0_0 : Fin 8 → RI := ![⟨1126100095393391792814214104313031554745351192502200774615,1126100095393391792847814518521087500235653407971284349805⟩, + ⟨-13414299502971684260629799492025340378867054497022966185057,-13414299502971684260605635227727422571904132839814142356420⟩, + ⟨47841433185506003411289729895697873590064785698748452642452,47841433185506003411795842615279821646181381762012326612543⟩, + ⟨-27295673554034197466507396759322460063012889480624124166947,-27295673554034197466320122145180993214479687281843705839924⟩, + ⟨-44797544380013551201074117749805088932823490531910205600908,-44797544380013551200537691361617037928085277998113863529865⟩, + ⟨-37462228884243262046472561292933166177269503251781498742667,-37462228884243262046242331055601618139917924644165491507377⟩, + ⟨84839093422376457483421486755820265896182261972719666631743,84839093422376457483826236618592412250812810543075842358383⟩, + ⟨-70742726550787769488601570258613586708503525939832649718955,-70742726550787769488373258936394084582280017776716964894617⟩] +lemma tr0_4_0_0_calc (r : Fin 8) : taylorRowBox 0 4 0 0 r = tr0_4_0_0 r := by + revert r + decide +kernel +def tr0_4_0_1 : Fin 8 → RI := ![⟨508535109210003314727861142826000861145201181805489872453,508535109210003314745857303009373513088585011154497824058⟩, + ⟨6026361651840775940097158643098136580177717589899554697251,6026361651840775940110100863640057546324053128694329379998⟩, + ⟨18200280932803841822280233644079473133545053407511681637747,18200280932803841822551304277806510717734655283551595022961⟩, + ⟨-10103231363747889897269322571228685462043362646246771427574,-10103231363747889897169019523355181653969767737125261469726⟩, + ⟨-16566001854210569387363623758239418679356825771709803920908,-16566001854210569387076317323558578971822028156385634807743⟩, + ⟨-14442854386601155259811851995930792444748517881030353180088,-14442854386601155259688542199630639985962995903183465628300⟩, + ⟨70985322257181067537712452829026366630769175261243445967796,70985322257181067537929234185308210107924094553250517650951⟩, + ⟨-45090194073762374160682497308959407674756702965696762697078,-45090194073762374160560215270986612960962256730467505843419⟩] +lemma tr0_4_0_1_calc (r : Fin 8) : taylorRowBox 0 4 0 1 r = tr0_4_0_1 r := by + revert r + decide +kernel +def tr0_4_0_2 : Fin 8 → RI := ![⟨-526984891885880314552805742675453094829051029482906447247,-526984891885880314544716633638159200420113878543668156562⟩, + ⟨6541919001838597018610338125924955299390496359975726924321,6541919001838597018616155535420735675439879048657577430869⟩, + ⟨-25249206582984002587410015591791824865251359027794947497915,-25249206582984002587288171826744523109456413003444907476220⟩, + ⟨14590768922040148582058251571099033757159007993476121997973,14590768922040148582103336871679101687319793552510103741060⟩, + ⟨23955044240421949454411369488748799013731331754013572074905,23955044240421949454540511097511711400730354710662344584096⟩, + ⟨19683273073026896226480324908804888365556910557333376589043,19683273073026896226535751531921657678490558024425198429053⟩, + ⟨-5975426086525328867100496310742455329327752460456815736954,-5975426086525328867003055078274554931439110024792674128999⟩, + ⟨21237925921240503293423837639264457872579239884466262419197,21237925921240503293478802294408710329653229671449806190966⟩] +lemma tr0_4_0_2_calc (r : Fin 8) : taylorRowBox 0 4 0 2 r = tr0_4_0_2 r := by + revert r + decide +kernel +def tr0_4_0_3 : Fin 8 → RI := ![⟨-333857688452243971947056592153632450813914439719280831315,-333857688452243971944130536610977547522857885969060008297⟩, + ⟨-2843778684768863161512440125791268389523464639454146654111,-2843778684768863161510335807105658465189122276693099990471⟩, + ⟨-13057476210783910888929689459142835748760013394598657050366,-13057476210783910888885615183171098851967678179164781345633⟩, + ⟨7338045367969365418618565585014769366066291767641139707970,7338045367969365418634874191200139988640058792814575470995⟩, + ⟨12047360207597072709992596925077786441916819874642228366826,12047360207597072710039311033941772046125114271876185271434⟩, + ⟨10307562806002479864962969560758768907096524432615800498497,10307562806002479864983018910706740866620046921904649903029⟩, + ⟨-20059778968291665582562661637677770144817019722830766475190,-20059778968291665582527414435917721840277981019376010931490⟩, + ⟨20789193401789301194945132646437902120685709660552942330970,20789193401789301194965014889720965802626069556259032241176⟩] +lemma tr0_4_0_3_calc (r : Fin 8) : taylorRowBox 0 4 0 3 r = tr0_4_0_3 r := by + revert r + decide +kernel +def tr0_4_0_4 : Fin 8 → RI := ![⟨43105310931407543545179629878821645518183953025441433018,43105310931407543546195547481189836401446536628047196337⟩, + ⟨-1247916298134689711555047154465974563263811630001328975471,-1247916298134689711554316541406026260574428728256746162031⟩, + ⟨3624554875657992948352058764798804530976986467513192114922,3624554875657992948367361219629078155980309692818287874897⟩, + ⟨-2183393806252991961053601064236430826872013736979064905318,-2183393806252991961047938765673185018759993744587120896881⟩, + ⟨-3580276637800342051744723252968964919200318903253033281903,-3580276637800342051728504256170790910188205280844909103567⟩, + ⟨-2789177933682070983878831977451340991061424228030639594477,-2789177933682070983871870904007873438558784387541540144003⟩, + ⟨-3001674001759944524968255663129327376855336503543890754818,-3001674001759944524956017941672032029856314851122581593897⟩, + ⟨354464856512334386275953847842603133955943833664434459476,354464856512334386282856902357712958822573235942161682470⟩] +lemma tr0_4_0_4_calc (r : Fin 8) : taylorRowBox 0 4 0 4 r = tr0_4_0_4 r := by + revert r + decide +kernel +def tr0_4_0_5 : Fin 8 → RI := ![⟨67400556974616509895886190682366033534723452978404110656,67400556974616509896240974526590045700894082388115910437⟩, + ⟨617160955009416973758706162074371487286696595981073149376,617160955009416973758961310434273639214751391526325428125⟩, + ⟨3112285495627337465821083111708312300938987867974691905858,3112285495627337465826427111790757188643298308527923853676⟩, + ⟨-1779287273411285277642004107272970351006782882399591961930,-1779287273411285277640026690948228420157637946663334495357⟩, + ⟨-2922815381175191944726512453587095357293292627139315027133,-2922815381175191944720848374118111809996634177037563871172⟩, + ⟨-2445058819095673697686476238398340921907233352556298832384,-2445058819095673697684045257390911853634117804825134055465⟩, + ⟨2258794930921519823618160759790924103230635217055800648259,2258794930921519823622434478301985590062205585656230357538⟩, + ⟨-3093590676672894152477877352568464655722040237981266544234,-3093590676672894152475466633222716792535167347825596429067⟩] +lemma tr0_4_0_5_calc (r : Fin 8) : taylorRowBox 0 4 0 5 r = tr0_4_0_5 r := by + revert r + decide +kernel +def tr0_4_0_6 : Fin 8 → RI := ![⟨10115228504509181673868515574489413480857004431318995588,10115228504509181673966337892974852888614521845965280062⟩, + ⟨102761663116963248979247225748907247709917500086781859064,102761663116963248979317576201794042462264169087255849845⟩, + ⟨80010633895363420128728792635685998357376411159476374047,80010633895363420130202260175466637162810581801790311887⟩, + ⟨-23169801528394085440364495291607437994130101581593615612,-23169801528394085439819274722198803119932662950543926087⟩, + ⟨-41619377727097749994677486890816041497919166059630522612,-41619377727097749993115765874066627463776376007018810148⟩, + ⟨-70202327054391323288901294169835652350906046380700383091,-70202327054391323288231015062127382562946999862833505888⟩, + ⟨636500661360451639652274824155769553187764196149705113306,636500661360451639653453189687285357777451003925598388641⟩, + ⟨-531760338676739803997956202195036214368108679936942535739,-531760338676739803997291509708537957627882023743629141343⟩] +lemma tr0_4_0_6_calc (r : Fin 8) : taylorRowBox 0 4 0 6 r = tr0_4_0_6 r := by + revert r + decide +kernel +def tr0_4_0_7 : Fin 8 → RI := ![⟨-3810893501653844567456335900209537218656824083013620396,-3810893501653844567428498432963663184172295198486894462⟩, + ⟨-92856593331489382298856773814913118135714479634446150459,-92856593331489382298836754064225538826361845299509068305⟩, + ⟨-301724631471278241296995115397839016292675024510091744143,-301724631471278241296575808178247544086002290084254210297⟩, + ⟨178264831979586234549894430230349530220105309954816057823,178264831979586234550049584595735342655766100580804011132⟩, + ⟨291909322060053051681712204162758221532237425747035248297,291909322060053051682156625827775663150682928189925806901⟩, + ⟨236585900487257673449548116631443442333520566759117763295,236585900487257673449738859122545150374445027055239178901⟩, + ⟨-117355761330689161625892984826159511783173972727822339653,-117355761330689161625557655298194471685748376708725251237⟩, + ⟨209280715987578067602238769830274980820034335882363088156,209280715987578067602427922526784551905019700922886463607⟩] +lemma tr0_4_0_7_calc (r : Fin 8) : taylorRowBox 0 4 0 7 r = tr0_4_0_7 r := by + revert r + decide +kernel +def tr0_4_0_8 : Fin 8 → RI := ![⟨-1515835013311832556211792289464540429100331592319622200,-1515835013311832556205853960134952131114260551052012323⟩, + ⟨-1041832850706549630944740281964605411964372804410721080,-1041832850706549630940469639395026290512753076540075161⟩, + ⟨-49250203205122181767192705486664042750362477330280828436,-49250203205122181767103258255762283432102893317538398212⟩, + ⟨26856044677840760814452795756449853852067366487634973301,26856044677840760814485893513182135312141784071108902356⟩, + ⟨44662540330407023833107711753211074290437465592290882787,44662540330407023833202516434459972144537230979746386421⟩, + ⟨38957591761905301819842847922873537034887123523198333545,38957591761905301819883537390788136787315580484283191536⟩, + ⟨-57974527552509595907128933397674571685565856159484435190,-57974527552509595907057400411118204510685569552036922144⟩, + ⟨65039454293686090678729136854377570966486391553549899420,65039454293686090678769487184936183588859876971323671142⟩] +lemma tr0_4_0_8_calc (r : Fin 8) : taylorRowBox 0 4 0 8 r = tr0_4_0_8 r := by + revert r + decide +kernel +def tr0_4_0_9 : Fin 8 → RI := ![⟨-153389742204005610986546270861088736981180161876044210,-153389742204005610985241430203263459060815726640422217⟩, + ⟨11600788037482589455507379590776827280773238584587487494,11600788037482589455508317987377966260045667999156426404⟩, + ⟨12626068612735055931099398601128341079375560357160194091,12626068612735055931119053015212794574445191161688256341⟩, + ⟨-8006180086516829999420225188356353060072761351896622577,-8006180086516829999412952553870172069289080396214546757⟩, + ⟨-12846735604757125746825815843961706348186026123845130324,-12846735604757125746804984226886844951612330626606175745⟩, + ⟨-10113549700297772503749884193936436470559213965327885317,-10113549700297772503740943417979408746130567566256331886⟩, + ⟨1083645442413271719375360447998923052020056499433870339,1083645442413271719391078530315056562451978993146216853⟩, + ⟨-5437264625873937577472741411077668822113529542760720788,-5437264625873937577463875154434613306159990931001068541⟩] +lemma tr0_4_0_9_calc (r : Fin 8) : taylorRowBox 0 4 0 9 r = tr0_4_0_9 r := by + revert r + decide +kernel +def tr0_4_0_10 : Fin 8 → RI := ![⟨37475216655489186481296064889801684993531399898829918,37475216655489186481559245339645243169088505569402206⟩, + ⟨-430319110237215652871198920515291453657564544706151095,-430319110237215652871009650171739905670261114591221816⟩, + ⟨3945797839271322094191321885955718054941684027484319799,3945797839271322094195286092243290597306657378339282246⟩, + ⟨-2299067459749333488259230336492483096180905260511829041,-2299067459749333488257763479060987678845244885199378009⟩, + ⟨-3762040173157802831755449486776339571959021369759348396,-3762040173157802831751247843978251454088986462356627450⟩, + ⟨-3166981964184738338222153154299391772951890538944770903,-3166981964184738338220349840289788702352417562352606716⟩, + ⟨2980455825263374716042329610116083918393370866204222926,2980455825263374716045499876116955438245624565486143017⟩, + ⟨-3844257430132021123408882491553100456395740685848836846,-3844257430132021123407094207751770288779254961890127674⟩] +lemma tr0_4_0_10_calc (r : Fin 8) : taylorRowBox 0 4 0 10 r = tr0_4_0_10 r := by + revert r + decide +kernel +def tr0_4_0_11 : Fin 8 → RI := ![⟨23852464516640798988159472979866875419868259870558059,23852464516640798988206704695902987207590647599000916⟩, + ⟨-1244414447416512572202109868936491420639516158934928479,-1244414447416512572202075901507968481944235266790534551⟩, + ⟨-85443655761581100602517179286960837196267794010689491,-85443655761581100601805742454224532669826424114603737⟩, + ⟨91789900035402520646540900580671100113775878482765425,91789900035402520646804150353686197295886554422657771⟩, + ⟨126931002301427991840570205504739388019314950528715357,126931002301427991841324253913850873840230694734277406⟩, + ⟨89323545507872069583259259257921612710787483129281629,89323545507872069583582891257517493688641408209380407⟩, + ⟨218348837665288872702245849050013735643878064013368285,218348837665288872702814801278671845188586254478767413⟩, + ⟨-139584930813634458270507098563898255691647779972549833,-139584930813634458270186163962773515208627047925486870⟩] +lemma tr0_4_0_11_calc (r : Fin 8) : taylorRowBox 0 4 0 11 r = tr0_4_0_11 r := by + revert r + decide +kernel +def tr0_4_0_12 : Fin 8 → RI := ![⟨5044400833295528496021128161014790353849929995899521,5044400833295528496033285565834320685632743152312419⟩, + ⟨11774105652085712590310341538527623981873675310329645,11774105652085712590319084726664059043535847668786978⟩, + ⟨-130839513910367507084122459788183288979610424163204754,-130839513910367507083939336533219049266230148887449387⟩, + ⟨83692305778252595163398899342838696062182167255418124,83692305778252595163466659617642958704155724975817925⟩, + ⟨131808465452951559904591873350029297060107057606669572,131808465452951559904785964789615936888804624482179295⟩, + ⟨113992932597998398231879692250702794237186849926013324,113992932597998398231962994860863806764586453284516880⟩, + ⟨-88054713815137119039987974772581387686970228029312646,-88054713815137119039841526937325768457668481879671545⟩, + ⟨123209708280946855430009804266890088149102219298924807,123209708280946855430092412568990545057353590732944529⟩] +lemma tr0_4_0_12_calc (r : Fin 8) : taylorRowBox 0 4 0 12 r = tr0_4_0_12 r := by + revert r + decide +kernel +def tr0_4_0_13 : Fin 8 → RI := ![⟨-509327963021530174004498868311653312469587098834884,-509327963021530174002791656574299169171748407929965⟩, + ⟨109838369017152381094553932374395169203485879010798049,109838369017152381094555160142460833446479175581635763⟩, + ⟨-9701851343422069828366000113244852195012305216351458,-9701851343422069828340284907167647996073919854489662⟩, + ⟨4769264944429317142463854396848918580849375172720714,4769264944429317142473369678958019601911472966948617⟩, + ⟨8305038563062331352475510061980136022701058086004877,8305038563062331352502765482761728087491538616092864⟩, + ⟨7571720598016963662025852720724210675175096164053658,7571720598016963662037550545726263545962723920687395⟩, + ⟨-13707115250493998405794653386675032818232533013779979,-13707115250493998405774088351064547082296380571809460⟩, + ⟨14602456868648557355887603753168183134548566944699055,14602456868648557355899204079471589127783344172460285⟩] +lemma tr0_4_0_13_calc (r : Fin 8) : taylorRowBox 0 4 0 13 r = tr0_4_0_13 r := by + revert r + decide +kernel +def tr0_4_0_14 : Fin 8 → RI := ![⟨-448015104473511250085563731308966201260592535216099,-448015104473511250085154589089725629958175982372431⟩, + ⟨4973083566971181072146413059283104678716853726910582,4973083566971181072146707300319712264284048280063914⟩, + ⟨866177732889804804955617112168393088682970766161332,866177732889804804961779895759298013586679730158781⟩, + ⟨-974332775430390911712268966422496022558921544204452,-974332775430390911709988579314556474464110915706792⟩, + ⟨-1227167276100253557638875300955456866121822297636891,-1227167276100253557632343396859927057811670727628190⟩, + ⟨-1439818217189842447825565338258091545327050686755099,-1439818217189842447822761893336514780529685996691364⟩, + ⟨1166063150675799157466957788853235058585545042776749,1166063150675799157471886307167221861036982646589734⟩, + ⟨-1744218851355240625921922923320713295487763565394114,-1744218851355240625919142844467627166992909044035816⟩] +lemma tr0_4_0_14_calc (r : Fin 8) : taylorRowBox 0 4 0 14 r = tr0_4_0_14 r := by + revert r + decide +kernel +def tr0_4_0_15 : Fin 8 → RI := ![⟨-49294124603507687823184395601756843364200588235880,-49294124603507687823121902876914340700011993379823⟩, + ⟨-7660576770562612406236288162586517033855300383629655,-7660576770562612406236243219964458422214737553616782⟩, + ⟨61686652402075459587820066005554411948820842643700,61686652402075459588761374726733597843720456676517⟩, + ⟨-66936169566883890899967704044259995480378277058743,-66936169566883890899619395809509314179368022568493⟩, + ⟨-77321908767775436716247588470565118441370144528160,-77321908767775436715249899974702002102536561631420⟩, + ⟨-151280491346029928591768551531895702515779577589905,-151280491346029928591340351009097388986875427995819⟩, + ⟨371650359146198249768027743473785514494808008333392,371650359146198249768780529483650991624934321558218⟩, + ⟨-401607043245464690273601244056511348765453232910987,-401607043245464690273176612486797992276617509201687⟩] +lemma tr0_4_0_15_calc (r : Fin 8) : taylorRowBox 0 4 0 15 r = tr0_4_0_15 r := by + revert r + decide +kernel +def tr0_4_0_16 : Fin 8 → RI := ![⟨14395400448125025294481497120482270205942967827334,14395400448125025294494040133170252373701913455108⟩, + ⟨-798130375721329106413232487461345870413827696559116,-798130375721329106413223466957276018790237827163084⟩, + ⟨54905974479181924364863727063771883608969659859871,54905974479181924365052658611576605876314685633995⟩, + ⟨-18791893858213992331371216337421195149682663013932,-18791893858213992331301306846078226974989295952605⟩, + ⟨-41790041913085730423482624352704370824644654393184,-41790041913085730423282376732081860781128154320724⟩, + ⟨-20046681326244859611682165740378961615396115383216,-20046681326244859611596220942828279001667699602161⟩, + ⟨8990347059678684515653633335657346993849291282821,8990347059678684515804726194855305463678251733023⟩, + ⟨-9667838450130391216875365735896504019690214331888,-9667838450130391216790137268407643583184068723956⟩] +lemma tr0_4_0_16_calc (r : Fin 8) : taylorRowBox 0 4 0 16 r = tr0_4_0_16 r := by + revert r + decide +kernel +def tr0_4_0_17 : Fin 8 → RI := ![⟨4017836871472768893694353465870560138365369019375,4017836871472768893696633956113559396028107389006⟩, + ⟨412511049530312585643826654255343230795977296113446,412511049530312585643828294305627217384081881368848⟩, + ⟨21976604591389636958429091178062735748101697246985,21976604591389636958463441502186036463068500944927⟩, + ⟨-10110664068572860643256433292496114506401273061040,-10110664068572860643243722796475554005336734141241⟩, + ⟨-19181647600996831693979324103294005453411136949533,-19181647600996831693942916363286621074641557228757⟩, + ⟨-10150640965996611857783389109452266070259167404208,-10150640965996611857767763176753551793146507745770⟩, + ⟨-3240905900803340543888939982403644305329035365544,-3240905900803340543861469246318074360035153242370⟩, + ⟨735475894747211991356865581720225423950802251443,735475894747211991372361275888254283818335275336⟩] +lemma tr0_4_0_17_calc (r : Fin 8) : taylorRowBox 0 4 0 17 r = tr0_4_0_17 r := by + revert r + decide +kernel +def tr0_4_0_18 : Fin 8 → RI := ![⟨-45518964503890169801387697673234458296138750588,-45518964503890169801124137682631712283844300693⟩, + ⟨69164631146124822708619054995039772097971501407264,69164631146124822708619244538335790015633670051673⟩, + ⟨69177155100857211368616420011380120162958783247,69177155100857211372586343202192933154590616465⟩, + ⟨-133839997350515272434988550904856713275604222157,-133839997350515272433519578071650438054747280900⟩, + ⟨-158362260696630896242503378437832201340138909742,-158362260696630896238295676325380662798524420215⟩, + ⟨-92218576254265117928164635504824363495131106617,-92218576254265117926358720882169311991720576662⟩, + ⟨-356718161655345479840230096615363481638898379698,-356718161655345479837055258677499497194516750410⟩, + ⟨268536804516394520620139860343542937472335192906,268536804516394520621930723085271254500834299310⟩] +lemma tr0_4_0_18_calc (r : Fin 8) : taylorRowBox 0 4 0 18 r = tr0_4_0_18 r := by + revert r + decide +kernel +def tr0_4_0_19 : Fin 8 → RI := ![⟨-138631203390138367558619560856428062551608230730,-138631203390138367558539465274021298513390163131⟩, + ⟨-16699479348684707891553175597155700796805400046558,-16699479348684707891553117995162824296241770966861⟩, + ⟨-1049275760660395054517556058523652777890292704969,-1049275760660395054516349603365702017555762010943⟩, + ⟨524069833897849323657641142300235529924109180208,524069833897849323658087561478731683531813290265⟩, + ⟨945626224277837424650567977320071222273967879828,945626224277837424651846693222483249443526576358⟩, + ⟨585117205616586032306659370700212838808792995365,585117205616586032307208186106303621255311913869⟩, + ⟨-92558617555922050904429266060133415397976922457,-92558617555922050903464436408278711850253671065⟩, + ⟨237930122825778601799978324284048143073668408280,237930122825778601800522565441501481802319547579⟩] +lemma tr0_4_0_19_calc (r : Fin 8) : taylorRowBox 0 4 0 19 r = tr0_4_0_19 r := by + revert r + decide +kernel +def tr0_4_0_20 : Fin 8 → RI := ![⟨-13301339932976447415326549647467942761759780959,-13301339932976447415316355391442227626079276714⟩, + ⟨-4199755560528469323368662496274613541632698645123,-4199755560528469323368655164915693072699278070807⟩, + ⟨-124235208660602628019059338547609386253113106967,-124235208660602628018905785600086721347344023513⟩, + ⟨65820444778253533252504613998284376236593307636,65820444778253533252561432505203709481296449964⟩, + ⟨115210529384898007585663001707431521748918785510,115210529384898007585825751723098868703221923571⟩, + ⟨74116520870895827856407463751412553188118040195,74116520870895827856477314854247383828353858320⟩, + ⟨-12541714761138673835037108684772082714939586576,-12541714761138673834914308897448823458490894262⟩, + ⟨32185092095228193270292597735355303108642407424,32185092095228193270361866645470169169920849911⟩] +lemma tr0_4_0_20_calc (r : Fin 8) : taylorRowBox 0 4 0 20 r = tr0_4_0_20 r := by + revert r + decide +kernel +def tr0_4_0 : Fin 21 → Fin 8 → RI := ![tr0_4_0_0,tr0_4_0_1,tr0_4_0_2,tr0_4_0_3,tr0_4_0_4,tr0_4_0_5,tr0_4_0_6,tr0_4_0_7,tr0_4_0_8,tr0_4_0_9,tr0_4_0_10,tr0_4_0_11,tr0_4_0_12,tr0_4_0_13,tr0_4_0_14,tr0_4_0_15,tr0_4_0_16,tr0_4_0_17,tr0_4_0_18,tr0_4_0_19,tr0_4_0_20] +lemma tr0_4_0_mem (l : Fin 21) (r : Fin 8) : (tr0_4_0 l r).Mem (taylorRow 0 (nearNode 4) (nearDisplacement 4 0) l.val r) := by + have he : taylorRowBox 0 4 0 l r = tr0_4_0 l r := by + fin_cases l + · exact tr0_4_0_0_calc r + · exact tr0_4_0_1_calc r + · exact tr0_4_0_2_calc r + · exact tr0_4_0_3_calc r + · exact tr0_4_0_4_calc r + · exact tr0_4_0_5_calc r + · exact tr0_4_0_6_calc r + · exact tr0_4_0_7_calc r + · exact tr0_4_0_8_calc r + · exact tr0_4_0_9_calc r + · exact tr0_4_0_10_calc r + · exact tr0_4_0_11_calc r + · exact tr0_4_0_12_calc r + · exact tr0_4_0_13_calc r + · exact tr0_4_0_14_calc r + · exact tr0_4_0_15_calc r + · exact tr0_4_0_16_calc r + · exact tr0_4_0_17_calc r + · exact tr0_4_0_18_calc r + · exact tr0_4_0_19_calc r + · exact tr0_4_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 4 0 l r +def tr0_4_1_0 : Fin 8 → RI := ![⟨1126100095393391792814214104313031554745351192502200774615,1126100095393391792847814518521087500235653407971284349805⟩, + ⟨-13414299502971684260629799492025340378867054497022966185057,-13414299502971684260605635227727422571904132839814142356420⟩, + ⟨47841433185506003411289729895697873590064785698748452642452,47841433185506003411795842615279821646181381762012326612543⟩, + ⟨-27295673554034197466507396759322460063012889480624124166947,-27295673554034197466320122145180993214479687281843705839924⟩, + ⟨-44797544380013551201074117749805088932823490531910205600908,-44797544380013551200537691361617037928085277998113863529865⟩, + ⟨-37462228884243262046472561292933166177269503251781498742667,-37462228884243262046242331055601618139917924644165491507377⟩, + ⟨84839093422376457483421486755820265896182261972719666631743,84839093422376457483826236618592412250812810543075842358383⟩, + ⟨-70742726550787769488601570258613586708503525939832649718955,-70742726550787769488373258936394084582280017776716964894617⟩] +lemma tr0_4_1_0_calc (r : Fin 8) : taylorRowBox 0 4 1 0 r = tr0_4_1_0 r := by + revert r + decide +kernel +def tr0_4_1_1 : Fin 8 → RI := ![⟨-762802663815004972118785954514060269632877516731746736086,-762802663815004972091791714239001291717801772708234808680⟩, + ⟨-9039542477761163910165151295460086319486079693041494069996,-9039542477761163910145737964647204870266576384849332045877⟩, + ⟨-27300421399205762733826956416709766076601982925327392534441,-27300421399205762733420350466119209700317580111267522456621⟩, + ⟨15154847045621834845753529285032772480954651605687892204590,15154847045621834845903983856843028193065043969370157141362⟩, + ⟨24849002781315854080614475985337868457733042234578452211616,24849002781315854081045435637359128019035238657564705881363⟩, + ⟨21664281579901732889532813299445959978944493854775198442451,21664281579901732889717777993896188667122776821545529770133⟩, + ⟨-106477983385771601306893851277962315161886141829875776476426,-106477983385771601306568679243539549946153762891865168951695⟩, + ⟨67635291110643561240840322906479919441443385095701258765130,67635291110643561241023745963439111512135054448545144045618⟩] +lemma tr0_4_1_1_calc (r : Fin 8) : taylorRowBox 0 4 1 1 r = tr0_4_1_1 r := by + revert r + decide +kernel +def tr0_4_1_2 : Fin 8 → RI := ![⟨-1185716006743230707743812921019769463365364816336539506304,-1185716006743230707725612425685858200945256226723253352266⟩, + ⟨14719317754136843291873260783331149423628616809945385579724,14719317754136843291886349954696655269739727859479549219454⟩, + ⟨-56810714811714005821672535081531605946815557812538631870307,-56810714811714005821398386610175176996276929257751041821497⟩, + ⟨32829230074590334309631066034972825953607767985321274495441,32829230074590334309732507961277978796469535493147733417383⟩, + ⟨53898849540949386272425581349684797780895496446530537168538,53898849540949386272716149969401350651643298098990275314214⟩, + ⟨44287364414310516509580731044810998822503048754000097325349,44287364414310516509705440946823729776603755554956696465368⟩, + ⟨-13444708694681989950976116699170524490987443036027835408145,-13444708694681989950756873926117748595737997555783516790249⟩, + ⟨47785333322791132410203634688345030213303289740049090443195,47785333322791132410327305162419598241719766760762063929672⟩] +lemma tr0_4_1_2_calc (r : Fin 8) : taylorRowBox 0 4 1 2 r = tr0_4_1_2 r := by + revert r + decide +kernel +def tr0_4_1_3 : Fin 8 → RI := ![⟨1126769698526323405311440561062049222889645365145577528005,1126769698526323405321315998518509521496961234052572805685⟩, + ⟨9597753061094913170097383348981597320013287683839212467843,9597753061094913170104485424545530814641693158157744957622⟩, + ⟨44068982211395699249988951243202458625390913854681137041514,44068982211395699250137701924607070652065045206770467544983⟩, + ⟨-24765903116896608287892700395300472461660198425749192214605,-24765903116896608287837658849424846610473734715788846514402⟩, + ⟨-40659840700640120396382674739553480655672260667582125291087,-40659840700640120396225014622137529241469267076917520738041⟩, + ⟨-34788024470258369544317688823635250424842658361428193422720,-34788024470258369544250022267560845061450769960078326682430⟩, + ⟨67701754017984371341030023721222311210938185940394036893782,67701754017984371341148983027162474238757441564553836853764⟩, + ⟨-70163527731038891533006925252808259583862984752374233813966,-70163527731038891532939822681727919657314270104366180367027⟩] +lemma tr0_4_1_3_calc (r : Fin 8) : taylorRowBox 0 4 1 3 r = tr0_4_1_3 r := by + revert r + decide +kernel +def tr0_4_1_4 : Fin 8 → RI := ![⟨218220636590250689197471876261534580435806262191297254658,218220636590250689202614959123523546782323091679488931452⟩, + ⟨-6317576259306866664747426219483996226523046376881727938317,-6317576259306866664743727490868007944158045436799777445286⟩, + ⟨18349309058018589301032297496793947938070993991785535081797,18349309058018589301109766174372208164650317819892582366662⟩, + ⟨-11053431144155771802833855387696931061039569543456516083168,-11053431144155771802805190001220499157472468331972299540465⟩, + ⟨-18125150478864231636957661468155384903451614447718480989629,-18125150478864231636875552796864628982827789234277352336812⟩, + ⟨-14120213289265484355886586885847413767248460154405112947035,-14120213289265484355851346451539859282703845961929046979020⟩, + ⟨-15195974633909719157651794294592219845330141049190946946262,-15195974633909719157589840829714662151147593933808069319108⟩, + ⟨1794478336093692830522016354703178365651965657926199451102,1794478336093692830556963068185921854039277006957193517500⟩] +lemma tr0_4_1_4_calc (r : Fin 8) : taylorRowBox 0 4 1 4 r = tr0_4_1_4 r := by + revert r + decide +kernel +def tr0_4_1_5 : Fin 8 → RI := ![⟨-511822979525994122024579900311293159541164438134755194874,-511822979525994122021885760494217067154306221054756215301⟩, + ⟨-4686566002102760144482112451110265447787018379403033719817,-4686566002102760144480174918252258481583352275731274228081⟩, + ⟨-23633917982420093881119430880161062401260046530383921763845,-23633917982420093881078849879534996535255439122432816660116⟩, + ⟨13511462732466947577078952684388109565572063157474696324124,13511462732466947577093968689604118602957757513221901460899⟩, + ⟨22195129300799113830223942340959411557161940781879000646719,22195129300799113830266953944427005369445940887339173487284⟩, + ⟨18567165407507772141788218673312236888534082080390861733694,18567165407507772141806678935337401375733053270974394258409⟩, + ⟨-17152724006685291160632861819605703074534873666076999277547,-17152724006685291160600408269662329908907636179517486172724⟩, + ⟨23491954200984789970360574746035005643313927047550622883235,23491954200984789970378881146066778479389243057170242820270⟩] +lemma tr0_4_1_5_calc (r : Fin 8) : taylorRowBox 0 4 1 5 r = tr0_4_1_5 r := by + revert r + decide +kernel +def tr0_4_1_6 : Fin 8 → RI := ![⟨115218774684174897503908560215668475430386816100492934130,115218774684174897505022817562166683684374787901698268195⟩, + ⟨1170519568941659507904237930796146618445779024425999613412,1170519568941659507905039266423560264921727801009523664630⟩, + ⟨911371126714373957403801403615860825039490683363410573140,911371126714373957420585119811174663932639283336017771327⟩, + ⟨-263918520534363879469151829180965973401888188327839777820,-263918520534363879462941426132545741787982988921039408096⟩, + ⟨-474070724422722808533123249115701472687235500897978921616,-474070724422722808515334270659290178454577782954948634353⟩, + ⟨-799648381603926166837641303903284227559539184555165301135,-799648381603926166830006405942044717006068170312587903016⟩, + ⟨7250140345808894457914192918899312566779376546767734806262,7250140345808894457927615238781734778433777841590019145603⟩, + ⟨-6057082607739739329914219865627834379286737932406736071141,-6057082607739739329906648602773815173605093676704775688121⟩] +lemma tr0_4_1_6_calc (r : Fin 8) : taylorRowBox 0 4 1 6 r = tr0_4_1_6 r := by + revert r + decide +kernel +def tr0_4_1_7 : Fin 8 → RI := ![⟨65112688188413734913797859944465088935818824992897173363,65112688188413734914273489169986389821894330230865529718⟩, + ⟨1586541950124744367871531102644228542291041841172080721759,1586541950124744367871873158853242104396934116879169773841⟩, + ⟨5155248195528793075903213222545526397781929753236437171263,5155248195528793075910377479492765067438127176590395659677⟩, + ⟨-3045821777651211679382487824303696831157503609142331033934,-3045821777651211679379836866513862676495080569306114987977⟩, + ⟨-4987544432385437687725597974104260744613621593370060466331,-4987544432385437687718004613312126800710962891474735062716⟩, + ⟨-4042291909106504154957647538289111280225869329451625658237,-4042291909106504154954388524007553190495386558610863658815⟩, + ⟨2005133203361071847461676501071494606068216405171735347324,2005133203361071847467405920428209783357824049654277006398⟩, + ⟨-3575757233319009639425858332547482929814672546237130436769,-3575757233319009639422626481396963930104805410740063076557⟩] +lemma tr0_4_1_7_calc (r : Fin 8) : taylorRowBox 0 4 1 7 r = tr0_4_1_7 r := by + revert r + decide +kernel +def tr0_4_1_8 : Fin 8 → RI := ![⟨-38849193446636458598849879731159569356747170223472817374,-38849193446636458598697686845489925516565091700985362725⟩, + ⟨-26701036458928406752454847617069437921477538944291957029,-26701036458928406752345395719026435515836613028044660694⟩, + ⟨-1262228840737525916306841174601573376895032085015517638133,-1262228840737525916304548739906470084367293293188943088576⟩, + ⟨688291051294192311342284347492451137200835904395988514978,688291051294192311343132606796828085089696270666193391997⟩, + ⟨1144652059014845638160233190675069759451407077152423757703,1144652059014845638162662930962858895469956142414515786335⟩, + ⟨998440466991643301718706739148333111273025068108219790606,998440466991643301719749565706878771334287201396023514302⟩, + ⟨-1485823731531310385729191140711495565738271805712411637794,-1485823731531310385727357828505259921072687585277008774192⟩, + ⟨1666890076644040784934147917584262668402801621026722226957,1666890076644040784935182052423305861431678331284588306079⟩] +lemma tr0_4_1_8_calc (r : Fin 8) : taylorRowBox 0 4 1 8 r = tr0_4_1_8 r := by + revert r + decide +kernel +def tr0_4_1_9 : Fin 8 → RI := ![⟨5896816983987192267622084122443036454480538959889512728,5896816983987192267672246580778925019532361574621441730⟩, + ⟨-445973263558144156743691841690547870891560318803507697052,-445973263558144156743655766572774006577069638789913117898⟩, + ⟨-485388493172781456820735000973502803923446675069355370196,-485388493172781456819979419269549096612010067402312695923⟩, + ⟨307784458286935087653213174058255071952767518434943210620,307784458286935087653492758559410346252758128299572699538⟩, + ⟨493871673649286144676489266675417517934737311959940150797,493871673649286144677290104016988800881534281632116601851⟩, + ⟨388798825685470812873306619718923246777515549622311290101,388798825685470812873650333182130623144564469686618684912⟩, + ⟨-41658971177774271978075388109748551403793559613470676364,-41658971177774271977471132222583598501778851715540761527⟩, + ⟨209026718029446705736760653642063464267865432607214906469,209026718029446705737101502332503428565743363262029818849⟩] +lemma tr0_4_1_9_calc (r : Fin 8) : taylorRowBox 0 4 1 9 r = tr0_4_1_9 r := by + revert r + decide +kernel +def tr0_4_1_10 : Fin 8 → RI := ![⟨2161009832314434543490284507497948923030308234986335827,2161009832314434543505460818418664027237799966179326957⟩, + ⟨-24814368301169284264054126032722114303735867969095230420,-24814368301169284264043211750967841494065672417477594796⟩, + ⟨227534586534308885097561880902147651783448730604415624873,227534586534308885097790477012572330547227355013238552037⟩, + ⟨-132575814873767962058807902480024056978892846414026360335,-132575814873767962058723316088937755320442251197400461047⟩, + ⟨-216938193539838964269851110102203198617781496936445081423,-216938193539838964269608822206124775500488829702828607767⟩, + ⟨-182624138674945912239921798445532016407261898861474391594,-182624138674945912239817810272726301841023344374374095734⟩, + ⟨171868101587868177351155782370844374313681793240715976187,171868101587868177351338595883623146165005747038468026321⟩, + ⟨-221679254874868862613448342034881864111046964608093717638,-221679254874868862613345220579623324005982642817041161211⟩] +lemma tr0_4_1_10_calc (r : Fin 8) : taylorRowBox 0 4 1 10 r = tr0_4_1_10 r := by + revert r + decide +kernel +def tr0_4_1_11 : Fin 8 → RI := ![⟨-2063179947133480282404225154670471911554228735459089400,-2063179947133480282400139726545154970704786441059447585⟩, + ⟨107638811580318824525332587756070357749499728909249425919,107638811580318824525335525855709299654310727054123913620⟩, + ⟨7390667620701566029447305594989508441827022242494974792,7390667620701566029508843144114868860745727981255669476⟩, + ⟨-7939602256626684729013386143898656636901570047026638664,-7939602256626684728990615681232491880788601340618382284⟩, + ⟨-10979221808931183823591341605506318724694993593795429426,-10979221808931183823526118259056674008524211690092939220⟩, + ⟨-7726268611368658940685038299607154030498906025423393937,-7726268611368658940657044921759296839295835094679127397⟩, + ⟨-18886641379830531217131608204156680351378168565503032585,-18886641379830531217082395225421280873098665725476636601⟩, + ⟨12073755731856886415619466986090546825518874833425890008,12073755731856886415647227045556095850101723280662736861⟩] +lemma tr0_4_1_11_calc (r : Fin 8) : taylorRowBox 0 4 1 11 r = tr0_4_1_11 r := by + revert r + decide +kernel +def tr0_4_1_12 : Fin 8 → RI := ![⟨654492534972511952991690520268032519638759923571981902,654492534972511952993267899021620414915368811916031186⟩, + ⟨1527647090295430465016386283588051517712628877098851904,1527647090295430465017520680230242725135677348864213830⟩, + ⟨-16975947781259672444407501013743143378567661969657640904,-16975947781259672444383741442028922060814115369847409718⟩, + ⟨10858770184350668316951141226967172723140174108492837834,10858770184350668316959932874477488187669732089080481775⟩, + ⟨17101665695503425280091848087161357338603602246471212047,17101665695503425280117030740663643338897270126814903854⟩, + ⟨14790165550003141297545990119483824138721879079963488147,14790165550003141297556798328088945881537741533197493822⟩, + ⟨-11424776651521065839777892895780133118591588123565903656,-11424776651521065839758891825463706961648387616849249530⟩, + ⟨15986008442025067821430625095068441244152107550400365939,15986008442025067821441343219745337953082287503102239479⟩] +lemma tr0_4_1_12_calc (r : Fin 8) : taylorRowBox 0 4 1 12 r = tr0_4_1_12 r := by + revert r + decide +kernel +def tr0_4_1_13 : Fin 8 → RI := ![⟨99125156981002813916827734653870407017994316037124900,99125156981002813917159991360258794445367372091763571⟩, + ⟨-21376689209781913535621883127906321211290407550151400511,-21376689209781913535621644180290872723389797007096262142⟩, + ⟨1888169523852380936880977545660430426763251968282412473,1888169523852380936885982226385360410901929136895642576⟩, + ⟨-928191991454758568669381123860520835666297035532765907,-928191991454758568667529264349042775705019332702344787⟩, + ⟨-1616322509396633948842317696871719556840060097781374710,-1616322509396633948837013260320600146987404666852240613⟩, + ⟨-1473604528685571234930504601893790731859122056811778329,-1473604528685571234928227976960838102572898540229800021⟩, + ⟨2667672010194499880406367414811313708238282759080685460,2667672010194499880410369771899889935041863614761808578⟩, + ⟨-2841922954369430408853672698436936327267446854378588546,-2841922954369430408851415048652631498977401720821952277⟩] +lemma tr0_4_1_13_calc (r : Fin 8) : taylorRowBox 0 4 1 13 r = tr0_4_1_13 r := by + revert r + decide +kernel +def tr0_4_1_14 : Fin 8 → RI := ![⟨-130788718031528663959381022605903000651683045505981753,-130788718031528663959261582020501459142787293715325238⟩, + ⟨1451788606886754331143985420150528070193949655355699722,1451788606886754331144071317718681265197168586306702509⟩, + ⟨252862624810926318246689637656918147154840088040521529,252862624810926318248488734511715933883463620744495229⟩, + ⟨-284436246372529381628510704715627403474281153525513843,-284436246372529381627844992994114066535103401024609619⟩, + ⟨-358246035119748148091214218709449497772084123114380990,-358246035119748148089307364778792020249904109402653874⟩, + ⟨-420325067044328829518664332297544303006675921397604024,-420325067044328829517845924695425827839068097040338217⟩, + ⟨340407952986125269799229591576755910334951525128471018,340407952986125269800668370282305906827526602305703654⟩, + ⟨-509188518997053460774240341957540817273304016882904985,-509188518997053460773428755594511855669244822841976782⟩] +lemma tr0_4_1_14_calc (r : Fin 8) : taylorRowBox 0 4 1 14 r = tr0_4_1_14 r := by + revert r + decide +kernel +def tr0_4_1_15 : Fin 8 → RI := ![⟨21585595995548818553436542786983530324425872555289009,21585595995548818553463907969385314393508342588559627⟩, + ⟨3354519764622902316105043761982744055350524999580527737,3354519764622902316105063442082361217428758443047065054⟩, + ⟨-27012208204916606952557226902650476356046916712916784,-27012208204916606952145033564683891006265839561648553⟩, + ⟨29310939698835669870507356136072963403122957599158372,29310939698835669870659878184039628874767096628909989⟩, + ⟨33858791441995066476791573989755291164645434172028448,33858791441995066477228455686597019102758946423678967⟩, + ⟨66244802894240974871026113951931597549911490994177782,66244802894240974871213620344722868930010595438745625⟩, + ⟨-162743421627972353805389505644887271096312300450041224,-162743421627972353805059865250402993329869143506807896⟩, + ⟨175861270571110565567432123020877170378537076236165324,175861270571110565567618066590917483150636390743685224⟩] +lemma tr0_4_1_15_calc (r : Fin 8) : taylorRowBox 0 4 1 15 r = tr0_4_1_15 r := by + revert r + decide +kernel +def tr0_4_1_16 : Fin 8 → RI := ![⟨9455486858729750625144773043940790878323966643909697,9455486858729750625153011806875346365819305506410783⟩, + ⟨-524244622883624691664882348570015777102755667050977836,-524244622883624691664876423534585261548677448570793785⟩, + ⟨36064486154761728002584702483128928853756561972851701,36064486154761728002708800438854759571604595652606932⟩, + ⟨-12343283263796253756480046037408631089705548603785811,-12343283263796253756434126628700552074692355359775691⟩, + ⟨-27449406048750422464307684003580789892105382717968337,-27449406048750422464176153189129937899872829044940087⟩, + ⟨-13167478912762030782901771992520928877680448660050418,-13167478912762030782845319939884733232039611808564431⟩, + ⟨5905227074755228912236970319158037836371141935720378,5905227074755228912336214279042480005870564821154244⟩, + ⟨-6350231085751882390345525521943611044479113201521929,-6350231085751882390289543984143767510875929229812667⟩] +lemma tr0_4_1_16_calc (r : Fin 8) : taylorRowBox 0 4 1 16 r = tr0_4_1_16 r := by + revert r + decide +kernel +def tr0_4_1_17 : Fin 8 → RI := ![⟨-3958618991770961189219001629973143821054468847638017,-3958618991770961189216754751298058114393663854350027⟩, + ⟨-406431153683819890983546797719121327745184080240780371,-406431153683819890983545181841122958724511167636030670⟩, + ⟨-21652696984242295176138252755228192178074719941661054,-21652696984242295176104408711829252004514924034518610⟩, + ⟨9961645552473010260351403889951086958042058692075019,9961645552473010260363927049191092714106177875595745⟩, + ⟨18898934156809156856074175505448924723041121422543612,18898934156809156856110046641000493630801415494368632⟩, + ⟨10001033240534056951598066351252376475493486733777080,10001033240534056951613461977287982795964342733944541⟩, + ⟨3193139009837381201009970000373865300758822444532542,3193139009837381201037035852240171488832194486534025⟩, + ⟨-724635901872450259104776984123971008283600462687773,-724635901872450259089509677066343167463308004243813⟩] +lemma tr0_4_1_17_calc (r : Fin 8) : taylorRowBox 0 4 1 17 r = tr0_4_1_17 r := by + revert r + decide +kernel +def tr0_4_1_18 : Fin 8 → RI := ![⟨-67272108027918899485575312466234802416763998276767,-67272108027918899485185799296220797652871192072801⟩, + ⟨102217846756501423907514567569336704561785411770884683,102217846756501423907514847693834804588539558777936637⟩, + ⟨102236355807506352034018450524285399316452985736027,102236355807506352039885567772351883068450199986627⟩, + ⟨-197801045308286023135114612964481278732938306877679,-197801045308286023132943629942293128006875611641257⟩, + ⟨-234042299187600030802837072214267759487697874983922,-234042299187600030796618543428667829485124356683823⟩, + ⟨-136289085034603806775559272612708346421804208542946,-136289085034603806772890326055849251680854605721059⟩, + ⟨-527190874571590405516210883725133380772722365125731,-527190874571590405511518816516335863114752989055330⟩, + ⟨396868362885433096678066894312618686020006272918469,396868362885433096680713595816876900163103771767675⟩] +lemma tr0_4_1_18_calc (r : Fin 8) : taylorRowBox 0 4 1 18 r = tr0_4_1_18 r := by + revert r + decide +kernel +def tr0_4_1_19 : Fin 8 → RI := ![⟨307322894714732346366068434308585264967761554994902,307322894714732346366245993224883759233856097138142⟩, + ⟨37020037395359979847913749369587026730371863003965447,37020037395359979847913877063863345786110140174166121⟩, + ⟨2326074189896949090693888598428132942980231684003149,2326074189896949090696563113850476325663369682951939⟩, + ⟨-1161777828133698812598813353764960052110796081375759,-1161777828133698812597823714846472742948756283679732⟩, + ⟨-2096299977613125497366633037421917608034439339237546,-2096299977613125497363798331648347296418428390352121⟩, + ⟨-1297109950574634402162714349857943467688772595510101,-1297109950574634402161497715109493620388302382075140⟩, + ⟨205187443969798884240549566730907872352497322188004,205187443969798884242688437593048045341821759654724⟩, + ⟨-527452494810065504352348705819402723164058153859678,-527452494810065504351142211438330687460761515198192⟩] +lemma tr0_4_1_19_calc (r : Fin 8) : taylorRowBox 0 4 1 19 r = tr0_4_1_19 r := by + revert r + decide +kernel +def tr0_4_1_20 : Fin 8 → RI := ![⟨-44230370131207144115598088867133399934067596009762,-44230370131207144115564190348675735644630892600273⟩, + ⟨-13965265442336729195717694439167063817280061442704415,-13965265442336729195717670060516472898475267163519580⟩, + ⟨-413113963711518618236981994954283145741022700364774,-413113963711518618236471391982109836808350414246742⟩, + ⟨218869876975723575370757944364303783248680715989766,218869876975723575370946880486830373331756842601458⟩, + ⟨383104588213171480012578416439350696382353076873416,383104588213171480013119602024269110465184499306765⟩, + ⟨246456459836035258737280666836164695903694916822532,246456459836035258737512939685969702270282644934515⟩, + ⟨-41704421416215676236948240106778072596295433165645,-41704421416215676236539899287529054957264824978607⟩, + ⟨107023694097890921430844694604306027480927614685608,107023694097890921431075031513850768253813875075198⟩] +lemma tr0_4_1_20_calc (r : Fin 8) : taylorRowBox 0 4 1 20 r = tr0_4_1_20 r := by + revert r + decide +kernel +def tr0_4_1 : Fin 21 → Fin 8 → RI := ![tr0_4_1_0,tr0_4_1_1,tr0_4_1_2,tr0_4_1_3,tr0_4_1_4,tr0_4_1_5,tr0_4_1_6,tr0_4_1_7,tr0_4_1_8,tr0_4_1_9,tr0_4_1_10,tr0_4_1_11,tr0_4_1_12,tr0_4_1_13,tr0_4_1_14,tr0_4_1_15,tr0_4_1_16,tr0_4_1_17,tr0_4_1_18,tr0_4_1_19,tr0_4_1_20] +lemma tr0_4_1_mem (l : Fin 21) (r : Fin 8) : (tr0_4_1 l r).Mem (taylorRow 0 (nearNode 4) (nearDisplacement 4 1) l.val r) := by + have he : taylorRowBox 0 4 1 l r = tr0_4_1 l r := by + fin_cases l + · exact tr0_4_1_0_calc r + · exact tr0_4_1_1_calc r + · exact tr0_4_1_2_calc r + · exact tr0_4_1_3_calc r + · exact tr0_4_1_4_calc r + · exact tr0_4_1_5_calc r + · exact tr0_4_1_6_calc r + · exact tr0_4_1_7_calc r + · exact tr0_4_1_8_calc r + · exact tr0_4_1_9_calc r + · exact tr0_4_1_10_calc r + · exact tr0_4_1_11_calc r + · exact tr0_4_1_12_calc r + · exact tr0_4_1_13_calc r + · exact tr0_4_1_14_calc r + · exact tr0_4_1_15_calc r + · exact tr0_4_1_16_calc r + · exact tr0_4_1_17_calc r + · exact tr0_4_1_18_calc r + · exact tr0_4_1_19_calc r + · exact tr0_4_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 4 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows05.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows05.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e7c45de77b05bd24948f3541e0ef77023b905ec --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows05.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_5_0_0 : Fin 8 → RI := ![⟨48493744738479334830472686839441545025926438723957673898,48493744738479334835193394622433269929361140598964193463⟩, + ⟨-6581533089339978584583767692786784785046734744723583704267,-6581533089339978584580372721824974209865908136211308836007⟩, + ⟨2073723659479442102252763862324682354285103463465106426820,2073723659479442102323870433797633360824380334278213420548⟩, + ⟨-1196355380615890843205226711653156839646989114713372349968,-1196355380615890843178915466706458063391764806206831570596⟩, + ⟨-1969226453678954603026700043118803102831470225854148884319,-1969226453678954602951334536906384654945472404058153327609⟩, + ⟨-1602459147203947836719677749773649258655650640130827967799,-1602459147203947836687331432060538868088957823687171072201⟩, + ⟨1987458510310430438296762326217515977455602631829460845551,1987458510310430438353627870062111018572548546861301663149⟩, + ⟨-2149169242876001125058023997589929285085100879674428452446,-2149169242876001125025947278860499098962381249632872576017⟩] +lemma tr0_5_0_0_calc (r : Fin 8) : taylorRowBox 0 5 0 0 r = tr0_5_0_0 r := by + revert r + decide +kernel +def tr0_5_0_1 : Fin 8 → RI := ![⟨157826496312235832501025859906527793305205630134988403702,157826496312235832504981748456251389626117870762498396301⟩, + ⟨-13965687849701044036527873914877577751871590579859658949102,-13965687849701044036525028975650086812703077712735633945464⟩, + ⟨6871691127964569964658781432981292406942232336647356253891,6871691127964569964718367767243759290122184986722225691410⟩, + ⟨-3966688000017249774658843077602512489364766824004375669128,-3966688000017249774636794614233588621687038796825546250651⟩, + ⟨-6523704385059654344623121029268546811846385981950268457702,-6523704385059654344559965765943716793595686174908969975222⟩, + ⟨-5318296521532265005977598048721220227935074807541970287293,-5318296521532265005950492276918695887925289348073861064951⟩, + ⟨6831742078825010197886207055151771846409282222867009328749,6831742078825010197933859603049340666910189724488648693701⟩, + ⟨-7276707406551679996997940882645510948272739428764416163494,-7276707406551679996971061031114719564326185501342731429849⟩] +lemma tr0_5_0_1_calc (r : Fin 8) : taylorRowBox 0 5 0 1 r = tr0_5_0_1 r := by + revert r + decide +kernel +def tr0_5_0_2 : Fin 8 → RI := ![⟨110132185698064125767994228335540280508722867372265077317,110132185698064125770762302381682381868779440736155140807⟩, + ⟨5168167857309242147111170770579524100272540217619943757897,5168167857309242147113161474397082882565299031414653852889⟩, + ⟨5076764774655643528130616589618518890419747808390910624561,5076764774655643528172311238826009197746258069939978884145⟩, + ⟨-2932841108012211852231273277933009056373177574045248642645,-2932841108012211852215845194342915321820365820801320006728⟩, + ⟨-4810718542334475885471123122071294553281360149956731254847,-4810718542334475885426931167945913306431474413569969824012⟩, + ⟨-3951807409924616070042817813789990723139689306702103678547,-3951807409924616070023850954003050125769713007571212221094⟩, + ⟨5792349439607421755485646505766973189661230181668938995539,5792349439607421755518990665844178897551798017286477748106⟩, + ⟨-5844373050173783929447783784457052900349972338581696243137,-5844373050173783929428975009020969261245395535278402713997⟩] +lemma tr0_5_0_2_calc (r : Fin 8) : taylorRowBox 0 5 0 2 r = tr0_5_0_2 r := by + revert r + decide +kernel +def tr0_5_0_3 : Fin 8 → RI := ![⟨-92614269566556376762782930473605880509005879165109239066,-92614269566556376761218191840532270121750634539441642980⟩, + ⟨17541215138109189464563709333048172338957076574903309655621,17541215138109189464564834639350710971641217546317166799642⟩, + ⟨-3790935550505037730811774777320113117406853433779383520023,-3790935550505037730788205599861858427606086268898737144607⟩, + ⟨2193687775114118976426773953261341356120598607379721383599,2193687775114118976435495150031970257895786286381211044592⟩, + ⟨3619412414857626977428165196923399457147860559637255211490,3619412414857626977453146052475373203986422170185780237308⟩, + ⟨2904212536635949798205694307985486968001289272931998793779,2904212536635949798216415906387492789895883051853565010407⟩, + ⟨-2627959727535504508121704572274077322397385194746669847345,-2627959727535504508102855764553613930609582854130741887735⟩, + ⟨3303395940796358896142674047820506330002562905094569804118,3303395940796358896153306284196023792540079564479522901617⟩] +lemma tr0_5_0_3_calc (r : Fin 8) : taylorRowBox 0 5 0 3 r = tr0_5_0_3 r := by + revert r + decide +kernel +def tr0_5_0_4 : Fin 8 → RI := ![⟨-107647122180648420484671046067521832839589847647700258306,-107647122180648420483769688218183240841064736405698715681⟩, + ⟨-4440551873861194492845793694525191069922451653803879152471,-4440551873861194492845145468906388716421964649785600353281⟩, + ⟨-4932475364013484773796066844467274977744236595631751718594,-4932475364013484773782489968012907576504253797631276749495⟩, + ⟨2859213444243516562950489912760218402538830767535313836112,2859213444243516562955513703314678851733250808648245618743⟩, + ⟨4692968407897525648623260385696698022528232953898600909855,4692968407897525648637650450439523951965804372323873195887⟩, + ⟨3822624820594796939904403051956880513093615894126377305689,3822624820594796939910579161291322493925081101984586779856⟩, + ⟨-4784691506451122591415609508254336520428181600081086944965,-4784691506451122591404751771102572570029477500948601466589⟩, + ⟨5166170260549251863288510857221254347827453452476973680017,5166170260549251863294635490121879513614240385962999065088⟩] +lemma tr0_5_0_4_calc (r : Fin 8) : taylorRowBox 0 5 0 4 r = tr0_5_0_4 r := by + revert r + decide +kernel +def tr0_5_0_5 : Fin 8 → RI := ![⟨8238444224500643235648743222197367110637572427093512562,8238444224500643236016480617977676629245924749608621064⟩, + ⟨-7473618780058543451993862836691442420720352187226653127457,-7473618780058543451993598372582009031871108378395286528080⟩, + ⟨110532034105269384490444053602579025858399475077585497061,110532034105269384495983169053968183091632938532978293888⟩, + ⟨-64405621404630985679979729418774263152225432727278970943,-64405621404630985677930115431160675333714901232326566026⟩, + ⟨-116036794669721882428323899203500126797082968390564046476,-116036794669721882422453017911773609004251751721370471836⟩, + ⟨-62979605221144384783481019381575350669519510395437813208,-62979605221144384780961280561323322218724058006510066359⟩, + ⟨-565229899981695057601666730879351265149226772051413436778,-565229899981695057597236974166857874374340654588710798136⟩, + ⟨322755984007835999973272901454349391533534020807712073473,322755984007835999975771638836444487522792866147772891870⟩] +lemma tr0_5_0_5_calc (r : Fin 8) : taylorRowBox 0 5 0 5 r = tr0_5_0_5 r := by + revert r + decide +kernel +def tr0_5_0_6 : Fin 8 → RI := ![⟨36214772691245964407269490193910148117190666396785623669,36214772691245964407436823669068347410532682621867706708⟩, + ⟨1943148819261265648672301994095525969249384173603710457854,1943148819261265648672422334585747545369194524084745313256⟩, + ⟨1634835207045558110810156549166725735769208003944670815169,1634835207045558110812677041910937163744311243653221539301⟩, + ⟨-951722353117959515335669480889731265324495046081699612385,-951722353117959515334736834291143698922388437035667078746⟩, + ⟨-1563108868564477740688603297446819316070009915492155343498,-1563108868564477740685931839552517248501886767832430574847⟩, + ⟨-1259523206990376395627746203539265013356697436965573759961,-1259523206990376395626599633572960872471518869534889820099⟩, + ⟨1293179778584671856369506739099120329487473104123934864792,1293179778584671856371522434519762224859334248879655663640⟩, + ⟨-1524639011735306287446455850634503473280645464749155657030,-1524639011735306287445318837063359010486555143013971669394⟩] +lemma tr0_5_0_6_calc (r : Fin 8) : taylorRowBox 0 5 0 6 r = tr0_5_0_6 r := by + revert r + decide +kernel +def tr0_5_0_7 : Fin 8 → RI := ![⟨5318700250001710879377441759208822379910368038184619649,5318700250001710879440771260454695057624152813216008363⟩, + ⟨1604042260104402983096311647012529042017636909067444841712,1604042260104402983096357191415505381279648041315292387786⟩, + ⟨333303944031963126082191103807119454394398328491155164806,333303944031963126083145016634477095495423534028937051542⟩, + ⟨-194264551815787067697902336243133977425738545777922688401,-194264551815787067697549364168122623728334888403005607501⟩, + ⟨-315848536942420533861118001928580781237022224093033028577,-315848536942420533860106954402442852194936667193606962216⟩, + ⟨-263995336728569234989338872191930125141064676464936308944,-263995336728569234988904938072679292400825172808536492761⟩, + ⟨435100334898581981568962655019260068912619146090114979393,435100334898581981569725520820596906976765899090916795352⟩, + ⟨-428163883802590796715974881692729585089777963345409803230,-428163883802590796715544564314253422266798035323322198127⟩] +lemma tr0_5_0_7_calc (r : Fin 8) : taylorRowBox 0 5 0 7 r = tr0_5_0_7 r := by + revert r + decide +kernel +def tr0_5_0_8 : Fin 8 → RI := ![⟨-6095628438061425365608072671708769082959481868818609169,-6095628438061425365586759098407920404983539430519568302⟩, + ⟨-471054879104593265737319330187106051110546209824749050277,-471054879104593265737304002196959495921628883019748040744⟩, + ⟨-257272049086085199313528003440917252065553405271139622069,-257272049086085199313206963632129253614909256682622948130⟩, + ⟨150554310583071414000427009484467305373221099142938240999,150554310583071414000545802401646446226847513063502591684⟩, + ⟨247685731524612446250799683062503532333574832516510370161,247685731524612446251139951581006392171317167023156985178⟩, + ⟨195892757840788476064829434354752782419292371614189558596,195892757840788476064975475085914617672018338132225252981⟩, + ⟨-144592767732147506693585594464721816200659744936789255238,-144592767732147506693328851622119962256560523515768251868⟩, + ⟨198702276243295357036144885855989373365870607983487489564,198702276243295357036289709371208767437617824523236526360⟩] +lemma tr0_5_0_8_calc (r : Fin 8) : taylorRowBox 0 5 0 8 r = tr0_5_0_8 r := by + revert r + decide +kernel +def tr0_5_0_9 : Fin 8 → RI := ![⟨-1796222691827175164641373214989218045175221071659676888,-1796222691827175164633514121994665844201109364808265533⟩, + ⟨-192562703674005606994548401065894347902932128335363909615,-192562703674005606994542749076043389218738843522562536962⟩, + ⟨-97742976638955478462053086253628885415913641451454619037,-97742976638955478461934707149545268838976112919788573127⟩, + ⟨57274564924319434812148897178759913934463430708332284248,57274564924319434812192700466457625620266221294850649962⟩, + ⟨93507663355388201451317460910422135148359203547627948289,93507663355388201451442930342137826604359195072150628232⟩, + ⟨76139957137724597184999970243283345496663474556923612956,76139957137724597185053820795269884747955609961102684144⟩, + ⟨-88892467460135888573124875973236086236590911989164967697,-88892467460135888573030205509147772057067062682958198036⟩, + ⟨99717491559850788899309691699641093566596134329211327641,99717491559850788899363093419656027620067766872795701227⟩] +lemma tr0_5_0_9_calc (r : Fin 8) : taylorRowBox 0 5 0 9 r = tr0_5_0_9 r := by + revert r + decide +kernel +def tr0_5_0_10 : Fin 8 → RI := ![⟨574199619848435479412276201233471266601834059060968651,574199619848435479414292935330480119510856654684562662⟩, + ⟨77147040774210808697173167734849445694931267820631585652,77147040774210808697174618100770016120843486270042376891⟩, + ⟨18868205230021497608018040930255324873004527138355798048,18868205230021497608048418376580269798812426893412111224⟩, + ⟨-11095071562792745750982139623843021330352803766677600846,-11095071562792745750970899193941666258263839131723585280⟩, + ⟨-18367694722778500379030906205298733401034823980816399460,-18367694722778500378998709298945674145949218587259384647⟩, + ⟨-13901193122987708048889469720769050023395229183501291102,-13901193122987708048875651046717926754285106047366943738⟩, + ⟨3444461187234243170618112606607154955590727676820898317,3444461187234243170642406141875821666293133755255364060⟩, + ⟨-9018791404237686204887127620644941681853076003189549011,-9018791404237686204873424122079386890854348250887539576⟩] +lemma tr0_5_0_10_calc (r : Fin 8) : taylorRowBox 0 5 0 10 r = tr0_5_0_10 r := by + revert r + decide +kernel +def tr0_5_0_11 : Fin 8 → RI := ![⟨285583226014155776140738337768437412110435621893269930,285583226014155776141437246258235660962481085038789694⟩, + ⟨10806314978167175853098126651181386213125859121879230925,10806314978167175853098629282171245061726823498607071520⟩, + ⟨13691419011631224190417593424656503970309974508876140319,13691419011631224190428120868588297271426685592697992186⟩, + ⟨-8058596098622186042674667284482631402743657829802270793,-8058596098622186042670771861732035901988922637759077172⟩, + ⟨-13186353690300636021498303556217781564565008408586322905,-13186353690300636021487145570037344773216157741659631241⟩, + ⟨-10513373862422333316409227176678837926227925995021508750,-10513373862422333316404438251547286912563902553567744065⟩, + ⟨9534485523626493780437060228888347233325970052061543564,9534485523626493780445479265428008650325076152603589229⟩, + ⟨-11796723152824833014754873313411388031939501139421969587,-11796723152824833014750124302868322899771781926340615244⟩] +lemma tr0_5_0_11_calc (r : Fin 8) : taylorRowBox 0 5 0 11 r = tr0_5_0_11 r := by + revert r + decide +kernel +def tr0_5_0_12 : Fin 8 → RI := ![⟨-25933417744325940899202397448155116066273993008292371,-25933417744325940899065222242005713963896864374419553⟩, + ⟨-10656963299280701076842517052731988738354618828636438087,-10656963299280701076842418401033490643575093817287670415⟩, + ⟨-14953614648724701248050168016469639468081310619716329,-14953614648724701245983940015251109092513040531615176⟩, + ⟨6354045279605039632815295804660641628917504539297234,6354045279605039633579852863446113981509193053054504⟩, + ⟨34148542159884901670300546622437679559214774221777009,34148542159884901672490531546229202795852301353122451⟩, + ⟨-65248911991913346393109101537965521452315910965300612,-65248911991913346392169176207143387190711892793451648⟩, + ⟨928196454750697012617806382164248630571338567156773691,928196454750697012619458791726912762453224701758383287⟩, + ⟨-732300731541167893155292941352731843249597378410809824,-732300731541167893154360850085363982659685726277415570⟩] +lemma tr0_5_0_12_calc (r : Fin 8) : taylorRowBox 0 5 0 12 r = tr0_5_0_12 r := by + revert r + decide +kernel +def tr0_5_0_13 : Fin 8 → RI := ![⟨-30492716590203206931558671174223492711004089394616694,-30492716590203206931517396916302637587630369455969972⟩, + ⟨416883808201168380853519370367529811913869543693622509,416883808201168380853549053396717943664191255514559220⟩, + ⟨-1160172410511162353220540208690102084502189386453119081,-1160172410511162353219918507219125823405794020803340107⟩, + ⟨683423550795343301743887068778058243511248646023513712,683423550795343301744117114178578688379033842429735093⟩, + ⟨1122468997269843660409457445725816926766471655102376070,1122468997269843660410116384065499242924190521734504728⟩, + ⟨871854459977900405179995253553396059786580531763556176,871854459977900405180278065014881233438585521960709584⟩, + ⟨-615007959878308620276369437309285053303817961171288965,-615007959878308620275872248492203532187914230294440288⟩, + ⟨838502642037805509350235882524594711517374240350424453,838502642037805509350516336816991857626256936493868766⟩] +lemma tr0_5_0_13_calc (r : Fin 8) : taylorRowBox 0 5 0 13 r = tr0_5_0_13 r := by + revert r + decide +kernel +def tr0_5_0_14 : Fin 8 → RI := ![⟨-1288978538913528428035508948839911342970570240757355,-1288978538913528428026078107611644395670708501476348⟩, + ⟨1461837351444746370969152480254633160465535281319023644,1461837351444746370969159262591844292315725557265681509⟩, + ⟨-133035197179344292157833737524504283080927887525266357,-133035197179344292157691683659450790219642461143534186⟩, + ⟨78936106049559845897042522485325750799952385252913637,78936106049559845897095086038444723018148555065711108⟩, + ⟨127749492233096897493490543521393786709778328617284072,127749492233096897493641105716246016687073380069351872⟩, + ⟨105985185876192564769276502614351141800136910170243951,105985185876192564769341122794776029168328539026728135⟩, + ⟨-129579884950579673730754927778066407542790823444349571,-129579884950579673730641324068916850925259324199248699⟩, + ⟨144779818386372186596598057042038930989398589049406858,144779818386372186596662138627902156430670986464953990⟩] +lemma tr0_5_0_14_calc (r : Fin 8) : taylorRowBox 0 5 0 14 r = tr0_5_0_14 r := by + revert r + decide +kernel +def tr0_5_0_15 : Fin 8 → RI := ![⟨2386524489079894821342867854830766811879031734526775,2386524489079894821345253983689285590293262373999341⟩, + ⟨-124077082892931648136219017505345776234274606166427612,-124077082892931648136217301483396412275274165596455430⟩, + ⟨63770558630733612937142870085848397092421654022682703,63770558630733612937178811612022670539191145212598090⟩, + ⟨-37297420569890588137985020251317653592992932835880953,-37297420569890588137971720969954313424095103429832140⟩, + ⟨-61735240577730019469210098282299525262864313671671819,-61735240577730019469172004034990438604398144915351338⟩, + ⟨-46212151155597415024858820600799231997782775714287093,-46212151155597415024842470831614329623146618619119200⟩, + ⟨23513977961843810452624285011621452517670410653221856,23513977961843810452653028268167135993269397720874073⟩, + ⟨-36669216572100835226559770109831260129784124191343174,-36669216572100835226543556612261363308777389772514379⟩] +lemma tr0_5_0_15_calc (r : Fin 8) : taylorRowBox 0 5 0 15 r = tr0_5_0_15 r := by + revert r + decide +kernel +def tr0_5_0_16 : Fin 8 → RI := ![⟨403156655727633466575179249446959247578299443054787,403156655727633466575746413169986787761836167170402⟩, + ⟨-192965203328074702328019476662523373490410126754955271,-192965203328074702328019068777846859348536065012117266⟩, + ⟨14944066280025485681084531250790367718731592213041762,14944066280025485681093074263763490383890484013417583⟩, + ⟨-8783879605799799022137297050693062429580034131471568,-8783879605799799022134135918005767839690642054526584⟩, + ⟨-14410336108638438705201245661019526637110722349663236,-14410336108638438705192190963472183586064664541419203⟩, + ⟨-11246029504013701751803342203326086465666167698004896,-11246029504013701751799455994111769681103832940328944⟩, + ⟨9239260707166588888444019203673784604305854861657869,9239260707166588888450851245596902447734023312023965⟩, + ⟨-11724367123982991596064755481358376505188608532364162,-11724367123982991596060901662813318355416890228678800⟩] +lemma tr0_5_0_16_calc (r : Fin 8) : taylorRowBox 0 5 0 16 r = tr0_5_0_16 r := by + revert r + decide +kernel +def tr0_5_0_17 : Fin 8 → RI := ![⟨-122835126282399675472605472661692690945597375762396,-122835126282399675472508088763459316182619468809652⟩, + ⟨5233667686244039354128701683985543856870183797469072,5233667686244039354128771719141521512920226265501700⟩, + ⟨-2085093918330319627912832299217571547625545177258533,-2085093918330319627911365435466936440897448771334868⟩, + ⟨1193675586205500040376740815491334257548142666911347,1193675586205500040377283592491358948779824707280116⟩, + ⟨2008096723453805805565127438846011959458523040962095,2008096723453805805566682160540725974910285864355382⟩, + ⟨1413189557685654070775857330696785724240562416993678,1413189557685654070776524605749146122566979582360086⟩, + ⟨-315761080749283999821383452540974806693872782451717,-315761080749283999820210368212892807027502711520586⟩, + ⟨767149927255520416005959455926085888580553257192978,767149927255520416006621169392069859843861372342389⟩] +lemma tr0_5_0_17_calc (r : Fin 8) : taylorRowBox 0 5 0 17 r = tr0_5_0_17 r := by + revert r + decide +kernel +def tr0_5_0_18 : Fin 8 → RI := ![⟨-44621699002692083957536640924850764258683338165065,-44621699002692083957510030775418724299577126175100⟩, + ⟨21742163170622107518403918902779703223764874816481811,21742163170622107518403938039885538833288991256183097⟩, + ⟨-1009465586535790944424762782304008323355511772584020,-1009465586535790944424361961795728193856386882653433⟩, + ⟨582774121992185662884739371815245269777782691738761,582774121992185662884887685626111122273402469965949⟩, + ⟨968817406526267207558664818934868272846864232167042,968817406526267207559089646625355320210186415836493⟩, + ⟨722292747584402862645448478902002992213540292295770,722292747584402862645630811804388725712762592997649⟩, + ⟨-446590977490516058072191831937840722350254578848886,-446590977490516058071871286654050219121297701834582⟩, + ⟨625234476012216474901628192690770903239392007612475,625234476012216474901809005890261561125701075269171⟩] +lemma tr0_5_0_18_calc (r : Fin 8) : taylorRowBox 0 5 0 18 r = tr0_5_0_18 r := by + revert r + decide +kernel +def tr0_5_0_19 : Fin 8 → RI := ![⟨1796919164673991921526842759798919060497662782138,1796919164673991921530085412328451429897862659046⟩, + ⟨1286145184803761922746023220476395153940690029955975,1286145184803761922746025552480757124948222469233585⟩, + ⟨-326292263563469132311973501324035251455421025343,-326292263563469132263130422154595577946180581335⟩, + ⟨1132071328295968968803903266159681661747849884171,1132071328295968968821976451212115633295566138072⟩, + ⟨500711306121529398073494826308593761256851463250,500711306121529398125263366369586657408547859392⟩, + ⟨4432627832865970904544766651075649981811931293154,4432627832865970904566985325606069371888775182560⟩, + ⟨-24494204559545515342439093415662560938424232641779,-24494204559545515342400032493594642791726716652525⟩, + ⟨22209496486277609173540758930774772610772600336288,22209496486277609173562792417652252256259248709990⟩] +lemma tr0_5_0_19_calc (r : Fin 8) : taylorRowBox 0 5 0 19 r = tr0_5_0_19 r := by + revert r + decide +kernel +def tr0_5_0_20 : Fin 8 → RI := ![⟨2963143912744998052355423173492183847218845721725,2963143912744998052356706457571001923558572349503⟩, + ⟨-1939137331263725958117630332599481346339125437544780,-1939137331263725958117629409705632386202057609363388⟩, + ⟨48042278522817745755154141227506595743490222863176,48042278522817745755173470941457442797694964023440⟩, + ⟨-27089328315999710433407430727310021587905838430790,-27089328315999710433400278240149053141300672603377⟩, + ⟨-45687437946114370910423910369393656582925934299712,-45687437946114370910403422900400958402666852609251⟩, + ⟨-32723594499928496903309921707843483973660588845411,-32723594499928496903301128637693552091168224917612⟩, + ⟨15781538566460676955469626448576043327535256249936,15781538566460676955485084860797317129140639790990⟩, + ⟨-24233118362076205197622779486906334490430997210230,-24233118362076205197614059704977186612320109234870⟩] +lemma tr0_5_0_20_calc (r : Fin 8) : taylorRowBox 0 5 0 20 r = tr0_5_0_20 r := by + revert r + decide +kernel +def tr0_5_0 : Fin 21 → Fin 8 → RI := ![tr0_5_0_0,tr0_5_0_1,tr0_5_0_2,tr0_5_0_3,tr0_5_0_4,tr0_5_0_5,tr0_5_0_6,tr0_5_0_7,tr0_5_0_8,tr0_5_0_9,tr0_5_0_10,tr0_5_0_11,tr0_5_0_12,tr0_5_0_13,tr0_5_0_14,tr0_5_0_15,tr0_5_0_16,tr0_5_0_17,tr0_5_0_18,tr0_5_0_19,tr0_5_0_20] +lemma tr0_5_0_mem (l : Fin 21) (r : Fin 8) : (tr0_5_0 l r).Mem (taylorRow 0 (nearNode 5) (nearDisplacement 5 0) l.val r) := by + have he : taylorRowBox 0 5 0 l r = tr0_5_0 l r := by + fin_cases l + · exact tr0_5_0_0_calc r + · exact tr0_5_0_1_calc r + · exact tr0_5_0_2_calc r + · exact tr0_5_0_3_calc r + · exact tr0_5_0_4_calc r + · exact tr0_5_0_5_calc r + · exact tr0_5_0_6_calc r + · exact tr0_5_0_7_calc r + · exact tr0_5_0_8_calc r + · exact tr0_5_0_9_calc r + · exact tr0_5_0_10_calc r + · exact tr0_5_0_11_calc r + · exact tr0_5_0_12_calc r + · exact tr0_5_0_13_calc r + · exact tr0_5_0_14_calc r + · exact tr0_5_0_15_calc r + · exact tr0_5_0_16_calc r + · exact tr0_5_0_17_calc r + · exact tr0_5_0_18_calc r + · exact tr0_5_0_19_calc r + · exact tr0_5_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 5 0 l r +def tr0_5_1_0 : Fin 8 → RI := ![⟨48493744738479334830472686839441545025926438723957673898,48493744738479334835193394622433269929361140598964193463⟩, + ⟨-6581533089339978584583767692786784785046734744723583704267,-6581533089339978584580372721824974209865908136211308836007⟩, + ⟨2073723659479442102252763862324682354285103463465106426820,2073723659479442102323870433797633360824380334278213420548⟩, + ⟨-1196355380615890843205226711653156839646989114713372349968,-1196355380615890843178915466706458063391764806206831570596⟩, + ⟨-1969226453678954603026700043118803102831470225854148884319,-1969226453678954602951334536906384654945472404058153327609⟩, + ⟨-1602459147203947836719677749773649258655650640130827967799,-1602459147203947836687331432060538868088957823687171072201⟩, + ⟨1987458510310430438296762326217515977455602631829460845551,1987458510310430438353627870062111018572548546861301663149⟩, + ⟨-2149169242876001125058023997589929285085100879674428452446,-2149169242876001125025947278860499098962381249632872576017⟩] +lemma tr0_5_1_0_calc (r : Fin 8) : taylorRowBox 0 5 1 0 r = tr0_5_1_0 r := by + revert r + decide +kernel +def tr0_5_1_1 : Fin 8 → RI := ![⟨-52608832104078610834993916152083796542039290254166132101,-52608832104078610833675286635509264435068543378329467900⟩, + ⟨4655229283233681345508342991883362270901025904245211315155,4655229283233681345509291304959192583957196859953219649701⟩, + ⟨-2290563709321523321572789255747919763374061662240741897137,-2290563709321523321552927144327097468980744112215785417963⟩, + ⟨1322229333339083258212264871411196207229012932275182083550,1322229333339083258219614359200837496454922274668125223043⟩, + ⟨2174568128353218114853321921981238931198562058302989991741,2174568128353218114874373676422848937282128660650089485901⟩, + ⟨1772765507177421668650164092306231962641763116024620354984,1772765507177421668659199349573740075978358269180656762432⟩, + ⟨-2277247359608336732644619867683113555636729908162882897901,-2277247359608336732628735685050590615469760740955669776249⟩, + ⟨2425569135517226665657020343704906521442061833780910476616,2425569135517226665665980294215170316090913142921472054499⟩] +lemma tr0_5_1_1_calc (r : Fin 8) : taylorRowBox 0 5 1 1 r = tr0_5_1_1 r := by + revert r + decide +kernel +def tr0_5_1_2 : Fin 8 → RI := ![⟨12236909522007125085332692037282253389858096374696119702,12236909522007125085640255820186931318753271192906126757⟩, + ⟨574240873034360238567907863397724900030282246402215973099,574240873034360238568129052710786986951699892379405983655⟩, + ⟨564084974961738169792290732179835432268860867598990069395,564084974961738169796923470980667688638473118882219876017⟩, + ⟨-325871234223579094692363697548112117374797508227249849183,-325871234223579094690649466038101702424485091200146667414⟩, + ⟨-534524282481608431719013680230143839253484461106303472761,-534524282481608431714103463105101478492386045952218869334⟩, + ⟨-439089712213846230004757534865554524793298811855789297617,-439089712213846230002650106000338902863301445285690246788⟩, + ⟨643594382178602417276182945085219243295692242407659888393,643594382178602417279887851760464321950199779698497527568⟩, + ⟨-649374783352642658827531531606339211149996926509077360349,-649374783352642658825441667668996584582821726142044745999⟩] +lemma tr0_5_1_2_calc (r : Fin 8) : taylorRowBox 0 5 1 2 r = tr0_5_1_2 r := by + revert r + decide +kernel +def tr0_5_1_3 : Fin 8 → RI := ![⟨3430158132094680620785858957056750745250023501460801591,3430158132094680620843812239763180759592810339448490336⟩, + ⟨-649674634744784794983882764420396702653378427641376548135,-649674634744784794983841086409191568109521354626048505763⟩, + ⟨140405020389075471510674281476365126948373565514768042392,140405020389075471511547213974819004348401979028866056298⟩, + ⟨-81247695374596999127240561112295194736880973569674483134,-81247695374596999126917553824494124300762911384434125318⟩, + ⟨-134052311661393591757523927869458266814311932229102971753,-134052311661393591756598710997162942857328168875453896721⟩, + ⟨-107563427282812955489496885421758992218366038957539444830,-107563427282812955489099789184647665481529232330814770139⟩, + ⟨97331841760574241040846509798281997429984550152990440286,97331841760574241041544613787928789718421673879506290643⟩, + ⟨-122347997807272551709381714229482362686669613499241588949,-122347997807272551708987927697055790000094922410909992745⟩] +lemma tr0_5_1_3_calc (r : Fin 8) : taylorRowBox 0 5 1 3 r = tr0_5_1_3 r := by + revert r + decide +kernel +def tr0_5_1_4 : Fin 8 → RI := ![⟨-1328976817045042228205815383549652257278887007996299486,-1328976817045042228194687508866459763469935017354305131⟩, + ⟨-54821628072360425837602391290434457653363600664245421636,-54821628072360425837594388505017144647184748762785189546⟩, + ⟨-60894757580413392269087244993423147873385636983108045909,-60894757580413392268919629234727254030916713551003416660⟩, + ⟨35298931410413784727783826083459486451096676142411281927,35298931410413784727845848189070109280657417390719081713⟩, + ⟨57937881578981798131151362786378987932447320418501245800,57937881578981798131329017906660789530442029287949051802⟩, + ⟨47192899019688851109930901876010870532019949310202188959,47192899019688851110007150139399043134877544468945515801⟩, + ⟨-59070265511742254215007524793263413832446686420754159815,-59070265511742254214873478655587315679376265443809894649⟩, + ⟨63779879759867306954179146385447584541079672252802144197,63779879759867306954254759137307154489064696122999988458⟩] +lemma tr0_5_1_4_calc (r : Fin 8) : taylorRowBox 0 5 1 4 r = tr0_5_1_4 r := by + revert r + decide +kernel +def tr0_5_1_5 : Fin 8 → RI := ![⟨-33903062652266021547392924353817599297308332302916137,-33903062652266021545879601737437724735134042909849845⟩, + ⟨30755632839747092395035384249308679143502503614795417811,30755632839747092395036472578977129303375934926858654846⟩, + ⟨-454864337881767014386762012567770300788612915773573226,-454864337881767014363967298776045373902878498261668712⟩, + ⟨265043709484078130361852326877204425241625107951961177,265043709484078130370286952340634827786935937149296177⟩, + ⟨477517673537950133425732583999068349811735603791648032,477517673537950133449892589314815336613510157985860274⟩, + ⟨259175330128166192514243952927256470035901473277819203,259175330128166192524613248483849179709956832903036269⟩, + ⟨2326048971118086656778752980110526231993171418060538263,2326048971118086656796982431602268580861015522845322786⟩, + ⟨-1328213925958172839406467649532693364291328667274785564,-1328213925958172839396184779647528360220304612377415940⟩] +lemma tr0_5_1_5_calc (r : Fin 8) : taylorRowBox 0 5 1 5 r = tr0_5_1_5 r := by + revert r + decide +kernel +def tr0_5_1_6 : Fin 8 → RI := ![⟨49677328794576082863195459799602397965967992313834874,49677328794576082863424998174305003306629194268679982⟩, + ⟨2665499066202010492005901226468485554525904216191646718,2665499066202010492006066302586759321494093997372764491⟩, + ⟨2242572300474016612908308023548320625197816191967998374,2242572300474016612911765489589762913229507878811003484⟩, + ⟨-1305517631163181776866487628106627250102187991881618124,-1305517631163181776865208277491280794132220078238226445⟩, + ⟨-2144182261405319260203845401161617717517160377904191144,-2144182261405319260200180849866278804529337130085638648⟩, + ⟨-1727741024678156921300063379340555573877499913533022991,-1727741024678156921298490581032868137821013538456638985⟩, + ⟨1773909161295846167859405677776571096690635259429265932,1773909161295846167862170692071004423675355622605837674⟩, + ⟨-2091411538731558693342189095520580896132572653976893906,-2091411538731558693340629406122577517814204585753047557⟩] +lemma tr0_5_1_6_calc (r : Fin 8) : taylorRowBox 0 5 1 6 r = tr0_5_1_6 r := by + revert r + decide +kernel +def tr0_5_1_7 : Fin 8 → RI := ![⟨-2431961705533475482140270352288383656892616741296758,-2431961705533475482111313104347884032880826720706273⟩, + ⟨-733444106129128021534685501333107170223890279522310192,-733444106129128021534664676274590325568192459564446658⟩, + ⟨-152402352095090592630610432846125786692008931883373138,-152402352095090592630174258713817766069683735021104327⟩, + ⟨88826955562774150753337615074587390822283899589851672,88826955562774150753499010627861900971988361123878687⟩, + ⟨144420913096671483246505237495401395608110044441521244,144420913096671483246967536318509730789676371327404220⟩, + ⟨120711173629889910831689500719103471605315579702120024,120711173629889910831887915954243312821703098520775633⟩, + ⟨-198948484178592584165398043356468636020469089662056148,-198948484178592584165049224974513063060182508500281197⟩, + ⟨195776810152076267359645434071446466514310944363658984,195776810152076267359842195561376124869582973637590217⟩] +lemma tr0_5_1_7_calc (r : Fin 8) : taylorRowBox 0 5 1 7 r = tr0_5_1_7 r := by + revert r + decide +kernel +def tr0_5_1_8 : Fin 8 → RI := ![⟨-929070025615214961988732307835508166889114749095963,-929070025615214961985483782717256577500920504575456⟩, + ⟨-71796201662032200234311740616842867110279867371551448,-71796201662032200234309404389111339113188368087143429⟩, + ⟨-39212322677348757706680079780661065701196982970757449,-39212322677348757706631148244494627894362026624390024⟩, + ⟨22946854226957996342086116367088447702060829011269355,22946854226957996342104222283439482735382946664152202⟩, + ⟨37751216510381412322938528130239831174146446047326683,37751216510381412322990390425393444927803256671720315⟩, + ⟨29857149495623910389396347257240174122739273222708361,29857149495623910389418606170692671493982371305018329⟩, + ⟨-22038220962070950570581556845712820637198558899068627,-22038220962070950570542425182459985102356427909734530⟩, + ⟨30285364463236603724454334073462791246131779909082074,30285364463236603724476407463985485053744524390068058⟩] +lemma tr0_5_1_8_calc (r : Fin 8) : taylorRowBox 0 5 1 8 r = tr0_5_1_8 r := by + revert r + decide +kernel +def tr0_5_1_9 : Fin 8 → RI := ![⟨91257567028764678384063106335145345943256077061843,91257567028764678384462389625017428500493881606447⟩, + ⟨9783198886044079001907369256517979434981397323708913,9783198886044079001907656407351234461359148927265352⟩, + ⟨4965857676114183735301260333767477967737444135537701,4965857676114183735307274615334496032917423230780604⟩, + ⟨-2909849358548972962058258419268283575687965314985046,-2909849358548972962056032981697907531090963303781551⟩, + ⟨-4750681469053914619287859083581660651544947166191670,-4750681469053914619281484576051523403361235764244675⟩, + ⟨-3868310579572453243156725133123501739976406541741741,-3868310579572453243153989241644228293281688490419326⟩, + ⟨4516205225836299780167159757615595796223495538432058,4516205225836299780171969515482197136442153736176649⟩, + ⟨-5066173426807437326594680354603263101156722393577997,-5066173426807437326591967266150540749204701230971464⟩] +lemma tr0_5_1_9_calc (r : Fin 8) : taylorRowBox 0 5 1 9 r = tr0_5_1_9 r := by + revert r + decide +kernel +def tr0_5_1_10 : Fin 8 → RI := ![⟨9724120981700544961172521147410985225860455876661,9724120981700544961206674716430085513909747069122⟩, + ⟨1306491909671811693630259068482945446915803278982397,1306491909671811693630283630557164661905256418737699⟩, + ⟨319534712357897637691036951180465797439491390850917,319534712357897637691551395901374617670281069847282⟩, + ⟨-187896011156712996849771200593456643302220253800702,-187896011156712996849580842926072689770594576228616⟩, + ⟨-311058522968695496605038293710286937984298192701255,-311058522968695496604493036274038072549056183631549⟩, + ⟨-235417926179744077780986464136040407515711175185038,-235417926179744077780752443677588557880490881257378⟩, + ⟨58332252658541942634390296306578518782548860722804,58332252658541942634801709459530587584770847182093⟩, + ⟨-152734024356681505273368348670509943976241358925462,-152734024356681505273136278719019575113115349131865⟩] +lemma tr0_5_1_10_calc (r : Fin 8) : taylorRowBox 0 5 1 10 r = tr0_5_1_10 r := by + revert r + decide +kernel +def tr0_5_1_11 : Fin 8 → RI := ![⟨-1612125669721506862331494443926432064683461108790,-1612125669721506862327549085044835148833655788092⟩, + ⟨-61001964346938846568661220806286558969256174242901,-61001964346938846568658383439637059691249973874122⟩, + ⟨-77288461061328863545124223772281197375212030645160,-77288461061328863545064796043153448663031123918983⟩, + ⟨45491010847613485086796682200274551090274871365358,45491010847613485086818671975718648369679745238713⟩, + ⟨74437352539420007234032445201089178892197766497087,74437352539420007234095432359666161801018410746930⟩, + ⟨59348303174326030451570945325335946488305771780316,59348303174326030451597978947872884814464405239838⟩, + ⟨-53822449850274031061465784153431944375716642972242,-53822449850274031061418258445744761318712538468399⟩, + ⟨66592847481610374518056327811751386700151749261012,66592847481610374518083136115268043105101983885824⟩] +lemma tr0_5_1_11_calc (r : Fin 8) : taylorRowBox 0 5 1 11 r = tr0_5_1_11 r := by + revert r + decide +kernel +def tr0_5_1_12 : Fin 8 → RI := ![⟨-48798300741429323103039467124582251023677121277,-48798300741429323102781347773328956486038646574⟩, + ⟨-20052956582726400629312599240051085140880396560741,-20052956582726400629312413609475916693621857962196⟩, + ⟨-28137864125509136946622801056880518191259821165,-28137864125509136942734828542116827818164275115⟩, + ⟨11956257194317035442909553091802554994660751690,11956257194317035444348202083478907313340884601⟩, + ⟨64256506667503827650295228675314248541634488535,64256506667503827654416071673486243620368585324⟩, + ⟨-122777339331954716314904385506510640790446937601,-122777339331954716313135750171972781909397078496⟩, + ⟨1746565384964082584177371302109262609718366793598,1746565384964082584180480602224730049908126587446⟩, + ⟨-1377953021203045856746643449325008501883741334242,-1377953021203045856744889555162970080704510427831⟩] +lemma tr0_5_1_12_calc (r : Fin 8) : taylorRowBox 0 5 1 12 r = tr0_5_1_12 r := by + revert r + decide +kernel +def tr0_5_1_13 : Fin 8 → RI := ![⟨19125808628617417506689295027608983617265992810,19125808628617417506715183293613334757764950638⟩, + ⟨-261480144362948022987530791060981961411954325137,-261480144362948022987512173108918212880244181193⟩, + ⟨727689690552769014321388142314402930526495585150,727689690552769014321778089314462680712872728082⟩, + ⟨-428660660854383523128071986779704418978484185721,-428660660854383523127927696444232594970560323111⟩, + ⟨-704041149296499931576045998248472387919004192836,-704041149296499931575632695335773821720235896429⟩, + ⟨-546849327255456018121972815430048511774957472207,-546849327255456018121795428876956588963830122104⟩, + ⟨385748659386026934489355198722093033963578415599,385748659386026934489667048213746557820352564174⟩, + ⟨-525930217426334255574633456844686965957498534798,-525930217426334255574457548768094489960550177316⟩] +lemma tr0_5_1_13_calc (r : Fin 8) : taylorRowBox 0 5 1 13 r = tr0_5_1_13 r := by + revert r + decide +kernel +def tr0_5_1_14 : Fin 8 → RI := ![⟨-269493391847935545481375469680006569762540849,-269493391847935545479403715058919343962026202⟩, + ⟨305633875411851168378710478837440334751392969789,305633875411851168378711896855665234776919013539⟩, + ⟨-27814354886963367765468213890682603855665359221,-27814354886963367765438513956383742027105436214⟩, + ⟨16503578854381001820635367380663715528984692406,16503578854381001820646357113843874592987860692⟩, + ⟨26709245289504677428076691176838860278997904568,26709245289504677428108169991535804787167422593⟩, + ⟨22158869496371932322638198703431099344389836139,22158869496371932322651709177871742252213748203⟩, + ⟨-27091934936350136020274212059092669750272440287,-27091934936350136020250460345638211522018922597⟩, + ⟨30269863422985218301978971020309546432226215358,30269863422985218301992368888007042577669014051⟩] +lemma tr0_5_1_14_calc (r : Fin 8) : taylorRowBox 0 5 1 14 r = tr0_5_1_14 r := by + revert r + decide +kernel +def tr0_5_1_15 : Fin 8 → RI := ![⟨-166320994977519529630044572990074128314669708,-166320994977519529629878279567270650780511138⟩, + ⟨8647145241998686599349853022491288867875035052,8647145241998686599349972615011427437244844236⟩, + ⟨-4444279876560187680997501176362957160374037216,-4444279876560187680994996349606865323778435111⟩, + ⟨2599321367815025084347659439841258530987419698,2599321367815025084348586289625938309656124529⟩, + ⟨4302435061968832850416551172503274193943702117,4302435061968832850419206026096588768946952801⟩, + ⟨3220604270109034438988451930980828687728383675,3220604270109034438989591374506729467114308827⟩, + ⟨-1638729553536294468467391158655299389233577005,-1638729553536294468465387991686157873744000895⟩, + ⟨2555540751090019276488693989880996741339071315,2555540751090019276489823936403745604441099535⟩] +lemma tr0_5_1_15_calc (r : Fin 8) : taylorRowBox 0 5 1 15 r = tr0_5_1_15 r := by + revert r + decide +kernel +def tr0_5_1_16 : Fin 8 → RI := ![⟨9365560171880071110995405421169227908864404,9365560171880071111008580959511103941269677⟩, + ⟨-4482692266574141671046662919169229486501657740,-4482692266574141671046653443774424986946998007⟩, + ⟨347159224509236967923399583693967485205936875,347159224509236967923598042781551012535669884⟩, + ⟨-204054557507406871295430308168955828937122392,-204054557507406871295356873244904480406083475⟩, + ⟨-334760366733587877813068402144254533048190183,-334760366733587877812858056330752430273717353⟩, + ⟨-261251710763607331480679845587451050352154993,-261251710763607331480589566720117188045608234⟩, + ⟨214633321482641822787013654389001768666790087,214633321482641822787172366638492684442422997⟩, + ⟨-272363767822942695125715974542134730893640158,-272363767822942695125626448128611662556525274⟩] +lemma tr0_5_1_16_calc (r : Fin 8) : taylorRowBox 0 5 1 16 r = tr0_5_1_16 r := by + revert r + decide +kernel +def tr0_5_1_17 : Fin 8 → RI := ![⟨951176794491111765690647988135645424132068,951176794491111765691402082725361675016605⟩, + ⟨-40527033299811146700571933761160898588305377,-40527033299811146700571391442223468905410811⟩, + ⟨16145975581046150823825159919202955016383623,16145975581046150823836518614411006648842043⟩, + ⟨-9243255997791330342190164282906774314508375,-9243255997791330342185961275976817975273445⟩, + ⟨-15549745925702492768006512122342032160128882,-15549745925702492767994473097002455846819111⟩, + ⟨-10943067786631600199982127990260830959048578,-10943067786631600199976960929627955667367110⟩, + ⟨2445103625502501493824275010500744118059559,2445103625502501493833358817589341332129748⟩, + ⟨-5940444161089686838993854835014184238282721,-5940444161089686838988730840660979253840288⟩] +lemma tr0_5_1_17_calc (r : Fin 8) : taylorRowBox 0 5 1 17 r = tr0_5_1_17 r := by + revert r + decide +kernel +def tr0_5_1_18 : Fin 8 → RI := ![⟨-115176404629162718230776485661941240951465,-115176404629162718230707800215023538157727⟩, + ⟨56120323493324865217450899719399464244042278,56120323493324865217450949115614633466866001⟩, + ⟨-2605607125068160616628520084037187623692024,-2605607125068160616627485496245213282605677⟩, + ⟨1504241872949021193571255266820039736663960,1504241872949021193571638090689909594000339⟩, + ⟨2500687067498557639677814817209805010717603,2500687067498557639678911371735311913795521⟩, + ⟨1864363832302123965997700444030989265034819,1864363832302123965998171077122327223413222⟩, + ⟨-1152729373305075917325043260522653262022636,-1152729373305075917324215877116530662169748⟩, + ⟨1613839468392742839425893638502869431976252,1613839468392742839426360348975403727616743⟩] +lemma tr0_5_1_18_calc (r : Fin 8) : taylorRowBox 0 5 1 18 r = tr0_5_1_18 r := by + revert r + decide +kernel +def tr0_5_1_19 : Fin 8 → RI := ![⟨-1546054150200947788566826342465719402447,-1546054150200947788564036391476548073926⟩, + ⟨-1106588509832927226129940649990383897798294,-1106588509832927226129938643553426136204075⟩, + ⟨280739121813688358527617281967927082578,280739121813688358569641456868530299005⟩, + ⟨-974024658339610056797982489780086319678,-974024658339610056782432473225649544611⟩, + ⟨-430807800428893852440918413730381941165,-430807800428893852396377196860638726876⟩, + ⟨-3813795741079981019939453370526366570053,-3813795741079981019920336609658633707256⟩, + ⟨21074607784055113428620646591215471132647,21074607784055113428654254280343065815865⟩, + ⟨-19108864155674197511327106930279271020743,-19108864155674197511308149503312039691644⟩] +lemma tr0_5_1_19_calc (r : Fin 8) : taylorRowBox 0 5 1 19 r = tr0_5_1_19 r := by + revert r + decide +kernel +def tr0_5_1_20 : Fin 8 → RI := ![⟨849821374643977608053840543005281113513,849821374643977608054208585284709125771⟩, + ⟨-556139155236436988441612089396140827331620,-556139155236436988441611824712769898101324⟩, + ⟨13778390917729055698833884173817202913283,13778390917729055698839427881637308838499⟩, + ⟨-7769143485966774127887189296654772314357,-7769143485966774127885137983370556309111⟩, + ⟨-13103029236052375843591457655311925488601,-13103029236052375843585581906588596787366⟩, + ⟨-9385035246384451432364292519915826012571,-9385035246384451432361770692025518239425⟩, + ⟨4526101058021991809257731748288856511818,4526101058021991809262165177616130194780⟩, + ⟨-6949990471199255889301192123494972148819,-6949990471199255889298691314461110729375⟩] +lemma tr0_5_1_20_calc (r : Fin 8) : taylorRowBox 0 5 1 20 r = tr0_5_1_20 r := by + revert r + decide +kernel +def tr0_5_1 : Fin 21 → Fin 8 → RI := ![tr0_5_1_0,tr0_5_1_1,tr0_5_1_2,tr0_5_1_3,tr0_5_1_4,tr0_5_1_5,tr0_5_1_6,tr0_5_1_7,tr0_5_1_8,tr0_5_1_9,tr0_5_1_10,tr0_5_1_11,tr0_5_1_12,tr0_5_1_13,tr0_5_1_14,tr0_5_1_15,tr0_5_1_16,tr0_5_1_17,tr0_5_1_18,tr0_5_1_19,tr0_5_1_20] +lemma tr0_5_1_mem (l : Fin 21) (r : Fin 8) : (tr0_5_1 l r).Mem (taylorRow 0 (nearNode 5) (nearDisplacement 5 1) l.val r) := by + have he : taylorRowBox 0 5 1 l r = tr0_5_1 l r := by + fin_cases l + · exact tr0_5_1_0_calc r + · exact tr0_5_1_1_calc r + · exact tr0_5_1_2_calc r + · exact tr0_5_1_3_calc r + · exact tr0_5_1_4_calc r + · exact tr0_5_1_5_calc r + · exact tr0_5_1_6_calc r + · exact tr0_5_1_7_calc r + · exact tr0_5_1_8_calc r + · exact tr0_5_1_9_calc r + · exact tr0_5_1_10_calc r + · exact tr0_5_1_11_calc r + · exact tr0_5_1_12_calc r + · exact tr0_5_1_13_calc r + · exact tr0_5_1_14_calc r + · exact tr0_5_1_15_calc r + · exact tr0_5_1_16_calc r + · exact tr0_5_1_17_calc r + · exact tr0_5_1_18_calc r + · exact tr0_5_1_19_calc r + · exact tr0_5_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 5 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows06.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows06.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8f2886e07e57274a3288d828c5d26f73963a2b0 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows06.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr0_6_0_0 : Fin 8 → RI := ![⟨29280925492483197658937258199671573469788883995361141638,29280925492483197661529090510135276643002449089894503496⟩, + ⟨-8415036147828304469749100096449206599937300617821340337711,-8415036147828304469747236139636678373430653912212722629305⟩, + ⟨1194697631141871242961226109051013265826686999138067184392,1194697631141871243000266083118494003340415018386147030536⟩, + ⟨-687372558927168941922309787404249446929952009046054347155,-687372558927168941907864001324247237692149698837177433370⟩, + ⟨-1134015354857086076245892125106379592623864487108491994177,-1134015354857086076204513848146876118737750005557528020466⟩, + ⟨-920374832323633262231275688675349226521846918325144650510,-920374832323633262213516438321183098835416731841491427890⟩, + ⟨1074683599071395642646421907914967083685583379162534831901,1074683599071395642677643063866124309106244693977616625856⟩, + ⟨-1194006103070178174444783430848396767893660187988910156288,-1194006103070178174427172199685732067670440761042588201218⟩] +lemma tr0_6_0_0_calc (r : Fin 8) : taylorRowBox 0 6 0 0 r = tr0_6_0_0 r := by + revert r + decide +kernel +def tr0_6_0_1 : Fin 8 → RI := ![⟨-17022177075766826478774553764126301926939707090432042337,-17022177075766826478073268077740327241855349404344597168⟩, + ⟨8026858390285650435711032375063900764549423665110896072824,8026858390285650435711536715652328803696590447396507445199⟩, + ⟨-661788135778041871798226636193722952171731279060168779020,-661788135778041871787663385283915611688480078149424990366⟩, + ⟨379330145434444744659112579728475975267121897139929926546,379330145434444744663021251970493189343725080146957903968⟩, + ⟨627366460038234553785352346269783296035866030166402869376,627366460038234553796548284080236180466613204272465190860⟩, + ⟨508564570851270912684723346817963771618427338960671215370,508564570851270912689528560499479190153070206292839917234⟩, + ⟨-570373916218412976325017860864760957900829103682405121937,-570373916218412976316570188656216374065517109814641702720⟩, + ⟨646042193030137923320441404689918219823723410154011946454,646042193030137923325206568039212933563561825926708566861⟩] +lemma tr0_6_0_1_calc (r : Fin 8) : taylorRowBox 0 6 0 1 r = tr0_6_0_1 r := by + revert r + decide +kernel +def tr0_6_0_2 : Fin 8 → RI := ![⟨-4851195509685517858697685079382803419236482464213350222,-4851195509685517858536843945697411793579279252935107212⟩, + ⟨-999637784045310754779230905494475438831890158607818088039,-999637784045310754779115234073294480857903624647657163447⟩, + ⟨-219045624321859598335723775390597503570047252606707994342,-219045624321859598333301074792520282059717621095535303110⟩, + ⟨127084017540720956319876312515688427633904874254987479170,127084017540720956320772773525695442296916263895038515608⟩, + ⟨208654398386672834032955618503942203390937783037432041210,208654398386672834035523426981129760393911392470571614631⟩, + ⟨169392757929211941357157298696834382345729559141899246769,169392757929211941358259383099056214471067804409927418020⟩, + ⟨-206486631157969386389162273401693130636548324230886165119,-206486631157969386387224784584814049419232807409982307930⟩, + ⟨224472158414711871121169246760533907926350968542953321838,224472158414711871122262145546465017498185797956626248347⟩] +lemma tr0_6_0_2_calc (r : Fin 8) : taylorRowBox 0 6 0 2 r = tr0_6_0_2 r := by + revert r + decide +kernel +def tr0_6_0_3 : Fin 8 → RI := ![⟨2348939120493785839168521663987652730872718401671760352,2348939120493785839199767649937813387027603295201976604⟩, + ⟨-795410299872086442662197010267130503394485975169383594438,-795410299872086442662174539226807505762295220921758297939⟩, + ⟨91686794188109293967509475669576839821114512454480982553,91686794188109293967980124359493157504779543719578942570⟩, + ⟨-52643538493104861162844716500878006601592832274386984956,-52643538493104861162670564482129443038098663355105849737⟩, + ⟨-87045113984698163649312570525824583412274069207866562534,-87045113984698163648813732288496409501032521020428975341⟩, + ⟨-70378454543789684401260614401920228479738271634859980543,-70378454543789684401046516720714754282994580850813296650⟩, + ⟨75785055727495664263754935457856159335989995161235077113,75785055727495664264131323928596168682440331209386635072⟩, + ⟨-87342120166045786474292181562923298173699333112962004238,-87342120166045786474079868336045765557962575877286058873⟩] +lemma tr0_6_0_3_calc (r : Fin 8) : taylorRowBox 0 6 0 3 r = tr0_6_0_3 r := by + revert r + decide +kernel +def tr0_6_0_4 : Fin 8 → RI := ![⟨580307200259207770846176172605632910312484789749577071,580307200259207770851955076534684265468775998529160561⟩, + ⟨135000870250706662583500083694181662365749591272124391483,135000870250706662583504239683479227662897187314814444622⟩, + ⟨26603223581351761473907776660852668686369105911479102067,26603223581351761473994822515889295819286451891394152141⟩, + ⟨-15458621308024355882389728211638718828078808344518302795,-15458621308024355882357519025243981631658023738340119097⟩, + ⟨-25363217900810963826177081045973356029213018713563277976,-25363217900810963826084821571277237424969012997029282436⟩, + ⟨-20576297689163386843865288582051049652085882854193170807,-20576297689163386843825691498010687122062540346336563282⟩, + ⟨24909264482032698078970885470885206093089725792833989372,24909264482032698079040498022576553776511696888417965504⟩, + ⟨-27150899357209725406466406518900259804874419355964895116,-27150899357209725406427139467354133105640133691559869413⟩] +lemma tr0_6_0_4_calc (r : Fin 8) : taylorRowBox 0 6 0 4 r = tr0_6_0_4 r := by + revert r + decide +kernel +def tr0_6_0_5 : Fin 8 → RI := ![⟨-75976709625291836107189417325108247719213502279666192,-75976709625291836106375820632559485621818904837889116⟩, + ⟨30616212933045309001637773551065251865759572344041438535,30616212933045309001638358661873075853875810757152300038⟩, + ⟨-2625766960292533352867542444782932531597354946840933755,-2625766960292533352855287487678079340614779090161412113⟩, + ⟨1499979876234521264585460368955394985091916737631536842,1499979876234521264589995015637349316695972896186403402⟩, + ⟨2496637163461326583492134693618550668172531771838586966,2496637163461326583505123662532129466410225488591186235⟩, + ⟨1991672197470657340237467024487583717120795872020275227,1991672197470657340243041793860043434076412726761906476⟩, + ⟨-1541490354087324976619716435778131837147300664508958981,-1541490354087324976609915867625735009142977160778787011⟩, + ⟨2093337975869954915744830918788719028662764806685261650,2093337975869954915750359223749828615390485264446309602⟩] +lemma tr0_6_0_5_calc (r : Fin 8) : taylorRowBox 0 6 0 5 r = tr0_6_0_5 r := by + revert r + decide +kernel +def tr0_6_0_6 : Fin 8 → RI := ![⟨-26323765207033363448530118259867970578824502945780972,-26323765207033363448397901954347678603319255453422473⟩, + ⟨-5848012672934065534152649761742756613989743999401353431,-5848012672934065534152554676315244420843354322708467724⟩, + ⟨-1192497407260218940619460226265857410773805000267286189,-1192497407260218940617468692662640472455634581297930129⟩, + ⟨694277158706100049226353315102550148482808793801072036,694277158706100049227090233328223129116482794600765975⟩, + ⟨1139576904201146287254384534028315795471633488832210619,1139576904201146287256495350723949355468787162302585250⟩, + ⟨919448168514743585152606926375434487756018018227141506,919448168514743585153512873286450217815239528666977157⟩, + ⟨-1014076575445264063894723285875856613376795961567864272,-1014076575445264063893130611120590763468375626361292666⟩, + ⟨1150649420804044242203318138166347242834156037990618887,1150649420804044242204216534219898822478202987045752288⟩] +lemma tr0_6_0_6_calc (r : Fin 8) : taylorRowBox 0 6 0 6 r = tr0_6_0_6 r := by + revert r + decide +kernel +def tr0_6_0_7 : Fin 8 → RI := ![⟨409905143697967718175428640589908345485388800472146,409905143697967718188939403503518208419592528798503⟩, + ⟨-618207007648285602625038214800887851081426730135042538,-618207007648285602625028498324070695095088075556425328⟩, + ⟨-6265745607703247881265859370910624127588049051588700,-6265745607703247881062350898607603975924711189915530⟩, + ⟨4346988724826708993674046075585430743640321988498503,4346988724826708993749349400674746519016870354406037⟩, + ⟨6110015582221078020495279584292853354886740335910363,6110015582221078020710977215723834141587482947986339⟩, + ⟨6041363401913882752966424630527700286121032428603235,6041363401913882753059000458354241005164213769719983⟩, + ⟨-31591787985309914818782167774095789665998931151531935,-31591787985309914818619417416441011273363022516601777⟩, + ⟨23411695348722691755655533733401265237230605744813747,23411695348722691755747337963090474473594649180521715⟩] +lemma tr0_6_0_7_calc (r : Fin 8) : taylorRowBox 0 6 0 7 r = tr0_6_0_7 r := by + revert r + decide +kernel +def tr0_6_0_8 : Fin 8 → RI := ![⟨590318477828180439887930280244627828541584935176956,590318477828180439889848281113282780284020022762147⟩, + ⟨137210153806494633221263589855876755612488599824144496,137210153806494633221264969216249946713197385447859200⟩, + ⟨25907089273624374825884787863232982352865666374624744,25907089273624374825913678121256287991354924716160578⟩, + ⟨-15119591210654548810029461422966437521439518736481662,-15119591210654548810018771290671915516661761232384252⟩, + ⟨-24839802007740495946012690042687257562693018243410989,-24839802007740495945982069399934911272402501248498615⟩, + ⟨-19864709148657059407335090214654732728830325999328223,-19864709148657059407321948061294363370263441611771607⟩, + ⟨18976649040958116814399707943950103013919086252604501,18976649040958116814422812140902299900212952021643218⟩, + ⟨-22917245025861515156262293780411412826028449419753536,-22917245025861515156249261163866410169505103517442954⟩] +lemma tr0_6_0_8_calc (r : Fin 8) : taylorRowBox 0 6 0 8 r = tr0_6_0_8 r := by + revert r + decide +kernel +def tr0_6_0_9 : Fin 8 → RI := ![⟨25040565648264673370562924255494806835953702387644,25040565648264673370749495325559891369427668245337⟩, + ⟨7641235818117774122301202922827842386848833288546830,7641235818117774122301337098335772303156785092944440⟩, + ⟨1557408156699072479840799083682273942402103914851281,1557408156699072479843609346410894409745076817105765⟩, + ⟨-922007606116867445106450998092839993173607341233915,-922007606116867445105411129209122471432373675140892⟩, + ⟨-1495068675208526340233197374705389905251835733188932,-1495068675208526340230218791024582230208629264144640⟩, + ⟨-1217635068041617657055383185290050594043679981175111,-1217635068041617657054104799206769180995170933278791⟩, + ⟨1615183437544709846448302841646831157663055868567767,1615183437544709846450550272717893193065448071390554⟩, + ⟨-1700774695816553200303242596220284294622888602479616,-1700774695816553200301974865191679766530765128717495⟩] +lemma tr0_6_0_9_calc (r : Fin 8) : taylorRowBox 0 6 0 9 r = tr0_6_0_9 r := by + revert r + decide +kernel +def tr0_6_0_10 : Fin 8 → RI := ![⟨-7348403518029525662407769349746093144886309170652,-7348403518029525662388881045713313146875434188882⟩, + ⟨-2124763103200736592802741562389483309068630709954908,-2124763103200736592802727978569729295625264611275979⟩, + ⟨-301421575503152195253652648032410666037434776029140,-301421575503152195253368139309722081355173830476873⟩, + ⟨176334467933616859912699798295772343287388698924227,176334467933616859912805073779420212816565419350722⟩, + ⟨290253375118180929754237863762099849306497729963045,290253375118180929754539413161732594319010700189383⟩, + ⟨228970232125192844226745596384913860003032391284085,228970232125192844226875019156736105819789563162476⟩, + ⟨-175501902090730747000026128726850255170228619444447,-175501902090730746999798600625433183435200728615482⟩, + ⟨233842694956207156729824500838432263965500412830713,233842694956207156729952844901039897029555857281521⟩] +lemma tr0_6_0_10_calc (r : Fin 8) : taylorRowBox 0 6 0 10 r = tr0_6_0_10 r := by + revert r + decide +kernel +def tr0_6_0_11 : Fin 8 → RI := ![⟨-679605166047577872025772610353086388122271008512,-679605166047577872023762744501797905090871291141⟩, + ⟨-69616262003690025969609522459836991916855887440536,-69616262003690025969608077033322932788309089034894⟩, + ⟨-33849673937973097346795932119410682132417982596368,-33849673937973097346765658127361607823066732645079⟩, + ⟨19975791058684287390956420229824386509309137294129,19975791058684287390967622379005135768357017739276⟩, + ⟨32591143494868729125207000017826767069083774729088,32591143494868729125239087273500547307755409393697⟩, + ⟨26064405338237556344860077351236109919418384251300,26064405338237556344873848964026875459998714944054⟩, + ⟨-26936126341670638965719277623537225102886177678937,-26936126341670638965695066823007913801526771839855⟩, + ⟨31286546799674952746298340026238381289397032450627,31286546799674952746311996855788105552655684848020⟩] +lemma tr0_6_0_11_calc (r : Fin 8) : taylorRowBox 0 6 0 11 r = tr0_6_0_11 r := by + revert r + decide +kernel +def tr0_6_0_12 : Fin 8 → RI := ![⟨47355162016251419654683804411206759835963514445,47355162016251419654825705576424048139324474296⟩, + ⟨24839024834977274955287669134011259204165925340509,24839024834977274955287771184457250284469488423668⟩, + ⟨1678952790515829942388615031243732637203024803306,1678952790515829942390752444915163687628858497535⟩, + ⟨-983784177749350415414704105000360744931497982792,-983784177749350415413913207427954725146950271033⟩, + ⟨-1628074212298249843229712975975753991532628789221,-1628074212298249843227447541708842378846543738854⟩, + ⟨-1250972122372462294710148709498579170450884678443,-1250972122372462294709176401867469256530773484369⟩, + ⟨538870943716173591549205104376985702012916028130,538870943716173591550914442739968808339775828684⟩, + ⟨-971058900803619125793270240130727519624367339775,-971058900803619125792306036462816238046321609121⟩] +lemma tr0_6_0_12_calc (r : Fin 8) : taylorRowBox 0 6 0 12 r = tr0_6_0_12 r := by + revert r + decide +kernel +def tr0_6_0_13 : Fin 8 → RI := ![⟨8907289139848133516010696793112817485028093156,8907289139848133516026666299998288394369465276⟩, + ⟨752382998302026717371752658980166936544341348937,752382998302026717371764143701227386005566542241⟩, + ⟨385009777537349194929198009791481514123836927656,385009777537349194929438553569132503198902065769⟩, + ⟨-227243857873395516498026770383262447962657480185,-227243857873395516497937763050597007621637456597⟩, + ⟨-371885078387280207873477352197030828790695729761,-371885078387280207873222401027049089462808181880⟩, + ⟨-292700619728940236812074998236449035861268135074,-292700619728940236811965575080158983333439183548⟩, + ⟨251216567821494077119649812492676352634207647079,251216567821494077119842180826898283274524226179⟩, + ⟨-313942056468836977394783907362500981032757704772,-313942056468836977394675396223109370130361484760⟩] +lemma tr0_6_0_13_calc (r : Fin 8) : taylorRowBox 0 6 0 13 r = tr0_6_0_13 r := by + revert r + decide +kernel +def tr0_6_0_14 : Fin 8 → RI := ![⟨15381936636358288489214587892862425337659979,15381936636358288490013886168430671512760732⟩, + ⟨-240984948782384784461497214316210813653288487841,-240984948782384784461496639488334285269347264644⟩, + ⟨2113565360608249026174292505947816623076731434,2113565360608249026186332090395848398557466645⟩, + ⟨-1235525762612519073567472429526089422472501607,-1235525762612519073563017476213545523993410277⟩, + ⟨-1929047286192682731980065785791807432468209397,-1929047286192682731967305089283085272255159297⟩, + ⟨-1777727852467109443400114830511243441582953181,-1777727852467109443394638033950924213440442855⟩, + ⟨5604372396845568162530833262973112017047756284,5604372396845568162540461592685990866234797099⟩, + ⟨-4837819320753836551190832806034624213019760975,-4837819320753836551185401657335019024729447655⟩] +lemma tr0_6_0_14_calc (r : Fin 8) : taylorRowBox 0 6 0 14 r = tr0_6_0_14 r := by + revert r + decide +kernel +def tr0_6_0_15 : Fin 8 → RI := ![⟨-71579095796040502943809894209747229265545221,-71579095796040502943724017069653518954580762⟩, + ⟨-12664683791282910499580623685039521128694234690,-12664683791282910499580561925148871518864544763⟩, + ⟨-2701706021588666964307038270840215612387861177,-2701706021588666964305744729853407715311014047⟩, + ⟨1595455945156307984709341839539715859040600835,1595455945156307984709820482696139696824704119⟩, + ⟨2617534378417308205522119990669014074801705193,2617534378417308205523491008416280837821581665⟩, + ⟨2025997676593602241431874868350614081353331961,2025997676593602241432463299026941532597668825⟩, + ⟨-1458496600779656362287453404839216127896977724,-1458496600779656362286418930669491694552533461⟩, + ⟨1953904730189149611818888050515546509454620736,1953904730189149611819471576756124367681019122⟩] +lemma tr0_6_0_15_calc (r : Fin 8) : taylorRowBox 0 6 0 15 r = tr0_6_0_15 r := by + revert r + decide +kernel +def tr0_6_0_16 : Fin 8 → RI := ![⟨-3744078911732488589757670479959230057862459,-3744078911732488589752125956016820850412990⟩, + ⟨1949937080996446127435243667879931416290858152,1949937080996446127435247655311183163258460381⟩, + ⟨-118023322170413277518661850318737862927172905,-118023322170413277518578334857403536462853925⟩, + ⟨68863142241663520775060150373762958543023907,68863142241663520775091053224506389674341263⟩, + ⟨113116278940141056015535962635299265116348315,113116278940141056015624480263173632938750209⟩, + ⟨88039349058877703005499507241462647217235562,88039349058877703005537498352658518940452900⟩, + ⟨-83433833122897812445372755714132526079834944,-83433833122897812445305966498846352263394247⟩, + ⟨99002834722143592606518018121652770503581879,99002834722143592606555692585515044800129478⟩] +lemma tr0_6_0_16_calc (r : Fin 8) : taylorRowBox 0 6 0 16 r = tr0_6_0_16 r := by + revert r + decide +kernel +def tr0_6_0_17 : Fin 8 → RI := ![⟨319546863754637666633878845207594000679350,319546863754637666634257284189932995180615⟩, + ⟨210361385828621956575140586115609291452718796,210361385828621956575140858275931867736460292⟩, + ⟨11443544809777871389038629461085365954138725,11443544809777871389044329771251999942949551⟩, + ⟨-6787946418534570547008693365612507931188887,-6787946418534570547006584105464699978379431⟩, + ⟨-11142695634102331728730182910483755483761063,-11142695634102331728724141179693954184652191⟩, + ⟨-8496967713224684604072358796140773856835722,-8496967713224684604069765729970210246257438⟩, + ⟨5026820430662872071210721194234005829785775,5026820430662872071215279862014846740450318⟩, + ⟨-7323297932595420579726693774812208674013560,-7323297932595420579724122321264355064058005⟩] +lemma tr0_6_0_17_calc (r : Fin 8) : taylorRowBox 0 6 0 17 r = tr0_6_0_17 r := by + revert r + decide +kernel +def tr0_6_0_18 : Fin 8 → RI := ![⟨42507269406499579487926656246295237911571,42507269406499579487959961821895128414216⟩, + ⟨-10962497748083637432404421768652108563208042,-10962497748083637432404397816425655508643505⟩, + ⟨1074477895524827330780335677733144909310725,1074477895524827330780837349389630934591165⟩, + ⟨-623228490683286952391050414443698487712593,-623228490683286952390864783135801809217150⟩, + ⟨-1031379847627172194740553403006449333399460,-1031379847627172194740021683678395764594603⟩, + ⟨-780220461994896339372253959735241600223556,-780220461994896339372025749732498889939059⟩, + ⟨567493995093696345531759799700670658139119,567493995093696345532160997942970326596450⟩, + ⟨-742539009365464026333098802455932697900486,-742539009365464026332872494531626611908804⟩] +lemma tr0_6_0_18_calc (r : Fin 8) : taylorRowBox 0 6 0 18 r = tr0_6_0_18 r := by + revert r + decide +kernel +def tr0_6_0_19 : Fin 8 → RI := ![⟨154821821581150655682032215393694309754,154821821581150655683337835875146099639⟩, + ⟨-2708699014690637499898133720884677799756518,-2708699014690637499898132781927256078742446⟩, + ⟨-15837299389046055693717757086761739828296,-15837299389046055693698090926425381202848⟩, + ⟨10123612554934275274868369772199775744620,10123612554934275274875646753114623770502⟩, + ⟨16124886710681622840846844014463778742148,16124886710681622840867688081361172099245⟩, + ⟨12594638957373378412935741756639394880734,12594638957373378412944687875998327974338⟩, + ⟨-4466262564873059345053828428914457912280,-4466262564873059345038100952899965302834⟩, + ⟨8840091661108173090808590599298661741256,8840091661108173090817462154754589205561⟩] +lemma tr0_6_0_19_calc (r : Fin 8) : taylorRowBox 0 6 0 19 r = tr0_6_0_19 r := by + revert r + decide +kernel +def tr0_6_0_20 : Fin 8 → RI := ![⟨-259855442814971056907364543767697682149,-259855442814971056907215916432322956129⟩, + ⟨1619552137379303852032017465669057109386,1619552137379303852032124353345667390272⟩, + ⟨-5656977885338969680042089937889941620881,-5656977885338969680039851209984210707909⟩, + ⟨3261717995531578211184589981320325206612,3261717995531578211185418367743531532987⟩, + ⟨5426037912836032857768580885740204107847,5426037912836032857770953702465352692937⟩, + ⟨4024567710213333798574012248879157935345,4024567710213333798575030644266348409690⟩, + ⟨-2480818869569500407964653340495697636695,-2480818869569500407962862978832503381526⟩, + ⟨3458430491971805962192253384730244076612,3458430491971805962193263292025551887145⟩] +lemma tr0_6_0_20_calc (r : Fin 8) : taylorRowBox 0 6 0 20 r = tr0_6_0_20 r := by + revert r + decide +kernel +def tr0_6_0 : Fin 21 → Fin 8 → RI := ![tr0_6_0_0,tr0_6_0_1,tr0_6_0_2,tr0_6_0_3,tr0_6_0_4,tr0_6_0_5,tr0_6_0_6,tr0_6_0_7,tr0_6_0_8,tr0_6_0_9,tr0_6_0_10,tr0_6_0_11,tr0_6_0_12,tr0_6_0_13,tr0_6_0_14,tr0_6_0_15,tr0_6_0_16,tr0_6_0_17,tr0_6_0_18,tr0_6_0_19,tr0_6_0_20] +lemma tr0_6_0_mem (l : Fin 21) (r : Fin 8) : (tr0_6_0 l r).Mem (taylorRow 0 (nearNode 6) (nearDisplacement 6 0) l.val r) := by + have he : taylorRowBox 0 6 0 l r = tr0_6_0 l r := by + fin_cases l + · exact tr0_6_0_0_calc r + · exact tr0_6_0_1_calc r + · exact tr0_6_0_2_calc r + · exact tr0_6_0_3_calc r + · exact tr0_6_0_4_calc r + · exact tr0_6_0_5_calc r + · exact tr0_6_0_6_calc r + · exact tr0_6_0_7_calc r + · exact tr0_6_0_8_calc r + · exact tr0_6_0_9_calc r + · exact tr0_6_0_10_calc r + · exact tr0_6_0_11_calc r + · exact tr0_6_0_12_calc r + · exact tr0_6_0_13_calc r + · exact tr0_6_0_14_calc r + · exact tr0_6_0_15_calc r + · exact tr0_6_0_16_calc r + · exact tr0_6_0_17_calc r + · exact tr0_6_0_18_calc r + · exact tr0_6_0_19_calc r + · exact tr0_6_0_20_calc r + rw [← he] + exact taylorRowBox_mem 0 6 0 l r +def tr0_6_1_0 : Fin 8 → RI := ![⟨29280925492483197658937258199671573469788883995361141638,29280925492483197661529090510135276643002449089894503496⟩, + ⟨-8415036147828304469749100096449206599937300617821340337711,-8415036147828304469747236139636678373430653912212722629305⟩, + ⟨1194697631141871242961226109051013265826686999138067184392,1194697631141871243000266083118494003340415018386147030536⟩, + ⟨-687372558927168941922309787404249446929952009046054347155,-687372558927168941907864001324247237692149698837177433370⟩, + ⟨-1134015354857086076245892125106379592623864487108491994177,-1134015354857086076204513848146876118737750005557528020466⟩, + ⟨-920374832323633262231275688675349226521846918325144650510,-920374832323633262213516438321183098835416731841491427890⟩, + ⟨1074683599071395642646421907914967083685583379162534831901,1074683599071395642677643063866124309106244693977616625856⟩, + ⟨-1194006103070178174444783430848396767893660187988910156288,-1194006103070178174427172199685732067670440761042588201218⟩] +lemma tr0_6_1_0_calc (r : Fin 8) : taylorRowBox 0 6 1 0 r = tr0_6_1_0 r := by + revert r + decide +kernel +def tr0_6_1_1 : Fin 8 → RI := ![⟨51066531227300479434219804233220981725566048213033791507,51066531227300479436323661292378905780819121271296127010⟩, + ⟨-24080575170856951307134610146956986411089771342189522335595,-24080575170856951307133097125191702293648270995332688218473⟩, + ⟨1985364407334125615362990155851746835065440234448274971101,1985364407334125615394679908581168856515193837180506337061⟩, + ⟨-1137990436303334233989063755911479568031175240440873711903,-1137990436303334233977337739185427925801365691419789779639⟩, + ⟨-1882099380114703661389644852240708541399839612817395572578,-1882099380114703661356057038809349888107598090499208608130⟩, + ⟨-1525693712553812738068585681498437570459210618878519751700,-1525693712553812738054170040453891314855282016882013646111⟩, + ⟨1711121748655238928949710565968649122196551329443925108161,1711121748655238928975053582594282873702487311047215365810⟩, + ⟨-1938126579090413769975619704117638800690685477780125700581,-1938126579090413769961324214069754659471170230462035839364⟩] +lemma tr0_6_1_1_calc (r : Fin 8) : taylorRowBox 0 6 1 1 r = tr0_6_1_1 r := by + revert r + decide +kernel +def tr0_6_1_2 : Fin 8 → RI := ![⟨-43660759587169660728279165714445230773128342177920151996,-43660759587169660726831595511276706142213513276415964916⟩, + ⟨-8996740056407796793013078149450278949487011427470362792343,-8996740056407796793012037106659650327721132621828914471029⟩, + ⟨-1971410618896736385021513978515377532130425273460371949072,-1971410618896736384999709673132682538537458589859817727992⟩, + ⟨1143756157866488606878886812641195848705143868294887312536,1143756157866488606886954961731258980672246375055346640464⟩, + ⟨1877889585480055506296600566535479830518440047336888370894,1877889585480055506319710842830167843545202532235144531671⟩, + ⟨1524534821362907472214415688271509441111566032277093220930,1524534821362907472224334447891505930239610239689346762172⟩, + ⟨-1858379680421724477502460460615238175728934918077975486065,-1858379680421724477485023061263326444773095266689840771376⟩, + ⟨2020249425732406840090523220844805171337158716886579896548,2020249425732406840100359309918185157483672181609636235119⟩] +lemma tr0_6_1_2_calc (r : Fin 8) : taylorRowBox 0 6 1 2 r = tr0_6_1_2 r := by + revert r + decide +kernel +def tr0_6_1_3 : Fin 8 → RI := ![⟨-63421356253332217658393726548320961449745288970453368288,-63421356253332217657550084927666623733563396845137529524⟩, + ⟨21476078096546333951878712559123802655581970964887474044366,21476078096546333951879319277212523591651121329573357049800⟩, + ⟨-2475543443078950937135463357706315252629047680428631449377,-2475543443078950937122755843078574675170091836270986528951⟩, + ⟨1421375539313831251392105241017494962028663910587857942926,1421375539313831251396807345523706178243006471408448593799⟩, + ⟨2350218077586850418517970771789403056527878067551582334223,2350218077586850418531439404197263752131399868612397188402⟩, + ⟨1900218272682321478828255951459298365640853682971959009577,1900218272682321478834036588851846168952933334141219474651⟩, + ⟨-2046196504642382935131545746072096554425888942653439146938,-2046196504642382935121383257362116302071729869353347082074⟩, + ⟨2358237244483236234800156445073235670064989548686723589591,2358237244483236234805888902198929050689881994049974114406⟩] +lemma tr0_6_1_3_calc (r : Fin 8) : taylorRowBox 0 6 1 3 r = tr0_6_1_3 r := by + revert r + decide +kernel +def tr0_6_1_4 : Fin 8 → RI := ![⟨47004883220995829438540269981056265735311267969715742771,47004883220995829439008361199309425502970855880862005401⟩, + ⟨10935070490307239669263506779228714651625716893042075710193,10935070490307239669263843414361817440694672172499970014332⟩, + ⟨2154861110089492679386529909529066163595897578829807267477,2154861110089492679393580623787032961362202603202926323416⟩, + ⟨-1252148325949972826473567985142736225074383475905982526315,-1252148325949972826470959041044762512164299922805549646897⟩, + ⟨-2054420649965688069920343564723841838366254515798625516041,-2054420649965688069912870547273456231422490052759371877336⟩, + ⟨-1666680112822234334353088375146135021818956511189646835297,-1666680112822234334349881011338865656887065768053261625852⟩, + ⟨2017650423044648544396641723141701693540267789219553139152,2017650423044648544402280339828700855897447447961855205799⟩, + ⟨-2199222847933987757923778928030921044194827967833156504336,-2199222847933987757920598296855684781556850829016349422473⟩] +lemma tr0_6_1_4_calc (r : Fin 8) : taylorRowBox 0 6 1 4 r = tr0_6_1_4 r := by + revert r + decide +kernel +def tr0_6_1_5 : Fin 8 → RI := ![⟨18462340438945916173849324413711955006101993875607055324,18462340438945916174047028410001304195768881053958884626⟩, + ⟨-7439739742730010087398121154835157432491822013988008909007,-7439739742730010087397978972908856203379576079602069564240⟩, + ⟨638061371351085604743834859505773279769391318909223143633,638061371351085604746812814082252605178157252082346902390⟩, + ⟨-364495109924988667295368788799875883957121413773296026656,-364495109924988667294266869656160981377335767244463452773⟩, + ⟨-606682830721102359791745049995307460337684793727658254916,-606682830721102359788588730549307812365925220556776632958⟩, + ⟨-483976343985369733679059155907990554480568292603143273600,-483976343985369733677704486950482843260353396900926880366⟩, + ⟨374582156043219969316209555833053607221743450069245243680,374582156043219969318591093894086036426794061475677032247⟩, + ⟨-508681128136399044527337291371208353539887919260453233119,-508681128136399044525993913265658723965051848024518581056⟩] +lemma tr0_6_1_5_calc (r : Fin 8) : taylorRowBox 0 6 1 5 r = tr0_6_1_5 r := by + revert r + decide +kernel +def tr0_6_1_6 : Fin 8 → RI := ![⟨-19190024835927321953978456211443750551963062647474327962,-19190024835927321953882070524719457701819737225544983033⟩, + ⟨-4263201238568933774397281676310469571598523375563586650505,-4263201238568933774397212359033813182794805301254472971376⟩, + ⟨-869330609892699607711586504947810052454103845194851631258,-869330609892699607710134676951064904420157609766191064177⟩, + ⟨506128048696746935886011566709759058243967610680981514460,506128048696746935886548780096274661125915957263958395536⟩, + ⟨830751563162635643408446325306642214898820813358681541421,830751563162635643409985110677759080136745841318584646852⟩, + ⟨670277714847248073576250449327691741574137135287586158147,670277714847248073576910884625822208787309616398226347021⟩, + ⟨-739261823499597502579253275403499471151684255982973053582,-739261823499597502578092215506910666568445831617382353992⟩, + ⟨838823427766148252566218922723267140026099751695161168691,838823427766148252566873853446306241586609977556353417645⟩] +lemma tr0_6_1_6_calc (r : Fin 8) : taylorRowBox 0 6 1 6 r = tr0_6_1_6 r := by + revert r + decide +kernel +def tr0_6_1_7 : Fin 8 → RI := ![⟨-896462549267455399679210475462194321813648860482324712,-896462549267455399649662436970129551576545306632583900⟩, + ⟨1352018725726800612940937325834742610172957621241902194317,1352018725726800612940958575769541730315080258805338029205⟩, + ⟨13703185644047003115883361415254829895347343372345265767,13703185644047003116328434444181534967035063275824484953⟩, + ⟨-9506864341196012569329827139275670637089895465086001245,-9506864341196012569165138767305337036341384188846228128⟩, + ⟨-13362604078317497631294907170788025267651825207246122317,-13362604078317497630823176450848470287137301114635966050⟩, + ⟨-13212461759985661580940034002420725078294135514377601198,-13212461759985661580737570666964080525746697921355276363⟩, + ⟨69091240323872783708320665889756491654844930243808086777,69091240323872783708676600921947491999539662428400341640⟩, + ⟨-51201377727656526869819428125278867673751497757800990500,-51201377727656526869618652274948567073823334763907666807⟩] +lemma tr0_6_1_7_calc (r : Fin 8) : taylorRowBox 0 6 1 7 r = tr0_6_1_7 r := by + revert r + decide +kernel +def tr0_6_1_8 : Fin 8 → RI := ![⟨3873079533030691866104710568685003183061338759696011622,3873079533030691866117294572384248321443455369342444981⟩, + ⟨900235819124411288564710413044407393573537703446212040408,900235819124411288564719463027815900385288045923404210867⟩, + ⟨169976412724249523232630093170671597217151637083912947126,169976412724249523232819642153562505511279661062729546492⟩, + ⟨-99199637933104494742603296396082796578164682430056182588,-99199637933104494742533158438098437704817815445673081677⟩, + ⟨-162973940972785393901789259370071096868828892695019493166,-162973940972785393901588357332972952858232810691399419037⟩, + ⟨-130332356724338966771525526898349701433855768881592466157,-130332356724338966771439301230152318072298440414833518755⟩, + ⟨124505794357726204419276483820256625874323124903338131266,124505794357726204419428070456459989645297178214001147199⟩, + ⟨-150360044614677400940236909493279279551572656643002947544,-150360044614677400940151402496127517122122984177943222654⟩] +lemma tr0_6_1_8_calc (r : Fin 8) : taylorRowBox 0 6 1 8 r = tr0_6_1_8 r := by + revert r + decide +kernel +def tr0_6_1_9 : Fin 8 → RI := ![⟨-492873453654793565956462316492995341824444794072967403,-492873453654793565952790038120904282952076724096003848⟩, + ⟨-150402444608012148049257218106543006243035000984425409906,-150402444608012148049254577130020421700345585618467273150⟩, + ⟨-30654464748307843620761762765405634667012346991092758617,-30654464748307843620706448364118198008300611356017780492⟩, + ⟨18147875711198301922009807256223157605203411047798190191,18147875711198301922030274995461369585636113297507137720⟩, + ⟨29427436734129423954751396463736852037196449806158954924,29427436734129423954810023926326189505071882736357736024⟩, + ⟨23966711044263160343795944762786837789527949479726446789,23966711044263160343821107236064065842561753069469703201⟩, + ⟨-31791655601192523907686181017906291719107214389180256583,-31791655601192523907641944832134577676281928661019363127⟩, + ⟨33476348337757216641543771271567832844625050028546464541,33476348337757216641568724021403855771062316362606266390⟩] +lemma tr0_6_1_9_calc (r : Fin 8) : taylorRowBox 0 6 1 9 r = tr0_6_1_9 r := by + revert r + decide +kernel +def tr0_6_1_10 : Fin 8 → RI := ![⟨-433915879336125460839516372333157054112391670217814956,-433915879336125460838401036868325428009847513419304462⟩, + ⟨-125465136480900295068409086517536599917193574792127329450,-125465136480900295068408284406563945177376250031235332409⟩, + ⟨-17798642611885633977532935213665817418844486089744660412,-17798642611885633977516135258099779181941659515828901052⟩, + ⟨10412373997012141960985010389567061098777015282776691598,10412373997012141960991226801600984146605371447240755930⟩, + ⟨17139171547353465721057991617288234001699384456587883013,17139171547353465721075797807787147961943262835482845974⟩, + ⟨13520463236760512258745100720932778519319059672933941969,13520463236760512258752743006186110312552753915181007439⟩, + ⟨-10363211816555559879604542875191780717546829749575127953,-10363211816555559879591107568331204048665167824015641481⟩, + ⟨13808177294469076397739406950008586754898833877240796675,13808177294469076397746985538561504879698243816616523726⟩] +lemma tr0_6_1_10_calc (r : Fin 8) : taylorRowBox 0 6 1 10 r = tr0_6_1_10 r := by + revert r + decide +kernel +def tr0_6_1_11 : Fin 8 → RI := ![⟨120390016349830277295393498900259993493132576611906876,120390016349830277295749540606218194396695942344773976⟩, + ⟨12332311965167677030438162022222057574650590195264532109,12332311965167677030438418075192743607095269892428627073⟩, + ⟨5996368189090120275687496040287726741032802487877982002,5996368189090120275692858987157244107711448362998654013⟩, + ⟨-3538651458672745458447741401573622785957140621459424630,-3538651458672745458445756974452700596964585744243143918⟩, + ⟨-5773423296685510758348728593238801453926947507865196702,-5773423296685510758343044432157958305986983441933845439⟩, + ⟨-4617231212452768393825367722430468907112392356194181962,-4617231212452768393822928122539423163895208514965206396⟩, + ⟨4771653973047928680855984002495382906199063051114956905,4771653973047928680860272873176748815300977717290649280⟩, + ⟨-5542317905922018854150931307012295534336296603772129223,-5542317905922018854148512040628050530272816107531375480⟩] +lemma tr0_6_1_11_calc (r : Fin 8) : taylorRowBox 0 6 1 11 r = tr0_6_1_11 r := by + revert r + decide +kernel +def tr0_6_1_12 : Fin 8 → RI := ![⟨25166474657078670712704815700096131653984286080445756,25166474657078670712780227797240372567210737943995930⟩, + ⟨13200476197325157979513034172248077602721143528885533383,13200476197325157979513088406039145548428749397362069938⟩, + ⟨892264349944523180412947960819200516447812704493941030,892264349944523180414083870078159505317168188788369487⟩, + ⟨-522823247207292534118405764265496714647140219472822887,-522823247207292534117985448868719687086820398988241096⟩, + ⟨-865225387457994194935841893665530677014091776372346860,-865225387457994194934637949013288902656586051120481306⟩, + ⟨-664817875685743734363056140324634412923588604396113805,-664817875685743734362539416184849729159970791306887610⟩, + ⟨286378113199467009666501109875209658463446106905541981,286378113199467009667409522364171763472898806171539727⟩, + ⟨-516060513301976151830701329685313963756693403416865084,-516060513301976151830188912323835524363575202272974952⟩] +lemma tr0_6_1_12_calc (r : Fin 8) : taylorRowBox 0 6 1 12 r = tr0_6_1_12 r := by + revert r + decide +kernel +def tr0_6_1_13 : Fin 8 → RI := ![⟨-14201095943310095771672182695412171147776308985704472,-14201095943310095771646722143286006511182444565624504⟩, + ⟨-1199541519001882142120303124878171949738552866325294146,-1199541519001882142120284814523236690772183932462262614⟩, + ⟨-613829943552679180507487263042000039897583138201754824,-613829943552679180507103758564784182042458062011836762⟩, + ⟨362300109216285560049541628200116972982351894715369307,362300109216285560049683534637754135823167961780878239⟩, + ⟨592904933829643742857059558072647985459612728961061368,592904933829643742857466032586826782050068387958421834⟩, + ⟨466659330148103185174763391558524310785118759433328491,466659330148103185174937847413330136201444596914136739⟩, + ⟨-400520352058867901515938145262482951685089287853714273,-400520352058867901515631448002761240560827838515507183⟩, + ⟨500525041295565576310811061732616400314348313468526365,500525041295565576310984063537904651583089362144707433⟩] +lemma tr0_6_1_13_calc (r : Fin 8) : taylorRowBox 0 6 1 13 r = tr0_6_1_13 r := by + revert r + decide +kernel +def tr0_6_1_14 : Fin 8 → RI := ![⟨73571326091665966736970208239336301654842213758144,73571326091665966740793227113132680494717684489667⟩, + ⟨-1152623539492734170151022869660792519168455585398435097,-1152623539492734170151020120276878748080444617028763704⟩, + ⟨10109117599263076236471829652880722525860691070501656,10109117599263076236529414612068540619000007679630303⟩, + ⟨-5909481421277037740781940038777970398913878534060899,-5909481421277037740760632135187625621349237562160308⟩, + ⟨-9226573369393729533895963271402855403465039030259120,-9226573369393729533834929255583229081552987009588278⟩, + ⟨-8502817208786757987390003830775531532544575990563958,-8502817208786757987363808482608218034235021524419324⟩, + ⟨26805539438568050308771937040969242611066889826065278,26805539438568050308817989043507721047484181241499807⟩, + ⟨-23139139838766656855412666395446620537522913129411620,-23139139838766656855386689379582018609691181524702786⟩] +lemma tr0_6_1_14_calc (r : Fin 8) : taylorRowBox 0 6 1 14 r = tr0_6_1_14 r := by + revert r + decide +kernel +def tr0_6_1_15 : Fin 8 → RI := ![⟨1027081788721476144972722154598870865702016578926407,1027081788721476144973954397695501486238986678696832⟩, + ⟨181724369905525893447805022071702118579136098408021670,181724369905525893447805908258629380000168604995175745⟩, + ⟨38766528445115774524795450694406670940080216639228883,38766528445115774524814011593727065682101467943675314⟩, + ⟨-22893048979644963735958636092902017768745874696470318,-22893048979644963735951768086764305667798690611249232⟩, + ⟨-37558757365212762631393458795101431027783957902422495,-37558757365212762631373786188950550741020711265010108⟩, + ⟨-29070852243657675357305962658650774545681418381985388,-29070852243657675357297519321600204846229394461586883⟩, + ⟨20927832084403416634406132599215984062406709257275707,20927832084403416634420976172871262172093838941830281⟩, + ⟨-28036397260344200189083698444016990232288749044010270,-28036397260344200189075325480258878918338973665035872⟩] +lemma tr0_6_1_15_calc (r : Fin 8) : taylorRowBox 0 6 1 15 r = tr0_6_1_15 r := by + revert r + decide +kernel +def tr0_6_1_16 : Fin 8 → RI := ![⟨-161170320315332062958981898760741067675619098575276,-161170320315332062958743225185514358454710750085512⟩, + ⟨83938397493208418439235379738244069176207425753633598,83938397493208418439235551384084669808684394872593827⟩, + ⟨-5080517020962894812041408964014469857562255350910220,-5080517020962894812037813897251224818529799813989526⟩, + ⟨2964332471260204154681718051357419796536116632527884,2964332471260204154683048317751476919028649171272634⟩, + ⟨4869284900094427738946148249028152216968478469850028,4869284900094427738949958642658841951670790332976000⟩, + ⟨3789805295959121054398598753860722206681765634814615,3789805295959121054400234146624850873102891579348283⟩, + ⟨-3591552936401940843846288756227418607183878555420723,-3591552936401940843843413699511185747750050700470739⟩, + ⟨4261747404493227752870443907555730870744718667764051,4261747404493227752872065669690434774813674402290693⟩] +lemma tr0_6_1_16_calc (r : Fin 8) : taylorRowBox 0 6 1 16 r = tr0_6_1_16 r := by + revert r + decide +kernel +def tr0_6_1_17 : Fin 8 → RI := ![⟨-41266334071412700275087647064225269956702807965739,-41266334071412700275038775392360458085553489521127⟩, + ⟨-27166103654814129537492612185713740376380923055789450,-27166103654814129537492577038885320742518612123517647⟩, + ⟨-1477821242032518304974221160885235986708495649108178,-1477821242032518304973485021901166316232125551150858⟩, + ⟨876596506924820661575429433452920545954016259663734,876596506924820661575701823652217869072525632265367⟩, + ⟨1438969530447363478127507373980689533520516099594191,1438969530447363478128287604079686592025047401601162⟩, + ⟨1097299795491573025393160009740166936345955800965939,1097299795491573025393494878728103306817903717293320⟩, + ⟨-649164409787533497324888849471214816481772696436526,-649164409787533497324300142370934173001485313552809⟩, + ⟨945731888712935626719127651600017179062326256029684,945731888712935626719459729530333922552124875216000⟩] +lemma tr0_6_1_17_calc (r : Fin 8) : taylorRowBox 0 6 1 17 r = tr0_6_1_17 r := by + revert r + decide +kernel +def tr0_6_1_18 : Fin 8 → RI := ![⟨16468187099520806863506914759074605510072540258385,16468187099520806863519818021459941556953225285534⟩, + ⟨-4247096238223961626960825527373444770439147025627611,-4247096238223961626960816247790159689304210509192245⟩, + ⟨416274751703919516131482399851521412273021893109107,416274751703919516131676757729994668208836138881325⟩, + ⟨-241451486619250975222660470787430331078173263136853,-241451486619250975222588553415351290333993168552848⟩, + ⟨-399577684912464541373588427523372670899342730126197,-399577684912464541373382428561287405854770268030425⟩, + ⟨-302273392913868655303908582112813611291752398725899,-302273392913868655303820168881956339132147446053885⟩, + ⟨219858801083763439003427346630575880004209461405792,219858801083763439003582779049793558042486160791821⟩, + ⟨-287674826109943652793878014932791846771695402085816,-287674826109943652793790338606092607951122122666126⟩] +lemma tr0_6_1_18_calc (r : Fin 8) : taylorRowBox 0 6 1 18 r = tr0_6_1_18 r := by + revert r + decide +kernel +def tr0_6_1_19 : Fin 8 → RI := ![⟨-179943437474520420622528120580852534605177302586,-179943437474520420621010648204735131004494234103⟩, + ⟨3148216490475794891796816157683563737363863096597706,3148216490475794891796817248997594157367342260543211⟩, + ⟨18407082821230872421121245815246552622857236137321,18407082821230872421144103035609346012307196471499⟩, + ⟨-11766284779437528869558797437848789442656514887714,-11766284779437528869550339683335367174014173161427⟩, + ⟨-18741334483565627532967586702341251240907588052711,-18741334483565627532943360446570840699212760580842⟩, + ⟨-14638263550932133260975224720614930761000981961879,-14638263550932133260964826990804860084075048468943⟩, + ⟨5190964880656544623142042384411611577121346342700,5190964880656544623160321823756423070635618481312⟩, + ⟨-10274497902454052102223427793202049875037185338505,-10274497902454052102213116726143271766529728948633⟩] +lemma tr0_6_1_19_calc (r : Fin 8) : taylorRowBox 0 6 1 19 r = tr0_6_1_19 r := by + revert r + decide +kernel +def tr0_6_1_20 : Fin 8 → RI := ![⟨-906059904522188610491081993229690045798855550482,-906059904522188610490563761755143255626419547767⟩, + ⟨5647029129220365691504450651854421357387841436862,5647029129220365691504823346137885217334483162630⟩, + ⟨-19724662247401886077782720218873707298485453222292,-19724662247401886077774914257333921352636131841768⟩, + ⟨11372907427280494609669912078448591314661916986067,11372907427280494609672800483307027317868502591819⟩, + ⟨18919424353711277039190939500305707021798119941425,18919424353711277039199213000649387012694488291699⟩, + ⟨14032799912740140671073941953374777622976461887299,14032799912740140671077492878524883724136401619993⟩, + ⟨-8650080536121387607854289427012940127237582548514,-8650080536121387607848046821893565982484816091412⟩, + ⟨12058801491350048760770744864916866639256099853582,12058801491350048760774266193920602013513267373898⟩] +lemma tr0_6_1_20_calc (r : Fin 8) : taylorRowBox 0 6 1 20 r = tr0_6_1_20 r := by + revert r + decide +kernel +def tr0_6_1 : Fin 21 → Fin 8 → RI := ![tr0_6_1_0,tr0_6_1_1,tr0_6_1_2,tr0_6_1_3,tr0_6_1_4,tr0_6_1_5,tr0_6_1_6,tr0_6_1_7,tr0_6_1_8,tr0_6_1_9,tr0_6_1_10,tr0_6_1_11,tr0_6_1_12,tr0_6_1_13,tr0_6_1_14,tr0_6_1_15,tr0_6_1_16,tr0_6_1_17,tr0_6_1_18,tr0_6_1_19,tr0_6_1_20] +lemma tr0_6_1_mem (l : Fin 21) (r : Fin 8) : (tr0_6_1 l r).Mem (taylorRow 0 (nearNode 6) (nearDisplacement 6 1) l.val r) := by + have he : taylorRowBox 0 6 1 l r = tr0_6_1 l r := by + fin_cases l + · exact tr0_6_1_0_calc r + · exact tr0_6_1_1_calc r + · exact tr0_6_1_2_calc r + · exact tr0_6_1_3_calc r + · exact tr0_6_1_4_calc r + · exact tr0_6_1_5_calc r + · exact tr0_6_1_6_calc r + · exact tr0_6_1_7_calc r + · exact tr0_6_1_8_calc r + · exact tr0_6_1_9_calc r + · exact tr0_6_1_10_calc r + · exact tr0_6_1_11_calc r + · exact tr0_6_1_12_calc r + · exact tr0_6_1_13_calc r + · exact tr0_6_1_14_calc r + · exact tr0_6_1_15_calc r + · exact tr0_6_1_16_calc r + · exact tr0_6_1_17_calc r + · exact tr0_6_1_18_calc r + · exact tr0_6_1_19_calc r + · exact tr0_6_1_20_calc r + rw [← he] + exact taylorRowBox_mem 0 6 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows10.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows10.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ff3ea77a523907aca7b7e10e49d08f31c467fe8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows10.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_0_0_0 : Fin 8 → RI := ![⟨-376225907036466717497512999227363635142277521605628478070250,-376225907036466717487707286513582077147026032135913192168340⟩, + ⟨321944781721467240656724111722731508592203035973484717430566,321944781721467240663776043647698306044843837986636396825829⟩, + ⟨-48616828985707993868775808265770014295961991842083399197323,-48616828985707993721075369274777667599695294424594740596274⟩, + ⟨788162705153727894034682243291809208871421428516441901290308,788162705153727894089335172669177490547308770178274436147063⟩, + ⟨405094550931871463200294195904828087641189561151440673005791,405094550931871463356841166472128937729524781512142279693740⟩, + ⟨111354014587842592164691465872401835894066811988800580811723,111354014587842592231880267500501186993689506705309337902256⟩, + ⟨20790397299857525087523259796120619741139325646798039995274,20790397299857525205642663052184377691165436114394125222344⟩, + ⟨33967791675520508834299113028100662359868284115313909529859,33967791675520508900927911744650360187823782851427037287044⟩] +lemma tr1_0_0_0_calc (r : Fin 8) : taylorRowBox 1 0 0 0 r = tr1_0_0_0 r := by + revert r + decide +kernel +def tr1_0_0_1 : Fin 8 → RI := ![⟨-437176176056930404307912360239223824219380653664133950407053,-437176176056930404296974095284117852651626832112378197393932⟩, + ⟨535372712842721605364547265656802253491533171352347916302307,535372712842721605372413690269792257125763810385664110780002⟩, + ⟨1078435133264905856487259706547976545588386792944518004644386,1078435133264905856652019432113049252183153012510924318922505⟩, + ⟨-112012015042681096427501982980524848407803124699014916473899,-112012015042681096366536682489786811120303194939578206538672⟩, + ⟨-713415199505066175510453588509477981309654406553366467717281,-713415199505066175335825563801723976028667784231653146652779⟩, + ⟨-7243356393917648583756347168406321254269099294865513358170,-7243356393917648508807290863812605117969380063866285937314⟩, + ⟨48757352480217819913953446838149691617751550408847685644892,48757352480217820045715549893037027761819825502597428940903⟩, + ⟨87930686769866297963667347861776862523727794509314077521645,87930686769866298037991721343240314090069748649210003761064⟩] +lemma tr1_0_0_1_calc (r : Fin 8) : taylorRowBox 1 0 0 1 r = tr1_0_0_1 r := by + revert r + decide +kernel +def tr1_0_0_2 : Fin 8 → RI := ![⟨171219783051922809180476119528109618697604651200787464046758,171219783051922809191606185707919009162342618508695751965601⟩, + ⟨237795650464560508770215391148146313066205881912198357346449,237795650464560508778219752616957296121336435950551483458025⟩, + ⟨126828536302132775171505703699132901727136891940458425973806,126828536302132775339154472204407961470313376229582986848935⟩, + ⟨-1219487320922167019404844448956432713795181389964544543821725,-1219487320922167019342810128896629016082287302621998315581982⟩, + ⟨-243622214001781217698434184541050787878526858466901961138126,-243622214001781217520744077396993685686029924064793519907185⟩, + ⟨464434927419902404124043668671114697394467815855552393504757,464434927419902404200306948102805397343957122282067530710868⟩, + ⟨50753255288909045855817092006976182549107910796758646531535,50753255288909045989889628468108646304765322634200483689738⟩, + ⟨-241607822966709426985709490852552424121804291112086351436107,-241607822966709426910081847984210937136628584015277649010841⟩] +lemma tr1_0_0_2_calc (r : Fin 8) : taylorRowBox 1 0 0 2 r = tr1_0_0_2 r := by + revert r + decide +kernel +def tr1_0_0_3 : Fin 8 → RI := ![⟨610594008287081288188125294193760465492730332427306441057440,610594008287081288198975663547312284944085289568584541999634⟩, + ⟨-120419186900031373626693207045584712510852698720702579537588,-120419186900031373618889993931124353660617890627075080874537⟩, + ⟨-1359196190762756287289271928608052251735972860627179702902845,-1359196190762756287125836147495430939856744880663433360552396⟩, + ⟨-588849777716665702170254405493482766804003244847820449152369,-588849777716665702109778998219486259218050634894441361133174⟩, + ⟨1063140874483288941442922791820535477875160482464385320743564,1063140874483288941616147574293931368471423278580757775733113⟩, + ⟨-58929098635119028863678703585876319654890965186496020757752,-58929098635119028789331908473323224143008920412593114974265⟩, + ⟨-211157330582352627218897968119173334271790370404021164592368,-211157330582352627088194653570868138906155642745473149105966⟩, + ⟨-402778174033306251378964028032395684361436445352746638330516,-402778174033306251305236896026392879920099928980479964078782⟩] +lemma tr1_0_0_3_calc (r : Fin 8) : taylorRowBox 1 0 0 3 r = tr1_0_0_3 r := by + revert r + decide +kernel +def tr1_0_0_4 : Fin 8 → RI := ![⟨522841523296004437030695136545565106843906327756425424625933,522841523296004437039718991456969669815355756200309158878337⟩, + ⟨-205272884982901208071207587183542179980202937964941532260050,-205272884982901208064717940546163142415082066844133580218335⟩, + ⟨135873291448126135312220936154582108435221273929840791644175,135873291448126135448144491198978474259664860119860164305867⟩, + ⟨-88451245510352741848268149021979899964383775960280458300329,-88451245510352741797972967066010237429315495282966630709229⟩, + ⟨-502869635634482018555801114461443851750432056492510493761289,-502869635634482018411736405407351244590452013210675361790928⟩, + ⟨-1572939224644399563033066632124189885099845427858123902228733,-1572939224644399562971235124798982610244556527817368533513081⟩, + ⟨-364519826334892656704455895772887355680509098116519399460515,-364519826334892656595754734684454002632676654721233784160756⟩, + ⟨395213032281672120824264187838279580411600727340406559318132,395213032281672120885580344052625442990696342270721759731816⟩] +lemma tr1_0_0_4_calc (r : Fin 8) : taylorRowBox 1 0 0 4 r = tr1_0_0_4 r := by + revert r + decide +kernel +def tr1_0_0_5 : Fin 8 → RI := ![⟨233296649342880639247306443263676862315906965877248123567454,233296649342880639254129263924498610479684267189330658125021⟩, + ⟨-115572399091370885785866710307120567894807703755863488188502,-115572399091370885780959971934839537710549453871409964701403⟩, + ⟨1120477116141052653484934242492218895011355233770607679813821,1120477116141052653587704294620638104629524065747657018380557⟩, + ⟨128333682650394092959340922451833890561599129554455094479904,128333682650394092997368462782389897635041559791930731078274⟩, + ⟨-1667718399010325081194528085063610271768033537492300889121502,-1667718399010325081085602611077069113753516093129868289854204⟩, + ⟨-980994327649871920372418708333391913906673389217869892089091,-980994327649871920325668700738180060520657668082356876964677⟩, + ⟨138583822410548930575918598155182720290365719939712063992483,138583822410548930658106148268543009195777407390985260648305⟩, + ⟨906424427695795352673894536562653023106608687459108742406441,906424427695795352720254893812664389734325176542117971256016⟩] +lemma tr1_0_0_5_calc (r : Fin 8) : taylorRowBox 1 0 0 5 r = tr1_0_0_5 r := by + revert r + decide +kernel +def tr1_0_0_6 : Fin 8 → RI := ![⟨21020152320979924529088152099929279821228624467540276789317,21020152320979924534156910456865170792168966510592380560424⟩, + ⟨-10257097228932755505600692015543806132131906852499912825738,-10257097228932755501955415030185814128266089453433667878306⟩, + ⟨-263156724261173008376201993202438185978927008582204972177285,-263156724261173008299852842834563443596646174730140545199708⟩, + ⟨696724063257020663036934989658409213492583425674084324418734,696724063257020663065186122499591735870797214464192191278369⟩, + ⟨-120522583381670932921830353201531662049192689229692469217911,-120522583381670932840908263351853252458146551217122243974148⟩, + ⟨1049036878758187543903752288938936481310271029548923748420511,1049036878758187543938483451233085594390296305811624889699635⟩, + ⟨619405624552173928147010959803391860566047267192120272767203,619405624552173928208069113342860234253574163804160178671849⟩, + ⟨137605197768744755056669212489134529347892497570241149651016,137605197768744755091110898695622616877036291198231005153007⟩] +lemma tr1_0_0_6_calc (r : Fin 8) : taylorRowBox 1 0 0 6 r = tr1_0_0_6 r := by + revert r + decide +kernel +def tr1_0_0_7 : Fin 8 → RI := ![⟨-44736861550922094684461913895912525282975868819250240562563,-44736861550922094681335576159799875119571571450005896640768⟩, + ⟨31980550128138734001969174055316288409096507038194682158487,31980550128138734004217528819044096705876210642117547482308⟩, + ⟨-1168011189631376269623051209067148395490734051026484860184401,-1168011189631376269575960143937221016584569607907415739393484⟩, + ⟨847627813220304414676850880242020975912322672682964389064732,847627813220304414694275775348190488418647663721717530142027⟩, + ⟨1278196206703923776146577285269806392293910904335560523377784,1278196206703923776196488874137085625063910758038395182656247⟩, + ⟨1586020709327598258614700813902676009955303073778310306199424,1586020709327598258636122498593426031442815302751703506996345⟩, + ⟨323505398306839678818796005328380041871649677742015001823425,323505398306839678856455802080959809002815209426107552714975⟩, + ⟨-712016225120751422814045044330987730029245309250752909608859,-712016225120751422792801904354527783557949865880469339175886⟩] +lemma tr1_0_0_7_calc (r : Fin 8) : taylorRowBox 1 0 0 7 r = tr1_0_0_7 r := by + revert r + decide +kernel +def tr1_0_0_8 : Fin 8 → RI := ![⟨-22468191242981843174695224725272174488931873083180986672581,-22468191242981843172916649891089238351898948037371267577008⟩, + ⟨17728189268518492989192390134154256421794549466784607559249,17728189268518492990471480091363330978544111341895357030287⟩, + ⟨-537863443246735200370007019366252262102531983775647696292991,-537863443246735200343216892891036461848538479254679587720158⟩, + ⟨357812098441261195606854254427286317027867433037594361725444,357812098441261195616767284477048430849341296757560132316068⟩, + ⟨974821066817228881915427694214350366582053867949651741786875,974821066817228881943822417812863479151853505203835248545944⟩, + ⟨608310169427655589648287324036478753863128633624626178663467,608310169427655589660474129337689918397424806384305768228769⟩, + ⟨-256798920247046213666802711935874514477161672110514895235385,-256798920247046213645378037950238328993699974266776653512166⟩, + ⟨-618983711018094969949817736565210612666817894083687361745620,-618983711018094969937732505425631748645633810331970685620758⟩] +lemma tr1_0_0_8_calc (r : Fin 8) : taylorRowBox 1 0 0 8 r = tr1_0_0_8 r := by + revert r + decide +kernel +def tr1_0_0_9 : Fin 8 → RI := ![⟨7087519074954580872032715314694513979523559062184165766766,7087519074954580873026482838644318639312097605237213912909⟩, + ⟨-4998144771269205809135733788080319681407528927862502033845,-4998144771269205808421050303719372880969608816904683285200⟩, + ⟨258673308057786340131013516106359543522018238607429628772194,258673308057786340145982331104657556078123831476909655091530⟩, + ⟨-109206670246799518025378305849751788333414551225130727811711,-109206670246799518019839462536566633288057482939467642662772⟩, + ⟨159520823091319483844211197196332684979446563346408993254524,159520823091319483860076570764644064977553169163350192875107⟩, + ⟨-253221451627598407967088481272033950971079168715615292639085,-253221451627598407960279180310358835265248175962508095668293⟩, + ⟨-410420730510809017301327862227037226865175013271422592632140,-410420730510809017289356960126608687875272675030398838779871⟩, + ⟨-77970433675263237732809798449391293455536510451836350537334,-77970433675263237726057251412766349410080860229553709808191⟩] +lemma tr1_0_0_9_calc (r : Fin 8) : taylorRowBox 1 0 0 9 r = tr1_0_0_9 r := by + revert r + decide +kernel +def tr1_0_0_10 : Fin 8 → RI := ![⟨14470129024590968453113482687638522314039342858665735569299,14470129024590968453592333560186709691084915256668266748952⟩, + ⟨-10555819660029037236150272044594663616115625445951026655040,-10555819660029037235805898937368915253953476915680592902158⟩, + ⟨447557794019735493129591690916670291427430785378914542183496,447557794019735493136804474540803498162115307506475308900410⟩, + ⟨-224547307960994614619336642127385075994651248790115485271097,-224547307960994614616667728232034206068080326734339860770407⟩, + ⟨-201991155903181532159989516710366566001462922815141346324896,-201991155903181532152344722738562944779376563835515536203396⟩, + ⟨-422460502406603902180639605723032392474866132507397976531083,-422460502406603902177358516707406558998676032417309294542024⟩, + ⟨-188355886322821939751476957073605689287655907244334808843211,-188355886322821939745708729819396643311355736620793374881669⟩, + ⟨211090629426818098729457761804770018719712601532933555022416,211090629426818098732711503713705320824980459156663073575777⟩] +lemma tr1_0_0_10_calc (r : Fin 8) : taylorRowBox 1 0 0 10 r = tr1_0_0_10 r := by + revert r + decide +kernel +def tr1_0_0_11 : Fin 8 → RI := ![⟨9420825724594032843424027881756172969822049069619318706755,9420825724594032843640421856108458910123303207588510659267⟩, + ⟨-5329075592302195500094254065393575399707917446763260857766,-5329075592302195499938630948459118138764845053610045335894⟩, + ⟨286679629897457163890996216586219579162262480335127073512757,286679629897457163894255692560988862253869874704900646173987⟩, + ⟨-147131629580009562653907625029866891932516222969830810698449,-147131629580009562652701535789715150774087889157737915268967⟩, + ⟨-183369727540678025096764378804636671312523442212465291013731,-183369727540678025093309676212458294212705497815951036163359⟩, + ⟨-261050667912410468624758749796320840820677569807794422523067,-261050667912410468623276017002053106087440062676742535131245⟩, + ⟨29592798569703564962069380202406898659075664533811646420424,29592798569703564964676057337327417320903671557114561648848⟩, + ⟨190709786098448005303402441289480727201762289190881935978969,190709786098448005304872815853997966781625589941947462871005⟩] +lemma tr1_0_0_11_calc (r : Fin 8) : taylorRowBox 1 0 0 11 r = tr1_0_0_11 r := by + revert r + decide +kernel +def tr1_0_0_12 : Fin 8 → RI := ![⟨3964112154473685914227475648191024108676793810759572290955,3964112154473685914318563414547893062527841712234665437397⟩, + ⟨-980666158482568594293902971698286122623804656395399109804,-980666158482568594228395777436066472289239458855140367544⟩, + ⟨120379419883954143869673755308913302811977896875360829841264,120379419883954143871045782357837018998051408159889967684445⟩, + ⟨-62503408612125456866884879376755014216439859677708669482291,-62503408612125456866377194376555229150289384672802811162529⟩, + ⟨-87055979922593679146863733460502105073367569415784704185330,-87055979922593679145409528723562729450252481889563084828118⟩, + ⟨-106546169474565070830719067021091988597091490111374178113879,-106546169474565070830094933106376511443593568491422127651722⟩, + ⟨94547409159448509739337806258760283980353727757771843527520,94547409159448509740435047522268290635821583796885928695514⟩, + ⟨86999415446365866021777179009528246351267404266946002740620,86999415446365866022396110914590832156119851288146683248477⟩] +lemma tr1_0_0_12_calc (r : Fin 8) : taylorRowBox 1 0 0 12 r = tr1_0_0_12 r := by + revert r + decide +kernel +def tr1_0_0_13 : Fin 8 → RI := ![⟨1266100197157965325595058727664694924210018963943522020011,1266100197157965325632374103836568979256338805283693491195⟩, + ⟨-231182700722114493879570475307189879237336088903200332252,-231182700722114493852734537907168980202186362594528273361⟩, + ⟨38842082763245729585166745172829440856221724049707830841128,38842082763245729585728815223465744211867776995337488183587⟩, + ⟨-20403574348455304889839018669754391943619139193005706778250,-20403574348455304889631038416017289664199190265410814270973⟩, + ⟨-30190911073775806487100436422323305054836362448706223771546,-30190911073775806486504701133600326053669193186797410884030⟩, + ⟨-33508036339157274411900109470766007809024008950960112604385,-33508036339157274411644424292166814436324736900866783605976⟩, + ⟨69842032512465375617428331616611534300989644971274512437671,69842032512465375617877831830929444418242025555084958479642⟩, + ⟨22595124853483407378694537091101078447204551140656706680445,22595124853483407378948091193764123695012509809083701584757⟩] +lemma tr1_0_0_13_calc (r : Fin 8) : taylorRowBox 1 0 0 13 r = tr1_0_0_13 r := by + revert r + decide +kernel +def tr1_0_0_14 : Fin 8 → RI := ![⟨348171833256485914455424708530984662035704393227852157506,348171833256485914469934561628180764103094218667317929869⟩, + ⟨-678361480730930249234979844357878945498533568994408054314,-678361480730930249224544856174815619743963630039158758111⟩, + ⟨11122700347433513357595403644630685769376382793914893998043,11122700347433513357813961105434501817476170286358325972209⟩, + ⟨-5949003577843123939665712400974882473357893912918267701642,-5949003577843123939584840566400833349798551963989590095166⟩, + ⟨-9196085170646062615002667107208587369388681006204718460660,-9196085170646062614771019126913172159637534226617679522210⟩, + ⟨-9325363502622078297495674739555980853024621873264789352550,-9325363502622078297396253140172695116150070503246067035822⟩, + ⟨33752541432011661318968495686382873707691821219368790709461,33752541432011661319143281062976027711490354106097528702206⟩, + ⟨1015466987015978180618180899527854891242393322100311397279,1015466987015978180716773843221839757295028167971214172574⟩] +lemma tr1_0_0_14_calc (r : Fin 8) : taylorRowBox 1 0 0 14 r = tr1_0_0_14 r := by + revert r + decide +kernel +def tr1_0_0_15 : Fin 8 → RI := ![⟨97207778380591605397730985163439985996762397144568705245,97207778380591605403154108939179165525823865872865638821⟩, + ⟨-672628665770534931560404203150376417771728898046603184201,-672628665770534931556504078722095502329230392735284550761⟩, + ⟨3397655346253585618621928072781562029163122663833364673131,3397655346253585618703614920615965311901317243759730249017⟩, + ⟨-1865925715986950753489388579603619693740104521777443645253,-1865925715986950753459162362568331885254710320062132966428⟩, + ⟨-2982153527661529801290055769922037319639187401149710605795,-2982153527661529801203476280720711123489853986722876885335⟩, + ⟨-2759437897160340989807440051573872230516601446132419390112,-2759437897160340989770280775334115816058951264365305849441⟩, + ⟨12647150842163669727348238758428429766018521018490083805378,12647150842163669727413565590140968940727171272846937469474⟩, + ⟨-2320041213295313426583129957798787165737845595188413256165,-2320041213295313426546280395402434107941895285807786321406⟩] +lemma tr1_0_0_15_calc (r : Fin 8) : taylorRowBox 1 0 0 15 r = tr1_0_0_15 r := by + revert r + decide +kernel +def tr1_0_0_16 : Fin 8 → RI := ![⟨31236005892843880607660196690214984415010717898490355384,31236005892843880609476848583776080386490203724485291979⟩, + ⟨-296307894639942384025931060928220422332853142411533149382,-296307894639942384024624587257186474149392674960037880710⟩, + ⟨1213653111697158044958859152015222159722356746451510246820,1213653111697158044986222821541124850943251890183639801950⟩, + ⟨-682506172704567610431517849746908229567157889135662433749,-682506172704567610421392594140909362783660093980342119482⟩, + ⟨-1110804826221918803378297071923190123473818174873699810773,-1110804826221918803349294452859851564989924167319619278494⟩, + ⟨-962405676830088347186361108972777465309898653844591065030,-962405676830088347173913399435654189433560895827049335300⟩, + ⟨4006542632383738726380982213560436527859315049194881356358,4006542632383738726402865562980169179576229465072582934800⟩, + ⟨-1496717426494292196822214288925620781353280161221022046994,-1496717426494292196809870328125073647211865061191883206796⟩] +lemma tr1_0_0_16_calc (r : Fin 8) : taylorRowBox 1 0 0 16 r = tr1_0_0_16 r := by + revert r + decide +kernel +def tr1_0_0_17 : Fin 8 → RI := ![⟨11004789363001327059094606817920389362527239935159795204,11004789363001327059602672384746641989155518263249791362⟩, + ⟨-21260226403621408383833507996407589957055901542508704220,-21260226403621408383468124684078928202547915766174641073⟩, + ⟨458926951910809685469337715743450198774317001899188244280,458926951910809685476990551334792305647035994707129500434⟩, + ⟨-261477712639404151708861007393267436577955835536618199728,-261477712639404151706029263047003234896687393697032000381⟩, + ⟨-428280550748321172118952933910927062575902722327684039761,-428280550748321172110841731018349688366687432667060454041⟩, + ⟨-359839718380723864883528544407030816023200660827351794147,-359839718380723864880047276133191151722506359764831473950⟩, + ⟨1142558401292893132764008183086648576425659056013285513442,1142558401292893132770128329916320132918446096519016966816⟩, + ⟨-632116956750587119594364609229876005365446960944547908940,-632116956750587119590912356509781374805599742242966897242⟩] +lemma tr1_0_0_17_calc (r : Fin 8) : taylorRowBox 1 0 0 17 r = tr1_0_0_17 r := by + revert r + decide +kernel +def tr1_0_0_18 : Fin 8 → RI := ![⟨3783133597090444474866184426038657550929059914997821975,3783133597090444475058286606560598895300302401632200093⟩, + ⟨35972790235800139492103722475577340386177329945868333197,35972790235800139492241875768395702045010279262955376930⟩, + ⟨163257036610423662499361541002985576398813590001838272954,163257036610423662502255117148001904327777195874662980963⟩, + ⟨-93567453959859511583104151074324702707748807761665679784,-93567453959859511582033454103073444590132183826940121743⟩, + ⟨-153533086515536151337107401188690637540354318696317548967,-153533086515536151334040514030694078090461795420841100538⟩, + ⟨-127429542814053072509409857665891644672180356136036991649,-127429542814053072508093572386879938928741229274417200920⟩, + ⟨306491685016967284793463059549828471233133992061218648766,306491685016967284795777118261657334080623095249246232203⟩, + ⟨-218441578931964302624297106552390797476224159429755994080,-218441578931964302622991792202147048317556742624260026653⟩] +lemma tr1_0_0_18_calc (r : Fin 8) : taylorRowBox 1 0 0 18 r = tr1_0_0_18 r := by + revert r + decide +kernel +def tr1_0_0_19 : Fin 8 → RI := ![⟨1208675463892459183392703534218114209535460317949388861,1208675463892459183452690622551639693560246685351748613⟩, + ⟨-2665258523382955755495986327568168844323692651957601697,-2665258523382955755452845673165672779819351329999991122⟩, + ⟨52676868142278685151481001877656970751011297469135444675,52676868142278685152384568965439435194600828092601037492⟩, + ⟨-30266435310375780125953512523374585861839532717379686193,-30266435310375780125619169656373417307982263617597266295⟩, + ⟨-49704650812393018321813662094985754690099409933833108889,-49704650812393018320855975772239064174221846435553162948⟩, + ⟨-41016201389057928708813303956129700396325796890546314514,-41016201389057928708402272071485580293116699947589370050⟩, + ⟨79278832644249013986236270082002148003538206751418770427,79278832644249013986958873250681941198860663932004408686⟩, + ⟨-66498310829767730620836106615764620665472589086721307526,-66498310829767730620428500585378363536431641630695331577⟩] +lemma tr1_0_0_19_calc (r : Fin 8) : taylorRowBox 1 0 0 19 r = tr1_0_0_19 r := by + revert r + decide +kernel +def tr1_0_0_20 : Fin 8 → RI := ![⟨366406548098593994515337050971056315803483538148495356,366406548098593994532677339366541332737842453665672852⟩, + ⟨-32874862262998706532434785664671778362535536683540431278,-32874862262998706532422315124599054583739105278199312500⟩, + ⟨15764020462268031006971058122768291865815018050195096657,15764020462268031007232249561160871298115372583320011825⟩, + ⟨-9060411689718810681469013580710136937341528975602509755,-9060411689718810681372366087093862345726450115903554701⟩, + ⟨-14897361727674445364295620744346248685313509113778812957,-14897361727674445364018785220399716231553765820090200469⟩, + ⟨-12245129204577846715982102387675542784935296809626328123,-12245129204577846715863286628860246211649579053378989963⟩, + ⟨20137764069810126754109346025523115202067428558012547736,20137764069810126754318226764503682720129792306171906175⟩, + ⟨-18747881640792904092921931332704173262690591279200821324,-18747881640792904092804105875343435125817813433631999678⟩] +lemma tr1_0_0_20_calc (r : Fin 8) : taylorRowBox 1 0 0 20 r = tr1_0_0_20 r := by + revert r + decide +kernel +def tr1_0_0 : Fin 21 → Fin 8 → RI := ![tr1_0_0_0,tr1_0_0_1,tr1_0_0_2,tr1_0_0_3,tr1_0_0_4,tr1_0_0_5,tr1_0_0_6,tr1_0_0_7,tr1_0_0_8,tr1_0_0_9,tr1_0_0_10,tr1_0_0_11,tr1_0_0_12,tr1_0_0_13,tr1_0_0_14,tr1_0_0_15,tr1_0_0_16,tr1_0_0_17,tr1_0_0_18,tr1_0_0_19,tr1_0_0_20] +lemma tr1_0_0_mem (l : Fin 21) (r : Fin 8) : (tr1_0_0 l r).Mem (taylorRow 1 (nearNode 0) (nearDisplacement 0 0) l.val r) := by + have he : taylorRowBox 1 0 0 l r = tr1_0_0 l r := by + fin_cases l + · exact tr1_0_0_0_calc r + · exact tr1_0_0_1_calc r + · exact tr1_0_0_2_calc r + · exact tr1_0_0_3_calc r + · exact tr1_0_0_4_calc r + · exact tr1_0_0_5_calc r + · exact tr1_0_0_6_calc r + · exact tr1_0_0_7_calc r + · exact tr1_0_0_8_calc r + · exact tr1_0_0_9_calc r + · exact tr1_0_0_10_calc r + · exact tr1_0_0_11_calc r + · exact tr1_0_0_12_calc r + · exact tr1_0_0_13_calc r + · exact tr1_0_0_14_calc r + · exact tr1_0_0_15_calc r + · exact tr1_0_0_16_calc r + · exact tr1_0_0_17_calc r + · exact tr1_0_0_18_calc r + · exact tr1_0_0_19_calc r + · exact tr1_0_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 0 0 l r +def tr1_0_1_0 : Fin 8 → RI := ![⟨-376225907036466717497512999227363635142277521605628478070250,-376225907036466717487707286513582077147026032135913192168340⟩, + ⟨321944781721467240656724111722731508592203035973484717430566,321944781721467240663776043647698306044843837986636396825829⟩, + ⟨-48616828985707993868775808265770014295961991842083399197323,-48616828985707993721075369274777667599695294424594740596274⟩, + ⟨788162705153727894034682243291809208871421428516441901290308,788162705153727894089335172669177490547308770178274436147063⟩, + ⟨405094550931871463200294195904828087641189561151440673005791,405094550931871463356841166472128937729524781512142279693740⟩, + ⟨111354014587842592164691465872401835894066811988800580811723,111354014587842592231880267500501186993689506705309337902256⟩, + ⟨20790397299857525087523259796120619741139325646798039995274,20790397299857525205642663052184377691165436114394125222344⟩, + ⟨33967791675520508834299113028100662359868284115313909529859,33967791675520508900927911744650360187823782851427037287044⟩] +lemma tr1_0_1_0_calc (r : Fin 8) : taylorRowBox 1 0 1 0 r = tr1_0_1_0 r := by + revert r + decide +kernel +def tr1_0_1_1 : Fin 8 → RI := ![⟨437176176056930404296974095284117852651626832112378197393933,437176176056930404307912360239223824219380653664133950407054⟩, + ⟨-535372712842721605372413690269792257125763810385664110780003,-535372712842721605364547265656802253491533171352347916302308⟩, + ⟨-1078435133264905856652019432113049252183153012510924318922507,-1078435133264905856487259706547976545588386792944518004644388⟩, + ⟨112012015042681096366536682489786811120303194939578206538673,112012015042681096427501982980524848407803124699014916473900⟩, + ⟨713415199505066175335825563801723976028667784231653146652781,713415199505066175510453588509477981309654406553366467717283⟩, + ⟨7243356393917648508807290863812605117969380063866285937315,7243356393917648583756347168406321254269099294865513358171⟩, + ⟨-48757352480217820045715549893037027761819825502597428940903,-48757352480217819913953446838149691617751550408847685644892⟩, + ⟨-87930686769866298037991721343240314090069748649210003761064,-87930686769866297963667347861776862523727794509314077521645⟩] +lemma tr1_0_1_1_calc (r : Fin 8) : taylorRowBox 1 0 1 1 r = tr1_0_1_1 r := by + revert r + decide +kernel +def tr1_0_1_2 : Fin 8 → RI := ![⟨171219783051922809180476119528109618697604651200787464046759,171219783051922809191606185707919009162342618508695751965601⟩, + ⟨237795650464560508770215391148146313066205881912198357346450,237795650464560508778219752616957296121336435950551483458025⟩, + ⟨126828536302132775171505703699132901727136891940458425973807,126828536302132775339154472204407961470313376229582986848935⟩, + ⟨-1219487320922167019404844448956432713795181389964544543821728,-1219487320922167019342810128896629016082287302621998315581985⟩, + ⟨-243622214001781217698434184541050787878526858466901961138126,-243622214001781217520744077396993685686029924064793519907185⟩, + ⟨464434927419902404124043668671114697394467815855552393504759,464434927419902404200306948102805397343957122282067530710869⟩, + ⟨50753255288909045855817092006976182549107910796758646531536,50753255288909045989889628468108646304765322634200483689738⟩, + ⟨-241607822966709426985709490852552424121804291112086351436107,-241607822966709426910081847984210937136628584015277649010841⟩] +lemma tr1_0_1_2_calc (r : Fin 8) : taylorRowBox 1 0 1 2 r = tr1_0_1_2 r := by + revert r + decide +kernel +def tr1_0_1_3 : Fin 8 → RI := ![⟨-610594008287081288198975663547312284944085289568584541999637,-610594008287081288188125294193760465492730332427306441057442⟩, + ⟨120419186900031373618889993931124353660617890627075080874538,120419186900031373626693207045584712510852698720702579537588⟩, + ⟨1359196190762756287125836147495430939856744880663433360552402,1359196190762756287289271928608052251735972860627179702902852⟩, + ⟨588849777716665702109778998219486259218050634894441361133177,588849777716665702170254405493482766804003244847820449152372⟩, + ⟨-1063140874483288941616147574293931368471423278580757775733118,-1063140874483288941442922791820535477875160482464385320743568⟩, + ⟨58929098635119028789331908473323224143008920412593114974266,58929098635119028863678703585876319654890965186496020757752⟩, + ⟨211157330582352627088194653570868138906155642745473149105967,211157330582352627218897968119173334271790370404021164592369⟩, + ⟨402778174033306251305236896026392879920099928980479964078784,402778174033306251378964028032395684361436445352746638330518⟩] +lemma tr1_0_1_3_calc (r : Fin 8) : taylorRowBox 1 0 1 3 r = tr1_0_1_3 r := by + revert r + decide +kernel +def tr1_0_1_4 : Fin 8 → RI := ![⟨522841523296004437030695136545565106843906327756425424625936,522841523296004437039718991456969669815355756200309158878340⟩, + ⟨-205272884982901208071207587183542179980202937964941532260051,-205272884982901208064717940546163142415082066844133580218336⟩, + ⟨135873291448126135312220936154582108435221273929840791644176,135873291448126135448144491198978474259664860119860164305868⟩, + ⟨-88451245510352741848268149021979899964383775960280458300329,-88451245510352741797972967066010237429315495282966630709229⟩, + ⟨-502869635634482018555801114461443851750432056492510493761292,-502869635634482018411736405407351244590452013210675361790930⟩, + ⟨-1572939224644399563033066632124189885099845427858123902228742,-1572939224644399562971235124798982610244556527817368533513088⟩, + ⟨-364519826334892656704455895772887355680509098116519399460517,-364519826334892656595754734684454002632676654721233784160757⟩, + ⟨395213032281672120824264187838279580411600727340406559318134,395213032281672120885580344052625442990696342270721759731819⟩] +lemma tr1_0_1_4_calc (r : Fin 8) : taylorRowBox 1 0 1 4 r = tr1_0_1_4 r := by + revert r + decide +kernel +def tr1_0_1_5 : Fin 8 → RI := ![⟨-233296649342880639254129263924498610479684267189330658125023,-233296649342880639247306443263676862315906965877248123567455⟩, + ⟨115572399091370885780959971934839537710549453871409964701404,115572399091370885785866710307120567894807703755863488188503⟩, + ⟨-1120477116141052653587704294620638104629524065747657018380566,-1120477116141052653484934242492218895011355233770607679813827⟩, + ⟨-128333682650394092997368462782389897635041559791930731078275,-128333682650394092959340922451833890561599129554455094479904⟩, + ⟨1667718399010325081085602611077069113753516093129868289854215,1667718399010325081194528085063610271768033537492300889121515⟩, + ⟨980994327649871920325668700738180060520657668082356876964683,980994327649871920372418708333391913906673389217869892089099⟩, + ⟨-138583822410548930658106148268543009195777407390985260648306,-138583822410548930575918598155182720290365719939712063992483⟩, + ⟨-906424427695795352720254893812664389734325176542117971256024,-906424427695795352673894536562653023106608687459108742406446⟩] +lemma tr1_0_1_5_calc (r : Fin 8) : taylorRowBox 1 0 1 5 r = tr1_0_1_5 r := by + revert r + decide +kernel +def tr1_0_1_6 : Fin 8 → RI := ![⟨21020152320979924529088152099929279821228624467540276789318,21020152320979924534156910456865170792168966510592380560424⟩, + ⟨-10257097228932755505600692015543806132131906852499912825738,-10257097228932755501955415030185814128266089453433667878306⟩, + ⟨-263156724261173008376201993202438185978927008582204972177288,-263156724261173008299852842834563443596646174730140545199709⟩, + ⟨696724063257020663036934989658409213492583425674084324418739,696724063257020663065186122499591735870797214464192191278375⟩, + ⟨-120522583381670932921830353201531662049192689229692469217912,-120522583381670932840908263351853252458146551217122243974148⟩, + ⟨1049036878758187543903752288938936481310271029548923748420519,1049036878758187543938483451233085594390296305811624889699644⟩, + ⟨619405624552173928147010959803391860566047267192120272767208,619405624552173928208069113342860234253574163804160178671855⟩, + ⟨137605197768744755056669212489134529347892497570241149651017,137605197768744755091110898695622616877036291198231005153008⟩] +lemma tr1_0_1_6_calc (r : Fin 8) : taylorRowBox 1 0 1 6 r = tr1_0_1_6 r := by + revert r + decide +kernel +def tr1_0_1_7 : Fin 8 → RI := ![⟨44736861550922094681335576159799875119571571450005896640769,44736861550922094684461913895912525282975868819250240562563⟩, + ⟨-31980550128138734004217528819044096705876210642117547482308,-31980550128138734001969174055316288409096507038194682158487⟩, + ⟨1168011189631376269575960143937221016584569607907415739393494,1168011189631376269623051209067148395490734051026484860184414⟩, + ⟨-847627813220304414694275775348190488418647663721717530142036,-847627813220304414676850880242020975912322672682964389064738⟩, + ⟨-1278196206703923776196488874137085625063910758038395182656261,-1278196206703923776146577285269806392293910904335560523377794⟩, + ⟨-1586020709327598258636122498593426031442815302751703506996363,-1586020709327598258614700813902676009955303073778310306199436⟩, + ⟨-323505398306839678856455802080959809002815209426107552714979,-323505398306839678818796005328380041871649677742015001823427⟩, + ⟨712016225120751422792801904354527783557949865880469339175892,712016225120751422814045044330987730029245309250752909608866⟩] +lemma tr1_0_1_7_calc (r : Fin 8) : taylorRowBox 1 0 1 7 r = tr1_0_1_7 r := by + revert r + decide +kernel +def tr1_0_1_8 : Fin 8 → RI := ![⟨-22468191242981843174695224725272174488931873083180986672581,-22468191242981843172916649891089238351898948037371267577008⟩, + ⟨17728189268518492989192390134154256421794549466784607559250,17728189268518492990471480091363330978544111341895357030287⟩, + ⟨-537863443246735200370007019366252262102531983775647696292997,-537863443246735200343216892891036461848538479254679587720162⟩, + ⟨357812098441261195606854254427286317027867433037594361725448,357812098441261195616767284477048430849341296757560132316072⟩, + ⟨974821066817228881915427694214350366582053867949651741786884,974821066817228881943822417812863479151853505203835248545956⟩, + ⟨608310169427655589648287324036478753863128633624626178663473,608310169427655589660474129337689918397424806384305768228776⟩, + ⟨-256798920247046213666802711935874514477161672110514895235388,-256798920247046213645378037950238328993699974266776653512168⟩, + ⟨-618983711018094969949817736565210612666817894083687361745627,-618983711018094969937732505425631748645633810331970685620763⟩] +lemma tr1_0_1_8_calc (r : Fin 8) : taylorRowBox 1 0 1 8 r = tr1_0_1_8 r := by + revert r + decide +kernel +def tr1_0_1_9 : Fin 8 → RI := ![⟨-7087519074954580873026482838644318639312097605237213912909,-7087519074954580872032715314694513979523559062184165766766⟩, + ⟨4998144771269205808421050303719372880969608816904683285201,4998144771269205809135733788080319681407528927862502033845⟩, + ⟨-258673308057786340145982331104657556078123831476909655091533,-258673308057786340131013516106359543522018238607429628772196⟩, + ⟨109206670246799518019839462536566633288057482939467642662774,109206670246799518025378305849751788333414551225130727811712⟩, + ⟨-159520823091319483860076570764644064977553169163350192875109,-159520823091319483844211197196332684979446563346408993254525⟩, + ⟨253221451627598407960279180310358835265248175962508095668296,253221451627598407967088481272033950971079168715615292639088⟩, + ⟨410420730510809017289356960126608687875272675030398838779876,410420730510809017301327862227037226865175013271422592632146⟩, + ⟨77970433675263237726057251412766349410080860229553709808192,77970433675263237732809798449391293455536510451836350537335⟩] +lemma tr1_0_1_9_calc (r : Fin 8) : taylorRowBox 1 0 1 9 r = tr1_0_1_9 r := by + revert r + decide +kernel +def tr1_0_1_10 : Fin 8 → RI := ![⟨14470129024590968453113482687638522314039342858665735569300,14470129024590968453592333560186709691084915256668266748952⟩, + ⟨-10555819660029037236150272044594663616115625445951026655040,-10555819660029037235805898937368915253953476915680592902158⟩, + ⟨447557794019735493129591690916670291427430785378914542183501,447557794019735493136804474540803498162115307506475308900416⟩, + ⟨-224547307960994614619336642127385075994651248790115485271100,-224547307960994614616667728232034206068080326734339860770409⟩, + ⟨-201991155903181532159989516710366566001462922815141346324899,-201991155903181532152344722738562944779376563835515536203398⟩, + ⟨-422460502406603902180639605723032392474866132507397976531089,-422460502406603902177358516707406558998676032417309294542028⟩, + ⟨-188355886322821939751476957073605689287655907244334808843214,-188355886322821939745708729819396643311355736620793374881671⟩, + ⟨211090629426818098729457761804770018719712601532933555022419,211090629426818098732711503713705320824980459156663073575780⟩] +lemma tr1_0_1_10_calc (r : Fin 8) : taylorRowBox 1 0 1 10 r = tr1_0_1_10 r := by + revert r + decide +kernel +def tr1_0_1_11 : Fin 8 → RI := ![⟨-9420825724594032843640421856108458910123303207588510659267,-9420825724594032843424027881756172969822049069619318706755⟩, + ⟨5329075592302195499938630948459118138764845053610045335895,5329075592302195500094254065393575399707917446763260857766⟩, + ⟨-286679629897457163894255692560988862253869874704900646173992,-286679629897457163890996216586219579162262480335127073512760⟩, + ⟨147131629580009562652701535789715150774087889157737915268969,147131629580009562653907625029866891932516222969830810698452⟩, + ⟨183369727540678025093309676212458294212705497815951036163362,183369727540678025096764378804636671312523442212465291013735⟩, + ⟨261050667912410468623276017002053106087440062676742535131249,261050667912410468624758749796320840820677569807794422523071⟩, + ⟨-29592798569703564964676057337327417320903671557114561648848,-29592798569703564962069380202406898659075664533811646420424⟩, + ⟨-190709786098448005304872815853997966781625589941947462871009,-190709786098448005303402441289480727201762289190881935978971⟩] +lemma tr1_0_1_11_calc (r : Fin 8) : taylorRowBox 1 0 1 11 r = tr1_0_1_11 r := by + revert r + decide +kernel +def tr1_0_1_12 : Fin 8 → RI := ![⟨3964112154473685914227475648191024108676793810759572290956,3964112154473685914318563414547893062527841712234665437397⟩, + ⟨-980666158482568594293902971698286122623804656395399109804,-980666158482568594228395777436066472289239458855140367544⟩, + ⟨120379419883954143869673755308913302811977896875360829841266,120379419883954143871045782357837018998051408159889967684447⟩, + ⟨-62503408612125456866884879376755014216439859677708669482292,-62503408612125456866377194376555229150289384672802811162529⟩, + ⟨-87055979922593679146863733460502105073367569415784704185332,-87055979922593679145409528723562729450252481889563084828119⟩, + ⟨-106546169474565070830719067021091988597091490111374178113881,-106546169474565070830094933106376511443593568491422127651723⟩, + ⟨94547409159448509739337806258760283980353727757771843527522,94547409159448509740435047522268290635821583796885928695516⟩, + ⟨86999415446365866021777179009528246351267404266946002740622,86999415446365866022396110914590832156119851288146683248479⟩] +lemma tr1_0_1_12_calc (r : Fin 8) : taylorRowBox 1 0 1 12 r = tr1_0_1_12 r := by + revert r + decide +kernel +def tr1_0_1_13 : Fin 8 → RI := ![⟨-1266100197157965325632374103836568979256338805283693491195,-1266100197157965325595058727664694924210018963943522020011⟩, + ⟨231182700722114493852734537907168980202186362594528273362,231182700722114493879570475307189879237336088903200332252⟩, + ⟨-38842082763245729585728815223465744211867776995337488183588,-38842082763245729585166745172829440856221724049707830841128⟩, + ⟨20403574348455304889631038416017289664199190265410814270974,20403574348455304889839018669754391943619139193005706778250⟩, + ⟨30190911073775806486504701133600326053669193186797410884031,30190911073775806487100436422323305054836362448706223771546⟩, + ⟨33508036339157274411644424292166814436324736900866783605977,33508036339157274411900109470766007809024008950960112604385⟩, + ⟨-69842032512465375617877831830929444418242025555084958479643,-69842032512465375617428331616611534300989644971274512437671⟩, + ⟨-22595124853483407378948091193764123695012509809083701584757,-22595124853483407378694537091101078447204551140656706680445⟩] +lemma tr1_0_1_13_calc (r : Fin 8) : taylorRowBox 1 0 1 13 r = tr1_0_1_13 r := by + revert r + decide +kernel +def tr1_0_1_14 : Fin 8 → RI := ![⟨348171833256485914455424708530984662035704393227852157507,348171833256485914469934561628180764103094218667317929869⟩, + ⟨-678361480730930249234979844357878945498533568994408054314,-678361480730930249224544856174815619743963630039158758111⟩, + ⟨11122700347433513357595403644630685769376382793914893998044,11122700347433513357813961105434501817476170286358325972209⟩, + ⟨-5949003577843123939665712400974882473357893912918267701642,-5949003577843123939584840566400833349798551963989590095166⟩, + ⟨-9196085170646062615002667107208587369388681006204718460660,-9196085170646062614771019126913172159637534226617679522210⟩, + ⟨-9325363502622078297495674739555980853024621873264789352550,-9325363502622078297396253140172695116150070503246067035822⟩, + ⟨33752541432011661318968495686382873707691821219368790709462,33752541432011661319143281062976027711490354106097528702206⟩, + ⟨1015466987015978180618180899527854891242393322100311397280,1015466987015978180716773843221839757295028167971214172574⟩] +lemma tr1_0_1_14_calc (r : Fin 8) : taylorRowBox 1 0 1 14 r = tr1_0_1_14 r := by + revert r + decide +kernel +def tr1_0_1_15 : Fin 8 → RI := ![⟨-97207778380591605403154108939179165525823865872865638821,-97207778380591605397730985163439985996762397144568705245⟩, + ⟨672628665770534931556504078722095502329230392735284550762,672628665770534931560404203150376417771728898046603184201⟩, + ⟨-3397655346253585618703614920615965311901317243759730249017,-3397655346253585618621928072781562029163122663833364673131⟩, + ⟨1865925715986950753459162362568331885254710320062132966429,1865925715986950753489388579603619693740104521777443645253⟩, + ⟨2982153527661529801203476280720711123489853986722876885336,2982153527661529801290055769922037319639187401149710605795⟩, + ⟨2759437897160340989770280775334115816058951264365305849442,2759437897160340989807440051573872230516601446132419390112⟩, + ⟨-12647150842163669727413565590140968940727171272846937469474,-12647150842163669727348238758428429766018521018490083805378⟩, + ⟨2320041213295313426546280395402434107941895285807786321407,2320041213295313426583129957798787165737845595188413256165⟩] +lemma tr1_0_1_15_calc (r : Fin 8) : taylorRowBox 1 0 1 15 r = tr1_0_1_15 r := by + revert r + decide +kernel +def tr1_0_1_16 : Fin 8 → RI := ![⟨31236005892843880607660196690214984415010717898490355385,31236005892843880609476848583776080386490203724485291979⟩, + ⟨-296307894639942384025931060928220422332853142411533149382,-296307894639942384024624587257186474149392674960037880710⟩, + ⟨1213653111697158044958859152015222159722356746451510246821,1213653111697158044986222821541124850943251890183639801950⟩, + ⟨-682506172704567610431517849746908229567157889135662433749,-682506172704567610421392594140909362783660093980342119482⟩, + ⟨-1110804826221918803378297071923190123473818174873699810773,-1110804826221918803349294452859851564989924167319619278494⟩, + ⟨-962405676830088347186361108972777465309898653844591065030,-962405676830088347173913399435654189433560895827049335300⟩, + ⟨4006542632383738726380982213560436527859315049194881356359,4006542632383738726402865562980169179576229465072582934800⟩, + ⟨-1496717426494292196822214288925620781353280161221022046994,-1496717426494292196809870328125073647211865061191883206796⟩] +lemma tr1_0_1_16_calc (r : Fin 8) : taylorRowBox 1 0 1 16 r = tr1_0_1_16 r := by + revert r + decide +kernel +def tr1_0_1_17 : Fin 8 → RI := ![⟨-11004789363001327059602672384746641989155518263249791362,-11004789363001327059094606817920389362527239935159795204⟩, + ⟨21260226403621408383468124684078928202547915766174641074,21260226403621408383833507996407589957055901542508704220⟩, + ⟨-458926951910809685476990551334792305647035994707129500434,-458926951910809685469337715743450198774317001899188244280⟩, + ⟨261477712639404151706029263047003234896687393697032000382,261477712639404151708861007393267436577955835536618199728⟩, + ⟨428280550748321172110841731018349688366687432667060454042,428280550748321172118952933910927062575902722327684039761⟩, + ⟨359839718380723864880047276133191151722506359764831473951,359839718380723864883528544407030816023200660827351794147⟩, + ⟨-1142558401292893132770128329916320132918446096519016966816,-1142558401292893132764008183086648576425659056013285513442⟩, + ⟨632116956750587119590912356509781374805599742242966897243,632116956750587119594364609229876005365446960944547908940⟩] +lemma tr1_0_1_17_calc (r : Fin 8) : taylorRowBox 1 0 1 17 r = tr1_0_1_17 r := by + revert r + decide +kernel +def tr1_0_1_18 : Fin 8 → RI := ![⟨3783133597090444474866184426038657550929059914997821976,3783133597090444475058286606560598895300302401632200093⟩, + ⟨35972790235800139492103722475577340386177329945868333198,35972790235800139492241875768395702045010279262955376930⟩, + ⟨163257036610423662499361541002985576398813590001838272955,163257036610423662502255117148001904327777195874662980963⟩, + ⟨-93567453959859511583104151074324702707748807761665679784,-93567453959859511582033454103073444590132183826940121743⟩, + ⟨-153533086515536151337107401188690637540354318696317548967,-153533086515536151334040514030694078090461795420841100538⟩, + ⟨-127429542814053072509409857665891644672180356136036991649,-127429542814053072508093572386879938928741229274417200920⟩, + ⟨306491685016967284793463059549828471233133992061218648767,306491685016967284795777118261657334080623095249246232203⟩, + ⟨-218441578931964302624297106552390797476224159429755994080,-218441578931964302622991792202147048317556742624260026653⟩] +lemma tr1_0_1_18_calc (r : Fin 8) : taylorRowBox 1 0 1 18 r = tr1_0_1_18 r := by + revert r + decide +kernel +def tr1_0_1_19 : Fin 8 → RI := ![⟨-1208675463892459183452690622551639693560246685351748613,-1208675463892459183392703534218114209535460317949388861⟩, + ⟨2665258523382955755452845673165672779819351329999991123,2665258523382955755495986327568168844323692651957601697⟩, + ⟨-52676868142278685152384568965439435194600828092601037492,-52676868142278685151481001877656970751011297469135444675⟩, + ⟨30266435310375780125619169656373417307982263617597266296,30266435310375780125953512523374585861839532717379686193⟩, + ⟨49704650812393018320855975772239064174221846435553162949,49704650812393018321813662094985754690099409933833108889⟩, + ⟨41016201389057928708402272071485580293116699947589370051,41016201389057928708813303956129700396325796890546314514⟩, + ⟨-79278832644249013986958873250681941198860663932004408686,-79278832644249013986236270082002148003538206751418770427⟩, + ⟨66498310829767730620428500585378363536431641630695331578,66498310829767730620836106615764620665472589086721307526⟩] +lemma tr1_0_1_19_calc (r : Fin 8) : taylorRowBox 1 0 1 19 r = tr1_0_1_19 r := by + revert r + decide +kernel +def tr1_0_1_20 : Fin 8 → RI := ![⟨366406548098593994515337050971056315803483538148495357,366406548098593994532677339366541332737842453665672852⟩, + ⟨-32874862262998706532434785664671778362535536683540431278,-32874862262998706532422315124599054583739105278199312500⟩, + ⟨15764020462268031006971058122768291865815018050195096658,15764020462268031007232249561160871298115372583320011825⟩, + ⟨-9060411689718810681469013580710136937341528975602509755,-9060411689718810681372366087093862345726450115903554701⟩, + ⟨-14897361727674445364295620744346248685313509113778812957,-14897361727674445364018785220399716231553765820090200469⟩, + ⟨-12245129204577846715982102387675542784935296809626328123,-12245129204577846715863286628860246211649579053378989963⟩, + ⟨20137764069810126754109346025523115202067428558012547737,20137764069810126754318226764503682720129792306171906175⟩, + ⟨-18747881640792904092921931332704173262690591279200821324,-18747881640792904092804105875343435125817813433631999678⟩] +lemma tr1_0_1_20_calc (r : Fin 8) : taylorRowBox 1 0 1 20 r = tr1_0_1_20 r := by + revert r + decide +kernel +def tr1_0_1 : Fin 21 → Fin 8 → RI := ![tr1_0_1_0,tr1_0_1_1,tr1_0_1_2,tr1_0_1_3,tr1_0_1_4,tr1_0_1_5,tr1_0_1_6,tr1_0_1_7,tr1_0_1_8,tr1_0_1_9,tr1_0_1_10,tr1_0_1_11,tr1_0_1_12,tr1_0_1_13,tr1_0_1_14,tr1_0_1_15,tr1_0_1_16,tr1_0_1_17,tr1_0_1_18,tr1_0_1_19,tr1_0_1_20] +lemma tr1_0_1_mem (l : Fin 21) (r : Fin 8) : (tr1_0_1 l r).Mem (taylorRow 1 (nearNode 0) (nearDisplacement 0 1) l.val r) := by + have he : taylorRowBox 1 0 1 l r = tr1_0_1 l r := by + fin_cases l + · exact tr1_0_1_0_calc r + · exact tr1_0_1_1_calc r + · exact tr1_0_1_2_calc r + · exact tr1_0_1_3_calc r + · exact tr1_0_1_4_calc r + · exact tr1_0_1_5_calc r + · exact tr1_0_1_6_calc r + · exact tr1_0_1_7_calc r + · exact tr1_0_1_8_calc r + · exact tr1_0_1_9_calc r + · exact tr1_0_1_10_calc r + · exact tr1_0_1_11_calc r + · exact tr1_0_1_12_calc r + · exact tr1_0_1_13_calc r + · exact tr1_0_1_14_calc r + · exact tr1_0_1_15_calc r + · exact tr1_0_1_16_calc r + · exact tr1_0_1_17_calc r + · exact tr1_0_1_18_calc r + · exact tr1_0_1_19_calc r + · exact tr1_0_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 0 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows11.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows11.lean new file mode 100644 index 0000000000000000000000000000000000000000..c916be3e916f1c1da79e8e05f539b15198eb49cf --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows11.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_1_0_0 : Fin 8 → RI := ![⟨-26648003543229076746733690503528086388752483009574850576580,-26648003543229076745322362930448771049231802689910862853140⟩, + ⟨15361991517777810404594272527701125590719206693703705676225,15361991517777810405609250863210114645660157480515109945821⟩, + ⟨-314271869427859622949421580600453425733341907840465361781097,-314271869427859622928163186827072320396361281065109507991880⟩, + ⟨213585000772797176853948913483664133784798278411487820901191,213585000772797176861815061354077846679831303344281033146563⟩, + ⟨328226630718745444905117275756307693380372408571991496452973,328226630718745444927648943007825017700948076341925150801376⟩, + ⟨187286378943957914874672514022443934712903458305327786618516,187286378943957914884342938916866323764022538849514016607015⟩, + ⟨229602882781737100756080264355605460012664823598479175540,229602882781737117756901682518511004878652338619312250760⟩, + ⟨30620974801986520234121834860368692264889175228362269882235,30620974801986520243711659030761166128625322911701549580656⟩] +lemma tr1_1_0_0_calc (r : Fin 8) : taylorRowBox 1 1 0 0 r = tr1_1_0_0 r := by + revert r + decide +kernel +def tr1_1_0_1 : Fin 8 → RI := ![⟨-48386716716704740350581107428597105045563345052719624566971,-48386716716704740349730561109942381919355091458010690573467⟩, + ⟨29790131082064340027948435553124940652489609574867263509038,29790131082064340028560119263665868448126497089402379605845⟩, + ⟨-462247870632195625600413469674636354502498303938850164906471,-462247870632195625587601951704250949717940642460467762991955⟩, + ⟨345990684422903472677968256119195138995336067740748258984018,345990684422903472682708844513870057635437761617361599099160⟩, + ⟨502451088791324018912552165512000124364602879254128893533565,502451088791324018926131030546974826436956878223000616750474⟩, + ⟨256183462879606176069573328486249143974726386316638447180170,256183462879606176075401276903326118544221111172572059312930⟩, + ⟨21963031795436013193704443231855038997270458069579902339574,21963031795436013203950105787629260356102640293683713783350⟩, + ⟨1971291053736421602065955298543945267979999776793649891211,1971291053736421607845329130652111459788922333710053187173⟩] +lemma tr1_1_0_1_calc (r : Fin 8) : taylorRowBox 1 1 0 1 r = tr1_1_0_1 r := by + revert r + decide +kernel +def tr1_1_0_2 : Fin 8 → RI := ![⟨-2255719611958169653554579503565788238190662912463622908503,-2255719611958169653116331271880228505558248531083302101071⟩, + ⟨4884744222042611750936659719686586479542402478382425907245,4884744222042611751251832801490791559221292653867940412000⟩, + ⟨218436873775696962049159937908192693757818482557843912590397,218436873775696962055761136423397075917586819069832168290289⟩, + ⟨-81907348196490731757369791405633409161400169682145049767979,-81907348196490731754927179597405914536693018337831311614934⟩, + ⟨-189925944914710255299401617581359431352122670093569344443799,-189925944914710255292405039664565334961736482355214265469072⟩, + ⟨-167033768343827381436383887583392479834907829897726668985595,-167033768343827381433381008101427302890726296425620080881009⟩, + ⟨26745182120306080791935836293562481021920600463644106209369,26745182120306080797214965011706317602908648343232404847459⟩, + ⟨-87057971708059559704498496525977157111721803015706319761650,-87057971708059559701520645341955625200163650895588037827238⟩] +lemma tr1_1_0_2_calc (r : Fin 8) : taylorRowBox 1 1 0 2 r = tr1_1_0_2 r := by + revert r + decide +kernel +def tr1_1_0_3 : Fin 8 → RI := ![⟨33235444020305572402024454827682111354568231167772967177698,33235444020305572402239647712000100742163295131745286086242⟩, + ⟨-18801000550978022173966251296340555033707609646285369160086,-18801000550978022173811491962196880728039723637284311101808⟩, + ⟨493425227724726540198125082851256086028301779178438622775527,493425227724726540201366467175971715350166286546170162295945⟩, + ⟨-317112731905674515575013424690709240399888114218269836170771,-317112731905674515573814029821828852415330417068864483364464⟩, + ⟨-510771117484767843307852680025925592745695354337378815430706,-510771117484767843304417152683909681011409660118331035736870⟩, + ⟨-295566504449929051670281546130782403028701769080714616932612,-295566504449929051668807043210865167807380555270357689872645⟩, + ⟨-25893776724260184970036907311162438730588015643491195771355,-25893776724260184967444698482431853468464072691995102221422⟩, + ⟨-18729346425412779847254846802369165907569714346824407012215,-18729346425412779845792633520075074338399489480212876534598⟩] +lemma tr1_1_0_3_calc (r : Fin 8) : taylorRowBox 1 1 0 3 r = tr1_1_0_3 r := by + revert r + decide +kernel +def tr1_1_0_4 : Fin 8 → RI := ![⟨9375894266103256497080694505891839427057216079252872823018,9375894266103256497180038966725134944400090485407685629219⟩, + ⟨-7694058959220172733360318433358244652756702413612701651872,-7694058959220172733288873307944344373012774959147256730637⟩, + ⟨-14932980133309347496401353292163690876660905789558692679158,-14932980133309347494904958189999241102633476749039611452922⟩, + ⟨-30743394432872251933650502545870210485166422236823036521595,-30743394432872251933096798193740172332387477261837184373283⟩, + ⟨-12608638415784722067821553900954908712462110618083036909073,-12608638415784722066235532073965003580783129424266401914304⟩, + ⟨40949153422932877373227629165738935282964104448075864314636,40949153422932877373908338001004712203612977172731714584403⟩, + ⟨-35884817535601895241139227918567447457400423726305595669024,-35884817535601895239942526692879541841823554710885783893921⟩, + ⟨76476208722530591911861781702149705649867481586067313055223,76476208722530591912536816987830692480787581902641392425081⟩] +lemma tr1_1_0_4_calc (r : Fin 8) : taylorRowBox 1 1 0 4 r = tr1_1_0_4 r := by + revert r + decide +kernel +def tr1_1_0_5 : Fin 8 → RI := ![⟨-8072485834459157400913536237929253013155708690529011950632,-8072485834459157400862960132112364105502734289050922335406⟩, + ⟨4118670084136876036688528369902931120760122893022578285759,4118670084136876036724900968766789268771463412595106279018⟩, + ⟨-200711769595831922585484458320007580303168276954470089825265,-200711769595831922584722645971361482080757040830081314622718⟩, + ⟨111189673659269367390075868791789786276791455789170149511666,111189673659269367390357758790171090076704488991340312891683⟩, + ⟨197485678106349915981756643814344216801176591173940101883391,197485678106349915982564084984991299048115991851004292976760⟩, + ⟨132891561053307856505665250957372714144982065607693374624238,132891561053307856506011798734613723927937461169044042573837⟩, + ⟨10474400245572234929442711981473619143861738122472917647575,10474400245572234930051950657863628848453930908753725782966⟩, + ⟨21668679179896230881722547615885111500223121313410190716076,21668679179896230882066206998123043658605513014244886119164⟩] +lemma tr1_1_0_5_calc (r : Fin 8) : taylorRowBox 1 1 0 5 r = tr1_1_0_5 r := by + revert r + decide +kernel +def tr1_1_0_6 : Fin 8 → RI := ![⟨-3319970099386514659134974980797334567018084049877170034365,-3319970099386514659116127874641263542742318654553857725821⟩, + ⟨2523494779421107709160642211728099457463102040929385404233,2523494779421107709174196403393137287165525748549966867374⟩, + ⟨-34194110389320039243703834762223962132872412068679590065015,-34194110389320039243419946590633870691295212179915107383659⟩, + ⟨28672229108749645971137815191937404789798958990204192076723,28672229108749645971242861055762917075737030827054413966280⟩, + ⟨42284587775183800929197603976153321758639938553327320373620,42284587775183800929498495656405704146501842808081974260350⟩, + ⟨11937436118690956413884113166822073637431438345881659068756,11937436118690956414013253650104159212228768883592455422953⟩, + ⟨19300292127056281501036495459906705251113627923666715454088,19300292127056281501263527292856988207411130733357770350703⟩, + ⟨-29026835311002828516229054836251142137127847881548852171352,-29026835311002828516100990708860405885716843725567576329827⟩] +lemma tr1_1_0_6_calc (r : Fin 8) : taylorRowBox 1 1 0 6 r = tr1_1_0_6 r := by + revert r + decide +kernel +def tr1_1_0_7 : Fin 8 → RI := ![⟨955267476800817156513938873278155260896952055950908581716,955267476800817156523478095659219214682869116056858018224⟩, + ⟨-480735990958046598762293430094998624184535770856649481776,-480735990958046598755433148869927570685888704702737481988⟩, + ⟨39712850485278358587893978465064691646846005253248415263655,39712850485278358588037664842039353012179406229515136499173⟩, + ⟨-19027342332569211700743430935093205797989685204860556053966,-19027342332569211700690263311018238896521667879160926296883⟩, + ⟨-36475263592064577225870051140870488907011051341147460507843,-36475263592064577225717758654891374651230042417588653389411⟩, + ⟨-30211584047499726056364483040438418800095726933003634524169,-30211584047499726056299120232078465899236743528986782508459⟩, + ⟨-48813520541142168024907045186708987569324250844937863271,-48813520541142167909997778764194292257791817968092456137⟩, + ⟨-12047807007745029104942165250081413085916776540105522453135,-12047807007745029104877347225489146785913864305270882292479⟩] +lemma tr1_1_0_7_calc (r : Fin 8) : taylorRowBox 1 1 0 7 r = tr1_1_0_7 r := by + revert r + decide +kernel +def tr1_1_0_8 : Fin 8 → RI := ![⟨589460730530618667764651598126170736985408537316835633551,589460730530618667768459010440193684048118910269537731680⟩, + ⟨-468823734351863977230630101234220285589445894600867410565,-468823734351863977227891941018380381792486571969752324877⟩, + ⟨14031102463892103883514939947951168471848876364671975470662,14031102463892103883572289830280133814342401100675921131133⟩, + ⟨-8383665843804311664231110376051599044004623598700605264166,-8383665843804311664209889456931522983908524606172678722727⟩, + ⟨-14793048951674466359356289582995981646197218377002280327307,-14793048951674466359295504724091729655252834264723423848840⟩, + ⟨-8308665096273440567852048812659995426469048617584182172921,-8308665096273440567825960400888216435916058718111493305817⟩, + ⟨-5479675924540857654172726667697867309507730545363939690407,-5479675924540857654126862661337021490697276472249963404232⟩, + ⟨5045741773741813461423562446617932958841486333889999341710,5045741773741813461449433417556617641487412598702554035725⟩] +lemma tr1_1_0_8_calc (r : Fin 8) : taylorRowBox 1 1 0 8 r = tr1_1_0_8 r := by + revert r + decide +kernel +def tr1_1_0_9 : Fin 8 → RI := ![⟨-55363120201177209081800155803225671318916104666578905046,-55363120201177209080502655749702685028023422575568674028⟩, + ⟨47395649858951901920649638947788173826605235022193718906,47395649858951901921582756439043568112015306799049040587⟩, + ⟨-3231304710867963161428921494171214782730226468406284563369,-3231304710867963161409377649361433247041604607493830725396⟩, + ⟨1270950176374123427338513998274578942907806439259599068039,1270950176374123427345745719302732689036832245334775857649⟩, + ⟨2487097269152001867089187930431741712896757834805479386772,2487097269152001867109902355657822566869537380482505599748⟩, + ⟨3142465229772632820441934774413389923981417040070231681763,3142465229772632820450825252480814755698754145912897629086⟩, + ⟨-1142079335373363619482271853764843457306799486554440516710,-1142079335373363619466642196191658014870227149055995660631⟩, + ⟨3469086257657810154279196636846719841996351239150682610078,3469086257657810154288013014850697019985363105540711053884⟩] +lemma tr1_1_0_9_calc (r : Fin 8) : taylorRowBox 1 1 0 9 r = tr1_1_0_9 r := by + revert r + decide +kernel +def tr1_1_0_10 : Fin 8 → RI := ![⟨-75649843525545832867760243682417592594990696120139133504,-75649843525545832867247376767006896342755482822699936946⟩, + ⟨73133026339279021475085434288585981968610633271857358924,73133026339279021475454270565856423516709561507411960149⟩, + ⟨-2399027852982192810850413051946824522235366901930208854872,-2399027852982192810842687895115185477653917979873723969529⟩, + ⟨1256764220706783065128429271301324134074179915926787175795,1256764220706783065131287776352042634189876387925093911798⟩, + ⟨2314243955589227289655026329932066301221899588591047465211,2314243955589227289663214185755336288308198593270964161254⟩, + ⟨1751014058530244127694508699573495849262588884418323299621,1751014058530244127698022866720677649906367957899839189580⟩, + ⟨786747702800103903629459360082928803150694310498517721728,786747702800103903635637343850846671778076280946541953549⟩, + ⟨-128940809883235537858978333504668378091380706969352841118,-128940809883235537855493456120694148113506571840497784646⟩] +lemma tr1_1_0_10_calc (r : Fin 8) : taylorRowBox 1 1 0 10 r = tr1_1_0_10 r := by + revert r + decide +kernel +def tr1_1_0_11 : Fin 8 → RI := ![⟨-5839064254546101725046723791704368798929064024804359781,-5839064254546101724878626472456567042278571609617759995⟩, + ⟨-2806381446851482360349500527078978595967973050018491034,-2806381446851482360228610706363976793137289335332945071⟩, + ⟨-139200380651542375467025708436695467474196014229343004923,-139200380651542375464493710144134911436035763902521481483⟩, + ⟨101144057503075996603222248624994644667450620891510481982,101144057503075996604159152569453527824537661840230685103⟩, + ⟨205985181619973622028234068005087460024049670083345440615,205985181619973622030917720572227665699216865266642296465⟩, + ⟨18967534924793990143559929722808920225804176310810148174,18967534924793990144711733551315898941804784672811889842⟩, + ⟨357848387442604860451502755373684016005825160129093583846,357848387442604860453527652045006463425892134072614833928⟩, + ⟨-517570738089885149491012797642537577151718550176417635725,-517570738089885149489870593829861721575084007416927838379⟩] +lemma tr1_1_0_11_calc (r : Fin 8) : taylorRowBox 1 1 0 11 r = tr1_1_0_11 r := by + revert r + decide +kernel +def tr1_1_0_12 : Fin 8 → RI := ![⟨5860457186362860371245310357732132683089088078788283682,5860457186362860371298216971084724695706075846108383064⟩, + ⟨-9988946994863042920638565404175983088390404247740322730,-9988946994863042920600516784294892715561408106705836899⟩, + ⟨185175344702708582124223801587531660420620306233833815289,185175344702708582125020717655383869298368478385279142262⟩, + ⟨-92186494911395883268091196774357589824856248633983501286,-92186494911395883267796317504678881058661064662122456556⟩, + ⟨-159615545694174159717118948266466751379487784670063592931,-159615545694174159716274300836223145481752407286306000256⟩, + ⟨-159132326843882606797757655073804634403786908301230038397,-159132326843882606797395138645367883357156073317194701709⟩, + ⟨-24061166693486691772857451762531433972165067904980996211,-24061166693486691772220139842540973842224021467835460818⟩, + ⟨-97120334196794690458243492762784156170967807992848135147,-97120334196794690457883997824024622870392190418344640593⟩] +lemma tr1_1_0_12_calc (r : Fin 8) : taylorRowBox 1 1 0 12 r = tr1_1_0_12 r := by + revert r + decide +kernel +def tr1_1_0_13 : Fin 8 → RI := ![⟨1583594975975357578213494423775081824356166717937444704,1583594975975357578228772719502931340193852988838306275⟩, + ⟨-23489640645330853818353870329773574274228679299933382,-23489640645330853807366244591703962305136527488347564⟩, + ⟨47350903831490030377123387781082180922937485340474206603,47350903831490030377353520057244225643618922364696764522⟩, + ⟨-25232232100054861736206043956006420919305227063378626753,-25232232100054861736120889144526635519864715978427500953⟩, + ⟨-46651733807311864854837472135503109232479829229126274542,-46651733807311864854593556065147032868061595614233920656⟩, + ⟨-34933633748836741300156948590566361641894154020141713797,-34933633748836741300052261617640866853694157943883059753⟩, + ⟨-47099101717928144283202927081579090662560480745174315645,-47099101717928144283018885061732167576405834891838516151⟩, + ⟨31675680047938266555513249302124482699623423984527178121,31675680047938266555617063733610887949282151975500875743⟩] +lemma tr1_1_0_13_calc (r : Fin 8) : taylorRowBox 1 1 0 13 r = tr1_1_0_13 r := by + revert r + decide +kernel +def tr1_1_0_14 : Fin 8 → RI := ![⟨-62830032672481410858206204016955383132895426400080735,-62830032672481410853616605111257195677736161385336305⟩, + ⟨1377709200232783559449473607889663755187328519817495741,1377709200232783559452774289848149851890162921471178736⟩, + ⟨-2371929989003892814092278376562630927934096178370727843,-2371929989003892814023146657839809524487012891480346736⟩, + ⟨1036618697428251942990390473377736530926833475849913651,1036618697428251943015970972441414795379397115011175760⟩, + ⟨655626937051563921632320878332990882147432598831382509,655626937051563921705593247808505080208748016531732952⟩, + ⟨3201319845737782144898980102441421982468722551781790098,3201319845737782144930428061354832359970737057759930899⟩, + ⟨-8710808775479021317990825170123866976042691379697798106,-8710808775479021317935538960982444810520318512203632749⟩, + ⟨15550790842226279672860453870923203860602389012580724115,15550790842226279672891639718457724730650037384420703024⟩] +lemma tr1_1_0_14_calc (r : Fin 8) : taylorRowBox 1 1 0 14 r = tr1_1_0_14 r := by + revert r + decide +kernel +def tr1_1_0_15 : Fin 8 → RI := ![⟨-96748938392436606397234867187764018862565265934952090,-96748938392436606395980400210448160987117829476749141⟩, + ⟨106689391098715362896500972655818078768597958944938643,106689391098715362897403142236375017174394488123763438⟩, + ⟨-2943495137626310166487846776258167638385124023966773726,-2943495137626310166468951125460941178326805343112362117⟩, + ⟨1526897971726891219157227933277291212971826800351205238,1526897971726891219164219805986911772117767046452937113⟩, + ⟨2467204848638732840428461007716223428230775061485792670,2467204848638732840448488415282803466890164601713369567⟩, + ⟨2550029522808253786856335663928081944631865839019436543,2550029522808253786864931279093185065206957645602127557⟩, + ⟨2039638344324048341769696557086115772942276714772036015,2039638344324048341784807839160522437010699969802740646⟩, + ⟨1010676501515337103662288253243345121755624009844202456,1010676501515337103670812225968709732336730204683802095⟩] +lemma tr1_1_0_15_calc (r : Fin 8) : taylorRowBox 1 1 0 15 r = tr1_1_0_15 r := by + revert r + decide +kernel +def tr1_1_0_16 : Fin 8 → RI := ![⟨-15975963377565849024483247226858103691238845916534086,-15975963377565849024175291580478720523114461720622641⟩, + ⟨-181576987253378463605900945542513289774537525076894751,-181576987253378463605679474414650427767080434142612547⟩, + ⟨-443908302780557602200279984708891669478279523595246343,-443908302780557602195641343389392984567232071687783391⟩, + ⟨233012694419431412203649518304504898789857143124961654,233012694419431412205365933896556629714585523066668865⟩, + ⟨416031420800375536566878364188475798066098786439558951,416031420800375536571794837362867406037167658599706734⟩, + ⟨355612828529629324719866069470180335768534822550459245,355612828529629324721976183384473351722282434926228778⟩, + ⟨1152010857458213350202418390152530244105957721511132472,1152010857458213350206128017207860619453039543567437511⟩, + ⟨-804829989224573999027677424960430283276330815963214358,-804829989224573999025584898351214177930214140728895103⟩] +lemma tr1_1_0_16_calc (r : Fin 8) : taylorRowBox 1 1 0 16 r = tr1_1_0_16 r := by + revert r + decide +kernel +def tr1_1_0_17 : Fin 8 → RI := ![⟨325656132949743494476775500640479068750459153045487,325656132949743494556390580964785545979980653974801⟩, + ⟨-40129877657002328116886163063521890119233374562318993,-40129877657002328116828906631168803930928428642826385⟩, + ⟨18656809185809891862253080568476632755080835276394108,18656809185809891863452298071339241885541730541594215⟩, + ⟨-9494909522902942243810753130679023207196008860491104,-9494909522902942243367012069805687462712656211591023⟩, + ⟨-4815690572100227619473529752045859881026369784391334,-4815690572100227618202485004921205719712809293237492⟩, + ⟨-21106197838826844617318138996729491071943236668597807,-21106197838826844616772615994501423095774081064274941⟩, + ⟨138568410353281577950081246114151702919854670872797556,138568410353281577951040287649726036768811580129867775⟩, + ⟨-230423256756172650930287555495994326584887751339032926,-230423256756172650929746579300122015143735575037777397⟩] +lemma tr1_1_0_17_calc (r : Fin 8) : taylorRowBox 1 1 0 17 r = tr1_1_0_17 r := by + revert r + decide +kernel +def tr1_1_0_18 : Fin 8 → RI := ![⟨434921954559534435837647731735767020899344609316886,434921954559534435857206853010572277337230595010733⟩, + ⟨15982914023650491125005298674428856418831727537026352,15982914023650491125019364922928617311913332276567111⟩, + ⟨11832438813233998460295416305953713051877548057143609,11832438813233998460590029342550048543759413724584228⟩, + ⟨-5820024768367967310526894310675461665615201522413895,-5820024768367967310417879973332632230139336209694514⟩, + ⟨-7631999803329993107691389342964763015506832851432447,-7631999803329993107379130431048448917404220349169706⟩, + ⟨-11124796521434496677187751365155465007086906337401262,-11124796521434496677053732150268258079862271307987433⟩, + ⟨-34711230986996998218427619554104495758244049058467586,-34711230986996998218192010802272420818993433617946464⟩, + ⟨-8553479969667326599776800216105132793055509274361801,-8553479969667326599643898019952938860012150404837517⟩] +lemma tr1_1_0_18_calc (r : Fin 8) : taylorRowBox 1 1 0 18 r = tr1_1_0_18 r := by + revert r + decide +kernel +def tr1_1_0_19 : Fin 8 → RI := ![⟨56979176545805685613399333996812963759212360900793,56979176545805685617450045265888615669000277972215⟩, + ⟨7266656976376532209271646514514342500746311005378749,7266656976376532209274559646986466616098525986381752⟩, + ⟨892574838943274483529111461943360254607323470796683,892574838943274483590126081699918799288670634533460⟩, + ⟨-326673138338840456321848385488811058409202491158864,-326673138338840456299271420063941554049239094263856⟩, + ⟨-297192691767790153510371927645756596317528087741612,-297192691767790153445702831545412235229718636186820⟩, + ⟨-989784303997075537658545083739704355906399792900774,-989784303997075537630789586118990732307102506012745⟩, + ⟨-15304071622134481166345759199785322920703146023543641,-15304071622134481166296964419450531742477971139822287⟩, + ⟨8001918804336485085597197642461669151941724822535241,8001918804336485085624721804517649920670188018341529⟩] +lemma tr1_1_0_19_calc (r : Fin 8) : taylorRowBox 1 1 0 19 r = tr1_1_0_19 r := by + revert r + decide +kernel +def tr1_1_0_20 : Fin 8 → RI := ![⟨8394323905320048404489589750718598625305606332998,8394323905320048405564250555472664129975782748585⟩, + ⟨-467004372238273857246034496905776030259610638305850,-467004372238273857245261637751182157609932797806003⟩, + ⟨186732333856449293260222709542126908642145390113719,186732333856449293276409995184794341870273271882588⟩, + ⟨-87195669346932167307618329637420002368144103570809,-87195669346932167301628621109777020806459385536912⟩, + ⟨-121698373644122022164755783299141917183685516780331,-121698373644122022147598958672918309707315759700129⟩, + ⟨-174923045325043265125756244192534499003660467906377,-174923045325043265118392661990519018723181419651582⟩, + ⟨-1980151548520800020070273428572711440062344768509681,-1980151548520800020057328087761919925320601225522244⟩, + ⟨1809406964948298643972814548711740555786143284318881,1809406964948298643980116757183511425686391989228322⟩] +lemma tr1_1_0_20_calc (r : Fin 8) : taylorRowBox 1 1 0 20 r = tr1_1_0_20 r := by + revert r + decide +kernel +def tr1_1_0 : Fin 21 → Fin 8 → RI := ![tr1_1_0_0,tr1_1_0_1,tr1_1_0_2,tr1_1_0_3,tr1_1_0_4,tr1_1_0_5,tr1_1_0_6,tr1_1_0_7,tr1_1_0_8,tr1_1_0_9,tr1_1_0_10,tr1_1_0_11,tr1_1_0_12,tr1_1_0_13,tr1_1_0_14,tr1_1_0_15,tr1_1_0_16,tr1_1_0_17,tr1_1_0_18,tr1_1_0_19,tr1_1_0_20] +lemma tr1_1_0_mem (l : Fin 21) (r : Fin 8) : (tr1_1_0 l r).Mem (taylorRow 1 (nearNode 1) (nearDisplacement 1 0) l.val r) := by + have he : taylorRowBox 1 1 0 l r = tr1_1_0 l r := by + fin_cases l + · exact tr1_1_0_0_calc r + · exact tr1_1_0_1_calc r + · exact tr1_1_0_2_calc r + · exact tr1_1_0_3_calc r + · exact tr1_1_0_4_calc r + · exact tr1_1_0_5_calc r + · exact tr1_1_0_6_calc r + · exact tr1_1_0_7_calc r + · exact tr1_1_0_8_calc r + · exact tr1_1_0_9_calc r + · exact tr1_1_0_10_calc r + · exact tr1_1_0_11_calc r + · exact tr1_1_0_12_calc r + · exact tr1_1_0_13_calc r + · exact tr1_1_0_14_calc r + · exact tr1_1_0_15_calc r + · exact tr1_1_0_16_calc r + · exact tr1_1_0_17_calc r + · exact tr1_1_0_18_calc r + · exact tr1_1_0_19_calc r + · exact tr1_1_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 1 0 l r +def tr1_1_1_0 : Fin 8 → RI := ![⟨-26648003543229076746733690503528086388752483009574850576580,-26648003543229076745322362930448771049231802689910862853140⟩, + ⟨15361991517777810404594272527701125590719206693703705676225,15361991517777810405609250863210114645660157480515109945821⟩, + ⟨-314271869427859622949421580600453425733341907840465361781097,-314271869427859622928163186827072320396361281065109507991880⟩, + ⟨213585000772797176853948913483664133784798278411487820901191,213585000772797176861815061354077846679831303344281033146563⟩, + ⟨328226630718745444905117275756307693380372408571991496452973,328226630718745444927648943007825017700948076341925150801376⟩, + ⟨187286378943957914874672514022443934712903458305327786618516,187286378943957914884342938916866323764022538849514016607015⟩, + ⟨229602882781737100756080264355605460012664823598479175540,229602882781737117756901682518511004878652338619312250760⟩, + ⟨30620974801986520234121834860368692264889175228362269882235,30620974801986520243711659030761166128625322911701549580656⟩] +lemma tr1_1_1_0_calc (r : Fin 8) : taylorRowBox 1 1 1 0 r = tr1_1_1_0 r := by + revert r + decide +kernel +def tr1_1_1_1 : Fin 8 → RI := ![⟨24193358358352370174865280554971190959677545729005345286734,24193358358352370175290553714298552522781672526359812283486⟩, + ⟨-14895065541032170014280059631832934224063248544701189802923,-14895065541032170013974217776562470326244804787433631754519⟩, + ⟨231123935316097812793800975852125474858970321230233881495978,231123935316097812800206734837318177251249151969425082453237⟩, + ⟨-172995342211451736341354422256935028817718880808680799549581,-172995342211451736338984128059597569497668033870374129492009⟩, + ⟨-251225544395662009463065515273487413218478439111500308375238,-251225544395662009456276082756000062182301439627064446766783⟩, + ⟨-128091731439803088037700638451663059272110555586286029656466,-128091731439803088034786664243124571987363193158319223590085⟩, + ⟨-10981515897718006601975052893814630178051320146841856891675,-10981515897718006596852221615927519498635229034789951169787⟩, + ⟨-985645526868210803922664565326055729894461166855026593587,-985645526868210801032977649271972633989999888396824945605⟩] +lemma tr1_1_1_1_calc (r : Fin 8) : taylorRowBox 1 1 1 1 r = tr1_1_1_1 r := by + revert r + decide +kernel +def tr1_1_1_2 : Fin 8 → RI := ![⟨-563929902989542413388644875891447059547665728115905727126,-563929902989542413279082817970057126389562132770825525267⟩, + ⟨1221186055510652937734164929921646619885600619595606476811,1221186055510652937812958200372697889805323163466985103000⟩, + ⟨54609218443924240512289984477048173439454620639460978147599,54609218443924240513940284105849268979396704767458042072573⟩, + ⟨-20476837049122682939342447851408352290350042420536262441995,-20476837049122682938731794899351478634173254584457827903733⟩, + ⟨-47481486228677563824850404395339857838030667523392336110950,-47481486228677563823101259916141333740434120588803566367268⟩, + ⟨-41758442085956845359095971895848119958726957474431667246399,-41758442085956845358345252025356825722681574106405020220252⟩, + ⟨6686295530076520197983959073390620255480150115911026552342,6686295530076520199303741252926579400727162085808101211865⟩, + ⟨-21764492927014889926124624131494289277930450753926579940413,-21764492927014889925380161335488906300040912723897009456809⟩] +lemma tr1_1_1_2_calc (r : Fin 8) : taylorRowBox 1 1 1 2 r = tr1_1_1_2 r := by + revert r + decide +kernel +def tr1_1_1_3 : Fin 8 → RI := ![⟨-4154430502538196550279955964000012592770411891468160760781,-4154430502538196550253056853460263919321028895971620897212⟩, + ⟨2350125068872252771726436495274610091004965454660538887726,2350125068872252771745781412042569379213451205785671145011⟩, + ⟨-61678153465590817525170808396996464418770785818271270286994,-61678153465590817524765635356407010753537722397304827846941⟩, + ⟨39639091488209314446726753727728606551916302133608060420558,39639091488209314446876678086338655049986014277283729521347⟩, + ⟨63846389685595980413052144085488710126426207514791379467109,63846389685595980413481585003240699093211919292172351928840⟩, + ⟨36945813056241131458600880401358145975922569408794711234080,36945813056241131458785193266347800378587721135089327116577⟩, + ⟨3236722090532523120930587310303981683558009086499387777677,3236722090532523121254613413895304841323501955436399471420⟩, + ⟨2341168303176597480724079190009384292299936185026609566824,2341168303176597480906855850296145738446214293353050876527⟩] +lemma tr1_1_1_3_calc (r : Fin 8) : taylorRowBox 1 1 1 3 r = tr1_1_1_3 r := by + revert r + decide +kernel +def tr1_1_1_4 : Fin 8 → RI := ![⟨585993391631453531067543406618239964191076004953304551438,585993391631453531073752435420320934025005655337980351827⟩, + ⟨-480878684951260795835019902084890290797293900850793853242,-480878684951260795830554581746521523313298434946703545664⟩, + ⟨-933311258331834218525084580760230679791306611847418292448,-933311258331834218431559886874952568914592296814975715807⟩, + ⟨-1921462152054515745853156409116888155322901389801439782600,-1921462152054515745818549887108760770774217328864824023330⟩, + ⟨-788039900986545129238847118809681794528881913630189806818,-788039900986545129139720754622812723798945589016650119644⟩, + ⟨2559322088933304835826726822858683455185256528004741519664,2559322088933304835869271125062794512725811073295732161526⟩, + ⟨-2242801095975118452571201744910465466087526482894099729315,-2242801095975118452496407918304971365113972169430361493370⟩, + ⟨4779763045158161994491361356384356603116717599129207065951,4779763045158161994533551061739418280049223868915087026568⟩] +lemma tr1_1_1_4_calc (r : Fin 8) : taylorRowBox 1 1 1 4 r = tr1_1_1_4 r := by + revert r + decide +kernel +def tr1_1_1_5 : Fin 8 → RI := ![⟨252265182326848668776967504128511378296960446532841322981,252265182326848668778548007435289156661115896579031623458⟩, + ⟨-128708440129277376147653155273962164649108231643597071220,-128708440129277376146516511559466597523753840406955571429⟩, + ⟨6272242799869747580772582686605046315023657525940041081960,6272242799869747580796389322500236884474008654827190307040⟩, + ⟨-3474677301852167730948679962192846564897015280979384777866,-3474677301852167730939870899743430821149732993411567172239⟩, + ⟨-6171427440823434874455127655780978095253624745343884155525,-6171427440823434874429895119198256775036768474185628183856⟩, + ⟨-4152861282915870515812868710456678872748045661532626330433,-4152861282915870515802039092417897317030689550240417957007⟩, + ⟨-327325007674132341564123458058238401514185340898553930718,-327325007674132341545084749421050598245679316327278676486⟩, + ⟨-677146224371757215064568968691345114331422281695152691224,-677146224371757215053829612996409734381972541044068459877⟩] +lemma tr1_1_1_5_calc (r : Fin 8) : taylorRowBox 1 1 1 5 r = tr1_1_1_5 r := by + revert r + decide +kernel +def tr1_1_1_6 : Fin 8 → RI := ![⟨-51874532802914291548983984074958352609657563279330781787,-51874532802914291548689498041269742855348728977404026965⟩, + ⟨39429605928454807955635034558251554022860969389521646941,39429605928454807955846818803017770111961339821093232303⟩, + ⟨-534282974833125613182872418159749408326131438573118594766,-534282974833125613178436665478654229551487690311173552869⟩, + ⟨448003579824213218299028362374021949840608734221940501198,448003579824213218300669703996295579308391106672725218224⟩, + ⟨660696683987246889518712562127395652478749039895739380837,660696683987246889523413994631339127289091293876280847819⟩, + ⟨186522439354546193966939268231594900584866224154400922949,186522439354546193968957088282877487691074513806132115984⟩, + ⟨301567064485254398453695241561042269548650436307292428970,301567064485254398457242613950890440740798917708715161730⟩, + ⟨-453544301734419195566078981816424095892622623149200815178,-453544301734419195564077979825943841964325683211993380153⟩] +lemma tr1_1_1_6_calc (r : Fin 8) : taylorRowBox 1 1 1 6 r = tr1_1_1_6 r := by + revert r + decide +kernel +def tr1_1_1_7 : Fin 8 → RI := ![⟨-7463027162506384035339672622337650114709914969194203268,-7463027162506384035265147447485587975757437937116473294⟩, + ⟨3755749929359739052776821475546309145983505505490136578,3755749929359739052830417422617176751441685709817574077⟩, + ⟨-310256644416237176469044256578432445407651611168087003900,-310256644416237176467921706758317903490984416041003244247⟩, + ⟨148651111973196966411642682117329991379075530305944736694,148651111973196966412058054180415670296794415662973094172⟩, + ⟨284962996813004509575919989491338864462734706387411354604,284962996813004509577109774538050694586023838602714535218⟩, + ⟨236028000371091609814836876813113014837787058820209238347,236028000371091609815347523753425146875747866664090894721⟩, + ⟨381355629227673186796857646595267908263998577875722313,381355629227673187694586290521163965385345709726077057⟩, + ⟨94123492248008039881854275199133959264952064884928767910,94123492248008039882360666016261039733724816719574394166⟩] +lemma tr1_1_1_7_calc (r : Fin 8) : taylorRowBox 1 1 1 7 r = tr1_1_1_7 r := by + revert r + decide +kernel +def tr1_1_1_8 : Fin 8 → RI := ![⟨2302580978635229170955670305180354441349252098893889193,2302580978635229170970543009532006578312964493240381765⟩, + ⟨-1831342712311968661057148832946172990583773025784638323,-1831342712311968661046452894603048366376900671756845019⟩, + ⟨54808993999578530794980234171684251843159673299499904182,54808993999578530795204257149531772712275004299515316919⟩, + ⟨-32748694702360592438402774906451558765643060932424239314,-32748694702360592438319880691138761655892674242862026260⟩, + ⟨-57785347467478384216235506183578053305457884285165157529,-57785347467478384215998065328483318965831383846575874409⟩, + ⟨-32455723032318127218172065674453107134644721162438211613,-32455723032318127218070157815969595452797104367623020725⟩, + ⟨-21404984080237725211612213545694794177764572442827889416,-21404984080237725211433057270847740198036236219726419547⟩, + ⟨19709928803678958833685790807101300620474555991757809928,19709928803678958833786849287330537662060205463681851703⟩] +lemma tr1_1_1_8_calc (r : Fin 8) : taylorRowBox 1 1 1 8 r = tr1_1_1_8 r := by + revert r + decide +kernel +def tr1_1_1_9 : Fin 8 → RI := ![⟨108131094142924236485356749511138056695358247217907566,108131094142924236487890929303175139294758016926911924⟩, + ⟨-92569628630765433440591321170006968968779896091892658,-92569628630765433438768826069898777005088349652722107⟩, + ⟨6311142013413990549627690721409049310628133999011388135,6311142013413990549665862293303153872519973571106024538⟩, + ⟨-2482324563230709819034659608013149783275062979169484097,-2482324563230709819020535152880036997866809451678904429⟩, + ⟨-4857611853812503646699028038394184700917065196254893750,-4857611853812503646658570176624495533001480146104451927⟩, + ⟨-6137627401899673477443018071251591319724129191236128182,-6137627401899673477425653856276152195276205156387171253⟩, + ⟨2230623701901100819270785539436832060293412400499991524,2230623701901100819301312214384459877552342747176641635⟩, + ⟨-6775559096987910457593775419630267617158912315509201278,-6775559096987910457576555931341249691399123513966176972⟩] +lemma tr1_1_1_9_calc (r : Fin 8) : taylorRowBox 1 1 1 9 r = tr1_1_1_9 r := by + revert r + decide +kernel +def tr1_1_1_10 : Fin 8 → RI := ![⟨-73876800317915852409922112971110930268545601679823373,-73876800317915852409421266374030172209722151194042907⟩, + ⟨71418971034452169409263119422447248016221321554548202,71418971034452169409623311099469163590536681159581993⟩, + ⟨-2342800637677922666846106496041820822495475490166219585,-2342800637677922666838562397573423318021404277220433563⟩, + ⟨1227308809283967837039481710255199349681816324147253101,1227308809283967837042273219093791634951051160083099524⟩, + ⟨2260003862880104775053736650324283497287011316983444790,2260003862880104775061732603276695594050975188741175939⟩, + ⟨1709974666533441530951668651927242040295496957439768847,1709974666533441530955100455781911767486687458886561709⟩, + ⟨768308303515726468388143906330985159326849912596208712,768308303515726468394177093604342452908277618111857377⟩, + ⟨-125918759651597204940408528813152712979863971649758634,-125918759651597204937005328242865379017096261562986117⟩] +lemma tr1_1_1_10_calc (r : Fin 8) : taylorRowBox 1 1 1 10 r = tr1_1_1_10 r := by + revert r + decide +kernel +def tr1_1_1_11 : Fin 8 → RI := ![⟨2851105593040088732850891832254183126112583793758671,2851105593040088732932970601418148827602082043361504⟩, + ⟨1370303440845450371205376321466785543524067058268039,1370303440845450371264404554237782517562486840829342⟩, + ⟨67968935865010925519772319406315874724626837843028067,67968935865010925521008646697605208727634772572921390⟩, + ⟨-49386746827673826466874586215553480383075030195425140,-49386746827673826466417113586423166341528623482182852⟩, + ⟨-100578701962877745132284043248158039892195734993477684,-100578701962877745130973666018109111339868002970383515⟩, + ⟨-9261491662497065500347526148103466280178117516021431,-9261491662497065499785121934965293079005945464262767⟩, + ⟨-174730657930959404518324048850100812219673893590143962,-174730657930959404517335329772306648440344316469283976⟩, + ⟨252720086957951733149350875893487168737833987996546796,252720086957951733149908592598895301343612573328328924⟩] +lemma tr1_1_1_11_calc (r : Fin 8) : taylorRowBox 1 1 1 11 r = tr1_1_1_11 r := by + revert r + decide +kernel +def tr1_1_1_12 : Fin 8 → RI := ![⟨1430775680264370207823562099055696455832296894235420,1430775680264370207836478752706231615162616173366305⟩, + ⟨-2438707762417735088046524756878902121189063537045978,-2438707762417735088037235543040745291885109401051229⟩, + ⟨45208824390309712432671826559455971782378004451619583,45208824390309712432866386146333952465421991793281041⟩, + ⟨-22506468484227510563498827337489645953334045076656129,-22506468484227510563426835328290742445962173989775990⟩, + ⟨-38968639085491738212187243229117859223507759929214745,-38968639085491738211981030477593541377380958810133300⟩, + ⟨-38850665733369777050233802508253084571237038159479990,-38850665733369777050145297520841768397743181962205737⟩, + ⟨-5874308274777024358607776309211775872110612281489502,-5874308274777024358452182578745354941949223991170766⟩, + ⟨-23711019091014328725157102725289100627677687498253940,-23711019091014328725069335406256011442966843363853672⟩] +lemma tr1_1_1_12_calc (r : Fin 8) : taylorRowBox 1 1 1 12 r = tr1_1_1_12 r := by + revert r + decide +kernel +def tr1_1_1_13 : Fin 8 → RI := ![⟨-193309933590741891873629482361197673363507444926552,-193309933590741891871764456027231668012227382560723⟩, + ⟨2867387774088238990157012279260737586076236265667,2867387774088238991498275186739938265897055578606⟩, + ⟨-5780139627867435348798037116362820513137075483971774,-5780139627867435348769944797495383413444517253475855⟩, + ⟨3080106457526228239272569475650224062483485837210388,3080106457526228239282964350098440053626126350510087⟩, + ⟨5694791724525374127758002449358768660652050245878164,5694791724525374127787777360290906888730447903946079⟩, + ⟨4264359588481047521979035841997176129601337639634162,4264359588481047521991815013496870317614032473161831⟩, + ⟨5749402065176775425173203742887227487354227892070131,5749402065176775425195669809763072590644589934713662⟩, + ⟨-3866660162101839179152473600294297845371356442321885,-3866660162101839179139800940200742517043874998111227⟩] +lemma tr1_1_1_13_calc (r : Fin 8) : taylorRowBox 1 1 1 13 r = tr1_1_1_13 r := by + revert r + decide +kernel +def tr1_1_1_14 : Fin 8 → RI := ![⟨-3834840861357507986951062256894249458794886865240,-3834840861357507986670935370560131572127451256429⟩, + ⟨84088696303270480923429785637796860057820344227142,84088696303270480923631243276864614983530451749950⟩, + ⟨-144771117492913379766374412631996516597540049949386,-144771117492913379762154947377918061797303032927267⟩, + ⟨63270184169204830504784574791121614436452238516230,63270184169204830506345884548426196007043280945507⟩, + ⟨40016292544651118263691459859191338021693884206016,40016292544651118268163650378937077649459717805892⟩, + ⟨195393056990831429742369391018153197172163241685900,195393056990831429744288822104176779783370181748043⟩, + ⟨-531665574675233234740650950324943052736980675030384,-531665574675233234737276547911526172517109284192116⟩, + ⟨949144948866350077689236686457715079382470032506147,949144948866350077691140119534773237954714195826459⟩] +lemma tr1_1_1_14_calc (r : Fin 8) : taylorRowBox 1 1 1 14 r = tr1_1_1_14 r := by + revert r + decide +kernel +def tr1_1_1_15 : Fin 8 → RI := ![⟨2952543285901996044799206549391118194186945479637,2952543285901996044837489843376587489702309141082⟩, + ⟨-3255901827963725674359226752819061803417800540887,-3255901827963725674331694722162416954608092008817⟩, + ⟨89828342823068547560697971358060949045617838840098,89828342823068547561274620857488026073764771239221⟩, + ⟨-46597228141079443944220575133877922733086152540679,-46597228141079443944007200112222021880243737803686⟩, + ⟨-75293116718711329359389905251550398769841449026898,-75293116718711329358778717276496076300988008468194⟩, + ⟨-77820725183357354335477639132482454382536549243229,-77820725183357354335215321775148985126704890106794⟩, + ⟨-62244822519654795586694575169693677887289427789391,-62244822519654795586233415438419060453560690758423⟩, + ⟨-30843399094095980946985236388205253062034002828486,-30843399094095980946725105384623569389514892878546⟩] +lemma tr1_1_1_15_calc (r : Fin 8) : taylorRowBox 1 1 1 15 r = tr1_1_1_15 r := by + revert r + decide +kernel +def tr1_1_1_16 : Fin 8 → RI := ![⟨-243773855248502334968311267499665888843366179147,-243773855248502334963612237250957039232093226938⟩, + ⟨-2770644947103553216642775658302509914772606278640,-2770644947103553216639396277079016536973273226053⟩, + ⟨-6773503155220910678104858165113703452732536675953,-6773503155220910678034078115682876351428712031368⟩, + ⟨3555491553030874820001976292488172894132341661452,3555491553030874820028166715950876307900780076091⟩, + ⟨6348135693365105233259252383247006196076946814568,6348135693365105233334271810346487518877680337520⟩, + ⟨5426221138452595897214753257296452877327496681983,5426221138452595897246951040412496211582678755589⟩, + ⟨17578290671664632418860143892708286195464442772081,17578290671664632418916748309446115409134514519767⟩, + ⟨-12280731036751922592585409926764378101750653319752,-12280731036751922592553480504626681181796480418836⟩] +lemma tr1_1_1_16_calc (r : Fin 8) : taylorRowBox 1 1 1 16 r = tr1_1_1_16 r := by + revert r + decide +kernel +def tr1_1_1_17 : Fin 8 → RI := ![⟨-2484559119794795948458790443151745193328709824,-2484559119794795947851375584720451879504845833⟩, + ⟨306166669136065125403052571343756133506228856222,306166669136065125403489403255629654840342518329⟩, + ⟨-142340157972792754085176834650720534405073017438,-142340157972792754076027531192601263085028345309⟩, + ⟨72440410788749254176078888472028255178166627590,72440410788749254179464364095146356256073065648⟩, + ⟨36740803314973660417194252051705976255133127542,36740803314973660426891553894392851875506361271⟩, + ⟨161027510367026097234898498493205437437241219057,161027510367026097239060508703075340819879430150⟩, + ⟨-1057193072153332351311037350843246740484707490005,-1057193072153332351303720444596494315489613883001⟩, + ⟨1757989934968358237684223780060745354795345878889,1757989934968358237688351100891069996527769098962⟩] +lemma tr1_1_1_17_calc (r : Fin 8) : taylorRowBox 1 1 1 17 r = tr1_1_1_17 r := by + revert r + decide +kernel +def tr1_1_1_18 : Fin 8 → RI := ![⟨1659095590818536513662901808684413989636782109,1659095590818536513737513935129441365574762707⟩, + ⟨60969978422738995075246042916980195689513120792,60969978422738995075299701396669835326817826373⟩, + ⟨45137171986518853989774384712042667586813156345,45137171986518853990898244257164186644590048694⟩, + ⟨-22201632569763058893306329004957052862606817331,-22201632569763058892890472310381440086896271551⟩, + ⟨-29113768781013462477460439082964946805980044752,-29113768781013462476269265865510745687119370838⟩, + ⟨-42437730870950686177016263447400913265559792853,-42437730870950686176505020714829475707482419235⟩, + ⟨-132412837932575219033918836800020201714492984995,-132412837932575219033020060738649066234563574287⟩, + ⟨-32628936651868158721072388519688159153196370218,-32628936651868158720565406875430827560471154803⟩] +lemma tr1_1_1_18_calc (r : Fin 8) : taylorRowBox 1 1 1 18 r = tr1_1_1_18 r := by + revert r + decide +kernel +def tr1_1_1_19 : Fin 8 → RI := ![⟨-108679154483424540743732538730408889139175946,-108679154483424540736006420129419257658409807⟩, + ⟨-13860048249009193819569701475117619735905696843,-13860048249009193819564145115879712106220838557⟩, + ⟨-1702451398741291968517543948554837797715512533,-1702451398741291968401167796980591305937430326⟩, + ⟨623079563787156021688978996398814304445722759,623079563787156021732041140534994236772923453⟩, + ⟨566850074325161272899060881701302023372113487,566850074325161273022407393733514015803390671⟩, + ⟨1887863739008093905698374912488919701208310138,1887863739008093905751314322928818427861022555⟩, + ⟨29190200084942781765550545538807929501491491584,29190200084942781765643614196367879716306964920⟩, + ⟨-15262448891327829524278110131297397462215782201,-15262448891327829524225611958430612853892755169⟩] +lemma tr1_1_1_19_calc (r : Fin 8) : taylorRowBox 1 1 1 19 r = tr1_1_1_19 r := by + revert r + decide +kernel +def tr1_1_1_20 : Fin 8 → RI := ![⟨8005451112098740009774770498961065888696295,8005451112098740010799646907303489809013160⟩, + ⟨-445370075453065736051592347055221586475000991,-445370075453065736050855291129285962686474607⟩, + ⟨178081830841492932567808827917220028535981550,178081830841492932583246226486963598127625725⟩, + ⟨-83156270358020942027681665074748995178360085,-83156270358020942021969433889176388555964837⟩, + ⟨-116060613292810461201434882449285428222356336,-116060613292810461185072859452169713694873580⟩, + ⟨-166819615674060120702511066620382784846935719,-166819615674060120695488607397574442599469585⟩, + ⟨-1888419674416351337499879292080604019224495667,-1888419674416351337487533653032226491280175424⟩, + ⟨1725584950397776264164747761451473766122954639,1725584950397776264171711690124045777975456228⟩] +lemma tr1_1_1_20_calc (r : Fin 8) : taylorRowBox 1 1 1 20 r = tr1_1_1_20 r := by + revert r + decide +kernel +def tr1_1_1 : Fin 21 → Fin 8 → RI := ![tr1_1_1_0,tr1_1_1_1,tr1_1_1_2,tr1_1_1_3,tr1_1_1_4,tr1_1_1_5,tr1_1_1_6,tr1_1_1_7,tr1_1_1_8,tr1_1_1_9,tr1_1_1_10,tr1_1_1_11,tr1_1_1_12,tr1_1_1_13,tr1_1_1_14,tr1_1_1_15,tr1_1_1_16,tr1_1_1_17,tr1_1_1_18,tr1_1_1_19,tr1_1_1_20] +lemma tr1_1_1_mem (l : Fin 21) (r : Fin 8) : (tr1_1_1 l r).Mem (taylorRow 1 (nearNode 1) (nearDisplacement 1 1) l.val r) := by + have he : taylorRowBox 1 1 1 l r = tr1_1_1 l r := by + fin_cases l + · exact tr1_1_1_0_calc r + · exact tr1_1_1_1_calc r + · exact tr1_1_1_2_calc r + · exact tr1_1_1_3_calc r + · exact tr1_1_1_4_calc r + · exact tr1_1_1_5_calc r + · exact tr1_1_1_6_calc r + · exact tr1_1_1_7_calc r + · exact tr1_1_1_8_calc r + · exact tr1_1_1_9_calc r + · exact tr1_1_1_10_calc r + · exact tr1_1_1_11_calc r + · exact tr1_1_1_12_calc r + · exact tr1_1_1_13_calc r + · exact tr1_1_1_14_calc r + · exact tr1_1_1_15_calc r + · exact tr1_1_1_16_calc r + · exact tr1_1_1_17_calc r + · exact tr1_1_1_18_calc r + · exact tr1_1_1_19_calc r + · exact tr1_1_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 1 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows12.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows12.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad7bec89d1c1bdec1ff7af141717dce703b1577d --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows12.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_2_0_0 : Fin 8 → RI := ![⟨-19161310605243970596138914178477271333449753394552133298550,-19161310605243970595347988481334459320489691444497830672066⟩, + ⟨9938250019542961465016365256426227767440728224088244901409,9938250019542961465585171863017529452010501813708298315770⟩, + ⟨-273735616716711908419479425147467262930460388010366657359470,-273735616716711908407565954287888134718455970697704029887193⟩, + ⟨169072214849163758267170545538179038528093795652206100925166,169072214849163758271578833597273949734576245866150658480905⟩, + ⟨274153343269704808297912775034566776608120432857364165913930,274153343269704808310539804342262791494795787088259531081122⟩, + ⟨174220562142018446893851815261078551177969286543447843388003,174220562142018446899271242824410309901292650819235975302051⟩, + ⟨-20495853512325440608433804533167029583977161789518125640031,-20495853512325440598906330692643259106621463100516657286903⟩, + ⟨60320423906192361440541038454229555574770341473311591586818,60320423906192361445915296360235482668468035603890458420416⟩] +lemma tr1_2_0_0_calc (r : Fin 8) : taylorRowBox 1 2 0 0 r = tr1_2_0_0 r := by + revert r + decide +kernel +def tr1_2_0_1 : Fin 8 → RI := ![⟨11384472731294818314616508519329205995677671668291343243869,11384472731294818314806341229031757642513522862100122021099⟩, + ⟨-5603951840973927518697496449429231407798254735911544992583,-5603951840973927518560975282140451261210505286659807780914⟩, + ⟨173833448499884672802099107017938383870348895620637091788839,173833448499884672804958498820976302907406827641031270092761⟩, + ⟨-102208359346374959582544270546599778384727066724302511212419,-102208359346374959581486222653430829077772792095003977623130⟩, + ⟨-170040304570577988936866937020643295473324604852911691175878,-170040304570577988933836281678828949369206925279363011787956⟩, + ⟨-113987365395642063474395752570292920107407742799822623579760,-113987365395642063473095017718368453387585724835243474243558⟩, + ⟨23308072861720638592190494653497926626197355371473349729557,23308072861720638594477215368284140018211904856770793386184⟩, + ⟨-52638717667819170704142167539084850988844535480692709904288,-52638717667819170702852274007247179602086299990071547676023⟩] +lemma tr1_2_0_1_calc (r : Fin 8) : taylorRowBox 1 2 0 1 r = tr1_2_0_1 r := by + revert r + decide +kernel +def tr1_2_0_2 : Fin 8 → RI := ![⟨3634496992064350092038465025967029539998258664984383919952,3634496992064350092092459474378254883468406757076608733357⟩, + ⟨-1855140789313238341077941203659186930330794448580681035841,-1855140789313238341039110250157676207290917142070374054577⟩, + ⟨50432378382710151782028744506593140519450123092832503236716,50432378382710151782842046299738606591947305970512503212604⟩, + ⟨-33423923122077059393662677823137198878598225462234029403804,-33423923122077059393361735417159447607017830535811055342280⟩, + ⟨-52480772874307614911567411783306170280726139014712984476524,-52480772874307614910705397203346641051297750927938233100676⟩, + ⟨-30814931594736280967009696287517410426867735987355882417439,-30814931594736280966639726006925000801249388792106236713075⟩, + ⟨-2341236919684592526690728336756893578956927483718575791374,-2341236919684592526040312379232953293325043946458643726163⟩, + ⟨-3421591943606386105829894336737903216646057648995391451932,-3421591943606386105463007671803481832656812881194409945274⟩] +lemma tr1_2_0_2_calc (r : Fin 8) : taylorRowBox 1 2 0 2 r = tr1_2_0_2 r := by + revert r + decide +kernel +def tr1_2_0_3 : Fin 8 → RI := ![⟨-1893568464966276907409392172205821125643457690418675470321,-1893568464966276907398960280595698083822343113721275676249⟩, + ⟨753000052123998330971303797439751663494996726003150583443,753000052123998330978806055725279263410521281254752747381⟩, + ⟨-31697812897981138560472083768861710725505121541487833064862,-31697812897981138560314951389472318521127657296616119868007⟩, + ⟨18200154330606932878711716444699354262629739300234913306460,18200154330606932878769859432603166342378212271934343303462⟩, + ⟨30714872587462977996047072543110920410868819012288123851300,30714872587462977996213616381049788335706098264103582592808⟩, + ⟨21231403677949742279176412943827691147237982967444803113638,21231403677949742279247892327013860666202231594215462774011⟩, + ⟨-4685200016829758952285362114152223738290127662264387858524,-4685200016829758952159699773517062355160387455663378591617⟩, + ⟨10560766283063365810515189634478560579762963331682546766721,10560766283063365810586073253704504945119373434768213184432⟩] +lemma tr1_2_0_3_calc (r : Fin 8) : taylorRowBox 1 2 0 3 r = tr1_2_0_3 r := by + revert r + decide +kernel +def tr1_2_0_4 : Fin 8 → RI := ![⟨-484902936726312720528573999438077219321459540832717137642,-484902936726312720526483967247899411427333549075429198412⟩, + ⟨272513457040257537988653693331775943838669519994269258372,272513457040257537990156772725194335822151865579787349391⟩, + ⟨-7094580727146878773713221775531292451484774116915054736133,-7094580727146878773681740262558272989293163317849107483749⟩, + ⟨4701034069538495858918572187266802550716123798640145741060,4701034069538495858930221149978353553692570061779987832350⟩, + ⟨7415684723645571703088492623415467616055439370426388096475,7415684723645571703121859724554303432157423756724315699088⟩, + ⟨4332312819611195553114231041919804521278286911016489623156,4332312819611195553128551954889558564043303169943418962260⟩, + ⟨658391795420352714132514585699330146464859718840884809616,658391795420352714157691068238101449105240655973236981007⟩, + ⟨153813097429022045369166141189604330833400820074255853603,153813097429022045383367692688088558283921524718781008308⟩] +lemma tr1_2_0_4_calc (r : Fin 8) : taylorRowBox 1 2 0 4 r = tr1_2_0_4 r := by + revert r + decide +kernel +def tr1_2_0_5 : Fin 8 → RI := ![⟨99316053537724244223674063829618775272892279384378822736,99316053537724244224133909557566783445210956776168683317⟩, + ⟨-14892589553020782635473647926312958292430060525172161569,-14892589553020782635142942666794063872013967960816766213⟩, + ⟨2091263808561580369037372190252824945923257084584511164033,2091263808561580369044298705221570824681269654412981294304⟩, + ⟨-1098182509295484368296475546512773921947985550960868634073,-1098182509295484368293912559319044848384033439874434876033⟩, + ⟨-1945365708172818135482290930665408762895857703857593386268,-1945365708172818135474949551434077779889881197072454451239⟩, + ⟨-1491728777017724185346903474784395459280026194503246774548,-1491728777017724185343752609127410351522784261368936739810⟩, + ⟨510830768207895048159391399796069124714426269652082154162,510830768207895048164930691484912178752741970534027309136⟩, + ⟨-1010644849258729793145388298518878304761120534120872757477,-1010644849258729793142263694592960492928968484402349265766⟩] +lemma tr1_2_0_5_calc (r : Fin 8) : taylorRowBox 1 2 0 5 r = tr1_2_0_5 r := by + revert r + decide +kernel +def tr1_2_0_6 : Fin 8 → RI := ![⟨32567050977996521405597999144226923204791667052861935264,32567050977996521405665357207540182261368552083845777956⟩, + ⟨-18696536081370230308830682679682883430796164137536388735,-18696536081370230308782241073181257262246799842071599623⟩, + ⟨585647206473794067332005264656167110652563275130784004814,585647206473794067333019858476421608232147659908089467036⟩, + ⟨-361337860971414152783786252771553466711064757757810040884,-361337860971414152783410827181565742806037273432637271371⟩, + ⟨-594335174469456706701932509054233165937234050624823019336,-594335174469456706700857146041894965143200359982639930843⟩, + ⟨-377227571998118240254757191581395271823209059554024126594,-377227571998118240254295653731487792403513913317776004967⟩, + ⟨-36727195695695833888849808417251199166374816284418229318,-36727195695695833888038414644276578918276649979574032006⟩, + ⟨-55434467848563177385687215606759668411681578026706609462,-55434467848563177385229524567668682770974645780685565629⟩] +lemma tr1_2_0_6_calc (r : Fin 8) : taylorRowBox 1 2 0 6 r = tr1_2_0_6 r := by + revert r + decide +kernel +def tr1_2_0_7 : Fin 8 → RI := ![⟨-1623861835254624463022407203118808608280245331427133099,-1623861835254624463007539965614111737494920262757931006⟩, + ⟨-1872549634349563690007074400248962413865346270284938287,-1872549634349563689996382393477743418840769103593303069⟩, + ⟨-51933428428345551911157348792642210162403145227973612150,-51933428428345551910933408160217367457786888168895498900⟩, + ⟨21458237672558983919957292510180126232743824442970507700,21458237672558983920040156255615231056291257631396576667⟩, + ⟨42495256978343333794056643198935429163509798352867383345,42495256978343333794293996776569766944650506256802974024⟩, + ⟨43131158186213324992599488523783551624120364573253563542,43131158186213324992701358923480890300369420715275928135⟩, + ⟨-35030897743311946074400939069128266377384706211378347183,-35030897743311946074221848647874049250678757507880614532⟩, + ⟨55169973681403142596032410484234131408002241575355802335,55169973681403142596133431817792947585101580120179625330⟩] +lemma tr1_2_0_7_calc (r : Fin 8) : taylorRowBox 1 2 0 7 r = tr1_2_0_7 r := by + revert r + decide +kernel +def tr1_2_0_8 : Fin 8 → RI := ![⟨-1177482947502567791111908248335076669605998080337259754,-1177482947502567791109352492066772084772495557843474922⟩, + ⟨641935667497419271939454058966793108947794277163487238,641935667497419271941292071127187440274669123262035430⟩, + ⟨-26536789546858136718615767231246763911486422386983491056,-26536789546858136718577270659513700390342855128994980262⟩, + ⟨15119572951814204571065292517176808651678703459172977813,15119572951814204571079537230545021736973810754690752114⟩, + ⟨25883170126254690592047813707620254913078817402353304297,25883170126254690592088616035136065215320596779525018525⟩, + ⟨18354359495650512918719414451243818982795984882138069499,18354359495650512918736926508380905536480710965655418067⟩, + ⟨-463245322233386099227521984534634283016006100701622081,-463245322233386099196735399835770633430442185314970477⟩, + ⟨6422114394431118081589997895084531912635206443792671965,6422114394431118081607363993284151980947660318247894060⟩] +lemma tr1_2_0_8_calc (r : Fin 8) : taylorRowBox 1 2 0 8 r = tr1_2_0_8 r := by + revert r + decide +kernel +def tr1_2_0_9 : Fin 8 → RI := ![⟨-39619651680412651603229127770477324806604599689408729,-39619651680412651602824679048017968900816720901406935⟩, + ⟨145024706063660789674702099618546707317335201144617814,145024706063660789674992965253643808735760984414449880⟩, + ⟨-560014540017383302929314297979360703995391019534352113,-560014540017383302923222211089066307320020377500132906⟩, + ⟨558358461388606348329015415973432201860918451121153182,558358461388606348331269643497091537522642206182223835⟩, + ⟨830025979253118849002600988585261249142526115504558222,830025979253118849009057961592816245565855902783585070⟩, + ⟨118836955744578569795511749850267815579204507533943737,118836955744578569798283034900215337854964959905706066⟩, + ⟨1466049050090207926907027824803224694873288258559044176,1466049050090207926911899805361186609644605006311583490⟩, + ⟨-1657428624320067137753178667566508341196340295998257992,-1657428624320067137750430480535570076553886914653772318⟩] +lemma tr1_2_0_9_calc (r : Fin 8) : taylorRowBox 1 2 0 9 r = tr1_2_0_9 r := by + revert r + decide +kernel +def tr1_2_0_10 : Fin 8 → RI := ![⟨24290935326233711072759998518787697903833783778077358,24290935326233711072833892359636722237007421010320273⟩, + ⟨-8963093224777954877389408020062469279808632272832162,-8963093224777954877336266106738998320766973839995940⟩, + ⟨653124170467077520468592752071232513212760426974711081,653124170467077520469705792301252544695827493549188334⟩, + ⟨-345702384613431629434318251220420897569242791724730184,-345702384613431629433906397948129052284691758497073498⟩, + ⟨-605325464207486422140108813753190211413292268166338779,-605325464207486422138929107874135498023839263911237256⟩, + ⟨-490882680131446802102319206728476372922130228017291539,-490882680131446802101812885692169982884141530332426008⟩, + ⟨135234897486768134473189832476550344282404461652985192,135234897486768134474079956084522244026111591633777314⟩, + ⟨-341899956730429016354117414987009999085197362671389875,-341899956730429016353615314018867991137959540825271293⟩] +lemma tr1_2_0_10_calc (r : Fin 8) : taylorRowBox 1 2 0 10 r = tr1_2_0_10 r := by + revert r + decide +kernel +def tr1_2_0_11 : Fin 8 → RI := ![⟨2500190058189908578348912783707051271279596745088969,2500190058189908578359517975064975977381252839174519⟩, + ⟨-5272073866955699148540719827704656235669443973964241,-5272073866955699148533092938190648392452227611989337⟩, + ⟨65943905689629901581827574076820482408742443661672617,65943905689629901581987316817122645959842825562326773⟩, + ⟨-39563799920236519072278482470963405127971410349870252,-39563799920236519072219373582942895985562924542335700⟩, + ⟨-67762767715294459738945453375778292615065953742646820,-67762767715294459738776142829047943874325275293506327⟩, + ⟨-43574229549187945216449248067719592179594168546846269,-43574229549187945216376581233550197677289740184240832⟩, + ⟨-33387468763276829814855651995433182041426919400163076,-33387468763276829814727902089809934979363423984092930⟩, + ⟨18040636017652586703988905529183703589919952412451668,18040636017652586704060966702170179974083845457973807⟩] +lemma tr1_2_0_11_calc (r : Fin 8) : taylorRowBox 1 2 0 11 r = tr1_2_0_11 r := by + revert r + decide +kernel +def tr1_2_0_12 : Fin 8 → RI := ![⟨-245262855949555691324020363353785740506559360692095,-245262855949555691322447540881493817101911791328716⟩, + ⟨-224656148283806790013094979389186112134447302848594,-224656148283806790011963859467173943740734474901831⟩, + ⟨-7254853983801702021761039799732263949783763040224276,-7254853983801702021737348857885611353568600325736634⟩, + ⟨3494165419141161279423302872845973006889469415598738,3494165419141161279432069125547137462475398060136536⟩, + ⟨6058984489560133512725760119272895431109365396777582,6058984489560133512750870032305620637431335735702016⟩, + ⟨6179705826799119966368564193237234164101893701804362,6179705826799119966379341182158063655265894518579329⟩, + ⟨-6444656796130426072373358990863857187918402662180430,-6444656796130426072354412805394576951524923527009624⟩, + ⟨9715081891518805752331834882779839010395706177205064,9715081891518805752342522048001879255823625870652788⟩] +lemma tr1_2_0_12_calc (r : Fin 8) : taylorRowBox 1 2 0 12 r = tr1_2_0_12 r := by + revert r + decide +kernel +def tr1_2_0_13 : Fin 8 → RI := ![⟨-55987412481857979128151338153935137498886808364009,-55987412481857979127926517390555127775564742223112⟩, + ⟨111882963875262944528413679506053839465924919625610,111882963875262944528575362880264916831115080685264⟩, + ⟨-1673181103799536592698826183605720987331962469131091,-1673181103799536592695439777495114210210756000340678⟩, + ⟨920147124348267192036711329635886029309818560872684,920147124348267192037964386264221393306163429971283⟩, + ⟨1588713528600430132479813986802854834890049450280519,1588713528600430132483403222025214960910056650160389⟩, + ⟨1251675971329891723680202628112548281183409115758502,1251675971329891723681743101318133733231929105214006⟩, + ⟨193709612152681387111724796750170050137685649097490,193709612152681387114432982801494534867481234667287⟩, + ⟨447490713102115913435663070063394938305580088744889,447490713102115913437190703783018975858201926111984⟩] +lemma tr1_2_0_13_calc (r : Fin 8) : taylorRowBox 1 2 0 13 r = tr1_2_0_13 r := by + revert r + decide +kernel +def tr1_2_0_14 : Fin 8 → RI := ![⟨-738926089893116785791037664133716073329702603315,-738926089893116785762688198128069349302489670639⟩, + ⟨17143788334485762889682951375793081556487705560048,17143788334485762889703339338418144584710939837007⟩, + ⟨-24228448378146288138647863435716597973225880059748,-24228448378146288138220844136127278798720567475119⟩, + ⟨18404186204394129853365501651492493262238021165639,18404186204394129853523509683094705934664793529583⟩, + ⟨34959882504556837388951225943307433064252859649710,34959882504556837389403821603886837346177805158335⟩, + ⟨7345784324621820257875941930977522433264859862710,7345784324621820258070192640336630905137723711243⟩, + ⟨145723321627247439262084831964078773765763724467656,145723321627247439262426329018225910146345070251380⟩, + ⟨-138854894237590023844107233933757642142232766062112,-138854894237590023843914602258844728123513606588946⟩] +lemma tr1_2_0_14_calc (r : Fin 8) : taylorRowBox 1 2 0 14 r = tr1_2_0_14 r := by + revert r + decide +kernel +def tr1_2_0_15 : Fin 8 → RI := ![⟨615759442135335246330273410500128485213202447808,615759442135335246334169347361864788094859066530⟩, + ⟨-764741361036616548041487560604381953704576433745,-764741361036616548038685736572791492137437897972⟩, + ⟨19374450937699351256856179163397832627359893029626,19374450937699351256914862463799159478283707627965⟩, + ⟨-10291718811378358780945656088954287042357853102367,-10291718811378358780923941771142963154561114312955⟩, + ⟨-17205297999100382910731171032259303692123309150486,-17205297999100382910668972890087900672276477606009⟩, + ⟨-15725169538201848683424378521275557125480472672453,-15725169538201848683397683538786655437690890710397⟩, + ⟨9652753420955907174151939593206851808013815027033,9652753420955907174198869964362274999488273545033⟩, + ⟨-18972580696389930919186042497568287776650229166421,-18972580696389930919159570011527429021077440922382⟩] +lemma tr1_2_0_15_calc (r : Fin 8) : taylorRowBox 1 2 0 15 r = tr1_2_0_15 r := by + revert r + decide +kernel +def tr1_2_0_16 : Fin 8 → RI := ![⟨52036816324307144034611670278286135263521839563,52036816324307144035052499530059578191351850401⟩, + ⟨-518133961997079392562209387760645759670569182999,-518133961997079392561892358497782082750518615805⟩, + ⟨1671970699383926396210310418438454581578582124111,1671970699383926396216950494067427066829272503545⟩, + ⟨-928589901926004712592211905578832888656987796093,-928589901926004712589754908247161621696536410062⟩, + ⟨-1600941164204436586605383660065834576297525488807,-1600941164204436586598345876485493078593928711616⟩, + ⟨-1261881033174775570474657375607797856464536253294,-1261881033174775570471636810959359907012964572120⟩, + ⟨-1390086757769870990352768194929724317105623337096,-1390086757769870990347457975299407071533584871239⟩, + ⟨355235206644252883663261274442867707896814580838,355235206644252883666256663389878729964343821369⟩] +lemma tr1_2_0_16_calc (r : Fin 8) : taylorRowBox 1 2 0 16 r = tr1_2_0_16 r := by + revert r + decide +kernel +def tr1_2_0_17 : Fin 8 → RI := ![⟨-2059899096611560988860211440327098172704889103,-2059899096611560988813405406180231278938692268⟩, + ⟨-41255407802358946157627061570520128228807725277,-41255407802358946157593400277756032846716122729⟩, + ⟨-73361476144690088007953386568344650754972656410,-73361476144690088007248361651372040076690470225⟩, + ⟨38222678298287136438261949366607938243157985678,38222678298287136438522826566897360927875792521⟩, + ⟨57137730520573219872101784663129981897303012492,57137730520573219872849037113517893244287216657⟩, + ⟨66042945136523176402954042686898473212540482086,66042945136523176403274757910580379126104021511⟩, + ⟨-257323804007801912483605180457781424988692512916,-257323804007801912483041355983026738022725941313⟩, + ⟨267376447740805074477440641107732691534067179422,267376447740805074477758683244844122642431226149⟩] +lemma tr1_2_0_17_calc (r : Fin 8) : taylorRowBox 1 2 0 17 r = tr1_2_0_17 r := by + revert r + decide +kernel +def tr1_2_0_18 : Fin 8 → RI := ![⟨-562796845262099578334932298277038036321106746,-562796845262099578329195822114276063934560005⟩, + ⟨8280444900938118928437963844987897795242697951,8280444900938118928442089321693647043520225566⟩, + ⟨-19201444073349244083389169834264937599847136964,-19201444073349244083302763055653006807805640328⟩, + ⟨10492273654052294947161939551799054742765856850,10492273654052294947193912263608132492546693251⟩, + ⟨17164195345766217001604004027343154390622817343,17164195345766217001695586148043331423146707480⟩, + ⟨15524277884971797111758474805072826816898471582,15524277884971797111797781173764999410839363012⟩, + ⟨-6084327101110005893654979471724313741412161983,-6084327101110005893585878003960863393528444442⟩, + ⟨18323701010287995352847550180444645988060695112,18323701010287995352886528939735591257707184639⟩] +lemma tr1_2_0_18_calc (r : Fin 8) : taylorRowBox 1 2 0 18 r = tr1_2_0_18 r := by + revert r + decide +kernel +def tr1_2_0_19 : Fin 8 → RI := ![⟨-20699985896486339933805495584099231110075139,-20699985896486339933180487544579997164509244⟩, + ⟨1827612387760265982933527437104899601005517884,1827612387760265982933976921428540085475385302⟩, + ⟨-603613419121494562356824227123548270927412422,-603613419121494562347409922981533309910648211⟩, + ⟨326744173977011184770324664327688514635770992,326744173977011184773808196962850705773051211⟩, + ⟨562733976477110449060850290308588674611075583,562733976477110449070828465077144738766887362⟩, + ⟨470300799127656183558767608316489124638228140,470300799127656183563050167109314769809054288⟩, + ⟨2257869031972066443994373640390654965947956262,2257869031972066444001902473715051309409265079⟩, + ⟨-1141863742279948610849432198580044187049215165,-1141863742279948610845185333913109183170242180⟩] +lemma tr1_2_0_19_calc (r : Fin 8) : taylorRowBox 1 2 0 19 r = tr1_2_0_19 r := by + revert r + decide +kernel +def tr1_2_0_20 : Fin 8 → RI := ![⟨2442924996369949586232910058689936940475216,2442924996369949586285012472065049776481124⟩, + ⟨-2298080044831221633314098574397103705516517,-2298080044831221633276628307527490065627120⟩, + ⟨101016288500790112881629380196020684846281577,101016288500790112882414182846588323039089509⟩, + ⟨-56882306383752928542300230000364783177143290,-56882306383752928542009833004038209451505275⟩, + ⟨-90544776561449015215072552623099147633419327,-90544776561449015214240744144441244201528966⟩, + ⟨-81420650376135759981086009048106067961142240,-81420650376135759980729003002744954072668793⟩, + ⟨260145912783746626079915457560391321854863801,260145912783746626080543082104892257203166492⟩, + ⟨-255506044241392029685950492875060204736150789,-255506044241392029685596462391551308361241941⟩] +lemma tr1_2_0_20_calc (r : Fin 8) : taylorRowBox 1 2 0 20 r = tr1_2_0_20 r := by + revert r + decide +kernel +def tr1_2_0 : Fin 21 → Fin 8 → RI := ![tr1_2_0_0,tr1_2_0_1,tr1_2_0_2,tr1_2_0_3,tr1_2_0_4,tr1_2_0_5,tr1_2_0_6,tr1_2_0_7,tr1_2_0_8,tr1_2_0_9,tr1_2_0_10,tr1_2_0_11,tr1_2_0_12,tr1_2_0_13,tr1_2_0_14,tr1_2_0_15,tr1_2_0_16,tr1_2_0_17,tr1_2_0_18,tr1_2_0_19,tr1_2_0_20] +lemma tr1_2_0_mem (l : Fin 21) (r : Fin 8) : (tr1_2_0 l r).Mem (taylorRow 1 (nearNode 2) (nearDisplacement 2 0) l.val r) := by + have he : taylorRowBox 1 2 0 l r = tr1_2_0 l r := by + fin_cases l + · exact tr1_2_0_0_calc r + · exact tr1_2_0_1_calc r + · exact tr1_2_0_2_calc r + · exact tr1_2_0_3_calc r + · exact tr1_2_0_4_calc r + · exact tr1_2_0_5_calc r + · exact tr1_2_0_6_calc r + · exact tr1_2_0_7_calc r + · exact tr1_2_0_8_calc r + · exact tr1_2_0_9_calc r + · exact tr1_2_0_10_calc r + · exact tr1_2_0_11_calc r + · exact tr1_2_0_12_calc r + · exact tr1_2_0_13_calc r + · exact tr1_2_0_14_calc r + · exact tr1_2_0_15_calc r + · exact tr1_2_0_16_calc r + · exact tr1_2_0_17_calc r + · exact tr1_2_0_18_calc r + · exact tr1_2_0_19_calc r + · exact tr1_2_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 2 0 l r +def tr1_2_1_0 : Fin 8 → RI := ![⟨-19161310605243970596138914178477271333449753394552133298550,-19161310605243970595347988481334459320489691444497830672066⟩, + ⟨9938250019542961465016365256426227767440728224088244901409,9938250019542961465585171863017529452010501813708298315770⟩, + ⟨-273735616716711908419479425147467262930460388010366657359470,-273735616716711908407565954287888134718455970697704029887193⟩, + ⟨169072214849163758267170545538179038528093795652206100925166,169072214849163758271578833597273949734576245866150658480905⟩, + ⟨274153343269704808297912775034566776608120432857364165913930,274153343269704808310539804342262791494795787088259531081122⟩, + ⟨174220562142018446893851815261078551177969286543447843388003,174220562142018446899271242824410309901292650819235975302051⟩, + ⟨-20495853512325440608433804533167029583977161789518125640031,-20495853512325440598906330692643259106621463100516657286903⟩, + ⟨60320423906192361440541038454229555574770341473311591586818,60320423906192361445915296360235482668468035603890458420416⟩] +lemma tr1_2_1_0_calc (r : Fin 8) : taylorRowBox 1 2 1 0 r = tr1_2_1_0 r := by + revert r + decide +kernel +def tr1_2_1_1 : Fin 8 → RI := ![⟨-34153418193884454944419023687095272927540568586300366063295,-34153418193884454943849525557987617987033015004874029731608⟩, + ⟨16811855522921782555682925846421353783631515859979423342745,16811855522921782556092489348287694223394764207734634977748⟩, + ⟨-521500345499654018414875496462928908722220482923093810278281,-521500345499654018406297321053815151611046686861911275366519⟩, + ⟨306625078039124878744458667960292487233318376285011932869393,306625078039124878747632811639799335154181200172907533637256⟩, + ⟨510120913711733966801508845036486848107620775838089035363872,510120913711733966810600811061929886419973814558735073527635⟩, + ⟨341962096186926190419285053155105360162757174505730422730675,341962096186926190423187257710878760322223228399467870739279⟩, + ⟨-69924218585161915783431646104852420054635714570312380158550,-69924218585161915776571483960493779878592066114420049188673⟩, + ⟨157916153003457512108556822021741538806258899970214643028070,157916153003457512112426502617254552966533606442078129712863⟩] +lemma tr1_2_1_1_calc (r : Fin 8) : taylorRowBox 1 2 1 1 r = tr1_2_1_1 r := by + revert r + decide +kernel +def tr1_2_1_2 : Fin 8 → RI := ![⟨32710472928579150828346185233703265859984327984859455279570,32710472928579150828832135269404293951215660813689478600211⟩, + ⟨-16696267103819145069701470832932682372977150037226129322567,-16696267103819145069351992251419085865618254278633366491197⟩, + ⟨453891405444391366038258700559338264675051107835492529130450,453891405444391366045578416697647459327525753734612528913433⟩, + ⟨-300815308098693534542964100408234789907384029160106264634230,-300815308098693534540255618754435028463160474822299498080526⟩, + ⟨-472326955868768534204106706049755532526535251132416860288709,-472326955868768534196348574830119769461679758351444097906092⟩, + ⟨-277334384352626528703087266587656693841809623886202941756948,-277334384352626528699757534062325007211244499128956130417677⟩, + ⟨-21071132277161332740216555030812042210612347353467182122360,-21071132277161332734362811413096579639925395518127793535471⟩, + ⟨-30794327492457474952469049030641128949814518840958523067380,-30794327492457474949167069046231336493911315930749689507470⟩] +lemma tr1_2_1_2_calc (r : Fin 8) : taylorRowBox 1 2 1 2 r = tr1_2_1_2 r := by + revert r + decide +kernel +def tr1_2_1_3 : Fin 8 → RI := ![⟨51126348554089476499771927576083848263203264070474443258743,51126348554089476500053588649557170392373357641304237698661⟩, + ⟨-20331001407347954936427763504582540112084074593878324179264,-20331001407347954936225202530873294914364911602085065752987⟩, + ⟨855840948245490741128503687515752600070446747008635236436229,855840948245490741132746261759266189588638281620171492751250⟩, + ⟨-491404166926387187726786204680285491244211731342227269193452,-491404166926387187725216344006882565091002961106342659274436⟩, + ⟨-829301559861500405897767642288344285064064653130796730005812,-829301559861500405893270958663994851093458113331779343985130⟩, + ⟨-573247899304643041539693092829374237987460253043817494898282,-573247899304643041537763149483347660975425540121009684068239⟩, + ⟨126500400454403491708311893884960683589330461302911221973669,126500400454403491711704777082110040933833446881138472180132⟩, + ⟨-285140689642710876885823977850021633518223082738741755979642,-285140689642710876883910120130921135653600009955428762701477⟩] +lemma tr1_2_1_3_calc (r : Fin 8) : taylorRowBox 1 2 1 3 r = tr1_2_1_3 r := by + revert r + decide +kernel +def tr1_2_1_4 : Fin 8 → RI := ![⟨-39277137874831330362814493954484254765038222807450088148982,-39277137874831330362645201347079852325614017475109765071392⟩, + ⟨22073590020260860577080949159873851450932231119535809928192,22073590020260860577202698590740741201594301111962775300651⟩, + ⟨-574661038898897180670770963818034688570266703470119433626766,-574661038898897180668220961267220112132746228745777706183689⟩, + ⟨380783759632618164572404347168611006608006027689851805025875,380783759632618164573347913148246637849098175004179014420306⟩, + ⟨600670462615291307950167902496652876900490589004537435814515,600670462615291307952870637688898578004751324294669571626116⟩, + ⟨350917338388506839802252714395504166223541239792335659475701,350917338388506839803412708346054243687507556765416935943006⟩, + ⟨53329735429048569844733681441645741863653637226111669578911,53329735429048569846772976527286217377524493133832195461537⟩, + ⟨12458860891750785674902457436357950797505466426014724141898,12458860891750785676052783107735173220997643502221261672928⟩] +lemma tr1_2_1_4_calc (r : Fin 8) : taylorRowBox 1 2 1 4 r = tr1_2_1_4 r := by + revert r + decide +kernel +def tr1_2_1_5 : Fin 8 → RI := ![⟨-24133801009666991346464540022488728377186262496608990045857,-24133801009666991346352797510597362391312823890404053924855⟩, + ⟨3618899261384050180339735068030957520899394214478474189986,3618899261384050180420096446094048865060504707616835261237⟩, + ⟨-508177105480464029677764585368841710397548526022354454515617,-508177105480464029676081442231436461859351471554036212860178⟩, + ⟨266858349758802701495420751914527898157320125889487674876254,266858349758802701496043557802604063033360488883491078079619⟩, + ⟨472723867085994806920412740998480900513241130888606431651236,472723867085994806922196696151694329383693422037395192862884⟩, + ⟨362490092815306977038531884017960715420036575512651627773898,362490092815306977039297544372608096605046365264288966215007⟩, + ⟨-124131876674518496704078158030833659436916298839768636119867,-124131876674518496702732110150444797305605583525455963461419⟩, + ⟨245586698369871339733570077786089399781739341709770871581168,245586698369871339734329356540087428056952289791372080066882⟩] +lemma tr1_2_1_5_calc (r : Fin 8) : taylorRowBox 1 2 1 5 r = tr1_2_1_5 r := by + revert r + decide +kernel +def tr1_2_1_6 : Fin 8 → RI := ![⟨23741380162959464104680941376141427016293125281536350807717,23741380162959464104730045404296792868537674469123572129640⟩, + ⟨-13629774803318897895137567673488822021050403656264027387759,-13629774803318897895102253742349136544177917084870196125349⟩, + ⟨426936813519395875085031837934345823665718627570341539509816,426936813519395875085771476829311352401235644072997221469167⟩, + ⟨-263415300648160917379380178270462477232366208405443519804244,-263415300648160917379106493015361426505601172332392570829948⟩, + ⟨-433270342188233939185708799100535977968243622905495981095685,-433270342188233939184924859464541429589393062427344509584945⟩, + ⟨-274998899986628197145717992662837153159119404414883588286606,-274998899986628197145381531570254600662161642808658707621626⟩, + ⟨-26774125662162262904971510336176124192287241071340889172139,-26774125662162262904380004275677626031423677835109469332601⟩, + ⟨-40411727061602556314165980177327798272115870381469118297104,-40411727061602556313832323409830469740040516774119777343825⟩] +lemma tr1_2_1_6_calc (r : Fin 8) : taylorRowBox 1 2 1 6 r = tr1_2_1_6 r := by + revert r + decide +kernel +def tr1_2_1_7 : Fin 8 → RI := ![⟨3551385833701863700597489904798062369901390614651595110241,3551385833701863700630004553220834426308896539831140086471⟩, + ⟨4095266050322495790022088294535824857004762029558553813457,4095266050322495790045471713344480799123512293113160031534⟩, + ⟨113578407972791722029211363646395382630179924425374456096042,113578407972791722029701121809508513625175678613578289771761⟩, + ⟨-46929165789886497833127821731030510320108980439864313169090,-46929165789886497832946598719763936071010744056776500340224⟩, + ⟨-92937127011636871008120970950358080307950657183628104189327,-92937127011636871007601878676071783580595928997720967377462⟩, + ⟨-94327842953248541759037871965652707086907923104308454830990,-94327842953248541758815081401514627401951237321705543467550⟩, + ⟨76612573364623226064323182992900545711234442669734903982970,76612573364623226064714853744183518567340352484284445287462⟩, + ⟨-120656732441228672857743815385513176368617155722832840595532,-120656732441228672857522881729020045389300902325303139706679⟩] +lemma tr1_2_1_7_calc (r : Fin 8) : taylorRowBox 1 2 1 7 r = tr1_2_1_7 r := by + revert r + decide +kernel +def tr1_2_1_8 : Fin 8 → RI := ![⟨-7725465618564347277485230017326438029284953405092761245046,-7725465618564347277468461700450091648192343355011038967291⟩, + ⟨4211739914450567843194758080881129587806478252469639769235,4211739914450567843206817278665476795642104117722214454308⟩, + ⟨-174107876216936235010838048804210018023262417280998684813164,-174107876216936235010585472797069388261039472501336065501237⟩, + ⟨99199518136852996190759384205197041563663973395633907435014,99199518136852996190852843769605887616285172361526024613984⟩, + ⟨169819479198357024974425705735696492484710120976840029493744,169819479198357024974693409806527723877718435470463646537580⟩, + ⟨120422952650963015259718078214610696346124456811707873983682,120422952650963015259832974821487121224849944645665197933308⟩, + ⟨-3039352559173246197031771740531735530868016026703342470238,-3039352559173246196829780958322491125937131177851521304005⟩, + ⟨42135492541862565733311976189649613878799589477723720762672,42135492541862565733425915159937321146997599348024432922740⟩] +lemma tr1_2_1_8_calc (r : Fin 8) : taylorRowBox 1 2 1 8 r = tr1_2_1_8 r := by + revert r + decide +kernel +def tr1_2_1_9 : Fin 8 → RI := ![⟨779833604025562221498398157702137681874775517502392710792,779833604025562221506358921906305184168398335686632010140⟩, + ⟨-2854521289451035323172886535087471087345983456229616985811,-2854521289451035323167161426791854840127108764129512444687⟩, + ⟨11022766191162155551437782780866092126979961090335116005866,11022766191162155551557693327127756736741281437494652635028⟩, + ⟨-10990169595511938754204380392953252733058166544284711728774,-10990169595511938754160010432605066029228457873417658085342⟩, + ⟨-16337401349639138305045287858031402161472741734489304913896,-16337401349639138304918195258323697166872341531476219491007⟩, + ⟨-2339067799920539989339604975940938494999275305824012490658,-2339067799920539989285057772302821414045482321790614589364⟩, + ⟨-28856243452925562625406923868924236037634760339230897826559,-28856243452925562625311028675601871669190932793217666525165⟩, + ⟨32623167612491881472341723148381625816810156141130200539768,32623167612491881472395815713711583679767566046133712055076⟩] +lemma tr1_2_1_9_calc (r : Fin 8) : taylorRowBox 1 2 1 9 r = tr1_2_1_9 r := by + revert r + decide +kernel +def tr1_2_1_10 : Fin 8 → RI := ![⟨1434355440078774405135405152535894773523481098311689959942,1434355440078774405139768509944188811373051203238401742943⟩, + ⟨-529261691829913457554967154176668748503419927078466290690,-529261691829913457551829177336831111842969038277920290872⟩, + ⟨38566329141910460506149933417054208672700290452429714655068,38566329141910460506215657329596661511743917666586021917759⟩, + ⟨-20413380109038524286467058416314633580566217608553592626771,-20413380109038524286442738892439072408358763647493693040086⟩, + ⟨-35743863335987865740951285343312128793743495142954138527438,-35743863335987865740881624890859827022809684694694648766853⟩, + ⟨-28986131379081802217339846838109801344678867834193048030534,-28986131379081802217309949087236945319325673224599423368016⟩, + ⟨7985485461696171572507386417907821279531701056147122605752,7985485461696171572559947326834953987497863374382916577654⟩, + ⟨-20188850544975102986694279237567953435981819068382900726684,-20188850544975102986664630677500136008705372926191444611899⟩] +lemma tr1_2_1_10_calc (r : Fin 8) : taylorRowBox 1 2 1 10 r = tr1_2_1_10 r := by + revert r + decide +kernel +def tr1_2_1_11 : Fin 8 → RI := ![⟨-442901168238167734930653530728835299465156796701248448182,-442901168238167734928774852895353011553366724602275733039⟩, + ⟨933932069309601237065191814721658790777734764781075184903,933932069309601237066542895318396738180134991655843353027⟩, + ⟨-11681765061200868175544307212202825363848277019889500789942,-11681765061200868175516009264986517997261497667334319167082⟩, + ⟨7008608464470138644086445372097585195154515393901142296252,7008608464470138644096916334283754328204751429248465439530⟩, + ⟨12003971012461267659344977373737356113505099542418765427484,12003971012461267659374970229158997201881088507648656071862⟩, + ⟨7719044041949996931245462235779716867938845604417710775896,7719044041949996931258334947452322595838568175568175957715⟩, + ⟨5914489929008200571189603671503560551789292468510110368538,5914489929008200571212234184035001899092654490980688342605⟩, + ⟨-3195844548619102776864288068389340871869030971343685950917,-3195844548619102776851522647778305539843549810008575762585⟩] +lemma tr1_2_1_11_calc (r : Fin 8) : taylorRowBox 1 2 1 11 r = tr1_2_1_11 r := by + revert r + decide +kernel +def tr1_2_1_12 : Fin 8 → RI := ![⟨-130342737428687826152928705921099247720546413205567134331,-130342737428687826152092843573601955654457104295524273284⟩, + ⟨-119391488100094564291349208941568456618842809073159157665,-119391488100094564290748085439094387835519670076304096660⟩, + ⟨-3855526856005560324146708752209514085737032813859828986196,-3855526856005560324134118414383587183351850525709802989006⟩, + ⟨1856942764513797891497999502048136740754346515695209314459,1856942764513797891502658248149896280195388020477020580302⟩, + ⟨3219992776116326914136490683546506820804192255828875064519,3219992776116326914149835120838531337177146494717214945709⟩, + ⟨3284149044299951114046876123418188961404474490780612078113,3284149044299951114052603457187263507018162248848316708348⟩, + ⟨-3424954852392349762328170275463679127804543829191829756261,-3424954852392349762318101495711699369695356884117521666421⟩, + ⟨5162992835510645647824982661939400423523704486520036587970,5162992835510645647830662259712166713594163556325588174129⟩] +lemma tr1_2_1_12_calc (r : Fin 8) : taylorRowBox 1 2 1 12 r = tr1_2_1_12 r := by + revert r + decide +kernel +def tr1_2_1_13 : Fin 8 → RI := ![⟨89262019430313258857173188985662022980521706515380101282,89262019430313258857531625899596330222637712971330466516⟩, + ⟨-178377582614500843509631858273352602996933888783371412437,-178377582614500843509374082751130275498831815632261457376⟩, + ⟨2667591116952988579075971632375342972965843138731151840622,2667591116952988579081370657524823901686056399672487506982⟩, + ⟨-1467011723732302394411543494201932244440062398162104969694,-1467011723732302394409545717199074721907317857426221475520⟩, + ⟨-2532922519058823570111336875148906792123004248653661019214,-2532922519058823570105614474881487928926408309719588761445⟩, + ⟨-1995575789638586962575447706522830927967528906812109329644,-1995575789638586962572991694660282313301176371663443047672⟩, + ⟨-308835689976099447148444136439027171313527284498451963675,-308835689976099447144126413129121364845665397126058657628⟩, + ⟨-713444736185104749458922194427454162647176069444636138830,-713444736185104749456486652852682008224167363828018574020⟩] +lemma tr1_2_1_13_calc (r : Fin 8) : taylorRowBox 1 2 1 13 r = tr1_2_1_13 r := by + revert r + decide +kernel +def tr1_2_1_14 : Fin 8 → RI := ![⟨-3534260581249990899818173625383975833537694330870663136,-3534260581249990899682579008312413727563979717488804971⟩, + ⟨81998208146407034842703976258925659499152444574839012038,81998208146407034842801491252134494586190299201269190183⟩, + ⟨-115883917510773973632220432729265980891402214323489060378,-115883917510773973630178012656928554548637713895904039617⟩, + ⟨88026652085844786870621740068537399005993325856599761542,88026652085844786871377487585441802549617732843392765537⟩, + ⟨167212034262937711969394656198835209815896435865917685953,167212034262937711971559407212921022534810710560355044691⟩, + ⟨35134658705352103016992636101665629495110393512687284519,35134658705352103017921731222758255183715673241439233455⟩, + ⟨696990129920154057319934626654397888479661155453340977699,696990129920154057321567996477974963226753934315172433105⟩, + ⟨-664138654636671718755625732580910855879392910859330416845,-664138654636671718754704381251384310428193751393125969656⟩] +lemma tr1_2_1_14_calc (r : Fin 8) : taylorRowBox 1 2 1 14 r = tr1_2_1_14 r := by + revert r + decide +kernel +def tr1_2_1_15 : Fin 8 → RI := ![⟨-8835474969571806863471086887546093190947839923738210649,-8835474969571806863415184451839167122375117095770843453⟩, + ⟨10973202668567834442468134036309483851071327616277441905,10973202668567834442508337148769140446185272722189043997⟩, + ⟨-278002194681110785145804468410845006032061440368855065158,-278002194681110785144962427190933304371552760612060051026⟩, + ⟨147674916094618611960111014547545662009224055092968838589,147674916094618611960422591274388792022097894885515360818⟩, + ⟨246877220896377478049578399785392508571732655456207409814,246877220896377478050470875142982748563033995532566969533⟩, + ⟨225638995262891273986145805113480611716470885550657152575,225638995262891273986528848934580490566706632693060018915⟩, + ⟨-138506461131228163143212384623727598276082284688225110154,-138506461131228163142538985092542948355972086538103070089⟩, + ⟨272235795962494354495445188255396006972541239593259177423,272235795962494354495825039495655087456390909837649491064⟩] +lemma tr1_2_1_15_calc (r : Fin 8) : taylorRowBox 1 2 1 15 r = tr1_2_1_15 r := by + revert r + decide +kernel +def tr1_2_1_16 : Fin 8 → RI := ![⟨2240014314040695147564742913813375622857086105087838864,2240014314040695147583719167623105775780807717028302325⟩, + ⟨-22303968102712879426474902658513332796372043531735811400,-22303968102712879426461255588286004434960487459875828834⟩, + ⟨71972856216554751462200689905913410044384964272235100401,71972856216554751462486523388932688133648048093050864296⟩, + ⟨-39972750431626087507642132672330362863641418358785590367,-39972750431626087507536366993696165371078349510280721488⟩, + ⟨-68915267632923568705794287512812822638032792707055136403,-68915267632923568705491334006571481101663921542850159008⟩, + ⟨-54319840770266308219838413618381079751626938489927845353,-54319840770266308219708388214697308255773029318947128406⟩, + ⟨-59838676827514218727709304064813457285361295323035164649,-59838676827514218727480716521938467673733270082062635485⟩, + ⟨15291710829792500136497866031046556661743674050089640563,15291710829792500136626807703335023912609448426535890693⟩] +lemma tr1_2_1_16_calc (r : Fin 8) : taylorRowBox 1 2 1 16 r = tr1_2_1_16 r := by + revert r + decide +kernel +def tr1_2_1_17 : Fin 8 → RI := ![⟨266015705099969733779804350739196274739841186506077315,266015705099969733785848889618306231340111529612925216⟩, + ⟨5327730088228106091299835399593659356058274103987479097,5327730088228106091304182424428005354249130937902447280⟩, + ⟨9473912987245889549740398605141134429146339825521074564,9473912987245889549831445637838038838675241909236382187⟩, + ⟨-4936082905737363420474077302069855594495711089912897149,-4936082905737363420440387577901495901815355905249536912⟩, + ⟨-7378775832876900467814563927232750236983849977811053043,-7378775832876900467718063623987505952404760293728400838⟩, + ⟨-8528796699930660253996655970357889584946870892789470000,-8528796699930660253955238754095026795118611500757232787⟩, + ⟨33230837993347592249771695447389098181613125765545045422,33230837993347592249844507831962307841412024274832295755⟩, + ⟨-34529038043608549069284896228904538907635559261070653203,-34529038043608549069243824215477100345138155603547459417⟩] +lemma tr1_2_1_17_calc (r : Fin 8) : taylorRowBox 1 2 1 17 r = tr1_2_1_17 r := by + revert r + decide +kernel +def tr1_2_1_18 : Fin 8 → RI := ![⟨-218039028999099951805213276780383933503122936331375268,-218039028999099951802990848380269846570522501342642826⟩, + ⟨3208014012659002593995591958989531562914947914106672947,3208014012659002593997190253192231045794010069939130726⟩, + ⟨-7439032852403116010566988954494971080487264127619922796,-7439032852403116010533513198072222111800390192930238530⟩, + ⟨4064921789774756940001707783346430618180117473423750666,4064921789774756940014094666990159594639228754454957318⟩, + ⟨6649760954148271870441537024631254244817588909767110694,6649760954148271870477017814616573853144563330635072731⟩, + ⟨6014423329567659388246255958875494246015119323670862128,6014423329567659388261484051455030042832097918504894103⟩, + ⟨-2357192980747990926112694144220395302887319345984939976,-2357192980747990926085922819788861632782989381514993063⟩, + ⟨7098977205695569190429925433359902986126362662288841355,7098977205695569190445026603345014295765042491278360252⟩] +lemma tr1_2_1_18_calc (r : Fin 8) : taylorRowBox 1 2 1 18 r = tr1_2_1_18 r := by + revert r + decide +kernel +def tr1_2_1_19 : Fin 8 → RI := ![⟨24058795974929523596199035429338775403278355059789711,24058795974929523596925458190237194223567969020672170⟩, + ⟨-2124163454905619585635040980843678735412926712454125179,-2124163454905619585634518562534290843152387891081194541⟩, + ⟨701556618009034121266423620734873918686115628671510290,701556618009034121277365503677756403613407811134325154⟩, + ⟨-379762162980224243890614378178667805793771868603940377,-379762162980224243886565602427781821739622164738475822⟩, + ⟨-654044017031029882458089878725920512250534275642748639,-654044017031029882446492630681436155653054361980324035⟩, + ⟨-546612496725381996179611974219067333723038745664801961,-546612496725381996174634521154004050291572883093081646⟩, + ⟨-2624234173393723848227124519890984474854283333796812582,-2624234173393723848218374047026573093813506691285729659⟩, + ⟨1327144228216402997125537216080735129762617387914623634,1327144228216402997130473183238677473764643218559152487⟩] +lemma tr1_2_1_19_calc (r : Fin 8) : taylorRowBox 1 2 1 19 r = tr1_2_1_19 r := by + revert r + decide +kernel +def tr1_2_1_20 : Fin 8 → RI := ![⟨8517952770155721842433315145476066619722651782230768,8517952770155721842614985027686863817922918199300879⟩, + ⟨-8012909652566884268813340842584159179974286577757799,-8012909652566884268682690100561883239511111748139873⟩, + ⟨352222018991470641770694482330783246195351685746884609,352222018991470641773430919970645940841446213087407418⟩, + ⟨-198336338591772431079360110623984150291810441954444363,-198336338591772431078347558907095398723479360394670615⟩, + ⟨-315710114506490844208726636569473740244602573872607157,-315710114506490844205826299741469821142922901288537073⟩, + ⟨-283896253650784950560330751388281096360356634499766757,-283896253650784950559085948278253266042042969835255926⟩, + ⟨907072710678274222151828996820349976499309489297132900,907072710678274222154017388291800568201680809779887779⟩, + ⟨-890894489422101607634701107415021563809876890661405578,-890894489422101607633466679447644256185119275093454907⟩] +lemma tr1_2_1_20_calc (r : Fin 8) : taylorRowBox 1 2 1 20 r = tr1_2_1_20 r := by + revert r + decide +kernel +def tr1_2_1 : Fin 21 → Fin 8 → RI := ![tr1_2_1_0,tr1_2_1_1,tr1_2_1_2,tr1_2_1_3,tr1_2_1_4,tr1_2_1_5,tr1_2_1_6,tr1_2_1_7,tr1_2_1_8,tr1_2_1_9,tr1_2_1_10,tr1_2_1_11,tr1_2_1_12,tr1_2_1_13,tr1_2_1_14,tr1_2_1_15,tr1_2_1_16,tr1_2_1_17,tr1_2_1_18,tr1_2_1_19,tr1_2_1_20] +lemma tr1_2_1_mem (l : Fin 21) (r : Fin 8) : (tr1_2_1 l r).Mem (taylorRow 1 (nearNode 2) (nearDisplacement 2 1) l.val r) := by + have he : taylorRowBox 1 2 1 l r = tr1_2_1 l r := by + fin_cases l + · exact tr1_2_1_0_calc r + · exact tr1_2_1_1_calc r + · exact tr1_2_1_2_calc r + · exact tr1_2_1_3_calc r + · exact tr1_2_1_4_calc r + · exact tr1_2_1_5_calc r + · exact tr1_2_1_6_calc r + · exact tr1_2_1_7_calc r + · exact tr1_2_1_8_calc r + · exact tr1_2_1_9_calc r + · exact tr1_2_1_10_calc r + · exact tr1_2_1_11_calc r + · exact tr1_2_1_12_calc r + · exact tr1_2_1_13_calc r + · exact tr1_2_1_14_calc r + · exact tr1_2_1_15_calc r + · exact tr1_2_1_16_calc r + · exact tr1_2_1_17_calc r + · exact tr1_2_1_18_calc r + · exact tr1_2_1_19_calc r + · exact tr1_2_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 2 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows13.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows13.lean new file mode 100644 index 0000000000000000000000000000000000000000..de43280832f036933785954bbcd5e06093a204f8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows13.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_3_0_0 : Fin 8 → RI := ![⟨-11059279082733179871736344042652584899983799582811302550020,-11059279082733179871625877193789854995975247140571299380461⟩, + ⟨14645945883342238012277545534511090050227016598512045841959,14645945883342238012356989499563611806386811634382731673082⟩, + ⟨-140158703513230320023153974522042976349751372884128290582624,-140158703513230320021490046305250249130589294832643903642155⟩, + ⟨78575171898651585589792777071146745382508764051600267949797,78575171898651585590408472948163275251018236431427613365337⟩, + ⟨133435711463314910123075859956898532027036433856296461694132,133435711463314910124839449309369182905147038128775202771874⟩, + ⟨90293374102516596230115029893447074059130171756555456756970,90293374102516596230871949396361865306213342576153164253844⟩, + ⟨-27254235177819368704240546533312916089377140660648410235167,-27254235177819368702909865261223071333658870054130018625077⟩, + ⟨50438045375783019843166297611874032702356933125888931677977,50438045375783019843916908368362050152683600901006125002089⟩] +lemma tr1_3_0_0_calc (r : Fin 8) : taylorRowBox 1 3 0 0 r = tr1_3_0_0 r := by + revert r + decide +kernel +def tr1_3_0_1 : Fin 8 → RI := ![⟨-16169458232179271502318003127617894629029695760341953856308,-16169458232179271502222492590558554025484110111040626426530⟩, + ⟨9472835519168483708610074012017354558001668674193749000871,9472835519168483708678761911109448569791908751321303768073⟩, + ⟨-223134675493174058056537753808406870039189697776967475144004,-223134675493174058055099107922802377049644150317022393076124⟩, + ⟨127402138077337064919750088437176823006529923576714112651300,127402138077337064920282424106100433795565483001082021122562⟩, + ⟨214455736761753488572079467186082493757640028740787563754139,214455736761753488573604280901138108449917280804018539920810⟩, + ⟨145642997411813816116363973612771948044021238287149868482100,145642997411813816117018412378636357556308388648962122506417⟩, + ⟨-42609898105056929821618372148904878074135586737982128372038,-42609898105056929820467854285399611855106528520814545608759⟩, + ⟨80093251330753138316096901544971873521474676492144728840677,80093251330753138316745885717255049033380201952466109143683⟩] +lemma tr1_3_0_1_calc (r : Fin 8) : taylorRowBox 1 3 0 1 r = tr1_3_0_1 r := by + revert r + decide +kernel +def tr1_3_0_2 : Fin 8 → RI := ![⟨3743358731973392777463041415470334496821973956978309399543,3743358731973392777524561038556224292076329563821733212045⟩, + ⟨-16646239450745409213626260772847862451164819332850405457306,-16646239450745409213582017972082058812139702670834697017877⟩, + ⟨18518315502184978250053048291739439780608914685333891893879,18518315502184978250979699479759820149261418888681192499975⟩, + ⟨-6210809590290530386844134423613783547564549182771358160427,-6210809590290530386501249850669310342408035493079766311810⟩, + ⟨-13923222322449133141483231642147086085782454381970963316000,-13923222322449133140501078594820402861849843822975748871323⟩, + ⟨-9233754332695435924407332020077127187384968382343347695954,-9233754332695435923985799198122452423963683093845606343553⟩, + ⟨7463712716200253989255861547688542891285082413155122501070,7463712716200253989996925596596404659058073953557865402347⟩, + ⟨-9733762432927669206911535821565778073111780197873940425411,-9733762432927669206493516376841728373682543542520148230052⟩] +lemma tr1_3_0_2_calc (r : Fin 8) : taylorRowBox 1 3 0 2 r = tr1_3_0_2 r := by + revert r + decide +kernel +def tr1_3_0_3 : Fin 8 → RI := ![⟨15099556695760201420131187589286407789482939053200689469318,15099556695760201420169770022594176991789042402523852366938⟩, + ⟨-10049941183787362853028641478125570284637956298267025418496,-10049941183787362853000894316747115964748849773002153725650⟩, + ⟨196391591166486467455732936243078355535647684727845666689934,196391591166486467456314091586163862525781814578356347716261⟩, + ⟨-109636516649905089531729794423291128357516952638970846451132,-109636516649905089531514752124496739194685333262929606825207⟩, + ⟨-186466832534776970389124083352139052535955319747521577299331,-186466832534776970388508119655583195531861261942132746527864⟩, + ⟨-127707313317913829400673398087077072313362391518346334352912,-127707313317913829400409031025376067905222563768216265857373⟩, + ⟨43293995634665597979141652763542225987894792274002080018278,43293995634665597979606415920499944907670531604637878740049⟩, + ⟨-76282898318634368285704113202407899800882026520181042901541,-76282898318634368285441949578216822864561923344121091553497⟩] +lemma tr1_3_0_3_calc (r : Fin 8) : taylorRowBox 1 3 0 3 r = tr1_3_0_3 r := by + revert r + decide +kernel +def tr1_3_0_4 : Fin 8 → RI := ![⟨3145323047950405952433666305736828664295264496967021009129,3145323047950405952453763030581605192151198086949704178777⟩, + ⟨8097085763919610745549521823409760751249272796049295447138,8097085763919610745563974697932333922990064216554695542215⟩, + ⟨69437384426929880116624997055024107878580281084425276587187,69437384426929880116927707849048507243947636132410515587702⟩, + ⟨-42220162638747298205755779701146273213033473772593823836836,-42220162638747298205643768986970044223123365759550853240559⟩, + ⟨-68980895058182356808512282356623539146852398389876881863178,-68980895058182356808191440671351467716333645989832073742515⟩, + ⟨-48044960444839755546587064477701709039725040933807213918022,-48044960444839755546449361599927689541680809245843008801996⟩, + ⟨13604057242670689771190945695066193296399070245117768221123,13604057242670689771433030407750033651048514746070023842698⟩, + ⟨-26324336776067425529930266414702184030797960133855989805360,-26324336776067425529793711258175753316117041685029661876395⟩] +lemma tr1_3_0_4_calc (r : Fin 8) : taylorRowBox 1 3 0 4 r = tr1_3_0_4 r := by + revert r + decide +kernel +def tr1_3_0_5 : Fin 8 → RI := ![⟨-5348417624397959270707251233005387323204267497053309638457,-5348417624397959270698089522534160097832100820682904116147⟩, + ⟨5370582887483582802024460241583095718735597247901192951874,5370582887483582802031049029201888407026115055568139279049⟩, + ⟨-59242794992467083727754939971319027822789843845641792391522,-59242794992467083727616939940328707393972793602048987881711⟩, + ⟨31461849166740182989954963516248534388349496160579862150787,31461849166740182990006027047298450576300689430214962794008⟩, + ⟨54775042257880333666003499471697090195436447855392344587097,54775042257880333666149765027424967597803028699924975380861⟩, + ⟨37724303102318870336007995395225460313738235105552006657934,37724303102318870336070771489701867970012224143679120322313⟩, + ⟨-15967934274066124943977513888199836341149064129904390698460,-15967934274066124943867152122096124336835763119843030368804⟩, + ⟨25561653265701146971742389398820543170076994309240817686653,25561653265701146971804642269229079680087274430375441322464⟩] +lemma tr1_3_0_5_calc (r : Fin 8) : taylorRowBox 1 3 0 5 r = tr1_3_0_5 r := by + revert r + decide +kernel +def tr1_3_0_6 : Fin 8 → RI := ![⟨-2366818984268782742047181282731340574855685099961524723800,-2366818984268782742042798006340675242980130140261284377394⟩, + ⟨-2119294827311223305728452510410308025161036557037836430639,-2119294827311223305725300208522698470188931302932032216237⟩, + ⟨-41475428113012642871328733529854528262551654359081674033264,-41475428113012642871262709583817025834055201358575585402273⟩, + ⟨24042030412613160145969058891941421771724132481200699570606,24042030412613160145993489435865145910461075292715933236401⟩, + ⟨40122868819565123535603147756141399750361678793472277403708,40122868819565123535673126212592503767516181354741666002471⟩, + ⟨28309454833124150273536527493392016519233174674396981837393,28309454833124150273566561729216670224743269354698328825295⟩, + ⟨-10588874831287801467583442484461088475094541734300538145972,-10588874831287801467530641631902048831491534672143207771252⟩, + ⟨18077861931357113896826056629191101224804656920542028596208,18077861931357113896855840536679164847484716754688978695598⟩] +lemma tr1_3_0_6_calc (r : Fin 8) : taylorRowBox 1 3 0 6 r = tr1_3_0_6 r := by + revert r + decide +kernel +def tr1_3_0_7 : Fin 8 → RI := ![⟨795321234717809732528132376782087103827782397772700160124,795321234717809732529568402170964799922657244953950341550⟩, + ⟨-2236338314971058651555159213220574844100192755466897234968,-2236338314971058651554126473064679370866098666891752965782⟩, + ⟨3486670233598933097828487602370560715044743968578626324117,3486670233598933097850118011757473465127057428105827173549⟩, + ⟨-1108724887907706170489712555906375737838428245827351293082,-1108724887907706170481708752764343127928483689233922020008⟩, + ⟨-2553507845032377294129275502150267988044300533786257474084,-2553507845032377294106349537370618217464072277410825836365⟩, + ⟨-1598582142027777200602697050052832972119698153205886810084,-1598582142027777200592857395567006671677629397290343456969⟩, + ⟨1688651428975910280771407071177230661390078267785680849465,1688651428975910280788705401934989932284637293152629786385⟩, + ⟨-1931966986748349708218070504296078967095829145706457805998,-1931966986748349708208312861036218167950441311376100163139⟩] +lemma tr1_3_0_7_calc (r : Fin 8) : taylorRowBox 1 3 0 7 r = tr1_3_0_7 r := by + revert r + decide +kernel +def tr1_3_0_8 : Fin 8 → RI := ![⟨659181723177625751811523683451744640065826426242420909980,659181723177625751812210068862304282459318095818392727392⟩, + ⟨274997387323071737154971885360489017719918506426320764250,274997387323071737155465510181716613383654184178875752647⟩, + ⟨10107916749675829727535786928276898166738975325294820931352,10107916749675829727546125740907481699092617618404331355640⟩, + ⟨-5637790246859548623612590500638984070425384956245465528612,-5637790246859548623608764876280998682568799781155986646154⟩, + ⟨-9565220989723732773940728089270740439148993363796031318495,-9565220989723732773929770032489739884133145485738209250257⟩, + ⟨-6859085543649851350441676274839600609582537620256054128589,-6859085543649851350436973157931863010075440454730223675604⟩, + ⟨3330504094596104273883221542844287494849052436795641093081,3330504094596104273891489726645100983250473211519812392877⟩, + ⟨-5107781563513531293148159938952247556470431690691817826976,-5107781563513531293143496021429272443555170505006947202883⟩] +lemma tr1_3_0_8_calc (r : Fin 8) : taylorRowBox 1 3 0 8 r = tr1_3_0_8 r := by + revert r + decide +kernel +def tr1_3_0_9 : Fin 8 → RI := ![⟨3514566968700022957922345478403920630366388245098353984,3514566968700022958136689046116378985825335347002929556⟩, + ⟨783710862426313002887376953075711600670662748353511948613,783710862426313002887531101610371123294810435726199130474⟩, + ⟨2140524271298296214856561547111772794088152024893096302764,2140524271298296214859790138441467061072019406843280084787⟩, + ⟨-1379916818563096208783983933286668996063453364334781200216,-1379916818563096208782789272151000273104231453412557107031⟩, + ⟨-2192479087181250693518014584584656435224739956752838756475,-2192479087181250693514592616473997395253771954488494286626⟩, + ⟨-1642524583412486740181962574810041021979402296610322328290,-1642524583412486740180493891410003725972928296460148919700⟩, + ⟨574173244279809757026846496665656425980766873568269268402,574173244279809757029428474642047746916102014463665400735⟩, + ⟨-1060534837621488504593190923734932113370529220418161399568,-1060534837621488504591734481471122065764366689184437645293⟩] +lemma tr1_3_0_9_calc (r : Fin 8) : taylorRowBox 1 3 0 9 r = tr1_3_0_9 r := by + revert r + decide +kernel +def tr1_3_0_10 : Fin 8 → RI := ![⟨-93369571419371433430553228273480970479724670079665480825,-93369571419371433430471486787701015918483667645343619974⟩, + ⟨26758025515408711618601171334367126853253549950016275795,26758025515408711618659957004439248372907201464802085585⟩, + ⟨-1071387319303291916133257103112457639696335360624489762915,-1071387319303291916132025856217100744123743864371236851800⟩, + ⟨551812843867031931912921658710875427144588472205148140945,551812843867031931913377251464537682422470380612531973566⟩, + ⟨969157070117930326181964523856540170462294525382793111466,969157070117930326183269516400529679689851702471710108667⟩, + ⟨705925862920631738682656114254340866219995966298950671578,705925862920631738683216207401005992778030701828591673391⟩, + ⟨-513611487010423047027817002728957132038995003174730072498,-513611487010423047026832346560929668494506775051863798137⟩, + ⟨674797150811542085250126417132585831903853606849806343019,674797150811542085250681842032242403275582381694791483145⟩] +lemma tr1_3_0_10_calc (r : Fin 8) : taylorRowBox 1 3 0 10 r = tr1_3_0_10 r := by + revert r + decide +kernel +def tr1_3_0_11 : Fin 8 → RI := ![⟨-19181415424579118330259639837162659179325667065673505694,-19181415424579118330230178825473649118760756104626498035⟩, + ⟨-218484174694992689858113782199203375037550625390966441299,-218484174694992689858092594851104594568072906879159832711⟩, + ⟨-599388554701943549888037056618088027643716570505367305045,-599388554701943549887593294447246124297334028059590527417⟩, + ⟨353191350277892672069004701076499275329117343611778965148,353191350277892672069168904397639906152913766795045190560⟩, + ⟨582576739754389781626974254221590434265935279431219389137,582576739754389781627444595569418148578728279278355483287⟩, + ⟨440852459819634118622184100596972731072576378743597204376,440852459819634118622385967624265874610852917943142583521⟩, + ⟨-239699334836085100747563151086588439896716835200254457067,-239699334836085100747208264377567936143969409226048787550⟩, + ⟨361472575292632506957156329798892774975608112561589847717,361472575292632506957356514311139142351242018317979202398⟩] +lemma tr1_3_0_11_calc (r : Fin 8) : taylorRowBox 1 3 0 11 r = tr1_3_0_11 r := by + revert r + decide +kernel +def tr1_3_0_12 : Fin 8 → RI := ![⟨6014835977648519649347251622563039821903619036926027357,6014835977648519649354994225523534567409232085448875821⟩, + ⟨-26346445090842121747982017206869063744483627085423968104,-26346445090842121747976448992654770581111521155723004947⟩, + ⟨-15794932902174802959132483872760876606729244912030075492,-15794932902174802959015859422296557603920373706456513879⟩, + ⟨19024218987760111709210526208738606088669891338386964596,19024218987760111709253680229876704817899038891787464831⟩, + ⟨24674131533783783087403264081885458595945839973667207365,24674131533783783087526873764840380872208968801157788347⟩, + ⟨19561132626791115984663040579477847330344930680037370346,19561132626791115984716092941086639242502087153099673735⟩, + ⟨21338026553678972626466394369425933268335843078993314766,21338026553678972626559661597019843163053818773054386353⟩, + ⟨-9328113889642695621493314804706458934112121237074911001,-9328113889642695621440704622369917313780365992306839104⟩] +lemma tr1_3_0_12_calc (r : Fin 8) : taylorRowBox 1 3 0 12 r = tr1_3_0_12 r := by + revert r + decide +kernel +def tr1_3_0_13 : Fin 8 → RI := ![⟨2995990010601987236497144912938057812007693154788779925,2995990010601987236500503142059374842540892935303635607⟩, + ⟨47187954768798597941480600164257573122435310748790110721,47187954768798597941483015287340694188321426940704232284⟩, + ⟨68498840454997763442612217680004012858296632215910405728,68498840454997763442662801653873390529590843888253997957⟩, + ⟨-38379838038319573522569703693366628682520903678023147219,-38379838038319573522550986332913695315483617977397453802⟩, + ⟨-64473071175807681402625387917860576036377732563790928952,-64473071175807681402571774212090299943420310601319244064⟩, + ⟨-50120265808214328419115740595471741305117448948871941008,-50120265808214328419092729989529550138918245152036553926⟩, + ⟨39649127881485777848189413026909297134254629833078116412,39649127881485777848229866182192424780242177970903593226⟩, + ⟨-51898297458857563399078590808771879599992674554769377796,-51898297458857563399055771990952442306757092657785764812⟩] +lemma tr1_3_0_13_calc (r : Fin 8) : taylorRowBox 1 3 0 13 r = tr1_3_0_13 r := by + revert r + decide +kernel +def tr1_3_0_14 : Fin 8 → RI := ![⟨117055451451147052655304483241918365487849067552774864,117055451451147052656394796699670744405670183224918695⟩, + ⟨8394090639419820477075731240140455002894248242250123074,8394090639419820477076515356144569004444694378864716032⟩, + ⟨18458339359213365347817270253304095834290271802292851477,18458339359213365347833693310060892229203066651884138913⟩, + ⟨-11374404732514054813832361212748193860799533176298980006,-11374404732514054813826284262885108057196895280766298044⟩, + ⟨-18397876732611895906271187046091830684329188725451934189,-18397876732611895906253780328793530160650873323145295941⟩, + ⟨-14306584323900945434064066081815441110085849680440557164,-14306584323900945434056595247504433271393311048172120449⟩, + ⟨6387429080072809053406031912577376366849376376591413179,6387429080072809053419165804880268405618345153403449738⟩, + ⟨-10974856599605080795223982751180791304491520036203041201,-10974856599605080795216574184565030854248342885414889183⟩] +lemma tr1_3_0_14_calc (r : Fin 8) : taylorRowBox 1 3 0 14 r = tr1_3_0_14 r := by + revert r + decide +kernel +def tr1_3_0_15 : Fin 8 → RI := ![⟨-203518447417419649482549760736225273402782960755720889,-203518447417419649482211670519138275041519503751447550⟩, + ⟨-8000357704021465454734739641155965032262313952959449973,-8000357704021465454734496498279778351574701544331169975⟩, + ⟨-2735420818958253919562715689373095542254307277836778579,-2735420818958253919557623140267430809088418198032817456⟩, + ⟨1351911335204989664319570271362353398561006846114064566,1351911335204989664321454644414664436549474202312821250⟩, + ⟨2369685762981664452054803956744520142092155074322167259,2369685762981664452060201524561668830483214699792649039⟩, + ⟨1969264292953168236560478452348224071959371714901163621,1969264292953168236562795048530701056242315483784483077⟩, + ⟨-3224355877170606647506043480282619547561992143475693925,-3224355877170606647501970852848275827713233536762912761⟩, + ⟨3391794104063600725582012156132969267242223902507063204,3391794104063600725584309444016223487198845990709995094⟩] +lemma tr1_3_0_15_calc (r : Fin 8) : taylorRowBox 1 3 0 15 r = tr1_3_0_15 r := by + revert r + decide +kernel +def tr1_3_0_16 : Fin 8 → RI := ![⟨-52749430350063845447718754365692550997254567214379360,-52749430350063845447616883650679087591593678338647525⟩, + ⟨-1822105483283876917974183639252457538193314575844670734,-1822105483283876917974110377331817580388261914011935367⟩, + ⟨-2320912945023439259885707977135172711747957570798410084,-2320912945023439259884173529841613062088884771022832202⟩, + ⟨1352165041999190631831001368129734133687919778630106303,1352165041999190631831569152763596238899238915206714043⟩, + ⟨2228559534646142103242136433869451222967044205898658874,2228559534646142103243762787028755961617542070770989335⟩, + ⟨1777086473009694397069420730820137630275021804457408802,1777086473009694397070118749565981538871430147455849032⟩, + ⟨-1347812105662076991329518202495035060905611793746948564,-1347812105662076991328291070067377073470590431140914502⟩, + ⟨1826717117495338789898236492342053728862477575229164374,1826717117495338789898928693261994985446935267784021021⟩] +lemma tr1_3_0_16_calc (r : Fin 8) : taylorRowBox 1 3 0 16 r = tr1_3_0_16 r := by + revert r + decide +kernel +def tr1_3_0_17 : Fin 8 → RI := ![⟨2283570027410123963994627265594279685518174141497261,2283570027410123964023771847966468411255528124174058⟩, + ⟨1088374367874257266005984411176109495129824374342143816,1088374367874257266006005370959107062986388132870314501⟩, + ⟨-237220844988767396224955410858285204672600340364228816,-237220844988767396224516414964886367866378589786756930⟩, + ⟨153581739570884966481943732071318685993156844580241898,153581739570884966482106171748260489981570535581752522⟩, + ⟨245851688150285160168317183326449208391905002128401459,245851688150285160168782472920518256227025948243564524⟩, + ⟨184969423515337337576973427615418285148933231865947496,184969423515337337577173126467541390641191402583957418⟩, + ⟨38462301905236848236814980695125410934024832402329557,38462301905236848237166055703333168281163048666343313⟩, + ⟨51462028778771488380816057269517251866936181898232304,51462028778771488381014091677382065379387957375487037⟩] +lemma tr1_3_0_17_calc (r : Fin 8) : taylorRowBox 1 3 0 17 r = tr1_3_0_17 r := by + revert r + decide +kernel +def tr1_3_0_18 : Fin 8 → RI := ![⟨4040333468820874775200126053832306377679647971835795,4040333468820874775210716929772526491870978701008052⟩, + ⟨308089442950380603826816603049185061707224290067793907,308089442950380603826824219643537773273852116685546916⟩, + ⟨135873059397873134190696636633819753854247899788812030,135873059397873134190856163745430696722839644969157796⟩, + ⟨-76402998925925107774529210257200074978618905892168680,-76402998925925107774470181157254350489570806047395029⟩, + ⟨-126844032691334982939482371284420523776130348980683027,-126844032691334982939313289281360738106073514297259527⟩, + ⟨-104760902511705250116488738839939730608802177225574540,-104760902511705250116416170094921464689061372703093851⟩, + ⟨123832336603365609021648066192251833164858324958326011,123832336603365609021775643654548637084334950213198139⟩, + ⟨-142753937090494836569906764977795168436474891801232917,-142753937090494836569834801076613124251446381558800870⟩] +lemma tr1_3_0_18_calc (r : Fin 8) : taylorRowBox 1 3 0 18 r = tr1_3_0_18 r := by + revert r + decide +kernel +def tr1_3_0_19 : Fin 8 → RI := ![⟨720189897752385668375706218597460817542687767724115,720189897752385668378425017365753124378376831598263⟩, + ⟨-119749917163282164848987664594297702649669586097421857,-119749917163282164848985709327569903157978770054293234⟩, + ⟨40926916940511385196800382722461662965422301812899270,40926916940511385196841335153310571573702443661996846⟩, + ⟨-24134103700349232439506348874946486198914763701478693,-24134103700349232439491195431063027778477918999855566⟩, + ⟨-39623426214233680106821744117053703538239319916115337,-39623426214233680106778338836480222979411682428117553⟩, + ⟨-31566383680579705139516690385940185755043265361830758,-31566383680579705139498061160583786575382380663558008⟩, + ⟨19591792168647889175379745862317250152026296701043540,19591792168647889175412496453419723206494905156291022⟩, + ⟨-29571107680135122378327202126288038495814958636184791,-29571107680135122378308728171254185196043745033505557⟩] +lemma tr1_3_0_19_calc (r : Fin 8) : taylorRowBox 1 3 0 19 r = tr1_3_0_19 r := by + revert r + decide +kernel +def tr1_3_0_20 : Fin 8 → RI := ![⟨-106427935019894359382143057616218601298807142200428,-106427935019894359381518615476987330873557066351428⟩, + ⟨-42796844107828982506310674192404309010482969099095429,-42796844107828982506310225115057155758792453970715318⟩, + ⟨-1997621093641122437171333606680666796017635486358059,-1997621093641122437161927826516215185492101066594320⟩, + ⟨982947815563696447130365622162197267524690409686030,982947815563696447133846000712218030333231705134301⟩, + ⟨1660240485441133722612026488947356151694021120986345,1660240485441133722621995629205509021302105034910615⟩, + ⟨1597824228513762050879466596392720108083577966067708,1597824228513762050883745277650327753833829957955439⟩, + ⟨-5413737614846272533894914783579425114566432489974119,-5413737614846272533887392767088787787384175050578600⟩, + ⟨4783327748973596986287146551720998978785494825248441,4783327748973596986291389571151509451640290214491225⟩] +lemma tr1_3_0_20_calc (r : Fin 8) : taylorRowBox 1 3 0 20 r = tr1_3_0_20 r := by + revert r + decide +kernel +def tr1_3_0 : Fin 21 → Fin 8 → RI := ![tr1_3_0_0,tr1_3_0_1,tr1_3_0_2,tr1_3_0_3,tr1_3_0_4,tr1_3_0_5,tr1_3_0_6,tr1_3_0_7,tr1_3_0_8,tr1_3_0_9,tr1_3_0_10,tr1_3_0_11,tr1_3_0_12,tr1_3_0_13,tr1_3_0_14,tr1_3_0_15,tr1_3_0_16,tr1_3_0_17,tr1_3_0_18,tr1_3_0_19,tr1_3_0_20] +lemma tr1_3_0_mem (l : Fin 21) (r : Fin 8) : (tr1_3_0 l r).Mem (taylorRow 1 (nearNode 3) (nearDisplacement 3 0) l.val r) := by + have he : taylorRowBox 1 3 0 l r = tr1_3_0 l r := by + fin_cases l + · exact tr1_3_0_0_calc r + · exact tr1_3_0_1_calc r + · exact tr1_3_0_2_calc r + · exact tr1_3_0_3_calc r + · exact tr1_3_0_4_calc r + · exact tr1_3_0_5_calc r + · exact tr1_3_0_6_calc r + · exact tr1_3_0_7_calc r + · exact tr1_3_0_8_calc r + · exact tr1_3_0_9_calc r + · exact tr1_3_0_10_calc r + · exact tr1_3_0_11_calc r + · exact tr1_3_0_12_calc r + · exact tr1_3_0_13_calc r + · exact tr1_3_0_14_calc r + · exact tr1_3_0_15_calc r + · exact tr1_3_0_16_calc r + · exact tr1_3_0_17_calc r + · exact tr1_3_0_18_calc r + · exact tr1_3_0_19_calc r + · exact tr1_3_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 3 0 l r +def tr1_3_1_0 : Fin 8 → RI := ![⟨-11059279082733179871736344042652584899983799582811302550020,-11059279082733179871625877193789854995975247140571299380461⟩, + ⟨14645945883342238012277545534511090050227016598512045841959,14645945883342238012356989499563611806386811634382731673082⟩, + ⟨-140158703513230320023153974522042976349751372884128290582624,-140158703513230320021490046305250249130589294832643903642155⟩, + ⟨78575171898651585589792777071146745382508764051600267949797,78575171898651585590408472948163275251018236431427613365337⟩, + ⟨133435711463314910123075859956898532027036433856296461694132,133435711463314910124839449309369182905147038128775202771874⟩, + ⟨90293374102516596230115029893447074059130171756555456756970,90293374102516596230871949396361865306213342576153164253844⟩, + ⟨-27254235177819368704240546533312916089377140660648410235167,-27254235177819368702909865261223071333658870054130018625077⟩, + ⟨50438045375783019843166297611874032702356933125888931677977,50438045375783019843916908368362050152683600901006125002089⟩] +lemma tr1_3_1_0_calc (r : Fin 8) : taylorRowBox 1 3 1 0 r = tr1_3_1_0 r := by + revert r + decide +kernel +def tr1_3_1_1 : Fin 8 → RI := ![⟨10779638821452847668148328393705702683656073407360417617687,10779638821452847668212002085078596419353130506894635904206⟩, + ⟨-6315223679445655805785841274072965713194605834214202512049,-6315223679445655805740049341344903038667779116129166000580⟩, + ⟨148756450328782705370066071948534918033096100211348262050750,148756450328782705371025169205604580026126465184644983429337⟩, + ⟨-84934758718224709946854949404066955863710322000721347415042,-84934758718224709946500058958117882004353282384476075100866⟩, + ⟨-142970491174502325715736187267425405633278187202679026613874,-142970491174502325714719644790721662505093352493858375836092⟩, + ⟨-97095331607875877411345608252424238370872259099308081670945,-97095331607875877410909315741847965362680825524766578988066⟩, + ⟨28406598736704619880311902856933074570071019013876363739173,28406598736704619881078914765936585382757057825321418914693⟩, + ⟨-53395500887168758877830590478170032688920134634977406095789,-53395500887168758877397934363314582347649784328096485893784⟩] +lemma tr1_3_1_1_calc (r : Fin 8) : taylorRowBox 1 3 1 1 r = tr1_3_1_1 r := by + revert r + decide +kernel +def tr1_3_1_2 : Fin 8 → RI := ![⟨1663714991988174567761351740209037554143099536434804177575,1663714991988174567788693794913877463145035361698548094243⟩, + ⟨-7398328644775737428278338121265716644962141925711291314359,-7398328644775737428258674654258692805395423409259865341278⟩, + ⟨8230362445415545888912465907439751013603962082370618619502,8230362445415545889324310879893253399671741728302752222212⟩, + ⟨-2760359817906902394152948632717237132250910747898381404635,-2760359817906902394000555489186360152181349108035451694137⟩, + ⟨-6188098809977392507325880729843149371458868614209317029334,-6188098809977392506889368264364623494155486143544777276143⟩, + ⟨-4103890814531304855292147564478723194393319281041487864869,-4103890814531304855104799643609978855094970263931380597134⟩, + ⟨3317205651644557328558160687861574618348925516957832222698,3317205651644557328887522487376179848470255090470162401044⟩, + ⟨-4326116636856741869738460365140345810271902310166195744628,-4326116636856741869552673945262990388303352685564510324467⟩] +lemma tr1_3_1_2_calc (r : Fin 8) : taylorRowBox 1 3 1 2 r = tr1_3_1_2 r := by + revert r + decide +kernel +def tr1_3_1_3 : Fin 8 → RI := ![⟨-4473942724669689309679931858546422812381938489636696997612,-4473942724669689309668500026455231937624574534281685768686⟩, + ⟨2977760350751811215703968686443589915481140673482119622415,2977760350751811215712190067592761565818653718005044568444⟩, + ⟨-58190101086366360727796767877381885192824241356550028952967,-58190101086366360727624573701652846084636351030472790130350⟩, + ⟨32484893822194100601930296925776811613240098744571735355617,32484893822194100601994013162456630624449467448583954504040⟩, + ⟨55249431862156139374372776194246872750181114649520813786034,55249431862156139374555283956189348899542316962228615496099⟩, + ⟨37839203946048542044565638822333649749695574449841856550333,37839203946048542044643969803578391796551819709139654623086⟩, + ⟨-12827850558419436438401901013481465157828305660633445552608,-12827850558419436438264193411419918811228086599704320005415⟩, + ⟨22602340242558331343834651726879058626536866176035878978814,22602340242558331343912329837750488829890970820794383081939⟩] +lemma tr1_3_1_3_calc (r : Fin 8) : taylorRowBox 1 3 1 3 r = tr1_3_1_3 r := by + revert r + decide +kernel +def tr1_3_1_4 : Fin 8 → RI := ![⟨621298379842055496777020504836904427515113974709535014149,621298379842055496780990228263033124375545301125867492105⟩, + ⟨1599424348428565085540646286105631753333189688108502804373,1599424348428565085543501174900214108244950956356483070068⟩, + ⟨13716026553467630640320987072597354642682524658651906486358,13716026553467630640380781797342915011150150347142817893868⟩, + ⟨-8339785212592058904840647842201732980352291115574088659129,-8339785212592058904818522269031119846542887063614983356159⟩, + ⟨-13625855813961947023903660712419464522835041657259630985320,-13625855813961947023840284577057080042732572047374236788644⟩, + ⟨-9490362557005383811671518909175646230069143888159449662820,-9490362557005383811644318340726457193418431455968989392986⟩, + ⟨2687221183737420201716730013840235712868952147183756685654,2687221183737420201764549216345685659466373283174325697324⟩, + ⟨-5199868992803442079986225464632530178923053853601183171430,-5199868992803442079959251606553235222936699592104624568176⟩] +lemma tr1_3_1_4_calc (r : Fin 8) : taylorRowBox 1 3 1 4 r = tr1_3_1_4 r := by + revert r + decide +kernel +def tr1_3_1_5 : Fin 8 → RI := ![⟨704318370291089286676291624366638366792704634822440048217,704318370291089286677498104757911087829368559282740363913⟩, + ⟨-707237252672735183806557896849631395163932846823787888600,-707237252672735183805690237574728654319090995608387549217⟩, + ⟨7801520328226118021743794560043286570399709445537315276604,7801520328226118021761967403630489260614300424117437681189⟩, + ⟨-4143124170105703109795032368368520240500502311797855182751,-4143124170105703109788307952757008643733266984109282258539⟩, + ⟨-7213174289103583034225483460401641823578999664187651078962,-7213174289103583034206222152651468667711795602356193525872⟩, + ⟨-4967809462033760702692447274364031996050992479826056997178,-4967809462033760702684180463568784897282401330772280712155⟩, + ⟨2102773237737102873266456246531176867402240410843526632929,2102773237737102873280989483219731534636913794884528816259⟩, + ⟨-3366143639927723058015426142449919957871575233629687746169,-3366143639927723058007228233589536549145941637430889571904⟩] +lemma tr1_3_1_5_calc (r : Fin 8) : taylorRowBox 1 3 1 5 r = tr1_3_1_5 r := by + revert r + decide +kernel +def tr1_3_1_6 : Fin 8 → RI := ![⟨-207786577494104383389601648964068308354957265291546752159,-207786577494104383389216834575861749726650657032540740950⟩, + ⟨-186056061656952388980275666208861061193835856859288795009,-186056061656952388979998920912829495325228536882921895526⟩, + ⟨-3641189848055979621076870982044841987384507378575071520068,-3641189848055979621071074641103277988174942231754235206783⟩, + ⟨2110685797540798695942413949361112473786480766525164297008,2110685797540798695944558743340698680753784387837887142840⟩, + ⟨3522446645339050625896572642514471308673727630702641637637,3522446645339050625902716155838025022113903438550708675115⟩, + ⟨2485329368065769022642438627677762767120607927519076594778,2485329368065769022645075378147965561568682083265696906474⟩, + ⟨-929613153912783667935994950624841786565227257880980029277,-929613153912783667931359484830906893299668338843848144526⟩, + ⟨1587082528953162262547143517514719449091218165863772057829,1587082528953162262549758291285962346006888713717550941727⟩] +lemma tr1_3_1_6_calc (r : Fin 8) : taylorRowBox 1 3 1 6 r = tr1_3_1_6 r := by + revert r + decide +kernel +def tr1_3_1_7 : Fin 8 → RI := ![⟨-46548293572875923988927643108314355002332019823550820174,-46548293572875923988843595897625582665732120217149346362⟩, + ⟨130887656294602426794205847531906245757137919232804928953,130887656294602426794266291400198253335539402240403679048⟩, + ⟨-204066662048771575914410199133496389362717581526084077831,-204066662048771575913144221812268756984786112472823122764⟩, + ⟨64891077115768811075289766965631422210720581720138097193,64891077115768811075758210862375900522779522389529476688⟩, + ⟨149450847811680061109105048369199420135071445591488663491,149450847811680061110446851520454642190064228772126637716⟩, + ⟨93561277631255364277954159411329151337328103728012785776,93561277631255364278530051397696671436360934435461139320⟩, + ⟨-98832822546372435272498532897886927906919786704863563173,-98832822546372435271486102016774359697270241553071398596⟩, + ⟨113073513627704052423714698771209842477209185119405953764,113073513627704052424285790832143624960341166278201462812⟩] +lemma tr1_3_1_7_calc (r : Fin 8) : taylorRowBox 1 3 1 7 r = tr1_3_1_7 r := by + revert r + decide +kernel +def tr1_3_1_8 : Fin 8 → RI := ![⟨25720244038023501366217049682006801990070349812232853674,25720244038023501366243831371551576940951902534599685752⟩, + ⟨10729969692837427939593477008426335701310644359874731847,10729969692837427939612737480036496422224580269744275672⟩, + ⟨394395166577810152453766415735236386326044457136941648899,394395166577810152454169820099423154239858270128259232899⟩, + ⟨-219977793506484445609636209139396421586480498216558325763,-219977793506484445609486939236082253122635687239130099285⟩, + ⟨-373220023375899343107579087159474097305615348442582535824,-373220023375899343107151520853128091805835275773354910541⟩, + ⟨-267630833588532532497038428038246876398891880930582206512,-267630833588532532496854919742502199448150092426602234560⟩, + ⟨129951081880293048942860038861170187270440088983338533734,129951081880293048943182650513815859123932501470670930130⟩, + ⟨-199297680271218413511039314795271357179763833686496778496,-199297680271218413510857335998459647241293042109705606452⟩] +lemma tr1_3_1_8_calc (r : Fin 8) : taylorRowBox 1 3 1 8 r = tr1_3_1_8 r := by + revert r + decide +kernel +def tr1_3_1_9 : Fin 8 → RI := ![⟨-91421952343362889527307056424914191980011771460930750,-91421952343362889521731488337286356894151845830938232⟩, + ⟨-20386118049193327108591979069476706555247825183753185735,-20386118049193327108587969312338786747110670485037754289⟩, + ⟨-55679948529427813951542577395825389181978048890095991639,-55679948529427813951458594326130552790384282718349098562⟩, + ⟨35894803185708746578102327254042175472710791248652605741,35894803185708746578133403131777398058450852133282933218⟩, + ⟨57031412520286559725624722838728174890511163984052688856,57031412520286559725713736082271203314284756279909233518⟩, + ⟨42725833801107209824336375166484880744710627840654181115,42725833801107209824374578992162831034570643492581671092⟩, + ⟨-14935563738823481969164628309542673699184282447055666575,-14935563738823481969097465137063257130628087144589435828⟩, + ⟨27586944920093589104860440710928948720792345926049488106,27586944920093589104898326116561766094889547368495586882⟩] +lemma tr1_3_1_9_calc (r : Fin 8) : taylorRowBox 1 3 1 9 r = tr1_3_1_9 r := by + revert r + decide +kernel +def tr1_3_1_10 : Fin 8 → RI := ![⟨-1619171215997499497584827952243806224851192436139095538,-1619171215997499497583410429822788536647991933289841772⟩, + ⟨464025099964072561727507653751832171547894717079318302,464025099964072561728527087208010132836406616538084230⟩, + ⟨-18579495249141745366059633077396003709614852229156759933,-18579495249141745366038281372526396077540918849026173791⟩, + ⟨9569278939860805403628033980591312933259811267558666469,9569278939860805403635934655958383491686729152860044048⟩, + ⟨16806666324590774678831676614830007867252444478178803132,16806666324590774678854307182071540449498012554506107662⟩, + ⟨12241834470198088035547424359370100205071650146321283810,12241834470198088035557137231428646320931826765440191597⟩, + ⟨-8906808967106525091982668813941846656301222429692689026,-8906808967106525091965593369547189292593861668328143224⟩, + ⟨11702014977916968878323586362915000963090756717543086170,11702014977916968878333218280428393723080769511007239391⟩] +lemma tr1_3_1_10_calc (r : Fin 8) : taylorRowBox 1 3 1 10 r = tr1_3_1_10 r := by + revert r + decide +kernel +def tr1_3_1_11 : Fin 8 → RI := ![⟨221756726275567942670840636502848105783456838119048406,221756726275567942671181235846551880637317968413234996⟩, + ⟨2525899901072809750260369265384467192080099088827467230,2525899901072809750260614212738395299253747908802854533⟩, + ⟨6929543035047618024407927128474995696009190612689130497,6929543035047618024413057471782442156030480540991336240⟩, + ⟨-4083252244571594169800549352833333490271737000323192323,-4083252244571594169798650994962773944091812560850160152⟩, + ⟨-6735181307145987641749544342981638798789906213269612412,-6735181307145987641744106717278967238376238108887744691⟩, + ⟨-5096704080287053548401307737046049389507170744904266012,-5096704080287053548398973948317499891257748783027017530⟩, + ⟨2771168790576765546863805344969201472352618729614094040,2771168790576765546867908197290008438802102651978984280⟩, + ⟨-4178991652126828985242008847506381499745091102390790737,-4178991652126828985239694510367843673051451136774181939⟩] +lemma tr1_3_1_11_calc (r : Fin 8) : taylorRowBox 1 3 1 11 r = tr1_3_1_11 r := by + revert r + decide +kernel +def tr1_3_1_12 : Fin 8 → RI := ![⟨46358425797874715130609686956817805006608868294408990,46358425797874715130669361881647064468319558750639480⟩, + ⟨-203061184763857757831507810799948978527070618454158738,-203061184763857757831464894642893454400832436063159274⟩, + ⟨-121737022862948084398092457945150168280510888621079649,-121737022862948084397193592879974823067203792521927891⟩, + ⟨146626250089596808603262291300432843042203885138769886,146626250089596808603594894299790537301627957385225183⟩, + ⟨190172084506800144373512336608208321166402593198757494,190172084506800144374465039281474707545273955546414939⟩, + ⟨150764429615585570313882094557140421354567743296872219,150764429615585570314290987497560170060813051644672248⟩, + ⟨164459567033535372464688180507654890509207255841300572,164459567033535372465407023359871138274744405671430633⟩, + ⟨-71895007144681124086467956819435564426010128287164212,-71895007144681124086062471907939322177333662823321521⟩] +lemma tr1_3_1_12_calc (r : Fin 8) : taylorRowBox 1 3 1 12 r = tr1_3_1_12 r := by + revert r + decide +kernel +def tr1_3_1_13 : Fin 8 → RI := ![⟨-15394089006337786911066403570512624298899906057936431,-15394089006337786911049148213246982948854794369791870⟩, + ⟨-242462616085948778470001913811627234124282927297824263,-242462616085948778469989504351124608388005482988132634⟩, + ⟨-351962871392648590105200559201950178990335203802853470,-351962871392648590104940647054952398814522534713943186⟩, + ⟨197204476890764259373249761835731524932176101373962454,197204476890764259373345935959061885306309476141513121⟩, + ⟨331277538536555344211849151235630256313494307267728840,331277538536555344212124630845264001642080296879976825⟩, + ⟨257529507823001849944589423896052477909443860676590283,257529507823001849944707657706816313113165990698973133⟩, + ⟨-203726381420284027849249533353354586115701725395445112,-203726381420284027849041675693345051237305067789008832⟩, + ⟨266665445322535746749601482353251133789673800762192470,266665445322535746749718730712320676351743021930104969⟩] +lemma tr1_3_1_13_calc (r : Fin 8) : taylorRowBox 1 3 1 13 r = tr1_3_1_13 r := by + revert r + decide +kernel +def tr1_3_1_14 : Fin 8 → RI := ![⟨400971972968169626586437974704747302387475043803266,400971972968169626590172829706277727566810548418163⟩, + ⟨28753851642411719309995272944161087970133062372142913,28753851642411719309997958923646090653905946850861779⟩, + ⟨63228808729755885488414864455557689407774086181358499,63228808729755885488471121429396188493645483385836232⟩, + ⟨-38962879988875168137161124420765931833415510650493970,-38962879988875168137140307905635518526069044620626858⟩, + ⟨-63021694764719006652216882142277851671639399728035974,-63021694764719006652157255651657620643601057946729850⟩, + ⟨-49007024206678548406168983885211086910169512109390233,-49007024206678548406143392636480109889591174062230388⟩, + ⟨21880057773302085698444716421048878718314959297054552,21880057773302085698489706403524320888897872219820393⟩, + ⟨-37594232897585086532852237469100486482933312817446785,-37594232897585086532826859517574432432241323294095684⟩] +lemma tr1_3_1_14_calc (r : Fin 8) : taylorRowBox 1 3 1 14 r = tr1_3_1_14 r := by + revert r + decide +kernel +def tr1_3_1_15 : Fin 8 → RI := ![⟨464766583613233194293691639340273304200836419033689,464766583613233194294463721857325422686368519779484⟩, + ⟨18270082957912779002661316381493850160461686747613862,18270082957912779002661871636731540749213267854518485⟩, + ⟨6246766349215592827806619351584282534705206989852214,6246766349215592827818248993416543485060509548229393⟩, + ⟨-3087303488133075315108351164878253392878856254444087,-3087303488133075315104047900791439805418424715796517⟩, + ⟨-5411552467472482800613920179205061698237641325768265,-5411552467472482800601593978872706890920384212915225⟩, + ⟨-4497126669751878437548565068423261242891057400584585,-4497126669751878437543274754414855876476493460713162⟩, + ⟨7363326933760629895039711450226299628432133299954284,7363326933760629895049011939508763791870095649613699⟩, + ⟨-7745698623731833273150815728440055484960059008228650,-7745698623731833273145569507988666798732000481803348⟩] +lemma tr1_3_1_15_calc (r : Fin 8) : taylorRowBox 1 3 1 15 r = tr1_3_1_15 r := by + revert r + decide +kernel +def tr1_3_1_16 : Fin 8 → RI := ![⟨-80307781571139510841294887155517072302814314636453,-80307781571139510841139795222286610039419339363887⟩, + ⟨-2774044158961426067652309660985538415876950628656626,-2774044158961426067652198124192037691984138183177440⟩, + ⟨-3533448012568857807679933577043665621758139193920128,-3533448012568857807677597474885484393504842154034271⟩, + ⟨2058588578499601798884437810298030741653272745496751,2058588578499601798885302227677574863658036149768231⟩, + ⟨3392845593571913848631505598999476762663716223072473,3392845593571913848633981622217324072153306105476596⟩, + ⟨2705505469166009926896442519164898523576367848713047,2705505469166009926897505210014861901594735778914881⟩, + ⟨-2051961499150420253932263619305977283415156627493185,-2051961499150420253930395385235860912308944843795441⟩, + ⟨2781065090002430683042520863833712983033744437124921,2781065090002430683043574697399555784196672023160455⟩] +lemma tr1_3_1_16_calc (r : Fin 8) : taylorRowBox 1 3 1 16 r = tr1_3_1_16 r := by + revert r + decide +kernel +def tr1_3_1_17 : Fin 8 → RI := ![⟨-2317730469588301264669488017114094455650366356529,-2317730469588301264639907454321344065054634638135⟩, + ⟨-1104655606993578352305000079505491107052047513302101,-1104655606993578352304978806180343939519855959867213⟩, + ⟨240769485433960000173918129112765530650460573760696,240769485433960000174363692045341141058084864057515⟩, + ⟨-155879203660560923457581667628745357421179755207306,-155879203660560923457416797979818894997794403688505⟩, + ⟨-249529439336654519428186382966220732431542192556940,-249529439336654519427714132999540589416352002273481⟩, + ⟨-187736423090950377001732884852821388758214898021188,-187736423090950377001530198660258044362550297904869⟩, + ⟨-39037668206468069675131424862358931922275823012513,-39037668206468069674775098043445073411782071489549⟩, + ⟨-52231860943919797631634389561191912646162126565691,-52231860943919797631433392711686179586927261612369⟩] +lemma tr1_3_1_17_calc (r : Fin 8) : taylorRowBox 1 3 1 17 r = tr1_3_1_17 r := by + revert r + decide +kernel +def tr1_3_1_18 : Fin 8 → RI := ![⟨2733849155950498521698117634289125382499978306333,2733849155950498521705283839126766433576583092376⟩, + ⟨208465481888296757091690655497896418214934947066085,208465481888296757091695809186373635590297056479159⟩, + ⟨91937076881847761255822427898840542618715143489064,91937076881847761255930370241420516512001191271005⟩, + ⟨-51697285815045552359638329024109657905044548292326,-51697285815045552359598387604346048034485985537249⟩, + ⟨-85827680904706404848112374196046027356002625362420,-85827680904706404847997966636640710373163912174868⟩, + ⟨-70885363081632115452047823816713939310302811441192,-70885363081632115451998720938486793452602617735789⟩, + ⟨83789848415974391616058567991487059821373104347807,83789848415974391616144891939822000275870544339458⟩, + ⟨-96592950417371132990804828080063511134051751290683,-96592950417371132990756134463057969150855003560098⟩] +lemma tr1_3_1_18_calc (r : Fin 8) : taylorRowBox 1 3 1 18 r = tr1_3_1_18 r := by + revert r + decide +kernel +def tr1_3_1_19 : Fin 8 → RI := ![⟨-324872614152322041407561948799130216775990244789,-324872614152322041406335517734259994277019840634⟩, + ⟨54018348153413297013609950102503888126311231648382,54018348153413297013610832109617855830361076537218⟩, + ⟨-18461845323232102920677443335440882296094659036530,-18461845323232102920658969980972431526730919121902⟩, + ⟨10886724992706566582952852785371721101653481209832,10886724992706566582959688397677855181149719412940⟩, + ⟨17873849794426805750605342671917508511387130204905,17873849794426805750624922489701581168100806150344⟩, + ⟨14239374389518303154910632075321268734820817726839,14239374389518303154919035588283688758942675598506⟩, + ⟨-8837720103574649885556833091301752534558388516706,-8837720103574649885542059529245828854193238985523⟩, + ⟨13339319373136099195379008874472575324622185892468,13339319373136099195387342346080981386345687939295⟩] +lemma tr1_3_1_19_calc (r : Fin 8) : taylorRowBox 1 3 1 19 r = tr1_3_1_19 r := by + revert r + decide +kernel +def tr1_3_1_20 : Fin 8 → RI := ![⟨-32005930266125665102024769205965033820138969339,-32005930266125665101836981558297807544330290929⟩, + ⟨-12870237573146376812799450602444788419533883823308,-12870237573146376812799315552016022729973075904785⟩, + ⟨-600741914322288377324700641265369383044050204166,-600741914322288377321872053601936156632061681637⟩, + ⟨295600579249155177617811725039992847550877227590,295600579249155177618858374617012843913631690142⟩, + ⟨499281896168469819399547178275466571963337715689,499281896168469819402545184464875615210392840429⟩, + ⟨480511538871613345921638923203124906963195356267,480511538871613345922925645283529555059536381698⟩, + ⟨-1628066057539140937696707954300206033568179747805,-1628066057539140937694445868361819811566877758850⟩, + ⟨1438483743436862540183490680534737835997041051888,1438483743436862540184766678081672757478637392801⟩] +lemma tr1_3_1_20_calc (r : Fin 8) : taylorRowBox 1 3 1 20 r = tr1_3_1_20 r := by + revert r + decide +kernel +def tr1_3_1 : Fin 21 → Fin 8 → RI := ![tr1_3_1_0,tr1_3_1_1,tr1_3_1_2,tr1_3_1_3,tr1_3_1_4,tr1_3_1_5,tr1_3_1_6,tr1_3_1_7,tr1_3_1_8,tr1_3_1_9,tr1_3_1_10,tr1_3_1_11,tr1_3_1_12,tr1_3_1_13,tr1_3_1_14,tr1_3_1_15,tr1_3_1_16,tr1_3_1_17,tr1_3_1_18,tr1_3_1_19,tr1_3_1_20] +lemma tr1_3_1_mem (l : Fin 21) (r : Fin 8) : (tr1_3_1 l r).Mem (taylorRow 1 (nearNode 3) (nearDisplacement 3 1) l.val r) := by + have he : taylorRowBox 1 3 1 l r = tr1_3_1 l r := by + fin_cases l + · exact tr1_3_1_0_calc r + · exact tr1_3_1_1_calc r + · exact tr1_3_1_2_calc r + · exact tr1_3_1_3_calc r + · exact tr1_3_1_4_calc r + · exact tr1_3_1_5_calc r + · exact tr1_3_1_6_calc r + · exact tr1_3_1_7_calc r + · exact tr1_3_1_8_calc r + · exact tr1_3_1_9_calc r + · exact tr1_3_1_10_calc r + · exact tr1_3_1_11_calc r + · exact tr1_3_1_12_calc r + · exact tr1_3_1_13_calc r + · exact tr1_3_1_14_calc r + · exact tr1_3_1_15_calc r + · exact tr1_3_1_16_calc r + · exact tr1_3_1_17_calc r + · exact tr1_3_1_18_calc r + · exact tr1_3_1_19_calc r + · exact tr1_3_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 3 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows14.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows14.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e360d60c46a2a08d28784f560e78b6cbe81e990 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows14.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_4_0_0 : Fin 8 → RI := ![⟨-2946607129678650591428544195018807550492732897531297656968,-2946607129678650591394943780812306399562399785622954156955⟩, + ⟨14136712778783721381660678601791686921142657916809929314758,14136712778783721381684842866088363267549300286314056765988⟩, + ⟨-32790934767767703636327448509989075033396547411061893105827,-32790934767767703635821335790476779557956632794483725859412⟩, + ⟨17885384950528793585582837468982183683651575361231608276357,17885384950528793585770112083096162664985216264388555407157⟩, + ⟨30791532522048055462727496202852602995176844702642867309379,30791532522048055463263922590884376748946223591266574065457⟩, + ⟨20599046934206389869961359134786673184058170937662031435309,20599046934206389870191589372008845168513611864392263137862⟩, + ⟨-6091195798446442546949508036752844538167733646419604785503,-6091195798446442546544758173976090179809811592209589040765⟩, + ⟨11367889231890578388315753409197607384483138267928459522112,11367889231890578388544064731422438937449918104523189245668⟩] +lemma tr1_4_0_0_calc (r : Fin 8) : taylorRowBox 1 4 0 0 r = tr1_4_0_0 r := by + revert r + decide +kernel +def tr1_4_0_1 : Fin 8 → RI := ![⟨-1003699790607115621358351350692354398880911939268905854138,-1003699790607115621340355190510403914576891439649908020535⟩, + ⟨-5831275926862626602206069044317534264599943581807393993147,-5831275926862626602193126823776748210728126567519630476989⟩, + ⟨-12332839398450003632896401285837730220510321394166298726412,-12332839398450003632625330652174296122725474690633870670009⟩, + ⟨6860616193449349959211394971811261908057318637634545680730,6860616193449349959311698019659676417636977697703692016791⟩, + ⟨11693637862366578750842073266954597889322594570143161071268,11693637862366578751129379701492588780154873224177014488974⟩, + ⟨7908080424550089101598707563885409216568702985633599778491,7908080424550089101722017360085582073441118680574773515253⟩, + ⟨-2462122844998324135122920590557302474383087982729580322857,-2462122844998324134906139234271228229604278452163225517028⟩, + ⟨4483813580459697981311560035257742273487895462239362290047,4483813580459697981433842073235426201810906796454852188945⟩] +lemma tr1_4_0_1_calc (r : Fin 8) : taylorRowBox 1 4 0 1 r = tr1_4_0_1 r := by + revert r + decide +kernel +def tr1_4_0_2 : Fin 8 → RI := ![⟨1638641076510936230876841930393301476362773359424359644080,1638641076510936230884931039429674718283800683804262337095⟩, + ⟨-6982363623752015295108510093694038865289763997635563571567,-6982363623752015295102692684198992778344710411069922809091⟩, + ⟨17314679532267871446652077861821446359581497151014291682033,17314679532267871446773921626827640832286496465268850393399⟩, + ⟨-9339400846506229981602047823365129609240722729741934081613,-9339400846506229981556962522801269944712124747714560447398⟩, + ⟨-16170861995013544567808392627327364218764661771387349710824,-16170861995013544567679251018656865695363454713537822970992⟩, + ⟨-10748935964184599408964844313891090817297925540326121351115,-10748935964184599408909417690839002983126279548182624311200⟩, + ⟨3086675869956440124852847741972461421639681928530476456661,3086675869956440124950288974443110437674912663404613894355⟩, + ⟨-5838753517404375020032016679530024794262604635514524249108,-5838753517404375019977052024382598382763489385009453767745⟩] +lemma tr1_4_0_2_calc (r : Fin 8) : taylorRowBox 1 4 0 2 r = tr1_4_0_2 r := by + revert r + decide +kernel +def tr1_4_0_3 : Fin 8 → RI := ![⟨759857157938519783318300004625993212546055244591111033087,759857157938519783321226060168198828738736619175325679562⟩, + ⟨2675928206393909335679149972180349440543571659312585167300,2675928206393909335681254290865601216066683463991810464820⟩, + ⟨8867733067030089488930519608412823076240046953483102865349,8867733067030089488974593884364530575295877469764086804700⟩, + ⟨-4882445638846289230245902738286184509066346997591083715408,-4882445638846289230229594132108707983962788965957478540085⟩, + ⟨-8365064065936671871727882656879331643468273690636411712890,-8365064065936671871681168548060416700489641531813377652182⟩, + ⟨-5629038228830130524959478013884836154120421417136689094849,-5629038228830130524939428663968410215744448169428001193626⟩, + ⟨1729941661965464693488899231043603814076493834626685929207,1729941661965464693524146432804998014528582208845447513392⟩, + ⟨-3166865679690182318173444149137225770518103524993117670717,-3166865679690182318153561905852609064938067568640981909803⟩] +lemma tr1_4_0_3_calc (r : Fin 8) : taylorRowBox 1 4 0 3 r = tr1_4_0_3 r := by + revert r + decide +kernel +def tr1_4_0_4 : Fin 8 → RI := ![⟨-275338358431111780459135193604011472659856727522460970765,-275338358431111780458119276001814765292821919413272559991⟩, + ⟨1339791858978779243513598611945948053423992571821944418783,1339791858978779243514329225005759703399202808607535511683⟩, + ⟨-2479465830775506749867500275216986896211652160364012688879,-2479465830775506749852197820394350812296003554792801112485⟩, + ⟨1287933730590763403295965626014233432574605955732939213340,1287933730590763403301627924574469870651662730365039587330⟩, + ⟨2274460823700703951963662863432251327276814523745497645675,2274460823700703951979881860213229206254497102184591912017⟩, + ⟨1474833482978039349756719938557986856514030827978372863944,1474833482978039349763681011989418292442142521706060388811⟩, + ⟨-362162651749804315536307848220926678620737659750660762713,-362162651749804315524070126763116612971296297165922027572⟩, + ⟨740325580482201257837469452366223666999243606556117216680,740325580482201257844372506881927154419447727306082160672⟩] +lemma tr1_4_0_4_calc (r : Fin 8) : taylorRowBox 1 4 0 4 r = tr1_4_0_4 r := by + revert r + decide +kernel +def tr1_4_0_5 : Fin 8 → RI := ![⟨-195217237915273023619550888296762719958892037597116357849,-195217237915273023619196104452600646686752608469887918808⟩, + ⟨-566883372587255637346692554064918424436004656036216078253,-566883372587255637346437405705065649248218282201628493226⟩, + ⟨-2106194154596990050048335493863880340527881405067451938874,-2106194154596990050042991493784197055768410497229913143994⟩, + ⟨1141045917226200539332148083520962544509710619447757654559,1141045917226200539334125499844616019706855746398099778516⟩, + ⟨1971124088003575912925056390237049700265387631668466399529,1971124088003575912930720469699819497135810977504806177106⟩, + ⟨1314260388695272129410149013577413717730997990468256060389,1314260388695272129412579994580493642270528393462509947255⟩, + ⟨-390075446567784838449080835045318352713279066548693433463,-390075446567784838444807116534071365708047422936931462836⟩, + ⟨724608211089165429022218920862422917919626607147978375703,724608211089165429024629640208384842069108333486378662110⟩] +lemma tr1_4_0_5_calc (r : Fin 8) : taylorRowBox 1 4 0 5 r = tr1_4_0_5 r := by + revert r + decide +kernel +def tr1_4_0_6 : Fin 8 → RI := ![⟨5195376343262552978795758947708081454499821010418090265,5195376343262552978893581266170137359474113793861704084⟩, + ⟨-108825400232723003441688297630445613404146279835275937453,-108825400232723003441617947177577451357595410065508762731⟩, + ⟨-58926163417343137682163102797618168563807873128750996741,-58926163417343137680689635258878752604026325460508748546⟩, + ⟨44247915223032970252842580272121994005044471665364411266,44247915223032970253387800841120386278249292711912413273⟩, + ⟨65261805317462533350474354385059867158595442450698951159,65261805317462533352036075399464646171343659451062815183⟩, + ⟨54139570428465516025441074824619949651724847701882479673,54139570428465516026111353930687131908738970903100841517⟩, + ⟨-37390180954286015542968704088460560704494021746210093148,-37390180954286015541790338556874529667711400996506399583⟩, + ⟨50563120503725527690004078657474531348752834535257130364,50563120503725527690668771144053777770244860695439099419⟩] +lemma tr1_4_0_6_calc (r : Fin 8) : taylorRowBox 1 4 0 6 r = tr1_4_0_6 r := by + revert r + decide +kernel +def tr1_4_0_7 : Fin 8 → RI := ![⟨21766302606427502960308839575836292435314820611798538901,21766302606427502960336677043074879815846239473795965091⟩, + ⟨85814144941921627532296835712990965125636239706816207465,85814144941921627532316855463672740561394762710820335515⟩, + ⟨198770359883705668836194284998735145678983982963150427142,198770359883705668836613592218002541741525012901447535786⟩, + ⟨-103804343456139166184863534356663550063993821420857020510,-103804343456139166184708379991405382787841336132417468310⟩, + ⟨-182815258149945191592803738201754984858567899456554039444,-182815258149945191592359316537467823121112078624060425232⟩, + ⟨-118649739828077521537121588380620971654776700423004369977,-118649739828077521536930845890030417734250288890548145511⟩, + ⟨29819137029850550388589971368699331001937285717030129685,29819137029850550388925300896686309997874039312101115141⟩, + ⟨-59876466770253620704646129005351625102411779787272776835,-59876466770253620704456976308816766687553888940823852433⟩] +lemma tr1_4_0_7_calc (r : Fin 8) : taylorRowBox 1 4 0 7 r = tr1_4_0_7 r := by + revert r + decide +kernel +def tr1_4_0_8 : Fin 8 → RI := ![⟨2516334987900956100078233388287561548781238816317197468,2516334987900956100084171717615225939810291177511323222⟩, + ⟨654299568788235048084177080305587389962656142448144626,654299568788235048088447722873634705027772088992584213⟩, + ⟨33734493700548443210169281608071539000356191599045347572,33734493700548443210258728838887829383595899636698025773⟩, + ⟨-18867430229817571930821161984293857279002057004817546251,-18867430229817571930788064227595229374390889655711543880⟩, + ⟨-32021941360076530926525104863310872089673939463050950668,-32021941360076530926430300182254704400696052206128589240⟩, + ⟨-22146616399099088404191240299181404205956731751468477248,-22146616399099088404150550831401706351892861634694788748⟩, + ⟨9011124812756457418856381927602235616790520980295191537,9011124812756457418927914914164409274700935072662258225⟩, + ⟨-14465241428206422455580002285244904159222961508304996075,-14465241428206422455539651954679602392043309600800611309⟩] +lemma tr1_4_0_8_calc (r : Fin 8) : taylorRowBox 1 4 0 8 r = tr1_4_0_8 r := by + revert r + decide +kernel +def tr1_4_0_9 : Fin 8 → RI := ![⟨-1199419653174632749278898707708555339026443975941030227,-1199419653174632749277593867051169430982278165021297522⟩, + ⟨-11071819653183242089982098476582803948396812996173544897,-11071819653183242089981160079982014656773041761039312980⟩, + ⟨-7178608356559887236111512130452962017901331206721241662,-7178608356559887236091857716388005289125699290013549045⟩, + ⟨3325796578697151780558422272673155559505113266615881026,3325796578697151780565694907151662036630417265468152564⟩, + ⟨6266332529333080248645551329945659381025777962328731159,6266332529333080248666382946976525856451790267925254536⟩, + ⟨3577425909015838584511121770291044103481447645508257567,3577425909015838584520062546217277070553225723938590144⟩, + ⟨240596730134223768153465294066854896051047086392532626,240596730134223768169183376384317585770648656493158517⟩, + ⟨676953742389203604935374762500079155559356913525130831,676953742389203604944241019144665095189854110299114312⟩] +lemma tr1_4_0_9_calc (r : Fin 8) : taylorRowBox 1 4 0 9 r = tr1_4_0_9 r := by + revert r + decide +kernel +def tr1_4_0_10 : Fin 8 → RI := ![⟨-279366869105845709701630748560930850702919268502140791,-279366869105845709701367568111163548307702440255656830⟩, + ⟨524535219576897479576644626274037259963532201808538538,524535219576897479576833896617528117774947672850868805⟩, + ⟨-2423701748211990960198382268877143239034005526771241293,-2423701748211990960194418062592954423471291038305012006⟩, + ⟨1246606174223526963213016020477329819289780174555048763,1246606174223526963214482877907493309296847756812208853⟩, + ⟨2210870666276083826498352192637242864051637887275380937,2210870666276083826502553835427695397213060655179463172⟩, + ⟨1430289775909215124150726442069991325056106974968067841,1430289775909215124152529756074249776782768506132036109⟩, + ⟨-440171974361272087567882335575783777318721906476006528,-440171974361272087564712069574681563702205061280748807⟩, + ⟨778980193384280638609645842002628527024999340245164527,778980193384280638611434125804224313015280892278806137⟩] +lemma tr1_4_0_10_calc (r : Fin 8) : taylorRowBox 1 4 0 10 r = tr1_4_0_10 r := by + revert r + decide +kernel +def tr1_4_0_11 : Fin 8 → RI := ![⟨28330058197452026723264122700757200488656033054828949,28330058197452026723311354416783602579120378094521169⟩, + ⟨1224090915670860714624756129039821898394862554631442646,1224090915670860714624790096468337101067251443322631399⟩, + ⟨-53966870440822515129786628232101088538621592089879343,-53966870440822515129075191399796974763251671360690010⟩, + ⟨59640859907903638491025153386032306377154825098596071,59640859907903638491288403158877137258279949296996004⟩, + ⟨73294251666768870434198131035621999281699985366589266,73294251666768870434952179443760056969175252904981397⟩, + ⟨93991392981007345381692200707458548445174550531736260,93991392981007345382015832706373092143931290349073008⟩, + ⟨-158200776322325029698225926676876827177365758778854619,-158200776322325029697656974448189532158524666769850733⟩, + ⟨176187373088194928611846395223580973207391482740012346,176187373088194928612167329824739366502374807576258658⟩] +lemma tr1_4_0_11_calc (r : Fin 8) : taylorRowBox 1 4 0 11 r = tr1_4_0_11 r := by + revert r + decide +kernel +def tr1_4_0_12 : Fin 8 → RI := ![⟨13909718653953735188280876472418707892431597551844444,13909718653953735188293033877236807960547440851767935⟩, + ⟨-19145728271485652154564721986091353712308446490278030,-19145728271485652154555978797956059075884542952132550⟩, + ⟨45028759779138953539657407887171845713907887399929091,45028759779138953539840531142072280327956272334076644⟩, + ⟨-14701983471952805123258782906952186293759258577211263,-14701983471952805123191022632173075702652572568992734⟩, + ⟨-34391532824777176873181431611158983656337212110213988,-34391532824777176872987340171715857313852092909856156⟩, + ⟨-11522961618286878942586798444594039923877181237775500,-11522961618286878942503495834533474894591008335442735⟩, + ⟨-18608986251437027866006782650494827753673963854824631,-18608986251437027865860334815234929253868165116307388⟩, + ⟨16912228543547109056601636339480836376958042247452736,16912228543547109056684244641586232844715323350922467⟩] +lemma tr1_4_0_12_calc (r : Fin 8) : taylorRowBox 1 4 0 12 r = tr1_4_0_12 r := by + revert r + decide +kernel +def tr1_4_0_13 : Fin 8 → RI := ![⟨256997744910148168372417394081312739331012537517926,256997744910148168374124605818424498146171741453321⟩, + ⟨-109744552921643841764186698400537685464660610259672778,-109744552921643841764185470632472214385354359323166210⟩, + ⟨7898180989093810771713758812707077356550888334416310,7898180989093810771739474018773485166588742520602085⟩, + ⟨-4471703793548955082748463619806738957962971146274034,-4471703793548955082738948337701892115670332589661483⟩, + ⟨-7408334939910800760066875745288500703067808667934572,-7408334939910800760039620324531214937564805677826795⟩, + ⟨-6043783538899177256846521919402559159516850748619241,-6043783538899177256834824094417518986357914922001480⟩, + ⟨7450765240438666672601450646730548246597903925415515,7450765240438666672622015682341761534629132485121223⟩, + ⟨-8282355277725798984521515641932013188627274719948811,-8282355277725798984509915315627767992832874113686107⟩] +lemma tr1_4_0_13_calc (r : Fin 8) : taylorRowBox 1 4 0 13 r = tr1_4_0_13 r := by + revert r + decide +kernel +def tr1_4_0_14 : Fin 8 → RI := ![⟨-373532940055534732676223485814957466661638076316926,-373532940055534732675814343595745016748608601024651⟩, + ⟨-4654684792067821931826217599298953931170340735867252,-4654684792067821931825923358262368744665762875966899⟩, + ⟨2436628510056680574853702806081403839210953124890775,2436628510056680574859865589671058057892172739080975⟩, + ⟨-1838540005783154044174047968458401708595292850914781,-1838540005783154044171767581350954782399455495278907⟩, + ⟨-2664950222114116878828552174798628742393661319030931,-2664950222114116878822020270705917278623349453083186⟩, + ⟨-2610597876787221231543194551434483045519323623877959,-2610597876787221231540391106514878959369707266002022⟩, + ⟨3046535921970761532523055507950318311318688350874397,3046535921970761532527984026264389789518798829554979⟩, + ⟨-3670170408840261953628626121413873846308674748595360,-3670170408840261953625846042560690117464744615215699⟩] +lemma tr1_4_0_14_calc (r : Fin 8) : taylorRowBox 1 4 0 14 r = tr1_4_0_14 r := by + revert r + decide +kernel +def tr1_4_0_15 : Fin 8 → RI := ![⟨-31741761536300230109672071907754700195448591542419,-31741761536300230109609579182904393011975177128460⟩, + ⟨7692364486081049168064578809935451146830420375548704,7692364486081049168064623752557515959547906825847510⟩, + ⟨318851359597419531688613790290041958869250259381376,318851359597419531689555099011565782546674911065733⟩, + ⟨-235147063625473592611162595012068231026460324959900,-235147063625473592610814286777182071057143387184396⟩, + ⟨-351238671670719667429126409074362457494720491958475,-351238671670719667428128720577719351885517730194218⟩, + ⟨-298541748556883726598056470364974988765079638696856,-298541748556883726597628269841630680895046071415789⟩, + ⟨115774395229701758498086652841697821352456237064960,115774395229701758498839438851539450048271808089181⟩, + ⟨-227238651892972351888574052182257613902519358961906,-227238651892972351888149420612571655177253539784527⟩] +lemma tr1_4_0_15_calc (r : Fin 8) : taylorRowBox 1 4 0 15 r = tr1_4_0_15 r := by + revert r + decide +kernel +def tr1_4_0_16 : Fin 8 → RI := ![⟨5237892161659917069804800640810590114280044143905,5237892161659917069817343653502095742965743976319⟩, + ⟨790596952674962895080953527187614170466527597291985,790596952674962895080962547691686822857686727541205⟩, + ⟨-134508644696430618297070851232993068161638900732262,-134508644696430618296881919685032560507333292541351⟩, + ⟨85725749355947224513281054213795558717913932111394,85725749355947224513350963705199787818921623419731⟩, + ⟨134017990769340910507737312135645721452203393234536,134017990769340910507937559756620539940999187198123⟩, + ⟨118649909181190818396480710364674208304044282201078,118649909181190818396566655162471503973745814529202⟩, + ⟨-142370827351297570459359033048204934140729493543230,-142370827351297570459207940189017715107847552139120⟩, + ⟨164660967069050437792833233560367056046121579957451,164660967069050437792918462027843571684265443060817⟩] +lemma tr1_4_0_16_calc (r : Fin 8) : taylorRowBox 1 4 0 16 r = tr1_4_0_16 r := by + revert r + decide +kernel +def tr1_4_0_17 : Fin 8 → RI := ![⟨619929244174466492184941003677773331620449775698,619929244174466492187221493921625259516942124086⟩, + ⟨-414320072122055511084724456436746028343590093459839,-414320072122055511084722816386461364044057964773310⟩, + ⟨-42547419147402105801878847991478831287744906312073,-42547419147402105801844497667317841771725504638498⟩, + ⟨26833317917046355840850199122575992669014085073738,26833317917046355840862909618611372697466252437262⟩, + ⟨42640399068139836780813324935909193351956553934942,42640399068139836780849732676001826056098353515067⟩, + ⟨34860469782953741858243665909065924959664776218627,34860469782953741858259291841824312585951039515285⟩, + ⟨-25931704058350212061009341582351279513948659128710,-25931704058350212060981870846268310008522397288913⟩, + ⟨35248908245563784972706868468472760785378809080255,35248908245563784972722364162637800885179900050162⟩] +lemma tr1_4_0_17_calc (r : Fin 8) : taylorRowBox 1 4 0 17 r = tr1_4_0_17 r := by + revert r + decide +kernel +def tr1_4_0_18 : Fin 8 → RI := ![⟨-56231543999162700230613966086389173187638940803,-56231543999162700230350406095632173690716143681⟩, + ⟨-69130261081976918325173065000692816333881797098437,-69130261081976918325172875457396675800536940628979⟩, + ⟨310190432640833464337490877733912746571633260069,310190432640833464341460800931545906074501687843⟩, + ⟨-167506241097161885165780562589508953307066606132,-167506241097161885164311589753620629412710228269⟩, + ⟨-230351659854648654567126058745808613947190019072,-230351659854648654562918356617933120555554775782⟩, + ⟨-443398835625968338237051051747359207162806079274,-443398835625968338235245137113907513571117281062⟩, + ⟨2339465608838937996228332476682878383463410761091,2339465608838937996231507314620272254501507009297⟩, + ⟨-2053420613159906629401412038931368706358431910223,-2053420613159906629399621176190180782338420623013⟩] +lemma tr1_4_0_18_calc (r : Fin 8) : taylorRowBox 1 4 0 18 r = tr1_4_0_18 r := by + revert r + decide +kernel +def tr1_4_0_19 : Fin 8 → RI := ![⟨2148126176738560321360457999435280564123145146,2148126176738560321440553581871568910837535950⟩, + ⟨16752331351761922440727795317752439039501090591026,16752331351761922440727852919745339022627948450500⟩, + ⟨1687896415053762100730491670405409702908639086474,1687896415053762100731698125564668089193495716780⟩, + ⟨-1026768583911132484162751372144855422774047543857,-1026768583911132484162304952965844816343554712318⟩, + ⟨-1653607608379277132765361615824008313913425361914,-1653607608379277132764082899918642187735260649638⟩, + ⟨-1351227287058307653220409817704388095109244988639,-1351227287058307653219861002296229510120585283762⟩, + ⟨1224238283836967315366163732227457835843383237198,1224238283836967315367128561879222865890674929231⟩, + ⟨-1528478890680542235109243102658095201670783399785,-1528478890680542235108698861500745022765118981604⟩] +lemma tr1_4_0_19_calc (r : Fin 8) : taylorRowBox 1 4 0 19 r = tr1_4_0_19 r := by + revert r + decide +kernel +def tr1_4_0_20 : Fin 8 → RI := ![⟨2835287067726080223611746963944106179565634734,2835287067726080223621941219976122748963825924⟩, + ⟨4203995973595248402868510545749255420728172608025,4203995973595248402868517877108180900651286473646⟩, + ⟨179109311555542301610857006383542544694656557244,179109311555542301611010559331344147397620657998⟩, + ⟨-108032576234141239928330942780316577917452405838,-108032576234141239928274124273287519920136713870⟩, + ⟨-176321456582361090733667252413761505311871070267,-176321456582361090733504502397463792661598432742⟩, + ⟨-136504615586162533680973638920550526135761007956,-136504615586162533680903787817274450863912704585⟩, + ⟨65976707336922002526108056203782400557836437631,65976707336922002526230855991086499324474601976⟩, + ⟨-109033878020017292505645159834034332208352242492,-109033878020017292505575890923941502720031100205⟩] +lemma tr1_4_0_20_calc (r : Fin 8) : taylorRowBox 1 4 0 20 r = tr1_4_0_20 r := by + revert r + decide +kernel +def tr1_4_0 : Fin 21 → Fin 8 → RI := ![tr1_4_0_0,tr1_4_0_1,tr1_4_0_2,tr1_4_0_3,tr1_4_0_4,tr1_4_0_5,tr1_4_0_6,tr1_4_0_7,tr1_4_0_8,tr1_4_0_9,tr1_4_0_10,tr1_4_0_11,tr1_4_0_12,tr1_4_0_13,tr1_4_0_14,tr1_4_0_15,tr1_4_0_16,tr1_4_0_17,tr1_4_0_18,tr1_4_0_19,tr1_4_0_20] +lemma tr1_4_0_mem (l : Fin 21) (r : Fin 8) : (tr1_4_0 l r).Mem (taylorRow 1 (nearNode 4) (nearDisplacement 4 0) l.val r) := by + have he : taylorRowBox 1 4 0 l r = tr1_4_0 l r := by + fin_cases l + · exact tr1_4_0_0_calc r + · exact tr1_4_0_1_calc r + · exact tr1_4_0_2_calc r + · exact tr1_4_0_3_calc r + · exact tr1_4_0_4_calc r + · exact tr1_4_0_5_calc r + · exact tr1_4_0_6_calc r + · exact tr1_4_0_7_calc r + · exact tr1_4_0_8_calc r + · exact tr1_4_0_9_calc r + · exact tr1_4_0_10_calc r + · exact tr1_4_0_11_calc r + · exact tr1_4_0_12_calc r + · exact tr1_4_0_13_calc r + · exact tr1_4_0_14_calc r + · exact tr1_4_0_15_calc r + · exact tr1_4_0_16_calc r + · exact tr1_4_0_17_calc r + · exact tr1_4_0_18_calc r + · exact tr1_4_0_19_calc r + · exact tr1_4_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 4 0 l r +def tr1_4_1_0 : Fin 8 → RI := ![⟨-2946607129678650591428544195018807550492732897531297656968,-2946607129678650591394943780812306399562399785622954156955⟩, + ⟨14136712778783721381660678601791686921142657916809929314758,14136712778783721381684842866088363267549300286314056765988⟩, + ⟨-32790934767767703636327448509989075033396547411061893105827,-32790934767767703635821335790476779557956632794483725859412⟩, + ⟨17885384950528793585582837468982183683651575361231608276357,17885384950528793585770112083096162664985216264388555407157⟩, + ⟨30791532522048055462727496202852602995176844702642867309379,30791532522048055463263922590884376748946223591266574065457⟩, + ⟨20599046934206389869961359134786673184058170937662031435309,20599046934206389870191589372008845168513611864392263137862⟩, + ⟨-6091195798446442546949508036752844538167733646419604785503,-6091195798446442546544758173976090179809811592209589040765⟩, + ⟨11367889231890578388315753409197607384483138267928459522112,11367889231890578388544064731422438937449918104523189245668⟩] +lemma tr1_4_1_0_calc (r : Fin 8) : taylorRowBox 1 4 1 0 r = tr1_4_1_0 r := by + revert r + decide +kernel +def tr1_4_1_1 : Fin 8 → RI := ![⟨1505549685910673432010532785765605871865337159474862030804,1505549685910673432037527026038531598321367908903358781208⟩, + ⟨8746913890293939903289690235665122316092189851279445715485,8746913890293939903309103566476301396899915372711090989721⟩, + ⟨18499259097675005448937995978261444184088212035950806005015,18499259097675005449344601928756595330765482091249448089619⟩, + ⟨-10290924290174024938967547029489514626455466546555538025186,-10290924290174024938817092457716892862085977956451818521096⟩, + ⟨-17540456793549868126694069552238883170232309836265521733460,-17540456793549868126263109900431896833983891855214741606903⟩, + ⟨-11862120636825133652583026040128373110161678020862160272879,-11862120636825133652398061345828113824853054478450399667737⟩, + ⟨3693184267497486202359208851406842344406417678244838275543,3693184267497486202684380885835953711574631974094370484286⟩, + ⟨-6725720370689546972150763109853139302716360194682278283417,-6725720370689546971967340052886613410231843193359043435071⟩] +lemma tr1_4_1_1_calc (r : Fin 8) : taylorRowBox 1 4 1 1 r = tr1_4_1_1 r := by + revert r + decide +kernel +def tr1_4_1_2 : Fin 8 → RI := ![⟨3686942422149606519472894343384928321816240058704809199182,3686942422149606519491094838716768116138551538559590258462⟩, + ⟨-15710318153442034413994147710811587446901968994680018036024,-15710318153442034413981058539447733751275598424907326320456⟩, + ⟨38958028947602710754967175189098254309058368589782156284576,38958028947602710755241323660362191872644617046854913385146⟩, + ⟨-21013651904639017458604607602571541620791626141919351683628,-21013651904639017458503165676302857375602280682357761006647⟩, + ⟨-36384439488780475277568883411486569492220488985621536849352,-36384439488780475277278314791977947814567773105460101684734⟩, + ⟨-24185105919415348670170899706254954338920332465733773040007,-24185105919415348670046189804387756712034128983410904700202⟩, + ⟨6945020707401990280918907419438038198689284339193572027489,6945020707401990281138150192496998484768553492660381262297⟩, + ⟨-13137195414159843795072037528942555787090860429907679560491,-13137195414159843794948367054860846361217851116271270977428⟩] +lemma tr1_4_1_2_calc (r : Fin 8) : taylorRowBox 1 4 1 2 r = tr1_4_1_2 r := by + revert r + decide +kernel +def tr1_4_1_3 : Fin 8 → RI := ![⟨-2564517908042504268709137953067671046993236089716724168519,-2564517908042504268699262515612727092342936450494999736671⟩, + ⟨-9031257696579444007924233231671404104225056690972360318765,-9031257696579444007917131156108679361834554350179974939640⟩, + ⟨-29928599101226552025289254359730290691623586460453792965860,-29928599101226552025140503678393277882310158468005472170556⟩, + ⟨16478254031106226152024880195866889445874412760106490072790,16478254031106226152079921741715872718098921116869907539499⟩, + ⟨28232091222536267566923943849703906364152540169870149576117,28232091222536267567081603966967744296705423705897889531001⟩, + ⟨18998004022301690521670571740893384478137512571819504028491,18998004022301690521738238296861322020156422282836325695113⟩, + ⟨-5838553109133443340643994210716868299033964954853385357695,-5838553109133443340525034904772162872508166691865065011076⟩, + ⟨10688171668954365323768271432252555594165978044163313945588,10688171668954365323835374003338136975498599396851772138667⟩] +lemma tr1_4_1_3_calc (r : Fin 8) : taylorRowBox 1 4 1 3 r = tr1_4_1_3 r := by + revert r + decide +kernel +def tr1_4_1_4 : Fin 8 → RI := ![⟨-1393900439557503388574371917620308080340524683082458664493,-1393900439557503388569228834759187249294910967029692334959⟩, + ⟨6782696286080069920287592972976362020458962394848593620094,6782696286080069920291291701591658498458464218575648527891⟩, + ⟨-12552295768301002921204220143285996162071489061842814237445,-12552295768301002921126751465746400987248517996138555631960⟩, + ⟨6520164511115739729185825981697056752408942650898004767538,6520164511115739729214491368158253720174042572473012910854⟩, + ⟨11514457919984813756816043246125772344338873526461581831234,11514457919984813756898151917329472856663391579809496554582⟩, + ⟨7466344507576324208143394688949808461102281066640512623721,7466344507576324208178635123196430105488346516136930718351⟩, + ⟨-1833448424483384347402558481618441310517484402487720111230,-1833448424483384347340605016738277853167187504402480264588⟩, + ⟨3747898251191143867802189102604007314183670758190343409447,3747898251191143867837135816089756219248454119487040938397⟩] +lemma tr1_4_1_4_calc (r : Fin 8) : taylorRowBox 1 4 1 4 r = tr1_4_1_4 r := by + revert r + decide +kernel +def tr1_4_1_5 : Fin 8 → RI := ![⟨1482430900419104523108270418186936160777527620568211383455,1482430900419104523110964558003541904687836410503102342409⟩, + ⟨4304770610584472496099509049572842273978657580468616370442,4304770610584472496101446582430474285560910356775015844227⟩, + ⟨15993911861470893192513966655923746392241367213339652937212,15993911861470893192554547656528841335883599419730963160817⟩, + ⟨-8664817433936460345568515514445052899648935824210570193099,-8664817433936460345553499509237309322370615016431409689314⟩, + ⟨-14968223543277154588817658566783004306375064610427121907392,-14968223543277154588774646963362596161390287327982416721430⟩, + ⟨-9980164826654722732726779333845623595991824987855934911961,-9980164826654722732708319071853485419019765990118319458586⟩, + ⟨2962135422374116116940254041180604433345485117927323295918,2962135422374116116972707591125386240916462911604140760353⟩, + ⟨-5502493602958349976655781330332422394462291407412187965391,-5502493602958349976637474930299024032952164548029960790502⟩] +lemma tr1_4_1_5_calc (r : Fin 8) : taylorRowBox 1 4 1 5 r = tr1_4_1_5 r := by + revert r + decide +kernel +def tr1_4_1_6 : Fin 8 → RI := ![⟨59178583659975017524095441763737365317662023696793559436,59178583659975017525209699109969220860259827433205973071⟩, + ⟨-1239589324525860461077980765196794565181603718748689975040,-1239589324525860461077179429569593156870110217777435750494⟩, + ⟨-671205830175674177660889092804119451297124054857179322242,-671205830175674177644105376620665791380237363448607463918⟩, + ⟨504011409337359926786285015912139587963709685063291497088,504011409337359926792495418955886899950683349796627332427⟩, + ⟨743372751194221668945246942917322549353376211664992740556,743372751194221668963035921347026985295461370934762379183⟩, + ⟨616683544411740018477289742924186614001678343354255120036,616683544411740018484924640866733111897979840443133022894⟩, + ⟨-425897529932414145794127895007621074274627216452924342253,-425897529932414145780705575124398939496275176975830707761⟩, + ⟨575945544487748588843952708457795833644387755878163250563,575945544487748588851523971312737562414195366358985991809⟩] +lemma tr1_4_1_6_calc (r : Fin 8) : taylorRowBox 1 4 1 6 r = tr1_4_1_6 r := by + revert r + decide +kernel +def tr1_4_1_7 : Fin 8 → RI := ![⟨-371897685939507413861377442915662204353560357259310747280,-371897685939507413860901813690265402781511817796901598270⟩, + ⟨-1466215117093614057915445022648845965685705828504406826322,-1466215117093614057915102966439931568201300439365680044751⟩, + ⟨-3396177945825502326138077548287277803036837525120826255952,-3396177945825502326130913291345576278124515396409453001263⟩, + ⟨1773594524520127784734040836259402907476632829074976587469,1773594524520127784736691794047056124921519433182924248854⟩, + ⟨3123570074796329171972576759901891634108375905865782421754,3123570074796329171980170120681548061606937469620966283296⟩, + ⟨2027242039093793278134904374699191590506292045340849954958,2027242039093793278138163388972016132882786279883676227637⟩, + ⟨-509487911595962138285778383289476249729300968559102646963,-509487911595962138280048963932386225790912842680819481431⟩, + ⟨1023045568957380222505057868651423974575627774324857541196,1023045568957380222508289719802375032023238768709105960438⟩] +lemma tr1_4_1_7_calc (r : Fin 8) : taylorRowBox 1 4 1 7 r = tr1_4_1_7 r := by + revert r + decide +kernel +def tr1_4_1_8 : Fin 8 → RI := ![⟨64490913498508488174270661174041762974819171382254424195,64490913498508488174422854059662099183966095373639811145⟩, + ⟨16768982307889102150313616499550620568535105275790144131,16768982307889102150423068397554364451903174515157597715⟩, + ⟨864578176442571624616877564963114716333347551098970802447,864578176442571624619169999656027533538174599673342762071⟩, + ⟨-483551600538410505617647046011531240654423812533624691197,-483551600538410505616798786708016796583510261840325935168⟩, + ⟨-820687333060398903941137550813213405391994987566708153618,-820687333060398903938707810530363732706901556735975289102⟩, + ⟨-567593555447223121171479404698942160137820769614783903194,-567593555447223121170436578143853888182691660879814488211⟩, + ⟨230945273033184051269987194636711983913135188092643561253,230945273033184051271820506843096442387940761764597953937⟩, + ⟨-370728316447118506761954667943327406986960353343707340788,-370728316447118506760920533104112778492953727698643792206⟩] +lemma tr1_4_1_8_calc (r : Fin 8) : taylorRowBox 1 4 1 8 r = tr1_4_1_8 r := by + revert r + decide +kernel +def tr1_4_1_9 : Fin 8 → RI := ![⟨46109720768430266414122812666344077949265978754129295205,46109720768430266414172975124663075660268548395404878786⟩, + ⟨425637941862511238392771823934152332986843322231517182431,425637941862511238392807899051912754133387637116570086305⟩, + ⟨275969820863609883726554756702470914269260037354173214594,275969820863609883727310338405675100387406058870887108621⟩, + ⟨-127854793083000075189208150112238601302727544992596966597,-127854793083000075188928565611378361089334266458594504403⟩, + ⟨-240898873388404333075196124111990153188555835631978095728,-240898873388404333074395286772110182806114038344758623871⟩, + ⟨-137528269857731935271696076361708329257224886570865761299,-137528269857731935271352362899684806814111980481521550216⟩, + ⟨-9249346560999856306394602338618209063913432628427420060,-9249346560999856305790346451402158044868671487234804096⟩, + ⟨-26024375998919325304916984335594615368402145416049740202,-26024375998919325304576135645095816443114886970537402668⟩] +lemma tr1_4_1_9_calc (r : Fin 8) : taylorRowBox 1 4 1 9 r = tr1_4_1_9 r := by + revert r + decide +kernel +def tr1_4_1_10 : Fin 8 → RI := ![⟨-16109701419756917297042572335717193167145195200959874521,-16109701419756917297027396024800875355489766986969023646⟩, + ⟨30247343926558807882345008336773072425377551742766007997,30247343926558807882355922618523845533684458138838820320⟩, + ⟨-139762855986493998250736596284107842892303703467104518605,-139762855986493998250508000173878286866754164571164701173⟩, + ⟨71885593732153362940200569329263523925041239772754955532,71885593732153362940285155720273019942060120304691523928⟩, + ⟨127489943332945775264551951780309134647837075786839813484,127489943332945775264794239675947251474642596316105586704⟩, + ⟨82477715798499261587867427419717693118396543715712341799,82477715798499261587971415592215210028560251482998632951⟩, + ⟨-25382534095760503416792855501381304948137900249513388099,-25382534095760503416610041988589230131886236976139586292⟩, + ⟨44919923280418347098887673168372277238573423869274140833,44919923280418347098990794623646134237538399812667210474⟩] +lemma tr1_4_1_10_calc (r : Fin 8) : taylorRowBox 1 4 1 10 r = tr1_4_1_10 r := by + revert r + decide +kernel +def tr1_4_1_11 : Fin 8 → RI := ![⟨-2450480868898454188454314697690412522501678524565498705,-2450480868898454188450229269565935446759741351349503909⟩, + ⟨-105880875702317364752752778915564703341191597378063566534,-105880875702317364752749840815926430583473982893211020794⟩, + ⟨4668002538076360394321427212353434906438351477798903016,4668002538076360394382964761441411880542577721653249902⟩, + ⟨-5158788774465530199129036501164847770455331141657690891,-5158788774465530199106266038513410633688401270381346858⟩, + ⟨-6339773828131398970185778189415899810507074475761103202,-6339773828131398970120554843050454251345364896355072695⟩, + ⟨-8130026021682865338080057967009704176768064595442986314,-8130026021682865338052064589220780996785808644065177454⟩, + ⟨13683980919517046892505292994420620631487387277479857410,13683980919517046892554505973158544582025787143748905769⟩, + ⟨-15239777627175032724052541980694875272361420916851314606,-15239777627175032724024781921226415361703993648898909782⟩] +lemma tr1_4_1_11_calc (r : Fin 8) : taylorRowBox 1 4 1 11 r = tr1_4_1_11 r := by + revert r + decide +kernel +def tr1_4_1_12 : Fin 8 → RI := ![⟨1804735056439410884324994451508464487563901522106875902,1804735056439410884326571830261866811367503055103613920⟩, + ⟨-2484088129474269156902839457277923610405984646298790530,-2484088129474269156901705060635880368981239597418035897⟩, + ⟨5842316681099947414079363404532835170421123434498465962,5842316681099947414103122976238778010197609698606939755⟩, + ⟨-1907528515214372731325627648157611532261160678108332590,-1907528515214372731316836000650559454222018022128434590⟩, + ⟨-4462175438460060462563577440641098982741089927017634636,-4462175438460060462538394787157433331721403834987027815⟩, + ⟨-1495062071626952449249821960984741496871389910689611564,-1495062071626952449239013752392652449086020522655279068⟩, + ⟨-2414447817980943731967409809219145936582091070549769579,-2414447817980943731948408738902164559962146371478397245⟩, + ⟨2194299719094535933630231986789559366456777082526496583,2194299719094535933640950111467096965143641639877340394⟩] +lemma tr1_4_1_12_calc (r : Fin 8) : taylorRowBox 1 4 1 12 r = tr1_4_1_12 r := by + revert r + decide +kernel +def tr1_4_1_13 : Fin 8 → RI := ![⟨-50016774372361103301603938467071289203845089031870301,-50016774372361103301271681760730074524955798566063711⟩, + ⟨21358430767540768400024593761618041779236000759178262087,21358430767540768400024832709233452673715099869510776471⟩, + ⟨-1537140088998414510624022636234496971588289030966049362,-1537140088998414510619017955511668175333042229247023462⟩, + ⟨870280787016888514938672891920153044864730427898787372,870280787016888514940524751430803158651904058452277236⟩, + ⟨1441806492480884716815020458333444847766495810875225937,1441806492480884716820324894879833777638815663926690557⟩, + ⟨1176238171763714963580159576987795669297742918968526268,1176238171763714963582436201917437295761521488780624094⟩, + ⟨-1450064256644518599303558338466572787496889940316885013,-1450064256644518599299555981377854964863367917490263881⟩, + ⟨1611907899591019166794531459443067620805332807074508882,1611907899591019166796789109227535774283667298990838209⟩] +lemma tr1_4_1_13_calc (r : Fin 8) : taylorRowBox 1 4 1 13 r = tr1_4_1_13 r := by + revert r + decide +kernel +def tr1_4_1_14 : Fin 8 → RI := ![⟨-109045194870878961475443357527153399619210718276579984,-109045194870878961475323916941760067566716048085588302⟩, + ⟨-1358838688063466686855768564740070702222648526555801371,-1358838688063466686855682667171924046161209667791780256⟩, + ⟨711323158454424525904995120648215700648618973193707885,711323158454424525906794217502648369634916232523766305⟩, + ⟨-536723623835488678925116091165131418564350540273865624,-536723623835488678924450379443761892371724929858316852⟩, + ⟨-777976946955257293323591392025416413414176506678713882,-777976946955257293321684538095581693128652533585439321⟩, + ⟨-762109906990911788733698834257814815536164171995601374,-762109906990911788732880426656272222986912194358058468⟩, + ⟨889372978037876667263810197742042603953224823174644075,889372978037876667265248976447617319774471418395858373⟩, + ⟨-1071430132458514335698556900104540696826486557227441141,-1071430132458514335697745313741483242824721196746436853⟩] +lemma tr1_4_1_14_calc (r : Fin 8) : taylorRowBox 1 4 1 14 r = tr1_4_1_14 r := by + revert r + decide +kernel +def tr1_4_1_15 : Fin 8 → RI := ![⟨13899523446672031430706410461567111975716604703516050,13899523446672031430733775643972313596111256815281447⟩, + ⟨-3368439411037590605926106451887170674272725741233859340,-3368439411037590605926086771787550796780793662709150452⟩, + ⟨-139623062307340402227691009127586344547865645084089947,-139623062307340402227278815789468844418722446642738528⟩, + ⟨102969462502594098246107830665195167836497257945980969,102969462502594098246260352713221158589269828553447555⟩, + ⟨153805268390096775237950079211385536264208024823240367,153805268390096775238386960908568816738378824771313211⟩, + ⟨130729607716678125084313795914564922134695216047989777,130729607716678125084501302307595281100957415260460620⟩, + ⟨-50696900333625310377084555542386669176446462554733018,-50696900333625310376754915147912834493683128882296092⟩, + ⟨99506417322315497766550611525685843230422349786041025,99506417322315497766736555095714158689244303816039777⟩] +lemma tr1_4_1_15_calc (r : Fin 8) : taylorRowBox 1 4 1 15 r = tr1_4_1_15 r := by + revert r + decide +kernel +def tr1_4_1_16 : Fin 8 → RI := ![⟨3440461464097005416672131006555094703594530885778891,3440461464097005416680369769491964544109101768585077⟩, + ⟨519296362995137503508027326947191495540146687613349561,519296362995137503508033251982623850752735340360553354⟩, + ⟨-88350770573965126368583741001268899537476389504521713,-88350770573965126368459643045440742615887370270369880⟩, + ⟨56308172836935270146905064931139095568377055932802757,56308172836935270146950984339887413261418421084841663⟩, + ⟨88028489038519188362312872570694816989085606442572048,88028489038519188362444403385377079554894233284672996⟩, + ⟨77934105487030938831710396132658979808961141777879541,77934105487030938831766848185457160980350149581241788⟩, + ⟨-93514973198402030998868868018430440533132282181193241,-93514973198402030998769624058553052464370704459620588⟩, + ⟨108156047195611601724181335519423787219371929695245790,108156047195611601724237317057215522185303872945866889⟩] +lemma tr1_4_1_16_calc (r : Fin 8) : taylorRowBox 1 4 1 16 r = tr1_4_1_16 r := by + revert r + decide +kernel +def tr1_4_1_17 : Fin 8 → RI := ![⟨-610792264107951379692810136735093652640802056624628,-610792264107951379690563258059167843036788468681963⟩, + ⟨408213513549911534092173853439076931349578741090954899,408213513549911534092175469317075968093062169453344065⟩, + ⟨41920323516272193678233674083027235864325259859260688,41920323516272193678267518126463309353247658565984398⟩, + ⟨-26437828442674155211220079107679294615207988943077338,-26437828442674155211207555948424687753015777555225536⟩, + ⟨-42011933029515278844240797090799728433091648231256456,-42011933029515278844204925955164167653428541138281482⟩, + ⟨-34346670150964514503750059850446792180730199836908087,-34346670150964514503734664224352392021460553178650997⟩, + ⟨25549503242211211369627111367279338807946119499520203,25549503242211211369654177219143082883376240642646166⟩, + ⟨-34729383517487725969500096601168854646863377203380583,-34729383517487725969484829294114171515532130595170134⟩] +lemma tr1_4_1_17_calc (r : Fin 8) : taylorRowBox 1 4 1 17 r = tr1_4_1_17 r := by + revert r + decide +kernel +def tr1_4_1_18 : Fin 8 → RI := ![⟨-83104142278215900092715742154763449556963986209690,-83104142278215900092326228984521474820671780187510⟩, + ⟨-102167051517780940186506690415180954905928318405436922,-102167051517780940186506410290682673666452362064527126⟩, + ⟨458427921664555595860270602740141632690869259433683,458427921664555595866137719998287851170850808468144⟩, + ⟨-247556113572747627498964506626597080078513762294169,-247556113572747627496793523600445151396026532942447⟩, + ⟨-340434847651861765577652210250640487349825200517297,-340434847651861765571433681442245619716373378372708⟩, + ⟨-655295538788769816201460710090355714789072547317957,-655295538788769816198791763517540350374208043311225⟩, + ⟨3457477226925140688855975051006553044315048639946460,3457477226925140688860667118214655785187173068154846⟩, + ⟨-3034733650486339040973803823140250784517979049420973,-3034733650486339040971157121636791212814153599761079⟩] +lemma tr1_4_1_18_calc (r : Fin 8) : taylorRowBox 1 4 1 18 r = tr1_4_1_18 r := by + revert r + decide +kernel +def tr1_4_1_19 : Fin 8 → RI := ![⟨-4762047350840111531573275297848042083552602254391,-4762047350840111531395716381484097213772495741283⟩, + ⟨-37137201714647111913109922184492971418098269579462709,-37137201714647111913109794490216600305325715062002063⟩, + ⟨-3741792609223225446825838540687449143818128926547579,-3741792609223225446823164025262206966473825515022227⟩, + ⟨2276179429256564023349446908446214288974390937680518,2276179429256564023350436547365842056610621848773616⟩, + ⟨3665779885782737985088227760637388705759570026925653,3665779885782737985091062466417507775782040161384601⟩, + ⟨2995451753438603911530767292146503599169622037515631,2995451753438603911531983926899537429349911891473390⟩, + ⟨-2713937728366691629008580180945102395877914628728831,-2713937728366691629006441310083161014495803420086133⟩, + ⟨3388389812013434689584532247980281318191405456523462,3388389812013434689585738742361124665297595148605727⟩] +lemma tr1_4_1_19_calc (r : Fin 8) : taylorRowBox 1 4 1 19 r = tr1_4_1_19 r := by + revert r + decide +kernel +def tr1_4_1_20 : Fin 8 → RI := ![⟨9428057403663947166980773157348078596875343465482,9428057403663947167014671675826696771190936223599⟩, + ⟨13979365904425354021875463700315952928886112509632629,13979365904425354021875488078966560510518108765494999⟩, + ⟨595584443670000021316884405231183593712972442487935,595584443670000021317395008204284442433041052645966⟩, + ⟨-359236051190421103489782990695983327602647890407918,-359236051190421103489594054573091874547490558350375⟩, + ⟨-586314110157943175239082928887208189445219695974983,-586314110157943175238541743300193647589454352392520⟩, + ⟨-453912891664822572602706904106504490721239367295772,-453912891664822572602474631255232232673770706344781⟩, + ⟨219389490100595369111744084941653968299291409535090,219389490100595369112152425760839272390627937018503⟩, + ⟨-362565636692746220835626361608946474497351151495923,-362565636692746220835396024699475010986999044831417⟩] +lemma tr1_4_1_20_calc (r : Fin 8) : taylorRowBox 1 4 1 20 r = tr1_4_1_20 r := by + revert r + decide +kernel +def tr1_4_1 : Fin 21 → Fin 8 → RI := ![tr1_4_1_0,tr1_4_1_1,tr1_4_1_2,tr1_4_1_3,tr1_4_1_4,tr1_4_1_5,tr1_4_1_6,tr1_4_1_7,tr1_4_1_8,tr1_4_1_9,tr1_4_1_10,tr1_4_1_11,tr1_4_1_12,tr1_4_1_13,tr1_4_1_14,tr1_4_1_15,tr1_4_1_16,tr1_4_1_17,tr1_4_1_18,tr1_4_1_19,tr1_4_1_20] +lemma tr1_4_1_mem (l : Fin 21) (r : Fin 8) : (tr1_4_1 l r).Mem (taylorRow 1 (nearNode 4) (nearDisplacement 4 1) l.val r) := by + have he : taylorRowBox 1 4 1 l r = tr1_4_1 l r := by + fin_cases l + · exact tr1_4_1_0_calc r + · exact tr1_4_1_1_calc r + · exact tr1_4_1_2_calc r + · exact tr1_4_1_3_calc r + · exact tr1_4_1_4_calc r + · exact tr1_4_1_5_calc r + · exact tr1_4_1_6_calc r + · exact tr1_4_1_7_calc r + · exact tr1_4_1_8_calc r + · exact tr1_4_1_9_calc r + · exact tr1_4_1_10_calc r + · exact tr1_4_1_11_calc r + · exact tr1_4_1_12_calc r + · exact tr1_4_1_13_calc r + · exact tr1_4_1_14_calc r + · exact tr1_4_1_15_calc r + · exact tr1_4_1_16_calc r + · exact tr1_4_1_17_calc r + · exact tr1_4_1_18_calc r + · exact tr1_4_1_19_calc r + · exact tr1_4_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 4 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows15.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows15.lean new file mode 100644 index 0000000000000000000000000000000000000000..45e88315c70cf17f4b46753617a5172cbc4c94c4 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows15.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_5_0_0 : Fin 8 → RI := ![⟨-131587480702055847553296911351804815793742116057753537012,-131587480702055847548576203569038974503107360166538805769⟩, + ⟨6615160235433789647905209889417838062729156954275809251432,6615160235433789647908604860379468395971753557550991973583⟩, + ⟨-1442242746807410599991692534443923015669485057637475817114,-1442242746807410599920585962981072136752913559299239963521⟩, + ⟨783628801166012795002434298586263221711567096693474353578,783628801166012795028745543528978110007760857016391688429⟩, + ⟨1351668816280008548469632871183185432563757030553685951910,1351668816280008548544998377372916379623901539984287150684⟩, + ⟨903645452556859809247263742520682606302449429738982010713,903645452556859809279610060217913992662868240531012566927⟩, + ⟨-267094008327254985208940152689482777853773311648174972712,-267094008327254985152074608844215626789797151517423552247⟩, + ⟨499158347052195404862733432982234631908443640045929107991,499158347052195404894810151712441432233901586821083482163⟩] +lemma tr1_5_0_0_calc (r : Fin 8) : taylorRowBox 1 5 0 0 r = tr1_5_0_0 r := by + revert r + decide +kernel +def tr1_5_0_1 : Fin 8 → RI := ![⟨-438227915498483290941166939008415606178737295217529546302,-438227915498483290937211050459008075588473562932778632202⟩, + ⟨14078550948050820941093835323861090521349693925258894357248,14078550948050820941096680263088329385926583939762555983776⟩, + ⟨-4778462650088355156774999041333170214173946445545502385758,-4778462650088355156715412707084814430972121468995110652949⟩, + ⟨2593415747038471829209538498886337157438318312208019900642,2593415747038471829231586962249697298708750745831136107909⟩, + ⟨4475890844814572500318137844930288161322433696020563741413,4475890844814572500381293108223392586195556343051849155581⟩, + ⟨2990037638713373260214781593321463155893627046856684053575,2990037638713373260241887365101782355530031853426449034173⟩, + ⟨-881083633255644425401831322023025380059602060406203838275,-881083633255644425354178774124512888121832245061234094068⟩, + ⟨1648747060494229750760057092037539549337372960545310551703,1648747060494229750786936943569420567103897877512270839877⟩] +lemma tr1_5_0_1_calc (r : Fin 8) : taylorRowBox 1 5 0 1 r = tr1_5_0_1 r := by + revert r + decide +kernel +def tr1_5_0_2 : Fin 8 → RI := ![⟨-327763075499910549379695530291948830112660476759775538295,-327763075499910549376927456246121904517664811669658546091⟩, + ⟨-5081962614552661212943623987680322162416064047227684308401,-5081962614552661212941633283863014665071982296857000162636⟩, + ⟨-3519359251207528183086531905089492375566082083697955034409,-3519359251207528183044837255896059916128418982127895120667⟩, + ⟨1903957516109923300305705902012851707592925197971755185564,1903957516109923300321133985597404127959780819864732029724⟩, + ⟨3291404825099542244882831757310167317143656755344667451989,3291404825099542244927023711403924813487088497986590535043⟩, + ⟨2193193242586779298174202809230051460840358699689081508132,2193193242586779298193169668994857971585215768548743258803⟩, + ⟨-638116694891829975075021999244466390309963372853377286796,-638116694891829975041677839166317607321809315087931212358⟩, + ⟨1200697814795824223037083506396164807175816789012983014634,1200697814795824223055892281833336912723557328905284037501⟩] +lemma tr1_5_0_2_calc (r : Fin 8) : taylorRowBox 1 5 0 2 r = tr1_5_0_2 r := by + revert r + decide +kernel +def tr1_5_0_3 : Fin 8 → RI := ![⟨240593982960153502434407520523912724407784497635409062019,240593982960153502435972259156746310246461506294896669705⟩, + ⟨-17602083333468135082176604025293818160705071902600489772742,-17602083333468135082175478718991470913121245894119066068055⟩, + ⟨2667560712357114070728019026750302375367041224437482042120,2667560712357114070751588204197848687380964199142751579449⟩, + ⟨-1451813391308285121670359048505087050496382195724806307568,-1451813391308285121661637851738679452112259267771462236661⟩, + ⟨-2501835884343037748564269028789848888357621457287851269527,-2501835884343037748539288173261960471505903562174527669537⟩, + ⟨-1676995901277484587975516510399454719204288208442733555370,-1676995901277484587964794912014306636473831549009334651534⟩, + ⟨505603222935177728425794014606543123652190297113648669132,505603222935177728444642822327724421198048799239839252762⟩, + ⟨-936726406451563358157388706108078595866910670944788730596,-936726406451563358146756469731732448795506095830279977825⟩] +lemma tr1_5_0_3_calc (r : Fin 8) : taylorRowBox 1 5 0 3 r = tr1_5_0_3 r := by + revert r + decide +kernel +def tr1_5_0_4 : Fin 8 → RI := ![⟨321075485356447823856222746673655560917956560526248271728,321075485356447823857124104522851342338427999880919958660⟩, + ⟨4355640517452691466823575347002775988790871407643533711653,4355640517452691466824223572621464450594225883731104996968⟩, + ⟨3447758093633430296700037513957485379730834301525382587368,3447758093633430296713614390405478187415863988997573454328⟩, + ⟨-1864215959772764819463807323248582171060939683221277555050,-1864215959772764819458783532696634978207404498410524833682⟩, + ⟨-3223374636716516890989510737462451561340127529378596960823,-3223374636716516890975120672733958856340345426194177923753⟩, + ⟨-2149361343966474156584898649850660620307305847357488668214,-2149361343966474156578722540526250646329266917020867550398⟩, + ⟨630727850736864612001263371801406953286220089738637801963,630727850736864612012121108953597594543852541685726949988⟩, + ⟨-1182432190405118034805721746586554814769295041094460344442,-1182432190405118034799597113685436992523877424464868551912⟩] +lemma tr1_5_0_4_calc (r : Fin 8) : taylorRowBox 1 5 0 4 r = tr1_5_0_4 r := by + revert r + decide +kernel +def tr1_5_0_5 : Fin 8 → RI := ![⟨-4436978877201909671425340026136814022212724506411461888,-4436978877201909671057602630432407449417702067243389364⟩, + ⟨7473220153860622358375191552688825959468757471990967962317,7473220153860622358375456016798198832111788137071598125508⟩, + ⟨-99490041137778340951363462706017816023133577657858587309,-99490041137778340945824347258014048885309449319932934363⟩, + ⟨59067738648996232328285802665450844713156928961911591708,59067738648996232330335416651729989346027124538099783885⟩, + ⟨97269858780496666134499026569501845644411675283462101686,97269858780496666140369907853612704174942546495272226825⟩, + ⟨70859317923204637554958489232848240543513468006596492674,70859317923204637557478228047769921433750907914261455823⟩, + ⟨-32498680098276229560749204857173362454401403320493788448,-32498680098276229556319448144452811886619785637622550080⟩, + ⟨50981745980772715942682458757331277294114292688850026731,50981745980772715945181196139688552848313044618189160723⟩] +lemma tr1_5_0_5_calc (r : Fin 8) : taylorRowBox 1 5 0 5 r = tr1_5_0_5 r := by + revert r + decide +kernel +def tr1_5_0_6 : Fin 8 → RI := ![⟨-107444132514401487885176792095672231478640414003750947514,-107444132514401487885009458620555867895208985619843979326⟩, + ⟨-1914688541362375488383196406317555108299041061627336948066,-1914688541362375488383076065827366847216685960251155863899⟩, + ⟨-1158503162059607041746398784097937478051393280908357129570,-1158503162059607041743878291355585558840219534751523554051⟩, + ⟨626324082420699406394697188636360984524789388946989656473,626324082420699406395629835234216264461756898402167211510⟩, + ⟨1082892396026694897548174338381462088599835311994461907305,1082892396026694897550845796271572289431522681220717121211⟩, + ⟨723310110618721072493241210515613342013191320508164179721,723310110618721072494387780478983392240202170362341677999⟩, + ⟨-216357789459339934951357171443525628592281185040753191762,-216357789459339934949341476022757622673573723997830126937⟩, + ⟨402113663501383849513848810656938243832640749565397229613,402113663501383849514985824228228021014469315718160389536⟩] +lemma tr1_5_0_6_calc (r : Fin 8) : taylorRowBox 1 5 0 6 r = tr1_5_0_6 r := by + revert r + decide +kernel +def tr1_5_0_7 : Fin 8 → RI := ![⟨-22957367280605930439238844386022169170654885467455134527,-22957367280605930439175514884796293953859787624065337878⟩, + ⟨-1597347436284532228100342395538332429251737878791329048381,-1597347436284532228100296851135372007143580762936662583473⟩, + ⟨-227734582365478554464520390429200250825291124407731586785,-227734582365478554463566477602730242056328998342108389164⟩, + ⟨121163702693918948162791845588557239667917677490934617136,121163702693918948163144817663219167727170137513517065484⟩, + ⟨211311870216328770874448108634843348679200233708716966949,211311870216328770875459156158978651864204891748141062072⟩, + ⟨138851405105212752106153457565393142532700581561611368384,138851405105212752106587391683242218078676653878324661968⟩, + ⟨-36613863947637527995861500914705518586331282791919924220,-36613863947637527995098635113308224919439291638958653928⟩, + ⟨72261974311497770443565301320699563661803825512499095411,72261974311497770443995618699245344160432170595650794648⟩] +lemma tr1_5_0_7_calc (r : Fin 8) : taylorRowBox 1 5 0 7 r = tr1_5_0_7 r := by + revert r + decide +kernel +def tr1_5_0_8 : Fin 8 → RI := ![⟨16988205156324463294957931856139761473612574742376265532,16988205156324463294979245429432356341596071508206620954⟩, + ⟨466657367000638120918205333888102224993421856286952035711,466657367000638120918220661878242211185911487262206987649⟩, + ⟨187685498924557467527591728845871118904825356676829498299,187685498924557467527912768654292872070618187254634252614⟩, + ⟨-101755508667372476191690233125847846046138936068577261491,-101755508667372476191571440208812868971384126101696828151⟩, + ⟨-175620080472201682991942991526457296496425853015520327884,-175620080472201682991602723008780895734866390368118973415⟩, + ⟨-117990008282694864704232304078075786184561621421004995411,-117990008282694864704086263347492440860416021422390706384⟩, + ⟨37290779366597014427793425358369843098030073349874313759,37290779366597014428050168200996667984384892864138433106⟩, + ⟨-67583258787347145040231316070630345667455202175912974335,-67583258787347145040086492555382200412762802727166517391⟩] +lemma tr1_5_0_8_calc (r : Fin 8) : taylorRowBox 1 5 0 8 r = tr1_5_0_8 r := by + revert r + decide +kernel +def tr1_5_0_9 : Fin 8 → RI := ![⟨6717264990938223181727477404160868510633071631175134652,6717264990938223181735336497152485187421785915224329337⟩, + ⟨190658751666584903059339915006351547270023626202495139243,190658751666584903059345566996200169518114279891792562386⟩, + ⟨68864821808037577982212847597057720835721816101171059003,68864821808037577982331226701011060063211401695608818053⟩, + ⟨-36837820680754736121390950593792872619965473656872546764,-36837820680754736121347147306146443689580917274047094956⟩, + ⟨-64047949079775445746692297642529611180528186679430622490,-64047949079775445746566828211107872274250384946938121801⟩, + ⟨-42412977171704746668895808774302457264231978625328802394,-42412977171704746668841958222521673209880689500284609037⟩, + ⟨11954497370999479394736732530613520559148421443817136170,11954497370999479394831402994710713239239779745099374485⟩, + ⟨-22866440080194821221510923295823218324506833310166919448,-22866440080194821221457521575798060943701984762859971202⟩] +lemma tr1_5_0_9_calc (r : Fin 8) : taylorRowBox 1 5 0 9 r = tr1_5_0_9 r := by + revert r + decide +kernel +def tr1_5_0_10 : Fin 8 → RI := ![⟨-1210233118697746022018712471855021507290214684859515825,-1210233118697746022016695737758914505770620348776752957⟩, + ⟨-76877991541804163351269701595027457659301149187390938848,-76877991541804163351268251229107605083114492241254850646⟩, + ⟨-14898844965027443035432798679448468716904667159381132154,-14898844965027443035402421233163555625354129459877591289⟩, + ⟨8196615046127149793083497561972023379035889828141390070,8196615046127149793094737991857619335257288408704631748⟩, + ⟨14027224913003088145154954850032022267074364561806316958,14027224913003088145187151756294766369896473037157240428⟩, + ⟨9620482465918195272808726202627484393049108280677635723,9620482465918195272822544876615390769939396390088482471⟩, + ⟨-3590111461375200605262236079432928593535126220119810214,-3590111461375200605237942544161535358652009974622860735⟩, + ⟨6046254582134521394660737784475301492457402298550574957,6046254582134521394674441283043996089797714377951437567⟩] +lemma tr1_5_0_10_calc (r : Fin 8) : taylorRowBox 1 5 0 10 r = tr1_5_0_10 r := by + revert r + decide +kernel +def tr1_5_0_11 : Fin 8 → RI := ![⟨-938622465042455760373318431674715470153847094655009904,-938622465042455760372619523185149557104923705184962172⟩, + ⟨-10551589209757924379410394634405327167914434491585932596,-10551589209757924379409892003415653278841422308855923064⟩, + ⟨-10036751804352292801281433705503040077881483926376396720,-10036751804352292801270906261581564063962092950075707310⟩, + ⟨5401683653271417106572677874611160565300326651869313348,5401683653271417106576573297357694057423954711656383637⟩, + ⟨9358096887493791898163775095764658958989867288733203740,9358096887493791898174933081921824924736408248512022952⟩, + ⟨6255825009718119265904572638921047903930389667772532992,6255825009718119265909361564036310377664495599264033827⟩, + ⟨-1921530133621611907666209755048670035617063170082012225,-1921530133621611907657790718508306806269651331989478097⟩, + ⟨3531058402591279432446033909900068159003710669935543800,3531058402591279432450782920443941638914248221108557912⟩] +lemma tr1_5_0_11_calc (r : Fin 8) : taylorRowBox 1 5 0 11 r = tr1_5_0_11 r := by + revert r + decide +kernel +def tr1_5_0_12 : Fin 8 → RI := ![⟨-10475177740925011121014711623120669676663197311067024,-10475177740925011120877536417037403693722456019219079⟩, + ⟨10669103703695655896355803356571686499124702233130047629,10669103703695655896355902008270131974458137761124400789⟩, + ⟨192473935989348314578997799433407472374260376703028315,192473935989348314581064027431694032243721065589097448⟩, + ⟨-129870857073234955756378555115830660724779238111988424,-129870857073234955755613998058199000606573512765189312⟩, + ⟨-198925065699457944186501067476056490874666460954143620,-198925065699457944184311082558884845039087426526834252⟩, + ⟨-171845494559025899186170820181902791264064703784680706,-171845494559025899185230894855714370152214646786468150⟩, + ⟨163397279365662424341074832983809356659191083492231084,163397279365662424342727242546673954025947274272001127⟩, + ⟨-202946825320927726005666966587761689136833822869729327,-202946825320927726004734875320163113377193919822983996⟩] +lemma tr1_5_0_12_calc (r : Fin 8) : taylorRowBox 1 5 0 12 r = tr1_5_0_12 r := by + revert r + decide +kernel +def tr1_5_0_13 : Fin 8 → RI := ![⟨77305843434091830325754556686076221007356732009539220,77305843434091830325795830943977818676811052977146408⟩, + ⟨-435324495876860130913254026963772951602511351589471251,-435324495876860130913224343934600133723292152432891198⟩, + ⟨909415360354078211883592392082713811827259993628552129,909415360354078211884214093552837603805181554559113878⟩, + ⟨-496156165558003406616173942653465463464701528724686109,-496156165558003406615943897253280353210305937565459286⟩, + ⟨-852821367818147235262535544436989533782770217069167144,-852821367818147235261876606099233673091826022516884034⟩, + ⟨-580781408631170664133183820705326788672094400650983533,-580781408631170664132901009245190099227223330974347935⟩, + ⟨208359254998509958985457067843370767753606725898276114,208359254998509958985954256660510837984045486000828556⟩, + ⟨-356967992491389495968855617084666845825139774627877654,-356967992491389495968575162792202361669742650718772749⟩] +lemma tr1_5_0_13_calc (r : Fin 8) : taylorRowBox 1 5 0 13 r = tr1_5_0_13 r := by + revert r + decide +kernel +def tr1_5_0_14 : Fin 8 → RI := ![⟨9967919775061733619223790095663730910702209150305302,9967919775061733619233220936886925804445002638091241⟩, + ⟨-1465079060661441090111424194098584664677866847996872015,-1465079060661441090111417411761377566150848499800928643⟩, + ⟨89121671139279061524004740294895206579866024328181557,89121671139279061524146794159724187155261711286521417⟩, + ⟨-46425877724270748723506258260008228730746802805775710,-46425877724270748723453694706977571378627797795494769⟩, + ⟨-81982363307336251686130571555992254000144002248009669,-81982363307336251685980009361647404126569489494960094⟩, + ⟨-52532841761648916610798472353652960738711714356470658,-52532841761648916610733852173583230477509800801680574⟩, + ⟨8665299961714333112081250880809236905207357660973631,8665299961714333112194854589974216417366094670962252⟩, + ⟨-22781731953853974828103497724976314828059598371566710,-22781731953853974828039416139095351708258271917277331⟩] +lemma tr1_5_0_14_calc (r : Fin 8) : taylorRowBox 1 5 0 14 r = tr1_5_0_14 r := by + revert r + decide +kernel +def tr1_5_0_15 : Fin 8 → RI := ![⟨-3890461134019821696598037325112788732268987706067398,-3890461134019821696595651196255454687778753285250164⟩, + ⟨124691085150424585215160779913672343167869735095372872,124691085150424585215162495935620765046861616729180047⟩, + ⟨-55635991166038447810307892825151629614915525675663146,-55635991166038447810271951299029793671456659342115592⟩, + ⟨31105321988001161110605407086941780662062027715056756,31105321988001161110618706368284494307588442362911891⟩, + ⟨52721113400447153573043940524587335989202752907446432,52721113400447153573082034771777912154723149113994954⟩, + ⟨37040630415648320586074916302906984417176325248883052,37040630415648320586091266072008931458764324381811104⟩, + ⟨-16660462620624134477839071595161780250838450759311915,-16660462620624134477810328338612493696459607598014742⟩, + ⟨25959586815387960348703892661926560159006712353328553,25959586815387960348720106159500600680342697717249536⟩] +lemma tr1_5_0_15_calc (r : Fin 8) : taylorRowBox 1 5 0 15 r = tr1_5_0_15 r := by + revert r + decide +kernel +def tr1_5_0_16 : Fin 8 → RI := ![⟨-992728327046418214750697248987601477057434512520690,-992728327046418214750130085264784471780810381664511⟩, + ⟨193188930806587727339574207230254624081016157767933546,193188930806587727339574615114930970769607219806116668⟩, + ⟨-11982319071872674623588401511163242130060415057578540,-11982319071872674623579858498199444296332473102470490⟩, + ⟨6557788016222733313491230204723237287175541777312975,6557788016222733313494391337406863226572935401901267⟩, + ⟨11256131382975341190188582073533603219141303447207011,11256131382975341190197636771059880596703818361283544⟩, + ⟨7689943791821749888331600552775772724781284233179247,7689943791821749888335486761975344017327509939715750⟩, + ⟨-2700605386380949271034741490305327938739490146216007,-2700605386380949271027909448381570693223601111633121⟩, + ⟨4704885213535576286359212030723642594905901464468234,4704885213535576286363065849269436317397636539374841⟩] +lemma tr1_5_0_16_calc (r : Fin 8) : taylorRowBox 1 5 0 16 r = tr1_5_0_16 r := by + revert r + decide +kernel +def tr1_5_0_17 : Fin 8 → RI := ![⟨100949989072265753231912243159249368898980361969013,100949989072265753232009627057455134237432508253031⟩, + ⟨-5227566555859485250727721924606672884655175744484344,-5227566555859485250727651889450717203295400397263816⟩, + ⟨2135042022890596992915993302678866010113733609169025,2135042022890596992917460166428275863869345609069490⟩, + ⟨-1237850225047294102585365598710339227752386349327346,-1237850225047294102584822821710796845076786428433155⟩, + ⟨-2054535763204676042928128899754251857039518850672505,-2054535763204676042926574178062302494316727201538643⟩, + ⟨-1509106383766205786139180300551306026814392961673763,-1509106383766205786138513025500880776381548656731592⟩, + ⟨897083675703470431903221796814080572173486105755454,897083675703470431904394881142246087042108247179631⟩, + ⟨-1256360712558244815676386444658298999573661763908707,-1256360712558244815675724731192218863936885382296400⟩] +lemma tr1_5_0_17_calc (r : Fin 8) : taylorRowBox 1 5 0 17 r = tr1_5_0_17 r := by + revert r + decide +kernel +def tr1_5_0_18 : Fin 8 → RI := ![⟨57029877127512918235337604818339000377728297676164,57029877127512918235364214967769623294569497246476⟩, + ⟨-21746977357955389630354102816643532475848007554356899,-21746977357955389630354083679537698000205999026846879⟩, + ⟨934464043652490890625312213782192070007931196955982,934464043652490890625713034290408345910041241131044⟩, + ⟨-529932120775785195895627277012836704223743398389111,-529932120775785195895478963201996091605845913636196⟩, + ⟨-891360796002738161388576392495273935899807513450842,-891360796002738161388151564804929634638669349102641⟩, + ⟨-636539907382442818560200826441889076907258889456151,-636539907382442818560018493539603241440052881957735⟩, + ⟨307229399214247775481666002015831797762920557301715,307229399214247775481986547299626452201484691430366⟩, + ⟨-467881111279941655060955317131860867664580869083011,-467881111279941655060774503932365394212011081349887⟩] +lemma tr1_5_0_18_calc (r : Fin 8) : taylorRowBox 1 5 0 18 r = tr1_5_0_18 r := by + revert r + decide +kernel +def tr1_5_0_19 : Fin 8 → RI := ![⟨1166787554371767731588459396031090600308003874026,1166787554371767731591702048560394708686104816477⟩, + ⟨-1287160074409203383129712612495250097325524746623362,-1287160074409203383129710280490888308100906269518098⟩, + ⟨-10587413545561915310525239263649729826245921279686,-10587413545561915310476396184490437397123031923141⟩, + ⟨7774366019116745944171963773625249743322111802154,7774366019116745944190036958673687482710252247918⟩, + ⟨11257015757763831545743383062899690373457511743415,11257015757763831545795151602937810875570259851794⟩, + ⟨10535889670524649666792896415072488579762456728901,10535889670524649666815115089586898518295412634799⟩, + ⟨-16515131831313296131779209713491786719408808226423,-16515131831313296131740148791423180624047924436181⟩, + ⟨17402933250025708114856771588911256209426472116756,17402933250025708114878805075789528631810750587476⟩] +lemma tr1_5_0_19_calc (r : Fin 8) : taylorRowBox 1 5 0 19 r = tr1_5_0_19 r := by + revert r + decide +kernel +def tr1_5_0_20 : Fin 8 → RI := ![⟨-2173745520631514259070217559137532350576901131882,-2173745520631514259068934275058686121617291397121⟩, + ⟨1938850357683646375735097671072507202594205285172708,1938850357683646375735098593966356185075962783326584⟩, + ⟨-49963089122895843417943810438982069050966617421907,-49963089122895843417924480725029982735400528548323⟩, + ⟨29147055176215490647984860945406584539872123727155,29147055176215490647992013432568039723994426111437⟩, + ⟨48239044146120039957739184300487079800594584639870,48239044146120039957759671769482588051707580165724⟩, + ⟨35617994251062305339146447523310923663405809828569,35617994251062305339155240593462822674051316238818⟩, + ⟨-21112794028780620844782389909211527738529625708571,-21112794028780620844766931496990340532390982166481⟩, + ⟨29714881866266541697513783627817608027604871915380,29714881866266541697522503409746656562281031826590⟩] +lemma tr1_5_0_20_calc (r : Fin 8) : taylorRowBox 1 5 0 20 r = tr1_5_0_20 r := by + revert r + decide +kernel +def tr1_5_0 : Fin 21 → Fin 8 → RI := ![tr1_5_0_0,tr1_5_0_1,tr1_5_0_2,tr1_5_0_3,tr1_5_0_4,tr1_5_0_5,tr1_5_0_6,tr1_5_0_7,tr1_5_0_8,tr1_5_0_9,tr1_5_0_10,tr1_5_0_11,tr1_5_0_12,tr1_5_0_13,tr1_5_0_14,tr1_5_0_15,tr1_5_0_16,tr1_5_0_17,tr1_5_0_18,tr1_5_0_19,tr1_5_0_20] +lemma tr1_5_0_mem (l : Fin 21) (r : Fin 8) : (tr1_5_0 l r).Mem (taylorRow 1 (nearNode 5) (nearDisplacement 5 0) l.val r) := by + have he : taylorRowBox 1 5 0 l r = tr1_5_0 l r := by + fin_cases l + · exact tr1_5_0_0_calc r + · exact tr1_5_0_1_calc r + · exact tr1_5_0_2_calc r + · exact tr1_5_0_3_calc r + · exact tr1_5_0_4_calc r + · exact tr1_5_0_5_calc r + · exact tr1_5_0_6_calc r + · exact tr1_5_0_7_calc r + · exact tr1_5_0_8_calc r + · exact tr1_5_0_9_calc r + · exact tr1_5_0_10_calc r + · exact tr1_5_0_11_calc r + · exact tr1_5_0_12_calc r + · exact tr1_5_0_13_calc r + · exact tr1_5_0_14_calc r + · exact tr1_5_0_15_calc r + · exact tr1_5_0_16_calc r + · exact tr1_5_0_17_calc r + · exact tr1_5_0_18_calc r + · exact tr1_5_0_19_calc r + · exact tr1_5_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 5 0 l r +def tr1_5_1_0 : Fin 8 → RI := ![⟨-131587480702055847553296911351804815793742116057753537012,-131587480702055847548576203569038974503107360166538805769⟩, + ⟨6615160235433789647905209889417838062729156954275809251432,6615160235433789647908604860379468395971753557550991973583⟩, + ⟨-1442242746807410599991692534443923015669485057637475817114,-1442242746807410599920585962981072136752913559299239963521⟩, + ⟨783628801166012795002434298586263221711567096693474353578,783628801166012795028745543528978110007760857016391688429⟩, + ⟨1351668816280008548469632871183185432563757030553685951910,1351668816280008548544998377372916379623901539984287150684⟩, + ⟨903645452556859809247263742520682606302449429738982010713,903645452556859809279610060217913992662868240531012566927⟩, + ⟨-267094008327254985208940152689482777853773311648174972712,-267094008327254985152074608844215626789797151517423552247⟩, + ⟨499158347052195404862733432982234631908443640045929107991,499158347052195404894810151712441432233901586821083482163⟩] +lemma tr1_5_1_0_calc (r : Fin 8) : taylorRowBox 1 5 1 0 r = tr1_5_1_0 r := by + revert r + decide +kernel +def tr1_5_1_1 : Fin 8 → RI := ![⟨146075971832827763645737016819669358529491187644259544067,146075971832827763647055646336138535392912431739176515435⟩, + ⟨-4692850316016940313698893421029443128642194646587518661259,-4692850316016940313697945107953696840449897975086298119082⟩, + ⟨1592820883362785052238470902361604810324040489665036884316,1592820883362785052258333013777723404724648815181834128587⟩, + ⟨-864471915679490609743862320749899099569583581943712035970,-864471915679490609736512832962112385812772770736006633547⟩, + ⟨-1491963614938190833460431036074464195398518781017283051861,-1491963614938190833439379281643429387107477898673521247137⟩, + ⟨-996679212904457753413962455033927451843343951142149678058,-996679212904457753404927197773821051964542348952228017858⟩, + ⟨293694544418548141784726258041504296040610748353744698023,293694544418548141800610440674341793353200686802067946092⟩, + ⟨-549582353498076583595645647856473522367965959170756946626,-549582353498076583586685697345846516445790986848436850567⟩] +lemma tr1_5_1_1_calc (r : Fin 8) : taylorRowBox 1 5 1 1 r = tr1_5_1_1 r := by + revert r + decide +kernel +def tr1_5_1_2 : Fin 8 → RI := ![⟨-36418119499990061042188392254660981123628941862197282033,-36418119499990061041880828471791322724184979074406505121⟩, + ⟨-564662512728073468104847109742258018046229338580853812045,-564662512728073468104625920429223851674664699650777795848⟩, + ⟨-391039916800836464787392433898832486174009120410883892713,-391039916800836464782759695099562212903157664680877235629⟩, + ⟨211550835123324811145078433556983523065880577552417242840,211550835123324811146792665066378236439975646651636892192⟩, + ⟨365711647233282471653647973034463035238184083927185272443,365711647233282471658558190155991645943009833109621170561⟩, + ⟨243688138065197699797133645470005717871150966632120167570,243688138065197699799241074332761996842801752060971473201⟩, + ⟨-70901854987981108341669111027162932256662596983708587422,-70901854987981108337964204351813067480201035009770134706⟩, + ⟨133410868310647135893009278488462756352868532112553668292,133410868310647135895099142425926323635950814322809337501⟩] +lemma tr1_5_1_2_calc (r : Fin 8) : taylorRowBox 1 5 1 2 r = tr1_5_1_2 r := by + revert r + decide +kernel +def tr1_5_1_3 : Fin 8 → RI := ![⟨-8910888257783463053184157746546159638757833566477654434,-8910888257783463053126204463848619422510536949459594889⟩, + ⟨651929012350671669710202915518202626411897996078483928446,651929012350671669710244593529400672618706366762981102695⟩, + ⟨-98798544902115335953762526081401803236332007375657465906,-98798544902115335952889593583344532421001526831017853411⟩, + ⟨53770866344751300802282883397728868596750343250794897654,53770866344751300802605890685373594462828970212029863244⟩, + ⟨92660588309001398094047710120813350796514946747204728501,92660588309001398094972926992216625494726720640290787761⟩, + ⟨62110959306573503257955367111640986536067835148493875982,62110959306573503258352463348127952563121785497879020570⟩, + ⟨-18726045293895471423875660086212015599927733305179231584,-18726045293895471423177556096538634209340381374579580338⟩, + ⟨34693570609317161412842832212286386992426151697417776956,34693570609317161413236618744743651698774469294251434467⟩] +lemma tr1_5_1_3_calc (r : Fin 8) : taylorRowBox 1 5 1 3 r = tr1_5_1_3 r := by + revert r + decide +kernel +def tr1_5_1_4 : Fin 8 → RI := ![⟨3963894880943800294521268477452537789110574821311707058,3963894880943800294532396352133967189363308640505184675⟩, + ⟨53773339721638166257081177123491061590010758119055971748,53773339721638166257089179908906968525854640539890185148⟩, + ⟨42564914736215188848148611283425745428775732117597315893,42564914736215188848316227042042940585381036901204610548⟩, + ⟨-23015011849046479252639596583315829272357280039768858705,-23015011849046479252577574477736234298856845659389195477⟩, + ⟨-39794748601438480135672972067437673596791697893562925443,-39794748601438480135495316947332825386917844767829357083⟩, + ⟨-26535325234154001933146896911736550867991430214289983559,-26535325234154001933070648648472230201595887864455154943⟩, + ⟨7786763589344007555571152738288974731928643083193059283,7786763589344007555705198875970340673380895576366999383⟩, + ⟨-14597928276606395491428663538105614997151790630795806722,-14597928276606395491353050786239962870665153388455167307⟩] +lemma tr1_5_1_4_calc (r : Fin 8) : taylorRowBox 1 5 1 4 r = tr1_5_1_4 r := by + revert r + decide +kernel +def tr1_5_1_5 : Fin 8 → RI := ![⟨18259172334164237329455154857746532713653094926927528,18259172334164237330968477473814049474126438297989556⟩, + ⟨-30753992402718610528294057682297114535439457354204107513,-30753992402718610528292969352628913413451676839469003960⟩, + ⟨409424037604026094427260688304584563314030655637584092,409424037604026094450055402082377843716599085011763734⟩, + ⟨-243077113781877499301791838072962919119453187399587589,-243077113781877499293357212615024052317518226180706138⟩, + ⟨-400287484693401918273127192813221004835154512326223156,-400287484693401918248967187528814179606632408573918113⟩, + ⟨-291602131371212500236535917892057289850826781540170601,-291602131371212500226166622357400166845734436241137829⟩, + ⟨133739424272741685416952461499805810233003233076636008,133739424272741685435181912992482973063380260578163739⟩, + ⟨-209801423789188131461651012920529024067131870856745518,-209801423789188131451368143034285091745326307361522743⟩] +lemma tr1_5_1_5_calc (r : Fin 8) : taylorRowBox 1 5 1 5 r = tr1_5_1_5 r := by + revert r + decide +kernel +def tr1_5_1_6 : Fin 8 → RI := ![⟨-147385641309192713148390661310935845649712502062758502,-147385641309192713148161122936290628114141269711720136⟩, + ⟨-2626458904475137844147045824852613317282635201134892933,-2626458904475137844146880748734385249954301728739582803⟩, + ⟨-1589167574841710619679559374619941670852391331835880837,-1589167574841710619676101908581050149300712667697563174⟩, + ⟨859155119918654878456374744357148126920150053425225866,859155119918654878457654094971490074707485457341793158⟩, + ⟨1485449102917276951369237775557561164060130743476628130,1485449102917276951372902326847149916915668972867924721⟩, + ⟨992194939120330689291140206468605407425502497267714924,992194939120330689292713004772268027764337682252869243⟩, + ⟨-296787091165075356586223829140638722348808209932446080,-296787091165075356583458814846032404216150513028573562⟩, + ⟨551596246229607475327638972094565492225844649609598394,551596246229607475329198661492768204409422929654541001⟩] +lemma tr1_5_1_6_calc (r : Fin 8) : taylorRowBox 1 5 1 6 r = tr1_5_1_6 r := by + revert r + decide +kernel +def tr1_5_1_7 : Fin 8 → RI := ![⟨10497195830181038152343628205210925447581064299984150,10497195830181038152372585453142281285164556683792929⟩, + ⟨730382915539338010105302629691528123979689420638620294,730382915539338010105323454750037690558636432917845930⟩, + ⟨104131039033140628469852070234444555124064471121220113,104131039033140628470288244366346708196292237955067027⟩, + ⟨-55401784496533583979490085808513565490246976457941046,-55401784496533583979328690255398829294886912432983364⟩, + ⟨-96621797081083114254896733497475378081483718220457734,-96621797081083114254434434675282738307819036903848636⟩, + ⟨-63489439920078990446542017230563428476761158609201949,-63489439920078990446343601996064537051989291980617909⟩, + ⟨16741593025897360765934446782491186520091125577941771,16741593025897360766283265164474402645784765794202069⟩, + ⟨-33041597764745208250569555875283650736365875901074895,-33041597764745208250372794385322159881940478057841378⟩] +lemma tr1_5_1_7_calc (r : Fin 8) : taylorRowBox 1 5 1 7 r = tr1_5_1_7 r := by + revert r + decide +kernel +def tr1_5_1_8 : Fin 8 → RI := ![⟨2589270714269846562255438478302051741138938384754803,2589270714269846562258687003419045319554347128213172⟩, + ⟨71125951379460161700686684025011770308401441287448869,71125951379460161700689020252742297086711093928091296⟩, + ⟨28606233641907859705470466216410778677766400956687928,28606233641907859705519397752521394920075931604120447⟩, + ⟨-15509146268460977928927028368518190221938566692360504,-15509146268460977928908922452189128024902320698322942⟩, + ⟨-26767273353482957322350707441923075216647744705916831,-26767273353482957322298845146895426876218014078359849⟩, + ⟨-17983540357063689179123960383794510925859110108368389,-17983540357063689179101701470430184554247221676938074⟩, + ⟨5683703607163087094618720524061856896514262056069854,5683703607163087094657852187318498397254213208983148⟩, + ⟨-10300755797492325109012546268957528679691388839492909,-10300755797492325108990472878430452737808688115708964⟩] +lemma tr1_5_1_8_calc (r : Fin 8) : taylorRowBox 1 5 1 8 r = tr1_5_1_8 r := by + revert r + decide +kernel +def tr1_5_1_9 : Fin 8 → RI := ![⟨-341272417362100451238903444452191494559863126313282,-341272417362100451238504161162468552082155750199417⟩, + ⟨-9686468102757958799946429253477628893873610724574129,-9686468102757958799946142102644492570747529655159027⟩, + ⟨-3498695412693063962928985759336029063822151180999280,-3498695412693063962922971477775629773699223497493830⟩, + ⟨1871555183699371849888083488601658471248331924708992,1871555183699371849890308926169429081947135785036456⟩, + ⟨3253972924847606855995876045882633352347222727579033,3253972924847606856002250553397836263807762367496349⟩, + ⟨2154802477859307355019151461795543017318533226656739,2154802477859307355021887353264363017031548982641305⟩, + ⟨-607351388050575592888858557877900383033063036381618,-607351388050575592884048800010847968254250949744304⟩, + ⟨1161735511872926953282402152913583343174413695212110,1161735511872926953285115241366825093964681873198543⟩] +lemma tr1_5_1_9_calc (r : Fin 8) : taylorRowBox 1 5 1 9 r = tr1_5_1_9 r := by + revert r + decide +kernel +def tr1_5_1_10 : Fin 8 → RI := ![⟨-20495404133816762722801613437230461265901449387111,-20495404133816762722767459868226633910322280627559⟩, + ⟨-1301935537296214387225350159952369348495336909810343,-1301935537296214387225325597878162290354019411696300⟩, + ⟨-252313247726929211933018318336440392164213909793242,-252313247726929211932503873616209514561705184844410⟩, + ⟨138810395538064146608469196124778122898540023169594,138810395538064146608659553791895194419165242573196⟩, + ⟨237552285610308187186149720571593460804998637772126,237552285610308187186694978006312831206226575169051⟩, + ⟨162923715319788570048751481017925526140139685357544,162923715319788570048985501475306792154640999679732⟩, + ⟨-60798852840440999936700639798013998434099243342306,-60798852840440999936289226645015755705465121756894⟩, + ⟨102393852260572090884870832435355408092557067834350,102393852260572090885102902386898949851779274466146⟩] +lemma tr1_5_1_10_calc (r : Fin 8) : taylorRowBox 1 5 1 10 r = tr1_5_1_10 r := by + revert r + decide +kernel +def tr1_5_1_11 : Fin 8 → RI := ![⟨5298551288153091841084633232203478224891890380220,5298551288153091841088578591083763598332724204503⟩, + ⟨59564029928578662802135469431690366073607920590559,59564029928578662802138306798338821249665162218869⟩, + ⟨56657757706042398693011489111198970707729134278738,56657757706042398693070916840268478031699571126672⟩, + ⟨-30492662327171315949897956484488555027316040980973,-30492662327171315949875966709067387905526634105400⟩, + ⟨-52826730836501842527251001043889114265194489596279,-52826730836501842527188013885443495848023772848161⟩, + ⟨-35314315284583533821681211446066319935784944702784,-35314315284583533821654177823621330894287736556489⟩, + ⟨10847093846475593194678943016298931431351653327403,10847093846475593194726468723990076239603623939904⟩, + ⟨-19932928034859633143382518024262006350173856859606,-19932928034859633143355709720740786798555497242039⟩] +lemma tr1_5_1_11_calc (r : Fin 8) : taylorRowBox 1 5 1 11 r = tr1_5_1_11 r := by + revert r + decide +kernel +def tr1_5_1_12 : Fin 8 → RI := ![⟨-19710894983497718695047449525197848259097806363,-19710894983497718694789330174069000498122004172⟩, + ⟨20075800895481635583923339291796618061317629300580,20075800895481635583923524922371687495805061636427⟩, + ⟨362173667423756004107695491001649237402195872548,362173667423756004111583463510895908000551454610⟩, + ⟨-244374929810148174033201343358586674202365338979,-244374929810148174031762694369081423161881587542⟩, + ⟨-374312606102009337229346376128406522783651357262,-374312606102009337225225533142690994934691577290⟩, + ⟨-323357615537803630480468801206348007142965453898,-323357615537803630478700165880529297047489084934⟩, + ⟨307460808190678597136981965982694893053398370641,307460808190678597140091266098539544419695270542⟩, + ⟨-381880256361341571323377320507378409149527083665,-381880256361341571321623426344905856674953418767⟩] +lemma tr1_5_1_12_calc (r : Fin 8) : taylorRowBox 1 5 1 12 r = tr1_5_1_12 r := by + revert r + decide +kernel +def tr1_5_1_13 : Fin 8 → RI := ![⟨-48488194320781817941405744597536270051182259165,-48488194320781817941379856331543997676353368802⟩, + ⟨273046613438343504367198079645467156732539236047,273046613438343504367216697597521300014182415728⟩, + ⟨-570408480812280956797470834675807602226889754811,-570408480812280956797080887676282542387747020916⟩, + ⟨311201786311809718994171129221168077742280540119,311201786311809718994315419556429571338242958751⟩, + ⟨534911286996516537277500610666241202749898246789,534911286996516537277913913577731447004634705182⟩, + ⟨364280894543433585373165292883054499763989687769,364280894543433585373342679435300618928595021618⟩, + ⟨-130688232559217899375442903765743100980193778802,-130688232559217899375131054274052853627280498304⟩, + ⟨223899418431139421540412553034863300391290002539,223899418431139421540588461111498012526407619177⟩] +lemma tr1_5_1_13_calc (r : Fin 8) : taylorRowBox 1 5 1 13 r = tr1_5_1_13 r := by + revert r + decide +kernel +def tr1_5_1_14 : Fin 8 → RI := ![⟨2084044403185915196026524549012074071711986665,2084044403185915196028496303632100857113019683⟩, + ⟨-306311636278939104583664287621053923761133899885,-306311636278939104583662869602829867003287811357⟩, + ⟨18633127486144915746684693188455791074511673466,18633127486144915746714393122707712961397347817⟩, + ⟨-9706497726468799760882050094827758392485253994,-9706497726468799760871060361666063773072289992⟩, + ⟨-17140475572251514004404078628983849571290134277,-17140475572251514004372599814392985638537379082⟩, + ⟨-10983312198270345597221824426136351864022475236,-10983312198270345597208313951769963484502994019⟩, + ⟨1811698959728639912171969101369721799411068242,1811698959728639912195720814827404571797579009⟩, + ⟨-4763094210699248694295007499520970097874269805,-4763094210699248694281609631819765444488198003⟩] +lemma tr1_5_1_14_calc (r : Fin 8) : taylorRowBox 1 5 1 14 r = tr1_5_1_14 r := by + revert r + decide +kernel +def tr1_5_1_15 : Fin 8 → RI := ![⟨271132925596341358724790062145880148765251129,271132925596341358724956355568601060155243024⟩, + ⟨-8689936115024272247019406839532848393739092234,-8689936115024272247019287247012775479544869521⟩, + ⟨3877367883563427361420068531981550488232773363,3877367883563427361422573358733987865062859888⟩, + ⟨-2167783371095872397153226121563439940588397595,-2167783371095872397152299271780197659798201195⟩, + ⟨-3674225040307749821856259488738613481481422182,-3674225040307749821853604635153558106495690083⟩, + ⟨-2581425220446987396746753329156634122638353178,-2581425220446987396745613885636514643043984134⟩, + ⟨1161096285635145204983928625268286545899252646,1161096285635145204985931792237679166144045032⟩, + ⟨-1809168239461581314083372772539441553307349314,-1809168239461581314082242826016403908604795637⟩] +lemma tr1_5_1_15_calc (r : Fin 8) : taylorRowBox 1 5 1 15 r = tr1_5_1_15 r := by + revert r + decide +kernel +def tr1_5_1_16 : Fin 8 → RI := ![⟨-23061647995126463052800171445987755421776133,-23061647995126463052786995907650770235921346⟩, + ⟨4487889584123904056236343930360099299573041992,4487889584123904056236353405754899909091965909⟩, + ⟨-278356139411238189863251175650829296151509777,-278356139411238189863052716563462390000215651⟩, + ⟨152341174051857127828417644278253790507656594,152341174051857127828491079202219914185169538⟩, + ⟨261486383201529825934676466380182667551874704,261486383201529825934886812193195402658051896⟩, + ⟨178641801586275291173318417279118024454900623,178641801586275291173408696146109340530896882⟩, + ⟨-62736610911222466190508250101217417669036630,-62736610911222466190349537851711648216448382⟩, + ⟨109297179999739731310991423265982154480614248,109297179999739731311080949679522310593590545⟩] +lemma tr1_5_1_16_calc (r : Fin 8) : taylorRowBox 1 5 1 16 r = tr1_5_1_16 r := by + revert r + decide +kernel +def tr1_5_1_17 : Fin 8 → RI := ![⟨-781708701051165261670063302130531879826050,-781708701051165261669309207541029423193312⟩, + ⟨40479789047962447211156546933046051701943417,40479789047962447211157089251983311223288264⟩, + ⟨-16532749946200679589644471537706483023947753,-16532749946200679589633112842507919167747477⟩, + ⟨9585323390425750837753107232107155115459986,9585323390425750837757310239033376686634555⟩, + ⟨15909347761971432875817062257094274337540732,15909347761971432875829101282412442495054919⟩, + ⟨11685802067372377299372876163249699292864828,11685802067372377299378043223867589719662914⟩, + ⟨-6946589309349643858699441792885502917029060,-6946589309349643858690357985796259000954537⟩, + ⟨9728659801662514671564451495947228004791084,9728659801662514671569575490301177640403488⟩] +lemma tr1_5_1_17_calc (r : Fin 8) : taylorRowBox 1 5 1 17 r = tr1_5_1_17 r := by + revert r + decide +kernel +def tr1_5_1_18 : Fin 8 → RI := ![⟨147204081216037384732477597018207780894438,147204081216037384732546282465121826054403⟩, + ⟨-56132749752312117984947623192545019155783492,-56132749752312117984947573796329852859707683⟩, + ⟨2412015033238190173843160405959304000589218,2412015033238190173844194993751113524380590⟩, + ⟨-1367847431465570206060080826062962055225075,-1367847431465570206059698002193157346424819⟩, + ⟨-2300758016963677316995427137812718872232407,-2300758016963677316994330583287580421795062⟩, + ⟨-1643020762855014667435931160682338297568096,-1643020762855014667435460527591258193471674⟩, + ⟨793012780525006707845196081035951089729073,793012780525006707846023464442084404579555⟩, + ⟨-1207682929954542634065374165411940481197888,-1207682929954542634064907454939393755739157⟩] +lemma tr1_5_1_18_calc (r : Fin 8) : taylorRowBox 1 5 1 18 r = tr1_5_1_18 r := by + revert r + decide +kernel +def tr1_5_1_19 : Fin 8 → RI := ![⟨-1003894207543032768883580348930551535429,-1003894207543032768880790397941576600773⟩, + ⟨1107461712321572976255015327365136082671926,1107461712321572976255017333802093687861653⟩, + ⟨9109321651082419744778819363965404005881,9109321651082419744820843538857276618503⟩, + ⟨-6688999196698608217895979647644713220722,-6688999196698608217880429631093714770225⟩, + ⟨-9685441767952745477877183725766425047946,-9685441767952745477832642508916361049296⟩, + ⟨-9064990941943229428955262000083926483898,-9064990941943229428936145239229968018687⟩, + ⟨14209480654935363293550666075229336174876,14209480654935363293584273764357522763343⟩, + ⟨-14973337535611260280109419712689768309949,-14973337535611260280090462285721854882268⟩] +lemma tr1_5_1_19_calc (r : Fin 8) : taylorRowBox 1 5 1 19 r = tr1_5_1_19 r := by + revert r + decide +kernel +def tr1_5_1_20 : Fin 8 → RI := ![⟨-623424126828171576149659836434932000425,-623424126828171576149291794155495914075⟩, + ⟨556056852017460421045143270122283423222818,556056852017460421045143534805654358861509⟩, + ⟨-14329274017793176257227327901821156808304,-14329274017793176257221784194000695466401⟩, + ⟨8359293785946787206584403021541045531329,8359293785946787206586454334825401131533⟩, + ⟨13834822747367235327303847342320113758187,13834822747367235327309723091044248379873⟩, + ⟨10215140988025288959971588310232010718292,10215140988025288959974110138122882658283⟩, + ⟨-6055090192191272466571525742354474798091,-6055090192191272466567092313027225950467⟩, + ⟨8522144890215866747395656835112016444863,8522144890215866747398157644145849372888⟩] +lemma tr1_5_1_20_calc (r : Fin 8) : taylorRowBox 1 5 1 20 r = tr1_5_1_20 r := by + revert r + decide +kernel +def tr1_5_1 : Fin 21 → Fin 8 → RI := ![tr1_5_1_0,tr1_5_1_1,tr1_5_1_2,tr1_5_1_3,tr1_5_1_4,tr1_5_1_5,tr1_5_1_6,tr1_5_1_7,tr1_5_1_8,tr1_5_1_9,tr1_5_1_10,tr1_5_1_11,tr1_5_1_12,tr1_5_1_13,tr1_5_1_14,tr1_5_1_15,tr1_5_1_16,tr1_5_1_17,tr1_5_1_18,tr1_5_1_19,tr1_5_1_20] +lemma tr1_5_1_mem (l : Fin 21) (r : Fin 8) : (tr1_5_1 l r).Mem (taylorRow 1 (nearNode 5) (nearDisplacement 5 1) l.val r) := by + have he : taylorRowBox 1 5 1 l r = tr1_5_1 l r := by + fin_cases l + · exact tr1_5_1_0_calc r + · exact tr1_5_1_1_calc r + · exact tr1_5_1_2_calc r + · exact tr1_5_1_3_calc r + · exact tr1_5_1_4_calc r + · exact tr1_5_1_5_calc r + · exact tr1_5_1_6_calc r + · exact tr1_5_1_7_calc r + · exact tr1_5_1_8_calc r + · exact tr1_5_1_9_calc r + · exact tr1_5_1_10_calc r + · exact tr1_5_1_11_calc r + · exact tr1_5_1_12_calc r + · exact tr1_5_1_13_calc r + · exact tr1_5_1_14_calc r + · exact tr1_5_1_15_calc r + · exact tr1_5_1_16_calc r + · exact tr1_5_1_17_calc r + · exact tr1_5_1_18_calc r + · exact tr1_5_1_19_calc r + · exact tr1_5_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 5 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRows16.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows16.lean new file mode 100644 index 0000000000000000000000000000000000000000..2516768972d2a658a01ccea863074923c678fa38 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRows16.lean @@ -0,0 +1,529 @@ +import OAI.Analysis.Triangular.Taylor.TaylorRowsBase + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def tr1_6_0_0 : Fin 8 → RI := ![⟨-74541206746406249598923412993462138866580890752299198323,-74541206746406249596331580683104443775957504504680772257⟩, + ⟨8433633009406306648163801054470921070999191506226784427030,8433633009406306648165665011283364572539639966352888621446⟩, + ⟨-828684848786432567776334588926587363637824758386380370258,-828684848786432567737294614863868587561096436889962063730⟩, + ⟨451748043174978794916628641286437667624973820754943414123,451748043174978794931074427364559221799604004398385604091⟩, + ⟨777934673149641413096024282507909434665669072000515354119,777934673149641413137402559456746262862125081676017801426⟩, + ⟨521021863092228098981188792934788609028759080204465104030,521021863092228098998948043281489560335425286904902023378⟩, + ⟨-154648778034000800826257437332815722246535215603516484970,-154648778034000800795036281381346138082623561773501451973⟩, + ⟨288546023285045339344242740313954962053254922555760856078,288546023285045339361853971476981407211214170196362682883⟩] +lemma tr1_6_0_0_calc (r : Fin 8) : taylorRowBox 1 6 0 0 r = tr1_6_0_0 r := by + revert r + decide +kernel +def tr1_6_0_1 : Fin 8 → RI := ![⟨40432461764307270636686794887561040448135862990710233238,40432461764307270637388080573897318225280327088435152782⟩, + ⟨-8036652970887200616135688478984137791906326434074266049474,-8036652970887200616135184138395749431031862663932457911003⟩, + ⟨456649478802696804705690001462912625587364344596044716901,456649478802696804716253252370494256055347963778467549616⟩, + ⟨-249883332202659623278660152967831606677847458007818202697,-249883332202659623274751480726692688985580521904243267232⟩, + ⟨-429513639987635638800556188637988960780387384117710277629,-429513639987635638789360250832530612836774342043438900608⟩, + ⟨-288174227523849502450528127438991348833854846287362171889,-288174227523849502445722913760971537410508800081105956899⟩, + ⟨85645123455468950378401271193974556433781327003876876065,85645123455468950386848943402666542576149981411259080450⟩, + ⟨-159760994590517739225641314710084457394124282273065571973,-159760994590517739220876151360619284699104715629763750697⟩] +lemma tr1_6_0_1_calc (r : Fin 8) : taylorRowBox 1 6 0 1 r = tr1_6_0_1 r := by + revert r + decide +kernel +def tr1_6_0_2 : Fin 8 → RI := ![⟨14262859669925972527771010497728723580503462729005767520,14262859669925972527931851631396434095165577153587919283⟩, + ⟨995883045996408545907789556317757250742444887727032675902,995883045996408545907905227738924108854267372468427936314⟩, + ⟨153923780814205469882189314773150884602039225694728496348,153923780814205469884612015370438976295650834338579042597⟩, + ⟨-83276914344039958176148701077362421090256399695948325753,-83276914344039958175252240067666517494626811571375412134⟩, + ⟨-143937815591973280185226764319692639878886562382619345879,-143937815591973280182658955844279602453906708197738952120⟩, + ⟨-96098939848787720007784936179414705222649200680593778723,-96098939848787720006682851778434885668920990053348591564⟩, + ⟨28574216130540265632496395031517241831738985114426965510,28574216130540265634433883848449154759727399706907800028⟩, + ⟨-53231561739937872019564870672511017281770131098525388633,-53231561739937872018471971886518913303841868326200476231⟩] +lemma tr1_6_0_2_calc (r : Fin 8) : taylorRowBox 1 6 0 2 r = tr1_6_0_2 r := by + revert r + decide +kernel +def tr1_6_0_3 : Fin 8 → RI := ![⟨-5634829097035204123738938460426916447669823772874479518,-5634829097035204123707692474481576592533928388603812178⟩, + ⟨796783381852127462103581262143966983675711977253401248987,796783381852127462103603733184286140213153152222072006083⟩, + ⟨-63533688917483882563246693738212172182949104062756581098,-63533688917483882562776045048510483690436724090250933561⟩, + ⟨34741762329175026275686318212367019986242240922556931810,34741762329175026275860470231031023478187950698010019232⟩, + ⟨59734541155280739803962519863523228049000257480867468170,59734541155280739804461358100368044420174360503324025984⟩, + ⟨40084485791090351509114422352106164893383006641151028209,40084485791090351509328520032973320056601051434466225375⟩, + ⟨-11978744670736439629865247877229419006093739593246002395,-11978744670736439629488859406474929877603077447125846275⟩, + ⟨22286269029153997305300055505427932670241711289823441943,22286269029153997305512368732322162731300307909952616879⟩] +lemma tr1_6_0_3_calc (r : Fin 8) : taylorRowBox 1 6 0 3 r = tr1_6_0_3 r := by + revert r + decide +kernel +def tr1_6_0_4 : Fin 8 → RI := ![⟨-1744458376620874567616256044676726215715754615313364784,-1744458376620874567610477140748767090415001463648568278⟩, + ⟨-134538243874714959883754029282786229355271473797177121916,-134538243874714959883749873293489534233043564269870465408⟩, + ⟨-18753221202937858888117941325387670229773042568998892089,-18753221202937858888030895470399655187348704815986401922⟩, + ⟨10134597845949098626719049588705196056449463502799583382,10134597845949098626751258775080782552552917971958452861⟩, + ⟨17526282642738846357890933168396270858556398340332753775,17526282642738846357983192642982892232577204597540153648⟩, + ⟨11697592664230574217801065679642519758696926435157316457,11697592664230574217840662763606241081220422674242964628⟩, + ⟨-3485442181912848954059873246811896604318546383922579682,-3485442181912848953990260695117265704376217355927939724⟩, + ⟨6486152254829978731029139971102959105473771911543589329,6486152254829978731068407022652871346178809234803613536⟩] +lemma tr1_6_0_4_calc (r : Fin 8) : taylorRowBox 1 6 0 4 r = tr1_6_0_4 r := by + revert r + decide +kernel +def tr1_6_0_5 : Fin 8 → RI := ![⟨154566705238215613137772121819227393980849382056384301,154566705238215613138585718511576254193275832224244211⟩, + ⟨-30651129681239446864840999891418654841647537651044368326,-30651129681239446864840414780610990100733535959342430552⟩, + ⟨1820045691274120649363458503513609399739005942887619896,1820045691274120649375713460609567970309471341629768340⟩, + ⟨-1004113782500686137437655191981394203002562476394383035,-1004113782500686137433120545302943648965021110553735204⟩, + ⟨-1718739715878317707263814126527415080171409031287454120,-1718739715878317707250825157633874296925069153714631676⟩, + ⟨-1160330441627185156201521473843448902157452889200342954,-1160330441627185156195946704485014577792091721446374574⟩, + ⟨355650794723423964045809091195702199379979971709341988,355650794723423964055609659348700329778006693489637456⟩, + ⟨-654476467754479994349821624664407415305061345022941122,-654476467754479994344293319702604610548220300860918308⟩] +lemma tr1_6_0_5_calc (r : Fin 8) : taylorRowBox 1 6 0 5 r = tr1_6_0_5 r := by + revert r + decide +kernel +def tr1_6_0_6 : Fin 8 → RI := ![⟨78476093434254340178064240840256043680994362667517201,78476093434254340178196457145746029862360398100403576⟩, + ⟨5827229736955495096077338100883661340364100115506298694,5827229736955495096077433186311149385303560552223632269⟩, + ⟨846694926244156011688469310845314775153141553134923922,846694926244156011690460844447182338350083247800243229⟩, + ⟨-457669456453227778216636822966318106896095521212771886,-457669456453227778215899904741176773046995636175544370⟩, + ⟨-791320871092869826413965839841372655632249498181539518,-791320871092869826411855023148777728552168573041675616⟩, + ⟨-528758243937433432735308096637774457803144072004270251,-528758243937433432734402149728885568039553682566949321⟩, + ⟨159510147708789348001785855802191470120071904999524906,159510147708789348003378530557548352734664320094954602⟩, + ⟨-295146313668719770848755702517961337244662834797514696,-295146313668719770847857306464304775199365521022382075⟩] +lemma tr1_6_0_6_calc (r : Fin 8) : taylorRowBox 1 6 0 6 r = tr1_6_0_6 r := by + revert r + decide +kernel +def tr1_6_0_7 : Fin 8 → RI := ![⟨910003774175299875841267357833939005353333598977548,910003774175299875854778120743608879754478465381692⟩, + ⟨617792072184006260633223922758453903662153644859316239,617792072184006260633233639235267919658474972959286839⟩, + ⟨5161864470879265215239629388730686754928336025545921,5161864470879265215443137860858192745954233546948565⟩, + ⟨-2201325556620858305109997344079929956160347778969018,-2201325556620858305034694019059775034768402536345390⟩, + ⟨-4317788791878771717522880346155501140615755916053852,-4317788791878771717307182715119640124851446867751890⟩, + ⟨-2480677606062891999657104713394133304475835698921087,-2480677606062891999564528885844148390056022604170454⟩, + ⟨353103604157701867827980516639239538929966848121621,353103604157701867990730874305841230963516297541207⟩, + ⟨-963776084426029994940384823698640478445300263583978,-963776084426029994848580593995792983551553856951556⟩] +lemma tr1_6_0_7_calc (r : Fin 8) : taylorRowBox 1 6 0 7 r = tr1_6_0_7 r := by + revert r + decide +kernel +def tr1_6_0_8 : Fin 8 → RI := ![⟨-1708166143604292294068600154166349714890576305837322,-1708166143604292294066682153298291454545036857711900⟩, + ⟨-136761867556885255965122476258531510107500976222443626,-136761867556885255965121096898158794080333904490504615⟩, + ⟨-18623423981743358921253087651544963934734854202721637,-18623423981743358921224197393548164787931161066408601⟩, + ⟨10078928686211924193696882964583239991812238206691265,10078928686211924193707573096867325168494153098206680⟩, + ⟨17413199515467825378935771739644965562941282960439947,17413199515467825378966392382337538420064662305848814⟩, + ⟨11665869172381128098957175770777736484181508906854844,11665869172381128098970317924096267263555327199504940⟩, + ⟨-3610848625284368962335511409346874367575931659624816,-3610848625284368962312407212392876491538238073541856⟩, + ⟨6601930627355101709558532912203583868943635838735118,6601930627355101709571565528750661233193142302703254⟩] +lemma tr1_6_0_8_calc (r : Fin 8) : taylorRowBox 1 6 0 8 r = tr1_6_0_8 r := by + revert r + decide +kernel +def tr1_6_0_9 : Fin 8 → RI := ![⟨-112146846087415433654361202887978903629456134120524,-112146846087415433654174631817991101123670839127279⟩, + ⟨-7608598783775561545351855951339007035270625173899448,-7608598783775561545351721775831138600537358608431297⟩, + ⟨-1135429961545261255137685096189815583240175849468062,-1135429961545261255134874833464620333810975369247287⟩, + ⟨603513899873243444656442638264729302983899255855109,603513899873243444657482507147099003408046832477607⟩, + ⟨1052211773459221416126633278383759163010567492769273,1052211773459221416129611862056832037858189910805561⟩, + ⟨697298760664276506411032633523235781461195757247556,697298760664276506412311019601103049944783248640505⟩, + ⟨-207833310041578652682689561021079410137634345968242,-207833310041578652680442129949783015982076432528658⟩, + ⟨386319068212001314230629390216741512138030809114346,386319068212001314231897121245615728919552828193354⟩] +lemma tr1_6_0_9_calc (r : Fin 8) : taylorRowBox 1 6 0 9 r = tr1_6_0_9 r := by + revert r + decide +kernel +def tr1_6_0_10 : Fin 8 → RI := ![⟨19792618308912452034882896843458024019417150735274,19792618308912452034901785147481848494396109404734⟩, + ⟨2119699093396852267667788898233849407321465023421222,2119699093396852267667802482053596296769823381429316⟩, + ⟨220881038067131181701324581063695130156945173217728,220881038067131181701609089785986891561610693144842⟩, + ⟨-119926556212081808484437873347916632554877400291495,-119926556212081808484332597864424902810926908138810⟩, + ⟨-206798023327521606932843297730821261910689594749394,-206798023327521606932541748332084745628455850031994⟩, + ⟨-139258145658709701968429182833905079199426847613536,-139258145658709701968299760062710170083515520515974⟩, + ⟨45209592816739807894732622953035758887523100351867,45209592816739807894960151054480002990689771442145⟩, + ⟨-80846860956353605081062276495626493144514403498438,-80846860956353605080933932432987594707062309258216⟩] +lemma tr1_6_0_10_calc (r : Fin 8) : taylorRowBox 1 6 0 10 r = tr1_6_0_10 r := by + revert r + decide +kernel +def tr1_6_0_11 : Fin 8 → RI := ![⟨2354049349936623128774264633277523546078577252713,2354049349936623128776274499127906802877233146871⟩, + ⟨68973173609030714106762208933738403087532390652273,68973173609030714106763654360251742124823662073430⟩, + ⟨25124665215428693883776869248997556614218709654825,25124665215428693883807143241006521023969383427576⟩, + ⟨-13495847056354723917555541825661701350134188776704,-13495847056354723917544339676496734214862471289818⟩, + ⟨-23397201137382440349248400123872073241187072907736,-23397201137382440349216312868288882625664858315802⟩, + ⟨-15656841018758946033710699647171205044302501523069,-15656841018758946033696928034443849872874263282915⟩, + ⟨4981706431268859961201186849998964392467580510108,4981706431268859961225397650531022556124713421429⟩, + ⟨-8987596542953905689654162919760917105608294251519,-8987596542953905689640506090208032239507975123439⟩] +lemma tr1_6_0_11_calc (r : Fin 8) : taylorRowBox 1 6 0 11 r = tr1_6_0_11 r := by + revert r + decide +kernel +def tr1_6_0_12 : Fin 8 → RI := ![⟨-107655043050977349491636274071877692131485646991,-107655043050977349491494372906740570401937589329⟩, + ⟨-24813107575480512628494354823140730591088795168320,-24813107575480512628494252772694803291565877970304⟩, + ⟨-1262522758579257955447681491289528059101800892491,-1262522758579257955445544077621650678021748030035⟩, + ⟨690698378788703735205521310183439742098402532437,690698378788703735206312207754447324536654175228⟩, + ⟨1185854394721599724208827495889583613896140364390,1185854394721599724211092930148471280284747688011⟩, + ⟨806617487112215472133401744844275447877920780599,806617487112215472134374052469768839163341434398⟩, + ⟨-285902477829205243806788333845442807871293030793,-285902477829205243805078995482216654776137238854⟩, + ⟨490896484985957900430532703501656050576946084937,490896484985957900431496907169847044390663884164⟩] +lemma tr1_6_0_12_calc (r : Fin 8) : taylorRowBox 1 6 0 12 r = tr1_6_0_12 r := by + revert r + decide +kernel +def tr1_6_0_13 : Fin 8 → RI := ![⟨-26290482422842015703249786436791636189657230117,-26290482422842015703233816929912337738762405676⟩, + ⟨-745623428031251326517217359147093521954523574419,-745623428031251326517205874426037984223542088814⟩, + ⟨-294558937327509138883070657326447744334308134077,-294558937327509138882830113549070516231374799928⟩, + ⟨159439955609529965490600747477049294619015405709,159439955609529965490689754809606989097486596251⟩, + ⟨275210810310473707991002722219925765428413639094,275210810310473707991257673389289570333176615564⟩, + ⟨185930948616030130065290344581570940726714377089,185930948616030130065399767737428460404497285915⟩, + ⟨-64060132408148985799931205769941053890434212298,-64060132408148985799738837435700430000663870421⟩, + ⟨111449904531492593480189978372574431950199308652,111449904531492593480298489511987561432588592281⟩] +lemma tr1_6_0_13_calc (r : Fin 8) : taylorRowBox 1 6 0 13 r = tr1_6_0_13 r := by + revert r + decide +kernel +def tr1_6_0_14 : Fin 8 → RI := ![⟨-163847935027154744755916953585598492501171515,-163847935027154744755117655310519067697781502⟩, + ⟨241024201518764994682396142010324287788339914821,241024201518764994682396716838200427286901166065⟩, + ⟨-1793689104827114777684544888648468783618750513,-1793689104827114777672505304222102196517077715⟩, + ⟨959317355866749973852172107882833006058913264,959317355866749973856627061186851622527886020⟩, + ⟨1667090467698033018539028942087949896074747504,1667090467698033018551789638547748577123147098⟩, + ⟨1111871272889914479360225289575999237247410980,1111871272889914479365702086102073421797177058⟩, + ⟨-310046865685018797776804846005990306326090086,-310046865685018797767176516291628974656707284⟩, + ⟨610963009315558074770423780653372873962365325,610963009315558074775854929354684056504147966⟩] +lemma tr1_6_0_14_calc (r : Fin 8) : taylorRowBox 1 6 0 14 r = tr1_6_0_14 r := by + revert r + decide +kernel +def tr1_6_0_15 : Fin 8 → RI := ![⟨180998927703142294317927536852387232018726537,180998927703142294318013413992439722337081076⟩, + ⟨12621584552224125591656452933666788163823717656,12621584552224125591656514693557405001819126449⟩, + ⟨2144464973321470902276060109860245989004495962,2144464973321470902277353650845230332281168279⟩, + ⟨-1169925573073742409224488680269139520538312006,-1169925573073742409224010037113432889341068302⟩, + ⟨-2010069608245150255600739927393241640321499074,-2010069608245150255599368909650097400324458899⟩, + ⟨-1372695236027309990643284433457970530719833851,-1372695236027309990642696002784528793163379490⟩, + ⟨520049004022732074425831199821911804269062743,520049004022732074426865673991761718523299518⟩, + ⟨-866843069356352328375351367741561029413155246,-866843069356352328374767841500838895371793404⟩] +lemma tr1_6_0_15_calc (r : Fin 8) : taylorRowBox 1 6 0 15 r = tr1_6_0_15 r := by + revert r + decide +kernel +def tr1_6_0_16 : Fin 8 → RI := ![⟨7472963504164310640399453057693621745544279,7472963504164310640404997581632908533902718⟩, + ⟨-1951299059995661477201963974131087086229546367,-1951299059995661477201959986699837821384951092⟩, + ⟨99712842058167658879980569140405561567536201,99712842058167658880064084601601810052301278⟩, + ⟨-55302121761145217966679443845287789077129932,-55302121761145217966648540994598658158657871⟩, + ⟨-94181516967517764505296967148145671554658626,-94181516967517764505208449520583534999637654⟩, + ⟨-65351316554556621662862001895686505589463121,-65351316554556621662824010784709192833562485⟩, + ⟨26682889257093082931862835838320926343187637,26682889257093082931929625053616613432581183⟩, + ⟨-43319182436820759562614869966898924175676688,-43319182436820759562577195503025713714364077⟩] +lemma tr1_6_0_16_calc (r : Fin 8) : taylorRowBox 1 6 0 16 r = tr1_6_0_16 r := by + revert r + decide +kernel +def tr1_6_0_17 : Fin 8 → RI := ![⟨-767112144055949543483667047851008036867058,-767112144055949543483288608868880676179154⟩, + ⟨-210181465681252717306486541364373933510970237,-210181465681252717306486269204051525476400008⟩, + ⟨-9273581093756562316831825526278466342852438,-9273581093756562316826125216121193276138057⟩, + ⟨5069775106439267293301173672466629096567096,5069775106439267293303282932610755558498802⟩, + ⟨8695536282030308421698246332965017765223175,8695536282030308421704288063733654552060712⟩, + ⟨5969468269033878101410550126668894289060042,5969468269033878101413143192824642983179678⟩, + ⟨-2442039482866368143811246031722312708357025,-2442039482866368143806687363940827286898333⟩, + ⟨3922521965473496457989165402519988653469466,3922521965473496457991736856068583254200876⟩] +lemma tr1_6_0_17_calc (r : Fin 8) : taylorRowBox 1 6 0 17 r = tr1_6_0_17 r := by + revert r + decide +kernel +def tr1_6_0_18 : Fin 8 → RI := ![⟨-63236841277768586712234627717098465703461,-63236841277768586712201322141511410302166⟩, + ⟨10970413418404075742675872468054612614623062,10970413418404075742675896420281055464769519⟩, + ⟨-958168668064848628834987054012417346675552,-958168668064848628834485382356499119137133⟩, + ⟨539660131147385441914049548219919297768168,539660131147385441914235179527592662499620⟩, + ⟨911029819127169397732497956875282788431047,911029819127169397733029676202052708489149⟩, + ⟨643632241793998097862538222719675493697319,643632241793998097862766432721519666067851⟩, + ⟨-299210643687399191382467169542485937368371,-299210643687399191382065971300147191967576⟩, + ⟨459980652298982093726023060326662620017803,459980652298982093726249368251013635471060⟩] +lemma tr1_6_0_18_calc (r : Fin 8) : taylorRowBox 1 6 0 18 r = tr1_6_0_18 r := by + revert r + decide +kernel +def tr1_6_0_19 : Fin 8 → RI := ![⟨1492675712657430837057542798128409454630,1492675712657430837058848418609288618311⟩, + ⟨2708027084030195308913663232269738640835153,2708027084030195308913664171227159906424700⟩, + ⟨9134524310835719686510695822372919880761,9134524310835719686530361982683920437056⟩, + ⟨-4274683778274709765018446659211040129596,-4274683778274709765011169678306168230854⟩, + ⟨-7980045671058221554585384160152475512474,-7980045671058221554564540093312374126472⟩, + ⟨-4624691190103640153896602284654293772532,-4624691190103640153887656165335463830921⟩, + ⟨535238142103170835557262582115144586168,535238142103170835572990058131376894452⟩, + ⟨-1531188648084462772892758879124572082295,-1531188648084462772883887323666643406189⟩] +lemma tr1_6_0_19_calc (r : Fin 8) : taylorRowBox 1 6 0 19 r = tr1_6_0_19 r := by + revert r + decide +kernel +def tr1_6_0_20 : Fin 8 → RI := ![⟨310458123558073126484285496071432487522,310458123558073126484434123406800117266⟩, + ⟨-1640715760987086377461805279699789392228,-1640715760987086377461698392023184786788⟩, + ⟨5260710698578372142053427119402756289828,5260710698578372142055665847308167890161⟩, + ⟨-3000228630731878567728645777613393425168,-3000228630731878567727817391190313267655⟩, + ⟨-5028394274999073476712739181200349805644,-5028394274999073476710366364475915664489⟩, + ⟨-3598867421190234462718561073458208753832,-3598867421190234462717542678071518277499⟩, + ⟨1846023578257368573642467101950866234097,1846023578257368573644257463614081341668⟩, + ⟨-2723111568527507854342086211944025472827,-2723111568527507854341076304648693489861⟩] +lemma tr1_6_0_20_calc (r : Fin 8) : taylorRowBox 1 6 0 20 r = tr1_6_0_20 r := by + revert r + decide +kernel +def tr1_6_0 : Fin 21 → Fin 8 → RI := ![tr1_6_0_0,tr1_6_0_1,tr1_6_0_2,tr1_6_0_3,tr1_6_0_4,tr1_6_0_5,tr1_6_0_6,tr1_6_0_7,tr1_6_0_8,tr1_6_0_9,tr1_6_0_10,tr1_6_0_11,tr1_6_0_12,tr1_6_0_13,tr1_6_0_14,tr1_6_0_15,tr1_6_0_16,tr1_6_0_17,tr1_6_0_18,tr1_6_0_19,tr1_6_0_20] +lemma tr1_6_0_mem (l : Fin 21) (r : Fin 8) : (tr1_6_0 l r).Mem (taylorRow 1 (nearNode 6) (nearDisplacement 6 0) l.val r) := by + have he : taylorRowBox 1 6 0 l r = tr1_6_0 l r := by + fin_cases l + · exact tr1_6_0_0_calc r + · exact tr1_6_0_1_calc r + · exact tr1_6_0_2_calc r + · exact tr1_6_0_3_calc r + · exact tr1_6_0_4_calc r + · exact tr1_6_0_5_calc r + · exact tr1_6_0_6_calc r + · exact tr1_6_0_7_calc r + · exact tr1_6_0_8_calc r + · exact tr1_6_0_9_calc r + · exact tr1_6_0_10_calc r + · exact tr1_6_0_11_calc r + · exact tr1_6_0_12_calc r + · exact tr1_6_0_13_calc r + · exact tr1_6_0_14_calc r + · exact tr1_6_0_15_calc r + · exact tr1_6_0_16_calc r + · exact tr1_6_0_17_calc r + · exact tr1_6_0_18_calc r + · exact tr1_6_0_19_calc r + · exact tr1_6_0_20_calc r + rw [← he] + exact taylorRowBox_mem 1 6 0 l r +def tr1_6_1_0 : Fin 8 → RI := ![⟨-74541206746406249598923412993462138866580890752299198323,-74541206746406249596331580683104443775957504504680772257⟩, + ⟨8433633009406306648163801054470921070999191506226784427030,8433633009406306648165665011283364572539639966352888621446⟩, + ⟨-828684848786432567776334588926587363637824758386380370258,-828684848786432567737294614863868587561096436889962063730⟩, + ⟨451748043174978794916628641286437667624973820754943414123,451748043174978794931074427364559221799604004398385604091⟩, + ⟨777934673149641413096024282507909434665669072000515354119,777934673149641413137402559456746262862125081676017801426⟩, + ⟨521021863092228098981188792934788609028759080204465104030,521021863092228098998948043281489560335425286904902023378⟩, + ⟨-154648778034000800826257437332815722246535215603516484970,-154648778034000800795036281381346138082623561773501451973⟩, + ⟨288546023285045339344242740313954962053254922555760856078,288546023285045339361853971476981407211214170196362682883⟩] +lemma tr1_6_1_0_calc (r : Fin 8) : taylorRowBox 1 6 1 0 r = tr1_6_1_0 r := by + revert r + decide +kernel +def tr1_6_1_1 : Fin 8 → RI := ![⟨-121297385292921811912164241721691954675840981265305458345,-121297385292921811910060384662683121344407588972130699716⟩, + ⟨24109958912661601848405552415187248293095587991797373733012,24109958912661601848407065436952413375718979302222798148421⟩, + ⟨-1369948436408090414148759757111482768166043891335402648846,-1369948436408090414117070004388737876762093033788134150704⟩, + ⟨749649996607978869824254442180078066956741565712729801699,749649996607978869835980458903494820033542374023454608092⟩, + ⟨1288540919962906916368080752497591838510323026130316701827,1288540919962906916401668565913966882341162152353130832886⟩, + ⟨864522682571548507337168741282914612231526400243317870700,864522682571548507351584382316974046501564538862086515668⟩, + ⟨-256935370366406851160546830207999627728449944233777241349,-256935370366406851135203813581923669301343981011630628196⟩, + ⟨479282983771553217662628454081857854097314146889291252094,479282983771553217676923944130253372182372846819196715918⟩] +lemma tr1_6_1_1_calc (r : Fin 8) : taylorRowBox 1 6 1 1 r = tr1_6_1_1 r := by + revert r + decide +kernel +def tr1_6_1_2 : Fin 8 → RI := ![⟨128365737029333752749939094479558512224531164561051907682,128365737029333752751386664682567906856490194382291273539⟩, + ⟨8962947413967676913170106006859815256682003989543294083124,8962947413967676913171147049650316979688406352215851426818⟩, + ⟨1385314027327849228939703832958357961418353031252556467141,1385314027327849228961508138333950786660857509047211383371⟩, + ⟨-749492229096359623585338309696261789812307597263534931769,-749492229096359623577270160608998657451641304142378709214⟩, + ⟨-1295440340327759521667040878877233758909979061443574112907,-1295440340327759521643930602598516422085160373779650569084⟩, + ⟨-864890458639089480070064425614732347003842806125344008505,-864890458639089480060145666005913971020288910480137324084⟩, + ⟨257167945174862390692467555283655176485650866029842689599,257167945174862390709904954636042392837546597362170200246⟩, + ⟨-479084055659440848176083836052599155535931179886728497693,-479084055659440848166247746978670219734576814935804286081⟩] +lemma tr1_6_1_2_calc (r : Fin 8) : taylorRowBox 1 6 1 2 r = tr1_6_1_2 r := by + revert r + decide +kernel +def tr1_6_1_3 : Fin 8 → RI := ![⟨152140385619950511340107696811002567998416066492302928809,152140385619950511340951338431526744087085241867610946983⟩, + ⟨-21513151310007441476797300795975725785755135109995944164228,-21513151310007441476796694077887108559244223385841833722665⟩, + ⟨1715409600772064829194953216309783059641791550436775206150,1715409600772064829207660730931728648939625809694427689630⟩, + ⟨-938027582887725709448232696237837633911074668846270519261,-938027582887725709443530591733909539628540504909037158883⟩, + ⟨-1612832611192579974720456668709937199344707733589748701552,-1612832611192579974706988036315127157323006951983421640606⟩, + ⟨-1082281116359439490751870040890279641528228388730588085112,-1082281116359439490746089403506866452121341179311077761669⟩, + ⟨323426106109883869996199203974823106695283091072397849431,323426106109883870006361692685194313164530969017642064662⟩, + ⟨-601729263787157927248833955772698393745108313568720655730,-601729263787157927243101498646554182096526204825232932487⟩] +lemma tr1_6_1_3_calc (r : Fin 8) : taylorRowBox 1 6 1 3 r = tr1_6_1_3 r := by + revert r + decide +kernel +def tr1_6_1_4 : Fin 8 → RI := ![⟨-141301128506290839976916739618814823472976123840382547474,-141301128506290839976448648400650134323615118555534030523⟩, + ⟨-10897597753851911750584076371905684577776989377571346875166,-10897597753851911750583739736772652272876528705859507698093⟩, + ⟨-1519010917437966569937553247356401288611616448088910259189,-1519010917437966569930502533102372070175245090094898555762⟩, + ⟨820902425521876988764243016685120880572406543726766254007,820902425521876988766851960781543386756786355728634681716⟩, + ⟨1419628894061846554989165586640097939543068265566953055800,1419628894061846554996638604081614270838753572400752445433⟩, + ⟨947505005802676511641886320051044100454451041247742633092,947505005802676511645093683852105527578854236613680134813⟩, + ⟨-282320816734940765278849732991763624949802257097728954237,-282320816734940765273211116304498522054473605830163117704⟩, + ⟨525378332641228277213360337659339687543375524835030735684,525378332641228277216540968834882579040483548019092696341⟩] +lemma tr1_6_1_4_calc (r : Fin 8) : taylorRowBox 1 6 1 4 r = tr1_6_1_4 r := by + revert r + decide +kernel +def tr1_6_1_5 : Fin 8 → RI := ![⟨-37559709372886393992676329598313029768966027230491343122,-37559709372886393992478625602072256737346399839701385234⟩, + ⟨7448224512541185588156220791688470594478249238120210624173,7448224512541185588156362973614733126520351649203781503089⟩, + ⟨-442271102979611317798298370928125016785201536016033706514,-442271102979611317795320416353807084136578444121691634773⟩, + ⟨243999649147666731396248292508615306698500129864557654723,243999649147666731397350211651478791329622681763835077422⟩, + ⟨417653750958431202861950513305031454152791804352655497389,417653750958431202865106832746161864481652394602851350993⟩, + ⟨281960297315405992955615049189858542403478288311469021580,281960297315405992956969718143958083224261052075683337686⟩, + ⟨-86423143117792023265513147221734180136055626517981901588,-86423143117792023263131609160555634449335133125370103213⟩, + ⟨159037781664338638625663276687732920363217533109203148957,159037781664338638627006654793451001919129906840574692472⟩] +lemma tr1_6_1_5_calc (r : Fin 8) : taylorRowBox 1 6 1 5 r = tr1_6_1_5 r := by + revert r + decide +kernel +def tr1_6_1_6 : Fin 8 → RI := ![⟨57209072113571413989808831572546655843444890384620039904,57209072113571413989905217259248855769660730215194206506⟩, + ⟨4248050478240555925040379475544189117125428984204091748267,4248050478240555925040448792820827901886295642571027923498⟩, + ⟨617240601231989732520894127606234471086640192235359539627,617240601231989732522345955601995924657210687646377313326⟩, + ⟨-333641033754403050319928243942445899927253634964110704530,-333641033754403050319391030556317867551259818771971846458⟩, + ⟨-576872915026702103455781097244360665955909884174342308429,-576872915026702103454242311875458964114530889747381524451⟩, + ⟨-385464759830388972464039602448937579738492028491113012672,-385464759830388972463379167152357579100834634591306055737⟩, + ⟨116282897679707434693301888879797581717532418744653656519,116282897679707434694462948776452749143570289349221904653⟩, + ⟨-215161662664496712948742907135593814851359206567388213157,-215161662664496712948087976412478181120337464825316532686⟩] +lemma tr1_6_1_6_calc (r : Fin 8) : taylorRowBox 1 6 1 6 r = tr1_6_1_6 r := by + revert r + decide +kernel +def tr1_6_1_7 : Fin 8 → RI := ![⟨-1990178254121380828494399750066272620023044403789759841,-1990178254121380828464851711582824604707740580963898723⟩, + ⟨-1351111261866421692004881969007530940293084765861960315527,-1351111261866421692004860719072738687309130021307324615427⟩, + ⟨-11288997597812953026174142501696867535401908767176511331,-11288997597812953025729069473154011933028270887868930269⟩, + ⟨4814298992329817113110875819683728001038496346987370014,4814298992329817113275564191502806814122680592605242213⟩, + ⟨9443004087838873745750808597966652953050114299773383925,9443004087838873746222539317042080994526658188409772616⟩, + ⟨5425241924459544803047624673341152529052521435320783154,5425241924459544803250088008192969536888652673540415868⟩, + ⟨-772237582292893985295728422106874772117210142722619214,-772237582292893984939793389890016871639837496841986135⟩, + ⟨2107778296639727598733845759068799255027248285153055056,2107778296639727598934621609428926726359871676458158400⟩] +lemma tr1_6_1_7_calc (r : Fin 8) : taylorRowBox 1 6 1 7 r = tr1_6_1_7 r := by + revert r + decide +kernel +def tr1_6_1_8 : Fin 8 → RI := ![⟨-11207278068187761741384085611485420479397071142598664055,-11207278068187761741371501607790090233269986823447776335⟩, + ⟨-897294613040724164387168566732225237815313904995452625573,-897294613040724164387159516748819847961070747362200784448⟩, + ⟨-122188284744218177882341508081786508375795378424056656923,-122188284744218177882151959099069509173616347756706836363⟩, + ⟨66127851110236434634845249130630637586280094874101394483,66127851110236434634915387088546520430490138477334024431⟩, + ⟨114248002020984402311197598383810619058457757503446495957,114248002020984402311398500420516589574044249388674064990⟩, + ⟨76539767639992581457258030232072729072714879937874634405,76539767639992581457344255899995609516186501755951907471⟩, + ⟨-23690777830490744761883290356724842725665687618798414880,-23690777830490744761731703720509662660982380000508123366⟩, + ⟨43315266846076822316413534436967713764139194737941110633,43315266846076822316499041434133088350980206648036045958⟩] +lemma tr1_6_1_8_calc (r : Fin 8) : taylorRowBox 1 6 1 8 r = tr1_6_1_8 r := by + revert r + decide +kernel +def tr1_6_1_9 : Fin 8 → RI := ![⟨2207386371538597980615119278073518843417213126542241245,2207386371538597980618791556444088760138585087894254671⟩, + ⟨149760049861054377897157939713684301074376829489753236304,149760049861054377897160580690205675475231715297862819915⟩, + ⟨22348667933095377284819741347084122030401428192894366244,22348667933095377284875055748304140124916381245079861156⟩, + ⟨-11878964091205050721193228188176349684080585803656730970,-11878964091205050721172760448964666870632089052996123517⟩, + ⟨-20710684336997855133679150280864625001162752014385856856,-20710684336997855133620522818427531605536999960177602458⟩, + ⟨-13724931506154954475713517798808511332063168682991057916,-13724931506154954475688355325637849886500716089903657741⟩, + ⟨4090783041548392620709142443801579103575210421461580834,4090783041548392620753378629577906029739056831692894216⟩, + ⟨-7603918219616821868026431037477454392323558317329773250,-7603918219616821868001478287636123183412860415797679891⟩] +lemma tr1_6_1_9_calc (r : Fin 8) : taylorRowBox 1 6 1 9 r = tr1_6_1_9 r := by + revert r + decide +kernel +def tr1_6_1_10 : Fin 8 → RI := ![⟨1168734318522971380207800175709352860322563333767202153,1168734318522971380208915511173655671745595864240093564⟩, + ⟨125166111765990729553515266651810573652925188167999738166,125166111765990729553516068762782807727961300850019675179⟩, + ⟨13042804416826029148281515187230133740637455533333667092,13042804416826029148298315142772739959821549819509748098⟩, + ⟨-7081543217767218709197571983321129235732955609812482835,-7081543217767218709191355571296426086082422998688635342⟩, + ⟨-12211216479466823367777463887707264694564309880356947911,-12211216479466823367759657697261272144614689488539216127⟩, + ⟨-8223054243001149191533774817159261021646955924731662123,-8223054243001149191526132531942972833261507970947753166⟩, + ⟨2669581246235668916376066652753808526549351552677433176,2669581246235668916389501959615989696597240313887207477⟩, + ⟨-4773926292611724026431646364790248793690431012179222271,-4773926292611724026424067776235484479857322299388452115⟩] +lemma tr1_6_1_10_calc (r : Fin 8) : taylorRowBox 1 6 1 10 r = tr1_6_1_10 r := by + revert r + decide +kernel +def tr1_6_1_11 : Fin 8 → RI := ![⟨-417012780193222977393330698697011306409293220268747263,-417012780193222977392974656991213463617181724586406639⟩, + ⟨-12218390785318963911870861078955515362186137265321749034,-12218390785318963911870605025984956891747100406878286957⟩, + ⟨-4450759068917546835434784003714582179833104366044733966,-4450759068917546835429421056852170161539001759223366015⟩, + ⟨2390748818492070277821227140672366975960242201577549525,2390748818492070277823211567790493409072221139226729947⟩, + ⟨4144743989883887160542622175678770690488652656069379315,4144743989883887160548306336743566158456566404386641292⟩, + ⟨2773562415950091013031309710517624673430057117778629224,2773562415950091013033749310397437459983055237307001211⟩, + ⟨-882494349179984735551195517598619052749824608465750463,-882494349179984735546906646916766545232454484624256014⟩, + ⟨1592125764794655531202746732362082287132119269191886332,1592125764794655531205165998746887182507192501773834131⟩] +lemma tr1_6_1_11_calc (r : Fin 8) : taylorRowBox 1 6 1 11 r = tr1_6_1_11 r := by + revert r + decide +kernel +def tr1_6_1_12 : Fin 8 → RI := ![⟨-57212303734054453591184673129032752584048863722415193,-57212303734054453591109261031931115474976114410688971⟩, + ⟨-13186702703020939111799668421564733006058820393047124079,-13186702703020939111799614187773698956073061754416826289⟩, + ⟨-670956357342119427101071299412398081257120168106084422,-670956357342119427099935390155327657978555794830148183⟩, + ⟨367065437121847501741357450605197399980517140241102646,367065437121847501741777766001231240599084031537308906⟩, + ⟨630211645385241679033263493243056205352578731391984761,630211645385241679034467437891033725665806596063942331⟩, + ⟨428669603968402902726047156681786588295690097562509724,428669603968402902726563880818586421653805335237849392⟩, + ⟨-151940298720030663973923398927155971257927839577259462,-151940298720030663973014986438064701230885150353969758⟩, + ⟨260882518877422452562702730481623593174662804325451841,260882518877422452563215147843250683118018805263997340⟩] +lemma tr1_6_1_12_calc (r : Fin 8) : taylorRowBox 1 6 1 12 r = tr1_6_1_12 r := by + revert r + decide +kernel +def tr1_6_1_13 : Fin 8 → RI := ![⟨41915520807832751002026848709148628040676894905395333,41915520807832751002052309261264951784802884091288252⟩, + ⟨1188764580649068708646891221332544157121230293665421045,1188764580649068708646909531687471585203101888738322525⟩, + ⟨469622088636806352831090355123894752649554165146816747,469622088636806352831473859600674147090307147245132301⟩, + ⟨-254198788347252643171012961957317043678872122593890194,-254198788347252643170871055519851662544872498676623035⟩, + ⟨-438774924726625373545745907611032315642301141255648553,-438774924726625373545339433097838706115124718322412395⟩, + ⟨-296433987790355005056258353898440155277479326371621553,-296433987790355005056083898044323926932237445823989010⟩, + ⟨102132542481357315487197022516998216659948423881267275,102132542481357315487503719776749730861758744652085490⟩, + ⟨-177687146142362866115289928694220544905888942211149922,-177687146142362866115116926888897986070137612368545240⟩] +lemma tr1_6_1_13_calc (r : Fin 8) : taylorRowBox 1 6 1 13 r = tr1_6_1_13 r := by + revert r + decide +kernel +def tr1_6_1_14 : Fin 8 → RI := ![⟨-783679593948895302370463355574356436079835818058812,-783679593948895302366640336702898074707390293023645⟩, + ⟨1152811284114005887851065592954978748438708374054147695,1152811284114005887851068342338890659500002383350897614⟩, + ⟨-8579159384025840341107069981514078089516191521468122,-8579159384025840341049485022429883920773090685164647⟩, + ⟨4588385174272633255685749774668245900156594317520806,4588385174272633255707057678217814518150580468526030⟩, + ⟨7973642027195193288648600720109459626478738996657603,7973642027195193288709634735695086464174121750834591⟩, + ⟨5318045830223001367431097393058027495778012047948183,5318045830223001367457292741061548012179822152450952⟩, + ⟨-1482944547118608674183726497496425449458192768044953,-1482944547118608674137674494950856345284816583884097⟩, + ⟨2922217133703025489326619059727882201602900517521700,2922217133703025489352596075600643847053588090209816⟩] +lemma tr1_6_1_14_calc (r : Fin 8) : taylorRowBox 1 6 1 14 r = tr1_6_1_14 r := by + revert r + decide +kernel +def tr1_6_1_15 : Fin 8 → RI := ![⟨-2597136780712112388935802902130016278920599007652436,-2597136780712112388934570659033977120224129348022588⟩, + ⟨-181105942932500621270999305281988703532437476236390223,-181105942932500621270998419095061912351407289050669407⟩, + ⟨-30770728466947267079983835742088681431481581473600001,-30770728466947267079965274842794452693348535154705835⟩, + ⟨16787153244956833971911262189607196979896280350654747,16787153244956833971918130195734617950228828900910860⟩, + ⟨28842301872236094218621573743260650138197430568724252,28842301872236094218641246349352376725500640302252393⟩, + ⟨19696676281098920515902915173226944691923568117530194,19696676281098920515911358510236107554039538973814127⟩, + ⟨-7462134794164808421868173857600107665251002104098287,-7462134794164808421853330283943029041658984282300268⟩, + ⟨12438250585788849419083004904286277731672593977284307,12438250585788849419091377868046459245873629187812511⟩] +lemma tr1_6_1_15_calc (r : Fin 8) : taylorRowBox 1 6 1 15 r = tr1_6_1_15 r := by + revert r + decide +kernel +def tr1_6_1_16 : Fin 8 → RI := ![⟨321686575006943418294606584327134238759977585275485,321686575006943418294845257902226538077429334144470⟩, + ⟨-83997026223195500819560803846472123227626224408502914,-83997026223195500819560632200631629442405823258706387⟩, + ⟨4292310892195008983029696045208248035646053530447741,4292310892195008983033291111965549270416408479042195⟩, + ⟨-2380575006160046838295837315643270621110059628367323,-2380575006160046838294507049251550944730119121707493⟩, + ⟨-4054205484257503271203221566972392390771026108414816,-4054205484257503271199411173355143188323137207944471⟩, + ⟨-2813159890706680171423776657105088109574559486338366,-2813159890706680171422141264350367690041563758128253⟩, + ⟨1148610889323983211997761504601002024756748483422691,1148610889323983212000636561317644399397174459802589⟩, + ⟨-1864748760305923363899964337916377224190509372968228,-1864748760305923363898342575781202554088104124902668⟩] +lemma tr1_6_1_16_calc (r : Fin 8) : taylorRowBox 1 6 1 16 r = tr1_6_1_16 r := by + revert r + decide +kernel +def tr1_6_1_17 : Fin 8 → RI := ![⟨99064987322664805165207478725370496149326173868871,99064987322664805165256350397207977595321854142049⟩, + ⟨27142868737655881957152557762273094260420949732885736,27142868737655881957152592909101492166557858622012426⟩, + ⟨1197591774041440739914583453068301127434972713447720,1197591774041440739915319592051161926905977604766867⟩, + ⟨-654711583618909327857754766352470988377691265750796,-654711583618909327857482376153649093591217641853056⟩, + ⟨-1122942972833808000519164498349518537438812221530176,-1122942972833808000518384268253254667498816642051630⟩, + ⟨-770898105286362870538623842263714825264629862049350,-770898105286362870538288973277691655518983017619690⟩, + ⟨315365376869798489309203046669358758184898555069690,315365376869798489309791753769722633894197618829938⟩, + ⟨-506555125992327704764975550245804380626571484259493,-506555125992327704764643472315391945467197376375648⟩] +lemma tr1_6_1_17_calc (r : Fin 8) : taylorRowBox 1 6 1 17 r = tr1_6_1_17 r := by + revert r + decide +kernel +def tr1_6_1_18 : Fin 8 → RI := ![⟨-24499247970648490692892841752891241243984450112737,-24499247970648490692879938490510877778345079701669⟩, + ⟨4250162931090268623820524680075354897862835319282944,4250162931090268623820533959658636025597129315195157⟩, + ⟨-371214173926162339494230184774160140521124756297686,-371214173926162339494035826895906861064177537431499⟩, + ⟨209075391902924198977822171941590213881880414586269,209075391902924198977894089313582738298414513271466⟩, + ⟨352951618019829521255359849644122969907239965728799,352951618019829521255565848605710923126640361007869⟩, + ⟨249356317851996980338974413027247589689532056196764,249356317851996980339062826257756749851123259771070⟩, + ⟨-115920333891376957863600016850595808130877653380993,-115920333891376957863444584431362990884055384736502⟩, + ⟨178205929244210616953579686057032131985318711768733,178205929244210616953667362383748777399865706161881⟩] +lemma tr1_6_1_18_calc (r : Fin 8) : taylorRowBox 1 6 1 18 r = tr1_6_1_18 r := by + revert r + decide +kernel +def tr1_6_1_19 : Fin 8 → RI := ![⟨-1734879463548496033131055128343461889344497681630,-1734879463548496033129537655968010027115295055738⟩, + ⟨-3147435531360667072034513495995818063084753421732554,-3147435531360667072034512404681788172403651551600415⟩, + ⟨-10616705625859087558867558658035241964483649489339,-10616705625859087558844701437701921281686823166376⟩, + ⟨4968300239098666900481107341694045163141657140087,4968300239098666900489565096195872563619111657141⟩, + ⟨9274899588371128026419202915033556841486717786452,9274899588371128026443429170737379132808704332120⟩, + ⟨5375100367031832687297573007914390739251766722809,5375100367031832687307970737677851067911946399611⟩, + ⟨-622086668235185800704679210540189388074729773966,-622086668235185800686399771193355909637024873058⟩, + ⟨1779641564376394442318914701467496784243367718772,1779641564376394442329225768528600824114611039377⟩] +lemma tr1_6_1_19_calc (r : Fin 8) : taylorRowBox 1 6 1 19 r = tr1_6_1_19 r := by + revert r + decide +kernel +def tr1_6_1_20 : Fin 8 → RI := ![⟨1082500542386019995042706639332417579219344163038,1082500542386019995043224870806939626204915278058⟩, + ⟨-5720822121884617143373420622556667615804279835950,-5720822121884617143373047928273223544914661215472⟩, + ⟨18342964001976880860884845788523895067779677878982,18342964001976880860892651750062567639299803042673⟩, + ⟨-10461150389069503403382464098236895203548992418991,-10461150389069503403379575693378899123965463340960⟩, + ⟨-17532926720144473688054815734990892158060777019433,-17532926720144473688046542234649703279135076432198⟩, + ⟨-12548474785473206378139694804099897408262158367213,-12548474785473206378136143878951534692370720539507⟩, + ⟨6436686216545995505884174042237957053489528102863,6436686216545995505890416647357403906071028746902⟩, + ⟨-9494902939324356925924966321603607903797884308004,-9494902939324356925921444992599788245479981464445⟩] +lemma tr1_6_1_20_calc (r : Fin 8) : taylorRowBox 1 6 1 20 r = tr1_6_1_20 r := by + revert r + decide +kernel +def tr1_6_1 : Fin 21 → Fin 8 → RI := ![tr1_6_1_0,tr1_6_1_1,tr1_6_1_2,tr1_6_1_3,tr1_6_1_4,tr1_6_1_5,tr1_6_1_6,tr1_6_1_7,tr1_6_1_8,tr1_6_1_9,tr1_6_1_10,tr1_6_1_11,tr1_6_1_12,tr1_6_1_13,tr1_6_1_14,tr1_6_1_15,tr1_6_1_16,tr1_6_1_17,tr1_6_1_18,tr1_6_1_19,tr1_6_1_20] +lemma tr1_6_1_mem (l : Fin 21) (r : Fin 8) : (tr1_6_1 l r).Mem (taylorRow 1 (nearNode 6) (nearDisplacement 6 1) l.val r) := by + have he : taylorRowBox 1 6 1 l r = tr1_6_1 l r := by + fin_cases l + · exact tr1_6_1_0_calc r + · exact tr1_6_1_1_calc r + · exact tr1_6_1_2_calc r + · exact tr1_6_1_3_calc r + · exact tr1_6_1_4_calc r + · exact tr1_6_1_5_calc r + · exact tr1_6_1_6_calc r + · exact tr1_6_1_7_calc r + · exact tr1_6_1_8_calc r + · exact tr1_6_1_9_calc r + · exact tr1_6_1_10_calc r + · exact tr1_6_1_11_calc r + · exact tr1_6_1_12_calc r + · exact tr1_6_1_13_calc r + · exact tr1_6_1_14_calc r + · exact tr1_6_1_15_calc r + · exact tr1_6_1_16_calc r + · exact tr1_6_1_17_calc r + · exact tr1_6_1_18_calc r + · exact tr1_6_1_19_calc r + · exact tr1_6_1_20_calc r + rw [← he] + exact taylorRowBox_mem 1 6 1 l r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorRowsBase.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorRowsBase.lean new file mode 100644 index 0000000000000000000000000000000000000000..f51808dfc36f1553ceb5ead0b97b576c34962f2c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorRowsBase.lean @@ -0,0 +1,64 @@ +import OAI.Analysis.Triangular.Certificate.PolytopeInterval +import OAI.Analysis.Triangular.Taylor.TaylorSpectrum +import OAI.Analysis.Triangular.Taylor.TaylorWave00 +import OAI.Analysis.Triangular.Taylor.TaylorWave01 +import OAI.Analysis.Triangular.Taylor.TaylorWave10 +import OAI.Analysis.Triangular.Taylor.TaylorWave11 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction + +def nearDisplacementNum : Fin 7 → Fin 2 → ℤ := + ![![-2,2],![-2,1],![-1,3],![-3,2],![-2,3],![-3,1],![-1,3]] +def nearDisplacement (n : Fin 7) (y : Fin 2) : ℝ := nearDisplacementNum n y / 2 +end AtomicTriangular.Construction +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval + +def taylorWaveTable : Fin 2 → Fin 2 → Fin 7 → Fin 21 → Fin 31 → CI := + ![![tw0_0,tw0_1],![tw1_0,tw1_1]] +lemma taylorWaveTable_mem (q br : Fin 2) (n : Fin 7) (l : Fin 21) (j : Fin 31) : + (taylorWaveTable q br n l j).Mem (taylorWave q br (nearNode n) l.val (frequency j)) := by + fin_cases q <;> fin_cases br + · exact tw0_0_mem n l j + · exact tw0_1_mem n l j + · exact tw1_0_mem n l j + · exact tw1_1_mem n l j + +def nearDisplacementBox (n : Fin 7) (y : Fin 2) : RI := (RI.point (nearDisplacementNum n y)).divNat 2 +lemma nearDisplacementBox_mem (n : Fin 7) (y : Fin 2) : + (nearDisplacementBox n y).Mem (nearDisplacement n y) := by + exact RI.mem_divNat (RI.mem_point _) (by norm_num) +def taylorRowBox (side : Fin 2) (n : Fin 7) (y : Fin 2) (l : Fin 21) (r : Fin 8) : RI := + ((nearDisplacementBox n y).pow l.val).mul + (CI.sum (fun q : Fin 2 => CI.sum (fun j : Fin 31 => + ((spectrumTable side q j r).mul (taylorWaveTable q 0 n l j)).add + ((spectrumTable (otherSide side) q j r).mul (taylorWaveTable q 1 n l j))))).re +lemma taylorRowBox_mem (side : Fin 2) (n : Fin 7) (y : Fin 2) (l : Fin 21) (r : Fin 8) : + (taylorRowBox side n y l r).Mem + (taylorRow side (nearNode n) (nearDisplacement n y) l.val r) := by + exact RI.mem_mul (RI.mem_pow (nearDisplacementBox_mem n y) l.val) + (CI.mem_sum (fun q => CI.mem_sum (fun j => CI.mem_add + (CI.mem_mul (spectrumTable_mem side q j r) (taylorWaveTable_mem q 0 n l j)) + (CI.mem_mul (spectrumTable_mem (otherSide side) q j r) (taylorWaveTable_mem q 1 n l j))))).1 + +def bernsteinRowsBox (n : ℕ) (a : Fin (n+1) → Fin 8 → RI) + (d : Fin (n+1)) (r : Fin 8) : RI := + RI.sum (fun l : Fin (n+1) => ((RI.point (d.val.choose l.val)).divNat (n.choose l.val)).mul (a l r)) +lemma bernsteinRowsBox_mem (n : ℕ) {a : Fin (n+1) → Fin 8 → RI} + {v : Fin (n+1) → Fin 8 → ℝ} (hv : ∀ l r, (a l r).Mem (v l r)) + (d : Fin (n+1)) (r : Fin 8) : + (bernsteinRowsBox n a d r).Mem (bernsteinRows n v d r) := by + apply RI.mem_sum + intro l + apply RI.mem_mul _ (hv l r) + have hh := RI.mem_divNat (RI.mem_point (d.val.choose l.val)) + (Nat.choose_pos (show l.val≤n by omega)) + simpa only [Int.cast_natCast] using hh +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorSpectrum.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorSpectrum.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd48718ea24bdd19bdcbda405cb05dca740591ce --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorSpectrum.lean @@ -0,0 +1,1549 @@ +import OAI.Analysis.Triangular.Certificate.ParamA +import OAI.Analysis.Triangular.Taylor.Taylor + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def ATable (side : Fin 2) (i : Fin 23) (r : Fin 8) : RI := if side.val=0 then A1Table i r else A2Table i r +lemma ATable_mem (side : Fin 2) (i : Fin 23) (r : Fin 8) : (ATable side i r).Mem (Acoefficient side i r) := by + fin_cases side + · exact A1Table_mem i r + · exact A2Table_mem i r + +def spectrumBox (side q : Fin 2) (j : Fin 31) (r : Fin 8) : CI := + if q.val=0 then (coeffBox15 j).mul (CI.ofReal (ATable side 22 r)) + else CI.sum (fun col : Fin 22 => (columnTable ⟨col.val,by omega⟩ j).mul (CI.ofReal (ATable side ⟨col.val,by omega⟩ r))) +lemma spectrumBox_mem (side q : Fin 2) (j : Fin 31) (r : Fin 8) : + (spectrumBox side q j r).Mem (finiteSpectrum side q j r) := by + unfold spectrumBox finiteSpectrum + split_ifs + · exact CI.mem_mul (atomPolynomial_coeff_mem j) (CI.mem_ofReal (ATable_mem side 22 r)) + · exact CI.mem_sum (fun col => CI.mem_mul (columnTable_mem ⟨col.val,by omega⟩ j) (CI.mem_ofReal (ATable_mem side ⟨col.val,by omega⟩ r))) + +def spectrum0_0_0 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999999997853991064,6000000000000000000000000000000000000000000000002146009125⟩,⟨-2205187760,2086967824⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_0_calc (r : Fin 8) : spectrumBox 0 0 0 r = spectrum0_0_0 r := by + revert r + decide +kernel +def spectrum0_0_1 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000000037810159129,-5999999999999999999999999999999999999999999999961908489047⟩,⟨10392304845413263761164678049035234201656831522824412270802,10392304845413263761164678049035234201656831522900318376995⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_1_calc (r : Fin 8) : spectrumBox 0 0 1 r = spectrum0_0_1 r := by + revert r + decide +kernel +def spectrum0_0_2 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-3000000000000000000000000000000000000000000000374553514307,-2999999999999999999999999999999999999999999999625679727945⟩,⟨-5196152422706631880582339024517617100828415761805452362849,-5196152422706631880582339024517617100828415761056622442592⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_2_calc (r : Fin 8) : spectrumBox 0 0 2 r = spectrum0_0_2 r := by + revert r + decide +kernel +def spectrum0_0_3 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000002558420629323,-5999999999999999999999999999999999999999999997441540697834⟩,⟨10392304845413263761164678049035234201656831520303797766407,10392304845413263761164678049035234201656831525420807999616⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_3_calc (r : Fin 8) : spectrumBox 0 0 3 r = spectrum0_0_3 r := by + revert r + decide +kernel +def spectrum0_0_4 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-18000000000000000000000000000000000000000000013253593658220,-17999999999999999999999999999999999999999999986746774200664⟩,⟨-10392304845413263761164678049035234201656831536115559907570,-10392304845413263761164678049035234201656831509608728236063⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_4_calc (r : Fin 8) : spectrumBox 0 0 4 r = spectrum0_0_4 r := by + revert r + decide +kernel +def spectrum0_0_5 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-54746105837476,54745563548680⟩,⟨-20784609690826527522329356098070468403313663100469667573170,-20784609690826527522329356098070468403313662990979773969773⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_5_calc (r : Fin 8) : spectrumBox 0 0 5 r = spectrum0_0_5 r := by + revert r + decide +kernel +def spectrum0_0_6 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨8999999999999999999999999999999999999999999813724760430432,9000000000000000000000000000000000000000000186275219361560⟩,⟨-5196152422706631880582339024517617100828415947711471005677,-5196152422706631880582339024517617100828415575151448632788⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_6_calc (r : Fin 8) : spectrumBox 0 0 6 r = spectrum0_0_6 r := by + revert r + decide +kernel +def spectrum0_0_7 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-534197834909499,534197979660709⟩,⟨-20784609690826527522329356098070468403313663579907794615480,-20784609690826527522329356098070468403313662511541651227876⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_7_calc (r : Fin 8) : spectrumBox 0 0 7 r = spectrum0_0_7 r := by + revert r + decide +kernel +def spectrum0_0_8 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨35999999999999999999999999999999999999999998687403935545077,36000000000000000000000000000000000000000001312596373313083⟩,⟨-10392304845413263761164678049035234201656832835488117107261,-10392304845413263761164678049035234201656830210237071593750⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_8_calc (r : Fin 8) : spectrumBox 0 0 8 r = spectrum0_0_8 r := by + revert r + decide +kernel +def spectrum0_0_9 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨11999999999999999999999999999999999999999997201747197517629,12000000000000000000000000000000000000000002798253780339152⟩,⟨20784609690826527522329356098070468403313660247533141642082,20784609690826527522329356098070468403313665843915866176936⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_9_calc (r : Fin 8) : spectrumBox 0 0 9 r = spectrum0_0_9 r := by + revert r + decide +kernel +def spectrum0_0_10 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨14999999999999999999999999999999999999999994774808712732302,15000000000000000000000000000000000000000005225191848771613⟩,⟨-5196152422706631880582339024517617100828420986842720449852,-5196152422706631880582339024517617100828410536019079278898⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_10_calc (r : Fin 8) : spectrumBox 0 0 10 r = spectrum0_0_10 r := by + revert r + decide +kernel +def spectrum0_0_11 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨29999999999999999999999999999999999999999991385200202131322,30000000000000000000000000000000000000000008614800270245281⟩,⟨31176914536239791283494034147105702604970485954421087909256,31176914536239791283494034147105702604970503182753085662505⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_11_calc (r : Fin 8) : spectrumBox 0 0 11 r = spectrum0_0_11 r := by + revert r + decide +kernel +def spectrum0_0_12 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-12000000000000000000000000000000000000000012619282927559424,-11999999999999999999999999999999999999999987380716808208224⟩,⟨41569219381653055044658712196140936806627313471036717349940,41569219381653055044658712196140936806627338711862485085566⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_12_calc (r : Fin 8) : spectrumBox 0 0 12 r = spectrum0_0_12 r := by + revert r + decide +kernel +def spectrum0_0_13 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-18000000000000000000000000000000000000000016514660712758239,-17999999999999999999999999999999999999999983485339740850970⟩,⟨10392304845413263761164678049035234201656815009601928574199,10392304845413263761164678049035234201656848036123694176531⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_13_calc (r : Fin 8) : spectrumBox 0 0 13 r = spectrum0_0_13 r := by + revert r + decide +kernel +def spectrum0_0_14 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-9000000000000000000000000000000000000000019375468270849153,-8999999999999999999999999999999999999999980624532769057836⟩,⟨36373066958946423164076373171623319705798890953009778675090,36373066958946423164076373171623319705798929707026622868195⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_14_calc (r : Fin 8) : spectrumBox 0 0 14 r = spectrum0_0_14 r := by + revert r + decide +kernel +def spectrum0_0_15 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-72000000000000000000000000000000000000000020432282759993991,-71999999999999999999999999999999999999999979567718024983652⟩,⟨-20430655142808674,20430655142808408⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_15_calc (r : Fin 8) : spectrumBox 0 0 15 r = spectrum0_0_15 r := by + revert r + decide +kernel +def spectrum0_0_16 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-9000000000000000000000000000000000000000019375468279038275,-8999999999999999999999999999999999999999980624532760868694⟩,⟨-36373066958946423164076373171623319705798929707026631057559,-36373066958946423164076373171623319705798890953009770486275⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_16_calc (r : Fin 8) : spectrumBox 0 0 16 r = spectrum0_0_16 r := by + revert r + decide +kernel +def spectrum0_0_17 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-18000000000000000000000000000000000000000016514660728323691,-17999999999999999999999999999999999999999983485339725285518⟩,⟨-10392304845413263761164678049035234201656848036123709742303,-10392304845413263761164678049035234201656815009601913008991⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_17_calc (r : Fin 8) : spectrumBox 0 0 17 r = spectrum0_0_17 r := by + revert r + decide +kernel +def spectrum0_0_18 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-12000000000000000000000000000000000000000012619282949104163,-11999999999999999999999999999999999999999987380716786663502⟩,⟨-41569219381653055044658712196140936806627338711862506630559,-41569219381653055044658712196140936806627313471036695805494⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_18_calc (r : Fin 8) : spectrumBox 0 0 18 r = spectrum0_0_18 r := by + revert r + decide +kernel +def spectrum0_0_19 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨29999999999999999999999999999999999999999991385200176233224,30000000000000000000000000000000000000000008614800296143356⟩,⟨-31176914536239791283494034147105702604970503182753111560855,-31176914536239791283494034147105702604970485954421062011443⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_19_calc (r : Fin 8) : spectrumBox 0 0 19 r = spectrum0_0_19 r := by + revert r + decide +kernel +def spectrum0_0_20 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨14999999999999999999999999999999999999999994774808683995651,15000000000000000000000000000000000000000005225191877508214⟩,⟨5196152422706631880582339024517617100828410536019050541999,5196152422706631880582339024517617100828420986842749186223⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_20_calc (r : Fin 8) : spectrumBox 0 0 20 r = spectrum0_0_20 r := by + revert r + decide +kernel +def spectrum0_0_21 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨11999999999999999999999999999999999999999997201747167130216,12000000000000000000000000000000000000000002798253810726482⟩,⟨-20784609690826527522329356098070468403313665843915896564548,-20784609690826527522329356098070468403313660247533111254960⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_21_calc (r : Fin 8) : spectrumBox 0 0 21 r = spectrum0_0_21 r := by + revert r + decide +kernel +def spectrum0_0_22 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨35999999999999999999999999999999999999999998687403904306124,36000000000000000000000000000000000000000001312596404551948⟩,⟨10392304845413263761164678049035234201656830210237040354625,10392304845413263761164678049035234201656832835488148345953⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_22_calc (r : Fin 8) : spectrumBox 0 0 22 r = spectrum0_0_22 r := by + revert r + decide +kernel +def spectrum0_0_23 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-534197866535341,534198011286490⟩,⟨20784609690826527522329356098070468403313662511541619601868,20784609690826527522329356098070468403313663579907826241099⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_23_calc (r : Fin 8) : spectrumBox 0 0 23 r = spectrum0_0_23 r := by + revert r + decide +kernel +def spectrum0_0_24 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨8999999999999999999999999999999999999999999813724728651176,9000000000000000000000000000000000000000000186275251140792⟩,⟨5196152422706631880582339024517617100828415575151416853358,5196152422706631880582339024517617100828415947711502784732⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_24_calc (r : Fin 8) : spectrumBox 0 0 24 r = spectrum0_0_24 r := by + revert r + decide +kernel +def spectrum0_0_25 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-54746137669197,54745595380401⟩,⟨20784609690826527522329356098070468403313662990979742137859,20784609690826527522329356098070468403313663100469699404698⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_25_calc (r : Fin 8) : spectrumBox 0 0 25 r = spectrum0_0_25 r := by + revert r + decide +kernel +def spectrum0_0_26 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-18000000000000000000000000000000000000000000013253625505179,-17999999999999999999999999999999999999999999986746742353701⟩,⟨10392304845413263761164678049035234201656831509608696388903,10392304845413263761164678049035234201656831536115591754330⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_26_calc (r : Fin 8) : spectrumBox 0 0 26 r = spectrum0_0_26 r := by + revert r + decide +kernel +def spectrum0_0_27 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000002558452479959,-5999999999999999999999999999999999999999999997441508847195⟩,⟨-10392304845413263761164678049035234201656831525420839850456,-10392304845413263761164678049035234201656831520303765915972⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_27_calc (r : Fin 8) : spectrumBox 0 0 27 r = spectrum0_0_27 r := by + revert r + decide +kernel +def spectrum0_0_28 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-3000000000000000000000000000000000000000000000374585365657,-2999999999999999999999999999999999999999999999625647876594⟩,⟨5196152422706631880582339024517617100828415761056590591038,5196152422706631880582339024517617100828415761805484213996⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_28_calc (r : Fin 8) : spectrumBox 0 0 28 r = spectrum0_0_28 r := by + revert r + decide +kernel +def spectrum0_0_29 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000000037842010586,-5999999999999999999999999999999999999999999999961876637590⟩,⟨-10392304845413263761164678049035234201656831522900350228655,-10392304845413263761164678049035234201656831522824380419548⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_29_calc (r : Fin 8) : spectrumBox 0 0 29 r = spectrum0_0_29 r := by + revert r + decide +kernel +def spectrum0_0_30 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999999997822139597,6000000000000000000000000000000000000000000000002177860592⟩,⟨-2118819495,2237039025⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum0_0_30_calc (r : Fin 8) : spectrumBox 0 0 30 r = spectrum0_0_30 r := by + revert r + decide +kernel +def spectrum0_0 : Fin 31 → Fin 8 → CI := ![spectrum0_0_0,spectrum0_0_1,spectrum0_0_2,spectrum0_0_3,spectrum0_0_4,spectrum0_0_5,spectrum0_0_6,spectrum0_0_7,spectrum0_0_8,spectrum0_0_9,spectrum0_0_10,spectrum0_0_11,spectrum0_0_12,spectrum0_0_13,spectrum0_0_14,spectrum0_0_15,spectrum0_0_16,spectrum0_0_17,spectrum0_0_18,spectrum0_0_19,spectrum0_0_20,spectrum0_0_21,spectrum0_0_22,spectrum0_0_23,spectrum0_0_24,spectrum0_0_25,spectrum0_0_26,spectrum0_0_27,spectrum0_0_28,spectrum0_0_29,spectrum0_0_30] +lemma spectrum0_0_mem (j : Fin 31) (r : Fin 8) : (spectrum0_0 j r).Mem (finiteSpectrum 0 0 j r) := by + have he : spectrumBox 0 0 j r = spectrum0_0 j r := by + fin_cases j + · exact spectrum0_0_0_calc r + · exact spectrum0_0_1_calc r + · exact spectrum0_0_2_calc r + · exact spectrum0_0_3_calc r + · exact spectrum0_0_4_calc r + · exact spectrum0_0_5_calc r + · exact spectrum0_0_6_calc r + · exact spectrum0_0_7_calc r + · exact spectrum0_0_8_calc r + · exact spectrum0_0_9_calc r + · exact spectrum0_0_10_calc r + · exact spectrum0_0_11_calc r + · exact spectrum0_0_12_calc r + · exact spectrum0_0_13_calc r + · exact spectrum0_0_14_calc r + · exact spectrum0_0_15_calc r + · exact spectrum0_0_16_calc r + · exact spectrum0_0_17_calc r + · exact spectrum0_0_18_calc r + · exact spectrum0_0_19_calc r + · exact spectrum0_0_20_calc r + · exact spectrum0_0_21_calc r + · exact spectrum0_0_22_calc r + · exact spectrum0_0_23_calc r + · exact spectrum0_0_24_calc r + · exact spectrum0_0_25_calc r + · exact spectrum0_0_26_calc r + · exact spectrum0_0_27_calc r + · exact spectrum0_0_28_calc r + · exact spectrum0_0_29_calc r + · exact spectrum0_0_30_calc r + rw [← he] + exact spectrumBox_mem 0 0 j r +def spectrum0_1_0 : Fin 8 → CI := ![⟨⟨-144781109280,144869867129⟩,⟨4504715250712225316640431646184250133233049682584992596797,4504715250712225316682955371423075919294594062889121374326⟩⟩, + ⟨⟨-40811328017,40535939004⟩,⟨-13976779762617292782398816031658961612081902803739040394011,-13976779762617292782368234428427354865177419248646090378246⟩⟩, + ⟨⟨-2396087057925,2458347314894⟩,⟨3159886163659775218180649897622225121617254830306709362728128,3159886163659775218181290419435220537765119310938019486200992⟩⟩, + ⟨⟨-1374680536708,1334698960573⟩,⟨-2029179372690173347898522182055180735764913735581787149452024,-2029179372690173347898285172648541952150343239674914125250543⟩⟩, + ⟨⟨-2326436968088,2263230908097⟩,⟨-3207888371995761663060988029979066021650991201315711259577847,-3207888371995761663060309144052364079354315032840769962403574⟩⟩, + ⟨⟨-1717651125391,1669534229280⟩,⟨-2442070136077936908332597167064263606673228928066212607638166,-2442070136077936908332305794247003032923744703686589428086890⟩⟩, + ⟨⟨-843795425694,871535035000⟩,⟨1407864533746251428345092425505501836841257861073448386424250,1407864533746251428345604665380036213959813432634912417892620⟩⟩, + ⟨⟨-1252305822986,1212577477832⟩,⟨-2016327176059601572843392439723817691274760591467814612366122,-2016327176059601572843103495430581384167825589226019659946374⟩⟩] +lemma spectrum0_1_0_calc (r : Fin 8) : spectrumBox 0 1 0 r = spectrum0_1_0 r := by + revert r + decide +kernel +def spectrum0_1_1 : Fin 8 → CI := ![⟨⟨175784070115171472448397828398842153029402578122169652614471,175784070115171472448446491573773651142151635430461903611586⟩,⟨-54827091887488130817652473393324709799116721448419340890067,-54827091887488130817573901541221552687238787304726593043289⟩⟩, + ⟨⟨-16438405920132389176186429335622591216182593371459726231760,-16438405920132389176151432450956735039865984481749154061762⟩,⟨-4681435949110001861894440980934519404953691005235302466526,-4681435949110001861837934802496632635867385641965519078274⟩⟩, + ⟨⟨-1530525460273105559997151630499248510482928849664786643930212,-1530525460273105559996418632041136543005188364245533810100653⟩,⟨1940388216991388540455731179175544358295372598839773947109063,1940388216991388540456914682852065422683333740514540006657871⟩⟩, + ⟨⟨1424642616647785580255409616830637644240489321041971105382843,1424642616647785580255680844954488445817396654375774126529051⟩,⟨-1461850412388894205788468718197057052451256030571625518304456,-1461850412388894205788030791652736408426673288484498947505482⟩⟩, + ⟨⟨1939510938443144973137448471732856933551339819636436533475620,1939510938443144973138225373201956470799028680019029362883645⟩,⟨-2191914978753893835319023953116698527389351753998948031154953,-2191914978753893835317769563377131752508237981543498889354468⟩⟩, + ⟨⟨1300561047376475003996466408290818977186890148872227710154286,1300561047376475003996799848653745803947885882135963644278119⟩,⟨-1467815704347711713304334172674301128128847544734658659464027,-1467815704347711713303795797878205531129179182196589236161623⟩⟩, + ⟨⟨165406957820282120755619202030985976550163490971456206926425,165406957820282120756205397583735798571295616219555378177043⟩,⟨-630465793626531090695970194619112795720053351996715462223543,-630465793626531090695023719788010575996285177848701849028014⟩⟩, + ⟨⟨162655532868168040558595931519094426729386663884989843729794,162655532868168040558926592734880345646767383865680209680175⟩,⟨56029397631397229737800384404927438845137804608073615963000,56029397631397229738334271973495532623371102032500551185690⟩⟩] +lemma spectrum0_1_1_calc (r : Fin 8) : spectrumBox 0 1 1 r = spectrum0_1_1 r := by + revert r + decide +kernel +def spectrum0_1_2 : Fin 8 → CI := ![⟨⟨211796745235665631520274897858963653168686576830300355065625,211796745235665631520387634625661317793769444486315251518658⟩,⟨155268491834500286567538531360336853697547356319225338211176,155268491834500286567622755369510020636424892098184615081427⟩⟩, + ⟨⟨-14717941590377798392777390360590366616105778181773452096811,-14717941590377798392696313948554554936240201893333338352869⟩,⟨-9031170888878324138172650136688399481731459170657589843228,-9031170888878324138112079120940408724601544672951913834702⟩⟩, + ⟨⟨-3495777027309416730887015474681607647157299363623763475629136,-3495777027309416730885317355389591843623712858806216432840214⟩,⟨1978817497537043807448189156047415826400577938167385452456337,1978817497537043807449457796429940062264249729664271978857463⟩⟩, + ⟨⟨2769503838192917500670276786442635650885263047727414976329117,2769503838192917500670905133889415604918172307759453416756381⟩,⟨-1053429723340931256247774891632709043230933871813848426188691,-1053429723340931256247305462335845705328825517853821787016444⟩⟩, + ⟨⟨3971267330366447988114745151919256084874419038885080547844411,3971267330366447988116544980224586328313230588291880408877666⟩,⟨-1848789759840926779539415745612863608160561688753067222030037,-1848789759840926779538071119896350131685092914151376922658114⟩⟩, + ⟨⟨2901276891182847407473149274769711194826806865669569416756634,2901276891182847407473921747763012230926043113775405853902634⟩,⟨-1325417207288345940664628479437178163594718790688514491396617,-1325417207288345940664051376027353674272711785400730872735182⟩⟩, + ⟨⟨-1500886908849549565557075635610199340489938560287018323169909,-1500886908849549565555717610956801930764731406149396182532745⟩,⟨898038615921140931761261535190297083716607523437385817641256,898038615921140931762276095783221199118932845090219012584034⟩⟩, + ⟨⟨2067409729210356722181134994388004771558972764018892146017453,2067409729210356722181901029000265440882083112339800082714878⟩,⟨-1089609888105447821577095149684824981603769894027288599630382,-1089609888105447821576522856296430842817514558978230362360474⟩⟩] +lemma spectrum0_1_2_calc (r : Fin 8) : spectrumBox 0 1 2 r = spectrum0_1_2 r := by + revert r + decide +kernel +def spectrum0_1_3 : Fin 8 → CI := ![⟨⟨234002888659227778950301052964330201694975255314330468707585,234002888659227778950452638843414435574155247583597862815682⟩,⟨175093745469279806078692428446686729588239237909534368999408,175093745469279806078808510551448107341143214930120410931306⟩⟩, + ⟨⟨-13584697182550975050748817691282793849496375446208773434931,-13584697182550975050639802331418832130499581211521812193454⟩,⟨2472769251503259230602058833047995224016113021816017813046,2472769251503259230685541097364219607218144592025544974508⟩⟩, + ⟨⟨-5876969621447256354160707038484676477229022279902155561467839,-5876969621447256354158423746944477952291270208128302937319192⟩,⟨-2057667525666036000076434046482613752228892499631622374833355,-2057667525666036000074685537390795186258872112993634686296090⟩⟩, + ⟨⟨4374369950990193972062662425831030731492332149202898908902463,4374369950990193972063507301933836740891831153483141368309932⟩,⟨1455012894808239935999665499497616822772665835456668876091606,1455012894808239936000312492455462276286004684861978289736786⟩⟩, + ⟨⟨6423706742050055326358796231467671012945753772987298154349576,6423706742050055326361216280967545693845817575595644338950353⟩,⟨2174033465007030916491216625111708941685882156910662239132910,2174033465007030916493069861318599078667042172948551110791896⟩⟩, + ⟨⟨4817397515590667341656452758549766413824014507425282022139163,4817397515590667341657491425891294780923751027948498675728918⟩,⟨1877133089621326917654162719472404496329429540454311231691628,1877133089621326917654958114741936946684868618510958272849049⟩⟩, + ⟨⟨-2405405912652682260369088824941682198662684582842184372459752,-2405405912652682260367262824720695084179504116061509052443649⟩,⟨-1090205685266448604084867927141916676377219181751677755027133,-1090205685266448604083469604618555915175945180316780040847291⟩⟩, + ⟨⟨3671072936153388689866670749003665792580762975683203962570645,3671072936153388689867700759296757595999012995978584423980510⟩,⟨1763388699021709628436187470452271065907480421075936960076024,1763388699021709628436976236288972381089028595779940608700275⟩⟩] +lemma spectrum0_1_3_calc (r : Fin 8) : spectrumBox 0 1 3 r = spectrum0_1_3 r := by + revert r + decide +kernel +def spectrum0_1_4 : Fin 8 → CI := ![⟨⟨200915393444517405510309038302719627825735932214967468932246,200915393444517405510500092493270709168963132121431518305086⟩,⟨546582146888567945099818616701340583549506825770945852528780,546582146888567945099981601699218012034197400544216949831899⟩⟩, + ⟨⟨-19610280759906484080139780644410408017406224719824029594701,-19610280759906484080002381029998660807926928273850584047815⟩,⟨-6347646370066638999480320372906713846093210318448238910859,-6347646370066638999363107158170727442610561431418537230995⟩⟩, + ⟨⟨-6966957295663604008142022924568755415169099208481910256923530,-6966957295663604008139145133974802046168331697880962711591889⟩,⟨-6270401177680461022386981741299032631138398370792481309941159,-6270401177680461022384526748333454264688984497544796440793223⟩⟩, + ⟨⟨5080993311103774393360481548813284051846751236174212076270347,5080993311103774393361546404728048100324538511465870582037659⟩,⟨5000014536454653838096194716637078473498684291087395829173004,5000014536454653838097103126646338033837915175837739541957358⟩⟩, + ⟨⟨7552574489307003249168967068145673567716372156659166247750528,7552574489307003249172017224275554108284948421443074530219651⟩,⟨7248019233314567532358670288549983653783685130963057960041570,7248019233314567532361272323548119378751914609799992385677531⟩⟩, + ⟨⟨5637713152198721122099801517250329565515377312517544535526006,5637713152198721122101110621695851663166254561947618023360374⟩,⟨5339982444869276710635020252723078214558912840574974399127267,5339982444869276710636137026894109574136115177756057952518307⟩⟩, + ⟨⟨-1285582468400301885493709105410146996196092311864721821932529,-1285582468400301885491407670762841028833661983228204727702401⟩,⟨-388355294534041211457452788460673178012810612616246585688675,-388355294534041211455489474701240538090718019892709058033134⟩⟩, + ⟨⟨3241173824477876289309117265512011121634657128657425961549888,3241173824477876289310415458879327246709497288523681173421881⟩,⟨1970769227790932458515208637698668918025294973265677257420560,1970769227790932458516316103819177484024736106482103572670710⟩⟩] +lemma spectrum0_1_4_calc (r : Fin 8) : spectrumBox 0 1 4 r = spectrum0_1_4 r := by + revert r + decide +kernel +def spectrum0_1_5 : Fin 8 → CI := ![⟨⟨-212587523217755511903636064683318184130433589322729194274268,-212587523217755511903515273074380513457943554009829390099953⟩,⟨750978556078757752042562092386904823497396885209446318710141,750978556078757752042810872037259441359934522633153459608386⟩⟩, + ⟨⟨-25297321174495398857737491984674498323694825467191685970019,-25297321174495398857650622806645378517754800245176465533121⟩,⟨-16100551432386010006263081549322179573333163498980164515299,-16100551432386010006084167766098447312167886314480101312100⟩⟩, + ⟨⟨-543896124460196380900588001713215252202973069937310257718868,-543896124460196380898768554806415358858683725688248072617155⟩,⟨-11269200362228345069208165894652810763614794086909891182289778,-11269200362228345069204418603187010067012563917610370425987443⟩⟩, + ⟨⟨81467073408957396618310594591063871553068861454043632687175,81467073408957396618983836349646258808515831040502924004772⟩,⟨8695745028635858650944211672466157455506655293239517751959858,8695745028635858650945598265879203884797584907124802515192542⟩⟩, + ⟨⟨331589785009824331799742856406982142099970259610030803479098,331589785009824331801671279255895591415099895571367732272213⟩,⟨12786373023124066935295531809735879332566325277746378151006481,12786373023124066935299503545573391850616469459856853984524832⟩⟩, + ⟨⟨318670215077960432625536348389162987728301808170204500138038,318670215077960432626364013209212005129583162609329679282599⟩,⟨9285402159982023903512101074688772710397931602616810727841035,9285402159982023903513805714326852713979583847574118355795942⟩⟩, + ⟨⟨960806580563034482109827083185992898435435520365249249681131,960806580563034482111282136294805303008791494231727971178284⟩,⟨-2674032669301822737643891113114509893759409013194844911925638,-2674032669301822737640894318826882365585791377306712363271579⟩⟩, + ⟨⟨-521274855427723599539714844739293884793419404650564104939835,-521274855427723599538894078311203413842010336821040245712597⟩,⟨4681583126072692309449277318685636118821151436693068939127322,4681583126072692309450967750552542697150961980816034716085567⟩⟩] +lemma spectrum0_1_5_calc (r : Fin 8) : spectrumBox 0 1 5 r = spectrum0_1_5 r := by + revert r + decide +kernel +def spectrum0_1_6 : Fin 8 → CI := ![⟨⟨-624983848195479949360375670393431818973659096867206978101052,-624983848195479949360160860640346049921858268797883703896229⟩,⟨590872362050360703932749003855096519234487839848887967014477,590872362050360703933009195277979171040301420588047912447351⟩⟩, + ⟨⟨-24536625979607339610374817216882892102641360166932749292025,-24536625979607339610220333417492104413087964883442160300046⟩,⟨-26181717231963279442862419963679288494529537988032674078936,-26181717231963279442675299225451998799890262995615045960858⟩⟩, + ⟨⟨3212743939326429245335269472259242024820528705096806966476962,3212743939326429245338505085595628867294287300845407536737948⟩,⟨-10698191037492652939110847336812053861998499117931842520772601,-10698191037492652939106928153321551770188886078421059426228814⟩⟩, + ⟨⟨-3167835901907362308581658390206856551777049677728759938862459,-3167835901907362308580461130751502033563944261201783978784323⟩,⟨8013520029874842659476195377624803903663114303900551361034043,8013520029874842659477645575470913892598434524631163612226517⟩⟩, + ⟨⟨-4120246303047452945915013389789075207071095711987173442561372,-4120246303047452945911583979090242590085818669021467124061356⟩,⟨11912421319151363821010804288050433836779803131143786668351371,11912421319151363821014958211401493087019270392547521448687586⟩⟩, + ⟨⟨-2999999875652778286076376859741519352231253589552990776580734,-2999999875652778286074904982040774029351833107368978808135360⟩,⟨8676326029455773496661129553323069429182474686179009176241401,8676326029455773496662912386494118509154385106074111407485408⟩⟩, + ⟨⟨479118728048514390994965780247088269120333678837158574636630,479118728048514390997553373886907705968599952374404207214537⟩,⟨-4441053393881988442354367964633745734760376059880082197026929,-4441053393881988442351233704381056478302736167708697680787576⟩⟩, + ⟨⟨-1783584342977038272721639747889051104844017900818856316336445,-1783584342977038272720180137943378643512631418367461267856228⟩,⟨6057479070223593182499303489575222539170692256891000167771732,6057479070223593182501071463250358930154340756054055028142829⟩⟩] +lemma spectrum0_1_6_calc (r : Fin 8) : spectrumBox 0 1 6 r = spectrum0_1_6 r := by + revert r + decide +kernel +def spectrum0_1_7 : Fin 8 → CI := ![⟨⟨-849559170266806654588959803676606648645927368255153753643242,-849559170266806654588641213720770553218184086412866919813565⟩,⟨502544268572891840388192830453850388033766092627686354583133,502544268572891840388428835153795007560928025539080579970071⟩⟩, + ⟨⟨-45619992732330269636533308052122642111009130434311603526628,-45619992732330269636304189093982616448786445418438188629516⟩,⟨-58324069050060424444927621276184347428972876894103597433112,-58324069050060424444757894798695271358310070153989052287646⟩⟩, + ⟨⟨11135461334124069606684768361629815943602376223431417523221422,11135461334124069606689567184286302006661061036316327937568876⟩,⟨-8898707206890631195554924962718456593977061361903423756332769,-8898707206890631195551370096407121612215108468393714734604379⟩⟩, + ⟨⟨-8621363706380829916354812971997417812176024037929771631931606,-8621363706380829916353037285225628429539345440710666175885768⟩,⟨6858157647593525796098980510440240059170903337389168377340257,6858157647593525796100295901638534402044173999156256632285401⟩⟩, + ⟨⟨-12383145277292042251896867704719739870194031675223711568092846,-12383145277292042251891781456132839470544730848537868913680396⟩,⟨10032934189550594305845900866513676145802572042331045403569946,10032934189550594305849668651874156032197059680637839512416725⟩⟩, + ⟨⟨-9493181381129029307448539664559824991034863135256157530238482,-9493181381129029307446356684295007341200860829118465118855649⟩,⟨7139530371089102499658504607119736863942277122975518387283599,7139530371089102499660121712721924669657497684353080925493060⟩⟩, + ⟨⟨3266192575463492244649880489860065732149262860863588348097986,3266192575463492244653718217577683272247661625543658554484132⟩,⟨-2361349792931334789863743901807424411577745783182125252338810,-2361349792931334789860900994296142283682766979654799963117743⟩⟩, + ⟨⟨-6479290349820830637197658624284377890262097974916122717218679,-6479290349820830637195493838647554205210007774231398129634827⟩,⟨4539794728818086765561393323432609784937559809722517011065418,4539794728818086765562996950839262359244091998802804487291428⟩⟩] +lemma spectrum0_1_7_calc (r : Fin 8) : spectrumBox 0 1 7 r = spectrum0_1_7 r := by + revert r + decide +kernel +def spectrum0_1_8 : Fin 8 → CI := ![⟨⟨-1317083485403772425437273154846229259419790973143625160681466,-1317083485403772425436940769325755409810004259712363966900792⟩,⟨-6168188442051905434150276045428739590824165382094439414360,-6168188442051905433915393509407269799231001262181580192091⟩⟩, + ⟨⟨-33572013573250159300929516344789727874868926870575937517794,-33572013573250159300690476090202884518185347050943546865949⟩,⟨-80638817809979713970570663401558660037295225290236868346649,-80638817809979713970401743945836294406194930316350472954806⟩⟩, + ⟨⟨16814910647134212642015886733148470585715090000432046589734394,16814910647134212642020893354158074635379141936441989342501719⟩,⟨-2618668347222633394468437283299310228082113048829399894344705,-2618668347222633394464899319798500361190158470263879778677320⟩⟩, + ⟨⟨-13365790646798956447345217386681150781733889281576346308148142,-13365790646798956447343364809219030821874748064382230464335947⟩,⟨1853898157789611724498277713551607617605817184883617423758220,1853898157789611724499586850278919386882733610201511054638686⟩⟩, + ⟨⟨-19141912657028348080489797157295787321700666382828853929808482,-19141912657028348080484490664254035465891983311926247343465654⟩,⟨2703306433367412251950498770050457033009307860433303629634859,2703306433367412251954248640204999518997262340024362263492048⟩⟩, + ⟨⟨-14275656938111013158029111531440930179709424942779366848741695,-14275656938111013158026834023885485304061398071672920779923979⟩,⟨1921912561125164293001058739164919406463545468126266367007870,1921912561125164293002668155693257732452991201134509802931280⟩⟩, + ⟨⟨2653190604756336727240327332542930092640056098571780996603950,2653190604756336727244331241333806990105311935490084583249327⟩,⟨164393975855098659870596532373902987764566176447281687212489,164393975855098659873425922322836735258935744758070412757312⟩⟩, + ⟨⟨-6708270835232085260161866519821093298610080626786270786443730,-6708270835232085260159607994756416943534687039284655685348547⟩,⟨1373384473224538549358297177296888546303373193730762109118568,1373384473224538549359893179716316959548328450897245793329611⟩⟩] +lemma spectrum0_1_8_calc (r : Fin 8) : spectrumBox 0 1 8 r = spectrum0_1_8 r := by + revert r + decide +kernel +def spectrum0_1_9 : Fin 8 → CI := ![⟨⟨-1096468937933210627674029445060818304681194255188950543345242,-1096468937933210627673715379158676521014443239030000498069937⟩,⟨-773393479332277586740827252769459598665481783901991427818534,-773393479332277586740488729125161264663065032876465265396252⟩⟩, + ⟨⟨-29049152931169369260729210881187389422799159450309738843533,-29049152931169369260503345467140518626445507852735247489826⟩,⟨-77252603596304914441937386564770543657222254505817292795128,-77252603596304914441693931982268745744213876371863906140094⟩⟩, + ⟨⟨16630032086928314838261779551915700837952678403414374153157828,16630032086928314838266510230140858400696336055022620515775227⟩,⟨4201282269425964255151930481740667740197675415479146135604576,4201282269425964255157029559424243039159849765433242763735101⟩⟩, + ⟨⟨-12765348943281997123153411687099577915167351138646251245596779,-12765348943281997123151661215505331628599074404642730059830603⟩,⟨-4106804972019790166918039763591797766196267557597510758998601,-4106804972019790166916152974802298893036379692008456240476254⟩⟩, + ⟨⟨-18637782112132912818227688306577165041660156199820464029633789,-18637782112132912818222674283938660808307183438663161986282860⟩,⟨-5676034994391476428510973909143709579790645847516317280642969,-5676034994391476428505569421726879040878364751922208550368742⟩⟩, + ⟨⟨-13988102636394984693917306110523119379453086952594035147738605,-13988102636394984693915154129101017093839413877340308188348189⟩,⟨-3855865001118053682228965278725971871245518626274796955944309,-3855865001118053682226645712709717421174460711073503090926663⟩⟩, + ⟨⟨5006874406068978633132329110267569901480033737299790316067417,5006874406068978633136112341332230866492838912001360631746504⟩,⟨811807513544158805132661192991555329870681142441381302776248,811807513544158805136739041489268155936928433174444144441734⟩⟩, + ⟨⟨-7705985867356559567969171845781250796160207699143095860947180,-7705985867356559567967037800619066254268430900353917896161938⟩,⟨-1349832140463618530379338293948970185201031877448446330215162,-1349832140463618530377038060970880749401300927176644389335154⟩⟩] +lemma spectrum0_1_9_calc (r : Fin 8) : spectrumBox 0 1 9 r = spectrum0_1_9 r := by + revert r + decide +kernel +def spectrum0_1_10 : Fin 8 → CI := ![⟨⟨-881176446146573381370641884737650275862986225335661124732427,-881176446146573381370241318004764288844698599103671210518709⟩,⟨-1039535637061457681939792773084730513335183248974549935147568,-1039535637061457681939440162176752431077941856662158791665483⟩⟩, + ⟨⟨7801666620495390238866571792263954207079263270780507615777,7801666620495390239154645633962850553652628744022579873232⟩,⟨-112615908540540990604736728729217316496591977811774698413684,-112615908540540990604483143070332601379380960018255464874935⟩⟩, + ⟨⟨14231420268018774160300510084105130548722307202249353837785720,14231420268018774160306543697776858518476112756200072766181961⟩,⟨11339610057009083435101860640880506496394198768945513744445305,11339610057009083435107171910690280050053222504393416444906231⟩⟩, + ⟨⟨-10940754882481674201486151951338390115272263932555461931035768,-10940754882481674201483919360398924120034030834998230788386006⟩,⟨-8997551942907806501159139522814079653970745280761520544717528,-8997551942907806501157174217526151975318629266717948454622925⟩⟩, + ⟨⟨-16130917151862529566631416715426501960041849548264766481403393,-16130917151862529566625021717901379634305767151256467320694799⟩,⟨-13094483590619219281193914730548778012428316543349475097599402,-13094483590619219281188285341738567466108675568332565614627887⟩⟩, + ⟨⟨-11827007264262658982476475030926947181235917476415941106146604,-11827007264262658982473730345300127046110692658580091924579153⟩,⟨-9678086759891162178070381924343735943028901453678804292092281,-9678086759891162178067965832313290405400967179837904890547515⟩⟩, + ⟨⟨4944656831038643378635627821119110336058572561804923367171167,4944656831038643378640453039320097592310795569041768815675039⟩,⟨4820259754298403771247228880583880393033888691512545351143780,4820259754298403771251476423955203642977419257815558059665246⟩⟩, + ⟨⟨-6937537850085218206763532081038529631028650795052677359388321,-6937537850085218206760810271722020320405722578623062390370801⟩,⟨-7828705856063788703649736816250294019544756494684566105234977,-7828705856063788703647340861779679702688973831115324802660242⟩⟩] +lemma spectrum0_1_10_calc (r : Fin 8) : spectrumBox 0 1 10 r = spectrum0_1_10 r := by + revert r + decide +kernel +def spectrum0_1_11 : Fin 8 → CI := ![⟨⟨-531261654312062482563619635361721174066371070850846406814291,-531261654312062482563164572814337941555549643820126995956635⟩,⟨-1711152124198608862032320563733344868536186457706190625829037,-1711152124198608862031963269741550416537163338541186058408619⟩⟩, + ⟨⟨48838376109358641252469095779693633817442316088875851570682,48838376109358641252796361140182750893912030799285262864352⟩,⟨-109552042607880586593043511540932591444422896610399176473222,-109552042607880586592786557968950364875152353296548423076793⟩⟩, + ⟨⟨9921870934340350398733588876237147855125952364742319064281440,9921870934340350398740443343625392817021503996266628302846733⟩,⟨19351317568957597727810977686712583857878610213176769535232902,19351317568957597727816359496375571679654156252934696385319765⟩⟩, + ⟨⟨-7699097620742732357421692105922619969451463051237835686622604,-7699097620742732357419155778173037993221289585923784056173628⟩,⟨-15585237413042080722646279573001186484729221803563085500538840,-15585237413042080722644288166168525277657746775134564714906768⟩⟩, + ⟨⟨-11470886174432986851937728098870932811545194101420560180687505,-11470886174432986851930463082519412828551408769517747879947772⟩,⟨-22342237728920280721345729188319822195855028850728179292574404,-22342237728920280721340025034665312537267679743685664002150268⟩⟩, + ⟨⟨-8021736792675034781122420686325185174197628455310691558504770,-8021736792675034781119302595054579290286526712445359048503042⟩,⟨-16401553257093545469916014626755980768567691302531888794562211,-16401553257093545469913566446207481380166868278395872960257801⟩⟩, + ⟨⟨2506633653776643608718564220253177540772379167314194228291268,2506633653776643608724045893856976738906703333225357169682518⟩,⟨3758689009692871979371030762366647089786916863586281053708517,3758689009692871979375334718064337761448706732207242757843177⟩⟩, + ⟨⟨-4847278982257009730265962248519211371837439504144664017670017,-4847278982257009730262870145807290255536697579305595279760640⟩,⟨-9594242213987975463188604926112085188501277863683849229266278,-9594242213987975463186177150573681357645607776173238158232502⟩⟩] +lemma spectrum0_1_11_calc (r : Fin 8) : spectrumBox 0 1 11 r = spectrum0_1_11 r := by + revert r + decide +kernel +def spectrum0_1_12 : Fin 8 → CI := ![⟨⟨481719245037481661271166804703155794231139535500161577691459,481719245037481661271505522285441114511591517023645669923494⟩,⟨-1895739596451091757184437087460884517212114608737994799891587,-1895739596451091757183869422751521962787995089472312852497791⟩⟩, + ⟨⟨83036675943282942508888169791533923419695496492198057486868,83036675943282942509131763847577422506630842768738048207671⟩,⟨-103890579546034291322206882864273210290374462082325398641704,-103890579546034291321798637894839862502397944799400207501104⟩⟩, + ⟨⟨-3669486144293629876850370050096232542113119662381257490771522,-3669486144293629876845268051184323284456998434496248330548556⟩,⟨24733306764596769146887211828299753157763076690832658016593161,24733306764596769146895762387470482564173676653087151408260733⟩⟩, + ⟨⟨3098421935741805619022046979363179425089700672214187440857039,3098421935741805619023934849081664697823859882610297153109743⟩,⟨-19435133258605254705445048122612773352691161812975740202268734,-19435133258605254705441884197646647508576819862431832705426005⟩⟩, + ⟨⟨4169180429166768919989469325763376206546535969243134449015731,4169180429166768919994876909375784118733327008708009348401902⟩,⟨-27963548733760582742753111273304570143759902574686716839098340,-27963548733760582742744048577595123685977346894509666516600051⟩⟩, + ⟨⟨3349117364253571409376315786839862193450170024389812557149581,3349117364253571409378636681720352424120364858697103843294807⟩,⟨-20791295119169640577882477336570180526868654697018279062246161,-20791295119169640577878587694618601132494661244552562517992070⟩⟩, + ⟨⟨-1115306753089950932982333687740429362388834118205093723701026,-1115306753089950932978253503069919742005118214485747277761118⟩,⟨5035336686453412620427882048916819477818832596257794909394326,5035336686453412620434720125728490126624245680358349623594617⟩⟩, + ⟨⟨578911872253120702807973116819061543250818069379672038408679,578911872253120702810274667585615341013312379938349639347509⟩,⟨-11150578339627659094279181453259971401331338364722948025480811,-11150578339627659094275324230560860429027536865703373120617939⟩⟩] +lemma spectrum0_1_12_calc (r : Fin 8) : spectrumBox 0 1 12 r = spectrum0_1_12 r := by + revert r + decide +kernel +def spectrum0_1_13 : Fin 8 → CI := ![⟨⟨1233446047420044298421154153598805162725051845862407218216285,1233446047420044298421513224856055984885719995111400416881239⟩,⟨-1404892375599905796349250724290229124535114611170839302610284,-1404892375599905796348695568555157221640983659915319822320205⟩⟩, + ⟨⟨116986281188370719502725583784090725364711395306243011597383,116986281188370719502983815504370328858796180901430388054180⟩,⟨-103895252577516730776252879288609936155856955532274933571029,-103895252577516730775853630344018029580610526988392505997531⟩⟩, + ⟨⟨-12403797253195047114828463397779231097119848710100941122058361,-12403797253195047114823054817712524060267551078054068174680435⟩,⟨20988346003254915261306002222336143387067159129476147052734305,20988346003254915261314364362669003771175240446718425155938891⟩⟩, + ⟨⟨10138610269950936244995103602807468145117188111883671498533053,10138610269950936244997104915372256256754964725510763279710331⟩,⟨-15967268710665608170511770992273023627667262073864831152703704,-15967268710665608170508676787082332231922479846955613324391204⟩⟩, + ⟨⟨14427349095900849527749611783295434366191586878977707997987193,14427349095900849527755344310769489862028894352303919402763215⟩,⟨-23129719525155909769023745150986348435308513954599363362683496,-23129719525155909769014882159478631840609368749234956081749810⟩⟩, + ⟨⟨10741280757504581803029076311853806473468437254726655549824519,10741280757504581803031536670235741998823916775064261258808850⟩,⟨-17606731837653827761698342779136899145036505032500534309435685,-17606731837653827761694538848751266456674028371411832245115995⟩⟩, + ⟨⟨-4014214045909772286516640813654993284022664871185952793280378,-4014214045909772286512315449056053431193092684499695759637601⟩,⟨6891439034591221037349446493788121459979609222155421059353421,6891439034591221037356133887766027894984299044647499213162790⟩⟩, + ⟨⟨5711144917553542238254920021960280792143592104297288134866944,5711144917553542238257359873832738143458494629324829236959278⟩,⟨-10222422553679564720938673441850648855874378568455304359841384,-10222422553679564720934901216331705517613132807671400094627122⟩⟩] +lemma spectrum0_1_13_calc (r : Fin 8) : spectrumBox 0 1 13 r = spectrum0_1_13 r := by + revert r + decide +kernel +def spectrum0_1_14 : Fin 8 → CI := ![⟨⟨1728211891353472335614182352664264351796016967864536014749631,1728211891353472335614792127729773451675567722100249717868489⟩,⟨-1057172947671077341096041500775200412734770143934865183214056,-1057172947671077341095609509790955549549895493207773327765000⟩⟩, + ⟨⟨148823133316730428775376246781546630946120697505066305832809,148823133316730428775814776073352420314912089396024488430910⟩,⟨-55395446658756236762758937155685193338333031683555586692525,-55395446658756236762448264071292678264765941076649436793788⟩⟩, + ⟨⟨-24433094868301666152045131538132110063053178319041839047436879,-24433094868301666152035946683600064547263850264545103367880755⟩,⟨16386500869388944799944788884119355206212641174804216484535766,16386500869388944799951295831637997262256408764611427332227476⟩⟩, + ⟨⟨18768116328026291904240112134324559077694707913470195323982775,18768116328026291904243510764751403306124692796332007779224888⟩,⟨-12574334316005428050140257226285235889909451465588777830158230,-12574334316005428050137849489750533213363208053796084145931149⟩⟩, + ⟨⟨27581146593872281428407332790667379159373234524721088661808100,27581146593872281428417067772917944415713751388086080619672745⟩,⟨-18191687552981565403376899906902985056690003810234523295437554,-18191687552981565403370003225156057837622607577024655905585335⟩⟩, + ⟨⟨20471354858122573957582708424636059175752945639910859514496459,20471354858122573957586886606997429908444929192249677295172954⟩,⟨-13645909266388730421936397380428570198084159678428990820715510,-13645909266388730421933437375645271734791525916025861003825493⟩⟩, + ⟨⟨-8413430196430212598821002618684473739093222383779694441658800,-8413430196430212598813657281433414078462578664553543433980930⟩,⟨4942487291024639823528797472882195159077928829027584936689233,4942487291024639823534001226935415570687363355352677740626785⟩⟩, + ⟨⟨14249725211448538443351365430500009748409047392892842128460546,14249725211448538443355508788692339064671112406959347282870797⟩,⟨-6962822205096550957146961411247702162868729729472735408593491,-6962822205096550957144026077409331811723072255996602157725581⟩⟩] +lemma spectrum0_1_14_calc (r : Fin 8) : spectrumBox 0 1 14 r = spectrum0_1_14 r := by + revert r + decide +kernel +def spectrum0_1_15 : Fin 8 → CI := ![⟨⟨2494489568420160898321127091713651503275510364810764478867144,2494489568420160898321935277487019165484723323759116842931958⟩,⟨-2693034973207170762267,2693034973207170643467⟩⟩, + ⟨⟨116394590273310543537759801505100849068351038200766447356029,116394590273310543538341020965995836786854625468119730129451⟩,⟨-901731700852059526262,901731700852059525347⟩⟩, + ⟨⟨-26051870829856457427106559670313610559027906658369726523879497,-26051870829856457427094386216226810242980733112591831676505358⟩,⟨-55171591785321710083226,55171591785321708973140⟩⟩, + ⟨⟨21648132755061779486212714088213265164678225622058378818395585,21648132755061779486217218576696435161375775449516594485253049⟩,⟨-30180447830103365648328,30180447830103366335678⟩⟩, + ⟨⟨30977128543359793540674997454001244258883621105730515658309258,30977128543359793540687900038255529636049529849728692868071980⟩,⟨-63928301772263456798226,63928301772263457994208⟩⟩, + ⟨⟨22136626173836201462431489349594825540542527007115446829009775,22136626173836201462437027043301891590411928337535234912868149⟩,⟨-44967837966464152550082,44967837966464153117017⟩⟩, + ⟨⟨-2496108104406912113047245348824888110182455495619978748108262,-2496108104406912113037509960478141486869767818406670107298664⟩,⟨-13904112352302089249620,13904112352302089211895⟩⟩, + ⟨⟨10602258118382948296549829730990616593322455797003065121557380,10602258118382948296555321269320756684994712676506605919603805⟩,⟨-19369847463901938284928,19369847463901938312230⟩⟩] +lemma spectrum0_1_15_calc (r : Fin 8) : spectrumBox 0 1 15 r = spectrum0_1_15 r := by + revert r + decide +kernel +def spectrum0_1_16 : Fin 8 → CI := ![⟨⟨1728211891353472335614182352664264351788025769911008623758883,1728211891353472335614792127729773451683558920053777108811099⟩,⟨1057172947671077341095609509790955549541904295277752349792386,1057172947671077341096041500775200412742761341864886160966357⟩⟩, + ⟨⟨148823133316730428775376246781546630943405888801932800015319,148823133316730428775814776073352420317626898099157994270624⟩,⟨55395446658756236762448264071292678262051132396080594742388,55395446658756236762758937155685193341047840364124428732190⟩⟩, + ⟨⟨-24433094868301666152045131538132110063218680731169731779094022,-24433094868301666152035946683600064547098347852417210637111169⟩,⟨-16386500869388944799951295831637997262421911176543921153053824,-16386500869388944799944788884119355206047138762871722665693190⟩⟩, + ⟨⟨18768116328026291904240112134324559077604213236355607509033238,18768116328026291904243510764751403306215187473446595594681602⟩,⟨12574334316005428050137849489750533213272713376779126934243595,12574334316005428050140257226285235889999946142605735043115090⟩⟩, + ⟨⟨27581146593872281428407332790667379159176580201419431626237199,27581146593872281428417067772917944415910405711387737656142987⟩,⟨18191687552981565403370003225156057837425953253890913987783220,18191687552981565403376899906902985056886658133368265215352887⟩⟩, + ⟨⟨20471354858122573957582708424636059175614735664325425091147082,20471354858122573957586886606997429908583139167835111718870142⟩,⟨13645909266388730421933437375645271734653315940550907578405656,13645909266388730421936397380428570198222369653903944247176223⟩⟩, + ⟨⟨-8413430196430212598821002618684473739132904975996277031427459,-8413430196430212598813657281433414078422896072336960844061731⟩,⟨-4942487291024639823534001226935415570727045946764612918509440,-4942487291024639823528797472882195159038246237615649759092447⟩⟩, + ⟨⟨14249725211448538443351365430500009748353356935032325532429551,14249725211448538443355508788692339064726802864819863878609929⟩,⟨6962822205096550957144026077409331811667381799749186206433229,6962822205096550957146961411247702162924420185720151360225342⟩⟩] +lemma spectrum0_1_16_calc (r : Fin 8) : spectrumBox 0 1 16 r = spectrum0_1_16 r := by + revert r + decide +kernel +def spectrum0_1_17 : Fin 8 → CI := ![⟨⟨1233446047420044298421154153598805162696339781758494520404613,1233446047420044298421513224856055984914432059215313114601911⟩,⟨1404892375599905796348695568555157221612271595748302093482159,1404892375599905796349250724290229124563826675337857031270798⟩⟩, + ⟨⟨116986281188370719502725583784090725354870834121238394342818,116986281188370719502983815504370328868636742086435005344473⟩,⟨103895252577516730775853630344018029570769965741905403780597,103895252577516730776252879288609936165697516778762035767157⟩⟩, + ⟨⟨-12403797253195047114828463397779231097716734329592716557674376,-12403797253195047114823054817712524059670665458562292740515856⟩,⟨-20988346003254915261314364362669003771772126066749706479650020,-20988346003254915261306002222336143386470273509444865730387037⟩⟩, + ⟨⟨10138610269950936244995103602807468144790968175367570184785551,10138610269950936244997104915372256257081184662026864594304575⟩,⟨15967268710665608170508676787082332231596259910166110390310072,15967268710665608170511770992273023627993482010654334087769701⟩⟩, + ⟨⟨14427349095900849527749611783295434365469909843713705264405115,14427349095900849527755344310769489862750571387567922137771436⟩,⟨23129719525155909769014882159478631839887691713506486327519891,23129719525155909769023745150986348436030190990327833118323534⟩⟩, + ⟨⟨10741280757504581803029076311853806472961465008391397729700037,10741280757504581803031536670235741999330889021399519079476509⟩,⟨17606731837653827761694538848751266456167056124769863279939495,17606731837653827761698342779136899145543477279142503275424469⟩⟩, + ⟨⟨-4014214045909772286516640813654993284161126453897892297844903,-4014214045909772286512315449056053431054631101787756255183339⟩,⟨-6891439034591221037356133887766027895122760629093568978413904,-6891439034591221037349446493788121459841147637709351294607136⟩⟩, + ⟨⟨5711144917553542238254920021960280791948265147679414348103870,5711144917553542238257359873832738143653821585942703023651501⟩,⟨10222422553679564720934901216331705517417805847586415420475939,10222422553679564720938673441850648856069705528540289034767960⟩⟩] +lemma spectrum0_1_17_calc (r : Fin 8) : spectrumBox 0 1 17 r = spectrum0_1_17 r := by + revert r + decide +kernel +def spectrum0_1_18 : Fin 8 → CI := ![⟨⟨481719245037481661271166804703155794135752581622776940131919,481719245037481661271505522285441114606978470901030307358518⟩,⟨1895739596451091757183869422751521962692608135740490173799488,1895739596451091757184437087460884517307501562469817478464625⟩⟩, + ⟨⟨83036675943282942508888169791533923386688696699989593685141,83036675943282942509131763847577422539637642560946512058315⟩,⟨103890579546034291321798637894839862469391145157213309211305,103890579546034291322206882864273210323381261724512296896636⟩⟩, + ⟨⟨-3669486144293629876850370050096232544100820433186364429399484,-3669486144293629876845268051184323282469297663691141393452268⟩,⟨-24733306764596769146895762387470482566161377422632018411739465,-24733306764596769146887211828299753155775375921287791013733992⟩⟩, + ⟨⟨3098421935741805619022046979363179424004023285927251691771532,3098421935741805619023934849081664698909537268897232903133992⟩,⟨19435133258605254705441884197646647507491142476782465906974812,19435133258605254705445048122612773353776839198625107001349803⟩⟩, + ⟨⟨4169180429166768919989469325763376204094347240098965431135104,4169180429166768919994876909375784121185515737852178367692851⟩,⟨27963548733760582742744048577595123683525158166476272350586039,27963548733760582742753111273304570146212091302720111005712533⟩⟩, + ⟨⟨3349117364253571409376315786839862191728291551883806661512276,3349117364253571409378636681720352425842243331203109739472671⟩,⟨20791295119169640577878587694618601130772782772775879469282754,20791295119169640577882477336570180528590533168794962111523320⟩⟩, + ⟨⟨-1115306753089950932982333687740429362832703149873612653146914,-1115306753089950932978253503069919741561249182817228348767182⟩,⟨-5035336686453412620434720125728490127068114709099243341002699,-5035336686453412620427882048916819477374963567516901192256816⟩⟩, + ⟨⟨578911872253120702807973116819061542620751460530977154760357,578911872253120702810274667585615341643378988787044523464178⟩,⟨11150578339627659094275324230560860428397470262699069686850313,11150578339627659094279181453259971401961404967727251460010143⟩⟩] +lemma spectrum0_1_18_calc (r : Fin 8) : spectrumBox 0 1 18 r = spectrum0_1_18 r := by + revert r + decide +kernel +def spectrum0_1_19 : Fin 8 → CI := ![⟨⟨-531261654312062482563619635361721174381864159525305955767437,-531261654312062482563164572814337941240056555145667447157421⟩,⟨1711152124198608862031963269741550416221670249533212382781100,1711152124198608862032320563733344868851679546714164301379440⟩⟩, + ⟨⟨48838376109358641252469095779693633707286326198325274391408,48838376109358641252796361140182751004068020689835840098411⟩,⟨109552042607880586592786557968950364764996363054334952191464,109552042607880586593043511540932591554578886852612647311219⟩⟩, + ⟨⟨9921870934340350398733588876237147848550518368679686136055467,9921870934340350398740443343625392823596937992329261229922074⟩,⟨-19351317568957597727816359496375571686229590251923147863519237,-19351317568957597727810977686712583851303176214188318057027187⟩⟩, + ⟨⟨-7699097620742732357421692105922619973040310948581820822915094,-7699097620742732357419155778173037989632441688579798919099736⟩,⟨15585237413042080722644288166168525274068898876305541274392015,15585237413042080722646279573001186488318069702392108941357100⟩⟩, + ⟨⟨-11470886174432986851937728098870932819825725797920070387384129,-11470886174432986851930463082519412820270877073018237672344913⟩,⟨22342237728920280721340025034665312528987148044566023954384816,22342237728920280721345729188319822204135560549847819340332260⟩⟩, + ⟨⟨-8021736792675034781122420686325185180009894378107701837994022,-8021736792675034781119302595054579284474260789648348768642960⟩,⟨16401553257093545469913566446207481374354602353881397695414025,16401553257093545469916014626755980774379957227046364059798323⟩⟩, + ⟨⟨2506633653776643608718564220253177539359069704342928973635473,2506633653776643608724045893856976740320012796196622424055514⟩,⟨-3758689009692871979375334718064337762862016199816220100630185,-3758689009692871979371030762366647088373607395977303710733486⟩⟩, + ⟨⟨-4847278982257009730265962248519211373856716233183771263529035,-4847278982257009730262870145807290253517420850266488033242263⟩,⟨9594242213987975463186177150573681355626331037921301582521936,9594242213987975463188604926112085190520554601935785805201864⟩⟩] +lemma spectrum0_1_19_calc (r : Fin 8) : spectrumBox 0 1 19 r = spectrum0_1_19 r := by + revert r + decide +kernel +def spectrum0_1_20 : Fin 8 → CI := ![⟨⟨-881176446146573381370641884737650276908349934960233469909672,-881176446146573381370241318004764287799334889479098865525815⟩,⟨1039535637061457681939440162176752430032578147817366019929456,1039535637061457681939792773084730514380546957819342706837063⟩⟩, + ⟨⟨7801666620495390238866571792263953839075959860700068549085,7801666620495390239154645633962850921655932154103018999678⟩,⟨112615908540540990604483143070332601011377657457407456601531,112615908540540990604736728729217316864595280372622706633293⟩⟩, + ⟨⟨14231420268018774160300510084105130526977711148588676454592051,14231420268018774160306543697776858540220708809860750148931246⟩,⟨-11339610057009083435107171910690280071797818551161824524359566,-11339610057009083435101860640880506474649602722177105664711071⟩⟩, + ⟨⟨-10940754882481674201486151951338390127130523770404419965654726,-10940754882481674201483919360398924108175770997149272753343108⟩,⟨8997551942907806501157174217526151963460369432377744935014237,8997551942907806501159139522814079665829005115101724064433651⟩⟩, + ⟨⟨-16130917151862529566631416715426501987993822093694819565444131,-16130917151862529566625021717901379606353794605826414236529808⟩,⟨13094483590619219281188285341738567438156703029126309978680730,13094483590619219281193914730548778040380289082555730733384446⟩⟩, + ⟨⟨-11827007264262658982476475030926947200850087596600020733933864,-11827007264262658982473730345300127026496522538396012296692570⟩,⟨9678086759891162178067965832313290385786797063734115843517842,9678086759891162178070381924343735962643071569782593339480174⟩⟩, + ⟨⟨4944656831038643378635627821119110331556022978703451130294935,4944656831038643378640453039320097596813345152143241052835816⟩,⟨-4820259754298403771251476423955203647479968833599427658842107,-4820259754298403771247228880583880388531339115728675751823138⟩⟩, + ⟨⟨-6937537850085218206763532081038529637504506738714659505259025,-6937537850085218206760810271722020313929866634961080244304619⟩,⟨7828705856063788703647340861779679696213117901869730846886650,7828705856063788703649736816250294026020612423930160060826703⟩⟩] +lemma spectrum0_1_20_calc (r : Fin 8) : spectrumBox 0 1 20 r = spectrum0_1_20 r := by + revert r + decide +kernel +def spectrum0_1_21 : Fin 8 → CI := ![⟨⟨-1096468937933210627674029445060818308152157463099361543647988,-1096468937933210627673715379158676517543480031119589497989645⟩,⟨773393479332277586740488729125161261192101823110584372041991,773393479332277586740827252769459602136444993667872321138031⟩⟩, + ⟨⟨-29049152931169369260729210881187390653869086224182730717495,-29049152931169369260503345467140517395375581078862255546820⟩,⟨77252603596304914441693931982268744513143947586325967670661,77252603596304914441937386564770544888292183291355231208775⟩⟩, + ⟨⟨16630032086928314838261779551915700766029119761449177750463275,16630032086928314838266510230140858472619894696987816918758294⟩,⟨-4201282269425964255157029559424243111083408423850023066055090,-4201282269425964255151930481740667668274116757062365833198647⟩⟩, + ⟨⟨-12765348943281997123153411687099577954354391165112213446164281,-12765348943281997123151661215505331589412034378176767859260719⟩,⟨4106804972019790166916152974802298853849339657160006147795404,4106804972019790166918039763591797805383307592445960851795995⟩⟩, + ⟨⟨-18637782112132912818227688306577165136030672903020930645466644,-18637782112132912818222674283938660713936666735462695371025048⟩,⟨5676034994391476428505569421726878946507848033813082170717130,5676034994391476428510973909143709674161162565625443660502988⟩⟩, + ⟨⟨-13988102636394984693917306110523119445658116098305886058906788,-13988102636394984693915154129101017027634384731628457277321686⟩,⟨3855865001118053682226645712709717354969431555589922061383698,3855865001118053682228965278725971937450547781758377985980718⟩⟩, + ⟨⟨5006874406068978633132329110267569887117115187993060054322724,5006874406068978633136112341332230880855757461308090893908085⟩,⟨-811807513544158805136739041489268170299846994327697937568496,-811807513544158805132661192991555315507762581288127510100799⟩⟩, + ⟨⟨-7705985867356559567969171845781250816956840409298177788929405,-7705985867356559567967037800619066233471798190198835968565323⟩,⟨1349832140463618530377038060970880728604668193912886406370234,1349832140463618530379338293948970205997664610712204313234229⟩⟩] +lemma spectrum0_1_21_calc (r : Fin 8) : spectrumBox 0 1 21 r = spectrum0_1_21 r := by + revert r + decide +kernel +def spectrum0_1_22 : Fin 8 → CI := ![⟨⟨-1317083485403772425437273154846229270966045912141134115257474,-1317083485403772425436940769325755398263749320714855012604411⟩,⟨6168188442051905433915393509407258252976066720974995413781,6168188442051905434150276045428751137079099923301024157525⟩⟩, + ⟨⟨-33572013573250159300929516344789731998112745476456919329842,-33572013573250159300690476090202880394941528445062564973453⟩,⟨80638817809979713970401743945836290282951116615491491321791,80638817809979713970570663401558664160539038991095849922568⟩⟩, + ⟨⟨16814910647134212642015886733148470347758936020106976246665515,16814910647134212642020893354158074873335295916767059686279030⟩,⟨2618668347222633394464899319798500123234004529490846487672050,2618668347222633394468437283299310466038266989602433184849460⟩⟩, + ⟨⟨-13365790646798956447345217386681150911253683436812502492379727,-13365790646798956447343364809219030692354953909146074280429733⟩,⟨-1853898157789611724499586850278919516402527745281017382632323,-1853898157789611724498277713551607488086023049804111095443948⟩⟩, + ⟨⟨-19141912657028348080489797157295787640373913730631259902580852,-19141912657028348080484490664254035147218735964123841371520057⟩,⟨-2703306433367412251954248640204999837670509651953424397991833,-2703306433367412251950498770050456714336060548504241494205470⟩⟩, + ⟨⟨-14275656938111013158029111531440930403231187792308189004957956,-14275656938111013158026834023885485080539635222144098623926951⟩,⟨-1921912561125164293002668155693257955974754027152784154118353,-1921912561125164293001058739164919182941782642107992015089695⟩⟩, + ⟨⟨2653190604756336727240327332542930046759324999772499697748473,2653190604756336727244331241333807035986043034289365881932973⟩,⟨-164393975855098659873425922322836781139666823454251269843740,-164393975855098659870596532373902941883835097751100830868506⟩⟩, + ⟨⟨-6708270835232085260161866519821093365492332484972766449163839,-6708270835232085260159607994756416876652435181098160023039768⟩,⟨-1373384473224538549359893179716317026430580270325939324974883,-1373384473224538549358297177296888479421121374302068576836050⟩⟩] +lemma spectrum0_1_22_calc (r : Fin 8) : spectrumBox 0 1 22 r = spectrum0_1_22 r := by + revert r + decide +kernel +def spectrum0_1_23 : Fin 8 → CI := ![⟨⟨-849559170266806654588959803676606687117259925505448577030776,-849559170266806654588641213720770514746851529162572096776072⟩,⟨-502544268572891840388428835153795046032260593522562739724746,-502544268572891840388192830453850349562433524644204194864974⟩⟩, + ⟨⟨-45619992732330269636533308052122655935564281265247662731561,-45619992732330269636304189093982602624231294587502129320719⟩,⟨58324069050060424444757894798695257533754907650375778779380,58324069050060424444927621276184361253528039397716870881581⟩⟩, + ⟨⟨11135461334124069606684768361629815156153275456836372993746560,11135461334124069606689567184286302794110161802911372467761705⟩,⟨8898707206890631195551370096407120824766007606488225963398098,8898707206890631195554924962718457381426162223808912526297040⟩⟩, + ⟨⟨-8621363706380829916354812971997418240328830686888532054360487,-8621363706380829916353037285225628001386538791751905753942163⟩,⟨-6858157647593525796100295901638534830196980696692753032781172,-6858157647593525796098980510440239631018096639852671976213925⟩⟩, + ⟨⟨-12383145277292042251896867704719740946506926663816831310311955,-12383145277292042251891781456132838394231835859944749172059166⟩,⟨-10032934189550594305849668651874157108509954755694058904597870,-10032934189550594305845900866513675069489676967274826009717006⟩⟩, + ⟨⟨-9493181381129029307448539664559825745867755247881025974934317,-9493181381129029307446356684295006586367968716493596674299236⟩,⟨-7139530371089102499660121712721925424490389853642257832211538,-7139530371089102499658504607119736109109384953686341479618746⟩⟩, + ⟨⟨3266192575463492244649880489860065585380796930619005165286979,3266192575463492244653718217577683419016127555788241736706175⟩,⟨2361349792931334789860900994296142136914301013164817667887984,2361349792931334789863743901807424558346211749672107547354590⟩⟩, + ⟨⟨-6479290349820830637197658624284378105664487405118037978255646,-6479290349820830637195493838647553989807618344029482868549776⟩,⟨-4539794728818086765562996950839262574646481497956129689039523,-4539794728818086765561393323432609569535170310569191808459240⟩⟩] +lemma spectrum0_1_23_calc (r : Fin 8) : spectrumBox 0 1 23 r = spectrum0_1_23 r := by + revert r + decide +kernel +def spectrum0_1_24 : Fin 8 → CI := ![⟨⟨-624983848195479949360375670393431947338685783459461911260371,-624983848195479949360160860640345921556831582205628771181086⟩,⟨-590872362050360703933009195277979299405328081296217217741816,-590872362050360703932749003855096390869461179140718661717683⟩⟩, + ⟨⟨-24536625979607339610374817216882938496359721339769337025800,-24536625979607339610220333417492058019369603710605572443362⟩,⟨26181717231963279442675299225451952406171930343496666670441,26181717231963279442862419963679334888247870640151053296522⟩⟩, + ⟨⟨3212743939326429245335269472259239418419920551214700435346367,3212743939326429245338505085595631473694895454727514067911296⟩,⟨10698191037492652939106928153321549163788278154416513296329343,10698191037492652939110847336812056468399107041936388649199568⟩⟩, + ⟨⟨-3167835901907362308581658390206857967330365366597405594195094,-3167835901907362308580461130751500618010628572333138323798987⟩,⟨-8013520029874842659477645575470915308151750096330677707085882,-8013520029874842659476195377624802488109798732201037265379922⟩⟩, + ⟨⟨-4120246303047452945915013389789078842973421068986816902388360,-4120246303047452945911583979090238954183493312021823663951095⟩,⟨-11912421319151363821014958211401496722921595541004222656343200,-11912421319151363821010804288050430200877477982687085458994450⟩⟩, + ⟨⟨-2999999875652778286076376859741521901865068153958365100857017,-2999999875652778286074904982040771479718018542963604483700487⟩,⟨-8676326029455773496662912386494121058788199533805292466903115,-8676326029455773496661129553323066879548660258447828115955432⟩⟩, + ⟨⟨479118728048514390994965780247087798947637006730450448335818,479118728048514390997553373886908176141296624481112333264368⟩,⟨4441053393881988442351233704381056008130039565368372923572753,4441053393881988442354367964633746204933072662220406954953930⟩⟩, + ⟨⟨-1783584342977038272721639747889051799561347104094758550125753,-1783584342977038272720180137943377948795302215091559033616295⟩,⟨-6057479070223593182501071463250359624871669828400448796512550,-6057479070223593182499303489575221844453363184544606399053173⟩⟩] +lemma spectrum0_1_24_calc (r : Fin 8) : spectrumBox 0 1 24 r = spectrum0_1_24 r := by + revert r + decide +kernel +def spectrum0_1_25 : Fin 8 → CI := ![⟨⟨-212587523217755511903636064683318612965733504411415087023567,-212587523217755511903515273074380084622643638921143497876008⟩,⟨-750978556078757752042810872037259870195234500164877155383270,-750978556078757752042562092386904394662096907677722622911107⟩⟩, + ⟨⟨-25297321174495398857737491984674654139841960508091329100107,-25297321174495398857650622806645222701607665204276822218630⟩,⟨16100551432386010006084167766098291496020683334957912739753,16100551432386010006263081549322335389480366478502352967222⟩⟩, + ⟨⟨-543896124460196380900588001713223880942584945811352636423613,-543896124460196380898768554806406730119071849814205694662449⟩,⟨11269200362228345069204418603187001438272951487095224855854091,11269200362228345069208165894652819392354406517425036750431803⟩⟩, + ⟨⟨81467073408957396618310594591059190808811106737650405723727,81467073408957396618983836349650939552773585756896150859674⟩,⟨-8695745028635858650945598265879208565541842944553961271393527,-8695745028635858650944211672466152774762397255810358994659329⟩⟩, + ⟨⟨331589785009824331799742856406969857420471412724178709311359,331589785009824331801671279255907876094598742457219827537363⟩,⟨-12786373023124066935299503545573404135295968809928162574667906,-12786373023124066935295531809735867047886825927675069558939063⟩⟩, + ⟨⟨318670215077960432625536348389154373917429397978191634936850,318670215077960432626364013209220618940455572801342544865892⟩,⟨-9285402159982023903513805714326861327790456587540926722307761,-9285402159982023903512101074688764096587058862650002360389315⟩⟩, + ⟨⟨960806580563034482109827083185991390057394928433655362500370,960806580563034482111282136294806811386832086163321859025429⟩,⟨2674032669301822737640894318826880857207750642543187296774305,2674032669301822737643891113114511402137449747958369978609750⟩⟩, + ⟨⟨-521274855427723599539714844739296128565710425452118019152543,-521274855427723599538894078311201170069719316019486331296288⟩,⟨-4681583126072692309450967750552544940923253266424944598893666,-4681583126072692309449277318685633875048860151084159056220867⟩⟩] +lemma spectrum0_1_25_calc (r : Fin 8) : spectrumBox 0 1 25 r = spectrum0_1_25 r := by + revert r + decide +kernel +def spectrum0_1_26 : Fin 8 → CI := ![⟨⟨200915393444517405510309038302718193655173982901627235666312,200915393444517405510500092493272143339525081434771750848085⟩,⟨-546582146888567945099981601699219446204759199157876685102058,-546582146888567945099818616701339149378945027157286117077864⟩⟩, + ⟨⟨-19610280759906484080139780644410931700345387633987562845233,-19610280759906484080002381029998137124987765359687050621347⟩,⟨6347646370066638999363107158170203759671564612950242894522,6347646370066638999480320372907237529032207136916532989913⟩⟩, + ⟨⟨-6966957295663604008142022924568783986895778989622387375779508,-6966957295663604008139145133974773474441651916740485596304428⟩,⟨6270401177680461022384526748333425692962306054988047628425159,6270401177680461022386981741299061202865076813349230121823959⟩⟩, + ⟨⟨5080993311103774393360481548813268572166886249285657496546130,5080993311103774393361546404728063580004403498354425162731173⟩,⟨-5000014536454653838097103126646353513517779480412388261634033,-5000014536454653838096194716637062993818819986512747108821867⟩⟩, + ⟨⟨7552574489307003249168967068145632054069642307961907738135081,7552574489307003249172017224275595621931678270140333043630080⟩,⟨-7248019233314567532361272323548160892398643244105679873546991,-7248019233314567532358670288549942140136956496657370472150887⟩⟩, + ⟨⟨5637713152198721122099801517250300458436916166276542990630173,5637713152198721122101110621695880770244715708188619569709177⟩,⟨-5339982444869276710636137026894138681214575528102907269675733,-5339982444869276710635020252723049107480452490228125081771919⟩⟩, + ⟨⟨-1285582468400301885493709105410151842333439182890546279847954,-1285582468400301885491407670762836182696315112202380271011582⟩,⟨388355294534041211455489474701235691953371456755941222732080,388355294534041211457452788460678024150157175753014421240287⟩⟩, + ⟨⟨3241173824477876289309117265512003864644130669132172984342379,3241173824477876289310415458879334503700023748048934151515577⟩,⟨-1970769227790932458516316103819184741015262000697943419473430,-1970769227790932458515208637698661661034769079049837410997588⟩⟩] +lemma spectrum0_1_26_calc (r : Fin 8) : spectrumBox 0 1 26 r = spectrum0_1_26 r := by + revert r + decide +kernel +def spectrum0_1_27 : Fin 8 → CI := ![⟨⟨234002888659227778950301052964325400829643425817162679173378,234002888659227778950452638843419236439487077080765651161265⟩,⟨-175093745469279806078808510551452908206475408145113670028098,-175093745469279806078692428446681928722907044694541109226320⟩⟩, + ⟨⟨-13584697182550975050748817691284554978785936017776373792424,-13584697182550975050639802331417071001210020639954211504601⟩,⟨-2472769251503259230685541097365980736508100944548109791326,-2472769251503259230602058833046234094726156669293453057435⟩⟩, + ⟨⟨-5876969621447256354160707038484771101996400111313568119951660,-5876969621447256354158423746944383327523892376716890389433973⟩,⟨2057667525666036000074685537390700561491491050658244583838666,2057667525666036000076434046482708376996273561967012483410419⟩⟩, + ⟨⟨4374369950990193972062662425830979532061183564635042917747886,4374369950990193972063507301933887940322979738050997363151094⟩,⟨-1455012894808239936000312492455513475717154916348962018436371,-1455012894808239935999665499497565623341515603969685149042002⟩⟩, + ⟨⟨6423706742050055326358796231467530702159787840258967851203542,6423706742050055326361216280967686004631783508323974652823054⟩,⟨-2174033465007030916493069861318739389453011036894866198559355,-2174033465007030916491216625111568630899913292964347158443422⟩⟩, + ⟨⟨4817397515590667341656452758549668039108347468041466714226854,4817397515590667341657491425891393155639418067332313988080765⟩,⟨-1877133089621326917654958114742035321400537578961805339680588,-1877133089621326917654162719472306121613760580003464167569590⟩⟩, + ⟨⟨-2405405912652682260369088824941697791213074752181625698435101,-2405405912652682260367262824720679491629113946722067734393099⟩,⟨1090205685266448604083469604618540322625554320967647524672634,1090205685266448604084867927141932268927610041100810276237550⟩⟩, + ⟨⟨3671072936153388689866670749003642288967725014311348858477650,3671072936153388689867700759296781099612050957350439532214978⟩,⟨-1763388699021709628436976236288995884702067815147409018235936,-1763388699021709628436187470452247562294441201708468553386034⟩⟩] +lemma spectrum0_1_27_calc (r : Fin 8) : spectrumBox 0 1 27 r = spectrum0_1_27 r := by + revert r + decide +kernel +def spectrum0_1_28 : Fin 8 → CI := ![⟨⟨211796745235665631520274897858947569051641775312936638952971,211796745235665631520387634625677401910814246003678965209319⟩,⟨-155268491834500286567622755369526104753468815613271348028352,-155268491834500286567538531360320769580503432804138607222112⟩⟩, + ⟨⟨-14717941590377798392777390360596292467105533336419342187243,-14717941590377798392696313948548629085240446738687448288038⟩,⟨9031170888878324138112079120934482873602757314948873788519,9031170888878324138172650136694325332730246528660629854372⟩⟩, + ⟨⟨-3495777027309416730887015474681921083542418558743332240723590,-3495777027309416730885317355389278407238593663686647696973956⟩,⟨-1978817497537043807449457796430253498649361125514726691522154,-1978817497537043807448189156047102390015466542316930774197190⟩⟩, + ⟨⟨2769503838192917500670276786442466286294994801553222890938166,2769503838192917500670905133889584969508440553933645512936375⟩,⟨1053429723340931256247305462335676340738561247259935907184669,1053429723340931256247774891632878407821198142407734319580215⟩⟩, + ⟨⟨3971267330366447988114745151918781774952661755693939268990534,3971267330366447988116544980225060638234987871483021717629562⟩,⟨1848789759840926779538071119895875821763342706702868749943495,1848789759840926779539415745613337918082311896201575430873519⟩⟩, + ⟨⟨2901276891182847407473149274769378653004111129997657894789570,2901276891182847407473921747763344772748738849447317388717150⟩,⟨1325417207288345940664051376027021132450020687084625174667397,1325417207288345940664628479437510705417409889004620205598021⟩⟩, + ⟨⟨-1500886908849549565557075635610249583574544980135372053659068,-1500886908849549565555717610956751687680124986301042476896804⟩,⟨-898038615921140931762276095783271442203537676010996671202054,-898038615921140931761261535190246840632002692516608188826380⟩⟩, + ⟨⟨2067409729210356722181134994387928545184486801726247023435525,2067409729210356722181901029000341667256569074632445219076984⟩,⟨1089609888105447821576522856296354616443031479714085135852483,1089609888105447821577095149684901207978252973291433843569383⟩⟩] +lemma spectrum0_1_28_calc (r : Fin 8) : spectrumBox 0 1 28 r = spectrum0_1_28 r := by + revert r + decide +kernel +def spectrum0_1_29 : Fin 8 → CI := ![⟨⟨175784070115171472448397828398788227820772064570193869196178,175784070115171472448446491573827576350782148982437679184441⟩,⟨54827091887488130817573901541167627478606154312955709900953,54827091887488130817652473393378635007749354440190224982235⟩⟩, + ⟨⟨-16438405920132389176186429335642540230577426599649308631544,-16438405920132389176151432450936786025471151253559569839874⟩,⟨4681435949110001861837934802476683621470246037170708110158,4681435949110001861894440980954468419350830610030117783838⟩⟩, + ⟨⟨-1530525460273105559997151630500286918205052742289394959408895,-1530525460273105559996418632040098135283064471620925605561486⟩,⟨-1940388216991388540456914682853103830405476460705116070132649,-1940388216991388540455731179174505950573229878649197875094075⟩⟩, + ⟨⟨1424642616647785580255409616830077328193074205225199893066263,1424642616647785580255680844955048761864811770192545380209255⟩,⟨1461850412388894205788030791652176092379248575482172770635776,1461850412388894205788468718197617368498680743573951693025534⟩⟩, + ⟨⟨1939510938443144973137448471731253310267722942147179699512058,1939510938443144973138225373203560094082645557508286312968726⟩,⟨2191914978753893835317769563375528129224604022910956910845458,2191914978753893835319023953118302150672985712631490000903474⟩⟩, + ⟨⟨1300561047376475003996466408289694673337942382341854514636688,1300561047376475003996799848654870107796833648666336890048096⟩,⟨1467815704347711713303795797877081227280220220941160100267639,1467815704347711713304334172675425431977806505990087792472711⟩⟩, + ⟨⟨165406957820282120755619202030823842784612600671714096264778,165406957820282120756205397583897932336846506519297406250383⟩,⟨630465793626531090695023719787848442230730562510909295157958,630465793626531090695970194619274929485607967334508028280592⟩⟩, + ⟨⟨162655532868168040558595931518846878478683870311511113860898,162655532868168040558926592735127893897470177439158986609289⟩,⟨-56029397631397229738334271973743080874080633515989714780898,-56029397631397229737800384404679890594428273124584458485554⟩⟩] +lemma spectrum0_1_29_calc (r : Fin 8) : spectrumBox 0 1 29 r = spectrum0_1_29 r := by + revert r + decide +kernel +def spectrum0_1_30 : Fin 8 → CI := ![⟨⟨-180912103801739583630565428857,180912103801739583630653628515⟩,⟨-4504715250712225316682955371603988023091216994491694209929,-4504715250712225316640431646003338029436426750982445587613⟩⟩, + ⟨⟨-67186482669050007672194104541,67186482669050007671918889089⟩,⟨13976779762617292782368234428360168382514009390665781003544,13976779762617292782398816031726148094745312661719351024386⟩⟩, + ⟨⟨-3440792860515779088676681597429,3440792860515779088738940723259⟩,⟨-3159886163659775218181290419438661330625589637929449789912246,-3159886163659775218180649897618784328756784503315279454724551⟩⟩, + ⟨⟨-1853939171254400325347869193752,1853939171254400325307888311701⟩,⟨2029179372690173347898285172646688012979112008148056493469497,2029179372690173347898522182057034674936144967108644929029277⟩⟩, + ⟨⟨-5422625683819824842182223263679,5422625683819824842119016991423⟩,⟨3207888371995761663060309144046941453670536443769315489984109,3207888371995761663060988029984488647334769790387166152544495⟩⟩, + ⟨⟨-3801831295278164957688617864181,3801831295278164957640501241057⟩,⟨2442070136077936908332305794243201201628493564180210012060861,2442070136077936908332597167068065437968480067572592205453296⟩⟩, + ⟨⟨-523971377850432182917947498241,523971377850432182945687912017⟩,⟨-1407864533746251428345604665380560185337655031886639808146326,-1407864533746251428345092425504977865463416261821721332195282⟩⟩, + ⟨⟨-804987237726268245774588614659,804987237726268245734860736808⟩,⟨2016327176059601572843103495429776396930115267058358108887668,2016327176059601572843392439724622678512470913635476353037191⟩⟩] +lemma spectrum0_1_30_calc (r : Fin 8) : spectrumBox 0 1 30 r = spectrum0_1_30 r := by + revert r + decide +kernel +def spectrum0_1 : Fin 31 → Fin 8 → CI := ![spectrum0_1_0,spectrum0_1_1,spectrum0_1_2,spectrum0_1_3,spectrum0_1_4,spectrum0_1_5,spectrum0_1_6,spectrum0_1_7,spectrum0_1_8,spectrum0_1_9,spectrum0_1_10,spectrum0_1_11,spectrum0_1_12,spectrum0_1_13,spectrum0_1_14,spectrum0_1_15,spectrum0_1_16,spectrum0_1_17,spectrum0_1_18,spectrum0_1_19,spectrum0_1_20,spectrum0_1_21,spectrum0_1_22,spectrum0_1_23,spectrum0_1_24,spectrum0_1_25,spectrum0_1_26,spectrum0_1_27,spectrum0_1_28,spectrum0_1_29,spectrum0_1_30] +lemma spectrum0_1_mem (j : Fin 31) (r : Fin 8) : (spectrum0_1 j r).Mem (finiteSpectrum 0 1 j r) := by + have he : spectrumBox 0 1 j r = spectrum0_1 j r := by + fin_cases j + · exact spectrum0_1_0_calc r + · exact spectrum0_1_1_calc r + · exact spectrum0_1_2_calc r + · exact spectrum0_1_3_calc r + · exact spectrum0_1_4_calc r + · exact spectrum0_1_5_calc r + · exact spectrum0_1_6_calc r + · exact spectrum0_1_7_calc r + · exact spectrum0_1_8_calc r + · exact spectrum0_1_9_calc r + · exact spectrum0_1_10_calc r + · exact spectrum0_1_11_calc r + · exact spectrum0_1_12_calc r + · exact spectrum0_1_13_calc r + · exact spectrum0_1_14_calc r + · exact spectrum0_1_15_calc r + · exact spectrum0_1_16_calc r + · exact spectrum0_1_17_calc r + · exact spectrum0_1_18_calc r + · exact spectrum0_1_19_calc r + · exact spectrum0_1_20_calc r + · exact spectrum0_1_21_calc r + · exact spectrum0_1_22_calc r + · exact spectrum0_1_23_calc r + · exact spectrum0_1_24_calc r + · exact spectrum0_1_25_calc r + · exact spectrum0_1_26_calc r + · exact spectrum0_1_27_calc r + · exact spectrum0_1_28_calc r + · exact spectrum0_1_29_calc r + · exact spectrum0_1_30_calc r + rw [← he] + exact spectrumBox_mem 0 1 j r +def spectrum1_0_0 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000000002146009126,-5999999999999999999999999999999999999999999999997853991065⟩,⟨-2086967823,2205187761⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_0_calc (r : Fin 8) : spectrumBox 1 0 0 r = spectrum1_0_0 r := by + revert r + decide +kernel +def spectrum1_0_1 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999999961908489046,6000000000000000000000000000000000000000000000037810159128⟩,⟨-10392304845413263761164678049035234201656831522900318376994,-10392304845413263761164678049035234201656831522824412270801⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_1_calc (r : Fin 8) : spectrumBox 1 0 1 r = spectrum1_0_1 r := by + revert r + decide +kernel +def spectrum1_0_2 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨2999999999999999999999999999999999999999999999625679727944,3000000000000000000000000000000000000000000000374553514306⟩,⟨5196152422706631880582339024517617100828415761056622442593,5196152422706631880582339024517617100828415761805452362850⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_2_calc (r : Fin 8) : spectrumBox 1 0 2 r = spectrum1_0_2 r := by + revert r + decide +kernel +def spectrum1_0_3 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999997441540697833,6000000000000000000000000000000000000000000002558420629322⟩,⟨-10392304845413263761164678049035234201656831525420807999615,-10392304845413263761164678049035234201656831520303797766406⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_3_calc (r : Fin 8) : spectrumBox 1 0 3 r = spectrum1_0_3 r := by + revert r + decide +kernel +def spectrum1_0_4 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨17999999999999999999999999999999999999999999986746774200663,18000000000000000000000000000000000000000000013253593658219⟩,⟨10392304845413263761164678049035234201656831509608728236064,10392304845413263761164678049035234201656831536115559907571⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_4_calc (r : Fin 8) : spectrumBox 1 0 4 r = spectrum1_0_4 r := by + revert r + decide +kernel +def spectrum1_0_5 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-54745563548681,54746105837475⟩,⟨20784609690826527522329356098070468403313662990979773969774,20784609690826527522329356098070468403313663100469667573171⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_5_calc (r : Fin 8) : spectrumBox 1 0 5 r = spectrum1_0_5 r := by + revert r + decide +kernel +def spectrum1_0_6 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-9000000000000000000000000000000000000000000186275219361561,-8999999999999999999999999999999999999999999813724760430433⟩,⟨5196152422706631880582339024517617100828415575151448632789,5196152422706631880582339024517617100828415947711471005678⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_6_calc (r : Fin 8) : spectrumBox 1 0 6 r = spectrum1_0_6 r := by + revert r + decide +kernel +def spectrum1_0_7 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-534197979660710,534197834909498⟩,⟨20784609690826527522329356098070468403313662511541651227877,20784609690826527522329356098070468403313663579907794615481⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_7_calc (r : Fin 8) : spectrumBox 1 0 7 r = spectrum1_0_7 r := by + revert r + decide +kernel +def spectrum1_0_8 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-36000000000000000000000000000000000000000001312596373313084,-35999999999999999999999999999999999999999998687403935545078⟩,⟨10392304845413263761164678049035234201656830210237071593751,10392304845413263761164678049035234201656832835488117107262⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_8_calc (r : Fin 8) : spectrumBox 1 0 8 r = spectrum1_0_8 r := by + revert r + decide +kernel +def spectrum1_0_9 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-12000000000000000000000000000000000000000002798253780339153,-11999999999999999999999999999999999999999997201747197517630⟩,⟨-20784609690826527522329356098070468403313665843915866176935,-20784609690826527522329356098070468403313660247533141642081⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_9_calc (r : Fin 8) : spectrumBox 1 0 9 r = spectrum1_0_9 r := by + revert r + decide +kernel +def spectrum1_0_10 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-15000000000000000000000000000000000000000005225191848771614,-14999999999999999999999999999999999999999994774808712732303⟩,⟨5196152422706631880582339024517617100828410536019079278899,5196152422706631880582339024517617100828420986842720449853⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_10_calc (r : Fin 8) : spectrumBox 1 0 10 r = spectrum1_0_10 r := by + revert r + decide +kernel +def spectrum1_0_11 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-30000000000000000000000000000000000000000008614800270245282,-29999999999999999999999999999999999999999991385200202131323⟩,⟨-31176914536239791283494034147105702604970503182753085662504,-31176914536239791283494034147105702604970485954421087909255⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_11_calc (r : Fin 8) : spectrumBox 1 0 11 r = spectrum1_0_11 r := by + revert r + decide +kernel +def spectrum1_0_12 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨11999999999999999999999999999999999999999987380716808208223,12000000000000000000000000000000000000000012619282927559423⟩,⟨-41569219381653055044658712196140936806627338711862485085565,-41569219381653055044658712196140936806627313471036717349939⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_12_calc (r : Fin 8) : spectrumBox 1 0 12 r = spectrum1_0_12 r := by + revert r + decide +kernel +def spectrum1_0_13 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨17999999999999999999999999999999999999999983485339740850969,18000000000000000000000000000000000000000016514660712758238⟩,⟨-10392304845413263761164678049035234201656848036123694176530,-10392304845413263761164678049035234201656815009601928574198⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_13_calc (r : Fin 8) : spectrumBox 1 0 13 r = spectrum1_0_13 r := by + revert r + decide +kernel +def spectrum1_0_14 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨8999999999999999999999999999999999999999980624532769057835,9000000000000000000000000000000000000000019375468270849152⟩,⟨-36373066958946423164076373171623319705798929707026622868194,-36373066958946423164076373171623319705798890953009778675089⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_14_calc (r : Fin 8) : spectrumBox 1 0 14 r = spectrum1_0_14 r := by + revert r + decide +kernel +def spectrum1_0_15 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨71999999999999999999999999999999999999999979567718024983651,72000000000000000000000000000000000000000020432282759993990⟩,⟨-20430655142808407,20430655142808675⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_15_calc (r : Fin 8) : spectrumBox 1 0 15 r = spectrum1_0_15 r := by + revert r + decide +kernel +def spectrum1_0_16 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨8999999999999999999999999999999999999999980624532760868693,9000000000000000000000000000000000000000019375468279038274⟩,⟨36373066958946423164076373171623319705798890953009770486276,36373066958946423164076373171623319705798929707026631057560⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_16_calc (r : Fin 8) : spectrumBox 1 0 16 r = spectrum1_0_16 r := by + revert r + decide +kernel +def spectrum1_0_17 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨17999999999999999999999999999999999999999983485339725285517,18000000000000000000000000000000000000000016514660728323690⟩,⟨10392304845413263761164678049035234201656815009601913008992,10392304845413263761164678049035234201656848036123709742304⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_17_calc (r : Fin 8) : spectrumBox 1 0 17 r = spectrum1_0_17 r := by + revert r + decide +kernel +def spectrum1_0_18 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨11999999999999999999999999999999999999999987380716786663501,12000000000000000000000000000000000000000012619282949104162⟩,⟨41569219381653055044658712196140936806627313471036695805495,41569219381653055044658712196140936806627338711862506630560⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_18_calc (r : Fin 8) : spectrumBox 1 0 18 r = spectrum1_0_18 r := by + revert r + decide +kernel +def spectrum1_0_19 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-30000000000000000000000000000000000000000008614800296143357,-29999999999999999999999999999999999999999991385200176233225⟩,⟨31176914536239791283494034147105702604970485954421062011444,31176914536239791283494034147105702604970503182753111560856⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_19_calc (r : Fin 8) : spectrumBox 1 0 19 r = spectrum1_0_19 r := by + revert r + decide +kernel +def spectrum1_0_20 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-15000000000000000000000000000000000000000005225191877508215,-14999999999999999999999999999999999999999994774808683995652⟩,⟨-5196152422706631880582339024517617100828420986842749186222,-5196152422706631880582339024517617100828410536019050541998⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_20_calc (r : Fin 8) : spectrumBox 1 0 20 r = spectrum1_0_20 r := by + revert r + decide +kernel +def spectrum1_0_21 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-12000000000000000000000000000000000000000002798253810726483,-11999999999999999999999999999999999999999997201747167130217⟩,⟨20784609690826527522329356098070468403313660247533111254961,20784609690826527522329356098070468403313665843915896564549⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_21_calc (r : Fin 8) : spectrumBox 1 0 21 r = spectrum1_0_21 r := by + revert r + decide +kernel +def spectrum1_0_22 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-36000000000000000000000000000000000000000001312596404551949,-35999999999999999999999999999999999999999998687403904306125⟩,⟨-10392304845413263761164678049035234201656832835488148345952,-10392304845413263761164678049035234201656830210237040354624⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_22_calc (r : Fin 8) : spectrumBox 1 0 22 r = spectrum1_0_22 r := by + revert r + decide +kernel +def spectrum1_0_23 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-534198011286491,534197866535340⟩,⟨-20784609690826527522329356098070468403313663579907826241098,-20784609690826527522329356098070468403313662511541619601867⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_23_calc (r : Fin 8) : spectrumBox 1 0 23 r = spectrum1_0_23 r := by + revert r + decide +kernel +def spectrum1_0_24 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-9000000000000000000000000000000000000000000186275251140793,-8999999999999999999999999999999999999999999813724728651177⟩,⟨-5196152422706631880582339024517617100828415947711502784731,-5196152422706631880582339024517617100828415575151416853357⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_24_calc (r : Fin 8) : spectrumBox 1 0 24 r = spectrum1_0_24 r := by + revert r + decide +kernel +def spectrum1_0_25 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-54745595380402,54746137669196⟩,⟨-20784609690826527522329356098070468403313663100469699404697,-20784609690826527522329356098070468403313662990979742137858⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_25_calc (r : Fin 8) : spectrumBox 1 0 25 r = spectrum1_0_25 r := by + revert r + decide +kernel +def spectrum1_0_26 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨17999999999999999999999999999999999999999999986746742353700,18000000000000000000000000000000000000000000013253625505178⟩,⟨-10392304845413263761164678049035234201656831536115591754329,-10392304845413263761164678049035234201656831509608696388902⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_26_calc (r : Fin 8) : spectrumBox 1 0 26 r = spectrum1_0_26 r := by + revert r + decide +kernel +def spectrum1_0_27 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999997441508847194,6000000000000000000000000000000000000000000002558452479958⟩,⟨10392304845413263761164678049035234201656831520303765915973,10392304845413263761164678049035234201656831525420839850457⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_27_calc (r : Fin 8) : spectrumBox 1 0 27 r = spectrum1_0_27 r := by + revert r + decide +kernel +def spectrum1_0_28 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨2999999999999999999999999999999999999999999999625647876593,3000000000000000000000000000000000000000000000374585365656⟩,⟨-5196152422706631880582339024517617100828415761805484213995,-5196152422706631880582339024517617100828415761056590591037⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_28_calc (r : Fin 8) : spectrumBox 1 0 28 r = spectrum1_0_28 r := by + revert r + decide +kernel +def spectrum1_0_29 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨5999999999999999999999999999999999999999999999961876637589,6000000000000000000000000000000000000000000000037842010585⟩,⟨10392304845413263761164678049035234201656831522824380419549,10392304845413263761164678049035234201656831522900350228656⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_29_calc (r : Fin 8) : spectrumBox 1 0 29 r = spectrum1_0_29 r := by + revert r + decide +kernel +def spectrum1_0_30 : Fin 8 → CI := ![⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-6000000000000000000000000000000000000000000000002177860593,-5999999999999999999999999999999999999999999999997822139598⟩,⟨-2237039024,2118819496⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩, + ⟨⟨-1,1⟩,⟨0,2⟩⟩] +lemma spectrum1_0_30_calc (r : Fin 8) : spectrumBox 1 0 30 r = spectrum1_0_30 r := by + revert r + decide +kernel +def spectrum1_0 : Fin 31 → Fin 8 → CI := ![spectrum1_0_0,spectrum1_0_1,spectrum1_0_2,spectrum1_0_3,spectrum1_0_4,spectrum1_0_5,spectrum1_0_6,spectrum1_0_7,spectrum1_0_8,spectrum1_0_9,spectrum1_0_10,spectrum1_0_11,spectrum1_0_12,spectrum1_0_13,spectrum1_0_14,spectrum1_0_15,spectrum1_0_16,spectrum1_0_17,spectrum1_0_18,spectrum1_0_19,spectrum1_0_20,spectrum1_0_21,spectrum1_0_22,spectrum1_0_23,spectrum1_0_24,spectrum1_0_25,spectrum1_0_26,spectrum1_0_27,spectrum1_0_28,spectrum1_0_29,spectrum1_0_30] +lemma spectrum1_0_mem (j : Fin 31) (r : Fin 8) : (spectrum1_0 j r).Mem (finiteSpectrum 1 0 j r) := by + have he : spectrumBox 1 0 j r = spectrum1_0 j r := by + fin_cases j + · exact spectrum1_0_0_calc r + · exact spectrum1_0_1_calc r + · exact spectrum1_0_2_calc r + · exact spectrum1_0_3_calc r + · exact spectrum1_0_4_calc r + · exact spectrum1_0_5_calc r + · exact spectrum1_0_6_calc r + · exact spectrum1_0_7_calc r + · exact spectrum1_0_8_calc r + · exact spectrum1_0_9_calc r + · exact spectrum1_0_10_calc r + · exact spectrum1_0_11_calc r + · exact spectrum1_0_12_calc r + · exact spectrum1_0_13_calc r + · exact spectrum1_0_14_calc r + · exact spectrum1_0_15_calc r + · exact spectrum1_0_16_calc r + · exact spectrum1_0_17_calc r + · exact spectrum1_0_18_calc r + · exact spectrum1_0_19_calc r + · exact spectrum1_0_20_calc r + · exact spectrum1_0_21_calc r + · exact spectrum1_0_22_calc r + · exact spectrum1_0_23_calc r + · exact spectrum1_0_24_calc r + · exact spectrum1_0_25_calc r + · exact spectrum1_0_26_calc r + · exact spectrum1_0_27_calc r + · exact spectrum1_0_28_calc r + · exact spectrum1_0_29_calc r + · exact spectrum1_0_30_calc r + rw [← he] + exact spectrumBox_mem 1 0 j r +def spectrum1_1_0 : Fin 8 → CI := ![⟨⟨-201049105058,195137959715⟩,⟨-300007537041099982862319723749749180396093497562090968419734,-300007537041099982862277200024510354610031953181680041867784⟩⟩, + ⟨⟨-76729371718,79159937234⟩,⟨123358154115039224715231595255000753086053831918878649270306,123358154115039224715262176858232359832958315474046336686255⟩⟩, + ⟨⟨-1664673028539,1613520386285⟩,⟨-2596142937934953541627497362412204474505836572178809538880973,-2596142937934953541626856840599209058357972091549078428232721⟩⟩, + ⟨⟨-856657247688,882493241437⟩,⟨1311250598135368001680654443474387858876566072890928824099150,1311250598135368001680891452881026642491136568796829847364131⟩⟩, + ⟨⟨-1495949715703,1542145605505⟩,⟨2344573571052684606661236874092638050404520228137211792435976,2344573571052684606661915760019339992701196396610598303779908⟩⟩, + ⟨⟨-1002428250651,1032585428719⟩,⟨1530563064925570443765778806398822623728998417212141710240771,1530563064925570443766070179216083197478482641590409801928193⟩⟩, + ⟨⟨-441163031630,431528531011⟩,⟨-488978469366859832749739343781515052502033101632924451447608,-488978469366859832749227103906980675383477530072306238500149⟩⟩, + ⟨⟨-664204702776,681490291333⟩,⟨877293072660214840014017119440408888183345590118431769578703,877293072660214840014306063733645195290280592359103319989793⟩⟩] +lemma spectrum1_1_0_calc (r : Fin 8) : spectrumBox 1 1 0 r = spectrum1_1_0 r := by + revert r + decide +kernel +def spectrum1_1_1 : Fin 8 → CI := ![⟨⟨374738763434243690543864951260256014703856877588165647304804,374738763434243690543913614435187512816605934898502558362903⟩,⟨-281520642954547069549600949251084598691275176773223172324347,-281520642954547069549522377398981441579397242627485730976710⟩⟩, + ⟨⟨-169715317780452812259217538545059894796305711994378051770745,-169715317780452812259182541660394038619989103103204524398957⟩,⟨132077220157363046439737564190234079053755630864480082297294,132077220157363046439794070368671965822841936229212644173998⟩⟩, + ⟨⟨2129647469388028956755154838034805626423330573028533773670101,2129647469388028956755887836492917593901071058415107658937978⟩,⟨-1987989729860655626739437417593200477086381823366742514814460,-1987989729860655626738253913916679412698420681724654304769502⟩⟩, + ⟨⟨-875337876435783158622053843241662455225752796805190175109281,-875337876435783158621782615117811653648845463491079061706501⟩,⟨924318401636995427185248954673548079019846339234923226671135,924318401636995427185686881217868723044429081302358393559191⟩⟩, + ⟨⟨-1745104303327399336947505117851952325200867516798522648607689,-1745104303327399336946728216382852787953178656448299035216465⟩,⟨1724113135300978656950913123291657980388454080616269087899105,1724113135300978656952167513031224755269567853039348138857250⟩⟩, + ⟨⟨-1052207616398103521349642084355222623718367871558495549940331,-1052207616398103521349308643992295796957372138322383754381723⟩,⟨1097123861653899847155435017633090352983982441414171818895332,1097123861653899847155973392429185949983650803924616995971972⟩⟩, + ⟨⟨395009038228787308848106902083747421178067595240834021176498,395009038228787308848693097636497243199199720471674965692099⟩,⟨-384799102719511564269178023205945747926612944953008310497004,-384799102719511564268231548374843528202844770822255455046746⟩⟩, + ⟨⟨-649153566262329627446738633797218822585555892816001001698924,-649153566262329627446407972581432903668175172857595788938953⟩,⟨660216835969597767378961265028653163073756946817330448781485,660216835969597767379495152597221256851990244219471765273351⟩⟩] +lemma spectrum1_1_1_calc (r : Fin 8) : spectrumBox 1 1 1 r = spectrum1_1_1 r := by + revert r + decide +kernel +def spectrum1_1_2 : Fin 8 → CI := ![⟨⟨610769456818511257981380767756906427501960182002887198267201,610769456818511257981493504523604092127043049680925888270875⟩,⟨-45329495939451901389751906080711826514358180331854338262803,-45329495939451901389667682071538659575480644530871792602534⟩⟩, + ⟨⟨-274259852319614436603393538967525456024950983954572804564734,-274259852319614436603312462555489644345085407650104952923912⟩,⟨6815817751890666662033081447730526898761599274330552361062,6815817751890666662093652463478517655891513788063601912855⟩⟩, + ⟨⟨3915297341549197673705883457432450298199258655602565174103813,3915297341549197673707581576724466101732845160041152838942049⟩,⟨-1122009591126542380061757616639571573696370473437141534834146,-1122009591126542380060488976257047337832698682319209108713479⟩⟩, + ⟨⟨-1734347654351346403454803546274379966221329193807268278209425,-1734347654351346403454175198827600012188419933999459627515301⟩,⟨703227195768122760191652473712718247493858349189180413037968,703227195768122760192121903009581585395966702924979981910899⟩⟩, + ⟨⟨-3319279672228546530264965324223147938430251049628846480583756,-3319279672228546530263165495917817694991439500600611902824005⟩,⟨1133802942220011760582545249947604406906097837669492028256555,1133802942220011760583889875664117883381566611892618918883619⟩⟩, + ⟨⟨-2056861800518150253481236200384603308115050066014807401631261,-2056861800518150253480463727391302272015813818226264302872761⟩,⟨810365995647102576226167659321902574079687051958009094902935,810365995647102576226744762731727063401694056928500166733488⟩⟩, + ⟨⟨722551822388097985756820146723537702781728995545327183745573,722551822388097985758178171376935112506936149484602394652150⟩,⟨-239539157870097022490447202528713598386968603971491558009640,-239539157870097022489432641935789482984643282517009385009506⟩⟩, + ⟨⟨-1227578061557397542231855843039720342270412735969176494570591,-1227578061557397542231089808427459672947302387898814419873595⟩,⟨457684703480514746740738630233874536579878674519074762542010,457684703480514746741310923622268675366134009317581286988182⟩⟩] +lemma spectrum1_1_2_calc (r : Fin 8) : spectrumBox 1 1 2 r = spectrum1_1_2 r := by + revert r + decide +kernel +def spectrum1_1_3 : Fin 8 → CI := ![⟨⟨881342555083844747226358086270369755456749906971966102276407,881342555083844747226509672149453989335929899408244029989596⟩,⟨320708795051927003847906307087934632423118628585281243341073,320708795051927003848022389192696010176022605772876420749661⟩⟩, + ⟨⟨-398745194796486370820440303605305472789678166994065205863306,-398745194796486370820331288245441511070681372635927215322553⟩,⟨-125688988339817649321615365209653976464315124761324407344150,-125688988339817649321531882945337752081113093067665046264553⟩⟩, + ⟨⟨6028949102974722996382090437975507801951374745701942738869283,6028949102974722996384373729515706326889126814362429957553316⟩,⟨2104354648235118788691481914453289159929079352685308089059627,2104354648235118788693230423545107725899099736209938518948436⟩⟩, + ⟨⟨-2767377372131750242359751212170527061901227767928789703237345,-2767377372131750242358906336067721052501728765457803035406660⟩,⟨-930426260907210817281220231939807973302112544143254297083706,-930426260907210817280573238981962519788773696547196061352854⟩⟩, + ⟨⟨-5196596912633958276107536898746123307821261379624884382261808,-5196596912633958276105116849246248626921197580157974799210940⟩,⟨-1784467111050792305216075000921279803733331895425525748328951,-1784467111050792305214221764714389666752171882529075809351204⟩⟩, + ⟨⟨-3262670436844163007463065836145653583291658941113947767849505,-3262670436844163007462027168804125216191922423177363610545523⟩,⟨-1088319606955219245509902025328726747741239508549102575433740,-1088319606955219245509106630059194297385800433079087414244600⟩⟩, + ⟨⟨1113454047901201977975562099827342189630187667114274787194780,1113454047901201977977388100048329304113368132288034378640313⟩,⟨350479662462791888933928012031746019945860393949769822644548,350479662462791888935326334555106781147134393777762706258588⟩⟩, + ⟨⟨-1920986747103026637824183173167175625064343564034778203105385,-1920986747103026637823153162874083821646093545728046061185484⟩,⟨-611146362152055248467668173801339890426183800004324596694956,-611146362152055248466879407964638575244635627288950623342122⟩⟩] +lemma spectrum1_1_3_calc (r : Fin 8) : spectrumBox 1 1 3 r = spectrum1_1_3 r := by + revert r + decide +kernel +def spectrum1_1_4 : Fin 8 → CI := ![⟨⟨982903275724842338935495087259939236645789225858351259828162,982903275724842338935686141450490317989016426747315329076267⟩,⟨1169238755472605617964964058190526916478417255534924972622277,1169238755472605617965127043188404344963107831290693421916535⟩⟩, + ⟨⟨-456993473509342721836002163053070154750795506456692968821061,-456993473509342721835864763438658407541316209274300464973053⟩,⟨-518132091476158781580004347416817123710641834766956180533977,-518132091476158781579887134202081137307159185143508154306810⟩⟩, + ⟨⟨6931338970022272756402193573349759296969512594122637900331281,6931338970022272756405071363943712665970280084676687303360295⟩,⟨7271289036907679860775366404639062794321043716946123691675270,7271289036907679860777821397604641160770457570146905428267885⟩⟩, + ⟨⟨-3236873309312794559226562245330182074699465637054801109379911,-3236873309312794559225497389415418026221678373201636851549799⟩,⟨-3139107567091299773994255148375935365962055822181861208224433,-3139107567091299773993346738366675805622824948870010342780502⟩⟩, + ⟨⟨-6022219978838920415998127664932821722144545353722364060495409,-6022219978838920415995077508802941181575969109415307942455825⟩,⟨-6095155711895872874771905163925820415295997711258423882989679,-6095155711895872874769303128927684690327768252898347300158289⟩⟩, + ⟨⟨-3807416279805567598649843628455554770685240409726717453294946,-3807416279805567598648534524010032673034363176858236174707393⟩,⟨-3727877013303557940288630201600314288703846821312209489443360,-3727877013303557940287513427429282929126644500692719076270037⟩⟩, + ⟨⟨1289833958103131907890588231544361421446521816048842975114373,1289833958103131907892889666191667388808952134550283127914787⟩,⟨1307170853990351634329661400547585211495197431649707720057055,1307170853990351634331624714307017851417290014238161858606514⟩⟩, + ⟨⟨-2236799529431563418961176090230274352633312821650628803707651,-2236799529431563418959877896862958227558472674086460856143211⟩,⟨-2211331993147067189552399052354380305795737310983236069180473,-2211331993147067189551291586233871739796296190068919264326201⟩⟩] +lemma spectrum1_1_4_calc (r : Fin 8) : spectrumBox 1 1 4 r = spectrum1_1_4 r := by + revert r + decide +kernel +def spectrum1_1_5 : Fin 8 → CI := ![⟨⟨-100258789061965988396851736976215595244226194980388105335628,-100258789061965988396730945367277924571736154922337321790070⟩,⟨1898897129344444872568106763540169034121683361471811215087976,1898897129344444872568355543190523651984221003640688541220893⟩⟩, + ⟨⟨3543351063614239015348450137303111094274166294769827307717,3543351063614239015435319315332230900214195114051887312983⟩,⟨-841589576277083687644213570391288497999578231746557695232626,-841589576277083687644034656608064765738412950964773593744614⟩⟩, + ⟨⟨-112334728384275445578546940588267998769900339469628688331965,-112334728384275445576727493681468105425611102634389558595229⟩,⟨12347670196749230556508775064471596194247764861114126689248762,12347670196749230556512522355937396890849994922999823455005919⟩⟩, + ⟨⟨-112013542455599722024383529281677773706719010771132550152601,-112013542455599722023710287523095386451272101340244405293643⟩,⟨-5474419987379427613038455854286706697885660936993443890025634,-5474419987379427613037069260873660268594731383263757290592817⟩⟩, + ⟨⟨-43807885932972183135219368022529104609985150187268202809015,-43807885932972183133290945173615655294855625605725921639638⟩,⟨-10477027781839612363464865140080733996184810512792167516425027,-10477027781839612363460893404243221478134666442061420669563685⟩⟩, + ⟨⟨-98028376457683521728883391476065363718467000020448435677643,-98028376457683521728055726656016346317185734058351212809497⟩,⟨-6491428945412776530475455366852125289951309183529082519072825,-6491428945412776530473750727214045286369657027048791858528883⟩⟩, + ⟨⟨-4471236428872158711998653274771970224495518859371114178573,-4471236428872158710543600165959565651139597730863139519454⟩,⟨2257855528948045324436953499636612601357135073538867288609468,2257855528948045324439950293924240129530752656688959366313473⟩⟩, + ⟨⟨-31455375576425158087461645114344306670249127249579120813176,-31455375576425158086640878686253835718840122279983276245523⟩,⟨-3849026277335894865170021483782218624225873811922076640625572,-3849026277335894865168331051915312045896063330659122020061116⟩⟩] +lemma spectrum1_1_5_calc (r : Fin 8) : spectrumBox 1 1 5 r = spectrum1_1_5 r := by + revert r + decide +kernel +def spectrum1_1_6 : Fin 8 → CI := ![⟨⟨-917255226875437833626541019876533292143031688623593392395026,-917255226875437833626326210123447523091230840991749087387472⟩,⟨1664567578016327185567614629347362672524859330210757433102545,1664567578016327185567874820770245324330672930512360079597242⟩⟩, + ⟨⟨358626700392651905591086943288211419578256096629216488185594,358626700392651905591241427087602207267809506853376788152800⟩,⟨-746695020403406035385725004990737466774536530601898635722972,-746695020403406035385537884252510177079897240668884988139698⟩⟩, + ⟨⟨-4908875727423649077818691402528435431496770307743472572552691,-4908875727423649077815455789192048589023012211733144299207747⟩,⟨11205454307137837132015345930188147219093911389088329956626124,11205454307137837132019265113678649310903523928860801900683802⟩⟩, + ⟨⟨1889349200306464511092705444046415070196871518379802807143243,1889349200306464511093902703501769588409976660295884922487511⟩,⟨-5059227339656880029674863021643025530581923057548896493906861,-5059227339656880029673412823796915541646603111429091067416020⟩⟩, + ⟨⟨3915274158827578470396176886462752950236446947689209428723514,3915274158827578470399606297161585567221723462866424374875165⟩,⟨-9589009852006382499369838590174062087496024417228180768568528,-9589009852006382499365684666823002837256557683613323183661286⟩⟩, + ⟨⟨2293647673422431999191211293887891782151435680945158230473216,2293647673422431999192683171588637105030855751302590597521481⟩,⟨-5988505325526285816260481617315672787234483543266266137822605,-5988505325526285816258698784144623707262573535197858515214408⟩⟩, + ⟨⟨-868034325190410780683947356323185531930421454640165598695459,-868034325190410780681359762683366095082155416859453220981775⟩,⟨2061187970815437282842498613045281465107048986833719810970712,2061187970815437282845632873297970721564688643249126321415860⟩⟩, + ⟨⟨1408205001827045309257969132113743804526319920422137658824911,1408205001827045309259428742059416265857706126556340428074530⟩,⟨-3537261145413067212028807322411635496132325530644834221469806,-3537261145413067212027039348736499105148677307798137322747031⟩⟩] +lemma spectrum1_1_6_calc (r : Fin 8) : spectrumBox 1 1 6 r = spectrum1_1_6 r := by + revert r + decide +kernel +def spectrum1_1_7 : Fin 8 → CI := ![⟨⟨-1895669441990686708138117339355351789314475626630641369339756,-1895669441990686708137798749399515693886732273881308377242164⟩,⟨1453486156844116482721850586001806290910337104638597943672682,1453486156844116482722086590701750910437499108457234840171119⟩⟩, + ⟨⟨756878652525225587156780412763527259170129666048321212892050,756878652525225587157009531721667284832352405305439422433093⟩,⟨-691836698887146827750033266008456178060035270151722879527461,-691836698887146827749863539530967101989372409170158293755395⟩⟩, + ⟨⟨-12222397223352564994454214345978817509193202245700585121079703,-12222397223352564994449415523322331446134519520685615323473062⟩,⟨9612095127701566071954279727962122929374992981090420624045395,9612095127701566071957834594273457911136943786730144926568055⟩⟩, + ⟨⟨5368522149092978061979985040237079636496468263367335402014371,5368522149092978061981760727008869019133145735035257691275949⟩,⟨-4306504532661528299293529063308659721380044869616958076668507,-4306504532661528299292213672110365378506775333401313751232345⟩⟩, + ⟨⟨10330584687975400750084894788677706316479103370554535698512977,10330584687975400750089981037264606716128401943023276907488358⟩,⟨-8194880158218847093729841638689990181494762967871796780547799,-8194880158218847093726073853329510295100277583781061194622071⟩⟩, + ⟨⟨6371840939589583055550817795539656838771164348096992331284439,6371840939589583055553000775804474488605164925700033860477284⟩,⟨-5113393018590048480481429788296314039431992307078098678402417,-5113393018590048480479812682694126233716773474234856254855329⟩⟩, + ⟨⟨-2201374589775628895328325594006360740397935168258309447304648,-2201374589775628895324487866288743200299537338132347268743465⟩,⟨1790665507569686261084008386316522964791425428972550940075564,1790665507569686261086851293827805092686403297943641244429918⟩⟩, + ⟨⟨3756827657535154508630068713626149432087641128350562637254781,3756827657535154508632233499262973117139730250289231390492726⟩,⟨-3052666900924237050714223233092977504492077068295333714333330,-3052666900924237050712619605686324930185545957964652225337389⟩⟩] +lemma spectrum1_1_7_calc (r : Fin 8) : spectrumBox 1 1 7 r = spectrum1_1_7 r := by + revert r + decide +kernel +def spectrum1_1_8 : Fin 8 → CI := ![⟨⟨-3020174249937748595527473523849746639877906104258372976616952,-3020174249937748595527141138329272790268119159544153178714120⟩,⟨302818306960011591170042273649301512236005718160374433477989,302818306960011591170277156185322982027599113562934433223963⟩⟩, + ⟨⟨1278416862003104667190058445704287707822490579716225089823551,1278416862003104667190297485958874551179174335268760939017519⟩,⟨-214511689097481658053792410216103748320314299422806912113137,-214511689097481658053623490760381382689213828716400321520217⟩⟩, + ⟨⟨-19102503768474075474842338335600702791906914086156663369787574,-19102503768474075474837331714591098742242870205769847691938336⟩,⟨2382124110388390399936349432291899579784715383582146357379193,2382124110388390399939887395792709446676661906524915448863996⟩⟩, + ⟨⟨8328384779795904096378818309007734077228282079094152269235016,8328384779795904096380670886469854037087419035760178006690096⟩,⟨-1165922395881686046608390416147736992598777499422467087153509,-1165922395881686046607081279420425223321865334632170543893883⟩⟩, + ⟨⟨16086141833242648884227260829632167548305086561666409954534029,16086141833242648884232567322673919404113760707568331485497031⟩,⟨-2117453104592699417706433366406598972166481167869623320739682,-2117453104592699417702683496252056486178535613281194321673581⟩⟩, + ⟨⟨9898084869147692104030186881444051328866676920222049378967898,9898084869147692104032464388999496204514697059905819417242958⟩,⟨-1378516242574701851761996988481175733194285939611588177086344,-1378516242574701851760387571952837407204846938026697495108407⟩⟩, + ⟨⟨-3465855812633595912708841600110766480631626648483083102986204,-3465855812633595912704837691319889583166374184843486530046464⟩,⟨472300064567250303565752454061365192675159199329740620838258,472300064567250303568581844010298940169525394367397838282271⟩⟩, + ⟨⟨5880775167831690646368841984778169243786505545934685916649073,5880775167831690646371100509842845598861895292421010163440600⟩,⟨-824123460285620006499869360263159078530184610845934987930152,-824123460285620006498273357843730665285233194684585329108161⟩⟩] +lemma spectrum1_1_8_calc (r : Fin 8) : spectrumBox 1 1 8 r = spectrum1_1_8 r := by + revert r + decide +kernel +def spectrum1_1_9 : Fin 8 → CI := ![⟨⟨-2752280324203147393362187610545070727698571865105464883349443,-2752280324203147393361873544642928944031820157793267470524606⟩,⟨-1218015508662378419683365167024770790406486076197543899763667,-1218015508662378419683026643380472456404068634017796742546385⟩⟩, + ⟨⟨1162483241378159673040030743734726959116531321272023846483739,1162483241378159673040256609148773829912885488264510565406147⟩,⟨436576364741123908765221443871678188030032993228820058819309,436576364741123908765464898454179985943041886758703912459312⟩⟩, + ⟨⟨-18012777577938788418926639566763484471326983118350689409361117,-18012777577938788418921908888538326908583354851002817655599733⟩,⟨-6497432253434176864365791607201139626887715052616955515231475,-6497432253434176864360692529517564327925570086923207083200055⟩⟩, + ⟨⟨8008354547365483921967761436745464096079861526511571799867361,8008354547365483921969511908339710382648123009079351648056270⟩,⟨2523812645410497507566935911793272681089282143173341590656359,2523812645410497507568822700582771554249154757325542087148779⟩⟩, + ⟨⟨15305341744401463033303730193780548570155218298638398481451798,15305341744401463033308744216419052803508157536277281074639622⟩,⟨5197736610676556372896025535763797779343861126364098142598523,5197736610676556372901430023180628318256108698444965141454146⟩⟩, + ⟨⟨9486937103208298351606743084891546914700506978796600413728821,9486937103208298351608895066313649200314155150805653546819769⟩,⟨3042321617424365612655237354411279609644347615688513774647016,3042321617424365612657556920427534059715380627646805927548289⟩⟩, + ⟨⟨-3272367237341055244331247337758229145300240761634248183871613,-3272367237341055244327464106693568180287446929638968762490461⟩,⟨-1147946253254844135925725763454806902629041825855371278724734,-1147946253254844135921647914957094076562805877842600056465600⟩⟩, + ⟨⟨5597395492104079340277811309223476590061986702843969378472610,5597395492104079340279945354385661131953750741434525673325833⟩,⟨1862386855812236233463746753875853371896227869276719538206215,1862386855812236233466046986853942807695946059323988720204821⟩⟩] +lemma spectrum1_1_9_calc (r : Fin 8) : spectrumBox 1 1 9 r = spectrum1_1_9 r := by + revert r + decide +kernel +def spectrum1_1_10 : Fin 8 → CI := ![⟨⟨-2348242346588787759584129328327753710145829724883726304704636,-2348242346588787759583728761594867723127540183780254183027699⟩,⟨-2117570682918539228587146148993271157868889222799307390837110,-2117570682918539228586793538085293075611645915619157536914318⟩⟩, + ⟨⟨1019487690352507662512617918559246225197842365195074446356314,1019487690352507662512905992400945121544417107016723699708003⟩,⟨778134294472911991363631116363874282499007441916907646366219,778134294472911991363884702022758997616219836055223306569670⟩⟩, + ⟨⟨-15424430881817079326663265596323448423683745481142812345762975,-15424430881817079326657231982651720453930043195783947908228817⟩,⟨-13118135755955011236108486995900536843748777987480068328904030,-13118135755955011236103175726090763290089857520625287625831329⟩⟩, + ⟨⟨6882759521246578606193023904838097051771904774964882685608126,6882759521246578606195256495777563047010085240766934047487164⟩,⟨5639199883670030950149909616358211609721103203242741634332139,5639199883670030950151874921646139288373166585535399301453194⟩⟩, + ⟨⟨13126301540333570240508440297956896778290241027251884124066084,13126301540333570240514835295482019104026201767804444873783822⟩,⟨10976702150837871096522290637790478203404383948996196106303137,10976702150837871096527920026600688749723903267538842264133453⟩⟩, + ⟨⟨8153967720078334710309170194977293494841968260274013974614535,8153967720078334710311914880604113629967103909068985601330141⟩,⟨6697896533291835995041687888686145256357753070738194388412600,6697896533291835995044103980716590793985598175532609620137513⟩⟩, + ⟨⟨-2824198063474697489964230655508321641792811788075430642503046,-2824198063474697489959405437307334385540625008522523624126398⟩,⟨-2342973441261004793692360892173664382738044225410352232385558,-2342973441261004793688113348802341132794549886748757012136250⟩⟩, + ⟨⟨4826703831684758928138584599447366415094092263231196081675551,4826703831684758928141306408763875725716980163584826273645157⟩,⟨3963383973392294270544711719984907295297278272945210581725585,3963383973392294270547107674455521612153020620512731180065857⟩⟩] +lemma spectrum1_1_10_calc (r : Fin 8) : spectrumBox 1 1 10 r = spectrum1_1_10 r := by + revert r + decide +kernel +def spectrum1_1_11 : Fin 8 → CI := ![⟨⟨-1643486711242565711564937185488310237661402370110299146987692,-1643486711242565711564482122940927005150576008956680311448967⟩,⟨-3665722283023287432112871505927354863470227857559031194637580,-3665722283023287432112514211935560411471199804263238738784550⟩⟩, + ⟨⟨771109336501823356736824355251427514199568907025573999270269,771109336501823356737151620611916631276041937827087486949270⟩,⟨1469251996554298736452084068310424790746105350357543781800068,1469251996554298736452341021882407017315379209771135270750877⟩⟩, + ⟨⟨-10823004541489650945317401922388760043765998423721578278595152,-10823004541489650945310547455000515081870801463372654701488062⟩,⟨-22640889523928151405791002775900137976405435530450487022714289,-22640889523928151405785620966237150154630244161870659631408521⟩⟩, + ⟨⟨4856864822826551513236103265459068830504344122660420354420712,4856864822826551513238639593208650806734339945317247285356359⟩,⟨9737126715482856888411612802297116804824878776788923619610361,9737126715482856888413604209129778011896176162549409859694260⟩⟩, + ⟨⟨9231506003239943580517185069855792269791331128454904312640711,9231506003239943580524450086207312252784684213301455520551913⟩,⟨18945893601158449160095049655786392512586898011490367721083081,18945893601158449160100753809440902171173814871521901843744946⟩⟩, + ⟨⟨5757612461012447492921391262965088565253268717239463406058062,5757612461012447492924509354235694449164057239591171375067489⟩,⟨11580320548218416658378441206373779200463475327811851647022750,11580320548218416658380889386922278588863985131449218162551569⟩⟩, + ⟨⟨-2015163760513855805324811549889469876587687608344022388777935,-2015163760513855805319329876285670678453475087372480663767250⟩,⟨-4084708786578616877334999706081727096454112972557500906157840,-4084708786578616877330695750384036424792434748995666606273144⟩⟩, + ⟨⟨3435643057517738181575711879618830138377572159809753526110418,3435643057517738181578803982330751254678191075995789941635689⟩,⟨6894338294271796325399503479958191925727508370085850763013085,6894338294271796325401931255496595756583055448733203399299939⟩⟩] +lemma spectrum1_1_11_calc (r : Fin 8) : spectrumBox 1 1 11 r = spectrum1_1_11 r := by + revert r + decide +kernel +def spectrum1_1_12 : Fin 8 → CI := ![⟨⟨778085461742545528150021556196753773958743588263565361813539,778085461742545528150360273779039094239207252592378315903543⟩,⟨-4395441882523410864036338149973976502421850295582523765761089,-4395441882523410864035770485264613947997719093522051853601588⟩⟩, + ⟨⟨-251939597741208807283131952515567831180534956891245113102083,-251939597741208807282888358459524332093592721518834892935878⟩,⟨1788848409094670820506467314320378078984508516751868315774810,1788848409094670820506875559289811426772491923116502120146722⟩⟩, + ⟨⟨4587124544903085099343522186701902253647352203620273583266223,4587124544903085099348624185613811511302271481653307210419993⟩,⟨-27870713526786078898847085762894445183201598374522159580191353,-27870713526786078898838535203723715776792200362104746907676318⟩⟩, + ⟨⟨-1889416790275349321566264029985435120475505498881875438202057,-1889416790275349321564376160266949847741938494204855413114253⟩,⟨12181145684166351199080428630955688940359462174015967635038190,12181145684166351199083592555921814784473211918857096085932266⟩⟩, + ⟨⟨-3768742564912468336981075485624573146379417047514625885914424,-3768742564912468336975667902012165234194142880926251859483631⟩,⟨23493734435214791552899775563827929890343918968463733405381931,23493734435214791552908838259537376348124957775688478674355871⟩⟩, + ⟨⟨-2263360682055584111924208031446961377790367148978447049099712,-2263360682055584111921887136566471147121261209419351200406884⟩,⟨14456806858742962325597365219792522626536920446649692215656164,14456806858742962325601254861744102020909825004338555927753769⟩⟩, + ⟨⟨804966695557640678243969706270618919096307301419999237908730,804966695557640678248049890941128539479687365027590270429921⟩,⟨-5049723179032797665118753708705766841914599475588118007749213,-5049723179032797665111915631894096193109522231332623009220649⟩⟩, + ⟨⟨-1346317205370748839173923751028789200501257002715598394069281,-1346317205370748839171622200262235402739129153407116344833017⟩,⟨8574190167466537662871224117410779989541192116419473101158061,8574190167466537662875081340109890961844627154690056193441194⟩⟩] +lemma spectrum1_1_12_calc (r : Fin 8) : spectrumBox 1 1 12 r = spectrum1_1_12 r := by + revert r + decide +kernel +def spectrum1_1_13 : Fin 8 → CI := ![⟨⟨2404437245153943215384832906401801839739460610214672944067106,2404437245153943215385191977659052661900153012620192877099998⟩,⟨-3463426263660785979559191576390488223988570600334063163328436,-3463426263660785979558636420655416321094415395908566842419827⟩⟩, + ⟨⟨-923377338802898441441237321201547679525805310207217850057576,-923377338802898441440979089481268076031710280314521637825786⟩,⟨1399342701366692181901228336975165783497612500097575629984782,1399342701366692181901627585919757690072869172958906381641927⟩⟩, + ⟨⟨14735223357409235973643990577677723742402836172238462828211594,14735223357409235973649399157744430779251090655221054639185496⟩,⟨-22620206982332579692292154912866634619077382216403517550129405,-22620206982332579692283792772533774234973344048245635750883367⟩⟩, + ⟨⟨-6271468673204261316411557073429320826185931401778477111108610,-6271468673204261316409555760864532714550116377814691369880375⟩,⟨10048874243531723249157918181212089117008442705635966383962081,10048874243531723249161012386402780512751263342863313582131818⟩⟩, + ⟨⟨-12277749100298232672456579888894637504308365799013284103637231,-12277749100298232672450847361420582008476343509944833770518333⟩,⟨19212434369007044347836977729251835903256018258918705322773249,19212434369007044347845840720759552497949878280136937078546661⟩⟩, + ⟨⟨-7481404527439084833892779304838627619660808598070417071336822,-7481404527439084833890318946456692094309094660727196718245943⟩,⟨11891029728723046125828753673490034661455608264181944960280980,11891029728723046125832557603875667349814319342322367181905220⟩⟩, + ⟨⟨2645859239485320436715428977537992690422629394052323807489566,2645859239485320436719754342136932543251208127462067638634149⟩,⟨-4089458664922770726394587035187717584547798748450071003084264,-4089458664922770726387899641209811149544102379746891466627110⟩⟩, + ⟨⟨-4457364006853950137925072790019021874413014894004103072578026,-4457364006853950137922632938146564523099185756042845089140708⟩,⟨6997887931011593622362743506831675270101631420710764307163108,6997887931011593622366515732350618608361803793412501627542363⟩⟩] +lemma spectrum1_1_13_calc (r : Fin 8) : spectrumBox 1 1 13 r = spectrum1_1_13 r := by + revert r + decide +kernel +def spectrum1_1_14 : Fin 8 → CI := ![⟨⟨4060709554320936186120373657764062923503388041558087573483954,4060709554320936186120983432829572023382975766985055017020656⟩,⟨-2725129472141237864144815428789344128056272398646236076991029,-2725129472141237864144383437805099264871360776741973147481768⟩⟩, + ⟨⟨-1576247267375916420593954712693967994670915884493577464641486,-1576247267375916420593516183402162205302127774179489756469324⟩,⟨1139605753766719027942013684198142664408185785608174889894246,1139605753766719027942324357282535179481749594614407013021517⟩⟩, + ⟨⟨26526126000845953673265886552071639066555113953567907616550919,26526126000845953673275071406603684582330897945412135163884247⟩,⟨-17782345798035353150819248869054706456066908844834063039372298,-17782345798035353150812741921536064400036685317666060378804381⟩⟩, + ⟨⟨-11741057578221609785419421805330334230048209320628052911470755,-11741057578221609785416023174903490001624701052705158661341736⟩,⟨7906299499819933105663544015269470786498765544356094122557741,7906299499819933105665951751804173463038532341224935486529063⟩⟩, + ⟨⟨-22498327349794447672217782983123820419343845724633516467404137,-22498327349794447672208048000873255163021665021621830235728171⟩,⟨15107695072412271188116919249223354676070818522507784334652511,15107695072412271188123815930970281895119878595210116303299154⟩⟩, + ⟨⟨-13931400284123288802248337356579264217602232101071187391329149,-13931400284123288802244159174217893484923236092489638236082248⟩,⟨9363965082404899225793597921799299809532687501127481363020764,9363965082404899225796557926582598272812333719702994854895704⟩⟩, + ⟨⟨4814736628650272123431561212587107737065691171934260586568809,4814736628650272123438906549838167397693433812805635038113845⟩,⟨-3239966612815190223663398422771999071218666841740790050121359,-3239966612815190223658194668718778659612133392854696490970198⟩⟩, + ⟨⟨-8226561336415245153667399942573929200391345546836234698889169,-8226561336415245153663256584381599884132382141875387534513438⟩,⟨5534947299843034738194602401142860846901405868086138551544998,5534947299843034738197537734981231198043961734299052249934836⟩⟩] +lemma spectrum1_1_14_calc (r : Fin 8) : spectrumBox 1 1 14 r = spectrum1_1_14 r := by + revert r + decide +kernel +def spectrum1_1_15 : Fin 8 → CI := ![⟨⟨5168761555242946051711449494194046101807715153404694202018340,5168761555242946051712257679967413764016922004739169631093517⟩,⟨-2689981168360802091850,2689981168360802101698⟩⟩, + ⟨⟨-2116021590840187739448641865373139459370132274142587316471291,-2116021590840187739448060645912244471651747826808804893556338⟩,⟨-842161744897783716491,842161744897783706172⟩⟩, + ⟨⟨31505235323575173108138899350223508191826407147044485148234228,31505235323575173108151072804310308507828321764162914222598314⟩,⟨-32542127459496659252894,32542127459496659896444⟩⟩, + ⟨⟨-13412684448490932403551567750851722438246081381686756671312013,-13412684448490932403547063262368552441569880061038301431353135⟩,⟨-19506194431243510232678,19506194431243509817560⟩⟩, + ⟨⟨-26246644400107319069927588602452419148924262087271572784567213,-26246644400107319069914686018198133771821790031233336676691862⟩,⟨-32209957892174292221215,32209957892174291558507⟩⟩, + ⟨⟨-16017481525634324125773006116328345131640949235794233720841315,-16017481525634324125767468422621279081816277868436384196319418⟩,⟨-22602856490498228480439,22602856490498227977348⟩⟩, + ⟨⟨5730107190087327736330066298697898153019895453310475992721754,5730107190087327736339801687044644776324210802587549824187204⟩,⟨-9717947626889606028417,9717947626889606203780⟩⟩, + ⟨⟨-9618668759859560797892058573425266767935003859953140639228601,-9618668759859560797886567035095126676271593802890253748047383⟩,⟨-14946434709844896906944,14946434709844896588081⟩⟩] +lemma spectrum1_1_15_calc (r : Fin 8) : spectrumBox 1 1 15 r = spectrum1_1_15 r := by + revert r + decide +kernel +def spectrum1_1_16 : Fin 8 → CI := ![⟨⟨4060709554320936186120373657764062923495615724519873722946107,4060709554320936186120983432829572023390748084023268867576568⟩,⟨2725129472141237864144383437805099264863588459709806755420327,2725129472141237864144815428789344128064044715678402469081495⟩⟩, + ⟨⟨-1576247267375916420593954712693967994673278393347027276511342,-1576247267375916420593516183402162205299765265326039944591827⟩,⟨-1139605753766719027942324357282535179484112103450901338796149,-1139605753766719027942013684198142664405823276771680564141116⟩⟩, + ⟨⟨26526126000845953673265886552071639066458335048751986076130842,26526126000845953673275071406603684582427676850228056704838877⟩,⟨17782345798035353150812741921536064399939906413085745685843062,17782345798035353150819248869054706456163687749414377733524940⟩⟩, + ⟨⟨-11741057578221609785419421805330334230106791386897871366039057,-11741057578221609785416023174903490001566118986435340207092327⟩,⟨-7906299499819933105665951751804173463097114407349387144065477,-7906299499819933105663544015269470786440183478231642465778880⟩⟩, + ⟨⟨-22498327349794447672217782983123820419440155045782451793986310,-22498327349794447672208048000873255162925355700472894909674479⟩,⟨-15107695072412271188123815930970281895216187916124803411463062,-15107695072412271188116919249223354675974509201593097227705061⟩⟩, + ⟨⟨-13931400284123288802248337356579264217669979397265937053601200,-13931400284123288802244159174217893484855488796294888574200529⟩,⟨-9363965082404899225796557926582598272880081015723904043562197,-9363965082404899225793597921799299809464940205106572175272568⟩⟩, + ⟨⟨4814736628650272123431561212587107737036486260947002099717251,4814736628650272123438906549838167397722638723792893525105438⟩,⟨3239966612815190223658194668718778659582928481957400094284004,3239966612815190223663398422771999071247871752638086447130391⟩⟩, + ⟨⟨-8226561336415245153667399942573929200436150956455650083017068,-8226561336415245153663256584381599884087576732255972150634639⟩,⟨-5534947299843034738197537734981231198088767143783636291030448,-5534947299843034738194602401142860846856600458601554511033733⟩⟩] +lemma spectrum1_1_16_calc (r : Fin 8) : spectrumBox 1 1 16 r = spectrum1_1_16 r := by + revert r + decide +kernel +def spectrum1_1_17 : Fin 8 → CI := ![⟨⟨2404437245153943215384832906401801839711989954628655772354696,2404437245153943215385191977659052661927623668206210048833233⟩,⟨3463426263660785979558636420655416321066944740307720919592627,3463426263660785979559191576390488224016041255934909086206514⟩⟩, + ⟨⟨-923377338802898441441237321201547679534014903785180685844812,-923377338802898441440979089481268076023500686736558802012430⟩,⟨-1399342701366692181901627585919757690081078766582207121700734,-1399342701366692181901228336975165783489402906474274889965188⟩⟩, + ⟨⟨14735223357409235973643990577677723742055495598702918639640718,14735223357409235973649399157744430779598431228756598828603003⟩,⟨22620206982332579692283792772533774234626003474057843913841311,22620206982332579692292154912866634619424722790591309388106659⟩⟩, + ⟨⟨-6271468673204261316411557073429320826397455950138874354182109,-6271468673204261316409555760864532714338591829454294127320813⟩,⟨-10048874243531723249161012386402780512962787891626979095912431,-10048874243531723249157918181212089116796918156872300870749797⟩⟩, + ⟨⟨-12277749100298232672456579888894637504655166429965117969468844,-12277749100298232672450847361420582008129542878992999905532296⟩,⟨-19212434369007044347845840720759552498296678911738142896871402,-19212434369007044347836977729251835902909217627317499505378040⟩⟩, + ⟨⟨-7481404527439084833892779304838627619905042490749572632675058,-7481404527439084833890318946456692094064860768048041157542345⟩,⟨-11891029728723046125832557603875667350058553235485344727953985,-11891029728723046125828753673490034661211374371018967414919710⟩⟩, + ⟨⟨2645859239485320436715428977537992690317143119335236673648617,2645859239485320436719754342136932543356694402179154772706330⟩,⟨4089458664922770726387899641209811149438616104777153200808816,4089458664922770726394587035187717584653285023419809269150301⟩⟩, + ⟨⟨-4457364006853950137925072790019021874574536244216946585119101,-4457364006853950137922632938146564522937664405830001577010662⟩,⟨-6997887931011593622366515732350618608523325144003090074933299,-6997887931011593622362743506831675269940110070120175860214309⟩⟩] +lemma spectrum1_1_17_calc (r : Fin 8) : spectrumBox 1 1 17 r = spectrum1_1_17 r := by + revert r + decide +kernel +def spectrum1_1_18 : Fin 8 → CI := ![⟨⟨778085461742545528150021556196753773869126574656010096961219,778085461742545528150360273779039094328824266199933580762180⟩,⟨4395441882523410864035770485264613947908102079937463316437930,4395441882523410864036338149973976502511467309167112303006974⟩⟩, + ⟨⟨-251939597741208807283131952515567831206834728862470801229921,-251939597741208807282888358459524332067292949547609204762864⟩,⟨-1788848409094670820506875559289811426798791694981607872693965,-1788848409094670820506467314320378078958208744886762563288561⟩⟩, + ⟨⟨4587124544903085099343522186701902252496551698008421778365277,4587124544903085099348624185613811512453071987265159016171181⟩,⟨27870713526786078898838535203723715775641399858028221115918672,27870713526786078898847085762894445184352398878598685372595164⟩⟩, + ⟨⟨-1889416790275349321566264029985435121181012186329528974072437,-1889416790275349321564376160266949847036431806757201877777946⟩,⟨-12181145684166351199083592555921814785178718605342689796921587,-12181145684166351199080428630955688939653955487530373924399091⟩⟩, + ⟨⟨-3768742564912468336981075485624573147532629779073076360705597,-3768742564912468336975667902012165233040930149367801385558682⟩,⟨-23493734435214791552908838259537376349278170505707108936044786,-23493734435214791552899775563827929889190706238445103144293695⟩⟩, + ⟨⟨-2263360682055584111924208031446961378603392358775563486820310,-2263360682055584111921887136566471146308235999622234763356379⟩,⟨-14456806858742962325601254861744102021722850212978949698250568,-14456806858742962325597365219792522625723895238009298445574829⟩⟩, + ⟨⟨804966695557640678243969706270618918744363169017923139667577,804966695557640678248049890941128539831631497429666368922727⟩,⟨5049723179032797665111915631894096192757578099541523332628864,5049723179032797665118753708705766842266543607379217684496967⟩⟩, + ⟨⟨-1346317205370748839173923751028789201038881815228327766439853,-1346317205370748839171622200262235402201504340894386972908798⟩,⟨-8574190167466537662875081340109890962382251966291952760856396,-8574190167466537662871224117410779989003567304817576534012334⟩⟩] +lemma spectrum1_1_18_calc (r : Fin 8) : spectrumBox 1 1 18 r = spectrum1_1_18 r := by + revert r + decide +kernel +def spectrum1_1_19 : Fin 8 → CI := ![⟨⟨-1643486711242565711564937185488310237952693742969013889153338,-1643486711242565711564482122940927004859284636097965569310398⟩,⟨3665722283023287432112514211935560411179908431370410492446603,3665722283023287432112871505927354863761519230451859441094549⟩⟩, + ⟨⟨771109336501823356736824355251427514115473556689804247273600,771109336501823356737151620611916631360137288162857239019771⟩,⟨-1469251996554298736452341021882407017399474560346640782049375,-1469251996554298736452084068310424790662009999782038270588493⟩⟩, + ⟨⟨-10823004541489650945317401922388760047555492453475937569044697,-10823004541489650945310547455000515078081307433618295410481841⟩,⟨22640889523928151405785620966237150150840750128523316038953956,22640889523928151405791002775900137980194929563797830615602009⟩⟩, + ⟨⟨4856864822826551513236103265459068828166199220781005045017444,4856864822826551513238639593208650809072484847196662594368248⟩,⟨-9737126715482856888413604209129778014234321066699415600699697,-9737126715482856888411612802297116802486733872638917878783937⟩⟩, + ⟨⟨9231506003239943580517185069855792265980553327880092028110120,9231506003239943580524450086207312256595462013876267804476585⟩,⟨-18945893601158449160100753809440902174984592675717236191730071,-18945893601158449160095049655786392508776120207295033373445108⟩⟩, + ⟨⟨5757612461012447492921391262965088562564482669307326438540547,5757612461012447492924509354235694451852843287523308342077626⟩,⟨-11580320548218416658380889386922278591552771182117076936516638,-11580320548218416658378441206373779197774689277143992873249077⟩⟩, + ⟨⟨-2015163760513855805324811549889469877754364676198564093134154,-2015163760513855805319329876285670677286798019517938959208079⟩,⟨4084708786578616877330695750384036423625757679682751006811126,4084708786578616877334999706081727097620790041870416505694131⟩⟩, + ⟨⟨3435643057517738181575711879618830136599925883473436443959606,3435643057517738181578803982330751256455837352332107023427703⟩,⟨-6894338294271796325401931255496595758360701727238428431229006,-6894338294271796325399503479958191923949862091580625731202128⟩⟩] +lemma spectrum1_1_19_calc (r : Fin 8) : spectrumBox 1 1 19 r = spectrum1_1_19 r := by + revert r + decide +kernel +def spectrum1_1_20 : Fin 8 → CI := ![⟨⟨-2348242346588787759584129328327753711095487184558164521152821,-2348242346588787759583728761594867722177882724105815966654491⟩,⟨2117570682918539228586793538085293074661988456002686505601907,2117570682918539228587146148993271158818546682415778422304814⟩⟩, + ⟨⟨1019487690352507662512617918559246224927504719672285817912050,1019487690352507662512905992400945121814754752539512328258666⟩,⟨-778134294472911991363884702022758997886557481004046214526233,-778134294472911991363631116363874282228669796968084738524059⟩⟩, + ⟨⟨-15424430881817079326663265596323448436165274797677423632754383,-15424430881817079326657231982651720441448513879249336621191440⟩,⟨13118135755955011236103175726090763277608328212604172473718763,13118135755955011236108486995900536856230307295501183481405426⟩⟩, + ⟨⟨6882759521246578606193023904838097044023863018592961004798848,6882759521246578606195256495777563054758126997138855728160913⟩,⟨-5639199883670030950151874921646139296121208336507166225561394,-5639199883670030950149909616358211601973061452270974710343977⟩⟩, + ⟨⟨13126301540333570240508440297956896765697088024946053955668789,13126301540333570240514835295482019116619354770110275042037126⟩,⟨-10976702150837871096527920026600688762317056261248100604786487,-10976702150837871096522290637790478190811230955286937765920852⟩⟩, + ⟨⟨8153967720078334710309170194977293485951938789113965979672414,8153967720078334710311914880604113638857133380229033596071452⟩,⟨-6697896533291835995044103980716590802875627640177720724966416,-6697896533291835995041687888686145247467723606093083283678499⟩⟩, + ⟨⟨-2824198063474697489964230655508321645659564182719734120839718,-2824198063474697489959405437307334381673872613878220145692497⟩,⟨2342973441261004793688113348802341128927797495597937776100276,2342973441261004793692360892173664386604796616561171468450444⟩⟩, + ⟨⟨4826703831684758928138584599447366409218229437185353562927958,4826703831684758928141306408763875731592842989630668792217236⟩,⟨-3963383973392294270547107674455521618028883441371684367254224,-3963383973392294270544711719984907289421415452086257394573306⟩⟩] +lemma spectrum1_1_20_calc (r : Fin 8) : spectrumBox 1 1 20 r = spectrum1_1_20 r := by + revert r + decide +kernel +def spectrum1_1_21 : Fin 8 → CI := ![⟨⟨-2752280324203147393362187610545070730804734995449644272175644,-2752280324203147393361873544642928940925657027449088081822219⟩,⟨1218015508662378419683026643380472453297905503558927784927822,1218015508662378419683365167024770793512649206656412857576857⟩⟩, + ⟨⟨1162483241378159673040030743734726958242636800985737112882656,1162483241378159673040256609148773830786780008550797299143175⟩,⟨-436576364741123908765464898454179986816936408387760033268442,-436576364741123908765221443871678187156138471599763938152801⟩⟩, + ⟨⟨-18012777577938788418926639566763484512467647541508444274721184,-18012777577938788418921908888538326867442690427845062790735568⟩,⟨6497432253434176864360692529517564286784905643400403375744769,6497432253434176864365791607201139668028379496139759223269526⟩⟩, + ⟨⟨8008354547365483921967761436745464070394198796466462791479498,8008354547365483921969511908339710408333785739124460656572471⟩,⟨-2523812645410497507568822700582771579934817500309031400960616,-2523812645410497507566935911793272655403619400189852277057145⟩⟩, + ⟨⟨15305341744401463033303730193780548528516934216920995994455046,15305341744401463033308744216419052845146441617994683561977960⟩,⟨-5197736610676556372901430023180628359894392800744388329218414,-5197736610676556372896025535763797737705577024064674955270659⟩⟩, + ⟨⟨9486937103208298351606743084891546885298317865186576292947414,9486937103208298351608895066313649229716344264415677667730122⟩,⟨-3042321617424365612657556920427534089117569756875796595731532,-3042321617424365612655237354411279580242158486459523106640627⟩⟩, + ⟨⟨-3272367237341055244331247337758229158120370818108958491035396,-3272367237341055244327464106693568167467316873164258455354342⟩,⟨1147946253254844135921647914957094063742675812966959137631792,1147946253254844135925725763454806915449171890731012197593164⟩⟩, + ⟨⟨5597395492104079340277811309223476570635386462158006859548879,5597395492104079340279945354385661151380350982120488192284919⟩,⟨-1862386855812236233466046986853942827122546312471624483909594,-1862386855812236233463746753875853352469627616129083774558650⟩⟩] +lemma spectrum1_1_21_calc (r : Fin 8) : spectrumBox 1 1 21 r = spectrum1_1_21 r := by + revert r + decide +kernel +def spectrum1_1_22 : Fin 8 → CI := ![⟨⟨-3020174249937748595527473523849746650067535951292910625977653,-3020174249937748595527141138329272780078489312509615529518185⟩,⟨-302818306960011591170277156185322992217228960335314477974839,-302818306960011591170042273649301502046375871387994388489351⟩⟩, + ⟨⟨1278416862003104667190058445704287704983107160092548420195618,1278416862003104667190297485958874554018557754892437608811444⟩,⟨214511689097481658053623490760381379849830412383902305007036,214511689097481658053792410216103751159697715755304928454891⟩⟩, + ⟨⟨-19102503768474075474842338335600702927604690352088817669598004,-19102503768474075474837331714591098606545093939837693392988643⟩,⟨-2382124110388390399939887395792709582374438123466086939558748,-2382124110388390399936349432291899444086939166640974865702283⟩⟩, + ⟨⟨8328384779795904096378818309007733992041530359362583681760933,8328384779795904096380670886469854122274170755491746594445838⟩,⟨1165922395881686046607081279420425138135113646033292315006807,1165922395881686046608390416147737077785529188021345315609308⟩⟩, + ⟨⟨16086141833242648884227260829632167410557903398882257416159130,16086141833242648884232567322673919541860943870352484024517627⟩,⟨2117453104592699417702683496252056348431352500016387587978334,2117453104592699417706433366406599109913664281134430053628257⟩⟩, + ⟨⟨9898084869147692104030186881444051231593298125316637370665438,9898084869147692104032464388999496301788075854811231425887045⟩,⟨1378516242574701851760387571952837309931468180714143130548886,1378516242574701851761996988481175830467664696924142541230969⟩⟩, + ⟨⟨-3465855812633595912708841600110766523151964748501258004835838,-3465855812633595912704837691319889540646036084825311628306451⟩,⟨-472300064567250303568581844010298982689863474135247974476768,-472300064567250303565752454061365150154821119561890484534331⟩⟩, + ⟨⟨5880775167831690646368841984778169179542499629482513626466936,5880775167831690646371100509842845663105901208873182453807006⟩,⟨824123460285620006498273357843730601041227308255845256208669,824123460285620006499869360263159142774190497274675060642137⟩⟩] +lemma spectrum1_1_22_calc (r : Fin 8) : spectrumBox 1 1 22 r = spectrum1_1_22 r := by + revert r + decide +kernel +def spectrum1_1_23 : Fin 8 → CI := ![⟨⟨-1895669441990686708138117339355351822827799404289546446809323,-1895669441990686708137798749399515660373408496222403299958748⟩,⟨-1453486156844116482722086590701750943950822886737438387162684,-1453486156844116482721850586001806257397013326358394396405647⟩⟩, + ⟨⟨756878652525225587156780412763527249902451398382823727599342,756878652525225587157009531721667294100030672970936907909057⟩,⟨691836698887146827749863539530967092721694133723801207478648,691836698887146827750033266008456187327713545598079965602788⟩⟩, + ⟨⟨-12222397223352564994454214345978817957048017190499055523068114,-12222397223352564994449415523322330998279704575887144922497950⟩,⟨-9612095127701566071957834594273458358991758849603400511701095,-9612095127701566071954279727962122481520177918217165037442944⟩⟩, + ⟨⟨5368522149092978061979985040237079353863920960985309493688517,5368522149092978061981760727008869301765693037417283599891062⟩,⟨4306504532661528299292213672110365095874227955984220311807005,4306504532661528299293529063308660004012592247034051515401639⟩⟩, + ⟨⟨10330584687975400750084894788677705860566735228847519530653026,10330584687975400750089981037264607172040770084730293076098518⟩,⟨8194880158218847093726073853329509839187909322725254422268943,8194880158218847093729841638689990637407131228927603551635995⟩⟩, + ⟨⟨6371840939589583055550817795539656516860074006199110656602471,6371840939589583055553000775804474810516255267597915535552405⟩,⟨5113393018590048480479812682694125911805683041718720924210611,5113393018590048480481429788296314361343082739594234008329068⟩⟩, + ⟨⟨-2201374589775628895328325594006360881472529380431278991689403,-2201374589775628895324487866288743059224943125959377724542325⟩,⟨-1790665507569686261086851293827805233760997558970358567360596,-1790665507569686261084008386316522823716831167945833616895474⟩⟩, + ⟨⟨3756827657535154508630068713626149219581358982671089443466553,3756827657535154508632233499262973329646012395968704584530663⟩,⟨3052666900924237050712619605686324717679263739874693586504278,3052666900924237050714223233092977716998359286385292352782288⟩⟩] +lemma spectrum1_1_23_calc (r : Fin 8) : spectrumBox 1 1 23 r = spectrum1_1_23 r := by + revert r + decide +kernel +def spectrum1_1_24 : Fin 8 → CI := ![⟨⟨-917255226875437833626541019876533402617767523182466434972137,-917255226875437833626326210123447412616495006432876044993072⟩,⟨-1664567578016327185567874820770245434805408763570161652172377,-1664567578016327185567614629347362562050123497152955860217692⟩⟩, + ⟨⟨358626700392651905591086943288211389205968010077601984993113,358626700392651905591241427087602237640097593404991291541844⟩,⟨746695020403406035385537884252510146707609173255946079288391,746695020403406035385725004990737497146824598014837544341045⟩⟩, + ⟨⟨-4908875727423649077818691402528436910378431248416160504111287,-4908875727423649077815455789192047110141351271060456368302802⟩,⟨-11205454307137837132019265113678650789785184584707723524839075,-11205454307137837132015345930188145740212250733241408330936193⟩⟩, + ⟨⟨1889349200306464511092705444046414132142198119318041494938320,1889349200306464511093902703501770526464650059357646234743134⟩,⟨5059227339656880029673412823796914603591929893351588597204477,5059227339656880029674863021643026468636596275626398963357642⟩⟩, + ⟨⟨3915274158827578470396176886462751440615684946218267293263618,3915274158827578470399606297161587076842485464337366510683772⟩,⟨9589009852006382499365684666823001327635795970023642533703917,9589009852006382499369838590174063597116786130817861417251323⟩⟩, + ⟨⟨2293647673422431999191211293887890716548669444532235369140358,2293647673422431999192683171588638170633621987715513459005620⟩,⟨5988505325526285816258698784144622641659807517372189999754774,5988505325526285816260481617315673852837249561091934652475566⟩⟩, + ⟨⟨-868034325190410780683947356323186000138124858539593503723695,-868034325190410780681359762683365626874452012960025315918056⟩,⟨-2061187970815437282845632873297971189772391929248573755609338,-2061187970815437282842498613045280996899345700834272376586922⟩⟩, + ⟨⟨1408205001827045309257969132113743101443212210849205690303834,1408205001827045309259428742059416968940813836129272396661494⟩,⟨3537261145413067212027039348736498402065569772944020107557728,3537261145413067212028807322411636199215433065498951436209546⟩⟩] +lemma spectrum1_1_24_calc (r : Fin 8) : spectrumBox 1 1 24 r = spectrum1_1_24 r := by + revert r + decide +kernel +def spectrum1_1_25 : Fin 8 → CI := ![⟨⟨-100258789061965988396851736976215960142292984711615899221968,-100258789061965988396730945367277559673669365191109528068105⟩,⟨-1898897129344444872568355543190524016882287796978617747085688,-1898897129344444872568106763540168669223616568133882008884041⟩⟩, + ⟨⟨3543351063614239015348450137303011200956078797090754134484,3543351063614239015435319315332330793532282611730960685197⟩,⟨841589576277083687644034656608064665845094818167452154986339,841589576277083687644213570391288597892896364543879133735354⟩⟩, + ⟨⟨-112334728384275445578546940588272884555155907143344257366263,-112334728384275445576727493681463219640355534960673989817412⟩,⟨-12347670196749230556512522355937401776635251177920814965649458,-12347670196749230556508775064471591308462508606193135176514631⟩⟩, + ⟨⟨-112013542455599722024383529281680888139962832427794546888162,-112013542455599722023710287523092272018028279683582408783296⟩,⟨5474419987379427613037069260873657154161487124920486592736914,5474419987379427613038455854286709812318905195336714586934664⟩⟩, + ⟨⟨-43807885932972183135219368022534105236496169705007243174386,-43807885932972183133290945173610654668344606087986881332306⟩,⟨10477027781839612363460893404243216477508154727929029445033947,10477027781839612363464865140080738996811322226924558739146824⟩⟩, + ⟨⟨-98028376457683521728883391476068892003207354303144553709846,-98028376457683521728055726656012818032445379775655094917881⟩,⟨6491428945412776530473750727214041758084916145323253415443464,6491428945412776530475455366852128818236050065254620961094509⟩⟩, + ⟨⟨-4471236428872158711998653274773524605094377422427185226588,-4471236428872158710543600165958011270540739167807068956902⟩,⟨-2257855528948045324439950293924241683911351799821429227373713,-2257855528948045324436953499636611046976535930406397426673553⟩⟩, + ⟨⟨-31455375576425158087461645114346633319138090105842493832138,-31455375576425158086640878686251509069951159423719902984224⟩,⟨3849026277335894865168331051915309719247173946135446031608101,3849026277335894865170021483782220950874763196445752628197414⟩⟩] +lemma spectrum1_1_25_calc (r : Fin 8) : spectrumBox 1 1 25 r = spectrum1_1_25 r := by + revert r + decide +kernel +def spectrum1_1_26 : Fin 8 → CI := ![⟨⟨982903275724842338935495087259938029291399576969820075593785,982903275724842338935686141450491525343406075635846513091099⟩,⟨-1169238755472605617965127043188405552317497471453446547714443,-1169238755472605617964964058190525709124027615372171846549834⟩⟩, + ⟨⟨-456993473509342721836002163053070484328522737547339623952105,-456993473509342721835864763438658077963588978183653809552752⟩,⟨518132091476158781579887134202080807729432065528343113125808,518132091476158781580004347416817453288368954382121221468574⟩⟩, + ⟨⟨6931338970022272756402193573349743149023440720366747535964543,6931338970022272756405071363943728813916351958432577670003144⟩,⟨-7271289036907679860777821397604657308716527785175767090405420,-7271289036907679860775366404639046646374973501917262028690039⟩⟩, + ⟨⟨-3236873309312794559226562245330192418155169407719344887730525,-3236873309312794559225497389415407682765974602537093074474054⟩,⟨3139107567091299773993346738366665462167122232125864530984504,3139107567091299773994255148375945709417758538926007019619738⟩⟩, + ⟨⟨-6022219978838920415998127664932838292663560531884431978193857,-6022219978838920415995077508802924611056953931253240027453530⟩,⟨6095155711895872874769303128927668119808754751191402667793485,6095155711895872874771905163925836985815011212965368514913253⟩⟩, + ⟨⟨-3807416279805567598649843628455566455819054481152108081535658,-3807416279805567598648534524010020987900549105432845547866290⟩,⟨3727877013303557940287513427429271243992831702255016304330056,3727877013303557940288630201600325973837659619749912260945046⟩⟩, + ⟨⟨1289833958103131907890588231544356259682413762504805899988554,1289833958103131907892889666191672550573060188094320203228374⟩,⟨-1307170853990351634331624714307023013181397380855804726465390,-1307170853990351634329661400547580049731090065032064851193702⟩⟩, + ⟨⟨-2236799529431563418961176090230282053489872218137222393021960,-2236799529431563418959877896862950526701913277599867267104402⟩,⟨2211331993147067189551291586233864038939737811385295212581593,2211331993147067189552399052354388006652295689666860119992627⟩⟩] +lemma spectrum1_1_26_calc (r : Fin 8) : spectrumBox 1 1 26 r = spectrum1_1_26 r := by + revert r + decide +kernel +def spectrum1_1_27 : Fin 8 → CI := ![⟨⟨881342555083844747226358086270365754556064862420990550139294,881342555083844747226509672149457990236614943959219581820788⟩,⟨-320708795051927003848022389192700011076707671334747331359720,-320708795051927003847906307087930631522433563023410332038039⟩⟩, + ⟨⟨-398745194796486370820440303605306563150647002725426656311843,-398745194796486370820331288245440420709712536904565764519209⟩,⟨125688988339817649321531882945336661720143993405295998378249,125688988339817649321615365209655066825284224423693454513769⟩⟩, + ⟨⟨6028949102974722996382090437975454411587708641008378643102194,6028949102974722996384373729515759717252792919055994062533706⟩,⟨-2104354648235118788693230423545161116262769844579112774553865,-2104354648235118788691481914453235769565409244316133838777520⟩⟩, + ⟨⟨-2767377372131750242359751212170561424062513757793428356089752,-2767377372131750242358906336067686690340442775593164386459125⟩,⟨930426260907210817280573238981928157627485162817681528802957,930426260907210817281220231939842335463401077872768831654191⟩⟩, + ⟨⟨-5196596912633958276107536898746178235396059770923557507034020,-5196596912633958276105116849246193699346399188859301684419725⟩,⟨1784467111050792305214221764714334739177369444754319185371562,1784467111050792305216075000921334731308134333200282378448403⟩⟩, + ⟨⟨-3262670436844163007463065836145692291197520375435145262379945,-3262670436844163007462027168804086508286060988856166120639050⟩,⟨1088319606955219245509106630059155589479935926069844444559625,1088319606955219245509902025328765455647104015558345547604873⟩⟩, + ⟨⟨1113454047901201977975562099827325043935437075245786191619875,1113454047901201977977388100048346449808118724156522976115570⟩,⟨-350479662462791888935326334555123926841886643891701909916697,-350479662462791888933928012031728874251108143835830619153415⟩⟩, + ⟨⟨-1920986747103026637824183173167201118413695830417050280238847,-1920986747103026637823153162874058328296741279345773985411977⟩,⟨611146362152055248466879407964613081895280904009623302815935,611146362152055248467668173801365383775538523283651917034318⟩⟩] +lemma spectrum1_1_27_calc (r : Fin 8) : spectrumBox 1 1 27 r = spectrum1_1_27 r := by + revert r + decide +kernel +def spectrum1_1_28 : Fin 8 → CI := ![⟨⟨610769456818511257981380767756893151776572311585850277496118,610769456818511257981493504523617367852430920097962808070206⟩,⟨45329495939451901389667682071525383850092824920530826208178,45329495939451901389751906080725102239745999942195304576463⟩⟩, + ⟨⟨-274259852319614436603393538967529071961391210960319930571216,-274259852319614436603312462555486028408645180644357825470242⟩,⟨-6815817751890666662093652463482133592331091218988699337955,-6815817751890666662033081447726910962322021843405454407770⟩⟩, + ⟨⟨3915297341549197673705883457432273712766809638861366688946639,3915297341549197673707581576724642687165294176782351352197276⟩,⟨1122009591126542380060488976256870752400259330519647191107908,1122009591126542380061757616639748159128809825236703488514593⟩⟩, + ⟨⟨-1734347654351346403454803546274494153366078585984985318484994,-1734347654351346403454175198827485825043670541821742598125731⟩,⟨-703227195768122760192121903009695772540709954342001709332235,-703227195768122760191652473712604060349115097772158698759009⟩⟩, + ⟨⟨-3319279672228546530264965324223330066512633352840312749806684,-3319279672228546530263165495917635566909057197389145663525635⟩,⟨-1133802942220011760583889875664300011463939146999696506071143,-1133802942220011760582545249947422278823725302562414478782131⟩⟩, + ⟨⟨-2056861800518150253481236200384731557945471257723140941913869,-2056861800518150253480463727391174022185392626517930775809646⟩,⟨-810365995647102576226744762731855313232107831263388354128666,-810365995647102576226167659321774324249273277623120923708451⟩⟩, + ⟨⟨722551822388097985756820146723480735773237554552444906748275,722551822388097985758178171376992079515427590477484676307234⟩,⟨239539157870097022489432641935732515976155844716785946891823,239539157870097022490447202528770565395456041771715006879443⟩⟩, + ⟨⟨-1227578061557397542231855843039804751697267496830748437333347,-1227578061557397542231089808427375263520447627037242480086831⟩,⟨-457684703480514746741310923622353084792982839093649343107923,-457684703480514746740738630233790127153029844743006712642527⟩⟩] +lemma spectrum1_1_28_calc (r : Fin 8) : spectrumBox 1 1 28 r = spectrum1_1_28 r := by + revert r + decide +kernel +def spectrum1_1_29 : Fin 8 → CI := ![⟨⟨374738763434243690543864951260211912007518922051239411199007,374738763434243690543913614435231615512943890435428791378001⟩,⟨281520642954547069549522377398937338883059164629350961337433,281520642954547069549600949251128701387613254771357941244432⟩⟩, + ⟨⟨-169715317780452812259217538545071911191719737653689117308454,-169715317780452812259182541660382022224575077443893456737223⟩,⟨-132077220157363046439794070368683982218257500004600616970333,-132077220157363046439737564190222062658340067089092110886933⟩⟩, + ⟨⟨2129647469388028956755154838034221402149267360437235488496308,2129647469388028956755887836493501818175134271006406054702497⟩,⟨1987989729860655626738253913916095188424334137881838990905206,1987989729860655626739437417593784701360468367209557822718350⟩⟩, + ⟨⟨-875337876435783158622053843242042006760630666550248243394272,-875337876435783158621782615117432102113967593746021034758226⟩,⟨-924318401636995427185686881218248274579321775021982112522951,-924318401636995427185248954673168527484953645515299505161522⟩⟩, + ⟨⟨-1745104303327399336947505117852556394696110969341512524796254,-1745104303327399336946728216382248718457935203905309276320023⟩,⟨-1724113135300978656952167513031828824764834885979145522510302,-1724113135300978656950913123291053910893187047676471697399802⟩⟩, + ⟨⟨-1052207616398103521349642084355647635709583820440964512478934,-1052207616398103521349308643991870784966156189439914842525248⟩,⟨-1097123861653899847155973392429610961974884658691385048657934,-1097123861653899847155435017632665340992748586647403763153572⟩⟩, + ⟨⟨395009038228787308848106902083558099964052515429740189710704,395009038228787308848693097636686564413214800282768826215457⟩,⟨384799102719511564268231548374654206988820026763077057671860,384799102719511564269178023206135069140637689012186643633473⟩⟩, + ⟨⟨-649153566262329627446738633797498352578302916782299443447778,-649153566262329627446407972581153373675428148891297363918624⟩,⟨-660216835969597767379495152597500786844751586455626039729006,-660216835969597767378961265028373633080995604581176138113813⟩⟩] +lemma spectrum1_1_29_calc (r : Fin 8) : spectrumBox 1 1 29 r = spectrum1_1_29 r := by + revert r + decide +kernel +def spectrum1_1_30 : Fin 8 → CI := ![⟨⟨-146661897647503853792595045995,146661897647503853786683991559⟩,⟨300007537041099982862277200024363692712384745308792196532180,300007537041099982862319723749895842293740705434978808808613⟩⟩, + ⟨⟨-40004812228124689116152201314,40004812228124689118582906355⟩,⟨-123358154115039224715262176858272364645182654495429543912268,-123358154115039224715231595254960748273829492897495432129822⟩⟩, + ⟨⟨-1933417276404497056517303471794,1933417276404497056466151589674⟩,⟨2596142937934953541626856840597275641081623919918563189794721,2596142937934953541627497362414137891782184743809325177034397⟩⟩, + ⟨⟨-1261934758570145351302457384011,1261934758570145351328292797824⟩,⟨-1311250598135368001680891452882288577249670927222306991150862,-1311250598135368001680654443473125924118031714465451827795140⟩⟩, + ⟨⟨-2004071517039107651245316012447,2004071517039107651291511070475⟩,⟨-2344573571052684606661915760021344064218178577862944380492728,-2344573571052684606661236874090633978887538046884866138858739⟩⟩, + ⟨⟨-1408736354217141301963348481042,1408736354217141301993505051869⟩,⟨-1530563064925570443766070179217491933832656555747527147864842,-1530563064925570443765778806397413887374824503055024545700450⟩⟩, + ⟨⟨-629331685901625790657603853051,629331685901625790647969577171⟩,⟨488978469366859832749227103906351343697599235533884045831122,488978469366859832749739343782144384187911396171346763019403⟩⟩, + ⟨⟨-925842473626615625857219386541,925842473626615625874504582353⟩,⟨-877293072660214840014306063734571037763872641392556017925854,-877293072660214840014017119439483045709753541084979138637523⟩⟩] +lemma spectrum1_1_30_calc (r : Fin 8) : spectrumBox 1 1 30 r = spectrum1_1_30 r := by + revert r + decide +kernel +def spectrum1_1 : Fin 31 → Fin 8 → CI := ![spectrum1_1_0,spectrum1_1_1,spectrum1_1_2,spectrum1_1_3,spectrum1_1_4,spectrum1_1_5,spectrum1_1_6,spectrum1_1_7,spectrum1_1_8,spectrum1_1_9,spectrum1_1_10,spectrum1_1_11,spectrum1_1_12,spectrum1_1_13,spectrum1_1_14,spectrum1_1_15,spectrum1_1_16,spectrum1_1_17,spectrum1_1_18,spectrum1_1_19,spectrum1_1_20,spectrum1_1_21,spectrum1_1_22,spectrum1_1_23,spectrum1_1_24,spectrum1_1_25,spectrum1_1_26,spectrum1_1_27,spectrum1_1_28,spectrum1_1_29,spectrum1_1_30] +lemma spectrum1_1_mem (j : Fin 31) (r : Fin 8) : (spectrum1_1 j r).Mem (finiteSpectrum 1 1 j r) := by + have he : spectrumBox 1 1 j r = spectrum1_1 j r := by + fin_cases j + · exact spectrum1_1_0_calc r + · exact spectrum1_1_1_calc r + · exact spectrum1_1_2_calc r + · exact spectrum1_1_3_calc r + · exact spectrum1_1_4_calc r + · exact spectrum1_1_5_calc r + · exact spectrum1_1_6_calc r + · exact spectrum1_1_7_calc r + · exact spectrum1_1_8_calc r + · exact spectrum1_1_9_calc r + · exact spectrum1_1_10_calc r + · exact spectrum1_1_11_calc r + · exact spectrum1_1_12_calc r + · exact spectrum1_1_13_calc r + · exact spectrum1_1_14_calc r + · exact spectrum1_1_15_calc r + · exact spectrum1_1_16_calc r + · exact spectrum1_1_17_calc r + · exact spectrum1_1_18_calc r + · exact spectrum1_1_19_calc r + · exact spectrum1_1_20_calc r + · exact spectrum1_1_21_calc r + · exact spectrum1_1_22_calc r + · exact spectrum1_1_23_calc r + · exact spectrum1_1_24_calc r + · exact spectrum1_1_25_calc r + · exact spectrum1_1_26_calc r + · exact spectrum1_1_27_calc r + · exact spectrum1_1_28_calc r + · exact spectrum1_1_29_calc r + · exact spectrum1_1_30_calc r + rw [← he] + exact spectrumBox_mem 1 1 j r +def spectrumTable : Fin 2 → Fin 2 → Fin 31 → Fin 8 → CI := ![![spectrum0_0,spectrum0_1],![spectrum1_0,spectrum1_1]] +lemma spectrumTable_mem (side q : Fin 2) (j : Fin 31) (r : Fin 8) : + (spectrumTable side q j r).Mem (finiteSpectrum side q j r) := by + fin_cases side <;> fin_cases q + · exact spectrum0_0_mem j r + · exact spectrum0_1_mem j r + · exact spectrum1_0_mem j r + · exact spectrum1_1_mem j r +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave.lean new file mode 100644 index 0000000000000000000000000000000000000000..776fdb1ff7aa93dbbc47e7494dd4e5209cc3c988 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave.lean @@ -0,0 +1,30 @@ +import OAI.Analysis.Triangular.Certificate.WaveExpData +import OAI.Analysis.Triangular.Taylor.TaylorExp + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def taylorAmplitudeBox (q br : Fin 2) (j : Fin 31) : CI := + if br.val=0 then CI.point 1 else lambdaTable q j +lemma taylorAmplitudeBox_mem (q br : Fin 2) (j : Fin 31) : + (taylorAmplitudeBox q br j).Mem (taylorAmplitude q br (frequency j)) := by + unfold taylorAmplitudeBox taylorAmplitude + split_ifs + · simpa using CI.mem_point 1 + · exact lambdaTable_mem q j + +def taylorWaveBox (q br : Fin 2) (n : Fin 7) (l : Fin 21) (j : Fin 31) : CI := + (((taylorAmplitudeBox q br j).mul (taylorExpTable q br n j)).mul + ((taylorPhaseTable q br j).pow (l.val+2))).divNat (l.val+2).factorial +lemma taylorWaveBox_mem (q br : Fin 2) (n : Fin 7) (l : Fin 21) (j : Fin 31) : + (taylorWaveBox q br n l j).Mem (taylorWave q br (nearNode n) l.val (frequency j)) := by + exact CI.mem_divNat (CI.mem_mul (CI.mem_mul (taylorAmplitudeBox_mem q br j) (taylorExpTable_mem q br n j)) + (CI.mem_pow (taylorPhaseTable_mem q br j) (l.val+2))) (Nat.factorial_pos _) + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave00.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave00.lean new file mode 100644 index 0000000000000000000000000000000000000000..e024862ab45bca193f73e6e6c8b3ecc8879991a4 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave00.lean @@ -0,0 +1,28 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave000 +import OAI.Analysis.Triangular.Taylor.TaylorWave001 +import OAI.Analysis.Triangular.Taylor.TaylorWave002 +import OAI.Analysis.Triangular.Taylor.TaylorWave003 +import OAI.Analysis.Triangular.Taylor.TaylorWave004 +import OAI.Analysis.Triangular.Taylor.TaylorWave005 +import OAI.Analysis.Triangular.Taylor.TaylorWave006 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0 : Fin 7 → Fin 21 → Fin 31 → CI := ![tw0_0_0,tw0_0_1,tw0_0_2,tw0_0_3,tw0_0_4,tw0_0_5,tw0_0_6] +lemma tw0_0_mem (n : Fin 7) (l : Fin 21) (j : Fin 31) : (tw0_0 n l j).Mem (taylorWave 0 0 (nearNode n) l.val (frequency j)) := by + fin_cases n + · exact tw0_0_0_mem l j + · exact tw0_0_1_mem l j + · exact tw0_0_2_mem l j + · exact tw0_0_3_mem l j + · exact tw0_0_4_mem l j + · exact tw0_0_5_mem l j + · exact tw0_0_6_mem l j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave000.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave000.lean new file mode 100644 index 0000000000000000000000000000000000000000..eda2d0d48dbad9d21852d98aa7d5b01d3de48935 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave000.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_0_0 : Fin 31 → CI := ![⟨⟨2967822269668779360198432786705442237105162346592757003313007,2967822269668779360198432786705442237105162346592818455398591⟩,⟨1713472986300235871325432465256276238769739480423723581953920,1713472986300235871325432465256276238769739480423775433105479⟩⟩, + ⟨⟨2286834720707521668868407341834261352335574030697700558731651,2286834720707521668868407341834261352335574030697750193836217⟩,⟨1918882170709079577459342158998360256166558333215972984452644,1918882170709079577459342158998360256166558333216018692652399⟩⟩, + ⟨⟨1654546361478747186686881759544504506592593664864791005788037,1654546361478747186686881759544504506592593664864829614453259⟩,⟨1971811570405975316524290003928521268085265363203633370071461,1971811570405975316524290003928521268085265363203672629378060⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471182969494255,1096622711232150957648276777764016792812633267471211722028232⟩,⟨1899406252588018790526996983491483031747303901819369085643569,1899406252588018790526996983491483031747303901819401908845465⟩⟩, + ⟨⟨630321026128420116568667944121242455626618410044768414740443,630321026128420116568667944121242455626618410044788728159894⟩,⟨1731792786295301245667655664064858046374780400628899957584864,1731792786295301245667655664064858046374780400628926618284776⟩⟩, + ⟨⟨264481299157821395757223907044891859743854363336314180288362,264481299157821395757223907044891859743854363336327592489804⟩,⟨1499947983542625112666720013014695194379198712632440679449147,1499947983542625112666720013014695194379198712632461653874069⟩⟩, + ⟨⟨-4534777708,3521934051⟩,⟨1233700550136169827354311374984518891914212425905090228164658,1233700550136169827354311374984518891914212425905106138858042⟩⟩, + ⟨⟨-169268031461005693284623300508730790236066792535249312252055,-169268031461005693284623300508730790236066792535242998554453⟩,⟨959966709467280072106700808329404924402687176084762826423864,959966709467280072106700808329404924402687176084774388972825⟩⟩, + ⟨⟨-255253969258616410841857266627610581204167785885905043395709,-255253969258616410841857266627610581204167785885900240366754⟩,⟨701304516764212901138141549910562349358382145709225151421612,701304516764212901138141549910562349358382145709233125474390⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867801482503676,-274155677808037739412069194441004198203158316867797970064674⟩,⟨474851563147004697631749245872870757936825975454843576595408,474851563147004697631749245872870757936825975454848721873938⟩⟩, + ⟨⟨-244755378916974435900426295790607175531448766991837300032994,-244755378916974435900426295790607175531448766991834868292686⟩,⟨291688102131061437355664201764574152083619136568586002008138,291688102131061437355664201764574152083619136568589039818095⟩⟩, + ⟨⟨-186680385363879319907625089129327457333516247403896854444360,-186680385363879319907625089129327457333516247403895300926082⟩,⟨156643442506863638976272829305988592340127210874774227010011,156643442506863638976272829305988592340127210874775807456240⟩⟩, + ⟨⟨-118712890786751174407937311468217689484206493863712001977734,-118712890786751174407937311468217689484206493863711128908976⟩,⟨68538919452009434853017298610251049550789579216949545368313,68538919452009434853017298610251049550789579216950220312194⟩⟩, + ⟨⟨-57249348307282685807195228564127538723133236384427070945857,-57249348307282685807195228564127538723133236384426683050484⟩,⟨20837058714989094762600593194090659690136145786604172939884,20837058714989094762600593194090659690136145786604374652216⟩⟩, + ⟨⟨-14999479835426251126667200130146951943791987126324559063741,-14999479835426251126667200130146951943791987126324462098185⟩,⟨2644812991578213957572239070448918597438543633363202348916,2644812991578213957572239070448918597438543633363227693066⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨-14999479835426251126667200130146951943791987126324559063729,-14999479835426251126667200130146951943791987126324462098174⟩,⟨-2644812991578213957572239070448918597438543633363227693127,-2644812991578213957572239070448918597438543633363202348992⟩⟩, + ⟨⟨-57249348307282685807195228564127538723133236384427070945777,-57249348307282685807195228564127538723133236384426683050380⟩,⟨-20837058714989094762600593194090659690136145786604374652512,-20837058714989094762600593194090659690136145786604172940116⟩⟩, + ⟨⟨-118712890786751174407937311468217689484206493863712001977460,-118712890786751174407937311468217689484206493863711128908551⟩,⟨-68538919452009434853017298610251049550789579216950220312950,-68538919452009434853017298610251049550789579216949545368775⟩⟩, + ⟨⟨-186680385363879319907625089129327457333516247403896854443495,-186680385363879319907625089129327457333516247403895300925470⟩,⟨-156643442506863638976272829305988592340127210874775807456925,-156643442506863638976272829305988592340127210874774227011018⟩⟩, + ⟨⟨-244755378916974435900426295790607175531448766991837300031214,-244755378916974435900426295790607175531448766991834868291218⟩,⟨-291688102131061437355664201764574152083619136568589039819290,-291688102131061437355664201764574152083619136568586002009759⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867801482501135,-274155677808037739412069194441004198203158316867797970062279⟩,⟨-474851563147004697631749245872870757936825975454848721875240,-474851563147004697631749245872870757936825975454843576596828⟩⟩, + ⟨⟨-255253969258616410841857266627610581204167785885905043392154,-255253969258616410841857266627610581204167785885900240363114⟩,⟨-701304516764212901138141549910562349358382145709233125475722,-701304516764212901138141549910562349358382145709225151422874⟩⟩, + ⟨⟨-169268031461005693284623300508730790236066792535249312247265,-169268031461005693284623300508730790236066792535242998548455⟩,⟨-959966709467280072106700808329404924402687176084774388974440,-959966709467280072106700808329404924402687176084762826424220⟩⟩, + ⟨⟨-4534768783,3521940305⟩,⟨-1233700550136169827354311374984518891914212425905106138856402,-1233700550136169827354311374984518891914212425905090228165686⟩⟩, + ⟨⟨264481299157821395757223907044891859743854363336314180298951,264481299157821395757223907044891859743854363336327592497455⟩,⟨-1499947983542625112666720013014695194379198712632461653870587,-1499947983542625112666720013014695194379198712632440679448440⟩⟩, + ⟨⟨630321026128420116568667944121242455626618410044768414750088,630321026128420116568667944121242455626618410044788728166122⟩,⟨-1731792786295301245667655664064858046374780400628926618280165,-1731792786295301245667655664064858046374780400628899957583565⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471182969504962,1096622711232150957648276777764016792812633267471211722035180⟩,⟨-1899406252588018790526996983491483031747303901819401908838643,-1899406252588018790526996983491483031747303901819369085640365⟩⟩, + ⟨⟨1654546361478747186686881759544504506592593664864791005798395,1654546361478747186686881759544504506592593664864829614463373⟩,⟨-1971811570405975316524290003928521268085265363203672629369698,-1971811570405975316524290003928521268085265363203633370063335⟩⟩, + ⟨⟨2286834720707521668868407341834261352335574030697700558743130,2286834720707521668868407341834261352335574030697750193842474⟩,⟨-1918882170709079577459342158998360256166558333216018692639386,-1918882170709079577459342158998360256166558333215972984444670⟩⟩, + ⟨⟨2967822269668779360198432786705442237105162346592757003330688,2967822269668779360198432786705442237105162346592818455401001⟩,⟨-1713472986300235871325432465256276238769739480423775433081575,-1713472986300235871325432465256276238769739480423723581944669⟩⟩] +lemma tw0_0_0_0_calc (j : Fin 31) : taylorWaveBox 0 0 0 0 j = tw0_0_0_0 j := by + revert j + decide +kernel +def tw0_0_0_1 : Fin 31 → CI := ![⟨⟨1495287262745940401980917971985985493934475721734404014357444,1495287262745940401980917971985985493934475721734454022670426⟩,⟨-2589913510986562080301927490833042405511561092141606792581900,-2589913510986562080301927490833042405511561092141544921569855⟩⟩, + ⟨⟨1562904552378835537570571878051248956134713849857775718831461,1562904552378835537570571878051248956134713849857817922444951⟩,⟨-1862597115179322846206345850370667094126528306005920588168110,-1862597115179322846206345850370667094126528306005874232190708⟩⟩, + ⟨⟨1491299512408517599531830114163394900071422262498146351372115,1491299512408517599531830114163394900071422262498180790506269⟩,⟨-1251348870836844634126292425684618788858588312003505868459979,-1251348870836844634126292425684618788858588312003472685198591⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176474213709276,1326035717625119785114586875306517711621919279176501349529833⟩,⟨-765587078525921485814230001656824572894451569528037279506167,-765587078525921485814230001656824572894451569528014769511351⟩⟩, + ⟨⟨1108267823048449791360234419811165647822922562312689580564076,1108267823048449791360234419811165647822922562312710169913255⟩,⟨-403376499184638375403518324754425258050837438851307157358970,-403376499184638375403518324754425258050837438851292873716456⟩⟩, + ⟨⟨872634364048950952782626188252644186922632664661883055084792,872634364048950952782626188252644186922632664661898035192034⟩,⟨-153868982675202975248184939839639367620656758572822449576197,-153868982675202975248184939839639367620656758572814156893503⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789267377050135,645964097506246253655756563897945733379693511789277764037296⟩,⟨-1844080359,2374404058⟩⟩, + ⟨⟨446788794393062887824704608385353823704387924306884492619803,446788794393062887824704608385353823704387924306891296247357⟩,⟨78780919129703923327070689197895356221776260389281743413389,78780919129703923327070689197895356221776260389284932709144⟩⟩, + ⟨⟨285601700455009976285920665661329689859701306441212004117442,285601700455009976285920665661329689859701306441216160596993⟩,⟨103950517821435734608119297814250836597623772746802926739239,103950517821435734608119297814250836597623772746805213626303⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897059732309001,165754464703139973139323359413314713952739909897062055962878⟩,⟨95698384815740185726778750207103071611806446191002623799810,95698384815740185726778750207103071611806446191004154489740⟩⟩, + ⟨⟨84848629518008511580099574087585053486084562044728743997303,84848629518008511580099574087585053486084562044729897741979⟩,⟨71196453734458615960758558584696107695641119253725665296685,71196453734458615960758558584696107695641119253726599286621⟩⟩, + ⟨⟨36452584312042811371908381995364407140168253057907519991101,36452584312042811371908381995364407140168253057908003809821⟩,⟨43442498313220357929010981932843547384875295766901177347794,43442498313220357929010981932843547384875295766901677149683⟩⟩, + ⟨⟨11962298101967523215847343775887883951475805773875337199415,11962298101967523215847343775887883951475805773875493076524⟩,⟨20719308087892496642415419926664339244092488737132507511996,20719308087892496642415419926664339244092488737132725842848⟩⟩, + ⟨⟨2424501873386256200772461756600602602860029685056636369884,2424501873386256200772461756600602602860029685056667557611⟩,⟨6661264150554168543111852260322558364074666039445194237331,6661264150554168543111852260322558364074666039445260574472⟩⟩, + ⟨⟨153868982675202975248184939839639367620656758572817679318,153868982675202975248184939839639367620656758572819643563⟩,⟨872634364048950952782626188252644186922632664661886272522,872634364048950952782626188252644186922632664661894691433⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨153868982675202975248184939839639367620656758572817679323,153868982675202975248184939839639367620656758572819643566⟩,⟨-872634364048950952782626188252644186922632664661894691432,-872634364048950952782626188252644186922632664661886272522⟩⟩, + ⟨⟨2424501873386256200772461756600602602860029685056636369911,2424501873386256200772461756600602602860029685056667557645⟩,⟨-6661264150554168543111852260322558364074666039445260574462,-6661264150554168543111852260322558364074666039445194237319⟩⟩, + ⟨⟨11962298101967523215847343775887883951475805773875337199496,11962298101967523215847343775887883951475805773875493076657⟩,⟨-20719308087892496642415419926664339244092488737132725842800,-20719308087892496642415419926664339244092488737132507511921⟩⟩, + ⟨⟨36452584312042811371908381995364407140168253057907519991336,36452584312042811371908381995364407140168253057908003809981⟩,⟨-43442498313220357929010981932843547384875295766901677149481,-43442498313220357929010981932843547384875295766901177347651⟩⟩, + ⟨⟨84848629518008511580099574087585053486084562044728743997775,84848629518008511580099574087585053486084562044729897742327⟩,⟨-71196453734458615960758558584696107695641119253726599286103,-71196453734458615960758558584696107695641119253725665296258⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897059732309497,165754464703139973139323359413314713952739909897062055963333⟩,⟨-95698384815740185726778750207103071611806446191004154488853,-95698384815740185726778750207103071611806446191002623798974⟩⟩, + ⟨⟨285601700455009976285920665661329689859701306441212004117957,285601700455009976285920665661329689859701306441216160597536⟩,⟨-103950517821435734608119297814250836597623772746805213624855,-103950517821435734608119297814250836597623772746802926737757⟩⟩, + ⟨⟨446788794393062887824704608385353823704387924306884492619969,446788794393062887824704608385353823704387924306891296248109⟩,⟨-78780919129703923327070689197895356221776260389284932706915,-78780919129703923327070689197895356221776260389281743410597⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789267377050675,645964097506246253655756563897945733379693511789277764036440⟩,⟨-2374399385,1844083634⟩⟩, + ⟨⟨872634364048950952782626188252644186922632664661883055084381,872634364048950952782626188252644186922632664661898035190010⟩,⟨153868982675202975248184939839639367620656758572814156899664,153868982675202975248184939839639367620656758572822449580648⟩⟩, + ⟨⟨1108267823048449791360234419811165647822922562312689580563246,1108267823048449791360234419811165647822922562312710169910305⟩,⟨403376499184638375403518324754425258050837438851292873722628,403376499184638375403518324754425258050837438851307157362956⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176474213707040,1326035717625119785114586875306517711621919279176501349525072⟩,⟨765587078525921485814230001656824572894451569528014769518827,765587078525921485814230001656824572894451569528037279511018⟩⟩, + ⟨⟨1491299512408517599531830114163394900071422262498146351365971,1491299512408517599531830114163394900071422262498180790499945⟩,⟨1251348870836844634126292425684618788858588312003472685206426,1251348870836844634126292425684618788858588312003505868467628⟩⟩, + ⟨⟨1562904552378835537570571878051248956134713849857775718824967,1562904552378835537570571878051248956134713849857817922434353⟩,⟨1862597115179322846206345850370667094126528306005874232200059,1862597115179322846206345850370667094126528306005920588173208⟩⟩, + ⟨⟨1495287262745940401980917971985985493934475721734404014349372,1495287262745940401980917971985985493934475721734454022649567⟩,⟨2589913510986562080301927490833042405511561092141544921585286,2589913510986562080301927490833042405511561092141606792584004⟩⟩] +lemma tw0_0_0_1_calc (j : Fin 31) : taylorWaveBox 0 0 0 1 j = tw0_0_0_1 j := by + revert j + decide +kernel +def tw0_0_0_2 : Fin 31 → CI := ![⟨⟨-1695094429072569102122468916644420780784284438590527489339535,-1695094429072569102122468916644420780784284438590481599203688⟩,⟨-978663224926882768659580888799522481530988635632547453720665,-978663224926882768659580888799522481530988635632511608174549⟩⟩, + ⟨⟨-1137795830430953286380218481685083875195540682265793215962535,-1137795830430953286380218481685083875195540682265761276990737⟩,⟨-954724061669659931782715244923900220623876932386643925913095,-954724061669659931782715244923900220623876932386615106211606⟩⟩, + ⟨⟨-709805131334526169086998388959587520856896841573690403284279,-709805131334526169086998388959587520856896841573669321296415⟩,⟨-845912815309726593406534258002074150339958283688914110368997,-845912815309726593406534258002074150339958283688891882765689⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155089771946948,-400860456930051182042964332052284408435092945155076709762754⟩,⟨-694310678148124304229363268257554751809242906046679364151828,-694310678148124304229363268257554751809242906046662945809876⟩⟩, + ⟨⟨-193606820988354452311627618403678216976649339107665275473554,-193606820988354452311627618403678216976649339107657803547644⟩,⟨-531930368917897093835836496113613425491195371861309649632776,-531930368917897093835836496113613425491195371861298074267635⟩⟩, + ⟨⟨-67138009109410116376999859776520833875578685290176777263589,-67138009109410116376999859776520833875578685290172945191245⟩,⟨-380758570467525762942426170354766133773624719590987656035096,-380758570467525762942426170354766133773624719590979907738079⟩⟩, + ⟨⟨-724168665,932426294⟩,⟨-253669507901048013636563366376836227212832254355953797036139,-253669507901048013636563366376836227212832254355948910620695⟩⟩, + ⟨⟨27499728531214383668019142564462933555437029494855150793562,27499728531214383668019142564462933555437029494856351602153⟩,⟨-155958710463498552501217759377312208393676685144468370157131,-155958710463498552501217759377312208393676685144465498811097⟩⟩, + ⟨⟨31749878914899189946056820694435584930054986899630527406890,31749878914899189946056820694435584930054986899631326959800⟩,⟨-87232075389103949340881321437660394413247734979782905343488,-87232075389103949340881321437660394413247734979781358150731⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072192497938227,25053778558128198877685270753267775527193309072192978420569⟩,⟨-43394417384257769014335204266097171988077681627917299847583,-43394417384257769014335204266097171988077681627916553387698⟩⟩, + ⟨⟨15532656667626443600692342463490150923831817022637398272409,15532656667626443600692342463490150923831817022637651479387⟩,⟨-18511099386176223552364549954528775041576762974180471433274,-18511099386176223552364549954528775041576762974180160802572⟩⟩, + ⟨⟨7582146308577781167048519661374986257029842114224204410218,7582146308577781167048519661374986257029842114224315776826⟩,⟨-6362176171059791298843583473045565818401512252472379423612,-6362176171059791298843583473045565818401512252472274729879⟩⟩, + ⟨⟨2712151086516110563395950266631073249254855101744789950132,2712151086516110563395950266631073249254855101744827162620⟩,⟨-1565861159883012429855329422079235970449581817012057717173,-1565861159883012429855329422079235970449581817012032328615⟩⟩, + ⟨⟨581304958861167509143732254478369975265291028603292438747,581304958861167509143732254478369975265291028603300078107⟩,⟨-211577702056804264530157905502277950387705035566055117802,-211577702056804264530157905502277950387705035566051722685⟩⟩, + ⟨⟨38075857046752576294242617035476613377362471959098131160,38075857046752576294242617035476613377362471959098619705⟩,⟨-6713800910941011637699985977652083387557868529017555291,-6713800910941011637699985977652083387557868529017448213⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨38075857046752576294242617035476613377362471959098131160,38075857046752576294242617035476613377362471959098619705⟩,⟨6713800910941011637699985977652083387557868529017448214,6713800910941011637699985977652083387557868529017555292⟩⟩, + ⟨⟨581304958861167509143732254478369975265291028603292438746,581304958861167509143732254478369975265291028603300078106⟩,⟨211577702056804264530157905502277950387705035566051722688,211577702056804264530157905502277950387705035566055117805⟩⟩, + ⟨⟨2712151086516110563395950266631073249254855101744789950123,2712151086516110563395950266631073249254855101744827162614⟩,⟨1565861159883012429855329422079235970449581817012032328625,1565861159883012429855329422079235970449581817012057717190⟩⟩, + ⟨⟨7582146308577781167048519661374986257029842114224204410193,7582146308577781167048519661374986257029842114224315776790⟩,⟨6362176171059791298843583473045565818401512252472274729920,6362176171059791298843583473045565818401512252472379423640⟩⟩, + ⟨⟨15532656667626443600692342463490150923831817022637398272316,15532656667626443600692342463490150923831817022637651479274⟩,⟨18511099386176223552364549954528775041576762974180160802675,18511099386176223552364549954528775041576762974180471433350⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072192497938008,25053778558128198877685270753267775527193309072192978420337⟩,⟨43394417384257769014335204266097171988077681627916553387828,43394417384257769014335204266097171988077681627917299847702⟩⟩, + ⟨⟨31749878914899189946056820694435584930054986899630527406437,31749878914899189946056820694435584930054986899631326959358⟩,⟨87232075389103949340881321437660394413247734979781358150889,87232075389103949340881321437660394413247734979782905343654⟩⟩, + ⟨⟨27499728531214383668019142564462933555437029494855150792587,27499728531214383668019142564462933555437029494856351601375⟩,⟨155958710463498552501217759377312208393676685144465498811155,155958710463498552501217759377312208393676685144468370157393⟩⟩, + ⟨⟨-724169951,932424459⟩,⟨253669507901048013636563366376836227212832254355948910620908,253669507901048013636563366376836227212832254355953797035803⟩⟩, + ⟨⟨-67138009109410116376999859776520833875578685290176777265532,-67138009109410116376999859776520833875578685290172945193933⟩,⟨380758570467525762942426170354766133773624719590979907737900,380758570467525762942426170354766133773624719590987656034213⟩⟩, + ⟨⟨-193606820988354452311627618403678216976649339107665275475467,-193606820988354452311627618403678216976649339107657803550607⟩,⟨531930368917897093835836496113613425491195371861298074267237,531930368917897093835836496113613425491195371861309649631360⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155089771949488,-400860456930051182042964332052284408435092945155076709766668⟩,⟨694310678148124304229363268257554751809242906046662945808705,694310678148124304229363268257554751809242906046679364149335⟩⟩, + ⟨⟨-709805131334526169086998388959587520856896841573690403288619,-709805131334526169086998388959587520856896841573669321300859⟩,⟨845912815309726593406534258002074150339958283688891882762204,845912815309726593406534258002074150339958283688914110365410⟩⟩, + ⟨⟨-1137795830430953286380218481685083875195540682265793215965650,-1137795830430953286380218481685083875195540682265761276996449⟩,⟨954724061669659931782715244923900220623876932386615106207639,954724061669659931782715244923900220623876932386643925906622⟩⟩, + ⟨⟨-1695094429072569102122468916644420780784284438590527489340913,-1695094429072569102122468916644420780784284438590481599213788⟩,⟨978663224926882768659580888799522481530988635632511608169266,978663224926882768659580888799522481530988635632547453707013⟩⟩] +lemma tw0_0_0_2_calc (j : Fin 31) : taylorWaveBox 0 0 0 2 j = tw0_0_0_2 j := by + revert j + decide +kernel +def tw0_0_0_3 : Fin 31 → CI := ![⟨⟨-512426866294798386834526424192888519295985354623603215344471,-512426866294798386834526424192888519295985354623582815555034⟩,⟨887549367585894654647575190685819342845674226129482480905978,887549367585894654647575190685819342845674226129509334082306⟩⟩, + ⟨⟨-466566193076170810134931470077943379882423168850136942560106,-466566193076170810134931470077943379882423168850121373470731⟩,⟨556031936781530370904938834064143310759047138503230873887887,556031936781530370904938834064143310759047138503248252118609⟩⟩, + ⟨⟨-383863059111205070812026712300265444237629576211337875163814,-383863059111205070812026712300265444237629576211326566723318⟩,⟨322099351322794610518364948978940752637823052953880642960968,322099351322794610518364948978940752637823052953891234937678⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418117327269420,-290832176770545960434917438483929282263670530418109524222852⟩,⟨167912035547479535397937618679525710002908481003055598174329,167912035547479535397937618679525710002908481003061604129861⟩⟩, + ⟨⟨-204246599237239045070885971140693306495818147401948592661273,-204246599237239045070885971140693306495818147401943497903010⟩,⟨74339682572453043763261082649251941503125089618162771563774,74339682572453043763261082649251941503125089618165877207924⟩⟩, + ⟨⟨-132909814196903393588510482845495195246857378492299841501834,-132909814196903393588510482845495195246857378492296713770867⟩,⟨23435586243863048732270131349435914465389619036885426596675,23435586243863048732270131349435914465389619036886838840057⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351061985719703,-79692626246167045120505549490478022520911642351060196937508⟩,⟨-292930360,227504296⟩⟩, + ⟨⟨-43551887916041304011083115018811865578490225784356763541815,-43551887916041304011083115018811865578490225784355823080773⟩,⟨-7679372900389043808590276640583160452018870366007063611029,-7679372900389043808590276640583160452018870366006703837807⟩⟩, + ⟨⟨-21314817004428886691211979540404172605418256349755928640211,-21314817004428886691211979540404172605418256349755482742532⟩,⟨-7757958938443215543704348411906646843813595576634161469291,-7757958938443215543704348411906646843813595576633941407308⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566132880579,-9088505524079561263591169952622790070739704075565947612774⟩,⟨-5247251110858735481185550583735178437590890031345647414742,-5247251110858735481185550583735178437590890031345530080235⟩⟩, + ⟨⟨-3230796324526764162770597549477985077129362594124921121964,-3230796324526764162770597549477985077129362594124856622734⟩,⟨-2710960004319319669021205531909273409391496851491690794873,-2710960004319319669021205531909273409391496851491637972664⟩⟩, + ⟨⟨-888327374215354669144868628696030710789405688296796873516,-888327374215354669144868628696030710789405688296779427878⟩,⟨-1058667339620930080856669405012946150073749534842853410120,-1058667339620930080856669405012946150073749534842834490564⟩⟩, + ⟨⟨-163976597214335483787048455741724326174715313479551122092,-163976597214335483787048455741724326174715313479547941453⟩,⟨-284015797627486289487224061019462189710615752361441225487,-284015797627486289487224061019462189710615752361436424553⟩⟩, + ⟨⟨-14770910098779252537546209863807502766825433358260947997,-14770910098779252537546209863807502766825433358260663955⟩,⟨-40582741961190240621097360938474059818729351055642782853,-40582741961190240621097360938474059818729351055642120345⟩⟩, + ⟨⟨-234355862438630487322701313494359144653896190368864115,-234355862438630487322701313494359144653896190368859630⟩,⟨-1329098141969033935885104828454951952468573784922993323,-1329098141969033935885104828454951952468573784922972038⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-234355862438630487322701313494359144653896190368864115,-234355862438630487322701313494359144653896190368859630⟩,⟨1329098141969033935885104828454951952468573784922972038,1329098141969033935885104828454951952468573784922993323⟩⟩, + ⟨⟨-14770910098779252537546209863807502766825433358260947997,-14770910098779252537546209863807502766825433358260663955⟩,⟨40582741961190240621097360938474059818729351055642120345,40582741961190240621097360938474059818729351055642782853⟩⟩, + ⟨⟨-163976597214335483787048455741724326174715313479551122093,-163976597214335483787048455741724326174715313479547941455⟩,⟨284015797627486289487224061019462189710615752361436424552,284015797627486289487224061019462189710615752361441225486⟩⟩, + ⟨⟨-888327374215354669144868628696030710789405688296796873520,-888327374215354669144868628696030710789405688296779427884⟩,⟨1058667339620930080856669405012946150073749534842834490561,1058667339620930080856669405012946150073749534842853410115⟩⟩, + ⟨⟨-3230796324526764162770597549477985077129362594124921121977,-3230796324526764162770597549477985077129362594124856622752⟩,⟨2710960004319319669021205531909273409391496851491637972648,2710960004319319669021205531909273409391496851491690794854⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566132880604,-9088505524079561263591169952622790070739704075565947612801⟩,⟨5247251110858735481185550583735178437590890031345530080190,5247251110858735481185550583735178437590890031345647414693⟩⟩, + ⟨⟨-21314817004428886691211979540404172605418256349755928640252,-21314817004428886691211979540404172605418256349755482742570⟩,⟨7757958938443215543704348411906646843813595576633941407198,7757958938443215543704348411906646843813595576634161469183⟩⟩, + ⟨⟨-43551887916041304011083115018811865578490225784356763541889,-43551887916041304011083115018811865578490225784355823080790⟩,⟨7679372900389043808590276640583160452018870366006703837535,7679372900389043808590276640583160452018870366007063610812⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351061985719598,-79692626246167045120505549490478022520911642351060196937575⟩,⟨-227504700,292929784⟩⟩, + ⟨⟨-132909814196903393588510482845495195246857378492299841501526,-132909814196903393588510482845495195246857378492296713770805⟩,⟨-23435586243863048732270131349435914465389619036886838840735,-23435586243863048732270131349435914465389619036885426597614⟩⟩, + ⟨⟨-204246599237239045070885971140693306495818147401948592660730,-204246599237239045070885971140693306495818147401943497902857⟩,⟨-74339682572453043763261082649251941503125089618165877208659,-74339682572453043763261082649251941503125089618162771564912⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418117327268376,-290832176770545960434917438483929282263670530418109524222362⟩,⟨-167912035547479535397937618679525710002908481003061604130925,-167912035547479535397937618679525710002908481003055598175968⟩⟩, + ⟨⟨-383863059111205070812026712300265444237629576211337875162187,-383863059111205070812026712300265444237629576211326566721737⟩,⟨-322099351322794610518364948978940752637823052953891234939648,-322099351322794610518364948978940752637823052953880642962985⟩⟩, + ⟨⟨-466566193076170810134931470077943379882423168850136942556943,-466566193076170810134931470077943379882423168850121373468793⟩,⟨-556031936781530370904938834064143310759047138503248252120131,-556031936781530370904938834064143310759047138503230873890679⟩⟩, + ⟨⟨-512426866294798386834526424192888519295985354623603215337323,-512426866294798386834526424192888519295985354623582815552268⟩,⟨-887549367585894654647575190685819342845674226129509334083028,-887549367585894654647575190685819342845674226129482480911267⟩⟩] +lemma tw0_0_0_3_calc (j : Fin 31) : taylorWaveBox 0 0 0 3 j = tw0_0_0_3 j := by + revert j + decide +kernel +def tw0_0_0_4 : Fin 31 → CI := ![⟨⟨387266468459182445732882002369812590770516277905892311506753,387266468459182445732882002369812590770516277905905261122748⟩,⟨223588399813024700714287950446248739589886525793187620047131,223588399813024700714287950446248739589886525793197232838425⟩⟩, + ⟨⟨226440387671835575779638662315557008443012035154159771062120,226440387671835575779638662315557008443012035154167569015629⟩,⟨190006045779077535319477455356696796594080787096011583068262,190006045779077535319477455356696796594080787096018528286619⟩⟩, + ⟨⟨121803374314282242515059580937364840020882892369743826158083,121803374314282242515059580937364840020882892369748219275738⟩,⟨145159608929143177440594202884837977846949198249456125909849,145159608929143177440594202884837977846949198249460864306835⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417529368897861,58612357480585547144046300481781429591051213417531651940766⟩,⟨101519581107763923054200619629232151794946219155362480157016,101519581107763923054200619629232151794946219155365527080966⟩⟩, + ⟨⟨23786990805907151024567088076329075938246661466415260894510,23786990805907151024567088076329075938246661466416330345644⟩,⟨65354220116004605215685048791067369691632714526923674987136,65354220116004605215685048791067369691632714526925513221696⟩⟩, + ⟨⟨6817135701508349124214756732230520207432973346069133322995,6817135701508349124214756732230520207432973346069565827560⟩,⟨38661897765831120961767750584236274754521214523755974944697,38661897765831120961767750584236274754521214523757007829398⟩⟩, + ⟨⟨-76688989,59560486⟩,⟨20863480763352960873051637232040362388611491494814079617125,20863480763352960873051637232040362388611491494814614329732⟩⟩, + ⟨⟨-1787071221336204672818153188813837489257309364832056601417,-1787071221336204672818153188813837489257309364831967189961⟩,⟨10134984527926033373401645209154034009249209260115494653082,10134984527926033373401645209154034009249209260115745768963⟩⟩, + ⟨⟨-1579689144954179060664178848536426041812154069130220408204,-1579689144954179060664178848536426041812154069130170570491⟩,⟨4340160255519186637671596013470766728806344930475471413684,4340160255519186637671596013470766728806344930475576023308⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209648927224514,-915818085634149174125723445027834837360175209648903830639⟩,⟨1586243454808811297721884681706752371796034674302543112427,1586243454808811297721884681706752371796034674302580496929⟩⟩, + ⟨⟨-394293149710431889742852048246849134765078790827916546408,-394293149710431889742852048246849134765078790827907608654⟩,⟨469900277702693880679613471358736880588931781358607969270,469900277702693880679613471358736880588931781358618846042⟩⟩, + ⟨⟨-123181538398094984656876593835864720825104932892473692311,-123181538398094984656876593835864720825104932892471098821⟩,⟨103361583437691457304750207335622019583856814542790953635,103361583437691457304750207335622019583856814542793312539⟩⟩, + ⟨⟨-24785053981387676526904448151668005809313041785977782999,-24785053981387676526904448151668005809313041785977285145⟩,⟨14309657588033580845714428828559919333752737650764133388,14309657588033580845714428828559919333752737650764456501⟩⟩, + ⟨⟨-2361008222366768479213441209548139556167974870593343496,-2361008222366768479213441209548139556167974870593297436⟩,⟨859336715799262721166414047772027528291595002289277973,859336715799262721166414047772027528291595002289297234⟩⟩, + ⟨⟨-38661897765831120961767750584236274754521214523756860,-38661897765831120961767750584236274754521214523756117⟩,⟨6817135701508349124214756732230520207432973346069289,6817135701508349124214756732230520207432973346069442⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-38661897765831120961767750584236274754521214523756860,-38661897765831120961767750584236274754521214523756117⟩,⟨-6817135701508349124214756732230520207432973346069442,-6817135701508349124214756732230520207432973346069289⟩⟩, + ⟨⟨-2361008222366768479213441209548139556167974870593343496,-2361008222366768479213441209548139556167974870593297436⟩,⟨-859336715799262721166414047772027528291595002289297234,-859336715799262721166414047772027528291595002289277973⟩⟩, + ⟨⟨-24785053981387676526904448151668005809313041785977782999,-24785053981387676526904448151668005809313041785977285145⟩,⟨-14309657588033580845714428828559919333752737650764456501,-14309657588033580845714428828559919333752737650764133388⟩⟩, + ⟨⟨-123181538398094984656876593835864720825104932892473692310,-123181538398094984656876593835864720825104932892471098820⟩,⟨-103361583437691457304750207335622019583856814542793312539,-103361583437691457304750207335622019583856814542790953636⟩⟩, + ⟨⟨-394293149710431889742852048246849134765078790827916546405,-394293149710431889742852048246849134765078790827907608652⟩,⟨-469900277702693880679613471358736880588931781358618846044,-469900277702693880679613471358736880588931781358607969272⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209648927224506,-915818085634149174125723445027834837360175209648903830631⟩,⟨-1586243454808811297721884681706752371796034674302580496934,-1586243454808811297721884681706752371796034674302543112431⟩⟩, + ⟨⟨-1579689144954179060664178848536426041812154069130220408182,-1579689144954179060664178848536426041812154069130170570468⟩,⟨-4340160255519186637671596013470766728806344930475576023316,-4340160255519186637671596013470766728806344930475471413692⟩⟩, + ⟨⟨-1787071221336204672818153188813837489257309364832056601367,-1787071221336204672818153188813837489257309364831967189898⟩,⟨-10134984527926033373401645209154034009249209260115745768980,-10134984527926033373401645209154034009249209260115494653086⟩⟩, + ⟨⟨-76688838,59560592⟩,⟨-20863480763352960873051637232040362388611491494814614329704,-20863480763352960873051637232040362388611491494814079617143⟩⟩, + ⟨⟨6817135701508349124214756732230520207432973346069133323268,6817135701508349124214756732230520207432973346069565827758⟩,⟨-38661897765831120961767750584236274754521214523757007829309,-38661897765831120961767750584236274754521214523755974944679⟩⟩, + ⟨⟨23786990805907151024567088076329075938246661466415260894874,23786990805907151024567088076329075938246661466416330345879⟩,⟨-65354220116004605215685048791067369691632714526925513221522,-65354220116004605215685048791067369691632714526923674987087⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417529368898434,58612357480585547144046300481781429591051213417531651941138⟩,⟨-101519581107763923054200619629232151794946219155365527080602,-101519581107763923054200619629232151794946219155362480156845⟩⟩, + ⟨⟨121803374314282242515059580937364840020882892369743826158846,121803374314282242515059580937364840020882892369748219276483⟩,⟨-145159608929143177440594202884837977846949198249460864306219,-145159608929143177440594202884837977846949198249456125909251⟩⟩, + ⟨⟨226440387671835575779638662315557008443012035154159771063257,226440387671835575779638662315557008443012035154167569016249⟩,⟨-190006045779077535319477455356696796594080787096018528285331,-190006045779077535319477455356696796594080787096011583067473⟩⟩, + ⟨⟨387266468459182445732882002369812590770516277905892311509060,387266468459182445732882002369812590770516277905905261123064⟩,⟨-223588399813024700714287950446248739589886525793197232835306,-223588399813024700714287950446248739589886525793187620045925⟩⟩] +lemma tw0_0_0_4_calc (j : Fin 31) : taylorWaveBox 0 0 0 4 j = tw0_0_0_4 j := by + revert j + decide +kernel +def tw0_0_0_5 : Fin 31 → CI := ![⟨⟨83621865985773321414277976643829980057853009589708834615730,83621865985773321414277976643829980057853009589712695967935⟩,⟨-144837320511075112676372101650136743142432507120800597064222,-144837320511075112676372101650136743142432507120795292887653⟩⟩, + ⟨⟨66324621950799547460504643735517851417898098257832826004099,66324621950799547460504643735517851417898098257835461460481⟩,⟨-79042606487318158828560655692398841388417180233456034430036,-79042606487318158828560655692398841388417180233453060830332⟩⟩, + ⟨⟨47050957881959732347599776108814630330867277089763593584312,47050957881959732347599776108814630330867277089765279220982⟩,⟨-39480441405290147336509964283296050983178141225619933086575,-39480441405290147336509964283296050983178141225618383463886⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717339082624798,30374587638444219469947910571978757115463861717340090947628⟩,⟨-17536776349579649255059588727456133033828655476708443133068,-17536776349579649255059588727456133033828655476707704226934⟩⟩, + ⟨⟨17924442188673284749849084188206799760454136962030567090496,17924442188673284749849084188206799760454136962031128311054⟩,⟨-6523963422502416436476375974991967465117522059589540973096,-6523963422502416436476375974991967465117522059589226892563⟩⟩, + ⟨⟨9639677301188467455608335945029696646703704304963814798610,9639677301188467455608335945029696646703704304964103014641⟩,⟨-1699735193522486600732061712966990960208800165449712028448,-1699735193522486600732061712966990960208800165449598780469⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500981564906,4681754135318688100685463933953437859495028018501116456621⟩,⟨-13365342,17208969⟩⟩, + ⟨⟨2021586853154199690146393294379091838202796689056349080228,2021586853154199690146393294379091838202796689056405604270⟩,⟨356460306056606981969844468547215102618380568457299748155,356460306056606981969844468547215102618380568457318717367⟩⟩, + ⟨⟨757500865230082034110798552525063411981332812039344479847,757500865230082034110798552525063411981332812039365148872⟩,⟨275707767374643940844213051734025932349301982802959897425,275707767374643940844213051734025932349301982802969473352⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666712235256,237301465925345464608968051343584039964561419666718583320⟩,⟨137006065231091009805153036933251039326786370911780052535,137006065231091009805153036933251039326786370911783988355⟩⟩, + ⟨⟨58580764299626461126662682856730191641007324884471702636,58580764299626461126662682856730191641007324884473245073⟩,⟨49155097717899735553349268152943024662412217379598945592,49155097717899735553349268152943024662412217379600216296⟩⟩, + ⟨⟨10308571148928886621517752440548077005682710650206062957,10308571148928886621517752440548077005682710650206331032⟩,⟨12285276701249023220470289867835743486032179339611977099,12285276701249023220470289867835743486032179339612274862⟩⟩, + ⟨⟨1070359884617898514102758101041023744740518522748282485,1070359884617898514102758101041023744740518522748310062⟩,⟨1853917702541761442257562901121750312223136091146193004,1853917702541761442257562901121750312223136091146236145⟩⟩, + ⟨⟨42852157354205456701179259154598265470911238148802173,42852157354205456701179259154598265470911238148803271⟩,⟨117735334705595822399294529518444230275299043208474033,117735334705595822399294529518444230275299043208476705⟩⟩, + ⟨⟨169973519352248660073206171296699096020880016544963,169973519352248660073206171296699096020880016544969⟩,⟨963967730118846745560833594502969664670370430496385,963967730118846745560833594502969664670370430496407⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨169973519352248660073206171296699096020880016544963,169973519352248660073206171296699096020880016544969⟩,⟨-963967730118846745560833594502969664670370430496407,-963967730118846745560833594502969664670370430496385⟩⟩, + ⟨⟨42852157354205456701179259154598265470911238148802173,42852157354205456701179259154598265470911238148803271⟩,⟨-117735334705595822399294529518444230275299043208476705,-117735334705595822399294529518444230275299043208474033⟩⟩, + ⟨⟨1070359884617898514102758101041023744740518522748282485,1070359884617898514102758101041023744740518522748310062⟩,⟨-1853917702541761442257562901121750312223136091146236145,-1853917702541761442257562901121750312223136091146193004⟩⟩, + ⟨⟨10308571148928886621517752440548077005682710650206062957,10308571148928886621517752440548077005682710650206331032⟩,⟨-12285276701249023220470289867835743486032179339612274862,-12285276701249023220470289867835743486032179339611977099⟩⟩, + ⟨⟨58580764299626461126662682856730191641007324884471702637,58580764299626461126662682856730191641007324884473245074⟩,⟨-49155097717899735553349268152943024662412217379600216296,-49155097717899735553349268152943024662412217379598945592⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666712235257,237301465925345464608968051343584039964561419666718583320⟩,⟨-137006065231091009805153036933251039326786370911783988354,-137006065231091009805153036933251039326786370911780052534⟩⟩, + ⟨⟨757500865230082034110798552525063411981332812039344479849,757500865230082034110798552525063411981332812039365148874⟩,⟨-275707767374643940844213051734025932349301982802969473348,-275707767374643940844213051734025932349301982802959897421⟩⟩, + ⟨⟨2021586853154199690146393294379091838202796689056349080229,2021586853154199690146393294379091838202796689056405604274⟩,⟨-356460306056606981969844468547215102618380568457318717357,-356460306056606981969844468547215102618380568457299748142⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500981564910,4681754135318688100685463933953437859495028018501116456615⟩,⟨-17208936,13365366⟩⟩, + ⟨⟨9639677301188467455608335945029696646703704304963814798606,9639677301188467455608335945029696646703704304964103014618⟩,⟨1699735193522486600732061712966990960208800165449598780537,1699735193522486600732061712966990960208800165449712028497⟩⟩, + ⟨⟨17924442188673284749849084188206799760454136962030567090482,17924442188673284749849084188206799760454136962031128311007⟩,⟨6523963422502416436476375974991967465117522059589226892663,6523963422502416436476375974991967465117522059589540973161⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717339082624747,30374587638444219469947910571978757115463861717340090947519⟩,⟨17536776349579649255059588727456133033828655476707704227106,17536776349579649255059588727456133033828655476708443133179⟩⟩, + ⟨⟨47050957881959732347599776108814630330867277089763593584119,47050957881959732347599776108814630330867277089765279220783⟩,⟨39480441405290147336509964283296050983178141225618383464133,39480441405290147336509964283296050983178141225619933086816⟩⟩, + ⟨⟨66324621950799547460504643735517851417898098257832826003824,66324621950799547460504643735517851417898098257835461460031⟩,⟨79042606487318158828560655692398841388417180233453060830729,79042606487318158828560655692398841388417180233456034430253⟩⟩, + ⟨⟨83621865985773321414277976643829980057853009589708834615279,83621865985773321414277976643829980057853009589712695966769⟩,⟨144837320511075112676372101650136743142432507120795292888516,144837320511075112676372101650136743142432507120800597064339⟩⟩] +lemma tw0_0_0_5_calc (j : Fin 31) : taylorWaveBox 0 0 0 5 j = tw0_0_0_5 j := by + revert j + decide +kernel +def tw0_0_0_6 : Fin 31 → CI := ![⟨⟨-47397902300335817857262145290753400473401218593750623877266,-47397902300335817857262145290753400473401218593748737217333⟩,⟨-27365191652122466690056424259448641919058449328569115799113,-27365191652122466690056424259448641919058449328567765068448⟩⟩, + ⟨⟨-24142190319833800307525538186920112791119652769916492731167,-24142190319833800307525538186920112791119652769915507649841⟩,⟨-20257702993184241603260159721961398249959424458443378818034,-20257702993184241603260159721961398249959424458442509381417⟩⟩, + ⟨⟨-11197285005773914269266410687199682641234832096648251387348,-11197285005773914269266410687199682641234832096647776247488⟩,⟨-13344404632932341331190782994347788669671064935227186293555,-13344404632932341331190782994347788669671064935226665743460⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210104571196292,-4591117312290554821118816819884099063826981210104363137137⟩,⟨-7952048448396308887279441801663526024767544990105696703777,-7952048448396308887279441801663526024767544990105407413320⟩⟩, + ⟨⟨-1565638827532244961997581264415958121240439123779684038985,-1565638827532244961997581264415958121240439123779603681484⟩,⟨-4301557325666252818955316753096982059165796420943287492058,-4301557325666252818955316753096982059165796420943139116509⟩⟩, + ⟨⟨-370824694237379820796343384560246753938321550671641223952,-370824694237379820796343384560246753938321550671615336704⟩,⟨-2103051346693748195838300849979613102887094057875954269287,-2103051346693748195838300849979613102887094057875884696082⟩⟩, + ⟨⟨-2624279,3378974⟩,⟨-919260274839426580241716221779161802910425528549069809660,-919260274839426580241716221779161802910425528549040397636⟩⟩, + ⟨⟨62214059933544765275415449729383248041220713330727062584,62214059933544765275415449729383248041220713330730571370⟩,⟨-352833467025718993311894744330915646235670006213013466725,-352833467025718993311894744330915646235670006213002478314⟩⟩, + ⟨⟨42105072747588719168433326868721524037462225328578123896,42105072747588719168433326868721524037462225328579720322⟩,⟨-115682736618494196734337444939219641063815043768819764310,-115682736618494196734337444939219641063815043768816239583⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351970314230,17934052001134979769995378202672261968074145351970886514⟩,⟨-31062689251548081590935319537748148534248222617600262923,-31062689251548081590935319537748148534248222617599333087⟩⟩, + ⟨⟨5361989370730632641494191898514235351119448997377004733,5361989370730632641494191898514235351119448997377160414⟩,⟨-6390170096020198597493301477813417976065486125442971157,-6390170096020198597493301477813417976065486125442782562⟩⟩, + ⟨⟨1072092639776716122330421774463949210827334908715568078,1072092639776716122330421774463949210827334908715597476⟩,⟨-899592538624519016429986202268234055605668376299800167,-899592538624519016429986202268234055605668376299773909⟩⟩, + ⟨⟨121338629888859693714591091944328705211907119599997634,121338629888859693714591091944328705211907119600000845⟩,⟨-70054890629433514726544446104188523312789630281136122,-70054890629433514726544446104188523312789630281134093⟩⟩, + ⟨⟨5137173091375489694091849120974033294876380156889549,5137173091375489694091849120974033294876380156889683⟩,⟨-1869778093533967973416416573337520263681318693241336,-1869778093533967973416416573337520263681318693241282⟩⟩, + ⟨⟨21030513466937481958383008499796131028870940578758,21030513466937481958383008499796131028870940578760⟩,⟨-3708246942373798207963433845602467539383215506717,-3708246942373798207963433845602467539383215506716⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨21030513466937481958383008499796131028870940578758,21030513466937481958383008499796131028870940578760⟩,⟨3708246942373798207963433845602467539383215506716,3708246942373798207963433845602467539383215506717⟩⟩, + ⟨⟨5137173091375489694091849120974033294876380156889549,5137173091375489694091849120974033294876380156889683⟩,⟨1869778093533967973416416573337520263681318693241282,1869778093533967973416416573337520263681318693241336⟩⟩, + ⟨⟨121338629888859693714591091944328705211907119599997634,121338629888859693714591091944328705211907119600000845⟩,⟨70054890629433514726544446104188523312789630281134093,70054890629433514726544446104188523312789630281136122⟩⟩, + ⟨⟨1072092639776716122330421774463949210827334908715568078,1072092639776716122330421774463949210827334908715597476⟩,⟨899592538624519016429986202268234055605668376299773909,899592538624519016429986202268234055605668376299800167⟩⟩, + ⟨⟨5361989370730632641494191898514235351119448997377004733,5361989370730632641494191898514235351119448997377160414⟩,⟨6390170096020198597493301477813417976065486125442782562,6390170096020198597493301477813417976065486125442971157⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351970314229,17934052001134979769995378202672261968074145351970886514⟩,⟨31062689251548081590935319537748148534248222617599333087,31062689251548081590935319537748148534248222617600262923⟩⟩, + ⟨⟨42105072747588719168433326868721524037462225328578123895,42105072747588719168433326868721524037462225328579720321⟩,⟨115682736618494196734337444939219641063815043768816239583,115682736618494196734337444939219641063815043768819764311⟩⟩, + ⟨⟨62214059933544765275415449729383248041220713330727062582,62214059933544765275415449729383248041220713330730571369⟩,⟨352833467025718993311894744330915646235670006213002478314,352833467025718993311894744330915646235670006213013466726⟩⟩, + ⟨⟨-2624284,3378967⟩,⟨919260274839426580241716221779161802910425528549040397637,919260274839426580241716221779161802910425528549069809658⟩⟩, + ⟨⟨-370824694237379820796343384560246753938321550671641223963,-370824694237379820796343384560246753938321550671615336719⟩,⟨2103051346693748195838300849979613102887094057875884696081,2103051346693748195838300849979613102887094057875954269282⟩⟩, + ⟨⟨-1565638827532244961997581264415958121240439123779684039000,-1565638827532244961997581264415958121240439123779603681507⟩,⟨4301557325666252818955316753096982059165796420943139116506,4301557325666252818955316753096982059165796420943287492046⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210104571196321,-4591117312290554821118816819884099063826981210104363137182⟩,⟨7952048448396308887279441801663526024767544990105407413307,7952048448396308887279441801663526024767544990105696703749⟩⟩, + ⟨⟨-11197285005773914269266410687199682641234832096648251387416,-11197285005773914269266410687199682641234832096647776247558⟩,⟨13344404632932341331190782994347788669671064935226665743405,13344404632932341331190782994347788669671064935227186293499⟩⟩, + ⟨⟨-24142190319833800307525538186920112791119652769916492731233,-24142190319833800307525538186920112791119652769915507649963⟩,⟨20257702993184241603260159721961398249959424458442509381333,20257702993184241603260159721961398249959424458443378817897⟩⟩, + ⟨⟨-47397902300335817857262145290753400473401218593750623877304,-47397902300335817857262145290753400473401218593748737217615⟩,⟨27365191652122466690056424259448641919058449328567765068300,27365191652122466690056424259448641919058449328569115798732⟩⟩] +lemma tw0_0_0_6_calc (j : Fin 31) : taylorWaveBox 0 0 0 6 j = tw0_0_0_6 j := by + revert j + decide +kernel +def tw0_0_0_7 : Fin 31 → CI := ![⟨⟨-7960211579480062797719879135244471042925264892918758233861,-7960211579480062797719879135244471042925264892918339984096⟩,⟨13787490894657571028441851363188980505116571387318341461301,13787490894657571028441851363188980505116571387318934155377⟩⟩, + ⟨⟨-5499878473011617916523518971146141930783091424258070666464,-5499878473011617916523518971146141930783091424257817111537⟩,⟨6554499929043153270080906183299498299049848323147523616746,6554499929043153270080906183299498299049848323147811925674⟩⟩, + ⟨⟨-3364165964799678919429713115549729195341852193279757611538,-3364165964799678919429713115549729195341852193279615670764⟩,⟨2822870420282568952024750580482150424443775481823313754650,2822870420282568952024750580482150424443775481823442524365⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755753500070,-1850525702701626521436088670080927798033038586755680288717⟩,⟨1068401512597105450007285757967117627943219527725662762404,1068401512597105450007285757967117627943219527725714580797⟩⟩, + ⟨⟨-917599690286376751405479379174555422216902611336380819187,-917599690286376751405479379174555422216902611336346247197⟩,⟨333978974236127277550435844391697553056080298573403607693,333978974236127277550435844391697553056080298573421812485⟩⟩, + ⟨⟨-407835225981185224536872855513867145298066537609730197669,-407835225981185224536872855513867145298066537609715407472⟩,⟨71912354023816900018545232252378303598730377656828940783,71912354023816900018545232252378303598730377656834189885⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620614013277,-160441184787359821872660870163473329702807540620608369209⟩,⟨-589743,458024⟩⟩, + ⟨⟨-54738717429561251584508926891943520735752373470804476840,-54738717429561251584508926891943520735752373470802597854⟩,⟨-9651912772208362208492298938146538505515814973682228856,-9651912772208362208492298938146538505515814973681653778⟩⟩, + ⟨⟨-15703680546634384553933436903293031494081586365073427240,-15703680546634384553933436903293031494081586365072898778⟩,⟨-5715672287400121701957726229854569373009349480549806013,-5715672287400121701957726229854569373009349480549571107⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757317695,-3614308013089114299679860683751812105533278489757197998⟩,⟨-2086721704291221582045479996029526617076600640089275270,-2086721704291221582045479996029526617076600640089202038⟩⟩, + ⟨⟨-619608377433525912615578823968691353955540949137032955,-619608377433525912615578823968691353955540949137012696⟩,⟨-519913160978824500744618128566152733152860830287153589,-519913160978824500744618128566152733152860830287136838⟩⟩, + ⟨⟨-69781563223876080600676953443760917544767257341335314,-69781563223876080600676953443760917544767257341333054⟩,⟨-83162428668894319020389527157989696661156519204136066,-83162428668894319020389527157989696661156519204133520⟩⟩, + ⟨⟨-4075628328693792152432578117245169173977735625174357,-4075628328693792152432578117245169173977735625174225⟩,⟨-7059195338064676366562227897952758018619684550307251,-7059195338064676366562227897952758018619684550307041⟩⟩, + ⟨⟨-72519520030733865039681727328254436312986517761386,-72519520030733865039681727328254436312986517761383⟩,⟨-199245743754128469646193454143666317733871279930877,-199245743754128469646193454143666317733871279930870⟩⟩, + ⟨⟨-71912354023816900018545232252378303598730377657,-71912354023816900018545232252378303598730377656⟩,⟨-407835225981185224536872855513867145298066537610,-407835225981185224536872855513867145298066537609⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-71912354023816900018545232252378303598730377657,-71912354023816900018545232252378303598730377656⟩,⟨407835225981185224536872855513867145298066537609,407835225981185224536872855513867145298066537610⟩⟩, + ⟨⟨-72519520030733865039681727328254436312986517761386,-72519520030733865039681727328254436312986517761383⟩,⟨199245743754128469646193454143666317733871279930870,199245743754128469646193454143666317733871279930877⟩⟩, + ⟨⟨-4075628328693792152432578117245169173977735625174357,-4075628328693792152432578117245169173977735625174225⟩,⟨7059195338064676366562227897952758018619684550307041,7059195338064676366562227897952758018619684550307251⟩⟩, + ⟨⟨-69781563223876080600676953443760917544767257341335314,-69781563223876080600676953443760917544767257341333054⟩,⟨83162428668894319020389527157989696661156519204133520,83162428668894319020389527157989696661156519204136066⟩⟩, + ⟨⟨-619608377433525912615578823968691353955540949137032955,-619608377433525912615578823968691353955540949137012696⟩,⟨519913160978824500744618128566152733152860830287136838,519913160978824500744618128566152733152860830287153589⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757317695,-3614308013089114299679860683751812105533278489757197998⟩,⟨2086721704291221582045479996029526617076600640089202038,2086721704291221582045479996029526617076600640089275270⟩⟩, + ⟨⟨-15703680546634384553933436903293031494081586365073427240,-15703680546634384553933436903293031494081586365072898778⟩,⟨5715672287400121701957726229854569373009349480549571107,5715672287400121701957726229854569373009349480549806013⟩⟩, + ⟨⟨-54738717429561251584508926891943520735752373470804476840,-54738717429561251584508926891943520735752373470802597854⟩,⟨9651912772208362208492298938146538505515814973681653778,9651912772208362208492298938146538505515814973682228856⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620614013277,-160441184787359821872660870163473329702807540620608369210⟩,⟨-458024,589741⟩⟩, + ⟨⟨-407835225981185224536872855513867145298066537609730197668,-407835225981185224536872855513867145298066537609715407471⟩,⟨-71912354023816900018545232252378303598730377656834189887,-71912354023816900018545232252378303598730377656828940786⟩⟩, + ⟨⟨-917599690286376751405479379174555422216902611336380819185,-917599690286376751405479379174555422216902611336346247197⟩,⟨-333978974236127277550435844391697553056080298573421812488,-333978974236127277550435844391697553056080298573403607698⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755753500063,-1850525702701626521436088670080927798033038586755680288714⟩,⟨-1068401512597105450007285757967117627943219527725714580803,-1068401512597105450007285757967117627943219527725662762415⟩⟩, + ⟨⟨-3364165964799678919429713115549729195341852193279757611523,-3364165964799678919429713115549729195341852193279615670750⟩,⟨-2822870420282568952024750580482150424443775481823442524382,-2822870420282568952024750580482150424443775481823313754668⟩⟩, + ⟨⟨-5499878473011617916523518971146141930783091424258070666427,-5499878473011617916523518971146141930783091424257817111514⟩,⟨-6554499929043153270080906183299498299049848323147811925692,-6554499929043153270080906183299498299049848323147523616779⟩⟩, + ⟨⟨-7960211579480062797719879135244471042925264892918758233750,-7960211579480062797719879135244471042925264892918339984053⟩,⟨-13787490894657571028441851363188980505116571387318934155388,-13787490894657571028441851363188980505116571387318341461384⟩⟩] +lemma tw0_0_0_7_calc (j : Fin 31) : taylorWaveBox 0 0 0 7 j = tw0_0_0_7 j := by + revert j + decide +kernel +def tw0_0_0_8 : Fin 31 → CI := ![⟨⟨3609556675507699249901072619402663681142043526991953802461,3609556675507699249901072619402663681142043526992120458984⟩,⟨2083978518259580817633731437832825154045307399303704094311,2083978518259580817633731437832825154045307399303820225354⟩⟩, + ⟨⟨1601566464169528217891648783218171905093246193626386008521,1601566464169528217891648783218171905093246193626461553626⟩,⟨1343873829390551570684374248878997956703804532210529400331,1343873829390551570684374248878997956703804532210595633172⟩⟩, + ⟨⟨640488981484130327653413503766889287544722261814965890982,640488981484130327653413503766889287544722261814997146644⟩,⟨763305044700718740215982382415372698997521843667250097667,763305044700718740215982382415372698997521843667284732684⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556905531329,223765489537285961260145415798476028797768934556917096416⟩,⟨387573196859101311863220953391387389144801221975974310265,387573196859101311863220953391387389144801221975990877299⟩⟩, + ⟨⟨64119360061391083968352675837124824622817162784144001480,64119360061391083968352675837124824622817162784147700648⟩,⟨176166493918552546514831131894122347290097524786070990876,176166493918552546514831131894122347290097524786078188978⟩⟩, + ⟨⟨12551073505753976682259796596582355361010240018692276983,12551073505753976682259796596582355361010240018693233076⟩,⟨71180674989868037573765684439075055761256571102764496675,71180674989868037573765684439075055761256571102767304627⟩⟩, + ⟨⟨-92637,71947⟩,⟨25202042373060605481053021731346532868346133836080198785,25202042373060605481053021731346532868346133836081165575⟩⟩, + ⟨⟨-1347661255922634941806310243948333041154731360034943856,-1347661255922634941806310243948333041154731360034859269⟩,⟨7642966779717208818375570055822086724599333918786810512,7642966779717208818375570055822086724599333918787097197⟩⟩, + ⟨⟨-698301102660894120832622530537418728491424334027139691,-698301102660894120832622530537418728491424334027108768⟩,⟨1918566511541070649890966257492391339028408480046270733,1918566511541070649890966257492391339028408480046341405⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153238198,-218520985876255821543110757615699246872821225153229833⟩,⟨378489450057716124866426712296276747211719943335913452,378489450057716124866426712296276747211719943335927192⟩⟩, + ⟨⟨-45370982417658961306909329931353354846745929296076161,-45370982417658961306909329931353354846745929296074554⟩,⟨54071031295773800957314598347917721051114139078797224,54071031295773800957314598347917721051114139078799165⟩⟩, + ⟨⟨-5805832776908524453131992297192056040334649292665946,-5805832776908524453131992297192056040334649292665749⟩,⟨4871672141780906292362624772310914602166421458694210,4871672141780906292362624772310914602166421458694384⟩⟩, + ⟨⟨-369618603571988403189869836226832760948945257163991,-369618603571988403189869836226832760948945257163978⟩,⟨213399400269781075725694099234081295774239477688701,213399400269781075725694099234081295774239477688709⟩⟩, + ⟨⟨-6954988498188938123525114399216650415856754527784,-6954988498188938123525114399216650415856754527783⟩,⟨2531408793004570746418230332351408168774526925167,2531408793004570746418230332351408168774526925168⟩⟩, + ⟨⟨-7118067498986803757376568443907505576125657111,-7118067498986803757376568443907505576125657110⟩,⟨1255107350575397668225979659658235536101024001,1255107350575397668225979659658235536101024002⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-7118067498986803757376568443907505576125657111,-7118067498986803757376568443907505576125657110⟩,⟨-1255107350575397668225979659658235536101024002,-1255107350575397668225979659658235536101024001⟩⟩, + ⟨⟨-6954988498188938123525114399216650415856754527784,-6954988498188938123525114399216650415856754527783⟩,⟨-2531408793004570746418230332351408168774526925168,-2531408793004570746418230332351408168774526925167⟩⟩, + ⟨⟨-369618603571988403189869836226832760948945257163991,-369618603571988403189869836226832760948945257163978⟩,⟨-213399400269781075725694099234081295774239477688709,-213399400269781075725694099234081295774239477688701⟩⟩, + ⟨⟨-5805832776908524453131992297192056040334649292665946,-5805832776908524453131992297192056040334649292665749⟩,⟨-4871672141780906292362624772310914602166421458694384,-4871672141780906292362624772310914602166421458694210⟩⟩, + ⟨⟨-45370982417658961306909329931353354846745929296076161,-45370982417658961306909329931353354846745929296074554⟩,⟨-54071031295773800957314598347917721051114139078799165,-54071031295773800957314598347917721051114139078797224⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153238198,-218520985876255821543110757615699246872821225153229833⟩,⟨-378489450057716124866426712296276747211719943335927192,-378489450057716124866426712296276747211719943335913452⟩⟩, + ⟨⟨-698301102660894120832622530537418728491424334027139691,-698301102660894120832622530537418728491424334027108768⟩,⟨-1918566511541070649890966257492391339028408480046341405,-1918566511541070649890966257492391339028408480046270733⟩⟩, + ⟨⟨-1347661255922634941806310243948333041154731360034943856,-1347661255922634941806310243948333041154731360034859269⟩,⟨-7642966779717208818375570055822086724599333918787097197,-7642966779717208818375570055822086724599333918786810512⟩⟩, + ⟨⟨-92637,71947⟩,⟨-25202042373060605481053021731346532868346133836081165575,-25202042373060605481053021731346532868346133836080198785⟩⟩, + ⟨⟨12551073505753976682259796596582355361010240018692276983,12551073505753976682259796596582355361010240018693233076⟩,⟨-71180674989868037573765684439075055761256571102767304627,-71180674989868037573765684439075055761256571102764496675⟩⟩, + ⟨⟨64119360061391083968352675837124824622817162784144001481,64119360061391083968352675837124824622817162784147700649⟩,⟨-176166493918552546514831131894122347290097524786078188978,-176166493918552546514831131894122347290097524786070990876⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556905531331,223765489537285961260145415798476028797768934556917096417⟩,⟨-387573196859101311863220953391387389144801221975990877298,-387573196859101311863220953391387389144801221975974310264⟩⟩, + ⟨⟨640488981484130327653413503766889287544722261814965890986,640488981484130327653413503766889287544722261814997146648⟩,⟨-763305044700718740215982382415372698997521843667284732680,-763305044700718740215982382415372698997521843667250097664⟩⟩, + ⟨⟨1601566464169528217891648783218171905093246193626386008529,1601566464169528217891648783218171905093246193626461553631⟩,⟨-1343873829390551570684374248878997956703804532210595633163,-1343873829390551570684374248878997956703804532210529400326⟩⟩, + ⟨⟨3609556675507699249901072619402663681142043526991953802483,3609556675507699249901072619402663681142043526992120458987⟩,⟨-2083978518259580817633731437832825154045307399303820225325,-2083978518259580817633731437832825154045307399303704094300⟩⟩] +lemma tw0_0_0_8_calc (j : Fin 31) : taylorWaveBox 0 0 0 8 j = tw0_0_0_8 j := by + revert j + decide +kernel +def tw0_0_0_9 : Fin 31 → CI := ![⟨⟨495985727515397112326421416469320716440501550325702695181,495985727515397112326421416469320716440501550325731913077⟩,⟨-859072479885680691627648444315166287437481826543317907163,-859072479885680691627648444315166287437481826543275508490⟩⟩, + ⟨⟨298518475235904847070783974177113318633271521045012512198,298518475235904847070783974177113318633271521045028174900⟩,⟨-355760465318135299709516028934885396146183059314020563640,-355760465318135299709516028934885396146183059314002650171⟩⟩, + ⟨⟨157444019047664078385359203489986653886944555219920496766,157444019047664078385359203489986653886944555219928141959⟩,⟨-132111218313963577133913909652861645783160994650101954321,-132111218313963577133913909652861645783160994650095086811⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791954439605,73793764120052327784788221554378326426914401791957828854⟩,⟨-42604849579227958677896369208994565288944873769726157307,-42604849579227958677896369208994565288944873769723819703⟩⟩, + ⟨⟨30746853505733092637903717607963540453597178337965932737,30746853505733092637903717607963540453597178337967286914⟩,⟨-11190939473430279076302387488519177373893858517139351340,-11190939473430279076302387488519177373893858517138670090⟩⟩, + ⟨⟨11293974021501624095934412886468827866626503191981697714,11293974021501624095934412886468827866626503191982179192⟩,⟨-1991432339411221447457677427999787176066531458922606658,-1991432339411221447457677427999787176066531458922448618⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232432042559,3598843235212085340458540018208389404888495232432192073⟩,⟨-10274,13229⟩⟩, + ⟨⟨970144981284461526058477398166891532212285621128020822,970144981284461526058477398166891532212285621128060300⟩,⟨171062735399359360244890137947529612323318930724543627,171062735399359360244890137947529612323318930724554910⟩⟩, + ⟨⟨213088288922049362234819472893876371652451468940448835,213088288922049362234819472893876371652451468940457363⟩,⟨77557794438342519819461884353017749151540109655541981,77557794438342519819461884353017749151540109655545663⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749977852,36032111386744300676166123805848792200641797749979276⟩,⟨20803149208607401698191586527829377582492614145373127,20803149208607401698191586527829377582492614145373991⟩⟩, + ⟨⟨4289625118455221507382153520649873765740310898208210,4289625118455221507382153520649873765740310898208378⟩,⟨3599422854784572448326776793606869713382614660384056,3599422854784572448326776793606869713382614660384196⟩⟩, + ⟨⟨309188068915493915818123124992664945998224470026393,309188068915493915818123124992664945998224470026406⟩,⟨368475991917306048292843438904849369807660010733533,368475991917306048292843438904849369807660010733548⟩⟩, + ⟨⟨10157787699515332860445110609291688272701471750670,10157787699515332860445110609291688272701471750671⟩,⟨17593804388058740564534240139574605566719627807606,17593804388058740564534240139574605566719627807608⟩⟩, + ⟨⟨80329851185209747901668843789556914045315243366,80329851185209747901668843789556914045315243367⟩,⟨220704452239513909136923194128194122717239053894,220704452239513909136923194128194122717239053895⟩⟩, + ⟨⟨19914323394112214474576774279997871760665314,19914323394112214474576774279997871760665315⟩,⟨112939740215016240959344128864688278666265031,112939740215016240959344128864688278666265032⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨19914323394112214474576774279997871760665314,19914323394112214474576774279997871760665315⟩,⟨-112939740215016240959344128864688278666265032,-112939740215016240959344128864688278666265031⟩⟩, + ⟨⟨80329851185209747901668843789556914045315243366,80329851185209747901668843789556914045315243367⟩,⟨-220704452239513909136923194128194122717239053895,-220704452239513909136923194128194122717239053894⟩⟩, + ⟨⟨10157787699515332860445110609291688272701471750670,10157787699515332860445110609291688272701471750671⟩,⟨-17593804388058740564534240139574605566719627807608,-17593804388058740564534240139574605566719627807606⟩⟩, + ⟨⟨309188068915493915818123124992664945998224470026393,309188068915493915818123124992664945998224470026406⟩,⟨-368475991917306048292843438904849369807660010733548,-368475991917306048292843438904849369807660010733533⟩⟩, + ⟨⟨4289625118455221507382153520649873765740310898208210,4289625118455221507382153520649873765740310898208378⟩,⟨-3599422854784572448326776793606869713382614660384196,-3599422854784572448326776793606869713382614660384056⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749977852,36032111386744300676166123805848792200641797749979276⟩,⟨-20803149208607401698191586527829377582492614145373991,-20803149208607401698191586527829377582492614145373127⟩⟩, + ⟨⟨213088288922049362234819472893876371652451468940448835,213088288922049362234819472893876371652451468940457363⟩,⟨-77557794438342519819461884353017749151540109655545663,-77557794438342519819461884353017749151540109655541981⟩⟩, + ⟨⟨970144981284461526058477398166891532212285621128020822,970144981284461526058477398166891532212285621128060300⟩,⟨-171062735399359360244890137947529612323318930724554910,-171062735399359360244890137947529612323318930724543627⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232432042559,3598843235212085340458540018208389404888495232432192073⟩,⟨-13229,10274⟩⟩, + ⟨⟨11293974021501624095934412886468827866626503191981697714,11293974021501624095934412886468827866626503191982179192⟩,⟨1991432339411221447457677427999787176066531458922448619,1991432339411221447457677427999787176066531458922606658⟩⟩, + ⟨⟨30746853505733092637903717607963540453597178337965932737,30746853505733092637903717607963540453597178337967286914⟩,⟨11190939473430279076302387488519177373893858517138670091,11190939473430279076302387488519177373893858517139351340⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791954439604,73793764120052327784788221554378326426914401791957828854⟩,⟨42604849579227958677896369208994565288944873769723819703,42604849579227958677896369208994565288944873769726157307⟩⟩, + ⟨⟨157444019047664078385359203489986653886944555219920496765,157444019047664078385359203489986653886944555219928141959⟩,⟨132111218313963577133913909652861645783160994650095086812,132111218313963577133913909652861645783160994650101954322⟩⟩, + ⟨⟨298518475235904847070783974177113318633271521045012512197,298518475235904847070783974177113318633271521045028174898⟩,⟨355760465318135299709516028934885396146183059314002650173,355760465318135299709516028934885396146183059314020563641⟩⟩, + ⟨⟨495985727515397112326421416469320716440501550325702695178,495985727515397112326421416469320716440501550325731913070⟩,⟨859072479885680691627648444315166287437481826543275508496,859072479885680691627648444315166287437481826543317907164⟩⟩] +lemma tw0_0_0_9_calc (j : Fin 31) : taylorWaveBox 0 0 0 9 j = tw0_0_0_9 j := by + revert j + decide +kernel +def tw0_0_0_10 : Fin 31 → CI := ![⟨⟨-187420541090973602826895044989804187200002869539593265611,-187420541090973602826895044989804187200002869539583419076⟩,⟨-108207299850538926453101217536999299224894071863938568339,-108207299850538926453101217536999299224894071863931849548⟩⟩, + ⟨⟨-72440567129333166437873145757042014772974849280650499885,-72440567129333166437873145757042014772974849280646621727⟩,⟨-60784853160496453826896737466233116107154128276238512765,-60784853160496453826896737466233116107154128276235130013⟩⟩, + ⟨⟨-24979237165996709346119572876216971027300425554322485371,-24979237165996709346119572876216971027300425554321107368⟩,⟨-29769095632839390108314973527526529995560901699595060257,-29769095632839390108314973527526529995560901699593519965⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003518207717,-7435949024744486033456304113587098562333411003517776058⟩,⟨-12879441513349692559052917879290522199485986172459309546,-12879441513349692559052917879290522199485986172458677013⟩⟩, + ⟨⟨-1790421785191956170187851311778334217748533160143641700,-1790421785191956170187851311778334217748533160143527008⟩,⟨-4919143426114533789957336114645915243144538692410634515,-4919143426114533789957336114645915243144538692410402204⟩⟩, + ⟨⟨-289642092945158748783779964923916718392438352862282619,-289642092945158748783779964923916718392438352862258711⟩,⟨-1642641935915901657435635441841541535928235372237240997,-1642641935915901657435635441841541535928235372237165740⟩⟩, + ⟨⟨-1345,1732⟩,⟨-471087477881817150367027725509267001994255814209067494,-471087477881817150367027725509267001994255814209046422⟩⟩, + ⟨⟨19904053067911186360873835593731990939570630707832372,19904053067911186360873835593731990939570630707833749⟩,⟨-112881494300750806800611991163006894576598078827989258,-112881494300750806800611991163006894576598078827984304⟩⟩, + ⟨⟨7896226762281802275856336026996239369255190063571459,7896226762281802275856336026996239369255190063571860⟩,⟨-21694704728262533271825481420741973051008491081312895,-21694704728262533271825481420741973051008491081311957⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780721,1815417242369259285511792996481225234944680420780803⟩,⟨-3144394900720139784925028779123662646358883342885562,-3144394900720139784925028779123662646358883342885427⟩⟩, + ⟨⟨261757416614685508415034029215314306299900030739861,261757416614685508415034029215314306299900030739873⟩,⟨-311950341638730798321383428065758112062659503686937,-311950341638730798321383428065758112062659503686923⟩⟩, + ⟨⟨21437064245030013211813016336300794060093210737902,21437064245030013211813016336300794060093210737904⟩,⟨-17987832701528340671483263203310135806703958401555,-17987832701528340671483263203310135806703958401553⟩⟩, + ⟨⟨767674536308627877178962104278237950771211753634,767674536308627877178962104278237950771211753635⟩,⟨-443217100187807442751902587031549129625166118355,-443217100187807442751902587031549129625166118354⟩⟩, + ⟨⟨6420032275650150804308649927808048928362871521,6420032275650150804308649927808048928362871522⟩,⟨-2336700651364965642107519214287315506478468491,-2336700651364965642107519214287315506478468490⟩⟩, + ⟨⟨1642641935915901657435635441841541535928235,1642641935915901657435635441841541535928236⟩,⟨-289642092945158748783779964923916718392439,-289642092945158748783779964923916718392438⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨1642641935915901657435635441841541535928235,1642641935915901657435635441841541535928236⟩,⟨289642092945158748783779964923916718392438,289642092945158748783779964923916718392439⟩⟩, + ⟨⟨6420032275650150804308649927808048928362871521,6420032275650150804308649927808048928362871522⟩,⟨2336700651364965642107519214287315506478468490,2336700651364965642107519214287315506478468491⟩⟩, + ⟨⟨767674536308627877178962104278237950771211753634,767674536308627877178962104278237950771211753635⟩,⟨443217100187807442751902587031549129625166118354,443217100187807442751902587031549129625166118355⟩⟩, + ⟨⟨21437064245030013211813016336300794060093210737902,21437064245030013211813016336300794060093210737904⟩,⟨17987832701528340671483263203310135806703958401553,17987832701528340671483263203310135806703958401555⟩⟩, + ⟨⟨261757416614685508415034029215314306299900030739861,261757416614685508415034029215314306299900030739873⟩,⟨311950341638730798321383428065758112062659503686923,311950341638730798321383428065758112062659503686937⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780721,1815417242369259285511792996481225234944680420780803⟩,⟨3144394900720139784925028779123662646358883342885427,3144394900720139784925028779123662646358883342885562⟩⟩, + ⟨⟨7896226762281802275856336026996239369255190063571459,7896226762281802275856336026996239369255190063571860⟩,⟨21694704728262533271825481420741973051008491081311957,21694704728262533271825481420741973051008491081312895⟩⟩, + ⟨⟨19904053067911186360873835593731990939570630707832372,19904053067911186360873835593731990939570630707833749⟩,⟨112881494300750806800611991163006894576598078827984304,112881494300750806800611991163006894576598078827989258⟩⟩, + ⟨⟨-1345,1732⟩,⟨471087477881817150367027725509267001994255814209046422,471087477881817150367027725509267001994255814209067494⟩⟩, + ⟨⟨-289642092945158748783779964923916718392438352862282619,-289642092945158748783779964923916718392438352862258711⟩,⟨1642641935915901657435635441841541535928235372237165740,1642641935915901657435635441841541535928235372237240997⟩⟩, + ⟨⟨-1790421785191956170187851311778334217748533160143641700,-1790421785191956170187851311778334217748533160143527008⟩,⟨4919143426114533789957336114645915243144538692410402204,4919143426114533789957336114645915243144538692410634515⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003518207717,-7435949024744486033456304113587098562333411003517776058⟩,⟨12879441513349692559052917879290522199485986172458677013,12879441513349692559052917879290522199485986172459309546⟩⟩, + ⟨⟨-24979237165996709346119572876216971027300425554322485371,-24979237165996709346119572876216971027300425554321107368⟩,⟨29769095632839390108314973527526529995560901699593519965,29769095632839390108314973527526529995560901699595060257⟩⟩, + ⟨⟨-72440567129333166437873145757042014772974849280650499886,-72440567129333166437873145757042014772974849280646621728⟩,⟨60784853160496453826896737466233116107154128276235130013,60784853160496453826896737466233116107154128276238512765⟩⟩, + ⟨⟨-187420541090973602826895044989804187200002869539593265611,-187420541090973602826895044989804187200002869539583419077⟩,⟨108207299850538926453101217536999299224894071863931849547,108207299850538926453101217536999299224894071863938568338⟩⟩] +lemma tw0_0_0_10_calc (j : Fin 31) : taylorWaveBox 0 0 0 10 j = tw0_0_0_10 j := by + revert j + decide +kernel +def tw0_0_0_11 : Fin 31 → CI := ![⟨⟨-21791234504823142515366525311269432823771122929792291122,-21791234504823142515366525311269432823771122929790868700⟩,⟨37743525322001707893742291740530563888148221535550772446,37743525322001707893742291740530563888148221535552875524⟩⟩, + ⟨⟨-11425031939913246940093724791913965999388985772886899688,-11425031939913246940093724791913965999388985772886227503⟩,⟨13615822859895207966462381573823560772220837382733996692,13615822859895207966462381573823560772220837382734768967⟩⟩, + ⟨⟨-5195687341341123600704426288369054904556108376820090102,-5195687341341123600704426288369054904556108376819804731⟩,⟨4359699331831799371466961428012881069267752510086573806,4359699331831799371466961428012881069267752510086828191⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745757943,-2074972248239938619645032781794172026726850732745649432⟩,⟨1197985786082331537503313966912747958048843575969887676,1197985786082331537503313966912747958048843575969961033⟩⟩, + ⟨⟨-726467492922202553208571740756965937920251864047133694,-726467492922202553208571740756965937920251864047097073⟩,⟨264412543585674769147387291569984029742836516140369149,264412543585674769147387291569984029742836516140386929⟩⟩, + ⟨⟨-220534693946662930764474388096292777281231160266523962,-220534693946662930764474388096292777281231160266513155⟩,⟨38886216725080461756026451113807397061966202786887515,38886216725080461756026451113807397061966202786890849⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560547152,-56921729219679268117752553035921843729028297560544424⟩,⟨-210,163⟩⟩, + ⟨⟨-12124023016118866636402301126440821468977915237898932,-12124023016118866636402301126440821468977915237898360⟩,⟨-2137792372472176719497117932092742968627600978265599,-2137792372472176719497117932092742968627600978265444⟩⟩, + ⟨⟨-2038852457148569585417753669904180046860781402892235,-2038852457148569585417753669904180046860781402892140⟩,⟨-742081606462587183309118180776731478952225602929245,-742081606462587183309118180776731478952225602929204⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087128,-253292510771476882280887790746358889981305021087116⟩,⟨-146238499277628361511635005726653803472759225582270,-146238499277628361511635005726653803472759225582262⟩⟩, + ⟨⟨-20940617555065445694143545633131892798838856461291,-20940617555065445694143545633131892798838856461289⟩,⟨-17571264467079890589295540215998256660825969132787,-17571264467079890589295540215998256660825969132785⟩⟩, + ⟨⟨-965990479814079983363616165201475690896149782693,-965990479814079983363616165201475690896149782692⟩,⟨-1151222624730234475468935004464449198407562179524,-1151222624730234475468935004464449198407562179523⟩⟩, + ⟨⟨-17851379306351118348588257534991919369233303905,-17851379306351118348588257534991919369233303904⟩,⟨-30919495943783799106553685393842637937171023082,-30919495943783799106553685393842637937171023081⟩⟩, + ⟨⟨-62743261538176587413065992312287280099938158,-62743261538176587413065992312287280099938157⟩,⟨-172385694299075864889303348789595228463148331,-172385694299075864889303348789595228463148330⟩⟩, + ⟨⟨-3888621672508046175602645111380739706197,-3888621672508046175602645111380739706196⟩,⟨-22053469394666293076447438809629277728124,-22053469394666293076447438809629277728123⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-3888621672508046175602645111380739706197,-3888621672508046175602645111380739706196⟩,⟨22053469394666293076447438809629277728123,22053469394666293076447438809629277728124⟩⟩, + ⟨⟨-62743261538176587413065992312287280099938158,-62743261538176587413065992312287280099938157⟩,⟨172385694299075864889303348789595228463148330,172385694299075864889303348789595228463148331⟩⟩, + ⟨⟨-17851379306351118348588257534991919369233303905,-17851379306351118348588257534991919369233303904⟩,⟨30919495943783799106553685393842637937171023081,30919495943783799106553685393842637937171023082⟩⟩, + ⟨⟨-965990479814079983363616165201475690896149782693,-965990479814079983363616165201475690896149782692⟩,⟨1151222624730234475468935004464449198407562179523,1151222624730234475468935004464449198407562179524⟩⟩, + ⟨⟨-20940617555065445694143545633131892798838856461291,-20940617555065445694143545633131892798838856461289⟩,⟨17571264467079890589295540215998256660825969132785,17571264467079890589295540215998256660825969132787⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087128,-253292510771476882280887790746358889981305021087116⟩,⟨146238499277628361511635005726653803472759225582262,146238499277628361511635005726653803472759225582270⟩⟩, + ⟨⟨-2038852457148569585417753669904180046860781402892235,-2038852457148569585417753669904180046860781402892140⟩,⟨742081606462587183309118180776731478952225602929204,742081606462587183309118180776731478952225602929245⟩⟩, + ⟨⟨-12124023016118866636402301126440821468977915237898932,-12124023016118866636402301126440821468977915237898360⟩,⟨2137792372472176719497117932092742968627600978265444,2137792372472176719497117932092742968627600978265599⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560547152,-56921729219679268117752553035921843729028297560544424⟩,⟨-163,210⟩⟩, + ⟨⟨-220534693946662930764474388096292777281231160266523962,-220534693946662930764474388096292777281231160266513155⟩,⟨-38886216725080461756026451113807397061966202786890849,-38886216725080461756026451113807397061966202786887515⟩⟩, + ⟨⟨-726467492922202553208571740756965937920251864047133694,-726467492922202553208571740756965937920251864047097073⟩,⟨-264412543585674769147387291569984029742836516140386929,-264412543585674769147387291569984029742836516140369149⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745757943,-2074972248239938619645032781794172026726850732745649432⟩,⟨-1197985786082331537503313966912747958048843575969961033,-1197985786082331537503313966912747958048843575969887676⟩⟩, + ⟨⟨-5195687341341123600704426288369054904556108376820090102,-5195687341341123600704426288369054904556108376819804731⟩,⟨-4359699331831799371466961428012881069267752510086828191,-4359699331831799371466961428012881069267752510086573806⟩⟩, + ⟨⟨-11425031939913246940093724791913965999388985772886899688,-11425031939913246940093724791913965999388985772886227503⟩,⟨-13615822859895207966462381573823560772220837382734768967,-13615822859895207966462381573823560772220837382733996693⟩⟩, + ⟨⟨-21791234504823142515366525311269432823771122929792291122,-21791234504823142515366525311269432823771122929790868700⟩,⟨-37743525322001707893742291740530563888148221535552875524,-37743525322001707893742291740530563888148221535550772446⟩⟩] +lemma tw0_0_0_11_calc (j : Fin 31) : taylorWaveBox 0 0 0 11 j = tw0_0_0_11 j := by + revert j + decide +kernel +def tw0_0_0_12 : Fin 31 → CI := ![⟨⟨7058022730486958381136491702350017063996955730531904963,7058022730486958381136491702350017063996955730532320705⟩,⟨4074951323393142878532497251109791508755607371562678103,4074951323393142878532497251109791508755607371562957067⟩⟩, + ⟨⟨2376409392734819664234254097470346381837560672049037946,2376409392734819664234254097470346381837560672049180298⟩,⟨1994044244970011146208541540018343668355885972623271274,1994044244970011146208541540018343668355885972623394941⟩⟩, + ⟨⟨706560286133573192946811917616454076696984164406179622,706560286133573192946811917616454076696984164406223099⟩,⟨842045759384078802935513350204684919958688730092979217,842045759384078802935513350204684919958688730093028147⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690976982,179218254507678396558872331947278891371354432690988527⟩,⟨310415122451108950031301992179391381861466766399430594,310415122451108950031301992179391381861466766399447816⟩⟩, + ⟨⟨36259688686123870924193938538016068964587717750548060,36259688686123870924193938538016068964587717750550614⟩,⟨99622675901579576298767668583833251867382309488286946,99622675901579576298767668583833251867382309488292286⟩⟩, + ⟨⟨4847803682119576475413713869486278078856125944460866,4847803682119576475413713869486278078856125944461298⟩,⟨27493260887480543987828994334052660842867691761657745,27493260887480543987828994334052660842867691761659180⟩⟩, + ⟨⟨-24,19⟩,⟨6386603083791852241089888205092732398089436736505746,6386603083791852241089888205092732398089436736506074⟩⟩, + ⟨⟨-213208660706631279854313975186894609095155405012156,-213208660706631279854313975186894609095155405012139⟩,⟨1209166401250558691983513115702532889209820477146406,1209166401250558691983513115702532889209820477146468⟩⟩, + ⟨⟨-64758836756304886898195001956150826698045761571112,-64758836756304886898195001956150826698045761571107⟩,⟨177923441698095692568245654632487657713896778467569,177923441698095692568245654632487657713896778467579⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573425,-10938614166728417758720235104204033897177394573423⟩,⟨18946235501166317750933959483605431021818039941371,18946235501166317750933959483605431021818039941373⟩⟩, + ⟨⟨-1095272923890110270105105791768675650802651372802,-1095272923890110270105105791768675650802651372801⟩,⟨1305295441917203606549634499204704301556218266469,1305295441917203606549634499204704301556218266470⟩⟩, + ⟨⟨-57407500642839111986216259326336440161633068646,-57407500642839111986216259326336440161633068645⟩,⟨48170612616215764049255995988650474674471974873,48170612616215764049255995988650474674471974874⟩⟩, + ⟨⟨-1156386444162983261165402800513026795765261227,-1156386444162983261165402800513026795765261226⟩,⟨667640024824732529218764349621828240794518711,667640024824732529218764349621828240794518712⟩⟩, + ⟨⟨-4298139926936132053421740114650096165773838,-4298139926936132053421740114650096165773837⟩,⟨1564394996115861884506430020274533004102377,1564394996115861884506430020274533004102378⟩⟩, + ⟨⟨-274932608874805439878289943340526608429,-274932608874805439878289943340526608428⟩,⟨48478036821195764754137138694862780788,48478036821195764754137138694862780789⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-274932608874805439878289943340526608429,-274932608874805439878289943340526608428⟩,⟨-48478036821195764754137138694862780789,-48478036821195764754137138694862780788⟩⟩, + ⟨⟨-4298139926936132053421740114650096165773838,-4298139926936132053421740114650096165773837⟩,⟨-1564394996115861884506430020274533004102378,-1564394996115861884506430020274533004102377⟩⟩, + ⟨⟨-1156386444162983261165402800513026795765261227,-1156386444162983261165402800513026795765261226⟩,⟨-667640024824732529218764349621828240794518712,-667640024824732529218764349621828240794518711⟩⟩, + ⟨⟨-57407500642839111986216259326336440161633068646,-57407500642839111986216259326336440161633068645⟩,⟨-48170612616215764049255995988650474674471974874,-48170612616215764049255995988650474674471974873⟩⟩, + ⟨⟨-1095272923890110270105105791768675650802651372802,-1095272923890110270105105791768675650802651372801⟩,⟨-1305295441917203606549634499204704301556218266470,-1305295441917203606549634499204704301556218266469⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573425,-10938614166728417758720235104204033897177394573423⟩,⟨-18946235501166317750933959483605431021818039941373,-18946235501166317750933959483605431021818039941371⟩⟩, + ⟨⟨-64758836756304886898195001956150826698045761571112,-64758836756304886898195001956150826698045761571107⟩,⟨-177923441698095692568245654632487657713896778467579,-177923441698095692568245654632487657713896778467569⟩⟩, + ⟨⟨-213208660706631279854313975186894609095155405012156,-213208660706631279854313975186894609095155405012139⟩,⟨-1209166401250558691983513115702532889209820477146468,-1209166401250558691983513115702532889209820477146406⟩⟩, + ⟨⟨-24,19⟩,⟨-6386603083791852241089888205092732398089436736506074,-6386603083791852241089888205092732398089436736505746⟩⟩, + ⟨⟨4847803682119576475413713869486278078856125944460866,4847803682119576475413713869486278078856125944461298⟩,⟨-27493260887480543987828994334052660842867691761659180,-27493260887480543987828994334052660842867691761657745⟩⟩, + ⟨⟨36259688686123870924193938538016068964587717750548060,36259688686123870924193938538016068964587717750550614⟩,⟨-99622675901579576298767668583833251867382309488292286,-99622675901579576298767668583833251867382309488286946⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690976982,179218254507678396558872331947278891371354432690988527⟩,⟨-310415122451108950031301992179391381861466766399447816,-310415122451108950031301992179391381861466766399430594⟩⟩, + ⟨⟨706560286133573192946811917616454076696984164406179622,706560286133573192946811917616454076696984164406223099⟩,⟨-842045759384078802935513350204684919958688730093028147,-842045759384078802935513350204684919958688730092979217⟩⟩, + ⟨⟨2376409392734819664234254097470346381837560672049037946,2376409392734819664234254097470346381837560672049180298⟩,⟨-1994044244970011146208541540018343668355885972623394941,-1994044244970011146208541540018343668355885972623271274⟩⟩, + ⟨⟨7058022730486958381136491702350017063996955730531904963,7058022730486958381136491702350017063996955730532320705⟩,⟨-4074951323393142878532497251109791508755607371562957067,-4074951323393142878532497251109791508755607371562678103⟩⟩] +lemma tw0_0_0_12_calc (j : Fin 31) : taylorWaveBox 0 0 0 12 j = tw0_0_0_12 j := by + revert j + decide +kernel +def tw0_0_0_13 : Fin 31 → CI := ![⟨⟨711213174517105746409924496561635036133590707082752759,711213174517105746409924496561635036133590707082803712⟩,⟨-1231857353275977869214001563220895965360893961740269628,-1231857353275977869214001563220895965360893961740193145⟩⟩, + ⟨⟨324824616714930009229249308109712313322774110689464734,324824616714930009229249308109712313322774110689485913⟩,⟨-387110903933055100612197097268323246274569724229215225,-387110903933055100612197097268323246274569724229190803⟩⟩, + ⟨⟨127369414932136995118035176085145623366085363791583232,127369414932136995118035176085145623366085363791591040⟩,⟨-106875629092822094022424005926790036263554839638854298,-106875629092822094022424005926790036263554839638847381⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797359760,43342127478025776420404444686963708682595437797362303⟩,⟨-25023588966689257663727985644023700918120860663563427,-25023588966689257663727985644023700918120860663561734⟩⟩, + ⟨⟨12750787163618343018640934815926705927908524470433128,12750787163618343018640934815926705927908524470433853⟩,⟨-4640906991020654247226840458927926270820585094674797,-4640906991020654247226840458927926270820585094674455⟩⟩, + ⟨⟨3198986163975425038790087739081169966994965127009327,3198986163975425038790087739081169966994965127009505⟩,⟨-564067571621941139101473727311696532289847317150411,-564067571621941139101473727311696532289847317150358⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570407,668803510981146723247822633578313868995627098570444⟩,⟨-2,3⟩⟩, + ⟨⟨112554319500336692341169833970271896352037065663820,112554319500336692341169833970271896352037065663827⟩,⟨19846363323190270922570272638623404887748626186192,19846363323190270922570272638623404887748626186194⟩⟩, + ⟨⟨14491632745855722974763722250916740982980781344263,14491632745855722974763722250916740982980781344265⟩,⟨5274522965408876878142891497033308706843402847969,5274522965408876878142891497033308706843402847971⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨763659331258827443351073780640371732120387593492,763659331258827443351073780640371732120387593493⟩⟩, + ⟨⟨75939010575765361305190910462535356277558589350,75939010575765361305190910462535356277558589351⟩,⟨63720395766092280901919302902102191151411603666,63720395766092280901919302902102191151411603667⟩⟩, + ⟨⟨2241962114281825994275133764367538590885916032,2241962114281825994275133764367538590885916033⟩,⟨2671866404155476844342631100195254996630097428,2671866404155476844342631100195254996630097429⟩⟩, + ⟨⟨23305033302576521098360405903331656864025500,23305033302576521098360405903331656864025501⟩,⟨40365501752147242818404403223622318992945773,40365501752147242818404403223622318992945774⟩⟩, + ⟨⟨36405124645260924623126397635300077317177,36405124645260924623126397635300077317178⟩,⟨100022257915285356489931799964813069084029,100022257915285356489931799964813069084030⟩⟩, + ⟨⟨564067571621941139101473727311696532,564067571621941139101473727311696533⟩,⟨3198986163975425038790087739081169966,3198986163975425038790087739081169967⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨564067571621941139101473727311696532,564067571621941139101473727311696533⟩,⟨-3198986163975425038790087739081169967,-3198986163975425038790087739081169966⟩⟩, + ⟨⟨36405124645260924623126397635300077317177,36405124645260924623126397635300077317178⟩,⟨-100022257915285356489931799964813069084030,-100022257915285356489931799964813069084029⟩⟩, + ⟨⟨23305033302576521098360405903331656864025500,23305033302576521098360405903331656864025501⟩,⟨-40365501752147242818404403223622318992945774,-40365501752147242818404403223622318992945773⟩⟩, + ⟨⟨2241962114281825994275133764367538590885916032,2241962114281825994275133764367538590885916033⟩,⟨-2671866404155476844342631100195254996630097429,-2671866404155476844342631100195254996630097428⟩⟩, + ⟨⟨75939010575765361305190910462535356277558589350,75939010575765361305190910462535356277558589351⟩,⟨-63720395766092280901919302902102191151411603667,-63720395766092280901919302902102191151411603666⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨-763659331258827443351073780640371732120387593493,-763659331258827443351073780640371732120387593492⟩⟩, + ⟨⟨14491632745855722974763722250916740982980781344263,14491632745855722974763722250916740982980781344265⟩,⟨-5274522965408876878142891497033308706843402847971,-5274522965408876878142891497033308706843402847969⟩⟩, + ⟨⟨112554319500336692341169833970271896352037065663820,112554319500336692341169833970271896352037065663827⟩,⟨-19846363323190270922570272638623404887748626186194,-19846363323190270922570272638623404887748626186192⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570407,668803510981146723247822633578313868995627098570444⟩,⟨-3,2⟩⟩, + ⟨⟨3198986163975425038790087739081169966994965127009327,3198986163975425038790087739081169966994965127009505⟩,⟨564067571621941139101473727311696532289847317150358,564067571621941139101473727311696532289847317150411⟩⟩, + ⟨⟨12750787163618343018640934815926705927908524470433128,12750787163618343018640934815926705927908524470433853⟩,⟨4640906991020654247226840458927926270820585094674455,4640906991020654247226840458927926270820585094674797⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797359760,43342127478025776420404444686963708682595437797362303⟩,⟨25023588966689257663727985644023700918120860663561734,25023588966689257663727985644023700918120860663563427⟩⟩, + ⟨⟨127369414932136995118035176085145623366085363791583232,127369414932136995118035176085145623366085363791591040⟩,⟨106875629092822094022424005926790036263554839638847381,106875629092822094022424005926790036263554839638854298⟩⟩, + ⟨⟨324824616714930009229249308109712313322774110689464734,324824616714930009229249308109712313322774110689485913⟩,⟨387110903933055100612197097268323246274569724229190803,387110903933055100612197097268323246274569724229215225⟩⟩, + ⟨⟨711213174517105746409924496561635036133590707082752759,711213174517105746409924496561635036133590707082803712⟩,⟨1231857353275977869214001563220895965360893961740193145,1231857353275977869214001563220895965360893961740269628⟩⟩] +lemma tw0_0_0_13_calc (j : Fin 31) : taylorWaveBox 0 0 0 13 j = tw0_0_0_13 j := by + revert j + decide +kernel +def tw0_0_0_14 : Fin 31 → CI := ![⟨⟨-201562188089707223595102174191806275779722154968185460,-201562188089707223595102174191806275779722154968172303⟩,⟨-116371983552042445686522962423844893895399380113619008,-116371983552042445686522962423844893895399380113610299⟩⟩, + ⟨⟨-59118148635028685494557805764026707909057943397119370,-59118148635028685494557805764026707909057943397115451⟩,⟨-49606016715536189758330700712449315067228925840348895,-49606016715536189758330700712449315067228925840345502⟩⟩, + ⟨⟨-15155819394706135754027896492504595078248121121370742,-15155819394706135754027896492504595078248121121369712⟩,⟨-18062002212350041885975814216634699261419270855630144,-18062002212350041885975814216634699261419270855628979⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402460,-3275580136008399049375563065350230572121000394402227⟩,⟨-5673471219829920494753699488938742157419895557685246,-5673471219829920494753699488938742157419895557684894⟩⟩, + ⟨⟨-556868862495916663533923237043960544947511342954532,-556868862495916663533923237043960544947511342954488⟩,⟨-1529984625304912004004584213571436354609753330790553,-1529984625304912004004584213571436354609753330790461⟩⟩, + ⟨⟨-61530227053323778332580020458487709228529912741458,-61530227053323778332580020458487709228529912741451⟩,⟨-348955258044464895273035913831353306147192365040621,-348955258044464895273035913831353306147192365040600⟩⟩, + ⟨⟨-1,1⟩,⟨-65659631149794723622098140181990406812989656915298,-65659631149794723622098140181990406812989656915293⟩⟩, + ⟨⟨1731921922683568626319914429135032397034247719369,1731921922683568626319914429135032397034247719370⟩,⟨-9822217313112671119066754190797285027503583855054,-9822217313112671119066754190797285027503583855052⟩⟩, + ⟨⟨402752840955674482837797208136910011937639624071,402752840955674482837797208136910011937639624072⟩,⟨-1106554336146914435844353649997270404583330217119,-1106554336146914435844353649997270404583330217118⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨-86570300595549323955592338393230318564146355556,-86570300595549323955592338393230318564146355555⟩⟩, + ⟨⟨3475408458725515187091784236757087013459515356,3475408458725515187091784236757087013459515357⟩,⟨-4141830516418438783010552649645493009924286197,-4141830516418438783010552649645493009924286196⟩⟩, + ⟨⟨116582164814836436988122654658484885726307369,116582164814836436988122654658484885726307370⟩,⟨-97824051497978125151833519863627840350027320,-97824051497978125151833519863627840350027319⟩⟩, + ⟨⟨1320957955864705260552861608783421608949987,1320957955864705260552861608783421608949988⟩,⟨-762655431406665372051196886540909896632890,-762655431406665372051196886540909896632889⟩⟩, + ⟨⟨2182147157375861276121232827388098898342,2182147157375861276121232827388098898343⟩,⟨-794236612073419780730314700169156045263,-794236612073419780730314700169156045262⟩⟩, + ⟨⟨34895525804446489527303591383135330,34895525804446489527303591383135331⟩,⟨-6153022705332377833258002045848771,-6153022705332377833258002045848770⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨34895525804446489527303591383135330,34895525804446489527303591383135331⟩,⟨6153022705332377833258002045848770,6153022705332377833258002045848771⟩⟩, + ⟨⟨2182147157375861276121232827388098898342,2182147157375861276121232827388098898343⟩,⟨794236612073419780730314700169156045262,794236612073419780730314700169156045263⟩⟩, + ⟨⟨1320957955864705260552861608783421608949987,1320957955864705260552861608783421608949988⟩,⟨762655431406665372051196886540909896632889,762655431406665372051196886540909896632890⟩⟩, + ⟨⟨116582164814836436988122654658484885726307369,116582164814836436988122654658484885726307370⟩,⟨97824051497978125151833519863627840350027319,97824051497978125151833519863627840350027320⟩⟩, + ⟨⟨3475408458725515187091784236757087013459515356,3475408458725515187091784236757087013459515357⟩,⟨4141830516418438783010552649645493009924286196,4141830516418438783010552649645493009924286197⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨86570300595549323955592338393230318564146355555,86570300595549323955592338393230318564146355556⟩⟩, + ⟨⟨402752840955674482837797208136910011937639624071,402752840955674482837797208136910011937639624072⟩,⟨1106554336146914435844353649997270404583330217118,1106554336146914435844353649997270404583330217119⟩⟩, + ⟨⟨1731921922683568626319914429135032397034247719369,1731921922683568626319914429135032397034247719370⟩,⟨9822217313112671119066754190797285027503583855052,9822217313112671119066754190797285027503583855054⟩⟩, + ⟨⟨-1,1⟩,⟨65659631149794723622098140181990406812989656915293,65659631149794723622098140181990406812989656915298⟩⟩, + ⟨⟨-61530227053323778332580020458487709228529912741458,-61530227053323778332580020458487709228529912741451⟩,⟨348955258044464895273035913831353306147192365040600,348955258044464895273035913831353306147192365040621⟩⟩, + ⟨⟨-556868862495916663533923237043960544947511342954532,-556868862495916663533923237043960544947511342954488⟩,⟨1529984625304912004004584213571436354609753330790461,1529984625304912004004584213571436354609753330790553⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402460,-3275580136008399049375563065350230572121000394402227⟩,⟨5673471219829920494753699488938742157419895557684894,5673471219829920494753699488938742157419895557685246⟩⟩, + ⟨⟨-15155819394706135754027896492504595078248121121370742,-15155819394706135754027896492504595078248121121369712⟩,⟨18062002212350041885975814216634699261419270855628979,18062002212350041885975814216634699261419270855630144⟩⟩, + ⟨⟨-59118148635028685494557805764026707909057943397119370,-59118148635028685494557805764026707909057943397115451⟩,⟨49606016715536189758330700712449315067228925840345502,49606016715536189758330700712449315067228925840348895⟩⟩, + ⟨⟨-201562188089707223595102174191806275779722154968185460,-201562188089707223595102174191806275779722154968172303⟩,⟨116371983552042445686522962423844893895399380113610299,116371983552042445686522962423844893895399380113619008⟩⟩] +lemma tw0_0_0_14_calc (j : Fin 31) : taylorWaveBox 0 0 0 14 j = tw0_0_0_14 j := by + revert j + decide +kernel +def tw0_0_0_15 : Fin 31 → CI := ![⟨⟨-17921243559351411743059444294652121584177020296560109,-17921243559351411743059444294652121584177020296558710⟩,⟨31040504379613153638845397438259401537550658444204697,31040504379613153638845397438259401537550658444206823⟩⟩, + ⟨⟨-7130021462821351932182456156825576475335927342236879,-7130021462821351932182456156825576475335927342236367⟩,⟨8497228693591170378465618307670686491478599198038319,8497228693591170378465618307670686491478599198038910⟩⟩, + ⟨⟨-2410669591414180702631203103583977362932427823340960,-2410669591414180702631203103583977362932427823340796⟩,⟨2022791965045923329268082485785434886459144815797119,2022791965045923329268082485785434886459144815797264⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635474953,-698970019787090239214134897920947303315208635474906⟩,⟨403550529079554596708656969046895623673248550740022,403550529079554596708656969046895623673248550740053⟩⟩, + ⟨⟨-172785859635933608689668007672005547335674376348324,-172785859635933608689668007672005547335674376348312⟩,⟨62888909809577914206399135406103116752715964944977,62888909809577914206399135406103116752715964944983⟩⟩, + ⟨⟨-35825989382484363203490078289313679019647568754977,-35825989382484363203490078289313679019647568754974⟩,⟨6317088538706991278331881212746633989944614313488,6317088538706991278331881212746633989944614313490⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩,⟨-1,1⟩⟩, + ⟨⟨-806729562165679621094116841556970714823800385693,-806729562165679621094116841556970714823800385692⟩,⟨-142248187944936185093122494262954485722089318399,-142248187944936185093122494262954485722089318398⟩⟩, + ⟨⟨-79524185662286074836714421579537546048980262155,-79524185662286074836714421579537546048980262154⟩,⟨-28944436485331233641080158598732387339107826655,-28944436485331233641080158598732387339107826654⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨-3078846199642597936314826729178585996042240530,-3078846199642597936314826729178585996042240529⟩⟩, + ⟨⟨-212613469326702398494739331395729644890361090,-212613469326702398494739331395729644890361089⟩,⟨-178403883695357919366987834606099530031233467,-178403883695357919366987834606099530031233466⟩⟩, + ⟨⟨-4017298320659316162931289078696795300718799,-4017298320659316162931289078696795300718798⟩,⟨-4787629706168426514662896730843721807229325,-4787629706168426514662896730843721807229324⟩⟩, + ⟨⟨-23489732358113082399862874825886428802813,-23489732358113082399862874825886428802812⟩,⟨-40685409900446552737507439330275362783299,-40685409900446552737507439330275362783298⟩⟩, + ⟨⟨-16308286965371908910245804548847044421,-16308286965371908910245804548847044420⟩,⟨-44806650187345465250721765598753862458,-44806650187345465250721765598753862457⟩⟩, + ⟨⟨-63170885387069912783318812127467,-63170885387069912783318812127466⟩,⟨-358259893824843632034900782893137,-358259893824843632034900782893136⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-63170885387069912783318812127467,-63170885387069912783318812127466⟩,⟨358259893824843632034900782893136,358259893824843632034900782893137⟩⟩, + ⟨⟨-16308286965371908910245804548847044421,-16308286965371908910245804548847044420⟩,⟨44806650187345465250721765598753862457,44806650187345465250721765598753862458⟩⟩, + ⟨⟨-23489732358113082399862874825886428802813,-23489732358113082399862874825886428802812⟩,⟨40685409900446552737507439330275362783298,40685409900446552737507439330275362783299⟩⟩, + ⟨⟨-4017298320659316162931289078696795300718799,-4017298320659316162931289078696795300718798⟩,⟨4787629706168426514662896730843721807229324,4787629706168426514662896730843721807229325⟩⟩, + ⟨⟨-212613469326702398494739331395729644890361090,-212613469326702398494739331395729644890361089⟩,⟨178403883695357919366987834606099530031233466,178403883695357919366987834606099530031233467⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨3078846199642597936314826729178585996042240529,3078846199642597936314826729178585996042240530⟩⟩, + ⟨⟨-79524185662286074836714421579537546048980262155,-79524185662286074836714421579537546048980262154⟩,⟨28944436485331233641080158598732387339107826654,28944436485331233641080158598732387339107826655⟩⟩, + ⟨⟨-806729562165679621094116841556970714823800385693,-806729562165679621094116841556970714823800385692⟩,⟨142248187944936185093122494262954485722089318398,142248187944936185093122494262954485722089318399⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩,⟨-1,1⟩⟩, + ⟨⟨-35825989382484363203490078289313679019647568754977,-35825989382484363203490078289313679019647568754974⟩,⟨-6317088538706991278331881212746633989944614313490,-6317088538706991278331881212746633989944614313488⟩⟩, + ⟨⟨-172785859635933608689668007672005547335674376348324,-172785859635933608689668007672005547335674376348312⟩,⟨-62888909809577914206399135406103116752715964944983,-62888909809577914206399135406103116752715964944977⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635474953,-698970019787090239214134897920947303315208635474906⟩,⟨-403550529079554596708656969046895623673248550740053,-403550529079554596708656969046895623673248550740022⟩⟩, + ⟨⟨-2410669591414180702631203103583977362932427823340960,-2410669591414180702631203103583977362932427823340796⟩,⟨-2022791965045923329268082485785434886459144815797264,-2022791965045923329268082485785434886459144815797119⟩⟩, + ⟨⟨-7130021462821351932182456156825576475335927342236879,-7130021462821351932182456156825576475335927342236367⟩,⟨-8497228693591170378465618307670686491478599198038910,-8497228693591170378465618307670686491478599198038319⟩⟩, + ⟨⟨-17921243559351411743059444294652121584177020296560109,-17921243559351411743059444294652121584177020296558710⟩,⟨-31040504379613153638845397438259401537550658444206823,-31040504379613153638845397438259401537550658444204697⟩⟩] +lemma tw0_0_0_15_calc (j : Fin 31) : taylorWaveBox 0 0 0 15 j = tw0_0_0_15 j := by + revert j + decide +kernel +def tw0_0_0_16 : Fin 31 → CI := ![⟨⟨4514658357533078058126056621844135307725227288723925,4514658357533078058126056621844135307725227288724250⟩,⟨2606539218020916335801904305695669616417146414198558,2606539218020916335801904305695669616417146414198771⟩⟩, + ⟨⟨1153480362207462466238688526040474931491923671764765,1153480362207462466238688526040474931491923671764850⟩,⟨967884946498517113047908782670907669055670436031957,967884946498517113047908782670907669055670436032030⟩⟩, + ⟨⟨254976076860103547266040869779216423057786115560806,254976076860103547266040869779216423057786115560826⟩,⟨303868655623605808048129572015524295949930094196053,303868655623605808048129572015524295949930094196075⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910372,46955236204022331368942161583079895990618065910377⟩,⟨81328854786764263382283872837366397192702514363833,81328854786764263382283872837366397192702514363839⟩⟩, + ⟨⟨6707668850464356910186737644970906924490342652523,6707668850464356910186737644970906924490342652525⟩,⟨18429168703829963973071410114206639600836910105719,18429168703829963973071410114206639600836910105722⟩⟩, + ⟨⟨612522189669079198353140742189575558933448231665,612522189669079198353140742189575558933448231666⟩,⟨3473785958382679278595422960108186502911659717042,3473785958382679278595422960108186502911659717043⟩⟩, + ⟨⟨-1,1⟩,⟨529440020073462376192782879028056848059477939597,529440020073462376192782879028056848059477939598⟩⟩, + ⟨⟨-11034218820599301409281195309906083531677051841,-11034218820599301409281195309906083531677051840⟩,⟨62578164590948382899119700276211817756750511128,62578164590948382899119700276211817756750511129⟩⟩, + ⟨⟨-1964572232013243369317363133844949861577256629,-1964572232013243369317363133844949861577256628⟩,⟨5397617846343953371060681878170256356650459229,5397617846343953371060681878170256356650459230⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨310244959971482327965865603780236805697259957,310244959971482327965865603780236805697259958⟩⟩, + ⟨⟨-8649264357858400216168106807319805973278229,-8649264357858400216168106807319805973278228⟩,⟨10307791871774800901906250693111628579652775,10307791871774800901906250693111628579652776⟩⟩, + ⟨⟨-185688670530950483308597323381674720789928,-185688670530950483308597323381674720789927⟩,⟨155811294956320014319522044132924231802611,155811294956320014319522044132924231802612⟩⟩, + ⟨⟨-1183490600477151214469396987076709006109,-1183490600477151214469396987076709006108⟩,⟨683288616768875091932454402312285615926,683288616768875091932454402312285615927⟩⟩, + ⟨⟨-868915080620569422982664139278812531,-868915080620569422982664139278812530⟩,⟨316259225450904764370976969643823801,316259225450904764370976969643823802⟩⟩, + ⟨⟨-3473785958382679278595422960109,-3473785958382679278595422960108⟩,⟨612522189669079198353140742189,612522189669079198353140742190⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-3473785958382679278595422960109,-3473785958382679278595422960108⟩,⟨-612522189669079198353140742190,-612522189669079198353140742189⟩⟩, + ⟨⟨-868915080620569422982664139278812531,-868915080620569422982664139278812530⟩,⟨-316259225450904764370976969643823802,-316259225450904764370976969643823801⟩⟩, + ⟨⟨-1183490600477151214469396987076709006109,-1183490600477151214469396987076709006108⟩,⟨-683288616768875091932454402312285615927,-683288616768875091932454402312285615926⟩⟩, + ⟨⟨-185688670530950483308597323381674720789928,-185688670530950483308597323381674720789927⟩,⟨-155811294956320014319522044132924231802612,-155811294956320014319522044132924231802611⟩⟩, + ⟨⟨-8649264357858400216168106807319805973278229,-8649264357858400216168106807319805973278228⟩,⟨-10307791871774800901906250693111628579652776,-10307791871774800901906250693111628579652775⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨-310244959971482327965865603780236805697259958,-310244959971482327965865603780236805697259957⟩⟩, + ⟨⟨-1964572232013243369317363133844949861577256629,-1964572232013243369317363133844949861577256628⟩,⟨-5397617846343953371060681878170256356650459230,-5397617846343953371060681878170256356650459229⟩⟩, + ⟨⟨-11034218820599301409281195309906083531677051841,-11034218820599301409281195309906083531677051840⟩,⟨-62578164590948382899119700276211817756750511129,-62578164590948382899119700276211817756750511128⟩⟩, + ⟨⟨-1,1⟩,⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩⟩, + ⟨⟨612522189669079198353140742189575558933448231665,612522189669079198353140742189575558933448231666⟩,⟨-3473785958382679278595422960108186502911659717043,-3473785958382679278595422960108186502911659717042⟩⟩, + ⟨⟨6707668850464356910186737644970906924490342652523,6707668850464356910186737644970906924490342652525⟩,⟨-18429168703829963973071410114206639600836910105722,-18429168703829963973071410114206639600836910105719⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910372,46955236204022331368942161583079895990618065910377⟩,⟨-81328854786764263382283872837366397192702514363839,-81328854786764263382283872837366397192702514363833⟩⟩, + ⟨⟨254976076860103547266040869779216423057786115560806,254976076860103547266040869779216423057786115560826⟩,⟨-303868655623605808048129572015524295949930094196075,-303868655623605808048129572015524295949930094196053⟩⟩, + ⟨⟨1153480362207462466238688526040474931491923671764765,1153480362207462466238688526040474931491923671764850⟩,⟨-967884946498517113047908782670907669055670436032030,-967884946498517113047908782670907669055670436031957⟩⟩, + ⟨⟨4514658357533078058126056621844135307725227288723925,4514658357533078058126056621844135307725227288724250⟩,⟨-2606539218020916335801904305695669616417146414198771,-2606539218020916335801904305695669616417146414198558⟩⟩] +lemma tw0_0_0_16_calc (j : Fin 31) : taylorWaveBox 0 0 0 16 j = tw0_0_0_16 j := by + revert j + decide +kernel +def tw0_0_0_17 : Fin 31 → CI := ![⟨⟨359152827132815577520148497810446873484169467973239,359152827132815577520148497810446873484169467973270⟩,⟨-622070944276038605487991186313010558787987836966057,-622070944276038605487991186313010558787987836966010⟩⟩, + ⟨⟨124473109134966316044472420097110351523485343317202,124473109134966316044472420097110351523485343317213⟩,⟨-148341274992967280984016877986319574173472246443185,-148341274992967280984016877986319574173472246443173⟩⟩, + ⟨⟨36287163655331136371917217431690137428465765647720,36287163655331136371917217431690137428465765647723⟩,⟨-30448545639657956512154045130980502154414996961288,-30448545639657956512154045130980502154414996961285⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014814,8964987113086656144908199868279810049180380014815⟩,⟨-5175937723022106880706975999784460140708483619865,-5175937723022106880706975999784460140708483619863⟩⟩, + ⟨⟨1862182313242428700531237207592173969947438298407,1862182313242428700531237207592173969947438298408⟩,⟨-677778932797225401911961574620629200037494150381,-677778932797225401911961574620629200037494150380⟩⟩, + ⟨⟨319100013070128785210856686383528729439408143699,319100013070128785210856686383528729439408143700⟩,⟨-56265941848687519201652408250735468549932771777,-56265941848687519201652408250735468549932771776⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨4598715839860967681152024715368952075921453744,4598715839860967681152024715368952075921453745⟩,⟨810877679178877146583323055026558045710118240,810877679178877146583323055026558045710118241⟩⟩, + ⟨⟨347075485411448179291065670634673766851924652,347075485411448179291065670634673766851924653⟩,⟨126325145733260693879031802324132961924063583,126325145733260693879031802324132961924063584⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨9872317739528859864629699706620140344063727,9872317739528859864629699706620140344063728⟩⟩, + ⟨⟨473433965191524832359933087846419761472318,473433965191524832359933087846419761472319⟩,⟨397258265579005710078774235280516140035621,397258265579005710078774235280516140035622⟩⟩, + ⟨⟨5725094965860670890577910675801242456660,5725094965860670890577910675801242456661⟩,⟨6822902493507480348624100379072384129174,6822902493507480348624100379072384129175⟩⟩, + ⟨⟨18829951743180961350688361562004357040,18829951743180961350688361562004357041⟩,⟨32614433123259572839408792308967567984,32614433123259572839408792308967567985⟩⟩, + ⟨⟨5810278709395091068555168323562503,5810278709395091068555168323562504⟩,⟨15963609554800958007409482505207634,15963609554800958007409482505207635⟩⟩, + ⟨⟨5626594184868751920165240825,5626594184868751920165240826⟩,⟨31910001307012878521085668638,31910001307012878521085668639⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨5626594184868751920165240825,5626594184868751920165240826⟩,⟨-31910001307012878521085668639,-31910001307012878521085668638⟩⟩, + ⟨⟨5810278709395091068555168323562503,5810278709395091068555168323562504⟩,⟨-15963609554800958007409482505207635,-15963609554800958007409482505207634⟩⟩, + ⟨⟨18829951743180961350688361562004357040,18829951743180961350688361562004357041⟩,⟨-32614433123259572839408792308967567985,-32614433123259572839408792308967567984⟩⟩, + ⟨⟨5725094965860670890577910675801242456660,5725094965860670890577910675801242456661⟩,⟨-6822902493507480348624100379072384129175,-6822902493507480348624100379072384129174⟩⟩, + ⟨⟨473433965191524832359933087846419761472318,473433965191524832359933087846419761472319⟩,⟨-397258265579005710078774235280516140035622,-397258265579005710078774235280516140035621⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨-9872317739528859864629699706620140344063728,-9872317739528859864629699706620140344063727⟩⟩, + ⟨⟨347075485411448179291065670634673766851924652,347075485411448179291065670634673766851924653⟩,⟨-126325145733260693879031802324132961924063584,-126325145733260693879031802324132961924063583⟩⟩, + ⟨⟨4598715839860967681152024715368952075921453744,4598715839860967681152024715368952075921453745⟩,⟨-810877679178877146583323055026558045710118241,-810877679178877146583323055026558045710118240⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨319100013070128785210856686383528729439408143699,319100013070128785210856686383528729439408143700⟩,⟨56265941848687519201652408250735468549932771776,56265941848687519201652408250735468549932771777⟩⟩, + ⟨⟨1862182313242428700531237207592173969947438298407,1862182313242428700531237207592173969947438298408⟩,⟨677778932797225401911961574620629200037494150380,677778932797225401911961574620629200037494150381⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014814,8964987113086656144908199868279810049180380014815⟩,⟨5175937723022106880706975999784460140708483619863,5175937723022106880706975999784460140708483619865⟩⟩, + ⟨⟨36287163655331136371917217431690137428465765647720,36287163655331136371917217431690137428465765647723⟩,⟨30448545639657956512154045130980502154414996961285,30448545639657956512154045130980502154414996961288⟩⟩, + ⟨⟨124473109134966316044472420097110351523485343317202,124473109134966316044472420097110351523485343317213⟩,⟨148341274992967280984016877986319574173472246443173,148341274992967280984016877986319574173472246443185⟩⟩, + ⟨⟨359152827132815577520148497810446873484169467973239,359152827132815577520148497810446873484169467973270⟩,⟨622070944276038605487991186313010558787987836966010,622070944276038605487991186313010558787987836966057⟩⟩] +lemma tw0_0_0_17_calc (j : Fin 31) : taylorWaveBox 0 0 0 17 j = tw0_0_0_17 j := by + revert j + decide +kernel +def tw0_0_0_18 : Fin 31 → CI := ![⟨⟨-81428896189552855155146582162217359628031458223024,-81428896189552855155146582162217359628031458223017⟩,⟨-47012995134852432606621988115494129887473178666125,-47012995134852432606621988115494129887473178666120⟩⟩, + ⟨⟨-18123305656635251239399312248473652967528542296683,-18123305656635251239399312248473652967528542296681⟩,⟨-15207259092195751856567304410865124800382874581679,-15207259092195751856567304410865124800382874581677⟩⟩, + ⟨⟨-3454277930062662731559126517355669486936508906982,-3454277930062662731559126517355669486936508906981⟩,⟨-4116648132971069441599312653051480381494407132860,-4116648132971069441599312653051480381494407132858⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨-938811255133340262646138237899899244591360555188,-938811255133340262646138237899899244591360555187⟩⟩, + ⟨⟨-65062106878807301180127849877359804974534435746,-65062106878807301180127849877359804974534435745⟩,⟨-178756669511666312935011630554344093596354131448,-178756669511666312935011630554344093596354131447⟩⟩, + ⟨⟨-4910129709976311668744328192241151102160801441,-4910129709976311668744328192241151102160801440⟩,⟨-27846729356153433207898486353784295718706886264,-27846729356153433207898486353784295718706886263⟩⟩, + ⟨⟨-1,1⟩,⟨-3437739179098607000216892970677563681642053416,-3437739179098607000216892970677563681642053415⟩⟩, + ⟨⟨56609941330406704197683424186792783400075780,56609941330406704197683424186792783400075781⟩,⟨-321050931076760713700860055005596420703635703,-321050931076760713700860055005596420703635702⟩⟩, + ⟨⟨7716764023874729647159264107884393313132860,7716764023874729647159264107884393313132861⟩,⟨-21201634906855609435499873169852040994605670,-21201634906855609435499873169852040994605669⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨-895320181973781836172235715770625347701417,-895320181973781836172235715770625347701416⟩⟩, + ⟨⟨17333661787789269010978053047139317741229,17333661787789269010978053047139317741230⟩,⟨-20657453708410837538021420177785076145267,-20657453708410837538021420177785076145266⟩⟩, + ⟨⟨238164226108473135790444154611635012362,238164226108473135790444154611635012363⟩,⟨-199843514287242131021240810546621874018,-199843514287242131021240810546621874017⟩⟩, + ⟨⟨853843862508565746471629825373292300,853843862508565746471629825373292301⟩,⟨-492966983865230243729212578101923728,-492966983865230243729212578101923727⟩⟩, + ⟨⟨278617547234102886279546686685391,278617547234102886279546686685392⟩,⟨-101408493937471129286797305072343,-101408493937471129286797305072342⟩⟩, + ⟨⟨278467293561534332078984863,278467293561534332078984864⟩,⟨-49101297099763116687443282,-49101297099763116687443281⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨278467293561534332078984863,278467293561534332078984864⟩,⟨49101297099763116687443281,49101297099763116687443282⟩⟩, + ⟨⟨278617547234102886279546686685391,278617547234102886279546686685392⟩,⟨101408493937471129286797305072342,101408493937471129286797305072343⟩⟩, + ⟨⟨853843862508565746471629825373292300,853843862508565746471629825373292301⟩,⟨492966983865230243729212578101923727,492966983865230243729212578101923728⟩⟩, + ⟨⟨238164226108473135790444154611635012362,238164226108473135790444154611635012363⟩,⟨199843514287242131021240810546621874017,199843514287242131021240810546621874018⟩⟩, + ⟨⟨17333661787789269010978053047139317741229,17333661787789269010978053047139317741230⟩,⟨20657453708410837538021420177785076145266,20657453708410837538021420177785076145267⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨895320181973781836172235715770625347701416,895320181973781836172235715770625347701417⟩⟩, + ⟨⟨7716764023874729647159264107884393313132860,7716764023874729647159264107884393313132861⟩,⟨21201634906855609435499873169852040994605669,21201634906855609435499873169852040994605670⟩⟩, + ⟨⟨56609941330406704197683424186792783400075780,56609941330406704197683424186792783400075781⟩,⟨321050931076760713700860055005596420703635702,321050931076760713700860055005596420703635703⟩⟩, + ⟨⟨-1,1⟩,⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩⟩, + ⟨⟨-4910129709976311668744328192241151102160801441,-4910129709976311668744328192241151102160801440⟩,⟨27846729356153433207898486353784295718706886263,27846729356153433207898486353784295718706886264⟩⟩, + ⟨⟨-65062106878807301180127849877359804974534435746,-65062106878807301180127849877359804974534435745⟩,⟨178756669511666312935011630554344093596354131447,178756669511666312935011630554344093596354131448⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨938811255133340262646138237899899244591360555187,938811255133340262646138237899899244591360555188⟩⟩, + ⟨⟨-3454277930062662731559126517355669486936508906982,-3454277930062662731559126517355669486936508906981⟩,⟨4116648132971069441599312653051480381494407132858,4116648132971069441599312653051480381494407132860⟩⟩, + ⟨⟨-18123305656635251239399312248473652967528542296683,-18123305656635251239399312248473652967528542296681⟩,⟨15207259092195751856567304410865124800382874581677,15207259092195751856567304410865124800382874581679⟩⟩, + ⟨⟨-81428896189552855155146582162217359628031458223024,-81428896189552855155146582162217359628031458223017⟩,⟨47012995134852432606621988115494129887473178666120,47012995134852432606621988115494129887473178666125⟩⟩] +lemma tw0_0_0_18_calc (j : Fin 31) : taylorWaveBox 0 0 0 18 j = tw0_0_0_18 j := by + revert j + decide +kernel +def tw0_0_0_19 : Fin 31 → CI := ![⟨⟨-5860939688051789411371205992794324400539448741820,-5860939688051789411371205992794324400539448741818⟩,⟨10151445319802585615026049916779046022334427963226,10151445319802585615026049916779046022334427963228⟩⟩, + ⟨⟨-1769444942417731935501094968568116140532589772880,-1769444942417731935501094968568116140532589772879⟩,⟨2108742367023987004791898961173365089093582253461,2108742367023987004791898961173365089093582253462⟩⟩, + ⟨⟨-444779920411186906592821144842854837600950902936,-444779920411186906592821144842854837600950902935⟩,⟨373214667172086891116565728133301062879273122944,373214667172086891116565728133301062879273122945⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨54057627228469227234095818009485456165873225657,54057627228469227234095818009485456165873225658⟩⟩, + ⟨⟨-16342293748408264753003833432643176152405609462,-16342293748408264753003833432643176152405609461⟩,⟨5948108484055250435403505146634674716373854752,5948108484055250435403505146634674716373854753⟩⟩, + ⟨⟨-2314367205603038592439645502062755423159675412,-2314367205603038592439645502062755423159675411⟩,⟨408085381614670974748251851003600997922186840,408085381614670974748251851003600997922186841⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨-21346269767172793768314666781586579362337555,-21346269767172793768314666781586579362337554⟩,⟨-3763923297433966307636556989526436552066291,-3763923297433966307636556989526436552066290⟩⟩, + ⟨⟨-1233461119767972274941127283789450047760598,-1233461119767972274941127283789450047760597⟩,⟨-448943132720201157332776340058589347764833,-448943132720201157332776340058589347764832⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨-25776685346827138535545262341253974993646,-25776685346827138535545262341253974993645⟩⟩, + ⟨⟨-858429957833528016350535340827990130624,-858429957833528016350535340827990130623⟩,⟨-720308261009641390970444888398153580776,-720308261009641390970444888398153580775⟩⟩, + ⟨⟨-6643671072511817607678535401887676505,-6643671072511817607678535401887676504⟩,⟨-7917618868680186610048638275889279315,-7917618868680186610048638275889279314⟩⟩, + ⟨⟨-12291281388677186267635947390200604,-12291281388677186267635947390200603⟩,⟨-21289123855314632027723110635073010,-21289123855314632027723110635073009⟩⟩, + ⟨⟨-1685630579711980874148232693744,-1685630579711980874148232693743⟩,⟨-4631231955300872190781155688248,-4631231955300872190781155688247⟩⟩, + ⟨⟨-408085381614670974748252,-408085381614670974748251⟩,⟨-2314367205603038592439646,-2314367205603038592439645⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-408085381614670974748252,-408085381614670974748251⟩,⟨2314367205603038592439645,2314367205603038592439646⟩⟩, + ⟨⟨-1685630579711980874148232693744,-1685630579711980874148232693743⟩,⟨4631231955300872190781155688247,4631231955300872190781155688248⟩⟩, + ⟨⟨-12291281388677186267635947390200604,-12291281388677186267635947390200603⟩,⟨21289123855314632027723110635073009,21289123855314632027723110635073010⟩⟩, + ⟨⟨-6643671072511817607678535401887676505,-6643671072511817607678535401887676504⟩,⟨7917618868680186610048638275889279314,7917618868680186610048638275889279315⟩⟩, + ⟨⟨-858429957833528016350535340827990130624,-858429957833528016350535340827990130623⟩,⟨720308261009641390970444888398153580775,720308261009641390970444888398153580776⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨25776685346827138535545262341253974993645,25776685346827138535545262341253974993646⟩⟩, + ⟨⟨-1233461119767972274941127283789450047760598,-1233461119767972274941127283789450047760597⟩,⟨448943132720201157332776340058589347764832,448943132720201157332776340058589347764833⟩⟩, + ⟨⟨-21346269767172793768314666781586579362337555,-21346269767172793768314666781586579362337554⟩,⟨3763923297433966307636556989526436552066290,3763923297433966307636556989526436552066291⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨-2314367205603038592439645502062755423159675412,-2314367205603038592439645502062755423159675411⟩,⟨-408085381614670974748251851003600997922186841,-408085381614670974748251851003600997922186840⟩⟩, + ⟨⟨-16342293748408264753003833432643176152405609462,-16342293748408264753003833432643176152405609461⟩,⟨-5948108484055250435403505146634674716373854753,-5948108484055250435403505146634674716373854752⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨-54057627228469227234095818009485456165873225658,-54057627228469227234095818009485456165873225657⟩⟩, + ⟨⟨-444779920411186906592821144842854837600950902936,-444779920411186906592821144842854837600950902935⟩,⟨-373214667172086891116565728133301062879273122945,-373214667172086891116565728133301062879273122944⟩⟩, + ⟨⟨-1769444942417731935501094968568116140532589772880,-1769444942417731935501094968568116140532589772879⟩,⟨-2108742367023987004791898961173365089093582253462,-2108742367023987004791898961173365089093582253461⟩⟩, + ⟨⟨-5860939688051789411371205992794324400539448741820,-5860939688051789411371205992794324400539448741818⟩,⟨-10151445319802585615026049916779046022334427963228,-10151445319802585615026049916779046022334427963226⟩⟩] +lemma tw0_0_0_19_calc (j : Fin 31) : taylorWaveBox 0 0 0 19 j = tw0_0_0_19 j := by + revert j + decide +kernel +def tw0_0_0_20 : Fin 31 → CI := ![⟨⟨1208019168182208037455005163664889817788595591495,1208019168182208037455005163664889817788595591496⟩,⟨697450191936225609746866483250619399950190057173,697450191936225609746866483250619399950190057174⟩⟩, + ⟨⟨234210437878246279147803742166568754238560948114,234210437878246279147803742166568754238560948115⟩,⟨196525892041505704942147810190691997601337789541,196525892041505704942147810190691997601337789542⟩⟩, + ⟨⟨38490782666154654957155948501880127674405677712,38490782666154654957155948501880127674405677713⟩,⟨45871528524152753251301952981542779243202661161,45871528524152753251301952981542779243202661162⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨8913608172637075300767496000977635458262637098,8913608172637075300767496000977635458262637099⟩⟩, + ⟨⟨519070386562863793874354817152487805504074627,519070386562863793874354817152487805504074628⟩,⟨1426134166189050259619367352160390067366677174,1426134166189050259619367352160390067366677175⟩⟩, + ⟨⟨32374697901970646719021136460229032550711103,32374697901970646719021136460229032550711104⟩,⟨183606035627061732466368843520962329826042903,183606035627061732466368843520962329826042904⟩⟩, + ⟨⟨-1,1⟩,⟨18359916521552451562374200882082883809634660,18359916521552451562374200882082883809634661⟩⟩, + ⟨⟨-238883106664525632639174050929400260696347,-238883106664525632639174050929400260696346⟩,⟨1354773419840322324426254544662179195018871,1354773419840322324426254544662179195018872⟩⟩, + ⟨⟨-24931250336953536345554325482467135589491,-24931250336953536345554325482467135589490⟩,⟨68498047339550284202169611091691928245365,68498047339550284202169611091691928245366⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨2125169795188206505958436966175469269338,2125169795188206505958436966175469269339⟩⟩, + ⟨⟨-28572160872574857297850020171843467252,-28572160872574857297850020171843467251⟩,⟨34050975368070803005814300417799852452,34050975368070803005814300417799852453⟩⟩, + ⟨⟨-251251851229996001356258545538353619,-251251851229996001356258545538353618⟩,⟨210825335699698472011073246129817118,210825335699698472011073246129817119⟩⟩, + ⟨⟨-506679962918330790032967797798031,-506679962918330790032967797798030⟩,⟨292531812983887881986372107816400,292531812983887881986372107816401⟩⟩, + ⟨⟨-73482041857795524101205426946,-73482041857795524101205426945⟩,⟨26745275989340724690710088914,26745275989340724690710088915⟩⟩, + ⟨⟨-18360603562706173246637,-18360603562706173246636⟩,⟨3237469790197064671902,3237469790197064671903⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-18360603562706173246637,-18360603562706173246636⟩,⟨-3237469790197064671903,-3237469790197064671902⟩⟩, + ⟨⟨-73482041857795524101205426946,-73482041857795524101205426945⟩,⟨-26745275989340724690710088915,-26745275989340724690710088914⟩⟩, + ⟨⟨-506679962918330790032967797798031,-506679962918330790032967797798030⟩,⟨-292531812983887881986372107816401,-292531812983887881986372107816400⟩⟩, + ⟨⟨-251251851229996001356258545538353619,-251251851229996001356258545538353618⟩,⟨-210825335699698472011073246129817119,-210825335699698472011073246129817118⟩⟩, + ⟨⟨-28572160872574857297850020171843467252,-28572160872574857297850020171843467251⟩,⟨-34050975368070803005814300417799852453,-34050975368070803005814300417799852452⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨-2125169795188206505958436966175469269339,-2125169795188206505958436966175469269338⟩⟩, + ⟨⟨-24931250336953536345554325482467135589491,-24931250336953536345554325482467135589490⟩,⟨-68498047339550284202169611091691928245366,-68498047339550284202169611091691928245365⟩⟩, + ⟨⟨-238883106664525632639174050929400260696347,-238883106664525632639174050929400260696346⟩,⟨-1354773419840322324426254544662179195018872,-1354773419840322324426254544662179195018871⟩⟩, + ⟨⟨-1,1⟩,⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩⟩, + ⟨⟨32374697901970646719021136460229032550711103,32374697901970646719021136460229032550711104⟩,⟨-183606035627061732466368843520962329826042904,-183606035627061732466368843520962329826042903⟩⟩, + ⟨⟨519070386562863793874354817152487805504074627,519070386562863793874354817152487805504074628⟩,⟨-1426134166189050259619367352160390067366677175,-1426134166189050259619367352160390067366677174⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨-8913608172637075300767496000977635458262637099,-8913608172637075300767496000977635458262637098⟩⟩, + ⟨⟨38490782666154654957155948501880127674405677712,38490782666154654957155948501880127674405677713⟩,⟨-45871528524152753251301952981542779243202661162,-45871528524152753251301952981542779243202661161⟩⟩, + ⟨⟨234210437878246279147803742166568754238560948114,234210437878246279147803742166568754238560948115⟩,⟨-196525892041505704942147810190691997601337789542,-196525892041505704942147810190691997601337789541⟩⟩, + ⟨⟨1208019168182208037455005163664889817788595591495,1208019168182208037455005163664889817788595591496⟩,⟨-697450191936225609746866483250619399950190057174,-697450191936225609746866483250619399950190057173⟩⟩] +lemma tw0_0_0_20_calc (j : Fin 31) : taylorWaveBox 0 0 0 20 j = tw0_0_0_20 j := by + revert j + decide +kernel +def tw0_0_0 : Fin 21 → Fin 31 → CI := ![tw0_0_0_0,tw0_0_0_1,tw0_0_0_2,tw0_0_0_3,tw0_0_0_4,tw0_0_0_5,tw0_0_0_6,tw0_0_0_7,tw0_0_0_8,tw0_0_0_9,tw0_0_0_10,tw0_0_0_11,tw0_0_0_12,tw0_0_0_13,tw0_0_0_14,tw0_0_0_15,tw0_0_0_16,tw0_0_0_17,tw0_0_0_18,tw0_0_0_19,tw0_0_0_20] +lemma tw0_0_0_mem (l : Fin 21) (j : Fin 31) : (tw0_0_0 l j).Mem (taylorWave 0 0 (nearNode 0) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 0 l j = tw0_0_0 l j := by + fin_cases l + · exact tw0_0_0_0_calc j + · exact tw0_0_0_1_calc j + · exact tw0_0_0_2_calc j + · exact tw0_0_0_3_calc j + · exact tw0_0_0_4_calc j + · exact tw0_0_0_5_calc j + · exact tw0_0_0_6_calc j + · exact tw0_0_0_7_calc j + · exact tw0_0_0_8_calc j + · exact tw0_0_0_9_calc j + · exact tw0_0_0_10_calc j + · exact tw0_0_0_11_calc j + · exact tw0_0_0_12_calc j + · exact tw0_0_0_13_calc j + · exact tw0_0_0_14_calc j + · exact tw0_0_0_15_calc j + · exact tw0_0_0_16_calc j + · exact tw0_0_0_17_calc j + · exact tw0_0_0_18_calc j + · exact tw0_0_0_19_calc j + · exact tw0_0_0_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 0 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave001.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave001.lean new file mode 100644 index 0000000000000000000000000000000000000000..743f3ce33b9dc128f64cf4a745d4256d596a39ae --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave001.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_1_0 : Fin 31 → CI := ![⟨⟨-120070265404,106003062731⟩,⟨3426945972600471742650864930512552477539478960847371009226562,3426945972600471742650864930512552477539478960847618899170343⟩⟩, + ⟨⟨-1492625356954872136799043391956578412439417502946999659982174,-1492625356954872136799043391956578412439417502946828071650301⟩,⟨2585302954911470020439523671974518570989385866365181315201636,2585302954911470020439523671974518570989385866365360741501393⟩⟩, + ⟨⟨-2229164282551216497215711737569865502536766384774200237793985,-2229164282551216497215711737569865502536766384774082779711818⟩,⟨1287008598598843832239991496125825263787048765295999044037408,1287008598598843832239991496125825263787048765296111457827070⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942432397349771,-2193245422464301915296553555528033585625266534942361144027254⟩,⟨-32246546151,25044142374⟩⟩, + ⟨⟨-1596028865021876900373379409739371158620998417501043872711897,-1596028865021876900373379409739371158620998417500975194305170⟩,⟨-921467694854793513023899236871152999516171009472360646245378,-921467694854793513023899236871152999516171009472297000229134⟩⟩, + ⟨⟨-761543549466771498366858873447233883897661991299469421295581,-761543549466771498366858873447233883897661991299413615366355⟩,⟨-1319032119852790826754859016313529883157849931819047746327839,-1319032119852790826754859016313529883157849931818988916931458⟩⟩, + ⟨⟨-17809878630,20848398415⟩,⟨-1233700550136169827354311374984518891914212425905121439640941,-1233700550136169827354311374984518891914212425905074927382269⟩⟩, + ⟨⟨487387871658733758954789679006229685694503674431630282186281,487387871658733758954789679006229685694503674431659019592993⟩,⟨-844180556705786129123109770440659125221023956364186205436546,-844180556705786129123109770440659125221023956364154858242057⟩⟩, + ⟨⟨646325738727867505109880917993629642747346466591309411180044,646325738727867505109880917993629642747346466591328247462539⟩,⟨-373156339238718034199760847989144603109854375736735308468323,-373156339238718034199760847989144603109854375736717910111318⟩⟩, + ⟨⟨548311355616075478824138388882008396406316633735593866662420,548311355616075478824138388882008396406316633735604518679434⟩,⟨-3130527972,4030830544⟩⟩, + ⟨⟨329758029963197706688714754078382470789462482954750778145884,329758029963197706688714754078382470789462482954757606155403⟩,⟨190385887366692874591714718361808470974415497824858175772651,190385887366692874591714718361808470974415497824863937011725⟩⟩, + ⟨⟨121846967914683439738697419751557421423625918607909218832691,121846967914683439738697419751557421423625918607912413558697⟩,⟨211045139176446532280777442610164781305255989091041009515948,211045139176446532280777442610164781305255989091044656538389⟩⟩, + ⟨⟨-503864193,391326010⟩,⟨137077838904018869706034597220502099101579158433898914240515,137077838904018869706034597220502099101579158433900682095341⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906479651977942500411,-30461741978670859934674354937889355355906479651977552229404⟩,⟨52761284794111633070194360652541195326313997272760397399487,52761284794111633070194360652541195326313997272760969097108⟩⟩, + ⟨⟨-13190321198527908267548590163135298831578499318190222441973,-13190321198527908267548590163135298831578499318190125434327⟩,⟨7615435494667714983668588734472338838976619912994393929810,7615435494667714983668588734472338838976619912994468923580⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨-13190321198527908267548590163135298831578499318190222441942,-13190321198527908267548590163135298831578499318190125434281⟩,⟨-7615435494667714983668588734472338838976619912994468923664,-7615435494667714983668588734472338838976619912994393929861⟩⟩, + ⟨⟨-30461741978670859934674354937889355355906479651977942500129,-30461741978670859934674354937889355355906479651977552229139⟩,⟨-52761284794111633070194360652541195326313997272760969097253,-52761284794111633070194360652541195326313997272760397399645⟩⟩, + ⟨⟨-503863370,391326737⟩,⟨-137077838904018869706034597220502099101579158433900682095266,-137077838904018869706034597220502099101579158433898914240535⟩⟩, + ⟨⟨121846967914683439738697419751557421423625918607909218833881,121846967914683439738697419751557421423625918607912413559470⟩,⟨-211045139176446532280777442610164781305255989091044656537632,-211045139176446532280777442610164781305255989091041009515593⟩⟩, + ⟨⟨329758029963197706688714754078382470789462482954750778147849,329758029963197706688714754078382470789462482954757606155672⟩,⟨-190385887366692874591714718361808470974415497824863937009069,-190385887366692874591714718361808470974415497824858175771623⟩⟩, + ⟨⟨548311355616075478824138388882008396406316633735593866662486,548311355616075478824138388882008396406316633735604518679520⟩,⟨-4030827740,3130530795⟩⟩, + ⟨⟨646325738727867505109880917993629642747346466591309411178238,646325738727867505109880917993629642747346466591328247459466⟩,⟨373156339238718034199760847989144603109854375736717910116269,373156339238718034199760847989144603109854375736735308471979⟩⟩, + ⟨⟨487387871658733758954789679006229685694503674431630282182085,487387871658733758954789679006229685694503674431659019588588⟩,⟨844180556705786129123109770440659125221023956364154858244756,844180556705786129123109770440659125221023956364186205439041⟩⟩, + ⟨⟨-17809886504,20848390451⟩,⟨1233700550136169827354311374984518891914212425905074927382161,1233700550136169827354311374984518891914212425905121439640743⟩⟩, + ⟨⟨-761543549466771498366858873447233883897661991299469421302092,-761543549466771498366858873447233883897661991299413615373133⟩,⟨1319032119852790826754859016313529883157849931818988916927420,1319032119852790826754859016313529883157849931819047746323535⟩⟩, + ⟨⟨-1596028865021876900373379409739371158620998417501043872717808,-1596028865021876900373379409739371158620998417500975194308321⟩,⟨921467694854793513023899236871152999516171009472297000220468,921467694854793513023899236871152999516171009472360646239413⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942432397350880,-2193245422464301915296553555528033585625266534942361144025433⟩,⟨-25044154055,32246537392⟩⟩, + ⟨⟨-2229164282551216497215711737569865502536766384774200237785039,-2229164282551216497215711737569865502536766384774082779705138⟩,⟨-1287008598598843832239991496125825263787048765296111457839551,-1287008598598843832239991496125825263787048765295999044052139⟩⟩, + ⟨⟨-1492625356954872136799043391956578412439417502946999659966295,-1492625356954872136799043391956578412439417502946828071642247⟩,⟨-2585302954911470020439523671974518570989385866365360741504418,-2585302954911470020439523671974518570989385866365181315212512⟩⟩, + ⟨⟨-120070243304,106003079256⟩,⟨-3426945972600471742650864930512552477539478960847618899166531,-3426945972600471742650864930512552477539478960847371009228336⟩⟩] +lemma tw0_0_1_0_calc (j : Fin 31) : taylorWaveBox 0 0 1 0 j = tw0_0_1_0 j := by + revert j + decide +kernel +def tw0_0_1_1 : Fin 31 → CI := ![⟨⟨2990574525491880803961835943971970987868951443468741571218446,2990574525491880803961835943971970987868951443468967415297899⟩,⟨-92505123099,104781073258⟩⟩, + ⟨⟨2105695607154704103214367121435812847621844040544065533762148,2105695607154704103214367121435812847621844040544218376785237⟩,⟨1215723925622180877936485604482827909735170779389345069390090,1215723925622180877936485604482827909735170779389488695622509⟩⟩, + ⟨⟨973376627037875870563578306504654853384901677229741582355550,973376627037875870563578306504654853384901677229829700308946⟩,⟨1685937772929622782347654725143761234047081398351078899153695,1685937772929622782347654725143761234047081398351173100305209⟩⟩, + ⟨⟨-22512336113,17484109715⟩,⟨1531174157051842971628460003313649145788903139056026191508254,1531174157051842971628460003313649145788903139056080809590212⟩⟩, + ⟨⟨-589696991619213829640474613544695316274603610556622149331390,-589696991619213829640474613544695316274603610556579541741120⟩,⟨1021385150554996778927960145273712427181003796634179608337731,1021385150554996778927960145273712427181003796634226810532803⟩⟩, + ⟨⟨-767381781033055431200571108394975527558981064338263941828912,-767381781033055431200571108394975527558981064338227273621372⟩,⟨443048077850649007994346065773625331536140954587960455021768,443048077850649007994346065773625331536140954587994331861178⟩⟩, + ⟨⟨-645964097506246253655756563897945733379693511789285775508488,-645964097506246253655756563897945733379693511789259365579210⟩,⟨-10916195885,9325230647⟩⟩, + ⟨⟨-392899471888924380774692407498227470110198304941189112604368,-392899471888924380774692407498227470110198304941173272319700⟩,⟨-226840615859532292093105185676096169746504168749052441652286,-226840615859532292093105185676096169746504168749038344599759⟩⟩, + ⟨⟨-151965490702772609742060700560353488716896347423680138539662,-151965490702772609742060700560353488716896347423672569450813⟩,⟨-263211950894338012901795890179476605952730505068022435460854,-263211950894338012901795890179476605952730505068013926677727⟩⟩, + ⟨⟨-1092760410,1407025293⟩,⟨-191396769631480371453557500414206143223612892382008851313344,-191396769631480371453557500414206143223612892382004523823125⟩⟩, + ⟨⟨55381009731331125999293258221703166442017619323496444976198,55381009731331125999293258221703166442017619323498297135944⟩,⟨-95922722629131928900071388549371940944872633042281733058591,-95922722629131928900071388549371940944872633042279441539621⟩⟩, + ⟨⟨49112433986115547596836550937278433763774788117647193100342,49112433986115547596836550937278433763774788117648198130737⟩,⟨-28355076982441536511638148209512021218313021093631010352082,-28355076982441536511638148209512021218313021093630176648567⟩⟩, + ⟨⟨23924596203935046431694687551775767902951611547750643594448,23924596203935046431694687551775767902951611547751028297679⟩,⟨-68299274,87940893⟩⟩, + ⟨⟨6139054248264443449604568867159804220471848514705916011443,6139054248264443449604568867159804220471848514706002072701⟩,⟨3544384622805192063954768526189002652289127636703800881473,3544384622805192063954768526189002652289127636703857573695⟩⟩, + ⟨⟨443048077850649007994346065773625331536140954587975451829,443048077850649007994346065773625331536140954587981225058⟩,⟨767381781033055431200571108394975527558981064338241018962,767381781033055431200571108394975527558981064338249105292⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨443048077850649007994346065773625331536140954587975451832,443048077850649007994346065773625331536140954587981225062⟩,⟨-767381781033055431200571108394975527558981064338249105290,-767381781033055431200571108394975527558981064338241018959⟩⟩, + ⟨⟨6139054248264443449604568867159804220471848514705916011462,6139054248264443449604568867159804220471848514706002072718⟩,⟨-3544384622805192063954768526189002652289127636703857573662,-3544384622805192063954768526189002652289127636703800881442⟩⟩, + ⟨⟨23924596203935046431694687551775767902951611547750643594452,23924596203935046431694687551775767902951611547751028297666⟩,⟨-87940749,68299401⟩⟩, + ⟨⟨49112433986115547596836550937278433763774788117647193100259,49112433986115547596836550937278433763774788117648198130561⟩,⟨28355076982441536511638148209512021218313021093630176648844,28355076982441536511638148209512021218313021093631010352262⟩⟩, + ⟨⟨55381009731331125999293258221703166442017619323496444975900,55381009731331125999293258221703166442017619323498297135172⟩,⟨95922722629131928900071388549371940944872633042279441540193,95922722629131928900071388549371940944872633042281733058670⟩⟩, + ⟨⟨-1092761396,1407024314⟩,⟨191396769631480371453557500414206143223612892382004523823149,191396769631480371453557500414206143223612892382008851313375⟩⟩, + ⟨⟨-151965490702772609742060700560353488716896347423680138541150,-151965490702772609742060700560353488716896347423672569452829⟩,⟨263211950894338012901795890179476605952730505068013926676992,263211950894338012901795890179476605952730505068022435459603⟩⟩, + ⟨⟨-392899471888924380774692407498227470110198304941189112605529,-392899471888924380774692407498227470110198304941173272320956⟩,⟨226840615859532292093105185676096169746504168749038344597806,226840615859532292093105185676096169746504168749052441650236⟩⟩, + ⟨⟨-645964097506246253655756563897945733379693511789285775508386,-645964097506246253655756563897945733379693511789259365579155⟩,⟨-9325234770,10916191716⟩⟩, + ⟨⟨-767381781033055431200571108394975527558981064338263941826408,-767381781033055431200571108394975527558981064338227273619022⟩,⟨-443048077850649007994346065773625331536140954587994331864967,-443048077850649007994346065773625331536140954587960455025711⟩⟩, + ⟨⟨-589696991619213829640474613544695316274603610556622149327572,-589696991619213829640474613544695316274603610556579541735574⟩,⟨-1021385150554996778927960145273712427181003796634226810536587,-1021385150554996778927960145273712427181003796634179608339748⟩⟩, + ⟨⟨-22512329998,17484117870⟩,⟨-1531174157051842971628460003313649145788903139056080809590987,-1531174157051842971628460003313649145788903139056026191506983⟩⟩, + ⟨⟨973376627037875870563578306504654853384901677229741582366692,973376627037875870563578306504654853384901677229829700318386⟩,⟨-1685937772929622782347654725143761234047081398351173100298444,-1685937772929622782347654725143761234047081398351078899148643⟩⟩, + ⟨⟨2105695607154704103214367121435812847621844040544065533771008,2105695607154704103214367121435812847621844040544218376787702⟩,⟨-1215723925622180877936485604482827909735170779389488695609576,-1215723925622180877936485604482827909735170779389345069383530⟩⟩, + ⟨⟨2990574525491880803961835943971970987868951443468741571219995,2990574525491880803961835943971970987868951443468967415294574⟩,⟨-104781053972,92505137520⟩⟩] +lemma tw0_0_1_1_calc (j : Fin 31) : taylorWaveBox 0 0 1 1 j = tw0_0_1_1 j := by + revert j + decide +kernel +def tw0_0_1_2 : Fin 31 → CI := ![⟨⟨-60544461494,68579052084⟩,⟨-1957326449853765537319161777599044963061977271265133764987345,-1957326449853765537319161777599044963061977271264979720019397⟩⟩, + ⟨⟨742643485408219821053362161464147272108532531880633165260447,742643485408219821053362161464147272108532531880723265440766⟩,⟨-1286296248637072881523689202998756912881166834427560360559298,-1286296248637072881523689202998756912881166834427462899661459⟩⟩, + ⟨⟨956317866444279429643848587225309667555159463715200780906728,956317866444279429643848587225309667555159463715257258869271⟩,⟨-552130377622453308754297081777840229037166744144234397694113,-552130377622453308754297081777840229037166744144182656884981⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310151666771044,801720913860102364085928664104568816870185890310182816688814⟩,⟨-9154658442,11787431627⟩⟩, + ⟨⟨490229679724473762452840837700562264720251031415366959108965,490229679724473762452840837700562264720251031415391174985754⟩,⟨283034237553668950438418247761260417819164535591019156300245,283034237553668950438418247761260417819164535591040507401464⟩⟩, + ⟨⟨193316192578149682698188817540646416104886644075553003150539,193316192578149682698188817540646416104886644075568400054792⟩,⟨334833467471124760913080279830996697438871000215400169146446,334833467471124760913080279830996697438871000215417234478288⟩⟩, + ⟨⟨-4286780101,3662009513⟩,⟨253669507901048013636563366376836227212832254355945764523420,253669507901048013636563366376836227212832254355956943133519⟩⟩, + ⟨⟨-79182312480010110033178139664648772036561569413352587584266,-79182312480010110033178139664648772036561569413347414739506⟩,⟨137147788276172702069997682618776247270961561688228226312911,137147788276172702069997682618776247270961561688234192170320⟩⟩, + ⟨⟨-80393515539817055095230575187422307055072927151721037632343,-80393515539817055095230575187422307055072927151718182871917⟩,⟨46415217838013738815835135091509204506783283242540927659780,46415217838013738815835135091509204506783283242543387250640⟩⟩, + ⟨⟨-50107557116256397755370541506535551054386618144386098823810,-50107557116256397755370541506535551054386618144384806392211⟩,⟨-368358361,286084007⟩⟩, + ⟨⟨-20927091716945297557067517489437293589929437513463302337526,-20927091716945297557067517489437293589929437513462735792637⟩,⟨-12082262036134355168636801096290401006555415254722808070627,-12082262036134355168636801096290401006555415254722365533018⟩⟩, + ⟨⟨-4948894530000631877073633729040548252285098088334441628976,-4948894530000631877073633729040548252285098088334280367441⟩,⟨-8571736767260793879374855163673515454435097605514560051258,-8571736767260793879374855163673515454435097605514357355677⟩⟩, + ⟨⟨-8940355,11511436⟩,⟨-3131722319766024859710658844158471940899163634024120951064,-3131722319766024859710658844158471940899163634024060624946⟩⟩, + ⟨⟨309305908125039492317102108065034265767818630520895036274,309305908125039492317102108065034265767818630520900968156⟩,⟨-535733547953799617460928447729594715902193600344658022810,-535733547953799617460928447729594715902193600344648807255⟩⟩, + ⟨⟨33483346747112476091308027983099669743887100021540616668,33483346747112476091308027983099669743887100021541076082⟩,⟨-19331619257814968269818881754064641610488664407556268114,-19331619257814968269818881754064641610488664407555954674⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨33483346747112476091308027983099669743887100021540616668,33483346747112476091308027983099669743887100021541076082⟩,⟨19331619257814968269818881754064641610488664407555954674,19331619257814968269818881754064641610488664407556268114⟩⟩, + ⟨⟨309305908125039492317102108065034265767818630520895036271,309305908125039492317102108065034265767818630520900968153⟩,⟨535733547953799617460928447729594715902193600344648807256,535733547953799617460928447729594715902193600344658022812⟩⟩, + ⟨⟨-8940371,11511418⟩,⟨3131722319766024859710658844158471940899163634024060624947,3131722319766024859710658844158471940899163634024120951062⟩⟩, + ⟨⟨-4948894530000631877073633729040548252285098088334441629007,-4948894530000631877073633729040548252285098088334280367489⟩,⟨8571736767260793879374855163673515454435097605514357355662,8571736767260793879374855163673515454435097605514560051227⟩⟩, + ⟨⟨-20927091716945297557067517489437293589929437513463302337543,-20927091716945297557067517489437293589929437513462735792762⟩,⟨12082262036134355168636801096290401006555415254722365532953,12082262036134355168636801096290401006555415254722808070458⟩⟩, + ⟨⟨-50107557116256397755370541506535551054386618144386098823818,-50107557116256397755370541506535551054386618144384806392217⟩,⟨-286084265,368358105⟩⟩, + ⟨⟨-80393515539817055095230575187422307055072927151721037631961,-80393515539817055095230575187422307055072927151718182871693⟩,⟨-46415217838013738815835135091509204506783283242543387251095,-46415217838013738815835135091509204506783283242540927660396⟩⟩, + ⟨⟨-79182312480010110033178139664648772036561569413352587583550,-79182312480010110033178139664648772036561569413347414738825⟩,⟨-137147788276172702069997682618776247270961561688234192170725,-137147788276172702069997682618776247270961561688228226313349⟩⟩, + ⟨⟨-4286778464,3662011132⟩,⟨-253669507901048013636563366376836227212832254355956943133480,-253669507901048013636563366376836227212832254355945764523399⟩⟩, + ⟨⟨193316192578149682698188817540646416104886644075553003152260,193316192578149682698188817540646416104886644075568400056446⟩,⟨-334833467471124760913080279830996697438871000215417234477195,-334833467471124760913080279830996697438871000215400169145421⟩⟩, + ⟨⟨490229679724473762452840837700562264720251031415366959109934,490229679724473762452840837700562264720251031415391174987571⟩,⟨-283034237553668950438418247761260417819164535591040507399632,-283034237553668950438418247761260417819164535591019156297583⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310151666770379,801720913860102364085928664104568816870185890310182816689221⟩,⟨-11787428425,9154662712⟩⟩, + ⟨⟨956317866444279429643848587225309667555159463715200780903863,956317866444279429643848587225309667555159463715257258865434⟩,⟨552130377622453308754297081777840229037166744144182656891302,552130377622453308754297081777840229037166744144234397699468⟩⟩, + ⟨⟨742643485408219821053362161464147272108532531880633165256440,742643485408219821053362161464147272108532531880723265432866⟩,⟨1286296248637072881523689202998756912881166834427462899666872,1286296248637072881523689202998756912881166834427560360560804⟩⟩, + ⟨⟨-60544470932,68579039461⟩,⟨1957326449853765537319161777599044963061977271264979720020412,1957326449853765537319161777599044963061977271265133764985169⟩⟩] +lemma tw0_0_1_2_calc (j : Fin 31) : taylorWaveBox 0 0 1 2 j = tw0_0_1_2 j := by + revert j + decide +kernel +def tw0_0_1_3 : Fin 31 → CI := ![⟨⟨-1024853732589596773669052848385777038591970709247226776452455,-1024853732589596773669052848385777038591970709247142856485098⟩,⟨-35907907705,31701005910⟩⟩, + ⟨⟨-628602931453519284597435363760210834234247762954914911850211,-628602931453519284597435363760210834234247762954865282565273⟩,⟨-362924071688077231408582504777107588479794603937576341747485,-362924071688077231408582504777107588479794603937531155269791⟩⟩, + ⟨⟨-250548817734577221324051778920625721145631987192449221306490,-250548817734577221324051778920625721145631987192424944550428⟩,⟨-433963282092601921327489231638268209070879236796457149666894,-433963282092601921327489231638268209070879236796430139432431⟩⟩, + ⟨⟨-3834694362,4937507815⟩,⟨-335824071094959070795875237359051420005816962006124579164850,-335824071094959070795875237359051420005816962006110462156586⟩⟩, + ⟨⟨108677345506032691355505929406010059484625826959645961440934,108677345506032691355505929406010059484625826959654505606005⟩,⟨-188234684048165820609905029840516070432445998080507174405371,-188234684048165820609905029840516070432445998080497277006573⟩⟩, + ⟨⟨116878929064809172628487267909243699469389198502646640848852,116878929064809172628487267909243699469389198502652969810612⟩,⟨-67480081158162750529649570264084084845561857398994227593753,-67480081158162750529649570264084084845561857398988638264505⟩⟩, + ⟨⟨79692626246167045120505549490478022520911642351059208561900,79692626246167045120505549490478022520911642351062974095345⟩,⟨-1150454219,1346731688⟩⟩, + ⟨⟨38298887475956669686902707948500975442129452565347339804976,38298887475956669686902707948500975442129452565349127695794⟩,⟨22111872993906770093555571184135072922193709432500849612183,22111872993906770093555571184135072922193709432502364527226⟩⟩, + ⟨⟨11341377240252413481518203274284612139993581373048179649846,11341377240252413481518203274284612139993581373048816741994⟩,⟨19643841607922477643669855117506588569820242592339968087310,19643841607922477643669855117506588569820242592340728165164⟩⟩, + ⟨⟨-77148795,59917295⟩,⟨10494502221717470962371101167470356875181780062691020474984,10494502221717470962371101167470356875181780062691324566265⟩⟩, + ⟨⟨-2108752536192585954051549070752627651423808043718531750389,-2108752536192585954051549070752627651423808043718447800637⟩,⟨3652466533275286644640227122163865608418412453207746835003,3652466533275286644640227122163865608418412453207857341903⟩⟩, + ⟨⟨-1196840233623645927715709623390655482566545392667149494936,-1196840233623645927715709623390655482566545392667117383633⟩,⟨690996031059586565423611599504221028818553419765660897836,690996031059586565423611599504221028818553419765685613704⟩⟩, + ⟨⟨-327953194428670967574096911483448652349430626959102821892,-327953194428670967574096911483448652349430626959095460648⟩,⟨-1205475,936232⟩⟩, + ⟨⟨-37401257300738935241115925730957983830204543520848283460,-37401257300738935241115925730957983830204543520847521040⟩,⟨-21593625970612080169487862484506907150579794367677561378,-21593625970612080169487862484506907150579794367677078519⟩⟩, + ⟨⟨-674800811581627505296495702640840848455618573989922314,-674800811581627505296495702640840848455618573989909224⟩,⟨-1168789290648091726284872679092436994693891985026507101,-1168789290648091726284872679092436994693891985026487343⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-674800811581627505296495702640840848455618573989922314,-674800811581627505296495702640840848455618573989909224⟩,⟨1168789290648091726284872679092436994693891985026487343,1168789290648091726284872679092436994693891985026507101⟩⟩, + ⟨⟨-37401257300738935241115925730957983830204543520848283460,-37401257300738935241115925730957983830204543520847521040⟩,⟨21593625970612080169487862484506907150579794367677078519,21593625970612080169487862484506907150579794367677561378⟩⟩, + ⟨⟨-327953194428670967574096911483448652349430626959102821892,-327953194428670967574096911483448652349430626959095460648⟩,⟨-936234,1205473⟩⟩, + ⟨⟨-1196840233623645927715709623390655482566545392667149494932,-1196840233623645927715709623390655482566545392667117383631⟩,⟨-690996031059586565423611599504221028818553419765685613708,-690996031059586565423611599504221028818553419765660897843⟩⟩, + ⟨⟨-2108752536192585954051549070752627651423808043718531750360,-2108752536192585954051549070752627651423808043718447800626⟩,⟨-3652466533275286644640227122163865608418412453207857341906,-3652466533275286644640227122163865608418412453207746835025⟩⟩, + ⟨⟨-77148741,59917349⟩,⟨-10494502221717470962371101167470356875181780062691324566266,-10494502221717470962371101167470356875181780062691020474986⟩⟩, + ⟨⟨11341377240252413481518203274284612139993581373048179649996,11341377240252413481518203274284612139993581373048816742105⟩,⟨-19643841607922477643669855117506588569820242592340728165071,-19643841607922477643669855117506588569820242592339968087255⟩⟩, + ⟨⟨38298887475956669686902707948500975442129452565347339805098,38298887475956669686902707948500975442129452565349127695907⟩,⟨-22111872993906770093555571184135072922193709432502364527026,-22111872993906770093555571184135072922193709432500849611993⟩⟩, + ⟨⟨79692626246167045120505549490478022520911642351059208561893,79692626246167045120505549490478022520911642351062974095333⟩,⟨-1346731173,1150454728⟩⟩, + ⟨⟨116878929064809172628487267909243699469389198502646640848495,116878929064809172628487267909243699469389198502652969810230⟩,⟨67480081158162750529649570264084084845561857398988638265106,67480081158162750529649570264084084845561857398994227594330⟩⟩, + ⟨⟨108677345506032691355505929406010059484625826959645961439912,108677345506032691355505929406010059484625826959654505605301⟩,⟨188234684048165820609905029840516070432445998080497277006945,188234684048165820609905029840516070432445998080507174406068⟩⟩, + ⟨⟨-3834696151,4937506474⟩,⟨335824071094959070795875237359051420005816962006110462156308,335824071094959070795875237359051420005816962006124579165020⟩⟩, + ⟨⟨-250548817734577221324051778920625721145631987192449221308920,-250548817734577221324051778920625721145631987192424944553297⟩,⟨433963282092601921327489231638268209070879236796430139431131,433963282092601921327489231638268209070879236796457149665153⟩⟩, + ⟨⟨-628602931453519284597435363760210834234247762954914911850947,-628602931453519284597435363760210834234247762954865282567918⟩,⟨362924071688077231408582504777107588479794603937531155267833,362924071688077231408582504777107588479794603937576341743625⟩⟩, + ⟨⟨-1024853732589596773669052848385777038591970709247226776451316,-1024853732589596773669052848385777038591970709247142856485630⟩,⟨-31701010852,35907901096⟩⟩] +lemma tw0_0_1_3_calc (j : Fin 31) : taylorWaveBox 0 0 1 3 j = tw0_0_1_3 j := by + revert j + decide +kernel +def tw0_0_1_4 : Fin 31 → CI := ![⟨⟨-15667780425,13832173234⟩,⟨447176799626049401428575900892497479179773051586365302789474,447176799626049401428575900892497479179773051586403343190902⟩⟩, + ⟨⟨-147798466333020598335688940444553828231258234897108982576310,-147798466333020598335688940444553828231258234897090110220205⟩,⟨255994452969549849609989041039941988737217672698236286485753,255994452969549849609989041039941988737217672698257312544717⟩⟩, + ⟨⟨-164105242280998449312964516431419060977290087667951251149282,-164105242280998449312964516431419060977290087667940514739736⟩,⟨94746205806363210326916346364269513963555168542310429508924,94746205806363210326916346364269513963555168542319911464173⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835063782417696,-117224714961171094288092600963562859182102426835058481514344⟩,⟨-1723515365,1338560849⟩⟩, + ⟨⟨-60230775056681939116158259358048181124214570122646541626755,-60230775056681939116158259358048181124214570122643182965975⟩,⟨-34774254192475114563257474965641206110867398717869347157055,-34774254192475114563257474965641206110867398717866502530606⟩⟩, + ⟨⟨-19629159928715474411130903742880547782925566050431933918475,-19629159928715474411130903742880547782925566050430245566945⟩,⟨-33998702306430283301652192251945138284380029884743843885460,-33998702306430283301652192251945138284380029884741894643880⟩⟩, + ⟨⟨-301188211,352573532⟩,⟨-20863480763352960873051637232040362388611491494814873085870,-20863480763352960873051637232040362388611491494813820860996⟩⟩, + ⟨⟨5145666500353189324031499630773678318007239586724045082564,5145666500353189324031499630773678318007239586724413998468⟩,⟨-8912555817416860185828312285693906330420518554106244262402,-8912555817416860185828312285693906330420518554105799831769⟩⟩, + ⟨⟨3999913327649216400156078766249093574019026135910029127902,3999913327649216400156078766249093574019026135910196628402⟩,⟨-2309351036453446848995139694446153566113409920267237457403,-2309351036453446848995139694446153566113409920267100380694⟩⟩, + ⟨⟨1831636171268298348251446890055669674720350419297800734855,1831636171268298348251446890055669674720350419297859639075⟩,⟨-10457541,13465005⟩⟩, + ⟨⟨531229723537973176588315503936642785693437966949097820996,531229723537973176588315503936642785693437966949115584531⟩,⟨306705623886179287673920370982508559108211969537980274413,306705623886179287673920370982508559108211969537993460684⟩⟩, + ⟨⟨80401039068018583187992181730838723718863118542564292040,80401039068018583187992181730838723718863118542567423788⟩,⟨139258684647138440403567379463967286412820602407904636703,139258684647138440403567379463967286412820602407908816298⟩⟩, + ⟨⟨-105198,81702⟩,⟨28619315176067161691428857657119838667505475301528229927,28619315176067161691428857657119838667505475301528963416⟩⟩, + ⟨⟨-1256266235437790362312377839544355058107236227227609362,-1256266235437790362312377839544355058107236227227577271⟩,⟨2175916947611538131305740304124488850200321912623515929,2175916947611538131305740304124488850200321912623567212⟩⟩, + ⟨⟨-33998702306430283301652192251945138284380029884743187,-33998702306430283301652192251945138284380029884742503⟩,⟨19629159928715474411130903742880547782925566050430909,19629159928715474411130903742880547782925566050431354⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-33998702306430283301652192251945138284380029884743187,-33998702306430283301652192251945138284380029884742503⟩,⟨-19629159928715474411130903742880547782925566050431354,-19629159928715474411130903742880547782925566050430909⟩⟩, + ⟨⟨-1256266235437790362312377839544355058107236227227609362,-1256266235437790362312377839544355058107236227227577271⟩,⟨-2175916947611538131305740304124488850200321912623567212,-2175916947611538131305740304124488850200321912623515929⟩⟩, + ⟨⟨-105198,81702⟩,⟨-28619315176067161691428857657119838667505475301528963416,-28619315176067161691428857657119838667505475301528229927⟩⟩, + ⟨⟨80401039068018583187992181730838723718863118542564292041,80401039068018583187992181730838723718863118542567423788⟩,⟨-139258684647138440403567379463967286412820602407908816298,-139258684647138440403567379463967286412820602407904636703⟩⟩, + ⟨⟨531229723537973176588315503936642785693437966949097821000,531229723537973176588315503936642785693437966949115584531⟩,⟨-306705623886179287673920370982508559108211969537993460680,-306705623886179287673920370982508559108211969537980274411⟩⟩, + ⟨⟨1831636171268298348251446890055669674720350419297800734855,1831636171268298348251446890055669674720350419297859639076⟩,⟨-13464996,10457551⟩⟩, + ⟨⟨3999913327649216400156078766249093574019026135910029127891,3999913327649216400156078766249093574019026135910196628383⟩,⟨2309351036453446848995139694446153566113409920267100380724,2309351036453446848995139694446153566113409920267237457426⟩⟩, + ⟨⟨5145666500353189324031499630773678318007239586724045082520,5145666500353189324031499630773678318007239586724413998422⟩,⟨8912555817416860185828312285693906330420518554105799831798,8912555817416860185828312285693906330420518554106244262429⟩⟩, + ⟨⟨-301188344,352573397⟩,⟨20863480763352960873051637232040362388611491494813820860995,20863480763352960873051637232040362388611491494814873085866⟩⟩, + ⟨⟨-19629159928715474411130903742880547782925566050431933918643,-19629159928715474411130903742880547782925566050430245567120⟩,⟨33998702306430283301652192251945138284380029884741894643776,33998702306430283301652192251945138284380029884743843885350⟩⟩, + ⟨⟨-60230775056681939116158259358048181124214570122646541626978,-60230775056681939116158259358048181124214570122643182966094⟩,⟨34774254192475114563257474965641206110867398717866502530279,34774254192475114563257474965641206110867398717869347156830⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835063782417756,-117224714961171094288092600963562859182102426835058481514247⟩,⟨-1338561474,1723514897⟩⟩, + ⟨⟨-164105242280998449312964516431419060977290087667951251148623,-164105242280998449312964516431419060977290087667940514739245⟩,⟨-94746205806363210326916346364269513963555168542319911465092,-94746205806363210326916346364269513963555168542310429510009⟩⟩, + ⟨⟨-147798466333020598335688940444553828231258234897108982574738,-147798466333020598335688940444553828231258234897090110219407⟩,⟨-255994452969549849609989041039941988737217672698257312545017,-255994452969549849609989041039941988737217672698236286486831⟩⟩, + ⟨⟨-15667777541,13832175391⟩,⟨-447176799626049401428575900892497479179773051586403343190405,-447176799626049401428575900892497479179773051586365302789706⟩⟩] +lemma tw0_0_1_4_calc (j : Fin 31) : taylorWaveBox 0 0 1 4 j = tw0_0_1_4 j := by + revert j + decide +kernel +def tw0_0_1_5 : Fin 31 → CI := ![⟨⟨167243731971546642828555953287659960115706019179413952688162,167243731971546642828555953287659960115706019179428712118361⟩,⟨-5173220693,5859736177⟩⟩, + ⟨⟨89358921423208404188597794196455981264076271255865242933597,89358921423208404188597794196455981264076271255872866851032⟩,⟨51591397338183988791936510057210955958070246117875920496724,51591397338183988791936510057210955958070246117882672412277⟩⟩, + ⟨⟨30710331694588131420416852514888155530065883453810103691822,30710331694588131420416852514888155530065883453813274856419⟩,⟨53191854812319460937102516725929340894507893373844496772311,53191854812319460937102516725929340894507893373848146107321⟩⟩, + ⟨⟨-515674592,400496470⟩,⟨35073552699159298510119177454912266067657310953415331774660,35073552699159298510119177454912266067657310953417029443821⟩⟩, + ⟨⟨-9537396480607799727922431955474031883319083256270866526243,-9537396480607799727922431955474031883319083256270055983377⟩,⟨16519255276341307666428785686975601350523842324845345391814,16519255276341307666428785686975601350523842324846319140780⟩⟩, + ⟨⟨-8476989952179979159842537270789896260736790540220722397428,-8476989952179979159842537270789896260736790540220209404565⟩,⟨4894192430808863804767984001102074735896289541601491792517,4894192430808863804767984001102074735896289541601928332547⟩⟩, + ⟨⟨-4681754135318688100685463933953437859495028018501174521363,-4681754135318688100685463933953437859495028018500923500166⟩,⟨-79117316,67586477⟩⟩, + ⟨⟨-1777753643219414765502209672251157252299668175500487676427,-1777753643219414765502209672251157252299668175500393368771⟩,⟨-1026386544465567034589678718387921823653437540474953751261,-1026386544465567034589678718387921823653437540474876897917⟩⟩, + ⟨⟨-403057791704562412437003984821960593422423797795942601256,-403057791704562412437003984821960593422423797795917393883⟩,⟨-698116573618815657723420267159812353625595869186493877763,-698116573618815657723420267159812353625595869186462421235⟩⟩, + ⟨⟨-1564445,2014361⟩,⟨-274012130462182019610306073866502078653572741823568753139,-274012130462182019610306073866502078653572741823559068879⟩⟩, + ⟨⟨38235878365694248474749875008609958874189762043762612993,38235878365694248474749875008609958874189762043764378587⟩,⟨-66226484001406087186269822428046064537006176095473524035,-66226484001406087186269822428046064537006176095471098714⟩⟩, + ⟨⟨13888700337651677855486013064462166033591157621096974222,13888700337651677855486013064462166033591157621097435276⟩,⟨-8018644878637242457731864987405639247292480784960422101,-8018644878637242457731864987405639247292480784960084237⟩⟩, + ⟨⟨2140719769235797028205516202082047489481037045496562215,2140719769235797028205516202082047489481037045496623895⟩,⟨-6112,7869⟩⟩, + ⟨⟨108505471387903733245984477066110672137430918914820409,108505471387903733245984477066110672137430918914823312⟩,⟨62645663114353456701030195214106556619472506132501167,62645663114353456701030195214106556619472506132502967⟩⟩, + ⟨⟨489419243080886380476798400110207473589628954160165,489419243080886380476798400110207473589628954160179⟩,⟨847698995217997915984253727078989626073679054022036,847698995217997915984253727078989626073679054022056⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨489419243080886380476798400110207473589628954160165,489419243080886380476798400110207473589628954160179⟩,⟨-847698995217997915984253727078989626073679054022056,-847698995217997915984253727078989626073679054022036⟩⟩, + ⟨⟨108505471387903733245984477066110672137430918914820409,108505471387903733245984477066110672137430918914823312⟩,⟨-62645663114353456701030195214106556619472506132502967,-62645663114353456701030195214106556619472506132501167⟩⟩, + ⟨⟨2140719769235797028205516202082047489481037045496562215,2140719769235797028205516202082047489481037045496623895⟩,⟨-7869,6112⟩⟩, + ⟨⟨13888700337651677855486013064462166033591157621096974222,13888700337651677855486013064462166033591157621097435276⟩,⟨8018644878637242457731864987405639247292480784960084237,8018644878637242457731864987405639247292480784960422101⟩⟩, + ⟨⟨38235878365694248474749875008609958874189762043762612992,38235878365694248474749875008609958874189762043764378586⟩,⟨66226484001406087186269822428046064537006176095471098714,66226484001406087186269822428046064537006176095473524035⟩⟩, + ⟨⟨-1564446,2014359⟩,⟨274012130462182019610306073866502078653572741823559068879,274012130462182019610306073866502078653572741823568753139⟩⟩, + ⟨⟨-403057791704562412437003984821960593422423797795942601260,-403057791704562412437003984821960593422423797795917393889⟩,⟨698116573618815657723420267159812353625595869186462421233,698116573618815657723420267159812353625595869186493877759⟩⟩, + ⟨⟨-1777753643219414765502209672251157252299668175500487676433,-1777753643219414765502209672251157252299668175500393368777⟩,⟨1026386544465567034589678718387921823653437540474876897908,1026386544465567034589678718387921823653437540474953751252⟩⟩, + ⟨⟨-4681754135318688100685463933953437859495028018501174521362,-4681754135318688100685463933953437859495028018500923500166⟩,⟨-67586507,79117286⟩⟩, + ⟨⟨-8476989952179979159842537270789896260736790540220722397400,-8476989952179979159842537270789896260736790540220209404540⟩,⟨-4894192430808863804767984001102074735896289541601928332588,-4894192430808863804767984001102074735896289541601491792560⟩⟩, + ⟨⟨-9537396480607799727922431955474031883319083256270866526181,-9537396480607799727922431955474031883319083256270055983287⟩,⟨-16519255276341307666428785686975601350523842324846319140841,-16519255276341307666428785686975601350523842324845345391847⟩⟩, + ⟨⟨-515674452,400496657⟩,⟨-35073552699159298510119177454912266067657310953417029443838,-35073552699159298510119177454912266067657310953415331774631⟩⟩, + ⟨⟨30710331694588131420416852514888155530065883453810103692174,30710331694588131420416852514888155530065883453813274856717⟩,⟨-53191854812319460937102516725929340894507893373848146107108,-53191854812319460937102516725929340894507893373844496772152⟩⟩, + ⟨⟨89358921423208404188597794196455981264076271255865242933973,89358921423208404188597794196455981264076271255872866851137⟩,⟨-51591397338183988791936510057210955958070246117882672411728,-51591397338183988791936510057210955958070246117875920496446⟩⟩, + ⟨⟨167243731971546642828555953287659960115706019179413952688249,167243731971546642828555953287659960115706019179428712118175⟩,⟨-5859735098,5173221500⟩⟩] +lemma tw0_0_1_5_calc (j : Fin 31) : taylorWaveBox 0 0 1 5 j = tw0_0_1_5 j := by + revert j + decide +kernel +def tw0_0_1_6 : Fin 31 → CI := ![⟨⟨-1692932513,1917594180⟩,⟨-54730383304244933380112848518897283838116898657139318125405,-54730383304244933380112848518897283838116898657134313900946⟩⟩, + ⟨⟨15757695611979108750655254726130659726537997439289564585536,15757695611979108750655254726130659726537997439291676999090⟩,⟨-27293129410152969410685188386912065907389527205329932530696,-27293129410152969410685188386912065907389527205327517060896⟩⟩, + ⟨⟨15086061277913682033476994307563564481558520417060989538506,15086061277913682033476994307563564481558520417062072568742⟩,⟨-8709941539814653984064657652661994397480139251723312475280,-8709941539814653984064657652661994397480139251722385357645⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208706199705,9182234624581109642237633639768198127653962420209179876413⟩,⟨-104849731,135003293⟩⟩, + ⟨⟨3964336675057021537976296272177170483981600066055200727914,3964336675057021537976296272177170483981600066055447029767⟩,⟨2288810846502477348068753004672864086324035685942267616870,2288810846502477348068753004672864086324035685942469418706⟩⟩, + ⟨⟨1067747151797492984705752874625644312037641065098791688507,1067747151797492984705752874625644312037641065098890325513⟩,⟨1849392316550216334622635146232719177136215814662329849245,1849392316550216334622635146232719177136215814662447653726⟩⟩, + ⟨⟨-15534649,13270574⟩,⟨919260274839426580241716221779161802910425528549028996651,919260274839426580241716221779161802910425528549081210645⟩⟩, + ⟨⟨-179138245990913280628931124202153537622269042796340925259,-179138245990913280628931124202153537622269042796326941605⟩,⟨310276543635033542926922283375379159021565541452059466675,310276543635033542926922283375379159021565541452076914107⟩⟩, + ⟨⟨-106613786758410036760489017136375257450740340645818079746,-106613786758410036760489017136375257450740340645812936458⟩,⟨61553498484293393557247088773947889556789052497226658370,61553498484293393557247088773947889556789052497230703878⟩⟩, + ⟨⟨-35868104002269959539990756405344523936148290703941874662,-35868104002269959539990756405344523936148290703940492823⟩,⟨-263680,204786⟩⟩, + ⟨⟨-7224188736524282557119668539971559285688343026025091279,-7224188736524282557119668539971559285688343026024803721⟩,⟨-4170887311708956971506847166506423093897035410542465448,-4170887311708956971506847166506423093897035410542259574⟩⟩, + ⟨⟨-699758773402005002456762203914662256336988448423193294,-699758773402005002456762203914662256336988448423161581⟩,⟨-1212017748574349777058290169435074839927990396297164564,-1212017748574349777058290169435074839927990396297120471⟩⟩, + ⟨⟨-400,516⟩,⟨-140109781258867029453088892208377046625579260562272491,-140109781258867029453088892208377046625579260562268007⟩⟩, + ⟨⟨2733432708601582040846727359041649438816361126652997,2733432708601582040846727359041649438816361126653085⟩,⟨-4734444330368553816633945974355761093468712485535782,-4734444330368553816633945974355761093468712485535639⟩⟩, + ⟨⟨18493923165502163346226351462327191771362158146623,18493923165502163346226351462327191771362158146625⟩,⟨-10677471517974929847057528746256443120376410650989,-10677471517974929847057528746256443120376410650988⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨18493923165502163346226351462327191771362158146623,18493923165502163346226351462327191771362158146625⟩,⟨10677471517974929847057528746256443120376410650988,10677471517974929847057528746256443120376410650989⟩⟩, + ⟨⟨2733432708601582040846727359041649438816361126652997,2733432708601582040846727359041649438816361126653085⟩,⟨4734444330368553816633945974355761093468712485535639,4734444330368553816633945974355761093468712485535782⟩⟩, + ⟨⟨-400,516⟩,⟨140109781258867029453088892208377046625579260562268007,140109781258867029453088892208377046625579260562272491⟩⟩, + ⟨⟨-699758773402005002456762203914662256336988448423193294,-699758773402005002456762203914662256336988448423161581⟩,⟨1212017748574349777058290169435074839927990396297120471,1212017748574349777058290169435074839927990396297164564⟩⟩, + ⟨⟨-7224188736524282557119668539971559285688343026025091279,-7224188736524282557119668539971559285688343026024803721⟩,⟨4170887311708956971506847166506423093897035410542259574,4170887311708956971506847166506423093897035410542465448⟩⟩, + ⟨⟨-35868104002269959539990756405344523936148290703941874662,-35868104002269959539990756405344523936148290703940492823⟩,⟨-204786,263679⟩⟩, + ⟨⟨-106613786758410036760489017136375257450740340645818079746,-106613786758410036760489017136375257450740340645812936458⟩,⟨-61553498484293393557247088773947889556789052497230703879,-61553498484293393557247088773947889556789052497226658370⟩⟩, + ⟨⟨-179138245990913280628931124202153537622269042796340925258,-179138245990913280628931124202153537622269042796326941603⟩,⟨-310276543635033542926922283375379159021565541452076914108,-310276543635033542926922283375379159021565541452059466676⟩⟩, + ⟨⟨-15534643,13270580⟩,⟨-919260274839426580241716221779161802910425528549081210645,-919260274839426580241716221779161802910425528549028996651⟩⟩, + ⟨⟨1067747151797492984705752874625644312037641065098791688516,1067747151797492984705752874625644312037641065098890325522⟩,⟨-1849392316550216334622635146232719177136215814662447653720,-1849392316550216334622635146232719177136215814662329849240⟩⟩, + ⟨⟨3964336675057021537976296272177170483981600066055200727922,3964336675057021537976296272177170483981600066055447029781⟩,⟨-2288810846502477348068753004672864086324035685942469418691,-2288810846502477348068753004672864086324035685942267616848⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208706199698,9182234624581109642237633639768198127653962420209179876418⟩,⟨-135003256,104849780⟩⟩, + ⟨⟨15086061277913682033476994307563564481558520417060989538461,15086061277913682033476994307563564481558520417062072568682⟩,⟨8709941539814653984064657652661994397480139251722385357745,8709941539814653984064657652661994397480139251723312475365⟩⟩, + ⟨⟨15757695611979108750655254726130659726537997439289564585451,15757695611979108750655254726130659726537997439291676998923⟩,⟨27293129410152969410685188386912065907389527205327517061010,27293129410152969410685188386912065907389527205329932530728⟩⟩, + ⟨⟨-1692932777,1917593827⟩,⟨54730383304244933380112848518897283838116898657134313900974,54730383304244933380112848518897283838116898657139318125344⟩⟩] +lemma tw0_0_1_6_calc (j : Fin 31) : taylorWaveBox 0 0 1 6 j = tw0_0_1_6 j := by + revert j + decide +kernel +def tw0_0_1_7 : Fin 31 → CI := ![⟨⟨-15920423158960125595439758270488942085850529785837832525666,-15920423158960125595439758270488942085850529785836326179495⟩,⟨-557805536,492454107⟩⟩, + ⟨⟨-7409966221467711955868583236644409452041479733639407424749,-7409966221467711955868583236644409452041479733638728048522⟩,⟨-4278145992650417582268026006510037977013089017228857353060,-4278145992650417582268026006510037977013089017228270224183⟩⟩, + ⟨⟨-2195803386486529329343270592343642584602236719662794377740,-2195803386486529329343270592343642584602236719662553659037⟩,⟨-3803243028826468707141038658198604399333087798566925411741,-3803243028826468707141038658198604399333087798566640270346⟩⟩, + ⟨⟨-24399641,31416693⟩,⟨-2136803025194210900014571515934235255886439055451437884476,-2136803025194210900014571515934235255886439055451320853245⟩⟩, + ⟨⟨488244597216771643136834710396554078884579535781524672890,488244597216771643136834710396554078884579535781569274990⟩,⟨-845664448900450543473945784676801778036174373446407347240,-845664448900450543473945784676801778036174373446352114782⟩⟩, + ⟨⟨358644278720961050986243352027270132531610249977488942534,358644278720961050986243352027270132531610249977512929424⟩,⟨-207063370862866034264724793844696904637389403301045439833,-207063370862866034264724793844696904637389403301025652501⟩⟩, + ⟨⟨160441184787359821872660870163473329702807540620606379362,160441184787359821872660870163473329702807540620616003124⟩,⟨-2316153,2711308⟩⟩, + ⟨⟨48136420250126138239865741964204391230651615933490728284,48136420250126138239865741964204391230651615933493588309⟩,⟨27791575189235278687381512375103603389063069562339680664,27791575189235278687381512375103603389063069562341938557⟩⟩, + ⟨⟨8355753891895346840367238293964917923853689486774209180,8355753891895346840367238293964917923853689486774784947⟩,⟨14472590276304124913805826634071112211018515104763456053,14472590276304124913805826634071112211018515104764200312⟩⟩, + ⟨⟨-30681,23828⟩,⟨4173443408582443164090959992059053234153201280178388295,4173443408582443164090959992059053234153201280178562365⟩⟩, + ⟨⟨-404420646216535223173290612977923641869901178322347114,-404420646216535223173290612977923641869901178322325864⟩,⟨700477106876877052707506546928261977600801269487290629,700477106876877052707506546928261977600801269487320742⟩⟩, + ⟨⟨-94016445801027613749737777273836701622366437370103821,-94016445801027613749737777273836701622366437370100101⟩,⟨54280420291475153686292016357624225369263807738945423,54280420291475153686292016357624225369263807738948056⟩⟩, + ⟨⟨-8151256657387584304865156234490338347955471250348729,-8151256657387584304865156234490338347955471250348441⟩,⟨-30,24⟩⟩, + ⟨⟨-183625870705132058104956596237962307856184447988484,-183625870705132058104956596237962307856184447988477⟩,⟨-106016445881787409543539094448484815174343374490133,-106016445881787409543539094448484815174343374490128⟩⟩, + ⟨⟨-207063370862866034264724793844696904637389403302,-207063370862866034264724793844696904637389403301⟩,⟨-358644278720961050986243352027270132531610249978,-358644278720961050986243352027270132531610249977⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-207063370862866034264724793844696904637389403302,-207063370862866034264724793844696904637389403301⟩,⟨358644278720961050986243352027270132531610249977,358644278720961050986243352027270132531610249978⟩⟩, + ⟨⟨-183625870705132058104956596237962307856184447988484,-183625870705132058104956596237962307856184447988477⟩,⟨106016445881787409543539094448484815174343374490128,106016445881787409543539094448484815174343374490133⟩⟩, + ⟨⟨-8151256657387584304865156234490338347955471250348729,-8151256657387584304865156234490338347955471250348441⟩,⟨-24,30⟩⟩, + ⟨⟨-94016445801027613749737777273836701622366437370103821,-94016445801027613749737777273836701622366437370100101⟩,⟨-54280420291475153686292016357624225369263807738948056,-54280420291475153686292016357624225369263807738945423⟩⟩, + ⟨⟨-404420646216535223173290612977923641869901178322347114,-404420646216535223173290612977923641869901178322325864⟩,⟨-700477106876877052707506546928261977600801269487320742,-700477106876877052707506546928261977600801269487290629⟩⟩, + ⟨⟨-30681,23828⟩,⟨-4173443408582443164090959992059053234153201280178562365,-4173443408582443164090959992059053234153201280178388295⟩⟩, + ⟨⟨8355753891895346840367238293964917923853689486774209180,8355753891895346840367238293964917923853689486774784947⟩,⟨-14472590276304124913805826634071112211018515104764200312,-14472590276304124913805826634071112211018515104763456053⟩⟩, + ⟨⟨48136420250126138239865741964204391230651615933490728284,48136420250126138239865741964204391230651615933493588309⟩,⟨-27791575189235278687381512375103603389063069562341938557,-27791575189235278687381512375103603389063069562339680663⟩⟩, + ⟨⟨160441184787359821872660870163473329702807540620606379362,160441184787359821872660870163473329702807540620616003124⟩,⟨-2711307,2316154⟩⟩, + ⟨⟨358644278720961050986243352027270132531610249977488942533,358644278720961050986243352027270132531610249977512929423⟩,⟨207063370862866034264724793844696904637389403301025652503,207063370862866034264724793844696904637389403301045439835⟩⟩, + ⟨⟨488244597216771643136834710396554078884579535781524672886,488244597216771643136834710396554078884579535781569274987⟩,⟨845664448900450543473945784676801778036174373446352114784,845664448900450543473945784676801778036174373446407347243⟩⟩, + ⟨⟨-24399652,31416685⟩,⟨2136803025194210900014571515934235255886439055451320853243,2136803025194210900014571515934235255886439055451437884477⟩⟩, + ⟨⟨-2195803386486529329343270592343642584602236719662794377762,-2195803386486529329343270592343642584602236719662553659062⟩,⟨3803243028826468707141038658198604399333087798566640270335,3803243028826468707141038658198604399333087798566925411726⟩⟩, + ⟨⟨-7409966221467711955868583236644409452041479733639407424758,-7409966221467711955868583236644409452041479733638728048553⟩,⟨4278145992650417582268026006510037977013089017228270224160,4278145992650417582268026006510037977013089017228857353015⟩⟩, + ⟨⟨-15920423158960125595439758270488942085850529785837832525648,-15920423158960125595439758270488942085850529785836326179504⟩,⟨-492454183,557805434⟩⟩] +lemma tw0_0_1_7_calc (j : Fin 31) : taylorWaveBox 0 0 1 7 j = tw0_0_1_7 j := by + revert j + decide +kernel +def tw0_0_1_8 : Fin 31 → CI := ![⟨⟨-146033148,128924184⟩,⟨4167957036519161635267462875665650308090614798607315566959,4167957036519161635267462875665650308090614798607723194484⟩⟩, + ⟨⟨-1045348268338512868602174050230711630502000828255336266279,-1045348268338512868602174050230711630502000828255189476182⟩,⟨1810596312366448656928296453727279648114966328169398483164,1810596312366448656928296453727279648114966328169570249400⟩⟩, + ⟨⟨-862928470385065379022052810663140596629347410453867869462,-862928470385065379022052810663140596629347410453800426144⟩,⟨498211984668209501074447522212552176268799660944649435723,498211984668209501074447522212552176268799660944705638923⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113836019747,-447530979074571922520290831596952057595537869113810084248⟩,⟨-6579897,5110249⟩⟩, + ⟨⟨-162355919004138232372836741759177853480159271421492819522,-162355919004138232372836741759177853480159271421481698855⟩,⟨-93736233541568285837386950791285126905599017268178691320,-93736233541568285837386950791285126905599017268169829959⟩⟩, + ⟨⟨-36139375818351043324305932231550288027610878708989995189,-36139375818351043324305932231550288027610878708986426612⟩,⟨-62595235071210080304470835446295917111034100012531624394,-62595235071210080304470835446295917111034100012527238644⟩⟩, + ⟨⟨-363821,425892⟩,⟨-25202042373060605481053021731346532868346133836081478139,-25202042373060605481053021731346532868346133836079886221⟩⟩, + ⟨⟨3880435930941774193134327520832519661449226726723029423,3880435930941774193134327520832519661449226726723357037⟩,⟨-6721112187906988151330899020690963208255456507365378273,-6721112187906988151330899020690963208255456507364957543⟩⟩, + ⟨⟨1768160461295360016531539505593046531362271804852966731,1768160461295360016531539505593046531362271804853063288⟩,⟨-1020847918299328973244310595928429326662110183843061864,-1020847918299328973244310595928429326662110183842988270⟩⟩, + ⟨⟨437041971752511643086221515231398493745642450306458014,437041971752511643086221515231398493745642450306477635⟩,⟨-2496,3213⟩⟩, + ⟨⟨61128159249228594047334800240523356553744238293484289,61128159249228594047334800240523356553744238293487112⟩,⟨35292359197608440746392511944873328151963748739245441,35292359197608440746392511944873328151963748739247409⟩⟩, + ⟨⟨3789488213810326360482741719563007481884010475315509,3789488213810326360482741719563007481884010475315706⟩,⟨6563586121002918116534081074893518758061969245473662,6563586121002918116534081074893518758061969245473944⟩⟩, + ⟨⟨-2,2⟩,⟨426798800539562151451388198468162591548478955377401,426798800539562151451388198468162591548478955377419⟩⟩, + ⟨⟨-3700672083799146836408927460510749494027353979801,-3700672083799146836408927460510749494027353979800⟩,⟨6409752071291912223177813549700701912169891841282,6409752071291912223177813549700701912169891841284⟩⟩, + ⟨⟨-6259523507121008030447083544629591711103410002,-6259523507121008030447083544629591711103410001⟩,⟨3613937581835104332430593223155028802761087870,3613937581835104332430593223155028802761087871⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-6259523507121008030447083544629591711103410002,-6259523507121008030447083544629591711103410001⟩,⟨-3613937581835104332430593223155028802761087871,-3613937581835104332430593223155028802761087870⟩⟩, + ⟨⟨-3700672083799146836408927460510749494027353979801,-3700672083799146836408927460510749494027353979800⟩,⟨-6409752071291912223177813549700701912169891841284,-6409752071291912223177813549700701912169891841282⟩⟩, + ⟨⟨-2,2⟩,⟨-426798800539562151451388198468162591548478955377419,-426798800539562151451388198468162591548478955377401⟩⟩, + ⟨⟨3789488213810326360482741719563007481884010475315509,3789488213810326360482741719563007481884010475315706⟩,⟨-6563586121002918116534081074893518758061969245473944,-6563586121002918116534081074893518758061969245473662⟩⟩, + ⟨⟨61128159249228594047334800240523356553744238293484289,61128159249228594047334800240523356553744238293487112⟩,⟨-35292359197608440746392511944873328151963748739247409,-35292359197608440746392511944873328151963748739245441⟩⟩, + ⟨⟨437041971752511643086221515231398493745642450306458014,437041971752511643086221515231398493745642450306477635⟩,⟨-3213,2496⟩⟩, + ⟨⟨1768160461295360016531539505593046531362271804852966731,1768160461295360016531539505593046531362271804853063288⟩,⟨1020847918299328973244310595928429326662110183842988270,1020847918299328973244310595928429326662110183843061864⟩⟩, + ⟨⟨3880435930941774193134327520832519661449226726723029423,3880435930941774193134327520832519661449226726723357037⟩,⟨6721112187906988151330899020690963208255456507364957543,6721112187906988151330899020690963208255456507365378273⟩⟩, + ⟨⟨-363821,425892⟩,⟨25202042373060605481053021731346532868346133836079886221,25202042373060605481053021731346532868346133836081478139⟩⟩, + ⟨⟨-36139375818351043324305932231550288027610878708989995189,-36139375818351043324305932231550288027610878708986426612⟩,⟨62595235071210080304470835446295917111034100012527238644,62595235071210080304470835446295917111034100012531624394⟩⟩, + ⟨⟨-162355919004138232372836741759177853480159271421492819522,-162355919004138232372836741759177853480159271421481698855⟩,⟨93736233541568285837386950791285126905599017268169829958,93736233541568285837386950791285126905599017268178691319⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113836019748,-447530979074571922520290831596952057595537869113810084247⟩,⟨-5110252,6579895⟩⟩, + ⟨⟨-862928470385065379022052810663140596629347410453867869458,-862928470385065379022052810663140596629347410453800426141⟩,⟨-498211984668209501074447522212552176268799660944705638928,-498211984668209501074447522212552176268799660944649435728⟩⟩, + ⟨⟨-1045348268338512868602174050230711630502000828255336266267,-1045348268338512868602174050230711630502000828255189476177⟩,⟨-1810596312366448656928296453727279648114966328169570249402,-1810596312366448656928296453727279648114966328169398483172⟩⟩, + ⟨⟨-146033121,128924204⟩,⟨-4167957036519161635267462875665650308090614798607723194480,-4167957036519161635267462875665650308090614798607315566961⟩⟩] +lemma tw0_0_1_8_calc (j : Fin 31) : taylorWaveBox 0 0 1 8 j = tw0_0_1_8 j := by + revert j + decide +kernel +def tw0_0_1_9 : Fin 31 → CI := ![⟨⟨991971455030794224652842832938641432881003100651383346457,991971455030794224652842832938641432881003100651483519125⟩,⟨-30683884,34755808⟩⟩, + ⟨⟨402192853685155952004923929346552618066232272940700559412,402192853685155952004923929346552618066232272940739994550⟩,⟨232206152341268557557157833771249538715910145526734246657,232206152341268557557157833771249538715910145526767592690⟩⟩, + ⟨⟨102764285063295402649203902751716039268368312887887885527,102764285063295402649203902751716039268368312887899805456⟩,⟨177992962933119116596034026181185156903651215460500025899,177992962933119116596034026181185156903651215460514503745⟩⟩, + ⟨⟨-1252810,972990⟩,⟨85209699158455917355792738417989130577889747539447453118,85209699158455917355792738417989130577889747539452662457⟩⟩, + ⟨⟨-16360059037187116312572834024870258488606038212684512048,-16360059037187116312572834024870258488606038212682913373⟩,⟨28336453467234453926218887767410594190769007845643568998,28336453467234453926218887767410594190769007845645600119⟩⟩, + ⟨⟨-9931754073204028611567929538504521988359739542643895626,-9931754073204028611567929538504521988359739542643168140⟩,⟨5734100887689508069820606958792239367701102333468891145,5734100887689508069820606958792239367701102333469475611⟩⟩, + ⟨⟨-3598843235212085340458540018208389404888495232432236707,-3598843235212085340458540018208389404888495232431997925⟩,⟨-60818,51954⟩⟩, + ⟨⟨-853131178726521856442650893006185893762359480374666184,-853131178726521856442650893006185893762359480374610063⟩,⟨-492555515691820123244151829497653754857599064508012255,-492555515691820123244151829497653754857599064507969101⟩⟩, + ⟨⟨-113381910322885037869705973521117938826128000745487551,-113381910322885037869705973521117938826128000745479015⟩,⟨-196383229338455054689904262376246395540152477021842074,-196383229338455054689904262376246395540152477021830723⟩⟩, + ⟨⟨-238,306⟩,⟨-41606298417214803396383173055658755164985228290748099,-41606298417214803396383173055658755164985228290746098⟩⟩, + ⟨⟨2799853949067142612217093241597773128760303873764177,2799853949067142612217093241597773128760303873764343⟩,⟨-4849489293556654595492153094972911127128779073556526,-4849489293556654595492153094972911127128779073556286⟩⟩, + ⟨⟨416567958362559500216138131350676705938652090026669,416567958362559500216138131350676705938652090026689⟩,⟨-240505622896396544552808510496901247489062043216799,-240505622896396544552808510496901247489062043216785⟩⟩, + ⟨⟨20315575399030665720890221218583376545402943501340,20315575399030665720890221218583376545402943501342⟩,⟨-1,1⟩⟩, + ⟨⟨203402323419218505964911196948572610321607465833,203402323419218505964911196948572610321607465834⟩,⟨117434386179881125269926030516065062250518575789,117434386179881125269926030516065062250518575790⟩⟩, + ⟨⟨57341008876895080698206069587922393677011023,57341008876895080698206069587922393677011024⟩,⟨99317540732040286115679295385045219883597395,99317540732040286115679295385045219883597396⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨57341008876895080698206069587922393677011023,57341008876895080698206069587922393677011024⟩,⟨-99317540732040286115679295385045219883597396,-99317540732040286115679295385045219883597395⟩⟩, + ⟨⟨203402323419218505964911196948572610321607465833,203402323419218505964911196948572610321607465834⟩,⟨-117434386179881125269926030516065062250518575790,-117434386179881125269926030516065062250518575789⟩⟩, + ⟨⟨20315575399030665720890221218583376545402943501340,20315575399030665720890221218583376545402943501342⟩,⟨-1,1⟩⟩, + ⟨⟨416567958362559500216138131350676705938652090026669,416567958362559500216138131350676705938652090026689⟩,⟨240505622896396544552808510496901247489062043216785,240505622896396544552808510496901247489062043216799⟩⟩, + ⟨⟨2799853949067142612217093241597773128760303873764177,2799853949067142612217093241597773128760303873764343⟩,⟨4849489293556654595492153094972911127128779073556286,4849489293556654595492153094972911127128779073556526⟩⟩, + ⟨⟨-238,306⟩,⟨41606298417214803396383173055658755164985228290746098,41606298417214803396383173055658755164985228290748099⟩⟩, + ⟨⟨-113381910322885037869705973521117938826128000745487551,-113381910322885037869705973521117938826128000745479015⟩,⟨196383229338455054689904262376246395540152477021830723,196383229338455054689904262376246395540152477021842074⟩⟩, + ⟨⟨-853131178726521856442650893006185893762359480374666184,-853131178726521856442650893006185893762359480374610063⟩,⟨492555515691820123244151829497653754857599064507969101,492555515691820123244151829497653754857599064508012255⟩⟩, + ⟨⟨-3598843235212085340458540018208389404888495232432236707,-3598843235212085340458540018208389404888495232431997925⟩,⟨-51954,60818⟩⟩, + ⟨⟨-9931754073204028611567929538504521988359739542643895626,-9931754073204028611567929538504521988359739542643168140⟩,⟨-5734100887689508069820606958792239367701102333469475611,-5734100887689508069820606958792239367701102333468891145⟩⟩, + ⟨⟨-16360059037187116312572834024870258488606038212684512048,-16360059037187116312572834024870258488606038212682913372⟩,⟨-28336453467234453926218887767410594190769007845645600119,-28336453467234453926218887767410594190769007845643568998⟩⟩, + ⟨⟨-1252810,972990⟩,⟨-85209699158455917355792738417989130577889747539452662457,-85209699158455917355792738417989130577889747539447453118⟩⟩, + ⟨⟨102764285063295402649203902751716039268368312887887885528,102764285063295402649203902751716039268368312887899805457⟩,⟨-177992962933119116596034026181185156903651215460514503744,-177992962933119116596034026181185156903651215460500025899⟩⟩, + ⟨⟨402192853685155952004923929346552618066232272940700559414,402192853685155952004923929346552618066232272940739994551⟩,⟨-232206152341268557557157833771249538715910145526767592687,-232206152341268557557157833771249538715910145526734246656⟩⟩, + ⟨⟨991971455030794224652842832938641432881003100651383346458,991971455030794224652842832938641432881003100651483519124⟩,⟨-34755802,30683889⟩⟩] +lemma tw0_0_1_9_calc (j : Fin 31) : taylorWaveBox 0 0 1 9 j = tw0_0_1_9 j := by + revert j + decide +kernel +def tw0_0_1_10 : Fin 31 → CI := ![⟨⟨-6694186,7582542⟩,⟨-216414599701077852906202435073998598449788143727881433018,-216414599701077852906202435073998598449788143727858889862⟩⟩, + ⟨⟨47282222186997885869559904367101937715076599380149983077,47282222186997885869559904367101937715076599380156923559⟩,⟨-81895211122640775717367861314879747297045205895923078747,-81895211122640775717367861314879747297045205895914788214⟩⟩, + ⟨⟨33654435192767481992360526082876008665865767672376861548,33654435192767481992360526082876008665865767672379706106⟩,⟨-19430397217969120585294141362967309759492224555816930090,-19430397217969120585294141362967309759492224555814614451⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007035519604,14871898049488972066912608227174197124666822007036476144⟩,⟨-169819,218657⟩⟩, + ⟨⟨4533507103962873327503181346078914989933165890505440710,4533507103962873327503181346078914989933165890505780098⟩,⟨2617421546846045632143503744257114450905124956519678332,2617421546846045632143503744257114450905124956519942434⟩⟩, + ⟨⟨833991167764262529146043656834058963507080030247296965,833991167764262529146043656834058963507080030247384628⟩,⟨1444515075631401937710794056684068317595390181852972244,1444515075631401937710794056684068317595390181853082652⟩⟩, + ⟨⟨-7961,6801⟩,⟨471087477881817150367027725509267001994255814209040580,471087477881817150367027725509267001994255814209073337⟩⟩, + ⟨⟨-57311436651205712003848069022248482355177059109875159,-57311436651205712003848069022248482355177059109869954⟩,⟨99266320134653405969582233274387898052831075062688365,99266320134653405969582233274387898052831075062695211⟩⟩, + ⟨⟨-19993948027988470634123013016328063304942677220683977,-19993948027988470634123013016328063304942677220682756⟩,⟨11543511276122530729873023527124496512469872895544766,11543511276122530729873023527124496512469872895545673⟩⟩, + ⟨⟨-3630834484738518571023585992962450469889360841561616,-3630834484738518571023585992962450469889360841561429⟩,⟨-27,21⟩⟩, + ⟨⟨-352664813386572738698924330245133866600437056116471,-352664813386572738698924330245133866600437056116452⟩,⟨-203611124942446906529795814656752676637470710509612,-203611124942446906529795814656752676637470710509599⟩⟩, + ⟨⟨-13992049963673269532189469976134883387494399196747,-13992049963673269532189469976134883387494399196745⟩,⟨-24234941439124366691792537420504857923054461685229,-24234941439124366691792537420504857923054461685226⟩⟩, + ⟨⟨-1,1⟩,⟨-886434200375614885503805174063098259250332236710,-886434200375614885503805174063098259250332236709⟩⟩, + ⟨⟨3416027823162419319382194818392305514524999803,3416027823162419319382194818392305514524999804⟩,⟨-5916733749786222336863412456177943828870718185,-5916733749786222336863412456177943828870718184⟩⟩, + ⟨⟨1444515075631401937710794056684068317595390,1444515075631401937710794056684068317595391⟩,⟨-833991167764262529146043656834058963507081,-833991167764262529146043656834058963507080⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨1444515075631401937710794056684068317595390,1444515075631401937710794056684068317595391⟩,⟨833991167764262529146043656834058963507080,833991167764262529146043656834058963507081⟩⟩, + ⟨⟨3416027823162419319382194818392305514524999803,3416027823162419319382194818392305514524999804⟩,⟨5916733749786222336863412456177943828870718184,5916733749786222336863412456177943828870718185⟩⟩, + ⟨⟨-1,1⟩,⟨886434200375614885503805174063098259250332236709,886434200375614885503805174063098259250332236710⟩⟩, + ⟨⟨-13992049963673269532189469976134883387494399196747,-13992049963673269532189469976134883387494399196745⟩,⟨24234941439124366691792537420504857923054461685226,24234941439124366691792537420504857923054461685229⟩⟩, + ⟨⟨-352664813386572738698924330245133866600437056116471,-352664813386572738698924330245133866600437056116452⟩,⟨203611124942446906529795814656752676637470710509599,203611124942446906529795814656752676637470710509612⟩⟩, + ⟨⟨-3630834484738518571023585992962450469889360841561616,-3630834484738518571023585992962450469889360841561429⟩,⟨-21,27⟩⟩, + ⟨⟨-19993948027988470634123013016328063304942677220683977,-19993948027988470634123013016328063304942677220682756⟩,⟨-11543511276122530729873023527124496512469872895545673,-11543511276122530729873023527124496512469872895544766⟩⟩, + ⟨⟨-57311436651205712003848069022248482355177059109875159,-57311436651205712003848069022248482355177059109869954⟩,⟨-99266320134653405969582233274387898052831075062695211,-99266320134653405969582233274387898052831075062688365⟩⟩, + ⟨⟨-7961,6801⟩,⟨-471087477881817150367027725509267001994255814209073337,-471087477881817150367027725509267001994255814209040580⟩⟩, + ⟨⟨833991167764262529146043656834058963507080030247296965,833991167764262529146043656834058963507080030247384628⟩,⟨-1444515075631401937710794056684068317595390181853082652,-1444515075631401937710794056684068317595390181852972244⟩⟩, + ⟨⟨4533507103962873327503181346078914989933165890505440710,4533507103962873327503181346078914989933165890505780098⟩,⟨-2617421546846045632143503744257114450905124956519942434,-2617421546846045632143503744257114450905124956519678332⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007035519604,14871898049488972066912608227174197124666822007036476144⟩,⟨-218657,169819⟩⟩, + ⟨⟨33654435192767481992360526082876008665865767672376861548,33654435192767481992360526082876008665865767672379706106⟩,⟨19430397217969120585294141362967309759492224555814614452,19430397217969120585294141362967309759492224555816930090⟩⟩, + ⟨⟨47282222186997885869559904367101937715076599380149983076,47282222186997885869559904367101937715076599380156923558⟩,⟨81895211122640775717367861314879747297045205895914788215,81895211122640775717367861314879747297045205895923078747⟩⟩, + ⟨⟨-6694187,7582540⟩,⟨216414599701077852906202435073998598449788143727858889863,216414599701077852906202435073998598449788143727881433018⟩⟩] +lemma tw0_0_1_10_calc (j : Fin 31) : taylorWaveBox 0 0 1 10 j = tw0_0_1_10 j := by + revert j + decide +kernel +def tw0_0_1_11 : Fin 31 → CI := ![⟨⟨-43582469009646285030733050622538865647542245859585447459,-43582469009646285030733050622538865647542245859580768896⟩,⟨-1527004,1348103⟩⟩, + ⟨⟨-15392903892218065753346624902747564194178739329202907684,-15392903892218065753346624902747564194178739329201300410⟩,⟨-8887097205782138437932064156030656875650857039913850070,-8887097205782138437932064156030656875650857039912517258⟩⟩, + ⟨⟨-3391244064239074761746259915068914879840257765124681320,-3391244064239074761746259915068914879840257765124266369⟩,⟨-5873807020128451026971284445250103365566311721194493539,-5873807020128451026971284445250103365566311721193978373⟩⟩, + ⟨⟨-27360,35228⟩,⟨-2395971572164663075006627933825495916097687151939931847,-2395971572164663075006627933825495916097687151939770113⟩⟩, + ⟨⟨386545279197054991095688161365678378835521383196691386,386545279197054991095688161365678378835521383196731620⟩,⟨-669516062995196241606096244359276291721560841521837295,-669516062995196241606096244359276291721560841521785041⟩⟩, + ⟨⟨193934955111252858464399531298504995143211401214953682,193934955111252858464399531298504995143211401214969123⟩,⟨-111968398538759826889458770493757659954935755829189979,-111968398538759826889458770493757659954935755829177852⟩⟩, + ⟨⟨56921729219679268117752553035921843729028297560543718,56921729219679268117752553035921843729028297560547858⟩,⟨-822,962⟩⟩, + ⟨⟨10661686908851956079246243420221534308258967099296802,10661686908851956079246243420221534308258967099297572⟩,⟨6155527806841185854577239378061554197196005184862281,6155527806841185854577239378061554197196005184862860⟩⟩, + ⟨⟨1084850733127702446036628925296711044390973759754977,1084850733127702446036628925296711044390973759755067⟩,⟨1879016588405525604656570422698677269797209390771684,1879016588405525604656570422698677269797209390771805⟩⟩, + ⟨⟨-3,2⟩,⟨292476998555256723023270011453307606945518451164524,292476998555256723023270011453307606945518451164541⟩⟩, + ⟨⟨-13668017399750955430842135070038776849967743631493,-13668017399750955430842135070038776849967743631491⟩,⟨23673700575104108699267520910462035539942797999872,23673700575104108699267520910462035539942797999874⟩⟩, + ⟨⟨-1301475452740717294829863698757511512238643444739,-1301475452740717294829863698757511512238643444738⟩,⟨751407202983543195138823166267279565087402976667,751407202983543195138823166267279565087402976668⟩⟩, + ⟨⟨-35702758612702236697176515069983838738466607809,-35702758612702236697176515069983838738466607808⟩,⟨-1,1⟩⟩, + ⟨⟨-158871515227138341654036096039735292021318780,-158871515227138341654036096039735292021318779⟩,⟨-91724512082952050187844624788486275035083372,-91724512082952050187844624788486275035083371⟩⟩, + ⟨⟨-11196839853875982688945877049375765995494,-11196839853875982688945877049375765995493⟩,⟨-19393495511125285846439953129850499514322,-19393495511125285846439953129850499514321⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-11196839853875982688945877049375765995494,-11196839853875982688945877049375765995493⟩,⟨19393495511125285846439953129850499514321,19393495511125285846439953129850499514322⟩⟩, + ⟨⟨-158871515227138341654036096039735292021318780,-158871515227138341654036096039735292021318779⟩,⟨91724512082952050187844624788486275035083371,91724512082952050187844624788486275035083372⟩⟩, + ⟨⟨-35702758612702236697176515069983838738466607809,-35702758612702236697176515069983838738466607808⟩,⟨-1,1⟩⟩, + ⟨⟨-1301475452740717294829863698757511512238643444739,-1301475452740717294829863698757511512238643444738⟩,⟨-751407202983543195138823166267279565087402976668,-751407202983543195138823166267279565087402976667⟩⟩, + ⟨⟨-13668017399750955430842135070038776849967743631493,-13668017399750955430842135070038776849967743631491⟩,⟨-23673700575104108699267520910462035539942797999874,-23673700575104108699267520910462035539942797999872⟩⟩, + ⟨⟨-3,2⟩,⟨-292476998555256723023270011453307606945518451164541,-292476998555256723023270011453307606945518451164524⟩⟩, + ⟨⟨1084850733127702446036628925296711044390973759754977,1084850733127702446036628925296711044390973759755067⟩,⟨-1879016588405525604656570422698677269797209390771805,-1879016588405525604656570422698677269797209390771684⟩⟩, + ⟨⟨10661686908851956079246243420221534308258967099296802,10661686908851956079246243420221534308258967099297572⟩,⟨-6155527806841185854577239378061554197196005184862860,-6155527806841185854577239378061554197196005184862281⟩⟩, + ⟨⟨56921729219679268117752553035921843729028297560543718,56921729219679268117752553035921843729028297560547858⟩,⟨-962,822⟩⟩, + ⟨⟨193934955111252858464399531298504995143211401214953682,193934955111252858464399531298504995143211401214969123⟩,⟨111968398538759826889458770493757659954935755829177852,111968398538759826889458770493757659954935755829189979⟩⟩, + ⟨⟨386545279197054991095688161365678378835521383196691386,386545279197054991095688161365678378835521383196731620⟩,⟨669516062995196241606096244359276291721560841521785041,669516062995196241606096244359276291721560841521837295⟩⟩, + ⟨⟨-27360,35228⟩,⟨2395971572164663075006627933825495916097687151939770113,2395971572164663075006627933825495916097687151939931847⟩⟩, + ⟨⟨-3391244064239074761746259915068914879840257765124681320,-3391244064239074761746259915068914879840257765124266369⟩,⟨5873807020128451026971284445250103365566311721193978372,5873807020128451026971284445250103365566311721194493539⟩⟩, + ⟨⟨-15392903892218065753346624902747564194178739329202907684,-15392903892218065753346624902747564194178739329201300410⟩,⟨8887097205782138437932064156030656875650857039912517258,8887097205782138437932064156030656875650857039913850070⟩⟩, + ⟨⟨-43582469009646285030733050622538865647542245859585447459,-43582469009646285030733050622538865647542245859580768896⟩,⟨-1348103,1527004⟩⟩] +lemma tw0_0_1_11_calc (j : Fin 31) : taylorWaveBox 0 0 1 11 j = tw0_0_1_11 j := by + revert j + decide +kernel +def tw0_0_1_12 : Fin 31 → CI := ![⟨⟨-285549,252095⟩,⟨8149902646786285757064994502219583017511214743125175097,8149902646786285757064994502219583017511214743126075929⟩⟩, + ⟨⟨-1551091071856863615375934763133313134165203549353576330,-1551091071856863615375934763133313134165203549353338772⟩,⟨2686568543622556104473343783042988709540568005265942311,2686568543622556104473343783042988709540568005266231386⟩⟩, + ⟨⟨-951946098331412916081043587669071438574306367676316055,-951946098331412916081043587669071438574306367676229533⟩,⟨549606336125655204917060435621834617601144866669391549,549606336125655204917060435621834617601144866669460549⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381978517,-358436509015356793117744663894557782742708865381953180⟩,⟨-5270,4093⟩⟩, + ⟨⟨-91812754740582409020300909141983762552172368146634817,-91812754740582409020300909141983762552172368146627359⟩,⟨-53008118664516342873912669580196782716799333864444772,-53008118664516342873912669580196782716799333864439085⟩⟩, + ⟨⟨-13958694376332619534409785002199015732581973911118531,-13958694376332619534409785002199015732581973911116974⟩,⟨-24177167867134059642983318531084495754943450958817225,-24177167867134059642983318531084495754943450958815222⟩⟩, + ⟨⟨-93,108⟩,⟨-6386603083791852241089888205092732398089436736506153,-6386603083791852241089888205092732398089436736505667⟩⟩, + ⟨⟨613909871013967025339399918047601261105449570174702,613909871013967025339399918047601261105449570174763⟩,⟨-1063323087864246880402706318997080767284561430502393,-1063323087864246880402706318997080767284561430502312⟩⟩, + ⟨⟨163975130836337652860921861757994916353794433915161,163975130836337652860921861757994916353794433915173⟩,⟨-94671085928763648399410080757648506723950411947847,-94671085928763648399410080757648506723950411947838⟩⟩, + ⟨⟨21877228333456835517440470208408067794354789146847,21877228333456835517440470208408067794354789146850⟩,⟨-1,1⟩⟩, + ⟨⟨1475657218453006570006306062688262680355435239185,1475657218453006570006306062688262680355435239186⟩,⟨851971092305457735254503479138123518834348993598,851971092305457735254503479138123518834348993599⟩⟩, + ⟨⟨37470084900754823323937983279272537909268162242,37470084900754823323937983279272537909268162243⟩,⟨64900090812026787133954243102849167925083095123,64900090812026787133954243102849167925083095124⟩⟩, + ⟨⟨-1,1⟩,⟨1335280049649465058437528699243656481589037423,1335280049649465058437528699243656481589037424⟩⟩, + ⟨⟨-2286992486618336384517699174760286737626231,-2286992486618336384517699174760286737626230⟩,⟨3961187183351244331906386908132883784489935,3961187183351244331906386908132883784489936⟩⟩, + ⟨⟨-241771678671340596429833185310844957550,-241771678671340596429833185310844957549⟩,⟨139586943763326195344097850021990157325,139586943763326195344097850021990157326⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-241771678671340596429833185310844957550,-241771678671340596429833185310844957549⟩,⟨-139586943763326195344097850021990157326,-139586943763326195344097850021990157325⟩⟩, + ⟨⟨-2286992486618336384517699174760286737626231,-2286992486618336384517699174760286737626230⟩,⟨-3961187183351244331906386908132883784489936,-3961187183351244331906386908132883784489935⟩⟩, + ⟨⟨-1,1⟩,⟨-1335280049649465058437528699243656481589037424,-1335280049649465058437528699243656481589037423⟩⟩, + ⟨⟨37470084900754823323937983279272537909268162242,37470084900754823323937983279272537909268162243⟩,⟨-64900090812026787133954243102849167925083095124,-64900090812026787133954243102849167925083095123⟩⟩, + ⟨⟨1475657218453006570006306062688262680355435239185,1475657218453006570006306062688262680355435239186⟩,⟨-851971092305457735254503479138123518834348993599,-851971092305457735254503479138123518834348993598⟩⟩, + ⟨⟨21877228333456835517440470208408067794354789146847,21877228333456835517440470208408067794354789146850⟩,⟨-1,1⟩⟩, + ⟨⟨163975130836337652860921861757994916353794433915161,163975130836337652860921861757994916353794433915173⟩,⟨94671085928763648399410080757648506723950411947838,94671085928763648399410080757648506723950411947847⟩⟩, + ⟨⟨613909871013967025339399918047601261105449570174702,613909871013967025339399918047601261105449570174763⟩,⟨1063323087864246880402706318997080767284561430502312,1063323087864246880402706318997080767284561430502393⟩⟩, + ⟨⟨-93,108⟩,⟨6386603083791852241089888205092732398089436736505667,6386603083791852241089888205092732398089436736506153⟩⟩, + ⟨⟨-13958694376332619534409785002199015732581973911118531,-13958694376332619534409785002199015732581973911116974⟩,⟨24177167867134059642983318531084495754943450958815222,24177167867134059642983318531084495754943450958817225⟩⟩, + ⟨⟨-91812754740582409020300909141983762552172368146634817,-91812754740582409020300909141983762552172368146627359⟩,⟨53008118664516342873912669580196782716799333864439085,53008118664516342873912669580196782716799333864444772⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381978517,-358436509015356793117744663894557782742708865381953180⟩,⟨-4093,5270⟩⟩, + ⟨⟨-951946098331412916081043587669071438574306367676316055,-951946098331412916081043587669071438574306367676229533⟩,⟨-549606336125655204917060435621834617601144866669460549,-549606336125655204917060435621834617601144866669391549⟩⟩, + ⟨⟨-1551091071856863615375934763133313134165203549353576330,-1551091071856863615375934763133313134165203549353338772⟩,⟨-2686568543622556104473343783042988709540568005266231386,-2686568543622556104473343783042988709540568005265942311⟩⟩, + ⟨⟨-285549,252095⟩,⟨-8149902646786285757064994502219583017511214743126075929,-8149902646786285757064994502219583017511214743125175097⟩⟩] +lemma tw0_0_1_12_calc (j : Fin 31) : taylorWaveBox 0 0 1 12 j = tw0_0_1_12 j := by + revert j + decide +kernel +def tw0_0_1_13 : Fin 31 → CI := ![⟨⟨1422426349034211492819848993123270072267181414165473908,1422426349034211492819848993123270072267181414165635661⟩,⟨-43999,49838⟩⟩, + ⟨⟨437635022222743448682380772355202487463081856341664101,437635022222743448682380772355202487463081856341712584⟩,⟨252668697887108783679726276981752044389881517554991385,252668697887108783679726276981752044389881517555030888⟩⟩, + ⟨⟨83134481345199602617567417832373720852740677347601939,83134481345199602617567417832373720852740677347612641⟩,⟨143993145550772736036302084953740285998011476804655970,143993145550772736036302084953740285998011476804669517⟩⟩, + ⟨⟨-736,572⟩,⟨50047177933378515327455971288047401836241721327123360,50047177933378515327455971288047401836241721327127057⟩⟩, + ⟨⟨-6784552140546911073976931346258189262019226242222125,-6784552140546911073976931346258189262019226242221375⟩,⟨11751189014027432406549150154233116025152194247648876,11751189014027432406549150154233116025152194247649869⟩⟩, + ⟨⟨-2813141220592428595321190890959312719285571600562028,-2813141220592428595321190890959312719285571600561785⟩,⟨1624167840977471043499020929143359620633508899994059,1624167840977471043499020929143359620633508899994246⟩⟩, + ⟨⟨-668803510981146723247822633578313868995627098570452,-668803510981146723247822633578313868995627098570398⟩,⟨-12,10⟩⟩, + ⟨⟨-98978607443755028988884856770095924805372792906386,-98978607443755028988884856770095924805372792906377⟩,⟨-57145325651666262463408441742870633399811174622825,-57145325651666262463408441742870633399811174622818⟩⟩, + ⟨⟨-7710836727511864736319771636406007214046677171479,-7710836727511864736319771636406007214046677171478⟩,⟨-13355560980918684346996483531347732161348933604178,-13355560980918684346996483531347732161348933604177⟩⟩, + ⟨⟨-1,1⟩,⟨-1527318662517654886702147561280743464240775186986,-1527318662517654886702147561280743464240775186984⟩⟩, + ⟨⟨49565668975142548934906644566142566547653469848,49565668975142548934906644566142566547653469849⟩,⟨-85850256976087298441198452482889182107103625506,-85850256976087298441198452482889182107103625505⟩⟩, + ⟨⟨3020587385368500640529933373110837548992089627,3020587385368500640529933373110837548992089628⟩,⟨-1743936940053291701153822074672565716546971882,-1743936940053291701153822074672565716546971881⟩⟩, + ⟨⟨46610066605153042196720811806663313728051000,46610066605153042196720811806663313728051001⟩,⟨-1,1⟩⟩, + ⟨⟨92181011516372700211484783114954759185549,92181011516372700211484783114954759185550⟩,⟨53220731813149771153375917806169608048918,53220731813149771153375917806169608048919⟩⟩, + ⟨⟨1624167840977471043499020929143359620,1624167840977471043499020929143359621⟩,⟨2813141220592428595321190890959312719,2813141220592428595321190890959312720⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨1624167840977471043499020929143359620,1624167840977471043499020929143359621⟩,⟨-2813141220592428595321190890959312720,-2813141220592428595321190890959312719⟩⟩, + ⟨⟨92181011516372700211484783114954759185549,92181011516372700211484783114954759185550⟩,⟨-53220731813149771153375917806169608048919,-53220731813149771153375917806169608048918⟩⟩, + ⟨⟨46610066605153042196720811806663313728051000,46610066605153042196720811806663313728051001⟩,⟨-1,1⟩⟩, + ⟨⟨3020587385368500640529933373110837548992089627,3020587385368500640529933373110837548992089628⟩,⟨1743936940053291701153822074672565716546971881,1743936940053291701153822074672565716546971882⟩⟩, + ⟨⟨49565668975142548934906644566142566547653469848,49565668975142548934906644566142566547653469849⟩,⟨85850256976087298441198452482889182107103625505,85850256976087298441198452482889182107103625506⟩⟩, + ⟨⟨-1,1⟩,⟨1527318662517654886702147561280743464240775186984,1527318662517654886702147561280743464240775186986⟩⟩, + ⟨⟨-7710836727511864736319771636406007214046677171479,-7710836727511864736319771636406007214046677171478⟩,⟨13355560980918684346996483531347732161348933604177,13355560980918684346996483531347732161348933604178⟩⟩, + ⟨⟨-98978607443755028988884856770095924805372792906386,-98978607443755028988884856770095924805372792906377⟩,⟨57145325651666262463408441742870633399811174622818,57145325651666262463408441742870633399811174622825⟩⟩, + ⟨⟨-668803510981146723247822633578313868995627098570452,-668803510981146723247822633578313868995627098570398⟩,⟨-10,12⟩⟩, + ⟨⟨-2813141220592428595321190890959312719285571600562028,-2813141220592428595321190890959312719285571600561785⟩,⟨-1624167840977471043499020929143359620633508899994246,-1624167840977471043499020929143359620633508899994059⟩⟩, + ⟨⟨-6784552140546911073976931346258189262019226242222125,-6784552140546911073976931346258189262019226242221375⟩,⟨-11751189014027432406549150154233116025152194247649869,-11751189014027432406549150154233116025152194247648876⟩⟩, + ⟨⟨-736,572⟩,⟨-50047177933378515327455971288047401836241721327127057,-50047177933378515327455971288047401836241721327123360⟩⟩, + ⟨⟨83134481345199602617567417832373720852740677347601939,83134481345199602617567417832373720852740677347612641⟩,⟨-143993145550772736036302084953740285998011476804669517,-143993145550772736036302084953740285998011476804655970⟩⟩, + ⟨⟨437635022222743448682380772355202487463081856341664101,437635022222743448682380772355202487463081856341712584⟩,⟨-252668697887108783679726276981752044389881517555030888,-252668697887108783679726276981752044389881517554991385⟩⟩, + ⟨⟨1422426349034211492819848993123270072267181414165473908,1422426349034211492819848993123270072267181414165635661⟩,⟨-49838,43999⟩⟩] +lemma tw0_0_1_13_calc (j : Fin 31) : taylorWaveBox 0 0 1 13 j = tw0_0_1_13 j := by + revert j + decide +kernel +def tw0_0_1_14 : Fin 31 → CI := ![⟨⟨-7200,8155⟩,⟨-232743967104084891373045924847689787790798760227242635,-232743967104084891373045924847689787790798760227215427⟩⟩, + ⟨⟨38586631079997771351630560293656861125547886381791136,38586631079997771351630560293656861125547886381797293⟩,⟨-66834005523472479682924368729220680753880394940823494,-66834005523472479682924368729220680753880394940815877⟩⟩, + ⟨⟨20419380232585815434920777452547100719629164095609739,20419380232585815434920777452547100719629164095611726⟩,⟨-11789134673968743694342948347353892361006002810692958,-11789134673968743694342948347353892361006002810691402⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804440,6551160272016798098751126130700461144242000788804946⟩,⟨-75,97⟩⟩, + ⟨⟨1410041457817883130366759562982857552728159301461348,1410041457817883130366759562982857552728159301461473⟩,⟨814087815239687167756121452510161113323931310011532,814087815239687167756121452510161113323931310011625⟩⟩, + ⟨⟨177169227687903422899782979182295881870512129718901,177169227687903422899782979182295881870512129718923⟩,⟨306866103893187418515073798253628100721071673449738,306866103893187418515073798253628100721071673449766⟩⟩, + ⟨⟨-2,1⟩,⟨65659631149794723622098140181990406812989656915293,65659631149794723622098140181990406812989656915299⟩⟩, + ⟨⟨-4986870423729752612280895937481340582817489904692,-4986870423729752612280895937481340582817489904690⟩,⟨8637512944662467311834935109391709673511956352457,8637512944662467311834935109391709673511956352459⟩⟩, + ⟨⟨-1019805992484626460005559825580149547636114424757,-1019805992484626460005559825580149547636114424756⟩,⟨588785264282192556024636234949598100670591528042,588785264282192556024636234949598100670591528043⟩⟩, + ⟨⟨-99962772705334443645494478312690141971466076490,-99962772705334443645494478312690141971466076489⟩,⟨-1,1⟩⟩, + ⟨⟨-4682405149737356849900418064172792064225336815,-4682405149737356849900418064172792064225336814⟩,⟨-2703387873655752912899520556370481595924562527,-2703387873655752912899520556370481595924562526⟩⟩, + ⟨⟨-76093603877712289616102538108540963482932891,-76093603877712289616102538108540963482932890⟩,⟨-131797988047217823972090684652583460594359686,-131797988047217823972090684652583460594359685⟩⟩, + ⟨⟨-1,1⟩,⟨-1525310862813330744102393773081819793265779,-1525310862813330744102393773081819793265778⟩⟩, + ⟨⟨1161096250575443872316017732369094291426,1161096250575443872316017732369094291427⟩,⟨-2011077698474393065980387644234977120886,-2011077698474393065980387644234977120885⟩⟩, + ⟨⟨30686610389318741851507379825362810,30686610389318741851507379825362811⟩,⟨-17716922768790342289978297918229589,-17716922768790342289978297918229588⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨30686610389318741851507379825362810,30686610389318741851507379825362811⟩,⟨17716922768790342289978297918229588,17716922768790342289978297918229589⟩⟩, + ⟨⟨1161096250575443872316017732369094291426,1161096250575443872316017732369094291427⟩,⟨2011077698474393065980387644234977120885,2011077698474393065980387644234977120886⟩⟩, + ⟨⟨-1,1⟩,⟨1525310862813330744102393773081819793265778,1525310862813330744102393773081819793265779⟩⟩, + ⟨⟨-76093603877712289616102538108540963482932891,-76093603877712289616102538108540963482932890⟩,⟨131797988047217823972090684652583460594359685,131797988047217823972090684652583460594359686⟩⟩, + ⟨⟨-4682405149737356849900418064172792064225336815,-4682405149737356849900418064172792064225336814⟩,⟨2703387873655752912899520556370481595924562526,2703387873655752912899520556370481595924562527⟩⟩, + ⟨⟨-99962772705334443645494478312690141971466076490,-99962772705334443645494478312690141971466076489⟩,⟨-1,1⟩⟩, + ⟨⟨-1019805992484626460005559825580149547636114424757,-1019805992484626460005559825580149547636114424756⟩,⟨-588785264282192556024636234949598100670591528043,-588785264282192556024636234949598100670591528042⟩⟩, + ⟨⟨-4986870423729752612280895937481340582817489904692,-4986870423729752612280895937481340582817489904690⟩,⟨-8637512944662467311834935109391709673511956352459,-8637512944662467311834935109391709673511956352457⟩⟩, + ⟨⟨-2,1⟩,⟨-65659631149794723622098140181990406812989656915299,-65659631149794723622098140181990406812989656915293⟩⟩, + ⟨⟨177169227687903422899782979182295881870512129718901,177169227687903422899782979182295881870512129718923⟩,⟨-306866103893187418515073798253628100721071673449766,-306866103893187418515073798253628100721071673449738⟩⟩, + ⟨⟨1410041457817883130366759562982857552728159301461348,1410041457817883130366759562982857552728159301461473⟩,⟨-814087815239687167756121452510161113323931310011625,-814087815239687167756121452510161113323931310011532⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804440,6551160272016798098751126130700461144242000788804946⟩,⟨-97,75⟩⟩, + ⟨⟨20419380232585815434920777452547100719629164095609739,20419380232585815434920777452547100719629164095611726⟩,⟨11789134673968743694342948347353892361006002810691402,11789134673968743694342948347353892361006002810692958⟩⟩, + ⟨⟨38586631079997771351630560293656861125547886381791136,38586631079997771351630560293656861125547886381797293⟩,⟨66834005523472479682924368729220680753880394940815877,66834005523472479682924368729220680753880394940823494⟩⟩, + ⟨⟨-7200,8155⟩,⟨232743967104084891373045924847689787790798760227215427,232743967104084891373045924847689787790798760227242635⟩⟩] +lemma tw0_0_1_14_calc (j : Fin 31) : taylorWaveBox 0 0 1 14 j = tw0_0_1_14 j := by + revert j + decide +kernel +def tw0_0_1_15 : Fin 31 → CI := ![⟨⟨-35842487118702823486118888589304243168354040593120929,-35842487118702823486118888589304243168354040593116624⟩,⟨-1256,1109⟩⟩, + ⟨⟨-9606251930311409414619620712991821798672576235039797,-9606251930311409414619620712991821798672576235038670⟩,⟨-5546172137868654345652557775000467358138046717068253,-5546172137868654345652557775000467358138046717067349⟩⟩, + ⟨⟨-1573452828401868617574058617485055405818642668115326,-1573452828401868617574058617485055405818642668115113⟩,⟨-2725300242104990645891483083860110005904783700116308,-2725300242104990645891483083860110005904783700116033⟩⟩, + ⟨⟨-10,12⟩,⟨-807101058159109193417313938093791247346497101480108,-807101058159109193417313938093791247346497101480043⟩⟩, + ⟨⟨91937435611351723598124938437173705275817110936314,91937435611351723598124938437173705275817110936325⟩,⟨-159240309596453410763412875958956742715330816040289,-159240309596453410763412875958956742715330816040274⟩⟩, + ⟨⟨31504846327665354377404215704974263338430507506783,31504846327665354377404215704974263338430507506787⟩,⟨-18189331508055385062401442706779322249122841856029,-18189331508055385062401442706779322249122841856026⟩⟩, + ⟨⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩,⟨-1,1⟩⟩, + ⟨⟨709426070908192146499575731062801933586927765214,709426070908192146499575731062801933586927765215⟩,⟨409587333008983271143904985212963554847766717179,409587333008983271143904985212963554847766717181⟩⟩, + ⟨⟨42313935378026232495518171501163233628372548805,42313935378026232495518171501163233628372548806⟩,⟨73289885942927623097378698066649031056767091636,73289885942927623097378698066649031056767091637⟩⟩, + ⟨⟨-1,1⟩,⟨6157692399285195872629653458357171992084481059,6157692399285195872629653458357171992084481060⟩⟩, + ⟨⟨-138773586334651070117198506979212358468039260,-138773586334651070117198506979212358468039259⟩,⟨240362902280161700267060971870226008136219081,240362902280161700267060971870226008136219082⟩⟩, + ⟨⟨-5412491385713135883328061913015761822410033,-5412491385713135883328061913015761822410032⟩,⟨3124903358528009575988044625953396261961110,3124903358528009575988044625953396261961111⟩⟩, + ⟨⟨-46979464716226164799725749651772857605626,-46979464716226164799725749651772857605625⟩,⟨-1,1⟩⟩, + ⟨⟨-41294032178597533289551253608823866443,-41294032178597533289551253608823866442⟩,⟨-23841120594238354308990818984629793259,-23841120594238354308990818984629793258⟩⟩, + ⟨⟨-181893315080553850624014427067794,-181893315080553850624014427067793⟩,⟨-315048463276653543774042157049743,-315048463276653543774042157049742⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-181893315080553850624014427067794,-181893315080553850624014427067793⟩,⟨315048463276653543774042157049742,315048463276653543774042157049743⟩⟩, + ⟨⟨-41294032178597533289551253608823866443,-41294032178597533289551253608823866442⟩,⟨23841120594238354308990818984629793258,23841120594238354308990818984629793259⟩⟩, + ⟨⟨-46979464716226164799725749651772857605626,-46979464716226164799725749651772857605625⟩,⟨-1,1⟩⟩, + ⟨⟨-5412491385713135883328061913015761822410033,-5412491385713135883328061913015761822410032⟩,⟨-3124903358528009575988044625953396261961111,-3124903358528009575988044625953396261961110⟩⟩, + ⟨⟨-138773586334651070117198506979212358468039260,-138773586334651070117198506979212358468039259⟩,⟨-240362902280161700267060971870226008136219082,-240362902280161700267060971870226008136219081⟩⟩, + ⟨⟨-1,1⟩,⟨-6157692399285195872629653458357171992084481060,-6157692399285195872629653458357171992084481059⟩⟩, + ⟨⟨42313935378026232495518171501163233628372548805,42313935378026232495518171501163233628372548806⟩,⟨-73289885942927623097378698066649031056767091637,-73289885942927623097378698066649031056767091636⟩⟩, + ⟨⟨709426070908192146499575731062801933586927765214,709426070908192146499575731062801933586927765215⟩,⟨-409587333008983271143904985212963554847766717181,-409587333008983271143904985212963554847766717179⟩⟩, + ⟨⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩,⟨-1,1⟩⟩, + ⟨⟨31504846327665354377404215704974263338430507506783,31504846327665354377404215704974263338430507506787⟩,⟨18189331508055385062401442706779322249122841856026,18189331508055385062401442706779322249122841856029⟩⟩, + ⟨⟨91937435611351723598124938437173705275817110936314,91937435611351723598124938437173705275817110936325⟩,⟨159240309596453410763412875958956742715330816040274,159240309596453410763412875958956742715330816040289⟩⟩, + ⟨⟨-10,12⟩,⟨807101058159109193417313938093791247346497101480043,807101058159109193417313938093791247346497101480108⟩⟩, + ⟨⟨-1573452828401868617574058617485055405818642668115326,-1573452828401868617574058617485055405818642668115113⟩,⟨2725300242104990645891483083860110005904783700116033,2725300242104990645891483083860110005904783700116308⟩⟩, + ⟨⟨-9606251930311409414619620712991821798672576235039797,-9606251930311409414619620712991821798672576235038670⟩,⟨5546172137868654345652557775000467358138046717067349,5546172137868654345652557775000467358138046717068253⟩⟩, + ⟨⟨-35842487118702823486118888589304243168354040593120929,-35842487118702823486118888589304243168354040593116624⟩,⟨-1109,1256⟩⟩] +lemma tw0_0_1_15_calc (j : Fin 31) : taylorWaveBox 0 0 1 15 j = tw0_0_1_15 j := by + revert j + decide +kernel +def tw0_0_1_16 : Fin 31 → CI := ![⟨⟨-183,162⟩,⟨5213078436041832671603808611391339232834292828397001,5213078436041832671603808611391339232834292828397644⟩⟩, + ⟨⟨-752880836463629239400889119305995645267760513403227,-752880836463629239400889119305995645267760513403101⟩,⟨1304027860799960862849215533060118013978806372190543,1304027860799960862849215533060118013978806372190701⟩⟩, + ⟨⟨-343528339050943845072305472237199115176168796571159,-343528339050943845072305472237199115176168796571122⟩,⟨198336179025327457579483185284903528947814493302756,198336179025327457579483185284903528947814493302784⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820753,-93910472408044662737884323166159791981236131820744⟩,⟨-2,2⟩⟩, + ⟨⟨-16984413748825324592654220376240998369733585458022,-16984413748825324592654220376240998369733585458019⟩,⟨-9805955849912282029441929384393160504743712313035,-9805955849912282029441929384393160504743712313033⟩⟩, + ⟨⟨-1763687353068399776689287081851485701692086888063,-1763687353068399776689287081851485701692086888062⟩,⟨-3054796104181137447455436429116450281772066996631,-3054796104181137447455436429116450281772066996630⟩⟩, + ⟨⟨-1,1⟩,⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩⟩, + ⟨⟨31771766824307606597388745761546174328855855297,31771766824307606597388745761546174328855855298⟩,⟨-55030314385932053944842921204094027215178616755,-55030314385932053944842921204094027215178616754⟩⟩, + ⟨⟨4974471514892428828617918140640708976664758194,4974471514892428828617918140640708976664758195⟩,⟨-2872012468199269254306370236610395985671083502,-2872012468199269254306370236610395985671083501⟩⟩, + ⟨⟨358240022308519984199082653679503601002640273,358240022308519984199082653679503601002640274⟩,⟨-1,1⟩⟩, + ⟨⟨11653122345661687650510545460191537024582164,11653122345661687650510545460191537024582165⟩,⟨6727933323167418581730984046369498068588588,6727933323167418581730984046369498068588589⟩⟩, + ⟨⟨121199672028761316670947058721718499484466,121199672028761316670947058721718499484467⟩,⟨209923989814499107150432286087394818173136,209923989814499107150432286087394818173137⟩⟩, + ⟨⟨-1,1⟩,⟨1366577233537750183864908804624571231852,1366577233537750183864908804624571231853⟩⟩, + ⟨⟨-462340057482762591060436472784875868,-462340057482762591060436472784875867⟩,⟨800796469934460095025757927274302742,800796469934460095025757927274302743⟩⟩, + ⟨⟨-3054796104181137447455436429117,-3054796104181137447455436429116⟩,⟨1763687353068399776689287081851,1763687353068399776689287081852⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-3054796104181137447455436429117,-3054796104181137447455436429116⟩,⟨-1763687353068399776689287081852,-1763687353068399776689287081851⟩⟩, + ⟨⟨-462340057482762591060436472784875868,-462340057482762591060436472784875867⟩,⟨-800796469934460095025757927274302743,-800796469934460095025757927274302742⟩⟩, + ⟨⟨-1,1⟩,⟨-1366577233537750183864908804624571231853,-1366577233537750183864908804624571231852⟩⟩, + ⟨⟨121199672028761316670947058721718499484466,121199672028761316670947058721718499484467⟩,⟨-209923989814499107150432286087394818173137,-209923989814499107150432286087394818173136⟩⟩, + ⟨⟨11653122345661687650510545460191537024582164,11653122345661687650510545460191537024582165⟩,⟨-6727933323167418581730984046369498068588589,-6727933323167418581730984046369498068588588⟩⟩, + ⟨⟨358240022308519984199082653679503601002640273,358240022308519984199082653679503601002640274⟩,⟨-1,1⟩⟩, + ⟨⟨4974471514892428828617918140640708976664758194,4974471514892428828617918140640708976664758195⟩,⟨2872012468199269254306370236610395985671083501,2872012468199269254306370236610395985671083502⟩⟩, + ⟨⟨31771766824307606597388745761546174328855855297,31771766824307606597388745761546174328855855298⟩,⟨55030314385932053944842921204094027215178616754,55030314385932053944842921204094027215178616755⟩⟩, + ⟨⟨-1,1⟩,⟨529440020073462376192782879028056848059477939597,529440020073462376192782879028056848059477939598⟩⟩, + ⟨⟨-1763687353068399776689287081851485701692086888063,-1763687353068399776689287081851485701692086888062⟩,⟨3054796104181137447455436429116450281772066996630,3054796104181137447455436429116450281772066996631⟩⟩, + ⟨⟨-16984413748825324592654220376240998369733585458022,-16984413748825324592654220376240998369733585458019⟩,⟨9805955849912282029441929384393160504743712313033,9805955849912282029441929384393160504743712313035⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820753,-93910472408044662737884323166159791981236131820744⟩,⟨-2,2⟩⟩, + ⟨⟨-343528339050943845072305472237199115176168796571159,-343528339050943845072305472237199115176168796571122⟩,⟨-198336179025327457579483185284903528947814493302784,-198336179025327457579483185284903528947814493302756⟩⟩, + ⟨⟨-752880836463629239400889119305995645267760513403227,-752880836463629239400889119305995645267760513403101⟩,⟨-1304027860799960862849215533060118013978806372190701,-1304027860799960862849215533060118013978806372190543⟩⟩, + ⟨⟨-183,162⟩,⟨-5213078436041832671603808611391339232834292828397644,-5213078436041832671603808611391339232834292828397001⟩⟩] +lemma tw0_0_1_16_calc (j : Fin 31) : taylorWaveBox 0 0 1 16 j = tw0_0_1_16 j := by + revert j + decide +kernel +def tw0_0_1_17 : Fin 31 → CI := ![⟨⟨718305654265631155040296995620893746968338935946462,718305654265631155040296995620893746968338935946554⟩,⟨-23,26⟩⟩, + ⟨⟨167702166274613999715611154977873639540279799889466,167702166274613999715611154977873639540279799889488⟩,⟨96822890842331772096638090773300798442111328281962,96822890842331772096638090773300798442111328281979⟩⟩, + ⟨⟨23684763972431298616294924909233065567246063593584,23684763972431298616294924909233065567246063593588⟩,⟨41023214565527880946884693931043016479093855093018,41023214565527880946884693931043016479093855093023⟩⟩, + ⟨⟨-1,1⟩,⟨10351875446044213761413951999568920281416967239727,10351875446044213761413951999568920281416967239729⟩⟩, + ⟨⟨-990846513025184520836554933212195395783573297890,-990846513025184520836554933212195395783573297888⟩,⟨1716196503062076943269737866497999890546326407202,1716196503062076943269737866497999890546326407203⟩⟩, + ⟨⟨-280611842079245089860737784477953169418664524192,-280611842079245089860737784477953169418664524191⟩,⟨162011322562248907032623508303956850016837254421,162011322562248907032623508303956850016837254423⟩⟩, + ⟨⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩,⟨-1,1⟩⟩, + ⟨⟨-4044042839756277299780454902184832607088989106,-4044042839756277299780454902184832607088989105⟩,⟨-2334829222147665308663372415645089125416019200,-2334829222147665308663372415645089125416019199⟩⟩, + ⟨⟨-184675008473075432008052999064065548786375672,-184675008473075432008052999064065548786375671⟩,⟨-319866497563579558783743200259921340065536118,-319866497563579558783743200259921340065536117⟩⟩, + ⟨⟨-1,1⟩,⟨-19744635479057719729259399413240280688127456,-19744635479057719729259399413240280688127455⟩⟩, + ⟨⟨309012074589250387253996864898599338563608,309012074589250387253996864898599338563609⟩,⟨-535224613340845279427981919246584261739091,-535224613340845279427981919246584261739090⟩⟩, + ⟨⟨7713399581444315528450879864091553892305,7713399581444315528450879864091553892306⟩,⟨-4453333324714022271467919188776186228592,-4453333324714022271467919188776186228591⟩⟩, + ⟨⟨37659903486361922701376723124008714081,37659903486361922701376723124008714082⟩,⟨-1,1⟩⟩, + ⟨⟨14712142146004324967290649154837711,14712142146004324967290649154837712⟩,⟨8494059228351635497032011392166492,8494059228351635497032011392166493⟩⟩, + ⟨⟨16201132256224890703262350830,16201132256224890703262350831⟩,⟨28061184207924508986073778447,28061184207924508986073778448⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨16201132256224890703262350830,16201132256224890703262350831⟩,⟨-28061184207924508986073778448,-28061184207924508986073778447⟩⟩, + ⟨⟨14712142146004324967290649154837711,14712142146004324967290649154837712⟩,⟨-8494059228351635497032011392166493,-8494059228351635497032011392166492⟩⟩, + ⟨⟨37659903486361922701376723124008714081,37659903486361922701376723124008714082⟩,⟨-1,1⟩⟩, + ⟨⟨7713399581444315528450879864091553892305,7713399581444315528450879864091553892306⟩,⟨4453333324714022271467919188776186228591,4453333324714022271467919188776186228592⟩⟩, + ⟨⟨309012074589250387253996864898599338563608,309012074589250387253996864898599338563609⟩,⟨535224613340845279427981919246584261739090,535224613340845279427981919246584261739091⟩⟩, + ⟨⟨-1,1⟩,⟨19744635479057719729259399413240280688127455,19744635479057719729259399413240280688127456⟩⟩, + ⟨⟨-184675008473075432008052999064065548786375672,-184675008473075432008052999064065548786375671⟩,⟨319866497563579558783743200259921340065536117,319866497563579558783743200259921340065536118⟩⟩, + ⟨⟨-4044042839756277299780454902184832607088989106,-4044042839756277299780454902184832607088989105⟩,⟨2334829222147665308663372415645089125416019199,2334829222147665308663372415645089125416019200⟩⟩, + ⟨⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩,⟨-1,1⟩⟩, + ⟨⟨-280611842079245089860737784477953169418664524192,-280611842079245089860737784477953169418664524191⟩,⟨-162011322562248907032623508303956850016837254423,-162011322562248907032623508303956850016837254421⟩⟩, + ⟨⟨-990846513025184520836554933212195395783573297890,-990846513025184520836554933212195395783573297888⟩,⟨-1716196503062076943269737866497999890546326407203,-1716196503062076943269737866497999890546326407202⟩⟩, + ⟨⟨-1,1⟩,⟨-10351875446044213761413951999568920281416967239729,-10351875446044213761413951999568920281416967239727⟩⟩, + ⟨⟨23684763972431298616294924909233065567246063593584,23684763972431298616294924909233065567246063593588⟩,⟨-41023214565527880946884693931043016479093855093023,-41023214565527880946884693931043016479093855093018⟩⟩, + ⟨⟨167702166274613999715611154977873639540279799889466,167702166274613999715611154977873639540279799889488⟩,⟨-96822890842331772096638090773300798442111328281979,-96822890842331772096638090773300798442111328281962⟩⟩, + ⟨⟨718305654265631155040296995620893746968338935946462,718305654265631155040296995620893746968338935946554⟩,⟨-26,23⟩⟩] +lemma tw0_0_1_17_calc (j : Fin 31) : taylorWaveBox 0 0 1 17 j = tw0_0_1_17 j := by + revert j + decide +kernel +def tw0_0_1_18 : Fin 31 → CI := ![⟨⟨-3,4⟩,⟨-94025990269704865213243976230988259774946357332252,-94025990269704865213243976230988259774946357332239⟩⟩, + ⟨⟨11829147655484287448229875198593946184433600759032,11829147655484287448229875198593946184433600759036⟩,⟨-20488684749533051553514964760834773719723597069525,-20488684749533051553514964760834773719723597069522⟩⟩, + ⟨⟨4653936065483618059616246420022053265359179054898,4653936065483618059616246420022053265359179054899⟩,⟨-2686951240198274686206728883684009864112743700895,-2686951240198274686206728883684009864112743700894⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨164743037743054039538993548933512045507670678238,164743037743054039538993548933512045507670678239⟩,⟨95114437188068927088960736169959615862693071710,95114437188068927088960736169959615862693071711⟩⟩, + ⟨⟨14138155021109096780349298634536472661272260806,14138155021109096780349298634536472661272260807⟩,⟨24488002821845988477325123417439892948896645685,24488002821845988477325123417439892948896645686⟩⟩, + ⟨⟨-1,1⟩,⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩⟩, + ⟨⟨-163001829593019482288611425743212445035782851,-163001829593019482288611425743212445035782850⟩,⟨282327450581793915523610560326160169229411005,282327450581793915523610560326160169229411006⟩⟩, + ⟨⟨-19539532422574092439188923607668660850261304,-19539532422574092439188923607668660850261303⟩,⟨11281154304012572715978503416627832588609314,11281154304012572715978503416627832588609315⟩⟩, + ⟨⟨-1033826696146935336097205616591605548782969,-1033826696146935336097205616591605548782968⟩,⟨-1,1⟩⟩, + ⟨⟨-23353579351278294064831851403655903767488,-23353579351278294064831851403655903767487⟩,⟨-13483195325001808910702990183388207112572,-13483195325001808910702990183388207112571⟩⟩, + ⟨⟨-155450658410090906418429780715191311871,-155450658410090906418429780715191311870⟩,⟨-269248438436311641238794861150894326429,-269248438436311641238794861150894326428⟩⟩, + ⟨⟨-1,1⟩,⟨-985933967730460487458425156203847455,-985933967730460487458425156203847454⟩⟩, + ⟨⟨148249300394144922655515461650077,148249300394144922655515461650078⟩,⟨-256775320469199792135996686125655,-256775320469199792135996686125654⟩⟩, + ⟨⟨244880028218459884773251234,244880028218459884773251235⟩,⟨-141381550211090967803492987,-141381550211090967803492986⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨244880028218459884773251234,244880028218459884773251235⟩,⟨141381550211090967803492986,141381550211090967803492987⟩⟩, + ⟨⟨148249300394144922655515461650077,148249300394144922655515461650078⟩,⟨256775320469199792135996686125654,256775320469199792135996686125655⟩⟩, + ⟨⟨-1,1⟩,⟨985933967730460487458425156203847454,985933967730460487458425156203847455⟩⟩, + ⟨⟨-155450658410090906418429780715191311871,-155450658410090906418429780715191311870⟩,⟨269248438436311641238794861150894326428,269248438436311641238794861150894326429⟩⟩, + ⟨⟨-23353579351278294064831851403655903767488,-23353579351278294064831851403655903767487⟩,⟨13483195325001808910702990183388207112571,13483195325001808910702990183388207112572⟩⟩, + ⟨⟨-1033826696146935336097205616591605548782969,-1033826696146935336097205616591605548782968⟩,⟨-1,1⟩⟩, + ⟨⟨-19539532422574092439188923607668660850261304,-19539532422574092439188923607668660850261303⟩,⟨-11281154304012572715978503416627832588609315,-11281154304012572715978503416627832588609314⟩⟩, + ⟨⟨-163001829593019482288611425743212445035782851,-163001829593019482288611425743212445035782850⟩,⟨-282327450581793915523610560326160169229411006,-282327450581793915523610560326160169229411005⟩⟩, + ⟨⟨-1,1⟩,⟨-3437739179098607000216892970677563681642053416,-3437739179098607000216892970677563681642053415⟩⟩, + ⟨⟨14138155021109096780349298634536472661272260806,14138155021109096780349298634536472661272260807⟩,⟨-24488002821845988477325123417439892948896645686,-24488002821845988477325123417439892948896645685⟩⟩, + ⟨⟨164743037743054039538993548933512045507670678238,164743037743054039538993548933512045507670678239⟩,⟨-95114437188068927088960736169959615862693071711,-95114437188068927088960736169959615862693071710⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨4653936065483618059616246420022053265359179054898,4653936065483618059616246420022053265359179054899⟩,⟨2686951240198274686206728883684009864112743700894,2686951240198274686206728883684009864112743700895⟩⟩, + ⟨⟨11829147655484287448229875198593946184433600759032,11829147655484287448229875198593946184433600759036⟩,⟨20488684749533051553514964760834773719723597069522,20488684749533051553514964760834773719723597069525⟩⟩, + ⟨⟨-3,4⟩,⟨94025990269704865213243976230988259774946357332239,94025990269704865213243976230988259774946357332252⟩⟩] +lemma tw0_0_1_18_calc (j : Fin 31) : taylorWaveBox 0 0 1 18 j = tw0_0_1_18 j := by + revert j + decide +kernel +def tw0_0_1_19 : Fin 31 → CI := ![⟨⟨-11721879376103578822742411985588648801078897483639,-11721879376103578822742411985588648801078897483637⟩,⟨-1,1⟩⟩, + ⟨⟨-2383966721883343247091115611608595323499347651340,-2383966721883343247091115611608595323499347651339⟩,⟨-1376383828618457922528887297180368994840894414763,-1376383828618457922528887297180368994840894414762⟩⟩, + ⟨⟨-290309475126697058156452518316157211737650650827,-290309475126697058156452518316157211737650650826⟩,⟨-502830760838092535319858441641855074900146890106,-502830760838092535319858441641855074900146890105⟩⟩, + ⟨⟨-1,1⟩,⟨-108115254456938454468191636018970912331746451315,-108115254456938454468191636018970912331746451314⟩⟩, + ⟨⟨8695552879164065867390794616840105379972262220,8695552879164065867390794616840105379972262221⟩,⟨-15061139386613996358639028247470074125390286660,-15061139386613996358639028247470074125390286659⟩⟩, + ⟨⟨2035220364185118618668416930612606764749862363,2035220364185118618668416930612606764749862364⟩,⟨-1175035025122486417788310258666568948096360567,-1175035025122486417788310258666568948096360566⟩⟩, + ⟨⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩,⟨-1,1⟩⟩, + ⟨⟨18771594595862416126023613303049409549003581,18771594595862416126023613303049409549003582⟩,⟨10837785193039690213645887434211187158244312,10837785193039690213645887434211187158244313⟩⟩, + ⟨⟨656310953435162507309383057203468797131011,656310953435162507309383057203468797131012⟩,⟨1136763916913673041863973432354257261037515,1136763916913673041863973432354257261037516⟩⟩, + ⟨⟨-1,1⟩,⟨51553370693654277071090524682507949987290,51553370693654277071090524682507949987291⟩⟩, + ⟨⟨-560300362168544014829783562978062128113,-560300362168544014829783562978062128112⟩,⟨970468694775161084493835892969420797705,970468694775161084493835892969420797706⟩⟩, + ⟨⟨-8950993822032173216831022883915619636,-8950993822032173216831022883915619635⟩,⟨5167858692664952380011504857163995341,5167858692664952380011504857163995342⟩⟩, + ⟨⟨-24582562777354372535271894780401207,-24582562777354372535271894780401206⟩,⟨-1,1⟩⟩, + ⟨⟨-4268166457191549881377707902869,-4268166457191549881377707902868⟩,⟨-2464227053005672636037590435584,-2464227053005672636037590435583⟩⟩, + ⟨⟨-1175035025122486417788311,-1175035025122486417788310⟩,⟨-2035220364185118618668417,-2035220364185118618668416⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1175035025122486417788311,-1175035025122486417788310⟩,⟨2035220364185118618668416,2035220364185118618668417⟩⟩, + ⟨⟨-4268166457191549881377707902869,-4268166457191549881377707902868⟩,⟨2464227053005672636037590435583,2464227053005672636037590435584⟩⟩, + ⟨⟨-24582562777354372535271894780401207,-24582562777354372535271894780401206⟩,⟨-1,1⟩⟩, + ⟨⟨-8950993822032173216831022883915619636,-8950993822032173216831022883915619635⟩,⟨-5167858692664952380011504857163995342,-5167858692664952380011504857163995341⟩⟩, + ⟨⟨-560300362168544014829783562978062128113,-560300362168544014829783562978062128112⟩,⟨-970468694775161084493835892969420797706,-970468694775161084493835892969420797705⟩⟩, + ⟨⟨-1,1⟩,⟨-51553370693654277071090524682507949987291,-51553370693654277071090524682507949987290⟩⟩, + ⟨⟨656310953435162507309383057203468797131011,656310953435162507309383057203468797131012⟩,⟨-1136763916913673041863973432354257261037516,-1136763916913673041863973432354257261037515⟩⟩, + ⟨⟨18771594595862416126023613303049409549003581,18771594595862416126023613303049409549003582⟩,⟨-10837785193039690213645887434211187158244313,-10837785193039690213645887434211187158244312⟩⟩, + ⟨⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩,⟨-1,1⟩⟩, + ⟨⟨2035220364185118618668416930612606764749862363,2035220364185118618668416930612606764749862364⟩,⟨1175035025122486417788310258666568948096360566,1175035025122486417788310258666568948096360567⟩⟩, + ⟨⟨8695552879164065867390794616840105379972262220,8695552879164065867390794616840105379972262221⟩,⟨15061139386613996358639028247470074125390286659,15061139386613996358639028247470074125390286660⟩⟩, + ⟨⟨-1,1⟩,⟨108115254456938454468191636018970912331746451314,108115254456938454468191636018970912331746451315⟩⟩, + ⟨⟨-290309475126697058156452518316157211737650650827,-290309475126697058156452518316157211737650650826⟩,⟨502830760838092535319858441641855074900146890105,502830760838092535319858441641855074900146890106⟩⟩, + ⟨⟨-2383966721883343247091115611608595323499347651340,-2383966721883343247091115611608595323499347651339⟩,⟨1376383828618457922528887297180368994840894414762,1376383828618457922528887297180368994840894414763⟩⟩, + ⟨⟨-11721879376103578822742411985588648801078897483639,-11721879376103578822742411985588648801078897483637⟩,⟨-1,1⟩⟩] +lemma tw0_0_1_19_calc (j : Fin 31) : taylorWaveBox 0 0 1 19 j = tw0_0_1_19 j := by + revert j + decide +kernel +def tw0_0_1_20 : Fin 31 → CI := ![⟨⟨-1,1⟩,⟨1394900383872451219493732966501238799900380114347,1394900383872451219493732966501238799900380114348⟩⟩, + ⟨⟨-152870006421983752408001082033415428982916227795,-152870006421983752408001082033415428982916227794⟩,⟨264778618076256416414027925765950825976652416640,264778618076256416414027925765950825976652416641⟩⟩, + ⟨⟨-51858491200057908046132498479042853268060460318,-51858491200057908046132498479042853268060460317⟩,⟨29940513854121272066113807617188080573704733326,29940513854121272066113807617188080573704733327⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨-1314332356991067102251040651990573570591805716,-1314332356991067102251040651990573570591805715⟩,⟨-758830140113427900095231383132577951674044192,-758830140113427900095231383132577951674044191⟩⟩, + ⟨⟨-93219227339280340100759313342535193795873777,-93219227339280340100759313342535193795873776⟩,⟨-161460437993947277624244162850450867396967050,-161460437993947277624244162850450867396967049⟩⟩, + ⟨⟨-1,1⟩,⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩⟩, + ⟨⟨687836491790661210895985532718593711422874,687836491790661210895985532718593711422875⟩,⟨-1191367751081358187235273848489393764024727,-1191367751081358187235273848489393764024726⟩⟩, + ⟨⟨63128141898216346839434606019485193723834,63128141898216346839434606019485193723835⟩,⟨-36447049718376100637436171062806946988802,-36447049718376100637436171062806946988801⟩⟩, + ⟨⟨2453934706651145757933936954605520563838,2453934706651145757933936954605520563839⟩,⟨-1,1⟩⟩, + ⟨⟨38495168207632846265851059639561383103,38495168207632846265851059639561383104⟩,⟨22225195727176747346105411849626348923,22225195727176747346105411849626348924⟩⟩, + ⟨⟨163992999026933005069729216746948650,163992999026933005069729216746948651⟩,⟨284044206400241419609850370523785058,284044206400241419609850370523785059⟩⟩, + ⟨⟨-1,1⟩,⟨585063625967775763972744215632801,585063625967775763972744215632802⟩⟩, + ⟨⟨-39098977810605288760597519099,-39098977810605288760597519098⟩,⟨67721416091976504232847778922,67721416091976504232847778923⟩⟩, + ⟨⟨-16146043799394727762425,-16146043799394727762424⟩,⟨9321922733928034010075,9321922733928034010076⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-16146043799394727762425,-16146043799394727762424⟩,⟨-9321922733928034010076,-9321922733928034010075⟩⟩, + ⟨⟨-39098977810605288760597519099,-39098977810605288760597519098⟩,⟨-67721416091976504232847778923,-67721416091976504232847778922⟩⟩, + ⟨⟨-1,1⟩,⟨-585063625967775763972744215632802,-585063625967775763972744215632801⟩⟩, + ⟨⟨163992999026933005069729216746948650,163992999026933005069729216746948651⟩,⟨-284044206400241419609850370523785059,-284044206400241419609850370523785058⟩⟩, + ⟨⟨38495168207632846265851059639561383103,38495168207632846265851059639561383104⟩,⟨-22225195727176747346105411849626348924,-22225195727176747346105411849626348923⟩⟩, + ⟨⟨2453934706651145757933936954605520563838,2453934706651145757933936954605520563839⟩,⟨-1,1⟩⟩, + ⟨⟨63128141898216346839434606019485193723834,63128141898216346839434606019485193723835⟩,⟨36447049718376100637436171062806946988801,36447049718376100637436171062806946988802⟩⟩, + ⟨⟨687836491790661210895985532718593711422874,687836491790661210895985532718593711422875⟩,⟨1191367751081358187235273848489393764024726,1191367751081358187235273848489393764024727⟩⟩, + ⟨⟨-1,1⟩,⟨18359916521552451562374200882082883809634660,18359916521552451562374200882082883809634661⟩⟩, + ⟨⟨-93219227339280340100759313342535193795873777,-93219227339280340100759313342535193795873776⟩,⟨161460437993947277624244162850450867396967049,161460437993947277624244162850450867396967050⟩⟩, + ⟨⟨-1314332356991067102251040651990573570591805716,-1314332356991067102251040651990573570591805715⟩,⟨758830140113427900095231383132577951674044191,758830140113427900095231383132577951674044192⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨-51858491200057908046132498479042853268060460318,-51858491200057908046132498479042853268060460317⟩,⟨-29940513854121272066113807617188080573704733327,-29940513854121272066113807617188080573704733326⟩⟩, + ⟨⟨-152870006421983752408001082033415428982916227795,-152870006421983752408001082033415428982916227794⟩,⟨-264778618076256416414027925765950825976652416641,-264778618076256416414027925765950825976652416640⟩⟩, + ⟨⟨-1,1⟩,⟨-1394900383872451219493732966501238799900380114348,-1394900383872451219493732966501238799900380114347⟩⟩] +lemma tw0_0_1_20_calc (j : Fin 31) : taylorWaveBox 0 0 1 20 j = tw0_0_1_20 j := by + revert j + decide +kernel +def tw0_0_1 : Fin 21 → Fin 31 → CI := ![tw0_0_1_0,tw0_0_1_1,tw0_0_1_2,tw0_0_1_3,tw0_0_1_4,tw0_0_1_5,tw0_0_1_6,tw0_0_1_7,tw0_0_1_8,tw0_0_1_9,tw0_0_1_10,tw0_0_1_11,tw0_0_1_12,tw0_0_1_13,tw0_0_1_14,tw0_0_1_15,tw0_0_1_16,tw0_0_1_17,tw0_0_1_18,tw0_0_1_19,tw0_0_1_20] +lemma tw0_0_1_mem (l : Fin 21) (j : Fin 31) : (tw0_0_1 l j).Mem (taylorWave 0 0 (nearNode 1) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 1 l j = tw0_0_1 l j := by + fin_cases l + · exact tw0_0_1_0_calc j + · exact tw0_0_1_1_calc j + · exact tw0_0_1_2_calc j + · exact tw0_0_1_3_calc j + · exact tw0_0_1_4_calc j + · exact tw0_0_1_5_calc j + · exact tw0_0_1_6_calc j + · exact tw0_0_1_7_calc j + · exact tw0_0_1_8_calc j + · exact tw0_0_1_9_calc j + · exact tw0_0_1_10_calc j + · exact tw0_0_1_11_calc j + · exact tw0_0_1_12_calc j + · exact tw0_0_1_13_calc j + · exact tw0_0_1_14_calc j + · exact tw0_0_1_15_calc j + · exact tw0_0_1_16_calc j + · exact tw0_0_1_17_calc j + · exact tw0_0_1_18_calc j + · exact tw0_0_1_19_calc j + · exact tw0_0_1_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 1 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave002.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave002.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d56554e23c491ee26eee8614989a112d33b116f --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave002.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_2_0 : Fin 31 → CI := ![⟨⟨1713472986300235871325432465256276238769739480423594544261862,1713472986300235871325432465256276238769739480423916653338578⟩,⟨-2967822269668779360198432786705442237105162346592949692704597,-2967822269668779360198432786705442237105162346592618732421110⟩⟩, + ⟨⟨2805218067056851604552566199642249397433528582836798807105916,2805218067056851604552566199642249397433528582837040168088878⟩,⟨-1021015877034465643367429066510442324816671143543717825000125,-1021015877034465643367429066510442324816671143543487188925246⟩⟩, + ⟨⟨2418784965982693475353998406834388511052379237241936141134979,2418784965982693475353998406834388511052379237242130628652454⟩,⟨880365730708289253719875062450330371908252159483944452141178,880365730708289253719875062450330371908252159484128598215689⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471111287034790,1096622711232150957648276777764016792812633267471277167029928⟩,⟨1899406252588018790526996983491483031747303901819302081181990,1899406252588018790526996983491483031747303901819472514504133⟩⟩, + ⟨⟨-320022371980963888866240927524319150290063779637011379647826,-320022371980963888866240927524319150290063779636894105539615⟩,⟨1814937060086576386326731215747781185198830442285201629987451,1814937060086576386326731215747781185198830442285328616948921⟩⟩, + ⟨⟨-1166752408524245749422656807058296608334476546274390038480144,-1166752408524245749422656807058296608334476546274314147595624⟩,⟨979021515667897743601705183162428702125795067967304300283637,979021515667897743601705183162428702125795067967379583634517⟩⟩, + ⟨⟨-1233700550136169827354311374984518891914212425905118223509245,-1233700550136169827354311374984518891914212425905078143515325⟩,⟨-18138682213,14087330089⟩⟩, + ⟨⟨-746721541455517279630500356517309829334064989615601631195534,-746721541455517279630500356517309829334064989615564932675417⟩,⟨-626573770027454555905091317223954369360508843499119053261120,-626573770027454555905091317223954369360508843499083536772011⟩⟩, + ⟨⟨-129595836587332483921039714451997011274488638034809142985255,-129595836587332483921039714451997011274488638034784118884593⟩,⟨-734974511935886305206692806377200645245807369189915568266334,-734974511935886305206692806377200645245807369189886787852780⟩⟩, + ⟨⟨274155677808037739412069194441004198203158316867792033729781,274155677808037739412069194441004198203158316867808198521062⟩,⟨-474851563147004697631749245872870757936825975454854740558060,-474851563147004697631749245872870757936825975454837107761155⟩⟩, + ⟨⟨357808426920516786294970178525797117019582727402663627155430,357808426920516786294970178525797117019582727402672549155832⟩,⟨-130231616968681842266253707463066623063350911166280215519946,-130231616968681842266253707463066623063350911166272619426840⟩⟩, + ⟨⟨228997393229130743228780914256510154892532945537705141276300,228997393229130743228780914256510154892532945537709737854558⟩,⟨83348234859956379050402372776362638760544583146415492134808,83348234859956379050402372776362638760544583146419074238410⟩⟩, + ⟨⟨68538919452009434853017298610251049550789579216948935593386,68538919452009434853017298610251049550789579216950732626769⟩,⟨118712890786751174407937311468217689484206493863710567852718,118712890786751174407937311468217689484206493863712619302845⟩⟩, + ⟨⟨-10579251966312855830288956281795674389754174533453082015756,-10579251966312855830288956281795674389754174533452687409650⟩,⟨59997919341705004506668800520587807775167948505297676651489,59997919341705004506668800520587807775167948505298399310805⟩⟩, + ⟨⟨-11667524085242457494226568070582966083344765462743553402775,-11667524085242457494226568070582966083344765462743456307877⟩,⟨9790215156678977436017051831624287021257950679673389188123,9790215156678977436017051831624287021257950679673487966018⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨-11667524085242457494226568070582966083344765462743553402721,-11667524085242457494226568070582966083344765462743456307839⟩,⟨-9790215156678977436017051831624287021257950679673487966061,-9790215156678977436017051831624287021257950679673389188186⟩⟩, + ⟨⟨-10579251966312855830288956281795674389754174533453082015457,-10579251966312855830288956281795674389754174533452687409275⟩,⟨-59997919341705004506668800520587807775167948505298399310906,-59997919341705004506668800520587807775167948505297676651512⟩⟩, + ⟨⟨68538919452009434853017298610251049550789579216948935594056,68538919452009434853017298610251049550789579216950732627203⟩,⟨-118712890786751174407937311468217689484206493863712619302419,-118712890786751174407937311468217689484206493863710567852518⟩⟩, + ⟨⟨228997393229130743228780914256510154892532945537705141276755,228997393229130743228780914256510154892532945537709737854945⟩,⟨-83348234859956379050402372776362638760544583146419074237194,-83348234859956379050402372776362638760544583146415492133664⟩⟩, + ⟨⟨357808426920516786294970178525797117019582727402663627154977,357808426920516786294970178525797117019582727402672549154812⟩,⟨130231616968681842266253707463066623063350911166272619429145,130231616968681842266253707463066623063350911166280215521671⟩⟩, + ⟨⟨274155677808037739412069194441004198203158316867792033727421,274155677808037739412069194441004198203158316867808198518584⟩,⟨474851563147004697631749245872870757936825975454837107762674,474851563147004697631749245872870757936825975454854740559464⟩⟩, + ⟨⟨-129595836587332483921039714451997011274488638034809142990470,-129595836587332483921039714451997011274488638034784118887669⟩,⟨734974511935886305206692806377200645245807369189886787850996,734974511935886305206692806377200645245807369189915568266686⟩⟩, + ⟨⟨-746721541455517279630500356517309829334064989615601631200703,-746721541455517279630500356517309829334064989615564932677854⟩,⟨626573770027454555905091317223954369360508843499083536766021,626573770027454555905091317223954369360508843499119053257798⟩⟩, + ⟨⟨-1233700550136169827354311374984518891914212425905118223509097,-1233700550136169827354311374984518891914212425905078143515138⟩,⟨-14087336491,18138675840⟩⟩, + ⟨⟨-1166752408524245749422656807058296608334476546274390038470845,-1166752408524245749422656807058296608334476546274314147594507⟩,⟨-979021515667897743601705183162428702125795067967379583636222,-979021515667897743601705183162428702125795067967304300293560⟩⟩, + ⟨⟨-320022371980963888866240927524319150290063779637011379634757,-320022371980963888866240927524319150290063779636894105534053⟩,⟨-1814937060086576386326731215747781185198830442285328616946624,-1814937060086576386326731215747781185198830442285201629992680⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471111287036093,1096622711232150957648276777764016792812633267471277167044210⟩,⟨-1899406252588018790526996983491483031747303901819472514504465,-1899406252588018790526996983491483031747303901819302081169338⟩⟩, + ⟨⟨2418784965982693475353998406834388511052379237241936141142221,2418784965982693475353998406834388511052379237242130628653189⟩,⟨-880365730708289253719875062450330371908252159484128598201054,-880365730708289253719875062450330371908252159483944452133029⟩⟩, + ⟨⟨2805218067056851604552566199642249397433528582836798807106046,2805218067056851604552566199642249397433528582837040168079972⟩,⟨1021015877034465643367429066510442324816671143543487188942748,1021015877034465643367429066510442324816671143543717825008569⟩⟩, + ⟨⟨1713472986300235871325432465256276238769739480423594544246745,1713472986300235871325432465256276238769739480423916653323862⟩,⟨2967822269668779360198432786705442237105162346592618732430142,2967822269668779360198432786705442237105162346592949692714040⟩⟩] +lemma tw0_0_2_0_calc (j : Fin 31) : taylorWaveBox 0 0 2 0 j = tw0_0_2_0 j := by + revert j + decide +kernel +def tw0_0_2_1 : Fin 31 → CI := ![⟨⟨-2589913510986562080301927490833042405511561092141721318736463,-2589913510986562080301927490833042405511561092141424257453692⟩,⟨-1495287262745940401980917971985985493934475721734577260572327,-1495287262745940401980917971985985493934475721734291407728165⟩⟩, + ⟨⟨-831604142571485876864954382514006692780990181974521244818791,-831604142571485876864954382514006692780990181974330747659489⟩,⟨-2284813603640079810287365325290637518877610451529816977487411,-2284813603640079810287365325290637518877610451529613119320687⟩⟩, + ⟨⟨665828826978700609137137309906440489810435652258616855704470,665828826978700609137137309906440489810435652258758246500006⟩,⟨-1829349667345938536152092426991082590734005161082720394319683,-1829349667345938536152092426991082590734005161082567478592359⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176427435770553,1326035717625119785114586875306517711621919279176550641578405⟩,⟨-765587078525921485814230001656824572894451569528082968736510,-765587078525921485814230001656824572894451569527964725714008⟩⟩, + ⟨⟨1161476338549153718153675456564269412794024076664933329714600,1161476338549153718153675456564269412794024076665018292630058⟩,⟨204799615940695160055334154926559998303094145660386171270999,204799615940695160055334154926559998303094145660461873210004⟩⟩, + ⟨⟨569571629875668927686068468677568861565128954029784859617238,569571629875668927686068468677568861565128954029830470698212⟩,⟨678789036144068092640796592700680427888676496357812579880419,678789036144068092640796592700680427888676496357858892059939⟩⟩, + ⟨⟨-9497391800,7376108789⟩,⟨645964097506246253655756563897945733379693511789261049542541,645964097506246253655756563897945733379693511789284091545870⟩⟩, + ⟨⟨-291620674496342490975267055962915257121346024463271395040162,-291620674496342490975267055962915257121346024463253936658088⟩,⟨347539986505762863432087855462748379079002366135201845901633,347539986505762863432087855462748379079002366135220032422617⟩⟩, + ⟨⟨-299313586868790176804440782570656956114463003979034837001728,-299313586868790176804440782570656956114463003979022163620866⟩,⟨52777061057594620510127434364996303093885268190471252832197,52777061057594620510127434364996303093885268190481611728945⟩⟩, + ⟨⟨-165754464703139973139323359413314713952739909897064156879969,-165754464703139973139323359413314713952739909897057474259872⟩,⟨-95698384815740185726778750207103071611806446191006498822060,-95698384815740185726778750207103071611806446191000551628022⟩⟩, + ⟨⟨-37882841771660253137069714946884415669687963829011266583958,-37882841771660253137069714946884415669687963829008936385209⟩,⟨-104082252352408883486122691567539974438666656866333172622531,-104082252352408883486122691567539974438666656866330246013715⟩⟩, + ⟨⟨19396014987090049606179694052804820822880237480452811793729,19396014987090049606179694052804820822880237480453707126524⟩,⟨-53290113204433348344894818082580466912597328315562422973483,-53290113204433348344894818082580466912597328315561183673450⟩⟩, + ⟨⟨20719308087892496642415419926664339244092488737132409589206,20719308087892496642415419926664339244092488737132833586405⟩,⟨-11962298101967523215847343775887883951475805773875582492286,-11962298101967523215847343775887883951475805773875230773613⟩⟩, + ⟨⟨6981074912391607622261009506021153495381061317295070197183,6981074912391607622261009506021153495381061317295176503866⟩,⟨1230951861401623801985479518717114940965254068582527240833,1230951861401623801985479518717114940965254068582577073582⟩⟩, + ⟨⟨569571629875668927686068468677568861565128954029804999860,569571629875668927686068468677568861565128954029812559530⟩,⟨678789036144068092640796592700680427888676496357830896058,678789036144068092640796592700680427888676496357838705465⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨569571629875668927686068468677568861565128954029804999864,569571629875668927686068468677568861565128954029812559532⟩,⟨-678789036144068092640796592700680427888676496357838705462,-678789036144068092640796592700680427888676496357830896056⟩⟩, + ⟨⟨6981074912391607622261009506021153495381061317295070197186,6981074912391607622261009506021153495381061317295176503878⟩,⟨-1230951861401623801985479518717114940965254068582577073547,-1230951861401623801985479518717114940965254068582527240789⟩⟩, + ⟨⟨20719308087892496642415419926664339244092488737132409589171,20719308087892496642415419926664339244092488737132833586331⟩,⟨11962298101967523215847343775887883951475805773875230773730,11962298101967523215847343775887883951475805773875582492362⟩⟩, + ⟨⟨19396014987090049606179694052804820822880237480452811793463,19396014987090049606179694052804820822880237480453707126242⟩,⟨53290113204433348344894818082580466912597328315561183673556,53290113204433348344894818082580466912597328315562422973573⟩⟩, + ⟨⟨-37882841771660253137069714946884415669687963829011266584460,-37882841771660253137069714946884415669687963829008936385879⟩,⟨104082252352408883486122691567539974438666656866330246013583,104082252352408883486122691567539974438666656866333172622235⟩⟩, + ⟨⟨-165754464703139973139323359413314713952739909897064156880460,-165754464703139973139323359413314713952739909897057474260402⟩,⟨95698384815740185726778750207103071611806446191000551627198,95698384815740185726778750207103071611806446191006498821195⟩⟩, + ⟨⟨-299313586868790176804440782570656956114463003979034837001871,-299313586868790176804440782570656956114463003979022163620140⟩,⟨-52777061057594620510127434364996303093885268190481611731068,-52777061057594620510127434364996303093885268190471252833449⟩⟩, + ⟨⟨-291620674496342490975267055962915257121346024463271395038616,-291620674496342490975267055962915257121346024463253936655300⟩,⟨-347539986505762863432087855462748379079002366135220032425023,-347539986505762863432087855462748379079002366135201845902768⟩⟩, + ⟨⟨-9497388463,7376112141⟩,⟨-645964097506246253655756563897945733379693511789284091545794,-645964097506246253655756563897945733379693511789261049542444⟩⟩, + ⟨⟨569571629875668927686068468677568861565128954029784859623012,569571629875668927686068468677568861565128954029830470699204⟩,⟨-678789036144068092640796592700680427888676496357858892054529,-678789036144068092640796592700680427888676496357812579879770⟩⟩, + ⟨⟨1161476338549153718153675456564269412794024076664933329717948,1161476338549153718153675456564269412794024076665018292628589⟩,⟨-204799615940695160055334154926559998303094145660461873201640,-204799615940695160055334154926559998303094145660386171267440⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176427435761721,1326035717625119785114586875306517711621919279176550641578637⟩,⟨765587078525921485814230001656824572894451569527964725714918,765587078525921485814230001656824572894451569528082968746482⟩⟩, + ⟨⟨665828826978700609137137309906440489810435652258616855698308,665828826978700609137137309906440489810435652258758246488938⟩,⟨1829349667345938536152092426991082590734005161082567478597837,1829349667345938536152092426991082590734005161082720394320240⟩⟩, + ⟨⟨-831604142571485876864954382514006692780990181974521244825669,-831604142571485876864954382514006692780990181974330747673744⟩,⟨2284813603640079810287365325290637518877610451529613119320794,2284813603640079810287365325290637518877610451529816977480158⟩⟩, + ⟨⟨-2589913510986562080301927490833042405511561092141721318744704,-2589913510986562080301927490833042405511561092141424257461574⟩,⟨1495287262745940401980917971985985493934475721734291407714973,1495287262745940401980917971985985493934475721734577260559486⟩⟩] +lemma tw0_0_2_1_calc (j : Fin 31) : taylorWaveBox 0 0 2 1 j = tw0_0_2_1 j := by + revert j + decide +kernel +def tw0_0_2_2 : Fin 31 → CI := ![⟨⟨-978663224926882768659580888799522481530988635632628112738843,-978663224926882768659580888799522481530988635632437907308030⟩,⟨1695094429072569102122468916644420780784284438590402624724337,1695094429072569102122468916644420780784284438590602446532414⟩⟩, + ⟨⟨-1395713206225663189454101143002566310611963759676580053924882,-1395713206225663189454101143002566310611963759676451081364183⟩,⟨507998062638387039136909131110969358880879790394031831916662,507998062638387039136909131110969358880879790394149817017319⟩⟩, + ⟨⟨-1037665683127112826790883557509795303971998566746215617953698,-1037665683127112826790883557509795303971998566746125576266342⟩,⟨-377679421777774162452864996190660033813952720050171490958243,-377679421777774162452864996190660033813952720050090087382590⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155113694772013,-400860456930051182042964332052284408435092945155050506891739⟩,⟨-694310678148124304229363268257554751809242906046705173408107,-694310678148124304229363268257554751809242906046638452938435⟩⟩, + ⟨⟨98296759137087351387565494698804152877234753133328063723923,98296759137087351387565494698804152877234753133364710934589⟩,⟨-557468623021504469524006156016413096457963951953180389837074,-557468623021504469524006156016413096457963951953137836087369⟩⟩, + ⟨⟨296177590178819576837832799272460400665228207586874992833455,296177590178819576837832799272460400665228207586896143096419⟩,⟨-248522506682023097611077479415842414781309072362210136456965,-248522506682023097611077479415842414781309072362189443796794⟩⟩, + ⟨⟨253669507901048013636563366376836227212832254355946425814274,253669507901048013636563366376836227212832254355956281842945⟩,⟨-2896591149,3729617040⟩⟩, + ⟨⟨121314340937244498672776314581999780112477473827584627129441,121314340937244498672776314581999780112477473827591361578396⟩,⟨101794818736956660781497335568729053094424196039554223346786,101794818736956660781497335568729053094424196039560641494745⟩⟩, + ⟨⟨16119835987169368942117666332342652213526442338169301499057,16119835987169368942117666332342652213526442338172516755055⟩,⟨91420132769252935682476523502179348719047295173793138333389,91420132769252935682476523502179348719047295173797300196621⟩⟩, + ⟨⟨-25053778558128198877685270753267775527193309072193592165335,-25053778558128198877685270753267775527193309072191955444921⟩,⟨43394417384257769014335204266097171988077681627915962231819,43394417384257769014335204266097171988077681627917849866391⟩⟩, + ⟨⟨-22707224955514355825927041190561327158800430804816622263132,-22707224955514355825927041190561327158800430804815911496792⟩,⟨8264753986593916583209293183682732437019727951798675747176,8264753986593916583209293183682732437019727951799210425211⟩⟩, + ⟨⟨-9300879341778680146299716071653919604244656457652860307750,-9300879341778680146299716071653919604244656457652614403471⟩,⟨-3385243232908868232482526488036447206203280569056945880048,-3385243232908868232482526488036447206203280569056778839431⟩⟩, + ⟨⟨-1565861159883012429855329422079235970449581817012069421669,-1565861159883012429855329422079235970449581817012018397510⟩,⟨-2712151086516110563395950266631073249254855101744841266219,-2712151086516110563395950266631073249254855101744777132069⟩⟩, + ⟨⟨107420814575056186203199775642433334200925896464277932787,107420814575056186203199775642433334200925896464282623447⟩,⟨-609213712748041220707881872567625814037799551345579570927,-609213712748041220707881872567625814037799551345568354730⟩⟩, + ⟨⟨29617759017881957683783279927246040066522820758688298477,29617759017881957683783279927246040066522820758688733504⟩,⟨-24852250668202309761107747941584241478130907236220232124,-24852250668202309761107747941584241478130907236219823163⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨29617759017881957683783279927246040066522820758688298477,29617759017881957683783279927246040066522820758688733504⟩,⟨24852250668202309761107747941584241478130907236219823163,24852250668202309761107747941584241478130907236220232124⟩⟩, + ⟨⟨107420814575056186203199775642433334200925896464277932783,107420814575056186203199775642433334200925896464282623444⟩,⟨609213712748041220707881872567625814037799551345568354730,609213712748041220707881872567625814037799551345579570928⟩⟩, + ⟨⟨-1565861159883012429855329422079235970449581817012069421678,-1565861159883012429855329422079235970449581817012018397525⟩,⟨2712151086516110563395950266631073249254855101744777132065,2712151086516110563395950266631073249254855101744841266209⟩⟩, + ⟨⟨-9300879341778680146299716071653919604244656457652860307766,-9300879341778680146299716071653919604244656457652614403489⟩,⟨3385243232908868232482526488036447206203280569056778839384,3385243232908868232482526488036447206203280569056945879998⟩⟩, + ⟨⟨-22707224955514355825927041190561327158800430804816622263067,-22707224955514355825927041190561327158800430804815911496763⟩,⟨-8264753986593916583209293183682732437019727951799210425321,-8264753986593916583209293183682732437019727951798675747322⟩⟩, + ⟨⟨-25053778558128198877685270753267775527193309072193592165109,-25053778558128198877685270753267775527193309072191955444706⟩,⟨-43394417384257769014335204266097171988077681627917849866519,-43394417384257769014335204266097171988077681627915962231957⟩⟩, + ⟨⟨16119835987169368942117666332342652213526442338169301499440,16119835987169368942117666332342652213526442338172516755704⟩,⟨-91420132769252935682476523502179348719047295173797300196665,-91420132769252935682476523502179348719047295173793138333167⟩⟩, + ⟨⟨121314340937244498672776314581999780112477473827584627129837,121314340937244498672776314581999780112477473827591361579236⟩,⟨-101794818736956660781497335568729053094424196039560641494205,-101794818736956660781497335568729053094424196039554223345812⟩⟩, + ⟨⟨253669507901048013636563366376836227212832254355946425814237,253669507901048013636563366376836227212832254355956281842916⟩,⟨-3729615729,2896592466⟩⟩, + ⟨⟨296177590178819576837832799272460400665228207586874992833172,296177590178819576837832799272460400665228207586896143094058⟩,⟨248522506682023097611077479415842414781309072362189443799313,248522506682023097611077479415842414781309072362210136457398⟩⟩, + ⟨⟨98296759137087351387565494698804152877234753133328063722215,98296759137087351387565494698804152877234753133364710930574⟩,⟨557468623021504469524006156016413096457963951953137836088976,557468623021504469524006156016413096457963951953180389836369⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155113694777234,-400860456930051182042964332052284408435092945155050506892215⟩,⟨694310678148124304229363268257554751809242906046638452933811,694310678148124304229363268257554751809242906046705173408229⟩⟩, + ⟨⟨-1037665683127112826790883557509795303971998566746215617954014,-1037665683127112826790883557509795303971998566746125576269450⟩,⟨377679421777774162452864996190660033813952720050090087379095,377679421777774162452864996190660033813952720050171490951965⟩⟩, + ⟨⟨-1395713206225663189454101143002566310611963759676580053920452,-1395713206225663189454101143002566310611963759676451081364249⟩,⟨-507998062638387039136909131110969358880879790394149817021521,-507998062638387039136909131110969358880879790394031831925370⟩⟩, + ⟨⟨-978663224926882768659580888799522481530988635632628112730439,-978663224926882768659580888799522481530988635632437907299397⟩,⟨-1695094429072569102122468916644420780784284438590602446537808,-1695094429072569102122468916644420780784284438590402624729496⟩⟩] +lemma tw0_0_2_2_calc (j : Fin 31) : taylorWaveBox 0 0 2 2 j = tw0_0_2_2 j := by + revert j + decide +kernel +def tw0_0_2_3 : Fin 31 → CI := ![⟨⟨887549367585894654647575190685819342845674226129441129965286,887549367585894654647575190685819342845674226129548581576720⟩,⟨512426866294798386834526424192888519295985354623544225871564,512426866294798386834526424192888519295985354623645448307630⟩⟩, + ⟨⟨248254686030182897398539149181012699002035058452258461833670,248254686030182897398539149181012699002035058452316910450176⟩,⟨682074144141724374118783345292933523373384203192150695967045,682074144141724374118783345292933523373384203192215894959691⟩⟩, + ⟨⟨-171385485103313906638223278092583722650091113371542697182144,-171385485103313906638223278092583722650091113371505211874330⟩,⟨470877750343631500341534451091526534133608654421936298081014,470877750343631500341534451091526534133608654421978656553067⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418128138225409,-290832176770545960434917438483929282263670530418099264672854⟩,⟨167912035547479535397937618679525710002908481003044622341384,167912035547479535397937618679525710002908481003071624899392⟩⟩, + ⟨⟨-214052584862254884408232017727498466897016276635639716565913,-214052584862254884408232017727498466897016276635622695748461⟩,⟨-37743246001603878613808369239580034605654635355103108630396,-37743246001603878613808369239580034605654635355088916971180⟩⟩, + ⟨⟨-86750720138218229408678577021096749100527899247736797706411,-86750720138218229408678577021096749100527899247729298469271⟩,⟨-103385482384856453208659121583295522468139603012000477926404,-103385482384856453208659121583295522468139603011992766005663⟩⟩, + ⟨⟨-909990948,1171693750⟩,⟨-79692626246167045120505549490478022520911642351062766344784,-79692626246167045120505549490478022520911642351059416312548⟩⟩, + ⟨⟨28426475974891349412635796118272982745260982025496335062793,28426475974891349412635796118272982745260982025498217832098⟩,⟨-33877354867869762587413420960414276802359985114971953959928,-33877354867869762587413420960414276802359985114969965512036⟩⟩, + ⟨⟨22338152472073553360420956851842377465139319603200030736237,22338152472073553360420956851842377465139319603201118775815⟩,⟨-3938818980006062600432640975899694144198033271529833073360,-3938818980006062600432640975899694144198033271529034900460⟩⟩, + ⟨⟨9088505524079561263591169952622790070739704075565823801376,9088505524079561263591169952622790070739704075566248076249⟩,⟨5247251110858735481185550583735178437590890031345416460703,5247251110858735481185550583735178437590890031345775957145⟩⟩, + ⟨⟨1442471689333911380619747057012451442072796226392604624719,1442471689333911380619747057012451442072796226392702535172⟩,⟨3963158394647484435654039154147857404172788189027516014607,3963158394647484435654039154147857404172788189027652681862⟩⟩, + ⟨⟨-472669123160936081201478715641840088538413867464359271311,-472669123160936081201478715641840088538413867464334443487⟩,⟨1298647742758087699875115550031169914199339233780538828907,1298647742758087699875115550031169914199339233780577297347⟩⟩, + ⟨⟨-284015797627486289487224061019462189710615752361442702412,-284015797627486289487224061019462189710615752361435082248⟩,⟨163976597214335483787048455741724326174715313479546482592,163976597214335483787048455741724326174715313479552347784⟩⟩, + ⟨⟨-42531140543009085948323354510558462478994361117535901897,-42531140543009085948323354510558462478994361117534983477⟩,⟨-7499387598036175594326442031819492628924678091803773058,-7499387598036175594326442031819492628924678091803421716⟩⟩, + ⟨⟨-867507201382182294086785770210967491005278992477340697,-867507201382182294086785770210967491005278992477323660⟩,⟨-1033854823848564532086591215832955224681396030119974034,-1033854823848564532086591215832955224681396030119955557⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-867507201382182294086785770210967491005278992477340697,-867507201382182294086785770210967491005278992477323660⟩,⟨1033854823848564532086591215832955224681396030119955557,1033854823848564532086591215832955224681396030119974034⟩⟩, + ⟨⟨-42531140543009085948323354510558462478994361117535901897,-42531140543009085948323354510558462478994361117534983477⟩,⟨7499387598036175594326442031819492628924678091803421716,7499387598036175594326442031819492628924678091803773058⟩⟩, + ⟨⟨-284015797627486289487224061019462189710615752361442702411,-284015797627486289487224061019462189710615752361435082248⟩,⟨-163976597214335483787048455741724326174715313479552347785,-163976597214335483787048455741724326174715313479546482593⟩⟩, + ⟨⟨-472669123160936081201478715641840088538413867464359271304,-472669123160936081201478715641840088538413867464334443481⟩,⟨-1298647742758087699875115550031169914199339233780577297349,-1298647742758087699875115550031169914199339233780538828910⟩⟩, + ⟨⟨1442471689333911380619747057012451442072796226392604624745,1442471689333911380619747057012451442072796226392702535191⟩,⟨-3963158394647484435654039154147857404172788189027652681850,-3963158394647484435654039154147857404172788189027516014602⟩⟩, + ⟨⟨9088505524079561263591169952622790070739704075565823801405,9088505524079561263591169952622790070739704075566248076275⟩,⟨-5247251110858735481185550583735178437590890031345775957098,-5247251110858735481185550583735178437590890031345416460658⟩⟩, + ⟨⟨22338152472073553360420956851842377465139319603200030736183,22338152472073553360420956851842377465139319603201118775826⟩,⟨3938818980006062600432640975899694144198033271529034900554,3938818980006062600432640975899694144198033271529833073519⟩⟩, + ⟨⟨28426475974891349412635796118272982745260982025496335062522,28426475974891349412635796118272982745260982025498217831947⟩,⟨33877354867869762587413420960414276802359985114969965512146,33877354867869762587413420960414276802359985114971953960162⟩⟩, + ⟨⟨-909991362,1171693338⟩,⟨79692626246167045120505549490478022520911642351059416312537,79692626246167045120505549490478022520911642351062766344775⟩⟩, + ⟨⟨-86750720138218229408678577021096749100527899247736797706562,-86750720138218229408678577021096749100527899247729298470151⟩,⟨103385482384856453208659121583295522468139603011992766005565,103385482384856453208659121583295522468139603012000477925580⟩⟩, + ⟨⟨-214052584862254884408232017727498466897016276635639716565642,-214052584862254884408232017727498466897016276635622695749078⟩,⟨37743246001603878613808369239580034605654635355088916970524,37743246001603878613808369239580034605654635355103108628855⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418128138225461,-290832176770545960434917438483929282263670530418099264670917⟩,⟨-167912035547479535397937618679525710002908481003071624901579,-167912035547479535397937618679525710002908481003044622341584⟩⟩, + ⟨⟨-171385485103313906638223278092583722650091113371542697179296,-171385485103313906638223278092583722650091113371505211872744⟩,⟨-470877750343631500341534451091526534133608654421978656553210,-470877750343631500341534451091526534133608654421936298082424⟩⟩, + ⟨⟨248254686030182897398539149181012699002035058452258461837925,248254686030182897398539149181012699002035058452316910452229⟩,⟨-682074144141724374118783345292933523373384203192215894957526,-682074144141724374118783345292933523373384203192150695967078⟩⟩, + ⟨⟨887549367585894654647575190685819342845674226129441129967988,887549367585894654647575190685819342845674226129548581579545⟩,⟨-512426866294798386834526424192888519295985354623645448303230,-512426866294798386834526424192888519295985354623544225867044⟩⟩] +lemma tw0_0_2_3_calc (j : Fin 31) : taylorWaveBox 0 0 2 3 j = tw0_0_2_3 j := by + revert j + decide +kernel +def tw0_0_2_4 : Fin 31 → CI := ![⟨⟨223588399813024700714287950446248739589886525793170782121285,223588399813024700714287950446248739589886525793215660444925⟩,⟨-387266468459182445732882002369812590770516277905922386072765,-387266468459182445732882002369812590770516277905874268755156⟩⟩, + ⟨⟨277770256353227944810982144862129070643606075550420090468774,277770256353227944810982144862129070643606075550447526504412⟩,⟨-101100105277067459882507446306331266675977860424343775483513,-101100105277067459882507446306331266675977860424319650853185⟩⟩, + ⟨⟨178064620887404990568496108612778842858868540893017713019318,178064620887404990568496108612778842858868540893034297870686⟩,⟨64810221778911304623289653492382069090712896584445654187545,64810221778911304623289653492382069090712896584460035729144⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417525537609401,58612357480585547144046300481781429591051213417535149849204⟩,⟨101519581107763923054200619629232151794946219155358898898471,101519581107763923054200619629232151794946219155369300816512⟩⟩, + ⟨⟨-12076971740499832482843018651307032609200165693938421417287,-12076971740499832482843018651307032609200165693933841970131⟩,⟨68491910267933546482150237992760199140394357322917711749841,68491910267933546482150237992760199140394357322923376036972⟩⟩, + ⟨⟨-30073617772972408363495262166959160357691634006952479399928,-30073617772972408363495262166959160357691634006950140365819⟩,⟨25234761581467640943542531087798344624965042612985180355402,25234761581467640943542531087798344624965042612987442119802⟩⟩, + ⟨⟨-20863480763352960873051637232040362388611491494814818696900,-20863480763352960873051637232040362388611491494813875249989⟩,⟨-306748707,238235074⟩⟩, + ⟨⟨-7883618457478079018040102005495342132806715705118466368027,-7883618457478079018040102005495342132806715705117978540853⟩,⟨-6615141340012253267504013269479809253366836130738939060607,-6615141340012253267504013269479809253366836130738479863645⟩⟩, + ⟨⟨-802029198146755766114741914790188471884281881191791713099,-802029198146755766114741914790188471884281881191626634800⟩,⟨-4548533610252265550031014088484813488594666367505546127119,-4548533610252265550031014088484813488594666367505310100167⟩⟩, + ⟨⟨915818085634149174125723445027834837360175209648884000290,915818085634149174125723445027834837360175209648949659396⟩,⟨-1586243454808811297721884681706752371796034674302600602366,-1586243454808811297721884681706752371796034674302521503261⟩⟩, + ⟨⟨576418023038761835745469045299838758830071989890936695472,576418023038761835745469045299838758830071989890958407715⟩,⟨-209799002880679375284769054631842658274315186105790087319,-209799002880679375284769054631842658274315186105775179009⟩⟩, + ⟨⟨151104526231473182669660237411080931594750391717969986167,151104526231473182669660237411080931594750391717974943155⟩,⟨54997549811152814154650499057409761810662080146512998739,54997549811152814154650499057409761810662080146516062651⟩⟩, + ⟨⟨14309657588033580845714428828559919333752737650764006078,14309657588033580845714428828559919333752737650764563463⟩,⟨24785053981387676526904448151668005809313041785977168007,24785053981387676526904448151668005809313041785977911886⟩⟩, + ⟨⟨-436296684896534343949744430862753293275710294148451319,-436296684896534343949744430862753293275710294148429489⟩,⟨2474361457013191741553136037391121584289357729520384436,2474361457013191741553136037391121584289357729520445745⟩⟩, + ⟨⟨-30073617772972408363495262166959160357691634006951586,-30073617772972408363495262166959160357691634006950951⟩,⟨25234761581467640943542531087798344624965042612986072,25234761581467640943542531087798344624965042612986649⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-30073617772972408363495262166959160357691634006951586,-30073617772972408363495262166959160357691634006950951⟩,⟨-25234761581467640943542531087798344624965042612986649,-25234761581467640943542531087798344624965042612986072⟩⟩, + ⟨⟨-436296684896534343949744430862753293275710294148451319,-436296684896534343949744430862753293275710294148429489⟩,⟨-2474361457013191741553136037391121584289357729520445745,-2474361457013191741553136037391121584289357729520384436⟩⟩, + ⟨⟨14309657588033580845714428828559919333752737650764006078,14309657588033580845714428828559919333752737650764563463⟩,⟨-24785053981387676526904448151668005809313041785977911885,-24785053981387676526904448151668005809313041785977168007⟩⟩, + ⟨⟨151104526231473182669660237411080931594750391717969986168,151104526231473182669660237411080931594750391717974943155⟩,⟨-54997549811152814154650499057409761810662080146516062650,-54997549811152814154650499057409761810662080146512998738⟩⟩, + ⟨⟨576418023038761835745469045299838758830071989890936695471,576418023038761835745469045299838758830071989890958407713⟩,⟨209799002880679375284769054631842658274315186105775179013,209799002880679375284769054631842658274315186105790087322⟩⟩, + ⟨⟨915818085634149174125723445027834837360175209648884000282,915818085634149174125723445027834837360175209648949659388⟩,⟨1586243454808811297721884681706752371796034674302521503266,1586243454808811297721884681706752371796034674302600602371⟩⟩, + ⟨⟨-802029198146755766114741914790188471884281881191791713131,-802029198146755766114741914790188471884281881191626634819⟩,⟨4548533610252265550031014088484813488594666367505310100156,4548533610252265550031014088484813488594666367505546127121⟩⟩, + ⟨⟨-7883618457478079018040102005495342132806715705118466368082,-7883618457478079018040102005495342132806715705117978540879⟩,⟨6615141340012253267504013269479809253366836130738479863581,6615141340012253267504013269479809253366836130738939060571⟩⟩, + ⟨⟨-20863480763352960873051637232040362388611491494814818696898,-20863480763352960873051637232040362388611491494813875249986⟩,⟨-238235182,306748599⟩⟩, + ⟨⟨-30073617772972408363495262166959160357691634006952479399688,-30073617772972408363495262166959160357691634006950140365790⟩,⟨-25234761581467640943542531087798344624965042612987442119846,-25234761581467640943542531087798344624965042612985180355658⟩⟩, + ⟨⟨-12076971740499832482843018651307032609200165693938421416794,-12076971740499832482843018651307032609200165693933841969921⟩,⟨-68491910267933546482150237992760199140394357322923376036886,-68491910267933546482150237992760199140394357322917711750038⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417525537609470,58612357480585547144046300481781429591051213417535149849968⟩,⟨-101519581107763923054200619629232151794946219155369300816530,-101519581107763923054200619629232151794946219155358898897795⟩⟩, + ⟨⟨178064620887404990568496108612778842858868540893017713019852,178064620887404990568496108612778842858868540893034297870741⟩,⟨-64810221778911304623289653492382069090712896584460035728067,-64810221778911304623289653492382069090712896584445654186945⟩⟩, + ⟨⟨277770256353227944810982144862129070643606075550420090468788,277770256353227944810982144862129070643606075550447526503530⟩,⟨101100105277067459882507446306331266675977860424319650854918,101100105277067459882507446306331266675977860424343775484349⟩⟩, + ⟨⟨223588399813024700714287950446248739589886525793170782119313,223588399813024700714287950446248739589886525793215660443005⟩,⟨387266468459182445732882002369812590770516277905874268756335,387266468459182445732882002369812590770516277905922386073998⟩⟩] +lemma tw0_0_2_4_calc (j : Fin 31) : taylorWaveBox 0 0 2 4 j = tw0_0_2_4 j := by + revert j + decide +kernel +def tw0_0_2_5 : Fin 31 → CI := ![⟨⟨-144837320511075112676372101650136743142432507120807001780551,-144837320511075112676372101650136743142432507120788544914336⟩,⟨-83621865985773321414277976643829980057853009589719587876650,-83621865985773321414277976643829980057853009589702537246190⟩⟩, + ⟨⟨-35290594223954424428059270621955319340710653798783467831888,-35290594223954424428059270621955319340710653798774934413835⟩,⟨-96960110749450500366182214723208116733610599941042460451042,-96960110749450500366182214723208116733610599941032574834312⟩⟩, + ⟨⟨21007104095523719697708677055544647570874897128678997636130,21007104095523719697708677055544647570874897128683726029936⟩,⟨-57716544150584136382430574792930465601418099162899221942237,-57716544150584136382430574792930465601418099162893662534184⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717338011114747,30374587638444219469947910571978757115463861717341220046663⟩,⟨-17536776349579649255059588727456133033828655476709489704825,-17536776349579649255059588727456133033828655476706557908108⟩⟩, + ⟨⟨18785003995307816853537455158624029863244167212426066789050,18785003995307816853537455158624029863244167212427680105093⟩,⟨3312303037089078873367441178314067019704308452893985676846,3312303037089078873367441178314067019704308452895252207005⟩⟩, + ⟨⟨6291852507891166150828706323576707156788763824588438991168,6291852507891166150828706323576707156788763824589022950695⟩,⟨7498337830352187024212823405661464530048937585212186034208,7498337830352187024212823405661464530048937585212793099967⟩⟩, + ⟨⟨-68834249,53459826⟩,⟨4681754135318688100685463933953437859495028018500935705028,4681754135318688100685463933953437859495028018501162316507⟩⟩, + ⟨⟨-1319497107062897487554272312390153856727386963226443694489,-1319497107062897487554272312390153856727386963226347900125⟩,⟨1572515417759874972220197103082975166212118955470298803704,1572515417759874972220197103082975166212118955470401114209⟩⟩, + ⟨⟨-793868876365265405379405580917759146551630875442315336624,-793868876365265405379405580917759146551630875442271615186⟩,⟨139980502047908918262668429928197463634323591465475275743,139980502047908918262668429928197463634323591465504532914⟩⟩, + ⟨⟨-237301465925345464608968051343584039964561419666721591086,-237301465925345464608968051343584039964561419666709002533⟩,⟨-137006065231091009805153036933251039326786370911787344605,-137006065231091009805153036933251039326786370911777085921⟩⟩, + ⟨⟨-26154881197635166443590856417601480389960472502932260676,-26154881197635166443590856417601480389960472502930318857⟩,⟨-71859945499020887694881914989284808517638576177049443882,-71859945499020887694881914989284808517638576177046508357⟩⟩, + ⟨⟨5485076141338298457750945171788577980276638483046599247,5485076141338298457750945171788577980276638483046922281⟩,⟨-15070122842316265267109699778360861475238277530685113888,-15070122842316265267109699778360861475238277530684571542⟩⟩, + ⟨⟨1853917702541761442257562901121750312223136091146184242,1853917702541761442257562901121750312223136091146245786⟩,⟨-1070359884617898514102758101041023744740518522748318063,-1070359884617898514102758101041023744740518522748272963⟩⟩, + ⟨⟨123387869455212383431786700096380117077807415103536931,123387869455212383431786700096380117077807415103540382⟩,⟨21756610477087828489370389925977484290672642117755111,21756610477087828489370389925977484290672642117756270⟩⟩, + ⟨⟨629185250789116615082870632357670715678876382458866,629185250789116615082870632357670715678876382458883⟩,⟨749833783035218702421282340566146453004893758521238,749833783035218702421282340566146453004893758521258⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨629185250789116615082870632357670715678876382458866,629185250789116615082870632357670715678876382458883⟩,⟨-749833783035218702421282340566146453004893758521258,-749833783035218702421282340566146453004893758521238⟩⟩, + ⟨⟨123387869455212383431786700096380117077807415103536931,123387869455212383431786700096380117077807415103540382⟩,⟨-21756610477087828489370389925977484290672642117756270,-21756610477087828489370389925977484290672642117755111⟩⟩, + ⟨⟨1853917702541761442257562901121750312223136091146184242,1853917702541761442257562901121750312223136091146245786⟩,⟨1070359884617898514102758101041023744740518522748272963,1070359884617898514102758101041023744740518522748318063⟩⟩, + ⟨⟨5485076141338298457750945171788577980276638483046599247,5485076141338298457750945171788577980276638483046922281⟩,⟨15070122842316265267109699778360861475238277530684571542,15070122842316265267109699778360861475238277530685113888⟩⟩, + ⟨⟨-26154881197635166443590856417601480389960472502932260676,-26154881197635166443590856417601480389960472502930318857⟩,⟨71859945499020887694881914989284808517638576177046508357,71859945499020887694881914989284808517638576177049443882⟩⟩, + ⟨⟨-237301465925345464608968051343584039964561419666721591087,-237301465925345464608968051343584039964561419666709002533⟩,⟨137006065231091009805153036933251039326786370911777085920,137006065231091009805153036933251039326786370911787344604⟩⟩, + ⟨⟨-793868876365265405379405580917759146551630875442315336624,-793868876365265405379405580917759146551630875442271615184⟩,⟨-139980502047908918262668429928197463634323591465504532920,-139980502047908918262668429928197463634323591465475275747⟩⟩, + ⟨⟨-1319497107062897487554272312390153856727386963226443694482,-1319497107062897487554272312390153856727386963226347900112⟩,⟨-1572515417759874972220197103082975166212118955470401114220,-1572515417759874972220197103082975166212118955470298803709⟩⟩, + ⟨⟨-68834225,53459850⟩,⟨-4681754135318688100685463933953437859495028018501162316506,-4681754135318688100685463933953437859495028018500935705027⟩⟩, + ⟨⟨6291852507891166150828706323576707156788763824588438991232,6291852507891166150828706323576707156788763824589022950706⟩,⟨-7498337830352187024212823405661464530048937585212793099907,-7498337830352187024212823405661464530048937585212186034201⟩⟩, + ⟨⟨18785003995307816853537455158624029863244167212426066789104,18785003995307816853537455158624029863244167212427680105069⟩,⟨-3312303037089078873367441178314067019704308452895252206870,-3312303037089078873367441178314067019704308452893985676789⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717338011114545,30374587638444219469947910571978757115463861717341220046669⟩,⟨17536776349579649255059588727456133033828655476706557908128,17536776349579649255059588727456133033828655476709489705054⟩⟩, + ⟨⟨21007104095523719697708677055544647570874897128678997635935,21007104095523719697708677055544647570874897128683726029587⟩,⟨57716544150584136382430574792930465601418099162893662534357,57716544150584136382430574792930465601418099162899221942254⟩⟩, + ⟨⟨-35290594223954424428059270621955319340710653798783467832180,-35290594223954424428059270621955319340710653798774934414440⟩,⟨96960110749450500366182214723208116733610599941032574834316,96960110749450500366182214723208116733610599941042460450734⟩⟩, + ⟨⟨-144837320511075112676372101650136743142432507120807001781012,-144837320511075112676372101650136743142432507120788544914777⟩,⟨83621865985773321414277976643829980057853009589702537245452,83621865985773321414277976643829980057853009589719587875932⟩⟩] +lemma tw0_0_2_5_calc (j : Fin 31) : taylorWaveBox 0 0 2 5 j = tw0_0_2_5 j := by + revert j + decide +kernel +def tw0_0_2_6 : Fin 31 → CI := ![⟨⟨-27365191652122466690056424259448641919058449328571371170966,-27365191652122466690056424259448641919058449328565704259085⟩,⟨47397902300335817857262145290753400473401218593746528948229,47397902300335817857262145290753400473401218593752719815783⟩⟩, + ⟨⟨-29614780574334514363990385904440228112336651204818996298873,-29614780574334514363990385904440228112336651204815882642288⟩,⟨10778898623382712107118931678392710153590329684114798617010,10778898623382712107118931678392710153590329684117439311536⟩⟩, + ⟨⟨-16369335584880965194881302826856892194951231215819781207989,-16369335584880965194881302826856892194951231215818152365681⟩,⟨-5957950907611207550569852830488143675956532077612091001830,-5957950907611207550569852830488143675956532077610730988928⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210104845188137,-4591117312290554821118816819884099063826981210104063031570⟩,⟨-7952048448396308887279441801663526024767544990105992301213,-7952048448396308887279441801663526024767544990105126892645⟩⟩, + ⟨⟨794895665038918867578846968060871712581009506201408231444,794895665038918867578846968060871712581009506201714707095⟩,⟨-4508077333628149129556670271429787375478153515880512172628,-4508077333628149129556670271429787375478153515880110654915⟩⟩, + ⟨⟨1635883544581170840958285178320235001872764448113310469210,1635883544581170840958285178320235001872764448113448117593⟩,⟨-1372669278907041956222513126019644249886578943328595666148,-1372669278907041956222513126019644249886578943328463896599⟩⟩, + ⟨⟨919260274839426580241716221779161802910425528549031393070,919260274839426580241716221779161802910425528549078814227⟩,⟨-10496813,13515574⟩⟩, + ⟨⟨274455715782839327316587974262770997971797736631179447598,274455715782839327316587974262770997971797736631198177770⟩,⟨230295689887876868206076467780667918235051104332737206169,230295689887876868206076467780667918235051104332754658495⟩⟩, + ⟨⟨21377305681643414283065811396562950473503900136331166241,21377305681643414283065811396562950473503900136335702335⟩,⟨121236725064714662931168325782633235951366227119368071204,121236725064714662931168325782633235951366227119375134090⟩⟩, + ⟨⟨-17934052001134979769995378202672261968074145351971325846,-17934052001134979769995378202672261968074145351969925901⟩,⟨31062689251548081590935319537748148534248222617598909925,31062689251548081590935319537748148534248222617600656639⟩⟩, + ⟨⟨-7838704057884963522479017823751881858637054682754104986,-7838704057884963522479017823751881858637054682753759818⟩,⟨2853054952291821248499170796718628332033262166200611100,2853054952291821248499170796718628332033262166200832003⟩⟩, + ⟨⟨-1315116311392125361687513374969352523488353320163766959,-1315116311392125361687513374969352523488353320163715444⟩,⟨-478663191944695801194602642774405187502417585469791065,-478663191944695801194602642774405187502417585469761350⟩⟩, + ⟨⟨-70054890629433514726544446104188523312789630281136646,-70054890629433514726544446104188523312789630281133470⟩,⟨-121338629888859693714591091944328705211907119600001476,-121338629888859693714591091944328705211907119599997061⟩⟩, + ⟨⟨949311217247692341238639064474231690082103169719346,949311217247692341238639064474231690082103169719400⟩,⟨-5383811447535995381346050175947809543390960788162437,-5383811447535995381346050175947809543390960788162269⟩⟩, + ⟨⟨16358835445811708409582851783202350018727644481133,16358835445811708409582851783202350018727644481134⟩,⟨-13726692789070419562225131260196442498865789433286,-13726692789070419562225131260196442498865789433285⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨16358835445811708409582851783202350018727644481133,16358835445811708409582851783202350018727644481134⟩,⟨13726692789070419562225131260196442498865789433285,13726692789070419562225131260196442498865789433286⟩⟩, + ⟨⟨949311217247692341238639064474231690082103169719346,949311217247692341238639064474231690082103169719400⟩,⟨5383811447535995381346050175947809543390960788162269,5383811447535995381346050175947809543390960788162437⟩⟩, + ⟨⟨-70054890629433514726544446104188523312789630281136646,-70054890629433514726544446104188523312789630281133470⟩,⟨121338629888859693714591091944328705211907119599997061,121338629888859693714591091944328705211907119600001476⟩⟩, + ⟨⟨-1315116311392125361687513374969352523488353320163766959,-1315116311392125361687513374969352523488353320163715444⟩,⟨478663191944695801194602642774405187502417585469761350,478663191944695801194602642774405187502417585469791065⟩⟩, + ⟨⟨-7838704057884963522479017823751881858637054682754104986,-7838704057884963522479017823751881858637054682753759818⟩,⟨-2853054952291821248499170796718628332033262166200832003,-2853054952291821248499170796718628332033262166200611100⟩⟩, + ⟨⟨-17934052001134979769995378202672261968074145351971325846,-17934052001134979769995378202672261968074145351969925901⟩,⟨-31062689251548081590935319537748148534248222617600656639,-31062689251548081590935319537748148534248222617598909925⟩⟩, + ⟨⟨21377305681643414283065811396562950473503900136331166242,21377305681643414283065811396562950473503900136335702336⟩,⟨-121236725064714662931168325782633235951366227119375134090,-121236725064714662931168325782633235951366227119368071204⟩⟩, + ⟨⟨274455715782839327316587974262770997971797736631179447599,274455715782839327316587974262770997971797736631198177772⟩,⟨-230295689887876868206076467780667918235051104332754658493,-230295689887876868206076467780667918235051104332737206167⟩⟩, + ⟨⟨919260274839426580241716221779161802910425528549031393070,919260274839426580241716221779161802910425528549078814227⟩,⟨-13515569,10496817⟩⟩, + ⟨⟨1635883544581170840958285178320235001872764448113310469208,1635883544581170840958285178320235001872764448113448117580⟩,⟨1372669278907041956222513126019644249886578943328463896613,1372669278907041956222513126019644249886578943328595666150⟩⟩, + ⟨⟨794895665038918867578846968060871712581009506201408231431,794895665038918867578846968060871712581009506201714707063⟩,⟨4508077333628149129556670271429787375478153515880110654928,4508077333628149129556670271429787375478153515880512172623⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210104845188197,-4591117312290554821118816819884099063826981210104063031576⟩,⟨7952048448396308887279441801663526024767544990105126892592,7952048448396308887279441801663526024767544990105992301215⟩⟩, + ⟨⟨-16369335584880965194881302826856892194951231215819781207994,-16369335584880965194881302826856892194951231215818152365730⟩,⟨5957950907611207550569852830488143675956532077610730988873,5957950907611207550569852830488143675956532077612091001731⟩⟩, + ⟨⟨-29614780574334514363990385904440228112336651204818996298779,-29614780574334514363990385904440228112336651204815882642290⟩,⟨-10778898623382712107118931678392710153590329684117439311626,-10778898623382712107118931678392710153590329684114798617195⟩⟩, + ⟨⟨-27365191652122466690056424259448641919058449328571371170731,-27365191652122466690056424259448641919058449328565704258843⟩,⟨-47397902300335817857262145290753400473401218593752719815934,-47397902300335817857262145290753400473401218593746528948373⟩⟩] +lemma tw0_0_2_6_calc (j : Fin 31) : taylorWaveBox 0 0 2 6 j = tw0_0_2_6 j := by + revert j + decide +kernel +def tw0_0_2_7 : Fin 31 → CI := ![⟨⟨13787490894657571028441851363188980505116571387317699101857,13787490894657571028441851363188980505116571387319543839178⟩,⟨7960211579480062797719879135244471042925264892917740518952,7960211579480062797719879135244471042925264892919414294939⟩⟩, + ⟨⟨2926424211148862311402355829685539518980786934041054313639,2926424211148862311402355829685539518980786934041780565844⟩,⟨8040284439876804891613919694486032124969772218917032400780,8040284439876804891613919694486032124969772218917903338055⟩⟩, + ⟨⟨-1502017977922223071373381831195373310674871014371389506269,-1502017977922223071373381831195373310674871014371041861709⟩,⟨4126760477956199262743179719342214293613392126737395035315,4126760477956199262743179719342214293613392126737818807421⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755822288717,-1850525702701626521436088670080927798033038586755615008591⟩,⟨1068401512597105450007285757967117627943219527725592924668,1068401512597105450007285757967117627943219527725778341594⟩⟩, + ⟨⟨-961654129410798909640035894019499653736337499121254479845,-961654129410798909640035894019499653736337499121165767840⟩,⟨-169565569124833618405506587568554150229123284527519306604,-169565569124833618405506587568554150229123284527453390080⟩⟩, + ⟨⟨-266195538421158144381244481825870199374264745107030898431,-266195538421158144381244481825870199374264745107004497631⟩,⟨-317239489245965267259176357871969973225236965958170084697,-317239489245965267259176357871969973225236965958142381364⟩⟩, + ⟨⟨-1832040,2358913⟩,⟨-160441184787359821872660870163473329702807540620615584870,-160441184787359821872660870163473329702807540620606797616⟩⟩, + ⟨⟨35728160370624553267546600163205589782920835758761761468,35728160370624553267546600163205589782920835758764582755⟩,⟨-42579163478473891338439437904890724690512137832518476009,-42579163478473891338439437904890724690512137832515434668⟩⟩, + ⟨⟨16457622430000937945167724220374377831570074918552970157,16457622430000937945167724220374377831570074918553981316⟩,⟨-2901922872721975823306667014036198878749851358925660843,-2901922872721975823306667014036198878749851358925035840⟩⟩, + ⟨⟨3614308013089114299679860683751812105533278489757148761,3614308013089114299679860683751812105533278489757363506⟩,⟨2086721704291221582045479996029526617076600640089156854,2086721704291221582045479996029526617076600640089326388⟩⟩, + ⟨⟨276640014765677890928961667359369035007425375981832869,276640014765677890928961667359369035007425375981855170⟩,⟨760062193886293295464299980711617728171811217998004766,760062193886293295464299980711617728171811217998040655⟩⟩, + ⟨⟨-37129994255735738900317044392066271392249097093830253,-37129994255735738900317044392066271392249097093827829⟩,⟨102013820802113776458851048521557154679742095324605095,102013820802113776458851048521557154679742095324609417⟩⟩, + ⟨⟨-7059195338064676366562227897952758018619684550307288,-7059195338064676366562227897952758018619684550307007⟩,⟨4075628328693792152432578117245169173977735625174189,4075628328693792152432578117245169173977735625174388⟩⟩, + ⟨⟨-208811635702366834962878902023099978392610067256182,-208811635702366834962878902023099978392610067256174⟩,⟨-36819125260194252809495158913217691442549953360300,-36819125260194252809495158913217691442549953360296⟩⟩, + ⟨⟨-266195538421158144381244481825870199374264745108,-266195538421158144381244481825870199374264745107⟩,⟨-317239489245965267259176357871969973225236965959,-317239489245965267259176357871969973225236965958⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-266195538421158144381244481825870199374264745108,-266195538421158144381244481825870199374264745107⟩,⟨317239489245965267259176357871969973225236965958,317239489245965267259176357871969973225236965959⟩⟩, + ⟨⟨-208811635702366834962878902023099978392610067256182,-208811635702366834962878902023099978392610067256174⟩,⟨36819125260194252809495158913217691442549953360296,36819125260194252809495158913217691442549953360300⟩⟩, + ⟨⟨-7059195338064676366562227897952758018619684550307288,-7059195338064676366562227897952758018619684550307007⟩,⟨-4075628328693792152432578117245169173977735625174388,-4075628328693792152432578117245169173977735625174189⟩⟩, + ⟨⟨-37129994255735738900317044392066271392249097093830253,-37129994255735738900317044392066271392249097093827829⟩,⟨-102013820802113776458851048521557154679742095324609417,-102013820802113776458851048521557154679742095324605095⟩⟩, + ⟨⟨276640014765677890928961667359369035007425375981832869,276640014765677890928961667359369035007425375981855170⟩,⟨-760062193886293295464299980711617728171811217998040655,-760062193886293295464299980711617728171811217998004766⟩⟩, + ⟨⟨3614308013089114299679860683751812105533278489757148761,3614308013089114299679860683751812105533278489757363506⟩,⟨-2086721704291221582045479996029526617076600640089326388,-2086721704291221582045479996029526617076600640089156854⟩⟩, + ⟨⟨16457622430000937945167724220374377831570074918552970157,16457622430000937945167724220374377831570074918553981316⟩,⟨2901922872721975823306667014036198878749851358925035840,2901922872721975823306667014036198878749851358925660843⟩⟩, + ⟨⟨35728160370624553267546600163205589782920835758761761467,35728160370624553267546600163205589782920835758764582755⟩,⟨42579163478473891338439437904890724690512137832515434668,42579163478473891338439437904890724690512137832518476009⟩⟩, + ⟨⟨-1832041,2358912⟩,⟨160441184787359821872660870163473329702807540620606797616,160441184787359821872660870163473329702807540620615584870⟩⟩, + ⟨⟨-266195538421158144381244481825870199374264745107030898431,-266195538421158144381244481825870199374264745107004497634⟩,⟨317239489245965267259176357871969973225236965958142381363,317239489245965267259176357871969973225236965958170084694⟩⟩, + ⟨⟨-961654129410798909640035894019499653736337499121254479844,-961654129410798909640035894019499653736337499121165767843⟩,⟨169565569124833618405506587568554150229123284527453390077,169565569124833618405506587568554150229123284527519306597⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755822288717,-1850525702701626521436088670080927798033038586755615008579⟩,⟨-1068401512597105450007285757967117627943219527725778341608,-1068401512597105450007285757967117627943219527725592924669⟩⟩, + ⟨⟨-1502017977922223071373381831195373310674871014371389506244,-1502017977922223071373381831195373310674871014371041861695⟩,⟨-4126760477956199262743179719342214293613392126737818807422,-4126760477956199262743179719342214293613392126737395035328⟩⟩, + ⟨⟨2926424211148862311402355829685539518980786934041054313689,2926424211148862311402355829685539518980786934041780565869⟩,⟨-8040284439876804891613919694486032124969772218917903338029,-8040284439876804891613919694486032124969772218917032400780⟩⟩, + ⟨⟨13787490894657571028441851363188980505116571387317699101899,13787490894657571028441851363188980505116571387319543839222⟩,⟨-7960211579480062797719879135244471042925264892919414294871,-7960211579480062797719879135244471042925264892917740518882⟩⟩] +lemma tw0_0_2_7_calc (j : Fin 31) : taylorWaveBox 0 0 2 7 j = tw0_0_2_7 j := by + revert j + decide +kernel +def tw0_0_2_8 : Fin 31 → CI := ![⟨⟨2083978518259580817633731437832825154045307399303547154704,2083978518259580817633731437832825154045307399303991981743⟩,⟨-3609556675507699249901072619402663681142043526992280073830,-3609556675507699249901072619402663681142043526991785633152⟩⟩, + ⟨⟨1964612107818056345488349447672208731165090283567309937456,1964612107818056345488349447672208731165090283567529001134⟩,⟨-715060329124755579732605471270316777975218518043859432130,-715060329124755579732605471270316777975218518043679699131⟩⟩, + ⟨⟨936332251159637185121047205616407356776827006269465986749,936332251159637185121047205616407356776827006269565118029⟩,⟨340797068805573773891446730681124183631518687921814374596,340797068805573773891446730681124183631518687921894337436⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556890904547,223765489537285961260145415798476028797768934556930450446⟩,⟨387573196859101311863220953391387389144801221975960638027,387573196859101311863220953391387389144801221976005284360⟩⟩, + ⟨⟨-32554252271710250985202560851745125646319123567382450477,-32554252271710250985202560851745125646319123567369691789⟩,⟨184624339059798866350938241577966823698746296999369707310,184624339059798866350938241577966823698746296999387326471⟩⟩, + ⟨⟨-55368736046872372180290148708267746356340878416691951855,-55368736046872372180290148708267746356340878416686940466⟩,⟨46459885995682776378275153849705835363067831599178674849,46459885995682776378275153849705835363067831599183430545⟩⟩, + ⟨⟨-25202042373060605481053021731346532868346133836081412440,-25202042373060605481053021731346532868346133836079951920⟩,⟨-370538,287777⟩⟩, + ⟨⟨-5945172763554329040007160112324665385302680875690041202,-5945172763554329040007160112324665385302680875689597626⟩,⟨-4988592273183648043379327766846376552618415573703174469,-4988592273183648043379327766846376552618415573702764663⟩⟩, + ⟨⟨-354536761375515749606152992630895337960785244083037156,-354536761375515749606152992630895337960785244082959668⟩,⟨-2010677889175104639079081757958315170584983447514065497,-2010677889175104639079081757958315170584983447513935560⟩⟩, + ⟨⟨218520985876255821543110757615699246872821225153225101,218520985876255821543110757615699246872821225153243551⟩,⟨-378489450057716124866426712296276747211719943335931990,-378489450057716124866426712296276747211719943335908296⟩⟩, + ⟨⟨66327939016236668811083930961767677458350701597051230,66327939016236668811083930961767677458350701597054574⟩,⟨-24141395502134044136221221278680879295106190921470425,-24141395502134044136221221278680879295106190921468401⟩⟩, + ⟨⟨7121908222145472638489717144797850025837316636449763,7121908222145472638489717144797850025837316636450088⟩,⟨2592162604036680444332267860327841964825115571371003,2592162604036680444332267860327841964825115571371182⟩⟩, + ⟨⟨213399400269781075725694099234081295774239477688699,213399400269781075725694099234081295774239477688711⟩,⟨369618603571988403189869836226832760948945257163976,369618603571988403189869836226832760948945257163993⟩⟩, + ⟨⟨-1285229926989207212263403171490033188967448577915,-1285229926989207212263403171490033188967448577914⟩,⟨7288901118962487047553606086561285709952672880923,7288901118962487047553606086561285709952672880924⟩⟩, + ⟨⟨-5536873604687237218029014870826774635634087842,-5536873604687237218029014870826774635634087841⟩,⟨4645988599568277637827515384970583536306783159,4645988599568277637827515384970583536306783160⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-5536873604687237218029014870826774635634087842,-5536873604687237218029014870826774635634087841⟩,⟨-4645988599568277637827515384970583536306783160,-4645988599568277637827515384970583536306783159⟩⟩, + ⟨⟨-1285229926989207212263403171490033188967448577915,-1285229926989207212263403171490033188967448577914⟩,⟨-7288901118962487047553606086561285709952672880924,-7288901118962487047553606086561285709952672880923⟩⟩, + ⟨⟨213399400269781075725694099234081295774239477688699,213399400269781075725694099234081295774239477688711⟩,⟨-369618603571988403189869836226832760948945257163993,-369618603571988403189869836226832760948945257163976⟩⟩, + ⟨⟨7121908222145472638489717144797850025837316636449763,7121908222145472638489717144797850025837316636450088⟩,⟨-2592162604036680444332267860327841964825115571371182,-2592162604036680444332267860327841964825115571371003⟩⟩, + ⟨⟨66327939016236668811083930961767677458350701597051230,66327939016236668811083930961767677458350701597054574⟩,⟨24141395502134044136221221278680879295106190921468401,24141395502134044136221221278680879295106190921470425⟩⟩, + ⟨⟨218520985876255821543110757615699246872821225153225101,218520985876255821543110757615699246872821225153243551⟩,⟨378489450057716124866426712296276747211719943335908296,378489450057716124866426712296276747211719943335931990⟩⟩, + ⟨⟨-354536761375515749606152992630895337960785244083037156,-354536761375515749606152992630895337960785244082959668⟩,⟨2010677889175104639079081757958315170584983447513935560,2010677889175104639079081757958315170584983447514065497⟩⟩, + ⟨⟨-5945172763554329040007160112324665385302680875690041202,-5945172763554329040007160112324665385302680875689597626⟩,⟨4988592273183648043379327766846376552618415573702764663,4988592273183648043379327766846376552618415573703174469⟩⟩, + ⟨⟨-25202042373060605481053021731346532868346133836081412440,-25202042373060605481053021731346532868346133836079951920⟩,⟨-287777,370537⟩⟩, + ⟨⟨-55368736046872372180290148708267746356340878416691951855,-55368736046872372180290148708267746356340878416686940466⟩,⟨-46459885995682776378275153849705835363067831599183430545,-46459885995682776378275153849705835363067831599178674850⟩⟩, + ⟨⟨-32554252271710250985202560851745125646319123567382450476,-32554252271710250985202560851745125646319123567369691788⟩,⟨-184624339059798866350938241577966823698746296999387326470,-184624339059798866350938241577966823698746296999369707311⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556890904548,223765489537285961260145415798476028797768934556930450449⟩,⟨-387573196859101311863220953391387389144801221976005284360,-387573196859101311863220953391387389144801221975960638025⟩⟩, + ⟨⟨936332251159637185121047205616407356776827006269465986752,936332251159637185121047205616407356776827006269565118029⟩,⟨-340797068805573773891446730681124183631518687921894337430,-340797068805573773891446730681124183631518687921814374593⟩⟩, + ⟨⟨1964612107818056345488349447672208731165090283567309937456,1964612107818056345488349447672208731165090283567529001128⟩,⟨715060329124755579732605471270316777975218518043679699143,715060329124755579732605471270316777975218518043859432136⟩⟩, + ⟨⟨2083978518259580817633731437832825154045307399303547154685,2083978518259580817633731437832825154045307399303991981725⟩,⟨3609556675507699249901072619402663681142043526991785633163,3609556675507699249901072619402663681142043526992280073841⟩⟩] +lemma tw0_0_2_8_calc (j : Fin 31) : taylorWaveBox 0 0 2 8 j = tw0_0_2_8 j := by + revert j + decide +kernel +def tw0_0_2_9 : Fin 31 → CI := ![⟨⟨-859072479885680691627648444315166287437481826543355895408,-859072479885680691627648444315166287437481826543235484288⟩,⟨-495985727515397112326421416469320716440501550325772791002,-495985727515397112326421416469320716440501550325665343641⟩⟩, + ⟨⟨-158838363009725480590257939154980350262354144574572708837,-158838363009725480590257939154980350262354144574532278641⟩,⟨-436404815712357093856910280486658809144220608390073427812,-436404815712357093856910280486658809144220608390023377460⟩⟩, + ⟨⟨70294911012216344368138803230360605166547805774391359929,70294911012216344368138803230360605166547805774408077315⟩,⟨-193133680708636471923911370202436046709059900371439233841,-193133680708636471923911370202436046709059900371418171646⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791951836417,73793764120052327784788221554378326426914401791960571952⟩,⟨-42604849579227958677896369208994565288944873769728699908,-42604849579227958677896369208994565288944873769721034770⟩⟩, + ⟨⟨32223025959118624056607798737238679552021987184733306360,32223025959118624056607798737238679552021987184736484054⟩,⟨5681788876661875672942235057005649473559960862292691739,5681788876661875672942235057005649473559960862294936637⟩⟩, + ⟨⟨7371618006598804374173238873306869173007594824466282943,7371618006598804374173238873306869173007594824467060977⟩,⟨8785152242596293647118650410290941472236156719530190019,8785152242596293647118650410290941472236156719531013123⟩⟩, + ⟨⟨-52913,41095⟩,⟨3598843235212085340458540018208389404888495232432007307,3598843235212085340458540018208389404888495232432227325⟩⟩, + ⟨⟨-633217165138931539595516159984977809404363714614093830,-633217165138931539595516159984977809404363714614039795⟩,⟨754638831446642786903743362877131509366087701982260131,754638831446642786903743362877131509366087701982318839⟩⟩, + ⟨⟨-223318768674624183428243121744186361765442219540815105,-223318768674624183428243121744186361765442219540799961⟩,⟨39377124215928610423532349390514361815448022009778649,39377124215928610423532349390514361815448022009787382⟩⟩, + ⟨⟨-36032111386744300676166123805848792200641797749979733,-36032111386744300676166123805848792200641797749977361⟩,⟨-20803149208607401698191586527829377582492614145374500,-20803149208607401698191586527829377582492614145372677⟩⟩, + ⟨⟨-1915212897901767442266198248614237643368607601325884,-1915212897901767442266198248614237643368607601325717⟩,⟨-5262004190433356979773597577290394847804046962135456,-5262004190433356979773597577290394847804046962135173⟩⟩, + ⟨⟨164515535227309563702617792081012559964805618415021,164515535227309563702617792081012559964805618415034⟩,⟨-452002718186524485912418701574541563324905582376398,-452002718186524485912418701574541563324905582376375⟩⟩, + ⟨⟨17593804388058740564534240139574605566719627807606,17593804388058740564534240139574605566719627807608⟩,⟨-10157787699515332860445110609291688272701471750671,-10157787699515332860445110609291688272701471750670⟩⟩, + ⟨⟨231300587960353261484736775914881594708510785371,231300587960353261484736775914881594708510785372⟩,⟨40784534311141815243933233725435641365842564278,40784534311141815243933233725435641365842564279⟩⟩, + ⟨⟨73716180065988043741732388733068691730075948,73716180065988043741732388733068691730075949⟩,⟨87851522425962936471186504102909414722361567,87851522425962936471186504102909414722361568⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨73716180065988043741732388733068691730075948,73716180065988043741732388733068691730075949⟩,⟨-87851522425962936471186504102909414722361568,-87851522425962936471186504102909414722361567⟩⟩, + ⟨⟨231300587960353261484736775914881594708510785371,231300587960353261484736775914881594708510785372⟩,⟨-40784534311141815243933233725435641365842564279,-40784534311141815243933233725435641365842564278⟩⟩, + ⟨⟨17593804388058740564534240139574605566719627807606,17593804388058740564534240139574605566719627807608⟩,⟨10157787699515332860445110609291688272701471750670,10157787699515332860445110609291688272701471750671⟩⟩, + ⟨⟨164515535227309563702617792081012559964805618415021,164515535227309563702617792081012559964805618415034⟩,⟨452002718186524485912418701574541563324905582376375,452002718186524485912418701574541563324905582376398⟩⟩, + ⟨⟨-1915212897901767442266198248614237643368607601325884,-1915212897901767442266198248614237643368607601325717⟩,⟨5262004190433356979773597577290394847804046962135173,5262004190433356979773597577290394847804046962135456⟩⟩, + ⟨⟨-36032111386744300676166123805848792200641797749979733,-36032111386744300676166123805848792200641797749977361⟩,⟨20803149208607401698191586527829377582492614145372677,20803149208607401698191586527829377582492614145374500⟩⟩, + ⟨⟨-223318768674624183428243121744186361765442219540815105,-223318768674624183428243121744186361765442219540799961⟩,⟨-39377124215928610423532349390514361815448022009787382,-39377124215928610423532349390514361815448022009778649⟩⟩, + ⟨⟨-633217165138931539595516159984977809404363714614093830,-633217165138931539595516159984977809404363714614039795⟩,⟨-754638831446642786903743362877131509366087701982318839,-754638831446642786903743362877131509366087701982260131⟩⟩, + ⟨⟨-52913,41095⟩,⟨-3598843235212085340458540018208389404888495232432227325,-3598843235212085340458540018208389404888495232432007307⟩⟩, + ⟨⟨7371618006598804374173238873306869173007594824466282943,7371618006598804374173238873306869173007594824467060977⟩,⟨-8785152242596293647118650410290941472236156719531013123,-8785152242596293647118650410290941472236156719530190019⟩⟩, + ⟨⟨32223025959118624056607798737238679552021987184733306360,32223025959118624056607798737238679552021987184736484054⟩,⟨-5681788876661875672942235057005649473559960862294936636,-5681788876661875672942235057005649473559960862292691739⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791951836416,73793764120052327784788221554378326426914401791960571952⟩,⟨42604849579227958677896369208994565288944873769721034770,42604849579227958677896369208994565288944873769728699909⟩⟩, + ⟨⟨70294911012216344368138803230360605166547805774391359928,70294911012216344368138803230360605166547805774408077314⟩,⟨193133680708636471923911370202436046709059900371418171647,193133680708636471923911370202436046709059900371439233841⟩⟩, + ⟨⟨-158838363009725480590257939154980350262354144574572708839,-158838363009725480590257939154980350262354144574532278644⟩,⟨436404815712357093856910280486658809144220608390023377460,436404815712357093856910280486658809144220608390073427811⟩⟩, + ⟨⟨-859072479885680691627648444315166287437481826543355895411,-859072479885680691627648444315166287437481826543235484291⟩,⟨495985727515397112326421416469320716440501550325665343637,495985727515397112326421416469320716440501550325772790997⟩⟩] +lemma tw0_0_2_9_calc (j : Fin 31) : taylorWaveBox 0 0 2 9 j = tw0_0_2_9 j := by + revert j + decide +kernel +def tw0_0_2_10 : Fin 31 → CI := ![⟨⟨-108207299850538926453101217536999299224894071863947486519,-108207299850538926453101217536999299224894071863923700706⟩,⟨187420541090973602826895044989804187200002869539574687150,187420541090973602826895044989804187200002869539601553360⟩⟩, + ⟨⟨-88861510566963336281397171899359121616930779469061027076,-88861510566963336281397171899359121616930779469050552881⟩,⟨32342944818306262121907552366576596456469258500385095854,32342944818306262121907552366576596456469258500393431272⟩⟩, + ⟨⟨-36517201769329252161989114481407114117435237387265727685,-36517201769329252161989114481407114117435237387261629063⟩,⟨-13291174482728947273372294581193884759980004910095071969,-13291174482728947273372294581193884759980004910091868782⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003518651485,-7435949024744486033456304113587098562333411003517289996⟩,⟨-12879441513349692559052917879290522199485986172459788307,-12879441513349692559052917879290522199485986172458222671⟩⟩, + ⟨⟨909020963591947578021129988330610264773773584414430798,909020963591947578021129988330610264773773584414792850⟩,⟨-5155314064470384147116794759277884805507548839240679521,-5155314064470384147116794759277884805507548839240154716⟩⟩, + ⟨⟨1277748599352241349924386521357345227008653327101605594,1277748599352241349924386521357345227008653327101729377⟩,⟨-1072158378453751842467979383665927398604390525910552806,-1072158378453751842467979383665927398604390525910436232⟩⟩, + ⟨⟨471087477881817150367027725509267001994255814209041808,471087477881817150367027725509267001994255814209072109⟩,⟨-5380,6927⟩⟩, + ⟨⟨87806215147642934115586114913488052470141791182448239,87806215147642934115586114913488052470141791182455351⟩,⟨73678162745460083390395446080758316264259413612762060,73678162745460083390395446080758316264259413612768583⟩⟩, + ⟨⟨4009019393952678184454107944901637413075178268653599,4009019393952678184454107944901637413075178268654501⟩,⟨22736278803418631823438547322463308731353365912261469,22736278803418631823438547322463308731353365912263085⟩⟩, + ⟨⟨-1815417242369259285511792996481225234944680420780848,-1815417242369259285511792996481225234944680420780682⟩,⟨3144394900720139784925028779123662646358883342885384,3144394900720139784925028779123662646358883342885602⟩⟩, + ⟨⟨-382663743236669945973673458564761217138938398428707,-382663743236669945973673458564761217138938398428684⟩,⟨139278212271032669669837904828030795245079308185224,139278212271032669669837904828030795245079308185237⟩⟩, + ⟨⟨-26296452201063017694448230104301768410574321750559,-26296452201063017694448230104301768410574321750557⟩,⟨-9571125867990899270072398701720844314535806937311,-9571125867990899270072398701720844314535806937309⟩⟩, + ⟨⟨-443217100187807442751902587031549129625166118355,-443217100187807442751902587031549129625166118354⟩,⟨-767674536308627877178962104278237950771211753635,-767674536308627877178962104278237950771211753634⟩⟩, + ⟨⟨1186374012703370235018362736328362878535427493,1186374012703370235018362736328362878535427494⟩,⟨-6728261369511533188856362769782954131162052085,-6728261369511533188856362769782954131162052084⟩⟩, + ⟨⟨1277748599352241349924386521357345227008653,1277748599352241349924386521357345227008654⟩,⟨-1072158378453751842467979383665927398604391,-1072158378453751842467979383665927398604390⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨1277748599352241349924386521357345227008653,1277748599352241349924386521357345227008654⟩,⟨1072158378453751842467979383665927398604390,1072158378453751842467979383665927398604391⟩⟩, + ⟨⟨1186374012703370235018362736328362878535427493,1186374012703370235018362736328362878535427494⟩,⟨6728261369511533188856362769782954131162052084,6728261369511533188856362769782954131162052085⟩⟩, + ⟨⟨-443217100187807442751902587031549129625166118355,-443217100187807442751902587031549129625166118354⟩,⟨767674536308627877178962104278237950771211753634,767674536308627877178962104278237950771211753635⟩⟩, + ⟨⟨-26296452201063017694448230104301768410574321750559,-26296452201063017694448230104301768410574321750557⟩,⟨9571125867990899270072398701720844314535806937309,9571125867990899270072398701720844314535806937311⟩⟩, + ⟨⟨-382663743236669945973673458564761217138938398428707,-382663743236669945973673458564761217138938398428684⟩,⟨-139278212271032669669837904828030795245079308185237,-139278212271032669669837904828030795245079308185224⟩⟩, + ⟨⟨-1815417242369259285511792996481225234944680420780848,-1815417242369259285511792996481225234944680420780682⟩,⟨-3144394900720139784925028779123662646358883342885602,-3144394900720139784925028779123662646358883342885384⟩⟩, + ⟨⟨4009019393952678184454107944901637413075178268653599,4009019393952678184454107944901637413075178268654501⟩,⟨-22736278803418631823438547322463308731353365912263085,-22736278803418631823438547322463308731353365912261469⟩⟩, + ⟨⟨87806215147642934115586114913488052470141791182448239,87806215147642934115586114913488052470141791182455351⟩,⟨-73678162745460083390395446080758316264259413612768583,-73678162745460083390395446080758316264259413612762060⟩⟩, + ⟨⟨471087477881817150367027725509267001994255814209041808,471087477881817150367027725509267001994255814209072109⟩,⟨-6927,5380⟩⟩, + ⟨⟨1277748599352241349924386521357345227008653327101605594,1277748599352241349924386521357345227008653327101729377⟩,⟨1072158378453751842467979383665927398604390525910436232,1072158378453751842467979383665927398604390525910552806⟩⟩, + ⟨⟨909020963591947578021129988330610264773773584414430798,909020963591947578021129988330610264773773584414792850⟩,⟨5155314064470384147116794759277884805507548839240154716,5155314064470384147116794759277884805507548839240679521⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003518651485,-7435949024744486033456304113587098562333411003517289996⟩,⟨12879441513349692559052917879290522199485986172458222671,12879441513349692559052917879290522199485986172459788307⟩⟩, + ⟨⟨-36517201769329252161989114481407114117435237387265727685,-36517201769329252161989114481407114117435237387261629063⟩,⟨13291174482728947273372294581193884759980004910091868782,13291174482728947273372294581193884759980004910095071969⟩⟩, + ⟨⟨-88861510566963336281397171899359121616930779469061027076,-88861510566963336281397171899359121616930779469050552881⟩,⟨-32342944818306262121907552366576596456469258500393431273,-32342944818306262121907552366576596456469258500385095854⟩⟩, + ⟨⟨-108207299850538926453101217536999299224894071863947486518,-108207299850538926453101217536999299224894071863923700705⟩,⟨-187420541090973602826895044989804187200002869539601553360,-187420541090973602826895044989804187200002869539574687150⟩⟩] +lemma tw0_0_2_10_calc (j : Fin 31) : taylorWaveBox 0 0 2 10 j = tw0_0_2_10 j := by + revert j + decide +kernel +def tw0_0_2_11 : Fin 31 → CI := ![⟨⟨37743525322001707893742291740530563888148221535549013974,37743525322001707893742291740530563888148221535554544545⟩,⟨21791234504823142515366525311269432823771122929789227652,21791234504823142515366525311269432823771122929794087102⟩⟩, + ⟨⟨6079132520141514205668296136922984275576632139195368936,6079132520141514205668296136922984275576632139196955000⟩,⟨16702279328961082043742238063855042943883521252491808015,16702279328961082043742238063855042943883521252493829895⟩⟩, + ⟨⟨-2319747561806743388088418778287325220660344059850173233,-2319747561806743388088418778287325220660344059849606786⟩,⟨6373454044898943223400879911998071624579395833783297154,6373454044898943223400879911998071624579395833784032787⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745835075,-2074972248239938619645032781794172026726850732745576234⟩,⟨1197985786082331537503313966912747958048843575969809367,1197985786082331537503313966912747958048843575970032527⟩⟩, + ⟨⟨-761345575687056675429503141948610697084760207817214191,-761345575687056675429503141948610697084760207817134263⟩,⟨-134245766636646801748787137719069512750131783907151838,-134245766636646801748787137719069512750131783907097941⟩⟩, + ⟨⟨-143943798514318463707509065449457718565486339135790199,-143943798514318463707509065449457718565486339135774089⟩,⟨-171545539011096131126423925826616465808087912130898725,-171545539011096131126423925826616465808087912130881559⟩⟩, + ⟨⟨-650,837⟩,⟨-56921729219679268117752553035921843729028297560547709,-56921729219679268117752553035921843729028297560543866⟩⟩, + ⟨⟨7913394010636943223714743625330488859821259019813418,7913394010636943223714743625330488859821259019814144⟩,⟨-9430815741790080823041515556572767833354749374657585,-9430815741790080823041515556572767833354749374656791⟩⟩, + ⟨⟨2136738825690278460176027945414666781612013905283461,2136738825690278460176027945414666781612013905283620⟩,⟨-376764705696517831699201231693296163533042464570160,-376764705696517831699201231693296163533042464570073⟩⟩, + ⟨⟨253292510771476882280887790746358889981305021087112,253292510771476882280887790746358889981305021087131⟩,⟨146238499277628361511635005726653803472759225582259,146238499277628361511635005726653803472759225582274⟩⟩, + ⟨⟨9349474540081111701289712237162482753386818985685,9349474540081111701289712237162482753386818985686⟩,⟨25687470182638744248345993278860334823004652699923,25687470182638744248345993278860334823004652699925⟩⟩, + ⟨⟨-513992798520742604087836609022257398578693385997,-513992798520742604087836609022257398578693385996⟩,⟨1412183607698029485173173033284364111570111127065,1412183607698029485173173033284364111570111127066⟩⟩, + ⟨⟨-30919495943783799106553685393842637937171023082,-30919495943783799106553685393842637937171023081⟩,⟨17851379306351118348588257534991919369233303904,17851379306351118348588257534991919369233303905⟩⟩, + ⟨⟨-180662021281106272882257418728483043148784567,-180662021281106272882257418728483043148784566⟩,⟨-31855588741185914270536868752431019673162714,-31855588741185914270536868752431019673162713⟩⟩, + ⟨⟨-14394379851431846370750906544945771856549,-14394379851431846370750906544945771856548⟩,⟨-17154553901109613112642392582661646580809,-17154553901109613112642392582661646580808⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-14394379851431846370750906544945771856549,-14394379851431846370750906544945771856548⟩,⟨17154553901109613112642392582661646580808,17154553901109613112642392582661646580809⟩⟩, + ⟨⟨-180662021281106272882257418728483043148784567,-180662021281106272882257418728483043148784566⟩,⟨31855588741185914270536868752431019673162713,31855588741185914270536868752431019673162714⟩⟩, + ⟨⟨-30919495943783799106553685393842637937171023082,-30919495943783799106553685393842637937171023081⟩,⟨-17851379306351118348588257534991919369233303905,-17851379306351118348588257534991919369233303904⟩⟩, + ⟨⟨-513992798520742604087836609022257398578693385997,-513992798520742604087836609022257398578693385996⟩,⟨-1412183607698029485173173033284364111570111127066,-1412183607698029485173173033284364111570111127065⟩⟩, + ⟨⟨9349474540081111701289712237162482753386818985685,9349474540081111701289712237162482753386818985686⟩,⟨-25687470182638744248345993278860334823004652699925,-25687470182638744248345993278860334823004652699923⟩⟩, + ⟨⟨253292510771476882280887790746358889981305021087112,253292510771476882280887790746358889981305021087131⟩,⟨-146238499277628361511635005726653803472759225582274,-146238499277628361511635005726653803472759225582259⟩⟩, + ⟨⟨2136738825690278460176027945414666781612013905283461,2136738825690278460176027945414666781612013905283620⟩,⟨376764705696517831699201231693296163533042464570073,376764705696517831699201231693296163533042464570160⟩⟩, + ⟨⟨7913394010636943223714743625330488859821259019813418,7913394010636943223714743625330488859821259019814144⟩,⟨9430815741790080823041515556572767833354749374656791,9430815741790080823041515556572767833354749374657585⟩⟩, + ⟨⟨-650,837⟩,⟨56921729219679268117752553035921843729028297560543866,56921729219679268117752553035921843729028297560547709⟩⟩, + ⟨⟨-143943798514318463707509065449457718565486339135790199,-143943798514318463707509065449457718565486339135774089⟩,⟨171545539011096131126423925826616465808087912130881559,171545539011096131126423925826616465808087912130898725⟩⟩, + ⟨⟨-761345575687056675429503141948610697084760207817214191,-761345575687056675429503141948610697084760207817134263⟩,⟨134245766636646801748787137719069512750131783907097941,134245766636646801748787137719069512750131783907151838⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745835075,-2074972248239938619645032781794172026726850732745576234⟩,⟨-1197985786082331537503313966912747958048843575970032527,-1197985786082331537503313966912747958048843575969809367⟩⟩, + ⟨⟨-2319747561806743388088418778287325220660344059850173233,-2319747561806743388088418778287325220660344059849606786⟩,⟨-6373454044898943223400879911998071624579395833784032787,-6373454044898943223400879911998071624579395833783297154⟩⟩, + ⟨⟨6079132520141514205668296136922984275576632139195368936,6079132520141514205668296136922984275576632139196955000⟩,⟨-16702279328961082043742238063855042943883521252493829895,-16702279328961082043742238063855042943883521252491808015⟩⟩, + ⟨⟨37743525322001707893742291740530563888148221535549013974,37743525322001707893742291740530563888148221535554544545⟩,⟨-21791234504823142515366525311269432823771122929794087102,-21791234504823142515366525311269432823771122929789227652⟩⟩] +lemma tw0_0_2_11_calc (j : Fin 31) : taylorWaveBox 0 0 2 11 j = tw0_0_2_11 j := by + revert j + decide +kernel +def tw0_0_2_12 : Fin 31 → CI := ![⟨⟨4074951323393142878532497251109791508755607371562371228,4074951323393142878532497251109791508755607371563292915⟩,⟨-7058022730486958381136491702350017063996955730532632811,-7058022730486958381136491702350017063996955730531576130⟩⟩, + ⟨⟨2915097668781599827038136805498677783984484818412554327,2915097668781599827038136805498677783984484818412916492⟩,⟨-1061008781415299266940026912049575144620781757581188504,-1061008781415299266940026912049575144620781757580908305⟩⟩, + ⟨⟨1032922036788915632431125416292463159431793410270862672,1032922036788915632431125416292463159431793410270985182⟩,⟨375952875708784516626958000722572900982883799293365851,375952875708784516626958000722572900982883799293458850⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690965267,179218254507678396558872331947278891371354432690999223⟩,⟨310415122451108950031301992179391381861466766399419643,310415122451108950031301992179391381861466766399459355⟩⟩, + ⟨⟨-18409526415291321199321903509439677871902209714265871,-18409526415291321199321903509439677871902209714258420⟩,⟨104405612466813653434022545869198146526718531502397032,104405612466813653434022545869198146526718531502408326⟩⟩, + ⟨⟨-21385960520371463889709211634969875276697080077839340,-21385960520371463889709211634969875276697080077837131⟩,⟨17944951585015566665402053292337981862750640091979658,17944951585015566665402053292337981862750640091981724⟩⟩, + ⟨⟨-6386603083791852241089888205092732398089436736506136,-6386603083791852241089888205092732398089436736505684⟩,⟨-94,73⟩⟩, + ⟨⟨-940564490532276010782167192802696235608196196690045,-940564490532276010782167192802696235608196196689961⟩,⟨-789227317104079078183010238278049377066548836332826,-789227317104079078183010238278049377066548836332750⟩⟩, + ⟨⟨-32878923098558359546135419191182336556819100730206,-32878923098558359546135419191182336556819100730197⟩,⟨-186465638817462793771274929935786060362345442517365,-186465638817462793771274929935786060362345442517350⟩⟩, + ⟨⟨10938614166728417758720235104204033897177394573423,10938614166728417758720235104204033897177394573425⟩,⟨-18946235501166317750933959483605431021818039941373,-18946235501166317750933959483605431021818039941371⟩⟩, + ⟨⟨1601181897124697287910334808621591391330151734759,1601181897124697287910334808621591391330151734760⟩,⟨-582782550199278401027034975690593199470034891949,-582782550199278401027034975690593199470034891948⟩⟩, + ⟨⟨70420724562921587563261790038427175580038549908,70420724562921587563261790038427175580038549909⟩,⟨25631047616362281115753349452177948739213356983,25631047616362281115753349452177948739213356984⟩⟩, + ⟨⟨667640024824732529218764349621828240794518711,667640024824732529218764349621828240794518712⟩,⟨1156386444162983261165402800513026795765261226,1156386444162983261165402800513026795765261227⟩⟩, + ⟨⟨-794264155278471409731782880376631800439788,-794264155278471409731782880376631800439787⟩,⟨4504495863804812326965902431691187952495442,4504495863804812326965902431691187952495443⟩⟩, + ⟨⟨-213859605203714638897092116349698752767,-213859605203714638897092116349698752766⟩,⟨179449515850155666654020532923379818627,179449515850155666654020532923379818628⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-213859605203714638897092116349698752767,-213859605203714638897092116349698752766⟩,⟨-179449515850155666654020532923379818628,-179449515850155666654020532923379818627⟩⟩, + ⟨⟨-794264155278471409731782880376631800439788,-794264155278471409731782880376631800439787⟩,⟨-4504495863804812326965902431691187952495443,-4504495863804812326965902431691187952495442⟩⟩, + ⟨⟨667640024824732529218764349621828240794518711,667640024824732529218764349621828240794518712⟩,⟨-1156386444162983261165402800513026795765261227,-1156386444162983261165402800513026795765261226⟩⟩, + ⟨⟨70420724562921587563261790038427175580038549908,70420724562921587563261790038427175580038549909⟩,⟨-25631047616362281115753349452177948739213356984,-25631047616362281115753349452177948739213356983⟩⟩, + ⟨⟨1601181897124697287910334808621591391330151734759,1601181897124697287910334808621591391330151734760⟩,⟨582782550199278401027034975690593199470034891948,582782550199278401027034975690593199470034891949⟩⟩, + ⟨⟨10938614166728417758720235104204033897177394573423,10938614166728417758720235104204033897177394573425⟩,⟨18946235501166317750933959483605431021818039941371,18946235501166317750933959483605431021818039941373⟩⟩, + ⟨⟨-32878923098558359546135419191182336556819100730206,-32878923098558359546135419191182336556819100730197⟩,⟨186465638817462793771274929935786060362345442517350,186465638817462793771274929935786060362345442517365⟩⟩, + ⟨⟨-940564490532276010782167192802696235608196196690045,-940564490532276010782167192802696235608196196689961⟩,⟨789227317104079078183010238278049377066548836332750,789227317104079078183010238278049377066548836332826⟩⟩, + ⟨⟨-6386603083791852241089888205092732398089436736506136,-6386603083791852241089888205092732398089436736505684⟩,⟨-73,94⟩⟩, + ⟨⟨-21385960520371463889709211634969875276697080077839340,-21385960520371463889709211634969875276697080077837131⟩,⟨-17944951585015566665402053292337981862750640091981724,-17944951585015566665402053292337981862750640091979658⟩⟩, + ⟨⟨-18409526415291321199321903509439677871902209714265870,-18409526415291321199321903509439677871902209714258420⟩,⟨-104405612466813653434022545869198146526718531502408326,-104405612466813653434022545869198146526718531502397032⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690965267,179218254507678396558872331947278891371354432690999223⟩,⟨-310415122451108950031301992179391381861466766399459355,-310415122451108950031301992179391381861466766399419643⟩⟩, + ⟨⟨1032922036788915632431125416292463159431793410270862672,1032922036788915632431125416292463159431793410270985182⟩,⟨-375952875708784516626958000722572900982883799293458850,-375952875708784516626958000722572900982883799293365851⟩⟩, + ⟨⟨2915097668781599827038136805498677783984484818412554327,2915097668781599827038136805498677783984484818412916492⟩,⟨1061008781415299266940026912049575144620781757580908305,1061008781415299266940026912049575144620781757581188504⟩⟩, + ⟨⟨4074951323393142878532497251109791508755607371562371228,4074951323393142878532497251109791508755607371563292915⟩,⟨7058022730486958381136491702350017063996955730531576130,7058022730486958381136491702350017063996955730532632811⟩⟩] +lemma tw0_0_2_12_calc (j : Fin 31) : taylorWaveBox 0 0 2 12 j = tw0_0_2_12 j := by + revert j + decide +kernel +def tw0_0_2_13 : Fin 31 → CI := ![⟨⟨-1231857353275977869214001563220895965360893961740324100,-1231857353275977869214001563220895965360893961740135753⟩,⟨-711213174517105746409924496561635036133590707082862328,-711213174517105746409924496561635036133590707082699199⟩⟩, + ⟨⟨-172835568530518077542986268574787459705844624522302708,-172835568530518077542986268574787459705844624522256514⟩,⟨-474861821816200330437057650718039768530314243088867790,-474861821816200330437057650718039768530314243088807282⟩⟩, + ⟨⟨56867334449980603325546142739737348321935146171601753,56867334449980603325546142739737348321935146171616003⟩,⟨-156241717305895649799686194893015364349777912647832050,-156241717305895649799686194893015364349777912647813021⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797358231,43342127478025776420404444686963708682595437797363915⟩,⟨-25023588966689257663727985644023700918120860663564920,-25023588966689257663727985644023700918120860663560099⟩⟩, + ⟨⟨13362959097452339802325197376224305745844335886969608,13362959097452339802325197376224305745844335886971097⟩,⟨2356250230984485233749636889023056288022248058198364,2356250230984485233749636889023056288022248058199326⟩⟩, + ⟨⟨2087989928463311860594091717496084599649455428935109,2087989928463311860594091717496084599649455428935357⟩,⟨2488369498546679359248495754036358554503039855829161,2488369498546679359248495754036358554503039855829427⟩⟩, + ⟨⟨-10,8⟩,⟨668803510981146723247822633578313868995627098570400,668803510981146723247822633578313868995627098570450⟩⟩, + ⟨⟨-73464614560786874180407583190795504546149696565142,-73464614560786874180407583190795504546149696565133⟩,⟨87551718331366665235419335891198115729575032531934,87551718331366665235419335891198115729575032531943⟩⟩, + ⟨⟨-15187383582929934288703478292373650299945640112665,-15187383582929934288703478292373650299945640112662⟩,⟨2677945492039344171901262007132462227042984584339,2677945492039344171901262007132462227042984584340⟩⟩, + ⟨⟨-1322696761414360852673475484831656148760847100750,-1322696761414360852673475484831656148760847100749⟩,⟨-763659331258827443351073780640371732120387593493,-763659331258827443351073780640371732120387593492⟩⟩, + ⟨⟨-33904914413821813299438355150912029032760916079,-33904914413821813299438355150912029032760916078⟩,⟨-93152986760516982981871627238405001428005589996,-93152986760516982981871627238405001428005589995⟩⟩, + ⟨⟨1192923124375909978050605797713512933529277621,1192923124375909978050605797713512933529277622⟩,⟨-3277529347368070561462085221246994647745472984,-3277529347368070561462085221246994647745472983⟩⟩, + ⟨⟨40365501752147242818404403223622318992945773,40365501752147242818404403223622318992945774⟩,⟨-23305033302576521098360405903331656864025501,-23305033302576521098360405903331656864025500⟩⟩, + ⟨⟨104824378621146727671073595034211777478491,104824378621146727671073595034211777478492⟩,⟨18483366186907767246077091096549671970073,18483366186907767246077091096549671970074⟩⟩, + ⟨⟨2087989928463311860594091717496084599,2087989928463311860594091717496084600⟩,⟨2488369498546679359248495754036358554,2488369498546679359248495754036358555⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨2087989928463311860594091717496084599,2087989928463311860594091717496084600⟩,⟨-2488369498546679359248495754036358555,-2488369498546679359248495754036358554⟩⟩, + ⟨⟨104824378621146727671073595034211777478491,104824378621146727671073595034211777478492⟩,⟨-18483366186907767246077091096549671970074,-18483366186907767246077091096549671970073⟩⟩, + ⟨⟨40365501752147242818404403223622318992945773,40365501752147242818404403223622318992945774⟩,⟨23305033302576521098360405903331656864025500,23305033302576521098360405903331656864025501⟩⟩, + ⟨⟨1192923124375909978050605797713512933529277621,1192923124375909978050605797713512933529277622⟩,⟨3277529347368070561462085221246994647745472983,3277529347368070561462085221246994647745472984⟩⟩, + ⟨⟨-33904914413821813299438355150912029032760916079,-33904914413821813299438355150912029032760916078⟩,⟨93152986760516982981871627238405001428005589995,93152986760516982981871627238405001428005589996⟩⟩, + ⟨⟨-1322696761414360852673475484831656148760847100750,-1322696761414360852673475484831656148760847100749⟩,⟨763659331258827443351073780640371732120387593492,763659331258827443351073780640371732120387593493⟩⟩, + ⟨⟨-15187383582929934288703478292373650299945640112665,-15187383582929934288703478292373650299945640112662⟩,⟨-2677945492039344171901262007132462227042984584340,-2677945492039344171901262007132462227042984584339⟩⟩, + ⟨⟨-73464614560786874180407583190795504546149696565142,-73464614560786874180407583190795504546149696565133⟩,⟨-87551718331366665235419335891198115729575032531943,-87551718331366665235419335891198115729575032531934⟩⟩, + ⟨⟨-10,8⟩,⟨-668803510981146723247822633578313868995627098570450,-668803510981146723247822633578313868995627098570400⟩⟩, + ⟨⟨2087989928463311860594091717496084599649455428935109,2087989928463311860594091717496084599649455428935357⟩,⟨-2488369498546679359248495754036358554503039855829427,-2488369498546679359248495754036358554503039855829161⟩⟩, + ⟨⟨13362959097452339802325197376224305745844335886969608,13362959097452339802325197376224305745844335886971097⟩,⟨-2356250230984485233749636889023056288022248058199326,-2356250230984485233749636889023056288022248058198364⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797358231,43342127478025776420404444686963708682595437797363915⟩,⟨25023588966689257663727985644023700918120860663560099,25023588966689257663727985644023700918120860663564920⟩⟩, + ⟨⟨56867334449980603325546142739737348321935146171601753,56867334449980603325546142739737348321935146171616003⟩,⟨156241717305895649799686194893015364349777912647813021,156241717305895649799686194893015364349777912647832050⟩⟩, + ⟨⟨-172835568530518077542986268574787459705844624522302708,-172835568530518077542986268574787459705844624522256514⟩,⟨474861821816200330437057650718039768530314243088807282,474861821816200330437057650718039768530314243088867790⟩⟩, + ⟨⟨-1231857353275977869214001563220895965360893961740324100,-1231857353275977869214001563220895965360893961740135753⟩,⟨711213174517105746409924496561635036133590707082699199,711213174517105746409924496561635036133590707082862328⟩⟩] +lemma tw0_0_2_13_calc (j : Fin 31) : taylorWaveBox 0 0 2 13 j = tw0_0_2_13 j := by + revert j + decide +kernel +def tw0_0_2_14 : Fin 31 → CI := ![⟨⟨-116371983552042445686522962423844893895399380113628599,-116371983552042445686522962423844893895399380113601536⟩,⟨201562188089707223595102174191806275779722154968162913,201562188089707223595102174191806275779722154968194373⟩⟩, + ⟨⟨-72519144973724184467495560806221113234773129109112546,-72519144973724184467495560806221113234773129109103074⟩,⟨26394810184871082907257877832460534542345150403131975,26394810184871082907257877832460534542345150403139115⟩⟩, + ⟨⟨-22156325717159428682521296183746576262458161482473020,-22156325717159428682521296183746576262458161482470250⟩,⟨-8064243061752801297654377243802573435783938663718867,-8064243061752801297654377243802573435783938663716820⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402655,-3275580136008399049375563065350230572121000394402013⟩,⟨-5673471219829920494753699488938742157419895557685457,-5673471219829920494753699488938742157419895557684694⟩⟩, + ⟨⟨282729731154448730689760129823307096164219040928416,282729731154448730689760129823307096164219040928533⟩,⟨-1603439984161627816958056494739234525866908742851154,-1603439984161627816958056494739234525866908742850970⟩⟩, + ⟨⟨271439004723998804083379578447167029898398020177844,271439004723998804083379578447167029898398020177875⟩,⟨-227764368751035363301247171740112454514082798425764,-227764368751035363301247171740112454514082798425735⟩⟩, + ⟨⟨65659631149794723622098140181990406812989656915293,65659631149794723622098140181990406812989656915299⟩,⟨-1,1⟩⟩, + ⟨⟨7640328753305120734453606295698465470959279796748,7640328753305120734453606295698465470959279796749⟩,⟨6410997038971494409950561557782714145179390382405,6410997038971494409950561557782714145179390382407⟩⟩, + ⟨⟨204482976359489425246242600131140217982714625732,204482976359489425246242600131140217982714625733⟩,⟨1159680586248890268945138222425992578271088809867,1159680586248890268945138222425992578271088809868⟩⟩, + ⟨⟨-49981386352667221822747239156345070985733038245,-49981386352667221822747239156345070985733038244⟩,⟨86570300595549323955592338393230318564146355555,86570300595549323955592338393230318564146355556⟩⟩, + ⟨⟨-5080707271992837256102899153223491502791258743,-5080707271992837256102899153223491502791258742⟩,⟨1849226216025230895565624116382459283952477517,1849226216025230895565624116382459283952477518⟩⟩, + ⟨⟨-143009196105784444591881114575706449401756707,-143009196105784444591881114575706449401756706⟩,⟨-52051090608843638749941904190285810582339378,-52051090608843638749941904190285810582339377⟩⟩, + ⟨⟨-762655431406665372051196886540909896632890,-762655431406665372051196886540909896632889⟩,⟨-1320957955864705260552861608783421608949988,-1320957955864705260552861608783421608949987⟩⟩, + ⟨⟨403244496016662713680396422076745051200,403244496016662713680396422076745051201⟩,⟨-2286913179120205137661368164885157027167,-2286913179120205137661368164885157027166⟩⟩, + ⟨⟨27143900472399880408337957844716702,27143900472399880408337957844716703⟩,⟨-22776436875103536330124717174011246,-22776436875103536330124717174011245⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨27143900472399880408337957844716702,27143900472399880408337957844716703⟩,⟨22776436875103536330124717174011245,22776436875103536330124717174011246⟩⟩, + ⟨⟨403244496016662713680396422076745051200,403244496016662713680396422076745051201⟩,⟨2286913179120205137661368164885157027166,2286913179120205137661368164885157027167⟩⟩, + ⟨⟨-762655431406665372051196886540909896632890,-762655431406665372051196886540909896632889⟩,⟨1320957955864705260552861608783421608949987,1320957955864705260552861608783421608949988⟩⟩, + ⟨⟨-143009196105784444591881114575706449401756707,-143009196105784444591881114575706449401756706⟩,⟨52051090608843638749941904190285810582339377,52051090608843638749941904190285810582339378⟩⟩, + ⟨⟨-5080707271992837256102899153223491502791258743,-5080707271992837256102899153223491502791258742⟩,⟨-1849226216025230895565624116382459283952477518,-1849226216025230895565624116382459283952477517⟩⟩, + ⟨⟨-49981386352667221822747239156345070985733038245,-49981386352667221822747239156345070985733038244⟩,⟨-86570300595549323955592338393230318564146355556,-86570300595549323955592338393230318564146355555⟩⟩, + ⟨⟨204482976359489425246242600131140217982714625732,204482976359489425246242600131140217982714625733⟩,⟨-1159680586248890268945138222425992578271088809868,-1159680586248890268945138222425992578271088809867⟩⟩, + ⟨⟨7640328753305120734453606295698465470959279796748,7640328753305120734453606295698465470959279796749⟩,⟨-6410997038971494409950561557782714145179390382407,-6410997038971494409950561557782714145179390382405⟩⟩, + ⟨⟨65659631149794723622098140181990406812989656915293,65659631149794723622098140181990406812989656915299⟩,⟨-1,1⟩⟩, + ⟨⟨271439004723998804083379578447167029898398020177844,271439004723998804083379578447167029898398020177875⟩,⟨227764368751035363301247171740112454514082798425735,227764368751035363301247171740112454514082798425764⟩⟩, + ⟨⟨282729731154448730689760129823307096164219040928416,282729731154448730689760129823307096164219040928533⟩,⟨1603439984161627816958056494739234525866908742850970,1603439984161627816958056494739234525866908742851154⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402655,-3275580136008399049375563065350230572121000394402013⟩,⟨5673471219829920494753699488938742157419895557684694,5673471219829920494753699488938742157419895557685457⟩⟩, + ⟨⟨-22156325717159428682521296183746576262458161482473020,-22156325717159428682521296183746576262458161482470250⟩,⟨8064243061752801297654377243802573435783938663716820,8064243061752801297654377243802573435783938663718867⟩⟩, + ⟨⟨-72519144973724184467495560806221113234773129109112546,-72519144973724184467495560806221113234773129109103074⟩,⟨-26394810184871082907257877832460534542345150403139115,-26394810184871082907257877832460534542345150403131975⟩⟩, + ⟨⟨-116371983552042445686522962423844893895399380113628599,-116371983552042445686522962423844893895399380113601536⟩,⟨-201562188089707223595102174191806275779722154968194373,-201562188089707223595102174191806275779722154968162913⟩⟩] +lemma tw0_0_2_14_calc (j : Fin 31) : taylorWaveBox 0 0 2 14 j = tw0_0_2_14 j := by + revert j + decide +kernel +def tw0_0_2_15 : Fin 31 → CI := ![⟨⟨31040504379613153638845397438259401537550658444203251,31040504379613153638845397438259401537550658444208195⟩,⟨17921243559351411743059444294652121584177020296557360,17921243559351411743059444294652121584177020296561586⟩⟩, + ⟨⟨3793805179005335455803658547853051473311541055285876,3793805179005335455803658547853051473311541055286915⟩,⟨10423394063127160400997832665273145235731940921098127,10423394063127160400997832665273145235731940921099523⟩⟩, + ⟨⟨-1076305123772371910360366944827320127709562152939605,-1076305123772371910360366944827320127709562152939328⟩,⟨2957124024007904207797250899130863519431964945782201,2957124024007904207797250899130863519431964945782581⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635474979,-698970019787090239214134897920947303315208635474882⟩,⟨403550529079554596708656969046895623673248550739996,403550529079554596708656969046895623673248550740077⟩⟩, + ⟨⟨-181081398764239699762631983512251247703834730342326,-181081398764239699762631983512251247703834730342303⟩,⟨-31929536306563946626866632960542574274576073417561,-31929536306563946626866632960542574274576073417547⟩⟩, + ⟨⟨-23383753843717953207269829457490677600253832976061,-23383753843717953207269829457490677600253832976057⟩,⟨-27867672651589536775502473644701076015069408780371,-27867672651589536775502473644701076015069408780367⟩⟩, + ⟨⟨-1,1⟩,⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩⟩, + ⟨⟨526555325485457888107729922122946353655814416922,526555325485457888107729922122946353655814416923⟩,⟨-627524200846908000129895200305148304717162028109,-627524200846908000129895200305148304717162028108⟩⟩, + ⟨⟨83342183241475581268204610478810332860164401226,83342183241475581268204610478810332860164401227⟩,⟨-14695475536621017627961840496844930604960187707,-14695475536621017627961840496844930604960187706⟩⟩, + ⟨⟨5332718046471330560410575087897852350732487758,5332718046471330560410575087897852350732487759⟩,⟨3078846199642597936314826729178585996042240529,3078846199642597936314826729178585996042240530⟩⟩, + ⟨⟨94926723775988845796358099608024607997083555,94926723775988845796358099608024607997083556⟩,⟨260809030077335571699786032542783432045089897,260809030077335571699786032542783432045089898⟩⟩, + ⟨⟨-2137559789125226844683738093826479806274308,-2137559789125226844683738093826479806274307⟩,⟨5872897253355744821342603260559866260065089,5872897253355744821342603260559866260065090⟩⟩, + ⟨⟨-40685409900446552737507439330275362783299,-40685409900446552737507439330275362783298⟩,⟨23489732358113082399862874825886428802812,23489732358113082399862874825886428802813⟩⟩, + ⟨⟨-46957840803409904538078515415369225365,-46957840803409904538078515415369225364⟩,⟨-8279934289454027608335163343171268104,-8279934289454027608335163343171268103⟩⟩, + ⟨⟨-233837538437179532072698294574907,-233837538437179532072698294574906⟩,⟨-278676726515895367755024736447011,-278676726515895367755024736447010⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-233837538437179532072698294574907,-233837538437179532072698294574906⟩,⟨278676726515895367755024736447010,278676726515895367755024736447011⟩⟩, + ⟨⟨-46957840803409904538078515415369225365,-46957840803409904538078515415369225364⟩,⟨8279934289454027608335163343171268103,8279934289454027608335163343171268104⟩⟩, + ⟨⟨-40685409900446552737507439330275362783299,-40685409900446552737507439330275362783298⟩,⟨-23489732358113082399862874825886428802813,-23489732358113082399862874825886428802812⟩⟩, + ⟨⟨-2137559789125226844683738093826479806274308,-2137559789125226844683738093826479806274307⟩,⟨-5872897253355744821342603260559866260065090,-5872897253355744821342603260559866260065089⟩⟩, + ⟨⟨94926723775988845796358099608024607997083555,94926723775988845796358099608024607997083556⟩,⟨-260809030077335571699786032542783432045089898,-260809030077335571699786032542783432045089897⟩⟩, + ⟨⟨5332718046471330560410575087897852350732487758,5332718046471330560410575087897852350732487759⟩,⟨-3078846199642597936314826729178585996042240530,-3078846199642597936314826729178585996042240529⟩⟩, + ⟨⟨83342183241475581268204610478810332860164401226,83342183241475581268204610478810332860164401227⟩,⟨14695475536621017627961840496844930604960187706,14695475536621017627961840496844930604960187707⟩⟩, + ⟨⟨526555325485457888107729922122946353655814416922,526555325485457888107729922122946353655814416923⟩,⟨627524200846908000129895200305148304717162028108,627524200846908000129895200305148304717162028109⟩⟩, + ⟨⟨-1,1⟩,⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩⟩, + ⟨⟨-23383753843717953207269829457490677600253832976061,-23383753843717953207269829457490677600253832976057⟩,⟨27867672651589536775502473644701076015069408780367,27867672651589536775502473644701076015069408780371⟩⟩, + ⟨⟨-181081398764239699762631983512251247703834730342326,-181081398764239699762631983512251247703834730342303⟩,⟨31929536306563946626866632960542574274576073417547,31929536306563946626866632960542574274576073417561⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635474979,-698970019787090239214134897920947303315208635474882⟩,⟨-403550529079554596708656969046895623673248550740077,-403550529079554596708656969046895623673248550739996⟩⟩, + ⟨⟨-1076305123772371910360366944827320127709562152939605,-1076305123772371910360366944827320127709562152939328⟩,⟨-2957124024007904207797250899130863519431964945782581,-2957124024007904207797250899130863519431964945782201⟩⟩, + ⟨⟨3793805179005335455803658547853051473311541055285876,3793805179005335455803658547853051473311541055286915⟩,⟨-10423394063127160400997832665273145235731940921099523,-10423394063127160400997832665273145235731940921098127⟩⟩, + ⟨⟨31040504379613153638845397438259401537550658444203251,31040504379613153638845397438259401537550658444208195⟩,⟨-17921243559351411743059444294652121584177020296561586,-17921243559351411743059444294652121584177020296557360⟩⟩] +lemma tw0_0_2_15_calc (j : Fin 31) : taylorWaveBox 0 0 2 15 j = tw0_0_2_15 j := by + revert j + decide +kernel +def tw0_0_2_16 : Fin 31 → CI := ![⟨⟨2606539218020916335801904305695669616417146414198362,2606539218020916335801904305695669616417146414198986⟩,⟨-4514658357533078058126056621844135307725227288724450,-4514658357533078058126056621844135307725227288723715⟩⟩, + ⟨⟨1414953132711989312503331390271063682357777984139276,1414953132711989312503331390271063682357777984139470⟩,⟨-515000823188879669806330841358650536513308361549829,-515000823188879669806330841358650536513308361549685⟩⟩, + ⟨⟨372750087729946141856130074395691315281896558669206,372750087729946141856130074395691315281896558669256⟩,⟨135669936753815979606294779979656663826606543176560,135669936753815979606294779979656663826606543176597⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910369,46955236204022331368942161583079895990618065910379⟩,⟨81328854786764263382283872837366397192702514363830,81328854786764263382283872837366397192702514363842⟩⟩, + ⟨⟨-3405572727239285880257962054137149906765144598162,-3405572727239285880257962054137149906765144598159⟩,⟨19313962693378062807360753024514251134046918332900,19313962693378062807360753024514251134046918332904⟩⟩, + ⟨⟨-2702125792434533407629312181695054762384497283890,-2702125792434533407629312181695054762384497283888⟩,⟨2267352755826432466267172190898043217059047861354,2267352755826432466267172190898043217059047861356⟩⟩, + ⟨⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩,⟨-1,1⟩⟩, + ⟨⟨-48677170847665483496448936740565738006754746431,-48677170847665483496448936740565738006754746430⟩,⟨-40844996105029553833776786737181289821663877621,-40844996105029553833776786737181289821663877620⟩⟩, + ⟨⟨-997439462679011712130137879297595027411858797,-997439462679011712130137879297595027411858796⟩,⟨-5656760290860736018578489776724083730960765067,-5656760290860736018578489776724083730960765066⟩⟩, + ⟨⟨179120011154259992099541326839751800501320136,179120011154259992099541326839751800501320137⟩,⟨-310244959971482327965865603780236805697259958,-310244959971482327965865603780236805697259957⟩⟩, + ⟨⟨12644378593840074943475543685472985539695531,12644378593840074943475543685472985539695532⟩,⟨-4602177438950526475251200749245236533556412,-4602177438950526475251200749245236533556411⟩⟩, + ⟨⟨227780874894198550818367508127105032113768,227780874894198550818367508127105032113769⟩,⟨82905458396601978551265386730310546627375,82905458396601978551265386730310546627376⟩⟩, + ⟨⟨683288616768875091932454402312285615926,683288616768875091932454402312285615927⟩,⟨1183490600477151214469396987076709006108,1183490600477151214469396987076709006109⟩⟩, + ⟨⟨-160569016888611097373085726720544096,-160569016888611097373085726720544095⟩,⟨910632146274269076808118556454600442,910632146274269076808118556454600443⟩⟩, + ⟨⟨-2702125792434533407629312181696,-2702125792434533407629312181695⟩,⟨2267352755826432466267172190898,2267352755826432466267172190899⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-2702125792434533407629312181696,-2702125792434533407629312181695⟩,⟨-2267352755826432466267172190899,-2267352755826432466267172190898⟩⟩, + ⟨⟨-160569016888611097373085726720544096,-160569016888611097373085726720544095⟩,⟨-910632146274269076808118556454600443,-910632146274269076808118556454600442⟩⟩, + ⟨⟨683288616768875091932454402312285615926,683288616768875091932454402312285615927⟩,⟨-1183490600477151214469396987076709006109,-1183490600477151214469396987076709006108⟩⟩, + ⟨⟨227780874894198550818367508127105032113768,227780874894198550818367508127105032113769⟩,⟨-82905458396601978551265386730310546627376,-82905458396601978551265386730310546627375⟩⟩, + ⟨⟨12644378593840074943475543685472985539695531,12644378593840074943475543685472985539695532⟩,⟨4602177438950526475251200749245236533556411,4602177438950526475251200749245236533556412⟩⟩, + ⟨⟨179120011154259992099541326839751800501320136,179120011154259992099541326839751800501320137⟩,⟨310244959971482327965865603780236805697259957,310244959971482327965865603780236805697259958⟩⟩, + ⟨⟨-997439462679011712130137879297595027411858797,-997439462679011712130137879297595027411858796⟩,⟨5656760290860736018578489776724083730960765066,5656760290860736018578489776724083730960765067⟩⟩, + ⟨⟨-48677170847665483496448936740565738006754746431,-48677170847665483496448936740565738006754746430⟩,⟨40844996105029553833776786737181289821663877620,40844996105029553833776786737181289821663877621⟩⟩, + ⟨⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩,⟨-1,1⟩⟩, + ⟨⟨-2702125792434533407629312181695054762384497283890,-2702125792434533407629312181695054762384497283888⟩,⟨-2267352755826432466267172190898043217059047861356,-2267352755826432466267172190898043217059047861354⟩⟩, + ⟨⟨-3405572727239285880257962054137149906765144598162,-3405572727239285880257962054137149906765144598159⟩,⟨-19313962693378062807360753024514251134046918332904,-19313962693378062807360753024514251134046918332900⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910369,46955236204022331368942161583079895990618065910379⟩,⟨-81328854786764263382283872837366397192702514363842,-81328854786764263382283872837366397192702514363830⟩⟩, + ⟨⟨372750087729946141856130074395691315281896558669206,372750087729946141856130074395691315281896558669256⟩,⟨-135669936753815979606294779979656663826606543176597,-135669936753815979606294779979656663826606543176560⟩⟩, + ⟨⟨1414953132711989312503331390271063682357777984139276,1414953132711989312503331390271063682357777984139470⟩,⟨515000823188879669806330841358650536513308361549685,515000823188879669806330841358650536513308361549829⟩⟩, + ⟨⟨2606539218020916335801904305695669616417146414198362,2606539218020916335801904305695669616417146414198986⟩,⟨4514658357533078058126056621844135307725227288723715,4514658357533078058126056621844135307725227288724450⟩⟩] +lemma tw0_0_2_16_calc (j : Fin 31) : taylorWaveBox 0 0 2 16 j = tw0_0_2_16 j := by + revert j + decide +kernel +def tw0_0_2_17 : Fin 31 → CI := ![⟨⟨-622070944276038605487991186313010558787987836966085,-622070944276038605487991186313010558787987836965981⟩,⟨-359152827132815577520148497810446873484169467973300,-359152827132815577520148497810446873484169467973212⟩⟩, + ⟨⟨-66230758006199782672449825576915022341243448251970,-66230758006199782672449825576915022341243448251950⟩,⟨-181967512095397343024154238325711839875261872409661,-181967512095397343024154238325711839875261872409634⟩⟩, + ⟨⟨16201332736971175771542258525136121007917692747560,16201332736971175771542258525136121007917692747566⟩,⟨-44512795859899258694050041178738711592985047036490,-44512795859899258694050041178738711592985047036483⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014813,8964987113086656144908199868279810049180380014815⟩,⟨-5175937723022106880706975999784460140708483619865,-5175937723022106880706975999784460140708483619863⟩⟩, + ⟨⟨1951586656144627026859542224489729987346412503438,1951586656144627026859542224489729987346412503439⟩,⟨344117382668911315444559148156678827047855797989,344117382668911315444559148156678827047855797991⟩⟩, + ⟨⟨208277741543885745725780386266751246026996089131,208277741543885745725780386266751246026996089132⟩,⟨248215746742334171308324598760823723902798979266,248215746742334171308324598760823723902798979267⟩⟩, + ⟨⟨-1,1⟩,⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩⟩, + ⟨⟨-3001598589461159419879311632394481805117603484,-3001598589461159419879311632394481805117603483⟩,⟨3577165902516049857019432339543102130316437163,3577165902516049857019432339543102130316437164⟩⟩, + ⟨⟨-363738760263759801324696055744219539384324630,-363738760263759801324696055744219539384324629⟩,⟨64136957363948940353655548743042498973445178,64136957363948940353655548743042498973445179⟩⟩, + ⟨⟨-17099355913327514924827956902083988283501397,-17099355913327514924827956902083988283501396⟩,⟨-9872317739528859864629699706620140344063728,-9872317739528859864629699706620140344063727⟩⟩, + ⟨⟨-211376708080755309076454735024981467079949,-211376708080755309076454735024981467079948⟩,⟨-580752732450526600856737150214308152108635,-580752732450526600856737150214308152108634⟩⟩, + ⟨⟨3046259403991333506150652090023937741859,3046259403991333506150652090023937741860⟩,⟨-8369528926267484671788702763690300323537,-8369528926267484671788702763690300323536⟩⟩, + ⟨⟨32614433123259572839408792308967567984,32614433123259572839408792308967567985⟩,⟨-18829951743180961350688361562004357041,-18829951743180961350688361562004357040⟩⟩, + ⟨⟨16730030765251168054062963039064751,16730030765251168054062963039064752⟩,⟨2949955811996468206719593781696159,2949955811996468206719593781696160⟩⟩, + ⟨⟨20827774154388574572578038626,20827774154388574572578038627⟩,⟨24821574674233417130832459876,24821574674233417130832459877⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨20827774154388574572578038626,20827774154388574572578038627⟩,⟨-24821574674233417130832459877,-24821574674233417130832459876⟩⟩, + ⟨⟨16730030765251168054062963039064751,16730030765251168054062963039064752⟩,⟨-2949955811996468206719593781696160,-2949955811996468206719593781696159⟩⟩, + ⟨⟨32614433123259572839408792308967567984,32614433123259572839408792308967567985⟩,⟨18829951743180961350688361562004357040,18829951743180961350688361562004357041⟩⟩, + ⟨⟨3046259403991333506150652090023937741859,3046259403991333506150652090023937741860⟩,⟨8369528926267484671788702763690300323536,8369528926267484671788702763690300323537⟩⟩, + ⟨⟨-211376708080755309076454735024981467079949,-211376708080755309076454735024981467079948⟩,⟨580752732450526600856737150214308152108634,580752732450526600856737150214308152108635⟩⟩, + ⟨⟨-17099355913327514924827956902083988283501397,-17099355913327514924827956902083988283501396⟩,⟨9872317739528859864629699706620140344063727,9872317739528859864629699706620140344063728⟩⟩, + ⟨⟨-363738760263759801324696055744219539384324630,-363738760263759801324696055744219539384324629⟩,⟨-64136957363948940353655548743042498973445179,-64136957363948940353655548743042498973445178⟩⟩, + ⟨⟨-3001598589461159419879311632394481805117603484,-3001598589461159419879311632394481805117603483⟩,⟨-3577165902516049857019432339543102130316437164,-3577165902516049857019432339543102130316437163⟩⟩, + ⟨⟨-1,1⟩,⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩⟩, + ⟨⟨208277741543885745725780386266751246026996089131,208277741543885745725780386266751246026996089132⟩,⟨-248215746742334171308324598760823723902798979267,-248215746742334171308324598760823723902798979266⟩⟩, + ⟨⟨1951586656144627026859542224489729987346412503438,1951586656144627026859542224489729987346412503439⟩,⟨-344117382668911315444559148156678827047855797991,-344117382668911315444559148156678827047855797989⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014813,8964987113086656144908199868279810049180380014815⟩,⟨5175937723022106880706975999784460140708483619863,5175937723022106880706975999784460140708483619865⟩⟩, + ⟨⟨16201332736971175771542258525136121007917692747560,16201332736971175771542258525136121007917692747566⟩,⟨44512795859899258694050041178738711592985047036483,44512795859899258694050041178738711592985047036490⟩⟩, + ⟨⟨-66230758006199782672449825576915022341243448251970,-66230758006199782672449825576915022341243448251950⟩,⟨181967512095397343024154238325711839875261872409634,181967512095397343024154238325711839875261872409661⟩⟩, + ⟨⟨-622070944276038605487991186313010558787987836966085,-622070944276038605487991186313010558787987836965981⟩,⟨359152827132815577520148497810446873484169467973212,359152827132815577520148497810446873484169467973300⟩⟩] +lemma tw0_0_2_17_calc (j : Fin 31) : taylorWaveBox 0 0 2 17 j = tw0_0_2_17 j := by + revert j + decide +kernel +def tw0_0_2_18 : Fin 31 → CI := ![⟨⟨-47012995134852432606621988115494129887473178666129,-47012995134852432606621988115494129887473178666117⟩,⟨81428896189552855155146582162217359628031458223013,81428896189552855155146582162217359628031458223028⟩⟩, + ⟨⟨-22231525524091027519438715008950773737959634268081,-22231525524091027519438715008950773737959634268077⟩,⟨8091613553098468514499672521188985602711602598575,8091613553098468514499672521188985602711602598578⟩⟩, + ⟨⟨-5049816505651727133155379628754918948021446865243,-5049816505651727133155379628754918948021446865241⟩,⟨-1837982896563394525352699681131033631914673412667,-1837982896563394525352699681131033631914673412666⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨-938811255133340262646138237899899244591360555188,-938811255133340262646138237899899244591360555187⟩⟩, + ⟨⟨33032897375047760228034894501605196136047441249,33032897375047760228034894501605196136047441250⟩,⟨-187338870332405922382853099254430182020133391779,-187338870332405922382853099254430182020133391778⟩⟩, + ⟨⟨21660910179750602382268348684341164004098670971,21660910179750602382268348684341164004098670972⟩,⟨-18175661742792920542455322951957157239827939065,-18175661742792920542455322951957157239827939064⟩⟩, + ⟨⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩,⟨-1,1⟩⟩, + ⟨⟨249733291555918326834600769866049794723221158,249733291555918326834600769866049794723221159⟩,⟨209551112837259204777728604159734578170055103,209551112837259204777728604159734578170055104⟩⟩, + ⟨⟨3917903773742462425269510994412537355834094,3917903773742462425269510994412537355834095⟩,⟨22219536443037243243281342441610441592306592,22219536443037243243281342441610441592306593⟩⟩, + ⟨⟨-516913348073467668048602808295802774391485,-516913348073467668048602808295802774391484⟩,⟨895320181973781836172235715770625347701416,895320181973781836172235715770625347701417⟩⟩, + ⟨⟨-25340118303038515139591862560827555757771,-25340118303038515139591862560827555757770⟩,⟨9223048795090210595553553964450014571074,9223048795090210595553553964450014571075⟩⟩, + ⟨⟨-292151673208546668083461946537821367382,-292151673208546668083461946537821367381⟩,⟨-106334512938977726863032770963537066015,-106334512938977726863032770963537066014⟩⟩, + ⟨⟨-492966983865230243729212578101923728,-492966983865230243729212578101923727⟩,⟨-853843862508565746471629825373292301,-853843862508565746471629825373292300⟩⟩, + ⟨⟨51486441707681209843652526785074,51486441707681209843652526785075⟩,⟨-291994120813579423794053632269058,-291994120813579423794053632269057⟩⟩, + ⟨⟨216609101797506023822683486,216609101797506023822683487⟩,⟨-181756617427929205424553230,-181756617427929205424553229⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨216609101797506023822683486,216609101797506023822683487⟩,⟨181756617427929205424553229,181756617427929205424553230⟩⟩, + ⟨⟨51486441707681209843652526785074,51486441707681209843652526785075⟩,⟨291994120813579423794053632269057,291994120813579423794053632269058⟩⟩, + ⟨⟨-492966983865230243729212578101923728,-492966983865230243729212578101923727⟩,⟨853843862508565746471629825373292300,853843862508565746471629825373292301⟩⟩, + ⟨⟨-292151673208546668083461946537821367382,-292151673208546668083461946537821367381⟩,⟨106334512938977726863032770963537066014,106334512938977726863032770963537066015⟩⟩, + ⟨⟨-25340118303038515139591862560827555757771,-25340118303038515139591862560827555757770⟩,⟨-9223048795090210595553553964450014571075,-9223048795090210595553553964450014571074⟩⟩, + ⟨⟨-516913348073467668048602808295802774391485,-516913348073467668048602808295802774391484⟩,⟨-895320181973781836172235715770625347701417,-895320181973781836172235715770625347701416⟩⟩, + ⟨⟨3917903773742462425269510994412537355834094,3917903773742462425269510994412537355834095⟩,⟨-22219536443037243243281342441610441592306593,-22219536443037243243281342441610441592306592⟩⟩, + ⟨⟨249733291555918326834600769866049794723221158,249733291555918326834600769866049794723221159⟩,⟨-209551112837259204777728604159734578170055104,-209551112837259204777728604159734578170055103⟩⟩, + ⟨⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩,⟨-1,1⟩⟩, + ⟨⟨21660910179750602382268348684341164004098670971,21660910179750602382268348684341164004098670972⟩,⟨18175661742792920542455322951957157239827939064,18175661742792920542455322951957157239827939065⟩⟩, + ⟨⟨33032897375047760228034894501605196136047441249,33032897375047760228034894501605196136047441250⟩,⟨187338870332405922382853099254430182020133391778,187338870332405922382853099254430182020133391779⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨938811255133340262646138237899899244591360555187,938811255133340262646138237899899244591360555188⟩⟩, + ⟨⟨-5049816505651727133155379628754918948021446865243,-5049816505651727133155379628754918948021446865241⟩,⟨1837982896563394525352699681131033631914673412666,1837982896563394525352699681131033631914673412667⟩⟩, + ⟨⟨-22231525524091027519438715008950773737959634268081,-22231525524091027519438715008950773737959634268077⟩,⟨-8091613553098468514499672521188985602711602598578,-8091613553098468514499672521188985602711602598575⟩⟩, + ⟨⟨-47012995134852432606621988115494129887473178666129,-47012995134852432606621988115494129887473178666117⟩,⟨-81428896189552855155146582162217359628031458223028,-81428896189552855155146582162217359628031458223013⟩⟩] +lemma tw0_0_2_18_calc (j : Fin 31) : taylorWaveBox 0 0 2 18 j = tw0_0_2_18 j := by + revert j + decide +kernel +def tw0_0_2_19 : Fin 31 → CI := ![⟨⟨10151445319802585615026049916779046022334427963226,10151445319802585615026049916779046022334427963229⟩,⟨5860939688051789411371205992794324400539448741818,5860939688051789411371205992794324400539448741820⟩⟩, + ⟨⟨941501988670435297502746567106550767843713472137,941501988670435297502746567106550767843713472139⟩,⟨2586755454243642592337334965453612746561232060391,2586755454243642592337334965453612746561232060393⟩⟩, + ⟨⟨-198583376583265179807116376167075556669601975817,-198583376583265179807116376167075556669601975816⟩,⟨545603343041574881995496705950054120562806391237,545603343041574881995496705950054120562806391238⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨54057627228469227234095818009485456165873225657,54057627228469227234095818009485456165873225658⟩⟩, + ⟨⟨-17126895784256800101969225139333115566944566115,-17126895784256800101969225139333115566944566114⟩,⟨-3019933822546538873879549191930767351772415011,-3019933822546538873879549191930767351772415010⟩⟩, + ⟨⟨-1510595910192891462356450438593964578230006353,-1510595910192891462356450438593964578230006352⟩,⟨-1800258102930498946545557891088101158417769051,-1800258102930498946545557891088101158417769050⟩⟩, + ⟨⟨-1,1⟩,⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩⟩, + ⟨⟨13932788077060303319578255875139544556882285,13932788077060303319578255875139544556882286⟩,⟨-16604450245690390709636721857557753892055265,-16604450245690390709636721857557753892055264⟩⟩, + ⟨⟨1292680230659564606191559570157369093120719,1292680230659564606191559570157369093120720⟩,⟨-227934402093723100445478441372035816892457,-227934402093723100445478441372035816892456⟩⟩, + ⟨⟨44646528671420791186203576914564632907781,44646528671420791186203576914564632907782⟩,⟨25776685346827138535545262341253974993645,25776685346827138535545262341253974993646⟩⟩, + ⟨⟨383268020348619046250913173422236845459,383268020348619046250913173422236845460⟩,⟨1053020231506905518195061560674525335473,1053020231506905518195061560674525335474⟩⟩, + ⟨⟨-3535023541504140114181714490149991420,-3535023541504140114181714490149991419⟩,⟨9712397357523134716641082213918776723,9712397357523134716641082213918776724⟩⟩, + ⟨⟨-21289123855314632027723110635073010,-21289123855314632027723110635073009⟩,⟨12291281388677186267635947390200603,12291281388677186267635947390200604⟩⟩, + ⟨⟨-4853579813964823590211987443942,-4853579813964823590211987443941⟩,⟨-855817074223970464035245865836,-855817074223970464035245865835⟩⟩, + ⟨⟨-1510595910192891462356451,-1510595910192891462356450⟩,⟨-1800258102930498946545558,-1800258102930498946545557⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1510595910192891462356451,-1510595910192891462356450⟩,⟨1800258102930498946545557,1800258102930498946545558⟩⟩, + ⟨⟨-4853579813964823590211987443942,-4853579813964823590211987443941⟩,⟨855817074223970464035245865835,855817074223970464035245865836⟩⟩, + ⟨⟨-21289123855314632027723110635073010,-21289123855314632027723110635073009⟩,⟨-12291281388677186267635947390200604,-12291281388677186267635947390200603⟩⟩, + ⟨⟨-3535023541504140114181714490149991420,-3535023541504140114181714490149991419⟩,⟨-9712397357523134716641082213918776724,-9712397357523134716641082213918776723⟩⟩, + ⟨⟨383268020348619046250913173422236845459,383268020348619046250913173422236845460⟩,⟨-1053020231506905518195061560674525335474,-1053020231506905518195061560674525335473⟩⟩, + ⟨⟨44646528671420791186203576914564632907781,44646528671420791186203576914564632907782⟩,⟨-25776685346827138535545262341253974993646,-25776685346827138535545262341253974993645⟩⟩, + ⟨⟨1292680230659564606191559570157369093120719,1292680230659564606191559570157369093120720⟩,⟨227934402093723100445478441372035816892456,227934402093723100445478441372035816892457⟩⟩, + ⟨⟨13932788077060303319578255875139544556882285,13932788077060303319578255875139544556882286⟩,⟨16604450245690390709636721857557753892055264,16604450245690390709636721857557753892055265⟩⟩, + ⟨⟨-1,1⟩,⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩⟩, + ⟨⟨-1510595910192891462356450438593964578230006353,-1510595910192891462356450438593964578230006352⟩,⟨1800258102930498946545557891088101158417769050,1800258102930498946545557891088101158417769051⟩⟩, + ⟨⟨-17126895784256800101969225139333115566944566115,-17126895784256800101969225139333115566944566114⟩,⟨3019933822546538873879549191930767351772415010,3019933822546538873879549191930767351772415011⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨-54057627228469227234095818009485456165873225658,-54057627228469227234095818009485456165873225657⟩⟩, + ⟨⟨-198583376583265179807116376167075556669601975817,-198583376583265179807116376167075556669601975816⟩,⟨-545603343041574881995496705950054120562806391238,-545603343041574881995496705950054120562806391237⟩⟩, + ⟨⟨941501988670435297502746567106550767843713472137,941501988670435297502746567106550767843713472139⟩,⟨-2586755454243642592337334965453612746561232060393,-2586755454243642592337334965453612746561232060391⟩⟩, + ⟨⟨10151445319802585615026049916779046022334427963226,10151445319802585615026049916779046022334427963229⟩,⟨-5860939688051789411371205992794324400539448741820,-5860939688051789411371205992794324400539448741818⟩⟩] +lemma tw0_0_2_19_calc (j : Fin 31) : taylorWaveBox 0 0 2 19 j = tw0_0_2_19 j := by + revert j + decide +kernel +def tw0_0_2_20 : Fin 31 → CI := ![⟨⟨697450191936225609746866483250619399950190057173,697450191936225609746866483250619399950190057174⟩,⟨-1208019168182208037455005163664889817788595591496,-1208019168182208037455005163664889817788595591495⟩⟩, + ⟨⟨287301633948465115230296808480327821407251496008,287301633948465115230296808480327821407251496009⟩,⟨-104569243013285565308303889588413836671543468827,-104569243013285565308303889588413836671543468826⟩⟩, + ⟨⟨56269759862512033612762834669705761495797596639,56269759862512033612762834669705761495797596640⟩,⟨20480517679261455649910273123960670746916152073,20480517679261455649910273123960670746916152074⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨8913608172637075300767496000977635458262637098,8913608172637075300767496000977635458262637099⟩⟩, + ⟨⟨-263538941978876356275041064371755865830794490,-263538941978876356275041064371755865830794489⟩,⟨1494603610406087877640143919338749932360143400,1494603610406087877640143919338749932360143401⟩⟩, + ⟨⟨-142820142190200841330498943499579592340493108,-142820142190200841330498943499579592340493107⟩,⟨119840328636484214263801531006843742068844774,119840328636484214263801531006843742068844775⟩⟩, + ⟨⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩,⟨-1,1⟩⟩, + ⟨⟨-1053826644621377148472560642585698735378067,-1053826644621377148472560642585698735378066⟩,⟨-884265548826588099949932560535276459229914,-884265548826588099949932560535276459229913⟩⟩, + ⟨⟨-12657927529864033718703524187507406990216,-12657927529864033718703524187507406990215⟩,⟨-71786674274156396448719906754280527656766,-71786674274156396448719906754280527656765⟩⟩, + ⟨⟨1226967353325572878966968477302760281919,1226967353325572878966968477302760281920⟩,⟨-2125169795188206505958436966175469269339,-2125169795188206505958436966175469269338⟩⟩, + ⟨⟨41769704840700981151943225851013332579,41769704840700981151943225851013332580⟩,⟨-15202929256100062895433261993913313808,-15202929256100062895433261993913313807⟩⟩, + ⟨⟨308206022092319197919782327059530972,308206022092319197919782327059530973⟩,⟨112177818063195758933144088775373157,112177818063195758933144088775373158⟩⟩, + ⟨⟨292531812983887881986372107816400,292531812983887881986372107816401⟩,⟨506679962918330790032967797798030,506679962918330790032967797798031⟩⟩, + ⟨⟨-13578932490902709141617722874,-13578932490902709141617722873⟩,⟨77009952965472753273062070585,77009952965472753273062070586⟩⟩, + ⟨⟨-14282014219020084133050,-14282014219020084133049⟩,⟨11984032863648421426380,11984032863648421426381⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-14282014219020084133050,-14282014219020084133049⟩,⟨-11984032863648421426381,-11984032863648421426380⟩⟩, + ⟨⟨-13578932490902709141617722874,-13578932490902709141617722873⟩,⟨-77009952965472753273062070586,-77009952965472753273062070585⟩⟩, + ⟨⟨292531812983887881986372107816400,292531812983887881986372107816401⟩,⟨-506679962918330790032967797798031,-506679962918330790032967797798030⟩⟩, + ⟨⟨308206022092319197919782327059530972,308206022092319197919782327059530973⟩,⟨-112177818063195758933144088775373158,-112177818063195758933144088775373157⟩⟩, + ⟨⟨41769704840700981151943225851013332579,41769704840700981151943225851013332580⟩,⟨15202929256100062895433261993913313807,15202929256100062895433261993913313808⟩⟩, + ⟨⟨1226967353325572878966968477302760281919,1226967353325572878966968477302760281920⟩,⟨2125169795188206505958436966175469269338,2125169795188206505958436966175469269339⟩⟩, + ⟨⟨-12657927529864033718703524187507406990216,-12657927529864033718703524187507406990215⟩,⟨71786674274156396448719906754280527656765,71786674274156396448719906754280527656766⟩⟩, + ⟨⟨-1053826644621377148472560642585698735378067,-1053826644621377148472560642585698735378066⟩,⟨884265548826588099949932560535276459229913,884265548826588099949932560535276459229914⟩⟩, + ⟨⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩,⟨-1,1⟩⟩, + ⟨⟨-142820142190200841330498943499579592340493108,-142820142190200841330498943499579592340493107⟩,⟨-119840328636484214263801531006843742068844775,-119840328636484214263801531006843742068844774⟩⟩, + ⟨⟨-263538941978876356275041064371755865830794490,-263538941978876356275041064371755865830794489⟩,⟨-1494603610406087877640143919338749932360143401,-1494603610406087877640143919338749932360143400⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨-8913608172637075300767496000977635458262637099,-8913608172637075300767496000977635458262637098⟩⟩, + ⟨⟨56269759862512033612762834669705761495797596639,56269759862512033612762834669705761495797596640⟩,⟨-20480517679261455649910273123960670746916152074,-20480517679261455649910273123960670746916152073⟩⟩, + ⟨⟨287301633948465115230296808480327821407251496008,287301633948465115230296808480327821407251496009⟩,⟨104569243013285565308303889588413836671543468826,104569243013285565308303889588413836671543468827⟩⟩, + ⟨⟨697450191936225609746866483250619399950190057173,697450191936225609746866483250619399950190057174⟩,⟨1208019168182208037455005163664889817788595591495,1208019168182208037455005163664889817788595591496⟩⟩] +lemma tw0_0_2_20_calc (j : Fin 31) : taylorWaveBox 0 0 2 20 j = tw0_0_2_20 j := by + revert j + decide +kernel +def tw0_0_2 : Fin 21 → Fin 31 → CI := ![tw0_0_2_0,tw0_0_2_1,tw0_0_2_2,tw0_0_2_3,tw0_0_2_4,tw0_0_2_5,tw0_0_2_6,tw0_0_2_7,tw0_0_2_8,tw0_0_2_9,tw0_0_2_10,tw0_0_2_11,tw0_0_2_12,tw0_0_2_13,tw0_0_2_14,tw0_0_2_15,tw0_0_2_16,tw0_0_2_17,tw0_0_2_18,tw0_0_2_19,tw0_0_2_20] +lemma tw0_0_2_mem (l : Fin 21) (j : Fin 31) : (tw0_0_2 l j).Mem (taylorWave 0 0 (nearNode 2) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 2 l j = tw0_0_2 l j := by + fin_cases l + · exact tw0_0_2_0_calc j + · exact tw0_0_2_1_calc j + · exact tw0_0_2_2_calc j + · exact tw0_0_2_3_calc j + · exact tw0_0_2_4_calc j + · exact tw0_0_2_5_calc j + · exact tw0_0_2_6_calc j + · exact tw0_0_2_7_calc j + · exact tw0_0_2_8_calc j + · exact tw0_0_2_9_calc j + · exact tw0_0_2_10_calc j + · exact tw0_0_2_11_calc j + · exact tw0_0_2_12_calc j + · exact tw0_0_2_13_calc j + · exact tw0_0_2_14_calc j + · exact tw0_0_2_15_calc j + · exact tw0_0_2_16_calc j + · exact tw0_0_2_17_calc j + · exact tw0_0_2_18_calc j + · exact tw0_0_2_19_calc j + · exact tw0_0_2_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 2 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave003.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave003.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c98bc84c90f725e62f708a70ed288ebdf6bc905 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave003.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_3_0 : Fin 31 → CI := ![⟨⟨-2967822269668779360198432786705442237105162346593076211475359,-2967822269668779360198432786705442237105162346592485180059387⟩,⟨-1713472986300235871325432465256276238769739480424052800075367,-1713472986300235871325432465256276238769739480423470580056149⟩⟩, + ⟨⟨518383346349329935684158857807988045097954552138895120874363,518383346349329935684158857807988045097954552139511716795965⟩,⟨-2939898047743545220826771225508802580983229476759917846720413,-2939898047743545220826771225508802580983229476759285619632901⟩⟩, + ⟨⟨2534912092187036440406756821994834878500845824348648012723532,2534912092187036440406756821994834878500845824349040233180144⟩,⟨-446973395576718158829708402905867242967113874038562518348150,-446973395576718158829708402905867242967113874038183347750314⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471024377960394,1096622711232150957648276777764016792812633267471357838635283⟩,⟨1899406252588018790526996983491483031747303901819220049901187,1899406252588018790526996983491483031747303901819558146987165⟩⟩, + ⟨⟨-1184616033958156269758063271626538729572212032240587674298438,-1184616033958156269758063271626538729572212032240394892624029⟩,⟨1411770414314337356801414736540538896084716620991862290301667,1411770414314337356801414736540538896084716620992057131817184⟩⟩, + ⟨⟨-1431233707682067145179880714103188468078330909610724833775672,-1431233707682067145179880714103188468078330909610615594785594⟩,⟨-520926467874727369065014829852266492253403644665163035842593,-520926467874727369065014829852266492253403644665060054031812⟩⟩, + ⟨⟨-53856737457,60946606362⟩,⟨-1233700550136169827354311374984518891914212425905159512174125,-1233700550136169827354311374984518891914212425905036854848678⟩⟩, + ⟨⟨915989572916522972915123657026040619570131782150791447218255,915989572916522972915123657026040619570131782150870258967801⟩,⟨-333392939439825516201609491105450555042178332585703779591882,-333392939439825516201609491105450555042178332585628469853137⟩⟩, + ⟨⟨479720542677269894364835539749590064041639583303968524648646,479720542677269894364835539749590064041639583304026109111202⟩,⟨571708680176880417217101835458565338083893507674403746646652,571708680176880417217101835458565338083893507674461698369412⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867816264078364,-274155677808037739412069194441004198203158316867784747854131⟩,⟨474851563147004697631749245872870757936825975454829221159480,474851563147004697631749245872870757936825975454862177010465⟩⟩, + ⟨⟨-374986995885656278166680003253673798594799678158119256746795,-374986995885656278166680003253673798594799678158106055167285⟩,⟨-66120324789455348939305976761222964935963590834086573278061,-66120324789455348939305976761222964935963590834075409194123⟩⟩, + ⟨⟨-42317007865251423321155825127182697559016698133815230362535,-42317007865251423321155825127182697559016698133807059227619⟩,⟨-239991677366820018026675202082351231100671794021196920250234,-239991677366820018026675202082351231100671794021187522564172⟩⟩, + ⟨⟨118712890786751174407937311468217689484206493863709891849392,118712890786751174407937311468217689484206493863713351574755⟩,⟨-68538919452009434853017298610251049550789579216951383188063,-68538919452009434853017298610251049550789579216948187571462⟩⟩, + ⟨⟨46670096340969829976906272282331864333379061850973480790438,46670096340969829976906272282331864333379061850974493751764⟩,⟨39160860626715909744068207326497148085031802718693326213316,39160860626715909744068207326497148085031802718694259033726⟩⟩, + ⟨⟨-5209264678747273690650148298522664922534036446651123334609,-5209264678747273690650148298522664922534036446651025313604⟩,⟨14312337076820671451798807141031884680783309096106635743295,14312337076820671451798807141031884680783309096106798479072⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨-5209264678747273690650148298522664922534036446651123334536,-5209264678747273690650148298522664922534036446651025313530⟩,⟨-14312337076820671451798807141031884680783309096106798479099,-14312337076820671451798807141031884680783309096106635743321⟩⟩, + ⟨⟨46670096340969829976906272282331864333379061850973480790673,46670096340969829976906272282331864333379061850974493751892⟩,⟨-39160860626715909744068207326497148085031802718694259033461,-39160860626715909744068207326497148085031802718693326213153⟩⟩, + ⟨⟨118712890786751174407937311468217689484206493863709891849061,118712890786751174407937311468217689484206493863713351574191⟩,⟨68538919452009434853017298610251049550789579216948187572373,68538919452009434853017298610251049550789579216951383188735⟩⟩, + ⟨⟨-42317007865251423321155825127182697559016698133815230364238,-42317007865251423321155825127182697559016698133807059228624⟩,⟨239991677366820018026675202082351231100671794021187522563590,239991677366820018026675202082351231100671794021196920250350⟩⟩, + ⟨⟨-374986995885656278166680003253673798594799678158119256747060,-374986995885656278166680003253673798594799678158106055167625⟩,⟨66120324789455348939305976761222964935963590834075409192646,66120324789455348939305976761222964935963590834086573276507⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867816264075448,-274155677808037739412069194441004198203158316867784747852652⟩,⟨-474851563147004697631749245872870757936825975454862177011022,-474851563147004697631749245872870757936825975454829221161478⟩⟩, + ⟨⟨479720542677269894364835539749590064041639583303968524649989,479720542677269894364835539749590064041639583304026109116885⟩,⟨-571708680176880417217101835458565338083893507674461698368598,-571708680176880417217101835458565338083893507674403746641513⟩⟩, + ⟨⟨915989572916522972915123657026040619570131782150791447218298,915989572916522972915123657026040619570131782150870258964894⟩,⟨333392939439825516201609491105450555042178332585628469858852,333392939439825516201609491105450555042178332585703779594640⟩⟩, + ⟨⟨-53856740238,60946594307⟩,⟨1233700550136169827354311374984518891914212425905036854853203,1233700550136169827354311374984518891914212425905159512169378⟩⟩, + ⟨⟨-1431233707682067145179880714103188468078330909610724833778993,-1431233707682067145179880714103188468078330909610615594788289⟩,⟨520926467874727369065014829852266492253403644665060054024301,520926467874727369065014829852266492253403644665163035835717⟩⟩, + ⟨⟨-1184616033958156269758063271626538729572212032240587674288676,-1184616033958156269758063271626538729572212032240394892617424⟩,⟨-1411770414314337356801414736540538896084716620992057131822107,-1411770414314337356801414736540538896084716620991862290309767⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267471024377975610,1096622711232150957648276777764016792812633267471357838646003⟩,⟨-1899406252588018790526996983491483031747303901819558146978115,-1899406252588018790526996983491483031747303901819220049896615⟩⟩, + ⟨⟨2534912092187036440406756821994834878500845824348648012721057,2534912092187036440406756821994834878500845824349040233178378⟩,⟨446973395576718158829708402905867242967113874038183347763474,446973395576718158829708402905867242967113874038562518362015⟩⟩, + ⟨⟨518383346349329935684158857807988045097954552138895120867417,518383346349329935684158857807988045097954552139511716775789⟩,⟨2939898047743545220826771225508802580983229476759285619641982,2939898047743545220826771225508802580983229476759917846716257⟩⟩, + ⟨⟨-2967822269668779360198432786705442237105162346593076211484350,-2967822269668779360198432786705442237105162346592485180068730⟩,⟨1713472986300235871325432465256276238769739480423470580041074,1713472986300235871325432465256276238769739480424052800059955⟩⟩] +lemma tw0_0_3_0_calc (j : Fin 31) : taylorWaveBox 0 0 3 0 j = tw0_0_3_0 j := by + revert j + decide +kernel +def tw0_0_3_1 : Fin 31 → CI := ![⟨⟨-1495287262745940401980917971985985493934475721734696071013467,-1495287262745940401980917971985985493934475721734183228550950⟩,⟨2589913510986562080301927490833042405511561092141307711031898,2589913510986562080301927490833042405511561092141831727192232⟩⟩, + ⟨⟨-2394508694950321414435526260565255648915704031832486857429399,-2394508694950321414435526260565255648915704031831964294737610⟩,⟨-422216488460756964081019474919970424751082145524076995734686,-422216488460756964081019474919970424751082145523573442425155⟩⟩, + ⟨⟨-338050154937420936620262312827687690662582898584618652565375,-338050154937420936620262312827687690662582898584330806252745⟩,⟨-1917177697815545243263429735591059278669023964262326147838874,-1917177697815545243263429735591059278669023964262023405277051⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176370167132967,1326035717625119785114586875306517711621919279176610424329428⟩,⟨-765587078525921485814230001656824572894451569528139288141563,-765587078525921485814230001656824572894451569527904051734085⟩⟩, + ⟨⟨903468207107754631304900264884605649519828416652211536372541,903468207107754631304900264884605649519828416652339101819900⟩,⟨758099839364515342750157131809844154743186637813615931280010,758099839364515342750157131809844154743186637813741715801805⟩⟩, + ⟨⟨-303062734173282025096557719575075325357503710632114668372292,-303062734173282025096557719575075325357503710632053791304714⟩,⟨832658018819271067888981532540319795509333254930619328957563,832658018819271067888981532540319795509333254930685532058641⟩⟩, + ⟨⟨-645964097506246253655756563897945733379693511789305710240247,-645964097506246253655756563897945733379693511789239430847238⟩,⟨-31911568470,28199321793⟩⟩, + ⟨⟨-155168119896720396849437552422438566583041899843642448012839,-155168119896720396849437552422438566583041899843606903353371⟩,⟨-426320905635466786759158544660643735300778626524513954983077,-426320905635466786759158544660643735300778626524475917307647⟩⟩, + ⟨⟨232824639397415355775793231296333386765816038250725566849043,232824639397415355775793231296333386765816038250749908414843⟩,⟨-195363069047354442196321484756406119516839231232235969955982,-195363069047354442196321484756406119516839231232211897198392⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897054721316551,165754464703139973139323359413314713952739909897066752691552⟩,⟨95698384815740185726778750207103071611806446190998008377643,95698384815740185726778750207103071611806446191009314232679⟩⟩, + ⟨⟨-19233622834400371906023117479954920952582094821604166144666,-19233622834400371906023117479954920952582094821600857421762⟩,⟨109079295506118869097828273531580523365329083082734184969340,109079295506118869097828273531580523365329083082738372363339⟩⟩, + ⟨⟨-55848599299132860978088076048169227963048490538362185329770,-55848599299132860978088076048169227963048490538359820617304⟩,⟨9847614891212990415883836149736919527722032548659359129038,9847614891212990415883836149736919527722032548661291984411⟩⟩, + ⟨⟨-11962298101967523215847343775887883951475805773875696036651,-11962298101967523215847343775887883951475805773875100219159⟩,⟨-20719308087892496642415419926664339244092488737132961391964,-20719308087892496642415419926664339244092488737132291604368⟩⟩, + ⟨⟨4556573039005351421488547749420550892521031632238413174434,4556573039005351421488547749420550892521031632238536217042⟩,⟨-5430312289152544741126372741605443423109411970862742239558,-5430312289152544741126372741605443423109411970862607090934⟩⟩, + ⟨⟨832658018819271067888981532540319795509333254930647242324,832658018819271067888981532540319795509333254930659360342⟩,⟨303062734173282025096557719575075325357503710632078503612,303062734173282025096557719575075325357503710632085170923⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨832658018819271067888981532540319795509333254930647242325,832658018819271067888981532540319795509333254930659360344⟩,⟨-303062734173282025096557719575075325357503710632085170919,-303062734173282025096557719575075325357503710632078503608⟩⟩, + ⟨⟨4556573039005351421488547749420550892521031632238413174415,4556573039005351421488547749420550892521031632238536217011⟩,⟨5430312289152544741126372741605443423109411970862607090961,5430312289152544741126372741605443423109411970862742239574⟩⟩, + ⟨⟨-11962298101967523215847343775887883951475805773875696036769,-11962298101967523215847343775887883951475805773875100219317⟩,⟨20719308087892496642415419926664339244092488737132291604310,20719308087892496642415419926664339244092488737132961391865⟩⟩, + ⟨⟨-55848599299132860978088076048169227963048490538362185329797,-55848599299132860978088076048169227963048490538359820617168⟩,⟨-9847614891212990415883836149736919527722032548661291984807,-9847614891212990415883836149736919527722032548659359129272⟩⟩, + ⟨⟨-19233622834400371906023117479954920952582094821604166144214,-19233622834400371906023117479954920952582094821600857421333⟩,⟨-109079295506118869097828273531580523365329083082738372363416,-109079295506118869097828273531580523365329083082734184969439⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897054721317249,165754464703139973139323359413314713952739909897066752691747⟩,⟨-95698384815740185726778750207103071611806446191009314231661,-95698384815740185726778750207103071611806446190998008377126⟩⟩, + ⟨⟨232824639397415355775793231296333386765816038250725566846950,232824639397415355775793231296333386765816038250749908414513⟩,⟨195363069047354442196321484756406119516839231232211897198939,195363069047354442196321484756406119516839231232235969958296⟩⟩, + ⟨⟨-155168119896720396849437552422438566583041899843642448014123,-155168119896720396849437552422438566583041899843606903356031⟩,⟨426320905635466786759158544660643735300778626524475917307668,426320905635466786759158544660643735300778626524513954981724⟩⟩, + ⟨⟨-645964097506246253655756563897945733379693511789305710237763,-645964097506246253655756563897945733379693511789239430849609⟩,⟨-28199323249,31911562159⟩⟩, + ⟨⟨-303062734173282025096557719575075325357503710632114668368291,-303062734173282025096557719575075325357503710632053791300345⟩,⟨-832658018819271067888981532540319795509333254930685532060573,-832658018819271067888981532540319795509333254930619328959130⟩⟩, + ⟨⟨903468207107754631304900264884605649519828416652211536377726,903468207107754631304900264884605649519828416652339101823051⟩,⟨-758099839364515342750157131809844154743186637813741715795558,-758099839364515342750157131809844154743186637813615931275783⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176370167129776,1326035717625119785114586875306517711621919279176610424323110⟩,⟨765587078525921485814230001656824572894451569527904051744708,765587078525921485814230001656824572894451569528139288149047⟩⟩, + ⟨⟨-338050154937420936620262312827687690662582898584618652575861,-338050154937420936620262312827687690662582898584330806262698⟩,⟨1917177697815545243263429735591059278669023964262023405275181,1917177697815545243263429735591059278669023964262326147837539⟩⟩, + ⟨⟨-2394508694950321414435526260565255648915704031832486857426014,-2394508694950321414435526260565255648915704031831964294745006⟩,⟨422216488460756964081019474919970424751082145523573442419498,422216488460756964081019474919970424751082145524076995718253⟩⟩, + ⟨⟨-1495287262745940401980917971985985493934475721734696071000019,-1495287262745940401980917971985985493934475721734183228537794⟩,⟨-2589913510986562080301927490833042405511561092141831727200078,-2589913510986562080301927490833042405511561092141307711040052⟩⟩] +lemma tw0_0_3_1_calc (j : Fin 31) : taylorWaveBox 0 0 3 1 j = tw0_0_3_1 j := by + revert j + decide +kernel +def tw0_0_3_2 : Fin 31 → CI := ![⟨⟨1695094429072569102122468916644420780784284438590326345269647,1695094429072569102122468916644420780784284438590674708697734⟩,⟨978663224926882768659580888799522481530988635632367104202111,978663224926882768659580888799522481530988635632705873990730⟩⟩, + ⟨⟨-257917375794709903073882661317482435416423077410897164143306,-257917375794709903073882661317482435416423077410588739954420⟩,⟨1462722124308046970919624376034869579504756722780560090346305,1462722124308046970919624376034869579504756722780883961718632⟩⟩, + ⟨⟨-1087484553112300331539863385150247554670849561623897081276904,-1087484553112300331539863385150247554670849561623721894435141⟩,⟨191752867817386233384349299507721153632040283057182460556990,191752867817386233384349299507721153632040283057346346566923⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155143183543541,-400860456930051182042964332052284408435092945155018738070140⟩,⟨-694310678148124304229363268257554751809242906046736475583345,-694310678148124304229363268257554751809242906046608467149915⟩⟩, + ⟨⟨363861802033150017212378537612734879481314612845468261520034,363861802033150017212378537612734879481314612845529791964594⟩,⟨-433633609780809742448271001414809272613960618727988522025427,-433633609780809742448271001414809272613960618727925914707398⟩⟩, + ⟨⟨363315599288229693214832659048981234540806892877044705755056,363315599288229693214832659048981234540806892877074748776750⟩,⟨132236063785502665331348690938923718992315647228771088970205,132236063785502665331348690938923718992315647228798072522377⟩⟩, + ⟨⟨-12531643635,11073847774⟩,⟨253669507901048013636563366376836227212832254355937936172481,253669507901048013636563366376836227212832254355964771484375⟩⟩, + ⟨⟨-148814069468458882340795457146462713667914503322450851230643,-148814069468458882340795457146462713667914503322437099887225⟩,⟨54163891726541891719720423808583155299252489104903019146465,54163891726541891719720423808583155299252489104915598982273⟩⟩, + ⟨⟨-59670253854353745736419702807743763788992308274167911689543,-59670253854353745736419702807743763788992308274160369147825⟩,⟨-71112239401934580398763655105317742199721292641615079895040,-71112239401934580398763655105317742199721292641607418829554⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072191289623529,25053778558128198877685270753267775527193309072194329238111⟩,⟨-43394417384257769014335204266097171988077681627918529448274,-43394417384257769014335204266097171988077681627915241512943⟩⟩, + ⟨⟨23797410654220360183901635647172883360851544974435983107010,23797410654220360183901635647172883360851544974436972404176⟩,⟨4196125569338132273562491236032552117223667830635610065482,4196125569338132273562491236032552117223667830636345273525⟩⟩, + ⟨⟨1718733033200898979251196410278933347214814343428297036134,1718733033200898979251196410278933347214814343428639853934⟩,⟨9747419403968659531326109961082013024604792821528964353747,9747419403968659531326109961082013024604792821529408100932⟩⟩, + ⟨⟨-2712151086516110563395950266631073249254855101744857995927,-2712151086516110563395950266631073249254855101744761687890⟩,⟨1565861159883012429855329422079235970449581817012001307972,1565861159883012429855329422079235970449581817012084284591⟩⟩, + ⟨⟨-473884144286111322940532478835936641064365132139022580576,-473884144286111322940532478835936641064365132139009278213⟩,⟨-397636010691236956177723967065347863650094515779526832951,-397636010691236956177723967065347863650094515779514829742⟩⟩, + ⟨⟨13223606378550266533134869093892371899231564722878187174,13223606378550266533134869093892371899231564722878520184⟩,⟨-36331559928822969321483265904898123454080689287706332922,-36331559928822969321483265904898123454080689287705688525⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨13223606378550266533134869093892371899231564722878187174,13223606378550266533134869093892371899231564722878520184⟩,⟨36331559928822969321483265904898123454080689287705688525,36331559928822969321483265904898123454080689287706332922⟩⟩, + ⟨⟨-473884144286111322940532478835936641064365132139022580578,-473884144286111322940532478835936641064365132139009278215⟩,⟨397636010691236956177723967065347863650094515779514829740,397636010691236956177723967065347863650094515779526832948⟩⟩, + ⟨⟨-2712151086516110563395950266631073249254855101744857995914,-2712151086516110563395950266631073249254855101744761687882⟩,⟨-1565861159883012429855329422079235970449581817012084284607,-1565861159883012429855329422079235970449581817012001307993⟩⟩, + ⟨⟨1718733033200898979251196410278933347214814343428297036175,1718733033200898979251196410278933347214814343428639854003⟩,⟨-9747419403968659531326109961082013024604792821529408100936,-9747419403968659531326109961082013024604792821528964353723⟩⟩, + ⟨⟨23797410654220360183901635647172883360851544974435983107031,23797410654220360183901635647172883360851544974436972404193⟩,⟨-4196125569338132273562491236032552117223667830636345273426,-4196125569338132273562491236032552117223667830635610065388⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072191289623394,25053778558128198877685270753267775527193309072194329237845⟩,⟨43394417384257769014335204266097171988077681627915241513125,43394417384257769014335204266097171988077681627918529448325⟩⟩, + ⟨⟨-59670253854353745736419702807743763788992308274167911690250,-59670253854353745736419702807743763788992308274160369147992⟩,⟨71112239401934580398763655105317742199721292641607418828915,71112239401934580398763655105317742199721292641615079894939⟩⟩, + ⟨⟨-148814069468458882340795457146462713667914503322450851230171,-148814069468458882340795457146462713667914503322437099887232⟩,⟨-54163891726541891719720423808583155299252489104915598982721,-54163891726541891719720423808583155299252489104903019147393⟩⟩, + ⟨⟨-12531641156,11073848346⟩,⟨-253669507901048013636563366376836227212832254355964771483400,-253669507901048013636563366376836227212832254355937936173413⟩⟩, + ⟨⟨363315599288229693214832659048981234540806892877044705755740,363315599288229693214832659048981234540806892877074748777594⟩,⟨-132236063785502665331348690938923718992315647228798072520631,-132236063785502665331348690938923718992315647228771088968298⟩⟩, + ⟨⟨363861802033150017212378537612734879481314612845468261518005,363861802033150017212378537612734879481314612845529791961596⟩,⟨433633609780809742448271001414809272613960618727925914709886,433633609780809742448271001414809272613960618727988522026940⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155143183547460,-400860456930051182042964332052284408435092945155018738075703⟩,⟨694310678148124304229363268257554751809242906046608467148245,694310678148124304229363268257554751809242906046736475580037⟩⟩, + ⟨⟨-1087484553112300331539863385150247554670849561623897081276147,-1087484553112300331539863385150247554670849561623721894434080⟩,⟨-191752867817386233384349299507721153632040283057346346572871,-191752867817386233384349299507721153632040283057182460562635⟩⟩, + ⟨⟨-257917375794709903073882661317482435416423077410897164133267,-257917375794709903073882661317482435416423077410588739950965⟩,⟨-1462722124308046970919624376034869579504756722780883961716565,-1462722124308046970919624376034869579504756722780560090350823⟩⟩, + ⟨⟨1695094429072569102122468916644420780784284438590326345274984,1695094429072569102122468916644420780784284438590674708702870⟩,⟨-978663224926882768659580888799522481530988635632705873981928,-978663224926882768659580888799522481530988635632367104193501⟩⟩] +lemma tw0_0_3_2_calc (j : Fin 31) : taylorWaveBox 0 0 3 2 j = tw0_0_3_2 j := by + revert j + decide +kernel +def tw0_0_3_3 : Fin 31 → CI := ![⟨⟨512426866294798386834526424192888519295985354623507153451997,512426866294798386834526424192888519295985354623686164003907⟩,⟨-887549367585894654647575190685819342845674226129586417958004,-887549367585894654647575190685819342845674226129401190136207⟩⟩, + ⟨⟨714820879106353707533470619258956078884458227302337393471591,714820879106353707533470619258956078884458227302497942227523⟩,⟨126042207360194003213844511228790212614337064688870432686835,126042207360194003213844511228790212614337064689021558384133⟩⟩, + ⟨⟨87014691232426429529507738791261089895979078210586482585331,87014691232426429529507738791261089895979078210661128673952⟩,⟨493484836426108517156588227071524475287914166325368831411432,493484836426108517156588227071524475287914166325449899489524⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418141250049912,-290832176770545960434917438483929282263670530418086704255131⟩,⟨167912035547479535397937618679525710002908481003031315048511,167912035547479535397937618679525710002908481003083977127124⟩⟩, + ⟨⟨-166503353235635166457077601901113271890163512046862218827183,-166503353235635166457077601901113271890163512046837649346167⟩,⟨-139712902289801840644970935078246525393891187017479475152220,-139712902289801840644970935078246525393891187017455404437587⟩⟩, + ⟨⟨46159094058685164179831905824398446146329479244560652160838,46159094058685164179831905824398446146329479244570218126385⟩,⟨-126821068628719501940929252932731436933529222048887955004304,-126821068628719501940929252932731436933529222048877064327387⟩⟩, + ⟨⟨79692626246167045120505549490478022520911642351056749212919,79692626246167045120505549490478022520911642351065433444299⟩,⟨-3478951882,3936931959⟩⟩, + ⟨⟨15125411941149954598447318900538882833229243758857182419091,15125411941149954598447318900538882833229243758860743517641⟩,⟨41556727768258806396003697600997437254378855480975921501175,41556727768258806396003697600997437254378855480979893879856⟩⟩, + ⟨⟨-17375998024422824090779338564504478461220223078227241869303,-17375998024422824090779338564504478461220223078225314608345⟩,⟨14580193533630337816716608439935730621325724026565541559062,14580193533630337816716608439935730621325724026567430959878⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566390407545,-9088505524079561263591169952622790070739704075565672854367⟩,⟨-5247251110858735481185550583735178437590890031345930329306,-5247251110858735481185550583735178437590890031345277011397⟩⟩, + ⟨⟨732362070120720272883441604669872327043425594902634847528,732362070120720272883441604669872327043425594902765496720⟩,⟨-4153431693653231049640952588921724851464293077884412615859,-4153431693653231049640952588921724851464293077884226730146⟩⟩, + ⟨⟨1360996497376290750346347344337870799327819555761101414524,1360996497376290750346347344337870799327819555761167705506⟩,⟨-239980403137157619018446145018223764125589698937737196830,-239980403137157619018446145018223764125589698937688566553⟩⟩, + ⟨⟨163976597214335483787048455741724326174715313479544692979,163976597214335483787048455741724326174715313479553904225⟩,⟨284015797627486289487224061019462189710615752361433464938,284015797627486289487224061019462189710615752361444454343⟩⟩, + ⟨⟨-27760230444229833410777144646750959712168927759275120043,-27760230444229833410777144646750959712168927759274193697⟩,⟨33083354363154065026770918906654567189804672963838333663,33083354363154065026770918906654567189804672963839367652⟩⟩, + ⟨⟨-1268210686287195019409292529327314369335292220488839689,-1268210686287195019409292529327314369335292220488813157⟩,⟨-461590940586851641798319058243984461463294792445657255,-461590940586851641798319058243984461463294792445644160⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1268210686287195019409292529327314369335292220488839689,-1268210686287195019409292529327314369335292220488813157⟩,⟨461590940586851641798319058243984461463294792445644160,461590940586851641798319058243984461463294792445657255⟩⟩, + ⟨⟨-27760230444229833410777144646750959712168927759275120043,-27760230444229833410777144646750959712168927759274193697⟩,⟨-33083354363154065026770918906654567189804672963839367652,-33083354363154065026770918906654567189804672963838333663⟩⟩, + ⟨⟨163976597214335483787048455741724326174715313479544692982,163976597214335483787048455741724326174715313479553904227⟩,⟨-284015797627486289487224061019462189710615752361444454342,-284015797627486289487224061019462189710615752361433464937⟩⟩, + ⟨⟨1360996497376290750346347344337870799327819555761101414520,1360996497376290750346347344337870799327819555761167705507⟩,⟨239980403137157619018446145018223764125589698937688566559,239980403137157619018446145018223764125589698937737196840⟩⟩, + ⟨⟨732362070120720272883441604669872327043425594902634847512,732362070120720272883441604669872327043425594902765496703⟩,⟨4153431693653231049640952588921724851464293077884226730150,4153431693653231049640952588921724851464293077884412615862⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566390407556,-9088505524079561263591169952622790070739704075565672854406⟩,⟨5247251110858735481185550583735178437590890031345277011369,5247251110858735481185550583735178437590890031345930329251⟩⟩, + ⟨⟨-17375998024422824090779338564504478461220223078227241869278,-17375998024422824090779338564504478461220223078225314608189⟩,⟨-14580193533630337816716608439935730621325724026567430960051,-14580193533630337816716608439935730621325724026565541559103⟩⟩, + ⟨⟨15125411941149954598447318900538882833229243758857182419350,15125411941149954598447318900538882833229243758860743517766⟩,⟨-41556727768258806396003697600997437254378855480979893879724,-41556727768258806396003697600997437254378855480975921501177⟩⟩, + ⟨⟨79692626246167045120505549490478022520911642351056749213213,79692626246167045120505549490478022520911642351065433443993⟩,⟨-3936931180,3478952062⟩⟩, + ⟨⟨46159094058685164179831905824398446146329479244560652160173,46159094058685164179831905824398446146329479244570218125776⟩,⟨126821068628719501940929252932731436933529222048877064327626,126821068628719501940929252932731436933529222048887955004599⟩⟩, + ⟨⟨-166503353235635166457077601901113271890163512046862218827764,-166503353235635166457077601901113271890163512046837649347122⟩,⟨139712902289801840644970935078246525393891187017455404436808,139712902289801840644970935078246525393891187017479475151069⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418141250048526,-290832176770545960434917438483929282263670530418086704254431⟩,⟨-167912035547479535397937618679525710002908481003083977128766,-167912035547479535397937618679525710002908481003031315050841⟩⟩, + ⟨⟨87014691232426429529507738791261089895979078210586482587893,87014691232426429529507738791261089895979078210661128676651⟩,⟨-493484836426108517156588227071524475287914166325449899489181,-493484836426108517156588227071524475287914166325368831410951⟩⟩, + ⟨⟨714820879106353707533470619258956078884458227302337393473799,714820879106353707533470619258956078884458227302497942226513⟩,⟨-126042207360194003213844511228790212614337064689021558379227,-126042207360194003213844511228790212614337064688870432685146⟩⟩, + ⟨⟨512426866294798386834526424192888519295985354623507153447489,512426866294798386834526424192888519295985354623686163999299⟩,⟨887549367585894654647575190685819342845674226129401190139002,887549367585894654647575190685819342845674226129586417960693⟩⟩] +lemma tw0_0_3_3_calc (j : Fin 31) : taylorWaveBox 0 0 3 3 j = tw0_0_3_3 j := by + revert j + decide +kernel +def tw0_0_3_4 : Fin 31 → CI := ![⟨⟨-387266468459182445732882002369812590770516277905938895308527,-387266468459182445732882002369812590770516277905856841717153⟩,⟨-223588399813024700714287950446248739589886525793233426018857,-223588399813024700714287950446248739589886525793154606226707⟩⟩, + ⟨⟨51329868681392369031343482546572062200594040396240205898049,51329868681392369031343482546572062200594040396301914242817⟩,⟨-291106151056144995201984901663028063270058647520380258816925,-291106151056144995201984901663028063270058647520313949761242⟩⟩, + ⟨⟨186613596093193547138349234429746909111595788954183042858374,186613596093193547138349234429746909111595788954214293140321⟩,⟨-32905011958261813127901905727940865011919342643581127984609,-32905011958261813127901905727940865011919342643552795477598⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417520892487897,58612357480585547144046300481781429591051213417539461590082⟩,⟨101519581107763923054200619629232151794946219155354514485577,101519581107763923054200619629232151794946219155373877706683⟩⟩, + ⟨⟨-44704919462026395457583149916431123202147695856508849016026,-44704919462026395457583149916431123202147695856501004640079⟩,⟨53277248375504772732842030139760337082432548832984415298519,53277248375504772732842030139760337082432548832992446554821⟩⟩, + ⟨⟨-36890753474480757487710018899189680565124607353022230883351,-36890753474480757487710018899189680565124607353018945486935⟩,⟨-13427136184363480018225219496437930129556171910771652637879,-13427136184363480018225219496437930129556171910768827271394⟩⟩, + ⟨⟨-910787473,1030686377⟩,⟨-20863480763352960873051637232040362388611491494815516941920,-20863480763352960873051637232040362388611491494813177004939⟩⟩, + ⟨⟨9670689678814283690858255194309179622064025069949771698527,9670689678814283690858255194309179622064025069950726895784⟩,⟨-3519843187913780105897631939674224755882373129377318161485,-3519843187913780105897631939674224755882373129376478252213⟩⟩, + ⟨⟨2968844465298086489366835239948387446782512298375027991820,2968844465298086489366835239948387446782512298375422165039⟩,⟨3538131057372430871556854098680578256922063049283614027853,3538131057372430871556854098680578256922063049284017722316⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209648976602421,-915818085634149174125723445027834837360175209648859661795⟩,⟨1586243454808811297721884681706752371796034674302495158038,1586243454808811297721884681706752371796034674302625443864⟩⟩, + ⟨⟨-604092152591111265027621102878691793039393976933709438734,-604092152591111265027621102878691793039393976933680479867⟩,⟨-106517745336067955065855573941101878241140208532344497583,-106517745336067955065855573941101878241140208532325156371⟩⟩, + ⟨⟨-27922987833378198012783643575216210769645458825502799488,-27922987833378198012783643575216210769645458825497052215⟩,⟨-158359133248844271459400706393031781394518894689310720335,-158359133248844271459400706393031781394518894689302502956⟩⟩, + ⟨⟨24785053981387676526904448151668005809313041785977026870,24785053981387676526904448151668005809313041785978064770⟩,⟨-14309657588033580845714428828559919333752737650764699288,-14309657588033580845714428828559919333752737650763849905⟩⟩, + ⟨⟨1924711537470234135263696778685386262892264576444846714,1924711537470234135263696778685386262892264576444912996⟩,⟨1615024741213929020386721989619094055997762727231099142,1615024741213929020386721989619094055997762727231158177⟩⟩, + ⟨⟨-13427136184363480018225219496437930129556171910770346,-13427136184363480018225219496437930129556171910769922⟩,⟨36890753474480757487710018899189680565124607353020182,36890753474480757487710018899189680565124607353021072⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-13427136184363480018225219496437930129556171910770346,-13427136184363480018225219496437930129556171910769922⟩,⟨-36890753474480757487710018899189680565124607353021072,-36890753474480757487710018899189680565124607353020182⟩⟩, + ⟨⟨1924711537470234135263696778685386262892264576444846714,1924711537470234135263696778685386262892264576444912996⟩,⟨-1615024741213929020386721989619094055997762727231158177,-1615024741213929020386721989619094055997762727231099142⟩⟩, + ⟨⟨24785053981387676526904448151668005809313041785977026870,24785053981387676526904448151668005809313041785978064770⟩,⟨14309657588033580845714428828559919333752737650763849905,14309657588033580845714428828559919333752737650764699288⟩⟩, + ⟨⟨-27922987833378198012783643575216210769645458825502799489,-27922987833378198012783643575216210769645458825497052216⟩,⟨158359133248844271459400706393031781394518894689302502955,158359133248844271459400706393031781394518894689310720335⟩⟩, + ⟨⟨-604092152591111265027621102878691793039393976933709438735,-604092152591111265027621102878691793039393976933680479868⟩,⟨106517745336067955065855573941101878241140208532325156369,106517745336067955065855573941101878241140208532344497581⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209648976602411,-915818085634149174125723445027834837360175209648859661790⟩,⟨-1586243454808811297721884681706752371796034674302625443866,-1586243454808811297721884681706752371796034674302495158045⟩⟩, + ⟨⟨2968844465298086489366835239948387446782512298375027991828,2968844465298086489366835239948387446782512298375422165074⟩,⟨-3538131057372430871556854098680578256922063049284017722311,-3538131057372430871556854098680578256922063049283614027822⟩⟩, + ⟨⟨9670689678814283690858255194309179622064025069949771698528,9670689678814283690858255194309179622064025069950726895754⟩,⟨3519843187913780105897631939674224755882373129376478252273,3519843187913780105897631939674224755882373129377318161514⟩⟩, + ⟨⟨-910787520,1030686173⟩,⟨20863480763352960873051637232040362388611491494813177005016,20863480763352960873051637232040362388611491494815516941840⟩⟩, + ⟨⟨-36890753474480757487710018899189680565124607353022230883437,-36890753474480757487710018899189680565124607353018945487005⟩,⟨13427136184363480018225219496437930129556171910768827271201,13427136184363480018225219496437930129556171910771652637702⟩⟩, + ⟨⟨-44704919462026395457583149916431123202147695856508849015658,-44704919462026395457583149916431123202147695856501004639830⟩,⟨-53277248375504772732842030139760337082432548832992446555007,-53277248375504772732842030139760337082432548832984415298824⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417520892488711,58612357480585547144046300481781429591051213417539461590655⟩,⟨-101519581107763923054200619629232151794946219155373877706199,-101519581107763923054200619629232151794946219155354514485333⟩⟩, + ⟨⟨186613596093193547138349234429746909111595788954183042858192,186613596093193547138349234429746909111595788954214293140191⟩,⟨32905011958261813127901905727940865011919342643552795478566,32905011958261813127901905727940865011919342643581127985630⟩⟩, + ⟨⟨51329868681392369031343482546572062200594040396240205897361,51329868681392369031343482546572062200594040396301914240819⟩,⟨291106151056144995201984901663028063270058647520313949762142,291106151056144995201984901663028063270058647520380258816514⟩⟩, + ⟨⟨-387266468459182445732882002369812590770516277905938895309700,-387266468459182445732882002369812590770516277905856841718373⟩,⟨223588399813024700714287950446248739589886525793154606224740,223588399813024700714287950446248739589886525793233426016846⟩⟩] +lemma tw0_0_3_4_calc (j : Fin 31) : taylorWaveBox 0 0 3 4 j = tw0_0_3_4 j := by + revert j + decide +kernel +def tw0_0_3_5 : Fin 31 → CI := ![⟨⟨-83621865985773321414277976643829980057853009589726232185763,-83621865985773321414277976643829980057853009589696487475765⟩,⟨144837320511075112676372101650136743142432507120782027217364,144837320511075112676372101650136743142432507120813176220287⟩⟩, + ⟨⟨-101615216174753971888563914357473170758608752056625196786046,-101615216174753971888563914357473170758608752056601727107855⟩,⟨-17917504262132341537621559030809275345193419707594090374025,-17917504262132341537621559030809275345193419707572493064993⟩⟩, + ⟨⟨-10665586268624404034830798684115835270550822073136436733671,-10665586268624404034830798684115835270550822073127219295591⟩,⟨-60487545500813867034218641338840698554053038354305616272900,-60487545500813867034218641338840698554053038354295294500693⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717336699301477,30374587638444219469947910571978757115463861717342589449000⟩,⟨-17536776349579649255059588727456133033828655476710779774679,-17536776349579649255059588727456133033828655476705168091004⟩⟩, + ⟨⟨14612139151584205876481643009892732740749828509135095517533,14612139151584205876481643009892732740749828509137344730162⟩,⟨12261040572805400417061079183632062398126645152836443248778,12261040572805400417061079183632062398126645152838633722695⟩⟩, + ⟨⟨-3347824793297301304779629621452989489914940480375600403514,-3347824793297301304779629621452989489914940480374885290660⟩,⟨9198073023874673624944885118628455490257737750661702983200,9198073023874673624944885118628455490257737750662551418501⟩⟩, + ⟨⟨-4681754135318688100685463933953437859495028018501319002323,-4681754135318688100685463933953437859495028018500779019205⟩,⟨-231285483,204380231⟩⟩, + ⟨⟨-702089746091302202592120981988937981475409725830063927394,-702089746091302202592120981988937981475409725829894159061⟩,⟨-1928975723816481954190041571630190268830499523927760507988,-1928975723816481954190041571630190268830499523927563838300⟩⟩, + ⟨⟨617520363182173115848130122596865948347009220573828930451,617520363182173115848130122596865948347009220573901354056⟩,⟨-518161108990621464535192529183733214202328892639362696296,-518161108990621464535192529183733214202328892639292250732⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666705061297,237301465925345464608968051343584039964561419666725307365⟩,⟨137006065231091009805153036933251039326786370911773444891,137006065231091009805153036933251039326786370911791375273⟩⟩, + ⟨⟨-13279181199394426568219232132554616876631251292576814151,-13279181199394426568219232132554616876631251292574360682⟩,⟨75309978915534901996940124570544505052372689882528976745,75309978915534901996940124570544505052372689882532826662⟩⟩, + ⟨⟨-15793647290267185079268697612336654985959349133253387468,-15793647290267185079268697612336654985959349133252517650⟩,⟨2784846141067242046639409910525117989206098191072411419,2784846141067242046639409910525117989206098191072993478⟩⟩, + ⟨⟨-1070359884617898514102758101041023744740518522748328223,-1070359884617898514102758101041023744740518522748261281⟩,⟨-1853917702541761442257562901121750312223136091146257222,-1853917702541761442257562901121750312223136091146173685⟩⟩, + ⟨⟨80535712101006926730607440941781851606896176954734392,80535712101006926730607440941781851606896176954737593⟩,⟨-95978724228507993909924139592466745984626401090721474,-95978724228507993909924139592466745984626401090717862⟩⟩, + ⟨⟨919807302387467362494488511862845549025773775066201,919807302387467362494488511862845549025773775066227⟩,⟨334782479329730130477962962145298948991494048037515,334782479329730130477962962145298948991494048037528⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨919807302387467362494488511862845549025773775066201,919807302387467362494488511862845549025773775066227⟩,⟨-334782479329730130477962962145298948991494048037528,-334782479329730130477962962145298948991494048037515⟩⟩, + ⟨⟨80535712101006926730607440941781851606896176954734392,80535712101006926730607440941781851606896176954737593⟩,⟨95978724228507993909924139592466745984626401090717862,95978724228507993909924139592466745984626401090721474⟩⟩, + ⟨⟨-1070359884617898514102758101041023744740518522748328223,-1070359884617898514102758101041023744740518522748261281⟩,⟨1853917702541761442257562901121750312223136091146173685,1853917702541761442257562901121750312223136091146257222⟩⟩, + ⟨⟨-15793647290267185079268697612336654985959349133253387468,-15793647290267185079268697612336654985959349133252517650⟩,⟨-2784846141067242046639409910525117989206098191072993478,-2784846141067242046639409910525117989206098191072411419⟩⟩, + ⟨⟨-13279181199394426568219232132554616876631251292576814151,-13279181199394426568219232132554616876631251292574360682⟩,⟨-75309978915534901996940124570544505052372689882532826662,-75309978915534901996940124570544505052372689882528976745⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666705061298,237301465925345464608968051343584039964561419666725307366⟩,⟨-137006065231091009805153036933251039326786370911791375271,-137006065231091009805153036933251039326786370911773444890⟩⟩, + ⟨⟨617520363182173115848130122596865948347009220573828930446,617520363182173115848130122596865948347009220573901354055⟩,⟨518161108990621464535192529183733214202328892639292250734,518161108990621464535192529183733214202328892639362696302⟩⟩, + ⟨⟨-702089746091302202592120981988937981475409725830063927400,-702089746091302202592120981988937981475409725829894159073⟩,⟨1928975723816481954190041571630190268830499523927563838300,1928975723816481954190041571630190268830499523927760507982⟩⟩, + ⟨⟨-4681754135318688100685463933953437859495028018501319002305,-4681754135318688100685463933953437859495028018500779019222⟩,⟨-204380242,231285437⟩⟩, + ⟨⟨-3347824793297301304779629621452989489914940480375600403470,-3347824793297301304779629621452989489914940480374885290611⟩,⟨-9198073023874673624944885118628455490257737750662551418522,-9198073023874673624944885118628455490257737750661702983218⟩⟩, + ⟨⟨14612139151584205876481643009892732740749828509135095517617,14612139151584205876481643009892732740749828509137344730213⟩,⟨-12261040572805400417061079183632062398126645152838633722594,-12261040572805400417061079183632062398126645152836443248709⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717336699301403,30374587638444219469947910571978757115463861717342589448855⟩,⟨17536776349579649255059588727456133033828655476705168091247,17536776349579649255059588727456133033828655476710779774851⟩⟩, + ⟨⟨-10665586268624404034830798684115835270550822073136436734002,-10665586268624404034830798684115835270550822073127219295905⟩,⟨60487545500813867034218641338840698554053038354295294500635,60487545500813867034218641338840698554053038354305616272858⟩⟩, + ⟨⟨-101615216174753971888563914357473170758608752056625196785903,-101615216174753971888563914357473170758608752056601727108169⟩,⟨17917504262132341537621559030809275345193419707572493064753,17917504262132341537621559030809275345193419707594090373328⟩⟩, + ⟨⟨-83621865985773321414277976643829980057853009589726232185011,-83621865985773321414277976643829980057853009589696487475029⟩,⟨-144837320511075112676372101650136743142432507120813176220726,-144837320511075112676372101650136743142432507120782027217820⟩⟩] +lemma tw0_0_3_5_calc (j : Fin 31) : taylorWaveBox 0 0 3 5 j = tw0_0_3_5 j := by + revert j + decide +kernel +def tw0_0_3_6 : Fin 31 → CI := ![⟨⟨47397902300335817857262145290753400473401218593744396036882,47397902300335817857262145290753400473401218593754740396462⟩,⟨27365191652122466690056424259448641919058449328563724476343,27365191652122466690056424259448641919058449328573545516039⟩⟩, + ⟨⟨-5472590254500714056464847717520115321216998434904844511123,-5472590254500714056464847717520115321216998434898230568663⟩,⟨31036601616566953710379091400354108403549754142555465228728,31036601616566953710379091400354108403549754142562732426579⟩⟩, + ⟨⟨-17155235913385121819836263517687826317191364174260897470050,-17155235913385121819836263517687826317191364174257915443456⟩,⟨3024930951948623863690519832509103525280166280590678414663,3024930951948623863690519832509103525280166280593302256269⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210105182927635,-4591117312290554821118816819884099063826981210103699178303⟩,⟨-7952048448396308887279441801663526024767544990106350809907,-7952048448396308887279441801663526024767544990104783460734⟩⟩, + ⟨⟨2942438506095904167559089007013829254237714392100411784814,2942438506095904167559089007013829254237714392100946826891⟩,⟨-3506661660627333951376469785036110346584786914741925229929,-3506661660627333951376469785036110346584786914741374295596⟩⟩, + ⟨⟨2006708238818550661754628562880481755811085998784907953055,2006708238818550661754628562880481755811085998785099440475⟩,⟨730382067786706239615787723959968853000515114547313785321,730382067786706239615787723959968853000515114547472123623⟩⟩, + ⟨⟨-45412799,40129965⟩,⟨919260274839426580241716221779161802910425528549000627881,919260274839426580241716221779161802910425528549109579415⟩⟩, + ⟨⟨-336669775716384092592003423992154246013018449961935848513,-336669775716384092592003423992154246013018449961900451523⟩,⟨122537777137842125105818276550247728000618901880246593449,122537777137842125105818276550247728000618901880276613663⟩⟩, + ⟨⟨-79131652317125943762734998913911711913904001790797984446,-79131652317125943762734998913911711913904001790786974375⟩,⟨-94305430936850782451271633542656690590311143632490283347,-94305430936850782451271633542656690590311143632478922897⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351969449291,17934052001134979769995378202672261968074145351971853459⟩,⟨-31062689251548081590935319537748148534248222617601143099,-31062689251548081590935319537748148534248222617598394018⟩⟩, + ⟨⟨8215044323022453889993362695232863683152711163577584451,8215044323022453889993362695232863683152711163578030562⟩,⟨1448533961864764924985716345938463882571568557310928709,1448533961864764924985716345938463882571568557311200953⟩⟩, + ⟨⟨243023671615409239357091600505403312661018411448131394,243023671615409239357091600505403312661018411448182963⟩,⟨1378255730569214817624588845042639243108085961769522645,1378255730569214817624588845042639243108085961769602939⟩⟩, + ⟨⟨-121338629888859693714591091944328705211907119600002225,-121338629888859693714591091944328705211907119599996370⟩,⟨70054890629433514726544446104188523312789630281132706,70054890629433514726544446104188523312789630281137311⟩⟩, + ⟨⟨-4187861874127797352853210056499801604794276987170328,-4187861874127797352853210056499801604794276987170156⟩,⟨-3514033354002027407929633602610289279709642094921122,-3514033354002027407929633602610289279709642094920971⟩⟩, + ⟨⟨7303820677867062396157877239599688530005151145473,7303820677867062396157877239599688530005151145475⟩,⟨-20067082388185506617546285628804817558110859987851,-20067082388185506617546285628804817558110859987849⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨7303820677867062396157877239599688530005151145473,7303820677867062396157877239599688530005151145475⟩,⟨20067082388185506617546285628804817558110859987849,20067082388185506617546285628804817558110859987851⟩⟩, + ⟨⟨-4187861874127797352853210056499801604794276987170328,-4187861874127797352853210056499801604794276987170156⟩,⟨3514033354002027407929633602610289279709642094920971,3514033354002027407929633602610289279709642094921122⟩⟩, + ⟨⟨-121338629888859693714591091944328705211907119600002225,-121338629888859693714591091944328705211907119599996370⟩,⟨-70054890629433514726544446104188523312789630281137311,-70054890629433514726544446104188523312789630281132706⟩⟩, + ⟨⟨243023671615409239357091600505403312661018411448131394,243023671615409239357091600505403312661018411448182963⟩,⟨-1378255730569214817624588845042639243108085961769602939,-1378255730569214817624588845042639243108085961769522645⟩⟩, + ⟨⟨8215044323022453889993362695232863683152711163577584451,8215044323022453889993362695232863683152711163578030562⟩,⟨-1448533961864764924985716345938463882571568557311200953,-1448533961864764924985716345938463882571568557310928709⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351969449291,17934052001134979769995378202672261968074145351971853459⟩,⟨31062689251548081590935319537748148534248222617598394018,31062689251548081590935319537748148534248222617601143099⟩⟩, + ⟨⟨-79131652317125943762734998913911711913904001790797984447,-79131652317125943762734998913911711913904001790786974375⟩,⟨94305430936850782451271633542656690590311143632478922897,94305430936850782451271633542656690590311143632490283347⟩⟩, + ⟨⟨-336669775716384092592003423992154246013018449961935848512,-336669775716384092592003423992154246013018449961900451523⟩,⟨-122537777137842125105818276550247728000618901880276613664,-122537777137842125105818276550247728000618901880246593451⟩⟩, + ⟨⟨-45412790,40129967⟩,⟨-919260274839426580241716221779161802910425528549109579411,-919260274839426580241716221779161802910425528549000627884⟩⟩, + ⟨⟨2006708238818550661754628562880481755811085998784907953059,2006708238818550661754628562880481755811085998785099440480⟩,⟨-730382067786706239615787723959968853000515114547472123613,-730382067786706239615787723959968853000515114547313785310⟩⟩, + ⟨⟨2942438506095904167559089007013829254237714392100411784798,2942438506095904167559089007013829254237714392100946826867⟩,⟨3506661660627333951376469785036110346584786914741374295616,3506661660627333951376469785036110346584786914741925229941⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210105182927680,-4591117312290554821118816819884099063826981210103699178367⟩,⟨7952048448396308887279441801663526024767544990104783460715,7952048448396308887279441801663526024767544990106350809869⟩⟩, + ⟨⟨-17155235913385121819836263517687826317191364174260897470039,-17155235913385121819836263517687826317191364174257915443439⟩,⟨-3024930951948623863690519832509103525280166280593302256362,-3024930951948623863690519832509103525280166280590678414752⟩⟩, + ⟨⟨-5472590254500714056464847717520115321216998434904844510910,-5472590254500714056464847717520115321216998434898230568590⟩,⟨-31036601616566953710379091400354108403549754142562732426535,-31036601616566953710379091400354108403549754142555465228824⟩⟩, + ⟨⟨47397902300335817857262145290753400473401218593744396037032,47397902300335817857262145290753400473401218593754740396606⟩,⟨-27365191652122466690056424259448641919058449328573545515793,-27365191652122466690056424259448641919058449328563724476102⟩⟩] +lemma tw0_0_3_6_calc (j : Fin 31) : taylorWaveBox 0 0 3 6 j = tw0_0_3_6 j := by + revert j + decide +kernel +def tw0_0_3_7 : Fin 31 → CI := ![⟨⟨7960211579480062797719879135244471042925264892917164623496,7960211579480062797719879135244471042925264892920046786282⟩,⟨-13787490894657571028441851363188980505116571387320131602272,-13787490894657571028441851363188980505116571387317078663097⟩⟩, + ⟨⟨8426302684160480227925874800831681449763878358298371121198,8426302684160480227925874800831681449763878358300370955641⟩,⟨1485784510833651621533013511186533825919923895768926582280,1485784510833651621533013511186533825919923895770726968362⟩⟩, + ⟨⟨762594513156520343313466603792485098271539933457575612909,762594513156520343313466603792485098271539933458239518963⟩,⟨4324888398204792023398132411677523735118646496194206423511,4324888398204792023398132411677523735118646496194971968251⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755905717478,-1850525702701626521436088670080927798033038586755535088357⟩,⟨1068401512597105450007285757967117627943219527725508252168,1068401512597105450007285757967117627943219527725856937144⟩⟩, + ⟨⟨-748034121161543132999972791606001271987779326808936695446,-748034121161543132999972791606001271987779326808816790157⟩,⟨-627675155174671632089600049627802100680257200547857986769,-627675155174671632089600049627802100680257200547741854700⟩⟩, + ⟨⟨141639687560027080155628373687996945923801792502690157068,141639687560027080155628373687996945923801792502721313752⟩,⟨-389151843269782167277721590124348276823967343615006233021,-389151843269782167277721590124348276823967343614967860023⟩⟩, + ⟨⟨160441184787359821872660870163473329702807540620601428078,160441184787359821872660870163473329702807540620620954409⟩,⟨-7004001,7926029⟩⟩, + ⟨⟨19010557058936698316962326728737930952831537712037938566,19010557058936698316962326728737930952831537712042656427⟩,⟨52231076250682253546931736843037263196027952806196148504,52231076250682253546931736843037263196027952806201806264⟩⟩, + ⟨⟨-12801757673912408730626769889256832615331735006148610935,-12801757673912408730626769889256832615331735006147028028⟩,⟨10741950142600816243209997990519808458560725438002995480,10741950142600816243209997990519808458560725438004524267⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757420108,-3614308013089114299679860683751812105533278489757088732⟩,⟨-2086721704291221582045479996029526617076600640089387779,-2086721704291221582045479996029526617076600640089101398⟩⟩, + ⟨⟨140453816452767382848721156742926374216270268860987363,140453816452767382848721156742926374216270268861014209⟩,⟨-796553175744502391673579795925521768160286206269012457,-796553175744502391673579795925521768160286206268966664⟩⟩, + ⟨⟨106911557479611819500993997835827188937016354435159905,106911557479611819500993997835827188937016354435166475⟩,⟨-18851392133219457438461521363567458018585576120474397,-18851392133219457438461521363567458018585576120470336⟩⟩, + ⟨⟨4075628328693792152432578117245169173977735625174145,4075628328693792152432578117245169173977735625174426⟩,⟨7059195338064676366562227897952758018619684550306967,7059195338064676366562227897952758018619684550307331⟩⟩, + ⟨⟨-136292115671632969923197174694845542079623549494797,-136292115671632969923197174694845542079623549494790⟩,⟨162426618493934216836698295230448626291321326570572,162426618493934216836698295230448626291321326570580⟩⟩, + ⟨⟨-389151843269782167277721590124348276823967343615,-389151843269782167277721590124348276823967343614⟩,⟨-141639687560027080155628373687996945923801792503,-141639687560027080155628373687996945923801792502⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-389151843269782167277721590124348276823967343615,-389151843269782167277721590124348276823967343614⟩,⟨141639687560027080155628373687996945923801792502,141639687560027080155628373687996945923801792503⟩⟩, + ⟨⟨-136292115671632969923197174694845542079623549494797,-136292115671632969923197174694845542079623549494790⟩,⟨-162426618493934216836698295230448626291321326570580,-162426618493934216836698295230448626291321326570572⟩⟩, + ⟨⟨4075628328693792152432578117245169173977735625174145,4075628328693792152432578117245169173977735625174426⟩,⟨-7059195338064676366562227897952758018619684550307331,-7059195338064676366562227897952758018619684550306967⟩⟩, + ⟨⟨106911557479611819500993997835827188937016354435159905,106911557479611819500993997835827188937016354435166475⟩,⟨18851392133219457438461521363567458018585576120470336,18851392133219457438461521363567458018585576120474397⟩⟩, + ⟨⟨140453816452767382848721156742926374216270268860987363,140453816452767382848721156742926374216270268861014209⟩,⟨796553175744502391673579795925521768160286206268966664,796553175744502391673579795925521768160286206269012457⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757420108,-3614308013089114299679860683751812105533278489757088732⟩,⟨2086721704291221582045479996029526617076600640089101398,2086721704291221582045479996029526617076600640089387779⟩⟩, + ⟨⟨-12801757673912408730626769889256832615331735006148610935,-12801757673912408730626769889256832615331735006147028028⟩,⟨-10741950142600816243209997990519808458560725438004524267,-10741950142600816243209997990519808458560725438002995480⟩⟩, + ⟨⟨19010557058936698316962326728737930952831537712037938566,19010557058936698316962326728737930952831537712042656427⟩,⟨-52231076250682253546931736843037263196027952806201806264,-52231076250682253546931736843037263196027952806196148504⟩⟩, + ⟨⟨160441184787359821872660870163473329702807540620601428078,160441184787359821872660870163473329702807540620620954408⟩,⟨-7926027,7004001⟩⟩, + ⟨⟨141639687560027080155628373687996945923801792502690157066,141639687560027080155628373687996945923801792502721313750⟩,⟨389151843269782167277721590124348276823967343614967860024,389151843269782167277721590124348276823967343615006233022⟩⟩, + ⟨⟨-748034121161543132999972791606001271987779326808936695448,-748034121161543132999972791606001271987779326808816790162⟩,⟨627675155174671632089600049627802100680257200547741854696,627675155174671632089600049627802100680257200547857986764⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586755905717470,-1850525702701626521436088670080927798033038586755535088352⟩,⟨-1068401512597105450007285757967117627943219527725856937155,-1068401512597105450007285757967117627943219527725508252183⟩⟩, + ⟨⟨762594513156520343313466603792485098271539933457575612931,762594513156520343313466603792485098271539933458239518987⟩,⟨-4324888398204792023398132411677523735118646496194971968248,-4324888398204792023398132411677523735118646496194206423507⟩⟩, + ⟨⟨8426302684160480227925874800831681449763878358298371121224,8426302684160480227925874800831681449763878358300370955629⟩,⟨-1485784510833651621533013511186533825919923895770726968305,-1485784510833651621533013511186533825919923895768926582260⟩⟩, + ⟨⟨7960211579480062797719879135244471042925264892917164623426,7960211579480062797719879135244471042925264892920046786211⟩,⟨13787490894657571028441851363188980505116571387317078663140,13787490894657571028441851363188980505116571387320131602314⟩⟩] +lemma tw0_0_3_7_calc (j : Fin 31) : taylorWaveBox 0 0 3 7 j = tw0_0_3_7 j := by + revert j + decide +kernel +def tw0_0_3_8 : Fin 31 → CI := ![⟨⟨-3609556675507699249901072619402663681142043526992433949848,-3609556675507699249901072619402663681142043526991623202664⟩,⟨-2083978518259580817633731437832825154045307399304157567589,-2083978518259580817633731437832825154045307399303396385626⟩⟩, + ⟨⟨363045643648528127596700664454036826071844089940781670210,363045643648528127596700664454036826071844089941222743130⟩,⟨-2058934158515307150416979720149314734679023050254582057668,-2058934158515307150416979720149314734679023050254086852139⟩⟩, + ⟨⟨981286050289704101544860234448013471176240949736746414795,981286050289704101544860234448013471176240949736923234918⟩,⟨-173027206458918444905064823201034657779305162602320845569,-173027206458918444905064823201034657779305162602169659300⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556873170780,223765489537285961260145415798476028797768934556946911459⟩,⟨387573196859101311863220953391387389144801221975943899572,387573196859101311863220953391387389144801221976022757639⟩⟩, + ⟨⟨-120504978998407782382585565740841999075929134215244486800,-120504978998407782382585565740841999075929134215221807464⟩,⟨143612241646842295529628571042377221643778401218686695279,143612241646842295529628571042377221643778401218710172575⟩⟩, + ⟨⟨-67919809552626348862549945304850101717351118435385526743,-67919809552626348862549945304850101717351118435378613195⟩,⟨-24720788994185261195490530589369220398188739503587716340,-24720788994185261195490530589369220398188739503582199783⟩⟩, + ⟨⟨-1100186,1245018⟩,⟨-25202042373060605481053021731346532868346133836082255885,-25202042373060605481053021731346532868346133836079108475⟩⟩, + ⟨⟨7292834019476963981813470356272998426457412235724325655,7292834019476963981813470356272998426457412235725138842⟩,⟨-2654374506533560774996242288975710171980918345084308424,-2654374506533560774996242288975710171980918345083641236⟩⟩, + ⟨⟨1312376786514210518246459227420896442093559113486777486,1312376786514210518246459227420896442093559113486968441⟩,⟨1564029750165554900284813264861496001067623235963209061,1564029750165554900284813264861496001067623235963407429⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153249980,-218520985876255821543110757615699246872821225153219294⟩,⟨378489450057716124866426712296276747211719943335902010,378489450057716124866426712296276747211719943335937917⟩⟩, + ⟨⟨-69512377919793005443130551210034234141852120217546909,-69512377919793005443130551210034234141852120217542691⟩,⟨-12256907720462867853769332613849956407236562518255978,-12256907720462867853769332613849956407236562518253595⟩⟩, + ⟨⟨-1316075445236948185357724847605793985502667343784216,-1316075445236948185357724847605793985502667343783927⟩,⟨-7463834745817586736694892632638756566991537030065628,-7463834745817586736694892632638756566991537030065145⟩⟩, + ⟨⟨369618603571988403189869836226832760948945257163974,369618603571988403189869836226832760948945257163996⟩,⟨-213399400269781075725694099234081295774239477688713,-213399400269781075725694099234081295774239477688696⟩⟩, + ⟨⟨5669758571199730911261711227726617226889305949868,5669758571199730911261711227726617226889305949870⟩,⟨4757492325957916301135375754209877541178145955756,4757492325957916301135375754209877541178145955757⟩⟩, + ⟨⟨-2472078899418526119549053058936922039818873951,-2472078899418526119549053058936922039818873950⟩,⟨6791980955262634886254994530485010171735111843,6791980955262634886254994530485010171735111844⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-2472078899418526119549053058936922039818873951,-2472078899418526119549053058936922039818873950⟩,⟨-6791980955262634886254994530485010171735111844,-6791980955262634886254994530485010171735111843⟩⟩, + ⟨⟨5669758571199730911261711227726617226889305949868,5669758571199730911261711227726617226889305949870⟩,⟨-4757492325957916301135375754209877541178145955757,-4757492325957916301135375754209877541178145955756⟩⟩, + ⟨⟨369618603571988403189869836226832760948945257163974,369618603571988403189869836226832760948945257163996⟩,⟨213399400269781075725694099234081295774239477688696,213399400269781075725694099234081295774239477688713⟩⟩, + ⟨⟨-1316075445236948185357724847605793985502667343784216,-1316075445236948185357724847605793985502667343783927⟩,⟨7463834745817586736694892632638756566991537030065145,7463834745817586736694892632638756566991537030065628⟩⟩, + ⟨⟨-69512377919793005443130551210034234141852120217546909,-69512377919793005443130551210034234141852120217542691⟩,⟨12256907720462867853769332613849956407236562518253595,12256907720462867853769332613849956407236562518255978⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153249980,-218520985876255821543110757615699246872821225153219294⟩,⟨-378489450057716124866426712296276747211719943335937917,-378489450057716124866426712296276747211719943335902010⟩⟩, + ⟨⟨1312376786514210518246459227420896442093559113486777486,1312376786514210518246459227420896442093559113486968441⟩,⟨-1564029750165554900284813264861496001067623235963407429,-1564029750165554900284813264861496001067623235963209061⟩⟩, + ⟨⟨7292834019476963981813470356272998426457412235724325655,7292834019476963981813470356272998426457412235725138842⟩,⟨2654374506533560774996242288975710171980918345083641236,2654374506533560774996242288975710171980918345084308424⟩⟩, + ⟨⟨-1100186,1245018⟩,⟨25202042373060605481053021731346532868346133836079108475,25202042373060605481053021731346532868346133836082255885⟩⟩, + ⟨⟨-67919809552626348862549945304850101717351118435385526743,-67919809552626348862549945304850101717351118435378613195⟩,⟨24720788994185261195490530589369220398188739503582199783,24720788994185261195490530589369220398188739503587716340⟩⟩, + ⟨⟨-120504978998407782382585565740841999075929134215244486799,-120504978998407782382585565740841999075929134215221807463⟩,⟨-143612241646842295529628571042377221643778401218710172575,-143612241646842295529628571042377221643778401218686695280⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556873170783,223765489537285961260145415798476028797768934556946911462⟩,⟨-387573196859101311863220953391387389144801221976022757637,-387573196859101311863220953391387389144801221975943899571⟩⟩, + ⟨⟨981286050289704101544860234448013471176240949736746414794,981286050289704101544860234448013471176240949736923234917⟩,⟨173027206458918444905064823201034657779305162602169659305,173027206458918444905064823201034657779305162602320845574⟩⟩, + ⟨⟨363045643648528127596700664454036826071844089940781670205,363045643648528127596700664454036826071844089941222743116⟩,⟨2058934158515307150416979720149314734679023050254086852145,2058934158515307150416979720149314734679023050254582057665⟩⟩, + ⟨⟨-3609556675507699249901072619402663681142043526992433949859,-3609556675507699249901072619402663681142043526991623202676⟩,⟨2083978518259580817633731437832825154045307399303396385608,2083978518259580817633731437832825154045307399304157567571⟩⟩] +lemma tw0_0_3_8_calc (j : Fin 31) : taylorWaveBox 0 0 3 8 j = tw0_0_3_8 j := by + revert j + decide +kernel +def tw0_0_3_9 : Fin 31 → CI := ![⟨⟨-495985727515397112326421416469320716440501550325812200341,-495985727515397112326421416469320716440501550325629460685⟩,⟨859072479885680691627648444315166287437481826543196825923,859072479885680691627648444315166287437481826543392517815⟩⟩, + ⟨⟨-457356838245630327661041913332093668895625665619629092908,-457356838245630327661041913332093668895625665619517635698⟩,⟨-80644350394221794147394251551773412998037549076087360426,-80644350394221794147394251551773412998037549075989126958⟩⟩, + ⟨⟨-35689661660972393538552166712449392822115345151519437458,-35689661660972393538552166712449392822115345151488139239⟩,⟨-202406129326179921502052712883222250949708800424516580761,-202406129326179921502052712883222250949708800424479464469⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791948649422,73793764120052327784788221554378326426914401791963898857⟩,⟨-42604849579227958677896369208994565288944873769731834078,-42604849579227958677896369208994565288944873769717658269⟩⟩, + ⟨⟨25065064629071216964961482550957890980037217475670692152,25065064629071216964961482550957890980037217475674869499⟩,⟨21032086485688344980305411248719502178128128667593955876,21032086485688344980305411248719502178128128667597981115⟩⟩, + ⟨⟨-3922356014902819721761174013161958693618908367515727852,-3922356014902819721761174013161958693618908367514840074⟩,⟨10776584582007515094576327838290728648302688178452542763,10776584582007515094576327838290728648302688178453674014⟩⟩, + ⟨⟨-3598843235212085340458540018208389404888495232432347769,-3598843235212085340458540018208389404888495232431886863⟩,⟨-177789,157107⟩⟩, + ⟨⟨-336927816145529986462961238181913722807921906514015429,-336927816145529986462961238181913722807921906513929667⟩,⟨-925701566846002147148633500824661121689406632706893268,-925701566846002147148633500824661121689406632706787100⟩⟩, + ⟨⟨173711164706120751811287123503362009837003446930658856,173711164706120751811287123503362009837003446930681442⟩,⟨-145760974236281663608781237391168612613902109885274177,-145760974236281663608781237391168612613902109885252504⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749976763,36032111386744300676166123805848792200641797749980297⟩,⟨20803149208607401698191586527829377582492614145372124,20803149208607401698191586527829377582492614145375113⟩⟩, + ⟨⟨-972379071978135472391444056640521082063736063927123,-972379071978135472391444056640521082063736063926930⟩,⟨5514635752686339890592975042221107356751222261709752,5514635752686339890592975042221107356751222261710105⟩⟩, + ⟨⟨-473703604142803479520740917073677505963030088441443,-473703604142803479520740917073677505963030088441410⟩,⟨83526726269218437619575262669692193517245571642836,83526726269218437619575262669692193517245571642855⟩⟩, + ⟨⟨-10157787699515332860445110609291688272701471750672,-10157787699515332860445110609291688272701471750670⟩,⟨-17593804388058740564534240139574605566719627807608,-17593804388058740564534240139574605566719627807606⟩⟩, + ⟨⟨150970736775143513583067932125324680663195542005,150970736775143513583067932125324680663195542006⟩,⟨-179919917928372093892989960402758481351396489616,-179919917928372093892989960402758481351396489615⟩⟩, + ⟨⟨107765845820075150945763278382907286483026881,107765845820075150945763278382907286483026882⟩,⟨39223560149028197217611740131619586936189083,39223560149028197217611740131619586936189084⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨107765845820075150945763278382907286483026881,107765845820075150945763278382907286483026882⟩,⟨-39223560149028197217611740131619586936189084,-39223560149028197217611740131619586936189083⟩⟩, + ⟨⟨150970736775143513583067932125324680663195542005,150970736775143513583067932125324680663195542006⟩,⟨179919917928372093892989960402758481351396489615,179919917928372093892989960402758481351396489616⟩⟩, + ⟨⟨-10157787699515332860445110609291688272701471750672,-10157787699515332860445110609291688272701471750670⟩,⟨17593804388058740564534240139574605566719627807606,17593804388058740564534240139574605566719627807608⟩⟩, + ⟨⟨-473703604142803479520740917073677505963030088441443,-473703604142803479520740917073677505963030088441410⟩,⟨-83526726269218437619575262669692193517245571642855,-83526726269218437619575262669692193517245571642836⟩⟩, + ⟨⟨-972379071978135472391444056640521082063736063927123,-972379071978135472391444056640521082063736063926930⟩,⟨-5514635752686339890592975042221107356751222261710105,-5514635752686339890592975042221107356751222261709752⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749976763,36032111386744300676166123805848792200641797749980297⟩,⟨-20803149208607401698191586527829377582492614145375113,-20803149208607401698191586527829377582492614145372124⟩⟩, + ⟨⟨173711164706120751811287123503362009837003446930658856,173711164706120751811287123503362009837003446930681442⟩,⟨145760974236281663608781237391168612613902109885252504,145760974236281663608781237391168612613902109885274177⟩⟩, + ⟨⟨-336927816145529986462961238181913722807921906514015429,-336927816145529986462961238181913722807921906513929667⟩,⟨925701566846002147148633500824661121689406632706787100,925701566846002147148633500824661121689406632706893268⟩⟩, + ⟨⟨-3598843235212085340458540018208389404888495232432347769,-3598843235212085340458540018208389404888495232431886863⟩,⟨-157107,177789⟩⟩, + ⟨⟨-3922356014902819721761174013161958693618908367515727852,-3922356014902819721761174013161958693618908367514840074⟩,⟨-10776584582007515094576327838290728648302688178453674014,-10776584582007515094576327838290728648302688178452542763⟩⟩, + ⟨⟨25065064629071216964961482550957890980037217475670692152,25065064629071216964961482550957890980037217475674869499⟩,⟨-21032086485688344980305411248719502178128128667597981115,-21032086485688344980305411248719502178128128667593955876⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791948649422,73793764120052327784788221554378326426914401791963898856⟩,⟨42604849579227958677896369208994565288944873769717658270,42604849579227958677896369208994565288944873769731834078⟩⟩, + ⟨⟨-35689661660972393538552166712449392822115345151519437459,-35689661660972393538552166712449392822115345151488139240⟩,⟨202406129326179921502052712883222250949708800424479464469,202406129326179921502052712883222250949708800424516580760⟩⟩, + ⟨⟨-457356838245630327661041913332093668895625665619629092908,-457356838245630327661041913332093668895625665619517635699⟩,⟨80644350394221794147394251551773412998037549075989126957,80644350394221794147394251551773412998037549076087360423⟩⟩, + ⟨⟨-495985727515397112326421416469320716440501550325812200336,-495985727515397112326421416469320716440501550325629460680⟩,⟨-859072479885680691627648444315166287437481826543392517817,-859072479885680691627648444315166287437481826543196825925⟩⟩] +lemma tw0_0_3_9_calc (j : Fin 31) : taylorWaveBox 0 0 3 9 j = tw0_0_3_9 j := by + revert j + decide +kernel +def tw0_0_3_10 : Fin 31 → CI := ![⟨⟨187420541090973602826895044989804187200002869539566253203,187420541090973602826895044989804187200002869539609543130⟩,⟨108207299850538926453101217536999299224894071863915872259,108207299850538926453101217536999299224894071863956084303⟩⟩, + ⟨⟨-16420943437630169843524026142317106843955930188417551379,-16420943437630169843524026142317106843955930188397496638⟩,⟨93127797978802715948804289832809712563623386776614696490,93127797978802715948804289832809712563623386776637688038⟩⟩, + ⟨⟨-38270411648725656619491867457410855787280430464418795630,-38270411648725656619491867457410855787280430464411655961⟩,⟨6748106136489862053674140953880584121874335687666306124,6748106136489862053674140953880584121874335687672245388⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003519198501,-7435949024744486033456304113587098562333411003516700685⟩,⟨-12879441513349692559052917879290522199485986172460368962,-12879441513349692559052917879290522199485986172457666436⟩⟩, + ⟨⟨3364892279278427976928943447499550587759015679096518853,3364892279278427976928943447499550587759015679097173556⟩,⟨-4010122462522586211936206126315304978370765107996244712,-4010122462522586211936206126315304978370765107995563619⟩⟩, + ⟨⟨1567390692297400098708166486281261945401091679963850360,1567390692297400098708166486281261945401091679964019884⟩,⟨570483557462149814967656058175614137323844846326645920,570483557462149814967656058175614137323844846326776859⟩⟩, + ⟨⟨-23273,20566⟩,⟨471087477881817150367027725509267001994255814209026042,471087477881817150367027725509267001994255814209087875⟩⟩, + ⟨⟨-107710268215554120476459950507220043409712421890291371,-107710268215554120476459950507220043409712421890278674⟩,⟨39203331555290723410216545082248578312338665215216267,39203331555290723410216545082248578312338665215226372⟩⟩, + ⟨⟨-14840052041136829547582211295467069362098175848691707,-14840052041136829547582211295467069362098175848689452⟩,⟨-17685685334309855087371373475840335637933312812659561,-17685685334309855087371373475840335637933312812657204⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780634,1815417242369259285511792996481225234944680420780901⟩,⟨-3144394900720139784925028779123662646358883342885652,-3144394900720139784925028779123662646358883342885332⟩⟩, + ⟨⟨401035628885718178084871934043345101544979338925084,401035628885718178084871934043345101544979338925112⟩,⟨70713401597939147652290030499003105076278894741759,70713401597939147652290030499003105076278894741774⟩⟩, + ⟨⟨4859387956033004482635213768000974350481111012653,4859387956033004482635213768000974350481111012656⟩,⟨27558958569519239941555661905030980121239765338862,27558958569519239941555661905030980121239765338865⟩⟩, + ⟨⟨-767674536308627877178962104278237950771211753635,-767674536308627877178962104278237950771211753634⟩,⟨443217100187807442751902587031549129625166118354,443217100187807442751902587031549129625166118355⟩⟩, + ⟨⟨-5233658262946780569290287191479686049827444028,-5233658262946780569290287191479686049827444027⟩,⟨-4391560718146567546748843555495638624683583595,-4391560718146567546748843555495638624683583594⟩⟩, + ⟨⟨570483557462149814967656058175614137323844,570483557462149814967656058175614137323845⟩,⟨-1567390692297400098708166486281261945401092,-1567390692297400098708166486281261945401091⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨570483557462149814967656058175614137323844,570483557462149814967656058175614137323845⟩,⟨1567390692297400098708166486281261945401091,1567390692297400098708166486281261945401092⟩⟩, + ⟨⟨-5233658262946780569290287191479686049827444028,-5233658262946780569290287191479686049827444027⟩,⟨4391560718146567546748843555495638624683583594,4391560718146567546748843555495638624683583595⟩⟩, + ⟨⟨-767674536308627877178962104278237950771211753635,-767674536308627877178962104278237950771211753634⟩,⟨-443217100187807442751902587031549129625166118355,-443217100187807442751902587031549129625166118354⟩⟩, + ⟨⟨4859387956033004482635213768000974350481111012653,4859387956033004482635213768000974350481111012656⟩,⟨-27558958569519239941555661905030980121239765338865,-27558958569519239941555661905030980121239765338862⟩⟩, + ⟨⟨401035628885718178084871934043345101544979338925084,401035628885718178084871934043345101544979338925112⟩,⟨-70713401597939147652290030499003105076278894741774,-70713401597939147652290030499003105076278894741759⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780634,1815417242369259285511792996481225234944680420780901⟩,⟨3144394900720139784925028779123662646358883342885332,3144394900720139784925028779123662646358883342885652⟩⟩, + ⟨⟨-14840052041136829547582211295467069362098175848691707,-14840052041136829547582211295467069362098175848689452⟩,⟨17685685334309855087371373475840335637933312812657204,17685685334309855087371373475840335637933312812659561⟩⟩, + ⟨⟨-107710268215554120476459950507220043409712421890291371,-107710268215554120476459950507220043409712421890278674⟩,⟨-39203331555290723410216545082248578312338665215226372,-39203331555290723410216545082248578312338665215216267⟩⟩, + ⟨⟨-23273,20566⟩,⟨-471087477881817150367027725509267001994255814209087875,-471087477881817150367027725509267001994255814209026042⟩⟩, + ⟨⟨1567390692297400098708166486281261945401091679963850360,1567390692297400098708166486281261945401091679964019884⟩,⟨-570483557462149814967656058175614137323844846326776859,-570483557462149814967656058175614137323844846326645920⟩⟩, + ⟨⟨3364892279278427976928943447499550587759015679096518853,3364892279278427976928943447499550587759015679097173556⟩,⟨4010122462522586211936206126315304978370765107995563619,4010122462522586211936206126315304978370765107996244712⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003519198501,-7435949024744486033456304113587098562333411003516700685⟩,⟨12879441513349692559052917879290522199485986172457666436,12879441513349692559052917879290522199485986172460368962⟩⟩, + ⟨⟨-38270411648725656619491867457410855787280430464418795630,-38270411648725656619491867457410855787280430464411655961⟩,⟨-6748106136489862053674140953880584121874335687672245389,-6748106136489862053674140953880584121874335687666306124⟩⟩, + ⟨⟨-16420943437630169843524026142317106843955930188417551378,-16420943437630169843524026142317106843955930188397496638⟩,⟨-93127797978802715948804289832809712563623386776637688038,-93127797978802715948804289832809712563623386776614696490⟩⟩, + ⟨⟨187420541090973602826895044989804187200002869539566253203,187420541090973602826895044989804187200002869539609543130⟩,⟨-108207299850538926453101217536999299224894071863956084302,-108207299850538926453101217536999299224894071863915872258⟩⟩] +lemma tw0_0_3_10_calc (j : Fin 31) : taylorWaveBox 0 0 3 10 j = tw0_0_3_10 j := by + revert j + decide +kernel +def tw0_0_3_11 : Fin 31 → CI := ![⟨⟨21791234504823142515366525311269432823771122929787651127,21791234504823142515366525311269432823771122929795818560⟩,⟨-37743525322001707893742291740530563888148221535556153558,-37743525322001707893742291740530563888148221535547315511⟩⟩, + ⟨⟨17504164460054761145762020928836950274965617912080557146,17504164460054761145762020928836950274965617912084934322⟩,⟨3086456469065874077279856490031482171662683869756601900,3086456469065874077279856490031482171662683869760381185⟩⟩, + ⟨⟨1177766703557819622696453623629016720023287456963177744,1177766703557819622696453623629016720023287456964218091⟩,⟨6679446893638542759555380206300206289928096569935950177,6679446893638542759555380206300206289928096569937217546⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745928623,-2074972248239938619645032781794172026726850732745486620⟩,⟨1197985786082331537503313966912747958048843575969714425,1197985786082331537503313966912747958048843575970120656⟩⟩, + ⟨⟨-592221726285555751459784603037896425170120080140041379,-592221726285555751459784603037896425170120080139938908⟩,⟨-496933032101381906282115850378626667341923691676847308,-496933032101381906282115850378626667341923691676749037⟩⟩, + ⟨⟨76590895432344467056965322646835058715744821130727844,76590895432344467056965322646835058715744821130745668⟩,⟨-210431755736176592882450376940423862870054114917790633,-210431755736176592882450376940423862870054114917767202⟩⟩, + ⟨⟨56921729219679268117752553035921843729028297560541961,56921729219679268117752553035921843729028297560549614⟩,⟨-2485,2813⟩⟩, + ⟨⟨4210629005481923412687557501110332609156656218084300,4210629005481923412687557501110332609156656218085400⟩,⟨11568608114262257542538633488665510801982350352922027,11568608114262257542538633488665510801982350352923428⟩⟩, + ⟨⟨-1662087751452051753718552438210883883327738938322186,-1662087751452051753718552438210883883327738938321958⟩,⟨1394657219227691276866909764637935302659788302354203,1394657219227691276866909764637935302659788302354421⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087135,-253292510771476882280887790746358889981305021087108⟩,⟨-146238499277628361511635005726653803472759225582278,-146238499277628361511635005726653803472759225582255⟩⟩, + ⟨⟨4746852627573298554202447645728442024165796238633,4746852627573298554202447645728442024165796238635⟩,⟨-26920739007161002290585252453160739414212788118473,-26920739007161002290585252453160739414212788118470⟩⟩, + ⟨⟨1479983278334822587451452774223733089474843168688,1479983278334822587451452774223733089474843168689⟩,⟨-260960982967795009704238028819914913162548947543,-260960982967795009704238028819914913162548947542⟩⟩, + ⟨⟨17851379306351118348588257534991919369233303904,17851379306351118348588257534991919369233303905⟩,⟨30919495943783799106553685393842637937171023081,30919495943783799106553685393842637937171023082⟩⟩, + ⟨⟨-117918759742929685469191426416195763048846410,-117918759742929685469191426416195763048846409⟩,⟨140530105557889950618766480037164208789985617,140530105557889950618766480037164208789985618⟩⟩, + ⟨⟨-21043175573617659288245037694042386287006,-21043175573617659288245037694042386287005⟩,⟨-7659089543234446705696532264683505871575,-7659089543234446705696532264683505871574⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-21043175573617659288245037694042386287006,-21043175573617659288245037694042386287005⟩,⟨7659089543234446705696532264683505871574,7659089543234446705696532264683505871575⟩⟩, + ⟨⟨-117918759742929685469191426416195763048846410,-117918759742929685469191426416195763048846409⟩,⟨-140530105557889950618766480037164208789985618,-140530105557889950618766480037164208789985617⟩⟩, + ⟨⟨17851379306351118348588257534991919369233303904,17851379306351118348588257534991919369233303905⟩,⟨-30919495943783799106553685393842637937171023082,-30919495943783799106553685393842637937171023081⟩⟩, + ⟨⟨1479983278334822587451452774223733089474843168688,1479983278334822587451452774223733089474843168689⟩,⟨260960982967795009704238028819914913162548947542,260960982967795009704238028819914913162548947543⟩⟩, + ⟨⟨4746852627573298554202447645728442024165796238633,4746852627573298554202447645728442024165796238635⟩,⟨26920739007161002290585252453160739414212788118470,26920739007161002290585252453160739414212788118473⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087135,-253292510771476882280887790746358889981305021087108⟩,⟨146238499277628361511635005726653803472759225582255,146238499277628361511635005726653803472759225582278⟩⟩, + ⟨⟨-1662087751452051753718552438210883883327738938322186,-1662087751452051753718552438210883883327738938321958⟩,⟨-1394657219227691276866909764637935302659788302354421,-1394657219227691276866909764637935302659788302354203⟩⟩, + ⟨⟨4210629005481923412687557501110332609156656218084300,4210629005481923412687557501110332609156656218085400⟩,⟨-11568608114262257542538633488665510801982350352923428,-11568608114262257542538633488665510801982350352922027⟩⟩, + ⟨⟨56921729219679268117752553035921843729028297560541961,56921729219679268117752553035921843729028297560549614⟩,⟨-2813,2485⟩⟩, + ⟨⟨76590895432344467056965322646835058715744821130727844,76590895432344467056965322646835058715744821130745668⟩,⟨210431755736176592882450376940423862870054114917767202,210431755736176592882450376940423862870054114917790633⟩⟩, + ⟨⟨-592221726285555751459784603037896425170120080140041379,-592221726285555751459784603037896425170120080139938908⟩,⟨496933032101381906282115850378626667341923691676749037,496933032101381906282115850378626667341923691676847308⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732745928623,-2074972248239938619645032781794172026726850732745486620⟩,⟨-1197985786082331537503313966912747958048843575970120656,-1197985786082331537503313966912747958048843575969714425⟩⟩, + ⟨⟨1177766703557819622696453623629016720023287456963177744,1177766703557819622696453623629016720023287456964218091⟩,⟨-6679446893638542759555380206300206289928096569937217546,-6679446893638542759555380206300206289928096569935950177⟩⟩, + ⟨⟨17504164460054761145762020928836950274965617912080557146,17504164460054761145762020928836950274965617912084934322⟩,⟨-3086456469065874077279856490031482171662683869760381185,-3086456469065874077279856490031482171662683869756601900⟩⟩, + ⟨⟨21791234504823142515366525311269432823771122929787651127,21791234504823142515366525311269432823771122929795818559⟩,⟨37743525322001707893742291740530563888148221535547315511,37743525322001707893742291740530563888148221535556153558⟩⟩] +lemma tw0_0_3_11_calc (j : Fin 31) : taylorWaveBox 0 0 3 11 j = tw0_0_3_11 j := by + revert j + decide +kernel +def tw0_0_3_12 : Fin 31 → CI := ![⟨⟨-7058022730486958381136491702350017063996955730532933696,-7058022730486958381136491702350017063996955730531258518⟩,⟨-4074951323393142878532497251109791508755607371563616696,-4074951323393142878532497251109791508755607371562076418⟩⟩, + ⟨⟨538688276046780162803882708028331402146924146363305297,538688276046780162803882708028331402146924146363966622⟩,⟨-3055053026385310413148568452067918812976667730204771876,-3055053026385310413148568452067918812976667730203998189⟩⟩, + ⟨⟨1082513161842357709573769918339026977679867963699508130,1082513161842357709573769918339026977679867963699716975⟩,⟨-190876277404836829495612066087778239473104680178001669,-190876277404836829495612066087778239473104680177832456⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690951063,179218254507678396558872331947278891371354432691012407⟩,⟨310415122451108950031301992179391381861466766399406237,310415122451108950031301992179391381861466766399473350⟩⟩, + ⟨⟨-68145923780689782509828607331182077562130813751860461,-68145923780689782509828607331182077562130813751846767⟩,⟨81213149486288255099445765074393573995480099774020267,81213149486288255099445765074393573995480099774034579⟩⟩, + ⟨⟨-26233764202491040365122925504456153355553206022300769,-26233764202491040365122925504456153355553206022297764⟩,⟨-9548309302464977322426941041714678980117051669678941,-9548309302464977322426941041714678980117051669676688⟩⟩, + ⟨⟨-279,316⟩,⟨-6386603083791852241089888205092732398089436736506350,-6386603083791852241089888205092732398089436736505470⟩⟩, + ⟨⟨1153773151238907290636481167989590844703351601702080,1153773151238907290636481167989590844703351601702225⟩,⟨-419939084146479613800502877424483512143271640813703,-419939084146479613800502877424483512143271640813592⟩⟩, + ⟨⟨121706802061157906873079927979635233664299680946238,121706802061157906873079927979635233664299680946258⟩,⟨145044518599537333022110235441305321157077677737362,145044518599537333022110235441305321157077677737383⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573426,-10938614166728417758720235104204033897177394573423⟩,⟨18946235501166317750933959483605431021818039941370,18946235501166317750933959483605431021818039941374⟩⟩, + ⟨⟨-1678055474089388671132140767459268850272686264750,-1678055474089388671132140767459268850272686264749⟩,⟨-295886455207493681360700309416887089773933468290,-295886455207493681360700309416887089773933468289⟩⟩, + ⟨⟨-13013223920082475577045530712090735418405481263,-13013223920082475577045530712090735418405481262⟩,⟨-73801660232578045165009345440828423413685331858,-73801660232578045165009345440828423413685331857⟩⟩, + ⟨⟨1156386444162983261165402800513026795765261226,1156386444162983261165402800513026795765261227⟩,⟨-667640024824732529218764349621828240794518712,-667640024824732529218764349621828240794518711⟩⟩, + ⟨⟨3503875771657660643689957234273464365334049,3503875771657660643689957234273464365334050⟩,⟨2940100867688950442459472411416654948393064,2940100867688950442459472411416654948393065⟩⟩, + ⟨⟨-95483093024649773224269410417146789802,-95483093024649773224269410417146789801⟩,⟨262337642024910403651229255044561533555,262337642024910403651229255044561533556⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-95483093024649773224269410417146789802,-95483093024649773224269410417146789801⟩,⟨-262337642024910403651229255044561533556,-262337642024910403651229255044561533555⟩⟩, + ⟨⟨3503875771657660643689957234273464365334049,3503875771657660643689957234273464365334050⟩,⟨-2940100867688950442459472411416654948393065,-2940100867688950442459472411416654948393064⟩⟩, + ⟨⟨1156386444162983261165402800513026795765261226,1156386444162983261165402800513026795765261227⟩,⟨667640024824732529218764349621828240794518711,667640024824732529218764349621828240794518712⟩⟩, + ⟨⟨-13013223920082475577045530712090735418405481263,-13013223920082475577045530712090735418405481262⟩,⟨73801660232578045165009345440828423413685331857,73801660232578045165009345440828423413685331858⟩⟩, + ⟨⟨-1678055474089388671132140767459268850272686264750,-1678055474089388671132140767459268850272686264749⟩,⟨295886455207493681360700309416887089773933468289,295886455207493681360700309416887089773933468290⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573426,-10938614166728417758720235104204033897177394573423⟩,⟨-18946235501166317750933959483605431021818039941374,-18946235501166317750933959483605431021818039941370⟩⟩, + ⟨⟨121706802061157906873079927979635233664299680946238,121706802061157906873079927979635233664299680946258⟩,⟨-145044518599537333022110235441305321157077677737383,-145044518599537333022110235441305321157077677737362⟩⟩, + ⟨⟨1153773151238907290636481167989590844703351601702080,1153773151238907290636481167989590844703351601702225⟩,⟨419939084146479613800502877424483512143271640813592,419939084146479613800502877424483512143271640813703⟩⟩, + ⟨⟨-279,316⟩,⟨6386603083791852241089888205092732398089436736505470,6386603083791852241089888205092732398089436736506350⟩⟩, + ⟨⟨-26233764202491040365122925504456153355553206022300769,-26233764202491040365122925504456153355553206022297764⟩,⟨9548309302464977322426941041714678980117051669676688,9548309302464977322426941041714678980117051669678941⟩⟩, + ⟨⟨-68145923780689782509828607331182077562130813751860461,-68145923780689782509828607331182077562130813751846767⟩,⟨-81213149486288255099445765074393573995480099774034579,-81213149486288255099445765074393573995480099774020267⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690951063,179218254507678396558872331947278891371354432691012407⟩,⟨-310415122451108950031301992179391381861466766399473350,-310415122451108950031301992179391381861466766399406237⟩⟩, + ⟨⟨1082513161842357709573769918339026977679867963699508130,1082513161842357709573769918339026977679867963699716975⟩,⟨190876277404836829495612066087778239473104680177832456,190876277404836829495612066087778239473104680178001669⟩⟩, + ⟨⟨538688276046780162803882708028331402146924146363305297,538688276046780162803882708028331402146924146363966622⟩,⟨3055053026385310413148568452067918812976667730203998189,3055053026385310413148568452067918812976667730204771876⟩⟩, + ⟨⟨-7058022730486958381136491702350017063996955730532933696,-7058022730486958381136491702350017063996955730531258518⟩,⟨4074951323393142878532497251109791508755607371562076418,4074951323393142878532497251109791508755607371563616696⟩⟩] +lemma tw0_0_3_12_calc (j : Fin 31) : taylorWaveBox 0 0 3 12 j = tw0_0_3_12 j := by + revert j + decide +kernel +def tw0_0_3_13 : Fin 31 → CI := ![⟨⟨-711213174517105746409924496561635036133590707082918839,-711213174517105746409924496561635036133590707082647745⟩,⟨1231857353275977869214001563220895965360893961740080319,1231857353275977869214001563220895965360893961740376615⟩⟩, + ⟨⟨-497660185245448086772235576684499773028618735211819316,-497660185245448086772235576684499773028618735211691700⟩,⟨-87750917883145229824860553449716522255744518859690101,-87750917883145229824860553449716522255744518859582093⟩⟩, + ⟨⟨-28872302373758654681651018807869740983692548856247763,-28872302373758654681651018807869740983692548856222074⟩,⟨-163742963542802697347970148666527384585489985810475598,-163742963542802697347970148666527384585489985810443486⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797356359,43342127478025776420404444686963708682595437797365869⟩,⟨-25023588966689257663727985644023700918120860663566761,-25023588966689257663727985644023700918120860663558115⟩⟩, + ⟨⟨10394536932633857784891297926903649639886276412233707,10394536932633857784891297926903649639886276412235572⟩,⟨8722052106431685555098356917296379475023750792294871,8722052106431685555098356917296379475023750792296652⟩⟩, + ⟨⟨-1110996235512113178195996021585085367345509698074321,-1110996235512113178195996021585085367345509698074055⟩,⟨3052437070168620498349969481348055086792887172979492,3052437070168620498349969481348055086792887172979853⟩⟩, + ⟨⟨-668803510981146723247822633578313868995627098570473,-668803510981146723247822633578313868995627098570378⟩,⟨-34,30⟩⟩, + ⟨⟨-39089704939549818160762250779476391805887369098691,-39089704939549818160762250779476391805887369098680⟩,⟨-107398081654556936157989608529821520617323658718138,-107398081654556936157989608529821520617323658718124⟩⟩, + ⟨⟨11813687253816378802862460243784278755937796759923,11813687253816378802862460243784278755937796759926⟩,⟨-9912860617521057410560586795340341593102237264695,-9912860617521057410560586795340341593102237264692⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨763659331258827443351073780640371732120387593492,763659331258827443351073780640371732120387593493⟩⟩, + ⟨⟨-17213976184751621676680716775869645150447000646,-17213976184751621676680716775869645150447000645⟩,⟨97625310179914094201357658053014220184172519745,97625310179914094201357658053014220184172519746⟩⟩, + ⟨⟨-3434885238657735972325739562081051524415193655,-3434885238657735972325739562081051524415193654⟩,⟨605662943212593717119454121051739651115375554,605662943212593717119454121051739651115375555⟩⟩, + ⟨⟨-23305033302576521098360405903331656864025501,-23305033302576521098360405903331656864025500⟩,⟨-40365501752147242818404403223622318992945774,-40365501752147242818404403223622318992945773⟩⟩, + ⟨⟨68419253975885803047947197398911700161313,68419253975885803047947197398911700161314⟩,⟨-81538891728377589243854708868263397113956,-81538891728377589243854708868263397113955⟩⟩, + ⟨⟨3052437070168620498349969481348055086,3052437070168620498349969481348055087⟩,⟨1110996235512113178195996021585085367,1110996235512113178195996021585085368⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨3052437070168620498349969481348055086,3052437070168620498349969481348055087⟩,⟨-1110996235512113178195996021585085368,-1110996235512113178195996021585085367⟩⟩, + ⟨⟨68419253975885803047947197398911700161313,68419253975885803047947197398911700161314⟩,⟨81538891728377589243854708868263397113955,81538891728377589243854708868263397113956⟩⟩, + ⟨⟨-23305033302576521098360405903331656864025501,-23305033302576521098360405903331656864025500⟩,⟨40365501752147242818404403223622318992945773,40365501752147242818404403223622318992945774⟩⟩, + ⟨⟨-3434885238657735972325739562081051524415193655,-3434885238657735972325739562081051524415193654⟩,⟨-605662943212593717119454121051739651115375555,-605662943212593717119454121051739651115375554⟩⟩, + ⟨⟨-17213976184751621676680716775869645150447000646,-17213976184751621676680716775869645150447000645⟩,⟨-97625310179914094201357658053014220184172519746,-97625310179914094201357658053014220184172519745⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨-763659331258827443351073780640371732120387593493,-763659331258827443351073780640371732120387593492⟩⟩, + ⟨⟨11813687253816378802862460243784278755937796759923,11813687253816378802862460243784278755937796759926⟩,⟨9912860617521057410560586795340341593102237264692,9912860617521057410560586795340341593102237264695⟩⟩, + ⟨⟨-39089704939549818160762250779476391805887369098691,-39089704939549818160762250779476391805887369098680⟩,⟨107398081654556936157989608529821520617323658718124,107398081654556936157989608529821520617323658718138⟩⟩, + ⟨⟨-668803510981146723247822633578313868995627098570473,-668803510981146723247822633578313868995627098570378⟩,⟨-30,34⟩⟩, + ⟨⟨-1110996235512113178195996021585085367345509698074321,-1110996235512113178195996021585085367345509698074055⟩,⟨-3052437070168620498349969481348055086792887172979853,-3052437070168620498349969481348055086792887172979492⟩⟩, + ⟨⟨10394536932633857784891297926903649639886276412233707,10394536932633857784891297926903649639886276412235572⟩,⟨-8722052106431685555098356917296379475023750792296652,-8722052106431685555098356917296379475023750792294871⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797356359,43342127478025776420404444686963708682595437797365869⟩,⟨25023588966689257663727985644023700918120860663558115,25023588966689257663727985644023700918120860663566761⟩⟩, + ⟨⟨-28872302373758654681651018807869740983692548856247763,-28872302373758654681651018807869740983692548856222074⟩,⟨163742963542802697347970148666527384585489985810443486,163742963542802697347970148666527384585489985810475598⟩⟩, + ⟨⟨-497660185245448086772235576684499773028618735211819316,-497660185245448086772235576684499773028618735211691700⟩,⟨87750917883145229824860553449716522255744518859582093,87750917883145229824860553449716522255744518859690101⟩⟩, + ⟨⟨-711213174517105746409924496561635036133590707082918839,-711213174517105746409924496561635036133590707082647745⟩,⟨-1231857353275977869214001563220895965360893961740376615,-1231857353275977869214001563220895965360893961740080319⟩⟩] +lemma tw0_0_3_13_calc (j : Fin 31) : taylorWaveBox 0 0 3 13 j = tw0_0_3_13 j := by + revert j + decide +kernel +def tw0_0_3_14 : Fin 31 → CI := ![⟨⟨201562188089707223595102174191806275779722154968153842,201562188089707223595102174191806275779722154968202966⟩,⟨116371983552042445686522962423844893895399380113593116,116371983552042445686522962423844893895399380113637845⟩⟩, + ⟨⟨-13400996338695498972937755042194405325715185711998909,-13400996338695498972937755042194405325715185711982371⟩,⟨76000826900407272665588578544909849609574076243472965,76000826900407272665588578544909849609574076243492697⟩⟩, + ⟨⟨-23220062456458937051682273736307168514032059785090360,-23220062456458937051682273736307168514032059785085731⟩,⟨4094323504809386796545481967111877001038890626840177,4094323504809386796545481967111877001038890626843834⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402896,-3275580136008399049375563065350230572121000394401753⟩,⟨-5673471219829920494753699488938742157419895557685713,-5673471219829920494753699488938742157419895557684449⟩⟩, + ⟨⟨1046571121665711153424133257695273980919397399896447,1046571121665711153424133257695273980919397399896665⟩,⟨-1247254894150463273314824083748129258445534289862146,-1247254894150463273314824083748129258445534289861918⟩⟩, + ⟨⟨332969231777322582415959598905654739126927932919293,332969231777322582415959598905654739126927932919334⟩,⟨121190889293429531971788742091240851633109566614847,121190889293429531971788742091240851633109566614877⟩⟩, + ⟨⟨-4,3⟩,⟨65659631149794723622098140181990406812989656915291,65659631149794723622098140181990406812989656915301⟩⟩, + ⟨⟨-9372250675988689360773520724833497867993527516119,-9372250675988689360773520724833497867993527516117⟩,⟨3411220274141176709116192633014570882324193472646,3411220274141176709116192633014570882324193472648⟩⟩, + ⟨⟨-756927745293215786107341014289082566333449185797,-756927745293215786107341014289082566333449185796⟩,⟨-902071359787425010598111049866130186600615591387,-902071359787425010598111049866130186600615591386⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨-86570300595549323955592338393230318564146355556,-86570300595549323955592338393230318564146355555⟩⟩, + ⟨⟨5324634674750746082657408353139546297411992874,5324634674750746082657408353139546297411992875⟩,⟨938876755574398473092346503577998492866972545,938876755574398473092346503577998492866972546⟩⟩, + ⟨⟨26427031290948007603758459917221563675449336,26427031290948007603758459917221563675449337⟩,⟨149875142106821763901775424053913650932366697,149875142106821763901775424053913650932366698⟩⟩, + ⟨⟨-1320957955864705260552861608783421608949988,-1320957955864705260552861608783421608949987⟩,⟨762655431406665372051196886540909896632889,762655431406665372051196886540909896632890⟩⟩, + ⟨⟨-1778902661359198562440836405311353847143,-1778902661359198562440836405311353847142⟩,⟨-1492676567046785356931053464716000981904,-1492676567046785356931053464716000981903⟩⟩, + ⟨⟨12119088929342953197178874209124085,12119088929342953197178874209124086⟩,⟨-33296923177732258241595959890565474,-33296923177732258241595959890565473⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨12119088929342953197178874209124085,12119088929342953197178874209124086⟩,⟨33296923177732258241595959890565473,33296923177732258241595959890565474⟩⟩, + ⟨⟨-1778902661359198562440836405311353847143,-1778902661359198562440836405311353847142⟩,⟨1492676567046785356931053464716000981903,1492676567046785356931053464716000981904⟩⟩, + ⟨⟨-1320957955864705260552861608783421608949988,-1320957955864705260552861608783421608949987⟩,⟨-762655431406665372051196886540909896632890,-762655431406665372051196886540909896632889⟩⟩, + ⟨⟨26427031290948007603758459917221563675449336,26427031290948007603758459917221563675449337⟩,⟨-149875142106821763901775424053913650932366698,-149875142106821763901775424053913650932366697⟩⟩, + ⟨⟨5324634674750746082657408353139546297411992874,5324634674750746082657408353139546297411992875⟩,⟨-938876755574398473092346503577998492866972546,-938876755574398473092346503577998492866972545⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨86570300595549323955592338393230318564146355555,86570300595549323955592338393230318564146355556⟩⟩, + ⟨⟨-756927745293215786107341014289082566333449185797,-756927745293215786107341014289082566333449185796⟩,⟨902071359787425010598111049866130186600615591386,902071359787425010598111049866130186600615591387⟩⟩, + ⟨⟨-9372250675988689360773520724833497867993527516119,-9372250675988689360773520724833497867993527516117⟩,⟨-3411220274141176709116192633014570882324193472648,-3411220274141176709116192633014570882324193472646⟩⟩, + ⟨⟨-4,3⟩,⟨-65659631149794723622098140181990406812989656915301,-65659631149794723622098140181990406812989656915291⟩⟩, + ⟨⟨332969231777322582415959598905654739126927932919293,332969231777322582415959598905654739126927932919334⟩,⟨-121190889293429531971788742091240851633109566614877,-121190889293429531971788742091240851633109566614847⟩⟩, + ⟨⟨1046571121665711153424133257695273980919397399896447,1046571121665711153424133257695273980919397399896665⟩,⟨1247254894150463273314824083748129258445534289861918,1247254894150463273314824083748129258445534289862146⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394402896,-3275580136008399049375563065350230572121000394401753⟩,⟨5673471219829920494753699488938742157419895557684449,5673471219829920494753699488938742157419895557685713⟩⟩, + ⟨⟨-23220062456458937051682273736307168514032059785090360,-23220062456458937051682273736307168514032059785085731⟩,⟨-4094323504809386796545481967111877001038890626843834,-4094323504809386796545481967111877001038890626840177⟩⟩, + ⟨⟨-13400996338695498972937755042194405325715185711998909,-13400996338695498972937755042194405325715185711982371⟩,⟨-76000826900407272665588578544909849609574076243492697,-76000826900407272665588578544909849609574076243472965⟩⟩, + ⟨⟨201562188089707223595102174191806275779722154968153842,201562188089707223595102174191806275779722154968202966⟩,⟨-116371983552042445686522962423844893895399380113637845,-116371983552042445686522962423844893895399380113593116⟩⟩] +lemma tw0_0_3_14_calc (j : Fin 31) : taylorWaveBox 0 0 3 14 j = tw0_0_3_14 j := by + revert j + decide +kernel +def tw0_0_3_15 : Fin 31 → CI := ![⟨⟨17921243559351411743059444294652121584177020296556064,17921243559351411743059444294652121584177020296563010⟩,⟨-31040504379613153638845397438259401537550658444209518,-31040504379613153638845397438259401537550658444201854⟩⟩, + ⟨⟨10923826641826687387986114704678627948647468397521595,10923826641826687387986114704678627948647468397524467⟩,⟨1926165369535990022532214357602458744253341723059053,1926165369535990022532214357602458744253341723061437⟩⟩, + ⟨⟨546454432593723505166047795546886156499537122441258,546454432593723505166047795546886156499537122441749⟩,⟨3099097088818295239628449430612755014168706968736341,3099097088818295239628449430612755014168706968736969⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635475010,-698970019787090239214134897920947303315208635474852⟩,⟨403550529079554596708656969046895623673248550739964,403550529079554596708656969046895623673248550740107⟩⟩, + ⟨⟨-140856323329369662062801374711462973061098302930778,-140856323329369662062801374711462973061098302930750⟩,⟨-118192488954661785556232848106148130951118765397348,-118192488954661785556232848106148130951118765397322⟩⟩, + ⟨⟨12442235538766409996220248831823001419393735778914,12442235538766409996220248831823001419393735778919⟩,⟨-34184761190296528053834354857447710005014023093861,-34184761190296528053834354857447710005014023093855⟩⟩, + ⟨⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩,⟨-1,1⟩⟩, + ⟨⟨280174236680221732986386919434024361167985968769,280174236680221732986386919434024361167985968770⟩,⟨769772388791844185223017694568102790439251346506,769772388791844185223017694568102790439251346507⟩⟩, + ⟨⟨-64828710125665057208752581082692615444020074448,-64828710125665057208752581082692615444020074447⟩,⟨54397746756144347627124451880077945521056574571,54397746756144347627124451880077945521056574572⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨-3078846199642597936314826729178585996042240530,-3078846199642597936314826729178585996042240529⟩⟩, + ⟨⟨48195560750633173205046701147053787154728807,48195560750633173205046701147053787154728808⟩,⟨-273330607471346765163345934214124138028317023,-273330607471346765163345934214124138028317022⟩⟩, + ⟨⟨6154858109784543007615027172523275106993105,6154858109784543007615027172523275106993106⟩,⟨-1085267547187318306679706529716144452835765,-1085267547187318306679706529716144452835764⟩⟩, + ⟨⟨23489732358113082399862874825886428802812,23489732358113082399862874825886428802813⟩,⟨40685409900446552737507439330275362783298,40685409900446552737507439330275362783299⟩⟩, + ⟨⟨-30649553838037995627832710866522180945,-30649553838037995627832710866522180944⟩,⟨36526715897891437642386602255582594354,36526715897891437642386602255582594355⟩⟩, + ⟨⟨-341847611902965280538343548574478,-341847611902965280538343548574477⟩,⟨-124422355387664099962202488318231,-124422355387664099962202488318230⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-341847611902965280538343548574478,-341847611902965280538343548574477⟩,⟨124422355387664099962202488318230,124422355387664099962202488318231⟩⟩, + ⟨⟨-30649553838037995627832710866522180945,-30649553838037995627832710866522180944⟩,⟨-36526715897891437642386602255582594355,-36526715897891437642386602255582594354⟩⟩, + ⟨⟨23489732358113082399862874825886428802812,23489732358113082399862874825886428802813⟩,⟨-40685409900446552737507439330275362783299,-40685409900446552737507439330275362783298⟩⟩, + ⟨⟨6154858109784543007615027172523275106993105,6154858109784543007615027172523275106993106⟩,⟨1085267547187318306679706529716144452835764,1085267547187318306679706529716144452835765⟩⟩, + ⟨⟨48195560750633173205046701147053787154728807,48195560750633173205046701147053787154728808⟩,⟨273330607471346765163345934214124138028317022,273330607471346765163345934214124138028317023⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨3078846199642597936314826729178585996042240529,3078846199642597936314826729178585996042240530⟩⟩, + ⟨⟨-64828710125665057208752581082692615444020074448,-64828710125665057208752581082692615444020074447⟩,⟨-54397746756144347627124451880077945521056574572,-54397746756144347627124451880077945521056574571⟩⟩, + ⟨⟨280174236680221732986386919434024361167985968769,280174236680221732986386919434024361167985968770⟩,⟨-769772388791844185223017694568102790439251346507,-769772388791844185223017694568102790439251346506⟩⟩, + ⟨⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩,⟨-1,1⟩⟩, + ⟨⟨12442235538766409996220248831823001419393735778914,12442235538766409996220248831823001419393735778919⟩,⟨34184761190296528053834354857447710005014023093855,34184761190296528053834354857447710005014023093861⟩⟩, + ⟨⟨-140856323329369662062801374711462973061098302930778,-140856323329369662062801374711462973061098302930750⟩,⟨118192488954661785556232848106148130951118765397322,118192488954661785556232848106148130951118765397348⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635475010,-698970019787090239214134897920947303315208635474852⟩,⟨-403550529079554596708656969046895623673248550740107,-403550529079554596708656969046895623673248550739964⟩⟩, + ⟨⟨546454432593723505166047795546886156499537122441258,546454432593723505166047795546886156499537122441749⟩,⟨-3099097088818295239628449430612755014168706968736969,-3099097088818295239628449430612755014168706968736341⟩⟩, + ⟨⟨10923826641826687387986114704678627948647468397521595,10923826641826687387986114704678627948647468397524467⟩,⟨-1926165369535990022532214357602458744253341723061437,-1926165369535990022532214357602458744253341723059053⟩⟩, + ⟨⟨17921243559351411743059444294652121584177020296556064,17921243559351411743059444294652121584177020296563010⟩,⟨31040504379613153638845397438259401537550658444201854,31040504379613153638845397438259401537550658444209518⟩⟩] +lemma tw0_0_3_15_calc (j : Fin 31) : taylorWaveBox 0 0 3 15 j = tw0_0_3_15 j := by + revert j + decide +kernel +def tw0_0_3_16 : Fin 31 → CI := ![⟨⟨-4514658357533078058126056621844135307725227288724642,-4514658357533078058126056621844135307725227288723512⟩,⟨-2606539218020916335801904305695669616417146414199193,-2606539218020916335801904305695669616417146414198173⟩⟩, + ⟨⟨261472770504526846264642864230588750865854312374407,261472770504526846264642864230588750865854312374733⟩,⟨-1482885769687396782854239624029558205568978797581950,-1482885769687396782854239624029558205568978797581554⟩⟩, + ⟨⟨390646013613919526872335649758873086884392658737354,390646013613919526872335649758873086884392658737435⟩,⟨-68881432106340333808000502380167019331966464473197,-68881432106340333808000502380167019331966464473134⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910365,46955236204022331368942161583079895990618065910383⟩,⟨81328854786764263382283872837366397192702514363826,81328854786764263382283872837366397192702514363846⟩⟩, + ⟨⟨-12606293842913705897174015379543344209556575680380,-12606293842913705897174015379543344209556575680376⟩,⟨15023595976590678092813448060069489694071765507558,15023595976590678092813448060069489694071765507562⟩⟩, + ⟨⟨-3314647982103612605982452923884630321317945515555,-3314647982103612605982452923884630321317945515554⟩,⟨-1206433202556246812328250769210143285852611855688,-1206433202556246812328250769210143285852611855687⟩⟩, + ⟨⟨-1,1⟩,⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩⟩, + ⟨⟨59711389668264784905730132050471821538431798271,59711389668264784905730132050471821538431798272⟩,⟨-21733168485918829065342913539030527935086633509,-21733168485918829065342913539030527935086633508⟩⟩, + ⟨⟨3692188058847492649261126642879133869383508438,3692188058847492649261126642879133869383508439⟩,⟨4400178383664941658930543998872661329238600432,4400178383664941658930543998872661329238600433⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨310244959971482327965865603780236805697259957,310244959971482327965865603780236805697259958⟩⟩, + ⟨⟨-13251441796808926691419307556565042506834640,-13251441796808926691419307556565042506834639⟩,⟨-2336586722065274041569292992361356960042757,-2336586722065274041569292992361356960042756⟩⟩, + ⟨⟨-42092204363248067509770184745430311323842,-42092204363248067509770184745430311323841⟩,⟨-238716753352921992870787430863234778429987,-238716753352921992870787430863234778429986⟩⟩, + ⟨⟨1183490600477151214469396987076709006108,1183490600477151214469396987076709006109⟩,⟨-683288616768875091932454402312285615927,-683288616768875091932454402312285615926⟩⟩, + ⟨⟨708346063731958325609578412558268435,708346063731958325609578412558268436⟩,⟨594372920823364312437141586810776641,594372920823364312437141586810776642⟩⟩, + ⟨⟨-1206433202556246812328250769211,-1206433202556246812328250769210⟩,⟨3314647982103612605982452923884,3314647982103612605982452923885⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1206433202556246812328250769211,-1206433202556246812328250769210⟩,⟨-3314647982103612605982452923885,-3314647982103612605982452923884⟩⟩, + ⟨⟨708346063731958325609578412558268435,708346063731958325609578412558268436⟩,⟨-594372920823364312437141586810776642,-594372920823364312437141586810776641⟩⟩, + ⟨⟨1183490600477151214469396987076709006108,1183490600477151214469396987076709006109⟩,⟨683288616768875091932454402312285615926,683288616768875091932454402312285615927⟩⟩, + ⟨⟨-42092204363248067509770184745430311323842,-42092204363248067509770184745430311323841⟩,⟨238716753352921992870787430863234778429986,238716753352921992870787430863234778429987⟩⟩, + ⟨⟨-13251441796808926691419307556565042506834640,-13251441796808926691419307556565042506834639⟩,⟨2336586722065274041569292992361356960042756,2336586722065274041569292992361356960042757⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨-310244959971482327965865603780236805697259958,-310244959971482327965865603780236805697259957⟩⟩, + ⟨⟨3692188058847492649261126642879133869383508438,3692188058847492649261126642879133869383508439⟩,⟨-4400178383664941658930543998872661329238600433,-4400178383664941658930543998872661329238600432⟩⟩, + ⟨⟨59711389668264784905730132050471821538431798271,59711389668264784905730132050471821538431798272⟩,⟨21733168485918829065342913539030527935086633508,21733168485918829065342913539030527935086633509⟩⟩, + ⟨⟨-1,1⟩,⟨529440020073462376192782879028056848059477939597,529440020073462376192782879028056848059477939598⟩⟩, + ⟨⟨-3314647982103612605982452923884630321317945515555,-3314647982103612605982452923884630321317945515554⟩,⟨1206433202556246812328250769210143285852611855687,1206433202556246812328250769210143285852611855688⟩⟩, + ⟨⟨-12606293842913705897174015379543344209556575680380,-12606293842913705897174015379543344209556575680376⟩,⟨-15023595976590678092813448060069489694071765507562,-15023595976590678092813448060069489694071765507558⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910365,46955236204022331368942161583079895990618065910383⟩,⟨-81328854786764263382283872837366397192702514363846,-81328854786764263382283872837366397192702514363826⟩⟩, + ⟨⟨390646013613919526872335649758873086884392658737354,390646013613919526872335649758873086884392658737435⟩,⟨68881432106340333808000502380167019331966464473134,68881432106340333808000502380167019331966464473197⟩⟩, + ⟨⟨261472770504526846264642864230588750865854312374407,261472770504526846264642864230588750865854312374733⟩,⟨1482885769687396782854239624029558205568978797581554,1482885769687396782854239624029558205568978797581950⟩⟩, + ⟨⟨-4514658357533078058126056621844135307725227288724642,-4514658357533078058126056621844135307725227288723512⟩,⟨2606539218020916335801904305695669616417146414198173,2606539218020916335801904305695669616417146414199193⟩⟩] +lemma tw0_0_3_16_calc (j : Fin 31) : taylorWaveBox 0 0 3 16 j = tw0_0_3_16 j := by + revert j + decide +kernel +def tw0_0_3_17 : Fin 31 → CI := ![⟨⟨-359152827132815577520148497810446873484169467973328,-359152827132815577520148497810446873484169467973186⟩,⟨622070944276038605487991186313010558787987836965953,622070944276038605487991186313010558787987836966111⟩⟩, + ⟨⟨-190703867141166098716922245674025373864728791569194,-190703867141166098716922245674025373864728791569141⟩,⟨-33626237102430062040137360339392265701789625966490,-33626237102430062040137360339392265701789625966448⟩⟩, + ⟨⟨-8225632204568122322132823747048574164519281388769,-8225632204568122322132823747048574164519281388760⟩,⟨-46649878376629132283696303656116623162332689708855,-46649878376629132283696303656116623162332689708844⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014813,8964987113086656144908199868279810049180380014816⟩,⟨-5175937723022106880706975999784460140708483619865,-5175937723022106880706975999784460140708483619863⟩⟩, + ⟨⟨1518064930573517385086678059435495142899582500417,1518064930573517385086678059435495142899582500418⟩,⟨1273807723347401624947580649869100787308918353058,1273807723347401624947580649869100787308918353059⟩⟩, + ⟨⟨-110822271526243039485076300116777483412412054569,-110822271526243039485076300116777483412412054568⟩,⟨304481688591021690509977007011559192452731751042,304481688591021690509977007011559192452731751043⟩⟩, + ⟨⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩,⟨-1,1⟩⟩, + ⟨⟨-1597117250399808261272713082974470270803850262,-1597117250399808261272713082974470270803850261⟩,⟨-4388043581694927003602755394569660176026555404,-4388043581694927003602755394569660176026555403⟩⟩, + ⟨⟨282938528047499238937410121891631267878479473,282938528047499238937410121891631267878479474⟩,⟨-237413614530499107445664253420086577460261047,-237413614530499107445664253420086577460261046⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨9872317739528859864629699706620140344063727,9872317739528859864629699706620140344063728⟩⟩, + ⟨⟨-107318767259001768496804062367888390636316,-107318767259001768496804062367888390636315⟩,⟨608634973659761019155228970305497607115570,608634973659761019155228970305497607115571⟩⟩, + ⟨⟨-8771354369852004396728562765825180198520,-8771354369852004396728562765825180198519⟩,⟨1546626432760004323164602384617916194362,1546626432760004323164602384617916194363⟩⟩, + ⟨⟨-18829951743180961350688361562004357041,-18829951743180961350688361562004357040⟩,⟨-32614433123259572839408792308967567985,-32614433123259572839408792308967567984⟩⟩, + ⟨⟨10919752055856076985507794715502247,10919752055856076985507794715502248⟩,⟨-13013653742804489800689888723511475,-13013653742804489800689888723511474⟩⟩, + ⟨⟨30448168859102169050997700701,30448168859102169050997700702⟩,⟨11082227152624303948507630011,11082227152624303948507630012⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨30448168859102169050997700701,30448168859102169050997700702⟩,⟨-11082227152624303948507630012,-11082227152624303948507630011⟩⟩, + ⟨⟨10919752055856076985507794715502247,10919752055856076985507794715502248⟩,⟨13013653742804489800689888723511474,13013653742804489800689888723511475⟩⟩, + ⟨⟨-18829951743180961350688361562004357041,-18829951743180961350688361562004357040⟩,⟨32614433123259572839408792308967567984,32614433123259572839408792308967567985⟩⟩, + ⟨⟨-8771354369852004396728562765825180198520,-8771354369852004396728562765825180198519⟩,⟨-1546626432760004323164602384617916194363,-1546626432760004323164602384617916194362⟩⟩, + ⟨⟨-107318767259001768496804062367888390636316,-107318767259001768496804062367888390636315⟩,⟨-608634973659761019155228970305497607115571,-608634973659761019155228970305497607115570⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨-9872317739528859864629699706620140344063728,-9872317739528859864629699706620140344063727⟩⟩, + ⟨⟨282938528047499238937410121891631267878479473,282938528047499238937410121891631267878479474⟩,⟨237413614530499107445664253420086577460261046,237413614530499107445664253420086577460261047⟩⟩, + ⟨⟨-1597117250399808261272713082974470270803850262,-1597117250399808261272713082974470270803850261⟩,⟨4388043581694927003602755394569660176026555403,4388043581694927003602755394569660176026555404⟩⟩, + ⟨⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩,⟨-1,1⟩⟩, + ⟨⟨-110822271526243039485076300116777483412412054569,-110822271526243039485076300116777483412412054568⟩,⟨-304481688591021690509977007011559192452731751043,-304481688591021690509977007011559192452731751042⟩⟩, + ⟨⟨1518064930573517385086678059435495142899582500417,1518064930573517385086678059435495142899582500418⟩,⟨-1273807723347401624947580649869100787308918353059,-1273807723347401624947580649869100787308918353058⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014813,8964987113086656144908199868279810049180380014816⟩,⟨5175937723022106880706975999784460140708483619863,5175937723022106880706975999784460140708483619865⟩⟩, + ⟨⟨-8225632204568122322132823747048574164519281388769,-8225632204568122322132823747048574164519281388760⟩,⟨46649878376629132283696303656116623162332689708844,46649878376629132283696303656116623162332689708855⟩⟩, + ⟨⟨-190703867141166098716922245674025373864728791569194,-190703867141166098716922245674025373864728791569141⟩,⟨33626237102430062040137360339392265701789625966448,33626237102430062040137360339392265701789625966490⟩⟩, + ⟨⟨-359152827132815577520148497810446873484169467973328,-359152827132815577520148497810446873484169467973186⟩,⟨-622070944276038605487991186313010558787987836966111,-622070944276038605487991186313010558787987836965953⟩⟩] +lemma tw0_0_3_17_calc (j : Fin 31) : taylorWaveBox 0 0 3 17 j = tw0_0_3_17 j := by + revert j + decide +kernel +def tw0_0_3_18 : Fin 31 → CI := ![⟨⟨81428896189552855155146582162217359628031458223009,81428896189552855155146582162217359628031458223031⟩,⟨47012995134852432606621988115494129887473178666113,47012995134852432606621988115494129887473178666133⟩⟩, + ⟨⟨-4108219867455776280039402760477120770431091971400,-4108219867455776280039402760477120770431091971394⟩,⟨23298872645294220371066976932054110403094477180251,23298872645294220371066976932054110403094477180258⟩⟩, + ⟨⟨-5292260826626057256911826198486703118851182319649,-5292260826626057256911826198486703118851182319647⟩,⟨933168372680657691556066975703438566527039732382,933168372680657691556066975703438566527039732384⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨-938811255133340262646138237899899244591360555188,-938811255133340262646138237899899244591360555187⟩⟩, + ⟨⟨122276763453598621202725249377070377045598956033,122276763453598621202725249377070377045598956034⟩,⟨-145723772136618552706976736052738897460306690198,-145723772136618552706976736052738897460306690197⟩⟩, + ⟨⟨26571039889726914051012676876582315106259472412,26571039889726914051012676876582315106259472413⟩,⟨9671067613360512665443163401827138478878947198,9671067613360512665443163401827138478878947199⟩⟩, + ⟨⟨-1,1⟩,⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩⟩, + ⟨⟨-306343232886325031032284194052842578123296939,-306343232886325031032284194052842578123296938⟩,⟨111499818239501508923131450845861842533580598,111499818239501508923131450845861842533580599⟩⟩, + ⟨⟨-14502772419162513596122078333726048279173732,-14502772419162513596122078333726048279173731⟩,⟨-17283731133113147010230362175439503638771575,-17283731133113147010230362175439503638771574⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨-895320181973781836172235715770625347701417,-895320181973781836172235715770625347701416⟩⟩, + ⟨⟨26556710582879479606531607011589332312304,26556710582879479606531607011589332312305⟩,⟨4682664594627677601570442383042479612503,4682664594627677601570442383042479612504⟩⟩, + ⟨⟨53987447100073532293017791926186355018,53987447100073532293017791926186355019⟩,⟨306178027226219857884273581510158940032,306178027226219857884273581510158940033⟩⟩, + ⟨⟨-853843862508565746471629825373292301,-853843862508565746471629825373292300⟩,⟨492966983865230243729212578101923727,492966983865230243729212578101923728⟩⟩, + ⟨⟨-227131105526421676435894159900318,-227131105526421676435894159900317⟩,⟨-190585626876108294507256327196715,-190585626876108294507256327196714⟩⟩, + ⟨⟨96710676133605126654431634,96710676133605126654431635⟩,⟨-265710398897269140510126769,-265710398897269140510126768⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨96710676133605126654431634,96710676133605126654431635⟩,⟨265710398897269140510126768,265710398897269140510126769⟩⟩, + ⟨⟨-227131105526421676435894159900318,-227131105526421676435894159900317⟩,⟨190585626876108294507256327196714,190585626876108294507256327196715⟩⟩, + ⟨⟨-853843862508565746471629825373292301,-853843862508565746471629825373292300⟩,⟨-492966983865230243729212578101923728,-492966983865230243729212578101923727⟩⟩, + ⟨⟨53987447100073532293017791926186355018,53987447100073532293017791926186355019⟩,⟨-306178027226219857884273581510158940033,-306178027226219857884273581510158940032⟩⟩, + ⟨⟨26556710582879479606531607011589332312304,26556710582879479606531607011589332312305⟩,⟨-4682664594627677601570442383042479612504,-4682664594627677601570442383042479612503⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨895320181973781836172235715770625347701416,895320181973781836172235715770625347701417⟩⟩, + ⟨⟨-14502772419162513596122078333726048279173732,-14502772419162513596122078333726048279173731⟩,⟨17283731133113147010230362175439503638771574,17283731133113147010230362175439503638771575⟩⟩, + ⟨⟨-306343232886325031032284194052842578123296939,-306343232886325031032284194052842578123296938⟩,⟨-111499818239501508923131450845861842533580599,-111499818239501508923131450845861842533580598⟩⟩, + ⟨⟨-1,1⟩,⟨-3437739179098607000216892970677563681642053416,-3437739179098607000216892970677563681642053415⟩⟩, + ⟨⟨26571039889726914051012676876582315106259472412,26571039889726914051012676876582315106259472413⟩,⟨-9671067613360512665443163401827138478878947199,-9671067613360512665443163401827138478878947198⟩⟩, + ⟨⟨122276763453598621202725249377070377045598956033,122276763453598621202725249377070377045598956034⟩,⟨145723772136618552706976736052738897460306690197,145723772136618552706976736052738897460306690198⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨938811255133340262646138237899899244591360555187,938811255133340262646138237899899244591360555188⟩⟩, + ⟨⟨-5292260826626057256911826198486703118851182319649,-5292260826626057256911826198486703118851182319647⟩,⟨-933168372680657691556066975703438566527039732384,-933168372680657691556066975703438566527039732382⟩⟩, + ⟨⟨-4108219867455776280039402760477120770431091971400,-4108219867455776280039402760477120770431091971394⟩,⟨-23298872645294220371066976932054110403094477180258,-23298872645294220371066976932054110403094477180251⟩⟩, + ⟨⟨81428896189552855155146582162217359628031458223009,81428896189552855155146582162217359628031458223031⟩,⟨-47012995134852432606621988115494129887473178666133,-47012995134852432606621988115494129887473178666113⟩⟩] +lemma tw0_0_3_18_calc (j : Fin 31) : taylorWaveBox 0 0 3 18 j = tw0_0_3_18 j := by + revert j + decide +kernel +def tw0_0_3_19 : Fin 31 → CI := ![⟨⟨5860939688051789411371205992794324400539448741817,5860939688051789411371205992794324400539448741821⟩,⟨-10151445319802585615026049916779046022334427963229,-10151445319802585615026049916779046022334427963226⟩⟩, + ⟨⟨2710946931088167233003841535674666908376303245017,2710946931088167233003841535674666908376303245019⟩,⟨478013087219655587545436004280247657467649806930,478013087219655587545436004280247657467649806931⟩⟩, + ⟨⟨100823422630387975402675561107199282961855488301,100823422630387975402675561107199282961855488302⟩,⟨571798043755352070923682104300376619548875098760,571798043755352070923682104300376619548875098761⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨54057627228469227234095818009485456165873225657,54057627228469227234095818009485456165873225658⟩⟩, + ⟨⟨-13322359925861725879124284240712408800633194452,-13322359925861725879124284240712408800633194451⟩,⟨-11178787300201549666565719992698440850570711362,-11178787300201549666565719992698440850570711361⟩⟩, + ⟨⟨803771295410147130083195063468790844929669059,803771295410147130083195063468790844929669060⟩,⟨-2208343484545169921293809742091702156339955891,-2208343484545169921293809742091702156339955890⟩⟩, + ⟨⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩,⟨-1,1⟩⟩, + ⟨⟨7413481690112490448736410906447034805455268,7413481690112490448736410906447034805455269⟩,⟨20368373543124357017273278847084190444121555,20368373543124357017273278847084190444121556⟩⟩, + ⟨⟨-1005526717674249174495648842417414230868141,-1005526717674249174495648842417414230868140⟩,⟨843737097939363448858783230098779745355887,843737097939363448858783230098779745355888⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨-25776685346827138535545262341253974993646,-25776685346827138535545262341253974993645⟩⟩, + ⟨⟨194590273673377501844526219846535204850,194590273673377501844526219846535204851⟩,⟨-1103576281358260437221358061820390426236,-1103576281358260437221358061820390426235⟩⟩, + ⟨⟨10178694614015957721860249892037667924,10178694614015957721860249892037667925⟩,⟨-1794778488842948106592443938029497410,-1794778488842948106592443938029497409⟩⟩, + ⟨⟨12291281388677186267635947390200603,12291281388677186267635947390200604⟩,⟨21289123855314632027723110635073009,21289123855314632027723110635073010⟩⟩, + ⟨⟨-3167949234252842716063754750199,-3167949234252842716063754750198⟩,⟨3775414881076901726745909822411,3775414881076901726745909822412⟩⟩, + ⟨⟨-2208343484545169921293810,-2208343484545169921293809⟩,⟨-803771295410147130083196,-803771295410147130083195⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-2208343484545169921293810,-2208343484545169921293809⟩,⟨803771295410147130083195,803771295410147130083196⟩⟩, + ⟨⟨-3167949234252842716063754750199,-3167949234252842716063754750198⟩,⟨-3775414881076901726745909822412,-3775414881076901726745909822411⟩⟩, + ⟨⟨12291281388677186267635947390200603,12291281388677186267635947390200604⟩,⟨-21289123855314632027723110635073010,-21289123855314632027723110635073009⟩⟩, + ⟨⟨10178694614015957721860249892037667924,10178694614015957721860249892037667925⟩,⟨1794778488842948106592443938029497409,1794778488842948106592443938029497410⟩⟩, + ⟨⟨194590273673377501844526219846535204850,194590273673377501844526219846535204851⟩,⟨1103576281358260437221358061820390426235,1103576281358260437221358061820390426236⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨25776685346827138535545262341253974993645,25776685346827138535545262341253974993646⟩⟩, + ⟨⟨-1005526717674249174495648842417414230868141,-1005526717674249174495648842417414230868140⟩,⟨-843737097939363448858783230098779745355888,-843737097939363448858783230098779745355887⟩⟩, + ⟨⟨7413481690112490448736410906447034805455268,7413481690112490448736410906447034805455269⟩,⟨-20368373543124357017273278847084190444121556,-20368373543124357017273278847084190444121555⟩⟩, + ⟨⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩,⟨-1,1⟩⟩, + ⟨⟨803771295410147130083195063468790844929669059,803771295410147130083195063468790844929669060⟩,⟨2208343484545169921293809742091702156339955890,2208343484545169921293809742091702156339955891⟩⟩, + ⟨⟨-13322359925861725879124284240712408800633194452,-13322359925861725879124284240712408800633194451⟩,⟨11178787300201549666565719992698440850570711361,11178787300201549666565719992698440850570711362⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨-54057627228469227234095818009485456165873225658,-54057627228469227234095818009485456165873225657⟩⟩, + ⟨⟨100823422630387975402675561107199282961855488301,100823422630387975402675561107199282961855488302⟩,⟨-571798043755352070923682104300376619548875098761,-571798043755352070923682104300376619548875098760⟩⟩, + ⟨⟨2710946931088167233003841535674666908376303245017,2710946931088167233003841535674666908376303245019⟩,⟨-478013087219655587545436004280247657467649806931,-478013087219655587545436004280247657467649806930⟩⟩, + ⟨⟨5860939688051789411371205992794324400539448741817,5860939688051789411371205992794324400539448741821⟩,⟨10151445319802585615026049916779046022334427963226,10151445319802585615026049916779046022334427963229⟩⟩] +lemma tw0_0_3_19_calc (j : Fin 31) : taylorWaveBox 0 0 3 19 j = tw0_0_3_19 j := by + revert j + decide +kernel +def tw0_0_3_20 : Fin 31 → CI := ![⟨⟨-1208019168182208037455005163664889817788595591496,-1208019168182208037455005163664889817788595591495⟩,⟨-697450191936225609746866483250619399950190057174,-697450191936225609746866483250619399950190057173⟩⟩, + ⟨⟨53091196070218836082493066313759067168690547893,53091196070218836082493066313759067168690547894⟩,⟨-301095135054791270250451699779105834272881258369,-301095135054791270250451699779105834272881258367⟩⟩, + ⟨⟨58971300345416110607066221625840798421321829786,58971300345416110607066221625840798421321829787⟩,⟨-10398231338359280361460881688162982252594935479,-10398231338359280361460881688162982252594935478⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨8913608172637075300767496000977635458262637098,8913608172637075300767496000977635458262637099⟩⟩, + ⟨⟨-975533223843224083765789102186262126856068774,-975533223843224083765789102186262126856068773⟩,⟨1162595224210173903344326287788634201535882685,1162595224210173903344326287788634201535882686⟩⟩, + ⟨⟨-175194840092171488049520079959808624891204212,-175194840092171488049520079959808624891204211⟩,⟨-63765706990577518202567312514118587757198129,-63765706990577518202567312514118587757198128⟩⟩, + ⟨⟨-1,1⟩,⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩⟩, + ⟨⟨1292709751285902781111734693515098996074413,1292709751285902781111734693515098996074414⟩,⟨-470507871013734224476321984126902735788958,-470507871013734224476321984126902735788957⟩⟩, + ⟨⟨46855423937202860103165581271813392067274,46855423937202860103165581271813392067275⟩,⟨55840119809686250483466086904184521255150,55840119809686250483466086904184521255151⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨2125169795188206505958436966175469269338,2125169795188206505958436966175469269339⟩⟩, + ⟨⟨-43775090128674920193283282165756781060,-43775090128674920193283282165756781059⟩,⟨-7718729472630178146128925433213480128,-7718729472630178146128925433213480127⟩⟩, + ⟨⟨-56954170862323196563523781521177355,-56954170862323196563523781521177354⟩,⟨-323003153762894230944217334905190276,-323003153762894230944217334905190275⟩⟩, + ⟨⟨506679962918330790032967797798030,506679962918330790032967797798031⟩,⟨-292531812983887881986372107816401,-292531812983887881986372107816400⟩⟩, + ⟨⟨59903109366892814959587704071,59903109366892814959587704072⟩,⟨50264676976132028582351981670,50264676976132028582351981671⟩⟩, + ⟨⟨-6376570699057751820257,-6376570699057751820256⟩,⟨17519484009217148804952,17519484009217148804953⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-6376570699057751820257,-6376570699057751820256⟩,⟨-17519484009217148804953,-17519484009217148804952⟩⟩, + ⟨⟨59903109366892814959587704071,59903109366892814959587704072⟩,⟨-50264676976132028582351981671,-50264676976132028582351981670⟩⟩, + ⟨⟨506679962918330790032967797798030,506679962918330790032967797798031⟩,⟨292531812983887881986372107816400,292531812983887881986372107816401⟩⟩, + ⟨⟨-56954170862323196563523781521177355,-56954170862323196563523781521177354⟩,⟨323003153762894230944217334905190275,323003153762894230944217334905190276⟩⟩, + ⟨⟨-43775090128674920193283282165756781060,-43775090128674920193283282165756781059⟩,⟨7718729472630178146128925433213480127,7718729472630178146128925433213480128⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨-2125169795188206505958436966175469269339,-2125169795188206505958436966175469269338⟩⟩, + ⟨⟨46855423937202860103165581271813392067274,46855423937202860103165581271813392067275⟩,⟨-55840119809686250483466086904184521255151,-55840119809686250483466086904184521255150⟩⟩, + ⟨⟨1292709751285902781111734693515098996074413,1292709751285902781111734693515098996074414⟩,⟨470507871013734224476321984126902735788957,470507871013734224476321984126902735788958⟩⟩, + ⟨⟨-1,1⟩,⟨18359916521552451562374200882082883809634660,18359916521552451562374200882082883809634661⟩⟩, + ⟨⟨-175194840092171488049520079959808624891204212,-175194840092171488049520079959808624891204211⟩,⟨63765706990577518202567312514118587757198128,63765706990577518202567312514118587757198129⟩⟩, + ⟨⟨-975533223843224083765789102186262126856068774,-975533223843224083765789102186262126856068773⟩,⟨-1162595224210173903344326287788634201535882686,-1162595224210173903344326287788634201535882685⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨-8913608172637075300767496000977635458262637099,-8913608172637075300767496000977635458262637098⟩⟩, + ⟨⟨58971300345416110607066221625840798421321829786,58971300345416110607066221625840798421321829787⟩,⟨10398231338359280361460881688162982252594935478,10398231338359280361460881688162982252594935479⟩⟩, + ⟨⟨53091196070218836082493066313759067168690547893,53091196070218836082493066313759067168690547894⟩,⟨301095135054791270250451699779105834272881258367,301095135054791270250451699779105834272881258369⟩⟩, + ⟨⟨-1208019168182208037455005163664889817788595591496,-1208019168182208037455005163664889817788595591495⟩,⟨697450191936225609746866483250619399950190057173,697450191936225609746866483250619399950190057174⟩⟩] +lemma tw0_0_3_20_calc (j : Fin 31) : taylorWaveBox 0 0 3 20 j = tw0_0_3_20 j := by + revert j + decide +kernel +def tw0_0_3 : Fin 21 → Fin 31 → CI := ![tw0_0_3_0,tw0_0_3_1,tw0_0_3_2,tw0_0_3_3,tw0_0_3_4,tw0_0_3_5,tw0_0_3_6,tw0_0_3_7,tw0_0_3_8,tw0_0_3_9,tw0_0_3_10,tw0_0_3_11,tw0_0_3_12,tw0_0_3_13,tw0_0_3_14,tw0_0_3_15,tw0_0_3_16,tw0_0_3_17,tw0_0_3_18,tw0_0_3_19,tw0_0_3_20] +lemma tw0_0_3_mem (l : Fin 21) (j : Fin 31) : (tw0_0_3 l j).Mem (taylorWave 0 0 (nearNode 3) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 3 l j = tw0_0_3 l j := by + fin_cases l + · exact tw0_0_3_0_calc j + · exact tw0_0_3_1_calc j + · exact tw0_0_3_2_calc j + · exact tw0_0_3_3_calc j + · exact tw0_0_3_4_calc j + · exact tw0_0_3_5_calc j + · exact tw0_0_3_6_calc j + · exact tw0_0_3_7_calc j + · exact tw0_0_3_8_calc j + · exact tw0_0_3_9_calc j + · exact tw0_0_3_10_calc j + · exact tw0_0_3_11_calc j + · exact tw0_0_3_12_calc j + · exact tw0_0_3_13_calc j + · exact tw0_0_3_14_calc j + · exact tw0_0_3_15_calc j + · exact tw0_0_3_16_calc j + · exact tw0_0_3_17_calc j + · exact tw0_0_3_18_calc j + · exact tw0_0_3_19_calc j + · exact tw0_0_3_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 3 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave004.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave004.lean new file mode 100644 index 0000000000000000000000000000000000000000..943699e0510e4ef880bbdc2c48ea6492ee18492a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave004.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_4_0 : Fin 31 → CI := ![⟨⟨-365510484546,407712058060⟩,⟨-3426945972600471742650864930512552477539478960847892473773327,-3426945972600471742650864930512552477539478960847097434615085⟩⟩, + ⟨⟨2985250713909744273598086783913156824878835005893530497887531,2985250713909744273598086783913156824878835005894105155651504⟩,⟨-260670814120,294982253571⟩⟩, + ⟨⟨-328850625329,301378958535⟩,⟨2574017197197687664479982992251650527574097530591795124118398,2574017197197687664479982992251650527574097530592441740404672⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942541216418269,-2193245422464301915296553555528033585625266534942252324957685⟩,⟨-148268016495,126660810072⟩⟩, + ⟨⟨-181694696585,198337747478⟩,⟨-1842935389709587026047798473742305999032342018944848724503647,-1842935389709587026047798473742305999032342018944456959568509⟩⟩, + ⟨⟨1523087098933542996733717746894467767795323982598781315759371,1523087098933542996733717746894467767795323982598991976858127⟩,⟨-94230326748,106734498398⟩⟩, + ⟨⟨-87493752413,78378210595⟩,⟨1233700550136169827354311374984518891914212425905011320538044,1233700550136169827354311374984518891914212425905185046482678⟩⟩, + ⟨⟨-974775743317467517909579358012459371389007348863316019769844,-974775743317467517909579358012459371389007348863258887505874⟩,⟨-28664392726,22262256147⟩⟩, + ⟨⟨-32580001674,36868934715⟩,⟨-746312678477436068399521695978289206219708751473491556747312,-746312678477436068399521695978289206219708751473417356636852⟩⟩, + ⟨⟨548311355616075478824138388882008396406316633735580265665141,548311355616075478824138388882008396406316633735618119677664⟩,⟨-15831226146,18532127880⟩⟩, + ⟨⟨-13341140605,11778118087⟩,⟨380771774733385749183429436723616941948830995649707889914058,380771774733385749183429436723616941948830995649735433241152⟩⟩, + ⟨⟨-243693935829366879477394839503114842847251837215825821927755,-243693935829366879477394839503114842847251837215817904891914⟩,⟨-3582949576,2782682491⟩⟩, + ⟨⟨-1978875407,2316488717⟩,⟨-137077838904018869706034597220502099101579158433902382182329,-137077838904018869706034597220502099101579158433897214153582⟩⟩, + ⟨⟨60923483957341719869348709875778710711812959303954874073600,60923483957341719869348709875778710711812959303956057631051⟩,⟨-347836444,447870064⟩⟩, + ⟨⟨-55984912,43480671⟩,⟨15230870989335429967337177468944677677953239825988768248944,15230870989335429967337177468944677677953239825988964677262⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨-55984821,43480751⟩,⟨-15230870989335429967337177468944677677953239825988964677254,-15230870989335429967337177468944677677953239825988768248946⟩⟩, + ⟨⟨60923483957341719869348709875778710711812959303954874073608,60923483957341719869348709875778710711812959303956057631061⟩,⟨-447869752,347836759⟩⟩, + ⟨⟨-1978876356,2316488043⟩,⟨137077838904018869706034597220502099101579158433897214153427,137077838904018869706034597220502099101579158433902382182449⟩⟩, + ⟨⟨-243693935829366879477394839503114842847251837215825821927879,-243693935829366879477394839503114842847251837215817904891713⟩,⟨-2782683788,3582948604⟩⟩, + ⟨⟨-13341138150,11778119923⟩,⟨-380771774733385749183429436723616941948830995649735433240729,-380771774733385749183429436723616941948830995649707889914255⟩⟩, + ⟨⟨548311355616075478824138388882008396406316633735580265664017,548311355616075478824138388882008396406316633735618119678980⟩,⟨-18532126304,15831230160⟩⟩, + ⟨⟨-32580003898,36868928724⟩,⟨746312678477436068399521695978289206219708751473417356638627,746312678477436068399521695978289206219708751473491556745318⟩⟩, + ⟨⟨-974775743317467517909579358012459371389007348863316019771937,-974775743317467517909579358012459371389007348863258887504037⟩,⟨-22262263588,28664389208⟩⟩, + ⟨⟨-87493733016,78378207862⟩,⟨-1233700550136169827354311374984518891914212425905185046471277,-1233700550136169827354311374984518891914212425905011320548771⟩⟩, + ⟨⟨1523087098933542996733717746894467767795323982598781315757735,1523087098933542996733717746894467767795323982598991976860702⟩,⟨-106734491894,94230337453⟩⟩, + ⟨⟨-181694703574,198337733561⟩,⟨1842935389709587026047798473742305999032342018944456959572302,1842935389709587026047798473742305999032342018944848724500514⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942541216421519,-2193245422464301915296553555528033585625266534942252324954074⟩,⟨-126660827069,148268006367⟩⟩, + ⟨⟨-328850611288,301378975711⟩,⟨-2574017197197687664479982992251650527574097530592441740406714,-2574017197197687664479982992251650527574097530591795124117305⟩⟩, + ⟨⟨2985250713909744273598086783913156824878835005893530497889268,2985250713909744273598086783913156824878835005894105155652321⟩,⟨-294982237701,260670829052⟩⟩, + ⟨⟨-365510515930,407712054112⟩,⟨3426945972600471742650864930512552477539478960847097434601068,3426945972600471742650864930512552477539478960847892473786753⟩⟩] +lemma tw0_0_4_0_calc (j : Fin 31) : taylorWaveBox 0 0 4 0 j = tw0_0_4_0 j := by + revert j + decide +kernel +def tw0_0_4_1 : Fin 31 → CI := ![⟨⟨-2990574525491880803961835943971970987868951443469206154176495,-2990574525491880803961835943971970987868951443468502832332439⟩,⟨-355795890667,318968070302⟩⟩, + ⟨⟨-212312985284,240259206127⟩,⟨-2431447851244361755872971208965655819470341558779063593034668,-2431447851244361755872971208965655819470341558778587802226612⟩⟩, + ⟨⟨1946753254075751741127156613009309706769803354459329661174672,1946753254075751741127156613009309706769803354459824899821086⟩,⟨-227935721987,248712800238⟩⟩, + ⟨⟨-103510602533,88425926764⟩,⟨1531174157051842971628460003313649145788903139055950221466136,1531174157051842971628460003313649145788903139056156779631582⟩⟩, + ⟨⟨-1179393983238427659280949227089390632549207221113325849296678,-1179393983238427659280949227089390632549207221113071383608588⟩,⟨-126927046568,116276258594⟩⟩, + ⟨⟨-54820981903,62095614087⟩,⟨-886096155701298015988692131547250663072281909176019575985823,-886096155701298015988692131547250663072281909175894197794849⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789226061113454,645964097506246253655756563897945733379693511789319079972941⟩,⟨-41038735103,45811621638⟩⟩, + ⟨⟨-13341014166,10361324500⟩,⟨453681231719064584186210371352192339493008337498075908750327,453681231719064584186210371352192339493008337498103943425619⟩⟩, + ⟨⟨-303930981405545219484121401120706977433792694847368804680940,-303930981405545219484121401120706977433792694847337619726477⟩,⟨-15014633726,13267993657⟩⟩, + ⟨⟨-5526140419,6468932980⟩,⟨-191396769631480371453557500414206143223612892382013598957358,-191396769631480371453557500414206143223612892381999776179444⟩⟩, + ⟨⟨110762019462662251998586516443406332884035238646990428563644,110762019462662251998586516443406332884035238646998793159183⟩,⟨-3426115673,3880780493⟩⟩, + ⟨⟨-833790228,647559621⟩,⟨56710153964883073023276296419024042436626042187260229315119,56710153964883073023276296419024042436626042187262252207046⟩⟩, + ⟨⟨-23924596203935046431694687551775767902951611547751325018834,-23924596203935046431694687551775767902951611547750346873303⟩,⟨-404303553,345378915⟩⟩, + ⟨⟨-40472609,52112049⟩,⟨-7088769245610384127909537052378005304578255273407735233829,-7088769245610384127909537052378005304578255273407574956411⟩⟩, + ⟨⟨886096155701298015988692131547250663072281909175949762756,886096155701298015988692131547250663072281909175964011026⟩,⟨-2529604,3257071⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨886096155701298015988692131547250663072281909175949762756,886096155701298015988692131547250663072281909175964011026⟩,⟨-3257066,2529609⟩⟩, + ⟨⟨-40472645,52112013⟩,⟨7088769245610384127909537052378005304578255273407574956412,7088769245610384127909537052378005304578255273407735233830⟩⟩, + ⟨⟨-23924596203935046431694687551775767902951611547751325018855,-23924596203935046431694687551775767902951611547750346873275⟩,⟨-345379080,404303435⟩⟩, + ⟨⟨-833790002,647559923⟩,⟨-56710153964883073023276296419024042436626042187262252207075,-56710153964883073023276296419024042436626042187260229315072⟩⟩, + ⟨⟨110762019462662251998586516443406332884035238646990428563701,110762019462662251998586516443406332884035238646998793159060⟩,⟨-3880779779,3426116207⟩⟩, + ⟨⟨-5526141820,6468932430⟩,⟨191396769631480371453557500414206143223612892381999776179052,191396769631480371453557500414206143223612892382013598957817⟩⟩, + ⟨⟨-303930981405545219484121401120706977433792694847368804680128,-303930981405545219484121401120706977433792694847337619727200⟩,⟨-13267994563,15014631286⟩⟩, + ⟨⟨-13341012528,10361327964⟩,⟨-453681231719064584186210371352192339493008337498103943426593,-453681231719064584186210371352192339493008337498075908749472⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789226061119073,645964097506246253655756563897945733379693511789319079966974⟩,⟨-45811611482,41038733673⟩⟩, + ⟨⟨-54820988130,62095610303⟩,⟨886096155701298015988692131547250663072281909175894197793898,886096155701298015988692131547250663072281909176019575987321⟩⟩, + ⟨⟨-1179393983238427659280949227089390632549207221113325849294673,-1179393983238427659280949227089390632549207221113071383611015⟩,⟨-116276263066,126927037661⟩⟩, + ⟨⟨-103510595462,88425938631⟩,⟨-1531174157051842971628460003313649145788903139056156779633851,-1531174157051842971628460003313649145788903139055950221463616⟩⟩, + ⟨⟨1946753254075751741127156613009309706769803354459329661173847,1946753254075751741127156613009309706769803354459824899822632⟩,⟨-248712789618,227935734978⟩⟩, + ⟨⟨-212312997446,240259193202⟩,⟨2431447851244361755872971208965655819470341558778587802228027,2431447851244361755872971208965655819470341558779063593035335⟩⟩, + ⟨⟨-2990574525491880803961835943971970987868951443469206154188212,-2990574525491880803961835943971970987868951443468502832320207⟩,⟨-318968097689,355795887222⟩⟩] +lemma tw0_0_4_1_calc (j : Fin 31) : taylorWaveBox 0 0 4 1 j = tw0_0_4_1 j := by + revert j + decide +kernel +def tw0_0_4_2 : Fin 31 → CI := ![⟨⟨-232867865899,208764113836⟩,⟨1957326449853765537319161777599044963061977271264823465783897,1957326449853765537319161777599044963061977271265290019217996⟩⟩, + ⟨⟨-1485286970816439642106724322928294544217065063761499188558295,-1485286970816439642106724322928294544217065063761203816677728⟩,⟨-146765997183,129694622332⟩⟩, + ⟨⟨-129292437029,141077860823⟩,⟨-1104260755244906617508594163555680458074333488288562671833388,-1104260755244906617508594163555680458074333488288278241650933⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310111888950010,801720913860102364085928664104568816870185890310222594509458⟩,⟨-46299706987,54198024750⟩⟩, + ⟨⟨-60920608994,55808597747⟩,⟨566068475107337900876836495522520835638329071181996219682901,566068475107337900876836495522520835638329071182120156297311⟩⟩, + ⟨⟨-386632385156299365396377635081292832209773288151150288129001,-386632385156299365396377635081292832209773288151094350883826⟩,⟨-27094322923,23920165836⟩⟩, + ⟨⟨-16115873590,17990181750⟩,⟨-253669507901048013636563366376836227212832254355970021766126,-253669507901048013636563366376836227212832254355932685890301⟩⟩, + ⟨⟨158364624960020220066356279329297544073123138826694557050854,158364624960020220066356279329297544073123138826704847088884⟩,⟨-3616784549,4656892456⟩⟩, + ⟨⟨-4585958905,4052478054⟩,⟨92830435676027477631670270183018409013566566485079558718202,92830435676027477631670270183018409013566566485089379108975⟩⟩, + ⟨⟨-50107557116256397755370541506535551054386618144387341754107,-50107557116256397755370541506535551054386618144383563462002⟩,⟨-1693562694,1446740179⟩⟩, + ⟨⟨-747462489,846654965⟩,⟨-24164524072268710337273602192580802013110830509446095864042,-24164524072268710337273602192580802013110830509444194074312⟩⟩, + ⟨⟨9897789060001263754147267458081096504570196176668539095938,9897789060001263754147267458081096504570196176668923662826⟩,⟨-113020475,145523848⟩⟩, + ⟨⟨-52923212,45209995⟩,⟨3131722319766024859710658844158471940899163634024021784239,3131722319766024859710658844158471940899163634024159791773⟩⟩, + ⟨⟨-618611816250078984634204216130068531535637261041803689183,-618611816250078984634204216130068531535637261041787733237⟩,⟨-4547635,3531902⟩⟩, + ⟨⟨-110375,142117⟩,⟨-38663238515629936539637763508129283220977328815112604335,-38663238515629936539637763508129283220977328815111859567⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-110376,142117⟩,⟨38663238515629936539637763508129283220977328815111859567,38663238515629936539637763508129283220977328815112604335⟩⟩, + ⟨⟨-618611816250078984634204216130068531535637261041803689184,-618611816250078984634204216130068531535637261041787733237⟩,⟨-3531905,4547632⟩⟩, + ⟨⟨-52923196,45210016⟩,⟨-3131722319766024859710658844158471940899163634024159791775,-3131722319766024859710658844158471940899163634024021784235⟩⟩, + ⟨⟨9897789060001263754147267458081096504570196176668539095930,9897789060001263754147267458081096504570196176668923662831⟩,⟨-145523809,113020528⟩⟩, + ⟨⟨-747462605,846654809⟩,⟨24164524072268710337273602192580802013110830509444194074325,24164524072268710337273602192580802013110830509446095864015⟩⟩, + ⟨⟨-50107557116256397755370541506535551054386618144387341754227,-50107557116256397755370541506535551054386618144383563461899⟩,⟨-1446740546,1693562550⟩⟩, + ⟨⟨-4585958159,4052478330⟩,⟨-92830435676027477631670270183018409013566566485089379108727,-92830435676027477631670270183018409013566566485079558718423⟩⟩, + ⟨⟨158364624960020220066356279329297544073123138826694557050556,158364624960020220066356279329297544073123138826704847089225⟩,⟨-4656891884,3616785758⟩⟩, + ⟨⟨-16115873029,17990177761⟩,⟨253669507901048013636563366376836227212832254355932685892509,253669507901048013636563366376836227212832254355970021763783⟩⟩, + ⟨⟨-386632385156299365396377635081292832209773288151150288129655,-386632385156299365396377635081292832209773288151094350883411⟩,⟨-23920168553,27094321272⟩⟩, + ⟨⟨-60920604719,55808599894⟩,⟨-566068475107337900876836495522520835638329071182120156296350,-566068475107337900876836495522520835638329071181996219684066⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310111888948690,801720913860102364085928664104568816870185890310222594510647⟩,⟨-54198021048,46299713201⟩⟩, + ⟨⟨-129292444398,141077854799⟩,⟨1104260755244906617508594163555680458074333488288278241650466,1104260755244906617508594163555680458074333488288562671834266⟩⟩, + ⟨⟨-1485286970816439642106724322928294544217065063761499188558702,-1485286970816439642106724322928294544217065063761203816678593⟩,⟨-129694629761,146765989288⟩⟩, + ⟨⟨-232867863644,208764131761⟩,⟨-1957326449853765537319161777599044963061977271265290019225665,-1957326449853765537319161777599044963061977271264823465775892⟩⟩] +lemma tw0_0_4_2_calc (j : Fin 31) : taylorWaveBox 0 0 4 2 j = tw0_0_4_2 j := by + revert j + decide +kernel +def tw0_0_4_3 : Fin 31 → CI := ![⟨⟨1024853732589596773669052848385777038591970709247061041958708,1024853732589596773669052848385777038591970709247308590976306⟩,⟨-109308634396,121929329463⟩⟩, + ⟨⟨-71723396665,63380749093⟩,⟨725848143376154462817165009554215176959589207875031760512629,725848143376154462817165009554215176959589207875178416890375⟩⟩, + ⟨⟨-501097635469154442648103557841251442291263974384941042392490,-501097635469154442648103557841251442291263974384810377026601⟩,⟨-64019102500,58671046828⟩⟩, + ⟨⟨-19393975913,22702415520⟩,⟨-335824071094959070795875237359051420005816962006141241259398,-335824071094959070795875237359051420005816962006093800061875⟩⟩, + ⟨⟨217354691012065382711011858812020118969251653919275760361787,217354691012065382711011858812020118969251653919324040466933⟩,⟨-21428963196,23391834605⟩⟩, + ⟨⟨-9457702873,8349713030⟩,⟨134960162316325501059299140528168169691123714797973208020876,134960162316325501059299140528168169691123714797993163394472⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351067082868957,-79692626246167045120505549490478022520911642351055099788127⟩,⟨-5651782283,5062951008⟩⟩, + ⟨⟨-1009996780,1300449701⟩,⟨-44223745987813540187111142368270145844387418865004637437331,-44223745987813540187111142368270145844387418865001623148074⟩⟩, + ⟨⟨22682754480504826963036406548569224279987162746095798134118,22682754480504826963036406548569224279987162746098269909708⟩,⟨-990207189,1120561152⟩⟩, + ⟨⟨-354698942,303004555⟩,⟨10494502221717470962371101167470356875181780062690760156290,10494502221717470962371101167470356875181780062691584884977⟩⟩, + ⟨⟨-4217505072385171908103098141505255302847616087437147228200,-4217505072385171908103098141505255302847616087436801878539⟩,⟨-147769168,130456815⟩⟩, + ⟨⟨-15780636,20318963⟩,⟨-1381992062119173130847223199008442057637106839531376868992,-1381992062119173130847223199008442057637106839531318774306⟩⟩, + ⟨⟨327953194428670967574096911483448652349430626959091393258,327953194428670967574096911483448652349430626959106889282⟩,⟨-4734380,5542106⟩⟩, + ⟨⟨-317485,246574⟩,⟨43187251941224160338975724969013814301159588735353993724,43187251941224160338975724969013814301159588735355245129⟩⟩, + ⟨⟨-1349601623163255010592991405281681696911237147979847004,-1349601623163255010592991405281681696911237147979816710⟩,⟨-4961,3853⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1349601623163255010592991405281681696911237147979847004,-1349601623163255010592991405281681696911237147979816710⟩,⟨-3853,4961⟩⟩, + ⟨⟨-317485,246574⟩,⟨-43187251941224160338975724969013814301159588735355245129,-43187251941224160338975724969013814301159588735353993724⟩⟩, + ⟨⟨327953194428670967574096911483448652349430626959091393258,327953194428670967574096911483448652349430626959106889282⟩,⟨-5542105,4734382⟩⟩, + ⟨⟨-15780643,20318957⟩,⟨1381992062119173130847223199008442057637106839531318774305,1381992062119173130847223199008442057637106839531376868992⟩⟩, + ⟨⟨-4217505072385171908103098141505255302847616087437147228195,-4217505072385171908103098141505255302847616087436801878541⟩,⟨-130456835,147769141⟩⟩, + ⟨⟨-354698912,303004632⟩,⟨-10494502221717470962371101167470356875181780062691584885002,-10494502221717470962371101167470356875181780062690760156269⟩⟩, + ⟨⟨22682754480504826963036406548569224279987162746095798134172,22682754480504826963036406548569224279987162746098269909648⟩,⟨-1120560970,990207257⟩⟩, + ⟨⟨-1009997118,1300449541⟩,⟨44223745987813540187111142368270145844387418865001623147991,44223745987813540187111142368270145844387418865004637437426⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351067082868221,-79692626246167045120505549490478022520911642351055099788821⟩,⟨-5062950832,5651781030⟩⟩, + ⟨⟨-9457702296,8349713979⟩,⟨-134960162316325501059299140528168169691123714797993163394700,-134960162316325501059299140528168169691123714797973208020731⟩⟩, + ⟨⟨217354691012065382711011858812020118969251653919275760362235,217354691012065382711011858812020118969251653919324040466564⟩,⟨-23391832963,21428964021⟩⟩, + ⟨⟨-19393978515,22702413969⟩,⟨335824071094959070795875237359051420005816962006093800061322,335824071094959070795875237359051420005816962006141241259896⟩⟩, + ⟨⟨-501097635469154442648103557841251442291263974384941042392888,-501097635469154442648103557841251442291263974384810377026389⟩,⟨-58671050172,64019099767⟩⟩, + ⟨⟨-71723392806,63380752724⟩,⟨-725848143376154462817165009554215176959589207875178416890574,-725848143376154462817165009554215176959589207875031760513052⟩⟩, + ⟨⟨1024853732589596773669052848385777038591970709247061041954517,1024853732589596773669052848385777038591970709247308590980322⟩,⟨-121929328282,109308643781⟩⟩] +lemma tw0_0_4_3_calc (j : Fin 31) : taylorWaveBox 0 0 4 3 j = tw0_0_4_3 j := by + revert j + decide +kernel +def tw0_0_4_4 : Fin 31 → CI := ![⟨⟨-47694889278,53201706348⟩,⟨-447176799626049401428575900892497479179773051586439041511330,-447176799626049401428575900892497479179773051586329604467938⟩⟩, + ⟨⟨295596932666041196671377880889107656462516469794167779140749,295596932666041196671377880889107656462516469794228444910427⟩,⟨-25811397596,29208886526⟩⟩, + ⟨⟨-24209122661,22186730427⟩,⟨189492411612726420653832692728539027927110337084605917342398,189492411612726420653832692728539027927110337084655932233962⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835069598585899,-117224714961171094288092600963562859182102426835052665346084⟩,⟨-7924637980,6769774695⟩⟩, + ⟨⟨-6856775990,7484849753⟩,⟨-69548508384950229126514949931282412221734797435743503330456,-69548508384950229126514949931282412221734797435727833426047⟩⟩, + ⟨⟨39258319857430948822261807485761095565851132100859307652848,39258319857430948822261807485761095565851132100865237398841⟩,⟨-2428833067,2751134247⟩⟩, + ⟨⟨-1479633142,1325477475⟩,⟨20863480763352960873051637232040362388611491494812745186538,20863480763352960873051637232040362388611491494815948760286⟩⟩, + ⟨⟨-10291333000706378648062999261547356636014479173448806676664,-10291333000706378648062999261547356636014479173448072461371⟩,⟨-302628388,235036924⟩⟩, + ⟨⟨-201627717,228170619⟩,⟨-4618702072906893697990279388892307132226819840534604504922,-4618702072906893697990279388892307132226819840534086495874⟩⟩, + ⟨⟨1831636171268298348251446890055669674720350419297755300672,1831636171268298348251446890055669674720350419297905073262⟩,⟨-52884272,61906644⟩⟩, + ⟨⟨-21492155,18974175⟩,⟨613411247772358575347840741965017118216423939075946917406,613411247772358575347840741965017118216423939075999099028⟩⟩, + ⟨⟨-160802078136037166375984363461677447437726237085135504003,-160802078136037166375984363461677447437726237085128232529⟩,⟨-2364219,1836161⟩⟩, + ⟨⟨-413153,483640⟩,⟨-28619315176067161691428857657119838667505475301529318362,-28619315176067161691428857657119838667505475301527874980⟩⟩, + ⟨⟨2512532470875580724624755679088710116214472454455145040,2512532470875580724624755679088710116214472454455225843⟩,⟨-14346,18471⟩⟩, + ⟨⟨-145,113⟩,⟨39258319857430948822261807485761095565851132100861769,39258319857430948822261807485761095565851132100862776⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-145,113⟩,⟨-39258319857430948822261807485761095565851132100862776,-39258319857430948822261807485761095565851132100861769⟩⟩, + ⟨⟨2512532470875580724624755679088710116214472454455145040,2512532470875580724624755679088710116214472454455225843⟩,⟨-18471,14346⟩⟩, + ⟨⟨-413153,483640⟩,⟨28619315176067161691428857657119838667505475301527874980,28619315176067161691428857657119838667505475301529318362⟩⟩, + ⟨⟨-160802078136037166375984363461677447437726237085135504003,-160802078136037166375984363461677447437726237085128232529⟩,⟨-1836162,2364218⟩⟩, + ⟨⟨-21492151,18974178⟩,⟨-613411247772358575347840741965017118216423939075999099027,-613411247772358575347840741965017118216423939075946917406⟩⟩, + ⟨⟨1831636171268298348251446890055669674720350419297755300668,1831636171268298348251446890055669674720350419297905073266⟩,⟨-61906639,52884285⟩⟩, + ⟨⟨-201627731,228170582⟩,⟨4618702072906893697990279388892307132226819840534086495885,4618702072906893697990279388892307132226819840534604504910⟩⟩, + ⟨⟨-10291333000706378648062999261547356636014479173448806676686,-10291333000706378648062999261547356636014479173448072461352⟩,⟨-235037002,302628350⟩⟩, + ⟨⟨-1479632814,1325477429⟩,⟨-20863480763352960873051637232040362388611491494815948760093,-20863480763352960873051637232040362388611491494812745186720⟩⟩, + ⟨⟨39258319857430948822261807485761095565851132100859307652806,39258319857430948822261807485761095565851132100865237398907⟩,⟨-2751134080,2428833343⟩⟩, + ⟨⟨-6856776254,7484849227⟩,⟨69548508384950229126514949931282412221734797435727833426190,69548508384950229126514949931282412221734797435743503330338⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835069598586073,-117224714961171094288092600963562859182102426835052665345891⟩,⟨-6769775604,7924637439⟩⟩, + ⟨⟨-24209121628,22186731691⟩,⟨-189492411612726420653832692728539027927110337084655932234113,-189492411612726420653832692728539027927110337084605917342318⟩⟩, + ⟨⟨295596932666041196671377880889107656462516469794167779140922,295596932666041196671377880889107656462516469794228444910509⟩,⟨-29208884955,25811399074⟩⟩, + ⟨⟨-47694893373,53201705833⟩,⟨447176799626049401428575900892497479179773051586329604466109,447176799626049401428575900892497479179773051586439041513083⟩⟩] +lemma tw0_0_4_4_calc (j : Fin 31) : taylorWaveBox 0 0 4 4 j = tw0_0_4_4 j := by + revert j + decide +kernel +def tw0_0_4_5 : Fin 31 → CI := ![⟨⟨-167243731971546642828555953287659960115706019179442063258980,-167243731971546642828555953287659960115706019179400601547128⟩,⟨-19897391646,17837846878⟩⟩, + ⟨⟨-9009877452,10195824815⟩,⟨-103182794676367977583873020114421911916140492235769002950124,-103182794676367977583873020114421911916140492235747498160604⟩⟩, + ⟨⟨61420663389176262840833705029776311060131766907615364299901,61420663389176262840833705029776311060131766907631771263555⟩,⟨-7191442073,7846965276⟩⟩, + ⟨⟨-2371046140,2025511853⟩,⟨35073552699159298510119177454912266067657310953413591581186,35073552699159298510119177454912266067657310953418769637278⟩⟩, + ⟨⟨-19074792961215599455844863910948063766638166512543052002285,-19074792961215599455844863910948063766638166512538693562933⟩,⟨-2052839992,1880580698⟩⟩, + ⟨⟨-605587629,685947869⟩,⟨-9788384861617727609535968002204149471792579083204198141725,-9788384861617727609535968002204149471792579083202688504451⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500682119382,4681754135318688100685463933953437859495028018501415902137⟩,⟨-297436450,332028901⟩⟩, + ⟨⟨-60364135,46881922⟩,⟨2052773088931134069179357436775843647306875080949750264533,2052773088931134069179357436775843647306875080949903249848⟩⟩, + ⟨⟨-806115583409124824874007969643921186844847595591907820254,-806115583409124824874007969643921186844847595591814844673⟩,⟨-39823286,35190676⟩⟩, + ⟨⟨-7911469,9261213⟩,⟨-274012130462182019610306073866502078653572741823575550077,-274012130462182019610306073866502078653572741823552271942⟩⟩, + ⟨⟨76471756731388496949499750017219917748379524087523526606,76471756731388496949499750017219917748379524087530275318⟩,⟨-2365442,2679349⟩⟩, + ⟨⟨-235791,183126⟩,⟨16037289757274484915463729974811278494584961569920133413,16037289757274484915463729974811278494584961569920909668⟩⟩, + ⟨⟨-2140719769235797028205516202082047489481037045496650445,-2140719769235797028205516202082047489481037045496535665⟩,⟨-36177,30904⟩⟩, + ⟨⟨-716,922⟩,⟨-125291326228706913402060390428213113238945012265006289,-125291326228706913402060390428213113238945012265001860⟩⟩, + ⟨⟨978838486161772760953596800220414947179257908320330,978838486161772760953596800220414947179257908320359⟩,⟨-3,4⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨978838486161772760953596800220414947179257908320330,978838486161772760953596800220414947179257908320359⟩,⟨-4,3⟩⟩, + ⟨⟨-716,922⟩,⟨125291326228706913402060390428213113238945012265001860,125291326228706913402060390428213113238945012265006289⟩⟩, + ⟨⟨-2140719769235797028205516202082047489481037045496650445,-2140719769235797028205516202082047489481037045496535665⟩,⟨-30904,36177⟩⟩, + ⟨⟨-235791,183127⟩,⟨-16037289757274484915463729974811278494584961569920909668,-16037289757274484915463729974811278494584961569920133413⟩⟩, + ⟨⟨76471756731388496949499750017219917748379524087523526606,76471756731388496949499750017219917748379524087530275317⟩,⟨-2679349,2365442⟩⟩, + ⟨⟨-7911471,9261212⟩,⟨274012130462182019610306073866502078653572741823552271941,274012130462182019610306073866502078653572741823575550078⟩⟩, + ⟨⟨-806115583409124824874007969643921186844847595591907820252,-806115583409124824874007969643921186844847595591814844675⟩,⟨-35190678,39823279⟩⟩, + ⟨⟨-60364128,46881938⟩,⟨-2052773088931134069179357436775843647306875080949903249853,-2052773088931134069179357436775843647306875080949750264529⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500682119423,4681754135318688100685463933953437859495028018501415902094⟩,⟨-332028827,297436440⟩⟩, + ⟨⟨-605587698,685947827⟩,⟨9788384861617727609535968002204149471792579083202688504441,9788384861617727609535968002204149471792579083204198141742⟩⟩, + ⟨⟨-19074792961215599455844863910948063766638166512543052002252,-19074792961215599455844863910948063766638166512538693562972⟩,⟨-1880580770,2052839848⟩⟩, + ⟨⟨-2371045978,2025512125⟩,⟨-35073552699159298510119177454912266067657310953418769637330,-35073552699159298510119177454912266067657310953413591581128⟩⟩, + ⟨⟨61420663389176262840833705029776311060131766907615364299875,61420663389176262840833705029776311060131766907631771263604⟩,⟨-7846964941,7191442483⟩⟩, + ⟨⟨-9009877968,10195824266⟩,⟨103182794676367977583873020114421911916140492235747498160664,103182794676367977583873020114421911916140492235769002950152⟩⟩, + ⟨⟨-167243731971546642828555953287659960115706019179442063259636,-167243731971546642828555953287659960115706019179400601546444⟩,⟨-17837848410,19897391453⟩⟩] +lemma tw0_0_4_5_calc (j : Fin 31) : taylorWaveBox 0 0 4 5 j = tw0_0_4_5 j := by + revert j + decide +kernel +def tw0_0_4_6 : Fin 31 → CI := ![⟨⟨-6511406190,5837421741⟩,⟨54730383304244933380112848518897283838116898657129944750259,54730383304244933380112848518897283838116898657143687275956⟩⟩, + ⟨⟨-31515391223958217501310509452261319453075994878584471309054,-31515391223958217501310509452261319453075994878577802728261⟩,⟨-3114137478,2751910468⟩⟩, + ⟨⟨-2039608060,2225524931⟩,⟨-17419883079629307968129315305323988794960278503448105865906,-17419883079629307968129315305323988794960278503443397139235⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208250618119,9182234624581109642237633639768198127653962420209635457995⟩,⟨-530277763,620738428⟩⟩, + ⟨⟨-492646232,451306969⟩,⟨4577621693004954696137506009345728172648071371884194841260,4577621693004954696137506009345728172648071371885255362641⟩⟩, + ⟨⟨-2135494303594985969411505749251288624075282130197855149669,-2135494303594985969411505749251288624075282130197519000417⟩,⟨-149650610,132118726⟩⟩, + ⟨⟨-58401511,65193723⟩,⟨-919260274839426580241716221779161802910425528549128605649,-919260274839426580241716221779161802910425528548981601645⟩⟩, + ⟨⟨358276491981826561257862248404307075244538085592653266882,358276491981826561257862248404307075244538085592681108287⟩,⟨-8182439,10535529⟩⟩, + ⟨⟨-6081666,5374191⟩,⟨123106996968586787114494177547895779113578104994450271104,123106996968586787114494177547895779113578104994464861854⟩⟩, + ⟨⟨-35868104002269959539990756405344523936148290703942764379,-35868104002269959539990756405344523936148290703939603106⟩,⟨-1212290,1035609⟩⟩, + ⟨⟨-258030,292272⟩,⟨-8341774623417913943013694333012846187794070821085096499,-8341774623417913943013694333012846187794070821084333775⟩⟩, + ⟨⟨1399517546804010004913524407829324512673976896846320103,1399517546804010004913524407829324512673976896846392300⟩,⟨-15981,20577⟩⟩, + ⟨⟨-2368,2023⟩,⟨140109781258867029453088892208377046625579260562266269,140109781258867029453088892208377046625579260562274229⟩⟩, + ⟨⟨-5466865417203164081693454718083298877632722253306185,-5466865417203164081693454718083298877632722253305973⟩,⟨-41,32⟩⟩, + ⟨⟨-1,1⟩,⟨-21354943035949859694115057492512886240752821301978,-21354943035949859694115057492512886240752821301976⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨21354943035949859694115057492512886240752821301976,21354943035949859694115057492512886240752821301978⟩⟩, + ⟨⟨-5466865417203164081693454718083298877632722253306185,-5466865417203164081693454718083298877632722253305973⟩,⟨-32,41⟩⟩, + ⟨⟨-2368,2023⟩,⟨-140109781258867029453088892208377046625579260562274229,-140109781258867029453088892208377046625579260562266269⟩⟩, + ⟨⟨1399517546804010004913524407829324512673976896846320103,1399517546804010004913524407829324512673976896846392300⟩,⟨-20577,15981⟩⟩, + ⟨⟨-258030,292272⟩,⟨8341774623417913943013694333012846187794070821084333775,8341774623417913943013694333012846187794070821085096499⟩⟩, + ⟨⟨-35868104002269959539990756405344523936148290703942764379,-35868104002269959539990756405344523936148290703939603106⟩,⟨-1035610,1212290⟩⟩, + ⟨⟨-6081665,5374191⟩,⟨-123106996968586787114494177547895779113578104994464861854,-123106996968586787114494177547895779113578104994450271104⟩⟩, + ⟨⟨358276491981826561257862248404307075244538085592653266881,358276491981826561257862248404307075244538085592681108287⟩,⟨-10535528,8182442⟩⟩, + ⟨⟨-58401509,65193708⟩,⟨919260274839426580241716221779161802910425528548981601653,919260274839426580241716221779161802910425528549128605641⟩⟩, + ⟨⟨-2135494303594985969411505749251288624075282130197855149673,-2135494303594985969411505749251288624075282130197519000415⟩,⟨-132118741,149650601⟩⟩, + ⟨⟨-492646198,451306987⟩,⟨-4577621693004954696137506009345728172648071371885255362633,-4577621693004954696137506009345728172648071371884194841269⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208250618104,9182234624581109642237633639768198127653962420209635458009⟩,⟨-620738386,530277835⟩⟩, + ⟨⟨-2039608176,2225524836⟩,⟨17419883079629307968129315305323988794960278503443397139228,17419883079629307968129315305323988794960278503448105865920⟩⟩, + ⟨⟨-31515391223958217501310509452261319453075994878584471309063,-31515391223958217501310509452261319453075994878577802728280⟩,⟨-2751910626,3114137310⟩⟩, + ⟨⟨-6511406127,5837422242⟩,⟨-54730383304244933380112848518897283838116898657143687276170,-54730383304244933380112848518897283838116898657129944750036⟩⟩] +lemma tw0_0_4_6_calc (j : Fin 31) : taylorWaveBox 0 0 4 6 j = tw0_0_4_6 j := by + revert j + decide +kernel +def tw0_0_4_7 : Fin 31 → CI := ![⟨⟨15920423158960125595439758270488942085850529785835055245079,15920423158960125595439758270488942085850529785839103460043⟩,⟨-1698037154,1894091283⟩⟩, + ⟨⟨-845474815,747131753⟩,⟨8556291985300835164536052013020075954026178034456180324898,8556291985300835164536052013020075954026178034458018051175⟩⟩, + ⟨⟨-4391606772973058658686541184687285169204473439325962098851,-4391606772973058658686541184687285169204473439324761035274⟩,⟨-561061766,514191544⟩⟩, + ⟨⟨-123401239,144452392⟩,⟨-2136803025194210900014571515934235255886439055451543903124,-2136803025194210900014571515934235255886439055451214834596⟩⟩, + ⟨⟨976489194433543286273669420793108157769159071562976733931,976489194433543286273669420793108157769159071563206070514⟩,⟨-96271909,105090319⟩⟩, + ⟨⟨-29021066,25621187⟩,⟨414126741725732068529449587689393809274778806602038820740,414126741725732068529449587689393809274778806602105326850⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620624275113,-160441184787359821872660870163473329702807540620598107373⟩,⟨-11378452,10192987⟩⟩, + ⟨⟨-1269427,1634486⟩,⟨-55583150378470557374763024750207206778126139124683761964,-55583150378470557374763024750207206778126139124679265710⟩⟩, + ⟨⟨16711507783790693680734476587929835847707378973548004923,16711507783790693680734476587929835847707378973550038781⟩,⟨-729535,825573⟩⟩, + ⟨⟨-141057,120499⟩,⟨4173443408582443164090959992059053234153201280178284772,4173443408582443164090959992059053234153201280178665888⟩⟩, + ⟨⟨-808841292433070446346581225955847283739802356644710285,-808841292433070446346581225955847283739802356644633753⟩,⟨-28340,25020⟩⟩, + ⟨⟨-1240,1597⟩,⟨-108560840582950307372584032715248450738527615477896555,-108560840582950307372584032715248450738527615477890608⟩⟩, + ⟨⟨8151256657387584304865156234490338347955471250348340,8151256657387584304865156234490338347955471250348830⟩,⟨-118,138⟩⟩, + ⟨⟨-2,2⟩,⟨212032891763574819087078188896969630348686748980256,212032891763574819087078188896969630348686748980266⟩⟩, + ⟨⟨-414126741725732068529449587689393809274778806603,-414126741725732068529449587689393809274778806602⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-414126741725732068529449587689393809274778806603,-414126741725732068529449587689393809274778806602⟩,⟨-1,1⟩⟩, + ⟨⟨-2,2⟩,⟨-212032891763574819087078188896969630348686748980266,-212032891763574819087078188896969630348686748980256⟩⟩, + ⟨⟨8151256657387584304865156234490338347955471250348340,8151256657387584304865156234490338347955471250348830⟩,⟨-138,118⟩⟩, + ⟨⟨-1240,1597⟩,⟨108560840582950307372584032715248450738527615477890608,108560840582950307372584032715248450738527615477896555⟩⟩, + ⟨⟨-808841292433070446346581225955847283739802356644710285,-808841292433070446346581225955847283739802356644633753⟩,⟨-25020,28340⟩⟩, + ⟨⟨-141057,120499⟩,⟨-4173443408582443164090959992059053234153201280178665888,-4173443408582443164090959992059053234153201280178284772⟩⟩, + ⟨⟨16711507783790693680734476587929835847707378973548004923,16711507783790693680734476587929835847707378973550038781⟩,⟨-825573,729535⟩⟩, + ⟨⟨-1269428,1634486⟩,⟨55583150378470557374763024750207206778126139124679265710,55583150378470557374763024750207206778126139124683761964⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620624275111,-160441184787359821872660870163473329702807540620598107375⟩,⟨-10192987,11378449⟩⟩, + ⟨⟨-29021064,25621190⟩,⟨-414126741725732068529449587689393809274778806602105326851,-414126741725732068529449587689393809274778806602038820740⟩⟩, + ⟨⟨976489194433543286273669420793108157769159071562976733933,976489194433543286273669420793108157769159071563206070512⟩,⟨-105090312,96271913⟩⟩, + ⟨⟨-123401256,144452382⟩,⟨2136803025194210900014571515934235255886439055451214834592,2136803025194210900014571515934235255886439055451543903128⟩⟩, + ⟨⟨-4391606772973058658686541184687285169204473439325962098854,-4391606772973058658686541184687285169204473439324761035272⟩,⟨-514191573,561061742⟩⟩, + ⟨⟨-845474769,747131796⟩,⟨-8556291985300835164536052013020075954026178034458018051177,-8556291985300835164536052013020075954026178034456180324903⟩⟩, + ⟨⟨15920423158960125595439758270488942085850529785835055245014,15920423158960125595439758270488942085850529785839103460105⟩,⟨-1894091265,1698037300⟩⟩] +lemma tw0_0_4_7_calc (j : Fin 31) : taylorWaveBox 0 0 4 7 j = tw0_0_4_7 j := by + revert j + decide +kernel +def tw0_0_4_8 : Fin 31 → CI := ![⟨⟨-444545088,495871939⟩,⟨-4167957036519161635267462875665650308090614798608055924326,-4167957036519161635267462875665650308090614798606982837107⟩⟩, + ⟨⟨2090696536677025737204348100461423261004001656510290957602,2090696536677025737204348100461423261004001656510746653736⟩,⟨-182558727,206588470⟩⟩, + ⟨⟨-127300877,116666361⟩,⟨996423969336419002148895044425104352537599321889220302371,996423969336419002148895044425104352537599321889495986769⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113858224241,-447530979074571922520290831596952057595537869113787879754⟩,⟨-30254039,25845096⟩⟩, + ⟨⟨-18482880,20175893⟩,⟨-187472467083136571674773901582570253811198034536370345651,-187472467083136571674773901582570253811198034536325719443⟩⟩, + ⟨⟨72278751636702086648611864463100576055221757417970674310,72278751636702086648611864463100576055221757417982511887⟩,⟨-4471741,5065132⟩⟩, + ⟨⟨-1787323,1601111⟩,⟨25202042373060605481053021731346532868346133836078586860,25202042373060605481053021731346532868346133836082777500⟩⟩, + ⟨⟨-7760871861883548386268655041665039322898453453446697996,-7760871861883548386268655041665039322898453453446045496⟩,⟨-228218,177246⟩⟩, + ⟨⟨-89130,100863⟩,⟨-2041695836598657946488621191856858653324220367686181012,-2041695836598657946488621191856858653324220367685926030⟩⟩, + ⟨⟨437041971752511643086221515231398493745642450306447173,437041971752511643086221515231398493745642450306488475⟩,⟨-12619,14772⟩⟩, + ⟨⟨-2474,2184⟩,⟨70584718395216881492785023889746656303927497478489315,70584718395216881492785023889746656303927497478496219⟩⟩, + ⟨⟨-7578976427620652720965483439126014963768020950631443,-7578976427620652720965483439126014963768020950631002⟩,⟨-112,87⟩⟩, + ⟨⟨-7,8⟩,⟨-426798800539562151451388198468162591548478955377424,-426798800539562151451388198468162591548478955377396⟩⟩, + ⟨⟨7401344167598293672817854921021498988054707959600,7401344167598293672817854921021498988054707959601⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨7227875163670208664861186446310057605522175741,7227875163670208664861186446310057605522175742⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-7227875163670208664861186446310057605522175742,-7227875163670208664861186446310057605522175741⟩⟩, + ⟨⟨7401344167598293672817854921021498988054707959600,7401344167598293672817854921021498988054707959601⟩,⟨-1,1⟩⟩, + ⟨⟨-7,8⟩,⟨426798800539562151451388198468162591548478955377396,426798800539562151451388198468162591548478955377424⟩⟩, + ⟨⟨-7578976427620652720965483439126014963768020950631443,-7578976427620652720965483439126014963768020950631002⟩,⟨-87,112⟩⟩, + ⟨⟨-2474,2184⟩,⟨-70584718395216881492785023889746656303927497478496219,-70584718395216881492785023889746656303927497478489315⟩⟩, + ⟨⟨437041971752511643086221515231398493745642450306447173,437041971752511643086221515231398493745642450306488475⟩,⟨-14772,12619⟩⟩, + ⟨⟨-89130,100863⟩,⟨2041695836598657946488621191856858653324220367685926030,2041695836598657946488621191856858653324220367686181012⟩⟩, + ⟨⟨-7760871861883548386268655041665039322898453453446697996,-7760871861883548386268655041665039322898453453446045496⟩,⟨-177246,228218⟩⟩, + ⟨⟨-1787323,1601111⟩,⟨-25202042373060605481053021731346532868346133836082777500,-25202042373060605481053021731346532868346133836078586860⟩⟩, + ⟨⟨72278751636702086648611864463100576055221757417970674310,72278751636702086648611864463100576055221757417982511887⟩,⟨-5065132,4471742⟩⟩, + ⟨⟨-18482881,20175892⟩,⟨187472467083136571674773901582570253811198034536325719444,187472467083136571674773901582570253811198034536370345650⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113858224242,-447530979074571922520290831596952057595537869113787879753⟩,⟨-25845099,30254037⟩⟩, + ⟨⟨-127300872,116666368⟩,⟨-996423969336419002148895044425104352537599321889495986770,-996423969336419002148895044425104352537599321889220302370⟩⟩, + ⟨⟨2090696536677025737204348100461423261004001656510290957603,2090696536677025737204348100461423261004001656510746653737⟩,⟨-206588459,182558737⟩⟩, + ⟨⟨-444545126,495871934⟩,⟨4167957036519161635267462875665650308090614798606982837090,4167957036519161635267462875665650308090614798608055924343⟩⟩] +lemma tw0_0_4_8_calc (j : Fin 31) : taylorWaveBox 0 0 4 8 j = tw0_0_4_8 j := by + revert j + decide +kernel +def tw0_0_4_9 : Fin 31 → CI := ![⟨⟨-991971455030794224652842832938641432881003100651562708643,-991971455030794224652842832938641432881003100651304156938⟩,⟨-118017246,105801484⟩⟩, + ⟨⟨-40552284,45890079⟩,⟨-464412304682537115114315667542499077431820291053551650126,-464412304682537115114315667542499077431820291053448946790⟩⟩, + ⟨⟨205528570126590805298407805503432078536736625775759564911,205528570126590805298407805503432078536736625775817083498⟩,⟨-24064326,26257867⟩⟩, + ⟨⟨-5760356,4920895⟩,⟨85209699158455917355792738417989130577889747539443225392,85209699158455917355792738417989130577889747539456890183⟩⟩, + ⟨⟨-32720118074374232625145668049740516977212076425371286569,-32720118074374232625145668049740516977212076425363393674⟩,⟨-3521358,3225872⟩⟩, + ⟨⟨-709515,803666⟩,⟨-11468201775379016139641213917584478735402204666939351300,-11468201775379016139641213917584478735402204666937436570⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232431812377,3598843235212085340458540018208389404888495232432422255⟩,⟨-228639,255230⟩⟩, + ⟨⟨-28969,22499⟩,⟨985111031383640246488303658995307509715198129015936508,985111031383640246488303658995307509715198129016022468⟩⟩, + ⟨⟨-226763820645770075739411947042235877652256001490981464,-226763820645770075739411947042235877652256001490952421⟩,⟨-11203,9900⟩⟩, + ⟨⟨-1202,1407⟩,⟨-41606298417214803396383173055658755164985228290749131,-41606298417214803396383173055658755164985228290745066⟩⟩, + ⟨⟨5599707898134285224434186483195546257520607747528229,5599707898134285224434186483195546257520607747528796⟩,⟨-174,197⟩⟩, + ⟨⟨-8,6⟩,⟨481011245792793089105617020993802494978124086433569,481011245792793089105617020993802494978124086433599⟩⟩, + ⟨⟨-20315575399030665720890221218583376545402943501343,-20315575399030665720890221218583376545402943501340⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-234868772359762250539852061032130124501037151579,-234868772359762250539852061032130124501037151578⟩⟩, + ⟨⟨114682017753790161396412139175844787354022046,114682017753790161396412139175844787354022047⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨114682017753790161396412139175844787354022046,114682017753790161396412139175844787354022047⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨234868772359762250539852061032130124501037151578,234868772359762250539852061032130124501037151579⟩⟩, + ⟨⟨-20315575399030665720890221218583376545402943501343,-20315575399030665720890221218583376545402943501340⟩,⟨-1,1⟩⟩, + ⟨⟨-8,6⟩,⟨-481011245792793089105617020993802494978124086433599,-481011245792793089105617020993802494978124086433569⟩⟩, + ⟨⟨5599707898134285224434186483195546257520607747528229,5599707898134285224434186483195546257520607747528796⟩,⟨-197,174⟩⟩, + ⟨⟨-1202,1407⟩,⟨41606298417214803396383173055658755164985228290745066,41606298417214803396383173055658755164985228290749131⟩⟩, + ⟨⟨-226763820645770075739411947042235877652256001490981464,-226763820645770075739411947042235877652256001490952421⟩,⟨-9900,11203⟩⟩, + ⟨⟨-28969,22499⟩,⟨-985111031383640246488303658995307509715198129016022468,-985111031383640246488303658995307509715198129015936508⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232431812377,3598843235212085340458540018208389404888495232432422255⟩,⟨-255230,228639⟩⟩, + ⟨⟨-709515,803666⟩,⟨11468201775379016139641213917584478735402204666937436570,11468201775379016139641213917584478735402204666939351300⟩⟩, + ⟨⟨-32720118074374232625145668049740516977212076425371286569,-32720118074374232625145668049740516977212076425363393674⟩,⟨-3225872,3521358⟩⟩, + ⟨⟨-5760355,4920896⟩,⟨-85209699158455917355792738417989130577889747539456890183,-85209699158455917355792738417989130577889747539443225392⟩⟩, + ⟨⟨205528570126590805298407805503432078536736625775759564911,205528570126590805298407805503432078536736625775817083498⟩,⟨-26257865,24064327⟩⟩, + ⟨⟨-40552286,45890076⟩,⟨464412304682537115114315667542499077431820291053448946790,464412304682537115114315667542499077431820291053551650126⟩⟩, + ⟨⟨-991971455030794224652842832938641432881003100651562708647,-991971455030794224652842832938641432881003100651304156934⟩,⟨-105801493,118017245⟩⟩] +lemma tw0_0_4_9_calc (j : Fin 31) : taylorWaveBox 0 0 4 9 j = tw0_0_4_9 j := by + revert j + decide +kernel +def tw0_0_4_10 : Fin 31 → CI := ![⟨⟨-25747369,23082303⟩,⟨216414599701077852906202435073998598449788143727841613389,216414599701077852906202435073998598449788143727898709491⟩⟩, + ⟨⟨-94564444373995771739119808734203875430153198760317199698,-94564444373995771739119808734203875430153198760295986056⟩,⟨-9344218,8257327⟩⟩, + ⟨⟨-4550019,4964768⟩,⟨-38860794435938241170588282725934619518984449111637163849,-38860794435938241170588282725934619518984449111626164689⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007034781726,14871898049488972066912608227174197124666822007037214022⟩,⟨-858859,1005372⟩⟩, + ⟨⟨-563377,516103⟩,⟨5234843093692091264287007488514228901810249913038967400,5234843093692091264287007488514228901810249913040246837⟩⟩, + ⟨⟨-1667982335528525058292087313668117927014160060494827444,-1667982335528525058292087313668117927014160060494543648⟩,⟨-116889,103195⟩⟩, + ⟨⟨-29929,33410⟩,⟨-471087477881817150367027725509267001994255814209097625,-471087477881817150367027725509267001994255814209016292⟩⟩, + ⟨⟨114622873302411424007696138044496964710354118219739712,114622873302411424007696138044496964710354118219750080⟩,⟨-2618,3371⟩⟩, + ⟨⟨-1141,1008⟩,⟨23087022552245061459746047054248993024939745791088961,23087022552245061459746047054248993024939745791091992⟩⟩, + ⟨⟨-3630834484738518571023585992962450469889360841561707,-3630834484738518571023585992962450469889360841561339⟩,⟨-123,105⟩⟩, + ⟨⟨-13,15⟩,⟨-407222249884893813059591629313505353274941421019232,-407222249884893813059591629313505353274941421019189⟩⟩, + ⟨⟨27984099927346539064378939952269766774988798393491,27984099927346539064378939952269766774988798393494⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨886434200375614885503805174063098259250332236709,886434200375614885503805174063098259250332236710⟩⟩, + ⟨⟨-6832055646324838638764389636784611029049999608,-6832055646324838638764389636784611029049999607⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1667982335528525058292087313668117927014161,-1667982335528525058292087313668117927014160⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1667982335528525058292087313668117927014160,1667982335528525058292087313668117927014161⟩⟩, + ⟨⟨-6832055646324838638764389636784611029049999608,-6832055646324838638764389636784611029049999607⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-886434200375614885503805174063098259250332236710,-886434200375614885503805174063098259250332236709⟩⟩, + ⟨⟨27984099927346539064378939952269766774988798393491,27984099927346539064378939952269766774988798393494⟩,⟨-1,1⟩⟩, + ⟨⟨-13,15⟩,⟨407222249884893813059591629313505353274941421019189,407222249884893813059591629313505353274941421019232⟩⟩, + ⟨⟨-3630834484738518571023585992962450469889360841561707,-3630834484738518571023585992962450469889360841561339⟩,⟨-105,123⟩⟩, + ⟨⟨-1141,1008⟩,⟨-23087022552245061459746047054248993024939745791091992,-23087022552245061459746047054248993024939745791088961⟩⟩, + ⟨⟨114622873302411424007696138044496964710354118219739712,114622873302411424007696138044496964710354118219750080⟩,⟨-3371,2618⟩⟩, + ⟨⟨-29929,33410⟩,⟨471087477881817150367027725509267001994255814209016292,471087477881817150367027725509267001994255814209097625⟩⟩, + ⟨⟨-1667982335528525058292087313668117927014160060494827444,-1667982335528525058292087313668117927014160060494543648⟩,⟨-103195,116889⟩⟩, + ⟨⟨-563377,516103⟩,⟨-5234843093692091264287007488514228901810249913040246837,-5234843093692091264287007488514228901810249913038967400⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007034781726,14871898049488972066912608227174197124666822007037214022⟩,⟨-1005372,858859⟩⟩, + ⟨⟨-4550019,4964768⟩,⟨38860794435938241170588282725934619518984449111626164689,38860794435938241170588282725934619518984449111637163849⟩⟩, + ⟨⟨-94564444373995771739119808734203875430153198760317199698,-94564444373995771739119808734203875430153198760295986056⟩,⟨-8257328,9344218⟩⟩, + ⟨⟨-25747369,23082305⟩,⟨-216414599701077852906202435073998598449788143727898709492,-216414599701077852906202435073998598449788143727841613388⟩⟩] +lemma tw0_0_4_10_calc (j : Fin 31) : taylorWaveBox 0 0 4 10 j = tw0_0_4_10 j := by + revert j + decide +kernel +def tw0_0_4_11 : Fin 31 → CI := ![⟨⟨43582469009646285030733050622538865647542245859577289689,43582469009646285030733050622538865647542245859588926666⟩,⟨-4648410,5185112⟩⟩, + ⟨⟨-1756326,1552036⟩,⟨17774194411564276875864128312061313751301714079824286423,17774194411564276875864128312061313751301714079828330286⟩⟩, + ⟨⟨-6782488128478149523492519830137829759680515530249939238,-6782488128478149523492519830137829759680515530247997933⟩,⟨-866516,794129⟩⟩, + ⟨⟨-138369,161973⟩,⟨-2395971572164663075006627933825495916097687151940050724,-2395971572164663075006627933825495916097687151939651236⟩⟩, + ⟨⟨773090558394109982191376322731356757671042766393325284,773090558394109982191376322731356757671042766393516695⟩,⟨-76219,83201⟩⟩, + ⟨⟨-15693,13855⟩,⟨223936797077519653778917540987515319909871511658348955,223936797077519653778917540987515319909871511658387770⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560550793,-56921729219679268117752553035921843729028297560540783⟩,⟨-4037,3617⟩⟩, + ⟨⟨-282,363⟩,⟨-12311055613682371709154478756123108394392010369725695,-12311055613682371709154478756123108394392010369724541⟩⟩, + ⟨⟨2169701466255404892073257850593422088781947519509901,2169701466255404892073257850593422088781947519510194⟩,⟨-95,108⟩⟩, + ⟨⟨-10,9⟩,⟨292476998555256723023270011453307606945518451164517,292476998555256723023270011453307606945518451164548⟩⟩, + ⟨⟨-27336034799501910861684270140077553699935487262986,-27336034799501910861684270140077553699935487262982⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1502814405967086390277646332534559130174805953336,-1502814405967086390277646332534559130174805953335⟩⟩, + ⟨⟨35702758612702236697176515069983838738466607808,35702758612702236697176515069983838738466607809⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨183449024165904100375689249576972550070166742,183449024165904100375689249576972550070166743⟩⟩, + ⟨⟨-22393679707751965377891754098751531990988,-22393679707751965377891754098751531990987⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-22393679707751965377891754098751531990988,-22393679707751965377891754098751531990987⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-183449024165904100375689249576972550070166743,-183449024165904100375689249576972550070166742⟩⟩, + ⟨⟨35702758612702236697176515069983838738466607808,35702758612702236697176515069983838738466607809⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1502814405967086390277646332534559130174805953335,1502814405967086390277646332534559130174805953336⟩⟩, + ⟨⟨-27336034799501910861684270140077553699935487262986,-27336034799501910861684270140077553699935487262982⟩,⟨-1,1⟩⟩, + ⟨⟨-10,9⟩,⟨-292476998555256723023270011453307606945518451164548,-292476998555256723023270011453307606945518451164517⟩⟩, + ⟨⟨2169701466255404892073257850593422088781947519509901,2169701466255404892073257850593422088781947519510194⟩,⟨-108,95⟩⟩, + ⟨⟨-282,363⟩,⟨12311055613682371709154478756123108394392010369724541,12311055613682371709154478756123108394392010369725695⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560550793,-56921729219679268117752553035921843729028297560540783⟩,⟨-3617,4037⟩⟩, + ⟨⟨-15693,13855⟩,⟨-223936797077519653778917540987515319909871511658387770,-223936797077519653778917540987515319909871511658348955⟩⟩, + ⟨⟨773090558394109982191376322731356757671042766393325284,773090558394109982191376322731356757671042766393516695⟩,⟨-83201,76219⟩⟩, + ⟨⟨-138369,161973⟩,⟨2395971572164663075006627933825495916097687151939651236,2395971572164663075006627933825495916097687151940050724⟩⟩, + ⟨⟨-6782488128478149523492519830137829759680515530249939238,-6782488128478149523492519830137829759680515530247997933⟩,⟨-794129,866516⟩⟩, + ⟨⟨-1756326,1552036⟩,⟨-17774194411564276875864128312061313751301714079828330286,-17774194411564276875864128312061313751301714079824286423⟩⟩, + ⟨⟨43582469009646285030733050622538865647542245859577289688,43582469009646285030733050622538865647542245859588926666⟩,⟨-5185112,4648411⟩⟩] +lemma tw0_0_4_11_calc (j : Fin 31) : taylorWaveBox 0 0 4 11 j = tw0_0_4_11 j := by + revert j + decide +kernel +def tw0_0_4_12 : Fin 31 → CI := ![⟨⟨-869251,969614⟩,⟨-8149902646786285757064994502219583017511214743126726539,-8149902646786285757064994502219583017511214743124524487⟩⟩, + ⟨⟨3102182143713727230751869526266626268330407098706546978,3102182143713727230751869526266626268330407098707262641⟩,⟨-270882,306537⟩⟩, + ⟨⟨-140433,128702⟩,⟨1099212672251310409834120871243669235202289733338696424,1099212672251310409834120871243669235202289733339014544⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381996301,-358436509015356793117744663894557782742708865381935396⟩,⟨-24232,20700⟩⟩, + ⟨⟨-10453,11410⟩,⟨-106016237329032685747825339160393565433598667728896873,-106016237329032685747825339160393565433598667728870286⟩⟩, + ⟨⟨27917388752665239068819570004398031465163947822233107,27917388752665239068819570004398031465163947822238036⟩,⟨-1728,1957⟩⟩, + ⟨⟨-453,406⟩,⟨6386603083791852241089888205092732398089436736505338,6386603083791852241089888205092732398089436736506482⟩⟩, + ⟨⟨-1227819742027934050678799836095202522210899140349522,-1227819742027934050678799836095202522210899140349403⟩,⟨-37,29⟩⟩, + ⟨⟨-9,10⟩,⟨-189342171857527296798820161515297013447900823895699,-189342171857527296798820161515297013447900823895672⟩⟩, + ⟨⟨21877228333456835517440470208408067794354789146847,21877228333456835517440470208408067794354789146850⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1703942184610915470509006958276247037668697987196,1703942184610915470509006958276247037668697987198⟩⟩, + ⟨⟨-74940169801509646647875966558545075818536324485,-74940169801509646647875966558545075818536324484⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1335280049649465058437528699243656481589037424,-1335280049649465058437528699243656481589037423⟩⟩, + ⟨⟨4573984973236672769035398349520573475252461,4573984973236672769035398349520573475252462⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨279173887526652390688195700043980314651,279173887526652390688195700043980314652⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-279173887526652390688195700043980314652,-279173887526652390688195700043980314651⟩⟩, + ⟨⟨4573984973236672769035398349520573475252461,4573984973236672769035398349520573475252462⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1335280049649465058437528699243656481589037423,1335280049649465058437528699243656481589037424⟩⟩, + ⟨⟨-74940169801509646647875966558545075818536324485,-74940169801509646647875966558545075818536324484⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1703942184610915470509006958276247037668697987198,-1703942184610915470509006958276247037668697987196⟩⟩, + ⟨⟨21877228333456835517440470208408067794354789146847,21877228333456835517440470208408067794354789146850⟩,⟨-1,1⟩⟩, + ⟨⟨-9,10⟩,⟨189342171857527296798820161515297013447900823895672,189342171857527296798820161515297013447900823895699⟩⟩, + ⟨⟨-1227819742027934050678799836095202522210899140349522,-1227819742027934050678799836095202522210899140349403⟩,⟨-29,37⟩⟩, + ⟨⟨-453,406⟩,⟨-6386603083791852241089888205092732398089436736506482,-6386603083791852241089888205092732398089436736505338⟩⟩, + ⟨⟨27917388752665239068819570004398031465163947822233107,27917388752665239068819570004398031465163947822238036⟩,⟨-1957,1728⟩⟩, + ⟨⟨-10453,11410⟩,⟨106016237329032685747825339160393565433598667728870286,106016237329032685747825339160393565433598667728896873⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381996301,-358436509015356793117744663894557782742708865381935396⟩,⟨-20700,24232⟩⟩, + ⟨⟨-140433,128702⟩,⟨-1099212672251310409834120871243669235202289733339014544,-1099212672251310409834120871243669235202289733338696424⟩⟩, + ⟨⟨3102182143713727230751869526266626268330407098706546978,3102182143713727230751869526266626268330407098707262641⟩,⟨-306537,270882⟩⟩, + ⟨⟨-869251,969614⟩,⟨8149902646786285757064994502219583017511214743124524487,8149902646786285757064994502219583017511214743126726539⟩⟩] +lemma tw0_0_4_12_calc (j : Fin 31) : taylorWaveBox 0 0 4 12 j = tw0_0_4_12 j := by + revert j + decide +kernel +def tw0_0_4_13 : Fin 31 → CI := ![⟨⟨-1422426349034211492819848993123270072267181414165749214,-1422426349034211492819848993123270072267181414165360355⟩,⟨-169230,151713⟩⟩, + ⟨⟨-44126,49935⟩,⟨-505337395774217567359452553963504088779763035110079691,-505337395774217567359452553963504088779763035109961502⟩⟩, + ⟨⟨166268962690399205235134835664747441705481354695190767,166268962690399205235134835664747441705481354695239417⟩,⟨-19468,21243⟩⟩, + ⟨⟨-3384,2891⟩,⟨50047177933378515327455971288047401836241721327120876,50047177933378515327455971288047401836241721327129541⟩⟩, + ⟨⟨-13569104281093822147953862692516378524038452484445188,-13569104281093822147953862692516378524038452484441741⟩,⟨-1461,1338⟩⟩, + ⟨⟨-201,228⟩,⟨-3248335681954942086998041858286719241267017799988605,-3248335681954942086998041858286719241267017799988020⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570364,668803510981146723247822633578313868995627098570487⟩,⟨-43,48⟩⟩, + ⟨⟨-4,3⟩,⟨114290651303332524926816883485741266799622349245636,114290651303332524926816883485741266799622349245648⟩⟩, + ⟨⟨-15421673455023729472639543272812014428093354342959,-15421673455023729472639543272812014428093354342956⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1527318662517654886702147561280743464240775186986,-1527318662517654886702147561280743464240775186984⟩⟩, + ⟨⟨99131337950285097869813289132285133095306939696,99131337950285097869813289132285133095306939697⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨3487873880106583402307644149345131433093943763,3487873880106583402307644149345131433093943764⟩⟩, + ⟨⟨-46610066605153042196720811806663313728051001,-46610066605153042196720811806663313728051000⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-106441463626299542306751835612339216097838,-106441463626299542306751835612339216097837⟩⟩, + ⟨⟨3248335681954942086998041858286719241,3248335681954942086998041858286719242⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨3248335681954942086998041858286719241,3248335681954942086998041858286719242⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨106441463626299542306751835612339216097837,106441463626299542306751835612339216097838⟩⟩, + ⟨⟨-46610066605153042196720811806663313728051001,-46610066605153042196720811806663313728051000⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-3487873880106583402307644149345131433093943764,-3487873880106583402307644149345131433093943763⟩⟩, + ⟨⟨99131337950285097869813289132285133095306939696,99131337950285097869813289132285133095306939697⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1527318662517654886702147561280743464240775186984,1527318662517654886702147561280743464240775186986⟩⟩, + ⟨⟨-15421673455023729472639543272812014428093354342959,-15421673455023729472639543272812014428093354342956⟩,⟨-1,1⟩⟩, + ⟨⟨-4,3⟩,⟨-114290651303332524926816883485741266799622349245648,-114290651303332524926816883485741266799622349245636⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570364,668803510981146723247822633578313868995627098570487⟩,⟨-48,43⟩⟩, + ⟨⟨-201,228⟩,⟨3248335681954942086998041858286719241267017799988020,3248335681954942086998041858286719241267017799988605⟩⟩, + ⟨⟨-13569104281093822147953862692516378524038452484445188,-13569104281093822147953862692516378524038452484441741⟩,⟨-1338,1461⟩⟩, + ⟨⟨-3384,2891⟩,⟨-50047177933378515327455971288047401836241721327129541,-50047177933378515327455971288047401836241721327120876⟩⟩, + ⟨⟨166268962690399205235134835664747441705481354695190767,166268962690399205235134835664747441705481354695239417⟩,⟨-21243,19468⟩⟩, + ⟨⟨-44126,49935⟩,⟨505337395774217567359452553963504088779763035109961502,505337395774217567359452553963504088779763035110079691⟩⟩, + ⟨⟨-1422426349034211492819848993123270072267181414165749214,-1422426349034211492819848993123270072267181414165360355⟩,⟨-151713,169230⟩⟩] +lemma tw0_0_4_13_calc (j : Fin 31) : taylorWaveBox 0 0 4 13 j = tw0_0_4_13 j := by + revert j + decide +kernel +def tw0_0_4_14 : Fin 31 → CI := ![⟨⟨-27691,24824⟩,⟨232743967104084891373045924847689787790798760227196847,232743967104084891373045924847689787790798760227261216⟩⟩, + ⟨⟨-77173262159995542703261120587313722251095772763597321,-77173262159995542703261120587313722251095772763579025⟩,⟨-7626,6739⟩⟩, + ⟨⟨-2761,3013⟩,⟨-23578269347937487388685896694707784722012005621387921,-23578269347937487388685896694707784722012005621380946⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804115,6551160272016798098751126130700461144242000788805271⟩,⟨-379,443⟩⟩, + ⟨⟨-176,161⟩,⟨1628175630479374335512242905020322226647862620022943,1628175630479374335512242905020322226647862620023363⟩⟩, + ⟨⟨-354338455375806845799565958364591763741024259437858,-354338455375806845799565958364591763741024259437792⟩,⟨-25,22⟩⟩, + ⟨⟨-5,5⟩,⟨-65659631149794723622098140181990406812989656915302,-65659631149794723622098140181990406812989656915289⟩⟩, + ⟨⟨9973740847459505224561791874962681165634979809381,9973740847459505224561791874962681165634979809383⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1177570528564385112049272469899196201341183056084,1177570528564385112049272469899196201341183056086⟩⟩, + ⟨⟨-99962772705334443645494478312690141971466076490,-99962772705334443645494478312690141971466076489⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-5406775747311505825799041112740963191849125053,-5406775747311505825799041112740963191849125052⟩⟩, + ⟨⟨152187207755424579232205076217081926965865780,152187207755424579232205076217081926965865781⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1525310862813330744102393773081819793265778,1525310862813330744102393773081819793265779⟩⟩, + ⟨⟨-2322192501150887744632035464738188582854,-2322192501150887744632035464738188582853⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-35433845537580684579956595836459177,-35433845537580684579956595836459176⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨35433845537580684579956595836459176,35433845537580684579956595836459177⟩⟩, + ⟨⟨-2322192501150887744632035464738188582854,-2322192501150887744632035464738188582853⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1525310862813330744102393773081819793265779,-1525310862813330744102393773081819793265778⟩⟩, + ⟨⟨152187207755424579232205076217081926965865780,152187207755424579232205076217081926965865781⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨5406775747311505825799041112740963191849125052,5406775747311505825799041112740963191849125053⟩⟩, + ⟨⟨-99962772705334443645494478312690141971466076490,-99962772705334443645494478312690141971466076489⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1177570528564385112049272469899196201341183056086,-1177570528564385112049272469899196201341183056084⟩⟩, + ⟨⟨9973740847459505224561791874962681165634979809381,9973740847459505224561791874962681165634979809383⟩,⟨-1,1⟩⟩, + ⟨⟨-5,5⟩,⟨65659631149794723622098140181990406812989656915289,65659631149794723622098140181990406812989656915302⟩⟩, + ⟨⟨-354338455375806845799565958364591763741024259437858,-354338455375806845799565958364591763741024259437792⟩,⟨-22,25⟩⟩, + ⟨⟨-176,161⟩,⟨-1628175630479374335512242905020322226647862620023363,-1628175630479374335512242905020322226647862620022943⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804115,6551160272016798098751126130700461144242000788805271⟩,⟨-443,379⟩⟩, + ⟨⟨-2761,3013⟩,⟨23578269347937487388685896694707784722012005621380946,23578269347937487388685896694707784722012005621387921⟩⟩, + ⟨⟨-77173262159995542703261120587313722251095772763597321,-77173262159995542703261120587313722251095772763579025⟩,⟨-6739,7626⟩⟩, + ⟨⟨-27691,24824⟩,⟨-232743967104084891373045924847689787790798760227261216,-232743967104084891373045924847689787790798760227196847⟩⟩] +lemma tw0_0_4_14_calc (j : Fin 31) : taylorWaveBox 0 0 4 14 j = tw0_0_4_14 j := by + revert j + decide +kernel +def tw0_0_4_15 : Fin 31 → CI := ![⟨⟨35842487118702823486118888589304243168354040593113762,35842487118702823486118888589304243168354040593123790⟩,⟨-3823,4265⟩⟩, + ⟨⟨-1097,969⟩,⟨11092344275737308691305115550000934716276093434134232,11092344275737308691305115550000934716276093434136898⟩⟩, + ⟨⟨-3146905656803737235148117234970110811637285336230919,-3146905656803737235148117234970110811637285336229978⟩,⟨-403,369⟩⟩, + ⟨⟨-47,55⟩,⟨-807101058159109193417313938093791247346497101480148,-807101058159109193417313938093791247346497101480002⟩⟩, + ⟨⟨183874871222703447196249876874347410551634221872614,183874871222703447196249876874347410551634221872663⟩,⟨-19,20⟩⟩, + ⟨⟨-3,3⟩,⟨36378663016110770124802885413558644498245683712051,36378663016110770124802885413558644498245683712059⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-819174666017966542287809970425927109695533434361,-819174666017966542287809970425927109695533434359⟩⟩, + ⟨⟨84627870756052464991036343002326467256745097611,84627870756052464991036343002326467256745097612⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨6157692399285195872629653458357171992084481059,6157692399285195872629653458357171992084481060⟩⟩, + ⟨⟨-277547172669302140234397013958424716936078520,-277547172669302140234397013958424716936078519⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-6249806717056019151976089251906792523922222,-6249806717056019151976089251906792523922221⟩⟩, + ⟨⟨46979464716226164799725749651772857605625,46979464716226164799725749651772857605626⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨47682241188476708617981637969259586516,47682241188476708617981637969259586517⟩⟩, + ⟨⟨-363786630161107701248028854135587,-363786630161107701248028854135586⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-363786630161107701248028854135587,-363786630161107701248028854135586⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-47682241188476708617981637969259586517,-47682241188476708617981637969259586516⟩⟩, + ⟨⟨46979464716226164799725749651772857605625,46979464716226164799725749651772857605626⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨6249806717056019151976089251906792523922221,6249806717056019151976089251906792523922222⟩⟩, + ⟨⟨-277547172669302140234397013958424716936078520,-277547172669302140234397013958424716936078519⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-6157692399285195872629653458357171992084481060,-6157692399285195872629653458357171992084481059⟩⟩, + ⟨⟨84627870756052464991036343002326467256745097611,84627870756052464991036343002326467256745097612⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨819174666017966542287809970425927109695533434359,819174666017966542287809970425927109695533434361⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩,⟨-1,1⟩⟩, + ⟨⟨-3,3⟩,⟨-36378663016110770124802885413558644498245683712059,-36378663016110770124802885413558644498245683712051⟩⟩, + ⟨⟨183874871222703447196249876874347410551634221872614,183874871222703447196249876874347410551634221872663⟩,⟨-20,19⟩⟩, + ⟨⟨-47,55⟩,⟨807101058159109193417313938093791247346497101480002,807101058159109193417313938093791247346497101480148⟩⟩, + ⟨⟨-3146905656803737235148117234970110811637285336230919,-3146905656803737235148117234970110811637285336229978⟩,⟨-369,403⟩⟩, + ⟨⟨-1097,969⟩,⟨-11092344275737308691305115550000934716276093434136898,-11092344275737308691305115550000934716276093434134232⟩⟩, + ⟨⟨35842487118702823486118888589304243168354040593113762,35842487118702823486118888589304243168354040593123790⟩,⟨-4265,3823⟩⟩] +lemma tw0_0_4_15_calc (j : Fin 31) : taylorWaveBox 0 0 4 15 j = tw0_0_4_15 j := by + revert j + decide +kernel +def tw0_0_4_16 : Fin 31 → CI := ![⟨⟨-557,621⟩,⟨-5213078436041832671603808611391339232834292828398061,-5213078436041832671603808611391339232834292828396585⟩⟩, + ⟨⟨1505761672927258478801778238611991290535521026806138,1505761672927258478801778238611991290535521026806506⟩,⟨-132,149⟩⟩, + ⟨⟨-51,47⟩,⟨396672358050654915158966370569807057895628986605481,396672358050654915158966370569807057895628986605602⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820758,-93910472408044662737884323166159791981236131820739⟩,⟨-7,6⟩⟩, + ⟨⟨-2,3⟩,⟨-19611911699824564058883858768786321009487424626070,-19611911699824564058883858768786321009487424626064⟩⟩, + ⟨⟨3527374706136799553378574163702971403384173776124,3527374706136799553378574163702971403384173776126⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨529440020073462376192782879028056848059477939597,529440020073462376192782879028056848059477939598⟩⟩, + ⟨⟨-63543533648615213194777491523092348657711710596,-63543533648615213194777491523092348657711710595⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-5744024936398538508612740473220791971342167003,-5744024936398538508612740473220791971342167002⟩⟩, + ⟨⟨358240022308519984199082653679503601002640273,358240022308519984199082653679503601002640274⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨13455866646334837163461968092738996137177176,13455866646334837163461968092738996137177177⟩⟩, + ⟨⟨-242399344057522633341894117443436998968933,-242399344057522633341894117443436998968932⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1366577233537750183864908804624571231853,-1366577233537750183864908804624571231852⟩⟩, + ⟨⟨924680114965525182120872945569751735,924680114965525182120872945569751736⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨3527374706136799553378574163702,3527374706136799553378574163703⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-3527374706136799553378574163703,-3527374706136799553378574163702⟩⟩, + ⟨⟨924680114965525182120872945569751735,924680114965525182120872945569751736⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1366577233537750183864908804624571231852,1366577233537750183864908804624571231853⟩⟩, + ⟨⟨-242399344057522633341894117443436998968933,-242399344057522633341894117443436998968932⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-13455866646334837163461968092738996137177177,-13455866646334837163461968092738996137177176⟩⟩, + ⟨⟨358240022308519984199082653679503601002640273,358240022308519984199082653679503601002640274⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨5744024936398538508612740473220791971342167002,5744024936398538508612740473220791971342167003⟩⟩, + ⟨⟨-63543533648615213194777491523092348657711710596,-63543533648615213194777491523092348657711710595⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩⟩, + ⟨⟨3527374706136799553378574163702971403384173776124,3527374706136799553378574163702971403384173776126⟩,⟨-1,1⟩⟩, + ⟨⟨-2,3⟩,⟨19611911699824564058883858768786321009487424626064,19611911699824564058883858768786321009487424626070⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820758,-93910472408044662737884323166159791981236131820739⟩,⟨-6,7⟩⟩, + ⟨⟨-51,47⟩,⟨-396672358050654915158966370569807057895628986605602,-396672358050654915158966370569807057895628986605481⟩⟩, + ⟨⟨1505761672927258478801778238611991290535521026806138,1505761672927258478801778238611991290535521026806506⟩,⟨-149,132⟩⟩, + ⟨⟨-557,621⟩,⟨5213078436041832671603808611391339232834292828396585,5213078436041832671603808611391339232834292828398061⟩⟩] +lemma tw0_0_4_16_calc (j : Fin 31) : taylorWaveBox 0 0 4 16 j = tw0_0_4_16 j := by + revert j + decide +kernel +def tw0_0_4_17 : Fin 31 → CI := ![⟨⟨-718305654265631155040296995620893746968338935946611,-718305654265631155040296995620893746968338935946405⟩,⟨-86,77⟩⟩, + ⟨⟨-17,20⟩,⟨-193645781684663544193276181546601596884222656563965,-193645781684663544193276181546601596884222656563916⟩⟩, + ⟨⟨47369527944862597232589849818466131134492127187165,47369527944862597232589849818466131134492127187180⟩,⟨-6,7⟩⟩, + ⟨⟨-1,1⟩,⟨10351875446044213761413951999568920281416967239727,10351875446044213761413951999568920281416967239730⟩⟩, + ⟨⟨-1981693026050369041673109866424390791567146595779,-1981693026050369041673109866424390791567146595777⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-324022645124497814065247016607913700033674508845,-324022645124497814065247016607913700033674508843⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨4669658444295330617326744831290178250832038398,4669658444295330617326744831290178250832038399⟩⟩, + ⟨⟨-369350016946150864016105998128131097572751344,-369350016946150864016105998128131097572751343⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-19744635479057719729259399413240280688127456,-19744635479057719729259399413240280688127455⟩⟩, + ⟨⟨618024149178500774507993729797198677127217,618024149178500774507993729797198677127218⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨8906666649428044542935838377552372457183,8906666649428044542935838377552372457184⟩⟩, + ⟨⟨-37659903486361922701376723124008714082,-37659903486361922701376723124008714081⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-16988118456703270994064022784332986,-16988118456703270994064022784332985⟩⟩, + ⟨⟨32402264512449781406524701660,32402264512449781406524701661⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨32402264512449781406524701660,32402264512449781406524701661⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨16988118456703270994064022784332985,16988118456703270994064022784332986⟩⟩, + ⟨⟨-37659903486361922701376723124008714082,-37659903486361922701376723124008714081⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-8906666649428044542935838377552372457184,-8906666649428044542935838377552372457183⟩⟩, + ⟨⟨618024149178500774507993729797198677127217,618024149178500774507993729797198677127218⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨19744635479057719729259399413240280688127455,19744635479057719729259399413240280688127456⟩⟩, + ⟨⟨-369350016946150864016105998128131097572751344,-369350016946150864016105998128131097572751343⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-4669658444295330617326744831290178250832038399,-4669658444295330617326744831290178250832038398⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨324022645124497814065247016607913700033674508843,324022645124497814065247016607913700033674508845⟩⟩, + ⟨⟨-1981693026050369041673109866424390791567146595779,-1981693026050369041673109866424390791567146595777⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-10351875446044213761413951999568920281416967239730,-10351875446044213761413951999568920281416967239727⟩⟩, + ⟨⟨47369527944862597232589849818466131134492127187165,47369527944862597232589849818466131134492127187180⟩,⟨-7,6⟩⟩, + ⟨⟨-17,20⟩,⟨193645781684663544193276181546601596884222656563916,193645781684663544193276181546601596884222656563965⟩⟩, + ⟨⟨-718305654265631155040296995620893746968338935946611,-718305654265631155040296995620893746968338935946405⟩,⟨-77,86⟩⟩] +lemma tw0_0_4_17_calc (j : Fin 31) : taylorWaveBox 0 0 4 17 j = tw0_0_4_17 j := by + revert j + decide +kernel +def tw0_0_4_18 : Fin 31 → CI := ![⟨⟨-12,11⟩,⟨94025990269704865213243976230988259774946357332231,94025990269704865213243976230988259774946357332260⟩⟩, + ⟨⟨-23658295310968574896459750397187892368867201518071,-23658295310968574896459750397187892368867201518064⟩,⟨-3,3⟩⟩, + ⟨⟨-1,1⟩,⟨-5373902480396549372413457767368019728225487401790,-5373902480396549372413457767368019728225487401787⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨190228874376137854177921472339919231725386143421,190228874376137854177921472339919231725386143422⟩⟩, + ⟨⟨-28276310042218193560698597269072945322544521613,-28276310042218193560698597269072945322544521612⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-3437739179098607000216892970677563681642053416,-3437739179098607000216892970677563681642053415⟩⟩, + ⟨⟨326003659186038964577222851486424890071565701,326003659186038964577222851486424890071565702⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨22562308608025145431957006833255665177218629,22562308608025145431957006833255665177218630⟩⟩, + ⟨⟨-1033826696146935336097205616591605548782969,-1033826696146935336097205616591605548782968⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-26966390650003617821405980366776414225144,-26966390650003617821405980366776414225143⟩⟩, + ⟨⟨310901316820181812836859561430382623740,310901316820181812836859561430382623741⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨985933967730460487458425156203847454,985933967730460487458425156203847455⟩⟩, + ⟨⟨-296498600788289845311030923300155,-296498600788289845311030923300154⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-282763100422181935606985973,-282763100422181935606985972⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨282763100422181935606985972,282763100422181935606985973⟩⟩, + ⟨⟨-296498600788289845311030923300155,-296498600788289845311030923300154⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-985933967730460487458425156203847455,-985933967730460487458425156203847454⟩⟩, + ⟨⟨310901316820181812836859561430382623740,310901316820181812836859561430382623741⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨26966390650003617821405980366776414225143,26966390650003617821405980366776414225144⟩⟩, + ⟨⟨-1033826696146935336097205616591605548782969,-1033826696146935336097205616591605548782968⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-22562308608025145431957006833255665177218630,-22562308608025145431957006833255665177218629⟩⟩, + ⟨⟨326003659186038964577222851486424890071565701,326003659186038964577222851486424890071565702⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩⟩, + ⟨⟨-28276310042218193560698597269072945322544521613,-28276310042218193560698597269072945322544521612⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-190228874376137854177921472339919231725386143422,-190228874376137854177921472339919231725386143421⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨5373902480396549372413457767368019728225487401787,5373902480396549372413457767368019728225487401790⟩⟩, + ⟨⟨-23658295310968574896459750397187892368867201518071,-23658295310968574896459750397187892368867201518064⟩,⟨-3,3⟩⟩, + ⟨⟨-12,11⟩,⟨-94025990269704865213243976230988259774946357332260,-94025990269704865213243976230988259774946357332231⟩⟩] +lemma tw0_0_4_18_calc (j : Fin 31) : taylorWaveBox 0 0 4 18 j = tw0_0_4_18 j := by + revert j + decide +kernel +def tw0_0_4_19 : Fin 31 → CI := ![⟨⟨11721879376103578822742411985588648801078897483636,11721879376103578822742411985588648801078897483640⟩,⟨-2,2⟩⟩, + ⟨⟨-1,1⟩,⟨2752767657236915845057774594360737989681788829525,2752767657236915845057774594360737989681788829526⟩⟩, + ⟨⟨-580618950253394116312905036632314423475301301654,-580618950253394116312905036632314423475301301653⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-108115254456938454468191636018970912331746451315,-108115254456938454468191636018970912331746451314⟩⟩, + ⟨⟨17391105758328131734781589233680210759944524441,17391105758328131734781589233680210759944524442⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨2350070050244972835576620517333137896192721133,2350070050244972835576620517333137896192721134⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-21675570386079380427291774868422374316488626,-21675570386079380427291774868422374316488625⟩⟩, + ⟨⟨1312621906870325014618766114406937594262022,1312621906870325014618766114406937594262023⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨51553370693654277071090524682507949987290,51553370693654277071090524682507949987291⟩⟩, + ⟨⟨-1120600724337088029659567125956124256226,-1120600724337088029659567125956124256225⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-10335717385329904760023009714327990683,-10335717385329904760023009714327990682⟩⟩, + ⟨⟨24582562777354372535271894780401206,24582562777354372535271894780401207⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨4928454106011345272075180871166,4928454106011345272075180871167⟩⟩, + ⟨⟨-2350070050244972835576621,-2350070050244972835576620⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-2350070050244972835576621,-2350070050244972835576620⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-4928454106011345272075180871167,-4928454106011345272075180871166⟩⟩, + ⟨⟨24582562777354372535271894780401206,24582562777354372535271894780401207⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨10335717385329904760023009714327990682,10335717385329904760023009714327990683⟩⟩, + ⟨⟨-1120600724337088029659567125956124256226,-1120600724337088029659567125956124256225⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-51553370693654277071090524682507949987291,-51553370693654277071090524682507949987290⟩⟩, + ⟨⟨1312621906870325014618766114406937594262022,1312621906870325014618766114406937594262023⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨21675570386079380427291774868422374316488625,21675570386079380427291774868422374316488626⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-2350070050244972835576620517333137896192721134,-2350070050244972835576620517333137896192721133⟩⟩, + ⟨⟨17391105758328131734781589233680210759944524441,17391105758328131734781589233680210759944524442⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨108115254456938454468191636018970912331746451314,108115254456938454468191636018970912331746451315⟩⟩, + ⟨⟨-580618950253394116312905036632314423475301301654,-580618950253394116312905036632314423475301301653⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-2752767657236915845057774594360737989681788829526,-2752767657236915845057774594360737989681788829525⟩⟩, + ⟨⟨11721879376103578822742411985588648801078897483636,11721879376103578822742411985588648801078897483640⟩,⟨-2,2⟩⟩] +lemma tw0_0_4_19_calc (j : Fin 31) : taylorWaveBox 0 0 4 19 j = tw0_0_4_19 j := by + revert j + decide +kernel +def tw0_0_4_20 : Fin 31 → CI := ![⟨⟨-1,1⟩,⟨-1394900383872451219493732966501238799900380114348,-1394900383872451219493732966501238799900380114347⟩⟩, + ⟨⟨305740012843967504816002164066830857965832455588,305740012843967504816002164066830857965832455589⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨59881027708242544132227615234376161147409466652,59881027708242544132227615234376161147409466653⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-1517660280226855800190462766265155903348088383,-1517660280226855800190462766265155903348088382⟩⟩, + ⟨⟨186438454678560680201518626685070387591747552,186438454678560680201518626685070387591747553⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨18359916521552451562374200882082883809634660,18359916521552451562374200882082883809634661⟩⟩, + ⟨⟨-1375672983581322421791971065437187422845750,-1375672983581322421791971065437187422845749⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-72894099436752201274872342125613893977603,-72894099436752201274872342125613893977602⟩⟩, + ⟨⟨2453934706651145757933936954605520563838,2453934706651145757933936954605520563839⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨44450391454353494692210823699252697847,44450391454353494692210823699252697848⟩⟩, + ⟨⟨-327985998053866010139458433493897301,-327985998053866010139458433493897300⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-585063625967775763972744215632802,-585063625967775763972744215632801⟩⟩, + ⟨⟨78197955621210577521195038197,78197955621210577521195038198⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨18643845467856068020151,18643845467856068020152⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-18643845467856068020152,-18643845467856068020151⟩⟩, + ⟨⟨78197955621210577521195038197,78197955621210577521195038198⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨585063625967775763972744215632801,585063625967775763972744215632802⟩⟩, + ⟨⟨-327985998053866010139458433493897301,-327985998053866010139458433493897300⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-44450391454353494692210823699252697848,-44450391454353494692210823699252697847⟩⟩, + ⟨⟨2453934706651145757933936954605520563838,2453934706651145757933936954605520563839⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨72894099436752201274872342125613893977602,72894099436752201274872342125613893977603⟩⟩, + ⟨⟨-1375672983581322421791971065437187422845750,-1375672983581322421791971065437187422845749⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩⟩, + ⟨⟨186438454678560680201518626685070387591747552,186438454678560680201518626685070387591747553⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1517660280226855800190462766265155903348088382,1517660280226855800190462766265155903348088383⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨-59881027708242544132227615234376161147409466653,-59881027708242544132227615234376161147409466652⟩⟩, + ⟨⟨305740012843967504816002164066830857965832455588,305740012843967504816002164066830857965832455589⟩,⟨-1,1⟩⟩, + ⟨⟨-1,1⟩,⟨1394900383872451219493732966501238799900380114347,1394900383872451219493732966501238799900380114348⟩⟩] +lemma tw0_0_4_20_calc (j : Fin 31) : taylorWaveBox 0 0 4 20 j = tw0_0_4_20 j := by + revert j + decide +kernel +def tw0_0_4 : Fin 21 → Fin 31 → CI := ![tw0_0_4_0,tw0_0_4_1,tw0_0_4_2,tw0_0_4_3,tw0_0_4_4,tw0_0_4_5,tw0_0_4_6,tw0_0_4_7,tw0_0_4_8,tw0_0_4_9,tw0_0_4_10,tw0_0_4_11,tw0_0_4_12,tw0_0_4_13,tw0_0_4_14,tw0_0_4_15,tw0_0_4_16,tw0_0_4_17,tw0_0_4_18,tw0_0_4_19,tw0_0_4_20] +lemma tw0_0_4_mem (l : Fin 21) (j : Fin 31) : (tw0_0_4 l j).Mem (taylorWave 0 0 (nearNode 4) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 4 l j = tw0_0_4 l j := by + fin_cases l + · exact tw0_0_4_0_calc j + · exact tw0_0_4_1_calc j + · exact tw0_0_4_2_calc j + · exact tw0_0_4_3_calc j + · exact tw0_0_4_4_calc j + · exact tw0_0_4_5_calc j + · exact tw0_0_4_6_calc j + · exact tw0_0_4_7_calc j + · exact tw0_0_4_8_calc j + · exact tw0_0_4_9_calc j + · exact tw0_0_4_10_calc j + · exact tw0_0_4_11_calc j + · exact tw0_0_4_12_calc j + · exact tw0_0_4_13_calc j + · exact tw0_0_4_14_calc j + · exact tw0_0_4_15_calc j + · exact tw0_0_4_16_calc j + · exact tw0_0_4_17_calc j + · exact tw0_0_4_18_calc j + · exact tw0_0_4_19_calc j + · exact tw0_0_4_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 4 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave005.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave005.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb8444d9e1dc06a3849de685b327f65704210788 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave005.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_5_0 : Fin 31 → CI := ![⟨⟨-3426945972600471742650864930512552477539478960847958137568688,-3426945972600471742650864930512552477539478960847031770820365⟩,⟨-480409448316,424140684364⟩⟩, + ⟨⟨1492625356954872136799043391956578412439417502946317382396053,1492625356954872136799043391956578412439417502947540063808661⟩,⟨-2585302954911470020439523671974518570989385866365877505634139,-2585302954911470020439523671974518570989385866364647395360638⟩⟩, + ⟨⟨1287008598598843832239991496125825263787048765295651872943869,1287008598598843832239991496125825263787048765296434837782750⟩,⟨2229164282551216497215711737569865502536766384773754150857478,2229164282551216497215711737569865502536766384774542602468714⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942518353723002,-2193245422464301915296553555528033585625266534942275187651277⟩,⟨-129006522900,100196914816⟩⟩, + ⟨⟨921467694854793513023899236871152999516171009472116149596233,921467694854793513023899236871152999516171009472555910181656⟩,⟨-1596028865021876900373379409739371158620998417501227598011940,-1596028865021876900373379409739371158620998417500783147480289⟩⟩, + ⟨⟨761543549466771498366858873447233883897661991299244390655133,761543549466771498366858873447233883897661991299627817083266⟩,⟨1319032119852790826754859016313529883157849931818828110769826,1319032119852790826754859016313529883157849931819214804566985⟩⟩, + ⟨⟨-1233700550136169827354311374984518891914212425905179434235276,-1233700550136169827354311374984518891914212425905016932788693⟩,⟨-83400759281,71246705669⟩⟩, + ⟨⟨487387871658733758954789679006229685694503674431549609309665,487387871658733758954789679006229685694503674431745236878613⟩,⟨-844180556705786129123109770440659125221023956364267971471575,-844180556705786129123109770440659125221023956364069891139951⟩⟩, + ⟨⟨373156339238718034199760847989144603109854375736668017500407,373156339238718034199760847989144603109854375736781486757844⟩,⟨646325738727867505109880917993629642747346466591262378091371,646325738727867505109880917993629642747346466591377425016469⟩⟩, + ⟨⟨-548311355616075478824138388882008396406316633735615261120539,-548311355616075478824138388882008396406316633735583124222053⟩,⟨-16123720911,12522519085⟩⟩, + ⟨⟨190385887366692874591714718361808470974415497824843838251311,190385887366692874591714718361808470974415497824879628148736⟩,⟨-329758029963197706688714754078382470789462482954772188078292,-329758029963197706688714754078382470789462482954735414713450⟩⟩, + ⟨⟨121846967914683439738697419751557421423625918607901254114973,121846967914683439738697419751557421423625918607919685225553⟩,⟨211045139176446532280777442610164781305255989091033564575773,211045139176446532280777442610164781305255989091052501611575⟩⟩, + ⟨⟨-137077838904018869706034597220502099101579158433902024834363,-137077838904018869706034597220502099101579158433897571501699⟩,⟨-2015409138,1565258903⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651976892636639,30461741978670859934674354937889355355906479651978688724566⟩,⟨-52761284794111633070194360652541195326313997272761637839788,-52761284794111633070194360652541195326313997272759678640125⟩⟩, + ⟨⟨7615435494667714983668588734472338838976619912994326177041,7615435494667714983668588734472338838976619912994525847422⟩,⟨13190321198527908267548590163135298831578499318190063094744,13190321198527908267548590163135298831578499318190291033652⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨7615435494667714983668588734472338838976619912994326177115,7615435494667714983668588734472338838976619912994525847470⟩,⟨-13190321198527908267548590163135298831578499318190291033605,-13190321198527908267548590163135298831578499318190063094721⟩⟩, + ⟨⟨30461741978670859934674354937889355355906479651976892636377,30461741978670859934674354937889355355906479651978688724291⟩,⟨52761284794111633070194360652541195326313997272759678640295,52761284794111633070194360652541195326313997272761637839945⟩⟩, + ⟨⟨-137077838904018869706034597220502099101579158433902024834433,-137077838904018869706034597220502099101579158433897571501586⟩,⟨-1565259633,2015408591⟩⟩, + ⟨⟨121846967914683439738697419751557421423625918607901254115118,121846967914683439738697419751557421423625918607919685227140⟩,⟨-211045139176446532280777442610164781305255989091052501611612,-211045139176446532280777442610164781305255989091033564574367⟩⟩, + ⟨⟨190385887366692874591714718361808470974415497824843838249632,190385887366692874591714718361808470974415497824879628147102⟩,⟨329758029963197706688714754078382470789462482954735414714455,329758029963197706688714754078382470789462482954772188079343⟩⟩, + ⟨⟨-548311355616075478824138388882008396406316633735615261121717,-548311355616075478824138388882008396406316633735583124221019⟩,⟨-12522523271,16123718932⟩⟩, + ⟨⟨373156339238718034199760847989144603109854375736668017505585,373156339238718034199760847989144603109854375736781486761492⟩,⟨-646325738727867505109880917993629642747346466591377425013390,-646325738727867505109880917993629642747346466591262378089815⟩⟩, + ⟨⟨487387871658733758954789679006229685694503674431549609305602,487387871658733758954789679006229685694503674431745236874140⟩,⟨844180556705786129123109770440659125221023956364069891142775,844180556705786129123109770440659125221023956364267971473992⟩⟩, + ⟨⟨-1233700550136169827354311374984518891914212425905179434236025,-1233700550136169827354311374984518891914212425905016932787952⟩,⟨-71246714682,83400751773⟩⟩, + ⟨⟨761543549466771498366858873447233883897661991299244390656554,761543549466771498366858873447233883897661991299627817095053⟩,⟨-1319032119852790826754859016313529883157849931819214804568200,-1319032119852790826754859016313529883157849931818828110760690⟩⟩, + ⟨⟨921467694854793513023899236871152999516171009472116149572120,921467694854793513023899236871152999516171009472555910183202⟩,⟨1596028865021876900373379409739371158620998417500783147474160,1596028865021876900373379409739371158620998417501227598031490⟩⟩, + ⟨⟨-2193245422464301915296553555528033585625266534942518353719777,-2193245422464301915296553555528033585625266534942275187653457⟩,⟨-100196927909,129006504367⟩⟩, + ⟨⟨1287008598598843832239991496125825263787048765295651872945763,1287008598598843832239991496125825263787048765296434837804315⟩,⟨-2229164282551216497215711737569865502536766384774542602472444,-2229164282551216497215711737569865502536766384773754150841553⟩⟩, + ⟨⟨1492625356954872136799043391956578412439417502946317382371180,1492625356954872136799043391956578412439417502947540063807303⟩,⟨2585302954911470020439523671974518570989385866364647395357448,2585302954911470020439523671974518570989385866365877505654467⟩⟩, + ⟨⟨-3426945972600471742650864930512552477539478960847958137563786,-3426945972600471742650864930512552477539478960847031770826238⟩,⟨-424140701382,480409420538⟩⟩] +lemma tw0_0_5_0_calc (j : Fin 31) : taylorWaveBox 0 0 5 0 j = tw0_0_5_0 j := by + revert j + decide +kernel +def tw0_0_5_1 : Fin 31 → CI := ![⟨⟨-419236331546,370132571698⟩,⟨2990574525491880803961835943971970987868951443468445529861578,2990574525491880803961835943971970987868951443469263456647915⟩⟩, + ⟨⟨-2105695607154704103214367121435812847621844040544639274445293,-2105695607154704103214367121435812847621844040543630663001015⟩,⟨-1215723925622180877936485604482827909735170779389928847505429,-1215723925622180877936485604482827909735170779388929119639501⟩⟩, + ⟨⟨1685937772929622782347654725143761234047081398350830354080932,1685937772929622782347654725143761234047081398351432033907259⟩,⟨-973376627037875870563578306504654853384901677230074275590613,-973376627037875870563578306504654853384901677229479013614050⟩⟩, + ⟨⟨-90063543250,69950642559⟩,⟨1531174157051842971628460003313649145788903139055966182637299,1531174157051842971628460003313649145788903139056140818459250⟩⟩, + ⟨⟨-1021385150554996778927960145273712427181003796634344386284319,-1021385150554996778927960145273712427181003796634056707192618⟩,⟨-589696991619213829640474613544695316274603610556747109279999,-589696991619213829640474613544695316274603610556463805644510⟩⟩, + ⟨⟨767381781033055431200571108394975527558981064338133720388772,767381781033055431200571108394975527558981064338361132372768⟩,⟨-443048077850649007994346065773625331536140954588086482795057,-443048077850649007994346065773625331536140954587862004075549⟩⟩, + ⟨⟨-43668535446,37304687856⟩,⟨645964097506246253655756563897945733379693511789228999681023,645964097506246253655756563897945733379693511789316141407073⟩⟩, + ⟨⟨-392899471888924380774692407498227470110198304941227168245103,-392899471888924380774692407498227470110198304941133726834696⟩,⟨-226840615859532292093105185676096169746504168749092568999118,-226840615859532292093105185676096169746504168749000797738052⟩⟩, + ⟨⟨263211950894338012901795890179476605952730505067994772758450,263211950894338012901795890179476605952730505068042462699651⟩,⟨-151965490702772609742060700560353488716896347423698944347546,-151965490702772609742060700560353488716896347423652251009713⟩⟩, + ⟨⟨-5628240353,4371183775⟩,⟨191396769631480371453557500414206143223612892382000774004043,191396769631480371453557500414206143223612892382012601132684⟩⟩, + ⟨⟨-95922722629131928900071388549371940944872633042285974768019,-95922722629131928900071388549371940944872633042274972498282⟩,⟨-55381009731331125999293258221703166442017619323502861502681,-55381009731331125999293258221703166442017619323492274360299⟩⟩, + ⟨⟨49112433986115547596836550937278433763774788117645460584093,49112433986115547596836550937278433763774788117650023762165⟩,⟨-28355076982441536511638148209512021218313021093632702545799,-28355076982441536511638148209512021218313021093628323174591⟩⟩, + ⟨⟨-351755253,273189216⟩,⟨23924596203935046431694687551775767902951611547750409242315,23924596203935046431694687551775767902951611547751262649848⟩⟩, + ⟨⟨-6139054248264443449604568867159804220471848514706079884445,-6139054248264443449604568867159804220471848514705832379994⟩,⟨-3544384622805192063954768526189002652289127636703944400818,-3544384622805192063954768526189002652289127636703724134370⟩⟩, + ⟨⟨767381781033055431200571108394975527558981064338237392192,767381781033055431200571108394975527558981064338253095794⟩,⟨-443048077850649007994346065773625331536140954587984536752,-443048077850649007994346065773625331536140954587971510133⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨767381781033055431200571108394975527558981064338237392190,767381781033055431200571108394975527558981064338253095791⟩,⟨443048077850649007994346065773625331536140954587971510137,443048077850649007994346065773625331536140954587984536755⟩⟩, + ⟨⟨-6139054248264443449604568867159804220471848514706079884463,-6139054248264443449604568867159804220471848514705832380014⟩,⟨3544384622805192063954768526189002652289127636703724134339,3544384622805192063954768526189002652289127636703944400786⟩⟩, + ⟨⟨-351755158,273189343⟩,⟨-23924596203935046431694687551775767902951611547751262649861,-23924596203935046431694687551775767902951611547750409242295⟩⟩, + ⟨⟨49112433986115547596836550937278433763774788117645460583766,49112433986115547596836550937278433763774788117650023762174⟩,⟨28355076982441536511638148209512021218313021093628323174625,28355076982441536511638148209512021218313021093632702546168⟩⟩, + ⟨⟨-95922722629131928900071388549371940944872633042285974768325,-95922722629131928900071388549371940944872633042274972498574⟩,⟨55381009731331125999293258221703166442017619323492274359811,55381009731331125999293258221703166442017619323502861502206⟩⟩, + ⟨⟨-5628239662,4371185236⟩,⟨-191396769631480371453557500414206143223612892382012601133096,-191396769631480371453557500414206143223612892382000774003683⟩⟩, + ⟨⟨263211950894338012901795890179476605952730505067994772757817,263211950894338012901795890179476605952730505068042462698398⟩,⟨151965490702772609742060700560353488716896347423652251011823,151965490702772609742060700560353488716896347423698944349033⟩⟩, + ⟨⟨-392899471888924380774692407498227470110198304941227168246228,-392899471888924380774692407498227470110198304941133726836011⟩,⟨226840615859532292093105185676096169746504168749000797736161,226840615859532292093105185676096169746504168749092568997037⟩⟩, + ⟨⟨-43668531515,37304692575⟩,⟨-645964097506246253655756563897945733379693511789316141407467,-645964097506246253655756563897945733379693511789228999680637⟩⟩, + ⟨⟨767381781033055431200571108394975527558981064338133720383458,767381781033055431200571108394975527558981064338361132373476⟩,⟨443048077850649007994346065773625331536140954587862004076376,443048077850649007994346065773625331536140954588086482801915⟩⟩, + ⟨⟨-1021385150554996778927960145273712427181003796634344386296830,-1021385150554996778927960145273712427181003796634056707188696⟩,⟨589696991619213829640474613544695316274603610556463805629079,589696991619213829640474613544695316274603610556747109280989⟩⟩, + ⟨⟨-90063530311,69950651701⟩,⟨-1531174157051842971628460003313649145788903139056140818456999,-1531174157051842971628460003313649145788903139055966182638821⟩⟩, + ⟨⟨1685937772929622782347654725143761234047081398350830354068889,1685937772929622782347654725143761234047081398351432033910081⟩,⟨973376627037875870563578306504654853384901677229479013615483,973376627037875870563578306504654853384901677230074275606924⟩⟩, + ⟨⟨-2105695607154704103214367121435812847621844040544639274461851,-2105695607154704103214367121435812847621844040543630662998418⟩,⟨1215723925622180877936485604482827909735170779388929119619243,1215723925622180877936485604482827909735170779389928847504323⟩⟩, + ⟨⟨-419236307304,370132586549⟩,⟨-2990574525491880803961835943971970987868951443469263456643639,-2990574525491880803961835943971970987868951443468445529866704⟩⟩] +lemma tw0_0_5_1_calc (j : Fin 31) : taylorWaveBox 0 0 5 1 j = tw0_0_5_1 j := by + revert j + decide +kernel +def tw0_0_5_2 : Fin 31 → CI := ![⟨⟨1957326449853765537319161777599044963061977271264785961404420,1957326449853765537319161777599044963061977271265327523597839⟩,⟨-242251201692,274389537359⟩⟩, + ⟨⟨-742643485408219821053362161464147272108532531880992138925570,-742643485408219821053362161464147272108532531880379076016975⟩,⟨1286296248637072881523689202998756912881166834427197252230374,1286296248637072881523689202998756912881166834427817472308665⟩⟩, + ⟨⟨-552130377622453308754297081777840229037166744144373128621971,-552130377622453308754297081777840229037166744144033719490791⟩,⟨-956317866444279429643848587225309667555159463715404134296015,-956317866444279429643848587225309667555159463715059798186300⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310120246199687,801720913860102364085928664104568816870185890310214237259168⟩,⟨-36626070799,47157160974⟩⟩, + ⟨⟨-283034237553668950438418247761260417819164535591100483871214,-283034237553668950438418247761260417819164535590963606961641⟩,⟨490229679724473762452840837700562264720251031415307970793956,490229679724473762452840837700562264720251031415447607295327⟩⟩, + ⟨⟨-193316192578149682698188817540646416104886644075608608484917,-193316192578149682698188817540646416104886644075510045821459⟩,⟨-334833467471124760913080279830996697438871000215459641853090,-334833467471124760913080279830996697438871000215359348848077⟩⟩, + ⟨⟨253669507901048013636563366376836227212832254355933839863087,253669507901048013636563366376836227212832254355968867794008⟩,⟨-14649516665,17148593770⟩⟩, + ⟨⟨-79182312480010110033178139664648772036561569413366594670712,-79182312480010110033178139664648772036561569413334308412295⟩,⟨137147788276172702069997682618776247270961561688214422334558,137147788276172702069997682618776247270961561688247476094915⟩⟩, + ⟨⟨-46415217838013738815835135091509204506783283242549131157797,-46415217838013738815835135091509204506783283242534721745099⟩,⟨-80393515539817055095230575187422307055072927151727154604342,-80393515539817055095230575187422307055072927151712332640187⟩⟩, + ⟨⟨50107557116256397755370541506535551054386618144383824691871,50107557116256397755370541506535551054386618144387080524218⟩,⟨-1144373237,1473469879⟩⟩, + ⟨⟨-12082262036134355168636801096290401006555415254723803860974,-12082262036134355168636801096290401006555415254721455645777⟩,⟨20927091716945297557067517489437293589929437513461760799065,20927091716945297557067517489437293589929437513464227734969⟩⟩, + ⟨⟨-4948894530000631877073633729040548252285098088334736972495,-4948894530000631877073633729040548252285098088333956875206⟩,⟨-8571736767260793879374855163673515454435097605514878684052,-8571736767260793879374855163673515454435097605514054974548⟩⟩, + ⟨⟨3131722319766024859710658844158471940899163634024029948324,3131722319766024859710658844158471940899163634024151627691⟩,⟨-35760385,46044656⟩⟩, + ⟨⟨-309305908125039492317102108065034265767818630520908545252,-309305908125039492317102108065034265767818630520888338825⟩,⟨535733547953799617460928447729594715902193600344641509034,535733547953799617460928447729594715902193600344664813166⟩⟩, + ⟨⟨-19331619257814968269818881754064641610488664407556412614,-19331619257814968269818881754064641610488664407555782685⟩,⟨-33483346747112476091308027983099669743887100021541250201,-33483346747112476091308027983099669743887100021540458420⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-19331619257814968269818881754064641610488664407556412614,-19331619257814968269818881754064641610488664407555782685⟩,⟨33483346747112476091308027983099669743887100021540458420,33483346747112476091308027983099669743887100021541250201⟩⟩, + ⟨⟨-309305908125039492317102108065034265767818630520908545249,-309305908125039492317102108065034265767818630520888338823⟩,⟨-535733547953799617460928447729594715902193600344664813168,-535733547953799617460928447729594715902193600344641509036⟩⟩, + ⟨⟨3131722319766024859710658844158471940899163634024029948321,3131722319766024859710658844158471940899163634024151627693⟩,⟨-46044643,35760402⟩⟩, + ⟨⟨-4948894530000631877073633729040548252285098088334736972559,-4948894530000631877073633729040548252285098088333956875212⟩,⟨8571736767260793879374855163673515454435097605514054974491,8571736767260793879374855163673515454435097605514878684053⟩⟩, + ⟨⟨-12082262036134355168636801096290401006555415254723803860871,-12082262036134355168636801096290401006555415254721455645670⟩,⟨-20927091716945297557067517489437293589929437513464227735036,-20927091716945297557067517489437293589929437513461760799128⟩⟩, + ⟨⟨50107557116256397755370541506535551054386618144383824691777,50107557116256397755370541506535551054386618144387080524326⟩,⟨-1473469698,1144373620⟩⟩, + ⟨⟨-46415217838013738815835135091509204506783283242549131158250,-46415217838013738815835135091509204506783283242534721745743⟩,⟨80393515539817055095230575187422307055072927151712332639993,80393515539817055095230575187422307055072927151727154603959⟩⟩, + ⟨⟨-79182312480010110033178139664648772036561569413366594669986,-79182312480010110033178139664648772036561569413334308411635⟩,⟨-137147788276172702069997682618776247270961561688247476095308,-137147788276172702069997682618776247270961561688214422335017⟩⟩, + ⟨⟨253669507901048013636563366376836227212832254355933839862936,253669507901048013636563366376836227212832254355968867794164⟩,⟨-17148592226,14649518519⟩⟩, + ⟨⟨-193316192578149682698188817540646416104886644075608608487909,-193316192578149682698188817540646416104886644075510045821820⟩,⟨334833467471124760913080279830996697438871000215359348845759,334833467471124760913080279830996697438871000215459641853399⟩⟩, + ⟨⟨-283034237553668950438418247761260417819164535591100483871689,-283034237553668950438418247761260417819164535590963606954235⟩,⟨-490229679724473762452840837700562264720251031415447607301332,-490229679724473762452840837700562264720251031415307970792074⟩⟩, + ⟨⟨801720913860102364085928664104568816870185890310120246200485,801720913860102364085928664104568816870185890310214237257990⟩,⟨-47157154199,36626075585⟩⟩, + ⟨⟨-552130377622453308754297081777840229037166744144373128631223,-552130377622453308754297081777840229037166744144033719491605⟩,⟨956317866444279429643848587225309667555159463715059798179469,956317866444279429643848587225309667555159463715404134297616⟩⟩, + ⟨⟨-742643485408219821053362161464147272108532531880992138924894,-742643485408219821053362161464147272108532531880379076004600⟩,⟨-1286296248637072881523689202998756912881166834427817472318780,-1286296248637072881523689202998756912881166834427197252228788⟩⟩, + ⟨⟨1957326449853765537319161777599044963061977271264785961407775,1957326449853765537319161777599044963061977271265327523595040⟩,⟨-274389521492,242251211412⟩⟩] +lemma tw0_0_5_2_calc (j : Fin 31) : taylorWaveBox 0 0 5 2 j = tw0_0_5_2 j := by + revert j + decide +kernel +def tw0_0_5_3 : Fin 31 → CI := ![⟨⟨-126842432596,143670025800⟩,⟨-1024853732589596773669052848385777038591970709247328228223671,-1024853732589596773669052848385777038591970709247041404711534⟩⟩, + ⟨⟨628602931453519284597435363760210834234247762954735462740260,628602931453519284597435363760210834234247762955040560354228⟩,⟨362924071688077231408582504777107588479794603937406983840802,362924071688077231408582504777107588479794603937707738119757⟩⟩, + ⟨⟨-433963282092601921327489231638268209070879236796523799621355,-433963282092601921327489231638268209070879236796366163503274⟩,⟨250548817734577221324051778920625721145631987192357358904822,250548817734577221324051778920625721145631987192512175404592⟩⟩, + ⟨⟨-15341892661,19753145398⟩,⟨-335824071094959070795875237359051420005816962006137740582582,-335824071094959070795875237359051420005816962006097300738433⟩⟩, + ⟨⟨188234684048165820609905029840516070432445998080474627119597,188234684048165820609905029840516070432445998080528842856715⟩,⟨108677345506032691355505929406010059484625826959624632026103,108677345506032691355505929406010059484625826959677534917164⟩⟩, + ⟨⟨-116878929064809172628487267909243699469389198502667772776960,-116878929064809172628487267909243699469389198502632391876689⟩,⟨67480081158162750529649570264084084845561857398973643327899,67480081158162750529649570264084084845561857399008262983607⟩⟩, + ⟨⟨-4602281394,5387389621⟩,⟨-79692626246167045120505549490478022520911642351066720337924,-79692626246167045120505549490478022520911642351055462319370⟩⟩, + ⟨⟨38298887475956669686902707948500975442129452565343485007022,38298887475956669686902707948500975442129452565352837267342⟩,⟨22111872993906770093555571184135072922193709432497189635180,22111872993906770093555571184135072922193709432506276043660⟩⟩, + ⟨⟨-19643841607922477643669855117506588569820242592342222823387,-19643841607922477643669855117506588569820242592338538606030⟩,⟨11341377240252413481518203274284612139993581373046663258826,11341377240252413481518203274284612139993581373050220243280⟩⟩, + ⟨⟨-239676971,308602810⟩,⟨-10494502221717470962371101167470356875181780062691530173117,-10494502221717470962371101167470356875181780062690814868146⟩⟩, + ⟨⟨3652466533275286644640227122163865608418412453207576666523,3652466533275286644640227122163865608418412453208018854226⟩,⟨2108752536192585954051549070752627651423808043718288995356,2108752536192585954051549070752627651423808043718705548592⟩⟩, + ⟨⟨-1196840233623645927715709623390655482566545392667193984467,-1196840233623645927715709623390655482566545392667075163262⟩,⟨690996031059586565423611599504221028818553419765615729799,690996031059586565423611599504221028818553419765726851438⟩⟩, + ⟨⟨-3744819,4821786⟩,⟨-327953194428670967574096911483448652349430626959106034341,-327953194428670967574096911483448652349430626959092248199⟩⟩, + ⟨⟨37401257300738935241115925730957983830204543520847011528,37401257300738935241115925730957983830204543520848757516⟩,⟨21593625970612080169487862484506907150579794367676610949,21593625970612080169487862484506907150579794367678090359⟩⟩, + ⟨⟨-1168789290648091726284872679092436994693891985026513179,-1168789290648091726284872679092436994693891985026481819⟩,⟨674800811581627505296495702640840848455618573989903220,674800811581627505296495702640840848455618573989927358⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1168789290648091726284872679092436994693891985026513179,-1168789290648091726284872679092436994693891985026481819⟩,⟨-674800811581627505296495702640840848455618573989927358,-674800811581627505296495702640840848455618573989903220⟩⟩, + ⟨⟨37401257300738935241115925730957983830204543520847011528,37401257300738935241115925730957983830204543520848757516⟩,⟨-21593625970612080169487862484506907150579794367678090359,-21593625970612080169487862484506907150579794367676610949⟩⟩, + ⟨⟨-3744821,4821784⟩,⟨327953194428670967574096911483448652349430626959092248199,327953194428670967574096911483448652349430626959106034341⟩⟩, + ⟨⟨-1196840233623645927715709623390655482566545392667193984468,-1196840233623645927715709623390655482566545392667075163254⟩,⟨-690996031059586565423611599504221028818553419765726851447,-690996031059586565423611599504221028818553419765615729800⟩⟩, + ⟨⟨3652466533275286644640227122163865608418412453207576666534,3652466533275286644640227122163865608418412453208018854237⟩,⟨-2108752536192585954051549070752627651423808043718705548574,-2108752536192585954051549070752627651423808043718288995337⟩⟩, + ⟨⟨-239677051,308602772⟩,⟨10494502221717470962371101167470356875181780062690814868126,10494502221717470962371101167470356875181780062691530173140⟩⟩, + ⟨⟨-19643841607922477643669855117506588569820242592342222823293,-19643841607922477643669855117506588569820242592338538605983⟩,⟨-11341377240252413481518203274284612139993581373050220243391,-11341377240252413481518203274284612139993581373046663258983⟩⟩, + ⟨⟨38298887475956669686902707948500975442129452565343485007150,38298887475956669686902707948500975442129452565352837267452⟩,⟨-22111872993906770093555571184135072922193709432506276043457,-22111872993906770093555571184135072922193709432497189634996⟩⟩, + ⟨⟨-4602281976,5387389136⟩,⟨79692626246167045120505549490478022520911642351055462319323,79692626246167045120505549490478022520911642351066720337973⟩⟩, + ⟨⟨-116878929064809172628487267909243699469389198502667772777068,-116878929064809172628487267909243699469389198502632391875879⟩,⟨-67480081158162750529649570264084084845561857399008262984652,-67480081158162750529649570264084084845561857398973643328025⟩⟩, + ⟨⟨188234684048165820609905029840516070432445998080474627118874,188234684048165820609905029840516070432445998080528842859021⟩,⟨-108677345506032691355505929406010059484625826959677534917346,-108677345506032691355505929406010059484625826959624632023259⟩⟩, + ⟨⟨-15341894666,19753142561⟩,⟨335824071094959070795875237359051420005816962006097300738768,335824071094959070795875237359051420005816962006137740582089⟩⟩, + ⟨⟨-433963282092601921327489231638268209070879236796523799622082,-433963282092601921327489231638268209070879236796366163500174⟩,⟨-250548817734577221324051778920625721145631987192512175408791,-250548817734577221324051778920625721145631987192357358905191⟩⟩, + ⟨⟨628602931453519284597435363760210834234247762954735462739485,628602931453519284597435363760210834234247762955040560359171⟩,⟨-362924071688077231408582504777107588479794603937707738119427,-362924071688077231408582504777107588479794603937406983834754⟩⟩, + ⟨⟨-126842437685,143670017493⟩,⟨1024853732589596773669052848385777038591970709247041404713291,1024853732589596773669052848385777038591970709247328228222206⟩⟩] +lemma tw0_0_5_3_calc (j : Fin 31) : taylorWaveBox 0 0 5 3 j = tw0_0_5_3 j := by + revert j + decide +kernel +def tw0_0_5_4 : Fin 31 → CI := ![⟨⟨-447176799626049401428575900892497479179773051586447609876894,-447176799626049401428575900892497479179773051586321036102457⟩,⟨-62687874667,55345452002⟩⟩, + ⟨⟨147798466333020598335688940444553828231258234897039542213840,147798466333020598335688940444553828231258234897162492893807⟩,⟨-255994452969549849609989041039941988737217672698308482080274,-255994452969549849609989041039941988737217672698183418206867⟩⟩, + ⟨⟨94746205806363210326916346364269513963555168542284871681327,94746205806363210326916346364269513963555168542343717850446⟩,⟨164105242280998449312964516431419060977290087667916321943277,164105242280998449312964516431419060977290087667976455140901⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835068376619169,-117224714961171094288092600963562859182102426835053887312724⟩,⟨-6895148497,5355330809⟩⟩, + ⟨⟨34774254192475114563257474965641206110867398717859677607806,34774254192475114563257474965641206110867398717876716007632⟩,⟨-60230775056681939116158259358048181124214570122653475033450,-60230775056681939116158259358048181124214570122635935522421⟩⟩, + ⟨⟨19629159928715474411130903742880547782925566050425883716697,19629159928715474411130903742880547782925566050436016647888⟩,⟨33998702306430283301652192251945138284380029884737749785892,33998702306430283301652192251945138284380029884748149893824⟩⟩, + ⟨⟨-20863480763352960873051637232040362388611491494815853849883,-20863480763352960873051637232040362388611491494812840096995⟩,⟨-1410415305,1204874452⟩⟩, + ⟨⟨5145666500353189324031499630773678318007239586723193367241,5145666500353189324031499630773678318007239586725324249675⟩,⟨-8912555817416860185828312285693906330420518554107107518901,-8912555817416860185828312285693906330420518554104902779552⟩⟩, + ⟨⟨2309351036453446848995139694446153566113409920266791610507,2309351036453446848995139694446153566113409920267523240785⟩,⟨3999913327649216400156078766249093574019026135909738054428,3999913327649216400156078766249093574019026135910500973319⟩⟩, + ⟨⟨-1831636171268298348251446890055669674720350419297895524241,-1831636171268298348251446890055669674720350419297764849692⟩,⟨-53861352,41831523⟩⟩, + ⟨⟨306705623886179287673920370982508559108211969537957177121,306705623886179287673920370982508559108211969538018738608⟩,⟨-531229723537973176588315503936642785693437966949139075546,-531229723537973176588315503936642785693437966949073070994⟩⟩, + ⟨⟨80401039068018583187992181730838723718863118542559036501,80401039068018583187992181730838723718863118542572222016⟩,⟨139258684647138440403567379463967286412820602407899724140,139258684647138440403567379463967286412820602407913992890⟩⟩, + ⟨⟨-28619315176067161691428857657119838667505475301529243755,-28619315176067161691428857657119838667505475301527949588⟩,⟨-420781,326798⟩⟩, + ⟨⟨1256266235437790362312377839544355058107236227227550068,1256266235437790362312377839544355058107236227227640137⟩,⟨-2175916947611538131305740304124488850200321912623594791,-2175916947611538131305740304124488850200321912623486287⟩⟩, + ⟨⟨19629159928715474411130903742880547782925566050430735,19629159928715474411130903742880547782925566050431500⟩,⟨33998702306430283301652192251945138284380029884742342,33998702306430283301652192251945138284380029884743364⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨19629159928715474411130903742880547782925566050430735,19629159928715474411130903742880547782925566050431500⟩,⟨-33998702306430283301652192251945138284380029884743364,-33998702306430283301652192251945138284380029884742342⟩⟩, + ⟨⟨1256266235437790362312377839544355058107236227227550068,1256266235437790362312377839544355058107236227227640137⟩,⟨2175916947611538131305740304124488850200321912623486287,2175916947611538131305740304124488850200321912623594791⟩⟩, + ⟨⟨-28619315176067161691428857657119838667505475301529243755,-28619315176067161691428857657119838667505475301527949588⟩,⟨-326798,420781⟩⟩, + ⟨⟨80401039068018583187992181730838723718863118542559036501,80401039068018583187992181730838723718863118542572222017⟩,⟨-139258684647138440403567379463967286412820602407913992890,-139258684647138440403567379463967286412820602407899724139⟩⟩, + ⟨⟨306705623886179287673920370982508559108211969537957177118,306705623886179287673920370982508559108211969538018738605⟩,⟨531229723537973176588315503936642785693437966949073070996,531229723537973176588315503936642785693437966949139075548⟩⟩, + ⟨⟨-1831636171268298348251446890055669674720350419297895524245,-1831636171268298348251446890055669674720350419297764849688⟩,⟨-41831537,53861345⟩⟩, + ⟨⟨2309351036453446848995139694446153566113409920266791610539,2309351036453446848995139694446153566113409920267523240808⟩,⟨-3999913327649216400156078766249093574019026135910500973300,-3999913327649216400156078766249093574019026135909738054418⟩⟩, + ⟨⟨5145666500353189324031499630773678318007239586723193367198,5145666500353189324031499630773678318007239586725324249628⟩,⟨8912555817416860185828312285693906330420518554104902779582,8912555817416860185828312285693906330420518554107107518926⟩⟩, + ⟨⟨-20863480763352960873051637232040362388611491494815853849896,-20863480763352960873051637232040362388611491494812840096983⟩,⟨-1204874604,1410415178⟩⟩, + ⟨⟨19629159928715474411130903742880547782925566050425883716733,19629159928715474411130903742880547782925566050436016648192⟩,⟨-33998702306430283301652192251945138284380029884748149893856,-33998702306430283301652192251945138284380029884737749785657⟩⟩, + ⟨⟨34774254192475114563257474965641206110867398717859677606897,34774254192475114563257474965641206110867398717876716007690⟩,⟨60230775056681939116158259358048181124214570122635935522190,60230775056681939116158259358048181124214570122653475034188⟩⟩, + ⟨⟨-117224714961171094288092600963562859182102426835068376618997,-117224714961171094288092600963562859182102426835053887312840⟩,⟨-5355331509,6895147507⟩⟩, + ⟨⟨94746205806363210326916346364269513963555168542284871681467,94746205806363210326916346364269513963555168542343717852034⟩,⟨-164105242280998449312964516431419060977290087667976455141176,-164105242280998449312964516431419060977290087667916321942105⟩⟩, + ⟨⟨147798466333020598335688940444553828231258234897039542211377,147798466333020598335688940444553828231258234897162492893673⟩,⟨255994452969549849609989041039941988737217672698183418206552,255994452969549849609989041039941988737217672698308482082288⟩⟩, + ⟨⟨-447176799626049401428575900892497479179773051586447609876255,-447176799626049401428575900892497479179773051586321036103224⟩,⟨-55345454223,62687871042⟩⟩] +lemma tw0_0_5_4_calc (j : Fin 31) : taylorWaveBox 0 0 5 4 j = tw0_0_5_4 j := by + revert j + decide +kernel +def tw0_0_5_5 : Fin 31 → CI := ![⟨⟨-23445210301,20699150646⟩,⟨167243731971546642828555953287659960115706019179397396985932,167243731971546642828555953287659960115706019179445267820207⟩⟩, + ⟨⟨-89358921423208404188597794196455981264076271255890728388475,-89358921423208404188597794196455981264076271255846788422868⟩,⟨-51591397338183988791936510057210955958070246117901351036759,-51591397338183988791936510057210955958070246117858268932580⟩⟩, + ⟨⟨53191854812319460937102516725929340894507893373836655098890,53191854812319460937102516725929340894507893373856315542034⟩,⟨-30710331694588131420416852514888155530065883453820991281712,-30710331694588131420416852514888155530065883453801819567342⟩⟩, + ⟨⟨-2063023607,1602311232⟩,⟨35073552699159298510119177454912266067657310953413957192750,35073552699159298510119177454912266067657310953418404025687⟩⟩, + ⟨⟨-16519255276341307666428785686975601350523842324848220738676,-16519255276341307666428785686975601350523842324843357664277⟩,⟨-9537396480607799727922431955474031883319083256272887551602,-9537396480607799727922431955474031883319083256268184138927⟩⟩, + ⟨⟨8476989952179979159842537270789896260736790540219175955724,8476989952179979159842537270789896260736790540221796026336⟩,⟨-4894192430808863804767984001102074735896289541602946290700,-4894192430808863804767984001102074735896289541600404240398⟩⟩, + ⟨⟨-316496455,270373195⟩,⟨4681754135318688100685463933953437859495028018500703417239,4681754135318688100685463933953437859495028018501394604293⟩⟩, + ⟨⟨-1777753643219414765502209672251157252299668175500659866921,-1777753643219414765502209672251157252299668175500214437174⟩,⟨-1026386544465567034589678718387921823653437540475135315611,-1026386544465567034589678718387921823653437540474707009498⟩⟩, + ⟨⟨698116573618815657723420267159812353625595869186411619330,698116573618815657723420267159812353625595869186546995971⟩,⟨-403057791704562412437003984821960593422423797795992479866,-403057791704562412437003984821960593422423797795863503319⟩⟩, + ⟨⟨-8057640,6257982⟩,⟨274012130462182019610306073866502078653572741823553700472,274012130462182019610306073866502078653572741823574121547⟩⟩, + ⟨⟨-66226484001406087186269822428046064537006176095476452575,-66226484001406087186269822428046064537006176095468013220⟩,⟨-38235878365694248474749875008609958874189762043767529894,-38235878365694248474749875008609958874189762043759733537⟩⟩, + ⟨⟨13888700337651677855486013064462166033591157621096484277,13888700337651677855486013064462166033591157621097951554⟩,⟨-8018644878637242457731864987405639247292480784960900643,-8018644878637242457731864987405639247292480784959560086⟩⟩, + ⟨⟨-31475,24445⟩,⟨2140719769235797028205516202082047489481037045496541246,2140719769235797028205516202082047489481037045496644864⟩⟩, + ⟨⟨-108505471387903733245984477066110672137430918914824688,-108505471387903733245984477066110672137430918914818931⟩,⟨-62645663114353456701030195214106556619472506132504502,-62645663114353456701030195214106556619472506132499810⟩⟩, + ⟨⟨847698995217997915984253727078989626073679054022032,847698995217997915984253727078989626073679054022061⟩,⟨-489419243080886380476798400110207473589628954160183,-489419243080886380476798400110207473589628954160161⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨847698995217997915984253727078989626073679054022032,847698995217997915984253727078989626073679054022061⟩,⟨489419243080886380476798400110207473589628954160161,489419243080886380476798400110207473589628954160183⟩⟩, + ⟨⟨-108505471387903733245984477066110672137430918914824688,-108505471387903733245984477066110672137430918914818931⟩,⟨62645663114353456701030195214106556619472506132499810,62645663114353456701030195214106556619472506132504502⟩⟩, + ⟨⟨-31475,24445⟩,⟨-2140719769235797028205516202082047489481037045496644864,-2140719769235797028205516202082047489481037045496541246⟩⟩, + ⟨⟨13888700337651677855486013064462166033591157621096484277,13888700337651677855486013064462166033591157621097951554⟩,⟨8018644878637242457731864987405639247292480784959560086,8018644878637242457731864987405639247292480784960900643⟩⟩, + ⟨⟨-66226484001406087186269822428046064537006176095476452575,-66226484001406087186269822428046064537006176095468013221⟩,⟨38235878365694248474749875008609958874189762043759733537,38235878365694248474749875008609958874189762043767529893⟩⟩, + ⟨⟨-8057639,6257984⟩,⟨-274012130462182019610306073866502078653572741823574121548,-274012130462182019610306073866502078653572741823553700471⟩⟩, + ⟨⟨698116573618815657723420267159812353625595869186411619329,698116573618815657723420267159812353625595869186546995968⟩,⟨403057791704562412437003984821960593422423797795863503325,403057791704562412437003984821960593422423797795992479870⟩⟩, + ⟨⟨-1777753643219414765502209672251157252299668175500659866926,-1777753643219414765502209672251157252299668175500214437180⟩,⟨1026386544465567034589678718387921823653437540474707009489,1026386544465567034589678718387921823653437540475135315601⟩⟩, + ⟨⟨-316496426,270373229⟩,⟨-4681754135318688100685463933953437859495028018501394604296,-4681754135318688100685463933953437859495028018500703417236⟩⟩, + ⟨⟨8476989952179979159842537270789896260736790540219175955665,8476989952179979159842537270789896260736790540221796026344⟩,⟨4894192430808863804767984001102074735896289541600404240407,4894192430808863804767984001102074735896289541602946290775⟩⟩, + ⟨⟨-16519255276341307666428785686975601350523842324848220738879,-16519255276341307666428785686975601350523842324843357664213⟩,⟨9537396480607799727922431955474031883319083256268184138678,9537396480607799727922431955474031883319083256272887551618⟩⟩, + ⟨⟨-2063023310,1602311441⟩,⟨-35073552699159298510119177454912266067657310953418404025636,-35073552699159298510119177454912266067657310953413957192785⟩⟩, + ⟨⟨53191854812319460937102516725929340894507893373836655098510,53191854812319460937102516725929340894507893373856315542123⟩,⟨30710331694588131420416852514888155530065883453801819567387,30710331694588131420416852514888155530065883453820991282227⟩⟩, + ⟨⟨-89358921423208404188597794196455981264076271255890728389178,-89358921423208404188597794196455981264076271255846788422758⟩,⟨51591397338183988791936510057210955958070246117858268931720,51591397338183988791936510057210955958070246117901351036712⟩⟩, + ⟨⟨-23445208945,20699151476⟩,⟨-167243731971546642828555953287659960115706019179445267819968,-167243731971546642828555953287659960115706019179397396986219⟩⟩] +lemma tw0_0_5_5_calc (j : Fin 31) : taylorWaveBox 0 0 5 5 j = tw0_0_5_5 j := by + revert j + decide +kernel +def tw0_0_5_6 : Fin 31 → CI := ![⟨⟨54730383304244933380112848518897283838116898657128896060060,54730383304244933380112848518897283838116898657144735966165⟩,⟨-6773781209,7672427130⟩⟩, + ⟨⟨-15757695611979108750655254726130659726537997439297382060287,-15757695611979108750655254726130659726537997439284173222068⟩,⟨27293129410152969410685188386912065907389527205321880451350,27293129410152969410685188386912065907389527205335388026858⟩⟩, + ⟨⟨-8709941539814653984064657652661994397480139251725500976983,-8709941539814653984064657652661994397480139251720035847368⟩,⟨-15086061277913682033476994307563564481558520417064389551166,-15086061277913682033476994307563564481558520417058765514430⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208346335003,9182234624581109642237633639768198127653962420209539741105⟩,⟨-419484100,540098318⟩⟩, + ⟨⟨-2288810846502477348068753004672864086324035685942954429974,-2288810846502477348068753004672864086324035685941818406450⟩,⟨3964336675057021537976296272177170483981600066054723707550,3964336675057021537976296272177170483981600066055903380501⟩⟩, + ⟨⟨-1067747151797492984705752874625644312037641065099112409530,-1067747151797492984705752874625644312037641065098554421441⟩,⟨-1849392316550216334622635146232719177136215814662681883218,-1849392316550216334622635146232719177136215814662104385684⟩⟩, + ⟨⟨919260274839426580241716221779161802910425528548985783469,919260274839426580241716221779161802910425528549124423827⟩,⟨-53087653,62143934⟩⟩, + ⟨⟨-179138245990913280628931124202153537622269042796372614216,-179138245990913280628931124202153537622269042796297290482⟩,⟨310276543635033542926922283375379159021565541452028237219,310276543635033542926922283375379159021565541452106967018⟩⟩, + ⟨⟨-61553498484293393557247088773947889556789052497238321155,-61553498484293393557247088773947889556789052497218428402⟩,⟨-106613786758410036760489017136375257450740340645826191763,-106613786758410036760489017136375257450740340645805178179⟩⟩, + ⟨⟨35868104002269959539990756405344523936148290703939790100,35868104002269959539990756405344523936148290703942577385⟩,⟨-819168,1054743⟩⟩, + ⟨⟨-4170887311708956971506847166506423093897035410542809202,-4170887311708956971506847166506423093897035410541945474⟩,⟨7224188736524282557119668539971559285688343026024467146,7224188736524282557119668539971559285688343026025410733⟩⟩, + ⟨⟨-699758773402005002456762203914662256336988448423235054,-699758773402005002456762203914662256336988448423115840⟩,⟨-1212017748574349777058290169435074839927990396297209618,-1212017748574349777058290169435074839927990396297077715⟩⟩, + ⟨⟨140109781258867029453088892208377046625579260562266635,140109781258867029453088892208377046625579260562273863⟩,⟨-1600,2060⟩⟩, + ⟨⟨-2733432708601582040846727359041649438816361126653152,-2733432708601582040846727359041649438816361126652937⟩,⟨4734444330368553816633945974355761093468712485535575,4734444330368553816633945974355761093468712485535842⟩⟩, + ⟨⟨-10677471517974929847057528746256443120376410650989,-10677471517974929847057528746256443120376410650988⟩,⟨-18493923165502163346226351462327191771362158146625,-18493923165502163346226351462327191771362158146623⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-10677471517974929847057528746256443120376410650989,-10677471517974929847057528746256443120376410650988⟩,⟨18493923165502163346226351462327191771362158146623,18493923165502163346226351462327191771362158146625⟩⟩, + ⟨⟨-2733432708601582040846727359041649438816361126653152,-2733432708601582040846727359041649438816361126652937⟩,⟨-4734444330368553816633945974355761093468712485535842,-4734444330368553816633945974355761093468712485535575⟩⟩, + ⟨⟨140109781258867029453088892208377046625579260562266635,140109781258867029453088892208377046625579260562273863⟩,⟨-2060,1600⟩⟩, + ⟨⟨-699758773402005002456762203914662256336988448423235054,-699758773402005002456762203914662256336988448423115840⟩,⟨1212017748574349777058290169435074839927990396297077715,1212017748574349777058290169435074839927990396297209618⟩⟩, + ⟨⟨-4170887311708956971506847166506423093897035410542809202,-4170887311708956971506847166506423093897035410541945474⟩,⟨-7224188736524282557119668539971559285688343026025410733,-7224188736524282557119668539971559285688343026024467146⟩⟩, + ⟨⟨35868104002269959539990756405344523936148290703939790100,35868104002269959539990756405344523936148290703942577385⟩,⟨-1054743,819169⟩⟩, + ⟨⟨-61553498484293393557247088773947889556789052497238321156,-61553498484293393557247088773947889556789052497218428402⟩,⟨106613786758410036760489017136375257450740340645805178179,106613786758410036760489017136375257450740340645826191763⟩⟩, + ⟨⟨-179138245990913280628931124202153537622269042796372614215,-179138245990913280628931124202153537622269042796297290481⟩,⟨-310276543635033542926922283375379159021565541452106967019,-310276543635033542926922283375379159021565541452028237221⟩⟩, + ⟨⟨919260274839426580241716221779161802910425528548985783469,919260274839426580241716221779161802910425528549124423828⟩,⟨-62143928,53087660⟩⟩, + ⟨⟨-1067747151797492984705752874625644312037641065099112409547,-1067747151797492984705752874625644312037641065098554421443⟩,⟨1849392316550216334622635146232719177136215814662104385671,1849392316550216334622635146232719177136215814662681883220⟩⟩, + ⟨⟨-2288810846502477348068753004672864086324035685942954429978,-2288810846502477348068753004672864086324035685941818406390⟩,⟨-3964336675057021537976296272177170483981600066055903380550,-3964336675057021537976296272177170483981600066054723707534⟩⟩, + ⟨⟨9182234624581109642237633639768198127653962420208346335012,9182234624581109642237633639768198127653962420209539741091⟩,⟨-540098240,419484155⟩⟩, + ⟨⟨-8709941539814653984064657652661994397480139251725500977129,-8709941539814653984064657652661994397480139251720035847381⟩,⟨15086061277913682033476994307563564481558520417058765514322,15086061277913682033476994307563564481558520417064389551191⟩⟩, + ⟨⟨-15757695611979108750655254726130659726537997439297382060273,-15757695611979108750655254726130659726537997439284173221805⟩,⟨-27293129410152969410685188386912065907389527205335388027073,-27293129410152969410685188386912065907389527205321880451316⟩⟩, + ⟨⟨54730383304244933380112848518897283838116898657128896060154,54730383304244933380112848518897283838116898657144735966087⟩,⟨-7672426686,6773781481⟩⟩] +lemma tw0_0_5_6_calc (j : Fin 31) : taylorWaveBox 0 0 5 6 j = tw0_0_5_6 j := by + revert j + decide +kernel +def tw0_0_5_7 : Fin 31 → CI := ![⟨⟨-1970413082,2231818584⟩,⟨-15920423158960125595439758270488942085850529785839408511659,-15920423158960125595439758270488942085850529785834750193465⟩⟩, + ⟨⟨7409966221467711955868583236644409452041479733637197733485,7409966221467711955868583236644409452041479733640888568288⟩,⟨4278145992650417582268026006510037977013089017226806492392,4278145992650417582268026006510037977013089017230406252423⟩⟩, + ⟨⟨-3803243028826468707141038658198604399333087798567509530225,-3803243028826468707141038658198604399333087798566079586951⟩,⟨2195803386486529329343270592343642584602236719661961340180,2195803386486529329343270592343642584602236719663346105835⟩⟩, + ⟨⟨-97618383,125686586⟩,⟨-2136803025194210900014571515934235255886439055451521628793,-2136803025194210900014571515934235255886439055451237108926⟩⟩, + ⟨⟨845664448900450543473945784676801778036174373446250357742,845664448900450543473945784676801778036174373446504695075⟩,⟨488244597216771643136834710396554078884579535781428848213,488244597216771643136834710396554078884579535781672736633⟩⟩, + ⟨⟨-358644278720961050986243352027270132531610249977558352489,-358644278720961050986243352027270132531610249977445219406⟩,⟨207063370862866034264724793844696904637389403300979640373,207063370862866034264724793844696904637389403301088507581⟩⟩, + ⟨⟨-9265544,10846163⟩,⟨-160441184787359821872660870163473329702807540620623545247,-160441184787359821872660870163473329702807540620598837239⟩⟩, + ⟨⟨48136420250126138239865741964204391230651615933485883334,48136420250126138239865741964204391230651615933498250729⟩,⟨27791575189235278687381512375103603389063069562335080577,27791575189235278687381512375103603389063069562346854794⟩⟩, + ⟨⟨-14472590276304124913805826634071112211018515104765301501,-14472590276304124913805826634071112211018515104762402884⟩,⟨8355753891895346840367238293964917923853689486773091980,8355753891895346840367238293964917923853689486775818976⟩⟩, + ⟨⟨-95315,122725⟩,⟨-4173443408582443164090959992059053234153201280178644130,-4173443408582443164090959992059053234153201280178306529⟩⟩, + ⟨⟨700477106876877052707506546928261977600801269487257994,700477106876877052707506546928261977600801269487351717⟩,⟨404420646216535223173290612977923641869901178322295408,404420646216535223173290612977923641869901178322380445⟩⟩, + ⟨⟨-94016445801027613749737777273836701622366437370107316,-94016445801027613749737777273836701622366437370096784⟩,⟨54280420291475153686292016357624225369263807738941874,54280420291475153686292016357624225369263807738951296⟩⟩, + ⟨⟨-94,120⟩,⟨-8151256657387584304865156234490338347955471250348808,-8151256657387584304865156234490338347955471250348361⟩⟩, + ⟨⟨183625870705132058104956596237962307856184447988474,183625870705132058104956596237962307856184447988486⟩,⟨106016445881787409543539094448484815174343374490126,106016445881787409543539094448484815174343374490135⟩⟩, + ⟨⟨-358644278720961050986243352027270132531610249978,-358644278720961050986243352027270132531610249977⟩,⟨207063370862866034264724793844696904637389403301,207063370862866034264724793844696904637389403302⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-358644278720961050986243352027270132531610249978,-358644278720961050986243352027270132531610249977⟩,⟨-207063370862866034264724793844696904637389403302,-207063370862866034264724793844696904637389403301⟩⟩, + ⟨⟨183625870705132058104956596237962307856184447988474,183625870705132058104956596237962307856184447988486⟩,⟨-106016445881787409543539094448484815174343374490135,-106016445881787409543539094448484815174343374490126⟩⟩, + ⟨⟨-94,120⟩,⟨8151256657387584304865156234490338347955471250348361,8151256657387584304865156234490338347955471250348808⟩⟩, + ⟨⟨-94016445801027613749737777273836701622366437370107316,-94016445801027613749737777273836701622366437370096784⟩,⟨-54280420291475153686292016357624225369263807738951296,-54280420291475153686292016357624225369263807738941874⟩⟩, + ⟨⟨700477106876877052707506546928261977600801269487257994,700477106876877052707506546928261977600801269487351717⟩,⟨-404420646216535223173290612977923641869901178322380445,-404420646216535223173290612977923641869901178322295408⟩⟩, + ⟨⟨-95315,122725⟩,⟨4173443408582443164090959992059053234153201280178306529,4173443408582443164090959992059053234153201280178644130⟩⟩, + ⟨⟨-14472590276304124913805826634071112211018515104765301501,-14472590276304124913805826634071112211018515104762402884⟩,⟨-8355753891895346840367238293964917923853689486775818976,-8355753891895346840367238293964917923853689486773091980⟩⟩, + ⟨⟨48136420250126138239865741964204391230651615933485883334,48136420250126138239865741964204391230651615933498250729⟩,⟨-27791575189235278687381512375103603389063069562346854794,-27791575189235278687381512375103603389063069562335080577⟩⟩, + ⟨⟨-9265545,10846162⟩,⟨160441184787359821872660870163473329702807540620598837239,160441184787359821872660870163473329702807540620623545247⟩⟩, + ⟨⟨-358644278720961050986243352027270132531610249977558352490,-358644278720961050986243352027270132531610249977445219404⟩,⟨-207063370862866034264724793844696904637389403301088507584,-207063370862866034264724793844696904637389403300979640373⟩⟩, + ⟨⟨845664448900450543473945784676801778036174373446250357739,845664448900450543473945784676801778036174373446504695085⟩,⟨-488244597216771643136834710396554078884579535781672736634,-488244597216771643136834710396554078884579535781428848200⟩⟩, + ⟨⟨-97618396,125686568⟩,⟨2136803025194210900014571515934235255886439055451237108928,2136803025194210900014571515934235255886439055451521628789⟩⟩, + ⟨⟨-3803243028826468707141038658198604399333087798567509530232,-3803243028826468707141038658198604399333087798566079586924⟩,⟨-2195803386486529329343270592343642584602236719663346105872,-2195803386486529329343270592343642584602236719661961340183⟩⟩, + ⟨⟨7409966221467711955868583236644409452041479733637197733476,7409966221467711955868583236644409452041479733640888568346⟩,⟨-4278145992650417582268026006510037977013089017230406252420,-4278145992650417582268026006510037977013089017226806492321⟩⟩, + ⟨⟨-1970413161,2231818455⟩,⟨15920423158960125595439758270488942085850529785834750193493,15920423158960125595439758270488942085850529785839408511637⟩⟩] +lemma tw0_0_5_7_calc (j : Fin 31) : taylorWaveBox 0 0 5 7 j = tw0_0_5_7 j := by + revert j + decide +kernel +def tw0_0_5_8 : Fin 31 → CI := ![⟨⟨-4167957036519161635267462875665650308090614798608135786653,-4167957036519161635267462875665650308090614798606902974781⟩,⟨-584288739,515852939⟩⟩, + ⟨⟨1045348268338512868602174050230711630502000828254831819035,1045348268338512868602174050230711630502000828255714733790⟩,⟨-1810596312366448656928296453727279648114966328169932161040,-1810596312366448656928296453727279648114966328169024556660⟩⟩, + ⟨⟨498211984668209501074447522212552176268799660944515042837,498211984668209501074447522212552176268799660944830822057⟩,⟨862928470385065379022052810663140596629347410453673211117,862928470385065379022052810663140596629347410454000401742⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113853559116,-447530979074571922520290831596952057595537869113792544878⟩,⟨-26323737,20445147⟩⟩, + ⟨⟨93736233541568285837386950791285126905599017268151432941,93736233541568285837386950791285126905599017268198554529⟩,⟨-162355919004138232372836741759177853480159271421511508964,-162355919004138232372836741759177853480159271421462162906⟩⟩, + ⟨⟨36139375818351043324305932231550288027610878708978395981,36139375818351043324305932231550288027610878708997511929⟩,⟨62595235071210080304470835446295917111034100012519607519,62595235071210080304470835446295917111034100012539552214⟩⟩, + ⟨⟨-25202042373060605481053021731346532868346133836082662853,-25202042373060605481053021731346532868346133836078701507⟩,⟨-1703712,1455429⟩⟩, + ⟨⟨3880435930941774193134327520832519661449226726722387130,3880435930941774193134327520832519661449226726724043473⟩,⟨-6721112187906988151330899020690963208255456507366029270,-6721112187906988151330899020690963208255456507364281061⟩⟩, + ⟨⟨1020847918299328973244310595928429326662110183842851778,1020847918299328973244310595928429326662110183843188194⟩,⟨1768160461295360016531539505593046531362271804852838062,1768160461295360016531539505593046531362271804853197824⟩⟩, + ⟨⟨-437041971752511643086221515231398493745642450306486197,-437041971752511643086221515231398493745642450306449451⟩,⟨-12852,9982⟩⟩, + ⟨⟨35292359197608440746392511944873328151963748739242784,35292359197608440746392511944873328151963748739250318⟩,⟨-61128159249228594047334800240523356553744238293489815,-61128159249228594047334800240523356553744238293481441⟩⟩, + ⟨⟨3789488213810326360482741719563007481884010475315261,3789488213810326360482741719563007481884010475315932⟩,⟨6563586121002918116534081074893518758061969245473431,6563586121002918116534081074893518758061969245474188⟩⟩, + ⟨⟨-426798800539562151451388198468162591548478955377423,-426798800539562151451388198468162591548478955377397⟩,⟨-7,5⟩⟩, + ⟨⟨3700672083799146836408927460510749494027353979800,3700672083799146836408927460510749494027353979801⟩,⟨-6409752071291912223177813549700701912169891841284,-6409752071291912223177813549700701912169891841282⟩⟩, + ⟨⟨3613937581835104332430593223155028802761087870,3613937581835104332430593223155028802761087871⟩,⟨6259523507121008030447083544629591711103410001,6259523507121008030447083544629591711103410002⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨3613937581835104332430593223155028802761087870,3613937581835104332430593223155028802761087871⟩,⟨-6259523507121008030447083544629591711103410002,-6259523507121008030447083544629591711103410001⟩⟩, + ⟨⟨3700672083799146836408927460510749494027353979800,3700672083799146836408927460510749494027353979801⟩,⟨6409752071291912223177813549700701912169891841282,6409752071291912223177813549700701912169891841284⟩⟩, + ⟨⟨-426798800539562151451388198468162591548478955377423,-426798800539562151451388198468162591548478955377397⟩,⟨-5,7⟩⟩, + ⟨⟨3789488213810326360482741719563007481884010475315261,3789488213810326360482741719563007481884010475315932⟩,⟨-6563586121002918116534081074893518758061969245474188,-6563586121002918116534081074893518758061969245473431⟩⟩, + ⟨⟨35292359197608440746392511944873328151963748739242784,35292359197608440746392511944873328151963748739250318⟩,⟨61128159249228594047334800240523356553744238293481441,61128159249228594047334800240523356553744238293489815⟩⟩, + ⟨⟨-437041971752511643086221515231398493745642450306486197,-437041971752511643086221515231398493745642450306449451⟩,⟨-9982,12852⟩⟩, + ⟨⟨1020847918299328973244310595928429326662110183842851778,1020847918299328973244310595928429326662110183843188194⟩,⟨-1768160461295360016531539505593046531362271804853197824,-1768160461295360016531539505593046531362271804852838062⟩⟩, + ⟨⟨3880435930941774193134327520832519661449226726722387130,3880435930941774193134327520832519661449226726724043473⟩,⟨6721112187906988151330899020690963208255456507364281061,6721112187906988151330899020690963208255456507366029270⟩⟩, + ⟨⟨-25202042373060605481053021731346532868346133836082662853,-25202042373060605481053021731346532868346133836078701507⟩,⟨-1455429,1703712⟩⟩, + ⟨⟨36139375818351043324305932231550288027610878708978395981,36139375818351043324305932231550288027610878708997511930⟩,⟨-62595235071210080304470835446295917111034100012539552214,-62595235071210080304470835446295917111034100012519607518⟩⟩, + ⟨⟨93736233541568285837386950791285126905599017268151432939,93736233541568285837386950791285126905599017268198554529⟩,⟨162355919004138232372836741759177853480159271421462162905,162355919004138232372836741759177853480159271421511508966⟩⟩, + ⟨⟨-447530979074571922520290831596952057595537869113853559115,-447530979074571922520290831596952057595537869113792544879⟩,⟨-20445149,26323734⟩⟩, + ⟨⟨498211984668209501074447522212552176268799660944515042838,498211984668209501074447522212552176268799660944830822065⟩,⟨-862928470385065379022052810663140596629347410454000401743,-862928470385065379022052810663140596629347410453673211111⟩⟩, + ⟨⟨1045348268338512868602174050230711630502000828254831819017,1045348268338512868602174050230711630502000828255714733789⟩,⟨1810596312366448656928296453727279648114966328169024556658,1810596312366448656928296453727279648114966328169932161055⟩⟩, + ⟨⟨-4167957036519161635267462875665650308090614798608135786647,-4167957036519161635267462875665650308090614798606902974789⟩,⟨-515852960,584288706⟩⟩] +lemma tw0_0_5_8_calc (j : Fin 31) : taylorWaveBox 0 0 5 8 j = tw0_0_5_8 j := by + revert j + decide +kernel +def tw0_0_5_9 : Fin 31 → CI := ![⟨⟨-139060395,122772713⟩,⟨991971455030794224652842832938641432881003100651285149749,991971455030794224652842832938641432881003100651581715832⟩⟩, + ⟨⟨-402192853685155952004923929346552618066232272940820387001,-402192853685155952004923929346552618066232272940617498066⟩,⟨-232206152341268557557157833771249538715910145526851662743,-232206152341268557557157833771249538715910145526654799268⟩⟩, + ⟨⟨177992962933119116596034026181185156903651215460473785741,177992962933119116596034026181185156903651215460541840673⟩,⟨-102764285063295402649203902751716039268368312887925626503,-102764285063295402649203902751716039268368312887860164819⟩⟩, + ⟨⟨-5012028,3892747⟩,⟨85209699158455917355792738417989130577889747539444113630,85209699158455917355792738417989130577889747539456001945⟩⟩, + ⟨⟨-28336453467234453926218887767410594190769007845648862042,-28336453467234453926218887767410594190769007845640159331⟩,⟨-16360059037187116312572834024870258488606038212687978832,-16360059037187116312572834024870258488606038212679702487⟩⟩, + ⟨⟨9931754073204028611567929538504521988359739542641957338,9931754073204028611567929538504521988359739542645153503⟩,⟨-5734100887689508069820606958792239367701102333470668264,-5734100887689508069820606958792239367701102333467616954⟩⟩, + ⟨⟨-243290,207835⟩,⟨3598843235212085340458540018208389404888495232431828748,3598843235212085340458540018208389404888495232432405884⟩⟩, + ⟨⟨-853131178726521856442650893006185893762359480374748817,-853131178726521856442650893006185893762359480374524195⟩,⟨-492555515691820123244151829497653754857599064508099386,-492555515691820123244151829497653754857599064507887573⟩⟩, + ⟨⟨196383229338455054689904262376246395540152477021816433,196383229338455054689904262376246395540152477021857016⟩,⟨-113381910322885037869705973521117938826128000745501582,-113381910322885037869705973521117938826128000745463856⟩⟩, + ⟨⟨-1224,951⟩,⟨41606298417214803396383173055658755164985228290745283,41606298417214803396383173055658755164985228290748914⟩⟩, + ⟨⟨-4849489293556654595492153094972911127128779073556741,-4849489293556654595492153094972911127128779073556060⟩,⟨-2799853949067142612217093241597773128760303873764573,-2799853949067142612217093241597773128760303873763966⟩⟩, + ⟨⟨416567958362559500216138131350676705938652090026654,416567958362559500216138131350676705938652090026705⟩,⟨-240505622896396544552808510496901247489062043216813,-240505622896396544552808510496901247489062043216769⟩⟩, + ⟨⟨-1,1⟩,⟨20315575399030665720890221218583376545402943501340,20315575399030665720890221218583376545402943501342⟩⟩, + ⟨⟨-203402323419218505964911196948572610321607465834,-203402323419218505964911196948572610321607465833⟩,⟨-117434386179881125269926030516065062250518575790,-117434386179881125269926030516065062250518575789⟩⟩, + ⟨⟨99317540732040286115679295385045219883597395,99317540732040286115679295385045219883597396⟩,⟨-57341008876895080698206069587922393677011024,-57341008876895080698206069587922393677011023⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨99317540732040286115679295385045219883597395,99317540732040286115679295385045219883597396⟩,⟨57341008876895080698206069587922393677011023,57341008876895080698206069587922393677011024⟩⟩, + ⟨⟨-203402323419218505964911196948572610321607465834,-203402323419218505964911196948572610321607465833⟩,⟨117434386179881125269926030516065062250518575789,117434386179881125269926030516065062250518575790⟩⟩, + ⟨⟨-1,1⟩,⟨-20315575399030665720890221218583376545402943501342,-20315575399030665720890221218583376545402943501340⟩⟩, + ⟨⟨416567958362559500216138131350676705938652090026654,416567958362559500216138131350676705938652090026705⟩,⟨240505622896396544552808510496901247489062043216769,240505622896396544552808510496901247489062043216813⟩⟩, + ⟨⟨-4849489293556654595492153094972911127128779073556741,-4849489293556654595492153094972911127128779073556060⟩,⟨2799853949067142612217093241597773128760303873763966,2799853949067142612217093241597773128760303873764573⟩⟩, + ⟨⟨-1224,951⟩,⟨-41606298417214803396383173055658755164985228290748914,-41606298417214803396383173055658755164985228290745283⟩⟩, + ⟨⟨196383229338455054689904262376246395540152477021816433,196383229338455054689904262376246395540152477021857016⟩,⟨113381910322885037869705973521117938826128000745463856,113381910322885037869705973521117938826128000745501582⟩⟩, + ⟨⟨-853131178726521856442650893006185893762359480374748817,-853131178726521856442650893006185893762359480374524195⟩,⟨492555515691820123244151829497653754857599064507887573,492555515691820123244151829497653754857599064508099386⟩⟩, + ⟨⟨-243290,207835⟩,⟨-3598843235212085340458540018208389404888495232432405884,-3598843235212085340458540018208389404888495232431828748⟩⟩, + ⟨⟨9931754073204028611567929538504521988359739542641957338,9931754073204028611567929538504521988359739542645153503⟩,⟨5734100887689508069820606958792239367701102333467616954,5734100887689508069820606958792239367701102333470668264⟩⟩, + ⟨⟨-28336453467234453926218887767410594190769007845648862042,-28336453467234453926218887767410594190769007845640159331⟩,⟨16360059037187116312572834024870258488606038212679702487,16360059037187116312572834024870258488606038212687978833⟩⟩, + ⟨⟨-5012028,3892748⟩,⟨-85209699158455917355792738417989130577889747539456001945,-85209699158455917355792738417989130577889747539444113630⟩⟩, + ⟨⟨177992962933119116596034026181185156903651215460473785740,177992962933119116596034026181185156903651215460541840673⟩,⟨102764285063295402649203902751716039268368312887860164819,102764285063295402649203902751716039268368312887925626505⟩⟩, + ⟨⟨-402192853685155952004923929346552618066232272940820387004,-402192853685155952004923929346552618066232272940617498065⟩,⟨232206152341268557557157833771249538715910145526654799264,232206152341268557557157833771249538715910145526851662743⟩⟩, + ⟨⟨-139060387,122772718⟩,⟨-991971455030794224652842832938641432881003100651581715831,-991971455030794224652842832938641432881003100651285149750⟩⟩] +lemma tw0_0_5_9_calc (j : Fin 31) : taylorWaveBox 0 0 5 9 j = tw0_0_5_9 j := by + revert j + decide +kernel +def tw0_0_5_10 : Fin 31 → CI := ![⟨⟨216414599701077852906202435073998598449788143727837466664,216414599701077852906202435073998598449788143727902856216⟩,⟨-26784851,30338272⟩⟩, + ⟨⟨-47282222186997885869559904367101937715076599380174042050,-47282222186997885869559904367101937715076599380133805861⟩,⟨81895211122640775717367861314879747297045205895897875118,81895211122640775717367861314879747297045205895939448399⟩⟩, + ⟨⟨-19430397217969120585294141362967309759492224555821812264,-19430397217969120585294141362967309759492224555809373094⟩,⟨-33654435192767481992360526082876008665865767672384874900,-33654435192767481992360526082876008665865767672371900128⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007034936753,14871898049488972066912608227174197124666822007037058995⟩,⟨-679413,874764⟩⟩, + ⟨⟨-2617421546846045632143503744257114450905124956520497079,-2617421546846045632143503744257114450905124956519164627⟩,⟨4533507103962873327503181346078914989933165890504895203,4533507103962873327503181346078914989933165890506301968⟩⟩, + ⟨⟨-833991167764262529146043656834058963507080030247558092,-833991167764262529146043656834058963507080030247111642⟩,⟨-1444515075631401937710794056684068317595390181853265602,-1444515075631401937710794056684068317595390181852796140⟩⟩, + ⟨⟨471087477881817150367027725509267001994255814209018435,471087477881817150367027725509267001994255814209095482⟩,⟨-27206,31847⟩⟩, + ⟨⟨-57311436651205712003848069022248482355177059109885297,-57311436651205712003848069022248482355177059109860468⟩,⟨99266320134653405969582233274387898052831075062678373,99266320134653405969582233274387898052831075062704826⟩⟩, + ⟨⟨-11543511276122530729873023527124496512469872895547101,-11543511276122530729873023527124496512469872895543222⟩,⟨-19993948027988470634123013016328063304942677220685498,-19993948027988470634123013016328063304942677220681302⟩⟩, + ⟨⟨3630834484738518571023585992962450469889360841561358,3630834484738518571023585992962450469889360841561688⟩,⟨-83,107⟩⟩, + ⟨⟨-203611124942446906529795814656752676637470710509629,-203611124942446906529795814656752676637470710509583⟩,⟨352664813386572738698924330245133866600437056116435,352664813386572738698924330245133866600437056116487⟩⟩, + ⟨⟨-13992049963673269532189469976134883387494399196748,-13992049963673269532189469976134883387494399196744⟩,⟨-24234941439124366691792537420504857923054461685230,-24234941439124366691792537420504857923054461685226⟩⟩, + ⟨⟨886434200375614885503805174063098259250332236709,886434200375614885503805174063098259250332236710⟩,⟨-1,1⟩⟩, + ⟨⟨-3416027823162419319382194818392305514524999804,-3416027823162419319382194818392305514524999803⟩,⟨5916733749786222336863412456177943828870718184,5916733749786222336863412456177943828870718185⟩⟩, + ⟨⟨-833991167764262529146043656834058963507081,-833991167764262529146043656834058963507080⟩,⟨-1444515075631401937710794056684068317595391,-1444515075631401937710794056684068317595390⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-833991167764262529146043656834058963507081,-833991167764262529146043656834058963507080⟩,⟨1444515075631401937710794056684068317595390,1444515075631401937710794056684068317595391⟩⟩, + ⟨⟨-3416027823162419319382194818392305514524999804,-3416027823162419319382194818392305514524999803⟩,⟨-5916733749786222336863412456177943828870718185,-5916733749786222336863412456177943828870718184⟩⟩, + ⟨⟨886434200375614885503805174063098259250332236709,886434200375614885503805174063098259250332236710⟩,⟨-1,1⟩⟩, + ⟨⟨-13992049963673269532189469976134883387494399196748,-13992049963673269532189469976134883387494399196744⟩,⟨24234941439124366691792537420504857923054461685226,24234941439124366691792537420504857923054461685230⟩⟩, + ⟨⟨-203611124942446906529795814656752676637470710509629,-203611124942446906529795814656752676637470710509583⟩,⟨-352664813386572738698924330245133866600437056116487,-352664813386572738698924330245133866600437056116435⟩⟩, + ⟨⟨3630834484738518571023585992962450469889360841561358,3630834484738518571023585992962450469889360841561688⟩,⟨-107,83⟩⟩, + ⟨⟨-11543511276122530729873023527124496512469872895547101,-11543511276122530729873023527124496512469872895543222⟩,⟨19993948027988470634123013016328063304942677220681302,19993948027988470634123013016328063304942677220685498⟩⟩, + ⟨⟨-57311436651205712003848069022248482355177059109885297,-57311436651205712003848069022248482355177059109860468⟩,⟨-99266320134653405969582233274387898052831075062704826,-99266320134653405969582233274387898052831075062678373⟩⟩, + ⟨⟨471087477881817150367027725509267001994255814209018435,471087477881817150367027725509267001994255814209095482⟩,⟨-31847,27206⟩⟩, + ⟨⟨-833991167764262529146043656834058963507080030247558092,-833991167764262529146043656834058963507080030247111642⟩,⟨1444515075631401937710794056684068317595390181852796140,1444515075631401937710794056684068317595390181853265602⟩⟩, + ⟨⟨-2617421546846045632143503744257114450905124956520497079,-2617421546846045632143503744257114450905124956519164627⟩,⟨-4533507103962873327503181346078914989933165890506301968,-4533507103962873327503181346078914989933165890504895203⟩⟩, + ⟨⟨14871898049488972066912608227174197124666822007034936753,14871898049488972066912608227174197124666822007037058995⟩,⟨-874764,679413⟩⟩, + ⟨⟨-19430397217969120585294141362967309759492224555821812265,-19430397217969120585294141362967309759492224555809373094⟩,⟨33654435192767481992360526082876008665865767672371900128,33654435192767481992360526082876008665865767672384874900⟩⟩, + ⟨⟨-47282222186997885869559904367101937715076599380174042050,-47282222186997885869559904367101937715076599380133805860⟩,⟨-81895211122640775717367861314879747297045205895939448399,-81895211122640775717367861314879747297045205895897875118⟩⟩, + ⟨⟨216414599701077852906202435073998598449788143727837466664,216414599701077852906202435073998598449788143727902856216⟩,⟨-30338271,26784852⟩⟩] +lemma tw0_0_5_10_calc (j : Fin 31) : taylorWaveBox 0 0 5 10 j = tw0_0_5_10 j := by + revert j + decide +kernel +def tw0_0_5_11 : Fin 31 → CI := ![⟨⟨-5394045,6109647⟩,⟨-43582469009646285030733050622538865647542245859589761751,-43582469009646285030733050622538865647542245859576454604⟩⟩, + ⟨⟨15392903892218065753346624902747564194178739329198121449,15392903892218065753346624902747564194178739329205984500⟩,⟨8887097205782138437932064156030656875650857039909476612,8887097205782138437932064156030656875650857039917067637⟩⟩, + ⟨⟨-5873807020128451026971284445250103365566311721195395664,-5873807020128451026971284445250103365566311721193112442⟩,⟨3391244064239074761746259915068914879840257765123351580,3391244064239074761746259915068914879840257765125533420⟩⟩, + ⟨⟨-109459,140931⟩,⟨-2395971572164663075006627933825495916097687151940025748,-2395971572164663075006627933825495916097687151939676212⟩⟩, + ⟨⟨669516062995196241606096244359276291721560841521704480,669516062995196241606096244359276291721560841521914365⟩,⟨386545279197054991095688161365678378835521383196615521,386545279197054991095688161365678378835521383196813531⟩⟩, + ⟨⟨-193934955111252858464399531298504995143211401214993686,-193934955111252858464399531298504995143211401214930039⟩,⟨111968398538759826889458770493757659954935755829152972,111968398538759826889458770493757659954935755829213268⟩⟩, + ⟨⟨-3288,3849⟩,⟨-56921729219679268117752553035921843729028297560550534,-56921729219679268117752553035921843729028297560541042⟩⟩, + ⟨⟨10661686908851956079246243420221534308258967099295728,10661686908851956079246243420221534308258967099298604⟩,⟨6155527806841185854577239378061554197196005184861262,6155527806841185854577239378061554197196005184863949⟩⟩, + ⟨⟨-1879016588405525604656570422698677269797209390771948,-1879016588405525604656570422698677269797209390771547⟩,⟨1084850733127702446036628925296711044390973759754832,1084850733127702446036628925296711044390973759755201⟩⟩, + ⟨⟨-7,9⟩,⟨-292476998555256723023270011453307606945518451164547,-292476998555256723023270011453307606945518451164518⟩⟩, + ⟨⟨23673700575104108699267520910462035539942797999871,23673700575104108699267520910462035539942797999875⟩,⟨13668017399750955430842135070038776849967743631490,13668017399750955430842135070038776849967743631494⟩⟩, + ⟨⟨-1301475452740717294829863698757511512238643444739,-1301475452740717294829863698757511512238643444738⟩,⟨751407202983543195138823166267279565087402976667,751407202983543195138823166267279565087402976668⟩⟩, + ⟨⟨-1,1⟩,⟨-35702758612702236697176515069983838738466607809,-35702758612702236697176515069983838738466607808⟩⟩, + ⟨⟨158871515227138341654036096039735292021318779,158871515227138341654036096039735292021318780⟩,⟨91724512082952050187844624788486275035083371,91724512082952050187844624788486275035083372⟩⟩, + ⟨⟨-19393495511125285846439953129850499514322,-19393495511125285846439953129850499514321⟩,⟨11196839853875982688945877049375765995493,11196839853875982688945877049375765995494⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-19393495511125285846439953129850499514322,-19393495511125285846439953129850499514321⟩,⟨-11196839853875982688945877049375765995494,-11196839853875982688945877049375765995493⟩⟩, + ⟨⟨158871515227138341654036096039735292021318779,158871515227138341654036096039735292021318780⟩,⟨-91724512082952050187844624788486275035083372,-91724512082952050187844624788486275035083371⟩⟩, + ⟨⟨-1,1⟩,⟨35702758612702236697176515069983838738466607808,35702758612702236697176515069983838738466607809⟩⟩, + ⟨⟨-1301475452740717294829863698757511512238643444739,-1301475452740717294829863698757511512238643444738⟩,⟨-751407202983543195138823166267279565087402976668,-751407202983543195138823166267279565087402976667⟩⟩, + ⟨⟨23673700575104108699267520910462035539942797999871,23673700575104108699267520910462035539942797999875⟩,⟨-13668017399750955430842135070038776849967743631494,-13668017399750955430842135070038776849967743631490⟩⟩, + ⟨⟨-7,9⟩,⟨292476998555256723023270011453307606945518451164518,292476998555256723023270011453307606945518451164547⟩⟩, + ⟨⟨-1879016588405525604656570422698677269797209390771948,-1879016588405525604656570422698677269797209390771547⟩,⟨-1084850733127702446036628925296711044390973759755201,-1084850733127702446036628925296711044390973759754832⟩⟩, + ⟨⟨10661686908851956079246243420221534308258967099295728,10661686908851956079246243420221534308258967099298604⟩,⟨-6155527806841185854577239378061554197196005184863949,-6155527806841185854577239378061554197196005184861262⟩⟩, + ⟨⟨-3288,3849⟩,⟨56921729219679268117752553035921843729028297560541042,56921729219679268117752553035921843729028297560550534⟩⟩, + ⟨⟨-193934955111252858464399531298504995143211401214993686,-193934955111252858464399531298504995143211401214930039⟩,⟨-111968398538759826889458770493757659954935755829213268,-111968398538759826889458770493757659954935755829152972⟩⟩, + ⟨⟨669516062995196241606096244359276291721560841521704480,669516062995196241606096244359276291721560841521914365⟩,⟨-386545279197054991095688161365678378835521383196813531,-386545279197054991095688161365678378835521383196615521⟩⟩, + ⟨⟨-109459,140931⟩,⟨2395971572164663075006627933825495916097687151939676212,2395971572164663075006627933825495916097687151940025748⟩⟩, + ⟨⟨-5873807020128451026971284445250103365566311721195395664,-5873807020128451026971284445250103365566311721193112441⟩,⟨-3391244064239074761746259915068914879840257765125533420,-3391244064239074761746259915068914879840257765123351580⟩⟩, + ⟨⟨15392903892218065753346624902747564194178739329198121449,15392903892218065753346624902747564194178739329205984500⟩,⟨-8887097205782138437932064156030656875650857039917067637,-8887097205782138437932064156030656875650857039909476612⟩⟩, + ⟨⟨-5394045,6109647⟩,⟨43582469009646285030733050622538865647542245859576454604,43582469009646285030733050622538865647542245859589761751⟩⟩] +lemma tw0_0_5_11_calc (j : Fin 31) : taylorWaveBox 0 0 5 11 j = tw0_0_5_11 j := by + revert j + decide +kernel +def tw0_0_5_12 : Fin 31 → CI := ![⟨⟨-8149902646786285757064994502219583017511214743126882700,-8149902646786285757064994502219583017511214743124368326⟩,⟨-1142502,1008684⟩⟩, + ⟨⟨1551091071856863615375934763133313134165203549352808080,1551091071856863615375934763133313134165203549354137901⟩,⟨-2686568543622556104473343783042988709540568005266768391,-2686568543622556104473343783042988709540568005265387478⟩⟩, + ⟨⟨549606336125655204917060435621834617601144866669243292,549606336125655204917060435621834617601144866669598645⟩,⟨951946098331412916081043587669071438574306367676089195,951946098331412916081043587669071438574306367676462259⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381992565,-358436509015356793117744663894557782742708865381939132⟩,⟨-21084,16375⟩⟩, + ⟨⟨53008118664516342873912669580196782716799333864428681,53008118664516342873912669580196782716799333864456004⟩,⟨-91812754740582409020300909141983762552172368146645386,-91812754740582409020300909141983762552172368146616311⟩⟩, + ⟨⟨13958694376332619534409785002199015732581973911113872,13958694376332619534409785002199015732581973911121434⟩,⟨24177167867134059642983318531084495754943450958812275,24177167867134059642983318531084495754943450958820287⟩⟩, + ⟨⟨-6386603083791852241089888205092732398089436736506453,-6386603083791852241089888205092732398089436736505367⟩,⟨-432,369⟩⟩, + ⟨⟨613909871013967025339399918047601261105449570174600,613909871013967025339399918047601261105449570174871⟩,⟨-1063323087864246880402706318997080767284561430502496,-1063323087864246880402706318997080767284561430502205⟩⟩, + ⟨⟨94671085928763648399410080757648506723950411947825,94671085928763648399410080757648506723950411947859⟩,⟨163975130836337652860921861757994916353794433915149,163975130836337652860921861757994916353794433915185⟩⟩, + ⟨⟨-21877228333456835517440470208408067794354789146850,-21877228333456835517440470208408067794354789146847⟩,⟨-1,1⟩⟩, + ⟨⟨851971092305457735254503479138123518834348993598,851971092305457735254503479138123518834348993599⟩,⟨-1475657218453006570006306062688262680355435239186,-1475657218453006570006306062688262680355435239185⟩⟩, + ⟨⟨37470084900754823323937983279272537909268162242,37470084900754823323937983279272537909268162243⟩,⟨64900090812026787133954243102849167925083095123,64900090812026787133954243102849167925083095124⟩⟩, + ⟨⟨-1335280049649465058437528699243656481589037424,-1335280049649465058437528699243656481589037423⟩,⟨-1,1⟩⟩, + ⟨⟨2286992486618336384517699174760286737626230,2286992486618336384517699174760286737626231⟩,⟨-3961187183351244331906386908132883784489936,-3961187183351244331906386908132883784489935⟩⟩, + ⟨⟨139586943763326195344097850021990157325,139586943763326195344097850021990157326⟩,⟨241771678671340596429833185310844957549,241771678671340596429833185310844957550⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨139586943763326195344097850021990157325,139586943763326195344097850021990157326⟩,⟨-241771678671340596429833185310844957550,-241771678671340596429833185310844957549⟩⟩, + ⟨⟨2286992486618336384517699174760286737626230,2286992486618336384517699174760286737626231⟩,⟨3961187183351244331906386908132883784489935,3961187183351244331906386908132883784489936⟩⟩, + ⟨⟨-1335280049649465058437528699243656481589037424,-1335280049649465058437528699243656481589037423⟩,⟨-1,1⟩⟩, + ⟨⟨37470084900754823323937983279272537909268162242,37470084900754823323937983279272537909268162243⟩,⟨-64900090812026787133954243102849167925083095124,-64900090812026787133954243102849167925083095123⟩⟩, + ⟨⟨851971092305457735254503479138123518834348993598,851971092305457735254503479138123518834348993599⟩,⟨1475657218453006570006306062688262680355435239185,1475657218453006570006306062688262680355435239186⟩⟩, + ⟨⟨-21877228333456835517440470208408067794354789146850,-21877228333456835517440470208408067794354789146847⟩,⟨-1,1⟩⟩, + ⟨⟨94671085928763648399410080757648506723950411947825,94671085928763648399410080757648506723950411947859⟩,⟨-163975130836337652860921861757994916353794433915185,-163975130836337652860921861757994916353794433915149⟩⟩, + ⟨⟨613909871013967025339399918047601261105449570174600,613909871013967025339399918047601261105449570174871⟩,⟨1063323087864246880402706318997080767284561430502205,1063323087864246880402706318997080767284561430502496⟩⟩, + ⟨⟨-6386603083791852241089888205092732398089436736506453,-6386603083791852241089888205092732398089436736505367⟩,⟨-369,432⟩⟩, + ⟨⟨13958694376332619534409785002199015732581973911113872,13958694376332619534409785002199015732581973911121434⟩,⟨-24177167867134059642983318531084495754943450958820287,-24177167867134059642983318531084495754943450958812275⟩⟩, + ⟨⟨53008118664516342873912669580196782716799333864428681,53008118664516342873912669580196782716799333864456004⟩,⟨91812754740582409020300909141983762552172368146616311,91812754740582409020300909141983762552172368146645386⟩⟩, + ⟨⟨-358436509015356793117744663894557782742708865381992565,-358436509015356793117744663894557782742708865381939132⟩,⟨-16375,21084⟩⟩, + ⟨⟨549606336125655204917060435621834617601144866669243292,549606336125655204917060435621834617601144866669598645⟩,⟨-951946098331412916081043587669071438574306367676462259,-951946098331412916081043587669071438574306367676089195⟩⟩, + ⟨⟨1551091071856863615375934763133313134165203549352808080,1551091071856863615375934763133313134165203549354137901⟩,⟨2686568543622556104473343783042988709540568005265387478,2686568543622556104473343783042988709540568005266768391⟩⟩, + ⟨⟨-8149902646786285757064994502219583017511214743126882700,-8149902646786285757064994502219583017511214743124368326⟩,⟨-1008684,1142502⟩⟩] +lemma tw0_0_5_12_calc (j : Fin 31) : taylorWaveBox 0 0 5 12 j = tw0_0_5_12 j := by + revert j + decide +kernel +def tw0_0_5_13 : Fin 31 → CI := ![⟨⟨-199405,176049⟩,⟨1422426349034211492819848993123270072267181414165333100,1422426349034211492819848993123270072267181414165776469⟩⟩, + ⟨⟨-437635022222743448682380772355202487463081856341800061,-437635022222743448682380772355202487463081856341573720⟩,⟨-252668697887108783679726276981752044389881517555122367,-252668697887108783679726276981752044389881517554904937⟩⟩, + ⟨⟨143993145550772736036302084953740285998011476804634743,143993145550772736036302084953740285998011476804691632⟩,⟨-83134481345199602617567417832373720852740677347633530,-83134481345199602617567417832373720852740677347579513⟩⟩, + ⟨⟨-2944,2287⟩,⟨50047177933378515327455971288047401836241721327121398,50047177933378515327455971288047401836241721327129019⟩⟩, + ⟨⟨-11751189014027432406549150154233116025152194247651222,-11751189014027432406549150154233116025152194247647462⟩,⟨-6784552140546911073976931346258189262019226242223563,-6784552140546911073976931346258189262019226242220043⟩⟩, + ⟨⟨2813141220592428595321190890959312719285571600561443,2813141220592428595321190890959312719285571600562385⟩,⟨-1624167840977471043499020929143359620633508899994584,-1624167840977471043499020929143359620633508899993698⟩⟩, + ⟨⟨-46,39⟩,⟨668803510981146723247822633578313868995627098570367,668803510981146723247822633578313868995627098570484⟩⟩, + ⟨⟨-98978607443755028988884856770095924805372792906395,-98978607443755028988884856770095924805372792906367⟩,⟨-57145325651666262463408441742870633399811174622835,-57145325651666262463408441742870633399811174622808⟩⟩, + ⟨⟨13355560980918684346996483531347732161348933604176,13355560980918684346996483531347732161348933604180⟩,⟨-7710836727511864736319771636406007214046677171480,-7710836727511864736319771636406007214046677171477⟩⟩, + ⟨⟨-1,1⟩,⟨1527318662517654886702147561280743464240775186984,1527318662517654886702147561280743464240775186986⟩⟩, + ⟨⟨-85850256976087298441198452482889182107103625506,-85850256976087298441198452482889182107103625505⟩,⟨-49565668975142548934906644566142566547653469849,-49565668975142548934906644566142566547653469848⟩⟩, + ⟨⟨3020587385368500640529933373110837548992089627,3020587385368500640529933373110837548992089628⟩,⟨-1743936940053291701153822074672565716546971882,-1743936940053291701153822074672565716546971881⟩⟩, + ⟨⟨-1,1⟩,⟨46610066605153042196720811806663313728051000,46610066605153042196720811806663313728051001⟩⟩, + ⟨⟨-92181011516372700211484783114954759185550,-92181011516372700211484783114954759185549⟩,⟨-53220731813149771153375917806169608048919,-53220731813149771153375917806169608048918⟩⟩, + ⟨⟨2813141220592428595321190890959312719,2813141220592428595321190890959312720⟩,⟨-1624167840977471043499020929143359621,-1624167840977471043499020929143359620⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨2813141220592428595321190890959312719,2813141220592428595321190890959312720⟩,⟨1624167840977471043499020929143359620,1624167840977471043499020929143359621⟩⟩, + ⟨⟨-92181011516372700211484783114954759185550,-92181011516372700211484783114954759185549⟩,⟨53220731813149771153375917806169608048918,53220731813149771153375917806169608048919⟩⟩, + ⟨⟨-1,1⟩,⟨-46610066605153042196720811806663313728051001,-46610066605153042196720811806663313728051000⟩⟩, + ⟨⟨3020587385368500640529933373110837548992089627,3020587385368500640529933373110837548992089628⟩,⟨1743936940053291701153822074672565716546971881,1743936940053291701153822074672565716546971882⟩⟩, + ⟨⟨-85850256976087298441198452482889182107103625506,-85850256976087298441198452482889182107103625505⟩,⟨49565668975142548934906644566142566547653469848,49565668975142548934906644566142566547653469849⟩⟩, + ⟨⟨-1,1⟩,⟨-1527318662517654886702147561280743464240775186986,-1527318662517654886702147561280743464240775186984⟩⟩, + ⟨⟨13355560980918684346996483531347732161348933604176,13355560980918684346996483531347732161348933604180⟩,⟨7710836727511864736319771636406007214046677171477,7710836727511864736319771636406007214046677171480⟩⟩, + ⟨⟨-98978607443755028988884856770095924805372792906395,-98978607443755028988884856770095924805372792906367⟩,⟨57145325651666262463408441742870633399811174622808,57145325651666262463408441742870633399811174622835⟩⟩, + ⟨⟨-46,39⟩,⟨-668803510981146723247822633578313868995627098570484,-668803510981146723247822633578313868995627098570367⟩⟩, + ⟨⟨2813141220592428595321190890959312719285571600561443,2813141220592428595321190890959312719285571600562385⟩,⟨1624167840977471043499020929143359620633508899993698,1624167840977471043499020929143359620633508899994584⟩⟩, + ⟨⟨-11751189014027432406549150154233116025152194247651222,-11751189014027432406549150154233116025152194247647462⟩,⟨6784552140546911073976931346258189262019226242220043,6784552140546911073976931346258189262019226242223563⟩⟩, + ⟨⟨-2944,2287⟩,⟨-50047177933378515327455971288047401836241721327129019,-50047177933378515327455971288047401836241721327121398⟩⟩, + ⟨⟨143993145550772736036302084953740285998011476804634743,143993145550772736036302084953740285998011476804691632⟩,⟨83134481345199602617567417832373720852740677347579513,83134481345199602617567417832373720852740677347633530⟩⟩, + ⟨⟨-437635022222743448682380772355202487463081856341800061,-437635022222743448682380772355202487463081856341573720⟩,⟨252668697887108783679726276981752044389881517554904937,252668697887108783679726276981752044389881517555122367⟩⟩, + ⟨⟨-199405,176049⟩,⟨-1422426349034211492819848993123270072267181414165776469,-1422426349034211492819848993123270072267181414165333100⟩⟩] +lemma tw0_0_5_13_calc (j : Fin 31) : taylorWaveBox 0 0 5 13 j = tw0_0_5_13 j := by + revert j + decide +kernel +def tw0_0_5_14 : Fin 31 → CI := ![⟨⟨232743967104084891373045924847689787790798760227192387,232743967104084891373045924847689787790798760227265675⟩,⟨-28806,32628⟩⟩, + ⟨⟨-38586631079997771351630560293656861125547886381811263,-38586631079997771351630560293656861125547886381777934⟩,⟨66834005523472479682924368729220680753880394940802074,66834005523472479682924368729220680753880394940836854⟩⟩, + ⟨⟨-11789134673968743694342948347353892361006002810695921,-11789134673968743694342948347353892361006002810688222⟩,⟨-20419380232585815434920777452547100719629164095614862,-20419380232585815434920777452547100719629164095606729⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804183,6551160272016798098751126130700461144242000788805203⟩,⟨-300,386⟩⟩, + ⟨⟨-814087815239687167756121452510161113323931310011798,-814087815239687167756121452510161113323931310011372⟩,⟨1410041457817883130366759562982857552728159301461179,1410041457817883130366759562982857552728159301461635⟩⟩, + ⟨⟨-177169227687903422899782979182295881870512129718960,-177169227687903422899782979182295881870512129718862⟩,⟨-306866103893187418515073798253628100721071673449805,-306866103893187418515073798253628100721071673449701⟩⟩, + ⟨⟨65659631149794723622098140181990406812989656915289,65659631149794723622098140181990406812989656915302⟩,⟨-4,5⟩⟩, + ⟨⟨-4986870423729752612280895937481340582817489904693,-4986870423729752612280895937481340582817489904689⟩,⟨8637512944662467311834935109391709673511956352457,8637512944662467311834935109391709673511956352460⟩⟩, + ⟨⟨-588785264282192556024636234949598100670591528043,-588785264282192556024636234949598100670591528042⟩,⟨-1019805992484626460005559825580149547636114424757,-1019805992484626460005559825580149547636114424756⟩⟩, + ⟨⟨99962772705334443645494478312690141971466076489,99962772705334443645494478312690141971466076490⟩,⟨-1,1⟩⟩, + ⟨⟨-2703387873655752912899520556370481595924562527,-2703387873655752912899520556370481595924562526⟩,⟨4682405149737356849900418064172792064225336814,4682405149737356849900418064172792064225336815⟩⟩, + ⟨⟨-76093603877712289616102538108540963482932891,-76093603877712289616102538108540963482932890⟩,⟨-131797988047217823972090684652583460594359686,-131797988047217823972090684652583460594359685⟩⟩, + ⟨⟨1525310862813330744102393773081819793265778,1525310862813330744102393773081819793265779⟩,⟨-1,1⟩⟩, + ⟨⟨-1161096250575443872316017732369094291427,-1161096250575443872316017732369094291426⟩,⟨2011077698474393065980387644234977120885,2011077698474393065980387644234977120886⟩⟩, + ⟨⟨-17716922768790342289978297918229589,-17716922768790342289978297918229588⟩,⟨-30686610389318741851507379825362811,-30686610389318741851507379825362810⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-17716922768790342289978297918229589,-17716922768790342289978297918229588⟩,⟨30686610389318741851507379825362810,30686610389318741851507379825362811⟩⟩, + ⟨⟨-1161096250575443872316017732369094291427,-1161096250575443872316017732369094291426⟩,⟨-2011077698474393065980387644234977120886,-2011077698474393065980387644234977120885⟩⟩, + ⟨⟨1525310862813330744102393773081819793265778,1525310862813330744102393773081819793265779⟩,⟨-1,1⟩⟩, + ⟨⟨-76093603877712289616102538108540963482932891,-76093603877712289616102538108540963482932890⟩,⟨131797988047217823972090684652583460594359685,131797988047217823972090684652583460594359686⟩⟩, + ⟨⟨-2703387873655752912899520556370481595924562527,-2703387873655752912899520556370481595924562526⟩,⟨-4682405149737356849900418064172792064225336815,-4682405149737356849900418064172792064225336814⟩⟩, + ⟨⟨99962772705334443645494478312690141971466076489,99962772705334443645494478312690141971466076490⟩,⟨-1,1⟩⟩, + ⟨⟨-588785264282192556024636234949598100670591528043,-588785264282192556024636234949598100670591528042⟩,⟨1019805992484626460005559825580149547636114424756,1019805992484626460005559825580149547636114424757⟩⟩, + ⟨⟨-4986870423729752612280895937481340582817489904693,-4986870423729752612280895937481340582817489904689⟩,⟨-8637512944662467311834935109391709673511956352460,-8637512944662467311834935109391709673511956352457⟩⟩, + ⟨⟨65659631149794723622098140181990406812989656915289,65659631149794723622098140181990406812989656915302⟩,⟨-5,4⟩⟩, + ⟨⟨-177169227687903422899782979182295881870512129718960,-177169227687903422899782979182295881870512129718862⟩,⟨306866103893187418515073798253628100721071673449701,306866103893187418515073798253628100721071673449805⟩⟩, + ⟨⟨-814087815239687167756121452510161113323931310011798,-814087815239687167756121452510161113323931310011372⟩,⟨-1410041457817883130366759562982857552728159301461635,-1410041457817883130366759562982857552728159301461179⟩⟩, + ⟨⟨6551160272016798098751126130700461144242000788804183,6551160272016798098751126130700461144242000788805203⟩,⟨-386,300⟩⟩, + ⟨⟨-11789134673968743694342948347353892361006002810695921,-11789134673968743694342948347353892361006002810688222⟩,⟨20419380232585815434920777452547100719629164095606729,20419380232585815434920777452547100719629164095614862⟩⟩, + ⟨⟨-38586631079997771351630560293656861125547886381811263,-38586631079997771351630560293656861125547886381777934⟩,⟨-66834005523472479682924368729220680753880394940836854,-66834005523472479682924368729220680753880394940802074⟩⟩, + ⟨⟨232743967104084891373045924847689787790798760227192387,232743967104084891373045924847689787790798760227265675⟩,⟨-32628,28806⟩⟩] +lemma tw0_0_5_14_calc (j : Fin 31) : taylorWaveBox 0 0 5 14 j = tw0_0_5_14 j := by + revert j + decide +kernel +def tw0_0_5_15 : Fin 31 → CI := ![⟨⟨-4437,5025⟩,⟨-35842487118702823486118888589304243168354040593124477,-35842487118702823486118888589304243168354040593113076⟩⟩, + ⟨⟨9606251930311409414619620712991821798672576235036686,9606251930311409414619620712991821798672576235041717⟩,⟨5546172137868654345652557775000467358138046717065452,5546172137868654345652557775000467358138046717070261⟩⟩, + ⟨⟨-2725300242104990645891483083860110005904783700116726,-2725300242104990645891483083860110005904783700115631⟩,⟨1573452828401868617574058617485055405818642668114688,1573452828401868617574058617485055405818642668115722⟩⟩, + ⟨⟨-37,48⟩,⟨-807101058159109193417313938093791247346497101480140,-807101058159109193417313938093791247346497101480011⟩⟩, + ⟨⟨159240309596453410763412875958956742715330816040255,159240309596453410763412875958956742715330816040308⟩,⟨91937435611351723598124938437173705275817110936296,91937435611351723598124938437173705275817110936345⟩⟩, + ⟨⟨-31504846327665354377404215704974263338430507506791,-31504846327665354377404215704974263338430507506779⟩,⟨18189331508055385062401442706779322249122841856022,18189331508055385062401442706779322249122841856033⟩⟩, + ⟨⟨-1,1⟩,⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261129⟩⟩, + ⟨⟨709426070908192146499575731062801933586927765213,709426070908192146499575731062801933586927765215⟩,⟨409587333008983271143904985212963554847766717179,409587333008983271143904985212963554847766717181⟩⟩, + ⟨⟨-73289885942927623097378698066649031056767091637,-73289885942927623097378698066649031056767091636⟩,⟨42313935378026232495518171501163233628372548805,42313935378026232495518171501163233628372548806⟩⟩, + ⟨⟨-1,1⟩,⟨-6157692399285195872629653458357171992084481060,-6157692399285195872629653458357171992084481059⟩⟩, + ⟨⟨240362902280161700267060971870226008136219081,240362902280161700267060971870226008136219082⟩,⟨138773586334651070117198506979212358468039259,138773586334651070117198506979212358468039260⟩⟩, + ⟨⟨-5412491385713135883328061913015761822410033,-5412491385713135883328061913015761822410032⟩,⟨3124903358528009575988044625953396261961110,3124903358528009575988044625953396261961111⟩⟩, + ⟨⟨-1,1⟩,⟨-46979464716226164799725749651772857605626,-46979464716226164799725749651772857605625⟩⟩, + ⟨⟨41294032178597533289551253608823866442,41294032178597533289551253608823866443⟩,⟨23841120594238354308990818984629793258,23841120594238354308990818984629793259⟩⟩, + ⟨⟨-315048463276653543774042157049743,-315048463276653543774042157049742⟩,⟨181893315080553850624014427067793,181893315080553850624014427067794⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-315048463276653543774042157049743,-315048463276653543774042157049742⟩,⟨-181893315080553850624014427067794,-181893315080553850624014427067793⟩⟩, + ⟨⟨41294032178597533289551253608823866442,41294032178597533289551253608823866443⟩,⟨-23841120594238354308990818984629793259,-23841120594238354308990818984629793258⟩⟩, + ⟨⟨-1,1⟩,⟨46979464716226164799725749651772857605625,46979464716226164799725749651772857605626⟩⟩, + ⟨⟨-5412491385713135883328061913015761822410033,-5412491385713135883328061913015761822410032⟩,⟨-3124903358528009575988044625953396261961111,-3124903358528009575988044625953396261961110⟩⟩, + ⟨⟨240362902280161700267060971870226008136219081,240362902280161700267060971870226008136219082⟩,⟨-138773586334651070117198506979212358468039260,-138773586334651070117198506979212358468039259⟩⟩, + ⟨⟨-1,1⟩,⟨6157692399285195872629653458357171992084481059,6157692399285195872629653458357171992084481060⟩⟩, + ⟨⟨-73289885942927623097378698066649031056767091637,-73289885942927623097378698066649031056767091636⟩,⟨-42313935378026232495518171501163233628372548806,-42313935378026232495518171501163233628372548805⟩⟩, + ⟨⟨709426070908192146499575731062801933586927765213,709426070908192146499575731062801933586927765215⟩,⟨-409587333008983271143904985212963554847766717181,-409587333008983271143904985212963554847766717179⟩⟩, + ⟨⟨-1,1⟩,⟨6066935731106195667101445665327140070166203261129,6066935731106195667101445665327140070166203261131⟩⟩, + ⟨⟨-31504846327665354377404215704974263338430507506791,-31504846327665354377404215704974263338430507506779⟩,⟨-18189331508055385062401442706779322249122841856033,-18189331508055385062401442706779322249122841856022⟩⟩, + ⟨⟨159240309596453410763412875958956742715330816040255,159240309596453410763412875958956742715330816040308⟩,⟨-91937435611351723598124938437173705275817110936345,-91937435611351723598124938437173705275817110936296⟩⟩, + ⟨⟨-37,48⟩,⟨807101058159109193417313938093791247346497101480011,807101058159109193417313938093791247346497101480140⟩⟩, + ⟨⟨-2725300242104990645891483083860110005904783700116726,-2725300242104990645891483083860110005904783700115631⟩,⟨-1573452828401868617574058617485055405818642668115722,-1573452828401868617574058617485055405818642668114688⟩⟩, + ⟨⟨9606251930311409414619620712991821798672576235036686,9606251930311409414619620712991821798672576235041717⟩,⟨-5546172137868654345652557775000467358138046717070261,-5546172137868654345652557775000467358138046717065452⟩⟩, + ⟨⟨-4437,5025⟩,⟨35842487118702823486118888589304243168354040593113076,35842487118702823486118888589304243168354040593124477⟩⟩] +lemma tw0_0_5_15_calc (j : Fin 31) : taylorWaveBox 0 0 5 15 j = tw0_0_5_15 j := by + revert j + decide +kernel +def tw0_0_5_16 : Fin 31 → CI := ![⟨⟨-5213078436041832671603808611391339232834292828398160,-5213078436041832671603808611391339232834292828396485⟩,⟨-731,646⟩⟩, + ⟨⟨752880836463629239400889119305995645267760513402843,752880836463629239400889119305995645267760513403499⟩,⟨-1304027860799960862849215533060118013978806372190961,-1304027860799960862849215533060118013978806372190273⟩⟩, + ⟨⟨198336179025327457579483185284903528947814493302702,198336179025327457579483185284903528947814493302834⟩,⟨343528339050943845072305472237199115176168796571071,343528339050943845072305472237199115176168796571211⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820757,-93910472408044662737884323166159791981236131820740⟩,⟨-6,5⟩⟩, + ⟨⟨9805955849912282029441929384393160504743712313031,9805955849912282029441929384393160504743712313037⟩,⟨-16984413748825324592654220376240998369733585458024,-16984413748825324592654220376240998369733585458017⟩⟩, + ⟨⟨1763687353068399776689287081851485701692086888062,1763687353068399776689287081851485701692086888064⟩,⟨3054796104181137447455436429116450281772066996629,3054796104181137447455436429116450281772066996631⟩⟩, + ⟨⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩,⟨-1,1⟩⟩, + ⟨⟨31771766824307606597388745761546174328855855297,31771766824307606597388745761546174328855855298⟩,⟨-55030314385932053944842921204094027215178616755,-55030314385932053944842921204094027215178616754⟩⟩, + ⟨⟨2872012468199269254306370236610395985671083501,2872012468199269254306370236610395985671083502⟩,⟨4974471514892428828617918140640708976664758194,4974471514892428828617918140640708976664758195⟩⟩, + ⟨⟨-358240022308519984199082653679503601002640274,-358240022308519984199082653679503601002640273⟩,⟨-1,1⟩⟩, + ⟨⟨6727933323167418581730984046369498068588588,6727933323167418581730984046369498068588589⟩,⟨-11653122345661687650510545460191537024582165,-11653122345661687650510545460191537024582164⟩⟩, + ⟨⟨121199672028761316670947058721718499484466,121199672028761316670947058721718499484467⟩,⟨209923989814499107150432286087394818173136,209923989814499107150432286087394818173137⟩⟩, + ⟨⟨-1366577233537750183864908804624571231853,-1366577233537750183864908804624571231852⟩,⟨-1,1⟩⟩, + ⟨⟨462340057482762591060436472784875867,462340057482762591060436472784875868⟩,⟨-800796469934460095025757927274302743,-800796469934460095025757927274302742⟩⟩, + ⟨⟨1763687353068399776689287081851,1763687353068399776689287081852⟩,⟨3054796104181137447455436429116,3054796104181137447455436429117⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨1763687353068399776689287081851,1763687353068399776689287081852⟩,⟨-3054796104181137447455436429117,-3054796104181137447455436429116⟩⟩, + ⟨⟨462340057482762591060436472784875867,462340057482762591060436472784875868⟩,⟨800796469934460095025757927274302742,800796469934460095025757927274302743⟩⟩, + ⟨⟨-1366577233537750183864908804624571231853,-1366577233537750183864908804624571231852⟩,⟨-1,1⟩⟩, + ⟨⟨121199672028761316670947058721718499484466,121199672028761316670947058721718499484467⟩,⟨-209923989814499107150432286087394818173137,-209923989814499107150432286087394818173136⟩⟩, + ⟨⟨6727933323167418581730984046369498068588588,6727933323167418581730984046369498068588589⟩,⟨11653122345661687650510545460191537024582164,11653122345661687650510545460191537024582165⟩⟩, + ⟨⟨-358240022308519984199082653679503601002640274,-358240022308519984199082653679503601002640273⟩,⟨-1,1⟩⟩, + ⟨⟨2872012468199269254306370236610395985671083501,2872012468199269254306370236610395985671083502⟩,⟨-4974471514892428828617918140640708976664758195,-4974471514892428828617918140640708976664758194⟩⟩, + ⟨⟨31771766824307606597388745761546174328855855297,31771766824307606597388745761546174328855855298⟩,⟨55030314385932053944842921204094027215178616754,55030314385932053944842921204094027215178616755⟩⟩, + ⟨⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩,⟨-1,1⟩⟩, + ⟨⟨1763687353068399776689287081851485701692086888062,1763687353068399776689287081851485701692086888064⟩,⟨-3054796104181137447455436429116450281772066996631,-3054796104181137447455436429116450281772066996629⟩⟩, + ⟨⟨9805955849912282029441929384393160504743712313031,9805955849912282029441929384393160504743712313037⟩,⟨16984413748825324592654220376240998369733585458017,16984413748825324592654220376240998369733585458024⟩⟩, + ⟨⟨-93910472408044662737884323166159791981236131820757,-93910472408044662737884323166159791981236131820740⟩,⟨-5,6⟩⟩, + ⟨⟨198336179025327457579483185284903528947814493302702,198336179025327457579483185284903528947814493302834⟩,⟨-343528339050943845072305472237199115176168796571211,-343528339050943845072305472237199115176168796571071⟩⟩, + ⟨⟨752880836463629239400889119305995645267760513402843,752880836463629239400889119305995645267760513403499⟩,⟨1304027860799960862849215533060118013978806372190273,1304027860799960862849215533060118013978806372190961⟩⟩, + ⟨⟨-5213078436041832671603808611391339232834292828398160,-5213078436041832671603808611391339232834292828396485⟩,⟨-646,731⟩⟩] +lemma tw0_0_5_16_calc (j : Fin 31) : taylorWaveBox 0 0 5 16 j = tw0_0_5_16 j := by + revert j + decide +kernel +def tw0_0_5_17 : Fin 31 → CI := ![⟨⟨-101,89⟩,⟨718305654265631155040296995620893746968338935946391,718305654265631155040296995620893746968338935946625⟩⟩, + ⟨⟨-167702166274613999715611154977873639540279799889521,-167702166274613999715611154977873639540279799889432⟩,⟨-96822890842331772096638090773300798442111328282014,-96822890842331772096638090773300798442111328281929⟩⟩, + ⟨⟨41023214565527880946884693931043016479093855093011,41023214565527880946884693931043016479093855093029⟩,⟨-23684763972431298616294924909233065567246063593594,-23684763972431298616294924909233065567246063593578⟩⟩, + ⟨⟨-1,1⟩,⟨10351875446044213761413951999568920281416967239727,10351875446044213761413951999568920281416967239730⟩⟩, + ⟨⟨-1716196503062076943269737866497999890546326407204,-1716196503062076943269737866497999890546326407202⟩,⟨-990846513025184520836554933212195395783573297890,-990846513025184520836554933212195395783573297888⟩⟩, + ⟨⟨280611842079245089860737784477953169418664524191,280611842079245089860737784477953169418664524192⟩,⟨-162011322562248907032623508303956850016837254423,-162011322562248907032623508303956850016837254421⟩⟩, + ⟨⟨-1,1⟩,⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩⟩, + ⟨⟨-4044042839756277299780454902184832607088989106,-4044042839756277299780454902184832607088989105⟩,⟨-2334829222147665308663372415645089125416019200,-2334829222147665308663372415645089125416019199⟩⟩, + ⟨⟨319866497563579558783743200259921340065536117,319866497563579558783743200259921340065536118⟩,⟨-184675008473075432008052999064065548786375672,-184675008473075432008052999064065548786375671⟩⟩, + ⟨⟨-1,1⟩,⟨19744635479057719729259399413240280688127455,19744635479057719729259399413240280688127456⟩⟩, + ⟨⟨-535224613340845279427981919246584261739091,-535224613340845279427981919246584261739090⟩,⟨-309012074589250387253996864898599338563609,-309012074589250387253996864898599338563608⟩⟩, + ⟨⟨7713399581444315528450879864091553892305,7713399581444315528450879864091553892306⟩,⟨-4453333324714022271467919188776186228592,-4453333324714022271467919188776186228591⟩⟩, + ⟨⟨-1,1⟩,⟨37659903486361922701376723124008714081,37659903486361922701376723124008714082⟩⟩, + ⟨⟨-14712142146004324967290649154837712,-14712142146004324967290649154837711⟩,⟨-8494059228351635497032011392166493,-8494059228351635497032011392166492⟩⟩, + ⟨⟨28061184207924508986073778447,28061184207924508986073778448⟩,⟨-16201132256224890703262350831,-16201132256224890703262350830⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨28061184207924508986073778447,28061184207924508986073778448⟩,⟨16201132256224890703262350830,16201132256224890703262350831⟩⟩, + ⟨⟨-14712142146004324967290649154837712,-14712142146004324967290649154837711⟩,⟨8494059228351635497032011392166492,8494059228351635497032011392166493⟩⟩, + ⟨⟨-1,1⟩,⟨-37659903486361922701376723124008714082,-37659903486361922701376723124008714081⟩⟩, + ⟨⟨7713399581444315528450879864091553892305,7713399581444315528450879864091553892306⟩,⟨4453333324714022271467919188776186228591,4453333324714022271467919188776186228592⟩⟩, + ⟨⟨-535224613340845279427981919246584261739091,-535224613340845279427981919246584261739090⟩,⟨309012074589250387253996864898599338563608,309012074589250387253996864898599338563609⟩⟩, + ⟨⟨-1,1⟩,⟨-19744635479057719729259399413240280688127456,-19744635479057719729259399413240280688127455⟩⟩, + ⟨⟨319866497563579558783743200259921340065536117,319866497563579558783743200259921340065536118⟩,⟨184675008473075432008052999064065548786375671,184675008473075432008052999064065548786375672⟩⟩, + ⟨⟨-4044042839756277299780454902184832607088989106,-4044042839756277299780454902184832607088989105⟩,⟨2334829222147665308663372415645089125416019199,2334829222147665308663372415645089125416019200⟩⟩, + ⟨⟨-1,1⟩,⟨-43770654673137422771842713137763190948628970301,-43770654673137422771842713137763190948628970300⟩⟩, + ⟨⟨280611842079245089860737784477953169418664524191,280611842079245089860737784477953169418664524192⟩,⟨162011322562248907032623508303956850016837254421,162011322562248907032623508303956850016837254423⟩⟩, + ⟨⟨-1716196503062076943269737866497999890546326407204,-1716196503062076943269737866497999890546326407202⟩,⟨990846513025184520836554933212195395783573297888,990846513025184520836554933212195395783573297890⟩⟩, + ⟨⟨-1,1⟩,⟨-10351875446044213761413951999568920281416967239730,-10351875446044213761413951999568920281416967239727⟩⟩, + ⟨⟨41023214565527880946884693931043016479093855093011,41023214565527880946884693931043016479093855093029⟩,⟨23684763972431298616294924909233065567246063593578,23684763972431298616294924909233065567246063593594⟩⟩, + ⟨⟨-167702166274613999715611154977873639540279799889521,-167702166274613999715611154977873639540279799889432⟩,⟨96822890842331772096638090773300798442111328281929,96822890842331772096638090773300798442111328282014⟩⟩, + ⟨⟨-101,89⟩,⟨-718305654265631155040296995620893746968338935946625,-718305654265631155040296995620893746968338935946391⟩⟩] +lemma tw0_0_5_17_calc (j : Fin 31) : taylorWaveBox 0 0 5 17 j = tw0_0_5_17 j := by + revert j + decide +kernel +def tw0_0_5_18 : Fin 31 → CI := ![⟨⟨94025990269704865213243976230988259774946357332230,94025990269704865213243976230988259774946357332261⟩,⟨-12,14⟩⟩, + ⟨⟨-11829147655484287448229875198593946184433600759040,-11829147655484287448229875198593946184433600759028⟩,⟨20488684749533051553514964760834773719723597069517,20488684749533051553514964760834773719723597069529⟩⟩, + ⟨⟨-2686951240198274686206728883684009864112743700896,-2686951240198274686206728883684009864112743700893⟩,⟨-4653936065483618059616246420022053265359179054900,-4653936065483618059616246420022053265359179054897⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨-95114437188068927088960736169959615862693071711,-95114437188068927088960736169959615862693071710⟩,⟨164743037743054039538993548933512045507670678238,164743037743054039538993548933512045507670678239⟩⟩, + ⟨⟨-14138155021109096780349298634536472661272260807,-14138155021109096780349298634536472661272260806⟩,⟨-24488002821845988477325123417439892948896645686,-24488002821845988477325123417439892948896645685⟩⟩, + ⟨⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩,⟨-1,1⟩⟩, + ⟨⟨-163001829593019482288611425743212445035782851,-163001829593019482288611425743212445035782850⟩,⟨282327450581793915523610560326160169229411005,282327450581793915523610560326160169229411006⟩⟩, + ⟨⟨-11281154304012572715978503416627832588609315,-11281154304012572715978503416627832588609314⟩,⟨-19539532422574092439188923607668660850261304,-19539532422574092439188923607668660850261303⟩⟩, + ⟨⟨1033826696146935336097205616591605548782968,1033826696146935336097205616591605548782969⟩,⟨-1,1⟩⟩, + ⟨⟨-13483195325001808910702990183388207112572,-13483195325001808910702990183388207112571⟩,⟨23353579351278294064831851403655903767487,23353579351278294064831851403655903767488⟩⟩, + ⟨⟨-155450658410090906418429780715191311871,-155450658410090906418429780715191311870⟩,⟨-269248438436311641238794861150894326429,-269248438436311641238794861150894326428⟩⟩, + ⟨⟨985933967730460487458425156203847454,985933967730460487458425156203847455⟩,⟨-1,1⟩⟩, + ⟨⟨-148249300394144922655515461650078,-148249300394144922655515461650077⟩,⟨256775320469199792135996686125654,256775320469199792135996686125655⟩⟩, + ⟨⟨-141381550211090967803492987,-141381550211090967803492986⟩,⟨-244880028218459884773251235,-244880028218459884773251234⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-141381550211090967803492987,-141381550211090967803492986⟩,⟨244880028218459884773251234,244880028218459884773251235⟩⟩, + ⟨⟨-148249300394144922655515461650078,-148249300394144922655515461650077⟩,⟨-256775320469199792135996686125655,-256775320469199792135996686125654⟩⟩, + ⟨⟨985933967730460487458425156203847454,985933967730460487458425156203847455⟩,⟨-1,1⟩⟩, + ⟨⟨-155450658410090906418429780715191311871,-155450658410090906418429780715191311870⟩,⟨269248438436311641238794861150894326428,269248438436311641238794861150894326429⟩⟩, + ⟨⟨-13483195325001808910702990183388207112572,-13483195325001808910702990183388207112571⟩,⟨-23353579351278294064831851403655903767488,-23353579351278294064831851403655903767487⟩⟩, + ⟨⟨1033826696146935336097205616591605548782968,1033826696146935336097205616591605548782969⟩,⟨-1,1⟩⟩, + ⟨⟨-11281154304012572715978503416627832588609315,-11281154304012572715978503416627832588609314⟩,⟨19539532422574092439188923607668660850261303,19539532422574092439188923607668660850261304⟩⟩, + ⟨⟨-163001829593019482288611425743212445035782851,-163001829593019482288611425743212445035782850⟩,⟨-282327450581793915523610560326160169229411006,-282327450581793915523610560326160169229411005⟩⟩, + ⟨⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩,⟨-1,1⟩⟩, + ⟨⟨-14138155021109096780349298634536472661272260807,-14138155021109096780349298634536472661272260806⟩,⟨24488002821845988477325123417439892948896645685,24488002821845988477325123417439892948896645686⟩⟩, + ⟨⟨-95114437188068927088960736169959615862693071711,-95114437188068927088960736169959615862693071710⟩,⟨-164743037743054039538993548933512045507670678239,-164743037743054039538993548933512045507670678238⟩⟩, + ⟨⟨1084045861738968866983463476623159379920649587507,1084045861738968866983463476623159379920649587508⟩,⟨-1,1⟩⟩, + ⟨⟨-2686951240198274686206728883684009864112743700896,-2686951240198274686206728883684009864112743700893⟩,⟨4653936065483618059616246420022053265359179054897,4653936065483618059616246420022053265359179054900⟩⟩, + ⟨⟨-11829147655484287448229875198593946184433600759040,-11829147655484287448229875198593946184433600759028⟩,⟨-20488684749533051553514964760834773719723597069529,-20488684749533051553514964760834773719723597069517⟩⟩, + ⟨⟨94025990269704865213243976230988259774946357332230,94025990269704865213243976230988259774946357332261⟩,⟨-14,12⟩⟩] +lemma tw0_0_5_18_calc (j : Fin 31) : taylorWaveBox 0 0 5 18 j = tw0_0_5_18 j := by + revert j + decide +kernel +def tw0_0_5_19 : Fin 31 → CI := ![⟨⟨-2,2⟩,⟨-11721879376103578822742411985588648801078897483641,-11721879376103578822742411985588648801078897483636⟩⟩, + ⟨⟨2383966721883343247091115611608595323499347651338,2383966721883343247091115611608595323499347651340⟩,⟨1376383828618457922528887297180368994840894414762,1376383828618457922528887297180368994840894414764⟩⟩, + ⟨⟨-502830760838092535319858441641855074900146890107,-502830760838092535319858441641855074900146890105⟩,⟨290309475126697058156452518316157211737650650826,290309475126697058156452518316157211737650650828⟩⟩, + ⟨⟨-1,1⟩,⟨-108115254456938454468191636018970912331746451315,-108115254456938454468191636018970912331746451314⟩⟩, + ⟨⟨15061139386613996358639028247470074125390286659,15061139386613996358639028247470074125390286660⟩,⟨8695552879164065867390794616840105379972262220,8695552879164065867390794616840105379972262221⟩⟩, + ⟨⟨-2035220364185118618668416930612606764749862364,-2035220364185118618668416930612606764749862363⟩,⟨1175035025122486417788310258666568948096360566,1175035025122486417788310258666568948096360567⟩⟩, + ⟨⟨-1,1⟩,⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩⟩, + ⟨⟨18771594595862416126023613303049409549003581,18771594595862416126023613303049409549003582⟩,⟨10837785193039690213645887434211187158244312,10837785193039690213645887434211187158244313⟩⟩, + ⟨⟨-1136763916913673041863973432354257261037516,-1136763916913673041863973432354257261037515⟩,⟨656310953435162507309383057203468797131011,656310953435162507309383057203468797131012⟩⟩, + ⟨⟨-1,1⟩,⟨-51553370693654277071090524682507949987291,-51553370693654277071090524682507949987290⟩⟩, + ⟨⟨970468694775161084493835892969420797705,970468694775161084493835892969420797706⟩,⟨560300362168544014829783562978062128112,560300362168544014829783562978062128113⟩⟩, + ⟨⟨-8950993822032173216831022883915619636,-8950993822032173216831022883915619635⟩,⟨5167858692664952380011504857163995341,5167858692664952380011504857163995342⟩⟩, + ⟨⟨-1,1⟩,⟨-24582562777354372535271894780401207,-24582562777354372535271894780401206⟩⟩, + ⟨⟨4268166457191549881377707902868,4268166457191549881377707902869⟩,⟨2464227053005672636037590435583,2464227053005672636037590435584⟩⟩, + ⟨⟨-2035220364185118618668417,-2035220364185118618668416⟩,⟨1175035025122486417788310,1175035025122486417788311⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-2035220364185118618668417,-2035220364185118618668416⟩,⟨-1175035025122486417788311,-1175035025122486417788310⟩⟩, + ⟨⟨4268166457191549881377707902868,4268166457191549881377707902869⟩,⟨-2464227053005672636037590435584,-2464227053005672636037590435583⟩⟩, + ⟨⟨-1,1⟩,⟨24582562777354372535271894780401206,24582562777354372535271894780401207⟩⟩, + ⟨⟨-8950993822032173216831022883915619636,-8950993822032173216831022883915619635⟩,⟨-5167858692664952380011504857163995342,-5167858692664952380011504857163995341⟩⟩, + ⟨⟨970468694775161084493835892969420797705,970468694775161084493835892969420797706⟩,⟨-560300362168544014829783562978062128113,-560300362168544014829783562978062128112⟩⟩, + ⟨⟨-1,1⟩,⟨51553370693654277071090524682507949987290,51553370693654277071090524682507949987291⟩⟩, + ⟨⟨-1136763916913673041863973432354257261037516,-1136763916913673041863973432354257261037515⟩,⟨-656310953435162507309383057203468797131012,-656310953435162507309383057203468797131011⟩⟩, + ⟨⟨18771594595862416126023613303049409549003581,18771594595862416126023613303049409549003582⟩,⟨-10837785193039690213645887434211187158244313,-10837785193039690213645887434211187158244312⟩⟩, + ⟨⟨-1,1⟩,⟨257142289286047386615386595042048736916789537,257142289286047386615386595042048736916789538⟩⟩, + ⟨⟨-2035220364185118618668416930612606764749862364,-2035220364185118618668416930612606764749862363⟩,⟨-1175035025122486417788310258666568948096360567,-1175035025122486417788310258666568948096360566⟩⟩, + ⟨⟨15061139386613996358639028247470074125390286659,15061139386613996358639028247470074125390286660⟩,⟨-8695552879164065867390794616840105379972262221,-8695552879164065867390794616840105379972262220⟩⟩, + ⟨⟨-1,1⟩,⟨108115254456938454468191636018970912331746451314,108115254456938454468191636018970912331746451315⟩⟩, + ⟨⟨-502830760838092535319858441641855074900146890107,-502830760838092535319858441641855074900146890105⟩,⟨-290309475126697058156452518316157211737650650828,-290309475126697058156452518316157211737650650826⟩⟩, + ⟨⟨2383966721883343247091115611608595323499347651338,2383966721883343247091115611608595323499347651340⟩,⟨-1376383828618457922528887297180368994840894414764,-1376383828618457922528887297180368994840894414762⟩⟩, + ⟨⟨-2,2⟩,⟨11721879376103578822742411985588648801078897483636,11721879376103578822742411985588648801078897483641⟩⟩] +lemma tw0_0_5_19_calc (j : Fin 31) : taylorWaveBox 0 0 5 19 j = tw0_0_5_19 j := by + revert j + decide +kernel +def tw0_0_5_20 : Fin 31 → CI := ![⟨⟨-1394900383872451219493732966501238799900380114348,-1394900383872451219493732966501238799900380114347⟩,⟨-1,1⟩⟩, + ⟨⟨152870006421983752408001082033415428982916227794,152870006421983752408001082033415428982916227795⟩,⟨-264778618076256416414027925765950825976652416641,-264778618076256416414027925765950825976652416640⟩⟩, + ⟨⟨29940513854121272066113807617188080573704733326,29940513854121272066113807617188080573704733327⟩,⟨51858491200057908046132498479042853268060460317,51858491200057908046132498479042853268060460318⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨758830140113427900095231383132577951674044191,758830140113427900095231383132577951674044192⟩,⟨-1314332356991067102251040651990573570591805716,-1314332356991067102251040651990573570591805715⟩⟩, + ⟨⟨93219227339280340100759313342535193795873776,93219227339280340100759313342535193795873777⟩,⟨161460437993947277624244162850450867396967049,161460437993947277624244162850450867396967050⟩⟩, + ⟨⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩,⟨-1,1⟩⟩, + ⟨⟨687836491790661210895985532718593711422874,687836491790661210895985532718593711422875⟩,⟨-1191367751081358187235273848489393764024727,-1191367751081358187235273848489393764024726⟩⟩, + ⟨⟨36447049718376100637436171062806946988801,36447049718376100637436171062806946988802⟩,⟨63128141898216346839434606019485193723834,63128141898216346839434606019485193723835⟩⟩, + ⟨⟨-2453934706651145757933936954605520563839,-2453934706651145757933936954605520563838⟩,⟨-1,1⟩⟩, + ⟨⟨22225195727176747346105411849626348923,22225195727176747346105411849626348924⟩,⟨-38495168207632846265851059639561383104,-38495168207632846265851059639561383103⟩⟩, + ⟨⟨163992999026933005069729216746948650,163992999026933005069729216746948651⟩,⟨284044206400241419609850370523785058,284044206400241419609850370523785059⟩⟩, + ⟨⟨-585063625967775763972744215632802,-585063625967775763972744215632801⟩,⟨-1,1⟩⟩, + ⟨⟨39098977810605288760597519098,39098977810605288760597519099⟩,⟨-67721416091976504232847778923,-67721416091976504232847778922⟩⟩, + ⟨⟨9321922733928034010075,9321922733928034010076⟩,⟨16146043799394727762424,16146043799394727762425⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨9321922733928034010075,9321922733928034010076⟩,⟨-16146043799394727762425,-16146043799394727762424⟩⟩, + ⟨⟨39098977810605288760597519098,39098977810605288760597519099⟩,⟨67721416091976504232847778922,67721416091976504232847778923⟩⟩, + ⟨⟨-585063625967775763972744215632802,-585063625967775763972744215632801⟩,⟨-1,1⟩⟩, + ⟨⟨163992999026933005069729216746948650,163992999026933005069729216746948651⟩,⟨-284044206400241419609850370523785059,-284044206400241419609850370523785058⟩⟩, + ⟨⟨22225195727176747346105411849626348923,22225195727176747346105411849626348924⟩,⟨38495168207632846265851059639561383103,38495168207632846265851059639561383104⟩⟩, + ⟨⟨-2453934706651145757933936954605520563839,-2453934706651145757933936954605520563838⟩,⟨-1,1⟩⟩, + ⟨⟨36447049718376100637436171062806946988801,36447049718376100637436171062806946988802⟩,⟨-63128141898216346839434606019485193723835,-63128141898216346839434606019485193723834⟩⟩, + ⟨⟨687836491790661210895985532718593711422874,687836491790661210895985532718593711422875⟩,⟨1191367751081358187235273848489393764024726,1191367751081358187235273848489393764024727⟩⟩, + ⟨⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩,⟨-1,1⟩⟩, + ⟨⟨93219227339280340100759313342535193795873776,93219227339280340100759313342535193795873777⟩,⟨-161460437993947277624244162850450867396967050,-161460437993947277624244162850450867396967049⟩⟩, + ⟨⟨758830140113427900095231383132577951674044191,758830140113427900095231383132577951674044192⟩,⟨1314332356991067102251040651990573570591805715,1314332356991067102251040651990573570591805716⟩⟩, + ⟨⟨-10292548155845727257085343504449753322989359089,-10292548155845727257085343504449753322989359088⟩,⟨-1,1⟩⟩, + ⟨⟨29940513854121272066113807617188080573704733326,29940513854121272066113807617188080573704733327⟩,⟨-51858491200057908046132498479042853268060460318,-51858491200057908046132498479042853268060460317⟩⟩, + ⟨⟨152870006421983752408001082033415428982916227794,152870006421983752408001082033415428982916227795⟩,⟨264778618076256416414027925765950825976652416640,264778618076256416414027925765950825976652416641⟩⟩, + ⟨⟨-1394900383872451219493732966501238799900380114348,-1394900383872451219493732966501238799900380114347⟩,⟨-1,1⟩⟩] +lemma tw0_0_5_20_calc (j : Fin 31) : taylorWaveBox 0 0 5 20 j = tw0_0_5_20 j := by + revert j + decide +kernel +def tw0_0_5 : Fin 21 → Fin 31 → CI := ![tw0_0_5_0,tw0_0_5_1,tw0_0_5_2,tw0_0_5_3,tw0_0_5_4,tw0_0_5_5,tw0_0_5_6,tw0_0_5_7,tw0_0_5_8,tw0_0_5_9,tw0_0_5_10,tw0_0_5_11,tw0_0_5_12,tw0_0_5_13,tw0_0_5_14,tw0_0_5_15,tw0_0_5_16,tw0_0_5_17,tw0_0_5_18,tw0_0_5_19,tw0_0_5_20] +lemma tw0_0_5_mem (l : Fin 21) (j : Fin 31) : (tw0_0_5 l j).Mem (taylorWave 0 0 (nearNode 5) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 5 l j = tw0_0_5 l j := by + fin_cases l + · exact tw0_0_5_0_calc j + · exact tw0_0_5_1_calc j + · exact tw0_0_5_2_calc j + · exact tw0_0_5_3_calc j + · exact tw0_0_5_4_calc j + · exact tw0_0_5_5_calc j + · exact tw0_0_5_6_calc j + · exact tw0_0_5_7_calc j + · exact tw0_0_5_8_calc j + · exact tw0_0_5_9_calc j + · exact tw0_0_5_10_calc j + · exact tw0_0_5_11_calc j + · exact tw0_0_5_12_calc j + · exact tw0_0_5_13_calc j + · exact tw0_0_5_14_calc j + · exact tw0_0_5_15_calc j + · exact tw0_0_5_16_calc j + · exact tw0_0_5_17_calc j + · exact tw0_0_5_18_calc j + · exact tw0_0_5_19_calc j + · exact tw0_0_5_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 5 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave006.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave006.lean new file mode 100644 index 0000000000000000000000000000000000000000..52bd93645f1015935fece14b792f112529216ec5 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave006.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_0_6_0 : Fin 31 → CI := ![⟨⟨2967822269668779360198432786705442237105162346591906386534514,2967822269668779360198432786705442237105162346593640937822580⟩,⟨1713472986300235871325432465256276238769739480422910845438401,1713472986300235871325432465256276238769739480424636899783040⟩⟩, + ⟨⟨-2805218067056851604552566199642249397433528582837439732577870,-2805218067056851604552566199642249397433528582836410977815415⟩,⟨1021015877034465643367429066510442324816671143543077459708905,1021015877034465643367429066510442324816671143544095312022341⟩⟩, + ⟨⟨880365730708289253719875062450330371908252159483509474218203,880365730708289253719875062450330371908252159484589391048710⟩,⟨-2418784965982693475353998406834388511052379237242573690475595,-2418784965982693475353998406834388511052379237241483683454505⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267470851300023175,1096622711232150957648276777764016792812633267471518441661042⟩,⟨1899406252588018790526996983491483031747303901819056791263172,1899406252588018790526996983491483031747303901819728608020678⟩⟩, + ⟨⟨-1814937060086576386326731215747781185198830442285380722221617,-1814937060086576386326731215747781185198830442285146634687227⟩,⟨-320022371980963888866240927524319150290063779637073057803954,-320022371980963888866240927524319150290063779636848817581640⟩⟩, + ⟨⟨1166752408524245749422656807058296608334476546274177874758519,1166752408524245749422656807058296608334476546274534348839294⟩,⟨-979021515667897743601705183162428702125795067967514980105280,-979021515667897743601705183162428702125795067967159325069272⟩⟩, + ⟨⟨-157614796759,144447903207⟩,⟨1233700550136169827354311374984518891914212425904943225169166,1233700550136169827354311374984518891914212425905253141850759⟩⟩, + ⟨⟨-746721541455517279630500356517309829334064989615670463359884,-746721541455517279630500356517309829334064989615491985301859⟩,⟨-626573770027454555905091317223954369360508843499192479817634,-626573770027454555905091317223954369360508843499015014531239⟩⟩, + ⟨⟨734974511935886305206692806377200645245807369189844690079598,734974511935886305206692806377200645245807369189958410803712⟩,⟨-129595836587332483921039714451997011274488638034849487568403,-129595836587332483921039714451997011274488638034739550531151⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867832310395702,-274155677808037739412069194441004198203158316867770260903868⟩,⟨474851563147004697631749245872870757936825975454813510993989,474851563147004697631749245872870757936825975454876986875189⟩⟩, + ⟨⟨-130231616968681842266253707463066623063350911166293144951651,-130231616968681842266253707463066623063350911166258221236720⟩,⟨-357808426920516786294970178525797117019582727402686502381369,-357808426920516786294970178525797117019582727402650208514374⟩⟩, + ⟨⟨228997393229130743228780914256510154892532945537698096202124,228997393229130743228780914256510154892532945537716509221538⟩,⟨83348234859956379050402372776362638760544583146408942214545,83348234859956379050402372776362638760544583146426376162437⟩⟩, + ⟨⟨-118712890786751174407937311468217689484206493863714805562997,-118712890786751174407937311468217689484206493863708550398849⟩,⟨68538919452009434853017298610251049550789579216946694652875,68538919452009434853017298610251049550789579216952681186061⟩⟩, + ⟨⟨10579251966312855830288956281795674389754174533451988949493,10579251966312855830288956281795674389754174533453878989386⟩,⟨-59997919341705004506668800520587807775167948505299135614536,-59997919341705004506668800520587807775167948505296922977204⟩⟩, + ⟨⟨9790215156678977436017051831624287021257950679673319560873,9790215156678977436017051831624287021257950679673548014520⟩,⟨11667524085242457494226568070582966083344765462743392722313,11667524085242457494226568070582966083344765462743625025909⟩⟩, + ⟨⟨-2,2⟩,⟨-2,3⟩⟩, + ⟨⟨9790215156678977436017051831624287021257950679673319560935,9790215156678977436017051831624287021257950679673548014580⟩,⟨-11667524085242457494226568070582966083344765462743625025859,-11667524085242457494226568070582966083344765462743392722265⟩⟩, + ⟨⟨10579251966312855830288956281795674389754174533451988949153,10579251966312855830288956281795674389754174533453878989169⟩,⟨59997919341705004506668800520587807775167948505296922977198,59997919341705004506668800520587807775167948505299135614654⟩⟩, + ⟨⟨-118712890786751174407937311468217689484206493863714805562521,-118712890786751174407937311468217689484206493863708550398494⟩,⟨-68538919452009434853017298610251049550789579216952681186726,-68538919452009434853017298610251049550789579216946694653659⟩⟩, + ⟨⟨228997393229130743228780914256510154892532945537698096202811,228997393229130743228780914256510154892532945537716509221609⟩,⟨-83348234859956379050402372776362638760544583146426376161051,-83348234859956379050402372776362638760544583146408942213773⟩⟩, + ⟨⟨-130231616968681842266253707463066623063350911166293144953067,-130231616968681842266253707463066623063350911166258221239308⟩,⟨357808426920516786294970178525797117019582727402650208514217,357808426920516786294970178525797117019582727402686502380043⟩⟩, + ⟨⟨-274155677808037739412069194441004198203158316867832310395180,-274155677808037739412069194441004198203158316867770260899134⟩,⟨-474851563147004697631749245872870757936825975454876986878900,-474851563147004697631749245872870757936825975454813510993479⟩⟩, + ⟨⟨734974511935886305206692806377200645245807369189844690078881,734974511935886305206692806377200645245807369189958410803201⟩,⟨129595836587332483921039714451997011274488638034739550534967,129595836587332483921039714451997011274488638034849487572424⟩⟩, + ⟨⟨-746721541455517279630500356517309829334064989615670463368640,-746721541455517279630500356517309829334064989615491985300293⟩,⟨626573770027454555905091317223954369360508843499015014522135,626573770027454555905091317223954369360508843499192479818832⟩⟩, + ⟨⟨-157614787328,144447909978⟩,⟨-1233700550136169827354311374984518891914212425905253141849788,-1233700550136169827354311374984518891914212425904943225170855⟩⟩, + ⟨⟨1166752408524245749422656807058296608334476546274177874753908,1166752408524245749422656807058296608334476546274534348835599⟩,⟨979021515667897743601705183162428702125795067967159325073463,979021515667897743601705183162428702125795067967514980110382⟩⟩, + ⟨⟨-1814937060086576386326731215747781185198830442285380722230516,-1814937060086576386326731215747781185198830442285146634682365⟩,⟨320022371980963888866240927524319150290063779636848817563679,320022371980963888866240927524319150290063779637073057799720⟩⟩, + ⟨⟨1096622711232150957648276777764016792812633267470851300024789,1096622711232150957648276777764016792812633267471518441679417⟩,⟨-1899406252588018790526996983491483031747303901819728608023857,-1899406252588018790526996983491483031747303901819056791249603⟩⟩, + ⟨⟨880365730708289253719875062450330371908252159483509474204637,880365730708289253719875062450330371908252159484589391033538⟩,⟨2418784965982693475353998406834388511052379237241483683461238,2418784965982693475353998406834388511052379237242573690480722⟩⟩, + ⟨⟨-2805218067056851604552566199642249397433528582837439732570462,-2805218067056851604552566199642249397433528582836410977813677⟩,⟨-1021015877034465643367429066510442324816671143544095312034420,-1021015877034465643367429066510442324816671143543077459726669⟩⟩, + ⟨⟨2967822269668779360198432786705442237105162346591906386518707,2967822269668779360198432786705442237105162346593640937856542⟩,⟨-1713472986300235871325432465256276238769739480424636899790088,-1713472986300235871325432465256276238769739480422910845395704⟩⟩] +lemma tw0_0_6_0_calc (j : Fin 31) : taylorWaveBox 0 0 6 0 j = tw0_0_6_0 j := by + revert j + decide +kernel +def tw0_0_6_1 : Fin 31 → CI := ![⟨⟨1495287262745940401980917971985985493934475721733694767950095,1495287262745940401980917971985985493934475721735205794166409⟩,⟨-2589913510986562080301927490833042405511561092142324543898820,-2589913510986562080301927490833042405511561092140802618396985⟩⟩, + ⟨⟨831604142571485876864954382514006692780990181973997028545706,831604142571485876864954382514006692780990181974828703085115⟩,⟨2284813603640079810287365325290637518877610451529297237411459,2284813603640079810287365325290637518877610451530142417563070⟩⟩, + ⟨⟨-1829349667345938536152092426991082590734005161083055486115844,-1829349667345938536152092426991082590734005161082225280621517⟩,⟨-665828826978700609137137309906440489810435652259106748424590,-665828826978700609137137309906440489810435652258287877837530⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176256191102340,1326035717625119785114586875306517711621919279176729428580674⟩,⟨-765587078525921485814230001656824572894451569528251410205089,-765587078525921485814230001656824572894451569527783220539404⟩⟩, + ⟨⟨-204799615940695160055334154926559998303094145660501344396374,-204799615940695160055334154926559998303094145660357189058466⟩,⟨1161476338549153718153675456564269412794024076664898135248993,1161476338549153718153675456564269412794024076665051637610819⟩⟩, + ⟨⟨-569571629875668927686068468677568861565128954029909241171891,-569571629875668927686068468677568861565128954029700516456423⟩,⟨-678789036144068092640796592700680427888676496357942848423668,-678789036144068092640796592700680427888676496357733299557468⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789190406461686,645964097506246253655756563897945733379693511789354734624292⟩,⟨-75632745259,82526914602⟩⟩, + ⟨⟨-291620674496342490975267055962915257121346024463305569311351,-291620674496342490975267055962915257121346024463222044959093⟩,⟨347539986505762863432087855462748379079002366135167894652319,347539986505762863432087855462748379079002366135252068366595⟩⟩, + ⟨⟨-52777061057594620510127434364996303093885268190498041797874,-52777061057594620510127434364996303093885268190453102660302⟩,⟨-299313586868790176804440782570656956114463003979052284346261,-299313586868790176804440782570656956114463003979005019576704⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897049237434274,165754464703139973139323359413314713952739909897071922309576⟩,⟨95698384815740185726778750207103071611806446190992951478029,95698384815740185726778750207103071611806446191014915454086⟩⟩, + ⟨⟨-104082252352408883486122691567539974438666656866337231451313,-104082252352408883486122691567539974438666656866326342689256⟩,⟨37882841771660253137069714946884415669687963829004748121477,37882841771660253137069714946884415669687963829015027603186⟩⟩, + ⟨⟨19396014987090049606179694052804820822880237480451287558071,19396014987090049606179694052804820822880237480455406361404⟩,⟨-53290113204433348344894818082580466912597328315563998742132,-53290113204433348344894818082580466912597328315559544210244⟩⟩, + ⟨⟨11962298101967523215847343775887883951475805773874839655711,11962298101967523215847343775887883951475805773875922580039⟩,⟨20719308087892496642415419926664339244092488737132057477081,20719308087892496642415419926664339244092488737133215160785⟩⟩, + ⟨⟨-6981074912391607622261009506021153495381061317295262176695,-6981074912391607622261009506021153495381061317294982503198⟩,⟨-1230951861401623801985479518717114940965254068582669805674,-1230951861401623801985479518717114940965254068582445971303⟩⟩, + ⟨⟨678789036144068092640796592700680427888676496357827196800,678789036144068092640796592700680427888676496357842872330⟩,⟨-569571629875668927686068468677568861565128954029816053010,-569571629875668927686068468677568861565128954029800949111⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨678789036144068092640796592700680427888676496357827196797,678789036144068092640796592700680427888676496357842872327⟩,⟨569571629875668927686068468677568861565128954029800949114,569571629875668927686068468677568861565128954029816053013⟩⟩, + ⟨⟨-6981074912391607622261009506021153495381061317295262176709,-6981074912391607622261009506021153495381061317294982503197⟩,⟨1230951861401623801985479518717114940965254068582445971264,1230951861401623801985479518717114940965254068582669805649⟩⟩, + ⟨⟨11962298101967523215847343775887883951475805773874839655848,11962298101967523215847343775887883951475805773875922580155⟩,⟨-20719308087892496642415419926664339244092488737133215160702,-20719308087892496642415419926664339244092488737132057477018⟩⟩, + ⟨⟨19396014987090049606179694052804820822880237480451287557891,19396014987090049606179694052804820822880237480455406361082⟩,⟨53290113204433348344894818082580466912597328315559544210404,53290113204433348344894818082580466912597328315563998742148⟩⟩, + ⟨⟨-104082252352408883486122691567539974438666656866337231450927,-104082252352408883486122691567539974438666656866326342689210⟩,⟨-37882841771660253137069714946884415669687963829015027603598,-37882841771660253137069714946884415669687963829004748122230⟩⟩, + ⟨⟨165754464703139973139323359413314713952739909897049237434097,165754464703139973139323359413314713952739909897071922310872⟩,⟨-95698384815740185726778750207103071611806446191014915453904,-95698384815740185726778750207103071611806446190992951476377⟩⟩, + ⟨⟨-52777061057594620510127434364996303093885268190498041799512,-52777061057594620510127434364996303093885268190453102661856⟩,⟨299313586868790176804440782570656956114463003979005019576413,299313586868790176804440782570656956114463003979052284346054⟩⟩, + ⟨⟨-291620674496342490975267055962915257121346024463305569311908,-291620674496342490975267055962915257121346024463222044954856⟩,⟨-347539986505762863432087855462748379079002366135252068370670,-347539986505762863432087855462748379079002366135167894651590⟩⟩, + ⟨⟨645964097506246253655756563897945733379693511789190406462573,645964097506246253655756563897945733379693511789354734623786⟩,⟨-82526909664,75632748805⟩⟩, + ⟨⟨-569571629875668927686068468677568861565128954029909241174860,-569571629875668927686068468677568861565128954029700516458861⟩,⟨678789036144068092640796592700680427888676496357733299554786,678789036144068092640796592700680427888676496357942848421519⟩⟩, + ⟨⟨-204799615940695160055334154926559998303094145660501344393664,-204799615940695160055334154926559998303094145660357189046972⟩,⟨-1161476338549153718153675456564269412794024076665051637616514,-1161476338549153718153675456564269412794024076664898135245882⟩⟩, + ⟨⟨1326035717625119785114586875306517711621919279176256191092868,1326035717625119785114586875306517711621919279176729428582894⟩,⟨765587078525921485814230001656824572894451569527783220540531,765587078525921485814230001656824572894451569528251410217918⟩⟩, + ⟨⟨-1829349667345938536152092426991082590734005161083055486119722,-1829349667345938536152092426991082590734005161082225280626609⟩,⟨665828826978700609137137309906440489810435652258287877827271,665828826978700609137137309906440489810435652259106748413116⟩⟩, + ⟨⟨831604142571485876864954382514006692780990181973997028560175,831604142571485876864954382514006692780990181974828703094954⟩,⟨-2284813603640079810287365325290637518877610451530142417557037,-2284813603640079810287365325290637518877610451529297237410044⟩⟩, + ⟨⟨1495287262745940401980917971985985493934475721733694767912835,1495287262745940401980917971985985493934475721735205794172560⟩,⟨2589913510986562080301927490833042405511561092140802618383191,2589913510986562080301927490833042405511561092142324543928458⟩⟩] +lemma tw0_0_6_1_calc (j : Fin 31) : taylorWaveBox 0 0 6 1 j = tw0_0_6_1 j := by + revert j + decide +kernel +def tw0_0_6_2 : Fin 31 → CI := ![⟨⟨-1695094429072569102122468916644420780784284438590997256477939,-1695094429072569102122468916644420780784284438589995762913141⟩,⟨-978663224926882768659580888799522481530988635633039487014198,-978663224926882768659580888799522481530988635632047407486442⟩⟩, + ⟨⟨1395713206225663189454101143002566310611963759676258120086460,1395713206225663189454101143002566310611963759676778853954218⟩,⟨-507998062638387039136909131110969358880879790394337632584412,-507998062638387039136909131110969358880879790393827974510730⟩⟩, + ⟨⟨-377679421777774162452864996190660033813952720050369172404333,-377679421777774162452864996190660033813952720049903480606901⟩,⟨1037665683127112826790883557509795303971998566745931470624584,1037665683127112826790883557509795303971998566746405692745729⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155201890518721,-400860456930051182042964332052284408435092945154955471004551⟩,⟨-694310678148124304229363268257554751809242906046798786063588,-694310678148124304229363268257554751809242906046548789439831⟩⟩, + ⟨⟨557468623021504469524006156016413096457963951953120943956527,557468623021504469524006156016413096457963951953196394278914⟩,⟨98296759137087351387565494698804152877234753133314153260510,98296759137087351387565494698804152877234753133383655744039⟩⟩, + ⟨⟨-296177590178819576837832799272460400665228207586932775970796,-296177590178819576837832799272460400665228207586840400266767⟩,⟨248522506682023097611077479415842414781309072362152642150350,248522506682023097611077479415842414781309072362244506559941⟩⟩, + ⟨⟨-29700909611,32408243581⟩,⟨-253669507901048013636563366376836227212832254355984023314970,-253669507901048013636563366376836227212832254355918684341294⟩⟩, + ⟨⟨121314340937244498672776314581999780112477473827572775907727,121314340937244498672776314581999780112477473827602544232425⟩,⟨101794818736956660781497335568729053094424196039543091043755,101794818736956660781497335568729053094424196039572570565779⟩⟩, + ⟨⟨-91420132769252935682476523502179348719047295173802629184758,-91420132769252935682476523502179348719047295173787901983079⟩,⟨16119835987169368942117666332342652213526442338163757844518,16119835987169368942117666332342652213526442338177535034040⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072189965730306,25053778558128198877685270753267775527193309072195795634447⟩,⟨-43394417384257769014335204266097171988077681627919882851108,-43394417384257769014335204266097171988077681627913805835920⟩⟩, + ⟨⟨8264753986593916583209293183682732437019727951797762009775,8264753986593916583209293183682732437019727951800030952321⟩,⟨22707224955514355825927041190561327158800430804815059923497,22707224955514355825927041190561327158800430804817507762207⟩⟩, + ⟨⟨-9300879341778680146299716071653919604244656457653135331262,-9300879341778680146299716071653919604244656457652328263162⟩,⟨-3385243232908868232482526488036447206203280569057242452482,-3385243232908868232482526488036447206203280569056512810123⟩⟩, + ⟨⟨2712151086516110563395950266631073249254855101744731040700,2712151086516110563395950266631073249254855101744891214188⟩,⟨-1565861159883012429855329422079235970449581817012113939051,-1565861159883012429855329422079235970449581817011967200296⟩⟩, + ⟨⟨-107420814575056186203199775642433334200925896464290715848,-107420814575056186203199775642433334200925896464270840682⟩,⟨609213712748041220707881872567625814037799551345560701986,609213712748041220707881872567625814037799551345587047292⟩⟩, + ⟨⟨-24852250668202309761107747941584241478130907236220384556,-24852250668202309761107747941584241478130907236219646416⟩,⟨-29617759017881957683783279927246040066522820758688915318,-29617759017881957683783279927246040066522820758688137066⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-24852250668202309761107747941584241478130907236220384556,-24852250668202309761107747941584241478130907236219646416⟩,⟨29617759017881957683783279927246040066522820758688137066,29617759017881957683783279927246040066522820758688915318⟩⟩, + ⟨⟨-107420814575056186203199775642433334200925896464290715846,-107420814575056186203199775642433334200925896464270840679⟩,⟨-609213712748041220707881872567625814037799551345587047293,-609213712748041220707881872567625814037799551345560701986⟩⟩, + ⟨⟨2712151086516110563395950266631073249254855101744731040692,2712151086516110563395950266631073249254855101744891214177⟩,⟨1565861159883012429855329422079235970449581817011967200314,1565861159883012429855329422079235970449581817012113939067⟩⟩, + ⟨⟨-9300879341778680146299716071653919604244656457653135331265,-9300879341778680146299716071653919604244656457652328263190⟩,⟨3385243232908868232482526488036447206203280569056512810092,3385243232908868232482526488036447206203280569057242452426⟩⟩, + ⟨⟨8264753986593916583209293183682732437019727951797762009939,8264753986593916583209293183682732437019727951800030952411⟩,⟨-22707224955514355825927041190561327158800430804817507762123,-22707224955514355825927041190561327158800430804815059923487⟩⟩, + ⟨⟨25053778558128198877685270753267775527193309072189965729873,25053778558128198877685270753267775527193309072195795634399⟩,⟨43394417384257769014335204266097171988077681627913805835873,43394417384257769014335204266097171988077681627919882851447⟩⟩, + ⟨⟨-91420132769252935682476523502179348719047295173802629184694,-91420132769252935682476523502179348719047295173787901982990⟩,⟨-16119835987169368942117666332342652213526442338177535034540,-16119835987169368942117666332342652213526442338163757844993⟩⟩, + ⟨⟨121314340937244498672776314581999780112477473827572775907473,121314340937244498672776314581999780112477473827602544233847⟩,⟨-101794818736956660781497335568729053094424196039572570565973,-101794818736956660781497335568729053094424196039543091042276⟩⟩, + ⟨⟨-29700911003,32408241642⟩,⟨253669507901048013636563366376836227212832254355918684341643,253669507901048013636563366376836227212832254355984023314772⟩⟩, + ⟨⟨-296177590178819576837832799272460400665228207586932775969858,-296177590178819576837832799272460400665228207586840400265597⟩,⟨-248522506682023097611077479415842414781309072362244506561237,-248522506682023097611077479415842414781309072362152642151414⟩⟩, + ⟨⟨557468623021504469524006156016413096457963951953120943955034,557468623021504469524006156016413096457963951953196394281648⟩,⟨-98296759137087351387565494698804152877234753133383655742738,-98296759137087351387565494698804152877234753133314153254993⟩⟩, + ⟨⟨-400860456930051182042964332052284408435092945155201890525438,-400860456930051182042964332052284408435092945154955471005142⟩,⟨694310678148124304229363268257554751809242906046548789434872,694310678148124304229363268257554751809242906046798786064751⟩⟩, + ⟨⟨-377679421777774162452864996190660033813952720050369172397824,-377679421777774162452864996190660033813952720049903480601081⟩,⟨-1037665683127112826790883557509795303971998566746405692747929,-1037665683127112826790883557509795303971998566745931470627474⟩⟩, + ⟨⟨1395713206225663189454101143002566310611963759676258120085596,1395713206225663189454101143002566310611963759676778853950534⟩,⟨507998062638387039136909131110969358880879790393827974519569,507998062638387039136909131110969358880879790394337632590423⟩⟩, + ⟨⟨-1695094429072569102122468916644420780784284438590997256497338,-1695094429072569102122468916644420780784284438589995762904114⟩,⟨978663224926882768659580888799522481530988635632047407462056,978663224926882768659580888799522481530988635633039487018224⟩⟩] +lemma tw0_0_6_2_calc (j : Fin 31) : taylorWaveBox 0 0 6 2 j = tw0_0_6_2 j := by + revert j + decide +kernel +def tw0_0_6_3 : Fin 31 → CI := ![⟨⟨-512426866294798386834526424192888519295985354623860843374519,-512426866294798386834526424192888519295985354623339760643109⟩,⟨887549367585894654647575190685819342845674226129228097619107,887549367585894654647575190685819342845674226129755303580791⟩⟩, + ⟨⟨-248254686030182897398539149181012699002035058452408694451079,-248254686030182897398539149181012699002035058452158838311403⟩,⟨-682074144141724374118783345292933523373384203192313046981510,-682074144141724374118783345292933523373384203192056397297542⟩⟩, + ⟨⟨470877750343631500341534451091526534133608654421848215734834,470877750343631500341534451091526534133608654422064909757662⟩,⟨171385485103313906638223278092583722650091113371420532405629,171385485103313906638223278092583722650091113371632402176858⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418167350602842,-290832176770545960434917438483929282263670530418061706514386⟩,⟨167912035547479535397937618679525710002908481003004813802049,167912035547479535397937618679525710002908481003108568247383⟩⟩, + ⟨⟨37743246001603878613808369239580034605654635355083575736665,37743246001603878613808369239580034605654635355110382915020⟩,⟨-214052584862254884408232017727498466897016276635645861830424,-214052584862254884408232017727498466897016276635616209635842⟩⟩, + ⟨⟨86750720138218229408678577021096749100527899247716452271259,86750720138218229408678577021096749100527899247748795135635⟩,⟨103385482384856453208659121583295522468139603011980690921955,103385482384856453208659121583295522468139603012013265211851⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351071481585255,-79692626246167045120505549490478022520911642351050701071777⟩,⟨-10181349995,9330815945⟩⟩, + ⟨⟨28426475974891349412635796118272982745260982025493226337334,28426475974891349412635796118272982745260982025501549057158⟩,⟨-33877354867869762587413420960414276802359985114975076746038,-33877354867869762587413420960414276802359985114966656026607⟩⟩, + ⟨⟨3938818980006062600432640975899694144198033271527680330120,3938818980006062600432640975899694144198033271531059270235⟩,⟨22338152472073553360420956851842377465139319603198751254485,22338152472073553360420956851842377465139319603202420893259⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566673863572,-9088505524079561263591169952622790070739704075565372166875⟩,⟨-5247251110858735481185550583735178437590890031346237450637,-5247251110858735481185550583735178437590890031344999735849⟩⟩, + ⟨⟨3963158394647484435654039154147857404172788189027367387029,3963158394647484435654039154147857404172788189027807230605⟩,⟨-1442471689333911380619747057012451442072796226392845744168,-1442471689333911380619747057012451442072796226392445147458⟩⟩, + ⟨⟨-472669123160936081201478715641840088538413867464400680634,-472669123160936081201478715641840088538413867464297298789⟩,⟨1298647742758087699875115550031169914199339233780498876183,1298647742758087699875115550031169914199339233780615697874⟩⟩, + ⟨⟨-163976597214335483787048455741724326174715313479557009633,-163976597214335483787048455741724326174715313479541121232⟩,⟨-284015797627486289487224061019462189710615752361447932951,-284015797627486289487224061019462189710615752361430255571⟩⟩, + ⟨⟨42531140543009085948323354510558462478994361117534449214,42531140543009085948323354510558462478994361117536423846⟩,⟨7499387598036175594326442031819492628924678091802926594,7499387598036175594326442031819492628924678091804338014⟩⟩, + ⟨⟨-1033854823848564532086591215832955224681396030119980380,-1033854823848564532086591215832955224681396030119949922⟩,⟨867507201382182294086785770210967491005278992477317490,867507201382182294086785770210967491005278992477346018⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1033854823848564532086591215832955224681396030119980380,-1033854823848564532086591215832955224681396030119949922⟩,⟨-867507201382182294086785770210967491005278992477346018,-867507201382182294086785770210967491005278992477317490⟩⟩, + ⟨⟨42531140543009085948323354510558462478994361117534449214,42531140543009085948323354510558462478994361117536423846⟩,⟨-7499387598036175594326442031819492628924678091804338014,-7499387598036175594326442031819492628924678091802926594⟩⟩, + ⟨⟨-163976597214335483787048455741724326174715313479557009635,-163976597214335483787048455741724326174715313479541121234⟩,⟨284015797627486289487224061019462189710615752361430255571,284015797627486289487224061019462189710615752361447932950⟩⟩, + ⟨⟨-472669123160936081201478715641840088538413867464400680626,-472669123160936081201478715641840088538413867464297298784⟩,⟨-1298647742758087699875115550031169914199339233780615697874,-1298647742758087699875115550031169914199339233780498876187⟩⟩, + ⟨⟨3963158394647484435654039154147857404172788189027367387027,3963158394647484435654039154147857404172788189027807230591⟩,⟨1442471689333911380619747057012451442072796226392445147486,1442471689333911380619747057012451442072796226392845744184⟩⟩, + ⟨⟨-9088505524079561263591169952622790070739704075566673863643,-9088505524079561263591169952622790070739704075565372166865⟩,⟨5247251110858735481185550583735178437590890031344999735758,5247251110858735481185550583735178437590890031346237450627⟩⟩, + ⟨⟨3938818980006062600432640975899694144198033271527680330236,3938818980006062600432640975899694144198033271531059270357⟩,⟨-22338152472073553360420956851842377465139319603202420893243,-22338152472073553360420956851842377465139319603198751254464⟩⟩, + ⟨⟨28426475974891349412635796118272982745260982025493226336921,28426475974891349412635796118272982745260982025501549057212⟩,⟨33877354867869762587413420960414276802359985114966656026536,33877354867869762587413420960414276802359985114975076746436⟩⟩, + ⟨⟨-79692626246167045120505549490478022520911642351071481585193,-79692626246167045120505549490478022520911642351050701071887⟩,⟨-9330816382,10181349386⟩⟩, + ⟨⟨86750720138218229408678577021096749100527899247716452271631,86750720138218229408678577021096749100527899247748795136087⟩,⟨-103385482384856453208659121583295522468139603012013265211523,-103385482384856453208659121583295522468139603011980690921546⟩⟩, + ⟨⟨37743246001603878613808369239580034605654635355083575734547,37743246001603878613808369239580034605654635355110382914520⟩,⟨214052584862254884408232017727498466897016276635616209635269,214052584862254884408232017727498466897016276635645861831474⟩⟩, + ⟨⟨-290832176770545960434917438483929282263670530418167350603329,-290832176770545960434917438483929282263670530418061706512309⟩,⟨-167912035547479535397937618679525710002908481003108568250197,-167912035547479535397937618679525710002908481003004813802296⟩⟩, + ⟨⟨470877750343631500341534451091526534133608654421848215736146,470877750343631500341534451091526534133608654422064909758661⟩,⟨-171385485103313906638223278092583722650091113371632402173905,-171385485103313906638223278092583722650091113371420532402989⟩⟩, + ⟨⟨-248254686030182897398539149181012699002035058452408694454017,-248254686030182897398539149181012699002035058452158838315722⟩,⟨682074144141724374118783345292933523373384203192056397297120,682074144141724374118783345292933523373384203192313046979710⟩⟩, + ⟨⟨-512426866294798386834526424192888519295985354623860843376627,-512426866294798386834526424192888519295985354623339760630341⟩,⟨-887549367585894654647575190685819342845674226129755303590949,-887549367585894654647575190685819342845674226129228097614380⟩⟩] +lemma tw0_0_6_3_calc (j : Fin 31) : taylorWaveBox 0 0 6 3 j = tw0_0_6_3 j := by + revert j + decide +kernel +def tw0_0_6_4 : Fin 31 → CI := ![⟨⟨387266468459182445732882002369812590770516277905781315858804,387266468459182445732882002369812590770516277906012585562949⟩,⟨223588399813024700714287950446248739589886525793081567335226,223588399813024700714287950446248739589886525793309644272669⟩⟩, + ⟨⟨-277770256353227944810982144862129070643606075550487091033045,-277770256353227944810982144862129070643606075550381687949302⟩,⟨101100105277067459882507446306331266675977860424279079822078,101100105277067459882507446306331266675977860424381153920563⟩⟩, + ⟨⟨64810221778911304623289653492382069090712896584413632250896,64810221778911304623289653492382069090712896584493958091931⟩,⟨-178064620887404990568496108612778842858868540893066914922916,-178064620887404990568496108612778842858868540892984404268654⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417511641807764,58612357480585547144046300481781429591051213417548045510387⟩,⟨101519581107763923054200619629232151794946219155345788627946,101519581107763923054200619629232151794946219155382988518387⟩⟩, + ⟨⟨-68491910267933546482150237992760199140394357322925342380456,-68491910267933546482150237992760199140394357322915636342792⟩,⟨-12076971740499832482843018651307032609200165693940749021273,-12076971740499832482843018651307032609200165693932132897777⟩⟩, + ⟨⟨30073617772972408363495262166959160357691634006946627866350,30073617772972408363495262166959160357691634006956199070485⟩,⟨-25234761581467640943542531087798344624965042612990932030497,-25234761581467640943542531087798344624965042612981443547874⟩⟩, + ⟨⟨-2665471196,2442801902⟩,⟨20863480763352960873051637232040362388611491494811593605290,20863480763352960873051637232040362388611491494817100341520⟩⟩, + ⟨⟨-7883618457478079018040102005495342132806715705119193073353,-7883618457478079018040102005495342132806715705117208388623⟩,⟨-6615141340012253267504013269479809253366836130739714271879,-6615141340012253267504013269479809253366836130737756430380⟩⟩, + ⟨⟨4548533610252265550031014088484813488594666367505049569859,4548533610252265550031014088484813488594666367505811266547⟩,⟨-802029198146755766114741914790188471884281881192041393447,-802029198146755766114741914790188471884281881191350814822⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209649030205205,-915818085634149174125723445027834837360175209648811268082⟩,⟨1586243454808811297721884681706752371796034674302442678171,1586243454808811297721884681706752371796034674302674916274⟩⟩, + ⟨⟨-209799002880679375284769054631842658274315186105810916223,-209799002880679375284769054631842658274315186105751983982⟩,⟨-576418023038761835745469045299838758830071989890980885918,-576418023038761835745469045299838758830071989890915078467⟩⟩, + ⟨⟨151104526231473182669660237411080931594750391717965337457,151104526231473182669660237411080931594750391717979411259⟩,⟨54997549811152814154650499057409761810662080146508676757,54997549811152814154650499057409761810662080146520880845⟩⟩, + ⟨⟨-24785053981387676526904448151668005809313041785978368336,-24785053981387676526904448151668005809313041785976746800⟩,⟨14309657588033580845714428828559919333752737650763538211,14309657588033580845714428828559919333752737650764970286⟩⟩, + ⟨⟨436296684896534343949744430862753293275710294148400684,436296684896534343949744430862753293275710294148484187⟩,⟨-2474361457013191741553136037391121584289357729520476111,-2474361457013191741553136037391121584289357729520353354⟩⟩, + ⟨⟨25234761581467640943542531087798344624965042612985893,25234761581467640943542531087798344624965042612986804⟩,⟨30073617772972408363495262166959160357691634006950787,30073617772972408363495262166959160357691634006951770⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨25234761581467640943542531087798344624965042612985893,25234761581467640943542531087798344624965042612986804⟩,⟨-30073617772972408363495262166959160357691634006951770,-30073617772972408363495262166959160357691634006950787⟩⟩, + ⟨⟨436296684896534343949744430862753293275710294148400684,436296684896534343949744430862753293275710294148484187⟩,⟨2474361457013191741553136037391121584289357729520353354,2474361457013191741553136037391121584289357729520476111⟩⟩, + ⟨⟨-24785053981387676526904448151668005809313041785978368336,-24785053981387676526904448151668005809313041785976746799⟩,⟨-14309657588033580845714428828559919333752737650764970286,-14309657588033580845714428828559919333752737650763538211⟩⟩, + ⟨⟨151104526231473182669660237411080931594750391717965337457,151104526231473182669660237411080931594750391717979411259⟩,⟨-54997549811152814154650499057409761810662080146520880844,-54997549811152814154650499057409761810662080146508676757⟩⟩, + ⟨⟨-209799002880679375284769054631842658274315186105810916225,-209799002880679375284769054631842658274315186105751983986⟩,⟨576418023038761835745469045299838758830071989890915078466,576418023038761835745469045299838758830071989890980885916⟩⟩, + ⟨⟨-915818085634149174125723445027834837360175209649030205203,-915818085634149174125723445027834837360175209648811268066⟩,⟨-1586243454808811297721884681706752371796034674302674916286,-1586243454808811297721884681706752371796034674302442678169⟩⟩, + ⟨⟨4548533610252265550031014088484813488594666367505049569855,4548533610252265550031014088484813488594666367505811266543⟩,⟨802029198146755766114741914790188471884281881191350814846,802029198146755766114741914790188471884281881192041393472⟩⟩, + ⟨⟨-7883618457478079018040102005495342132806715705119193073446,-7883618457478079018040102005495342132806715705117208388606⟩,⟨6615141340012253267504013269479809253366836130737756430284,6615141340012253267504013269479809253366836130739714271892⟩⟩, + ⟨⟨-2665471037,2442802017⟩,⟨-20863480763352960873051637232040362388611491494817100341504,-20863480763352960873051637232040362388611491494811593605319⟩⟩, + ⟨⟨30073617772972408363495262166959160357691634006946627866231,30073617772972408363495262166959160357691634006956199070390⟩,⟨25234761581467640943542531087798344624965042612981443547982,25234761581467640943542531087798344624965042612990932030629⟩⟩, + ⟨⟨-68491910267933546482150237992760199140394357322925342380792,-68491910267933546482150237992760199140394357322915636342609⟩,⟨12076971740499832482843018651307032609200165693932132897099,12076971740499832482843018651307032609200165693940749021113⟩⟩, + ⟨⟨58612357480585547144046300481781429591051213417511641807851,58612357480585547144046300481781429591051213417548045511370⟩,⟨-101519581107763923054200619629232151794946219155382988518557,-101519581107763923054200619629232151794946219155345788627221⟩⟩, + ⟨⟨64810221778911304623289653492382069090712896584413632249897,64810221778911304623289653492382069090712896584493958090814⟩,⟨178064620887404990568496108612778842858868540892984404269150,178064620887404990568496108612778842858868540893066914923293⟩⟩, + ⟨⟨-277770256353227944810982144862129070643606075550487091032312,-277770256353227944810982144862129070643606075550381687949131⟩,⟨-101100105277067459882507446306331266675977860424381153921759,-101100105277067459882507446306331266675977860424279079823837⟩⟩, + ⟨⟨387266468459182445732882002369812590770516277905781315856742,387266468459182445732882002369812590770516277906012585567382⟩,⟨-223588399813024700714287950446248739589886525793309644273589,-223588399813024700714287950446248739589886525793081567329655⟩⟩] +lemma tw0_0_6_4_calc (j : Fin 31) : taylorWaveBox 0 0 6 4 j = tw0_0_6_4 j := by + revert j + decide +kernel +def tw0_0_6_5 : Fin 31 → CI := ![⟨⟨83621865985773321414277976643829980057853009589669170994228,83621865985773321414277976643829980057853009589754737746030⟩,⟨-144837320511075112676372101650136743142432507120840736310994,-144837320511075112676372101650136743142432507120753780612394⟩⟩, + ⟨⟨35290594223954424428059270621955319340710653798760772452361,35290594223954424428059270621955319340710653798796515367803⟩,⟨96960110749450500366182214723208116733610599941019169826195,96960110749450500366182214723208116733610599941056271076875⟩⟩, + ⟨⟨-57716544150584136382430574792930465601418099162909794191377,-57716544150584136382430574792930465601418099162882866083049⟩,⟨-21007104095523719697708677055544647570874897128694721372749,-21007104095523719697708677055544647570874897128668618283335⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717334088530978,30374587638444219469947910571978757115463861717345315397487⟩,⟨-17536776349579649255059588727456133033828655476713348077629,-17536776349579649255059588727456133033828655476702400293980⟩⟩, + ⟨⟨-3312303037089078873367441178314067019704308452895890589699,-3312303037089078873367441178314067019704308452893516936365⟩,⟨18785003995307816853537455158624029863244167212425497575408,18785003995307816853537455158624029863244167212428219406305⟩⟩, + ⟨⟨-6291852507891166150828706323576707156788763824589893099727,-6291852507891166150828706323576707156788763824587507282670⟩,⟨-7498337830352187024212823405661464530048937585213720535657,-7498337830352187024212823405661464530048937585211310253055⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500423705155,4681754135318688100685463933953437859495028018501674316362⟩,⟨-548163465,598130338⟩⟩, + ⟨⟨-1319497107062897487554272312390153856727386963226598322935,-1319497107062897487554272312390153856727386963226203599640⟩,⟨1572515417759874972220197103082975166212118955470145184365,1572515417759874972220197103082975166212118955470546067359⟩⟩, + ⟨⟨-139980502047908918262668429928197463634323591465548110356,-139980502047908918262668429928197463634323591465427136076⟩,⟨-793868876365265405379405580917759146551630875442361612184,-793868876365265405379405580917759146551630875442226144069⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666697210327,237301465925345464608968051343584039964561419666732708421⟩,⟨137006065231091009805153036933251039326786370911766205209,137006065231091009805153036933251039326786370911799394230⟩⟩, + ⟨⟨-71859945499020887694881914989284808517638576177052246158,-71859945499020887694881914989284808517638576177043813443⟩,⟨26154881197635166443590856417601480389960472502927427217,26154881197635166443590856417601480389960472502934857340⟩⟩, + ⟨⟨5485076141338298457750945171788577980276638483046168202,5485076141338298457750945171788577980276638483047402814⟩,⟨-15070122842316265267109699778360861475238277530685559506,-15070122842316265267109699778360861475238277530684107912⟩⟩, + ⟨⟨1070359884617898514102758101041023744740518522748237966,1070359884617898514102758101041023744740518522748348493⟩,⟨1853917702541761442257562901121750312223136091146152736,1853917702541761442257562901121750312223136091146279928⟩⟩, + ⟨⟨-123387869455212383431786700096380117077807415103541896,-123387869455212383431786700096380117077807415103535381⟩,⟨-21756610477087828489370389925977484290672642117757909,-21756610477087828489370389925977484290672642117753675⟩⟩, + ⟨⟨749833783035218702421282340566146453004893758521234,749833783035218702421282340566146453004893758521262⟩,⟨-629185250789116615082870632357670715678876382458887,-629185250789116615082870632357670715678876382458861⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨749833783035218702421282340566146453004893758521234,749833783035218702421282340566146453004893758521262⟩,⟨629185250789116615082870632357670715678876382458861,629185250789116615082870632357670715678876382458887⟩⟩, + ⟨⟨-123387869455212383431786700096380117077807415103541896,-123387869455212383431786700096380117077807415103535381⟩,⟨21756610477087828489370389925977484290672642117753675,21756610477087828489370389925977484290672642117757909⟩⟩, + ⟨⟨1070359884617898514102758101041023744740518522748237966,1070359884617898514102758101041023744740518522748348493⟩,⟨-1853917702541761442257562901121750312223136091146279928,-1853917702541761442257562901121750312223136091146152736⟩⟩, + ⟨⟨5485076141338298457750945171788577980276638483046168202,5485076141338298457750945171788577980276638483047402814⟩,⟨15070122842316265267109699778360861475238277530684107912,15070122842316265267109699778360861475238277530685559506⟩⟩, + ⟨⟨-71859945499020887694881914989284808517638576177052246158,-71859945499020887694881914989284808517638576177043813443⟩,⟨-26154881197635166443590856417601480389960472502934857340,-26154881197635166443590856417601480389960472502927427217⟩⟩, + ⟨⟨237301465925345464608968051343584039964561419666697210326,237301465925345464608968051343584039964561419666732708422⟩,⟨-137006065231091009805153036933251039326786370911799394230,-137006065231091009805153036933251039326786370911766205206⟩⟩, + ⟨⟨-139980502047908918262668429928197463634323591465548110360,-139980502047908918262668429928197463634323591465427136080⟩,⟨793868876365265405379405580917759146551630875442226144068,793868876365265405379405580917759146551630875442361612183⟩⟩, + ⟨⟨-1319497107062897487554272312390153856727386963226598322938,-1319497107062897487554272312390153856727386963226203599621⟩,⟨-1572515417759874972220197103082975166212118955470546067378,-1572515417759874972220197103082975166212118955470145184361⟩⟩, + ⟨⟨4681754135318688100685463933953437859495028018500423705161,4681754135318688100685463933953437859495028018501674316358⟩,⟨-598130302,548163491⟩⟩, + ⟨⟨-6291852507891166150828706323576707156788763824589893099760,-6291852507891166150828706323576707156788763824587507282696⟩,⟨7498337830352187024212823405661464530048937585211310253025,7498337830352187024212823405661464530048937585213720535633⟩⟩, + ⟨⟨-3312303037089078873367441178314067019704308452895890589655,-3312303037089078873367441178314067019704308452893516936179⟩,⟨-18785003995307816853537455158624029863244167212428219406397,-18785003995307816853537455158624029863244167212425497575357⟩⟩, + ⟨⟨30374587638444219469947910571978757115463861717334088530762,30374587638444219469947910571978757115463861717345315397538⟩,⟨17536776349579649255059588727456133033828655476702400294006,17536776349579649255059588727456133033828655476713348077923⟩⟩, + ⟨⟨-57716544150584136382430574792930465601418099162909794191499,-57716544150584136382430574792930465601418099162882866083210⟩,⟨21007104095523719697708677055544647570874897128668618283011,21007104095523719697708677055544647570874897128694721372387⟩⟩, + ⟨⟨35290594223954424428059270621955319340710653798760772452975,35290594223954424428059270621955319340710653798796515368221⟩,⟨-96960110749450500366182214723208116733610599941056271076619,-96960110749450500366182214723208116733610599941019169826135⟩⟩, + ⟨⟨83621865985773321414277976643829980057853009589669170992145,83621865985773321414277976643829980057853009589754737746374⟩,⟨144837320511075112676372101650136743142432507120753780611623,144837320511075112676372101650136743142432507120840736312651⟩⟩] +lemma tw0_0_6_5_calc (j : Fin 31) : taylorWaveBox 0 0 6 5 j = tw0_0_6_5 j := by + revert j + decide +kernel +def tw0_0_6_6 : Fin 31 → CI := ![⟨⟨-47397902300335817857262145290753400473401218593763759415055,-47397902300335817857262145290753400473401218593735152357022⟩,⟨-27365191652122466690056424259448641919058449328582873938822,-27365191652122466690056424259448641919058449328554785178664⟩⟩, + ⟨⟨29614780574334514363990385904440228112336651204811788315550,29614780574334514363990385904440228112336651204823214514493⟩,⟨-10778898623382712107118931678392710153590329684121424454604,-10778898623382712107118931678392710153590329684110473092025⟩⟩, + ⟨⟨-5957950907611207550569852830488143675956532077615209457015,-5957950907611207550569852830488143675956532077607787238370⟩,⟨16369335584880965194881302826856892194951231215815090319359,16369335584880965194881302826856892194951231215822779667038⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210105855307775,-4591117312290554821118816819884099063826981210102974570737⟩,⟨-7952048448396308887279441801663526024767544990107064461552,-7952048448396308887279441801663526024767544990104099962616⟩⟩, + ⟨⟨4508077333628149129556670271429787375478153515879974053447,4508077333628149129556670271429787375478153515880641595628⟩,⟨794895665038918867578846968060871712581009506201295741804,794895665038918867578846968060871712581009506201867907944⟩⟩, + ⟨⟨-1635883544581170840958285178320235001872764448113650452673,-1635883544581170840958285178320235001872764448113119403402⟩,⟨1372669278907041956222513126019644249886578943328260629337,1372669278907041956222513126019644249886578943328785503218⟩⟩, + ⟨⟨-107631645,117442618⟩,⟨-919260274839426580241716221779161802910425528549179345163,-919260274839426580241716221779161802910425528548930862130⟩⟩, + ⟨⟨274455715782839327316587974262770997971797736631152635965,274455715782839327316587974262770997971797736631223476867⟩,⟨230295689887876868206076467780667918235051104332712020984,230295689887876868206076467780667918235051104332781646250⟩⟩, + ⟨⟨-121236725064714662931168325782633235951366227119382201123,-121236725064714662931168325782633235951366227119361127023⟩,⟨21377305681643414283065811396562950473503900136323814529,21377305681643414283065811396562950473503900136342357321⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351968501619,17934052001134979769995378202672261968074145351972903138⟩,⟨-31062689251548081590935319537748148534248222617602111895,-31062689251548081590935319537748148534248222617597366329⟩⟩, + ⟨⟨2853054952291821248499170796718628332033262166200295671,2853054952291821248499170796718628332033262166201115255⟩,⟨7838704057884963522479017823751881858637054682753465848,7838704057884963522479017823751881858637054682754410667⟩⟩, + ⟨⟨-1315116311392125361687513374969352523488353320163805847,-1315116311392125361687513374969352523488353320163674984⟩,⟨-478663191944695801194602642774405187502417585469832999,-478663191944695801194602642774405187502417585469723735⟩⟩, + ⟨⟨121338629888859693714591091944328705211907119599994999,121338629888859693714591091944328705211907119600003711⟩,⟨-70054890629433514726544446104188523312789630281138638,-70054890629433514726544446104188523312789630281131180⟩⟩, + ⟨⟨-949311217247692341238639064474231690082103169719472,-949311217247692341238639064474231690082103169719283⟩,⟨5383811447535995381346050175947809543390960788162201,5383811447535995381346050175947809543390960788162504⟩⟩, + ⟨⟨-13726692789070419562225131260196442498865789433286,-13726692789070419562225131260196442498865789433285⟩,⟨-16358835445811708409582851783202350018727644481135,-16358835445811708409582851783202350018727644481133⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-13726692789070419562225131260196442498865789433286,-13726692789070419562225131260196442498865789433285⟩,⟨16358835445811708409582851783202350018727644481133,16358835445811708409582851783202350018727644481135⟩⟩, + ⟨⟨-949311217247692341238639064474231690082103169719472,-949311217247692341238639064474231690082103169719283⟩,⟨-5383811447535995381346050175947809543390960788162504,-5383811447535995381346050175947809543390960788162201⟩⟩, + ⟨⟨121338629888859693714591091944328705211907119599994999,121338629888859693714591091944328705211907119600003711⟩,⟨70054890629433514726544446104188523312789630281131180,70054890629433514726544446104188523312789630281138638⟩⟩, + ⟨⟨-1315116311392125361687513374969352523488353320163805847,-1315116311392125361687513374969352523488353320163674984⟩,⟨478663191944695801194602642774405187502417585469723735,478663191944695801194602642774405187502417585469832999⟩⟩, + ⟨⟨2853054952291821248499170796718628332033262166200295671,2853054952291821248499170796718628332033262166201115255⟩,⟨-7838704057884963522479017823751881858637054682754410667,-7838704057884963522479017823751881858637054682753465848⟩⟩, + ⟨⟨17934052001134979769995378202672261968074145351968501619,17934052001134979769995378202672261968074145351972903138⟩,⟨31062689251548081590935319537748148534248222617597366328,31062689251548081590935319537748148534248222617602111895⟩⟩, + ⟨⟨-121236725064714662931168325782633235951366227119382201123,-121236725064714662931168325782633235951366227119361127023⟩,⟨-21377305681643414283065811396562950473503900136342357322,-21377305681643414283065811396562950473503900136323814530⟩⟩, + ⟨⟨274455715782839327316587974262770997971797736631152635965,274455715782839327316587974262770997971797736631223476871⟩,⟨-230295689887876868206076467780667918235051104332781646250,-230295689887876868206076467780667918235051104332712020980⟩⟩, + ⟨⟨-107631650,117442611⟩,⟨919260274839426580241716221779161802910425528548930862131,919260274839426580241716221779161802910425528549179345163⟩⟩, + ⟨⟨-1635883544581170840958285178320235001872764448113650452668,-1635883544581170840958285178320235001872764448113119403395⟩,⟨-1372669278907041956222513126019644249886578943328785503225,-1372669278907041956222513126019644249886578943328260629343⟩⟩, + ⟨⟨4508077333628149129556670271429787375478153515879974053435,4508077333628149129556670271429787375478153515880641595650⟩,⟨-794895665038918867578846968060871712581009506201867907933,-794895665038918867578846968060871712581009506201295741760⟩⟩, + ⟨⟨-4591117312290554821118816819884099063826981210105855307852,-4591117312290554821118816819884099063826981210102974570744⟩,⟨7952048448396308887279441801663526024767544990104099962559,7952048448396308887279441801663526024767544990107064461565⟩⟩, + ⟨⟨-5957950907611207550569852830488143675956532077615209456912,-5957950907611207550569852830488143675956532077607787238279⟩,⟨-16369335584880965194881302826856892194951231215822779667072,-16369335584880965194881302826856892194951231215815090319405⟩⟩, + ⟨⟨29614780574334514363990385904440228112336651204811788315532,29614780574334514363990385904440228112336651204823214514414⟩,⟨10778898623382712107118931678392710153590329684110473092213,10778898623382712107118931678392710153590329684121424454731⟩⟩, + ⟨⟨-47397902300335817857262145290753400473401218593763759415598,-47397902300335817857262145290753400473401218593735152356769⟩,⟨27365191652122466690056424259448641919058449328554785177982,27365191652122466690056424259448641919058449328582873938935⟩⟩] +lemma tw0_0_6_6_calc (j : Fin 31) : taylorWaveBox 0 0 6 6 j = tw0_0_6_6 j := by + revert j + decide +kernel +def tw0_0_6_7 : Fin 31 → CI := ![⟨⟨-7960211579480062797719879135244471042925264892922760314475,-7960211579480062797719879135244471042925264892914564287208⟩,⟨13787490894657571028441851363188980505116571387314389785621,13787490894657571028441851363188980505116571387322755128434⟩⟩, + ⟨⟨-2926424211148862311402355829685539518980786934042862514897,-2926424211148862311402355829685539518980786934039879952372⟩,⟨-8040284439876804891613919694486032124969772218919048565295,-8040284439876804891613919694486032124969772218915920808834⟩⟩, + ⟨⟨4126760477956199262743179719342214293613392126736623083902,4126760477956199262743179719342214293613392126738574728285⟩,⟨1502017977922223071373381831195373310674871014370299733026,1502017977922223071373381831195373310674871014372175678533⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586756071791757,-1850525702701626521436088670080927798033038586755376031122⟩,⟨1068401512597105450007285757967117627943219527725339628330,1068401512597105450007285757967117627943219527726013407108⟩⟩, + ⟨⟨169565569124833618405506587568554150229123284527429394013,169565569124833618405506587568554150229123284527551987105⟩,⟨-961654129410798909640035894019499653736337499121282088103,-961654129410798909640035894019499653736337499121136628286⟩⟩, + ⟨⟨266195538421158144381244481825870199374264745106965078931,266195538421158144381244481825870199374264745107067712674⟩,⟨317239489245965267259176357871969973225236965958105328837,317239489245965267259176357871969973225236965958209322623⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620633130829,-160441184787359821872660870163473329702807540620589251657⟩,⟨-20497604,18785266⟩⟩, + ⟨⟨35728160370624553267546600163205589782920835758757854228,35728160370624553267546600163205589782920835758768769646⟩,⟨-42579163478473891338439437904890724690512137832522400920,-42579163478473891338439437904890724690512137832511275101⟩⟩, + ⟨⟨2901922872721975823306667014036198878749851358924037861,2901922872721975823306667014036198878749851358926564243⟩,⟨16457622430000937945167724220374377831570074918552027499,16457622430000937945167724220374377831570074918554940650⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757532832,-3614308013089114299679860683751812105533278489756969155⟩,⟨-2086721704291221582045479996029526617076600640089509915,-2086721704291221582045479996029526617076600640088991131⟩⟩, + ⟨⟨760062193886293295464299980711617728171811217997976262,760062193886293295464299980711617728171811217998070295⟩,⟨-276640014765677890928961667359369035007425375981882635,-276640014765677890928961667359369035007425375981802284⟩⟩, + ⟨⟨-37129994255735738900317044392066271392249097093833506,-37129994255735738900317044392066271392249097093824911⟩,⟨102013820802113776458851048521557154679742095324601956,102013820802113776458851048521557154679742095324612433⟩⟩, + ⟨⟨-4075628328693792152432578117245169173977735625174504,-4075628328693792152432578117245169173977735625174056⟩,⟨-7059195338064676366562227897952758018619684550307418,-7059195338064676366562227897952758018619684550306887⟩⟩, + ⟨⟨208811635702366834962878902023099978392610067256171,208811635702366834962878902023099978392610067256185⟩,⟨36819125260194252809495158913217691442549953360294,36819125260194252809495158913217691442549953360302⟩⟩, + ⟨⟨-317239489245965267259176357871969973225236965959,-317239489245965267259176357871969973225236965958⟩,⟨266195538421158144381244481825870199374264745107,266195538421158144381244481825870199374264745108⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-317239489245965267259176357871969973225236965959,-317239489245965267259176357871969973225236965958⟩,⟨-266195538421158144381244481825870199374264745108,-266195538421158144381244481825870199374264745107⟩⟩, + ⟨⟨208811635702366834962878902023099978392610067256171,208811635702366834962878902023099978392610067256185⟩,⟨-36819125260194252809495158913217691442549953360302,-36819125260194252809495158913217691442549953360294⟩⟩, + ⟨⟨-4075628328693792152432578117245169173977735625174504,-4075628328693792152432578117245169173977735625174056⟩,⟨7059195338064676366562227897952758018619684550306887,7059195338064676366562227897952758018619684550307418⟩⟩, + ⟨⟨-37129994255735738900317044392066271392249097093833506,-37129994255735738900317044392066271392249097093824911⟩,⟨-102013820802113776458851048521557154679742095324612433,-102013820802113776458851048521557154679742095324601956⟩⟩, + ⟨⟨760062193886293295464299980711617728171811217997976262,760062193886293295464299980711617728171811217998070295⟩,⟨276640014765677890928961667359369035007425375981802284,276640014765677890928961667359369035007425375981882635⟩⟩, + ⟨⟨-3614308013089114299679860683751812105533278489757532832,-3614308013089114299679860683751812105533278489756969155⟩,⟨2086721704291221582045479996029526617076600640088991131,2086721704291221582045479996029526617076600640089509915⟩⟩, + ⟨⟨2901922872721975823306667014036198878749851358924037861,2901922872721975823306667014036198878749851358926564243⟩,⟨-16457622430000937945167724220374377831570074918554940650,-16457622430000937945167724220374377831570074918552027499⟩⟩, + ⟨⟨35728160370624553267546600163205589782920835758757854228,35728160370624553267546600163205589782920835758768769646⟩,⟨42579163478473891338439437904890724690512137832511275101,42579163478473891338439437904890724690512137832522400921⟩⟩, + ⟨⟨-160441184787359821872660870163473329702807540620633130829,-160441184787359821872660870163473329702807540620589251657⟩,⟨-18785267,20497603⟩⟩, + ⟨⟨266195538421158144381244481825870199374264745106965078932,266195538421158144381244481825870199374264745107067712675⟩,⟨-317239489245965267259176357871969973225236965958209322622,-317239489245965267259176357871969973225236965958105328835⟩⟩, + ⟨⟨169565569124833618405506587568554150229123284527429394003,169565569124833618405506587568554150229123284527551987103⟩,⟨961654129410798909640035894019499653736337499121136628283,961654129410798909640035894019499653736337499121282088108⟩⟩, + ⟨⟨-1850525702701626521436088670080927798033038586756071791760,-1850525702701626521436088670080927798033038586755376031109⟩,⟨-1068401512597105450007285757967117627943219527726013407126,-1068401512597105450007285757967117627943219527725339628332⟩⟩, + ⟨⟨4126760477956199262743179719342214293613392126736623083913,4126760477956199262743179719342214293613392126738574728294⟩,⟨-1502017977922223071373381831195373310674871014372175678507,-1502017977922223071373381831195373310674871014370299733003⟩⟩, + ⟨⟨-2926424211148862311402355829685539518980786934042862514932,-2926424211148862311402355829685539518980786934039879952423⟩,⟨8040284439876804891613919694486032124969772218915920808829,8040284439876804891613919694486032124969772218919048565273⟩⟩, + ⟨⟨-7960211579480062797719879135244471042925264892922760314508,-7960211579480062797719879135244471042925264892914564287010⟩,⟨-13787490894657571028441851363188980505116571387322755128592,-13787490894657571028441851363188980505116571387314389785547⟩⟩] +lemma tw0_0_6_7_calc (j : Fin 31) : taylorWaveBox 0 0 6 7 j = tw0_0_6_7 j := by + revert j + decide +kernel +def tw0_0_6_8 : Fin 31 → CI := ![⟨⟨3609556675507699249901072619402663681142043526990919256187,3609556675507699249901072619402663681142043526993120787391⟩,⟨2083978518259580817633731437832825154045307399302715619178,2083978518259580817633731437832825154045307399304867967609⟩⟩, + ⟨⟨-1964612107818056345488349447672208731165090283567808832938,-1964612107818056345488349447672208731165090283567038324305⟩,⟨715060329124755579732605471270316777975218518043392748541,715060329124755579732605471270316777975218518044123802156⟩⟩, + ⟨⟨340797068805573773891446730681124183631518687921645990939,340797068805573773891446730681124183631518687922072714264⟩,⟨-936332251159637185121047205616407356776827006269736631032,-936332251159637185121047205616407356776827006269290836529⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556837854286,223765489537285961260145415798476028797768934556979682452⟩,⟨387573196859101311863220953391387389144801221975910586703,387573196859101311863220953391387389144801221976057540154⟩⟩, + ⟨⟨-184624339059798866350938241577966823698746296999392626876,-184624339059798866350938241577966823698746296999364112917⟩,⟨-32554252271710250985202560851745125646319123567388724683,-32554252271710250985202560851745125646319123567365084875⟩⟩, + ⟨⟨55368736046872372180290148708267746356340878416680473581,55368736046872372180290148708267746356340878416698800165⟩,⟨-46459885995682776378275153849705835363067831599189855843,-46459885995682776378275153849705835363067831599171794988⟩⟩, + ⟨⟨-3219757,2950783⟩,⟨25202042373060605481053021731346532868346133836077195807,25202042373060605481053021731346532868346133836084168553⟩⟩, + ⟨⟨-5945172763554329040007160112324665385302680875690589223,-5945172763554329040007160112324665385302680875689016841⟩,⟨-4988592273183648043379327766846376552618415573703759070,-4988592273183648043379327766846376552618415573702219110⟩⟩, + ⟨⟨2010677889175104639079081757958315170584983447513820393,2010677889175104639079081757958315170584983447514182702⟩,⟨-354536761375515749606152992630895337960785244083147528,-354536761375515749606152992630895337960785244082837742⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153262770,-218520985876255821543110757615699246872821225153207747⟩,⟨378489450057716124866426712296276747211719943335889488,378489450057716124866426712296276747211719943335949722⟩⟩, + ⟨⟨-24141395502134044136221221278680879295106190921472822,-24141395502134044136221221278680879295106190921465732⟩,⟨-66327939016236668811083930961767677458350701597057160,-66327939016236668811083930961767677458350701597048742⟩⟩, + ⟨⟨7121908222145472638489717144797850025837316636449544,7121908222145472638489717144797850025837316636450299⟩,⟨2592162604036680444332267860327841964825115571370800,2592162604036680444332267860327841964825115571371409⟩⟩, + ⟨⟨-369618603571988403189869836226832760948945257164000,-369618603571988403189869836226832760948945257163970⟩,⟨213399400269781075725694099234081295774239477688692,213399400269781075725694099234081295774239477688717⟩⟩, + ⟨⟨1285229926989207212263403171490033188967448577914,1285229926989207212263403171490033188967448577915⟩,⟨-7288901118962487047553606086561285709952672880924,-7288901118962487047553606086561285709952672880922⟩⟩, + ⟨⟨4645988599568277637827515384970583536306783159,4645988599568277637827515384970583536306783160⟩,⟨5536873604687237218029014870826774635634087841,5536873604687237218029014870826774635634087842⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨4645988599568277637827515384970583536306783159,4645988599568277637827515384970583536306783160⟩,⟨-5536873604687237218029014870826774635634087842,-5536873604687237218029014870826774635634087841⟩⟩, + ⟨⟨1285229926989207212263403171490033188967448577914,1285229926989207212263403171490033188967448577915⟩,⟨7288901118962487047553606086561285709952672880922,7288901118962487047553606086561285709952672880924⟩⟩, + ⟨⟨-369618603571988403189869836226832760948945257164000,-369618603571988403189869836226832760948945257163970⟩,⟨-213399400269781075725694099234081295774239477688717,-213399400269781075725694099234081295774239477688692⟩⟩, + ⟨⟨7121908222145472638489717144797850025837316636449544,7121908222145472638489717144797850025837316636450299⟩,⟨-2592162604036680444332267860327841964825115571371409,-2592162604036680444332267860327841964825115571370800⟩⟩, + ⟨⟨-24141395502134044136221221278680879295106190921472822,-24141395502134044136221221278680879295106190921465732⟩,⟨66327939016236668811083930961767677458350701597048742,66327939016236668811083930961767677458350701597057160⟩⟩, + ⟨⟨-218520985876255821543110757615699246872821225153262770,-218520985876255821543110757615699246872821225153207747⟩,⟨-378489450057716124866426712296276747211719943335949722,-378489450057716124866426712296276747211719943335889488⟩⟩, + ⟨⟨2010677889175104639079081757958315170584983447513820393,2010677889175104639079081757958315170584983447514182702⟩,⟨354536761375515749606152992630895337960785244082837742,354536761375515749606152992630895337960785244083147528⟩⟩, + ⟨⟨-5945172763554329040007160112324665385302680875690589223,-5945172763554329040007160112324665385302680875689016841⟩,⟨4988592273183648043379327766846376552618415573702219110,4988592273183648043379327766846376552618415573703759070⟩⟩, + ⟨⟨-3219756,2950783⟩,⟨-25202042373060605481053021731346532868346133836084168553,-25202042373060605481053021731346532868346133836077195807⟩⟩, + ⟨⟨55368736046872372180290148708267746356340878416680473580,55368736046872372180290148708267746356340878416698800165⟩,⟨46459885995682776378275153849705835363067831599171794988,46459885995682776378275153849705835363067831599189855843⟩⟩, + ⟨⟨-184624339059798866350938241577966823698746296999392626877,-184624339059798866350938241577966823698746296999364112917⟩,⟨32554252271710250985202560851745125646319123567365084873,32554252271710250985202560851745125646319123567388724682⟩⟩, + ⟨⟨223765489537285961260145415798476028797768934556837854287,223765489537285961260145415798476028797768934556979682456⟩,⟨-387573196859101311863220953391387389144801221976057540155,-387573196859101311863220953391387389144801221975910586700⟩⟩, + ⟨⟨340797068805573773891446730681124183631518687921645990934,340797068805573773891446730681124183631518687922072714259⟩,⟨936332251159637185121047205616407356776827006269290836532,936332251159637185121047205616407356776827006269736631034⟩⟩, + ⟨⟨-1964612107818056345488349447672208731165090283567808832933,-1964612107818056345488349447672208731165090283567038324303⟩,⟨-715060329124755579732605471270316777975218518044123802164,-715060329124755579732605471270316777975218518043392748553⟩⟩, + ⟨⟨3609556675507699249901072619402663681142043526990919256168,3609556675507699249901072619402663681142043526993120787432⟩,⟨-2083978518259580817633731437832825154045307399304867967618,-2083978518259580817633731437832825154045307399302715619126⟩⟩] +lemma tw0_0_6_8_calc (j : Fin 31) : taylorWaveBox 0 0 6 8 j = tw0_0_6_8 j := by + revert j + decide +kernel +def tw0_0_6_9 : Fin 31 → CI := ![⟨⟨495985727515397112326421416469320716440501550325467438649,495985727515397112326421416469320716440501550325981275150⟩,⟨-859072479885680691627648444315166287437481826543555984768,-859072479885680691627648444315166287437481826543029287053⟩⟩, + ⟨⟨158838363009725480590257939154980350262354144574468537499,158838363009725480590257939154980350262354144574631434095⟩,⟨436404815712357093856910280486658809144220608389963043267,436404815712357093856910280486658809144220608390135587638⟩⟩, + ⟨⟨-193133680708636471923911370202436046709059900371474611174,-193133680708636471923911370202436046709059900371382044079⟩,⟨-70294911012216344368138803230360605166547805774444870423,-70294911012216344368138803230360605166547805774356628075⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791942306667,73793764120052327784788221554378326426914401791970521432⟩,⟨-42604849579227958677896369208994565288944873769738073660,-42604849579227958677896369208994565288944873769710934024⟩⟩, + ⟨⟨-5681788876661875672942235057005649473559960862296031692,-5681788876661875672942235057005649473559960862291887681⟩,⟨32223025959118624056607798737238679552021987184732329954,32223025959118624056607798737238679552021987184737409149⟩⟩, + ⟨⟨-7371618006598804374173238873306869173007594824468080455,-7371618006598804374173238873306869173007594824465191341⟩,⟨-8785152242596293647118650410290941472236156719532099719,-8785152242596293647118650410290941472236156719529163943⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232431613735,3598843235212085340458540018208389404888495232432620897⟩,⟨-421371,459781⟩⟩, + ⟨⟨-633217165138931539595516159984977809404363714614168035,-633217165138931539595516159984977809404363714613970546⟩,⟨754638831446642786903743362877131509366087701982186410,754638831446642786903743362877131509366087701982388401⟩⟩, + ⟨⟨-39377124215928610423532349390514361815448022009799640,-39377124215928610423532349390514361815448022009765107⟩,⟨-223318768674624183428243121744186361765442219540828122,-223318768674624183428243121744186361765442219540787170⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749975571,36032111386744300676166123805848792200641797749981421⟩,⟨20803149208607401698191586527829377582492614145371025,20803149208607401698191586527829377582492614145376330⟩⟩, + ⟨⟨-5262004190433356979773597577290394847804046962135661,-5262004190433356979773597577290394847804046962134976⟩,⟨1915212897901767442266198248614237643368607601325505,1915212897901767442266198248614237643368607601326075⟩⟩, + ⟨⟨164515535227309563702617792081012559964805618415008,164515535227309563702617792081012559964805618415048⟩,⟨-452002718186524485912418701574541563324905582376411,-452002718186524485912418701574541563324905582376361⟩⟩, + ⟨⟨10157787699515332860445110609291688272701471750670,10157787699515332860445110609291688272701471750672⟩,⟨17593804388058740564534240139574605566719627807606,17593804388058740564534240139574605566719627807608⟩⟩, + ⟨⟨-231300587960353261484736775914881594708510785372,-231300587960353261484736775914881594708510785371⟩,⟨-40784534311141815243933233725435641365842564279,-40784534311141815243933233725435641365842564278⟩⟩, + ⟨⟨87851522425962936471186504102909414722361567,87851522425962936471186504102909414722361568⟩,⟨-73716180065988043741732388733068691730075949,-73716180065988043741732388733068691730075948⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨87851522425962936471186504102909414722361567,87851522425962936471186504102909414722361568⟩,⟨73716180065988043741732388733068691730075948,73716180065988043741732388733068691730075949⟩⟩, + ⟨⟨-231300587960353261484736775914881594708510785372,-231300587960353261484736775914881594708510785371⟩,⟨40784534311141815243933233725435641365842564278,40784534311141815243933233725435641365842564279⟩⟩, + ⟨⟨10157787699515332860445110609291688272701471750670,10157787699515332860445110609291688272701471750672⟩,⟨-17593804388058740564534240139574605566719627807608,-17593804388058740564534240139574605566719627807606⟩⟩, + ⟨⟨164515535227309563702617792081012559964805618415008,164515535227309563702617792081012559964805618415048⟩,⟨452002718186524485912418701574541563324905582376361,452002718186524485912418701574541563324905582376411⟩⟩, + ⟨⟨-5262004190433356979773597577290394847804046962135661,-5262004190433356979773597577290394847804046962134976⟩,⟨-1915212897901767442266198248614237643368607601326075,-1915212897901767442266198248614237643368607601325505⟩⟩, + ⟨⟨36032111386744300676166123805848792200641797749975571,36032111386744300676166123805848792200641797749981421⟩,⟨-20803149208607401698191586527829377582492614145376330,-20803149208607401698191586527829377582492614145371025⟩⟩, + ⟨⟨-39377124215928610423532349390514361815448022009799640,-39377124215928610423532349390514361815448022009765107⟩,⟨223318768674624183428243121744186361765442219540787170,223318768674624183428243121744186361765442219540828122⟩⟩, + ⟨⟨-633217165138931539595516159984977809404363714614168035,-633217165138931539595516159984977809404363714613970546⟩,⟨-754638831446642786903743362877131509366087701982388401,-754638831446642786903743362877131509366087701982186410⟩⟩, + ⟨⟨3598843235212085340458540018208389404888495232431613735,3598843235212085340458540018208389404888495232432620897⟩,⟨-459781,421371⟩⟩, + ⟨⟨-7371618006598804374173238873306869173007594824468080455,-7371618006598804374173238873306869173007594824465191341⟩,⟨8785152242596293647118650410290941472236156719529163943,8785152242596293647118650410290941472236156719532099719⟩⟩, + ⟨⟨-5681788876661875672942235057005649473559960862296031692,-5681788876661875672942235057005649473559960862291887680⟩,⟨-32223025959118624056607798737238679552021987184737409149,-32223025959118624056607798737238679552021987184732329954⟩⟩, + ⟨⟨73793764120052327784788221554378326426914401791942306666,73793764120052327784788221554378326426914401791970521432⟩,⟨42604849579227958677896369208994565288944873769710934024,42604849579227958677896369208994565288944873769738073661⟩⟩, + ⟨⟨-193133680708636471923911370202436046709059900371474611175,-193133680708636471923911370202436046709059900371382044079⟩,⟨70294911012216344368138803230360605166547805774356628074,70294911012216344368138803230360605166547805774444870422⟩⟩, + ⟨⟨158838363009725480590257939154980350262354144574468537502,158838363009725480590257939154980350262354144574631434097⟩,⟨-436404815712357093856910280486658809144220608390135587637,-436404815712357093856910280486658809144220608389963043266⟩⟩, + ⟨⟨495985727515397112326421416469320716440501550325467438637,495985727515397112326421416469320716440501550325981275152⟩,⟨859072479885680691627648444315166287437481826543029287048,859072479885680691627648444315166287437481826543555984777⟩⟩] +lemma tw0_0_6_9_calc (j : Fin 31) : taylorWaveBox 0 0 6 9 j = tw0_0_6_9 j := by + revert j + decide +kernel +def tw0_0_6_10 : Fin 31 → CI := ![⟨⟨-187420541090973602826895044989804187200002869539645206086,-187420541090973602826895044989804187200002869539529701892⟩,⟨-108207299850538926453101217536999299224894071863992970704,-108207299850538926453101217536999299224894071863880524535⟩⟩, + ⟨⟨88861510566963336281397171899359121616930779469038267527,88861510566963336281397171899359121616930779469073684169⟩,⟨-32342944818306262121907552366576596456469258500405389012,-32342944818306262121907552366576596456469258500372116771⟩⟩, + ⟨⟨-13291174482728947273372294581193884759980004910102028712,-13291174482728947273372294581193884759980004910085301776⟩,⟨36517201769329252161989114481407114117435237387254798159,36517201769329252161989114481407114117435237387272416737⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003520287513,-7435949024744486033456304113587098562333411003515527083⟩,⟨-12879441513349692559052917879290522199485986172461524819,-12879441513349692559052917879290522199485986172456559416⟩⟩, + ⟨⟨5155314064470384147116794759277884805507548839239998502,5155314064470384147116794759277884805507548839240827526⟩,⟨909020963591947578021129988330610264773773584414302158,909020963591947578021129988330610264773773584414968047⟩⟩, + ⟨⟨-1277748599352241349924386521357345227008653327101887416,-1277748599352241349924386521357345227008653327101456357⟩,⟨1072158378453751842467979383665927398604390525910277465,1072158378453751842467979383665927398604390525910701084⟩⟩, + ⟨⟨-55158,60186⟩,⟨-471087477881817150367027725509267001994255814209123627,-471087477881817150367027725509267001994255814208990290⟩⟩, + ⟨⟨87806215147642934115586114913488052470141791182439662,87806215147642934115586114913488052470141791182463445⟩,⟨73678162745460083390395446080758316264259413612754003,73678162745460083390395446080758316264259413612777217⟩⟩, + ⟨⟨-22736278803418631823438547322463308731353365912264410,-22736278803418631823438547322463308731353365912260167⟩,⟨4009019393952678184454107944901637413075178268652220,4009019393952678184454107944901637413075178268655749⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780538,1815417242369259285511792996481225234944680420781007⟩,⟨-3144394900720139784925028779123662646358883342885750,-3144394900720139784925028779123662646358883342885228⟩⟩, + ⟨⟨139278212271032669669837904828030795245079308185209,139278212271032669669837904828030795245079308185251⟩,⟨382663743236669945973673458564761217138938398428670,382663743236669945973673458564761217138938398428722⟩⟩, + ⟨⟨-26296452201063017694448230104301768410574321750560,-26296452201063017694448230104301768410574321750556⟩,⟨-9571125867990899270072398701720844314535806937312,-9571125867990899270072398701720844314535806937308⟩⟩, + ⟨⟨767674536308627877178962104278237950771211753634,767674536308627877178962104278237950771211753635⟩,⟨-443217100187807442751902587031549129625166118355,-443217100187807442751902587031549129625166118354⟩⟩, + ⟨⟨-1186374012703370235018362736328362878535427494,-1186374012703370235018362736328362878535427493⟩,⟨6728261369511533188856362769782954131162052084,6728261369511533188856362769782954131162052085⟩⟩, + ⟨⟨-1072158378453751842467979383665927398604391,-1072158378453751842467979383665927398604390⟩,⟨-1277748599352241349924386521357345227008654,-1277748599352241349924386521357345227008653⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1072158378453751842467979383665927398604391,-1072158378453751842467979383665927398604390⟩,⟨1277748599352241349924386521357345227008653,1277748599352241349924386521357345227008654⟩⟩, + ⟨⟨-1186374012703370235018362736328362878535427494,-1186374012703370235018362736328362878535427493⟩,⟨-6728261369511533188856362769782954131162052085,-6728261369511533188856362769782954131162052084⟩⟩, + ⟨⟨767674536308627877178962104278237950771211753634,767674536308627877178962104278237950771211753635⟩,⟨443217100187807442751902587031549129625166118354,443217100187807442751902587031549129625166118355⟩⟩, + ⟨⟨-26296452201063017694448230104301768410574321750560,-26296452201063017694448230104301768410574321750556⟩,⟨9571125867990899270072398701720844314535806937308,9571125867990899270072398701720844314535806937312⟩⟩, + ⟨⟨139278212271032669669837904828030795245079308185209,139278212271032669669837904828030795245079308185251⟩,⟨-382663743236669945973673458564761217138938398428722,-382663743236669945973673458564761217138938398428670⟩⟩, + ⟨⟨1815417242369259285511792996481225234944680420780538,1815417242369259285511792996481225234944680420781007⟩,⟨3144394900720139784925028779123662646358883342885228,3144394900720139784925028779123662646358883342885750⟩⟩, + ⟨⟨-22736278803418631823438547322463308731353365912264410,-22736278803418631823438547322463308731353365912260167⟩,⟨-4009019393952678184454107944901637413075178268655749,-4009019393952678184454107944901637413075178268652220⟩⟩, + ⟨⟨87806215147642934115586114913488052470141791182439662,87806215147642934115586114913488052470141791182463445⟩,⟨-73678162745460083390395446080758316264259413612777217,-73678162745460083390395446080758316264259413612754003⟩⟩, + ⟨⟨-55158,60186⟩,⟨471087477881817150367027725509267001994255814208990290,471087477881817150367027725509267001994255814209123627⟩⟩, + ⟨⟨-1277748599352241349924386521357345227008653327101887416,-1277748599352241349924386521357345227008653327101456357⟩,⟨-1072158378453751842467979383665927398604390525910701084,-1072158378453751842467979383665927398604390525910277465⟩⟩, + ⟨⟨5155314064470384147116794759277884805507548839239998502,5155314064470384147116794759277884805507548839240827526⟩,⟨-909020963591947578021129988330610264773773584414968047,-909020963591947578021129988330610264773773584414302158⟩⟩, + ⟨⟨-7435949024744486033456304113587098562333411003520287513,-7435949024744486033456304113587098562333411003515527083⟩,⟨12879441513349692559052917879290522199485986172456559416,12879441513349692559052917879290522199485986172461524819⟩⟩, + ⟨⟨-13291174482728947273372294581193884759980004910102028711,-13291174482728947273372294581193884759980004910085301775⟩,⟨-36517201769329252161989114481407114117435237387272416737,-36517201769329252161989114481407114117435237387254798159⟩⟩, + ⟨⟨88861510566963336281397171899359121616930779469038267527,88861510566963336281397171899359121616930779469073684168⟩,⟨32342944818306262121907552366576596456469258500372116772,32342944818306262121907552366576596456469258500405389012⟩⟩, + ⟨⟨-187420541090973602826895044989804187200002869539645206089,-187420541090973602826895044989804187200002869539529701891⟩,⟨108207299850538926453101217536999299224894071863880524532,108207299850538926453101217536999299224894071863992970705⟩⟩] +lemma tw0_0_6_10_calc (j : Fin 31) : taylorWaveBox 0 0 6 10 j = tw0_0_6_10 j := by + revert j + decide +kernel +def tw0_0_6_11 : Fin 31 → CI := ![⟨⟨-21791234504823142515366525311269432823771122929803246896,-21791234504823142515366525311269432823771122929780532656⟩,⟨37743525322001707893742291740530563888148221535539954656,37743525322001707893742291740530563888148221535563335512⟩⟩, + ⟨⟨-6079132520141514205668296136922984275576632139199202559,-6079132520141514205668296136922984275576632139192929406⟩,⟨-16702279328961082043742238063855042943883521252496208904,-16702279328961082043742238063855042943883521252489498878⟩⟩, + ⟨⟨6373454044898943223400879911998071624579395833782104936,6373454044898943223400879911998071624579395833785200247⟩,⟨2319747561806743388088418778287325220660344059848460627,2319747561806743388088418778287325220660344059851387413⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732746114840,-2074972248239938619645032781794172026726850732745308271⟩,⟨1197985786082331537503313966912747958048843575969525349,1197985786082331537503313966912747958048843575970296103⟩⟩, + ⟨⟨134245766636646801748787137719069512750131783907078943,134245766636646801748787137719069512750131783907177711⟩,⟨-761345575687056675429503141948610697084760207817236049,-761345575687056675429503141948610697084760207817111193⟩⟩, + ⟨⟨143943798514318463707509065449457718565486339135752773,143943798514318463707509065449457718565486339135810106⟩,⟨171545539011096131126423925826616465808087912130861523,171545539011096131126423925826616465808087912130919943⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560553934,-56921729219679268117752553035921843729028297560537641⟩,⟨-7273,6665⟩⟩, + ⟨⟨7913394010636943223714743625330488859821259019812552,7913394010636943223714743625330488859821259019815072⟩,⟨-9430815741790080823041515556572767833354749374658455,-9430815741790080823041515556572767833354749374655869⟩⟩, + ⟨⟨376764705696517831699201231693296163533042464569943,376764705696517831699201231693296163533042464570277⟩,⟨2136738825690278460176027945414666781612013905283338,2136738825690278460176027945414666781612013905283745⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087143,-253292510771476882280887790746358889981305021087100⟩,⟨-146238499277628361511635005726653803472759225582287,-146238499277628361511635005726653803472759225582248⟩⟩, + ⟨⟨25687470182638744248345993278860334823004652699922,25687470182638744248345993278860334823004652699926⟩,⟨-9349474540081111701289712237162482753386818985687,-9349474540081111701289712237162482753386818985684⟩⟩, + ⟨⟨-513992798520742604087836609022257398578693385997,-513992798520742604087836609022257398578693385996⟩,⟨1412183607698029485173173033284364111570111127065,1412183607698029485173173033284364111570111127066⟩⟩, + ⟨⟨-17851379306351118348588257534991919369233303905,-17851379306351118348588257534991919369233303904⟩,⟨-30919495943783799106553685393842637937171023082,-30919495943783799106553685393842637937171023081⟩⟩, + ⟨⟨180662021281106272882257418728483043148784566,180662021281106272882257418728483043148784567⟩,⟨31855588741185914270536868752431019673162713,31855588741185914270536868752431019673162714⟩⟩, + ⟨⟨-17154553901109613112642392582661646580809,-17154553901109613112642392582661646580808⟩,⟨14394379851431846370750906544945771856548,14394379851431846370750906544945771856549⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-17154553901109613112642392582661646580809,-17154553901109613112642392582661646580808⟩,⟨-14394379851431846370750906544945771856549,-14394379851431846370750906544945771856548⟩⟩, + ⟨⟨180662021281106272882257418728483043148784566,180662021281106272882257418728483043148784567⟩,⟨-31855588741185914270536868752431019673162714,-31855588741185914270536868752431019673162713⟩⟩, + ⟨⟨-17851379306351118348588257534991919369233303905,-17851379306351118348588257534991919369233303904⟩,⟨30919495943783799106553685393842637937171023081,30919495943783799106553685393842637937171023082⟩⟩, + ⟨⟨-513992798520742604087836609022257398578693385997,-513992798520742604087836609022257398578693385996⟩,⟨-1412183607698029485173173033284364111570111127066,-1412183607698029485173173033284364111570111127065⟩⟩, + ⟨⟨25687470182638744248345993278860334823004652699922,25687470182638744248345993278860334823004652699926⟩,⟨9349474540081111701289712237162482753386818985684,9349474540081111701289712237162482753386818985687⟩⟩, + ⟨⟨-253292510771476882280887790746358889981305021087143,-253292510771476882280887790746358889981305021087100⟩,⟨146238499277628361511635005726653803472759225582248,146238499277628361511635005726653803472759225582287⟩⟩, + ⟨⟨376764705696517831699201231693296163533042464569943,376764705696517831699201231693296163533042464570277⟩,⟨-2136738825690278460176027945414666781612013905283745,-2136738825690278460176027945414666781612013905283338⟩⟩, + ⟨⟨7913394010636943223714743625330488859821259019812552,7913394010636943223714743625330488859821259019815072⟩,⟨9430815741790080823041515556572767833354749374655869,9430815741790080823041515556572767833354749374658455⟩⟩, + ⟨⟨-56921729219679268117752553035921843729028297560553934,-56921729219679268117752553035921843729028297560537641⟩,⟨-6665,7273⟩⟩, + ⟨⟨143943798514318463707509065449457718565486339135752773,143943798514318463707509065449457718565486339135810106⟩,⟨-171545539011096131126423925826616465808087912130919943,-171545539011096131126423925826616465808087912130861523⟩⟩, + ⟨⟨134245766636646801748787137719069512750131783907078943,134245766636646801748787137719069512750131783907177711⟩,⟨761345575687056675429503141948610697084760207817111193,761345575687056675429503141948610697084760207817236049⟩⟩, + ⟨⟨-2074972248239938619645032781794172026726850732746114840,-2074972248239938619645032781794172026726850732745308271⟩,⟨-1197985786082331537503313966912747958048843575970296104,-1197985786082331537503313966912747958048843575969525349⟩⟩, + ⟨⟨6373454044898943223400879911998071624579395833782104936,6373454044898943223400879911998071624579395833785200247⟩,⟨-2319747561806743388088418778287325220660344059851387413,-2319747561806743388088418778287325220660344059848460627⟩⟩, + ⟨⟨-6079132520141514205668296136922984275576632139199202559,-6079132520141514205668296136922984275576632139192929407⟩,⟨16702279328961082043742238063855042943883521252489498878,16702279328961082043742238063855042943883521252496208903⟩⟩, + ⟨⟨-21791234504823142515366525311269432823771122929803246896,-21791234504823142515366525311269432823771122929780532655⟩,⟨-37743525322001707893742291740530563888148221535563335512,-37743525322001707893742291740530563888148221535539954656⟩⟩] +lemma tw0_0_6_11_calc (j : Fin 31) : taylorWaveBox 0 0 6 11 j = tw0_0_6_11 j := by + revert j + decide +kernel +def tw0_0_6_12 : Fin 31 → CI := ![⟨⟨7058022730486958381136491702350017063996955730529882041,7058022730486958381136491702350017063996955730534276718⟩,⟨4074951323393142878532497251109791508755607371560745267,4074951323393142878532497251109791508755607371565005792⟩⟩, + ⟨⟨-2915097668781599827038136805498677783984484818413331707,-2915097668781599827038136805498677783984484818412151307⟩,⟨1061008781415299266940026912049575144620781757580482527,1061008781415299266940026912049575144620781757581580777⟩⟩, + ⟨⟨375952875708784516626958000722572900982883799293180097,375952875708784516626958000722572900982883799293655628⟩,⟨-1032922036788915632431125416292463159431793410271174388,-1032922036788915632431125416292463159431793410270669454⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690922778,179218254507678396558872331947278891371354432691038654⟩,⟨310415122451108950031301992179391381861466766399379556,310415122451108950031301992179391381861466766399501208⟩⟩, + ⟨⟨-104405612466813653434022545869198146526718531502411323,-104405612466813653434022545869198146526718531502393868⟩,⟨-18409526415291321199321903509439677871902209714269419,-18409526415291321199321903509439677871902209714255815⟩⟩, + ⟨⟨21385960520371463889709211634969875276697080077834633,21385960520371463889709211634969875276697080077841985⟩,⟨-17944951585015566665402053292337981862750640091984206,-17944951585015566665402053292337981862750640091977000⟩⟩, + ⟨⟨-816,748⟩,⟨6386603083791852241089888205092732398089436736504985,6386603083791852241089888205092732398089436736506835⟩⟩, + ⟨⟨-940564490532276010782167192802696235608196196690131,-940564490532276010782167192802696235608196196689870⟩,⟨-789227317104079078183010238278049377066548836332918,-789227317104079078183010238278049377066548836332663⟩⟩, + ⟨⟨186465638817462793771274929935786060362345442517339,186465638817462793771274929935786060362345442517376⟩,⟨-32878923098558359546135419191182336556819100730216,-32878923098558359546135419191182336556819100730186⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573426,-10938614166728417758720235104204033897177394573422⟩,⟨18946235501166317750933959483605431021818039941370,18946235501166317750933959483605431021818039941374⟩⟩, + ⟨⟨-582782550199278401027034975690593199470034891949,-582782550199278401027034975690593199470034891948⟩,⟨-1601181897124697287910334808621591391330151734760,-1601181897124697287910334808621591391330151734759⟩⟩, + ⟨⟨70420724562921587563261790038427175580038549908,70420724562921587563261790038427175580038549909⟩,⟨25631047616362281115753349452177948739213356983,25631047616362281115753349452177948739213356984⟩⟩, + ⟨⟨-1156386444162983261165402800513026795765261227,-1156386444162983261165402800513026795765261226⟩,⟨667640024824732529218764349621828240794518711,667640024824732529218764349621828240794518712⟩⟩, + ⟨⟨794264155278471409731782880376631800439787,794264155278471409731782880376631800439788⟩,⟨-4504495863804812326965902431691187952495443,-4504495863804812326965902431691187952495442⟩⟩, + ⟨⟨179449515850155666654020532923379818627,179449515850155666654020532923379818628⟩,⟨213859605203714638897092116349698752766,213859605203714638897092116349698752767⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨179449515850155666654020532923379818627,179449515850155666654020532923379818628⟩,⟨-213859605203714638897092116349698752767,-213859605203714638897092116349698752766⟩⟩, + ⟨⟨794264155278471409731782880376631800439787,794264155278471409731782880376631800439788⟩,⟨4504495863804812326965902431691187952495442,4504495863804812326965902431691187952495443⟩⟩, + ⟨⟨-1156386444162983261165402800513026795765261227,-1156386444162983261165402800513026795765261226⟩,⟨-667640024824732529218764349621828240794518712,-667640024824732529218764349621828240794518711⟩⟩, + ⟨⟨70420724562921587563261790038427175580038549908,70420724562921587563261790038427175580038549909⟩,⟨-25631047616362281115753349452177948739213356984,-25631047616362281115753349452177948739213356983⟩⟩, + ⟨⟨-582782550199278401027034975690593199470034891949,-582782550199278401027034975690593199470034891948⟩,⟨1601181897124697287910334808621591391330151734759,1601181897124697287910334808621591391330151734760⟩⟩, + ⟨⟨-10938614166728417758720235104204033897177394573426,-10938614166728417758720235104204033897177394573422⟩,⟨-18946235501166317750933959483605431021818039941374,-18946235501166317750933959483605431021818039941370⟩⟩, + ⟨⟨186465638817462793771274929935786060362345442517339,186465638817462793771274929935786060362345442517376⟩,⟨32878923098558359546135419191182336556819100730186,32878923098558359546135419191182336556819100730216⟩⟩, + ⟨⟨-940564490532276010782167192802696235608196196690131,-940564490532276010782167192802696235608196196689870⟩,⟨789227317104079078183010238278049377066548836332663,789227317104079078183010238278049377066548836332918⟩⟩, + ⟨⟨-816,748⟩,⟨-6386603083791852241089888205092732398089436736506835,-6386603083791852241089888205092732398089436736504985⟩⟩, + ⟨⟨21385960520371463889709211634969875276697080077834633,21385960520371463889709211634969875276697080077841985⟩,⟨17944951585015566665402053292337981862750640091977000,17944951585015566665402053292337981862750640091984206⟩⟩, + ⟨⟨-104405612466813653434022545869198146526718531502411323,-104405612466813653434022545869198146526718531502393868⟩,⟨18409526415291321199321903509439677871902209714255815,18409526415291321199321903509439677871902209714269419⟩⟩, + ⟨⟨179218254507678396558872331947278891371354432690922778,179218254507678396558872331947278891371354432691038654⟩,⟨-310415122451108950031301992179391381861466766399501208,-310415122451108950031301992179391381861466766399379556⟩⟩, + ⟨⟨375952875708784516626958000722572900982883799293180097,375952875708784516626958000722572900982883799293655628⟩,⟨1032922036788915632431125416292463159431793410270669454,1032922036788915632431125416292463159431793410271174388⟩⟩, + ⟨⟨-2915097668781599827038136805498677783984484818413331707,-2915097668781599827038136805498677783984484818412151307⟩,⟨-1061008781415299266940026912049575144620781757581580777,-1061008781415299266940026912049575144620781757580482527⟩⟩, + ⟨⟨7058022730486958381136491702350017063996955730529882041,7058022730486958381136491702350017063996955730534276718⟩,⟨-4074951323393142878532497251109791508755607371565005792,-4074951323393142878532497251109791508755607371560745267⟩⟩] +lemma tw0_0_6_12_calc (j : Fin 31) : taylorWaveBox 0 0 6 12 j = tw0_0_6_12 j := by + revert j + decide +kernel +def tw0_0_6_13 : Fin 31 → CI := ![⟨⟨711213174517105746409924496561635036133590707082415415,711213174517105746409924496561635036133590707083161282⟩,⟨-1231857353275977869214001563220895965360893961740611016,-1231857353275977869214001563220895965360893961739840078⟩⟩, + ⟨⟨172835568530518077542986268574787459705844624522187156,172835568530518077542986268574787459705844624522366609⟩,⟨474861821816200330437057650718039768530314243088741631,474861821816200330437057650718039768530314243088935427⟩⟩, + ⟨⟨-156241717305895649799686194893015364349777912647860670,-156241717305895649799686194893015364349777912647783795⟩,⟨-56867334449980603325546142739737348321935146171645768,-56867334449980603325546142739737348321935146171573656⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797352634,43342127478025776420404444686963708682595437797369758⟩,⟨-25023588966689257663727985644023700918120860663570426,-25023588966689257663727985644023700918120860663554166⟩⟩, + ⟨⟨-2356250230984485233749636889023056288022248058199780,-2356250230984485233749636889023056288022248058198031⟩,⟨13362959097452339802325197376224305745844335886969203,13362959097452339802325197376224305745844335886971481⟩⟩, + ⟨⟨-2087989928463311860594091717496084599649455428935645,-2087989928463311860594091717496084599649455428934799⟩,⟨-2488369498546679359248495754036358554503039855829735,-2488369498546679359248495754036358554503039855828871⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570327,668803510981146723247822633578313868995627098570524⟩,⟨-79,86⟩⟩, + ⟨⟨-73464614560786874180407583190795504546149696565150,-73464614560786874180407583190795504546149696565125⟩,⟨87551718331366665235419335891198115729575032531925,87551718331366665235419335891198115729575032531951⟩⟩, + ⟨⟨-2677945492039344171901262007132462227042984584341,-2677945492039344171901262007132462227042984584338⟩,⟨-15187383582929934288703478292373650299945640112665,-15187383582929934288703478292373650299945640112661⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨763659331258827443351073780640371732120387593492,763659331258827443351073780640371732120387593493⟩⟩, + ⟨⟨-93152986760516982981871627238405001428005589996,-93152986760516982981871627238405001428005589995⟩,⟨33904914413821813299438355150912029032760916078,33904914413821813299438355150912029032760916079⟩⟩, + ⟨⟨1192923124375909978050605797713512933529277621,1192923124375909978050605797713512933529277622⟩,⟨-3277529347368070561462085221246994647745472984,-3277529347368070561462085221246994647745472983⟩⟩, + ⟨⟨23305033302576521098360405903331656864025500,23305033302576521098360405903331656864025501⟩,⟨40365501752147242818404403223622318992945773,40365501752147242818404403223622318992945774⟩⟩, + ⟨⟨-104824378621146727671073595034211777478492,-104824378621146727671073595034211777478491⟩,⟨-18483366186907767246077091096549671970074,-18483366186907767246077091096549671970073⟩⟩, + ⟨⟨2488369498546679359248495754036358554,2488369498546679359248495754036358555⟩,⟨-2087989928463311860594091717496084600,-2087989928463311860594091717496084599⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨2488369498546679359248495754036358554,2488369498546679359248495754036358555⟩,⟨2087989928463311860594091717496084599,2087989928463311860594091717496084600⟩⟩, + ⟨⟨-104824378621146727671073595034211777478492,-104824378621146727671073595034211777478491⟩,⟨18483366186907767246077091096549671970073,18483366186907767246077091096549671970074⟩⟩, + ⟨⟨23305033302576521098360405903331656864025500,23305033302576521098360405903331656864025501⟩,⟨-40365501752147242818404403223622318992945774,-40365501752147242818404403223622318992945773⟩⟩, + ⟨⟨1192923124375909978050605797713512933529277621,1192923124375909978050605797713512933529277622⟩,⟨3277529347368070561462085221246994647745472983,3277529347368070561462085221246994647745472984⟩⟩, + ⟨⟨-93152986760516982981871627238405001428005589996,-93152986760516982981871627238405001428005589995⟩,⟨-33904914413821813299438355150912029032760916079,-33904914413821813299438355150912029032760916078⟩⟩, + ⟨⟨1322696761414360852673475484831656148760847100749,1322696761414360852673475484831656148760847100750⟩,⟨-763659331258827443351073780640371732120387593493,-763659331258827443351073780640371732120387593492⟩⟩, + ⟨⟨-2677945492039344171901262007132462227042984584341,-2677945492039344171901262007132462227042984584338⟩,⟨15187383582929934288703478292373650299945640112661,15187383582929934288703478292373650299945640112665⟩⟩, + ⟨⟨-73464614560786874180407583190795504546149696565150,-73464614560786874180407583190795504546149696565125⟩,⟨-87551718331366665235419335891198115729575032531951,-87551718331366665235419335891198115729575032531925⟩⟩, + ⟨⟨668803510981146723247822633578313868995627098570327,668803510981146723247822633578313868995627098570524⟩,⟨-86,79⟩⟩, + ⟨⟨-2087989928463311860594091717496084599649455428935645,-2087989928463311860594091717496084599649455428934799⟩,⟨2488369498546679359248495754036358554503039855828871,2488369498546679359248495754036358554503039855829735⟩⟩, + ⟨⟨-2356250230984485233749636889023056288022248058199780,-2356250230984485233749636889023056288022248058198031⟩,⟨-13362959097452339802325197376224305745844335886971481,-13362959097452339802325197376224305745844335886969203⟩⟩, + ⟨⟨43342127478025776420404444686963708682595437797352634,43342127478025776420404444686963708682595437797369758⟩,⟨25023588966689257663727985644023700918120860663554166,25023588966689257663727985644023700918120860663570426⟩⟩, + ⟨⟨-156241717305895649799686194893015364349777912647860670,-156241717305895649799686194893015364349777912647783795⟩,⟨56867334449980603325546142739737348321935146171573656,56867334449980603325546142739737348321935146171645768⟩⟩, + ⟨⟨172835568530518077542986268574787459705844624522187156,172835568530518077542986268574787459705844624522366609⟩,⟨-474861821816200330437057650718039768530314243088935427,-474861821816200330437057650718039768530314243088741631⟩⟩, + ⟨⟨711213174517105746409924496561635036133590707082415415,711213174517105746409924496561635036133590707083161282⟩,⟨1231857353275977869214001563220895965360893961739840078,1231857353275977869214001563220895965360893961740611016⟩⟩] +lemma tw0_0_6_13_calc (j : Fin 31) : taylorWaveBox 0 0 6 13 j = tw0_0_6_13 j := by + revert j + decide +kernel +def tw0_0_6_14 : Fin 31 → CI := ![⟨⟨-201562188089707223595102174191806275779722154968241320,-201562188089707223595102174191806275779722154968114533⟩,⟨-116371983552042445686522962423844893895399380113677515,-116371983552042445686522962423844893895399380113555102⟩⟩, + ⟨⟨72519144973724184467495560806221113234773129109093048,72519144973724184467495560806221113234773129109122876⟩,⟨-26394810184871082907257877832460534542345150403148873,-26394810184871082907257877832460534542345150403121383⟩⟩, + ⟨⟨-8064243061752801297654377243802573435783938663723088,-8064243061752801297654377243802573435783938663712835⟩,⟨22156325717159428682521296183746576262458161482466106,22156325717159428682521296183746576262458161482477079⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394403376,-3275580136008399049375563065350230572121000394401236⟩,⟨-5673471219829920494753699488938742157419895557686222,-5673471219829920494753699488938742157419895557683961⟩⟩, + ⟨⟨1603439984161627816958056494739234525866908742850921,1603439984161627816958056494739234525866908742851200⟩,⟨282729731154448730689760129823307096164219040928376,282729731154448730689760129823307096164219040928587⟩⟩, + ⟨⟨-271439004723998804083379578447167029898398020177909,-271439004723998804083379578447167029898398020177813⟩,⟨227764368751035363301247171740112454514082798425701,227764368751035363301247171740112454514082798425795⟩⟩, + ⟨⟨-8,9⟩,⟨-65659631149794723622098140181990406812989656915306,-65659631149794723622098140181990406812989656915286⟩⟩, + ⟨⟨7640328753305120734453606295698465470959279796747,7640328753305120734453606295698465470959279796750⟩,⟨6410997038971494409950561557782714145179390382405,6410997038971494409950561557782714145179390382408⟩⟩, + ⟨⟨-1159680586248890268945138222425992578271088809868,-1159680586248890268945138222425992578271088809867⟩,⟨204482976359489425246242600131140217982714625732,204482976359489425246242600131140217982714625733⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨-86570300595549323955592338393230318564146355556,-86570300595549323955592338393230318564146355555⟩⟩, + ⟨⟨1849226216025230895565624116382459283952477517,1849226216025230895565624116382459283952477518⟩,⟨5080707271992837256102899153223491502791258742,5080707271992837256102899153223491502791258743⟩⟩, + ⟨⟨-143009196105784444591881114575706449401756707,-143009196105784444591881114575706449401756706⟩,⟨-52051090608843638749941904190285810582339378,-52051090608843638749941904190285810582339377⟩⟩, + ⟨⟨1320957955864705260552861608783421608949987,1320957955864705260552861608783421608949988⟩,⟨-762655431406665372051196886540909896632890,-762655431406665372051196886540909896632889⟩⟩, + ⟨⟨-403244496016662713680396422076745051201,-403244496016662713680396422076745051200⟩,⟨2286913179120205137661368164885157027166,2286913179120205137661368164885157027167⟩⟩, + ⟨⟨-22776436875103536330124717174011246,-22776436875103536330124717174011245⟩,⟨-27143900472399880408337957844716703,-27143900472399880408337957844716702⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-22776436875103536330124717174011246,-22776436875103536330124717174011245⟩,⟨27143900472399880408337957844716702,27143900472399880408337957844716703⟩⟩, + ⟨⟨-403244496016662713680396422076745051201,-403244496016662713680396422076745051200⟩,⟨-2286913179120205137661368164885157027167,-2286913179120205137661368164885157027166⟩⟩, + ⟨⟨1320957955864705260552861608783421608949987,1320957955864705260552861608783421608949988⟩,⟨762655431406665372051196886540909896632889,762655431406665372051196886540909896632890⟩⟩, + ⟨⟨-143009196105784444591881114575706449401756707,-143009196105784444591881114575706449401756706⟩,⟨52051090608843638749941904190285810582339377,52051090608843638749941904190285810582339378⟩⟩, + ⟨⟨1849226216025230895565624116382459283952477517,1849226216025230895565624116382459283952477518⟩,⟨-5080707271992837256102899153223491502791258743,-5080707271992837256102899153223491502791258742⟩⟩, + ⟨⟨49981386352667221822747239156345070985733038244,49981386352667221822747239156345070985733038245⟩,⟨86570300595549323955592338393230318564146355555,86570300595549323955592338393230318564146355556⟩⟩, + ⟨⟨-1159680586248890268945138222425992578271088809868,-1159680586248890268945138222425992578271088809867⟩,⟨-204482976359489425246242600131140217982714625733,-204482976359489425246242600131140217982714625732⟩⟩, + ⟨⟨7640328753305120734453606295698465470959279796747,7640328753305120734453606295698465470959279796750⟩,⟨-6410997038971494409950561557782714145179390382408,-6410997038971494409950561557782714145179390382405⟩⟩, + ⟨⟨-8,9⟩,⟨65659631149794723622098140181990406812989656915286,65659631149794723622098140181990406812989656915306⟩⟩, + ⟨⟨-271439004723998804083379578447167029898398020177909,-271439004723998804083379578447167029898398020177813⟩,⟨-227764368751035363301247171740112454514082798425795,-227764368751035363301247171740112454514082798425701⟩⟩, + ⟨⟨1603439984161627816958056494739234525866908742850921,1603439984161627816958056494739234525866908742851200⟩,⟨-282729731154448730689760129823307096164219040928587,-282729731154448730689760129823307096164219040928376⟩⟩, + ⟨⟨-3275580136008399049375563065350230572121000394403376,-3275580136008399049375563065350230572121000394401236⟩,⟨5673471219829920494753699488938742157419895557683961,5673471219829920494753699488938742157419895557686222⟩⟩, + ⟨⟨-8064243061752801297654377243802573435783938663723088,-8064243061752801297654377243802573435783938663712835⟩,⟨-22156325717159428682521296183746576262458161482477079,-22156325717159428682521296183746576262458161482466106⟩⟩, + ⟨⟨72519144973724184467495560806221113234773129109093048,72519144973724184467495560806221113234773129109122876⟩,⟨26394810184871082907257877832460534542345150403121383,26394810184871082907257877832460534542345150403148873⟩⟩, + ⟨⟨-201562188089707223595102174191806275779722154968241320,-201562188089707223595102174191806275779722154968114533⟩,⟨116371983552042445686522962423844893895399380113555102,116371983552042445686522962423844893895399380113677515⟩⟩] +lemma tw0_0_6_14_calc (j : Fin 31) : taylorWaveBox 0 0 6 14 j = tw0_0_6_14 j := by + revert j + decide +kernel +def tw0_0_6_15 : Fin 31 → CI := ![⟨⟨-17921243559351411743059444294652121584177020296569119,-17921243559351411743059444294652121584177020296550209⟩,⟨31040504379613153638845397438259401537550658444195800,31040504379613153638845397438259401537550658444215425⟩⟩, + ⟨⟨-3793805179005335455803658547853051473311541055288318,-3793805179005335455803658547853051473311541055284354⟩,⟨-10423394063127160400997832665273145235731940921101008,-10423394063127160400997832665273145235731940921096686⟩⟩, + ⟨⟨2957124024007904207797250899130863519431964945781648,2957124024007904207797250899130863519431964945783122⟩,⟨1076305123772371910360366944827320127709562152938796,1076305123772371910360366944827320127709562152940169⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635475073,-698970019787090239214134897920947303315208635474791⟩,⟨403550529079554596708656969046895623673248550739900,403550529079554596708656969046895623673248550740166⟩⟩, + ⟨⟨31929536306563946626866632960542574274576073417543,31929536306563946626866632960542574274576073417568⟩,⟨-181081398764239699762631983512251247703834730342331,-181081398764239699762631983512251247703834730342298⟩⟩, + ⟨⟨23383753843717953207269829457490677600253832976054,23383753843717953207269829457490677600253832976064⟩,⟨27867672651589536775502473644701076015069408780364,27867672651589536775502473644701076015069408780375⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261128⟩,⟨-1,1⟩⟩, + ⟨⟨526555325485457888107729922122946353655814416922,526555325485457888107729922122946353655814416923⟩,⟨-627524200846908000129895200305148304717162028109,-627524200846908000129895200305148304717162028108⟩⟩, + ⟨⟨14695475536621017627961840496844930604960187706,14695475536621017627961840496844930604960187707⟩,⟨83342183241475581268204610478810332860164401226,83342183241475581268204610478810332860164401227⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨-3078846199642597936314826729178585996042240530,-3078846199642597936314826729178585996042240529⟩⟩, + ⟨⟨260809030077335571699786032542783432045089897,260809030077335571699786032542783432045089898⟩,⟨-94926723775988845796358099608024607997083556,-94926723775988845796358099608024607997083555⟩⟩, + ⟨⟨-2137559789125226844683738093826479806274308,-2137559789125226844683738093826479806274307⟩,⟨5872897253355744821342603260559866260065089,5872897253355744821342603260559866260065090⟩⟩, + ⟨⟨-23489732358113082399862874825886428802813,-23489732358113082399862874825886428802812⟩,⟨-40685409900446552737507439330275362783299,-40685409900446552737507439330275362783298⟩⟩, + ⟨⟨46957840803409904538078515415369225364,46957840803409904538078515415369225365⟩,⟨8279934289454027608335163343171268103,8279934289454027608335163343171268104⟩⟩, + ⟨⟨-278676726515895367755024736447011,-278676726515895367755024736447010⟩,⟨233837538437179532072698294574906,233837538437179532072698294574907⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-278676726515895367755024736447011,-278676726515895367755024736447010⟩,⟨-233837538437179532072698294574907,-233837538437179532072698294574906⟩⟩, + ⟨⟨46957840803409904538078515415369225364,46957840803409904538078515415369225365⟩,⟨-8279934289454027608335163343171268104,-8279934289454027608335163343171268103⟩⟩, + ⟨⟨-23489732358113082399862874825886428802813,-23489732358113082399862874825886428802812⟩,⟨40685409900446552737507439330275362783298,40685409900446552737507439330275362783299⟩⟩, + ⟨⟨-2137559789125226844683738093826479806274308,-2137559789125226844683738093826479806274307⟩,⟨-5872897253355744821342603260559866260065090,-5872897253355744821342603260559866260065089⟩⟩, + ⟨⟨260809030077335571699786032542783432045089897,260809030077335571699786032542783432045089898⟩,⟨94926723775988845796358099608024607997083555,94926723775988845796358099608024607997083556⟩⟩, + ⟨⟨-5332718046471330560410575087897852350732487759,-5332718046471330560410575087897852350732487758⟩,⟨3078846199642597936314826729178585996042240529,3078846199642597936314826729178585996042240530⟩⟩, + ⟨⟨14695475536621017627961840496844930604960187706,14695475536621017627961840496844930604960187707⟩,⟨-83342183241475581268204610478810332860164401227,-83342183241475581268204610478810332860164401226⟩⟩, + ⟨⟨526555325485457888107729922122946353655814416922,526555325485457888107729922122946353655814416923⟩,⟨627524200846908000129895200305148304717162028108,627524200846908000129895200305148304717162028109⟩⟩, + ⟨⟨-6066935731106195667101445665327140070166203261131,-6066935731106195667101445665327140070166203261128⟩,⟨-1,1⟩⟩, + ⟨⟨23383753843717953207269829457490677600253832976054,23383753843717953207269829457490677600253832976064⟩,⟨-27867672651589536775502473644701076015069408780375,-27867672651589536775502473644701076015069408780364⟩⟩, + ⟨⟨31929536306563946626866632960542574274576073417543,31929536306563946626866632960542574274576073417568⟩,⟨181081398764239699762631983512251247703834730342298,181081398764239699762631983512251247703834730342331⟩⟩, + ⟨⟨-698970019787090239214134897920947303315208635475073,-698970019787090239214134897920947303315208635474791⟩,⟨-403550529079554596708656969046895623673248550740166,-403550529079554596708656969046895623673248550739900⟩⟩, + ⟨⟨2957124024007904207797250899130863519431964945781648,2957124024007904207797250899130863519431964945783122⟩,⟨-1076305123772371910360366944827320127709562152940169,-1076305123772371910360366944827320127709562152938796⟩⟩, + ⟨⟨-3793805179005335455803658547853051473311541055288318,-3793805179005335455803658547853051473311541055284354⟩,⟨10423394063127160400997832665273145235731940921096686,10423394063127160400997832665273145235731940921101008⟩⟩, + ⟨⟨-17921243559351411743059444294652121584177020296569119,-17921243559351411743059444294652121584177020296550209⟩,⟨-31040504379613153638845397438259401537550658444215425,-31040504379613153638845397438259401537550658444195800⟩⟩] +lemma tw0_0_6_15_calc (j : Fin 31) : taylorWaveBox 0 0 6 15 j = tw0_0_6_15 j := by + revert j + decide +kernel +def tw0_0_6_16 : Fin 31 → CI := ![⟨⟨4514658357533078058126056621844135307725227288722632,4514658357533078058126056621844135307725227288725501⟩,⟨2606539218020916335801904305695669616417146414197322,2606539218020916335801904305695669616417146414200081⟩⟩, + ⟨⟨-1414953132711989312503331390271063682357777984139672,-1414953132711989312503331390271063682357777984139080⟩,⟨515000823188879669806330841358650536513308361549478,515000823188879669806330841358650536513308361550019⟩⟩, + ⟨⟨135669936753815979606294779979656663826606543176493,135669936753815979606294779979656663826606543176668⟩,⟨-372750087729946141856130074395691315281896558669324,-372750087729946141856130074395691315281896558669136⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910358,46955236204022331368942161583079895990618065910390⟩,⟨81328854786764263382283872837366397192702514363819,81328854786764263382283872837366397192702514363853⟩⟩, + ⟨⟨-19313962693378062807360753024514251134046918332904,-19313962693378062807360753024514251134046918332900⟩,⟨-3405572727239285880257962054137149906765144598163,-3405572727239285880257962054137149906765144598159⟩⟩, + ⟨⟨2702125792434533407629312181695054762384497283888,2702125792434533407629312181695054762384497283890⟩,⟨-2267352755826432466267172190898043217059047861356,-2267352755826432466267172190898043217059047861354⟩⟩, + ⟨⟨-1,1⟩,⟨529440020073462376192782879028056848059477939597,529440020073462376192782879028056848059477939598⟩⟩, + ⟨⟨-48677170847665483496448936740565738006754746431,-48677170847665483496448936740565738006754746430⟩,⟨-40844996105029553833776786737181289821663877621,-40844996105029553833776786737181289821663877620⟩⟩, + ⟨⟨5656760290860736018578489776724083730960765066,5656760290860736018578489776724083730960765067⟩,⟨-997439462679011712130137879297595027411858797,-997439462679011712130137879297595027411858796⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨310244959971482327965865603780236805697259957,310244959971482327965865603780236805697259958⟩⟩, + ⟨⟨-4602177438950526475251200749245236533556412,-4602177438950526475251200749245236533556411⟩,⟨-12644378593840074943475543685472985539695532,-12644378593840074943475543685472985539695531⟩⟩, + ⟨⟨227780874894198550818367508127105032113768,227780874894198550818367508127105032113769⟩,⟨82905458396601978551265386730310546627375,82905458396601978551265386730310546627376⟩⟩, + ⟨⟨-1183490600477151214469396987076709006109,-1183490600477151214469396987076709006108⟩,⟨683288616768875091932454402312285615926,683288616768875091932454402312285615927⟩⟩, + ⟨⟨160569016888611097373085726720544095,160569016888611097373085726720544096⟩,⟨-910632146274269076808118556454600443,-910632146274269076808118556454600442⟩⟩, + ⟨⟨2267352755826432466267172190898,2267352755826432466267172190899⟩,⟨2702125792434533407629312181695,2702125792434533407629312181696⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨2267352755826432466267172190898,2267352755826432466267172190899⟩,⟨-2702125792434533407629312181696,-2702125792434533407629312181695⟩⟩, + ⟨⟨160569016888611097373085726720544095,160569016888611097373085726720544096⟩,⟨910632146274269076808118556454600442,910632146274269076808118556454600443⟩⟩, + ⟨⟨-1183490600477151214469396987076709006109,-1183490600477151214469396987076709006108⟩,⟨-683288616768875091932454402312285615927,-683288616768875091932454402312285615926⟩⟩, + ⟨⟨227780874894198550818367508127105032113768,227780874894198550818367508127105032113769⟩,⟨-82905458396601978551265386730310546627376,-82905458396601978551265386730310546627375⟩⟩, + ⟨⟨-4602177438950526475251200749245236533556412,-4602177438950526475251200749245236533556411⟩,⟨12644378593840074943475543685472985539695531,12644378593840074943475543685472985539695532⟩⟩, + ⟨⟨-179120011154259992099541326839751800501320137,-179120011154259992099541326839751800501320136⟩,⟨-310244959971482327965865603780236805697259958,-310244959971482327965865603780236805697259957⟩⟩, + ⟨⟨5656760290860736018578489776724083730960765066,5656760290860736018578489776724083730960765067⟩,⟨997439462679011712130137879297595027411858796,997439462679011712130137879297595027411858797⟩⟩, + ⟨⟨-48677170847665483496448936740565738006754746431,-48677170847665483496448936740565738006754746430⟩,⟨40844996105029553833776786737181289821663877620,40844996105029553833776786737181289821663877621⟩⟩, + ⟨⟨-1,1⟩,⟨-529440020073462376192782879028056848059477939598,-529440020073462376192782879028056848059477939597⟩⟩, + ⟨⟨2702125792434533407629312181695054762384497283888,2702125792434533407629312181695054762384497283890⟩,⟨2267352755826432466267172190898043217059047861354,2267352755826432466267172190898043217059047861356⟩⟩, + ⟨⟨-19313962693378062807360753024514251134046918332904,-19313962693378062807360753024514251134046918332900⟩,⟨3405572727239285880257962054137149906765144598159,3405572727239285880257962054137149906765144598163⟩⟩, + ⟨⟨46955236204022331368942161583079895990618065910358,46955236204022331368942161583079895990618065910390⟩,⟨-81328854786764263382283872837366397192702514363853,-81328854786764263382283872837366397192702514363819⟩⟩, + ⟨⟨135669936753815979606294779979656663826606543176493,135669936753815979606294779979656663826606543176668⟩,⟨372750087729946141856130074395691315281896558669136,372750087729946141856130074395691315281896558669324⟩⟩, + ⟨⟨-1414953132711989312503331390271063682357777984139672,-1414953132711989312503331390271063682357777984139080⟩,⟨-515000823188879669806330841358650536513308361550019,-515000823188879669806330841358650536513308361549478⟩⟩, + ⟨⟨4514658357533078058126056621844135307725227288722632,4514658357533078058126056621844135307725227288725501⟩,⟨-2606539218020916335801904305695669616417146414200081,-2606539218020916335801904305695669616417146414197322⟩⟩] +lemma tw0_0_6_16_calc (j : Fin 31) : taylorWaveBox 0 0 6 16 j = tw0_0_6_16 j := by + revert j + decide +kernel +def tw0_0_6_17 : Fin 31 → CI := ![⟨⟨359152827132815577520148497810446873484169467973068,359152827132815577520148497810446873484169467973451⟩,⟨-622070944276038605487991186313010558787987836966230,-622070944276038605487991186313010558787987836965831⟩⟩, + ⟨⟨66230758006199782672449825576915022341243448251924,66230758006199782672449825576915022341243448251994⟩,⟨181967512095397343024154238325711839875261872409609,181967512095397343024154238325711839875261872409687⟩⟩, + ⟨⟨-44512795859899258694050041178738711592985047036498,-44512795859899258694050041178738711592985047036474⟩,⟨-16201332736971175771542258525136121007917692747574,-16201332736971175771542258525136121007917692747552⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014812,8964987113086656144908199868279810049180380014817⟩,⟨-5175937723022106880706975999784460140708483619866,-5175937723022106880706975999784460140708483619862⟩⟩, + ⟨⟨-344117382668911315444559148156678827047855797991,-344117382668911315444559148156678827047855797989⟩,⟨1951586656144627026859542224489729987346412503438,1951586656144627026859542224489729987346412503440⟩⟩, + ⟨⟨-208277741543885745725780386266751246026996089132,-208277741543885745725780386266751246026996089131⟩,⟨-248215746742334171308324598760823723902798979267,-248215746742334171308324598760823723902798979266⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨-3001598589461159419879311632394481805117603484,-3001598589461159419879311632394481805117603483⟩,⟨3577165902516049857019432339543102130316437163,3577165902516049857019432339543102130316437164⟩⟩, + ⟨⟨-64136957363948940353655548743042498973445179,-64136957363948940353655548743042498973445178⟩,⟨-363738760263759801324696055744219539384324630,-363738760263759801324696055744219539384324629⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨9872317739528859864629699706620140344063727,9872317739528859864629699706620140344063728⟩⟩, + ⟨⟨-580752732450526600856737150214308152108635,-580752732450526600856737150214308152108634⟩,⟨211376708080755309076454735024981467079948,211376708080755309076454735024981467079949⟩⟩, + ⟨⟨3046259403991333506150652090023937741859,3046259403991333506150652090023937741860⟩,⟨-8369528926267484671788702763690300323537,-8369528926267484671788702763690300323536⟩⟩, + ⟨⟨18829951743180961350688361562004357040,18829951743180961350688361562004357041⟩,⟨32614433123259572839408792308967567984,32614433123259572839408792308967567985⟩⟩, + ⟨⟨-16730030765251168054062963039064752,-16730030765251168054062963039064751⟩,⟨-2949955811996468206719593781696160,-2949955811996468206719593781696159⟩⟩, + ⟨⟨24821574674233417130832459876,24821574674233417130832459877⟩,⟨-20827774154388574572578038627,-20827774154388574572578038626⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨24821574674233417130832459876,24821574674233417130832459877⟩,⟨20827774154388574572578038626,20827774154388574572578038627⟩⟩, + ⟨⟨-16730030765251168054062963039064752,-16730030765251168054062963039064751⟩,⟨2949955811996468206719593781696159,2949955811996468206719593781696160⟩⟩, + ⟨⟨18829951743180961350688361562004357040,18829951743180961350688361562004357041⟩,⟨-32614433123259572839408792308967567985,-32614433123259572839408792308967567984⟩⟩, + ⟨⟨3046259403991333506150652090023937741859,3046259403991333506150652090023937741860⟩,⟨8369528926267484671788702763690300323536,8369528926267484671788702763690300323537⟩⟩, + ⟨⟨-580752732450526600856737150214308152108635,-580752732450526600856737150214308152108634⟩,⟨-211376708080755309076454735024981467079949,-211376708080755309076454735024981467079948⟩⟩, + ⟨⟨17099355913327514924827956902083988283501396,17099355913327514924827956902083988283501397⟩,⟨-9872317739528859864629699706620140344063728,-9872317739528859864629699706620140344063727⟩⟩, + ⟨⟨-64136957363948940353655548743042498973445179,-64136957363948940353655548743042498973445178⟩,⟨363738760263759801324696055744219539384324629,363738760263759801324696055744219539384324630⟩⟩, + ⟨⟨-3001598589461159419879311632394481805117603484,-3001598589461159419879311632394481805117603483⟩,⟨-3577165902516049857019432339543102130316437164,-3577165902516049857019432339543102130316437163⟩⟩, + ⟨⟨43770654673137422771842713137763190948628970300,43770654673137422771842713137763190948628970301⟩,⟨-1,1⟩⟩, + ⟨⟨-208277741543885745725780386266751246026996089132,-208277741543885745725780386266751246026996089131⟩,⟨248215746742334171308324598760823723902798979266,248215746742334171308324598760823723902798979267⟩⟩, + ⟨⟨-344117382668911315444559148156678827047855797991,-344117382668911315444559148156678827047855797989⟩,⟨-1951586656144627026859542224489729987346412503440,-1951586656144627026859542224489729987346412503438⟩⟩, + ⟨⟨8964987113086656144908199868279810049180380014812,8964987113086656144908199868279810049180380014817⟩,⟨5175937723022106880706975999784460140708483619862,5175937723022106880706975999784460140708483619866⟩⟩, + ⟨⟨-44512795859899258694050041178738711592985047036498,-44512795859899258694050041178738711592985047036474⟩,⟨16201332736971175771542258525136121007917692747552,16201332736971175771542258525136121007917692747574⟩⟩, + ⟨⟨66230758006199782672449825576915022341243448251924,66230758006199782672449825576915022341243448251994⟩,⟨-181967512095397343024154238325711839875261872409687,-181967512095397343024154238325711839875261872409609⟩⟩, + ⟨⟨359152827132815577520148497810446873484169467973068,359152827132815577520148497810446873484169467973451⟩,⟨622070944276038605487991186313010558787987836965831,622070944276038605487991186313010558787987836966230⟩⟩] +lemma tw0_0_6_17_calc (j : Fin 31) : taylorWaveBox 0 0 6 17 j = tw0_0_6_17 j := by + revert j + decide +kernel +def tw0_0_6_18 : Fin 31 → CI := ![⟨⟨-81428896189552855155146582162217359628031458223047,-81428896189552855155146582162217359628031458222993⟩,⟨-47012995134852432606621988115494129887473178666149,-47012995134852432606621988115494129887473178666098⟩⟩, + ⟨⟨22231525524091027519438715008950773737959634268074,22231525524091027519438715008950773737959634268085⟩,⟨-8091613553098468514499672521188985602711602598581,-8091613553098468514499672521188985602711602598572⟩⟩, + ⟨⟨-1837982896563394525352699681131033631914673412668,-1837982896563394525352699681131033631914673412665⟩,⟨5049816505651727133155379628754918948021446865240,5049816505651727133155379628754918948021446865244⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨-938811255133340262646138237899899244591360555188,-938811255133340262646138237899899244591360555187⟩⟩, + ⟨⟨187338870332405922382853099254430182020133391778,187338870332405922382853099254430182020133391779⟩,⟨33032897375047760228034894501605196136047441249,33032897375047760228034894501605196136047441250⟩⟩, + ⟨⟨-21660910179750602382268348684341164004098670972,-21660910179750602382268348684341164004098670971⟩,⟨18175661742792920542455322951957157239827939064,18175661742792920542455322951957157239827939065⟩⟩, + ⟨⟨-1,1⟩,⟨-3437739179098607000216892970677563681642053416,-3437739179098607000216892970677563681642053415⟩⟩, + ⟨⟨249733291555918326834600769866049794723221158,249733291555918326834600769866049794723221159⟩,⟨209551112837259204777728604159734578170055103,209551112837259204777728604159734578170055104⟩⟩, + ⟨⟨-22219536443037243243281342441610441592306593,-22219536443037243243281342441610441592306592⟩,⟨3917903773742462425269510994412537355834094,3917903773742462425269510994412537355834095⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨-895320181973781836172235715770625347701417,-895320181973781836172235715770625347701416⟩⟩, + ⟨⟨9223048795090210595553553964450014571074,9223048795090210595553553964450014571075⟩,⟨25340118303038515139591862560827555757770,25340118303038515139591862560827555757771⟩⟩, + ⟨⟨-292151673208546668083461946537821367382,-292151673208546668083461946537821367381⟩,⟨-106334512938977726863032770963537066015,-106334512938977726863032770963537066014⟩⟩, + ⟨⟨853843862508565746471629825373292300,853843862508565746471629825373292301⟩,⟨-492966983865230243729212578101923728,-492966983865230243729212578101923727⟩⟩, + ⟨⟨-51486441707681209843652526785075,-51486441707681209843652526785074⟩,⟨291994120813579423794053632269057,291994120813579423794053632269058⟩⟩, + ⟨⟨-181756617427929205424553230,-181756617427929205424553229⟩,⟨-216609101797506023822683487,-216609101797506023822683486⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-181756617427929205424553230,-181756617427929205424553229⟩,⟨216609101797506023822683486,216609101797506023822683487⟩⟩, + ⟨⟨-51486441707681209843652526785075,-51486441707681209843652526785074⟩,⟨-291994120813579423794053632269058,-291994120813579423794053632269057⟩⟩, + ⟨⟨853843862508565746471629825373292300,853843862508565746471629825373292301⟩,⟨492966983865230243729212578101923727,492966983865230243729212578101923728⟩⟩, + ⟨⟨-292151673208546668083461946537821367382,-292151673208546668083461946537821367381⟩,⟨106334512938977726863032770963537066014,106334512938977726863032770963537066015⟩⟩, + ⟨⟨9223048795090210595553553964450014571074,9223048795090210595553553964450014571075⟩,⟨-25340118303038515139591862560827555757771,-25340118303038515139591862560827555757770⟩⟩, + ⟨⟨516913348073467668048602808295802774391484,516913348073467668048602808295802774391485⟩,⟨895320181973781836172235715770625347701416,895320181973781836172235715770625347701417⟩⟩, + ⟨⟨-22219536443037243243281342441610441592306593,-22219536443037243243281342441610441592306592⟩,⟨-3917903773742462425269510994412537355834095,-3917903773742462425269510994412537355834094⟩⟩, + ⟨⟨249733291555918326834600769866049794723221158,249733291555918326834600769866049794723221159⟩,⟨-209551112837259204777728604159734578170055104,-209551112837259204777728604159734578170055103⟩⟩, + ⟨⟨-1,1⟩,⟨3437739179098607000216892970677563681642053415,3437739179098607000216892970677563681642053416⟩⟩, + ⟨⟨-21660910179750602382268348684341164004098670972,-21660910179750602382268348684341164004098670971⟩,⟨-18175661742792920542455322951957157239827939065,-18175661742792920542455322951957157239827939064⟩⟩, + ⟨⟨187338870332405922382853099254430182020133391778,187338870332405922382853099254430182020133391779⟩,⟨-33032897375047760228034894501605196136047441250,-33032897375047760228034894501605196136047441249⟩⟩, + ⟨⟨-542022930869484433491731738311579689960324793754,-542022930869484433491731738311579689960324793753⟩,⟨938811255133340262646138237899899244591360555187,938811255133340262646138237899899244591360555188⟩⟩, + ⟨⟨-1837982896563394525352699681131033631914673412668,-1837982896563394525352699681131033631914673412665⟩,⟨-5049816505651727133155379628754918948021446865244,-5049816505651727133155379628754918948021446865240⟩⟩, + ⟨⟨22231525524091027519438715008950773737959634268074,22231525524091027519438715008950773737959634268085⟩,⟨8091613553098468514499672521188985602711602598572,8091613553098468514499672521188985602711602598581⟩⟩, + ⟨⟨-81428896189552855155146582162217359628031458223047,-81428896189552855155146582162217359628031458222993⟩,⟨47012995134852432606621988115494129887473178666098,47012995134852432606621988115494129887473178666149⟩⟩] +lemma tw0_0_6_18_calc (j : Fin 31) : taylorWaveBox 0 0 6 18 j = tw0_0_6_18 j := by + revert j + decide +kernel +def tw0_0_6_19 : Fin 31 → CI := ![⟨⟨-5860939688051789411371205992794324400539448741823,-5860939688051789411371205992794324400539448741816⟩,⟨10151445319802585615026049916779046022334427963224,10151445319802585615026049916779046022334427963231⟩⟩, + ⟨⟨-941501988670435297502746567106550767843713472139,-941501988670435297502746567106550767843713472137⟩,⟨-2586755454243642592337334965453612746561232060393,-2586755454243642592337334965453612746561232060391⟩⟩, + ⟨⟨545603343041574881995496705950054120562806391237,545603343041574881995496705950054120562806391238⟩,⟨198583376583265179807116376167075556669601975816,198583376583265179807116376167075556669601975817⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨54057627228469227234095818009485456165873225657,54057627228469227234095818009485456165873225658⟩⟩, + ⟨⟨3019933822546538873879549191930767351772415010,3019933822546538873879549191930767351772415011⟩,⟨-17126895784256800101969225139333115566944566115,-17126895784256800101969225139333115566944566114⟩⟩, + ⟨⟨1510595910192891462356450438593964578230006352,1510595910192891462356450438593964578230006353⟩,⟨1800258102930498946545557891088101158417769050,1800258102930498946545557891088101158417769051⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨13932788077060303319578255875139544556882285,13932788077060303319578255875139544556882286⟩,⟨-16604450245690390709636721857557753892055265,-16604450245690390709636721857557753892055264⟩⟩, + ⟨⟨227934402093723100445478441372035816892456,227934402093723100445478441372035816892457⟩,⟨1292680230659564606191559570157369093120719,1292680230659564606191559570157369093120720⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨-25776685346827138535545262341253974993646,-25776685346827138535545262341253974993645⟩⟩, + ⟨⟨1053020231506905518195061560674525335473,1053020231506905518195061560674525335474⟩,⟨-383268020348619046250913173422236845460,-383268020348619046250913173422236845459⟩⟩, + ⟨⟨-3535023541504140114181714490149991420,-3535023541504140114181714490149991419⟩,⟨9712397357523134716641082213918776723,9712397357523134716641082213918776724⟩⟩, + ⟨⟨-12291281388677186267635947390200604,-12291281388677186267635947390200603⟩,⟨-21289123855314632027723110635073010,-21289123855314632027723110635073009⟩⟩, + ⟨⟨4853579813964823590211987443941,4853579813964823590211987443942⟩,⟨855817074223970464035245865835,855817074223970464035245865836⟩⟩, + ⟨⟨-1800258102930498946545558,-1800258102930498946545557⟩,⟨1510595910192891462356450,1510595910192891462356451⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨-1800258102930498946545558,-1800258102930498946545557⟩,⟨-1510595910192891462356451,-1510595910192891462356450⟩⟩, + ⟨⟨4853579813964823590211987443941,4853579813964823590211987443942⟩,⟨-855817074223970464035245865836,-855817074223970464035245865835⟩⟩, + ⟨⟨-12291281388677186267635947390200604,-12291281388677186267635947390200603⟩,⟨21289123855314632027723110635073009,21289123855314632027723110635073010⟩⟩, + ⟨⟨-3535023541504140114181714490149991420,-3535023541504140114181714490149991419⟩,⟨-9712397357523134716641082213918776724,-9712397357523134716641082213918776723⟩⟩, + ⟨⟨1053020231506905518195061560674525335473,1053020231506905518195061560674525335474⟩,⟨383268020348619046250913173422236845459,383268020348619046250913173422236845460⟩⟩, + ⟨⟨-44646528671420791186203576914564632907782,-44646528671420791186203576914564632907781⟩,⟨25776685346827138535545262341253974993645,25776685346827138535545262341253974993646⟩⟩, + ⟨⟨227934402093723100445478441372035816892456,227934402093723100445478441372035816892457⟩,⟨-1292680230659564606191559570157369093120720,-1292680230659564606191559570157369093120719⟩⟩, + ⟨⟨13932788077060303319578255875139544556882285,13932788077060303319578255875139544556882286⟩,⟨16604450245690390709636721857557753892055264,16604450245690390709636721857557753892055265⟩⟩, + ⟨⟨-257142289286047386615386595042048736916789538,-257142289286047386615386595042048736916789537⟩,⟨-1,1⟩⟩, + ⟨⟨1510595910192891462356450438593964578230006352,1510595910192891462356450438593964578230006353⟩,⟨-1800258102930498946545557891088101158417769051,-1800258102930498946545557891088101158417769050⟩⟩, + ⟨⟨3019933822546538873879549191930767351772415010,3019933822546538873879549191930767351772415011⟩,⟨17126895784256800101969225139333115566944566114,17126895784256800101969225139333115566944566115⟩⟩, + ⟨⟨-93630556896327455077729203733533049031819536138,-93630556896327455077729203733533049031819536137⟩,⟨-54057627228469227234095818009485456165873225658,-54057627228469227234095818009485456165873225657⟩⟩, + ⟨⟨545603343041574881995496705950054120562806391237,545603343041574881995496705950054120562806391238⟩,⟨-198583376583265179807116376167075556669601975817,-198583376583265179807116376167075556669601975816⟩⟩, + ⟨⟨-941501988670435297502746567106550767843713472139,-941501988670435297502746567106550767843713472137⟩,⟨2586755454243642592337334965453612746561232060391,2586755454243642592337334965453612746561232060393⟩⟩, + ⟨⟨-5860939688051789411371205992794324400539448741823,-5860939688051789411371205992794324400539448741816⟩,⟨-10151445319802585615026049916779046022334427963231,-10151445319802585615026049916779046022334427963224⟩⟩] +lemma tw0_0_6_19_calc (j : Fin 31) : taylorWaveBox 0 0 6 19 j = tw0_0_6_19 j := by + revert j + decide +kernel +def tw0_0_6_20 : Fin 31 → CI := ![⟨⟨1208019168182208037455005163664889817788595591494,1208019168182208037455005163664889817788595591496⟩,⟨697450191936225609746866483250619399950190057173,697450191936225609746866483250619399950190057175⟩⟩, + ⟨⟨-287301633948465115230296808480327821407251496009,-287301633948465115230296808480327821407251496008⟩,⟨104569243013285565308303889588413836671543468826,104569243013285565308303889588413836671543468827⟩⟩, + ⟨⟨20480517679261455649910273123960670746916152073,20480517679261455649910273123960670746916152074⟩,⟨-56269759862512033612762834669705761495797596640,-56269759862512033612762834669705761495797596639⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨8913608172637075300767496000977635458262637098,8913608172637075300767496000977635458262637099⟩⟩, + ⟨⟨-1494603610406087877640143919338749932360143401,-1494603610406087877640143919338749932360143400⟩,⟨-263538941978876356275041064371755865830794490,-263538941978876356275041064371755865830794489⟩⟩, + ⟨⟨142820142190200841330498943499579592340493107,142820142190200841330498943499579592340493108⟩,⟨-119840328636484214263801531006843742068844775,-119840328636484214263801531006843742068844774⟩⟩, + ⟨⟨-1,1⟩,⟨18359916521552451562374200882082883809634660,18359916521552451562374200882082883809634661⟩⟩, + ⟨⟨-1053826644621377148472560642585698735378067,-1053826644621377148472560642585698735378066⟩,⟨-884265548826588099949932560535276459229914,-884265548826588099949932560535276459229913⟩⟩, + ⟨⟨71786674274156396448719906754280527656765,71786674274156396448719906754280527656766⟩,⟨-12657927529864033718703524187507406990216,-12657927529864033718703524187507406990215⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨2125169795188206505958436966175469269338,2125169795188206505958436966175469269339⟩⟩, + ⟨⟨-15202929256100062895433261993913313808,-15202929256100062895433261993913313807⟩,⟨-41769704840700981151943225851013332580,-41769704840700981151943225851013332579⟩⟩, + ⟨⟨308206022092319197919782327059530972,308206022092319197919782327059530973⟩,⟨112177818063195758933144088775373157,112177818063195758933144088775373158⟩⟩, + ⟨⟨-506679962918330790032967797798031,-506679962918330790032967797798030⟩,⟨292531812983887881986372107816400,292531812983887881986372107816401⟩⟩, + ⟨⟨13578932490902709141617722873,13578932490902709141617722874⟩,⟨-77009952965472753273062070586,-77009952965472753273062070585⟩⟩, + ⟨⟨11984032863648421426380,11984032863648421426381⟩,⟨14282014219020084133049,14282014219020084133050⟩⟩, + ⟨⟨-1,1⟩,⟨-1,1⟩⟩, + ⟨⟨11984032863648421426380,11984032863648421426381⟩,⟨-14282014219020084133050,-14282014219020084133049⟩⟩, + ⟨⟨13578932490902709141617722873,13578932490902709141617722874⟩,⟨77009952965472753273062070585,77009952965472753273062070586⟩⟩, + ⟨⟨-506679962918330790032967797798031,-506679962918330790032967797798030⟩,⟨-292531812983887881986372107816401,-292531812983887881986372107816400⟩⟩, + ⟨⟨308206022092319197919782327059530972,308206022092319197919782327059530973⟩,⟨-112177818063195758933144088775373158,-112177818063195758933144088775373157⟩⟩, + ⟨⟨-15202929256100062895433261993913313808,-15202929256100062895433261993913313807⟩,⟨41769704840700981151943225851013332579,41769704840700981151943225851013332580⟩⟩, + ⟨⟨-1226967353325572878966968477302760281920,-1226967353325572878966968477302760281919⟩,⟨-2125169795188206505958436966175469269339,-2125169795188206505958436966175469269338⟩⟩, + ⟨⟨71786674274156396448719906754280527656765,71786674274156396448719906754280527656766⟩,⟨12657927529864033718703524187507406990215,12657927529864033718703524187507406990216⟩⟩, + ⟨⟨-1053826644621377148472560642585698735378067,-1053826644621377148472560642585698735378066⟩,⟨884265548826588099949932560535276459229913,884265548826588099949932560535276459229914⟩⟩, + ⟨⟨-1,1⟩,⟨-18359916521552451562374200882082883809634661,-18359916521552451562374200882082883809634660⟩⟩, + ⟨⟨142820142190200841330498943499579592340493107,142820142190200841330498943499579592340493108⟩,⟨119840328636484214263801531006843742068844774,119840328636484214263801531006843742068844775⟩⟩, + ⟨⟨-1494603610406087877640143919338749932360143401,-1494603610406087877640143919338749932360143400⟩,⟨263538941978876356275041064371755865830794489,263538941978876356275041064371755865830794490⟩⟩, + ⟨⟨5146274077922863628542671752224876661494679544,5146274077922863628542671752224876661494679545⟩,⟨-8913608172637075300767496000977635458262637099,-8913608172637075300767496000977635458262637098⟩⟩, + ⟨⟨20480517679261455649910273123960670746916152073,20480517679261455649910273123960670746916152074⟩,⟨56269759862512033612762834669705761495797596639,56269759862512033612762834669705761495797596640⟩⟩, + ⟨⟨-287301633948465115230296808480327821407251496009,-287301633948465115230296808480327821407251496008⟩,⟨-104569243013285565308303889588413836671543468827,-104569243013285565308303889588413836671543468826⟩⟩, + ⟨⟨1208019168182208037455005163664889817788595591494,1208019168182208037455005163664889817788595591496⟩,⟨-697450191936225609746866483250619399950190057175,-697450191936225609746866483250619399950190057173⟩⟩] +lemma tw0_0_6_20_calc (j : Fin 31) : taylorWaveBox 0 0 6 20 j = tw0_0_6_20 j := by + revert j + decide +kernel +def tw0_0_6 : Fin 21 → Fin 31 → CI := ![tw0_0_6_0,tw0_0_6_1,tw0_0_6_2,tw0_0_6_3,tw0_0_6_4,tw0_0_6_5,tw0_0_6_6,tw0_0_6_7,tw0_0_6_8,tw0_0_6_9,tw0_0_6_10,tw0_0_6_11,tw0_0_6_12,tw0_0_6_13,tw0_0_6_14,tw0_0_6_15,tw0_0_6_16,tw0_0_6_17,tw0_0_6_18,tw0_0_6_19,tw0_0_6_20] +lemma tw0_0_6_mem (l : Fin 21) (j : Fin 31) : (tw0_0_6 l j).Mem (taylorWave 0 0 (nearNode 6) l.val (frequency j)) := by + have he : taylorWaveBox 0 0 6 l j = tw0_0_6 l j := by + fin_cases l + · exact tw0_0_6_0_calc j + · exact tw0_0_6_1_calc j + · exact tw0_0_6_2_calc j + · exact tw0_0_6_3_calc j + · exact tw0_0_6_4_calc j + · exact tw0_0_6_5_calc j + · exact tw0_0_6_6_calc j + · exact tw0_0_6_7_calc j + · exact tw0_0_6_8_calc j + · exact tw0_0_6_9_calc j + · exact tw0_0_6_10_calc j + · exact tw0_0_6_11_calc j + · exact tw0_0_6_12_calc j + · exact tw0_0_6_13_calc j + · exact tw0_0_6_14_calc j + · exact tw0_0_6_15_calc j + · exact tw0_0_6_16_calc j + · exact tw0_0_6_17_calc j + · exact tw0_0_6_18_calc j + · exact tw0_0_6_19_calc j + · exact tw0_0_6_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 0 6 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave01.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave01.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb61d84d96bc470d92fa6a3379c3658b4cbb8529 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave01.lean @@ -0,0 +1,28 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave010 +import OAI.Analysis.Triangular.Taylor.TaylorWave011 +import OAI.Analysis.Triangular.Taylor.TaylorWave012 +import OAI.Analysis.Triangular.Taylor.TaylorWave013 +import OAI.Analysis.Triangular.Taylor.TaylorWave014 +import OAI.Analysis.Triangular.Taylor.TaylorWave015 +import OAI.Analysis.Triangular.Taylor.TaylorWave016 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1 : Fin 7 → Fin 21 → Fin 31 → CI := ![tw0_1_0,tw0_1_1,tw0_1_2,tw0_1_3,tw0_1_4,tw0_1_5,tw0_1_6] +lemma tw0_1_mem (n : Fin 7) (l : Fin 21) (j : Fin 31) : (tw0_1 n l j).Mem (taylorWave 0 1 (nearNode n) l.val (frequency j)) := by + fin_cases n + · exact tw0_1_0_mem l j + · exact tw0_1_1_mem l j + · exact tw0_1_2_mem l j + · exact tw0_1_3_mem l j + · exact tw0_1_4_mem l j + · exact tw0_1_5_mem l j + · exact tw0_1_6_mem l j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave010.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave010.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd9ee1c83665d18e2671f8f3f99201bd301714da --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave010.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_0_0 : Fin 31 → CI := ![⟨⟨5850906856292816463501791998966507263500081568956608075652974,5850906856292816463501791998966507263500081568956973041548125⟩,⟨1821253284832556025855899519557940306738174883191379526600372,1821253284832556025855899519557940306738174883191717578752848⟩⟩, + ⟨⟨4754293219915475161941079558703346184948098877793774033843184,4754293219915475161941079558703346184948098877794174322213442⟩,⟨3378427235932911511999704633728270574448864187469874068819874,3378427235932911511999704633728270574448864187470256940274627⟩⟩, + ⟨⟨3098674852078503396933970924546226518058639383416531626985800,3098674852078503396933970924546226518058639383416950368483593⟩,⟨4400569769228119592599087918743477429190697564956766003607186,4400569769228119592599087918743477429190697564957176834584849⟩⟩, + ⟨⟨1181498476084492168471508559506950482539480765023521225338732,1181498476084492168471508559506950482539480765023933000658351⟩,⟨4624355636438516992982138202964878938643925894319681891139408,4624355636438516992982138202964878938643925894320092971678877⟩⟩, + ⟨⟨-545919468892766809012604389556982084586831513455761378094136,-545919468892766809012604389556982084586831513455387052427667⟩,⟨3984769454139675987110254442801651378968398083444045556307499,3984769454139675987110254442801651378968398083444423201497668⟩⟩, + ⟨⟨-1637536896617449501448838368140359917214039026271477657392089,-1637536896617449501448838368140359917214039026271169285898866⟩,⟨2719768662574597378835890820437759200143144001079563889344609,2719768662574597378835890820437759200143144001079876485804033⟩⟩, + ⟨⟨-1888323055566150629264584863637781551525147130220445085016355,-1888323055566150629264584863637781551525147130220218590178469⟩,⟨1323200302672561829900757334637428027989340057173852025356339,1323200302672561829900757334637428027989340057174081392447432⟩⟩, + ⟨⟨-1479379434212655429382946773613383710063150432486780735579576,-1479379434212655429382946773613383710063150432486631826221225⟩,⟨294373453197064913862540212029611716198885583047098819089812,294373453197064913862540212029611716198885583047248502236342⟩⟩, + ⟨⟨-852332868525380980432410422569255739768672455354016560463582,-852332868525380980432410422569255739768672455353932967204177⟩,⟨-163734141570698960943783911462031036620261850820596252608684,-163734141570698960943783911462031036620261850820512546938854⟩⟩, + ⟨⟨-375944112341811165067819292596663283170735637484748892680188,-375944112341811165067819292596663283170735637484708918342805⟩,⟨-207870472717781983023872904147584696671015696986046671926216,-207870472717781983023872904147584696671015696986006691422584⟩⟩, + ⟨⟨-139996411107637055249140480202599600378294777165625837457861,-139996411107637055249140480202599600378294777165608196750423⟩,⟨-114328306397624916074316557198873972773778827680989691076913,-114328306397624916074316557198873972773778827680972050408163⟩⟩, + ⟨⟨-52666989121860086401217059485740524913735392638509680022043,-52666989121860086401217059485740524913735392638500494634215⟩,⟨-39199698811035662428595409309313058829350309758607103924483,-39199698811035662428595409309313058829350309758597910091946⟩⟩, + ⟨⟨-21249575393977542515711222836853535405360928670314301244391,-21249575393977542515711222836853535405360928670310377825887⟩,⟨-5818369122665637762375897204515277989223975377474263294026,-5818369122665637762375897204515277989223975377470325708647⟩⟩, + ⟨⟨-6861450709330115337832724154686621679652645254515497596675,-6861450709330115337832724154686621679652645254514390960033⟩,⟨3869988443144689275162070892691722399560008327186107530232,3869988443144689275162070892691722399560008327187199153761⟩⟩, + ⟨⟨468292632046733173204534768832797420657330636597785422165,468292632046733173204534768832797420657330636598123545099⟩,⟨3667462793995056190023133641919907778840014792280437279810,3667462793995056190023133641919907778840014792280790192711⟩⟩, + ⟨⟨2791253048876551471868122913703795350828845493763167695026,2791253048876551471868122913703795350828845493763287657851⟩,⟨-444,508⟩⟩, + ⟨⟨468292632046733173204534768832797420657330636597785422165,468292632046733173204534768832797420657330636598123545099⟩,⟨-3667462793995056190023133641919907778840014792280790192711,-3667462793995056190023133641919907778840014792280437279810⟩⟩, + ⟨⟨-6861450709330115337832724154686621679652645254515497596675,-6861450709330115337832724154686621679652645254514390960033⟩,⟨-3869988443144689275162070892691722399560008327187199153761,-3869988443144689275162070892691722399560008327186107530231⟩⟩, + ⟨⟨-21249575393977542515711222836853535405360928670314301244261,-21249575393977542515711222836853535405360928670310377826349⟩,⟨5818369122665637762375897204515277989223975377470325708784,5818369122665637762375897204515277989223975377474263293556⟩⟩, + ⟨⟨-52666989121860086401217059485740524913735392638509680022144,-52666989121860086401217059485740524913735392638500494634402⟩,⟨39199698811035662428595409309313058829350309758597910091631,39199698811035662428595409309313058829350309758607103924142⟩⟩, + ⟨⟨-139996411107637055249140480202599600378294777165625837458912,-139996411107637055249140480202599600378294777165608196751072⟩,⟨114328306397624916074316557198873972773778827680972050406857,114328306397624916074316557198873972773778827680989691076118⟩⟩, + ⟨⟨-375944112341811165067819292596663283170735637484748892681578,-375944112341811165067819292596663283170735637484708918344409⟩,⟨207870472717781983023872904147584696671015696986006691420169,207870472717781983023872904147584696671015696986046671923641⟩⟩, + ⟨⟨-852332868525380980432410422569255739768672455354016560466582,-852332868525380980432410422569255739768672455353932967203148⟩,⟨163734141570698960943783911462031036620261850820512546931500,163734141570698960943783911462031036620261850820596252605360⟩⟩, + ⟨⟨-1479379434212655429382946773613383710063150432486780735575948,-1479379434212655429382946773613383710063150432486631826221247⟩,⟨-294373453197064913862540212029611716198885583047248502243178,-294373453197064913862540212029611716198885583047098819100299⟩⟩, + ⟨⟨-1888323055566150629264584863637781551525147130220445084998105,-1888323055566150629264584863637781551525147130220218590181103⟩,⟨-1323200302672561829900757334637428027989340057174081392447561,-1323200302672561829900757334637428027989340057173852025377349⟩⟩, + ⟨⟨-1637536896617449501448838368140359917214039026271477657373406,-1637536896617449501448838368140359917214039026271169285883669⟩,⟨-2719768662574597378835890820437759200143144001079876485812523,-2719768662574597378835890820437759200143144001079563889356588⟩⟩, + ⟨⟨-545919468892766809012604389556982084586831513455761378069388,-545919468892766809012604389556982084586831513455387052404291⟩,⟨-3984769454139675987110254442801651378968398083444423201500335,-3984769454139675987110254442801651378968398083444045556311543⟩⟩, + ⟨⟨1181498476084492168471508559506950482539480765023521225396881,1181498476084492168471508559506950482539480765023933000661466⟩,⟨-4624355636438516992982138202964878938643925894320092971642981,-4624355636438516992982138202964878938643925894319681891158571⟩⟩, + ⟨⟨3098674852078503396933970924546226518058639383416531627003730,3098674852078503396933970924546226518058639383416950368511767⟩,⟨-4400569769228119592599087918743477429190697564957176834574689,-4400569769228119592599087918743477429190697564956766003586770⟩⟩, + ⟨⟨4754293219915475161941079558703346184948098877793774033902693,4754293219915475161941079558703346184948098877794174322198695⟩,⟨-3378427235932911511999704633728270574448864187470256940206081,-3378427235932911511999704633728270574448864187469874068825536⟩⟩, + ⟨⟨5850906856292816463501791998966507263500081568956608075641255,5850906856292816463501791998966507263500081568956973041582612⟩,⟨-1821253284832556025855899519557940306738174883191717578743436,-1821253284832556025855899519557940306738174883191379526544919⟩⟩] +lemma tw0_1_0_0_calc (j : Fin 31) : taylorWaveBox 0 1 0 0 j = tw0_1_0_0 j := by + revert j + decide +kernel +def tw0_1_0_1 : Fin 31 → CI := ![⟨⟨-3961806338376051457219094819911005203790292002288227576920447,-3961806338376051457219094819911005203790292002287681585172727⟩,⟨7985378502959076729997675981966151217905329920149434453886969,7985378502959076729997675981966151217905329920150027567770108⟩⟩, + ⟨⟨-6531538973325103749499822793098135916246962258343681994763819,-6531538973325103749499822793098135916246962258343026437479583⟩,⟨6142576346567232577830509461833811233337100031848196892403679,6142576346567232577830509461833811233337100031848882410841670⟩⟩, + ⟨⟨-8169443924979195958301254985418189268707571299277954618849284,-8169443924979195958301254985418189268707571299277214566391637⟩,⟨3192130173395514714347198590729464609330470345317100067620183,3192130173395514714347198590729464609330470345317853309408082⟩⟩, + ⟨⟨-8266923349646852214502800819394451863370147688201306314197072,-8266923349646852214502800819394451863370147688200535166104855⟩,⟨-309658845797453001135258035988170180789469401709541015207837,-309658845797453001135258035988170180789469401708768599841174⟩⟩, + ⟨⟨-6616793690040091535144135171556419151171624147139365751276869,-6616793690040091535144135171556419151171624147138637789195319⟩,⟨-3401749293410958507633111346733115495999340192811020860252290,-3401749293410958507633111346733115495999340192810297134215618⟩⟩, + ⟨⟨-3723565366614446336835285827353515652392634349494270598315719,-3723565366614446336835285827353515652392634349493663432107880⟩,⟨-5069214474951264455983497662572052504715923202111291030015781,-5069214474951264455983497662572052504715923202110688026714904⟩⟩, + ⟨⟨-747073078975736710304618272367801027737954197721745130705347,-747073078975736710304618272367801027737954197721307720652516⟩,⟨-4852894908720237322576080708320856944148240481312756239330136,-4852894908720237322576080708320856944148240481312320157583429⟩⟩, + ⟨⟨1132731665728805827006515200542642565409369960169529832290536,1132731665728805827006515200542642565409369960169814996934444⟩,⟨-3273309428281594682571722629332214972134322156270766896612249,-3273309428281594682571722629332214972134322156270481329842870⟩⟩, + ⟨⟨1546116577122804151875485161568793938820722234386731834660853,1546116577122804151875485161568793938820722234386946267383526⟩,⟨-1501438115572272972342779316419608976672645878303396384743354,-1501438115572272972342779316419608976672645878303181668021003⟩⟩, + ⟨⟨1080110011774042725206874962549935909656624677822962505566893,1080110011774042725206874962549935909656624677823096935660551⟩,⟨-410519583285023791986629646205821852599878681379192796934121,-410519583285023791986629646205821852599878681379058311714189⟩⟩, + ⟨⟨524975653648458974799241720391693138292052118799785143636253,524975653648458974799241720391693138292052118799856570267619⟩,⟨-40824105683759130066791967238594599009378819404257523896515,-40824105683759130066791967238594599009378819404186108045541⟩⟩, + ⟨⟨206517050172479089489600895524431964533806159724165492188278,206517050172479089489600895524431964533806159724196689809022⟩,⟨-211850777027523825199556168246797018047515911044001896023,-211850777027523825199556168246797018047515911012856578677⟩⟩, + ⟨⟨72235898194999367701071769854464865644358211446978999569497,72235898194999367701071769854464865644358211446989792573928⟩,⟨-17296071759227248179042177250647155809999625595607241585391,-17296071759227248179042177250647155809999625595596451416548⟩⟩, + ⟨⟨18323171955190775321657543978543754427440668923767954831810,18323171955190775321657543978543754427440668923771926725048⟩,⟨-21301147686199697986827390297754138390793814366301318369175,-21301147686199697986827390297754138390793814366297378671631⟩⟩, + ⟨⟨-4103325751786266951938103530825563450123937917657632839932,-4103325751786266951938103530825563450123937917656253028357⟩,⟨-13057500023779400827654810230961008078041426054252784659601,-13057500023779400827654810230961008078041426054251347626828⟩⟩, + ⟨⟨-10468901307661444040511515720482826168326117586223793876405,-10468901307661444040511515720482826168326117586223310619103⟩,⟨-1900,1663⟩⟩, + ⟨⟨-4103325751786266951938103530825563450123937917657632839932,-4103325751786266951938103530825563450123937917656253028357⟩,⟨13057500023779400827654810230961008078041426054251347626828,13057500023779400827654810230961008078041426054252784659601⟩⟩, + ⟨⟨18323171955190775321657543978543754427440668923767954831810,18323171955190775321657543978543754427440668923771926725048⟩,⟨21301147686199697986827390297754138390793814366297378671631,21301147686199697986827390297754138390793814366301318369175⟩⟩, + ⟨⟨72235898194999367701071769854464865644358211446978999570454,72235898194999367701071769854464865644358211446989792573412⟩,⟨17296071759227248179042177250647155809999625595596451418128,17296071759227248179042177250647155809999625595607241585337⟩⟩, + ⟨⟨206517050172479089489600895524431964533806159724165492188154,206517050172479089489600895524431964533806159724196689808636⟩,⟨211850777027523825199556168246797018047515911012856579826,211850777027523825199556168246797018047515911044001897075⟩⟩, + ⟨⟨524975653648458974799241720391693138292052118799785143635041,524975653648458974799241720391693138292052118799856570268181⟩,⟨40824105683759130066791967238594599009378819404186108048564,40824105683759130066791967238594599009378819404257523901344⟩⟩, + ⟨⟨1080110011774042725206874962549935909656624677822962505564657,1080110011774042725206874962549935909656624677823096935657745⟩,⟨410519583285023791986629646205821852599878681379058311721914,410519583285023791986629646205821852599878681379192796941216⟩⟩, + ⟨⟨1546116577122804151875485161568793938820722234386731834646603,1546116577122804151875485161568793938820722234386946267378843⟩,⟨1501438115572272972342779316419608976672645878303181668025822,1501438115572272972342779316419608976672645878303396384757739⟩⟩, + ⟨⟨1132731665728805827006515200542642565409369960169529832274411,1132731665728805827006515200542642565409369960169814996912052⟩,⟨3273309428281594682571722629332214972134322156270481329852479,3273309428281594682571722629332214972134322156270766896615591⟩⟩, + ⟨⟨-747073078975736710304618272367801027737954197721745130714254,-747073078975736710304618272367801027737954197721307720698707⟩,⟨4852894908720237322576080708320856944148240481312320157597125,4852894908720237322576080708320856944148240481312756239306515⟩⟩, + ⟨⟨-3723565366614446336835285827353515652392634349494270598344171,-3723565366614446336835285827353515652392634349493663432142689⟩,⟨5069214474951264455983497662572052504715923202110688026694912,5069214474951264455983497662572052504715923202111291029989412⟩⟩, + ⟨⟨-6616793690040091535144135171556419151171624147139365751296288,-6616793690040091535144135171556419151171624147138637789217175⟩,⟨3401749293410958507633111346733115495999340192810297134176927,3401749293410958507633111346733115495999340192811020860211132⟩⟩, + ⟨⟨-8266923349646852214502800819394451863370147688201306314149581,-8266923349646852214502800819394451863370147688200535166154622⟩,⟨309658845797453001135258035988170180789469401708768599834780,309658845797453001135258035988170180789469401709541015104169⟩⟩, + ⟨⟨-8169443924979195958301254985418189268707571299277954618842772,-8169443924979195958301254985418189268707571299277214566367677⟩,⟨-3192130173395514714347198590729464609330470345317853309459227,-3192130173395514714347198590729464609330470345317100067653889⟩⟩, + ⟨⟨-6531538973325103749499822793098135916246962258343681994662661,-6531538973325103749499822793098135916246962258343026437499495⟩,⟨-6142576346567232577830509461833811233337100031848882410824364,-6142576346567232577830509461833811233337100031848196892507480⟩⟩, + ⟨⟨-3961806338376051457219094819911005203790292002288227576912246,-3961806338376051457219094819911005203790292002287681585092984⟩,⟨-7985378502959076729997675981966151217905329920150027567829769,-7985378502959076729997675981966151217905329920149434453874921⟩⟩] +lemma tw0_1_0_1_calc (j : Fin 31) : taylorWaveBox 0 1 0 1 j = tw0_1_0_1 j := by + revert j + decide +kernel +def tw0_1_0_2 : Fin 31 → CI := ![⟨⟨-7919254138446023637699977302817930893121393016630636427583525,-7919254138446023637699977302817930893121393016629933019357662⟩,⟨-5645589299107951359929628224487106249561360244704305490748677,-5645589299107951359929628224487106249561360244703655402138988⟩⟩, + ⟨⟨-5460141299254744969711734975732193271090683596618825094124558,-5460141299254744969711734975732193271090683596617974504594708⟩,⟨-8778176523500341253310007257838089486556167087317380097722106,-8778176523500341253310007257838089486556167087316561659262493⟩⟩, + ⟨⟨-1405532937165191989000175431180959741916950023202460498199999,-1405532937165191989000175431180959741916950023201488451567948⟩,⟨-10627687156059606822541491569379958013889116639934668218337351,-10627687156059606822541491569379958013889116639933708962359924⟩⟩, + ⟨⟨3434129298471341260683388927961689224338955202152194054355992,3434129298471341260683388927961689224338955202153218141831527⟩,⟨-10191080654988541278702915217089607483987391345097334628806505,-10191080654988541278702915217089607483987391345096311797909506⟩⟩, + ⟨⟨7501645521266422071657036510852708414243068332162071793284409,7501645521266422071657036510852708414243068332163037114757277⟩,⟨-7090206855114220093789154468138112618405455144254894367683976,-7090206855114220093789154468138112618405455144253928180976572⟩⟩, + ⟨⟨9082270782188625575148698260821230072220518666581989347667967,9082270782188625575148698260821230072220518666582780354801572⟩,⟨-2205539143179363852705068994481720483009440067868915942723846,-2205539143179363852705068994481720483009440067868128517511825⟩⟩, + ⟨⟨7478194025675769340043988491184041066952967567260477004456591,7478194025675769340043988491184041066952967567261254587188826⟩,⟨2360267684586998749265389209138514411606236160966423240656637,2360267684586998749265389209138514411606236160967193105006041⟩⟩, + ⟨⟨3879774456891957755171521449590840100410781245021776458690058,3879774456891957755171521449590840100410781245022460559314551⟩,⟨4531477395982397527333153314900758648013980932946405058316365,4531477395982397527333153314900758648013980932947084638798033⟩⟩, + ⟨⟨641325753092294054364736793155134445874440009239686585605873,641325753092294054364736793155134445874440009240177385931246⟩,⟨3962173398531985899358617864865064225049006454925176654944302,3962173398531985899358617864865064225049006454925666564371395⟩⟩, + ⟨⟨-775797904826492083585420996905198814947614785785766904195318,-775797904826492083585420996905198814947614785785487127379753⟩,⟨2198132429752204181153232129534908776513721909575468504067427,2198132429752204181153232129534908776513721909575748218522362⟩⟩, + ⟨⟨-767887192682956753885798873459176497696587771105203875249261,-767887192682956753885798873459176497696587771105066729249644⟩,⟨856727209246609579966123991059539253335417573933335946563077,856727209246609579966123991059539253335417573933473091158169⟩⟩, + ⟨⟨-390235725584558528127403529560037479341677670256350968882713,-390235725584558528127403529560037479341677670256267508560787⟩,⟨291695981879603334480159266523217143416121716262240120083861,291695981879603334480159266523217143416121716262323452048893⟩⟩, + ⟨⟨-139038014391939531533373495770472483003167305455783767334976,-139038014391939531533373495770472483003167305455748708638108⟩,⟨126264659798079529942869600685597143339461589117927058677380,126264659798079529942869600685597143339461589117961967756018⟩⟩, + ⟨⟨-26725267453083725016368712541443640218471007603377259694145,-26725267453083725016368712541443640218471007603367649538747⟩,⟨70251967416581874029556373098538501946234382767468553501041,70251967416581874029556373098538501946234382767478173249376⟩⟩, + ⟨⟨17614344007978687651131757758628404295980474010520099079335,17614344007978687651131757758628404295980474010524213893252⟩,⟨33672989458481321931486434318069121457514092075510876867087,33672989458481321931486434318069121457514092075515135578423⟩⟩, + ⟨⟨29448573634429374456962462044148868905705058785026078787632,29448573634429374456962462044148868905705058785027531907564⟩,⟨-4676,5344⟩⟩, + ⟨⟨17614344007978687651131757758628404295980474010520099079335,17614344007978687651131757758628404295980474010524213893252⟩,⟨-33672989458481321931486434318069121457514092075515135578423,-33672989458481321931486434318069121457514092075510876867087⟩⟩, + ⟨⟨-26725267453083725016368712541443640218471007603377259694145,-26725267453083725016368712541443640218471007603367649538747⟩,⟨-70251967416581874029556373098538501946234382767478173249376,-70251967416581874029556373098538501946234382767468553501041⟩⟩, + ⟨⟨-139038014391939531533373495770472483003167305455783767332129,-139038014391939531533373495770472483003167305455748708640075⟩,⟨-126264659798079529942869600685597143339461589117961967755466,-126264659798079529942869600685597143339461589117927058681852⟩⟩, + ⟨⟨-390235725584558528127403529560037479341677670256350968880500,-390235725584558528127403529560037479341677670256267508558935⟩,⟨-291695981879603334480159266523217143416121716262323452050338,-291695981879603334480159266523217143416121716262240120085859⟩⟩, + ⟨⟨-767887192682956753885798873459176497696587771105203875244479,-767887192682956753885798873459176497696587771105066729241547⟩,⟨-856727209246609579966123991059539253335417573933473091165207,-856727209246609579966123991059539253335417573933335946567459⟩⟩, + ⟨⟨-775797904826492083585420996905198814947614785785766904180117,-775797904826492083585420996905198814947614785785487127365565⟩,⟨-2198132429752204181153232129534908776513721909575748218527522,-2198132429752204181153232129534908776513721909575468504073820⟩⟩, + ⟨⟨641325753092294054364736793155134445874440009239686585620351,641325753092294054364736793155134445874440009240177385966282⟩,⟨-3962173398531985899358617864865064225049006454925666564377465,-3962173398531985899358617864865064225049006454925176654929816⟩⟩, + ⟨⟨3879774456891957755171521449590840100410781245021776458723725,3879774456891957755171521449590840100410781245022460559333644⟩,⟨-4531477395982397527333153314900758648013980932947084638767754,-4531477395982397527333153314900758648013980932946405058300662⟩⟩, + ⟨⟨7478194025675769340043988491184041066952967567260477004500042,7478194025675769340043988491184041066952967567261254587170074⟩,⟨-2360267684586998749265389209138514411606236160967193104931986,-2360267684586998749265389209138514411606236160966423240644730⟩⟩, + ⟨⟨9082270782188625575148698260821230072220518666581989347657941,9082270782188625575148698260821230072220518666582780354784168⟩,⟨2205539143179363852705068994481720483009440067868128517572128,2205539143179363852705068994481720483009440067868915942776823⟩⟩, + ⟨⟨7501645521266422071657036510852708414243068332162071793243126,7501645521266422071657036510852708414243068332163037114713081⟩,⟨7090206855114220093789154468138112618405455144253928181023386,7090206855114220093789154468138112618405455144254894367727967⟩⟩, + ⟨⟨3434129298471341260683388927961689224338955202152194054347056,3434129298471341260683388927961689224338955202153218141704075⟩,⟨10191080654988541278702915217089607483987391345096311797990408,10191080654988541278702915217089607483987391345097334628768985⟩⟩, + ⟨⟨-1405532937165191989000175431180959741916950023202460498265289,-1405532937165191989000175431180959741916950023201488451612259⟩,⟨10627687156059606822541491569379958013889116639933708962343720,10627687156059606822541491569379958013889116639934668218342120⟩⟩, + ⟨⟨-5460141299254744969711734975732193271090683596618825094111576,-5460141299254744969711734975732193271090683596617974504723907⟩,⟨8778176523500341253310007257838089486556167087316561659297469,8778176523500341253310007257838089486556167087317380097614903⟩⟩, + ⟨⟨-7919254138446023637699977302817930893121393016630636427657340,-7919254138446023637699977302817930893121393016629933019350302⟩,⟨5645589299107951359929628224487106249561360244703655402055180,5645589299107951359929628224487106249561360244704305490745946⟩⟩] +lemma tw0_1_0_2_calc (j : Fin 31) : taylorWaveBox 0 1 0 2 j = tw0_1_0_2 j := by + revert j + decide +kernel +def tw0_1_0_3 : Fin 31 → CI := ![⟨⟨5958503753294712007218100667021270145619159377500591327370795,5958503753294712007218100667021270145619159377501201403529033⟩,⟨-6046045779698930885293364989238181313744675893778507754117607,-6046045779698930885293364989238181313744675893777854622115389⟩⟩, + ⟨⟨8930209229885497704905141369969623313227281385354186228691346,8930209229885497704905141369969623313227281385354984732108752⟩,⟨-3342802174611237398982286368385741126811016683843692703737266,-3342802174611237398982286368385741126811016683842871320414822⟩⟩, + ⟨⟨10419372958682221111084818700269517270929121044687066198146830,10419372958682221111084818700269517270929121044688027414518586⟩,⟨1145719579601356864454849454017495433738416610297542295666938,1145719579601356864454849454017495433738416610298510061632407⟩⟩, + ⟨⟨9150108461412670203213346219361549352879133315645752106970416,9150108461412670203213346219361549352879133315646783765314091⟩,⟨6430756350704219533928879325599919137308809175092565099638710,6430756350704219533928879325599919137308809175093597314023596⟩⟩, + ⟨⟨4655733976142948402370502277758672923019640835376102276890785,4655733976142948402370502277758672923019640835377220166371848⟩,⟨10467835794825692630285680963138439356635965582010416919158621,10467835794825692630285680963138439356635965582011540430290591⟩⟩, + ⟨⟨-1738021941664480428404669270903723673244151060335127462081843,-1738021941664480428404669270903723673244151060333885658120600⟩,⟨10973485869575010794096524835178536949799591376152834023583787,10973485869575010794096524835178536949799591376154091719077479⟩⟩, + ⟨⟨-6932912355996879039930642215931470600082964589915003413977547,-6932912355996879039930642215931470600082964589913812045395605⟩,⟨7233337287205157164826658686379697253079713759982530310953188,7233337287205157164826658686379697253079713759983735805209860⟩⟩, + ⟨⟨-8088663865458781162439228530358442740856301044637121392832630,-8088663865458781162439228530358442740856301044636097492576792⟩,⟨1459371854493700944889204036543170910580699664629774834760957,1459371854493700944889204036543170910580699664630802857289236⟩⟩, + ⟨⟨-5385252339357240602520241871556490219838629257186907406275236,-5385252339357240602520241871556490219838629257186223659117647⟩,⟨-2600032262672756564320716715454597051523928659301276772004370,-2600032262672756564320716715454597051523928659300592919591471⟩⟩, + ⟨⟨-1898589033449712656379137251699629245943235528557961248470755,-1898589033449712656379137251699629245943235528557446515977868⟩,⟨-3247723282124173950334320292151853817945621636728587548800063,-3247723282124173950334320292151853817945621636728072944435213⟩⟩, + ⟨⟨-63639220912763915445616721645212575490794929315712352293098,-63639220912763915445616721645212575490794929315389220364891⟩,⟨-2009978499978853553168688550082039641336492122358972039348427,-2009978499978853553168688550082039641336492122358648868223452⟩⟩, + ⟨⟨261211729862617601709187451185444857990823589768457709887516,261211729862617601709187451185444857990823589768596081952939⟩,⟨-881636508763879924460709190582284508679807462726979784901848,-881636508763879924460709190582284508679807462726841324578489⟩⟩, + ⟨⟨123552819225256252076228100446236979752699321522335501723593,123552819225256252076228100446236979752699321522413855005382⟩,⟨-359266823823333672583174524471428709873763142669336034388424,-359266823823333672583174524471428709873763142669257945622115⟩⟩, + ⟨⟨2677211814734023127644071576462199927329603109646297806760,2677211814734023127644071576462199927329603109667744098685⟩,⟨-160833315992203003770900186058169809503336041290590624057132,-160833315992203003770900186058169809503336041290568942228477⟩⟩, + ⟨⟨-51714713053629480442387878422388275185802715670730703489272,-51714713053629480442387878422388275185802715670721102022905⟩,⟨-66711575387669737383005622736740777678777013833400302030357,-66711575387669737383005622736740777678777013833390454461316⟩⟩, + ⟨⟨-66270067019755235177545663174916894881920828124857560996644,-66270067019755235177545663174916894881920828124854080000870⟩,⟨-12025,10521⟩⟩, + ⟨⟨-51714713053629480442387878422388275185802715670730703489272,-51714713053629480442387878422388275185802715670721102022905⟩,⟨66711575387669737383005622736740777678777013833390454461316,66711575387669737383005622736740777678777013833400302030357⟩⟩, + ⟨⟨2677211814734023127644071576462199927329603109646297806760,2677211814734023127644071576462199927329603109667744098685⟩,⟨160833315992203003770900186058169809503336041290568942228477,160833315992203003770900186058169809503336041290590624057132⟩⟩, + ⟨⟨123552819225256252076228100446236979752699321522335501726175,123552819225256252076228100446236979752699321522413854997422⟩,⟨359266823823333672583174524471428709873763142669257945630335,359266823823333672583174524471428709873763142669336034386294⟩⟩, + ⟨⟨261211729862617601709187451185444857990823589768457709882537,261211729862617601709187451185444857990823589768596081947882⟩,⟨881636508763879924460709190582284508679807462726841324579421,881636508763879924460709190582284508679807462726979784901535⟩⟩, + ⟨⟨-63639220912763915445616721645212575490794929315712352311541,-63639220912763915445616721645212575490794929315389220376514⟩,⟨2009978499978853553168688550082039641336492122358648868219583,2009978499978853553168688550082039641336492122358972039351172⟩⟩, + ⟨⟨-1898589033449712656379137251699629245943235528557961248492190,-1898589033449712656379137251699629245943235528557446516001310⟩,⟨3247723282124173950334320292151853817945621636728072944423978,3247723282124173950334320292151853817945621636728587548787146⟩⟩, + ⟨⟨-5385252339357240602520241871556490219838629257186907406303103,-5385252339357240602520241871556490219838629257186223659121762⟩,⟨2600032262672756564320716715454597051523928659300592919545769,2600032262672756564320716715454597051523928659301276771982420⟩⟩, + ⟨⟨-8088663865458781162439228530358442740856301044637121392813757,-8088663865458781162439228530358442740856301044636097492577710⟩,⟨-1459371854493700944889204036543170910580699664630802857326710,-1459371854493700944889204036543170910580699664629774834818222⟩⟩, + ⟨⟨-6932912355996879039930642215931470600082964589915003413889493,-6932912355996879039930642215931470600082964589913812045399072⟩,⟨-7233337287205157164826658686379697253079713759983735805202535,-7233337287205157164826658686379697253079713759982530311037402⟩⟩, + ⟨⟨-1738021941664480428404669270903723673244151060335127462007743,-1738021941664480428404669270903723673244151060333885658057847⟩,⟨-10973485869575010794096524835178536949799591376154091719082641,-10973485869575010794096524835178536949799591376152834023600329⟩⟩, + ⟨⟨4655733976142948402370502277758672923019640835376102276955487,4655733976142948402370502277758672923019640835377220166433719⟩,⟨-10467835794825692630285680963138439356635965582011540430261110,-10467835794825692630285680963138439356635965582010416919132082⟩⟩, + ⟨⟨9150108461412670203213346219361549352879133315645752107064504,9150108461412670203213346219361549352879133315646783765303467⟩,⟨-6430756350704219533928879325599919137308809175093597313909533,-6430756350704219533928879325599919137308809175092565099629521⟩⟩, + ⟨⟨10419372958682221111084818700269517270929121044687066198144700,10419372958682221111084818700269517270929121044688027414535417⟩,⟨-1145719579601356864454849454017495433738416610298510061588526,-1145719579601356864454849454017495433738416610297542295604074⟩⟩, + ⟨⟨8930209229885497704905141369969623313227281385354186228733428,8930209229885497704905141369969623313227281385354984732022441⟩,⟨3342802174611237398982286368385741126811016683842871320538108,3342802174611237398982286368385741126811016683843692703732199⟩⟩, + ⟨⟨5958503753294712007218100667021270145619159377500591327302269,5958503753294712007218100667021270145619159377501201403532135⟩,⟨6046045779698930885293364989238181313744675893777854622114177,6046045779698930885293364989238181313744675893778507754188031⟩⟩] +lemma tw0_1_0_3_calc (j : Fin 31) : taylorWaveBox 0 1 0 3 j = tw0_1_0_3 j := by + revert j + decide +kernel +def tw0_1_0_4 : Fin 31 → CI := ![⟨⟨3657041278053145769809690053585132119979204186914837934590346,3657041278053145769809690053585132119979204186915334565099525⟩,⟨4974730825703399325090806367138890716500930663844860172066316,4974730825703399325090806367138890716500930663845331205942450⟩⟩, + ⟨⟨1167042007422023413673765952355858017096812461248188783237424,1167042007422023413673765952355858017096812461248835100451404⟩,⟨7235839112117142002910272801789894615375983752594948057010529,7235839112117142002910272801789894615375983752595584735793235⟩⟩, + ⟨⟨-2933002081987153174065729953874594431522036438154513822117567,-2933002081987153174065729953874594431522036438153734684934509⟩,⟨8021794139964659673178078991744280086802927096080788518231253,8021794139964659673178078991744280086802927096081568661602251⟩⟩, + ⟨⟨-7593410429768401037705202217893693348194607067466138262593146,-7593410429768401037705202217893693348194607067465137977344308⟩,⟨6023401245485035884427971719203736821288963565511246712067001,6023401245485035884427971719203736821288963565512247529091853⟩⟩, + ⟨⟨-10562614022625597912546435762203452192315618021383306357238961,-10562614022625597912546435762203452192315618021381999734686848⟩,⟨844434230061720996491712735279023355604878301231857211617818,844434230061720996491712735279023355604878301233154604988429⟩⟩, + ⟨⟨-9369171704774861219377708213011229129890043914697303481948350,-9369171704774861219377708213011229129890043914695855658754845⟩,⟨-5775098345084516266048690143024868109260899647154409209864730,-5775098345084516266048690143024868109260899647152976719999819⟩⟩, + ⟨⟨-3639259723753692948625645692223424217536921252416483699620553,-3639259723753692948625645692223424217536921252415150719129028⟩,⟨-10027892881177004184612867474894686501281143075948225298237665,-10027892881177004184612867474894686501281143075946900135364689⟩⟩, + ⟨⟨3245444800811820348941175546550827616460504108630165796895467,3245444800811820348941175546550827616460504108631293353988458⟩,⟨-8861496317970816216178364075731517147480149219557238147999417,-8861496317970816216178364075731517147480149219556109295288992⟩⟩, + ⟨⟨6477241337965469677833855547229718412335881717060175243684484,6477241337965469677833855547229718412335881717061305975707220⟩,⟨-3629310490544024241167216991666689945961217781983207478792277,-3629310490544024241167216991666689945961217781982074961006372⟩⟩, + ⟨⟨4983482175435444843517097228551686140641454954194156325496108,4983482175435444843517097228551686140641454954194979129619480⟩,⟨873338404457888610471903191112040176990401519561391556648024,873338404457888610471903191112040176990401519562214555228729⟩⟩, + ⟨⟨2089162015255699303213546139084575781000953881288324067758899,2089162015255699303213546139084575781000953881288789095125877⟩,⟨2053234965197423419566432330683772872467273727400579020316018,2053234965197423419566432330683772872467273727401044055454548⟩⟩, + ⟨⟨499730881201815304515962236679004504908593367202509261189810,499730881201815304515962236679004504908593367202806526019168⟩,⟨1357109181161804212589308486828085288448014657646604081845368,1357109181161804212589308486828085288448014657646901892596578⟩⟩, + ⟨⟨109006746430312402285550126061221386571703767523098946780213,109006746430312402285550126061221386571703767523218697109052⟩,⟨631082190243070815476776623261420760071877471315449906143361,631082190243070815476776623261420760071877471315569619135732⟩⟩, + ⟨⟨93018965583268307443455264941323855432549965571443769526011,93018965583268307443455264941323855432549965571490481285612⟩,⟨271368912396236821613946246591632879971951302450740282784950,271368912396236821613946246591632879971951302450787595795609⟩⟩, + ⟨⟨116019903127483351194028550187801543139382327638678215107392,116019903127483351194028550187801543139382327638696528286224⟩,⟨104642726881805507698263989168440537229015072835409914705216,104642726881805507698263989168440537229015072835428487847923⟩⟩, + ⟨⟨124276584590057825345274656536126583323566119572132902529337,124276584590057825345274656536126583323566119572139826042595⟩,⟨-19730,22551⟩⟩, + ⟨⟨116019903127483351194028550187801543139382327638678215107392,116019903127483351194028550187801543139382327638696528286224⟩,⟨-104642726881805507698263989168440537229015072835428487847923,-104642726881805507698263989168440537229015072835409914705216⟩⟩, + ⟨⟨93018965583268307443455264941323855432549965571443769526011,93018965583268307443455264941323855432549965571490481285611⟩,⟨-271368912396236821613946246591632879971951302450787595795609,-271368912396236821613946246591632879971951302450740282784950⟩⟩, + ⟨⟨109006746430312402285550126061221386571703767523098946794015,109006746430312402285550126061221386571703767523218697108138⟩,⟨-631082190243070815476776623261420760071877471315569619131330,-631082190243070815476776623261420760071877471315449906152391⟩⟩, + ⟨⟨499730881201815304515962236679004504908593367202509261197061,499730881201815304515962236679004504908593367202806526025151⟩,⟨-1357109181161804212589308486828085288448014657646901892591501,-1357109181161804212589308486828085288448014657646604081841787⟩⟩, + ⟨⟨2089162015255699303213546139084575781000953881288324067770710,2089162015255699303213546139084575781000953881288789095144595⟩,⟨-2053234965197423419566432330683772872467273727401044055443071,-2053234965197423419566432330683772872467273727400579020296049⟩⟩, + ⟨⟨4983482175435444843517097228551686140641454954194156325504588,4983482175435444843517097228551686140641454954194979129625206⟩,⟨-873338404457888610471903191112040176990401519562214555193982,-873338404457888610471903191112040176990401519561391556615721⟩⟩, + ⟨⟨6477241337965469677833855547229718412335881717060175243642865,6477241337965469677833855547229718412335881717061305975702736⟩,⟨3629310490544024241167216991666689945961217781982074961028137,3629310490544024241167216991666689945961217781983207478851177⟩⟩, + ⟨⟨3245444800811820348941175546550827616460504108630165796852005,3245444800811820348941175546550827616460504108631293353927630⟩,⟨8861496317970816216178364075731517147480149219556109295316255,8861496317970816216178364075731517147480149219557238148009313⟩⟩, + ⟨⟨-3639259723753692948625645692223424217536921252416483699632064,-3639259723753692948625645692223424217536921252415150719230802⟩,⟨10027892881177004184612867474894686501281143075946900135387545,10027892881177004184612867474894686501281143075948225298170213⟩⟩, + ⟨⟨-9369171704774861219377708213011229129890043914697303481978286,-9369171704774861219377708213011229129890043914695855658796913⟩,⟨5775098345084516266048690143024868109260899647152976719947447,5775098345084516266048690143024868109260899647154409209800226⟩⟩, + ⟨⟨-10562614022625597912546435762203452192315618021383306357232368,-10562614022625597912546435762203452192315618021381999734683446⟩,⟨-844434230061720996491712735279023355604878301233154605050677,-844434230061720996491712735279023355604878301231857211683206⟩⟩, + ⟨⟨-7593410429768401037705202217893693348194607067466138262505982,-7593410429768401037705202217893693348194607067465137977349522⟩,⟨-6023401245485035884427971719203736821288963565512247529095555,-6023401245485035884427971719203736821288963565511246712162944⟩⟩, + ⟨⟨-2933002081987153174065729953874594431522036438154513822083417,-2933002081987153174065729953874594431522036438153734684887045⟩,⟨-8021794139964659673178078991744280086802927096081568661625081,-8021794139964659673178078991744280086802927096080788518240802⟩⟩, + ⟨⟨1167042007422023413673765952355858017096812461248188783331642,1167042007422023413673765952355858017096812461248835100452974⟩,⟨-7235839112117142002910272801789894615375983752595584735739155,-7235839112117142002910272801789894615375983752594948057049155⟩⟩, + ⟨⟨3657041278053145769809690053585132119979204186914837934593276,3657041278053145769809690053585132119979204186915334565153824⟩,⟨-4974730825703399325090806367138890716500930663845331205948642,-4974730825703399325090806367138890716500930663844860172021087⟩⟩] +lemma tw0_1_0_4_calc (j : Fin 31) : taylorWaveBox 0 1 0 4 j = tw0_1_0_4 j := by + revert j + decide +kernel +def tw0_1_0_5 : Fin 31 → CI := ![⟨⟨-3422947488469523927130409943118974586868086636654136724934050,-3422947488469523927130409943118974586868086636653828366681591⟩,⟨1760903989252374847514062441039459135782053899669346680520889,1760903989252374847514062441039459135782053899669665788799780⟩⟩, + ⟨⟨-4825336350819850868910445343837406643428169144367776049389503,-4825336350819850868910445343837406643428169144367347752611780⟩,⟨-185192837284754431610538477029567614753468899106570592294925,-185192837284754431610538477029567614753468899106142489417522⟩⟩, + ⟨⟨-4951750193306504551301247058075108762007553802853095888690595,-4951750193306504551301247058075108762007553802852492623157196⟩,⟨-3326523827698020787307759690425626941088331398570186434004988,-3326523827698020787307759690425626941088331398569588878028030⟩⟩, + ⟨⟨-2690727631116939602967266060664970504117466111526714189106954,-2690727631116939602967266060664970504117466111525803230975764⟩,⟨-6678047264573413950654616974032235405033188902041244294937073,-6678047264573413950654616974032235405033188902040334370801456⟩⟩, + ⟨⟨2151032940956505699325479189807091346334751805017382367710007,2151032940956505699325479189807091346334751805018574180769142⟩,⟨-8120549005901789874080817366776500472526784980320524807305200,-8120549005901789874080817366776500472526784980319326226868358⟩⟩, + ⟨⟨7589027395327522870649861007844852086291882917811354945148842,7589027395327522870649861007844852086291882917812651412622409⟩,⟨-5453495336859418472742694615025425313572252453333482488382433,-5453495336859418472742694615025425313572252453332179697415467⟩⟩, + ⟨⟨9676533943546083559490766182977831588606770916558717652471558,9676533943546083559490766182977831588606770916559931878435845⟩,⟨1072032599264406183270774386716516191107570734627116397395654,1072032599264406183270774386716516191107570734628326177874980⟩⟩, + ⟨⟨5912946625349632441673773539960698679157612886637107647904108,5912946625349632441673773539960698679157612886638634071361409⟩,⟨7162021313339235989630192680490189682334398691377410570421198,7162021313339235989630192680490189682334398691378930014919696⟩⟩, + ⟨⟨-785204017552925677048317069261418996714858484297277861201747,-785204017552925677048317069261418996714858484295875874113373⟩,⟨7862370123436096149639782564257783384076727705090354337996985,7862370123436096149639782564257783384076727705091755091781958⟩⟩, + ⟨⟨-4480233822683102332225400315396998141155507326839141800413079,-4480233822683102332225400315396998141155507326838090585752617⟩,⟨3734105435428550201255498203336775641577448672719694256017728,3734105435428550201255498203336775641577448672720745584254056⟩⟩, + ⟨⟨-3656839423616642938999724638000100923036294583915437849645488,-3656839423616642938999724638000100923036294583914665657974716⟩,⟨-52316427506499593022257462274000727342421928690005896757501,-52316427506499593022257462274000727342421928689233772629096⟩⟩, + ⟨⟨-1633851346157189762707648451131981762977865814656686103421231,-1633851346157189762707648451131981762977865814656277065412068⟩,⟨-1063706646717218686728967457633154644997315721074421612993546,-1063706646717218686728967457633154644997315721074012402285868⟩⟩, + ⟨⟨-577027572576199938418735088174166142979355486999606894507916,-577027572576199938418735088174166142979355486999395155073307⟩,⟨-723393850346226115971912709222061925318575935895369605028089,-723393850346226115971912709222061925318575935895157212746916⟩⟩, + ⟨⟨-274742747282433709120743421037496123158176415400813446926893,-274742747282433709120743421037496123158176415400734193671444⟩,⟨-341775794279024935707534121512572903449092853197105427213746,-341775794279024935707534121512572903449092853197025429315609⟩⟩, + ⟨⟨-210491533223829872164920281702741020965178992297881495099447,-210491533223829872164920281702741020965178992297852056577694⟩,⟨-130916365469567153450248820808999553307151766140677119864443,-130916365469567153450248820808999553307151766140647650024462⟩⟩, + ⟨⟨-199762709150625540773379970820100071749173597931298705891867,-199762709150625540773379970820100071749173597931286941142834⟩,⟨-36249,31714⟩⟩, + ⟨⟨-210491533223829872164920281702741020965178992297881495099447,-210491533223829872164920281702741020965178992297852056577694⟩,⟨130916365469567153450248820808999553307151766140647650024462,130916365469567153450248820808999553307151766140677119864443⟩⟩, + ⟨⟨-274742747282433709120743421037496123158176415400813446926893,-274742747282433709120743421037496123158176415400734193671444⟩,⟨341775794279024935707534121512572903449092853197025429315609,341775794279024935707534121512572903449092853197105427213746⟩⟩, + ⟨⟨-577027572576199938418735088174166142979355486999606894505620,-577027572576199938418735088174166142979355486999395155095140⟩,⟨723393850346226115971912709222061925318575935895157212756818,723393850346226115971912709222061925318575935895369605015077⟩⟩, + ⟨⟨-1633851346157189762707648451131981762977865814656686103423604,-1633851346157189762707648451131981762977865814656277065417018⟩,⟨1063706646717218686728967457633154644997315721074012402276154,1063706646717218686728967457633154644997315721074421612983238⟩⟩, + ⟨⟨-3656839423616642938999724638000100923036294583915437849651471,-3656839423616642938999724638000100923036294583914665657969160⟩,⟨52316427506499593022257462274000727342421928689233772595704,52316427506499593022257462274000727342421928690005896736173⟩⟩, + ⟨⟨-4480233822683102332225400315396998141155507326839141800387737,-4480233822683102332225400315396998141155507326838090585729545⟩,⟨-3734105435428550201255498203336775641577448672720745584283798,-3734105435428550201255498203336775641577448672719694256050426⟩⟩, + ⟨⟨-785204017552925677048317069261418996714858484297277861171919,-785204017552925677048317069261418996714858484295875874044728⟩,⟨-7862370123436096149639782564257783384076727705091755091805846,-7862370123436096149639782564257783384076727705090354337982057⟩⟩, + ⟨⟨5912946625349632441673773539960698679157612886637107647957205,5912946625349632441673773539960698679157612886638634071391720⟩,⟨-7162021313339235989630192680490189682334398691378930014873251,-7162021313339235989630192680490189682334398691377410570397539⟩⟩, + ⟨⟨9676533943546083559490766182977831588606770916558717652509905,9676533943546083559490766182977831588606770916559931878406708⟩,⟨-1072032599264406183270774386716516191107570734628326177785898,-1072032599264406183270774386716516191107570734627116397373973⟩⟩, + ⟨⟨7589027395327522870649861007844852086291882917811354945119537,7589027395327522870649861007844852086291882917812651412583623⟩,⟨5453495336859418472742694615025425313572252453332179697467502,5453495336859418472742694615025425313572252453333482488425016⟩⟩, + ⟨⟨2151032940956505699325479189807091346334751805017382367662250,2151032940956505699325479189807091346334751805018574180718820⟩,⟨8120549005901789874080817366776500472526784980319326226882702,8120549005901789874080817366776500472526784980320524807316985⟩⟩, + ⟨⟨-2690727631116939602967266060664970504117466111526714189111112,-2690727631116939602967266060664970504117466111525803231059848⟩,⟨6678047264573413950654616974032235405033188902040334370822743,6678047264573413950654616974032235405033188902041244294878375⟩⟩, + ⟨⟨-4951750193306504551301247058075108762007553802853095888712959,-4951750193306504551301247058075108762007553802852492623170389⟩,⟨3326523827698020787307759690425626941088331398569588877998449,3326523827698020787307759690425626941088331398570186433984604⟩⟩, + ⟨⟨-4825336350819850868910445343837406643428169144367776049363348,-4825336350819850868910445343837406643428169144367347752640370⟩,⟨185192837284754431610538477029567614753468899106142489412924,185192837284754431610538477029567614753468899106570592235640⟩⟩, + ⟨⟨-3422947488469523927130409943118974586868086636654136724940267,-3422947488469523927130409943118974586868086636653828366656978⟩,⟨-1760903989252374847514062441039459135782053899669665788834700,-1760903989252374847514062441039459135782053899669346680525046⟩⟩] +lemma tw0_1_0_5_calc (j : Fin 31) : taylorWaveBox 0 1 0 5 j = tw0_1_0_5 j := by + revert j + decide +kernel +def tw0_1_0_6 : Fin 31 → CI := ![⟨⟨-653277379108745915135822760402543601389347284659999773422198,-653277379108745915135822760402543601389347284659822401750809⟩,⟨-1995660872422849758066186229916790198900108354064484448701156,-1995660872422849758066186229916790198900108354064309391558770⟩⟩, + ⟨⟨652599165583568179449877648769598541401677014248381274239088,652599165583568179449877648769598541401677014248630063877606⟩,⟨-2706219244783980541401827392559203752598694944062983693468366,-2706219244783980541401827392559203752598694944062730550736145⟩⟩, + ⟨⟨2696437346406555362938046030816940786589346998247548707467464,2696437346406555362938046030816940786589346998247989613381101⟩,⟨-2453437043901730092444670276878150320328496423536146902899128,-2453437043901730092444670276878150320328496423535700221630992⟩⟩, + ⟨⟨4658362085502799140219061908574167407162733061666993432541453,4658362085502799140219061908574167407162733061667680649942401⟩,⟨-445942842520296414369229756461461315089803366263448010919701,-445942842520296414369229756461461315089803366262759999330181⟩⟩, + ⟨⟨4817256760228812850671855752399788256834124237065584040118094,4817256760228812850671855752399788256834124237066495036157196⟩,⟨3279122113829726461617252354079827208514363297631177356030412,3279122113829726461617252354079827208514363297632085806465210⟩⟩, + ⟨⟨1567980261606536031500299520348059296000685290440451503656163,1567980261606536031500299520348059296000685290441433654097276⟩,⟨6763834779469280873645935320033764136875349346879694251135112,6763834779469280873645935320033764136875349346880679113645620⟩⟩, + ⟨⟨-4187521213814221352717987968345973010662539929222915234451562,-4187521213814221352717987968345973010662539929221637244312209⟩,⟨6550311400500985843041148281765225996197236399125222062161119,6550311400500985843041148281765225996197236399126511636665131⟩⟩, + ⟨⟨-7894815840255362187926116541996666581670559528292467826336475,-7894815840255362187926116541996666581670559528290935966386338⟩,⟨1278794072053295347388159709799504743441775531182243944102686,1278794072053295347388159709799504743441775531183779650195261⟩⟩, + ⟨⟨-5580758447018390376019204552631868890294094371535059062328587,-5580758447018390376019204552631868890294094371533564204245834⟩,⟨-4794949210805412395998481526637257121130116109594959754335873,-4794949210805412395998481526637257121130116109593465589209359⟩⟩, + ⟨⟨45196339260113984544789515383888723415094908390107762821991,45196339260113984544789515383888723415094908391511097677535⟩,⟨-5882711172229852672226375238713371134484688738704352789378387,-5882711172229852672226375238713371134484688738702949743151107⟩⟩, + ⟨⟨2928488736602826633439290568430376997139858088923272320862602,2928488736602826633439290568430376997139858088924208596244473⟩,⟨-2717873516822404321515115002930272521272813571587441575976666,-2717873516822404321515115002930272521272813571586505316895083⟩⟩, + ⟨⟨2295036176618843240023033150432928133624697472533989174661915,2295036176618843240023033150432928133624697472534584955215640⟩,⟨-146523318841304551503802146233213372314325381684389114440105,-146523318841304551503802146233213372314325381683793993605144⟩⟩, + ⟨⟨1079708665396404776855631185350490069228016069729155435566547,1079708665396404776855631185350490069228016069729472131830849⟩,⟨450402730273308920328661158305570284796845441934887200257084,450402730273308920328661158305570284796845441935204753647815⟩⟩, + ⟨⟨501001403407755140462882760159225845014510017780726088283117,501001403407755140462882760159225845014510017780835656868488⟩,⟨304986515936366562861219885251333150505204549823021188733199,304986515936366562861219885251333150505204549823131126703924⟩⟩, + ⟨⟨319708489297736412534722683266362217632049413220911135841487,319708489297736412534722683266362217632049413220951943873854⟩,⟨127298918850239180341819955768249955354473241593724622948148,127298918850239180341819955768249955354473241593764879076981⟩⟩, + ⟨⟨280961997680221972954991732909454416070895956346417352630680,280961997680221972954991732909454416070895956346434793829559⟩,⟨-44605,50984⟩⟩, + ⟨⟨319708489297736412534722683266362217632049413220911135841487,319708489297736412534722683266362217632049413220951943873854⟩,⟨-127298918850239180341819955768249955354473241593764879076981,-127298918850239180341819955768249955354473241593724622948148⟩⟩, + ⟨⟨501001403407755140462882760159225845014510017780726088283117,501001403407755140462882760159225845014510017780835656868488⟩,⟨-304986515936366562861219885251333150505204549823131126703924,-304986515936366562861219885251333150505204549823021188733199⟩⟩, + ⟨⟨1079708665396404776855631185350490069228016069729155435592455,1079708665396404776855631185350490069228016069729472131824688⟩,⟨-450402730273308920328661158305570284796845441935204753623935,-450402730273308920328661158305570284796845441934887200265623⟩⟩, + ⟨⟨2295036176618843240023033150432928133624697472533989174659745,2295036176618843240023033150432928133624697472534584955210614⟩,⟨146523318841304551503802146233213372314325381683793993617820,146523318841304551503802146233213372314325381684389114451524⟩⟩, + ⟨⟨2928488736602826633439290568430376997139858088923272320836433,2928488736602826633439290568430376997139858088924208596229674⟩,⟨2717873516822404321515115002930272521272813571586505316912180,2717873516822404321515115002930272521272813571587441576003107⟩⟩, + ⟨⟨45196339260113984544789515383888723415094908390107762783707,45196339260113984544789515383888723415094908391511097636199⟩,⟨5882711172229852672226375238713371134484688738702949743154421,5882711172229852672226375238713371134484688738704352789378496⟩⟩, + ⟨⟨-5580758447018390376019204552631868890294094371535059062374168,-5580758447018390376019204552631868890294094371533564204259620⟩,⟨4794949210805412395998481526637257121130116109593465589158270,4794949210805412395998481526637257121130116109594959754316579⟩⟩, + ⟨⟨-7894815840255362187926116541996666581670559528292467826318992,-7894815840255362187926116541996666581670559528290935966388005⟩,⟨-1278794072053295347388159709799504743441775531183779650231927,-1278794072053295347388159709799504743441775531182243944158503⟩⟩, + ⟨⟨-4187521213814221352717987968345973010662539929222915234378947,-4187521213814221352717987968345973010662539929221637244308719⟩,⟨-6550311400500985843041148281765225996197236399126511636653410,-6550311400500985843041148281765225996197236399125222062218557⟩⟩, + ⟨⟨1567980261606536031500299520348059296000685290440451503701114,1567980261606536031500299520348059296000685290441433654136682⟩,⟨-6763834779469280873645935320033764136875349346880679113633000,-6763834779469280873645935320033764136875349346879694251128075⟩⟩, + ⟨⟨4817256760228812850671855752399788256834124237065584040138713,4817256760228812850671855752399788256834124237066495036176270⟩,⟨-3279122113829726461617252354079827208514363297632085806435341,-3279122113829726461617252354079827208514363297631177356002123⟩⟩, + ⟨⟨4658362085502799140219061908574167407162733061666993432565471,4658362085502799140219061908574167407162733061667680649911315⟩,⟨445942842520296414369229756461461315089803366262759999388680,445942842520296414369229756461461315089803366263448010923103⟩⟩, + ⟨⟨2696437346406555362938046030816940786589346998247548707451977,2696437346406555362938046030816940786589346998247989613372117⟩,⟨2453437043901730092444670276878150320328496423535700221641939,2453437043901730092444670276878150320328496423536146902916567⟩⟩, + ⟨⟨652599165583568179449877648769598541401677014248381274234901,652599165583568179449877648769598541401677014248630063845958⟩,⟨2706219244783980541401827392559203752598694944062730550754208,2706219244783980541401827392559203752598694944062983693458927⟩⟩, + ⟨⟨-653277379108745915135822760402543601389347284659999773441352,-653277379108745915135822760402543601389347284659822401754290⟩,⟨1995660872422849758066186229916790198900108354064309391547636,1995660872422849758066186229916790198900108354064484448705748⟩⟩] +lemma tw0_1_0_6_calc (j : Fin 31) : taylorWaveBox 0 1 0 6 j = tw0_1_0_6 j := by + revert j + decide +kernel +def tw0_1_0_7 : Fin 31 → CI := ![⟨⟨1005612552419831067318647078388921076955830241507956082778247,1005612552419831067318647078388921076955830241508043807278094⟩,⟨-159785528862897649308831929185339427219349458738564548293025,-159785528862897649308831929185339427219349458738477676656001⟩⟩, + ⟨⟨1293718221688600804337626144200546220916540810222823190167501,1293718221688600804337626144200546220916540810222979638392486⟩,⟨601015940899984786601092727380685291011161224010926282323201,601015940899984786601092727380685291011161224011078335201936⟩⟩, + ⟨⟨944621382941767417291667747886395370902099534633654206817773,944621382941767417291667747886395370902099534633936857367656⟩,⟨1740526648403024215282921683063710488734493455805086572802834,1740526648403024215282921683063710488734493455805365752444570⟩⟩, + ⟨⟨-516311341172766864084265931213613654959366059003161250763267,-516311341172766864084265931213613654959366059002715345633515⟩,⟨2653944473416611192381894822351448230528395441437051262440075,2653944473416611192381894822351448230528395441437496768714499⟩⟩, + ⟨⟨-2894048130929143708999373493377647265951416738522696880586705,-2894048130929143708999373493377647265951416738522101170007576⟩,⟨2129758885629527452596504443182112954500211912511354279708852,2129758885629527452596504443182112954500211912511949591624586⟩⟩, + ⟨⟨-4521195190765177491467029053027877892797698517091069782969505,-4521195190765177491467029053027877892797698517090209883575376⟩,⟨-764523399040889581990286829214995566615287894821693174377559,-764523399040889581990286829214995566615287894820839788658655⟩⟩, + ⟨⟨-2853877755563442386389898867218409285203292719593384284969975,-2853877755563442386389898867218409285203292719592306464787601⟩,⟨-4723202194921190728943417638530895769634747583501250077694840,-4723202194921190728943417638530895769634747583500178622836389⟩⟩, + ⟨⟨2207963010441713401989518372536285596319533522752402628128557,2207963010441713401989518372536285596319533522753705913174575⟩,⟨-5709783438025860952767907921865911168576407747598673498233044,-5709783438025860952767907921865911168576407747597369223487685⟩⟩, + ⟨⟨5899739073399787195751856788449704180959468440021968468897470,5899739073399787195751856788449704180959468440023630945574202⟩,⟨-1510982100054495284702786487355847655560579762114931573397634,-1510982100054495284702786487355847655560579762113267621793469⟩⟩, + ⟨⟨3999407431234220262358840747703046244785523468872130805568606,3999407431234220262358840747703046244785523468873564839331379⟩,⟨3438856068024838659720079821059240287071024043767517603510073,3438856068024838659720079821059240287071024043768951614306946⟩⟩, + ⟨⟨-233662701090209285695904297293477292005339922542996299437405,-233662701090209285695904297293477292005339922541783719416020⟩,⟨3872749616668648983254596970654383358199572796203143477262396,3872749616668648983254596970654383358199572796204356124816212⟩⟩, + ⟨⟨-1837048952827836134914479290518791564524557258377733901968174,-1837048952827836134914479290518791564524557258376974037730198⟩,⟨1561895916566456321935250316614796623183246623409976024460360,1561895916566456321935250316614796623183246623410735320055838⟩⟩, + ⟨⟨-1307187161957789693446783952043296396305088556034654211644656,-1307187161957789693446783952043296396305088556034285935791997⟩,⟨140497945346585044436655123281756025185856457173318886161580,140497945346585044436655123281756025185856457173687357934510⟩⟩, + ⟨⟨-683448716986650906568924819079556820786297031405866792221340,-683448716986650906568924819079556820786297031405739247815782⟩,⟨-138514507596224797258077250783818323548044084899892566667515,-138514507596224797258077250783818323548044084899765576469852⟩⟩, + ⟨⟨-416052769293976951423962714408497477097588199620152821658947,-416052769293976951423962714408497477097588199620101614584611⟩,⟨-84967087641961273696471975783875192016569534061456868923537,-84967087641961273696471975783875192016569534061407086848638⟩⟩, + ⟨⟨-351259616310019343761684629750669602384463866882453398124844,-351259616310019343761684629750669602384463866882430474986374⟩,⟨-63742,55765⟩⟩, + ⟨⟨-416052769293976951423962714408497477097588199620152821658947,-416052769293976951423962714408497477097588199620101614584611⟩,⟨84967087641961273696471975783875192016569534061407086848638,84967087641961273696471975783875192016569534061456868923537⟩⟩, + ⟨⟨-683448716986650906568924819079556820786297031405866792221340,-683448716986650906568924819079556820786297031405739247815782⟩,⟨138514507596224797258077250783818323548044084899765576469852,138514507596224797258077250783818323548044084899892566667515⟩⟩, + ⟨⟨-1307187161957789693446783952043296396305088556034654211635833,-1307187161957789693446783952043296396305088556034285935811961⟩,⟨-140497945346585044436655123281756025185856457173687357931807,-140497945346585044436655123281756025185856457173318886190077⟩⟩, + ⟨⟨-1837048952827836134914479290518791564524557258377733901956791,-1837048952827836134914479290518791564524557258376974037720428⟩,⟨-1561895916566456321935250316614796623183246623410735320062285,-1561895916566456321935250316614796623183246623409976024469653⟩⟩, + ⟨⟨-233662701090209285695904297293477292005339922542996299414448,-233662701090209285695904297293477292005339922541783719381005⟩,⟨-3872749616668648983254596970654383358199572796204356124823422,-3872749616668648983254596970654383358199572796203143477258262⟩⟩, + ⟨⟨3999407431234220262358840747703046244785523468872130805594069,3999407431234220262358840747703046244785523468873564839354384⟩,⟨-3438856068024838659720079821059240287071024043768951614279850,-3438856068024838659720079821059240287071024043767517603484667⟩⟩, + ⟨⟨5899739073399787195751856788449704180959468440021968468871462,5899739073399787195751856788449704180959468440023630945580608⟩,⟨1510982100054495284702786487355847655560579762113267621814087,1510982100054495284702786487355847655560579762114931573450667⟩⟩, + ⟨⟨2207963010441713401989518372536285596319533522752402628100678,2207963010441713401989518372536285596319533522753705913135244⟩,⟨5709783438025860952767907921865911168576407747597369223506067,5709783438025860952767907921865911168576407747598673498239975⟩⟩, + ⟨⟨-2853877755563442386389898867218409285203292719593384284971528,-2853877755563442386389898867218409285203292719592306464839058⟩,⟨4723202194921190728943417638530895769634747583500178622844288,4723202194921190728943417638530895769634747583501250077652826⟩⟩, + ⟨⟨-4521195190765177491467029053027877892797698517091069782971851,-4521195190765177491467029053027877892797698517090209883582479⟩,⟨764523399040889581990286829214995566615287894820839788632815,764523399040889581990286829214995566615287894821693174346976⟩⟩, + ⟨⟨-2894048130929143708999373493377647265951416738522696880573506,-2894048130929143708999373493377647265951416738522101169995077⟩,⟨-2129758885629527452596504443182112954500211912511949591641752,-2129758885629527452596504443182112954500211912511354279726682⟩⟩, + ⟨⟨-516311341172766864084265931213613654959366059003161250730020,-516311341172766864084265931213613654959366059002715345631304⟩,⟨-2653944473416611192381894822351448230528395441437496768702097,-2653944473416611192381894822351448230528395441437051262458695⟩⟩, + ⟨⟨944621382941767417291667747886395370902099534633654206824948,944621382941767417291667747886395370902099534633936857378627⟩,⟨-1740526648403024215282921683063710488734493455805365752441854,-1740526648403024215282921683063710488734493455805086572796318⟩⟩, + ⟨⟨1293718221688600804337626144200546220916540810222823190179726,1293718221688600804337626144200546220916540810222979638388207⟩,⟨-601015940899984786601092727380685291011161224011078335185124,-601015940899984786601092727380685291011161224010926282322877⟩⟩, + ⟨⟨1005612552419831067318647078388921076955830241507956082774095,1005612552419831067318647078388921076955830241508043807280848⟩,⟨159785528862897649308831929185339427219349458738477676658236,159785528862897649308831929185339427219349458738564548302131⟩⟩] +lemma tw0_1_0_7_calc (j : Fin 31) : taylorWaveBox 0 1 0 7 j = tw0_1_0_7 j := by + revert j + decide +kernel +def tw0_1_0_8 : Fin 31 → CI := ![⟨⟨-534165963681313984707357413886871524784877605968382985774,-534165963681313984707357413886871524784877605929680904375⟩,⟨444365936632261422847441036968653486987561035271877134256338,444365936632261422847441036968653486987561035271917140862727⟩⟩, + ⟨⟨-389276239016594751272166063700952255050108380071527345135069,-389276239016594751272166063700952255050108380071445700135225⟩,⟨530363295528262958457936104930564696702914488762251305761223,530363295528262958457936104930564696702914488762335484958611⟩⟩, + ⟨⟨-936573464224507146521109064347598920271822718375527720541179,-936573464224507146521109064347598920271822718375372487810160⟩,⟨245370288617528003779667395456247144015035244274072904253721,245370288617528003779667395456247144015035244274229638639184⟩⟩, + ⟨⟨-1247177307853384958412464206198161510987328653436888273315758,-1247177307853384958412464206198161510987328653436633834987147⟩,⟨-648863414469146143046342967278607883022331414999814334839438,-648863414469146143046342967278607883022331414999559769949374⟩⟩, + ⟨⟨-581102052826556349767128930854653805122904443194197180142754,-581102052826556349767128930854653805122904443193791794558333⟩,⟨-1907521306350855490400326405198798280669802761782049838089037,-1907521306350855490400326405198798280669802761781643090583564⟩⟩, + ⟨⟨1454212542618152747941116438935451779615382046680457697930584,1454212542618152747941116438935451779615382046681076183153389⟩,⟨-2305032999490686700185548479821199664408180469396143213332134,-2305032999490686700185548479821199664408180469395520993488091⟩⟩, + ⟨⟨3512646848147928256934943891988598349557705721913205377502077,3512646848147928256934943891988598349557705721913963254903782⟩,⟨-299476531106507054110276046178537275708533316295923184647182,-299476531106507054110276046178537275708533316295164968128735⟩⟩, + ⟨⟨2626299000094776278131753020275826104169037370440023505164960,2626299000094776278131753020275826104169037370441250757236551⟩,⟨3299770286186552718084659881200774217937526265169561960615979,3299770286186552718084659881200774217937526265170786066259881⟩⟩, + ⟨⟨-1596294170818395038045180601713579736875525525071305639006366,-1596294170818395038045180601713579736875525525069811281732663⟩,⟨4246747094036939739417339495301876502714233184459872339330903,4246747094036939739417339495301876502714233184461366436571826⟩⟩, + ⟨⟨-4203130972380636412761020694234502604441741098486310513695160,-4203130972380636412761020694234502604441741098484681648567061⟩,⟨670191326402687479917203022318224663210103555545177384605800,670191326402687479917203022318224663210103555546806498061065⟩⟩, + ⟨⟨-2190012607872089748691379231968906648028333684986354106711281,-2190012607872089748691379231968906648028333684985058399030479⟩,⟨-2588716841771229074606874706576650010515487260157371412670509,-2588716841771229074606874706576650010515487260156075686347386⟩⟩, + ⟨⟨508351325963589247261248453103112235361458331479587007357233,508351325963589247261248453103112235361458331480408028743833⟩,⟨-2217924664002314538113418552205467255359152231322213771998405,-2217924664002314538113418552205467255359152231321392452003683⟩⟩, + ⟨⟨1090407677318984482303842234390367019003667028574782938835071,1090407677318984482303842234390367019003667028575238390865779⟩,⟨-761043622321093605462489652235766267659939220186513488492733,-761043622321093605462489652235766267659939220186058852519057⟩⟩, + ⟨⟨738144975786622710562499518363067786835720571841253383089859,738144975786622710562499518363067786835720571841427669444723⟩,⟨-109226544172648645449867409520546654077335909244940663809230,-109226544172648645449867409520546654077335909244767870806521⟩⟩, + ⟨⟨471465692537059918596551169284014001051937046699850928437029,471465692537059918596551169284014001051937046699917873938594⟩,⟨11305151374303042987133464192027385801719810574380563445876,11305151374303042987133464192027385801719810574445354488473⟩⟩, + ⟨⟨395231337910766509092475550793435623530860084917860452616488,395231337910766509092475550793435623530860084917887503401921⟩,⟨-62747,71723⟩⟩, + ⟨⟨471465692537059918596551169284014001051937046699850928437029,471465692537059918596551169284014001051937046699917873938594⟩,⟨-11305151374303042987133464192027385801719810574445354488473,-11305151374303042987133464192027385801719810574380563445876⟩⟩, + ⟨⟨738144975786622710562499518363067786835720571841253383089859,738144975786622710562499518363067786835720571841427669444723⟩,⟨109226544172648645449867409520546654077335909244767870806521,109226544172648645449867409520546654077335909244940663809230⟩⟩, + ⟨⟨1090407677318984482303842234390367019003667028574782938849431,1090407677318984482303842234390367019003667028575238390848728⟩,⟨761043622321093605462489652235766267659939220186058852549905,761043622321093605462489652235766267659939220186513488490171⟩⟩, + ⟨⟨508351325963589247261248453103112235361458331479587007344985,508351325963589247261248453103112235361458331480408028731199⟩,⟨2217924664002314538113418552205467255359152231321392452005200,2217924664002314538113418552205467255359152231322213771996860⟩⟩, + ⟨⟨-2190012607872089748691379231968906648028333684986354106734227,-2190012607872089748691379231968906648028333684985058399046018⟩,⟨2588716841771229074606874706576650010515487260156075686326348,2588716841771229074606874706576650010515487260157371412658482⟩⟩, + ⟨⟨-4203130972380636412761020694234502604441741098486310513690499,-4203130972380636412761020694234502604441741098484681648564658⟩,⟨-670191326402687479917203022318224663210103555546806498088528,-670191326402687479917203022318224663210103555545177384635560⟩⟩, + ⟨⟨-1596294170818395038045180601713579736875525525071305638989915,-1596294170818395038045180601713579736875525525069811281695774⟩,⟨-4246747094036939739417339495301876502714233184461366436591775,-4246747094036939739417339495301876502714233184459872339330414⟩⟩, + ⟨⟨2626299000094776278131753020275826104169037370440023505189373,2626299000094776278131753020275826104169037370441250757250577⟩,⟨-3299770286186552718084659881200774217937526265170786066239113,-3299770286186552718084659881200774217937526265169561960605598⟩⟩, + ⟨⟨3512646848147928256934943891988598349557705721913205377512760,3512646848147928256934943891988598349557705721913963254888523⟩,⟨299476531106507054110276046178537275708533316295164968161704,299476531106507054110276046178537275708533316295923184654236⟩⟩, + ⟨⟨1454212542618152747941116438935451779615382046680457697917703,1454212542618152747941116438935451779615382046681076183137472⟩,⟨2305032999490686700185548479821199664408180469395520993498652,2305032999490686700185548479821199664408180469396143213339659⟩⟩, + ⟨⟨-581102052826556349767128930854653805122904443194197180154089,-581102052826556349767128930854653805122904443193791794570053⟩,⟨1907521306350855490400326405198798280669802761781643090580263,1907521306350855490400326405198798280669802761782049838085336⟩⟩, + ⟨⟨-1247177307853384958412464206198161510987328653436888273312730,-1247177307853384958412464206198161510987328653436633834998501⟩,⟨648863414469146143046342967278607883022331414999559769948189,648863414469146143046342967278607883022331414999814334823855⟩⟩, + ⟨⟨-936573464224507146521109064347598920271822718375527720540983,-936573464224507146521109064347598920271822718375372487808088⟩,⟨-245370288617528003779667395456247144015035244274229638644968,-245370288617528003779667395456247144015035244274072904257629⟩⟩, + ⟨⟨-389276239016594751272166063700952255050108380071527345127345,-389276239016594751272166063700952255050108380071445700135921⟩,⟨-530363295528262958457936104930564696702914488762335484956973,-530363295528262958457936104930564696702914488762251305768010⟩⟩, + ⟨⟨-534165963681313984707357413886871524784877605968382984631,-534165963681313984707357413886871524784877605929680900535⟩,⟨-444365936632261422847441036968653486987561035271917140864173,-444365936632261422847441036968653486987561035271877134255071⟩⟩] +lemma tw0_1_0_8_calc (j : Fin 31) : taylorWaveBox 0 1 0 8 j = tw0_1_0_8 j := by + revert j + decide +kernel +def tw0_1_0_9 : Fin 31 → CI := ![⟨⟨-174045575353743430776428316570960947555542535921507298093467,-174045575353743430776428316570960947555542535921488680774537⟩,⟨-28083914875693697297331557272174669337288804098960066659527,-28083914875693697297331557272174669337288804098942328561887⟩⟩, + ⟨⟨-185857836483058627102579067665755464659713990563394029189966,-185857836483058627102579067665755464659713990563353795156325⟩,⟨-203811265864057943360831615128859627791398413163449018031243,-203811265864057943360831615128859627791398413163409882215263⟩⟩, + ⟨⟨-6548685503304494952038395161206677274785020771691187371313,-6548685503304494952038395161206677274785020771613530735310⟩,⟨-430260528173163095170676478211362357402082727972359992530381,-430260528173163095170676478211362357402082727972282793215525⟩⟩, + ⟨⟨461345597611186534921370670574908163190196922458944156011396,461345597611186534921370670574908163190196922459076743030518⟩,⟨-478342975983276883547902695238695099481076991286409703878286,-478342975983276883547902695238695099481076991286277121357516⟩⟩, + ⟨⟨1005078627739653975109462888705405703963703212548962222951191,1005078627739653975109462888705405703963703212549217374591767⟩,⟨43256036939441804801083905232686584917988221374916739899960,43256036939441804801083905232686584917988221375170999839915⟩⟩, + ⟨⟨846849342953112016083944705714791375285751105333592403222960,846849342953112016083944705714791375285751105333983536234766⟩,⟨1204797282221832207266340776191147215337524952115606942677060,1204797282221832207266340776191147215337524952115997124902046⟩⟩, + ⟨⟨-746896022119213305646406032092483205634146862907438921307990,-746896022119213305646406032092483205634146862906876389343987⟩,⟨1906313929485582925310459344797634272750009173150615955305799,1906313929485582925310459344797634272750009173151180870952799⟩⟩, + ⟨⟨-2614377001834798764724050181459029443464371087828066648511216,-2614377001834798764724050181459029443464371087827105711744005⟩,⟨375536450063117443490045707626312076240807068118754833962987,375536450063117443490045707626312076240807068119716987090321⟩⟩, + ⟨⟨-1737333677658882515545492109706520726546066403679239753077871,-1737333677658882515545492109706520726546066403677881349967673⟩,⟨-2534118752054340595936300523734674120815927270726854474965980,-2534118752054340595936300523734674120815927270725496699146992⟩⟩, + ⟨⟨1616979574321019023239181353750651729720652916462127725862860,1616979574321019023239181353750651729720652916463626511109484⟩,⟨-2670945649281863829697491421165956476322501578097058590507639,-2670945649281863829697491421165956476322501578095559839009158⟩⟩, + ⟨⟨2678871373404495268152248463511893909672935393426325494378871,2678871373404495268152248463511893909672935393427715873963468⟩,⟨285620913395171272302490198361804167158588663837974332834395,285620913395171272302490198361804167158588663839364668486011⟩⟩, + ⟨⟨788035153599401290521769773045323079915701805566008173078107,788035153599401290521769773045323079915701805566968932535407⟩,⟨1785908594661149609729448356062711928616384281017644002935083,1785908594661149609729448356062711928616384281018605455575186⟩⟩, + ⟨⟨-541889536588966043392101305129976776452501403178834452031607,-541889536588966043392101305129976776452501403178306232652686⟩,⟨1096002066550916179064109781727847696928084779315526698067924,1096002066550916179064109781727847696928084779316053979754536⟩⟩, + ⟨⟨-639151541583799359838502353915781701322790474647431132180762,-639151541583799359838502353915781701322790474647227081121619⟩,⟨344023932456604137327202100496067123891602085577744611325767,344023932456604137327202100496067123891602085577947163727580⟩⟩, + ⟨⟨-470542755916998258266936094255484770320522440413446101816248,-470542755916998258266936094255484770320522440413368787036653⟩,⟨72802675645108425172455357830860542124514828243130892074945,72802675645108425172455357830860542124514828243205789992552⟩⟩, + ⟨⟨-404279609241984685630268587008134763915762897379985805171790,-404279609241984685630268587008134763915762897379956848234299⟩,⟨-73366,64183⟩⟩, + ⟨⟨-470542755916998258266936094255484770320522440413446101816248,-470542755916998258266936094255484770320522440413368787036653⟩,⟨-72802675645108425172455357830860542124514828243205789992552,-72802675645108425172455357830860542124514828243130892074944⟩⟩, + ⟨⟨-639151541583799359838502353915781701322790474647431132180762,-639151541583799359838502353915781701322790474647227081121619⟩,⟨-344023932456604137327202100496067123891602085577947163727580,-344023932456604137327202100496067123891602085577744611325766⟩⟩, + ⟨⟨-541889536588966043392101305129976776452501403178834452007552,-541889536588966043392101305129976776452501403178306232662047⟩,⟨-1096002066550916179064109781727847696928084779316053979748680,-1096002066550916179064109781727847696928084779315526698095376⟩⟩, + ⟨⟨788035153599401290521769773045323079915701805566008173087573,788035153599401290521769773045323079915701805566968932543037⟩,⟨-1785908594661149609729448356062711928616384281018605455567841,-1785908594661149609729448356062711928616384281017644002929646⟩⟩, + ⟨⟨2678871373404495268152248463511893909672935393426325494377475,2678871373404495268152248463511893909672935393427715873968816⟩,⟨-285620913395171272302490198361804167158588663839364668469626,-285620913395171272302490198361804167158588663837974332810661⟩⟩, + ⟨⟨1616979574321019023239181353750651729720652916462127725845725,1616979574321019023239181353750651729720652916463626511091232⟩,⟨2670945649281863829697491421165956476322501578095559839021505,2670945649281863829697491421165956476322501578097058590518460⟩⟩, + ⟨⟨-1737333677658882515545492109706520726546066403679239753101630,-1737333677658882515545492109706520726546066403677881349975410⟩,⟨2534118752054340595936300523734674120815927270725496699127950,2534118752054340595936300523734674120815927270726854474962961⟩⟩, + ⟨⟨-2614377001834798764724050181459029443464371087828066648505735,-2614377001834798764724050181459029443464371087827105711744811⟩,⟨-375536450063117443490045707626312076240807068119716987102492,-375536450063117443490045707626312076240807068118754833981446⟩⟩, + ⟨⟨-746896022119213305646406032092483205634146862907438921288402,-746896022119213305646406032092483205634146862906876389341545⟩,⟨-1906313929485582925310459344797634272750009173151180870948167,-1906313929485582925310459344797634272750009173150615955318327⟩⟩, + ⟨⟨846849342953112016083944705714791375285751105333592403231217,846849342953112016083944705714791375285751105333983536241518⟩,⟨-1204797282221832207266340776191147215337524952115997124895989,-1204797282221832207266340776191147215337524952115606942672513⟩⟩, + ⟨⟨1005078627739653975109462888705405703963703212548962222951562,1005078627739653975109462888705405703963703212549217374591927⟩,⟨-43256036939441804801083905232686584917988221375170999833739,-43256036939441804801083905232686584917988221374916739893991⟩⟩, + ⟨⟨461345597611186534921370670574908163190196922458944156010986,461345597611186534921370670574908163190196922459076743024441⟩,⟨478342975983276883547902695238695099481076991286277121363354,478342975983276883547902695238695099481076991286409703878469⟩⟩, + ⟨⟨-6548685503304494952038395161206677274785020771691187373921,-6548685503304494952038395161206677274785020771613530737126⟩,⟨430260528173163095170676478211362357402082727972282793215154,430260528173163095170676478211362357402082727972359992530801⟩⟩, + ⟨⟨-185857836483058627102579067665755464659713990563394029189446,-185857836483058627102579067665755464659713990563353795159541⟩,⟨203811265864057943360831615128859627791398413163409882215898,203811265864057943360831615128859627791398413163449018028144⟩⟩, + ⟨⟨-174045575353743430776428316570960947555542535921507298094272,-174045575353743430776428316570960947555542535921488680774115⟩,⟨28083914875693697297331557272174669337288804098942328560306,28083914875693697297331557272174669337288804098960066659167⟩⟩] +lemma tw0_1_0_9_calc (j : Fin 31) : taylorWaveBox 0 1 0 9 j = tw0_1_0_9 j := by + revert j + decide +kernel +def tw0_1_0_10 : Fin 31 → CI := ![⟨⟨20092882630461237175693797364490057158312372501790050298204,20092882630461237175693797364490057158312372501797411855424⟩,⟨-60885163316237193454178733867658590959183465083577080320323,-60885163316237193454178733867658590959183465083569319188147⟩⟩, + ⟨⟨90864949229538240566720892505300803281051010083641959081233,90864949229538240566720892505300803281051010083658926456322⟩,⟨-54601554482191319337130157375309531882834263800677400202929,-54601554482191319337130157375309531882834263800660054290670⟩⟩, + ⟨⟨170864651047300775963652658935736128435702700292309216508051,170864651047300775963652658935736128435702700292344089854898⟩,⟨39248852538629669406017692694958168384665551099395671757753,39248852538629669406017692694958168384665551099430609776744⟩⟩, + ⟨⟨142060517425451131332387479483322870157282637763009396468360,142060517425451131332387479483322870157282637763081417878489⟩,⟨250489437375713745702696575522561734236819160347421427872566,250489437375713745702696575522561734236819160347493416219249⟩⟩, + ⟨⟨-173312227822256519334352923613909022855044929872334403807509,-173312227822256519334352923613909022855044929872193010112084⟩,⟨431750813038854235775353633797433454499067464080409776853350,431750813038854235775353633797433454499067464080551495033026⟩⟩, + ⟨⟨-712253435932621317146987599483290948598154405932160201646771,-712253435932621317146987599483290948598154405931935482850115⟩,⟨157300895625483688678998836538858648528982858368903405027452,157300895625483688678998836538858648528982858369127815623385⟩⟩, + ⟨⟨-734073204570159271005331077024210493125837581741711451423789,-734073204570159271005331077024210493125837581741326457729678⟩,⟨-805709014439559979760900675467913482739391974084011358360466,-805709014439559979760900675467913482739391974083627859626703⟩⟩, + ⟨⟨572127693223930929770469807218049903327697423146679805245716,572127693223930929770469807218049903327697423147362767881715⟩,⟨-1404198596172970099372783931773016504533076168436367537305443,-1404198596172970099372783931773016504533076168435684292875940⟩⟩, + ⟨⟨1907278700238630637904594407398198988537843611438721104257663,1907278700238630637904594407398198988537843611439840248605137⟩,⟨17715333761110454415350612175821861957726254299619376500240,17715333761110454415350612175821861957726254300738864864605⟩⟩, + ⟨⟨668261141148552279604526312802413166472253860550835289149239,668261141148552279604526312802413166472253860552233581776181⟩,⟨1990368902070412530037237793011561797039440859051759913897684,1990368902070412530037237793011561797039440859053158099811177⟩⟩, + ⟨⟨-1554600086399264889862580319377454200271180286061660984225967,-1554600086399264889862580319377454200271180286060337687043636⟩,⟨1197097977488278325783431913456601274291115111727679214879141,1197097977488278325783431913456601274291115111729002498514431⟩⟩, + ⟨⟨-1336422081738736786210185946798618876267180061041870556362997,-1336422081738736786210185946798618876267180061040941767005022⟩,⟨-755237100534867883305729897617403431316920843493768070388943,-755237100534867883305729897617403431316920843492839208190316⟩⟩, + ⟨⟨-44399032017467854841661831130742116075921451201225863954413,-44399032017467854841661831130742116075921451200707068078805⟩,⟨-1029549209348354937357518413268815973308543051711317171201890,-1029549209348354937357518413268815973308543051710798622104750⟩⟩, + ⟨⟨431698381968536160497493008054122184441031220643890260843298,431698381968536160497493008054122184441031220644098921492766⟩,⟨-482244958696359258079756141971013145695532169477447551373187,-482244958696359258079756141971013145695532169477239724858536⟩⟩, + ⟨⟨416747464284940355918068834915427646980902013228016097076531,416747464284940355918068834915427646980902013228096247534747⟩,⟨-143203366799141912690043932720694330820296452596954166445013,-143203366799141912690043932720694330820296452596876206276856⟩⟩, + ⟨⟨379073775804539702592188045394743833446457609287400799281580,379073775804539702592188045394743833446457609287429157454975⟩,⟨-60182,68794⟩⟩, + ⟨⟨416747464284940355918068834915427646980902013228016097076531,416747464284940355918068834915427646980902013228096247534747⟩,⟨143203366799141912690043932720694330820296452596876206276856,143203366799141912690043932720694330820296452596954166445012⟩⟩, + ⟨⟨431698381968536160497493008054122184441031220643890260843298,431698381968536160497493008054122184441031220644098921492766⟩,⟨482244958696359258079756141971013145695532169477239724858536,482244958696359258079756141971013145695532169477447551373187⟩⟩, + ⟨⟨-44399032017467854841661831130742116075921451201225863951817,-44399032017467854841661831130742116075921451200707068101019⟩,⟨1029549209348354937357518413268815973308543051710798622121293,1029549209348354937357518413268815973308543051711317171195331⟩⟩, + ⟨⟨-1336422081738736786210185946798618876267180061041870556364353,-1336422081738736786210185946798618876267180061040941767008432⟩,⟨755237100534867883305729897617403431316920843492839208182439,755237100534867883305729897617403431316920843493768070380726⟩⟩, + ⟨⟨-1554600086399264889862580319377454200271180286061660984219075,-1554600086399264889862580319377454200271180286060337687032419⟩,⟨-1197097977488278325783431913456601274291115111729002498527721,-1197097977488278325783431913456601274291115111727679214888964⟩⟩, + ⟨⟨668261141148552279604526312802413166472253860550835289163445,668261141148552279604526312802413166472253860552233581789241⟩,⟨-1990368902070412530037237793011561797039440859053158099806603,-1990368902070412530037237793011561797039440859051759913894162⟩⟩, + ⟨⟨1907278700238630637904594407398198988537843611438721104252366,1907278700238630637904594407398198988537843611439840248610410⟩,⟨-17715333761110454415350612175821861957726254300738864857954,-17715333761110454415350612175821861957726254299619376483019⟩⟩, + ⟨⟨572127693223930929770469807218049903327697423146679805238891,572127693223930929770469807218049903327697423147362767872008⟩,⟨1404198596172970099372783931773016504533076168435684292880665,1404198596172970099372783931773016504533076168436367537307286⟩⟩, + ⟨⟨-734073204570159271005331077024210493125837581741711451423163,-734073204570159271005331077024210493125837581741326457739263⟩,⟨805709014439559979760900675467913482739391974083627859627477,805709014439559979760900675467913482739391974084011358351029⟩⟩, + ⟨⟨-712253435932621317146987599483290948598154405932160201645474,-712253435932621317146987599483290948598154405931935482849424⟩,⟨-157300895625483688678998836538858648528982858369127815627525,-157300895625483688678998836538858648528982858368903405032195⟩⟩, + ⟨⟨-173312227822256519334352923613909022855044929872334403804861,-173312227822256519334352923613909022855044929872193010109516⟩,⟨-431750813038854235775353633797433454499067464080551495034034,-431750813038854235775353633797433454499067464080409776854438⟩⟩, + ⟨⟨142060517425451131332387479483322870157282637763009396471518,142060517425451131332387479483322870157282637763081417878630⟩,⟨-250489437375713745702696575522561734236819160347493416216761,-250489437375713745702696575522561734236819160347421427873098⟩⟩, + ⟨⟨170864651047300775963652658935736128435702700292309216508133,170864651047300775963652658935736128435702700292344089855265⟩,⟨-39248852538629669406017692694958168384665551099430609776014,-39248852538629669406017692694958168384665551099395671756738⟩⟩, + ⟨⟨90864949229538240566720892505300803281051010083641959081600,90864949229538240566720892505300803281051010083658926455231⟩,⟨54601554482191319337130157375309531882834263800660054292000,54601554482191319337130157375309531882834263800677400202801⟩⟩, + ⟨⟨20092882630461237175693797364490057158312372501790050297622,20092882630461237175693797364490057158312372501797411855331⟩,⟨60885163316237193454178733867658590959183465083569319188026,60885163316237193454178733867658590959183465083577080320692⟩⟩] +lemma tw0_1_0_10_calc (j : Fin 31) : taylorWaveBox 0 1 0 10 j = tw0_1_0_10 j := by + revert j + decide +kernel +def tw0_1_0_11 : Fin 31 → CI := ![⟨⟨19115614481787070323405706409235380764984555462513857245723,19115614481787070323405706409235380764984555462516794398540⟩,⟨9892044636345978095811727721673747775242705787076548599831,9892044636345978095811727721673747775242705787079340348391⟩⟩, + ⟨⟨12641532346564855141031268668039191159415097102869590753199,12641532346564855141031268668039191159415097102876420581845⟩,⟨35419334811638875620926306901393283672073973947664506522583,35419334811638875620926306901393283672073973947671234086345⟩⟩, + ⟨⟨-29671149105419575251709958716232343908419273976046236225786,-29671149105419575251709958716232343908419273976031762083473⟩,⟨58877580826365500872007695175082569481543528200878211873701,58877580826365500872007695175082569481543528200892715812563⟩⟩, + ⟨⟨-112194102816031622900696670792555546161685891479756541450052,-112194102816031622900696670792555546161685891479721499526954⟩,⟨26070464883622358355140878065337636175736617658788369938174,26070464883622358355140878065337636175736617658823431076394⟩⟩, + ⟨⟨-149252541154933451144408751265107104552197131860114612351733,-149252541154933451144408751265107104552197131860043204624461⟩,⟨-131021952270119014965767504581051611964473726221382241255920,-131021952270119014965767504581051611964473726221310883409792⟩⟩, + ⟨⟨59031893915341077693780677961200994271296003282675424002764,59031893915341077693780677961200994271296003282809831240602⟩,⟨-328229623304002100141670823128606132598552233491812907692920,-328229623304002100141670823128606132598552233491678025625713⟩⟩, + ⟨⟨514700169950876272087706792078462045289933362606054354289239,514700169950876272087706792078462045289933362606286473111378⟩,⟨-148248851903879211401982001922887794835656771677005688386496,-148248851903879211401982001922887794835656771676773258501768⟩⟩, + ⟨⟨489035024811214862216915146532869328513550703934934792324794,489035024811214862216915146532869328513550703935428817563612⟩,⟨637557330567380075548315258300031992960527134993526845100578,637557330567380075548315258300031992960527134994020275409049⟩⟩, + ⟨⟨-634670258261028666441102840523271780669172942642176432244457,-634670258261028666441102840523271780669172942641340859737067⟩,⟨889841618321050472506240993410591053833912924405326388046089,889841618321050472506240993410591053833912924406162021837537⟩⟩, + ⟨⟨-1210956013797491046666671916125693850921039591779734309746886,-1210956013797491046666671916125693850921039591778572508105331⟩,⟨-481672104264813848863155245507777895750494413895703560561137,-481672104264813848863155245507777895750494413894541727809099⟩⟩, + ⟨⟨199957964364538883404991467623156306739830758313596160087154,199957964364538883404991467623156306739830758314814972670014⟩,⟨-1303840278118136519539424663460652552878556890130668727748046,-1303840278118136519539424663460652552878556890129449895149233⟩⟩, + ⟨⟨1105389904115978461326109307547363664330442709335651930334382,1105389904115978461326109307547363664330442709336568453210413⟩,⟨-140569322389339657065469212825880666337422089908941873134227,-140569322389339657065469212825880666337422089908025706273205⟩⟩, + ⟨⟨415896403118660409645668953653733128051418380770101860872761,415896403118660409645668953653733128051418380770608177296039⟩,⟨685441912660443492787285118370139521292529481593199966952659,685441912660443492787285118370139521292529481593706699676552⟩⟩, + ⟨⟨-199228348578727132437716540534719731315390078183172343866952,-199228348578727132437716540534719731315390078182980403697759⟩,⟨494094173158924368465598034612226270728227950445258879591236,494094173158924368465598034612226270728227950445450818150925⟩⟩, + ⟨⟨-328836391942431793143459418749611053387815593210225755458986,-328836391942431793143459418749611053387815593210150231386887⟩,⟨183272671055759089517664720053112943951487786967794943489347,183272671055759089517664720053112943951487786967868832830997⟩⟩, + ⟨⟨-328097966512614650450053508068532791789712899743204921634225,-328097966512614650450053508068532791789712899743179332547694⟩,⟨-59544,52089⟩⟩, + ⟨⟨-328836391942431793143459418749611053387815593210225755458986,-328836391942431793143459418749611053387815593210150231386887⟩,⟨-183272671055759089517664720053112943951487786967868832830997,-183272671055759089517664720053112943951487786967794943489347⟩⟩, + ⟨⟨-199228348578727132437716540534719731315390078183172343866952,-199228348578727132437716540534719731315390078182980403697759⟩,⟨-494094173158924368465598034612226270728227950445450818150925,-494094173158924368465598034612226270728227950445258879591236⟩⟩, + ⟨⟨415896403118660409645668953653733128051418380770101860890799,415896403118660409645668953653733128051418380770608177295116⟩,⟨-685441912660443492787285118370139521292529481593706699667475,-685441912660443492787285118370139521292529481593199966961190⟩⟩, + ⟨⟨1105389904115978461326109307547363664330442709335651930332947,1105389904115978461326109307547363664330442709336568453207636⟩,⟨140569322389339657065469212825880666337422089908025706279269,140569322389339657065469212825880666337422089908941873139597⟩⟩, + ⟨⟨199957964364538883404991467623156306739830758313596160076082,199957964364538883404991467623156306739830758314814972661548⟩,⟨1303840278118136519539424663460652552878556890129449895149514,1303840278118136519539424663460652552878556890130668727750586⟩⟩, + ⟨⟨-1210956013797491046666671916125693850921039591779734309750096,-1210956013797491046666671916125693850921039591778572508109221⟩,⟨481672104264813848863155245507777895750494413894541727801291,481672104264813848863155245507777895750494413895703560552781⟩⟩, + ⟨⟨-634670258261028666441102840523271780669172942642176432241429,-634670258261028666441102840523271780669172942641340859728874⟩,⟨-889841618321050472506240993410591053833912924406162021844032,-889841618321050472506240993410591053833912924405326388047419⟩⟩, + ⟨⟨489035024811214862216915146532869328513550703934934792329501,489035024811214862216915146532869328513550703935428817566333⟩,⟨-637557330567380075548315258300031992960527134994020275405155,-637557330567380075548315258300031992960527134993526845098669⟩⟩, + ⟨⟨514700169950876272087706792078462045289933362606054354290578,514700169950876272087706792078462045289933362606286473108166⟩,⟨148248851903879211401982001922887794835656771676773258506958,148248851903879211401982001922887794835656771677005688387138⟩⟩, + ⟨⟨59031893915341077693780677961200994271296003282675424000892,59031893915341077693780677961200994271296003282809831238375⟩,⟨328229623304002100141670823128606132598552233491678025626252,328229623304002100141670823128606132598552233491812907693104⟩⟩, + ⟨⟨-149252541154933451144408751265107104552197131860114612352517,-149252541154933451144408751265107104552197131860043204625261⟩,⟨131021952270119014965767504581051611964473726221310883408899,131021952270119014965767504581051611964473726221382241255010⟩⟩, + ⟨⟨-112194102816031622900696670792555546161685891479756541449197,-112194102816031622900696670792555546161685891479721499527433⟩,⟨-26070464883622358355140878065337636175736617658823431076470,-26070464883622358355140878065337636175736617658788369939584⟩⟩, + ⟨⟨-29671149105419575251709958716232343908419273976046236225531,-29671149105419575251709958716232343908419273976031762083131⟩,⟨-58877580826365500872007695175082569481543528200892715812767,-58877580826365500872007695175082569481543528200878211873818⟩⟩, + ⟨⟨12641532346564855141031268668039191159415097102869590753686,12641532346564855141031268668039191159415097102876420581827⟩,⟨-35419334811638875620926306901393283672073973947671234086008,-35419334811638875620926306901393283672073973947664506522751⟩⟩, + ⟨⟨19115614481787070323405706409235380764984555462513857245695,19115614481787070323405706409235380764984555462516794398687⟩,⟨-9892044636345978095811727721673747775242705787079340348373,-9892044636345978095811727721673747775242705787076548599638⟩⟩] +lemma tw0_1_0_11_calc (j : Fin 31) : taylorWaveBox 0 1 0 11 j = tw0_1_0_11 j := by + revert j + decide +kernel +def tw0_1_0_12 : Fin 31 → CI := ![⟨⟨-3986937945950201595583418237435743655516468724977307364669,-3986937945950201595583418237435743655516468724976332236971⟩,⟨5396261028117519516961677299887245239401464194561213327529,5396261028117519516961677299887245239401464194562233010332⟩⟩, + ⟨⟨-12259573540359190037937382481167505467592606829486789474291,-12259573540359190037937382481167505467592606829484326474311⟩,⟨1784545193993720050088913265613996051209006874294925835238,1784545193993720050088913265613996051209006874297407732348⟩⟩, + ⟨⟨-17493393085173484144867726018643538143586358606971978716207,-17493393085173484144867726018643538143586358606965801895773⟩,⟨-14969561234333765139169524877047443678295006075581872125983,-14969561234333765139169524877047443678295006075575725892376⟩⟩, + ⟨⟨2533961197113574776784775721447072222472585145947266831879,2533961197113574776784775721447072222472585145962831209450⟩,⟨-42705637811270899176533206517797625880665791009668121547682,-42705637811270899176533206517797625880665791009652564207906⟩⟩, + ⟨⟨68643661053469436015904864788358760355896463361503645132346,68643661053469436015904864788358760355896463361537248465921⟩,⟨-38543959075745129966558378035299099362246193856507293272783,-38543959075745129966558378035299099362246193856473715710214⟩⟩, + ⟨⟨118952126687140036450637937328422058044764040535025374662205,118952126687140036450637937328422058044764040535097803789841⟩,⟨76791916446663247956963787989539235565784320519769529376507,76791916446663247956963787989539235565784320519841766743028⟩⟩, + ⟨⟨-43283372484438217584762273878539381183722379324214690322026,-43283372484438217584762273878539381183722379324081351047567⟩,⟨240549159036047035171806505243147395955196159879597193933409,240549159036047035171806505243147395955196159879730689580584⟩⟩, + ⟨⟨-392314788453654314973921812593415967550888682482605361968649,-392314788453654314973921812593415967550888682482286718478968⟩,⟨49196589339251838138854566866093107541741803682847067689631,49196589339251838138854566866093107541741803683165885146011⟩⟩, + ⟨⟨-194483931874146637174706611990658955541800228070538398466933,-194483931874146637174706611990658955541800228069920866094593⟩,⟨-548104082307740372196964500173142484423789588069368003858596,-548104082307740372196964500173142484423789588068750622985321⟩⟩, + ⟨⟨662872043640531425240110068167165017237263306045674753308566,662872043640531425240110068167165017237263306046597306436896⟩,⟨-353332958978001178393875780038899330689815231900931399956591,-353332958978001178393875780038899330689815231900008818741083⟩⟩, + ⟨⟨471895607993543884152331839704758724355256491176543385160710,471895607993543884152331839704758724355256491177577468852755⟩,⟨674827586293894295877551866022624590983953387882500375579635,674827586293894295877551866022624590983953387883534466103278⟩⟩, + ⟨⟨-540592861577479509267656065528854860701098425231727491823841,-540592861577479509267656065528854860701098425230903911852003⟩,⟨521426511178670913252472898655044831407233050927179962543317,521426511178670913252472898655044831407233050928003386815269⟩⟩, + ⟨⟨-501746449399251201847316916530862858635954045179256929990675,-501746449399251201847316916530862858635954045178775211944216⟩,⟨-289382487783923317691349944629760341211366757006164618155467,-289382487783923317691349944629760341211366757005682437880190⟩⟩, + ⟨⟨14821873567244170783618935463586618842966530112864605107781,14821873567244170783618935463586618842966530113038664470746⟩,⟨-406915699481743237206896292875465119008364269750840090738142,-406915699481743237206896292875465119008364269750665474858175⟩⟩, + ⟨⟨231093780191859538433543747822267568088183874835088360599803,231093780191859538433543747822267568088183874835153714970266⟩,⟨-189156540074408685424502203703974491449098872446890038403279,-189156540074408685424502203703974491449098872446825664150892⟩⟩, + ⟨⟨263693031449041299238442198466124034340819591844903106706521,263693031449041299238442198466124034340819591844924512070627⟩,⟨-41865,47857⟩⟩, + ⟨⟨231093780191859538433543747822267568088183874835088360599803,231093780191859538433543747822267568088183874835153714970266⟩,⟨189156540074408685424502203703974491449098872446825664150892,189156540074408685424502203703974491449098872446890038403279⟩⟩, + ⟨⟨14821873567244170783618935463586618842966530112864605107781,14821873567244170783618935463586618842966530113038664470746⟩,⟨406915699481743237206896292875465119008364269750665474858175,406915699481743237206896292875465119008364269750840090738142⟩⟩, + ⟨⟨-501746449399251201847316916530862858635954045179256929988355,-501746449399251201847316916530862858635954045178775211957180⟩,⟨289382487783923317691349944629760341211366757005682437884646,289382487783923317691349944629760341211366757006164618144710⟩⟩, + ⟨⟨-540592861577479509267656065528854860701098425231727491820176,-540592861577479509267656065528854860701098425230903911848784⟩,⟨-521426511178670913252472898655044831407233050928003386817051,-521426511178670913252472898655044831407233050927179962546016⟩⟩, + ⟨⟨471895607993543884152331839704758724355256491176543385165386,471895607993543884152331839704758724355256491177577468858113⟩,⟨-674827586293894295877551866022624590983953387883534466100207,-674827586293894295877551866022624590983953387882500375575551⟩⟩, + ⟨⟨662872043640531425240110068167165017237263306045674753306504,662872043640531425240110068167165017237263306046597306434491⟩,⟨353332958978001178393875780038899330689815231900008818745856,353332958978001178393875780038899330689815231900931399960961⟩⟩, + ⟨⟨-194483931874146637174706611990658955541800228070538398472168,-194483931874146637174706611990658955541800228069920866096190⟩,⟨548104082307740372196964500173142484423789588068750622982247,548104082307740372196964500173142484423789588069368003859160⟩⟩, + ⟨⟨-392314788453654314973921812593415967550888682482605361967872,-392314788453654314973921812593415967550888682482286718479127⟩,⟨-49196589339251838138854566866093107541741803683165885147842,-49196589339251838138854566866093107541741803682847067692397⟩⟩, + ⟨⟨-43283372484438217584762273878539381183722379324214690319703,-43283372484438217584762273878539381183722379324081351047124⟩,⟨-240549159036047035171806505243147395955196159879730689579847,-240549159036047035171806505243147395955196159879597193934556⟩⟩, + ⟨⟨118952126687140036450637937328422058044764040535025374662762,118952126687140036450637937328422058044764040535097803790236⟩,⟨-76791916446663247956963787989539235565784320519841766742203,-76791916446663247956963787989539235565784320519769529375844⟩⟩, + ⟨⟨68643661053469436015904864788358760355896463361503645132112,68643661053469436015904864788358760355896463361537248465689⟩,⟨38543959075745129966558378035299099362246193856473715710627,38543959075745129966558378035299099362246193856507293273200⟩⟩, + ⟨⟨2533961197113574776784775721447072222472585145947266831845,2533961197113574776784775721447072222472585145962831208914⟩,⟨42705637811270899176533206517797625880665791009652564208168,42705637811270899176533206517797625880665791009668121547442⟩⟩, + ⟨⟨-17493393085173484144867726018643538143586358606971978716304,-17493393085173484144867726018643538143586358606965801895835⟩,⟨14969561234333765139169524877047443678295006075575725892270,14969561234333765139169524877047443678295006075581872125913⟩⟩, + ⟨⟨-12259573540359190037937382481167505467592606829486789474202,-12259573540359190037937382481167505467592606829484326474376⟩,⟨-1784545193993720050088913265613996051209006874297407732351,-1784545193993720050088913265613996051209006874294925835397⟩⟩, + ⟨⟨-3986937945950201595583418237435743655516468724977307364668,-3986937945950201595583418237435743655516468724976332236914⟩,⟨-5396261028117519516961677299887245239401464194562233010384,-5396261028117519516961677299887245239401464194561213327524⟩⟩] +lemma tw0_1_0_12_calc (j : Fin 31) : taylorWaveBox 0 1 0 12 j = tw0_1_0_12 j := by + revert j + decide +kernel +def tw0_1_0_13 : Fin 31 → CI := ![⟨⟨-1366840155696743513142678313689297175249566591772319343785,-1366840155696743513142678313689297175249566591771991797040⟩,⟨-1393607524279179046810479209187183022473104465663314057403,-1393607524279179046810479209187183022473104465662998165032⟩⟩, + ⟨⟨204529599152667913649528822498791524407126742133173822304,204529599152667913649528822498791524407126742134013781170⟩,⟨-3803557357175727725917908313310109755954910116182771799459,-3803557357175727725917908313310109755954910116181932171723⟩⟩, + ⟨⟨6098919768335200262655364923395363456050741525348219141226,6098919768335200262655364923395363456050741525350622323306⟩,⟨-4372308153519084958111640712316565994974867956880155216993,-4372308153519084958111640712316565994974867956877739117881⟩⟩, + ⟨⟨13946944529493707518393226039156534444793972620210789247914,13946944529493707518393226039156534444793972620217176403716⟩,⟨5041295229150271479335518390382608502590041453824418491504,5041295229150271479335518390382608502590041453830807445510⟩⟩, + ⟨⟨5011296798117122945770140968555874499251942590038470766755,5011296798117122945770140968555874499251942590054357324617⟩,⟨28691195965914783643654992649441470510316729467240923986230,28691195965914783643654992649441470510316729467256835096040⟩⟩, + ⟨⟨-46233043291003414449838467259636851854310641782173208097769,-46233043291003414449838467259636851854310641782137576549304⟩,⟨31781592450382956786617043904181816181888563157739125634505,31781592450382956786617043904181816181888563157774791875275⟩⟩, + ⟨⟨-83709699367095129923203151229731577342290335906783345648072,-83709699367095129923203151229731577342290335906707731890113⟩,⟨-61871336374335873980585908822205461958789002952448910955467,-61871336374335873980585908822205461958789002952373449941450⟩⟩, + ⟨⟨71519613617913660597867770322877914562729582759735786785105,71519613617913660597867770322877914562729582759927742018788⟩,⟨-166911452704766235609751875794067964582173046053430208937229,-166911452704766235609751875794067964582173046053238215575274⟩⟩, + ⟨⟨278424159072814831433951654798533133867775764264677917077234,278424159072814831433951654798533133867775764265091731343557⟩,⟨76845450448815303368921934367170031543173634723909888335066,76845450448815303368921934367170031543173634724323730496735⟩⟩, + ⟨⟨-85332733120336247574918728032658292890636715444278871786817,-85332733120336247574918728032658292890636715443592948514604⟩,⟨394979559511532018307748350354813530314865003176490126069338,394979559511532018307748350354813530314865003177176034895177⟩⟩, + ⟨⟨-470395403727727257422403891022879406637520402633748314941812,-470395403727727257422403891022879406637520402632913178424169⟩,⟨-94439260681193620476779950765120376477958665995336208496953,-94439260681193620476779950765120376477958665994501078700496⟩⟩, + ⟨⟨76482547691848869393472436281876726832345578322095966950334,76482547691848869393472436281876726832345578322787597562161⟩,⟨-466282414106212479652891187832678012546780159696139438539764,-466282414106212479652891187832678012546780159695447729511023⟩⟩, + ⟨⟨390468391675264588203827515284463809640693720476867294574566,390468391675264588203827515284463809640693720477278280141202⟩,⟨8151835033582007236420595169712429682482626316419481808179,8151835033582007236420595169712429682482626316830595837422⟩⟩, + ⟨⟨88737470994347113789414801510493106302058666066265454945835,88737470994347113789414801510493106302058666066422487805713⟩,⟨276582157004206056402648089009739582201087390424035355330586,276582157004206056402648089009739582201087390424192991804330⟩⟩, + ⟨⟨-143687183192081452276440289892592299731333186264550809678769,-143687183192081452276440289892592299731333186264498412735203⟩,⟨168057674360726587594073989790372205257786704331379505082353,168057674360726587594073989790372205257786704331431486473112⟩⟩, + ⟨⟨-197801938657563149274699081510869482211130384201246796776495,-197801938657563149274699081510869482211130384201230110519273⟩,⟨-35899,31404⟩⟩, + ⟨⟨-143687183192081452276440289892592299731333186264550809678769,-143687183192081452276440289892592299731333186264498412735203⟩,⟨-168057674360726587594073989790372205257786704331431486473112,-168057674360726587594073989790372205257786704331379505082353⟩⟩, + ⟨⟨88737470994347113789414801510493106302058666066265454945835,88737470994347113789414801510493106302058666066422487805713⟩,⟨-276582157004206056402648089009739582201087390424192991804330,-276582157004206056402648089009739582201087390424035355330586⟩⟩, + ⟨⟨390468391675264588203827515284463809640693720476867294580997,390468391675264588203827515284463809640693720477278280139014⟩,⟨-8151835033582007236420595169712429682482626316830595829235,-8151835033582007236420595169712429682482626316419481809187⟩⟩, + ⟨⟨76482547691848869393472436281876726832345578322095966947816,76482547691848869393472436281876726832345578322787597559523⟩,⟨466282414106212479652891187832678012546780159695447729511173,466282414106212479652891187832678012546780159696139438539284⟩⟩, + ⟨⟨-470395403727727257422403891022879406637520402633748314942529,-470395403727727257422403891022879406637520402632913178424797⟩,⟨94439260681193620476779950765120376477958665994501078696852,94439260681193620476779950765120376477958665995336208493544⟩⟩, + ⟨⟨-85332733120336247574918728032658292890636715444278871784069,-85332733120336247574918728032658292890636715443592948512046⟩,⟨-394979559511532018307748350354813530314865003177176034895740,-394979559511532018307748350354813530314865003176490126070119⟩⟩, + ⟨⟨278424159072814831433951654798533133867775764264677917076817,278424159072814831433951654798533133867775764265091731344896⟩,⟨-76845450448815303368921934367170031543173634724323730495866,-76845450448815303368921934367170031543173634723909888332440⟩⟩, + ⟨⟨71519613617913660597867770322877914562729582759735786784298,71519613617913660597867770322877914562729582759927742017630⟩,⟨166911452704766235609751875794067964582173046053238215575860,166911452704766235609751875794067964582173046053430208937465⟩⟩, + ⟨⟨-83709699367095129923203151229731577342290335906783345647914,-83709699367095129923203151229731577342290335906707731890949⟩,⟨61871336374335873980585908822205461958789002952373449941457,61871336374335873980585908822205461958789002952448910954480⟩⟩, + ⟨⟨-46233043291003414449838467259636851854310641782173208097539,-46233043291003414449838467259636851854310641782137576549135⟩,⟨-31781592450382956786617043904181816181888563157774791875533,-31781592450382956786617043904181816181888563157739125634822⟩⟩, + ⟨⟨5011296798117122945770140968555874499251942590038470766928,5011296798117122945770140968555874499251942590054357324791⟩,⟨-28691195965914783643654992649441470510316729467256835096010,-28691195965914783643654992649441470510316729467240923986199⟩⟩, + ⟨⟨13946944529493707518393226039156534444793972620210789248026,13946944529493707518393226039156534444793972620217176403667⟩,⟨-5041295229150271479335518390382608502590041453830807445336,-5041295229150271479335518390382608502590041453824418491491⟩⟩, + ⟨⟨6098919768335200262655364923395363456050741525348219141198,6098919768335200262655364923395363456050741525350622323290⟩,⟨4372308153519084958111640712316565994974867956877739117907,4372308153519084958111640712316565994974867956880155217031⟩⟩, + ⟨⟨204529599152667913649528822498791524407126742133173822301,204529599152667913649528822498791524407126742134013781123⟩,⟨3803557357175727725917908313310109755954910116181932171746,3803557357175727725917908313310109755954910116182771799439⟩⟩, + ⟨⟨-1366840155696743513142678313689297175249566591772319343801,-1366840155696743513142678313689297175249566591771991797040⟩,⟨1393607524279179046810479209187183022473104465662998165016,1393607524279179046810479209187183022473104465663314057404⟩⟩] +lemma tw0_1_0_13_calc (j : Fin 31) : taylorWaveBox 0 1 0 13 j = tw0_1_0_13 j := by + revert j + decide +kernel +def tw0_1_0_14 : Fin 31 → CI := ![⟨⟨434281617563579742978894794844294018980534923660243317308,434281617563579742978894794844294018980534923660338811696⟩,⟨-308024769587856362064309621615313894030804631048191904371,-308024769587856362064309621615313894030804631048093839555⟩⟩, + ⟨⟨1063260369308200442459305831615389936597851834028118472602,1063260369308200442459305831615389936597851834028390158811⟩,⟨273751267651933898261623159444513747413744821277889110487,273751267651933898261623159444513747413744821278159154202⟩⟩, + ⟨⟨852584327449191430481325525193710579046421035175834373690,852584327449191430481325525193710579046421035176708891619⟩,⟨2128609653037153370170106510727490891716167036265134949013,2128609653037153370170106510727490891716167036266005570185⟩⟩, + ⟨⟨-2856679146053482137852665748271061214457903475856924568819,-2856679146053482137852665748271061214457903475854471575127⟩,⟨3881745220737363640840091427237309454756736350637019940789,3881745220737363640840091427237309454756736350639472695829⟩⟩, + ⟨⟨-9963491517114757222169194702622624914937300451580137199112,-9963491517114757222169194702622624914937300451573211497818⟩,⟨-1667229324373408172180705457193548055041283491095227652661,-1667229324373408172180705457193548055041283491088310790315⟩⟩, + ⟨⟨-4281912522465001109558018347586351209453813079796636866958,-4281912522465001109558018347586351209453813079780111285224⟩,⟨-20396720182258539509207564606241601143129381229315814491533,-20396720182258539509207564606241601143129381229299279482248⟩⟩, + ⟨⟨36944704339308140817868341540858377420822807646359576161639,36944704339308140817868341540858377420822807646398712758247⟩,⟨-19038269358410933303836000434439191236843570892075048593946,-19038269358410933303836000434439191236843570892035869963219⟩⟩, + ⟨⟨46466210455518655809856725198379921028789560525756171886853,46466210455518655809856725198379921028789560525869049317339⟩,⟨62879821729721815578964373292661043864207112492901161373636,62879821729721815578964373292661043864207112493013981375547⟩⟩, + ⟨⟨-103611044194724575218388862074503924774107279252383297711937,-103611044194724575218388862074503924774107279252118530352128⟩,⟨85728574258218062614849034878627321183672962515806595452216,85728574258218062614849034878627321183672962516071385155550⟩⟩, + ⟨⟨-124230161635099065031734862967217161662069389742514256942490,-124230161635099065031734862967217161662069389742035913530550⟩,⟨-161555909084343667461645741555316978218360419828464556612481,-161555909084343667461645741555316978218360419827986217886490⟩⟩, + ⟨⟨221442089572533794051875245086027213913419920838874281441234,221442089572533794051875245086027213913419920839507229697319⟩,⟨-140159424346120784416162456358147978277164280304555269197108,-140159424346120784416162456358147978277164280303922323475418⟩⟩, + ⟨⟨128266439915063574697490692973566118293540629361656730246052,128266439915063574697490692973566118293540629362221897428058⟩,⟨247411050626137372215303492713766237222834511341474332407782,247411050626137372215303492713766237222834511342039591924869⟩⟩, + ⟨⟨-218824163317109914894881879568619788098721981076958674027639,-218824163317109914894881879568619788098721981076621803811803⟩,⟨114312103745685852887894812520035929203193830768687143982112,114312103745685852887894812520035929203193830769023909849401⟩⟩, + ⟨⟨-118692390617380029206203670798103244206021613495565368943371,-118692390617380029206203670798103244206021613495436087481415⟩,⟨-153779143594815441255968576061886179363202463454805129541382,-153779143594815441255968576061886179363202463454675511236408⟩⟩, + ⟨⟨77574733616403983745688381870542329298753758834363629692377,77574733616403983745688381870542329298753758834402854151868⟩,⟨-132427764700509216364152837837461874353087248257240000883045,-132427764700509216364152837837461874353087248257200810909993⟩⟩, + ⟨⟨139102107862246216592063430586666372987933681763370847105921,139102107862246216592063430586666372987933681763383024314462⟩,⟨-22085,25247⟩⟩, + ⟨⟨77574733616403983745688381870542329298753758834363629692377,77574733616403983745688381870542329298753758834402854151868⟩,⟨132427764700509216364152837837461874353087248257200810909993,132427764700509216364152837837461874353087248257240000883045⟩⟩, + ⟨⟨-118692390617380029206203670798103244206021613495565368943371,-118692390617380029206203670798103244206021613495436087481415⟩,⟨153779143594815441255968576061886179363202463454675511236408,153779143594815441255968576061886179363202463454805129541382⟩⟩, + ⟨⟨-218824163317109914894881879568619788098721981076958674025357,-218824163317109914894881879568619788098721981076621803814249⟩,⟨-114312103745685852887894812520035929203193830769023909849440,-114312103745685852887894812520035929203193830768687143987340⟩⟩, + ⟨⟨128266439915063574697490692973566118293540629361656730247352,128266439915063574697490692973566118293540629362221897429079⟩,⟨-247411050626137372215303492713766237222834511342039591923754,-247411050626137372215303492713766237222834511341474332406923⟩⟩, + ⟨⟨221442089572533794051875245086027213913419920838874281440271,221442089572533794051875245086027213913419920839507229696152⟩,⟨140159424346120784416162456358147978277164280303922323477215,140159424346120784416162456358147978277164280304555269198605⟩⟩, + ⟨⟨-124230161635099065031734862967217161662069389742514256943561,-124230161635099065031734862967217161662069389742035913531725⟩,⟨161555909084343667461645741555316978218360419827986217885729,161555909084343667461645741555316978218360419828464556611637⟩⟩, + ⟨⟨-103611044194724575218388862074503924774107279252383297711856,-103611044194724575218388862074503924774107279252118530351120⟩,⟨-85728574258218062614849034878627321183672962516071385156655,-85728574258218062614849034878627321183672962515806595452395⟩⟩, + ⟨⟨46466210455518655809856725198379921028789560525756171887316,46466210455518655809856725198379921028789560525869049317609⟩,⟨-62879821729721815578964373292661043864207112493013981375174,-62879821729721815578964373292661043864207112492901161373458⟩⟩, + ⟨⟨36944704339308140817868341540858377420822807646359576161723,36944704339308140817868341540858377420822807646398712757932⟩,⟨19038269358410933303836000434439191236843570892035869963626,19038269358410933303836000434439191236843570892075048593954⟩⟩, + ⟨⟨-4281912522465001109558018347586351209453813079796636867076,-4281912522465001109558018347586351209453813079780111285361⟩,⟨20396720182258539509207564606241601143129381229299279482230,20396720182258539509207564606241601143129381229315814491496⟩⟩, + ⟨⟨-9963491517114757222169194702622624914937300451580137199123,-9963491517114757222169194702622624914937300451573211497828⟩,⟨1667229324373408172180705457193548055041283491088310790254,1667229324373408172180705457193548055041283491095227652602⟩⟩, + ⟨⟨-2856679146053482137852665748271061214457903475856924568770,-2856679146053482137852665748271061214457903475854471575123⟩,⟨-3881745220737363640840091427237309454756736350639472695825,-3881745220737363640840091427237309454756736350637019940830⟩⟩, + ⟨⟨852584327449191430481325525193710579046421035175834373699,852584327449191430481325525193710579046421035176708891632⟩,⟨-2128609653037153370170106510727490891716167036266005570183,-2128609653037153370170106510727490891716167036265134949007⟩⟩, + ⟨⟨1063260369308200442459305831615389936597851834028118472609,1063260369308200442459305831615389936597851834028390158808⟩,⟨-273751267651933898261623159444513747413744821278159154190,-273751267651933898261623159444513747413744821277889110485⟩⟩, + ⟨⟨434281617563579742978894794844294018980534923660243317304,434281617563579742978894794844294018980534923660338811697⟩,⟨308024769587856362064309621615313894030804631048093839556,308024769587856362064309621615313894030804631048191904375⟩⟩] +lemma tw0_1_0_14_calc (j : Fin 31) : taylorWaveBox 0 1 0 14 j = tw0_1_0_14 j := by + revert j + decide +kernel +def tw0_1_0_15 : Fin 31 → CI := ![⟨⟨60451952197077374985174474983437375899667252715672181674,60451952197077374985174474983437375899667252715699719006⟩,⟨122585736573514093467824557523245459598886551454036596425,122585736573514093467824557523245459598886551454063683190⟩⟩, + ⟨⟨-129627470189675350859348986782671967779648974221456374778,-129627470189675350859348986782671967779648974221369787530⟩,⟨268170637625089971286045264065619264421056720834333665472,268170637625089971286045264065619264421056720834421145736⟩⟩, + ⟨⟨-652989674216180328621299299431869944979968508442387015545,-652989674216180328621299299431869944979968508442092286753⟩,⟨91993051032946656961726455483687267909419105727799301289,91993051032946656961726455483687267909419105728094919288⟩⟩, + ⟨⟨-890718398922725868716799463900847261555096720341932750277,-890718398922725868716799463900847261555096720341013857604⟩,⟨-1174655154846808324447762960041400287310120269108145505168,-1174655154846808324447762960041400287310120269107226701714⟩⟩, + ⟨⟨1594058257181403017127252892214799717460321807585794606370,1594058257181403017127252892214799717460321807588600917881⟩,⟨-2886852102550749130394467563589541851855968246804116046613,-2886852102550749130394467563589541851855968246801307853371⟩⟩, + ⟨⟨7157849535162192669563296920263508811219590036383146863915,7157849535162192669563296920263508811219590036390715555240⟩,⟨1364583573929684642890971975994375967116634756893270239018,1364583573929684642890971975994375967116634756900828540914⟩⟩, + ⟨⟨271077175284393059119032373290982003796996713030248919756,271077175284393059119032373290982003796996713049207539380⟩,⟨15615943580585069027371907104244636210285093124862776531832,15615943580585069027371907104244636210285093124881736695122⟩⟩, + ⟨⟨-31503005804195013963708521151508779356128136291623142351881,-31503005804195013963708521151508779356128136291561707891089⟩,⟨3378401163730319235652281805366777647769602328023198479656,3378401163730319235652281805366777647769602328084646225694⟩⟩, + ⟨⟨-4765864898321926830454176451160097420540266415008194284945,-4765864898321926830454176451160097420540266414847924238493⟩,⟨-58736381889140264969482382582146933024284688775658035747827,-58736381889140264969482382582146933024284688775497777674148⟩⟩, + ⟨⟨96629393584254793668651204583834303725983206760648761129603,96629393584254793668651204583834303725983206760966915687115⟩,⟨4542127061178762977036706118832695953715650485214068356308,4542127061178762977036706118832695953715650485532227427078⟩⟩, + ⟨⟨-32560520247644254252029926132941888457155918417009791189858,-32560520247644254252029926132941888457155918416555129602699⟩,⟨130736711653964293198423297226337994535237104222792514971430,130736711653964293198423297226337994535237104223247178285019⟩⟩, + ⟨⟨-139184824012872658839263378981603894798603379776302688769917,-139184824012872658839263378981603894798603379775877458887643⟩,⟨-67516593659698088244958749950293422724054131147770156654763,-67516593659698088244958749950293422724054131147344925823536⟩⟩, + ⟨⟨81368570237940303299113889967029617074959122746748329861889,81368570237940303299113889967029617074959122747017785895119⟩,⟨-122286341487915601876544496968096325958279813841064085970248,-122286341487915601876544496968096325958279813840794751240937⟩⟩, + ⟨⟨103164844675280503587897925210115312804142665965657951244695,103164844675280503587897925210115312804142665965756791045892⟩,⟨65631014535602289616625503702887213082225273143324196711134,65631014535602289616625503702887213082225273143423121892544⟩⟩, + ⟨⟨-34608878346819260303610741229441195076522475126547191797205,-34608878346819260303610741229441195076522475126519582426710⟩,⟨94101751340076980433443448589898610463738600427505755052443,94101751340076980433443448589898610463738600427533524145942⟩⟩, + ⟨⟨-92067836879610649679893365389305890478765136149629323951003,-92067836879610649679893365389305890478765136149620971132526⟩,⟨-16711,14617⟩⟩, + ⟨⟨-34608878346819260303610741229441195076522475126547191797205,-34608878346819260303610741229441195076522475126519582426710⟩,⟨-94101751340076980433443448589898610463738600427533524145942,-94101751340076980433443448589898610463738600427505755052443⟩⟩, + ⟨⟨103164844675280503587897925210115312804142665965657951244695,103164844675280503587897925210115312804142665965756791045892⟩,⟨-65631014535602289616625503702887213082225273143423121892544,-65631014535602289616625503702887213082225273143324196711134⟩⟩, + ⟨⟨81368570237940303299113889967029617074959122746748329862914,81368570237940303299113889967029617074959122747017785892670⟩,⟨122286341487915601876544496968096325958279813840794751244095,122286341487915601876544496968096325958279813841064085969883⟩⟩, + ⟨⟨-139184824012872658839263378981603894798603379776302688770002,-139184824012872658839263378981603894798603379775877458887937⟩,⟨67516593659698088244958749950293422724054131147344925822722,67516593659698088244958749950293422724054131147770156653928⟩⟩, + ⟨⟨-32560520247644254252029926132941888457155918417009791188711,-32560520247644254252029926132941888457155918416555129601884⟩,⟨-130736711653964293198423297226337994535237104223247178285063,-130736711653964293198423297226337994535237104222792514971852⟩⟩, + ⟨⟨96629393584254793668651204583834303725983206760648761129683,96629393584254793668651204583834303725983206760966915687143⟩,⟨-4542127061178762977036706118832695953715650485532227426401,-4542127061178762977036706118832695953715650485214068355679⟩⟩, + ⟨⟨-4765864898321926830454176451160097420540266415008194285554,-4765864898321926830454176451160097420540266414847924238618⟩,⟨58736381889140264969482382582146933024284688775497777673872,58736381889140264969482382582146933024284688775658035748035⟩⟩, + ⟨⟨-31503005804195013963708521151508779356128136291623142351822,-31503005804195013963708521151508779356128136291561707891105⟩,⟨-3378401163730319235652281805366777647769602328084646225842,-3378401163730319235652281805366777647769602328023198479878⟩⟩, + ⟨⟨271077175284393059119032373290982003796996713030248919906,271077175284393059119032373290982003796996713049207539408⟩,⟨-15615943580585069027371907104244636210285093124881736695056,-15615943580585069027371907104244636210285093124862776531890⟩⟩, + ⟨⟨7157849535162192669563296920263508811219590036383146863928,7157849535162192669563296920263508811219590036390715555244⟩,⟨-1364583573929684642890971975994375967116634756900828540865,-1364583573929684642890971975994375967116634756893270238978⟩⟩, + ⟨⟨1594058257181403017127252892214799717460321807585794606353,1594058257181403017127252892214799717460321807588600917864⟩,⟨2886852102550749130394467563589541851855968246801307853380,2886852102550749130394467563589541851855968246804116046623⟩⟩, + ⟨⟨-890718398922725868716799463900847261555096720341932750278,-890718398922725868716799463900847261555096720341013857619⟩,⟨1174655154846808324447762960041400287310120269107226701715,1174655154846808324447762960041400287310120269108145505155⟩⟩, + ⟨⟨-652989674216180328621299299431869944979968508442387015546,-652989674216180328621299299431869944979968508442092286752⟩,⟨-91993051032946656961726455483687267909419105728094919292,-91993051032946656961726455483687267909419105727799301292⟩⟩, + ⟨⟨-129627470189675350859348986782671967779648974221456374775,-129627470189675350859348986782671967779648974221369787530⟩,⟨-268170637625089971286045264065619264421056720834421145735,-268170637625089971286045264065619264421056720834333665475⟩⟩, + ⟨⟨60451952197077374985174474983437375899667252715672181674,60451952197077374985174474983437375899667252715699719008⟩,⟨-122585736573514093467824557523245459598886551454063683190,-122585736573514093467824557523245459598886551454036596424⟩⟩] +lemma tw0_1_0_15_calc (j : Fin 31) : taylorWaveBox 0 1 0 15 j = tw0_1_0_15 j := by + revert j + decide +kernel +def tw0_1_0_16 : Fin 31 → CI := ![⟨⟨-31664542121506259652391086909958712093573697376299893245,-31664542121506259652391086909958712093573697376292648756⟩,⟨9773005789836965500472266651999013884983745765298592216,9773005789836965500472266651999013884983745765305885113⟩⟩, + ⟨⟨-60821665311110531090851537089619041119563087288169071896,-60821665311110531090851537089619041119563087288142791088⟩,⟨-46096027276389227577871976408187451157076890994357283720,-46096027276389227577871976408187451157076890994331289247⟩⟩, + ⟨⟨18068367721950534508066008390371981167051830199984670925,18068367721950534508066008390371981167051830200078713322⟩,⟨-178195892798033487921611790691908774919443570750649611136,-178195892798033487921611790691908774919443570750555703147⟩⟩, + ⟨⟨398378435173219351709386249724759451008061034181947080493,398378435173219351709386249724759451008061034182275820082⟩,⟨-150495103695422296090229373171118883659755714529197364375,-150495103695422296090229373171118883659755714528868562976⟩⟩, + ⟨⟨676163041901883842865832429103978444197821660517849544006,676163041901883842865832429103978444197821660518921423795⟩,⟨759270957174589898285658151723956394269610336342286754316,759270957174589898285658151723956394269610336343358576475⟩⟩, + ⟨⟨-1326035107858939775953868186035903535712388216870818461828,-1326035107858939775953868186035903535712388216867595876576⟩,⟨2007765266101818856581934869068844918487649048900589004233,2007765266101818856581934869068844918487649048903814808227⟩⟩, + ⟨⟨-5012485071973656848640614075916436113238224305265070672584,-5012485071973656848640614075916436113238224305256081390552⟩,⟨-2366594565793843755472000704670469350118581387486986030047,-2366594565793843755472000704670469350118581387478004220613⟩⟩, + ⟨⟨4974838234520148165400084227459990941638819819952309012213,4974838234520148165400084227459990941638819819983948468207⟩,⟨-11058594768923087071307196028347683945171155097206157981534,-11058594768923087071307196028347683945171155097174515687704⟩⟩, + ⟨⟨21051157028880161932101098052139251921448843960059952892687,21051157028880161932101098052139251921448843960150863751328⟩,⟨12314610500472852200090357402113281772278011699383243750614,12314610500472852200090357402113281772278011699474154185232⟩⟩, + ⟨⟨-29543413820672722418114584637485047110218937420804223040140,-29543413820672722418114584637485047110218937420605845194830⟩,⟨31746510320066635129271596232882911382275442841351003485573,31746510320066635129271596232882911382275442841549381676218⟩⟩, + ⟨⟨-32409479663531778523200196044689046754257823527073519727028,-32409479663531778523200196044689046754257823526764087560997⟩,⟨-56823979595258687068347534281057471393979132667215651457894,-56823979595258687068347534281057471393979132666906218570672⟩⟩, + ⟨⟨79653097539207647016173813474069611257136514301775820215629,79653097539207647016173813474069611257136514302086682492939⟩,⟨-15254410560307848364532556079570559116591848391759206201681,-15254410560307848364532556079570559116591848391448372380176⟩⟩, + ⟨⟨-6994269364032886750174639548953526562526691948336147151401,-6994269364032886750174639548953526562526691948136493305433⟩,⟨82236872934823570217298745197439208606527768130965969585287,82236872934823570217298745197439208606527768131165589012067⟩⟩, + ⟨⟨-70938670465586143720942078925724594656473207161339563866462,-70938670465586143720942078925724594656473207161268387153321⟩,⟨-15842854262917916758702917150477708006784025157234605965747,-15842854262917916758702917150477708006784025157163480999317⟩⟩, + ⟨⟨10767682507788432323407408280642679279358065754114223869635,10767682507788432323407408280642679279358065754133067181222⟩,⟨-60918162370128926021229012268597064481479167823041988063966,-60918162370128926021229012268597064481479167823022938974273⟩⟩, + ⟨⟨57551756685672949654355579595337837339256325196723661810923,57551756685672949654355579595337837339256325196729066364463⟩,⟨-9138,10446⟩⟩, + ⟨⟨10767682507788432323407408280642679279358065754114223869635,10767682507788432323407408280642679279358065754133067181222⟩,⟨60918162370128926021229012268597064481479167823022938974273,60918162370128926021229012268597064481479167823041988063966⟩⟩, + ⟨⟨-70938670465586143720942078925724594656473207161339563866462,-70938670465586143720942078925724594656473207161268387153321⟩,⟨15842854262917916758702917150477708006784025157163480999317,15842854262917916758702917150477708006784025157234605965747⟩⟩, + ⟨⟨-6994269364032886750174639548953526562526691948336147149808,-6994269364032886750174639548953526562526691948136493305569⟩,⟨-82236872934823570217298745197439208606527768131165589011750,-82236872934823570217298745197439208606527768130965969586594⟩⟩, + ⟨⟨79653097539207647016173813474069611257136514301775820215497,79653097539207647016173813474069611257136514302086682492713⟩,⟨15254410560307848364532556079570559116591848391448372380610,15254410560307848364532556079570559116591848391759206202058⟩⟩, + ⟨⟨-32409479663531778523200196044689046754257823527073519727281,-32409479663531778523200196044689046754257823526764087561590⟩,⟨56823979595258687068347534281057471393979132666906218570583,56823979595258687068347534281057471393979132667215651457488⟩⟩, + ⟨⟨-29543413820672722418114584637485047110218937420804223039925,-29543413820672722418114584637485047110218937420605845194629⟩,⟨-31746510320066635129271596232882911382275442841549381676416,-31746510320066635129271596232882911382275442841351003485791⟩⟩, + ⟨⟨21051157028880161932101098052139251921448843960059952892664,21051157028880161932101098052139251921448843960150863751502⟩,⟨-12314610500472852200090357402113281772278011699474154185197,-12314610500472852200090357402113281772278011699383243750383⟩⟩, + ⟨⟨4974838234520148165400084227459990941638819819952309012159,4974838234520148165400084227459990941638819819983948468130⟩,⟨11058594768923087071307196028347683945171155097174515687744,11058594768923087071307196028347683945171155097206157981551⟩⟩, + ⟨⟨-5012485071973656848640614075916436113238224305265070672569,-5012485071973656848640614075916436113238224305256081390592⟩,⟨2366594565793843755472000704670469350118581387478004220611,2366594565793843755472000704670469350118581387486986029991⟩⟩, + ⟨⟨-1326035107858939775953868186035903535712388216870818461814,-1326035107858939775953868186035903535712388216867595876565⟩,⟨-2007765266101818856581934869068844918487649048903814808234,-2007765266101818856581934869068844918487649048900589004243⟩⟩, + ⟨⟨676163041901883842865832429103978444197821660517849544010,676163041901883842865832429103978444197821660518921423800⟩,⟨-759270957174589898285658151723956394269610336343358576471,-759270957174589898285658151723956394269610336342286754312⟩⟩, + ⟨⟨398378435173219351709386249724759451008061034181947080494,398378435173219351709386249724759451008061034182275820079⟩,⟨150495103695422296090229373171118883659755714528868562981,150495103695422296090229373171118883659755714529197364375⟩⟩, + ⟨⟨18068367721950534508066008390371981167051830199984670924,18068367721950534508066008390371981167051830200078713321⟩,⟨178195892798033487921611790691908774919443570750555703147,178195892798033487921611790691908774919443570750649611137⟩⟩, + ⟨⟨-60821665311110531090851537089619041119563087288169071896,-60821665311110531090851537089619041119563087288142791089⟩,⟨46096027276389227577871976408187451157076890994331289247,46096027276389227577871976408187451157076890994357283719⟩⟩, + ⟨⟨-31664542121506259652391086909958712093573697376299893245,-31664542121506259652391086909958712093573697376292648756⟩,⟨-9773005789836965500472266651999013884983745765305885113,-9773005789836965500472266651999013884983745765298592216⟩⟩] +lemma tw0_1_0_16_calc (j : Fin 31) : taylorWaveBox 0 1 0 16 j = tw0_1_0_16 j := by + revert j + decide +kernel +def tw0_1_0_17 : Fin 31 → CI := ![⟨⟨-1066571643097003342089741420557121817764565614683208585,-1066571643097003342089741420557121817764565614681378102⟩,⟨-7536473506138352009321872118081293720682392326266207851,-7536473506138352009321872118081293720682392326264372836⟩⟩, + ⟨⟨13877738298350290105376809112541024079077094418037714926,13877738298350290105376809112541024079077094418045060939⟩,⟨-12270182056943120979765123601592222846694316740851168741,-12270182056943120979765123601592222846694316740843751141⟩⟩, + ⟨⟨43417403383095515277803404916990906438844073446559065076,43417403383095515277803404916990906438844073446587400075⟩,⟨15459050748878098262338038556115055346674132149854166330,15459050748878098262338038556115055346674132149882500647⟩⟩, + ⟨⟨8571520090332057910427166862125800897003046001667036173,8571520090332057910427166862125800897003046001777588285⟩,⟨116230314663881421691048645445141377219283190470170235102,116230314663881421691048645445141377219283190470280767647⟩⟩, + ⟨⟨-274789157501210083988344985051794387809888142881201586545,-274789157501210083988344985051794387809888142880807614389⟩,⟨112583783230856648101876789054010987618485008844302600797,112583783230856648101876789054010987618485008844696416823⟩⟩, + ⟨⟨-419900778385011254399343519577678585092061713298444306236,-419900778385011254399343519577678585092061713297149796017⟩,⟨-624698179714546604116976799081122307722216626111303488266,-624698179714546604116976799081122307722216626110009422681⟩⟩, + ⟨⟨1459442340059212461365274758928066802351945851646322684264,1459442340059212461365274758928066802351945851650330777360⟩,⟨-1159137374514686859567071373030600988795027860920994386109,-1159137374514686859567071373030600988795027860916983812032⟩⟩, + ⟨⟨2549200065276291741848748363683004002099075553866793272235,2549200065276291741848748363683004002099075553882472471025⟩,⟨3582218095491758926017913254645445960632473580816278677777,3582218095491758926017913254645445960632473580831954674093⟩⟩, + ⟨⟨-8686844985376564609415276779108758985584071211937347966537,-8686844985376564609415276779108758985584071211887694137615⟩,⟨3996825389759533536863423075555955308778161129695651870389,3996825389759533536863423075555955308778161129745308289666⟩⟩, + ⟨⟨-2183468532447391105987852589041640993193258425204497972906,-2183468532447391105987852589041640993193258425085831003987⟩,⟨-18287982361670022722440848682071572571871622258896151953477,-18287982361670022722440848682071572571871622258777486021132⟩⟩, + ⟨⟨28833695634139326141341628836635269355360837664332106916664,28833695634139326141341628836635269355360837664531984180146⟩,⟨8605750394515152680953050691961479513212505025415361919003,8605750394515152680953050691961479513212505025615238833675⟩⟩, + ⟨⟨-27181389819825999986007430761009332885380808868556830029874,-27181389819825999986007430761009332885380808868343236444229⟩,⟨29726055423390802808654161536304254491388171905652331101998,29726055423390802808654161536304254491388171905865917519472⟩⟩, + ⟨⟨-17811673612516867481687813081666981073005488998153615746619,-17811673612516867481687813081666981073005488998012735062356⟩,⟨-40162338983712628123593061374234747938536462858386271936214,-40162338983712628123593061374234747938536462858245377001386⟩⟩, + ⟨⟨40604765299660920283408973119908521121881939785805799204072,40604765299660920283408973119908521121881939785856957415685⟩,⟨-5190645322042470654604208393910785362062100512992020837892,-5190645322042470654604208393910785362062100512940941925822⟩⟩, + ⟨⟨91417225653267270643775229322237658936510701922072538661,91417225653267270643775229322237658936510701934885082508⟩,⟨36159804810106096587345979103101060042867849405143954858353,36159804810106096587345979103101060042867849405156929309494⟩⟩, + ⟨⟨-34082240236382415036939146124915153126964998384787818645777,-34082240236382415036939146124915153126964998384784509573584⟩,⟨-6187,5412⟩⟩, + ⟨⟨91417225653267270643775229322237658936510701922072538661,91417225653267270643775229322237658936510701934885082508⟩,⟨-36159804810106096587345979103101060042867849405156929309494,-36159804810106096587345979103101060042867849405143954858353⟩⟩, + ⟨⟨40604765299660920283408973119908521121881939785805799204072,40604765299660920283408973119908521121881939785856957415685⟩,⟨5190645322042470654604208393910785362062100512940941925822,5190645322042470654604208393910785362062100512992020837892⟩⟩, + ⟨⟨-17811673612516867481687813081666981073005488998153615746742,-17811673612516867481687813081666981073005488998012735063166⟩,⟨40162338983712628123593061374234747938536462858245377001730,40162338983712628123593061374234747938536462858386271935959⟩⟩, + ⟨⟨-27181389819825999986007430761009332885380808868556830029672,-27181389819825999986007430761009332885380808868343236444048⟩,⟨-29726055423390802808654161536304254491388171905865917519555,-29726055423390802808654161536304254491388171905652331102132⟩⟩, + ⟨⟨28833695634139326141341628836635269355360837664332106916857,28833695634139326141341628836635269355360837664531984180077⟩,⟨-8605750394515152680953050691961479513212505025615238833333,-8605750394515152680953050691961479513212505025415361918912⟩⟩, + ⟨⟨-2183468532447391105987852589041640993193258425204497973025,-2183468532447391105987852589041640993193258425085831004116⟩,⟨18287982361670022722440848682071572571871622258777486021126,18287982361670022722440848682071572571871622258896151953462⟩⟩, + ⟨⟨-8686844985376564609415276779108758985584071211937347966564,-8686844985376564609415276779108758985584071211887694137535⟩,⟨-3996825389759533536863423075555955308778161129745308289774,-3996825389759533536863423075555955308778161129695651870390⟩⟩, + ⟨⟨2549200065276291741848748363683004002099075553866793272262,2549200065276291741848748363683004002099075553882472471040⟩,⟨-3582218095491758926017913254645445960632473580831954674072,-3582218095491758926017913254645445960632473580816278677768⟩⟩, + ⟨⟨1459442340059212461365274758928066802351945851646322684267,1459442340059212461365274758928066802351945851650330777342⟩,⟨1159137374514686859567071373030600988795027860916983812050,1159137374514686859567071373030600988795027860920994386107⟩⟩, + ⟨⟨-419900778385011254399343519577678585092061713298444306240,-419900778385011254399343519577678585092061713297149796022⟩,⟨624698179714546604116976799081122307722216626110009422678,624698179714546604116976799081122307722216626111303488263⟩⟩, + ⟨⟨-274789157501210083988344985051794387809888142881201586544,-274789157501210083988344985051794387809888142880807614389⟩,⟨-112583783230856648101876789054010987618485008844696416825,-112583783230856648101876789054010987618485008844302600798⟩⟩, + ⟨⟨8571520090332057910427166862125800897003046001667036175,8571520090332057910427166862125800897003046001777588285⟩,⟨-116230314663881421691048645445141377219283190470280767646,-116230314663881421691048645445141377219283190470170235103⟩⟩, + ⟨⟨43417403383095515277803404916990906438844073446559065076,43417403383095515277803404916990906438844073446587400076⟩,⟨-15459050748878098262338038556115055346674132149882500647,-15459050748878098262338038556115055346674132149854166330⟩⟩, + ⟨⟨13877738298350290105376809112541024079077094418037714926,13877738298350290105376809112541024079077094418045060938⟩,⟨12270182056943120979765123601592222846694316740843751141,12270182056943120979765123601592222846694316740851168741⟩⟩, + ⟨⟨-1066571643097003342089741420557121817764565614683208585,-1066571643097003342089741420557121817764565614681378102⟩,⟨7536473506138352009321872118081293720682392326264372836,7536473506138352009321872118081293720682392326266207851⟩⟩] +lemma tw0_1_0_17_calc (j : Fin 31) : taylorWaveBox 0 1 0 17 j = tw0_1_0_17 j := by + revert j + decide +kernel +def tw0_1_0_18 : Fin 31 → CI := ![⟨⟨1660613321336770318012816279350219750043550803959207907,1660613321336770318012816279350219750043550803959654586⟩,⟨30211225928853368647870390156241744190995270815163124,30211225928853368647870390156241744190995270815605186⟩⟩, + ⟨⟨2143669283755509987140239617146223239791521341299732105,2143669283755509987140239617146223239791521341301710374⟩,⟨3694766896759083010566766035363050412229958805279937533,3694766896759083010566766035363050412229958805281901114⟩⟩, + ⟨⟨-6202941576035618507756535104738933379890358496161352593,-6202941576035618507756535104738933379890358496153097725⟩,⟨9404600948930649777653384285218033306342464256548734948,9404600948930649777653384285218033306342464256556999640⟩⟩, + ⟨⟨-29609809833611241311125029617902056783616403888253228265,-29609809833611241311125029617902056783616403888218072071⟩,⟨-6434127121933942226890134523358488355587378358350426126,-6434127121933942226890134523358488355587378358315265596⟩⟩, + ⟨⟨-4129076837742375770855520969262272984019091940614534414,-4129076837742375770855520969262272984019091940475416969⟩,⟨-82294999902724223111399742820277866400625538150050520566,-82294999902724223111399742820277866400625538149911331559⟩⟩, + ⟨⟨219388754967076013563326771246506471240938316266606120011,219388754967076013563326771246506471240938316267101043799⟩,⟨-43671737124047545286533142084240506945334963434100978246,-43671737124047545286533142084240506945334963433606162344⟩⟩, + ⟨⟨125697609517340719246050246548694598958155465532333919603,125697609517340719246050246548694598958155465534024710471⟩,⟨581895723756630454767169123638457211005051942169986825820,581895723756630454767169123638457211005051942171677361946⟩⟩, + ⟨⟨-1508454919425722984219460824786448233846221049223218943108,-1508454919425722984219460824786448233846221049215886136355⟩,⟨134478837859899391974421433984038778790341344972786390088,134478837859899391974421433984038778790341344980119800335⟩⟩, + ⟨⟨634303597502772257209590152633088824440212854478446653490,634303597502772257209590152633088824440212854504060187896⟩,⟨-3504739742834502367069241165038500254834186503327689294196,-3504739742834502367069241165038500254834186503302076235737⟩⟩, + ⟨⟨6200790891318610448484496103502757779951968552791310565808,6200790891318610448484496103502757779951968552858326602612⟩,⟨4095130242623182229907184717672532486219624410437852035419,4095130242623182229907184717672532486219624410504868125970⟩⟩, + ⟨⟨-11709126515813625011649131421117909968875322290613732002783,-11709126515813625011649131421117909968875322290490716722667⟩,⟨5982865255048018516143980886588699770467349457840207005790,5982865255048018516143980886588699770467349457963222123445⟩⟩, + ⟨⟨1894477611993066418482986215808136911049050180878686659079,1894477611993066418482986215808136911049050181018562817098⟩,⟨-18910655803170573244955857856101946875928558003086492002245,-18910655803170573244955857856101946875928558002946612042592⟩⟩, + ⟨⟨17672880947358605295404255422857915656211506590383539215036,17672880947358605295404255422857915656211506590480031957793⟩,⟨13465504446757666273260351026864354785063500014086746243900,13465504446757666273260351026864354785063500014183257878793⟩⟩, + ⟨⟨-19486315495673038588626791042602557827770535149034151621861,-19486315495673038588626791042602557827770535148999472668535⟩,⟨9996976662655731983987108199602194023954636466076026842072,9996976662655731983987108199602194023954636466110660452941⟩⟩, + ⟨⟨-3594924657301147714218313538413742286349337366992575636528,-3594924657301147714218313538413742286349337366984371625747⟩,⟨-19754994508778856009374112144559259183331746583104213600930,-19754994508778856009374112144559259183331746583095910639695⟩⟩, + ⟨⟨19174378126822191613179712536286049646951080143950324659054,19174378126822191613179712536286049646951080143952247348833⟩,⟨-3045,3481⟩⟩, + ⟨⟨-3594924657301147714218313538413742286349337366992575636528,-3594924657301147714218313538413742286349337366984371625747⟩,⟨19754994508778856009374112144559259183331746583095910639695,19754994508778856009374112144559259183331746583104213600930⟩⟩, + ⟨⟨-19486315495673038588626791042602557827770535149034151621861,-19486315495673038588626791042602557827770535148999472668535⟩,⟨-9996976662655731983987108199602194023954636466110660452941,-9996976662655731983987108199602194023954636466076026842072⟩⟩, + ⟨⟨17672880947358605295404255422857915656211506590383539215452,17672880947358605295404255422857915656211506590480031957812⟩,⟨-13465504446757666273260351026864354785063500014183257878507,-13465504446757666273260351026864354785063500014086746243998⟩⟩, + ⟨⟨1894477611993066418482986215808136911049050180878686658979,1894477611993066418482986215808136911049050181018562816992⟩,⟨18910655803170573244955857856101946875928558002946612042591,18910655803170573244955857856101946875928558003086492002219⟩⟩, + ⟨⟨-11709126515813625011649131421117909968875322290613732002651,-11709126515813625011649131421117909968875322290490716722707⟩,⟨-5982865255048018516143980886588699770467349457963222123445,-5982865255048018516143980886588699770467349457840207005965⟩⟩, + ⟨⟨6200790891318610448484496103502757779951968552791310565839,6200790891318610448484496103502757779951968552858326602640⟩,⟨-4095130242623182229907184717672532486219624410504868125928,-4095130242623182229907184717672532486219624410437852035379⟩⟩, + ⟨⟨634303597502772257209590152633088824440212854478446653444,634303597502772257209590152633088824440212854504060187898⟩,⟨3504739742834502367069241165038500254834186503302076235717,3504739742834502367069241165038500254834186503327689294224⟩⟩, + ⟨⟨-1508454919425722984219460824786448233846221049223218943105,-1508454919425722984219460824786448233846221049215886136356⟩,⟨-134478837859899391974421433984038778790341344980119800342,-134478837859899391974421433984038778790341344972786390099⟩⟩, + ⟨⟨125697609517340719246050246548694598958155465532333919609,125697609517340719246050246548694598958155465534024710471⟩,⟨-581895723756630454767169123638457211005051942171677361942,-581895723756630454767169123638457211005051942169986825822⟩⟩, + ⟨⟨219388754967076013563326771246506471240938316266606120011,219388754967076013563326771246506471240938316267101043799⟩,⟨43671737124047545286533142084240506945334963433606162345,43671737124047545286533142084240506945334963434100978248⟩⟩, + ⟨⟨-4129076837742375770855520969262272984019091940614534415,-4129076837742375770855520969262272984019091940475416969⟩,⟨82294999902724223111399742820277866400625538149911331559,82294999902724223111399742820277866400625538150050520567⟩⟩, + ⟨⟨-29609809833611241311125029617902056783616403888253228265,-29609809833611241311125029617902056783616403888218072072⟩,⟨6434127121933942226890134523358488355587378358315265596,6434127121933942226890134523358488355587378358350426126⟩⟩, + ⟨⟨-6202941576035618507756535104738933379890358496161352593,-6202941576035618507756535104738933379890358496153097725⟩,⟨-9404600948930649777653384285218033306342464256556999640,-9404600948930649777653384285218033306342464256548734948⟩⟩, + ⟨⟨2143669283755509987140239617146223239791521341299732105,2143669283755509987140239617146223239791521341301710374⟩,⟨-3694766896759083010566766035363050412229958805281901113,-3694766896759083010566766035363050412229958805279937533⟩⟩, + ⟨⟨1660613321336770318012816279350219750043550803959207907,1660613321336770318012816279350219750043550803959654586⟩,⟨-30211225928853368647870390156241744190995270815605186,-30211225928853368647870390156241744190995270815163124⟩⟩] +lemma tw0_1_0_18_calc (j : Fin 31) : taylorWaveBox 0 1 0 18 j = tw0_1_0_18 j := by + revert j + decide +kernel +def tw0_1_0_19 : Fin 31 → CI := ![⟨⟨-60763932754465036469657652446244686315065538392213496,-60763932754465036469657652446244686315065538392108035⟩,⟨339766633452662409413317261584413139593172120995077875,339766633452662409413317261584413139593172120995184997⟩⟩, + ⟨⟨-888257953291964582061536605806691845046816111400554583,-888257953291964582061536605806691845046816111400056019⟩,⟨301728558733027194032450890728756188178897000406037086,301728558733027194032450890728756188178897000406538066⟩⟩, + ⟨⟨-1781505675152292850116716945174196633454939734473693048,-1781505675152292850116716945174196633454939734471364271⟩,⟨-1924946212100785080110685733034899409390454095990300684,-1924946212100785080110685733034899409390454095987975923⟩⟩, + ⟨⟨3607251216119093013865472530160016247124333502770340382,3607251216119093013865472530160016247124333502780976393⟩,⟨-6578705320674401740485293955620566381923832871241494785,-6578705320674401740485293955620566381923832871230859403⟩⟩, + ⟨⟨20874360885994220114958223480595704975508590113740252060,20874360885994220114958223480595704975508590113786825655⟩,⟨6197012691003162297309346240140644345537775065022639493,6197012691003162297309346240140644345537775065069196191⟩⟩, + ⟨⟨-12504781423151063365620994998699154334113279714654246791,-12504781423151063365620994998699154334113279714471086697⟩,⟨62065628427845871270275959753312514495498545917882358604,62065628427845871270275959753312514495498545918065609092⟩⟩, + ⟨⟨-175660385185733239419927187968939998287261358098416244129,-175660385185733239419927187968939998287261358097732292305⟩,⟨-44054296365248467738489821776121199031207923425894285240,-44054296365248467738489821776121199031207923425210481768⟩⟩, + ⟨⟨211905503768704201248366122804477468804789890956584618808,211905503768704201248366122804477468804789890959855025064⟩,⟨-449349866960924405045814567130600922982642285917080222869,-449349866960924405045814567130600922982642285913809688431⟩⟩, + ⟨⟨889894904311816222505229152060330877203399404531325295092,889894904311816222505229152060330877203399404543933171856⟩,⟨896893147688950907479259404031373874264150542511447703223,896893147688950907479259404031373874264150542524055419362⟩⟩, + ⟨⟨-2740512203634546574694041701925281336073100360291435745142,-2740512203634546574694041701925281336073100360255161158249⟩,⟨801812146199231632988655185440693583995539261902363958595,801812146199231632988655185440693583995539261938638699304⟩⟩, + ⟨⟨1804304022801909035254437947938158094333620849330540872448,1804304022801909035254437947938158094333620849402648676858⟩,⟨-5166310375206191660492404648971068090951092702371051721881,-5166310375206191660492404648971068090951092702298943860857⟩⟩, + ⟨⟨4398324592398940280788444219217126338406533067058390819026,4398324592398940280788444219217126338406533067146115207901⟩,⟨7320614866528685436657718362808865786380265912617816432402,7320614866528685436657718362808865786380265912705543436676⟩⟩, + ⟨⟨-10582648886058209086315664268475104363722387995163058728538,-10582648886058209086315664268475104363722387995100650571197⟩,⟨-1586620534590743220497202602089025446929467579186757971307,-1586620534590743220497202602089025446929467579124344426772⟩⟩, + ⟨⟨7606020258523393843138318364752945964353887113077515553019,7606020258523393843138318364752945964353887113099732811924⟩,⟨-8165926873371182041558949535999029830021903005001146815619,-8165926873371182041558949535999029830021903004978944506249⟩⟩, + ⟨⟨3715795740096819537979236268489234392133052193884758857346,3715795740096819537979236268489234392133052193889729189776⟩,⟨9947720070951697369785388557710651663017694234895587316170,9947720070951697369785388557710651663017694234900608313808⟩⟩, + ⟨⟨-10273658907742800343858397676599816993276710674052073078979,-10273658907742800343858397676599816993276710674051010197004⟩,⟨-1865,1632⟩⟩, + ⟨⟨3715795740096819537979236268489234392133052193884758857346,3715795740096819537979236268489234392133052193889729189776⟩,⟨-9947720070951697369785388557710651663017694234900608313808,-9947720070951697369785388557710651663017694234895587316170⟩⟩, + ⟨⟨7606020258523393843138318364752945964353887113077515553019,7606020258523393843138318364752945964353887113099732811924⟩,⟨8165926873371182041558949535999029830021903004978944506249,8165926873371182041558949535999029830021903005001146815619⟩⟩, + ⟨⟨-10582648886058209086315664268475104363722387995163058728542,-10582648886058209086315664268475104363722387995100650571333⟩,⟨1586620534590743220497202602089025446929467579124344426753,1586620534590743220497202602089025446929467579186757971145⟩⟩, + ⟨⟨4398324592398940280788444219217126338406533067058390819064,4398324592398940280788444219217126338406533067146115207931⟩,⟨-7320614866528685436657718362808865786380265912705543436639,-7320614866528685436657718362808865786380265912617816432373⟩⟩, + ⟨⟨1804304022801909035254437947938158094333620849330540872464,1804304022801909035254437947938158094333620849402648676764⟩,⟨5166310375206191660492404648971068090951092702298943860926,5166310375206191660492404648971068090951092702371051721838⟩⟩, + ⟨⟨-2740512203634546574694041701925281336073100360291435745136,-2740512203634546574694041701925281336073100360255161158245⟩,⟨-801812146199231632988655185440693583995539261938638699322,-801812146199231632988655185440693583995539261902363958615⟩⟩, + ⟨⟨889894904311816222505229152060330877203399404531325295087,889894904311816222505229152060330877203399404543933171872⟩,⟨-896893147688950907479259404031373874264150542524055419366,-896893147688950907479259404031373874264150542511447703207⟩⟩, + ⟨⟨211905503768704201248366122804477468804789890956584618806,211905503768704201248366122804477468804789890959855025061⟩,⟨449349866960924405045814567130600922982642285913809688432,449349866960924405045814567130600922982642285917080222869⟩⟩, + ⟨⟨-175660385185733239419927187968939998287261358098416244129,-175660385185733239419927187968939998287261358097732292306⟩,⟨44054296365248467738489821776121199031207923425210481768,44054296365248467738489821776121199031207923425894285238⟩⟩, + ⟨⟨-12504781423151063365620994998699154334113279714654246791,-12504781423151063365620994998699154334113279714471086697⟩,⟨-62065628427845871270275959753312514495498545918065609092,-62065628427845871270275959753312514495498545917882358604⟩⟩, + ⟨⟨20874360885994220114958223480595704975508590113740252060,20874360885994220114958223480595704975508590113786825655⟩,⟨-6197012691003162297309346240140644345537775065069196191,-6197012691003162297309346240140644345537775065022639493⟩⟩, + ⟨⟨3607251216119093013865472530160016247124333502770340382,3607251216119093013865472530160016247124333502780976393⟩,⟨6578705320674401740485293955620566381923832871230859403,6578705320674401740485293955620566381923832871241494785⟩⟩, + ⟨⟨-1781505675152292850116716945174196633454939734473693048,-1781505675152292850116716945174196633454939734471364271⟩,⟨1924946212100785080110685733034899409390454095987975923,1924946212100785080110685733034899409390454095990300684⟩⟩, + ⟨⟨-888257953291964582061536605806691845046816111400554583,-888257953291964582061536605806691845046816111400056019⟩,⟨-301728558733027194032450890728756188178897000406538066,-301728558733027194032450890728756188178897000406037086⟩⟩, + ⟨⟨-60763932754465036469657652446244686315065538392213496,-60763932754465036469657652446244686315065538392108035⟩,⟨-339766633452662409413317261584413139593172120995184997,-339766633452662409413317261584413139593172120995077875⟩⟩] +lemma tw0_1_0_19_calc (j : Fin 31) : taylorWaveBox 0 1 0 19 j = tw0_1_0_19 j := by + revert j + decide +kernel +def tw0_1_0_20 : Fin 31 → CI := ![⟨⟨-64645470658571442450945520238963827567464417661806052,-64645470658571442450945520238963827567464417661781717⟩,⟨-22558668853166491137141957603501675770928351578970905,-22558668853166491137141957603501675770928351578946983⟩⟩, + ⟨⟨-25334914412076460182930674340996409813200477778612470,-25334914412076460182930674340996409813200477778491501⟩,⟨-195018039792994913734883743303744987048784221381677038,-195018039792994913734883743303744987048784221381556340⟩⟩, + ⟨⟨509903173363350831947040141290517070039683753171889898,509903173363350831947040141290517070039683753172511884⟩,⟨-282352256742585079616892757278332549893752643234064786,-282352256742585079616892757278332549893752643233441795⟩⟩, + ⟨⟨1249226060031349955857654460640015259850588378947552198,1249226060031349955857654460640015259850588378950634701⟩,⟨1258604460741850756768768228178510521546451559719745252,1258604460741850756768768228178510521546451559722827750⟩⟩, + ⟨⟨-3224003216006963122028076589884067030685799224108082982,-3224003216006963122028076589884067030685799224093246275⟩,⟨4446966320532028450100451079555010002232836060731161676,4446966320532028450100451079555010002232836060746000524⟩⟩, + ⟨⟨-14174013773591981488412115310835412193504231995664867597,-14174013773591981488412115310835412193504231995600426303⟩,⟨-9575157746847927272402465262498780845654985608600204553,-9575157746847927272402465262498780845654985608535785854⟩⟩, + ⟨⟨34046530090860642084909387398869285106348279289962760530,34046530090860642084909387398869285106348279290228204569⟩,⟨-40079119698399443615339861222639692727062031766107158394,-40079119698399443615339861222639692727062031765841638755⟩⟩, + ⟨⟨87914144662864240266848049570046565171367960890075161207,87914144662864240266848049570046565171367960891475542621⟩,⟨128347007325122427154975773362770412974712999445023890186,128347007325122427154975773362770412974712999446424159277⟩⟩, + ⟨⟨-421568417964180346222752629144459865020808071933343742576,-421568417964180346222752629144459865020808071927405344369⟩,⟨72891679840595644631638338531654028736628218732012272931,72891679840595644631638338531654028736628218737950767146⟩⟩, + ⟨⟨425015115872870934728693966514131398426613277324588305036,425015115872870934728693966514131398426613277343287479373⟩,⟨-957213821592452415855223309473711720000601743994149227610,-957213821592452415855223309473711720000601743975450075219⟩⟩, + ⟨⟨899161938625065449205859614734347276867768403254545987151,899161938625065449205859614734347276867768403294978557045⟩,⟨1979254061841644019009537924013716985077042072541441515695,1979254061841644019009537924013716985077042072581874115285⟩⟩, + ⟨⟨-3389690485434276003327156577707157284653168352147613565735,-3389690485434276003327156577707157284653168352095300134143⟩,⟨-1389047925485997824687105825079556930326171582621239580157,-1389047925485997824687105825079556930326171582568926277537⟩⟩, + ⟨⟨4615476818692926185229887205197137056091675507560595459927,4615476818692926185229887205197137056091675507599112839525⟩,⟨-1702883089528194134743653821936719112769528214664605959753,-1702883089528194134743653821936719112769528214626089685702⟩⟩, + ⟨⟨-2128866200177714733775018217683869395792659036058912291481,-2128866200177714733775018217683869395792659036045357445626⟩,⟨4992827015654952217021733901292492885187605327175145160262,4992827015654952217021733901292492885187605327188699578889⟩⟩, + ⟨⟨-2732895910601996408905658254093729092727364713421108937694,-2732895910601996408905658254093729092727364713418247814764⟩,⟨-4611699440872622675743448730124336521415736857648137308548,-4611699440872622675743448730124336521415736857645254212021⟩⟩, + ⟨⟨5254430013904207138532595200370227590832023713554207897279,5254430013904207138532595200370227590832023713554768230239⟩,⟨-835,954⟩⟩, + ⟨⟨-2732895910601996408905658254093729092727364713421108937694,-2732895910601996408905658254093729092727364713418247814764⟩,⟨4611699440872622675743448730124336521415736857645254212021,4611699440872622675743448730124336521415736857648137308548⟩⟩, + ⟨⟨-2128866200177714733775018217683869395792659036058912291481,-2128866200177714733775018217683869395792659036045357445626⟩,⟨-4992827015654952217021733901292492885187605327188699578889,-4992827015654952217021733901292492885187605327175145160262⟩⟩, + ⟨⟨4615476818692926185229887205197137056091675507560595459939,4615476818692926185229887205197137056091675507599112839530⟩,⟨1702883089528194134743653821936719112769528214626089685763,1702883089528194134743653821936719112769528214664605959796⟩⟩, + ⟨⟨-3389690485434276003327156577707157284653168352147613565736,-3389690485434276003327156577707157284653168352095300134149⟩,⟨1389047925485997824687105825079556930326171582568926277517,1389047925485997824687105825079556930326171582621239580137⟩⟩, + ⟨⟨899161938625065449205859614734347276867768403254545987198,899161938625065449205859614734347276867768403294978557028⟩,⟨-1979254061841644019009537924013716985077042072581874115246,-1979254061841644019009537924013716985077042072541441515721⟩⟩, + ⟨⟨425015115872870934728693966514131398426613277324588305030,425015115872870934728693966514131398426613277343287479366⟩,⟨957213821592452415855223309473711720000601743975450075222,957213821592452415855223309473711720000601743994149227613⟩⟩, + ⟨⟨-421568417964180346222752629144459865020808071933343742580,-421568417964180346222752629144459865020808071927405344364⟩,⟨-72891679840595644631638338531654028736628218737950767153,-72891679840595644631638338531654028736628218732012272929⟩⟩, + ⟨⟨87914144662864240266848049570046565171367960890075161208,87914144662864240266848049570046565171367960891475542622⟩,⟨-128347007325122427154975773362770412974712999446424159276,-128347007325122427154975773362770412974712999445023890186⟩⟩, + ⟨⟨34046530090860642084909387398869285106348279289962760530,34046530090860642084909387398869285106348279290228204568⟩,⟨40079119698399443615339861222639692727062031765841638755,40079119698399443615339861222639692727062031766107158393⟩⟩, + ⟨⟨-14174013773591981488412115310835412193504231995664867597,-14174013773591981488412115310835412193504231995600426303⟩,⟨9575157746847927272402465262498780845654985608535785854,9575157746847927272402465262498780845654985608600204553⟩⟩, + ⟨⟨-3224003216006963122028076589884067030685799224108082982,-3224003216006963122028076589884067030685799224093246275⟩,⟨-4446966320532028450100451079555010002232836060746000524,-4446966320532028450100451079555010002232836060731161676⟩⟩, + ⟨⟨1249226060031349955857654460640015259850588378947552198,1249226060031349955857654460640015259850588378950634701⟩,⟨-1258604460741850756768768228178510521546451559722827750,-1258604460741850756768768228178510521546451559719745252⟩⟩, + ⟨⟨509903173363350831947040141290517070039683753171889898,509903173363350831947040141290517070039683753172511884⟩,⟨282352256742585079616892757278332549893752643233441795,282352256742585079616892757278332549893752643234064786⟩⟩, + ⟨⟨-25334914412076460182930674340996409813200477778612470,-25334914412076460182930674340996409813200477778491501⟩,⟨195018039792994913734883743303744987048784221381556340,195018039792994913734883743303744987048784221381677038⟩⟩, + ⟨⟨-64645470658571442450945520238963827567464417661806052,-64645470658571442450945520238963827567464417661781717⟩,⟨22558668853166491137141957603501675770928351578946983,22558668853166491137141957603501675770928351578970905⟩⟩] +lemma tw0_1_0_20_calc (j : Fin 31) : taylorWaveBox 0 1 0 20 j = tw0_1_0_20 j := by + revert j + decide +kernel +def tw0_1_0 : Fin 21 → Fin 31 → CI := ![tw0_1_0_0,tw0_1_0_1,tw0_1_0_2,tw0_1_0_3,tw0_1_0_4,tw0_1_0_5,tw0_1_0_6,tw0_1_0_7,tw0_1_0_8,tw0_1_0_9,tw0_1_0_10,tw0_1_0_11,tw0_1_0_12,tw0_1_0_13,tw0_1_0_14,tw0_1_0_15,tw0_1_0_16,tw0_1_0_17,tw0_1_0_18,tw0_1_0_19,tw0_1_0_20] +lemma tw0_1_0_mem (l : Fin 21) (j : Fin 31) : (tw0_1_0 l j).Mem (taylorWave 0 1 (nearNode 0) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 0 l j = tw0_1_0 l j := by + fin_cases l + · exact tw0_1_0_0_calc j + · exact tw0_1_0_1_calc j + · exact tw0_1_0_2_calc j + · exact tw0_1_0_3_calc j + · exact tw0_1_0_4_calc j + · exact tw0_1_0_5_calc j + · exact tw0_1_0_6_calc j + · exact tw0_1_0_7_calc j + · exact tw0_1_0_8_calc j + · exact tw0_1_0_9_calc j + · exact tw0_1_0_10_calc j + · exact tw0_1_0_11_calc j + · exact tw0_1_0_12_calc j + · exact tw0_1_0_13_calc j + · exact tw0_1_0_14_calc j + · exact tw0_1_0_15_calc j + · exact tw0_1_0_16_calc j + · exact tw0_1_0_17_calc j + · exact tw0_1_0_18_calc j + · exact tw0_1_0_19_calc j + · exact tw0_1_0_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 0 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave011.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave011.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a96e248578e1cecf6f87e1d16f8fd4cbbe4b991 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave011.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_1_0 : Fin 31 → CI := ![⟨⟨-1349458824852613118131512521583059371051262307854081144705026,-1349458824852613118131512521583059371051262307853859871427596⟩,⟨745241407967876247004285299700518646700450362583878433774325,745241407967876247004285299700518646700450362584099920569235⟩⟩, + ⟨⟨-921686156073616905004014676852484944196588651435583784615915,-921686156073616905004014676852484944196588651435365371351900⟩,⟨-221770335538856389072395607746494937057408066636938162939346,-221770335538856389072395607746494937057408066636722875933664⟩⟩, + ⟨⟨-269519140945667537510743584308272688010203580131347257455225,-269519140945667537510743584308272688010203580131181090413491⟩,⟨-446632670521896437872408301227473301225324828862906871907520,-446632670521896437872408301227473301225324828862741298281905⟩⟩, + ⟨⟨73272799370242448070193561223346938019819981309900434603807,73272799370242448070193561223346938019819981309993260135205⟩,⟨-238902861634521056830950201189954423945903980822209510034460,-238902861634521056830950201189954423945903980822116179866079⟩⟩, + ⟨⟨93046680159799602370346473550782945982373046954848471090477,93046680159799602370346473550782945982373046954883911014789⟩,⟨-38360471346459881625132048255308169491649402335089503941917,-38360471346459881625132048255308169491649402335053969551849⟩⟩, + ⟨⟨28364311990212055525975337613696168552007345630370063253132,28364311990212055525975337613696168552007345630387117732334⟩,⟨16128685297350494066816966314512914807437651066103315182519,16128685297350494066816966314512914807437651066120328061691⟩⟩, + ⟨⟨1202260779593728068768309631149444000012875852614590230817,1202260779593728068768309631149444000012875852619575410812⟩,⟨7982696493371781804551660338169464832977177485315172324191,7982696493371781804551660338169464832977177485320153354593⟩⟩, + ⟨⟨-920781595367229203893393686074924218837168138047880554533,-920781595367229203893393686074924218837168138047012081371⟩,⟨1095893994331763127694701389052486661727874693922595731513,1095893994331763127694701389052486661727874693923464876161⟩⟩, + ⟨⟨-167575978637666010428358286919244906848011398490678339661,-167575978637666010428358286919244906848011398490587334418⟩,⟨28242124745940440977892933441198400832205097994023102570,28242124745940440977892933441198400832205097994114159700⟩⟩, + ⟨⟨-12301839918480142910950656429232081972847739872284730970,-12301839918480142910950656429232081972847739872278477343⟩,⟨-3223531528337563781644440478362665854158675003479788537,-3223531528337563781644440478362665854158675003473534325⟩⟩, + ⟨⟨-574663159243568857427558219972800107884844058712850431,-574663159243568857427558219972800107884844058712515553⟩,⟨-111094623139319323857641869896740257420244310361957749,-111094623139319323857641869896740257420244310361622868⟩⟩, + ⟨⟨-14142153025491615651929862671125703103957378769537826,-14142153025491615651929862671125703103957378769521890⟩,⟨10582591684981030896479900658605143423317095439829786,10582591684981030896479900658605143423317095439845722⟩⟩, + ⟨⟨367481149664936799793100080478556850558869601037429,367481149664936799793100080478556850558869601038363⟩,⟨241201120986759979737135160268935601266894667863613,241201120986759979737135160268935601266894667864595⟩⟩, + ⟨⟨-12705107701248744412482431528792327700753897236590,-12705107701248744412482431528792327700753897235782⟩,⟨-6591257942152472329921079437280714326791714952598,-6591257942152472329921079437280714326791714951790⟩⟩, + ⟨⟨718534599325639019051520065321985868429462458957,718534599325639019051520065321985868429462459693⟩,⟨-939631972087974890639910570709631887964461852099,-939631972087974890639910570709631887964461851326⟩⟩, + ⟨⟨470526535403739048216047616823918154187988111167,470526535403739048216047616823918154187988111993⟩,⟨-444,508⟩⟩, + ⟨⟨718534599325639019051520065321985868429462458957,718534599325639019051520065321985868429462459693⟩,⟨939631972087974890639910570709631887964461851326,939631972087974890639910570709631887964461852100⟩⟩, + ⟨⟨-12705107701248744412482431528792327700753897236590,-12705107701248744412482431528792327700753897235782⟩,⟨6591257942152472329921079437280714326791714951790,6591257942152472329921079437280714326791714952598⟩⟩, + ⟨⟨367481149664936799793100080478556850558869601037429,367481149664936799793100080478556850558869601038363⟩,⟨-241201120986759979737135160268935601266894667864594,-241201120986759979737135160268935601266894667863613⟩⟩, + ⟨⟨-14142153025491615651929862671125703103957378769537826,-14142153025491615651929862671125703103957378769521890⟩,⟨-10582591684981030896479900658605143423317095439845722,-10582591684981030896479900658605143423317095439829786⟩⟩, + ⟨⟨-574663159243568857427558219972800107884844058712850431,-574663159243568857427558219972800107884844058712515553⟩,⟨111094623139319323857641869896740257420244310361622868,111094623139319323857641869896740257420244310361957750⟩⟩, + ⟨⟨-12301839918480142910950656429232081972847739872284730970,-12301839918480142910950656429232081972847739872278477343⟩,⟨3223531528337563781644440478362665854158675003473534325,3223531528337563781644440478362665854158675003479788537⟩⟩, + ⟨⟨-167575978637666010428358286919244906848011398490678339661,-167575978637666010428358286919244906848011398490587334418⟩,⟨-28242124745940440977892933441198400832205097994114159699,-28242124745940440977892933441198400832205097994023102570⟩⟩, + ⟨⟨-920781595367229203893393686074924218837168138047880554501,-920781595367229203893393686074924218837168138047012081371⟩,⟨-1095893994331763127694701389052486661727874693923464876149,-1095893994331763127694701389052486661727874693922595731533⟩⟩, + ⟨⟨1202260779593728068768309631149444000012875852614590230817,1202260779593728068768309631149444000012875852619575410869⟩,⟨-7982696493371781804551660338169464832977177485320153354624,-7982696493371781804551660338169464832977177485315172324165⟩⟩, + ⟨⟨28364311990212055525975337613696168552007345630370063253108,28364311990212055525975337613696168552007345630387117732622⟩,⟨-16128685297350494066816966314512914807437651066120328061653,-16128685297350494066816966314512914807437651066103315182170⟩⟩, + ⟨⟨93046680159799602370346473550782945982373046954848471090389,93046680159799602370346473550782945982373046954883911014518⟩,⟨38360471346459881625132048255308169491649402335053969552530,38360471346459881625132048255308169491649402335089503942414⟩⟩, + ⟨⟨73272799370242448070193561223346938019819981309900434605243,73272799370242448070193561223346938019819981309993260130363⟩,⟨238902861634521056830950201189954423945903980822116179869689,238902861634521056830950201189954423945903980822209510031784⟩⟩, + ⟨⟨-269519140945667537510743584308272688010203580131347257458899,-269519140945667537510743584308272688010203580131181090415028⟩,⟨446632670521896437872408301227473301225324828862741298279242,446632670521896437872408301227473301225324828862906871906974⟩⟩, + ⟨⟨-921686156073616905004014676852484944196588651435583784619196,-921686156073616905004014676852484944196588651435365371351171⟩,⟨221770335538856389072395607746494937057408066636722875925323,221770335538856389072395607746494937057408066636938162935024⟩⟩, + ⟨⟨-1349458824852613118131512521583059371051262307854081144696041,-1349458824852613118131512521583059371051262307853859871428006⟩,⟨-745241407967876247004285299700518646700450362584099920572360,-745241407967876247004285299700518646700450362583878433786844⟩⟩] +lemma tw0_1_1_0_calc (j : Fin 31) : taylorWaveBox 0 1 1 0 j = tw0_1_1_0 j := by + revert j + decide +kernel +def tw0_1_1_1 : Fin 31 → CI := ![⟨⟨-760084987140604955720435085662752306861659155928293961631248,-760084987140604955720435085662752306861659155927941671851888⟩,⟨-2109781380548845127284488305047166213565914589450868721466344,-2109781380548845127284488305047166213565914589450516916189186⟩⟩, + ⟨⟨613341269408479718534922243753951129460487935143629975311362,613341269408479718534922243753951129460487935143985992606753⟩,⟨-1321995625915530476929673118129835388919680130515207341668689,-1321995625915530476929673118129835388919680130514845973588144⟩⟩, + ⟨⟨811656440541926949823304975699791530250640686355139176668246,811656440541926949823304975699791530250640686355425303442854⟩,⟨-252801748447604101814370438892519043818754082665565155577898,-252801748447604101814370438892519043818754082665278035772522⟩⟩, + ⟨⟨361055055771296446835680285020361551549663989399403952403597,361055055771296446835680285020361551549663989399570855439788⟩,⟨239234411354166142954056778187304146801138101786839727176822,239234411354166142954056778187304146801138101787005860988456⟩⟩, + ⟨⟨9736856316179661330646458030799168195766960221599818928234,9736856316179661330646458030799168195766960221665272238330⟩,⟨185919878566577990560110275037003581375893595087509449348120,185919878566577990560110275037003581375893595087574774176812⟩⟩, + ⟨⟨-51131185731265060361267367517508675881191238052719027994223,-51131185731265060361267367517508675881191238052687569117646⟩,⟨39556970225637005284722404554414907279654460151010807098351,39556970225637005284722404554414907279654460151042308175009⟩⟩, + ⟨⟨-16376430267344624567974066510897215350606029624320343675338,-16376430267344624567974066510897215350606029624311313964184⟩,⟨-5227492506259985115154748640931584014501428664517413310745,-5227492506259985115154748640931584014501428664508381458664⟩⟩, + ⟨⟨-1103707054154588167203548618446513579049908992693962330368,-1103707054154588167203548618446513579049908992692442964948⟩,⟨-3096067755229036560689632177991674972916965027862532139875,-3096067755229036560689632177991674972916965027861012445587⟩⟩, + ⟨⟨181001172020800758119638369112190630490849371864918118878,181001172020800758119638369112190630490849371865136438917⟩,⟨-381196903634634948288690555684113207467811090988015339100,-381196903634634948288690555684113207467811090987796891063⟩⟩, + ⟨⟨27997498742901350208462944105817953959196451894829163974,27997498742901350208462944105817953959196451894849367623⟩,⟨-19652471141327069897164955542014884377736117019068154515,-19652471141327069897164955542014884377736117019047945810⟩⟩, + ⟨⟨1434202376325645153687405500194194410182344037236862818,1434202376325645153687405500194194410182344037238185486⟩,⟨-922224111614001352193446546644061968762643007587544471,-922224111614001352193446546644061968762643007586221945⟩⟩, + ⟨⟨15755531529337719776463401824539665587099367956748745,15755531529337719776463401824539665587099367956800863⟩,⟨-53279934574093411835317106151614540459068631493138652,-53279934574093411835317106151614540459068631493086530⟩⟩, + ⟨⟨-1477387768356499305597802882912384793837735766430306,-1477387768356499305597802882912384793837735766428058⟩,⟨-116304060948075750105651086234868934300663573331991,-116304060948075750105651086234868934300663573329260⟩⟩, + ⟨⟨50609626809122365397810628969987559226972214831643,50609626809122365397810628969987559226972214834439⟩,⟨6703837129125711646028739296699544962090722336258,6703837129125711646028739296699544962090722339054⟩⟩, + ⟨⟨-2004090894577878117297966309528730183851788446631,-2004090894577878117297966309528730183851788443700⟩,⟨3893461454153588120662920414925695938083461332243,3893461454153588120662920414925695938083461335254⟩⟩, + ⟨⟨-1764761480067251929948321218947851499523060280235,-1764761480067251929948321218947851499523060277147⟩,⟨-1900,1663⟩⟩, + ⟨⟨-2004090894577878117297966309528730183851788446631,-2004090894577878117297966309528730183851788443700⟩,⟨-3893461454153588120662920414925695938083461335254,-3893461454153588120662920414925695938083461332242⟩⟩, + ⟨⟨50609626809122365397810628969987559226972214831643,50609626809122365397810628969987559226972214834439⟩,⟨-6703837129125711646028739296699544962090722339054,-6703837129125711646028739296699544962090722336257⟩⟩, + ⟨⟨-1477387768356499305597802882912384793837735766430306,-1477387768356499305597802882912384793837735766428058⟩,⟨116304060948075750105651086234868934300663573329260,116304060948075750105651086234868934300663573331991⟩⟩, + ⟨⟨15755531529337719776463401824539665587099367956748745,15755531529337719776463401824539665587099367956800863⟩,⟨53279934574093411835317106151614540459068631493086530,53279934574093411835317106151614540459068631493138652⟩⟩, + ⟨⟨1434202376325645153687405500194194410182344037236862818,1434202376325645153687405500194194410182344037238185486⟩,⟨922224111614001352193446546644061968762643007586221945,922224111614001352193446546644061968762643007587544471⟩⟩, + ⟨⟨27997498742901350208462944105817953959196451894829163974,27997498742901350208462944105817953959196451894849367623⟩,⟨19652471141327069897164955542014884377736117019047945810,19652471141327069897164955542014884377736117019068154515⟩⟩, + ⟨⟨181001172020800758119638369112190630490849371864918118878,181001172020800758119638369112190630490849371865136438917⟩,⟨381196903634634948288690555684113207467811090987796891063,381196903634634948288690555684113207467811090988015339101⟩⟩, + ⟨⟨-1103707054154588167203548618446513579049908992693962330368,-1103707054154588167203548618446513579049908992692442965004⟩,⟨3096067755229036560689632177991674972916965027861012445588,3096067755229036560689632177991674972916965027862532139820⟩⟩, + ⟨⟨-16376430267344624567974066510897215350606029624320343675423,-16376430267344624567974066510897215350606029624311313964167⟩,⟨5227492506259985115154748640931584014501428664508381458562,5227492506259985115154748640931584014501428664517413310745⟩⟩, + ⟨⟨-51131185731265060361267367517508675881191238052719027994260,-51131185731265060361267367517508675881191238052687569117104⟩,⟨-39556970225637005284722404554414907279654460151042308175677,-39556970225637005284722404554414907279654460151010807098459⟩⟩, + ⟨⟨9736856316179661330646458030799168195766960221599818929534,9736856316179661330646458030799168195766960221665272239303⟩,⟨-185919878566577990560110275037003581375893595087574774176693,-185919878566577990560110275037003581375893595087509449348337⟩⟩, + ⟨⟨361055055771296446835680285020361551549663989399403952410758,361055055771296446835680285020361551549663989399570855435851⟩,⟨-239234411354166142954056778187304146801138101787005860980301,-239234411354166142954056778187304146801138101786839727179772⟩⟩, + ⟨⟨811656440541926949823304975699791530250640686355139176664910,811656440541926949823304975699791530250640686355425303443136⟩,⟨252801748447604101814370438892519043818754082665278035775457,252801748447604101814370438892519043818754082665565155584459⟩⟩, + ⟨⟨613341269408479718534922243753951129460487935143629975298927,613341269408479718534922243753951129460487935143985992600870⟩,⟨1321995625915530476929673118129835388919680130514845973588709,1321995625915530476929673118129835388919680130515207341675802⟩⟩, + ⟨⟨-760084987140604955720435085662752306861659155928293961636180,-760084987140604955720435085662752306861659155927941671871402⟩,⟨2109781380548845127284488305047166213565914589450516916192115,2109781380548845127284488305047166213565914589450868721454692⟩⟩] +lemma tw0_1_1_1_calc (j : Fin 31) : taylorWaveBox 0 1 1 1 j = tw0_1_1_1 j := by + revert j + decide +kernel +def tw0_1_1_2 : Fin 31 → CI := ![⟨⟨2403995631032040066433963950395197121278030605362078940283021,2403995631032040066433963950395197121278030605362488407447082⟩,⟨-454895421877018015708972937987362995500561485649906539947971,-454895421877018015708972937987362995500561485649496440695354⟩⟩, + ⟨⟨1355073498895121537972383839141726205435451166713307658272315,1355073498895121537972383839141726205435451166713739052015705⟩,⟨993544931171027350616387163455861652625001535038264644105778,993544931171027350616387163455861652625001535038690320455607⟩⟩, + ⟨⟨63271279772238785088012192637764027221532083628428505611827,63271279772238785088012192637764027221532083628780918918279⟩,⟨1037118288997415077547630446832780039353497688620348833488652,1037118288997415077547630446832780039353497688620700279651483⟩⟩, + ⟨⟨-431346778153420695056348499000725688977965113108693562123717,-431346778153420695056348499000725688977965113108487207334945⟩,⟨361869768468581847297208399005891930474348262844679391928200,361869768468581847297208399005891930474348262844886312154487⟩⟩, + ⟨⟨-247773621065384605753302450491716193716700672868007734415493,-247773621065384605753302450491716193716700672867926932336213⟩,⟨-72966603039901581925279157051457884823269243217247784257494,-72966603039901581925279157051457884823269243217166937574361⟩⟩, + ⟨⟨-24987458298678561011349558292187941464220392664494703438395,-24987458298678561011349558292187941464220392664457471979315⟩,⟨-92753081301163167007425227244696134003524434978118171765330,-92753081301163167007425227244696134003524434978080908295862⟩⟩, + ⟨⟨19062062274299414077009445961995531123966485826273920207820,19062062274299414077009445961995531123966485826289169034366⟩,⟨-19758739804156334317278094229918534642857032762301383722164,-19758739804156334317278094229918534642857032762286124149246⟩⟩, + ⟨⟨5562078485554850503730465172881601497619281427095113235191,5562078485554850503730465172881601497619281427098666812740⟩,⟨1053149499099674131853401215806362470271305790127076719941,1053149499099674131853401215806362470271305790130626404043⟩⟩, + ⟨⟨388600737363148577315850885022564250525619172933457486136,388600737363148577315850885022564250525619172933931121967⟩,⟨683096353811767154967633247972209037897639538571086414000,683096353811767154967633247972209037897639538571559642556⟩⟩, + ⟨⟨-6234622387266414297917968306342540563502837659278383083,-6234622387266414297917968306342540563502837659239794240⟩,⟨68723667479522624292443660673998015169349974494378529764,68723667479522624292443660673998015169349974494417112795⟩⟩, + ⟨⟨-874430348815744764887905191477159935816949254765947888,-874430348815744764887905191477159935816949254763676043⟩,⟨3621475459424051379529862582811334642149354195240937623,3621475459424051379529862582811334642149354195243209426⟩⟩, + ⟨⟨45357603363497979496494024235709736696402353260298237,45357603363497979496494024235709736696402353260432029⟩,⟨122978554019679235636597687843736026619817547030102579,122978554019679235636597687843736026619817547030236384⟩⟩, + ⟨⟨3415828942743406413618888085975279021172373198485403,3415828942743406413618888085975279021172373198492985⟩,⟨-1540657187511883141793790740701745261411392873547483,-1540657187511883141793790740701745261411392873539276⟩⟩, + ⟨⟨-133418429013141350124427678186262513041676268435474,-133418429013141350124427678186262513041676268429103⟩,⟨29159708491465597669047083042550927142132836153009,29159708491465597669047083042550927142132836159379⟩⟩, + ⟨⟨3568410619683424397824513447395901587415970984072,3568410619683424397824513447395901587415970992531⟩,⟨-11622659887267482475528608395066330902603807052284,-11622659887267482475528608395066330902603807043757⟩⟩, + ⟨⟨4964198903559450228811933091132072583174357209812,4964198903559450228811933091132072583174357218495⟩,⟨-4676,5343⟩⟩, + ⟨⟨3568410619683424397824513447395901587415970984072,3568410619683424397824513447395901587415970992531⟩,⟨11622659887267482475528608395066330902603807043757,11622659887267482475528608395066330902603807052284⟩⟩, + ⟨⟨-133418429013141350124427678186262513041676268435474,-133418429013141350124427678186262513041676268429103⟩,⟨-29159708491465597669047083042550927142132836159379,-29159708491465597669047083042550927142132836153009⟩⟩, + ⟨⟨3415828942743406413618888085975279021172373198485403,3415828942743406413618888085975279021172373198492985⟩,⟨1540657187511883141793790740701745261411392873539276,1540657187511883141793790740701745261411392873547483⟩⟩, + ⟨⟨45357603363497979496494024235709736696402353260298237,45357603363497979496494024235709736696402353260432029⟩,⟨-122978554019679235636597687843736026619817547030236384,-122978554019679235636597687843736026619817547030102579⟩⟩, + ⟨⟨-874430348815744764887905191477159935816949254765947888,-874430348815744764887905191477159935816949254763676043⟩,⟨-3621475459424051379529862582811334642149354195243209426,-3621475459424051379529862582811334642149354195240937623⟩⟩, + ⟨⟨-6234622387266414297917968306342540563502837659278383083,-6234622387266414297917968306342540563502837659239794240⟩,⟨-68723667479522624292443660673998015169349974494417112795,-68723667479522624292443660673998015169349974494378529764⟩⟩, + ⟨⟨388600737363148577315850885022564250525619172933457486136,388600737363148577315850885022564250525619172933931121967⟩,⟨-683096353811767154967633247972209037897639538571559642556,-683096353811767154967633247972209037897639538571086414000⟩⟩, + ⟨⟨5562078485554850503730465172881601497619281427095113235240,5562078485554850503730465172881601497619281427098666812660⟩,⟨-1053149499099674131853401215806362470271305790130626403914,-1053149499099674131853401215806362470271305790127076719941⟩⟩, + ⟨⟨19062062274299414077009445961995531123966485826273920207686,19062062274299414077009445961995531123966485826289169034402⟩,⟨19758739804156334317278094229918534642857032762286124149246,19758739804156334317278094229918534642857032762301383722334⟩⟩, + ⟨⟨-24987458298678561011349558292187941464220392664494703439388,-24987458298678561011349558292187941464220392664457471979677⟩,⟨92753081301163167007425227244696134003524434978080908295397,92753081301163167007425227244696134003524434978118171765547⟩⟩, + ⟨⟨-247773621065384605753302450491716193716700672868007734415875,-247773621065384605753302450491716193716700672867926932337006⟩,⟨72966603039901581925279157051457884823269243217166937573087,72966603039901581925279157051457884823269243217247784255838⟩⟩, + ⟨⟨-431346778153420695056348499000725688977965113108693562114298,-431346778153420695056348499000725688977965113108487207339063⟩,⟨-361869768468581847297208399005891930474348262844886312150704,-361869768468581847297208399005891930474348262844679391937922⟩⟩, + ⟨⟨63271279772238785088012192637764027221532083628428505615734,63271279772238785088012192637764027221532083628780918926533⟩,⟨-1037118288997415077547630446832780039353497688620700279653240,-1037118288997415077547630446832780039353497688620348833486036⟩⟩, + ⟨⟨1355073498895121537972383839141726205435451166713307658274887,1355073498895121537972383839141726205435451166713739052025968⟩,⟨-993544931171027350616387163455861652625001535038690320449970,-993544931171027350616387163455861652625001535038264644092449⟩⟩, + ⟨⟨2403995631032040066433963950395197121278030605362078940288682,2403995631032040066433963950395197121278030605362488407436237⟩,⟨454895421877018015708972937987362995500561485649496440717527,454895421877018015708972937987362995500561485649906539953639⟩⟩] +lemma tw0_1_1_2_calc (j : Fin 31) : taylorWaveBox 0 1 1 2 j = tw0_1_1_2 j := by + revert j + decide +kernel +def tw0_1_1_3 : Fin 31 → CI := ![⟨⟨60287910985619907766612858979378006488493830861761529179124,60287910985619907766612858979378006488493830862135524674991⟩,⟨2134645843834218467576590761224013806012507417907864454229610,2134645843834218467576590761224013806012507417908237874382439⟩⟩, + ⟨⟨-1144667443891645277303675623338092555704390884725986529772241,-1144667443891645277303675623338092555704390884725592816556079⟩,⟨1044894462379335864924271875569197868922837838331679994630641,1044894462379335864924271875569197868922837838332077752178674⟩⟩, + ⟨⟨-999545055689920116104443854643519656731838181996528003017520,-999545055689920116104443854643519656731838181996200187799008⟩,⟨-181967453322810912261240956871304734422737817729497725390394,-181967453322810912261240956871304734422737817729169409347122⟩⟩, + ⟨⟨-233640875796986580570164012002128799598711888659292615422428,-233640875796986580570164012002128799598711888659104066496152⟩,⟨-536902152444315414060791063605105189821933255707235148060134,-536902152444315414060791063605105189821933255707046535779976⟩⟩, + ⟨⟨167761717470352999612764703956299149726973022185732888870542,167761717470352999612764703956299149726973022185819700596211⟩,⟨-232469181371019970945558156146337209659873467677627468515836,-232469181371019970945558156146337209659873467677540519028349⟩⟩, + ⟨⟨113194833169398642689412805453100180073070766646664059261740,113194833169398642689412805453100180073070766646722012097783⟩,⟨15047228665549735957369851675048735953811453285677091702579,15047228665549735957369851675048735953811453285734890144755⟩⟩, + ⟨⟨11859195290741868028879385595114365604367561693344812260741,11859195290741868028879385595114365604367561693367539375470⟩,⟨33012925432170239160633274005828180748267595176216561196167,33012925432170239160633274005828180748267595176239268085358⟩⟩, + ⟨⟨-5123572631329863683058751166601466442613720376014024751979,-5123572631329863683058751166601466442613720376009106827979⟩,⟨5880734129022811734041151633685512835499955154438579494196,5880734129022811734041151633685512835499955154443500996926⟩⟩, + ⟨⟨-1165837778649138510229571714164049664010663515275037358662,-1165837778649138510229571714164049664010663515274473655306⟩,⟨-108789110542003089960011300861819378186332950073469557377,-108789110542003089960011300861819378186332950072905800066⟩⟩, + ⟨⟨-78149532291806392028898365179716859201596339010392722795,-78149532291806392028898365179716859201596339010327770336⟩,⟨-79341988145307780159431399993468855106730171579051830313,-79341988145307780159431399993468855106730171578986889549⟩⟩, + ⟨⟨-3266712424533417111607018123078852231632518317241290487,-3266712424533417111607018123078852231632518317236125697⟩,⟨-5633379204859301414095948654004922537529319046575923103,-5633379204859301414095948654004922537529319046570757800⟩⟩, + ⟨⟨-207389339325853608412251969514134320634757792930794301,-207389339325853608412251969514134320634757792930595537⟩,⟨-134865045078518097451755864810020094792224847151669591,-134865045078518097451755864810020094792224847151470831⟩⟩, + ⟨⟨-4555903671761933420425596865354233725351325158250481,-4555903671761933420425596865354233725351325158233349⟩,⟨6058033340419852903902437307517598098423553706378133,6058033340419852903902437307517598098423553706394679⟩⟩, + ⟨⟨247304892811764406012784919337689643922216392557842,247304892811764406012784919337689643922216392571289⟩,⟨-155752970640066479367577177475706239961764564348862,-155752970640066479367577177475706239961764564335415⟩⟩, + ⟨⟨-3243830098969737665989933569548717218221431069571,-3243830098969737665989933569548717218221431050650⟩,⟨26809836542002385027653986568415510120236039013403,26809836542002385027653986568415510120236039032121⟩⟩, + ⟨⟨-11171264120366787014659545841641510768135583270737,-11171264120366787014659545841641510768135583251198⟩,⟨-12024,10521⟩⟩, + ⟨⟨-3243830098969737665989933569548717218221431069571,-3243830098969737665989933569548717218221431050650⟩,⟨-26809836542002385027653986568415510120236039032121,-26809836542002385027653986568415510120236039013403⟩⟩, + ⟨⟨247304892811764406012784919337689643922216392557842,247304892811764406012784919337689643922216392571289⟩,⟨155752970640066479367577177475706239961764564335415,155752970640066479367577177475706239961764564348862⟩⟩, + ⟨⟨-4555903671761933420425596865354233725351325158250481,-4555903671761933420425596865354233725351325158233349⟩,⟨-6058033340419852903902437307517598098423553706394679,-6058033340419852903902437307517598098423553706378133⟩⟩, + ⟨⟨-207389339325853608412251969514134320634757792930794301,-207389339325853608412251969514134320634757792930595537⟩,⟨134865045078518097451755864810020094792224847151470831,134865045078518097451755864810020094792224847151669591⟩⟩, + ⟨⟨-3266712424533417111607018123078852231632518317241290487,-3266712424533417111607018123078852231632518317236125697⟩,⟨5633379204859301414095948654004922537529319046570757801,5633379204859301414095948654004922537529319046575923103⟩⟩, + ⟨⟨-78149532291806392028898365179716859201596339010392722795,-78149532291806392028898365179716859201596339010327770336⟩,⟨79341988145307780159431399993468855106730171578986889549,79341988145307780159431399993468855106730171579051830313⟩⟩, + ⟨⟨-1165837778649138510229571714164049664010663515275037358662,-1165837778649138510229571714164049664010663515274473655306⟩,⟨108789110542003089960011300861819378186332950072905800066,108789110542003089960011300861819378186332950073469557377⟩⟩, + ⟨⟨-5123572631329863683058751166601466442613720376014024751804,-5123572631329863683058751166601466442613720376009106827979⟩,⟨-5880734129022811734041151633685512835499955154443500996864,-5880734129022811734041151633685512835499955154438579494309⟩⟩, + ⟨⟨11859195290741868028879385595114365604367561693344812260742,11859195290741868028879385595114365604367561693367539375720⟩,⟨-33012925432170239160633274005828180748267595176239268085474,-33012925432170239160633274005828180748267595176216561196034⟩⟩, + ⟨⟨113194833169398642689412805453100180073070766646664059261398,113194833169398642689412805453100180073070766646722012098472⟩,⟨-15047228665549735957369851675048735953811453285734890144455,-15047228665549735957369851675048735953811453285677091701280⟩⟩, + ⟨⟨167761717470352999612764703956299149726973022185732888869420,167761717470352999612764703956299149726973022185819700594699⟩,⟨232469181371019970945558156146337209659873467677540519029718,232469181371019970945558156146337209659873467677627468516777⟩⟩, + ⟨⟨-233640875796986580570164012002128799598711888659292615420204,-233640875796986580570164012002128799598711888659104066505861⟩,⟨536902152444315414060791063605105189821933255707046535784200,536902152444315414060791063605105189821933255707235148052372⟩⟩, + ⟨⟨-999545055689920116104443854643519656731838181996528003020520,-999545055689920116104443854643519656731838181996200187798030⟩,⟨181967453322810912261240956871304734422737817729169409339286,181967453322810912261240956871304734422737817729497725386481⟩⟩, + ⟨⟨-1144667443891645277303675623338092555704390884725986529768300,-1144667443891645277303675623338092555704390884725592816545196⟩,⟨-1044894462379335864924271875569197868922837838332077752189673,-1044894462379335864924271875569197868922837838331679994634693⟩⟩, + ⟨⟨60287910985619907766612858979378006488493830861761529198760,60287910985619907766612858979378006488493830862135524680064⟩,⟨-2134645843834218467576590761224013806012507417908237874374843,-2134645843834218467576590761224013806012507417907864454236577⟩⟩] +lemma tw0_1_1_3_calc (j : Fin 31) : taylorWaveBox 0 1 1 3 j = tw0_1_1_3 j := by + revert j + decide +kernel +def tw0_1_1_4 : Fin 31 → CI := ![⟨⟨-1540042533215681063907219055620516299147037414882922019795871,-1540042533215681063907219055620516299147037414882643391654885⟩,⟨-202192297641098507176979219371204497553412832043644656683324,-202192297641098507176979219371204497553412832043365635246790⟩⟩, + ⟨⟨-614116715174874633047931595693818933145281337920234780341913,-614116715174874633047931595693818933145281337919939384078766⟩,⟨-1020811963778316883110167358962655160009542002687113875859055,-1020811963778316883110167358962655160009542002686820156779354⟩⟩, + ⟨⟨338384092733873680362951311086651434252667175785458873534359,338384092733873680362951311086651434252667175785699866825246⟩,⟨-755527905815630301547438734262368754099395646097524257450045,-755527905815630301547438734262368754099395646097283197219996⟩⟩, + ⟨⟨503619791737880739036547217048330167134622728504054343058224,503619791737880739036547217048330167134622728504224996817041⟩,⟨-62190575619348788301154342063724089378008955190500038884189,-62190575619348788301154342063724089378008955190330076363405⟩⟩, + ⟨⟨151240010611218792335074413062364792749871471099615919132269,151240010611218792335074413062364792749871471099714049526794⟩,⟨217793881741036899313336756487802888801038404520686446917497,217793881741036899313336756487802888801038404520784322298236⟩⟩, + ⟨⟨-56938024216746503436175352177158015392947462970777042141727,-56938024216746503436175352177158015392947462970714277299281⟩,⟨97744887162112471132391176127650089627071311059055401517703,97744887162112471132391176127650089627071311059118317391530⟩⟩, + ⟨⟨-37108258802854040213730365656352451317128876026804680577685,-37108258802854040213730365656352451317128876026781633137565⟩,⟨-4233603518073521914201675075021078271997181111834195464997,-4233603518073521914201675075021078271997181111811136449978⟩⟩, + ⟨⟨-2855467030503617992787323661244940907782586619660328124501,-2855467030503617992787323661244940907782586619655790570509⟩,⟨-8487842660925924170962790999938745749626686545296594585200,-8487842660925924170962790999938745749626686545292055961495⟩⟩, + ⟨⟨940222950966003649670544625993135389346553415998541572833,940222950966003649670544625993135389346553415999431440309⟩,⟨-1108795574792022921814908465060329381104114979965198663236,-1108795574792022921814908465060329381104114979964307983443⟩⟩, + ⟨⟨149351110587607023115460812484141206498302700351746746543,149351110587607023115460812484141206498302700351840959786⟩,⟨-11271900955300788961720368018765669868285609325981812483,-11271900955300788961720368018765669868285609325887581237⟩⟩, + ⟨⟨9108494883479753188150457295116312577024469159464917311,9108494883479753188150457295116312577024469159471186257⟩,⟨2647599047284658259574747736860431688577045933922214160,2647599047284658259574747736860431688577045933928483265⟩⟩, + ⟨⟨388275489454899514743839309527046363045746823391536884,388275489454899514743839309527046363045746823391954724⟩,⟨-24992588718877223069811132680912794345793406937763937,-24992588718877223069811132680912794345793406937346147⟩⟩, + ⟨⟨1815059110443799920511561032028594645595582263398073,1815059110443799920511561032028594645595582263422971⟩,⟨-12647972354209576989983781462733997268272947979699590,-12647972354209576989983781462733997268272947979678548⟩⟩, + ⟨⟨-320344808191426615621834528412010213259920521161049,-320344808191426615621834528412010213259920521132651⟩,⟨411159777782569752679664419208148954758938055217048,411159777782569752679664419208148954758938055245445⟩⟩, + ⟨⟨-2851125335866924791300701065567471666217531082287,-2851125335866924791300701065567471666217531048122⟩,⟨-49905108163503546469783727978242686838217554881650,-49905108163503546469783727978242686838217554848502⟩⟩, + ⟨⟨20949526880948801516487179201546596671834325962866,20949526880948801516487179201546596671834325999507⟩,⟨-19729,22548⟩⟩, + ⟨⟨-2851125335866924791300701065567471666217531082287,-2851125335866924791300701065567471666217531048122⟩,⟨49905108163503546469783727978242686838217554848502,49905108163503546469783727978242686838217554881650⟩⟩, + ⟨⟨-320344808191426615621834528412010213259920521161049,-320344808191426615621834528412010213259920521132651⟩,⟨-411159777782569752679664419208148954758938055245445,-411159777782569752679664419208148954758938055217048⟩⟩, + ⟨⟨1815059110443799920511561032028594645595582263398073,1815059110443799920511561032028594645595582263422971⟩,⟨12647972354209576989983781462733997268272947979678548,12647972354209576989983781462733997268272947979699590⟩⟩, + ⟨⟨388275489454899514743839309527046363045746823391536884,388275489454899514743839309527046363045746823391954724⟩,⟨24992588718877223069811132680912794345793406937346147,24992588718877223069811132680912794345793406937763937⟩⟩, + ⟨⟨9108494883479753188150457295116312577024469159464917311,9108494883479753188150457295116312577024469159471186257⟩,⟨-2647599047284658259574747736860431688577045933928483265,-2647599047284658259574747736860431688577045933922214160⟩⟩, + ⟨⟨149351110587607023115460812484141206498302700351746746543,149351110587607023115460812484141206498302700351840959786⟩,⟨11271900955300788961720368018765669868285609325887581237,11271900955300788961720368018765669868285609325981812483⟩⟩, + ⟨⟨940222950966003649670544625993135389346553415998541572833,940222950966003649670544625993135389346553415999431440309⟩,⟨1108795574792022921814908465060329381104114979964307983443,1108795574792022921814908465060329381104114979965198663236⟩⟩, + ⟨⟨-2855467030503617992787323661244940907782586619660328124501,-2855467030503617992787323661244940907782586619655790570663⟩,⟨8487842660925924170962790999938745749626686545292055961501,8487842660925924170962790999938745749626686545296594585052⟩⟩, + ⟨⟨-37108258802854040213730365656352451317128876026804680577858,-37108258802854040213730365656352451317128876026781633137493⟩,⟨4233603518073521914201675075021078271997181111811136449732,4233603518073521914201675075021078271997181111834195464996⟩⟩, + ⟨⟨-56938024216746503436175352177158015392947462970777042141603,-56938024216746503436175352177158015392947462970714277298074⟩,⟨-97744887162112471132391176127650089627071311059118317392534,-97744887162112471132391176127650089627071311059055401517626⟩⟩, + ⟨⟨151240010611218792335074413062364792749871471099615919133913,151240010611218792335074413062364792749871471099714049527975⟩,⟨-217793881741036899313336756487802888801038404520784322297219,-217793881741036899313336756487802888801038404520686446916925⟩⟩, + ⟨⟨503619791737880739036547217048330167134622728504054343062952,503619791737880739036547217048330167134622728504224996811211⟩,⟨62190575619348788301154342063724089378008955190330076372206,62190575619348788301154342063724089378008955190500038882478⟩⟩, + ⟨⟨338384092733873680362951311086651434252667175785458873528535,338384092733873680362951311086651434252667175785699866822166⟩,⟨755527905815630301547438734262368754099395646097283197220533,755527905815630301547438734262368754099395646097524257453391⟩⟩, + ⟨⟨-614116715174874633047931595693818933145281337920234780351215,-614116715174874633047931595693818933145281337919939384083049⟩,⟨1020811963778316883110167358962655160009542002686820156772400,1020811963778316883110167358962655160009542002687113875857113⟩⟩, + ⟨⟨-1540042533215681063907219055620516299147037414882922019791845,-1540042533215681063907219055620516299147037414882643391661299⟩,⟨202192297641098507176979219371204497553412832043365635243099,202192297641098507176979219371204497553412832043644656669194⟩⟩] +lemma tw0_1_1_4_calc (j : Fin 31) : taylorWaveBox 0 1 1 4 j = tw0_1_1_4 j := by + revert j + decide +kernel +def tw0_1_1_5 : Fin 31 → CI := ![⟨⟨276278627275342626974471844684061369703594932063228882839564,276278627275342626974471844684061369703594932063404370167808⟩,⟨-928123302003288545159018966957598211472046055334248256563444,-928123302003288545159018966957598211472046055334072976098259⟩⟩, + ⟨⟨739075137683332591351117489148698180163886920893028074281770,739075137683332591351117489148698180163886920893209734889190⟩,⟨-264204452798571369574207677306024006234150758659159426033524,-264204452798571369574207677306024006234150758658977835147676⟩⟩, + ⟨⟨456018605289432582658715922438285723461314579821280024741527,456018605289432582658715922438285723461314579821453344016690⟩,⟨355453095567354418837330567021789877041187256692985301638329,355453095567354418837330567021789877041187256693158196911998⟩⟩, + ⟨⟨-61809383026345553003126962725524904377216141389212210858736,-61809383026345553003126962725524904377216141389063094917231⟩,⟨371842953017976749387203252560889414048833271842902964268908,371842953017976749387203252560889414048833271843052889095154⟩⟩, + ⟨⟨-202693838701342069385077937302193496948943287326116038874679,-202693838701342069385077937302193496948943287326031552323858⟩,⟨55716178492854003647093070426304369613831783686454312825705,55716178492854003647093070426304369613831783686538995507106⟩⟩, + ⟨⟨-57976914131320739519591120729146753394927935202405367302418,-57976914131320739519591120729146753394927935202354553128216⟩,⟨-76578540530315537258054411378538264440870898651067184275285,-76578540530315537258054411378538264440870898651016434207410⟩⟩, + ⟨⟨18452938442548520052102605565590528623017409266840722869516,18452938442548520052102605565590528623017409266858903167889⟩,⟨-28658635732791176472032424226965383631757427828653635136660,-28658635732791176472032424226965383631757427828635449004046⟩⟩, + ⟨⟨8628682045786892494236131013543781937899105726829338443842,8628682045786892494236131013543781937899105726835337145167⟩,⟨1794502197603122392014333239510248863548744493818735698466,1794502197603122392014333239510248863548744493824728387325⟩⟩, + ⟨⟨393568546079567919373751739115215345745413751683992591052,393568546079567919373751739115215345745413751684954611382⟩,⟨1496222469779777514329148905566972301417944664293754855439,1496222469779777514329148905566972301417944664294716308574⟩⟩, + ⟨⟨-101323926348345473928462164184693020791401124813064693609,-101323926348345473928462164184693020791401124812963726452⟩,⟨139798557992824472931085458250536710327642236778706408405,139798557992824472931085458250536710327642236778807385802⟩⟩, + ⟨⟨-10507071938972106941835134083549463022694712860912413092,-10507071938972106941835134083549463022694712860902585138⟩,⟨5463970203019314986514433656070444775625267400438718099,5463970203019314986514433656070444775625267400448545177⟩⟩, + ⟨⟨-399426767615057010078031278783021290181285632924888371,-399426767615057010078031278783021290181285632924389321⟩,⟨339960358173862084197625560008535269477970013089901507,339960358173862084197625560008535269477970013090400535⟩⟩, + ⟨⟨6499249904131801438983261657873092903733722594063626,6499249904131801438983261657873092903733722594104063⟩,⟨17280263692836253688027349817029040027662255014839059,17280263692836253688027349817029040027662255014875872⟩⟩, + ⟨⟨246856284527918114424483502067898726089799486758255,246856284527918114424483502067898726089799486803251⟩,⟨-757546449435292309856219011076063533755042182206131,-757546449435292309856219011076063533755042182161136⟩⟩, + ⟨⟨18430966711365540765174382810250445410797343256972,18430966711365540765174382810250445410797343308117⟩,⟨77134998759034692443304131075196204821202463488805,77134998759034692443304131075196204821202463537370⟩⟩, + ⟨⟨-33674358359354069735359214574013302052132981376263,-33674358359354069735359214574013302052132981317367⟩,⟨-36243,31713⟩⟩, + ⟨⟨18430966711365540765174382810250445410797343256972,18430966711365540765174382810250445410797343308117⟩,⟨-77134998759034692443304131075196204821202463537370,-77134998759034692443304131075196204821202463488805⟩⟩, + ⟨⟨246856284527918114424483502067898726089799486758255,246856284527918114424483502067898726089799486803251⟩,⟨757546449435292309856219011076063533755042182161136,757546449435292309856219011076063533755042182206131⟩⟩, + ⟨⟨6499249904131801438983261657873092903733722594063626,6499249904131801438983261657873092903733722594104063⟩,⟨-17280263692836253688027349817029040027662255014875872,-17280263692836253688027349817029040027662255014839059⟩⟩, + ⟨⟨-399426767615057010078031278783021290181285632924888371,-399426767615057010078031278783021290181285632924389321⟩,⟨-339960358173862084197625560008535269477970013090400535,-339960358173862084197625560008535269477970013089901507⟩⟩, + ⟨⟨-10507071938972106941835134083549463022694712860912413092,-10507071938972106941835134083549463022694712860902585138⟩,⟨-5463970203019314986514433656070444775625267400448545177,-5463970203019314986514433656070444775625267400438718099⟩⟩, + ⟨⟨-101323926348345473928462164184693020791401124813064693609,-101323926348345473928462164184693020791401124812963726452⟩,⟨-139798557992824472931085458250536710327642236778807385802,-139798557992824472931085458250536710327642236778706408405⟩⟩, + ⟨⟨393568546079567919373751739115215345745413751683992591052,393568546079567919373751739115215345745413751684954611382⟩,⟨-1496222469779777514329148905566972301417944664294716308574,-1496222469779777514329148905566972301417944664293754855439⟩⟩, + ⟨⟨8628682045786892494236131013543781937899105726829338443921,8628682045786892494236131013543781937899105726835337145044⟩,⟨-1794502197603122392014333239510248863548744493824728387123,-1794502197603122392014333239510248863548744493818735698466⟩⟩, + ⟨⟨18452938442548520052102605565590528623017409266840722869344,18452938442548520052102605565590528623017409266858903167898⟩,⟨28658635732791176472032424226965383631757427828635449004046,28658635732791176472032424226965383631757427828653635136842⟩⟩, + ⟨⟨-57976914131320739519591120729146753394927935202405367303412,-57976914131320739519591120729146753394927935202354553128383⟩,⟨76578540530315537258054411378538264440870898651016434206611,76578540530315537258054411378538264440870898651067184275344⟩⟩, + ⟨⟨-202693838701342069385077937302193496948943287326116038874268,-202693838701342069385077937302193496948943287326031552323825⟩,⟨-55716178492854003647093070426304369613831783686538995508183,-55716178492854003647093070426304369613831783686454312827158⟩⟩, + ⟨⟨-61809383026345553003126962725524904377216141389212210851536,-61809383026345553003126962725524904377216141389063094919147⟩,⟨-371842953017976749387203252560889414048833271843052889090940,-371842953017976749387203252560889414048833271842902964273829⟩⟩, + ⟨⟨456018605289432582658715922438285723461314579821280024742613,456018605289432582658715922438285723461314579821453344019721⟩,⟨-355453095567354418837330567021789877041187256693158196910251,-355453095567354418837330567021789877041187256692985301634684⟩⟩, + ⟨⟨739075137683332591351117489148698180163886920893028074278299,739075137683332591351117489148698180163886920893209734888676⟩,⟨264204452798571369574207677306024006234150758658977835151159,264204452798571369574207677306024006234150758659159426039972⟩⟩, + ⟨⟨276278627275342626974471844684061369703594932063228882837320,276278627275342626974471844684061369703594932063404370159316⟩,⟨928123302003288545159018966957598211472046055334072976102995,928123302003288545159018966957598211472046055334248256561933⟩⟩] +lemma tw0_1_1_5_calc (j : Fin 31) : taylorWaveBox 0 1 1 5 j = tw0_1_1_5 j := by + revert j + decide +kernel +def tw0_1_1_6 : Fin 31 → CI := ![⟨⟨476106052612374827141116009334308666220788332686274476305907,476106052612374827141116009334308666220788332686369522209154⟩,⟨228871035301873045489926727659593475727862427039792674408015,228871035301873045489926727659593475727862427039887801957027⟩⟩, + ⟨⟨65402730357825843507043201540403988195399718920405804779488,65402730357825843507043201540403988195399718920502231694034⟩,⟨447721504183146795391659530855585184494616366986957442526651,447721504183146795391659530855585184494616366987054668638647⟩⟩, + ⟨⟨-277463487886089918032467025586013530551996455225127032895410,-277463487886089918032467025586013530551996455225002747584393⟩,⟨218780188543344918923103038904324496489499343029894409354650,218780188543344918923103038904324496489499343030019127334162⟩⟩, + ⟨⟨-220368219794561627568277111451650804202398246638245716019997,-220368219794561627568277111451650804202398246638139658060176⟩,⟨-107076307290141041978824424548542109838860568476796766589732,-107076307290141041978824424548542109838860568476691231355637⟩⟩, + ⟨⟨10266575276495526939688069575852062157159945178346167820370,10266575276495526939688069575852062157159945178404524782761⟩,⟨-145459642997887174768862910978792367686378985317940738360430,-145459642997887174768862910978792367686378985317882462108715⟩⟩, + ⟨⟨69095047259572131403482594133992224512132885965606775878247,69095047259572131403482594133992224512132885965638819553181⟩,⟨-17842917562152297796512482214690450259162419134240229162057,-17842917562152297796512482214690450259162419134208209796192⟩⟩, + ⟨⟨14000322827277416121677195006478390276296559746253813404628,14000322827277416121677195006478390276296559746272644043511⟩,⟨23342276996050625962346451080116217337542529861695446024421,23342276996050625962346451080116217337542529861714260202218⟩⟩, + ⟨⟨-5087189976169096075874469913109522803555896411760481467408,-5087189976169096075874469913109522803555896411755197920919⟩,⟨5631981517697946963385092717095721639965518222759513119916,5631981517697946963385092717095721639965518222764800007191⟩⟩, + ⟨⟨-1351797100753402263236380317247453962616981734222937526695,-1351797100753402263236380317247453962616981734222100187252⟩,⟨-498127560357841715811037780192246724484015603772851664407,-498127560357841715811037780192246724484015603772014634800⟩⟩, + ⟨⟨-41588046770067149497053833643448285315200904949627434983,-41588046770067149497053833643448285315200904949502515256⟩,⟨-169114371722219268392955344773063529752587165529118538778,-169114371722219268392955344773063529752587165528993645676⟩⟩, + ⟨⟨4178161720157093534421308241391354508549814361450944469,4178161720157093534421308241391354508549814361460519938⟩,⟨-12244632335924176327396720934352771456024180906513931299,-12244632335924176327396720934352771456024180906504356118⟩⟩, + ⟨⟨137908892631378557269053602814771337905421508429020785,137908892631378557269053602814771337905421508429686962⟩,⟨-603140098578421585030846141677795167905850424693967432,-603140098578421585030846141677795167905850424693301197⟩⟩, + ⟨⟨-17719545472852240868700508362970661368714321033063229,-17719545472852240868700508362970661368714321033010299⟩,⟨-15192896391255835612675372172697032550239618218676574,-15192896391255835612675372172697032550239618218622569⟩⟩, + ⟨⟨33944672556664615261897024131455299259417691893316,33944672556664615261897024131455299259417691948467⟩,⟨1065151060868759870906783563205720022677370206787006,1065151060868759870906783563205720022677370206842156⟩⟩, + ⟨⟨-44089646039654476962962519853318931325483336792558,-44089646039654476962962519853318931325483336728036⟩,⟨-100882441784599347693075087398150590582734145361706,-100882441784599347693075087398150590582734145301995⟩⟩, + ⟨⟨47362268140395684628085940112692636388422334426466,47362268140395684628085940112692636388422334509302⟩,⟨-44603,50975⟩⟩, + ⟨⟨-44089646039654476962962519853318931325483336792558,-44089646039654476962962519853318931325483336728036⟩,⟨100882441784599347693075087398150590582734145301995,100882441784599347693075087398150590582734145361706⟩⟩, + ⟨⟨33944672556664615261897024131455299259417691893316,33944672556664615261897024131455299259417691948467⟩,⟨-1065151060868759870906783563205720022677370206842156,-1065151060868759870906783563205720022677370206787006⟩⟩, + ⟨⟨-17719545472852240868700508362970661368714321033063229,-17719545472852240868700508362970661368714321033010299⟩,⟨15192896391255835612675372172697032550239618218622569,15192896391255835612675372172697032550239618218676574⟩⟩, + ⟨⟨137908892631378557269053602814771337905421508429020785,137908892631378557269053602814771337905421508429686962⟩,⟨603140098578421585030846141677795167905850424693301197,603140098578421585030846141677795167905850424693967432⟩⟩, + ⟨⟨4178161720157093534421308241391354508549814361450944469,4178161720157093534421308241391354508549814361460519938⟩,⟨12244632335924176327396720934352771456024180906504356118,12244632335924176327396720934352771456024180906513931299⟩⟩, + ⟨⟨-41588046770067149497053833643448285315200904949627434983,-41588046770067149497053833643448285315200904949502515256⟩,⟨169114371722219268392955344773063529752587165528993645676,169114371722219268392955344773063529752587165529118538778⟩⟩, + ⟨⟨-1351797100753402263236380317247453962616981734222937526696,-1351797100753402263236380317247453962616981734222100187252⟩,⟨498127560357841715811037780192246724484015603772014634799,498127560357841715811037780192246724484015603772851664407⟩⟩, + ⟨⟨-5087189976169096075874469913109522803555896411760481467238,-5087189976169096075874469913109522803555896411755197920919⟩,⟨-5631981517697946963385092717095721639965518222764800007134,-5631981517697946963385092717095721639965518222759513120028⟩⟩, + ⟨⟨14000322827277416121677195006478390276296559746253813404629,14000322827277416121677195006478390276296559746272644043698⟩,⟨-23342276996050625962346451080116217337542529861714260202286,-23342276996050625962346451080116217337542529861695446024302⟩⟩, + ⟨⟨69095047259572131403482594133992224512132885965606775877904,69095047259572131403482594133992224512132885965638819553349⟩,⟨17842917562152297796512482214690450259162419134208209796459,17842917562152297796512482214690450259162419134240229162798⟩⟩, + ⟨⟨10266575276495526939688069575852062157159945178346167819609,10266575276495526939688069575852062157159945178404524781763⟩,⟨145459642997887174768862910978792367686378985317882462108985,145459642997887174768862910978792367686378985317940738360453⟩⟩, + ⟨⟨-220368219794561627568277111451650804202398246638245716017559,-220368219794561627568277111451650804202398246638139658064028⟩,⟨107076307290141041978824424548542109838860568476691231357199,107076307290141041978824424548542109838860568476796766585006⟩⟩, + ⟨⟨-277463487886089918032467025586013530551996455225127032894786,-277463487886089918032467025586013530551996455225002747582417⟩,⟨-218780188543344918923103038904324496489499343030019127336462,-218780188543344918923103038904324496489499343029894409355580⟩⟩, + ⟨⟨65402730357825843507043201540403988195399718920405804781775,65402730357825843507043201540403988195399718920502231697812⟩,⟨-447721504183146795391659530855585184494616366987054668638827,-447721504183146795391659530855585184494616366986957442525345⟩⟩, + ⟨⟨476106052612374827141116009334308666220788332686274476308829,476106052612374827141116009334308666220788332686369522208896⟩,⟨-228871035301873045489926727659593475727862427039887801952684,-228871035301873045489926727659593475727862427039792674406852⟩⟩] +lemma tw0_1_1_6_calc (j : Fin 31) : taylorWaveBox 0 1 1 6 j = tw0_1_1_6 j := by + revert j + decide +kernel +def tw0_1_1_7 : Fin 31 → CI := ![⟨⟨-146086425361809495050921112810713026246037469294351546229504,-146086425361809495050921112810713026246037469294306332970578⟩,⟨210413277589413895210564358213844714860666329339094490323667,210413277589413895210564358213844714860666329339139683113613⟩⟩, + ⟨⟨-231534131796714184188178371923521017868192167472289247006131,-231534131796714184188178371923521017868192167472230166769292⟩,⟨-12333101220591438481102863554513022148090767054280125722407,-12333101220591438481102863554513022148090767054221837184327⟩⟩, + ⟨⟨-79435501431997366457722211109910041708083212812817269759556,-79435501431997366457722211109910041708083212812742064223628⟩,⟨-174733580516743996376456047711399924573215042256944766608813,-174733580516743996376456047711399924573215042256869822018434⟩⟩, + ⟨⟨95435606538087293438036889939353575551080362282551257745136,95435606538087293438036889939353575551080362282613405348509⟩,⟨-104543501045996136484687455715514949853305289135238861932716,-104543501045996136484687455715514949853305289135176498125590⟩⟩, + ⟨⟨82492462054024855280511406426003110563749815946269624121074,82492462054024855280511406426003110563749815946302480359888⟩,⟨35773405881308838146459450510512290037753514630403471796900,35773405881308838146459450510512290037753514630436324577799⟩⟩, + ⟨⟨-6697324692851576981654804771979675256093630684567165174350,-6697324692851576981654804771979675256093630684539680510083⟩,⟨46649905079421514553823111805344108647589589017393030219705,46649905079421514553823111805344108647589589017420578183793⟩⟩, + ⟨⟨-19255941596129435134370179257347780843860841920465365270245,-19255941596129435134370179257347780843860841920451133541898⟩,⟨1578486767856296565528449095412038594063452553510606559024,1578486767856296565528449095412038594063452553524847519588⟩⟩, + ⟨⟨-1753387324155705543091722743657046545431497945830651387533,-1753387324155705543091722743657046545431497945827116451357⟩,⟨-5538340873233003900257561222304421795416834684415744851247,-5538340873233003900257561222304421795416834684412209091628⟩⟩, + ⟨⟨979119220062204512646131935754886689729433854896251478475,979119220062204512646131935754886689729433854897124539718⟩,⟨-680650409500270791296413616286896059065640615641415283739,-680650409500270791296413616286896059065640615640541549148⟩⟩, + ⟨⟨139818903334440163154382516054884040286001433901413906791,139818903334440163154382516054884040286001433901510780288⟩,⟨69511000204240745848981974717272942263241710615367615945,69511000204240745848981974717272942263241710615464487571⟩⟩, + ⟨⟨5278312265263480170679257098254318825946031410318969435,5278312265263480170679257098254318825946031410330356936⟩,⟨11401059108595524129998644031711908350141713430804837384,11401059108595524129998644031711908350141713430816225754⟩⟩, + ⟨⟨262197831668238659794085900976267546067309472321892808,262197831668238659794085900976267546067309472322648553⟩,⟨593374227876631806018779503133001137305451027213715448,593374227876631806018779503133001137305451027214471250⟩⟩, + ⟨⟨25673364757686913695083002030290855430783668283120530,25673364757686913695083002030290855430783668283168086⟩,⟨5378345092652009296961463877910435583589125751522956,5378345092652009296961463877910435583589125751577761⟩⟩, + ⟨⟨-468470003939577271635190137574442929130488831663087,-468470003939577271635190137574442929130488831611294⟩,⟨-1177244050053429928923129279186152786183918500468728,-1177244050053429928923129279186152786183918500416935⟩⟩, + ⟨⟨75529532882740979104663297856686534436459227575244,75529532882740979104663297856686534436459227647747⟩,⟨112927124014890681078132203037959404131422057830927,112927124014890681078132203037959404131422057896538⟩⟩, + ⟨⟨-59212463863182260076009479321960131119340907861938,-59212463863182260076009479321960131119340907758376⟩,⟨-63729,55763⟩⟩, + ⟨⟨75529532882740979104663297856686534436459227575244,75529532882740979104663297856686534436459227647747⟩,⟨-112927124014890681078132203037959404131422057896538,-112927124014890681078132203037959404131422057830927⟩⟩, + ⟨⟨-468470003939577271635190137574442929130488831663087,-468470003939577271635190137574442929130488831611294⟩,⟨1177244050053429928923129279186152786183918500416935,1177244050053429928923129279186152786183918500468728⟩⟩, + ⟨⟨25673364757686913695083002030290855430783668283120530,25673364757686913695083002030290855430783668283168086⟩,⟨-5378345092652009296961463877910435583589125751577761,-5378345092652009296961463877910435583589125751522956⟩⟩, + ⟨⟨262197831668238659794085900976267546067309472321892808,262197831668238659794085900976267546067309472322648553⟩,⟨-593374227876631806018779503133001137305451027214471250,-593374227876631806018779503133001137305451027213715448⟩⟩, + ⟨⟨5278312265263480170679257098254318825946031410318969435,5278312265263480170679257098254318825946031410330356936⟩,⟨-11401059108595524129998644031711908350141713430816225754,-11401059108595524129998644031711908350141713430804837384⟩⟩, + ⟨⟨139818903334440163154382516054884040286001433901413906791,139818903334440163154382516054884040286001433901510780288⟩,⟨-69511000204240745848981974717272942263241710615464487571,-69511000204240745848981974717272942263241710615367615945⟩⟩, + ⟨⟨979119220062204512646131935754886689729433854896251478475,979119220062204512646131935754886689729433854897124539719⟩,⟨680650409500270791296413616286896059065640615640541549148,680650409500270791296413616286896059065640615641415283739⟩⟩, + ⟨⟨-1753387324155705543091722743657046545431497945830651387533,-1753387324155705543091722743657046545431497945827116451459⟩,⟨5538340873233003900257561222304421795416834684412209091633,5538340873233003900257561222304421795416834684415744851151⟩⟩, + ⟨⟨-19255941596129435134370179257347780843860841920465365270325,-19255941596129435134370179257347780843860841920451133541845⟩,⟨-1578486767856296565528449095412038594063452553524847519723,-1578486767856296565528449095412038594063452553510606559025⟩⟩, + ⟨⟨-6697324692851576981654804771979675256093630684567165174227,-6697324692851576981654804771979675256093630684539680509547⟩,⟨-46649905079421514553823111805344108647589589017420578184081,-46649905079421514553823111805344108647589589017393030219566⟩⟩, + ⟨⟨82492462054024855280511406426003110563749815946269624121402,82492462054024855280511406426003110563749815946302480360090⟩,⟨-35773405881308838146459450510512290037753514630436324577260,-35773405881308838146459450510512290037753514630403471796476⟩⟩, + ⟨⟨95435606538087293438036889939353575551080362282551257746147,95435606538087293438036889939353575551080362282613405345977⟩,⟨104543501045996136484687455715514949853305289135176498128010,104543501045996136484687455715514949853305289135238861931597⟩⟩, + ⟨⟨-79435501431997366457722211109910041708083212812817269760976,-79435501431997366457722211109910041708083212812742064224249⟩,⟨174733580516743996376456047711399924573215042256869822017560,174733580516743996376456047711399924573215042256944766608734⟩⟩, + ⟨⟨-231534131796714184188178371923521017868192167472289247006600,-231534131796714184188178371923521017868192167472230166768869⟩,⟨12333101220591438481102863554513022148090767054221837182299,12333101220591438481102863554513022148090767054280125721274⟩⟩, + ⟨⟨-146086425361809495050921112810713026246037469294351546227592,-146086425361809495050921112810713026246037469294306332970058⟩,⟨-210413277589413895210564358213844714860666329339139683113766,-210413277589413895210564358213844714860666329339094490325212⟩⟩] +lemma tw0_1_1_7_calc (j : Fin 31) : taylorWaveBox 0 1 1 7 j = tw0_1_1_7 j := by + revert j + decide +kernel +def tw0_1_1_8 : Fin 31 → CI := ![⟨⟨-80591428461122936218543553068427472795245046195591000979705,-80591428461122936218543553068427472795245046195571479899728⟩,⟨-77470762151253056784298342116159483572151302173196615625997,-77470762151253056784298342116159483572151302173177095796041⟩⟩, + ⟨⟨26609508573392829254323743001289293976473585289625141913611,26609508573392829254323743001289293976473585289655527145780⟩,⟨-103568890423182795212621489152817660497103845997422833301274,-103568890423182795212621489152817660497103845997391994243872⟩⟩, + ⟨⟨92227142645159861486571698721436311709944330642351256638251,92227142645159861486571698721436311709944330642390124081629⟩,⟨-17323423826099209995591354164882771212546398267633917097269,-17323423826099209995591354164882771212546398267594936399633⟩⟩, + ⟨⟨38052772771625204614469486652544756642984719668509443495880,38052772771625204614469486652544756642984719668540523193380⟩,⟨63005273627471769107525216428792950678361255364816163685959,63005273627471769107525216428792950678361255364847205616543⟩⟩, + ⟨⟨-33935856332445606411791696634659189101681279585290032514876,-33935856332445606411791696634659189101681279585268797450260⟩,⟨36581608950696811238272832257555548889115505557838434487668,36581608950696811238272832257555548889115505557859705328512⟩⟩, + ⟨⟨-24056059124271426535979609290519515679499342723300756110378,-24056059124271426535979609290519515679499342723282429258366⟩,⟨-14351296211913794113327796578307964838524652514569917880963,-14351296211913794113327796578307964838524652514551627828989⟩⟩, + ⟨⟨4540052613878503472436853637780162611195673259300660544013,4540052613878503472436853637780162611195673259308934199892⟩,⟨-11477350622123539948851893222799132762787695872204279565474,-11477350622123539948851893222799132762787695872196006580965⟩⟩, + ⟨⟨3902951524899150325639557284959758345266602091261379556066,3902951524899150325639557284959758345266602091264629340567⟩,⟨884930353029350339080638679835199836266562200056918489938,884930353029350339080638679835199836266562200060165563233⟩⟩, + ⟨⟨-2482063467071684545055286143586980524339749167103370885,-2482063467071684545055286143586980524339749166489088650⟩,⟨888317189098209354659707099224534191143124363740900817592,888317189098209354659707099224534191143124363741514977132⟩⟩, + ⟨⟨-115709230117565536242091529644835463240922439593598926518,-115709230117565536242091529644835463240922439593491065997⟩,⟨49869629425826997232609024939879225289899597265850322728,49869629425826997232609024939879225289899597265958206102⟩⟩, + ⟨⟨-10217999611962950883319660216915457332944558637776266376,-10217999611962950883319660216915457332944558637766640633⟩,⟨-4019618997098600462156905024825278894671119783861800958,-4019618997098600462156905024825278894671119783852174911⟩⟩, + ⟨⟨-533117184015448016847195828416233189294876848244350722,-533117184015448016847195828416233189294876848243697534⟩,⟨-300907109602612072310464297309708383140660039399954256,-300907109602612072310464297309708383140660039399301088⟩⟩, + ⟨⟨-25378193744991559660726652522644020249843318690733558,-25378193744991559660726652522644020249843318690680117⟩,⟨7732922987970453317044758862948952881098353931735104,7732922987970453317044758862948952881098353931794512⟩⟩, + ⟨⟨899663759252753003448192658713000062631171227669287,899663759252753003448192658713000062631171227738234⟩,⟨1014254502786993061798929558615399747538730192047877,1014254502786993061798929558615399747538730192116826⟩⟩, + ⟨⟨-104706559957358974209184236781606205487369358157124,-104706559957358974209184236781606205487369358065739⟩,⟨-108636522603811452510419191754829773697915342367325,-108636522603811452510419191754829773697915342282049⟩⟩, + ⟨⟨66624855881478400959605517442604323510343640554096,66624855881478400959605517442604323510343640670622⟩,⟨-62744,71707⟩⟩, + ⟨⟨-104706559957358974209184236781606205487369358157124,-104706559957358974209184236781606205487369358065739⟩,⟨108636522603811452510419191754829773697915342282049,108636522603811452510419191754829773697915342367325⟩⟩, + ⟨⟨899663759252753003448192658713000062631171227669287,899663759252753003448192658713000062631171227738234⟩,⟨-1014254502786993061798929558615399747538730192116826,-1014254502786993061798929558615399747538730192047877⟩⟩, + ⟨⟨-25378193744991559660726652522644020249843318690733558,-25378193744991559660726652522644020249843318690680117⟩,⟨-7732922987970453317044758862948952881098353931794512,-7732922987970453317044758862948952881098353931735104⟩⟩, + ⟨⟨-533117184015448016847195828416233189294876848244350722,-533117184015448016847195828416233189294876848243697534⟩,⟨300907109602612072310464297309708383140660039399301088,300907109602612072310464297309708383140660039399954256⟩⟩, + ⟨⟨-10217999611962950883319660216915457332944558637776266376,-10217999611962950883319660216915457332944558637766640633⟩,⟨4019618997098600462156905024825278894671119783852174911,4019618997098600462156905024825278894671119783861800958⟩⟩, + ⟨⟨-115709230117565536242091529644835463240922439593598926518,-115709230117565536242091529644835463240922439593491065997⟩,⟨-49869629425826997232609024939879225289899597265958206102,-49869629425826997232609024939879225289899597265850322728⟩⟩, + ⟨⟨-2482063467071684545055286143586980524339749167103370885,-2482063467071684545055286143586980524339749166489088650⟩,⟨-888317189098209354659707099224534191143124363741514977132,-888317189098209354659707099224534191143124363740900817592⟩⟩, + ⟨⟨3902951524899150325639557284959758345266602091261379556102,3902951524899150325639557284959758345266602091264629340511⟩,⟨-884930353029350339080638679835199836266562200060165563142,-884930353029350339080638679835199836266562200056918489938⟩⟩, + ⟨⟨4540052613878503472436853637780162611195673259300660543944,4540052613878503472436853637780162611195673259308934199891⟩,⟨11477350622123539948851893222799132762787695872196006580958,11477350622123539948851893222799132762787695872204279565535⟩⟩, + ⟨⟨-24056059124271426535979609290519515679499342723300756110628,-24056059124271426535979609290519515679499342723282429258348⟩,⟨14351296211913794113327796578307964838524652514551627828691,14351296211913794113327796578307964838524652514569917880933⟩⟩, + ⟨⟨-33935856332445606411791696634659189101681279585290032514637,-33935856332445606411791696634659189101681279585268797450093⟩,⟨-36581608950696811238272832257555548889115505557859705328701,-36581608950696811238272832257555548889115505557838434487934⟩⟩, + ⟨⟨38052772771625204614469486652544756642984719668509443497137,38052772771625204614469486652544756642984719668540523192997⟩,⟨-63005273627471769107525216428792950678361255364847205615437,-63005273627471769107525216428792950678361255364816163686498⟩⟩, + ⟨⟨92227142645159861486571698721436311709944330642351256637946,92227142645159861486571698721436311709944330642390124081719⟩,⟨17323423826099209995591354164882771212546398267594936399975,17323423826099209995591354164882771212546398267633917098007⟩⟩, + ⟨⟨26609508573392829254323743001289293976473585289625141912670,26609508573392829254323743001289293976473585289655527145295⟩,⟨103568890423182795212621489152817660497103845997391994243798,103568890423182795212621489152817660497103845997422833301655⟩⟩, + ⟨⟨-80591428461122936218543553068427472795245046195591000979882,-80591428461122936218543553068427472795245046195571479900450⟩,⟨77470762151253056784298342116159483572151302173177095795848,77470762151253056784298342116159483572151302173196615625259⟩⟩] +lemma tw0_1_1_8_calc (j : Fin 31) : taylorWaveBox 0 1 1 8 j = tw0_1_1_8 j := by + revert j + decide +kernel +def tw0_1_1_9 : Fin 31 → CI := ![⟨⟨35404373649190854455364379306695279414566855475273446915088,35404373649190854455364379306695279414566855475282405494843⟩,⟨-26711793317940797102492264838162097283988210460407026830165,-26711793317940797102492264838162097283988210460398061830157⟩⟩, + ⟨⟨40374456250131557545107574098694130183564467191027982114571,40374456250131557545107574098694130183564467191042109491817⟩,⟨19490933781391085893577385336414491395627722568314281086117,19490933781391085893577385336414491395627722568328212514325⟩⟩, + ⟨⟨-2306847356202462788434021240958734138326274532415512689296,-2306847356202462788434021240958734138326274532397830933334⟩,⟨41643526258387896805928117033538158802298714454279482163382,41643526258387896805928117033538158802298714454297129243184⟩⟩, + ⟨⟨-33662071752858639467896592867640324643532071082461434477454,-33662071752858639467896592867640324643532071082447716069247⟩,⟨8801601588014150566156337257596455642479822174415618383288,8801601588014150566156337257596455642479822174429311364830⟩⟩, + ⟨⟨-11718031208206086934937202359389720787549987156772503853119,-11718031208206086934937202359389720787549987156759731149529⟩,⟨-22280197442899289307026514034671675011777723442829327984946,-22280197442899289307026514034671675011777723442816580359570⟩⟩, + ⟨⟨12162084728529592460490157040964087035540888868458468046441,12162084728529592460490157040964087035540888868468376558709⟩,⟨-9009724091653982783700916734951753615982392606632982095953,-9009724091653982783700916734951753615982392606623063924401⟩⟩, + ⟨⟨4810315020486323725964888172295798471062131559318345850379,4810315020486323725964888172295798471062131559324094139218⟩,⟨5314433908513477669264552625696150112228342501990013452949,5314433908513477669264552625696150112228342501995758396499⟩⟩, + ⟨⟨-1713076340028597102651049587476662916194080664439546169989,-1713076340028597102651049587476662916194080664437367420845⟩,⟨1829539363897924074559386248375553275156364821754186929851,1829539363897924074559386248375553275156364821756366736142⟩⟩, + ⟨⟨-492037271701065665040923392488587329707334596334178165556,-492037271701065665040923392488587329707334596333669892576⟩,⟨-346141919432798705098615062293683367075476547483217126885,-346141919432798705098615062293683367075476547482709138657⟩⟩, + ⟨⟨26922745640444230711793045074361892743613069186945875850,26922745640444230711793045074361892743613069187023908502⟩,⟨-88421666789772921613234816172013518333660083965035204897,-88421666789772921613234816172013518333660083964957175483⟩⟩, + ⟨⟨8076701366072142143569114117447346063374195293122191093,8076701366072142143569114117447346063374195293131477268⟩,⟨-3297595721955200837315446909494704305981390476616642713,-3297595721955200837315446909494704305981390476607357100⟩⟩, + ⟨⟨520940516410505882218168850079653327676777636130556082,520940516410505882218168850079653327676777636131285673⟩,⟨-66523130121712752842908029275662568927293092423150344,-66523130121712752842908029275662568927293092422420817⟩⟩, + ⟨⟨17029470440245688988758085375321776006133358757982574,17029470440245688988758085375321776006133358758042001⟩,⟨-17465736320787008744633895415546930556840750738754661,-17465736320787008744633895415546930556840750738695590⟩⟩, + ⟨⟨-1158442393062809123867732711558958552604712589311984,-1158442393062809123867732711558958552604712589237628⟩,⟨-630349239171193400461928461710809987764694728900610,-630349239171193400461928461710809987764694728826253⟩⟩, + ⟨⟨123418198400059581016426485373393399873458294994561,123418198400059581016426485373393399873458295094897⟩,⟨89295892082710292720955807991710527176918674232240,89295892082710292720955807991710527176918674328161⟩⟩, + ⟨⟨-68150139217070150231126156268414544296724222901466,-68150139217070150231126156268414544296724222782272⟩,⟨-73349,64180⟩⟩, + ⟨⟨123418198400059581016426485373393399873458294994561,123418198400059581016426485373393399873458295094897⟩,⟨-89295892082710292720955807991710527176918674328161,-89295892082710292720955807991710527176918674232240⟩⟩, + ⟨⟨-1158442393062809123867732711558958552604712589311984,-1158442393062809123867732711558958552604712589237628⟩,⟨630349239171193400461928461710809987764694728826253,630349239171193400461928461710809987764694728900610⟩⟩, + ⟨⟨17029470440245688988758085375321776006133358757982574,17029470440245688988758085375321776006133358758042001⟩,⟨17465736320787008744633895415546930556840750738695590,17465736320787008744633895415546930556840750738754661⟩⟩, + ⟨⟨520940516410505882218168850079653327676777636130556082,520940516410505882218168850079653327676777636131285673⟩,⟨66523130121712752842908029275662568927293092422420817,66523130121712752842908029275662568927293092423150344⟩⟩, + ⟨⟨8076701366072142143569114117447346063374195293122191093,8076701366072142143569114117447346063374195293131477268⟩,⟨3297595721955200837315446909494704305981390476607357100,3297595721955200837315446909494704305981390476616642713⟩⟩, + ⟨⟨26922745640444230711793045074361892743613069186945875850,26922745640444230711793045074361892743613069187023908502⟩,⟨88421666789772921613234816172013518333660083964957175483,88421666789772921613234816172013518333660083965035204897⟩⟩, + ⟨⟨-492037271701065665040923392488587329707334596334178165556,-492037271701065665040923392488587329707334596333669892576⟩,⟨346141919432798705098615062293683367075476547482709138657,346141919432798705098615062293683367075476547483217126886⟩⟩, + ⟨⟨-1713076340028597102651049587476662916194080664439546169934,-1713076340028597102651049587476662916194080664437367420845⟩,⟨-1829539363897924074559386248375553275156364821756366736123,-1829539363897924074559386248375553275156364821754186929888⟩⟩, + ⟨⟨4810315020486323725964888172295798471062131559318345850380,4810315020486323725964888172295798471062131559324094139263⟩,⟨-5314433908513477669264552625696150112228342501995758396509,-5314433908513477669264552625696150112228342501990013452915⟩⟩, + ⟨⟨12162084728529592460490157040964087035540888868458468046316,12162084728529592460490157040964087035540888868468376558718⟩,⟨9009724091653982783700916734951753615982392606623063924428,9009724091653982783700916734951753615982392606632982096110⟩⟩, + ⟨⟨-11718031208206086934937202359389720787549987156772503853240,-11718031208206086934937202359389720787549987156759731149692⟩,⟨22280197442899289307026514034671675011777723442816580359532,22280197442899289307026514034671675011777723442829327984866⟩⟩, + ⟨⟨-33662071752858639467896592867640324643532071082461434477060,-33662071752858639467896592867640324643532071082447716069501⟩,⟨-8801601588014150566156337257596455642479822174429311364744,-8801601588014150566156337257596455642479822174415618383846⟩⟩, + ⟨⟨-2306847356202462788434021240958734138326274532415512689134,-2306847356202462788434021240958734138326274532397830933006⟩,⟨-41643526258387896805928117033538158802298714454297129243280,-41643526258387896805928117033538158802298714454279482163309⟩⟩, + ⟨⟨40374456250131557545107574098694130183564467191027982114591,40374456250131557545107574098694130183564467191042109492040⟩,⟨-19490933781391085893577385336414491395627722568328212514145,-19490933781391085893577385336414491395627722568314281085736⟩⟩, + ⟨⟨35404373649190854455364379306695279414566855475273446915057,35404373649190854455364379306695279414566855475282405494565⟩,⟨26711793317940797102492264838162097283988210460398061830485,26711793317940797102492264838162097283988210460407026830247⟩⟩] +lemma tw0_1_1_9_calc (j : Fin 31) : taylorWaveBox 0 1 1 9 j = tw0_1_1_9 j := by + revert j + decide +kernel +def tw0_1_1_10 : Fin 31 → CI := ![⟨⟨7556436711801820108304135478124387351732224970886008330176,7556436711801820108304135478124387351732224970889694651753⟩,⟨14249736997381478818938097460787492189724282884622256606429,14249736997381478818938097460787492189724282884625939076961⟩⟩, + ⟨⟨-10400514169576304465870265094114552877031972400623647122729,-10400514169576304465870265094114552877031972400617945773153⟩,⟨13737420875009292585743494997570674574050210051164275341276,13737420875009292585743494997570674574050210051170043986338⟩⟩, + ⟨⟨-16251477952611261231193656311023915190015959149150585417936,-16251477952611261231193656311023915190015959149143472454735⟩,⟨-4962214677190204139439815008458439432599988216542244759212,-4962214677190204139439815008458439432599988216535126770461⟩⟩, + ⟨⟨479955286979300089153479667574799263630425422622974527283,479955286979300089153479667574799263630425422630327608357⟩,⟨-15069072153702388364593014027610957703260327351703853237349,-15069072153702388364593014027610957703260327351696470935133⟩⟩, + ⟨⟨11518875539323867716036971715146915777230462013107854241354,11518875539323867716036971715146915777230462013114371539881⟩,⟨-1687529418323472824424436087069788278524322116987560929502,-1687529418323472824424436087069788278524322116981034023290⟩⟩, + ⟨⟨1798645500959908995838750632152000139528783161760205398096,1798645500959908995838750632152000139528783161764856051953⟩,⟨7277930368141539192267865136838306090757744784824875362393,7277930368141539192267865136838306090757744784829528802001⟩⟩, + ⟨⟨-3670412152466478036589821003371009425117489342118393241144,-3670412152466478036589821003371009425117489342114759872171⟩,⟨1044241591467677018767460069693726970724900396557057022285,1044241591467677018767460069693726970724900396560692537935⟩⟩, + ⟨⟨-409639851146804433795877976048893188406491884810096866942,-409639851146804433795877976048893188406491884808863100781⟩,⟨-1379320664428987024461916739671083453067199033702674160552,-1379320664428987024461916739671083453067199033701440158616⟩⟩, + ⟨⟨351144864726545706406917842942209495289308039682015357979,351144864726545706406917842942209495289308039682382340132⟩,⟨-127170200259895348660597055893124407954513150873326271413,-127170200259895348660597055893124407954513150872959131455⟩⟩, + ⟨⟨33683273316363130598957057393828237555385962099618695691,33683273316363130598957057393828237555385962099687831580⟩,⟨52235430421735619742886865057549722169599943141443134149,52235430421735619742886865057549722169599943141512260242⟩⟩, + ⟨⟨-2595130392158366988439097182543286425812171969533108427,-2595130392158366988439097182543286425812171969525934002⟩,⟨5799557653866170038728176857117771589221783382519364911,5799557653866170038728176857117771589221783382526539127⟩⟩, + ⟨⟨-297097968101345181396655396716614891482493914194643756,-297097968101345181396655396716614891482493914194085075⟩,⟨286864346764285233423383319960840989306007772306665660,286864346764285233423383319960840989306007772307224330⟩⟩, + ⟨⟨-5493511400545688907631687187008645931532270809522421,-5493511400545688907631687187008645931532270809474558⟩,⟨19812739439893398720332264964359747232915530513948746,19812739439893398720332264964359747232915530513991474⟩⟩, + ⟨⟨1162538226382852454432209206969058262428160747335349,1162538226382852454432209206969058262428160747400289⟩,⟨177436347287761008139533669642442641613577897130789,177436347287761008139533669642442641613577897195730⟩⟩, + ⟨⟨-127018668635348052896487574666819086914917709648775,-127018668635348052896487574666819086914917709551362⟩,⟨-61178784781820955436620406775689184954994286028140,-61178784781820955436620406775689184954994285933062⟩⟩, + ⟨⟨63901146642191197289951901298921083638218028340434,63901146642191197289951901298921083638218028452196⟩,⟨-60179,68776⟩⟩, + ⟨⟨-127018668635348052896487574666819086914917709648775,-127018668635348052896487574666819086914917709551362⟩,⟨61178784781820955436620406775689184954994285933062,61178784781820955436620406775689184954994286028140⟩⟩, + ⟨⟨1162538226382852454432209206969058262428160747335349,1162538226382852454432209206969058262428160747400289⟩,⟨-177436347287761008139533669642442641613577897195730,-177436347287761008139533669642442641613577897130789⟩⟩, + ⟨⟨-5493511400545688907631687187008645931532270809522421,-5493511400545688907631687187008645931532270809474558⟩,⟨-19812739439893398720332264964359747232915530513991474,-19812739439893398720332264964359747232915530513948746⟩⟩, + ⟨⟨-297097968101345181396655396716614891482493914194643756,-297097968101345181396655396716614891482493914194085075⟩,⟨-286864346764285233423383319960840989306007772307224330,-286864346764285233423383319960840989306007772306665660⟩⟩, + ⟨⟨-2595130392158366988439097182543286425812171969533108427,-2595130392158366988439097182543286425812171969525934002⟩,⟨-5799557653866170038728176857117771589221783382526539127,-5799557653866170038728176857117771589221783382519364911⟩⟩, + ⟨⟨33683273316363130598957057393828237555385962099618695691,33683273316363130598957057393828237555385962099687831580⟩,⟨-52235430421735619742886865057549722169599943141512260242,-52235430421735619742886865057549722169599943141443134149⟩⟩, + ⟨⟨351144864726545706406917842942209495289308039682015357979,351144864726545706406917842942209495289308039682382340132⟩,⟨127170200259895348660597055893124407954513150872959131454,127170200259895348660597055893124407954513150873326271413⟩⟩, + ⟨⟨-409639851146804433795877976048893188406491884810096866942,-409639851146804433795877976048893188406491884808863100806⟩,⟨1379320664428987024461916739671083453067199033701440158617,1379320664428987024461916739671083453067199033702674160528⟩⟩, + ⟨⟨-3670412152466478036589821003371009425117489342118393241157,-3670412152466478036589821003371009425117489342114759872158⟩,⟨-1044241591467677018767460069693726970724900396560692537962,-1044241591467677018767460069693726970724900396557057022285⟩⟩, + ⟨⟨1798645500959908995838750632152000139528783161760205398124,1798645500959908995838750632152000139528783161764856052031⟩,⟨-7277930368141539192267865136838306090757744784829528802019,-7277930368141539192267865136838306090757744784824875362357⟩⟩, + ⟨⟨11518875539323867716036971715146915777230462013107854241360,11518875539323867716036971715146915777230462013114371539867⟩,⟨1687529418323472824424436087069788278524322116981034023371,1687529418323472824424436087069788278524322116987560929564⟩⟩, + ⟨⟨479955286979300089153479667574799263630425422622974527349,479955286979300089153479667574799263630425422630327608078⟩,⟨15069072153702388364593014027610957703260327351696470935305,15069072153702388364593014027610957703260327351703853237177⟩⟩, + ⟨⟨-16251477952611261231193656311023915190015959149150585417995,-16251477952611261231193656311023915190015959149143472454733⟩,⟨4962214677190204139439815008458439432599988216535126770336,4962214677190204139439815008458439432599988216542244759146⟩⟩, + ⟨⟨-10400514169576304465870265094114552877031972400623647122672,-10400514169576304465870265094114552877031972400617945773017⟩,⟨-13737420875009292585743494997570674574050210051170043986445,-13737420875009292585743494997570674574050210051164275341304⟩⟩, + ⟨⟨7556436711801820108304135478124387351732224970886008330308,7556436711801820108304135478124387351732224970889694651786⟩,⟨-14249736997381478818938097460787492189724282884625939076868,-14249736997381478818938097460787492189724282884622256606434⟩⟩] +lemma tw0_1_1_10_calc (j : Fin 31) : taylorWaveBox 0 1 1 10 j = tw0_1_1_10 j := by + revert j + decide +kernel +def tw0_1_1_11 : Fin 31 → CI := ![⟨⟨-5124563079480761545423518105869830632503533800910084860467,-5124563079480761545423518105869830632503533800908712378591⟩,⟨1748441414865191028606544501985017498701238550938304793716,1748441414865191028606544501985017498701238550939678883469⟩⟩, + ⟨⟨-4051258283300885051663470590905066623091882496691792764769,-4051258283300885051663470590905066623091882496689667384467⟩,⟨-4577367253703223548956443101574627346002518288122159616047,-4577367253703223548956443101574627346002518288120052318370⟩⟩, + ⟨⟨3271002368920178768219340797950070590469211679522621630460,3271002368920178768219340797950070590469211679525195982409⟩,⟨-5489702984231323881278455149376452831963871609623658521219,-5489702984231323881278455149376452831963871609621082002166⟩⟩, + ⟨⟨5725418332760099828128145922943917803805318058948641978005,5725418332760099828128145922943917803805318058952053145984⟩,⟨1893677961838233466011327249150033919607047645119777276833,1893677961838233466011327249150033919607047645123174856205⟩⟩, + ⟨⟨-954433007596943852265269482014552884301171177157023646018,-954433007596943852265269482014552884301171177154099758565⟩,⟨4877210862502103266848600634877720103405019481910594604649,4877210862502103266848600634877720103405019481913516729258⟩⟩, + ⟨⟨-3387592570275237589107220433833770047150979242515919826059,-3387592570275237589107220433833770047150979242513156558725⟩,⟨-522472205429408632882001486145080513731601593380259465223,-522472205429408632882001486145080513731601593377500814029⟩⟩, + ⟨⟨338108689178808877352348908215040644671201022330478366964,338108689178808877352348908215040644671201022332366065349⟩,⟨-1844533927294013850955727931551925678825163758312116093413,-1844533927294013850955727931551925678825163758310228862074⟩⟩, + ⟨⟨740475107420958731210768819861667141444961778471448378902,740475107420958731210768819861667141444961778472321251601⟩,⟨181898380783291693653029888608196592371901622863785676783,181898380783291693653029888608196592371901622864658036745⟩⟩, + ⟨⟨-55596910675512683320134275060770389172820033977237700216,-55596910675512683320134275060770389172820033977017208371⟩,⟨206660608286999744056693160537231079487544026790253681741,206660608286999744056693160537231079487544026790474200474⟩⟩, + ⟨⟨-38255744273041934452488450045314488046722033043457432755,-38255744273041934452488450045314488046722033043408200424⟩,⟨-4992147241968847063475742167231142665419336406765129280,-4992147241968847063475742167231142665419336406715894043⟩⟩, + ⟨⟨-1431214936820518513246334344687571936358683168337622086,-1431214936820518513246334344687571936358683168331698960⟩,⟨-4024577018811794099337258611213020184055449164009712198,-4024577018811794099337258611213020184055449164003788818⟩⟩, + ⟨⟨48369656644569747501161652708332938216543958371881081,48369656644569747501161652708332938216543958372393442⟩,⟨-295857407224980596027886166369133308703632397151273220,-295857407224980596027886166369133308703632397150760828⟩⟩, + ⟨⟨-3674758783513119895288140272837371128113128884732595,-3674758783513119895288140272837371128113128884693827⟩,⟨-15568337322829417823619273199498455139552449760251406,-15568337322829417823619273199498455139552449760216680⟩⟩, + ⟨⟨-949549106495852464445449838321346536135412748672762,-949549106495852464445449838321346536135412748626760⟩,⟨187950075860956561086033455673650295603670797375201,187950075860956561086033455673650295603670797421202⟩⟩, + ⟨⟨116034821294346287785222712993664909386401697934462,116034821294346287785222712993664909386401698018958⟩,⟨32286548580934766812690674250270078966788226211868,32286548580934766812690674250270078966788226295928⟩⟩, + ⟨⟨-55308062992829807369505017923558760044865015764777,-55308062992829807369505017923558760044865015668043⟩,⟨-59527,52086⟩⟩, + ⟨⟨116034821294346287785222712993664909386401697934462,116034821294346287785222712993664909386401698018958⟩,⟨-32286548580934766812690674250270078966788226295928,-32286548580934766812690674250270078966788226211868⟩⟩, + ⟨⟨-949549106495852464445449838321346536135412748672762,-949549106495852464445449838321346536135412748626760⟩,⟨-187950075860956561086033455673650295603670797421202,-187950075860956561086033455673650295603670797375201⟩⟩, + ⟨⟨-3674758783513119895288140272837371128113128884732595,-3674758783513119895288140272837371128113128884693827⟩,⟨15568337322829417823619273199498455139552449760216680,15568337322829417823619273199498455139552449760251406⟩⟩, + ⟨⟨48369656644569747501161652708332938216543958371881081,48369656644569747501161652708332938216543958372393442⟩,⟨295857407224980596027886166369133308703632397150760828,295857407224980596027886166369133308703632397151273220⟩⟩, + ⟨⟨-1431214936820518513246334344687571936358683168337622086,-1431214936820518513246334344687571936358683168331698960⟩,⟨4024577018811794099337258611213020184055449164003788818,4024577018811794099337258611213020184055449164009712198⟩⟩, + ⟨⟨-38255744273041934452488450045314488046722033043457432755,-38255744273041934452488450045314488046722033043408200424⟩,⟨4992147241968847063475742167231142665419336406715894043,4992147241968847063475742167231142665419336406765129280⟩⟩, + ⟨⟨-55596910675512683320134275060770389172820033977237700216,-55596910675512683320134275060770389172820033977017208371⟩,⟨-206660608286999744056693160537231079487544026790474200475,-206660608286999744056693160537231079487544026790253681741⟩⟩, + ⟨⟨740475107420958731210768819861667141444961778471448378909,740475107420958731210768819861667141444961778472321251591⟩,⟨-181898380783291693653029888608196592371901622864658036727,-181898380783291693653029888608196592371901622863785676783⟩⟩, + ⟨⟨338108689178808877352348908215040644671201022330478366952,338108689178808877352348908215040644671201022332366065348⟩,⟨1844533927294013850955727931551925678825163758310228862071,1844533927294013850955727931551925678825163758312116093421⟩⟩, + ⟨⟨-3387592570275237589107220433833770047150979242515919826081,-3387592570275237589107220433833770047150979242513156558715⟩,⟨522472205429408632882001486145080513731601593377500813990,522472205429408632882001486145080513731601593380259465214⟩⟩, + ⟨⟨-954433007596943852265269482014552884301171177157023645986,-954433007596943852265269482014552884301171177154099758540⟩,⟨-4877210862502103266848600634877720103405019481913516729263,-4877210862502103266848600634877720103405019481910594604662⟩⟩, + ⟨⟨5725418332760099828128145922943917803805318058948641978093,5725418332760099828128145922943917803805318058952053145920⟩,⟨-1893677961838233466011327249150033919607047645123174856088,-1893677961838233466011327249150033919607047645119777276868⟩⟩, + ⟨⟨3271002368920178768219340797950070590469211679522621630419,3271002368920178768219340797950070590469211679525195982386⟩,⟨5489702984231323881278455149376452831963871609621082002175,5489702984231323881278455149376452831963871609623658521247⟩⟩, + ⟨⟨-4051258283300885051663470590905066623091882496691792764813,-4051258283300885051663470590905066623091882496689667384484⟩,⟨4577367253703223548956443101574627346002518288120052318327,4577367253703223548956443101574627346002518288122159616031⟩⟩, + ⟨⟨-5124563079480761545423518105869830632503533800910084860439,-5124563079480761545423518105869830632503533800908712378599⟩,⟨-1748441414865191028606544501985017498701238550939678883481,-1748441414865191028606544501985017498701238550938304793763⟩⟩] +lemma tw0_1_1_11_calc (j : Fin 31) : taylorWaveBox 0 1 1 11 j = tw0_1_1_11 j := by + revert j + decide +kernel +def tw0_1_1_12 : Fin 31 → CI := ![⟨⟨-285597635071455648076267559939877863526180088445819790846,-285597635071455648076267559939877863526180088445350818302⟩,⟨-1663522924218039779095503800801000211667241957639495340036,-1663522924218039779095503800801000211667241957639026912593⟩⟩, + ⟨⟨1741216398135527560265114029474545674803615223280878630338,1741216398135527560265114029474545674803615223281589197331⟩,⟨-1011412957357000282028895215022616878500437329521336046884,-1011412957357000282028895215022616878500437329520622183815⟩⟩, + ⟨⟨1589021877687925882854572836081097567967722988972542459904,1589021877687925882854572836081097567967722988973629125068⟩,⟨1566831871204317707340022675244899237707604588165677665827,1566831871204317707340022675244899237707604588166762046448⟩⟩, + ⟨⟨-1277607619812587162024248443007288543648099507013545063445,-1277607619812587162024248443007288543648099507012157653046⟩,⟨1839680566034800916114258498558380647330941298408300448648,1839680566034800916114258498558380647330941298409692088701⟩⟩, + ⟨⟨-1697735839590837526217441785097096016246821986975219635161,-1697735839590837526217441785097096016246821986974012530910⟩,⟨-999223000299180384443560598963818288231629111438581120853,-999223000299180384443560598963818288231629111437374571835⟩⟩, + ⟨⟨758551237126498007422591432704820700732709684244709356729,758551237126498007422591432704820700732709684246077526590⟩,⟨-1241869672502492411725934927990840382012928667451827157021,-1241869672502492411725934927990840382012928667450457096838⟩⟩, + ⟨⟨686481701313651303290218628020823773571187005814916256871,686481701313651303290218628020823773571187005815861179031⟩,⟨510859621394449974578454259131918314261630748963043339110,510859621394449974578454259131918314261630748963988049430⟩⟩, + ⟨⟨-261312101729303500248336110724210330328166679566894168857,-261312101729303500248336110724210330328166679566399677068⟩,⟨269242210356984733527654816185373340188589189672276387491,269242210356984733527654816185373340188589189672771030571⟩⟩, + ⟨⟨-73162059079114805627445801889437778620027159938431113537,-73162059079114805627445801889437778620027159938271639686⟩,⟨-87263221131862698703739928959255011014578968925631983500,-87263221131862698703739928959255011014578968925472578732⟩⟩, + ⟨⟨16443127643817335664774563985990047053046142609891320631,16443127643817335664774563985990047053046142609927288436⟩,⟨-14970037031737546055057680977052032197703150558276364122,-14970037031737546055057680977052032197703150558240393750⟩⟩, + ⟨⟨2381359106931903598311271069196741810700930011959468555,2381359106931903598311271069196741810700930011963774209⟩,⟨1199794069479943257867820092101479453364186671346210321,1199794069479943257867820092101479453364186671350516077⟩⟩, + ⟨⟨93097630945015347837698141883895858359480689740984470,93097630945015347837698141883895858359480689741388900⟩,⟨179345128684048119400526854153128197594367616152135271,179345128684048119400526854153128197594367616152539716⟩⟩, + ⟨⟨7741545656555298549476009020384244186641978804223014,7741545656555298549476009020384244186641978804254929⟩,⟨8579994741533834393604239693653515913461923340963593,8579994741533834393604239693653515913461923340995312⟩⟩, + ⟨⟨633690733737098653165536194617389259274093001705814,633690733737098653165536194617389259274093001739609⟩,⟨-381819718638212401207801838551474881543473722370307,-381819718638212401207801838551474881543473722336513⟩⟩, + ⟨⟨-95123840604652030315077978967652627609649308791722,-95123840604652030315077978967652627609649308725787⟩,⟨-8959092295168108621896353631104284410349484214149,-8959092295168108621896353631104284410349484147311⟩⟩, + ⟨⟨44451207513329989481081912267639863960197040541701,44451207513329989481081912267639863960197040619447⟩,⟨-41862,47842⟩⟩, + ⟨⟨-95123840604652030315077978967652627609649308791722,-95123840604652030315077978967652627609649308725787⟩,⟨8959092295168108621896353631104284410349484147311,8959092295168108621896353631104284410349484214149⟩⟩, + ⟨⟨633690733737098653165536194617389259274093001705814,633690733737098653165536194617389259274093001739609⟩,⟨381819718638212401207801838551474881543473722336513,381819718638212401207801838551474881543473722370307⟩⟩, + ⟨⟨7741545656555298549476009020384244186641978804223014,7741545656555298549476009020384244186641978804254929⟩,⟨-8579994741533834393604239693653515913461923340995312,-8579994741533834393604239693653515913461923340963593⟩⟩, + ⟨⟨93097630945015347837698141883895858359480689740984470,93097630945015347837698141883895858359480689741388900⟩,⟨-179345128684048119400526854153128197594367616152539716,-179345128684048119400526854153128197594367616152135271⟩⟩, + ⟨⟨2381359106931903598311271069196741810700930011959468555,2381359106931903598311271069196741810700930011963774209⟩,⟨-1199794069479943257867820092101479453364186671350516077,-1199794069479943257867820092101479453364186671346210321⟩⟩, + ⟨⟨16443127643817335664774563985990047053046142609891320631,16443127643817335664774563985990047053046142609927288436⟩,⟨14970037031737546055057680977052032197703150558240393750,14970037031737546055057680977052032197703150558276364122⟩⟩, + ⟨⟨-73162059079114805627445801889437778620027159938431113537,-73162059079114805627445801889437778620027159938271639686⟩,⟨87263221131862698703739928959255011014578968925472578732,87263221131862698703739928959255011014578968925631983500⟩⟩, + ⟨⟨-261312101729303500248336110724210330328166679566894168849,-261312101729303500248336110724210330328166679566399677068⟩,⟨-269242210356984733527654816185373340188589189672771030568,-269242210356984733527654816185373340188589189672276387496⟩⟩, + ⟨⟨686481701313651303290218628020823773571187005814916256871,686481701313651303290218628020823773571187005815861179036⟩,⟨-510859621394449974578454259131918314261630748963988049430,-510859621394449974578454259131918314261630748963043339106⟩⟩, + ⟨⟨758551237126498007422591432704820700732709684244709356714,758551237126498007422591432704820700732709684246077526589⟩,⟨1241869672502492411725934927990840382012928667450457096837,1241869672502492411725934927990840382012928667451827157034⟩⟩, + ⟨⟨-1697735839590837526217441785097096016246821986975219635167,-1697735839590837526217441785097096016246821986974012530918⟩,⟨999223000299180384443560598963818288231629111437374571826,999223000299180384443560598963818288231629111438581120842⟩⟩, + ⟨⟨-1277607619812587162024248443007288543648099507013545063403,-1277607619812587162024248443007288543648099507012157653061⟩,⟨-1839680566034800916114258498558380647330941298409692088681,-1839680566034800916114258498558380647330941298408300448685⟩⟩, + ⟨⟨1589021877687925882854572836081097567967722988972542459909,1589021877687925882854572836081097567967722988973629125081⟩,⟨-1566831871204317707340022675244899237707604588166762046443,-1566831871204317707340022675244899237707604588165677665814⟩⟩, + ⟨⟨1741216398135527560265114029474545674803615223280878630327,1741216398135527560265114029474545674803615223281589197328⟩,⟨1011412957357000282028895215022616878500437329520622183822,1011412957357000282028895215022616878500437329521336046900⟩⟩, + ⟨⟨-285597635071455648076267559939877863526180088445819790850,-285597635071455648076267559939877863526180088445350818317⟩,⟨1663522924218039779095503800801000211667241957639026912597,1663522924218039779095503800801000211667241957639495340028⟩⟩] +lemma tw0_1_1_12_calc (j : Fin 31) : taylorWaveBox 0 1 1 12 j = tw0_1_1_12 j := by + revert j + decide +kernel +def tw0_1_1_13 : Fin 31 → CI := ![⟨⟨491036782344849273273436569627675245320788823181925738596,491036782344849273273436569627675245320788823182073362191⟩,⟨-5522607638736326062587404729789084739730270552691243962,-5522607638736326062587404729789084739730270552543463060⟩⟩, + ⟨⟨199426313122457371737755412491890626965949396546029808742,199426313122457371737755412491890626965949396546250431322⟩,⟨586118723729886663643014919364225976792039093172889381452,586118723729886663643014919364225976792039093173109973547⟩⟩, + ⟨⟨-619536651267462896932192035920598584594194253617395935312,-619536651267462896932192035920598584594194253616984548657⟩,⟨381052620529148847576369561979862297915242426343984566335,381052620529148847576369561979862297915242426344396922523⟩⟩, + ⟨⟨-485922916817574918841582205429793523529346381399979000219,-485922916817574918841582205429793523529346381399467676111⟩,⟨-605582470468733069997517419825838972020186169305895931760,-605582470468733069997517419825838972020186169305385410565⟩⟩, + ⟨⟨557379987063156932294614781598290964278728548432701514458,557379987063156932294614781598290964278728548433269193785⟩,⟨-469582227817829906392221557965113699673354927747800517156,-469582227817829906392221557965113699673354927747232169372⟩⟩, + ⟨⟨338388599930979381755083452532376287778219477097353981558,338388599930979381755083452532376287778219477097947302802⟩,⟨466892631985882956230307133884408321712226146859371928040,466892631985882956230307133884408321712226146859964896090⟩⟩, + ⟨⟨-324497017102998712865666077063434583380805915734962214622,-324497017102998712865666077063434583380805915734441141584⟩,⟨165882661090469631686861262282589192131107341281348110162,165882661090469631686861262282589192131107341281869400799⟩⟩, + ⟨⟨-46090821084475202870550874750707734116310853885037454632,-46090821084475202870550874750707734116310853884781818954⟩,⟨-166039095332842229660123443851166172667213248876722109515,-166039095332842229660123443851166172667213248876466441798⟩⟩, + ⟨⟨56337941725896600970902995510396893041774606301556724238,56337941725896600970902995510396893041774606301650193209⟩,⟨-4939716572985679309376453453862266735826106761307830674,-4939716572985679309376453453862266735826106761214348749⟩⟩, + ⟨⟨431050504545433708595874029266766718215210678593339719,431050504545433708595874029266766718215210678618069547⟩,⟨11954702140244453262063094598930915311736175775388943335,11954702140244453262063094598930915311736175775413671824⟩⟩, + ⟨⟨-1486202654587495994999776597494232033440362452616777707,-1486202654587495994999776597494232033440362452613609877⟩,⟨452767809959261408185390521114072650833477995500507412,452767809959261408185390521114072650833477995503675158⟩⟩, + ⟨⟨-114405720718752007461895502676198167457259668504586303,-114405720718752007461895502676198167457259668504293733⟩,⟨-55422781534886418909850782323474101744152473437967781,-55422781534886418909850782323474101744152473437675217⟩⟩, + ⟨⟨-7360409606698742998258501071504354927325012175362748,-7360409606698742998258501071504354927325012175342479⟩,⟨-2557767790579347411742103225485756561012646218152919,-2557767790579347411742103225485756561012646218130920⟩⟩, + ⟨⟨-332529364155111720448233464055599814529764084415114,-332529364155111720448233464055599814529764084386301⟩,⟨409827742889687806483790624092982189811364715856140,409827742889687806483790624092982189811364715884952⟩⟩, + ⟨⟨70493856746331679687048184466648790892105325428065,70493856746331679687048184466648790892105325474541⟩,⟨-5905008142831196694767960954474036437371880852967,-5905008142831196694767960954474036437371880804919⟩⟩, + ⟨⟨-33343827758700050802846378062326201208087696220411,-33343827758700050802846378062326201208087696162092⟩,⟨-35888,31402⟩⟩, + ⟨⟨70493856746331679687048184466648790892105325428065,70493856746331679687048184466648790892105325474541⟩,⟨5905008142831196694767960954474036437371880804919,5905008142831196694767960954474036437371880852967⟩⟩, + ⟨⟨-332529364155111720448233464055599814529764084415114,-332529364155111720448233464055599814529764084386301⟩,⟨-409827742889687806483790624092982189811364715884952,-409827742889687806483790624092982189811364715856140⟩⟩, + ⟨⟨-7360409606698742998258501071504354927325012175362748,-7360409606698742998258501071504354927325012175342479⟩,⟨2557767790579347411742103225485756561012646218130920,2557767790579347411742103225485756561012646218152919⟩⟩, + ⟨⟨-114405720718752007461895502676198167457259668504586303,-114405720718752007461895502676198167457259668504293733⟩,⟨55422781534886418909850782323474101744152473437675217,55422781534886418909850782323474101744152473437967781⟩⟩, + ⟨⟨-1486202654587495994999776597494232033440362452616777707,-1486202654587495994999776597494232033440362452613609877⟩,⟨-452767809959261408185390521114072650833477995503675158,-452767809959261408185390521114072650833477995500507412⟩⟩, + ⟨⟨431050504545433708595874029266766718215210678593339719,431050504545433708595874029266766718215210678618069547⟩,⟨-11954702140244453262063094598930915311736175775413671824,-11954702140244453262063094598930915311736175775388943335⟩⟩, + ⟨⟨56337941725896600970902995510396893041774606301556724238,56337941725896600970902995510396893041774606301650193209⟩,⟨4939716572985679309376453453862266735826106761214348749,4939716572985679309376453453862266735826106761307830674⟩⟩, + ⟨⟨-46090821084475202870550874750707734116310853885037454632,-46090821084475202870550874750707734116310853884781818958⟩,⟨166039095332842229660123443851166172667213248876466441799,166039095332842229660123443851166172667213248876722109513⟩⟩, + ⟨⟨-324497017102998712865666077063434583380805915734962214623,-324497017102998712865666077063434583380805915734441141582⟩,⟨-165882661090469631686861262282589192131107341281869400801,-165882661090469631686861262282589192131107341281348110162⟩⟩, + ⟨⟨338388599930979381755083452532376287778219477097353981559,338388599930979381755083452532376287778219477097947302808⟩,⟨-466892631985882956230307133884408321712226146859964896090,-466892631985882956230307133884408321712226146859371928035⟩⟩, + ⟨⟨557379987063156932294614781598290964278728548432701514456,557379987063156932294614781598290964278728548433269193782⟩,⟨469582227817829906392221557965113699673354927747232169376,469582227817829906392221557965113699673354927747800517159⟩⟩, + ⟨⟨-485922916817574918841582205429793523529346381399979000214,-485922916817574918841582205429793523529346381399467676124⟩,⟨605582470468733069997517419825838972020186169305385410571,605582470468733069997517419825838972020186169305895931747⟩⟩, + ⟨⟨-619536651267462896932192035920598584594194253617395935311,-619536651267462896932192035920598584594194253616984548654⟩,⟨-381052620529148847576369561979862297915242426344396922528,-381052620529148847576369561979862297915242426343984566337⟩⟩, + ⟨⟨199426313122457371737755412491890626965949396546029808745,199426313122457371737755412491890626965949396546250431327⟩,⟨-586118723729886663643014919364225976792039093173109973547,-586118723729886663643014919364225976792039093172889381449⟩⟩, + ⟨⟨491036782344849273273436569627675245320788823181925738598,491036782344849273273436569627675245320788823182073362190⟩,⟨5522607638736326062587404729789084739730270552543463065,5522607638736326062587404729789084739730270552691243963⟩⟩] +lemma tw0_1_1_13_calc (j : Fin 31) : taylorWaveBox 0 1 1 13 j = tw0_1_1_13 j := by + revert j + decide +kernel +def tw0_1_1_14 : Fin 31 → CI := ![⟨⟨-19689181448263579815297370682587704374479855516159565283,-19689181448263579815297370682587704374479855516116257429⟩,⟨132487218331936190511955624859319497817238860226575320748,132487218331936190511955624859319497817238860226618589403⟩⟩, + ⟨⟨-176957910061736830461546682955769171129993608408935892910,-176957910061736830461546682955769171129993608408870406330⟩,⟨23079573644650027024162770291620552950670567460773125265,23079573644650027024162770291620552950670567460838310025⟩⟩, + ⟨⟨-67885312962890309499027269073250808505548511288690082997,-67885312962890309499027269073250808505548511288548061708⟩,⟨-211625625602514225792367352258372606874766182545446456454,-211625625602514225792367352258372606874766182545304728552⟩⟩, + ⟨⟨233515935889536671039700696697952881282555009921613966973,233515935889536671039700696697952881282555009921786163913⟩,⟨-95612118920407871291335111676662096169179626159081134153,-95612118920407871291335111676662096169179626158908970237⟩⟩, + ⟨⟨89380614146828973388051206340975704890871915087433541214,89380614146828973388051206340975704890871915087670981508⟩,⟨236458069816373222449008295781280825728640578326019965769,236458069816373222449008295781280825728640578326257153248⟩⟩, + ⟨⟨-208474295505541894671275955617272246994978146929901310170,-208474295505541894671275955617272246994978146929662243903⟩,⟨49219470211911934644305193538498879509642147908201335410,49219470211911934644305193538498879509642147908440315884⟩⟩, + ⟨⟨-2051253084387379479664237385677961975141207433006681945,-2051253084387379479664237385677961975141207432758697344⟩,⟨-145496087181353901360613973910785941263498300632364147648,-145496087181353901360613973910785941263498300632116224334⟩⟩, + ⟨⟨71722914893780650229821450883524948688071517707712069085,71722914893780650229821450883524948688071517707859970207⟩,⟨18987599173117298440949567748476297593868037647630780084,18987599173117298440949567748476297593868037647778631702⟩⟩, + ⟨⟨-13147638998381604117164405874441720704104239469413495308,-13147638998381604117164405874441720704104239469357565933⟩,⟨22813813554392679393671922240426985591793709784373881371,22813813554392679393671922240426985591793709784429820858⟩⟩, + ⟨⟨-4742110797106378403185056316922175303708023360379127898,-4742110797106378403185056316922175303708023360363236670⟩,⟨-3729676606537450549604075133441378442468941276577040373,-3729676606537450549604075133441378442468941276561149569⟩⟩, + ⟨⟨416258563009338384860756371694134481448317470783713978,416258563009338384860756371694134481448317470785892927⟩,⟨-739544448443196334964986894302482679493407715826455100,-739544448443196334964986894302482679493407715824276188⟩⟩, + ⟨⟨73630464292090600274487455990614891956499667547762744,73630464292090600274487455990614891956499667547992454⟩,⟨-14140896571821101988596387080483978197859988209867576,-14140896571821101988596387080483978197859988209637874⟩⟩, + ⟨⟨4856505968675153398579946400537210017929735957324552,4856505968675153398579946400537210017929735957337754⟩,⟨-822786049228140878854081746595939309127236757922635,-822786049228140878854081746595939309127236757908057⟩⟩, + ⟨⟨115965833565658507645840722196805630724259556766437,115965833565658507645840722196805630724259556786587⟩,⟨-333358994344851754216025350490124998198123372761132,-333358994344851754216025350490124998198123372740982⟩⟩, + ⟨⟨-47438880308432761304113948758599662586749472507975,-47438880308432761304113948758599662586749472478354⟩,⟨12673053840655404404001585545753596842237496535413,12673053840655404404001585545753596842237496566717⟩⟩, + ⟨⟨23448691943614112913819646465052006920631347064595,23448691943614112913819646465052006920631347105608⟩,⟨-22083,25238⟩⟩, + ⟨⟨-47438880308432761304113948758599662586749472507975,-47438880308432761304113948758599662586749472478354⟩,⟨-12673053840655404404001585545753596842237496566717,-12673053840655404404001585545753596842237496535413⟩⟩, + ⟨⟨115965833565658507645840722196805630724259556766437,115965833565658507645840722196805630724259556786587⟩,⟨333358994344851754216025350490124998198123372740982,333358994344851754216025350490124998198123372761132⟩⟩, + ⟨⟨4856505968675153398579946400537210017929735957324552,4856505968675153398579946400537210017929735957337754⟩,⟨822786049228140878854081746595939309127236757908057,822786049228140878854081746595939309127236757922635⟩⟩, + ⟨⟨73630464292090600274487455990614891956499667547762744,73630464292090600274487455990614891956499667547992454⟩,⟨14140896571821101988596387080483978197859988209637874,14140896571821101988596387080483978197859988209867576⟩⟩, + ⟨⟨416258563009338384860756371694134481448317470783713978,416258563009338384860756371694134481448317470785892927⟩,⟨739544448443196334964986894302482679493407715824276188,739544448443196334964986894302482679493407715826455100⟩⟩, + ⟨⟨-4742110797106378403185056316922175303708023360379127898,-4742110797106378403185056316922175303708023360363236670⟩,⟨3729676606537450549604075133441378442468941276561149569,3729676606537450549604075133441378442468941276577040373⟩⟩, + ⟨⟨-13147638998381604117164405874441720704104239469413495308,-13147638998381604117164405874441720704104239469357565933⟩,⟨-22813813554392679393671922240426985591793709784429820858,-22813813554392679393671922240426985591793709784373881371⟩⟩, + ⟨⟨71722914893780650229821450883524948688071517707712069086,71722914893780650229821450883524948688071517707859970206⟩,⟨-18987599173117298440949567748476297593868037647778631700,-18987599173117298440949567748476297593868037647630780084⟩⟩, + ⟨⟨-2051253084387379479664237385677961975141207433006681946,-2051253084387379479664237385677961975141207432758697344⟩,⟨145496087181353901360613973910785941263498300632116224334,145496087181353901360613973910785941263498300632364147649⟩⟩, + ⟨⟨-208474295505541894671275955617272246994978146929901310171,-208474295505541894671275955617272246994978146929662243902⟩,⟨-49219470211911934644305193538498879509642147908440315887,-49219470211911934644305193538498879509642147908201335411⟩⟩, + ⟨⟨89380614146828973388051206340975704890871915087433541215,89380614146828973388051206340975704890871915087670981509⟩,⟨-236458069816373222449008295781280825728640578326257153247,-236458069816373222449008295781280825728640578326019965769⟩⟩, + ⟨⟨233515935889536671039700696697952881282555009921613966975,233515935889536671039700696697952881282555009921786163909⟩,⟨95612118920407871291335111676662096169179626158908970242,95612118920407871291335111676662096169179626159081134152⟩⟩, + ⟨⟨-67885312962890309499027269073250808505548511288690082999,-67885312962890309499027269073250808505548511288548061708⟩,⟨211625625602514225792367352258372606874766182545304728551,211625625602514225792367352258372606874766182545446456454⟩⟩, + ⟨⟨-176957910061736830461546682955769171129993608408935892910,-176957910061736830461546682955769171129993608408870406329⟩,⟨-23079573644650027024162770291620552950670567460838310027,-23079573644650027024162770291620552950670567460773125266⟩⟩, + ⟨⟨-19689181448263579815297370682587704374479855516159565282,-19689181448263579815297370682587704374479855516116257428⟩,⟨-132487218331936190511955624859319497817238860226618589402,-132487218331936190511955624859319497817238860226575320748⟩⟩] +lemma tw0_1_1_14_calc (j : Fin 31) : taylorWaveBox 0 1 1 14 j = tw0_1_1_14 j := by + revert j + decide +kernel +def tw0_1_1_15 : Fin 31 → CI := ![⟨⟨-32784144115246711605886909866874479198658062973947741515,-32784144115246711605886909866874479198658062973935870890⟩,⟨-10368456955500129185909140155681080120614695298520056270,-10368456955500129185909140155681080120614695298508177272⟩⟩, + ⟨⟨3317460709557584904676239766554894139677828812208476722,3317460709557584904676239766554894139677828812229272205⟩,⟨-48299384492917707569017960314622653885561128838439323865,-48299384492917707569017960314622653885561128838418367524⟩⟩, + ⟨⟨63761442334289320199319981088072783905345000759592130508,63761442334289320199319981088072783905345000759637080336⟩,⟨-4432230648019806509786593876107312292178118571594558693,-4432230648019806509786593876107312292178118571549541664⟩⟩, + ⟨⟨7785039224347726732744099296046548833787109598376789738,7785039224347726732744099296046548833787109598438037560⟩,⟨76787329600712550509010313959418163481653593834300736219,76787329600712550509010313959418163481653593834362092883⟩⟩, + ⟨⟨-82498930130547238009982344867437074456441324679447467204,-82498930130547238009982344867437074456441324679357122530⟩,⟨1871363138126568377037255469051657360358481340864599302,1871363138126568377037255469051657360358481340955001378⟩⟩, + ⟨⟨12187495016898924733872579668798929978038045048792712200,12187495016898924733872579668798929978038045048901291637⟩,⟨-73894524156239715364465042367238404663906572330032855421,-73894524156239715364465042367238404663906572329924174944⟩⟩, + ⟨⟨49370353934399701272027768005225619297052748282549483858,49370353934399701272027768005225619297052748282656217304⟩,⟨23506837888964421256399602244452177106585489370767526867,23506837888964421256399602244452177106585489370874258985⟩⟩, + ⟨⟨-21322950660956903200509749711905122614901972087292639112,-21322950660956903200509749711905122614901972087218298308⟩,⟨21196599826885254143764451028014044289739818817741188417,21196599826885254143764451028014044289739818817815540783⟩⟩, + ⟨⟨-4890823137411843522663385809764476886957560379005610415,-4890823137411843522663385809764476886957560378973251428⟩,⟨-10450628066426804873093933542607038173005801848494043976,-10450628066426804873093933542607038173005801848461690470⟩⟩, + ⟨⟨2805572036119450639360153211173110005157795480573749773,2805572036119450639360153211173110005157795480584014619⟩,⟨-574104398838682647124038346116112023704127783602919623,-574104398838682647124038346116112023704127783592654361⟩⟩, + ⟨⟨107836981996188315517812053545685663183858228245349196,107836981996188315517812053545685663183858228246811764⟩,⟨422749790763503860704967105477774795685022006698725479,422749790763503860704967105477774795685022006700188068⟩⟩, + ⟨⟨-28068968266988587053165090692602021372922561976083163,-28068968266988587053165090692602021372922561975930895⟩,⟨30728949783641983899528952114343142121793721098580188,30728949783641983899528952114343142121793721098732455⟩⟩, + ⟨⟨-2296854731865964789255859064116308611037419788246946,-2296854731865964789255859064116308611037419788236592⟩,⟨1820068539624365614713926002376573969596058733060264,1820068539624365614713926002376573969596058733070761⟩⟩, + ⟨⟨2686553727237258354040012032034586593343485599719,2686553727237258354040012032034586593343485611471⟩,⟨222144296662742373325408551149352342082631206303320,222144296662742373325408551149352342082631206315072⟩⟩, + ⟨⟨29042794888743454492629834253182492141705986621238,29042794888743454492629834253182492141705986638258⟩,⟨-13620536484763984662183435068185668791915062112194,-13620536484763984662183435068185668791915062093722⟩⟩, + ⟨⟨-15520040480212196672782841612990880657538265014944,-15520040480212196672782841612990880657538264987799⟩,⟨-16704,14616⟩⟩, + ⟨⟨29042794888743454492629834253182492141705986621238,29042794888743454492629834253182492141705986638258⟩,⟨13620536484763984662183435068185668791915062093722,13620536484763984662183435068185668791915062112194⟩⟩, + ⟨⟨2686553727237258354040012032034586593343485599719,2686553727237258354040012032034586593343485611471⟩,⟨-222144296662742373325408551149352342082631206315072,-222144296662742373325408551149352342082631206303320⟩⟩, + ⟨⟨-2296854731865964789255859064116308611037419788246946,-2296854731865964789255859064116308611037419788236592⟩,⟨-1820068539624365614713926002376573969596058733070761,-1820068539624365614713926002376573969596058733060264⟩⟩, + ⟨⟨-28068968266988587053165090692602021372922561976083163,-28068968266988587053165090692602021372922561975930895⟩,⟨-30728949783641983899528952114343142121793721098732455,-30728949783641983899528952114343142121793721098580188⟩⟩, + ⟨⟨107836981996188315517812053545685663183858228245349196,107836981996188315517812053545685663183858228246811764⟩,⟨-422749790763503860704967105477774795685022006700188068,-422749790763503860704967105477774795685022006698725479⟩⟩, + ⟨⟨2805572036119450639360153211173110005157795480573749773,2805572036119450639360153211173110005157795480584014619⟩,⟨574104398838682647124038346116112023704127783592654361,574104398838682647124038346116112023704127783602919623⟩⟩, + ⟨⟨-4890823137411843522663385809764476886957560379005610415,-4890823137411843522663385809764476886957560378973251428⟩,⟨10450628066426804873093933542607038173005801848461690470,10450628066426804873093933542607038173005801848494043976⟩⟩, + ⟨⟨-21322950660956903200509749711905122614901972087292639111,-21322950660956903200509749711905122614901972087218298308⟩,⟨-21196599826885254143764451028014044289739818817815540782,-21196599826885254143764451028014044289739818817741188418⟩⟩, + ⟨⟨49370353934399701272027768005225619297052748282549483858,49370353934399701272027768005225619297052748282656217305⟩,⟨-23506837888964421256399602244452177106585489370874258985,-23506837888964421256399602244452177106585489370767526867⟩⟩, + ⟨⟨12187495016898924733872579668798929978038045048792712199,12187495016898924733872579668798929978038045048901291637⟩,⟨73894524156239715364465042367238404663906572329924174944,73894524156239715364465042367238404663906572330032855422⟩⟩, + ⟨⟨-82498930130547238009982344867437074456441324679447467204,-82498930130547238009982344867437074456441324679357122530⟩,⟨-1871363138126568377037255469051657360358481340955001378,-1871363138126568377037255469051657360358481340864599303⟩⟩, + ⟨⟨7785039224347726732744099296046548833787109598376789739,7785039224347726732744099296046548833787109598438037560⟩,⟨-76787329600712550509010313959418163481653593834362092883,-76787329600712550509010313959418163481653593834300736220⟩⟩, + ⟨⟨63761442334289320199319981088072783905345000759592130508,63761442334289320199319981088072783905345000759637080337⟩,⟨4432230648019806509786593876107312292178118571549541664,4432230648019806509786593876107312292178118571594558694⟩⟩, + ⟨⟨3317460709557584904676239766554894139677828812208476722,3317460709557584904676239766554894139677828812229272205⟩,⟨48299384492917707569017960314622653885561128838418367524,48299384492917707569017960314622653885561128838439323865⟩⟩, + ⟨⟨-32784144115246711605886909866874479198658062973947741515,-32784144115246711605886909866874479198658062973935870890⟩,⟨10368456955500129185909140155681080120614695298508177272,10368456955500129185909140155681080120614695298520056270⟩⟩] +lemma tw0_1_1_15_calc (j : Fin 31) : taylorWaveBox 0 1 1 15 j = tw0_1_1_15 j := by + revert j + decide +kernel +def tw0_1_1_16 : Fin 31 → CI := ![⟨⟨3738980554718569346428844441470532068912915396808432199,3738980554718569346428844441470532068912915396811499684⟩,⟨-7451088959318936223612850623237431047661998043273564860,-7451088959318936223612850623237431047661998043270498846⟩⟩, + ⟨⟨11965239212368218313877462709877077363784438609398512240,11965239212368218313877462709877077363784438609404677816⟩,⟨3270900753461734021424631082004126115160308348044992682,3270900753461734021424631082004126115160308348051106986⟩⟩, + ⟨⟨-2964521534379469393374891282884221086726430738871348750,-2964521534379469393374891282884221086726430738858060947⟩,⟨17105010042666812898522107339107796689310770702485533669,17105010042666812898522107339107796689310770702498811221⟩⟩, + ⟨⟨-21909072491970679798647449637612434809143170229130448089,-21909072491970679798647449637612434809143170229108944976⟩,⟨-4135090266429669892987806273064430699184642902508519465,-4135090266429669892987806273064430699184642902487064071⟩⟩, + ⟨⟨7907256159593947899504275650559532055575504758870056610,7907256159593947899504275650559532055575504758902096033⟩,⟨-24181434907246156435852984449346358348226767737613092588,-24181434907246156435852984449346358348226767737581056849⟩⟩, + ⟨⟨20968882551370473880621740268600394756871381446459254473,20968882551370473880621740268600394756871381446503334372⟩,⟨13110441806742404468198581426655027776142644460415268762,13110441806742404468198581426655027776142644460459316919⟩⟩, + ⟨⟨-15236075075336780211191924769149196656660286567486331394,-15236075075336780211191924769149196656660286567436450942⟩,⟨12020205767568384059056388300465053316649368954065920731,12020205767568384059056388300465053316649368954115811733⟩⟩, + ⟨⟨-2878690564812200041200223187565762087295694943010356838,-2878690564812200041200223187565762087295694942974965956⟩,⟨-11141060622390487238810458968404226349970089149942082610,-11141060622390487238810458968404226349970089149906689335⟩⟩, + ⟨⟨4704389614739034293401308081739271464297307009267971537,4704389614739034293401308081739271464297307009284802458⟩,⟨819907730800111341445174825243449172900486040516024307,819907730800111341445174825243449172900486040532855061⟩⟩, + ⟨⟨-616219097263145599371890323665969865346266703885340294,-616219097263145599371890323665969865346266703879330127⟩,⟨1126231541253748214732641776610842531135177969128009619,1126231541253748214732641776610842531135177969134019815⟩⟩, + ⟨⟨-179632467849301094852764378484775943533598152385590972,-179632467849301094852764378484775943533598152384647095⟩,⟨-112274954884690572253084174879488431117497821233981204,-112274954884690572253084174879488431117497821233037317⟩⟩, + ⟨⟨2163610659325672678386089124578783444585048859003340,2163610659325672678386089124578783444585048859112598⟩,⟨-21711499392970769862255619956098925054518024581901994,-21711499392970769862255619956098925054518024581792733⟩⟩, + ⟨⟨638851826626303241854341379865775222220141049686828,638851826626303241854341379865775222220141049693372⟩,⟨-1517703302014756183741521604216318857016558592275870,-1517703302014756183741521604216318857016558592269645⟩⟩, + ⟨⟨-46395407461696459907568522812971285580613739676075,-46395407461696459907568522812971285580613739670456⟩,⟨-123648769254538041151797864624758330282843132246265,-123648769254538041151797864624758330282843132240646⟩⟩, + ⟨⟨-16154103399742344274997636532626946115173236172850,-16154103399742344274997636532626946115173236163023⟩,⟨11435386086716047950103689251032872198022665020264,11435386086716047950103689251032872198022665031066⟩⟩, + ⟨⟨9701602902183275755849609762523025130210640532101,9701602902183275755849609762523025130210640549070⟩,⟨-9137,10442⟩⟩, + ⟨⟨-16154103399742344274997636532626946115173236172850,-16154103399742344274997636532626946115173236163023⟩,⟨-11435386086716047950103689251032872198022665031066,-11435386086716047950103689251032872198022665020264⟩⟩, + ⟨⟨-46395407461696459907568522812971285580613739676075,-46395407461696459907568522812971285580613739670456⟩,⟨123648769254538041151797864624758330282843132240646,123648769254538041151797864624758330282843132246265⟩⟩, + ⟨⟨638851826626303241854341379865775222220141049686828,638851826626303241854341379865775222220141049693372⟩,⟨1517703302014756183741521604216318857016558592269645,1517703302014756183741521604216318857016558592275870⟩⟩, + ⟨⟨2163610659325672678386089124578783444585048859003340,2163610659325672678386089124578783444585048859112598⟩,⟨21711499392970769862255619956098925054518024581792733,21711499392970769862255619956098925054518024581901994⟩⟩, + ⟨⟨-179632467849301094852764378484775943533598152385590972,-179632467849301094852764378484775943533598152384647095⟩,⟨112274954884690572253084174879488431117497821233037317,112274954884690572253084174879488431117497821233981204⟩⟩, + ⟨⟨-616219097263145599371890323665969865346266703885340294,-616219097263145599371890323665969865346266703879330127⟩,⟨-1126231541253748214732641776610842531135177969134019815,-1126231541253748214732641776610842531135177969128009619⟩⟩, + ⟨⟨4704389614739034293401308081739271464297307009267971537,4704389614739034293401308081739271464297307009284802458⟩,⟨-819907730800111341445174825243449172900486040532855061,-819907730800111341445174825243449172900486040516024307⟩⟩, + ⟨⟨-2878690564812200041200223187565762087295694943010356838,-2878690564812200041200223187565762087295694942974965956⟩,⟨11141060622390487238810458968404226349970089149906689335,11141060622390487238810458968404226349970089149942082610⟩⟩, + ⟨⟨-15236075075336780211191924769149196656660286567486331394,-15236075075336780211191924769149196656660286567436450942⟩,⟨-12020205767568384059056388300465053316649368954115811733,-12020205767568384059056388300465053316649368954065920731⟩⟩, + ⟨⟨20968882551370473880621740268600394756871381446459254473,20968882551370473880621740268600394756871381446503334372⟩,⟨-13110441806742404468198581426655027776142644460459316919,-13110441806742404468198581426655027776142644460415268762⟩⟩, + ⟨⟨7907256159593947899504275650559532055575504758870056610,7907256159593947899504275650559532055575504758902096033⟩,⟨24181434907246156435852984449346358348226767737581056849,24181434907246156435852984449346358348226767737613092588⟩⟩, + ⟨⟨-21909072491970679798647449637612434809143170229130448089,-21909072491970679798647449637612434809143170229108944976⟩,⟨4135090266429669892987806273064430699184642902487064071,4135090266429669892987806273064430699184642902508519465⟩⟩, + ⟨⟨-2964521534379469393374891282884221086726430738871348750,-2964521534379469393374891282884221086726430738858060947⟩,⟨-17105010042666812898522107339107796689310770702498811221,-17105010042666812898522107339107796689310770702485533669⟩⟩, + ⟨⟨11965239212368218313877462709877077363784438609398512240,11965239212368218313877462709877077363784438609404677816⟩,⟨-3270900753461734021424631082004126115160308348051106986,-3270900753461734021424631082004126115160308348044992682⟩⟩, + ⟨⟨3738980554718569346428844441470532068912915396808432199,3738980554718569346428844441470532068912915396811499684⟩,⟨7451088959318936223612850623237431047661998043270498846,7451088959318936223612850623237431047661998043273564860⟩⟩] +lemma tw0_1_1_16_calc (j : Fin 31) : taylorWaveBox 0 1 1 16 j = tw0_1_1_16 j := by + revert j + decide +kernel +def tw0_1_1_17 : Fin 31 → CI := ![⟨⟨1554126333541416339418592711706108457945704989754456936,1554126333541416339418592711706108457945704989755206459⟩,⟨1118604311924712792175893533651518688380251821635509601,1118604311924712792175893533651518688380251821636259307⟩⟩, + ⟨⟨-1350473842496583076361700860648687367495867101346549787,-1350473842496583076361700860648687367495867101344876896⟩,⟨2691054858112996154541547917226202689039802747576226124,2691054858112996154541547917226202689039802747577911786⟩⟩, + ⟨⟨-4092082239461169848519448104127882477502121873725471771,-4092082239461169848519448104127882477502121873721779842⟩,⟨-1791297172693072397327047150627520439770569534211492675,-1791297172693072397327047150627520439770569534207800750⟩⟩, + ⟨⟨2785854928706560484600450959031178408075276619848901455,2785854928706560484600450959031178408075276619855808828⟩,⟨-5428719734071757228114436866934660507098053898327901821,-5428719734071757228114436866934660507098053898320981721⟩⟩, + ⟨⟨5894182789980276029304578468947710886023829604791103245,5894182789980276029304578468947710886023829604802426132⟩,⟨4525155828449991688664929225786097685084513106158887420,4525155828449991688664929225786097685084513106170206410⟩⟩, + ⟨⟨-6311066817889098000931597071118850930794889255596202508,-6311066817889098000931597071118850930794889255579752726⟩,⟨4474366248632892777283967754895371525516584284700275186,4474366248632892777283967754895371525516584284716729506⟩⟩, + ⟨⟨-1356946457350904552724455963455568560521937711759444117,-1356946457350904552724455963455568560521937711737927558⟩,⟨-6382494655392772461870845279016628246815771660557813030,-6382494655392772461870845279016628246815771660536300044⟩⟩, + ⟨⟨4013473935104802667421093611020463838422481562587814260,4013473935104802667421093611020463838422481562605186664⟩,⟨1139834442490062441942063411400152205320228717228149161,1139834442490062441942063411400152205320228717245518804⟩⟩, + ⟨⟨-1320493978572412184268920602968389794070300552025741276,-1320493978572412184268920602968389794070300552016560912⟩,⟨1327318088585033892519622502821306207375788104431725636,1327318088585033892519622502821306207375788104440907180⟩⟩, + ⟨⟨-195966288185649775001542849057388829225810792367571358,-195966288185649775001542849057388829225810792363995355⟩,⟨-508795589182995459356614114015137144683964305720254678,-508795589182995459356614114015137144683964305716678770⟩⟩, + ⟨⟨95423258343143665985281291769953649487185980781399528,95423258343143665985281291769953649487185980781983080⟩,⟨-19721243108365817690898650109679658083103096459566353,-19721243108365817690898650109679658083103096458982805⟩⟩, + ⟨⟨5585871757294843162601921592746642729666094838928481,5585871757294843162601921592746642729666094838999684⟩,⟨9286186512783415816300246097329934634525271694710682,9286186512783415816300246097329934634525271694781886⟩⟩, + ⟨⟨90871447339761272473602663081552311175821519536238,90871447339761272473602663081552311175821519540086⟩,⟨871846810024921440164610130617233139901183919056864,871846810024921440164610130617233139901183919060444⟩⟩, + ⟨⟨48245794535892628085241078921514960521791879704704,48245794535892628085241078921514960521791879708535⟩,⟨56606023660738614614149872203272432035234339711149,56606023660738614614149872203272432035234339714980⟩⟩, + ⟨⟨8114011850932272766959961108273739269379654041639,8114011850932272766959961108273739269379654048307⟩,⟨-8246263118750475491597157505197098097608197080069,-8246263118750475491597157505197098097608197072952⟩⟩, + ⟨⟨-5745304397850092339641107791917143761897380454206,-5745304397850092339641107791917143761897380444157⟩,⟨-6184,5411⟩⟩, + ⟨⟨8114011850932272766959961108273739269379654041639,8114011850932272766959961108273739269379654048307⟩,⟨8246263118750475491597157505197098097608197072952,8246263118750475491597157505197098097608197080069⟩⟩, + ⟨⟨48245794535892628085241078921514960521791879704704,48245794535892628085241078921514960521791879708535⟩,⟨-56606023660738614614149872203272432035234339714980,-56606023660738614614149872203272432035234339711149⟩⟩, + ⟨⟨90871447339761272473602663081552311175821519536238,90871447339761272473602663081552311175821519540086⟩,⟨-871846810024921440164610130617233139901183919060444,-871846810024921440164610130617233139901183919056864⟩⟩, + ⟨⟨5585871757294843162601921592746642729666094838928481,5585871757294843162601921592746642729666094838999684⟩,⟨-9286186512783415816300246097329934634525271694781886,-9286186512783415816300246097329934634525271694710682⟩⟩, + ⟨⟨95423258343143665985281291769953649487185980781399528,95423258343143665985281291769953649487185980781983080⟩,⟨19721243108365817690898650109679658083103096458982805,19721243108365817690898650109679658083103096459566353⟩⟩, + ⟨⟨-195966288185649775001542849057388829225810792367571358,-195966288185649775001542849057388829225810792363995355⟩,⟨508795589182995459356614114015137144683964305716678770,508795589182995459356614114015137144683964305720254678⟩⟩, + ⟨⟨-1320493978572412184268920602968389794070300552025741276,-1320493978572412184268920602968389794070300552016560912⟩,⟨-1327318088585033892519622502821306207375788104440907180,-1327318088585033892519622502821306207375788104431725636⟩⟩, + ⟨⟨4013473935104802667421093611020463838422481562587814260,4013473935104802667421093611020463838422481562605186664⟩,⟨-1139834442490062441942063411400152205320228717245518804,-1139834442490062441942063411400152205320228717228149161⟩⟩, + ⟨⟨-1356946457350904552724455963455568560521937711759444117,-1356946457350904552724455963455568560521937711737927558⟩,⟨6382494655392772461870845279016628246815771660536300044,6382494655392772461870845279016628246815771660557813030⟩⟩, + ⟨⟨-6311066817889098000931597071118850930794889255596202508,-6311066817889098000931597071118850930794889255579752726⟩,⟨-4474366248632892777283967754895371525516584284716729506,-4474366248632892777283967754895371525516584284700275186⟩⟩, + ⟨⟨5894182789980276029304578468947710886023829604791103245,5894182789980276029304578468947710886023829604802426132⟩,⟨-4525155828449991688664929225786097685084513106170206410,-4525155828449991688664929225786097685084513106158887420⟩⟩, + ⟨⟨2785854928706560484600450959031178408075276619848901455,2785854928706560484600450959031178408075276619855808828⟩,⟨5428719734071757228114436866934660507098053898320981721,5428719734071757228114436866934660507098053898327901821⟩⟩, + ⟨⟨-4092082239461169848519448104127882477502121873725471771,-4092082239461169848519448104127882477502121873721779842⟩,⟨1791297172693072397327047150627520439770569534207800750,1791297172693072397327047150627520439770569534211492675⟩⟩, + ⟨⟨-1350473842496583076361700860648687367495867101346549787,-1350473842496583076361700860648687367495867101344876896⟩,⟨-2691054858112996154541547917226202689039802747577911786,-2691054858112996154541547917226202689039802747576226124⟩⟩, + ⟨⟨1554126333541416339418592711706108457945704989754456936,1554126333541416339418592711706108457945704989755206459⟩,⟨-1118604311924712792175893533651518688380251821636259307,-1118604311924712792175893533651518688380251821635509601⟩⟩] +lemma tw0_1_1_17_calc (j : Fin 31) : taylorWaveBox 0 1 1 17 j = tw0_1_1_17 j := by + revert j + decide +kernel +def tw0_1_1_18 : Fin 31 → CI := ![⟨⟨-294634404666263479455130650233700373900443017473452481,-294634404666263479455130650233700373900443017473275110⟩,⟨296260549713370061603458009714838626180212591238054353,296260549713370061603458009714838626180212591238231727⟩⟩, + ⟨⟨-547046687086020255650105128504794763742393292292935372,-547046687086020255650105128504794763742393292292503437⟩,⟨-427542062301025457458903982185433610184060784083250244,-427542062301025457458903982185433610184060784082820919⟩⟩, + ⟨⟨663979683956745362636784712523457792453998591599937282,663979683956745362636784712523457792453998591600966950⟩,⟨-866877830146133355372728284290034449922977850848121300,-866877830146133355372728284290034449922977850847090904⟩⟩, + ⟨⟨1148014196945585598476581540621728972544517412047068559,1148014196945585598476581540621728972544517412049145904⟩,⟨1094877310299925501511145229166051943284973613142864525,1094877310299925501511145229166051943284973613144939572⟩⟩, + ⟨⟨-1727711577909552889675296452757604873326120843011321034,-1727711577909552889675296452757604873326120843007360111⟩,⟨1125350742677396975961654711406792833590330139089282401,1125350742677396975961654711406792833590330139093245309⟩⟩, + ⟨⟨-504904782483445220831296756817513418821765371683599130,-504904782483445220831296756817513418821765371677717253⟩,⟨-2242977011553143721738881456221748032411251733552957049,-2242977011553143721738881456221748032411251733547074185⟩⟩, + ⟨⟨2019982045768957313566290268105437716149840515750189853,2019982045768957313566290268105437716149840515758795952⟩,⟨513600984900676866571884178157764625806296513853838432,513600984900676866571884178157764625806296513862444923⟩⟩, + ⟨⟨-1037198518843220488144054266912761174460901691119691625,-1037198518843220488144054266912761174460901691111879907⟩,⟨994747244764201821968953485967602109928150319965211233,994747244764201821968953485967602109928150319973023476⟩⟩, + ⟨⟨-123278140039655506135282052160036107542450690122066896,-123278140039655506135282052160036107542450690117487974⟩,⟨-686397832083650155243575726391993909557992098700671417,-686397832083650155243575726391993909557992098696092715⟩⟩, + ⟨⟨207764523578433175361712232650372231009220707148630550,207764523578433175361712232650372231009220707150580831⟩,⟨72292585537094361601653340213827534086915104758878579,72292585537094361601653340213827534086915104760828865⟩⟩, + ⟨⟨-24202780162150646083580995502266262572910390425227062,-24202780162150646083580995502266262572910390424877258⟩,⟨35032141741915865339754457026403812581759174300043358,35032141741915865339754457026403812581759174300393160⟩⟩, + ⟨⟨-4732295884752372695723412125275719031739665987423203,-4732295884752372695723412125275719031739665987378404⟩,⟨-1936341901032931886194512855656138784658684015734028,-1936341901032931886194512855656138784658684015689229⟩⟩, + ⟨⟨-252537469574192148291153670534892956447432443712408,-252537469574192148291153670534892956447432443709918⟩,⟨-364321704865161384060567522696812948361623894046399,-364321704865161384060567522696812948361623894043944⟩⟩, + ⟨⟨-34570642298256909916552633709780172226579251413111,-34570642298256909916552633709780172226579251410814⟩,⟨-19706423391005694028142887123489635269740254175617,-19706423391005694028142887123489635269740254173320⟩⟩, + ⟨⟨-3626466424868011573900500608368574030591934746171,-3626466424868011573900500608368574030591934742071⟩,⟨5302645393382659956341159357638631588735055525618,5302645393382659956341159357638631588735055529892⟩⟩, + ⟨⟨3232259329610462420203967475995883909530209144223,3232259329610462420203967475995883909530209149877⟩,⟨-3044,3479⟩⟩, + ⟨⟨-3626466424868011573900500608368574030591934746171,-3626466424868011573900500608368574030591934742071⟩,⟨-5302645393382659956341159357638631588735055529892,-5302645393382659956341159357638631588735055525618⟩⟩, + ⟨⟨-34570642298256909916552633709780172226579251413111,-34570642298256909916552633709780172226579251410814⟩,⟨19706423391005694028142887123489635269740254173320,19706423391005694028142887123489635269740254175617⟩⟩, + ⟨⟨-252537469574192148291153670534892956447432443712408,-252537469574192148291153670534892956447432443709918⟩,⟨364321704865161384060567522696812948361623894043944,364321704865161384060567522696812948361623894046399⟩⟩, + ⟨⟨-4732295884752372695723412125275719031739665987423203,-4732295884752372695723412125275719031739665987378404⟩,⟨1936341901032931886194512855656138784658684015689229,1936341901032931886194512855656138784658684015734028⟩⟩, + ⟨⟨-24202780162150646083580995502266262572910390425227062,-24202780162150646083580995502266262572910390424877258⟩,⟨-35032141741915865339754457026403812581759174300393160,-35032141741915865339754457026403812581759174300043358⟩⟩, + ⟨⟨207764523578433175361712232650372231009220707148630550,207764523578433175361712232650372231009220707150580831⟩,⟨-72292585537094361601653340213827534086915104760828865,-72292585537094361601653340213827534086915104758878579⟩⟩, + ⟨⟨-123278140039655506135282052160036107542450690122066896,-123278140039655506135282052160036107542450690117487974⟩,⟨686397832083650155243575726391993909557992098696092715,686397832083650155243575726391993909557992098700671417⟩⟩, + ⟨⟨-1037198518843220488144054266912761174460901691119691625,-1037198518843220488144054266912761174460901691111879907⟩,⟨-994747244764201821968953485967602109928150319973023476,-994747244764201821968953485967602109928150319965211233⟩⟩, + ⟨⟨2019982045768957313566290268105437716149840515750189853,2019982045768957313566290268105437716149840515758795952⟩,⟨-513600984900676866571884178157764625806296513862444923,-513600984900676866571884178157764625806296513853838432⟩⟩, + ⟨⟨-504904782483445220831296756817513418821765371683599130,-504904782483445220831296756817513418821765371677717253⟩,⟨2242977011553143721738881456221748032411251733547074185,2242977011553143721738881456221748032411251733552957049⟩⟩, + ⟨⟨-1727711577909552889675296452757604873326120843011321034,-1727711577909552889675296452757604873326120843007360111⟩,⟨-1125350742677396975961654711406792833590330139093245309,-1125350742677396975961654711406792833590330139089282401⟩⟩, + ⟨⟨1148014196945585598476581540621728972544517412047068559,1148014196945585598476581540621728972544517412049145904⟩,⟨-1094877310299925501511145229166051943284973613144939572,-1094877310299925501511145229166051943284973613142864525⟩⟩, + ⟨⟨663979683956745362636784712523457792453998591599937282,663979683956745362636784712523457792453998591600966950⟩,⟨866877830146133355372728284290034449922977850847090904,866877830146133355372728284290034449922977850848121300⟩⟩, + ⟨⟨-547046687086020255650105128504794763742393292292935372,-547046687086020255650105128504794763742393292292503437⟩,⟨427542062301025457458903982185433610184060784082820919,427542062301025457458903982185433610184060784083250244⟩⟩, + ⟨⟨-294634404666263479455130650233700373900443017473452481,-294634404666263479455130650233700373900443017473275110⟩,⟨-296260549713370061603458009714838626180212591238231727,-296260549713370061603458009714838626180212591238054353⟩⟩] +lemma tw0_1_1_18_calc (j : Fin 31) : taylorWaveBox 0 1 1 18 j = tw0_1_1_18 j := by + revert j + decide +kernel +def tw0_1_1_19 : Fin 31 → CI := ![⟨⟨-51111805414489011212980305108777830282572037230611028,-51111805414489011212980305108777830282572037230568666⟩,⟨-70193791712165791426656608114428233030784869664150320,-70193791712165791426656608114428233030784869664107971⟩⟩, + ⟨⟨115719056900409119674809304412921058122455284435300271,115719056900409119674809304412921058122455284435404336⟩,⟨-99290927766307316314595002515370593056755332143109825,-99290927766307316314595002515370593056755332143005333⟩⟩, + ⟨⟨159087642760145441316717928833303119177822882204980432,159087642760145441316717928833303119177822882205268415⟩,⟨198282247940604006671913707943940903560273387697555499,198282247940604006671913707943940903560273387697843181⟩⟩, + ⟨⟨-340594843363106676392315624557572468411683786931993344,-340594843363106676392315624557572468411683786931404212⟩,⟨195691230318914406878527063707847148819957267021750627,195691230318914406878527063707847148819957267022339922⟩⟩, + ⟨⟨-128783274031887537974427548585068028955189559617944203,-128783274031887537974427548585068028955189559616648515⟩,⟨-529442176362984198581422204870995271650041456384616893,-529442176362984198581422204870995271650041456383321696⟩⟩, + ⟨⟨640910779324094580056133708945165732384372450108264325,640910779324094580056133708945165732384372450110434652⟩,⟨112587318907397575538416410408196467762807435027982903,112587318907397575538416410408196467762807435030152351⟩⟩, + ⟨⟨-412067654483110367742286276236855226746223677479952010,-412067654483110367742286276236855226746223677476568312⟩,⟨481888014724567619912853929921855599148621566616684628,481888014724567619912853929921855599148621566620068530⟩⟩, + ⟨⟨-109744010242277462747134440219144794226037055301239991,-109744010242277462747134440219144794226037055297872889⟩,⟨-458492773321542742172160283119198947822701605970891853,-458492773321542742172160283119198947822701605967524643⟩⟩, + ⟨⟨224601290754950111741269097724829269134627835820201284,224601290754950111741269097724829269134627835822405063⟩,⟨103703996156493156773204517234586340149310492641504530,103703996156493156773204517234586340149310492643708236⟩⟩, + ⟨⟨-72784721963581720510482642920760639559075812425711293,-72784721963581720510482642920760639559075812424659568⟩,⟨42983601034655693010052079405821513830091796384635524,42983601034655693010052079405821513830091796385687263⟩⟩, + ⟨⟨-2785510919852936004390391924730333349406754545461674,-2785510919852936004390391924730333349406754545261934⟩,⟨-17500284479466592976514679225011034950782484289506062,-17500284479466592976514679225011034950782484289306321⟩⟩, + ⟨⟨2224811049663868629493725106447029615366817027097314,2224811049663868629493725106447029615366817027125006⟩,⟨-573952320771117831084127899734305786525938932497084,-573952320771117831084127899734305786525938932469393⟩⟩, + ⟨⟨191080281122788997486589179499036889054541347256710,191080281122788997486589179499036889054541347258123⟩,⟨95240693863389267847816678486633301512482472916625,95240693863389267847816678486633301512482472918073⟩⟩, + ⟨⟨19979586736480610032691876092781209319897154920697,19979586736480610032691876092781209319897154921861⟩,⟨3454813246303104415778265165464861842635257610574,3454813246303104415778265165464861842635257611738⟩⟩, + ⟨⟨1392645196370221842600843311843764656283761873771,1392645196370221842600843311843764656283761876080⟩,⟨-3098861197835979150225623797235260069965153293232,-3098861197835979150225623797235260069965153290872⟩⟩, + ⟨⟨-1731849118346910585213412900031956396683697368664,-1731849118346910585213412900031956396683697365634⟩,⟨-1864,1631⟩⟩, + ⟨⟨1392645196370221842600843311843764656283761873771,1392645196370221842600843311843764656283761876080⟩,⟨3098861197835979150225623797235260069965153290872,3098861197835979150225623797235260069965153293232⟩⟩, + ⟨⟨19979586736480610032691876092781209319897154920697,19979586736480610032691876092781209319897154921861⟩,⟨-3454813246303104415778265165464861842635257611738,-3454813246303104415778265165464861842635257610574⟩⟩, + ⟨⟨191080281122788997486589179499036889054541347256710,191080281122788997486589179499036889054541347258123⟩,⟨-95240693863389267847816678486633301512482472918073,-95240693863389267847816678486633301512482472916625⟩⟩, + ⟨⟨2224811049663868629493725106447029615366817027097314,2224811049663868629493725106447029615366817027125006⟩,⟨573952320771117831084127899734305786525938932469393,573952320771117831084127899734305786525938932497084⟩⟩, + ⟨⟨-2785510919852936004390391924730333349406754545461674,-2785510919852936004390391924730333349406754545261934⟩,⟨17500284479466592976514679225011034950782484289306321,17500284479466592976514679225011034950782484289506062⟩⟩, + ⟨⟨-72784721963581720510482642920760639559075812425711293,-72784721963581720510482642920760639559075812424659568⟩,⟨-42983601034655693010052079405821513830091796385687263,-42983601034655693010052079405821513830091796384635524⟩⟩, + ⟨⟨224601290754950111741269097724829269134627835820201284,224601290754950111741269097724829269134627835822405063⟩,⟨-103703996156493156773204517234586340149310492643708236,-103703996156493156773204517234586340149310492641504530⟩⟩, + ⟨⟨-109744010242277462747134440219144794226037055301239991,-109744010242277462747134440219144794226037055297872889⟩,⟨458492773321542742172160283119198947822701605967524643,458492773321542742172160283119198947822701605970891853⟩⟩, + ⟨⟨-412067654483110367742286276236855226746223677479952010,-412067654483110367742286276236855226746223677476568312⟩,⟨-481888014724567619912853929921855599148621566620068530,-481888014724567619912853929921855599148621566616684628⟩⟩, + ⟨⟨640910779324094580056133708945165732384372450108264325,640910779324094580056133708945165732384372450110434652⟩,⟨-112587318907397575538416410408196467762807435030152351,-112587318907397575538416410408196467762807435027982903⟩⟩, + ⟨⟨-128783274031887537974427548585068028955189559617944203,-128783274031887537974427548585068028955189559616648515⟩,⟨529442176362984198581422204870995271650041456383321696,529442176362984198581422204870995271650041456384616893⟩⟩, + ⟨⟨-340594843363106676392315624557572468411683786931993344,-340594843363106676392315624557572468411683786931404212⟩,⟨-195691230318914406878527063707847148819957267022339922,-195691230318914406878527063707847148819957267021750627⟩⟩, + ⟨⟨159087642760145441316717928833303119177822882204980432,159087642760145441316717928833303119177822882205268415⟩,⟨-198282247940604006671913707943940903560273387697843181,-198282247940604006671913707943940903560273387697555499⟩⟩, + ⟨⟨115719056900409119674809304412921058122455284435300271,115719056900409119674809304412921058122455284435404336⟩,⟨99290927766307316314595002515370593056755332143005333,99290927766307316314595002515370593056755332143109825⟩⟩, + ⟨⟨-51111805414489011212980305108777830282572037230611028,-51111805414489011212980305108777830282572037230568666⟩,⟨70193791712165791426656608114428233030784869664107971,70193791712165791426656608114428233030784869664150320⟩⟩] +lemma tw0_1_1_19_calc (j : Fin 31) : taylorWaveBox 0 1 1 19 j = tw0_1_1_19 j := by + revert j + decide +kernel +def tw0_1_1_20 : Fin 31 → CI := ![⟨⟨15352206158744433044302809443033554800299877790649026,15352206158744433044302809443033554800299877790658588⟩,⟨-7809856459840993289664751999175482854600744107820061,-7809856459840993289664751999175482854600744107810495⟩⟩, + ⟨⟨15628502498906442132368668807110480216239219014576002,15628502498906442132368668807110480216239219014600022⟩,⟨27883051234066977903385481567876901733556646838478701,27883051234066977903385481567876901733556646838502674⟩⟩, + ⟨⟨-51228177670286046588765373178423437831384407399450511,-51228177670286046588765373178423437831384407399375103⟩,⟨23814402983739530801455065576548210119971138834116840,23814402983739530801455065576548210119971138834192324⟩⟩, + ⟨⟨-21520029973868840058214817615898812434203000838082794,-21520029973868840058214817615898812434203000837920906⟩,⟨-90314070382144650486657526546402953914490371723931247,-90314070382144650486657526546402953914490371723769281⟩⟩, + ⟨⟨136757896492055487391723643557206027514559228337512642,136757896492055487391723643557206027514559228337913367⟩,⟨13736371543358716580735642832173681679205456891349881,13736371543358716580735642832173681679205456891750675⟩⟩, + ⟨⟨-94752040619151175304043655433808216958947973166003991,-94752040619151175304043655433808216958947973165258070⟩,⟨148086640949351873018499420071582696726959471120259825,148086640949351873018499420071582696726959471121005969⟩⟩, + ⟨⟨-72523298800626156733621294119167857380585975611192255,-72523298800626156733621294119167857380585975609889871⟩,⟨-169229736752726185311658357257230556279051705571904118,-169229736752726185311658357257230556279051705570601841⟩⟩, + ⟨⟨141265249749922377404678457181626025344430012968652226,141265249749922377404678457181626025344430012970087117⟩,⟨42869136160441608826106275296275456263306192207493983,42869136160441608826106275296275456263306192208928778⟩⟩, + ⟨⟨-72361913870973019306520262963875460800540676518258834,-72361913870973019306520262963875460800540676517229187⟩,⟨42200646732339307695546377601450837911550902332585782,42200646732339307695546377601450837911550902333615474⟩⟩, + ⟨⟨5216336560220448421005660603297378966038346105244250,5216336560220448421005660603297378966038346105778348⟩,⟨-30562425489276484941184831212759627909575958186926274,-30562425489276484941184831212759627909575958186392178⟩⟩, + ⟨⟨5601882163224276468790259118649171482730349279340109,5601882163224276468790259118649171482730349279450750⟩,⟨4263271777852759426948212185120477555696036698348971,4263271777852759426948212185120477555696036698459613⟩⟩, + ⟨⟨-617757420262296173014432759880814394075421802083801,-617757420262296173014432759880814394075421802067833⟩,⟨767909605442572110736588050122360873634129156385440,767909605442572110736588050122360873634129156401409⟩⟩, + ⟨⟨-98075742053213973318436521431972032369775085837646,-98075742053213973318436521431972032369775085836886⟩,⟨3913495711362335206618020864809902130869226572230,3913495711362335206618020864809902130869226573023⟩⟩, + ⟨⟨-9710140743721891597166095331261097481008990633663,-9710140743721891597166095331261097481008990633164⟩,⟨1723304117350646688135944138375444812076828098519,1723304117350646688135944138375444812076828099018⟩⟩, + ⟨⟨-415801845988254326774531247323246489966640185284,-415801845988254326774531247323246489966640184083⟩,⟨1663892426543791257855433570502835476307887193703,1663892426543791257855433570502835476307887194908⟩⟩, + ⟨⟨885748696614540214852200227721579627383699793812,885748696614540214852200227721579627383699795362⟩,⟨-835,954⟩⟩, + ⟨⟨-415801845988254326774531247323246489966640185284,-415801845988254326774531247323246489966640184083⟩,⟨-1663892426543791257855433570502835476307887194908,-1663892426543791257855433570502835476307887193703⟩⟩, + ⟨⟨-9710140743721891597166095331261097481008990633663,-9710140743721891597166095331261097481008990633164⟩,⟨-1723304117350646688135944138375444812076828099018,-1723304117350646688135944138375444812076828098519⟩⟩, + ⟨⟨-98075742053213973318436521431972032369775085837646,-98075742053213973318436521431972032369775085836886⟩,⟨-3913495711362335206618020864809902130869226573023,-3913495711362335206618020864809902130869226572230⟩⟩, + ⟨⟨-617757420262296173014432759880814394075421802083801,-617757420262296173014432759880814394075421802067833⟩,⟨-767909605442572110736588050122360873634129156401409,-767909605442572110736588050122360873634129156385440⟩⟩, + ⟨⟨5601882163224276468790259118649171482730349279340109,5601882163224276468790259118649171482730349279450750⟩,⟨-4263271777852759426948212185120477555696036698459613,-4263271777852759426948212185120477555696036698348971⟩⟩, + ⟨⟨5216336560220448421005660603297378966038346105244250,5216336560220448421005660603297378966038346105778348⟩,⟨30562425489276484941184831212759627909575958186392178,30562425489276484941184831212759627909575958186926274⟩⟩, + ⟨⟨-72361913870973019306520262963875460800540676518258834,-72361913870973019306520262963875460800540676517229187⟩,⟨-42200646732339307695546377601450837911550902333615474,-42200646732339307695546377601450837911550902332585782⟩⟩, + ⟨⟨141265249749922377404678457181626025344430012968652226,141265249749922377404678457181626025344430012970087117⟩,⟨-42869136160441608826106275296275456263306192208928778,-42869136160441608826106275296275456263306192207493983⟩⟩, + ⟨⟨-72523298800626156733621294119167857380585975611192255,-72523298800626156733621294119167857380585975609889871⟩,⟨169229736752726185311658357257230556279051705570601841,169229736752726185311658357257230556279051705571904118⟩⟩, + ⟨⟨-94752040619151175304043655433808216958947973166003991,-94752040619151175304043655433808216958947973165258070⟩,⟨-148086640949351873018499420071582696726959471121005969,-148086640949351873018499420071582696726959471120259825⟩⟩, + ⟨⟨136757896492055487391723643557206027514559228337512642,136757896492055487391723643557206027514559228337913367⟩,⟨-13736371543358716580735642832173681679205456891750675,-13736371543358716580735642832173681679205456891349881⟩⟩, + ⟨⟨-21520029973868840058214817615898812434203000838082794,-21520029973868840058214817615898812434203000837920906⟩,⟨90314070382144650486657526546402953914490371723769281,90314070382144650486657526546402953914490371723931247⟩⟩, + ⟨⟨-51228177670286046588765373178423437831384407399450511,-51228177670286046588765373178423437831384407399375103⟩,⟨-23814402983739530801455065576548210119971138834192324,-23814402983739530801455065576548210119971138834116840⟩⟩, + ⟨⟨15628502498906442132368668807110480216239219014576002,15628502498906442132368668807110480216239219014600022⟩,⟨-27883051234066977903385481567876901733556646838502674,-27883051234066977903385481567876901733556646838478701⟩⟩, + ⟨⟨15352206158744433044302809443033554800299877790649026,15352206158744433044302809443033554800299877790658588⟩,⟨7809856459840993289664751999175482854600744107810495,7809856459840993289664751999175482854600744107820061⟩⟩] +lemma tw0_1_1_20_calc (j : Fin 31) : taylorWaveBox 0 1 1 20 j = tw0_1_1_20 j := by + revert j + decide +kernel +def tw0_1_1 : Fin 21 → Fin 31 → CI := ![tw0_1_1_0,tw0_1_1_1,tw0_1_1_2,tw0_1_1_3,tw0_1_1_4,tw0_1_1_5,tw0_1_1_6,tw0_1_1_7,tw0_1_1_8,tw0_1_1_9,tw0_1_1_10,tw0_1_1_11,tw0_1_1_12,tw0_1_1_13,tw0_1_1_14,tw0_1_1_15,tw0_1_1_16,tw0_1_1_17,tw0_1_1_18,tw0_1_1_19,tw0_1_1_20] +lemma tw0_1_1_mem (l : Fin 21) (j : Fin 31) : (tw0_1_1 l j).Mem (taylorWave 0 1 (nearNode 1) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 1 l j = tw0_1_1 l j := by + fin_cases l + · exact tw0_1_1_0_calc j + · exact tw0_1_1_1_calc j + · exact tw0_1_1_2_calc j + · exact tw0_1_1_3_calc j + · exact tw0_1_1_4_calc j + · exact tw0_1_1_5_calc j + · exact tw0_1_1_6_calc j + · exact tw0_1_1_7_calc j + · exact tw0_1_1_8_calc j + · exact tw0_1_1_9_calc j + · exact tw0_1_1_10_calc j + · exact tw0_1_1_11_calc j + · exact tw0_1_1_12_calc j + · exact tw0_1_1_13_calc j + · exact tw0_1_1_14_calc j + · exact tw0_1_1_15_calc j + · exact tw0_1_1_16_calc j + · exact tw0_1_1_17_calc j + · exact tw0_1_1_18_calc j + · exact tw0_1_1_19_calc j + · exact tw0_1_1_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 1 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave012.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave012.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4ec11afd21fc9799267691cc94cb19c9e716157 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave012.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_2_0 : Fin 31 → CI := ![⟨⟨609368498012547989525430601499879197375671175998882627575496,609368498012547989525430601499879197375671175999193841478761⟩,⟨475924179531411340917010056540204789242999117835082573740936,475924179531411340917010056540204789242999117835391744805125⟩⟩, + ⟨⟨-17301141946712632387559021710826211284034625820455532359153,-17301141946712632387559021710826211284034625820308943814015⟩,⟨381800798564154741720166127261996546234274497805317182515759,381800798564154741720166127261996546234274497805464680823742⟩⟩, + ⟨⟨-141921452785532712019181637312399637728761822669114914059424,-141921452785532712019181637312399637728761822669062772890819⟩,⟨78951681362060143953128365773695164356164532253151721407418,78951681362060143953128365773695164356164532253204019297712⟩⟩, + ⟨⟨-48092337423357132454147920670310261648482813547610318036985,-48092337423357132454147920670310261648482813547578958974654⟩,⟨-30925335370161833213987763060224016561245663313295646812983,-30925335370161833213987763060224016561245663313264454100373⟩⟩, + ⟨⟨2075875676983838447436494977377358406050415074201544699351,2075875676983838447436494977377358406050415074212033514939⟩,⟨-15784746357329220684617100074349437752041487027313222594515,-15784746357329220684617100074349437752041487027302721016252⟩⟩, + ⟨⟨3178373466838440932307929538690591487885295721926861905403,3178373466838440932307929538690591487885295721928657026192⟩,⟨-916805500259961126096022113405976535708447357351820617234,-916805500259961126096022113405976535708447357350023066226⟩⟩, + ⟨⟨309184230908895228075522905910091074216088883948230297466,309184230908895228075522905910091074216088883948566615077⟩,⟨364097004064056371414164704226302965846584816990602300963,364097004064056371414164704226302965846584816990938026499⟩⟩, + ⟨⟨-15573611164928459420662707245830380103327163641025614804,-15573611164928459420662707245830380103327163640995737348⟩,⟨41251425564293429681076891892218131266171555369119953040,41251425564293429681076891892218131266171555369149834762⟩⟩, + ⟨⟨-2237547989503296858478386064581390882753387819758550643,-2237547989503296858478386064581390882753387819757254943⟩,⟨804974850082749178459749877634608157130476559028117011,804974850082749178459749877634608157130476559029413609⟩⟩, + ⟨⟨-68592039453712736262371973651317823782141643102571715,-68592039453712736262371973651317823782141643102538359⟩,⟨-9097847892402132104156494288168243989261220905797902,-9097847892402132104156494288168243989261220905764489⟩⟩, + ⟨⟨-1051607886481998880541351770042266857829424139288587,-1051607886481998880541351770042266857829424139287344⟩,⟨58907164056906171575741051090846884630800723851155,58907164056906171575741051090846884630800723852325⟩⟩, + ⟨⟨-2595726646766739516078814483623130060991227335019,-2595726646766739516078814483623130060991227334476⟩,⟨8786318653621139500716600414632995219382558815904,8786318653621139500716600414632995219382558816417⟩⟩, + ⟨⟨41756810012451215759490822733009182059196072357,41756810012451215759490822733009182059196073093⟩,⟨-45950219552035987796451362625909387806153828954,-45950219552035987796451362625909387806153828203⟩⟩, + ⟨⟨342563146152660747284486160790126518576073465,342563146152660747284486160790126518576074273⟩,⟨504853091890749995321405687293201611266251358,504853091890749995321405687293201611266252166⟩⟩, + ⟨⟨10660065332656494400539806843504497861209816,10660065332656494400539806843504497861210611⟩,⟨18276124214650872411359628289499107553660481,18276124214650872411359628289499107553661276⟩⟩, + ⟨⟨6109090735998754476566028160077349844357103,6109090735998754476566028160077349844357992⟩,⟨-444,508⟩⟩, + ⟨⟨10660065332656494400539806843504497861209816,10660065332656494400539806843504497861210611⟩,⟨-18276124214650872411359628289499107553661275,-18276124214650872411359628289499107553660481⟩⟩, + ⟨⟨342563146152660747284486160790126518576073465,342563146152660747284486160790126518576074273⟩,⟨-504853091890749995321405687293201611266252166,-504853091890749995321405687293201611266251358⟩⟩, + ⟨⟨41756810012451215759490822733009182059196072357,41756810012451215759490822733009182059196073093⟩,⟨45950219552035987796451362625909387806153828204,45950219552035987796451362625909387806153828955⟩⟩, + ⟨⟨-2595726646766739516078814483623130060991227335019,-2595726646766739516078814483623130060991227334476⟩,⟨-8786318653621139500716600414632995219382558816417,-8786318653621139500716600414632995219382558815904⟩⟩, + ⟨⟨-1051607886481998880541351770042266857829424139288587,-1051607886481998880541351770042266857829424139287344⟩,⟨-58907164056906171575741051090846884630800723852324,-58907164056906171575741051090846884630800723851154⟩⟩, + ⟨⟨-68592039453712736262371973651317823782141643102571715,-68592039453712736262371973651317823782141643102538359⟩,⟨9097847892402132104156494288168243989261220905764489,9097847892402132104156494288168243989261220905797903⟩⟩, + ⟨⟨-2237547989503296858478386064581390882753387819758550643,-2237547989503296858478386064581390882753387819757254943⟩,⟨-804974850082749178459749877634608157130476559029413609,-804974850082749178459749877634608157130476559028117011⟩⟩, + ⟨⟨-15573611164928459420662707245830380103327163641025614804,-15573611164928459420662707245830380103327163640995737348⟩,⟨-41251425564293429681076891892218131266171555369149834762,-41251425564293429681076891892218131266171555369119953040⟩⟩, + ⟨⟨309184230908895228075522905910091074216088883948230297466,309184230908895228075522905910091074216088883948566615077⟩,⟨-364097004064056371414164704226302965846584816990938026498,-364097004064056371414164704226302965846584816990602300962⟩⟩, + ⟨⟨3178373466838440932307929538690591487885295721926861905403,3178373466838440932307929538690591487885295721928657026217⟩,⟨916805500259961126096022113405976535708447357350023066214,916805500259961126096022113405976535708447357351820617247⟩⟩, + ⟨⟨2075875676983838447436494977377358406050415074201544699283,2075875676983838447436494977377358406050415074212033514818⟩,⟨15784746357329220684617100074349437752041487027302721016287,15784746357329220684617100074349437752041487027313222594495⟩⟩, + ⟨⟨-48092337423357132454147920670310261648482813547610318036798,-48092337423357132454147920670310261648482813547578958975264⟩,⟨30925335370161833213987763060224016561245663313264454100456,30925335370161833213987763060224016561245663313295646812273⟩⟩, + ⟨⟨-141921452785532712019181637312399637728761822669114914058244,-141921452785532712019181637312399637728761822669062772890930⟩,⟨-78951681362060143953128365773695164356164532253204019297952,-78951681362060143953128365773695164356164532253151721408950⟩⟩, + ⟨⟨-17301141946712632387559021710826211284034625820455532355122,-17301141946712632387559021710826211284034625820308943813138⟩,⟨-381800798564154741720166127261996546234274497805464680822274,-381800798564154741720166127261996546234274497805317182517456⟩⟩, + ⟨⟨609368498012547989525430601499879197375671175998882627580796,609368498012547989525430601499879197375671175999193841477765⟩,⟨-475924179531411340917010056540204789242999117835391744799054,-475924179531411340917010056540204789242999117835082573741161⟩⟩] +lemma tw0_1_2_0_calc (j : Fin 31) : taylorWaveBox 0 1 2 0 j = tw0_1_2_0 j := by + revert j + decide +kernel +def tw0_1_2_1 : Fin 31 → CI := ![⟨⟨-823779170847276554523406136140014949002306816806255177837257,-823779170847276554523406136140014949002306816805771587133515⟩,⟨765834990078311886408410108091208388666172044135427379616308,765834990078311886408410108091208388666172044135914574285245⟩⟩, + ⟨⟨-570204562507588169555648543114412745452137179638826166590131,-570204562507588169555648543114412745452137179638583290029555⟩,⟨-141687886289443705352095891011069162593657975705205439058636,-141687886289443705352095891011069162593657975704964116179756⟩⟩, + ⟨⟨-69742055408043582591480131419993018663774231836604112285165,-69742055408043582591480131419993018663774231836513749144164⟩,⟨-255308589139603497655816678071066495307335942252037908415464,-255308589139603497655816678071066495307335942251947809177346⟩⟩, + ⟨⟨75043586317496859625108433110717929244397943909766247928213,75043586317496859625108433110717929244397943909821765442980⟩,⟨-64730203337933732338282224242836732887485321383125382131047,-64730203337933732338282224242836732887485321383069609031525⟩⟩, + ⟨⟨26264169421624687814087897248325447506893835621162177727383,26264169421624687814087897248325447506893835621181374174543⟩,⟨13324050497267789298204216269318113603980998389318421410974,13324050497267789298204216269318113603980998389337601089625⟩⟩, + ⟨⟨-748644135751791624726623636983722241400653542282604137092,-748644135751791624726623636983722241400653542279280601644⟩,⟨6510957242181541380745848060349123621810444914745243810703,6510957242181541380745848060349123621810444914748564810227⟩⟩, + ⟨⟨-986651480082343464298209535298690584812912607416141141077,-986651480082343464298209535298690584812912607415535293774⟩,⟨247260717096450961934972056323445898259853279321874210333,247260717096450961934972056323445898259853279322480348178⟩⟩, + ⟨⟨-63686105936521107019040393032773937014814908784515343819,-63686105936521107019040393032773937014814908784463106314⟩,⟨-78716481035081161417316400623517298191390516907104989534,-78716481035081161417316400623517298191390516907052749273⟩⟩, + ⟨⟨1546111562927737143043408920912107556493734362132626367,1546111562927737143043408920912107556493734362135728777⟩,⟨-5698801754148360891626157155206709636433343442408642073,-5698801754148360891626157155206709636433343442405537426⟩⟩, + ⟨⟨137885875721991439117640089761322172412738311737126740,137885875721991439117640089761322172412738311737234577⟩,⟨-125002891343954500840139359703214739619613461965794076,-125002891343954500840139359703214739619613461965686265⟩⟩, + ⟨⟨2096946147764205129130391343223911540037950507828920,2096946147764205129130391343223911540037950507833680⟩,⟨-2240029423974034215319188507575333803470988155459861,-2240029423974034215319188507575333803470988155455124⟩⟩, + ⟨⟨-9979437143215549984928855679372208619629401753294,-9979437143215549984928855679372208619629401751543⟩,⟨-27035598775469435820347582472191207750592551164600,-27035598775469435820347582472191207750592551162933⟩⟩, + ⟨⟨-48811164905616510393415136013347775130883496033,-48811164905616510393415136013347775130883494190⟩,⟨203556327999128169381346686709895714893981544808,203556327999128169381346686709895714893981546813⟩⟩, + ⟨⟨-1761236420805076279488178522101267484033154107,-1761236420805076279488178522101267484033151312⟩,⟨-1278080512771654350303356256451902694720997688,-1278080512771654350303356256451902694720994893⟩⟩, + ⟨⟨-50788100756002481999763963785932132009516453,-50788100756002481999763963785932132009513326⟩,⟨-59627725606359208602278335938140820209066143,-59627725606359208602278335938140820209063015⟩⟩, + ⟨⟨-22912816170666125721799322271818475870176527,-22912816170666125721799322271818475870173202⟩,⟨-1900,1663⟩⟩, + ⟨⟨-50788100756002481999763963785932132009516453,-50788100756002481999763963785932132009513326⟩,⟨59627725606359208602278335938140820209063016,59627725606359208602278335938140820209066143⟩⟩, + ⟨⟨-1761236420805076279488178522101267484033154107,-1761236420805076279488178522101267484033151312⟩,⟨1278080512771654350303356256451902694720994893,1278080512771654350303356256451902694720997689⟩⟩, + ⟨⟨-48811164905616510393415136013347775130883496033,-48811164905616510393415136013347775130883494190⟩,⟨-203556327999128169381346686709895714893981546813,-203556327999128169381346686709895714893981544808⟩⟩, + ⟨⟨-9979437143215549984928855679372208619629401753294,-9979437143215549984928855679372208619629401751543⟩,⟨27035598775469435820347582472191207750592551162933,27035598775469435820347582472191207750592551164600⟩⟩, + ⟨⟨2096946147764205129130391343223911540037950507828920,2096946147764205129130391343223911540037950507833680⟩,⟨2240029423974034215319188507575333803470988155455124,2240029423974034215319188507575333803470988155459862⟩⟩, + ⟨⟨137885875721991439117640089761322172412738311737126740,137885875721991439117640089761322172412738311737234577⟩,⟨125002891343954500840139359703214739619613461965686265,125002891343954500840139359703214739619613461965794077⟩⟩, + ⟨⟨1546111562927737143043408920912107556493734362132626367,1546111562927737143043408920912107556493734362135728777⟩,⟨5698801754148360891626157155206709636433343442405537426,5698801754148360891626157155206709636433343442408642073⟩⟩, + ⟨⟨-63686105936521107019040393032773937014814908784515343819,-63686105936521107019040393032773937014814908784463106314⟩,⟨78716481035081161417316400623517298191390516907052749273,78716481035081161417316400623517298191390516907104989534⟩⟩, + ⟨⟨-986651480082343464298209535298690584812912607416141141077,-986651480082343464298209535298690584812912607415535293774⟩,⟨-247260717096450961934972056323445898259853279322480348178,-247260717096450961934972056323445898259853279321874210333⟩⟩, + ⟨⟨-748644135751791624726623636983722241400653542282604137124,-748644135751791624726623636983722241400653542279280601631⟩,⟨-6510957242181541380745848060349123621810444914748564810273,-6510957242181541380745848060349123621810444914745243810703⟩⟩, + ⟨⟨26264169421624687814087897248325447506893835621162177727498,26264169421624687814087897248325447506893835621181374174565⟩,⟨-13324050497267789298204216269318113603980998389337601089413,-13324050497267789298204216269318113603980998389318421410865⟩⟩, + ⟨⟨75043586317496859625108433110717929244397943909766247928497,75043586317496859625108433110717929244397943909821765441859⟩,⟨64730203337933732338282224242836732887485321383069609032732,64730203337933732338282224242836732887485321383125382130851⟩⟩, + ⟨⟨-69742055408043582591480131419993018663774231836604112285675,-69742055408043582591480131419993018663774231836513749146875⟩,⟨255308589139603497655816678071066495307335942251947809177945,255308589139603497655816678071066495307335942252037908413862⟩⟩, + ⟨⟨-570204562507588169555648543114412745452137179638826166588468,-570204562507588169555648543114412745452137179638583290033049⟩,⟨141687886289443705352095891011069162593657975704964116178666,141687886289443705352095891011069162593657975705205439052399⟩⟩, + ⟨⟨-823779170847276554523406136140014949002306816806255177828667,-823779170847276554523406136140014949002306816805771587134699⟩,⟨-765834990078311886408410108091208388666172044135914574284121,-765834990078311886408410108091208388666172044135427379624957⟩⟩] +lemma tw0_1_2_1_calc (j : Fin 31) : taylorWaveBox 0 1 2 1 j = tw0_1_2_1 j := by + revert j + decide +kernel +def tw0_1_2_2 : Fin 31 → CI := ![⟨⟨-682931623637879774527023917084379214787441487313380180981367,-682931623637879774527023917084379214787441487312823426157701⟩,⟨-1019571407234297074817920872898534963717730545078611653200454,-1019571407234297074817920872898534963717730545078058996980680⟩⟩, + ⟨⟨289658521291095110893778991762456861822991896244584009017382,289658521291095110893778991762456861822991896244870772797452⟩,⟨-612373686906053484614318162384012333001298969803021164653380,-612373686906053484614318162384012333001298969802732743859340⟩⟩, + ⟨⟨323375844697646385001233290332041855320106252247174063647955,323375844697646385001233290332041855320106252247284717892924⟩,⟨-8297209343744162836704018651960002060942479571752387846679,-8297209343744162836704018651960002060942479571641474711068⟩⟩, + ⟨⟨53020872185479097725044568850749984192137261251083314238322,53020872185479097725044568850749984192137261251151894983634⟩,⟨117413541343327595574163310797539621118910094789319319852014,117413541343327595574163310797539621118910094789387709576656⟩⟩, + ⟨⟨-29542748890071221274698271090540092400309009639241327119052,-29542748890071221274698271090540092400309009639217924219829⟩,⟨28225621690830386822992297781530719349563872385623130541513,28225621690830386822992297781530719349563872385646537981420⟩⟩, + ⟨⟨-8500292456859677184040714854023088651879276026486399651867,-8500292456859677184040714854023088651879276026482462115183⟩,⟨-4752336367043362443213184162707617949301489993221098090582,-4752336367043362443213184162707617949301489993217162233842⟩⟩, + ⟨⟨343282586856647793571027482791519525479007910563269122861,343282586856647793571027482791519525479007910564287424248⟩,⟨-1587818333143500211889480031749087389024856939284846055371,-1587818333143500211889480031749087389024856939283826193442⟩⟩, + ⟨⟨172408201779044324371892599775436733277154150860702086131,172408201779044324371892599775436733277154150860824185873⟩,⟨-26174733563501280841197346290597987414673887144235974256,-26174733563501280841197346290597987414673887144113900217⟩⟩, + ⟨⟨7047356528540726077806839891529941507631469074396806917,7047356528540726077806839891529941507631469074403527808⟩,⟨8442017683659785909111375299061347490280484191643828702,8442017683659785909111375299061347490280484191650542516⟩⟩, + ⟨⟨12738503959457602982435186699699343312284184926137082,12738503959457602982435186699699343312284184926342960⟩,⟨375237519465826279233725396895123963465783060492785288,375237519465826279233725396895123963465783060492990907⟩⟩, + ⟨⟨67048726317031860707937417405580205346306124471517,67048726317031860707937417405580205346306124479371⟩,⟨6703811704119312716893889482153920692820231970444747,6703811704119312716893889482153920692820231970453041⟩⟩, + ⟨⟨57005750524273665980177194361055462195178157240770,57005750524273665980177194361055462195178157245068⟩,⟨37049587406054847496898969101222679009130376672539,37049587406054847496898969101222679009130376676933⟩⟩, + ⟨⟨-139610438637339955818099975773182008776692591935,-139610438637339955818099975773182008776692585950⟩,⟨-510548160673808324645295382611563391121568152895,-510548160673808324645295382611563391121568146701⟩⟩, + ⟨⟨5593156576731332313276550975969672479026812450,5593156576731332313276550975969672479026818818⟩,⟨1613660245529620007239173331366460172589165171,1613660245529620007239173331366460172589171539⟩⟩, + ⟨⟨168025193008168673778374471147016585863276844,168025193008168673778374471147016585863285784⟩,⟨138059107461945527132799486118042069137996541,138059107461945527132799486118042069138005481⟩⟩, + ⟨⟨64452776308073909647878193331483274322662052,64452776308073909647878193331483274322671403⟩,⟨-4676,5343⟩⟩, + ⟨⟨168025193008168673778374471147016585863276844,168025193008168673778374471147016585863285784⟩,⟨-138059107461945527132799486118042069138005481,-138059107461945527132799486118042069137996541⟩⟩, + ⟨⟨5593156576731332313276550975969672479026812450,5593156576731332313276550975969672479026818818⟩,⟨-1613660245529620007239173331366460172589171539,-1613660245529620007239173331366460172589165171⟩⟩, + ⟨⟨-139610438637339955818099975773182008776692591935,-139610438637339955818099975773182008776692585950⟩,⟨510548160673808324645295382611563391121568146701,510548160673808324645295382611563391121568152895⟩⟩, + ⟨⟨57005750524273665980177194361055462195178157240770,57005750524273665980177194361055462195178157245068⟩,⟨-37049587406054847496898969101222679009130376676933,-37049587406054847496898969101222679009130376672538⟩⟩, + ⟨⟨67048726317031860707937417405580205346306124471517,67048726317031860707937417405580205346306124479371⟩,⟨-6703811704119312716893889482153920692820231970453041,-6703811704119312716893889482153920692820231970444747⟩⟩, + ⟨⟨12738503959457602982435186699699343312284184926137082,12738503959457602982435186699699343312284184926342960⟩,⟨-375237519465826279233725396895123963465783060492990907,-375237519465826279233725396895123963465783060492785288⟩⟩, + ⟨⟨7047356528540726077806839891529941507631469074396806917,7047356528540726077806839891529941507631469074403527808⟩,⟨-8442017683659785909111375299061347490280484191650542516,-8442017683659785909111375299061347490280484191643828702⟩⟩, + ⟨⟨172408201779044324371892599775436733277154150860702086131,172408201779044324371892599775436733277154150860824185873⟩,⟨26174733563501280841197346290597987414673887144113900217,26174733563501280841197346290597987414673887144235974256⟩⟩, + ⟨⟨343282586856647793571027482791519525479007910563269122861,343282586856647793571027482791519525479007910564287424248⟩,⟨1587818333143500211889480031749087389024856939283826193442,1587818333143500211889480031749087389024856939284846055371⟩⟩, + ⟨⟨-8500292456859677184040714854023088651879276026486399651919,-8500292456859677184040714854023088651879276026482462115183⟩,⟨4752336367043362443213184162707617949301489993217162233842,4752336367043362443213184162707617949301489993221098090635⟩⟩, + ⟨⟨-29542748890071221274698271090540092400309009639241327118809,-29542748890071221274698271090540092400309009639217924219717⟩,⟨-28225621690830386822992297781530719349563872385646537981532,-28225621690830386822992297781530719349563872385623130541727⟩⟩, + ⟨⟨53020872185479097725044568850749984192137261251083314239958,53020872185479097725044568850749984192137261251151894983567⟩,⟨-117413541343327595574163310797539621118910094789387709575462,-117413541343327595574163310797539621118910094789319319852538⟩⟩, + ⟨⟨323375844697646385001233290332041855320106252247174063649156,323375844697646385001233290332041855320106252247284717891471⟩,⟨8297209343744162836704018651960002060942479571641474714453,8297209343744162836704018651960002060942479571752387847410⟩⟩, + ⟨⟨289658521291095110893778991762456861822991896244584009016473,289658521291095110893778991762456861822991896244870772790493⟩,⟨612373686906053484614318162384012333001298969802732743864231,612373686906053484614318162384012333001298969803021164652221⟩⟩, + ⟨⟨-682931623637879774527023917084379214787441487313380180980527,-682931623637879774527023917084379214787441487312823426167925⟩,⟨1019571407234297074817920872898534963717730545078058996982871,1019571407234297074817920872898534963717730545078611653191580⟩⟩] +lemma tw0_1_2_2_calc (j : Fin 31) : taylorWaveBox 0 1 2 2 j = tw0_1_2_2 j := by + revert j + decide +kernel +def tw0_1_2_3 : Fin 31 → CI := ![⟨⟨972958440844147679338411852427733549583594649252702965537192,972958440844147679338411852427733549583594649253196402322437⟩,⟨-447875456988892133035239769660695201968471319637180536511226,-447875456988892133035239769660695201968471319636683774098894⟩⟩, + ⟨⟨501148972558925730141140723011530394845458925585868857071412,501148972558925730141140723011530394845458925586133083896474⟩,⟨373199525147645751076121012485859296499672431784517096892965,373199525147645751076121012485859296499672431784780154707695⟩⟩, + ⟨⟨-67591908383776400064796163081442241477859108365109493466938,-67591908383776400064796163081442241477859108365006162155195⟩,⟨308992643949180751769626495369599592170721491709435910264654,308992643949180751769626495369599592170721491709539104996279⟩⟩, + ⟨⟨-132730446175133806561387864691145180857022017852501670865444,-132730446175133806561387864691145180857022017852440006860227⟩,⟨18241673760255900856765497908695740266899079148306284574902,18241673760255900856765497908695740266899079148367933923649⟩⟩, + ⟨⟨-18652456449369575819447786960219474630553290621085558999468,-18652456449369575819447786960219474630553290621060786301616⟩,⟨-41335921846513618340588791570045404727473215089538326809030,-41335921846513618340588791570045404727473215089513533847377⟩⟩, + ⟨⟨9104849962082039271838741817329495627993867787786223391332,9104849962082039271838741817329495627993867787792337678748⟩,⟨-7149871750764715181643932732751664395405867893042432095876,-7149871750764715181643932732751664395405867893036308910193⟩⟩, + ⟨⟨1625096237606761431650371096895072676972182085074278953438,1625096237606761431650371096895072676972182085075792249648⟩,⟨1291170289159178061534317332547340417426875983740278616159,1291170289159178061534317332547340417426875983741789014280⟩⟩, + ⟨⟨-88875092141480009675312640919690958752978893872387916274,-88875092141480009675312640919690958752978893872218880032⟩,⟨223224772329181622837073717210793757671241711157015365548,223224772329181622837073717210793757671241711157184424479⟩⟩, + ⟨⟨-16324703044208615160300487855817976382096920443197686834,-16324703044208615160300487855817976382096920443189731377⟩,⟨1396410974909348090530859513819184996775466015984000080,1396410974909348090530859513819184996775466015991956434⟩⟩, + ⟨⟨-475484148399651596729874200507675411295714083285883123,-475484148399651596729874200507675411295714083285537225⟩,⟨-375592856505973472795103536128922019707594523939754085,-375592856505973472795103536128922019707594523939407948⟩⟩, + ⟨⟨-8177945554399593137511024101504007661217175368612240,-8177945554399593137511024101504007661217175368594019⟩,⟨-8392999233818713903335659325029274412356165928890767,-8392999233818713903335659325029274412356165928872408⟩⟩, + ⟨⟨-128047878702029558447024608804571226535666511295618,-128047878702029558447024608804571226535666511289621⟩,⟨8275798798859243122474831638958229149206588546734,8275798798859243122474831638958229149206588553315⟩⟩, + ⟨⟨744718524237767307750237309279224043013801240721,744718524237767307750237309279224043013801253758⟩,⟨769242119255326178800381109679964573913034726088,769242119255326178800381109679964573913034738932⟩⟩, + ⟨⟨-12430835044989204061337806982505716214048457084,-12430835044989204061337806982505716214048443646⟩,⟨821514333656605963160536545084804029735715529,821514333656605963160536545084804029735728968⟩⟩, + ⟨⟨-421490819810611219020949018111415182330279131,-421490819810611219020949018111415182330259322⟩,⟨-235947278139623057033390885190907679269756937,-235947278139623057033390885190907679269737128⟩⟩, + ⟨⟨-145042332391665775387664307833137949930518085,-145042332391665775387664307833137949930497043⟩,⟨-12024,10521⟩⟩, + ⟨⟨-421490819810611219020949018111415182330279131,-421490819810611219020949018111415182330259322⟩,⟨235947278139623057033390885190907679269737128,235947278139623057033390885190907679269756937⟩⟩, + ⟨⟨-12430835044989204061337806982505716214048457084,-12430835044989204061337806982505716214048443646⟩,⟨-821514333656605963160536545084804029735728968,-821514333656605963160536545084804029735715529⟩⟩, + ⟨⟨744718524237767307750237309279224043013801240721,744718524237767307750237309279224043013801253758⟩,⟨-769242119255326178800381109679964573913034738932,-769242119255326178800381109679964573913034726088⟩⟩, + ⟨⟨-128047878702029558447024608804571226535666511295618,-128047878702029558447024608804571226535666511289621⟩,⟨-8275798798859243122474831638958229149206588553315,-8275798798859243122474831638958229149206588546734⟩⟩, + ⟨⟨-8177945554399593137511024101504007661217175368612240,-8177945554399593137511024101504007661217175368594019⟩,⟨8392999233818713903335659325029274412356165928872408,8392999233818713903335659325029274412356165928890767⟩⟩, + ⟨⟨-475484148399651596729874200507675411295714083285883123,-475484148399651596729874200507675411295714083285537225⟩,⟨375592856505973472795103536128922019707594523939407948,375592856505973472795103536128922019707594523939754085⟩⟩, + ⟨⟨-16324703044208615160300487855817976382096920443197686834,-16324703044208615160300487855817976382096920443189731377⟩,⟨-1396410974909348090530859513819184996775466015991956434,-1396410974909348090530859513819184996775466015984000080⟩⟩, + ⟨⟨-88875092141480009675312640919690958752978893872387916274,-88875092141480009675312640919690958752978893872218880032⟩,⟨-223224772329181622837073717210793757671241711157184424479,-223224772329181622837073717210793757671241711157015365548⟩⟩, + ⟨⟨1625096237606761431650371096895072676972182085074278953438,1625096237606761431650371096895072676972182085075792249647⟩,⟨-1291170289159178061534317332547340417426875983741789014280,-1291170289159178061534317332547340417426875983740278616159⟩⟩, + ⟨⟨9104849962082039271838741817329495627993867787786223391332,9104849962082039271838741817329495627993867787792337678829⟩,⟨7149871750764715181643932732751664395405867893036308910169,7149871750764715181643932732751664395405867893042432095933⟩⟩, + ⟨⟨-18652456449369575819447786960219474630553290621085558999653,-18652456449369575819447786960219474630553290621060786301904⟩,⟨41335921846513618340588791570045404727473215089513533847321,41335921846513618340588791570045404727473215089538326808835⟩⟩, + ⟨⟨-132730446175133806561387864691145180857022017852501670864577,-132730446175133806561387864691145180857022017852440006860887⟩,⟨-18241673760255900856765497908695740266899079148367933923781,-18241673760255900856765497908695740266899079148306284576533⟩⟩, + ⟨⟨-67591908383776400064796163081442241477859108365109493463749,-67591908383776400064796163081442241477859108365006162154417⟩,⟨-308992643949180751769626495369599592170721491709539104995434,-308992643949180751769626495369599592170721491709435910266220⟩⟩, + ⟨⟨501148972558925730141140723011530394845458925585868857076543,501148972558925730141140723011530394845458925586133083896147⟩,⟨-373199525147645751076121012485859296499672431784780154701741,-373199525147645751076121012485859296499672431784517096892479⟩⟩, + ⟨⟨972958440844147679338411852427733549583594649252702965539842,972958440844147679338411852427733549583594649253196402315322⟩,⟨447875456988892133035239769660695201968471319636683774108280,447875456988892133035239769660695201968471319637180536510849⟩⟩] +lemma tw0_1_2_3_calc (j : Fin 31) : taylorWaveBox 0 1 2 3 j = tw0_1_2_3 j := by + revert j + decide +kernel +def tw0_1_2_4 : Fin 31 → CI := ![⟨⟨209772127687971811005691094144408213140554853363664219746771,209772127687971811005691094144408213140554853364025213746990⟩,⟨750288895764267223983561185731218508826482203223821447601370,750288895764267223983561185731218508826482203224180451902795⟩⟩, + ⟨⟨-357115567833324783668431606722982668548796363640104715177500,-357115567833324783668431606722982668548796363639910623930453⟩,⟨321157779069467320754266674832788324972963620866957673006090,321157779069467320754266674832788324972963620867152245627613⟩⟩, + ⟨⟨-231353409165200024657032053709452854226507696270568381785146,-231353409165200024657032053709452854226507696270492517898923⟩,⟨-113578649752570698060336292601813695091019449106600134727539,-113578649752570698060336292601813695091019449106524284643341⟩⟩, + ⟨⟨17466646664754235373431754364664679531177273907337551915778,17466646664754235373431754364664679531177273907392531111700⟩,⟨-114788693924985630025305971256673475391797487569456527831760,-114788693924985630025305971256673475391797487569401324839832⟩⟩, + ⟨⟨41792445753199915167690917468440529362057463924682843735482,41792445753199915167690917468440529362057463924710644397037⟩,⟨-3568039896657030884941339729460748472646379901501510697561,-3568039896657030884941339729460748472646379901473745056312⟩⟩, + ⟨⟨3063247840167838839945985933201394433162180764566572332023,3063247840167838839945985933201394433162180764573226894033⟩,⟨11051376439426356361893035904769201983316715813988510395657,11051376439426356361893035904769201983316715813995156131360⟩⟩, + ⟨⟨-1998561237310078376609959286079107689179195907947322581275,-1998561237310078376609959286079107689179195907945803352284⟩,⟨943171811181895375436852530392326335422907682501168412091,943171811181895375436852530392326335422907682502689273737⟩⟩, + ⟨⟨-169644241682746385186930980572253734841931436391762217368,-169644241682746385186930980572253734841931436391606436662⟩,⟨-217539514485450940546985959007272732149759010817699524556,-217539514485450940546985959007272732149759010817543735241⟩⟩, + ⟨⟨10194781595668886644892199461415168697548131110794757504,10194781595668886644892199461415168697548131110807292749⟩,⟨-17603458852178898317207617584127772253181814046182880452,-17603458852178898317207617584127772253181814046170331065⟩⟩, + ⟨⟨798713000118706321675216779799960007087786888216348805,798713000118706321675216779799960007087786888216850071⟩,⟨-161688457947226579246296308699973367930784289507334464,-161688457947226579246296308699973367930784289506832763⟩⟩, + ⟨⟨17058157685754859812110285818788630634161176581286410,17058157685754859812110285818788630634161176581308725⟩,⟨613595687721245739830081159456669668182086038901652,613595687721245739830081159456669668182086038922912⟩⟩, + ⟨⟨153648066385976403117045987293204273486092941820429,153648066385976403117045987293204273486092941833515⟩,⟨-130842266461528522777205049806581748987037495965745,-130842266461528522777205049806581748987037495952546⟩⟩, + ⟨⟨-1724581552160954337520370194682208426387283448638,-1724581552160954337520370194682208426387283430519⟩,⟨-532191487444429464471286291768200380740246750155,-532191487444429464471286291768200380740246733321⟩⟩, + ⟨⟨20350635853636534644475212663267152899185505704,20350635853636534644475212663267152899185534080⟩,⟨-8914321155186896453071190553639956774738482791,-8914321155186896453071190553639956774738454414⟩⟩, + ⟨⟨845022040605563187365043611609145357202416791,845022040605563187365043611609145357202452218⟩,⟨292136930389903293929485131694015957433380344,292136930389903293929485131694015957433415771⟩⟩, + ⟨⟨271998603611472725485766116989584427155620437,271998603611472725485766116989584427155659895⟩,⟨-19729,22548⟩⟩, + ⟨⟨845022040605563187365043611609145357202416791,845022040605563187365043611609145357202452218⟩,⟨-292136930389903293929485131694015957433415771,-292136930389903293929485131694015957433380344⟩⟩, + ⟨⟨20350635853636534644475212663267152899185505704,20350635853636534644475212663267152899185534080⟩,⟨8914321155186896453071190553639956774738454414,8914321155186896453071190553639956774738482791⟩⟩, + ⟨⟨-1724581552160954337520370194682208426387283448638,-1724581552160954337520370194682208426387283430519⟩,⟨532191487444429464471286291768200380740246733321,532191487444429464471286291768200380740246750155⟩⟩, + ⟨⟨153648066385976403117045987293204273486092941820429,153648066385976403117045987293204273486092941833515⟩,⟨130842266461528522777205049806581748987037495952546,130842266461528522777205049806581748987037495965745⟩⟩, + ⟨⟨17058157685754859812110285818788630634161176581286410,17058157685754859812110285818788630634161176581308725⟩,⟨-613595687721245739830081159456669668182086038922912,-613595687721245739830081159456669668182086038901652⟩⟩, + ⟨⟨798713000118706321675216779799960007087786888216348805,798713000118706321675216779799960007087786888216850071⟩,⟨161688457947226579246296308699973367930784289506832763,161688457947226579246296308699973367930784289507334464⟩⟩, + ⟨⟨10194781595668886644892199461415168697548131110794757504,10194781595668886644892199461415168697548131110807292749⟩,⟨17603458852178898317207617584127772253181814046170331065,17603458852178898317207617584127772253181814046182880452⟩⟩, + ⟨⟨-169644241682746385186930980572253734841931436391762217368,-169644241682746385186930980572253734841931436391606436662⟩,⟨217539514485450940546985959007272732149759010817543735241,217539514485450940546985959007272732149759010817699524556⟩⟩, + ⟨⟨-1998561237310078376609959286079107689179195907947322581275,-1998561237310078376609959286079107689179195907945803352284⟩,⟨-943171811181895375436852530392326335422907682502689273737,-943171811181895375436852530392326335422907682501168412091⟩⟩, + ⟨⟨3063247840167838839945985933201394433162180764566572331979,3063247840167838839945985933201394433162180764573226894076⟩,⟨-11051376439426356361893035904769201983316715813995156131447,-11051376439426356361893035904769201983316715813988510395656⟩⟩, + ⟨⟨41792445753199915167690917468440529362057463924682843735517,41792445753199915167690917468440529362057463924710644396928⟩,⟨3568039896657030884941339729460748472646379901473745056619,3568039896657030884941339729460748472646379901501510697743⟩⟩, + ⟨⟨17466646664754235373431754364664679531177273907337551915681,17466646664754235373431754364664679531177273907392531110282⟩,⟨114788693924985630025305971256673475391797487569401324840635,114788693924985630025305971256673475391797487569456527831219⟩⟩, + ⟨⟨-231353409165200024657032053709452854226507696270568381784967,-231353409165200024657032053709452854226507696270492517900443⟩,⟨113578649752570698060336292601813695091019449106524284642691,113578649752570698060336292601813695091019449106600134725189⟩⟩, + ⟨⟨-357115567833324783668431606722982668548796363640104715173462,-357115567833324783668431606722982668548796363639910623930365⟩,⟨-321157779069467320754266674832788324972963620867152245627942,-321157779069467320754266674832788324972963620866957673010356⟩⟩, + ⟨⟨209772127687971811005691094144408213140554853363664219753763,209772127687971811005691094144408213140554853364025213746983⟩,⟨-750288895764267223983561185731218508826482203224180451898208,-750288895764267223983561185731218508826482203223821447603784⟩⟩] +lemma tw0_1_2_4_calc (j : Fin 31) : taylorWaveBox 0 1 2 4 j = tw0_1_2_4 j := by + revert j + decide +kernel +def tw0_1_2_5 : Fin 31 → CI := ![⟨⟨-482557953903082655062310127674045361953977773747283351114795,-482557953903082655062310127674045361953977773747064344285543⟩,⟨55177122221131803658631299762520512392767286036474719229196,55177122221131803658631299762520512392767286036694571951619⟩⟩, + ⟨⟨-161102709020774539847470137941141812092897535268527573341912,-161102709020774539847470137941141812092897535268409369508666⟩,⟨-272351616672676832680316229041669618831159640825092562140697,-272351616672676832680316229041669618831159640824974333594838⟩⟩, + ⟨⟨115600475352480228151461533317808730881802007233948855349862,115600475352480228151461533317808730881802007234003276056909⟩,⟨-137978938303770662250799179531018516199406476441766724293035,-137978938303770662250799179531018516199406476441712193561709⟩⟩, + ⟨⟨78086498965412882340471645513293959405632635968313835678550,78086498965412882340471645513293959405632635968362059316055⟩,⟨36627059631934718939695747209718014128054375177331580958979,36627059631934718939695747209718014128054375177379538725132⟩⟩, + ⟨⟨-8341183191743017585422833880455047157803329600143886035584,-8341183191743017585422833880455047157803329600120245424791⟩,⟨32189853177733316059133400492151616722842176514369965533128,32189853177733316059133400492151616722842176514393632378192⟩⟩, + ⟨⟨-9661686736694140130182602944866419720645056395339335203930,-9661686736694140130182602944866419720645056395333952394881⟩,⟨-1213191519724586799630691336882961311612944931931661047179,-1213191519724586799630691336882961311612944931926274385571⟩⟩, + ⟨⟨35358954406797482950100525333449050288144015223818569307,35358954406797482950100525333449050288144015224996510859⟩,⟨-2016532924747447936326915984349527221756178118093706863145,-2016532924747447936326915984349527221756178118092528049565⟩⟩, + ⟨⟨269104637753299372447969143778613554226590504651812918466,269104637753299372447969143778613554226590504652018733892⟩,⟨-35935122373716261051427368698977709620300605505603124636,-35935122373716261051427368698977709620300605505397348864⟩⟩, + ⟨⟨9134590001103709618698302866006199397068501489112977978,9134590001103709618698302866006199397068501489126455621⟩,⟨19627139013482854550295905430983861430928205014185197221,19627139013482854550295905430983861430928205014198665032⟩⟩, + ⟨⟨-452648021096453322997042661618540997658178697070248407,-452648021096453322997042661618540997658178697069711816⟩,⟨823158468162937023098171422940318779404448520640265868,823158468162937023098171422940318779404448520640801850⟩⟩, + ⟨⟨-15930789738359033635985330379524023060955406769823852,-15930789738359033635985330379524023060955406769789767⟩,⟨14155633467903179382740393435991268444594090863270905,14155633467903179382740393435991268444594090863304639⟩⟩, + ⟨⟨-60572327900536198480927002021661229573888352065599,-60572327900536198480927002021661229573888352050025⟩,⟨265229968822054953343866551002183677699133372916103,265229968822054953343866551002183677699133372930685⟩⟩, + ⟨⟨2554244659032889445202608948010457419301009996955,2554244659032889445202608948010457419301010026805⟩,⟨-525632259616256534015592997171105291268286273189,-525632259616256534015592997171105291268286244553⟩⟩, + ⟨⟨-24623206825596500945730280597568496157239837100,-24623206825596500945730280597568496157239792147⟩,⟨23390533249868964099933087544344762434079516667,23390533249868964099933087544344762434079561620⟩⟩, + ⟨⟨-1401445009614641066470918742906688982578552239,-1401445009614641066470918742906688982578499763⟩,⟨-219518691356535369426671448643976801645095588,-219518691356535369426671448643976801645043112⟩⟩, + ⟨⟨-437211709042748725922310627345668214747119169,-437211709042748725922310627345668214747055743⟩,⟨-36243,31713⟩⟩, + ⟨⟨-1401445009614641066470918742906688982578552239,-1401445009614641066470918742906688982578499763⟩,⟨219518691356535369426671448643976801645043112,219518691356535369426671448643976801645095588⟩⟩, + ⟨⟨-24623206825596500945730280597568496157239837100,-24623206825596500945730280597568496157239792147⟩,⟨-23390533249868964099933087544344762434079561620,-23390533249868964099933087544344762434079516667⟩⟩, + ⟨⟨2554244659032889445202608948010457419301009996955,2554244659032889445202608948010457419301010026805⟩,⟨525632259616256534015592997171105291268286244553,525632259616256534015592997171105291268286273189⟩⟩, + ⟨⟨-60572327900536198480927002021661229573888352065599,-60572327900536198480927002021661229573888352050025⟩,⟨-265229968822054953343866551002183677699133372930685,-265229968822054953343866551002183677699133372916103⟩⟩, + ⟨⟨-15930789738359033635985330379524023060955406769823852,-15930789738359033635985330379524023060955406769789767⟩,⟨-14155633467903179382740393435991268444594090863304639,-14155633467903179382740393435991268444594090863270905⟩⟩, + ⟨⟨-452648021096453322997042661618540997658178697070248407,-452648021096453322997042661618540997658178697069711816⟩,⟨-823158468162937023098171422940318779404448520640801850,-823158468162937023098171422940318779404448520640265868⟩⟩, + ⟨⟨9134590001103709618698302866006199397068501489112977978,9134590001103709618698302866006199397068501489126455621⟩,⟨-19627139013482854550295905430983861430928205014198665032,-19627139013482854550295905430983861430928205014185197221⟩⟩, + ⟨⟨269104637753299372447969143778613554226590504651812918466,269104637753299372447969143778613554226590504652018733892⟩,⟨35935122373716261051427368698977709620300605505397348864,35935122373716261051427368698977709620300605505603124636⟩⟩, + ⟨⟨35358954406797482950100525333449050288144015223818569307,35358954406797482950100525333449050288144015224996510859⟩,⟨2016532924747447936326915984349527221756178118092528049565,2016532924747447936326915984349527221756178118093706863145⟩⟩, + ⟨⟨-9661686736694140130182602944866419720645056395339335203997,-9661686736694140130182602944866419720645056395333952394881⟩,⟨1213191519724586799630691336882961311612944931926274385552,1213191519724586799630691336882961311612944931931661047227⟩⟩, + ⟨⟨-8341183191743017585422833880455047157803329600143886035335,-8341183191743017585422833880455047157803329600120245424654⟩,⟨-32189853177733316059133400492151616722842176514393632378173,-32189853177733316059133400492151616722842176514369965533220⟩⟩, + ⟨⟨78086498965412882340471645513293959405632635968313835679382,78086498965412882340471645513293959405632635968362059315728⟩,⟨-36627059631934718939695747209718014128054375177379538724044,-36627059631934718939695747209718014128054375177331580959041⟩⟩, + ⟨⟨115600475352480228151461533317808730881802007233948855349547,115600475352480228151461533317808730881802007234003276055413⟩,⟨137978938303770662250799179531018516199406476441712193563004,137978938303770662250799179531018516199406476441766724293149⟩⟩, + ⟨⟨-161102709020774539847470137941141812092897535268527573342503,-161102709020774539847470137941141812092897535268409369511578⟩,⟨272351616672676832680316229041669618831159640824974333594971,272351616672676832680316229041669618831159640825092562138495⟩⟩, + ⟨⟨-482557953903082655062310127674045361953977773747283351112375,-482557953903082655062310127674045361953977773747064344287313⟩,⟨-55177122221131803658631299762520512392767286036694571951781,-55177122221131803658631299762520512392767286036474719233549⟩⟩] +lemma tw0_1_2_5_calc (j : Fin 31) : taylorWaveBox 0 1 2 5 j = tw0_1_2_5 j := by + revert j + decide +kernel +def tw0_1_2_6 : Fin 31 → CI := ![⟨⟨11900524030931408923852048009234009769727650601113550352375,11900524030931408923852048009234009769727650601228045366153⟩,⟨-264690119933527915199951720130648650800809610247297187521028,-264690119933527915199951720130648650800809610247182883767377⟩⟩, + ⟨⟨172224970740191979433782553487200102863843238515626142395652,172224970740191979433782553487200102863843238515688163318741⟩,⟨-60127962828185672860649848935078886260299724427460102581992,-60127962828185672860649848935078886260299724427398316490355⟩⟩, + ⟨⟨65022787704780574456865420904053673035718346143291966052536,65022787704780574456865420904053673035718346143331201321019⟩,⟨88730283432482186351636488047813274015208456891434834035636,88730283432482186351636488047813274015208456891473955297401⟩⟩, + ⟨⟨-37224743166966194508761747416485435366803199807607524901283,-37224743166966194508761747416485435366803199807573957941329⟩,⟨41917510488427530593297014687564745413622629776931568745033,41917510488427530593297014687564745413622629776965308738817⟩⟩, + ⟨⟨-19138363496464364546992225329140558519644382125972625470316,-19138363496464364546992225329140558519644382125956702634698⟩,⟨-12877064114984874100892843035638816011310974571372117142334,-12877064114984874100892843035638816011310974571356204596303⟩⟩, + ⟨⟨3596146938781908934831360303506171899927196800569303665537,3596146938781908934831360303506171899927196800572712376008⟩,⟨-6277582105249602831315927778966340813596552695661444547549,-6277582105249602831315927778966340813596552695658034556665⟩⟩, + ⟨⟨1431505393198430418984893094043578233094771157700061406229,1431505393198430418984893094043578233094771157701278727226⟩,⟨737998353235443951012538569380119466524050342483281158530,737998353235443951012538569380119466524050342484496112305⟩⟩, + ⟨⟨-90357192088509446198849593894919298933801198602360512723,-90357192088509446198849593894919298933801198602179271335⟩,⟨215623580795387565076852662606036472588709032283720614768,215623580795387565076852662606036472588709032283901877276⟩⟩, + ⟨⟨-19852171098841471048834926506508863026197597923873071153,-19852171098841471048834926506508863026197597923861457764⟩,⟨-3503420657887062943161080581060031806071179565307856833,-3503420657887062943161080581060031806071179565296248875⟩⟩, + ⟨⟨-338703568866191860774668789259422478337658026324499720,-338703568866191860774668789259422478337658026323836824⟩,⟨-884944026272197499926603712301589230500008034602382681,-884944026272197499926603712301589230500008034601720129⟩⟩, + ⟨⟨1904919080143740178024280056025858311317958317372350,1904919080143740178024280056025858311317958317403674⟩,⟨-23203683135538737840887384361598468395698422022108691,-23203683135538737840887384361598468395698422022076016⟩⟩, + ⟨⟨-129782681369631037258231115151286437604940371006167,-129782681369631037258231115151286437604940370986207⟩,⟨-293500955524652414758126491444015805389612510677722,-293500955524652414758126491444015805389612510658562⟩⟩, + ⟨⟨-2510490963960624426940966407980275938237342025861,-2510490963960624426940966407980275938237341985872⟩,⟨2137098330463528420672262927182971154767142673100,2137098330463528420672262927182971154767142713439⟩⟩, + ⟨⟨20337278754131602550523942020564563791538829110,20337278754131602550523942020564563791538884183⟩,⟨-40618846662095903137857875604758227535507712309,-40618846662095903137857875604758227535507657236⟩⟩, + ⟨⟨1968780200750177025968467661679747002195552086,1968780200750177025968467661679747002195617467⟩,⟨-43522532294424732370339562043366640629657383,-43522532294424732370339562043366640629592002⟩⟩, + ⟨⟨614928960986460413102538195511886511380281600,614928960986460413102538195511886511380370807⟩,⟨-44603,50975⟩⟩, + ⟨⟨1968780200750177025968467661679747002195552086,1968780200750177025968467661679747002195617467⟩,⟨43522532294424732370339562043366640629592002,43522532294424732370339562043366640629657383⟩⟩, + ⟨⟨20337278754131602550523942020564563791538829110,20337278754131602550523942020564563791538884183⟩,⟨40618846662095903137857875604758227535507657236,40618846662095903137857875604758227535507712309⟩⟩, + ⟨⟨-2510490963960624426940966407980275938237342025861,-2510490963960624426940966407980275938237341985872⟩,⟨-2137098330463528420672262927182971154767142713439,-2137098330463528420672262927182971154767142673100⟩⟩, + ⟨⟨-129782681369631037258231115151286437604940371006167,-129782681369631037258231115151286437604940370986207⟩,⟨293500955524652414758126491444015805389612510658562,293500955524652414758126491444015805389612510677722⟩⟩, + ⟨⟨1904919080143740178024280056025858311317958317372350,1904919080143740178024280056025858311317958317403674⟩,⟨23203683135538737840887384361598468395698422022076016,23203683135538737840887384361598468395698422022108691⟩⟩, + ⟨⟨-338703568866191860774668789259422478337658026324499720,-338703568866191860774668789259422478337658026323836824⟩,⟨884944026272197499926603712301589230500008034601720129,884944026272197499926603712301589230500008034602382681⟩⟩, + ⟨⟨-19852171098841471048834926506508863026197597923873071153,-19852171098841471048834926506508863026197597923861457764⟩,⟨3503420657887062943161080581060031806071179565296248875,3503420657887062943161080581060031806071179565307856833⟩⟩, + ⟨⟨-90357192088509446198849593894919298933801198602360512723,-90357192088509446198849593894919298933801198602179271335⟩,⟨-215623580795387565076852662606036472588709032283901877276,-215623580795387565076852662606036472588709032283720614768⟩⟩, + ⟨⟨1431505393198430418984893094043578233094771157700061406229,1431505393198430418984893094043578233094771157701278727226⟩,⟨-737998353235443951012538569380119466524050342484496112305,-737998353235443951012538569380119466524050342483281158530⟩⟩, + ⟨⟨3596146938781908934831360303506171899927196800569303665537,3596146938781908934831360303506171899927196800572712376048⟩,⟨6277582105249602831315927778966340813596552695658034556664,6277582105249602831315927778966340813596552695661444547588⟩⟩, + ⟨⟨-19138363496464364546992225329140558519644382125972625470351,-19138363496464364546992225329140558519644382125956702634800⟩,⟨12877064114984874100892843035638816011310974571356204596224,12877064114984874100892843035638816011310974571372117142177⟩⟩, + ⟨⟨-37224743166966194508761747416485435366803199807607524900612,-37224743166966194508761747416485435366803199807573957941454⟩,⟨-41917510488427530593297014687564745413622629776965308738671,-41917510488427530593297014687564745413622629776931568745683⟩⟩, + ⟨⟨65022787704780574456865420904053673035718346143291966053505,65022787704780574456865420904053673035718346143331201321151⟩,⟨-88730283432482186351636488047813274015208456891473955296548,-88730283432482186351636488047813274015208456891434834035621⟩⟩, + ⟨⟨172224970740191979433782553487200102863843238515626142395852,172224970740191979433782553487200102863843238515688163317767⟩,⟨60127962828185672860649848935078886260299724427398316492045,60127962828185672860649848935078886260299724427460102582517⟩⟩, + ⟨⟨11900524030931408923852048009234009769727650601113550352198,11900524030931408923852048009234009769727650601228045363842⟩,⟨264690119933527915199951720130648650800809610247182883768463,264690119933527915199951720130648650800809610247297187519981⟩⟩] +lemma tw0_1_2_6_calc (j : Fin 31) : taylorWaveBox 0 1 2 6 j = tw0_1_2_6 j := by + revert j + decide +kernel +def tw0_1_2_7 : Fin 31 → CI := ![⟨⟨125821773957802136597131847017136131842331918603104492326004,125821773957802136597131847017136131842331918603156272282895⟩,⟨25991482315584255235351312029225026435082549046796590044835,25991482315584255235351312029225026435082549046848311971790⟩⟩, + ⟨⟨12824301655494626917733077090606598526323361974696406632644,12824301655494626917733077090606598526323361974733703803351⟩,⟨92593872042465690625753746771494740144985629798121205322897,92593872042465690625753746771494740144985629798158733232267⟩⟩, + ⟨⟨-55237548708670330429530533753323882827568249576334633425934,-55237548708670330429530533753323882827568249576311045099604⟩,⟨22796216520353569274213419688029748239702389895438700816066,22796216520353569274213419688029748239702389895462358317800⟩⟩, + ⟨⟨-17123403977979250405777283633256649738325067592738758170406,-17123403977979250405777283633256649738325067592719272877391⟩,⟨-27492699054750774157138045813120030631631057514007162659573,-27492699054750774157138045813120030631631057513987749616099⟩⟩, + ⟨⟨11410177814182877032527343285339490807124834852682831688375,11410177814182877032527343285339490807124834852691421986987⟩,⟨-8492099302269566140751396634114914934990832379912144792899,-8492099302269566140751396634114914934990832379903555547811⟩⟩, + ⟨⟨2911493773131676535130968180957678218492643706609735814630,2911493773131676535130968180957678218492643706612667327420⟩,⟨3788295583388082019226173428143417734840455952661268856253,3788295583388082019226173428143417734840455952664196719883⟩⟩, + ⟨⟨-919454504221349894597456523247940232773024831954644887872,-919454504221349894597456523247940232773024831953738734637⟩,⟨679335824857399782543968609719544823709763901434750197986,679335824857399782543968609719544823709763901435657666069⟩⟩, + ⟨⟨-107501732092420329654515738226547508615459701714439029835,-107501732092420329654515738226547508615459701714318019717⟩,⟨-143066220930039255921604253666288133035864822480637006739,-143066220930039255921604253666288133035864822480515990213⟩⟩, + ⟨⟨11793412199958649428801126323910484141191662926807966484,11793412199958649428801126323910484141191662926820029119⟩,⟨-11804098059066901647519653700713386236968633436248745973,-11804098059066901647519653700713386236968633436236671632⟩⟩, + ⟨⟨801790060160956056556832357000672470478004263620953702,801790060160956056556832357000672470478004263621465016⟩,⟨280881304614303153856103285453329774714108098247831631,280881304614303153856103285453329774714108098248343697⟩⟩, + ⟨⟨14224884213933607275338823587654752964370313969879726,14224884213933607275338823587654752964370313969916984⟩,⟨17572389934719186996156370232246759524620268118041517,17572389934719186996156370232246759524620268118079252⟩⟩, + ⟨⟨293072572497518645661645500215583643551433245744082,293072572497518645661645500215583643551433245764994⟩,⟨165317894670802438702536931067216995519777829833547,165317894670802438702536931067216995519777829855075⟩⟩, + ⟨⟨1316615498238454799445727327246295996773028321791,1316615498238454799445727327246295996773028358159⟩,⟨-3463261580312394046863452372447719691541723191219,-3463261580312394046863452372447719691541723152438⟩⟩, + ⟨⟨-6322020294100144634120256922005767339842794793,-6322020294100144634120256922005767339842743123⟩,⟨53636619068544303363627150483608304337360345578,53636619068544303363627150483608304337360397249⟩⟩, + ⟨⟨-2381809871634261399953703511067088748176506200,-2381809871634261399953703511067088748176433516⟩,⟨481776296047333442861218926840590378066670516,481776296047333442861218926840590378066743200⟩⟩, + ⟨⟨-768786215493327599629793453828750242755641693,-768786215493327599629793453828750242755530166⟩,⟨-63729,55763⟩⟩, + ⟨⟨-2381809871634261399953703511067088748176506200,-2381809871634261399953703511067088748176433516⟩,⟨-481776296047333442861218926840590378066743200,-481776296047333442861218926840590378066670516⟩⟩, + ⟨⟨-6322020294100144634120256922005767339842794793,-6322020294100144634120256922005767339842743123⟩,⟨-53636619068544303363627150483608304337360397249,-53636619068544303363627150483608304337360345578⟩⟩, + ⟨⟨1316615498238454799445727327246295996773028321791,1316615498238454799445727327246295996773028358159⟩,⟨3463261580312394046863452372447719691541723152438,3463261580312394046863452372447719691541723191219⟩⟩, + ⟨⟨293072572497518645661645500215583643551433245744082,293072572497518645661645500215583643551433245764994⟩,⟨-165317894670802438702536931067216995519777829855075,-165317894670802438702536931067216995519777829833547⟩⟩, + ⟨⟨14224884213933607275338823587654752964370313969879726,14224884213933607275338823587654752964370313969916984⟩,⟨-17572389934719186996156370232246759524620268118079252,-17572389934719186996156370232246759524620268118041517⟩⟩, + ⟨⟨801790060160956056556832357000672470478004263620953702,801790060160956056556832357000672470478004263621465016⟩,⟨-280881304614303153856103285453329774714108098248343697,-280881304614303153856103285453329774714108098247831631⟩⟩, + ⟨⟨11793412199958649428801126323910484141191662926807966484,11793412199958649428801126323910484141191662926820029119⟩,⟨11804098059066901647519653700713386236968633436236671632,11804098059066901647519653700713386236968633436248745973⟩⟩, + ⟨⟨-107501732092420329654515738226547508615459701714439029835,-107501732092420329654515738226547508615459701714318019717⟩,⟨143066220930039255921604253666288133035864822480515990213,143066220930039255921604253666288133035864822480637006739⟩⟩, + ⟨⟨-919454504221349894597456523247940232773024831954644887872,-919454504221349894597456523247940232773024831953738734637⟩,⟨-679335824857399782543968609719544823709763901435657666068,-679335824857399782543968609719544823709763901434750197986⟩⟩, + ⟨⟨2911493773131676535130968180957678218492643706609735814620,2911493773131676535130968180957678218492643706612667327443⟩,⟨-3788295583388082019226173428143417734840455952664196719917,-3788295583388082019226173428143417734840455952661268856253⟩⟩, + ⟨⟨11410177814182877032527343285339490807124834852682831688342,11410177814182877032527343285339490807124834852691421986912⟩,⟨8492099302269566140751396634114914934990832379903555547890,8492099302269566140751396634114914934990832379912144792948⟩⟩, + ⟨⟨-17123403977979250405777283633256649738325067592738758170367,-17123403977979250405777283633256649738325067592719272877799⟩,⟨27492699054750774157138045813120030631631057513987749616214,27492699054750774157138045813120030631631057514007162659238⟩⟩, + ⟨⟨-55237548708670330429530533753323882827568249576334633425530,-55237548708670330429530533753323882827568249576311045099692⟩,⟨-22796216520353569274213419688029748239702389895462358317901,-22796216520353569274213419688029748239702389895438700816658⟩⟩, + ⟨⟨12824301655494626917733077090606598526323361974696406633590,12824301655494626917733077090606598526323361974733703803596⟩,⟨-92593872042465690625753746771494740144985629798158733231832,-92593872042465690625753746771494740144985629798121205323167⟩⟩, + ⟨⟨125821773957802136597131847017136131842331918603104492326576,125821773957802136597131847017136131842331918603156272282532⟩,⟨-25991482315584255235351312029225026435082549046848311970729,-25991482315584255235351312029225026435082549046796590044708⟩⟩] +lemma tw0_1_2_7_calc (j : Fin 31) : taylorWaveBox 0 1 2 7 j = tw0_1_2_7 j := by + revert j + decide +kernel +def tw0_1_2_8 : Fin 31 → CI := ![⟨⟨-19882247215941396482775222304266689129826619872840630951680,-19882247215941396482775222304266689129826619872819566866987⟩,⟨52425888236029822162176167557280487936381118417450103138830,52425888236029822162176167557280487936381118417471264000958⟩⟩, + ⟨⟨-43031744022576798373952526784768996458095848548644305346313,-43031744022576798373952526784768996458095848548624844234451⟩,⟨-2612849689254453836630431162085718386559909680978518956186,-2612849689254453836630431162085718386559909680959189777366⟩⟩, + ⟨⟨-4377137123299998313054138408066392211506074354840866425028,-4377137123299998313054138408066392211506074354828604957749⟩,⟨-28885076531996030685162716879388413003013979759540033827030,-28885076531996030685162716879388413003013979759527802545368⟩⟩, + ⟨⟨16234019032893202046554056590992014846117508248541766576976,16234019032893202046554056590992014846117508248551186677404⟩,⟨-4483410467545725509150736920844568261593956159469059230093,-4483410467545725509150736920844568261593956159459625958211⟩⟩, + ⟨⟨2340921911345211560125348727254602105049412223534106920778,2340921911345211560125348727254602105049412223539566031613⟩,⟨7538223003464039645755627820010155910344247437254157849339,7538223003464039645755627820010155910344247437259622015277⟩⟩, + ⟨⟨-2744409206362732424042744453426917610377368134732967095884,-2744409206362732424042744453426917610377368134731014898942⟩,⟨729954622158497369718476518352018116304331820397439057862,729954622158497369718476518352018116304331820399393406251⟩⟩, + ⟨⟨-129206631544907624364201657109383210062569074422209899086,-129206631544907624364201657109383210062569074421699641257⟩,⟨-718794923764175278799123616707804212760761734614436090975,-718794923764175278799123616707804212760761734613925916730⟩⟩, + ⟨⟨122469889326188555366343200205172785264242045921546289073,122469889326188555366343200205172785264242045921657467444⟩,⟨-14125756803455364253654052178978826512735022899696650120,-14125756803455364253654052178978826512735022899585489614⟩⟩, + ⟨⟨2171325978488797191004612952470286987969144496356568232,2171325978488797191004612952470286987969144496364917952⟩,⟨12239064423179834476151073966891737787308209087734681602,12239064423179834476151073966891737787308209087743029216⟩⟩, + ⟨⟨-591026827387640107975132395357380925923034592798759293,-591026827387640107975132395357380925923034592798189778⟩,⟨347358464608203773775210856906893055280706359641758933,347358464608203773775210856906893055280706359642328572⟩⟩, + ⟨⟨-19597627544096545000656518606309828610026692433960862,-19597627544096545000656518606309828610026692433930164⟩,⟨-2519664935535887386036850549449983215396785536351209,-2519664935535887386036850549449983215396785536321579⟩⟩, + ⟨⟨-314959562321874008926224332266988492643420144260438,-314959562321874008926224332266988492643420144244667⟩,⟨40303368908801780290538106392755755422724433022730,40303368908801780290538106392755755422724433039840⟩⟩, + ⟨⟨519146371031639056948095086975805112992584554887,519146371031639056948095086975805112992584594655⟩,⟨3711257257849915143923473175721556433068806783205,3711257257849915143923473175721556433068806824969⟩⟩, + ⟨⟨-13149220568067957909286427891522610231363073336,-13149220568067957909286427891522610231363004559⟩,⟨-56274559516119453409677365902475365271523133602,-56274559516119453409677365902475365271523064825⟩⟩, + ⟨⟨2509201052057278686374733082835725048878420457,2509201052057278686374733082835725048878513426⟩,⟨-993657079421098604824819436463380133361174406,-993657079421098604824819436463380133361081437⟩⟩, + ⟨⟨865025156346490420908704701869872876738673235,865025156346490420908704701869872876738798723⟩,⟨-62744,71707⟩⟩, + ⟨⟨2509201052057278686374733082835725048878420457,2509201052057278686374733082835725048878513426⟩,⟨993657079421098604824819436463380133361081437,993657079421098604824819436463380133361174406⟩⟩, + ⟨⟨-13149220568067957909286427891522610231363073336,-13149220568067957909286427891522610231363004559⟩,⟨56274559516119453409677365902475365271523064825,56274559516119453409677365902475365271523133602⟩⟩, + ⟨⟨519146371031639056948095086975805112992584554887,519146371031639056948095086975805112992584594655⟩,⟨-3711257257849915143923473175721556433068806824969,-3711257257849915143923473175721556433068806783205⟩⟩, + ⟨⟨-314959562321874008926224332266988492643420144260438,-314959562321874008926224332266988492643420144244667⟩,⟨-40303368908801780290538106392755755422724433039840,-40303368908801780290538106392755755422724433022730⟩⟩, + ⟨⟨-19597627544096545000656518606309828610026692433960862,-19597627544096545000656518606309828610026692433930164⟩,⟨2519664935535887386036850549449983215396785536321579,2519664935535887386036850549449983215396785536351209⟩⟩, + ⟨⟨-591026827387640107975132395357380925923034592798759293,-591026827387640107975132395357380925923034592798189778⟩,⟨-347358464608203773775210856906893055280706359642328572,-347358464608203773775210856906893055280706359641758933⟩⟩, + ⟨⟨2171325978488797191004612952470286987969144496356568232,2171325978488797191004612952470286987969144496364917952⟩,⟨-12239064423179834476151073966891737787308209087743029216,-12239064423179834476151073966891737787308209087734681602⟩⟩, + ⟨⟨122469889326188555366343200205172785264242045921546289073,122469889326188555366343200205172785264242045921657467444⟩,⟨14125756803455364253654052178978826512735022899585489614,14125756803455364253654052178978826512735022899696650120⟩⟩, + ⟨⟨-129206631544907624364201657109383210062569074422209899086,-129206631544907624364201657109383210062569074421699641258⟩,⟨718794923764175278799123616707804212760761734613925916730,718794923764175278799123616707804212760761734614436090975⟩⟩, + ⟨⟨-2744409206362732424042744453426917610377368134732967095905,-2744409206362732424042744453426917610377368134731014898941⟩,⟨-729954622158497369718476518352018116304331820399393406262,-729954622158497369718476518352018116304331820397439057851⟩⟩, + ⟨⟨2340921911345211560125348727254602105049412223534106920831,2340921911345211560125348727254602105049412223539566031647⟩,⟨-7538223003464039645755627820010155910344247437259622015247,-7538223003464039645755627820010155910344247437254157849335⟩⟩, + ⟨⟨16234019032893202046554056590992014846117508248541766577053,16234019032893202046554056590992014846117508248551186677272⟩,⟨4483410467545725509150736920844568261593956159459625958423,4483410467545725509150736920844568261593956159469059230098⟩⟩, + ⟨⟨-4377137123299998313054138408066392211506074354840866425089,-4377137123299998313054138408066392211506074354828604958054⟩,⟨28885076531996030685162716879388413003013979759527802545456,28885076531996030685162716879388413003013979759540033826873⟩⟩, + ⟨⟨-43031744022576798373952526784768996458095848548644305346150,-43031744022576798373952526784768996458095848548624844234647⟩,⟨2612849689254453836630431162085718386559909680959189777268,2612849689254453836630431162085718386559909680978518955730⟩⟩, + ⟨⟨-19882247215941396482775222304266689129826619872840630951248,-19882247215941396482775222304266689129826619872819566866921⟩,⟨-52425888236029822162176167557280487936381118417471264000861,-52425888236029822162176167557280487936381118417450103139099⟩⟩] +lemma tw0_1_2_8_calc (j : Fin 31) : taylorWaveBox 0 1 2 8 j = tw0_1_2_8 j := by + revert j + decide +kernel +def tw0_1_2_9 : Fin 31 → CI := ![⟨⟨-19290496925825658905216874034140707623436644761781033011983,-19290496925825658905216874034140707623436644761771389301709⟩,⟨-11077440023762451293038138642885432111845394804590356096480,-11077440023762451293038138642885432111845394804580778985285⟩⟩, + ⟨⟨4627731647246088010872487427793631345159530156001770701378,4627731647246088010872487427793631345159530156010547800822⟩,⟨-17472409366182579900516692433305869307847584962687813985923,-17472409366182579900516692433305869307847584962678980012934⟩⟩, + ⟨⟨12931317481077123930951460184141434368321319158829537595113,12931317481077123930951460184141434368321319158835089671139⟩,⟨1175019933907329320177475342986428508762684785673201872215,1175019933907329320177475342986428508762684785678763274055⟩⟩, + ⟨⟨-144300704205998461126824568657936018848908809667944789818,-144300704205998461126824568657936018848908809663964090772⟩,⟨7959944462570256099022046474549017432614849617881700572746,7959944462570256099022046474549017432614849617885689271033⟩⟩, + ⟨⟨-3979371461467735027785994942558617143060038618680045583695,-3979371461467735027785994942558617143060038618676814406123⟩,⟨-149767132174210785648251250310918416426052632548547763738,-149767132174210785648251250310918416426052632545319996441⟩⟩, + ⟨⟨207052646338233458087067286191242983925534255504106953095,207052646338233458087067286191242983925534255505169166899⟩,⟨-1520432477186352525458242140035416429505188785767335957804,-1520432477186352525458242140035416429505188785766274325644⟩⟩, + ⟨⟨407548831224235706763773591334838756784782255617938829575,407548831224235706763773591334838756784782255618288795717⟩,⟨117463552657470624482329903519539482244806204075443305523,117463552657470624482329903519539482244806204075792787723⟩⟩, + ⟨⟨-31111087259019043761658634528289824028322723302882206739,-31111087259019043761658634528289824028322723302807744175⟩,⟨70662709196179037428755834180037756843034928955622499730,70662709196179037428755834180037756843034928955696968957⟩⟩, + ⟨⟨-7635180239040899199059421497901555693142176138090862788,-7635180239040899199059421497901555693142176138084005707⟩,⟨-3545050098977522438422854977466941074224123989869741386,-3545050098977522438422854977466941074224123989862889267⟩⟩, + ⟨⟨85654466095755793162644113019496819630832227157064556,85654466095755793162644113019496819630832227157474660⟩,⟨-495551342297121040910460652733419632106431268879430206,-495551342297121040910460652733419632106431268879020533⟩⟩, + ⟨⟨12642829851227945170960854713460179652842078793322976,12642829851227945170960854713460179652842078793351482⟩,⟨-9306501681478368502180013135413019964894230167392520,-9306501681478368502180013135413019964894230167364418⟩⟩, + ⟨⟨195911457347242293926184590177561276397653388668648,195911457347242293926184590177561276397653388686486⟩,⟨-189262149398884168207842813219595582843498613174190,-189262149398884168207842813219595582843498613156316⟩⟩, + ⟨⟨-2061180717629316026141272856694373236576733460241,-2061180717629316026141272856694373236576733418052⟩,⟨-2761127312613272612645601321260891904492392290367,-2761127312613272612645601321260891904492392248287⟩⟩, + ⟨⟨30638935862757787599666431891242927582315867073,30638935862757787599666431891242927582315941212⟩,⟨47132895461967576232274006572641618226679615021,47132895461967576232274006572641618226679689159⟩⟩, + ⟨⟨-2316447930813799461013017149377425599108482907,-2316447930813799461013017149377425599108379627⟩,⟨1434722602565404261864948925604738319768224128,1434722602565404261864948925604738319768327408⟩⟩, + ⟨⟨-884828703211793925234648884493177923305016217,-884828703211793925234648884493177923304887857⟩,⟨-73349,64180⟩⟩, + ⟨⟨-2316447930813799461013017149377425599108482907,-2316447930813799461013017149377425599108379627⟩,⟨-1434722602565404261864948925604738319768327408,-1434722602565404261864948925604738319768224128⟩⟩, + ⟨⟨30638935862757787599666431891242927582315867073,30638935862757787599666431891242927582315941212⟩,⟨-47132895461967576232274006572641618226679689159,-47132895461967576232274006572641618226679615021⟩⟩, + ⟨⟨-2061180717629316026141272856694373236576733460241,-2061180717629316026141272856694373236576733418052⟩,⟨2761127312613272612645601321260891904492392248287,2761127312613272612645601321260891904492392290367⟩⟩, + ⟨⟨195911457347242293926184590177561276397653388668648,195911457347242293926184590177561276397653388686486⟩,⟨189262149398884168207842813219595582843498613156316,189262149398884168207842813219595582843498613174190⟩⟩, + ⟨⟨12642829851227945170960854713460179652842078793322976,12642829851227945170960854713460179652842078793351482⟩,⟨9306501681478368502180013135413019964894230167364418,9306501681478368502180013135413019964894230167392520⟩⟩, + ⟨⟨85654466095755793162644113019496819630832227157064556,85654466095755793162644113019496819630832227157474660⟩,⟨495551342297121040910460652733419632106431268879020533,495551342297121040910460652733419632106431268879430206⟩⟩, + ⟨⟨-7635180239040899199059421497901555693142176138090862788,-7635180239040899199059421497901555693142176138084005707⟩,⟨3545050098977522438422854977466941074224123989862889267,3545050098977522438422854977466941074224123989869741386⟩⟩, + ⟨⟨-31111087259019043761658634528289824028322723302882206739,-31111087259019043761658634528289824028322723302807744175⟩,⟨-70662709196179037428755834180037756843034928955696968957,-70662709196179037428755834180037756843034928955622499730⟩⟩, + ⟨⟨407548831224235706763773591334838756784782255617938829575,407548831224235706763773591334838756784782255618288795717⟩,⟨-117463552657470624482329903519539482244806204075792787723,-117463552657470624482329903519539482244806204075443305523⟩⟩, + ⟨⟨207052646338233458087067286191242983925534255504106953092,207052646338233458087067286191242983925534255505169166906⟩,⟨1520432477186352525458242140035416429505188785766274325644,1520432477186352525458242140035416429505188785767335957814⟩⟩, + ⟨⟨-3979371461467735027785994942558617143060038618680045583688,-3979371461467735027785994942558617143060038618676814406129⟩,⟨149767132174210785648251250310918416426052632545319996423,149767132174210785648251250310918416426052632548547763708⟩⟩, + ⟨⟨-144300704205998461126824568657936018848908809667944789725,-144300704205998461126824568657936018848908809663964090760⟩,⟨-7959944462570256099022046474549017432614849617885689270993,-7959944462570256099022046474549017432614849617881700572790⟩⟩, + ⟨⟨12931317481077123930951460184141434368321319158829537595170,12931317481077123930951460184141434368321319158835089671092⟩,⟨-1175019933907329320177475342986428508762684785678763273920,-1175019933907329320177475342986428508762684785673201872184⟩⟩, + ⟨⟨4627731647246088010872487427793631345159530156001770701345,4627731647246088010872487427793631345159530156010547800630⟩,⟨17472409366182579900516692433305869307847584962678980013043,17472409366182579900516692433305869307847584962687813985873⟩⟩, + ⟨⟨-19290496925825658905216874034140707623436644761781033011950,-19290496925825658905216874034140707623436644761771389301841⟩,⟨11077440023762451293038138642885432111845394804580778985276,11077440023762451293038138642885432111845394804590356096306⟩⟩] +lemma tw0_1_2_9_calc (j : Fin 31) : taylorWaveBox 0 1 2 9 j = tw0_1_2_9 j := by + revert j + decide +kernel +def tw0_1_2_10 : Fin 31 → CI := ![⟨⟨5087160941318035030281029500430121952895127167055204921998,5087160941318035030281029500430121952895127167059074998755⟩,⟨-6290276246015560604142115753665349961681280241329790698384,-6290276246015560604142115753665349961681280241325890124939⟩⟩, + ⟨⟨6233199993135337742925596895075494879096079110153258913910,6233199993135337742925596895075494879096079110156822170337⟩,⟨3066400435093601076501615720597784318900744981930537462795,3066400435093601076501615720597784318900744981934081218139⟩⟩, + ⟨⟨-1722362093409499810635797393334676863631275633105415653526,-1722362093409499810635797393334676863631275633103177109279⟩,⟨5001870997405396782094771075431510316613138034656255403243,5001870997405396782094771075431510316613138034658492541217⟩⟩, + ⟨⟨-3289793739456526452152123690650101193410437664460136629841,-3289793739456526452152123690650101193410437664457996127056⟩,⟨-1038270882743691680329009901675975872224219850900262484070,-1038270882743691680329009901675975872224219850898131544417⟩⟩, + ⟨⟨676813122864297036497927936396425211222079040014006875570,676813122864297036497927936396425211222079040015605145987⟩,⟨-1712718382894777665695359053809507138661606945251462413279,-1712718382894777665695359053809507138661606945249862872604⟩⟩, + ⟨⟨655512498542966782270563107568218699593254092675523090279,655512498542966782270563107568218699593254092676024731902⟩,⟨384653006693285690600523819270752660083086121276516439152,384653006693285690600523819270752660083086121277017932553⟩⟩, + ⟨⟨-152098967600303524032621254118288854194261925911907198806,-152098967600303524032621254118288854194261925911689650627⟩,⟨166882978852455293873412372291463189953895936232104947912,166882978852455293873412372291463189953895936232322803268⟩⟩, + ⟨⟨-25987345733680358071870192748591181123445298767198912867,-25987345733680358071870192748591181123445298767156865966⟩,⟨-35906616896262660785267505168571350377807848789382051476,-35906616896262660785267505168571350377807848789340002787⟩⟩, + ⟨⟨4519833793521752885227418557286226118279487918801633656,4519833793521752885227418557286226118279487918806524859⟩,⟨-2623063905117961459218396859605799462675726455573804434,-2623063905117961459218396859605799462675726455568910493⟩⟩, + ⟨⟨217117034442353509419170506032121825126496572757745626,217117034442353509419170506032121825126496572758108285⟩,⟨259269866685910288410015424349149808824611463543648651,259269866685910288410015424349149808824611463544011333⟩⟩, + ⟨⟨-1977439705406482827490513348372091570603071723541101,-1977439705406482827490513348372091570603071723520927⟩,⟨11261232173024360610268853195200162103825044766269247,11261232173024360610268853195200162103825044766289993⟩⟩, + ⟨⟨-34507248612321472284045861160574985324709033229116,-34507248612321472284045861160574985324709033217237⟩,⟨211413546463510714217205495848657722044157315609686,211413546463510714217205495848657722044157315620708⟩⟩, + ⟨⟨2643061569015859038493512692353537051466363475271,2643061569015859038493512692353537051466363506787⟩,⟨1203423464588831074930121666110530234682081531076,1203423464588831074930121666110530234682081560884⟩⟩, + ⟨⟨-39981178696099500403872785361040714635954132887,-39981178696099500403872785361040714635954068201⟩,⟨-30237280849202213288452541597807887301256674293,-30237280849202213288452541597807887301256609607⟩⟩, + ⟨⟨1875754246220568990281770969270374870016990801,1875754246220568990281770969270374870017092097⟩,⟨-1685458359157545654689340863810308746956452595,-1685458359157545654689340863810308746956351298⟩⟩, + ⟨⟨829661822656911974387374381147178496402390535,829661822656911974387374381147178496402510892⟩,⟨-60179,68776⟩⟩, + ⟨⟨1875754246220568990281770969270374870016990801,1875754246220568990281770969270374870017092097⟩,⟨1685458359157545654689340863810308746956351298,1685458359157545654689340863810308746956452595⟩⟩, + ⟨⟨-39981178696099500403872785361040714635954132887,-39981178696099500403872785361040714635954068201⟩,⟨30237280849202213288452541597807887301256609607,30237280849202213288452541597807887301256674293⟩⟩, + ⟨⟨2643061569015859038493512692353537051466363475271,2643061569015859038493512692353537051466363506787⟩,⟨-1203423464588831074930121666110530234682081560884,-1203423464588831074930121666110530234682081531076⟩⟩, + ⟨⟨-34507248612321472284045861160574985324709033229116,-34507248612321472284045861160574985324709033217237⟩,⟨-211413546463510714217205495848657722044157315620708,-211413546463510714217205495848657722044157315609686⟩⟩, + ⟨⟨-1977439705406482827490513348372091570603071723541101,-1977439705406482827490513348372091570603071723520927⟩,⟨-11261232173024360610268853195200162103825044766289993,-11261232173024360610268853195200162103825044766269247⟩⟩, + ⟨⟨217117034442353509419170506032121825126496572757745626,217117034442353509419170506032121825126496572758108285⟩,⟨-259269866685910288410015424349149808824611463544011333,-259269866685910288410015424349149808824611463543648651⟩⟩, + ⟨⟨4519833793521752885227418557286226118279487918801633656,4519833793521752885227418557286226118279487918806524859⟩,⟨2623063905117961459218396859605799462675726455568910493,2623063905117961459218396859605799462675726455573804434⟩⟩, + ⟨⟨-25987345733680358071870192748591181123445298767198912867,-25987345733680358071870192748591181123445298767156865966⟩,⟨35906616896262660785267505168571350377807848789340002787,35906616896262660785267505168571350377807848789382051476⟩⟩, + ⟨⟨-152098967600303524032621254118288854194261925911907198805,-152098967600303524032621254118288854194261925911689650627⟩,⟨-166882978852455293873412372291463189953895936232322803268,-166882978852455293873412372291463189953895936232104947912⟩⟩, + ⟨⟨655512498542966782270563107568218699593254092675523090278,655512498542966782270563107568218699593254092676024731906⟩,⟨-384653006693285690600523819270752660083086121277017932557,-384653006693285690600523819270752660083086121276516439152⟩⟩, + ⟨⟨676813122864297036497927936396425211222079040014006875562,676813122864297036497927936396425211222079040015605145974⟩,⟨1712718382894777665695359053809507138661606945249862872611,1712718382894777665695359053809507138661606945251462413279⟩⟩, + ⟨⟨-3289793739456526452152123690650101193410437664460136629826,-3289793739456526452152123690650101193410437664457996127086⟩,⟨1038270882743691680329009901675975872224219850898131544417,1038270882743691680329009901675975872224219850900262484027⟩⟩, + ⟨⟨-1722362093409499810635797393334676863631275633105415653475,-1722362093409499810635797393334676863631275633103177109266⟩,⟨-5001870997405396782094771075431510316613138034658492541208,-5001870997405396782094771075431510316613138034656255403272⟩⟩, + ⟨⟨6233199993135337742925596895075494879096079110153258913960,6233199993135337742925596895075494879096079110156822170326⟩,⟨-3066400435093601076501615720597784318900744981934081218068,-3066400435093601076501615720597784318900744981930537462786⟩⟩, + ⟨⟨5087160941318035030281029500430121952895127167055204922001,5087160941318035030281029500430121952895127167059074998692⟩,⟨6290276246015560604142115753665349961681280241325890124995,6290276246015560604142115753665349961681280241329790698374⟩⟩] +lemma tw0_1_2_10_calc (j : Fin 31) : taylorWaveBox 0 1 2 10 j = tw0_1_2_10 j := by + revert j + decide +kernel +def tw0_1_2_11 : Fin 31 → CI := ![⟨⟨1815071828396094495686677013141852683286316146177570489920,1815071828396094495686677013141852683286316146178989829303⟩,⟨2020161708508584267478809258567591737646487021232082831876,2020161708508584267478809258567591737646487021233491022759⟩⟩, + ⟨⟨-1502095568632989881412401725096561260620302060026689206752,-1502095568632989881412401725096561260620302060025402565879⟩,⟨1953702129034379095658311715915388950403234229180372527648,1953702129034379095658311715915388950403234229181664396050⟩⟩, + ⟨⟨-1672105595044178659484877825907499007972602524015957561869,-1672105595044178659484877825907499007972602524015147553344⟩,⟨-1077996803195872845485124503025984654416957597492263677806,-1077996803195872845485124503025984654416957597491454210698⟩⟩, + ⟨⟨771464807648913588377985728849565595980506927843342422200,771464807648913588377985728849565595980506927844311681001⟩,⟨-1144036151338464532007231095400310588849217045716230328466,-1144036151338464532007231095400310588849217045715256585381⟩⟩, + ⟨⟨593589964963280000600685013891615030424199658280521052593,593589964963280000600685013891615030424199658281201569785⟩,⟨515444044872126444770233665839821893111611561729570888023,515444044872126444770233665839821893111611561730251192573⟩⟩, + ⟨⟨-277718117378040011376144425816371100038347702218711248911,-277718117378040011376144425816371100038347702218413597673⟩,⟨208867390288830421485457878400158681037818086035233608128,208867390288830421485457878400158681037818086035531525585⟩⟩, + ⟨⟨-40459901615783187250419616208271281362348856996698246015,-40459901615783187250419616208271281362348856996589264356⟩,⟨-103319787416861743069034485777282565025900029276882328657,-103319787416861743069034485777282565025900029276773412450⟩⟩, + ⟨⟨23378217620205528191081761581099896969067318358281328536,23378217620205528191081761581099896969067318358311058148⟩,⟨-2272841729791400523888683548322794393267591715487156058,-2272841729791400523888683548322794393267591715457429822⟩⟩, + ⟨⟨-252522767268069475644153369202268531952173181840451522,-252522767268069475644153369202268531952173181837582299⟩,⟨2983932231749006419876207186427438818238485642150406260,2983932231749006419876207186427438818238485642153275958⟩⟩, + ⟨⟨-209907150705014678091342630623635789753464899556658132,-209907150705014678091342630623635789753464899556401021⟩,⟨-1123749354334674400003099065081396302859070967124878,-1123749354334674400003099065081396302859070966867615⟩⟩, + ⟨⟨-4267526737540852177826218441387136775439169049016693,-4267526737540852177826218441387136775439169049000631⟩,⟨-6393082253340496737342227457945894241650135462708897,-6393082253340496737342227457945894241650135462692603⟩⟩, + ⟨⟨-71675978301478048462866268824617018570674646270043,-71675978301478048462866268824617018570674646260123⟩,⟨-137989864802845173263117382080283598801172250171875,-137989864802845173263117382080283598801172250162279⟩⟩, + ⟨⟨-2253105010927926008285469552430132272338382456542,-2253105010927926008285469552430132272338382432144⟩,⟨169323851026087168928668986321857504947624914940,169323851026087168928668986321857504947624937987⟩⟩, + ⟨⟨39409645349386130537628948966357194030034986122,39409645349386130537628948966357194030035031852⟩,⟨12218620947869501927978421476943441362867603087,12218620947869501927978421476943441362867648818⟩⟩, + ⟨⟨-1323077500325592679926269342345839902748187182,-1323077500325592679926269342345839902748098483⟩,⟨1700179232467595801688033060680804765773053971,1700179232467595801688033060680804765773142670⟩⟩, + ⟨⟨-718093348264853539404394477506600340227435403,-718093348264853539404394477506600340227331231⟩,⟨-59527,52086⟩⟩, + ⟨⟨-1323077500325592679926269342345839902748187182,-1323077500325592679926269342345839902748098483⟩,⟨-1700179232467595801688033060680804765773142670,-1700179232467595801688033060680804765773053971⟩⟩, + ⟨⟨39409645349386130537628948966357194030034986122,39409645349386130537628948966357194030035031852⟩,⟨-12218620947869501927978421476943441362867648818,-12218620947869501927978421476943441362867603087⟩⟩, + ⟨⟨-2253105010927926008285469552430132272338382456542,-2253105010927926008285469552430132272338382432144⟩,⟨-169323851026087168928668986321857504947624937987,-169323851026087168928668986321857504947624914940⟩⟩, + ⟨⟨-71675978301478048462866268824617018570674646270043,-71675978301478048462866268824617018570674646260123⟩,⟨137989864802845173263117382080283598801172250162279,137989864802845173263117382080283598801172250171875⟩⟩, + ⟨⟨-4267526737540852177826218441387136775439169049016693,-4267526737540852177826218441387136775439169049000631⟩,⟨6393082253340496737342227457945894241650135462692603,6393082253340496737342227457945894241650135462708897⟩⟩, + ⟨⟨-209907150705014678091342630623635789753464899556658132,-209907150705014678091342630623635789753464899556401021⟩,⟨1123749354334674400003099065081396302859070966867615,1123749354334674400003099065081396302859070967124878⟩⟩, + ⟨⟨-252522767268069475644153369202268531952173181840451522,-252522767268069475644153369202268531952173181837582299⟩,⟨-2983932231749006419876207186427438818238485642153275958,-2983932231749006419876207186427438818238485642150406260⟩⟩, + ⟨⟨23378217620205528191081761581099896969067318358281328536,23378217620205528191081761581099896969067318358311058148⟩,⟨2272841729791400523888683548322794393267591715457429822,2272841729791400523888683548322794393267591715487156058⟩⟩, + ⟨⟨-40459901615783187250419616208271281362348856996698246015,-40459901615783187250419616208271281362348856996589264356⟩,⟨103319787416861743069034485777282565025900029276773412450,103319787416861743069034485777282565025900029276882328657⟩⟩, + ⟨⟨-277718117378040011376144425816371100038347702218711248913,-277718117378040011376144425816371100038347702218413597673⟩,⟨-208867390288830421485457878400158681037818086035531525586,-208867390288830421485457878400158681037818086035233608127⟩⟩, + ⟨⟨593589964963280000600685013891615030424199658280521052597,593589964963280000600685013891615030424199658281201569787⟩,⟨-515444044872126444770233665839821893111611561730251192568,-515444044872126444770233665839821893111611561729570888020⟩⟩, + ⟨⟨771464807648913588377985728849565595980506927843342422202,771464807648913588377985728849565595980506927844311680984⟩,⟨1144036151338464532007231095400310588849217045715256585396,1144036151338464532007231095400310588849217045716230328461⟩⟩, + ⟨⟨-1672105595044178659484877825907499007972602524015957561870,-1672105595044178659484877825907499007972602524015147553356⟩,⟨1077996803195872845485124503025984654416957597491454210693,1077996803195872845485124503025984654416957597492263677789⟩⟩, + ⟨⟨-1502095568632989881412401725096561260620302060026689206729,-1502095568632989881412401725096561260620302060025402565878⟩,⟨-1953702129034379095658311715915388950403234229181664396048,-1953702129034379095658311715915388950403234229180372527669⟩⟩, + ⟨⟨1815071828396094495686677013141852683286316146177570489941,1815071828396094495686677013141852683286316146178989829301⟩,⟨-2020161708508584267478809258567591737646487021233491022739,-2020161708508584267478809258567591737646487021232082831879⟩⟩] +lemma tw0_1_2_11_calc (j : Fin 31) : taylorWaveBox 0 1 2 11 j = tw0_1_2_11 j := by + revert j + decide +kernel +def tw0_1_2_12 : Fin 31 → CI := ![⟨⟨-711268101510143168710598842821575733226375871983584701505,-711268101510143168710598842821575733226375871983118658207⟩,⟨459113559499151407020541792926688212964880775851923816442,459113559499151407020541792926688212964880775852393288793⟩⟩, + ⟨⟨-533515866641141234362665052374610103595565928521541543115,-533515866641141234362665052374610103595565928521116622497⟩,⟨-611898544798982277166236577046803402317303518350974108257,-611898544798982277166236577046803402317303518350550134676⟩⟩, + ⟨⟨504941060195068326742279488076645537574269912044938915396,504941060195068326742279488076645537574269912045279905976⟩,⟨-477190849052075923015475161027782010335524675541375475166,-477190849052075923015475161027782010335524675541033885757⟩⟩, + ⟨⟨326190388157903100119902699049705647344083787951002159978,326190388157903100119902699049705647344083787951388577719⟩,⟨395286149823302284782887093335003277923297134216663808414,395286149823302284782887093335003277923297134217048820124⟩⟩, + ⟨⟨-270892511610958191315672440536687869719806469918248472156,-270892511610958191315672440536687869719806469917986262707⟩,⟨154035613449585876827932344045844950742316611049859369763,154035613449585876827932344045844950742316611050121490954⟩⟩, + ⟨⟨-36431631915188708878738988216824787866640042260348873311,-36431631915188708878738988216824787866640042260200714704⟩,⟨-142960465184212379752526415073347531476390500918081833583,-142960465184212379752526415073347531476390500917933785534⟩⟩, + ⟨⟨50448361114437571328979545967501188635398106889264973235,50448361114437571328979545967501188635398106889317372572⟩,⟨4309975555824179399768827486150106624197816397296763254,4309975555824179399768827486150106624197816397349131418⟩⟩, + ⟨⟨-4846082264468684018624138836487714172120580700842359601,-4846082264468684018624138836487714172120580700825543343⟩,⟨10493017894540719668434994451581039551898607634430716237,10493017894540719668434994451581039551898607634447533446⟩⟩, + ⟨⟨-1224161686764321941762989547234059579366767229841721231,-1224161686764321941762989547234059579366767229839651489⟩,⟨-1020044495151783957451517086600663547660945454317988258,-1020044495151783957451517086600663547660945454315919718⟩⟩, + ⟨⟨78666953884606784244565566804533559484732868371307490,78666953884606784244565566804533559484732868371494915⟩,⟨-91922323010580650473189207928431468499520213120269474,-91922323010580650473189207928431468499520213120082089⟩⟩, + ⟨⟨4683008977835032950324527997870484922055694850353534,4683008977835032950324527997870484922055694850364566⟩,⟨1046137492561196071314532142375650066540520031060544,1046137492561196071314532142375650066540520031071357⟩⟩, + ⟨⟨94337078348599871928099661081343352206691754761608,94337078348599871928099661081343352206691754768037⟩,⟨45670292059911680076042358614323044468398436177816,45670292059911680076042358614323044468398436184480⟩⟩, + ⟨⟨1367804266277042087086973587702501420535747554508,1367804266277042087086973587702501420535747574500⟩,⟨-890844155885960806382819802435186786496692130840,-890844155885960806382819802435186786496692110919⟩⟩, + ⟨⟨-31502036043565410595178771761042728611264388560,-31502036043565410595178771761042728611264355033⟩,⟨1457262980497340878542385351459318894144291375,1457262980497340878542385351459318894144324903⟩⟩, + ⟨⟨794970376727532087850308928942992114504163491,794970376727532087850308928942992114504233357⟩,⟨-1512829102505632879438586846848960723801091755,-1512829102505632879438586846848960723801021888⟩⟩, + ⟨⟨577133146785507607667897873606383553224014067,577133146785507607667897873606383553224097791⟩,⟨-41862,47842⟩⟩, + ⟨⟨794970376727532087850308928942992114504163491,794970376727532087850308928942992114504233357⟩,⟨1512829102505632879438586846848960723801021888,1512829102505632879438586846848960723801091755⟩⟩, + ⟨⟨-31502036043565410595178771761042728611264388560,-31502036043565410595178771761042728611264355033⟩,⟨-1457262980497340878542385351459318894144324903,-1457262980497340878542385351459318894144291375⟩⟩, + ⟨⟨1367804266277042087086973587702501420535747554508,1367804266277042087086973587702501420535747574500⟩,⟨890844155885960806382819802435186786496692110919,890844155885960806382819802435186786496692130840⟩⟩, + ⟨⟨94337078348599871928099661081343352206691754761608,94337078348599871928099661081343352206691754768037⟩,⟨-45670292059911680076042358614323044468398436184480,-45670292059911680076042358614323044468398436177816⟩⟩, + ⟨⟨4683008977835032950324527997870484922055694850353534,4683008977835032950324527997870484922055694850364566⟩,⟨-1046137492561196071314532142375650066540520031071357,-1046137492561196071314532142375650066540520031060544⟩⟩, + ⟨⟨78666953884606784244565566804533559484732868371307490,78666953884606784244565566804533559484732868371494915⟩,⟨91922323010580650473189207928431468499520213120082089,91922323010580650473189207928431468499520213120269474⟩⟩, + ⟨⟨-1224161686764321941762989547234059579366767229841721231,-1224161686764321941762989547234059579366767229839651489⟩,⟨1020044495151783957451517086600663547660945454315919718,1020044495151783957451517086600663547660945454317988258⟩⟩, + ⟨⟨-4846082264468684018624138836487714172120580700842359601,-4846082264468684018624138836487714172120580700825543343⟩,⟨-10493017894540719668434994451581039551898607634447533446,-10493017894540719668434994451581039551898607634430716237⟩⟩, + ⟨⟨50448361114437571328979545967501188635398106889264973235,50448361114437571328979545967501188635398106889317372572⟩,⟨-4309975555824179399768827486150106624197816397349131418,-4309975555824179399768827486150106624197816397296763254⟩⟩, + ⟨⟨-36431631915188708878738988216824787866640042260348873311,-36431631915188708878738988216824787866640042260200714703⟩,⟨142960465184212379752526415073347531476390500917933785534,142960465184212379752526415073347531476390500918081833584⟩⟩, + ⟨⟨-270892511610958191315672440536687869719806469918248472154,-270892511610958191315672440536687869719806469917986262706⟩,⟨-154035613449585876827932344045844950742316611050121490955,-154035613449585876827932344045844950742316611049859369765⟩⟩, + ⟨⟨326190388157903100119902699049705647344083787951002159984,326190388157903100119902699049705647344083787951388577718⟩,⟨-395286149823302284782887093335003277923297134217048820118,-395286149823302284782887093335003277923297134216663808415⟩⟩, + ⟨⟨504941060195068326742279488076645537574269912044938915396,504941060195068326742279488076645537574269912045279905970⟩,⟨477190849052075923015475161027782010335524675541033885763,477190849052075923015475161027782010335524675541375475167⟩⟩, + ⟨⟨-533515866641141234362665052374610103595565928521541543116,-533515866641141234362665052374610103595565928521116622505⟩,⟨611898544798982277166236577046803402317303518350550134676,611898544798982277166236577046803402317303518350974108250⟩⟩, + ⟨⟨-711268101510143168710598842821575733226375871983584701499,-711268101510143168710598842821575733226375871983118658209⟩,⟨-459113559499151407020541792926688212964880775852393288792,-459113559499151407020541792926688212964880775851923816449⟩⟩] +lemma tw0_1_2_12_calc (j : Fin 31) : taylorWaveBox 0 1 2 12 j = tw0_1_2_12 j := by + revert j + decide +kernel +def tw0_1_2_13 : Fin 31 → CI := ![⟨⟨-99175445356932078441790942609790686458523640704262675503,-99175445356932078441790942609790686458523640704120346913⟩,⟨-225453802343437482113980338669761732289375575259114098556,-225453802343437482113980338669761732289375575258972670536⟩⟩, + ⟨⟨216759005967038904804340591964637465180902797838460424165,216759005967038904804340591964637465180902797838588246617⟩,⟨-123763733566646595720910338876308317373946922712839601492,-123763733566646595720910338876308317373946922712711773837⟩⟩, + ⟨⟨111754708478137398912129243121457728107191076801298077163,111754708478137398912129243121457728107191076801427688798⟩,⟨196942219758452870154015362771090951940353560995162717655,196942219758452870154015362771090951940353560995292072987⟩⟩, + ⟨⟨-163472090663154333877788942197901733524073664102106103832,-163472090663154333877788942197901733524073664101970158225⟩,⟨69565452133495653595056538746078159329191547075401630851,69565452133495653595056538746078159329191547075537847839⟩⟩, + ⟨⟨-20448906842020979918668830916281121204391681108796655942,-20448906842020979918668830916281121204391681108673714593⟩,⟨-113462680585301627448086723303300331431669781905793370232,-113462680585301627448086723303300331431669781905670336324⟩⟩, + ⟨⟨57838157944498052241253054875528126472455542150992065708,57838157944498052241253054875528126472455542151056556673⟩,⟨8491980208868221149638100327204776628362208464988723209,8491980208868221149638100327204776628362208465053235484⟩⟩, + ⟨⟨-11155007057042434984629129585616212702940728789052038232,-11155007057042434984629129585616212702940728789023401594⟩,⟨18454354770468926039628210479515002254611860723935168423,18454354770468926039628210479515002254611860723963836315⟩⟩, + ⟨⟨-3034687221085910806000329902863305732004565934178487203,-3034687221085910806000329902863305732004565934169816792⟩,⟨-4355225771417388773219764557747962336743322688337856161,-4355225771417388773219764557747962336743322688329185513⟩⟩, + ⟨⟨763558278249992376922136294574014277885998020596653472,763558278249992376922136294574014277885998020597844324⟩,⟨-207899552307385212369420790027549298183963598393509499,-207899552307385212369420790027549298183963598392318423⟩⟩, + ⟨⟨10398297857179576128953947282901695189385189102982361,10398297857179576128953947282901695189385189103110881⟩,⟨64250534638668710107594756278637326692725082663250510,64250534638668710107594756278637326692725082663378992⟩⟩, + ⟨⟨-2394167683083316494459624941683641723670719895171889,-2394167683083316494459624941683641723670719895164225⟩,⟨1443735041011680282948384384092490892490392650253724,1443735041011680282948384384092490892490392650261291⟩⟩, + ⟨⟨-64750659658204789098418913319029212662556674159505,-64750659658204789098418913319029212662556674156003⟩,⟨12453049712494406708020974579538066913494401539873,12453049712494406708020974579538066913494401543630⟩⟩, + ⟨⟨-519191866100524178154782432990388022310457809511,-519191866100524178154782432990388022310457797766⟩,⟨970492974046053460127337860969278458061421542866,970492974046053460127337860969278458061421555187⟩⟩, + ⟨⟨20780383800569435047075829076915207103475374042,20780383800569435047075829076915207103475402608⟩,⟨-8617185756125555251869290916859422590436150382,-8617185756125555251869290916859422590436121816⟩⟩, + ⟨⟨-381596590905819788313915868488880055213473363,-381596590905819788313915868488880055213423626⟩,⟨1206408645084014477988188549033397245241945940,1206408645084014477988188549033397245241995676⟩⟩, + ⟨⟨-432920258341276715004806007159175441661604641,-432920258341276715004806007159175441661541837⟩,⟨-35888,31402⟩⟩, + ⟨⟨-381596590905819788313915868488880055213473363,-381596590905819788313915868488880055213423626⟩,⟨-1206408645084014477988188549033397245241995676,-1206408645084014477988188549033397245241945940⟩⟩, + ⟨⟨20780383800569435047075829076915207103475374042,20780383800569435047075829076915207103475402608⟩,⟨8617185756125555251869290916859422590436121816,8617185756125555251869290916859422590436150382⟩⟩, + ⟨⟨-519191866100524178154782432990388022310457809511,-519191866100524178154782432990388022310457797766⟩,⟨-970492974046053460127337860969278458061421555187,-970492974046053460127337860969278458061421542866⟩⟩, + ⟨⟨-64750659658204789098418913319029212662556674159505,-64750659658204789098418913319029212662556674156003⟩,⟨-12453049712494406708020974579538066913494401543630,-12453049712494406708020974579538066913494401539873⟩⟩, + ⟨⟨-2394167683083316494459624941683641723670719895171889,-2394167683083316494459624941683641723670719895164225⟩,⟨-1443735041011680282948384384092490892490392650261291,-1443735041011680282948384384092490892490392650253724⟩⟩, + ⟨⟨10398297857179576128953947282901695189385189102982361,10398297857179576128953947282901695189385189103110881⟩,⟨-64250534638668710107594756278637326692725082663378992,-64250534638668710107594756278637326692725082663250510⟩⟩, + ⟨⟨763558278249992376922136294574014277885998020596653472,763558278249992376922136294574014277885998020597844324⟩,⟨207899552307385212369420790027549298183963598392318423,207899552307385212369420790027549298183963598393509499⟩⟩, + ⟨⟨-3034687221085910806000329902863305732004565934178487203,-3034687221085910806000329902863305732004565934169816792⟩,⟨4355225771417388773219764557747962336743322688329185513,4355225771417388773219764557747962336743322688337856161⟩⟩, + ⟨⟨-11155007057042434984629129585616212702940728789052038232,-11155007057042434984629129585616212702940728789023401594⟩,⟨-18454354770468926039628210479515002254611860723963836315,-18454354770468926039628210479515002254611860723935168423⟩⟩, + ⟨⟨57838157944498052241253054875528126472455542150992065708,57838157944498052241253054875528126472455542151056556673⟩,⟨-8491980208868221149638100327204776628362208465053235484,-8491980208868221149638100327204776628362208464988723209⟩⟩, + ⟨⟨-20448906842020979918668830916281121204391681108796655943,-20448906842020979918668830916281121204391681108673714593⟩,⟨113462680585301627448086723303300331431669781905670336324,113462680585301627448086723303300331431669781905793370232⟩⟩, + ⟨⟨-163472090663154333877788942197901733524073664102106103830,-163472090663154333877788942197901733524073664101970158226⟩,⟨-69565452133495653595056538746078159329191547075537847839,-69565452133495653595056538746078159329191547075401630853⟩⟩, + ⟨⟨111754708478137398912129243121457728107191076801298077165,111754708478137398912129243121457728107191076801427688798⟩,⟨-196942219758452870154015362771090951940353560995292072985,-196942219758452870154015362771090951940353560995162717655⟩⟩, + ⟨⟨216759005967038904804340591964637465180902797838460424165,216759005967038904804340591964637465180902797838588246615⟩,⟨123763733566646595720910338876308317373946922712711773839,123763733566646595720910338876308317373946922712839601493⟩⟩, + ⟨⟨-99175445356932078441790942609790686458523640704262675503,-99175445356932078441790942609790686458523640704120346916⟩,⟨225453802343437482113980338669761732289375575258972670536,225453802343437482113980338669761732289375575259114098554⟩⟩] +lemma tw0_1_2_13_calc (j : Fin 31) : taylorWaveBox 0 1 2 13 j = tw0_1_2_13 j := by + revert j + decide +kernel +def tw0_1_2_14 : Fin 31 → CI := ![⟨⟨64997668814186413789709681658272889364383278629046634470,64997668814186413789709681658272889364383278629086257050⟩,⟨-16987569439306368698705936711335940573843695082122335487,-16987569439306368698705936711335940573843695082082513172⟩⟩, + ⟨⟨22668451926997386997005965244968190969263013670879151448,22668451926997386997005965244968190969263013670915871952⟩,⟨68282227902409028502852965592581651135501498141876040151,68282227902409028502852965592581651135501498141912849373⟩⟩, + ⟨⟨-66589026039560060379572330174993746408452986553535239458,-66589026039560060379572330174993746408452986553490681757⟩,⟨18797469729899165317241199653729684918548807711949385448,18797469729899165317241199653729684918548807711994021118⟩⟩, + ⟨⟨-6610903065665825986081837627765076355100002050770706705,-6610903065665825986081837627765076355100002050727438473⟩,⟨-57357055323063402608134683142495344779179049581252994696,-57357055323063402608134683142495344779179049581209718329⟩⟩, + ⟨⟨39474528030560436048696014515338402070483933729830629599,39474528030560436048696014515338402070483933729880760594⟩,⟨6386780620212180353714283103099641404300948449851666598,6386780620212180353714283103099641404300948449901763531⟩⟩, + ⟨⟨-11185361332450178587004275131708597596077323360289217502,-11185361332450178587004275131708597596077323360263057231⟩,⟨18614003823047848783846706649878386379353315809289345460,18614003823047848783846706649878386379353315809315510333⟩⟩, + ⟨⟨-4636222246424513380389403116029050209863632005833123690,-4636222246424513380389403116029050209863632005819892347⟩,⟨-7254994920440945049645821950915027139143521168867128176,-7254994920440945049645821950915027139143521168853905539⟩⟩, + ⟨⟨2278403964884484091185765887619328793418845756139664662,2278403964884484091185765887619328793418845756144678627⟩,⟨-180366090693287595281345912919464840028391974792677521,-180366090693287595281345912919464840028391974787663882⟩⟩, + ⟨⟨-124412511914057457315070270444601301737207807196240926,-124412511914057457315070270444601301737207807195535678⟩,⟨346808941079955117647889837046061923768443229955464567,346808941079955117647889837046061923768443229956169991⟩⟩, + ⟨⟨-28119971834448210569977407993452393714967673865698357,-28119971834448210569977407993452393714967673865616040⟩,⟨-16934337730158627116397633547903323324041690508192328,-16934337730158627116397633547903323324041690508109992⟩⟩, + ⟨⟨401059934159640234481619514306371578177787108946744,401059934159640234481619514306371578177787108951620⟩,⟨-1473536235043329637739848977938201288589738822263410,-1473536235043329637739848977938201288589738822258470⟩⟩, + ⟨⟨26220418277677402107527194127733307933951255228360,26220418277677402107527194127733307933951255230960⟩,⟨-28720283449827575533410123874791565845364779597225,-28720283449827575533410123874791565845364779594636⟩⟩, + ⟨⟨-7679801600767347960268139057638213779058549736,-7679801600767347960268139057638213779058542954⟩,⟨-695714759064400271084816272962506495428494594701,-695714759064400271084816272962506495428494587460⟩⟩, + ⟨⟨-11110493693527910241877363216084543816033210787,-11110493693527910241877363216084543816033190848⟩,⟨10144182095975616862024422123043641363032231768,10144182095975616862024422123043641363032251707⟩⟩, + ⟨⟨112873600729794234969032704744727485633249734,112873600729794234969032704744727485633281790⟩,⟨-871000009953833399852930013604556566871343629,-871000009953833399852930013604556566871311573⟩⟩, + ⟨⟨304446563467679118029495425070987819481027788,304446563467679118029495425070987819481071954⟩,⟨-22083,25238⟩⟩, + ⟨⟨112873600729794234969032704744727485633249734,112873600729794234969032704744727485633281790⟩,⟨871000009953833399852930013604556566871311573,871000009953833399852930013604556566871343629⟩⟩, + ⟨⟨-11110493693527910241877363216084543816033210787,-11110493693527910241877363216084543816033190848⟩,⟨-10144182095975616862024422123043641363032251707,-10144182095975616862024422123043641363032231768⟩⟩, + ⟨⟨-7679801600767347960268139057638213779058549736,-7679801600767347960268139057638213779058542954⟩,⟨695714759064400271084816272962506495428494587460,695714759064400271084816272962506495428494594701⟩⟩, + ⟨⟨26220418277677402107527194127733307933951255228360,26220418277677402107527194127733307933951255230960⟩,⟨28720283449827575533410123874791565845364779594636,28720283449827575533410123874791565845364779597225⟩⟩, + ⟨⟨401059934159640234481619514306371578177787108946744,401059934159640234481619514306371578177787108951620⟩,⟨1473536235043329637739848977938201288589738822258470,1473536235043329637739848977938201288589738822263410⟩⟩, + ⟨⟨-28119971834448210569977407993452393714967673865698357,-28119971834448210569977407993452393714967673865616040⟩,⟨16934337730158627116397633547903323324041690508109992,16934337730158627116397633547903323324041690508192328⟩⟩, + ⟨⟨-124412511914057457315070270444601301737207807196240926,-124412511914057457315070270444601301737207807195535678⟩,⟨-346808941079955117647889837046061923768443229956169991,-346808941079955117647889837046061923768443229955464567⟩⟩, + ⟨⟨2278403964884484091185765887619328793418845756139664662,2278403964884484091185765887619328793418845756144678627⟩,⟨180366090693287595281345912919464840028391974787663882,180366090693287595281345912919464840028391974792677521⟩⟩, + ⟨⟨-4636222246424513380389403116029050209863632005833123690,-4636222246424513380389403116029050209863632005819892347⟩,⟨7254994920440945049645821950915027139143521168853905539,7254994920440945049645821950915027139143521168867128176⟩⟩, + ⟨⟨-11185361332450178587004275131708597596077323360289217502,-11185361332450178587004275131708597596077323360263057231⟩,⟨-18614003823047848783846706649878386379353315809315510333,-18614003823047848783846706649878386379353315809289345460⟩⟩, + ⟨⟨39474528030560436048696014515338402070483933729830629599,39474528030560436048696014515338402070483933729880760594⟩,⟨-6386780620212180353714283103099641404300948449901763531,-6386780620212180353714283103099641404300948449851666598⟩⟩, + ⟨⟨-6610903065665825986081837627765076355100002050770706705,-6610903065665825986081837627765076355100002050727438474⟩,⟨57357055323063402608134683142495344779179049581209718330,57357055323063402608134683142495344779179049581252994696⟩⟩, + ⟨⟨-66589026039560060379572330174993746408452986553535239458,-66589026039560060379572330174993746408452986553490681757⟩,⟨-18797469729899165317241199653729684918548807711994021118,-18797469729899165317241199653729684918548807711949385448⟩⟩, + ⟨⟨22668451926997386997005965244968190969263013670879151449,22668451926997386997005965244968190969263013670915871952⟩,⟨-68282227902409028502852965592581651135501498141912849373,-68282227902409028502852965592581651135501498141876040151⟩⟩, + ⟨⟨64997668814186413789709681658272889364383278629046634470,64997668814186413789709681658272889364383278629086257050⟩,⟨16987569439306368698705936711335940573843695082082513173,16987569439306368698705936711335940573843695082122335487⟩⟩] +lemma tw0_1_2_14_calc (j : Fin 31) : taylorWaveBox 0 1 2 14 j = tw0_1_2_14 j := by + revert j + decide +kernel +def tw0_1_2_15 : Fin 31 → CI := ![⟨⟨1667851771047777972501748121014902195436316152108396295,1667851771047777972501748121014902195436316152118740781⟩,⟨17165347846783333731708711201805791860768671566787376867,17165347846783333731708711201805791860768671566797685972⟩⟩, + ⟨⟨-19372577561911487348390829564118135193601598217236291605,-19372577561911487348390829564118135193601598217224545175⟩,⟨2380440843702199173333589783572224563494816763896292855,2380440843702199173333589783572224563494816763907992403⟩⟩, + ⟨⟨-678849839800234606182633880455115952929943749301922721,-678849839800234606182633880455115952929943749287776146⟩,⟨-19886918440634543556711184918480169734031387018777638693,-19886918440634543556711184918480169734031387018763510091⟩⟩, + ⟨⟨17396896708101602877312302251391184073556397198318753854,17396896708101602877312302251391184073556397198333785395⟩,⟨3037024587014774589538815222790231692138676656389975008,3037024587014774589538815222790231692138676656404971257⟩⟩, + ⟨⟨-6248207736276703218864789461503023735700413099229776017,-6248207736276703218864789461503023735700413099211476547⟩,⟨11461184949503735783519173241558412028375665355610751815,11461184949503735783519173241558412028375665355629058755⟩⟩, + ⟨⟨-4500115012211269923507866464838384179369743313333028090,-4500115012211269923507866464838384179369743313321130965⟩,⟨-6115326139930581424229088662820612072278101913631770416,-6115326139930581424229088662820612072278101913619879119⟩⟩, + ⟨⟨3215854377736344224494761231446417836984900282910517415,3215854377736344224494761231446417836984900282915946955⟩,⟨-355703122577240097367834843711317175523839647312901486,-355703122577240097367834843711317175523839647307472195⟩⟩, + ⟨⟨-403334274562957652547405744334590697275921543984423331,-403334274562957652547405744334590697275921543981906486⟩,⟨833746146083845522413340485070287459960808709584370558,833746146083845522413340485070287459960808709586887474⟩⟩, + ⟨⟨-93297625646007544274521539370010094853122820396457194,-93297625646007544274521539370010094853122820396052163⟩,⟨-131771364599937832639234265411108782179566113436613265,-131771364599937832639234265411108782179566113436208329⟩⟩, + ⟨⟨14759239676201760630702618021297978907877940352935606,14759239676201760630702618021297978907877940352988723⟩,⟨-4993659385710651496667700208932316797219466419529512,-4993659385710651496667700208932316797219466419476389⟩⟩, + ⟨⟨374109083394462005015450100881015514487577059709076,374109083394462005015450100881015514487577059712187⟩,⟨690235887184897016948767562067475497678693223194782,690235887184897016948767562067475497678693223197924⟩⟩, + ⟨⟨-2135011032372498340095576131977330925197126526374,-2135011032372498340095576131977330925197126525189⟩,⟨21481375764112808138380999902277683146075617549764,21481375764112808138380999902277683146075617550854⟩⟩, + ⟨⟨203272894433221640698464806240919391116335506730,203272894433221640698464806240919391116335511746⟩,⟨360594238764120231339700094254299537563897799191,360594238764120231339700094254299537563897804255⟩⟩, + ⟨⟨4406151600181260205716251820309021188470187490,4406151600181260205716251820309021188470199070⟩,⟨-8382207247164123836946633712079749849924447117,-8382207247164123836946633712079749849924435537⟩⟩, + ⟨⟨27877230898591431476056293742802288953708174,27877230898591431476056293742802288953726846⟩,⟨573094539867607245073008032236286150962805954,573094539867607245073008032236286150962824626⟩⟩, + ⟨⟨-201504757725586405745767051790475623613578038,-201504757725586405745767051790475623613548805⟩,⟨-16704,14616⟩⟩, + ⟨⟨27877230898591431476056293742802288953708174,27877230898591431476056293742802288953726846⟩,⟨-573094539867607245073008032236286150962824626,-573094539867607245073008032236286150962805954⟩⟩, + ⟨⟨4406151600181260205716251820309021188470187490,4406151600181260205716251820309021188470199070⟩,⟨8382207247164123836946633712079749849924435537,8382207247164123836946633712079749849924447117⟩⟩, + ⟨⟨203272894433221640698464806240919391116335506730,203272894433221640698464806240919391116335511746⟩,⟨-360594238764120231339700094254299537563897804255,-360594238764120231339700094254299537563897799191⟩⟩, + ⟨⟨-2135011032372498340095576131977330925197126526374,-2135011032372498340095576131977330925197126525189⟩,⟨-21481375764112808138380999902277683146075617550854,-21481375764112808138380999902277683146075617549764⟩⟩, + ⟨⟨374109083394462005015450100881015514487577059709076,374109083394462005015450100881015514487577059712187⟩,⟨-690235887184897016948767562067475497678693223197924,-690235887184897016948767562067475497678693223194782⟩⟩, + ⟨⟨14759239676201760630702618021297978907877940352935606,14759239676201760630702618021297978907877940352988723⟩,⟨4993659385710651496667700208932316797219466419476389,4993659385710651496667700208932316797219466419529512⟩⟩, + ⟨⟨-93297625646007544274521539370010094853122820396457194,-93297625646007544274521539370010094853122820396052163⟩,⟨131771364599937832639234265411108782179566113436208329,131771364599937832639234265411108782179566113436613265⟩⟩, + ⟨⟨-403334274562957652547405744334590697275921543984423331,-403334274562957652547405744334590697275921543981906486⟩,⟨-833746146083845522413340485070287459960808709586887474,-833746146083845522413340485070287459960808709584370558⟩⟩, + ⟨⟨3215854377736344224494761231446417836984900282910517415,3215854377736344224494761231446417836984900282915946955⟩,⟨355703122577240097367834843711317175523839647307472195,355703122577240097367834843711317175523839647312901486⟩⟩, + ⟨⟨-4500115012211269923507866464838384179369743313333028090,-4500115012211269923507866464838384179369743313321130965⟩,⟨6115326139930581424229088662820612072278101913619879119,6115326139930581424229088662820612072278101913631770416⟩⟩, + ⟨⟨-6248207736276703218864789461503023735700413099229776017,-6248207736276703218864789461503023735700413099211476547⟩,⟨-11461184949503735783519173241558412028375665355629058755,-11461184949503735783519173241558412028375665355610751815⟩⟩, + ⟨⟨17396896708101602877312302251391184073556397198318753854,17396896708101602877312302251391184073556397198333785395⟩,⟨-3037024587014774589538815222790231692138676656404971257,-3037024587014774589538815222790231692138676656389975008⟩⟩, + ⟨⟨-678849839800234606182633880455115952929943749301922721,-678849839800234606182633880455115952929943749287776147⟩,⟨19886918440634543556711184918480169734031387018763510091,19886918440634543556711184918480169734031387018777638693⟩⟩, + ⟨⟨-19372577561911487348390829564118135193601598217236291605,-19372577561911487348390829564118135193601598217224545175⟩,⟨-2380440843702199173333589783572224563494816763907992403,-2380440843702199173333589783572224563494816763896292856⟩⟩, + ⟨⟨1667851771047777972501748121014902195436316152108396295,1667851771047777972501748121014902195436316152118740781⟩,⟨-17165347846783333731708711201805791860768671566797685972,-17165347846783333731708711201805791860768671566787376867⟩⟩] +lemma tw0_1_2_15_calc (j : Fin 31) : taylorWaveBox 0 1 2 15 j = tw0_1_2_15 j := by + revert j + decide +kernel +def tw0_1_2_16 : Fin 31 → CI := ![⟨⟨-4173338052676128483884418462950664781670635404260275507,-4173338052676128483884418462950664781670635404257771108⟩,⟨-258738306765813634621482214013877822805540327205950099,-258738306765813634621482214013877822805540327203441758⟩⟩, + ⟨⟨379731846461886361812025190553939061319005298999956636,379731846461886361812025190553939061319005299003370494⟩,⟨-4986470499510927240482784091211012550643365619648302075,-4986470499510927240482784091211012550643365619644873311⟩⟩, + ⟨⟨5289369003969999951042644557264772029148398829871032522,5289369003969999951042644557264772029148398829875204767⟩,⟨1110187684893033892658968446455468138398976300721673243,1110187684893033892658968446455468138398976300725848271⟩⟩, + ⟨⟨-2266734318955755092790516174863139154187589954598498009,-2266734318955755092790516174863139154187589954593304050⟩,⟨4570348865432474025588329920336230113469388471833438776,4570348865432474025588329920336230113469388471838648428⟩⟩, + ⟨⟨-2692694668155114269927315138792032033355211444769628534,-2692694668155114269927315138792032033355211444763489026⟩,⟨-2991022587852733594289968561595968897144371362103605054,-2991022587852733594289968561595968897144371362097465891⟩⟩, + ⟨⟨2435820806877007483771376603189240601740640740436610234,2435820806877007483771376603189240601740640740441446266⟩,⟨-593742366146276107293966035046831363333826892191947160,-593742366146276107293966035046831363333826892187109270⟩⟩, + ⟨⟨-391923330084760228330863765401059142473006050137244708,-391923330084760228330863765401059142473006050134723408⟩,⟨1079344682743329687192599934810612118067637751260896297,1079344682743329687192599934810612118067637751263419119⟩⟩, + ⟨⟨-197406041695910911086629931319472323311916461321262832,-197406041695910911086629931319472323311916461320066667⟩,⟨-294415693628473719743101857267770757166666682101845289,-294415693628473719743101857267770757166666682100649106⟩⟩, + ⟨⟨66819205232025540094033155409362086726759395989430484,66819205232025540094033155409362086726759395989637927⟩,⟨-389173324053479342264580238099737539371761656050389,-389173324053479342264580238099737539371761655842950⟩⟩, + ⟨⟨-2566503452232844641243618096368954532441256666050678,-2566503452232844641243618096368954532441256666019653⟩,⟨6496382331573429797527433156087190505027304292975600,6496382331573429797527433156087190505027304293006619⟩⟩, + ⟨⟨-362828054797578707756399056268017261511384467283103,-362828054797578707756399056268017261511384467281169⟩,⟨-116902121990775647924236592853315554229988631332204,-116902121990775647924236592853315554229988631330284⟩⟩, + ⟨⟨-5836084766110652643749596679198136163184799464938,-5836084766110652643749596679198136163184799464178⟩,⟨-9696415537458162583049432788572539084197598725996,-9696415537458162583049432788572539084197598725255⟩⟩, + ⟨⟨-197655934159055010033698047912742872910770503696,-197655934159055010033698047912742872910770501023⟩,⟨-122604920781457801834539266325843293197370306818,-122604920781457801834539266325843293197370304251⟩⟩, + ⟨⟨-769324789570244289135402071003996917239954787,-769324789570244289135402071003996917239949299⟩,⟨5576591408406044866129516562115890131561381909,5576591408406044866129516562115890131561387397⟩⟩, + ⟨⟨-79356400296485163138022077931214214540252392,-79356400296485163138022077931214214540241540⟩,⟨-345005304772391071060714844506092805531270781,-345005304772391071060714844506092805531259929⟩⟩, + ⟨⟨125960956406446076135771781799191798186173565,125960956406446076135771781799191798186191839⟩,⟨-9137,10442⟩⟩, + ⟨⟨-79356400296485163138022077931214214540252392,-79356400296485163138022077931214214540241540⟩,⟨345005304772391071060714844506092805531259929,345005304772391071060714844506092805531270781⟩⟩, + ⟨⟨-769324789570244289135402071003996917239954787,-769324789570244289135402071003996917239949299⟩,⟨-5576591408406044866129516562115890131561387397,-5576591408406044866129516562115890131561381909⟩⟩, + ⟨⟨-197655934159055010033698047912742872910770503696,-197655934159055010033698047912742872910770501023⟩,⟨122604920781457801834539266325843293197370304251,122604920781457801834539266325843293197370306818⟩⟩, + ⟨⟨-5836084766110652643749596679198136163184799464938,-5836084766110652643749596679198136163184799464178⟩,⟨9696415537458162583049432788572539084197598725255,9696415537458162583049432788572539084197598725996⟩⟩, + ⟨⟨-362828054797578707756399056268017261511384467283103,-362828054797578707756399056268017261511384467281169⟩,⟨116902121990775647924236592853315554229988631330284,116902121990775647924236592853315554229988631332204⟩⟩, + ⟨⟨-2566503452232844641243618096368954532441256666050678,-2566503452232844641243618096368954532441256666019653⟩,⟨-6496382331573429797527433156087190505027304293006619,-6496382331573429797527433156087190505027304292975600⟩⟩, + ⟨⟨66819205232025540094033155409362086726759395989430484,66819205232025540094033155409362086726759395989637927⟩,⟨389173324053479342264580238099737539371761655842950,389173324053479342264580238099737539371761656050389⟩⟩, + ⟨⟨-197406041695910911086629931319472323311916461321262832,-197406041695910911086629931319472323311916461320066667⟩,⟨294415693628473719743101857267770757166666682100649106,294415693628473719743101857267770757166666682101845289⟩⟩, + ⟨⟨-391923330084760228330863765401059142473006050137244708,-391923330084760228330863765401059142473006050134723408⟩,⟨-1079344682743329687192599934810612118067637751263419119,-1079344682743329687192599934810612118067637751260896297⟩⟩, + ⟨⟨2435820806877007483771376603189240601740640740436610234,2435820806877007483771376603189240601740640740441446266⟩,⟨593742366146276107293966035046831363333826892187109270,593742366146276107293966035046831363333826892191947160⟩⟩, + ⟨⟨-2692694668155114269927315138792032033355211444769628534,-2692694668155114269927315138792032033355211444763489026⟩,⟨2991022587852733594289968561595968897144371362097465891,2991022587852733594289968561595968897144371362103605054⟩⟩, + ⟨⟨-2266734318955755092790516174863139154187589954598498009,-2266734318955755092790516174863139154187589954593304050⟩,⟨-4570348865432474025588329920336230113469388471838648428,-4570348865432474025588329920336230113469388471833438776⟩⟩, + ⟨⟨5289369003969999951042644557264772029148398829871032522,5289369003969999951042644557264772029148398829875204767⟩,⟨-1110187684893033892658968446455468138398976300725848271,-1110187684893033892658968446455468138398976300721673243⟩⟩, + ⟨⟨379731846461886361812025190553939061319005298999956636,379731846461886361812025190553939061319005299003370494⟩,⟨4986470499510927240482784091211012550643365619644873311,4986470499510927240482784091211012550643365619648302074⟩⟩, + ⟨⟨-4173338052676128483884418462950664781670635404260275507,-4173338052676128483884418462950664781670635404257771108⟩,⟨258738306765813634621482214013877822805540327203441758,258738306765813634621482214013877822805540327205950099⟩⟩] +lemma tw0_1_2_16_calc (j : Fin 31) : taylorWaveBox 0 1 2 16 j = tw0_1_2_16 j := by + revert j + decide +kernel +def tw0_1_2_17 : Fin 31 → CI := ![⟨⟨210244480976823898391741893123610275431553794572128100,210244480976823898391741893123610275431553794572698766⟩,⟨-937120579966014684235721896650244145785475681682385403,-937120579966014684235721896650244145785475681681814446⟩⟩, + ⟨⟨1168505599765912072159121612922420716896753480575778638,1168505599765912072159121612922420716896753480576704726⟩,⟨328778329430044003718681481251853652648436573043178119,328778329430044003718681481251853652648436573044100500⟩⟩, + ⟨⟨-602265435823564518514643195527245486811965735820215387,-602265435823564518514643195527245486811965735819055604⟩,⟨1253509100457857124881677050365998575410062769842485287,1253509100457857124881677050365998575410062769843645049⟩⟩, + ⟨⟨-1023465770814083796235606682950831709596956470989983654,-1023465770814083796235606682950831709596956470988347858⟩,⟨-949637229170426598372129044209258645373009831236975169,-949637229170426598372129044209258645373009831235343588⟩⟩, + ⟨⟨1085307020406574165870675898670244541965625215551451855,1085307020406574165870675898670244541965625215553552608⟩,⟨-451511332528611300427143543804319302569350937061886786,-451511332528611300427143543804319302569350937059786601⟩⟩, + ⟨⟨-122022448480158682553606660722656545616537053279316698,-122022448480158682553606660722656545616537053277503496⟩,⟨774751364145654556276374265124875695246222178337032776,774751364145654556276374265124875695246222178338845703⟩⟩, + ⟨⟨-267109930858953833119620060002495676155714277586524817,-267109930858953833119620060002495676155714277585453676⟩,⟨-278782555649248993356431169070913717001873877572769678,-278782555649248993356431169070913717001873877571699048⟩⟩, + ⟨⟨128284446719164688247017851422354323467075714562627241,128284446719164688247017851422354323467075714563214231⟩,⟨-7845539266982868783073673789601196859784407854088186,-7845539266982868783073673789601196859784407853501214⟩⟩, + ⟨⟨-14888899313384879249803236559011509355542464530123449,-14888899313384879249803236559011509355542464530010331⟩,⟨21556837922777191819704989270204505940852210453296500,21556837922777191819704989270204505940852210453409639⟩⟩, + ⟨⟨-1401500521351924577630461332295951983857270661279502,-1401500521351924577630461332295951983857270661261048⟩,⟨-2614602181840217287032776703023993245869438990855775,-2614602181840217287032776703023993245869438990837322⟩⟩, + ⟨⟨157832281604769644966567201873986970552731898707315,157832281604769644966567201873986970552731898708462⟩,⟨-76382913113709234087940445683478245071082533684825,-76382913113709234087940445683478245071082533683686⟩⟩, + ⟨⟨5202795670013298047734871228214818216292843706433,5202795670013298047734871228214818216292843706788⟩,⟨2127272608501199710296037027000654939649031965016,2127272608501199710296037027000654939649031965385⟩⟩, + ⟨⟨123642136708451196612434091513752408875535096297,123642136708451196612434091513752408875535097533⟩,⟨6550966428665304015824791641906182845080246480,6550966428665304015824791641906182845080247627⟩⟩, + ⟨⟨-660205722639350516369360611686152694012260970,-660205722639350516369360611686152694012257233⟩,⟨-3100846589589517853407345147575221590989985080,-3100846589589517853407345147575221590989981344⟩⟩, + ⟨⟨81259927142296011702929333794421118713437678,81259927142296011702929333794421118713444929⟩,⟨190305951295048775693961549382420813316274880,190305951295048775693961549382420813316282131⟩⟩, + ⟨⟨-74594275203378869683949124780933801342379461,-74594275203378869683949124780933801342368639⟩,⟨-6184,5411⟩⟩, + ⟨⟨81259927142296011702929333794421118713437678,81259927142296011702929333794421118713444929⟩,⟨-190305951295048775693961549382420813316282131,-190305951295048775693961549382420813316274880⟩⟩, + ⟨⟨-660205722639350516369360611686152694012260970,-660205722639350516369360611686152694012257233⟩,⟨3100846589589517853407345147575221590989981344,3100846589589517853407345147575221590989985080⟩⟩, + ⟨⟨123642136708451196612434091513752408875535096297,123642136708451196612434091513752408875535097533⟩,⟨-6550966428665304015824791641906182845080247627,-6550966428665304015824791641906182845080246480⟩⟩, + ⟨⟨5202795670013298047734871228214818216292843706433,5202795670013298047734871228214818216292843706788⟩,⟨-2127272608501199710296037027000654939649031965385,-2127272608501199710296037027000654939649031965016⟩⟩, + ⟨⟨157832281604769644966567201873986970552731898707315,157832281604769644966567201873986970552731898708462⟩,⟨76382913113709234087940445683478245071082533683686,76382913113709234087940445683478245071082533684825⟩⟩, + ⟨⟨-1401500521351924577630461332295951983857270661279502,-1401500521351924577630461332295951983857270661261048⟩,⟨2614602181840217287032776703023993245869438990837322,2614602181840217287032776703023993245869438990855775⟩⟩, + ⟨⟨-14888899313384879249803236559011509355542464530123449,-14888899313384879249803236559011509355542464530010331⟩,⟨-21556837922777191819704989270204505940852210453409639,-21556837922777191819704989270204505940852210453296500⟩⟩, + ⟨⟨128284446719164688247017851422354323467075714562627241,128284446719164688247017851422354323467075714563214231⟩,⟨7845539266982868783073673789601196859784407853501214,7845539266982868783073673789601196859784407854088186⟩⟩, + ⟨⟨-267109930858953833119620060002495676155714277586524817,-267109930858953833119620060002495676155714277585453676⟩,⟨278782555649248993356431169070913717001873877571699048,278782555649248993356431169070913717001873877572769678⟩⟩, + ⟨⟨-122022448480158682553606660722656545616537053279316698,-122022448480158682553606660722656545616537053277503496⟩,⟨-774751364145654556276374265124875695246222178338845703,-774751364145654556276374265124875695246222178337032776⟩⟩, + ⟨⟨1085307020406574165870675898670244541965625215551451855,1085307020406574165870675898670244541965625215553552608⟩,⟨451511332528611300427143543804319302569350937059786601,451511332528611300427143543804319302569350937061886786⟩⟩, + ⟨⟨-1023465770814083796235606682950831709596956470989983654,-1023465770814083796235606682950831709596956470988347858⟩,⟨949637229170426598372129044209258645373009831235343588,949637229170426598372129044209258645373009831236975169⟩⟩, + ⟨⟨-602265435823564518514643195527245486811965735820215387,-602265435823564518514643195527245486811965735819055604⟩,⟨-1253509100457857124881677050365998575410062769843645049,-1253509100457857124881677050365998575410062769842485287⟩⟩, + ⟨⟨1168505599765912072159121612922420716896753480575778638,1168505599765912072159121612922420716896753480576704726⟩,⟨-328778329430044003718681481251853652648436573044100500,-328778329430044003718681481251853652648436573043178119⟩⟩, + ⟨⟨210244480976823898391741893123610275431553794572128100,210244480976823898391741893123610275431553794572698766⟩,⟨937120579966014684235721896650244145785475681681814446,937120579966014684235721896650244145785475681682385403⟩⟩] +lemma tw0_1_2_17_calc (j : Fin 31) : taylorWaveBox 0 1 2 17 j = tw0_1_2_17 j := by + revert j + decide +kernel +def tw0_1_2_18 : Fin 31 → CI := ![⟨⟨194659225785126219960598523909651564255088750909404576,194659225785126219960598523909651564255088750909531820⟩,⟨77631050812384100373265708324147168389120512839375939,77631050812384100373265708324147168389120512839502841⟩⟩, + ⟨⟨-127404070002975826672597249364527841495284591819454851,-127404070002975826672597249364527841495284591819222064⟩,⟨249239220870412195622353691601681328714759568885958668,249239220870412195622353691601681328714759568886192211⟩⟩, + ⟨⟨-262422628903266299813397234328232185034227537973520048,-262422628903266299813397234328232185034227537973196428⟩,⟨-216104703078743244933234258203599623400429916789591057,-216104703078743244933234258203599623400429916789267627⟩⟩, + ⟨⟨312229833645298570132151746771893166638721149055961565,312229833645298570132151746771893166638721149056434860⟩,⟨-185134626565773321796546651875783789874010709325411268,-185134626565773321796546651875783789874010709324937203⟩⟩, + ⟨⟨18101044285657069327432836231457824508293688446902585,18101044285657069327432836231457824508293688447631595⟩,⟨325663869031576779213816786478847878837166533341025034,325663869031576779213816786478847878837166533341754316⟩⟩, + ⟨⟨-198523475993651459280457108118628969169674888825685003,-198523475993651459280457108118628969169674888825034201⟩,⟨-122132222749432903403418056172788229571978165143207214,-122132222749432903403418056172788229571978165142556466⟩⟩, + ⟨⟨117612962323981527526947002232920755762394639254671018,117612962323981527526947002232920755762394639255088457⟩,⟨-37098311811817557347908806955298574998343838402934237,-37098311811817557347908806955298574998343838402516743⟩⟩, + ⟨⟨-19989770919238135586088516032677382748795234622465067,-19989770919238135586088516032677382748795234622201327⟩,⟨39500196981925638965592411162761343501511766035619179,39500196981925638965592411162761343501511766035882922⟩⟩, + ⟨⟨-3401829981700313077888908573100090240417778444452769,-3401829981700313077888908573100090240417778444396708⟩,⟨-9146222543643554906517918488032004105761459473540447,-9146222543643554906517918488032004105761459473484390⟩⟩, + ⟨⟨1170495734004969718103596819794679993460791916616117,1170495734004969718103596819794679993460791916626166⟩,⟨250025689682005331677774231028054092601981825874841,250025689682005331677774231028054092601981825884892⟩⟩, + ⟨⟨-26823556038955988540570613082751035490250352016540,-26823556038955988540570613082751035490250352015874⟩,⟨71773778889001943725606984702403401600216162761818,71773778889001943725606984702403401600216162762487⟩⟩, + ⟨⟨-2567861661760916894098277818916693999812656998690,-2567861661760916894098277818916693999812656998530⟩,⟨663167330324761872365056294363608452172027598702,663167330324761872365056294363608452172027598872⟩⟩, + ⟨⟨-56399134641740994627372341874348866862680251126,-56399134641740994627372341874348866862680250363⟩,⟨27198060270484824789869910772371797469089577188,27198060270484824789869910772371797469089577939⟩⟩, + ⟨⟨896173535918918380869011450555271502759925404,896173535918918380869011450555271502759927637⟩,⟨1440119953583129709475088838325298965669234910,1440119953583129709475088838325298965669237143⟩⟩, + ⟨⟨-63071258084079638921669432124002661171309318,-63071258084079638921669432124002661171304914⟩,⟨-96049619868222056723044842276134413382393033,-96049619868222056723044842276134413382388629⟩⟩, + ⟨⟨41966104015633179354267659501968498508709583,41966104015633179354267659501968498508715672⟩,⟨-3044,3479⟩⟩, + ⟨⟨-63071258084079638921669432124002661171309318,-63071258084079638921669432124002661171304914⟩,⟨96049619868222056723044842276134413382388629,96049619868222056723044842276134413382393033⟩⟩, + ⟨⟨896173535918918380869011450555271502759925404,896173535918918380869011450555271502759927637⟩,⟨-1440119953583129709475088838325298965669237143,-1440119953583129709475088838325298965669234910⟩⟩, + ⟨⟨-56399134641740994627372341874348866862680251126,-56399134641740994627372341874348866862680250363⟩,⟨-27198060270484824789869910772371797469089577939,-27198060270484824789869910772371797469089577188⟩⟩, + ⟨⟨-2567861661760916894098277818916693999812656998690,-2567861661760916894098277818916693999812656998530⟩,⟨-663167330324761872365056294363608452172027598872,-663167330324761872365056294363608452172027598702⟩⟩, + ⟨⟨-26823556038955988540570613082751035490250352016540,-26823556038955988540570613082751035490250352015874⟩,⟨-71773778889001943725606984702403401600216162762487,-71773778889001943725606984702403401600216162761818⟩⟩, + ⟨⟨1170495734004969718103596819794679993460791916616117,1170495734004969718103596819794679993460791916626166⟩,⟨-250025689682005331677774231028054092601981825884892,-250025689682005331677774231028054092601981825874841⟩⟩, + ⟨⟨-3401829981700313077888908573100090240417778444452769,-3401829981700313077888908573100090240417778444396708⟩,⟨9146222543643554906517918488032004105761459473484390,9146222543643554906517918488032004105761459473540447⟩⟩, + ⟨⟨-19989770919238135586088516032677382748795234622465067,-19989770919238135586088516032677382748795234622201327⟩,⟨-39500196981925638965592411162761343501511766035882922,-39500196981925638965592411162761343501511766035619179⟩⟩, + ⟨⟨117612962323981527526947002232920755762394639254671018,117612962323981527526947002232920755762394639255088457⟩,⟨37098311811817557347908806955298574998343838402516743,37098311811817557347908806955298574998343838402934237⟩⟩, + ⟨⟨-198523475993651459280457108118628969169674888825685003,-198523475993651459280457108118628969169674888825034201⟩,⟨122132222749432903403418056172788229571978165142556466,122132222749432903403418056172788229571978165143207214⟩⟩, + ⟨⟨18101044285657069327432836231457824508293688446902585,18101044285657069327432836231457824508293688447631595⟩,⟨-325663869031576779213816786478847878837166533341754316,-325663869031576779213816786478847878837166533341025034⟩⟩, + ⟨⟨312229833645298570132151746771893166638721149055961565,312229833645298570132151746771893166638721149056434860⟩,⟨185134626565773321796546651875783789874010709324937203,185134626565773321796546651875783789874010709325411268⟩⟩, + ⟨⟨-262422628903266299813397234328232185034227537973520048,-262422628903266299813397234328232185034227537973196428⟩,⟨216104703078743244933234258203599623400429916789267627,216104703078743244933234258203599623400429916789591057⟩⟩, + ⟨⟨-127404070002975826672597249364527841495284591819454851,-127404070002975826672597249364527841495284591819222064⟩,⟨-249239220870412195622353691601681328714759568886192211,-249239220870412195622353691601681328714759568885958668⟩⟩, + ⟨⟨194659225785126219960598523909651564255088750909404576,194659225785126219960598523909651564255088750909531820⟩,⟨-77631050812384100373265708324147168389120512839502841,-77631050812384100373265708324147168389120512839375939⟩⟩] +lemma tw0_1_2_18_calc (j : Fin 31) : taylorWaveBox 0 1 2 18 j = tw0_1_2_18 j := by + revert j + decide +kernel +def tw0_1_2_19 : Fin 31 → CI := ![⟨⟨-22326088095411036120644579506722651507478616639225987,-22326088095411036120644579506722651507478616639195840⟩,⟨37393437447474752717732634830723922326541286969744885,37393437447474752717732634830723922326541286969775157⟩⟩, + ⟨⟨-48152879062745646422700331490351060026023435039890498,-48152879062745646422700331490351060026023435039835084⟩,⟨-38213218664480540545669216157688261699503103798318768,-38213218664480540545669216157688261699503103798263478⟩⟩, + ⟨⟨63438956685900319457715693485533999336576578375780642,63438956685900319457715693485533999336576578375871007⟩,⟨-47319989168584219285062666810941104239066688330965534,-47319989168584219285062666810941104239066688330875090⟩⟩, + ⟨⟨22030326250719294776634189031222697520013398384285548,22030326250719294776634189031222697520013398384414334⟩,⟨87138325763143382039814653950780780752988253658762060,87138325763143382039814653950780780752988253658890788⟩⟩, + ⟨⟨-82760210867027670079946915370995925977251226372192564,-82760210867027670079946915370995925977251226371958973⟩,⟨-24084314608156548258393882286131169759000318185327741,-24084314608156548258393882286131169759000318185094215⟩⟩, + ⟨⟨53539578630622848437976947745471218943607658062346628,53539578630622848437976947745471218943607658062586713⟩,⟨-38543822096083625236457200771137470127969855311763659,-38543822096083625236457200771137470127969855311523523⟩⟩, + ⟨⟨-5714701198514408777261256833219629189942896405352694,-5714701198514408777261256833219629189942896405190975⟩,⟨37078729276138528869668062475096350088484997479848749,37078729276138528869668062475096350088484997480010498⟩⟩, + ⟨⟨-7870380614324782077023976082822772955378135669889273,-7870380614324782077023976082822772955378135669775684⟩,⟨-12205276700675749195286435239935398816838909354583456,-12205276700675749195286435239935398816838909354469867⟩⟩, + ⟨⟨3350430918488495786524794904098053004908050828531010,3350430918488495786524794904098053004908050828557873⟩,⟨870456296230647546452775091503544296434469611758701,870456296230647546452775091503544296434469611785562⟩⟩, + ⟨⟨-363933213174530661655223005784614537884428517695667,-363933213174530661655223005784614537884428517690248⟩,⟨281201733928999576119509867900009368640583257109067,281201733928999576119509867900009368640583257114486⟩⟩, + ⟨⟨-12557806426009416282780593961636793313192663668896,-12557806426009416282780593961636793313192663668525⟩,⟨-29311511591182585748390448543263177282446289104263,-29311511591182585748390448543263177282446289103892⟩⟩, + ⟨⟨746772070357144359758544366766405992278874502612,746772070357144359758544366766405992278874502700⟩,⟨-928779248352751464388545517026775849718466374368,-928779248352751464388545517026775849718466374281⟩⟩, + ⟨⟨17502140955478364973349016769857245823882775779,17502140955478364973349016769857245823882776122⟩,⟨-24558455139556509536684705160154515153397757600,-24558455139556509536684705160154515153397757245⟩⟩, + ⟨⟨-678899615122806315197733846487113093952600850,-678899615122806315197733846487113093952599729⟩,⟨-534859326919737759194913525396250237284455970,-534859326919737759194913525396250237284454849⟩⟩, + ⟨⟨41799359897281954795072149418438392522803500,41799359897281954795072149418438392522805956⟩,⟨44109370338014375184253853003147826408980331,44109370338014375184253853003147826408982787⟩⟩, + ⟨⟨-22485497860311849419715114450246775476617359,-22485497860311849419715114450246775476614096⟩,⟨-1864,1631⟩⟩, + ⟨⟨41799359897281954795072149418438392522803500,41799359897281954795072149418438392522805956⟩,⟨-44109370338014375184253853003147826408982787,-44109370338014375184253853003147826408980331⟩⟩, + ⟨⟨-678899615122806315197733846487113093952600850,-678899615122806315197733846487113093952599729⟩,⟨534859326919737759194913525396250237284454849,534859326919737759194913525396250237284455970⟩⟩, + ⟨⟨17502140955478364973349016769857245823882775779,17502140955478364973349016769857245823882776122⟩,⟨24558455139556509536684705160154515153397757245,24558455139556509536684705160154515153397757600⟩⟩, + ⟨⟨746772070357144359758544366766405992278874502612,746772070357144359758544366766405992278874502700⟩,⟨928779248352751464388545517026775849718466374281,928779248352751464388545517026775849718466374368⟩⟩, + ⟨⟨-12557806426009416282780593961636793313192663668896,-12557806426009416282780593961636793313192663668525⟩,⟨29311511591182585748390448543263177282446289103892,29311511591182585748390448543263177282446289104263⟩⟩, + ⟨⟨-363933213174530661655223005784614537884428517695667,-363933213174530661655223005784614537884428517690248⟩,⟨-281201733928999576119509867900009368640583257114486,-281201733928999576119509867900009368640583257109067⟩⟩, + ⟨⟨3350430918488495786524794904098053004908050828531010,3350430918488495786524794904098053004908050828557873⟩,⟨-870456296230647546452775091503544296434469611785562,-870456296230647546452775091503544296434469611758701⟩⟩, + ⟨⟨-7870380614324782077023976082822772955378135669889273,-7870380614324782077023976082822772955378135669775684⟩,⟨12205276700675749195286435239935398816838909354469867,12205276700675749195286435239935398816838909354583456⟩⟩, + ⟨⟨-5714701198514408777261256833219629189942896405352694,-5714701198514408777261256833219629189942896405190975⟩,⟨-37078729276138528869668062475096350088484997480010498,-37078729276138528869668062475096350088484997479848749⟩⟩, + ⟨⟨53539578630622848437976947745471218943607658062346628,53539578630622848437976947745471218943607658062586713⟩,⟨38543822096083625236457200771137470127969855311523523,38543822096083625236457200771137470127969855311763659⟩⟩, + ⟨⟨-82760210867027670079946915370995925977251226372192564,-82760210867027670079946915370995925977251226371958973⟩,⟨24084314608156548258393882286131169759000318185094215,24084314608156548258393882286131169759000318185327741⟩⟩, + ⟨⟨22030326250719294776634189031222697520013398384285548,22030326250719294776634189031222697520013398384414334⟩,⟨-87138325763143382039814653950780780752988253658890788,-87138325763143382039814653950780780752988253658762060⟩⟩, + ⟨⟨63438956685900319457715693485533999336576578375780642,63438956685900319457715693485533999336576578375871007⟩,⟨47319989168584219285062666810941104239066688330875090,47319989168584219285062666810941104239066688330965534⟩⟩, + ⟨⟨-48152879062745646422700331490351060026023435039890498,-48152879062745646422700331490351060026023435039835084⟩,⟨38213218664480540545669216157688261699503103798263478,38213218664480540545669216157688261699503103798318768⟩⟩, + ⟨⟨-22326088095411036120644579506722651507478616639225987,-22326088095411036120644579506722651507478616639195840⟩,⟨-37393437447474752717732634830723922326541286969775157,-37393437447474752717732634830723922326541286969744885⟩⟩] +lemma tw0_1_2_19_calc (j : Fin 31) : taylorWaveBox 0 1 2 19 j = tw0_1_2_19 j := by + revert j + decide +kernel +def tw0_1_2_20 : Fin 31 → CI := ![⟨⟨-6624138771090523956654955280915879663202338205313687,-6624138771090523956654955280915879663202338205306946⟩,⟨-5545918101376763517599063104559248377070738516652222,-5545918101376763517599063104559248377070738516645513⟩⟩, + ⟨⟨9842088549995013361953161300939422913266790770716440,9842088549995013361953161300939422913266790770728883⟩,⟨-8318720354805292438121290369386433766085279918913552,-8318720354805292438121290369386433766085279918901095⟩⟩, + ⟨⟨6846897993508547631956421254569721334298844813788846,6846897993508547631956421254569721334298844813812552⟩,⟨16200248627626525804969810545041373923235831304010114,16200248627626525804969810545041373923235831304033799⟩⟩, + ⟨⟨-21226623970197720907596787384443260470051262615388985,-21226623970197720907596787384443260470051262615354963⟩,⟨-848504749944759407939715938171298636295161745323144,-848504749944759407939715938171298636295161745289147⟩⟩, + ⟨⟨12666789002538851105132075014562731684151455220986414,12666789002538851105132075014562731684151455221056695⟩,⟨-17671449529469216979202519088234177922763056307095671,-17671449529469216979202519088234177922763056307025381⟩⟩, + ⟨⟨4039993959021562010248344111747540741849822916174823,4039993959021562010248344111747540741849822916257496⟩,⟨17359280612510530400306281905455319974810804727776180,17359280612510530400306281905455319974810804727858840⟩⟩, + ⟨⟨-8920623476136122193691670695061837861559439484478971,-8920623476136122193691670695061837861559439484417002⟩,⟨-6253262361145566272590835695648746471203336885572220,-6253262361145566272590835695648746471203336885510266⟩⟩, + ⟨⟨4543393881315797389523556888585564172763295191512785,4543393881315797389523556888585564172763295191561184⟩,⟨-196232863289831522623433596794655995938535913701247,-196232863289831522623433596794655995938535913652848⟩⟩, + ⟨⟨-891711229809534696666484788472681590607302185772413,-891711229809534696666484788472681590607302185759883⟩,⟨760799216382310848269229746633906772237339348671690,760799216382310848269229746633906772237339348684221⟩⟩, + ⟨⟨7528196447686475284857556218385302686784602587284,7528196447686475284857556218385302686784602590035⟩,⟨-168523493292043623540901564053395965606526629600682,-168523493292043623540901564053395965606526629597932⟩⟩, + ⟨⟨11650015995939385966891882055230617227381512595204,11650015995939385966891882055230617227381512595408⟩,⟨4975166842637047531093509676215353966307108890923,4975166842637047531093509676215353966307108891126⟩⟩, + ⟨⟨-18568754067081952537433941815928002782320703024,-18568754067081952537433941815928002782320702992⟩,⟨510855130389667148616598452606126907492666053837,510855130389667148616598452606126907492666053867⟩⟩, + ⟨⟨-1617120510249200247357291062919221492188226516,-1617120510249200247357291062919221492188226394⟩,⟨13769599505809767329807691876160402436432805516,13769599505809767329807691876160402436432805649⟩⟩, + ⟨⟨398974280896532420186502712862065913291358185,398974280896532420186502712862065913291358658⟩,⟨132396492719672255650660403247895210029660638,132396492719672255650660403247895210029661111⟩⟩, + ⟨⟨-24700621716798677565166914142576891685749016,-24700621716798677565166914142576891685747750⟩,⟨-18191939706613768509122930214022535890920934,-18191939706613768509122930214022535890919669⟩⟩, + ⟨⟨11500136017340244155834365323474631065288413,11500136017340244155834365323474631065290082⟩,⟨-835,954⟩⟩, + ⟨⟨-24700621716798677565166914142576891685749016,-24700621716798677565166914142576891685747750⟩,⟨18191939706613768509122930214022535890919669,18191939706613768509122930214022535890920934⟩⟩, + ⟨⟨398974280896532420186502712862065913291358185,398974280896532420186502712862065913291358658⟩,⟨-132396492719672255650660403247895210029661111,-132396492719672255650660403247895210029660638⟩⟩, + ⟨⟨-1617120510249200247357291062919221492188226516,-1617120510249200247357291062919221492188226394⟩,⟨-13769599505809767329807691876160402436432805649,-13769599505809767329807691876160402436432805516⟩⟩, + ⟨⟨-18568754067081952537433941815928002782320703024,-18568754067081952537433941815928002782320702992⟩,⟨-510855130389667148616598452606126907492666053867,-510855130389667148616598452606126907492666053837⟩⟩, + ⟨⟨11650015995939385966891882055230617227381512595204,11650015995939385966891882055230617227381512595408⟩,⟨-4975166842637047531093509676215353966307108891126,-4975166842637047531093509676215353966307108890923⟩⟩, + ⟨⟨7528196447686475284857556218385302686784602587284,7528196447686475284857556218385302686784602590035⟩,⟨168523493292043623540901564053395965606526629597932,168523493292043623540901564053395965606526629600682⟩⟩, + ⟨⟨-891711229809534696666484788472681590607302185772413,-891711229809534696666484788472681590607302185759883⟩,⟨-760799216382310848269229746633906772237339348684221,-760799216382310848269229746633906772237339348671690⟩⟩, + ⟨⟨4543393881315797389523556888585564172763295191512785,4543393881315797389523556888585564172763295191561184⟩,⟨196232863289831522623433596794655995938535913652848,196232863289831522623433596794655995938535913701247⟩⟩, + ⟨⟨-8920623476136122193691670695061837861559439484478971,-8920623476136122193691670695061837861559439484417002⟩,⟨6253262361145566272590835695648746471203336885510266,6253262361145566272590835695648746471203336885572220⟩⟩, + ⟨⟨4039993959021562010248344111747540741849822916174823,4039993959021562010248344111747540741849822916257496⟩,⟨-17359280612510530400306281905455319974810804727858840,-17359280612510530400306281905455319974810804727776180⟩⟩, + ⟨⟨12666789002538851105132075014562731684151455220986414,12666789002538851105132075014562731684151455221056695⟩,⟨17671449529469216979202519088234177922763056307025381,17671449529469216979202519088234177922763056307095671⟩⟩, + ⟨⟨-21226623970197720907596787384443260470051262615388985,-21226623970197720907596787384443260470051262615354963⟩,⟨848504749944759407939715938171298636295161745289147,848504749944759407939715938171298636295161745323144⟩⟩, + ⟨⟨6846897993508547631956421254569721334298844813788846,6846897993508547631956421254569721334298844813812552⟩,⟨-16200248627626525804969810545041373923235831304033799,-16200248627626525804969810545041373923235831304010114⟩⟩, + ⟨⟨9842088549995013361953161300939422913266790770716440,9842088549995013361953161300939422913266790770728883⟩,⟨8318720354805292438121290369386433766085279918901095,8318720354805292438121290369386433766085279918913552⟩⟩, + ⟨⟨-6624138771090523956654955280915879663202338205313687,-6624138771090523956654955280915879663202338205306946⟩,⟨5545918101376763517599063104559248377070738516645513,5545918101376763517599063104559248377070738516652222⟩⟩] +lemma tw0_1_2_20_calc (j : Fin 31) : taylorWaveBox 0 1 2 20 j = tw0_1_2_20 j := by + revert j + decide +kernel +def tw0_1_2 : Fin 21 → Fin 31 → CI := ![tw0_1_2_0,tw0_1_2_1,tw0_1_2_2,tw0_1_2_3,tw0_1_2_4,tw0_1_2_5,tw0_1_2_6,tw0_1_2_7,tw0_1_2_8,tw0_1_2_9,tw0_1_2_10,tw0_1_2_11,tw0_1_2_12,tw0_1_2_13,tw0_1_2_14,tw0_1_2_15,tw0_1_2_16,tw0_1_2_17,tw0_1_2_18,tw0_1_2_19,tw0_1_2_20] +lemma tw0_1_2_mem (l : Fin 21) (j : Fin 31) : (tw0_1_2 l j).Mem (taylorWave 0 1 (nearNode 2) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 2 l j = tw0_1_2 l j := by + fin_cases l + · exact tw0_1_2_0_calc j + · exact tw0_1_2_1_calc j + · exact tw0_1_2_2_calc j + · exact tw0_1_2_3_calc j + · exact tw0_1_2_4_calc j + · exact tw0_1_2_5_calc j + · exact tw0_1_2_6_calc j + · exact tw0_1_2_7_calc j + · exact tw0_1_2_8_calc j + · exact tw0_1_2_9_calc j + · exact tw0_1_2_10_calc j + · exact tw0_1_2_11_calc j + · exact tw0_1_2_12_calc j + · exact tw0_1_2_13_calc j + · exact tw0_1_2_14_calc j + · exact tw0_1_2_15_calc j + · exact tw0_1_2_16_calc j + · exact tw0_1_2_17_calc j + · exact tw0_1_2_18_calc j + · exact tw0_1_2_19_calc j + · exact tw0_1_2_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 2 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave013.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave013.lean new file mode 100644 index 0000000000000000000000000000000000000000..098c59974d38fae952e8ef72846b47bf66601ec8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave013.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_3_0 : Fin 31 → CI := ![⟨⟨50698681229564546708964633172219633026484609798944356403313,50698681229564546708964633172219633026484609799023707917602⟩,⟨83353106988410154474405801815192012867412437311251867512675,83353106988410154474405801815192012867412437311331174731718⟩⟩, + ⟨⟨-21643602053394986753653594313065985332814105704570224323392,-21643602053394986753653594313065985332814105704553573999312⟩,⟨12601274735699805681486049616859528686403798437681613515728,12601274735699805681486049616859528686403798437698282283053⟩⟩, + ⟨⟨-1916636349669789275693374594915035343803343397316909944063,-1916636349669789275693374594915035343803343397310864160888⟩,⟨-4510180424123249970919517084439630432922711529588621994700,-4510180424123249970919517084439630432922711529582578481752⟩⟩, + ⟨⟨674171984634651048509784352644280861726295814492215800313,674171984634651048509784352644280861726295814493019437764⟩,⟨-121090033432553347703540600916393973316641406496579013668,-121090033432553347703540600916393973316641406495775475191⟩⟩, + ⟨⟨-7880078880351627914628103978599574435283332636688042375,-7880078880351627914628103978599574435283332636611100433⟩,⟨62525787020697812770141103583660468518881605514432154262,62525787020697812770141103583660468518881605514509145592⟩⟩, + ⟨⟨-3077453199332813792999687386869811611473022182888376523,-3077453199332813792999687386869811611473022182884326942⟩,⟨-1552368209095428051974417830312296517913465940594035276,-1552368209095428051974417830312296517913465940589989693⟩⟩, + ⟨⟨69165705700331230717004439836902866748297291428611427,69165705700331230717004439836902866748297291428789289⟩,⟨-70764386021995276434601746154997248819274750107444134,-70764386021995276434601746154997248819274750107266165⟩⟩, + ⟨⟨782515771710818521564482296920777344619252022426310,782515771710818521564482296920777344619252022429196⟩,⟨1024226211567345180397746422977504236787798212819708,1024226211567345180397746422977504236787798212822594⟩⟩, + ⟨⟨-4148765886802970473781852316032035524266915798852,-4148765886802970473781852316032035524266915798575⟩,⟨5023429805385630105013334849152924239792191015277,5023429805385630105013334849152924239792191015538⟩⟩, + ⟨⟨-10821744105995266135023640921283491316111332976,-10821744105995266135023640921283491316111332604⟩,⟨2663803333817183453383674547930373834896218663,2663803333817183453383674547930373834896219008⟩⟩, + ⟨⟨-4290445558402564602193803462385946774136023,-4290445558402564602193803462385946774135622⟩,⟨4388782870269757184466278624529600031916836,4388782870269757184466278624529600031917237⟩⟩, + ⟨⟨1275754020702529232398533983970086030781,1275754020702529232398533983970086031294⟩,⟨-83456649590519759650346313057216880504,-83456649590519759650346313057216879961⟩⟩, + ⟨⟨62100035634898122674611456720585652,62100035634898122674611456720586360⟩,⟨163586715566102225034402872172064424,163586715566102225034402872172065132⟩⟩, + ⟨⟨36776574038008902352784287204319,36776574038008902352784287205164⟩,⟨-29667663461261205501768807289177,-29667663461261205501768807288325⟩⟩, + ⟨⟨96990703943388996696304402103,96990703943388996696304402877⟩,⟨72475106191061348236728102376,72475106191061348236728103113⟩⟩, + ⟨⟨13370693723267795389659649812,13370693723267795389659650637⟩,⟨-444,508⟩⟩, + ⟨⟨96990703943388996696304402103,96990703943388996696304402877⟩,⟨-72475106191061348236728103112,-72475106191061348236728102375⟩⟩, + ⟨⟨36776574038008902352784287204319,36776574038008902352784287205164⟩,⟨29667663461261205501768807288326,29667663461261205501768807289178⟩⟩, + ⟨⟨62100035634898122674611456720585652,62100035634898122674611456720586360⟩,⟨-163586715566102225034402872172065131,-163586715566102225034402872172064423⟩⟩, + ⟨⟨1275754020702529232398533983970086030781,1275754020702529232398533983970086031294⟩,⟨83456649590519759650346313057216879962,83456649590519759650346313057216880504⟩⟩, + ⟨⟨-4290445558402564602193803462385946774136023,-4290445558402564602193803462385946774135622⟩,⟨-4388782870269757184466278624529600031917237,-4388782870269757184466278624529600031916835⟩⟩, + ⟨⟨-10821744105995266135023640921283491316111332976,-10821744105995266135023640921283491316111332604⟩,⟨-2663803333817183453383674547930373834896219007,-2663803333817183453383674547930373834896218662⟩⟩, + ⟨⟨-4148765886802970473781852316032035524266915798852,-4148765886802970473781852316032035524266915798575⟩,⟨-5023429805385630105013334849152924239792191015537,-5023429805385630105013334849152924239792191015276⟩⟩, + ⟨⟨782515771710818521564482296920777344619252022426310,782515771710818521564482296920777344619252022429196⟩,⟨-1024226211567345180397746422977504236787798212822594,-1024226211567345180397746422977504236787798212819708⟩⟩, + ⟨⟨69165705700331230717004439836902866748297291428611427,69165705700331230717004439836902866748297291428789289⟩,⟨70764386021995276434601746154997248819274750107266166,70764386021995276434601746154997248819274750107444134⟩⟩, + ⟨⟨-3077453199332813792999687386869811611473022182888376523,-3077453199332813792999687386869811611473022182884326942⟩,⟨1552368209095428051974417830312296517913465940589989694,1552368209095428051974417830312296517913465940594035276⟩⟩, + ⟨⟨-7880078880351627914628103978599574435283332636688042375,-7880078880351627914628103978599574435283332636611100433⟩,⟨-62525787020697812770141103583660468518881605514509145592,-62525787020697812770141103583660468518881605514432154262⟩⟩, + ⟨⟨674171984634651048509784352644280861726295814492215800278,674171984634651048509784352644280861726295814493019437779⟩,⟨121090033432553347703540600916393973316641406495775475191,121090033432553347703540600916393973316641406496579013713⟩⟩, + ⟨⟨-1916636349669789275693374594915035343803343397316909944118,-1916636349669789275693374594915035343803343397310864160909⟩,⟨4510180424123249970919517084439630432922711529582578481695,4510180424123249970919517084439630432922711529588621994690⟩⟩, + ⟨⟨-21643602053394986753653594313065985332814105704570224323554,-21643602053394986753653594313065985332814105704553573998976⟩,⟨-12601274735699805681486049616859528686403798437698282283421,-12601274735699805681486049616859528686403798437681613515605⟩⟩, + ⟨⟨50698681229564546708964633172219633026484609798944356403448,50698681229564546708964633172219633026484609799023707918233⟩,⟨-83353106988410154474405801815192012867412437311331174731733,-83353106988410154474405801815192012867412437311251867512188⟩⟩] +lemma tw0_1_3_0_calc (j : Fin 31) : taylorWaveBox 0 1 3 0 j = tw0_1_3_0 j := by + revert j + decide +kernel +def tw0_1_3_1 : Fin 31 → CI := ![⟨⟨-131389945498317602736324185808996129868209418460795626780135,-131389945498317602736324185808996129868209418460671973105285⟩,⟨53652137894500485562926874398456863679177567540576294039005,53652137894500485562926874398456863679177567540700028396765⟩⟩, + ⟨⟨-12438588662871514679888922052693696764322444130841219922493,-12438588662871514679888922052693696764322444130813867876787⟩,⟨-36436610101504560803646015810496692553958288095958745091853,-36436610101504560803646015810496692553958288095931425583526⟩⟩, + ⟨⟨7883129660394809204630168333708928095712918057225271552827,7883129660394809204630168333708928095712918057235609438109⟩,⟨-1278852708464917990830225788861369942678780649922706373790,-1278852708464917990830225788861369942678780649912364637321⟩⟩, + ⟨⟨-130172246371575848322875120219486630857566219522285214942,-130172246371575848322875120219486630857566219520858921760⟩,⟨1180062010743298705900487820965477149450753219917013915942,1180062010743298705900487820965477149450753219918440345899⟩⟩, + ⟨⟨-104247072494759817869999067028953942276158018668718069619,-104247072494759817869999067028953942276158018668577919735⟩,⟨-52180534902508891689151840808850526926719889208267182883,-52180534902508891689151840808850526926719889208127097949⟩⟩, + ⟨⟨5186387240332722674815922195182998425174611561995743646,5186387240332722674815922195182998425174611562003169960⟩,⟨-4442551084166393438484147622981678302636157046883401834,-4442551084166393438484147622981678302636157046875971486⟩⟩, + ⟨⟨69943147399302724055120086808638951156786003395426532,69943147399302724055120086808638951156786003395745492⟩,⟨198767115619417659831696745933951783580468894028254216,198767115619417659831696745933951783580468894028573151⟩⟩, + ⟨⟨-2937546745954122197569431066070021513654128719813699,-2937546745954122197569431066070021513654128719808725⟩,⟨362656799646202175609707446848753065344499293624899,362656799646202175609707446848753065344499293629873⟩⟩, + ⟨⟨-4318381193853969887507850825440112487098004162700,-4318381193853969887507850825440112487098004162090⟩,⟨-15591158553338175976297035844922120917048574634701,-15591158553338175976297035844922120917048574634043⟩⟩, + ⟨⟨13338922156094204978388946196739889385902763646,13338922156094204978388946196739889385902764772⟩,⟨-26845763117099085653998564140133212933489383561,-26845763117099085653998564140133212933489382405⟩⟩, + ⟨⟨208271998882060169727867495411243312612593,208271998882060169727867495411243312614164⟩,⟨-17878809349801678389008520198451752024180346,-17878809349801678389008520198451752024178775⟩⟩, + ⟨⟨-3059734323993338126048739753404041691117,-3059734323993338126048739753404041689450⟩,⟨2609721132825725319830900181879191647169,2609721132825725319830900181879191648920⟩⟩, + ⟨⟨-449016021531788683743453470365040416,-449016021531788683743453470365038583⟩,⟨-382605560492140882633511219326337947,-382605560492140882633511219326336115⟩⟩, + ⟨⟨-87388089820787587753901022866309,-87388089820787587753901022863337⟩,⟨144109180157194939048356763552268,144109180157194939048356763555167⟩⟩, + ⟨⟨-400784116843249243975902964317,-400784116843249243975902961306⟩,⟨-200695559284917203003839336003,-200695559284917203003839333072⟩⟩, + ⟨⟨-50148256196333711040182507286,-50148256196333711040182504198⟩,⟨-1900,1663⟩⟩, + ⟨⟨-400784116843249243975902964317,-400784116843249243975902961306⟩,⟨200695559284917203003839333073,200695559284917203003839336003⟩⟩, + ⟨⟨-87388089820787587753901022866309,-87388089820787587753901022863337⟩,⟨-144109180157194939048356763555167,-144109180157194939048356763552268⟩⟩, + ⟨⟨-449016021531788683743453470365040416,-449016021531788683743453470365038583⟩,⟨382605560492140882633511219326336115,382605560492140882633511219326337948⟩⟩, + ⟨⟨-3059734323993338126048739753404041691117,-3059734323993338126048739753404041689450⟩,⟨-2609721132825725319830900181879191648919,-2609721132825725319830900181879191647169⟩⟩, + ⟨⟨208271998882060169727867495411243312612593,208271998882060169727867495411243312614164⟩,⟨17878809349801678389008520198451752024178775,17878809349801678389008520198451752024180346⟩⟩, + ⟨⟨13338922156094204978388946196739889385902763646,13338922156094204978388946196739889385902764772⟩,⟨26845763117099085653998564140133212933489382405,26845763117099085653998564140133212933489383561⟩⟩, + ⟨⟨-4318381193853969887507850825440112487098004162700,-4318381193853969887507850825440112487098004162090⟩,⟨15591158553338175976297035844922120917048574634043,15591158553338175976297035844922120917048574634701⟩⟩, + ⟨⟨-2937546745954122197569431066070021513654128719813699,-2937546745954122197569431066070021513654128719808725⟩,⟨-362656799646202175609707446848753065344499293629873,-362656799646202175609707446848753065344499293624899⟩⟩, + ⟨⟨69943147399302724055120086808638951156786003395426532,69943147399302724055120086808638951156786003395745492⟩,⟨-198767115619417659831696745933951783580468894028573151,-198767115619417659831696745933951783580468894028254216⟩⟩, + ⟨⟨5186387240332722674815922195182998425174611561995743646,5186387240332722674815922195182998425174611562003169960⟩,⟨4442551084166393438484147622981678302636157046875971487,4442551084166393438484147622981678302636157046883401834⟩⟩, + ⟨⟨-104247072494759817869999067028953942276158018668718069619,-104247072494759817869999067028953942276158018668577919735⟩,⟨52180534902508891689151840808850526926719889208127097949,52180534902508891689151840808850526926719889208267182883⟩⟩, + ⟨⟨-130172246371575848322875120219486630857566219522285214942,-130172246371575848322875120219486630857566219520858921676⟩,⟨-1180062010743298705900487820965477149450753219918440345935,-1180062010743298705900487820965477149450753219917013915896⟩⟩, + ⟨⟨7883129660394809204630168333708928095712918057225271552752,7883129660394809204630168333708928095712918057235609438106⟩,⟨1278852708464917990830225788861369942678780649912364637361,1278852708464917990830225788861369942678780649922706373896⟩⟩, + ⟨⟨-12438588662871514679888922052693696764322444130841219923107,-12438588662871514679888922052693696764322444130813867876597⟩,⟨36436610101504560803646015810496692553958288095931425583028,36436610101504560803646015810496692553958288095958745092163⟩⟩, + ⟨⟨-131389945498317602736324185808996129868209418460795626780275,-131389945498317602736324185808996129868209418460671973104646⟩,⟨-53652137894500485562926874398456863679177567540700028397755,-53652137894500485562926874398456863679177567540576294039223⟩⟩] +lemma tw0_1_3_1_calc (j : Fin 31) : taylorWaveBox 0 1 3 1 j = tw0_1_3_1 j := by + revert j + decide +kernel +def tw0_1_3_2 : Fin 31 → CI := ![⟨⟨-35134285381924392588031855139304425387606275984141434122275,-35134285381924392588031855139304425387606275984000615424203⟩,⟨-150802253173415483792594558308904871194148554723950612906264,-150802253173415483792594558308904871194148554723809887873171⟩⟩, + ⟨⟨44012332439932522870542095022760328049118121167679966821381,44012332439932522870542095022760328049118121167712284115226⟩,⟨-5785474840999592917320231763646245535719936167589689715875,-5785474840999592917320231763646245535719936167557336774008⟩⟩, + ⟨⟨-781842457183539789503452044607063958207892885054579202121,-781842457183539789503452044607063958207892885042053774832⟩,⟨9729698137267676478337346700663887307537671430810839700714,9729698137267676478337346700663887307537671430823361317921⟩⟩, + ⟨⟨-1423027627293868963914043839558748452132432116154723026203,-1423027627293868963914043839558748452132432116152973719517⟩,⟨-597371970858491958648591383741727496143507058534464013645,-597371970858491958648591383741727496143507058532714785500⟩⟩, + ⟨⟨116337869901693210339142301993222905848561877562231924203,116337869901693210339142301993222905848561877562401575974⟩,⟨-112357394478436487592402659655918455838572468334126342296,-112357394478436487592402659655918455838572468333956672805⟩⟩, + ⟨⟨3124458414502572239470722155303446838780338171653981324,3124458414502572239470722155303446838780338171662647199⟩,⟨9654371179161097976600415684822337072451613206989617117,9654371179161097976600415684822337072451613206998286131⟩⟩, + ⟨⟨-334105194093671191192995399386152873918059227928979222,-334105194093671191192995399386152873918059227928445610⟩,⟨-40325655607820728185551967640945834606999892527315905,-40325655607820728185551967640945834606999892526782624⟩⟩, + ⟨⟨2016690886895542108662905737874223565637049566028112,2016690886895542108662905737874223565637049566039690⟩,⟨-4681732626968107611905944984395755406401798816449848,-4681732626968107611905944984395755406401798816438265⟩⟩, + ⟨⟨28404273897733654953107477821725449859057052463258,28404273897733654953107477821725449859057052464608⟩,⟨10049742117322763665915189462961525603483521108049,10049742117322763665915189462961525603483521109415⟩⟩, + ⟨⟨23947615498574054632468231229502139595710488765,23947615498574054632468231229502139595710490845⟩,⟨55530055855696179895873901673277178024027003733,55530055855696179895873901673277178024027005922⟩⟩, + ⟨⟨26651211737237581204794955170320597744580754,26651211737237581204794955170320597744583399⟩,⟨28563901561618060459400401281580526146264427,28563901561618060459400401281580526146267072⟩⟩, + ⟨⟨2105067305250886489708183759736634591687,2105067305250886489708183759736634596080⟩,⟨-9250919795869935290537908787710764406586,-9250919795869935290537908787710764402289⟩⟩, + ⟨⟨1460872839542092883624062058828280164,1460872839542092883624062058828285964⟩,⟨301362954311226950160951144336968609,301362954311226950160951144336974408⟩⟩, + ⟨⟨88793259669985889017153494949985,88793259669985889017153494956890⟩,⟨-442016442506238866894325395751655,-442016442506238866894325395745188⟩⟩, + ⟨⟨1193664816323284041581127931652,1193664816323284041581127940179⟩,⟨352017286356799404124849109275,352017286356799404124849117734⟩⟩, + ⟨⟨141064909471942535237780665160,141064909471942535237780673844⟩,⟨-4676,5343⟩⟩, + ⟨⟨1193664816323284041581127931652,1193664816323284041581127940179⟩,⟨-352017286356799404124849117734,-352017286356799404124849109275⟩⟩, + ⟨⟨88793259669985889017153494949985,88793259669985889017153494956890⟩,⟨442016442506238866894325395745188,442016442506238866894325395751655⟩⟩, + ⟨⟨1460872839542092883624062058828280164,1460872839542092883624062058828285964⟩,⟨-301362954311226950160951144336974408,-301362954311226950160951144336968608⟩⟩, + ⟨⟨2105067305250886489708183759736634591687,2105067305250886489708183759736634596080⟩,⟨9250919795869935290537908787710764402289,9250919795869935290537908787710764406586⟩⟩, + ⟨⟨26651211737237581204794955170320597744580754,26651211737237581204794955170320597744583399⟩,⟨-28563901561618060459400401281580526146267072,-28563901561618060459400401281580526146264427⟩⟩, + ⟨⟨23947615498574054632468231229502139595710488765,23947615498574054632468231229502139595710490845⟩,⟨-55530055855696179895873901673277178024027005922,-55530055855696179895873901673277178024027003733⟩⟩, + ⟨⟨28404273897733654953107477821725449859057052463258,28404273897733654953107477821725449859057052464608⟩,⟨-10049742117322763665915189462961525603483521109415,-10049742117322763665915189462961525603483521108049⟩⟩, + ⟨⟨2016690886895542108662905737874223565637049566028112,2016690886895542108662905737874223565637049566039690⟩,⟨4681732626968107611905944984395755406401798816438265,4681732626968107611905944984395755406401798816449848⟩⟩, + ⟨⟨-334105194093671191192995399386152873918059227928979222,-334105194093671191192995399386152873918059227928445610⟩,⟨40325655607820728185551967640945834606999892526782624,40325655607820728185551967640945834606999892527315905⟩⟩, + ⟨⟨3124458414502572239470722155303446838780338171653981324,3124458414502572239470722155303446838780338171662647199⟩,⟨-9654371179161097976600415684822337072451613206998286131,-9654371179161097976600415684822337072451613206989617117⟩⟩, + ⟨⟨116337869901693210339142301993222905848561877562231924203,116337869901693210339142301993222905848561877562401575974⟩,⟨112357394478436487592402659655918455838572468333956672805,112357394478436487592402659655918455838572468334126342296⟩⟩, + ⟨⟨-1423027627293868963914043839558748452132432116154723026259,-1423027627293868963914043839558748452132432116152973719480⟩,⟨597371970858491958648591383741727496143507058532714785392,597371970858491958648591383741727496143507058534464013645⟩⟩, + ⟨⟨-781842457183539789503452044607063958207892885054579202069,-781842457183539789503452044607063958207892885042053774687⟩,⟨-9729698137267676478337346700663887307537671430823361317933,-9729698137267676478337346700663887307537671430810839700652⟩⟩, + ⟨⟨44012332439932522870542095022760328049118121167679966820849,44012332439932522870542095022760328049118121167712284115641⟩,⟨5785474840999592917320231763646245535719936167557336773796,5785474840999592917320231763646245535719936167589689716609⟩⟩, + ⟨⟨-35134285381924392588031855139304425387606275984141434123407,-35134285381924392588031855139304425387606275984000615424459⟩,⟨150802253173415483792594558308904871194148554723809887872566,150802253173415483792594558308904871194148554723950612906539⟩⟩] +lemma tw0_1_3_2_calc (j : Fin 31) : taylorWaveBox 0 1 3 2 j = tw0_1_3_2 j := by + revert j + decide +kernel +def tw0_1_3_3 : Fin 31 → CI := ![⟨⟨134816641199344541646554200182673326834509053727732423756257,134816641199344541646554200182673326834509053727857406178737⟩,⟨-9468959058868706492028436633937916156066982975383964219357,-9468959058868706492028436633937916156066982975258904326562⟩⟩, + ⟨⟨-2764482513491143586707041444225996243196413512877415557495,-2764482513491143586707041444225996243196413512847922580070⟩,⟨40851898273087602540490882208207456070033679566375997820565,40851898273087602540490882208207456070033679566405464700420⟩⟩, + ⟨⟨-9056206271055274901919095916334520804177916592154012387553,-9056206271055274901919095916334520804177916592142565672761⟩,⟨-3013130660068218913301428523855822746126142701857718373421,-3013130660068218913301428523855822746126142701846269605721⟩⟩, + ⟨⟨1015480971385648467681634321255492221191592056441202832222,1015480971385648467681634321255492221191592056442768367369⟩,⟨-1242910042878521229355451161657212017492977091384949435467,-1242910042878521229355451161657212017492977091383383956282⟩⟩, + ⟨⟨74715248781495423790374190985442417287219391985681377862,74715248781495423790374190985442417287219391985859458591⟩,⟨163223674796083816390828809014951070780685206309827431333,163223674796083816390828809014951070780685206310005590312⟩⟩, + ⟨⟨-12021776199108200095170638562029864963585673334981353938,-12021776199108200095170638562029864963585673334967917900⟩,⟨-991801155728252822338442089196680456214175350390813282,-991801155728252822338442089196680456214175350377392125⟩⟩, + ⟨⟨235128239492848465155309932609680958422314483420218177,235128239492848465155309932609680958422314483421005536⟩,⟨-359991583318816657698596620802246501221894809032633175,-359991583318816657698596620802246501221894809031845274⟩⟩, + ⟨⟨4163294249732131296670125788583987352306995186989635,4163294249732131296670125788583987352306995187005439⟩,⟨5656563262994888342543608504357291623087368512025927,5656563262994888342543608504357291623087368512041726⟩⟩, + ⟨⟨-36523086674239022882159817583987489754172344836544,-36523086674239022882159817583987489754172344834897⟩,⟨26099648412822303176311567965192201356789223494039,26099648412822303176311567965192201356789223495512⟩⟩, + ⟨⟨-93371130424885525831992061067553405463915462465,-93371130424885525831992061067553405463915458877⟩,⟨-28407045406936221620852178125311146155005185224,-28407045406936221620852178125311146155005181798⟩⟩, + ⟨⟨-68172265996515338595128745247239629158987997,-68172265996515338595128745247239629158982026⟩,⟨-3931421427700111593513628997423683101130667,-3931421427700111593513628997423683101124697⟩⟩, + ⟨⟨7254213709121167669775748327532089641819,7254213709121167669775748327532089648395⟩,⟨16370561494570816841736545505657086375934,16370561494570816841736545505657086381927⟩⟩, + ⟨⟨-2883599138030127224836032823699827641,-2883599138030127224836032823699815316⟩,⟨888334307992024250800212611132880490,888334307992024250800212611132892814⟩⟩, + ⟨⟨142873585437541875689226616374458,142873585437541875689226616389050⟩,⟨954206970848139696499365606243762,954206970848139696499365606257391⟩⟩, + ⟨⟨-2747738990640926106873409903893,-2747738990640926106873409885176⟩,⟨-301523989011633710833478632382,-301523989011633710833478613462⟩⟩, + ⟨⟨-317447667275531888076116656055,-317447667275531888076116636516⟩,⟨-12024,10521⟩⟩, + ⟨⟨-2747738990640926106873409903893,-2747738990640926106873409885176⟩,⟨301523989011633710833478613462,301523989011633710833478632382⟩⟩, + ⟨⟨142873585437541875689226616374458,142873585437541875689226616389050⟩,⟨-954206970848139696499365606257391,-954206970848139696499365606243762⟩⟩, + ⟨⟨-2883599138030127224836032823699827641,-2883599138030127224836032823699815316⟩,⟨-888334307992024250800212611132892814,-888334307992024250800212611132880490⟩⟩, + ⟨⟨7254213709121167669775748327532089641819,7254213709121167669775748327532089648395⟩,⟨-16370561494570816841736545505657086381927,-16370561494570816841736545505657086375934⟩⟩, + ⟨⟨-68172265996515338595128745247239629158987997,-68172265996515338595128745247239629158982026⟩,⟨3931421427700111593513628997423683101124697,3931421427700111593513628997423683101130667⟩⟩, + ⟨⟨-93371130424885525831992061067553405463915462465,-93371130424885525831992061067553405463915458877⟩,⟨28407045406936221620852178125311146155005181798,28407045406936221620852178125311146155005185224⟩⟩, + ⟨⟨-36523086674239022882159817583987489754172344836544,-36523086674239022882159817583987489754172344834897⟩,⟨-26099648412822303176311567965192201356789223495512,-26099648412822303176311567965192201356789223494039⟩⟩, + ⟨⟨4163294249732131296670125788583987352306995186989635,4163294249732131296670125788583987352306995187005439⟩,⟨-5656563262994888342543608504357291623087368512041726,-5656563262994888342543608504357291623087368512025927⟩⟩, + ⟨⟨235128239492848465155309932609680958422314483420218177,235128239492848465155309932609680958422314483421005536⟩,⟨359991583318816657698596620802246501221894809031845274,359991583318816657698596620802246501221894809032633175⟩⟩, + ⟨⟨-12021776199108200095170638562029864963585673334981353938,-12021776199108200095170638562029864963585673334967917900⟩,⟨991801155728252822338442089196680456214175350377392125,991801155728252822338442089196680456214175350390813282⟩⟩, + ⟨⟨74715248781495423790374190985442417287219391985681377861,74715248781495423790374190985442417287219391985859458591⟩,⟨-163223674796083816390828809014951070780685206310005590312,-163223674796083816390828809014951070780685206309827431333⟩⟩, + ⟨⟨1015480971385648467681634321255492221191592056441202832119,1015480971385648467681634321255492221191592056442768367369⟩,⟨1242910042878521229355451161657212017492977091383383956269,1242910042878521229355451161657212017492977091384949435529⟩⟩, + ⟨⟨-9056206271055274901919095916334520804177916592154012387579,-9056206271055274901919095916334520804177916592142565672732⟩,⟨3013130660068218913301428523855822746126142701846269605574,3013130660068218913301428523855822746126142701857718373369⟩⟩, + ⟨⟨-2764482513491143586707041444225996243196413512877415557678,-2764482513491143586707041444225996243196413512847922579395⟩,⟨-40851898273087602540490882208207456070033679566405464700840,-40851898273087602540490882208207456070033679566375997820133⟩⟩, + ⟨⟨134816641199344541646554200182673326834509053727732423755823,134816641199344541646554200182673326834509053727857406179079⟩,⟨9468959058868706492028436633937916156066982975258904326795,9468959058868706492028436633937916156066982975383964220366⟩⟩] +lemma tw0_1_3_3_calc (j : Fin 31) : taylorWaveBox 0 1 3 3 j = tw0_1_3_3 j := by + revert j + decide +kernel +def tw0_1_3_4 : Fin 31 → CI := ![⟨⟨-8703719558376206902839281286873311144442288055970797977503,-8703719558376206902839281286873311144442288055880424452144⟩,⟨97914688637645291440866906924917173835251957210198844002808,97914688637645291440866906924917173835251957210289170023308⟩⟩, + ⟨⟨-30367080132437846324065359538578049246424176148637398441075,-30367080132437846324065359538578049246424176148615835356521⟩,⟨-8268407708126269900976436935660276799261671016679007957834,-8268407708126269900976436935660276799261671016657433085670⟩⟩, + ⟨⟨4145526849013626812674831869415706862028098151939418556489,4145526849013626812674831869415706862028098151947578805746⟩,⟨-6579965555195172240789286495465808480761583924811477756414,-6579965555195172240789286495465808480761583924803317374156⟩⟩, + ⟨⟨783298146054337045634514147864769043533499936895610391923,783298146054337045634514147864769043533499936897002475908⟩,⟨1149426364483858050766651518810459619630067361979258633541,1149426364483858050766651518810459619630067361980650881520⟩⟩, + ⟨⟨-165352757672357236582365669379542276772745199584679147756,-165352757672357236582365669379542276772745199584480106553⟩,⟨15015667400058946003483188070976183582929044103765096802,15015667400058946003483188070976183582929044103964002543⟩⟩, + ⟨⟨5492789073711385785532698035990761572759839420694242262,5492789073711385785532698035990761572759839420708677193⟩,⟨-10612208873995357221182185536228405431549271011241826068,-10612208873995357221182185536228405431549271011227376619⟩⟩, + ⟨⟨232913092106375127466059062760293277523957996747856895,232913092106375127466059062760293277523957996748639701⟩,⟨394131173511700462256563644790803313431273554014962645,394131173511700462256563644790803313431273554015745192⟩⟩, + ⟨⟨-8019843869672897175583805224866990815753801324177394,-8019843869672897175583805224866990815753801324163353⟩,⟨844517527872141807485251346701064788963352221737290,844517527872141807485251346701064788963352221751330⟩⟩, + ⟨⟨-568132917138131096447572215468624625522924558817,-568132917138131096447572215468624625522924556427⟩,⟨-55731869259359252074615338191750525264357197973482,-55731869259359252074615338191750525264357197971004⟩⟩, + ⟨⟨110295368489079207184621082223506881943636510297,110295368489079207184621082223506881943636515315⟩,⟨-71157177915973090207353812967464405612632002286,-71157177915973090207353812967464405612631997423⟩⟩, + ⟨⟨75766064194298871103776609076858294391196986,75766064194298871103776609076858294391203968⟩,⟨-64443019355658992480776851683431754614715404,-64443019355658992480776851683431754614708422⟩⟩, + ⟨⟨-24539344841491723079428720218835096076483,-24539344841491723079428720218835096063292⟩,⟨-13816941402651980383261459288326054460226,-13816941402651980383261459288326054447149⟩⟩, + ⟨⟨3539597967308234658936476631192562574,3539597967308234658936476631192579218⟩,⟨-3652636262433748801472085483135819931,-3652636262433748801472085483135803286⟩⟩, + ⟨⟨-818135410047625829947497714255150,-818135410047625829947497714224954⟩,⟨-1513752492545545887803118264700135,-1513752492545545887803118264670740⟩⟩, + ⟨⟨5104662916383598263091601909195,5104662916383598263091601942342⟩,⟨-348574306511265939506894809113,-348574306511265939506894774949⟩⟩, + ⟨⟨595311181190199455486681114342,595311181190199455486681150982⟩,⟨-19729,22548⟩⟩, + ⟨⟨5104662916383598263091601909195,5104662916383598263091601942342⟩,⟨348574306511265939506894774949,348574306511265939506894809113⟩⟩, + ⟨⟨-818135410047625829947497714255150,-818135410047625829947497714224954⟩,⟨1513752492545545887803118264670740,1513752492545545887803118264700135⟩⟩, + ⟨⟨3539597967308234658936476631192562574,3539597967308234658936476631192579218⟩,⟨3652636262433748801472085483135803286,3652636262433748801472085483135819931⟩⟩, + ⟨⟨-24539344841491723079428720218835096076483,-24539344841491723079428720218835096063292⟩,⟨13816941402651980383261459288326054447149,13816941402651980383261459288326054460226⟩⟩, + ⟨⟨75766064194298871103776609076858294391196986,75766064194298871103776609076858294391203968⟩,⟨64443019355658992480776851683431754614708422,64443019355658992480776851683431754614715404⟩⟩, + ⟨⟨110295368489079207184621082223506881943636510297,110295368489079207184621082223506881943636515315⟩,⟨71157177915973090207353812967464405612631997423,71157177915973090207353812967464405612632002286⟩⟩, + ⟨⟨-568132917138131096447572215468624625522924558817,-568132917138131096447572215468624625522924556427⟩,⟨55731869259359252074615338191750525264357197971004,55731869259359252074615338191750525264357197973482⟩⟩, + ⟨⟨-8019843869672897175583805224866990815753801324177394,-8019843869672897175583805224866990815753801324163353⟩,⟨-844517527872141807485251346701064788963352221751330,-844517527872141807485251346701064788963352221737290⟩⟩, + ⟨⟨232913092106375127466059062760293277523957996747856895,232913092106375127466059062760293277523957996748639701⟩,⟨-394131173511700462256563644790803313431273554015745192,-394131173511700462256563644790803313431273554014962645⟩⟩, + ⟨⟨5492789073711385785532698035990761572759839420694242262,5492789073711385785532698035990761572759839420708677193⟩,⟨10612208873995357221182185536228405431549271011227376619,10612208873995357221182185536228405431549271011241826068⟩⟩, + ⟨⟨-165352757672357236582365669379542276772745199584679147756,-165352757672357236582365669379542276772745199584480106553⟩,⟨-15015667400058946003483188070976183582929044103964002543,-15015667400058946003483188070976183582929044103765096802⟩⟩, + ⟨⟨783298146054337045634514147864769043533499936895610391923,783298146054337045634514147864769043533499936897002475975⟩,⟨-1149426364483858050766651518810459619630067361980650881529,-1149426364483858050766651518810459619630067361979258633460⟩⟩, + ⟨⟨4145526849013626812674831869415706862028098151939418556372,4145526849013626812674831869415706862028098151947578805706⟩,⟨6579965555195172240789286495465808480761583924803317374161,6579965555195172240789286495465808480761583924811477756447⟩⟩, + ⟨⟨-30367080132437846324065359538578049246424176148637398441415,-30367080132437846324065359538578049246424176148615835356248⟩,⟨8268407708126269900976436935660276799261671016657433085173,8268407708126269900976436935660276799261671016679007957958⟩⟩, + ⟨⟨-8703719558376206902839281286873311144442288055970797977330,-8703719558376206902839281286873311144442288055880424451414⟩,⟨-97914688637645291440866906924917173835251957210289170023623,-97914688637645291440866906924917173835251957210198844002568⟩⟩] +lemma tw0_1_3_4_calc (j : Fin 31) : taylorWaveBox 0 1 3 4 j = tw0_1_3_4 j := by + revert j + decide +kernel +def tw0_1_3_5 : Fin 31 → CI := ![⟨⟨-59418578571264449347770653410402542326017541705257547579366,-59418578571264449347770653410402542326017541705202913367167⟩,⟨-15009898285713456100246824513441387224133919971119919942771,-15009898285713456100246824513441387224133919971065264601147⟩⟩, + ⟨⟨9281725658492133371466305501250535000120259887715836680368,9281725658492133371466305501250535000120259887728820728746⟩,⟨-18542142787352976759573752579116321309272251891191857491975,-18542142787352976759573752579116321309272251891178874282529⟩⟩, + ⟨⟨3771716509899807064915935066221670348814066988848167699264,3771716509899807064915935066221670348814066988853886733744⟩,⟨3908548718340232095446353323021215607344596400491325123146,3908548718340232095446353323021215607344596400497042597596⟩⟩, + ⟨⟨-983797957908404702197264138387469052318537316259127515108,-983797957908404702197264138387469052318537316257915299169⟩,⟨315785047793948240246938190569463167298077482975177554108,315785047793948240246938190569463167298077482976389606008⟩⟩, + ⟨⟨32330132146976556317919645038370286430127232363133967464,32330132146976556317919645038370286430127232363301966783⟩,⟨-127596605727813048830322132874924900003585102623578676462,-127596605727813048830322132874924900003585102623410575596⟩⟩, + ⟨⟨6519871912087050233760840227660495729700856200347047361,6519871912087050233760840227660495729700856200358495506⟩,⟨7774256281667682298761549346542395239557450769325835951,7774256281667682298761549346542395239557450769337277968⟩⟩, + ⟨⟨-416623595136177138305912973917133058350541478876926764,-416623595136177138305912973917133058350541478876333397⟩,⟨31419213314452597561392138822192850151482196412048195,31419213314452597561392138822192850151482196412641331⟩⟩, + ⟨⟨3269816760360649659626248738479543671658259184682221,3269816760360649659626248738479543671658259184700672⟩,⟨-7231439114146794120180548957168617015471055856902831,-7231439114146794120180548957168617015471055856884373⟩⟩, + ⟨⟨48951124522345862267073991536687968755563956190229,48951124522345862267073991536687968755563956192697⟩,⟨33494636807119244049142248078831440630173714738353,33494636807119244049142248078831440630173714740941⟩⟩, + ⟨⟨-19545437130481251987455603750016115781409405069,-19545437130481251987455603750016115781409400273⟩,⟨150040691379842103893398045343244842249797864012,150040691379842103893398045343244842249797869150⟩⟩, + ⟨⟨-12837857238057966483531601044588724232484730,-12837857238057966483531601044588724232473942⟩,⟨123519908665197441804913213248199354583213098,123519908665197441804913213248199354583223886⟩⟩, + ⟨⟨37653820214622780623914632238417970557356,37653820214622780623914632238417970571920⟩,⟨-4848314734472976705182724756554115283670,-4848314734472976705182724756554115268114⟩⟩, + ⟨⟨-1941875613909653400735893114549455939,-1941875613909653400735893114549428088⟩,⟨7087924139326758400717816234654633895,7087924139326758400717816234654661746⟩⟩, + ⟨⟨1962776999380904246312644431517400,1962776999380904246312644431564439⟩,⟨1750984194296070064709933483580788,1750984194296070064709933483628150⟩⟩, + ⟨⟨-7873988084786329076572616998226,-7873988084786329076572616949664⟩,⟨1974175143337088692053758046079,1974175143337088692053758097221⟩⟩, + ⟨⟨-956905717472757775198604406798,-956905717472757775198604347902⟩,⟨-36243,31713⟩⟩, + ⟨⟨-7873988084786329076572616998226,-7873988084786329076572616949664⟩,⟨-1974175143337088692053758097221,-1974175143337088692053758046079⟩⟩, + ⟨⟨1962776999380904246312644431517400,1962776999380904246312644431564439⟩,⟨-1750984194296070064709933483628150,-1750984194296070064709933483580788⟩⟩, + ⟨⟨-1941875613909653400735893114549455939,-1941875613909653400735893114549428088⟩,⟨-7087924139326758400717816234654661746,-7087924139326758400717816234654633895⟩⟩, + ⟨⟨37653820214622780623914632238417970557356,37653820214622780623914632238417970571920⟩,⟨4848314734472976705182724756554115268114,4848314734472976705182724756554115283670⟩⟩, + ⟨⟨-12837857238057966483531601044588724232484730,-12837857238057966483531601044588724232473942⟩,⟨-123519908665197441804913213248199354583223886,-123519908665197441804913213248199354583213098⟩⟩, + ⟨⟨-19545437130481251987455603750016115781409405069,-19545437130481251987455603750016115781409400273⟩,⟨-150040691379842103893398045343244842249797869150,-150040691379842103893398045343244842249797864012⟩⟩, + ⟨⟨48951124522345862267073991536687968755563956190229,48951124522345862267073991536687968755563956192697⟩,⟨-33494636807119244049142248078831440630173714740941,-33494636807119244049142248078831440630173714738353⟩⟩, + ⟨⟨3269816760360649659626248738479543671658259184682221,3269816760360649659626248738479543671658259184700672⟩,⟨7231439114146794120180548957168617015471055856884373,7231439114146794120180548957168617015471055856902831⟩⟩, + ⟨⟨-416623595136177138305912973917133058350541478876926764,-416623595136177138305912973917133058350541478876333397⟩,⟨-31419213314452597561392138822192850151482196412641331,-31419213314452597561392138822192850151482196412048195⟩⟩, + ⟨⟨6519871912087050233760840227660495729700856200347047361,6519871912087050233760840227660495729700856200358495506⟩,⟨-7774256281667682298761549346542395239557450769337277968,-7774256281667682298761549346542395239557450769325835951⟩⟩, + ⟨⟨32330132146976556317919645038370286430127232363133967464,32330132146976556317919645038370286430127232363301966783⟩,⟨127596605727813048830322132874924900003585102623410575596,127596605727813048830322132874924900003585102623578676462⟩⟩, + ⟨⟨-983797957908404702197264138387469052318537316259127515125,-983797957908404702197264138387469052318537316257915299114⟩,⟨-315785047793948240246938190569463167298077482976389606071,-315785047793948240246938190569463167298077482975177554108⟩⟩, + ⟨⟨3771716509899807064915935066221670348814066988848167699280,3771716509899807064915935066221670348814066988853886733780⟩,⟨-3908548718340232095446353323021215607344596400497042597573,-3908548718340232095446353323021215607344596400491325123069⟩⟩, + ⟨⟨9281725658492133371466305501250535000120259887715836680068,9281725658492133371466305501250535000120259887728820728813⟩,⟨18542142787352976759573752579116321309272251891178874282394,18542142787352976759573752579116321309272251891191857492200⟩⟩, + ⟨⟨-59418578571264449347770653410402542326017541705257547579600,-59418578571264449347770653410402542326017541705202913367068⟩,⟨15009898285713456100246824513441387224133919971065264600705,15009898285713456100246824513441387224133919971119919942665⟩⟩] +lemma tw0_1_3_5_calc (j : Fin 31) : taylorWaveBox 0 1 3 5 j = tw0_1_3_5 j := by + revert j + decide +kernel +def tw0_1_3_6 : Fin 31 → CI := ![⟨⟨13210114728191057748840637326616330465485093165893804890265,13210114728191057748840637326616330465485093165922010382842⟩,⟨-30711314150508557176944971747631130241243678954834186444667,-30711314150508557176944971747631130241243678954805986550297⟩⟩, + ⟨⟨9425933256470639943898362632911121768547751806627371873930,9425933256470639943898362632911121768547751806634076080165⟩,⟨7351478448362458025027520368965435215009322910573132301481,7351478448362458025027520368965435215009322910579832431539⟩⟩, + ⟨⟨-2869720160876339854596680327722280633443068975163402024879,-2869720160876339854596680327722280633443068975159332342449⟩,⟨1668239398515851955490181616745039856007860580772011744836,1668239398515851955490181616745039856007860580776083074223⟩⟩, + ⟨⟨-15453873723525761350866545403000863272831550990176163334,-15453873723525761350866545403000863272831550989332239485⟩,⟨-671400936902330124802795677868427455188845521935275352459,-671400936902330124802795677868427455188845521934431331130⟩⟩, + ⟨⟨76031131643590318468799691534906379427606527214807995877,76031131643590318468799691534906379427606527214919463341⟩,⟨50563321535750940268103649946371776536095355407310172315,50563321535750940268103649946371776536095355407421599899⟩⟩, + ⟨⟨-7195940651946522287983105554230244678065422156738491680,-7195940651946522287983105554230244678065422156731543629⟩,⟨2246162402282600811549898355247251196474760377243582207,2246162402282600811549898355247251196474760377250527876⟩⟩, + ⟨⟨124743442858685099509080850819791153264546376215266858,124743442858685099509080850819791153264546376215876441⟩,⟨-309440545754497477974637391011226751331607007703417584,-309440545754497477974637391011226751331607007702807541⟩⟩, + ⟨⟨3951810897820913045083739564382508535509748624186470,3951810897820913045083739564382508535509748624202177⟩,⟨5575789968783779741693856501331490783712244107470606,5575789968783779741693856501331490783712244107486309⟩⟩, + ⟨⟨-51682594403866517181563506367906795230275391668025,-51682594403866517181563506367906795230275391665885⟩,⟨19480220048602702692129574558869669336820081771807,19480220048602702692129574558869669336820081773756⟩⟩, + ⟨⟨-102770134039455833168888099791517263534173023606,-102770134039455833168888099791517263534173017698⟩,⟨-112832496581112638292301194839939531146893295031,-112832496581112638292301194839939531146893289046⟩⟩, + ⟨⟨-83057518246731762394053936012082752954442111,-83057518246731762394053936012082752954432267⟩,⟨-107271065364997379993918004670635482015498793,-107271065364997379993918004670635482015488949⟩⟩, + ⟨⟨-32183361893925802131577571915148625563978,-32183361893925802131577571915148625544848⟩,⟨31139844206811738602261504676147614442486,31139844206811738602261504676147614462416⟩⟩, + ⟨⟨-2162208482061411966427964706389953521,-2162208482061411966427964706389915270⟩,⟨-9036203750504760417002344212309652206,-9036203750504760417002344212309613955⟩⟩, + ⟨⟨-3265124608294809415301375082482548,-3265124608294809415301375082425947⟩,⟨-1310045504125343601363515662580635,-1310045504125343601363515662521583⟩⟩, + ⟨⟨10275414316418188121671240124895,10275414316418188121671240184601⟩,⟨-4627408350036348401874010035385,-4627408350036348401874009970867⟩⟩, + ⟨⟨1345867520098809281086076800958,1345867520098809281086076883792⟩,⟨-44603,50975⟩⟩, + ⟨⟨10275414316418188121671240124895,10275414316418188121671240184601⟩,⟨4627408350036348401874009970867,4627408350036348401874010035385⟩⟩, + ⟨⟨-3265124608294809415301375082482548,-3265124608294809415301375082425947⟩,⟨1310045504125343601363515662521583,1310045504125343601363515662580635⟩⟩, + ⟨⟨-2162208482061411966427964706389953521,-2162208482061411966427964706389915270⟩,⟨9036203750504760417002344212309613955,9036203750504760417002344212309652206⟩⟩, + ⟨⟨-32183361893925802131577571915148625563978,-32183361893925802131577571915148625544848⟩,⟨-31139844206811738602261504676147614462416,-31139844206811738602261504676147614442486⟩⟩, + ⟨⟨-83057518246731762394053936012082752954442111,-83057518246731762394053936012082752954432267⟩,⟨107271065364997379993918004670635482015488949,107271065364997379993918004670635482015498793⟩⟩, + ⟨⟨-102770134039455833168888099791517263534173023606,-102770134039455833168888099791517263534173017698⟩,⟨112832496581112638292301194839939531146893289046,112832496581112638292301194839939531146893295031⟩⟩, + ⟨⟨-51682594403866517181563506367906795230275391668025,-51682594403866517181563506367906795230275391665885⟩,⟨-19480220048602702692129574558869669336820081773756,-19480220048602702692129574558869669336820081771807⟩⟩, + ⟨⟨3951810897820913045083739564382508535509748624186470,3951810897820913045083739564382508535509748624202177⟩,⟨-5575789968783779741693856501331490783712244107486309,-5575789968783779741693856501331490783712244107470606⟩⟩, + ⟨⟨124743442858685099509080850819791153264546376215266858,124743442858685099509080850819791153264546376215876441⟩,⟨309440545754497477974637391011226751331607007702807541,309440545754497477974637391011226751331607007703417584⟩⟩, + ⟨⟨-7195940651946522287983105554230244678065422156738491680,-7195940651946522287983105554230244678065422156731543629⟩,⟨-2246162402282600811549898355247251196474760377250527876,-2246162402282600811549898355247251196474760377243582207⟩⟩, + ⟨⟨76031131643590318468799691534906379427606527214807995877,76031131643590318468799691534906379427606527214919463341⟩,⟨-50563321535750940268103649946371776536095355407421599899,-50563321535750940268103649946371776536095355407310172315⟩⟩, + ⟨⟨-15453873723525761350866545403000863272831550990176163380,-15453873723525761350866545403000863272831550989332239485⟩,⟨671400936902330124802795677868427455188845521934431331101,671400936902330124802795677868427455188845521935275352477⟩⟩, + ⟨⟨-2869720160876339854596680327722280633443068975163402024869,-2869720160876339854596680327722280633443068975159332342407⟩,⟨-1668239398515851955490181616745039856007860580776083074255,-1668239398515851955490181616745039856007860580772011744849⟩⟩, + ⟨⟨9425933256470639943898362632911121768547751806627371873879,9425933256470639943898362632911121768547751806634076080294⟩,⟨-7351478448362458025027520368965435215009322910579832431572,-7351478448362458025027520368965435215009322910573132301328⟩⟩, + ⟨⟨13210114728191057748840637326616330465485093165893804890038,13210114728191057748840637326616330465485093165922010382785⟩,⟨30711314150508557176944971747631130241243678954805986550272,30711314150508557176944971747631130241243678954834186444811⟩⟩] +lemma tw0_1_3_6_calc (j : Fin 31) : taylorWaveBox 0 1 3 6 j = tw0_1_3_6 j := by + revert j + decide +kernel +def tw0_1_3_7 : Fin 31 → CI := ![⟨⟨13691836039323825573793703021371487084030636764818713414686,13691836039323825573793703021371487084030636764831300180128⟩,⟨8679631203015023795196403134862400764573999014724370937025,8679631203015023795196403134862400764573999014736957068687⟩⟩, + ⟨⟨-4644752274181032120719857472770946507430653799998232062369,-4644752274181032120719857472770946507430653799994193074338⟩,⟨3993507677905717114861480732418335735905862267167513702593,3993507677905717114861480732418335735905862267171557262619⟩⟩, + ⟨⟨-507947627882617390087057669576711703387589285467562789594,-507947627882617390087057669576711703387589285465154621873⟩,⟨-1730130069065779842008561213154226094314112879780039638460,-1730130069065779842008561213154226094314112879777632477275⟩⟩, + ⟨⟨374507922550661867649317107852656299485998466619181188057,374507922550661867649317107852656299485998466619664873711⟩,⟨101462126448863840853112282757966706241278861509779232071,101462126448863840853112282757966706241278861510262882170⟩⟩, + ⟨⟨-44984142742837770267570963883539784448211752670819522548,-44984142742837770267570963883539784448211752670761007629⟩,⟨33858230394649055403146909477923858531817042535665090092,33858230394649055403146909477923858531817042535723600992⟩⟩, + ⟨⟨461077551464922742611435396605879453445574539040498805,461077551464922742611435396605879453445574539046443801⟩,⟨-4957030527299059301290539747064908464059396790761962810,-4957030527299059301290539747064908464059396790756011713⟩⟩, + ⟨⟨157776089062958252638731456623265162590050160094526098,157776089062958252638731456623265162590050160094972198⟩,⟨176611768649624010315877249748842855009194015679372104,176611768649624010315877249748842855009194015679817972⟩⟩, + ⟨⟨-5211428394701217527643633164591157141252850390732239,-5211428394701217527643633164591157141252850390722551⟩,⟨454539123401668290090027739443993866744933895055633,454539123401668290090027739443993866744933895065321⟩⟩, + ⟨⟨11302288768699364558023762881623249502961965334974,11302288768699364558023762881623249502961965337048⟩,⟨-44297489914051721618109653974424312377779220585842,-44297489914051721618109653974424312377779220583767⟩⟩, + ⟨⟨136748273318541913298352417436922391986598098618,136748273318541913298352417436922391986598102755⟩,⟨-4961223277440342583969193208039686214700226015,-4961223277440342583969193208039686214700222262⟩⟩, + ⟨⟨130273328797677795871663157516389443058695998,130273328797677795871663157516389443058707346⟩,⟨19624697373671440233259021477915890169209152,19624697373671440233259021477915890169220499⟩⟩, + ⟨⟨7527648379182762018923640774970337029040,7527648379182762018923640774970337050524⟩,⟨-46347637032880705737984303807092768133860,-46347637032880705737984303807092768112994⟩⟩, + ⟨⟨7018533586389936751814500432966435182,7018533586389936751814500432966470966⟩,⟨7730841905825195154630843956182463394,7730841905825195154630843956182499178⟩⟩, + ⟨⟨4180290582463343577403245848135948,4180290582463343577403245848187719⟩,⟨145077010773586140709449339908963,145077010773586140709449339965700⟩⟩, + ⟨⟨-11472460697293835785378620026636,-11472460697293835785378619961033⟩,⟨7859052722505494253366210500622,7859052722505494253366210573118⟩⟩, + ⟨⟨-1682608013244859065489320559345,-1682608013244859065489320455784⟩,⟨-63729,55763⟩⟩, + ⟨⟨-11472460697293835785378620026636,-11472460697293835785378619961033⟩,⟨-7859052722505494253366210573118,-7859052722505494253366210500622⟩⟩, + ⟨⟨4180290582463343577403245848135948,4180290582463343577403245848187719⟩,⟨-145077010773586140709449339965700,-145077010773586140709449339908963⟩⟩, + ⟨⟨7018533586389936751814500432966435182,7018533586389936751814500432966470966⟩,⟨-7730841905825195154630843956182499178,-7730841905825195154630843956182463394⟩⟩, + ⟨⟨7527648379182762018923640774970337029040,7527648379182762018923640774970337050524⟩,⟨46347637032880705737984303807092768112994,46347637032880705737984303807092768133860⟩⟩, + ⟨⟨130273328797677795871663157516389443058695998,130273328797677795871663157516389443058707346⟩,⟨-19624697373671440233259021477915890169220499,-19624697373671440233259021477915890169209152⟩⟩, + ⟨⟨136748273318541913298352417436922391986598098618,136748273318541913298352417436922391986598102755⟩,⟨4961223277440342583969193208039686214700222262,4961223277440342583969193208039686214700226015⟩⟩, + ⟨⟨11302288768699364558023762881623249502961965334974,11302288768699364558023762881623249502961965337048⟩,⟨44297489914051721618109653974424312377779220583767,44297489914051721618109653974424312377779220585842⟩⟩, + ⟨⟨-5211428394701217527643633164591157141252850390732239,-5211428394701217527643633164591157141252850390722551⟩,⟨-454539123401668290090027739443993866744933895065321,-454539123401668290090027739443993866744933895055633⟩⟩, + ⟨⟨157776089062958252638731456623265162590050160094526098,157776089062958252638731456623265162590050160094972198⟩,⟨-176611768649624010315877249748842855009194015679817972,-176611768649624010315877249748842855009194015679372104⟩⟩, + ⟨⟨461077551464922742611435396605879453445574539040498805,461077551464922742611435396605879453445574539046443801⟩,⟨4957030527299059301290539747064908464059396790756011713,4957030527299059301290539747064908464059396790761962810⟩⟩, + ⟨⟨-44984142742837770267570963883539784448211752670819522548,-44984142742837770267570963883539784448211752670761007629⟩,⟨-33858230394649055403146909477923858531817042535723600992,-33858230394649055403146909477923858531817042535665090092⟩⟩, + ⟨⟨374507922550661867649317107852656299485998466619181188045,374507922550661867649317107852656299485998466619664873724⟩,⟨-101462126448863840853112282757966706241278861510262882170,-101462126448863840853112282757966706241278861509779232043⟩⟩, + ⟨⟨-507947627882617390087057669576711703387589285467562789616,-507947627882617390087057669576711703387589285465154621881⟩,⟨1730130069065779842008561213154226094314112879777632477256,1730130069065779842008561213154226094314112879780039638458⟩⟩, + ⟨⟨-4644752274181032120719857472770946507430653799998232062398,-4644752274181032120719857472770946507430653799994193074256⟩,⟨-3993507677905717114861480732418335735905862267171557262699,-3993507677905717114861480732418335735905862267167513702564⟩⟩, + ⟨⟨13691836039323825573793703021371487084030636764818713414689,13691836039323825573793703021371487084030636764831300180205⟩,⟨-8679631203015023795196403134862400764573999014736957068661,-8679631203015023795196403134862400764573999014724370936924⟩⟩] +lemma tw0_1_3_7_calc (j : Fin 31) : taylorWaveBox 0 1 3 7 j = tw0_1_3_7 j := by + revert j + decide +kernel +def tw0_1_3_8 : Fin 31 → CI := ![⟨⟨-4685006317484305891142674779824546887968107817385266100748,-4685006317484305891142674779824546887968107817380216877062⟩,⟨5301199708844398605208700235657040706968635800909842758036,5301199708844398605208700235657040706968635800914893871519⟩⟩, + ⟨⟨-1383744536082397484058554806108656190201052199352171734865,-1383744536082397484058554806108656190201052199350085980272⟩,⟨-2462925229505081736795137576793778474819821187734210368652,-2462925229505081736795137576793778474819821187732127329047⟩⟩, + ⟨⟨880681423654536604181559785351466225516522241442578227157,880681423654536604181559785351466225516522241443789889215⟩,⟨-39265287665782464005892973289599955149248403258144839400,-39265287665782464005892973289599955149248403256932735333⟩⟩, + ⟨⟨-105825975007551104050358263875969120025844712362950827616,-105825975007551104050358263875969120025844712362719655695⟩,⟨171775210997449288235850495801273614231801453652327918165,171775210997449288235850495801273614231801453652559092447⟩⟩, + ⟨⟨-9427093606903988663583982099563522005608459777169459994,-9427093606903988663583982099563522005608459777132692387⟩,⟨-29788917121351773921858798862643071404180843886680599051,-29788917121351773921858798862643071404180843886643811904⟩⟩, + ⟨⟨2613557961899496896784345074203243644604356509603157329,2613557961899496896784345074203243644604356509607032975⟩,⟨1387519993514568339902279260365035925650967508714255501,1387519993514568339902279260365035925650967508718127610⟩⟩, + ⟨⟨-145783424903207495629813628906739983293251579756416928,-145783424903207495629813628906739983293251579756177390⟩,⟨40450245499166454254033103492118493822681509104267737,40450245499166454254033103492118493822681509104507267⟩⟩, + ⟨⟨1543377853231833163846911519486679371534173609287652,1543377853231833163846911519486679371534173609296471⟩,⟨-3256579743920937384854256017112688252808776042332208,-3256579743920937384854256017112688252808776042323386⟩⟩, + ⟨⟨22217590509891680490601859825295104108792607207475,22217590509891680490601859825295104108792607208691⟩,⟨25811339550506879079787063393125245280132123024070,25811339550506879079787063393125245280132123025403⟩⟩, + ⟨⟨-68242472242424608812958288995397507464785841670,-68242472242424608812958288995397507464785837350⟩,⟨86806914182703248629058094941673624759477552861,86806914182703248629058094941673624759477557201⟩⟩, + ⟨⟨-94181892497529100935884235427940829306835542,-94181892497529100935884235427940829306826933⟩,⟨66233107924467317758751732709427863777971891,66233107924467317758751732709427863777980500⟩⟩, + ⟨⟨20455540929293521750178997464720687648797,20455540929293521750178997464720687665846⟩,⟨39305466237327374550074803348756769080140,39305466237327374550074803348756769095851⟩⟩, + ⟨⟨-9986198265611703124329502648019329118,-9986198265611703124329502648019290293⟩,⟨-3435926859699204839705131206130835216,-3435926859699204839705131206130796391⟩⟩, + ⟨⟨-4259423862325348926725271227367908,-4259423862325348926725271227297390⟩,⟨1374650069475851001555227191111510,1374650069475851001555227191185422⟩⟩, + ⟨⟨11000125770093099754242700048989,11000125770093099754242700134254⟩,⟨-10840510658579241093118443359688,-10840510658579241093118443268313⟩⟩, + ⟨⟨1893241879724655788753082251024,1893241879724655788753082367548⟩,⟨-62744,71707⟩⟩, + ⟨⟨11000125770093099754242700048989,11000125770093099754242700134254⟩,⟨10840510658579241093118443268313,10840510658579241093118443359688⟩⟩, + ⟨⟨-4259423862325348926725271227367908,-4259423862325348926725271227297390⟩,⟨-1374650069475851001555227191185422,-1374650069475851001555227191111510⟩⟩, + ⟨⟨-9986198265611703124329502648019329118,-9986198265611703124329502648019290293⟩,⟨3435926859699204839705131206130796391,3435926859699204839705131206130835216⟩⟩, + ⟨⟨20455540929293521750178997464720687648797,20455540929293521750178997464720687665846⟩,⟨-39305466237327374550074803348756769095851,-39305466237327374550074803348756769080140⟩⟩, + ⟨⟨-94181892497529100935884235427940829306835542,-94181892497529100935884235427940829306826933⟩,⟨-66233107924467317758751732709427863777980500,-66233107924467317758751732709427863777971891⟩⟩, + ⟨⟨-68242472242424608812958288995397507464785841670,-68242472242424608812958288995397507464785837350⟩,⟨-86806914182703248629058094941673624759477557201,-86806914182703248629058094941673624759477552861⟩⟩, + ⟨⟨22217590509891680490601859825295104108792607207475,22217590509891680490601859825295104108792607208691⟩,⟨-25811339550506879079787063393125245280132123025403,-25811339550506879079787063393125245280132123024070⟩⟩, + ⟨⟨1543377853231833163846911519486679371534173609287652,1543377853231833163846911519486679371534173609296471⟩,⟨3256579743920937384854256017112688252808776042323386,3256579743920937384854256017112688252808776042332208⟩⟩, + ⟨⟨-145783424903207495629813628906739983293251579756416928,-145783424903207495629813628906739983293251579756177390⟩,⟨-40450245499166454254033103492118493822681509104507267,-40450245499166454254033103492118493822681509104267737⟩⟩, + ⟨⟨2613557961899496896784345074203243644604356509603157329,2613557961899496896784345074203243644604356509607032975⟩,⟨-1387519993514568339902279260365035925650967508718127610,-1387519993514568339902279260365035925650967508714255501⟩⟩, + ⟨⟨-9427093606903988663583982099563522005608459777169459994,-9427093606903988663583982099563522005608459777132692387⟩,⟨29788917121351773921858798862643071404180843886643811904,29788917121351773921858798862643071404180843886680599051⟩⟩, + ⟨⟨-105825975007551104050358263875969120025844712362950827616,-105825975007551104050358263875969120025844712362719655681⟩,⟨-171775210997449288235850495801273614231801453652559092455,-171775210997449288235850495801273614231801453652327918162⟩⟩, + ⟨⟨880681423654536604181559785351466225516522241442578227150,880681423654536604181559785351466225516522241443789889215⟩,⟨39265287665782464005892973289599955149248403256932735338,39265287665782464005892973289599955149248403258144839413⟩⟩, + ⟨⟨-1383744536082397484058554806108656190201052199352171734906,-1383744536082397484058554806108656190201052199350085980258⟩,⟨2462925229505081736795137576793778474819821187732127329010,2462925229505081736795137576793778474819821187734210368670⟩⟩, + ⟨⟨-4685006317484305891142674779824546887968107817385266100738,-4685006317484305891142674779824546887968107817380216877023⟩,⟨-5301199708844398605208700235657040706968635800914893871555,-5301199708844398605208700235657040706968635800909842758043⟩⟩] +lemma tw0_1_3_8_calc (j : Fin 31) : taylorWaveBox 0 1 3 8 j = tw0_1_3_8 j := by + revert j + decide +kernel +def tw0_1_3_9 : Fin 31 → CI := ![⟨⟨-1782843768200823191005422935142026872158886122326000411322,-1782843768200823191005422935142026872158886122323706820983⟩,⟨-2167877075065713005704845562933759761807505349642824837844,-2167877075065713005704845562933759761807505349640532678860⟩⟩, + ⟨⟨1126659565950823900478811168044163106981723565120793948903,1126659565950823900478811168044163106981723565121732298748⟩,⟨-365390397651774749074142886202465515854974916635279503324,-365390397651774749074142886202465515854974916634339955373⟩⟩, + ⟨⟨-76478300798483453461808783613760739343505608833054201963,-76478300798483453461808783613760739343505608832527548876⟩,⟨384272915560204379819237642856083735973771985255167526086,384272915560204379819237642856083735973771985255694041184⟩⟩, + ⟨⟨-63676202025107491346814968367724619690430914484249908788,-63676202025107491346814968367724619690430914484154308740⟩,⟨-71001685782613109258681386175709776782947337682992915797,-71001685782613109258681386175709776782947337682897308087⟩⟩, + ⟨⟨15754922663237580577240152190331258314967664970665055172,15754922663237580577240152190331258314967664970686581006⟩,⟨507883236686446552514286024181562942926503786940716851,507883236686446552514286024181562942926503786962229490⟩⟩, + ⟨⟨-1235737797338502957326895706274906310361077622441754675,-1235737797338502957326895706274906310361077622439748632⟩,⟨1014577635280438565450945678938452750954774933861917630,1014577635280438565450945678938452750954774933863924596⟩⟩, + ⟨⟨16404926234164755852419588524079442509795971534106498,16404926234164755852419588524079442509795971534267357⟩,⟨-86319013480212539648173166027839324699504082594338849,-86319013480212539648173166027839324699504082594177891⟩⟩, + ⟨⟨1271868326562709770433265009105865327749777981625278,1271868326562709770433265009105865327749777981630786⟩,⟨1864467265588009114323446005253259848434774953977203,1864467265588009114323446005253259848434774953982709⟩⟩, + ⟨⟨-22947704242237692103289547306249324301948213658375,-22947704242237692103289547306249324301948213657365⟩,⟨2312747841289513283954104248350097266769148516330,2312747841289513283954104248350097266769148517292⟩⟩, + ⟨⟨-16256462594920584375608632518211552337248983464,-16256462594920584375608632518211552337248981051⟩,⟨-79353197389327481441720798627072206645578375727,-79353197389327481441720798627072206645578373110⟩⟩, + ⟨⟨17768369945614693286645859587981149286632242,17768369945614693286645859587981149286640037⟩,⟨-89737810847593399921201442165677260399951416,-89737810847593399921201442165677260399943621⟩⟩, + ⟨⟨-34226705717421727435763761447971439206161,-34226705717421727435763761447971439188359⟩,⟨-16536672319261770991890573992648162003614,-16536672319261770991890573992648161985848⟩⟩, + ⟨⟨9568869720545081582682988978046719587,9568869720545081582682988978046759715⟩,⟨-1651376715474642594979872350506424572,-1651376715474642594979872350506384444⟩⟩, + ⟨⟨3442030144860704669622867950844483,3442030144860704669622867950921913⟩,⟨-2666132623069031086273122790932495,-2666132623069031086273122790854235⟩⟩, + ⟨⟨-8999286743515088628169886505606,-8999286743515088628169886409698⟩,⟨12733695671303259019892428153585,12733695671303259019892428253908⟩⟩, + ⟨⟨-1936585017224653001959263897675,-1936585017224653001959263778483⟩,⟨-73349,64180⟩⟩, + ⟨⟨-8999286743515088628169886505606,-8999286743515088628169886409698⟩,⟨-12733695671303259019892428253908,-12733695671303259019892428153585⟩⟩, + ⟨⟨3442030144860704669622867950844483,3442030144860704669622867950921913⟩,⟨2666132623069031086273122790854235,2666132623069031086273122790932495⟩⟩, + ⟨⟨9568869720545081582682988978046719587,9568869720545081582682988978046759715⟩,⟨1651376715474642594979872350506384444,1651376715474642594979872350506424572⟩⟩, + ⟨⟨-34226705717421727435763761447971439206161,-34226705717421727435763761447971439188359⟩,⟨16536672319261770991890573992648161985848,16536672319261770991890573992648162003614⟩⟩, + ⟨⟨17768369945614693286645859587981149286632242,17768369945614693286645859587981149286640037⟩,⟨89737810847593399921201442165677260399943621,89737810847593399921201442165677260399951416⟩⟩, + ⟨⟨-16256462594920584375608632518211552337248983464,-16256462594920584375608632518211552337248981051⟩,⟨79353197389327481441720798627072206645578373110,79353197389327481441720798627072206645578375727⟩⟩, + ⟨⟨-22947704242237692103289547306249324301948213658375,-22947704242237692103289547306249324301948213657365⟩,⟨-2312747841289513283954104248350097266769148517292,-2312747841289513283954104248350097266769148516330⟩⟩, + ⟨⟨1271868326562709770433265009105865327749777981625278,1271868326562709770433265009105865327749777981630786⟩,⟨-1864467265588009114323446005253259848434774953982709,-1864467265588009114323446005253259848434774953977203⟩⟩, + ⟨⟨16404926234164755852419588524079442509795971534106498,16404926234164755852419588524079442509795971534267357⟩,⟨86319013480212539648173166027839324699504082594177891,86319013480212539648173166027839324699504082594338849⟩⟩, + ⟨⟨-1235737797338502957326895706274906310361077622441754675,-1235737797338502957326895706274906310361077622439748632⟩,⟨-1014577635280438565450945678938452750954774933863924596,-1014577635280438565450945678938452750954774933861917630⟩⟩, + ⟨⟨15754922663237580577240152190331258314967664970665055172,15754922663237580577240152190331258314967664970686581006⟩,⟨-507883236686446552514286024181562942926503786962229490,-507883236686446552514286024181562942926503786940716851⟩⟩, + ⟨⟨-63676202025107491346814968367724619690430914484249908792,-63676202025107491346814968367724619690430914484154308740⟩,⟨71001685782613109258681386175709776782947337682897308082,71001685782613109258681386175709776782947337682992915797⟩⟩, + ⟨⟨-76478300798483453461808783613760739343505608833054201961,-76478300798483453461808783613760739343505608832527548870⟩,⟨-384272915560204379819237642856083735973771985255694041185,-384272915560204379819237642856083735973771985255167526084⟩⟩, + ⟨⟨1126659565950823900478811168044163106981723565120793948888,1126659565950823900478811168044163106981723565121732298758⟩,⟨365390397651774749074142886202465515854974916634339955367,365390397651774749074142886202465515854974916635279503343⟩⟩, + ⟨⟨-1782843768200823191005422935142026872158886122326000411339,-1782843768200823191005422935142026872158886122323706820986⟩,⟨2167877075065713005704845562933759761807505349640532678845,2167877075065713005704845562933759761807505349642824837843⟩⟩] +lemma tw0_1_3_9_calc (j : Fin 31) : taylorWaveBox 0 1 3 9 j = tw0_1_3_9 j := by + revert j + decide +kernel +def tw0_1_3_10 : Fin 31 → CI := ![⟨⟨881004434704964070971018299441117558048347319256729425472,881004434704964070971018299441117558048347319257651250220⟩,⟨-515565464589748005670091049984283902037768454234751017715,-515565464589748005670091049984283902037768454233828516085⟩⟩, + ⟨⟨52387432729786329510298542666097310327208506623388088388,52387432729786329510298542666097310327208506623763087804⟩,⟨452181065996482059037253055838917214053262822092298154138,452181065996482059037253055838917214053262822092672733265⟩⟩, + ⟨⟨-144596376448327945077170768836776469717219116333996655767,-144596376448327945077170768836776469717219116333797643056⟩,⟨-67625597667193860610757968498941358252048150771244598605,-67625597667193860610757968498941358252048150771045564159⟩⟩, + ⟨⟨37328808896510410842498650675306396046872339017337723076,37328808896510410842498650675306396046872339017388888375⟩,⟨-17732430405189584127828587468049956808770205727617383952,-17732430405189584127828587468049956808770205727566224870⟩⟩, + ⟨⟨-2642498904439872514394573215007112768795756979976664385,-2642498904439872514394573215007112768795756979966253262⟩,⟨6793978237874798889576047113624288730873800153640422312,6793978237874798889576047113624288730873800153650838353⟩⟩, + ⟨⟨-228069674327858900047913705845931408726091884222085186,-228069674327858900047913705845931408726091884221212302⟩,⟨-758389140388849324373633323816325207169622093186843473,-758389140388849324373633323816325207169622093185970316⟩⟩, + ⟨⟨37342436704152052683175517796781481383501090385595181,37342436704152052683175517796781481383501090385692898⟩,⟨28169288273473731339137053767552861416863747082404451,28169288273473731339137053767552861416863747082502111⟩⟩, + ⟨⟨-1292598809819996827696008833032728952657386859241614,-1292598809819996827696008833032728952657386859238904⟩,⟨89437902170999474307168200972829375784224257885030,89437902170999474307168200972829375784224257887740⟩⟩, + ⟨⟨6987465103011734411256842227480584060349948837218,6987465103011734411256842227480584060349948837863⟩,⟨-12497078185427424533704328271791269187947028804185,-12497078185427424533704328271791269187947028803562⟩⟩, + ⟨⟨47789738851122457658357599940812254125338891394,47789738851122457658357599940812254125338893509⟩,⟨26134392720877520088423986492814171284982624160,26134392720877520088423986492814171284982626229⟩⟩, + ⟨⟨35781709601790722787015105333722928182310597,35781709601790722787015105333722928182315716⟩,⟨56201609803857845490111064980616007614044596,56201609803857845490111064980616007614049715⟩⟩, + ⟨⟨29349904097263042939531583639542835646451,29349904097263042939531583639542835657392⟩,⟨-5668521165019535518725317781201552237716,-5668521165019535518725317781201552225917⟩⟩, + ⟨⟨-6398914960722333254051862824147651690,-6398914960722333254051862824147622489⟩,⟨5102661188572567663963726527717837385,5102661188572567663963726527717866586⟩⟩, + ⟨⟨-2078241310584059527024800688226820,-2078241310584059527024800688158123⟩,⟨3279194275395038667325033485009557,3279194275395038667325033485076702⟩⟩, + ⟨⟨6117339919945545394211382453941,6117339919945545394211382549006⟩,⟨-13070235916109150339306886604923,-13070235916109150339306886507524⟩⟩, + ⟨⟨1815843732564910033693480063604,1815843732564910033693480175364⟩,⟨-60179,68776⟩⟩, + ⟨⟨6117339919945545394211382453941,6117339919945545394211382549006⟩,⟨13070235916109150339306886507524,13070235916109150339306886604923⟩⟩, + ⟨⟨-2078241310584059527024800688226820,-2078241310584059527024800688158123⟩,⟨-3279194275395038667325033485076702,-3279194275395038667325033485009557⟩⟩, + ⟨⟨-6398914960722333254051862824147651690,-6398914960722333254051862824147622489⟩,⟨-5102661188572567663963726527717866586,-5102661188572567663963726527717837385⟩⟩, + ⟨⟨29349904097263042939531583639542835646451,29349904097263042939531583639542835657392⟩,⟨5668521165019535518725317781201552225917,5668521165019535518725317781201552237716⟩⟩, + ⟨⟨35781709601790722787015105333722928182310597,35781709601790722787015105333722928182315716⟩,⟨-56201609803857845490111064980616007614049715,-56201609803857845490111064980616007614044596⟩⟩, + ⟨⟨47789738851122457658357599940812254125338891394,47789738851122457658357599940812254125338893509⟩,⟨-26134392720877520088423986492814171284982626229,-26134392720877520088423986492814171284982624160⟩⟩, + ⟨⟨6987465103011734411256842227480584060349948837218,6987465103011734411256842227480584060349948837863⟩,⟨12497078185427424533704328271791269187947028803562,12497078185427424533704328271791269187947028804185⟩⟩, + ⟨⟨-1292598809819996827696008833032728952657386859241614,-1292598809819996827696008833032728952657386859238904⟩,⟨-89437902170999474307168200972829375784224257887740,-89437902170999474307168200972829375784224257885030⟩⟩, + ⟨⟨37342436704152052683175517796781481383501090385595181,37342436704152052683175517796781481383501090385692898⟩,⟨-28169288273473731339137053767552861416863747082502111,-28169288273473731339137053767552861416863747082404451⟩⟩, + ⟨⟨-228069674327858900047913705845931408726091884222085186,-228069674327858900047913705845931408726091884221212302⟩,⟨758389140388849324373633323816325207169622093185970316,758389140388849324373633323816325207169622093186843473⟩⟩, + ⟨⟨-2642498904439872514394573215007112768795756979976664385,-2642498904439872514394573215007112768795756979966253262⟩,⟨-6793978237874798889576047113624288730873800153650838353,-6793978237874798889576047113624288730873800153640422312⟩⟩, + ⟨⟨37328808896510410842498650675306396046872339017337723074,37328808896510410842498650675306396046872339017388888376⟩,⟨17732430405189584127828587468049956808770205727566224870,17732430405189584127828587468049956808770205727617383954⟩⟩, + ⟨⟨-144596376448327945077170768836776469717219116333996655768,-144596376448327945077170768836776469717219116333797643056⟩,⟨67625597667193860610757968498941358252048150771045564157,67625597667193860610757968498941358252048150771244598604⟩⟩, + ⟨⟨52387432729786329510298542666097310327208506623388088386,52387432729786329510298542666097310327208506623763087812⟩,⟨-452181065996482059037253055838917214053262822092672733269,-452181065996482059037253055838917214053262822092298154133⟩⟩, + ⟨⟨881004434704964070971018299441117558048347319256729425467,881004434704964070971018299441117558048347319257651250220⟩,⟨515565464589748005670091049984283902037768454233828516087,515565464589748005670091049984283902037768454234751017722⟩⟩] +lemma tw0_1_3_10_calc (j : Fin 31) : taylorWaveBox 0 1 3 10 j = tw0_1_3_10 j := by + revert j + decide +kernel +def tw0_1_3_11 : Fin 31 → CI := ![⟨⟨124136451511738627604637952650973721541930416620290455306,124136451511738627604637952650973721541930416620623572625⟩,⟨319399300414976907400500566633117223758096776448662264186,319399300414976907400500566633117223758096776448995129352⟩⟩, + ⟨⟨-160934457017012865993254031117448385605097568248257280861,-160934457017012865993254031117448385605097568248123363912⟩,⟨-13376796455678443531011107897750363229338105449230733439,-13376796455678443531011107897750363229338105449096700020⟩⟩, + ⟨⟨37676574557116061930090185230219683461660857292231964551,37676574557116061930090185230219683461660857292297462917⟩,⟨-46737098164042204483535543387671034401783364476328698396,-46737098164042204483535543387671034401783364476263192721⟩⟩, + ⟨⟨2566467277239478777213357106677859120619190745757116341,2566467277239478777213357106677859120619190745780193529⟩,⟨16329523637279024847425890608498590229242779426748134920,16329523637279024847425890608498590229242779426771214740⟩⟩, + ⟨⟨-2360637012704350289030298961059105934142080013826552950,-2360637012704350289030298961059105934142080013822294548⟩,⟨-2027634187833221820417573273615275402347362700327571781,-2027634187833221820417573273615275402347362700323314205⟩⟩, + ⟨⟨360156585483761501569371075390171657600305691476998626,360156585483761501569371075390171657600305691477514708⟩,⟨37294137328396533358762880141172771927608537652545351,37294137328396533358762880141172771927608537653060988⟩⟩, + ⟨⟨-20534759530078158862298345628103946115011507775542736,-20534759530078158862298345628103946115011507775496822⟩,⟨10329047188289818857969675554600013358840977427050080,10329047188289818857969675554600013358840977427096003⟩⟩, + ⟨⟨305123446065158967658531400414749879089454875005172,305123446065158967658531400414749879089454875007058⟩,⟨-615096366632715595479803425641270141897427603660967,-615096366632715595479803425641270141897427603659080⟩⟩, + ⟨⟨3573949723240667439055717598355921459288256607178,3573949723240667439055717598355921459288256607450⟩,⟨7385363964230454386134265078680281437642087979525,7385363964230454386134265078680281437642087979830⟩⟩, + ⟨⟨-31547895305752251257738193513537916580787355446,-31547895305752251257738193513537916580787354243⟩,⟨12158967707443126577493603750407614352295077044,12158967707443126577493603750407614352295078181⟩⟩, + ⟨⟨-43492057157339884553331578464881023837187125,-43492057157339884553331578464881023837183356⟩,⟨-10709235833162476596924544938880886565710010,-10709235833162476596924544938880886565706242⟩⟩, + ⟨⟨-14617437145670207689419305163755432535040,-14617437145670207689419305163755432525527⟩,⟨16036290733454854884076664595344830334270,16036290733454854884076664595344830344107⟩⟩, + ⟨⟨2452345051895656165228172628261538076,2452345051895656165228172628261560668⟩,⟨-5876340595834452138945527821576100004,-5876340595834452138945527821576077412⟩⟩, + ⟨⟨691146948082683736786283544218928,691146948082683736786283544268451⟩,⟨-3119894136643845009361322479158442,-3119894136643845009361322479111931⟩⟩, + ⟨⟨-3172642938577907768616328965250,-3172642938577907768616328881203⟩,⟨11913155381609575643564761573086,11913155381609575643564761657568⟩⟩, + ⟨⟨-1571658801495200084830877920219,-1571658801495200084830877823488⟩,⟨-59527,52086⟩⟩, + ⟨⟨-3172642938577907768616328965250,-3172642938577907768616328881203⟩,⟨-11913155381609575643564761657568,-11913155381609575643564761573086⟩⟩, + ⟨⟨691146948082683736786283544218928,691146948082683736786283544268451⟩,⟨3119894136643845009361322479111931,3119894136643845009361322479158442⟩⟩, + ⟨⟨2452345051895656165228172628261538076,2452345051895656165228172628261560668⟩,⟨5876340595834452138945527821576077412,5876340595834452138945527821576100004⟩⟩, + ⟨⟨-14617437145670207689419305163755432535040,-14617437145670207689419305163755432525527⟩,⟨-16036290733454854884076664595344830344107,-16036290733454854884076664595344830334270⟩⟩, + ⟨⟨-43492057157339884553331578464881023837187125,-43492057157339884553331578464881023837183356⟩,⟨10709235833162476596924544938880886565706242,10709235833162476596924544938880886565710010⟩⟩, + ⟨⟨-31547895305752251257738193513537916580787355446,-31547895305752251257738193513537916580787354243⟩,⟨-12158967707443126577493603750407614352295078181,-12158967707443126577493603750407614352295077044⟩⟩, + ⟨⟨3573949723240667439055717598355921459288256607178,3573949723240667439055717598355921459288256607450⟩,⟨-7385363964230454386134265078680281437642087979830,-7385363964230454386134265078680281437642087979525⟩⟩, + ⟨⟨305123446065158967658531400414749879089454875005172,305123446065158967658531400414749879089454875007058⟩,⟨615096366632715595479803425641270141897427603659080,615096366632715595479803425641270141897427603660967⟩⟩, + ⟨⟨-20534759530078158862298345628103946115011507775542736,-20534759530078158862298345628103946115011507775496822⟩,⟨-10329047188289818857969675554600013358840977427096003,-10329047188289818857969675554600013358840977427050080⟩⟩, + ⟨⟨360156585483761501569371075390171657600305691476998626,360156585483761501569371075390171657600305691477514708⟩,⟨-37294137328396533358762880141172771927608537653060988,-37294137328396533358762880141172771927608537652545351⟩⟩, + ⟨⟨-2360637012704350289030298961059105934142080013826552950,-2360637012704350289030298961059105934142080013822294548⟩,⟨2027634187833221820417573273615275402347362700323314205,2027634187833221820417573273615275402347362700327571781⟩⟩, + ⟨⟨2566467277239478777213357106677859120619190745757116341,2566467277239478777213357106677859120619190745780193530⟩,⟨-16329523637279024847425890608498590229242779426771214740,-16329523637279024847425890608498590229242779426748134919⟩⟩, + ⟨⟨37676574557116061930090185230219683461660857292231964550,37676574557116061930090185230219683461660857292297462916⟩,⟨46737098164042204483535543387671034401783364476263192721,46737098164042204483535543387671034401783364476328698396⟩⟩, + ⟨⟨-160934457017012865993254031117448385605097568248257280863,-160934457017012865993254031117448385605097568248123363910⟩,⟨13376796455678443531011107897750363229338105449096700018,13376796455678443531011107897750363229338105449230733440⟩⟩, + ⟨⟨124136451511738627604637952650973721541930416620290455306,124136451511738627604637952650973721541930416620623572627⟩,⟨-319399300414976907400500566633117223758096776448995129352,-319399300414976907400500566633117223758096776448662264184⟩⟩] +lemma tw0_1_3_11_calc (j : Fin 31) : taylorWaveBox 0 1 3 11 j = tw0_1_3_11 j := by + revert j + decide +kernel +def tw0_1_3_12 : Fin 31 → CI := ![⟨⟨-104429854549865183844563095956307605415340106243637697720,-104429854549865183844563095956307605415340106243528687888⟩,⟨22467092947012088241527597380586692088413276335278994272,22467092947012088241527597380586692088413276335388082851⟩⟩, + ⟨⟨14762857246526666632973767884655589040791924978729351167,14762857246526666632973767884655589040791924978772599411⟩,⟨-51108643937585302481307945603268825964666054681168809817,-51108643937585302481307945603268825964666054681125584451⟩⟩, + ⟨⟨12709062724830143369427113697834189336737840166131456085,12709062724830143369427113697834189336737840166158876823⟩,⟨16672432406972011757818632624965978981496478219296713166,16672432406972011757818632624965978981496478219324125308⟩⟩, + ⟨⟨-6086313910825453169967649775648459526361178574111037108,-6086313910825453169967649775648459526361178574102012892⟩,⟨-806181323978634810513307354309769929100584911817664816,-806181323978634810513307354309769929100584911808641347⟩⟩, + ⟨⟨1068997888118667368362680512499863600617144744335520913,1068997888118667368362680512499863600617144744337066953⟩,⟨-615508801681938629580611738217586277292594848067592387,-615508801681938629580611738217586277292594848066046687⟩⟩, + ⟨⟨-73494647845298446382486048948604361203312735171249744,-73494647845298446382486048948604361203312735171003282⟩,⟨135015332604222717560729936420985564248586100289377501,135015332604222717560729936420985564248586100289624145⟩⟩, + ⟨⟨-79480882750248661479075389194596590047235551272661,-79480882750248661479075389194596590047235551252201⟩,⟨-10488588109382421129617116450571057660302876958127197,-10488588109382421129617116450571057660302876958106730⟩⟩, + ⟨⟨185366608751221821981071416430220373284050723973543,185366608751221821981071416430220373284050723974498⟩,⟨282475868941167358600047198662230022492778850327909,282475868941167358600047198662230022492778850328864⟩⟩, + ⟨⟨-4310297086085303416706808615837797992230423237674,-4310297086085303416706808615837797992230423237471⟩,⟨-693668363122800256264420650104321209208584462073,-693668363122800256264420650104321209208584461873⟩⟩, + ⟨⟨6400029568439025954109227740912156323594636798,6400029568439025954109227740912156323594637496⟩,⟨-18406503973988459515538493795584125029336817175,-18406503973988459515538493795584125029336816447⟩⟩, + ⟨⟨24251723435634717022148093452250544879408550,24251723435634717022148093452250544879410752⟩,⟨-13917462546501335519793518639712027104322124,-13917462546501335519793518639712027104319922⟩⟩, + ⟨⟨1435117833617123584841018049464119566112,1435117833617123584841018049464119572699⟩,⟨-14555307542250345528521982819997394484419,-14555307542250345528521982819997394478068⟩⟩, + ⟨⟨490925228651612372800673416102764956,490925228651612372800673416102783961⟩,⟨4573895266787123565706992517876640328,4573895266787123565706992517876659333⟩⟩, + ⟨⟨313858632939738520168457974702490,313858632939738520168457974738946⟩,⟨2422129909894434104229296672840490,2422129909894434104229296672874441⟩⟩, + ⟨⟨808803987608379354477942567869,808803987608379354477942634694⟩,⟨-9746337946967852620164314886987,-9746337946967852620164314821065⟩⟩, + ⟨⟨1263145511613227914982807397773,1263145511613227914982807475516⟩,⟨-41862,47842⟩⟩, + ⟨⟨808803987608379354477942567869,808803987608379354477942634694⟩,⟨9746337946967852620164314821065,9746337946967852620164314886987⟩⟩, + ⟨⟨313858632939738520168457974702490,313858632939738520168457974738946⟩,⟨-2422129909894434104229296672874441,-2422129909894434104229296672840490⟩⟩, + ⟨⟨490925228651612372800673416102764956,490925228651612372800673416102783961⟩,⟨-4573895266787123565706992517876659333,-4573895266787123565706992517876640328⟩⟩, + ⟨⟨1435117833617123584841018049464119566112,1435117833617123584841018049464119572699⟩,⟨14555307542250345528521982819997394478068,14555307542250345528521982819997394484419⟩⟩, + ⟨⟨24251723435634717022148093452250544879408550,24251723435634717022148093452250544879410752⟩,⟨13917462546501335519793518639712027104319922,13917462546501335519793518639712027104322124⟩⟩, + ⟨⟨6400029568439025954109227740912156323594636798,6400029568439025954109227740912156323594637496⟩,⟨18406503973988459515538493795584125029336816447,18406503973988459515538493795584125029336817175⟩⟩, + ⟨⟨-4310297086085303416706808615837797992230423237674,-4310297086085303416706808615837797992230423237471⟩,⟨693668363122800256264420650104321209208584461873,693668363122800256264420650104321209208584462073⟩⟩, + ⟨⟨185366608751221821981071416430220373284050723973543,185366608751221821981071416430220373284050723974498⟩,⟨-282475868941167358600047198662230022492778850328864,-282475868941167358600047198662230022492778850327909⟩⟩, + ⟨⟨-79480882750248661479075389194596590047235551272661,-79480882750248661479075389194596590047235551252201⟩,⟨10488588109382421129617116450571057660302876958106730,10488588109382421129617116450571057660302876958127197⟩⟩, + ⟨⟨-73494647845298446382486048948604361203312735171249744,-73494647845298446382486048948604361203312735171003282⟩,⟨-135015332604222717560729936420985564248586100289624145,-135015332604222717560729936420985564248586100289377501⟩⟩, + ⟨⟨1068997888118667368362680512499863600617144744335520913,1068997888118667368362680512499863600617144744337066953⟩,⟨615508801681938629580611738217586277292594848066046687,615508801681938629580611738217586277292594848067592387⟩⟩, + ⟨⟨-6086313910825453169967649775648459526361178574111037108,-6086313910825453169967649775648459526361178574102012892⟩,⟨806181323978634810513307354309769929100584911808641347,806181323978634810513307354309769929100584911817664816⟩⟩, + ⟨⟨12709062724830143369427113697834189336737840166131456085,12709062724830143369427113697834189336737840166158876823⟩,⟨-16672432406972011757818632624965978981496478219324125308,-16672432406972011757818632624965978981496478219296713166⟩⟩, + ⟨⟨14762857246526666632973767884655589040791924978729351166,14762857246526666632973767884655589040791924978772599411⟩,⟨51108643937585302481307945603268825964666054681125584450,51108643937585302481307945603268825964666054681168809817⟩⟩, + ⟨⟨-104429854549865183844563095956307605415340106243637697720,-104429854549865183844563095956307605415340106243528687888⟩,⟨-22467092947012088241527597380586692088413276335388082852,-22467092947012088241527597380586692088413276335278994272⟩⟩] +lemma tw0_1_3_12_calc (j : Fin 31) : taylorWaveBox 0 1 3 12 j = tw0_1_3_12 j := by + revert j + decide +kernel +def tw0_1_3_13 : Fin 31 → CI := ![⟨⟨-1650464091251510377250444986598995781222047541237447320,-1650464091251510377250444986598995781222047541204794775⟩,⟨-31034253095896704763607027450460889102699692381214294419,-31034253095896704763607027450460889102699692381181662889⟩⟩, + ⟨⟨14511951404618084345003588783191441529431856071943359614,14511951404618084345003588783191441529431856071956035921⟩,⟨7545273706366110042626501790386282193837439860078829846,7545273706366110042626501790386282193837439860091507370⟩⟩, + ⟨⟨-6265703939234592778212691484150872075322046662627319631,-6265703939234592778212691484150872075322046662617172077⟩,⟨2725540410867179379817464564903136735603866590165932857,2725540410867179379817464564903136735603866590176084129⟩⟩, + ⟨⟨866415572675488097972643640149835405811477887737101658,866415572675488097972643640149835405811477887740209315⟩,⟨-1943929470145736965806985317927907116347808969299982451,-1943929470145736965806985317927907116347808969296874683⟩⟩, + ⟨⟨83365893363915486127753796134583936246895984634993098,83365893363915486127753796134583936246895984635715930⟩,⟨448687930065687006223227470497763044796088157811881224,448687930065687006223227470497763044796088157812604414⟩⟩, + ⟨⟨-38158857268701353221240849042921652070474262624408520,-38158857268701353221240849042921652070474262624308858⟩,⟨-47478385133203778606924262662561554582013851935163478,-47478385133203778606924262662561554582013851935063850⟩⟩, + ⟨⟨4020679259502228807042778128379054105701606145075385,4020679259502228807042778128379054105701606145086391⟩,⟨1946633636359311091795645074903390253043369031838888,1946633636359311091795645074903390253043369031849888⟩⟩, + ⟨⟨-154967960002411407979423677606126651407397652283352,-154967960002411407979423677606126651407397652282938⟩,⟨7935846287765709797424950539236045545216950994884,7935846287765709797424950539236045545216950995298⟩⟩, + ⟨⟨1509083762651779304838771027827588408893095819343,1509083762651779304838771027827588408893095819435⟩,⟨-1556808401135021062539151448982513381782105949318,-1556808401135021062539151448982513381782105949232⟩⟩, + ⟨⟨5332868019986595656679157224932405931497997965,5332868019986595656679157224932405931497998349⟩,⟨9025627563920979386553240270615284034862015579,9025627563920979386553240270615284034862015977⟩⟩, + ⟨⟨-4617822581246504511676977837120305989546697,-4617822581246504511676977837120305989545347⟩,⟨15623433495608598964657552818679797263749107,15623433495608598964657552818679797263750458⟩⟩, + ⟨⟨4751091783158164505575935713119904322502,4751091783158164505575935713119904326190⟩,⟨7879760771548501023692770870808367748011,7879760771548501023692770870808367751445⟩⟩, + ⟨⟨-1774876317517490723366920963346288059,-1774876317517490723366920963346276600⟩,⟨-2543805436485844292506804926258597263,-2543805436485844292506804926258585803⟩⟩, + ⟨⟨-797948611400056205931206839332006,-797948611400056205931206839301577⟩,⟨-1548821539836255792086356264865199,-1548821539836255792086356264835637⟩⟩, + ⟨⟨684561095196780145679283429534,684561095196780145679283477570⟩,⟨7208496784565136362753539877099,7208496784565136362753539923563⟩⟩, + ⟨⟨-947513211216504865529213916952,-947513211216504865529213858634⟩,⟨-35888,31402⟩⟩, + ⟨⟨684561095196780145679283429534,684561095196780145679283477570⟩,⟨-7208496784565136362753539923563,-7208496784565136362753539877099⟩⟩, + ⟨⟨-797948611400056205931206839332006,-797948611400056205931206839301577⟩,⟨1548821539836255792086356264835637,1548821539836255792086356264865199⟩⟩, + ⟨⟨-1774876317517490723366920963346288059,-1774876317517490723366920963346276600⟩,⟨2543805436485844292506804926258585803,2543805436485844292506804926258597263⟩⟩, + ⟨⟨4751091783158164505575935713119904322502,4751091783158164505575935713119904326190⟩,⟨-7879760771548501023692770870808367751445,-7879760771548501023692770870808367748011⟩⟩, + ⟨⟨-4617822581246504511676977837120305989546697,-4617822581246504511676977837120305989545347⟩,⟨-15623433495608598964657552818679797263750458,-15623433495608598964657552818679797263749107⟩⟩, + ⟨⟨5332868019986595656679157224932405931497997965,5332868019986595656679157224932405931497998349⟩,⟨-9025627563920979386553240270615284034862015977,-9025627563920979386553240270615284034862015579⟩⟩, + ⟨⟨1509083762651779304838771027827588408893095819343,1509083762651779304838771027827588408893095819435⟩,⟨1556808401135021062539151448982513381782105949232,1556808401135021062539151448982513381782105949318⟩⟩, + ⟨⟨-154967960002411407979423677606126651407397652283352,-154967960002411407979423677606126651407397652282938⟩,⟨-7935846287765709797424950539236045545216950995298,-7935846287765709797424950539236045545216950994884⟩⟩, + ⟨⟨4020679259502228807042778128379054105701606145075385,4020679259502228807042778128379054105701606145086391⟩,⟨-1946633636359311091795645074903390253043369031849888,-1946633636359311091795645074903390253043369031838888⟩⟩, + ⟨⟨-38158857268701353221240849042921652070474262624408520,-38158857268701353221240849042921652070474262624308858⟩,⟨47478385133203778606924262662561554582013851935063850,47478385133203778606924262662561554582013851935163478⟩⟩, + ⟨⟨83365893363915486127753796134583936246895984634993098,83365893363915486127753796134583936246895984635715930⟩,⟨-448687930065687006223227470497763044796088157812604414,-448687930065687006223227470497763044796088157811881224⟩⟩, + ⟨⟨866415572675488097972643640149835405811477887737101658,866415572675488097972643640149835405811477887740209315⟩,⟨1943929470145736965806985317927907116347808969296874683,1943929470145736965806985317927907116347808969299982451⟩⟩, + ⟨⟨-6265703939234592778212691484150872075322046662627319631,-6265703939234592778212691484150872075322046662617172077⟩,⟨-2725540410867179379817464564903136735603866590176084129,-2725540410867179379817464564903136735603866590165932857⟩⟩, + ⟨⟨14511951404618084345003588783191441529431856071943359613,14511951404618084345003588783191441529431856071956035921⟩,⟨-7545273706366110042626501790386282193837439860091507370,-7545273706366110042626501790386282193837439860078829845⟩⟩, + ⟨⟨-1650464091251510377250444986598995781222047541237447320,-1650464091251510377250444986598995781222047541204794775⟩,⟨31034253095896704763607027450460889102699692381181662889,31034253095896704763607027450460889102699692381214294419⟩⟩] +lemma tw0_1_3_13_calc (j : Fin 31) : taylorWaveBox 0 1 3 13 j = tw0_1_3_13 j := by + revert j + decide +kernel +def tw0_1_3_14 : Fin 31 → CI := ![⟨⟨8429514384397883307472342100489741449831775350546758791,8429514384397883307472342100489741449831775350555743620⟩,⟨893877119233090506865106456247246657743596138463850103,893877119233090506865106456247246657743596138472839693⟩⟩, + ⟨⟨-2956204298146429394345589595034890330760221813482924442,-2956204298146429394345589595034890330760221813479385096⟩,⟨3672637096353442276349357474674567289835457146852016490,3672637096353442276349357474674567289835457146855557366⟩⟩, + ⟨⟨-351776262041463085721999778488307149623258271488525593,-351776262041463085721999778488307149623258271485178761⟩,⟨-2057997079072478577600546233956179724851091428894336369,-2057997079072478577600546233956179724851091428890990674⟩⟩, + ⟨⟨525943919129244577649686308569294491451145796061087475,525943919129244577649686308569294491451145796062040044⟩,⟨449198654487671699272292679770960095047524502788271902,449198654487671699272292679770960095047524502789224496⟩⟩, + ⟨⟨-156390142706297200836587478928834282413804600855021874,-156390142706297200836587478928834282413804600854734097⟩,⟨-24438427919978978178356849028227262370421876559792518,-24438427919978978178356849028227262370421876559504873⟩⟩, + ⟨⟨21735963231721342804730168498506830215600734246662073,21735963231721342804730168498506830215600734246698633⟩,⟨-6290096441525796916450576402535424013030783067141029,-6290096441525796916450576402535424013030783067104477⟩⟩, + ⟨⟨-1407463785023452082975908624292969982372103402375530,-1407463785023452082975908624292969982372103402370769⟩,⟨1095579563243115397694005588585671705951951222269744,1095579563243115397694005588585671705951951222274506⟩⟩, + ⟨⟨30757455058443463362792576525511316639237143166913,30757455058443463362792576525511316639237143167147⟩,⟨-59310128720431194156895563085672235199935336879100,-59310128720431194156895563085672235199935336878866⟩⟩, + ⟨⟨191339293890062443571963833495861675616601969961,191339293890062443571963833495861675616601970003⟩,⟨991187654665305432454215279966796290533480670552,991187654665305432454215279966796290533480670598⟩⟩, + ⟨⟨-5211962996414493088290865514989334319305974429,-5211962996414493088290865514989334319305974245⟩,⟨-888373471964510012783269664803449066577545927,-888373471964510012783269664803449066577545754⟩⟩, + ⟨⟨-4070085983395201554701990163964820150949045,-4070085983395201554701990163964820150948328⟩,⟨-7913642806890709516147025301369692576585479,-7913642806890709516147025301369692576584762⟩⟩, + ⟨⟨-5024770617143940510880641566839003827113,-5024770617143940510880641566839003824581⟩,⟨-2049888597883068445182558773270413816140,-2049888597883068445182558773270413813596⟩⟩, + ⟨⟨1757529869881013925085515247180467124,1757529869881013925085515247180473801⟩,⟨869287154113963840795145626073839700,869287154113963840795145626073846377⟩⟩, + ⟨⟨853991680957351305598790265199142,853991680957351305598790265220026⟩,⟨792701474648503223076918713544186,792701474648503223076918713565174⟩⟩, + ⟨⟨-1351067091753433553272228204519,-1351067091753433553272228173225⟩,⟨-4841068633205899587375084858710,-4841068633205899587375084829098⟩⟩, + ⟨⟨666328580003035268515716805374,666328580003035268515716846386⟩,⟨-22083,25238⟩⟩, + ⟨⟨-1351067091753433553272228204519,-1351067091753433553272228173225⟩,⟨4841068633205899587375084829098,4841068633205899587375084858710⟩⟩, + ⟨⟨853991680957351305598790265199142,853991680957351305598790265220026⟩,⟨-792701474648503223076918713565174,-792701474648503223076918713544186⟩⟩, + ⟨⟨1757529869881013925085515247180467124,1757529869881013925085515247180473801⟩,⟨-869287154113963840795145626073846377,-869287154113963840795145626073839700⟩⟩, + ⟨⟨-5024770617143940510880641566839003827113,-5024770617143940510880641566839003824581⟩,⟨2049888597883068445182558773270413813596,2049888597883068445182558773270413816140⟩⟩, + ⟨⟨-4070085983395201554701990163964820150949045,-4070085983395201554701990163964820150948328⟩,⟨7913642806890709516147025301369692576584762,7913642806890709516147025301369692576585479⟩⟩, + ⟨⟨-5211962996414493088290865514989334319305974429,-5211962996414493088290865514989334319305974245⟩,⟨888373471964510012783269664803449066577545754,888373471964510012783269664803449066577545927⟩⟩, + ⟨⟨191339293890062443571963833495861675616601969961,191339293890062443571963833495861675616601970003⟩,⟨-991187654665305432454215279966796290533480670598,-991187654665305432454215279966796290533480670552⟩⟩, + ⟨⟨30757455058443463362792576525511316639237143166913,30757455058443463362792576525511316639237143167147⟩,⟨59310128720431194156895563085672235199935336878866,59310128720431194156895563085672235199935336879100⟩⟩, + ⟨⟨-1407463785023452082975908624292969982372103402375530,-1407463785023452082975908624292969982372103402370769⟩,⟨-1095579563243115397694005588585671705951951222274506,-1095579563243115397694005588585671705951951222269744⟩⟩, + ⟨⟨21735963231721342804730168498506830215600734246662073,21735963231721342804730168498506830215600734246698633⟩,⟨6290096441525796916450576402535424013030783067104477,6290096441525796916450576402535424013030783067141029⟩⟩, + ⟨⟨-156390142706297200836587478928834282413804600855021874,-156390142706297200836587478928834282413804600854734097⟩,⟨24438427919978978178356849028227262370421876559504873,24438427919978978178356849028227262370421876559792518⟩⟩, + ⟨⟨525943919129244577649686308569294491451145796061087475,525943919129244577649686308569294491451145796062040044⟩,⟨-449198654487671699272292679770960095047524502789224496,-449198654487671699272292679770960095047524502788271902⟩⟩, + ⟨⟨-351776262041463085721999778488307149623258271488525593,-351776262041463085721999778488307149623258271485178761⟩,⟨2057997079072478577600546233956179724851091428890990674,2057997079072478577600546233956179724851091428894336369⟩⟩, + ⟨⟨-2956204298146429394345589595034890330760221813482924442,-2956204298146429394345589595034890330760221813479385096⟩,⟨-3672637096353442276349357474674567289835457146855557366,-3672637096353442276349357474674567289835457146852016490⟩⟩, + ⟨⟨8429514384397883307472342100489741449831775350546758791,8429514384397883307472342100489741449831775350555743620⟩,⟨-893877119233090506865106456247246657743596138472839693,-893877119233090506865106456247246657743596138463850103⟩⟩] +lemma tw0_1_3_14_calc (j : Fin 31) : taylorWaveBox 0 1 3 14 j = tw0_1_3_14 j := by + revert j + decide +kernel +def tw0_1_3_15 : Fin 31 → CI := ![⟨⟨-568731902278409102093986847051579644965424676456628211,-568731902278409102093986847051579644965424676454340031⟩,⟨2100460384695582532137431790739702056945966689198785764,2100460384695582532137431790739702056945966689201073067⟩⟩, + ⟨⟨-818854450302790035567859155807003041887940306799745599,-818854450302790035567859155807003041887940306798618723⟩,⟨-982524538364864467630406510604826234850451803764014519,-982524538364864467630406510604826234850451803762888572⟩⟩, + ⟨⟨598892897973783190415523606898608337597234743347682455,598892897973783190415523606898608337597234743348678095⟩,⟨43022919413241228547381052056775525477105283868088168,43022919413241228547381052056775525477105283869084072⟩⟩, + ⟨⟨-177382925076426227072576252062953949431855688876157124,-177382925076426227072576252062953949431855688875832331⟩,⟨115293634179455790542899307486328783894554323706470355,115293634179455790542899307486328783894554323706795122⟩⟩, + ⟨⟨24487903246213532785715570892351091933288936253201991,24487903246213532785715570892351091933288936253302709⟩,⟨-45500704655319193214917708299554067181065826367102831,-45500704655319193214917708299554067181065826367002084⟩⟩, + ⟨⟨-896925934647212883132306780356393219555447070520549,-896925934647212883132306780356393219555447070504024⟩,⟨7860359742797448587208557066561324835543040093256422,7860359742797448587208557066561324835543040093272957⟩⟩, + ⟨⟨-135106632785849644316846960388151356414068430569175,-135106632785849644316846960388151356414068430567435⟩,⟨-656496928211141020349083271296048361344659155688961,-656496928211141020349083271296048361344659155687220⟩⟩, + ⟨⟨14446077626985226000328292496020657070472359569107,14446077626985226000328292496020657070472359569212⟩,⟨22898178159592197999473199143049702615945184512592,22898178159592197999473199143049702615945184512697⟩⟩, + ⟨⟨-403992805265904168030115229861674322380650668226,-403992805265904168030115229861674322380650668204⟩,⟨-180205527931837888695472122164042833054288530811,-180205527931837888695472122164042833054288530789⟩⟩, + ⟨⟨1920322968183194397946847968843707712286372590,1920322968183194397946847968843707712286372689⟩,⟨-1615735922567809896656623578587987967681976485,-1615735922567809896656623578587987967681976388⟩⟩, + ⟨⟨4323103172642216040330812154706210502969985,4323103172642216040330812154706210502970359⟩,⟨1496943611463942171727315880813654052031833,1496943611463942171727315880813654052032206⟩⟩, + ⟨⟨2916118194722405906451030452189281217828,2916118194722405906451030452189281218874⟩,⟨-755545149901968098209653477941872494113,-755545149901968098209653477941872492973⟩⟩, + ⟨⟨-1165481001562436867926380832688010848,-1165481001562436867926380832688006049⟩,⟨50088891723101966774270604432840513,50088891723101966774270604432845312⟩⟩, + ⟨⟨-675137297557212110384977017196691,-675137297557212110384977017184776⟩,⟨-286498817051617108853988565028827,-286498817051617108853988565016423⟩⟩, + ⟨⟨1427123103227160419057094690405,1427123103227160419057094708870⟩,⟨2957108425669173836628957300115,2957108425669173836628957317128⟩⟩, + ⟨⟨-441024452862316311682860260197,-441024452862316311682860233052⟩,⟨-16704,14616⟩⟩, + ⟨⟨1427123103227160419057094690405,1427123103227160419057094708870⟩,⟨-2957108425669173836628957317128,-2957108425669173836628957300115⟩⟩, + ⟨⟨-675137297557212110384977017196691,-675137297557212110384977017184776⟩,⟨286498817051617108853988565016423,286498817051617108853988565028827⟩⟩, + ⟨⟨-1165481001562436867926380832688010848,-1165481001562436867926380832688006049⟩,⟨-50088891723101966774270604432845312,-50088891723101966774270604432840513⟩⟩, + ⟨⟨2916118194722405906451030452189281217828,2916118194722405906451030452189281218874⟩,⟨755545149901968098209653477941872492973,755545149901968098209653477941872494113⟩⟩, + ⟨⟨4323103172642216040330812154706210502969985,4323103172642216040330812154706210502970359⟩,⟨-1496943611463942171727315880813654052032206,-1496943611463942171727315880813654052031833⟩⟩, + ⟨⟨1920322968183194397946847968843707712286372590,1920322968183194397946847968843707712286372689⟩,⟨1615735922567809896656623578587987967681976388,1615735922567809896656623578587987967681976485⟩⟩, + ⟨⟨-403992805265904168030115229861674322380650668226,-403992805265904168030115229861674322380650668204⟩,⟨180205527931837888695472122164042833054288530789,180205527931837888695472122164042833054288530811⟩⟩, + ⟨⟨14446077626985226000328292496020657070472359569107,14446077626985226000328292496020657070472359569212⟩,⟨-22898178159592197999473199143049702615945184512697,-22898178159592197999473199143049702615945184512592⟩⟩, + ⟨⟨-135106632785849644316846960388151356414068430569175,-135106632785849644316846960388151356414068430567435⟩,⟨656496928211141020349083271296048361344659155687220,656496928211141020349083271296048361344659155688961⟩⟩, + ⟨⟨-896925934647212883132306780356393219555447070520549,-896925934647212883132306780356393219555447070504024⟩,⟨-7860359742797448587208557066561324835543040093272957,-7860359742797448587208557066561324835543040093256422⟩⟩, + ⟨⟨24487903246213532785715570892351091933288936253201991,24487903246213532785715570892351091933288936253302709⟩,⟨45500704655319193214917708299554067181065826367002084,45500704655319193214917708299554067181065826367102831⟩⟩, + ⟨⟨-177382925076426227072576252062953949431855688876157124,-177382925076426227072576252062953949431855688875832331⟩,⟨-115293634179455790542899307486328783894554323706795122,-115293634179455790542899307486328783894554323706470355⟩⟩, + ⟨⟨598892897973783190415523606898608337597234743347682455,598892897973783190415523606898608337597234743348678095⟩,⟨-43022919413241228547381052056775525477105283869084072,-43022919413241228547381052056775525477105283868088168⟩⟩, + ⟨⟨-818854450302790035567859155807003041887940306799745599,-818854450302790035567859155807003041887940306798618723⟩,⟨982524538364864467630406510604826234850451803762888572,982524538364864467630406510604826234850451803764014519⟩⟩, + ⟨⟨-568731902278409102093986847051579644965424676456628211,-568731902278409102093986847051579644965424676454340031⟩,⟨-2100460384695582532137431790739702056945966689201073067,-2100460384695582532137431790739702056945966689198785764⟩⟩] +lemma tw0_1_3_15_calc (j : Fin 31) : taylorWaveBox 0 1 3 15 j = tw0_1_3_15 j := by + revert j + decide +kernel +def tw0_1_3_16 : Fin 31 → CI := ![⟨⟨-481050364348025665190892669018183532645869414283961722,-481050364348025665190892669018183532645869414283421011⟩,⟨-216674942346255747424180544411336721949915151174306572,-216674942346255747424180544411336721949915151173765751⟩⟩, + ⟨⟨288133085551554891708387040839788403310281560113656011,288133085551554891708387040839788403310281560113981932⟩,⟨-156107979320096060352765358444667485393854482186841449,-156107979320096060352765358444667485393854482186515220⟩⟩, + ⟨⟨-50173071487666363199278901073084923628660627852984397,-50173071487666363199278901073084923628660627852714357⟩,⟨155174470273505962171814818226563535101262256440678842,155174470273505962171814818226563535101262256440948841⟩⟩, + ⟨⟨-17403923137966785531793699459688090948313946929254996,-17403923137966785531793699459688090948313946929143356⟩,⟨-58584341928448268135860201798690818454267728817956432,-58584341928448268135860201798690818454267728817844782⟩⟩, + ⟨⟨10722463503879827731599854346866641682930763840836102,10722463503879827731599854346866641682930763840867864⟩,⟨11782019317436604053059594087577403806847227660898357,11782019317436604053059594087577403806847227660930118⟩⟩, + ⟨⟨-2281315771724303460586595351163188275865060093801887,-2281315771724303460586595351163188275865060093795440⟩,⟨-1272852082654586411844859594740717955749281893461770,-1272852082654586411844859594740717955749281893455326⟩⟩, + ⟨⟨230157496560263520663598142985393461556330397151441,230157496560263520663598142985393461556330397152237⟩,⟨60120127995752450061498843047961199693203907378740,60120127995752450061498843047961199693203907379536⟩⟩, + ⟨⟨-10356226101126087604474219241449450435227883115650,-10356226101126087604474219241449450435227883115606⟩,⟨344446495791159031875551976208183523471474541317,344446495791159031875551976208183523471474541360⟩⟩, + ⟨⟨156936030444610059586149326165454538684293230758,156936030444610059586149326165454538684293230766⟩,⟨-94275796342905999250728752172547731379860753950,-94275796342905999250728752172547731379860753943⟩⟩, + ⟨⟨-3402454988506013012585631836514221097737947,-3402454988506013012585631836514221097737914⟩,⟨1125054791953366411388961549551144454964148192,1125054791953366411388961549551144454964148228⟩⟩, + ⟨⟨-2019944826547778159738895618964951084364378,-2019944826547778159738895618964951084364195⟩,⟨924129756817907426489242018797513724677968,924129756817907426489242018797513724678151⟩⟩, + ⟨⟨-988627645675973809355188894822157069009,-988627645675973809355188894822157068300⟩,⟨1231556299004921343872486865730237413910,1231556299004921343872486865730237414637⟩⟩, + ⟨⟨560448463695852863915377363386259999,560448463695852863915377363386262494⟩,⟨-339942755974739000407698787635080854,-339942755974739000407698787635078359⟩⟩, + ⟨⟨435340336703510857267014537244180,435340336703510857267014537249688⟩,⟨23730167246871841949529847776270,23730167246871841949529847782286⟩⟩, + ⟨⟨-1188810063524525499537732977796,-1188810063524525499537732966999⟩,⟨-1640405567715864759342660053845,-1640405567715864759342660044023⟩⟩, + ⟨⟨275685112888593429887764915375,275685112888593429887764932343⟩,⟨-9137,10442⟩⟩, + ⟨⟨-1188810063524525499537732977796,-1188810063524525499537732966999⟩,⟨1640405567715864759342660044023,1640405567715864759342660053845⟩⟩, + ⟨⟨435340336703510857267014537244180,435340336703510857267014537249688⟩,⟨-23730167246871841949529847782286,-23730167246871841949529847776270⟩⟩, + ⟨⟨560448463695852863915377363386259999,560448463695852863915377363386262494⟩,⟨339942755974739000407698787635078359,339942755974739000407698787635080854⟩⟩, + ⟨⟨-988627645675973809355188894822157069009,-988627645675973809355188894822157068300⟩,⟨-1231556299004921343872486865730237414637,-1231556299004921343872486865730237413910⟩⟩, + ⟨⟨-2019944826547778159738895618964951084364378,-2019944826547778159738895618964951084364195⟩,⟨-924129756817907426489242018797513724678151,-924129756817907426489242018797513724677968⟩⟩, + ⟨⟨-3402454988506013012585631836514221097737947,-3402454988506013012585631836514221097737914⟩,⟨-1125054791953366411388961549551144454964148228,-1125054791953366411388961549551144454964148192⟩⟩, + ⟨⟨156936030444610059586149326165454538684293230758,156936030444610059586149326165454538684293230766⟩,⟨94275796342905999250728752172547731379860753943,94275796342905999250728752172547731379860753950⟩⟩, + ⟨⟨-10356226101126087604474219241449450435227883115650,-10356226101126087604474219241449450435227883115606⟩,⟨-344446495791159031875551976208183523471474541360,-344446495791159031875551976208183523471474541317⟩⟩, + ⟨⟨230157496560263520663598142985393461556330397151441,230157496560263520663598142985393461556330397152237⟩,⟨-60120127995752450061498843047961199693203907379536,-60120127995752450061498843047961199693203907378740⟩⟩, + ⟨⟨-2281315771724303460586595351163188275865060093801887,-2281315771724303460586595351163188275865060093795440⟩,⟨1272852082654586411844859594740717955749281893455326,1272852082654586411844859594740717955749281893461770⟩⟩, + ⟨⟨10722463503879827731599854346866641682930763840836102,10722463503879827731599854346866641682930763840867864⟩,⟨-11782019317436604053059594087577403806847227660930118,-11782019317436604053059594087577403806847227660898357⟩⟩, + ⟨⟨-17403923137966785531793699459688090948313946929254996,-17403923137966785531793699459688090948313946929143356⟩,⟨58584341928448268135860201798690818454267728817844782,58584341928448268135860201798690818454267728817956432⟩⟩, + ⟨⟨-50173071487666363199278901073084923628660627852984397,-50173071487666363199278901073084923628660627852714357⟩,⟨-155174470273505962171814818226563535101262256440948841,-155174470273505962171814818226563535101262256440678842⟩⟩, + ⟨⟨288133085551554891708387040839788403310281560113656011,288133085551554891708387040839788403310281560113981932⟩,⟨156107979320096060352765358444667485393854482186515220,156107979320096060352765358444667485393854482186841449⟩⟩, + ⟨⟨-481050364348025665190892669018183532645869414283961722,-481050364348025665190892669018183532645869414283421011⟩,⟨216674942346255747424180544411336721949915151173765751,216674942346255747424180544411336721949915151174306572⟩⟩] +lemma tw0_1_3_16_calc (j : Fin 31) : taylorWaveBox 0 1 3 16 j = tw0_1_3_16 j := by + revert j + decide +kernel +def tw0_1_3_17 : Fin 31 → CI := ![⟨⟨66612309006300888163068685856961260993949111361048994,66612309006300888163068685856961260993949111361168137⟩,⟨-101233745348654332806665310386349746005067956466564815,-101233745348654332806665310386349746005067956466445671⟩⟩, + ⟨⟨23373872818710202553661151307119576467971769875690404,23373872818710202553661151307119576467971769875777369⟩,⟨76032584720827063230637599276861390539566514308257082,76032584720827063230637599276861390539566514308343969⟩⟩, + ⟨⟨-35693113476022244202869774301231135450315357231340718,-35693113476022244202869774301231135450315357231273465⟩,⟨-22067389620860111454497290049827759321778775174560599,-22067389620860111454497290049827759321778775174493345⟩⟩, + ⟨⟨16725521407376056128283081842763010763334928093402428,16725521407376056128283081842763010763334928093436878⟩,⟨-19858625038170506002594428861606202990685152872288,-19858625038170506002594428861606202990685152837841⟩⟩, + ⟨⟨-4286381438944037878924942790287265415322580183495246,-4286381438944037878924942790287265415322580183484801⟩,⟨1810405489539100076527151971633256826566334669974692,1810405489539100076527151971633256826566334669985135⟩⟩, + ⟨⟨642298050318713346063082290571125161172215131672202,642298050318713346063082290571125161172215131674459⟩,⟨-505282002218561372675636753108600376814366634919250,-505282002218561372675636753108600376814366634916993⟩⟩, + ⟨⟨-52375851295785411073217604261765549284218867951683,-52375851295785411073217604261765549284218867951359⟩,⟨60448000683438483712244579730010836694906982476194,60448000683438483712244579730010836694906982476518⟩⟩, + ⟨⟨1789085886404461491949929765439253613173213053468,1789085886404461491949929765439253613173213053489⟩,⟨-3303709771367412898895211371584925916777933860493,-3303709771367412898895211371584925916777933860472⟩⟩, + ⟨⟨-4971392843212691591975314821233231508027158401,-4971392843212691591975314821233231508027158396⟩,⟨71607746034757480054282695883832423259498348506,71607746034757480054282695883832423259498348511⟩⟩, + ⟨⟨-363748575335507242926762068034497329215440324,-363748575335507242926762068034497329215440304⟩,⟨-309830483967293896790341180884167058859820750,-309830483967293896790341180884167058859820730⟩⟩, + ⟨⟨378329111398530165131059894564441733188840,378329111398530165131059894564441733188923⟩,⟨-949138991811466532406847003528612520995338,-949138991811466532406847003528612520995255⟩⟩, + ⟨⟨27877509974531507502219281857492642661,27877509974531507502219281857492643009⟩,⟨-783876069897856759331684643592365831845,-783876069897856759331684643592365831513⟩⟩, + ⟨⟨-174374858132703102704825131165926133,-174374858132703102704825131165924998⟩,⟨302237246548709360353202078430436270,302237246548709360353202078430437404⟩⟩, + ⟨⟨-235114542302321267830793590999547,-235114542302321267830793590995720⟩,⟨70779799035699041452793705623542,70779799035699041452793705627562⟩⟩, + ⟨⟨853252168473474581348233267361,853252168473474581348233274474⟩,⟨821110109445847503369592645295,821110109445847503369592651958⟩⟩, + ⟨⟨-163261154622623328124426370195,-163261154622623328124426360146⟩,⟨-6184,5411⟩⟩, + ⟨⟨853252168473474581348233267361,853252168473474581348233274474⟩,⟨-821110109445847503369592651958,-821110109445847503369592645295⟩⟩, + ⟨⟨-235114542302321267830793590999547,-235114542302321267830793590995720⟩,⟨-70779799035699041452793705627562,-70779799035699041452793705623542⟩⟩, + ⟨⟨-174374858132703102704825131165926133,-174374858132703102704825131165924998⟩,⟨-302237246548709360353202078430437404,-302237246548709360353202078430436270⟩⟩, + ⟨⟨27877509974531507502219281857492642661,27877509974531507502219281857492643009⟩,⟨783876069897856759331684643592365831513,783876069897856759331684643592365831845⟩⟩, + ⟨⟨378329111398530165131059894564441733188840,378329111398530165131059894564441733188923⟩,⟨949138991811466532406847003528612520995255,949138991811466532406847003528612520995338⟩⟩, + ⟨⟨-363748575335507242926762068034497329215440324,-363748575335507242926762068034497329215440304⟩,⟨309830483967293896790341180884167058859820730,309830483967293896790341180884167058859820750⟩⟩, + ⟨⟨-4971392843212691591975314821233231508027158401,-4971392843212691591975314821233231508027158396⟩,⟨-71607746034757480054282695883832423259498348511,-71607746034757480054282695883832423259498348506⟩⟩, + ⟨⟨1789085886404461491949929765439253613173213053468,1789085886404461491949929765439253613173213053489⟩,⟨3303709771367412898895211371584925916777933860472,3303709771367412898895211371584925916777933860493⟩⟩, + ⟨⟨-52375851295785411073217604261765549284218867951683,-52375851295785411073217604261765549284218867951359⟩,⟨-60448000683438483712244579730010836694906982476518,-60448000683438483712244579730010836694906982476194⟩⟩, + ⟨⟨642298050318713346063082290571125161172215131672202,642298050318713346063082290571125161172215131674459⟩,⟨505282002218561372675636753108600376814366634916993,505282002218561372675636753108600376814366634919250⟩⟩, + ⟨⟨-4286381438944037878924942790287265415322580183495246,-4286381438944037878924942790287265415322580183484801⟩,⟨-1810405489539100076527151971633256826566334669985135,-1810405489539100076527151971633256826566334669974692⟩⟩, + ⟨⟨16725521407376056128283081842763010763334928093402428,16725521407376056128283081842763010763334928093436878⟩,⟨19858625038170506002594428861606202990685152837841,19858625038170506002594428861606202990685152872288⟩⟩, + ⟨⟨-35693113476022244202869774301231135450315357231340718,-35693113476022244202869774301231135450315357231273465⟩,⟨22067389620860111454497290049827759321778775174493345,22067389620860111454497290049827759321778775174560599⟩⟩, + ⟨⟨23373872818710202553661151307119576467971769875690404,23373872818710202553661151307119576467971769875777369⟩,⟨-76032584720827063230637599276861390539566514308343969,-76032584720827063230637599276861390539566514308257082⟩⟩, + ⟨⟨66612309006300888163068685856961260993949111361048994,66612309006300888163068685856961260993949111361168137⟩,⟨101233745348654332806665310386349746005067956466445671,101233745348654332806665310386349746005067956466564815⟩⟩] +lemma tw0_1_3_17_calc (j : Fin 31) : taylorWaveBox 0 1 3 17 j = tw0_1_3_17 j := by + revert j + decide +kernel +def tw0_1_3_18 : Fin 31 → CI := ![⟨⟨19513726312400087473154463833452250965812923754536228,19513726312400087473154463833452250965812923754561932⟩,⟨17845013357990258550639974721812780564894061499511274,17845013357990258550639974721812780564894061499536972⟩⟩, + ⟨⟨-18250912152392386338285052379998163849328645024485966,-18250912152392386338285052379998163849328645024464437⟩,⟨1830825211489466872620331309574621968106754726264963,1830825211489466872620331309574621968106754726286509⟩⟩, + ⟨⟨7320972198092301509216539982345064800951611797975002,7320972198092301509216539982345064800951611797992515⟩,⟨-7185414528404947229365583002009744368904984016279483,-7185414528404947229365583002009744368904984016261966⟩⟩, + ⟨⟨-1228431356780682927748592979929502710391590843709843,-1228431356780682927748592979929502710391590843700117⟩,⟨4171353734231824799036797608523269865059832444953988,4171353734231824799036797608523269865059832444963714⟩⟩, + ⟨⟨-78602054799307650581382658037649194417335007778811,-78602054799307650581382658037649194417335007775223⟩,⟨-1288703588767423241723036316456109296910866023891604,-1288703588767423241723036316456109296910866023888015⟩⟩, + ⟨⟨65074732793917686301136516647751871219958564470922,65074732793917686301136516647751871219958564471676⟩,⟨233987167727872245967819930170195682621616836297527,233987167727872245967819930170195682621616836298281⟩⟩, + ⟨⟨-9910055931612608732578019651012946200501515490147,-9910055931612608732578019651012946200501515490029⟩,⟨-23547508511770831495421381512493694335982329974669,-23547508511770831495421381512493694335982329974551⟩⟩, + ⟨⟨670783708889683968252879851851567194734069423478,670783708889683968252879851851567194734069423487⟩,⟨1106699292100383052580856843707320102370955047198,1106699292100383052580856843707320102370955047208⟩⟩, + ⟨⟨-20796384366871480882557147685129998077935071919,-20796384366871480882557147685129998077935071916⟩,⟨-16802879099625706750598996112951984813805400055,-16802879099625706750598996112951984813805400053⟩⟩, + ⟨⟨190234693542596831850007619211094315223635671,190234693542596831850007619211094315223635678⟩,⟨-31242440486873029257540582420493514809603185,-31242440486873029257540582420493514809603179⟩⟩, + ⟨⟨166905980858588857458942304856436496421692,166905980858588857458942304856436496421730⟩,⟨414124140473101636961275702525480888876069,414124140473101636961275702525480888876107⟩⟩, + ⟨⟨210590197670714343052064471692806119159,210590197670714343052064471692806119314⟩,⟨304334458362580335007412263984680317441,304334458362580335007412263984680317587⟩⟩, + ⟨⟨3709143901776390739947863892512083,3709143901776390739947863892512803⟩,⟨-176419432087417964537368363888588667,-176419432087417964537368363888587946⟩⟩, + ⟨⟨105424950671899797039813219616097,105424950671899797039813219618426⟩,⟨-78376233347473044003781950989777,-78376233347473044003781950987418⟩⟩, + ⟨⟨-546862469743008353703450204963,-546862469743008353703450200692⟩,⟨-365146912794511152975964442690,-365146912794511152975964438593⟩⟩, + ⟨⟨91849335326674443216118533804,91849335326674443216118539458⟩,⟨-3044,3479⟩⟩, + ⟨⟨-546862469743008353703450204963,-546862469743008353703450200692⟩,⟨365146912794511152975964438593,365146912794511152975964442690⟩⟩, + ⟨⟨105424950671899797039813219616097,105424950671899797039813219618426⟩,⟨78376233347473044003781950987418,78376233347473044003781950989777⟩⟩, + ⟨⟨3709143901776390739947863892512083,3709143901776390739947863892512803⟩,⟨176419432087417964537368363888587946,176419432087417964537368363888588667⟩⟩, + ⟨⟨210590197670714343052064471692806119159,210590197670714343052064471692806119314⟩,⟨-304334458362580335007412263984680317587,-304334458362580335007412263984680317441⟩⟩, + ⟨⟨166905980858588857458942304856436496421692,166905980858588857458942304856436496421730⟩,⟨-414124140473101636961275702525480888876107,-414124140473101636961275702525480888876069⟩⟩, + ⟨⟨190234693542596831850007619211094315223635671,190234693542596831850007619211094315223635678⟩,⟨31242440486873029257540582420493514809603179,31242440486873029257540582420493514809603185⟩⟩, + ⟨⟨-20796384366871480882557147685129998077935071919,-20796384366871480882557147685129998077935071916⟩,⟨16802879099625706750598996112951984813805400053,16802879099625706750598996112951984813805400055⟩⟩, + ⟨⟨670783708889683968252879851851567194734069423478,670783708889683968252879851851567194734069423487⟩,⟨-1106699292100383052580856843707320102370955047208,-1106699292100383052580856843707320102370955047198⟩⟩, + ⟨⟨-9910055931612608732578019651012946200501515490147,-9910055931612608732578019651012946200501515490029⟩,⟨23547508511770831495421381512493694335982329974551,23547508511770831495421381512493694335982329974669⟩⟩, + ⟨⟨65074732793917686301136516647751871219958564470922,65074732793917686301136516647751871219958564471676⟩,⟨-233987167727872245967819930170195682621616836298281,-233987167727872245967819930170195682621616836297527⟩⟩, + ⟨⟨-78602054799307650581382658037649194417335007778811,-78602054799307650581382658037649194417335007775223⟩,⟨1288703588767423241723036316456109296910866023888015,1288703588767423241723036316456109296910866023891604⟩⟩, + ⟨⟨-1228431356780682927748592979929502710391590843709843,-1228431356780682927748592979929502710391590843700117⟩,⟨-4171353734231824799036797608523269865059832444963714,-4171353734231824799036797608523269865059832444953988⟩⟩, + ⟨⟨7320972198092301509216539982345064800951611797975002,7320972198092301509216539982345064800951611797992515⟩,⟨7185414528404947229365583002009744368904984016261966,7185414528404947229365583002009744368904984016279483⟩⟩, + ⟨⟨-18250912152392386338285052379998163849328645024485966,-18250912152392386338285052379998163849328645024464437⟩,⟨-1830825211489466872620331309574621968106754726286509,-1830825211489466872620331309574621968106754726264963⟩⟩, + ⟨⟨19513726312400087473154463833452250965812923754536228,19513726312400087473154463833452250965812923754561932⟩,⟨-17845013357990258550639974721812780564894061499536972,-17845013357990258550639974721812780564894061499511274⟩⟩] +lemma tw0_1_3_18_calc (j : Fin 31) : taylorWaveBox 0 1 3 18 j = tw0_1_3_18 j := by + revert j + decide +kernel +def tw0_1_3_19 : Fin 31 → CI := ![⟨⟨-4302996007357354157820223409404148527389692289217969,-4302996007357354157820223409404148527389692289211874⟩,⟨3417880981211007647515736970781888985187440671219982,3417880981211007647515736970781888985187440671226079⟩⟩, + ⟨⟨395302016726246727928092079081340234631137241422298,395302016726246727928092079081340234631137241427297⟩,⟨-4008834452796017057265139217506847227291976163772515,-4008834452796017057265139217506847227291976163767518⟩⟩, + ⟨⟨1217667295492666118752439599311841597464932688997147,1217667295492666118752439599311841597464932689001977⟩,⟨2054395610115408886499685413735950233038455238737711,2054395610115408886499685413735950233038455238742540⟩⟩, + ⟨⟨-904176111951139000562774039215999697087067226146719,-904176111951139000562774039215999697087067226144166⟩,⟨-584638158298706966881553891439693704795112162802375,-584638158298706966881553891439693704795112162799822⟩⟩, + ⟨⟨328107599596991489123385121677791768243233518512019,328107599596991489123385121677791768243233518513139⟩,⟨93567365394697437692085078499102579292447180837824,93567365394697437692085078499102579292447180838943⟩⟩, + ⟨⟨-68211624038189410776935595617299182884448532469917,-68211624038189410776935595617299182884448532469639⟩,⟨-8505332539540493850906024723178900732595052788660,-8505332539540493850906024723178900732595052788383⟩⟩, + ⟨⟨7757837713304445585067544947325321133324378041029,7757837713304445585067544947325321133324378041073⟩,⟨466933027645019618875008959444646615195521276538,466933027645019618875008959444646615195521276582⟩⟩, + ⟨⟨-424482768951875821256411768622485637206506622162,-424482768951875821256411768622485637206506622158⟩,⟨6507950452819541812107324161178692603135165538,6507950452819541812107324161178692603135165542⟩⟩, + ⟨⟨9112495175591436938158326311036053683689505068,9112495175591436938158326311036053683689505069⟩,⟨-2629666822261435540997693909692630189761454206,-2629666822261435540997693909692630189761454205⟩⟩, + ⟨⟨-38068222977135020291563034510346291114794493,-38068222977135020291563034510346291114794489⟩,⟨63547878881840135317976210215004626743835674,63547878881840135317976210215004626743835678⟩⟩, + ⟨⟨-169268960508761939878100143110698589737891,-169268960508761939878100143110698589737876⟩,⟨-76660810981501324832648238386425870421313,-76660810981501324832648238386425870421298⟩⟩, + ⟨⟨-157620065645811937351991852883295665294,-157620065645811937351991852883295665216⟩,⟨-53042244532723259765067684970753539632,-53042244532723259765067684970753539553⟩⟩, + ⟨⟨39339803112879829326895371717179997,39339803112879829326895371717180329⟩,⟨75334045014690016493145185428574280,75334045014690016493145185428574613⟩⟩, + ⟨⟨-36942485760742421760056821834177,-36942485760742421760056821832988⟩,⟨55819197255326611526130010569812,55819197255326611526130010570977⟩⟩, + ⟨⟨318759538203457154936772697593,318759538203457154936772699951⟩,⟨139016316110806435547494707478,139016316110806435547494709786⟩⟩, + ⟨⟨-49213003718182846853903180526,-49213003718182846853903177496⟩,⟨-1864,1631⟩⟩, + ⟨⟨318759538203457154936772697593,318759538203457154936772699951⟩,⟨-139016316110806435547494709786,-139016316110806435547494707478⟩⟩, + ⟨⟨-36942485760742421760056821834177,-36942485760742421760056821832988⟩,⟨-55819197255326611526130010570977,-55819197255326611526130010569812⟩⟩, + ⟨⟨39339803112879829326895371717179997,39339803112879829326895371717180329⟩,⟨-75334045014690016493145185428574613,-75334045014690016493145185428574280⟩⟩, + ⟨⟨-157620065645811937351991852883295665294,-157620065645811937351991852883295665216⟩,⟨53042244532723259765067684970753539553,53042244532723259765067684970753539632⟩⟩, + ⟨⟨-169268960508761939878100143110698589737891,-169268960508761939878100143110698589737876⟩,⟨76660810981501324832648238386425870421298,76660810981501324832648238386425870421313⟩⟩, + ⟨⟨-38068222977135020291563034510346291114794493,-38068222977135020291563034510346291114794489⟩,⟨-63547878881840135317976210215004626743835678,-63547878881840135317976210215004626743835674⟩⟩, + ⟨⟨9112495175591436938158326311036053683689505068,9112495175591436938158326311036053683689505069⟩,⟨2629666822261435540997693909692630189761454205,2629666822261435540997693909692630189761454206⟩⟩, + ⟨⟨-424482768951875821256411768622485637206506622162,-424482768951875821256411768622485637206506622158⟩,⟨-6507950452819541812107324161178692603135165542,-6507950452819541812107324161178692603135165538⟩⟩, + ⟨⟨7757837713304445585067544947325321133324378041029,7757837713304445585067544947325321133324378041073⟩,⟨-466933027645019618875008959444646615195521276582,-466933027645019618875008959444646615195521276538⟩⟩, + ⟨⟨-68211624038189410776935595617299182884448532469917,-68211624038189410776935595617299182884448532469639⟩,⟨8505332539540493850906024723178900732595052788383,8505332539540493850906024723178900732595052788660⟩⟩, + ⟨⟨328107599596991489123385121677791768243233518512019,328107599596991489123385121677791768243233518513139⟩,⟨-93567365394697437692085078499102579292447180838943,-93567365394697437692085078499102579292447180837824⟩⟩, + ⟨⟨-904176111951139000562774039215999697087067226146719,-904176111951139000562774039215999697087067226144166⟩,⟨584638158298706966881553891439693704795112162799822,584638158298706966881553891439693704795112162802375⟩⟩, + ⟨⟨1217667295492666118752439599311841597464932688997147,1217667295492666118752439599311841597464932689001977⟩,⟨-2054395610115408886499685413735950233038455238742540,-2054395610115408886499685413735950233038455238737711⟩⟩, + ⟨⟨395302016726246727928092079081340234631137241422298,395302016726246727928092079081340234631137241427297⟩,⟨4008834452796017057265139217506847227291976163767518,4008834452796017057265139217506847227291976163772515⟩⟩, + ⟨⟨-4302996007357354157820223409404148527389692289217969,-4302996007357354157820223409404148527389692289211874⟩,⟨-3417880981211007647515736970781888985187440671226079,-3417880981211007647515736970781888985187440671219982⟩⟩] +lemma tw0_1_3_19_calc (j : Fin 31) : taylorWaveBox 0 1 3 19 j = tw0_1_3_19 j := by + revert j + decide +kernel +def tw0_1_3_20 : Fin 31 → CI := ![⟨⟨-534511098658311424507204607317171513474800910193255,-534511098658311424507204607317171513474800910191908⟩,⟨-950043409609344974223535860927405542795345445218263,-950043409609344974223535860927405542795345445216916⟩⟩, + ⟨⟨807592473726224462865914421345513724531726159004158,807592473726224462865914421345513724531726159005252⟩,⟨246776579937251269154712272742252557130211951162536,246776579937251269154712272742252557130211951163631⟩⟩, + ⟨⟨-507931882664620831797192421039902399449548295538045,-507931882664620831797192421039902399449548295536823⟩,⟨153807998068526314307291419656238654557585951552292,153807998068526314307291419656238654557585951553515⟩⟩, + ⟨⟨193121919634479538471622856384972148677733253504553,193121919634479538471622856384972148677733253505205⟩,⟨-165736477660241270633210618459878904045607107641236,-165736477660241270633210618459878904045607107640584⟩⟩, + ⟨⟨-49762293957202914116196776632962417787553549654782,-49762293957202914116196776632962417787553549654458⟩,⟨70220091200125303350189378825503940063358664117563,70220091200125303350189378825503940063358664117888⟩⟩, + ⟨⟨9217391982291752355619213947927656968539410885172,9217391982291752355619213947927656968539410885266⟩,⟨-16122515718571112598085009416023723903253844711610,-16122515718571112598085009416023723903253844711516⟩⟩, + ⟨⟨-1118588865211945379946753130719632424802182114053,-1118588865211945379946753130719632424802182114036⟩,⟨1960080538084983598580329691416568429456988354421,1960080538084983598580329691416568429456988354438⟩⟩, + ⟨⟨65388267856012181316832122509921358369765339558,65388267856012181316832122509921358369765339561⟩,⟨-115743773806618123713620214371361916976809190184,-115743773806618123713620214371361916976809190182⟩⟩, + ⟨⟨-1038613702906563190017123904303564164282252686,-1038613702906563190017123904303564164282252685⟩,⟨3038937590328064785524221915202629514452295055,3038937590328064785524221915202629514452295056⟩⟩, + ⟨⟨-8768032646531840060423133994259629116793632,-8768032646531840060423133994259629116793630⟩,⟨-25717292294632878853194312043979400136924607,-25717292294632878853194312043979400136924605⟩⟩, + ⟨⟨69662078213710903643041478900933616098538,69662078213710903643041478900933616098545⟩,⟨-24419855555736266218441842203078549271943,-24419855555736266218441842203078549271936⟩⟩, + ⟨⟨67797211112981146623522495355114697587,67797211112981146623522495355114697611⟩,⟨-22185414630965186821327120088183432162,-22185414630965186821327120088183432135⟩⟩, + ⟨⟨-32525512130010357111579778181760259,-32525512130010357111579778181760138⟩,⟨-21649192936529651442480059734239907,-21649192936529651442480059734239786⟩⟩, + ⟨⟨7668355304488145226991536391128,7668355304488145226991536391640⟩,⟨-31640701241156475127963746287721,-31640701241156475127963746287240⟩⟩, + ⟨⟨-170776182717325931743128397542,-170776182717325931743128396339⟩,⟨-40666025805358528276534907358,-40666025805358528276534906158⟩⟩, + ⟨⟨25169833467637736967640563418,25169833467637736967640564968⟩,⟨-835,954⟩⟩, + ⟨⟨-170776182717325931743128397542,-170776182717325931743128396339⟩,⟨40666025805358528276534906158,40666025805358528276534907358⟩⟩, + ⟨⟨7668355304488145226991536391128,7668355304488145226991536391640⟩,⟨31640701241156475127963746287240,31640701241156475127963746287721⟩⟩, + ⟨⟨-32525512130010357111579778181760259,-32525512130010357111579778181760138⟩,⟨21649192936529651442480059734239786,21649192936529651442480059734239907⟩⟩, + ⟨⟨67797211112981146623522495355114697587,67797211112981146623522495355114697611⟩,⟨22185414630965186821327120088183432135,22185414630965186821327120088183432162⟩⟩, + ⟨⟨69662078213710903643041478900933616098538,69662078213710903643041478900933616098545⟩,⟨24419855555736266218441842203078549271936,24419855555736266218441842203078549271943⟩⟩, + ⟨⟨-8768032646531840060423133994259629116793632,-8768032646531840060423133994259629116793630⟩,⟨25717292294632878853194312043979400136924605,25717292294632878853194312043979400136924607⟩⟩, + ⟨⟨-1038613702906563190017123904303564164282252686,-1038613702906563190017123904303564164282252685⟩,⟨-3038937590328064785524221915202629514452295056,-3038937590328064785524221915202629514452295055⟩⟩, + ⟨⟨65388267856012181316832122509921358369765339558,65388267856012181316832122509921358369765339561⟩,⟨115743773806618123713620214371361916976809190182,115743773806618123713620214371361916976809190184⟩⟩, + ⟨⟨-1118588865211945379946753130719632424802182114053,-1118588865211945379946753130719632424802182114036⟩,⟨-1960080538084983598580329691416568429456988354438,-1960080538084983598580329691416568429456988354421⟩⟩, + ⟨⟨9217391982291752355619213947927656968539410885172,9217391982291752355619213947927656968539410885266⟩,⟨16122515718571112598085009416023723903253844711516,16122515718571112598085009416023723903253844711610⟩⟩, + ⟨⟨-49762293957202914116196776632962417787553549654782,-49762293957202914116196776632962417787553549654458⟩,⟨-70220091200125303350189378825503940063358664117888,-70220091200125303350189378825503940063358664117563⟩⟩, + ⟨⟨193121919634479538471622856384972148677733253504553,193121919634479538471622856384972148677733253505205⟩,⟨165736477660241270633210618459878904045607107640584,165736477660241270633210618459878904045607107641236⟩⟩, + ⟨⟨-507931882664620831797192421039902399449548295538045,-507931882664620831797192421039902399449548295536823⟩,⟨-153807998068526314307291419656238654557585951553515,-153807998068526314307291419656238654557585951552292⟩⟩, + ⟨⟨807592473726224462865914421345513724531726159004158,807592473726224462865914421345513724531726159005252⟩,⟨-246776579937251269154712272742252557130211951163631,-246776579937251269154712272742252557130211951162536⟩⟩, + ⟨⟨-534511098658311424507204607317171513474800910193255,-534511098658311424507204607317171513474800910191908⟩,⟨950043409609344974223535860927405542795345445216916,950043409609344974223535860927405542795345445218263⟩⟩] +lemma tw0_1_3_20_calc (j : Fin 31) : taylorWaveBox 0 1 3 20 j = tw0_1_3_20 j := by + revert j + decide +kernel +def tw0_1_3 : Fin 21 → Fin 31 → CI := ![tw0_1_3_0,tw0_1_3_1,tw0_1_3_2,tw0_1_3_3,tw0_1_3_4,tw0_1_3_5,tw0_1_3_6,tw0_1_3_7,tw0_1_3_8,tw0_1_3_9,tw0_1_3_10,tw0_1_3_11,tw0_1_3_12,tw0_1_3_13,tw0_1_3_14,tw0_1_3_15,tw0_1_3_16,tw0_1_3_17,tw0_1_3_18,tw0_1_3_19,tw0_1_3_20] +lemma tw0_1_3_mem (l : Fin 21) (j : Fin 31) : (tw0_1_3 l j).Mem (taylorWave 0 1 (nearNode 3) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 3 l j = tw0_1_3 l j := by + fin_cases l + · exact tw0_1_3_0_calc j + · exact tw0_1_3_1_calc j + · exact tw0_1_3_2_calc j + · exact tw0_1_3_3_calc j + · exact tw0_1_3_4_calc j + · exact tw0_1_3_5_calc j + · exact tw0_1_3_6_calc j + · exact tw0_1_3_7_calc j + · exact tw0_1_3_8_calc j + · exact tw0_1_3_9_calc j + · exact tw0_1_3_10_calc j + · exact tw0_1_3_11_calc j + · exact tw0_1_3_12_calc j + · exact tw0_1_3_13_calc j + · exact tw0_1_3_14_calc j + · exact tw0_1_3_15_calc j + · exact tw0_1_3_16_calc j + · exact tw0_1_3_17_calc j + · exact tw0_1_3_18_calc j + · exact tw0_1_3_19_calc j + · exact tw0_1_3_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 3 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave014.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave014.lean new file mode 100644 index 0000000000000000000000000000000000000000..1667497c4845feb11ca641ae5e681e518b75f6ab --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave014.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_4_0 : Fin 31 → CI := ![⟨⟨-23962338188946630335698102449097804641213329992592026505575,-23962338188946630335698102449097804641213329992568640515919⟩,⟨-5308124509018319730331697238676590936954919480714683080608,-5308124509018319730331697238676590936954919480691394548769⟩⟩, + ⟨⟨2501846446198019039837470422423137475277375028937021999681,2501846446198019039837470422423137475277375028941484360566⟩,⟨-3211164530855886840962029551802115353573255125662207773021,-3211164530855886840962029551802115353573255125657734181325⟩⟩, + ⟨⟨154487411587314425461745374163867913257683415674927706121,154487411587314425461745374163867913257683415675640026915⟩,⟨449153201924693022175267665584242132676711085676911650888,449153201924693022175267665584242132676711085677623914960⟩⟩, + ⟨⟨-33434203629128424710718110666251550291827789343733488384,-33434203629128424710718110666251550291827789343681543865⟩,⟨-12968763309004062878269514870816929377244764285545847764,-12968763309004062878269514870816929377244764285493984599⟩⟩, + ⟨⟨1451376386716597114821098454904549029292003121194419838,1451376386716597114821098454904549029292003121196349859⟩,⟨-616757917037060105091705799159663054013740544124651293,-616757917037060105091705799159663054013740544122719735⟩⟩, + ⟨⟨-15161990355614026177662386183525991053510966886456169,-15161990355614026177662386183525991053510966886416109⟩,⟨32017613925326965266896893599802897372660152522107030,32017613925326965266896893599802897372660152522147130⟩⟩, + ⟨⟨-113928912828058264941297035966348320353169062423502,-113928912828058264941297035966348320353169062422794⟩,⟨-327169845522729380246558016010761844831098429628608,-327169845522729380246558016010761844831098429627904⟩⟩, + ⟨⟨1187257940098048218920740404160094664607941755445,1187257940098048218920740404160094664607941755693⟩,⟨294063524216806579154582369335276612690215201639,294063524216806579154582369335276612690215201879⟩⟩, + ⟨⟨-417680946770739913916332589854993069783310960,-417680946770739913916332589854993069783310683⟩,⟨1205356262418101934106989833069527751409623849,1205356262418101934106989833069527751409624109⟩⟩, + ⟨⟨-291075010684784759940346462996583244820919,-291075010684784759940346462996583244820585⟩,⟨155319227034324648855908890012818347396112,155319227034324648855908890012818347396419⟩⟩, + ⟨⟨-5496720792115860598599110008399023908,-5496720792115860598599110008399023507⟩,⟨19099469442114371761201187027553063190,19099469442114371761201187027553063591⟩⟩, + ⟨⟨76142273869827224960346078068144,76142273869827224960346078068687⟩,⟨-335424429953294547954773759152283,-335424429953294547954773759151770⟩⟩, + ⟨⟨-171816821357720274564340231,-171816821357720274564339507⟩,⟨-3486843264051971325970789950,-3486843264051971325970789258⟩⟩, + ⟨⟨81673726268093163705282,81673726268093163706090⟩,⟨26459332093237022014281,26459332093237022015089⟩⟩, + ⟨⟨-5759022006136079070,-5759022006136078275⟩,⟨-38306594781865145134,-38306594781865144339⟩⟩, + ⟨⟨2253921834885547045,2253921834885547933⟩,⟨-444,508⟩⟩, + ⟨⟨-5759022006136079070,-5759022006136078275⟩,⟨38306594781865144340,38306594781865145135⟩⟩, + ⟨⟨81673726268093163705282,81673726268093163706090⟩,⟨-26459332093237022015088,-26459332093237022014280⟩⟩, + ⟨⟨-171816821357720274564340231,-171816821357720274564339507⟩,⟨3486843264051971325970789259,3486843264051971325970789951⟩⟩, + ⟨⟨76142273869827224960346078068144,76142273869827224960346078068687⟩,⟨335424429953294547954773759151771,335424429953294547954773759152284⟩⟩, + ⟨⟨-5496720792115860598599110008399023908,-5496720792115860598599110008399023507⟩,⟨-19099469442114371761201187027553063590,-19099469442114371761201187027553063189⟩⟩, + ⟨⟨-291075010684784759940346462996583244820919,-291075010684784759940346462996583244820585⟩,⟨-155319227034324648855908890012818347396419,-155319227034324648855908890012818347396112⟩⟩, + ⟨⟨-417680946770739913916332589854993069783310960,-417680946770739913916332589854993069783310683⟩,⟨-1205356262418101934106989833069527751409624109,-1205356262418101934106989833069527751409623848⟩⟩, + ⟨⟨1187257940098048218920740404160094664607941755445,1187257940098048218920740404160094664607941755693⟩,⟨-294063524216806579154582369335276612690215201879,-294063524216806579154582369335276612690215201639⟩⟩, + ⟨⟨-113928912828058264941297035966348320353169062423502,-113928912828058264941297035966348320353169062422794⟩,⟨327169845522729380246558016010761844831098429627905,327169845522729380246558016010761844831098429628608⟩⟩, + ⟨⟨-15161990355614026177662386183525991053510966886456169,-15161990355614026177662386183525991053510966886416109⟩,⟨-32017613925326965266896893599802897372660152522147129,-32017613925326965266896893599802897372660152522107029⟩⟩, + ⟨⟨1451376386716597114821098454904549029292003121194419838,1451376386716597114821098454904549029292003121196349859⟩,⟨616757917037060105091705799159663054013740544122719735,616757917037060105091705799159663054013740544124651294⟩⟩, + ⟨⟨-33434203629128424710718110666251550291827789343733488384,-33434203629128424710718110666251550291827789343681543865⟩,⟨12968763309004062878269514870816929377244764285493984600,12968763309004062878269514870816929377244764285545847764⟩⟩, + ⟨⟨154487411587314425461745374163867913257683415674927706121,154487411587314425461745374163867913257683415675640026915⟩,⟨-449153201924693022175267665584242132676711085677623914959,-449153201924693022175267665584242132676711085676911650888⟩⟩, + ⟨⟨2501846446198019039837470422423137475277375028937021999704,2501846446198019039837470422423137475277375028941484360513⟩,⟨3211164530855886840962029551802115353573255125657734181376,3211164530855886840962029551802115353573255125662207773007⟩⟩, + ⟨⟨-23962338188946630335698102449097804641213329992592026505872,-23962338188946630335698102449097804641213329992568640515671⟩,⟨5308124509018319730331697238676590936954919480691394548313,5308124509018319730331697238676590936954919480714683080701⟩⟩] +lemma tw0_1_4_0_calc (j : Fin 31) : taylorWaveBox 0 1 4 0 j = tw0_1_4_0 j := by + revert j + decide +kernel +def tw0_1_4_1 : Fin 31 → CI := ![⟨⟨13136117469868375185958122226095814296211468699912118935732,13136117469868375185958122226095814296211468699948369901973⟩,⟨-33198746928087257706604217901555538985609904020060313222508,-33198746928087257706604217901555538985609904020023891120716⟩⟩, + ⟨⟨4082234544818083939844210326346050083672037949925910987184,4082234544818083939844210326346050083672037949933231833496⟩,⟨4743101797352960316471288830952647889404013752980859422774,4743101797352960316471288830952647889404013752988160885492⟩⟩, + ⟨⟨-770901261303239948829330849314267429286045634229987673630,-770901261303239948829330849314267429286045634228770071545⟩,⟨69777187656469845851278568055928176266373761621700978392,69777187656469845851278568055928176266373761622918684458⟩⟩, + ⟨⟨37992025257760750757801137805035701097223388666747722226,37992025257760750757801137805035701097223388666839655143⟩,⟨-49194872609452153646352095913130668243564233519039479506,-49194872609452153646352095913130668243564233518947421943⟩⟩, + ⟨⟨183977142961216081576522207256515101673369248845941257,183977142961216081576522207256515101673369248849456958⟩,⟨2911354685717172545157461360004305488985891203331233967,2911354685717172545157461360004305488985891203334747589⟩⟩, + ⟨⟨-46974370293756318459080357284607409466631199367824663,-46974370293756318459080357284607409466631199367751056⟩,⟨-52150961050897214002046520163627890015333961847441375,-52150961050897214002046520163627890015333961847367829⟩⟩, + ⟨⟨732119365929680617446899603558297805984573454905335,732119365929680617446899603558297805984573454906580⟩,⟨90787294696881665600167679853271825565234168172596,90787294696881665600167679853271825565234168173875⟩⟩, + ⟨⟨-1960024980399952333345252601424882957562075425767,-1960024980399952333345252601424882957562075425377⟩,⟨2011781530044090058904475671747999717770337022352,2011781530044090058904475671747999717770337022796⟩⟩, + ⟨⟨-1858434505327298884124660891979987587073237688,-1858434505327298884124660891979987587073237079⟩,⟨-2565258591612173904079965550459449590093577397,-2565258591612173904079965550459449590093576739⟩⟩, + ⟨⟨187011253607360056657092068060733491127195,187011253607360056657092068060733491128201⟩,⟨-867490542387242633958376748697978097294018,-867490542387242633958376748697978097292981⟩⟩, + ⟨⟨-26849596294821985446020709047847942682,-26849596294821985446020709047847941111⟩,⟨-51297645679472056743181825397328872919,-51297645679472056743181825397328871348⟩⟩, + ⟨⟨438842811438433978933937300685017,438842811438433978933937300686767⟩,⟨988939931146180774023032317997435,988939931146180774023032317999102⟩⟩, + ⟨⟨6167069191238705848790975762,6167069191238705848790977756⟩,⟨10024728026944938654277501318,10024728026944938654277502989⟩⟩, + ⟨⟨-306045668100745064947006,-306045668100745064944211⟩,⟨10279460994266578387930,10279460994266578390725⟩⟩, + ⟨⟨46020962033203682504,46020962033203685631⟩,⟨135818282117998005515,135818282117998008642⟩⟩, + ⟨⟨-8453581538978401777,-8453581538978398451⟩,⟨-1900,1663⟩⟩, + ⟨⟨46020962033203682504,46020962033203685631⟩,⟨-135818282117998008642,-135818282117998005515⟩⟩, + ⟨⟨-306045668100745064947006,-306045668100745064944211⟩,⟨-10279460994266578390725,-10279460994266578387930⟩⟩, + ⟨⟨6167069191238705848790975762,6167069191238705848790977756⟩,⟨-10024728026944938654277502989,-10024728026944938654277501318⟩⟩, + ⟨⟨438842811438433978933937300685017,438842811438433978933937300686767⟩,⟨-988939931146180774023032317999102,-988939931146180774023032317997434⟩⟩, + ⟨⟨-26849596294821985446020709047847942682,-26849596294821985446020709047847941111⟩,⟨51297645679472056743181825397328871348,51297645679472056743181825397328872919⟩⟩, + ⟨⟨187011253607360056657092068060733491127195,187011253607360056657092068060733491128201⟩,⟨867490542387242633958376748697978097292981,867490542387242633958376748697978097294018⟩⟩, + ⟨⟨-1858434505327298884124660891979987587073237688,-1858434505327298884124660891979987587073237079⟩,⟨2565258591612173904079965550459449590093576739,2565258591612173904079965550459449590093577397⟩⟩, + ⟨⟨-1960024980399952333345252601424882957562075425767,-1960024980399952333345252601424882957562075425377⟩,⟨-2011781530044090058904475671747999717770337022796,-2011781530044090058904475671747999717770337022352⟩⟩, + ⟨⟨732119365929680617446899603558297805984573454905335,732119365929680617446899603558297805984573454906580⟩,⟨-90787294696881665600167679853271825565234168173875,-90787294696881665600167679853271825565234168172595⟩⟩, + ⟨⟨-46974370293756318459080357284607409466631199367824663,-46974370293756318459080357284607409466631199367751056⟩,⟨52150961050897214002046520163627890015333961847367829,52150961050897214002046520163627890015333961847441376⟩⟩, + ⟨⟨183977142961216081576522207256515101673369248845941257,183977142961216081576522207256515101673369248849456958⟩,⟨-2911354685717172545157461360004305488985891203334747589,-2911354685717172545157461360004305488985891203331233967⟩⟩, + ⟨⟨37992025257760750757801137805035701097223388666747722226,37992025257760750757801137805035701097223388666839655143⟩,⟨49194872609452153646352095913130668243564233518947421944,49194872609452153646352095913130668243564233519039479506⟩⟩, + ⟨⟨-770901261303239948829330849314267429286045634229987673630,-770901261303239948829330849314267429286045634228770071545⟩,⟨-69777187656469845851278568055928176266373761622918684458,-69777187656469845851278568055928176266373761621700978391⟩⟩, + ⟨⟨4082234544818083939844210326346050083672037949925910987270,4082234544818083939844210326346050083672037949933231833473⟩,⟨-4743101797352960316471288830952647889404013752988160885415,-4743101797352960316471288830952647889404013752980859422815⟩⟩, + ⟨⟨13136117469868375185958122226095814296211468699912118935050,13136117469868375185958122226095814296211468699948369902143⟩,⟨33198746928087257706604217901555538985609904020023891120370,33198746928087257706604217901555538985609904020060313223009⟩⟩] +lemma tw0_1_4_1_calc (j : Fin 31) : taylorWaveBox 0 1 4 1 j = tw0_1_4_1 j := by + revert j + decide +kernel +def tw0_1_4_2 : Fin 31 → CI := ![⟨⟨33499118813210173637769511012972832214458045476403108101663,33499118813210173637769511012972832214458045476444489265774⟩,⟨19878546988644306794184539329621757312535472204453885681810,19878546988644306794184539329621757312535472204495072823199⟩⟩, + ⟨⟨-6288636410371882865542399449474657030908081872472703343023,-6288636410371882865542399449474657030908081872464095191126⟩,⟨3537321339256551703436846736252601006995467086802452300397,3537321339256551703436846736252601006995467086811081310478⟩⟩, + ⟨⟨142074222325611587662907116567372866089994967160984451049,142074222325611587662907116567372866089994967162458044390⟩,⟨-935351776210501479189828559925015409083244392371673702871,-935351776210501479189828559925015409083244392370200221102⟩⟩, + ⟨⟨47316455899103859649849085515140240399836164215486010030,47316455899103859649849085515140240399836164215598630071⟩,⟨65498295434549366178738070809912023224163760316832564750,65498295434549366178738070809912023224163760316945092175⟩⟩, + ⟨⟨-3894458163763249282334460597628222289956701374011450310,-3894458163763249282334460597628222289956701374007195636⟩,⟨-1101370977138017471085341023350816568135944538615964774,-1101370977138017471085341023350816568135944538611709403⟩⟩, + ⟨⟨98395912728326715903995331269826583027338869109723164,98395912728326715903995331269826583027338869109809052⟩,⟨-34575637862104597920573625966696863233039521244352403,-34575637862104597920573625966696863233039521244266490⟩⟩, + ⟨⟨-647510108685632663263621211100025781861771485804945,-647510108685632663263621211100025781861771485802811⟩,⟨984342556313212836270364879865112267665929247879029,984342556313212836270364879865112267665929247881115⟩⟩, + ⟨⟨-1284944374368026875228350378202762141869103789774,-1284944374368026875228350378202762141869103788790⟩,⟨-4663567724284079701894747004382300440089194441309,-4663567724284079701894747004382300440089194440356⟩⟩, + ⟨⟨5898612869490657628309779806129023970150624775,5898612869490657628309779806129023970150626124⟩,⟨-98442749439215801816329291759211291642553580,-98442749439215801816329291759211291642552215⟩⟩, + ⟨⟨1091910033269628830025238746413776994310429,1091910033269628830025238746413776994312284⟩,⟨1418673358882739563188374981432668194260937,1418673358882739563188374981432668194262902⟩⟩, + ⟨⟨119835500813838940272412217776116312147,119835500813838940272412217776116314792⟩,⟨40535598995861520521443464419199503689,40535598995861520521443464419199506334⟩⟩, + ⟨⟨-2224789145529720264030342561171535,-2224789145529720264030342561167238⟩,⟨-1251142847093934752507311174709725,-1251142847093934752507311174705332⟩⟩, + ⟨⟨-25870776356031070786791500108,-25870776356031070786791494098⟩,⟨-14710112522655254876943528478,-14710112522655254876943522888⟩⟩, + ⟨⟨760590441287210221022828,760590441287210221029195⟩,⟨-304182176688861046908773,-304182176688861046902405⟩⟩, + ⟨⟨-192344300856688146504,-192344300856688137564⟩,⟨-348614194127677603717,-348614194127677594777⟩⟩, + ⟨⟨23779564933243983672,23779564933243993023⟩,⟨-4676,5343⟩⟩, + ⟨⟨-192344300856688146504,-192344300856688137564⟩,⟨348614194127677594777,348614194127677603717⟩⟩, + ⟨⟨760590441287210221022828,760590441287210221029195⟩,⟨304182176688861046902406,304182176688861046908773⟩⟩, + ⟨⟨-25870776356031070786791500108,-25870776356031070786791494098⟩,⟨14710112522655254876943522888,14710112522655254876943528478⟩⟩, + ⟨⟨-2224789145529720264030342561171535,-2224789145529720264030342561167238⟩,⟨1251142847093934752507311174705332,1251142847093934752507311174709725⟩⟩, + ⟨⟨119835500813838940272412217776116312147,119835500813838940272412217776116314792⟩,⟨-40535598995861520521443464419199506334,-40535598995861520521443464419199503689⟩⟩, + ⟨⟨1091910033269628830025238746413776994310429,1091910033269628830025238746413776994312284⟩,⟨-1418673358882739563188374981432668194262902,-1418673358882739563188374981432668194260937⟩⟩, + ⟨⟨5898612869490657628309779806129023970150624775,5898612869490657628309779806129023970150626124⟩,⟨98442749439215801816329291759211291642552215,98442749439215801816329291759211291642553580⟩⟩, + ⟨⟨-1284944374368026875228350378202762141869103789774,-1284944374368026875228350378202762141869103788790⟩,⟨4663567724284079701894747004382300440089194440356,4663567724284079701894747004382300440089194441309⟩⟩, + ⟨⟨-647510108685632663263621211100025781861771485804945,-647510108685632663263621211100025781861771485802811⟩,⟨-984342556313212836270364879865112267665929247881115,-984342556313212836270364879865112267665929247879029⟩⟩, + ⟨⟨98395912728326715903995331269826583027338869109723164,98395912728326715903995331269826583027338869109809052⟩,⟨34575637862104597920573625966696863233039521244266490,34575637862104597920573625966696863233039521244352403⟩⟩, + ⟨⟨-3894458163763249282334460597628222289956701374011450310,-3894458163763249282334460597628222289956701374007195636⟩,⟨1101370977138017471085341023350816568135944538611709403,1101370977138017471085341023350816568135944538615964774⟩⟩, + ⟨⟨47316455899103859649849085515140240399836164215486010030,47316455899103859649849085515140240399836164215598630071⟩,⟨-65498295434549366178738070809912023224163760316945092175,-65498295434549366178738070809912023224163760316832564750⟩⟩, + ⟨⟨142074222325611587662907116567372866089994967160984451049,142074222325611587662907116567372866089994967162458044390⟩,⟨935351776210501479189828559925015409083244392370200221102,935351776210501479189828559925015409083244392371673702871⟩⟩, + ⟨⟨-6288636410371882865542399449474657030908081872472703342944,-6288636410371882865542399449474657030908081872464095191179⟩,⟨-3537321339256551703436846736252601006995467086811081310451,-3537321339256551703436846736252601006995467086802452300504⟩⟩, + ⟨⟨33499118813210173637769511012972832214458045476403108101310,33499118813210173637769511012972832214458045476444489266382⟩,⟨-19878546988644306794184539329621757312535472204495072823418,-19878546988644306794184539329621757312535472204453885681065⟩⟩] +lemma tw0_1_4_2_calc (j : Fin 31) : taylorWaveBox 0 1 4 2 j = tw0_1_4_2 j := by + revert j + decide +kernel +def tw0_1_4_3 : Fin 31 → CI := ![⟨⟨-21755210491613615473746671853199628522646468251982351535321,-21755210491613615473746671853199628522646468251945839154012⟩,⟨26127686902880060975083809703804559672576315893587789145200,26127686902880060975083809703804559672576315893624458494595⟩⟩, + ⟨⟨-2056287787141551325240853673737888887369638879265213548183,-2056287787141551325240853673737888887369638879257383801774⟩,⟨-6329548644995875681774890226863173092330950318812173908159,-6329548644995875681774890226863173092330950318804359062757⟩⟩, + ⟨⟨854990211017998455396375522786324443145012850292024565440,854990211017998455396375522786324443145012850293369783818⟩,⟨353199336926654546204710887926591387382601912755394231064,353199336926654546204710887926591387382601912756739521100⟩⟩, + ⟨⟨-79275238432900119535909801737180383781868939273772821551,-79275238432900119535909801737180383781868939273672443005⟩,⟨27866381664552047103347289976763696344598229937536104478,27866381664552047103347289976763696344598229937636474776⟩⟩, + ⟨⟨2589211048981126923990848712018050252245328709709879002,2589211048981126923990848712018050252245328709714344190⟩,⟨-3670687563122710686028035137750710941497551974710504663,-3670687563122710686028035137750710941497551974706037201⟩⟩, + ⟨⟨-7111520707075729065708882413185421304721287391988968,-7111520707075729065708882413185421304721287391855919⟩,⟨123774622544531722435137330137408970318123486359806134,123774622544531722435137330137408970318123486359939293⟩⟩, + ⟨⟨-761644683579548865556458633170913972955332595667916,-761644683579548865556458633170913972955332595664804⟩,⟨-1298486548632669519689964613219843316406953845271629,-1298486548632669519689964613219843316406953845268511⟩⟩, + ⟨⟨6439686033621965681358876598839414769439661987202,6439686033621965681358876598839414769439661988543⟩,⟨1718019554093347489319178119608708398410225950707,1718019554093347489319178119608708398410225951996⟩⟩, + ⟨⟨-4916283221397133900573122374683665406789906787,-4916283221397133900573122374683665406789905143⟩,⟨7286034995407807501539904871547087409495508680,7286034995407807501539904871547087409495510152⟩⟩, + ⟨⟨-2886061589688574822065639168194633196007683,-2886061589688574822065639168194633196004464⟩,⟨-134372954156376516470141901586861110196766,-134372954156376516470141901586861110193709⟩⟩, + ⟨⟨-200414598848045120128178703362882632896,-200414598848045120128178703362882626926⟩,⟨93432726616136263438716518247242012930,93432726616136263438716518247242018900⟩⟩, + ⟨⟨4777558545384965500862029326042390,4777558545384965500862029326048384⟩,⟨-617697204328265572668820366358086,-617697204328265572668820366351509⟩⟩, + ⟨⟨60194001868931604408272154332,60194001868931604408272166464⟩,⟨887091134210592775984940310,887091134210592775984952827⟩⟩, + ⟨⟨-1309471458891747906378566,-1309471458891747906365128⟩,⟨1165552288415234954359281,1165552288415234954372719⟩⟩, + ⟨⟨557227264956366176320,557227264956366196129⟩,⟨686745218464638107216,686745218464638127025⟩⟩, + ⟨⟨-53512722938278112947,-53512722938278091905⟩,⟨-12024,10521⟩⟩, + ⟨⟨557227264956366176320,557227264956366196129⟩,⟨-686745218464638127025,-686745218464638107216⟩⟩, + ⟨⟨-1309471458891747906378566,-1309471458891747906365128⟩,⟨-1165552288415234954372719,-1165552288415234954359281⟩⟩, + ⟨⟨60194001868931604408272154332,60194001868931604408272166464⟩,⟨-887091134210592775984952827,-887091134210592775984940310⟩⟩, + ⟨⟨4777558545384965500862029326042390,4777558545384965500862029326048384⟩,⟨617697204328265572668820366351509,617697204328265572668820366358086⟩⟩, + ⟨⟨-200414598848045120128178703362882632896,-200414598848045120128178703362882626926⟩,⟨-93432726616136263438716518247242018900,-93432726616136263438716518247242012930⟩⟩, + ⟨⟨-2886061589688574822065639168194633196007683,-2886061589688574822065639168194633196004464⟩,⟨134372954156376516470141901586861110193709,134372954156376516470141901586861110196766⟩⟩, + ⟨⟨-4916283221397133900573122374683665406789906787,-4916283221397133900573122374683665406789905143⟩,⟨-7286034995407807501539904871547087409495510152,-7286034995407807501539904871547087409495508680⟩⟩, + ⟨⟨6439686033621965681358876598839414769439661987202,6439686033621965681358876598839414769439661988543⟩,⟨-1718019554093347489319178119608708398410225951996,-1718019554093347489319178119608708398410225950707⟩⟩, + ⟨⟨-761644683579548865556458633170913972955332595667916,-761644683579548865556458633170913972955332595664804⟩,⟨1298486548632669519689964613219843316406953845268511,1298486548632669519689964613219843316406953845271629⟩⟩, + ⟨⟨-7111520707075729065708882413185421304721287391988968,-7111520707075729065708882413185421304721287391855919⟩,⟨-123774622544531722435137330137408970318123486359939293,-123774622544531722435137330137408970318123486359806134⟩⟩, + ⟨⟨2589211048981126923990848712018050252245328709709879002,2589211048981126923990848712018050252245328709714344190⟩,⟨3670687563122710686028035137750710941497551974706037201,3670687563122710686028035137750710941497551974710504663⟩⟩, + ⟨⟨-79275238432900119535909801737180383781868939273772821551,-79275238432900119535909801737180383781868939273672443005⟩,⟨-27866381664552047103347289976763696344598229937636474776,-27866381664552047103347289976763696344598229937536104478⟩⟩, + ⟨⟨854990211017998455396375522786324443145012850292024565440,854990211017998455396375522786324443145012850293369783818⟩,⟨-353199336926654546204710887926591387382601912756739521100,-353199336926654546204710887926591387382601912755394231064⟩⟩, + ⟨⟨-2056287787141551325240853673737888887369638879265213548159,-2056287787141551325240853673737888887369638879257383801876⟩,⟨6329548644995875681774890226863173092330950318804359062810,6329548644995875681774890226863173092330950318812173908097⟩⟩, + ⟨⟨-21755210491613615473746671853199628522646468251982351535537,-21755210491613615473746671853199628522646468251945839153379⟩,⟨-26127686902880060975083809703804559672576315893624458495165,-26127686902880060975083809703804559672576315893587789144922⟩⟩] +lemma tw0_1_4_3_calc (j : Fin 31) : taylorWaveBox 0 1 4 3 j = tw0_1_4_3 j := by + revert j + decide +kernel +def tw0_1_4_4 : Fin 31 → CI := ![⟨⟨-16263064847961320969017692296568599519462581407969443872985,-16263064847961320969017692296568599519462581407943020116448⟩,⟨-18629428785040757617579711409064845358995143851778534966757,-18629428785040757617579711409064845358995143851752204759444⟩⟩, + ⟨⟨5081221397540398893630279539047948708274584963753114739924,5081221397540398893630279539047948708274584963758799638336⟩,⟨-591285005691572993872833726889239938726553157981291807991,-591285005691572993872833726889239938726553157975600569713⟩⟩, + ⟨⟨-445762254136256631954502927157482229063021214854647191721,-445762254136256631954502927157482229063021214853690164657⟩,⟨607842683185909820791338507078166613450282735216868783728,607842683185909820791338507078166613450282735217825795805⟩⟩, + ⟨⟨-3671643495069166386259009058011977930935224347584196799,-3671643495069166386259009058011977930935224347495258275⟩,⟨-72730940968342084917716652503007564432284225745944455824,-72730940968342084917716652503007564432284225745855407146⟩⟩, + ⟨⟨2406440858905835148755367328332723241795684796176752095,2406440858905835148755367328332723241795684796181743002⟩,⟨3386844412791955885312793107553580242777947496793558525,3386844412791955885312793107553580242777947496798545272⟩⟩, + ⟨⟨-110444464823859266064879879509768847918259169804657059,-110444464823859266064879879509768847918259169804513778⟩,⟨-53719007817031248555716930299166915894219938096314371,-53719007817031248555716930299166915894219938096171233⟩⟩, + ⟨⟨1598667852764249175111392604086348662058029227393411,1598667852764249175111392604086348662058029227396480⟩,⟨-115321998666414007548170956563210515371172580273355,-115321998666414007548170956563210515371172580270234⟩⟩, + ⟨⟨-5437486430705507120948100853884481156070548426275,-5437486430705507120948100853884481156070548425192⟩,⟨5384597816721174806429042929109960564467737231349,5384597816721174806429042929109960564467737232574⟩⟩, + ⟨⟨-3915204340251426062409179445856783676492201932,-3915204340251426062409179445856783676492199545⟩,⟨-10186424753302831750676534712042186112424265558,-10186424753302831750676534712042186112424263084⟩⟩, + ⟨⟨2645825980709939556703097336261511571728042,2645825980709939556703097336261511571732539⟩,⟨-2845669545651609468081141314806283666507843,-2845669545651609468081141314806283666503499⟩⟩, + ⟨⟨117114096353640294076054469933027526542,117114096353640294076054469933027533524⟩,⟨-300045427627471773457813247368941829238,-300045427627471773457813247368941822256⟩⟩, + ⟨⟨-5442228031095343664610572468544433,-5442228031095343664610572468531356⟩,⟨5271276587530991509196380951940982,5271276587530991509196380951954172⟩⟩, + ⟨⟨-89656322423008408116323039939,-89656322423008408116323024580⟩,⟨47538528877799335069977880112,47538528877799335069977898042⟩⟩, + ⟨⟨1489569676628521659877047,1489569676628521659905424⟩,⟨-2748735411099042333055087,-2748735411099042333026711⟩⟩, + ⟨⟨-1239636008547935165048,-1239636008547935129621⟩,⟨-1069092718789790760426,-1069092718789790724999⟩⟩, + ⟨⟨100352674110028504296,100352674110028543755⟩,⟨-19729,22548⟩⟩, + ⟨⟨-1239636008547935165048,-1239636008547935129621⟩,⟨1069092718789790724999,1069092718789790760426⟩⟩, + ⟨⟨1489569676628521659877047,1489569676628521659905424⟩,⟨2748735411099042333026711,2748735411099042333055087⟩⟩, + ⟨⟨-89656322423008408116323039939,-89656322423008408116323024580⟩,⟨-47538528877799335069977898042,-47538528877799335069977880112⟩⟩, + ⟨⟨-5442228031095343664610572468544433,-5442228031095343664610572468531356⟩,⟨-5271276587530991509196380951954172,-5271276587530991509196380951940982⟩⟩, + ⟨⟨117114096353640294076054469933027526542,117114096353640294076054469933027533524⟩,⟨300045427627471773457813247368941822256,300045427627471773457813247368941829238⟩⟩, + ⟨⟨2645825980709939556703097336261511571728042,2645825980709939556703097336261511571732539⟩,⟨2845669545651609468081141314806283666503499,2845669545651609468081141314806283666507843⟩⟩, + ⟨⟨-3915204340251426062409179445856783676492201932,-3915204340251426062409179445856783676492199545⟩,⟨10186424753302831750676534712042186112424263084,10186424753302831750676534712042186112424265558⟩⟩, + ⟨⟨-5437486430705507120948100853884481156070548426275,-5437486430705507120948100853884481156070548425192⟩,⟨-5384597816721174806429042929109960564467737232574,-5384597816721174806429042929109960564467737231349⟩⟩, + ⟨⟨1598667852764249175111392604086348662058029227393411,1598667852764249175111392604086348662058029227396480⟩,⟨115321998666414007548170956563210515371172580270234,115321998666414007548170956563210515371172580273355⟩⟩, + ⟨⟨-110444464823859266064879879509768847918259169804657059,-110444464823859266064879879509768847918259169804513778⟩,⟨53719007817031248555716930299166915894219938096171233,53719007817031248555716930299166915894219938096314371⟩⟩, + ⟨⟨2406440858905835148755367328332723241795684796176752095,2406440858905835148755367328332723241795684796181743002⟩,⟨-3386844412791955885312793107553580242777947496798545272,-3386844412791955885312793107553580242777947496793558525⟩⟩, + ⟨⟨-3671643495069166386259009058011977930935224347584196799,-3671643495069166386259009058011977930935224347495258275⟩,⟨72730940968342084917716652503007564432284225745855407146,72730940968342084917716652503007564432284225745944455824⟩⟩, + ⟨⟨-445762254136256631954502927157482229063021214854647191721,-445762254136256631954502927157482229063021214853690164657⟩,⟨-607842683185909820791338507078166613450282735217825795805,-607842683185909820791338507078166613450282735216868783728⟩⟩, + ⟨⟨5081221397540398893630279539047948708274584963753114739967,5081221397540398893630279539047948708274584963758799638299⟩,⟨591285005691572993872833726889239938726553157975600569790,591285005691572993872833726889239938726553157981291807974⟩⟩, + ⟨⟨-16263064847961320969017692296568599519462581407969443873419,-16263064847961320969017692296568599519462581407943020116272⟩,⟨18629428785040757617579711409064845358995143851752204759007,18629428785040757617579711409064845358995143851778534966927⟩⟩] +lemma tw0_1_4_4_calc (j : Fin 31) : taylorWaveBox 0 1 4 4 j = tw0_1_4_4 j := by + revert j + decide +kernel +def tw0_1_4_5 : Fin 31 → CI := ![⟨⟨13071444764774477485658623149076522217754722536834712828857,13071444764774477485658623149076522217754722536850595116447⟩,⟨-8175204005514229399836275414850709899895059380432611475225,-8175204005514229399836275414850709899895059380416689710361⟩⟩, + ⟨⟨-277480460415237827266953645856737768068215512913282110516,-277480460415237827266953645856737768068215512909888338113⟩,⟨3358874117269957622602349692604173333447817956277813559205,3358874117269957622602349692604173333447817956281207374222⟩⟩, + ⟨⟨-337952676525317714179505688924493665940143976134857233051,-337952676525317714179505688924493665940143976134187724536⟩,⟨-403661641876808107075215102164528583414942546647362079858,-403661641876808107075215102164528583414942546646692601088⟩⟩, + ⟨⟨52581493536277285504121537183496187333314706880710409089,52581493536277285504121537183496187333314706880787832831⟩,⟨12708502095208194100379571632609971138108539845907065832,12708502095208194100379571632609971138108539845984359414⟩⟩, + ⟨⟨-3166399457452160349535665959656426089631336345775120895,-3166399457452160349535665959656426089631336345770909759⟩,⟨907217751050206736170434132870268108449127350146108325,907217751050206736170434132870268108449127350150322648⟩⟩, + ⟨⟨78208602117029119442201267913814934141063060758567087,78208602117029119442201267913814934141063060758680630⟩,⟨-68981094695237594469391144701543332683215026714015677,-68981094695237594469391144701543332683215026713902042⟩⟩, + ⟨⟨-551334393658938714618588282781214744357615618335697,-551334393658938714618588282781214744357615618333312⟩,⟨1354895170056309531564533540510064635197428253588940,1354895170056309531564533540510064635197428253591246⟩⟩, + ⟨⟨-1870090563731188489582690731623891302471371299359,-1870090563731188489582690731623891302471371297822⟩,⟨-7295257296415184136483946059047255578364544776747,-7295257296415184136483946059047255578364544775255⟩⟩, + ⟨⟨11271569330103382237055839822133546117687118442,11271569330103382237055839822133546117687120904⟩,⟨2798052423531437625905530351677159561711382210,2798052423531437625905530351677159561711384793⟩⟩, + ⟨⟨533001084400680409923866097838857107564883,533001084400680409923866097838857107569156⟩,⟨4447405855086306671996567636558954791695616,4447405855086306671996567636558954791700232⟩⟩, + ⟨⟨152994748005913954041804096475972228203,152994748005913954041804096475972238991⟩,⟨371898773633299589608534395961069678804,371898773633299589608534395961069689592⟩⟩, + ⟨⟨1632185199877035812946061145561797,1632185199877035812946061145577353⟩,⟨-10082630328687290703390498205510691,-10082630328687290703390498205496127⟩⟩, + ⟨⟨80475411873396602548620318559,80475411873396602548620345196⟩,⟨-122568641483628355617638459251,-122568641483628355617638430186⟩⟩, + ⟨⟨-712956606998387642234640,-712956606998387642189687⟩,⟨4725601013780015674791874,4725601013780015674836827⟩⟩, + ⟨⟨2235315613977670653538,2235315613977670706014⟩,⟨1322308335528600730465,1322308335528600782941⟩⟩, + ⟨⟨-161307313979184516970,-161307313979184453544⟩,⟨-36243,31713⟩⟩, + ⟨⟨2235315613977670653538,2235315613977670706014⟩,⟨-1322308335528600782941,-1322308335528600730465⟩⟩, + ⟨⟨-712956606998387642234640,-712956606998387642189687⟩,⟨-4725601013780015674836827,-4725601013780015674791874⟩⟩, + ⟨⟨80475411873396602548620318559,80475411873396602548620345196⟩,⟨122568641483628355617638430186,122568641483628355617638459251⟩⟩, + ⟨⟨1632185199877035812946061145561797,1632185199877035812946061145577353⟩,⟨10082630328687290703390498205496127,10082630328687290703390498205510691⟩⟩, + ⟨⟨152994748005913954041804096475972228203,152994748005913954041804096475972238991⟩,⟨-371898773633299589608534395961069689592,-371898773633299589608534395961069678804⟩⟩, + ⟨⟨533001084400680409923866097838857107564883,533001084400680409923866097838857107569156⟩,⟨-4447405855086306671996567636558954791700232,-4447405855086306671996567636558954791695616⟩⟩, + ⟨⟨11271569330103382237055839822133546117687118442,11271569330103382237055839822133546117687120904⟩,⟨-2798052423531437625905530351677159561711384793,-2798052423531437625905530351677159561711382210⟩⟩, + ⟨⟨-1870090563731188489582690731623891302471371299359,-1870090563731188489582690731623891302471371297822⟩,⟨7295257296415184136483946059047255578364544775255,7295257296415184136483946059047255578364544776747⟩⟩, + ⟨⟨-551334393658938714618588282781214744357615618335697,-551334393658938714618588282781214744357615618333312⟩,⟨-1354895170056309531564533540510064635197428253591246,-1354895170056309531564533540510064635197428253588940⟩⟩, + ⟨⟨78208602117029119442201267913814934141063060758567087,78208602117029119442201267913814934141063060758680630⟩,⟨68981094695237594469391144701543332683215026713902042,68981094695237594469391144701543332683215026714015677⟩⟩, + ⟨⟨-3166399457452160349535665959656426089631336345775120895,-3166399457452160349535665959656426089631336345770909759⟩,⟨-907217751050206736170434132870268108449127350150322648,-907217751050206736170434132870268108449127350146108325⟩⟩, + ⟨⟨52581493536277285504121537183496187333314706880710409089,52581493536277285504121537183496187333314706880787832831⟩,⟨-12708502095208194100379571632609971138108539845984359414,-12708502095208194100379571632609971138108539845907065832⟩⟩, + ⟨⟨-337952676525317714179505688924493665940143976134857233051,-337952676525317714179505688924493665940143976134187724536⟩,⟨403661641876808107075215102164528583414942546646692601088,403661641876808107075215102164528583414942546647362079857⟩⟩, + ⟨⟨-277480460415237827266953645856737768068215512913282110468,-277480460415237827266953645856737768068215512909888338123⟩,⟨-3358874117269957622602349692604173333447817956281207374206,-3358874117269957622602349692604173333447817956277813559232⟩⟩, + ⟨⟨13071444764774477485658623149076522217754722536834712828606,13071444764774477485658623149076522217754722536850595116559⟩,⟨8175204005514229399836275414850709899895059380416689710271,8175204005514229399836275414850709899895059380432611475500⟩⟩] +lemma tw0_1_4_5_calc (j : Fin 31) : taylorWaveBox 0 1 4 5 j = tw0_1_4_5 j := by + revert j + decide +kernel +def tw0_1_4_6 : Fin 31 → CI := ![⟨⟨3276148331123417012155586470500439184111501466351143464324,3276148331123417012155586470500439184111501466359320355875⟩,⟨7746095367127065518984253804023633664194604616289664246938,7746095367127065518984253804023633664194604616297832470937⟩⟩, + ⟨⟨-1866904937593662649026438653619905737387126146269054242603,-1866904937593662649026438653619905737387126146267322467121⟩,⟨-538238953121411138793671214103126590794603849531394364600,-538238953121411138793671214103126590794603849529665353989⟩⟩, + ⟨⟨288851653968798536868566904597758282901425993366332037870,288851653968798536868566904597758282901425993366808251222⟩,⟨-141681056477782906359444371798747099174728069063901141346,-141681056477782906359444371798747099174728069063424888079⟩⟩, + ⟨⟨-17614717537729372681864112398881303025860546625942373548,-17614717537729372681864112398881303025860546625888726178⟩,⟨30430227009917612118272241317894228304009897995440158971,30430227009917612118272241317894228304009897995493890839⟩⟩, + ⟨⟨136275043112786568269938552657651576770632051908443403,136275043112786568269938552657651576770632051911236920⟩,⟨-2280802575642228563139268434776740758140044708902095063,-2280802575642228563139268434776740758140044708899302846⟩⟩, + ⟨⟨24921731155407184454548215694468676758990647453505944,24921731155407184454548215694468676758990647453575020⟩,⟨73361128348534869070599575042816385401531341500102943,73361128348534869070599575042816385401531341500172000⟩⟩, + ⟨⟨-775363991558995569834737469520606707489731238496817,-775363991558995569834737469520606707489731238494419⟩,⟨-873644303368468010469910966342225775035775873053533,-873644303368468010469910966342225775035775873051110⟩⟩, + ⟨⟨6235150253514493140057302457211875919573490067295,6235150253514493140057302457211875919573490068595⟩,⟨1783708495289837304598247766681401514635543665910,1783708495289837304598247766681401514635543667156⟩⟩, + ⟨⟨-8150277478817542351967685816716898553175950827,-8150277478817542351967685816716898553175948693⟩,⟨7108164107420315755547934452660539399049851501,7108164107420315755547934452660539399049853443⟩⟩, + ⟨⟨-3771194097104977473259455260921978707125869,-3771194097104977473259455260921978707120587⟩,⟨-2488162860932814733241590081689604250738885,-2488162860932814733241590081689604250733526⟩⟩, + ⟨⟨-401480302702129521068038703746932249311,-401480302702129521068038703746932239468⟩,⟨-178371786455589210864879176434885332757,-178371786455589210864879176434885322913⟩⟩, + ⟨⟨5567575984964418976626399513821473,5567575984964418976626399513841402⟩,⟨10684501385031144308652345874453814,10684501385031144308652345874472944⟩⟩, + ⟨⟨-14575556297012311963069114580,-14575556297012311963069075979⟩,⟨184802168816021175996604463194,184802168816021175996604501095⟩⟩, + ⟨⟨-1251942851887177136563602,-1251942851887177136508529⟩,⟨-6268434172351570593866369,-6268434172351570593811296⟩⟩, + ⟨⟨-3378489554936159771150,-3378489554936159705769⟩,⟨-1258990724796194457980,-1258990724796194392599⟩⟩, + ⟨⟨226875303046922760027,226875303046922849233⟩,⟨-44603,50975⟩⟩, + ⟨⟨-3378489554936159771150,-3378489554936159705769⟩,⟨1258990724796194392599,1258990724796194457980⟩⟩, + ⟨⟨-1251942851887177136563602,-1251942851887177136508529⟩,⟨6268434172351570593811296,6268434172351570593866369⟩⟩, + ⟨⟨-14575556297012311963069114580,-14575556297012311963069075979⟩,⟨-184802168816021175996604501095,-184802168816021175996604463194⟩⟩, + ⟨⟨5567575984964418976626399513821473,5567575984964418976626399513841402⟩,⟨-10684501385031144308652345874472944,-10684501385031144308652345874453814⟩⟩, + ⟨⟨-401480302702129521068038703746932249311,-401480302702129521068038703746932239468⟩,⟨178371786455589210864879176434885322913,178371786455589210864879176434885332757⟩⟩, + ⟨⟨-3771194097104977473259455260921978707125869,-3771194097104977473259455260921978707120587⟩,⟨2488162860932814733241590081689604250733526,2488162860932814733241590081689604250738885⟩⟩, + ⟨⟨-8150277478817542351967685816716898553175950827,-8150277478817542351967685816716898553175948693⟩,⟨-7108164107420315755547934452660539399049853443,-7108164107420315755547934452660539399049851501⟩⟩, + ⟨⟨6235150253514493140057302457211875919573490067295,6235150253514493140057302457211875919573490068595⟩,⟨-1783708495289837304598247766681401514635543667156,-1783708495289837304598247766681401514635543665910⟩⟩, + ⟨⟨-775363991558995569834737469520606707489731238496817,-775363991558995569834737469520606707489731238494419⟩,⟨873644303368468010469910966342225775035775873051110,873644303368468010469910966342225775035775873053533⟩⟩, + ⟨⟨24921731155407184454548215694468676758990647453505944,24921731155407184454548215694468676758990647453575020⟩,⟨-73361128348534869070599575042816385401531341500172000,-73361128348534869070599575042816385401531341500102943⟩⟩, + ⟨⟨136275043112786568269938552657651576770632051908443403,136275043112786568269938552657651576770632051911236920⟩,⟨2280802575642228563139268434776740758140044708899302846,2280802575642228563139268434776740758140044708902095063⟩⟩, + ⟨⟨-17614717537729372681864112398881303025860546625942373548,-17614717537729372681864112398881303025860546625888726178⟩,⟨-30430227009917612118272241317894228304009897995493890839,-30430227009917612118272241317894228304009897995440158971⟩⟩, + ⟨⟨288851653968798536868566904597758282901425993366332037870,288851653968798536868566904597758282901425993366808251222⟩,⟨141681056477782906359444371798747099174728069063424888079,141681056477782906359444371798747099174728069063901141346⟩⟩, + ⟨⟨-1866904937593662649026438653619905737387126146269054242598,-1866904937593662649026438653619905737387126146267322467137⟩,⟨538238953121411138793671214103126590794603849529665353994,538238953121411138793671214103126590794603849531394364575⟩⟩, + ⟨⟨3276148331123417012155586470500439184111501466351143464286,3276148331123417012155586470500439184111501466359320356024⟩,⟨-7746095367127065518984253804023633664194604616297832471000,-7746095367127065518984253804023633664194604616289664246816⟩⟩] +lemma tw0_1_4_6_calc (j : Fin 31) : taylorWaveBox 0 1 4 6 j = tw0_1_4_6 j := by + revert j + decide +kernel +def tw0_1_4_7 : Fin 31 → CI := ![⟨⟨-3960024905465764612402137555806475228616394045506376449146,-3960024905465764612402137555806475228616394045502748645941⟩,⟨974742335062239561049395007093633750540802994803979922076,974742335062239561049395007093633750540802994807604760207⟩⟩, + ⟨⟨458845323173709353028932887406912084171315620771699419808,458845323173709353028932887406912084171315620772739299923⟩,⟨-883594640282743545855858916078364457661760105122650980163,-883594640282743545855858916078364457661760105121608272332⟩⟩, + ⟨⟨37287714516804335171336063537274865076110149789209463298,37287714516804335171336063537274865076110149789490779887⟩,⟨170744596143800778708435770643935787985715178340811387445,170744596143800778708435770643935787985715178341092677660⟩⟩, + ⟨⟨-13972658066076092447038660433123888085219176310859869374,-13972658066076092447038660433123888085219176310829249366⟩,⟨-14745732335632691031283423215419871824240293200197835753,-14745732335632691031283423215419871824240293200167250908⟩⟩, + ⟨⟨1298540787000656838817825577585616701689197481066667838,1298540787000656838817825577585616701689197481068133262⟩,⟨546558287361457274802332733923211187761951810825041187,546558287361457274802332733923211187761951810826506544⟩⟩, + ⟨⟨-51050281630207797650445360247006760604011046340846204,-51050281630207797650445360247006760604011046340787036⟩,⟨-3467873309671265807128494796701796812586519751852561,-3467873309671265807128494796701796812586519751793439⟩⟩, + ⟨⟨799669221164318640788148308095336757311135963026810,799669221164318640788148308095336757311135963028566⟩,⟨-219077704347747685409737321885196435846671256737976,-219077704347747685409737321885196435846671256736206⟩⟩, + ⟨⟨-3589295985438584818138099852746182312488953311781,-3589295985438584818138099852746182312488953311065⟩,⟨3429215499244621755547283454822132279070155636510,3429215499244621755547283454822132279070155637317⟩⟩, + ⟨⟨-955419153380950877929103268704440647722439349,-955419153380950877929103268704440647722437284⟩,⟨-8900233017019541706274336472624655421019163371,-8900233017019541706274336472624655421019161304⟩⟩, + ⟨⟨3887371099084162447002035137170238070523023,3887371099084162447002035137170238070526745⟩,⟨-1139237078083379535820766110014102900916460,-1139237078083379535820766110014102900913122⟩⟩, + ⟨⟨401572439046945438118101031309067779721,401572439046945438118101031309067791069⟩,⟨-144009690911749917998895972909651772096,-144009690911749917998895972909651760749⟩⟩, + ⟨⟨-11377433341888713808251365794831477,-11377433341888713808251365794810610⟩,⟨-5489690012852166947639202351674545,-5489690012852166947639202351653061⟩⟩, + ⟨⟨-85624708632063929897788615638,-85624708632063929897788577440⟩,⟨-189915356165314523682675275283,-189915356165314523682675241913⟩⟩, + ⟨⟨3933413139235672529743293,3933413139235672529794964⟩,⟨6502831227702866702129324,6502831227702866702180995⟩⟩, + ⟨⟨4377813152155558046371,4377813152155558119055⟩,⟨793147892437382639329,793147892437382712013⟩⟩, + ⟨⟨-283640252263522851332,-283640252263522739806⟩,⟨-63729,55763⟩⟩, + ⟨⟨4377813152155558046371,4377813152155558119055⟩,⟨-793147892437382712013,-793147892437382639329⟩⟩, + ⟨⟨3933413139235672529743293,3933413139235672529794964⟩,⟨-6502831227702866702180995,-6502831227702866702129324⟩⟩, + ⟨⟨-85624708632063929897788615638,-85624708632063929897788577440⟩,⟨189915356165314523682675241913,189915356165314523682675275283⟩⟩, + ⟨⟨-11377433341888713808251365794831477,-11377433341888713808251365794810610⟩,⟨5489690012852166947639202351653061,5489690012852166947639202351674545⟩⟩, + ⟨⟨401572439046945438118101031309067779721,401572439046945438118101031309067791069⟩,⟨144009690911749917998895972909651760749,144009690911749917998895972909651772096⟩⟩, + ⟨⟨3887371099084162447002035137170238070523023,3887371099084162447002035137170238070526745⟩,⟨1139237078083379535820766110014102900913122,1139237078083379535820766110014102900916460⟩⟩, + ⟨⟨-955419153380950877929103268704440647722439349,-955419153380950877929103268704440647722437284⟩,⟨8900233017019541706274336472624655421019161304,8900233017019541706274336472624655421019163371⟩⟩, + ⟨⟨-3589295985438584818138099852746182312488953311781,-3589295985438584818138099852746182312488953311065⟩,⟨-3429215499244621755547283454822132279070155637317,-3429215499244621755547283454822132279070155636510⟩⟩, + ⟨⟨799669221164318640788148308095336757311135963026810,799669221164318640788148308095336757311135963028566⟩,⟨219077704347747685409737321885196435846671256736206,219077704347747685409737321885196435846671256737976⟩⟩, + ⟨⟨-51050281630207797650445360247006760604011046340846204,-51050281630207797650445360247006760604011046340787036⟩,⟨3467873309671265807128494796701796812586519751793439,3467873309671265807128494796701796812586519751852561⟩⟩, + ⟨⟨1298540787000656838817825577585616701689197481066667838,1298540787000656838817825577585616701689197481068133262⟩,⟨-546558287361457274802332733923211187761951810826506544,-546558287361457274802332733923211187761951810825041187⟩⟩, + ⟨⟨-13972658066076092447038660433123888085219176310859869374,-13972658066076092447038660433123888085219176310829249366⟩,⟨14745732335632691031283423215419871824240293200167250908,14745732335632691031283423215419871824240293200197835753⟩⟩, + ⟨⟨37287714516804335171336063537274865076110149789209463298,37287714516804335171336063537274865076110149789490779887⟩,⟨-170744596143800778708435770643935787985715178341092677660,-170744596143800778708435770643935787985715178340811387445⟩⟩, + ⟨⟨458845323173709353028932887406912084171315620771699419812,458845323173709353028932887406912084171315620772739299910⟩,⟨883594640282743545855858916078364457661760105121608272342,883594640282743545855858916078364457661760105122650980160⟩⟩, + ⟨⟨-3960024905465764612402137555806475228616394045506376449176,-3960024905465764612402137555806475228616394045502748645891⟩,⟨-974742335062239561049395007093633750540802994807604760278,-974742335062239561049395007093633750540802994803979922063⟩⟩] +lemma tw0_1_4_7_calc (j : Fin 31) : taylorWaveBox 0 1 4 7 j = tw0_1_4_7 j := by + revert j + decide +kernel +def tw0_1_4_8 : Fin 31 → CI := ![⟨⟨-146788272188684125293841173540930922480357442195669532938,-146788272188684125293841173540930922480357442194227337935⟩,⟨-1773720393399587779159388426477910748656472558973817250658,-1773720393399587779159388426477910748656472558972370372993⟩⟩, + ⟨⟨357839047218983861911658605917694284866873784122725865460,357839047218983861911658605917694284866873784123261351965⟩,⟨287736647922978676045501755166932105842676871181753627195,287736647922978676045501755166932105842676871182287477110⟩⟩, + ⟨⟨-85415019353782944498654001381127300145967136048512414696,-85415019353782944498654001381127300145967136048371132651⟩,⟨-2221464931783930427309608842336337921903391365038455785,-2221464931783930427309608842336337921903391364897161397⟩⟩, + ⟨⟨9413362945538609184260779482833942030108030473502450000,9413362945538609184260779482833942030108030473516939997⟩,⟨-4792354178096799290843397102287945645065818116013706466,-4792354178096799290843397102287945645065818115999210153⟩⟩, + ⟨⟨-525526229555657206259320320327367383795226732617701629,-525526229555657206259320320327367383795226732616781126⟩,⟨578897146254111628921801192963963331115513131097426147,578897146254111628921801192963963331115513131098347236⟩⟩, + ⟨⟨13587029343634267391898207381300490700618329269541406,13587029343634267391898207381300490700618329269579948⟩,⟨-27208991338334891117695470960423738556019091117795661,-27208991338334891117695470960423738556019091117757084⟩⟩, + ⟨⟨-100591827109982346119916304947519624047041615909709,-100591827109982346119916304947519624047041615908749⟩,⟨520043406823330799392001733003326075679710875317141,520043406823330799392001733003326075679710875318074⟩⟩, + ⟨⟨-789697848075274425925395309295979350861667594287,-789697848075274425925395309295979350861667593586⟩,⟨-3327370369677698983058984911639923479084283945451,-3327370369677698983058984911639923479084283944769⟩⟩, + ⟨⟨5841309984871803496263091932383807498190208636,5841309984871803496263091932383807498190209844⟩,⟨3216427228850588303989140733726141016199857603,3216427228850588303989140733726141016199858928⟩⟩, + ⟨⟨-1325171403286029148983020118531746641131033,-1325171403286029148983020118531746641127168⟩,⟨2988122357557981715188923581691350109644085,2988122357557981715188923581691350109647970⟩⟩, + ⟨⟨-166875522978550664980818902732079351864,-166875522978550664980818902732079343255⟩,⟨333417269377722460261905043940696854230,333417269377722460261905043940696862839⟩⟩, + ⟨⟨11703444289519083636656867893894351,11703444289519083636656867893910062⟩,⟨-2266698975485689820786431606204511,-2266698975485689820786431606187462⟩⟩, + ⟨⟨168379258158793194545653790133,168379258158793194545653830954⟩,⟨126667372978326016625421841416,126667372978326016625421878244⟩⟩, + ⟨⟨-6323715849755069818716805,-6323715849755069818648029⟩,⟨-5112999119253907311653827,-5112999119253907311585050⟩⟩, + ⟨⟨-4941098898215538837653,-4941098898215538744684⟩,⟨-8660145778310253722,-8660145778310160753⟩⟩, + ⟨⟨319147181122345733933,319147181122345859421⟩,⟨-62744,71707⟩⟩, + ⟨⟨-4941098898215538837653,-4941098898215538744684⟩,⟨8660145778310160753,8660145778310253722⟩⟩, + ⟨⟨-6323715849755069818716805,-6323715849755069818648029⟩,⟨5112999119253907311585050,5112999119253907311653827⟩⟩, + ⟨⟨168379258158793194545653790133,168379258158793194545653830954⟩,⟨-126667372978326016625421878244,-126667372978326016625421841416⟩⟩, + ⟨⟨11703444289519083636656867893894351,11703444289519083636656867893910062⟩,⟨2266698975485689820786431606187462,2266698975485689820786431606204511⟩⟩, + ⟨⟨-166875522978550664980818902732079351864,-166875522978550664980818902732079343255⟩,⟨-333417269377722460261905043940696862839,-333417269377722460261905043940696854230⟩⟩, + ⟨⟨-1325171403286029148983020118531746641131033,-1325171403286029148983020118531746641127168⟩,⟨-2988122357557981715188923581691350109647970,-2988122357557981715188923581691350109644085⟩⟩, + ⟨⟨5841309984871803496263091932383807498190208636,5841309984871803496263091932383807498190209844⟩,⟨-3216427228850588303989140733726141016199858928,-3216427228850588303989140733726141016199857603⟩⟩, + ⟨⟨-789697848075274425925395309295979350861667594287,-789697848075274425925395309295979350861667593586⟩,⟨3327370369677698983058984911639923479084283944769,3327370369677698983058984911639923479084283945451⟩⟩, + ⟨⟨-100591827109982346119916304947519624047041615909709,-100591827109982346119916304947519624047041615908749⟩,⟨-520043406823330799392001733003326075679710875318074,-520043406823330799392001733003326075679710875317141⟩⟩, + ⟨⟨13587029343634267391898207381300490700618329269541406,13587029343634267391898207381300490700618329269579948⟩,⟨27208991338334891117695470960423738556019091117757084,27208991338334891117695470960423738556019091117795661⟩⟩, + ⟨⟨-525526229555657206259320320327367383795226732617701629,-525526229555657206259320320327367383795226732616781126⟩,⟨-578897146254111628921801192963963331115513131098347236,-578897146254111628921801192963963331115513131097426147⟩⟩, + ⟨⟨9413362945538609184260779482833942030108030473502450000,9413362945538609184260779482833942030108030473516939997⟩,⟨4792354178096799290843397102287945645065818115999210153,4792354178096799290843397102287945645065818116013706466⟩⟩, + ⟨⟨-85415019353782944498654001381127300145967136048512414696,-85415019353782944498654001381127300145967136048371132651⟩,⟨2221464931783930427309608842336337921903391364897161397,2221464931783930427309608842336337921903391365038455785⟩⟩, + ⟨⟨357839047218983861911658605917694284866873784122725865466,357839047218983861911658605917694284866873784123261351963⟩,⟨-287736647922978676045501755166932105842676871182287477104,-287736647922978676045501755166932105842676871181753627197⟩⟩, + ⟨⟨-146788272188684125293841173540930922480357442195669532967,-146788272188684125293841173540930922480357442194227337932⟩,⟨1773720393399587779159388426477910748656472558972370372975,1773720393399587779159388426477910748656472558973817250671⟩⟩] +lemma tw0_1_4_8_calc (j : Fin 31) : taylorWaveBox 0 1 4 8 j = tw0_1_4_8 j := by + revert j + decide +kernel +def tw0_1_4_9 : Fin 31 → CI := ![⟨⟨704057774590414491869017081232475958834772549802385029324,704057774590414491869017081232475958834772549803041716276⟩,⟨53759925287371260296971897098406669373619947466697875483,53759925287371260296971897098406669373619947467351381183⟩⟩, + ⟨⟨-147825751269860408640983497272136342752719232456465642367,-147825751269860408640983497272136342752719232456226825386⟩,⟨123327299819270064765599054726118653215375238126941487487,123327299819270064765599054726118653215375238127181015399⟩⟩, + ⟨⟨10019890465979129668920238380587751026970069549899960164,10019890465979129668920238380587751026970069549961153250⟩,⟨-36629988902288032222930353855275479122523123238692991264,-36629988902288032222930353855275479122523123238631802419⟩⟩, + ⟨⟨910237752383831602509414059787742738539265929867299001,910237752383831602509414059787742738539265929873202792⟩,⟨4909588663208345846081560707055192140152396568293019095,4909588663208345846081560707055192140152396568298926865⟩⟩, + ⟨⟨-187363847215725995758177112956050270465948760057452356,-187363847215725995758177112956050270465948760056913510⟩,⟨-347106735858527267066656581796280657759150096819435538,-347106735858527267066656581796280657759150096818897101⟩⟩, + ⟨⟨10741012801100955183210781491249052066726422586483979,10741012801100955183210781491249052066726422586504002⟩,⟨12437032423967804799192517771556923822062784191309271,12437032423967804799192517771556923822062784191329280⟩⟩, + ⟨⟨-244976375840617881098448169928939943319371093623982,-244976375840617881098448169928939943319371093623351⟩,⟨-186054179822321794933434749580039823696666722332987,-186054179822321794933434749580039823696666722332345⟩⟩, + ⟨⟨2048247315576655056695318771365372547303032137801,2048247315576655056695318771365372547303032138229⟩,⟨625859665568437947540734616137378294866321532728,625859665568437947540734616137378294866321533138⟩⟩, + ⟨⟨-4052129555970075962105678129630012113546772616,-4052129555970075962105678129630012113546771614⟩,⟨1993499166596887131247448519512033868057122203,1993499166596887131247448519512033868057123156⟩⟩, + ⟨⟨-1044907962041114782805185629214257900587667,-1044907962041114782805185629214257900585519⟩,⟨-2158267711513590987063170450784408454785632,-2158267711513590987063170450784408454783279⟩⟩, + ⟨⟨-87081827278191384236478057795709218894,-87081827278191384236478057795709211099⟩,⟨-283143870460856787726931536126245616565,-283143870460856787726931536126245608769⟩⟩, + ⟨⟨-6885313752165247233513374462170903,-6885313752165247233513374462153138⟩,⟨7561573820766060381213800040632256,7561573820766060381213800040650058⟩⟩, + ⟨⟨-191767662848472241621197665576,-191767662848472241621197625557⟩,⟨-27548655920993830572955335836,-27548655920993830572955295599⟩⟩, + ⟨⟨7475926517670010170999400,7475926517670010171073538⟩,⟨2586268762171264596289583,2586268762171264596363721⟩⟩, + ⟨⟨4911850951837727344722,4911850951837727448002⟩,⟨-872130202903869575548,-872130202903869472268⟩⟩, + ⟨⟨-326453611590772923185,-326453611590772794825⟩,⟨-73349,64180⟩⟩, + ⟨⟨4911850951837727344722,4911850951837727448002⟩,⟨872130202903869472268,872130202903869575548⟩⟩, + ⟨⟨7475926517670010170999400,7475926517670010171073538⟩,⟨-2586268762171264596363721,-2586268762171264596289583⟩⟩, + ⟨⟨-191767662848472241621197665576,-191767662848472241621197625557⟩,⟨27548655920993830572955295599,27548655920993830572955335836⟩⟩, + ⟨⟨-6885313752165247233513374462170903,-6885313752165247233513374462153138⟩,⟨-7561573820766060381213800040650058,-7561573820766060381213800040632256⟩⟩, + ⟨⟨-87081827278191384236478057795709218894,-87081827278191384236478057795709211099⟩,⟨283143870460856787726931536126245608769,283143870460856787726931536126245616565⟩⟩, + ⟨⟨-1044907962041114782805185629214257900587667,-1044907962041114782805185629214257900585519⟩,⟨2158267711513590987063170450784408454783279,2158267711513590987063170450784408454785632⟩⟩, + ⟨⟨-4052129555970075962105678129630012113546772616,-4052129555970075962105678129630012113546771614⟩,⟨-1993499166596887131247448519512033868057123156,-1993499166596887131247448519512033868057122203⟩⟩, + ⟨⟨2048247315576655056695318771365372547303032137801,2048247315576655056695318771365372547303032138229⟩,⟨-625859665568437947540734616137378294866321533138,-625859665568437947540734616137378294866321532728⟩⟩, + ⟨⟨-244976375840617881098448169928939943319371093623982,-244976375840617881098448169928939943319371093623351⟩,⟨186054179822321794933434749580039823696666722332345,186054179822321794933434749580039823696666722332987⟩⟩, + ⟨⟨10741012801100955183210781491249052066726422586483979,10741012801100955183210781491249052066726422586504002⟩,⟨-12437032423967804799192517771556923822062784191329280,-12437032423967804799192517771556923822062784191309271⟩⟩, + ⟨⟨-187363847215725995758177112956050270465948760057452356,-187363847215725995758177112956050270465948760056913510⟩,⟨347106735858527267066656581796280657759150096818897101,347106735858527267066656581796280657759150096819435538⟩⟩, + ⟨⟨910237752383831602509414059787742738539265929867299001,910237752383831602509414059787742738539265929873202792⟩,⟨-4909588663208345846081560707055192140152396568298926865,-4909588663208345846081560707055192140152396568293019095⟩⟩, + ⟨⟨10019890465979129668920238380587751026970069549899960164,10019890465979129668920238380587751026970069549961153250⟩,⟨36629988902288032222930353855275479122523123238631802419,36629988902288032222930353855275479122523123238692991264⟩⟩, + ⟨⟨-147825751269860408640983497272136342752719232456465642365,-147825751269860408640983497272136342752719232456226825387⟩,⟨-123327299819270064765599054726118653215375238127181015398,-123327299819270064765599054726118653215375238126941487489⟩⟩, + ⟨⟨704057774590414491869017081232475958834772549802385029317,704057774590414491869017081232475958834772549803041716283⟩,⟨-53759925287371260296971897098406669373619947467351381185,-53759925287371260296971897098406669373619947466697875470⟩⟩] +lemma tw0_1_4_9_calc (j : Fin 31) : taylorWaveBox 0 1 4 9 j = tw0_1_4_9 j := by + revert j + decide +kernel +def tw0_1_4_10 : Fin 31 → CI := ![⟨⟨-59789746672184821784920176863335935981758045441754088238,-59789746672184821784920176863335935981758045441491949295⟩,⟨249736948432159263638324951053299071344970286242399114540,249736948432159263638324951053299071344970286242662703474⟩⟩, + ⟨⟨-35278522192326548012046046406870161762125165045117364310,-35278522192326548012046046406870161762125165045022718736⟩,⟨-65036183630581692707819164129384093498948645693712619694,-65036183630581692707819164129384093498948645693618219744⟩⟩, + ⟨⟨13517888694139146249247540625182573933280648212104797563,13517888694139146249247540625182573933280648212127806739⟩,⟨7526264462127387425117755096771114207253742614371131258,7526264462127387425117755096771114207253742614394141351⟩⟩, + ⟨⟨-2151912233146705726072604667121093196663430463097615343,-2151912233146705726072604667121093196663430463094455923⟩,⟨-225185747695164680844222224735657116221729228158707488,-225185747695164680844222224735657116221729228155552756⟩⟩, + ⟨⟨180193022203500510271096553871813529182575032437236572,180193022203500510271096553871813529182575032437497008⟩,⟨-28386921105419393663236725380583181222536637665645520,-28386921105419393663236725380583181222536637665384928⟩⟩, + ⟨⟨-7733837602548441224399302166892196315337888042096392,-7733837602548441224399302166892196315337888042087649⟩,⟨2537592311240458503090129175161024118942886265972974,2537592311240458503090129175161024118942886265981718⟩⟩, + ⟨⟨146539295380120936194536921463961378850165415715440,146539295380120936194536921463961378850165415715826⟩,⟨-73112134390938129642925422660775606221832203064202,-73112134390938129642925422660775606221832203063816⟩⟩, + ⟨⟨-904087007133242248500181628243531962792535480290,-904087007133242248500181628243531962792535480108⟩,⟨833298614418762416204735193681351272335161404193,833298614418762416204735193681351272335161404396⟩⟩, + ⟨⟨427453560813516122216827584872709795759704835,427453560813516122216827584872709795759705473⟩,⟨-2770677744785819072949851003008552892138650315,-2770677744785819072949851003008552892138649699⟩⟩, + ⟨⟨1561687117077457119362568067135026295011859,1561687117077457119362568067135026295013755⟩,⟨401453836668034386126255393523492232739727,401453836668034386126255393523492232741575⟩⟩, + ⟨⟨188292407699814129205711932181562348838,188292407699814129205711932181562353957⟩,⟨105324115035800092887453827968710600231,105324115035800092887453827968710605350⟩⟩, + ⟨⟨784925493399969058848952501294049,784925493399969058848952501305847⟩,⟨-8003722915575804647543172122143144,-8003722915575804647543172122132203⟩⟩, + ⟨⟨152846289294258976184068727547,152846289294258976184068755039⟩,⟨-57461029023286578917204951655,-57461029023286578917204920745⟩⟩, + ⟨⟨-7053216758324638278974881,-7053216758324638278910195⟩,⟨97417380772850576825264,97417380772850576889951⟩⟩, + ⟨⟨-4331971394129176671621,-4331971394129176570325⟩,⟨1597033481750407614379,1597033481750407715676⟩⟩, + ⟨⟨306100036563237521489,306100036563237641847⟩,⟨-60179,68776⟩⟩, + ⟨⟨-4331971394129176671621,-4331971394129176570325⟩,⟨-1597033481750407715676,-1597033481750407614379⟩⟩, + ⟨⟨-7053216758324638278974881,-7053216758324638278910195⟩,⟨-97417380772850576889951,-97417380772850576825264⟩⟩, + ⟨⟨152846289294258976184068727547,152846289294258976184068755039⟩,⟨57461029023286578917204920745,57461029023286578917204951655⟩⟩, + ⟨⟨784925493399969058848952501294049,784925493399969058848952501305847⟩,⟨8003722915575804647543172122132203,8003722915575804647543172122143144⟩⟩, + ⟨⟨188292407699814129205711932181562348838,188292407699814129205711932181562353957⟩,⟨-105324115035800092887453827968710605350,-105324115035800092887453827968710600231⟩⟩, + ⟨⟨1561687117077457119362568067135026295011859,1561687117077457119362568067135026295013755⟩,⟨-401453836668034386126255393523492232741575,-401453836668034386126255393523492232739727⟩⟩, + ⟨⟨427453560813516122216827584872709795759704835,427453560813516122216827584872709795759705473⟩,⟨2770677744785819072949851003008552892138649699,2770677744785819072949851003008552892138650315⟩⟩, + ⟨⟨-904087007133242248500181628243531962792535480290,-904087007133242248500181628243531962792535480108⟩,⟨-833298614418762416204735193681351272335161404396,-833298614418762416204735193681351272335161404193⟩⟩, + ⟨⟨146539295380120936194536921463961378850165415715440,146539295380120936194536921463961378850165415715826⟩,⟨73112134390938129642925422660775606221832203063816,73112134390938129642925422660775606221832203064202⟩⟩, + ⟨⟨-7733837602548441224399302166892196315337888042096392,-7733837602548441224399302166892196315337888042087649⟩,⟨-2537592311240458503090129175161024118942886265981718,-2537592311240458503090129175161024118942886265972974⟩⟩, + ⟨⟨180193022203500510271096553871813529182575032437236572,180193022203500510271096553871813529182575032437497008⟩,⟨28386921105419393663236725380583181222536637665384928,28386921105419393663236725380583181222536637665645520⟩⟩, + ⟨⟨-2151912233146705726072604667121093196663430463097615343,-2151912233146705726072604667121093196663430463094455923⟩,⟨225185747695164680844222224735657116221729228155552756,225185747695164680844222224735657116221729228158707488⟩⟩, + ⟨⟨13517888694139146249247540625182573933280648212104797563,13517888694139146249247540625182573933280648212127806739⟩,⟨-7526264462127387425117755096771114207253742614394141351,-7526264462127387425117755096771114207253742614371131258⟩⟩, + ⟨⟨-35278522192326548012046046406870161762125165045117364310,-35278522192326548012046046406870161762125165045022718737⟩,⟨65036183630581692707819164129384093498948645693618219745,65036183630581692707819164129384093498948645693712619693⟩⟩, + ⟨⟨-59789746672184821784920176863335935981758045441754088239,-59789746672184821784920176863335935981758045441491949290⟩,⟨-249736948432159263638324951053299071344970286242662703477,-249736948432159263638324951053299071344970286242399114538⟩⟩] +lemma tw0_1_4_10_calc (j : Fin 31) : taylorWaveBox 0 1 4 10 j = tw0_1_4_10 j := by + revert j + decide +kernel +def tw0_1_4_11 : Fin 31 → CI := ![⟨⟨-79608844460565426560713129562062189625389244914653573409,-79608844460565426560713129562062189625389244914558714297⟩,⟨-33074652523024846231591067824944039063653942516183771465,-33074652523024846231591067824944039063653942516089440934⟩⟩, + ⟨⟨25085532589758620390874563329866564943760083899818938248,25085532589758620390874563329866564943760083899852230190⟩,⟨-7725638321385685157626601845193527240094807720672613013,-7725638321385685157626601845193527240094807720639254483⟩⟩, + ⟨⟨-3962032514611260515719202783733908692658288884546341061,-3962032514611260515719202783733908692658288884538830787⟩,⟨4261226032329308248406416341841206577063865907547827869,4261226032329308248406416341841206577063865907555338179⟩⟩, + ⟨⟨330506449326638992674332673895352878486526033282087389,330506449326638992674332673895352878486526033283502125⟩,⟨-799836689161531917197226900410051747613201281604047278,-799836689161531917197226900410051747613201281602630350⟩⟩, + ⟨⟨-14129866642112246732385045448021469492273429106434799,-14129866642112246732385045448021469492273429106328371⟩,⟨76577632172357220347908331952910554608592175075727444,76577632172357220347908331952910554608592175075833844⟩⟩, + ⟨⟨290945416915291265021295726772094425896087563673264,290945416915291265021295726772094425896087563678430⟩,⟨-3710066354369131912057148344979033390273555010176163,-3710066354369131912057148344979033390273555010170993⟩⟩, + ⟨⟨347484327620322339699021126377233693176079816224,347484327620322339699021126377233693176079816407⟩,⟨80475814499788397340548922386482098520046356111616,80475814499788397340548922386482098520046356111797⟩⟩, + ⟨⟨-139076015960814272817022759291318904924278669898,-139076015960814272817022759291318904924278669764⟩,⟨-636545723931692467598024085759828244251796975972,-636545723931692467598024085759828244251796975841⟩⟩, + ⟨⟨1160736175952484212476300844589007658434197098,1160736175952484212476300844589007658434197365⟩,⟨1110624209834709925069741812940781533435667993,1110624209834709925069741812940781533435668292⟩⟩, + ⟨⟨-816523704794080018079970464703061661538945,-816523704794080018079970464703061661537865⟩,⟨578844568905269561856500948351343564934760,578844568905269561856500948351343564935774⟩⟩, + ⟨⟨-140447518748052941266044250609958737339,-140447518748052941266044250609958733571⟩,⟨36223714020044130060505999092971711390,36223714020044130060505999092971715158⟩⟩, + ⟨⟨3016933743346001753400859532468654,3016933743346001753400859532478492⟩,⟨4997725456191491011788319685352399,4997725456191491011788319685361912⟩⟩, + ⟨⟨-82707013499985495446798879013,-82707013499985495446798857772⟩,⟨96432795385332072472488972385,96432795385332072472488996328⟩⟩, + ⟨⟨5432503679113793490194845,5432503679113793490240575⟩,⟨-2049032683012790363198679,-2049032683012790363152949⟩⟩, + ⟨⟨3401800081940341077039,3401800081940341165738⟩,⟨-1996282023707727398827,-1996282023707727310129⟩⟩, + ⟨⟨-264937344538494258880,-264937344538494154708⟩,⟨-59527,52086⟩⟩, + ⟨⟨3401800081940341077039,3401800081940341165738⟩,⟨1996282023707727310129,1996282023707727398827⟩⟩, + ⟨⟨5432503679113793490194845,5432503679113793490240575⟩,⟨2049032683012790363152949,2049032683012790363198679⟩⟩, + ⟨⟨-82707013499985495446798879013,-82707013499985495446798857772⟩,⟨-96432795385332072472488996328,-96432795385332072472488972385⟩⟩, + ⟨⟨3016933743346001753400859532468654,3016933743346001753400859532478492⟩,⟨-4997725456191491011788319685361912,-4997725456191491011788319685352399⟩⟩, + ⟨⟨-140447518748052941266044250609958737339,-140447518748052941266044250609958733571⟩,⟨-36223714020044130060505999092971715158,-36223714020044130060505999092971711390⟩⟩, + ⟨⟨-816523704794080018079970464703061661538945,-816523704794080018079970464703061661537865⟩,⟨-578844568905269561856500948351343564935774,-578844568905269561856500948351343564934760⟩⟩, + ⟨⟨1160736175952484212476300844589007658434197098,1160736175952484212476300844589007658434197365⟩,⟨-1110624209834709925069741812940781533435668292,-1110624209834709925069741812940781533435667993⟩⟩, + ⟨⟨-139076015960814272817022759291318904924278669898,-139076015960814272817022759291318904924278669764⟩,⟨636545723931692467598024085759828244251796975841,636545723931692467598024085759828244251796975972⟩⟩, + ⟨⟨347484327620322339699021126377233693176079816224,347484327620322339699021126377233693176079816407⟩,⟨-80475814499788397340548922386482098520046356111797,-80475814499788397340548922386482098520046356111616⟩⟩, + ⟨⟨290945416915291265021295726772094425896087563673264,290945416915291265021295726772094425896087563678430⟩,⟨3710066354369131912057148344979033390273555010170993,3710066354369131912057148344979033390273555010176163⟩⟩, + ⟨⟨-14129866642112246732385045448021469492273429106434799,-14129866642112246732385045448021469492273429106328371⟩,⟨-76577632172357220347908331952910554608592175075833844,-76577632172357220347908331952910554608592175075727444⟩⟩, + ⟨⟨330506449326638992674332673895352878486526033282087389,330506449326638992674332673895352878486526033283502125⟩,⟨799836689161531917197226900410051747613201281602630350,799836689161531917197226900410051747613201281604047278⟩⟩, + ⟨⟨-3962032514611260515719202783733908692658288884546341061,-3962032514611260515719202783733908692658288884538830787⟩,⟨-4261226032329308248406416341841206577063865907555338179,-4261226032329308248406416341841206577063865907547827869⟩⟩, + ⟨⟨25085532589758620390874563329866564943760083899818938248,25085532589758620390874563329866564943760083899852230190⟩,⟨7725638321385685157626601845193527240094807720639254483,7725638321385685157626601845193527240094807720672613013⟩⟩, + ⟨⟨-79608844460565426560713129562062189625389244914653573411,-79608844460565426560713129562062189625389244914558714296⟩,⟨33074652523024846231591067824944039063653942516089440933,33074652523024846231591067824944039063653942516183771466⟩⟩] +lemma tw0_1_4_11_calc (j : Fin 31) : taylorWaveBox 0 1 4 11 j = tw0_1_4_11 j := by + revert j + decide +kernel +def tw0_1_4_12 : Fin 31 → CI := ![⟨⟨14104112217178324399629571478262119438048585490460787564,14104112217178324399629571478262119438048585490491540945⟩,⟨-22873553224658730959277990661322015133285036130830025072,-22873553224658730959277990661322015133285036130799109484⟩⟩, + ⟨⟨867401726687666943031121674730009027298725912126308921,867401726687666943031121674730009027298725912136865442⟩,⟨8603110968970490281203766202821916242322483490528742593,8603110968970490281203766202821916242322483490539286703⟩⟩, + ⟨⟨-1114823769616552805192409112904913021180046944408228911,-1114823769616552805192409112904913021180046944405087338⟩,⟨-1698778593146205155680959057052379206100528069803640028,-1698778593146205155680959057052379206100528069800498649⟩⟩, + ⟨⟨250053244984291363472723474336408808745907403193549376,250053244984291363472723474336408808745907403194097344⟩,⟨201973612045824381928598520066959095625687889347269918,201973612045824381928598520066959095625687889347817201⟩⟩, + ⟨⟨-26769058293922672680944473277436873167367670408811174,-26769058293922672680944473277436873167367670408772596⟩,⟨-15368956085192015112330027540896528199096301410239542,-15368956085192015112330027540896528199096301410200973⟩⟩, + ⟨⟨1406070426173797538007928145645439476631418494929998,1406070426173797538007928145645439476631418494932475⟩,⟨720558610682741561179775831420098364097941681490475,720558610682741561179775831420098364097941681492950⟩⟩, + ⟨⟨-33000026962859420124380838740058746848081665688370,-33000026962859420124380838740058746848081665688289⟩,⟨-16110143703717793292665871193915836390753108124705,-16110143703717793292665871193915836390753108124623⟩⟩, + ⟨⟨304893367154093637230097510735763521936221377480,304893367154093637230097510735763521936221377545⟩,⟨99169244839742055784889170776245454674805880427,99169244839742055784889170776245454674805880488⟩⟩, + ⟨⟨-838254961377591334673361836236578441029008678,-838254961377591334673361836236578441029008479⟩,⟨167470661975629721709778305944056141252741265,167470661975629721709778305944056141252741461⟩⟩, + ⟨⟨49444709930597463569410115820124064069282,49444709930597463569410115820124064069905⟩,⟨-574769643635017184807868789918996406719049,-574769643635017184807868789918996406718397⟩⟩, + ⟨⟨47786188451679802898587246575301320344,47786188451679802898587246575301322545⟩,⟨-76908620940759269640330655420171119589,-76908620940759269640330655420171117387⟩⟩, + ⟨⟨-3644155818907361525035636545715595,-3644155818907361525035636545709243⟩,⟨-1484437280932387710703084894721936,-1484437280932387710703084894715349⟩⟩, + ⟨⟨18831971244515765957435722618,18831971244515765957435741553⟩,⟨-89827835670843445998544373437,-89827835670843445998544354362⟩⟩, + ⟨⟨-3372423889425554230634301,-3372423889425554230600773⟩,⟨2884361331099921618167884,2884361331099921618201412⟩⟩, + ⟨⟨-2376604662477599251555,-2376604662477599181688⟩,⟨2035159199452805753917,2035159199452805823784⟩⟩, + ⟨⟨212930705630351972381,212930705630352056105⟩,⟨-41862,47842⟩⟩, + ⟨⟨-2376604662477599251555,-2376604662477599181688⟩,⟨-2035159199452805823784,-2035159199452805753917⟩⟩, + ⟨⟨-3372423889425554230634301,-3372423889425554230600773⟩,⟨-2884361331099921618201412,-2884361331099921618167884⟩⟩, + ⟨⟨18831971244515765957435722618,18831971244515765957435741553⟩,⟨89827835670843445998544354362,89827835670843445998544373437⟩⟩, + ⟨⟨-3644155818907361525035636545715595,-3644155818907361525035636545709243⟩,⟨1484437280932387710703084894715349,1484437280932387710703084894721936⟩⟩, + ⟨⟨47786188451679802898587246575301320344,47786188451679802898587246575301322545⟩,⟨76908620940759269640330655420171117387,76908620940759269640330655420171119589⟩⟩, + ⟨⟨49444709930597463569410115820124064069282,49444709930597463569410115820124064069905⟩,⟨574769643635017184807868789918996406718397,574769643635017184807868789918996406719049⟩⟩, + ⟨⟨-838254961377591334673361836236578441029008678,-838254961377591334673361836236578441029008479⟩,⟨-167470661975629721709778305944056141252741461,-167470661975629721709778305944056141252741265⟩⟩, + ⟨⟨304893367154093637230097510735763521936221377480,304893367154093637230097510735763521936221377545⟩,⟨-99169244839742055784889170776245454674805880488,-99169244839742055784889170776245454674805880427⟩⟩, + ⟨⟨-33000026962859420124380838740058746848081665688370,-33000026962859420124380838740058746848081665688289⟩,⟨16110143703717793292665871193915836390753108124623,16110143703717793292665871193915836390753108124705⟩⟩, + ⟨⟨1406070426173797538007928145645439476631418494929998,1406070426173797538007928145645439476631418494932475⟩,⟨-720558610682741561179775831420098364097941681492950,-720558610682741561179775831420098364097941681490475⟩⟩, + ⟨⟨-26769058293922672680944473277436873167367670408811174,-26769058293922672680944473277436873167367670408772596⟩,⟨15368956085192015112330027540896528199096301410200973,15368956085192015112330027540896528199096301410239542⟩⟩, + ⟨⟨250053244984291363472723474336408808745907403193549376,250053244984291363472723474336408808745907403194097344⟩,⟨-201973612045824381928598520066959095625687889347817201,-201973612045824381928598520066959095625687889347269918⟩⟩, + ⟨⟨-1114823769616552805192409112904913021180046944408228911,-1114823769616552805192409112904913021180046944405087338⟩,⟨1698778593146205155680959057052379206100528069800498649,1698778593146205155680959057052379206100528069803640028⟩⟩, + ⟨⟨867401726687666943031121674730009027298725912126308921,867401726687666943031121674730009027298725912136865442⟩,⟨-8603110968970490281203766202821916242322483490539286703,-8603110968970490281203766202821916242322483490528742593⟩⟩, + ⟨⟨14104112217178324399629571478262119438048585490460787564,14104112217178324399629571478262119438048585490491540946⟩,⟨22873553224658730959277990661322015133285036130799109484,22873553224658730959277990661322015133285036130830025072⟩⟩] +lemma tw0_1_4_12_calc (j : Fin 31) : taylorWaveBox 0 1 4 12 j = tw0_1_4_12 j := by + revert j + decide +kernel +def tw0_1_4_13 : Fin 31 → CI := ![⟨⟨5922334944103544333657354368029307318747643488496450861,5922334944103544333657354368029307318747643488505645772⟩,⟨5104060155539224622219055511631262005594137960183578035,5104060155539224622219055511631262005594137960192730450⟩⟩, + ⟨⟨-2645822635183557972660465366551913583398926613431978862,-2645822635183557972660465366551913583398926613428968158⟩,⟨-259549704243875340671217322781529209465929631889940112,-259549704243875340671217322781529209465929631886929126⟩⟩, + ⟨⟨624409357559250320449959222881441533404494489541744018,624409357559250320449959222881441533404494489542904246⟩,⟨-220698912346152288158093327998526101681192247059704490,-220698912346152288158093327998526101681192247058544168⟩⟩, + ⟨⟨-91725600360512789220868368597978016884950639169099926,-91725600360512789220868368597978016884950639168914708⟩,⟨63263292177722777766393109166704180129365022885016796,63263292177722777766393109166704180129365022885202146⟩⟩, + ⟨⟨8653694732111895729190026631865437859218107344184390,8653694732111895729190026631865437859218107344202425⟩,⟨-7451628224594705138823583686493334785222575874019678,-7451628224594705138823583686493334785222575874001633⟩⟩, + ⟨⟨-478054870122854118313063615724297492502651906512045,-478054870122854118313063615724297492502651906511040⟩,⟨404232280517810371990000516203660955510023079797316,404232280517810371990000516203660955510023079798321⟩⟩, + ⟨⟨12372783815553343101150231567317118539009942075176,12372783815553343101150231567317118539009942075220⟩,⟨-9566452178901878835295085501670382880419225834308,-9566452178901878835295085501670382880419225834264⟩⟩, + ⟨⟨-110043540039349196872966330404248890238721440328,-110043540039349196872966330404248890238721440305⟩,⟨97839497869960761038438525384943414645660131998,97839497869960761038438525384943414645660132024⟩⟩, + ⟨⟨170420421053023082299166770124852760086765014,170420421053023082299166770124852760086765104⟩,⟨-388823518174332941423106954299845285165850277,-388823518174332941423106954299845285165850194⟩⟩, + ⟨⟨218805547141994659435431124738332655778665,218805547141994659435431124738332655779008⟩,⟨220083992327990427487928421466655186705103,220083992327990427487928421466655186705460⟩⟩, + ⟨⟨10814683548652405434886830793677786634,10814683548652405434886830793677787984⟩,⟨51635408935796530145872083040424922859,51635408935796530145872083040424924210⟩⟩, + ⟨⟨2396029349892552294161992388229778,2396029349892552294161992388233212⟩,⟨-622129936949753001236750474492921,-622129936949753001236750474489233⟩⟩, + ⟨⟨18029504218791404899534508356,18029504218791404899534520391⟩,⟨59201201424229713671300801448,59201201424229713671300812332⟩⟩, + ⟨⟨1562973679271821159675712,1562973679271821159704279⟩,⟨-2752878410180481889546192,-2752878410180481889517626⟩⟩, + ⟨⟨1465957642624349527024,1465957642624349576761⟩,⟨-1793806260164391849345,-1793806260164391799609⟩⟩, + ⟨⟨-159724002344543797060,-159724002344543734257⟩,⟨-35888,31402⟩⟩, + ⟨⟨1465957642624349527024,1465957642624349576761⟩,⟨1793806260164391799609,1793806260164391849345⟩⟩, + ⟨⟨1562973679271821159675712,1562973679271821159704279⟩,⟨2752878410180481889517626,2752878410180481889546192⟩⟩, + ⟨⟨18029504218791404899534508356,18029504218791404899534520391⟩,⟨-59201201424229713671300812332,-59201201424229713671300801448⟩⟩, + ⟨⟨2396029349892552294161992388229778,2396029349892552294161992388233212⟩,⟨622129936949753001236750474489233,622129936949753001236750474492921⟩⟩, + ⟨⟨10814683548652405434886830793677786634,10814683548652405434886830793677787984⟩,⟨-51635408935796530145872083040424924210,-51635408935796530145872083040424922859⟩⟩, + ⟨⟨218805547141994659435431124738332655778665,218805547141994659435431124738332655779008⟩,⟨-220083992327990427487928421466655186705460,-220083992327990427487928421466655186705103⟩⟩, + ⟨⟨170420421053023082299166770124852760086765014,170420421053023082299166770124852760086765104⟩,⟨388823518174332941423106954299845285165850194,388823518174332941423106954299845285165850277⟩⟩, + ⟨⟨-110043540039349196872966330404248890238721440328,-110043540039349196872966330404248890238721440305⟩,⟨-97839497869960761038438525384943414645660132024,-97839497869960761038438525384943414645660131998⟩⟩, + ⟨⟨12372783815553343101150231567317118539009942075176,12372783815553343101150231567317118539009942075220⟩,⟨9566452178901878835295085501670382880419225834264,9566452178901878835295085501670382880419225834308⟩⟩, + ⟨⟨-478054870122854118313063615724297492502651906512045,-478054870122854118313063615724297492502651906511040⟩,⟨-404232280517810371990000516203660955510023079798321,-404232280517810371990000516203660955510023079797316⟩⟩, + ⟨⟨8653694732111895729190026631865437859218107344184390,8653694732111895729190026631865437859218107344202425⟩,⟨7451628224594705138823583686493334785222575874001633,7451628224594705138823583686493334785222575874019678⟩⟩, + ⟨⟨-91725600360512789220868368597978016884950639169099926,-91725600360512789220868368597978016884950639168914708⟩,⟨-63263292177722777766393109166704180129365022885202146,-63263292177722777766393109166704180129365022885016796⟩⟩, + ⟨⟨624409357559250320449959222881441533404494489541744018,624409357559250320449959222881441533404494489542904246⟩,⟨220698912346152288158093327998526101681192247058544168,220698912346152288158093327998526101681192247059704490⟩⟩, + ⟨⟨-2645822635183557972660465366551913583398926613431978862,-2645822635183557972660465366551913583398926613428968158⟩,⟨259549704243875340671217322781529209465929631886929126,259549704243875340671217322781529209465929631889940112⟩⟩, + ⟨⟨5922334944103544333657354368029307318747643488496450861,5922334944103544333657354368029307318747643488505645772⟩,⟨-5104060155539224622219055511631262005594137960192730450,-5104060155539224622219055511631262005594137960183578035⟩⟩] +lemma tw0_1_4_13_calc (j : Fin 31) : taylorWaveBox 0 1 4 13 j = tw0_1_4_13 j := by + revert j + decide +kernel +def tw0_1_4_14 : Fin 31 → CI := ![⟨⟨-1630064868166099502247919261185638481395693808017366866,-1630064868166099502247919261185638481395693808014865683⟩,⟨1374920844692092521036112642202465398164260966954958222,1374920844692092521036112642202465398164260966957468798⟩⟩, + ⟨⟨223567886103055599928834651154934831626048856198004131,223567886103055599928834651154934831626048856198818311⟩,⟨-732964506640693634457828235097246532910708384567512417,-732964506640693634457828235097246532910708384566697194⟩⟩, + ⟨⟨19948302409500388275917683074571578748246128420945113,19948302409500388275917683074571578748246128421326043⟩,⟨201376559148458836438309111602715515446750414656874983,201376559148458836438309111602715515446750414657255883⟩⟩, + ⟨⟨-11260350553057200743982808584157436707273168352351629,-11260350553057200743982808584157436707273168352296431⟩,⟨-34416971097626723462058550204980430564986978951603461,-34416971097626723462058550204980430564986978951548258⟩⟩, + ⟨⟨1440379504207818138321457455639939887224399759158326,1440379504207818138321457455639939887224399759165502⟩,⟨3689729646291001086297429096753026105957784950677733,3689729646291001086297429096753026105957784950684905⟩⟩, + ⟨⟨-70196037086335050789403907553793858238902750255879,-70196037086335050789403907553793858238902750255508⟩,⟨-221720338233338843160039635828129939139008521432751,-221720338233338843160039635828129939139008521432379⟩⟩, + ⟨⟨1238799100725659127958709843215255774506157042136,1238799100725659127958709843215255774506157042156⟩,⟨6120437492094519969985337174577166476484376580074,6120437492094519969985337174577166476484376580093⟩⟩, + ⟨⟨-12420838817821817337627508847696483382736633467,-12420838817821817337627508847696483382736633453⟩,⟨-62171305286171057852856245787983370395283205466,-62171305286171057852856245787983370395283205452⟩⟩, + ⟨⟨102883335709930007655538884086921386016697323,102883335709930007655538884086921386016697364⟩,⟨168771971250794452762669784192894375423417970,168771971250794452762669784192894375423418013⟩⟩, + ⟨⟨-156016215402574092217002530149141890459500,-156016215402574092217002530149141890459335⟩,⟨12506138571190040342029776520713843889955,12506138571190040342029776520713843890109⟩⟩, + ⟨⟨-23752267729956605120374781154362032083,-23752267729956605120374781154362031367⟩,⟨-16316754724359968267098197731625549741,-16316754724359968267098197731625549024⟩⟩, + ⟨⟨-913373332821004138294406321115376,-913373332821004138294406321112832⟩,⟨1139028793259183940129483505429702,1139028793259183940129483505432234⟩⟩, + ⟨⟨-28005766465752614903603924421,-28005766465752614903603917285⟩,⟨-27314283694786429627716095920,-27314283694786429627716089702⟩⟩, + ⟨⟨-357143381226855261805766,-357143381226855261785827⟩,⟨2086744758309944509378853,2086744758309944509398792⟩⟩, + ⟨⟨-781743523268033426249,-781743523268033394193⟩,⟨1405202145365753194345,1405202145365753226401⟩⟩, + ⟨⟨112324204469928562976,112324204469928607142⟩,⟨-22083,25238⟩⟩, + ⟨⟨-781743523268033426249,-781743523268033394193⟩,⟨-1405202145365753226401,-1405202145365753194345⟩⟩, + ⟨⟨-357143381226855261805766,-357143381226855261785827⟩,⟨-2086744758309944509398792,-2086744758309944509378853⟩⟩, + ⟨⟨-28005766465752614903603924421,-28005766465752614903603917285⟩,⟨27314283694786429627716089702,27314283694786429627716095920⟩⟩, + ⟨⟨-913373332821004138294406321115376,-913373332821004138294406321112832⟩,⟨-1139028793259183940129483505432234,-1139028793259183940129483505429702⟩⟩, + ⟨⟨-23752267729956605120374781154362032083,-23752267729956605120374781154362031367⟩,⟨16316754724359968267098197731625549024,16316754724359968267098197731625549741⟩⟩, + ⟨⟨-156016215402574092217002530149141890459500,-156016215402574092217002530149141890459335⟩,⟨-12506138571190040342029776520713843890109,-12506138571190040342029776520713843889955⟩⟩, + ⟨⟨102883335709930007655538884086921386016697323,102883335709930007655538884086921386016697364⟩,⟨-168771971250794452762669784192894375423418013,-168771971250794452762669784192894375423417970⟩⟩, + ⟨⟨-12420838817821817337627508847696483382736633467,-12420838817821817337627508847696483382736633453⟩,⟨62171305286171057852856245787983370395283205452,62171305286171057852856245787983370395283205466⟩⟩, + ⟨⟨1238799100725659127958709843215255774506157042136,1238799100725659127958709843215255774506157042156⟩,⟨-6120437492094519969985337174577166476484376580093,-6120437492094519969985337174577166476484376580074⟩⟩, + ⟨⟨-70196037086335050789403907553793858238902750255879,-70196037086335050789403907553793858238902750255508⟩,⟨221720338233338843160039635828129939139008521432379,221720338233338843160039635828129939139008521432751⟩⟩, + ⟨⟨1440379504207818138321457455639939887224399759158326,1440379504207818138321457455639939887224399759165502⟩,⟨-3689729646291001086297429096753026105957784950684905,-3689729646291001086297429096753026105957784950677733⟩⟩, + ⟨⟨-11260350553057200743982808584157436707273168352351629,-11260350553057200743982808584157436707273168352296431⟩,⟨34416971097626723462058550204980430564986978951548258,34416971097626723462058550204980430564986978951603461⟩⟩, + ⟨⟨19948302409500388275917683074571578748246128420945113,19948302409500388275917683074571578748246128421326043⟩,⟨-201376559148458836438309111602715515446750414657255883,-201376559148458836438309111602715515446750414656874983⟩⟩, + ⟨⟨223567886103055599928834651154934831626048856198004131,223567886103055599928834651154934831626048856198818311⟩,⟨732964506640693634457828235097246532910708384566697194,732964506640693634457828235097246532910708384567512417⟩⟩, + ⟨⟨-1630064868166099502247919261185638481395693808017366866,-1630064868166099502247919261185638481395693808014865683⟩,⟨-1374920844692092521036112642202465398164260966957468798,-1374920844692092521036112642202465398164260966954958222⟩⟩] +lemma tw0_1_4_14_calc (j : Fin 31) : taylorWaveBox 0 1 4 14 j = tw0_1_4_14 j := by + revert j + decide +kernel +def tw0_1_4_15 : Fin 31 → CI := ![⟨⟨-282356326790969500534305958862489754208045897700978841,-282356326790969500534305958862489754208045897700346613⟩,⟨-469001651492422841152179656879554504965071117927088795,-469001651492422841152179656879554504965071117926458220⟩⟩, + ⟨⟨183002356788989451187808208023011457479274102919334119,183002356788989451187808208023011457479274102919593024⟩,⟨98630169219380836971939328884294474230227034670798832,98630169219380836971939328884294474230227034671057162⟩⟩, + ⟨⟨-57608645181699031726280750800182279815944354967496655,-57608645181699031726280750800182279815944354967384047⟩,⟨-8251841011952091046307225157427658168354245281969228,-8251841011952091046307225157427658168354245281856613⟩⟩, + ⟨⟨11071722199808183890117230611160067220034884346968127,11071722199808183890117230611160067220034884346986691⟩,⟨-316890148896133709319851029839824331553014696294914,-316890148896133709319851029839824331553014696276367⟩⟩, + ⟨⟨-1292280320026503317398006680586768383221020590104942,-1292280320026503317398006680586768383221020590102433⟩,⟨43262568636162138681819933514488605066002903947599,43262568636162138681819933514488605066002903950109⟩⟩, + ⟨⟨80992857880912973381237673686472337305751221367310,80992857880912973381237673686472337305751221367478⟩,⟨7202510560937591811543841507133954950453623534368,7202510560937591811543841507133954950453623534537⟩⟩, + ⟨⟨-2268491983553161361557801405963885819520427277575,-2268491983553161361557801405963885819520427277567⟩,⟨-600465859601011991868324003814674980238371609179,-600465859601011991868324003814674980238371609171⟩⟩, + ⟨⟨24285768307725670990228950854509302941902213842,24285768307725670990228950854509302941902213848⟩,⟨8383202102994154984104194491848514577157407222,8383202102994154984104194491848514577157407228⟩⟩, + ⟨⟨-86444157769518482039728517485985655526152185,-86444157769518482039728517485985655526152165⟩,⟨-5437596860645665212685763917039477872356932,-5437596860645665212685763917039477872356911⟩⟩, + ⟨⟨43318628986330678406329372087376400960562,43318628986330678406329372087376400960651⟩,⟨-60357287632374733857234031695303265715056,-60357287632374733857234031695303265714969⟩⟩, + ⟨⟨14624253680985140060841541186677090210,14624253680985140060841541186677090583⟩,⟨-2367591356974096794821648043302219211,-2367591356974096794821648043302218837⟩⟩, + ⟨⟨28381117418845790618248299614487,28381117418845790618248299615627⟩,⟨-809950507015155470485680864119977,-809950507015155470485680864118931⟩⟩, + ⟨⟨22427563783843908067134452148,22427563783843908067134456996⟩,⟨6222089311522160664012017513,6222089311522160664012022264⟩⟩, + ⟨⟨-235110911952898100213597,-235110911952898100202016⟩,⟨-1311658320501448436319983,-1311658320501448436308403⟩⟩, + ⟨⟨340610955646911800582,340610955646911819255⟩,⟨-993745690862556109499,-993745690862556090827⟩⟩, + ⟨⟨-74344283445443017456,-74344283445442988224⟩,⟨-16704,14616⟩⟩, + ⟨⟨340610955646911800582,340610955646911819255⟩,⟨993745690862556090827,993745690862556109499⟩⟩, + ⟨⟨-235110911952898100213597,-235110911952898100202016⟩,⟨1311658320501448436308403,1311658320501448436319983⟩⟩, + ⟨⟨22427563783843908067134452148,22427563783843908067134456996⟩,⟨-6222089311522160664012022264,-6222089311522160664012017513⟩⟩, + ⟨⟨28381117418845790618248299614487,28381117418845790618248299615627⟩,⟨809950507015155470485680864118931,809950507015155470485680864119977⟩⟩, + ⟨⟨14624253680985140060841541186677090210,14624253680985140060841541186677090583⟩,⟨2367591356974096794821648043302218837,2367591356974096794821648043302219211⟩⟩, + ⟨⟨43318628986330678406329372087376400960562,43318628986330678406329372087376400960651⟩,⟨60357287632374733857234031695303265714969,60357287632374733857234031695303265715056⟩⟩, + ⟨⟨-86444157769518482039728517485985655526152185,-86444157769518482039728517485985655526152165⟩,⟨5437596860645665212685763917039477872356911,5437596860645665212685763917039477872356932⟩⟩, + ⟨⟨24285768307725670990228950854509302941902213842,24285768307725670990228950854509302941902213848⟩,⟨-8383202102994154984104194491848514577157407228,-8383202102994154984104194491848514577157407222⟩⟩, + ⟨⟨-2268491983553161361557801405963885819520427277575,-2268491983553161361557801405963885819520427277567⟩,⟨600465859601011991868324003814674980238371609171,600465859601011991868324003814674980238371609179⟩⟩, + ⟨⟨80992857880912973381237673686472337305751221367310,80992857880912973381237673686472337305751221367478⟩,⟨-7202510560937591811543841507133954950453623534537,-7202510560937591811543841507133954950453623534368⟩⟩, + ⟨⟨-1292280320026503317398006680586768383221020590104942,-1292280320026503317398006680586768383221020590102433⟩,⟨-43262568636162138681819933514488605066002903950109,-43262568636162138681819933514488605066002903947599⟩⟩, + ⟨⟨11071722199808183890117230611160067220034884346968127,11071722199808183890117230611160067220034884346986691⟩,⟨316890148896133709319851029839824331553014696276367,316890148896133709319851029839824331553014696294914⟩⟩, + ⟨⟨-57608645181699031726280750800182279815944354967496655,-57608645181699031726280750800182279815944354967384047⟩,⟨8251841011952091046307225157427658168354245281856613,8251841011952091046307225157427658168354245281969228⟩⟩, + ⟨⟨183002356788989451187808208023011457479274102919334119,183002356788989451187808208023011457479274102919593024⟩,⟨-98630169219380836971939328884294474230227034671057162,-98630169219380836971939328884294474230227034670798832⟩⟩, + ⟨⟨-282356326790969500534305958862489754208045897700978841,-282356326790969500534305958862489754208045897700346613⟩,⟨469001651492422841152179656879554504965071117926458220,469001651492422841152179656879554504965071117927088795⟩⟩] +lemma tw0_1_4_15_calc (j : Fin 31) : taylorWaveBox 0 1 4 15 j = tw0_1_4_15 j := by + revert j + decide +kernel +def tw0_1_4_16 : Fin 31 → CI := ![⟨⟨123103444689735270909667347784824644135217152365398639,123103444689735270909667347784824644135217152365545828⟩,⟨-49617486297828520204431104420913759319095683501022262,-49617486297828520204431104420913759319095683500874893⟩⟩, + ⟨⟨-34011338982342594730290091216235884130764051231906427,-34011338982342594730290091216235884130764051231832331⟩,⟨40992008120463065213345764045798507748104267462074997,40992008120463065213345764045798507748104267462149278⟩⟩, + ⟨⟨5911186586523642646469450308341218884069823731865997,5911186586523642646469450308341218884069823731896245⟩,⟨-14659862095709729819273367578146177968686227228944303,-14659862095709729819273367578146177968686227228914057⟩⟩, + ⟨⟨-819391171146734660809216279275344019397186870559526,-819391171146734660809216279275344019397186870553192⟩,⟨3092991284946585411649472407077368890527227087880202,3092991284946585411649472407077368890527227087886543⟩⟩, + ⟨⟨119804647477721874954334001506106510893428175519881,119804647477721874954334001506106510893428175520671⟩,⟨-380211993079941620909601097779059219096744464738330,-380211993079941620909601097779059219096744464737539⟩⟩, + ⟨⟨-12493939302487328888317372926225238881219307067829,-12493939302487328888317372926225238881219307067762⟩,⟨23765921384247713503403140673362601620898154891313,23765921384247713503403140673362601620898154891379⟩⟩, + ⟨⟨547425660185927654785462111944134259331641974373,547425660185927654785462111944134259331641974377⟩,⟨-627648807192157793090104508580486580383263555421,-627648807192157793090104508580486580383263555417⟩⟩, + ⟨⟨-7464323224486896498537501316981363731953622969,-7464323224486896498537501316981363731953622967⟩,⟨6400783436432945287733976464556848862218711867,6400783436432945287733976464556848862218711870⟩⟩, + ⟨⟨22346853235308340074523351019866246666563947,22346853235308340074523351019866246666563954⟩,⟨-28028378930848859346661340617188995657355466,-28028378930848859346661340617188995657355459⟩⟩, + ⟨⟨8103996941169689721830501058976714467251,8103996941169689721830501058976714467280⟩,⟨32304520686557921562829797727260703273705,32304520686557921562829797727260703273737⟩⟩, + ⟨⟨-4340968732396875883557947969050810546,-4340968732396875883557947969050810362⟩,⟨5735532170314353409468714150901280190,5735532170314353409468714150901280374⟩⟩, + ⟨⟨241950448989665132876392768029974,241950448989665132876392768030702⟩,⟨349264613789816263666316623981146,349264613789816263666316623981855⟩⟩, + ⟨⟨-12728684508517253722657588184,-12728684508517253722657585794⟩,⟨3002504324002100723381130765,3002504324002100723381133366⟩⟩, + ⟨⟨396515748779581794594062,396515748779581794599550⟩,⟨685780070004720266038425,685780070004720266043913⟩⟩, + ⟨⟨-98606509609152144142,-98606509609152133290⟩,⟨640606902191572747811,640606902191572758663⟩⟩, + ⟨⟨46472734201604633855,46472734201604652129⟩,⟨-9137,10442⟩⟩, + ⟨⟨-98606509609152144142,-98606509609152133290⟩,⟨-640606902191572758663,-640606902191572747811⟩⟩, + ⟨⟨396515748779581794594062,396515748779581794599550⟩,⟨-685780070004720266043913,-685780070004720266038425⟩⟩, + ⟨⟨-12728684508517253722657588184,-12728684508517253722657585794⟩,⟨-3002504324002100723381133366,-3002504324002100723381130765⟩⟩, + ⟨⟨241950448989665132876392768029974,241950448989665132876392768030702⟩,⟨-349264613789816263666316623981855,-349264613789816263666316623981146⟩⟩, + ⟨⟨-4340968732396875883557947969050810546,-4340968732396875883557947969050810362⟩,⟨-5735532170314353409468714150901280374,-5735532170314353409468714150901280190⟩⟩, + ⟨⟨8103996941169689721830501058976714467251,8103996941169689721830501058976714467280⟩,⟨-32304520686557921562829797727260703273737,-32304520686557921562829797727260703273705⟩⟩, + ⟨⟨22346853235308340074523351019866246666563947,22346853235308340074523351019866246666563954⟩,⟨28028378930848859346661340617188995657355459,28028378930848859346661340617188995657355466⟩⟩, + ⟨⟨-7464323224486896498537501316981363731953622969,-7464323224486896498537501316981363731953622967⟩,⟨-6400783436432945287733976464556848862218711870,-6400783436432945287733976464556848862218711867⟩⟩, + ⟨⟨547425660185927654785462111944134259331641974373,547425660185927654785462111944134259331641974377⟩,⟨627648807192157793090104508580486580383263555417,627648807192157793090104508580486580383263555421⟩⟩, + ⟨⟨-12493939302487328888317372926225238881219307067829,-12493939302487328888317372926225238881219307067762⟩,⟨-23765921384247713503403140673362601620898154891379,-23765921384247713503403140673362601620898154891313⟩⟩, + ⟨⟨119804647477721874954334001506106510893428175519881,119804647477721874954334001506106510893428175520671⟩,⟨380211993079941620909601097779059219096744464737539,380211993079941620909601097779059219096744464738330⟩⟩, + ⟨⟨-819391171146734660809216279275344019397186870559526,-819391171146734660809216279275344019397186870553192⟩,⟨-3092991284946585411649472407077368890527227087886543,-3092991284946585411649472407077368890527227087880202⟩⟩, + ⟨⟨5911186586523642646469450308341218884069823731865997,5911186586523642646469450308341218884069823731896245⟩,⟨14659862095709729819273367578146177968686227228914057,14659862095709729819273367578146177968686227228944303⟩⟩, + ⟨⟨-34011338982342594730290091216235884130764051231906427,-34011338982342594730290091216235884130764051231832331⟩,⟨-40992008120463065213345764045798507748104267462149278,-40992008120463065213345764045798507748104267462074997⟩⟩, + ⟨⟨123103444689735270909667347784824644135217152365398639,123103444689735270909667347784824644135217152365545828⟩,⟨49617486297828520204431104420913759319095683500874893,49617486297828520204431104420913759319095683501022262⟩⟩] +lemma tw0_1_4_16_calc (j : Fin 31) : taylorWaveBox 0 1 4 16 j = tw0_1_4_16 j := by + revert j + decide +kernel +def tw0_1_4_17 : Fin 31 → CI := ![⟨⟨6782568135812277888929113959621956407881096270339553,6782568135812277888929113959621956407881096270371435⟩,⟨29721930592945141721340828062239590397537582236634794,29721930592945141721340828062239590397537582236666691⟩⟩, + ⟨⟨-8128984461008405358854273671942805300226627190119452,-8128984461008405358854273671942805300226627190099948⟩,⟨-10053782476385040494677439301744723357335982695159787,-10053782476385040494677439301744723357335982695140330⟩⟩, + ⟨⟨3300121391121212474062162789964256158405198319550428,3300121391121212474062162789964256158405198319557860⟩,⟨2377429193989783199766532487846379848820966510991917,2377429193989783199766532487846379848820966510999348⟩⟩, + ⟨⟨-748104042400602843252990434330769966009102506239106,-748104042400602843252990434330769966009102506237178⟩,⟨-455126171862832696425020332541351464905465032835334,-455126171862832696425020332541351464905465032833408⟩⟩, + ⟨⟨93115026720512302177676622079764728976890160569848,93115026720512302177676622079764728976890160570109⟩,⟨69904232141412954108624674824622982032692272414723,69904232141412954108624674824622982032692272414983⟩⟩, + ⟨⟨-5356143608879470495024373031361845203080480608821,-5356143608879470495024373031361845203080480608797⟩,⟨-6470033333777598736708218301204207246162624362813,-6470033333777598736708218301204207246162624362789⟩⟩, + ⟨⟨107780108604524121083184867932180338197447317891,107780108604524121083184867932180338197447317893⟩,⟨258452034962280464799057911650917075661135338345,258452034962280464799057911650917075661135338347⟩⟩, + ⟨⟨-635720884812644840151104990212826836172322950,-635720884812644840151104990212826836172322948⟩,⟨-3508081067152470728440062022805963529173172386,-3508081067152470728440062022805963529173172384⟩⟩, + ⟨⟨3984451649530768115084425618770290755930563,3984451649530768115084425618770290755930567⟩,⟨13478008968561864088322598359688664308072501,13478008968561864088322598359688664308072505⟩⟩, + ⟨⟨-12695215154638905307972785305315562725320,-12695215154638905307972785305315562725302⟩,⟨-6237841115681190433830558162568522182046,-6237841115681190433830558162568522182028⟩⟩, + ⟨⟨-378168253600227824195739487093006659,-378168253600227824195739487093006576⟩,⟨-3287009587845179268207220538495163241,-3287009587845179268207220538495163158⟩⟩, + ⟨⟨-200038709599643059381437223607882,-200038709599643059381437223607550⟩,⟨-67200622836585458581788288181226,-67200622836585458581788288180879⟩⟩, + ⟨⟨5169462677867055882555484223,5169462677867055882555485268⟩,⟨-4662913012065442725799003126,-4662913012065442725799001903⟩⟩, + ⟨⟨-341304510928143835162194,-341304510928143835158458⟩,⟨-287297864670071137116538,-287297864670071137112801⟩⟩, + ⟨⟨-9375635910507373402,-9375635910507366151⟩,⟨-378742235621248703345,-378742235621248696095⟩⟩, + ⟨⟨-27521225809861912880,-27521225809861902058⟩,⟨-6184,5411⟩⟩, + ⟨⟨-9375635910507373402,-9375635910507366151⟩,⟨378742235621248696095,378742235621248703345⟩⟩, + ⟨⟨-341304510928143835162194,-341304510928143835158458⟩,⟨287297864670071137112801,287297864670071137116538⟩⟩, + ⟨⟨5169462677867055882555484223,5169462677867055882555485268⟩,⟨4662913012065442725799001903,4662913012065442725799003126⟩⟩, + ⟨⟨-200038709599643059381437223607882,-200038709599643059381437223607550⟩,⟨67200622836585458581788288180879,67200622836585458581788288181226⟩⟩, + ⟨⟨-378168253600227824195739487093006659,-378168253600227824195739487093006576⟩,⟨3287009587845179268207220538495163158,3287009587845179268207220538495163241⟩⟩, + ⟨⟨-12695215154638905307972785305315562725320,-12695215154638905307972785305315562725302⟩,⟨6237841115681190433830558162568522182028,6237841115681190433830558162568522182046⟩⟩, + ⟨⟨3984451649530768115084425618770290755930563,3984451649530768115084425618770290755930567⟩,⟨-13478008968561864088322598359688664308072505,-13478008968561864088322598359688664308072501⟩⟩, + ⟨⟨-635720884812644840151104990212826836172322950,-635720884812644840151104990212826836172322948⟩,⟨3508081067152470728440062022805963529173172384,3508081067152470728440062022805963529173172386⟩⟩, + ⟨⟨107780108604524121083184867932180338197447317891,107780108604524121083184867932180338197447317893⟩,⟨-258452034962280464799057911650917075661135338347,-258452034962280464799057911650917075661135338345⟩⟩, + ⟨⟨-5356143608879470495024373031361845203080480608821,-5356143608879470495024373031361845203080480608797⟩,⟨6470033333777598736708218301204207246162624362789,6470033333777598736708218301204207246162624362813⟩⟩, + ⟨⟨93115026720512302177676622079764728976890160569848,93115026720512302177676622079764728976890160570109⟩,⟨-69904232141412954108624674824622982032692272414983,-69904232141412954108624674824622982032692272414723⟩⟩, + ⟨⟨-748104042400602843252990434330769966009102506239106,-748104042400602843252990434330769966009102506237178⟩,⟨455126171862832696425020332541351464905465032833408,455126171862832696425020332541351464905465032835334⟩⟩, + ⟨⟨3300121391121212474062162789964256158405198319550428,3300121391121212474062162789964256158405198319557860⟩,⟨-2377429193989783199766532487846379848820966510999348,-2377429193989783199766532487846379848820966510991917⟩⟩, + ⟨⟨-8128984461008405358854273671942805300226627190119452,-8128984461008405358854273671942805300226627190099948⟩,⟨10053782476385040494677439301744723357335982695140330,10053782476385040494677439301744723357335982695159787⟩⟩, + ⟨⟨6782568135812277888929113959621956407881096270339553,6782568135812277888929113959621956407881096270371435⟩,⟨-29721930592945141721340828062239590397537582236666691,-29721930592945141721340828062239590397537582236634794⟩⟩] +lemma tw0_1_4_17_calc (j : Fin 31) : taylorWaveBox 0 1 4 17 j = tw0_1_4_17 j := by + revert j + decide +kernel +def tw0_1_4_18 : Fin 31 → CI := ![⟨⟨-6637919917792151842369514694714347146954861865130084,-6637919917792151842369514694714347146954861865123315⟩,⟨435942604041152550133492264509758384541897822579119,435942604041152550133492264509758384541897822585871⟩⟩, + ⟨⟨2642159556080305233490121387221942603199927646465389,2642159556080305233490121387221942603199927646470110⟩,⟨-1381126245670012721507945702459740943812702796367444,-1381126245670012721507945702459740943812702796362714⟩⟩, + ⟨⟨-756910163665607223516734377988339195323283113240878,-756910163665607223516734377988339195323283113238961⟩,⟨644681183729911110649167554687920902531105093224738,644681183729911110649167554687920902531105093226656⟩⟩, + ⟨⟨168635944191909711760430098600540915510825864872913,168635944191909711760430098600540915510825864873445⟩,⟨-152949877600945125179103051178179733568454628065023,-152949877600945125179103051178179733568454628064490⟩⟩, + ⟨⟨-26879675266565052218420189464962351222016684358064,-26879675266565052218420189464962351222016684357974⟩,⟨17924016988019366792310792225434818957904986355628,17924016988019366792310792225434818957904986355718⟩⟩, + ⟨⟨2387490221017335529304017451224896598009487003339,2387490221017335529304017451224896598009487003348⟩,⟨-728553860569395395726284927535954458785851712584,-728553860569395395726284927535954458785851712575⟩⟩, + ⟨⟨-89265645852479172797349301579363332876761322724,-89265645852479172797349301579363332876761322722⟩,⟨-5664875458400436080437298310758076446002280767,-5664875458400436080437298310758076446002280766⟩⟩, + ⟨⟨1153463174749764456482937862065850689070080299,1153463174749764456482937862065850689070080301⟩,⟨421439845094737041321466823546854400850971592,421439845094737041321466823546854400850971593⟩⟩, + ⟨⟨-4964555398553541413619640557491558604771748,-4964555398553541413619640557491558604771745⟩,⟨-1660803734441406163919736904575350157500114,-1660803734441406163919736904575350157500112⟩⟩, + ⟨⟨5230397216087527612886846551084737444495,5230397216087527612886846551084737444501⟩,⟨-2283204026196905026438377025111956743125,-2283204026196905026438377025111956743119⟩⟩, + ⟨⟨1111568310759602238116305966361035282,1111568310759602238116305966361035321⟩,⟨924598855698866503630613587867358348,924598855698866503630613587867358386⟩⟩, + ⟨⟨94614227629841448679288775860702,94614227629841448679288775860847⟩,⟨-31015534536517614316225203168190,-31015534536517614316225203168035⟩⟩, + ⟨⟨-1156131455694805627009893850,-1156131455694805627009893141⟩,⟨3325382475326732029449712860,3325382475326732029449713593⟩⟩, + ⟨⟨223982728212442765853090,223982728212442765855323⟩,⟨82477474682721371243774,82477474682721371246006⟩⟩, + ⟨⟨42254795946176039588,42254795946176043992⟩,⟨206090960268707085648,206090960268707090052⟩⟩, + ⟨⟨15483207281328706132,15483207281328712220⟩,⟨-3044,3479⟩⟩, + ⟨⟨42254795946176039588,42254795946176043992⟩,⟨-206090960268707090052,-206090960268707085648⟩⟩, + ⟨⟨223982728212442765853090,223982728212442765855323⟩,⟨-82477474682721371246006,-82477474682721371243774⟩⟩, + ⟨⟨-1156131455694805627009893850,-1156131455694805627009893141⟩,⟨-3325382475326732029449713593,-3325382475326732029449712860⟩⟩, + ⟨⟨94614227629841448679288775860702,94614227629841448679288775860847⟩,⟨31015534536517614316225203168035,31015534536517614316225203168190⟩⟩, + ⟨⟨1111568310759602238116305966361035282,1111568310759602238116305966361035321⟩,⟨-924598855698866503630613587867358386,-924598855698866503630613587867358348⟩⟩, + ⟨⟨5230397216087527612886846551084737444495,5230397216087527612886846551084737444501⟩,⟨2283204026196905026438377025111956743119,2283204026196905026438377025111956743125⟩⟩, + ⟨⟨-4964555398553541413619640557491558604771748,-4964555398553541413619640557491558604771745⟩,⟨1660803734441406163919736904575350157500112,1660803734441406163919736904575350157500114⟩⟩, + ⟨⟨1153463174749764456482937862065850689070080299,1153463174749764456482937862065850689070080301⟩,⟨-421439845094737041321466823546854400850971593,-421439845094737041321466823546854400850971592⟩⟩, + ⟨⟨-89265645852479172797349301579363332876761322724,-89265645852479172797349301579363332876761322722⟩,⟨5664875458400436080437298310758076446002280766,5664875458400436080437298310758076446002280767⟩⟩, + ⟨⟨2387490221017335529304017451224896598009487003339,2387490221017335529304017451224896598009487003348⟩,⟨728553860569395395726284927535954458785851712575,728553860569395395726284927535954458785851712584⟩⟩, + ⟨⟨-26879675266565052218420189464962351222016684358064,-26879675266565052218420189464962351222016684357974⟩,⟨-17924016988019366792310792225434818957904986355718,-17924016988019366792310792225434818957904986355628⟩⟩, + ⟨⟨168635944191909711760430098600540915510825864872913,168635944191909711760430098600540915510825864873445⟩,⟨152949877600945125179103051178179733568454628064490,152949877600945125179103051178179733568454628065023⟩⟩, + ⟨⟨-756910163665607223516734377988339195323283113240878,-756910163665607223516734377988339195323283113238961⟩,⟨-644681183729911110649167554687920902531105093226656,-644681183729911110649167554687920902531105093224738⟩⟩, + ⟨⟨2642159556080305233490121387221942603199927646465389,2642159556080305233490121387221942603199927646470110⟩,⟨1381126245670012721507945702459740943812702796362714,1381126245670012721507945702459740943812702796367444⟩⟩, + ⟨⟨-6637919917792151842369514694714347146954861865130084,-6637919917792151842369514694714347146954861865123315⟩,⟨-435942604041152550133492264509758384541897822585871,-435942604041152550133492264509758384541897822579119⟩⟩] +lemma tw0_1_4_18_calc (j : Fin 31) : taylorWaveBox 0 1 4 18 j = tw0_1_4_18 j := by + revert j + decide +kernel +def tw0_1_4_19 : Fin 31 → CI := ![⟨⟨128653486236744227287534619550655395621123116443628,128653486236744227287534619550655395621123116445227⟩,⟨-1376431250336253166489210456083844297189485960987556,-1376431250336253166489210456083844297189485960985951⟩⟩, + ⟨⟨183077880398062680710652098094987683709329265738085,183077880398062680710652098094987683709329265739153⟩,⟨628633010326596574678359656920785213760091561628197,628633010326596574678359656920785213760091561629263⟩⟩, + ⟨⟨-103689653187143874330395332198956376577820908064108,-103689653187143874330395332198956376577820908063580⟩,⟨-206945037284789903770650915985621539144041189566496,-206945037284789903770650915985621539144041189565968⟩⟩, + ⟨⟨24473090497887877479828659933483454369992321043023,24473090497887877479828659933483454369992321043159⟩,⟨50782894196661245482399970076056477410142974892651,50782894196661245482399970076056477410142974892786⟩⟩, + ⟨⟨-2107255065109841318002955941832835348585191843576,-2107255065109841318002955941832835348585191843547⟩,⟨-8273557587295718693641054570239298181693123979819,-8273557587295718693641054570239298181693123979791⟩⟩, + ⟨⟨-69919936161483153982000048481505375546114739461,-69919936161483153982000048481505375546114739458⟩,⟨703034951201409401034398402054999213375977208490,703034951201409401034398402054999213375977208494⟩⟩, + ⟨⟨13563646886418994856891449138924668841719712584,13563646886418994856891449138924668841719712586⟩,⟨-23588345955543819495245905314148594920447904188,-23588345955543819495245905314148594920447904186⟩⟩, + ⟨⟨-310465148109182360215889769924284865177237617,-310465148109182360215889769924284865177237616⟩,⟨256721035633489032220936121040556769146659374,256721035633489032220936121040556769146659375⟩⟩, + ⟨⟨1492075997288170315058646810173416261899186,1492075997288170315058646810173416261899187⟩,⟨-1105588009215037561912718300073911497138504,-1105588009215037561912718300073911497138503⟩⟩, + ⟨⟨-628979110522465966884054711532221694825,-628979110522465966884054711532221694821⟩,⟨2100811996450730622016247052238333374983,2100811996450730622016247052238333374987⟩⟩, + ⟨⟨-600309660425321911132030010688194743,-600309660425321911132030010688194727⟩,⟨41239425633651569448688143941988919,41239425633651569448688143941988935⟩⟩, + ⟨⟨-25747158512192899019863676020993,-25747158512192899019863676020914⟩,⟨36591765508962251614023608024298,36591765508962251614023608024376⟩⟩, + ⟨⟨-282990171494445765707049510,-282990171494445765707049166⟩,⟨-1671850102725391017008155550,-1671850102725391017008155229⟩⟩, + ⟨⟨-121617843098117588398687,-121617843098117588397566⟩,⟨-724072390452167517444,-724072390452167516323⟩⟩, + ⟨⟨-41237734719961912346,-41237734719961909890⟩,⟨-103334452438351297937,-103334452438351295481⟩⟩, + ⟨⟨-8295924350408842635,-8295924350408839372⟩,⟨-1864,1631⟩⟩, + ⟨⟨-41237734719961912346,-41237734719961909890⟩,⟨103334452438351295481,103334452438351297937⟩⟩, + ⟨⟨-121617843098117588398687,-121617843098117588397566⟩,⟨724072390452167516323,724072390452167517444⟩⟩, + ⟨⟨-282990171494445765707049510,-282990171494445765707049166⟩,⟨1671850102725391017008155229,1671850102725391017008155550⟩⟩, + ⟨⟨-25747158512192899019863676020993,-25747158512192899019863676020914⟩,⟨-36591765508962251614023608024376,-36591765508962251614023608024298⟩⟩, + ⟨⟨-600309660425321911132030010688194743,-600309660425321911132030010688194727⟩,⟨-41239425633651569448688143941988935,-41239425633651569448688143941988919⟩⟩, + ⟨⟨-628979110522465966884054711532221694825,-628979110522465966884054711532221694821⟩,⟨-2100811996450730622016247052238333374987,-2100811996450730622016247052238333374983⟩⟩, + ⟨⟨1492075997288170315058646810173416261899186,1492075997288170315058646810173416261899187⟩,⟨1105588009215037561912718300073911497138503,1105588009215037561912718300073911497138504⟩⟩, + ⟨⟨-310465148109182360215889769924284865177237617,-310465148109182360215889769924284865177237616⟩,⟨-256721035633489032220936121040556769146659375,-256721035633489032220936121040556769146659374⟩⟩, + ⟨⟨13563646886418994856891449138924668841719712584,13563646886418994856891449138924668841719712586⟩,⟨23588345955543819495245905314148594920447904186,23588345955543819495245905314148594920447904188⟩⟩, + ⟨⟨-69919936161483153982000048481505375546114739461,-69919936161483153982000048481505375546114739458⟩,⟨-703034951201409401034398402054999213375977208494,-703034951201409401034398402054999213375977208490⟩⟩, + ⟨⟨-2107255065109841318002955941832835348585191843576,-2107255065109841318002955941832835348585191843547⟩,⟨8273557587295718693641054570239298181693123979791,8273557587295718693641054570239298181693123979819⟩⟩, + ⟨⟨24473090497887877479828659933483454369992321043023,24473090497887877479828659933483454369992321043159⟩,⟨-50782894196661245482399970076056477410142974892786,-50782894196661245482399970076056477410142974892651⟩⟩, + ⟨⟨-103689653187143874330395332198956376577820908064108,-103689653187143874330395332198956376577820908063580⟩,⟨206945037284789903770650915985621539144041189565968,206945037284789903770650915985621539144041189566496⟩⟩, + ⟨⟨183077880398062680710652098094987683709329265738085,183077880398062680710652098094987683709329265739153⟩,⟨-628633010326596574678359656920785213760091561629263,-628633010326596574678359656920785213760091561628197⟩⟩, + ⟨⟨128653486236744227287534619550655395621123116443628,128653486236744227287534619550655395621123116445227⟩,⟨1376431250336253166489210456083844297189485960985951,1376431250336253166489210456083844297189485960987556⟩⟩] +lemma tw0_1_4_19_calc (j : Fin 31) : taylorWaveBox 0 1 4 19 j = tw0_1_4_19 j := by + revert j + decide +kernel +def tw0_1_4_20 : Fin 31 → CI := ![⟨⟨265571344178588938675458335223523812802708315384658,265571344178588938675458335223523812802708315385011⟩,⟨68370935691605117260311514475591564157796141598228,68370935691605117260311514475591564157796141598581⟩⟩, + ⟨⟨-136759348573404115331611428120058455695239249394455,-136759348573404115331611428120058455695239249394229⟩,⟨11669641348191597643057792172307348235926635017373,11669641348191597643057792172307348235926635017599⟩⟩, + ⟨⟨50159238275175935649799500578288142914291855021418,50159238275175935649799500578288142914291855021551⟩,⟨-11399858197397682362204880422428264345312458089293,-11399858197397682362204880422428264345312458089159⟩⟩, + ⟨⟨-13150492376086900881537974368071114583467108517448,-13150492376086900881537974368071114583467108517414⟩,⟨2142363000525363797548877449602277148631451020236,2142363000525363797548877449602277148631451020270⟩⟩, + ⟨⟨2145049640696710267456971802775303764327113211632,2145049640696710267456971802775303764327113211641⟩,⟨192110510190881443450801965670644352857184070837,192110510190881443450801965670644352857184070846⟩⟩, + ⟨⟨-168015358983764081612305501697531677926831762887,-168015358983764081612305501697531677926831762885⟩,⟨-90577047233378805462441151850996953492275813600,-90577047233378805462441151850996953492275813598⟩⟩, + ⟨⟨4399107088421146135895686801222089382952973851,4399107088421146135895686801222089382952973852⟩,⟨6563351143980815345391991633907439863645253531,6563351143980815345391991633907439863645253532⟩⟩, + ⟨⟨-20266478025722627671934956794991983597903525,-20266478025722627671934956794991983597903524⟩,⟨-124511167049749863398791414551761607665336943,-124511167049749863398791414551761607665336942⟩⟩, + ⟨⟨17246555078271886314278225086612080735723,17246555078271886314278225086612080735724⟩,⟨628582761937215630340230412788470346700647,628582761937215630340230412788470346700648⟩⟩, + ⟨⟨-439047991968144351242659954181647328868,-439047991968144351242659954181647328866⟩,⟨-673953709258648961699933805711885097048,-673953709258648961699933805711885097046⟩⟩, + ⟨⟨161144137693077508168480775563207205,161144137693077508168480775563207213⟩,⟨-176557707218852144008538519305180408,-176557707218852144008538519305180400⟩⟩, + ⟨⟨-531637132127455293717100036194,-531637132127455293717100036168⟩,⟨-19184307525920414906402093285962,-19184307525920414906402093285938⟩⟩, + ⟨⟨484056134076250879381315362,484056134076250879381315494⟩,⟨611044822834188875401185606,611044822834188875401185716⟩⟩, + ⟨⟨55749142257018866207623,55749142257018866208096⟩,⟨-19778014694990069864716,-19778014694990069864243⟩⟩, + ⟨⟨29699907632681095019,29699907632681096284⟩,⟨47669997430030963803,47669997430030965068⟩⟩, + ⟨⟨4242923995365940664,4242923995365942333⟩,⟨-835,954⟩⟩, + ⟨⟨29699907632681095019,29699907632681096284⟩,⟨-47669997430030965068,-47669997430030963803⟩⟩, + ⟨⟨55749142257018866207623,55749142257018866208096⟩,⟨19778014694990069864243,19778014694990069864716⟩⟩, + ⟨⟨484056134076250879381315362,484056134076250879381315494⟩,⟨-611044822834188875401185716,-611044822834188875401185606⟩⟩, + ⟨⟨-531637132127455293717100036194,-531637132127455293717100036168⟩,⟨19184307525920414906402093285938,19184307525920414906402093285962⟩⟩, + ⟨⟨161144137693077508168480775563207205,161144137693077508168480775563207213⟩,⟨176557707218852144008538519305180400,176557707218852144008538519305180408⟩⟩, + ⟨⟨-439047991968144351242659954181647328868,-439047991968144351242659954181647328866⟩,⟨673953709258648961699933805711885097046,673953709258648961699933805711885097048⟩⟩, + ⟨⟨17246555078271886314278225086612080735723,17246555078271886314278225086612080735724⟩,⟨-628582761937215630340230412788470346700648,-628582761937215630340230412788470346700647⟩⟩, + ⟨⟨-20266478025722627671934956794991983597903525,-20266478025722627671934956794991983597903524⟩,⟨124511167049749863398791414551761607665336942,124511167049749863398791414551761607665336943⟩⟩, + ⟨⟨4399107088421146135895686801222089382952973851,4399107088421146135895686801222089382952973852⟩,⟨-6563351143980815345391991633907439863645253532,-6563351143980815345391991633907439863645253531⟩⟩, + ⟨⟨-168015358983764081612305501697531677926831762887,-168015358983764081612305501697531677926831762885⟩,⟨90577047233378805462441151850996953492275813598,90577047233378805462441151850996953492275813600⟩⟩, + ⟨⟨2145049640696710267456971802775303764327113211632,2145049640696710267456971802775303764327113211641⟩,⟨-192110510190881443450801965670644352857184070846,-192110510190881443450801965670644352857184070837⟩⟩, + ⟨⟨-13150492376086900881537974368071114583467108517448,-13150492376086900881537974368071114583467108517414⟩,⟨-2142363000525363797548877449602277148631451020270,-2142363000525363797548877449602277148631451020236⟩⟩, + ⟨⟨50159238275175935649799500578288142914291855021418,50159238275175935649799500578288142914291855021551⟩,⟨11399858197397682362204880422428264345312458089159,11399858197397682362204880422428264345312458089293⟩⟩, + ⟨⟨-136759348573404115331611428120058455695239249394455,-136759348573404115331611428120058455695239249394229⟩,⟨-11669641348191597643057792172307348235926635017599,-11669641348191597643057792172307348235926635017373⟩⟩, + ⟨⟨265571344178588938675458335223523812802708315384658,265571344178588938675458335223523812802708315385011⟩,⟨-68370935691605117260311514475591564157796141598581,-68370935691605117260311514475591564157796141598228⟩⟩] +lemma tw0_1_4_20_calc (j : Fin 31) : taylorWaveBox 0 1 4 20 j = tw0_1_4_20 j := by + revert j + decide +kernel +def tw0_1_4 : Fin 21 → Fin 31 → CI := ![tw0_1_4_0,tw0_1_4_1,tw0_1_4_2,tw0_1_4_3,tw0_1_4_4,tw0_1_4_5,tw0_1_4_6,tw0_1_4_7,tw0_1_4_8,tw0_1_4_9,tw0_1_4_10,tw0_1_4_11,tw0_1_4_12,tw0_1_4_13,tw0_1_4_14,tw0_1_4_15,tw0_1_4_16,tw0_1_4_17,tw0_1_4_18,tw0_1_4_19,tw0_1_4_20] +lemma tw0_1_4_mem (l : Fin 21) (j : Fin 31) : (tw0_1_4 l j).Mem (taylorWave 0 1 (nearNode 4) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 4 l j = tw0_1_4 l j := by + fin_cases l + · exact tw0_1_4_0_calc j + · exact tw0_1_4_1_calc j + · exact tw0_1_4_2_calc j + · exact tw0_1_4_3_calc j + · exact tw0_1_4_4_calc j + · exact tw0_1_4_5_calc j + · exact tw0_1_4_6_calc j + · exact tw0_1_4_7_calc j + · exact tw0_1_4_8_calc j + · exact tw0_1_4_9_calc j + · exact tw0_1_4_10_calc j + · exact tw0_1_4_11_calc j + · exact tw0_1_4_12_calc j + · exact tw0_1_4_13_calc j + · exact tw0_1_4_14_calc j + · exact tw0_1_4_15_calc j + · exact tw0_1_4_16_calc j + · exact tw0_1_4_17_calc j + · exact tw0_1_4_18_calc j + · exact tw0_1_4_19_calc j + · exact tw0_1_4_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 4 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave015.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave015.lean new file mode 100644 index 0000000000000000000000000000000000000000..84ce578ccda7826d02bf3ffcf9b6fea03d9ab54a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave015.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_5_0 : Fin 31 → CI := ![⟨⟨-2591591490397046051507367302564580216155331405917701268338,-2591591490397046051507367302564580216155331405914537166519⟩,⟨-1695278309900784434684402514131589427799124328079921518138,-1695278309900784434684402514131589427799124328076767062846⟩⟩, + ⟨⟨265686764066921433639911420011427201752308448776695134557,265686764066921433639911420011427201752308448777141074646⟩,⟨23801725981328031823615070308552504909865800814708378902,23801725981328031823615070308552504909865800815153630218⟩⟩, + ⟨⟨-13969790086154358497354710788874893100822688980898539942,-13969790086154358497354710788874893100822688980874598946⟩,⟨3203821750642643052701022446478729806329481036085856694,3203821750642643052701022446478729806329481036109791968⟩⟩, + ⟨⟨399090784570215891801283034817880413210501682467352208,399090784570215891801283034817880413210501682468332985⟩,⟨-159014693455395468152202693830399598701974678318059774,-159014693455395468152202693830399598701974678317078704⟩⟩, + ⟨⟨-5731882847577500213029926478825077761517914296615614,-5731882847577500213029926478825077761517914296606391⟩,⟨2472322903058161082514974603947346600781982782515710,2472322903058161082514974603947346600781982782524939⟩⟩, + ⟨⟨34273008881438468618457629891208788354147339699040,34273008881438468618457629891208788354147339699355⟩,⟨-13709538541175858657889177145070446325267700198191,-13709538541175858657889177145070446325267700197876⟩⟩, + ⟨⟨-65297275773653080887763663442079021962121158444,-65297275773653080887763663442079021962121158229⟩,⟨29780686979562586669801447863757801450945747979,29780686979562586669801447863757801450945748198⟩⟩, + ⟨⟨25653956640011999426060250301742194814946378,25653956640011999426060250301742194814946647⟩,⟨-24905448123219976156386883413545363144749459,-24905448123219976156386883413545363144749208⟩⟩, + ⟨⟨699709912952817292509034247702763099667,699709912952817292509034247702763099979⟩,⟨3424364875452738228852331470852777129281,3424364875452738228852331470852777129577⟩⟩, + ⟨⟨-34533817353554166393844165552409839,-34533817353554166393844165552409495⟩,⟨40389161089977241544538626652966933,40389161089977241544538626652967305⟩⟩, + ⟨⟨51472224949480422069868085249,51472224949480422069868085612⟩,⟨103747063989139644245501414762,103747063989139644245501415161⟩⟩, + ⟨⟨-47596888840353004441372,-47596888840353004440829⟩,⟨6191796802580580239007,6191796802580580239520⟩⟩, + ⟨⟨8978826971845145,8978826971845826⟩,⟨4021835724282988,4021835724283653⟩⟩, + ⟨⟨1520118675,1520119483⟩,⟨-6473031207,-6473030399⟩⟩, + ⟨⟨-116291,-115496⟩,⟨-189216,-188421⟩⟩, + ⟨⟨4430,5256⟩,⟨-444,508⟩⟩, + ⟨⟨-116291,-115496⟩,⟨188422,189216⟩⟩, + ⟨⟨1520118675,1520119483⟩,⟨6473030400,6473031208⟩⟩, + ⟨⟨8978826971845145,8978826971845826⟩,⟨-4021835724283652,-4021835724282988⟩⟩, + ⟨⟨-47596888840353004441372,-47596888840353004440829⟩,⟨-6191796802580580239520,-6191796802580580239007⟩⟩, + ⟨⟨51472224949480422069868085249,51472224949480422069868085612⟩,⟨-103747063989139644245501415161,-103747063989139644245501414761⟩⟩, + ⟨⟨-34533817353554166393844165552409839,-34533817353554166393844165552409495⟩,⟨-40389161089977241544538626652967304,-40389161089977241544538626652966933⟩⟩, + ⟨⟨699709912952817292509034247702763099667,699709912952817292509034247702763099979⟩,⟨-3424364875452738228852331470852777129576,-3424364875452738228852331470852777129280⟩⟩, + ⟨⟨25653956640011999426060250301742194814946378,25653956640011999426060250301742194814946647⟩,⟨24905448123219976156386883413545363144749208,24905448123219976156386883413545363144749460⟩⟩, + ⟨⟨-65297275773653080887763663442079021962121158444,-65297275773653080887763663442079021962121158229⟩,⟨-29780686979562586669801447863757801450945748197,-29780686979562586669801447863757801450945747979⟩⟩, + ⟨⟨34273008881438468618457629891208788354147339699040,34273008881438468618457629891208788354147339699355⟩,⟨13709538541175858657889177145070446325267700197877,13709538541175858657889177145070446325267700198191⟩⟩, + ⟨⟨-5731882847577500213029926478825077761517914296615614,-5731882847577500213029926478825077761517914296606391⟩,⟨-2472322903058161082514974603947346600781982782524938,-2472322903058161082514974603947346600781982782515710⟩⟩, + ⟨⟨399090784570215891801283034817880413210501682467352208,399090784570215891801283034817880413210501682468332985⟩,⟨159014693455395468152202693830399598701974678317078705,159014693455395468152202693830399598701974678318059775⟩⟩, + ⟨⟨-13969790086154358497354710788874893100822688980898539942,-13969790086154358497354710788874893100822688980874598946⟩,⟨-3203821750642643052701022446478729806329481036109791967,-3203821750642643052701022446478729806329481036085856694⟩⟩, + ⟨⟨265686764066921433639911420011427201752308448776695134557,265686764066921433639911420011427201752308448777141074646⟩,⟨-23801725981328031823615070308552504909865800815153630217,-23801725981328031823615070308552504909865800814708378901⟩⟩, + ⟨⟨-2591591490397046051507367302564580216155331405917701268371,-2591591490397046051507367302564580216155331405914537166492⟩,⟨1695278309900784434684402514131589427799124328076767062792,1695278309900784434684402514131589427799124328079921518144⟩⟩] +lemma tw0_1_5_0_calc (j : Fin 31) : taylorWaveBox 0 1 5 0 j = tw0_1_5_0 j := by + revert j + decide +kernel +def tw0_1_5_1 : Fin 31 → CI := ![⟨⟨3031191230550447133201004061218279437956964097644558429426,3031191230550447133201004061218279437956964097649469586491⟩,⟨-3332652883888545385307693707514191865546896726163036014165,-3332652883888545385307693707514191865546896726158107868984⟩⟩, + ⟨⟨-116325324027122995127578914629411250345515479819233540847,-116325324027122995127578914629411250345515479818505727499⟩,⟨393231104628671397275299784699154205489645185365210944111,393231104628671397275299784699154205489645185365939939284⟩⟩, + ⟨⟨363622696956841605252898350829465069382240713963185586,363622696956841605252898350829465069382240714004090033⟩,⟨-23354169472350531346730805714516714372832261666074650970,-23354169472350531346730805714516714372832261666033737444⟩⟩, + ⟨⟨68096385371810101969744114366116657133557537725873132,68096385371810101969744114366116657133557537727610620⟩,⟨741497686846836105245680025730814588037534789939885942,741497686846836105245680025730814588037534789941622968⟩⟩, + ⟨⟨-790393069770505556670524503267785540902702945796981,-790393069770505556670524503267785540902702945780201⟩,⟨-11520219302500939200376743257699172056252599202149718,-11520219302500939200376743257699172056252599202132946⟩⟩, + ⟨⟨-1081816802750642546592906764501372888440886225331,-1081816802750642546592906764501372888440886224749⟩,⟨73126033756135463024070463062367901135390915759662,73126033756135463024070463062367901135390915760225⟩⟩, + ⟨⟨4671508738393093395582229713251033659711578332,4671508738393093395582229713251033659711578733⟩,⟨-152755178735222389373812959260811473208797546613,-152755178735222389373812959260811473208797546245⟩⟩, + ⟨⟨19598241241525418838987440522883830897476169,19598241241525418838987440522883830897476561⟩,⟨79731897783511685140037377869195113367377490,79731897783511685140037377869195113367377989⟩⟩, + ⟨⟨-7964099188837391397559063656307568881940,-7964099188837391397559063656307568881246⟩,⟨-3449240703249604549031062042708458748373,-3449240703249604549031062042708458747630⟩⟩, + ⟨⟨-22898347799221889265336254381763825,-22898347799221889265336254381762668⟩,⟨-141089203014183407390997579723309431,-141089203014183407390997579723308305⟩⟩, + ⟨⟨-317187143631489923813534742195,-317187143631489923813534740708⟩,⟨-115002278350009437014668845898,-115002278350009437014668844400⟩⟩, + ⟨⟨108366113707171898308468,108366113707171898310218⟩,⟨-105126838647526760586207,-105126838647526760584540⟩⟩, + ⟨⟨-33060045245580048,-33060045245578227⟩,⟨2688668600378926,2688668600380587⟩⟩, + ⟨⟨2749849596,2749852392⟩,⟨23556041763,23556044558⟩⟩, + ⟨⟨544141,547268⟩,⟨610712,613839⟩⟩, + ⟨⟨-19707,-16619⟩,⟨-1900,1663⟩⟩, + ⟨⟨544141,547268⟩,⟨-613839,-610712⟩⟩, + ⟨⟨2749849596,2749852392⟩,⟨-23556044558,-23556041762⟩⟩, + ⟨⟨-33060045245580048,-33060045245578227⟩,⟨-2688668600380587,-2688668600378926⟩⟩, + ⟨⟨108366113707171898308468,108366113707171898310218⟩,⟨105126838647526760584540,105126838647526760586207⟩⟩, + ⟨⟨-317187143631489923813534742195,-317187143631489923813534740708⟩,⟨115002278350009437014668844400,115002278350009437014668845898⟩⟩, + ⟨⟨-22898347799221889265336254381763825,-22898347799221889265336254381762668⟩,⟨141089203014183407390997579723308305,141089203014183407390997579723309431⟩⟩, + ⟨⟨-7964099188837391397559063656307568881940,-7964099188837391397559063656307568881246⟩,⟨3449240703249604549031062042708458747631,3449240703249604549031062042708458748373⟩⟩, + ⟨⟨19598241241525418838987440522883830897476169,19598241241525418838987440522883830897476561⟩,⟨-79731897783511685140037377869195113367377988,-79731897783511685140037377869195113367377490⟩⟩, + ⟨⟨4671508738393093395582229713251033659711578332,4671508738393093395582229713251033659711578733⟩,⟨152755178735222389373812959260811473208797546245,152755178735222389373812959260811473208797546613⟩⟩, + ⟨⟨-1081816802750642546592906764501372888440886225331,-1081816802750642546592906764501372888440886224749⟩,⟨-73126033756135463024070463062367901135390915760225,-73126033756135463024070463062367901135390915759662⟩⟩, + ⟨⟨-790393069770505556670524503267785540902702945796981,-790393069770505556670524503267785540902702945780201⟩,⟨11520219302500939200376743257699172056252599202132946,11520219302500939200376743257699172056252599202149718⟩⟩, + ⟨⟨68096385371810101969744114366116657133557537725873132,68096385371810101969744114366116657133557537727610620⟩,⟨-741497686846836105245680025730814588037534789941622968,-741497686846836105245680025730814588037534789939885941⟩⟩, + ⟨⟨363622696956841605252898350829465069382240713963185586,363622696956841605252898350829465069382240714004090033⟩,⟨23354169472350531346730805714516714372832261666033737444,23354169472350531346730805714516714372832261666074650970⟩⟩, + ⟨⟨-116325324027122995127578914629411250345515479819233540847,-116325324027122995127578914629411250345515479818505727499⟩,⟨-393231104628671397275299784699154205489645185365939939284,-393231104628671397275299784699154205489645185365210944110⟩⟩, + ⟨⟨3031191230550447133201004061218279437956964097644558429345,3031191230550447133201004061218279437956964097649469586504⟩,⟨3332652883888545385307693707514191865546896726158107868947,3332652883888545385307693707514191865546896726163036014221⟩⟩] +lemma tw0_1_5_1_calc (j : Fin 31) : taylorWaveBox 0 1 5 1 j = tw0_1_5_1 j := by + revert j + decide +kernel +def tw0_1_5_2 : Fin 31 → CI := ![⟨⟨3067386989348103492107111684264554480854934635092286626520,3067386989348103492107111684264554480854934635097886587170⟩,⟨3840415320058368592785470705892256269136205361614551073137,3840415320058368592785470705892256269136205361620131736816⟩⟩, + ⟨⟨-418085186788217172385279708139838933481152730510085007119,-418085186788217172385279708139838933481152730509226813934⟩,⟨-220797429064433882031009361759598433303004515182085286225,-220797429064433882031009361759598433303004515181228358516⟩⟩, + ⟨⟨27613380482616435995225207928179543642742999550713913801,27613380482616435995225207928179543642742999550763402373⟩,⟨7244669211770728924414013827612812046798774098024229551,7244669211770728924414013827612812046798774098073709846⟩⟩, + ⟨⟨-949432929685033741836159586977345996394252214909770694,-949432929685033741836159586977345996394252214907647510⟩,⟨-188513042208182565171680141886034710320371274923504876,-188513042208182565171680141886034710320371274921381328⟩⟩, + ⟨⟨15439120201737629466186303621398676694529814615444678,15439120201737629466186303621398676694529814615464956⟩,⟨4276472300857283983584878246042162302906919320299625,4276472300857283983584878246042162302906919320319906⟩⟩, + ⟨⟨-99661002518528575715497189369601641068087960372331,-99661002518528575715497189369601641068087960371696⟩,⟨-43327675672446339464647840337563450029250912781148,-43327675672446339464647840337563450029250912780462⟩⟩, + ⟨⟨215468319956450584333400930615743489564969014629,215468319956450584333400930615743489564969015244⟩,⟨114663134569863618238519844594425184790513583252,114663134569863618238519844594425184790513583916⟩⟩, + ⟨⟨-135560134487333784595739589497241706753633954,-135560134487333784595739589497241706753632890⟩,⟨-40238566721989679501199254652517058651430104,-40238566721989679501199254652517058651429103⟩⟩, + ⟨⟨13764332518342620007077025677874184400602,13764332518342620007077025677874184402133⟩,⟨-8473446023597449381370877594265383890984,-8473446023597449381370877594265383889439⟩⟩, + ⟨⟨247081190015703844728948216848562828,247081190015703844728948216848565018⟩,⟨148646686559212038928560149508992084,148646686559212038928560149508994164⟩⟩, + ⟨⟨674720935380192080392010424788,674720935380192080392010427411⟩,⟨-296945581840943676930239158678,-296945581840943676930239156275⟩⟩, + ⟨⟨-56643024903793635025723,-56643024903793635021426⟩,⟨351652360755816173288604,351652360755816173292998⟩⟩, + ⟨⟨69996246956553843,69996246956559458⟩,⟨-46202545860929911,-46202545860924506⟩⟩, + ⟨⟨-28340118252,-28340111884⟩,⟨-56760704345,-56760697977⟩⟩, + ⟨⟨-1795929,-1786989⟩,⟨-1410241,-1401301⟩⟩, + ⟨⟨46749,55432⟩,⟨-4676,5343⟩⟩, + ⟨⟨-1795929,-1786989⟩,⟨1401301,1410241⟩⟩, + ⟨⟨-28340118252,-28340111884⟩,⟨56760697977,56760704345⟩⟩, + ⟨⟨69996246956553843,69996246956559458⟩,⟨46202545860924506,46202545860929911⟩⟩, + ⟨⟨-56643024903793635025723,-56643024903793635021426⟩,⟨-351652360755816173292998,-351652360755816173288604⟩⟩, + ⟨⟨674720935380192080392010424788,674720935380192080392010427411⟩,⟨296945581840943676930239156276,296945581840943676930239158678⟩⟩, + ⟨⟨247081190015703844728948216848562828,247081190015703844728948216848565018⟩,⟨-148646686559212038928560149508994164,-148646686559212038928560149508992084⟩⟩, + ⟨⟨13764332518342620007077025677874184400602,13764332518342620007077025677874184402133⟩,⟨8473446023597449381370877594265383889439,8473446023597449381370877594265383890984⟩⟩, + ⟨⟨-135560134487333784595739589497241706753633954,-135560134487333784595739589497241706753632890⟩,⟨40238566721989679501199254652517058651429103,40238566721989679501199254652517058651430104⟩⟩, + ⟨⟨215468319956450584333400930615743489564969014629,215468319956450584333400930615743489564969015244⟩,⟨-114663134569863618238519844594425184790513583916,-114663134569863618238519844594425184790513583252⟩⟩, + ⟨⟨-99661002518528575715497189369601641068087960372331,-99661002518528575715497189369601641068087960371696⟩,⟨43327675672446339464647840337563450029250912780462,43327675672446339464647840337563450029250912781148⟩⟩, + ⟨⟨15439120201737629466186303621398676694529814615444678,15439120201737629466186303621398676694529814615464956⟩,⟨-4276472300857283983584878246042162302906919320319906,-4276472300857283983584878246042162302906919320299625⟩⟩, + ⟨⟨-949432929685033741836159586977345996394252214909770694,-949432929685033741836159586977345996394252214907647510⟩,⟨188513042208182565171680141886034710320371274921381328,188513042208182565171680141886034710320371274923504876⟩⟩, + ⟨⟨27613380482616435995225207928179543642742999550713913801,27613380482616435995225207928179543642742999550763402373⟩,⟨-7244669211770728924414013827612812046798774098073709846,-7244669211770728924414013827612812046798774098024229551⟩⟩, + ⟨⟨-418085186788217172385279708139838933481152730510085007119,-418085186788217172385279708139838933481152730509226813934⟩,⟨220797429064433882031009361759598433303004515181228358516,220797429064433882031009361759598433303004515182085286225⟩⟩, + ⟨⟨3067386989348103492107111684264554480854934635092286626484,3067386989348103492107111684264554480854934635097886587239⟩,⟨-3840415320058368592785470705892256269136205361620131736834,-3840415320058368592785470705892256269136205361614551073049⟩⟩] +lemma tw0_1_5_2_calc (j : Fin 31) : taylorWaveBox 0 1 5 2 j = tw0_1_5_2 j := by + revert j + decide +kernel +def tw0_1_5_3 : Fin 31 → CI := ![⟨⟨-3733149203442353612100713135366157892149030512799280153916,-3733149203442353612100713135366157892149030512794332328640⟩,⟨2113615747793799378896422645367005212327213141690069093017,2113615747793799378896422645367005212327213141695032558433⟩⟩, + ⟨⟨275628650142356759308946794123011952572951812336190889948,275628650142356759308946794123011952572951812336967456781⟩,⟨-337963008162040708818399172583517975018646528804987643011,-337963008162040708818399172583517975018646528804210178336⟩⟩, + ⟨⟨-13323546916333498315174836856060398836993474963796976849,-13323546916333498315174836856060398836993474963751830710⟩,⟨24529049705354509343131720787369246189251505302343298762,24529049705354509343131720787369246189251505302388448426⟩⟩, + ⟨⟨468049349985692410128318673213752650014806011595518723,468049349985692410128318673213752650014806011597408215⟩,⟨-891218030106989742272801945148760276240856474696818726,-891218030106989742272801945148760276240856474694929246⟩⟩, + ⟨⟨-10170633574587686573737978258644743466309301256350036,-10170633574587686573737978258644743466309301256328790⟩,⟨14585119528233015626598986099820663873100243778141576,14585119528233015626598986099820663873100243778162830⟩⟩, + ⟨⟨93155667082078714375070758284015246719417716774803,93155667082078714375070758284015246719417716775839⟩,⟨-89500269395219054740237496749364686886980024141790,-89500269395219054740237496749364686886980024140786⟩⟩, + ⟨⟨-253213549212640628127193086828726472739684917893,-253213549212640628127193086828726472739684916950⟩,⟨182030223252848757709383239779913721872415493687,182030223252848757709383239779913721872415494622⟩⟩, + ⟨⟨142198814401732227291014711057688379054321004,142198814401732227291014711057688379054322459⟩,⟨-133184834107876359538718240141343775236399877,-133184834107876359538718240141343775236398528⟩⟩, + ⟨⟨-1406799445773976773882494347394832170529,-1406799445773976773882494347394832168677⟩,⟨24040699544534408751450965231857965920661,24040699544534408751450965231857965922341⟩⟩, + ⟨⟨-440743365480229305352604194766103620,-440743365480229305352604194766100194⟩,⟨149340461952648226956507474207838075,149340461952648226956507474207841663⟩⟩, + ⟨⟨-494391807362430925742590042911,-494391807362430925742590037205⟩,⟨1189912116556439522566212944840,1189912116556439522566212950477⟩⟩, + ⟨⟨-311116756249723402962741,-311116756249723402956747⟩,⟨-595911067676906105974041,-595911067676906105967464⟩⟩, + ⟨⟨-79109374844869451,-79109374844857839⟩,⟨150081730595549949,150081730595561754⟩⟩, + ⟨⟨98332699980,98332713418⟩,⟨93618957029,93618970467⟩⟩, + ⟨⟨4458009,4477818⟩,⟨2361010,2380819⟩⟩, + ⟨⟨-124742,-105204⟩,⟨-12024,10521⟩⟩, + ⟨⟨4458009,4477818⟩,⟨-2380819,-2361010⟩⟩, + ⟨⟨98332699980,98332713418⟩,⟨-93618970467,-93618957029⟩⟩, + ⟨⟨-79109374844869451,-79109374844857839⟩,⟨-150081730595561754,-150081730595549949⟩⟩, + ⟨⟨-311116756249723402962741,-311116756249723402956747⟩,⟨595911067676906105967464,595911067676906105974041⟩⟩, + ⟨⟨-494391807362430925742590042911,-494391807362430925742590037205⟩,⟨-1189912116556439522566212950477,-1189912116556439522566212944840⟩⟩, + ⟨⟨-440743365480229305352604194766103620,-440743365480229305352604194766100194⟩,⟨-149340461952648226956507474207841663,-149340461952648226956507474207838075⟩⟩, + ⟨⟨-1406799445773976773882494347394832170529,-1406799445773976773882494347394832168677⟩,⟨-24040699544534408751450965231857965922341,-24040699544534408751450965231857965920661⟩⟩, + ⟨⟨142198814401732227291014711057688379054321004,142198814401732227291014711057688379054322459⟩,⟨133184834107876359538718240141343775236398528,133184834107876359538718240141343775236399877⟩⟩, + ⟨⟨-253213549212640628127193086828726472739684917893,-253213549212640628127193086828726472739684916950⟩,⟨-182030223252848757709383239779913721872415494622,-182030223252848757709383239779913721872415493687⟩⟩, + ⟨⟨93155667082078714375070758284015246719417716774803,93155667082078714375070758284015246719417716775839⟩,⟨89500269395219054740237496749364686886980024140786,89500269395219054740237496749364686886980024141790⟩⟩, + ⟨⟨-10170633574587686573737978258644743466309301256350036,-10170633574587686573737978258644743466309301256328790⟩,⟨-14585119528233015626598986099820663873100243778162830,-14585119528233015626598986099820663873100243778141576⟩⟩, + ⟨⟨468049349985692410128318673213752650014806011595518723,468049349985692410128318673213752650014806011597408215⟩,⟨891218030106989742272801945148760276240856474694929246,891218030106989742272801945148760276240856474696818726⟩⟩, + ⟨⟨-13323546916333498315174836856060398836993474963796976849,-13323546916333498315174836856060398836993474963751830710⟩,⟨-24529049705354509343131720787369246189251505302388448426,-24529049705354509343131720787369246189251505302343298762⟩⟩, + ⟨⟨275628650142356759308946794123011952572951812336190889948,275628650142356759308946794123011952572951812336967456781⟩,⟨337963008162040708818399172583517975018646528804210178336,337963008162040708818399172583517975018646528804987643011⟩⟩, + ⟨⟨-3733149203442353612100713135366157892149030512799280153935,-3733149203442353612100713135366157892149030512794332328566⟩,⟨-2113615747793799378896422645367005212327213141695032558498,-2113615747793799378896422645367005212327213141690069092989⟩⟩] +lemma tw0_1_5_3_calc (j : Fin 31) : taylorWaveBox 0 1 5 3 j = tw0_1_5_3 j := by + revert j + decide +kernel +def tw0_1_5_4 : Fin 31 → CI := ![⟨⟨-1088680964991095635329618809045315529210957990367605827629,-1088680964991095635329618809045315529210957990364028050470⟩,⟨-2924231998323093573655219722651084072787738857265506799668,-2924231998323093573655219722651084072787738857261938366133⟩⟩, + ⟨⟨212954833450284580030521167819312582829627291356150056529,212954833450284580030521167819312582829627291356713946264⟩,⟨258880095693069328591984799445077719673596566722689507002,258880095693069328591984799445077719673596566723253021471⟩⟩, + ⟨⟨-16818056759960259741531861706319259379324214565190291240,-16818056759960259741531861706319259379324214565158205894⟩,⟨-15313179415299994061828450924098098131087313737312087711,-15313179415299994061828450924098098131087313737280000546⟩⟩, + ⟨⟨625590206895096775538161389419954660389626272744958903,625590206895096775538161389419954660389626272746631629⟩,⟨608038161536325468802218309686849093719004809672117037,608038161536325468802218309686849093719004809673789394⟩⟩, + ⟨⟨-9597821654834586674906497612150971285997782096856897,-9597821654834586674906497612150971285997782096833170⟩,⟨-13354929304414712210073616719350726580830678231475544,-13354929304414712210073616719350726580830678231451834⟩⟩, + ⟨⟨46286034491528025275020758993516375128140296574696,46286034491528025275020758993516375128140296575785⟩,⟨119307407860687071034234906619177021329095463006008,119307407860687071034234906619177021329095463007097⟩⟩, + ⟨⟨-54477755666537199792738926786613348424019029283,-54477755666537199792738926786613348424019028332⟩,⟨-327538983959435235444759461288826974159532122497,-327538983959435235444759461288826974159532121597⟩⟩, + ⟨⟨49495370568116039844585798119181190413137887,49495370568116039844585798119181190413138974⟩,⟨218153514316905967855150005402632944579343004,218153514316905967855150005402632944579344377⟩⟩, + ⟨⟨-23459658964226840789822099955762246574703,-23459658964226840789822099955762246571993⟩,⟨-18537154510336264959983953566764977555634,-18537154510336264959983953566764977552836⟩⟩, + ⟨⟨229699719877568742329476790936851777,229699719877568742329476790936856640⟩,⟨-582178939885608105146241696489170935,-582178939885608105146241696489165917⟩⟩, + ⟨⟨-676324135437602292998184749193,-676324135437602292998184742824⟩,⟨-1750802055306426456103099655947,-1750802055306426456103099649050⟩⟩, + ⟨⟨952586303594751044432472,952586303594751044445549⟩,⟨458709468264348896329103,458709468264348896342293⟩⟩, + ⟨⟨-4911920733378480,-4911920733363310⟩,⟨-285944803018575623,-285944803018559168⟩⟩, + ⟨⟨-221680056388,-221680028012⟩,⟨-97398896920,-97398868543⟩⟩, + ⟨⟨-8932625,-8897198⟩,⟨-2877250,-2841823⟩⟩, + ⟨⟨197289,233930⟩,⟨-19729,22548⟩⟩, + ⟨⟨-8932625,-8897198⟩,⟨2841823,2877250⟩⟩, + ⟨⟨-221680056388,-221680028012⟩,⟨97398868543,97398896920⟩⟩, + ⟨⟨-4911920733378480,-4911920733363310⟩,⟨285944803018559168,285944803018575623⟩⟩, + ⟨⟨952586303594751044432472,952586303594751044445549⟩,⟨-458709468264348896342293,-458709468264348896329103⟩⟩, + ⟨⟨-676324135437602292998184749193,-676324135437602292998184742824⟩,⟨1750802055306426456103099649050,1750802055306426456103099655947⟩⟩, + ⟨⟨229699719877568742329476790936851777,229699719877568742329476790936856640⟩,⟨582178939885608105146241696489165917,582178939885608105146241696489170935⟩⟩, + ⟨⟨-23459658964226840789822099955762246574703,-23459658964226840789822099955762246571993⟩,⟨18537154510336264959983953566764977552836,18537154510336264959983953566764977555634⟩⟩, + ⟨⟨49495370568116039844585798119181190413137887,49495370568116039844585798119181190413138974⟩,⟨-218153514316905967855150005402632944579344377,-218153514316905967855150005402632944579343004⟩⟩, + ⟨⟨-54477755666537199792738926786613348424019029283,-54477755666537199792738926786613348424019028332⟩,⟨327538983959435235444759461288826974159532121597,327538983959435235444759461288826974159532122497⟩⟩, + ⟨⟨46286034491528025275020758993516375128140296574696,46286034491528025275020758993516375128140296575785⟩,⟨-119307407860687071034234906619177021329095463007097,-119307407860687071034234906619177021329095463006008⟩⟩, + ⟨⟨-9597821654834586674906497612150971285997782096856897,-9597821654834586674906497612150971285997782096833170⟩,⟨13354929304414712210073616719350726580830678231451834,13354929304414712210073616719350726580830678231475544⟩⟩, + ⟨⟨625590206895096775538161389419954660389626272744958903,625590206895096775538161389419954660389626272746631629⟩,⟨-608038161536325468802218309686849093719004809673789394,-608038161536325468802218309686849093719004809672117037⟩⟩, + ⟨⟨-16818056759960259741531861706319259379324214565190291240,-16818056759960259741531861706319259379324214565158205894⟩,⟨15313179415299994061828450924098098131087313737280000546,15313179415299994061828450924098098131087313737312087711⟩⟩, + ⟨⟨212954833450284580030521167819312582829627291356150056529,212954833450284580030521167819312582829627291356713946264⟩,⟨-258880095693069328591984799445077719673596566723253021471,-258880095693069328591984799445077719673596566722689507002⟩⟩, + ⟨⟨-1088680964991095635329618809045315529210957990367605827679,-1088680964991095635329618809045315529210957990364028050453⟩,⟨2924231998323093573655219722651084072787738857261938366082,2924231998323093573655219722651084072787738857265506799683⟩⟩] +lemma tw0_1_5_4_calc (j : Fin 31) : taylorWaveBox 0 1 5 4 j = tw0_1_5_4 j := by + revert j + decide +kernel +def tw0_1_5_5 : Fin 31 → CI := ![⟨⟨1907480838810190369960275853676986246532095494179368390589,1907480838810190369960275853676986246532095494181521138523⟩,⟨-381940946787701979228728787405308659232755914783742087324,-381940946787701979228728787405308659232755914781585378196⟩⟩, + ⟨⟨-194855883647669691120319040531636240325428946687876325807,-194855883647669691120319040531636240325428946687541122598⟩,⟨103959049700627233724007826360820855233417727405495766242,103959049700627233724007826360820855233417727405830957889⟩⟩, + ⟨⟨13189588829272810181179532273203130984184923798450324713,13189588829272810181179532273203130984184923798472754433⟩,⟨-8853910966417203047286002252002940043720837311532827339,-8853910966417203047286002252002940043720837311510402299⟩⟩, + ⟨⟨-564926870105823092537168750775742304649817518143023061,-564926870105823092537168750775742304649817518141570705⟩,⟨317512777850625272692795325413155930765660674595214302,317512777850625272692795325413155930765660674596667121⟩⟩, + ⟨⟨12514335673914113591608297987793327322692679037170949,12514335673914113591608297987793327322692679037190938⟩,⟨-3658673387831176017065591367716023378627223996350361,-3658673387831176017065591367716023378627223996330359⟩⟩, + ⟨⟨-108626165532852193945690212711859416982476535427503,-108626165532852193945690212711859416982476535426668⟩,⟨-2740874590255125520991365768108399789906483541672,-2740874590255125520991365768108399789906483540807⟩⟩, + ⟨⟨290054860833643691780532573043494948524459767811,290054860833643691780532573043494948524459768461⟩,⟨87711506254803947717009220602595244881303291697,87711506254803947717009220602595244881303292426⟩⟩, + ⟨⟨-209893599210183333788574592017588408178566511,-209893599210183333788574592017588408178564852⟩,⟨-66417512725522328128401518337727266421611758,-66417512725522328128401518337727266421610189⟩⟩, + ⟨⟨30474269228262343024523876404250641773141,30474269228262343024523876404250641775939⟩,⟨-9153972417469024095357172059865695734406,-9153972417469024095357172059865695731487⟩⟩, + ⟨⟨341128524999033524427816244158925982,341128524999033524427816244158931121⟩,⟨635720164450269935644394937736395050,635720164450269935644394937736399846⟩⟩, + ⟨⟨2120404685653164263304325852210,2120404685653164263304325862372⟩,⟨997575001472299008219759218351,997575001472299008219759228687⟩⟩, + ⟨⟨-1399089733130309961228507,-1399089733130309961212951⟩,⟨272110574493729990236228,272110574493729990250793⟩⟩, + ⟨⟨205122825146889239,205122825146915090⟩,⟨358711073822710592,358711073822737658⟩⟩, + ⟨⟨369297327757,369297372710⟩,⟨24819527219,24819572172⟩⟩, + ⟨⟨14696571,14749047⟩,⟨1942228,1994703⟩⟩, + ⟨⟨-376019,-317124⟩,⟨-36243,31713⟩⟩, + ⟨⟨14696571,14749047⟩,⟨-1994703,-1942228⟩⟩, + ⟨⟨369297327757,369297372710⟩,⟨-24819572172,-24819527219⟩⟩, + ⟨⟨205122825146889239,205122825146915090⟩,⟨-358711073822737658,-358711073822710592⟩⟩, + ⟨⟨-1399089733130309961228507,-1399089733130309961212951⟩,⟨-272110574493729990250793,-272110574493729990236228⟩⟩, + ⟨⟨2120404685653164263304325852210,2120404685653164263304325862372⟩,⟨-997575001472299008219759228687,-997575001472299008219759218351⟩⟩, + ⟨⟨341128524999033524427816244158925982,341128524999033524427816244158931121⟩,⟨-635720164450269935644394937736399846,-635720164450269935644394937736395050⟩⟩, + ⟨⟨30474269228262343024523876404250641773141,30474269228262343024523876404250641775939⟩,⟨9153972417469024095357172059865695731487,9153972417469024095357172059865695734406⟩⟩, + ⟨⟨-209893599210183333788574592017588408178566511,-209893599210183333788574592017588408178564852⟩,⟨66417512725522328128401518337727266421610189,66417512725522328128401518337727266421611758⟩⟩, + ⟨⟨290054860833643691780532573043494948524459767811,290054860833643691780532573043494948524459768461⟩,⟨-87711506254803947717009220602595244881303292426,-87711506254803947717009220602595244881303291697⟩⟩, + ⟨⟨-108626165532852193945690212711859416982476535427503,-108626165532852193945690212711859416982476535426668⟩,⟨2740874590255125520991365768108399789906483540807,2740874590255125520991365768108399789906483541672⟩⟩, + ⟨⟨12514335673914113591608297987793327322692679037170949,12514335673914113591608297987793327322692679037190938⟩,⟨3658673387831176017065591367716023378627223996330359,3658673387831176017065591367716023378627223996350361⟩⟩, + ⟨⟨-564926870105823092537168750775742304649817518143023061,-564926870105823092537168750775742304649817518141570705⟩,⟨-317512777850625272692795325413155930765660674596667121,-317512777850625272692795325413155930765660674595214302⟩⟩, + ⟨⟨13189588829272810181179532273203130984184923798450324713,13189588829272810181179532273203130984184923798472754433⟩,⟨8853910966417203047286002252002940043720837311510402299,8853910966417203047286002252002940043720837311532827339⟩⟩, + ⟨⟨-194855883647669691120319040531636240325428946687876325807,-194855883647669691120319040531636240325428946687541122598⟩,⟨-103959049700627233724007826360820855233417727405830957889,-103959049700627233724007826360820855233417727405495766242⟩⟩, + ⟨⟨1907480838810190369960275853676986246532095494179368390559,1907480838810190369960275853676986246532095494181521138534⟩,⟨381940946787701979228728787405308659232755914781585378188,381940946787701979228728787405308659232755914783742087356⟩⟩] +lemma tw0_1_5_5_calc (j : Fin 31) : taylorWaveBox 0 1 5 5 j = tw0_1_5_5 j := by + revert j + decide +kernel +def tw0_1_5_6 : Fin 31 → CI := ![⟨⟨41208467746901302566782003086929732372176771235668144996,41208467746901302566782003086929732372176771236776373921⟩,⟨1060412308892142199989357498832859323627692727352455161191,1060412308892142199989357498832859323627692727353562504251⟩⟩, + ⟨⟨-36630582837533581575312903757232627474839875400932637278,-36630582837533581575312903757232627474839875400762633266⟩,⟨-121936082177806196520016471342442307903286541057893372485,-121936082177806196520016471342442307903286541057723194336⟩⟩, + ⟨⟨3330538333172585517742202662004458254786098881386003083,3330538333172585517742202662004458254786098881401948562⟩,⟨9118942824671085908557409314916523987000705781474015405,9118942824671085908557409314916523987000705781489965136⟩⟩, + ⟨⟨-93752278463408716896821299642833196068107705056912704,-93752278463408716896821299642833196068107705055906165⟩,⟨-410644474288300256040218603096728401376665095876006273,-410644474288300256040218603096728401376665095875000043⟩⟩, + ⟨⟨-490735865265315880304566951722604150312735844726636,-490735865265315880304566951722604150312735844713417⟩,⟨9031112785163620175670217270089734762091495699510749,9031112785163620175670217270089734762091495699523962⟩⟩, + ⟨⟨32958331718032903703455899576555436902554720510374,32958331718032903703455899576555436902554720510894⟩,⟨-73697054468131364535382382116776499191106274744166,-73697054468131364535382382116776499191106274743685⟩⟩, + ⟨⟨-165319111398612410557440165459874468887916786792,-165319111398612410557440165459874468887916786073⟩,⟨176704112777170881791465072345507213564721525125,176704112777170881791465072345507213564721525819⟩⟩, + ⟨⟨140665563128646060942615785896123743001990748,140665563128646060942615785896123743001992159⟩,⟨-127095079271392749929899682094206503422549758,-127095079271392749929899682094206503422548455⟩⟩, + ⟨⟨-9277208353431421905506141866882707719027,-9277208353431421905506141866882707716621⟩,⟨28139971284551222999617198303023105085958,28139971284551222999617198303023105088171⟩⟩, + ⟨⟨-711729921468284295890465989694730486,-711729921468284295890465989694724501⟩,⟨-151698825163932369535822973171829677,-151698825163932369535822973171823769⟩⟩, + ⟨⟨-2427887145659606050131832328975,-2427887145659606050131832319286⟩,⟨811800197469038986194893034869,811800197469038986194893043883⟩⟩, + ⟨⟨1130967934304510708097628,1130967934304510708117557⟩,⟨-1244006070248021725639677,-1244006070248021725620547⟩⟩, + ⟨⟨-445629618553009547,-445629618552973033⟩,⟨-272648339787004225,-272648339786968061⟩⟩, + ⟨⟨-475818127079,-475818072006⟩,⟨136701551862,136701606935⟩⟩, + ⟨⟨-20632849,-20567468⟩,⟨885946,951327⟩⟩, + ⟨⟨446028,528863⟩,⟨-44603,50975⟩⟩, + ⟨⟨-20632849,-20567468⟩,⟨-951327,-885946⟩⟩, + ⟨⟨-475818127079,-475818072006⟩,⟨-136701606935,-136701551862⟩⟩, + ⟨⟨-445629618553009547,-445629618552973033⟩,⟨272648339786968061,272648339787004225⟩⟩, + ⟨⟨1130967934304510708097628,1130967934304510708117557⟩,⟨1244006070248021725620547,1244006070248021725639677⟩⟩, + ⟨⟨-2427887145659606050131832328975,-2427887145659606050131832319286⟩,⟨-811800197469038986194893043883,-811800197469038986194893034869⟩⟩, + ⟨⟨-711729921468284295890465989694730486,-711729921468284295890465989694724501⟩,⟨151698825163932369535822973171823769,151698825163932369535822973171829677⟩⟩, + ⟨⟨-9277208353431421905506141866882707719027,-9277208353431421905506141866882707716621⟩,⟨-28139971284551222999617198303023105088171,-28139971284551222999617198303023105085958⟩⟩, + ⟨⟨140665563128646060942615785896123743001990748,140665563128646060942615785896123743001992159⟩,⟨127095079271392749929899682094206503422548455,127095079271392749929899682094206503422549758⟩⟩, + ⟨⟨-165319111398612410557440165459874468887916786792,-165319111398612410557440165459874468887916786073⟩,⟨-176704112777170881791465072345507213564721525819,-176704112777170881791465072345507213564721525125⟩⟩, + ⟨⟨32958331718032903703455899576555436902554720510374,32958331718032903703455899576555436902554720510894⟩,⟨73697054468131364535382382116776499191106274743685,73697054468131364535382382116776499191106274744166⟩⟩, + ⟨⟨-490735865265315880304566951722604150312735844726636,-490735865265315880304566951722604150312735844713417⟩,⟨-9031112785163620175670217270089734762091495699523962,-9031112785163620175670217270089734762091495699510749⟩⟩, + ⟨⟨-93752278463408716896821299642833196068107705056912704,-93752278463408716896821299642833196068107705055906165⟩,⟨410644474288300256040218603096728401376665095875000043,410644474288300256040218603096728401376665095876006273⟩⟩, + ⟨⟨3330538333172585517742202662004458254786098881386003083,3330538333172585517742202662004458254786098881401948562⟩,⟨-9118942824671085908557409314916523987000705781489965136,-9118942824671085908557409314916523987000705781474015405⟩⟩, + ⟨⟨-36630582837533581575312903757232627474839875400932637278,-36630582837533581575312903757232627474839875400762633266⟩,⟨121936082177806196520016471342442307903286541057723194336,121936082177806196520016471342442307903286541057893372485⟩⟩, + ⟨⟨41208467746901302566782003086929732372176771235668144993,41208467746901302566782003086929732372176771236776373938⟩,⟨-1060412308892142199989357498832859323627692727353562504258,-1060412308892142199989357498832859323627692727352455161177⟩⟩] +lemma tw0_1_5_6_calc (j : Fin 31) : taylorWaveBox 0 1 5 6 j = tw0_1_5_6 j := by + revert j + decide +kernel +def tw0_1_5_7 : Fin 31 → CI := ![⟨⟨-510886998776136566325806581276408375268993826820903534207,-510886998776136566325806581276408375268993826820411602872⟩,⟨-61569892589367626155521159732929729825076576620959033055,-61569892589367626155521159732929729825076576620467383185⟩⟩, + ⟨⟨64957305654464486469391510571183458269135173998290859005,64957305654464486469391510571183458269135173998393220641⟩,⟨-6095295800106502548038643699269708271316919081497964670,-6095295800106502548038643699269708271316919081395777161⟩⟩, + ⟨⟨-5242240495294645864957799196095381838547731236444956799,-5242240495294645864957799196095381838547731236435542040⟩,⟨574584861869490382566196052705463727749270900709872933,574584861869490382566196052705463727749270900719285254⟩⟩, + ⟨⟨242872270320487180767224676013934186293835304205750554,242872270320487180767224676013934186293835304206322413⟩,⟨15351792593674337771456499620464555039738221377257273,15351792593674337771456499620464555039738221377829266⟩⟩, + ⟨⟨-5151739849971981977879879027597519423171396720840682,-5151739849971981977879879027597519423171396720833788⟩,⟨-2135746668904839468423402865748793737437174474198674,-2135746668904839468423402865748793737437174474191780⟩⟩, + ⟨⟨36534976103061115833600153907395988906205930125433,36534976103061115833600153907395988906205930125854⟩,⟨38830087279122646537237436998884228576816087933676,38830087279122646537237436998884228576816087934110⟩⟩, + ⟨⟨-60540301491330061429941163728276165061772342188,-60540301491330061429941163728276165061772341673⟩,⟨-160739837657881130104735712892328671410389617129,-160739837657881130104735712892328671410389616627⟩⟩, + ⟨⟨29566900536211477250264493504814905719842015,29566900536211477250264493504814905719842736⟩,⟨142068052798472226094506228346478831216942758,142068052798472226094506228346478831216943661⟩⟩, + ⟨⟨-14686981172794833489630686562171134150148,-14686981172794833489630686562171134147807⟩,⟨-19641211159619649043762288273319325943576,-19641211159619649043762288273319325941234⟩⟩, + ⟨⟨516122825137254323251770202530491037,516122825137254323251770202530494790⟩,⟨-399161934876958410805206422758057087,-399161934876958410805206422758052950⟩⟩, + ⟨⟨1160510933345290376769718193522,1160510933345290376769718204421⟩,⟨-2198459713149074350874081012771,-2198459713149074350874081002110⟩⟩, + ⟨⟨-170680229650739299282501,-170680229650739299261634⟩,⟨1754545594676327377363810,1754545594676327377385294⟩⟩, + ⟨⟨586452206410614537,586452206410649739⟩,⟨27463601723819250,27463601723852038⟩⟩, + ⟨⟨476768013408,476768065079⟩,⟨-345165990059,-345165938389⟩⟩, + ⟨⟨24784596,24857279⟩,⟨-5640022,-5567338⟩⟩, + ⟨⟨-661186,-557626⟩,⟨-63729,55763⟩⟩, + ⟨⟨24784596,24857279⟩,⟨5567338,5640022⟩⟩, + ⟨⟨476768013408,476768065079⟩,⟨345165938389,345165990059⟩⟩, + ⟨⟨586452206410614537,586452206410649739⟩,⟨-27463601723852038,-27463601723819250⟩⟩, + ⟨⟨-170680229650739299282501,-170680229650739299261634⟩,⟨-1754545594676327377385294,-1754545594676327377363810⟩⟩, + ⟨⟨1160510933345290376769718193522,1160510933345290376769718204421⟩,⟨2198459713149074350874081002110,2198459713149074350874081012771⟩⟩, + ⟨⟨516122825137254323251770202530491037,516122825137254323251770202530494790⟩,⟨399161934876958410805206422758052950,399161934876958410805206422758057087⟩⟩, + ⟨⟨-14686981172794833489630686562171134150148,-14686981172794833489630686562171134147807⟩,⟨19641211159619649043762288273319325941234,19641211159619649043762288273319325943576⟩⟩, + ⟨⟨29566900536211477250264493504814905719842015,29566900536211477250264493504814905719842736⟩,⟨-142068052798472226094506228346478831216943661,-142068052798472226094506228346478831216942758⟩⟩, + ⟨⟨-60540301491330061429941163728276165061772342188,-60540301491330061429941163728276165061772341673⟩,⟨160739837657881130104735712892328671410389616627,160739837657881130104735712892328671410389617129⟩⟩, + ⟨⟨36534976103061115833600153907395988906205930125433,36534976103061115833600153907395988906205930125854⟩,⟨-38830087279122646537237436998884228576816087934110,-38830087279122646537237436998884228576816087933676⟩⟩, + ⟨⟨-5151739849971981977879879027597519423171396720840682,-5151739849971981977879879027597519423171396720833788⟩,⟨2135746668904839468423402865748793737437174474191780,2135746668904839468423402865748793737437174474198674⟩⟩, + ⟨⟨242872270320487180767224676013934186293835304205750554,242872270320487180767224676013934186293835304206322413⟩,⟨-15351792593674337771456499620464555039738221377829266,-15351792593674337771456499620464555039738221377257273⟩⟩, + ⟨⟨-5242240495294645864957799196095381838547731236444956799,-5242240495294645864957799196095381838547731236435542040⟩,⟨-574584861869490382566196052705463727749270900719285254,-574584861869490382566196052705463727749270900709872933⟩⟩, + ⟨⟨64957305654464486469391510571183458269135173998290859005,64957305654464486469391510571183458269135173998393220641⟩,⟨6095295800106502548038643699269708271316919081395777161,6095295800106502548038643699269708271316919081497964670⟩⟩, + ⟨⟨-510886998776136566325806581276408375268993826820903534210,-510886998776136566325806581276408375268993826820411602866⟩,⟨61569892589367626155521159732929729825076576620467383177,61569892589367626155521159732929729825076576620959033056⟩⟩] +lemma tw0_1_5_7_calc (j : Fin 31) : taylorWaveBox 0 1 5 7 j = tw0_1_5_7 j := by + revert j + decide +kernel +def tw0_1_5_8 : Fin 31 → CI := ![⟨⟨61784018550678146918576707162653320828822883254385968386,61784018550678146918576707162653320828822883254581765308⟩,⟨-215903926996086066181554362574746834685174695298844102943,-215903926996086066181554362574746834685174695298647846539⟩⟩, + ⟨⟨-3144838839122748429576154196469004864475649328468670305,-3144838839122748429576154196469004864475649328416298664⟩,⟨29924462796575024334580887843811399884385941709165870832,29924462796575024334580887843811399884385941709218342573⟩⟩, + ⟨⟨338930796667743214533203423463750085036283227836550847,338930796667743214533203423463750085036283227841273292⟩,⟨-2555890778113498248885825065682005270852136554069345926,-2555890778113498248885825065682005270852136554064622471⟩⟩, + ⟨⟨-43474836232863297531140963620420481512879544269674235,-43474836232863297531140963620420481512879544269404733⟩,⟨118838250706362007093390759233892500988611281674896892,118838250706362007093390759233892500988611281675166367⟩⟩, + ⟨⟨2067856598749665482843417913301558774045308951634535,2067856598749665482843417913301558774045308951638855⟩,⟨-2302692987584180904019479394936435171865063807609175,-2302692987584180904019479394936435171865063807604852⟩⟩, + ⟨⟨-29661980974506475807694689293585054937447168974600,-29661980974506475807694689293585054937447168974326⟩,⟨11152892540630111165081728679041381219906573921284,11152892540630111165081728679041381219906573921558⟩⟩, + ⟨⟨109199068296809087244780733322016026488513427344,109199068296809087244780733322016026488513427593⟩,⟨10765214282661845851411328938587505102942787090,10765214282661845851411328938587505102942787366⟩⟩, + ⟨⟨-94754491279611145061493495754282695529072562,-94754491279611145061493495754282695529071807⟩,⟨-31862155208276006442561546606075233055261837,-31862155208276006442561546606075233055261120⟩⟩, + ⟨⟨18260757523977772853126156481226604534450,18260757523977772853126156481226604535826⟩,⟨-580884330480552155900905567467866056625,-580884330480552155900905567467866055131⟩⟩, + ⟨⟨-23261766498762035613456518052863602,-23261766498762035613456518052859262⟩,⟨525984120220087142309599258912594312,525984120220087142309599258912598633⟩⟩, + ⟨⟨593576746886915649777020324320,593576746886915649777020332232⟩,⟨2089994788241620520613560185715,2089994788241620520613560194161⟩⟩, + ⟨⟨-860818932452211932488533,-860818932452211932472822⟩,⟨-1423473795835486285084293,-1423473795835486285067244⟩⟩, + ⟨⟨-533261131318964004,-533261131318926122⟩,⟨261207504152292779,261207504152328664⟩⟩, + ⟨⟨-354215228264,-354215159488⟩,⟨520773773389,520773842166⟩⟩, + ⟨⟨-26080647,-25987678⟩,⟨10945836,11038805⟩⟩, + ⟨⟨627431,743955⟩,⟨-62744,71707⟩⟩, + ⟨⟨-26080647,-25987678⟩,⟨-11038805,-10945836⟩⟩, + ⟨⟨-354215228264,-354215159488⟩,⟨-520773842166,-520773773389⟩⟩, + ⟨⟨-533261131318964004,-533261131318926122⟩,⟨-261207504152328664,-261207504152292779⟩⟩, + ⟨⟨-860818932452211932488533,-860818932452211932472822⟩,⟨1423473795835486285067244,1423473795835486285084293⟩⟩, + ⟨⟨593576746886915649777020324320,593576746886915649777020332232⟩,⟨-2089994788241620520613560194161,-2089994788241620520613560185715⟩⟩, + ⟨⟨-23261766498762035613456518052863602,-23261766498762035613456518052859262⟩,⟨-525984120220087142309599258912598633,-525984120220087142309599258912594312⟩⟩, + ⟨⟨18260757523977772853126156481226604534450,18260757523977772853126156481226604535826⟩,⟨580884330480552155900905567467866055131,580884330480552155900905567467866056625⟩⟩, + ⟨⟨-94754491279611145061493495754282695529072562,-94754491279611145061493495754282695529071807⟩,⟨31862155208276006442561546606075233055261120,31862155208276006442561546606075233055261837⟩⟩, + ⟨⟨109199068296809087244780733322016026488513427344,109199068296809087244780733322016026488513427593⟩,⟨-10765214282661845851411328938587505102942787366,-10765214282661845851411328938587505102942787090⟩⟩, + ⟨⟨-29661980974506475807694689293585054937447168974600,-29661980974506475807694689293585054937447168974326⟩,⟨-11152892540630111165081728679041381219906573921558,-11152892540630111165081728679041381219906573921284⟩⟩, + ⟨⟨2067856598749665482843417913301558774045308951634535,2067856598749665482843417913301558774045308951638855⟩,⟨2302692987584180904019479394936435171865063807604852,2302692987584180904019479394936435171865063807609175⟩⟩, + ⟨⟨-43474836232863297531140963620420481512879544269674235,-43474836232863297531140963620420481512879544269404733⟩,⟨-118838250706362007093390759233892500988611281675166367,-118838250706362007093390759233892500988611281674896892⟩⟩, + ⟨⟨338930796667743214533203423463750085036283227836550847,338930796667743214533203423463750085036283227841273292⟩,⟨2555890778113498248885825065682005270852136554064622471,2555890778113498248885825065682005270852136554069345926⟩⟩, + ⟨⟨-3144838839122748429576154196469004864475649328468670305,-3144838839122748429576154196469004864475649328416298664⟩,⟨-29924462796575024334580887843811399884385941709218342573,-29924462796575024334580887843811399884385941709165870832⟩⟩, + ⟨⟨61784018550678146918576707162653320828822883254385968382,61784018550678146918576707162653320828822883254581765308⟩,⟨215903926996086066181554362574746834685174695298647846537,215903926996086066181554362574746834685174695298844102944⟩⟩] +lemma tw0_1_5_8_calc (j : Fin 31) : taylorWaveBox 0 1 5 8 j = tw0_1_5_8 j := by + revert j + decide +kernel +def tw0_1_5_9 : Fin 31 → CI := ![⟨⟨80704091764305943393381076380873622039296036243702341559,80704091764305943393381076380873622039296036243791405730⟩,⟨37747162421083560781034208686840238520507200414059705552,37747162421083560781034208686840238520507200414148455082⟩⟩, + ⟨⟨-12040730905918635845945361738466932475331917040551990286,-12040730905918635845945361738466932475331917040528583805⟩,⟨-3763957951773168901230261177024675497316306785758172468,-3763957951773168901230261177024675497316306785734809286⟩⟩, + ⟨⟨1067183375004444166525124289751005850692517794043698371,1067183375004444166525124289751005850692517794045740595⟩,⟨417421511891892127603871419995368254405069684607784102,417421511891892127603871419995368254405069684609826043⟩⟩, + ⟨⟨-48039948685253554894617468355340256397249612516276168,-48039948685253554894617468355340256397249612516167262⟩,⟨-35640498684888883492751270315181685016321451313643691,-35640498684888883492751270315181685016321451313534797⟩⟩, + ⟨⟨749060381423352057225443900879082992326628350046805,749060381423352057225443900879082992326628350049328⟩,⟨1369968640560143315316934461729444661452341107725799,1369968640560143315316934461729444661452341107728321⟩⟩, + ⟨⟨610491520610639417842629538604261249852267954422,610491520610639417842629538604261249852267954560⟩,⟨-17112114297696071735098559904633675092850577204426,-17112114297696071735098559904633675092850577204291⟩⟩, + ⟨⟨-33673931541437075048389138694600837167075088189,-33673931541437075048389138694600837167075088009⟩,⟨54102409170317697405886379135487233641634806584,54102409170317697405886379135487233641634806752⟩⟩, + ⟨⟨47198739365920225958881833670675086814163303,47198739365920225958881833670675086814163768⟩,⟨-41133578917900342802190584145602459149728716,-41133578917900342802190584145602459149728289⟩⟩, + ⟨⟨-6764794364345198198056836498210660341295,-6764794364345198198056836498210660340163⟩,⟨10359849488795904118027953482685892254704,10359849488795904118027953482685892255788⟩⟩, + ⟨⟨-283466995014441614669316103781405730,-283466995014441614669316103781403113⟩,⟨-262331490848872596764265848542277685,-262331490848872596764265848542275272⟩⟩, + ⟨⟨-1487936852174961125374476613122,-1487936852174961125374476605817⟩,⟨-875117314756385834619281122928,-875117314756385834619281115422⟩⟩, + ⟨⟨1322067098600144561755741,1322067098600144561773506⟩,⟨537332923591949192445545,537332923591949192463346⟩⟩, + ⟨⟨314134820270790798,314134820270828865⟩,⟨-446558313856214884,-446558313856176708⟩⟩, + ⟨⟨151826918796,151826992935⟩,⟨-593553291052,-593553216914⟩⟩, + ⟨⟨23860936,23964216⟩,⟨-15615973,-15512693⟩⟩, + ⟨⟨-760987,-641795⟩,⟨-73349,64180⟩⟩, + ⟨⟨23860936,23964216⟩,⟨15512693,15615973⟩⟩, + ⟨⟨151826918796,151826992935⟩,⟨593553216914,593553291052⟩⟩, + ⟨⟨314134820270790798,314134820270828865⟩,⟨446558313856176708,446558313856214884⟩⟩, + ⟨⟨1322067098600144561755741,1322067098600144561773506⟩,⟨-537332923591949192463346,-537332923591949192445545⟩⟩, + ⟨⟨-1487936852174961125374476613122,-1487936852174961125374476605817⟩,⟨875117314756385834619281115422,875117314756385834619281122928⟩⟩, + ⟨⟨-283466995014441614669316103781405730,-283466995014441614669316103781403113⟩,⟨262331490848872596764265848542275272,262331490848872596764265848542277685⟩⟩, + ⟨⟨-6764794364345198198056836498210660341295,-6764794364345198198056836498210660340163⟩,⟨-10359849488795904118027953482685892255788,-10359849488795904118027953482685892254704⟩⟩, + ⟨⟨47198739365920225958881833670675086814163303,47198739365920225958881833670675086814163768⟩,⟨41133578917900342802190584145602459149728289,41133578917900342802190584145602459149728716⟩⟩, + ⟨⟨-33673931541437075048389138694600837167075088189,-33673931541437075048389138694600837167075088009⟩,⟨-54102409170317697405886379135487233641634806752,-54102409170317697405886379135487233641634806584⟩⟩, + ⟨⟨610491520610639417842629538604261249852267954422,610491520610639417842629538604261249852267954560⟩,⟨17112114297696071735098559904633675092850577204291,17112114297696071735098559904633675092850577204426⟩⟩, + ⟨⟨749060381423352057225443900879082992326628350046805,749060381423352057225443900879082992326628350049328⟩,⟨-1369968640560143315316934461729444661452341107728321,-1369968640560143315316934461729444661452341107725799⟩⟩, + ⟨⟨-48039948685253554894617468355340256397249612516276168,-48039948685253554894617468355340256397249612516167262⟩,⟨35640498684888883492751270315181685016321451313534797,35640498684888883492751270315181685016321451313643691⟩⟩, + ⟨⟨1067183375004444166525124289751005850692517794043698371,1067183375004444166525124289751005850692517794045740595⟩,⟨-417421511891892127603871419995368254405069684609826043,-417421511891892127603871419995368254405069684607784102⟩⟩, + ⟨⟨-12040730905918635845945361738466932475331917040551990286,-12040730905918635845945361738466932475331917040528583805⟩,⟨3763957951773168901230261177024675497316306785734809286,3763957951773168901230261177024675497316306785758172468⟩⟩, + ⟨⟨80704091764305943393381076380873622039296036243702341559,80704091764305943393381076380873622039296036243791405730⟩,⟨-37747162421083560781034208686840238520507200414148455082,-37747162421083560781034208686840238520507200414059705551⟩⟩] +lemma tw0_1_5_9_calc (j : Fin 31) : taylorWaveBox 0 1 5 9 j = tw0_1_5_9 j := by + revert j + decide +kernel +def tw0_1_5_10 : Fin 31 → CI := ![⟨⟨-18195681606635362530007831045427366684645063932004940239,-18195681606635362530007831045427366684645063931969330206⟩,⟨26810440122137706681633135743321853097807515248650657586,26810440122137706681633135743321853097807515248686411441⟩⟩, + ⟨⟨2329746892099444145411813264245781673250123297712289400,2329746892099444145411813264245781673250123297721486994⟩,⟨-4251956519835051478280216361816957917822578615873580101,-4251956519835051478280216361816957917822578615864367610⟩⟩, + ⟨⟨-268924194971432036557793537530608234706084372054869936,-268924194971432036557793537530608234706084372054104055⟩,⟨381628080844397616706488016437775915011470433303710714,381628080844397616706488016437775915011470433304476619⟩⟩, + ⟨⟨20713710014635799707659972426077087479492949835848294,20713710014635799707659972426077087479492949835906466⟩,⟨-15581268678771397872348782915635700758902821380780828,-15581268678771397872348782915635700758902821380722640⟩⟩, + ⟨⟨-712660201341186179650500981803235525695633252786648,-712660201341186179650500981803235525695633252785435⟩,⟨116211771222101402868415497415564224552115071520345,116211771222101402868415497415564224552115071521559⟩⟩, + ⟨⟨7705682504877935045714203198439681583295854056982,7705682504877935045714203198439681583295854057035⟩,⟨3543024214396123218063677331251374429047434679595,3543024214396123218063677331251374429047434679652⟩⟩, + ⟨⟨-17893846038546631676309424003733176442159747634,-17893846038546631676309424003733176442159747530⟩,⟨-28822685672104447077559234306021415731871746913,-28822685672104447077559234306021415731871746809⟩⟩, + ⟨⟨6691640287956440380056005132633793964884410,6691640287956440380056005132633793964884593⟩,⟨35313582529660834409248565494129003215923340,35313582529660834409248565494129003215923567⟩⟩, + ⟨⟨-2863716781530231078938758244236472754843,-2863716781530231078938758244236472754122⟩,⟨-7127175073072855012957188520903858671867,-7127175073072855012957188520903858671168⟩⟩, + ⟨⟨257798753882033552214040007780729171,257798753882033552214040007780731240⟩,⟨-31505266863899512978260169495997400,-31505266863899512978260169495995284⟩⟩, + ⟨⟨1223880001080390804935607792491,1223880001080390804935607797497⟩,⟨-287551867805749357212152105232,-287551867805749357212152100512⟩⟩, + ⟨⟨-1086004697427331440349288,-1086004697427331440337489⟩,⟨282890192609789508189289,282890192609789508200230⟩⟩, + ⟨⟨-50868932579552444,-50868932579525557⟩,⟨457358976321405699,457358976321434295⟩⟩, + ⟨⟨52607769357,52607834043⟩,⟨543771019784,543771084470⟩⟩, + ⟨⟨-19290805,-19189509⟩,⟨18034898,18136194⟩⟩, + ⟨⟨601781,713541⟩,⟨-60179,68776⟩⟩, + ⟨⟨-19290805,-19189509⟩,⟨-18136194,-18034898⟩⟩, + ⟨⟨52607769357,52607834043⟩,⟨-543771084470,-543771019784⟩⟩, + ⟨⟨-50868932579552444,-50868932579525557⟩,⟨-457358976321434295,-457358976321405699⟩⟩, + ⟨⟨-1086004697427331440349288,-1086004697427331440337489⟩,⟨-282890192609789508200230,-282890192609789508189289⟩⟩, + ⟨⟨1223880001080390804935607792491,1223880001080390804935607797497⟩,⟨287551867805749357212152100512,287551867805749357212152105232⟩⟩, + ⟨⟨257798753882033552214040007780729171,257798753882033552214040007780731240⟩,⟨31505266863899512978260169495995284,31505266863899512978260169495997400⟩⟩, + ⟨⟨-2863716781530231078938758244236472754843,-2863716781530231078938758244236472754122⟩,⟨7127175073072855012957188520903858671168,7127175073072855012957188520903858671867⟩⟩, + ⟨⟨6691640287956440380056005132633793964884410,6691640287956440380056005132633793964884593⟩,⟨-35313582529660834409248565494129003215923567,-35313582529660834409248565494129003215923340⟩⟩, + ⟨⟨-17893846038546631676309424003733176442159747634,-17893846038546631676309424003733176442159747530⟩,⟨28822685672104447077559234306021415731871746809,28822685672104447077559234306021415731871746913⟩⟩, + ⟨⟨7705682504877935045714203198439681583295854056982,7705682504877935045714203198439681583295854057035⟩,⟨-3543024214396123218063677331251374429047434679652,-3543024214396123218063677331251374429047434679595⟩⟩, + ⟨⟨-712660201341186179650500981803235525695633252786648,-712660201341186179650500981803235525695633252785435⟩,⟨-116211771222101402868415497415564224552115071521559,-116211771222101402868415497415564224552115071520345⟩⟩, + ⟨⟨20713710014635799707659972426077087479492949835848294,20713710014635799707659972426077087479492949835906466⟩,⟨15581268678771397872348782915635700758902821380722640,15581268678771397872348782915635700758902821380780828⟩⟩, + ⟨⟨-268924194971432036557793537530608234706084372054869936,-268924194971432036557793537530608234706084372054104055⟩,⟨-381628080844397616706488016437775915011470433304476619,-381628080844397616706488016437775915011470433303710714⟩⟩, + ⟨⟨2329746892099444145411813264245781673250123297712289400,2329746892099444145411813264245781673250123297721486994⟩,⟨4251956519835051478280216361816957917822578615864367610,4251956519835051478280216361816957917822578615873580101⟩⟩, + ⟨⟨-18195681606635362530007831045427366684645063932004940239,-18195681606635362530007831045427366684645063931969330206⟩,⟨-26810440122137706681633135743321853097807515248686411442,-26810440122137706681633135743321853097807515248650657586⟩⟩] +lemma tw0_1_5_10_calc (j : Fin 31) : taylorWaveBox 0 1 5 10 j = tw0_1_5_10 j := by + revert j + decide +kernel +def tw0_1_5_11 : Fin 31 → CI := ![⟨⟨-7921282057434559863095731675262121371324765462519116576,-7921282057434559863095731675262121371324765462506245875⟩,⟨-7454530625365032043096413010134806369067215614904333905,-7454530625365032043096413010134806369067215614891515725⟩⟩, + ⟨⟨1316079439737729290547852172149228099177527766623902481,1316079439737729290547852172149228099177527766627131599⟩,⟨1107432771392371234833419712688468195926740316614904396,1107432771392371234833419712688468195926740316618129501⟩⟩, + ⟨⟨-115233217859392029541217073253984019102990603427332869,-115233217859392029541217073253984019102990603427083962⟩,⟨-132468465543315196189386357493138646069691337371225308,-132468465543315196189386357493138646069691337370976371⟩⟩, + ⟨⟨3626355011509122058420837551644830421941159338542500,3626355011509122058420837551644830421941159338568509⟩,⟨9712613385791271719715784957616815000641671527889983,9712613385791271719715784957616815000641671527915984⟩⟩, + ⟨⟨54296202972273302377768880138384419166260836628985,54296202972273302377768880138384419166260836629477⟩,⟨-303422323978511141590137543635847781166305448998834,-303422323978511141590137543635847781166305448998343⟩⟩, + ⟨⟨-2851693280373903075085929433032372654605709803250,-2851693280373903075085929433032372654605709803216⟩,⟨2627587084659093415674710886348140784624676752437,2627587084659093415674710886348140784624676752470⟩⟩, + ⟨⟨16592857546754252301930736921404672241631978147,16592857546754252301930736921404672241631978191⟩,⟨-1616617812541927247237958134567564490651903372,-1616617812541927247237958134567564490651903325⟩⟩, + ⟨⟨-17941569408938623667840283822941157032399427,-17941569408938623667840283822941157032399282⟩,⟨-6393054545023928931323437796073107194784223,-6393054545023928931323437796073107194784084⟩⟩, + ⟨⟨4287371929843365005967162991785046987675,4287371929843365005967162991785046987980⟩,⟨995763987756950539720652829569104287545,995763987756950539720652829569104287882⟩⟩, + ⟨⟨-88467715778064874359133574515972450,-88467715778064874359133574515971313⟩,⟨134768294746278154349504154488701254,134768294746278154349504154488702457⟩⟩, + ⟨⟨-461498520446387040062926057176,-461498520446387040062926053538⟩,⟨708081384606732726836231181110,708081384606732726836231184632⟩⟩, + ⟨⟨509129501004499194357431,509129501004499194367268⟩,⟨-635934116220951512603865,-635934116220951512594351⟩⟩, + ⟨⟨-136616120748145006,-136616120748124220⟩,⟨-330935945575010808,-330935945574988670⟩⟩, + ⟨⟨-192880181612,-192880135881⟩,⟨-406202343629,-406202297898⟩⟩, + ⟨⟨13406588,13495287⟩,⟨-18154024,-18065326⟩⟩, + ⟨⟨-617588,-520857⟩,⟨-59527,52086⟩⟩, + ⟨⟨13406588,13495287⟩,⟨18065326,18154024⟩⟩, + ⟨⟨-192880181612,-192880135881⟩,⟨406202297898,406202343629⟩⟩, + ⟨⟨-136616120748145006,-136616120748124220⟩,⟨330935945574988670,330935945575010808⟩⟩, + ⟨⟨509129501004499194357431,509129501004499194367268⟩,⟨635934116220951512594351,635934116220951512603865⟩⟩, + ⟨⟨-461498520446387040062926057176,-461498520446387040062926053538⟩,⟨-708081384606732726836231184632,-708081384606732726836231181110⟩⟩, + ⟨⟨-88467715778064874359133574515972450,-88467715778064874359133574515971313⟩,⟨-134768294746278154349504154488702457,-134768294746278154349504154488701254⟩⟩, + ⟨⟨4287371929843365005967162991785046987675,4287371929843365005967162991785046987980⟩,⟨-995763987756950539720652829569104287882,-995763987756950539720652829569104287545⟩⟩, + ⟨⟨-17941569408938623667840283822941157032399427,-17941569408938623667840283822941157032399282⟩,⟨6393054545023928931323437796073107194784084,6393054545023928931323437796073107194784223⟩⟩, + ⟨⟨16592857546754252301930736921404672241631978147,16592857546754252301930736921404672241631978191⟩,⟨1616617812541927247237958134567564490651903325,1616617812541927247237958134567564490651903372⟩⟩, + ⟨⟨-2851693280373903075085929433032372654605709803250,-2851693280373903075085929433032372654605709803216⟩,⟨-2627587084659093415674710886348140784624676752470,-2627587084659093415674710886348140784624676752437⟩⟩, + ⟨⟨54296202972273302377768880138384419166260836628985,54296202972273302377768880138384419166260836629477⟩,⟨303422323978511141590137543635847781166305448998343,303422323978511141590137543635847781166305448998834⟩⟩, + ⟨⟨3626355011509122058420837551644830421941159338542500,3626355011509122058420837551644830421941159338568509⟩,⟨-9712613385791271719715784957616815000641671527915984,-9712613385791271719715784957616815000641671527889983⟩⟩, + ⟨⟨-115233217859392029541217073253984019102990603427332869,-115233217859392029541217073253984019102990603427083962⟩,⟨132468465543315196189386357493138646069691337370976371,132468465543315196189386357493138646069691337371225308⟩⟩, + ⟨⟨1316079439737729290547852172149228099177527766623902481,1316079439737729290547852172149228099177527766627131599⟩,⟨-1107432771392371234833419712688468195926740316618129501,-1107432771392371234833419712688468195926740316614904396⟩⟩, + ⟨⟨-7921282057434559863095731675262121371324765462519116576,-7921282057434559863095731675262121371324765462506245875⟩,⟨7454530625365032043096413010134806369067215614891515725,7454530625365032043096413010134806369067215614904333905⟩⟩] +lemma tw0_1_5_11_calc (j : Fin 31) : taylorWaveBox 0 1 5 11 j = tw0_1_5_11 j := by + revert j + decide +kernel +def tw0_1_5_12 : Fin 31 → CI := ![⟨⟨2684931535345769588556601163740745158154646714769217879,2684931535345769588556601163740745158154646714773398343⟩,⟨-2070768756643057609910463555176889523391883856616851916,-2070768756643057609910463555176889523391883856612655312⟩⟩, + ⟨⟨-443061676950607049758003435326557716766395820210765611,-443061676950607049758003435326557716766395820209752479⟩,⟨353192911501931414871977763314668202523069973228864186,353192911501931414871977763314668202523069973229878055⟩⟩, + ⟨⟨54527398019876772856226690480120497753322848617238588,54527398019876772856226690480120497753322848617342687⟩,⟨-28036405431828117156870806466333779246595048821751861,-28036405431828117156870806466333779246595048821647785⟩⟩, + ⟨⟨-3841281490004012100473859307880321058476794516973151,-3841281490004012100473859307880321058476794516963156⟩,⟨268377956643136481676018461050861792734792593404509,268377956643136481676018461050861792734792593414506⟩⟩, + ⟨⟨106289249046451923885591437987900588480922427842368,106289249046451923885591437987900588480922427842544⟩,⟨60264199212800045529903155544953936625418511475143,60264199212800045529903155544953936625418511475320⟩⟩, + ⟨⟨-563285284781159540416604857835772548735815463216,-563285284781159540416604857835772548735815463200⟩,⟨-1546906784144336761853161968595281173510241674348,-1546906784144336761853161968595281173510241674332⟩⟩, + ⟨⟨-2689474142699491673888946578731424261033622049,-2689474142699491673888946578731424261033622029⟩,⟨7116102460760974451797217323028649914559218114,7116102460760974451797217323028649914559218132⟩⟩, + ⟨⟨7174806839474428338126560957655132819257788,7174806839474428338126560957655132819257859⟩,⟨-6030089313050306989819593961726943920700665,-6030089313050306989819593961726943920700600⟩⟩, + ⟨⟨-1741615729217104521518365486628606241494,-1741615729217104521518365486628606241270⟩,⟨1565890288319966935385404047661379296273,1565890288319966935385404047661379296495⟩⟩, + ⟨⟨-26339568940390347475827986330939351,-26339568940390347475827986330938624⟩,⟨-89107827138139585236816302362974152,-89107827138139585236816302362973455⟩⟩, + ⟨⟨-96955847770068111084523041256,-96955847770068111084523039220⟩,⟨-518640890271191235071229583663,-518640890271191235071229581516⟩⟩, + ⟨⟨-18798862484018806113140,-18798862484018806106788⟩,⟨548776967737555924349260,548776967737555924355846⟩⟩, + ⟨⟨201606034814469018,201606034814487038⟩,⟨162038002617610948,162038002617629037⟩⟩, + ⟨⟨244184576392,244184609919⟩,⟨241857629127,241857662654⟩⟩, + ⟨⟨-8001383,-7931517⟩,⟨15989246,16059113⟩⟩, + ⟨⟨418614,496357⟩,⟨-41862,47842⟩⟩, + ⟨⟨-8001383,-7931517⟩,⟨-16059113,-15989246⟩⟩, + ⟨⟨244184576392,244184609919⟩,⟨-241857662654,-241857629127⟩⟩, + ⟨⟨201606034814469018,201606034814487038⟩,⟨-162038002617629037,-162038002617610948⟩⟩, + ⟨⟨-18798862484018806113140,-18798862484018806106788⟩,⟨-548776967737555924355846,-548776967737555924349260⟩⟩, + ⟨⟨-96955847770068111084523041256,-96955847770068111084523039220⟩,⟨518640890271191235071229581516,518640890271191235071229583663⟩⟩, + ⟨⟨-26339568940390347475827986330939351,-26339568940390347475827986330938624⟩,⟨89107827138139585236816302362973455,89107827138139585236816302362974152⟩⟩, + ⟨⟨-1741615729217104521518365486628606241494,-1741615729217104521518365486628606241270⟩,⟨-1565890288319966935385404047661379296495,-1565890288319966935385404047661379296273⟩⟩, + ⟨⟨7174806839474428338126560957655132819257788,7174806839474428338126560957655132819257859⟩,⟨6030089313050306989819593961726943920700600,6030089313050306989819593961726943920700665⟩⟩, + ⟨⟨-2689474142699491673888946578731424261033622049,-2689474142699491673888946578731424261033622029⟩,⟨-7116102460760974451797217323028649914559218132,-7116102460760974451797217323028649914559218114⟩⟩, + ⟨⟨-563285284781159540416604857835772548735815463216,-563285284781159540416604857835772548735815463200⟩,⟨1546906784144336761853161968595281173510241674332,1546906784144336761853161968595281173510241674348⟩⟩, + ⟨⟨106289249046451923885591437987900588480922427842368,106289249046451923885591437987900588480922427842544⟩,⟨-60264199212800045529903155544953936625418511475320,-60264199212800045529903155544953936625418511475143⟩⟩, + ⟨⟨-3841281490004012100473859307880321058476794516973151,-3841281490004012100473859307880321058476794516963156⟩,⟨-268377956643136481676018461050861792734792593414506,-268377956643136481676018461050861792734792593404509⟩⟩, + ⟨⟨54527398019876772856226690480120497753322848617238588,54527398019876772856226690480120497753322848617342687⟩,⟨28036405431828117156870806466333779246595048821647785,28036405431828117156870806466333779246595048821751861⟩⟩, + ⟨⟨-443061676950607049758003435326557716766395820210765611,-443061676950607049758003435326557716766395820209752479⟩,⟨-353192911501931414871977763314668202523069973229878055,-353192911501931414871977763314668202523069973228864186⟩⟩, + ⟨⟨2684931535345769588556601163740745158154646714769217879,2684931535345769588556601163740745158154646714773398343⟩,⟨2070768756643057609910463555176889523391883856612655312,2070768756643057609910463555176889523391883856616851916⟩⟩] +lemma tw0_1_5_12_calc (j : Fin 31) : taylorWaveBox 0 1 5 12 j = tw0_1_5_12 j := by + revert j + decide +kernel +def tw0_1_5_13 : Fin 31 → CI := ![⟨⟨471382635078612138531640770245545182902558574854374851,471382635078612138531640770245545182902558574855623783⟩,⟨866588517287039814356263376579360624053750957102396277,866588517287039814356263376579360624053750957103640975⟩⟩, + ⟨⟨-79632807529853879403114103687511527395427262084679822,-79632807529853879403114103687511527395427262084393940⟩,⟨-154944806470578402079820116020082506214476099471459745,-154944806470578402079820116020082506214476099471173872⟩⟩, + ⟨⟨4631915499579980067847455110882985540565310924225839,4631915499579980067847455110882985540565310924264233⟩,⟨19439603850137222525267733021727276824956475077592633,19439603850137222525267733021727276824956475077631035⟩⟩, + ⟨⟨288474314636002354839965293905335081608769956410410,288474314636002354839965293905335081608769956413757⟩,⟨-1303296191039518422641617120799634644486283154323703,-1303296191039518422641617120799634644486283154320356⟩⟩, + ⟨⟨-34095242083516018129397807551724049785370799209173,-34095242083516018129397807551724049785370799209090⟩,⟨29680844745244400083899447901220504868413458484346,29680844745244400083899447901220504868413458484429⟩⟩, + ⟨⟨651638659481279513693487635541788960195724061546,651638659481279513693487635541788960195724061553⟩,⟨30058508170949524162027101970816332433117526740,30058508170949524162027101970816332433117526746⟩⟩, + ⟨⟨-2210774051993221130254593217437998971853611323,-2210774051993221130254593217437998971853611313⟩,⟨-2368447624080876406620072689581015380464294968,-2368447624080876406620072689581015380464294957⟩⟩, + ⟨⟨725487777766443841546675229310418073025600,725487777766443841546675229310418073025624⟩,⟨4242813840992119461206169342451443571635267,4242813840992119461206169342451443571635296⟩⟩, + ⟨⟨-141609676316407252867900324729557656369,-141609676316407252867900324729557656268⟩,⟨-1154489204626631125222977016737934536209,-1154489204626631125222977016737934536115⟩⟩, + ⟨⟨45741659105805532147786460188472981,45741659105805532147786460188473379⟩,⟨20158127021534829789531990183921277,20158127021534829789531990183921661⟩⟩, + ⟨⟨249562453529480393041760902615,249562453529480393041760903873⟩,⟨179512375133667313484732588862,179512375133667313484732590169⟩⟩, + ⟨⟨-196935577757005198125816,-196935577757005198122382⟩,⟨-283808540086459443280773,-283808540086459443277085⟩⟩, + ⟨⟨-171748319245948495,-171748319245937321⟩,⟨-30320536462342398,-30320536462331799⟩⟩, + ⟨⟨-222469075001,-222469046434⟩,⟨-103038009374,-103037980807⟩⟩, + ⟨⟨3686196,3735933⟩,⟨-12744035,-12694298⟩⟩, + ⟨⟨-372329,-314011⟩,⟨-35888,31402⟩⟩, + ⟨⟨3686196,3735933⟩,⟨12694298,12744035⟩⟩, + ⟨⟨-222469075001,-222469046434⟩,⟨103037980807,103038009374⟩⟩, + ⟨⟨-171748319245948495,-171748319245937321⟩,⟨30320536462331799,30320536462342398⟩⟩, + ⟨⟨-196935577757005198125816,-196935577757005198122382⟩,⟨283808540086459443277085,283808540086459443280773⟩⟩, + ⟨⟨249562453529480393041760902615,249562453529480393041760903873⟩,⟨-179512375133667313484732590169,-179512375133667313484732588862⟩⟩, + ⟨⟨45741659105805532147786460188472981,45741659105805532147786460188473379⟩,⟨-20158127021534829789531990183921661,-20158127021534829789531990183921277⟩⟩, + ⟨⟨-141609676316407252867900324729557656369,-141609676316407252867900324729557656268⟩,⟨1154489204626631125222977016737934536115,1154489204626631125222977016737934536209⟩⟩, + ⟨⟨725487777766443841546675229310418073025600,725487777766443841546675229310418073025624⟩,⟨-4242813840992119461206169342451443571635296,-4242813840992119461206169342451443571635267⟩⟩, + ⟨⟨-2210774051993221130254593217437998971853611323,-2210774051993221130254593217437998971853611313⟩,⟨2368447624080876406620072689581015380464294957,2368447624080876406620072689581015380464294968⟩⟩, + ⟨⟨651638659481279513693487635541788960195724061546,651638659481279513693487635541788960195724061553⟩,⟨-30058508170949524162027101970816332433117526746,-30058508170949524162027101970816332433117526740⟩⟩, + ⟨⟨-34095242083516018129397807551724049785370799209173,-34095242083516018129397807551724049785370799209090⟩,⟨-29680844745244400083899447901220504868413458484429,-29680844745244400083899447901220504868413458484346⟩⟩, + ⟨⟨288474314636002354839965293905335081608769956410410,288474314636002354839965293905335081608769956413757⟩,⟨1303296191039518422641617120799634644486283154320356,1303296191039518422641617120799634644486283154323703⟩⟩, + ⟨⟨4631915499579980067847455110882985540565310924225839,4631915499579980067847455110882985540565310924264233⟩,⟨-19439603850137222525267733021727276824956475077631035,-19439603850137222525267733021727276824956475077592633⟩⟩, + ⟨⟨-79632807529853879403114103687511527395427262084679822,-79632807529853879403114103687511527395427262084393940⟩,⟨154944806470578402079820116020082506214476099471173872,154944806470578402079820116020082506214476099471459745⟩⟩, + ⟨⟨471382635078612138531640770245545182902558574854374851,471382635078612138531640770245545182902558574855623783⟩,⟨-866588517287039814356263376579360624053750957103640975,-866588517287039814356263376579360624053750957102396277⟩⟩] +lemma tw0_1_5_13_calc (j : Fin 31) : taylorWaveBox 0 1 5 13 j = tw0_1_5_13 j := by + revert j + decide +kernel +def tw0_1_5_14 : Fin 31 → CI := ![⟨⟨-253723909191720899112214866996830366078763049970803551,-253723909191720899112214866996830366078763049970463200⟩,⟨89582979353616727133444619409810698390279708628837430,89582979353616727133444619409810698390279708629178719⟩⟩, + ⟨⟨48308148146206759712046238439143054035053147511124701,48308148146206759712046238439143054035053147511201000⟩,⟨-13706778269987734144473723711505484361409376373781531,-13706778269987734144473723711505484361409376373705298⟩⟩, + ⟨⟨-6106114394073901541894625359052891447389009247753502,-6106114394073901541894625359052891447389009247740922⟩,⟨-43347370135256090788901221711696187518337470053927,-43347370135256090788901221711696187518337470041350⟩⟩, + ⟨⟨379569760179322743474416856365352730205461285705401,379569760179322743474416856365352730205461285706382⟩,⟨210035941198507314600099500461052304555691953172995,210035941198507314600099500461052304555691953173975⟩⟩, + ⟨⟨-5780283026804808431157684776451242601829618173331,-5780283026804808431157684776451242601829618173298⟩,⟨-14574475888901376686402881073166405309792965704236,-14574475888901376686402881073166405309792965704203⟩⟩, + ⟨⟨-103525140481877216395937676116827031637075262497,-103525140481877216395937676116827031637075262494⟩,⟨219103151246222103186877975371802437241846859643,219103151246222103186877975371802437241846859646⟩⟩, + ⟨⟨1238664094075130740366102696116926094753419751,1238664094075130740366102696116926094753419756⟩,⟨-373021498500762313663821287152268991987889755,-373021498500762313663821287152268991987889750⟩⟩, + ⟨⟨-1734370690325460480755127836165013613089719,-1734370690325460480755127836165013613089704⟩,⟨-653251689924054889762041007989946791905528,-653251689924054889762041007989946791905514⟩⟩, + ⟨⟨478281027725806259870820800921696603884,478281027725806259870820800921696603930⟩,⟨254015727550140297289140653476374128832,254015727550140297289140653476374128881⟩⟩, + ⟨⟨-22664865153665883379266786757009845,-22664865153665883379266786757009672⟩,⟨11038252365585961807666320366537062,11038252365585961807666320366537247⟩⟩, + ⟨⟨-166304943839268249553094402450,-166304943839268249553094401753⟩,⟨23241405482579005341007932216,23241405482579005341007932881⟩⟩, + ⟨⟨193182908027831417173148,193182908027831417175691⟩,⟨64729060625885438386185,64729060625885438388717⟩⟩, + ⟨⟨104386324798435023,104386324798441596⟩,⟨-35467623141516989,-35467623141510875⟩⟩, + ⟨⟨163345895406,163345915345⟩,⟨14225826472,14225846410⟩⟩, + ⟨⟨-992817,-960761⟩,⟨9128678,9160734⟩⟩, + ⟨⟨220825,261836⟩,⟨-22083,25238⟩⟩, + ⟨⟨-992817,-960761⟩,⟨-9160734,-9128678⟩⟩, + ⟨⟨163345895406,163345915345⟩,⟨-14225846410,-14225826472⟩⟩, + ⟨⟨104386324798435023,104386324798441596⟩,⟨35467623141510875,35467623141516989⟩⟩, + ⟨⟨193182908027831417173148,193182908027831417175691⟩,⟨-64729060625885438388717,-64729060625885438386185⟩⟩, + ⟨⟨-166304943839268249553094402450,-166304943839268249553094401753⟩,⟨-23241405482579005341007932881,-23241405482579005341007932216⟩⟩, + ⟨⟨-22664865153665883379266786757009845,-22664865153665883379266786757009672⟩,⟨-11038252365585961807666320366537247,-11038252365585961807666320366537062⟩⟩, + ⟨⟨478281027725806259870820800921696603884,478281027725806259870820800921696603930⟩,⟨-254015727550140297289140653476374128881,-254015727550140297289140653476374128832⟩⟩, + ⟨⟨-1734370690325460480755127836165013613089719,-1734370690325460480755127836165013613089704⟩,⟨653251689924054889762041007989946791905514,653251689924054889762041007989946791905528⟩⟩, + ⟨⟨1238664094075130740366102696116926094753419751,1238664094075130740366102696116926094753419756⟩,⟨373021498500762313663821287152268991987889750,373021498500762313663821287152268991987889755⟩⟩, + ⟨⟨-103525140481877216395937676116827031637075262497,-103525140481877216395937676116827031637075262494⟩,⟨-219103151246222103186877975371802437241846859646,-219103151246222103186877975371802437241846859643⟩⟩, + ⟨⟨-5780283026804808431157684776451242601829618173331,-5780283026804808431157684776451242601829618173298⟩,⟨14574475888901376686402881073166405309792965704203,14574475888901376686402881073166405309792965704236⟩⟩, + ⟨⟨379569760179322743474416856365352730205461285705401,379569760179322743474416856365352730205461285706382⟩,⟨-210035941198507314600099500461052304555691953173975,-210035941198507314600099500461052304555691953172995⟩⟩, + ⟨⟨-6106114394073901541894625359052891447389009247753502,-6106114394073901541894625359052891447389009247740922⟩,⟨43347370135256090788901221711696187518337470041350,43347370135256090788901221711696187518337470053927⟩⟩, + ⟨⟨48308148146206759712046238439143054035053147511124701,48308148146206759712046238439143054035053147511201000⟩,⟨13706778269987734144473723711505484361409376373705298,13706778269987734144473723711505484361409376373781531⟩⟩, + ⟨⟨-253723909191720899112214866996830366078763049970803551,-253723909191720899112214866996830366078763049970463200⟩,⟨-89582979353616727133444619409810698390279708629178719,-89582979353616727133444619409810698390279708628837430⟩⟩] +lemma tw0_1_5_14_calc (j : Fin 31) : taylorWaveBox 0 1 5 14 j = tw0_1_5_14 j := by + revert j + decide +kernel +def tw0_1_5_15 : Fin 31 → CI := ![⟨⟨-12409302941236174007547642640483805955325790784342235,-12409302941236174007547642640483805955325790784256197⟩,⟨-67950928141511261815078239924165160318441294253245117,-67950928141511261815078239924165160318441294253159245⟩⟩, + ⟨⟨1064219328054343848290342883959449980610471024014578,1064219328054343848290342883959449980610471024038744⟩,⟨13581123597906455477543984297447752090879748363340708,13581123597906455477543984297447752090879748363364910⟩⟩, + ⟨⟨431241872794628641811647978879061227486792073869252,431241872794628641811647978879061227486792073872959⟩,⟨-1702307061556042980855965782167914999504831435650552,-1702307061556042980855965782167914999504831435646845⟩⟩, + ⟨⟨-94535435020113151826023642756557994553300386630683,-94535435020113151826023642756557994553300386630355⟩,⟨93109504428236887535392338107403308977466685408041,93109504428236887535392338107403308977466685408368⟩⟩, + ⟨⟨5114367985978247760100085540930149084213706296831,5114367985978247760100085540930149084213706296843⟩,⟨-198834199129076849861300932436943707691997718589,-198834199129076849861300932436943707691997718577⟩⟩, + ⟨⟨-56758579006910788758140089531627636536519644816,-56758579006910788758140089531627636536519644815⟩,⟨-62904094315401378138760002676606417214980330585,-62904094315401378138760002676606417214980330583⟩⟩, + ⟨⟨-80306847009408840083867966462398418875512625,-80306847009408840083867966462398418875512623⟩,⟨479443209150383580570497192543971160419524580,479443209150383580570497192543971160419524582⟩⟩, + ⟨⟨583504964513205142850221639319635535578811,583504964513205142850221639319635535578817⟩,⟨-472831679426231076020899268326892310930351,-472831679426231076020899268326892310930345⟩⟩, + ⟨⟨-211329257360436447016697700226055221650,-211329257360436447016697700226055221626⟩,⟨107962871031442199917110593976836946565,107962871031442199917110593976836946589⟩⟩, + ⟨⟨2952247135223901760944426069947597,2952247135223901760944426069947695⟩,⟨-11596426228345396162835317937930129,-11596426228345396162835317937930030⟩⟩, + ⟨⟨53576262740907069078963462564,53576262740907069078963462926⟩,⟨-67691266947923213073373580949,-67691266947923213073373580602⟩⟩, + ⟨⟨-107440066735883646873659,-107440066735883646872519⟩,⟨35313250905071637061726,35313250905071637062772⟩⟩, + ⟨⟨-44275553370140066,-44275553370135483⟩,⟨48393832449581323,48393832449585858⟩⟩, + ⟨⟨-99735747869,-99735736288⟩,⟨26531714478,26531726058⟩⟩, + ⟨⟨-435952,-417280⟩,⟨-6002284,-5983612⟩⟩, + ⟨⟨-173302,-146158⟩,⟨-16704,14616⟩⟩, + ⟨⟨-435952,-417280⟩,⟨5983612,6002284⟩⟩, + ⟨⟨-99735747869,-99735736288⟩,⟨-26531726058,-26531714478⟩⟩, + ⟨⟨-44275553370140066,-44275553370135483⟩,⟨-48393832449585858,-48393832449581323⟩⟩, + ⟨⟨-107440066735883646873659,-107440066735883646872519⟩,⟨-35313250905071637062772,-35313250905071637061726⟩⟩, + ⟨⟨53576262740907069078963462564,53576262740907069078963462926⟩,⟨67691266947923213073373580602,67691266947923213073373580949⟩⟩, + ⟨⟨2952247135223901760944426069947597,2952247135223901760944426069947695⟩,⟨11596426228345396162835317937930030,11596426228345396162835317937930129⟩⟩, + ⟨⟨-211329257360436447016697700226055221650,-211329257360436447016697700226055221626⟩,⟨-107962871031442199917110593976836946589,-107962871031442199917110593976836946565⟩⟩, + ⟨⟨583504964513205142850221639319635535578811,583504964513205142850221639319635535578817⟩,⟨472831679426231076020899268326892310930345,472831679426231076020899268326892310930351⟩⟩, + ⟨⟨-80306847009408840083867966462398418875512625,-80306847009408840083867966462398418875512623⟩,⟨-479443209150383580570497192543971160419524582,-479443209150383580570497192543971160419524580⟩⟩, + ⟨⟨-56758579006910788758140089531627636536519644816,-56758579006910788758140089531627636536519644815⟩,⟨62904094315401378138760002676606417214980330583,62904094315401378138760002676606417214980330585⟩⟩, + ⟨⟨5114367985978247760100085540930149084213706296831,5114367985978247760100085540930149084213706296843⟩,⟨198834199129076849861300932436943707691997718577,198834199129076849861300932436943707691997718589⟩⟩, + ⟨⟨-94535435020113151826023642756557994553300386630683,-94535435020113151826023642756557994553300386630355⟩,⟨-93109504428236887535392338107403308977466685408368,-93109504428236887535392338107403308977466685408041⟩⟩, + ⟨⟨431241872794628641811647978879061227486792073869252,431241872794628641811647978879061227486792073872959⟩,⟨1702307061556042980855965782167914999504831435646845,1702307061556042980855965782167914999504831435650552⟩⟩, + ⟨⟨1064219328054343848290342883959449980610471024014578,1064219328054343848290342883959449980610471024038744⟩,⟨-13581123597906455477543984297447752090879748363364910,-13581123597906455477543984297447752090879748363340708⟩⟩, + ⟨⟨-12409302941236174007547642640483805955325790784342235,-12409302941236174007547642640483805955325790784256197⟩,⟨67950928141511261815078239924165160318441294253159245,67950928141511261815078239924165160318441294253245117⟩⟩] +lemma tw0_1_5_15_calc (j : Fin 31) : taylorWaveBox 0 1 5 15 j = tw0_1_5_15 j := by + revert j + decide +kernel +def tw0_1_5_16 : Fin 31 → CI := ![⟨⟨16743225516343521045809366830523219962843734592796256,16743225516343521045809366830523219962843734592816321⟩,⟨-365940137475154491430449335996914097988303859080642,-365940137475154491430449335996914097988303859060558⟩⟩, + ⟨⟨-3465247371060158730326862546339665812304732599086182,-3465247371060158730326862546339665812304732599079268⟩,⟨-418080826169210299456329136351482869898807658106292,-418080826169210299456329136351482869898807658099389⟩⟩, + ⟨⟨421042559448580321784489961617502066598752532846067,421042559448580321784489961617502066598752532847058⟩,⟨224102211619891166292545860268215603238731369009851,224102211619891166292545860268215603238731369010842⟩⟩, + ⟨⟨-18046804149720772464073937823052573130042748470021,-18046804149720772464073937823052573130042748469909⟩,⟨-33816711638120786359991233865762650776310664715123,-33816711638120786359991233865762650776310664715011⟩⟩, + ⟨⟨-466111840925186177922443063970938293616019774636,-466111840925186177922443063970938293616019774631⟩,⟨1507567731803035897406004263099185703629297474485,1507567731803035897406004263099185703629297474490⟩⟩, + ⟨⟨26386830986726817575965458560734816495969507391,26386830986726817575965458560734816495969507392⟩,⟨-9297750923471648969408422298225533958973890111,-9297750923471648969408422298225533958973890110⟩⟩, + ⟨⟨-139972683834159932567219764033513426775628102,-139972683834159932567219764033513426775628100⟩,⟨-100866653162288046271067347937120195082018085,-100866653162288046271067347937120195082018084⟩⟩, + ⟨⟨43362425279506226003428009339416601105400,43362425279506226003428009339416601105402⟩,⟨284147544179508735963840623304585881197438,284147544179508735963840623304585881197441⟩⟩, + ⟨⟨13506408541416834839485808376774959641,13506408541416834839485808376774959649⟩,⟨-97280019378290512666731406064355352425,-97280019378290512666731406064355352418⟩⟩, + ⟨⟨3112630719540127643942420195470079,3112630719540127643942420195470115⟩,⟨4369101193415712857690708636513664,4369101193415712857690708636513697⟩⟩, + ⟨⟨3888178488864924820453079574,3888178488864924820453079744⟩,⟨41734756719321771358667928953,41734756719321771358667929131⟩⟩, + ⟨⟨34081093815861106883220,34081093815861106883947⟩,⟨-48516669241204289003553,-48516669241204289002844⟩⟩, + ⟨⟨8714650998795661,8714650998797978⟩,⟨-35810875867938419,-35810875867935996⟩⟩, + ⟨⟨50396296069,50396301557⟩,⟨-34988533631,-34988528143⟩⟩, + ⟨⟨906463,917315⟩,⟨3587637,3598489⟩⟩, + ⟨⟨91363,108332⟩,⟨-9137,10442⟩⟩, + ⟨⟨906463,917315⟩,⟨-3598489,-3587637⟩⟩, + ⟨⟨50396296069,50396301557⟩,⟨34988528143,34988533631⟩⟩, + ⟨⟨8714650998795661,8714650998797978⟩,⟨35810875867935996,35810875867938419⟩⟩, + ⟨⟨34081093815861106883220,34081093815861106883947⟩,⟨48516669241204289002844,48516669241204289003553⟩⟩, + ⟨⟨3888178488864924820453079574,3888178488864924820453079744⟩,⟨-41734756719321771358667929131,-41734756719321771358667928953⟩⟩, + ⟨⟨3112630719540127643942420195470079,3112630719540127643942420195470115⟩,⟨-4369101193415712857690708636513697,-4369101193415712857690708636513664⟩⟩, + ⟨⟨13506408541416834839485808376774959641,13506408541416834839485808376774959649⟩,⟨97280019378290512666731406064355352418,97280019378290512666731406064355352425⟩⟩, + ⟨⟨43362425279506226003428009339416601105400,43362425279506226003428009339416601105402⟩,⟨-284147544179508735963840623304585881197441,-284147544179508735963840623304585881197438⟩⟩, + ⟨⟨-139972683834159932567219764033513426775628102,-139972683834159932567219764033513426775628100⟩,⟨100866653162288046271067347937120195082018084,100866653162288046271067347937120195082018085⟩⟩, + ⟨⟨26386830986726817575965458560734816495969507391,26386830986726817575965458560734816495969507392⟩,⟨9297750923471648969408422298225533958973890110,9297750923471648969408422298225533958973890111⟩⟩, + ⟨⟨-466111840925186177922443063970938293616019774636,-466111840925186177922443063970938293616019774631⟩,⟨-1507567731803035897406004263099185703629297474490,-1507567731803035897406004263099185703629297474485⟩⟩, + ⟨⟨-18046804149720772464073937823052573130042748470021,-18046804149720772464073937823052573130042748469909⟩,⟨33816711638120786359991233865762650776310664715011,33816711638120786359991233865762650776310664715123⟩⟩, + ⟨⟨421042559448580321784489961617502066598752532846067,421042559448580321784489961617502066598752532847058⟩,⟨-224102211619891166292545860268215603238731369010842,-224102211619891166292545860268215603238731369009851⟩⟩, + ⟨⟨-3465247371060158730326862546339665812304732599086182,-3465247371060158730326862546339665812304732599079268⟩,⟨418080826169210299456329136351482869898807658099389,418080826169210299456329136351482869898807658106292⟩⟩, + ⟨⟨16743225516343521045809366830523219962843734592796256,16743225516343521045809366830523219962843734592816321⟩,⟨365940137475154491430449335996914097988303859060558,365940137475154491430449335996914097988303859080642⟩⟩] +lemma tw0_1_5_16_calc (j : Fin 31) : taylorWaveBox 0 1 5 16 j = tw0_1_5_16 j := by + revert j + decide +kernel +def tw0_1_5_17 : Fin 31 → CI := ![⟨⟨-525065185003065769373796454312862292074916669102272,-525065185003065769373796454312862292074916669097918⟩,⟨3810669631078938820581204050450451076726234452238673,3810669631078938820581204050450451076726234452243028⟩⟩, + ⟨⟨265172342116696732270118109977904950065660445689141,265172342116696732270118109977904950065660445690942⟩,⟨-804657207048429837797453672582750015277145348965227,-804657207048429837797453672582750015277145348963424⟩⟩, + ⟨⟨-81857025691666449020111490050498876070822753717094,-81857025691666449020111490050498876070822753716851⟩,⟨91445373782847813268684740225241525124231244122082,91445373782847813268684740225241525124231244122324⟩⟩, + ⟨⟨10275538637643905074021376502579383846768866066701,10275538637643905074021376502579383846768866066736⟩,⟨-2111128568067140637586793412694400780364511348402,-2111128568067140637586793412694400780364511348367⟩⟩, + ⟨⟨-370073642054655316739995866566393408781035844068,-370073642054655316739995866566393408781035844066⟩,⟨-274717370543971072904918770345816147219652008201,-274717370543971072904918770345816147219652008199⟩⟩, + ⟨⟨-494476023202432201701869170262524283625167749,-494476023202432201701869170262524283625167748⟩,⟨8737989351013861894514234205355466419218431761,8737989351013861894514234205355466419218431762⟩⟩, + ⟨⟨51241081338146173552133672808042609894055302,51241081338146173552133672808042609894055303⟩,⟨-27193172169344526636590566465824538611194563,-27193172169344526636590566465824538611194562⟩⟩, + ⟨⟨-96856430309533099337963143899602956817450,-96856430309533099337963143899602956817448⟩,⟨-38476308547723269287059545490955701140184,-38476308547723269287059545490955701140182⟩⟩, + ⟨⟨28221803535811480392174087613742475729,28221803535811480392174087613742475734⟩,⟨26198022568329557642689110002644584867,26198022568329557642689110002644584872⟩⟩, + ⟨⟨-2270368201287886381917312355816897,-2270368201287886381917312355816877⟩,⟨-189982677640519394106798655657697,-189982677640519394106798655657677⟩⟩, + ⟨⟨-14552429337563012528102498366,-14552429337563012528102498290⟩,⟨-12647565548433640148637994410,-12647565548433640148637994330⟩⟩, + ⟨⟨838810557367868440034,838810557367868440366⟩,⟨29435673139203543639464,29435673139203543639811⟩⟩, + ⟨⟨5111277910581044,5111277910582077⟩,⟨18941885130807333,18941885130808456⟩⟩, + ⟨⟨-19992891002,-19992887266⟩,⟨28179759794,28179763531⟩⟩, + ⟨⟨-899060,-891809⟩,⟨-1976754,-1969503⟩⟩, + ⟨⟨-64154,-54105⟩,⟨-6184,5411⟩⟩, + ⟨⟨-899060,-891809⟩,⟨1969503,1976754⟩⟩, + ⟨⟨-19992891002,-19992887266⟩,⟨-28179763531,-28179759794⟩⟩, + ⟨⟨5111277910581044,5111277910582077⟩,⟨-18941885130808456,-18941885130807333⟩⟩, + ⟨⟨838810557367868440034,838810557367868440366⟩,⟨-29435673139203543639811,-29435673139203543639464⟩⟩, + ⟨⟨-14552429337563012528102498366,-14552429337563012528102498290⟩,⟨12647565548433640148637994330,12647565548433640148637994410⟩⟩, + ⟨⟨-2270368201287886381917312355816897,-2270368201287886381917312355816877⟩,⟨189982677640519394106798655657677,189982677640519394106798655657697⟩⟩, + ⟨⟨28221803535811480392174087613742475729,28221803535811480392174087613742475734⟩,⟨-26198022568329557642689110002644584872,-26198022568329557642689110002644584867⟩⟩, + ⟨⟨-96856430309533099337963143899602956817450,-96856430309533099337963143899602956817448⟩,⟨38476308547723269287059545490955701140182,38476308547723269287059545490955701140184⟩⟩, + ⟨⟨51241081338146173552133672808042609894055302,51241081338146173552133672808042609894055303⟩,⟨27193172169344526636590566465824538611194562,27193172169344526636590566465824538611194563⟩⟩, + ⟨⟨-494476023202432201701869170262524283625167749,-494476023202432201701869170262524283625167748⟩,⟨-8737989351013861894514234205355466419218431762,-8737989351013861894514234205355466419218431761⟩⟩, + ⟨⟨-370073642054655316739995866566393408781035844068,-370073642054655316739995866566393408781035844066⟩,⟨274717370543971072904918770345816147219652008199,274717370543971072904918770345816147219652008201⟩⟩, + ⟨⟨10275538637643905074021376502579383846768866066701,10275538637643905074021376502579383846768866066736⟩,⟨2111128568067140637586793412694400780364511348367,2111128568067140637586793412694400780364511348402⟩⟩, + ⟨⟨-81857025691666449020111490050498876070822753717094,-81857025691666449020111490050498876070822753716851⟩,⟨-91445373782847813268684740225241525124231244122324,-91445373782847813268684740225241525124231244122082⟩⟩, + ⟨⟨265172342116696732270118109977904950065660445689141,265172342116696732270118109977904950065660445690942⟩,⟨804657207048429837797453672582750015277145348963424,804657207048429837797453672582750015277145348965227⟩⟩, + ⟨⟨-525065185003065769373796454312862292074916669102272,-525065185003065769373796454312862292074916669097918⟩,⟨-3810669631078938820581204050450451076726234452243028,-3810669631078938820581204050450451076726234452238673⟩⟩] +lemma tw0_1_5_17_calc (j : Fin 31) : taylorWaveBox 0 1 5 17 j = tw0_1_5_17 j := by + revert j + decide +kernel +def tw0_1_5_18 : Fin 31 → CI := ![⟨⟨-802935138526295993889301790431538935810675597054442,-802935138526295993889301790431538935810675597053516⟩,⟨-244602875661653411826546806472326039403597045417723,-244602875661653411826546806472326039403597045416799⟩⟩, + ⟨⟨169870383041910318735412299568651798985389868247227,169870383041910318735412299568651798985389868247661⟩,⟨96497826238208081209480431309425812085951904838432,96497826238208081209480431309425812085951904838865⟩⟩, + ⟨⟨-16931605673307860452883031952043534081208028152966,-16931605673307860452883031952043534081208028152903⟩,⟨-24766944527254824441246244065434378081080798912148,-24766944527254824441246244065434378081080798912085⟩⟩, + ⟨⟨-231412561217444091683832793007516483760319891482,-231412561217444091683832793007516483760319891472⟩,⟨2717504964793603978584204717662563429242295966904,2717504964793603978584204717662563429242295966914⟩⟩, + ⟨⟨106016411483883958755816301892909932306836679901,106016411483883958755816301892909932306836679903⟩,⟨-71523239700699678025874797512161544250198115415,-71523239700699678025874797512161544250198115413⟩⟩, + ⟨⟨-2339946375053462038817821480908500702167366428,-2339946375053462038817821480908500702167366427⟩,⟨-1135627783883653063029127989505950799439286523,-1135627783883653063029127989505950799439286522⟩⟩, + ⟨⟨545208373446442287193407536501807664954950,545208373446442287193407536501807664954951⟩,⟨18521335194315584028931728475026402352788037,18521335194315584028931728475026402352788038⟩⟩, + ⟨⟨28291237947965733332381389890921878523964,28291237947965733332381389890921878523965⟩,⟨-22097421291290386889942661869620052127041,-22097421291290386889942661869620052127040⟩⟩, + ⟨⟨-14020929574917708244902198099930272074,-14020929574917708244902198099930272071⟩,⟨3022198420140914794037258666938515620,3022198420140914794037258666938515622⟩⟩, + ⟨⟨650366710911282151006088636956654,650366710911282151006088636956661⟩,⟨-649607986870027108394680032415038,-649607986870027108394680032415031⟩⟩, + ⟨⟨8415945509795614354152399665,8415945509795614354152399702⟩,⟨-395329314437145248303629735,-395329314437145248303629699⟩⟩, + ⟨⟨-8621137600054319368785,-8621137600054319368640⟩,⟨-10896248576575043265898,-10896248576575043265743⟩⟩, + ⟨⟨-6877137496138387,-6877137496137709⟩,⟨-7151584499159813,-7151584499159123⟩⟩, + ⟨⟨4934077023,4934079256⟩,⟨-17815080639,-17815078407⟩⟩, + ⟨⟨680655,685059⟩,⟨988471,992875⟩⟩, + ⟨⟨30439,36093⟩,⟨-3044,3479⟩⟩, + ⟨⟨680655,685059⟩,⟨-992875,-988471⟩⟩, + ⟨⟨4934077023,4934079256⟩,⟨17815078407,17815080639⟩⟩, + ⟨⟨-6877137496138387,-6877137496137709⟩,⟨7151584499159123,7151584499159813⟩⟩, + ⟨⟨-8621137600054319368785,-8621137600054319368640⟩,⟨10896248576575043265743,10896248576575043265898⟩⟩, + ⟨⟨8415945509795614354152399665,8415945509795614354152399702⟩,⟨395329314437145248303629699,395329314437145248303629735⟩⟩, + ⟨⟨650366710911282151006088636956654,650366710911282151006088636956661⟩,⟨649607986870027108394680032415031,649607986870027108394680032415038⟩⟩, + ⟨⟨-14020929574917708244902198099930272074,-14020929574917708244902198099930272071⟩,⟨-3022198420140914794037258666938515622,-3022198420140914794037258666938515620⟩⟩, + ⟨⟨28291237947965733332381389890921878523964,28291237947965733332381389890921878523965⟩,⟨22097421291290386889942661869620052127040,22097421291290386889942661869620052127041⟩⟩, + ⟨⟨545208373446442287193407536501807664954950,545208373446442287193407536501807664954951⟩,⟨-18521335194315584028931728475026402352788038,-18521335194315584028931728475026402352788037⟩⟩, + ⟨⟨-2339946375053462038817821480908500702167366428,-2339946375053462038817821480908500702167366427⟩,⟨1135627783883653063029127989505950799439286522,1135627783883653063029127989505950799439286523⟩⟩, + ⟨⟨106016411483883958755816301892909932306836679901,106016411483883958755816301892909932306836679903⟩,⟨71523239700699678025874797512161544250198115413,71523239700699678025874797512161544250198115415⟩⟩, + ⟨⟨-231412561217444091683832793007516483760319891482,-231412561217444091683832793007516483760319891472⟩,⟨-2717504964793603978584204717662563429242295966914,-2717504964793603978584204717662563429242295966904⟩⟩, + ⟨⟨-16931605673307860452883031952043534081208028152966,-16931605673307860452883031952043534081208028152903⟩,⟨24766944527254824441246244065434378081080798912085,24766944527254824441246244065434378081080798912148⟩⟩, + ⟨⟨169870383041910318735412299568651798985389868247227,169870383041910318735412299568651798985389868247661⟩,⟨-96497826238208081209480431309425812085951904838865,-96497826238208081209480431309425812085951904838432⟩⟩, + ⟨⟨-802935138526295993889301790431538935810675597054442,-802935138526295993889301790431538935810675597053516⟩,⟨244602875661653411826546806472326039403597045416799,244602875661653411826546806472326039403597045417723⟩⟩] +lemma tw0_1_5_18_calc (j : Fin 31) : taylorWaveBox 0 1 5 18 j = tw0_1_5_18 j := by + revert j + decide +kernel +def tw0_1_5_19 : Fin 31 → CI := ![⟨⟨76575631215666964953329732981050100417633201355888,76575631215666964953329732981050100417633201356107⟩,⟨-156725817239300414888349797191609390598181896201870,-156725817239300414888349797191609390598181896201650⟩⟩, + ⟨⟨-28125393136138916462207869124901311409730966402601,-28125393136138916462207869124901311409730966402504⟩,⟨32400779476229776983149778629542446678125036826920,32400779476229776983149778629542446678125036827017⟩⟩, + ⟨⟨6540140948559116683830307256680224333088567314482,6540140948559116683830307256680224333088567314500⟩,⟨-2451654022487931011673296789198163889584880277255,-2451654022487931011673296789198163889584880277237⟩⟩, + ⟨⟨-628994540016567744715453557590926021138113585804,-628994540016567744715453557590926021138113585801⟩,⟨-245799866606468024197693936446314683272436104319,-245799866606468024197693936446314683272436104316⟩⟩, + ⟨⟨8517856610053532326569792365719171809764596227,8517856610053532326569792365719171809764596228⟩,⟨32704613219475088160774922821859043144941892552,32704613219475088160774922821859043144941892553⟩⟩, + ⟨⟨551673390920663273240866030009453724416537389,551673390920663273240866030009453724416537390⟩,⟨-487431225675443529398759685159193294032958234,-487431225675443529398759685159193294032958233⟩⟩, + ⟨⟨-5125893847786131898411481531837295485288211,-5125893847786131898411481531837295485288210⟩,⟨-2344896902389736817767732266576449482748405,-2344896902389736817767732266576449482748404⟩⟩, + ⟨⟨1567712528802147447661371499027571634011,1567712528802147447661371499027571634013⟩,⟨11671580722129153958224649019240055537705,11671580722129153958224649019240055537706⟩⟩, + ⟨⟨1971823147975634966788205577311317329,1971823147975634966788205577311317330⟩,⟨-4690356077487291189977083798098193118,-4690356077487291189977083798098193116⟩⟩, + ⟨⟨29042932330734033689416625139429,29042932330734033689416625139433⟩,⟨352018958810892357558429478470949,352018958810892357558429478470953⟩⟩, + ⟨⟨-2419262402982655559510229445,-2419262402982655559510229429⟩,⟨2538068049996089992829879038,2538068049996089992829879053⟩⟩, + ⟨⟨6032827106700840080901,6032827106700840080980⟩,⟨1608596879148071359788,1608596879148071359866⟩⟩, + ⟨⟨4561333468021358,4561333468021679⟩,⟨1424411746016377,1424411746016687⟩⟩, + ⟨⟨721573382,721574503⟩,⟨9391550907,9391552028⟩⟩, + ⟨⟨-449183,-446727⟩,⟨-453162,-450705⟩⟩, + ⟨⟨-19339,-16309⟩,⟨-1864,1631⟩⟩, + ⟨⟨-449183,-446727⟩,⟨450705,453162⟩⟩, + ⟨⟨721573382,721574503⟩,⟨-9391552028,-9391550907⟩⟩, + ⟨⟨4561333468021358,4561333468021679⟩,⟨-1424411746016687,-1424411746016377⟩⟩, + ⟨⟨6032827106700840080901,6032827106700840080980⟩,⟨-1608596879148071359866,-1608596879148071359788⟩⟩, + ⟨⟨-2419262402982655559510229445,-2419262402982655559510229429⟩,⟨-2538068049996089992829879053,-2538068049996089992829879038⟩⟩, + ⟨⟨29042932330734033689416625139429,29042932330734033689416625139433⟩,⟨-352018958810892357558429478470953,-352018958810892357558429478470949⟩⟩, + ⟨⟨1971823147975634966788205577311317329,1971823147975634966788205577311317330⟩,⟨4690356077487291189977083798098193116,4690356077487291189977083798098193118⟩⟩, + ⟨⟨1567712528802147447661371499027571634011,1567712528802147447661371499027571634013⟩,⟨-11671580722129153958224649019240055537706,-11671580722129153958224649019240055537705⟩⟩, + ⟨⟨-5125893847786131898411481531837295485288211,-5125893847786131898411481531837295485288210⟩,⟨2344896902389736817767732266576449482748404,2344896902389736817767732266576449482748405⟩⟩, + ⟨⟨551673390920663273240866030009453724416537389,551673390920663273240866030009453724416537390⟩,⟨487431225675443529398759685159193294032958233,487431225675443529398759685159193294032958234⟩⟩, + ⟨⟨8517856610053532326569792365719171809764596227,8517856610053532326569792365719171809764596228⟩,⟨-32704613219475088160774922821859043144941892553,-32704613219475088160774922821859043144941892552⟩⟩, + ⟨⟨-628994540016567744715453557590926021138113585804,-628994540016567744715453557590926021138113585801⟩,⟨245799866606468024197693936446314683272436104316,245799866606468024197693936446314683272436104319⟩⟩, + ⟨⟨6540140948559116683830307256680224333088567314482,6540140948559116683830307256680224333088567314500⟩,⟨2451654022487931011673296789198163889584880277237,2451654022487931011673296789198163889584880277255⟩⟩, + ⟨⟨-28125393136138916462207869124901311409730966402601,-28125393136138916462207869124901311409730966402504⟩,⟨-32400779476229776983149778629542446678125036827017,-32400779476229776983149778629542446678125036826920⟩⟩, + ⟨⟨76575631215666964953329732981050100417633201355888,76575631215666964953329732981050100417633201356107⟩,⟨156725817239300414888349797191609390598181896201650,156725817239300414888349797191609390598181896201870⟩⟩] +lemma tw0_1_5_19_calc (j : Fin 31) : taylorWaveBox 0 1 5 19 j = tw0_1_5_19 j := by + revert j + decide +kernel +def tw0_1_5_20 : Fin 31 → CI := ![⟨⟨28296686402927430580260761429466466505587957224337,28296686402927430580260761429466466505587957224387⟩,⟨19914773602800836131325143705159451784189054233465,19914773602800836131325143705159451784189054233514⟩⟩, + ⟨⟨-5497816911345303985090394844810480642847484020090,-5497816911345303985090394844810480642847484020069⟩,⟨-7118356117507561581567146679252565038451410812215,-7118356117507561581567146679252565038451410812194⟩⟩, + ⟨⟨182175186434029133307177283885302635902211699302,182175186434029133307177283885302635902211699307⟩,⟨1541422138324757937309462147084485776354638562407,1541422138324757937309462147084485776354638562412⟩⟩, + ⟨⟨97877041707754849304536439905609069059732110409,97877041707754849304536439905609069059732110411⟩,⟨-126082352035017641339181355904788452617334165432,-126082352035017641339181355904788452617334165430⟩⟩, + ⟨⟨-8494947724516617347435053051451802394475911004,-8494947724516617347435053051451802394475911003⟩,⟨-714649801881774751652643544580497576738296237,-714649801881774751652643544580497576738296236⟩⟩, + ⟨⟨64136642223524522759804827140010145132348046,64136642223524522759804827140010145132348047⟩,⟨188262694212133747309528338529238414800017918,188262694212133747309528338529238414800017919⟩⟩, + ⟨⟨1269352339396985276890397873407137496944979,1269352339396985276890397873407137496944980⟩,⟨-1033392555181479847112218108642264864628439,-1033392555181479847112218108642264864628438⟩⟩, + ⟨⟨-3402174711889813080920056719685688868756,-3402174711889813080920056719685688868755⟩,⟨-1422608197223309435861504320777561496682,-1422608197223309435861504320777561496681⟩⟩, + ⟨⟨918891274495763560357047595258564047,918891274495763560357047595258564048⟩,⟨1457349849998319290205325185688423847,1457349849998319290205325185688423848⟩⟩, + ⟨⟨-105428682124396534723835803786778,-105428682124396534723835803786776⟩,⟨-75295078027151773199481643228497,-75295078027151773199481643228496⟩⟩, + ⟨⟨-1368955773417295249745851,-1368955773417295249745844⟩,⟨-1392932215536441731786088098,-1392932215536441731786088090⟩⟩, + ⟨⟨-2486789339365151769513,-2486789339365151769486⟩,⟨994082042446724269822,994082042446724269847⟩⟩, + ⟨⟨-2153265235741422,-2153265235741302⟩,⟨435570821961153,435570821961263⟩⟩, + ⟨⟨-1882926704,-1882926231⟩,⟨-4176494826,-4176494353⟩⟩, + ⟨⟨262227,263492⟩,⟨184003,185268⟩⟩, + ⟨⟨8341,9891⟩,⟨-835,954⟩⟩, + ⟨⟨262227,263492⟩,⟨-185268,-184003⟩⟩, + ⟨⟨-1882926704,-1882926231⟩,⟨4176494353,4176494826⟩⟩, + ⟨⟨-2153265235741422,-2153265235741302⟩,⟨-435570821961263,-435570821961153⟩⟩, + ⟨⟨-2486789339365151769513,-2486789339365151769486⟩,⟨-994082042446724269847,-994082042446724269822⟩⟩, + ⟨⟨-1368955773417295249745851,-1368955773417295249745844⟩,⟨1392932215536441731786088090,1392932215536441731786088098⟩⟩, + ⟨⟨-105428682124396534723835803786778,-105428682124396534723835803786776⟩,⟨75295078027151773199481643228496,75295078027151773199481643228497⟩⟩, + ⟨⟨918891274495763560357047595258564047,918891274495763560357047595258564048⟩,⟨-1457349849998319290205325185688423848,-1457349849998319290205325185688423847⟩⟩, + ⟨⟨-3402174711889813080920056719685688868756,-3402174711889813080920056719685688868755⟩,⟨1422608197223309435861504320777561496681,1422608197223309435861504320777561496682⟩⟩, + ⟨⟨1269352339396985276890397873407137496944979,1269352339396985276890397873407137496944980⟩,⟨1033392555181479847112218108642264864628438,1033392555181479847112218108642264864628439⟩⟩, + ⟨⟨64136642223524522759804827140010145132348046,64136642223524522759804827140010145132348047⟩,⟨-188262694212133747309528338529238414800017919,-188262694212133747309528338529238414800017918⟩⟩, + ⟨⟨-8494947724516617347435053051451802394475911004,-8494947724516617347435053051451802394475911003⟩,⟨714649801881774751652643544580497576738296236,714649801881774751652643544580497576738296237⟩⟩, + ⟨⟨97877041707754849304536439905609069059732110409,97877041707754849304536439905609069059732110411⟩,⟨126082352035017641339181355904788452617334165430,126082352035017641339181355904788452617334165432⟩⟩, + ⟨⟨182175186434029133307177283885302635902211699302,182175186434029133307177283885302635902211699307⟩,⟨-1541422138324757937309462147084485776354638562412,-1541422138324757937309462147084485776354638562407⟩⟩, + ⟨⟨-5497816911345303985090394844810480642847484020090,-5497816911345303985090394844810480642847484020069⟩,⟨7118356117507561581567146679252565038451410812194,7118356117507561581567146679252565038451410812215⟩⟩, + ⟨⟨28296686402927430580260761429466466505587957224337,28296686402927430580260761429466466505587957224387⟩,⟨-19914773602800836131325143705159451784189054233514,-19914773602800836131325143705159451784189054233465⟩⟩] +lemma tw0_1_5_20_calc (j : Fin 31) : taylorWaveBox 0 1 5 20 j = tw0_1_5_20 j := by + revert j + decide +kernel +def tw0_1_5 : Fin 21 → Fin 31 → CI := ![tw0_1_5_0,tw0_1_5_1,tw0_1_5_2,tw0_1_5_3,tw0_1_5_4,tw0_1_5_5,tw0_1_5_6,tw0_1_5_7,tw0_1_5_8,tw0_1_5_9,tw0_1_5_10,tw0_1_5_11,tw0_1_5_12,tw0_1_5_13,tw0_1_5_14,tw0_1_5_15,tw0_1_5_16,tw0_1_5_17,tw0_1_5_18,tw0_1_5_19,tw0_1_5_20] +lemma tw0_1_5_mem (l : Fin 21) (j : Fin 31) : (tw0_1_5 l j).Mem (taylorWave 0 1 (nearNode 5) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 5 l j = tw0_1_5 l j := by + fin_cases l + · exact tw0_1_5_0_calc j + · exact tw0_1_5_1_calc j + · exact tw0_1_5_2_calc j + · exact tw0_1_5_3_calc j + · exact tw0_1_5_4_calc j + · exact tw0_1_5_5_calc j + · exact tw0_1_5_6_calc j + · exact tw0_1_5_7_calc j + · exact tw0_1_5_8_calc j + · exact tw0_1_5_9_calc j + · exact tw0_1_5_10_calc j + · exact tw0_1_5_11_calc j + · exact tw0_1_5_12_calc j + · exact tw0_1_5_13_calc j + · exact tw0_1_5_14_calc j + · exact tw0_1_5_15_calc j + · exact tw0_1_5_16_calc j + · exact tw0_1_5_17_calc j + · exact tw0_1_5_18_calc j + · exact tw0_1_5_19_calc j + · exact tw0_1_5_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 5 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave016.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave016.lean new file mode 100644 index 0000000000000000000000000000000000000000..43862b4b9f62b042e1c9fd3cb3d5d21b6bf4e51e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave016.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw0_1_6_0 : Fin 31 → CI := ![⟨⟨-272138619892155249459640474070076554277778463105600082012,-272138619892155249459640474070076554277778463103447822693⟩,⟨1529236198177308886771310744784832747479498481737797597223,1529236198177308886771310744784832747479498481739955711435⟩⟩, + ⟨⟨-10896323984269920919754793859912446335426168298571232854,-10896323984269920919754793859912446335426168298319881031⟩,⟨-106989933149098059783087966883002183940876447653877685450,-106989933149098059783087966883002183940876447653626162008⟩⟩, + ⟨⟨843411214615837541183839376413393414009691441941344735,843411214615837541183839376413393414009691441951393612⟩,⟨4381634809381109660199308960617843079370109438183103850,4381634809381109660199308960617843079370109438193155257⟩⟩, + ⟨⟨-10331024116589794639257683436001168562715424379358733,-10331024116589794639257683436001168562715424379044534⟩,⟨-97754410226939408181251841462427103148509462955215299,-97754410226939408181251841462427103148509462954901050⟩⟩, + ⟨⟨-112898797082230382184041968174551748471709426790100,-112898797082230382184041968174551748471709426786269⟩,⟨980988259352843919316868146003700787696634049805939,980988259352843919316868146003700787696634049809768⟩⟩, + ⟨⟨1431149836994569507456612239734362067065897494235,1431149836994569507456612239734362067065897494411⟩,⟨-3457805779421630328271897642472210049516955563870,-3457805779421630328271897642472210049516955563693⟩⟩, + ⟨⟨-2356815683624462697040431848201567927731539030,-2356815683624462697040431848201567927731538812⟩,⟨3532445441338262290234617687778455693051714102,3532445441338262290234617687778455693051714317⟩⟩, + ⟨⟨491347054035880068455831521427579829003267,491347054035880068455831521427579829003506⟩,⟨-985755760802177817977170538929543587406748,-985755760802177817977170538929543587406499⟩⟩, + ⟨⟨18137598583548164704192959669363572779,18137598583548164704192959669363573066⟩,⟨45419255455220550081005184938873389362,45419255455220550081005184938873389649⟩⟩, + ⟨⟨-159174216296260382203848928693756,-159174216296260382203848928693422⟩,⟨241369960751018399969182085213858,241369960751018399969182085214165⟩⟩, + ⟨⟨135447129702194885077739991,135447129702194885077740353⟩,⟨158391396067747154500671225,158391396067747154500671586⟩⟩, + ⟨⟨-17864593740034799492,-17864593740034798924⟩,⟨17339647125390093866,17339647125390094464⟩⟩, + ⟨⟨759150208032,759150208739⟩,⟨-1163999628933,-1163999628225⟩⟩, + ⟨⟨-188783,-187975⟩,⟨211435,212243⟩⟩, + ⟨⟨-311,519⟩,⟨-187,571⟩⟩, + ⟨⟨-318,508⟩,⟨-507,508⟩⟩, + ⟨⟨-333,519⟩,⟨-571,246⟩⟩, + ⟨⟨-188783,-187975⟩,⟨-212242,-211434⟩⟩, + ⟨⟨759150208032,759150208739⟩,⟨1163999628225,1163999628934⟩⟩, + ⟨⟨-17864593740034799492,-17864593740034798924⟩,⟨-17339647125390094464,-17339647125390093865⟩⟩, + ⟨⟨135447129702194885077739991,135447129702194885077740353⟩,⟨-158391396067747154500671586,-158391396067747154500671225⟩⟩, + ⟨⟨-159174216296260382203848928693756,-159174216296260382203848928693422⟩,⟨-241369960751018399969182085214165,-241369960751018399969182085213857⟩⟩, + ⟨⟨18137598583548164704192959669363572779,18137598583548164704192959669363573066⟩,⟨-45419255455220550081005184938873389648,-45419255455220550081005184938873389362⟩⟩, + ⟨⟨491347054035880068455831521427579829003267,491347054035880068455831521427579829003506⟩,⟨985755760802177817977170538929543587406499,985755760802177817977170538929543587406748⟩⟩, + ⟨⟨-2356815683624462697040431848201567927731539030,-2356815683624462697040431848201567927731538812⟩,⟨-3532445441338262290234617687778455693051714317,-3532445441338262290234617687778455693051714102⟩⟩, + ⟨⟨1431149836994569507456612239734362067065897494235,1431149836994569507456612239734362067065897494411⟩,⟨3457805779421630328271897642472210049516955563693,3457805779421630328271897642472210049516955563870⟩⟩, + ⟨⟨-112898797082230382184041968174551748471709426790100,-112898797082230382184041968174551748471709426786269⟩,⟨-980988259352843919316868146003700787696634049809767,-980988259352843919316868146003700787696634049805938⟩⟩, + ⟨⟨-10331024116589794639257683436001168562715424379358733,-10331024116589794639257683436001168562715424379044534⟩,⟨97754410226939408181251841462427103148509462954901050,97754410226939408181251841462427103148509462955215300⟩⟩, + ⟨⟨843411214615837541183839376413393414009691441941344735,843411214615837541183839376413393414009691441951393612⟩,⟨-4381634809381109660199308960617843079370109438193155257,-4381634809381109660199308960617843079370109438183103850⟩⟩, + ⟨⟨-10896323984269920919754793859912446335426168298571232854,-10896323984269920919754793859912446335426168298319881031⟩,⟨106989933149098059783087966883002183940876447653626162008,106989933149098059783087966883002183940876447653877685450⟩⟩, + ⟨⟨-272138619892155249459640474070076554277778463105600082012,-272138619892155249459640474070076554277778463103447822693⟩,⟨-1529236198177308886771310744784832747479498481739955711435,-1529236198177308886771310744784832747479498481737797597223⟩⟩] +lemma tw0_1_6_0_calc (j : Fin 31) : taylorWaveBox 0 1 6 0 j = tw0_1_6_0 j := by + revert j + decide +kernel +def tw0_1_6_1 : Fin 31 → CI := ![⟨⟨-2134010639581424942434254574015812960088005208789075590411,-2134010639581424942434254574015812960088005208785717555953⟩,⟨-742635931051638637686229746702677446933567334457583728329,-742635931051638637686229746702677446933567334454235968768⟩⟩, + ⟨⟨164552832650890682521263212694336240547607131204712136700,164552832650890682521263212694336240547607131205123105892⟩,⟨15974539443770880426213935443444507268969292947455541937,15974539443770880426213935443444507268969292947866217220⟩⟩, + ⟨⟨-7262245073643179719741543191898330785730600016009544340,-7262245073643179719741543191898330785730600015992379279⟩,⟨-369585521259937269251343425027620699392119331563699475,-369585521259937269251343425027620699392119331546538497⟩⟩, + ⟨⟨167555184225605045294769670519895692396016940188857936,167555184225605045294769670519895692396016940189414114⟩,⟨30886666035031620907193969508100322396232860709083206,30886666035031620907193969508100322396232860709639323⟩⟩, + ⟨⟨-1642165639311950885317581832033539083871258063654812,-1642165639311950885317581832033539083871258063647860⟩,⟨-799949409691980836672764211799645407644003201074745,-799949409691980836672764211799645407644003201067804⟩⟩, + ⟨⟨5230488452267252303134334704538026563501025327920,5230488452267252303134334704538026563501025328240⟩,⟨5254940041347001558124692617331497122390324314575,5254940041347001558124692617331497122390324314896⟩⟩, + ⟨⟨-4524208881945227094246494805359944297181350639,-4524208881945227094246494805359944297181350272⟩,⟨-7829602280204042028769568188018342918829006663,-7829602280204042028769568188018342918829006262⟩⟩, + ⟨⟨1383591120847252220277736844911836515320706,1383591120847252220277736844911836515321151⟩,⟨2117252770377236056417806745689766968331617,2117252770377236056417806745689766968332008⟩⟩, + ⟨⟨-118236332259164342707553214081579884649,-118236332259164342707553214081579883974⟩,⟨-27725855061257723345222971462731229836,-27725855061257723345222971462731229160⟩⟩, + ⟨⟨-218879851756351045974436594954554,-218879851756351045974436594953547⟩,⟨-746258756632085408809900550099140,-746258756632085408809900550098103⟩⟩, + ⟨⟨-604050249352705276620651239,-604050249352705276620649825⟩,⟨-61159258941948587948656765,-61159258941948587948655351⟩⟩, + ⟨⟨12433402498988106052,12433402498988107899⟩,⟨-77317938702877386739,-77317938702877384809⟩⟩, + ⟨⟨-354043556765,-354043554933⟩,⟨4671755994307,4671755996140⟩⟩, + ⟨⟨373627,376423⟩,⟨-940397,-937601⟩⟩, + ⟨⟨-2108,1100⟩,⟨-2154,893⟩⟩, + ⟨⟨-1900,1188⟩,⟨-1900,1900⟩⟩, + ⟨⟨-2108,1216⟩,⟨-1089,2154⟩⟩, + ⟨⟨373627,376423⟩,⟨937601,940397⟩⟩, + ⟨⟨-354043556765,-354043554933⟩,⟨-4671755996139,-4671755994307⟩⟩, + ⟨⟨12433402498988106052,12433402498988107899⟩,⟨77317938702877384809,77317938702877386739⟩⟩, + ⟨⟨-604050249352705276620651239,-604050249352705276620649825⟩,⟨61159258941948587948655351,61159258941948587948656765⟩⟩, + ⟨⟨-218879851756351045974436594954554,-218879851756351045974436594953547⟩,⟨746258756632085408809900550098103,746258756632085408809900550099140⟩⟩, + ⟨⟨-118236332259164342707553214081579884649,-118236332259164342707553214081579883974⟩,⟨27725855061257723345222971462731229161,27725855061257723345222971462731229836⟩⟩, + ⟨⟨1383591120847252220277736844911836515320706,1383591120847252220277736844911836515321151⟩,⟨-2117252770377236056417806745689766968332007,-2117252770377236056417806745689766968331617⟩⟩, + ⟨⟨-4524208881945227094246494805359944297181350639,-4524208881945227094246494805359944297181350272⟩,⟨7829602280204042028769568188018342918829006262,7829602280204042028769568188018342918829006663⟩⟩, + ⟨⟨5230488452267252303134334704538026563501025327920,5230488452267252303134334704538026563501025328240⟩,⟨-5254940041347001558124692617331497122390324314896,-5254940041347001558124692617331497122390324314575⟩⟩, + ⟨⟨-1642165639311950885317581832033539083871258063654812,-1642165639311950885317581832033539083871258063647860⟩,⟨799949409691980836672764211799645407644003201067804,799949409691980836672764211799645407644003201074745⟩⟩, + ⟨⟨167555184225605045294769670519895692396016940188857936,167555184225605045294769670519895692396016940189414114⟩,⟨-30886666035031620907193969508100322396232860709639323,-30886666035031620907193969508100322396232860709083206⟩⟩, + ⟨⟨-7262245073643179719741543191898330785730600016009544340,-7262245073643179719741543191898330785730600015992379279⟩,⟨369585521259937269251343425027620699392119331546538497,369585521259937269251343425027620699392119331563699475⟩⟩, + ⟨⟨164552832650890682521263212694336240547607131204712136700,164552832650890682521263212694336240547607131205123105892⟩,⟨-15974539443770880426213935443444507268969292947866217220,-15974539443770880426213935443444507268969292947455541937⟩⟩, + ⟨⟨-2134010639581424942434254574015812960088005208789075590411,-2134010639581424942434254574015812960088005208785717555953⟩,⟨742635931051638637686229746702677446933567334454235968769,742635931051638637686229746702677446933567334457583728330⟩⟩] +lemma tw0_1_6_1_calc (j : Fin 31) : taylorWaveBox 0 1 6 1 j = tw0_1_6_1 j := by + revert j + decide +kernel +def tw0_1_6_2 : Fin 31 → CI := ![⟨⟨1168172438703563584178298480886485632904122293133389779372,1168172438703563584178298480886485632904122293137189700291⟩,⟨-2170871185262296212302097087422654800323424664254105564597,-2170871185262296212302097087422654800323424664250293999388⟩⟩, + ⟨⟨-55428206643091482619982643702220396496560252842954191794,-55428206643091482619982643702220396496560252842470973456⟩,⟨182380457165075735435447899561291466639570433376788877108,182380457165075735435447899561291466639570433377272409647⟩⟩, + ⟨⟨2557271940775630097674580509875306730929217812181515815,2557271940775630097674580509875306730929217812202254632⟩,⟨-8511863112273515891938428043563460488415591447172276773,-8511863112273515891938428043563460488415591447151534153⟩⟩, + ⟨⟨-100281952486682852476475221781404404496976503821930821,-100281952486682852476475221781404404496976503821251740⟩,⟨197480092224719116573548708645498993456639958684103762,197480092224719116573548708645498993456639958684782862⟩⟩, + ⟨⟨1803798517635798739341215242324516513556096399781771,1803798517635798739341215242324516513556096399790117⟩,⟨-1780080814243884989445027917320336226967392930741027,-1780080814243884989445027917320336226967392930732651⟩⟩, + ⟨⟨-10199252966138801847205534665356792686694576973727,-10199252966138801847205534665356792686694576973358⟩,⟨4165754555690244532115967757898871692116838699793,4165754555690244532115967757898871692116838700162⟩⟩, + ⟨⟨14411137463602288493178675545916143880890364207,14411137463602288493178675545916143880890364871⟩,⟨-945164038483455307091367182146556756704464531,-945164038483455307091367182146556756704463917⟩⟩, + ⟨⟨-4350724494827603767570749308039391877942078,-4350724494827603767570749308039391877941125⟩,⟨214444078212862107899747823648324572280613,214444078212862107899747823648324572281597⟩⟩, + ⟨⟨168509058426174027048637216998240513183,168509058426174027048637216998240514630⟩,⟨-150860701971349516125474811838943172674,-150860701971349516125474811838943171226⟩⟩, + ⟨⟨1434310103735800629540827416329663,1434310103735800629540827416331518⟩,⟨635705120858899187191016453257873,635705120858899187191016453259838⟩⟩, + ⟨⟨1046729436076026083468763638,1046729436076026083468766019⟩,⟨-814916037769183938716094593,-814916037769183938716092213⟩⟩, + ⟨⟨85545884329982055375,85545884329982060225⟩,⟨163749764943329516178,163749764943329520933⟩⟩, + ⟨⟨-4902253959489,-4902253953689⟩,⟨-10784729231912,-10784729226112⟩⟩, + ⟨⟨-92722,-86354⟩,⟨2700168,2706536⟩⟩, + ⟨⟨-2817,6190⟩,⟨-2960,5912⟩⟩, + ⟨⟨-3340,5343⟩,⟨-5343,5343⟩⟩, + ⟨⟨-3231,6190⟩,⟨-5912,3441⟩⟩, + ⟨⟨-92722,-86354⟩,⟨-2706536,-2700168⟩⟩, + ⟨⟨-4902253959489,-4902253953689⟩,⟨10784729226112,10784729231912⟩⟩, + ⟨⟨85545884329982055375,85545884329982060225⟩,⟨-163749764943329520933,-163749764943329516178⟩⟩, + ⟨⟨1046729436076026083468763638,1046729436076026083468766019⟩,⟨814916037769183938716092213,814916037769183938716094593⟩⟩, + ⟨⟨1434310103735800629540827416329663,1434310103735800629540827416331518⟩,⟨-635705120858899187191016453259838,-635705120858899187191016453257873⟩⟩, + ⟨⟨168509058426174027048637216998240513183,168509058426174027048637216998240514630⟩,⟨150860701971349516125474811838943171226,150860701971349516125474811838943172674⟩⟩, + ⟨⟨-4350724494827603767570749308039391877942078,-4350724494827603767570749308039391877941125⟩,⟨-214444078212862107899747823648324572281597,-214444078212862107899747823648324572280613⟩⟩, + ⟨⟨14411137463602288493178675545916143880890364207,14411137463602288493178675545916143880890364871⟩,⟨945164038483455307091367182146556756704463917,945164038483455307091367182146556756704464531⟩⟩, + ⟨⟨-10199252966138801847205534665356792686694576973727,-10199252966138801847205534665356792686694576973358⟩,⟨-4165754555690244532115967757898871692116838700162,-4165754555690244532115967757898871692116838699792⟩⟩, + ⟨⟨1803798517635798739341215242324516513556096399781771,1803798517635798739341215242324516513556096399790117⟩,⟨1780080814243884989445027917320336226967392930732651,1780080814243884989445027917320336226967392930741027⟩⟩, + ⟨⟨-100281952486682852476475221781404404496976503821930821,-100281952486682852476475221781404404496976503821251740⟩,⟨-197480092224719116573548708645498993456639958684782861,-197480092224719116573548708645498993456639958684103762⟩⟩, + ⟨⟨2557271940775630097674580509875306730929217812181515815,2557271940775630097674580509875306730929217812202254632⟩,⟨8511863112273515891938428043563460488415591447151534153,8511863112273515891938428043563460488415591447172276774⟩⟩, + ⟨⟨-55428206643091482619982643702220396496560252842954191794,-55428206643091482619982643702220396496560252842470973456⟩,⟨-182380457165075735435447899561291466639570433377272409647,-182380457165075735435447899561291466639570433376788877108⟩⟩, + ⟨⟨1168172438703563584178298480886485632904122293133389779372,1168172438703563584178298480886485632904122293137189700291⟩,⟨2170871185262296212302097087422654800323424664250293999388,2170871185262296212302097087422654800323424664254105564597⟩⟩] +lemma tw0_1_6_2_calc (j : Fin 31) : taylorWaveBox 0 1 6 2 j = tw0_1_6_2 j := by + revert j + decide +kernel +def tw0_1_6_3 : Fin 31 → CI := ![⟨⟨1709739267290126695774139169565843398889419578058406625610,1709739267290126695774139169565843398889419578061780475891⟩,⟨1306370809138003164110031945577322328547965726692895751584,1306370809138003164110031945577322328547965726696260185075⟩⟩, + ⟨⟨-154857950408128598778587419274068511874034749015149225072,-154857950408128598778587419274068511874034749014711486209⟩,⟨-83259886871363296533621226704653628558140669439504573560,-83259886871363296533621226704653628558140669439067057109⟩⟩, + ⟨⟨7485476190770356074032071922961775744893088099950301422,7485476190770356074032071922961775744893088099969198624⟩,⟨4414738689788652956705288331718338707565529160121460835,4414738689788652956705288331718338707565529160140356299⟩⟩, + ⟨⟨-167357206048143249627955156025620535702916646699324070,-167357206048143249627955156025620535702916646698720807⟩,⟨-158257094530739644290100842007879371179191839376760952,-158257094530739644290100842007879371179191839376157633⟩⟩, + ⟨⟨1198225659251406794973979248379188559082051983077796,1198225659251406794973979248379188559082051983086530⟩,⟨2544768569973885759791314618163076043573375105517998,2544768569973885759791314618163076043573375105526695⟩⟩, + ⟨⟨98864940360361745367780866670646729269714143875,98864940360361745367780866670646729269714144445⟩,⟨-13096227087055420647355425557536579667696350953893,-13096227087055420647355425557536579667696350953323⟩⟩, + ⟨⟨-7066138928649803383818957134552091629497258149,-7066138928649803383818957134552091629497257213⟩,⟨17045738093688306514885442192728937189554788852,17045738093688306514885442192728937189554789796⟩⟩, + ⟨⟨2773183592121523901133821824821566702242382,2773183592121523901133821824821566702243670⟩,⟨-5322605716663375969339142153290831328487564,-5322605716663375969339142153290831328486223⟩⟩, + ⟨⟨40315184208978422379992327672320740423,40315184208978422379992327672320742085⟩,⟨334554176693129023937033809021946419621,334554176693129023937033809021946421283⟩⟩, + ⟨⟨-2278678001792748143601668115017714,-2278678001792748143601668115014495⟩,⟨1103830096250596754356318593057995,1103830096250596754356318593061051⟩⟩, + ⟨⟨-339307570235069268239443651,-339307570235069268239438278⟩,⟨2293760111009348623790436140,2293760111009348623790441514⟩⟩, + ⟨⟨-314194570455442124464,-314194570455442117226⟩,⟨-151196506182249786424,-151196506182249779770⟩⟩, + ⟨⟨19194225103993,19194225116318⟩,⟨14347290586357,14347290598681⟩⟩, + ⟨⟨-1793281,-1779843⟩,⟨-5512657,-5499219⟩⟩, + ⟨⟨-14069,5537⟩,⟨-12572,7440⟩⟩, + ⟨⟨-12024,7515⟩,⟨-12024,12024⟩⟩, + ⟨⟨-14069,6629⟩,⟨-8329,12572⟩⟩, + ⟨⟨-1793281,-1779843⟩,⟨5499219,5512657⟩⟩, + ⟨⟨19194225103993,19194225116318⟩,⟨-14347290598681,-14347290586357⟩⟩, + ⟨⟨-314194570455442124464,-314194570455442117226⟩,⟨151196506182249779770,151196506182249786424⟩⟩, + ⟨⟨-339307570235069268239443651,-339307570235069268239438278⟩,⟨-2293760111009348623790441514,-2293760111009348623790436140⟩⟩, + ⟨⟨-2278678001792748143601668115017714,-2278678001792748143601668115014495⟩,⟨-1103830096250596754356318593061051,-1103830096250596754356318593057995⟩⟩, + ⟨⟨40315184208978422379992327672320740423,40315184208978422379992327672320742085⟩,⟨-334554176693129023937033809021946421283,-334554176693129023937033809021946419621⟩⟩, + ⟨⟨2773183592121523901133821824821566702242382,2773183592121523901133821824821566702243670⟩,⟨5322605716663375969339142153290831328486223,5322605716663375969339142153290831328487564⟩⟩, + ⟨⟨-7066138928649803383818957134552091629497258149,-7066138928649803383818957134552091629497257213⟩,⟨-17045738093688306514885442192728937189554789796,-17045738093688306514885442192728937189554788852⟩⟩, + ⟨⟨98864940360361745367780866670646729269714143875,98864940360361745367780866670646729269714144445⟩,⟨13096227087055420647355425557536579667696350953323,13096227087055420647355425557536579667696350953893⟩⟩, + ⟨⟨1198225659251406794973979248379188559082051983077796,1198225659251406794973979248379188559082051983086530⟩,⟨-2544768569973885759791314618163076043573375105526695,-2544768569973885759791314618163076043573375105517998⟩⟩, + ⟨⟨-167357206048143249627955156025620535702916646699324070,-167357206048143249627955156025620535702916646698720807⟩,⟨158257094530739644290100842007879371179191839376157633,158257094530739644290100842007879371179191839376760952⟩⟩, + ⟨⟨7485476190770356074032071922961775744893088099950301422,7485476190770356074032071922961775744893088099969198624⟩,⟨-4414738689788652956705288331718338707565529160140356299,-4414738689788652956705288331718338707565529160121460835⟩⟩, + ⟨⟨-154857950408128598778587419274068511874034749015149225072,-154857950408128598778587419274068511874034749014711486209⟩,⟨83259886871363296533621226704653628558140669439067057109,83259886871363296533621226704653628558140669439504573560⟩⟩, + ⟨⟨1709739267290126695774139169565843398889419578058406625610,1709739267290126695774139169565843398889419578061780475891⟩,⟨-1306370809138003164110031945577322328547965726696260185075,-1306370809138003164110031945577322328547965726692895751584⟩⟩] +lemma tw0_1_6_3_calc (j : Fin 31) : taylorWaveBox 0 1 6 3 j = tw0_1_6_3 j := by + revert j + decide +kernel +def tw0_1_6_4 : Fin 31 → CI := ![⟨⟨-1134865156275373404882938989588773238654122146001810184947,-1134865156275373404882938989588773238654122145999387851012⟩,⟨1077703092523570506523671422903274150694933302235322683515,1077703092523570506523671422903274150694933302237750626746⟩⟩, + ⟨⟨86189947014151439890650016759544468713584281771075222719,86189947014151439890650016759544468713584281771392314204⟩,⟨-104093760141486209692729854249932770160968125818348276410,-104093760141486209692729854249932770160968125818031092520⟩⟩, + ⟨⟨-4949103805596351828146738628605607261675279470107449432,-4949103805596351828146738628605607261675279470094049865⟩,⟨5064488680287385859714254299694625430407331882932467267,5064488680287385859714254299694625430407331882945866190⟩⟩, + ⟨⟨172656300267496627218178960863071081445783504325035027,172656300267496627218178960863071081445783504325568382⟩,⟨-100180138241716176951609125441640543616369610177403037,-100180138241716176951609125441640543616369610176869784⟩⟩, + ⟨⟨-2588216106977036567020729138192775171153347931101816,-2588216106977036567020729138192775171153347931092117⟩,⟨263210010731958963725872940450643763907903861469143,263210010731958963725872940450643763907903861478858⟩⟩, + ⟨⟨11935131534450388052064508926695207691938637695530,11935131534450388052064508926695207691938637696138⟩,⟨5086329190102518647579511744419247969285961621135,5086329190102518647579511744419247969285961621743⟩⟩, + ⟨⟨-12945118158714300883470364679948636222007817920,-12945118158714300883470364679948636222007817021⟩,⟨-14778929367263445639582444089073942919430246721,-14778929367263445639582444089073942919430245770⟩⟩, + ⟨⟨3665675843697290352790133730329090487874311,3665675843697290352790133730329090487875536⟩,⟨5835124833917254577205351254470822869470543,5835124833917254577205351254470822869471626⟩⟩, + ⟨⟨-369083837336446470899594124863457199964,-369083837336446470899594124863457197371⟩,⟨-197027338835657167989722321374345028688,-197027338835657167989722321374345026095⟩⟩, + ⟨⟨847059053157470449960773299773593,847059053157470449960773299778091⟩,⟨-3298172430665998191241233393068809,-3298172430665998191241233393064465⟩⟩, + ⟨⟨-1950205090941027474418197398,-1950205090941027474418191113⟩,⟨-2757545158612012624854925601,-2757545158612012624854919317⟩⟩, + ⟨⟨538282187307154479748,538282187307154494321⟩,⟨-104837065213340402763,-104837065213340388304⟩⟩, + ⟨⟨-40002647044796,-40002647028152⟩,⟨-5621392215791,-5621392199146⟩⟩, + ⟨⟨6320300,6348676⟩,⟨8137092,8165469⟩⟩, + ⟨⟨-8595,25815⟩,⟨-14941,21502⟩⟩, + ⟨⟨-14093,22548⟩,⟨-22548,22548⟩⟩, + ⟨⟨-10875,25815⟩,⟨-21502,16204⟩⟩, + ⟨⟨6320300,6348676⟩,⟨-8165469,-8137092⟩⟩, + ⟨⟨-40002647044796,-40002647028152⟩,⟨5621392199146,5621392215791⟩⟩, + ⟨⟨538282187307154479748,538282187307154494321⟩,⟨104837065213340388304,104837065213340402763⟩⟩, + ⟨⟨-1950205090941027474418197398,-1950205090941027474418191113⟩,⟨2757545158612012624854919317,2757545158612012624854925601⟩⟩, + ⟨⟨847059053157470449960773299773593,847059053157470449960773299778091⟩,⟨3298172430665998191241233393064465,3298172430665998191241233393068809⟩⟩, + ⟨⟨-369083837336446470899594124863457199964,-369083837336446470899594124863457197371⟩,⟨197027338835657167989722321374345026095,197027338835657167989722321374345028688⟩⟩, + ⟨⟨3665675843697290352790133730329090487874311,3665675843697290352790133730329090487875536⟩,⟨-5835124833917254577205351254470822869471626,-5835124833917254577205351254470822869470543⟩⟩, + ⟨⟨-12945118158714300883470364679948636222007817920,-12945118158714300883470364679948636222007817021⟩,⟨14778929367263445639582444089073942919430245770,14778929367263445639582444089073942919430246721⟩⟩, + ⟨⟨11935131534450388052064508926695207691938637695530,11935131534450388052064508926695207691938637696138⟩,⟨-5086329190102518647579511744419247969285961621743,-5086329190102518647579511744419247969285961621135⟩⟩, + ⟨⟨-2588216106977036567020729138192775171153347931101816,-2588216106977036567020729138192775171153347931092117⟩,⟨-263210010731958963725872940450643763907903861478858,-263210010731958963725872940450643763907903861469143⟩⟩, + ⟨⟨172656300267496627218178960863071081445783504325035027,172656300267496627218178960863071081445783504325568382⟩,⟨100180138241716176951609125441640543616369610176869784,100180138241716176951609125441640543616369610177403037⟩⟩, + ⟨⟨-4949103805596351828146738628605607261675279470107449432,-4949103805596351828146738628605607261675279470094049865⟩,⟨-5064488680287385859714254299694625430407331882945866190,-5064488680287385859714254299694625430407331882932467267⟩⟩, + ⟨⟨86189947014151439890650016759544468713584281771075222719,86189947014151439890650016759544468713584281771392314204⟩,⟨104093760141486209692729854249932770160968125818031092520,104093760141486209692729854249932770160968125818348276410⟩⟩, + ⟨⟨-1134865156275373404882938989588773238654122146001810184947,-1134865156275373404882938989588773238654122145999387851012⟩,⟨-1077703092523570506523671422903274150694933302237750626746,-1077703092523570506523671422903274150694933302235322683515⟩⟩] +lemma tw0_1_6_4_calc (j : Fin 31) : taylorWaveBox 0 1 6 4 j = tw0_1_6_4 j := by + revert j + decide +kernel +def tw0_1_6_5 : Fin 31 → CI := ![⟨⟨-551568407039691515477646345251917669610739371277482987179,-551568407039691515477646345251917669610739371276022491174⟩,⟨-804859747003099413643311977957816597306618263599041800202,-804859747003099413643311977957816597306618263597583668947⟩⟩, + ⟨⟨56052591719617226925758227680179061614016024184585504190,56052591719617226925758227680179061614016024184773781775⟩,⟨69181835664400742610652704718746845351205267617280487610,69181835664400742610652704718746845351205267617468768802⟩⟩, + ⟨⟨-2609904180815740798675474645821571629609885381571670214,-2609904180815740798675474645821571629609885381562323319⟩,⟨-4200932236858362487751745756001217763652805083195773925,-4200932236858362487751745756001217763652805083186425041⟩⟩, + ⟨⟨34983124754235533312923584000536300594946202492448341,34983124754235533312923584000536300594946202492911125⟩,⟨144094261069148363360965973107518234143264705354095006,144094261069148363360965973107518234143264705354557877⟩⟩, + ⟨⟨484986523001341477149753792261402810959684147121468,484986523001341477149753792261402810959684147129610⟩,⟨-2004652434667017574870094499273652898711159512261717,-2004652434667017574870094499273652898711159512253573⟩⟩, + ⟨⟨-7888319673662137164978232164344479013773317746652,-7888319673662137164978232164344479013773317746178⟩,⟨7689443289713084910210642789769698799788254574049,7689443289713084910210642789769698799788254574523⟩⟩, + ⟨⟨17323373323364359938175809926995062672367428965,17323373323364359938175809926995062672367429695⟩,⟨-4624712981713545354307198333373091008935240357,-4624712981713545354307198333373091008935239708⟩⟩, + ⟨⟨-6778418426317689280612135852309216191650554,-6778418426317689280612135852309216191649064⟩,⟨212451707360862752812560088035916216692093,212451707360862752812560088035916216693629⟩⟩, + ⟨⟨396929846816991544531374593831287721048,396929846816991544531374593831287723739⟩,⟨-201719428450873408171699027350844350824,-201719428450873408171699027350844348134⟩⟩, + ⟨⟨2270900725871099141252482483633496,2270900725871099141252482483637769⟩,⟨3201842830595910227178541137886788,3201842830595910227178541137891404⟩⟩, + ⟨⟨4138719320310135033219823150,4138719320310135033219832860⟩,⟨808058149512705585119501125,808058149512705585119510834⟩⟩, + ⟨⟨-497168878627896761268,-497168878627896745119⟩,⟨547147074029425267578,547147074029425284719⟩⟩, + ⟨⟨54570593670873,54570593698724⟩,⟨-20706632361494,-20706632333643⟩⟩, + ⟨⟨-13364732,-13319779⟩,⟨-8448786,-8403833⟩⟩, + ⟨⟨-39313,10583⟩,⟨-30239,24816⟩⟩, + ⟨⟨-36243,22652⟩,⟨-36243,36243⟩⟩, + ⟨⟨-39313,14497⟩,⟨-26150,30239⟩⟩, + ⟨⟨-13364732,-13319779⟩,⟨8403833,8448786⟩⟩, + ⟨⟨54570593670873,54570593698724⟩,⟨20706632333643,20706632361494⟩⟩, + ⟨⟨-497168878627896761268,-497168878627896745119⟩,⟨-547147074029425284719,-547147074029425267578⟩⟩, + ⟨⟨4138719320310135033219823150,4138719320310135033219832860⟩,⟨-808058149512705585119510834,-808058149512705585119501125⟩⟩, + ⟨⟨2270900725871099141252482483633496,2270900725871099141252482483637769⟩,⟨-3201842830595910227178541137891404,-3201842830595910227178541137886788⟩⟩, + ⟨⟨396929846816991544531374593831287721048,396929846816991544531374593831287723739⟩,⟨201719428450873408171699027350844348134,201719428450873408171699027350844350824⟩⟩, + ⟨⟨-6778418426317689280612135852309216191650554,-6778418426317689280612135852309216191649064⟩,⟨-212451707360862752812560088035916216693629,-212451707360862752812560088035916216692093⟩⟩, + ⟨⟨17323373323364359938175809926995062672367428965,17323373323364359938175809926995062672367429695⟩,⟨4624712981713545354307198333373091008935239708,4624712981713545354307198333373091008935240357⟩⟩, + ⟨⟨-7888319673662137164978232164344479013773317746652,-7888319673662137164978232164344479013773317746178⟩,⟨-7689443289713084910210642789769698799788254574523,-7689443289713084910210642789769698799788254574049⟩⟩, + ⟨⟨484986523001341477149753792261402810959684147121468,484986523001341477149753792261402810959684147129610⟩,⟨2004652434667017574870094499273652898711159512253573,2004652434667017574870094499273652898711159512261717⟩⟩, + ⟨⟨34983124754235533312923584000536300594946202492448341,34983124754235533312923584000536300594946202492911125⟩,⟨-144094261069148363360965973107518234143264705354557877,-144094261069148363360965973107518234143264705354095006⟩⟩, + ⟨⟨-2609904180815740798675474645821571629609885381571670214,-2609904180815740798675474645821571629609885381562323319⟩,⟨4200932236858362487751745756001217763652805083186425041,4200932236858362487751745756001217763652805083195773925⟩⟩, + ⟨⟨56052591719617226925758227680179061614016024184585504190,56052591719617226925758227680179061614016024184773781775⟩,⟨-69181835664400742610652704718746845351205267617468768802,-69181835664400742610652704718746845351205267617280487610⟩⟩, + ⟨⟨-551568407039691515477646345251917669610739371277482987179,-551568407039691515477646345251917669610739371276022491174⟩,⟨804859747003099413643311977957816597306618263597583668947,804859747003099413643311977957816597306618263599041800202⟩⟩] +lemma tw0_1_6_5_calc (j : Fin 31) : taylorWaveBox 0 1 6 5 j = tw0_1_6_5 j := by + revert j + decide +kernel +def tw0_1_6_6 : Fin 31 → CI := ![⟨⟨481113693276067173093733660035827509753290266291821338492,481113693276067173093733660035827509753290266292569204588⟩,⟨-227682468199568491455044780231871459345626046691039110884,-227682468199568491455044780231871459345626046690290727663⟩⟩, + ⟨⟨-45466034913675640632486659138568888535176380724585601986,-45466034913675640632486659138568888535176380724490258092⟩,⟨23824780253865287629985741701465779132920744362790466841,23824780253865287629985741701465779132920744362885766974⟩⟩, + ⟨⟨2873770693329734351052027520706485341736677078036963990,2873770693329734351052027520706485341736677078043606589⟩,⟨-936103706933085717188185392992467575016509965489848189,-936103706933085717188185392992467575016509965483207459⟩⟩, + ⟨⟨-96260779008554036065446859242974981731895169627894328,-96260779008554036065446859242974981731895169627574117⟩,⟨-4760324426006525401757244116005823192571657442686729,-4760324426006525401757244116005823192571657442366564⟩⟩, + ⟨⟨1199803835008133483376723913676727093137342138223786,1199803835008133483376723913676727093137342138229125⟩,⟨779379221678131031060970824398857650049411123708401,779379221678131031060970824398857650049411123713728⟩⟩, + ⟨⟨-3015462832126146271272332891805254611142360185720,-3015462832126146271272332891805254611142360185443⟩,⟨-7608775821299505442976305189091169212612836937224,-7608775821299505442976305189091169212612836936947⟩⟩, + ⟨⟨-2810715737043336106018833745000497634474675839,-2810715737043336106018833745000497634474675145⟩,⟨14039402247111506093064721988411353101719378510,14039402247111506093064721988411353101719379229⟩⟩, + ⟨⟨2790791695224913183360891272817247596336443,2790791695224913183360891272817247596337688⟩,⟨-5129959718946573305743630339286929395753719,-5129959718946573305743630339286929395752419⟩⟩, + ⟨⟨-57889570472255511054408729261131046388,-57889570472255511054408729261131044214⟩,⟨410545304073122255991884267277413993664,410545304073122255991884267277413995837⟩⟩, + ⟨⟨-3944936090694189688507242437255440,-3944936090694189688507242437250158⟩,⟨-338479164798062935636975744137381,-338479164798062935636975744132022⟩⟩, + ⟨⟨-3879420374939463835866971049,-3879420374939463835866962189⟩,⟨2484408749534753967292269573,2484408749534753967292278433⟩⟩, + ⟨⟨84206647735435662706,84206647735435683892⟩,⟨-867973905446946510537,-867973905446946488551⟩⟩, + ⟨⟨-47867861504104,-47867861465853⟩,⟨56159712542544,56159712580795⟩⟩, + ⟨⟨20586939,20642012⟩,⟨4504966,4560040⟩⟩, + ⟨⟨-9992,50578⟩,⟨-34912,35280⟩⟩, + ⟨⟨-31860,50975⟩,⟨-50975,50975⟩⟩, + ⟨⟨-15666,50578⟩,⟨-35280,35775⟩⟩, + ⟨⟨20586939,20642012⟩,⟨-4560040,-4504966⟩⟩, + ⟨⟨-47867861504104,-47867861465853⟩,⟨-56159712580795,-56159712542544⟩⟩, + ⟨⟨84206647735435662706,84206647735435683892⟩,⟨867973905446946488551,867973905446946510537⟩⟩, + ⟨⟨-3879420374939463835866971049,-3879420374939463835866962189⟩,⟨-2484408749534753967292278433,-2484408749534753967292269573⟩⟩, + ⟨⟨-3944936090694189688507242437255440,-3944936090694189688507242437250158⟩,⟨338479164798062935636975744132022,338479164798062935636975744137381⟩⟩, + ⟨⟨-57889570472255511054408729261131046388,-57889570472255511054408729261131044214⟩,⟨-410545304073122255991884267277413995837,-410545304073122255991884267277413993664⟩⟩, + ⟨⟨2790791695224913183360891272817247596336443,2790791695224913183360891272817247596337688⟩,⟨5129959718946573305743630339286929395752419,5129959718946573305743630339286929395753719⟩⟩, + ⟨⟨-2810715737043336106018833745000497634474675839,-2810715737043336106018833745000497634474675145⟩,⟨-14039402247111506093064721988411353101719379229,-14039402247111506093064721988411353101719378510⟩⟩, + ⟨⟨-3015462832126146271272332891805254611142360185720,-3015462832126146271272332891805254611142360185443⟩,⟨7608775821299505442976305189091169212612836936947,7608775821299505442976305189091169212612836937224⟩⟩, + ⟨⟨1199803835008133483376723913676727093137342138223786,1199803835008133483376723913676727093137342138229125⟩,⟨-779379221678131031060970824398857650049411123713728,-779379221678131031060970824398857650049411123708401⟩⟩, + ⟨⟨-96260779008554036065446859242974981731895169627894328,-96260779008554036065446859242974981731895169627574117⟩,⟨4760324426006525401757244116005823192571657442366564,4760324426006525401757244116005823192571657442686729⟩⟩, + ⟨⟨2873770693329734351052027520706485341736677078036963990,2873770693329734351052027520706485341736677078043606589⟩,⟨936103706933085717188185392992467575016509965483207459,936103706933085717188185392992467575016509965489848189⟩⟩, + ⟨⟨-45466034913675640632486659138568888535176380724585601986,-45466034913675640632486659138568888535176380724490258092⟩,⟨-23824780253865287629985741701465779132920744362885766974,-23824780253865287629985741701465779132920744362790466841⟩⟩, + ⟨⟨481113693276067173093733660035827509753290266291821338492,481113693276067173093733660035827509753290266292569204588⟩,⟨227682468199568491455044780231871459345626046690290727663,227682468199568491455044780231871459345626046691039110884⟩⟩] +lemma tw0_1_6_6_calc (j : Fin 31) : taylorWaveBox 0 1 6 6 j = tw0_1_6_6 j := by + revert j + decide +kernel +def tw0_1_6_7 : Fin 31 → CI := ![⟨⟨72128400422909961869623458584936203930038621274890059687,72128400422909961869623458584936203930038621275220794051⟩,⟨247814378047392126743146448494270851227848171252692299429,247814378047392126743146448494270851227848171253023213468⟩⟩, + ⟨⟨-7380287588890697155505334098967454904075495784730013641,-7380287588890697155505334098967454904075495784672740528⟩,⟨-25246639261092625533073982632215773253921519087575518400,-25246639261092625533073982632215773253921519087518201842⟩⟩, + ⟨⟨121207219441551855693872922917256762372893930786850230,121207219441551855693872922917256762372893930790764039⟩,⟨1637340167747606605232088483998485388288259107941931503,1637340167747606605232088483998485388288259107945846401⟩⟩, + ⟨⟨18411832399816899771312279091043454408147408637707182,18411832399816899771312279091043454408147408637888685⟩,⟨-52551159312665686499313642899367976018341098651099277,-52551159312665686499313642899367976018341098650917761⟩⟩, + ⟨⟨-699091467324559750561989473699666291063796789612827,-699091467324559750561989473699666291063796789610102⟩,⟨538094255289158086598744778228782467996372365321557,538094255289158086598744778228782467996372365324295⟩⟩, + ⟨⟨5404293927257642876334948786720831605170636839774,5404293927257642876334948786720831605170636840011⟩,⟨97195943750092090539713027688280310043037595579,97195943750092090539713027688280310043037595816⟩⟩, + ⟨⟨-8053332580613004099353397342455313391687469598,-8053332580613004099353397342455313391687469097⟩,⟨-6199533292688128495262236695370115607945998139,-6199533292688128495262236695370115607945997624⟩⟩, + ⟨⟨2309713579017713663885879782612944995819405,2309713579017713663885879782612944995820212⟩,⟨3827223604607457456156965866919905672355166,3827223604607457456156965866919905672355881⟩⟩, + ⟨⟨-251017559823018988747639989574473577429,-251017559823018988747639989574473575225⟩,⟨-234011888998790893241215552791819008391,-234011888998790893241215552791819006187⟩⟩, + ⟨⟨2516974817160252638961404960188429,2516974817160252638961404960192150⟩,⟨-2503468758481268375544726658807728,-2503468758481268375544726658804391⟩⟩, + ⟨⟨1058037550294576683394270544,1058037550294576683394280757⟩,⟨-4346584991816842388383925220,-4346584991816842388383915008⟩⟩, + ⟨⟨473355949443609418980,473355949443609442692⟩,⟨782292791863410316121,782292791863410339216⟩⟩, + ⟨⟨16766223477905,16766223513690⟩,⟨-81214634220457,-81214634184672⟩⟩, + ⟨⟨-24907199,-24855528⟩,⟨3238313,3289984⟩⟩, + ⟨⟨-57584,8207⟩,⟨-35591,43986⟩⟩, + ⟨⟨-63729,39831⟩,⟨-63729,63729⟩⟩, + ⟨⟨-57584,15288⟩,⟨-43986,35779⟩⟩, + ⟨⟨-24907199,-24855528⟩,⟨-3289984,-3238313⟩⟩, + ⟨⟨16766223477905,16766223513690⟩,⟨81214634184672,81214634220457⟩⟩, + ⟨⟨473355949443609418980,473355949443609442692⟩,⟨-782292791863410339216,-782292791863410316121⟩⟩, + ⟨⟨1058037550294576683394270544,1058037550294576683394280757⟩,⟨4346584991816842388383915008,4346584991816842388383925220⟩⟩, + ⟨⟨2516974817160252638961404960188429,2516974817160252638961404960192150⟩,⟨2503468758481268375544726658804391,2503468758481268375544726658807728⟩⟩, + ⟨⟨-251017559823018988747639989574473577429,-251017559823018988747639989574473575225⟩,⟨234011888998790893241215552791819006187,234011888998790893241215552791819008391⟩⟩, + ⟨⟨2309713579017713663885879782612944995819405,2309713579017713663885879782612944995820212⟩,⟨-3827223604607457456156965866919905672355881,-3827223604607457456156965866919905672355166⟩⟩, + ⟨⟨-8053332580613004099353397342455313391687469598,-8053332580613004099353397342455313391687469097⟩,⟨6199533292688128495262236695370115607945997624,6199533292688128495262236695370115607945998139⟩⟩, + ⟨⟨5404293927257642876334948786720831605170636839774,5404293927257642876334948786720831605170636840011⟩,⟨-97195943750092090539713027688280310043037595816,-97195943750092090539713027688280310043037595579⟩⟩, + ⟨⟨-699091467324559750561989473699666291063796789612827,-699091467324559750561989473699666291063796789610102⟩,⟨-538094255289158086598744778228782467996372365324295,-538094255289158086598744778228782467996372365321557⟩⟩, + ⟨⟨18411832399816899771312279091043454408147408637707182,18411832399816899771312279091043454408147408637888685⟩,⟨52551159312665686499313642899367976018341098650917761,52551159312665686499313642899367976018341098651099277⟩⟩, + ⟨⟨121207219441551855693872922917256762372893930786850230,121207219441551855693872922917256762372893930790764039⟩,⟨-1637340167747606605232088483998485388288259107945846401,-1637340167747606605232088483998485388288259107941931503⟩⟩, + ⟨⟨-7380287588890697155505334098967454904075495784730013641,-7380287588890697155505334098967454904075495784672740528⟩,⟨25246639261092625533073982632215773253921519087518201842,25246639261092625533073982632215773253921519087575518400⟩⟩, + ⟨⟨72128400422909961869623458584936203930038621274890059687,72128400422909961869623458584936203930038621275220794051⟩,⟨-247814378047392126743146448494270851227848171253023213468,-247814378047392126743146448494270851227848171252692299429⟩⟩] +lemma tw0_1_6_7_calc (j : Fin 31) : taylorWaveBox 0 1 6 7 j = tw0_1_6_7 j := by + revert j + decide +kernel +def tw0_1_6_8 : Fin 31 → CI := ![⟨⟨-111765631513072375615990225887125123100529867317000283942,-111765631513072375615990225887125123100529867316868929645⟩,⟨13982024818408708470130569660655652016539085801259665864,13982024818408708470130569660655652016539085801390738329⟩⟩, + ⟨⟨12085828128048949284269292713692418852502276846841378308,12085828128048949284269292713692418852502276846870732843⟩,⟨-1043575184707709588881888166401242895041409643616191200,-1043575184707709588881888166401242895041409643586861585⟩⟩, + ⟨⟨-791498565089757980807520669977124090256450507339740793,-791498565089757980807520669977124090256450507337781488⟩,⟨-133518423540392893832917559664345127459343383999388429,-133518423540392893832917559664345127459343383997429581⟩⟩, + ⟨⟨23487900093580307846038016026379294932771119989225328,23487900093580307846038016026379294932771119989310486⟩,⟨16931128545611282249840490533508693546874992719175087,16931128545611282249840490533508693546874992719260248⟩⟩, + ⟨⟨-152738286588116092754623358755650577899074830795487,-152738286588116092754623358755650577899074830793785⟩,⟨-465140818252964107842720082645674417030374588916918,-465140818252964107842720082645674417030374588915222⟩⟩, + ⟨⟨-1290292202414536578728739966053718313598043856935,-1290292202414536578728739966053718313598043856783⟩,⟨2942184599395191955261708176732302383980584844156,2942184599395191955261708176732302383980584844307⟩⟩, + ⟨⟨5828449089859703579032378729377497019350299365,5828449089859703579032378729377497019350299641⟩,⟨-2860653909522431379458675047196624347286309060,-2860653909522431379458675047196624347286308811⟩⟩, + ⟨⟨-3079231900560818260641230043755147688775082,-3079231900560818260641230043755147688774401⟩,⟨41309775331171382216151414790179528728550,41309775331171382216151414790179528729250⟩⟩, + ⟨⟨250024333186576028835940258628151322322,250024333186576028835940258628151323673⟩,⟨-53336932783260641910497133074064479062,-53336932783260641910497133074064477711⟩⟩, + ⟨⟨229527466311130761562038368497431,229527466311130761562038368501296⟩,⟨2855410468787398704117894180534905,2855410468787398704117894180538790⟩⟩, + ⟨⟨1955007105066887058271183182,1955007105066887058271190931⟩,⟨3385806572672873636250267233,3385806572672873636250274981⟩⟩, + ⟨⟨-799430576476993263648,-799430576476993244874⟩,⟨-324672401882362660540,-324672401882362643104⟩⟩, + ⟨⟨24681617457187,24681617496012⟩,⟨80160368518304,80160368557129⟩⟩, + ⟨⟨23816486,23885263⟩,⟨-12370080,-12301303⟩⟩, + ⟨⟨-17265,69594⟩,⟨-58968,40110⟩⟩, + ⟨⟨-44817,71707⟩,⟨-71707,71707⟩⟩, + ⟨⟨-24968,69594⟩,⟨-41704,58968⟩⟩, + ⟨⟨23816486,23885263⟩,⟨12301303,12370080⟩⟩, + ⟨⟨24681617457187,24681617496012⟩,⟨-80160368557129,-80160368518304⟩⟩, + ⟨⟨-799430576476993263648,-799430576476993244874⟩,⟨324672401882362643104,324672401882362660540⟩⟩, + ⟨⟨1955007105066887058271183182,1955007105066887058271190931⟩,⟨-3385806572672873636250274981,-3385806572672873636250267233⟩⟩, + ⟨⟨229527466311130761562038368497431,229527466311130761562038368501296⟩,⟨-2855410468787398704117894180538790,-2855410468787398704117894180534905⟩⟩, + ⟨⟨250024333186576028835940258628151322322,250024333186576028835940258628151323673⟩,⟨53336932783260641910497133074064477711,53336932783260641910497133074064479062⟩⟩, + ⟨⟨-3079231900560818260641230043755147688775082,-3079231900560818260641230043755147688774401⟩,⟨-41309775331171382216151414790179528729250,-41309775331171382216151414790179528728550⟩⟩, + ⟨⟨5828449089859703579032378729377497019350299365,5828449089859703579032378729377497019350299641⟩,⟨2860653909522431379458675047196624347286308811,2860653909522431379458675047196624347286309060⟩⟩, + ⟨⟨-1290292202414536578728739966053718313598043856935,-1290292202414536578728739966053718313598043856783⟩,⟨-2942184599395191955261708176732302383980584844307,-2942184599395191955261708176732302383980584844156⟩⟩, + ⟨⟨-152738286588116092754623358755650577899074830795487,-152738286588116092754623358755650577899074830793785⟩,⟨465140818252964107842720082645674417030374588915222,465140818252964107842720082645674417030374588916918⟩⟩, + ⟨⟨23487900093580307846038016026379294932771119989225328,23487900093580307846038016026379294932771119989310486⟩,⟨-16931128545611282249840490533508693546874992719260248,-16931128545611282249840490533508693546874992719175087⟩⟩, + ⟨⟨-791498565089757980807520669977124090256450507339740793,-791498565089757980807520669977124090256450507337781488⟩,⟨133518423540392893832917559664345127459343383997429581,133518423540392893832917559664345127459343383999388429⟩⟩, + ⟨⟨12085828128048949284269292713692418852502276846841378308,12085828128048949284269292713692418852502276846870732843⟩,⟨1043575184707709588881888166401242895041409643586861585,1043575184707709588881888166401242895041409643616191200⟩⟩, + ⟨⟨-111765631513072375615990225887125123100529867317000283942,-111765631513072375615990225887125123100529867316868929645⟩,⟨-13982024818408708470130569660655652016539085801390738329,-13982024818408708470130569660655652016539085801259665864⟩⟩] +lemma tw0_1_6_8_calc (j : Fin 31) : taylorWaveBox 0 1 6 8 j = tw0_1_6_8 j := by + revert j + decide +kernel +def tw0_1_6_9 : Fin 31 → CI := ![⟨⟨1533534670950349342350269711747279076116370748371937320,1533534670950349342350269711747279076116370748431305814⟩,⟨-44660945320626782754694869451148784452756480670556439421,-44660945320626782754694869451148784452756480670496879778⟩⟩, + ⟨⟨-569131006888401023994773761059611177518087126939318629,-569131006888401023994773761059611177518087126926252220⟩,⟨5054059072101210862603825104455189611386543671139860180,5054059072101210862603825104455189611386543671152937354⟩⟩, + ⟨⟨141592018916386934051702224916317864306792329956914081,141592018916386934051702224916317864306792329957757865⟩,⟨-327451607370669051347879506263414390484034826507301570,-327451607370669051347879506263414390484034826506457653⟩⟩, + ⟨⟨-10824013016297379019184851092504376284709124075995091,-10824013016297379019184851092504376284709124075960920⟩,⟨8376897488015884952342902277842604350886011691905756,8376897488015884952342902277842604350886011691939921⟩⟩, + ⟨⟨246934595386273830748468194943765166514779967453555,246934595386273830748468194943765166514779967454539⟩,⟨5295018822769422604203124763367229134759600468555,5295018822769422604203124763367229134759600469540⟩⟩, + ⟨⟨-1198683718242682004298240127815804753918352560379,-1198683718242682004298240127815804753918352560304⟩,⟨-1255634177869631676651448815061148496423448236536,-1255634177869631676651448815061148496423448236461⟩⟩, + ⟨⟨-8302466370390804170734256459676346428085330,-8302466370390804170734256459676346428085162⟩,⟨3770654691955295993103218283356428005562184042,3770654691955295993103218283356428005562184221⟩⟩, + ⟨⟨951852007311609953254660954994971725590762,951852007311609953254660954994971725591171⟩,⟨-1677362750337792673584232062705381148369333,-1677362750337792673584232062705381148368905⟩⟩, + ⟨⟨-67435770997111383200767076426615916510,-67435770997111383200767076426615915467⟩,⟨159459729758941306347289417639807370705,159459729758941306347289417639807371748⟩⟩, + ⟨⟨-1707504747462005023073190523585518,-1707504747462005023073190523583371⟩,⟨-1224905890910560075380526959274477,-1224905890910560075380526959272124⟩⟩, + ⟨⟨-2981248691664112281475475059,-2981248691664112281475468043⟩,⟨-872562337756953264048331286,-872562337756953264048324270⟩⟩, + ⟨⟨716261917282594673923,716261917282594693596⟩,⟨-186776794661458545838,-186776794661458526200⟩⟩, + ⟨⟨-55374271612730,-55374271572602⟩,⟨-53676435589294,-53676435549166⟩⟩, + ⟨⟨-17777052,-17702914⟩,⟨19135277,19209415⟩⟩, + ⟨⟨-73754,25112⟩,⟨-39813,67881⟩⟩, + ⟨⟨-73349,45843⟩,⟨-73349,73349⟩⟩, + ⟨⟨-73754,32483⟩,⟨-67881,42770⟩⟩, + ⟨⟨-17777052,-17702914⟩,⟨-19209415,-19135277⟩⟩, + ⟨⟨-55374271612730,-55374271572602⟩,⟨53676435549166,53676435589294⟩⟩, + ⟨⟨716261917282594673923,716261917282594693596⟩,⟨186776794661458526200,186776794661458545838⟩⟩, + ⟨⟨-2981248691664112281475475059,-2981248691664112281475468043⟩,⟨872562337756953264048324270,872562337756953264048331286⟩⟩, + ⟨⟨-1707504747462005023073190523585518,-1707504747462005023073190523583371⟩,⟨1224905890910560075380526959272124,1224905890910560075380526959274477⟩⟩, + ⟨⟨-67435770997111383200767076426615916510,-67435770997111383200767076426615915467⟩,⟨-159459729758941306347289417639807371748,-159459729758941306347289417639807370705⟩⟩, + ⟨⟨951852007311609953254660954994971725590762,951852007311609953254660954994971725591171⟩,⟨1677362750337792673584232062705381148368905,1677362750337792673584232062705381148369333⟩⟩, + ⟨⟨-8302466370390804170734256459676346428085330,-8302466370390804170734256459676346428085162⟩,⟨-3770654691955295993103218283356428005562184221,-3770654691955295993103218283356428005562184042⟩⟩, + ⟨⟨-1198683718242682004298240127815804753918352560379,-1198683718242682004298240127815804753918352560304⟩,⟨1255634177869631676651448815061148496423448236461,1255634177869631676651448815061148496423448236536⟩⟩, + ⟨⟨246934595386273830748468194943765166514779967453555,246934595386273830748468194943765166514779967454539⟩,⟨-5295018822769422604203124763367229134759600469540,-5295018822769422604203124763367229134759600468555⟩⟩, + ⟨⟨-10824013016297379019184851092504376284709124075995091,-10824013016297379019184851092504376284709124075960920⟩,⟨-8376897488015884952342902277842604350886011691939921,-8376897488015884952342902277842604350886011691905756⟩⟩, + ⟨⟨141592018916386934051702224916317864306792329956914081,141592018916386934051702224916317864306792329957757865⟩,⟨327451607370669051347879506263414390484034826506457653,327451607370669051347879506263414390484034826507301570⟩⟩, + ⟨⟨-569131006888401023994773761059611177518087126939318629,-569131006888401023994773761059611177518087126926252220⟩,⟨-5054059072101210862603825104455189611386543671152937354,-5054059072101210862603825104455189611386543671139860180⟩⟩, + ⟨⟨1533534670950349342350269711747279076116370748371937320,1533534670950349342350269711747279076116370748431305814⟩,⟨44660945320626782754694869451148784452756480670496879778,44660945320626782754694869451148784452756480670556439421⟩⟩] +lemma tw0_1_6_9_calc (j : Fin 31) : taylorWaveBox 0 1 6 9 j = tw0_1_6_9 j := by + revert j + decide +kernel +def tw0_1_6_10 : Fin 31 → CI := ![⟨⟨15949633554418196319026432657393749551347124224184082630,15949633554418196319026432657393749551347124224207953458⟩,⟨3118772133337439689050620643485712039812111423234732856,3118772133337439689050620643485712039812111423258516613⟩⟩, + ⟨⟨-1861263101884962037738491411918024349969603650196454081,-1861263101884962037738491411918024349969603650191316663⟩,⟨-597047032658010832556946676614323187196333501654608379,-597047032658010832556946676614323187196333501649474659⟩⟩, + ⟨⟨115783807118205363273807611230328753510932219747236037,115783807118205363273807611230328753510932219747550652⟩,⟨87861655946366320544107067800661278079472311366554333,87861655946366320544107067800661278079472311366868934⟩⟩, + ⟨⟨-2150464942179976520156761681435434555379993401465497,-2150464942179976520156761681435434555379993401447254⟩,⟨-5527167382599252324090854393283398050227178129727864,-5527167382599252324090854393283398050227178129709618⟩⟩, + ⟨⟨-40254625662655423785391209584583148188291773923204,-40254625662655423785391209584583148188291773922738⟩,⟨106894897002412597651097615532046087990167603493949,106894897002412597651097615532046087990167603494416⟩⟩, + ⟨⟨802600352005586457101809072836651137155428518313,802600352005586457101809072836651137155428518344⟩,⟨-308431470094745796127353421274228825676552317308,-308431470094745796127353421274228825676552317277⟩⟩, + ⟨⟨-1798107826925289382816866684978164771012838873,-1798107826925289382816866684978164771012838770⟩,⟨-892374274854448542010721608758177156031100576,-892374274854448542010721608758177156031100473⟩⟩, + ⟨⟨555004257681211030472360078827263234945054,555004257681211030472360078827263234945258⟩,⟨958040581149391253654382264110668010854060,958040581149391253654382264110668010854241⟩⟩, + ⟨⟨-57131164184132555748587673408386361038,-57131164184132555748587673408386360369⟩,⟨-91037402010078366972373299386061793715,-91037402010078366972373299386061793046⟩⟩, + ⟨⟨1370544355796531568896132299232006,1370544355796531568896132299233901⟩,⟨-344142797175745729238977867062924,-344142797175745729238977867061076⟩⟩, + ⟨⟨2009102615987265185711640930,2009102615987265185711645537⟩,⟨-1040065994007391089850075922,-1040065994007391089850071315⟩⟩, + ⟨⟨-363679104486207221318,-363679104486207209181⟩,⟨454500913918064883474,454500913918064896469⟩⟩, + ⟨⟨62687646880914,62687646910115⟩,⟨17184445519119,17184445548321⟩⟩, + ⟨⟨9032343,9097029⟩,⟨-21487692,-21423005⟩⟩, + ⟨⟨-29619,69344⟩,⟨-68573,35057⟩⟩, + ⟨⟨-42985,68776⟩,⟨-68776,68776⟩⟩, + ⟨⟨-35851,69344⟩,⟨-38955,68573⟩⟩, + ⟨⟨9032343,9097029⟩,⟨21423005,21487692⟩⟩, + ⟨⟨62687646880914,62687646910115⟩,⟨-17184445548321,-17184445519119⟩⟩, + ⟨⟨-363679104486207221318,-363679104486207209181⟩,⟨-454500913918064896469,-454500913918064883474⟩⟩, + ⟨⟨2009102615987265185711640930,2009102615987265185711645537⟩,⟨1040065994007391089850071315,1040065994007391089850075922⟩⟩, + ⟨⟨1370544355796531568896132299232006,1370544355796531568896132299233901⟩,⟨344142797175745729238977867061076,344142797175745729238977867062924⟩⟩, + ⟨⟨-57131164184132555748587673408386361038,-57131164184132555748587673408386360369⟩,⟨91037402010078366972373299386061793046,91037402010078366972373299386061793715⟩⟩, + ⟨⟨555004257681211030472360078827263234945054,555004257681211030472360078827263234945258⟩,⟨-958040581149391253654382264110668010854241,-958040581149391253654382264110668010854060⟩⟩, + ⟨⟨-1798107826925289382816866684978164771012838873,-1798107826925289382816866684978164771012838770⟩,⟨892374274854448542010721608758177156031100473,892374274854448542010721608758177156031100576⟩⟩, + ⟨⟨802600352005586457101809072836651137155428518313,802600352005586457101809072836651137155428518344⟩,⟨308431470094745796127353421274228825676552317277,308431470094745796127353421274228825676552317308⟩⟩, + ⟨⟨-40254625662655423785391209584583148188291773923204,-40254625662655423785391209584583148188291773922738⟩,⟨-106894897002412597651097615532046087990167603494416,-106894897002412597651097615532046087990167603493949⟩⟩, + ⟨⟨-2150464942179976520156761681435434555379993401465497,-2150464942179976520156761681435434555379993401447254⟩,⟨5527167382599252324090854393283398050227178129709618,5527167382599252324090854393283398050227178129727864⟩⟩, + ⟨⟨115783807118205363273807611230328753510932219747236037,115783807118205363273807611230328753510932219747550652⟩,⟨-87861655946366320544107067800661278079472311366868934,-87861655946366320544107067800661278079472311366554333⟩⟩, + ⟨⟨-1861263101884962037738491411918024349969603650196454081,-1861263101884962037738491411918024349969603650191316663⟩,⟨597047032658010832556946676614323187196333501649474659,597047032658010832556946676614323187196333501654608379⟩⟩, + ⟨⟨15949633554418196319026432657393749551347124224184082630,15949633554418196319026432657393749551347124224207953458⟩,⟨-3118772133337439689050620643485712039812111423258516613,-3118772133337439689050620643485712039812111423234732856⟩⟩] +lemma tw0_1_6_10_calc (j : Fin 31) : taylorWaveBox 0 1 6 10 j = tw0_1_6_10 j := by + revert j + decide +kernel +def tw0_1_6_11 : Fin 31 → CI := ![⟨⟨-1880387003692682935371085328225995668249767582051235345,-1880387003692682935371085328225995668249767582042694504⟩,⟨5121418608075767925707512195008515113064162593510375335,5121418608075767925707512195008515113064162593518947905⟩⟩, + ⟨⟨337722020518922234674360632354576299372308327234101965,337722020518922234674360632354576299372308327235896964⟩,⟨-605647650908391918733776073299442201272049125588603946,-605647650908391918733776073299442201272049125586807952⟩⟩, + ⟨⟨-42480596080787054531751063344014579439784573254835143,-42480596080787054531751063344014579439784573254733896⟩,⟨34398155399934542729525222652635602280104130491818605,34398155399934542729525222652635602280104130491919840⟩⟩, + ⟨⟨2363961875688657129588717122912448029852163468773841,2363961875688657129588717122912448029852163468781973⟩,⟨-197771456009509992880263618694496109233718158656865,-197771456009509992880263618694496109233718158648734⟩⟩, + ⟨⟨-37329217878606202612439120125268754682591860487023,-37329217878606202612439120125268754682591860486839⟩,⟨-31370116613396624043717843235378420469412511616590,-31370116613396624043717843235378420469412511616407⟩⟩, + ⟨⟨-11169783925239642387461770734802192414888948466,-11169783925239642387461770734802192414888948448⟩,⟨392960530465356286032166314513661492304164467995,392960530465356286032166314513661492304164468014⟩⟩, + ⟨⟨784305138476587491808739744507519558268100653,784305138476587491808739744507519558268100701⟩,⟨-598283587278872594066908176465616963134952394,-598283587278872594066908176465616963134952349⟩⟩, + ⟨⟨-586721738636565997962373996753726756471504,-586721738636565997962373996753726756471373⟩,⟨-2641734357948950473850552005668660044938,-2641734357948950473850552005668660044803⟩⟩, + ⟨⟨61513122604253832674676096736849598550,61513122604253832674676096736849598852⟩,⟨3067888480388744484116571793910311759,3067888480388744484116571793910312061⟩⟩, + ⟨⟨-386635507013174432590124476969264,-386635507013174432590124476968184⟩,⟨787321098292877336050994841389097,787321098292877336050994841390111⟩⟩, + ⟨⟨-493838939418490183304723971,-493838939418490183304720579⟩,⟨1438533817504254944744415460,1438533817504254944744418852⟩⟩, + ⟨⟨14355671515365379543,14355671515365390075⟩,⟨-422295314021254041314,-422295314021254030458⟩⟩, + ⟨⟨-49184518356009,-49184518333417⟩,⟨11761344210500,11761344233092⟩⟩, + ⟨⟨-1036056,-990325⟩,⟨19121789,19167519⟩⟩, + ⟨⟨-58306,29958⟩,⟨-27480,61654⟩⟩, + ⟨⟨-59527,37205⟩,⟨-59527,59527⟩⟩, + ⟨⟨-58306,34610⟩,⟨-61654,31697⟩⟩, + ⟨⟨-1036056,-990325⟩,⟨-19167519,-19121789⟩⟩, + ⟨⟨-49184518356009,-49184518333417⟩,⟨-11761344233092,-11761344210500⟩⟩, + ⟨⟨14355671515365379543,14355671515365390075⟩,⟨422295314021254030458,422295314021254041314⟩⟩, + ⟨⟨-493838939418490183304723971,-493838939418490183304720579⟩,⟨-1438533817504254944744418852,-1438533817504254944744415460⟩⟩, + ⟨⟨-386635507013174432590124476969264,-386635507013174432590124476968184⟩,⟨-787321098292877336050994841390111,-787321098292877336050994841389097⟩⟩, + ⟨⟨61513122604253832674676096736849598550,61513122604253832674676096736849598852⟩,⟨-3067888480388744484116571793910312061,-3067888480388744484116571793910311759⟩⟩, + ⟨⟨-586721738636565997962373996753726756471504,-586721738636565997962373996753726756471373⟩,⟨2641734357948950473850552005668660044803,2641734357948950473850552005668660044938⟩⟩, + ⟨⟨784305138476587491808739744507519558268100653,784305138476587491808739744507519558268100701⟩,⟨598283587278872594066908176465616963134952349,598283587278872594066908176465616963134952394⟩⟩, + ⟨⟨-11169783925239642387461770734802192414888948466,-11169783925239642387461770734802192414888948448⟩,⟨-392960530465356286032166314513661492304164468014,-392960530465356286032166314513661492304164467995⟩⟩, + ⟨⟨-37329217878606202612439120125268754682591860487023,-37329217878606202612439120125268754682591860486839⟩,⟨31370116613396624043717843235378420469412511616407,31370116613396624043717843235378420469412511616590⟩⟩, + ⟨⟨2363961875688657129588717122912448029852163468773841,2363961875688657129588717122912448029852163468781973⟩,⟨197771456009509992880263618694496109233718158648734,197771456009509992880263618694496109233718158656865⟩⟩, + ⟨⟨-42480596080787054531751063344014579439784573254835143,-42480596080787054531751063344014579439784573254733896⟩,⟨-34398155399934542729525222652635602280104130491919840,-34398155399934542729525222652635602280104130491818605⟩⟩, + ⟨⟨337722020518922234674360632354576299372308327234101965,337722020518922234674360632354576299372308327235896964⟩,⟨605647650908391918733776073299442201272049125586807952,605647650908391918733776073299442201272049125588603946⟩⟩, + ⟨⟨-1880387003692682935371085328225995668249767582051235345,-1880387003692682935371085328225995668249767582042694504⟩,⟨-5121418608075767925707512195008515113064162593518947905,-5121418608075767925707512195008515113064162593510375335⟩⟩] +lemma tw0_1_6_11_calc (j : Fin 31) : taylorWaveBox 0 1 6 11 j = tw0_1_6_11 j := by + revert j + decide +kernel +def tw0_1_6_12 : Fin 31 → CI := ![⟨⟨-1483700559149434123599669352539018021986927522006401775,-1483700559149434123599669352539018021986927522003615655⟩,⟨-831205564879917512319210101196802434963310385854692469,-831205564879917512319210101196802434963310385851916083⟩⟩, + ⟨⟨173690778399903302136061473031665645437924475692664401,173690778399903302136061473031665645437924475693226162⟩,⟨148372067500934184513586675141657979721495264240502390,148372067500934184513586675141657979721495264241063969⟩⟩, + ⟨⟨-8124271062025202473970665703676771519590581429278242,-8124271062025202473970665703676771519590581429235946⟩,⟨-17273104414499442114338320860433556972784765171371344,-17273104414499442114338320860433556972784765171329038⟩⟩, + ⟨⟨-178596509452734660397502291102368526554181476109994,-178596509452734660397502291102368526554181476106885⟩,⟨862786442429487756513718514667275504651441527746670,862786442429487756513718514667275504651441527749779⟩⟩, + ⟨⟨16645083707063318690376228791295948254676031236725,16645083707063318690376228791295948254676031236787⟩,⟨-9824472976320107417275107714680774071351729503375,-9824472976320107417275107714680774071351729503312⟩⟩, + ⟨⟨-152139318711445431756505401829912523760401651266,-152139318711445431756505401829912523760401651257⟩,⟨-68622050092924227142679295884767102429720746149,-68622050092924227142679295884767102429720746140⟩⟩, + ⟨⟨86418550665786755596783639813239434652519045,86418550665786755596783639813239434652519063⟩,⟨441754514650367443348716543438958704047128258,441754514650367443348716543438958704047128278⟩⟩, + ⟨⟨146967499061105459216578698300625272706157,146967499061105459216578698300625272706219⟩,⟨-248506788250600692001649794403345699071067,-248506788250600692001649794403345699071003⟩⟩, + ⟨⟨-20095787908966346744339392482645924603,-20095787908966346744339392482645924393⟩,⟨25887742462948083415285917060299041288,25887742462948083415285917060299041499⟩⟩, + ⟨⟨-202363641959123700760763387646139,-202363641959123700760763387645516⟩,⟨-463296177172551785267557833086562,-463296177172551785267557833085909⟩⟩, + ⟨⟨-397298913301759032770825955,-397298913301759032770823973⟩,⟨-862344619473686449912589181,-862344619473686449912587199⟩⟩, + ⟨⟨162430421544720043284,162430421544720050551⟩,⟨233951832996130511067,233951832996130518099⟩⟩, + ⟨⟨27053688296480,27053688315485⟩,⟨-24553725900852,-24553725881847⟩⟩, + ⟨⟨-4262884,-4229357⟩,⟨-14041004,-14007477⟩⟩, + ⟨⟨-26710,44059⟩,⟨-49809,19155⟩⟩, + ⟨⟨-29902,47842⟩,⟨-47842,47842⟩⟩, + ⟨⟨-29752,44059⟩,⟨-23099,49809⟩⟩, + ⟨⟨-4262884,-4229357⟩,⟨14007477,14041004⟩⟩, + ⟨⟨27053688296480,27053688315485⟩,⟨24553725881847,24553725900852⟩⟩, + ⟨⟨162430421544720043284,162430421544720050551⟩,⟨-233951832996130518099,-233951832996130511067⟩⟩, + ⟨⟨-397298913301759032770825955,-397298913301759032770823973⟩,⟨862344619473686449912587199,862344619473686449912589181⟩⟩, + ⟨⟨-202363641959123700760763387646139,-202363641959123700760763387645516⟩,⟨463296177172551785267557833085909,463296177172551785267557833086562⟩⟩, + ⟨⟨-20095787908966346744339392482645924603,-20095787908966346744339392482645924393⟩,⟨-25887742462948083415285917060299041499,-25887742462948083415285917060299041288⟩⟩, + ⟨⟨146967499061105459216578698300625272706157,146967499061105459216578698300625272706219⟩,⟨248506788250600692001649794403345699071003,248506788250600692001649794403345699071067⟩⟩, + ⟨⟨86418550665786755596783639813239434652519045,86418550665786755596783639813239434652519063⟩,⟨-441754514650367443348716543438958704047128278,-441754514650367443348716543438958704047128258⟩⟩, + ⟨⟨-152139318711445431756505401829912523760401651266,-152139318711445431756505401829912523760401651257⟩,⟨68622050092924227142679295884767102429720746140,68622050092924227142679295884767102429720746149⟩⟩, + ⟨⟨16645083707063318690376228791295948254676031236725,16645083707063318690376228791295948254676031236787⟩,⟨9824472976320107417275107714680774071351729503312,9824472976320107417275107714680774071351729503375⟩⟩, + ⟨⟨-178596509452734660397502291102368526554181476109994,-178596509452734660397502291102368526554181476106885⟩,⟨-862786442429487756513718514667275504651441527749779,-862786442429487756513718514667275504651441527746670⟩⟩, + ⟨⟨-8124271062025202473970665703676771519590581429278242,-8124271062025202473970665703676771519590581429235946⟩,⟨17273104414499442114338320860433556972784765171329038,17273104414499442114338320860433556972784765171371344⟩⟩, + ⟨⟨173690778399903302136061473031665645437924475692664401,173690778399903302136061473031665645437924475693226162⟩,⟨-148372067500934184513586675141657979721495264241063969,-148372067500934184513586675141657979721495264240502390⟩⟩, + ⟨⟨-1483700559149434123599669352539018021986927522006401775,-1483700559149434123599669352539018021986927522003615655⟩,⟨831205564879917512319210101196802434963310385851916083,831205564879917512319210101196802434963310385854692469⟩⟩] +lemma tw0_1_6_12_calc (j : Fin 31) : taylorWaveBox 0 1 6 12 j = tw0_1_6_12 j := by + revert j + decide +kernel +def tw0_1_6_13 : Fin 31 → CI := ![⟨⟨307041928566592902104193688455197270294334867009946129,307041928566592902104193688455197270294334867010769207⟩,⟨-388002781727196703434958138131062124636798918513574058,-388002781727196703434958138131062124636798918512748431⟩⟩, + ⟨⟨-55243708115595212042711157838131326374776752460388790,-55243708115595212042711157838131326374776752460231281⟩,⟨43371122412913617880292304634968935548099008051517193,43371122412913617880292304634968935548099008051674705⟩⟩, + ⟨⟨6099152716337552409572540988078425055247880591735923,6099152716337552409572540988078425055247880591751487⟩,⟨-1227673704694460739646879004450665826518789277282658,-1227673704694460739646879004450665826518789277267098⟩⟩, + ⟨⟨-269244913713633733516834063548253505579498416780116,-269244913713633733516834063548253505579498416779084⟩,⟨-144200647461071040273149876908304931686216846911932,-144200647461071040273149876908304931686216846910900⟩⟩, + ⟨⟨1382006577609924338096146640744931651974293644337,1382006577609924338096146640744931651974293644367⟩,⟨7015972139563699294871504997158343164342295140074,7015972139563699294871504997158343164342295140104⟩⟩, + ⟨⟨48309513789533942485063400946092568338713706574,48309513789533942485063400946092568338713706578⟩,⟨-45164419556259512344067175183662944818391938522,-45164419556259512344067175183662944818391938518⟩⟩, + ⟨⟨-184999505016530702766659442323298190367624442,-184999505016530702766659442323298190367624432⟩,⟨-50261945783657018708470860936572457665128782,-50261945783657018708470860936572457665128771⟩⟩, + ⟨⟨64400706599560451976538167347523662966337,64400706599560451976538167347523662966363⟩,⟨115906829667969884245462206936796694958551,115906829667969884245462206936796694958574⟩⟩, + ⟨⟨-4816444384584185976514750633678803249,-4816444384584185976514750633678803157⟩,⟨-15546735367883088794364307532922644548,-15546735367883088794364307532922644456⟩⟩, + ⟨⟨260561619628633785196801635104386,260561619628633785196801635104729⟩,⟨77948429769168152094381468668128,77948429769168152094381468668484⟩⟩, + ⟨⟨514424249445932605973318098,514424249445932605973319313⟩,⟨203468489344542831301738660,203468489344542831301739875⟩⟩, + ⟨⟨-169908520623797745383,-169908520623797741320⟩,⟨-56881236243533315636,-56881236243533311827⟩⟩, + ⟨⟨-8018262705344,-8018262693885⟩,⟨23293162259839,23293162271298⟩⟩, + ⟨⟨6235329,6263895⟩,⟨8364439,8393006⟩⟩, + ⟨⟨-29972,21336⟩,⟨-11779,36387⟩⟩, + ⟨⟨-35888,22430⟩,⟨-35888,35888⟩⟩, + ⟨⟨-29972,23037⟩,⟨-36387,15051⟩⟩, + ⟨⟨6235329,6263895⟩,⟨-8393006,-8364439⟩⟩, + ⟨⟨-8018262705344,-8018262693885⟩,⟨-23293162271298,-23293162259839⟩⟩, + ⟨⟨-169908520623797745383,-169908520623797741320⟩,⟨56881236243533311827,56881236243533315636⟩⟩, + ⟨⟨514424249445932605973318098,514424249445932605973319313⟩,⟨-203468489344542831301739875,-203468489344542831301738660⟩⟩, + ⟨⟨260561619628633785196801635104386,260561619628633785196801635104729⟩,⟨-77948429769168152094381468668484,-77948429769168152094381468668128⟩⟩, + ⟨⟨-4816444384584185976514750633678803249,-4816444384584185976514750633678803157⟩,⟨15546735367883088794364307532922644456,15546735367883088794364307532922644548⟩⟩, + ⟨⟨64400706599560451976538167347523662966337,64400706599560451976538167347523662966363⟩,⟨-115906829667969884245462206936796694958574,-115906829667969884245462206936796694958551⟩⟩, + ⟨⟨-184999505016530702766659442323298190367624442,-184999505016530702766659442323298190367624432⟩,⟨50261945783657018708470860936572457665128771,50261945783657018708470860936572457665128782⟩⟩, + ⟨⟨48309513789533942485063400946092568338713706574,48309513789533942485063400946092568338713706578⟩,⟨45164419556259512344067175183662944818391938518,45164419556259512344067175183662944818391938522⟩⟩, + ⟨⟨1382006577609924338096146640744931651974293644337,1382006577609924338096146640744931651974293644367⟩,⟨-7015972139563699294871504997158343164342295140104,-7015972139563699294871504997158343164342295140074⟩⟩, + ⟨⟨-269244913713633733516834063548253505579498416780116,-269244913713633733516834063548253505579498416779084⟩,⟨144200647461071040273149876908304931686216846910900,144200647461071040273149876908304931686216846911932⟩⟩, + ⟨⟨6099152716337552409572540988078425055247880591735923,6099152716337552409572540988078425055247880591751487⟩,⟨1227673704694460739646879004450665826518789277267098,1227673704694460739646879004450665826518789277282658⟩⟩, + ⟨⟨-55243708115595212042711157838131326374776752460388790,-55243708115595212042711157838131326374776752460231281⟩,⟨-43371122412913617880292304634968935548099008051674705,-43371122412913617880292304634968935548099008051517193⟩⟩, + ⟨⟨307041928566592902104193688455197270294334867009946129,307041928566592902104193688455197270294334867010769207⟩,⟨388002781727196703434958138131062124636798918512748431,388002781727196703434958138131062124636798918513574058⟩⟩] +lemma tw0_1_6_13_calc (j : Fin 31) : taylorWaveBox 0 1 6 13 j = tw0_1_6_13 j := by + revert j + decide +kernel +def tw0_1_6_14 : Fin 31 → CI := ![⟨⟨91257737605414662650568862443444788152619254217642000,91257737605414662650568862443444788152619254217866356⟩,⟨99427518738147572379867752543658809011574775877985884,99427518738147572379867752543658809011574775878209676⟩⟩, + ⟨⟨-9120003775570224155793354565942485638043643153627358,-9120003775570224155793354565942485638043643153585648⟩,⟨-18074141668136326293692285384119872994064718937888811,-18074141668136326293692285384119872994064718937847085⟩⟩, + ⟨⟨-80537644995516015695226664176386438025634576328213,-80537644995516015695226664176386438025634576323142⟩,⟨1899333820681296669679363904063451844822286622373162,1899333820681296669679363904063451844822286622378234⟩⟩, + ⟨⟨69757366981258315458780261545961666562020625077119,69757366981258315458780261545961666562020625077417⟩,⟨-70615657346616288188001976906498184831810199289551,-70615657346616288188001976906498184831810199289253⟩⟩, + ⟨⟨-2454457071005371684701347110506735050152419093107,-2454457071005371684701347110506735050152419093095⟩,⟨-356472994386493089906683100285433234090324938962,-356472994386493089906683100285433234090324938950⟩⟩, + ⟨⟨8572936621233893254117053943786176906930019975,8572936621233893254117053943786176906930019976⟩,⟨23023081399541379221281789830306625687881626081,23023081399541379221281789830306625687881626082⟩⟩, + ⟨⟨50686875456496118621826652216178258458907176,50686875456496118621826652216178258458907181⟩,⟨-57355628303714614785862522868094472528497304,-57355628303714614785862522868094472528497300⟩⟩, + ⟨⟨-57076920855470256393376379872667926909886,-57076920855470256393376379872667926909873⟩,⟨-1279868282821085529236541706565360026047,-1279868282821085529236541706565360026033⟩⟩, + ⟨⟨7217014664847979945332296499596624552,7217014664847979945332296499596624597⟩,⟨2310546019165056400360673604457256615,2310546019165056400360673604457256660⟩⟩, + ⟨⟨-114911649110890504018726812475523,-114911649110890504018726812475357⟩,⟨74895794131460472927308824141053,74895794131460472927308824141208⟩⟩, + ⟨⟨-279967214204706199008059793,-279967214204706199008059148⟩,⟨113701825166702726614962711,113701825166702726614963356⟩⟩, + ⟨⟨100384431746208265686,100384431746208268485⟩,⟨-33023273566488465401,-33023273566488462591⟩⟩, + ⟨⟨-2646049450289,-2646049443612⟩,⟨-15345982394027,-15345982387350⟩⟩, + ⟨⟨-5845533,-5825595⟩,⟨-3858824,-3838885⟩⟩, + ⟨⟨-15427,18312⟩,⟨-24122,6251⟩⟩, + ⟨⟨-15774,25238⟩,⟨-25238,25238⟩⟩, + ⟨⟨-16188,18312⟩,⟨-8695,24122⟩⟩, + ⟨⟨-5845533,-5825595⟩,⟨3838885,3858824⟩⟩, + ⟨⟨-2646049450289,-2646049443612⟩,⟨15345982387350,15345982394027⟩⟩, + ⟨⟨100384431746208265686,100384431746208268485⟩,⟨33023273566488462591,33023273566488465401⟩⟩, + ⟨⟨-279967214204706199008059793,-279967214204706199008059148⟩,⟨-113701825166702726614963356,-113701825166702726614962711⟩⟩, + ⟨⟨-114911649110890504018726812475523,-114911649110890504018726812475357⟩,⟨-74895794131460472927308824141208,-74895794131460472927308824141053⟩⟩, + ⟨⟨7217014664847979945332296499596624552,7217014664847979945332296499596624597⟩,⟨-2310546019165056400360673604457256660,-2310546019165056400360673604457256615⟩⟩, + ⟨⟨-57076920855470256393376379872667926909886,-57076920855470256393376379872667926909873⟩,⟨1279868282821085529236541706565360026033,1279868282821085529236541706565360026047⟩⟩, + ⟨⟨50686875456496118621826652216178258458907176,50686875456496118621826652216178258458907181⟩,⟨57355628303714614785862522868094472528497300,57355628303714614785862522868094472528497304⟩⟩, + ⟨⟨8572936621233893254117053943786176906930019975,8572936621233893254117053943786176906930019976⟩,⟨-23023081399541379221281789830306625687881626082,-23023081399541379221281789830306625687881626081⟩⟩, + ⟨⟨-2454457071005371684701347110506735050152419093107,-2454457071005371684701347110506735050152419093095⟩,⟨356472994386493089906683100285433234090324938950,356472994386493089906683100285433234090324938962⟩⟩, + ⟨⟨69757366981258315458780261545961666562020625077119,69757366981258315458780261545961666562020625077417⟩,⟨70615657346616288188001976906498184831810199289253,70615657346616288188001976906498184831810199289551⟩⟩, + ⟨⟨-80537644995516015695226664176386438025634576328213,-80537644995516015695226664176386438025634576323142⟩,⟨-1899333820681296669679363904063451844822286622378234,-1899333820681296669679363904063451844822286622373162⟩⟩, + ⟨⟨-9120003775570224155793354565942485638043643153627358,-9120003775570224155793354565942485638043643153585648⟩,⟨18074141668136326293692285384119872994064718937847085,18074141668136326293692285384119872994064718937888811⟩⟩, + ⟨⟨91257737605414662650568862443444788152619254217642000,91257737605414662650568862443444788152619254217866356⟩,⟨-99427518738147572379867752543658809011574775878209676,-99427518738147572379867752543658809011574775877985884⟩⟩] +lemma tw0_1_6_14_calc (j : Fin 31) : taylorWaveBox 0 1 6 14 j = tw0_1_6_14 j := by + revert j + decide +kernel +def tw0_1_6_15 : Fin 31 → CI := ![⟨⟨-28907325566077068983001915545154294992556657744525258,-28907325566077068983001915545154294992556657744469211⟩,⟨19096622928366401872890783751487467176562207967797763,19096622928366401872890783751487467176562207967853908⟩⟩, + ⟨⟨5294581626107594285152350583503133767579055286883404,5294581626107594285152350583503133767579055286896631⟩,⟨-1459859169011542839323143319256907285083006961590893,-1459859169011542839323143319256907285083006961577676⟩⟩, + ⟨⟨-524907381811076265292718091137313456806903045122461,-524907381811076265292718091137313456806903045120979⟩,⟨-152866235527711012709338561169117888675546572689852,-152866235527711012709338561169117888675546572688369⟩⟩, + ⟨⟨14660368987125394189169673527900024251357023947742,14660368987125394189169673527900024251357023947841⟩,⟨26586815959841812677697460065216678872729379746035,26586815959841812677697460065216678872729379746134⟩⟩, + ⟨⟨375988028634854502287678641767770008007221779128,375988028634854502287678641767770008007221779132⟩,⟨-717045233648241119971991359911922147860587249238,-717045233648241119971991359911922147860587249233⟩⟩, + ⟨⟨-8583030700007354588122380480550068696159162759,-8583030700007354588122380480550068696159162757⟩,⟨-333627900174281044847013172854538835290023011,-333627900174281044847013172854538835290023010⟩⟩, + ⟨⟨10897723874555524375261938190301197762880678,10897723874555524375261938190301197762880680⟩,⟨26619495427077047953230503321134669684005843,26619495427077047953230503321134669684005845⟩⟩, + ⟨⟨12131858235905189742805237002903894458370,12131858235905189742805237002903894458376⟩,⟨-19699435612425923506151345590788334132292,-19699435612425923506151345590788334132286⟩⟩, + ⟨⟨-2642138801823081036838554514691712470,-2642138801823081036838554514691712448⟩,⟨2011429271559591487535318429580501931,2011429271559591487535318429580501953⟩⟩, + ⟨⟨8109480716180545072626198642440,8109480716180545072626198642529⟩,⟨-64600466436969091830969061401373,-64600466436969091830969061401286⟩⟩, + ⟨⟨63713344714989602698849206,63713344714989602698849542⟩,⟨-141681095399360809295067732,-141681095399360809295067396⟩⟩, + ⟨⟨-33706445724708681515,-33706445724708680354⟩,⟨48009992211626470672,48009992211626471927⟩⟩, + ⟨⟨5775262801001,5775262805800⟩,⟨7244571878846,7244571883645⟩⟩, + ⟨⟨4272115,4283695⟩,⟨1023829,1035409⟩⟩, + ⟨⟨-9959,10165⟩,⟨-2698,14522⟩⟩, + ⟨⟨-16704,10440⟩,⟨-16704,16704⟩⟩, + ⟨⟨-9959,10373⟩,⟨-14522,4358⟩⟩, + ⟨⟨4272115,4283695⟩,⟨-1035409,-1023829⟩⟩, + ⟨⟨5775262801001,5775262805800⟩,⟨-7244571883645,-7244571878846⟩⟩, + ⟨⟨-33706445724708681515,-33706445724708680354⟩,⟨-48009992211626471927,-48009992211626470672⟩⟩, + ⟨⟨63713344714989602698849206,63713344714989602698849542⟩,⟨141681095399360809295067396,141681095399360809295067732⟩⟩, + ⟨⟨8109480716180545072626198642440,8109480716180545072626198642529⟩,⟨64600466436969091830969061401286,64600466436969091830969061401373⟩⟩, + ⟨⟨-2642138801823081036838554514691712470,-2642138801823081036838554514691712448⟩,⟨-2011429271559591487535318429580501953,-2011429271559591487535318429580501931⟩⟩, + ⟨⟨12131858235905189742805237002903894458370,12131858235905189742805237002903894458376⟩,⟨19699435612425923506151345590788334132286,19699435612425923506151345590788334132292⟩⟩, + ⟨⟨10897723874555524375261938190301197762880678,10897723874555524375261938190301197762880680⟩,⟨-26619495427077047953230503321134669684005845,-26619495427077047953230503321134669684005843⟩⟩, + ⟨⟨-8583030700007354588122380480550068696159162759,-8583030700007354588122380480550068696159162757⟩,⟨333627900174281044847013172854538835290023010,333627900174281044847013172854538835290023011⟩⟩, + ⟨⟨375988028634854502287678641767770008007221779128,375988028634854502287678641767770008007221779132⟩,⟨717045233648241119971991359911922147860587249233,717045233648241119971991359911922147860587249238⟩⟩, + ⟨⟨14660368987125394189169673527900024251357023947742,14660368987125394189169673527900024251357023947841⟩,⟨-26586815959841812677697460065216678872729379746134,-26586815959841812677697460065216678872729379746035⟩⟩, + ⟨⟨-524907381811076265292718091137313456806903045122461,-524907381811076265292718091137313456806903045120979⟩,⟨152866235527711012709338561169117888675546572688369,152866235527711012709338561169117888675546572689852⟩⟩, + ⟨⟨5294581626107594285152350583503133767579055286883404,5294581626107594285152350583503133767579055286896631⟩,⟨1459859169011542839323143319256907285083006961577676,1459859169011542839323143319256907285083006961590893⟩⟩, + ⟨⟨-28907325566077068983001915545154294992556657744525258,-28907325566077068983001915545154294992556657744469211⟩,⟨-19096622928366401872890783751487467176562207967853908,-19096622928366401872890783751487467176562207967797763⟩⟩] +lemma tw0_1_6_15_calc (j : Fin 31) : taylorWaveBox 0 1 6 15 j = tw0_1_6_15 j := by + revert j + decide +kernel +def tw0_1_6_16 : Fin 31 → CI := ![⟨⟨-3463605458131946757990620918005291922281702071167936,-3463605458131946757990620918005291922281702071154957⟩,⟨-7652501501133828533878766990451144064962068267456341,-7652501501133828533878766990451144064962068267443372⟩⟩, + ⟨⟨99506398761227574082411958731120211658418493829307,99506398761227574082411958731120211658418493833075⟩,⟨1403659327860708705144898609307403337741572593483376,1403659327860708705144898609307403337741572593487147⟩⟩, + ⟨⟨74348894259781993590909337281117119091283374436322,74348894259781993590909337281117119091283374436714⟩,⟨-128539114587357303125104880420928738282368460575876,-128539114587357303125104880420928738282368460575484⟩⟩, + ⟨⟨-8566145189136544661212118900447932682519163173824,-8566145189136544661212118900447932682519163173789⟩,⟨1882711997668467509668967307055264045348756932119,1882711997668467509668967307055264045348756932153⟩⟩, + ⟨⟨169991103828832024205518262070062515536562844949,169991103828832024205518262070062515536562844951⟩,⟨182789103355185140774576612757299218837795616758,182789103355185140774576612757299218837795616760⟩⟩, + ⟨⟨1193087208787982113623256040500330378559826728,1193087208787982113623256040500330378559826729⟩,⟨-2573171694329048145050288962096136449767582425,-2573171694329048145050288962096136449767582424⟩⟩, + ⟨⟨-10183633898769489369722796775318724585269310,-10183633898769489369722796775318724585269309⟩,⟨-712952479377863319778478513715831851843873,-712952479377863319778478513715831851843872⟩⟩, + ⟨⟨4161163822026938653080804716754334592802,4161163822026938653080804716754334592804⟩,⟨7815790395914629843456214148038032380426,7815790395914629843456214148038032380429⟩⟩, + ⟨⟨-55530963972871101209207392916976466,-55530963972871101209207392916976459⟩,⟨-1373164252132146615635085842424594716,-1373164252132146615635085842424594708⟩⟩, + ⟨⟨19754367926470613561316925818486,19754367926470613561316925818516⟩,⟨21486621203483070936358838733558,21486621203483070936358838733590⟩⟩, + ⟨⟨25141132023183549874348665,25141132023183549874348830⟩,⟨71113855992963870856283731,71113855992963870856283896⟩⟩, + ⟨⟨-884034182843164121,-884034182843163337⟩,⟨-30740632879650036106,-30740632879650035304⟩⟩, + ⟨⟨-4804037743496,-4804037741001⟩,⟨-2005677786028,-2005677783532⟩⟩, + ⟨⟨-2602421,-2596933⟩,⟨286167,291655⟩⟩, + ⟨⟨-6620,5207⟩,⟨-8517,1359⟩⟩, + ⟨⟨-6526,10442⟩,⟨-10442,10442⟩⟩, + ⟨⟨-6620,5262⟩,⟨-2389,8517⟩⟩, + ⟨⟨-2602421,-2596933⟩,⟨-291655,-286167⟩⟩, + ⟨⟨-4804037743496,-4804037741001⟩,⟨2005677783532,2005677786028⟩⟩, + ⟨⟨-884034182843164121,-884034182843163337⟩,⟨30740632879650035304,30740632879650036106⟩⟩, + ⟨⟨25141132023183549874348665,25141132023183549874348830⟩,⟨-71113855992963870856283896,-71113855992963870856283731⟩⟩, + ⟨⟨19754367926470613561316925818486,19754367926470613561316925818516⟩,⟨-21486621203483070936358838733590,-21486621203483070936358838733558⟩⟩, + ⟨⟨-55530963972871101209207392916976466,-55530963972871101209207392916976459⟩,⟨1373164252132146615635085842424594708,1373164252132146615635085842424594716⟩⟩, + ⟨⟨4161163822026938653080804716754334592802,4161163822026938653080804716754334592804⟩,⟨-7815790395914629843456214148038032380429,-7815790395914629843456214148038032380426⟩⟩, + ⟨⟨-10183633898769489369722796775318724585269310,-10183633898769489369722796775318724585269309⟩,⟨712952479377863319778478513715831851843872,712952479377863319778478513715831851843873⟩⟩, + ⟨⟨1193087208787982113623256040500330378559826728,1193087208787982113623256040500330378559826729⟩,⟨2573171694329048145050288962096136449767582424,2573171694329048145050288962096136449767582425⟩⟩, + ⟨⟨169991103828832024205518262070062515536562844949,169991103828832024205518262070062515536562844951⟩,⟨-182789103355185140774576612757299218837795616760,-182789103355185140774576612757299218837795616758⟩⟩, + ⟨⟨-8566145189136544661212118900447932682519163173824,-8566145189136544661212118900447932682519163173789⟩,⟨-1882711997668467509668967307055264045348756932153,-1882711997668467509668967307055264045348756932119⟩⟩, + ⟨⟨74348894259781993590909337281117119091283374436322,74348894259781993590909337281117119091283374436714⟩,⟨128539114587357303125104880420928738282368460575484,128539114587357303125104880420928738282368460575876⟩⟩, + ⟨⟨99506398761227574082411958731120211658418493829307,99506398761227574082411958731120211658418493833075⟩,⟨-1403659327860708705144898609307403337741572593487147,-1403659327860708705144898609307403337741572593483376⟩⟩, + ⟨⟨-3463605458131946757990620918005291922281702071167936,-3463605458131946757990620918005291922281702071154957⟩,⟨7652501501133828533878766990451144064962068267443372,7652501501133828533878766990451144064962068267456341⟩⟩] +lemma tw0_1_6_16_calc (j : Fin 31) : taylorWaveBox 0 1 6 16 j = tw0_1_6_16 j := by + revert j + decide +kernel +def tw0_1_6_17 : Fin 31 → CI := ![⟨⟨1861381938462278885789660934285905843234798469913990,1861381938462278885789660934285905843234798469916768⟩,⟨-507634544261641849530542810794873890824433722085455,-507634544261641849530542810794873890824433722082678⟩⟩, + ⟨⟨-338795043598592292966564434672214341746504066803121,-338795043598592292966564434672214341746504066802141⟩,⟨-43431063571181299309612960968154914465193849616297,-43431063571181299309612960968154914465193849615318⟩⟩, + ⟨⟨27552748381126459718995752729401777109581437214861,27552748381126459718995752729401777109581437214956⟩,⟨26472526191340878312397131543231106360282456919037,26472526191340878312397131543231106360282456919132⟩⟩, + ⟨⟨170847120932764007358878216464614065216917371018,170847120932764007358878216464614065216917371029⟩,⟨-2394196843215040623534476986695672903677959503003,-2394196843215040623534476986695672903677959502992⟩⟩, + ⟨⟨-66853246695675949857774929611167518948273160937,-66853246695675949857774929611167518948273160936⟩,⟨29089886999436724037042255054627186656971716591,29089886999436724037042255054627186656971716592⟩⟩, + ⟨⟨599150268121742097297927780096584665436513524,599150268121742097297927780096584665436513525⟩,⟨654428908081561590884536302858307863847544572,654428908081561590884536302858307863847544573⟩⟩, + ⟨⟨1730361557669947728127235463873549587785661,1730361557669947728127235463873549587785662⟩,⟨-2964354341503073017133546382796421105161456,-2964354341503073017133546382796421105161455⟩⟩, + ⟨⟨-3207846979434332943999582791039473762562,-3207846979434332943999582791039473762560⟩,⟨-129465535740867581385221014050193348096,-129465535740867581385221014050193348095⟩⟩, + ⟨⟨453683055196107990627627239787540971,453683055196107990627627239787540976⟩,⟨290700758500248906081055487369244318,290700758500248906081055487369244323⟩⟩, + ⟨⟨-12385625858291492180985353159117,-12385625858291492180985353159100⟩,⟨507134836612480071716072122053,507134836612480071716072122071⟩⟩, + ⟨⟨-30955785790844713790050064,-30955785790844713790049989⟩,⟨-15668336888957895061641850,-15668336888957895061641776⟩⟩, + ⟨⟨9480394379390738540,9480394379390738923⟩,⟨11975831877245917058,11975831877245917426⟩⟩, + ⟨⟨2755457382013,2755457383147⟩,⟨-295337742517,-295337741383⟩⟩, + ⟨⟨1319697,1323434⟩,⟨-652607,-648870⟩⟩, + ⟨⟨-3074,4626⟩,⟨-1414,5387⟩⟩, + ⟨⟨-6184,3865⟩,⟨-6184,6184⟩⟩, + ⟨⟨-3212,4626⟩,⟨-5387,2002⟩⟩, + ⟨⟨1319697,1323434⟩,⟨648870,652607⟩⟩, + ⟨⟨2755457382013,2755457383147⟩,⟨295337741383,295337742517⟩⟩, + ⟨⟨9480394379390738540,9480394379390738923⟩,⟨-11975831877245917426,-11975831877245917058⟩⟩, + ⟨⟨-30955785790844713790050064,-30955785790844713790049989⟩,⟨15668336888957895061641776,15668336888957895061641850⟩⟩, + ⟨⟨-12385625858291492180985353159117,-12385625858291492180985353159100⟩,⟨-507134836612480071716072122071,-507134836612480071716072122053⟩⟩, + ⟨⟨453683055196107990627627239787540971,453683055196107990627627239787540976⟩,⟨-290700758500248906081055487369244323,-290700758500248906081055487369244318⟩⟩, + ⟨⟨-3207846979434332943999582791039473762562,-3207846979434332943999582791039473762560⟩,⟨129465535740867581385221014050193348095,129465535740867581385221014050193348096⟩⟩, + ⟨⟨1730361557669947728127235463873549587785661,1730361557669947728127235463873549587785662⟩,⟨2964354341503073017133546382796421105161455,2964354341503073017133546382796421105161456⟩⟩, + ⟨⟨599150268121742097297927780096584665436513524,599150268121742097297927780096584665436513525⟩,⟨-654428908081561590884536302858307863847544573,-654428908081561590884536302858307863847544572⟩⟩, + ⟨⟨-66853246695675949857774929611167518948273160937,-66853246695675949857774929611167518948273160936⟩,⟨-29089886999436724037042255054627186656971716592,-29089886999436724037042255054627186656971716591⟩⟩, + ⟨⟨170847120932764007358878216464614065216917371018,170847120932764007358878216464614065216917371029⟩,⟨2394196843215040623534476986695672903677959502992,2394196843215040623534476986695672903677959503003⟩⟩, + ⟨⟨27552748381126459718995752729401777109581437214861,27552748381126459718995752729401777109581437214956⟩,⟨-26472526191340878312397131543231106360282456919132,-26472526191340878312397131543231106360282456919037⟩⟩, + ⟨⟨-338795043598592292966564434672214341746504066803121,-338795043598592292966564434672214341746504066802141⟩,⟨43431063571181299309612960968154914465193849615318,43431063571181299309612960968154914465193849616297⟩⟩, + ⟨⟨1861381938462278885789660934285905843234798469913990,1861381938462278885789660934285905843234798469916768⟩,⟨507634544261641849530542810794873890824433722082678,507634544261641849530542810794873890824433722085455⟩⟩] +lemma tw0_1_6_17_calc (j : Fin 31) : taylorWaveBox 0 1 6 17 j = tw0_1_6_17 j := by + revert j + decide +kernel +def tw0_1_6_18 : Fin 31 → CI := ![⟨⟨45155903205163464939752335268174593245560015144012,45155903205163464939752335268174593245560015144595⟩,⟨418568964426112097517384538583182987125488515611476,418568964426112097517384538583182987125488515612059⟩⟩, + ⟨⟨25207201109362905407885563317243653624466258508280,25207201109362905407885563317243653624466258508515⟩,⟨-74621208426861976904621598678007018997661556909197,-74621208426861976904621598678007018997661556908962⟩⟩, + ⟨⟨-7891722981717232452070747175094966083047164487291,-7891722981717232452070747175094966083047164487266⟩,⟨4996006195772139189977051891168308022410835632718,4996006195772139189977051891168308022410835632743⟩⟩, + ⟨⟨584305610267955201562191391891737498910203007419,584305610267955201562191391891737498910203007422⟩,⟨219148549641141852147486753680163965977426598929,219148549641141852147486753680163965977426598933⟩⟩, + ⟨⟨-1449325707468913617379136746082467270235652941,-1449325707468913617379136746082467270235652940⟩,⟨-20178176509572450592834335059462876611707564824,-20178176509572450592834335059462876611707564822⟩⟩, + ⟨⟨-248056904765816855929948707585220682025944353,-248056904765816855929948707585220682025944352⟩,⟨89431333435483317664359994314855238183682981,89431333435483317664359994314855238183682982⟩⟩, + ⟨⟨604471521480823638799604847393105648735528,604471521480823638799604847393105648735529⟩,⟨914694080203083935896852917480095614665008,914694080203083935896852917480095614665009⟩⟩, + ⟨⟨596664420785712142560624528533480579938,596664420785712142560624528533480579939⟩,⟨-931067250055071777840083094856724211120,-931067250055071777840083094856724211119⟩⟩, + ⟨⟨-185576933475219438285255762822865599,-185576933475219438285255762822865597⟩,⟨76429347931622246325978520087387515,76429347931622246325978520087387517⟩⟩, + ⟨⟨3072649723412846661485298241069,3072649723412846661485298241075⟩,⟨-3946221283591518897518820976545,-3946221283591518897518820976539⟩⟩, + ⟨⟨14511313908974548065589313,14511313908974548065589348⟩,⟨-4391476671229241272165867,-4391476671229241272165832⟩⟩, + ⟨⟨-6964002015262131107,-6964002015262130936⟩,⟨-1854937536232068942,-1854937536232068781⟩⟩, + ⟨⟨-1149450941407,-1149450940687⟩,⟨801748547525,801748548245⟩⟩, + ⟨⟨-547708,-545475⟩,⟨566674,568907⟩⟩, + ⟨⟨-2908,1671⟩,⟨-3124,1105⟩⟩, + ⟨⟨-2175,3479⟩,⟨-3479,3479⟩⟩, + ⟨⟨-2908,1803⟩,⟨-1413,3124⟩⟩, + ⟨⟨-547708,-545475⟩,⟨-568907,-566674⟩⟩, + ⟨⟨-1149450941407,-1149450940687⟩,⟨-801748548245,-801748547525⟩⟩, + ⟨⟨-6964002015262131107,-6964002015262130936⟩,⟨1854937536232068781,1854937536232068942⟩⟩, + ⟨⟨14511313908974548065589313,14511313908974548065589348⟩,⟨4391476671229241272165832,4391476671229241272165867⟩⟩, + ⟨⟨3072649723412846661485298241069,3072649723412846661485298241075⟩,⟨3946221283591518897518820976539,3946221283591518897518820976545⟩⟩, + ⟨⟨-185576933475219438285255762822865599,-185576933475219438285255762822865597⟩,⟨-76429347931622246325978520087387517,-76429347931622246325978520087387515⟩⟩, + ⟨⟨596664420785712142560624528533480579938,596664420785712142560624528533480579939⟩,⟨931067250055071777840083094856724211119,931067250055071777840083094856724211120⟩⟩, + ⟨⟨604471521480823638799604847393105648735528,604471521480823638799604847393105648735529⟩,⟨-914694080203083935896852917480095614665009,-914694080203083935896852917480095614665008⟩⟩, + ⟨⟨-248056904765816855929948707585220682025944353,-248056904765816855929948707585220682025944352⟩,⟨-89431333435483317664359994314855238183682982,-89431333435483317664359994314855238183682981⟩⟩, + ⟨⟨-1449325707468913617379136746082467270235652941,-1449325707468913617379136746082467270235652940⟩,⟨20178176509572450592834335059462876611707564822,20178176509572450592834335059462876611707564824⟩⟩, + ⟨⟨584305610267955201562191391891737498910203007419,584305610267955201562191391891737498910203007422⟩,⟨-219148549641141852147486753680163965977426598933,-219148549641141852147486753680163965977426598929⟩⟩, + ⟨⟨-7891722981717232452070747175094966083047164487291,-7891722981717232452070747175094966083047164487266⟩,⟨-4996006195772139189977051891168308022410835632743,-4996006195772139189977051891168308022410835632718⟩⟩, + ⟨⟨25207201109362905407885563317243653624466258508280,25207201109362905407885563317243653624466258508515⟩,⟨74621208426861976904621598678007018997661556908962,74621208426861976904621598678007018997661556909197⟩⟩, + ⟨⟨45155903205163464939752335268174593245560015144012,45155903205163464939752335268174593245560015144595⟩,⟨-418568964426112097517384538583182987125488515612059,-418568964426112097517384538583182987125488515611476⟩⟩] +lemma tw0_1_6_18_calc (j : Fin 31) : taylorWaveBox 0 1 6 18 j = tw0_1_6_18 j := by + revert j + decide +kernel +def tw0_1_6_19 : Fin 31 → CI := ![⟨⟨-87374456398865503246729714823812792653622647282645,-87374456398865503246729714823812792653622647282506⟩,⟨-4487340705111438828437581311282344836439126931935,-4487340705111438828437581311282344836439126931797⟩⟩, + ⟨⟨14976408951981862381993385401769441946213398310335,14976408951981862381993385401769441946213398310388⟩,⟨8655380959335671146377956741105222329801656596379,8655380959335671146377956741105222329801656596431⟩⟩, + ⟨⟨-690972020750367257962604095532766152099429740753,-690972020750367257962604095532766152099429740745⟩,⟨-2061770989619459884647666842170626817654368302895,-2061770989619459884647666842170626817654368302887⟩⟩, + ⟨⟨-93071192418695145579818585721406514481883298501,-93071192418695145579818585721406514481883298500⟩,⟨123347041365728996593774783030781202891042059065,123347041365728996593774783030781202891042059066⟩⟩, + ⟨⟨5156615630154838155104748453919540824704536506,5156615630154838155104748453919540824704536507⟩,⟨1410568447036808629378633249306317650962371075,1410568447036808629378633249306317650962371076⟩⟩, + ⟨⟨3676761684501340874235126551974507239109094,3676761684501340874235126551974507239109095⟩,⟨-74541452180852605515685647645254110466670188,-74541452180852605515685647645254110466670187⟩⟩, + ⟨⟨-330905307474069112883042542869451119675478,-330905307474069112883042542869451119675477⟩,⟨41745434940489705364753868425613785408279,41745434940489705364753868425613785408280⟩⟩, + ⟨⟨164719810902616740017817492343197038336,164719810902616740017817492343197038338⟩,⟨323218596213761651326081849591977791668,323218596213761651326081849591977791669⟩⟩, + ⟨⟨15508548358030982466373267805994295,15508548358030982466373267805994296⟩,⟨-69485916725503886109857868228739241,-69485916725503886109857868228739240⟩⟩, + ⟨⟨394461078121408532627945218062,394461078121408532627945218065⟩,⟨1880886836701598504136427682130,1880886836701598504136427682133⟩⟩, + ⟨⟨-3105091830881625584608945,-3105091830881625584608931⟩,⟨5492823441114263813094043,5492823441114263813094057⟩⟩, + ⟨⟨3006801709498691877,3006801709498691964⟩,⟨-1202865557922883609,-1202865557922883522⟩⟩, + ⟨⟨299333461711,299333462044⟩,⟨-604969671179,-604969670847⟩⟩, + ⟨⟨163009,164130⟩,⟨-367323,-366202⟩⟩, + ⟨⟨-837,1669⟩,⟨-735,1671⟩⟩, + ⟨⟨-1864,1165⟩,⟨-1864,1864⟩⟩, + ⟨⟨-934,1669⟩,⟨-1671,883⟩⟩, + ⟨⟨163009,164130⟩,⟨366202,367323⟩⟩, + ⟨⟨299333461711,299333462044⟩,⟨604969670847,604969671179⟩⟩, + ⟨⟨3006801709498691877,3006801709498691964⟩,⟨1202865557922883522,1202865557922883609⟩⟩, + ⟨⟨-3105091830881625584608945,-3105091830881625584608931⟩,⟨-5492823441114263813094057,-5492823441114263813094043⟩⟩, + ⟨⟨394461078121408532627945218062,394461078121408532627945218065⟩,⟨-1880886836701598504136427682133,-1880886836701598504136427682130⟩⟩, + ⟨⟨15508548358030982466373267805994295,15508548358030982466373267805994296⟩,⟨69485916725503886109857868228739240,69485916725503886109857868228739241⟩⟩, + ⟨⟨164719810902616740017817492343197038336,164719810902616740017817492343197038338⟩,⟨-323218596213761651326081849591977791669,-323218596213761651326081849591977791668⟩⟩, + ⟨⟨-330905307474069112883042542869451119675478,-330905307474069112883042542869451119675477⟩,⟨-41745434940489705364753868425613785408280,-41745434940489705364753868425613785408279⟩⟩, + ⟨⟨3676761684501340874235126551974507239109094,3676761684501340874235126551974507239109095⟩,⟨74541452180852605515685647645254110466670187,74541452180852605515685647645254110466670188⟩⟩, + ⟨⟨5156615630154838155104748453919540824704536506,5156615630154838155104748453919540824704536507⟩,⟨-1410568447036808629378633249306317650962371076,-1410568447036808629378633249306317650962371075⟩⟩, + ⟨⟨-93071192418695145579818585721406514481883298501,-93071192418695145579818585721406514481883298500⟩,⟨-123347041365728996593774783030781202891042059066,-123347041365728996593774783030781202891042059065⟩⟩, + ⟨⟨-690972020750367257962604095532766152099429740753,-690972020750367257962604095532766152099429740745⟩,⟨2061770989619459884647666842170626817654368302887,2061770989619459884647666842170626817654368302895⟩⟩, + ⟨⟨14976408951981862381993385401769441946213398310335,14976408951981862381993385401769441946213398310388⟩,⟨-8655380959335671146377956741105222329801656596431,-8655380959335671146377956741105222329801656596379⟩⟩, + ⟨⟨-87374456398865503246729714823812792653622647282645,-87374456398865503246729714823812792653622647282506⟩,⟨4487340705111438828437581311282344836439126931797,4487340705111438828437581311282344836439126931935⟩⟩] +lemma tw0_1_6_19_calc (j : Fin 31) : taylorWaveBox 0 1 6 19 j = tw0_1_6_19 j := by + revert j + decide +kernel +def tw0_1_6_20 : Fin 31 → CI := ![⟨⟨3619410133906306235968247351151452988474663696013,3619410133906306235968247351151452988474663696045⟩,⟨-16973603204725951105335910333017250960825339450990,-16973603204725951105335910333017250960825339450959⟩⟩, + ⟨⟨-2397299733562665103551666006623905259176410835233,-2397299733562665103551666006623905259176410835221⟩,⟨2720628000399327136406415590240385870116888520439,2720628000399327136406415590240385870116888520450⟩⟩, + ⟨⟨481586770931332146812659511159688713622793555065,481586770931332146812659511159688713622793555067⟩,⟨-39754332831667037952974286297883178095393950119,-39754332831667037952974286297883178095393950116⟩⟩, + ⟨⟨-21717009674562383492475872018055325432415597207,-21717009674562383492475872018055325432415597206⟩,⟨-29363434979179804509375123253988466503780903364,-29363434979179804509375123253988466503780903363⟩⟩, + ⟨⟨-767810730807239413816105791714768373275297678,-767810730807239413816105791714768373275297677⟩,⟨1108620848085986870751116102963202592758553178,1108620848085986870751116102963202592758553179⟩⟩, + ⟨⟨18203114964999363671362002477754318082972728,18203114964999363671362002477754318082972729⟩,⟨8672024659140245902873800397428819860327945,8672024659140245902873800397428819860327946⟩⟩, + ⟨⟨31656241951282954882975957567096397162652,31656241951282954882975957567096397162653⟩,⟨-91530449974124329580014594677651266611190,-91530449974124329580014594677651266611189⟩⟩, + ⟨⟨-113404464148042577998635405165918202928,-113404464148042577998635405165918202927⟩,⟨-6613795540922426267576527212294899326,-6613795540922426267576527212294899325⟩⟩, + ⟨⟨16272229257619247255737812790564438,16272229257619247255737812790564440⟩,⟨17787562476184967162571109058785862,17787562476184967162571109058785864⟩⟩, + ⟨⟨-620027744407107163411015297270,-620027744407107163411015297268⟩,⟨-335326920279276662565713708831,-335326920279276662565713708829⟩⟩, + ⟨⟨-615053901958042787421221,-615053901958042787421214⟩,⟨-2429960330640188111012896,-2429960330640188111012889⟩⟩, + ⟨⟨-725338110574142719,-725338110574142692⟩,⟨1184694559504478399,1184694559504478429⟩⟩, + ⟨⟨13278153774,13278153895⟩,⟨310025025500,310025025621⟩⟩, + ⟨⟨-14412,-13939⟩,⟨194571,195044⟩⟩, + ⟨⟨-883,385⟩,⟨-827,436⟩⟩, + ⟨⟨-596,954⟩,⟨-954,954⟩⟩, + ⟨⟨-883,447⟩,⟨-501,827⟩⟩, + ⟨⟨-14412,-13939⟩,⟨-195044,-194571⟩⟩, + ⟨⟨13278153774,13278153895⟩,⟨-310025025621,-310025025500⟩⟩, + ⟨⟨-725338110574142719,-725338110574142692⟩,⟨-1184694559504478429,-1184694559504478399⟩⟩, + ⟨⟨-615053901958042787421221,-615053901958042787421214⟩,⟨2429960330640188111012889,2429960330640188111012896⟩⟩, + ⟨⟨-620027744407107163411015297270,-620027744407107163411015297268⟩,⟨335326920279276662565713708829,335326920279276662565713708831⟩⟩, + ⟨⟨16272229257619247255737812790564438,16272229257619247255737812790564440⟩,⟨-17787562476184967162571109058785864,-17787562476184967162571109058785862⟩⟩, + ⟨⟨-113404464148042577998635405165918202928,-113404464148042577998635405165918202927⟩,⟨6613795540922426267576527212294899325,6613795540922426267576527212294899326⟩⟩, + ⟨⟨31656241951282954882975957567096397162652,31656241951282954882975957567096397162653⟩,⟨91530449974124329580014594677651266611189,91530449974124329580014594677651266611190⟩⟩, + ⟨⟨18203114964999363671362002477754318082972728,18203114964999363671362002477754318082972729⟩,⟨-8672024659140245902873800397428819860327946,-8672024659140245902873800397428819860327945⟩⟩, + ⟨⟨-767810730807239413816105791714768373275297678,-767810730807239413816105791714768373275297677⟩,⟨-1108620848085986870751116102963202592758553179,-1108620848085986870751116102963202592758553178⟩⟩, + ⟨⟨-21717009674562383492475872018055325432415597207,-21717009674562383492475872018055325432415597206⟩,⟨29363434979179804509375123253988466503780903363,29363434979179804509375123253988466503780903364⟩⟩, + ⟨⟨481586770931332146812659511159688713622793555065,481586770931332146812659511159688713622793555067⟩,⟨39754332831667037952974286297883178095393950116,39754332831667037952974286297883178095393950119⟩⟩, + ⟨⟨-2397299733562665103551666006623905259176410835233,-2397299733562665103551666006623905259176410835221⟩,⟨-2720628000399327136406415590240385870116888520450,-2720628000399327136406415590240385870116888520439⟩⟩, + ⟨⟨3619410133906306235968247351151452988474663696013,3619410133906306235968247351151452988474663696045⟩,⟨16973603204725951105335910333017250960825339450959,16973603204725951105335910333017250960825339450990⟩⟩] +lemma tw0_1_6_20_calc (j : Fin 31) : taylorWaveBox 0 1 6 20 j = tw0_1_6_20 j := by + revert j + decide +kernel +def tw0_1_6 : Fin 21 → Fin 31 → CI := ![tw0_1_6_0,tw0_1_6_1,tw0_1_6_2,tw0_1_6_3,tw0_1_6_4,tw0_1_6_5,tw0_1_6_6,tw0_1_6_7,tw0_1_6_8,tw0_1_6_9,tw0_1_6_10,tw0_1_6_11,tw0_1_6_12,tw0_1_6_13,tw0_1_6_14,tw0_1_6_15,tw0_1_6_16,tw0_1_6_17,tw0_1_6_18,tw0_1_6_19,tw0_1_6_20] +lemma tw0_1_6_mem (l : Fin 21) (j : Fin 31) : (tw0_1_6 l j).Mem (taylorWave 0 1 (nearNode 6) l.val (frequency j)) := by + have he : taylorWaveBox 0 1 6 l j = tw0_1_6 l j := by + fin_cases l + · exact tw0_1_6_0_calc j + · exact tw0_1_6_1_calc j + · exact tw0_1_6_2_calc j + · exact tw0_1_6_3_calc j + · exact tw0_1_6_4_calc j + · exact tw0_1_6_5_calc j + · exact tw0_1_6_6_calc j + · exact tw0_1_6_7_calc j + · exact tw0_1_6_8_calc j + · exact tw0_1_6_9_calc j + · exact tw0_1_6_10_calc j + · exact tw0_1_6_11_calc j + · exact tw0_1_6_12_calc j + · exact tw0_1_6_13_calc j + · exact tw0_1_6_14_calc j + · exact tw0_1_6_15_calc j + · exact tw0_1_6_16_calc j + · exact tw0_1_6_17_calc j + · exact tw0_1_6_18_calc j + · exact tw0_1_6_19_calc j + · exact tw0_1_6_20_calc j + rw [← he] + exact taylorWaveBox_mem 0 1 6 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave10.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave10.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac4012bd168869af225d3a34d857f539f853f97a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave10.lean @@ -0,0 +1,28 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave100 +import OAI.Analysis.Triangular.Taylor.TaylorWave101 +import OAI.Analysis.Triangular.Taylor.TaylorWave102 +import OAI.Analysis.Triangular.Taylor.TaylorWave103 +import OAI.Analysis.Triangular.Taylor.TaylorWave104 +import OAI.Analysis.Triangular.Taylor.TaylorWave105 +import OAI.Analysis.Triangular.Taylor.TaylorWave106 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0 : Fin 7 → Fin 21 → Fin 31 → CI := ![tw1_0_0,tw1_0_1,tw1_0_2,tw1_0_3,tw1_0_4,tw1_0_5,tw1_0_6] +lemma tw1_0_mem (n : Fin 7) (l : Fin 21) (j : Fin 31) : (tw1_0 n l j).Mem (taylorWave 1 0 (nearNode n) l.val (frequency j)) := by + fin_cases n + · exact tw1_0_0_mem l j + · exact tw1_0_1_mem l j + · exact tw1_0_2_mem l j + · exact tw1_0_3_mem l j + · exact tw1_0_4_mem l j + · exact tw1_0_5_mem l j + · exact tw1_0_6_mem l j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave100.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave100.lean new file mode 100644 index 0000000000000000000000000000000000000000..2732cfb29f4a7651c1d260baabf63f5c03bce257 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave100.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_0_0 : Fin 31 → CI := ![⟨⟨1930876249559083412240504245396685750590269987472966030831513,1930876249559083412240504245396685750590269987473018969260017⟩,⟨101481306555103785501034847098646010048133740263448682860155,101481306555103785501034847098646010048133740263498857388403⟩⟩, + ⟨⟨1665804452308282383788364347399773339232672013743004848212599,1665804452308282383788364347399773339232672013743049951121699⟩,⟨328583079948006291399693065152096507722348581788814159488978,328583079948006291399693065152096507722348581788858308986758⟩⟩, + ⟨⟨1397602987222613464874788935947838415621103200662130582710980,1397602987222613464874788935947838415621103200662168036061685⟩,⟨482399308036557894623832916993456547401918220838500148998803,482399308036557894623832916993456547401918220838537970350336⟩⟩, + ⟨⟨1140368362284588056905449959635843502405954623695779537097412,1140368362284588056905449959635843502405954623695809809734379⟩,⟨571091566351281895524041076621333650393072649691321742090381,571091566351281895524041076621333650393072649691353230158918⟩⟩, + ⟨⟨904980417312028971395406798416895719429075376854141202935569,904980417312028971395406798416895719429075376854164969173897⟩,⟨604832059140625718741334091291500709108610799899704298381355,604832059140625718741334091291500709108610799899729700670505⟩⟩, + ⟨⟨698958529684953132275911522404773131358445238306934302442059,698958529684953132275911522404773131358445238306952367694642⟩,⟨594907609128560638535184671701375783779777697588788035471177,594907609128560638535184671701375783779777697588807803828301⟩⟩, + ⟨⟨526531641176151329873395619532224271743302420649378046991815,526531641176151329873395619532224271743302420649391279531658⟩,⟨552858223234958896367065400508835485330467541681846980380928,552858223234958896367065400508835485330467541681861721322811⟩⟩, + ⟨⟨388901499618198877646320511372108885420932132742318717039929,388901499618198877646320511372108885420932132742329371177912⟩,⟨489696549945596463917661448935676845359135866888377192641431,489696549945596463917661448935676845359135866888388652648415⟩⟩, + ⟨⟨284669186535647183317912412351756217808241272260434612566268,284669186535647183317912412351756217808241272260442942190334⟩,⟨415247694097844818058011109145669542438791405579488109679390,415247694097844818058011109145669542438791405579496771504964⟩⟩, + ⟨⟨210387559671923953039237973137568498845053991070814585214419,210387559671923953039237973137568498845053991070820866023894⟩,⟨337640245602667196188943710184203665360050127930614139823760,337640245602667196188943710184203665360050127930620487197257⟩⟩, + ⟨⟨161196988600330332538910782270867783633429328629020327190026,161196988600330332538910782270867783633429328629024851356811⟩,⟨262969476261108194444509746181557134356510032318996925077575,262969476261108194444509746181557134356510032319001417695124⟩⟩, + ⟨⟨131498905162799968610334063953881796253741231982502419882425,131498905162799968610334063953881796253741231982505491984517⟩,⟨195142980491205391952787841327712852332822210995413990206842,195142980491205391952787841327712852332822210995417042528903⟩⟩, + ⟨⟨115621315466599976049877346074247034705682317996600232826744,115621315466599976049877346074247034705682317996602356440151⟩,⟨135908125571237470762233731041497331940886303406621972328454,135908125571237470762233731041497331940886303406624114522360⟩⟩, + ⟨⟨108432495660168676544480644290985684464297254115890476415727,108432495660168676544480644290985684464297254115891946205989⟩,⟨85050081162482320885738921035063779846832864382832404194151,85050081162482320885738921035063779846832864382833821352468⟩⟩, + ⟨⟨105863473508566196141736447189752120055142130696581407965903,105863473508566196141736447189752120055142130696582441928699⟩,⟨40739440065606195515147656548149949863713554488076352399878,40739440065606195515147656548149949863713554488077056235455⟩⟩, + ⟨⟨105306328235230265974679123906444854348660484129876537398781,105306328235230265974679123906444854348660484129877418683823⟩,⟨-6517,7058⟩⟩, + ⟨⟨105863473508566196141736447189752120055142130696581407966354,105863473508566196141736447189752120055142130696582441928844⟩,⟨-40739440065606195515147656548149949863713554488077056234475,-40739440065606195515147656548149949863713554488076352399337⟩⟩, + ⟨⟨108432495660168676544480644290985684464297254115890476416059,108432495660168676544480644290985684464297254115891946206460⟩,⟨-85050081162482320885738921035063779846832864382833821352018,-85050081162482320885738921035063779846832864382832404193592⟩⟩, + ⟨⟨115621315466599976049877346074247034705682317996600232827769,115621315466599976049877346074247034705682317996602356440968⟩,⟨-135908125571237470762233731041497331940886303406624114521530,-135908125571237470762233731041497331940886303406621972327740⟩⟩, + ⟨⟨131498905162799968610334063953881796253741231982502419883449,131498905162799968610334063953881796253741231982505491985499⟩,⟨-195142980491205391952787841327712852332822210995417042528227,-195142980491205391952787841327712852332822210995413990206195⟩⟩, + ⟨⟨161196988600330332538910782270867783633429328629020327191762,161196988600330332538910782270867783633429328629024851358110⟩,⟨-262969476261108194444509746181557134356510032319001417694022,-262969476261108194444509746181557134356510032318996925076858⟩⟩, + ⟨⟨210387559671923953039237973137568498845053991070814585216979,210387559671923953039237973137568498845053991070820866025780⟩,⟨-337640245602667196188943710184203665360050127930620487195550,-337640245602667196188943710184203665360050127930614139822678⟩⟩, + ⟨⟨284669186535647183317912412351756217808241272260434612569233,284669186535647183317912412351756217808241272260442942193398⟩,⟨-415247694097844818058011109145669542438791405579496771502993,-415247694097844818058011109145669542438791405579488109677320⟩⟩, + ⟨⟨388901499618198877646320511372108885420932132742318717041954,388901499618198877646320511372108885420932132742329371181943⟩,⟨-489696549945596463917661448935676845359135866888388652647020,-489696549945596463917661448935676845359135866888377192638035⟩⟩, + ⟨⟨526531641176151329873395619532224271743302420649378046998911,526531641176151329873395619532224271743302420649391279532204⟩,⟨-552858223234958896367065400508835485330467541681861721315924,-552858223234958896367065400508835485330467541681846980380593⟩⟩, + ⟨⟨698958529684953132275911522404773131358445238306934302448109,698958529684953132275911522404773131358445238306952367695323⟩,⟨-594907609128560638535184671701375783779777697588807803821724,-594907609128560638535184671701375783779777697588788035469957⟩⟩, + ⟨⟨904980417312028971395406798416895719429075376854141202941789,904980417312028971395406798416895719429075376854164969174627⟩,⟨-604832059140625718741334091291500709108610799899729700662048,-604832059140625718741334091291500709108610799899704298378368⟩⟩, + ⟨⟨1140368362284588056905449959635843502405954623695779537103339,1140368362284588056905449959635843502405954623695809809737584⟩,⟨-571091566351281895524041076621333650393072649691353230148835,-571091566351281895524041076621333650393072649691321742082988⟩⟩, + ⟨⟨1397602987222613464874788935947838415621103200662130582715183,1397602987222613464874788935947838415621103200662168036063131⟩,⟨-482399308036557894623832916993456547401918220838537970341185,-482399308036557894623832916993456547401918220838500148992373⟩⟩, + ⟨⟨1665804452308282383788364347399773339232672013743004848211240,1665804452308282383788364347399773339232672013743049951127493⟩,⟨-328583079948006291399693065152096507722348581788858308980023,-328583079948006291399693065152096507722348581788814159475181⟩⟩, + ⟨⟨1930876249559083412240504245396685750590269987472966030832731,1930876249559083412240504245396685750590269987473018969260981⟩,⟨-101481306555103785501034847098646010048133740263498857372380,-101481306555103785501034847098646010048133740263448682844386⟩⟩] +lemma tw1_0_0_0_calc (j : Fin 31) : taylorWaveBox 1 0 0 0 j = tw1_0_0_0 j := by + revert j + decide +kernel +def tw1_0_0_1 : Fin 31 → CI := ![⟨⟨-315842629609775307179606798782101697774620936990677454650126,-315842629609775307179606798782101697774620936990622284434397⟩,⟨-1706261595311632933598771097541817490369808745630824183233812,-1706261595311632933598771097541817490369808745630766658549344⟩⟩, + ⟨⟨-81258626778889421990996988579351999568241619441483231437007,-81258626778889421990996988579351999568241619441437501844150⟩,⟨-1425594324071388847863437626891498303278346541319341981455598,-1425594324071388847863437626891498303278346541319295651810155⟩⟩, + ⟨⟨72129818345564558732523304522696903960338003394404114733850,72129818345564558732523304522696903960338003394440737670695⟩,⟨-1158053671200486622710630486433780436003554486516588659451309,-1158053671200486622710630486433780436003554486516552469297832⟩⟩, + ⟨⟨159858935238762102054645436464958974370792285283687197424986,159858935238762102054645436464958974370792285283715450141552⟩,⟨-915736442256081829663123511512490271639944300447241948077455,-915736442256081829663123511512490271639944300447214593588001⟩⟩, + ⟨⟨197526075921429707698308992849222327631039885369153481469740,197526075921429707698308992849222327631039885369174376388035⟩,⟨-705821621676249050295991459222251185512558266024786074979286,-705821621676249050295991459222251185512558266024766141842785⟩⟩, + ⟨⟨199713685347217099099972767064392252445102859685621378753103,199713685347217099099972767064392252445102859685636086295552⟩,⟨-531234747556895506468763465449194248283467965203894460121354,-531234747556895506468763465449194248283467965203880535434082⟩⟩, + ⟨⟨179199359711837194009450289121849065251320282856697595612660,179199359711837194009450289121849065251320282856707338917989⟩,⟨-391481678139705869989876016235424111779807387163877279256789,-391481678139705869989876016235424111779807387163868036156518⟩⟩, + ⟨⟨146463783914161303184993576223902994122222836262119483452026,146463783914161303184993576223902994122222836262126557209603⟩,⟨-283564782500651300099352328513734259461984440150997557643617,-283564782500651300099352328513734259461984440150990631119711⟩⟩, + ⟨⟨109485946035919613892856970141242908569930816651418909781132,109485946035919613892856970141242908569930816651423859673310⟩,⟨-202898947307014989237485202869190617565901100273184918171424,-202898947307014989237485202869190617565901100273179953040006⟩⟩, + ⟨⟨73795212002043603311583146120745624015080065450840164386993,73795212002043603311583146120745624015080065450843576195303⟩,⟨-144154320106328466019812490546024259461618099492097553502393,-144154320106328466019812490546024259461618099492094090434319⟩⟩, + ⟨⟨42733701538850400918104896036816788831355104108367442484500,42733701538850400918104896036816788831355104108369860827048⟩,⟨-101966501572275704008231688441867777939912296741286238853899,-101966501572275704008231688441867777939912296741283798843777⟩⟩, + ⟨⟨17870767328717719779068128944894901759880491590366327561344,17870767328717719779068128944894901759880491590367895669456⟩,⟨-71471835032167540461862043666468148817693503146626321091815,-71471835032167540461862043666468148817693503146624753404057⟩⟩, + ⟨⟨-495228970230630350009417624325187553761836131421749296811,-495228970230630350009417624325187553761836131420799918165⟩,⟨-48644257660976051859300433307391747911489456890280189047160,-48644257660976051859300433307391747911489456890279230802470⟩⟩, + ⟨⟨-12814022482601384140733750141719362979553525835762406218704,-12814022482601384140733750141719362979553525835761877362426⟩,⟨-30429541113980713709263472187792204778944824975370992479995,-30429541113980713709263472187792204778944824975370444362102⟩⟩, + ⟨⟨-19801869495321540939772029356572138474427108033330302741088,-19801869495321540939772029356572138474427108033329975231292⟩,⟨-14691335609172252674788569212517260169971980510691421659949,-14691335609172252674788569212517260169971980510691151011569⟩⟩, + ⟨⟨-22055305810687654647316958661150654184777880966978872813582,-22055305810687654647316958661150654184777880966978618033454⟩,⟨-1479,1366⟩⟩, + ⟨⟨-19801869495321540939772029356572138474427108033330302741152,-19801869495321540939772029356572138474427108033329975231441⟩,⟨14691335609172252674788569212517260169971980510691151011468,14691335609172252674788569212517260169971980510691421659766⟩⟩, + ⟨⟨-12814022482601384140733750141719362979553525835762406218863,-12814022482601384140733750141719362979553525835761877362552⟩,⟨30429541113980713709263472187792204778944824975370444362038,30429541113980713709263472187792204778944824975370992479942⟩⟩, + ⟨⟨-495228970230630350009417624325187553761836131421749297110,-495228970230630350009417624325187553761836131420799918521⟩,⟨48644257660976051859300433307391747911489456890279230802493,48644257660976051859300433307391747911489456890280189047136⟩⟩, + ⟨⟨17870767328717719779068128944894901759880491590366327560987,17870767328717719779068128944894901759880491590367895669085⟩,⟨71471835032167540461862043666468148817693503146624753404160,71471835032167540461862043666468148817693503146626321091902⟩⟩, + ⟨⟨42733701538850400918104896036816788831355104108367442483986,42733701538850400918104896036816788831355104108369860826398⟩,⟨101966501572275704008231688441867777939912296741283798844106,101966501572275704008231688441867777939912296741286238854072⟩⟩, + ⟨⟨73795212002043603311583146120745624015080065450840164386132,73795212002043603311583146120745624015080065450843576194259⟩,⟨144154320106328466019812490546024259461618099492094090434916,144154320106328466019812490546024259461618099492097553502764⟩⟩, + ⟨⟨109485946035919613892856970141242908569930816651418909779660,109485946035919613892856970141242908569930816651423859671875⟩,⟨202898947307014989237485202869190617565901100273179953040792,202898947307014989237485202869190617565901100273184918172248⟩⟩, + ⟨⟨146463783914161303184993576223902994122222836262119483449829,146463783914161303184993576223902994122222836262126557208302⟩,⟨283564782500651300099352328513734259461984440150990631120160,283564782500651300099352328513734259461984440150997557644983⟩⟩, + ⟨⟨179199359711837194009450289121849065251320282856697595611701,179199359711837194009450289121849065251320282856707338913567⟩,⟨391481678139705869989876016235424111779807387163868036159495,391481678139705869989876016235424111779807387163877279256303⟩⟩, + ⟨⟨199713685347217099099972767064392252445102859685621378751749,199713685347217099099972767064392252445102859685636086290961⟩,⟨531234747556895506468763465449194248283467965203880535436832,531234747556895506468763465449194248283467965203894460120889⟩⟩, + ⟨⟨197526075921429707698308992849222327631039885369153481467196,197526075921429707698308992849222327631039885369174376381800⟩,⟨705821621676249050295991459222251185512558266024766141845649,705821621676249050295991459222251185512558266024786074978473⟩⟩, + ⟨⟨159858935238762102054645436464958974370792285283687197418936,159858935238762102054645436464958974370792285283715450133491⟩,⟨915736442256081829663123511512490271639944300447214593590359,915736442256081829663123511512490271639944300447241948077813⟩⟩, + ⟨⟨72129818345564558732523304522696903960338003394404114728475,72129818345564558732523304522696903960338003394440737663104⟩,⟨1158053671200486622710630486433780436003554486516552469299444,1158053671200486622710630486433780436003554486516588659450707⟩⟩, + ⟨⟨-81258626778889421990996988579351999568241619441483231448941,-81258626778889421990996988579351999568241619441437501849868⟩,⟨1425594324071388847863437626891498303278346541319295651806701,1425594324071388847863437626891498303278346541319341981458367⟩⟩, + ⟨⟨-315842629609775307179606798782101697774620936990677454664107,-315842629609775307179606798782101697774620936990622284448616⟩,⟨1706261595311632933598771097541817490369808745630766658547087,1706261595311632933598771097541817490369808745630824183231316⟩⟩] +lemma tw1_0_0_1_calc (j : Fin 31) : taylorWaveBox 1 0 0 1 j = tw1_0_0_1 j := by + revert j + decide +kernel +def tw1_0_0_2 : Fin 31 → CI := ![⟨⟨-1067133158450836310695668706523098813483570159001844132489840,-1067133158450836310695668706523098813483570159001798861168065⟩,⟨474737462328453051366662982890941362609549026543517308923122,474737462328453051366662982890941362609549026543561424152850⟩⟩, + ⟨⟨-858081941101139946708123872537321394323808076446536277499659,-858081941101139946708123872537321394323808076446501816936775⟩,⟨273569903178029022972734916283229586551250212215636984361423,273569903178029022972734916283229586551250212215671283091256⟩⟩, + ⟨⟨-668215233381790192222152339064697325056673384278111090744891,-668215233381790192222152339064697325056673384278085786673768⟩,⟨140992303677952839226399202500230307476740913252376936054332,140992303677952839226399202500230307476740913252402512727498⟩⟩, + ⟨⟨-504589062763865840735891859840166659615433459563906513863455,-504589062763865840735891859840166659615433459563888653081096⟩,⟨60141601221344439167752046166158523041278478845992578952441,60141601221344439167752046166158523041278478846010793525494⟩⟩, + ⟨⟨-369797382275808085272536243260596416058585586898689875833991,-369797382275808085272536243260596416058585586898677823158739⟩,⟨16064490527382800877312780318059012878481951200931469689424,16064490527382800877312780318059012878481951200943774773283⟩⟩, + ⟨⟨-263165838482126272682685637760318573905900747356312940310580,-263165838482126272682685637760318573905900747356305229850957⟩,⟨-3695375252203765453107055123084528537181116702405167752045,-3695375252203765453107055123084528537181116702397363001562⟩⟩, + ⟨⟨-181883065107273114262601940536002991713858440231524762242116,-181883065107273114262601940536002991713858440231520148864250⟩,⟨-8877625796902616291388904240447765071747852439874290229516,-8877625796902616291388904240447765071747852439869718205348⟩⟩, + ⟨⟨-121989259324843902274537331209938077963640172447901294815972,-121989259324843902274537331209938077963640172447897864679264⟩,⟨-6583253408590769400410041234992260946128581215243060905220,-6583253408590769400410041234992260946128581215239714507020⟩⟩, + ⟨⟨-79169969075301818652147292827707487011700347928327792928626,-79169969075301818652147292827707487011700347928325361356504⟩,⟨-1569287138242502174131507075871404465891036061167427564846,-1569287138242502174131507075871404465891036061165057599523⟩⟩, + ⟨⟨-49331237547225487023159859161714335863108942703731218428783,-49331237547225487023159859161714335863108942703729626686665⟩,⟨3324166326820186362404861967176771107829564786704883200849,3324166326820186362404861967176771107829564786706451503917⟩⟩, + ⟨⟨-28958233880459886241992678672096952793511492683546924248036,-28958233880459886241992678672096952793511492683545943785977⟩,⟨6693813194866835043114836131443274722219324194924099520625,6693813194866835043114836131443274722219324194925079246739⟩⟩, + ⟨⟨-15281322005231113484303386766977170122482923839417310849690,-15281322005231113484303386766977170122482923839416765380587⟩,⟨8107732296342398324158349254074089025506157847482981604104,8107732296342398324158349254074089025506157847483528410788⟩⟩, + ⟨⟨-6289728053057738313461085364760838246844417201157479455079,-6289728053057738313461085364760838246844417201157181017387⟩,⟨7705847445965960292816896022666055595745418184680853512898,7705847445965960292816896022666055595745418184681151638087⟩⟩, + ⟨⟨-642656466835985243328714271071896618064581084743639304744,-642656466835985243328714271071896618064581084743494475807⟩,⟨5898095554519378961949557549825581918654689543789695296424,5898095554519378961949557549825581918654689543789845940847⟩⟩, + ⟨⟨2469439941953442331024750243127683966436467897484587883575,2469439941953442331024750243127683966436467897484660600370⟩,⟨3171729152918855880296515047758575883498224602619030437749,3171729152918855880296515047758575883498224602619098861876⟩⟩, + ⟨⟨3464439335376630747859084581638152223121113147267068936700,3464439335376630747859084581638152223121113147267119985123⟩,⟨-215,233⟩⟩, + ⟨⟨2469439941953442331024750243127683966436467897484587883606,2469439941953442331024750243127683966436467897484660600385⟩,⟨-3171729152918855880296515047758575883498224602619098861853,-3171729152918855880296515047758575883498224602619030437737⟩⟩, + ⟨⟨-642656466835985243328714271071896618064581084743639304719,-642656466835985243328714271071896618064581084743494475777⟩,⟨-5898095554519378961949557549825581918654689543789845940852,-5898095554519378961949557549825581918654689543789695296425⟩⟩, + ⟨⟨-6289728053057738313461085364760838246844417201157479455023,-6289728053057738313461085364760838246844417201157181017339⟩,⟨-7705847445965960292816896022666055595745418184681151638124,-7705847445965960292816896022666055595745418184680853512946⟩⟩, + ⟨⟨-15281322005231113484303386766977170122482923839417310849648,-15281322005231113484303386766977170122482923839416765380548⟩,⟨-8107732296342398324158349254074089025506157847483528410865,-8107732296342398324158349254074089025506157847482981604184⟩⟩, + ⟨⟨-28958233880459886241992678672096952793511492683546924247978,-28958233880459886241992678672096952793511492683545943785962⟩,⟨-6693813194866835043114836131443274722219324194925079246883,-6693813194866835043114836131443274722219324194924099520813⟩⟩, + ⟨⟨-49331237547225487023159859161714335863108942703731218428718,-49331237547225487023159859161714335863108942703729626686685⟩,⟨-3324166326820186362404861967176771107829564786706451504202,-3324166326820186362404861967176771107829564786704883201214⟩⟩, + ⟨⟨-79169969075301818652147292827707487011700347928327792928650,-79169969075301818652147292827707487011700347928325361356514⟩,⟨1569287138242502174131507075871404465891036061165057598945,1569287138242502174131507075871404465891036061167427564283⟩⟩, + ⟨⟨-121989259324843902274537331209938077963640172447901294816171,-121989259324843902274537331209938077963640172447897864679149⟩,⟨6583253408590769400410041234992260946128581215239714506116,6583253408590769400410041234992260946128581215243060904618⟩⟩, + ⟨⟨-181883065107273114262601940536002991713858440231524762241604,-181883065107273114262601940536002991713858440231520148864896⟩,⟨8877625796902616291388904240447765071747852439869718204675,8877625796902616291388904240447765071747852439874290227686⟩⟩, + ⟨⟨-263165838482126272682685637760318573905900747356312940309979,-263165838482126272682685637760318573905900747356305229851621⟩,⟨3695375252203765453107055123084528537181116702397363000731,3695375252203765453107055123084528537181116702405167749924⟩⟩, + ⟨⟨-369797382275808085272536243260596416058585586898689875832963,-369797382275808085272536243260596416058585586898677823159374⟩,⟨-16064490527382800877312780318059012878481951200943774774710,-16064490527382800877312780318059012878481951200931469692533⟩⟩, + ⟨⟨-504589062763865840735891859840166659615433459563906513862552,-504589062763865840735891859840166659615433459563888653081204⟩,⟨-60141601221344439167752046166158523041278478846010793528885,-60141601221344439167752046166158523041278478845992578956865⟩⟩, + ⟨⟨-668215233381790192222152339064697325056673384278111090743540,-668215233381790192222152339064697325056673384278085786673655⟩,⟨-140992303677952839226399202500230307476740913252402512730626,-140992303677952839226399202500230307476740913252376936058718⟩⟩, + ⟨⟨-858081941101139946708123872537321394323808076446536277499969,-858081941101139946708123872537321394323808076446501816933275⟩,⟨-273569903178029022972734916283229586551250212215671283098518,-273569903178029022972734916283229586551250212215636984364836⟩⟩, + ⟨⟨-1067133158450836310695668706523098813483570159001844132485990,-1067133158450836310695668706523098813483570159001798861164375⟩,⟨-474737462328453051366662982890941362609549026543561424161625,-474737462328453051366662982890941362609549026543517308932056⟩⟩] +lemma tw1_0_0_2_calc (j : Fin 31) : taylorWaveBox 1 0 0 2 j = tw1_0_0_2 j := by + revert j + decide +kernel +def tw1_0_0_3 : Fin 31 → CI := ![⟨⟨382671861645470359530424962449032191565256415867938860889650,382671861645470359530424962449032191565256415867966462646725⟩,⟨499092346203806183155913984546001006455837144687525242761572,499092346203806183155913984546001006455837144687553099826145⟩⟩, + ⟨⟨241521232148580193450508605184670426749421362832345555905426,241521232148580193450508605184670426749421362832365652051961⟩,⟨384960135552635906181335411207950649174203062982254123903513,384960135552635906181335411207950649174203062982274163454395⟩⟩, + ⟨⟨147950680626312535393497374821489971108098574524416299353097,147950680626312535393497374821489971108098574524430236972439⟩,⟨285508838878964310311359165109437308290692660512202169170717,285508838878964310311359165109437308290692660512215995205724⟩⟩, + ⟨⟨88600586716042484211819173150613479556867647474399179058049,88600586716042484211819173150613479556867647474408336710277⟩,⟨203804155851878563808950956614615985668360752790681575334053,203804155851878563808950956614615985668360752790690681399371⟩⟩, + ⟨⟨52638431130858547561221493403302898300739961138342485551513,52638431130858547561221493403302898300739961138348173868815⟩,⟨139973278074337855404050516182828131911714090257869904388684,139973278074337855404050516182828131911714090257875625451495⟩⟩, + ⟨⟨31780465289096409094622587867443033182784911481587078473599,31780465289096409094622587867443033182784911481590626607149⟩,⟨92326581755477235403228820411390766835022181093973376433668,92326581755477235403228820411390766835022181093977019776699⟩⟩, + ⟨⟨20067111647649281668305988923123404086926088121820507453512,20067111647649281668305988923123404086926088121822554102511⟩,⟨58255845474735067188939826826314858508622040228907333987686,58255845474735067188939826826314858508622040228909492234937⟩⟩, + ⟨⟨13491231276902815666947513851991915668505027929729046642732,13491231276902815666947513851991915668505027929730463382928⟩,⟨34893103658409485425167435124132268629398497956721855764877,34893103658409485425167435124132268629398497956723327183200⟩⟩, + ⟨⟨9565342544674537212495697423856951824856376517797574253464,9565342544674537212495697423856951824856376517798486205003⟩,⟨19542075244720525668628719980319046125031383338820635327468,19542075244720525668628719980319046125031383338821564339069⟩⟩, + ⟨⟨6895357906277520113419867402856231353816128547778958990772,6895357906277520113419867402856231353816128547779498368337⟩,⟨9914183170924482788391368571031141101035092416557665630879,9914183170924482788391368571031141101035092416558206495407⟩⟩, + ⟨⟨4807289790430183846042835094248018201042480154236123406166,4807289790430183846042835094248018201042480154236418636456⟩,⟨4212995893466147641442645672208008700472379272412022486743,4212995893466147641442645672208008700472379272412316290655⟩⟩, + ⟨⟨3052360545482608253764468795435689881348754764959763214686,3052360545482608253764468795435689881348754764959916596577⟩,⟨1114827375611481304491176344580751438824468876979224563679,1114827375611481304491176344580751438824468876979377909389⟩⟩, + ⟨⟨1597344995313564026721750095602303027594742356189228486220,1597344995313564026721750095602303027594742356189301247242⟩,⟨-309686567551752484309405121436730614097823957892856181763,-309686567551752484309405121436730614097823957892783725252⟩⟩, + ⟨⟨492523341494171681651095851689304410138220762775382420259,492523341494171681651095851689304410138220762775413492103⟩,⟨-696310661347861198939333789972341985079710827090501170881,-696310661347861198939333789972341985079710827090469706738⟩⟩, + ⟨⟨-199604741805036088948946800191837237646786327730185017240,-199604741805036088948946800191837237646786327730172601327⟩,⟨-484770955574148664957273736238969783681693132918340806311,-484770955574148664957273736238969783681693132918328090352⟩⟩, + ⟨⟨-435354286593069161617485861383016224258735471117488476715,-435354286593069161617485861383016224258735471117480676004⟩,⟨-30,27⟩⟩, + ⟨⟨-199604741805036088948946800191837237646786327730185017243,-199604741805036088948946800191837237646786327730172601332⟩,⟨484770955574148664957273736238969783681693132918328090351,484770955574148664957273736238969783681693132918340806309⟩⟩, + ⟨⟨492523341494171681651095851689304410138220762775382420256,492523341494171681651095851689304410138220762775413492100⟩,⟨696310661347861198939333789972341985079710827090469706740,696310661347861198939333789972341985079710827090501170884⟩⟩, + ⟨⟨1597344995313564026721750095602303027594742356189228486218,1597344995313564026721750095602303027594742356189301247239⟩,⟨309686567551752484309405121436730614097823957892783725264,309686567551752484309405121436730614097823957892856181773⟩⟩, + ⟨⟨3052360545482608253764468795435689881348754764959763214692,3052360545482608253764468795435689881348754764959916596583⟩,⟨-1114827375611481304491176344580751438824468876979377909374,-1114827375611481304491176344580751438824468876979224563664⟩⟩, + ⟨⟨4807289790430183846042835094248018201042480154236123406194,4807289790430183846042835094248018201042480154236418636476⟩,⟨-4212995893466147641442645672208008700472379272412316290625,-4212995893466147641442645672208008700472379272412022486719⟩⟩, + ⟨⟨6895357906277520113419867402856231353816128547778958990848,6895357906277520113419867402856231353816128547779498368392⟩,⟨-9914183170924482788391368571031141101035092416558206495352,-9914183170924482788391368571031141101035092416557665630842⟩⟩, + ⟨⟨9565342544674537212495697423856951824856376517797574253603,9565342544674537212495697423856951824856376517798486205147⟩,⟨-19542075244720525668628719980319046125031383338821564339004,-19542075244720525668628719980319046125031383338820635327398⟩⟩, + ⟨⟨13491231276902815666947513851991915668505027929729046642890,13491231276902815666947513851991915668505027929730463383202⟩,⟨-34893103658409485425167435124132268629398497956723327183176,-34893103658409485425167435124132268629398497956721855764736⟩⟩, + ⟨⟨20067111647649281668305988923123404086926088121820507454151,20067111647649281668305988923123404086926088121822554102675⟩,⟨-58255845474735067188939826826314858508622040228909492234563,-58255845474735067188939826826314858508622040228907333987788⟩⟩, + ⟨⟨31780465289096409094622587867443033182784911481587078474352,31780465289096409094622587867443033182784911481590626607434⟩,⟨-92326581755477235403228820411390766835022181093977019776295,-92326581755477235403228820411390766835022181093973376433723⟩⟩, + ⟨⟨52638431130858547561221493403302898300739961138342485552634,52638431130858547561221493403302898300739961138348173869386⟩,⟨-139973278074337855404050516182828131911714090257875625450865,-139973278074337855404050516182828131911714090257869904388592⟩⟩, + ⟨⟨88600586716042484211819173150613479556867647474399179059829,88600586716042484211819173150613479556867647474408336711671⟩,⟨-203804155851878563808950956614615985668360752790690681398529,-203804155851878563808950956614615985668360752790681575333580⟩⟩, + ⟨⟨147950680626312535393497374821489971108098574524416299354973,147950680626312535393497374821489971108098574524430236973789⟩,⟨-285508838878964310311359165109437308290692660512215995204665,-285508838878964310311359165109437308290692660512202169170168⟩⟩, + ⟨⟨241521232148580193450508605184670426749421362832345555906943,241521232148580193450508605184670426749421362832365652055260⟩,⟨-384960135552635906181335411207950649174203062982274163453817,-384960135552635906181335411207950649174203062982254123901191⟩⟩, + ⟨⟨382671861645470359530424962449032191565256415867938860893853,382671861645470359530424962449032191565256415867966462650847⟩,⟨-499092346203806183155913984546001006455837144687553099823018,-499092346203806183155913984546001006455837144687525242758526⟩⟩] +lemma tw1_0_0_3_calc (j : Fin 31) : taylorWaveBox 1 0 0 3 j = tw1_0_0_3 j := by + revert j + decide +kernel +def tw1_0_0_4 : Fin 31 → CI := ![⟨⟨177696814176298023484892004903012566929100739735366527577539,177696814176298023484892004903012566929100739735380611815046⟩,⟨-219236926787800631334721524096208479696103856746153066563029,-219236926787800631334721524096208479696103856746138891957589⟩⟩, + ⟨⟨131480465647269656390072434316047253832179751157565538117184,131480465647269656390072434316047253832179751157575115754793⟩,⟨-138670881130116800099049022228342271078478667263575832784300,-138670881130116800099049022228342271078478667263566167515068⟩⟩, + ⟨⟨92473142064677233816310717850299256363167572437363044287633,92473142064677233816310717850299256363167572437369428663315⟩,⟨-85846656687644575165828777188008346234799518469108462951630,-85846656687644575165828777188008346234799518469102053760561⟩⟩, + ⟨⟨61862839232896846402335266785171355592155265114594119167025,61862839232896846402335266785171355592155265114598302741066⟩,⟨-52269760441051531358376622237775072272466538962278090569077,-52269760441051531358376622237775072272466538962273944242399⟩⟩, + ⟨⟨39275950114217787162460769724417408252842522636992334511863,39275950114217787162460769724417408252842522636994918224711⟩,⟨-31501056235733039384040042684880189844620567304254486614877,-31501056235733039384040042684880189844620567304251970617567⟩⟩, + ⟨⟨23528671436417043119498560985007711636433899886822755657398,23528671436417043119498560985007711636433899886824255126100⟩,⟨-18912979650977222422918219606926828434443845625102539526287,-18912979650977222422918219606926828434443845625101097211012⟩⟩, + ⟨⟨13149921663306785504508631257512096761746867562032143086537,13149921663306785504508631257512096761746867562032939202428⟩,⟨-11354095416654759163399949816548500015464968692916766493876,-11354095416654759163399949816548500015464968692916007002164⟩⟩, + ⟨⟨6707195498805699896884870854018508101492368166103153259059,6707195498805699896884870854018508101492368166103645593823⟩,⟨-6793549349540118610201022630170174778412790490921162779386,-6793549349540118610201022630170174778412790490920681139259⟩⟩, + ⟨⟨2977511154169266863002935717327721264997606701494115364532,2977511154169266863002935717327721264997606701494396676112⟩,⟨-3994153084823172636491410572915419412138892826602638411717,-3994153084823172636491410572915419412138892826602357969459⟩⟩, + ⟨⟨1008271198376647966808748378668642916303920111517295352361,1008271198376647966808748378668642916303920111517445330672⟩,⟨-2241677819550316953568777384332693375336219213054412576189,-2241677819550316953568777384332693375336219213054261765412⟩⟩, + ⟨⟨109337204640115063639040067909025845140324939157013409210,109337204640115063639040067909025845140324939157090479392⟩,⟨-1140375856121531401146412317569654933928898802207474918570,-1140375856121531401146412317569654933928898802207397681350⟩⟩, + ⟨⟨-189926393554597323685793402344865157525306568117990131242,-189926393554597323685793402344865157525306568117955265872⟩,⟨-471902726285671587685997766258104894352232162062993610930,-471902726285671587685997766258104894352232162062958781031⟩⟩, + ⟨⟨-194298828015740094220897986816384181514793527686825838430,-194298828015740094220897986816384181514793527686811295140⟩,⟨-106964345774507934462317911256091322842366682565502596538,-106964345774507934462317911256091322842366682565488062649⟩⟩, + ⟨⟨-92086635902850875203208371959820979017919864549738452319,-92086635902850875203208371959820979017919864549733113150⟩,⟨44263635436897357733651422790651214488115249405494093193,44263635436897357733651422790651214488115249405499382649⟩⟩, + ⟨⟨6801144194532874358560841538944970081387511732170661389,6801144194532874358560841538944970081387511732172396850⟩,⟨56571362335333397872411215835287145399624721090724619408,56571362335333397872411215835287145399624721090726483897⟩⟩, + ⟨⟨45590194282320383114222773590507811091646778113221747326,45590194282320383114222773590507811091646778113222709333⟩,⟨-3,4⟩⟩, + ⟨⟨6801144194532874358560841538944970081387511732170661389,6801144194532874358560841538944970081387511732172396850⟩,⟨-56571362335333397872411215835287145399624721090726483897,-56571362335333397872411215835287145399624721090724619408⟩⟩, + ⟨⟨-92086635902850875203208371959820979017919864549738452319,-92086635902850875203208371959820979017919864549733113150⟩,⟨-44263635436897357733651422790651214488115249405499382649,-44263635436897357733651422790651214488115249405494093193⟩⟩, + ⟨⟨-194298828015740094220897986816384181514793527686825838431,-194298828015740094220897986816384181514793527686811295141⟩,⟨106964345774507934462317911256091322842366682565488062648,106964345774507934462317911256091322842366682565502596537⟩⟩, + ⟨⟨-189926393554597323685793402344865157525306568117990131244,-189926393554597323685793402344865157525306568117955265874⟩,⟨471902726285671587685997766258104894352232162062958781030,471902726285671587685997766258104894352232162062993610929⟩⟩, + ⟨⟨109337204640115063639040067909025845140324939157013409204,109337204640115063639040067909025845140324939157090479385⟩,⟨1140375856121531401146412317569654933928898802207397681352,1140375856121531401146412317569654933928898802207474918570⟩⟩, + ⟨⟨1008271198376647966808748378668642916303920111517295352348,1008271198376647966808748378668642916303920111517445330656⟩,⟨2241677819550316953568777384332693375336219213054261765420,2241677819550316953568777384332693375336219213054412576194⟩⟩, + ⟨⟨2977511154169266863002935717327721264997606701494115364503,2977511154169266863002935717327721264997606701494396676084⟩,⟨3994153084823172636491410572915419412138892826602357969481,3994153084823172636491410572915419412138892826602638411739⟩⟩, + ⟨⟨6707195498805699896884870854018508101492368166103153259002,6707195498805699896884870854018508101492368166103645593796⟩,⟨6793549349540118610201022630170174778412790490920681139286,6793549349540118610201022630170174778412790490921162779443⟩⟩, + ⟨⟨13149921663306785504508631257512096761746867562032143086534,13149921663306785504508631257512096761746867562032939202276⟩,⟨11354095416654759163399949816548500015464968692916007002329,11354095416654759163399949816548500015464968692916766493892⟩⟩, + ⟨⟨23528671436417043119498560985007711636433899886822755657377,23528671436417043119498560985007711636433899886824255125910⟩,⟨18912979650977222422918219606926828434443845625101097211230,18912979650977222422918219606926828434443845625102539526334⟩⟩, + ⟨⟨39275950114217787162460769724417408252842522636992334511774,39275950114217787162460769724417408252842522636994918224393⟩,⟨31501056235733039384040042684880189844620567304251970617916,31501056235733039384040042684880189844620567304254486614995⟩⟩, + ⟨⟨61862839232896846402335266785171355592155265114594119166700,61862839232896846402335266785171355592155265114598302740600⟩,⟨52269760441051531358376622237775072272466538962273944242957,52269760441051531358376622237775072272466538962278090569489⟩⟩, + ⟨⟨92473142064677233816310717850299256363167572437363044287247,92473142064677233816310717850299256363167572437369428662755⟩,⟨85846656687644575165828777188008346234799518469102053761179,85846656687644575165828777188008346234799518469108462952064⟩⟩, + ⟨⟨131480465647269656390072434316047253832179751157565538116036,131480465647269656390072434316047253832179751157575115754256⟩,⟨138670881130116800099049022228342271078478667263566167515579,138670881130116800099049022228342271078478667263575832785447⟩⟩, + ⟨⟨177696814176298023484892004903012566929100739735366527575772,177696814176298023484892004903012566929100739735380611813248⟩,⟨219236926787800631334721524096208479696103856746138891959098,219236926787800631334721524096208479696103856746153066564506⟩⟩] +lemma tw1_0_0_4_calc (j : Fin 31) : taylorWaveBox 1 0 0 4 j = tw1_0_0_4 j := by + revert j + decide +kernel +def tw1_0_0_5 : Fin 31 → CI := ![⟨⟨-97944447622377886869828462184777137190330252176209958866651,-97944447622377886869828462184777137190330252176203523845330⟩,⟨-46779792561958407417038600233985920993320894168775555909968,-46779792561958407417038600233985920993320894168769236092586⟩⟩, + ⟨⟨-60206928046330770269414469034644376024661280943610987729644,-60206928046330770269414469034644376024661280943606661342601⟩,⟨-33448271368425961235897198109269471582501876879022949116210,-33448271368425961235897198109269471582501876879018666871858⟩⟩, + ⟨⟨-36126067740952855542767417967332210118378941789571946733524,-36126067740952855542767417967332210118378941789569194589030⟩,⟨-22267979804724454169728386272483871473447166248492433191898,-22267979804724454169728386272483871473447166248489675419790⟩⟩, + ⟨⟨-21191871217694136538181187906717300136694108802449584551123,-21191871217694136538181187906717300136694108802447929788198⟩,⟨-13817595489745086506465639977375010434133194900466782445769,-13817595489745086506465639977375010434133194900465103074098⟩⟩, + ⟨⟨-12165070525279248977514538286100619500200442632201403164847,-12165070525279248977514538286100619500200442632200473088843⟩,⟨-7944530532505170663332001969010647767140475773820975626283,-7944530532505170663332001969010647767140475773820021289442⟩⟩, + ⟨⟨-6827553841985601458636653200119193214959090855038225092117,-6827553841985601458636653200119193214959090855037734889827⟩,⟨-4168843276105921022290754188973868737772396070160803861479,-4168843276105921022290754188973868737772396070160299296916⟩⟩, + ⟨⟨-3728187261872177335325826632410180341726587457895416996684,-3728187261872177335325826632410180341726587457895181898819⟩,⟨-1931694299505558452643803085224781688528953113930146636129,-1931694299505558452643803085224781688528953113929905837556⟩⟩, + ⟨⟨-1957119934963319813158458757411726239689661754107567345874,-1957119934963319813158458757411726239689661754107430793725⟩,⟨-728071236666462594481544558631541172070801796357836424347,-728071236666462594481544558631541172070801796357699558449⟩⟩, + ⟨⟨-964371997814808192391550429939358853674884231330241509750,-964371997814808192391550429939358853674884231330167040145⟩,⟨-161159389019859391264459606842740373084172424990328762440,-161159389019859391264459606842740373084172424990254865695⟩⟩, + ⟨⟨-425856428733438786415010804610480536101110249778671924214,-425856428733438786415010804610480536101110249778634681210⟩,⟨50375512005829659091826557995443790147997269528366974318,50375512005829659091826557995443790147997269528404025811⟩⟩, + ⟨⟨-151980608821539810192288221607595027803921466862246509131,-151980608821539810192288221607595027803921466862229749122⟩,⟨88729224512810476619427794824898320956733360743212120807,88729224512810476619427794824898320956733360743228897321⟩⟩, + ⟨⟨-30016568624302436442875852981597331978614951823720038365,-30016568624302436442875852981597331978614951823713279930⟩,⟨61299837682894653898010956994140760378795962168402224729,61299837682894653898010956994140760378795962168408985065⟩⟩, + ⟨⟨9439307665552246917827429366562992550144214145027470199,9439307665552246917827429366562992550144214145029910298⟩,⟨24134615575067496827535489342293577076828943020032088437,24134615575067496827535489342293577076828943020034533353⟩⟩, + ⟨⟨10472951902109262043871987954889791605830948070749209010,10472951902109262043871987954889791605830948070749984017⟩,⟨618948212836094726831664228513609370640444959675309628,618948212836094726831664228513609370640444959676074614⟩⟩, + ⟨⟨800040060484698992824082543670956893817144220456024102,800040060484698992824082543670956893817144220456234415⟩,⟨-5247408407746415754909094110430689146186612737469450332,-5247408407746415754909094110430689146186612737469222841⟩⟩, + ⟨⟨-4092166269516260334619952912991494093735824676161764998,-4092166269516260334619952912991494093735824676161665621⟩,⟨-1,1⟩⟩, + ⟨⟨800040060484698992824082543670956893817144220456024102,800040060484698992824082543670956893817144220456234415⟩,⟨5247408407746415754909094110430689146186612737469222841,5247408407746415754909094110430689146186612737469450332⟩⟩, + ⟨⟨10472951902109262043871987954889791605830948070749209010,10472951902109262043871987954889791605830948070749984017⟩,⟨-618948212836094726831664228513609370640444959676074614,-618948212836094726831664228513609370640444959675309628⟩⟩, + ⟨⟨9439307665552246917827429366562992550144214145027470199,9439307665552246917827429366562992550144214145029910298⟩,⟨-24134615575067496827535489342293577076828943020034533353,-24134615575067496827535489342293577076828943020032088437⟩⟩, + ⟨⟨-30016568624302436442875852981597331978614951823720038365,-30016568624302436442875852981597331978614951823713279930⟩,⟨-61299837682894653898010956994140760378795962168408985065,-61299837682894653898010956994140760378795962168402224729⟩⟩, + ⟨⟨-151980608821539810192288221607595027803921466862246509131,-151980608821539810192288221607595027803921466862229749122⟩,⟨-88729224512810476619427794824898320956733360743228897322,-88729224512810476619427794824898320956733360743212120808⟩⟩, + ⟨⟨-425856428733438786415010804610480536101110249778671924214,-425856428733438786415010804610480536101110249778634681210⟩,⟨-50375512005829659091826557995443790147997269528404025813,-50375512005829659091826557995443790147997269528366974322⟩⟩, + ⟨⟨-964371997814808192391550429939358853674884231330241509751,-964371997814808192391550429939358853674884231330167040147⟩,⟨161159389019859391264459606842740373084172424990254865688,161159389019859391264459606842740373084172424990328762433⟩⟩, + ⟨⟨-1957119934963319813158458757411726239689661754107567345881,-1957119934963319813158458757411726239689661754107430793727⟩,⟨728071236666462594481544558631541172070801796357699558435,728071236666462594481544558631541172070801796357836424338⟩⟩, + ⟨⟨-3728187261872177335325826632410180341726587457895416996681,-3728187261872177335325826632410180341726587457895181898850⟩,⟨1931694299505558452643803085224781688528953113929905837548,1931694299505558452643803085224781688528953113930146636087⟩⟩, + ⟨⟨-6827553841985601458636653200119193214959090855038225092117,-6827553841985601458636653200119193214959090855037734889874⟩,⟨4168843276105921022290754188973868737772396070160299296902,4168843276105921022290754188973868737772396070160803861417⟩⟩, + ⟨⟨-12165070525279248977514538286100619500200442632201403164856,-12165070525279248977514538286100619500200442632200473088925⟩,⟨7944530532505170663332001969010647767140475773820021289401,7944530532505170663332001969010647767140475773820975626170⟩⟩, + ⟨⟨-21191871217694136538181187906717300136694108802449584551206,-21191871217694136538181187906717300136694108802447929788334⟩,⟨13817595489745086506465639977375010434133194900465103073962,13817595489745086506465639977375010434133194900466782445582⟩⟩, + ⟨⟨-36126067740952855542767417967332210118378941789571946733615,-36126067740952855542767417967332210118378941789569194589195⟩,⟨22267979804724454169728386272483871473447166248489675419625,22267979804724454169728386272483871473447166248492433191661⟩⟩, + ⟨⟨-60206928046330770269414469034644376024661280943610987729983,-60206928046330770269414469034644376024661280943606661342688⟩,⟨33448271368425961235897198109269471582501876879018666871367,33448271368425961235897198109269471582501876879022949115964⟩⟩, + ⟨⟨-97944447622377886869828462184777137190330252176209958867044,-97944447622377886869828462184777137190330252176203523845734⟩,⟨46779792561958407417038600233985920993320894168769236091791,46779792561958407417038600233985920993320894168775555909162⟩⟩] +lemma tw1_0_0_5_calc (j : Fin 31) : taylorWaveBox 1 0 0 5 j = tw1_0_0_5 j := by + revert j + decide +kernel +def tw1_0_0_6 : Fin 31 → CI := ![⟨⟨-7616112389855577792381670307996995115265038340623583414478,-7616112389855577792381670307996995115265038340620941236471⟩,⟨35726321848558060127541439779856944311365560639841685669622,35726321848558060127541439779856944311365560639844384928564⟩⟩, + ⟨⟨-5487552057253640097080970808593908481072852638375464166449,-5487552057253640097080970808593908481072852638373778674360⟩,⟨21016180811254429033444810730215935474084607625093108492602,21016180811254429033444810730215935474084607625094808044869⟩⟩, + ⟨⟨-3478220711649124712327437954799727777692347185661333479827,-3478220711649124712327437954799727777692347185660318685667⟩,⟨11994853997139936240379078838820925260009199845213714369627,11994853997139936240379078838820925260009199845214725035649⟩⟩, + ⟨⟨-1953032366738329950999722238658820759947028203709961239489,-1953032366738329950999722238658820759947028203709387638872⟩,⟨6633250323132206067088634908631741313933538585027320938793,6633250323132206067088634908631741313933538585027887058259⟩⟩, + ⟨⟨-951108055799236930663040253254430251645037345758512674037,-951108055799236930663040253254430251645037345758212532833⟩,⟨3543369316975737227488827596791265381691858025300552710193,3543369316975737227488827596791265381691858025300847707671⟩⟩, + ⟨⟨-373265689796673849049387619616963426655709292786538287100,-373265689796673849049387619616963426655709292786393353154⟩,⟨1816961365252506796461125233778827843379539075163544514769,1816961365252506796461125233778827843379539075163687578759⟩⟩, + ⟨⟨-86476145941629538243376909203667251724923519665840033100,-86476145941629538243376909203667251724923519665777509189⟩,⟨883742772576741041387044578248203370600412878043467380590,883742772576741041387044578248203370600412878043529906587⟩⟩, + ⟨⟨26639437557906120193157730433780850762062446565098819547,26639437557906120193157730433780850762062446565133302692⟩,⟨398764448425307056660120009183219910676290844535334004356,398764448425307056660120009183219910676290844535368888947⟩⟩, + ⟨⟨51129932451202082161432412702704620823442972753684411489,51129932451202082161432412702704620823442972753701840652⟩,⟨159932761354204933041674424962495712842652796387452863017,159932761354204933041674424962495712842652796387470439108⟩⟩, + ⟨⟨40040824801421369331966165049781852371510495092246767569,40040824801421369331966165049781852371510495092254589549⟩,⟨51787992705414720713623312671379100104917787522939158047,51787992705414720713623312671379100104917787522946984912⟩⟩, + ⟨⟨21615386044607617366045242312535656106298429381424396218,21615386044607617366045242312535656106298429381427579168⟩,⟨9609735647304685393714397283092204738164873544462024599,9609735647304685393714397283092204738164873544465202840⟩⟩, + ⟨⟨7706915779425077693307206096595051668534274825939846431,7706915779425077693307206096595051668534274825940984334⟩,⟨-2195038230046203767318786879327579089721222573819939916,-2195038230046203767318786879327579089721222573818801521⟩⟩, + ⟨⟨838245405153302899200759992801518194349237980513456137,838245405153302899200759992801518194349237980513815464⟩,⟨-2513329516718495442738904916476034542498905973451805304,-2513329516718495442738904916476034542498905973451445673⟩⟩, + ⟨⟨-795537008393331518723384422862915392332952586305598808,-795537008393331518723384422862915392332952586305501822⟩,⟨-505580811696983910876898874432096630286084299219375467,-505580811696983910876898874432096630286084299219278976⟩⟩, + ⟨⟨-177315691804916702192023931169300085262149119820801777,-177315691804916702192023931169300085262149119820779361⟩,⟨394676326099895626964044695222387206424096844337191453,394676326099895626964044695222387206424096844337215241⟩⟩, + ⟨⟨321397987239505833192573878573443908849889968560491412,321397987239505833192573878573443908849889968560500241⟩,⟨-1,1⟩⟩, + ⟨⟨-177315691804916702192023931169300085262149119820801777,-177315691804916702192023931169300085262149119820779361⟩,⟨-394676326099895626964044695222387206424096844337215241,-394676326099895626964044695222387206424096844337191453⟩⟩, + ⟨⟨-795537008393331518723384422862915392332952586305598808,-795537008393331518723384422862915392332952586305501822⟩,⟨505580811696983910876898874432096630286084299219278976,505580811696983910876898874432096630286084299219375467⟩⟩, + ⟨⟨838245405153302899200759992801518194349237980513456137,838245405153302899200759992801518194349237980513815464⟩,⟨2513329516718495442738904916476034542498905973451445673,2513329516718495442738904916476034542498905973451805304⟩⟩, + ⟨⟨7706915779425077693307206096595051668534274825939846431,7706915779425077693307206096595051668534274825940984334⟩,⟨2195038230046203767318786879327579089721222573818801521,2195038230046203767318786879327579089721222573819939916⟩⟩, + ⟨⟨21615386044607617366045242312535656106298429381424396218,21615386044607617366045242312535656106298429381427579168⟩,⟨-9609735647304685393714397283092204738164873544465202840,-9609735647304685393714397283092204738164873544462024599⟩⟩, + ⟨⟨40040824801421369331966165049781852371510495092246767569,40040824801421369331966165049781852371510495092254589550⟩,⟨-51787992705414720713623312671379100104917787522946984912,-51787992705414720713623312671379100104917787522939158047⟩⟩, + ⟨⟨51129932451202082161432412702704620823442972753684411490,51129932451202082161432412702704620823442972753701840653⟩,⟨-159932761354204933041674424962495712842652796387470439107,-159932761354204933041674424962495712842652796387452863017⟩⟩, + ⟨⟨26639437557906120193157730433780850762062446565098819549,26639437557906120193157730433780850762062446565133302695⟩,⟨-398764448425307056660120009183219910676290844535368888948,-398764448425307056660120009183219910676290844535334004355⟩⟩, + ⟨⟨-86476145941629538243376909203667251724923519665840033091,-86476145941629538243376909203667251724923519665777509186⟩,⟨-883742772576741041387044578248203370600412878043529906585,-883742772576741041387044578248203370600412878043467380594⟩⟩, + ⟨⟨-373265689796673849049387619616963426655709292786538287085,-373265689796673849049387619616963426655709292786393353149⟩,⟨-1816961365252506796461125233778827843379539075163687578756,-1816961365252506796461125233778827843379539075163544514776⟩⟩, + ⟨⟨-951108055799236930663040253254430251645037345758512674005,-951108055799236930663040253254430251645037345758212532820⟩,⟨-3543369316975737227488827596791265381691858025300847707666,-3543369316975737227488827596791265381691858025300552710207⟩⟩, + ⟨⟨-1953032366738329950999722238658820759947028203709961239430,-1953032366738329950999722238658820759947028203709387638828⟩,⟨-6633250323132206067088634908631741313933538585027887058267,-6633250323132206067088634908631741313933538585027320938816⟩⟩, + ⟨⟨-3478220711649124712327437954799727777692347185661333479748,-3478220711649124712327437954799727777692347185660318685612⟩,⟨-11994853997139936240379078838820925260009199845214725035658,-11994853997139936240379078838820925260009199845213714369659⟩⟩, + ⟨⟨-5487552057253640097080970808593908481072852638375464166364,-5487552057253640097080970808593908481072852638373778674186⟩,⟨-21016180811254429033444810730215935474084607625094808044950,-21016180811254429033444810730215935474084607625093108492593⟩⟩, + ⟨⟨-7616112389855577792381670307996995115265038340623583414183,-7616112389855577792381670307996995115265038340620941236180⟩,⟨-35726321848558060127541439779856944311365560639844384928629,-35726321848558060127541439779856944311365560639841685669692⟩⟩] +lemma tw1_0_0_6_calc (j : Fin 31) : taylorWaveBox 1 0 0 6 j = tw1_0_0_6 j := by + revert j + decide +kernel +def tw1_0_0_7 : Fin 31 → CI := ![⟨⟨10924070714361740756066859639411725843924040436371190174622,10924070714361740756066859639411725843924040436372174847417⟩,⟨-278730493456203620552230085593488744909043724724272832268,-278730493456203620552230085593488744909043724723306262272⟩⟩, + ⟨⟨6088905314996655963898772908261904047975325305562303825703,6088905314996655963898772908261904047975325305562886428291⟩,⟨22640369964741898127047784019831687396278009070193887466,22640369964741898127047784019831687396278009070773350546⟩⟩, + ⟨⟨3266765660894269051405335201019276755873313838669809666061,3266765660894269051405335201019276755873313838670134294521⟩,⟨39471491017164322335412155417011462797577271345740150712,39471491017164322335412155417011462797577271346066150249⟩⟩, + ⟨⟨1679974824092202073129382327591095240161506823037811943136,1679974824092202073129382327591095240161506823037981630390⟩,⟨-8596963689189183951616443948787515585991009269759021487,-8596963689189183951616443948787515585991009269587848779⟩⟩, + ⟨⟨822264394184933880736849337680631410099431608883994489139,822264394184933880736849337680631410099431608884076564198⟩,⟨-44485357808893589700688833771646866455617467014445097173,-44485357808893589700688833771646866455617467014362427387⟩⟩, + ⟨⟨378413952255469442237634865894730002152430608779554471473,378413952255469442237634865894730002152430608779591163637⟩,⟨-54462107579863894133934754360392798822400792714800374651,-54462107579863894133934754360392798822400792714763753443⟩⟩, + ⟨⟨160279385106142106347457918829439400724293368080752651451,160279385106142106347457918829439400724293368080768163158⟩,⟨-46603949777504658227032364723725582402430469769846051198,-46603949777504658227032364723725582402430469769830805465⟩⟩, + ⟨⟨60004683658680187341146779374747454680163376878331560708,60004683658680187341146779374747454680163376878339505980⟩,⟨-31971862670926453291976236277340586959234484584380842988,-31971862670926453291976236277340586959234484584372994815⟩⟩, + ⟨⟨18140982743017523926433406276804590629714289423009909659,18140982743017523926433406276804590629714289423013514020⟩,⟨-18106190484382661295405105756527054368056334680355764843,-18106190484382661295405105756527054368056334680352170842⟩⟩, + ⟨⟨3230429659392587722024525176826067516449829102079035626,3230429659392587722024525176826067516449829102080492420⟩,⟨-8274445462826554751361236709351334000232716090342199826,-8274445462826554751361236709351334000232716090340739822⟩⟩, + ⟨⟨-577252359540284483378541841056450290530298499603935487,-577252359540284483378541841056450290530298499603398379⟩,⟨-2766773084544923636920922075186976975725682683056266287,-2766773084544923636920922075186976975725682683055729085⟩⟩, + ⟨⟨-708313752417068341417692459011849467508915219447236406,-708313752417068341417692459011849467508915219447067023⟩,⟨-444584336158058587169777194184911395203753921460199301,-444584336158058587169777194184911395203753921460029955⟩⟩, + ⟨⟨-204740153219541298997131163448302283627473676704352056,-204740153219541298997131163448302283627473676704305644⟩,⟨126696360151719197214620537028739712650166496129256949,126696360151719197214620537028739712650166496129303321⟩⟩, + ⟨⟨35929960918344645759703904499942252273153694438567449,35929960918344645759703904499942252273153694438578110⟩,⟨66151177235914427796810339911967787886711641031370766,66151177235914427796810339911967787886711641031381457⟩⟩, + ⟨⟨20032749849920415156740797258575302539989316194814016,20032749849920415156740797258575302539989316194816126⟩,⟨-24115002549975011174840277274946254497121661553581814,-24115002549975011174840277274946254497121661553579631⟩⟩, + ⟨⟨-22437812346448391925284380225784200103855984572826695,-22437812346448391925284380225784200103855984572826007⟩,⟨-1,1⟩⟩, + ⟨⟨20032749849920415156740797258575302539989316194814016,20032749849920415156740797258575302539989316194816126⟩,⟨24115002549975011174840277274946254497121661553579631,24115002549975011174840277274946254497121661553581814⟩⟩, + ⟨⟨35929960918344645759703904499942252273153694438567449,35929960918344645759703904499942252273153694438578110⟩,⟨-66151177235914427796810339911967787886711641031381457,-66151177235914427796810339911967787886711641031370766⟩⟩, + ⟨⟨-204740153219541298997131163448302283627473676704352056,-204740153219541298997131163448302283627473676704305644⟩,⟨-126696360151719197214620537028739712650166496129303321,-126696360151719197214620537028739712650166496129256949⟩⟩, + ⟨⟨-708313752417068341417692459011849467508915219447236406,-708313752417068341417692459011849467508915219447067023⟩,⟨444584336158058587169777194184911395203753921460029955,444584336158058587169777194184911395203753921460199301⟩⟩, + ⟨⟨-577252359540284483378541841056450290530298499603935487,-577252359540284483378541841056450290530298499603398379⟩,⟨2766773084544923636920922075186976975725682683055729085,2766773084544923636920922075186976975725682683056266287⟩⟩, + ⟨⟨3230429659392587722024525176826067516449829102079035626,3230429659392587722024525176826067516449829102080492420⟩,⟨8274445462826554751361236709351334000232716090340739822,8274445462826554751361236709351334000232716090342199826⟩⟩, + ⟨⟨18140982743017523926433406276804590629714289423009909659,18140982743017523926433406276804590629714289423013514020⟩,⟨18106190484382661295405105756527054368056334680352170843,18106190484382661295405105756527054368056334680355764844⟩⟩, + ⟨⟨60004683658680187341146779374747454680163376878331560708,60004683658680187341146779374747454680163376878339505980⟩,⟨31971862670926453291976236277340586959234484584372994816,31971862670926453291976236277340586959234484584380842989⟩⟩, + ⟨⟨160279385106142106347457918829439400724293368080752651451,160279385106142106347457918829439400724293368080768163157⟩,⟨46603949777504658227032364723725582402430469769830805466,46603949777504658227032364723725582402430469769846051199⟩⟩, + ⟨⟨378413952255469442237634865894730002152430608779554471473,378413952255469442237634865894730002152430608779591163636⟩,⟨54462107579863894133934754360392798822400792714763753446,54462107579863894133934754360392798822400792714800374653⟩⟩, + ⟨⟨822264394184933880736849337680631410099431608883994489140,822264394184933880736849337680631410099431608884076564195⟩,⟨44485357808893589700688833771646866455617467014362427394,44485357808893589700688833771646866455617467014445097176⟩⟩, + ⟨⟨1679974824092202073129382327591095240161506823037811943138,1679974824092202073129382327591095240161506823037981630388⟩,⟨8596963689189183951616443948787515585991009269587848794,8596963689189183951616443948787515585991009269759021498⟩⟩, + ⟨⟨3266765660894269051405335201019276755873313838669809666065,3266765660894269051405335201019276755873313838670134294518⟩,⟨-39471491017164322335412155417011462797577271346066150228,-39471491017164322335412155417011462797577271345740150697⟩⟩, + ⟨⟨6088905314996655963898772908261904047975325305562303825691,6088905314996655963898772908261904047975325305562886428305⟩,⟨-22640369964741898127047784019831687396278009070773350522,-22640369964741898127047784019831687396278009070193887416⟩⟩, + ⟨⟨10924070714361740756066859639411725843924040436371190174622,10924070714361740756066859639411725843924040436372174847415⟩,⟨278730493456203620552230085593488744909043724723306262363,278730493456203620552230085593488744909043724724272832358⟩⟩] +lemma tw1_0_0_7_calc (j : Fin 31) : taylorWaveBox 1 0 0 7 j = tw1_0_0_7 j := by + revert j + decide +kernel +def tw1_0_0_8 : Fin 31 → CI := ![⟨⟨-759351078618473923746765459659996661088340416645724366636,-759351078618473923746765459659996661088340416645409977687⟩,⟨-2842401871883051437640866170467990707498689738468023748394,-2842401871883051437640866170467990707498689738467705176021⟩⟩, + ⟨⟨-377045118123385504789868876540756001151196993271852000052,-377045118123385504789868876540756001151196993271674907394⟩,⟨-1489222774643353340413497255087446178786919299901273925002,-1489222774643353340413497255087446178786919299901096400055⟩⟩, + ⟨⟨-196301142799325347447553251797185865412829399090466163193,-196301142799325347447553251797185865412829399090372992428⟩,⟨-743685683682131499463519535510134153946721666861900008455,-743685683682131499463519535510134153946721666861807160161⟩⟩, + ⟨⟨-107356475176286340850410806299704797792485328848077003327,-107356475176286340850410806299704797792485328848031470258⟩,⟨-351312941212875115700419255688501360977201684481322001160,-351312941212875115700419255688501360977201684481276639771⟩⟩, + ⟨⟨-60204971191219602935296675738012971996695115864126486475,-60204971191219602935296675738012971996695115864106038837⟩,⟨-155068333539185064547256620219740045870820965743703671366,-155068333539185064547256620219740045870820965743683188118⟩⟩, + ⟨⟨-33281880796873087125497483880466182567864674877097840117,-33281880796873087125497483880466182567864674877089067279⟩,⟨-62623738881987294665136806790794773502120913272956587368,-62623738881987294665136806790794773502120913272947700416⟩⟩, + ⟨⟨-17391182087890722952700710929366684417414886261678849961,-17391182087890722952700710929366684417414886261675478788⟩,⟨-22248414413581741935308644451488830195797813716480691784,-22248414413581741935308644451488830195797813716477261440⟩⟩, + ⟨⟨-8234319640086863449169076300842952615812018573751462991,-8234319640086863449169076300842952615812018573749875076⟩,⟨-6369382993921567203119324538940438901350152543579639690,-6369382993921567203119324538940438901350152543578042652⟩⟩, + ⟨⟨-3351920034907472054777926206400962882091860325145059969,-3351920034907472054777926206400962882091860325144398582⟩,⟨-1078693648687217360952129205432255226680651265400595036,-1078693648687217360952129205432255226680651265399935002⟩⟩, + ⟨⟨-1069471784335903332218240418215583388802686129263635699,-1069471784335903332218240418215583388802686129263388384⟩,⟨181608938708028300103327958820308804573676718831170775,181608938708028300103327958820308804573676718831417636⟩⟩, + ⟨⟨-205176664464359143302832000518559655563441789752468122,-205176664464359143302832000518559655563441789752387489⟩,⟨224216251375546405883531001335316056542655949968188798,224216251375546405883531001335316056542655949968269497⟩⟩, + ⟨⟨13466823745596032444124649306729721761113685843341671,13466823745596032444124649306729721761113685843364333⟩,⟨77383686154840184460269113885903588430598451205436881,77383686154840184460269113885903588430598451205459539⟩⟩, + ⟨⟨19498009129807319510133455462677911311131063929581833,19498009129807319510133455462677911311131063929587239⟩,⟨2759602268371840279292807013640461826369001451920337,2759602268371840279292807013640461826369001451925739⟩⟩, + ⟨⟨51565668377258611845027134263783400085401074625447,51565668377258611845027134263783400085401074626503⟩,⟨-5410593284889301734714226449652440784596472271799442,-5410593284889301734714226449652440784596472271798381⟩⟩, + ⟨⟨-1679580988818132552063776420054002925988614020161069,-1679580988818132552063776420054002925988614020160891⟩,⟨1165552853936501355018985977049157818645902802055039,1165552853936501355018985977049157818645902802055218⟩⟩, + ⟨⟨1409809328604572574479336282876802764701497283223990,1409809328604572574479336282876802764701497283224039⟩,⟨-1,1⟩⟩, + ⟨⟨-1679580988818132552063776420054002925988614020161069,-1679580988818132552063776420054002925988614020160891⟩,⟨-1165552853936501355018985977049157818645902802055218,-1165552853936501355018985977049157818645902802055039⟩⟩, + ⟨⟨51565668377258611845027134263783400085401074625447,51565668377258611845027134263783400085401074626503⟩,⟨5410593284889301734714226449652440784596472271798381,5410593284889301734714226449652440784596472271799442⟩⟩, + ⟨⟨19498009129807319510133455462677911311131063929581833,19498009129807319510133455462677911311131063929587239⟩,⟨-2759602268371840279292807013640461826369001451925739,-2759602268371840279292807013640461826369001451920337⟩⟩, + ⟨⟨13466823745596032444124649306729721761113685843341671,13466823745596032444124649306729721761113685843364333⟩,⟨-77383686154840184460269113885903588430598451205459539,-77383686154840184460269113885903588430598451205436881⟩⟩, + ⟨⟨-205176664464359143302832000518559655563441789752468122,-205176664464359143302832000518559655563441789752387489⟩,⟨-224216251375546405883531001335316056542655949968269497,-224216251375546405883531001335316056542655949968188798⟩⟩, + ⟨⟨-1069471784335903332218240418215583388802686129263635699,-1069471784335903332218240418215583388802686129263388384⟩,⟨-181608938708028300103327958820308804573676718831417636,-181608938708028300103327958820308804573676718831170775⟩⟩, + ⟨⟨-3351920034907472054777926206400962882091860325145059969,-3351920034907472054777926206400962882091860325144398582⟩,⟨1078693648687217360952129205432255226680651265399935002,1078693648687217360952129205432255226680651265400595036⟩⟩, + ⟨⟨-8234319640086863449169076300842952615812018573751462991,-8234319640086863449169076300842952615812018573749875077⟩,⟨6369382993921567203119324538940438901350152543578042652,6369382993921567203119324538940438901350152543579639690⟩⟩, + ⟨⟨-17391182087890722952700710929366684417414886261678849961,-17391182087890722952700710929366684417414886261675478788⟩,⟨22248414413581741935308644451488830195797813716477261440,22248414413581741935308644451488830195797813716480691783⟩⟩, + ⟨⟨-33281880796873087125497483880466182567864674877097840117,-33281880796873087125497483880466182567864674877089067280⟩,⟨62623738881987294665136806790794773502120913272947700416,62623738881987294665136806790794773502120913272956587368⟩⟩, + ⟨⟨-60204971191219602935296675738012971996695115864126486476,-60204971191219602935296675738012971996695115864106038838⟩,⟨155068333539185064547256620219740045870820965743683188118,155068333539185064547256620219740045870820965743703671365⟩⟩, + ⟨⟨-107356475176286340850410806299704797792485328848077003329,-107356475176286340850410806299704797792485328848031470261⟩,⟨351312941212875115700419255688501360977201684481276639770,351312941212875115700419255688501360977201684481322001159⟩⟩, + ⟨⟨-196301142799325347447553251797185865412829399090466163196,-196301142799325347447553251797185865412829399090372992432⟩,⟨743685683682131499463519535510134153946721666861807160161,743685683682131499463519535510134153946721666861900008453⟩⟩, + ⟨⟨-377045118123385504789868876540756001151196993271852000064,-377045118123385504789868876540756001151196993271674907400⟩,⟨1489222774643353340413497255087446178786919299901096400050,1489222774643353340413497255087446178786919299901273925003⟩⟩, + ⟨⟨-759351078618473923746765459659996661088340416645724366659,-759351078618473923746765459659996661088340416645409977711⟩,⟨2842401871883051437640866170467990707498689738467705176015,2842401871883051437640866170467990707498689738468023748388⟩⟩] +lemma tw1_0_0_8_calc (j : Fin 31) : taylorWaveBox 1 0 0 8 j = tw1_0_0_8 j := by + revert j + decide +kernel +def tw1_0_0_9 : Fin 31 → CI := ![⟨⟨-633116031396794174892045340903191819339674290176628204853,-633116031396794174892045340903191819339674290176535391648⟩,⟨343082749356448807509236955007101904301421703478308861482,343082749356448807509236955007101904301421703478401002526⟩⟩, + ⟨⟨-309268478656001887161097152585287058164586195109616119015,-309268478656001887161097152585287058164586195109567323709⟩,⟨168818299022817845503323116930185023271420858642306641661,168818299022817845503323116930185023271420858642355444336⟩⟩, + ⟨⟨-142184513254895065628722980089203516597824733016469963620,-142184513254895065628722980089203516597824733016445971846⟩,⟨82969514621180870752740648216453191949242144214921935064,82969514621180870752740648216453191949242144214945983998⟩⟩, + ⟨⟨-60757640067070092023122530451372903931578780350769398996,-60757640067070092023122530451372903931578780350758305204⟩,⟨40507573351317186808780766753659534390897221605417489869,40507573351317186808780766753659534390897221605428574266⟩⟩, + ⟨⟨-23625629945596750604410700764290253975041119121392482333,-23625629945596750604410700764290253975041119121387645529⟩,⟨19365232232662338744813321224580947544361621130304139243,19365232232662338744813321224580947544361621130308935409⟩⟩, + ⟨⟨-8035220081651414304407653102302610028318592649037752140,-8035220081651414304407653102302610028318592649035825191⟩,⟨8857772338051482008238092536058286289983357815132050999,8857772338051482008238092536058286289983357815133954097⟩⟩, + ⟨⟨-2183684150995714064854705682774730386623788915425518897,-2183684150995714064854705682774730386623788915424841395⟩,⟨3754281454311443836636126919595441264471579148238961262,3754281454311443836636126919595441264471579148239632370⟩⟩, + ⟨⟨-338141886130528887402225544692331164592519426240573391,-338141886130528887402225544692331164592519426240284038⟩,⟨1409025501346615423585409333309799290357883329581650310,1409025501346615423585409333309799290357883329581939942⟩⟩, + ⟨⟨71654596920104077861260144702247559006869788962397774,71654596920104077861260144702247559006869788962509838⟩,⟨433900551775168361401120026248205768425620259674205227,433900551775168361401120026248205768425620259674317709⟩⟩, + ⟨⟨78377216006246233807903874013864598114226096315346745,78377216006246233807903874013864598114226096315384437⟩,⟨91439997463285247680421116798377638655190488379662090,91439997463285247680421116798377638655190488379699786⟩⟩, + ⟨⟨29507444682089565836549436136933076094666866935186122,29507444682089565836549436136933076094666866935197219⟩,⟨3470108320978540959436176638484122390967561837494019,3470108320978540959436176638484122390967561837505112⟩⟩, + ⟨⟨4142049956364168653575093421649483780876818588324185,4142049956364168653575093421649483780876818588326929⟩,⟨-5274838232018642123172120162544934558782790237643563,-5274838232018642123172120162544934558782790237640819⟩⟩, + ⟨⟨-982366916318917700303558299581621381803120647637683,-982366916318917700303558299581621381803120647637113⟩,⟨-1085731177236445987418170164657092982721551481032279,-1085731177236445987418170164657092982721551481031709⟩⟩, + ⟨⟨-174641182831142376658744605738923736931523425212112,-174641182831142376658744605738923736931523425212016⟩,⟨307416019017327802834751526574991452180683657874737,307416019017327802834751526574991452180683657874833⟩⟩, + ⟨⟨114430837108010016058642945839897866044637193576099,114430837108010016058642945839897866044637193576113⟩,⟨-39926933961065565811061415411581334287247419293192,-39926933961065565811061415411581334287247419293178⟩⟩, + ⟨⟨-80528120540117890031311163717725110522259957290368,-80528120540117890031311163717725110522259957290364⟩,⟨-1,1⟩⟩, + ⟨⟨114430837108010016058642945839897866044637193576099,114430837108010016058642945839897866044637193576113⟩,⟨39926933961065565811061415411581334287247419293178,39926933961065565811061415411581334287247419293192⟩⟩, + ⟨⟨-174641182831142376658744605738923736931523425212112,-174641182831142376658744605738923736931523425212016⟩,⟨-307416019017327802834751526574991452180683657874833,-307416019017327802834751526574991452180683657874737⟩⟩, + ⟨⟨-982366916318917700303558299581621381803120647637683,-982366916318917700303558299581621381803120647637113⟩,⟨1085731177236445987418170164657092982721551481031709,1085731177236445987418170164657092982721551481032279⟩⟩, + ⟨⟨4142049956364168653575093421649483780876818588324185,4142049956364168653575093421649483780876818588326929⟩,⟨5274838232018642123172120162544934558782790237640819,5274838232018642123172120162544934558782790237643563⟩⟩, + ⟨⟨29507444682089565836549436136933076094666866935186122,29507444682089565836549436136933076094666866935197219⟩,⟨-3470108320978540959436176638484122390967561837505112,-3470108320978540959436176638484122390967561837494019⟩⟩, + ⟨⟨78377216006246233807903874013864598114226096315346745,78377216006246233807903874013864598114226096315384437⟩,⟨-91439997463285247680421116798377638655190488379699786,-91439997463285247680421116798377638655190488379662090⟩⟩, + ⟨⟨71654596920104077861260144702247559006869788962397774,71654596920104077861260144702247559006869788962509838⟩,⟨-433900551775168361401120026248205768425620259674317709,-433900551775168361401120026248205768425620259674205227⟩⟩, + ⟨⟨-338141886130528887402225544692331164592519426240573391,-338141886130528887402225544692331164592519426240284038⟩,⟨-1409025501346615423585409333309799290357883329581939942,-1409025501346615423585409333309799290357883329581650310⟩⟩, + ⟨⟨-2183684150995714064854705682774730386623788915425518897,-2183684150995714064854705682774730386623788915424841395⟩,⟨-3754281454311443836636126919595441264471579148239632370,-3754281454311443836636126919595441264471579148238961262⟩⟩, + ⟨⟨-8035220081651414304407653102302610028318592649037752140,-8035220081651414304407653102302610028318592649035825191⟩,⟨-8857772338051482008238092536058286289983357815133954097,-8857772338051482008238092536058286289983357815132050999⟩⟩, + ⟨⟨-23625629945596750604410700764290253975041119121392482333,-23625629945596750604410700764290253975041119121387645529⟩,⟨-19365232232662338744813321224580947544361621130308935409,-19365232232662338744813321224580947544361621130304139243⟩⟩, + ⟨⟨-60757640067070092023122530451372903931578780350769398996,-60757640067070092023122530451372903931578780350758305203⟩,⟨-40507573351317186808780766753659534390897221605428574267,-40507573351317186808780766753659534390897221605417489870⟩⟩, + ⟨⟨-142184513254895065628722980089203516597824733016469963619,-142184513254895065628722980089203516597824733016445971846⟩,⟨-82969514621180870752740648216453191949242144214945983999,-82969514621180870752740648216453191949242144214921935065⟩⟩, + ⟨⟨-309268478656001887161097152585287058164586195109616119015,-309268478656001887161097152585287058164586195109567323707⟩,⟨-168818299022817845503323116930185023271420858642355444339,-168818299022817845503323116930185023271420858642306641662⟩⟩, + ⟨⟨-633116031396794174892045340903191819339674290176628204850,-633116031396794174892045340903191819339674290176535391645⟩,⟨-343082749356448807509236955007101904301421703478401002531,-343082749356448807509236955007101904301421703478308861487⟩⟩] +lemma tw1_0_0_9_calc (j : Fin 31) : taylorWaveBox 1 0 0 9 j = tw1_0_0_9 j := by + revert j + decide +kernel +def tw1_0_0_10 : Fin 31 → CI := ![⟨⟨107998922673407664482155571007373926135857902288932056083,107998922673407664482155571007373926135857902288956662742⟩,⟨120160720438729691461063998915696013813021027419465015780,120160720438729691461063998915696013813021027419489665066⟩⟩, + ⟨⟨50568336490462256849382763054291745863987762264486732188,50568336490462256849382763054291745863987762264499002434⟩,⟨54134482160418647954938145827159630912404507708025166480,54134482160418647954938145827159630912404507708037410194⟩⟩, + ⟨⟨23132418468243120344485369906245105999082619331833903533,23132418468243120344485369906245105999082619331839664967⟩,⟨22539595307707037080064152106169597252208315533118665813,22539595307707037080064152106169597252208315533124422589⟩⟩, + ⟨⟨10251167864471990939441376726974257210374497929156834149,10251167864471990939441376726974257210374497929159376735⟩,⟨8483237068199219288128410671637474313385224923180956726,8483237068199219288128410671637474313385224923183510326⟩⟩, + ⟨⟨4335249834230458357376893381164826719540584893471232833,4335249834230458357376893381164826719540584893472256045⟩,⟨2765868256790756375596061045036586358734618522488490929,2765868256790756375596061045036586358734618522489522603⟩⟩, + ⟨⟨1709033903733842438846662964373742601035565412805455717,1709033903733842438846662964373742601035565412805831280⟩,⟨704883512819982855512196148198146016886238471385037807,704883512819982855512196148198146016886238471385416198⟩⟩, + ⟨⟨605771727957694874298726048844406405678628309484508073,605771727957694874298726048844406405678628309484629725⟩,⟨89269869665804387859037833653614218208945507585631845,89269869665804387859037833653614218208945507585753607⟩⟩, + ⟨⟨181652629376059333779800890778039771811256110708727867,181652629376059333779800890778039771811256110708777146⟩,⟨-34431807716643522253805431021820344839761025083966463,-34431807716643522253805431021820344839761025083917429⟩⟩, + ⟨⟨40423968064395805743263967738205747378446613773148172,40423968064395805743263967738205747378446613773165532⟩,⟨-30014196833354136515891070718467561409066473003661219,-30014196833354136515891070718467561409066473003643890⟩⟩, + ⟨⟨3875823685180559728085513982007116073562995041159675,3875823685180559728085513982007116073562995041164943⟩,⟨-11627489460527757790023083987568193056382093423680691,-11627489460527757790023083987568193056382093423675417⟩⟩, + ⟨⟨-1292652792316297542194359655583675449116277562169552,-1292652792316297542194359655583675449116277562168160⟩,⟨-2327536378274759943023728671920312076299628723889269,-2327536378274759943023728671920312076299628723887876⟩⟩, + ⟨⟨-523754877424599549617943212135378593400544231290474,-523754877424599549617943212135378593400544231290168⟩,⟨35215185574264991604035819617220531824032710356168,35215185574264991604035819617220531824032710356474⟩⟩, + ⟨⟨4062651871460954937738001148095500038059166176856,4062651871460954937738001148095500038059166176912⟩,⟨99712594384062094099323393625789177382427429172862,99712594384062094099323393625789177382427429172918⟩⟩, + ⟨⟨18086560458652269152851903119867450001079474249714,18086560458652269152851903119867450001079474249723⟩,⟨-11016159032376241955395032772166125158386317176047,-11016159032376241955395032772166125158386317176038⟩⟩, + ⟨⟨-6572298334916689119071798246914397192465743707652,-6572298334916689119071798246914397192465743707650⟩,⟨426240312417405977461986125862132832549109054322,426240312417405977461986125862132832549109054323⟩⟩, + ⟨⟨4216442531603794934614922221526667925630302125663,4216442531603794934614922221526667925630302125664⟩,⟨-1,1⟩⟩, + ⟨⟨-6572298334916689119071798246914397192465743707652,-6572298334916689119071798246914397192465743707650⟩,⟨-426240312417405977461986125862132832549109054323,-426240312417405977461986125862132832549109054322⟩⟩, + ⟨⟨18086560458652269152851903119867450001079474249714,18086560458652269152851903119867450001079474249723⟩,⟨11016159032376241955395032772166125158386317176038,11016159032376241955395032772166125158386317176047⟩⟩, + ⟨⟨4062651871460954937738001148095500038059166176856,4062651871460954937738001148095500038059166176912⟩,⟨-99712594384062094099323393625789177382427429172918,-99712594384062094099323393625789177382427429172862⟩⟩, + ⟨⟨-523754877424599549617943212135378593400544231290474,-523754877424599549617943212135378593400544231290168⟩,⟨-35215185574264991604035819617220531824032710356474,-35215185574264991604035819617220531824032710356168⟩⟩, + ⟨⟨-1292652792316297542194359655583675449116277562169552,-1292652792316297542194359655583675449116277562168160⟩,⟨2327536378274759943023728671920312076299628723887876,2327536378274759943023728671920312076299628723889269⟩⟩, + ⟨⟨3875823685180559728085513982007116073562995041159675,3875823685180559728085513982007116073562995041164943⟩,⟨11627489460527757790023083987568193056382093423675417,11627489460527757790023083987568193056382093423680691⟩⟩, + ⟨⟨40423968064395805743263967738205747378446613773148172,40423968064395805743263967738205747378446613773165532⟩,⟨30014196833354136515891070718467561409066473003643890,30014196833354136515891070718467561409066473003661219⟩⟩, + ⟨⟨181652629376059333779800890778039771811256110708727867,181652629376059333779800890778039771811256110708777146⟩,⟨34431807716643522253805431021820344839761025083917429,34431807716643522253805431021820344839761025083966463⟩⟩, + ⟨⟨605771727957694874298726048844406405678628309484508073,605771727957694874298726048844406405678628309484629725⟩,⟨-89269869665804387859037833653614218208945507585753607,-89269869665804387859037833653614218208945507585631845⟩⟩, + ⟨⟨1709033903733842438846662964373742601035565412805455717,1709033903733842438846662964373742601035565412805831280⟩,⟨-704883512819982855512196148198146016886238471385416198,-704883512819982855512196148198146016886238471385037807⟩⟩, + ⟨⟨4335249834230458357376893381164826719540584893471232833,4335249834230458357376893381164826719540584893472256045⟩,⟨-2765868256790756375596061045036586358734618522489522603,-2765868256790756375596061045036586358734618522488490929⟩⟩, + ⟨⟨10251167864471990939441376726974257210374497929156834149,10251167864471990939441376726974257210374497929159376735⟩,⟨-8483237068199219288128410671637474313385224923183510326,-8483237068199219288128410671637474313385224923180956726⟩⟩, + ⟨⟨23132418468243120344485369906245105999082619331833903533,23132418468243120344485369906245105999082619331839664967⟩,⟨-22539595307707037080064152106169597252208315533124422589,-22539595307707037080064152106169597252208315533118665812⟩⟩, + ⟨⟨50568336490462256849382763054291745863987762264486732189,50568336490462256849382763054291745863987762264499002434⟩,⟨-54134482160418647954938145827159630912404507708037410194,-54134482160418647954938145827159630912404507708025166479⟩⟩, + ⟨⟨107998922673407664482155571007373926135857902288932056084,107998922673407664482155571007373926135857902288956662743⟩,⟨-120160720438729691461063998915696013813021027419489665065,-120160720438729691461063998915696013813021027419465015779⟩⟩] +lemma tw1_0_0_10_calc (j : Fin 31) : taylorWaveBox 1 0 0 10 j = tw1_0_0_10 j := by + revert j + decide +kernel +def tw1_0_0_11 : Fin 31 → CI := ![⟨⟨18978638928489525295832377807603379683674292614080517753,18978638928489525295832377807603379683674292614086545112⟩,⟨-27556901977287083291974248377970379940230515149511000992,-27556901977287083291974248377970379940230515149504956367⟩⟩, + ⟨⟨7730959267235601666800631311047463074357642377791455073,7730959267235601666800631311047463074357642377794341993⟩,⟨-12121188765715866269204795597024070854897841005870475744,-12121188765715866269204795597024070854897841005867580251⟩⟩, + ⟨⟨2815860949256330925243063935430270605538204398908714273,2815860949256330925243063935430270605538204398910011683⟩,⟨-5126756770408771928969316494962277664357538789895745697,-5126756770408771928969316494962277664357538789894449251⟩⟩, + ⟨⟨871250110563743094014710212263299992621738353148420752,871250110563743094014710212263299992621738353148957773⟩,⟨-2061551601506439019905057005996461286849382163624415766,-2061551601506439019905057005996461286849382163623881166⟩⟩, + ⟨⟨198936003628804832911672319986048023598361264751634573,198936003628804832911672319986048023598361264751835915⟩,⟨-773917574206984268816893959443018002553889599494714240,-773917574206984268816893959443018002553889599494513992⟩⟩, + ⟨⟨12033549448616233639502931769304685662331131639634973,12033549448616233639502931769304685662331131639703171⟩,⟨-263516787533777021664445719783547554143032944153498775,-263516787533777021664445719783547554143032944153430713⟩⟩, + ⟨⟨-18491755284334853718658388469608500278721643723369191,-18491755284334853718658388469608500278721643723348667⟩,⟨-77510301422918951516080613808627110000299915902474437,-77510301422918951516080613808627110000299915902453803⟩⟩, + ⟨⟨-12477814319703162531769752261256061464203805321693123,-12477814319703162531769752261256061464203805321685464⟩,⟨-17846213489760917279633976993461810859712069388909238,-17846213489760917279633976993461810859712069388901549⟩⟩, + ⟨⟨-4774491324297603140621882242538510323706307872354204,-4774491324297603140621882242538510323706307872351742⟩,⟨-2348362900470733902523045822012793687818272172923308,-2348362900470733902523045822012793687818272172920846⟩⟩, + ⟨⟨-1123963871755648503941521806032368488504337975919495,-1123963871755648503941521806032368488504337975918812⟩,⟨249770309368191928223461208302879865825828508657121,249770309368191928223461208302879865825828508657803⟩⟩, + ⟨⟨-93766227680407402727836241901296461720546280757622,-93766227680407402727836241901296461720546280757460⟩,⟨199268200226237576796694048018618167884945565529015,199268200226237576796694048018618167884945565529177⟩⟩, + ⟨⟨27205364033742945205445866708864221340744502602097,27205364033742945205445866708864221340744502602129⟩,⟨26424886901427754636009741113983859442087632993876,26424886901427754636009741113983859442087632993908⟩⟩, + ⟨⟨3819750221271524049489545295794502929313577195922,3819750221271524049489545295794502929313577195928⟩,⟨-4982959257157597178248685220396332133186452702121,-4982959257157597178248685220396332133186452702115⟩⟩, + ⟨⟨-1169960462606729446001971363021330111385226045144,-1169960462606729446001971363021330111385226045143⟩,⟨46788942314465593401387546133455493836080813617,46788942314465593401387546133455493836080813618⟩⟩, + ⟨⟨323376138599928481298682961839149218045460751771,323376138599928481298682961839149218045460751772⟩,⟨67635982065038776197613233525030597254071760543,67635982065038776197613233525030597254071760544⟩⟩, + ⟨⟨-203789921254923565677093597247906517103179400327,-203789921254923565677093597247906517103179400326⟩,⟨-1,1⟩⟩, + ⟨⟨323376138599928481298682961839149218045460751771,323376138599928481298682961839149218045460751772⟩,⟨-67635982065038776197613233525030597254071760544,-67635982065038776197613233525030597254071760543⟩⟩, + ⟨⟨-1169960462606729446001971363021330111385226045144,-1169960462606729446001971363021330111385226045143⟩,⟨-46788942314465593401387546133455493836080813618,-46788942314465593401387546133455493836080813617⟩⟩, + ⟨⟨3819750221271524049489545295794502929313577195922,3819750221271524049489545295794502929313577195928⟩,⟨4982959257157597178248685220396332133186452702115,4982959257157597178248685220396332133186452702121⟩⟩, + ⟨⟨27205364033742945205445866708864221340744502602097,27205364033742945205445866708864221340744502602129⟩,⟨-26424886901427754636009741113983859442087632993908,-26424886901427754636009741113983859442087632993876⟩⟩, + ⟨⟨-93766227680407402727836241901296461720546280757622,-93766227680407402727836241901296461720546280757460⟩,⟨-199268200226237576796694048018618167884945565529177,-199268200226237576796694048018618167884945565529015⟩⟩, + ⟨⟨-1123963871755648503941521806032368488504337975919495,-1123963871755648503941521806032368488504337975918812⟩,⟨-249770309368191928223461208302879865825828508657803,-249770309368191928223461208302879865825828508657121⟩⟩, + ⟨⟨-4774491324297603140621882242538510323706307872354204,-4774491324297603140621882242538510323706307872351742⟩,⟨2348362900470733902523045822012793687818272172920846,2348362900470733902523045822012793687818272172923308⟩⟩, + ⟨⟨-12477814319703162531769752261256061464203805321693123,-12477814319703162531769752261256061464203805321685464⟩,⟨17846213489760917279633976993461810859712069388901549,17846213489760917279633976993461810859712069388909238⟩⟩, + ⟨⟨-18491755284334853718658388469608500278721643723369191,-18491755284334853718658388469608500278721643723348667⟩,⟨77510301422918951516080613808627110000299915902453803,77510301422918951516080613808627110000299915902474437⟩⟩, + ⟨⟨12033549448616233639502931769304685662331131639634973,12033549448616233639502931769304685662331131639703171⟩,⟨263516787533777021664445719783547554143032944153430713,263516787533777021664445719783547554143032944153498775⟩⟩, + ⟨⟨198936003628804832911672319986048023598361264751634573,198936003628804832911672319986048023598361264751835915⟩,⟨773917574206984268816893959443018002553889599494513992,773917574206984268816893959443018002553889599494714240⟩⟩, + ⟨⟨871250110563743094014710212263299992621738353148420752,871250110563743094014710212263299992621738353148957773⟩,⟨2061551601506439019905057005996461286849382163623881166,2061551601506439019905057005996461286849382163624415766⟩⟩, + ⟨⟨2815860949256330925243063935430270605538204398908714273,2815860949256330925243063935430270605538204398910011683⟩,⟨5126756770408771928969316494962277664357538789894449251,5126756770408771928969316494962277664357538789895745697⟩⟩, + ⟨⟨7730959267235601666800631311047463074357642377791455073,7730959267235601666800631311047463074357642377794341993⟩,⟨12121188765715866269204795597024070854897841005867580251,12121188765715866269204795597024070854897841005870475744⟩⟩, + ⟨⟨18978638928489525295832377807603379683674292614080517753,18978638928489525295832377807603379683674292614086545111⟩,⟨27556901977287083291974248377970379940230515149504956367,27556901977287083291974248377970379940230515149511000992⟩⟩] +lemma tw1_0_0_11_calc (j : Fin 31) : taylorWaveBox 1 0 0 11 j = tw1_0_0_11 j := by + revert j + decide +kernel +def tw1_0_0_12 : Fin 31 → CI := ![⟨⟨-6004887942823177268711257451676161624105812210003972726,-6004887942823177268711257451676161624105812210002566035⟩,⟨-2312246311849200143085736285638984942120727832504470799,-2312246311849200143085736285638984942120727832503072001⟩⟩, + ⟨⟨-2462511172734170061154540497630412667941213232305326121,-2462511172734170061154540497630412667941213232304685407⟩,⟨-805309255806178596462574848305552035102697930588255655,-805309255806178596462574848305552035102697930587616617⟩⟩, + ⟨⟨-957249981526681639573451444913659388020769343986287838,-957249981526681639573451444913659388020769343986018686⟩,⟨-226267824874263351271422977547397818282475597803164190,-226267824874263351271422977547397818282475597802894698⟩⟩, + ⟨⟨-347509011920228898923976562325582855352343641721488899,-347509011920228898923976562325582855352343641721385069⟩,⟨-37816492233318090039307342838586252953580290804386063,-37816492233318090039307342838586252953580290804281887⟩⟩, + ⟨⟨-115057875463749231436604526584310490689124253642339857,-115057875463749231436604526584310490689124253642303617⟩,⟨7452646005251113986275208318314432364728018611106348,7452646005251113986275208318314432364728018611142667⟩⟩, + ⟨⟨-33391747127368012544781939591286272107262820418970145,-33391747127368012544781939591286272107262820418958629⟩,⟨10326426778910650846100363535994270284059275728591107,10326426778910650846100363535994270284059275728602595⟩⟩, + ⟨⟨-7866727446659786775731131493138639294154999163990248,-7866727446659786775731131493138639294154999163986996⟩,⟨5553424284441274460839353684158266332766426517165150,5553424284441274460839353684158266332766426517168382⟩⟩, + ⟨⟨-1219855199491788060965363478853549078523233517666130,-1219855199491788060965363478853549078523233517665022⟩,⟨2045387293233636923572168256263370782960787980608503,2045387293233636923572168256263370782960787980609611⟩⟩, + ⟨⟨9345346333245461092278167648405665961911398735722,9345346333245461092278167648405665961911398736049⟩,⟨522047249099940106877840679137029071843807272188838,522047249099940106877840679137029071843807272189165⟩⟩, + ⟨⟨69126156058111742358984577375807576109570457839036,69126156058111742358984577375807576109570457839118⟩,⟨72862635738340686645952733039510048505722972871712,72862635738340686645952733039510048505722972871795⟩⟩, + ⟨⟨16629240559334066139263690206650246607019799783506,16629240559334066139263690206650246607019799783524⟩,⟨-3098388055362418764836043614533249026211905447297,-3098388055362418764836043614533249026211905447279⟩⟩, + ⟨⟨96744062753778576854810106605484386872093059988,96744062753778576854810106605484386872093059992⟩,⟨-2542583798285123022567714808254303550221821654575,-2542583798285123022567714808254303550221821654571⟩⟩, + ⟨⟨-357792229474489156974518352346780148013793574354,-357792229474489156974518352346780148013793574353⟩,⟨80776364295400781401903462088518567057307491673,80776364295400781401903462088518567057307491675⟩⟩, + ⟨⟨53674304342958989940648465990653214730766322284,53674304342958989940648465990653214730766322285⟩,⟨27071063165999731109835508300843329047531424073,27071063165999731109835508300843329047531424074⟩⟩, + ⟨⟨-13669893891129029631579201284912229037663719419,-13669893891129029631579201284912229037663719418⟩,⟨-7066908877451010633731632204352800448729371999,-7066908877451010633731632204352800448729371998⟩⟩, + ⟨⟨9146070278430147594724409534260059192920233715,9146070278430147594724409534260059192920233716⟩,⟨-1,1⟩⟩, + ⟨⟨-13669893891129029631579201284912229037663719419,-13669893891129029631579201284912229037663719418⟩,⟨7066908877451010633731632204352800448729371998,7066908877451010633731632204352800448729371999⟩⟩, + ⟨⟨53674304342958989940648465990653214730766322284,53674304342958989940648465990653214730766322285⟩,⟨-27071063165999731109835508300843329047531424074,-27071063165999731109835508300843329047531424073⟩⟩, + ⟨⟨-357792229474489156974518352346780148013793574354,-357792229474489156974518352346780148013793574353⟩,⟨-80776364295400781401903462088518567057307491675,-80776364295400781401903462088518567057307491673⟩⟩, + ⟨⟨96744062753778576854810106605484386872093059988,96744062753778576854810106605484386872093059992⟩,⟨2542583798285123022567714808254303550221821654571,2542583798285123022567714808254303550221821654575⟩⟩, + ⟨⟨16629240559334066139263690206650246607019799783506,16629240559334066139263690206650246607019799783524⟩,⟨3098388055362418764836043614533249026211905447279,3098388055362418764836043614533249026211905447297⟩⟩, + ⟨⟨69126156058111742358984577375807576109570457839036,69126156058111742358984577375807576109570457839118⟩,⟨-72862635738340686645952733039510048505722972871795,-72862635738340686645952733039510048505722972871712⟩⟩, + ⟨⟨9345346333245461092278167648405665961911398735722,9345346333245461092278167648405665961911398736049⟩,⟨-522047249099940106877840679137029071843807272189165,-522047249099940106877840679137029071843807272188838⟩⟩, + ⟨⟨-1219855199491788060965363478853549078523233517666130,-1219855199491788060965363478853549078523233517665022⟩,⟨-2045387293233636923572168256263370782960787980609611,-2045387293233636923572168256263370782960787980608503⟩⟩, + ⟨⟨-7866727446659786775731131493138639294154999163990248,-7866727446659786775731131493138639294154999163986996⟩,⟨-5553424284441274460839353684158266332766426517168382,-5553424284441274460839353684158266332766426517165150⟩⟩, + ⟨⟨-33391747127368012544781939591286272107262820418970145,-33391747127368012544781939591286272107262820418958629⟩,⟨-10326426778910650846100363535994270284059275728602595,-10326426778910650846100363535994270284059275728591107⟩⟩, + ⟨⟨-115057875463749231436604526584310490689124253642339857,-115057875463749231436604526584310490689124253642303617⟩,⟨-7452646005251113986275208318314432364728018611142667,-7452646005251113986275208318314432364728018611106348⟩⟩, + ⟨⟨-347509011920228898923976562325582855352343641721488899,-347509011920228898923976562325582855352343641721385069⟩,⟨37816492233318090039307342838586252953580290804281887,37816492233318090039307342838586252953580290804386063⟩⟩, + ⟨⟨-957249981526681639573451444913659388020769343986287838,-957249981526681639573451444913659388020769343986018686⟩,⟨226267824874263351271422977547397818282475597802894698,226267824874263351271422977547397818282475597803164190⟩⟩, + ⟨⟨-2462511172734170061154540497630412667941213232305326121,-2462511172734170061154540497630412667941213232304685407⟩,⟨805309255806178596462574848305552035102697930587616617,805309255806178596462574848305552035102697930588255655⟩⟩, + ⟨⟨-6004887942823177268711257451676161624105812210003972726,-6004887942823177268711257451676161624105812210002566035⟩,⟨2312246311849200143085736285638984942120727832503072001,2312246311849200143085736285638984942120727832504470799⟩⟩] +lemma tw1_0_0_12_calc (j : Fin 31) : taylorWaveBox 1 0 0 12 j = tw1_0_0_12 j := by + revert j + decide +kernel +def tw1_0_0_13 : Fin 31 → CI := ![⟨⟨-152030954631264912876491974108226602095092720920376661,-152030954631264912876491974108226602095092720920071805⟩,⟨1144905805177008332934605847068017326460581463354864605,1144905805177008332934605847068017326460581463355171305⟩⟩, + ⟨⟨-28033354637036003898536463458260827798968362008546774,-28033354637036003898536463458260827798968362008415478⟩,⟨434869374984789502094283936619667836315823767731632138,434869374984789502094283936619667836315823767731763673⟩⟩, + ⟨⟨5871499488200069785094058132477611427289401265904990,5871499488200069785094058132477611427289401265956969⟩,⟨154273305318143954561117086743008332831915283626278897,154273305318143954561117086743008332831915283626330811⟩⟩, + ⟨⟨9276245043854405068484548819204765094797340857438324,9276245043854405068484548819204765094797340857457114⟩,⟨50105465029344767641935532039801597604327719982232309,50105465029344767641935532039801597604327719982251066⟩⟩, + ⟨⟨5773403229627238851209673131923008944785414336124340,5773403229627238851209673131923008944785414336130457⟩,⟨14414175180209463050464754816569060086099432053865880,14414175180209463050464754816569060086099432053872000⟩⟩, + ⟨⟨2600244547932255095344635127171071637926943867638041,2600244547932255095344635127171071637926943867639865⟩,⟨3452753849020086278892928448234561111259869832834850,3452753849020086278892928448234561111259869832836683⟩⟩, + ⟨⟨911073939865189780740930817479919697012895933680570,911073939865189780740930817479919697012895933681045⟩,⟨591180479350414444076301863914114697159669392654642,591180479350414444076301863914114697159669392655118⟩⟩, + ⟨⟨241490469750925239756355535470945699613031481010552,241490469750925239756355535470945699613031481010702⟩,⟨27872295430838381318754178545271392564649366026148,27872295430838381318754178545271392564649366026298⟩⟩, + ⟨⟨42128612004463459159417967755547106790087718226792,42128612004463459159417967755547106790087718226834⟩,⟨-22628630329841893595205278456745700264276669013084,-22628630329841893595205278456745700264276669013043⟩⟩, + ⟨⟨2191221927353799184394191715606205497684415282327,2191221927353799184394191715606205497684415282337⟩,⟨-7877979038602701403905928035356618595996449324963,-7877979038602701403905928035356618595996449324953⟩⟩, + ⟨⟨-876820909914879543998997093190165570527234199488,-876820909914879543998997093190165570527234199485⟩,⟨-837665024185917209863623666890734134946576087586,-837665024185917209863623666890734134946576087584⟩⟩, + ⟨⟨-122389629258846012837801830377246864283129512337,-122389629258846012837801830377246864283129512336⟩,⟨102000827952894473752716354120327350066287579061,102000827952894473752716354120327350066287579063⟩⟩, + ⟨⟨17806792891204514656323423847746987859334759862,17806792891204514656323423847746987859334759863⟩,⟨9105752449373554001775520252549440522083344252,9105752449373554001775520252549440522083344253⟩⟩, + ⟨⟨-1618331757122361849462024078941110207380650688,-1618331757122361849462024078941110207380650687⟩,⟨-2383007821565101520450305095578918075428300717,-2383007821565101520450305095578918075428300716⟩⟩, + ⟨⟨490375957749681633422122799362841800608888547,490375957749681633422122799362841800608888548⟩,⟨455074424705488396898772109924934360041313348,455074424705488396898772109924934360041313349⟩⟩, + ⟨⟨-383109695945761419546854316755066712039686351,-383109695945761419546854316755066712039686350⟩,⟨-1,1⟩⟩, + ⟨⟨490375957749681633422122799362841800608888547,490375957749681633422122799362841800608888548⟩,⟨-455074424705488396898772109924934360041313349,-455074424705488396898772109924934360041313348⟩⟩, + ⟨⟨-1618331757122361849462024078941110207380650688,-1618331757122361849462024078941110207380650687⟩,⟨2383007821565101520450305095578918075428300716,2383007821565101520450305095578918075428300717⟩⟩, + ⟨⟨17806792891204514656323423847746987859334759862,17806792891204514656323423847746987859334759863⟩,⟨-9105752449373554001775520252549440522083344253,-9105752449373554001775520252549440522083344252⟩⟩, + ⟨⟨-122389629258846012837801830377246864283129512337,-122389629258846012837801830377246864283129512336⟩,⟨-102000827952894473752716354120327350066287579063,-102000827952894473752716354120327350066287579061⟩⟩, + ⟨⟨-876820909914879543998997093190165570527234199488,-876820909914879543998997093190165570527234199485⟩,⟨837665024185917209863623666890734134946576087584,837665024185917209863623666890734134946576087586⟩⟩, + ⟨⟨2191221927353799184394191715606205497684415282327,2191221927353799184394191715606205497684415282337⟩,⟨7877979038602701403905928035356618595996449324953,7877979038602701403905928035356618595996449324963⟩⟩, + ⟨⟨42128612004463459159417967755547106790087718226792,42128612004463459159417967755547106790087718226834⟩,⟨22628630329841893595205278456745700264276669013043,22628630329841893595205278456745700264276669013084⟩⟩, + ⟨⟨241490469750925239756355535470945699613031481010552,241490469750925239756355535470945699613031481010702⟩,⟨-27872295430838381318754178545271392564649366026298,-27872295430838381318754178545271392564649366026148⟩⟩, + ⟨⟨911073939865189780740930817479919697012895933680570,911073939865189780740930817479919697012895933681045⟩,⟨-591180479350414444076301863914114697159669392655118,-591180479350414444076301863914114697159669392654642⟩⟩, + ⟨⟨2600244547932255095344635127171071637926943867638041,2600244547932255095344635127171071637926943867639865⟩,⟨-3452753849020086278892928448234561111259869832836683,-3452753849020086278892928448234561111259869832834850⟩⟩, + ⟨⟨5773403229627238851209673131923008944785414336124340,5773403229627238851209673131923008944785414336130457⟩,⟨-14414175180209463050464754816569060086099432053872000,-14414175180209463050464754816569060086099432053865880⟩⟩, + ⟨⟨9276245043854405068484548819204765094797340857438324,9276245043854405068484548819204765094797340857457114⟩,⟨-50105465029344767641935532039801597604327719982251066,-50105465029344767641935532039801597604327719982232309⟩⟩, + ⟨⟨5871499488200069785094058132477611427289401265904990,5871499488200069785094058132477611427289401265956969⟩,⟨-154273305318143954561117086743008332831915283626330811,-154273305318143954561117086743008332831915283626278897⟩⟩, + ⟨⟨-28033354637036003898536463458260827798968362008546774,-28033354637036003898536463458260827798968362008415478⟩,⟨-434869374984789502094283936619667836315823767731763673,-434869374984789502094283936619667836315823767731632138⟩⟩, + ⟨⟨-152030954631264912876491974108226602095092720920376661,-152030954631264912876491974108226602095092720920071805⟩,⟨-1144905805177008332934605847068017326460581463355171305,-1144905805177008332934605847068017326460581463354864605⟩⟩] +lemma tw1_0_0_13_calc (j : Fin 31) : taylorWaveBox 1 0 0 13 j = tw1_0_0_13 j := by + revert j + decide +kernel +def tw1_0_0_14 : Fin 31 → CI := ![⟨⟨193305015929243460764035772710130209269211938248939966,193305015929243460764035772710130209269211938249002303⟩,⟨-20084339051839069975672190224777510143063370528280523,-20084339051839069975672190224777510143063370528218493⟩⟩, + ⟨⟨67512513346066245408256204907384300494403601450818161,67512513346066245408256204907384300494403601450843373⟩,⟨-12796129957081887113870056582021935197899064496834652,-12796129957081887113870056582021935197899064496809464⟩⟩, + ⟨⟨21646615900884662869111334393795867472616201258200019,21646615900884662869111334393795867472616201258209379⟩,⟨-6890924142454509829945460666811820268825254221166606,-6890924142454509829945460666811820268825254221157237⟩⟩, + ⟨⟨6194512744003679058384303872178471612431743016420434,6194512744003679058384303872178471612431743016423605⟩,⟨-3181894647289111380987257884778428789653402436619743,-3181894647289111380987257884778428789653402436616570⟩⟩, + ⟨⟨1502855844340470639194113201570542728518907281356233,1502855844340470639194113201570542728518907281357214⟩,⟨-1258801991561882972403701825785176698691407727904480,-1258801991561882972403701825785176698691407727903501⟩⟩, + ⟨⟨274525653672912026413630985060499687305763927580323,274525653672912026413630985060499687305763927580596⟩,⟨-419232006074500842564200480517319780269044100048447,-419232006074500842564200480517319780269044100048175⟩⟩, + ⟨⟨22261217885309961543994015533488317163711152588100,22261217885309961543994015533488317163711152588166⟩,⟨-112660078022086595839914571659928715984649494952359,-112660078022086595839914571659928715984649494952294⟩⟩, + ⟨⟨-7050991944234680387651102501192210598803228552056,-7050991944234680387651102501192210598803228552036⟩,⟨-22168561528759658841061716871005538384755537400564,-22168561528759658841061716871005538384755537400544⟩⟩, + ⟨⟨-3382267181806177591566954829065116850333407823420,-3382267181806177591566954829065116850333407823415⟩,⟨-2328238840819411587546646576400209648351512915902,-2328238840819411587546646576400209648351512915896⟩⟩, + ⟨⟨-601661606217174307537805844006435301195902996865,-601661606217174307537805844006435301195902996863⟩,⟨165952373631783629284471617138910645446956163648,165952373631783629284471617138910645446956163650⟩⟩, + ⟨⟨-11254863076350546494211411154881964120691266797,-11254863076350546494211411154881964120691266796⟩,⟨80718190540480054520332088579835413293051453860,80718190540480054520332088579835413293051453861⟩⟩, + ⟨⟨9256855220785303443833370584205481539854413822,9256855220785303443833370584205481539854413823⟩,⟨1334691855194004281407774497633220273622027983,1334691855194004281407774497633220273622027984⟩⟩, + ⟨⟨-401286069550462981276837414878565535929465816,-401286069550462981276837414878565535929465815⟩,⟨-940307997202438803405748484007371652079490545,-940307997202438803405748484007371652079490544⟩⟩, + ⟨⟨11562573756722726159604489165821557717541753,11562573756722726159604489165821557717541754⟩,⟨128887020260162258145783479691462266111106337,128887020260162258145783479691462266111106338⟩⟩, + ⟨⟨-14292926921587108713325286272793880762956693,-14292926921587108713325286272793880762956692⟩,⟨-23219902765737390747980564872867743761428804,-23219902765737390747980564872867743761428803⟩⟩, + ⟨⟨15044682578777793379969217208607459948659670,15044682578777793379969217208607459948659671⟩,⟨-1,1⟩⟩, + ⟨⟨-14292926921587108713325286272793880762956693,-14292926921587108713325286272793880762956692⟩,⟨23219902765737390747980564872867743761428803,23219902765737390747980564872867743761428804⟩⟩, + ⟨⟨11562573756722726159604489165821557717541753,11562573756722726159604489165821557717541754⟩,⟨-128887020260162258145783479691462266111106338,-128887020260162258145783479691462266111106337⟩⟩, + ⟨⟨-401286069550462981276837414878565535929465816,-401286069550462981276837414878565535929465815⟩,⟨940307997202438803405748484007371652079490544,940307997202438803405748484007371652079490545⟩⟩, + ⟨⟨9256855220785303443833370584205481539854413822,9256855220785303443833370584205481539854413823⟩,⟨-1334691855194004281407774497633220273622027984,-1334691855194004281407774497633220273622027983⟩⟩, + ⟨⟨-11254863076350546494211411154881964120691266797,-11254863076350546494211411154881964120691266796⟩,⟨-80718190540480054520332088579835413293051453861,-80718190540480054520332088579835413293051453860⟩⟩, + ⟨⟨-601661606217174307537805844006435301195902996865,-601661606217174307537805844006435301195902996863⟩,⟨-165952373631783629284471617138910645446956163650,-165952373631783629284471617138910645446956163648⟩⟩, + ⟨⟨-3382267181806177591566954829065116850333407823420,-3382267181806177591566954829065116850333407823415⟩,⟨2328238840819411587546646576400209648351512915896,2328238840819411587546646576400209648351512915902⟩⟩, + ⟨⟨-7050991944234680387651102501192210598803228552056,-7050991944234680387651102501192210598803228552036⟩,⟨22168561528759658841061716871005538384755537400544,22168561528759658841061716871005538384755537400564⟩⟩, + ⟨⟨22261217885309961543994015533488317163711152588100,22261217885309961543994015533488317163711152588166⟩,⟨112660078022086595839914571659928715984649494952294,112660078022086595839914571659928715984649494952359⟩⟩, + ⟨⟨274525653672912026413630985060499687305763927580323,274525653672912026413630985060499687305763927580596⟩,⟨419232006074500842564200480517319780269044100048175,419232006074500842564200480517319780269044100048447⟩⟩, + ⟨⟨1502855844340470639194113201570542728518907281356233,1502855844340470639194113201570542728518907281357214⟩,⟨1258801991561882972403701825785176698691407727903501,1258801991561882972403701825785176698691407727904480⟩⟩, + ⟨⟨6194512744003679058384303872178471612431743016420434,6194512744003679058384303872178471612431743016423605⟩,⟨3181894647289111380987257884778428789653402436616570,3181894647289111380987257884778428789653402436619743⟩⟩, + ⟨⟨21646615900884662869111334393795867472616201258200019,21646615900884662869111334393795867472616201258209379⟩,⟨6890924142454509829945460666811820268825254221157237,6890924142454509829945460666811820268825254221166606⟩⟩, + ⟨⟨67512513346066245408256204907384300494403601450818161,67512513346066245408256204907384300494403601450843373⟩,⟨12796129957081887113870056582021935197899064496809464,12796129957081887113870056582021935197899064496834652⟩⟩, + ⟨⟨193305015929243460764035772710130209269211938248939966,193305015929243460764035772710130209269211938249002303⟩,⟨20084339051839069975672190224777510143063370528218493,20084339051839069975672190224777510143063370528280523⟩⟩] +lemma tw1_0_0_14_calc (j : Fin 31) : taylorWaveBox 1 0 0 14 j = tw1_0_0_14 j := by + revert j + decide +kernel +def tw1_0_0_15 : Fin 31 → CI := ![⟨⟨-10237517662958471935069966812730034791238168827949178,-10237517662958471935069966812730034791238168827937337⟩,⟨-29026587404959696262823734609388104016635668271856949,-29026587404959696262823734609388104016635668271845069⟩⟩, + ⟨⟨-4334482769862309712814397079326133901726989022969915,-4334482769862309712814397079326133901726989022965378⟩,⟨-9230832036026826073965597151131918069604880022275783,-9230832036026826073965597151131918069604880022271246⟩⟩, + ⟨⟨-1719763577687622810124147696960463753253120573581076,-1719763577687622810124147696960463753253120573579489⟩,⟨-2634406952210208195316854412514152555952840129709037,-2634406952210208195316854412514152555952840129707450⟩⟩, + ⟨⟨-620957159496441236467140721618120540967231690404458,-620957159496441236467140721618120540967231690403948⟩,⟨-645559634298206355992555991333993184663853148457556,-645559634298206355992555991333993184663853148457046⟩⟩, + ⟨⟨-197705794598396624664063505935084428652853049177730,-197705794598396624664063505935084428652853049177582⟩,⟨-123196910324756691723682593812958878478957357299183,-123196910324756691723682593812958878478957357299035⟩⟩, + ⟨⟨-53187496407896590665165806136202247296111609206834,-53187496407896590665165806136202247296111609206795⟩,⟨-12689789158325014063900387306818207645223116424730,-12689789158325014063900387306818207645223116424692⟩⟩, + ⟨⟨-11232539555718257897757822270670097269551779903461,-11232539555718257897757822270670097269551779903452⟩,⟨2106975024069546523235264379886521909155983865630,2106975024069546523235264379886521909155983865639⟩⟩, + ⟨⟨-1560169542948152728624995477389444546854346068730,-1560169542948152728624995477389444546854346068726⟩,⟨1398468235562368157858804139057537835316467162566,1398468235562368157858804139057537835316467162569⟩⟩, + ⟨⟨-42314070705294929088780752112702897506086106398,-42314070705294929088780752112702897506086106396⟩,⟨329123206055932790300337112292351826214317838779,329123206055932790300337112292351826214317838781⟩⟩, + ⟨⟨32460003275896978223980033436673064215980820417,32460003275896978223980033436673064215980820418⟩,⟨30928682888832743043494547575700296182335348833,30928682888832743043494547575700296182335348834⟩⟩, + ⟨⟨4559502858278840641499215207213026225992335865,4559502858278840641499215207213026225992335866⟩,⟨-2405589059143171005385508264845811405888763960,-2405589059143171005385508264845811405888763959⟩⟩, + ⟨⟨-287321351557953902687667741208702569437993335,-287321351557953902687667741208702569437993334⟩,⟨-429477394396584146179614663115119110931927175,-429477394396584146179614663115119110931927174⟩⟩, + ⟨⟨-14129920141350243205867420594455585151633119,-14129920141350243205867420594455585151633118⟩,⟨47113284347403467078222092028058310369224899,47113284347403467078222092028058310369224900⟩⟩, + ⟨⟨2219122234020432256378896356734554348799464,2219122234020432256378896356734554348799465⟩,⟨-5001070755274761562214304683547758264813283,-5001070755274761562214304683547758264813282⟩⟩, + ⟨⟨289874899440012789581431654033893801457366,289874899440012789581431654033893801457367⟩,⟨1004945972615782713301778004367919828633804,1004945972615782713301778004367919828633805⟩⟩, + ⟨⟨-556050167824454840727567033381192094125579,-556050167824454840727567033381192094125578⟩,⟨-1,1⟩⟩, + ⟨⟨289874899440012789581431654033893801457366,289874899440012789581431654033893801457367⟩,⟨-1004945972615782713301778004367919828633805,-1004945972615782713301778004367919828633804⟩⟩, + ⟨⟨2219122234020432256378896356734554348799464,2219122234020432256378896356734554348799465⟩,⟨5001070755274761562214304683547758264813282,5001070755274761562214304683547758264813283⟩⟩, + ⟨⟨-14129920141350243205867420594455585151633119,-14129920141350243205867420594455585151633118⟩,⟨-47113284347403467078222092028058310369224900,-47113284347403467078222092028058310369224899⟩⟩, + ⟨⟨-287321351557953902687667741208702569437993335,-287321351557953902687667741208702569437993334⟩,⟨429477394396584146179614663115119110931927174,429477394396584146179614663115119110931927175⟩⟩, + ⟨⟨4559502858278840641499215207213026225992335865,4559502858278840641499215207213026225992335866⟩,⟨2405589059143171005385508264845811405888763959,2405589059143171005385508264845811405888763960⟩⟩, + ⟨⟨32460003275896978223980033436673064215980820417,32460003275896978223980033436673064215980820418⟩,⟨-30928682888832743043494547575700296182335348834,-30928682888832743043494547575700296182335348833⟩⟩, + ⟨⟨-42314070705294929088780752112702897506086106398,-42314070705294929088780752112702897506086106396⟩,⟨-329123206055932790300337112292351826214317838781,-329123206055932790300337112292351826214317838779⟩⟩, + ⟨⟨-1560169542948152728624995477389444546854346068730,-1560169542948152728624995477389444546854346068726⟩,⟨-1398468235562368157858804139057537835316467162569,-1398468235562368157858804139057537835316467162566⟩⟩, + ⟨⟨-11232539555718257897757822270670097269551779903461,-11232539555718257897757822270670097269551779903452⟩,⟨-2106975024069546523235264379886521909155983865639,-2106975024069546523235264379886521909155983865630⟩⟩, + ⟨⟨-53187496407896590665165806136202247296111609206834,-53187496407896590665165806136202247296111609206795⟩,⟨12689789158325014063900387306818207645223116424692,12689789158325014063900387306818207645223116424730⟩⟩, + ⟨⟨-197705794598396624664063505935084428652853049177730,-197705794598396624664063505935084428652853049177582⟩,⟨123196910324756691723682593812958878478957357299035,123196910324756691723682593812958878478957357299183⟩⟩, + ⟨⟨-620957159496441236467140721618120540967231690404458,-620957159496441236467140721618120540967231690403948⟩,⟨645559634298206355992555991333993184663853148457046,645559634298206355992555991333993184663853148457556⟩⟩, + ⟨⟨-1719763577687622810124147696960463753253120573581076,-1719763577687622810124147696960463753253120573579489⟩,⟨2634406952210208195316854412514152555952840129707450,2634406952210208195316854412514152555952840129709037⟩⟩, + ⟨⟨-4334482769862309712814397079326133901726989022969915,-4334482769862309712814397079326133901726989022965378⟩,⟨9230832036026826073965597151131918069604880022271246,9230832036026826073965597151131918069604880022275783⟩⟩, + ⟨⟨-10237517662958471935069966812730034791238168827949178,-10237517662958471935069966812730034791238168827937337⟩,⟨29026587404959696262823734609388104016635668271845069,29026587404959696262823734609388104016635668271856949⟩⟩] +lemma tw1_0_0_15_calc (j : Fin 31) : taylorWaveBox 1 0 0 15 j = tw1_0_0_15 j := by + revert j + decide +kernel +def tw1_0_0_16 : Fin 31 → CI := ![⟨⟨-3864389226054460290662509588191257601444515650504816,-3864389226054460290662509588191257601444515650502682⟩,⟨2502205628749763934174749631607087842705675781126418,2502205628749763934174749631607087842705675781128548⟩⟩, + ⟨⟨-1101763433135077690211545434467007740314142965160059,-1101763433135077690211545434467007740314142965159288⟩,⟨910613456716065044951869929549760415933131836350733,910613456716065044951869929549760415933131836351504⟩⟩, + ⟨⟨-272040024757759354598889937707161233517154011327387,-272040024757759354598889937707161233517154011327130⟩,⟨308737027098572976970227603529195777358409141309655,308737027098572976970227603529195777358409141309912⟩⟩, + ⟨⟨-53438780349072482064607508827834496594739710146846,-53438780349072482064607508827834496594739710146767⟩,⟨94785928586578254966542955749265872773179420741418,94785928586578254966542955749265872773179420741496⟩⟩, + ⟨⟨-6238826339063389570700646048218249502244875637338,-6238826339063389570700646048218249502244875637316⟩,⟨25387487719207988594156430641440342019611550402917,25387487719207988594156430641440342019611550402939⟩⟩, + ⟨⟨626157187550618852119638113825400152958954015079,626157187550618852119638113825400152958954015085⟩,⟨5600162388895816768580840216051447860825690430843,5600162388895816768580840216051447860825690430849⟩⟩, + ⟨⟨575957854352071132037674699619133200546804916197,575957854352071132037674699619133200546804916199⟩,⟨906676690184322582605128299513519647752355973435,906676690184322582605128299513519647752355973437⟩⟩, + ⟨⟨162939636139200596205066519283321911899344489468,162939636139200596205066519283321911899344489469⟩,⟨72206895893230239816270066837252357241857420402,72206895893230239816270066837252357241857420403⟩⟩, + ⟨⟨23815920336775026194870600205566748105886608308,23815920336775026194870600205566748105886608309⟩,⟨-8616545527400685549133257604640519663841395563,-8616545527400685549133257604640519663841395562⟩⟩, + ⟨⟨666289967639447181446195669568655234757136360,666289967639447181446195669568655234757136361⟩,⟨-2968061140672550793076978448855612748781190977,-2968061140672550793076978448855612748781190976⟩⟩, + ⟨⟨-275782922962118935570188160136927747961890890,-275782922962118935570188160136927747961890889⟩,⟨-137080037411159699087036306723038485501648850,-137080037411159699087036306723038485501648849⟩⟩, + ⟨⟨-6627914130526327628294318923352393956004599,-6627914130526327628294318923352393956004598⟩,⟨26135374959027577302601438188185749922448809,26135374959027577302601438188185749922448810⟩⟩, + ⟨⟨1863697147838346117103504200875104991454736,1863697147838346117103504200875104991454737⟩,⟨-1233541150730289788006869281735953216363864,-1233541150730289788006869281735953216363863⟩⟩, + ⟨⟨-174445479869897515359026650079539993866516,-174445479869897515359026650079539993866515⟩,⟨131535868845189811287734116088814833782874,131535868845189811287734116088814833782875⟩⟩, + ⟨⟨-374311702230169120898220178019792317152,-374311702230169120898220178019792317151⟩,⟨-37889938394779744637978973213461594247687,-37889938394779744637978973213461594247686⟩⟩, + ⟨⟨19409812469607543895432125929425400345297,19409812469607543895432125929425400345298⟩,⟨-1,1⟩⟩, + ⟨⟨-374311702230169120898220178019792317152,-374311702230169120898220178019792317151⟩,⟨37889938394779744637978973213461594247686,37889938394779744637978973213461594247687⟩⟩, + ⟨⟨-174445479869897515359026650079539993866516,-174445479869897515359026650079539993866515⟩,⟨-131535868845189811287734116088814833782875,-131535868845189811287734116088814833782874⟩⟩, + ⟨⟨1863697147838346117103504200875104991454736,1863697147838346117103504200875104991454737⟩,⟨1233541150730289788006869281735953216363863,1233541150730289788006869281735953216363864⟩⟩, + ⟨⟨-6627914130526327628294318923352393956004599,-6627914130526327628294318923352393956004598⟩,⟨-26135374959027577302601438188185749922448810,-26135374959027577302601438188185749922448809⟩⟩, + ⟨⟨-275782922962118935570188160136927747961890890,-275782922962118935570188160136927747961890889⟩,⟨137080037411159699087036306723038485501648849,137080037411159699087036306723038485501648850⟩⟩, + ⟨⟨666289967639447181446195669568655234757136360,666289967639447181446195669568655234757136361⟩,⟨2968061140672550793076978448855612748781190976,2968061140672550793076978448855612748781190977⟩⟩, + ⟨⟨23815920336775026194870600205566748105886608308,23815920336775026194870600205566748105886608309⟩,⟨8616545527400685549133257604640519663841395562,8616545527400685549133257604640519663841395563⟩⟩, + ⟨⟨162939636139200596205066519283321911899344489468,162939636139200596205066519283321911899344489469⟩,⟨-72206895893230239816270066837252357241857420403,-72206895893230239816270066837252357241857420402⟩⟩, + ⟨⟨575957854352071132037674699619133200546804916197,575957854352071132037674699619133200546804916199⟩,⟨-906676690184322582605128299513519647752355973437,-906676690184322582605128299513519647752355973435⟩⟩, + ⟨⟨626157187550618852119638113825400152958954015079,626157187550618852119638113825400152958954015085⟩,⟨-5600162388895816768580840216051447860825690430849,-5600162388895816768580840216051447860825690430843⟩⟩, + ⟨⟨-6238826339063389570700646048218249502244875637338,-6238826339063389570700646048218249502244875637316⟩,⟨-25387487719207988594156430641440342019611550402939,-25387487719207988594156430641440342019611550402917⟩⟩, + ⟨⟨-53438780349072482064607508827834496594739710146846,-53438780349072482064607508827834496594739710146767⟩,⟨-94785928586578254966542955749265872773179420741496,-94785928586578254966542955749265872773179420741418⟩⟩, + ⟨⟨-272040024757759354598889937707161233517154011327387,-272040024757759354598889937707161233517154011327130⟩,⟨-308737027098572976970227603529195777358409141309912,-308737027098572976970227603529195777358409141309655⟩⟩, + ⟨⟨-1101763433135077690211545434467007740314142965160059,-1101763433135077690211545434467007740314142965159288⟩,⟨-910613456716065044951869929549760415933131836351504,-910613456716065044951869929549760415933131836350733⟩⟩, + ⟨⟨-3864389226054460290662509588191257601444515650504816,-3864389226054460290662509588191257601444515650502682⟩,⟨-2502205628749763934174749631607087842705675781128548,-2502205628749763934174749631607087842705675781126418⟩⟩] +lemma tw1_0_0_16_calc (j : Fin 31) : taylorWaveBox 1 0 0 16 j = tw1_0_0_16 j := by + revert j + decide +kernel +def tw1_0_0_17 : Fin 31 → CI := ![⟨⟨472569809377873041024966727199475224839142295390626,472569809377873041024966727199475224839142295390989⟩,⟨449724482725084656334218487964436666014561411210516,449724482725084656334218487964436666014561411210880⟩⟩, + ⟨⟨153542463477837618689638840723792673468546447627728,153542463477837618689638840723792673468546447627853⟩,⟨111576874679150007943634852235332532735166615173719,111576874679150007943634852235332532735166615173844⟩⟩, + ⟨⟨45864730662728921949921201012328372529632289195158,45864730662728921949921201012328372529632289195198⟩,⟨22276528502898251953961161348202566127995651823996,22276528502898251953961161348202566127995651824036⟩⟩, + ⟨⟨12215566345253138066536298604383086235907172827408,12215566345253138066536298604383086235907172827420⟩,⟨2756113918879312643577293509116414014008295156703,2756113918879312643577293509116414014008295156716⟩⟩, + ⟨⟨2771602507623335131559926740928041844135860936664,2771602507623335131559926740928041844135860936668⟩,⟨-209144329679208024328399373174324009264005177962,-209144329679208024328399373174324009264005177958⟩⟩, + ⟨⟨493721108904106294274962279800229666811638502196,493721108904106294274962279800229666811638502198⟩,⟨-242712434723767771995560414589877447129126427223,-242712434723767771995560414589877447129126427221⟩⟩, + ⟨⟨55911548512111950154867288469682784646525393413,55911548512111950154867288469682784646525393415⟩,⟨-77599697253565197919313655235243147850885613145,-77599697253565197919313655235243147850885613144⟩⟩, + ⟨⟨-82007720851060245360442659494602831378170784,-82007720851060245360442659494602831378170783⟩,⟨-14361872702409810146645893221065325977727381626,-14361872702409810146645893221065325977727381625⟩⟩, + ⟨⟨-1341635807672513818243584213930848156517426619,-1341635807672513818243584213930848156517426618⟩,⟨-1246457919643014311149555259735787582445227510,-1246457919643014311149555259735787582445227509⟩⟩, + ⟨⟨-185620457463863656912309635493919953610511184,-185620457463863656912309635493919953610511183⟩,⟨61428978552081897008162179945155265297861315,61428978552081897008162179945155265297861316⟩⟩, + ⟨⟨2823927440714500714887303622444697704170692,2823927440714500714887303622444697704170693⟩,⟨17199785737899215587507083886632539266330667,17199785737899215587507083886632539266330668⟩⟩, + ⟨⟨1179493423123656419523237347350783008582115,1179493423123656419523237347350783008582116⟩,⟨-620746496280708999332988801323107781297306,-620746496280708999332988801323107781297305⟩⟩, + ⟨⟨-95625057358186113824826325594943409701250,-95625057358186113824826325594943409701249⟩,⟨-10566988488800220301274235034012131569251,-10566988488800220301274235034012131569250⟩⟩, + ⟨⟨8185368816770690186624099949818813059138,8185368816770690186624099949818813059139⟩,⟨-1144919161605039615458816808295489090669,-1144919161605039615458816808295489090668⟩⟩, + ⟨⟨-335676568678495691369962795487354869114,-335676568678495691369962795487354869113⟩,⟨1256435796712030962398383673888017552389,1256435796712030962398383673888017552390⟩⟩, + ⟨⟨-641870781706048651049126297822395774259,-641870781706048651049126297822395774258⟩,⟨-1,1⟩⟩, + ⟨⟨-335676568678495691369962795487354869114,-335676568678495691369962795487354869113⟩,⟨-1256435796712030962398383673888017552390,-1256435796712030962398383673888017552389⟩⟩, + ⟨⟨8185368816770690186624099949818813059138,8185368816770690186624099949818813059139⟩,⟨1144919161605039615458816808295489090668,1144919161605039615458816808295489090669⟩⟩, + ⟨⟨-95625057358186113824826325594943409701250,-95625057358186113824826325594943409701249⟩,⟨10566988488800220301274235034012131569250,10566988488800220301274235034012131569251⟩⟩, + ⟨⟨1179493423123656419523237347350783008582115,1179493423123656419523237347350783008582116⟩,⟨620746496280708999332988801323107781297305,620746496280708999332988801323107781297306⟩⟩, + ⟨⟨2823927440714500714887303622444697704170692,2823927440714500714887303622444697704170693⟩,⟨-17199785737899215587507083886632539266330668,-17199785737899215587507083886632539266330667⟩⟩, + ⟨⟨-185620457463863656912309635493919953610511184,-185620457463863656912309635493919953610511183⟩,⟨-61428978552081897008162179945155265297861316,-61428978552081897008162179945155265297861315⟩⟩, + ⟨⟨-1341635807672513818243584213930848156517426619,-1341635807672513818243584213930848156517426618⟩,⟨1246457919643014311149555259735787582445227509,1246457919643014311149555259735787582445227510⟩⟩, + ⟨⟨-82007720851060245360442659494602831378170784,-82007720851060245360442659494602831378170783⟩,⟨14361872702409810146645893221065325977727381625,14361872702409810146645893221065325977727381626⟩⟩, + ⟨⟨55911548512111950154867288469682784646525393413,55911548512111950154867288469682784646525393415⟩,⟨77599697253565197919313655235243147850885613144,77599697253565197919313655235243147850885613145⟩⟩, + ⟨⟨493721108904106294274962279800229666811638502196,493721108904106294274962279800229666811638502198⟩,⟨242712434723767771995560414589877447129126427221,242712434723767771995560414589877447129126427223⟩⟩, + ⟨⟨2771602507623335131559926740928041844135860936664,2771602507623335131559926740928041844135860936668⟩,⟨209144329679208024328399373174324009264005177958,209144329679208024328399373174324009264005177962⟩⟩, + ⟨⟨12215566345253138066536298604383086235907172827408,12215566345253138066536298604383086235907172827420⟩,⟨-2756113918879312643577293509116414014008295156716,-2756113918879312643577293509116414014008295156703⟩⟩, + ⟨⟨45864730662728921949921201012328372529632289195158,45864730662728921949921201012328372529632289195198⟩,⟨-22276528502898251953961161348202566127995651824036,-22276528502898251953961161348202566127995651823996⟩⟩, + ⟨⟨153542463477837618689638840723792673468546447627728,153542463477837618689638840723792673468546447627853⟩,⟨-111576874679150007943634852235332532735166615173844,-111576874679150007943634852235332532735166615173719⟩⟩, + ⟨⟨472569809377873041024966727199475224839142295390626,472569809377873041024966727199475224839142295390989⟩,⟨-449724482725084656334218487964436666014561411210880,-449724482725084656334218487964436666014561411210516⟩⟩] +lemma tw1_0_0_17_calc (j : Fin 31) : taylorWaveBox 1 0 0 17 j = tw1_0_0_17 j := by + revert j + decide +kernel +def tw1_0_0_18 : Fin 31 → CI := ![⟨⟨44022578713359610512139451125656416438742029880081,44022578713359610512139451125656416438742029880140⟩,⟨-75987754704429913539060291038203663119902838803408,-75987754704429913539060291038203663119902838803349⟩⟩, + ⟨⟨8808008072893277489471552515973177077407955635553,8808008072893277489471552515973177077407955635573⟩,⟨-22264041603205136756338246484721139565107513594983,-22264041603205136756338246484721139565107513594963⟩⟩, + ⟨⟨1086308984795557855713352343298527760854996974890,1086308984795557855713352343298527760854996974897⟩,⟨-5903026426854521812226811057303494743753778578624,-5903026426854521812226811057303494743753778578617⟩⟩, + ⟨⟨-95143760229932319143130862616821668274244235442,-95143760229932319143130862616821668274244235439⟩,⟨-1365796988722944186466975166823042416120213227870,-1365796988722944186466975166823042416120213227867⟩⟩, + ⟨⟨-107148875172487903825788541554038696383360995628,-107148875172487903825788541554038696383360995627⟩,⟨-259484278333469783549163919457864318912578831526,-259484278333469783549163919457864318912578831525⟩⟩, + ⟨⟨-36691361693861273369829635217087955287327132980,-36691361693861273369829635217087955287327132979⟩,⟨-35460258666239927838607891741620189728660714758,-35460258666239927838607891741620189728660714757⟩⟩, + ⟨⟨-7851179070879614388512219271482910436448579690,-7851179070879614388512219271482910436448579689⟩,⟨-1953416363286081128744248795934886183535010271,-1953416363286081128744248795934886183535010270⟩⟩, + ⟨⟨-1000071513103754452119224763869397024160021743,-1000071513103754452119224763869397024160021742⟩,⟨456916756700454134152466223607044151150763948,456916756700454134152466223607044151150763949⟩⟩, + ⟨⟨-33993049426883479890550097557567535487082609,-33993049426883479890550097557567535487082608⟩,⟨121114498156478792582031457896016176662229378,121114498156478792582031457896016176662229379⟩⟩, + ⟨⟨9047852450856932044333368229341590636987940,9047852450856932044333368229341590636987941⟩,⟨7789216148040058187790938815998207207222273,7789216148040058187790938815998207207222274⟩⟩, + ⟨⟨661765932389566380000410723337244083243102,661765932389566380000410723337244083243103⟩,⟨-663564284369739292127496793719951772947260,-663564284369739292127496793719951772947259⟩⟩, + ⟨⟨-58723019091061780129969096524662649710930,-58723019091061780129969096524662649710929⟩,⟨-21670761153682057666920712767285846355412,-21670761153682057666920712767285846355411⟩⟩, + ⟨⟨2727506665230945274854304446876089660478,2727506665230945274854304446876089660479⟩,⟨2835429881532994306250021454864575953863,2835429881532994306250021454864575953864⟩⟩, + ⟨⟨-277133554456078773939364226084448795588,-277133554456078773939364226084448795587⟩,⟨-106892940072195215309173272837451182765,-106892940072195215309173272837451182764⟩⟩, + ⟨⟨21510061167697460218509656357494267656,21510061167697460218509656357494267657⟩,⟨-36542764013959243229710870224203778063,-36542764013959243229710870224203778062⟩⟩, + ⟨⟨20164965323616602948134547874724703537,20164965323616602948134547874724703538⟩,⟨-1,1⟩⟩, + ⟨⟨21510061167697460218509656357494267656,21510061167697460218509656357494267657⟩,⟨36542764013959243229710870224203778062,36542764013959243229710870224203778063⟩⟩, + ⟨⟨-277133554456078773939364226084448795588,-277133554456078773939364226084448795587⟩,⟨106892940072195215309173272837451182764,106892940072195215309173272837451182765⟩⟩, + ⟨⟨2727506665230945274854304446876089660478,2727506665230945274854304446876089660479⟩,⟨-2835429881532994306250021454864575953864,-2835429881532994306250021454864575953863⟩⟩, + ⟨⟨-58723019091061780129969096524662649710930,-58723019091061780129969096524662649710929⟩,⟨21670761153682057666920712767285846355411,21670761153682057666920712767285846355412⟩⟩, + ⟨⟨661765932389566380000410723337244083243102,661765932389566380000410723337244083243103⟩,⟨663564284369739292127496793719951772947259,663564284369739292127496793719951772947260⟩⟩, + ⟨⟨9047852450856932044333368229341590636987940,9047852450856932044333368229341590636987941⟩,⟨-7789216148040058187790938815998207207222274,-7789216148040058187790938815998207207222273⟩⟩, + ⟨⟨-33993049426883479890550097557567535487082609,-33993049426883479890550097557567535487082608⟩,⟨-121114498156478792582031457896016176662229379,-121114498156478792582031457896016176662229378⟩⟩, + ⟨⟨-1000071513103754452119224763869397024160021743,-1000071513103754452119224763869397024160021742⟩,⟨-456916756700454134152466223607044151150763949,-456916756700454134152466223607044151150763948⟩⟩, + ⟨⟨-7851179070879614388512219271482910436448579690,-7851179070879614388512219271482910436448579689⟩,⟨1953416363286081128744248795934886183535010270,1953416363286081128744248795934886183535010271⟩⟩, + ⟨⟨-36691361693861273369829635217087955287327132980,-36691361693861273369829635217087955287327132979⟩,⟨35460258666239927838607891741620189728660714757,35460258666239927838607891741620189728660714758⟩⟩, + ⟨⟨-107148875172487903825788541554038696383360995628,-107148875172487903825788541554038696383360995627⟩,⟨259484278333469783549163919457864318912578831525,259484278333469783549163919457864318912578831526⟩⟩, + ⟨⟨-95143760229932319143130862616821668274244235442,-95143760229932319143130862616821668274244235439⟩,⟨1365796988722944186466975166823042416120213227867,1365796988722944186466975166823042416120213227870⟩⟩, + ⟨⟨1086308984795557855713352343298527760854996974890,1086308984795557855713352343298527760854996974897⟩,⟨5903026426854521812226811057303494743753778578617,5903026426854521812226811057303494743753778578624⟩⟩, + ⟨⟨8808008072893277489471552515973177077407955635553,8808008072893277489471552515973177077407955635573⟩,⟨22264041603205136756338246484721139565107513594963,22264041603205136756338246484721139565107513594983⟩⟩, + ⟨⟨44022578713359610512139451125656416438742029880081,44022578713359610512139451125656416438742029880140⟩,⟨75987754704429913539060291038203663119902838803349,75987754704429913539060291038203663119902838803408⟩⟩] +lemma tw1_0_0_18_calc (j : Fin 31) : taylorWaveBox 1 0 0 18 j = tw1_0_0_18 j := by + revert j + decide +kernel +def tw1_0_0_19 : Fin 31 → CI := ![⟨⟨-10790270409243365807999111463818780068912298558644,-10790270409243365807999111463818780068912298558634⟩,⟨-3214587008406194466297603447818190916898724646978,-3214587008406194466297603447818190916898724646968⟩⟩, + ⟨⟨-2854073857127711446050120483045745854894381330663,-2854073857127711446050120483045745854894381330659⟩,⟨-358719709048696212629246927877756656055900766067,-358719709048696212629246927877756656055900766063⟩⟩, + ⟨⟨-670290008225840646916029294966923159628690028886,-670290008225840646916029294966923159628690028884⟩,⟨59248761384865659324744708268129671258718556496,59248761384865659324744708268129671258718556498⟩⟩, + ⟨⟨-133368473162383616015977524575175515915847068237,-133368473162383616015977524575175515915847068236⟩,⟨50353532507726446105123145328589627621431641897,50353532507726446105123145328589627621431641898⟩⟩, + ⟨⟨-20516687034875619256005384156556709965960990028,-20516687034875619256005384156556709965960990027⟩,⟨17559516822829089568982124858500260772689141650,17559516822829089568982124858500260772689141651⟩⟩, + ⟨⟨-1849331631616470024127474103498051417752051772,-1849331631616470024127474103498051417752051771⟩,⟨4110421165897663102094441620260383954639021430,4110421165897663102094441620260383954639021431⟩⟩, + ⟨⟨88791526193706925760990952342070633866419197,88791526193706925760990952342070633866419198⟩,⟨645712902133666485953919274991065487853262810,645712902133666485953919274991065487853262811⟩⟩, + ⟨⟨60301886127751413263804148987164862575740735,60301886127751413263804148987164862575740736⟩,⟨52822570833072674929839434160002734541732868,52822570833072674929839434160002734541732869⟩⟩, + ⟨⟨8063225542938256764746292907200417848098289,8063225542938256764746292907200417848098290⟩,⟨-1646101859993404470003005480822708204544267,-1646101859993404470003005480822708204544266⟩⟩, + ⟨⟨117710224661582668124792656897236383216266,117710224661582668124792656897236383216267⟩,⟨-684237989319363872451076142342036727709135,-684237989319363872451076142342036727709134⟩⟩, + ⟨⟨-47374708398228911861584392572115767119224,-47374708398228911861584392572115767119223⟩,⟨-7646189699728461910581706386535184719050,-7646189699728461910581706386535184719049⟩⟩, + ⟨⟨1036557892038909574175544023261016832620,1036557892038909574175544023261016832621⟩,⟨2600597238173426753714541586036396985398,2600597238173426753714541586036396985399⟩⟩, + ⟨⟨-10910255531230533281125633282474779727,-10910255531230533281125633282474779726⟩,⟨-152841537498558511166548767350298450527,-152841537498558511166548767350298450526⟩⟩, + ⟨⟨6515022510502522009781048883590838693,6515022510502522009781048883590838694⟩,⟨7804794043359812192012242539338179820,7804794043359812192012242539338179821⟩⟩, + ⟨⟨-947289786989045960866531187503637016,-947289786989045960866531187503637015⟩,⟨914584852228904583551831317111851357,914584852228904583551831317111851358⟩⟩, + ⟨⟨-603334351624446165832194072029374810,-603334351624446165832194072029374809⟩,⟨-1,1⟩⟩, + ⟨⟨-947289786989045960866531187503637016,-947289786989045960866531187503637015⟩,⟨-914584852228904583551831317111851358,-914584852228904583551831317111851357⟩⟩, + ⟨⟨6515022510502522009781048883590838693,6515022510502522009781048883590838694⟩,⟨-7804794043359812192012242539338179821,-7804794043359812192012242539338179820⟩⟩, + ⟨⟨-10910255531230533281125633282474779727,-10910255531230533281125633282474779726⟩,⟨152841537498558511166548767350298450526,152841537498558511166548767350298450527⟩⟩, + ⟨⟨1036557892038909574175544023261016832620,1036557892038909574175544023261016832621⟩,⟨-2600597238173426753714541586036396985399,-2600597238173426753714541586036396985398⟩⟩, + ⟨⟨-47374708398228911861584392572115767119224,-47374708398228911861584392572115767119223⟩,⟨7646189699728461910581706386535184719049,7646189699728461910581706386535184719050⟩⟩, + ⟨⟨117710224661582668124792656897236383216266,117710224661582668124792656897236383216267⟩,⟨684237989319363872451076142342036727709134,684237989319363872451076142342036727709135⟩⟩, + ⟨⟨8063225542938256764746292907200417848098289,8063225542938256764746292907200417848098290⟩,⟨1646101859993404470003005480822708204544266,1646101859993404470003005480822708204544267⟩⟩, + ⟨⟨60301886127751413263804148987164862575740735,60301886127751413263804148987164862575740736⟩,⟨-52822570833072674929839434160002734541732869,-52822570833072674929839434160002734541732868⟩⟩, + ⟨⟨88791526193706925760990952342070633866419197,88791526193706925760990952342070633866419198⟩,⟨-645712902133666485953919274991065487853262811,-645712902133666485953919274991065487853262810⟩⟩, + ⟨⟨-1849331631616470024127474103498051417752051772,-1849331631616470024127474103498051417752051771⟩,⟨-4110421165897663102094441620260383954639021431,-4110421165897663102094441620260383954639021430⟩⟩, + ⟨⟨-20516687034875619256005384156556709965960990028,-20516687034875619256005384156556709965960990027⟩,⟨-17559516822829089568982124858500260772689141651,-17559516822829089568982124858500260772689141650⟩⟩, + ⟨⟨-133368473162383616015977524575175515915847068237,-133368473162383616015977524575175515915847068236⟩,⟨-50353532507726446105123145328589627621431641898,-50353532507726446105123145328589627621431641897⟩⟩, + ⟨⟨-670290008225840646916029294966923159628690028886,-670290008225840646916029294966923159628690028884⟩,⟨-59248761384865659324744708268129671258718556498,-59248761384865659324744708268129671258718556496⟩⟩, + ⟨⟨-2854073857127711446050120483045745854894381330663,-2854073857127711446050120483045745854894381330659⟩,⟨358719709048696212629246927877756656055900766063,358719709048696212629246927877756656055900766067⟩⟩, + ⟨⟨-10790270409243365807999111463818780068912298558644,-10790270409243365807999111463818780068912298558634⟩,⟨3214587008406194466297603447818190916898724646968,3214587008406194466297603447818190916898724646978⟩⟩] +lemma tw1_0_0_19_calc (j : Fin 31) : taylorWaveBox 1 0 0 19 j = tw1_0_0_19 j := by + revert j + decide +kernel +def tw1_0_0_20 : Fin 31 → CI := ![⟨⟨-74365557213325071796516308439728102559377312031,-74365557213325071796516308439728102559377312028⟩,⟨1375847566329942113243974514533417078712487273807,1375847566329942113243974514533417078712487273809⟩⟩, + ⟨⟨41670449564254653869915874940381407374917151741,41670449564254653869915874940381407374917151742⟩,⟨327236739400238271474036423265038215241887521169,327236739400238271474036423265038215241887521170⟩⟩, + ⟨⟨25253945837711733674904284842185275723343490753,25253945837711733674904284842185275723343490754⟩,⟨67436940526304800096988737142135583902125167653,67436940526304800096988737142135583902125167654⟩⟩, + ⟨⟨8602639771539327337727571429593443817641607353,8602639771539327337727571429593443817641607354⟩,⟨11258555429238224096715215262248665941257398526,11258555429238224096715215262248665941257398527⟩⟩, + ⟨⟨2118312129586381653978266034003881490916446816,2118312129586381653978266034003881490916446817⟩,⟨1288920074061004347244809429970249505542499541,1288920074061004347244809429970249505542499542⟩⟩, + ⟨⟨378909437838424274100602405085972667149212505,378909437838424274100602405085972667149212506⟩,⟨29319945714082202403332133796080247815099751,29319945714082202403332133796080247815099752⟩⟩, + ⟨⟨43567913343518218410376784093825354322233143,43567913343518218410376784093825354322233144⟩,⟨-24781217505901910876010174276586656935320229,-24781217505901910876010174276586656935320228⟩⟩, + ⟨⟨1630246815504225318770090816762092754428226,1630246815504225318770090816762092754428227⟩,⟨-5335759851906273213438716033519357234008652,-5335759851906273213438716033519357234008651⟩⟩, + ⟨⟨-321698492526937007102245937280339300857400,-321698492526937007102245937280339300857399⟩,⟨-400764185535429317781570846727725025162154,-400764185535429317781570846727725025162153⟩⟩, + ⟨⟨-35931448284580367903144678089587559243683,-35931448284580367903144678089587559243682⟩,⟨13938797686097375076047773082190755782397,13938797686097375076047773082190755782398⟩⟩, + ⟨⟨1049720359061364278695324488549621092411,1049720359061364278695324488549621092412⟩,⟨2097567039263152350720200742816921915381,2097567039263152350720200742816921915382⟩⟩, + ⟨⟨52921401874813929155734924387155652272,52921401874813929155734924387155652273⟩,⟨-107166243628306558697668561301969198275,-107166243628306558697668561301969198274⟩⟩, + ⟨⟨-3326023916803021376722436372403915194,-3326023916803021376722436372403915193⟩,⟨4624807577790224522126322893904973118,4624807577790224522126322893904973119⟩⟩, + ⟨⟨-62232831884544314666630377244508110,-62232831884544314666630377244508109⟩,⟨-326275845403474092015555326634657186,-326275845403474092015555326634657185⟩⟩, + ⟨⟨34310222578531237605797824868071423,34310222578531237605797824868071424⟩,⟨-18605334228846396210609699900411693,-18605334228846396210609699900411692⟩⟩, + ⟨⟨17231188788379283735388925794043367,17231188788379283735388925794043368⟩,⟨-1,1⟩⟩, + ⟨⟨34310222578531237605797824868071423,34310222578531237605797824868071424⟩,⟨18605334228846396210609699900411692,18605334228846396210609699900411693⟩⟩, + ⟨⟨-62232831884544314666630377244508110,-62232831884544314666630377244508109⟩,⟨326275845403474092015555326634657185,326275845403474092015555326634657186⟩⟩, + ⟨⟨-3326023916803021376722436372403915194,-3326023916803021376722436372403915193⟩,⟨-4624807577790224522126322893904973119,-4624807577790224522126322893904973118⟩⟩, + ⟨⟨52921401874813929155734924387155652272,52921401874813929155734924387155652273⟩,⟨107166243628306558697668561301969198274,107166243628306558697668561301969198275⟩⟩, + ⟨⟨1049720359061364278695324488549621092411,1049720359061364278695324488549621092412⟩,⟨-2097567039263152350720200742816921915382,-2097567039263152350720200742816921915381⟩⟩, + ⟨⟨-35931448284580367903144678089587559243683,-35931448284580367903144678089587559243682⟩,⟨-13938797686097375076047773082190755782398,-13938797686097375076047773082190755782397⟩⟩, + ⟨⟨-321698492526937007102245937280339300857400,-321698492526937007102245937280339300857399⟩,⟨400764185535429317781570846727725025162153,400764185535429317781570846727725025162154⟩⟩, + ⟨⟨1630246815504225318770090816762092754428226,1630246815504225318770090816762092754428227⟩,⟨5335759851906273213438716033519357234008651,5335759851906273213438716033519357234008652⟩⟩, + ⟨⟨43567913343518218410376784093825354322233143,43567913343518218410376784093825354322233144⟩,⟨24781217505901910876010174276586656935320228,24781217505901910876010174276586656935320229⟩⟩, + ⟨⟨378909437838424274100602405085972667149212505,378909437838424274100602405085972667149212506⟩,⟨-29319945714082202403332133796080247815099752,-29319945714082202403332133796080247815099751⟩⟩, + ⟨⟨2118312129586381653978266034003881490916446816,2118312129586381653978266034003881490916446817⟩,⟨-1288920074061004347244809429970249505542499542,-1288920074061004347244809429970249505542499541⟩⟩, + ⟨⟨8602639771539327337727571429593443817641607353,8602639771539327337727571429593443817641607354⟩,⟨-11258555429238224096715215262248665941257398527,-11258555429238224096715215262248665941257398526⟩⟩, + ⟨⟨25253945837711733674904284842185275723343490753,25253945837711733674904284842185275723343490754⟩,⟨-67436940526304800096988737142135583902125167654,-67436940526304800096988737142135583902125167653⟩⟩, + ⟨⟨41670449564254653869915874940381407374917151741,41670449564254653869915874940381407374917151742⟩,⟨-327236739400238271474036423265038215241887521170,-327236739400238271474036423265038215241887521169⟩⟩, + ⟨⟨-74365557213325071796516308439728102559377312031,-74365557213325071796516308439728102559377312028⟩,⟨-1375847566329942113243974514533417078712487273809,-1375847566329942113243974514533417078712487273807⟩⟩] +lemma tw1_0_0_20_calc (j : Fin 31) : taylorWaveBox 1 0 0 20 j = tw1_0_0_20 j := by + revert j + decide +kernel +def tw1_0_0 : Fin 21 → Fin 31 → CI := ![tw1_0_0_0,tw1_0_0_1,tw1_0_0_2,tw1_0_0_3,tw1_0_0_4,tw1_0_0_5,tw1_0_0_6,tw1_0_0_7,tw1_0_0_8,tw1_0_0_9,tw1_0_0_10,tw1_0_0_11,tw1_0_0_12,tw1_0_0_13,tw1_0_0_14,tw1_0_0_15,tw1_0_0_16,tw1_0_0_17,tw1_0_0_18,tw1_0_0_19,tw1_0_0_20] +lemma tw1_0_0_mem (l : Fin 21) (j : Fin 31) : (tw1_0_0 l j).Mem (taylorWave 1 0 (nearNode 0) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 0 l j = tw1_0_0 l j := by + fin_cases l + · exact tw1_0_0_0_calc j + · exact tw1_0_0_1_calc j + · exact tw1_0_0_2_calc j + · exact tw1_0_0_3_calc j + · exact tw1_0_0_4_calc j + · exact tw1_0_0_5_calc j + · exact tw1_0_0_6_calc j + · exact tw1_0_0_7_calc j + · exact tw1_0_0_8_calc j + · exact tw1_0_0_9_calc j + · exact tw1_0_0_10_calc j + · exact tw1_0_0_11_calc j + · exact tw1_0_0_12_calc j + · exact tw1_0_0_13_calc j + · exact tw1_0_0_14_calc j + · exact tw1_0_0_15_calc j + · exact tw1_0_0_16_calc j + · exact tw1_0_0_17_calc j + · exact tw1_0_0_18_calc j + · exact tw1_0_0_19_calc j + · exact tw1_0_0_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 0 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave101.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave101.lean new file mode 100644 index 0000000000000000000000000000000000000000..e30fea3184af8a773d150590245363bd0b9881f7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave101.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_1_0 : Fin 31 → CI := ![⟨⟨249759883245190768061000639129187806113912260229687299960675,249759883245190768061000639129187806113912260229749656486677⟩,⟨490361904104724541293097921490305392670314404250984299245586,490361904104724541293097921490305392670314404251048569096614⟩⟩, + ⟨⟨-9769864981051332109622399429926618657330970414829653195766,-9769864981051332109622399429926618657330970414781758836808⟩,⟨483140351254624954217980073418192478559114522258121894491442,483140351254624954217980073418192478559114522258170413585594⟩⟩, + ⟨⟨-204281855399810616075421860913552438174268326217524300141673,-204281855399810616075421860913552438174268326217491489384764⟩,⟨367887006301229543693132308015049450045833103090091347364386,367887006301229543693132308015049450045833103090123720795133⟩⟩, + ⟨⟨-303041991670831465247347442143414538084880209078736360847538,-303041991670831465247347442143414538084880209078716911416498⟩,⟨199807906596152614448800511303350244891129808183765884841078,199807906596152614448800511303350244891129808183784295458529⟩⟩, + ⟨⟨-307957138113042969390608794815354212163486735585486202552935,-307957138113042969390608794815354212163486735585465701975606⟩,⟨33692635953992455956987823770344557670806212697835255257095,33692635953992455956987823770344557670806212697855442711526⟩⟩, + ⟨⟨-244842918406146153052408771795862088964695446049621274513011,-244842918406146153052408771795862088964695446049602810970438⟩,⟨-91067196892631817501952407311745291864161916442766405218901,-91067196892631817501952407311745291864161916442747728662237⟩⟩, + ⟨⟨-149855929947114460836600383477512683668347356137838737270680,-149855929947114460836600383477512683668347356137824256785858⟩,⟨-157348726444470183878430402651388317851764723944730914775175,-157348726444470183878430402651388317851764723944716004984738⟩⟩, + ⟨⟨-56341813285270346685181327043183416822784040791358421005546,-56341813285270346685181327043183416822784040791347439621637⟩,⟨-168823658927556082488342607738096622356075723468738830884004,-168823658927556082488342607738096622356075723468727748080440⟩⟩, + ⟨⟨13902272341548116853588045235518822142272281223930348195549,13902272341548116853588045235518822142272281223937566854345⟩,⟨-142612154114828659750101955504107045059717144028263289233791,-142612154114828659750101955504107045059717144028256139401446⟩⟩, + ⟨⟨53282108425640697186346803014226731970967948849004938543862,53282108425640697186346803014226731970967948849008872283241⟩,⟨-99903953298076307224400255651675122445564904091889674590769,-99903953298076307224400255651675122445564904091885825652497⟩⟩, + ⟨⟨65739913698164293511181512186419709136881485907916650377968,65739913698164293511181512186419709136881485907919732266600⟩,⟨-58177667012782340074958110388589958798602513865718621699423,-58177667012782340074958110388589958798602513865715543032039⟩⟩, + ⟨⟨61194713427277063786211859139784318330898197026049623448383,61194713427277063786211859139784318330898197026051562953662⟩,⟨-27212918253440485869671225315126970991400579438962430715115,-27212918253440485869671225315126970991400579438960487512373⟩⟩, + ⟨⟨49951976649038153612200127825837561222782452045943315516204,49951976649038153612200127825837561222782452045944485867422⟩,⟨-9157862385656994828903356768070219557510116208423615091763,-9157862385656994828903356768070219557510116208422439440476⟩⟩, + ⟨⟨39200197136528436126318173806564183598261631920937427732000,39200197136528436126318173806564183598261631920938271337713⟩,⟨-1294097575132397540874491839676527494095977096969748556383,-1294097575132397540874491839676527494095977096968884612107⟩⟩, + ⟨⟨32278374892333990667825404340192087536856665545928953975725,32278374892333990667825404340192087536856665545929463237638⟩,⟨590596343491365160738482702893908778238605042984500077720,590596343491365160738482702893908778238605042984947493221⟩⟩, + ⟨⟨29971185989422892167320076695502536733669471227566152511212,29971185989422892167320076695502536733669471227566523807702⟩,⟨-1869,2024⟩⟩, + ⟨⟨32278374892333990667825404340192087536856665545928953975768,32278374892333990667825404340192087536856665545929463237606⟩,⟨-590596343491365160738482702893908778238605042984947493009,-590596343491365160738482702893908778238605042984500077596⟩⟩, + ⟨⟨39200197136528436126318173806564183598261631920937427731879,39200197136528436126318173806564183598261631920938271337822⟩,⟨1294097575132397540874491839676527494095977096968884612276,1294097575132397540874491839676527494095977096969748556773⟩⟩, + ⟨⟨49951976649038153612200127825837561222782452045943315516029,49951976649038153612200127825837561222782452045944485867501⟩,⟨9157862385656994828903356768070219557510116208422439440636,9157862385656994828903356768070219557510116208423615092178⟩⟩, + ⟨⟨61194713427277063786211859139784318330898197026049623448193,61194713427277063786211859139784318330898197026051562953520⟩,⟨27212918253440485869671225315126970991400579438960487512695,27212918253440485869671225315126970991400579438962430715492⟩⟩, + ⟨⟨65739913698164293511181512186419709136881485907916650377606,65739913698164293511181512186419709136881485907919732266250⟩,⟨58177667012782340074958110388589958798602513865715543032443,58177667012782340074958110388589958798602513865718621699839⟩⟩, + ⟨⟨53282108425640697186346803014226731970967948849004938543128,53282108425640697186346803014226731970967948849008872282935⟩,⟨99903953298076307224400255651675122445564904091885825652570,99903953298076307224400255651675122445564904091889674591268⟩⟩, + ⟨⟨13902272341548116853588045235518822142272281223930348194655,13902272341548116853588045235518822142272281223937566853468⟩,⟨142612154114828659750101955504107045059717144028256139401528,142612154114828659750101955504107045059717144028263289233889⟩⟩, + ⟨⟨-56341813285270346685181327043183416822784040791358421006140,-56341813285270346685181327043183416822784040791347439623161⟩,⟨168823658927556082488342607738096622356075723468727748080563,168823658927556082488342607738096622356075723468738830883199⟩⟩, + ⟨⟨-149855929947114460836600383477512683668347356137838737271337,-149855929947114460836600383477512683668347356137824256787048⟩,⟨157348726444470183878430402651388317851764723944716004984163,157348726444470183878430402651388317851764723944730914774067⟩⟩, + ⟨⟨-244842918406146153052408771795862088964695446049621274513067,-244842918406146153052408771795862088964695446049602810971872⟩,⟨91067196892631817501952407311745291864161916442747728660897,91067196892631817501952407311745291864161916442766405216185⟩⟩, + ⟨⟨-307957138113042969390608794815354212163486735585486202553487,-307957138113042969390608794815354212163486735585465701974712⟩,⟨-33692635953992455956987823770344557670806212697855442714082,-33692635953992455956987823770344557670806212697835255258207⟩⟩, + ⟨⟨-303041991670831465247347442143414538084880209078736360847420,-303041991670831465247347442143414538084880209078716911414393⟩,⟨-199807906596152614448800511303350244891129808183784295461218,-199807906596152614448800511303350244891129808183765884841780⟩⟩, + ⟨⟨-204281855399810616075421860913552438174268326217524300140527,-204281855399810616075421860913552438174268326217491489382459⟩,⟨-367887006301229543693132308015049450045833103090123720796741,-367887006301229543693132308015049450045833103090091347364831⟩⟩, + ⟨⟨-9769864981051332109622399429926618657330970414829653194364,-9769864981051332109622399429926618657330970414781758833962⟩,⟨-483140351254624954217980073418192478559114522258170413586318,-483140351254624954217980073418192478559114522258121894490718⟩⟩, + ⟨⟨249759883245190768061000639129187806113912260229687299963675,249759883245190768061000639129187806113912260229749656488445⟩,⟨-490361904104724541293097921490305392670314404251048569094590,-490361904104724541293097921490305392670314404250984299244792⟩⟩] +lemma tw1_0_1_0_calc (j : Fin 31) : taylorWaveBox 1 0 1 0 j = tw1_0_1_0 j := by + revert j + decide +kernel +def tw1_0_1_1 : Fin 31 → CI := ![⟨⟨375611900024504639938767042973827979553676939956434194852623,375611900024504639938767042973827979553676939956496279832805⟩,⟨-320657772136973632269582634597541038792670897909478525633750,-320657772136973632269582634597541038792670897909418217556380⟩⟩, + ⟨⟨395557723406374707220041799432568704475442795037668935363721,395557723406374707220041799432568704475442795037713294316376⟩,⟨-93231250678538305746904186784459708998031635203773557448281,-93231250678538305746904186784459708998031635203729689056201⟩⟩, + ⟨⟨321021071607051038595790867287119122662334298340774166104787,321021071607051038595790867287119122662334298340801992711035⟩,⟨77450201325279298333671705456843766983370225337938532863283,77450201325279298333671705456843766983370225337966715013730⟩⟩, + ⟨⟨202961199982293261534417719777888944619178317110704053510205,202961199982293261534417719777888944619178317110718773487848⟩,⟨169715550958847744467497062357226723450172017744344913229139,169715550958847744467497062357226723450172017744360301453225⟩⟩, + ⟨⟨86060131320441140552248317976108916411142334241634704483654,86060131320441140552248317976108916411142334241649485646986⟩,⟨190021851380479765345993449356472661135332978013876576244867,190021851380479765345993449356472661135332978013891504921599⟩⟩, + ⟨⟨-1700966628063546790105001512573016850481730403131044788447,-1700966628063546790105001512573016850481730403118833070243⟩,⟨161516904995363069169758402350082946889001434509804675410476,161516904995363069169758402350082946889001434509816777266093⟩⟩, + ⟨⟨-51001847933694827318571463088515907475180118346123917931076,-51001847933694827318571463088515907475180118346115480126301⟩,⟨111419421639764084295956119362603982484239643156133909139540,111419421639764084295956119362603982484239643156142204581182⟩⟩, + ⟨⟨-66773896980865065165384824897041287710265774871053218621319,-66773896980865065165384824897041287710265774871047549074580⟩,⟨61581015065846626669152824046229427313056356397593092841638,61581015065846626669152824046229427313056356397598751643476⟩⟩, + ⟨⟨-60989556772618732087337645970922209716920788759043127243069,-60989556772618732087337645970922209716920788759039915294946⟩,⟨24207009775041760642642388347989386669169481172972436858810,24207009775041760642642388347989386669169481172975664371114⟩⟩, + ⟨⟨-46032437109386100554197833351686152387854876045729193809730,-46032437109386100554197833351686152387854876045727660061266⟩,⟨2324870561080106088595850169277078403427013941702655583798,2324870561080106088595850169277078403427013941704180451911⟩⟩, + ⟨⟨-30691732669817761387910752663307546719837829523348830577763,-30691732669817761387910752663307546719837829523347505700182⟩,⟨-6938263647474794420464634668507010410486914574947698184544,-6938263647474794420464634668507010410486914574946380448760⟩⟩, + ⟨⟨-19149324444092436222321755510611017365337680424587991376078,-19149324444092436222321755510611017365337680424587123370024⟩,⟨-8541196183755030058235550481150606130028233236746021491538,-8541196183755030058235550481150606130028233236745152112071⟩⟩, + ⟨⟨-12060266035603050334590972753124844217777634822586890911080,-12060266035603050334590972753124844217777634822586457528969⟩,⟨-6800246391159310309142861745135454330024015779482827710464,-6800246391159310309142861745135454330024015779482398676026⟩⟩, + ⟨⟨-8360645179746859146518412714897744553757873908669234671676,-8360645179746859146518412714897744553757873908668997770498⟩,⟨-4290114887417541998815151495829579647550881470633985847223,-4290114887417541998815151495829579647550881470633744386566⟩⟩, + ⟨⟨-6726007526291034207840931787718168887740359908812058249925,-6726007526291034207840931787718168887740359908811912658865⟩,⟨-2001573939144292206684391361059449027777138385958845515277,-2001573939144292206684391361059449027777138385958706745593⟩⟩, + ⟨⟨-6277150514916286439208795457048111689252937642599379557940,-6277150514916286439208795457048111689252937642599281812993⟩,⟨-424,392⟩⟩, + ⟨⟨-6726007526291034207840931787718168887740359908812058249926,-6726007526291034207840931787718168887740359908811912658885⟩,⟨2001573939144292206684391361059449027777138385958706745568,2001573939144292206684391361059449027777138385958845515233⟩⟩, + ⟨⟨-8360645179746859146518412714897744553757873908669234671730,-8360645179746859146518412714897744553757873908668997770507⟩,⟨4290114887417541998815151495829579647550881470633744386488,4290114887417541998815151495829579647550881470633985847183⟩⟩, + ⟨⟨-12060266035603050334590972753124844217777634822586890911160,-12060266035603050334590972753124844217777634822586457528969⟩,⟨6800246391159310309142861745135454330024015779482398675917,6800246391159310309142861745135454330024015779482827710437⟩⟩, + ⟨⟨-19149324444092436222321755510611017365337680424587991376135,-19149324444092436222321755510611017365337680424587123370061⟩,⟨8541196183755030058235550481150606130028233236745152111950,8541196183755030058235550481150606130028233236746021491437⟩⟩, + ⟨⟨-30691732669817761387910752663307546719837829523348830577810,-30691732669817761387910752663307546719837829523347505700225⟩,⟨6938263647474794420464634668507010410486914574946380448569,6938263647474794420464634668507010410486914574947698184357⟩⟩, + ⟨⟨-46032437109386100554197833351686152387854876045729193809788,-46032437109386100554197833351686152387854876045727660061189⟩,⟨-2324870561080106088595850169277078403427013941704180452219,-2324870561080106088595850169277078403427013941702655583972⟩⟩, + ⟨⟨-60989556772618732087337645970922209716920788759043127242923,-60989556772618732087337645970922209716920788759039915294794⟩,⟨-24207009775041760642642388347989386669169481172975664371496,-24207009775041760642642388347989386669169481172972436859186⟩⟩, + ⟨⟨-66773896980865065165384824897041287710265774871053218620728,-66773896980865065165384824897041287710265774871047549074409⟩,⟨-61581015065846626669152824046229427313056356397598751643686,-61581015065846626669152824046229427313056356397593092842270⟩⟩, + ⟨⟨-51001847933694827318571463088515907475180118346123917930301,-51001847933694827318571463088515907475180118346115480125808⟩,⟨-111419421639764084295956119362603982484239643156142204581348,-111419421639764084295956119362603982484239643156133909139989⟩⟩, + ⟨⟨-1700966628063546790105001512573016850481730403131044786695,-1700966628063546790105001512573016850481730403118833069322⟩,⟨-161516904995363069169758402350082946889001434509816777265687,-161516904995363069169758402350082946889001434509804675410898⟩⟩, + ⟨⟨86060131320441140552248317976108916411142334241634704484307,86060131320441140552248317976108916411142334241649485648611⟩,⟨-190021851380479765345993449356472661135332978013891504921591,-190021851380479765345993449356472661135332978013876576243888⟩⟩, + ⟨⟨202961199982293261534417719777888944619178317110704053510419,202961199982293261534417719777888944619178317110718773489536⟩,⟨-169715550958847744467497062357226723450172017744360301452830,-169715550958847744467497062357226723450172017744344913227271⟩⟩, + ⟨⟨321021071607051038595790867287119122662334298340774166104733,321021071607051038595790867287119122662334298340801992711920⟩,⟨-77450201325279298333671705456843766983370225337966715012680,-77450201325279298333671705456843766983370225337938532861293⟩⟩, + ⟨⟨395557723406374707220041799432568704475442795037668935362644,395557723406374707220041799432568704475442795037713294316565⟩,⟨93231250678538305746904186784459708998031635203729689057298,93231250678538305746904186784459708998031635203773557450644⟩⟩, + ⟨⟨375611900024504639938767042973827979553676939956434194851474,375611900024504639938767042973827979553676939956496279830498⟩,⟨320657772136973632269582634597541038792670897909418217558745,320657772136973632269582634597541038792670897909478525634957⟩⟩] +lemma tw1_0_1_1_calc (j : Fin 31) : taylorWaveBox 1 0 1 1 j = tw1_0_1_1 j := by + revert j + decide +kernel +def tw1_0_1_2 : Fin 31 → CI := ![⟨⟨-268871000382141520006606376933490592645302789845196729616652,-268871000382141520006606376933490592645302789845154920842400⟩,⟨-195468608628127282007972034431605366590333441057782330085897,-195468608628127282007972034431605366590333441057739550436012⟩⟩, + ⟨⟨-119085792049452691758272074130168250347347833088221057327957,-119085792049452691758272074130168250347347833088192338403650⟩,⟨-226987732318865539680582570822452240985240338202063953718408,-226987732318865539680582570822452240985240338202035022240578⟩⟩, + ⟨⟨-6493638878007241075368301811927565737510262423554141619662,-6493638878007241075368301811927565737510262423536925427660⟩,⟨-194259275879391958687246534108058507405759265379287852972898,-194259275879391958687246534108058507405759265379270797228867⟩⟩, + ⟨⟨56981783940636308099645702339588883493951889497008714191883,56981783940636308099645702339588883493951889497017294794731⟩,⟨-132929092209303243847069230837066995888475674707839946188237,-132929092209303243847069230837066995888475674707831571723911⟩⟩, + ⟨⟨77685647510265825317787181708673068037409857015457958400915,77685647510265825317787181708673068037409857015465593593322⟩,⟨-71154460387533147545285382969162829959933550487306911136601,-71154460387533147545285382969162829959933550487299291112570⟩⟩, + ⟨⟨70742231958135346990744639601190487140946488608780556168527,70742231958135346990744639601190487140946488608786060281288⟩,⟨-24628829405043292999940814713657930620953210029011913944295,-24628829405043292999940814713657930620953210029006387948797⟩⟩, + ⟨⟨51765656100738282459675998547127051283492931016030624634729,51765656100738282459675998547127051283492931016033831199261⟩,⟨2526657023964606643865138024324058455503821632923849055121,2526657023964606643865138024324058455503821632927043849996⟩⟩, + ⟨⟨31984648602717494815113491753577730172644084750998307890608,31984648602717494815113491753577730172644084751000580231638⟩,⟨13635363907498622256732047624719567667309838002199298228989,13635363907498622256732047624719567667309838002201555666405⟩⟩, + ⟨⟨16973827571274116992115084305535927854497912209389572797673,16973827571274116992115084305535927854497912209390957434137⟩,⟨14825771859016185669291283026769433806328006424321958348174,14825771859016185669291283026769433806328006424323349104534⟩⟩, + ⟨⟨7839408002087114380724595664750104885730616713538702979762,7839408002087114380724595664750104885730616713539352744549⟩,⟨11686074040378307151390701612049845792393465908380847651700,11686074040378307151390701612049845792393465908381512915623⟩⟩, + ⟨⟨3307351781323737553473057176176156158954471401938863027935,3307351781323737553473057176176156158954471401939328520175⟩,⟨7785757258056667025785182422529479778599500320220779729209,7785757258056667025785182422529479778599500320221246743193⟩⟩, + ⟨⟨1517248895085413551674699805140406399878848886637790904472,1517248895085413551674699805140406399878848886638028762232⟩,⟨4683835570008157282969332985765652064087059600823678221987,4683835570008157282969332985765652064087059600823915776944⟩⟩, + ⟨⟨1004271987845010770822638419785533622783813476501452326959,1004271987845010770822638419785533622783813476501559755084⟩,⟨2646865337661206417948453835177175358837035670264146441459,2646865337661206417948453835177175358837035670264253317427⟩⟩, + ⟨⟨938903923426872653435754106374106194897260389683683974909,938903923426872653435754106374106194897260389683746360502⟩,⟨1403493600556236783390283749953334365304916561104750762251,1403493600556236783390283749953334365304916561104812816538⟩⟩, + ⟨⟨969183652978827276746291538277467234309564360611922947233,969183652978827276746291538277467234309564360611953003595⟩,⟨607883941260868657949482062966073513639623011056929765374,607883941260868657949482062966073513639623011056960110826⟩⟩, + ⟨⟨986012497156919665898590448516705738733198686019652297239,986012497156919665898590448516705738733198686019670789555⟩,⟨-62,67⟩⟩, + ⟨⟨969183652978827276746291538277467234309564360611922947238,969183652978827276746291538277467234309564360611953003597⟩,⟨-607883941260868657949482062966073513639623011056960110820,-607883941260868657949482062966073513639623011056929765370⟩⟩, + ⟨⟨938903923426872653435754106374106194897260389683683974914,938903923426872653435754106374106194897260389683746360517⟩,⟨-1403493600556236783390283749953334365304916561104812816536,-1403493600556236783390283749953334365304916561104750762240⟩⟩, + ⟨⟨1004271987845010770822638419785533622783813476501452326967,1004271987845010770822638419785533622783813476501559755107⟩,⟨-2646865337661206417948453835177175358837035670264253317429,-2646865337661206417948453835177175358837035670264146441445⟩⟩, + ⟨⟨1517248895085413551674699805140406399878848886637790904496,1517248895085413551674699805140406399878848886638028762261⟩,⟨-4683835570008157282969332985765652064087059600823915776936,-4683835570008157282969332985765652064087059600823678221975⟩⟩, + ⟨⟨3307351781323737553473057176176156158954471401938863027983,3307351781323737553473057176176156158954471401939328520224⟩,⟨-7785757258056667025785182422529479778599500320221246743173,-7785757258056667025785182422529479778599500320220779729188⟩⟩, + ⟨⟨7839408002087114380724595664750104885730616713538702979797,7839408002087114380724595664750104885730616713539352744638⟩,⟨-11686074040378307151390701612049845792393465908381512915610,-11686074040378307151390701612049845792393465908380847651632⟩⟩, + ⟨⟨16973827571274116992115084305535927854497912209389572797765,16973827571274116992115084305535927854497912209390957434231⟩,⟨-14825771859016185669291283026769433806328006424323349104431,-14825771859016185669291283026769433806328006424321958348068⟩⟩, + ⟨⟨31984648602717494815113491753577730172644084750998307890767,31984648602717494815113491753577730172644084751000580231653⟩,⟨-13635363907498622256732047624719567667309838002201555666135,-13635363907498622256732047624719567667309838002199298228861⟩⟩, + ⟨⟨51765656100738282459675998547127051283492931016030624634798,51765656100738282459675998547127051283492931016033831199236⟩,⟨-2526657023964606643865138024324058455503821632927043849652,-2526657023964606643865138024324058455503821632923849054871⟩⟩, + ⟨⟨70742231958135346990744639601190487140946488608780556168484,70742231958135346990744639601190487140946488608786060280918⟩,⟨24628829405043292999940814713657930620953210029006387949546,24628829405043292999940814713657930620953210029011913944715⟩⟩, + ⟨⟨77685647510265825317787181708673068037409857015457958400278,77685647510265825317787181708673068037409857015465593593127⟩,⟨71154460387533147545285382969162829959933550487299291112818,71154460387533147545285382969162829959933550487306911137291⟩⟩, + ⟨⟨56981783940636308099645702339588883493951889497008714190766,56981783940636308099645702339588883493951889497017294794365⟩,⟨132929092209303243847069230837066995888475674707831571723856,132929092209303243847069230837066995888475674707839946188932⟩⟩, + ⟨⟨-6493638878007241075368301811927565737510262423554141620854,-6493638878007241075368301811927565737510262423536925428322⟩,⟨194259275879391958687246534108058507405759265379270797228600,194259275879391958687246534108058507405759265379287852973159⟩⟩, + ⟨⟨-119085792049452691758272074130168250347347833088221057329334,-119085792049452691758272074130168250347347833088192338404248⟩,⟨226987732318865539680582570822452240985240338202035022239646,226987732318865539680582570822452240985240338202063953718254⟩⟩, + ⟨⟨-268871000382141520006606376933490592645302789845196729617164,-268871000382141520006606376933490592645302789845154920843683⟩,⟨195468608628127282007972034431605366590333441057739550434986,195468608628127282007972034431605366590333441057782330084099⟩⟩] +lemma tw1_0_1_2_calc (j : Fin 31) : taylorWaveBox 1 0 1 2 j = tw1_0_1_2 j := by + revert j + decide +kernel +def tw1_0_1_3 : Fin 31 → CI := ![⟨⟨-68559797763035552079489130299531035371731032494973550563643,-68559797763035552079489130299531035371731032494951012124240⟩,⟨165343836388920773964073798499862659734856447794257923588996,165343836388920773964073798499862659734856447794280168659298⟩⟩, + ⟨⟨-95962370158813621025630227298670350770276317665267008764297,-95962370158813621025630227298670350770276317665252551733727⟩,⟨86720416273348771573556399752810714615229966115175921015536,86720416273348771573556399752810714615229966115190346537285⟩⟩, + ⟨⟨-87336048404751707423462502445958699179426229029896947054421,-87336048404751707423462502445958699179426229029888929363291⟩,⟨27358060410049983623255337753268634273697244646437999409250,27358060410049983623255337753268634273697244646446050761484⟩⟩, + ⟨⟨-62841750090401393902057307884410867448170343548149983803642,-62841750090401393902057307884410867448170343548146336281791⟩,⟨-7164111460854893051320603813409059237821160851745889444694,-7164111460854893051320603813409059237821160851742252364026⟩⟩, + ⟨⟨-37083617827636037320875597211443094009191186568467355424960,-37083617827636037320875597211443094009191186568464333256623⟩,⟨-20887614072208425491827160397584084487856335250013921840299,-20887614072208425491827160397584084487856335250010923030959⟩⟩, + ⟨⟨-17486814329328955934056266309703048303719230619869407794111,-17486814329328955934056266309703048303719230619867148807039⟩,⟨-21598747376564332919114958130266379666156588376327876920840,-21598747376564332919114958130266379666156588376325609498960⟩⟩, + ⟨⟨-5711291482110576160853174870598625572322174328929333115075,-5711291482110576160853174870598625572322174328927973159885⟩,⟨-16580169577218635336117487997222586237751559645066858935297,-16580169577218635336117487997222586237751559645065467218180⟩⟩, + ⟨⟨-211597564822725194293663287480210271144137077426494903956,-211597564822725194293663287480210271144137077425588010167⟩,⟨-10645269214606028173591904297127429455323389876425027433727,-10645269214606028173591904297127429455323389876424113024359⟩⟩, + ⟨⟨1489625383202356113814154855576404593984257400784906234697,1489625383202356113814154855576404593984257400785388759984⟩,⟨-6010549927226703180022411404905393776028616180667165204638,-6010549927226703180022411404905393776028616180666685707244⟩⟩, + ⟨⟨1462396560123262154532917561342148177513956535430633197951,1462396560123262154532917561342148177513956535430823784567⟩,⟨-3110397146705683104132077100483648494712390120686086033783,-3110397146705683104132077100483648494712390120685897771397⟩⟩, + ⟨⟨943256906779595700397078230755161455238322006265513176194,943256906779595700397078230755161455238322006265625035186⟩,⟨-1555628893239756721938009550551667711978443234429820546192,-1555628893239756721938009550551667711978443234429708441600⟩⟩, + ⟨⟨463323699250639069990745831224570693643821905018379434738,463323699250639069990745831224570693643821905018440583677⟩,⟨-800436047026299374148890845107794078794956277620748942511,-800436047026299374148890845107794078794956277620687837289⟩⟩, + ⟨⟨150978550025800960100673312126447589587089633163410039496,150978550025800960100673312126447589587089633163432375784⟩,⟨-437782024634180008211704335341638108318279744752710819673,-437782024634180008211704335341638108318279744752688385444⟩⟩, + ⟨⟨-20003809289074070792567749154295038732426546160034410965,-20003809289074070792567749154295038732426546160022264386⟩,⟨-241916066689477046812294772477744639343452490855592506550,-241916066689477046812294772477744639343452490855580482681⟩⟩, + ⟨⟨-100572057277100194651083982281066602703418514165125088131,-100572057277100194651083982281066602703418514165120241702⟩,⟨-110219840565987544849705219910826618304110868365209861325,-110219840565987544849705219910826618304110868365204775380⟩⟩, + ⟨⟨-123905984696636228574441759904512554789362426119131904039,-123905984696636228574441759904512554789362426119129185820⟩,⟨-9,8⟩⟩, + ⟨⟨-100572057277100194651083982281066602703418514165125088132,-100572057277100194651083982281066602703418514165120241703⟩,⟨110219840565987544849705219910826618304110868365204775380,110219840565987544849705219910826618304110868365209861324⟩⟩, + ⟨⟨-20003809289074070792567749154295038732426546160034410967,-20003809289074070792567749154295038732426546160022264387⟩,⟨241916066689477046812294772477744639343452490855580482680,241916066689477046812294772477744639343452490855592506551⟩⟩, + ⟨⟨150978550025800960100673312126447589587089633163410039492,150978550025800960100673312126447589587089633163432375782⟩,⟨437782024634180008211704335341638108318279744752688385443,437782024634180008211704335341638108318279744752710819676⟩⟩, + ⟨⟨463323699250639069990745831224570693643821905018379434733,463323699250639069990745831224570693643821905018440583673⟩,⟨800436047026299374148890845107794078794956277620687837291,800436047026299374148890845107794078794956277620748942514⟩⟩, + ⟨⟨943256906779595700397078230755161455238322006265513176184,943256906779595700397078230755161455238322006265625035177⟩,⟨1555628893239756721938009550551667711978443234429708441606,1555628893239756721938009550551667711978443234429820546198⟩⟩, + ⟨⟨1462396560123262154532917561342148177513956535430633197928,1462396560123262154532917561342148177513956535430823784558⟩,⟨3110397146705683104132077100483648494712390120685897771398,3110397146705683104132077100483648494712390120686086033798⟩⟩, + ⟨⟨1489625383202356113814154855576404593984257400784906234659,1489625383202356113814154855576404593984257400785388759947⟩,⟨6010549927226703180022411404905393776028616180666685707253,6010549927226703180022411404905393776028616180667165204647⟩⟩, + ⟨⟨-211597564822725194293663287480210271144137077426494903996,-211597564822725194293663287480210271144137077425588010261⟩,⟨10645269214606028173591904297127429455323389876424113024385,10645269214606028173591904297127429455323389876425027433699⟩⟩, + ⟨⟨-5711291482110576160853174870598625572322174328929333115152,-5711291482110576160853174870598625572322174328927973160001⟩,⟨16580169577218635336117487997222586237751559645065467218169,16580169577218635336117487997222586237751559645066858935248⟩⟩, + ⟨⟨-17486814329328955934056266309703048303719230619869407794229,-17486814329328955934056266309703048303719230619867148807277⟩,⟨21598747376564332919114958130266379666156588376325609498874,21598747376564332919114958130266379666156588376327876920635⟩⟩, + ⟨⟨-37083617827636037320875597211443094009191186568467355425160,-37083617827636037320875597211443094009191186568464333256679⟩,⟨20887614072208425491827160397584084487856335250010923030669,20887614072208425491827160397584084487856335250013921840153⟩⟩, + ⟨⟨-62841750090401393902057307884410867448170343548149983803822,-62841750090401393902057307884410867448170343548146336281694⟩,⟨7164111460854893051320603813409059237821160851742252363537,7164111460854893051320603813409059237821160851745889444482⟩⟩, + ⟨⟨-87336048404751707423462502445958699179426229029896947054413,-87336048404751707423462502445958699179426229029888929363064⟩,⟨-27358060410049983623255337753268634273697244646446050762015,-27358060410049983623255337753268634273697244646437999409560⟩⟩, + ⟨⟨-95962370158813621025630227298670350770276317665267008764086,-95962370158813621025630227298670350770276317665252551733159⟩,⟨-86720416273348771573556399752810714615229966115190346537879,-86720416273348771573556399752810714615229966115175921015770⟩⟩, + ⟨⟨-68559797763035552079489130299531035371731032494973550562596,-68559797763035552079489130299531035371731032494951012123583⟩,⟨-165343836388920773964073798499862659734856447794280168659396,-165343836388920773964073798499862659734856447794257923589483⟩⟩] +lemma tw1_0_1_3_calc (j : Fin 31) : taylorWaveBox 1 0 1 3 j = tw1_0_1_3 j := by + revert j + decide +kernel +def tw1_0_1_4 : Fin 31 → CI := ![⟨⟨79324423804435457519205742654395814905432602700643218200202,79324423804435457519205742654395814905432602700652693958657⟩,⟨12600089079467463214964233582899074048046043531510726391141,12600089079467463214964233582899074048046043531520197273545⟩⟩, + ⟨⟨45365481066033271836958582163176514144560748384274160040362,45365481066033271836958582163176514144560748384279976582639⟩,⟨29998709980719826748011158658287875695059783282846482235313,29998709980719826748011158658287875695059783282852273258636⟩⟩, + ⟨⟨19491387942886799046719328672413870555177371569739387024902,19491387942886799046719328672413870555177371569742596637108⟩,⟨30161605287431976158720473303803463354664571263179813853621,30161605287431976158720473303803463354664571263183032289426⟩⟩, + ⟨⟨4080026021322116627967505549778328522520944565595041558202,4080026021322116627967505549778328522520944565596551548252⟩,⟨22686132933689644031404504768752915068489351366611384516952,22686132933689644031404504768752915068489351366612940363095⟩⟩, + ⟨⟨-2800169326981094592606826794497473424666352330626840871683,-2800169326981094592606826794497473424666352330625534378372⟩,⟨14053251707473417344828515821352932885308523304913147469491,14053251707473417344828515821352932885308523304914469525487⟩⟩, + ⟨⟨-4451606019401966736799680385912382041462033944786271345247,-4451606019401966736799680385912382041462033944785386608694⟩,⟨7348523631693782709220470342913668720672279561328821631602,7348523631693782709220470342913668720672279561329699584837⟩⟩, + ⟨⟨-3742593199498302801334325549944998475818805112762438347061,-3742593199498302801334325549944998475818805112761968529973⟩,⟨3231483911527814103492297667420007080502488336528297502500,3231483911527814103492297667420007080502488336528756895997⟩⟩, + ⟨⟨-2455108188908728341865121950875334321839441302562154873704,-2455108188908728341865121950875334321839441302561880653155⟩,⟨1164010974607845357234370478471036332733870311043585490941,1164010974607845357234370478471036332733870311043858432599⟩⟩, + ⟨⟨-1379871876347781377647461331597462877269075064415060012846,-1379871876347781377647461331597462877269075064414934353788⟩,⟨326103195001763514704845661348411169040894083632661152493,326103195001763514704845661348411169040894083632787275743⟩⟩, + ⟨⟨-696008522210453514258847427762332682796064268888598644022,-696008522210453514258847427762332682796064268888554319061⟩,⟨70483678088006237634641873310629025774151352925477640130,70483678088006237634641873310629025774151352925521761131⟩⟩, + ⟨⟨-325034683344462958129957961721189905415680335770409204763,-325034683344462958129957961721189905415680335770380371532⟩,⟨25713920794791614022478488370144392725517804485045870137,25713920794791614022478488370144392725517804485074607414⟩⟩, + ⟨⟨-141654107475042423094452478934850018597265473667702190177,-141654107475042423094452478934850018597265473667689860409⟩,⟨29911306470584972188558228463692791442801334177130269106,29911306470584972188558228463692791442801334177142608591⟩⟩, + ⟨⟨-54014125466590007391888196947563010518685589351290973654,-54014125466590007391888196947563010518685589351286884884⟩,⟨32669062426294210577271725915113166937593849734868471717,32669062426294210577271725915113166937593849734872578130⟩⟩, + ⟨⟨-11979312247139631950002020467269967443129051306648881250,-11979312247139631950002020467269967443129051306647017100⟩,⟨26497165713351215092458475501076452740000948439877663989,26497165713351215092458475501076452740000948439879513673⟩⟩, + ⟨⟨7325716011772174114593557974455538676115724401788810052,7325716011772174114593557974455538676115724401789464318⟩,⟨14467717271714360865736645243611973711765562049124996510,14467717271714360865736645243611973711765562049125694384⟩⟩, + ⟨⟨12975404375292057382740890314002161562968771788557841648,12975404375292057382740890314002161562968771788558167602⟩,⟨-1,1⟩⟩, + ⟨⟨7325716011772174114593557974455538676115724401788810053,7325716011772174114593557974455538676115724401789464318⟩,⟨-14467717271714360865736645243611973711765562049125694384,-14467717271714360865736645243611973711765562049124996510⟩⟩, + ⟨⟨-11979312247139631950002020467269967443129051306648881250,-11979312247139631950002020467269967443129051306647017100⟩,⟨-26497165713351215092458475501076452740000948439879513673,-26497165713351215092458475501076452740000948439877663989⟩⟩, + ⟨⟨-54014125466590007391888196947563010518685589351290973654,-54014125466590007391888196947563010518685589351286884884⟩,⟨-32669062426294210577271725915113166937593849734872578130,-32669062426294210577271725915113166937593849734868471717⟩⟩, + ⟨⟨-141654107475042423094452478934850018597265473667702190177,-141654107475042423094452478934850018597265473667689860409⟩,⟨-29911306470584972188558228463692791442801334177142608592,-29911306470584972188558228463692791442801334177130269106⟩⟩, + ⟨⟨-325034683344462958129957961721189905415680335770409204763,-325034683344462958129957961721189905415680335770380371531⟩,⟨-25713920794791614022478488370144392725517804485074607416,-25713920794791614022478488370144392725517804485045870139⟩⟩, + ⟨⟨-696008522210453514258847427762332682796064268888598644023,-696008522210453514258847427762332682796064268888554319060⟩,⟨-70483678088006237634641873310629025774151352925521761135,-70483678088006237634641873310629025774151352925477640133⟩⟩, + ⟨⟨-1379871876347781377647461331597462877269075064415060012844,-1379871876347781377647461331597462877269075064414934353786⟩,⟨-326103195001763514704845661348411169040894083632787275752,-326103195001763514704845661348411169040894083632661152502⟩⟩, + ⟨⟨-2455108188908728341865121950875334321839441302562154873690,-2455108188908728341865121950875334321839441302561880653154⟩,⟨-1164010974607845357234370478471036332733870311043858432607,-1164010974607845357234370478471036332733870311043585490963⟩⟩, + ⟨⟨-3742593199498302801334325549944998475818805112762438347037,-3742593199498302801334325549944998475818805112761968529961⟩,⟨-3231483911527814103492297667420007080502488336528756896013,-3231483911527814103492297667420007080502488336528297502528⟩⟩, + ⟨⟨-4451606019401966736799680385912382041462033944786271345164,-4451606019401966736799680385912382041462033944785386608655⟩,⟨-7348523631693782709220470342913668720672279561329699584852,-7348523631693782709220470342913668720672279561328821631661⟩⟩, + ⟨⟨-2800169326981094592606826794497473424666352330626840871630,-2800169326981094592606826794497473424666352330625534378258⟩,⟨-14053251707473417344828515821352932885308523304914469525535,-14053251707473417344828515821352932885308523304913147469478⟩⟩, + ⟨⟨4080026021322116627967505549778328522520944565595041558276,4080026021322116627967505549778328522520944565596551548432⟩,⟨-22686132933689644031404504768752915068489351366612940363125,-22686132933689644031404504768752915068489351366611384516877⟩⟩, + ⟨⟨19491387942886799046719328672413870555177371569739387025010,19491387942886799046719328672413870555177371569742596637293⟩,⟨-30161605287431976158720473303803463354664571263183032289375,-30161605287431976158720473303803463354664571263179813853495⟩⟩, + ⟨⟨45365481066033271836958582163176514144560748384274160040427,45365481066033271836958582163176514144560748384279976582831⟩,⟨-29998709980719826748011158658287875695059783282852273258498,-29998709980719826748011158658287875695059783282846482235048⟩⟩, + ⟨⟨79324423804435457519205742654395814905432602700643218200317,79324423804435457519205742654395814905432602700652693958619⟩,⟨-12600089079467463214964233582899074048046043531520197273066,-12600089079467463214964233582899074048046043531510726390816⟩⟩] +lemma tw1_0_1_4_calc (j : Fin 31) : taylorWaveBox 1 0 1 4 j = tw1_0_1_4 j := by + revert j + decide +kernel +def tw1_0_1_5 : Fin 31 → CI := ![⟨⟨-2407721334665463964117056539280198719196643438838069763953,-2407721334665463964117056539280198719196643438834413267558⟩,⟨-30798246478934455007554507873417830122327188023263282723596,-30798246478934455007554507873417830122327188023259564471598⟩⟩, + ⟨⟨6399529151899856033928562668148991309879909120716276486906,6399529151899856033928562668148991309879909120718708895194⟩,⟨-18528218138285703313527522638256719445777954344389679596251,-18528218138285703313527522638256719445777954344387224658908⟩⟩, + ⟨⟨8026815908558865555853973321564025160434598106481385487959,8026815908558865555853973321564025160434598106482738685401⟩,⟨-9025093131227308107116913192982924977198847147539518498052,-9025093131227308107116913192982924977198847147538176758076⟩⟩, + ⟨⟨6421452821936059359134548065213623998118985007850435934801,6421452821936059359134548065213623998118985007851034786971⟩,⟨-3257043461323143772350422491752107546281549681742794330190,-3257043461323143772350422491752107546281549681742217486169⟩⟩, + ⟨⟨4105672099578876048462381334060959267263721796080333080153,4105672099578876048462381334060959267263721796080793457726⟩,⟨-493425612005746311886345220057244694175164682513397546042,-493425612005746311886345220057244694175164682512941744552⟩⟩, + ⟨⟨2231802829544661183982995079832057005785775606919154782904,2231802829544661183982995079832057005785775606919427551234⟩,⟨450329233257750650203447396999767417382586481528847480420,450329233257750650203447396999767417382586481529122126361⟩⟩, + ⟨⟨1061077674072641797564981852480661872164144517550429293584,1061077674072641797564981852480661872164144517550552386521⟩,⟨549778632447087962032940303482284025553333104998745264159,549778632447087962032940303482284025553333104998869979572⟩⟩, + ⟨⟨452550841844165955423347026698224765168012910491171609048,452550841844165955423347026698224765168012910491237663562⟩,⟨385229720832199822612286899583663639054702835342596911892,385229720832199822612286899583663639054702835342662941424⟩⟩, + ⟨⟨180772754529948992542769314686197667945545834252419565063,180772754529948992542769314686197667945545834252449530000⟩,⟨211562120644274243800946474253543692486144136626538686310,211562120644274243800946474253543692486144136626568677798⟩⟩, + ⟨⟨73017912447934180982518255909325979415692179397917795451,73017912447934180982518255909325979415692179397928341572⟩,⟨97796031287842296776574278802647637405170312041498069170,97796031287842296776574278802647637405170312041508746643⟩⟩, + ⟨⟨32380706249239636198965799072823842779644929414116243929,32380706249239636198965799072823842779644929414121928753⟩,⟨38212819634874460580454617230160157960058393666215053769,38212819634874460580454617230160157960058393666220740957⟩⟩, + ⟨⟨15697990276896306615593645419634647520473718283005925665,15697990276896306615593645419634647520473718283008172352⟩,⟨11442770691869077969883908913171605147121939111391771144,11442770691869077969883908913171605147121939111394018385⟩⟩, + ⟨⟨7291936719647906530776696183669578617332690018268344840,7291936719647906530776696183669578617332690018268957650⟩,⟨1107878950813853439450438800321018227496442671134617891,1107878950813853439450438800321018227496442671135229949⟩⟩, + ⟨⟨2396582793289290796421142444166552046416608308292827274,2396582793289290796421142444166552046416608308293090880⟩,⟨-1781013058923108723342890294272179960543320115512529893,-1781013058923108723342890294272179960543320115512265920⟩⟩, + ⟨⟨-296827157797578497545630576618592662043809267078871937,-296827157797578497545630576618592662043809267078792342⟩,⟨-1481273357674474531416918412343218980583144927508906966,-1481273357674474531416918412343218980583144927508823491⟩⟩, + ⟨⟨-1164669573222125370563972706062896879792569551485356398,-1164669573222125370563972706062896879792569551485323432⟩,⟨-1,1⟩⟩, + ⟨⟨-296827157797578497545630576618592662043809267078871937,-296827157797578497545630576618592662043809267078792342⟩,⟨1481273357674474531416918412343218980583144927508823491,1481273357674474531416918412343218980583144927508906966⟩⟩, + ⟨⟨2396582793289290796421142444166552046416608308292827274,2396582793289290796421142444166552046416608308293090880⟩,⟨1781013058923108723342890294272179960543320115512265920,1781013058923108723342890294272179960543320115512529893⟩⟩, + ⟨⟨7291936719647906530776696183669578617332690018268344840,7291936719647906530776696183669578617332690018268957650⟩,⟨-1107878950813853439450438800321018227496442671135229949,-1107878950813853439450438800321018227496442671134617891⟩⟩, + ⟨⟨15697990276896306615593645419634647520473718283005925665,15697990276896306615593645419634647520473718283008172352⟩,⟨-11442770691869077969883908913171605147121939111394018385,-11442770691869077969883908913171605147121939111391771144⟩⟩, + ⟨⟨32380706249239636198965799072823842779644929414116243930,32380706249239636198965799072823842779644929414121928753⟩,⟨-38212819634874460580454617230160157960058393666220740957,-38212819634874460580454617230160157960058393666215053769⟩⟩, + ⟨⟨73017912447934180982518255909325979415692179397917795451,73017912447934180982518255909325979415692179397928341572⟩,⟨-97796031287842296776574278802647637405170312041508746643,-97796031287842296776574278802647637405170312041498069169⟩⟩, + ⟨⟨180772754529948992542769314686197667945545834252419565064,180772754529948992542769314686197667945545834252449530002⟩,⟨-211562120644274243800946474253543692486144136626568677797,-211562120644274243800946474253543692486144136626538686308⟩⟩, + ⟨⟨452550841844165955423347026698224765168012910491171609052,452550841844165955423347026698224765168012910491237663563⟩,⟨-385229720832199822612286899583663639054702835342662941419,-385229720832199822612286899583663639054702835342596911890⟩⟩, + ⟨⟨1061077674072641797564981852480661872164144517550429293589,1061077674072641797564981852480661872164144517550552386523⟩,⟨-549778632447087962032940303482284025553333104998869979565,-549778632447087962032940303482284025553333104998745264155⟩⟩, + ⟨⟨2231802829544661183982995079832057005785775606919154782914,2231802829544661183982995079832057005785775606919427551231⟩,⟨-450329233257750650203447396999767417382586481529122126337,-450329233257750650203447396999767417382586481528847480408⟩⟩, + ⟨⟨4105672099578876048462381334060959267263721796080333080140,4105672099578876048462381334060959267263721796080793457733⟩,⟨493425612005746311886345220057244694175164682512941744567,493425612005746311886345220057244694175164682513397546076⟩⟩, + ⟨⟨6421452821936059359134548065213623998118985007850435934764,6421452821936059359134548065213623998118985007851034786972⟩,⟨3257043461323143772350422491752107546281549681742217486186,3257043461323143772350422491752107546281549681742794330245⟩⟩, + ⟨⟨8026815908558865555853973321564025160434598106481385487901,8026815908558865555853973321564025160434598106482738685375⟩,⟨9025093131227308107116913192982924977198847147538176758100,9025093131227308107116913192982924977198847147539518498107⟩⟩, + ⟨⟨6399529151899856033928562668148991309879909120716276486799,6399529151899856033928562668148991309879909120718708895137⟩,⟨18528218138285703313527522638256719445777954344387224658909,18528218138285703313527522638256719445777954344389679596303⟩⟩, + ⟨⟨-2407721334665463964117056539280198719196643438838069764079,-2407721334665463964117056539280198719196643438834413267739⟩,⟨30798246478934455007554507873417830122327188023259564471604,30798246478934455007554507873417830122327188023263282723546⟩⟩] +lemma tw1_0_1_5_calc (j : Fin 31) : taylorWaveBox 1 0 1 5 j = tw1_0_1_5 j := by + revert j + decide +kernel +def tw1_0_1_6 : Fin 31 → CI := ![⟨⟨-9889600600418526728571157833932105708924142218336437575048,-9889600600418526728571157833932105708924142218334931967762⟩,⟨3206813586299666846022087938754392507157578065287438491326,3206813586299666846022087938754392507157578065288906263580⟩⟩, + ⟨⟨-6161740037465400044166840082461925411211216059366944388139,-6161740037465400044166840082461925411211216059366022530744⟩,⟨-499422100181536329658220332820178294775048792605498302648,-499422100181536329658220332820178294775048792604585531898⟩⟩, + ⟨⟨-3190085491885574743122696396425546908478754163210600608747,-3190085491885574743122696396425546908478754163210133618904⟩,⟨-1567704291431264465477141598953278172159292939667208421088,-1567704291431264465477141598953278172159292939666737090418⟩⟩, + ⟨⟨-1357031709478815964760022177591403863392202490744503885958,-1357031709478815964760022177591403863392202490744318952588⟩,⟨-1425324822301094389202490777025320809196503753657346845160,-1425324822301094389202490777025320809196503753657156032681⟩⟩, + ⟨⟨-440872378870704081797405078559812178567769369612791832799,-440872378870704081797405078559812178567769369612658681858⟩,⟨-946537015048390890820141760644104689064673605253281818071,-946537015048390890820141760644104689064673605253147877806⟩⟩, + ⟨⟨-77038786359844289704825492761232159097835622349078321200,-77038786359844289704825492761232159097835622349007080118⟩,⟨-522272620658483313192071891844590154335690406762885683003,-522272620658483313192071891844590154335690406762814730728⟩⟩, + ⟨⟨24611936405907004622683147651319337365420351235594440768,24611936405907004622683147651319337365420351235621866381⟩,⟨-251521626929582647894809794012326606256232988115835950856,-251521626929582647894809794012326606256232988115808524649⟩⟩, + ⟨⟨31692010047767067765300363484801434970345492754082987908,31692010047767067765300363484801434970345492754098607019⟩,⟨-109240893751300378609318602160506248338791111832592556460,-109240893751300378609318602160506248338791111832576874401⟩⟩, + ⟨⟨18111127365248492468508592682413441901232233395976309616,18111127365248492468508592682413441901232233395983175198⟩,⟨-44222998038760399993797302310293402552162195112934038542,-44222998038760399993797302310293402552162195112927195756⟩⟩, + ⟨⟨7066657126999470097815063361181103551577617946151507456,7066657126999470097815063361181103551577617946153551864⟩,⟨-17238904724723603938228735015375349047189567690858247503,-17238904724723603938228735015375349047189567690856214103⟩⟩, + ⟨⟨1625197272604095795994734263432935642114913570488761331,1625197272604095795994734263432935642114913570489775980⟩,⟨-6533414949511430734000284765378409120110425858137602632,-6533414949511430734000284765378409120110425858136586490⟩⟩, + ⟨⟨-234347152631411276522797712146621250891091848447432710,-234347152631411276522797712146621250891091848447073678⟩,⟨-2268621189946696747317304132298925086820466128977948323,-2268621189946696747317304132298925086820466128977589456⟩⟩, + ⟨⟨-500196862952530266698669403495759559915216152375195172,-500196862952530266698669403495759559915216152375107020⟩,⟨-564268751592079222848546727885179924397413820435774361,-564268751592079222848546727885179924397413820435686476⟩⟩, + ⟨⟨-265938527175993604314832860646183451210940537477167415,-265938527175993604314832860646183451210940537477135239⟩,⟨35309787197656125749697728870361901769264553799513022,35309787197656125749697728870361901769264553799545328⟩⟩, + ⟨⟨-9003621058793722591235080355610387317154295849230221,-9003621058793722591235080355610387317154295849221864⟩,⟨122814701476841015492248616385152988814035178680502588,122814701476841015492248616385152988814035178680511179⟩⟩, + ⟨⟨91472934377354721013456530179119488466138355347205412,91472934377354721013456530179119488466138355347208293⟩,⟨-1,1⟩⟩, + ⟨⟨-9003621058793722591235080355610387317154295849230221,-9003621058793722591235080355610387317154295849221864⟩,⟨-122814701476841015492248616385152988814035178680511179,-122814701476841015492248616385152988814035178680502588⟩⟩, + ⟨⟨-265938527175993604314832860646183451210940537477167415,-265938527175993604314832860646183451210940537477135239⟩,⟨-35309787197656125749697728870361901769264553799545328,-35309787197656125749697728870361901769264553799513022⟩⟩, + ⟨⟨-500196862952530266698669403495759559915216152375195172,-500196862952530266698669403495759559915216152375107020⟩,⟨564268751592079222848546727885179924397413820435686476,564268751592079222848546727885179924397413820435774361⟩⟩, + ⟨⟨-234347152631411276522797712146621250891091848447432710,-234347152631411276522797712146621250891091848447073678⟩,⟨2268621189946696747317304132298925086820466128977589456,2268621189946696747317304132298925086820466128977948323⟩⟩, + ⟨⟨1625197272604095795994734263432935642114913570488761331,1625197272604095795994734263432935642114913570489775980⟩,⟨6533414949511430734000284765378409120110425858136586490,6533414949511430734000284765378409120110425858137602632⟩⟩, + ⟨⟨7066657126999470097815063361181103551577617946151507456,7066657126999470097815063361181103551577617946153551864⟩,⟨17238904724723603938228735015375349047189567690856214103,17238904724723603938228735015375349047189567690858247503⟩⟩, + ⟨⟨18111127365248492468508592682413441901232233395976309615,18111127365248492468508592682413441901232233395983175197⟩,⟨44222998038760399993797302310293402552162195112927195756,44222998038760399993797302310293402552162195112934038542⟩⟩, + ⟨⟨31692010047767067765300363484801434970345492754082987908,31692010047767067765300363484801434970345492754098607018⟩,⟨109240893751300378609318602160506248338791111832576874401,109240893751300378609318602160506248338791111832592556460⟩⟩, + ⟨⟨24611936405907004622683147651319337365420351235594440767,24611936405907004622683147651319337365420351235621866380⟩,⟨251521626929582647894809794012326606256232988115808524650,251521626929582647894809794012326606256232988115835950856⟩⟩, + ⟨⟨-77038786359844289704825492761232159097835622349078321203,-77038786359844289704825492761232159097835622349007080123⟩,⟨522272620658483313192071891844590154335690406762814730729,522272620658483313192071891844590154335690406762885683001⟩⟩, + ⟨⟨-440872378870704081797405078559812178567769369612791832808,-440872378870704081797405078559812178567769369612658681862⟩,⟨946537015048390890820141760644104689064673605253147877801,946537015048390890820141760644104689064673605253281818070⟩⟩, + ⟨⟨-1357031709478815964760022177591403863392202490744503885972,-1357031709478815964760022177591403863392202490744318952591⟩,⟨1425324822301094389202490777025320809196503753657156032668,1425324822301094389202490777025320809196503753657346845158⟩⟩, + ⟨⟨-3190085491885574743122696396425546908478754163210600608760,-3190085491885574743122696396425546908478754163210133618907⟩,⟨1567704291431264465477141598953278172159292939666737090398,1567704291431264465477141598953278172159292939667208421078⟩⟩, + ⟨⟨-6161740037465400044166840082461925411211216059366944388150,-6161740037465400044166840082461925411211216059366022530736⟩,⟨499422100181536329658220332820178294775048792604585531862,499422100181536329658220332820178294775048792605498302630⟩⟩, + ⟨⟨-9889600600418526728571157833932105708924142218336437575018,-9889600600418526728571157833932105708924142218334931967754⟩,⟨-3206813586299666846022087938754392507157578065288906263618,-3206813586299666846022087938754392507157578065287438491386⟩⟩] +lemma tw1_0_1_6_calc (j : Fin 31) : taylorWaveBox 1 0 1 6 j = tw1_0_1_6 j := by + revert j + decide +kernel +def tw1_0_1_7 : Fin 31 → CI := ![⟨⟨1623248628381654095982319497008014817133811738065056642100,1623248628381654095982319497008014817133811738065557115666⟩,⟨2652890380760723947331605008092623545932932541276001409454,2652890380760723947331605008092623545932932541276514950103⟩⟩, + ⟨⟨294579671805698946861365240873438577824742451936345859998,294579671805698946861365240873438577824742451936638434703⟩,⟨1707751926999593178040165413037813038326973210572211002241,1707751926999593178040165413037813038326973210572506018396⟩⟩, + ⟨⟨-172513152964379704164340828333074885215287826289094754425,-172513152964379704164340828333074885215287826288954008585⟩,⟨913676893327569730016465626856054088786634901684425925193,913676893327569730016465626856054088786634901684565598617⟩⟩, + ⟨⟨-236949461923272709895293450250275697735312864218078112672,-236949461923272709895293450250275697735312864218025898392⟩,⟨415302062696528556266256814796723978511682151730950265329,415302062696528556266256814796723978511682151731001486506⟩⟩, + ⟨⟨-171134703242124102384630922485576914473764104538531752453,-171134703242124102384630922485576914473764104538498045502⟩,⟨160126772414296729808346554805079278955025211575820103681,160126772414296729808346554805079278955025211575853772409⟩⟩, + ⟨⟨-95903642810786315970741854269204507954172114951688800474,-95903642810786315970741854269204507954172114951672774329⟩,⟨51401290335370445144913174926537760137620736078374458051,51401290335370445144913174926537760137620736078390492372⟩⟩, + ⟨⟨-45617042601238677775190316956140104544221324166864152707,-45617042601238677775190316956140104544221324166857684334⟩,⟨13263928863830844152643875227645038694985211041680757954,13263928863830844152643875227645038694985211041687150628⟩⟩, + ⟨⟨-19160193232359009318869848727561845461580024741433441443,-19160193232359009318869848727561845461580024741429993190⟩,⟨2709742678160091665367658253173888114840131690858392650,2709742678160091665367658253173888114840131690861827979⟩⟩, + ⟨⟨-7267571266370469039748787508921942236729269341052297496,-7267571266370469039748787508921942236729269341050983727⟩,⟨628801431960319148376066253430486776681433576977224348,628801431960319148376066253430486776681433576978541080⟩⟩, + ⟨⟨-2499183381796212774255601360864619909243429572536622166,-2499183381796212774255601360864619909243429572536269378⟩,⟨381259694365042253098957167705643748266925236229981422,381259694365042253098957167705643748266925236230333215⟩⟩, + ⟨⟨-746957963983235238817096793877302060044178039077271507,-746957963983235238817096793877302060044178039077104526⟩,⟨298534834619900290347600527117030567096193940634600302,298534834619900290347600527117030567096193940634767131⟩⟩, + ⟨⟨-159616856798217346098181756093834490717106077302355978,-159616856798217346098181756093834490717106077302304777⟩,⟨176557989896289810141470675066132550173529286268548419,176557989896289810141470675066132550173529286268599618⟩⟩, + ⟨⟨2092503395341400142382378545191511743811217989041171,2092503395341400142382378545191511743811217989051708⟩,⟨68493664214494106331887953218615840772571534811071478,68493664214494106331887953218615840772571534811082015⟩⟩, + ⟨⟨19935505061341226914252793254004673655384472274505273,19935505061341226914252793254004673655384472274508694⟩,⟨7849362725612781968839686034187252633824866966336108,7849362725612781968839686034187252633824866966339540⟩⟩, + ⟨⟨3010261229005636034324929882501956228660769077066218,3010261229005636034324929882501956228660769077066989⟩,⟨-8399480495746107637076431928773763334283487384719351,-8399480495746107637076431928773763334283487384718574⟩⟩, + ⟨⟨-6386015525382196429085347821456690293023597100481957,-6386015525382196429085347821456690293023597100481735⟩,⟨-1,1⟩⟩, + ⟨⟨3010261229005636034324929882501956228660769077066218,3010261229005636034324929882501956228660769077066989⟩,⟨8399480495746107637076431928773763334283487384718574,8399480495746107637076431928773763334283487384719351⟩⟩, + ⟨⟨19935505061341226914252793254004673655384472274505273,19935505061341226914252793254004673655384472274508694⟩,⟨-7849362725612781968839686034187252633824866966339540,-7849362725612781968839686034187252633824866966336108⟩⟩, + ⟨⟨2092503395341400142382378545191511743811217989041171,2092503395341400142382378545191511743811217989051708⟩,⟨-68493664214494106331887953218615840772571534811082015,-68493664214494106331887953218615840772571534811071478⟩⟩, + ⟨⟨-159616856798217346098181756093834490717106077302355978,-159616856798217346098181756093834490717106077302304777⟩,⟨-176557989896289810141470675066132550173529286268599618,-176557989896289810141470675066132550173529286268548419⟩⟩, + ⟨⟨-746957963983235238817096793877302060044178039077271507,-746957963983235238817096793877302060044178039077104526⟩,⟨-298534834619900290347600527117030567096193940634767131,-298534834619900290347600527117030567096193940634600302⟩⟩, + ⟨⟨-2499183381796212774255601360864619909243429572536622166,-2499183381796212774255601360864619909243429572536269378⟩,⟨-381259694365042253098957167705643748266925236230333215,-381259694365042253098957167705643748266925236229981422⟩⟩, + ⟨⟨-7267571266370469039748787508921942236729269341052297496,-7267571266370469039748787508921942236729269341050983727⟩,⟨-628801431960319148376066253430486776681433576978541080,-628801431960319148376066253430486776681433576977224348⟩⟩, + ⟨⟨-19160193232359009318869848727561845461580024741433441442,-19160193232359009318869848727561845461580024741429993191⟩,⟨-2709742678160091665367658253173888114840131690861827979,-2709742678160091665367658253173888114840131690858392650⟩⟩, + ⟨⟨-45617042601238677775190316956140104544221324166864152707,-45617042601238677775190316956140104544221324166857684334⟩,⟨-13263928863830844152643875227645038694985211041687150628,-13263928863830844152643875227645038694985211041680757954⟩⟩, + ⟨⟨-95903642810786315970741854269204507954172114951688800474,-95903642810786315970741854269204507954172114951672774329⟩,⟨-51401290335370445144913174926537760137620736078390492373,-51401290335370445144913174926537760137620736078374458052⟩⟩, + ⟨⟨-171134703242124102384630922485576914473764104538531752453,-171134703242124102384630922485576914473764104538498045501⟩,⟨-160126772414296729808346554805079278955025211575853772411,-160126772414296729808346554805079278955025211575820103682⟩⟩, + ⟨⟨-236949461923272709895293450250275697735312864218078112671,-236949461923272709895293450250275697735312864218025898389⟩,⟨-415302062696528556266256814796723978511682151731001486509,-415302062696528556266256814796723978511682151730950265330⟩⟩, + ⟨⟨-172513152964379704164340828333074885215287826289094754422,-172513152964379704164340828333074885215287826288954008579⟩,⟨-913676893327569730016465626856054088786634901684565598619,-913676893327569730016465626856054088786634901684425925193⟩⟩, + ⟨⟨294579671805698946861365240873438577824742451936345860003,294579671805698946861365240873438577824742451936638434714⟩,⟨-1707751926999593178040165413037813038326973210572506018398,-1707751926999593178040165413037813038326973210572211002237⟩⟩, + ⟨⟨1623248628381654095982319497008014817133811738065056642117,1623248628381654095982319497008014817133811738065557115675⟩,⟨-2652890380760723947331605008092623545932932541276514950090,-2652890380760723947331605008092623545932932541276001409448⟩⟩] +lemma tw1_0_1_7_calc (j : Fin 31) : taylorWaveBox 1 0 1 7 j = tw1_0_1_7 j := by + revert j + decide +kernel +def tw1_0_1_8 : Fin 31 → CI := ![⟨⟨592533358263939719005342546666898318294823563452746937288,592533358263939719005342546666898318294823563452898615258⟩,⟨-591651515775664465364457122197907839626607305348507282860,-591651515775664465364457122197907839626607305348358856922⟩⟩, + ⟨⟨398773528411056961499493488997667999135638888978683183976,398773528411056961499493488997667999135638888978765717852⟩,⟨-179280610714667285757864487466869567347416207850316201771,-179280610714667285757864487466869567347416207850234127454⟩⟩, + ⟨⟨218146032223478468141929804170322747403804493341862589315,218146032223478468141929804170322747403804493341899370675⟩,⟨-18266019527727220210334286544441224216158229397821598439,-18266019527727220210334286544441224216158229397784636196⟩⟩, + ⟨⟨101868634389544281677027966522517399734247822717256672931,101868634389544281677027966522517399734247822717269226914⟩,⟨23532381072918495785435390940690061259199252237314643475,23532381072918495785435390940690061259199252237327259823⟩⟩, + ⟨⟨41494843921026712509757453565105760350095243551254682270,41494843921026712509757453565105760350095243551262341539⟩,⟨22794442558787295793036434018374656750170856178071060238,22794442558787295793036434018374656750170856178078693879⟩⟩, + ⟨⟨14997021155394863700088007609622666723462757447743630978,14997021155394863700088007609622666723462757447747433117⟩,⟨13508704994995387815802304207869979085127827664343046477,13508704994995387815802304207869979085127827664346861143⟩⟩, + ⟨⟨4949696392108310890860450844666275109570699286352071924,4949696392108310890860450844666275109570699286353424869⟩,⟨6332111066200231244460841895856656122742931295119819186,6332111066200231244460841895856656122742931295121188971⟩⟩, + ⟨⟨1582221898928419889824419508327969998078170051078026955,1582221898928419889824419508327969998078170051078677491⟩,⟨2505009503967467733383465474290283716947805835031564881,2505009503967467733383465474290283716947805835032216418⟩⟩, + ⟨⟨533457557300133418081428065320249478463847069710764722,533457557300133418081428065320249478463847069710989130⟩,⟨848392571366224112475559423833011018023525240767689297,848392571366224112475559423833011018023525240767913624⟩⟩, + ⟨⟨196953744875397103508591287770118875760946086119792939,196953744875397103508591287770118875760946086119851567⟩,⟨237758618642280449192156743040207019599845075356537555,237758618642280449192156743040207019599845075356596508⟩⟩, + ⟨⟨72984832023872496922815011211276750923667903474621070,72984832023872496922815011211276750923667903474644826⟩,⟨46426882361852914078374684966372392113226527270667306,46426882361852914078374684966372392113226527270691052⟩⟩, + ⟨⟨22355095871700028954037905853385585402450848016934388,22355095871700028954037905853385585402450848016941096⟩,⟨49893091437447856900392999795908558849685526120906,49893091437447856900392999795908558849685526127616⟩⟩, + ⟨⟨3454844006006688513893506344160009473417983632394878,3454844006006688513893506344160009473417983632396101⟩,⟨-4413147067847620036373888318532517195743994502692093,-4413147067847620036373888318532517195743994502690868⟩⟩, + ⟨⟨-978590277435716202051177526731527144794684900470659,-978590277435716202051177526731527144794684900470322⟩,⟨-1189070408219730535141642870666847505271918329320400,-1189070408219730535141642870666847505271918329320063⟩⟩, + ⟨⟨-335738881356420913759000615126137247254311775829763,-335738881356420913759000615126137247254311775829699⟩,⟨475215954596855146291189264907535964239922967249264,475215954596855146291189264907535964239922967249328⟩⟩, + ⟨⟨401245189205021441924104977472768602680546558255300,401245189205021441924104977472768602680546558255316⟩,⟨-1,1⟩⟩, + ⟨⟨-335738881356420913759000615126137247254311775829763,-335738881356420913759000615126137247254311775829699⟩,⟨-475215954596855146291189264907535964239922967249328,-475215954596855146291189264907535964239922967249264⟩⟩, + ⟨⟨-978590277435716202051177526731527144794684900470659,-978590277435716202051177526731527144794684900470322⟩,⟨1189070408219730535141642870666847505271918329320063,1189070408219730535141642870666847505271918329320400⟩⟩, + ⟨⟨3454844006006688513893506344160009473417983632394878,3454844006006688513893506344160009473417983632396101⟩,⟨4413147067847620036373888318532517195743994502690868,4413147067847620036373888318532517195743994502692093⟩⟩, + ⟨⟨22355095871700028954037905853385585402450848016934388,22355095871700028954037905853385585402450848016941096⟩,⟨-49893091437447856900392999795908558849685526127616,-49893091437447856900392999795908558849685526120906⟩⟩, + ⟨⟨72984832023872496922815011211276750923667903474621070,72984832023872496922815011211276750923667903474644826⟩,⟨-46426882361852914078374684966372392113226527270691052,-46426882361852914078374684966372392113226527270667306⟩⟩, + ⟨⟨196953744875397103508591287770118875760946086119792939,196953744875397103508591287770118875760946086119851567⟩,⟨-237758618642280449192156743040207019599845075356596508,-237758618642280449192156743040207019599845075356537555⟩⟩, + ⟨⟨533457557300133418081428065320249478463847069710764722,533457557300133418081428065320249478463847069710989130⟩,⟨-848392571366224112475559423833011018023525240767913624,-848392571366224112475559423833011018023525240767689297⟩⟩, + ⟨⟨1582221898928419889824419508327969998078170051078026955,1582221898928419889824419508327969998078170051078677491⟩,⟨-2505009503967467733383465474290283716947805835032216418,-2505009503967467733383465474290283716947805835031564881⟩⟩, + ⟨⟨4949696392108310890860450844666275109570699286352071924,4949696392108310890860450844666275109570699286353424869⟩,⟨-6332111066200231244460841895856656122742931295121188970,-6332111066200231244460841895856656122742931295119819186⟩⟩, + ⟨⟨14997021155394863700088007609622666723462757447743630978,14997021155394863700088007609622666723462757447747433117⟩,⟨-13508704994995387815802304207869979085127827664346861143,-13508704994995387815802304207869979085127827664343046477⟩⟩, + ⟨⟨41494843921026712509757453565105760350095243551254682270,41494843921026712509757453565105760350095243551262341539⟩,⟨-22794442558787295793036434018374656750170856178078693879,-22794442558787295793036434018374656750170856178071060237⟩⟩, + ⟨⟨101868634389544281677027966522517399734247822717256672931,101868634389544281677027966522517399734247822717269226915⟩,⟨-23532381072918495785435390940690061259199252237327259823,-23532381072918495785435390940690061259199252237314643474⟩⟩, + ⟨⟨218146032223478468141929804170322747403804493341862589315,218146032223478468141929804170322747403804493341899370675⟩,⟨18266019527727220210334286544441224216158229397784636197,18266019527727220210334286544441224216158229397821598440⟩⟩, + ⟨⟨398773528411056961499493488997667999135638888978683183975,398773528411056961499493488997667999135638888978765717852⟩,⟨179280610714667285757864487466869567347416207850234127455,179280610714667285757864487466869567347416207850316201773⟩⟩, + ⟨⟨592533358263939719005342546666898318294823563452746937286,592533358263939719005342546666898318294823563452898615254⟩,⟨591651515775664465364457122197907839626607305348358856926,591651515775664465364457122197907839626607305348507282862⟩⟩] +lemma tw1_0_1_8_calc (j : Fin 31) : taylorWaveBox 1 0 1 8 j = tw1_0_1_8 j := by + revert j + decide +kernel +def tw1_0_1_9 : Fin 31 → CI := ![⟨⟨-174658157751895820450904632101940976503175867774138835401,-174658157751895820450904632101940976503175867774099839707⟩,⟨-107227553941046944677471844841632763407379862517005264541,-107227553941046944677471844841632763407379862516965680113⟩⟩, + ⟨⟨-62601997212223184391375148109494109882484635264589491277,-62601997212223184391375148109494109882484635264568944200⟩,⟨-78340201433552304498468008884052885871608028493851108875,-78340201433552304498468008884052885871608028493830513909⟩⟩, + ⟨⟨-16228134373420273570061649103228121510906622886698939881,-16228134373420273570061649103228121510906622886690222845⟩,⟨-43952797097113441893298130816949706380281448599407465058,-43952797097113441893298130816949706380281448599398762874⟩⟩, + ⟨⟨-1338167910828413531130792018144463721561028005092169997,-1338167910828413531130792018144463721561028005089323405⟩,⟨-20739909095725076361806701467739427252857060187528303830,-20739909095725076361806701467739427252857060187525432317⟩⟩, + ⟨⟨1608200795818274093081489474401329598102411241695849238,1608200795818274093081489474401329598102411241697635415⟩,⟨-8544232004509985992321800346992826632470909179646890170,-8544232004509985992321800346992826632470909179645094679⟩⟩, + ⟨⟨1286748335165774593612388694077609408980991983830417206,1286748335165774593612388694077609408980991983831220066⟩,⟨-3151137217240573160997283312584771859650029678300089565,-3151137217240573160997283312584771859650029678299289669⟩⟩, + ⟨⟨621497349005014988215836542801096636643108862717717876,621497349005014988215836542801096636643108862717969643⟩,⟨-1068504330266503904458679153819820936729883559571638864,-1068504330266503904458679153819820936729883559571388917⟩⟩, + ⟨⟨227592159294008942444791651690431864196969227698424408,227592159294008942444791651690431864196969227698534248⟩,⟨-343922038331271926019333356861520178583461576191380235,-343922038331271926019333356861520178583461576191270306⟩⟩, + ⟨⟨63756890162081763449132693028986291354669305017289508,63756890162081763449132693028986291354669305017327522⟩,⟨-107709284502746514261605515536017154222793866051499726,-107709284502746514261605515536017154222793866051461769⟩⟩, + ⟨⟨11384595965324786766502079904436729102197388553615962,11384595965324786766502079904436729102197388553624559⟩,⟨-32330693205760401207966951198981834738663411151095233,-32330693205760401207966951198981834738663411151086653⟩⟩, + ⟨⟨-485693135401440325203309390124735702284119650358850,-485693135401440325203309390124735702284119650355595⟩,⟨-8442013786635774626182442698319560507988595108599504,-8442013786635774626182442698319560507988595108596246⟩⟩, + ⟨⟨-1273753549398398451933340513775412473436477376698660,-1273753549398398451933340513775412473436477376697868⟩,⟨-1421649986937386241940642367305757259224281779747096,-1421649986937386241940642367305757259224281779746304⟩⟩, + ⟨⟨-407405537361282316626022500553432269314315076250138,-407405537361282316626022500553432269314315076250013⟩,⟨87628180916732723910991145190810073407427701285438,87628180916732723910991145190810073407427701285563⟩⟩, + ⟨⟨18163866551267440268285688964817038521134205930677,18163866551267440268285688964817038521134205930708⟩,⟨98973401745271344759701727300038241301397097709106,98973401745271344759701727300038241301397097709137⟩⟩, + ⟨⟨26717435572362497789284353511297018635349544972171,26717435572362497789284353511297018635349544972177⟩,⟨-21817227390882424048556152979822323495183659869467,-21817227390882424048556152979822323495183659869461⟩⟩, + ⟨⟨-22919071612631672222091273723262955687240196613119,-22919071612631672222091273723262955687240196613117⟩,⟨-1,1⟩⟩, + ⟨⟨26717435572362497789284353511297018635349544972171,26717435572362497789284353511297018635349544972177⟩,⟨21817227390882424048556152979822323495183659869461,21817227390882424048556152979822323495183659869467⟩⟩, + ⟨⟨18163866551267440268285688964817038521134205930677,18163866551267440268285688964817038521134205930708⟩,⟨-98973401745271344759701727300038241301397097709137,-98973401745271344759701727300038241301397097709106⟩⟩, + ⟨⟨-407405537361282316626022500553432269314315076250138,-407405537361282316626022500553432269314315076250013⟩,⟨-87628180916732723910991145190810073407427701285563,-87628180916732723910991145190810073407427701285438⟩⟩, + ⟨⟨-1273753549398398451933340513775412473436477376698660,-1273753549398398451933340513775412473436477376697868⟩,⟨1421649986937386241940642367305757259224281779746304,1421649986937386241940642367305757259224281779747096⟩⟩, + ⟨⟨-485693135401440325203309390124735702284119650358850,-485693135401440325203309390124735702284119650355595⟩,⟨8442013786635774626182442698319560507988595108596246,8442013786635774626182442698319560507988595108599504⟩⟩, + ⟨⟨11384595965324786766502079904436729102197388553615962,11384595965324786766502079904436729102197388553624559⟩,⟨32330693205760401207966951198981834738663411151086653,32330693205760401207966951198981834738663411151095233⟩⟩, + ⟨⟨63756890162081763449132693028986291354669305017289508,63756890162081763449132693028986291354669305017327522⟩,⟨107709284502746514261605515536017154222793866051461769,107709284502746514261605515536017154222793866051499726⟩⟩, + ⟨⟨227592159294008942444791651690431864196969227698424408,227592159294008942444791651690431864196969227698534248⟩,⟨343922038331271926019333356861520178583461576191270306,343922038331271926019333356861520178583461576191380235⟩⟩, + ⟨⟨621497349005014988215836542801096636643108862717717876,621497349005014988215836542801096636643108862717969643⟩,⟨1068504330266503904458679153819820936729883559571388917,1068504330266503904458679153819820936729883559571638864⟩⟩, + ⟨⟨1286748335165774593612388694077609408980991983830417206,1286748335165774593612388694077609408980991983831220066⟩,⟨3151137217240573160997283312584771859650029678299289669,3151137217240573160997283312584771859650029678300089565⟩⟩, + ⟨⟨1608200795818274093081489474401329598102411241695849238,1608200795818274093081489474401329598102411241697635415⟩,⟨8544232004509985992321800346992826632470909179645094679,8544232004509985992321800346992826632470909179646890170⟩⟩, + ⟨⟨-1338167910828413531130792018144463721561028005092169997,-1338167910828413531130792018144463721561028005089323405⟩,⟨20739909095725076361806701467739427252857060187525432316,20739909095725076361806701467739427252857060187528303830⟩⟩, + ⟨⟨-16228134373420273570061649103228121510906622886698939881,-16228134373420273570061649103228121510906622886690222846⟩,⟨43952797097113441893298130816949706380281448599398762874,43952797097113441893298130816949706380281448599407465058⟩⟩, + ⟨⟨-62601997212223184391375148109494109882484635264589491278,-62601997212223184391375148109494109882484635264568944200⟩,⟨78340201433552304498468008884052885871608028493830513908,78340201433552304498468008884052885871608028493851108875⟩⟩, + ⟨⟨-174658157751895820450904632101940976503175867774138835401,-174658157751895820450904632101940976503175867774099839708⟩,⟨107227553941046944677471844841632763407379862516965680112,107227553941046944677471844841632763407379862517005264540⟩⟩] +lemma tw1_0_1_9_calc (j : Fin 31) : taylorWaveBox 1 0 1 9 j = tw1_0_1_9 j := by + revert j + decide +kernel +def tw1_0_1_10 : Fin 31 → CI := ![⟨⟨-14248343559423917859577076057784563281946306327313060844,-14248343559423917859577076057784563281946306327303781161⟩,⟨43718920573371266243801223837022896085103946096551536313,43718920573371266243801223837022896085103946096560753968⟩⟩, + ⟨⟨-12673935694029659533999936819886225786796240523893323311,-12673935694029659533999936819886225786796240523888659448⟩,⟨16849011334645277993960132660929918076880040354282221126,16849011334645277993960132660929918076880040354286889916⟩⟩, + ⟨⟨-7460774639910965029662461428290942513920441240519544354,-7460774639910965029662461428290942513920441240517566256⟩,⟨5369735484032956041085843074249716236418206434088018992,5369735484032956041085843074249716236418206434089993833⟩⟩, + ⟨⟨-3549730694881754895192792264274339070519901161642366906,-3549730694881754895192792264274339070519901161641709715⟩,⟨1319493460739064166995105092971291712646555275787516088,1319493460739064166995105092971291712646555275788162689⟩⟩, + ⟨⟨-1451184184979596447407144215964578935367772750975322285,-1451184184979596447407144215964578935367772750974948767⟩,⟨190081284830221647120832971590373003718629636793722925,190081284830221647120832971590373003718629636794094855⟩⟩, + ⟨⟨-525688315471093472628960156641310545105505139741630788,-525688315471093472628960156641310545105505139741480336⟩,⟨-22156800241046371663173465962212498771191257512862146,-22156800241046371663173465962212498771191257512711304⟩⟩, + ⟨⟨-172408414859916899167591134878161459518034245270986755,-172408414859916899167591134878161459518034245270945231⟩,⟨-25407056839251439595766389047617758698855964862121018,-25407056839251439595766389047617758698855964862079463⟩⟩, + ⟨⟨-51933843854550539645347442288680383063387778845034336,-51933843854550539645347442288680383063387778845015843⟩,⟨-8473834392206609522869240473544877699837377299016740,-8473834392206609522869240473544877699837377298998283⟩⟩, + ⟨⟨-14304279251466799326718566788106320488183695384657230,-14304279251466799326718566788106320488183695384651514⟩,⟨-851499700650106087215759068362470020698159821340958,-851499700650106087215759068362470020698159821335235⟩⟩, + ⟨⟨-3417481280275936897591562049634599259638593889714121,-3417481280275936897591562049634599259638593889712952⟩,⟨699337719657140005252698168701240158398955614057301,699337719657140005252698168701240158398955614058469⟩⟩, + ⟨⟨-588489733880182136315319454094796674007967874115520,-588489733880182136315319454094796674007967874115119⟩,⟨477343409756185716588527306967540720267711397869243,477343409756185716588527306967540720267711397869644⟩⟩, + ⟨⟨-16014663722073685161910859455357504933719183508942,-16014663722073685161910859455357504933719183508854⟩,⟨148541396902196272260694159749732694455851232884289,148541396902196272260694159749732694455851232884377⟩⟩, + ⟨⟨25155204739759065491524789311653507438741769230999,25155204739759065491524789311653507438741769231012⟩,⟨13188219220937121628482712458547398679575787492559,13188219220937121628482712458547398679575787492572⟩⟩, + ⟨⟨1927961725286025762734152430307266234099901706648,1927961725286025762734152430307266234099901706651⟩,⟨-5710600657416401694881187609713000358926811932161,-5710600657416401694881187609713000358926811932158⟩⟩, + ⟨⟨-1716240364970869094911044351566277190818895798635,-1716240364970869094911044351566277190818895798633⟩,⟨753758006192252838113532757828184223841551557647,753758006192252838113532757828184223841551557648⟩⟩, + ⟨⟨1200039783422367281949956705302164220391889984938,1200039783422367281949956705302164220391889984939⟩,⟨-1,1⟩⟩, + ⟨⟨-1716240364970869094911044351566277190818895798635,-1716240364970869094911044351566277190818895798633⟩,⟨-753758006192252838113532757828184223841551557648,-753758006192252838113532757828184223841551557647⟩⟩, + ⟨⟨1927961725286025762734152430307266234099901706648,1927961725286025762734152430307266234099901706651⟩,⟨5710600657416401694881187609713000358926811932158,5710600657416401694881187609713000358926811932161⟩⟩, + ⟨⟨25155204739759065491524789311653507438741769230999,25155204739759065491524789311653507438741769231012⟩,⟨-13188219220937121628482712458547398679575787492572,-13188219220937121628482712458547398679575787492559⟩⟩, + ⟨⟨-16014663722073685161910859455357504933719183508942,-16014663722073685161910859455357504933719183508854⟩,⟨-148541396902196272260694159749732694455851232884377,-148541396902196272260694159749732694455851232884289⟩⟩, + ⟨⟨-588489733880182136315319454094796674007967874115520,-588489733880182136315319454094796674007967874115119⟩,⟨-477343409756185716588527306967540720267711397869644,-477343409756185716588527306967540720267711397869243⟩⟩, + ⟨⟨-3417481280275936897591562049634599259638593889714121,-3417481280275936897591562049634599259638593889712952⟩,⟨-699337719657140005252698168701240158398955614058469,-699337719657140005252698168701240158398955614057301⟩⟩, + ⟨⟨-14304279251466799326718566788106320488183695384657230,-14304279251466799326718566788106320488183695384651514⟩,⟨851499700650106087215759068362470020698159821335235,851499700650106087215759068362470020698159821340958⟩⟩, + ⟨⟨-51933843854550539645347442288680383063387778845034336,-51933843854550539645347442288680383063387778845015843⟩,⟨8473834392206609522869240473544877699837377298998283,8473834392206609522869240473544877699837377299016740⟩⟩, + ⟨⟨-172408414859916899167591134878161459518034245270986755,-172408414859916899167591134878161459518034245270945231⟩,⟨25407056839251439595766389047617758698855964862079463,25407056839251439595766389047617758698855964862121018⟩⟩, + ⟨⟨-525688315471093472628960156641310545105505139741630788,-525688315471093472628960156641310545105505139741480336⟩,⟨22156800241046371663173465962212498771191257512711304,22156800241046371663173465962212498771191257512862146⟩⟩, + ⟨⟨-1451184184979596447407144215964578935367772750975322285,-1451184184979596447407144215964578935367772750974948767⟩,⟨-190081284830221647120832971590373003718629636794094855,-190081284830221647120832971590373003718629636793722925⟩⟩, + ⟨⟨-3549730694881754895192792264274339070519901161642366906,-3549730694881754895192792264274339070519901161641709715⟩,⟨-1319493460739064166995105092971291712646555275788162689,-1319493460739064166995105092971291712646555275787516088⟩⟩, + ⟨⟨-7460774639910965029662461428290942513920441240519544354,-7460774639910965029662461428290942513920441240517566256⟩,⟨-5369735484032956041085843074249716236418206434089993833,-5369735484032956041085843074249716236418206434088018992⟩⟩, + ⟨⟨-12673935694029659533999936819886225786796240523893323311,-12673935694029659533999936819886225786796240523888659448⟩,⟨-16849011334645277993960132660929918076880040354286889916,-16849011334645277993960132660929918076880040354282221126⟩⟩, + ⟨⟨-14248343559423917859577076057784563281946306327313060843,-14248343559423917859577076057784563281946306327303781161⟩,⟨-43718920573371266243801223837022896085103946096560753968,-43718920573371266243801223837022896085103946096551536313⟩⟩] +lemma tw1_0_1_10_calc (j : Fin 31) : taylorWaveBox 1 0 1 10 j = tw1_0_1_10 j := by + revert j + decide +kernel +def tw1_0_1_11 : Fin 31 → CI := ![⟨⟨9492951131069560990261273746887891926051709223802306343,9492951131069560990261273746887891926051709223804294383⟩,⟨756359097758122054999332951345943604183164065254853897,756359097758122054999332951345943604183164065256837074⟩⟩, + ⟨⟨3779474611003323105539590171367007741109539635708279277,3779474611003323105539590171367007741109539635709330006⟩,⟨1567824687748036570355752276686000054922818407173887024,1567824687748036570355752276686000054922818407174933864⟩⟩, + ⟨⟨1297791253865208270740267815195620489792200283184422963,1297791253865208270740267815195620489792200283184862911⟩,⟨1042619721413431939477013735639384672101655511585667674,1042619721413431939477013735639384672101655511586109267⟩⟩, + ⟨⟨384146324343406675480700869355151216825497850356043208,384146324343406675480700869355151216825497850356176020⟩,⟨508113568433201444469176033484428663112593911523595625,508113568433201444469176033484428663112593911523730432⟩⟩, + ⟨⟨98210444941958107168809518493839384825077240301829094,98210444941958107168809518493839384825077240301899329⟩,⟨205126310406352091913494518931825597520906178760227399,205126310406352091913494518931825597520906178760297799⟩⟩, + ⟨⟨22432984492392533475184354900795297678502404690051505,22432984492392533475184354900795297678502404690077363⟩,⟨71647747892014483945698926290762762292846747308320217,71647747892014483945698926290762762292846747308346049⟩⟩, + ⟨⟨5262930026956148992107516930020926614178313378807117,5262930026956148992107516930020926614178313378813912⟩,⟨22060171491814943305715048322291278791808195905077122,22060171491814943305715048322291278791808195905083948⟩⟩, + ⟨⟨1599945510169850170955463608728810384176078765314304,1599945510169850170955463608728810384176078765317133⟩,⟨5987507127164689666439488536678998354015607195845684,5987507127164689666439488536678998354015607195848518⟩⟩, + ⟨⟨611333891333436079939228896723579829982669526632849,611333891333436079939228896723579829982669526633635⟩,⟨1385460534247357422635202496409569777702036280273771,1385460534247357422635202496409569777702036280274557⟩⟩, + ⟨⟨221508581866421130539916023339423390872242984730334,221508581866421130539916023339423390872242984730485⟩,⟨241490090728811766540377346399830710045874625817403,241490090728811766540377346399830710045874625817554⟩⟩, + ⟨⟨60486131775483978426901473316341213386035867842379,60486131775483978426901473316341213386035867842426⟩,⟨16433112588754852546808834506201563932490813701133,16433112588754852546808834506201563932490813701179⟩⟩, + ⟨⟨8751059079845903884971613070094670449867730981785,8751059079845903884971613070094670449867730981795⟩,⟨-6319305217722004588235551930418449198555299877757,-6319305217722004588235551930418449198555299877747⟩⟩, + ⟨⟨-684626603506939802054970092957344649273301997257,-684626603506939802054970092957344649273301997255⟩,⟨-1650587455795994204285000142730233204723369763508,-1650587455795994204285000142730233204723369763505⟩⟩, + ⟨⟨-246519211790888873081137224319350908317791179421,-246519211790888873081137224319350908317791179420⟩,⟨224237739647034687842642795152127948868341260304,224237739647034687842642795152127948868341260305⟩⟩, + ⟨⟨93069324168505827909345022271734800254172905111,93069324168505827909345022271734800254172905112⟩,⟨-13389205517223543416994676499939722232398237055,-13389205517223543416994676499939722232398237054⟩⟩, + ⟨⟨-58000556424849163061388472082529462719543854416,-58000556424849163061388472082529462719543854415⟩,⟨-1,1⟩⟩, + ⟨⟨93069324168505827909345022271734800254172905111,93069324168505827909345022271734800254172905112⟩,⟨13389205517223543416994676499939722232398237054,13389205517223543416994676499939722232398237055⟩⟩, + ⟨⟨-246519211790888873081137224319350908317791179421,-246519211790888873081137224319350908317791179420⟩,⟨-224237739647034687842642795152127948868341260305,-224237739647034687842642795152127948868341260304⟩⟩, + ⟨⟨-684626603506939802054970092957344649273301997257,-684626603506939802054970092957344649273301997255⟩,⟨1650587455795994204285000142730233204723369763505,1650587455795994204285000142730233204723369763508⟩⟩, + ⟨⟨8751059079845903884971613070094670449867730981785,8751059079845903884971613070094670449867730981795⟩,⟨6319305217722004588235551930418449198555299877747,6319305217722004588235551930418449198555299877757⟩⟩, + ⟨⟨60486131775483978426901473316341213386035867842379,60486131775483978426901473316341213386035867842426⟩,⟨-16433112588754852546808834506201563932490813701179,-16433112588754852546808834506201563932490813701133⟩⟩, + ⟨⟨221508581866421130539916023339423390872242984730334,221508581866421130539916023339423390872242984730485⟩,⟨-241490090728811766540377346399830710045874625817554,-241490090728811766540377346399830710045874625817403⟩⟩, + ⟨⟨611333891333436079939228896723579829982669526632849,611333891333436079939228896723579829982669526633635⟩,⟨-1385460534247357422635202496409569777702036280274557,-1385460534247357422635202496409569777702036280273771⟩⟩, + ⟨⟨1599945510169850170955463608728810384176078765314304,1599945510169850170955463608728810384176078765317133⟩,⟨-5987507127164689666439488536678998354015607195848518,-5987507127164689666439488536678998354015607195845684⟩⟩, + ⟨⟨5262930026956148992107516930020926614178313378807117,5262930026956148992107516930020926614178313378813912⟩,⟨-22060171491814943305715048322291278791808195905083948,-22060171491814943305715048322291278791808195905077122⟩⟩, + ⟨⟨22432984492392533475184354900795297678502404690051505,22432984492392533475184354900795297678502404690077363⟩,⟨-71647747892014483945698926290762762292846747308346049,-71647747892014483945698926290762762292846747308320217⟩⟩, + ⟨⟨98210444941958107168809518493839384825077240301829094,98210444941958107168809518493839384825077240301899329⟩,⟨-205126310406352091913494518931825597520906178760297799,-205126310406352091913494518931825597520906178760227399⟩⟩, + ⟨⟨384146324343406675480700869355151216825497850356043208,384146324343406675480700869355151216825497850356176020⟩,⟨-508113568433201444469176033484428663112593911523730432,-508113568433201444469176033484428663112593911523595625⟩⟩, + ⟨⟨1297791253865208270740267815195620489792200283184422963,1297791253865208270740267815195620489792200283184862911⟩,⟨-1042619721413431939477013735639384672101655511586109267,-1042619721413431939477013735639384672101655511585667674⟩⟩, + ⟨⟨3779474611003323105539590171367007741109539635708279277,3779474611003323105539590171367007741109539635709330006⟩,⟨-1567824687748036570355752276686000054922818407174933864,-1567824687748036570355752276686000054922818407173887024⟩⟩, + ⟨⟨9492951131069560990261273746887891926051709223802306343,9492951131069560990261273746887891926051709223804294383⟩,⟨-756359097758122054999332951345943604183164065256837074,-756359097758122054999332951345943604183164065254853897⟩⟩] +lemma tw1_0_1_11_calc (j : Fin 31) : taylorWaveBox 1 0 1 11 j = tw1_0_1_11 j := by + revert j + decide +kernel +def tw1_0_1_12 : Fin 31 → CI := ![⟨⟨-284603829954076892512720968537614863558912140686875930,-284603829954076892512720968537614863558912140686437272⟩,⟨-1809123027300791913647993981534350103730197273914933250,-1809123027300791913647993981534350103730197273914489949⟩⟩, + ⟨⟨104014605061735523145302108923600036342395413515499446,104014605061735523145302108923600036342395413515727960⟩,⟨-730006567020341012304567845405715343109751526163998892,-730006567020341012304567845405715343109751526163769353⟩⟩, + ⟨⟨110728772444896354196446212897278500247506508049655846,110728772444896354196446212897278500247506508049745407⟩,⟨-257120874379671862042023073139563801113529592879260654,-257120874379671862042023073139563801113529592879171431⟩⟩, + ⟨⟨58773165363848086506598837608374159697930099337664800,58773165363848086506598837608374159697930099337690051⟩,⟨-80272239361641926820631310683073073671505080542705251,-80272239361641926820631310683073073671505080542680251⟩⟩, + ⟨⟨23721914459241041726615890910704862287085855298332944,23721914459241041726615890910704862287085855298345163⟩,⟨-22673941472539349463474923547814003802468784985264676,-22673941472539349463474923547814003802468784985252461⟩⟩, + ⟨⟨7925275027112079640652215362287823946362261922187826,7925275027112079640652215362287823946362261922192057⟩,⟨-6012182266347793936137743654844307702964207434787403,-6012182266347793936137743654844307702964207434783174⟩⟩, + ⟨⟨2238945706142849551484754045520107054359138758874083,2238945706142849551484754045520107054359138758875142⟩,⟨-1580557549546046299114177968820433234101309579415124,-1580557549546046299114177968820433234101309579414070⟩⟩, + ⟨⟨525347261162381212400439499998499849173906924122432,525347261162381212400439499998499849173906924122830⟩,⟨-428286217228611992735660090453995370391547668076754,-428286217228611992735660090453995370391547668076356⟩⟩, + ⟨⟨93467639010943317480081421624174281693782190752784,93467639010943317480081421624174281693782190752889⟩,⟨-115528269538703983693151420387010498189155063441164,-115528269538703983693151420387010498189155063441060⟩⟩, + ⟨⟨8122134639266250830431744124027366338943069515025,8122134639266250830431744124027366338943069515043⟩,⟨-27406853106372917268211635288132371409019955413410,-27406853106372917268211635288132371409019955413392⟩⟩, + ⟨⟨-1690282956767847920313883175163476542585539769911,-1690282956767847920313883175163476542585539769905⟩,⟨-4507809765768370699883931142277098203509976214841,-4507809765768370699883931142277098203509976214836⟩⟩, + ⟨⟨-707868563055933829249100511920041017744302682335,-707868563055933829249100511920041017744302682333⟩,⟨-152775370688345378441693581165629615168364164913,-152775370688345378441693581165629615168364164911⟩⟩, + ⟨⟨-31005856376199069881059814593795879317251414178,-31005856376199069881059814593795879317251414177⟩,⟨99683166884677736121282061433067713265704050162,99683166884677736121282061433067713265704050163⟩⟩, + ⟨⟨16654737587686587045336229467821572093106233899,16654737587686587045336229467821572093106233900⟩,⟨-3917234914506872888171873565055189199232894001,-3917234914506872888171873565055189199232894000⟩⟩, + ⟨⟨-4343859872963313712785293638143453263694793919,-4343859872963313712785293638143453263694793918⟩,⟨-559355389671494517567085414119284928288389726,-559355389671494517567085414119284928288389725⟩⟩, + ⟨⟨2603058885263234475904343958191748490434420460,2603058885263234475904343958191748490434420461⟩,⟨-1,1⟩⟩, + ⟨⟨-4343859872963313712785293638143453263694793919,-4343859872963313712785293638143453263694793918⟩,⟨559355389671494517567085414119284928288389725,559355389671494517567085414119284928288389726⟩⟩, + ⟨⟨16654737587686587045336229467821572093106233899,16654737587686587045336229467821572093106233900⟩,⟨3917234914506872888171873565055189199232894000,3917234914506872888171873565055189199232894001⟩⟩, + ⟨⟨-31005856376199069881059814593795879317251414178,-31005856376199069881059814593795879317251414177⟩,⟨-99683166884677736121282061433067713265704050163,-99683166884677736121282061433067713265704050162⟩⟩, + ⟨⟨-707868563055933829249100511920041017744302682335,-707868563055933829249100511920041017744302682333⟩,⟨152775370688345378441693581165629615168364164911,152775370688345378441693581165629615168364164913⟩⟩, + ⟨⟨-1690282956767847920313883175163476542585539769911,-1690282956767847920313883175163476542585539769905⟩,⟨4507809765768370699883931142277098203509976214836,4507809765768370699883931142277098203509976214841⟩⟩, + ⟨⟨8122134639266250830431744124027366338943069515025,8122134639266250830431744124027366338943069515043⟩,⟨27406853106372917268211635288132371409019955413392,27406853106372917268211635288132371409019955413410⟩⟩, + ⟨⟨93467639010943317480081421624174281693782190752784,93467639010943317480081421624174281693782190752889⟩,⟨115528269538703983693151420387010498189155063441060,115528269538703983693151420387010498189155063441164⟩⟩, + ⟨⟨525347261162381212400439499998499849173906924122432,525347261162381212400439499998499849173906924122830⟩,⟨428286217228611992735660090453995370391547668076356,428286217228611992735660090453995370391547668076754⟩⟩, + ⟨⟨2238945706142849551484754045520107054359138758874083,2238945706142849551484754045520107054359138758875142⟩,⟨1580557549546046299114177968820433234101309579414070,1580557549546046299114177968820433234101309579415124⟩⟩, + ⟨⟨7925275027112079640652215362287823946362261922187826,7925275027112079640652215362287823946362261922192057⟩,⟨6012182266347793936137743654844307702964207434783174,6012182266347793936137743654844307702964207434787403⟩⟩, + ⟨⟨23721914459241041726615890910704862287085855298332944,23721914459241041726615890910704862287085855298345163⟩,⟨22673941472539349463474923547814003802468784985252461,22673941472539349463474923547814003802468784985264676⟩⟩, + ⟨⟨58773165363848086506598837608374159697930099337664800,58773165363848086506598837608374159697930099337690051⟩,⟨80272239361641926820631310683073073671505080542680251,80272239361641926820631310683073073671505080542705251⟩⟩, + ⟨⟨110728772444896354196446212897278500247506508049655846,110728772444896354196446212897278500247506508049745407⟩,⟨257120874379671862042023073139563801113529592879171431,257120874379671862042023073139563801113529592879260654⟩⟩, + ⟨⟨104014605061735523145302108923600036342395413515499446,104014605061735523145302108923600036342395413515727960⟩,⟨730006567020341012304567845405715343109751526163769353,730006567020341012304567845405715343109751526163998892⟩⟩, + ⟨⟨-284603829954076892512720968537614863558912140686875930,-284603829954076892512720968537614863558912140686437272⟩,⟨1809123027300791913647993981534350103730197273914489949,1809123027300791913647993981534350103730197273914933250⟩⟩] +lemma tw1_0_1_12_calc (j : Fin 31) : taylorWaveBox 1 0 1 12 j = tw1_0_1_12 j := by + revert j + decide +kernel +def tw1_0_1_13 : Fin 31 → CI := ![⟨⟨-303830076648897534236467691620799031057265970656238565,-303830076648897534236467691620799031057265970656143734⟩,⟨125453107124957636984105724658647087612554577942271322,125453107124957636984105724658647087612554577942364894⟩⟩, + ⟨⟨-123273123041438846048772264046490132378544330968778211,-123273123041438846048772264046490132378544330968732376⟩,⟨13634735174416227863454822135320208747506821095247295,13634735174416227863454822135320208747506821095292953⟩⟩, + ⟨⟨-43530779864662755672877357748138920642023176777376689,-43530779864662755672877357748138920642023176777360006⟩,⟨-5978787016933295361812625713383835878187315373748830,-5978787016933295361812625713383835878187315373732099⟩⟩, + ⟨⟨-13670003592280919204523349835616835472810210016915407,-13670003592280919204523349835616835472810210016911043⟩,⟨-4843846279802778778374253308229668497672838673927530,-4843846279802778778374253308229668497672838673923149⟩⟩, + ⟨⟨-3895717405325384761849111253046768570812135468825883,-3895717405325384761849111253046768570812135468823889⟩,⟨-2086423249954119375269718649880364988084733915070551,-2086423249954119375269718649880364988084733915068560⟩⟩, + ⟨⟨-1031522315889944007430775578492402242305035415376280,-1031522315889944007430775578492402242305035415375611⟩,⟨-670309920461243560843938723887763089264232437406893,-670309920461243560843938723887763089264232437406223⟩⟩, + ⟨⟨-259300337970388665249901078732825971771114161595256,-259300337970388665249901078732825971771114161595105⟩,⟨-168255606257096342683651863376494048091817794369361,-168255606257096342683651863376494048091817794369210⟩⟩, + ⟨⟨-61872385984955101230151694918548109859839364535845,-61872385984955101230151694918548109859839364535792⟩,⟨-30961532476907523602207298173296348962156129875397,-30961532476907523602207298173296348962156129875344⟩⟩, + ⟨⟨-13324790492917487945322616278673079103438308302894,-13324790492917487945322616278673079103438308302880⟩,⟨-2773580704233681202056701972040825415459396770248,-2773580704233681202056701972040825415459396770234⟩⟩, + ⟨⟨-2253578477455719653884118392103180751952564567597,-2253578477455719653884118392103180751952564567594⟩,⟨580983611378031502194198102848567495657328392393,580983611378031502194198102848567495657328392396⟩⟩, + ⟨⟨-191451334627776080184660483521502611792432395997,-191451334627776080184660483521502611792432395996⟩,⟨287159370205389591106413001493194675874719769347,287159370205389591106413001493194675874719769348⟩⟩, + ⟨⟨22540640406805233483494367789845238266849655829,22540640406805233483494367789845238266849655830⟩,⟨39345138687218547927124044755769372287299506962,39345138687218547927124044755769372287299506963⟩⟩, + ⟨⟨4778369216701573640278391444191764755893084538,4778369216701573640278391444191764755893084539⟩,⟨-3093210167955949686876724852449989072988980195,-3093210167955949686876724852449989072988980194⟩⟩, + ⟨⟨-788790212482191050311706845383270313077136016,-788790212482191050311706845383270313077136015⟩,⟨-223488590217048564271878474108268950106299801,-223488590217048564271878474108268950106299800⟩⟩, + ⟨⟨175446781375971543271258462768694628456864569,175446781375971543271258462768694628456864570⟩,⟨73973328458152602638678890799113867865976396,73973328458152602638678890799113867865976397⟩⟩, + ⟨⟨-109036675610728185738210053643879284450146993,-109036675610728185738210053643879284450146992⟩,⟨-1,1⟩⟩, + ⟨⟨175446781375971543271258462768694628456864569,175446781375971543271258462768694628456864570⟩,⟨-73973328458152602638678890799113867865976397,-73973328458152602638678890799113867865976396⟩⟩, + ⟨⟨-788790212482191050311706845383270313077136016,-788790212482191050311706845383270313077136015⟩,⟨223488590217048564271878474108268950106299800,223488590217048564271878474108268950106299801⟩⟩, + ⟨⟨4778369216701573640278391444191764755893084538,4778369216701573640278391444191764755893084539⟩,⟨3093210167955949686876724852449989072988980194,3093210167955949686876724852449989072988980195⟩⟩, + ⟨⟨22540640406805233483494367789845238266849655829,22540640406805233483494367789845238266849655830⟩,⟨-39345138687218547927124044755769372287299506963,-39345138687218547927124044755769372287299506962⟩⟩, + ⟨⟨-191451334627776080184660483521502611792432395997,-191451334627776080184660483521502611792432395996⟩,⟨-287159370205389591106413001493194675874719769348,-287159370205389591106413001493194675874719769347⟩⟩, + ⟨⟨-2253578477455719653884118392103180751952564567597,-2253578477455719653884118392103180751952564567594⟩,⟨-580983611378031502194198102848567495657328392396,-580983611378031502194198102848567495657328392393⟩⟩, + ⟨⟨-13324790492917487945322616278673079103438308302894,-13324790492917487945322616278673079103438308302880⟩,⟨2773580704233681202056701972040825415459396770234,2773580704233681202056701972040825415459396770248⟩⟩, + ⟨⟨-61872385984955101230151694918548109859839364535845,-61872385984955101230151694918548109859839364535792⟩,⟨30961532476907523602207298173296348962156129875344,30961532476907523602207298173296348962156129875397⟩⟩, + ⟨⟨-259300337970388665249901078732825971771114161595256,-259300337970388665249901078732825971771114161595105⟩,⟨168255606257096342683651863376494048091817794369210,168255606257096342683651863376494048091817794369361⟩⟩, + ⟨⟨-1031522315889944007430775578492402242305035415376280,-1031522315889944007430775578492402242305035415375611⟩,⟨670309920461243560843938723887763089264232437406223,670309920461243560843938723887763089264232437406893⟩⟩, + ⟨⟨-3895717405325384761849111253046768570812135468825883,-3895717405325384761849111253046768570812135468823889⟩,⟨2086423249954119375269718649880364988084733915068560,2086423249954119375269718649880364988084733915070551⟩⟩, + ⟨⟨-13670003592280919204523349835616835472810210016915407,-13670003592280919204523349835616835472810210016911043⟩,⟨4843846279802778778374253308229668497672838673923149,4843846279802778778374253308229668497672838673927530⟩⟩, + ⟨⟨-43530779864662755672877357748138920642023176777376689,-43530779864662755672877357748138920642023176777360006⟩,⟨5978787016933295361812625713383835878187315373732099,5978787016933295361812625713383835878187315373748830⟩⟩, + ⟨⟨-123273123041438846048772264046490132378544330968778211,-123273123041438846048772264046490132378544330968732376⟩,⟨-13634735174416227863454822135320208747506821095292953,-13634735174416227863454822135320208747506821095247295⟩⟩, + ⟨⟨-303830076648897534236467691620799031057265970656238565,-303830076648897534236467691620799031057265970656143734⟩,⟨-125453107124957636984105724658647087612554577942364894,-125453107124957636984105724658647087612554577942271322⟩⟩] +lemma tw1_0_1_13_calc (j : Fin 31) : taylorWaveBox 1 0 1 13 j = tw1_0_1_13 j := by + revert j + decide +kernel +def tw1_0_1_14 : Fin 31 → CI := ![⟨⟨32458595861006892008407684418964716970011723911628466,32458595861006892008407684418964716970011723911646796⟩,⟨44787548042109011283820018296377674367167674711387446,44787548042109011283820018296377674367167674711406003⟩⟩, + ⟨⟨6923170659172343704074058245014527368826907828797802,6923170659172343704074058245014527368826907828806250⟩,⟨18290381619310594228516809564609451638352327538663642,18290381619310594228516809564609451638352327538672113⟩⟩, + ⟨⟨861609888240307794759377824047985132594047404074755,861609888240307794759377824047985132594047404077667⟩,⟨6407799323240831683692170020479598048773954584987541,6407799323240831683692170020479598048773954584990448⟩⟩, + ⟨⟨-97238209572079757960567924417454623558607314558654,-97238209572079757960567924417454623558607314557941⟩,⟨1979616684432492372434832725284160440900768089205869,1979616684432492372434832725284160440900768089206582⟩⟩, + ⟨⟨-97368352937386094109193476617191525467404282983251,-97368352937386094109193476617191525467404282982932⟩,⟨549386180649161820575956640660004808283502312697341,549386180649161820575956640660004808283502312697660⟩⟩, + ⟨⟨-32611682885015321917755127975793746339721410240891,-32611682885015321917755127975793746339721410240792⟩,⟨138844638522345925063622357903732158505980868714400,138844638522345925063622357903732158505980868714498⟩⟩, + ⟨⟨-6335755056441915588880237860360945516118697771951,-6335755056441915588880237860360945516118697771930⟩,⟨32064133358067494863949337612096520090870953347795,32064133358067494863949337612096520090870953347816⟩⟩, + ⟨⟨-272180500045869654416478190785129923806725116367,-272180500045869654416478190785129923806725116360⟩,⟨6615240794677987259121978553031933265263923722292,6615240794677987259121978553031933265263923722300⟩⟩, + ⟨⟨311477794345517895717823412701998569403699989951,311477794345517895717823412701998569403699989953⟩,⟨1126374674356323183420265285724949806020647225522,1126374674356323183420265285724949806020647225525⟩⟩, + ⟨⟨126523108308313903875734166613229859049883824242,126523108308313903875734166613229859049883824243⟩,⟨124681193371795534139413354143893908928049176996,124681193371795534139413354143893908928049176998⟩⟩, + ⟨⟨23180390354949012395409450056594950615368455659,23180390354949012395409450056594950615368455660⟩,⟨-834671639983655117063826970546652909377159276,-834671639983655117063826970546652909377159275⟩⟩, + ⟨⟨831586657999050540592435751615397167868905764,831586657999050540592435751615397167868905765⟩,⟨-2528600959695030371663847853252273937943132269,-2528600959695030371663847853252273937943132268⟩⟩, + ⟨⟨-288871186379737460439632376021715771878441007,-288871186379737460439632376021715771878441006⟩,⟨-34901687705600875930885645922139024363461559,-34901687705600875930885645922139024363461558⟩⟩, + ⟨⟨26099954534559935217750832784200930693888210,26099954534559935217750832784200930693888211⟩,⟨25985109308987628739783690236633672723657466,25985109308987628739783690236633672723657467⟩⟩, + ⟨⟨-6082855155675344860567371814990494671457209,-6082855155675344860567371814990494671457208⟩,⟨-4818753313719819335128287462608173335637270,-4818753313719819335128287462608173335637269⟩⟩, + ⟨⟨4281860238381463128935402332610603882126296,4281860238381463128935402332610603882126297⟩,⟨-1,1⟩⟩, + ⟨⟨-6082855155675344860567371814990494671457209,-6082855155675344860567371814990494671457208⟩,⟨4818753313719819335128287462608173335637269,4818753313719819335128287462608173335637270⟩⟩, + ⟨⟨26099954534559935217750832784200930693888210,26099954534559935217750832784200930693888211⟩,⟨-25985109308987628739783690236633672723657467,-25985109308987628739783690236633672723657466⟩⟩, + ⟨⟨-288871186379737460439632376021715771878441007,-288871186379737460439632376021715771878441006⟩,⟨34901687705600875930885645922139024363461558,34901687705600875930885645922139024363461559⟩⟩, + ⟨⟨831586657999050540592435751615397167868905764,831586657999050540592435751615397167868905765⟩,⟨2528600959695030371663847853252273937943132268,2528600959695030371663847853252273937943132269⟩⟩, + ⟨⟨23180390354949012395409450056594950615368455659,23180390354949012395409450056594950615368455660⟩,⟨834671639983655117063826970546652909377159275,834671639983655117063826970546652909377159276⟩⟩, + ⟨⟨126523108308313903875734166613229859049883824242,126523108308313903875734166613229859049883824243⟩,⟨-124681193371795534139413354143893908928049176998,-124681193371795534139413354143893908928049176996⟩⟩, + ⟨⟨311477794345517895717823412701998569403699989951,311477794345517895717823412701998569403699989953⟩,⟨-1126374674356323183420265285724949806020647225525,-1126374674356323183420265285724949806020647225522⟩⟩, + ⟨⟨-272180500045869654416478190785129923806725116367,-272180500045869654416478190785129923806725116360⟩,⟨-6615240794677987259121978553031933265263923722300,-6615240794677987259121978553031933265263923722292⟩⟩, + ⟨⟨-6335755056441915588880237860360945516118697771951,-6335755056441915588880237860360945516118697771930⟩,⟨-32064133358067494863949337612096520090870953347816,-32064133358067494863949337612096520090870953347795⟩⟩, + ⟨⟨-32611682885015321917755127975793746339721410240891,-32611682885015321917755127975793746339721410240792⟩,⟨-138844638522345925063622357903732158505980868714498,-138844638522345925063622357903732158505980868714400⟩⟩, + ⟨⟨-97368352937386094109193476617191525467404282983251,-97368352937386094109193476617191525467404282982932⟩,⟨-549386180649161820575956640660004808283502312697660,-549386180649161820575956640660004808283502312697341⟩⟩, + ⟨⟨-97238209572079757960567924417454623558607314558654,-97238209572079757960567924417454623558607314557941⟩,⟨-1979616684432492372434832725284160440900768089206582,-1979616684432492372434832725284160440900768089205869⟩⟩, + ⟨⟨861609888240307794759377824047985132594047404074755,861609888240307794759377824047985132594047404077667⟩,⟨-6407799323240831683692170020479598048773954584990448,-6407799323240831683692170020479598048773954584987541⟩⟩, + ⟨⟨6923170659172343704074058245014527368826907828797802,6923170659172343704074058245014527368826907828806250⟩,⟨-18290381619310594228516809564609451638352327538672113,-18290381619310594228516809564609451638352327538663642⟩⟩, + ⟨⟨32458595861006892008407684418964716970011723911628466,32458595861006892008407684418964716970011723911646796⟩,⟨-44787548042109011283820018296377674367167674711406003,-44787548042109011283820018296377674367167674711387446⟩⟩] +lemma tw1_0_1_14_calc (j : Fin 31) : taylorWaveBox 1 0 1 14 j = tw1_0_1_14 j := by + revert j + decide +kernel +def tw1_0_1_15 : Fin 31 → CI := ![⟨⟨5697599371996203937281854284675180783073752501126954,5697599371996203937281854284675180783073752501130319⟩,⟨-6653955978387883572512124822183501985717406083701229,-6653955978387883572512124822183501985717406083697895⟩⟩, + ⟨⟨2373051581292366077231248911597176092156263671986855,2373051581292366077231248911597176092156263671988320⟩,⟨-1671098992971722859382397974036340983653377340318470,-1671098992971722859382397974036340983653377340317008⟩⟩, + ⟨⟨823380589450528524012756690941427066210588571130795,823380589450528524012756690941427066210588571131272⟩,⟨-351827640011387984440194568353657033962458713026254,-351827640011387984440194568353657033962458713025777⟩⟩, + ⟨⟨247482121027014242782955294726102541410473016147333,247482121027014242782955294726102541410473016147448⟩,⟨-61186742156125495451726063055713556627563378313857,-61186742156125495451726063055713556627563378313743⟩⟩, + ⟨⟨65642593491606565212821312468946438389404996515193,65642593491606565212821312468946438389404996515241⟩,⟨-9309158809534800586688367513599778468572581556107,-9309158809534800586688367513599778468572581556059⟩⟩, + ⟨⟨15460007868834230392481470818704622394886081565951,15460007868834230392481470818704622394886081565965⟩,⟨-1783560892849788289897677438902512751878953635895,-1783560892849788289897677438902512751878953635880⟩⟩, + ⟨⟨3196887953456858597814649458548554480944896619535,3196887953456858597814649458548554480944896619539⟩,⟨-599665199420852936754800015215934636420934374401,-599665199420852936754800015215934636420934374397⟩⟩, + ⟨⟨553390274484062634905465022508194969090175215163,553390274484062634905465022508194969090175215165⟩,⟨-222143688565621993898979060471944315064181671757,-222143688565621993898979060471944315064181671755⟩⟩, + ⟨⟨69436411612195787013500078243933081804831133056,69436411612195787013500078243933081804831133057⟩,⟨-64015529088354033772741836341326945095017990331,-64015529088354033772741836341326945095017990330⟩⟩, + ⟨⟨3004060403827342283740491634522527107094007216,3004060403827342283740491634522527107094007217⟩,⟨-12402011377516263850864959551147866844260670036,-12402011377516263850864959551147866844260670035⟩⟩, + ⟨⟨-899591601401592939625930049695159917941195486,-899591601401592939625930049695159917941195485⟩,⟨-1159074530653140394813269446296285200756386585,-1159074530653140394813269446296285200756386584⟩⟩, + ⟨⟨-134576340926428795133010441278801961080200519,-134576340926428795133010441278801961080200518⟩,⟨59306460697530750446299271568793593810825413,59306460697530750446299271568793593810825414⟩⟩, + ⟨⟨9601684614347259385929814280873394071802012,9601684614347259385929814280873394071802013⟩,⟨10187175096048159295420765456925952045441136,10187175096048159295420765456925952045441137⟩⟩, + ⟨⟨-431092400371233357584865416261893056721249,-431092400371233357584865416261893056721248⟩,⟨-1496325207443915119838021325643383865591458,-1496325207443915119838021325643383865591457⟩⟩, + ⟨⟨175349382489771257466847019963303452931263,175349382489771257466847019963303452931264⟩,⟨240551206226658906647335679473470167675049,240551206226658906647335679473470167675050⟩⟩, + ⟨⟨-158257184336440534045803305942773373333902,-158257184336440534045803305942773373333901⟩,⟨-1,1⟩⟩, + ⟨⟨175349382489771257466847019963303452931263,175349382489771257466847019963303452931264⟩,⟨-240551206226658906647335679473470167675050,-240551206226658906647335679473470167675049⟩⟩, + ⟨⟨-431092400371233357584865416261893056721249,-431092400371233357584865416261893056721248⟩,⟨1496325207443915119838021325643383865591457,1496325207443915119838021325643383865591458⟩⟩, + ⟨⟨9601684614347259385929814280873394071802012,9601684614347259385929814280873394071802013⟩,⟨-10187175096048159295420765456925952045441137,-10187175096048159295420765456925952045441136⟩⟩, + ⟨⟨-134576340926428795133010441278801961080200519,-134576340926428795133010441278801961080200518⟩,⟨-59306460697530750446299271568793593810825414,-59306460697530750446299271568793593810825413⟩⟩, + ⟨⟨-899591601401592939625930049695159917941195486,-899591601401592939625930049695159917941195485⟩,⟨1159074530653140394813269446296285200756386584,1159074530653140394813269446296285200756386585⟩⟩, + ⟨⟨3004060403827342283740491634522527107094007216,3004060403827342283740491634522527107094007217⟩,⟨12402011377516263850864959551147866844260670035,12402011377516263850864959551147866844260670036⟩⟩, + ⟨⟨69436411612195787013500078243933081804831133056,69436411612195787013500078243933081804831133057⟩,⟨64015529088354033772741836341326945095017990330,64015529088354033772741836341326945095017990331⟩⟩, + ⟨⟨553390274484062634905465022508194969090175215163,553390274484062634905465022508194969090175215165⟩,⟨222143688565621993898979060471944315064181671755,222143688565621993898979060471944315064181671757⟩⟩, + ⟨⟨3196887953456858597814649458548554480944896619535,3196887953456858597814649458548554480944896619539⟩,⟨599665199420852936754800015215934636420934374397,599665199420852936754800015215934636420934374401⟩⟩, + ⟨⟨15460007868834230392481470818704622394886081565951,15460007868834230392481470818704622394886081565965⟩,⟨1783560892849788289897677438902512751878953635880,1783560892849788289897677438902512751878953635895⟩⟩, + ⟨⟨65642593491606565212821312468946438389404996515193,65642593491606565212821312468946438389404996515241⟩,⟨9309158809534800586688367513599778468572581556059,9309158809534800586688367513599778468572581556107⟩⟩, + ⟨⟨247482121027014242782955294726102541410473016147333,247482121027014242782955294726102541410473016147448⟩,⟨61186742156125495451726063055713556627563378313743,61186742156125495451726063055713556627563378313857⟩⟩, + ⟨⟨823380589450528524012756690941427066210588571130795,823380589450528524012756690941427066210588571131272⟩,⟨351827640011387984440194568353657033962458713025777,351827640011387984440194568353657033962458713026254⟩⟩, + ⟨⟨2373051581292366077231248911597176092156263671986855,2373051581292366077231248911597176092156263671988320⟩,⟨1671098992971722859382397974036340983653377340317008,1671098992971722859382397974036340983653377340318470⟩⟩, + ⟨⟨5697599371996203937281854284675180783073752501126954,5697599371996203937281854284675180783073752501130319⟩,⟨6653955978387883572512124822183501985717406083697895,6653955978387883572512124822183501985717406083701229⟩⟩] +lemma tw1_0_1_15_calc (j : Fin 31) : taylorWaveBox 1 0 1 15 j = tw1_0_1_15 j := by + revert j + decide +kernel +def tw1_0_1_16 : Fin 31 → CI := ![⟨⟨-1166662404548700119310331073805117723908194046304701,-1166662404548700119310331073805117723908194046304132⟩,⟨-596415357296199602025813552932209019260554769073564,-596415357296199602025813552932209019260554769072993⟩⟩, + ⟨⟨-309683190025116006995087873613015236712561254129572,-309683190025116006995087873613015236712561254129332⟩,⟨-263804245216727753871223941012842072988359783544677,-263804245216727753871223941012842072988359783544438⟩⟩, + ⟨⟨-73089826416047259472429363943716574476081999136529,-73089826416047259472429363943716574476081999136453⟩,⟨-91507303941228960127541136302248954638830859982970,-91507303941228960127541136302248954638830859982894⟩⟩, + ⟨⟨-15758156431435673135073802869436500360922446393281,-15758156431435673135073802869436500360922446393263⟩,⟨-26660032126550185651707664985403932700878986304221,-26660032126550185651707664985403932700878986304203⟩⟩, + ⟨⟨-3284264433059913825824030542066569181767818910249,-3284264433059913825824030542066569181767818910241⟩,⟨-6676423081778546658453621492514776068530465634394,-6676423081778546658453621492514776068530465634387⟩⟩, + ⟨⟨-712595023779881244235000638457663368959123901204,-712595023779881244235000638457663368959123901202⟩,⟨-1436786644994305955649919799249819307472633326243,-1436786644994305955649919799249819307472633326240⟩⟩, + ⟨⟨-163923101907942229167569226026587850751050368860,-163923101907942229167569226026587850751050368859⟩,⟨-258048838746782551500029653808436741393956470890,-258048838746782551500029653808436741393956470889⟩⟩, + ⟨⟨-36548692578724041520519284735262478343112233848,-36548692578724041520519284735262478343112233846⟩,⟨-35172310614063622890898453337861405832338228518,-35172310614063622890898453337861405832338228517⟩⟩, + ⟨⟨-6768772609575610773882977291728435509436227959,-6768772609575610773882977291728435509436227958⟩,⟨-2478357614348415995627841836628095309135101542,-2478357614348415995627841836628095309135101541⟩⟩, + ⟨⟨-826381264642676037474414210840560295613471508,-826381264642676037474414210840560295613471507⟩,⟨258142714896320550003398743003447598997917760,258142714896320550003398743003447598997917761⟩⟩, + ⟨⟨-24791848253133205098907673397017853189674279,-24791848253133205098907673397017853189674278⟩,⟨84072765248883352296125343356715000262661611,84072765248883352296125343356715000262661612⟩⟩, + ⟨⟨6997807170852989251702314561753877992642476,6997807170852989251702314561753877992642477⟩,⟨3149370085030458801589592702512757534476422,3149370085030458801589592702512757534476423⟩⟩, + ⟨⟨-38829109011533361127282191495553482380258,-38829109011533361127282191495553482380257⟩,⟨-634901177570489346497567816108710723143493,-634901177570489346497567816108710723143492⟩⟩, + ⟨⟨-13969593744707687104930130676765633024479,-13969593744707687104930130676765633024478⟩,⟨60591582841859910021625897873515007365691,60591582841859910021625897873515007365692⟩⟩, + ⟨⟨-3788397815849088420288107128234225077849,-3788397815849088420288107128234225077848⟩,⟨-10097056728701166438080127229937904637979,-10097056728701166438080127229937904637978⟩⟩, + ⟨⟨5524217863212969768771786828799449317212,5524217863212969768771786828799449317213⟩,⟨-1,1⟩⟩, + ⟨⟨-3788397815849088420288107128234225077849,-3788397815849088420288107128234225077848⟩,⟨10097056728701166438080127229937904637978,10097056728701166438080127229937904637979⟩⟩, + ⟨⟨-13969593744707687104930130676765633024479,-13969593744707687104930130676765633024478⟩,⟨-60591582841859910021625897873515007365692,-60591582841859910021625897873515007365691⟩⟩, + ⟨⟨-38829109011533361127282191495553482380258,-38829109011533361127282191495553482380257⟩,⟨634901177570489346497567816108710723143492,634901177570489346497567816108710723143493⟩⟩, + ⟨⟨6997807170852989251702314561753877992642476,6997807170852989251702314561753877992642477⟩,⟨-3149370085030458801589592702512757534476423,-3149370085030458801589592702512757534476422⟩⟩, + ⟨⟨-24791848253133205098907673397017853189674279,-24791848253133205098907673397017853189674278⟩,⟨-84072765248883352296125343356715000262661612,-84072765248883352296125343356715000262661611⟩⟩, + ⟨⟨-826381264642676037474414210840560295613471508,-826381264642676037474414210840560295613471507⟩,⟨-258142714896320550003398743003447598997917761,-258142714896320550003398743003447598997917760⟩⟩, + ⟨⟨-6768772609575610773882977291728435509436227959,-6768772609575610773882977291728435509436227958⟩,⟨2478357614348415995627841836628095309135101541,2478357614348415995627841836628095309135101542⟩⟩, + ⟨⟨-36548692578724041520519284735262478343112233848,-36548692578724041520519284735262478343112233846⟩,⟨35172310614063622890898453337861405832338228517,35172310614063622890898453337861405832338228518⟩⟩, + ⟨⟨-163923101907942229167569226026587850751050368860,-163923101907942229167569226026587850751050368859⟩,⟨258048838746782551500029653808436741393956470889,258048838746782551500029653808436741393956470890⟩⟩, + ⟨⟨-712595023779881244235000638457663368959123901204,-712595023779881244235000638457663368959123901202⟩,⟨1436786644994305955649919799249819307472633326240,1436786644994305955649919799249819307472633326243⟩⟩, + ⟨⟨-3284264433059913825824030542066569181767818910249,-3284264433059913825824030542066569181767818910241⟩,⟨6676423081778546658453621492514776068530465634387,6676423081778546658453621492514776068530465634394⟩⟩, + ⟨⟨-15758156431435673135073802869436500360922446393281,-15758156431435673135073802869436500360922446393263⟩,⟨26660032126550185651707664985403932700878986304203,26660032126550185651707664985403932700878986304221⟩⟩, + ⟨⟨-73089826416047259472429363943716574476081999136529,-73089826416047259472429363943716574476081999136453⟩,⟨91507303941228960127541136302248954638830859982894,91507303941228960127541136302248954638830859982970⟩⟩, + ⟨⟨-309683190025116006995087873613015236712561254129572,-309683190025116006995087873613015236712561254129332⟩,⟨263804245216727753871223941012842072988359783544438,263804245216727753871223941012842072988359783544677⟩⟩, + ⟨⟨-1166662404548700119310331073805117723908194046304701,-1166662404548700119310331073805117723908194046304132⟩,⟨596415357296199602025813552932209019260554769072993,596415357296199602025813552932209019260554769073564⟩⟩] +lemma tw1_0_1_16_calc (j : Fin 31) : taylorWaveBox 1 0 1 16 j = tw1_0_1_16 j := by + revert j + decide +kernel +def tw1_0_1_17 : Fin 31 → CI := ![⟨⟨-43598744540612650789611026980270646198416249294809,-43598744540612650789611026980270646198416249294717⟩,⟨180476518620279343842088066404943371001972616292818,180476518620279343842088066404943371001972616292910⟩⟩, + ⟨⟨-23685036074906575194875439689581034745190042805168,-23685036074906575194875439689581034745190042805129⟩,⟨48550098858641548350883122989047340418810355076630,48550098858641548350883122989047340418810355076669⟩⟩, + ⟨⟨-8510515489343701302099666709558201290583576414459,-8510515489343701302099666709558201290583576414446⟩,⟨11754278444713912996089730992507986999026059216243,11754278444713912996089730992507986999026059216256⟩⟩, + ⟨⟨-2417657843140449727771247385974821283762331497545,-2417657843140449727771247385974821283762331497542⟩,⟨2618673571968015576369922894548061249172681377809,2618673571968015576369922894548061249172681377812⟩⟩, + ⟨⟨-566013050030557672110348726310212529716747860740,-566013050030557672110348726310212529716747860738⟩,⟨552645021375210854693204710226315751133900251385,552645021375210854693204710226315751133900251387⟩⟩, + ⟨⟨-108417321160265820163598717713321253313744626188,-108417321160265820163598717713321253313744626186⟩,⟨112972242819296273814189389250029142355839458750,112972242819296273814189389250029142355839458752⟩⟩, + ⟨⟨-15912960289242429495087227384119870983906685905,-15912960289242429495087227384119870983906685904⟩,⟨22085614398351316505821989429654130926789541419,22085614398351316505821989429654130926789541420⟩⟩, + ⟨⟨-1376083644170445076235826567757075362806208549,-1376083644170445076235826567757075362806208548⟩,⟨3849000860569485588803809887538696727118652249,3849000860569485588803809887538696727118652250⟩⟩, + ⟨⟨64476854313415268422583611591052467146488323,64476854313415268422583611591052467146488324⟩,⟨517200726302856674579575032016684922463443853,517200726302856674579575032016684922463443854⟩⟩, + ⟨⟨41555635837463322799090788860201321849415394,41555635837463322799090788860201321849415395⟩,⟨37009925544702995038781213642623899681149097,37009925544702995038781213642623899681149098⟩⟩, + ⟨⟨4681289784771340454873596567055096514449499,4681289784771340454873596567055096514449500⟩,⟨-1641553018472383646338590261797874344122984,-1641553018472383646338590261797874344122983⟩⟩, + ⟨⟨-115693517154428089857811378775005501088160,-115693517154428089857811378775005501088159⟩,⟨-361273610871346933101110324198000302836660,-361273610871346933101110324198000302836659⟩⟩, + ⟨⟨-16212443709400645680313148118406174137925,-16212443709400645680313148118406174137924⟩,⟨22065844683063335229525323316495802962404,22065844683063335229525323316495802962405⟩⟩, + ⟨⟨1575147737268878005404473874808221615217,1575147737268878005404473874808221615218⟩,⟨-1747079272886832916424189369540049615014,-1747079272886832916424189369540049615013⟩⟩, + ⟨⟨32529036982346894427437906511265417533,32529036982346894427437906511265417534⟩,⟨368703578998562054851551882562768950449,368703578998562054851551882562768950450⟩⟩, + ⟨⟨-182682550062098643614759112639667964540,-182682550062098643614759112639667964539⟩,⟨-1,1⟩⟩, + ⟨⟨32529036982346894427437906511265417533,32529036982346894427437906511265417534⟩,⟨-368703578998562054851551882562768950450,-368703578998562054851551882562768950449⟩⟩, + ⟨⟨1575147737268878005404473874808221615217,1575147737268878005404473874808221615218⟩,⟨1747079272886832916424189369540049615013,1747079272886832916424189369540049615014⟩⟩, + ⟨⟨-16212443709400645680313148118406174137925,-16212443709400645680313148118406174137924⟩,⟨-22065844683063335229525323316495802962405,-22065844683063335229525323316495802962404⟩⟩, + ⟨⟨-115693517154428089857811378775005501088160,-115693517154428089857811378775005501088159⟩,⟨361273610871346933101110324198000302836659,361273610871346933101110324198000302836660⟩⟩, + ⟨⟨4681289784771340454873596567055096514449499,4681289784771340454873596567055096514449500⟩,⟨1641553018472383646338590261797874344122983,1641553018472383646338590261797874344122984⟩⟩, + ⟨⟨41555635837463322799090788860201321849415394,41555635837463322799090788860201321849415395⟩,⟨-37009925544702995038781213642623899681149098,-37009925544702995038781213642623899681149097⟩⟩, + ⟨⟨64476854313415268422583611591052467146488323,64476854313415268422583611591052467146488324⟩,⟨-517200726302856674579575032016684922463443854,-517200726302856674579575032016684922463443853⟩⟩, + ⟨⟨-1376083644170445076235826567757075362806208549,-1376083644170445076235826567757075362806208548⟩,⟨-3849000860569485588803809887538696727118652250,-3849000860569485588803809887538696727118652249⟩⟩, + ⟨⟨-15912960289242429495087227384119870983906685905,-15912960289242429495087227384119870983906685904⟩,⟨-22085614398351316505821989429654130926789541420,-22085614398351316505821989429654130926789541419⟩⟩, + ⟨⟨-108417321160265820163598717713321253313744626188,-108417321160265820163598717713321253313744626186⟩,⟨-112972242819296273814189389250029142355839458752,-112972242819296273814189389250029142355839458750⟩⟩, + ⟨⟨-566013050030557672110348726310212529716747860740,-566013050030557672110348726310212529716747860738⟩,⟨-552645021375210854693204710226315751133900251387,-552645021375210854693204710226315751133900251385⟩⟩, + ⟨⟨-2417657843140449727771247385974821283762331497545,-2417657843140449727771247385974821283762331497542⟩,⟨-2618673571968015576369922894548061249172681377812,-2618673571968015576369922894548061249172681377809⟩⟩, + ⟨⟨-8510515489343701302099666709558201290583576414459,-8510515489343701302099666709558201290583576414446⟩,⟨-11754278444713912996089730992507986999026059216256,-11754278444713912996089730992507986999026059216243⟩⟩, + ⟨⟨-23685036074906575194875439689581034745190042805168,-23685036074906575194875439689581034745190042805129⟩,⟨-48550098858641548350883122989047340418810355076669,-48550098858641548350883122989047340418810355076630⟩⟩, + ⟨⟨-43598744540612650789611026980270646198416249294809,-43598744540612650789611026980270646198416249294717⟩,⟨-180476518620279343842088066404943371001972616292910,-180476518620279343842088066404943371001972616292818⟩⟩] +lemma tw1_0_1_17_calc (j : Fin 31) : taylorWaveBox 1 0 1 17 j = tw1_0_1_17 j := by + revert j + decide +kernel +def tw1_0_1_18 : Fin 31 → CI := ![⟨⟨24994015999000731160978549772616410003759905471948,24994015999000731160978549772616410003759905471963⟩,⟨37225264342639219237258894861992946890219101946,37225264342639219237258894861992946890219101961⟩⟩, + ⟨⟨6675600894093609824524411828070813520041253428803,6675600894093609824524411828070813520041253428810⟩,⟨1368426701671613388642209993080863615981262671254,1368426701671613388642209993080863615981262671261⟩⟩, + ⟨⟨1600846319762807513401300007285981182458776564479,1600846319762807513401300007285981182458776564482⟩,⟨596215808050034969119431632466611898171043971104,596215808050034969119431632466611898171043971107⟩⟩, + ⟨⟨350179816383853164013519632434725649727033166227,350179816383853164013519632434725649727033166229⟩,⟨170908480738348114167405231850667592491884176183,170908480738348114167405231850667592491884176185⟩⟩, + ⟨⟨70831938095754808050339658070020003926868540654,70831938095754808050339658070020003926868540655⟩,⟨36971496935634057862004042977899659550102695498,36971496935634057862004042977899659550102695499⟩⟩, + ⟨⟨13264718599585970207547456721889993424699833995,13264718599585970207547456721889993424699833996⟩,⟨5912068421187152743438928045413403794784731389,5912068421187152743438928045413403794784731390⟩⟩, + ⟨⟨2234520490012437710376782727607841675273322150,2234520490012437710376782727607841675273322151⟩,⟨555960939099978622633818680643462965160571455,555960939099978622633818680643462965160571456⟩⟩, + ⟨⟨311941894388640258138581633941986028990229423,311941894388640258138581633941986028990229424⟩,⟨-24851166777793516483245169467243532377310394,-24851166777793516483245169467243532377310393⟩⟩, + ⟨⟨29568394368542060849820243994485231761419811,29568394368542060849820243994485231761419812⟩,⟨-20187006918685913884283294823638717688253402,-20187006918685913884283294823638717688253401⟩⟩, + ⟨⟨632326367396794167724608765107859980514133,632326367396794167724608765107859980514134⟩,⟨-3338549106381900062891068548506896882540924,-3338549106381900062891068548506896882540923⟩⟩, + ⟨⟨-218693318517611856003455322442157939359953,-218693318517611856003455322442157939359952⟩,⟨-152688890927481587161909197922921364209660,-152688890927481587161909197922921364209659⟩⟩, + ⟨⟨-8976208984944408658580493788266210587573,-8976208984944408658580493788266210587572⟩,⟨15388210813607434169111770015550602823998,15388210813607434169111770015550602823999⟩⟩, + ⟨⟨1087011403471621030863140652752358847699,1087011403471621030863140652752358847700⟩,⟨-268778171730725691678832075816516203615,-268778171730725691678832075816516203614⟩⟩, + ⟨⟨-79977011202448662083993958287733342722,-79977011202448662083993958287733342721⟩,⟨27394599868722203149098451848377393678,27394599868722203149098451848377393679⟩⟩, + ⟨⟨2195615872585045571969903479729846707,2195615872585045571969903479729846708⟩,⟨-11867033950263942215033515595023426037,-11867033950263942215033515595023426036⟩⟩, + ⟨⟨5739141572141387253531317237533935915,5739141572141387253531317237533935916⟩,⟨-1,1⟩⟩, + ⟨⟨2195615872585045571969903479729846707,2195615872585045571969903479729846708⟩,⟨11867033950263942215033515595023426036,11867033950263942215033515595023426037⟩⟩, + ⟨⟨-79977011202448662083993958287733342722,-79977011202448662083993958287733342721⟩,⟨-27394599868722203149098451848377393679,-27394599868722203149098451848377393678⟩⟩, + ⟨⟨1087011403471621030863140652752358847699,1087011403471621030863140652752358847700⟩,⟨268778171730725691678832075816516203614,268778171730725691678832075816516203615⟩⟩, + ⟨⟨-8976208984944408658580493788266210587573,-8976208984944408658580493788266210587572⟩,⟨-15388210813607434169111770015550602823999,-15388210813607434169111770015550602823998⟩⟩, + ⟨⟨-218693318517611856003455322442157939359953,-218693318517611856003455322442157939359952⟩,⟨152688890927481587161909197922921364209659,152688890927481587161909197922921364209660⟩⟩, + ⟨⟨632326367396794167724608765107859980514133,632326367396794167724608765107859980514134⟩,⟨3338549106381900062891068548506896882540923,3338549106381900062891068548506896882540924⟩⟩, + ⟨⟨29568394368542060849820243994485231761419811,29568394368542060849820243994485231761419812⟩,⟨20187006918685913884283294823638717688253401,20187006918685913884283294823638717688253402⟩⟩, + ⟨⟨311941894388640258138581633941986028990229423,311941894388640258138581633941986028990229424⟩,⟨24851166777793516483245169467243532377310393,24851166777793516483245169467243532377310394⟩⟩, + ⟨⟨2234520490012437710376782727607841675273322150,2234520490012437710376782727607841675273322151⟩,⟨-555960939099978622633818680643462965160571456,-555960939099978622633818680643462965160571455⟩⟩, + ⟨⟨13264718599585970207547456721889993424699833995,13264718599585970207547456721889993424699833996⟩,⟨-5912068421187152743438928045413403794784731390,-5912068421187152743438928045413403794784731389⟩⟩, + ⟨⟨70831938095754808050339658070020003926868540654,70831938095754808050339658070020003926868540655⟩,⟨-36971496935634057862004042977899659550102695499,-36971496935634057862004042977899659550102695498⟩⟩, + ⟨⟨350179816383853164013519632434725649727033166227,350179816383853164013519632434725649727033166229⟩,⟨-170908480738348114167405231850667592491884176185,-170908480738348114167405231850667592491884176183⟩⟩, + ⟨⟨1600846319762807513401300007285981182458776564479,1600846319762807513401300007285981182458776564482⟩,⟨-596215808050034969119431632466611898171043971107,-596215808050034969119431632466611898171043971104⟩⟩, + ⟨⟨6675600894093609824524411828070813520041253428803,6675600894093609824524411828070813520041253428810⟩,⟨-1368426701671613388642209993080863615981262671261,-1368426701671613388642209993080863615981262671254⟩⟩, + ⟨⟨24994015999000731160978549772616410003759905471948,24994015999000731160978549772616410003759905471963⟩,⟨-37225264342639219237258894861992946890219101961,-37225264342639219237258894861992946890219101946⟩⟩] +lemma tw1_0_1_18_calc (j : Fin 31) : taylorWaveBox 1 0 1 18 j = tw1_0_1_18 j := by + revert j + decide +kernel +def tw1_0_1_19 : Fin 31 → CI := ![⟨⟨-743178471194173631105252789419052658853208203860,-743178471194173631105252789419052658853208203857⟩,⟨-3117027152152511096206145350999743671344735510848,-3117027152152511096206145350999743671344735510845⟩⟩, + ⟨⟨-40509834911608075055173511331165213273054864870,-40509834911608075055173511331165213273054864869⟩,⟨-817684665511001872933381552854163538944242715034,-817684665511001872933381552854163538944242715032⟩⟩, + ⟨⟨16520445230471065979147462846844947778179681944,16520445230471065979147462846844947778179681945⟩,⟨-190800882061103022193291913329967482001042942912,-190800882061103022193291913329967482001042942911⟩⟩, + ⟨⟨6567877014212900711321808736662454803613639411,6567877014212900711321808736662454803613639412⟩,⟨-40038088471240379396603228343772096353222584285,-40038088471240379396603228343772096353222584284⟩⟩, + ⟨⟨1260721872796612353990418353390867513473746514,1260721872796612353990418353390867513473746515⟩,⟨-7581782643829082756943292374522051568816201564,-7581782643829082756943292374522051568816201563⟩⟩, + ⟨⟨94477974019563594442909743618331101653020999,94477974019563594442909743618331101653021000⟩,⟨-1279331596915952649569975832770608760388632605,-1279331596915952649569975832770608760388632604⟩⟩, + ⟨⟨-25270915722100010244004553201695243008578199,-25270915722100010244004553201695243008578198⟩,⟨-183776054202444985147071432032259321678900869,-183776054202444985147071432032259321678900868⟩⟩, + ⟨⟨-10985602257639296652858736653364831146656094,-10985602257639296652858736653364831146656093⟩,⟨-19997076283941216961928638247610382263009173,-19997076283941216961928638247610382263009172⟩⟩, + ⟨⟨-2059116746909886655929091315108337841114401,-2059116746909886655929091315108337841114400⟩,⟨-1116225619590600206175237701167727204258836,-1116225619590600206175237701167727204258835⟩⟩, + ⟨⟨-185401086802366346101902490568934392128587,-185401086802366346101902490568934392128586⟩,⟨68357221226507915782823225586913529774103,68357221226507915782823225586913529774104⟩⟩, + ⟨⟨198231936841324410463357484072191311618,198231936841324410463357484072191311619⟩,⟨13656342029369545714668908966013937726161,13656342029369545714668908966013937726162⟩⟩, + ⟨⟨780138868017876979906694255750008835458,780138868017876979906694255750008835459⟩,⟨-162005807781376381481646343383410997705,-162005807781376381481646343383410997704⟩⟩, + ⟨⟨-39224825215652968541435162984632346343,-39224825215652968541435162984632346342⟩,⟨-19060930188962880076632103241627398323,-19060930188962880076632103241627398322⟩⟩, + ⟨⟨2848264641402306618087205509082826453,2848264641402306618087205509082826454⟩,⟨509748032791450026565887582784961245,509748032791450026565887582784961246⟩⟩, + ⟨⟨-164320680374486313002582111520417436,-164320680374486313002582111520417435⟩,⟨336812860702542830916546490899843567,336812860702542830916546490899843568⟩⟩, + ⟨⟨-171714714294772938730958950428348267,-171714714294772938730958950428348266⟩,⟨-1,1⟩⟩, + ⟨⟨-164320680374486313002582111520417436,-164320680374486313002582111520417435⟩,⟨-336812860702542830916546490899843568,-336812860702542830916546490899843567⟩⟩, + ⟨⟨2848264641402306618087205509082826453,2848264641402306618087205509082826454⟩,⟨-509748032791450026565887582784961246,-509748032791450026565887582784961245⟩⟩, + ⟨⟨-39224825215652968541435162984632346343,-39224825215652968541435162984632346342⟩,⟨19060930188962880076632103241627398322,19060930188962880076632103241627398323⟩⟩, + ⟨⟨780138868017876979906694255750008835458,780138868017876979906694255750008835459⟩,⟨162005807781376381481646343383410997704,162005807781376381481646343383410997705⟩⟩, + ⟨⟨198231936841324410463357484072191311618,198231936841324410463357484072191311619⟩,⟨-13656342029369545714668908966013937726162,-13656342029369545714668908966013937726161⟩⟩, + ⟨⟨-185401086802366346101902490568934392128587,-185401086802366346101902490568934392128586⟩,⟨-68357221226507915782823225586913529774104,-68357221226507915782823225586913529774103⟩⟩, + ⟨⟨-2059116746909886655929091315108337841114401,-2059116746909886655929091315108337841114400⟩,⟨1116225619590600206175237701167727204258835,1116225619590600206175237701167727204258836⟩⟩, + ⟨⟨-10985602257639296652858736653364831146656094,-10985602257639296652858736653364831146656093⟩,⟨19997076283941216961928638247610382263009172,19997076283941216961928638247610382263009173⟩⟩, + ⟨⟨-25270915722100010244004553201695243008578199,-25270915722100010244004553201695243008578198⟩,⟨183776054202444985147071432032259321678900868,183776054202444985147071432032259321678900869⟩⟩, + ⟨⟨94477974019563594442909743618331101653020999,94477974019563594442909743618331101653021000⟩,⟨1279331596915952649569975832770608760388632604,1279331596915952649569975832770608760388632605⟩⟩, + ⟨⟨1260721872796612353990418353390867513473746514,1260721872796612353990418353390867513473746515⟩,⟨7581782643829082756943292374522051568816201563,7581782643829082756943292374522051568816201564⟩⟩, + ⟨⟨6567877014212900711321808736662454803613639411,6567877014212900711321808736662454803613639412⟩,⟨40038088471240379396603228343772096353222584284,40038088471240379396603228343772096353222584285⟩⟩, + ⟨⟨16520445230471065979147462846844947778179681944,16520445230471065979147462846844947778179681945⟩,⟨190800882061103022193291913329967482001042942911,190800882061103022193291913329967482001042942912⟩⟩, + ⟨⟨-40509834911608075055173511331165213273054864870,-40509834911608075055173511331165213273054864869⟩,⟨817684665511001872933381552854163538944242715032,817684665511001872933381552854163538944242715034⟩⟩, + ⟨⟨-743178471194173631105252789419052658853208203860,-743178471194173631105252789419052658853208203857⟩,⟨3117027152152511096206145350999743671344735510845,3117027152152511096206145350999743671344735510848⟩⟩] +lemma tw1_0_1_19_calc (j : Fin 31) : taylorWaveBox 1 0 1 19 j = tw1_0_1_19 j := by + revert j + decide +kernel +def tw1_0_1_20 : Fin 31 → CI := ![⟨⟨-349700236217572470341890954627718069169840474374,-349700236217572470341890954627718069169840474373⟩,⟨177460118558630609896841509402666555507043055582,177460118558630609896841509402666555507043055584⟩⟩, + ⟨⟨-89660339632803728099052823531850426649259553015,-89660339632803728099052823531850426649259553014⟩,⟨27852301247047506914029702261169912545042172689,27852301247047506914029702261169912545042172690⟩⟩, + ⟨⟨-20149707766902195112905364458398354529254383308,-20149707766902195112905364458398354529254383307⟩,⟨3745455848390818294693941382948232123787423672,3745455848390818294693941382948232123787423673⟩⟩, + ⟨⟨-3999195238129900789168823661153733987221611353,-3999195238129900789168823661153733987221611352⟩,⟨518224703150775047413282962457138426509459829,518224703150775047413282962457138426509459830⟩⟩, + ⟨⟨-697641484015961113353783309111778899654202712,-697641484015961113353783309111778899654202711⟩,⟨106516467793204878430775145417922024504740901,106516467793204878430775145417922024504740902⟩⟩, + ⟨⟨-104191687314509657304440056319918760042638705,-104191687314509657304440056319918760042638704⟩,⟨29042389888626657001278243641579466927464334,29042389888626657001278243641579466927464335⟩⟩, + ⟨⟨-12399843920802416710911425259379812333516767,-12399843920802416710911425259379812333516766⟩,⟨7052970997665557336143530800860620303864908,7052970997665557336143530800860620303864909⟩⟩, + ⟨⟨-955396740209451148150451633040321810457161,-955396740209451148150451633040321810457160⟩,⟨1268333089373051427948444389019964720767375,1268333089373051427948444389019964720767376⟩⟩, + ⟨⟨-3179347681487083255535546022841442575920,-3179347681487083255535546022841442575919⟩,⟨146228678427644080343547787691528058091629,146228678427644080343547787691528058091630⟩⟩, + ⟨⟨8548838778553578090088812911133885968149,8548838778553578090088812911133885968150⟩,⟨6872793421982908438763084377503243552711,6872793421982908438763084377503243552712⟩⟩, + ⟨⟨536038809556891858102330471752860418035,536038809556891858102330471752860418036⟩,⟨-397887398086350300207658326437062643721,-397887398086350300207658326437062643720⟩⟩, + ⟨⟨-27421686247022119800484739549372940832,-27421686247022119800484739549372940831⟩,⟨-20129473803398511534051553394846448944,-20129473803398511534051553394846448943⟩⟩, + ⟨⟨666609310839190594156473245492119809,666609310839190594156473245492119810⟩,⟨1477927550291814207869359713245424133,1477927550291814207869359713245424134⟩⟩, + ⟨⟨-73258264728468825960308827102386729,-73258264728468825960308827102386728⟩,⟨-59750729736909578209152973447331269,-59750729736909578209152973447331268⟩⟩, + ⟨⟨7365030103758021971675728273846112,7365030103758021971675728273846113⟩,⟨-8315745124864274268230014085169760,-8315745124864274268230014085169759⟩⟩, + ⟨⟨4904160772197535618690922515449136,4904160772197535618690922515449137⟩,⟨-1,1⟩⟩, + ⟨⟨7365030103758021971675728273846112,7365030103758021971675728273846113⟩,⟨8315745124864274268230014085169759,8315745124864274268230014085169760⟩⟩, + ⟨⟨-73258264728468825960308827102386729,-73258264728468825960308827102386728⟩,⟨59750729736909578209152973447331268,59750729736909578209152973447331269⟩⟩, + ⟨⟨666609310839190594156473245492119809,666609310839190594156473245492119810⟩,⟨-1477927550291814207869359713245424134,-1477927550291814207869359713245424133⟩⟩, + ⟨⟨-27421686247022119800484739549372940832,-27421686247022119800484739549372940831⟩,⟨20129473803398511534051553394846448943,20129473803398511534051553394846448944⟩⟩, + ⟨⟨536038809556891858102330471752860418035,536038809556891858102330471752860418036⟩,⟨397887398086350300207658326437062643720,397887398086350300207658326437062643721⟩⟩, + ⟨⟨8548838778553578090088812911133885968149,8548838778553578090088812911133885968150⟩,⟨-6872793421982908438763084377503243552712,-6872793421982908438763084377503243552711⟩⟩, + ⟨⟨-3179347681487083255535546022841442575920,-3179347681487083255535546022841442575919⟩,⟨-146228678427644080343547787691528058091630,-146228678427644080343547787691528058091629⟩⟩, + ⟨⟨-955396740209451148150451633040321810457161,-955396740209451148150451633040321810457160⟩,⟨-1268333089373051427948444389019964720767376,-1268333089373051427948444389019964720767375⟩⟩, + ⟨⟨-12399843920802416710911425259379812333516767,-12399843920802416710911425259379812333516766⟩,⟨-7052970997665557336143530800860620303864909,-7052970997665557336143530800860620303864908⟩⟩, + ⟨⟨-104191687314509657304440056319918760042638705,-104191687314509657304440056319918760042638704⟩,⟨-29042389888626657001278243641579466927464335,-29042389888626657001278243641579466927464334⟩⟩, + ⟨⟨-697641484015961113353783309111778899654202712,-697641484015961113353783309111778899654202711⟩,⟨-106516467793204878430775145417922024504740902,-106516467793204878430775145417922024504740901⟩⟩, + ⟨⟨-3999195238129900789168823661153733987221611353,-3999195238129900789168823661153733987221611352⟩,⟨-518224703150775047413282962457138426509459830,-518224703150775047413282962457138426509459829⟩⟩, + ⟨⟨-20149707766902195112905364458398354529254383308,-20149707766902195112905364458398354529254383307⟩,⟨-3745455848390818294693941382948232123787423673,-3745455848390818294693941382948232123787423672⟩⟩, + ⟨⟨-89660339632803728099052823531850426649259553015,-89660339632803728099052823531850426649259553014⟩,⟨-27852301247047506914029702261169912545042172690,-27852301247047506914029702261169912545042172689⟩⟩, + ⟨⟨-349700236217572470341890954627718069169840474374,-349700236217572470341890954627718069169840474373⟩,⟨-177460118558630609896841509402666555507043055584,-177460118558630609896841509402666555507043055582⟩⟩] +lemma tw1_0_1_20_calc (j : Fin 31) : taylorWaveBox 1 0 1 20 j = tw1_0_1_20 j := by + revert j + decide +kernel +def tw1_0_1 : Fin 21 → Fin 31 → CI := ![tw1_0_1_0,tw1_0_1_1,tw1_0_1_2,tw1_0_1_3,tw1_0_1_4,tw1_0_1_5,tw1_0_1_6,tw1_0_1_7,tw1_0_1_8,tw1_0_1_9,tw1_0_1_10,tw1_0_1_11,tw1_0_1_12,tw1_0_1_13,tw1_0_1_14,tw1_0_1_15,tw1_0_1_16,tw1_0_1_17,tw1_0_1_18,tw1_0_1_19,tw1_0_1_20] +lemma tw1_0_1_mem (l : Fin 21) (j : Fin 31) : (tw1_0_1 l j).Mem (taylorWave 1 0 (nearNode 1) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 1 l j = tw1_0_1 l j := by + fin_cases l + · exact tw1_0_1_0_calc j + · exact tw1_0_1_1_calc j + · exact tw1_0_1_2_calc j + · exact tw1_0_1_3_calc j + · exact tw1_0_1_4_calc j + · exact tw1_0_1_5_calc j + · exact tw1_0_1_6_calc j + · exact tw1_0_1_7_calc j + · exact tw1_0_1_8_calc j + · exact tw1_0_1_9_calc j + · exact tw1_0_1_10_calc j + · exact tw1_0_1_11_calc j + · exact tw1_0_1_12_calc j + · exact tw1_0_1_13_calc j + · exact tw1_0_1_14_calc j + · exact tw1_0_1_15_calc j + · exact tw1_0_1_16_calc j + · exact tw1_0_1_17_calc j + · exact tw1_0_1_18_calc j + · exact tw1_0_1_19_calc j + · exact tw1_0_1_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 1 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave102.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave102.lean new file mode 100644 index 0000000000000000000000000000000000000000..022bfece61fbf566fcf73670d0cbcc4559dd0290 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave102.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_2_0 : Fin 31 → CI := ![⟨⟨15408495566838264222327248091541251258251423928229170291184,15408495566838264222327248091541251258251423928275569168613⟩,⟨-293176143877190971561343626737088008672271421947638387972529,-293176143877190971561343626737088008672271421947591590713261⟩⟩, + ⟨⟨169670969840926192237203154215975676044259932494879935194445,169670969840926192237203154215975676044259932494914908889408⟩,⟨-194097389411616424590865059214737151136363206827437065145600,-194097389411616424590865059214737151136363206827402583103776⟩⟩, + ⟨⟨220398677324949828655315361499555889949742488116153533549481,220398677324949828655315361499555889949742488116182589175103⟩,⟨-42670633783200433941758194022634243451478680563177175191546,-42670633783200433941758194022634243451478680563148546258226⟩⟩, + ⟨⟨173148744840839582685686359626769780960618274802254522797865,173148744840839582685686359626769780960618274802281077674447⟩,⟨86712145981331842834065590326484211488185014270735898617788,86712145981331842834065590326484211488185014270762646498625⟩⟩, + ⟨⟨73081608474939399778597891319477512364684780769931422696662,73081608474939399778597891319477512364684780769951499175315⟩,⟨148235795901257155090606985551423693703777116498152846694178,148235795901257155090606985551423693703777116498173274608076⟩⟩, + ⟨⟨-25163115455979173141665624320649695504390990702804518230462,-25163115455979173141665624320649695504390990702791371689488⟩,⟨137072753426373177605310054076507286663284992096229539430056,137072753426373177605310054076507286663284992096242650922183⟩⟩, + ⟨⟨-83943671706476596451174812933190914252405338207810712671181,-83943671706476596451174812933190914252405338207803951775231⟩,⟨79946354006168187096356964698277061192766988769336787621002,79946354006168187096356964698277061192766988769343319487520⟩⟩, + ⟨⟨-93916578026621208116645735651495523814473569197029990995842,-93916578026621208116645735651495523814473569197022879531336⟩,⟨13961348038821695454772607625369580243577114545896550631752,13961348038821695454772607625369580243577114545903645268354⟩⟩, + ⟨⟨-68956927043186213940426599231087262087405719277856471716502,-68956927043186213940426599231087262087405719277850746535724⟩,⟨-32990952698980983656284920609708120945406398209859030851381,-32990952698980983656284920609708120945406398209853230889988⟩⟩, + ⟨⟨-31944363849538196826999253936228898665251695075420124560959,-31944363849538196826999253936228898665251695075416158382854⟩,⟨-51265877472024232486765769207176998821037437009616641552960,-51265877472024232486765769207176998821037437009612662286276⟩⟩, + ⟨⟨-1232291626901403409837628370414119473781477835717292886978,-1232291626901403409837628370414119473781477835715110606165⟩,⟨-46816556374458403279747387480650693183087541225190261843034,-46816556374458403279747387480650693183087541225188091447426⟩⟩, + ⟨⟨15676944201106475396199774057445951828046040704706835370670,15676944201106475396199774057445951828046040704708078498168⟩,⟨-32106118023813882897793696931806438346193087905005981777190,-32106118023813882897793696931806438346193087905004738257401⟩⟩, + ⟨⟨20635719241795575994120449908847277902203921882586831384488,20635719241795575994120449908847277902203921882587741083534⟩,⟨-17555455159928810422326909596357600240324698882674538757058,-17555455159928810422326909596357600240324698882673630097185⟩⟩, + ⟨⟨19415514071234595683378011524758489189842099609263479054457,19415514071234595683378011524758489189842099609264057505857⟩,⟨-7801362262797218514440112113850056736410676766540561238302,-7801362262797218514440112113850056736410676766539965286370⟩⟩, + ⟨⟨17013228551259543833091047040488959699299615622386488200175,17013228551259543833091047040488959699299615622386827998945⟩,⟨-2679954549697679245829048308032447639150977109363684874947,-2679954549697679245829048308032447639150977109363365355966⟩⟩, + ⟨⟨15989270801233637419271392939655412238553397753867923108964,15989270801233637419271392939655412238553397753868153445356⟩,⟨-997,1081⟩⟩, + ⟨⟨17013228551259543833091047040488959699299615622386488200180,17013228551259543833091047040488959699299615622386827998906⟩,⟨2679954549697679245829048308032447639150977109363365356095,2679954549697679245829048308032447639150977109363684875027⟩⟩, + ⟨⟨19415514071234595683378011524758489189842099609263479054401,19415514071234595683378011524758489189842099609264057505845⟩,⟨7801362262797218514440112113850056736410676766539965286440,7801362262797218514440112113850056736410676766540561238415⟩⟩, + ⟨⟨20635719241795575994120449908847277902203921882586831384358,20635719241795575994120449908847277902203921882587741083438⟩,⟨17555455159928810422326909596357600240324698882673630097308,17555455159928810422326909596357600240324698882674538757217⟩⟩, + ⟨⟨15676944201106475396199774057445951828046040704706835370427,15676944201106475396199774057445951828046040704708078497983⟩,⟨32106118023813882897793696931806438346193087905004738257482,32106118023813882897793696931806438346193087905005981777330⟩⟩, + ⟨⟨-1232291626901403409837628370414119473781477835717292887258,-1232291626901403409837628370414119473781477835715110606450⟩,⟨46816556374458403279747387480650693183087541225188091447430,46816556374458403279747387480650693183087541225190261843031⟩⟩, + ⟨⟨-31944363849538196826999253936228898665251695075420124561440,-31944363849538196826999253936228898665251695075416158382900⟩,⟨51265877472024232486765769207176998821037437009612662285886,51265877472024232486765769207176998821037437009616641553003⟩⟩, + ⟨⟨-68956927043186213940426599231087262087405719277856471716839,-68956927043186213940426599231087262087405719277850746535770⟩,⟨32990952698980983656284920609708120945406398209853230889459,32990952698980983656284920609708120945406398209859030851144⟩⟩, + ⟨⟨-93916578026621208116645735651495523814473569197029990995748,-93916578026621208116645735651495523814473569197022879531225⟩,⟨-13961348038821695454772607625369580243577114545903645268952,-13961348038821695454772607625369580243577114545896550632332⟩⟩, + ⟨⟨-83943671706476596451174812933190914252405338207810712670494,-83943671706476596451174812933190914252405338207803951774955⟩,⟨-79946354006168187096356964698277061192766988769343319487835,-79946354006168187096356964698277061192766988769336787621729⟩⟩, + ⟨⟨-25163115455979173141665624320649695504390990702804518229000,-25163115455979173141665624320649695504390990702791371689373⟩,⟨-137072753426373177605310054076507286663284992096242650921662,-137072753426373177605310054076507286663284992096229539430884⟩⟩, + ⟨⟨73081608474939399778597891319477512364684780769931422698212,73081608474939399778597891319477512364684780769951499175636⟩,⟨-148235795901257155090606985551423693703777116498173274607036,-148235795901257155090606985551423693703777116498152846694367⟩⟩, + ⟨⟨173148744840839582685686359626769780960618274802254522798766,173148744840839582685686359626769780960618274802281077674729⟩,⟨-86712145981331842834065590326484211488185014270762646497011,-86712145981331842834065590326484211488185014270735898616789⟩⟩, + ⟨⟨220398677324949828655315361499555889949742488116153533548740,220398677324949828655315361499555889949742488116182589175330⟩,⟨42670633783200433941758194022634243451478680563148546259182,42670633783200433941758194022634243451478680563177175193469⟩⟩, + ⟨⟨169670969840926192237203154215975676044259932494879935193371,169670969840926192237203154215975676044259932494914908887934⟩,⟨194097389411616424590865059214737151136363206827402583105119,194097389411616424590865059214737151136363206827437065146539⟩⟩, + ⟨⟨15408495566838264222327248091541251258251423928229170289748,15408495566838264222327248091541251258251423928275569166086⟩,⟨293176143877190971561343626737088008672271421947591590713945,293176143877190971561343626737088008672271421947638387972121⟩⟩] +lemma tw1_0_2_0_calc (j : Fin 31) : taylorWaveBox 1 0 2 0 j = tw1_0_2_0 j := by + revert j + decide +kernel +def tw1_0_2_1 : Fin 31 → CI := ![⟨⟨-259071597712923165263680206866325401392290193700708223861604,-259071597712923165263680206866325401392290193700663019149987⟩,⟨47956218966477274352508143096163328489702909680442371715603,47956218966477274352508143096163328489702909680487223794332⟩⟩, + ⟨⟨-193625602180700619727071052979332227085994754614370029452376,-193625602180700619727071052979332227085994754614338884547269⟩,⟨-97543134365788111139039292367858658774207864004214852457578,-97543134365788111139039292367858658774207864004183285033333⟩⟩, + ⟨⟨-78432390018279427626136533232770139785550973676400454252881,-78432390018279427626136533232770139785550973676376458079618⟩,⟨-157752662101152664417795486977755283073134671604718811650982,-157752662101152664417795486977755283073134671604694509463159⟩⟩, + ⟨⟨24272309635750056914026369276786792973057358835942754463446,24272309635750056914026369276786792973057358835963320026269⟩,⟨-139041577112858354504623749916664467203760512005238120954085,-139041577112858354504623749916664467203760512005217689050396⟩⟩, + ⟨⟨79557922999186248014634198057511382251139786006853383690479,79557922999186248014634198057511382251139786006867625030524⟩,⟨-77815304480001458699113171284567192399834547715305986447258,-77815304480001458699113171284567192399834547715291933015008⟩⟩, + ⟨⟨85015845979347421587356465747452704634685392962807244934569,85015845979347421587356465747452704634685392962815672781223⟩,⟨-14069143185897581064506436760742158245213224372323478824194,-14069143185897581064506436760742158245213224372315025984603⟩⟩, + ⟨⟨59440934561072502576914848163645901269659255793326579781786,59440934561072502576914848163645901269659255793330374395147⟩,⟨27208878496265582165489191060823828045970786102578119463564,27208878496265582165489191060823828045970786102581990025960⟩⟩, + ⟨⟨26167748539762831219353739316988968705316350583718034928663,26167748539762831219353739316988968705316350583721620937486⟩,⟨40786702338353801612149872261964599242922436803626487916730,40786702338353801612149872261964599242922436803630070379721⟩⟩, + ⟨⟨1006954241638426150994900772613313929172881501383986495185,1006954241638426150994900772613313929172881501386382567740⟩,⟨34991868751362543333601768115906877584273663764845197993789,34991868751362543333601768115906877584273663764847586659402⟩⟩, + ⟨⟨-11204755196662296652803485439702086509008323143110126345680,-11204755196662296652803485439702086509008323143108655457583⟩,⟨21887786802319561358795755349082672880914011333568288188164,21887786802319561358795755349082672880914011333569764063940⟩⟩, + ⟨⟨-13360293664853730311483090966337076920585876459386700633937,-13360293664853730311483090966337076920585876459385812892707⟩,⟨10163695742061178645729120727346007637717808771884608005655,10163695742061178645729120727346007637717808771885492919259⟩⟩, + ⟨⟨-10754804442854847171358204478539249852269803013726152796220,-10754804442854847171358204478539249852269803013725609221137⟩,⟨3076099061783502009063765630683870764682590412076768231704,3076099061783502009063765630683870764682590412077310327841⟩⟩, + ⟨⟨-7385939873707622404336663912605873760587447157485914227098,-7385939873707622404336663912605873760587447157485582082097⟩,⟨75193487859018652337230314898668148959325268266302758036,75193487859018652337230314898668148959325268266633786628⟩⟩, + ⟨⟨-4974105475634968210113536527661564275687986994487911933525,-4974105475634968210113536527661564275687986994487767458244⟩,⟨-625184151882457986291238715865238867455791451670477630061,-625184151882457986291238715865238867455791451670332405378⟩⟩, + ⟨⟨-3719155691018828626679406686634593677060062989745684556620,-3719155691018828626679406686634593677060062989745590945755⟩,⟨-428501147026961598899946928756806997575257429282917521840,-428501147026961598899946928756806997575257429282824909604⟩⟩, + ⟨⟨-3348785045694225497290977361332163451811789058779101099213,-3348785045694225497290977361332163451811789058779042198157⟩,⟨-227,210⟩⟩, + ⟨⟨-3719155691018828626679406686634593677060062989745684556617,-3719155691018828626679406686634593677060062989745590945763⟩,⟨428501147026961598899946928756806997575257429282824909587,428501147026961598899946928756806997575257429282917521812⟩⟩, + ⟨⟨-4974105475634968210113536527661564275687986994487911933532,-4974105475634968210113536527661564275687986994487767458244⟩,⟨625184151882457986291238715865238867455791451670332405351,625184151882457986291238715865238867455791451670477630042⟩⟩, + ⟨⟨-7385939873707622404336663912605873760587447157485914227104,-7385939873707622404336663912605873760587447157485582082092⟩,⟨-75193487859018652337230314898668148959325268266633786682,-75193487859018652337230314898668148959325268266302758079⟩⟩, + ⟨⟨-10754804442854847171358204478539249852269803013726152796213,-10754804442854847171358204478539249852269803013725609221106⟩,⟨-3076099061783502009063765630683870764682590412077310327925,-3076099061783502009063765630683870764682590412076768231765⟩⟩, + ⟨⟨-13360293664853730311483090966337076920585876459386700633877,-13360293664853730311483090966337076920585876459385812892649⟩,⟨-10163695742061178645729120727346007637717808771885492919340,-10163695742061178645729120727346007637717808771884608005738⟩⟩, + ⟨⟨-11204755196662296652803485439702086509008323143110126345632,-11204755196662296652803485439702086509008323143108655457399⟩,⟨-21887786802319561358795755349082672880914011333569764064064,-21887786802319561358795755349082672880914011333568288188150⟩⟩, + ⟨⟨1006954241638426150994900772613313929172881501383986495327,1006954241638426150994900772613313929172881501386382567991⟩,⟨-34991868751362543333601768115906877584273663764847586659453,-34991868751362543333601768115906877584273663764845197993732⟩⟩, + ⟨⟨26167748539762831219353739316988968705316350583718034928911,26167748539762831219353739316988968705316350583721620937743⟩,⟨-40786702338353801612149872261964599242922436803630070379553,-40786702338353801612149872261964599242922436803626487916554⟩⟩, + ⟨⟨59440934561072502576914848163645901269659255793326579782067,59440934561072502576914848163645901269659255793330374395211⟩,⟨-27208878496265582165489191060823828045970786102581990025490,-27208878496265582165489191060823828045970786102578119463312⟩⟩, + ⟨⟨85015845979347421587356465747452704634685392962807244934899,85015845979347421587356465747452704634685392962815672780742⟩,⟨14069143185897581064506436760742158245213224372315025985500,14069143185897581064506436760742158245213224372323478824279⟩⟩, + ⟨⟨79557922999186248014634198057511382251139786006853383690424,79557922999186248014634198057511382251139786006867625029643⟩,⟨77815304480001458699113171284567192399834547715291933015931,77815304480001458699113171284567192399834547715305986447355⟩⟩, + ⟨⟨24272309635750056914026369276786792973057358835942754462639,24272309635750056914026369276786792973057358835963320025004⟩,⟨139041577112858354504623749916664467203760512005217689050765,139041577112858354504623749916664467203760512005238120953996⟩⟩, + ⟨⟨-78432390018279427626136533232770139785550973676400454254306,-78432390018279427626136533232770139785550973676376458080261⟩,⟨157752662101152664417795486977755283073134671604694509462272,157752662101152664417795486977755283073134671604718811650878⟩⟩, + ⟨⟨-193625602180700619727071052979332227085994754614370029452862,-193625602180700619727071052979332227085994754614338884548107⟩,⟨97543134365788111139039292367858658774207864004183285032233,97543134365788111139039292367858658774207864004214852456125⟩⟩, + ⟨⟨-259071597712923165263680206866325401392290193700708223860796,-259071597712923165263680206866325401392290193700663019150206⟩,⟨-47956218966477274352508143096163328489702909680487223795577,-47956218966477274352508143096163328489702909680442371717875⟩⟩] +lemma tw1_0_2_1_calc (j : Fin 31) : taylorWaveBox 1 0 2 1 j = tw1_0_2_1 j := by + revert j + decide +kernel +def tw1_0_2_2 : Fin 31 → CI := ![⟨⟨72082143322898758138977096659673649204139686889387532181898,72082143322898758138977096659673649204139686889418550803130⟩,⟨162029018933525594344593026942946547342198153031998346646551,162029018933525594344593026942946547342198153032029547295144⟩⟩, + ⟨⟨-29171071541048725833334748294598783992277287636395950469435,-29171071541048725833334748294598783992277287636375708404125⟩,⟨133601189313931946114322888946323724293883087825474031568091,133601189313931946114322888946323724293883087825494066476698⟩⟩, + ⟨⟨-77162228102917872289913793156140743961192279831774984907686,-77162228102917872289913793156140743961192279831760643194813⟩,⟨69269092212948335687365702110293957617054546883984008963330,69269092212948335687365702110293957617054546883998236234413⟩⟩, + ⟨⟨-76614685015415546517147292765230375445150556217221250969999,-76614685015415546517147292765230375445150556217210241343360⟩,⟨9131648253843205510974718255554470376604666821164075532644,9131648253843205510974718255554470376604666821175132654823⟩⟩, + ⟨⟨-49845594290948084361928245516193453611135156016652538499544,-49845594290948084361928245516193453611135156016645734088916⟩,⟨-25961862370996580612255618166737446216753283151239013750431,-25961862370996580612255618166737446216753283151232172061328⟩⟩, + ⟨⟨-19493079646582897054141456949512641882024970748833183967139,-19493079646582897054141456949512641882024970748829451175618⟩,⟨-34885184873943954767837542147031443101323190179171484595991,-34885184873943954767837542147031443101323190179167761245627⟩⟩, + ⟨⟨1347941432556805919490702649673566106628256413424103664427,1347941432556805919490702649673566106628256413425597157459⟩,⟨-27616361057261389570053420139653549501652082616508949028774,-27616361057261389570053420139653549501652082616507449256769⟩⟩, + ⟨⟨10126824608027685220401616388325400788295236932755920831427,10126824608027685220401616388325400788295236932757323399180⟩,⟨-15541027618572291678745353904183194732047487179288561009718,-15541027618572291678745353904183194732047487179287152981213⟩⟩, + ⟨⟨10529486117495766977429910240939387013622738129562163834194,10529486117495766977429910240939387013622738129563156269475⟩,⟨-5804066561569420422948970696419713554628472110319846265854,-5804066561569420422948970696419713554628472110318863852619⟩⟩, + ⟨⟨7490248015680880339000008987887907227868539262429939464870,7490248015680880339000008987887907227868539262430565199547⟩,⟨-504727460149810787513560892231939239146872323088942033650,-504727460149810787513560892231939239146872323088319611840⟩⟩, + ⟨⟨4316004457239035392819286209589512093306755480746706558126,4316004457239035392819286209589512093306755480747006799552⟩,⟨1318254324733904615235765070701350162072597818132185593324,1318254324733904615235765070701350162072597818132487433701⟩⟩, + ⟨⟨2226241298879688714449508524833089620557704852516917038363,2226241298879688714449508524833089620557704852517057556334⟩,⟨1393874968648639015898364562542949370832253624183967663179,1393874968648639015898364562542949370832253624184108215237⟩⟩, + ⟨⟨1170023526898776520167010400058224027927982253843262657380,1170023526898776520167010400058224027927982253843344114299⟩,⟨955005903176207010097529719036995355316314480264962917361,955005903176207010097529719036995355316314480265044349975⟩⟩, + ⟨⟨726773051613593034260871241349311084278154840285464794383,726773051613593034260871241349311084278154840285501749254⟩,⟨532276286391278676180810359180886795266522245219603278532,532276286391278676180810359180886795266522245219639441693⟩⟩, + ⟨⟨565506720162589170668532409530518059242188350474580601769,565506720162589170668532409530518059242188350474599314427⟩,⟨229587583284143774026955160035870949419867374105456229827,229587583284143774026955160035870949419867374105475390607⟩⟩, + ⟨⟨526025924900216944191493716945781895269563478409674562554,526025924900216944191493716945781895269563478409685489104⟩,⟨-33,36⟩⟩, + ⟨⟨565506720162589170668532409530518059242188350474580601772,565506720162589170668532409530518059242188350474599314428⟩,⟨-229587583284143774026955160035870949419867374105475390603,-229587583284143774026955160035870949419867374105456229824⟩⟩, + ⟨⟨726773051613593034260871241349311084278154840285464794385,726773051613593034260871241349311084278154840285501749258⟩,⟨-532276286391278676180810359180886795266522245219639441690,-532276286391278676180810359180886795266522245219603278528⟩⟩, + ⟨⟨1170023526898776520167010400058224027927982253843262657386,1170023526898776520167010400058224027927982253843344114307⟩,⟨-955005903176207010097529719036995355316314480265044349968,-955005903176207010097529719036995355316314480264962917352⟩⟩, + ⟨⟨2226241298879688714449508524833089620557704852516917038370,2226241298879688714449508524833089620557704852517057556346⟩,⟨-1393874968648639015898364562542949370832253624184108215224,-1393874968648639015898364562542949370832253624183967663162⟩⟩, + ⟨⟨4316004457239035392819286209589512093306755480746706558135,4316004457239035392819286209589512093306755480747006799560⟩,⟨-1318254324733904615235765070701350162072597818132487433674,-1318254324733904615235765070701350162072597818132185593298⟩⟩, + ⟨⟨7490248015680880339000008987887907227868539262429939464838,7490248015680880339000008987887907227868539262430565199571⟩,⟨504727460149810787513560892231939239146872323088319611851,504727460149810787513560892231939239146872323088942033717⟩⟩, + ⟨⟨10529486117495766977429910240939387013622738129562163834141,10529486117495766977429910240939387013622738129563156269464⟩,⟨5804066561569420422948970696419713554628472110318863852657,5804066561569420422948970696419713554628472110319846265935⟩⟩, + ⟨⟨10126824608027685220401616388325400788295236932755920831326,10126824608027685220401616388325400788295236932757323399082⟩,⟨15541027618572291678745353904183194732047487179287152981273,15541027618572291678745353904183194732047487179288561009781⟩⟩, + ⟨⟨1347941432556805919490702649673566106628256413424103664295,1347941432556805919490702649673566106628256413425597157254⟩,⟨27616361057261389570053420139653549501652082616507449256816,27616361057261389570053420139653549501652082616508949028749⟩⟩, + ⟨⟨-19493079646582897054141456949512641882024970748833183967181,-19493079646582897054141456949512641882024970748829451175981⟩,⟨34885184873943954767837542147031443101323190179167761245677,34885184873943954767837542147031443101323190179171484595721⟩⟩, + ⟨⟨-49845594290948084361928245516193453611135156016652538499528,-49845594290948084361928245516193453611135156016645734089274⟩,⟨25961862370996580612255618166737446216753283151232172061212,25961862370996580612255618166737446216753283151239013749939⟩⟩, + ⟨⟨-76614685015415546517147292765230375445150556217221250969793,-76614685015415546517147292765230375445150556217210241343386⟩,⟨-9131648253843205510974718255554470376604666821175132655270,-9131648253843205510974718255554470376604666821164075533326⟩⟩, + ⟨⟨-77162228102917872289913793156140743961192279831774984907462,-77162228102917872289913793156140743961192279831760643194149⟩,⟨-69269092212948335687365702110293957617054546883998236235142,-69269092212948335687365702110293957617054546883984008963618⟩⟩, + ⟨⟨-29171071541048725833334748294598783992277287636395950468443,-29171071541048725833334748294598783992277287636375708403350⟩,⟨-133601189313931946114322888946323724293883087825494066476793,-133601189313931946114322888946323724293883087825474031568403⟩⟩, + ⟨⟨72082143322898758138977096659673649204139686889387532183345,72082143322898758138977096659673649204139686889418550803892⟩,⟨-162029018933525594344593026942946547342198153032029547294332,-162029018933525594344593026942946547342198153031998346646424⟩⟩] +lemma tw1_0_2_2_calc (j : Fin 31) : taylorWaveBox 1 0 2 2 j = tw1_0_2_2 j := by + revert j + decide +kernel +def tw1_0_2_3 : Fin 31 → CI := ![⟨⟨75780086648258574824574460129189674875024345095708503888818,75780086648258574824574460129189674875024345095724990489334⟩,⟨-58103289008367905224948977066091094305195699231851172272567,-58103289008367905224948977066091094305195699231834732995779⟩⟩, + ⟨⟨68955602829062583828503524102163641280263365319528040391058,68955602829062583828503524102163641280263365319537872709046⟩,⟨-2533145742049050284141281368686557142679208019245411332958,-2533145742049050284141281368686557142679208019235528533961⟩⟩, + ⟨⟨41129808511281220212965997298745453098701407693480086439938,41129808511281220212965997298745453098701407693486476146955⟩,⟨26310497554159888707980539193029695106774744040025071881555,26310497554159888707980539193029695106774744040031468952213⟩⟩, + ⟨⟨13452741139986336880555906960161174876775473353375139340465,13452741139986336880555906960161174876775473353379585117793⟩,⟨30944767450759137668836266919809927177223329901148851709515,30944767450759137668836266919809927177223329901153294215911⟩⟩, + ⟨⟨-3704857409586869005399282564081069696098131663027006435606,-3704857409586869005399282564081069696098131663024554875132⟩,⟨22401798079716599818221664358526944256364042724701634434346,22401798079716599818221664358526944256364042724704101765893⟩⟩, + ⟨⟨-9727654091803078520983660661160628888513138451622880606426,-9727654091803078520983660661160628888513138451621383997468⟩,⟨11188170044491447836311245819326037428626306069652308397337,11188170044491447836311245819326037428626306069653805629169⟩⟩, + ⟨⟨-8845323017717154208620030033377349713098220910614808508317,-8845323017717154208620030033377349713098220910614152632318⟩,⟨3046905990456049149396203713038671374782782775141270742600,3046905990456049149396203713038671374782782775141909673989⟩⟩, + ⟨⟨-5612447929110243726309296281119553132808778925872350418988,-5612447929110243726309296281119553132808778925871788416895⟩,⟨-874999787083365109950282922330312340803130512819668307136,-874999787083365109950282922330312340803130512819107986216⟩⟩, + ⟨⟨-2741375250372112617644028840994454460579282188447814287625,-2741375250372112617644028840994454460579282188447488401628⟩,⟨-1843478303275792520562824589885678685979227806388084982407,-1843478303275792520562824589885678685979227806387755549376⟩⟩, + ⟨⟨-1046962197643255250162290947478013955030467770034533814564,-1046962197643255250162290947478013955030467770034361998290⟩,⟨-1505327952740371445602538349399674902110342735742381158391,-1505327952740371445602538349399674902110342735742209010942⟩⟩, + ⟨⟨-312286332376306681897153097814197146920771686955883996490,-312286332376306681897153097814197146920771686955817293472⟩,⟨-918941607181600141869089570170395420439158584490581313023,-918941607181600141869089570170395420439158584490514687682⟩⟩, + ⟨⟨-85136071874733272568429469821246871322103367004593501058,-85136071874733272568429469821246871322103367004558274638⟩,⟨-486001419335776453058542127539292089044072331039391498074,-486001419335776453058542127539292089044072331039356212953⟩⟩, + ⟨⟨-47021508346854735160950208770755308018715793841898630804,-47021508346854735160950208770755308018715793841881792913⟩,⟨-242534158403210831783679296678881732821353635403277059830,-242534158403210831783679296678881732821353635403260188232⟩⟩, + ⟨⟨-54169100279787581744784424327835258087088169647513986170,-54169100279787581744784424327835258087088169647507205533⟩,⟨-117626141501971461596344359591043292626880993609027950905,-117626141501971461596344359591043292626880993609021283492⟩⟩, + ⟨⟨-63049551804727955798415548454235694659429152843632229113,-63049551804727955798415548454235694659429152843629298945⟩,⟨-48590735018018804110797504815595112918437980790084233573,-48590735018018804110797504815595112918437980790081165626⟩⟩, + ⟨⟨-66102367250571913749612555130330497622406134782733911348,-66102367250571913749612555130330497622406134782732327866⟩,⟨-5,5⟩⟩, + ⟨⟨-63049551804727955798415548454235694659429152843632229113,-63049551804727955798415548454235694659429152843629298945⟩,⟨48590735018018804110797504815595112918437980790081165626,48590735018018804110797504815595112918437980790084233572⟩⟩, + ⟨⟨-54169100279787581744784424327835258087088169647513986171,-54169100279787581744784424327835258087088169647507205533⟩,⟨117626141501971461596344359591043292626880993609021283492,117626141501971461596344359591043292626880993609027950904⟩⟩, + ⟨⟨-47021508346854735160950208770755308018715793841898630806,-47021508346854735160950208770755308018715793841881792915⟩,⟨242534158403210831783679296678881732821353635403260188231,242534158403210831783679296678881732821353635403277059830⟩⟩, + ⟨⟨-85136071874733272568429469821246871322103367004593501062,-85136071874733272568429469821246871322103367004558274640⟩,⟨486001419335776453058542127539292089044072331039356212952,486001419335776453058542127539292089044072331039391498074⟩⟩, + ⟨⟨-312286332376306681897153097814197146920771686955883996496,-312286332376306681897153097814197146920771686955817293478⟩,⟨918941607181600141869089570170395420439158584490514687680,918941607181600141869089570170395420439158584490581313021⟩⟩, + ⟨⟨-1046962197643255250162290947478013955030467770034533814579,-1046962197643255250162290947478013955030467770034361998291⟩,⟨1505327952740371445602538349399674902110342735742209010930,1505327952740371445602538349399674902110342735742381158392⟩⟩, + ⟨⟨-2741375250372112617644028840994454460579282188447814287642,-2741375250372112617644028840994454460579282188447488401632⟩,⟨1843478303275792520562824589885678685979227806387755549354,1843478303275792520562824589885678685979227806388084982398⟩⟩, + ⟨⟨-5612447929110243726309296281119553132808778925872350418993,-5612447929110243726309296281119553132808778925871788416899⟩,⟨874999787083365109950282922330312340803130512819107986180,874999787083365109950282922330312340803130512819668307101⟩⟩, + ⟨⟨-8845323017717154208620030033377349713098220910614808508284,-8845323017717154208620030033377349713098220910614152632316⟩,⟨-3046905990456049149396203713038671374782782775141909674028,-3046905990456049149396203713038671374782782775141270742670⟩⟩, + ⟨⟨-9727654091803078520983660661160628888513138451622880606304,-9727654091803078520983660661160628888513138451621383997462⟩,⟨-11188170044491447836311245819326037428626306069653805629168,-11188170044491447836311245819326037428626306069652308397452⟩⟩, + ⟨⟨-3704857409586869005399282564081069696098131663027006435407,-3704857409586869005399282564081069696098131663024554875055⟩,⟨-22401798079716599818221664358526944256364042724704101765860,-22401798079716599818221664358526944256364042724701634434435⟩⟩, + ⟨⟨13452741139986336880555906960161174876775473353375139340734,13452741139986336880555906960161174876775473353379585117975⟩,⟨-30944767450759137668836266919809927177223329901153294215760,-30944767450759137668836266919809927177223329901148851709449⟩⟩, + ⟨⟨41129808511281220212965997298745453098701407693480086440021,41129808511281220212965997298745453098701407693486476147222⟩,⟨-26310497554159888707980539193029695106774744040031468952039,-26310497554159888707980539193029695106774744040025071881198⟩⟩, + ⟨⟨68955602829062583828503524102163641280263365319528040391097,68955602829062583828503524102163641280263365319537872708985⟩,⟨2533145742049050284141281368686557142679208019235528534468,2533145742049050284141281368686557142679208019245411333365⟩⟩, + ⟨⟨75780086648258574824574460129189674875024345095708503888606,75780086648258574824574460129189674875024345095724990488777⟩,⟨58103289008367905224948977066091094305195699231834732996471,58103289008367905224948977066091094305195699231851172272914⟩⟩] +lemma tw1_0_2_3_calc (j : Fin 31) : taylorWaveBox 1 0 2 3 j = tw1_0_2_3 j := by + revert j + decide +kernel +def tw1_0_2_4 : Fin 31 → CI := ![⟨⟨-33288014602598514105012478508958290558535049433306066164303,-33288014602598514105012478508958290558535049433299101601707⟩,⟨-26980738289864548635100519242568911846000851189467833852375,-26980738289864548635100519242568911846000851189460877110229⟩⟩, + ⟨⟨-8252620960459340187904505439375631205579952871186642148921,-8252620960459340187904505439375631205579952871182811397176⟩,⟨-27816450096385585640082652419181185874711981699901122553908,-27816450096385585640082652419181185874711981699897283664967⟩⟩, + ⟨⟨5642334078003577485596703711952299198647026014594258591071,5642334078003577485596703711952299198647026014596675525999⟩,⟨-18308658077741997798148637881953854422208514750037680236171,-18308658077741997798148637881953854422208514750035244826038⟩⟩, + ⟨⟨9392993807726842657004591928301381771541925762443741770147,9392993807726842657004591928301381771541925762445546796147⟩,⟨-7936420995903454940208445354210131503245411620642372108594,-7936420995903454940208445354210131503245411620640574262521⟩⟩, + ⟨⟨7556032566415153983731265338283283715565846485694320889547,7556032566415153983731265338283283715565846485695387092828⟩,⟨-1160441540387671984697564366603036018387850747705966078195,-1160441540387671984697564366603036018387850747704915751122⟩⟩, + ⟨⟨4273184296871978739615804733161076890064522489543337481526,4273184296871978739615804733161076890064522489543914318033⟩,⟨1658037445988116985784210631247581264214681629971964609372,1658037445988116985784210631247581264214681629972542350645⟩⟩, + ⟨⟨1723958183352585129937235433868915798206398198824005242250,1723958183352585129937235433868915798206398198824223233244⟩,⟨1996628901730894127526279321740396865229318699434812276106,1996628901730894127526279321740396865229318699435035827961⟩⟩, + ⟨⟨384112476240212042579786250601629379326989256542504833836,384112476240212042579786250601629379326989256542670819573⟩,⟨1397705702895938536750517061007895395513101421071488968876,1397705702895938536750517061007895395513101421071655120920⟩⟩, + ⟨⟨-88296126037749757484866618751458239109185665384955931859,-88296126037749757484866618751458239109185665384876606740⟩,⟨751252211590348404361291876500938957304258763051158035843,751252211590348404361291876500938957304258763051237000823⟩⟩, + ⟨⟨-153091666019508272099183397401164226098960770093530614395,-153091666019508272099183397401164226098960770093492741172⟩,⟨340366949513654692940228716416263261569823764220461723839,340366949513654692940228716416263261569823764220499683453⟩⟩, + ⟨⟨-100952090737063918992269140864149350091103114365959415862,-100952090737063918992269140864149350091103114365942382713⟩,⟨141651545981189746965632855663967929108504531334885400102,141651545981189746965632855663967929108504531334902363402⟩⟩, + ⟨⟨-47633404313261059166950128832065589752194065800732712229,-47633404313261059166950128832065589752194065800725863317⟩,⟨60799981396840506717205756805509316674085452627552900487,60799981396840506717205756805509316674085452627559746557⟩⟩, + ⟨⟨-16241017224007844229828813058227514691386130749132300429,-16241017224007844229828813058227514691386130749129235760⟩,⟨29501518375670067230057563210218794109006866906132233446,29501518375670067230057563210218794109006866906135300475⟩⟩, + ⟨⟨-1170636602402184577248972164178484965296918508467530767,-1170636602402184577248972164178484965296918508466570562⟩,⟨15469211242841150691344133913166511637664915203587322632,15469211242841150691344133913166511637664915203588279295⟩⟩, + ⟨⟨5189086438681190600159795737611742746439437858155612208,5189086438681190600159795737611742746439437858155999522⟩,⟨6922446990336599077923390469088198302548486298352302724,6922446990336599077923390469088198302548486298352710619⟩⟩, + ⟨⟨6922223711309708784489809132794442002961884981789448768,6922223711309708784489809132794442002961884981789636624⟩,⟨-1,1⟩⟩, + ⟨⟨5189086438681190600159795737611742746439437858155612208,5189086438681190600159795737611742746439437858155999523⟩,⟨-6922446990336599077923390469088198302548486298352710619,-6922446990336599077923390469088198302548486298352302724⟩⟩, + ⟨⟨-1170636602402184577248972164178484965296918508467530767,-1170636602402184577248972164178484965296918508466570562⟩,⟨-15469211242841150691344133913166511637664915203588279295,-15469211242841150691344133913166511637664915203587322632⟩⟩, + ⟨⟨-16241017224007844229828813058227514691386130749132300429,-16241017224007844229828813058227514691386130749129235760⟩,⟨-29501518375670067230057563210218794109006866906135300475,-29501518375670067230057563210218794109006866906132233446⟩⟩, + ⟨⟨-47633404313261059166950128832065589752194065800732712229,-47633404313261059166950128832065589752194065800725863317⟩,⟨-60799981396840506717205756805509316674085452627559746557,-60799981396840506717205756805509316674085452627552900487⟩⟩, + ⟨⟨-100952090737063918992269140864149350091103114365959415861,-100952090737063918992269140864149350091103114365942382712⟩,⟨-141651545981189746965632855663967929108504531334902363403,-141651545981189746965632855663967929108504531334885400103⟩⟩, + ⟨⟨-153091666019508272099183397401164226098960770093530614394,-153091666019508272099183397401164226098960770093492741169⟩,⟨-340366949513654692940228716416263261569823764220499683455,-340366949513654692940228716416263261569823764220461723838⟩⟩, + ⟨⟨-88296126037749757484866618751458239109185665384955931856,-88296126037749757484866618751458239109185665384876606735⟩,⟨-751252211590348404361291876500938957304258763051237000825,-751252211590348404361291876500938957304258763051158035842⟩⟩, + ⟨⟨384112476240212042579786250601629379326989256542504833844,384112476240212042579786250601629379326989256542670819582⟩,⟨-1397705702895938536750517061007895395513101421071655120918,-1397705702895938536750517061007895395513101421071488968873⟩⟩, + ⟨⟨1723958183352585129937235433868915798206398198824005242267,1723958183352585129937235433868915798206398198824223233251⟩,⟨-1996628901730894127526279321740396865229318699435035827946,-1996628901730894127526279321740396865229318699434812276101⟩⟩, + ⟨⟨4273184296871978739615804733161076890064522489543337481557,4273184296871978739615804733161076890064522489543914318022⟩,⟨-1658037445988116985784210631247581264214681629972542350599,-1658037445988116985784210631247581264214681629971964609368⟩⟩, + ⟨⟨7556032566415153983731265338283283715565846485694320889568,7556032566415153983731265338283283715565846485695387092797⟩,⟨1160441540387671984697564366603036018387850747704915751195,1160441540387671984697564366603036018387850747705966078216⟩⟩, + ⟨⟨9392993807726842657004591928301381771541925762443741770101,9392993807726842657004591928301381771541925762445546796069⟩,⟨7936420995903454940208445354210131503245411620640574262605,7936420995903454940208445354210131503245411620642372108644⟩⟩, + ⟨⟨5642334078003577485596703711952299198647026014594258590921,5642334078003577485596703711952299198647026014596675525912⟩,⟨18308658077741997798148637881953854422208514750035244826045,18308658077741997798148637881953854422208514750037680236241⟩⟩, + ⟨⟨-8252620960459340187904505439375631205579952871186642149088,-8252620960459340187904505439375631205579952871182811397379⟩,⟨27816450096385585640082652419181185874711981699897283664932,27816450096385585640082652419181185874711981699901122553838⟩⟩, + ⟨⟨-33288014602598514105012478508958290558535049433306066164421,-33288014602598514105012478508958290558535049433299101601961⟩,⟨26980738289864548635100519242568911846000851189460877110075,26980738289864548635100519242568911846000851189467833852085⟩⟩] +lemma tw1_0_2_4_calc (j : Fin 31) : taylorWaveBox 1 0 2 4 j = tw1_0_2_4 j := by + revert j + decide +kernel +def tw1_0_2_5 : Fin 31 → CI := ![⟨⟨-7102847320133348423329695797002078320979476371862037723392,-7102847320133348423329695797002078320979476371859337458600⟩,⟨14871473754295405514775103243810286511244980782317829977168,14871473754295405514775103243810286511244980782320545223381⟩⟩, + ⟨⟨-8969019282765587161605614214241577087843001045077678033738,-8969019282765587161605614214241577087843001045076076354388⟩,⟨5377506875632303812186015502648910681510823069315250092011,5377506875632303812186015502648910681510823069316836436402⟩⟩, + ⟨⟨-6440887216844295860337528471841347291936090041986455324779,-6440887216844295860337528471841347291936090041985443342107⟩,⟨-185482969685570241716280926872388147420963900091296855097,-185482969685570241716280926872388147420963900090297279538⟩⟩, + ⟨⟨-3217684761809219514867394372448311324578136567607014961302,-3217684761809219514867394372448311324578136567606341117530⟩,⟨-2098005692629642131934831303253354792184960226458286461819,-2098005692629642131934831303253354792184960226457608622291⟩⟩, + ⟨⟨-996497586060253614104065727758455569878763086771978978742,-996497586060253614104065727758455569878763086771626610984⟩,⟨-1968202030037757700585185346588701381231352330656964645251,-1968202030037757700585185346588701381231352330656607100438⟩⟩, + ⟨⟨29842910926767706700332155115540840959841443234867397932,29842910926767706700332155115540840959841443235043611290⟩,⟨-1214269886347442316435488397821129605432532787934893674521,-1214269886347442316435488397821129605432532787934717817143⟩⟩, + ⟨⟨293300353146874236216910915534375534537148120220445172524,293300353146874236216910915534375534537148120220505449534⟩,⟨-566072302840401493767751256413908890140172917803323057608,-566072302840401493767751256413908890140172917803263646170⟩⟩, + ⟨⟨244317190350453544932178793126598197167975271779954507128,244317190350453544932178793126598197167975271779993664784⟩,⟨-202075226612871845969019845255182072753584879648221035202,-202075226612871845969019845255182072753584879648181829272⟩⟩, + ⟨⟨139043687791424947795127079898378854026044229619026446765,139043687791424947795127079898378854026044229619044124043⟩,⟨-52021659665291530200433302091311684455799732223431479086,-52021659665291530200433302091311684455799732223413877428⟩⟩, + ⟨⟨64660252385356726428999377961601309851806248475265360583,64660252385356726428999377961601309851806248475274375469⟩,⟨-7648806265590952732417862785807244443096348255906043561,-7648806265590952732417862785807244443096348255897056169⟩⟩, + ⟨⟨26720623245773312302544687481004988133910384225559506251,26720623245773312302544687481004988133910384225562714733⟩,⟨-129281819733824741100734412062106372155997803136694256,-129281819733824741100734412062106372155997803133478758⟩⟩, + ⟨⟨10339335004607054400222493606722270804606433791520801588,10339335004607054400222493606722270804606433791522021402⟩,⟨-706766487277012519970352349304449007630600548730619354,-706766487277012519970352349304449007630600548729400621⟩⟩, + ⟨⟨3664498711335032908901073628216168432562970864868730942,3664498711335032908901073628216168432562970864869185212⟩,⟨-1433224849541212073283477145185681570728392674664533833,-1433224849541212073283477145185681570728392674664080024⟩⟩, + ⟨⟨876472292501149648296234390005705602335688222922173252,876472292501149648296234390005705602335688222922306577⟩,⟨-1330137545477445881337113296723149585958081202718522654,-1330137545477445881337113296723149585958081202718388086⟩⟩, + ⟨⟨-293172034879884692777666996981990863793077259703598978,-293172034879884692777666996981990863793077259703551987⟩,⟨-750738308170997573123058082936611819248950814600398485,-750738308170997573123058082936611819248950814600350008⟩⟩, + ⟨⟨-621337347370161567570828459640529416781221399295311146,-621337347370161567570828459640529416781221399295292305⟩,⟨-1,1⟩⟩, + ⟨⟨-293172034879884692777666996981990863793077259703598978,-293172034879884692777666996981990863793077259703551987⟩,⟨750738308170997573123058082936611819248950814600350008,750738308170997573123058082936611819248950814600398485⟩⟩, + ⟨⟨876472292501149648296234390005705602335688222922173252,876472292501149648296234390005705602335688222922306577⟩,⟨1330137545477445881337113296723149585958081202718388086,1330137545477445881337113296723149585958081202718522654⟩⟩, + ⟨⟨3664498711335032908901073628216168432562970864868730942,3664498711335032908901073628216168432562970864869185212⟩,⟨1433224849541212073283477145185681570728392674664080024,1433224849541212073283477145185681570728392674664533833⟩⟩, + ⟨⟨10339335004607054400222493606722270804606433791520801588,10339335004607054400222493606722270804606433791522021402⟩,⟨706766487277012519970352349304449007630600548729400621,706766487277012519970352349304449007630600548730619354⟩⟩, + ⟨⟨26720623245773312302544687481004988133910384225559506251,26720623245773312302544687481004988133910384225562714733⟩,⟨129281819733824741100734412062106372155997803133478758,129281819733824741100734412062106372155997803136694256⟩⟩, + ⟨⟨64660252385356726428999377961601309851806248475265360583,64660252385356726428999377961601309851806248475274375469⟩,⟨7648806265590952732417862785807244443096348255897056170,7648806265590952732417862785807244443096348255906043561⟩⟩, + ⟨⟨139043687791424947795127079898378854026044229619026446765,139043687791424947795127079898378854026044229619044124043⟩,⟨52021659665291530200433302091311684455799732223413877428,52021659665291530200433302091311684455799732223431479087⟩⟩, + ⟨⟨244317190350453544932178793126598197167975271779954507127,244317190350453544932178793126598197167975271779993664782⟩,⟨202075226612871845969019845255182072753584879648181829273,202075226612871845969019845255182072753584879648221035203⟩⟩, + ⟨⟨293300353146874236216910915534375534537148120220445172522,293300353146874236216910915534375534537148120220505449529⟩,⟨566072302840401493767751256413908890140172917803263646173,566072302840401493767751256413908890140172917803323057609⟩⟩, + ⟨⟨29842910926767706700332155115540840959841443234867397931,29842910926767706700332155115540840959841443235043611277⟩,⟨1214269886347442316435488397821129605432532787934717817149,1214269886347442316435488397821129605432532787934893674515⟩⟩, + ⟨⟨-996497586060253614104065727758455569878763086771978978747,-996497586060253614104065727758455569878763086771626611005⟩,⟨1968202030037757700585185346588701381231352330656607100441,1968202030037757700585185346588701381231352330656964645237⟩⟩, + ⟨⟨-3217684761809219514867394372448311324578136567607014961310,-3217684761809219514867394372448311324578136567606341117551⟩,⟨2098005692629642131934831303253354792184960226457608622272,2098005692629642131934831303253354792184960226458286461789⟩⟩, + ⟨⟨-6440887216844295860337528471841347291936090041986455324794,-6440887216844295860337528471841347291936090041985443342096⟩,⟨185482969685570241716280926872388147420963900090297279483,185482969685570241716280926872388147420963900091296855067⟩⟩, + ⟨⟨-8969019282765587161605614214241577087843001045077678033696,-8969019282765587161605614214241577087843001045076076354360⟩,⟨-5377506875632303812186015502648910681510823069316836436455,-5377506875632303812186015502648910681510823069315250092078⟩⟩, + ⟨⟨-7102847320133348423329695797002078320979476371862037723268,-7102847320133348423329695797002078320979476371859337458524⟩,⟨-14871473754295405514775103243810286511244980782320545223407,-14871473754295405514775103243810286511244980782317829977242⟩⟩] +lemma tw1_0_2_5_calc (j : Fin 31) : taylorWaveBox 1 0 2 5 j = tw1_0_2_5 j := by + revert j + decide +kernel +def tw1_0_2_6 : Fin 31 → CI := ![⟨⟨5424534729694591507666225691442623955307028042963992360165,5424534729694591507666225691442623955307028042965087940933⟩,⟨1156398532688478065908058752119012786265831744397482344799,1156398532688478065908058752119012786265831744398569849617⟩⟩, + ⟨⟨2346891136463335419502473040523807653398749749182438669343,2346891136463335419502473040523807653398749749183027229021⟩,⟨2317082647906720415162243182837381517394776490364731993618,2317082647906720415162243182837381517394776490365327656935⟩⟩, + ⟨⟨453260160505873213283055960931952885310572200463541452053,453260160505873213283055960931952885310572200463881266961⟩,⟨1841306489480892942390081176156693181434771002968217674566,1841306489480892942390081176156693181434771002968561579262⟩⟩, + ⟨⟨-296540235697879101999793643632490297132204670245842677889,-296540235697879101999793643632490297132204670245634058872⟩,⟨1007164882551176882886119622099027141689536474829743684640,1007164882551176882886119622099027141689536474829951162154⟩⟩, + ⟨⟨-394069841926012700457854456812368863643589311346042524225,-394069841926012700457854456812368863643589311345944494876⟩,⟨393724479101424335694903939996246916550138175942069966078,393724479101424335694903939996246916550138175942166990267⟩⟩, + ⟨⟨-267256450800484335671337615932301856695306148780727837512,-267256450800484335671337615932301856695306148780683334624⟩,⟨88857820684967338084506045118020233259755678916955752252,88857820684967338084506045118020233259755678917000334455⟩⟩, + ⟨⟨-134183792618791676206421596183664536568228125969611090139,-134183792618791676206421596183664536568228125969597531192⟩,⟨-13130174971242956443991879101332416483742523382365405086,-13130174971242956443991879101332416483742523382351846455⟩⟩, + ⟨⟨-54457407669849925519023916641566284137758563544157887562,-54457407669849925519023916641566284137758563544148701110⟩,⟨-26770442723384060439215109773184556640475942064033151872,-26770442723384060439215109773184556640475942064023984370⟩⟩, + ⟨⟨-18865021583062935527991398311760092314927164409952582256,-18865021583062935527991398311760092314927164409948653073⟩,⟨-17148467269859111628559733206122591282490998286901600184,-17148467269859111628559733206122591282490998286897642352⟩⟩, + ⟨⟨-6079630745690469822407439360890041056140475897683852553,-6079630745690469822407439360890041056140475897682186996⟩,⟨-7863271405394638557188853765989163358805371468831923071,-7863271405394638557188853765989163358805371468830256121⟩⟩, + ⟨⟨-2112735301064833734517247897707574499952697161121401785,-2112735301064833734517247897707574499952697161120846218⟩,⟨-2904614066020026786109361188533834975399583804179719690,-2904614066020026786109361188533834975399583804179163578⟩⟩, + ⟨⟨-873726483565625233954465425565045167392887046732424315,-873726483565625233954465425565045167392887046732233562⟩,⟨-846767881379657755225594622861626818533077830122326754,-846767881379657755225594622861626818533077830122135928⟩⟩, + ⟨⟨-381613402812589440002064167750453355506649915677826907,-381613402812589440002064167750453355506649915677761759⟩,⟨-127275663348045696993735934659415373522200799755900044,-127275663348045696993735934659415373522200799755834945⟩⟩, + ⟨⟨-126876172062358508031751457118874629439793124340365601,-126876172062358508031751457118874629439793124340349679⟩,⟨66225440261777918311847341926325193887950177282760117,66225440261777918311847341926325193887950177282776167⟩⟩, + ⟨⟨6647108652370713322827274759097914238286800698127751,6647108652370713322827274759097914238286800698132637⟩,⟨65358870447242963675709002999277827500488919532090206,65358870447242963675709002999277827500488919532095161⟩⟩, + ⟨⟨48799721147476725459667843349899805746778251827579783,48799721147476725459667843349899805746778251827581419⟩,⟨-1,1⟩⟩, + ⟨⟨6647108652370713322827274759097914238286800698127751,6647108652370713322827274759097914238286800698132637⟩,⟨-65358870447242963675709002999277827500488919532095161,-65358870447242963675709002999277827500488919532090206⟩⟩, + ⟨⟨-126876172062358508031751457118874629439793124340365601,-126876172062358508031751457118874629439793124340349679⟩,⟨-66225440261777918311847341926325193887950177282776167,-66225440261777918311847341926325193887950177282760117⟩⟩, + ⟨⟨-381613402812589440002064167750453355506649915677826907,-381613402812589440002064167750453355506649915677761759⟩,⟨127275663348045696993735934659415373522200799755834945,127275663348045696993735934659415373522200799755900044⟩⟩, + ⟨⟨-873726483565625233954465425565045167392887046732424315,-873726483565625233954465425565045167392887046732233562⟩,⟨846767881379657755225594622861626818533077830122135928,846767881379657755225594622861626818533077830122326754⟩⟩, + ⟨⟨-2112735301064833734517247897707574499952697161121401785,-2112735301064833734517247897707574499952697161120846218⟩,⟨2904614066020026786109361188533834975399583804179163578,2904614066020026786109361188533834975399583804179719690⟩⟩, + ⟨⟨-6079630745690469822407439360890041056140475897683852553,-6079630745690469822407439360890041056140475897682186996⟩,⟨7863271405394638557188853765989163358805371468830256121,7863271405394638557188853765989163358805371468831923071⟩⟩, + ⟨⟨-18865021583062935527991398311760092314927164409952582256,-18865021583062935527991398311760092314927164409948653073⟩,⟨17148467269859111628559733206122591282490998286897642352,17148467269859111628559733206122591282490998286901600184⟩⟩, + ⟨⟨-54457407669849925519023916641566284137758563544157887562,-54457407669849925519023916641566284137758563544148701110⟩,⟨26770442723384060439215109773184556640475942064023984370,26770442723384060439215109773184556640475942064033151872⟩⟩, + ⟨⟨-134183792618791676206421596183664536568228125969611090139,-134183792618791676206421596183664536568228125969597531192⟩,⟨13130174971242956443991879101332416483742523382351846454,13130174971242956443991879101332416483742523382365405085⟩⟩, + ⟨⟨-267256450800484335671337615932301856695306148780727837510,-267256450800484335671337615932301856695306148780683334625⟩,⟨-88857820684967338084506045118020233259755678917000334455,-88857820684967338084506045118020233259755678916955752255⟩⟩, + ⟨⟨-394069841926012700457854456812368863643589311346042524221,-394069841926012700457854456812368863643589311345944494876⟩,⟨-393724479101424335694903939996246916550138175942166990268,-393724479101424335694903939996246916550138175942069966083⟩⟩, + ⟨⟨-296540235697879101999793643632490297132204670245842677879,-296540235697879101999793643632490297132204670245634058866⟩,⟨-1007164882551176882886119622099027141689536474829951162154,-1007164882551176882886119622099027141689536474829743684643⟩⟩, + ⟨⟨453260160505873213283055960931952885310572200463541452061,453260160505873213283055960931952885310572200463881266977⟩,⟨-1841306489480892942390081176156693181434771002968561579263,-1841306489480892942390081176156693181434771002968217674559⟩⟩, + ⟨⟨2346891136463335419502473040523807653398749749182438669361,2346891136463335419502473040523807653398749749183027229034⟩,⟨-2317082647906720415162243182837381517394776490365327656917,-2317082647906720415162243182837381517394776490364731993605⟩⟩, + ⟨⟨5424534729694591507666225691442623955307028042963992360183,5424534729694591507666225691442623955307028042965087940931⟩,⟨-1156398532688478065908058752119012786265831744398569849571,-1156398532688478065908058752119012786265831744397482344772⟩⟩] +lemma tw1_0_2_6_calc (j : Fin 31) : taylorWaveBox 1 0 2 6 j = tw1_0_2_6 j := by + revert j + decide +kernel +def tw1_0_2_7 : Fin 31 → CI := ![⟨⟨-42321268010384683293687128321120187921738749179900619304,-42321268010384683293687128321120187921738749179529815991⟩,⟨-1658665037808434897716439560142279096444533810327722699955,-1658665037808434897716439560142279096444533810327349239045⟩⟩, + ⟨⟨465233975992718280041894741593491284206216463476621871340,465233975992718280041894741593491284206216463476809370052⟩,⟨-798933646365197005260140129354940380511396137204773222502,-798933646365197005260140129354940380511396137204587789035⟩⟩, + ⟨⟨432555571476594769242971375008333827035106320794169324886,432555571476594769242971375008333827035106320794268414386⟩,⟨-242815741114998459102141397817217706542207690623726694192,-242815741114998459102141397817217706542207690623628507612⟩⟩, + ⟨⟨255080324723339040864121216606650230671071499425415976913,255080324723339040864121216606650230671071499425470236770⟩,⟨-1305326876346557658202770040038591285841914506115588589,-1305326876346557658202770040038591285841914506061117800⟩⟩, + ⟨⟨111499791082372344606410556440471028703952957450435263684,111499791082372344606410556440471028703952957450457920403⟩,⟨56575044274419559258760796117085080982042110110321482384,56575044274419559258760796117085080982042110110344228207⟩⟩, + ⟨⟨35889814911310781274155714746347880743418071386624277804,35889814911310781274155714746347880743418071386633991519⟩,⟨45624387336743350881100758176101326974950475912532998233,45624387336743350881100758176101326974950475912542700733⟩⟩, + ⟨⟨7076148089933303036771107308042606472634812548946616866,7076148089933303036771107308042606472634812548949798566⟩,⟨24336148978556357331645091832910021078542702865570834866,24336148978556357331645091832910021078542702865574056950⟩⟩, + ⟨⟨-351332338371084334769371106675577284670916329155836339,-351332338371084334769371106675577284670916329153832252⟩,⟨10317472279311276652245245441369671738426460716476985830,10317472279311276652245245441369671738426460716478992543⟩⟩, + ⟨⟨-1010840271559336725863473538416162484908995276496893916,-1010840271559336725863473538416162484908995276496175589⟩,⟨3758074618328862470313537882740768825315309200134594925,3758074618328862470313537882740768825315309200135310447⟩⟩, + ⟨⟨-490494878075947979871950740180350679149937226728625706,-490494878075947979871950740180350679149937226728347770⟩,⟨1256357062793411397434197072614692993094442288703485956,1256357062793411397434197072614692993094442288703764244⟩⟩, + ⟨⟨-134142578603161160227242063965680346487841286273987654,-134142578603161160227242063965680346487841286273897579⟩,⟨407636911511018827655480636395709803675891902456523933,407636911511018827655480636395709803675891902456613854⟩⟩, + ⟨⟨-4686328978350024022279212086151045113693275651841744,-4686328978350024022279212086151045113693275651815016⟩,⟨126890678565701854351262632085447606287857311771456731,126890678565701854351262632085447606287857311771483471⟩⟩, + ⟨⟨19237043451665410391008083262135204625309394789374268,19237043451665410391008083262135204625309394789382010⟩,⟨31086885361729985340707916398989245991808124030577299,31086885361729985340707916398989245991808124030585044⟩⟩, + ⟨⟨11426187737372979270702852273706063886774710498770042,11426187737372979270702852273706063886774710498771681⟩,⟨297496397207751307516766322768264521972790673996337,297496397207751307516766322768264521972790673997980⟩⟩, + ⟨⟨803419256100876525727183169132352474561771854369267,803419256100876525727183169132352474561771854369712⟩,⟨-4691814307334869894421439449413154882380454141414206,-4691814307334869894421439449413154882380454141413760⟩⟩, + ⟨⟨-3406863232314296794760773022703546905404004770434731,-3406863232314296794760773022703546905404004770434605⟩,⟨-1,1⟩⟩, + ⟨⟨803419256100876525727183169132352474561771854369267,803419256100876525727183169132352474561771854369712⟩,⟨4691814307334869894421439449413154882380454141413760,4691814307334869894421439449413154882380454141414206⟩⟩, + ⟨⟨11426187737372979270702852273706063886774710498770042,11426187737372979270702852273706063886774710498771681⟩,⟨-297496397207751307516766322768264521972790673997980,-297496397207751307516766322768264521972790673996337⟩⟩, + ⟨⟨19237043451665410391008083262135204625309394789374268,19237043451665410391008083262135204625309394789382010⟩,⟨-31086885361729985340707916398989245991808124030585044,-31086885361729985340707916398989245991808124030577299⟩⟩, + ⟨⟨-4686328978350024022279212086151045113693275651841744,-4686328978350024022279212086151045113693275651815016⟩,⟨-126890678565701854351262632085447606287857311771483471,-126890678565701854351262632085447606287857311771456731⟩⟩, + ⟨⟨-134142578603161160227242063965680346487841286273987654,-134142578603161160227242063965680346487841286273897579⟩,⟨-407636911511018827655480636395709803675891902456613854,-407636911511018827655480636395709803675891902456523933⟩⟩, + ⟨⟨-490494878075947979871950740180350679149937226728625706,-490494878075947979871950740180350679149937226728347770⟩,⟨-1256357062793411397434197072614692993094442288703764244,-1256357062793411397434197072614692993094442288703485956⟩⟩, + ⟨⟨-1010840271559336725863473538416162484908995276496893916,-1010840271559336725863473538416162484908995276496175589⟩,⟨-3758074618328862470313537882740768825315309200135310447,-3758074618328862470313537882740768825315309200134594925⟩⟩, + ⟨⟨-351332338371084334769371106675577284670916329155836339,-351332338371084334769371106675577284670916329153832252⟩,⟨-10317472279311276652245245441369671738426460716478992543,-10317472279311276652245245441369671738426460716476985830⟩⟩, + ⟨⟨7076148089933303036771107308042606472634812548946616867,7076148089933303036771107308042606472634812548949798566⟩,⟨-24336148978556357331645091832910021078542702865574056950,-24336148978556357331645091832910021078542702865570834866⟩⟩, + ⟨⟨35889814911310781274155714746347880743418071386624277804,35889814911310781274155714746347880743418071386633991519⟩,⟨-45624387336743350881100758176101326974950475912542700732,-45624387336743350881100758176101326974950475912532998233⟩⟩, + ⟨⟨111499791082372344606410556440471028703952957450435263685,111499791082372344606410556440471028703952957450457920403⟩,⟨-56575044274419559258760796117085080982042110110344228206,-56575044274419559258760796117085080982042110110321482383⟩⟩, + ⟨⟨255080324723339040864121216606650230671071499425415976914,255080324723339040864121216606650230671071499425470236770⟩,⟨1305326876346557658202770040038591285841914506061117802,1305326876346557658202770040038591285841914506115588591⟩⟩, + ⟨⟨432555571476594769242971375008333827035106320794169324883,432555571476594769242971375008333827035106320794268414386⟩,⟨242815741114998459102141397817217706542207690623628507614,242815741114998459102141397817217706542207690623726694195⟩⟩, + ⟨⟨465233975992718280041894741593491284206216463476621871335,465233975992718280041894741593491284206216463476809370046⟩,⟨798933646365197005260140129354940380511396137204587789039,798933646365197005260140129354940380511396137204773222504⟩⟩, + ⟨⟨-42321268010384683293687128321120187921738749179900619312,-42321268010384683293687128321120187921738749179529816006⟩,⟨1658665037808434897716439560142279096444533810327349239048,1658665037808434897716439560142279096444533810327722699952⟩⟩] +lemma tw1_0_2_7_calc (j : Fin 31) : taylorWaveBox 1 0 2 7 j = tw1_0_2_7 j := by + revert j + decide +kernel +def tw1_0_2_8 : Fin 31 → CI := ![⟨⟨-431578367768660725093283662295418873410204306654270773607,-431578367768660725093283662295418873410204306654160371558⟩,⟨115296680006906751609943917777731528621325511196375284275,115296680006906751609943917777731528621325511196485051209⟩⟩, + ⟨⟨-224447829700095891941834589379530863327393174622452713935,-224447829700095891941834589379530863327393174622401875567⟩,⟨-63479623942508468570458097825472464204877236001203430412,-63479623942508468570458097825472464204877236001152164369⟩⟩, + ⟨⟨-82271412168053671817707634588677160435424227501941017243,-82271412168053671817707634588677160435424227501916301386⟩,⟨-82887182992202433041565304192010364117202137405542204734,-82887182992202433041565304192010364117202137405517364495⟩⟩, + ⟨⟨-16300556506207060649636313953998062504995367772569498006,-16300556506207060649636313953998062504995367772557110608⟩,⟨-53341882175237449453167983722882991691866165757186790324,-53341882175237449453167983722882991691866165757174422575⟩⟩, + ⟨⟨3855890276728510472527952031372065686755636446308658034,3855890276728510472527952031372065686755636446313342209⟩,⟨-24961138035785979432705886837219598204398648224966325863,-24961138035785979432705886837219598204398648224961624423⟩⟩, + ⟨⟨5707934205032356168749950179976413508261845399593281108,5707934205032356168749950179976413508261845399595578364⟩,⟨-9130619182970260243305605607000164659198913162693108936,-9130619182970260243305605607000164659198913162690812730⟩⟩, + ⟨⟨3378105845284011895302636274933942590341708427910519050,3378105845284011895302636274933942590341708427911205992⟩,⟨-2640604079706383676053505728057958122568552358559453728,-2640604079706383676053505728057958122568552358558775771⟩⟩, + ⟨⟨1462665755921708929165705345798701452189005528823490129,1462665755921708929165705345798701452189005528823864819⟩,⟨-599210653739563054987513672733946754360775618212360643,-599210653739563054987513672733946754360775618211986019⟩⟩, + ⟨⟨522648396799945718037089522811185678011645999127037270,522648396799945718037089522811185678011645999127151888⟩,⟨-112629355598436259026699790377279660711369211212349112,-112629355598436259026699790377279660711369211212234590⟩⟩, + ⟨⟨162384106070317450367182545085324231302278132972293815,162384106070317450367182545085324231302278132972339919⟩,⟨-27574738855587985668799375625839724558091207541812788,-27574738855587985668799375625839724558091207541766750⟩⟩, + ⟨⟨44001458082105910111902423227511862560224626429866435,44001458082105910111902423227511862560224626429878837⟩,⟨-13906434211998696061200621812232890422653701230743932,-13906434211998696061200621812232890422653701230731525⟩⟩, + ⟨⟨9153091258058960992627951930868557958132795652214136,9153091258058960992627951930868557958132795652217608⟩,⟨-7645608989805335827087623992865463250853130297573051,-7645608989805335827087623992865463250853130297569581⟩⟩, + ⟨⟨419006423565856227367785757676317798207357580767043,419006423565856227367785757676317798207357580767942⟩,⟨-2960495853250308283054633619226969790419162039702001,-2960495853250308283054633619226969790419162039701102⟩⟩, + ⟨⟨-707543965797182418375086360129277192783190360766881,-707543965797182418375086360129277192783190360766721⟩,⟨-417541443855065312456260373251166572660234118287830,-417541443855065312456260373251166572660234118287670⟩⟩, + ⟨⟨-132367928209552427441971563280947457572094314316751,-132367928209552427441971563280947457572094314316714⟩,⟨280773075905730397151253157902670996219205093324642,280773075905730397151253157902670996219205093324679⟩⟩, + ⟨⟨214059530048475437921357029863389443987855953195044,214059530048475437921357029863389443987855953195054⟩,⟨-1,1⟩⟩, + ⟨⟨-132367928209552427441971563280947457572094314316751,-132367928209552427441971563280947457572094314316714⟩,⟨-280773075905730397151253157902670996219205093324679,-280773075905730397151253157902670996219205093324642⟩⟩, + ⟨⟨-707543965797182418375086360129277192783190360766881,-707543965797182418375086360129277192783190360766721⟩,⟨417541443855065312456260373251166572660234118287670,417541443855065312456260373251166572660234118287830⟩⟩, + ⟨⟨419006423565856227367785757676317798207357580767043,419006423565856227367785757676317798207357580767942⟩,⟨2960495853250308283054633619226969790419162039701102,2960495853250308283054633619226969790419162039702001⟩⟩, + ⟨⟨9153091258058960992627951930868557958132795652214136,9153091258058960992627951930868557958132795652217608⟩,⟨7645608989805335827087623992865463250853130297569581,7645608989805335827087623992865463250853130297573051⟩⟩, + ⟨⟨44001458082105910111902423227511862560224626429866435,44001458082105910111902423227511862560224626429878837⟩,⟨13906434211998696061200621812232890422653701230731525,13906434211998696061200621812232890422653701230743932⟩⟩, + ⟨⟨162384106070317450367182545085324231302278132972293815,162384106070317450367182545085324231302278132972339919⟩,⟨27574738855587985668799375625839724558091207541766750,27574738855587985668799375625839724558091207541812788⟩⟩, + ⟨⟨522648396799945718037089522811185678011645999127037270,522648396799945718037089522811185678011645999127151888⟩,⟨112629355598436259026699790377279660711369211212234590,112629355598436259026699790377279660711369211212349112⟩⟩, + ⟨⟨1462665755921708929165705345798701452189005528823490129,1462665755921708929165705345798701452189005528823864819⟩,⟨599210653739563054987513672733946754360775618211986019,599210653739563054987513672733946754360775618212360643⟩⟩, + ⟨⟨3378105845284011895302636274933942590341708427910519050,3378105845284011895302636274933942590341708427911205992⟩,⟨2640604079706383676053505728057958122568552358558775771,2640604079706383676053505728057958122568552358559453728⟩⟩, + ⟨⟨5707934205032356168749950179976413508261845399593281108,5707934205032356168749950179976413508261845399595578364⟩,⟨9130619182970260243305605607000164659198913162690812730,9130619182970260243305605607000164659198913162693108936⟩⟩, + ⟨⟨3855890276728510472527952031372065686755636446308658034,3855890276728510472527952031372065686755636446313342209⟩,⟨24961138035785979432705886837219598204398648224961624423,24961138035785979432705886837219598204398648224966325863⟩⟩, + ⟨⟨-16300556506207060649636313953998062504995367772569498006,-16300556506207060649636313953998062504995367772557110609⟩,⟨53341882175237449453167983722882991691866165757174422575,53341882175237449453167983722882991691866165757186790324⟩⟩, + ⟨⟨-82271412168053671817707634588677160435424227501941017244,-82271412168053671817707634588677160435424227501916301386⟩,⟨82887182992202433041565304192010364117202137405517364495,82887182992202433041565304192010364117202137405542204734⟩⟩, + ⟨⟨-224447829700095891941834589379530863327393174622452713936,-224447829700095891941834589379530863327393174622401875568⟩,⟨63479623942508468570458097825472464204877236001152164367,63479623942508468570458097825472464204877236001203430411⟩⟩, + ⟨⟨-431578367768660725093283662295418873410204306654270773606,-431578367768660725093283662295418873410204306654160371558⟩,⟨-115296680006906751609943917777731528621325511196485051211,-115296680006906751609943917777731528621325511196375284279⟩⟩] +lemma tw1_0_2_8_calc (j : Fin 31) : taylorWaveBox 1 0 2 8 j = tw1_0_2_8 j := by + revert j + decide +kernel +def tw1_0_2_9 : Fin 31 → CI := ![⟨⟨52092244394262355468652988677325367738404828949601893729,52092244394262355468652988677325367738404828949630647134⟩,⟨96129680373937923833607145698458364925543095295673063812,96129680373937923833607145698458364925543095295701925238⟩⟩, + ⟨⟨-1280477438313149473457597935373096550352397657812024720,-1280477438313149473457597935373096550352397657799601303⟩,⟨53483175623381101546177594517877297974997473236160483459,53483175623381101546177594517877297974997473236172849448⟩⟩, + ⟨⟨-12397490891425823427787714230202719489138801092909607200,-12397490891425823427787714230202719489138801092904073095⟩,⟨21704315088248490318473808083516170689929125831160819826,21704315088248490318473808083516170689929125831166353110⟩⟩, + ⟨⟨-9225185006035193246855081533057424470037158051821174017,-9225185006035193246855081533057424470037158051818524497⟩,⟨6150499886087206181458743084449780928534490970909161673,6150499886087206181458743084449780928534490970911808177⟩⟩, + ⟨⟨-4576788375263802584580574323496686012502020888275277263,-4576788375263802584580574323496686012502020888274179511⟩,⟨752797061272085570348390067246173405684784772750213476,752797061272085570348390067246173405684784772751301714⟩⟩, + ⟨⟨-1774757961999933666211469465331020654355914143282804912,-1774757961999933666211469465331020654355914143282326421⟩,⟨-384117027901171679543241500062308010247990293748471883,-384117027901171679543241500062308010247990293747992915⟩⟩, + ⟨⟨-570034335476454907616332989786025877189747477743417015,-570034335476454907616332989786025877189747477743290236⟩,⟨-331561434338866624581109152469835381254240820360664922,-331561434338866624581109152469835381254240820360537172⟩⟩, + ⟨⟨-159606900395894938811701457224325531166456974172073673,-159606900395894938811701457224325531166456974172011391⟩,⟨-151433773292023252145807281739616583559870608295588819,-151433773292023252145807281739616583559870608295526589⟩⟩, + ⟨⟨-42362944457354001126345529249735955750974679783662583,-42362944457354001126345529249735955750974679783643293⟩,⟨-51615305780427219174026970620410470189305406455780122,-51615305780427219174026970620410470189305406455760755⟩⟩, + ⟨⟨-11900467449318947546931890438898550655632047783439207,-11900467449318947546931890438898550655632047783432624⟩,⟨-13883865347946415401950477371865357443038177355830425,-13883865347946415401950477371865357443038177355823839⟩⟩, + ⟨⟨-3616598609287695564995798062428670241151562722330905,-3616598609287695564995798062428670241151562722329208⟩,⟨-2696440513540173102398260796736397907180719067104652,-2696440513540173102398260796736397907180719067102954⟩⟩, + ⟨⟨-1008063532588929588443474464030286933997136208105843,-1008063532588929588443474464030286933997136208105437⟩,⟨-144198669147913518215454031267567163547093825771515,-144198669147913518215454031267567163547093825771110⟩⟩, + ⟨⟨-164852864031089813303433256643817383627144876519912,-164852864031089813303433256643817383627144876519820⟩,⟨149158468578539863477020593077677050800185095143144,149158468578539863477020593077677050800185095143237⟩⟩, + ⟨⟨27164865984727685800877919071699227006048805880625,27164865984727685800877919071699227006048805880641⟩,⟨46302587512040840057279359483444730467003677567873,46302587512040840057279359483444730467003677567888⟩⟩, + ⟨⟨12015760765625069758904268650972698900317305950195,12015760765625069758904268650972698900317305950198⟩,⟨-13937487709568061279218335708907440228809079456561,-13937487709568061279218335708907440228809079456558⟩⟩, + ⟨⟨-12227051764203164237741357954703238355235946900431,-12227051764203164237741357954703238355235946900430⟩,⟨-1,1⟩⟩, + ⟨⟨12015760765625069758904268650972698900317305950195,12015760765625069758904268650972698900317305950198⟩,⟨13937487709568061279218335708907440228809079456558,13937487709568061279218335708907440228809079456561⟩⟩, + ⟨⟨27164865984727685800877919071699227006048805880625,27164865984727685800877919071699227006048805880641⟩,⟨-46302587512040840057279359483444730467003677567888,-46302587512040840057279359483444730467003677567873⟩⟩, + ⟨⟨-164852864031089813303433256643817383627144876519912,-164852864031089813303433256643817383627144876519820⟩,⟨-149158468578539863477020593077677050800185095143237,-149158468578539863477020593077677050800185095143144⟩⟩, + ⟨⟨-1008063532588929588443474464030286933997136208105843,-1008063532588929588443474464030286933997136208105437⟩,⟨144198669147913518215454031267567163547093825771110,144198669147913518215454031267567163547093825771515⟩⟩, + ⟨⟨-3616598609287695564995798062428670241151562722330905,-3616598609287695564995798062428670241151562722329208⟩,⟨2696440513540173102398260796736397907180719067102954,2696440513540173102398260796736397907180719067104652⟩⟩, + ⟨⟨-11900467449318947546931890438898550655632047783439207,-11900467449318947546931890438898550655632047783432624⟩,⟨13883865347946415401950477371865357443038177355823839,13883865347946415401950477371865357443038177355830425⟩⟩, + ⟨⟨-42362944457354001126345529249735955750974679783662583,-42362944457354001126345529249735955750974679783643293⟩,⟨51615305780427219174026970620410470189305406455760755,51615305780427219174026970620410470189305406455780122⟩⟩, + ⟨⟨-159606900395894938811701457224325531166456974172073673,-159606900395894938811701457224325531166456974172011391⟩,⟨151433773292023252145807281739616583559870608295526589,151433773292023252145807281739616583559870608295588819⟩⟩, + ⟨⟨-570034335476454907616332989786025877189747477743417015,-570034335476454907616332989786025877189747477743290236⟩,⟨331561434338866624581109152469835381254240820360537172,331561434338866624581109152469835381254240820360664922⟩⟩, + ⟨⟨-1774757961999933666211469465331020654355914143282804912,-1774757961999933666211469465331020654355914143282326421⟩,⟨384117027901171679543241500062308010247990293747992915,384117027901171679543241500062308010247990293748471883⟩⟩, + ⟨⟨-4576788375263802584580574323496686012502020888275277263,-4576788375263802584580574323496686012502020888274179511⟩,⟨-752797061272085570348390067246173405684784772751301714,-752797061272085570348390067246173405684784772750213476⟩⟩, + ⟨⟨-9225185006035193246855081533057424470037158051821174017,-9225185006035193246855081533057424470037158051818524497⟩,⟨-6150499886087206181458743084449780928534490970911808177,-6150499886087206181458743084449780928534490970909161673⟩⟩, + ⟨⟨-12397490891425823427787714230202719489138801092909607200,-12397490891425823427787714230202719489138801092904073095⟩,⟨-21704315088248490318473808083516170689929125831166353110,-21704315088248490318473808083516170689929125831160819826⟩⟩, + ⟨⟨-1280477438313149473457597935373096550352397657812024719,-1280477438313149473457597935373096550352397657799601303⟩,⟨-53483175623381101546177594517877297974997473236172849448,-53483175623381101546177594517877297974997473236160483459⟩⟩, + ⟨⟨52092244394262355468652988677325367738404828949601893730,52092244394262355468652988677325367738404828949630647135⟩,⟨-96129680373937923833607145698458364925543095295701925237,-96129680373937923833607145698458364925543095295673063811⟩⟩] +lemma tw1_0_2_9_calc (j : Fin 31) : taylorWaveBox 1 0 2 9 j = tw1_0_2_9 j := by + revert j + decide +kernel +def tw1_0_2_10 : Fin 31 → CI := ![⟨⟨18244699354387070870714422536841638355500639879886849244,18244699354387070870714422536841638355500639879893629703⟩,⟨-16398103037162937440374990803483845274891690313067996737,-16398103037162937440374990803483845274891690313061225356⟩⟩, + ⟨⟨10957383247475862735152762080137510351642689519566513557,10957383247475862735152762080137510351642689519569228022⟩,⟨-2539639475363664129108090726057340086484701371688062535,-2539639475363664129108090726057340086484701371685347284⟩⟩, + ⟨⟨4752925173743210117373056574002940822221617562416282776,4752925173743210117373056574002940822221617562417493278⟩,⟨1207649265741038179689277115313245066419259947577295292,1207649265741038179689277115313245066419259947578500350⟩⟩, + ⟨⟨1556494293940360541895053422104747277111922253259397505,1556494293940360541895053422104747277111922253259996140⟩,⟨1288059103641997076277650948469650788785752339581415137,1288059103641997076277650948469650788785752339582015627⟩⟩, + ⟨⟨360078962699306504491341641809420422013885225330670802,360078962699306504491341641809420422013885225330890886⟩,⟨692817212601816099969182721331884978085169783286394415,692817212601816099969182721331884978085169783286616300⟩⟩, + ⟨⟨37058552506563334692395538946420615982606261879158959,37058552506563334692395538946420615982606261879247639⟩,⟨278240402740244861505977733851321928181947232228263565,278240402740244861505977733851321928181947232228352159⟩⟩, + ⟨⟨-13554362253415409859809628316024831808561140694893151,-13554362253415409859809628316024831808561140694871750⟩,⟨91977836131660066079350377999479252061001380261360656,91977836131660066079350377999479252061001380261382040⟩⟩, + ⟨⟨-9263121855330031748172681871151269771985267246695365,-9263121855330031748172681871151269771985267246684926⟩,⟨26500159966733426718527219895993847248041143947199172,26500159966733426718527219895993847248041143947209621⟩⟩, + ⟨⟨-3036880758509748987510014346584867870185966918941112,-3036880758509748987510014346584867870185966918938271⟩,⟨7015579450328156705734884558422077614947827648143782,7015579450328156705734884558422077614947827648146616⟩⟩, + ⟨⟨-588488797574984298567395441601056220264115071544029,-588488797574984298567395441601056220264115071543147⟩,⟨1765469187260774583486823527545208100598185350333049,1765469187260774583486823527545208100598185350333932⟩⟩, + ⟨⟨-6726027323990053822262351650034803853497582626441,-6726027323990053822262351650034803853497582626234⟩,⟨404191767865987716571004611316295016889743743571368,404191767865987716571004611316295016889743743571575⟩⟩, + ⟨⟨44392944626802414972615593490197412791653863441486,44392944626802414972615593490197412791653863441532⟩,⟨66196983704081769831434689218907159819889643774499,66196983704081769831434689218907159819889643774544⟩⟩, + ⟨⟨15139941735875214382205991978878222514049730580870,15139941735875214382205991978878222514049730580880⟩,⟨-616856005071458168735691814103315482151199024999,-616856005071458168735691814103315482151199024989⟩⟩, + ⟨⟨-75461383092992284822746995866449982101105301073,-75461383092992284822746995866449982101105301071⟩,⟨-3214591733327949736623601392992390893568938407986,-3214591733327949736623601392992390893568938407984⟩⟩, + ⟨⟨-831856304133174694225726798547105198014376043769,-831856304133174694225726798547105198014376043768⟩,⟨555002993721190786611497398716728652456780436522,555002993721190786611497398716728652456780436523⟩⟩, + ⟨⟨640206933291379693758339279768110736038578101408,640206933291379693758339279768110736038578101410⟩,⟨-1,1⟩⟩, + ⟨⟨-831856304133174694225726798547105198014376043769,-831856304133174694225726798547105198014376043768⟩,⟨-555002993721190786611497398716728652456780436523,-555002993721190786611497398716728652456780436522⟩⟩, + ⟨⟨-75461383092992284822746995866449982101105301073,-75461383092992284822746995866449982101105301071⟩,⟨3214591733327949736623601392992390893568938407984,3214591733327949736623601392992390893568938407986⟩⟩, + ⟨⟨15139941735875214382205991978878222514049730580870,15139941735875214382205991978878222514049730580880⟩,⟨616856005071458168735691814103315482151199024989,616856005071458168735691814103315482151199024999⟩⟩, + ⟨⟨44392944626802414972615593490197412791653863441486,44392944626802414972615593490197412791653863441532⟩,⟨-66196983704081769831434689218907159819889643774544,-66196983704081769831434689218907159819889643774499⟩⟩, + ⟨⟨-6726027323990053822262351650034803853497582626441,-6726027323990053822262351650034803853497582626234⟩,⟨-404191767865987716571004611316295016889743743571575,-404191767865987716571004611316295016889743743571368⟩⟩, + ⟨⟨-588488797574984298567395441601056220264115071544029,-588488797574984298567395441601056220264115071543147⟩,⟨-1765469187260774583486823527545208100598185350333932,-1765469187260774583486823527545208100598185350333049⟩⟩, + ⟨⟨-3036880758509748987510014346584867870185966918941112,-3036880758509748987510014346584867870185966918938271⟩,⟨-7015579450328156705734884558422077614947827648146616,-7015579450328156705734884558422077614947827648143782⟩⟩, + ⟨⟨-9263121855330031748172681871151269771985267246695365,-9263121855330031748172681871151269771985267246684926⟩,⟨-26500159966733426718527219895993847248041143947209621,-26500159966733426718527219895993847248041143947199172⟩⟩, + ⟨⟨-13554362253415409859809628316024831808561140694893151,-13554362253415409859809628316024831808561140694871750⟩,⟨-91977836131660066079350377999479252061001380261382040,-91977836131660066079350377999479252061001380261360656⟩⟩, + ⟨⟨37058552506563334692395538946420615982606261879158959,37058552506563334692395538946420615982606261879247639⟩,⟨-278240402740244861505977733851321928181947232228352159,-278240402740244861505977733851321928181947232228263565⟩⟩, + ⟨⟨360078962699306504491341641809420422013885225330670802,360078962699306504491341641809420422013885225330890886⟩,⟨-692817212601816099969182721331884978085169783286616300,-692817212601816099969182721331884978085169783286394415⟩⟩, + ⟨⟨1556494293940360541895053422104747277111922253259397505,1556494293940360541895053422104747277111922253259996140⟩,⟨-1288059103641997076277650948469650788785752339582015627,-1288059103641997076277650948469650788785752339581415137⟩⟩, + ⟨⟨4752925173743210117373056574002940822221617562416282776,4752925173743210117373056574002940822221617562417493278⟩,⟨-1207649265741038179689277115313245066419259947578500350,-1207649265741038179689277115313245066419259947577295292⟩⟩, + ⟨⟨10957383247475862735152762080137510351642689519566513557,10957383247475862735152762080137510351642689519569228022⟩,⟨2539639475363664129108090726057340086484701371685347284,2539639475363664129108090726057340086484701371688062535⟩⟩, + ⟨⟨18244699354387070870714422536841638355500639879886849244,18244699354387070870714422536841638355500639879893629703⟩,⟨16398103037162937440374990803483845274891690313061225356,16398103037162937440374990803483845274891690313067996737⟩⟩] +lemma tw1_0_2_10_calc (j : Fin 31) : taylorWaveBox 1 0 2 10 j = tw1_0_2_10 j := by + revert j + decide +kernel +def tw1_0_2_11 : Fin 31 → CI := ![⟨⟨-4184124311823513348547682812165694460736401571423601748,-4184124311823513348547682812165694460736401571422147451⟩,⟨-2881636862208369933170823081648543084336330716324163348,-2881636862208369933170823081648543084336330716322710900⟩⟩, + ⟨⟨-1006941294983695235372914452478039213684046812414001821,-1006941294983695235372914452478039213684046812413403959⟩,⟨-1936787351251639905470258859003348366131094228920505732,-1936787351251639905470258859003348366131094228919905456⟩⟩, + ⟨⟨-18944745787479411252203242402631459819395197241827294,-18944745787479411252203242402631459819395197241560775⟩,⟨-887910273233043332184419480045186081370656181746042673,-887910273233043332184419480045186081370656181745774421⟩⟩, + ⟨⟨132286959263174945358541491111859988902818761149534631,132286959263174945358541491111859988902818761149655147⟩,⟨-313017340739221258513087430787625553445814581427016532,-313017340739221258513087430787625553445814581426896394⟩⟩, + ⟨⟨84913021338258585456637346632268699320774504604527954,84913021338258585456637346632268699320774504604567941⟩,⟨-86662451874434374684478745966971683492067344534217310,-86662451874434374684478745966971683492067344534177536⟩⟩, + ⟨⟨35564349132905721198441008078727212359008135411717374,35564349132905721198441008078727212359008135411732299⟩,⟨-18423305904799730681868983776494695095376355660679774,-18423305904799730681868983776494695095376355660664839⟩⟩, + ⟨⟨11768838778310729573837674411459064703500493924666519,11768838778310729573837674411459064703500493924670055⟩,⟨-2807710493626884502677097629224046405602107159891634,-2807710493626884502677097629224046405602107159888115⟩⟩, + ⟨⟨3293953431690578476083322097414699673881844610019152,3293953431690578476083322097414699673881844610020747⟩,⟨-285906426382494002123190938592463114325399098349866,-285906426382494002123190938592463114325399098348272⟩⟩, + ⟨⟨806098129245854414845350823135735307695248503845092,806098129245854414845350823135735307695248503845469⟩,⟨-53674522808710512957860924575892164465213743410930,-53674522808710512957860924575892164465213743410553⟩⟩, + ⟨⟨170657955865294086603747130883440621193251956511555,170657955865294086603747130883440621193251956511668⟩,⟨-37924075233874201201761665577304429995811831856612,-37924075233874201201761665577304429995811831856498⟩⟩, + ⟨⟨27457688118591022574788356899984898638842717112469,27457688118591022574788356899984898638842717112493⟩,⟨-19083970122670394054093672358991443212340331599584,-19083970122670394054093672358991443212340331599559⟩⟩, + ⟨⟨1409331006065704111208489490753970524654611503864,1409331006065704111208489490753970524654611503869⟩,⟨-5583454882664493080085919343843054133679018502493,-5583454882664493080085919343843054133679018502488⟩⟩, + ⟨⟨-756591615047422199707232494515194822096114908267,-756591615047422199707232494515194822096114908266⟩,⟨-579974838212522895204155465538868467259273574936,-579974838212522895204155465538868467259273574934⟩⟩, + ⟨⟨-82668493209873173816479693437038146169349564515,-82668493209873173816479693437038146169349564514⟩,⟨157394503584949482673971076941486927592391999086,157394503584949482673971076941486927592391999087⟩⟩, + ⟨⟨47656694366925355871950693012998821154618134098,47656694366925355871950693012998821154618134099⟩,⟨-15656334727154991669471708230374099029351256969,-15656334727154991669471708230374099029351256968⟩⟩, + ⟨⟨-30942606129314604224873061038260099322185672773,-30942606129314604224873061038260099322185672772⟩,⟨-1,1⟩⟩, + ⟨⟨47656694366925355871950693012998821154618134098,47656694366925355871950693012998821154618134099⟩,⟨15656334727154991669471708230374099029351256968,15656334727154991669471708230374099029351256969⟩⟩, + ⟨⟨-82668493209873173816479693437038146169349564515,-82668493209873173816479693437038146169349564514⟩,⟨-157394503584949482673971076941486927592391999087,-157394503584949482673971076941486927592391999086⟩⟩, + ⟨⟨-756591615047422199707232494515194822096114908267,-756591615047422199707232494515194822096114908266⟩,⟨579974838212522895204155465538868467259273574934,579974838212522895204155465538868467259273574936⟩⟩, + ⟨⟨1409331006065704111208489490753970524654611503864,1409331006065704111208489490753970524654611503869⟩,⟨5583454882664493080085919343843054133679018502488,5583454882664493080085919343843054133679018502493⟩⟩, + ⟨⟨27457688118591022574788356899984898638842717112469,27457688118591022574788356899984898638842717112493⟩,⟨19083970122670394054093672358991443212340331599559,19083970122670394054093672358991443212340331599584⟩⟩, + ⟨⟨170657955865294086603747130883440621193251956511555,170657955865294086603747130883440621193251956511668⟩,⟨37924075233874201201761665577304429995811831856498,37924075233874201201761665577304429995811831856612⟩⟩, + ⟨⟨806098129245854414845350823135735307695248503845092,806098129245854414845350823135735307695248503845469⟩,⟨53674522808710512957860924575892164465213743410553,53674522808710512957860924575892164465213743410930⟩⟩, + ⟨⟨3293953431690578476083322097414699673881844610019152,3293953431690578476083322097414699673881844610020747⟩,⟨285906426382494002123190938592463114325399098348272,285906426382494002123190938592463114325399098349866⟩⟩, + ⟨⟨11768838778310729573837674411459064703500493924666519,11768838778310729573837674411459064703500493924670055⟩,⟨2807710493626884502677097629224046405602107159888115,2807710493626884502677097629224046405602107159891634⟩⟩, + ⟨⟨35564349132905721198441008078727212359008135411717374,35564349132905721198441008078727212359008135411732299⟩,⟨18423305904799730681868983776494695095376355660664839,18423305904799730681868983776494695095376355660679774⟩⟩, + ⟨⟨84913021338258585456637346632268699320774504604527954,84913021338258585456637346632268699320774504604567941⟩,⟨86662451874434374684478745966971683492067344534177536,86662451874434374684478745966971683492067344534217310⟩⟩, + ⟨⟨132286959263174945358541491111859988902818761149534631,132286959263174945358541491111859988902818761149655147⟩,⟨313017340739221258513087430787625553445814581426896394,313017340739221258513087430787625553445814581427016532⟩⟩, + ⟨⟨-18944745787479411252203242402631459819395197241827294,-18944745787479411252203242402631459819395197241560775⟩,⟨887910273233043332184419480045186081370656181745774421,887910273233043332184419480045186081370656181746042673⟩⟩, + ⟨⟨-1006941294983695235372914452478039213684046812414001821,-1006941294983695235372914452478039213684046812413403959⟩,⟨1936787351251639905470258859003348366131094228919905456,1936787351251639905470258859003348366131094228920505732⟩⟩, + ⟨⟨-4184124311823513348547682812165694460736401571423601748,-4184124311823513348547682812165694460736401571422147451⟩,⟨2881636862208369933170823081648543084336330716322710900,2881636862208369933170823081648543084336330716324163348⟩⟩] +lemma tw1_0_2_11_calc (j : Fin 31) : taylorWaveBox 1 0 2 11 j = tw1_0_2_11 j := by + revert j + decide +kernel +def tw1_0_2_12 : Fin 31 → CI := ![⟨⟨-351081773136420866847847852730197348787152252033873490,-351081773136420866847847852730197348787152252033551358⟩,⟨911756976602485998943528618839018490170964320821655936,911756976602485998943528618839018490170964320821979132⟩⟩, + ⟨⟨-292841742261539355436176571959751889088075248157392032,-292841742261539355436176571959751889088075248157261514⟩,⟨262667222778434956924168985405946491282988659504581296,262667222778434956924168985405946491282988659504711032⟩⟩, + ⟨⟨-143050083577704750551062625241109254595951916051919946,-143050083577704750551062625241109254595951916051866542⟩,⟨42919624498571172153885124468420226549642756122957646,42919624498571172153885124468420226549642756123010738⟩⟩, + ⟨⟨-52764309520410828692683877969842807884089618790442362,-52764309520410828692683877969842807884089618790420522⟩,⟨-5741897426340832103312874829535463763303834548437799,-5741897426340832103312874829535463763303834548415908⟩⟩, + ⟨⟨-15695170595905610764436177594584843874235451296732752,-15695170595905610764436177594584843874235451296726192⟩,⟨-7754976684886366847387158766408687023225991141280636,-7754976684886366847387158766408687023225991141274064⟩⟩, + ⟨⟨-3892891021943904185954542985497030713305906647131820,-3892891021943904185954542985497030713305906647129404⟩,⟨-3606842455194876252851059338791653708411330278581235,-3606842455194876252851059338791653708411330278578819⟩⟩, + ⟨⟨-843208629966952088146029624299467813002474061510916,-843208629966952088146029624299467813002474061510369⟩,⟨-1194450870826771013557364760742369041704582712754091,-1194450870826771013557364760742369041704582712753540⟩⟩, + ⟨⟨-176346618563716151721350688278981388599320621104178,-176346618563716151721350688278981388599320621103955⟩,⟨-315684736962990500974766246992452619614211754390126,-315684736962990500974766246992452619614211754389903⟩⟩, + ⟨⟨-40861585178833277735660468927182430732269196464573,-40861585178833277735660468927182430732269196464523⟩,⟨-67936425296952164018703514531868390039257033091169,-67936425296952164018703514531868390039257033091119⟩⟩, + ⟨⟨-10495825342922886941436105677601501248662534768340,-10495825342922886941436105677601501248662534768326⟩,⟨-11063156731754847199907925843489218942937422006427,-11063156731754847199907925843489218942937422006413⟩⟩, + ⟨⟨-2421862850373306290141238807037438560713130256786,-2421862850373306290141238807037438560713130256782⟩,⟨-855038647501096211396744636945984281944139399952,-855038647501096211396744636945984281944139399949⟩⟩, + ⟨⟨-341678260042030603074349649838459586956349086258,-341678260042030603074349649838459586956349086257⟩,⟨180306393996724140414346361547894890508019978041,180306393996724140414346361547894890508019978043⟩⟩, + ⟨⟨12264744053873229992884929406072167565107369260,12264744053873229992884929406072167565107369261⟩,⟨54325670104703421784410612571187599459295373229,54325670104703421784410612571187599459295373230⟩⟩, + ⟨⟨7634513745163056769723704076344678919460221172,7634513745163056769723704076344678919460221173⟩,⟨-5002652525148620142712632971342926343941978015,-5002652525148620142712632971342926343941978014⟩⟩, + ⟨⟨-2334009291523798773431900417998099133171909881,-2334009291523798773431900417998099133171909880⟩,⟨108535925642839659144272444888112684755715358,108535925642839659144272444888112684755715359⟩⟩, + ⟨⟨1388700915696818120484949536414943348142538070,1388700915696818120484949536414943348142538071⟩,⟨-1,1⟩⟩, + ⟨⟨-2334009291523798773431900417998099133171909881,-2334009291523798773431900417998099133171909880⟩,⟨-108535925642839659144272444888112684755715359,-108535925642839659144272444888112684755715358⟩⟩, + ⟨⟨7634513745163056769723704076344678919460221172,7634513745163056769723704076344678919460221173⟩,⟨5002652525148620142712632971342926343941978014,5002652525148620142712632971342926343941978015⟩⟩, + ⟨⟨12264744053873229992884929406072167565107369260,12264744053873229992884929406072167565107369261⟩,⟨-54325670104703421784410612571187599459295373230,-54325670104703421784410612571187599459295373229⟩⟩, + ⟨⟨-341678260042030603074349649838459586956349086258,-341678260042030603074349649838459586956349086257⟩,⟨-180306393996724140414346361547894890508019978043,-180306393996724140414346361547894890508019978041⟩⟩, + ⟨⟨-2421862850373306290141238807037438560713130256786,-2421862850373306290141238807037438560713130256782⟩,⟨855038647501096211396744636945984281944139399949,855038647501096211396744636945984281944139399952⟩⟩, + ⟨⟨-10495825342922886941436105677601501248662534768340,-10495825342922886941436105677601501248662534768326⟩,⟨11063156731754847199907925843489218942937422006413,11063156731754847199907925843489218942937422006427⟩⟩, + ⟨⟨-40861585178833277735660468927182430732269196464573,-40861585178833277735660468927182430732269196464523⟩,⟨67936425296952164018703514531868390039257033091119,67936425296952164018703514531868390039257033091169⟩⟩, + ⟨⟨-176346618563716151721350688278981388599320621104178,-176346618563716151721350688278981388599320621103955⟩,⟨315684736962990500974766246992452619614211754389903,315684736962990500974766246992452619614211754390126⟩⟩, + ⟨⟨-843208629966952088146029624299467813002474061510916,-843208629966952088146029624299467813002474061510369⟩,⟨1194450870826771013557364760742369041704582712753540,1194450870826771013557364760742369041704582712754091⟩⟩, + ⟨⟨-3892891021943904185954542985497030713305906647131820,-3892891021943904185954542985497030713305906647129404⟩,⟨3606842455194876252851059338791653708411330278578819,3606842455194876252851059338791653708411330278581235⟩⟩, + ⟨⟨-15695170595905610764436177594584843874235451296732752,-15695170595905610764436177594584843874235451296726192⟩,⟨7754976684886366847387158766408687023225991141274064,7754976684886366847387158766408687023225991141280636⟩⟩, + ⟨⟨-52764309520410828692683877969842807884089618790442362,-52764309520410828692683877969842807884089618790420522⟩,⟨5741897426340832103312874829535463763303834548415908,5741897426340832103312874829535463763303834548437799⟩⟩, + ⟨⟨-143050083577704750551062625241109254595951916051919946,-143050083577704750551062625241109254595951916051866542⟩,⟨-42919624498571172153885124468420226549642756123010738,-42919624498571172153885124468420226549642756122957646⟩⟩, + ⟨⟨-292841742261539355436176571959751889088075248157392032,-292841742261539355436176571959751889088075248157261514⟩,⟨-262667222778434956924168985405946491282988659504711033,-262667222778434956924168985405946491282988659504581296⟩⟩, + ⟨⟨-351081773136420866847847852730197348787152252033873490,-351081773136420866847847852730197348787152252033551358⟩,⟨-911756976602485998943528618839018490170964320821979132,-911756976602485998943528618839018490170964320821655936⟩⟩] +lemma tw1_0_2_12_calc (j : Fin 31) : taylorWaveBox 1 0 2 12 j = tw1_0_2_12 j := by + revert j + decide +kernel +def tw1_0_2_13 : Fin 31 → CI := ![⟨⟨173837691121351610446959249803290475183275883709067736,173837691121351610446959249803290475183275883709136784⟩,⟨23083741922321754120632902603658124949281063565343848,23083741922321754120632902603658124949281063565412632⟩⟩, + ⟨⟨55054333044539791983438376359369070245754490517063231,55054333044539791983438376359369070245754490517088856⟩,⟨36700578605317017142145090317965435528150670336085208,36700578605317017142145090317965435528150670336110980⟩⟩, + ⟨⟨12484170486078931912893926160539668257650213652585196,12484170486078931912893926160539668257650213652594878⟩,⟨19840209905000903240461209440193811243142134309894246,19840209905000903240461209440193811243142134309903967⟩⟩, + ⟨⟨1408466105602653097657046891354073624053531744345826,1408466105602653097657046891354073624053531744349489⟩,⟨7607803466343919807829710963100844772089116469355317,7607803466343919807829710963100844772089116469358975⟩⟩, + ⟨⟨-335127992943045757399648127916621430002895404205996,-335127992943045757399648127916621430002895404204978⟩,⟨2333677329872179800851889239950398047714134919764493,2333677329872179800851889239950398047714134919765512⟩⟩, + ⟨⟨-256610138482249211174767791263243375236207710064792,-256610138482249211174767791263243375236207710064410⟩,⟨604041501826932985469488192970371695031272885346108,604041501826932985469488192970371695031272885346490⟩⟩, + ⟨⟨-89762362197474615819948444956591153098683436936811,-89762362197474615819948444956591153098683436936732⟩,⟨138333642323100567372276099663219261018092253229640,138333642323100567372276099663219261018092253229719⟩⟩, + ⟨⟨-21998479759378659587312835921173713809570151578072,-21998479759378659587312835921173713809570151578042⟩,⟨29638459972953566347639836444695390437172458410939,29638459972953566347639836444695390437172458410969⟩⟩, + ⟨⟨-3821727338687831893563559948103422096098587892669,-3821727338687831893563559948103422096098587892662⟩,⟨6173837256776287272206939486104818968206852448005,6173837256776287272206939486104818968206852448012⟩⟩, + ⟨⟨-332705938657347253527693248601075853128533094853,-332705938657347253527693248601075853128533094850⟩,⟨1196159265312982463515377625719621054465793745466,1196159265312982463515377625719621054465793745469⟩⟩, + ⟨⟨51702621747486492796166312832605406015157774852,51702621747486492796166312832605406015157774854⟩,⟨176714044349493875772696854268686783141292579172,176714044349493875772696854268686783141292579173⟩⟩, + ⟨⟨22704026122234415775023792762927694500824684310,22704026122234415775023792762927694500824684311⟩,⟨8349771750245163251261279445812179369574182601,8349771750245163251261279445812179369574182602⟩⟩, + ⟨⟨1382579225787891523782219098236686290244044544,1382579225787891523782219098236686290244044545⟩,⟨-2703708679339354965366231164249314950697677389,-2703708679339354965366231164249314950697677388⟩⟩, + ⟨⟨-436210774469863243290994646615683427654533707,-436210774469863243290994646615683427654533706⟩,⟨31887416763779571201681444777911501359079973,31887416763779571201681444777911501359079974⟩⟩, + ⟨⟨99029625421597987444402776794895858743402190,99029625421597987444402776794895858743402191⟩,⟨22611089050818803817914908245706542319391554,22611089050818803817914908245706542319391555⟩⟩, + ⟨⟨-58169767930487234574902012483415388641412756,-58169767930487234574902012483415388641412755⟩,⟨-1,1⟩⟩, + ⟨⟨99029625421597987444402776794895858743402190,99029625421597987444402776794895858743402191⟩,⟨-22611089050818803817914908245706542319391555,-22611089050818803817914908245706542319391554⟩⟩, + ⟨⟨-436210774469863243290994646615683427654533707,-436210774469863243290994646615683427654533706⟩,⟨-31887416763779571201681444777911501359079974,-31887416763779571201681444777911501359079973⟩⟩, + ⟨⟨1382579225787891523782219098236686290244044544,1382579225787891523782219098236686290244044545⟩,⟨2703708679339354965366231164249314950697677388,2703708679339354965366231164249314950697677389⟩⟩, + ⟨⟨22704026122234415775023792762927694500824684310,22704026122234415775023792762927694500824684311⟩,⟨-8349771750245163251261279445812179369574182602,-8349771750245163251261279445812179369574182601⟩⟩, + ⟨⟨51702621747486492796166312832605406015157774852,51702621747486492796166312832605406015157774854⟩,⟨-176714044349493875772696854268686783141292579173,-176714044349493875772696854268686783141292579172⟩⟩, + ⟨⟨-332705938657347253527693248601075853128533094853,-332705938657347253527693248601075853128533094850⟩,⟨-1196159265312982463515377625719621054465793745469,-1196159265312982463515377625719621054465793745466⟩⟩, + ⟨⟨-3821727338687831893563559948103422096098587892669,-3821727338687831893563559948103422096098587892662⟩,⟨-6173837256776287272206939486104818968206852448012,-6173837256776287272206939486104818968206852448005⟩⟩, + ⟨⟨-21998479759378659587312835921173713809570151578072,-21998479759378659587312835921173713809570151578042⟩,⟨-29638459972953566347639836444695390437172458410969,-29638459972953566347639836444695390437172458410939⟩⟩, + ⟨⟨-89762362197474615819948444956591153098683436936811,-89762362197474615819948444956591153098683436936732⟩,⟨-138333642323100567372276099663219261018092253229719,-138333642323100567372276099663219261018092253229640⟩⟩, + ⟨⟨-256610138482249211174767791263243375236207710064792,-256610138482249211174767791263243375236207710064410⟩,⟨-604041501826932985469488192970371695031272885346490,-604041501826932985469488192970371695031272885346108⟩⟩, + ⟨⟨-335127992943045757399648127916621430002895404205996,-335127992943045757399648127916621430002895404204978⟩,⟨-2333677329872179800851889239950398047714134919765512,-2333677329872179800851889239950398047714134919764493⟩⟩, + ⟨⟨1408466105602653097657046891354073624053531744345826,1408466105602653097657046891354073624053531744349489⟩,⟨-7607803466343919807829710963100844772089116469358975,-7607803466343919807829710963100844772089116469355317⟩⟩, + ⟨⟨12484170486078931912893926160539668257650213652585196,12484170486078931912893926160539668257650213652594878⟩,⟨-19840209905000903240461209440193811243142134309903967,-19840209905000903240461209440193811243142134309894246⟩⟩, + ⟨⟨55054333044539791983438376359369070245754490517063231,55054333044539791983438376359369070245754490517088856⟩,⟨-36700578605317017142145090317965435528150670336110980,-36700578605317017142145090317965435528150670336085208⟩⟩, + ⟨⟨173837691121351610446959249803290475183275883709067736,173837691121351610446959249803290475183275883709136784⟩,⟨-23083741922321754120632902603658124949281063565412632,-23083741922321754120632902603658124949281063565343848⟩⟩] +lemma tw1_0_2_13_calc (j : Fin 31) : taylorWaveBox 1 0 2 13 j = tw1_0_2_13 j := by + revert j + decide +kernel +def tw1_0_2_14 : Fin 31 → CI := ![⟨⟨-3049521727187250447808176104950881752529603597690224,-3049521727187250447808176104950881752529603597676757⟩,⟨-29350622120498788888938180237292144250689881262013022,-29350622120498788888938180237292144250689881261999511⟩⟩, + ⟨⟨3442798319922841362088476222931764060957760302759722,3442798319922841362088476222931764060957760302764411⟩,⟨-9848922918883400452021568478269755642481017112319944,-9848922918883400452021568478269755642481017112315275⟩⟩, + ⟨⟨2323248291858238221441307213822083910414125041467164,2323248291858238221441307213822083910414125041468805⟩,⟨-2549478490859702125134350191798977973962027786147444,-2549478490859702125134350191798977973962027786145805⟩⟩, + ⟨⟨940548810365148583963445765738975774007607959298325,940548810365148583963445765738975774007607959298898⟩,⟨-483125525589076149151904797533346889944816899647580,-483125525589076149151904797533346889944816899647007⟩⟩, + ⟨⟨293181622970285150202524427484631809043268651406927,293181622970285150202524427484631809043268651407090⟩,⟨-51430822056555325382959580231164015407124769981881,-51430822056555325382959580231164015407124769981718⟩⟩, + ⟨⟨75967762983476945848779912470216816205739190228721,75967762983476945848779912470216816205739190228777⟩,⟨4271169508176104707865861208905437323802633595194,4271169508176104707865861208905437323802633595251⟩⟩, + ⟨⟨17105833297685994079172804616914847308060707359431,17105833297685994079172804616914847308060707359442⟩,⟨3380049870682002684189796414053801139779014131742,3380049870682002684189796414053801139779014131754⟩⟩, + ⟨⟨3450321838770543271631946078052030848862978085576,3450321838770543271631946078052030848862978085581⟩,⟨755829909738111936270963568049534641224807257628,755829909738111936270963568049534641224807257633⟩⟩, + ⟨⟨621501702447615602812897129046925188475917991185,621501702447615602812897129046925188475917991187⟩,⟨49374025505084389806377114673207395614072735846,49374025505084389806377114673207395614072735847⟩⟩, + ⟨⟨91353772500950025358438979016129140836584915272,91353772500950025358438979016129140836584915273⟩,⟨-25197511740974156888614058267156797248647318746,-25197511740974156888614058267156797248647318744⟩⟩, + ⟨⟨7607898755628148497028173517097450325494105635,7607898755628148497028173517097450325494105636⟩,⟨-9759484860827834586576907201825066171443466325,-9759484860827834586576907201825066171443466324⟩⟩, + ⟨⟨-527257498827060649053508399310008025506634027,-527257498827060649053508399310008025506634026⟩,⟨-1318544793101000234740128487801585583855434352,-1318544793101000234740128487801585583855434351⟩⟩, + ⟨⟨-142772418864050045651888614106764580491087844,-142772418864050045651888614106764580491087843⟩,⟨60929592193856994109136189866194571614274646,60929592193856994109136189866194571614274647⟩⟩, + ⟨⟨17825632571744941811488361483907021239840224,17825632571744941811488361483907021239840225⟩,⟨8264426880878846138945834070521489225876649,8264426880878846138945834070521489225876650⟩⟩, + ⟨⟨-3642235576778998614363848001477501001084251,-3642235576778998614363848001477501001084250⟩,⟨-1968181028536188690549593323166865347537535,-1968181028536188690549593323166865347537534⟩⟩, + ⟨⟨2284321444893023083239277798129415271625129,2284321444893023083239277798129415271625130⟩,⟨-1,1⟩⟩, + ⟨⟨-3642235576778998614363848001477501001084251,-3642235576778998614363848001477501001084250⟩,⟨1968181028536188690549593323166865347537534,1968181028536188690549593323166865347537535⟩⟩, + ⟨⟨17825632571744941811488361483907021239840224,17825632571744941811488361483907021239840225⟩,⟨-8264426880878846138945834070521489225876650,-8264426880878846138945834070521489225876649⟩⟩, + ⟨⟨-142772418864050045651888614106764580491087844,-142772418864050045651888614106764580491087843⟩,⟨-60929592193856994109136189866194571614274647,-60929592193856994109136189866194571614274646⟩⟩, + ⟨⟨-527257498827060649053508399310008025506634027,-527257498827060649053508399310008025506634026⟩,⟨1318544793101000234740128487801585583855434351,1318544793101000234740128487801585583855434352⟩⟩, + ⟨⟨7607898755628148497028173517097450325494105635,7607898755628148497028173517097450325494105636⟩,⟨9759484860827834586576907201825066171443466324,9759484860827834586576907201825066171443466325⟩⟩, + ⟨⟨91353772500950025358438979016129140836584915272,91353772500950025358438979016129140836584915273⟩,⟨25197511740974156888614058267156797248647318744,25197511740974156888614058267156797248647318746⟩⟩, + ⟨⟨621501702447615602812897129046925188475917991185,621501702447615602812897129046925188475917991187⟩,⟨-49374025505084389806377114673207395614072735847,-49374025505084389806377114673207395614072735846⟩⟩, + ⟨⟨3450321838770543271631946078052030848862978085576,3450321838770543271631946078052030848862978085581⟩,⟨-755829909738111936270963568049534641224807257633,-755829909738111936270963568049534641224807257628⟩⟩, + ⟨⟨17105833297685994079172804616914847308060707359431,17105833297685994079172804616914847308060707359442⟩,⟨-3380049870682002684189796414053801139779014131754,-3380049870682002684189796414053801139779014131742⟩⟩, + ⟨⟨75967762983476945848779912470216816205739190228721,75967762983476945848779912470216816205739190228777⟩,⟨-4271169508176104707865861208905437323802633595251,-4271169508176104707865861208905437323802633595194⟩⟩, + ⟨⟨293181622970285150202524427484631809043268651406927,293181622970285150202524427484631809043268651407090⟩,⟨51430822056555325382959580231164015407124769981718,51430822056555325382959580231164015407124769981881⟩⟩, + ⟨⟨940548810365148583963445765738975774007607959298325,940548810365148583963445765738975774007607959298898⟩,⟨483125525589076149151904797533346889944816899647007,483125525589076149151904797533346889944816899647580⟩⟩, + ⟨⟨2323248291858238221441307213822083910414125041467164,2323248291858238221441307213822083910414125041468805⟩,⟨2549478490859702125134350191798977973962027786145805,2549478490859702125134350191798977973962027786147444⟩⟩, + ⟨⟨3442798319922841362088476222931764060957760302759722,3442798319922841362088476222931764060957760302764411⟩,⟨9848922918883400452021568478269755642481017112315275,9848922918883400452021568478269755642481017112319944⟩⟩, + ⟨⟨-3049521727187250447808176104950881752529603597690224,-3049521727187250447808176104950881752529603597676757⟩,⟨29350622120498788888938180237292144250689881261999511,29350622120498788888938180237292144250689881262013022⟩⟩] +lemma tw1_0_2_14_calc (j : Fin 31) : taylorWaveBox 1 0 2 14 j = tw1_0_2_14 j := by + revert j + decide +kernel +def tw1_0_2_15 : Fin 31 → CI := ![⟨⟨-4407275177393457483454199845444123677405229874495490,-4407275177393457483454199845444123677405229874493038⟩,⟨1554421704646357916617643512121614063937955951061624,1554421704646357916617643512121614063937955951064070⟩⟩, + ⟨⟨-1542860738898975318881569186661833820885104355551524,-1542860738898975318881569186661833820885104355550730⟩,⟨-130828381501313377138260893854917399459436976607404,-130828381501313377138260893854917399459436976606608⟩⟩, + ⟨⟨-426136656287618257205863631417764997848419479220662,-426136656287618257205863631417764997848419479220401⟩,⟨-215846975587049943560038354395209694721570985290529,-215846975587049943560038354395209694721570985290269⟩⟩, + ⟨⟨-94283528307767859050329919228599674229487425296807,-94283528307767859050329919228599674229487425296715⟩,⟨-98019064800002571716238086574674235336665222036845,-98019064800002571716238086574674235336665222036753⟩⟩, + ⟨⟨-16644208034503492433050819613530501519186846107018,-16644208034503492433050819613530501519186846106993⟩,⟨-31209021790631814516848860730823015949347619022004,-31209021790631814516848860730823015949347619021979⟩⟩, + ⟨⟨-2369256243344845406383966513911113340593034532021,-2369256243344845406383966513911113340593034532012⟩,⟨-7957200817262287828032146360627846771670150561011,-7957200817262287828032146360627846771670150561002⟩⟩, + ⟨⟨-319914242532796588105244961408530909679945374498,-319914242532796588105244961408530909679945374496⟩,⟨-1705501651721843230409523901536803397913139701756,-1705501651721843230409523901536803397913139701754⟩⟩, + ⟨⟨-65444912202462630599480601678546935292860349934,-65444912202462630599480601678546935292860349933⟩,⟨-311321179150600675254292566563405048015723245607,-311321179150600675254292566563405048015723245606⟩⟩, + ⟨⟨-19422310871687013961266201703645514039394475793,-19422310871687013961266201703645514039394475791⟩,⟨-46490010951367951297862561667524663840621389343,-46490010951367951297862561667524663840621389342⟩⟩, + ⟨⟨-4928590629690307762828611374870333041362335720,-4928590629690307762828611374870333041362335719⟩,⟨-4696081370631091942712179306902169421924622403,-4696081370631091942712179306902169421924622402⟩⟩, + ⟨⟨-782172998469798724026355618399722779874660862,-782172998469798724026355618399722779874660861⟩,⟨-29828172581472202207156791968303613702730290,-29828172581472202207156791968303613702730289⟩⟩, + ⟨⟨-34660721294855892073751673689985349208610160,-34660721294855892073751673689985349208610159⟩,⟨70385958911854658373615700890241573432348698,70385958911854658373615700890241573432348699⟩⟩, + ⟨⟨7153483312830357546659438958110121081280454,7153483312830357546659438958110121081280455⟩,⟨2145427756584437857061581981712398074536527,2145427756584437857061581981712398074536528⟩⟩, + ⟨⟨-489138004080220415407145412032487501102199,-489138004080220415407145412032487501102198⟩,⟨-671471302798451165360997433040155644624487,-671471302798451165360997433040155644624486⟩⟩, + ⟨⟨114410100817529848777792667914884419682647,114410100817529848777792667914884419682648⟩,⟨110137331853970661172703206700025649046052,110137331853970661172703206700025649046053⟩⟩, + ⟨⟨-84428323173100506258082863779588894664374,-84428323173100506258082863779588894664373⟩,⟨-1,1⟩⟩, + ⟨⟨114410100817529848777792667914884419682647,114410100817529848777792667914884419682648⟩,⟨-110137331853970661172703206700025649046053,-110137331853970661172703206700025649046052⟩⟩, + ⟨⟨-489138004080220415407145412032487501102199,-489138004080220415407145412032487501102198⟩,⟨671471302798451165360997433040155644624486,671471302798451165360997433040155644624487⟩⟩, + ⟨⟨7153483312830357546659438958110121081280454,7153483312830357546659438958110121081280455⟩,⟨-2145427756584437857061581981712398074536528,-2145427756584437857061581981712398074536527⟩⟩, + ⟨⟨-34660721294855892073751673689985349208610160,-34660721294855892073751673689985349208610159⟩,⟨-70385958911854658373615700890241573432348699,-70385958911854658373615700890241573432348698⟩⟩, + ⟨⟨-782172998469798724026355618399722779874660862,-782172998469798724026355618399722779874660861⟩,⟨29828172581472202207156791968303613702730289,29828172581472202207156791968303613702730290⟩⟩, + ⟨⟨-4928590629690307762828611374870333041362335720,-4928590629690307762828611374870333041362335719⟩,⟨4696081370631091942712179306902169421924622402,4696081370631091942712179306902169421924622403⟩⟩, + ⟨⟨-19422310871687013961266201703645514039394475793,-19422310871687013961266201703645514039394475791⟩,⟨46490010951367951297862561667524663840621389342,46490010951367951297862561667524663840621389343⟩⟩, + ⟨⟨-65444912202462630599480601678546935292860349934,-65444912202462630599480601678546935292860349933⟩,⟨311321179150600675254292566563405048015723245606,311321179150600675254292566563405048015723245607⟩⟩, + ⟨⟨-319914242532796588105244961408530909679945374498,-319914242532796588105244961408530909679945374496⟩,⟨1705501651721843230409523901536803397913139701754,1705501651721843230409523901536803397913139701756⟩⟩, + ⟨⟨-2369256243344845406383966513911113340593034532021,-2369256243344845406383966513911113340593034532012⟩,⟨7957200817262287828032146360627846771670150561002,7957200817262287828032146360627846771670150561011⟩⟩, + ⟨⟨-16644208034503492433050819613530501519186846107018,-16644208034503492433050819613530501519186846106993⟩,⟨31209021790631814516848860730823015949347619021979,31209021790631814516848860730823015949347619022004⟩⟩, + ⟨⟨-94283528307767859050329919228599674229487425296807,-94283528307767859050329919228599674229487425296715⟩,⟨98019064800002571716238086574674235336665222036753,98019064800002571716238086574674235336665222036845⟩⟩, + ⟨⟨-426136656287618257205863631417764997848419479220662,-426136656287618257205863631417764997848419479220401⟩,⟨215846975587049943560038354395209694721570985290269,215846975587049943560038354395209694721570985290529⟩⟩, + ⟨⟨-1542860738898975318881569186661833820885104355551524,-1542860738898975318881569186661833820885104355550730⟩,⟨130828381501313377138260893854917399459436976606608,130828381501313377138260893854917399459436976607404⟩⟩, + ⟨⟨-4407275177393457483454199845444123677405229874495490,-4407275177393457483454199845444123677405229874493038⟩,⟨-1554421704646357916617643512121614063937955951064070,-1554421704646357916617643512121614063937955951061624⟩⟩] +lemma tw1_0_2_15_calc (j : Fin 31) : taylorWaveBox 1 0 2 15 j = tw1_0_2_15 j := by + revert j + decide +kernel +def tw1_0_2_16 : Fin 31 → CI := ![⟨⟨379924398361714200090944975426876040546867289700097,379924398361714200090944975426876040546867289700513⟩,⟨586752637303358040866511206164986986523373124280751,586752637303358040866511206164986986523373124281168⟩⟩, + ⟨⟨36096330602888095265167428835902610819836436198142,36096330602888095265167428835902610819836436198270⟩,⟨214006770418703771960057654853991730589628522405435,214006770418703771960057654853991730589628522405563⟩⟩, + ⟨⟨-12332871934269966429023790420153615496440377470355,-12332871934269966429023790420153615496440377470314⟩,⟨61249669866464102957264423044691294905801679645182,61249669866464102957264423044691294905801679645224⟩⟩, + ⟨⟨-8113920071169160387014768892057603854509897106715,-8113920071169160387014768892057603854509897106701⟩,⟨14391897483423622552580461611051285224513536518168,14391897483423622552580461611051285224513536518182⟩⟩, + ⟨⟨-2747730899213705336169580967718001636732072559510,-2747730899213705336169580967718001636732072559505⟩,⟨2864655121745684810062787302259683766781739098780,2864655121745684810062787302259683766781739098784⟩⟩, + ⟨⟨-688849319369348513902535976523642850104192911643,-688849319369348513902535976523642850104192911642⟩,⟨507488275172774154257187729337083071279222076997,507488275172774154257187729337083071279222076999⟩⟩, + ⟨⟨-137665982391296943963813921190303709120167460768,-137665982391296943963813921190303709120167460767⟩,⟨87451022722600485103515285485458001091013323968,87451022722600485103515285485458001091013323969⟩⟩, + ⟨⟨-21864784306195073120758943424053015916323330746,-21864784306195073120758943424053015916323330744⟩,⟨15943733421900818772178018188331843388413880579,15943733421900818772178018188331843388413880580⟩⟩, + ⟨⟨-2477492522068090692691972698510640381388281304,-2477492522068090692691972698510640381388281303⟩,⟨2941075804889072220955407862318808555303815575,2941075804889072220955407862318808555303815576⟩⟩, + ⟨⟨-101166671588196057098683884520356041956113427,-101166671588196057098683884520356041956113426⟩,⟨450657943621616282179802324234605298295805933,450657943621616282179802324234605298295805934⟩⟩, + ⟨⟨25856877671989707068314590998472225924328143,25856877671989707068314590998472225924328144⟩,⟨38962016708062231314668829409798101404529913,38962016708062231314668829409798101404529914⟩⟩, + ⟨⟨3939813482501159884723954914724009570476205,3939813482501159884723954914724009570476206⟩,⟨-1112614109900956697614373344460465551914172,-1112614109900956697614373344460465551914171⟩⟩, + ⟨⟨-187295709897266041311574097587313788897833,-187295709897266041311574097587313788897832⟩,⟨-282975951091083234719435784915803636138505,-282975951091083234719435784915803636138504⟩⟩, + ⟨⟨4052598372901289047975030032976745342966,4052598372901289047975030032976745342967⟩,⟨32924401986125690903127471271673811795360,32924401986125690903127471271673811795361⟩⟩, + ⟨⟨-2925744207934982659881412267857020813265,-2925744207934982659881412267857020813264⟩,⟨-4953869783096032828189940752778472629989,-4953869783096032828189940752778472629988⟩⟩, + ⟨⟨2947104442616860575924524820866319015421,2947104442616860575924524820866319015422⟩,⟨-1,1⟩⟩, + ⟨⟨-2925744207934982659881412267857020813265,-2925744207934982659881412267857020813264⟩,⟨4953869783096032828189940752778472629988,4953869783096032828189940752778472629989⟩⟩, + ⟨⟨4052598372901289047975030032976745342966,4052598372901289047975030032976745342967⟩,⟨-32924401986125690903127471271673811795361,-32924401986125690903127471271673811795360⟩⟩, + ⟨⟨-187295709897266041311574097587313788897833,-187295709897266041311574097587313788897832⟩,⟨282975951091083234719435784915803636138504,282975951091083234719435784915803636138505⟩⟩, + ⟨⟨3939813482501159884723954914724009570476205,3939813482501159884723954914724009570476206⟩,⟨1112614109900956697614373344460465551914171,1112614109900956697614373344460465551914172⟩⟩, + ⟨⟨25856877671989707068314590998472225924328143,25856877671989707068314590998472225924328144⟩,⟨-38962016708062231314668829409798101404529914,-38962016708062231314668829409798101404529913⟩⟩, + ⟨⟨-101166671588196057098683884520356041956113427,-101166671588196057098683884520356041956113426⟩,⟨-450657943621616282179802324234605298295805934,-450657943621616282179802324234605298295805933⟩⟩, + ⟨⟨-2477492522068090692691972698510640381388281304,-2477492522068090692691972698510640381388281303⟩,⟨-2941075804889072220955407862318808555303815576,-2941075804889072220955407862318808555303815575⟩⟩, + ⟨⟨-21864784306195073120758943424053015916323330746,-21864784306195073120758943424053015916323330744⟩,⟨-15943733421900818772178018188331843388413880580,-15943733421900818772178018188331843388413880579⟩⟩, + ⟨⟨-137665982391296943963813921190303709120167460768,-137665982391296943963813921190303709120167460767⟩,⟨-87451022722600485103515285485458001091013323969,-87451022722600485103515285485458001091013323968⟩⟩, + ⟨⟨-688849319369348513902535976523642850104192911643,-688849319369348513902535976523642850104192911642⟩,⟨-507488275172774154257187729337083071279222076999,-507488275172774154257187729337083071279222076997⟩⟩, + ⟨⟨-2747730899213705336169580967718001636732072559510,-2747730899213705336169580967718001636732072559505⟩,⟨-2864655121745684810062787302259683766781739098784,-2864655121745684810062787302259683766781739098780⟩⟩, + ⟨⟨-8113920071169160387014768892057603854509897106715,-8113920071169160387014768892057603854509897106701⟩,⟨-14391897483423622552580461611051285224513536518182,-14391897483423622552580461611051285224513536518168⟩⟩, + ⟨⟨-12332871934269966429023790420153615496440377470355,-12332871934269966429023790420153615496440377470314⟩,⟨-61249669866464102957264423044691294905801679645224,-61249669866464102957264423044691294905801679645182⟩⟩, + ⟨⟨36096330602888095265167428835902610819836436198142,36096330602888095265167428835902610819836436198270⟩,⟨-214006770418703771960057654853991730589628522405563,-214006770418703771960057654853991730589628522405435⟩⟩, + ⟨⟨379924398361714200090944975426876040546867289700097,379924398361714200090944975426876040546867289700513⟩,⟨-586752637303358040866511206164986986523373124281168,-586752637303358040866511206164986986523373124280751⟩⟩] +lemma tw1_0_2_16_calc (j : Fin 31) : taylorWaveBox 1 0 2 16 j = tw1_0_2_16 j := by + revert j + decide +kernel +def tw1_0_2_17 : Fin 31 → CI := ![⟨⟨68284277504895704975483287462338238411042925854684,68284277504895704975483287462338238411042925854752⟩,⟨-71753015998731722401023483321849073755366014731860,-71753015998731722401023483321849073755366014731792⟩⟩, + ⟨⟨26328273354869554031336757104539137404107927265504,26328273354869554031336757104539137404107927265524⟩,⟨-11719178627389770506643728556474136885635786866146,-11719178627389770506643728556474136885635786866125⟩⟩, + ⟨⟨7722108663899436920584274791141649940897387301280,7722108663899436920584274791141649940897387301288⟩,⟨-552731778162163801220604627362536894140394085847,-552731778162163801220604627362536894140394085839⟩⟩, + ⟨⟨1854760312679334305208088100505821128247175716551,1854760312679334305208088100505821128247175716554⟩,⟨418476767223069504237380157074426024978287643584,418476767223069504237380157074426024978287643587⟩⟩, + ⟨⟨380325961070853893173208966064194578498469652188,380325961070853893173208966064194578498469652189⟩,⟨182913091020951346704924931253015528271186073235,182913091020951346704924931253015528271186073237⟩⟩, + ⟨⟨69397417049231859121020854492759908433430854005,69397417049231859121020854492759908433430854006⟩,⟨46494977889397870422760242770035404792013615248,46494977889397870422760242770035404792013615249⟩⟩, + ⟨⟨11782412265950628665931111282055922441728149310,11782412265950628665931111282055922441728149311⟩,⟨8489374808316473965716469705776284132904187721,8489374808316473965716469705776284132904187722⟩⟩, + ⟨⟨1894721084817267799714440535192493287168821338,1894721084817267799714440535192493287168821339⟩,⟨1079539734353237323330080528044885960818529420,1079539734353237323330080528044885960818529421⟩⟩, + ⟨⟨271045073976553586185992882810831456220520389,271045073976553586185992882810831456220520390⟩,⟨62047141620832240795215589801723669147222258,62047141620832240795215589801723669147222259⟩⟩, + ⟨⟨28183831023040661896630172223551557765814705,28183831023040661896630172223551557765814706⟩,⟨-9327118223307434489262587858803352729493707,-9327118223307434489262587858803352729493706⟩⟩, + ⟨⟨934443071095676256231241516748205519064015,934443071095676256231241516748205519064016⟩,⟨-2476049451310502938523725532378498560196470,-2476049451310502938523725532378498560196469⟩⟩, + ⟨⟨-171168894710770635993957866382344958178635,-171168894710770635993957866382344958178634⟩,⟨-107970138135543744473327375747318931538566,-107970138135543744473327375747318931538565⟩⟩, + ⟨⟨-1604447171717266477662682217637244267673,-1604447171717266477662682217637244267672⟩,⟨14519307273425738556051198489766575000176,14519307273425738556051198489766575000177⟩⟩, + ⟨⟨470866406468934022181613219576583486198,470866406468934022181613219576583486199⟩,⟨-1163243977792199074571184169243604636344,-1163243977792199074571184169243604636343⟩⟩, + ⟨⟨51246627246602890904722000203678875328,51246627246602890904722000203678875329⟩,⟨190697204130483284213143606756238784557,190697204130483284213143606756238784558⟩⟩, + ⟨⟨-97458964908283911079457659183464812560,-97458964908283911079457659183464812559⟩,⟨-1,1⟩⟩, + ⟨⟨51246627246602890904722000203678875328,51246627246602890904722000203678875329⟩,⟨-190697204130483284213143606756238784558,-190697204130483284213143606756238784557⟩⟩, + ⟨⟨470866406468934022181613219576583486198,470866406468934022181613219576583486199⟩,⟨1163243977792199074571184169243604636343,1163243977792199074571184169243604636344⟩⟩, + ⟨⟨-1604447171717266477662682217637244267673,-1604447171717266477662682217637244267672⟩,⟨-14519307273425738556051198489766575000177,-14519307273425738556051198489766575000176⟩⟩, + ⟨⟨-171168894710770635993957866382344958178635,-171168894710770635993957866382344958178634⟩,⟨107970138135543744473327375747318931538565,107970138135543744473327375747318931538566⟩⟩, + ⟨⟨934443071095676256231241516748205519064015,934443071095676256231241516748205519064016⟩,⟨2476049451310502938523725532378498560196469,2476049451310502938523725532378498560196470⟩⟩, + ⟨⟨28183831023040661896630172223551557765814705,28183831023040661896630172223551557765814706⟩,⟨9327118223307434489262587858803352729493706,9327118223307434489262587858803352729493707⟩⟩, + ⟨⟨271045073976553586185992882810831456220520389,271045073976553586185992882810831456220520390⟩,⟨-62047141620832240795215589801723669147222259,-62047141620832240795215589801723669147222258⟩⟩, + ⟨⟨1894721084817267799714440535192493287168821338,1894721084817267799714440535192493287168821339⟩,⟨-1079539734353237323330080528044885960818529421,-1079539734353237323330080528044885960818529420⟩⟩, + ⟨⟨11782412265950628665931111282055922441728149310,11782412265950628665931111282055922441728149311⟩,⟨-8489374808316473965716469705776284132904187722,-8489374808316473965716469705776284132904187721⟩⟩, + ⟨⟨69397417049231859121020854492759908433430854005,69397417049231859121020854492759908433430854006⟩,⟨-46494977889397870422760242770035404792013615249,-46494977889397870422760242770035404792013615248⟩⟩, + ⟨⟨380325961070853893173208966064194578498469652188,380325961070853893173208966064194578498469652189⟩,⟨-182913091020951346704924931253015528271186073237,-182913091020951346704924931253015528271186073235⟩⟩, + ⟨⟨1854760312679334305208088100505821128247175716551,1854760312679334305208088100505821128247175716554⟩,⟨-418476767223069504237380157074426024978287643587,-418476767223069504237380157074426024978287643584⟩⟩, + ⟨⟨7722108663899436920584274791141649940897387301280,7722108663899436920584274791141649940897387301288⟩,⟨552731778162163801220604627362536894140394085839,552731778162163801220604627362536894140394085847⟩⟩, + ⟨⟨26328273354869554031336757104539137404107927265504,26328273354869554031336757104539137404107927265524⟩,⟨11719178627389770506643728556474136885635786866125,11719178627389770506643728556474136885635786866146⟩⟩, + ⟨⟨68284277504895704975483287462338238411042925854684,68284277504895704975483287462338238411042925854752⟩,⟨71753015998731722401023483321849073755366014731792,71753015998731722401023483321849073755366014731860⟩⟩] +lemma tw1_0_2_17_calc (j : Fin 31) : taylorWaveBox 1 0 2 17 j = tw1_0_2_17 j := by + revert j + decide +kernel +def tw1_0_2_18 : Fin 31 → CI := ![⟨⟨-11537661676255941238164478564369440645306199504831,-11537661676255941238164478564369440645306199504819⟩,⟨-6684203544199198676112557142327876949251616314208,-6684203544199198676112557142327876949251616314197⟩⟩, + ⟨⟨-2258894870274729455125484589352378454723913072178,-2258894870274729455125484589352378454723913072174⟩,⟨-2848436540033827980182717253400526031294539013402,-2848436540033827980182717253400526031294539013398⟩⟩, + ⟨⟨-305302629647947877197497607897598720553552071179,-305302629647947877197497607897598720553552071177⟩,⟨-858680858045066070283427720055215596521368229899,-858680858045066070283427720055215596521368229897⟩⟩, + ⟨⟨-14446229137966340416184594743489150180760808290,-14446229137966340416184594743489150180760808289⟩,⟨-207376881125503494329147739230797973217606529472,-207376881125503494329147739230797973217606529471⟩⟩, + ⟨⟨5610103805539502626525864299696942388955970844,5610103805539502626525864299696942388955970845⟩,⟨-42255055613208205681582068763509385471296048373,-42255055613208205681582068763509385471296048372⟩⟩, + ⟨⟨1877268093260045133484233718309472559029576734,1877268093260045133484233718309472559029576735⟩,⟨-7516749909105240955915689795003143240306653363,-7516749909105240955915689795003143240306653362⟩⟩, + ⟨⟨296598540121664702608446126417237060092222631,296598540121664702608446126417237060092222632⟩,⟨-1192090070720692041824242009778956279807805171,-1192090070720692041824242009778956279807805170⟩⟩, + ⟨⟨15841672675639597654246179798969842429057295,15841672675639597654246179798969842429057296⟩,⟨-166191226335104340992995553399853371165989125,-166191226335104340992995553399853371165989124⟩⟩, + ⟨⟨-4724887937392860014194348104175558738888967,-4724887937392860014194348104175558738888966⟩,⟨-18506469810631130495796967354094913189857843,-18506469810631130495796967354094913189857842⟩⟩, + ⟨⟨-1373787933078441847963977650278508721965527,-1373787933078441847963977650278508721965526⟩,⟨-1182681880638282960292611882730230084370870,-1182681880638282960292611882730230084370869⟩⟩, + ⟨⟨-137394433292438870554296657810948670386369,-137394433292438870554296657810948670386368⟩,⟨37014617003953625449621323031329960478966,37014617003953625449621323031329960478967⟩⟩, + ⟨⟨1608560612867758431581409887962868203611,1608560612867758431581409887962868203612⟩,⟨9366903507141903440505048570083328009653,9366903507141903440505048570083328009654⟩⟩, + ⟨⟨430519770022458455576653373869411360729,430519770022458455576653373869411360730⟩,⟨-414133161922905801018025642098385037325,-414133161922905801018025642098385037324⟩⟩, + ⟨⟨-35095141850319959563434415510233599324,-35095141850319959563434415510233599323⟩,⟨28326218219728586397359734616129727547,28326218219728586397359734616129727548⟩⟩, + ⟨⟨54186766420510079847730822317509413,54186766420510079847730822317509414⟩,⟨-6438140543562122871462393001392535986,-6438140543562122871462393001392535985⟩⟩, + ⟨⟨3061763681823301924158033675102952574,3061763681823301924158033675102952575⟩,⟨-1,1⟩⟩, + ⟨⟨54186766420510079847730822317509413,54186766420510079847730822317509414⟩,⟨6438140543562122871462393001392535985,6438140543562122871462393001392535986⟩⟩, + ⟨⟨-35095141850319959563434415510233599324,-35095141850319959563434415510233599323⟩,⟨-28326218219728586397359734616129727548,-28326218219728586397359734616129727547⟩⟩, + ⟨⟨430519770022458455576653373869411360729,430519770022458455576653373869411360730⟩,⟨414133161922905801018025642098385037324,414133161922905801018025642098385037325⟩⟩, + ⟨⟨1608560612867758431581409887962868203611,1608560612867758431581409887962868203612⟩,⟨-9366903507141903440505048570083328009654,-9366903507141903440505048570083328009653⟩⟩, + ⟨⟨-137394433292438870554296657810948670386369,-137394433292438870554296657810948670386368⟩,⟨-37014617003953625449621323031329960478967,-37014617003953625449621323031329960478966⟩⟩, + ⟨⟨-1373787933078441847963977650278508721965527,-1373787933078441847963977650278508721965526⟩,⟨1182681880638282960292611882730230084370869,1182681880638282960292611882730230084370870⟩⟩, + ⟨⟨-4724887937392860014194348104175558738888967,-4724887937392860014194348104175558738888966⟩,⟨18506469810631130495796967354094913189857842,18506469810631130495796967354094913189857843⟩⟩, + ⟨⟨15841672675639597654246179798969842429057295,15841672675639597654246179798969842429057296⟩,⟨166191226335104340992995553399853371165989124,166191226335104340992995553399853371165989125⟩⟩, + ⟨⟨296598540121664702608446126417237060092222631,296598540121664702608446126417237060092222632⟩,⟨1192090070720692041824242009778956279807805170,1192090070720692041824242009778956279807805171⟩⟩, + ⟨⟨1877268093260045133484233718309472559029576734,1877268093260045133484233718309472559029576735⟩,⟨7516749909105240955915689795003143240306653362,7516749909105240955915689795003143240306653363⟩⟩, + ⟨⟨5610103805539502626525864299696942388955970844,5610103805539502626525864299696942388955970845⟩,⟨42255055613208205681582068763509385471296048372,42255055613208205681582068763509385471296048373⟩⟩, + ⟨⟨-14446229137966340416184594743489150180760808290,-14446229137966340416184594743489150180760808289⟩,⟨207376881125503494329147739230797973217606529471,207376881125503494329147739230797973217606529472⟩⟩, + ⟨⟨-305302629647947877197497607897598720553552071179,-305302629647947877197497607897598720553552071177⟩,⟨858680858045066070283427720055215596521368229897,858680858045066070283427720055215596521368229899⟩⟩, + ⟨⟨-2258894870274729455125484589352378454723913072178,-2258894870274729455125484589352378454723913072174⟩,⟨2848436540033827980182717253400526031294539013398,2848436540033827980182717253400526031294539013402⟩⟩, + ⟨⟨-11537661676255941238164478564369440645306199504831,-11537661676255941238164478564369440645306199504819⟩,⟨6684203544199198676112557142327876949251616314197,6684203544199198676112557142327876949251616314208⟩⟩] +lemma tw1_0_2_18_calc (j : Fin 31) : taylorWaveBox 1 0 2 18 j = tw1_0_2_18 j := by + revert j + decide +kernel +def tw1_0_2_19 : Fin 31 → CI := ![⟨⟨-488089396457929441732581074553149687096836391563,-488089396457929441732581074553149687096836391560⟩,⟨1638349361175530917379364826818251128712679311344,1638349361175530917379364826818251128712679311347⟩⟩, + ⟨⟨-263844664578163250978627013475632209064804504956,-263844664578163250978627013475632209064804504954⟩,⟨348059374935999570468856218544860964891473804680,348059374935999570468856218544860964891473804682⟩⟩, + ⟨⟨-83640845994809992906907522025536960028620870519,-83640845994809992906907522025536960028620870518⟩,⟨58677847066117763832040160558900368495828138479,58677847066117763832040160558900368495828138480⟩⟩, + ⟨⟨-20250109081545164158973965628072567243186710506,-20250109081545164158973965628072567243186710505⟩,⟨7645468990869319237558995687818949331902720398,7645468990869319237558995687818949331902720399⟩⟩, + ⟨⟨-4030895964156630051377782305125799835038992785,-4030895964156630051377782305125799835038992784⟩,⟨751381350090977564721007105529722486636758847,751381350090977564721007105529722486636758848⟩⟩, + ⟨⟨-680891706019426207729640070848877779307379717,-680891706019426207729640070848877779307379716⟩,⟨68879159126713252500335269601420145199252237,68879159126713252500335269601420145199252238⟩⟩, + ⟨⟨-98042336344717498684724648158267474896678612,-98042336344717498684724648158267474896678611⟩,⟨13481732588707283558625647694864449431282418,13481732588707283558625647694864449431282419⟩⟩, + ⟨⟨-11523825880840337794913858296009287554769593,-11523825880840337794913858296009287554769592⟩,⟨3919137112954191436186897779677725228628106,3919137112954191436186897779677725228628107⟩⟩, + ⟨⟨-935294453881973485486869061281245169640880,-935294453881973485486869061281245169640879⟩,⟨828595119564802289702171893885630026270607,828595119564802289702171893885630026270608⟩⟩, + ⟨⟨-17872626362813759131516447792891234223582,-17872626362813759131516447792891234223581⟩,⟨103891823853932280972832891530663847906438,103891823853932280972832891530663847906439⟩⟩, + ⟨⟨5648991207586440933037362070107077486249,5648991207586440933037362070107077486250⟩,⟨4602013903439355372280318436696494448088,4602013903439355372280318436696494448089⟩⟩, + ⟨⟨263268754085779390908411400873989956436,263268754085779390908411400873989956437⟩,⟨-333732676451519272277619563436306480660,-333732676451519272277619563436306480659⟩⟩, + ⟨⟨-23206817422049051505713407767879689602,-23206817422049051505713407767879689601⟩,⟨1656567398398198478701854369440620881,1656567398398198478701854369440620882⟩⟩, + ⟨⟨1520887781627846968842021172209562426,1520887781627846968842021172209562427⟩,⟨-264160584655493828323138113715510619,-264160584655493828323138113715510618⟩⟩, + ⟨⟨-55129240541650321303318598761333476,-55129240541650321303318598761333475⟩,⟨192178363430295364441147480084278829,192178363430295364441147480084278830⟩⟩, + ⟨⟨-91607755141372595109004890465636779,-91607755141372595109004890465636778⟩,⟨-1,1⟩⟩, + ⟨⟨-55129240541650321303318598761333476,-55129240541650321303318598761333475⟩,⟨-192178363430295364441147480084278830,-192178363430295364441147480084278829⟩⟩, + ⟨⟨1520887781627846968842021172209562426,1520887781627846968842021172209562427⟩,⟨264160584655493828323138113715510618,264160584655493828323138113715510619⟩⟩, + ⟨⟨-23206817422049051505713407767879689602,-23206817422049051505713407767879689601⟩,⟨-1656567398398198478701854369440620882,-1656567398398198478701854369440620881⟩⟩, + ⟨⟨263268754085779390908411400873989956436,263268754085779390908411400873989956437⟩,⟨333732676451519272277619563436306480659,333732676451519272277619563436306480660⟩⟩, + ⟨⟨5648991207586440933037362070107077486249,5648991207586440933037362070107077486250⟩,⟨-4602013903439355372280318436696494448089,-4602013903439355372280318436696494448088⟩⟩, + ⟨⟨-17872626362813759131516447792891234223582,-17872626362813759131516447792891234223581⟩,⟨-103891823853932280972832891530663847906439,-103891823853932280972832891530663847906438⟩⟩, + ⟨⟨-935294453881973485486869061281245169640880,-935294453881973485486869061281245169640879⟩,⟨-828595119564802289702171893885630026270608,-828595119564802289702171893885630026270607⟩⟩, + ⟨⟨-11523825880840337794913858296009287554769593,-11523825880840337794913858296009287554769592⟩,⟨-3919137112954191436186897779677725228628107,-3919137112954191436186897779677725228628106⟩⟩, + ⟨⟨-98042336344717498684724648158267474896678612,-98042336344717498684724648158267474896678611⟩,⟨-13481732588707283558625647694864449431282419,-13481732588707283558625647694864449431282418⟩⟩, + ⟨⟨-680891706019426207729640070848877779307379717,-680891706019426207729640070848877779307379716⟩,⟨-68879159126713252500335269601420145199252238,-68879159126713252500335269601420145199252237⟩⟩, + ⟨⟨-4030895964156630051377782305125799835038992785,-4030895964156630051377782305125799835038992784⟩,⟨-751381350090977564721007105529722486636758848,-751381350090977564721007105529722486636758847⟩⟩, + ⟨⟨-20250109081545164158973965628072567243186710506,-20250109081545164158973965628072567243186710505⟩,⟨-7645468990869319237558995687818949331902720399,-7645468990869319237558995687818949331902720398⟩⟩, + ⟨⟨-83640845994809992906907522025536960028620870519,-83640845994809992906907522025536960028620870518⟩,⟨-58677847066117763832040160558900368495828138480,-58677847066117763832040160558900368495828138479⟩⟩, + ⟨⟨-263844664578163250978627013475632209064804504956,-263844664578163250978627013475632209064804504954⟩,⟨-348059374935999570468856218544860964891473804682,-348059374935999570468856218544860964891473804680⟩⟩, + ⟨⟨-488089396457929441732581074553149687096836391563,-488089396457929441732581074553149687096836391560⟩,⟨-1638349361175530917379364826818251128712679311347,-1638349361175530917379364826818251128712679311344⟩⟩] +lemma tw1_0_2_19_calc (j : Fin 31) : taylorWaveBox 1 0 2 19 j = tw1_0_2_19 j := by + revert j + decide +kernel +def tw1_0_2_20 : Fin 31 → CI := ![⟨⟨208902918636830775489501595675452239171329025635,208902918636830775489501595675452239171329025636⟩,⟨11291354019223041053251511430380124257109534841,11291354019223041053251511430380124257109534843⟩⟩, + ⟨⟨46193090177038682297198775107190678763100978129,46193090177038682297198775107190678763100978130⟩,⟨19363726383493740897381007415145061347660598863,19363726383493740897381007415145061347660598864⟩⟩, + ⟨⟨8440404785026115866005976393180904340210794642,8440404785026115866005976393180904340210794643⟩,⟨6950303685223038202630900747801540775408953708,6950303685223038202630900747801540775408953709⟩⟩, + ⟨⟨1306188708862299885536326937065368426408112066,1306188708862299885536326937065368426408112067⟩,⟨1709451792741974425129776088260029316558346102,1709451792741974425129776088260029316558346103⟩⟩, + ⟨⟨180692512016558908607771555874415984780788839,180692512016558908607771555874415984780788840⟩,⟨330302630722239055930419008439696330813555678,330302630722239055930419008439696330813555679⟩⟩, + ⟨⟨24910622162763407045201659549070908889349337,24910622162763407045201659549070908889349338⟩,⟨52050098177111052458197553867979276811924998,52050098177111052458197553867979276811924999⟩⟩, + ⟨⟨3762676034065512228045731011912851142314487,3762676034065512228045731011912851142314488⟩,⟨6615169063136502574547362543974082009349714,6615169063136502574547362543974082009349715⟩⟩, + ⟨⟨577853684652346858222922903310777438668552,577853684652346858222922903310777438668553⟩,⟨619446811421925929054366589271345541080278,619446811421925929054366589271345541080279⟩⟩, + ⟨⟨72726488509868592629651216976698485819499,72726488509868592629651216976698485819500⟩,⟨28275275937580044962920827805097005753670,28275275937580044962920827805097005753671⟩⟩, + ⟨⟨5455680266615470873798924449871877442085,5455680266615470873798924449871877442086⟩,⟨-2116408525314607944021066088962171869635,-2116408525314607944021066088962171869634⟩⟩, + ⟨⟨21211313013148999250486644972794227373,21211313013148999250486644972794227374⟩,⟨-355509336981014870221989309892678099526,-355509336981014870221989309892678099525⟩⟩, + ⟨⟨-18109363535181944344281666000172719227,-18109363535181944344281666000172719226⟩,⟨1177007357444794969044683080567779834,1177007357444794969044683080567779835⟩⟩, + ⟨⟨702211367579960953492679933308007796,702211367579960953492679933308007797⟩,⟨505009508814605761712267530693078494,505009508814605761712267530693078495⟩⟩, + ⟨⟨-47627791611997086967179311669993062,-47627791611997086967179311669993061⟩,⟨-16586954383219648558919362235220377,-16586954383219648558919362235220376⟩⟩, + ⟨⟨3099098879375265074371159180487198,3099098879375265074371159180487199⟩,⟨-5051243605933984380674583122960755,-5051243605933984380674583122960754⟩⟩, + ⟨⟨2616311368763534142755604640317837,2616311368763534142755604640317838⟩,⟨-1,1⟩⟩, + ⟨⟨3099098879375265074371159180487198,3099098879375265074371159180487199⟩,⟨5051243605933984380674583122960754,5051243605933984380674583122960755⟩⟩, + ⟨⟨-47627791611997086967179311669993062,-47627791611997086967179311669993061⟩,⟨16586954383219648558919362235220376,16586954383219648558919362235220377⟩⟩, + ⟨⟨702211367579960953492679933308007796,702211367579960953492679933308007797⟩,⟨-505009508814605761712267530693078495,-505009508814605761712267530693078494⟩⟩, + ⟨⟨-18109363535181944344281666000172719227,-18109363535181944344281666000172719226⟩,⟨-1177007357444794969044683080567779835,-1177007357444794969044683080567779834⟩⟩, + ⟨⟨21211313013148999250486644972794227373,21211313013148999250486644972794227374⟩,⟨355509336981014870221989309892678099525,355509336981014870221989309892678099526⟩⟩, + ⟨⟨5455680266615470873798924449871877442085,5455680266615470873798924449871877442086⟩,⟨2116408525314607944021066088962171869634,2116408525314607944021066088962171869635⟩⟩, + ⟨⟨72726488509868592629651216976698485819499,72726488509868592629651216976698485819500⟩,⟨-28275275937580044962920827805097005753671,-28275275937580044962920827805097005753670⟩⟩, + ⟨⟨577853684652346858222922903310777438668552,577853684652346858222922903310777438668553⟩,⟨-619446811421925929054366589271345541080279,-619446811421925929054366589271345541080278⟩⟩, + ⟨⟨3762676034065512228045731011912851142314487,3762676034065512228045731011912851142314488⟩,⟨-6615169063136502574547362543974082009349715,-6615169063136502574547362543974082009349714⟩⟩, + ⟨⟨24910622162763407045201659549070908889349337,24910622162763407045201659549070908889349338⟩,⟨-52050098177111052458197553867979276811924999,-52050098177111052458197553867979276811924998⟩⟩, + ⟨⟨180692512016558908607771555874415984780788839,180692512016558908607771555874415984780788840⟩,⟨-330302630722239055930419008439696330813555679,-330302630722239055930419008439696330813555678⟩⟩, + ⟨⟨1306188708862299885536326937065368426408112066,1306188708862299885536326937065368426408112067⟩,⟨-1709451792741974425129776088260029316558346103,-1709451792741974425129776088260029316558346102⟩⟩, + ⟨⟨8440404785026115866005976393180904340210794642,8440404785026115866005976393180904340210794643⟩,⟨-6950303685223038202630900747801540775408953709,-6950303685223038202630900747801540775408953708⟩⟩, + ⟨⟨46193090177038682297198775107190678763100978129,46193090177038682297198775107190678763100978130⟩,⟨-19363726383493740897381007415145061347660598864,-19363726383493740897381007415145061347660598863⟩⟩, + ⟨⟨208902918636830775489501595675452239171329025635,208902918636830775489501595675452239171329025636⟩,⟨-11291354019223041053251511430380124257109534843,-11291354019223041053251511430380124257109534841⟩⟩] +lemma tw1_0_2_20_calc (j : Fin 31) : taylorWaveBox 1 0 2 20 j = tw1_0_2_20 j := by + revert j + decide +kernel +def tw1_0_2 : Fin 21 → Fin 31 → CI := ![tw1_0_2_0,tw1_0_2_1,tw1_0_2_2,tw1_0_2_3,tw1_0_2_4,tw1_0_2_5,tw1_0_2_6,tw1_0_2_7,tw1_0_2_8,tw1_0_2_9,tw1_0_2_10,tw1_0_2_11,tw1_0_2_12,tw1_0_2_13,tw1_0_2_14,tw1_0_2_15,tw1_0_2_16,tw1_0_2_17,tw1_0_2_18,tw1_0_2_19,tw1_0_2_20] +lemma tw1_0_2_mem (l : Fin 21) (j : Fin 31) : (tw1_0_2 l j).Mem (taylorWave 1 0 (nearNode 2) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 2 l j = tw1_0_2 l j := by + fin_cases l + · exact tw1_0_2_0_calc j + · exact tw1_0_2_1_calc j + · exact tw1_0_2_2_calc j + · exact tw1_0_2_3_calc j + · exact tw1_0_2_4_calc j + · exact tw1_0_2_5_calc j + · exact tw1_0_2_6_calc j + · exact tw1_0_2_7_calc j + · exact tw1_0_2_8_calc j + · exact tw1_0_2_9_calc j + · exact tw1_0_2_10_calc j + · exact tw1_0_2_11_calc j + · exact tw1_0_2_12_calc j + · exact tw1_0_2_13_calc j + · exact tw1_0_2_14_calc j + · exact tw1_0_2_15_calc j + · exact tw1_0_2_16_calc j + · exact tw1_0_2_17_calc j + · exact tw1_0_2_18_calc j + · exact tw1_0_2_19_calc j + · exact tw1_0_2_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 2 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave103.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave103.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ec05f3d0af417766aebefbbf2a5db9d82b2aaa7 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave103.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_3_0 : Fin 31 → CI := ![⟨⟨-44514634927187395950659169242178901644173193451799724129706,-44514634927187395950659169242178901644173193451786902925551⟩,⟨-2339561281706160911800755291109630823995537112242364073434,-2339561281706160911800755291109630823995537112229603198209⟩⟩, + ⟨⟨-12641512574560116373026750224093987798052304949428951378992,-12641512574560116373026750224093987798052304949414936974234⟩,⟨-37046123503667208118202358007301614280897068743912392784985,-37046123503667208118202358007301614280897068743898272918917⟩⟩, + ⟨⟨25741564168784289371557643196101621969384240524122487344977,25741564168784289371557643196101621969384240524131522729969⟩,⟨-22343122847587120245135801129167661359253799251281142001380,-22343122847587120245135801129167661359253799251272191288322⟩⟩, + ⟨⟨26290178534851619442860246579480484084714865739832744498679,26290178534851619442860246579480484084714865739840872357694⟩,⟨13166008226538620839303365637423877037870379944928327010869,13166008226538620839303365637423877037870379944936484392987⟩⟩, + ⟨⟨-1643982173753016250966064993181556421988942944848961716507,-1643982173753016250966064993181556421988942944844059825472⟩,⟨25040269917334170534532807520902312360598178799802935749647,25040269917334170534532807520902312360598178799807846910631⟩⟩, + ⟨⟨-19934529177765455219879986386403246084219894441190005204416,-19934529177765455219879986386403246084219894441187168598686⟩,⟨7097485531524213855516029468398988914548050424140637095807,7097485531524213855516029468398988914548050424143443955390⟩⟩, + ⟨⟨-12138718775955408694957263281193184803410041133460893501364,-12138718775955408694957263281193184803410041133457546383781⟩,⟨-12745654714753179129705126445252844043580543190133945220273,-12745654714753179129705126445252844043580543190130563327823⟩⟩, + ⟨⟨5294120695813916394161177692288439628229147845907144715131,5294120695813916394161177692288439628229147845909486036364⟩,⟨-13409350978962503743786234669514134116326195669459382526078,-13409350978962503743786234669514134116326195669457055148516⟩⟩, + ⟨⟨11572002718391757478757610648870071134279218727062853334568,11572002718391757478757610648870071134279218727064750092896⟩,⟨-896963985866861396720937208381532210544228838012087350900,-896963985866861396720937208381532210544228838010188507792⟩⟩, + ⟨⟨4850298103856280446542660047591565760027238095387340416567,4850298103856280446542660047591565760027238095388504657591⟩,⟨7783995620206480109034084007996731973030085336161474477866,7783995620206480109034084007996731973030085336162640783121⟩⟩, + ⟨⟨-3392176153216868541327652906316772077172366148020631799708,-3392176153216868541327652906316772077172366148020137946827⟩,⟨6249633420484391086214486166981092120967382641232147747594,6249633420484391086214486166981092120967382641232639941450⟩⟩, + ⟨⟨-5411911720231354453173030950772790931467985425667433799993,-5411911720231354453173030950772790931467985425667024140343⟩,⟨376010291744104374220585364083225359998576591905534601110,376010291744104374220585364083225359998576591905944479217⟩⟩, + ⟨⟨-2665546613343111594751183860254942895737519166125078816099,-2665546613343111594751183860254942895737519166124831672261⟩,⟨-3133240980525539063810503715198718660212538113812551538027,-3133240980525539063810503715198718660212538113812304282373⟩⟩, + ⟨⟨448155384602849873401609030502473227167772846101322253726,448155384602849873401609030502473227167772846101490931273⟩,⟨-3145280087244477705780460342688857496685922751682705117880,-3145280087244477705780460342688857496685922751682537253058⟩⟩, + ⟨⟨2033675195708673815885832651020178507567803717683549296661,2033675195708673815885832651020178507567803717683638183369⟩,⟨-1644005637661129014771370616732567679309903870602293694907,-1644005637661129014771370616732567679309903870602201028237⟩⟩, + ⟨⟨2427743755191081738991452656238636960682008226691826444510,2427743755191081738991452656238636960682008226691876181942⟩,⟨-152,166⟩⟩, + ⟨⟨2033675195708673815885832651020178507567803717683549296646,2033675195708673815885832651020178507567803717683638183360⟩,⟨1644005637661129014771370616732567679309903870602201028249,1644005637661129014771370616732567679309903870602293694925⟩⟩, + ⟨⟨448155384602849873401609030502473227167772846101322253706,448155384602849873401609030502473227167772846101490931254⟩,⟨3145280087244477705780460342688857496685922751682537253061,3145280087244477705780460342688857496685922751682705117884⟩⟩, + ⟨⟨-2665546613343111594751183860254942895737519166125078816124,-2665546613343111594751183860254942895737519166124831672278⟩,⟨3133240980525539063810503715198718660212538113812304282352,3133240980525539063810503715198718660212538113812551538012⟩⟩, + ⟨⟨-5411911720231354453173030950772790931467985425667433799997,-5411911720231354453173030950772790931467985425667024140334⟩,⟨-376010291744104374220585364083225359998576591905944479256,-376010291744104374220585364083225359998576591905534601135⟩⟩, + ⟨⟨-3392176153216868541327652906316772077172366148020631799689,-3392176153216868541327652906316772077172366148020137946777⟩,⟨-6249633420484391086214486166981092120967382641232639941484,-6249633420484391086214486166981092120967382641232147747596⟩⟩, + ⟨⟨4850298103856280446542660047591565760027238095387340416621,4850298103856280446542660047591565760027238095388504657653⟩,⟨-7783995620206480109034084007996731973030085336162640783091,-7783995620206480109034084007996731973030085336161474477828⟩⟩, + ⟨⟨11572002718391757478757610648870071134279218727062853334646,11572002718391757478757610648870071134279218727064750092815⟩,⟨896963985866861396720937208381532210544228838010188507942,896963985866861396720937208381532210544228838012087350889⟩⟩, + ⟨⟨5294120695813916394161177692288439628229147845907144715048,5294120695813916394161177692288439628229147845909486036263⟩,⟨13409350978962503743786234669514134116326195669457055148559,13409350978962503743786234669514134116326195669459382526105⟩⟩, + ⟨⟨-12138718775955408694957263281193184803410041133460893501413,-12138718775955408694957263281193184803410041133457546383907⟩,⟨12745654714753179129705126445252844043580543190130563327777,12745654714753179129705126445252844043580543190133945220150⟩⟩, + ⟨⟨-19934529177765455219879986386403246084219894441190005204475,-19934529177765455219879986386403246084219894441187168598530⟩,⟨-7097485531524213855516029468398988914548050424143443955648,-7097485531524213855516029468398988914548050424140637095851⟩⟩, + ⟨⟨-1643982173753016250966064993181556421988942944848961716469,-1643982173753016250966064993181556421988942944844059825163⟩,⟨-25040269917334170534532807520902312360598178799807846910778,-25040269917334170534532807520902312360598178799802935749523⟩⟩, + ⟨⟨26290178534851619442860246579480484084714865739832744498663,26290178534851619442860246579480484084714865739840872357883⟩,⟨-13166008226538620839303365637423877037870379944936484392938,-13166008226538620839303365637423877037870379944928327010614⟩⟩, + ⟨⟨25741564168784289371557643196101621969384240524122487344613,25741564168784289371557643196101621969384240524131522730003⟩,⟨22343122847587120245135801129167661359253799251272191288311,22343122847587120245135801129167661359253799251281142001769⟩⟩, + ⟨⟨-12641512574560116373026750224093987798052304949428951379449,-12641512574560116373026750224093987798052304949414936974302⟩,⟨37046123503667208118202358007301614280897068743898272918633,37046123503667208118202358007301614280897068743912392785089⟩⟩, + ⟨⟨-44514634927187395950659169242178901644173193451799724129635,-44514634927187395950659169242178901644173193451786902925610⟩,⟨2339561281706160911800755291109630823995537112229603197939,2339561281706160911800755291109630823995537112242364073036⟩⟩] +lemma tw1_0_3_0_calc (j : Fin 31) : taylorWaveBox 1 0 3 0 j = tw1_0_3_0 j := by + revert j + decide +kernel +def tw1_0_3_1 : Fin 31 → CI := ![⟨⟨7281470966734681848179751099278416191612719471133526178399,7281470966734681848179751099278416191612719471145713473132⟩,⟨39336343809149730769318151099915854927187003978333256722431,39336343809149730769318151099915854927187003978345497522986⟩⟩, + ⟨⟨-27525953208874281860875352250632696751764374524327118525276,-27525953208874281860875352250632696751764374524314631456329⟩,⟨18055269416262567242073323900104254529726002007814808435201,18055269416262567242073323900104254529726002007827208055236⟩⟩, + ⟨⟨-22289613143249410631631080762847021929150573194589088121102,-22289613143249410631631080762847021929150573194581733992941⟩,⟨-14789052765794008080703137084004982734412307103776332080129,-14789052765794008080703137084004982734412307103768914627219⟩⟩, + ⟨⟨3685405599466741553702731190285016127818423918724792128611,3685405599466741553702731190285016127818423918730950337923⟩,⟨-21111489369585083481864925092118471814839786738301540372043,-21111489369585083481864925092118471814839786738295402386721⟩⟩, + ⟨⟨16368937194983889272580600680130053485718055117973562516713,16368937194983889272580600680130053485718055117976961026919⟩,⟨-4192348802623768561328674585847157083019818093645642728047,-4192348802623768561328674585847157083019818093642247716949⟩⟩, + ⟨⟨8304227732434533320661887879726365309594997897269504061778,8304227732434533320661887879726365309594997897271270475408⟩,⟨10110945072576418650917931508124510948512101512223247246718,10110945072576418650917931508124510948512101512225025625449⟩⟩, + ⟨⟨-4131281887474516587512709905369696871828636311915477962608,-4131281887474516587512709905369696871828636311913644984405⟩,⟨9025261969559713160412381639423030089225636250643139662883,9025261969559713160412381639423030089225636250644961109304⟩⟩, + ⟨⟨-7349793382703660999792663999580289047616611987642104971144,-7349793382703660999792663999580289047616611987640998933299⟩,⟨344452244596352970302007870679388225294093673367634119010,344452244596352970302007870679388225294093673368743659947⟩⟩, + ⟨⟨-2788917327749111857150028558702816425384043963789144999079,-2788917327749111857150028558702816425384043963788392335238⟩,⟨-4524763100096711340551680997712064406746289884415494890001,-4524763100096711340551680997712064406746289884414742996626⟩⟩, + ⟨⟨1701282991282063050175952539986365449485989189642532863591,1701282991282063050175952539986365449485989189642933666179⟩,⟨-3323349662711653020897803553432486231311937487464838480653,-3323349662711653020897803553432486231311937487464436992865⟩⟩, + ⟨⟨2528400382677370890031588768022233605229821563593215484638,2528400382677370890031588768022233605229821563593406461036⟩,⟨-322176118073701036280195574242696671240675031586210713221,-322176118073701036280195574242696671240675031586020614877⟩⟩, + ⟨⟨1220969708307942546729508398272148581883065083102040638700,1220969708307942546729508398272148581883065083102210103634⟩,⟨1180657633256269161694428100454908677499160368943737088940,1180657633256269161694428100454908677499160368943906835238⟩⟩, + ⟨⟨11417063532796282321324164408707160616161202805247710018,11417063532796282321324164408707160616161202805332803282⟩,⟨1121450104105249403300540047903153237578840045107154857926,1121450104105249403300540047903153237578840045107240114774⟩⟩, + ⟨⟨-459831400394539029822145417973553631259399429986513449970,-459831400394539029822145417973553631259399429986475637498⟩,⟨606600674225559469856831674811051442650478676877963140073,606600674225559469856831674811051442650478676878000645270⟩⟩, + ⟨⟨-521576307970195615378606259739426027944224312345531669172,-521576307970195615378606259739426027944224312345509183996⟩,⟨226005308644905712297439722145238437626491990108858819679,226005308644905712297439722145238437626491990108882315949⟩⟩, + ⟨⟨-508465463073786656924641219122424230378909084543333468837,-508465463073786656924641219122424230378909084543321433357⟩,⟨-35,33⟩⟩, + ⟨⟨-521576307970195615378606259739426027944224312345531669171,-521576307970195615378606259739426027944224312345509183994⟩,⟨-226005308644905712297439722145238437626491990108882315953,-226005308644905712297439722145238437626491990108858819682⟩⟩, + ⟨⟨-459831400394539029822145417973553631259399429986513449967,-459831400394539029822145417973553631259399429986475637494⟩,⟨-606600674225559469856831674811051442650478676878000645273,-606600674225559469856831674811051442650478676877963140075⟩⟩, + ⟨⟨11417063532796282321324164408707160616161202805247710024,11417063532796282321324164408707160616161202805332803291⟩,⟨-1121450104105249403300540047903153237578840045107240114775,-1121450104105249403300540047903153237578840045107154857925⟩⟩, + ⟨⟨1220969708307942546729508398272148581883065083102040638704,1220969708307942546729508398272148581883065083102210103643⟩,⟨-1180657633256269161694428100454908677499160368943906835233,-1180657633256269161694428100454908677499160368943737088930⟩⟩, + ⟨⟨2528400382677370890031588768022233605229821563593215484631,2528400382677370890031588768022233605229821563593406461040⟩,⟨322176118073701036280195574242696671240675031586020614885,322176118073701036280195574242696671240675031586210713240⟩⟩, + ⟨⟨1701282991282063050175952539986365449485989189642532863566,1701282991282063050175952539986365449485989189642933666156⟩,⟨3323349662711653020897803553432486231311937487464436992877,3323349662711653020897803553432486231311937487464838480668⟩⟩, + ⟨⟨-2788917327749111857150028558702816425384043963789144999077,-2788917327749111857150028558702816425384043963788392335296⟩,⟨4524763100096711340551680997712064406746289884414742996641,4524763100096711340551680997712064406746289884415494889957⟩⟩, + ⟨⟨-7349793382703660999792663999580289047616611987642104971137,-7349793382703660999792663999580289047616611987640998933299⟩,⟨-344452244596352970302007870679388225294093673368743659994,-344452244596352970302007870679388225294093673367634119064⟩⟩, + ⟨⟨-4131281887474516587512709905369696871828636311915477962525,-4131281887474516587512709905369696871828636311913644984362⟩,⟨-9025261969559713160412381639423030089225636250644961109311,-9025261969559713160412381639423030089225636250643139662931⟩⟩, + ⟨⟨8304227732434533320661887879726365309594997897269504061791,8304227732434533320661887879726365309594997897271270475550⟩,⟨-10110945072576418650917931508124510948512101512225025625453,-10110945072576418650917931508124510948512101512223247246593⟩⟩, + ⟨⟨16368937194983889272580600680130053485718055117973562516593,16368937194983889272580600680130053485718055117976961026982⟩,⟨4192348802623768561328674585847157083019818093642247716971,4192348802623768561328674585847157083019818093645642728251⟩⟩, + ⟨⟨3685405599466741553702731190285016127818423918724792128412,3685405599466741553702731190285016127818423918730950337875⟩,⟨21111489369585083481864925092118471814839786738295402386674,21111489369585083481864925092118471814839786738301540372148⟩⟩, + ⟨⟨-22289613143249410631631080762847021929150573194589088121372,-22289613143249410631631080762847021929150573194581733992888⟩,⟨14789052765794008080703137084004982734412307103768914626893,14789052765794008080703137084004982734412307103776332080126⟩⟩, + ⟨⟨-27525953208874281860875352250632696751764374524327118525317,-27525953208874281860875352250632696751764374524314631456031⟩,⟨-18055269416262567242073323900104254529726002007827208055601,-18055269416262567242073323900104254529726002007814808435226⟩⟩, + ⟨⟨7281470966734681848179751099278416191612719471133526178750,7281470966734681848179751099278416191612719471145713473362⟩,⟨-39336343809149730769318151099915854927187003978345497522850,-39336343809149730769318151099915854927187003978333256722416⟩⟩] +lemma tw1_0_3_1_calc (j : Fin 31) : taylorWaveBox 1 0 3 1 j = tw1_0_3_1 j := by + revert j + decide +kernel +def tw1_0_3_2 : Fin 31 → CI := ![⟨⟨24601806033909601431139592292871332234521606467786305184635,24601806033909601431139592292871332234521606467794628568907⟩,⟨-10944650039916408197643176156546797975846106711739594311927,-10944650039916408197643176156546797975846106711731298614644⟩⟩, + ⟨⟨15353103071897366705331720013556442072048993374371062517918,15353103071897366705331720013556442072048993374378817090698⟩,⟨13978532875730665423354555850679919456633032374903442683799,13978532875730665423354555850679919456633032374911238210652⟩⟩, + ⟨⟨-4887579835354533909798642693398009886731091961959529368689,-4887579835354533909798642693398009886731091961955262789465⟩,⟨14966440972357416571499819666293303179850873495875478636476,14966440972357416571499819666293303179850873495879719828647⟩⟩, + ⟨⟨-11632852142810422432505301613662812742322514943680192057232,-11632852142810422432505301613662812742322514943676973393672⟩,⟨1386511136027475132700429111788021149537074736629215819729,1386511136027475132700429111788021149537074736632441534325⟩⟩, + ⟨⟨-4583409616881938111548197817907164398990029875937846245520,-4583409616881938111548197817907164398990029875936230015743⟩,⟨-7197993240396992604038328365927973765756431874187018779060,-7197993240396992604038328365927973765756431874185402886997⟩⟩, + ⟨⟨3107307008221240432599705662439701487052564862001197123699,3107307008221240432599705662439701487052564862001952379681⟩,⟨-5211626432202932706391176170783307779004552292302424709569,-5211626432202932706391176170783307779004552292301669658017⟩⟩, + ⟨⟨4193152328916443682291024274715213610532439889419245411491,4193152328916443682291024274715213610532439889419889391207⟩,⟨204665768435207370207061899123004473847416708888026592129,204665768435207370207061899123004473847416708888669618472⟩⟩, + ⟨⟨1274739360507058972044115509714925474518392092116211227636,1274739360507058972044115509714925474518392092116613334112⟩,⟨2511455445332589938138676702889246441218974062135555007298,2511455445332589938138676702889246441218974062135958026870⟩⟩, + ⟨⟨-943928135048789605837516044397254860517225223604430564132,-943928135048789605837516044397254860517225223604128856374⟩,⟨1562574449589917163473953076954715955996176522706521454969,1562574449589917163473953076954715955996176522706823083471⟩⟩, + ⟨⟨-1137287814494870405708613073563053198353971762012669199838,-1137287814494870405708613073563053198353971762012502551013⟩,⟨76635698693502522895511400598324091667139748954351718152,76635698693502522895511400598324091667139748954517870311⟩⟩, + ⟨⟨-467448128773643694818936400517827474858601744483243891057,-467448128773643694818936400517827474858601744483182006934⟩,⟨-501004087294938199912147529576629271682128799290618060925,-501004087294938199912147529576629271682128799290555871092⟩⟩, + ⟨⟨14274157097460722966233463151398596451777601842730347875,14274157097460722966233463151398596451777601842768623439⟩,⟨-398556682123013991273469366346755193442352480028380732112,-398556682123013991273469366346755193442352480028342482598⟩⟩, + ⟨⟨145004087205013311435948384876608240166414491763381294609,145004087205013311435948384876608240166414491763400400355⟩,⟨-177651460542903048139186019022801563384895733227490176684,-177651460542903048139186019022801563384895733227471065397⟩⟩, + ⟨⟨125166042518737113727100738586694352738493312031447285580,125166042518737113727100738586694352738493312031456544127⟩,⟨-55156751385776360010081551517342633394706117058709644097,-55156751385776360010081551517342633394706117058700392277⟩⟩, + ⟨⟨91790356777381725269896427515195411641981406571649260253,91790356777381725269896427515195411641981406571653379024⟩,⟨-12742771179366838892598523926006770113304636276876447187,-12742771179366838892598523926006770113304636276872176522⟩⟩, + ⟨⟨79869568169837022519829033804099306867284569322276413132,79869568169837022519829033804099306867284569322278557894⟩,⟨-6,6⟩⟩, + ⟨⟨91790356777381725269896427515195411641981406571649260253,91790356777381725269896427515195411641981406571653379024⟩,⟨12742771179366838892598523926006770113304636276872176523,12742771179366838892598523926006770113304636276876447187⟩⟩, + ⟨⟨125166042518737113727100738586694352738493312031447285580,125166042518737113727100738586694352738493312031456544127⟩,⟨55156751385776360010081551517342633394706117058700392278,55156751385776360010081551517342633394706117058709644098⟩⟩, + ⟨⟨145004087205013311435948384876608240166414491763381294608,145004087205013311435948384876608240166414491763400400354⟩,⟨177651460542903048139186019022801563384895733227471065397,177651460542903048139186019022801563384895733227490176685⟩⟩, + ⟨⟨14274157097460722966233463151398596451777601842730347872,14274157097460722966233463151398596451777601842768623437⟩,⟨398556682123013991273469366346755193442352480028342482598,398556682123013991273469366346755193442352480028380732113⟩⟩, + ⟨⟨-467448128773643694818936400517827474858601744483243891061,-467448128773643694818936400517827474858601744483182006935⟩,⟨501004087294938199912147529576629271682128799290555871088,501004087294938199912147529576629271682128799290618060924⟩⟩, + ⟨⟨-1137287814494870405708613073563053198353971762012669199839,-1137287814494870405708613073563053198353971762012502551012⟩,⟨-76635698693502522895511400598324091667139748954517870320,-76635698693502522895511400598324091667139748954351718159⟩⟩, + ⟨⟨-943928135048789605837516044397254860517225223604430564111,-943928135048789605837516044397254860517225223604128856376⟩,⟨-1562574449589917163473953076954715955996176522706823083466,-1562574449589917163473953076954715955996176522706521454987⟩⟩, + ⟨⟨1274739360507058972044115509714925474518392092116211227655,1274739360507058972044115509714925474518392092116613334128⟩,⟨-2511455445332589938138676702889246441218974062135958026860,-2511455445332589938138676702889246441218974062135555007290⟩⟩, + ⟨⟨4193152328916443682291024274715213610532439889419245411499,4193152328916443682291024274715213610532439889419889391202⟩,⟨-204665768435207370207061899123004473847416708888669618436,-204665768435207370207061899123004473847416708888026592107⟩⟩, + ⟨⟨3107307008221240432599705662439701487052564862001197123635,3107307008221240432599705662439701487052564862001952379668⟩,⟨5211626432202932706391176170783307779004552292301669658016,5211626432202932706391176170783307779004552292302424709619⟩⟩, + ⟨⟨-4583409616881938111548197817907164398990029875937846245611,-4583409616881938111548197817907164398990029875936230015752⟩,⟨7197993240396992604038328365927973765756431874185402886924,7197993240396992604038328365927973765756431874187018779070⟩⟩, + ⟨⟨-11632852142810422432505301613662812742322514943680192057266,-11632852142810422432505301613662812742322514943676973393629⟩,⟨-1386511136027475132700429111788021149537074736632441534433,-1386511136027475132700429111788021149537074736629215819759⟩⟩, + ⟨⟨-4887579835354533909798642693398009886731091961959529368670,-4887579835354533909798642693398009886731091961955262789264⟩,⟨-14966440972357416571499819666293303179850873495879719828773,-14966440972357416571499819666293303179850873495875478636421⟩⟩, + ⟨⟨15353103071897366705331720013556442072048993374371062517912,15353103071897366705331720013556442072048993374378817090902⟩,⟨-13978532875730665423354555850679919456633032374911238210648,-13978532875730665423354555850679919456633032374903442683585⟩⟩, + ⟨⟨24601806033909601431139592292871332234521606467786305184580,24601806033909601431139592292871332234521606467794628568772⟩,⟨10944650039916408197643176156546797975846106711731298614864,10944650039916408197643176156546797975846106711739594312065⟩⟩] +lemma tw1_0_3_2_calc (j : Fin 31) : taylorWaveBox 1 0 3 2 j = tw1_0_3_2 j := by + revert j + decide +kernel +def tw1_0_3_3 : Fin 31 → CI := ![⟨⟨-8822159484298962282791059534229508720907048702689637387480,-8822159484298962282791059534229508720907048702685334966664⟩,⟨-11506130230401403583082733960696400992627340576127168673397,-11506130230401403583082733960696400992627340576122859002907⟩⟩, + ⟨⟨4901872019014414995886288216494496475716228519163579415266,4901872019014414995886288216494496475716228519167243791224⟩,⟨-9259535819688967492519473762623979988210103520724558962154,-9259535819688967492519473762623979988210103520720903172255⟩⟩, + ⟨⟨7405746875281819283997410200052210741660709163554377763256,7405746875281819283997410200052210741660709163556206753701⟩,⟨337174934740759599091830379624752238996397055021830515429,337174934740759599091830379624752238996397055023662587319⟩⟩, + ⟨⟨2042607739827894213761216321013743735607854568230581366950,2042607739827894213761216321013743735607854568231826572273⟩,⟨4698523582990693481442145874987098380711320386914226608654,4698523582990693481442145874987098380711320386915471434986⟩⟩, + ⟨⟨-2187862755555346974258816844891103737452941507041590133118,-2187862755555346974258816844891103737452941507041020627783⟩,⟨2664429460592364644346496371777001567186994205930869273963,2664429460592364644346496371777001567186994205931439876612⟩⟩, + ⟨⟨-2209676527297161353368286095115334630027881614186815721132,-2209676527297161353368286095115334630027881614186520716426⟩,⟨-429742470768578412813024922062506202764712317287822727815,-429742470768578412813024922062506202764712317287529882603⟩⟩, + ⟨⟨-462629414620537545870321787744039685141524968591322031782,-462629414620537545870321787744039685141524968591054109888⟩,⟨-1343036714172977472146927386522018936797294857971312064130,-1343036714172977472146927386522018936797294857971041569437⟩⟩, + ⟨⟨541142192202677312613083316207763076155299307422387877285,541142192202677312613083316207763076155299307422544565805⟩,⟨-671573182204840327644868968424550550581960941625187242635,-671573182204840327644868968424550550581960941625031422335⟩⟩, + ⟨⟨500426473123790658158610466917806115176408761389113928515,500426473123790658158610466917806115176408761389210907774⟩,⟨34286257562602967669097564945763303001705071863817187179,34286257562602967669097564945763303001705071863914250061⟩⟩, + ⟨⟨158966344922586286882772997242412606255197332484844623011,158966344922586286882772997242412606255197332484887488049⟩,⟨228562676948222624728564336626848843836757481214283859198,228562676948222624728564336626848843836757481214326777240⟩⟩, + ⟨⟨-28700444600874641575471051976367396938065875846181461356,-28700444600874641575471051976367396938065875846169067158⟩,⟨144543119696434752496117506978793526491991016840861594259,144543119696434752496117506978793526491991016840873997831⟩⟩, + ⟨⟨-57442754353910912252091430834645278083911983070935152891,-57442754353910912252091430834645278083911983070926207456⟩,⟨48091061469490475402109035567305120628483892497329367470,48091061469490475402109035567305120628483892497338302517⟩⟩, + ⟨⟨-36825368448853250084846607738259365007156573942765073795,-36825368448853250084846607738259365007156573942761425022⟩,⟨7139548430184464363685554117969744920114132087173688701,7139548430184464363685554117969744920114132087177332678⟩⟩, + ⟨⟨-19579496451773858905038807840259224842601578806803724196,-19579496451773858905038807840259224842601578806802110709⟩,⟨-1807036416595369517537598962634330181286189548139441771,-1807036416595369517537598962634330181286189548137823681⟩⟩, + ⟨⟨-11979523046704725175795216518449858238373908111773634842,-11979523046704725175795216518449858238373908111773046003⟩,⟨-1602784041752221477022918770413344599143002879527677382,-1602784041752221477022918770413344599143002879527074753⟩⟩, + ⟨⟨-10036705944309967096847659123938488084426304403334484129,-10036705944309967096847659123938488084426304403334182662⟩,⟨-1,1⟩⟩, + ⟨⟨-11979523046704725175795216518449858238373908111773634842,-11979523046704725175795216518449858238373908111773046003⟩,⟨1602784041752221477022918770413344599143002879527074753,1602784041752221477022918770413344599143002879527677382⟩⟩, + ⟨⟨-19579496451773858905038807840259224842601578806803724196,-19579496451773858905038807840259224842601578806802110709⟩,⟨1807036416595369517537598962634330181286189548137823681,1807036416595369517537598962634330181286189548139441771⟩⟩, + ⟨⟨-36825368448853250084846607738259365007156573942765073795,-36825368448853250084846607738259365007156573942761425022⟩,⟨-7139548430184464363685554117969744920114132087177332679,-7139548430184464363685554117969744920114132087173688701⟩⟩, + ⟨⟨-57442754353910912252091430834645278083911983070935152891,-57442754353910912252091430834645278083911983070926207455⟩,⟨-48091061469490475402109035567305120628483892497338302517,-48091061469490475402109035567305120628483892497329367470⟩⟩, + ⟨⟨-28700444600874641575471051976367396938065875846181461356,-28700444600874641575471051976367396938065875846169067157⟩,⟨-144543119696434752496117506978793526491991016840873997831,-144543119696434752496117506978793526491991016840861594259⟩⟩, + ⟨⟨158966344922586286882772997242412606255197332484844623012,158966344922586286882772997242412606255197332484887488051⟩,⟨-228562676948222624728564336626848843836757481214326777239,-228562676948222624728564336626848843836757481214283859197⟩⟩, + ⟨⟨500426473123790658158610466917806115176408761389113928519,500426473123790658158610466917806115176408761389210907770⟩,⟨-34286257562602967669097564945763303001705071863914250054,-34286257562602967669097564945763303001705071863817187179⟩⟩, + ⟨⟨541142192202677312613083316207763076155299307422387877281,541142192202677312613083316207763076155299307422544565800⟩,⟨671573182204840327644868968424550550581960941625031422339,671573182204840327644868968424550550581960941625187242638⟩⟩, + ⟨⟨-462629414620537545870321787744039685141524968591322031789,-462629414620537545870321787744039685141524968591054109900⟩,⟨1343036714172977472146927386522018936797294857971041569437,1343036714172977472146927386522018936797294857971312064124⟩⟩, + ⟨⟨-2209676527297161353368286095115334630027881614186815721145,-2209676527297161353368286095115334630027881614186520716420⟩,⟨429742470768578412813024922062506202764712317287529882577,429742470768578412813024922062506202764712317287822727808⟩⟩, + ⟨⟨-2187862755555346974258816844891103737452941507041590133114,-2187862755555346974258816844891103737452941507041020627751⟩,⟨-2664429460592364644346496371777001567186994205931439876640,-2664429460592364644346496371777001567186994205930869273965⟩⟩, + ⟨⟨2042607739827894213761216321013743735607854568230581366964,2042607739827894213761216321013743735607854568231826572316⟩,⟨-4698523582990693481442145874987098380711320386915471434990,-4698523582990693481442145874987098380711320386914226608629⟩⟩, + ⟨⟨7405746875281819283997410200052210741660709163554377763221,7405746875281819283997410200052210741660709163556206753741⟩,⟨-337174934740759599091830379624752238996397055023662587303,-337174934740759599091830379624752238996397055021830515336⟩⟩, + ⟨⟨4901872019014414995886288216494496475716228519163579415152,4901872019014414995886288216494496475716228519167243791207⟩,⟨9259535819688967492519473762623979988210103520720903172241,9259535819688967492519473762623979988210103520724558962237⟩⟩, + ⟨⟨-8822159484298962282791059534229508720907048702689637387541,-8822159484298962282791059534229508720907048702685334966766⟩,⟨11506130230401403583082733960696400992627340576122859002855,11506130230401403583082733960696400992627340576127168673305⟩⟩] +lemma tw1_0_3_3_calc (j : Fin 31) : taylorWaveBox 1 0 3 3 j = tw1_0_3_3 j := by + revert j + decide +kernel +def tw1_0_3_4 : Fin 31 → CI := ![⟨⟨-4096642036271584894737968142576372767717484140090680718819,-4096642036271584894737968142576372767717484140088914502993⟩,⟨5054312393529096537111386038655043607583237512377088090948,5054312393529096537111386038655043607583237512378855449912⟩⟩, + ⟨⟨-4284208540190672752342582794498626090685409850075356742771,-4284208540190672752342582794498626090685409850074013114804⟩,⟨-1026599155448071215300274596267479900555382526303022291073,-1026599155448071215300274596267479900555382526301681451447⟩⟩, + ⟨⟨-648023722651860191229022637893818486070370373009582187996,-648023722651860191229022637893818486070370373008922262552⟩,⟨-2835826651695781208562395803439995757488582108085365849725,-2835826651695781208562395803439995757488582108084702885494⟩⟩, + ⟨⟨1426192747795474066068911124829268572199662952732949592047,1426192747795474066068911124829268572199662952733441704262⟩,⟨-1205032846769061214977672137592081396795923685817414814650,-1205032846769061214977672137592081396795923685816923831921⟩⟩, + ⟨⟨1081668676195856571847431161362203284158405824792169451235,1081668676195856571847431161362203284158405824792414095428⟩,⟨421047424900099243990097484854607075235325269352473384200,421047424900099243990097484854607075235325269352717505872⟩⟩, + ⟨⟨106389767322765943563696208452460198172501066708610604107,106389767322765943563696208452460198172501066708721804866⟩,⟨687771373059566814587246892915754293224232322219235499708,687771373059566814587246892915754293224232322219347750895⟩⟩, + ⟨⟨-303159750552052506299001353654966082746405756494460209801,-303159750552052506299001353654966082746405756494372796187⟩,⟨261758573350442302161418341056690378813378188123709509092,261758573350442302161418341056690378813378188123796078368⟩⟩, + ⟨⟨-212950453819983641375841178240280112669703716848137147305,-212950453819983641375841178240280112669703716848093946121⟩,⟨-55602527153201201620668006049359708349780255633765494906,-55602527153201201620668006049359708349780255633722100447⟩⟩, + ⟨⟨-45423110089952372345214473919592672195185765334468838308,-45423110089952372345214473919592672195185765334446850971⟩,⟨-105488160731044401804119958865825899461112013015155197167,-105488160731044401804119958865825899461112013015133228428⟩⟩, + ⟨⟨23244795886625691993325445856129471293083512351706356406,23244795886625691993325445856129471293083512351714919854⟩,⟨-51679888747112790912150105068605394054237253332384297394,-51679888747112790912150105068605394054237253332375721860⟩⟩, + ⟨⟨24028448112154396733749650700772916611337950651725452689,24028448112154396733749650700772916611337950651728586442⟩,⟨-10962209639913216024687675750665661161618781367199792316,-10962209639913216024687675750665661161618781367196674152⟩⟩, + ⟨⟨11611040258817596768141282119530114862968237597502423761,11611040258817596768141282119530114862968237597503955842⟩,⟨1647683785404141933650352762304829689770653486663153591,1647683785404141933650352762304829689770653486664686723⟩⟩, + ⟨⟨4479386702216714726044448883396796201961637580918296393,4479386702216714726044448883396796201961637580918922162⟩,⟨2465967875188762921482273825145278752038464256079534717,2465967875188762921482273825145278752038464256080160104⟩⟩, + ⟨⟨1945230956552575618919232600183050264416111660147296223,1945230956552575618919232600183050264416111660147507975⟩,⟨1328321340924844573922075240939102222507762334550588510,1328321340924844573922075240939102222507762334550801191⟩⟩, + ⟨⟨1207869622022908521916973693205480688298747829549145254,1207869622022908521916973693205480688298747829549217444⟩,⟨516313352334557682506326925169043635936881012331179670,516313352334557682506326925169043635936881012331252209⟩⟩, + ⟨⟨1051041388696173369617339470959795736498914865419408764,1051041388696173369617339470959795736498914865419443680⟩,⟨-1,1⟩⟩, + ⟨⟨1207869622022908521916973693205480688298747829549145254,1207869622022908521916973693205480688298747829549217444⟩,⟨-516313352334557682506326925169043635936881012331252209,-516313352334557682506326925169043635936881012331179670⟩⟩, + ⟨⟨1945230956552575618919232600183050264416111660147296223,1945230956552575618919232600183050264416111660147507975⟩,⟨-1328321340924844573922075240939102222507762334550801191,-1328321340924844573922075240939102222507762334550588510⟩⟩, + ⟨⟨4479386702216714726044448883396796201961637580918296393,4479386702216714726044448883396796201961637580918922162⟩,⟨-2465967875188762921482273825145278752038464256080160104,-2465967875188762921482273825145278752038464256079534717⟩⟩, + ⟨⟨11611040258817596768141282119530114862968237597502423761,11611040258817596768141282119530114862968237597503955842⟩,⟨-1647683785404141933650352762304829689770653486664686723,-1647683785404141933650352762304829689770653486663153591⟩⟩, + ⟨⟨24028448112154396733749650700772916611337950651725452689,24028448112154396733749650700772916611337950651728586442⟩,⟨10962209639913216024687675750665661161618781367196674152,10962209639913216024687675750665661161618781367199792316⟩⟩, + ⟨⟨23244795886625691993325445856129471293083512351706356406,23244795886625691993325445856129471293083512351714919854⟩,⟨51679888747112790912150105068605394054237253332375721860,51679888747112790912150105068605394054237253332384297394⟩⟩, + ⟨⟨-45423110089952372345214473919592672195185765334468838308,-45423110089952372345214473919592672195185765334446850972⟩,⟨105488160731044401804119958865825899461112013015133228429,105488160731044401804119958865825899461112013015155197166⟩⟩, + ⟨⟨-212950453819983641375841178240280112669703716848137147306,-212950453819983641375841178240280112669703716848093946122⟩,⟨55602527153201201620668006049359708349780255633722100446,55602527153201201620668006049359708349780255633765494905⟩⟩, + ⟨⟨-303159750552052506299001353654966082746405756494460209798,-303159750552052506299001353654966082746405756494372796186⟩,⟨-261758573350442302161418341056690378813378188123796078369,-261758573350442302161418341056690378813378188123709509095⟩⟩, + ⟨⟨106389767322765943563696208452460198172501066708610604109,106389767322765943563696208452460198172501066708721804874⟩,⟨-687771373059566814587246892915754293224232322219347750898,-687771373059566814587246892915754293224232322219235499704⟩⟩, + ⟨⟨1081668676195856571847431161362203284158405824792169451233,1081668676195856571847431161362203284158405824792414095436⟩,⟨-421047424900099243990097484854607075235325269352717505870,-421047424900099243990097484854607075235325269352473384187⟩⟩, + ⟨⟨1426192747795474066068911124829268572199662952732949592035,1426192747795474066068911124829268572199662952733441704261⟩,⟨1205032846769061214977672137592081396795923685816923831925,1205032846769061214977672137592081396795923685817414814664⟩⟩, + ⟨⟨-648023722651860191229022637893818486070370373009582188030,-648023722651860191229022637893818486070370373008922262560⟩,⟨2835826651695781208562395803439995757488582108084702885476,2835826651695781208562395803439995757488582108085365849733⟩⟩, + ⟨⟨-4284208540190672752342582794498626090685409850075356742796,-4284208540190672752342582794498626090685409850074013114794⟩,⟨1026599155448071215300274596267479900555382526301681451400,1026599155448071215300274596267479900555382526303022291060⟩⟩, + ⟨⟨-4096642036271584894737968142576372767717484140090680718771,-4096642036271584894737968142576372767717484140088914502961⟩,⟨-5054312393529096537111386038655043607583237512378855449932,-5054312393529096537111386038655043607583237512377088090984⟩⟩] +lemma tw1_0_3_4_calc (j : Fin 31) : taylorWaveBox 1 0 3 4 j = tw1_0_3_4 j := by + revert j + decide +kernel +def tw1_0_3_5 : Fin 31 → CI := ![⟨⟨2258022144117614270407967533342126021259141827517188987463,2258022144117614270407967533342126021259141827517857691423⟩,⟨1078466519198549702853548751277508574710323744087359306954,1078466519198549702853548751277508574710323744088025755042⟩⟩, + ⟨⟨26198952107894906129828830317057080069741997320803027900,26198952107894906129828830317057080069741997321345483349⟩,⟨1587618222080231012979221640851601959960891722833343363832,1587618222080231012979221640851601959960891722833889317765⟩⟩, + ⟨⟨-861017322591388268875175669942549543489493724380783036358,-861017322591388268875175669942549543489493724380510674119⟩,⟨464588803147719881427358644416065625146957137279965540170,464588803147719881427358644416065625146957137280235518472⟩⟩, + ⟨⟨-488559746330216034231752209628991506308953260923841905427,-488559746330216034231752209628991506308953260923660758521⟩,⟨-318552376900388456596103718964318872407256549883656402887,-318552376900388456596103718964318872407256549883474642595⟩⟩, + ⟨⟨18388650359930254999732694532414878765953910851629519321,18388650359930254999732694532414878765953910851710596697⟩,⟨-334458097008497504907848507704662356709772709522474351684,-334458097008497504907848507704662356709772709522393140429⟩⟩, + ⟨⟨161934404828214422659025725486991536316572864520210033992,161934404828214422659025725486991536316572864520243278852⟩,⟨-88260667373136268594444528568042841075920465085921494715,-88260667373136268594444528568042841075920465085888489085⟩⟩, + ⟨⟨85950042080805109643282646509888366027195401209649960516,85950042080805109643282646509888366027195401209671331779⟩,⟨44533494341263185137987600801101700914077953366967356908,44533494341263185137987600801101700914077953366988859595⟩⟩, + ⟨⟨8023563222808826257399513503392964903290942132900825529,8023563222808826257399513503392964903290942132909971024⟩,⟨47467289026727548118508085841145867886206941793560364845,47467289026727548118508085841145867886206941793569496998⟩⟩, + ⟨⟨-14333988438817282639850130592592679311377131518859542792,-14333988438817282639850130592592679311377131518854933073⟩,⟨17396423441179506010685650073275768013833971469791778643,17396423441179506010685650073275768013833971469796389030⟩⟩, + ⟨⟨-9817741277201803755327317138744435709070022418616249819,-9817741277201803755327317138744435709070022418614254304⟩,⟨1161362633530614396811551590074070473934944252430579653,1161362633530614396811551590074070473934944252432571035⟩⟩, + ⟨⟨-3523407398396991278989338834805282038895118675765283463,-3523407398396991278989338834805282038895118675764731120⟩,⟨-2011573890101854645369061774238377073833626640173514413,-2011573890101854645369061774238377073833626640172961056⟩⟩, + ⟨⟨-877875924578042872025033729333677149152822531974365170,-877875924578042872025033729333677149152822531974114682⟩,⟨-1305900791293171423216835165662729522123586210319615580,-1305900791293171423216835165662729522123586210319364919⟩⟩, + ⟨⟨-217614844448684771012811965281104454501480307666611180,-217614844448684771012811965281104454501480307666526760⟩,⟨-556402100692609083337452061895868566481008970514177894,-556402100692609083337452061895868566481008970514093411⟩⟩, + ⟨⟨-108364719722187257531747943821956369330788574584223218,-108364719722187257531747943821956369330788574584194146⟩,⟨-216231801617490168717730472119474487408086606481444842,-216231801617490168717730472119474487408086606481415748⟩⟩, + ⟨⟨-95544740929402017052943598427182106571337338493151581,-95544740929402017052943598427182106571337338493142964⟩,⟨-76460323617157805723526535181820746188184342447196945,-76460323617157805723526535181820746188184342447188463⟩⟩, + ⟨⟨-94341254438477503188613632493810494803250108089326239,-94341254438477503188613632493810494803250108089322804⟩,⟨-1,1⟩⟩, + ⟨⟨-95544740929402017052943598427182106571337338493151581,-95544740929402017052943598427182106571337338493142964⟩,⟨76460323617157805723526535181820746188184342447188463,76460323617157805723526535181820746188184342447196945⟩⟩, + ⟨⟨-108364719722187257531747943821956369330788574584223218,-108364719722187257531747943821956369330788574584194146⟩,⟨216231801617490168717730472119474487408086606481415748,216231801617490168717730472119474487408086606481444842⟩⟩, + ⟨⟨-217614844448684771012811965281104454501480307666611180,-217614844448684771012811965281104454501480307666526760⟩,⟨556402100692609083337452061895868566481008970514093411,556402100692609083337452061895868566481008970514177894⟩⟩, + ⟨⟨-877875924578042872025033729333677149152822531974365170,-877875924578042872025033729333677149152822531974114682⟩,⟨1305900791293171423216835165662729522123586210319364919,1305900791293171423216835165662729522123586210319615580⟩⟩, + ⟨⟨-3523407398396991278989338834805282038895118675765283463,-3523407398396991278989338834805282038895118675764731120⟩,⟨2011573890101854645369061774238377073833626640172961056,2011573890101854645369061774238377073833626640173514413⟩⟩, + ⟨⟨-9817741277201803755327317138744435709070022418616249819,-9817741277201803755327317138744435709070022418614254304⟩,⟨-1161362633530614396811551590074070473934944252432571035,-1161362633530614396811551590074070473934944252430579654⟩⟩, + ⟨⟨-14333988438817282639850130592592679311377131518859542792,-14333988438817282639850130592592679311377131518854933073⟩,⟨-17396423441179506010685650073275768013833971469796389030,-17396423441179506010685650073275768013833971469791778643⟩⟩, + ⟨⟨8023563222808826257399513503392964903290942132900825529,8023563222808826257399513503392964903290942132909971025⟩,⟨-47467289026727548118508085841145867886206941793569496998,-47467289026727548118508085841145867886206941793560364845⟩⟩, + ⟨⟨85950042080805109643282646509888366027195401209649960516,85950042080805109643282646509888366027195401209671331779⟩,⟨-44533494341263185137987600801101700914077953366988859594,-44533494341263185137987600801101700914077953366967356907⟩⟩, + ⟨⟨161934404828214422659025725486991536316572864520210033990,161934404828214422659025725486991536316572864520243278853⟩,⟨88260667373136268594444528568042841075920465085888489086,88260667373136268594444528568042841075920465085921494717⟩⟩, + ⟨⟨18388650359930254999732694532414878765953910851629519317,18388650359930254999732694532414878765953910851710596697⟩,⟨334458097008497504907848507704662356709772709522393140427,334458097008497504907848507704662356709772709522474351686⟩⟩, + ⟨⟨-488559746330216034231752209628991506308953260923841905431,-488559746330216034231752209628991506308953260923660758521⟩,⟨318552376900388456596103718964318872407256549883474642590,318552376900388456596103718964318872407256549883656402886⟩⟩, + ⟨⟨-861017322591388268875175669942549543489493724380783036360,-861017322591388268875175669942549543489493724380510674110⟩,⟨-464588803147719881427358644416065625146957137280235518484,-464588803147719881427358644416065625146957137279965540171⟩⟩, + ⟨⟨26198952107894906129828830317057080069741997320803027905,26198952107894906129828830317057080069741997321345483367⟩,⟨-1587618222080231012979221640851601959960891722833889317771,-1587618222080231012979221640851601959960891722833343363825⟩⟩, + ⟨⟨2258022144117614270407967533342126021259141827517188987473,2258022144117614270407967533342126021259141827517857691427⟩,⟨-1078466519198549702853548751277508574710323744088025755022,-1078466519198549702853548751277508574710323744087359306939⟩⟩] +lemma tw1_0_3_5_calc (j : Fin 31) : taylorWaveBox 1 0 3 5 j = tw1_0_3_5 j := by + revert j + decide +kernel +def tw1_0_3_6 : Fin 31 → CI := ![⟨⟨175582698620000684481606392395945661950809130477759078377,175582698620000684481606392395945661950809130478025343256⟩,⟨-823638581055060731464825090994209998870347321455589583260,-823638581055060731464825090994209998870347321455322096599⟩⟩, + ⟨⟨482852730812427140271749575018320869959730204748776335676,482852730812427140271749575018320869959730204748975037667⟩,⟨-132693258139777374605857760915853480499936972888764128971,-132693258139777374605857760915853480499936972888566954870⟩⟩, + ⟨⟨199388961977613462842407482684109336474177784424100923502,199388961977613462842407482684109336474177784424190437232⟩,⟨207709572661071774476228710590703139490987466214058578815,207709572661071774476228710590703139490987466214148913366⟩⟩, + ⟨⟨-45025424506718119506302085038260047509662566551563972370,-45025424506718119506302085038260047509662566551509632648⟩,⟨152923687668903986486664112909338261303699780634663499022,152923687668903986486664112909338261303699780634717665279⟩⟩, + ⟨⟨-81708422509856786892493021700173365734018235784885145548,-81708422509856786892493021700173365734018235784863208303⟩,⟨21855318222929133549568005819568947039830484289314869144,21855318222929133549568005819568947039830484289336787654⟩⟩, + ⟨⟨-31973788985153381013785865461341380576811762997515210698,-31973788985153381013785865461341380576811762997507191905⟩,⟨-28396630100862372380562419666787442321012892702898657848,-28396630100862372380562419666787442321012892702890614247⟩⟩, + ⟨⟨1993630646904917727403635094051677408622554978455464471,1993630646904917727403635094051677408622554978459640281⟩,⟨-20373903765079308678226472296308982430316206124868815672,-20373903765079308678226472296308982430316206124864639814⟩⟩, + ⟨⟨7654435623211967647165523395675513345475666206561848144,7654435623211967647165523395675513345475666206563859768⟩,⟨-5128448122104180905225343916618324180813819801324030333,-5128448122104180905225343916618324180813819801322024130⟩⟩, + ⟨⟨3782506406698149327767764376584119244797809493576061110,3782506406698149327767764376584119244797809493577068604⟩,⟨822721913462759224461027490669130341456716715289815572,822721913462759224461027490669130341456716715290823634⟩⟩, + ⟨⟨923105610018122906969613334594036827288949063879645405,923105610018122906969613334594036827288949063879987471⟩,⟨1193926120029599017391587342689549561676549049794595427,1193926120029599017391587342689549561676549049794937721⟩⟩, + ⟨⟨57299097901273234919508521367312740032993368598158697,57299097901273234919508521367312740032993368598249461⟩,⟨542332768827144939952253200567839536960113902702288091,542332768827144939952253200567839536960113902702379034⟩⟩, + ⟨⟨-45013128676882526730471344105110531992957617106427299,-45013128676882526730471344105110531992957617106391319⟩,⟨179174334845474431904108288457901251082034969628525467,179174334845474431904108288457901251082034969628561427⟩⟩, + ⟨⟨-19325002417069597777141455713818119276837852794160220,-19325002417069597777141455713818119276837852794148369⟩,⟨57942577062613929194468137683373148717052222003201500,57942577062613929194468137683373148717052222003213358⟩⟩, + ⟨⟨-923947029672497803893570744896319372209782995203348,-923947029672497803893570744896319372209782995199976⟩,⟨21711108866232323626559759767046202202731006971430248,21711108866232323626559759767046202202731006971433615⟩⟩, + ⟨⟨5835960911999005202619076663312448415380909284448917,5835960911999005202619076663312448415380909284449781⟩,⟨8089642664397843578648929073333400459248739095745186,8089642664397843578648929073333400459248739095746032⟩⟩, + ⟨⟨7409544796859159962475763415755363191163967399609586,7409544796859159962475763415755363191163967399609880⟩,⟨-1,1⟩⟩, + ⟨⟨5835960911999005202619076663312448415380909284448917,5835960911999005202619076663312448415380909284449781⟩,⟨-8089642664397843578648929073333400459248739095746032,-8089642664397843578648929073333400459248739095745186⟩⟩, + ⟨⟨-923947029672497803893570744896319372209782995203348,-923947029672497803893570744896319372209782995199976⟩,⟨-21711108866232323626559759767046202202731006971433615,-21711108866232323626559759767046202202731006971430248⟩⟩, + ⟨⟨-19325002417069597777141455713818119276837852794160220,-19325002417069597777141455713818119276837852794148369⟩,⟨-57942577062613929194468137683373148717052222003213358,-57942577062613929194468137683373148717052222003201500⟩⟩, + ⟨⟨-45013128676882526730471344105110531992957617106427299,-45013128676882526730471344105110531992957617106391319⟩,⟨-179174334845474431904108288457901251082034969628561427,-179174334845474431904108288457901251082034969628525467⟩⟩, + ⟨⟨57299097901273234919508521367312740032993368598158697,57299097901273234919508521367312740032993368598249461⟩,⟨-542332768827144939952253200567839536960113902702379034,-542332768827144939952253200567839536960113902702288091⟩⟩, + ⟨⟨923105610018122906969613334594036827288949063879645405,923105610018122906969613334594036827288949063879987471⟩,⟨-1193926120029599017391587342689549561676549049794937721,-1193926120029599017391587342689549561676549049794595427⟩⟩, + ⟨⟨3782506406698149327767764376584119244797809493576061111,3782506406698149327767764376584119244797809493577068604⟩,⟨-822721913462759224461027490669130341456716715290823634,-822721913462759224461027490669130341456716715289815572⟩⟩, + ⟨⟨7654435623211967647165523395675513345475666206561848144,7654435623211967647165523395675513345475666206563859768⟩,⟨5128448122104180905225343916618324180813819801322024130,5128448122104180905225343916618324180813819801324030333⟩⟩, + ⟨⟨1993630646904917727403635094051677408622554978455464471,1993630646904917727403635094051677408622554978459640281⟩,⟨20373903765079308678226472296308982430316206124864639814,20373903765079308678226472296308982430316206124868815672⟩⟩, + ⟨⟨-31973788985153381013785865461341380576811762997515210699,-31973788985153381013785865461341380576811762997507191905⟩,⟨28396630100862372380562419666787442321012892702890614246,28396630100862372380562419666787442321012892702898657848⟩⟩, + ⟨⟨-81708422509856786892493021700173365734018235784885145549,-81708422509856786892493021700173365734018235784863208303⟩,⟨-21855318222929133549568005819568947039830484289336787655,-21855318222929133549568005819568947039830484289314869144⟩⟩, + ⟨⟨-45025424506718119506302085038260047509662566551563972370,-45025424506718119506302085038260047509662566551509632646⟩,⟨-152923687668903986486664112909338261303699780634717665280,-152923687668903986486664112909338261303699780634663499022⟩⟩, + ⟨⟨199388961977613462842407482684109336474177784424100923502,199388961977613462842407482684109336474177784424190437235⟩,⟨-207709572661071774476228710590703139490987466214148913366,-207709572661071774476228710590703139490987466214058578812⟩⟩, + ⟨⟨482852730812427140271749575018320869959730204748776335673,482852730812427140271749575018320869959730204748975037668⟩,⟨132693258139777374605857760915853480499936972888566954871,132693258139777374605857760915853480499936972888764128977⟩⟩, + ⟨⟨175582698620000684481606392395945661950809130477759078372,175582698620000684481606392395945661950809130478025343248⟩,⟨823638581055060731464825090994209998870347321455322096601,823638581055060731464825090994209998870347321455589583260⟩⟩] +lemma tw1_0_3_6_calc (j : Fin 31) : taylorWaveBox 1 0 3 6 j = tw1_0_3_6 j := by + revert j + decide +kernel +def tw1_0_3_7 : Fin 31 → CI := ![⟨⟨-251844736232907020288909055762069244782074861939230698013,-251844736232907020288909055762069244782074861939140970012⟩,⟨6425883669194739071868481359777762015902511637742963539,6425883669194739071868481359777762015902511637832288705⟩⟩, + ⟨⟨-69735123704502400201384328178204225030602820046498168081,-69735123704502400201384328178204225030602820046438209624⟩,⟨-121828684522068693395918399960744237370128134346455269103,-121828684522068693395918399960744237370128134346394880204⟩⟩, + ⟨⟨38444254597648923297398020952883296482789708795579614651,38444254597648923297398020952883296482789708795604681036⟩,⟨-64767441970451977040406021626436818074059916743908351952,-64767441970451977040406021626436818074059916743883473861⟩⟩, + ⟨⟨38730325673852523169747562619574361100376231615424465405,38730325673852523169747562619574361100376231615438017128⟩,⟨-198195353116974883932979188422620205696419969695247646,-198195353116974883932979188422620205696419969681664272⟩⟩, + ⟨⟨10366457200601181654221523429879887924611552546333806550,10366457200601181654221523429879887924611552546338786665⟩,⟨15904089833404136187152683942183333584330597903781712312,15904089833404136187152683942183333584330597903786691764⟩⟩, + ⟨⟨-3274638339606685061200031656056524080869203146765930351,-3274638339606685061200031656056524080869203146764283626⟩,⟨8182990901688609819096790418744223183211173637211729920,8182990901688609819096790418744223183211173637213380322⟩⟩, + ⟨⟨-3695098697279653745920814008912429053978054360277935063,-3695098697279653745920814008912429053978054360276994393⟩,⟨1074412620168859850972776393872023833700670066969981161,1074412620168859850972776393872023833700670066970915700⟩⟩, + ⟨⟨-1330009796014088560357255673820040530612776957475883492,-1330009796014088560357255673820040530612776957475460961⟩,⟨-829478814623962402490314590996909860017912755934789402,-829478814623962402490314590996909860017912755934365277⟩⟩, + ⟨⟨-152386048067948416661336954630431418048364422154131447,-152386048067948416661336954630431418048364422153958567⟩,⟨-570903864231417404350632831477723866105341732837984333,-570903864231417404350632831477723866105341732837811556⟩⟩, + ⟨⟨74474683180062156564941054134210420627539151628139737,74474683180062156564941054134210420627539151628192509⟩,⟨-190759982203290072207291034686594096125977555755205921,-190759982203290072207291034686594096125977555755153099⟩⟩, + ⟨⟨48585837541083866956817470405260381168246552912273860,48585837541083866956817470405260381168246552912288203⟩,⟨-43417847145518174609507472992394580676855816847727141,-43417847145518174609507472992394580676855816847712828⟩⟩, + ⟨⟨17041096222027845754019185598061259992065397841693370,17041096222027845754019185598061259992065397841698014⟩,⟨-9017051414561875635414294325019680449814083980707910,-9017051414561875635414294325019680449814083980703268⟩⟩, + ⟨⟨4720102169978766596549392568674450177379651074146666,4720102169978766596549392568674450177379651074147973⟩,⟨-2920871920220207618498625395698677621314427728703023,-2920871920220207618498625395698677621314427728701716⟩⟩, + ⟨⟨906571079959865513073495251302838285376076189384036,906571079959865513073495251302838285376076189384367⟩,⟨-1479885963050289103970350280182232600406146254580848,-1479885963050289103970350280182232600406146254580517⟩⟩, + ⟨⟨-250548154168795838669769821653804009713652341480245,-250548154168795838669769821653804009713652341480169⟩,⟨-677937746916500248990426360500081997942214892618883,-677937746916500248990426360500081997942214892618809⟩⟩, + ⟨⟨-517283811116826974114204602113594025091019010312672,-517283811116826974114204602113594025091019010312649⟩,⟨-1,1⟩⟩, + ⟨⟨-250548154168795838669769821653804009713652341480245,-250548154168795838669769821653804009713652341480169⟩,⟨677937746916500248990426360500081997942214892618809,677937746916500248990426360500081997942214892618883⟩⟩, + ⟨⟨906571079959865513073495251302838285376076189384036,906571079959865513073495251302838285376076189384367⟩,⟨1479885963050289103970350280182232600406146254580517,1479885963050289103970350280182232600406146254580848⟩⟩, + ⟨⟨4720102169978766596549392568674450177379651074146666,4720102169978766596549392568674450177379651074147973⟩,⟨2920871920220207618498625395698677621314427728701716,2920871920220207618498625395698677621314427728703023⟩⟩, + ⟨⟨17041096222027845754019185598061259992065397841693370,17041096222027845754019185598061259992065397841698014⟩,⟨9017051414561875635414294325019680449814083980703268,9017051414561875635414294325019680449814083980707910⟩⟩, + ⟨⟨48585837541083866956817470405260381168246552912273860,48585837541083866956817470405260381168246552912288203⟩,⟨43417847145518174609507472992394580676855816847712828,43417847145518174609507472992394580676855816847727141⟩⟩, + ⟨⟨74474683180062156564941054134210420627539151628139737,74474683180062156564941054134210420627539151628192509⟩,⟨190759982203290072207291034686594096125977555755153099,190759982203290072207291034686594096125977555755205921⟩⟩, + ⟨⟨-152386048067948416661336954630431418048364422154131447,-152386048067948416661336954630431418048364422153958567⟩,⟨570903864231417404350632831477723866105341732837811556,570903864231417404350632831477723866105341732837984333⟩⟩, + ⟨⟨-1330009796014088560357255673820040530612776957475883492,-1330009796014088560357255673820040530612776957475460961⟩,⟨829478814623962402490314590996909860017912755934365277,829478814623962402490314590996909860017912755934789402⟩⟩, + ⟨⟨-3695098697279653745920814008912429053978054360277935063,-3695098697279653745920814008912429053978054360276994393⟩,⟨-1074412620168859850972776393872023833700670066970915700,-1074412620168859850972776393872023833700670066969981161⟩⟩, + ⟨⟨-3274638339606685061200031656056524080869203146765930351,-3274638339606685061200031656056524080869203146764283626⟩,⟨-8182990901688609819096790418744223183211173637213380322,-8182990901688609819096790418744223183211173637211729920⟩⟩, + ⟨⟨10366457200601181654221523429879887924611552546333806550,10366457200601181654221523429879887924611552546338786665⟩,⟨-15904089833404136187152683942183333584330597903786691764,-15904089833404136187152683942183333584330597903781712312⟩⟩, + ⟨⟨38730325673852523169747562619574361100376231615424465405,38730325673852523169747562619574361100376231615438017128⟩,⟨198195353116974883932979188422620205696419969681664272,198195353116974883932979188422620205696419969695247646⟩⟩, + ⟨⟨38444254597648923297398020952883296482789708795579614650,38444254597648923297398020952883296482789708795604681036⟩,⟨64767441970451977040406021626436818074059916743883473861,64767441970451977040406021626436818074059916743908351953⟩⟩, + ⟨⟨-69735123704502400201384328178204225030602820046498168082,-69735123704502400201384328178204225030602820046438209624⟩,⟨121828684522068693395918399960744237370128134346394880203,121828684522068693395918399960744237370128134346455269103⟩⟩, + ⟨⟨-251844736232907020288909055762069244782074861939230698013,-251844736232907020288909055762069244782074861939140970013⟩,⟨-6425883669194739071868481359777762015902511637832288706,-6425883669194739071868481359777762015902511637742963541⟩⟩] +lemma tw1_0_3_7_calc (j : Fin 31) : taylorWaveBox 1 0 3 7 j = tw1_0_3_7 j := by + revert j + decide +kernel +def tw1_0_3_8 : Fin 31 → CI := ![⟨⟨17506163874554933073026088178398788423353393657314672299,17506163874554933073026088178398788423353393657340484029⟩,⟨65529047587654029846687804015497772012015118952340737772,65529047587654029846687804015497772012015118952366645934⟩⟩, + ⟨⟨-25386776309424939634698212229486349381417816009408587038,-25386776309424939634698212229486349381417816009392889181⟩,⟨24694227186828361331257315285691956486972474281092127144,24694227186828361331257315285691956486972474281107739025⟩⟩, + ⟨⟨-17110790192557952329478249570005042058031162436865766496,-17110790192557952329478249570005042058031162436859839537⟩,⟨-4653266277927737468824867104625290592875061947708440115,-4653266277927737468824867104625290592875061947702485161⟩⟩, + ⟨⟨-2475008069850833118970543297475131201991261392014482298,-2475008069850833118970543297475131201991261392011580070⟩,⟨-8099207459234457882283454012535196101700634890370294399,-8099207459234457882283454012535196101700634890367394989⟩⟩, + ⟨⟨2402022337681211181160378887170591971613553461199055181,2402022337681211181160378887170591971613553461200051386⟩,⟨-2989500344746305191622649107974493574910690966067593465,-2989500344746305191622649107974493574910690966066596055⟩⟩, + ⟨⟨1633952933969495394185417995865453849177909715065247582,1633952933969495394185417995865453849177909715065635672⟩,⟨57379726359027810612127131465676923971300907281615218,57379726359027810612127131465676923971300907282001065⟩⟩, + ⟨⟨400938238155592061728392148442644065245185179851164151,400938238155592061728392148442644065245185179851353588⟩,⟨512917410194215755565875485970133977256913270584156907,512917410194215755565875485970133977256913270584347709⟩⟩, + ⟨⟨-32250111038616275422465418743967869882803097373509775,-32250111038616275422465418743967869882803097373436383⟩,⟨237822091200412208776184475027154195538745833002392224,237822091200412208776184475027154195538745833002465439⟩⟩, + ⟨⟨-60174367219981484848173406197037894179945514408424463,-60174367219981484848173406197037894179945514408398976⟩,⟨54488415625725218294788310865909829066364655656795594,54488415625725218294788310865909829066364655656821089⟩⟩, + ⟨⟨-24655720974097405266047377546239134176510179627037500,-24655720974097405266047377546239134176510179627028904⟩,⟨4186832588545162094806968582011863422856660955405127,4186832588545162094806968582011863422856660955413713⟩⟩, + ⟨⟨-6841660139836093875164832067996631827257879049924464,-6841660139836093875164832067996631827257879049922603⟩,⟨-1511890382114006688407128485878189531871285551550638,-1511890382114006688407128485878189531871285551548778⟩⟩, + ⟨⟨-1700232598027656798761875046242788854871124628448669,-1700232598027656798761875046242788854871124628448092⟩,⟨-623134899273629395804910300966516351964205852533960,-623134899273629395804910300966516351964205852533384⟩⟩, + ⟨⟨-449509262138645974764740687588081316841691915531383,-449509262138645974764740687588081316841691915531231⟩,⟨-63620176357165239399704878574766975286090304502204,-63620176357165239399704878574766975286090304502052⟩⟩, + ⟨⟨-108619306113726953291740168955426103762002937171559,-108619306113726953291740168955426103762002937171526⟩,⟨61338676896068016577620054025194117646983033091950,61338676896068016577620054025194117646983033091982⟩⟩, + ⟨⟨3910159002898473795360896293939827486796654294232,3910159002898473795360896293939827486796654294239⟩,⟨46968975131121717806729860786336721158201257936596,46968975131121717806729860786336721158201257936602⟩⟩, + ⟨⟨32501900416511076814245961415564366628224544539434,32501900416511076814245961415564366628224544539436⟩,⟨-1,1⟩⟩, + ⟨⟨3910159002898473795360896293939827486796654294232,3910159002898473795360896293939827486796654294239⟩,⟨-46968975131121717806729860786336721158201257936602,-46968975131121717806729860786336721158201257936596⟩⟩, + ⟨⟨-108619306113726953291740168955426103762002937171559,-108619306113726953291740168955426103762002937171526⟩,⟨-61338676896068016577620054025194117646983033091982,-61338676896068016577620054025194117646983033091950⟩⟩, + ⟨⟨-449509262138645974764740687588081316841691915531383,-449509262138645974764740687588081316841691915531231⟩,⟨63620176357165239399704878574766975286090304502052,63620176357165239399704878574766975286090304502204⟩⟩, + ⟨⟨-1700232598027656798761875046242788854871124628448669,-1700232598027656798761875046242788854871124628448092⟩,⟨623134899273629395804910300966516351964205852533384,623134899273629395804910300966516351964205852533960⟩⟩, + ⟨⟨-6841660139836093875164832067996631827257879049924464,-6841660139836093875164832067996631827257879049922603⟩,⟨1511890382114006688407128485878189531871285551548778,1511890382114006688407128485878189531871285551550638⟩⟩, + ⟨⟨-24655720974097405266047377546239134176510179627037500,-24655720974097405266047377546239134176510179627028904⟩,⟨-4186832588545162094806968582011863422856660955413713,-4186832588545162094806968582011863422856660955405127⟩⟩, + ⟨⟨-60174367219981484848173406197037894179945514408424463,-60174367219981484848173406197037894179945514408398976⟩,⟨-54488415625725218294788310865909829066364655656821089,-54488415625725218294788310865909829066364655656795594⟩⟩, + ⟨⟨-32250111038616275422465418743967869882803097373509775,-32250111038616275422465418743967869882803097373436383⟩,⟨-237822091200412208776184475027154195538745833002465439,-237822091200412208776184475027154195538745833002392224⟩⟩, + ⟨⟨400938238155592061728392148442644065245185179851164151,400938238155592061728392148442644065245185179851353588⟩,⟨-512917410194215755565875485970133977256913270584347709,-512917410194215755565875485970133977256913270584156907⟩⟩, + ⟨⟨1633952933969495394185417995865453849177909715065247582,1633952933969495394185417995865453849177909715065635672⟩,⟨-57379726359027810612127131465676923971300907282001065,-57379726359027810612127131465676923971300907281615218⟩⟩, + ⟨⟨2402022337681211181160378887170591971613553461199055181,2402022337681211181160378887170591971613553461200051386⟩,⟨2989500344746305191622649107974493574910690966066596055,2989500344746305191622649107974493574910690966067593465⟩⟩, + ⟨⟨-2475008069850833118970543297475131201991261392014482298,-2475008069850833118970543297475131201991261392011580070⟩,⟨8099207459234457882283454012535196101700634890367394989,8099207459234457882283454012535196101700634890370294399⟩⟩, + ⟨⟨-17110790192557952329478249570005042058031162436865766496,-17110790192557952329478249570005042058031162436859839537⟩,⟨4653266277927737468824867104625290592875061947702485161,4653266277927737468824867104625290592875061947708440115⟩⟩, + ⟨⟨-25386776309424939634698212229486349381417816009408587038,-25386776309424939634698212229486349381417816009392889181⟩,⟨-24694227186828361331257315285691956486972474281107739026,-24694227186828361331257315285691956486972474281092127144⟩⟩, + ⟨⟨17506163874554933073026088178398788423353393657314672300,17506163874554933073026088178398788423353393657340484030⟩,⟨-65529047587654029846687804015497772012015118952366645934,-65529047587654029846687804015497772012015118952340737772⟩⟩] +lemma tw1_0_3_8_calc (j : Fin 31) : taylorWaveBox 1 0 3 8 j = tw1_0_3_8 j := by + revert j + decide +kernel +def tw1_0_3_9 : Fin 31 → CI := ![⟨⟨14595927113720308244626559850120393636105753081953487813,14595927113720308244626559850120393636105753081960046971⟩,⟨-7909467704574786027174780634149669320146600133366508782,-7909467704574786027174780634149669320146600133359966071⟩⟩, + ⟨⟨6935487443708601162869809751887309952550049087469695162,6935487443708601162869809751887309952550049087473231934⟩,⟨4228705098736630003813189276911919914432803351178190673,4228705098736630003813189276911919914432803351181738041⟩⟩, + ⟨⟨17554570488126939056660177323523362667483868569289308,17554570488126939056660177323523362667483868570521063⟩,⟨3795171352085344195370892725057807581825600063788282539,3795171352085344195370892725057807581825600063789513261⟩⟩, + ⟨⟨-1400713363811210808279678592533873831183384852302900947,-1400713363811210808279678592533873831183384852302318796⟩,⟨933866082785940573476371569077054847307577784874289288,933866082785940573476371569077054847307577784874870940⟩⟩, + ⟨⟨-658969435140883644471253807674494085599863076047657792,-658969435140883644471253807674494085599863076047425944⟩,⟨-248472124608806530990063119591240686970487834357478169,-248472124608806530990063119591240686970487834357246633⟩⟩, + ⟨⟨-84226944713469974996720720913415758041816016262475091,-84226944713469974996720720913415758041816016262396080⟩,⟨-262530781581620223605756546168454636716055577965411255,-262530781581620223605756546168454636716055577965331825⟩⟩, + ⟨⟨50342896288696070893017448291152803787603145907464378,50342896288696070893017448291152803787603145907496733⟩,⟨-86551620483573784108104509443711280040199181334431467,-86551620483573784108104509443711280040199181334399259⟩⟩, + ⟨⟨32029602219755321269594817528581134362081303519515742,32029602219755321269594817528581134362081303519526694⟩,⟨-9490761561336871740231452992957130145648042051627084,-9490761561336871740231452992957130145648042051616130⟩⟩, + ⟨⟨9488984361729441353297262819069177190939299822707237,9488984361729441353297262819069177190939299822711517⟩,⟨3570979734853867696175737312550150915737926866822844,3570979734853867696175737312550150915737926866827125⟩⟩, + ⟨⟨1806917019111949462821574350419008779468830313770509,1806917019111949462821574350419008779468830313771670⟩,⟨2108067829696784786724211923447021958310065477564946,2108067829696784786724211923447021958310065477566107⟩⟩, + ⟨⟨270851690170655254500878063874040753562831501679210,270851690170655254500878063874040753562831501679464⟩,⟨629129411875114614379550977166789840889910995319243,629129411875114614379550977166789840889910995319497⟩⟩, + ⟨⟨57568856437744792428008894301534457377024399006791,57568856437744792428008894301534457377024399006855⟩,⟨143501225433044030040379628109248095393165445583685,143501225433044030040379628109248095393165445583749⟩⟩, + ⟨⟨22647595698828017762109237815217459553973480017917,22647595698828017762109237815217459553973480017933⟩,⟨25030566818967388317349472753279015834420169806679,25030566818967388317349472753279015834420169806695⟩⟩, + ⟨⟨8150796385277123056134268518553517061342775115848,8150796385277123056134268518553517061342775115852⟩,⟨-56812444108928899219767468524125296426063728663,-56812444108928899219767468524125296426063728660⟩⟩, + ⟨⟨521891569425393300516695127809571372733564401735,521891569425393300516695127809571372733564401736⟩,⟨-2744902630225955048779924052401712094417938133470,-2744902630225955048779924052401712094417938133468⟩⟩, + ⟨⟨-1856504210476695271192693889943772958221036809183,-1856504210476695271192693889943772958221036809182⟩,⟨-1,1⟩⟩, + ⟨⟨521891569425393300516695127809571372733564401735,521891569425393300516695127809571372733564401736⟩,⟨2744902630225955048779924052401712094417938133468,2744902630225955048779924052401712094417938133470⟩⟩, + ⟨⟨8150796385277123056134268518553517061342775115848,8150796385277123056134268518553517061342775115852⟩,⟨56812444108928899219767468524125296426063728660,56812444108928899219767468524125296426063728663⟩⟩, + ⟨⟨22647595698828017762109237815217459553973480017917,22647595698828017762109237815217459553973480017933⟩,⟨-25030566818967388317349472753279015834420169806695,-25030566818967388317349472753279015834420169806679⟩⟩, + ⟨⟨57568856437744792428008894301534457377024399006791,57568856437744792428008894301534457377024399006855⟩,⟨-143501225433044030040379628109248095393165445583749,-143501225433044030040379628109248095393165445583685⟩⟩, + ⟨⟨270851690170655254500878063874040753562831501679210,270851690170655254500878063874040753562831501679464⟩,⟨-629129411875114614379550977166789840889910995319497,-629129411875114614379550977166789840889910995319243⟩⟩, + ⟨⟨1806917019111949462821574350419008779468830313770509,1806917019111949462821574350419008779468830313771670⟩,⟨-2108067829696784786724211923447021958310065477566107,-2108067829696784786724211923447021958310065477564946⟩⟩, + ⟨⟨9488984361729441353297262819069177190939299822707237,9488984361729441353297262819069177190939299822711517⟩,⟨-3570979734853867696175737312550150915737926866827125,-3570979734853867696175737312550150915737926866822844⟩⟩, + ⟨⟨32029602219755321269594817528581134362081303519515742,32029602219755321269594817528581134362081303519526694⟩,⟨9490761561336871740231452992957130145648042051616130,9490761561336871740231452992957130145648042051627084⟩⟩, + ⟨⟨50342896288696070893017448291152803787603145907464378,50342896288696070893017448291152803787603145907496733⟩,⟨86551620483573784108104509443711280040199181334399259,86551620483573784108104509443711280040199181334431467⟩⟩, + ⟨⟨-84226944713469974996720720913415758041816016262475091,-84226944713469974996720720913415758041816016262396080⟩,⟨262530781581620223605756546168454636716055577965331825,262530781581620223605756546168454636716055577965411255⟩⟩, + ⟨⟨-658969435140883644471253807674494085599863076047657792,-658969435140883644471253807674494085599863076047425944⟩,⟨248472124608806530990063119591240686970487834357246633,248472124608806530990063119591240686970487834357478169⟩⟩, + ⟨⟨-1400713363811210808279678592533873831183384852302900947,-1400713363811210808279678592533873831183384852302318796⟩,⟨-933866082785940573476371569077054847307577784874870940,-933866082785940573476371569077054847307577784874289288⟩⟩, + ⟨⟨17554570488126939056660177323523362667483868569289308,17554570488126939056660177323523362667483868570521063⟩,⟨-3795171352085344195370892725057807581825600063789513261,-3795171352085344195370892725057807581825600063788282539⟩⟩, + ⟨⟨6935487443708601162869809751887309952550049087469695162,6935487443708601162869809751887309952550049087473231935⟩,⟨-4228705098736630003813189276911919914432803351181738041,-4228705098736630003813189276911919914432803351178190673⟩⟩, + ⟨⟨14595927113720308244626559850120393636105753081953487813,14595927113720308244626559850120393636105753081960046970⟩,⟨7909467704574786027174780634149669320146600133359966071,7909467704574786027174780634149669320146600133366508782⟩⟩] +lemma tw1_0_3_9_calc (j : Fin 31) : taylorWaveBox 1 0 3 9 j = tw1_0_3_9 j := by + revert j + decide +kernel +def tw1_0_3_10 : Fin 31 → CI := ![⟨⟨-2489819125608948864150790695115331522194655306869485251,-2489819125608948864150790695115331522194655306868009454⟩,⟨-2770198558369187883084447393732106028500225254984303419,-2770198558369187883084447393732106028500225254982826225⟩⟩, + ⟨⟨497915042432651236869129832737340865405498941107334904,497915042432651236869129832737340865405498941108040071⟩,⟨-1633630544313278047587128432384213188652062724388197595,-1633630544313278047587128432384213188652062724387492190⟩⟩, + ⟨⟨716661732360547008350216117138862645588316231471622525,716661732360547008350216117138862645588316231471876531⟩,⟨-202033878729834467645189758345557647025264848452501068,-202033878729834467645189758345557647025264848452247998⟩⟩, + ⟨⟨236331559398738485899024583379158737071380883472493279,236331559398738485899024583379158737071380883472623834⟩,⟨195573486999958369541685060920780613973898117313625902,195573486999958369541685060920780613973898117313756744⟩⟩, + ⟨⟨-5249127237305000807030102552054671374458321753046440,-5249127237305000807030102552054671374458321753000127⟩,⟨118437511226024634878765861349400231216451658984792485,118437511226024634878765861349400231216451658984838844⟩⟩, + ⟨⟨-33773441874508812666412774922058309820572535203484401,-33773441874508812666412774922058309820572535203470144⟩,⟨25996392113844103517564826624122547106642293706200006,25996392113844103517564826624122547106642293706214219⟩⟩, + ⟨⟨-13965528513495310213245577143354600507669491316172428,-13965528513495310213245577143354600507669491316167663⟩,⟨-2058037463083563998021643334478810653384237146352395,-2058037463083563998021643334478810653384237146347628⟩⟩, + ⟨⟨-2781366302296752049036487679807499081293500441448442,-2781366302296752049036487679807499081293500441446635⟩,⟨-3229878332290959671364445409520590952141282433229812,-3229878332290959671364445409520590952141282433228001⟩⟩, + ⟨⟨-133277494958661836703491541172264889751074599165179,-133277494958661836703491541172264889751074599164571⟩,⟨-1153057843749765285032634777892163167351537885535969,-1153057843749765285032634777892163167351537885535361⟩⟩, + ⟨⟨89353668536425482820139571448914251980064587317361,89353668536425482820139571448914251980064587317511⟩,⟨-268061429919864098076813910949870931063816157628466,-268061429919864098076813910949870931063816157628316⟩⟩, + ⟨⟨31569820575609272237683110504717613376406859089780,31569820575609272237683110504717613376406859089811⟩,⟨-52638029717025023489064380330954525007048944452922,-52638029717025023489064380330954525007048944452891⟩⟩, + ⟨⟨5334264607171071444878049488508723516677010151977,5334264607171071444878049488508723516677010151985⟩,⟨-10862926898181667456639703802127033554866155066725,-10862926898181667456639703802127033554866155066717⟩⟩, + ⟨⟨-93660826236604068028095189953573314028966398659,-93660826236604068028095189953573314028966398657⟩,⟨-2298785195406910622521073479345880627281717759465,-2298785195406910622521073479345880627281717759462⟩⟩, + ⟨⟨-428427307757890971497547497511552812846975976244,-428427307757890971497547497511552812846975976243⟩,⟨-234122363353811912924620360061919962274910645638,-234122363353811912924620360061919962274910645637⟩⟩, + ⟨⟨-67249169128033835365407355198140067661937116581,-67249169128033835365407355198140067661937116580⟩,⟨136132160444891281936697548195255917662141718456,136132160444891281936697548195255917662141718457⟩⟩, + ⟨⟨97206333149868418703589878141149256403619236501,97206333149868418703589878141149256403619236502⟩,⟨-1,1⟩⟩, + ⟨⟨-67249169128033835365407355198140067661937116581,-67249169128033835365407355198140067661937116580⟩,⟨-136132160444891281936697548195255917662141718457,-136132160444891281936697548195255917662141718456⟩⟩, + ⟨⟨-428427307757890971497547497511552812846975976244,-428427307757890971497547497511552812846975976243⟩,⟨234122363353811912924620360061919962274910645637,234122363353811912924620360061919962274910645638⟩⟩, + ⟨⟨-93660826236604068028095189953573314028966398659,-93660826236604068028095189953573314028966398657⟩,⟨2298785195406910622521073479345880627281717759462,2298785195406910622521073479345880627281717759465⟩⟩, + ⟨⟨5334264607171071444878049488508723516677010151977,5334264607171071444878049488508723516677010151985⟩,⟨10862926898181667456639703802127033554866155066717,10862926898181667456639703802127033554866155066725⟩⟩, + ⟨⟨31569820575609272237683110504717613376406859089780,31569820575609272237683110504717613376406859089811⟩,⟨52638029717025023489064380330954525007048944452891,52638029717025023489064380330954525007048944452922⟩⟩, + ⟨⟨89353668536425482820139571448914251980064587317361,89353668536425482820139571448914251980064587317511⟩,⟨268061429919864098076813910949870931063816157628316,268061429919864098076813910949870931063816157628466⟩⟩, + ⟨⟨-133277494958661836703491541172264889751074599165179,-133277494958661836703491541172264889751074599164571⟩,⟨1153057843749765285032634777892163167351537885535361,1153057843749765285032634777892163167351537885535969⟩⟩, + ⟨⟨-2781366302296752049036487679807499081293500441448442,-2781366302296752049036487679807499081293500441446635⟩,⟨3229878332290959671364445409520590952141282433228001,3229878332290959671364445409520590952141282433229812⟩⟩, + ⟨⟨-13965528513495310213245577143354600507669491316172428,-13965528513495310213245577143354600507669491316167663⟩,⟨2058037463083563998021643334478810653384237146347628,2058037463083563998021643334478810653384237146352395⟩⟩, + ⟨⟨-33773441874508812666412774922058309820572535203484401,-33773441874508812666412774922058309820572535203470144⟩,⟨-25996392113844103517564826624122547106642293706214219,-25996392113844103517564826624122547106642293706200006⟩⟩, + ⟨⟨-5249127237305000807030102552054671374458321753046440,-5249127237305000807030102552054671374458321753000127⟩,⟨-118437511226024634878765861349400231216451658984838844,-118437511226024634878765861349400231216451658984792485⟩⟩, + ⟨⟨236331559398738485899024583379158737071380883472493279,236331559398738485899024583379158737071380883472623834⟩,⟨-195573486999958369541685060920780613973898117313756744,-195573486999958369541685060920780613973898117313625902⟩⟩, + ⟨⟨716661732360547008350216117138862645588316231471622525,716661732360547008350216117138862645588316231471876531⟩,⟨202033878729834467645189758345557647025264848452247998,202033878729834467645189758345557647025264848452501068⟩⟩, + ⟨⟨497915042432651236869129832737340865405498941107334904,497915042432651236869129832737340865405498941108040071⟩,⟨1633630544313278047587128432384213188652062724387492190,1633630544313278047587128432384213188652062724388197595⟩⟩, + ⟨⟨-2489819125608948864150790695115331522194655306869485251,-2489819125608948864150790695115331522194655306868009454⟩,⟨2770198558369187883084447393732106028500225254982826225,2770198558369187883084447393732106028500225254984303419⟩⟩] +lemma tw1_0_3_10_calc (j : Fin 31) : taylorWaveBox 1 0 3 10 j = tw1_0_3_10 j := by + revert j + decide +kernel +def tw1_0_3_11 : Fin 31 → CI := ![⟨⟨-437535643990408459031559276250981306849579623796820953,-437535643990408459031559276250981306849579623796521262⟩,⟨635299870472453768878712044354536560472298551955009902,635299870472453768878712044354536560472298551955309867⟩⟩, + ⟨⟨-331120130323199210204637206455649780244953458883542670,-331120130323199210204637206455649780244953458883395143⟩,⟨-14630432357929829059957307861024752629282846308073696,-14630432357929829059957307861024752629282846307926743⟩⟩, + ⟨⟨-69899398205533647970090422301587072293248388215277391,-69899398205533647970090422301587072293248388215222074⟩,⟨-115316327770550175208109200894578418438690063828421687,-115316327770550175208109200894578418438690063828366034⟩⟩, + ⟨⟨20085896551305596982150021363550320388898496202530106,20085896551305596982150021363550320388898496202555674⟩,⟨-47527238964989698673403817283654781932145625519489490,-47527238964989698673403817283654781932145625519463981⟩⟩, + ⟨⟨17744755544392418654179509049106844056975982492428640,17744755544392418654179509049106844056975982492436859⟩,⟨-4949144783788313312794172522146919213788657137840517,-4949144783788313312794172522146919213788657137832302⟩⟩, + ⟨⟨5122518690652813369071483525952635661942784508574319,5122518690652813369071483525952635661942784508576627⟩,⟨3277827780551690759695564622690394092271452128770951,3277827780551690759695564622690394092271452128773260⟩⟩, + ⟨⟨426310974529321573862014695331899001425699487577343,426310974529321573862014695331899001425699487578088⟩,⟨1786931074285769699588184355281543102230988993745336,1786931074285769699588184355281543102230988993746083⟩⟩, + ⟨⟨-212475147579732445384986516934567839129759185586665,-212475147579732445384986516934567839129759185586396⟩,⟨454839414036206621719391923301990242338332697507705,454839414036206621719391923301990242338332697507973⟩⟩, + ⟨⟨-101921937611260317688787195539969133836405141201999,-101921937611260317688787195539969133836405141201921⟩,⟨68255137509721966781596917439914308197249723433390,68255137509721966781596917439914308197249723433467⟩⟩, + ⟨⟨-25911987593185110196988720485229144561896413553300,-25911987593185110196988720485229144561896413553280⟩,⟨5758232377509753836851999065894943664226410402705,5758232377509753836851999065894943664226410402725⟩⟩, + ⟨⟨-5059326907333206575510554663163432017023906100254,-5059326907333206575510554663163432017023906100250⟩,⟨424891063559826477294026921733912011925936662268,424891063559826477294026921733912011925936662272⟩⟩, + ⟨⟨-841182379346733341916108852150781049977158830074,-841182379346733341916108852150781049977158830073⟩,⟨238566080404047100429571799068625526164591291862,238566080404047100429571799068625526164591291864⟩⟩, + ⟨⟨-88060944688595501537137224024608550652614507866,-88060944688595501537137224024608550652614507865⟩,⟨114877694642559727798625761235722129721271307948,114877694642559727798625761235722129721271307949⟩⟩, + ⟨⟨14420361128338315748284776083181743546003234175,14420361128338315748284776083181743546003234176⟩,⟨22819443220560615605473415502945691347773236096,22819443220560615605473415502945691347773236097⟩⟩, + ⟨⟨5077957178053472299280951743428551274356601991,5077957178053472299280951743428551274356601992⟩,⟨-5676704986849873277685131557767240238348029386,-5676704986849873277685131557767240238348029385⟩⟩, + ⟨⟨-4698195417015824771437926871987376293206548832,-4698195417015824771437926871987376293206548831⟩,⟨-1,1⟩⟩, + ⟨⟨5077957178053472299280951743428551274356601991,5077957178053472299280951743428551274356601992⟩,⟨5676704986849873277685131557767240238348029385,5676704986849873277685131557767240238348029386⟩⟩, + ⟨⟨14420361128338315748284776083181743546003234175,14420361128338315748284776083181743546003234176⟩,⟨-22819443220560615605473415502945691347773236097,-22819443220560615605473415502945691347773236096⟩⟩, + ⟨⟨-88060944688595501537137224024608550652614507866,-88060944688595501537137224024608550652614507865⟩,⟨-114877694642559727798625761235722129721271307949,-114877694642559727798625761235722129721271307948⟩⟩, + ⟨⟨-841182379346733341916108852150781049977158830074,-841182379346733341916108852150781049977158830073⟩,⟨-238566080404047100429571799068625526164591291864,-238566080404047100429571799068625526164591291862⟩⟩, + ⟨⟨-5059326907333206575510554663163432017023906100254,-5059326907333206575510554663163432017023906100250⟩,⟨-424891063559826477294026921733912011925936662272,-424891063559826477294026921733912011925936662268⟩⟩, + ⟨⟨-25911987593185110196988720485229144561896413553300,-25911987593185110196988720485229144561896413553280⟩,⟨-5758232377509753836851999065894943664226410402725,-5758232377509753836851999065894943664226410402705⟩⟩, + ⟨⟨-101921937611260317688787195539969133836405141201999,-101921937611260317688787195539969133836405141201921⟩,⟨-68255137509721966781596917439914308197249723433467,-68255137509721966781596917439914308197249723433390⟩⟩, + ⟨⟨-212475147579732445384986516934567839129759185586665,-212475147579732445384986516934567839129759185586396⟩,⟨-454839414036206621719391923301990242338332697507973,-454839414036206621719391923301990242338332697507705⟩⟩, + ⟨⟨426310974529321573862014695331899001425699487577343,426310974529321573862014695331899001425699487578088⟩,⟨-1786931074285769699588184355281543102230988993746083,-1786931074285769699588184355281543102230988993745336⟩⟩, + ⟨⟨5122518690652813369071483525952635661942784508574319,5122518690652813369071483525952635661942784508576627⟩,⟨-3277827780551690759695564622690394092271452128773260,-3277827780551690759695564622690394092271452128770951⟩⟩, + ⟨⟨17744755544392418654179509049106844056975982492428640,17744755544392418654179509049106844056975982492436859⟩,⟨4949144783788313312794172522146919213788657137832302,4949144783788313312794172522146919213788657137840517⟩⟩, + ⟨⟨20085896551305596982150021363550320388898496202530106,20085896551305596982150021363550320388898496202555674⟩,⟨47527238964989698673403817283654781932145625519463981,47527238964989698673403817283654781932145625519489490⟩⟩, + ⟨⟨-69899398205533647970090422301587072293248388215277391,-69899398205533647970090422301587072293248388215222074⟩,⟨115316327770550175208109200894578418438690063828366034,115316327770550175208109200894578418438690063828421687⟩⟩, + ⟨⟨-331120130323199210204637206455649780244953458883542670,-331120130323199210204637206455649780244953458883395143⟩,⟨14630432357929829059957307861024752629282846307926743,14630432357929829059957307861024752629282846308073696⟩⟩, + ⟨⟨-437535643990408459031559276250981306849579623796820953,-437535643990408459031559276250981306849579623796521262⟩,⟨-635299870472453768878712044354536560472298551955309867,-635299870472453768878712044354536560472298551955009902⟩⟩] +lemma tw1_0_3_11_calc (j : Fin 31) : taylorWaveBox 1 0 3 11 j = tw1_0_3_11 j := by + revert j + decide +kernel +def tw1_0_3_12 : Fin 31 → CI := ![⟨⟨138437351753890184453467715859589618106139397623819482,138437351753890184453467715859589618106139397623884724⟩,⟨53306782584956694621926843412787550298869314753881006,53306782584956694621926843412787550298869314753946088⟩⟩, + ⟨⟨12307144541910320566495321536138797766440250562659838,12307144541910320566495321536138797766440250562691203⟩,⟨58447977206504202561469215590697282525871720667980150,58447977206504202561469215590697282525871720668011684⟩⟩, + ⟨⟨-15551811495649216954115246444991504569306684647250613,-15551811495649216954115246444991504569306684647239857⟩,⟨16503720666641127893316999646240452474877179828464603,16503720666641127893316999646240452474877179828475296⟩⟩, + ⟨⟨-8011511251986765421942618038131691257039079947909250,-8011511251986765421942618038131691257039079947904800⟩,⟨-871825600619084061147719152796315991988693234348476,-871825600619084061147719152796315991988693234344019⟩⟩, + ⟨⟨-1475073900818069947683778998501301467358184028346363,-1475073900818069947683778998501301467358184028345039⟩,⟨-2211274688169142548718205996929923135693757035128701,-2211274688169142548718205996929923135693757035127378⟩⟩, + ⟨⟨178736806507875634451973232469563327453817062028862,178736806507875634451973232469563327453817062029227⟩,⟨-785714403550485216341801726576127471552006126611034,-785714403550485216341801726576127471552006126610669⟩⟩, + ⟨⟨181360405898467225999183752929124639138352655693141,181360405898467225999183752929124639138352655693255⟩,⟨-128029258568036378219094031578900090378522545326629,-128029258568036378219094031578900090378522545326515⟩⟩, + ⟨⟨54898407140232875369791791698873036986370965360376,54898407140232875369791791698873036986370965360412⟩,⟨777659998166340733818098413663812575346684028123,777659998166340733818098413663812575346684028159⟩⟩, + ⟨⟨10530630268147409571999402002286924499411398235797,10530630268147409571999402002286924499411398235808⟩,⟨5831083548496489605568487160517566644249180931410,5831083548496489605568487160517566644249180931421⟩⟩, + ⟨⟨1593642058391515659435973876315350721303726803343,1593642058391515659435973876315350721303726803346⟩,⟨1679783274803611694632780819418084549485910980356,1679783274803611694632780819418084549485910980359⟩⟩, + ⟨⟨253546874993457687551523138137705963661153439821,253546874993457687551523138137705963661153439822⟩,⟨296294906758158868492655506287749405080782133768,296294906758158868492655506287749405080782133769⟩⟩, + ⟨⟨49648644294435847315461964366951717719248109044,49648644294435847315461964366951717719248109045⟩,⟨31240042575414609732928599427537355250095162336,31240042575414609732928599427537355250095162337⟩⟩, + ⟨⟨8248581688483805831400772302900625417611225353,8248581688483805831400772302900625417611225354⟩,⟨-1862227249507236632756591097276000376478539659,-1862227249507236632756591097276000376478539658⟩⟩, + ⟨⟨-78220840226161999785072501964408096178204942,-78220840226161999785072501964408096178204941⟩,⟨-1383681046890478013195201901589103230170556641,-1383681046890478013195201901589103230170556640⟩⟩, + ⟨⟨-298667608572313302113141590044851634845746466,-298667608572313302113141590044851634845746465⟩,⟨191464872595263628455370896652552428450084066,191464872595263628455370896652552428450084067⟩⟩, + ⟨⟨210854517246087859665955827411575054052740058,210854517246087859665955827411575054052740059⟩,⟨-1,1⟩⟩, + ⟨⟨-298667608572313302113141590044851634845746466,-298667608572313302113141590044851634845746465⟩,⟨-191464872595263628455370896652552428450084067,-191464872595263628455370896652552428450084066⟩⟩, + ⟨⟨-78220840226161999785072501964408096178204942,-78220840226161999785072501964408096178204941⟩,⟨1383681046890478013195201901589103230170556640,1383681046890478013195201901589103230170556641⟩⟩, + ⟨⟨8248581688483805831400772302900625417611225353,8248581688483805831400772302900625417611225354⟩,⟨1862227249507236632756591097276000376478539658,1862227249507236632756591097276000376478539659⟩⟩, + ⟨⟨49648644294435847315461964366951717719248109044,49648644294435847315461964366951717719248109045⟩,⟨-31240042575414609732928599427537355250095162337,-31240042575414609732928599427537355250095162336⟩⟩, + ⟨⟨253546874993457687551523138137705963661153439821,253546874993457687551523138137705963661153439822⟩,⟨-296294906758158868492655506287749405080782133769,-296294906758158868492655506287749405080782133768⟩⟩, + ⟨⟨1593642058391515659435973876315350721303726803343,1593642058391515659435973876315350721303726803346⟩,⟨-1679783274803611694632780819418084549485910980359,-1679783274803611694632780819418084549485910980356⟩⟩, + ⟨⟨10530630268147409571999402002286924499411398235797,10530630268147409571999402002286924499411398235808⟩,⟨-5831083548496489605568487160517566644249180931421,-5831083548496489605568487160517566644249180931410⟩⟩, + ⟨⟨54898407140232875369791791698873036986370965360376,54898407140232875369791791698873036986370965360412⟩,⟨-777659998166340733818098413663812575346684028159,-777659998166340733818098413663812575346684028123⟩⟩, + ⟨⟨181360405898467225999183752929124639138352655693141,181360405898467225999183752929124639138352655693255⟩,⟨128029258568036378219094031578900090378522545326515,128029258568036378219094031578900090378522545326629⟩⟩, + ⟨⟨178736806507875634451973232469563327453817062028862,178736806507875634451973232469563327453817062029227⟩,⟨785714403550485216341801726576127471552006126610669,785714403550485216341801726576127471552006126611034⟩⟩, + ⟨⟨-1475073900818069947683778998501301467358184028346363,-1475073900818069947683778998501301467358184028345039⟩,⟨2211274688169142548718205996929923135693757035127378,2211274688169142548718205996929923135693757035128701⟩⟩, + ⟨⟨-8011511251986765421942618038131691257039079947909250,-8011511251986765421942618038131691257039079947904800⟩,⟨871825600619084061147719152796315991988693234344019,871825600619084061147719152796315991988693234348476⟩⟩, + ⟨⟨-15551811495649216954115246444991504569306684647250613,-15551811495649216954115246444991504569306684647239857⟩,⟨-16503720666641127893316999646240452474877179828475296,-16503720666641127893316999646240452474877179828464603⟩⟩, + ⟨⟨12307144541910320566495321536138797766440250562659838,12307144541910320566495321536138797766440250562691203⟩,⟨-58447977206504202561469215590697282525871720668011684,-58447977206504202561469215590697282525871720667980150⟩⟩, + ⟨⟨138437351753890184453467715859589618106139397623819482,138437351753890184453467715859589618106139397623884724⟩,⟨-53306782584956694621926843412787550298869314753946088,-53306782584956694621926843412787550298869314753881006⟩⟩] +lemma tw1_0_3_12_calc (j : Fin 31) : taylorWaveBox 1 0 3 12 j = tw1_0_3_12 j := by + revert j + decide +kernel +def tw1_0_3_13 : Fin 31 → CI := ![⟨⟨3504938467490049137839339726509339891878766586701275,3504938467490049137839339726509339891878766586715035⟩,⟨-26394785245874748271233319125806093420905015288226486,-26394785245874748271233319125806093420905015288212686⟩⟩, + ⟨⟨9005502873191120641560982865201062962960695627000517,9005502873191120641560982865201062962960695627006517⟩,⟨-4453064952690217845891511559575901073646469836850164,-4453064952690217845891511559575901073646469836844195⟩⟩, + ⟨⟨3147816381936715224586818499887746987565516163348631,3147816381936715224586818499887746987565516163350496⟩,⟨1661089830778145357465267138207312823355318662327495,1661089830778145357465267138207312823355318662329369⟩⟩, + ⟨⟨213855580706740139478876465015534561574550960323918,213855580706740139478876465015534561574550960324626⟩,⟨1155136940623489606392667048503555497107594974131251,1155136940623489606392667048503555497107594974131958⟩⟩, + ⟨⟨-221235091409296718404914690237502450107729179922086,-221235091409296718404914690237502450107729179921885⟩,⟨281421563588701582055511730805192234035324135013840,281421563588701582055511730805192234035324135014042⟩⟩, + ⟨⟨-98908931992012510782971366325585430568976313005840,-98908931992012510782971366325585430568976313005782⟩,⟨12114956186435486845958744060557390777426968983077,12114956186435486845958744060557390777426968983135⟩⟩, + ⟨⟨-21003999523032207813076047915102607699632078188314,-21003999523032207813076047915102607699632078188298⟩,⟨-13629140251931039043087446720145248000024318135997,-13629140251931039043087446720145248000024318135981⟩⟩, + ⟨⟨-2227191221252196887615336162858803047834501885134,-2227191221252196887615336162858803047834501885128⟩,⟨-5142750325549350043347577158797889377291674815026,-5142750325549350043347577158797889377291674815021⟩⟩, + ⟨⟨33828156266215345318921369166000028682737538094,33828156266215345318921369166000028682737538096⟩,⟨-1101957985462611344653340255423927542878562207092,-1101957985462611344653340255423927542878562207090⟩⟩, + ⟨⟨50516673019762893178056086849446822014231818135,50516673019762893178056086849446822014231818136⟩,⟨-181619801345380460110189531039055816248643783734,-181619801345380460110189531039055816248643783733⟩⟩, + ⟨⟨6617192268463617155123160576637769653865062121,6617192268463617155123160576637769653865062123⟩,⟨-27161931287494438844038035895974620822124681878,-27161931287494438844038035895974620822124681877⟩⟩, + ⟨⟨-625699945270049081817878459206078413736214985,-625699945270049081817878459206078413736214984⟩,⟨-3619332675608472198981720296190489893348289424,-3619332675608472198981720296190489893348289423⟩⟩, + ⟨⟨-410519775649532018838432387443354427229883303,-410519775649532018838432387443354427229883302⟩,⟨-209925025549289144410364022741250076833328389,-209925025549289144410364022741250076833328388⟩⟩, + ⟨⟨-28923213194079431202254132519502450409241336,-28923213194079431202254132519502450409241335⟩,⟨59779777765131403149536494837006186956321663,59779777765131403149536494837006186956321664⟩⟩, + ⟨⟨14738354485212692873307314837765199225419284,14738354485212692873307314837765199225419285⟩,⟨-4544906403114140654930939418381623821918892,-4544906403114140654930939418381623821918891⟩⟩, + ⟨⟨-8832253364753759753201457472561470125487713,-8832253364753759753201457472561470125487712⟩,⟨-1,1⟩⟩, + ⟨⟨14738354485212692873307314837765199225419284,14738354485212692873307314837765199225419285⟩,⟨4544906403114140654930939418381623821918891,4544906403114140654930939418381623821918892⟩⟩, + ⟨⟨-28923213194079431202254132519502450409241336,-28923213194079431202254132519502450409241335⟩,⟨-59779777765131403149536494837006186956321664,-59779777765131403149536494837006186956321663⟩⟩, + ⟨⟨-410519775649532018838432387443354427229883303,-410519775649532018838432387443354427229883302⟩,⟨209925025549289144410364022741250076833328388,209925025549289144410364022741250076833328389⟩⟩, + ⟨⟨-625699945270049081817878459206078413736214985,-625699945270049081817878459206078413736214984⟩,⟨3619332675608472198981720296190489893348289423,3619332675608472198981720296190489893348289424⟩⟩, + ⟨⟨6617192268463617155123160576637769653865062121,6617192268463617155123160576637769653865062123⟩,⟨27161931287494438844038035895974620822124681877,27161931287494438844038035895974620822124681878⟩⟩, + ⟨⟨50516673019762893178056086849446822014231818135,50516673019762893178056086849446822014231818136⟩,⟨181619801345380460110189531039055816248643783733,181619801345380460110189531039055816248643783734⟩⟩, + ⟨⟨33828156266215345318921369166000028682737538094,33828156266215345318921369166000028682737538096⟩,⟨1101957985462611344653340255423927542878562207090,1101957985462611344653340255423927542878562207092⟩⟩, + ⟨⟨-2227191221252196887615336162858803047834501885134,-2227191221252196887615336162858803047834501885128⟩,⟨5142750325549350043347577158797889377291674815021,5142750325549350043347577158797889377291674815026⟩⟩, + ⟨⟨-21003999523032207813076047915102607699632078188314,-21003999523032207813076047915102607699632078188298⟩,⟨13629140251931039043087446720145248000024318135981,13629140251931039043087446720145248000024318135997⟩⟩, + ⟨⟨-98908931992012510782971366325585430568976313005840,-98908931992012510782971366325585430568976313005782⟩,⟨-12114956186435486845958744060557390777426968983135,-12114956186435486845958744060557390777426968983077⟩⟩, + ⟨⟨-221235091409296718404914690237502450107729179922086,-221235091409296718404914690237502450107729179921885⟩,⟨-281421563588701582055511730805192234035324135014042,-281421563588701582055511730805192234035324135013840⟩⟩, + ⟨⟨213855580706740139478876465015534561574550960323918,213855580706740139478876465015534561574550960324626⟩,⟨-1155136940623489606392667048503555497107594974131958,-1155136940623489606392667048503555497107594974131251⟩⟩, + ⟨⟨3147816381936715224586818499887746987565516163348631,3147816381936715224586818499887746987565516163350496⟩,⟨-1661089830778145357465267138207312823355318662329369,-1661089830778145357465267138207312823355318662327495⟩⟩, + ⟨⟨9005502873191120641560982865201062962960695627000517,9005502873191120641560982865201062962960695627006517⟩,⟨4453064952690217845891511559575901073646469836844195,4453064952690217845891511559575901073646469836850164⟩⟩, + ⟨⟨3504938467490049137839339726509339891878766586701275,3504938467490049137839339726509339891878766586715035⟩,⟨26394785245874748271233319125806093420905015288212686,26394785245874748271233319125806093420905015288226486⟩⟩] +lemma tw1_0_3_13_calc (j : Fin 31) : taylorWaveBox 1 0 3 13 j = tw1_0_3_13 j := by + revert j + decide +kernel +def tw1_0_3_14 : Fin 31 → CI := ![⟨⟨-4456475248296907042258182621820230113845357799171414,-4456475248296907042258182621820230113845357799168765⟩,⟨463026577104889736020773896098944645919179961157721,463026577104889736020773896098944645919179961160363⟩⟩, + ⟨⟨-1033700916612823471810757169565681669853648220603979,-1033700916612823471810757169565681669853648220602948⟩,⟨-1200415712664579280604330348155324562098052788861852,-1200415712664579280604330348155324562098052788860817⟩⟩, + ⟨⟨111941369333327053541146021327437595617671341099705,111941369333327053541146021327437595617671341100005⟩,⟨-511616396034781382026693574993602372460752778079617,-511616396034781382026693574993602372460752778079318⟩⟩, + ⟨⟨142808982923737581673358811002868584145067265168432,142808982923737581673358811002868584145067265168536⟩,⟨-73355751635139882849930743604802088786356869964223,-73355751635139882849930743604802088786356869964118⟩⟩, + ⟨⟨42456045209888756054834496674822356116549202738500,42456045209888756054834496674822356116549202738533⟩,⟨15494906307394370001365114985023712627636309480583,15494906307394370001365114985023712627636309480615⟩⟩, + ⟨⟨5205681390182457465653017604846174785842244497556,5205681390182457465653017604846174785842244497565⟩,⟨10313537551150226333356884375379692768240532325879,10313537551150226333356884375379692768240532325888⟩⟩, + ⟨⟨-513212582849590437129790342663238952380107861136,-513212582849590437129790342663238952380107861133⟩,⟨2597277917301440740066029732449544045831375430866,2597277917301440740066029732449544045831375430869⟩⟩, + ⟨⟨-361328034208912332439768757586263402691666856792,-361328034208912332439768757586263402691666856790⟩,⟨396314432436726154713809854468126306268246063910,396314432436726154713809854468126306268246063912⟩⟩, + ⟨⟨-85471906999358272916218578223300795662460344271,-85471906999358272916218578223300795662460344270⟩,⟨40690733304254184374981129352942272885278915824,40690733304254184374981129352942272885278915825⟩⟩, + ⟨⟨-13870773311639495676843717332345286756612516663,-13870773311639495676843717332345286756612516662⟩,⟨3825884403107627472477702427276927144965396745,3825884403107627472477702427276927144965396746⟩⟩, + ⟨⟨-1741310070747582426994051175188979713966894762,-1741310070747582426994051175188979713966894761⟩,⟨705734696369407733383423018450491212140719149,705734696369407733383423018450491212140719150⟩⟩, + ⟨⟨-133352000393310233341984220491909037682516984,-133352000393310233341984220491909037682516983⟩,⟨169432172243640024272805889004965285260100714,169432172243640024272805889004965285260100715⟩⟩, + ⟨⟨9251293495108160743124192411068355319346250,9251293495108160743124192411068355319346251⟩,⟨21677964718940162422195426214123854400963123,21677964718940162422195426214123854400963124⟩⟩, + ⟨⟨2440004361249192083115712990006375149480555,2440004361249192083115712990006375149480556⟩,⟨-1716539757635901335044499234366763750037770,-1716539757635901335044499234366763750037769⟩⟩, + ⟨⟨-628351065290151198918056260443208574201278,-628351065290151198918056260443208574201277⟩,⟨17707549532810310798677940596657614520784,17707549532810310798677940596657614520785⟩⟩, + ⟨⟨346841778566926801371318633010716059622146,346841778566926801371318633010716059622147⟩,⟨-1,1⟩⟩, + ⟨⟨-628351065290151198918056260443208574201278,-628351065290151198918056260443208574201277⟩,⟨-17707549532810310798677940596657614520785,-17707549532810310798677940596657614520784⟩⟩, + ⟨⟨2440004361249192083115712990006375149480555,2440004361249192083115712990006375149480556⟩,⟨1716539757635901335044499234366763750037769,1716539757635901335044499234366763750037770⟩⟩, + ⟨⟨9251293495108160743124192411068355319346250,9251293495108160743124192411068355319346251⟩,⟨-21677964718940162422195426214123854400963124,-21677964718940162422195426214123854400963123⟩⟩, + ⟨⟨-133352000393310233341984220491909037682516984,-133352000393310233341984220491909037682516983⟩,⟨-169432172243640024272805889004965285260100715,-169432172243640024272805889004965285260100714⟩⟩, + ⟨⟨-1741310070747582426994051175188979713966894762,-1741310070747582426994051175188979713966894761⟩,⟨-705734696369407733383423018450491212140719150,-705734696369407733383423018450491212140719149⟩⟩, + ⟨⟨-13870773311639495676843717332345286756612516663,-13870773311639495676843717332345286756612516662⟩,⟨-3825884403107627472477702427276927144965396746,-3825884403107627472477702427276927144965396745⟩⟩, + ⟨⟨-85471906999358272916218578223300795662460344271,-85471906999358272916218578223300795662460344270⟩,⟨-40690733304254184374981129352942272885278915825,-40690733304254184374981129352942272885278915824⟩⟩, + ⟨⟨-361328034208912332439768757586263402691666856792,-361328034208912332439768757586263402691666856790⟩,⟨-396314432436726154713809854468126306268246063912,-396314432436726154713809854468126306268246063910⟩⟩, + ⟨⟨-513212582849590437129790342663238952380107861136,-513212582849590437129790342663238952380107861133⟩,⟨-2597277917301440740066029732449544045831375430869,-2597277917301440740066029732449544045831375430866⟩⟩, + ⟨⟨5205681390182457465653017604846174785842244497556,5205681390182457465653017604846174785842244497565⟩,⟨-10313537551150226333356884375379692768240532325888,-10313537551150226333356884375379692768240532325879⟩⟩, + ⟨⟨42456045209888756054834496674822356116549202738500,42456045209888756054834496674822356116549202738533⟩,⟨-15494906307394370001365114985023712627636309480615,-15494906307394370001365114985023712627636309480583⟩⟩, + ⟨⟨142808982923737581673358811002868584145067265168432,142808982923737581673358811002868584145067265168536⟩,⟨73355751635139882849930743604802088786356869964118,73355751635139882849930743604802088786356869964223⟩⟩, + ⟨⟨111941369333327053541146021327437595617671341099705,111941369333327053541146021327437595617671341100005⟩,⟨511616396034781382026693574993602372460752778079318,511616396034781382026693574993602372460752778079617⟩⟩, + ⟨⟨-1033700916612823471810757169565681669853648220603979,-1033700916612823471810757169565681669853648220602948⟩,⟨1200415712664579280604330348155324562098052788860817,1200415712664579280604330348155324562098052788861852⟩⟩, + ⟨⟨-4456475248296907042258182621820230113845357799171414,-4456475248296907042258182621820230113845357799168765⟩,⟨-463026577104889736020773896098944645919179961160363,-463026577104889736020773896098944645919179961157721⟩⟩] +lemma tw1_0_3_14_calc (j : Fin 31) : taylorWaveBox 1 0 3 14 j = tw1_0_3_14 j := by + revert j + decide +kernel +def tw1_0_3_15 : Fin 31 → CI := ![⟨⟨236016866141107090409797917832967065399712768953320,236016866141107090409797917832967065399712768953788⟩,⟨669182161108942206055529774109585855375342269210390,669182161108942206055529774109585855375342269210859⟩⟩, + ⟨⟨-134333851757998704099266689870480263475127897298286,-134333851757998704099266689870480263475127897298121⟩,⟨192944191967115090433883689321343012396894080342184,192944191967115090433883689321343012396894080342348⟩⟩, + ⟨⟨-72420918649724587336050327925043230083536960819780,-72420918649724587336050327925043230083536960819735⟩,⟨3968891289429846207354416459134263118175911770819,3968891289429846207354416459134263118175911770864⟩⟩, + ⟨⟨-14315615134175144487330248185646405096410208003006,-14315615134175144487330248185646405096410208002988⟩,⟨-14882803313301582067982232368491767203474216164902,-14882803313301582067982232368491767203474216164885⟩⟩, + ⟨⟨180715565432646425585683930126435908452512343934,180715565432646425585683930126435908452512343939⟩,⟨-5367381891551076513235981295293923664656649628527,-5367381891551076513235981295293923664656649628521⟩⟩, + ⟨⟨866452511594070121581168247672487054609788501911,866452511594070121581168247672487054609788501913⟩,⟨-915636162793597276956424155324677167550528461101,-915636162793597276956424155324677167550528461098⟩⟩, + ⟨⟨258956211068507392422967831978516493153407054102,258956211068507392422967831978516493153407054103⟩,⟨-48574435579998984562675702708433175671936211543,-48574435579998984562675702708433175671936211542⟩⟩, + ⟨⟨45905202182166524563371670227319637183916922742,45905202182166524563371670227319637183916922743⟩,⟨15029259308551324856133382777406649398077911630,15029259308551324856133382777406649398077911631⟩⟩, + ⟨⟨6083334824012299588174880735937374808278885795,6083334824012299588174880735937374808278885796⟩,⟨4638640699602230483703437251103373272597729317,4638640699602230483703437251103373272597729318⟩⟩, + ⟨⟨748336510893339176010976529969729718156039465,748336510893339176010976529969729718156039466⟩,⟨713033281076156689445428677699156849163708169,713033281076156689445428677699156849163708170⟩⟩, + ⟨⟨100586299413937497972387073156713462215805117,100586299413937497972387073156713462215805118⟩,⟨63303147890266155553392118585112465780551696,63303147890266155553392118585112465780551697⟩⟩, + ⟨⟨11886676678454822988567677869611555639296016,11886676678454822988567677869611555639296017⟩,⟨-785889098889089289349510417085692990263058,-785889098889089289349510417085692990263057⟩⟩, + ⟨⟨325752744012542487543041429461438846622963,325752744012542487543041429461438846622964⟩,⟨-1086154875758786363273141064881030528964473,-1086154875758786363273141064881030528964472⟩⟩, + ⟨⟨-125428550908714273922025179292500605774528,-125428550908714273922025179292500605774527⟩,⟨13341855358844676221438857177858656040881,13341855358844676221438857177858656040882⟩⟩, + ⟨⟨23405598149191008346145428504211230582394,23405598149191008346145428504211230582395⟩,⟨5796586351305830840764561750965601014284,5796586351305830840764561750965601014285⟩⟩, + ⟨⟨-12819242158869118162259479460907351586359,-12819242158869118162259479460907351586358⟩,⟨-1,1⟩⟩, + ⟨⟨23405598149191008346145428504211230582394,23405598149191008346145428504211230582395⟩,⟨-5796586351305830840764561750965601014285,-5796586351305830840764561750965601014284⟩⟩, + ⟨⟨-125428550908714273922025179292500605774528,-125428550908714273922025179292500605774527⟩,⟨-13341855358844676221438857177858656040882,-13341855358844676221438857177858656040881⟩⟩, + ⟨⟨325752744012542487543041429461438846622963,325752744012542487543041429461438846622964⟩,⟨1086154875758786363273141064881030528964472,1086154875758786363273141064881030528964473⟩⟩, + ⟨⟨11886676678454822988567677869611555639296016,11886676678454822988567677869611555639296017⟩,⟨785889098889089289349510417085692990263057,785889098889089289349510417085692990263058⟩⟩, + ⟨⟨100586299413937497972387073156713462215805117,100586299413937497972387073156713462215805118⟩,⟨-63303147890266155553392118585112465780551697,-63303147890266155553392118585112465780551696⟩⟩, + ⟨⟨748336510893339176010976529969729718156039465,748336510893339176010976529969729718156039466⟩,⟨-713033281076156689445428677699156849163708170,-713033281076156689445428677699156849163708169⟩⟩, + ⟨⟨6083334824012299588174880735937374808278885795,6083334824012299588174880735937374808278885796⟩,⟨-4638640699602230483703437251103373272597729318,-4638640699602230483703437251103373272597729317⟩⟩, + ⟨⟨45905202182166524563371670227319637183916922742,45905202182166524563371670227319637183916922743⟩,⟨-15029259308551324856133382777406649398077911631,-15029259308551324856133382777406649398077911630⟩⟩, + ⟨⟨258956211068507392422967831978516493153407054102,258956211068507392422967831978516493153407054103⟩,⟨48574435579998984562675702708433175671936211542,48574435579998984562675702708433175671936211543⟩⟩, + ⟨⟨866452511594070121581168247672487054609788501911,866452511594070121581168247672487054609788501913⟩,⟨915636162793597276956424155324677167550528461098,915636162793597276956424155324677167550528461101⟩⟩, + ⟨⟨180715565432646425585683930126435908452512343934,180715565432646425585683930126435908452512343939⟩,⟨5367381891551076513235981295293923664656649628521,5367381891551076513235981295293923664656649628527⟩⟩, + ⟨⟨-14315615134175144487330248185646405096410208003006,-14315615134175144487330248185646405096410208002988⟩,⟨14882803313301582067982232368491767203474216164885,14882803313301582067982232368491767203474216164902⟩⟩, + ⟨⟨-72420918649724587336050327925043230083536960819780,-72420918649724587336050327925043230083536960819735⟩,⟨-3968891289429846207354416459134263118175911770864,-3968891289429846207354416459134263118175911770819⟩⟩, + ⟨⟨-134333851757998704099266689870480263475127897298286,-134333851757998704099266689870480263475127897298121⟩,⟨-192944191967115090433883689321343012396894080342348,-192944191967115090433883689321343012396894080342184⟩⟩, + ⟨⟨236016866141107090409797917832967065399712768953320,236016866141107090409797917832967065399712768953788⟩,⟨-669182161108942206055529774109585855375342269210859,-669182161108942206055529774109585855375342269210390⟩⟩] +lemma tw1_0_3_15_calc (j : Fin 31) : taylorWaveBox 1 0 3 15 j = tw1_0_3_15 j := by + revert j + decide +kernel +def tw1_0_3_16 : Fin 31 → CI := ![⟨⟨89090057249216168771673466882027110047708113189049,89090057249216168771673466882027110047708113189127⟩,⟨-57686125717266401656805774868007869514405615701696,-57686125717266401656805774868007869514405615701618⟩⟩, + ⟨⟨30880891527885069550549719802742130511502572003230,30880891527885069550549719802742130511502572003255⟩,⟨11500506122304751875020761233511321697739308303185,11500506122304751875020761233511321697739308303210⟩⟩, + ⟨⟨3028251882460854846749623332688108884133369621401,3028251882460854846749623332688108884133369621409⟩,⟨8990229120267330193036961805511873081492568296005,8990229120267330193036961805511873081492568296013⟩⟩, + ⟨⟨-1231983561212853159905562323341519359966120502291,-1231983561212853159905562323341519359966120502288⟩,⟨2185205296418908199839311661636949965551804223530,2185205296418908199839311661636949965551804223534⟩⟩, + ⟨⟨-578787801260785038892380190148200964426400305001,-578787801260785038892380190148200964426400304999⟩,⟨168082029166512646651240621261176569029165273261,168082029166512646651240621261176569029165273263⟩⟩, + ⟨⟨-119027486007176582798625504191220078002474482405,-119027486007176582798625504191220078002474482404⟩,⟨-52051874748354663607311660396674609957585511951,-52051874748354663607311660396674609957585511950⟩⟩, + ⟨⟨-13278196169113993548336189353756149791929122414,-13278196169113993548336189353756149791929122413⟩,⟨-20902624841836459309210566094697430408841902676,-20902624841836459309210566094697430408841902675⟩⟩, + ⟨⟨-436571358988418933603221236086555213440273356,-436571358988418933603221236086555213440273355⟩,⟨-4085495326462639136801567278324804856548490429,-4085495326462639136801567278324804856548490428⟩⟩, + ⟨⟨102494261848125032100067036845818037485946797,102494261848125032100067036845818037485946798⟩,⟨-574818858973317090214622200450550628124914884,-574818858973317090214622200450550628124914883⟩⟩, + ⟨⟨15360722714306674357193459734660892501721162,15360722714306674357193459734660892501721163⟩,⟨-68426010288738159896711901595838596912506299,-68426010288738159896711901595838596912506298⟩⟩, + ⟨⟨-442100998889974882241989813124286266278359,-442100998889974882241989813124286266278358⟩,⟨-7086258123929793168822475793064821542108307,-7086258123929793168822475793064821542108306⟩⟩, + ⟨⟨-445404073276222007326262567073373540002705,-445404073276222007326262567073373540002704⟩,⟨-433593173468952566926605421140162958605396,-433593173468952566926605421140162958605395⟩⟩, + ⟨⟨-42965880475151498353287306788065641722280,-42965880475151498353287306788065641722279⟩,⟨28438194319786346521265662473515059583537,28438194319786346521265662473515059583538⟩⟩, + ⟨⟨4637014939098878491500326838433272514881,4637014939098878491500326838433272514882⟩,⟨1966660490618165795243569138024628358207,1966660490618165795243569138024628358208⟩⟩, + ⟨⟨-760804214867230670118987067653693098282,-760804214867230670118987067653693098281⟩,⟨-429286118358499624895485179569512755141,-429286118358499624895485179569512755140⟩⟩, + ⟨⟨447475966565464252829550085961922352025,447475966565464252829550085961922352026⟩,⟨-1,1⟩⟩, + ⟨⟨-760804214867230670118987067653693098282,-760804214867230670118987067653693098281⟩,⟨429286118358499624895485179569512755140,429286118358499624895485179569512755141⟩⟩, + ⟨⟨4637014939098878491500326838433272514881,4637014939098878491500326838433272514882⟩,⟨-1966660490618165795243569138024628358208,-1966660490618165795243569138024628358207⟩⟩, + ⟨⟨-42965880475151498353287306788065641722280,-42965880475151498353287306788065641722279⟩,⟨-28438194319786346521265662473515059583538,-28438194319786346521265662473515059583537⟩⟩, + ⟨⟨-445404073276222007326262567073373540002705,-445404073276222007326262567073373540002704⟩,⟨433593173468952566926605421140162958605395,433593173468952566926605421140162958605396⟩⟩, + ⟨⟨-442100998889974882241989813124286266278359,-442100998889974882241989813124286266278358⟩,⟨7086258123929793168822475793064821542108306,7086258123929793168822475793064821542108307⟩⟩, + ⟨⟨15360722714306674357193459734660892501721162,15360722714306674357193459734660892501721163⟩,⟨68426010288738159896711901595838596912506298,68426010288738159896711901595838596912506299⟩⟩, + ⟨⟨102494261848125032100067036845818037485946797,102494261848125032100067036845818037485946798⟩,⟨574818858973317090214622200450550628124914883,574818858973317090214622200450550628124914884⟩⟩, + ⟨⟨-436571358988418933603221236086555213440273356,-436571358988418933603221236086555213440273355⟩,⟨4085495326462639136801567278324804856548490428,4085495326462639136801567278324804856548490429⟩⟩, + ⟨⟨-13278196169113993548336189353756149791929122414,-13278196169113993548336189353756149791929122413⟩,⟨20902624841836459309210566094697430408841902675,20902624841836459309210566094697430408841902676⟩⟩, + ⟨⟨-119027486007176582798625504191220078002474482405,-119027486007176582798625504191220078002474482404⟩,⟨52051874748354663607311660396674609957585511950,52051874748354663607311660396674609957585511951⟩⟩, + ⟨⟨-578787801260785038892380190148200964426400305001,-578787801260785038892380190148200964426400304999⟩,⟨-168082029166512646651240621261176569029165273263,-168082029166512646651240621261176569029165273261⟩⟩, + ⟨⟨-1231983561212853159905562323341519359966120502291,-1231983561212853159905562323341519359966120502288⟩,⟨-2185205296418908199839311661636949965551804223534,-2185205296418908199839311661636949965551804223530⟩⟩, + ⟨⟨3028251882460854846749623332688108884133369621401,3028251882460854846749623332688108884133369621409⟩,⟨-8990229120267330193036961805511873081492568296013,-8990229120267330193036961805511873081492568296005⟩⟩, + ⟨⟨30880891527885069550549719802742130511502572003230,30880891527885069550549719802742130511502572003255⟩,⟨-11500506122304751875020761233511321697739308303210,-11500506122304751875020761233511321697739308303185⟩⟩, + ⟨⟨89090057249216168771673466882027110047708113189049,89090057249216168771673466882027110047708113189127⟩,⟨57686125717266401656805774868007869514405615701618,57686125717266401656805774868007869514405615701696⟩⟩] +lemma tw1_0_3_16_calc (j : Fin 31) : taylorWaveBox 1 0 3 16 j = tw1_0_3_16 j := by + revert j + decide +kernel +def tw1_0_3_17 : Fin 31 → CI := ![⟨⟨-10894676728697761324488340081446760636039536604177,-10894676728697761324488340081446760636039536604165⟩,⟨-10367998037625021513164676932952099076359963771642,-10367998037625021513164676932952099076359963771630⟩⟩, + ⟨⟨457789539744015815222600601481827934128683625281,457789539744015815222600601481827934128683625285⟩,⟨-4351696512898618880970864766181784547921700398700,-4351696512898618880970864766181784547921700398695⟩⟩, + ⟨⟨973446108001172001572836858112151337643289840944,973446108001172001572836858112151337643289840946⟩,⟨-658927006441565598264763662279287129599510764422,-658927006441565598264763662279287129599510764420⟩⟩, + ⟨⟨281619019557545816440896527899067266949462549428,281619019557545816440896527899067266949462549429⟩,⟨63539755561584079818050454813438362717009862760,63539755561584079818050454813438362717009862761⟩⟩, + ⟨⟨36124075334127409193135525587557901122008934656,36124075334127409193135525587557901122008934657⟩,⟨52925460771353958060104116595213924450708406466,52925460771353958060104116595213924450708406468⟩⟩, + ⟨⟨-845288657703516014016479581747706658582115515,-845288657703516014016479581747706658582115514⟩,⟨12655121609614339549739531843208547080663191351,12655121609614339549739531843208547080663191352⟩⟩, + ⟨⟨-1288991032335049242184190574590541674609279013,-1288991032335049242184190574590541674609279012⟩,⟨1788992015667248203340544680894521036768602758,1788992015667248203340544680894521036768602759⟩⟩, + ⟨⟨-285795880362944630156611787217425830455051906,-285795880362944630156611787217425830455051905⟩,⟨167187422711495596941515755503569984988440187,167187422711495596941515755503569984988440188⟩⟩, + ⟨⟨-40351198022438374857283097286841165452399805,-40351198022438374857283097286841165452399804⟩,⟨12418367239132566535215511860020426332870540,12418367239132566535215511860020426332870541⟩⟩, + ⟨⟨-4279314586270470875474639263658062597443391,-4279314586270470875474639263658062597443390⟩,⟨1416190475604209288440234044257640040137232,1416190475604209288440234044257640040137233⟩⟩, + ⟨⟨-310849818178266983162038970316563133352191,-310849818178266983162038970316563133352190⟩,⟨254643852398160982252811944881638986218097,254643852398160982252811944881638986218098⟩⟩, + ⟨⟨-1202605618497685638175928509885936320955,-1202605618497685638175928509885936320954⟩,⟨30704490994837668016971117041028181223741,30704490994837668016971117041028181223742⟩⟩, + ⟨⟨2204550664064065543664719365484134726181,2204550664064065543664719365484134726182⟩,⟨243612523053275034172692975614041666754,243612523053275034172692975614041666755⟩⟩, + ⟨⟨-117212020886755311991292184956639542604,-117212020886755311991292184956639542603⟩,⟨-150226989100792689110364369588961917499,-150226989100792689110364369588961917498⟩⟩, + ⟨⟨21215938129725765613684525509280256121,21215938129725765613684525509280256122⟩,⟨21184937277340203612162907819235403440,21184937277340203612162907819235403441⟩⟩, + ⟨⟨-14797760097053204628192586390644176867,-14797760097053204628192586390644176866⟩,⟨-1,1⟩⟩, + ⟨⟨21215938129725765613684525509280256121,21215938129725765613684525509280256122⟩,⟨-21184937277340203612162907819235403441,-21184937277340203612162907819235403440⟩⟩, + ⟨⟨-117212020886755311991292184956639542604,-117212020886755311991292184956639542603⟩,⟨150226989100792689110364369588961917498,150226989100792689110364369588961917499⟩⟩, + ⟨⟨2204550664064065543664719365484134726181,2204550664064065543664719365484134726182⟩,⟨-243612523053275034172692975614041666755,-243612523053275034172692975614041666754⟩⟩, + ⟨⟨-1202605618497685638175928509885936320955,-1202605618497685638175928509885936320954⟩,⟨-30704490994837668016971117041028181223742,-30704490994837668016971117041028181223741⟩⟩, + ⟨⟨-310849818178266983162038970316563133352191,-310849818178266983162038970316563133352190⟩,⟨-254643852398160982252811944881638986218098,-254643852398160982252811944881638986218097⟩⟩, + ⟨⟨-4279314586270470875474639263658062597443391,-4279314586270470875474639263658062597443390⟩,⟨-1416190475604209288440234044257640040137233,-1416190475604209288440234044257640040137232⟩⟩, + ⟨⟨-40351198022438374857283097286841165452399805,-40351198022438374857283097286841165452399804⟩,⟨-12418367239132566535215511860020426332870541,-12418367239132566535215511860020426332870540⟩⟩, + ⟨⟨-285795880362944630156611787217425830455051906,-285795880362944630156611787217425830455051905⟩,⟨-167187422711495596941515755503569984988440188,-167187422711495596941515755503569984988440187⟩⟩, + ⟨⟨-1288991032335049242184190574590541674609279013,-1288991032335049242184190574590541674609279012⟩,⟨-1788992015667248203340544680894521036768602759,-1788992015667248203340544680894521036768602758⟩⟩, + ⟨⟨-845288657703516014016479581747706658582115515,-845288657703516014016479581747706658582115514⟩,⟨-12655121609614339549739531843208547080663191352,-12655121609614339549739531843208547080663191351⟩⟩, + ⟨⟨36124075334127409193135525587557901122008934656,36124075334127409193135525587557901122008934657⟩,⟨-52925460771353958060104116595213924450708406468,-52925460771353958060104116595213924450708406466⟩⟩, + ⟨⟨281619019557545816440896527899067266949462549428,281619019557545816440896527899067266949462549429⟩,⟨-63539755561584079818050454813438362717009862761,-63539755561584079818050454813438362717009862760⟩⟩, + ⟨⟨973446108001172001572836858112151337643289840944,973446108001172001572836858112151337643289840946⟩,⟨658927006441565598264763662279287129599510764420,658927006441565598264763662279287129599510764422⟩⟩, + ⟨⟨457789539744015815222600601481827934128683625281,457789539744015815222600601481827934128683625285⟩,⟨4351696512898618880970864766181784547921700398695,4351696512898618880970864766181784547921700398700⟩⟩, + ⟨⟨-10894676728697761324488340081446760636039536604177,-10894676728697761324488340081446760636039536604165⟩,⟨10367998037625021513164676932952099076359963771630,10367998037625021513164676932952099076359963771642⟩⟩] +lemma tw1_0_3_17_calc (j : Fin 31) : taylorWaveBox 1 0 3 17 j = tw1_0_3_17 j := by + revert j + decide +kernel +def tw1_0_3_18 : Fin 31 → CI := ![⟨⟨-1014901405735380999860771514966725438664295409989,-1014901405735380999860771514966725438664295409987⟩,⟨1751830113595718598953034867082991568648442509488,1751830113595718598953034867082991568648442509490⟩⟩, + ⟨⟨-546041907932958049422099255496348568319742794834,-546041907932958049422099255496348568319742794832⟩,⟨80783034707688612522355991463485667666345467050,80783034707688612522355991463485667666345467051⟩⟩, + ⟨⟨-105334609068269414788027745565863099838962779013,-105334609068269414788027745565863099838962779012⟩,⟨-89733155462853629564359108772166309714826592937,-89733155462853629564359108772166309714826592935⟩⟩, + ⟨⟨-2193454786759337331926455380098795946589007464,-2193454786759337331926455380098795946589007463⟩,⟨-31487235057936512230656996199458045367738285396,-31487235057936512230656996199458045367738285395⟩⟩, + ⟨⟨3945608220399544786532301479529378609159977187,3945608220399544786532301479529378609159977188⟩,⟨-5130364683475870994410826647017839570041477213,-5130364683475870994410826647017839570041477212⟩⟩, + ⟨⟨1130923223012315001028260004828418918552223989,1130923223012315001028260004828418918552223990⟩,⟨-323807019757050059591689660747233716577171363,-323807019757050059591689660747233716577171362⟩⟩, + ⟨⟨181001951921044724360650243317958608426909935,181001951921044724360650243317958608426909936⟩,⟨45034277205662625795268597751452789440197059,45034277205662625795268597751452789440197060⟩⟩, + ⟨⟨20650426358701118957300261339746259533134037,20650426358701118957300261339746259533134038⟩,⟨14699968614246303077895759084398930452643212,14699968614246303077895759084398930452643213⟩⟩, + ⟨⟨2026265158864708466469495563885928409949177,2026265158864708466469495563885928409949178⟩,⟨2074779906274820045942171393362976099435147,2074779906274820045942171393362976099435148⟩⟩, + ⟨⟨208590192570303221203530839694419785272896,208590192570303221203530839694419785272897⟩,⟨179573451834695754324727327050889372719631,179573451834695754324727327050889372719632⟩⟩, + ⟨⟨20876569162361584568982371263973031833275,20876569162361584568982371263973031833276⟩,⟨5563509456332539710733716232846356607192,5563509456332539710733716232846356607193⟩⟩, + ⟨⟨1109569895780114498151263665783854764688,1109569895780114498151263665783854764689⟩,⟨-922631178124424924370461046332896390468,-922631178124424924370461046332896390467⟩⟩, + ⟨⟨-62880240767346326805950970913563006131,-62880240767346326805950970913563006130⟩,⟨-65368314549884500845142770430207600471,-65368314549884500845142770430207600470⟩⟩, + ⟨⟨1060368652135970844397375405641764441,1060368652135970844397375405641764442⟩,⟨6765255740689886346282140833578370382,6765255740689886346282140833578370383⟩⟩, + ⟨⟨-481644900014585597319371821220283194,-481644900014585597319371821220283193⟩,⟨-850688420304086628721770004023688204,-850688420304086628721770004023688203⟩⟩, + ⟨⟨464885344104865334596697156861129451,464885344104865334596697156861129452⟩,⟨-1,1⟩⟩, + ⟨⟨-481644900014585597319371821220283194,-481644900014585597319371821220283193⟩,⟨850688420304086628721770004023688203,850688420304086628721770004023688204⟩⟩, + ⟨⟨1060368652135970844397375405641764441,1060368652135970844397375405641764442⟩,⟨-6765255740689886346282140833578370383,-6765255740689886346282140833578370382⟩⟩, + ⟨⟨-62880240767346326805950970913563006131,-62880240767346326805950970913563006130⟩,⟨65368314549884500845142770430207600470,65368314549884500845142770430207600471⟩⟩, + ⟨⟨1109569895780114498151263665783854764688,1109569895780114498151263665783854764689⟩,⟨922631178124424924370461046332896390467,922631178124424924370461046332896390468⟩⟩, + ⟨⟨20876569162361584568982371263973031833275,20876569162361584568982371263973031833276⟩,⟨-5563509456332539710733716232846356607193,-5563509456332539710733716232846356607192⟩⟩, + ⟨⟨208590192570303221203530839694419785272896,208590192570303221203530839694419785272897⟩,⟨-179573451834695754324727327050889372719632,-179573451834695754324727327050889372719631⟩⟩, + ⟨⟨2026265158864708466469495563885928409949177,2026265158864708466469495563885928409949178⟩,⟨-2074779906274820045942171393362976099435148,-2074779906274820045942171393362976099435147⟩⟩, + ⟨⟨20650426358701118957300261339746259533134037,20650426358701118957300261339746259533134038⟩,⟨-14699968614246303077895759084398930452643213,-14699968614246303077895759084398930452643212⟩⟩, + ⟨⟨181001951921044724360650243317958608426909935,181001951921044724360650243317958608426909936⟩,⟨-45034277205662625795268597751452789440197060,-45034277205662625795268597751452789440197059⟩⟩, + ⟨⟨1130923223012315001028260004828418918552223989,1130923223012315001028260004828418918552223990⟩,⟨323807019757050059591689660747233716577171362,323807019757050059591689660747233716577171363⟩⟩, + ⟨⟨3945608220399544786532301479529378609159977187,3945608220399544786532301479529378609159977188⟩,⟨5130364683475870994410826647017839570041477212,5130364683475870994410826647017839570041477213⟩⟩, + ⟨⟨-2193454786759337331926455380098795946589007464,-2193454786759337331926455380098795946589007463⟩,⟨31487235057936512230656996199458045367738285395,31487235057936512230656996199458045367738285396⟩⟩, + ⟨⟨-105334609068269414788027745565863099838962779013,-105334609068269414788027745565863099838962779012⟩,⟨89733155462853629564359108772166309714826592935,89733155462853629564359108772166309714826592937⟩⟩, + ⟨⟨-546041907932958049422099255496348568319742794834,-546041907932958049422099255496348568319742794832⟩,⟨-80783034707688612522355991463485667666345467051,-80783034707688612522355991463485667666345467050⟩⟩, + ⟨⟨-1014901405735380999860771514966725438664295409989,-1014901405735380999860771514966725438664295409987⟩,⟨-1751830113595718598953034867082991568648442509490,-1751830113595718598953034867082991568648442509488⟩⟩] +lemma tw1_0_3_18_calc (j : Fin 31) : taylorWaveBox 1 0 3 18 j = tw1_0_3_18 j := by + revert j + decide +kernel +def tw1_0_3_19 : Fin 31 → CI := ![⟨⟨248760089178570515802018727947867854172670505931,248760089178570515802018727947867854172670505932⟩,⟨74109444949440602922574589391599321503885173416,74109444949440602922574589391599321503885173417⟩⟩, + ⟨⟨25737068583769049191870879513517178048481678472,25737068583769049191870879513517178048481678473⟩,⟨61117838235608951561943340478268185890340558338,61117838235608951561943340478268185890340558339⟩⟩, + ⟨⟨-6543542125260456025115811258715616825569741803,-6543542125260456025115811258715616825569741802⟩,⟨14065602437505498799302352857829015759705017065,14065602437505498799302352857829015759705017066⟩⟩, + ⟨⟨-3074691552592031247821004108869624732978593507,-3074691552592031247821004108869624732978593506⟩,⟨1160855915746825428350235092446307771579200658,1160855915746825428350235092446307771579200659⟩⟩, + ⟨⟨-587080565278386457812450005763795443021921991,-587080565278386457812450005763795443021921990⟩,⟨-207215275638143460431989933493983733824292226,-207215275638143460431989933493983733824292225⟩⟩, + ⟨⟨-60749041972428634315125731681055841835032089,-60749041972428634315125731681055841835032088⟩,⟨-84303782475866162561645085644776842313374456,-84303782475866162561645085644776842313374455⟩⟩, + ⟨⟨-2047009679695020010021532308318858753690524,-2047009679695020010021532308318858753690523⟩,⟨-14886336766956701535319620927218155271048729,-14886336766956701535319620927218155271048728⟩⟩, + ⟨⟨359522982489314541304430950237379838450221,359522982489314541304430950237379838450222⟩,⟨-1812842725395237742141101656814812174238773,-1812842725395237742141101656814812174238772⟩⟩, + ⟨⟨60080090278437292490303614961158310151151,60080090278437292490303614961158310151152⟩,⟨-179960598100866571163601216461729180318303,-179960598100866571163601216461729180318302⟩⟩, + ⟨⟨2713704557298314879915205596295347198382,2713704557298314879915205596295347198383⟩,⟨-15774498394094116299819779286636026459767,-15774498394094116299819779286636026459766⟩⟩, + ⟨⟨-393431303027845244620380770170795714678,-393431303027845244620380770170795714677⟩,⟨-1033995214638787916800004821536227417307,-1033995214638787916800004821536227417306⟩⟩, + ⟨⟨-63870542868498089972763732619725297871,-63870542868498089972763732619725297870⟩,⟨-9281888202915025075017637967974358201,-9281888202915025075017637967974358200⟩⟩, + ⟨⟨251526239470787558255728650633279742,251526239470787558255728650633279743⟩,⟨3523625734695312469678326694814646650,3523625734695312469678326694814646651⟩⟩, + ⟨⟨80727165464774727765370830665591496,80727165464774727765370830665591497⟩,⟨-220041620581697444252246453493866296,-220041620581697444252246453493866295⟩⟩, + ⟨⟨7340632260762170745202951542533444,7340632260762170745202951542533445⟩,⟨29455532935770428825271909768049821,29455532935770428825271909768049822⟩⟩, + ⟨⟨-13909336969537219327017136873717934,-13909336969537219327017136873717933⟩,⟨-1,1⟩⟩, + ⟨⟨7340632260762170745202951542533444,7340632260762170745202951542533445⟩,⟨-29455532935770428825271909768049822,-29455532935770428825271909768049821⟩⟩, + ⟨⟨80727165464774727765370830665591496,80727165464774727765370830665591497⟩,⟨220041620581697444252246453493866295,220041620581697444252246453493866296⟩⟩, + ⟨⟨251526239470787558255728650633279742,251526239470787558255728650633279743⟩,⟨-3523625734695312469678326694814646651,-3523625734695312469678326694814646650⟩⟩, + ⟨⟨-63870542868498089972763732619725297871,-63870542868498089972763732619725297870⟩,⟨9281888202915025075017637967974358200,9281888202915025075017637967974358201⟩⟩, + ⟨⟨-393431303027845244620380770170795714678,-393431303027845244620380770170795714677⟩,⟨1033995214638787916800004821536227417306,1033995214638787916800004821536227417307⟩⟩, + ⟨⟨2713704557298314879915205596295347198382,2713704557298314879915205596295347198383⟩,⟨15774498394094116299819779286636026459766,15774498394094116299819779286636026459767⟩⟩, + ⟨⟨60080090278437292490303614961158310151151,60080090278437292490303614961158310151152⟩,⟨179960598100866571163601216461729180318302,179960598100866571163601216461729180318303⟩⟩, + ⟨⟨359522982489314541304430950237379838450221,359522982489314541304430950237379838450222⟩,⟨1812842725395237742141101656814812174238772,1812842725395237742141101656814812174238773⟩⟩, + ⟨⟨-2047009679695020010021532308318858753690524,-2047009679695020010021532308318858753690523⟩,⟨14886336766956701535319620927218155271048728,14886336766956701535319620927218155271048729⟩⟩, + ⟨⟨-60749041972428634315125731681055841835032089,-60749041972428634315125731681055841835032088⟩,⟨84303782475866162561645085644776842313374455,84303782475866162561645085644776842313374456⟩⟩, + ⟨⟨-587080565278386457812450005763795443021921991,-587080565278386457812450005763795443021921990⟩,⟨207215275638143460431989933493983733824292225,207215275638143460431989933493983733824292226⟩⟩, + ⟨⟨-3074691552592031247821004108869624732978593507,-3074691552592031247821004108869624732978593506⟩,⟨-1160855915746825428350235092446307771579200659,-1160855915746825428350235092446307771579200658⟩⟩, + ⟨⟨-6543542125260456025115811258715616825569741803,-6543542125260456025115811258715616825569741802⟩,⟨-14065602437505498799302352857829015759705017066,-14065602437505498799302352857829015759705017065⟩⟩, + ⟨⟨25737068583769049191870879513517178048481678472,25737068583769049191870879513517178048481678473⟩,⟨-61117838235608951561943340478268185890340558339,-61117838235608951561943340478268185890340558338⟩⟩, + ⟨⟨248760089178570515802018727947867854172670505931,248760089178570515802018727947867854172670505932⟩,⟨-74109444949440602922574589391599321503885173417,-74109444949440602922574589391599321503885173416⟩⟩] +lemma tw1_0_3_19_calc (j : Fin 31) : taylorWaveBox 1 0 3 19 j = tw1_0_3_19 j := by + revert j + decide +kernel +def tw1_0_3_20 : Fin 31 → CI := ![⟨⟨1714431792956153586323773437740355466934097095,1714431792956153586323773437740355466934097096⟩,⟨-31718942187321443525615589602576107543562061991,-31718942187321443525615589602576107543562061990⟩⟩, + ⟨⟨6053089733192319466710044038810768395698666441,6053089733192319466710044038810768395698666442⟩,⟨-4604045111119392820392241741166004208831209637,-4604045111119392820392241741166004208831209636⟩⟩, + ⟨⟨1637512198603006209791808550551425306452711918,1637512198603006209791808550551425306452711919⟩,⟨273143066842731354540350424450405475452656028,273143066842731354540350424450405475452656029⟩⟩, + ⟨⟨198326210148175605226935663787800832712069512,198326210148175605226935663787800832712069513⟩,⟨259555983898235670892824897867364968883972356,259555983898235670892824897867364968883972357⟩⟩, + ⟨⟨-1315962365712151660164748131503860934663596,-1315962365712151660164748131503860934663595⟩,⟨57150498626126498380065245662016597905221010,57150498626126498380065245662016597905221011⟩⟩, + ⟨⟨-4953095855193463608014828736058448525372461,-4953095855193463608014828736058448525372460⟩,⟨7227123123832437162833983176999605426042995,7227123123832437162833983176999605426042996⟩⟩, + ⟨⟨-1004419499938908619049398094060532317974589,-1004419499938908619049398094060532317974588⟩,⟨571308933225704400126465380650612295554280,571308933225704400126465380650612295554281⟩⟩, + ⟨⟨-125322768292498644260274325393219178543582,-125322768292498644260274325393219178543581⟩,⟨28956995234581769072074878736401557450338,28956995234581769072074878736401557450339⟩⟩, + ⟨⟨-11709671877247107500680554763188135895589,-11709671877247107500680554763188135895588⟩,⟨1803222784912264410892065940064870982636,1803222784912264410892065940064870982637⟩⟩, + ⟨⟨-828367588631560359758774191498604913012,-828367588631560359758774191498604913011⟩,⟨321346585759825938719829481108821547034,321346585759825938719829481108821547035⟩⟩, + ⟨⟨-29778675864032195813432067549121463821,-29778675864032195813432067549121463820⟩,⟨45136906133800694904584490114372751512,45136906133800694904584490114372751513⟩⟩, + ⟨⟨1529593875162620122930705462440496621,1529593875162620122930705462440496622⟩,⟨2291910594618315239382369414563611711,2291910594618315239382369414563611712⟩⟩, + ⟨⟨76678523778719239012924246244169201,76678523778719239012924246244169202⟩,⟨-106620826156431598895819574057436334,-106620826156431598895819574057436333⟩⟩, + ⟨⟨-5796881336606709341664848404400794,-5796881336606709341664848404400793⟩,⟨5003505958065414421398911862803347,5003505958065414421398911862803348⟩⟩, + ⟨⟨24032047725696359626583066614929,24032047725696359626583066614930⟩,⟨-899483599863721056509021447301652,-899483599863721056509021447301651⟩⟩, + ⟨⟨397249734907300417672165166097514,397249734907300417672165166097515⟩,⟨-1,1⟩⟩, + ⟨⟨24032047725696359626583066614929,24032047725696359626583066614930⟩,⟨899483599863721056509021447301651,899483599863721056509021447301652⟩⟩, + ⟨⟨-5796881336606709341664848404400794,-5796881336606709341664848404400793⟩,⟨-5003505958065414421398911862803348,-5003505958065414421398911862803347⟩⟩, + ⟨⟨76678523778719239012924246244169201,76678523778719239012924246244169202⟩,⟨106620826156431598895819574057436333,106620826156431598895819574057436334⟩⟩, + ⟨⟨1529593875162620122930705462440496621,1529593875162620122930705462440496622⟩,⟨-2291910594618315239382369414563611712,-2291910594618315239382369414563611711⟩⟩, + ⟨⟨-29778675864032195813432067549121463821,-29778675864032195813432067549121463820⟩,⟨-45136906133800694904584490114372751513,-45136906133800694904584490114372751512⟩⟩, + ⟨⟨-828367588631560359758774191498604913012,-828367588631560359758774191498604913011⟩,⟨-321346585759825938719829481108821547035,-321346585759825938719829481108821547034⟩⟩, + ⟨⟨-11709671877247107500680554763188135895589,-11709671877247107500680554763188135895588⟩,⟨-1803222784912264410892065940064870982637,-1803222784912264410892065940064870982636⟩⟩, + ⟨⟨-125322768292498644260274325393219178543582,-125322768292498644260274325393219178543581⟩,⟨-28956995234581769072074878736401557450339,-28956995234581769072074878736401557450338⟩⟩, + ⟨⟨-1004419499938908619049398094060532317974589,-1004419499938908619049398094060532317974588⟩,⟨-571308933225704400126465380650612295554281,-571308933225704400126465380650612295554280⟩⟩, + ⟨⟨-4953095855193463608014828736058448525372461,-4953095855193463608014828736058448525372460⟩,⟨-7227123123832437162833983176999605426042996,-7227123123832437162833983176999605426042995⟩⟩, + ⟨⟨-1315962365712151660164748131503860934663596,-1315962365712151660164748131503860934663595⟩,⟨-57150498626126498380065245662016597905221011,-57150498626126498380065245662016597905221010⟩⟩, + ⟨⟨198326210148175605226935663787800832712069512,198326210148175605226935663787800832712069513⟩,⟨-259555983898235670892824897867364968883972357,-259555983898235670892824897867364968883972356⟩⟩, + ⟨⟨1637512198603006209791808550551425306452711918,1637512198603006209791808550551425306452711919⟩,⟨-273143066842731354540350424450405475452656029,-273143066842731354540350424450405475452656028⟩⟩, + ⟨⟨6053089733192319466710044038810768395698666441,6053089733192319466710044038810768395698666442⟩,⟨4604045111119392820392241741166004208831209636,4604045111119392820392241741166004208831209637⟩⟩, + ⟨⟨1714431792956153586323773437740355466934097095,1714431792956153586323773437740355466934097096⟩,⟨31718942187321443525615589602576107543562061990,31718942187321443525615589602576107543562061991⟩⟩] +lemma tw1_0_3_20_calc (j : Fin 31) : taylorWaveBox 1 0 3 20 j = tw1_0_3_20 j := by + revert j + decide +kernel +def tw1_0_3 : Fin 21 → Fin 31 → CI := ![tw1_0_3_0,tw1_0_3_1,tw1_0_3_2,tw1_0_3_3,tw1_0_3_4,tw1_0_3_5,tw1_0_3_6,tw1_0_3_7,tw1_0_3_8,tw1_0_3_9,tw1_0_3_10,tw1_0_3_11,tw1_0_3_12,tw1_0_3_13,tw1_0_3_14,tw1_0_3_15,tw1_0_3_16,tw1_0_3_17,tw1_0_3_18,tw1_0_3_19,tw1_0_3_20] +lemma tw1_0_3_mem (l : Fin 21) (j : Fin 31) : (tw1_0_3 l j).Mem (taylorWave 1 0 (nearNode 3) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 3 l j = tw1_0_3 l j := by + fin_cases l + · exact tw1_0_3_0_calc j + · exact tw1_0_3_1_calc j + · exact tw1_0_3_2_calc j + · exact tw1_0_3_3_calc j + · exact tw1_0_3_4_calc j + · exact tw1_0_3_5_calc j + · exact tw1_0_3_6_calc j + · exact tw1_0_3_7_calc j + · exact tw1_0_3_8_calc j + · exact tw1_0_3_9_calc j + · exact tw1_0_3_10_calc j + · exact tw1_0_3_11_calc j + · exact tw1_0_3_12_calc j + · exact tw1_0_3_13_calc j + · exact tw1_0_3_14_calc j + · exact tw1_0_3_15_calc j + · exact tw1_0_3_16_calc j + · exact tw1_0_3_17_calc j + · exact tw1_0_3_18_calc j + · exact tw1_0_3_19_calc j + · exact tw1_0_3_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 3 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave104.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave104.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0a5b0c366c2b9e62bd5bda0773c21e7cd036e5e --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave104.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_4_0 : Fin 31 → CI := ![⟨⟨-5757992012515255314766075197409626372868874709079539384909,-5757992012515255314766075197409626372868874709074675894218⟩,⟨-11304857651238284601324060970914233112065890678824013915956,-11304857651238284601324060970914233112065890678819106315255⟩⟩, + ⟨⟨9758730166396225303840577816054240845277026173604561966192,9758730166396225303840577816054240845277026173608213196796⟩,⟨-5374125878347571627115003517582317948010949728473783275465,-5374125878347571627115003517582317948010949728470168755682⟩⟩, + ⟨⟨4990259744179887939463931837755009523153024747864723009668,4990259744179887939463931837755009523153024747868962096810⟩,⟨8319232163267411475149059016701834252059807496334954476470,8319232163267411475149059016701834252059807496339223554071⟩⟩, + ⟨⟨-6986363641851843115249504572857013332414234647014646101207,-6986363641851843115249504572857013332414234647012682732630⟩,⟨4606393610012204251812860157927701098295099767260737674073,4606393610012204251812860157927701098295099767262677093725⟩⟩, + ⟨⟨-4222527475844520564161788478100392673437174786657965348630,-4222527475844520564161788478100392673437174786655175929025⟩,⟨-5760124602149520224141914484519778086340307625637517789345,-5760124602149520224141914484519778086340307625634709783529⟩⟩, + ⟨⟨4640515044160442801826288751690128513838026432203648735821,4640515044160442801826288751690128513838026432205225511765⟩,⟨-3838661341676836876510716798273084248579249806052213886139,-3838661341676836876510716798273084248579249806050651012517⟩⟩, + ⟨⟨3454795207509153188859645118445775823721324825445607997985,3454795207509153188859645118445775823721324825446977895487⟩,⟨3627534967884610848302627374368064614907391066717944531668,3627534967884610848302627374368064614907391066719324326429⟩⟩, + ⟨⟨-2721184373322024363570930352553586389548401529178940585814,-2721184373322024363570930352553586389548401529178470818495⟩,⟨3070929073341469501208573438618467398863399844840920664201,3070929073341469501208573438618467398863399844841383860500⟩⟩, + ⟨⟨-2687062939173785813557501758791158974005474864236347384317,-2687062939173785813557501758791158974005474864235673670676⟩,⟨-1921463260472683347631197686246693837761057819584989761760,-1921463260472683347631197686246693837761057819584312124515⟩⟩, + ⟨⟨1228371629336587800483429375447386959545359937936282816962,1228371629336587800483429375447386959545359937936657487020⟩,⟨-2303196805006102125906430078963850549147549883631054230980,-2303196805006102125906430078963850549147549883630681515936⟩⟩, + ⟨⟨1919330670838418438255358399136542124289624903025571402086,1919330670838418438255358399136542124289624903025877461033⟩,⟨641909479913737722127625420155665754901307884234009966616,641909479913737722127625420155665754901307884234316690811⟩⟩, + ⟨⟨-162076812204133112563785820371530223828901658477777980210,-162076812204133112563785820371530223828901658477682966398⟩,⟨1535464536670734750604286719309233699431699922420532853352,1535464536670734750604286719309233699431699922420627812859⟩⟩, + ⟨⟨-1151598402503051062953215039481925274573774941815486867340,-1151598402503051062953215039481925274573774941815384551493⟩,⟨211126373792226028208089423905019633671858739332777195222,211126373792226028208089423905019633671858739332879633257⟩⟩, + ⟨⟨-477700078075339700188000312673983817600973309197539237384,-477700078075339700188000312673983817600973309197487430445⟩,⟨-767732268335367375302143359654616849715849961210316160818,-767732268335367375302143359654616849715849961210265222775⟩⟩, + ⟨⟨383866134167683687651071679827308424857924980605128676604,383866134167683687651071679827308424857924980605162146506⟩,⟨-637644300645207903375946845935362327958442051116342167883,-637644300645207903375946845935362327958442051116306403554⟩⟩, + ⟨⟨690959041501830637771929023689155164744264965089252782524,690959041501830637771929023689155164744264965089269756784⟩,⟨-44,49⟩⟩, + ⟨⟨383866134167683687651071679827308424857924980605128676599,383866134167683687651071679827308424857924980605162146504⟩,⟨637644300645207903375946845935362327958442051116306403556,637644300645207903375946845935362327958442051116342167887⟩⟩, + ⟨⟨-477700078075339700188000312673983817600973309197539237390,-477700078075339700188000312673983817600973309197487430449⟩,⟨767732268335367375302143359654616849715849961210265222771,767732268335367375302143359654616849715849961210316160817⟩⟩, + ⟨⟨-1151598402503051062953215039481925274573774941815486867336,-1151598402503051062953215039481925274573774941815384551492⟩,⟨-211126373792226028208089423905019633671858739332879633263,-211126373792226028208089423905019633671858739332777195231⟩⟩, + ⟨⟨-162076812204133112563785820371530223828901658477777980199,-162076812204133112563785820371530223828901658477682966384⟩,⟨-1535464536670734750604286719309233699431699922420627812861,-1535464536670734750604286719309233699431699922420532853351⟩⟩, + ⟨⟨1919330670838418438255358399136542124289624903025571402087,1919330670838418438255358399136542124289624903025877461040⟩,⟨-641909479913737722127625420155665754901307884234316690803,-641909479913737722127625420155665754901307884234009966601⟩⟩, + ⟨⟨1228371629336587800483429375447386959545359937936282816943,1228371629336587800483429375447386959545359937936657487016⟩,⟨2303196805006102125906430078963850549147549883630681515935,2303196805006102125906430078963850549147549883631054230994⟩⟩, + ⟨⟨-2687062939173785813557501758791158974005474864236347384317,-2687062939173785813557501758791158974005474864235673670701⟩,⟨1921463260472683347631197686246693837761057819584312124508,1921463260472683347631197686246693837761057819584989761729⟩⟩, + ⟨⟨-2721184373322024363570930352553586389548401529178940585780,-2721184373322024363570930352553586389548401529178470818477⟩,⟨-3070929073341469501208573438618467398863399844841383860514,-3070929073341469501208573438618467398863399844840920664230⟩⟩, + ⟨⟨3454795207509153188859645118445775823721324825445607997981,3454795207509153188859645118445775823721324825446977895550⟩,⟨-3627534967884610848302627374368064614907391066719324326439,-3627534967884610848302627374368064614907391066717944531611⟩⟩, + ⟨⟨4640515044160442801826288751690128513838026432203648735800,4640515044160442801826288751690128513838026432205225511754⟩,⟨3838661341676836876510716798273084248579249806050651012535,3838661341676836876510716798273084248579249806052213886167⟩⟩, + ⟨⟨-4222527475844520564161788478100392673437174786657965348645,-4222527475844520564161788478100392673437174786655175929069⟩,⟨5760124602149520224141914484519778086340307625634709783515,5760124602149520224141914484519778086340307625637517789301⟩⟩, + ⟨⟨-6986363641851843115249504572857013332414234647014646101149,-6986363641851843115249504572857013332414234647012682732611⟩,⟨-4606393610012204251812860157927701098295099767262677093763,-4606393610012204251812860157927701098295099767260737674147⟩⟩, + ⟨⟨4990259744179887939463931837755009523153024747864723009754,4990259744179887939463931837755009523153024747868962096846⟩,⟨-8319232163267411475149059016701834252059807496339223554016,-8319232163267411475149059016701834252059807496334954476462⟩⟩, + ⟨⟨9758730166396225303840577816054240845277026173604561966121,9758730166396225303840577816054240845277026173608213196811⟩,⟨5374125878347571627115003517582317948010949728470168755697,5374125878347571627115003517582317948010949728473783275565⟩⟩, + ⟨⟨-5757992012515255314766075197409626372868874709079539384931,-5757992012515255314766075197409626372868874709074675894305⟩,⟨11304857651238284601324060970914233112065890678819106315257,11304857651238284601324060970914233112065890678824013915891⟩⟩] +lemma tw1_0_4_0_calc (j : Fin 31) : taylorWaveBox 1 0 4 0 j = tw1_0_4_0 j := by + revert j + decide +kernel +def tw1_0_4_1 : Fin 31 → CI := ![⟨⟨-8659398347105935412086587157327201737804202077004144610977,-8659398347105935412086587157327201737804202076999490365615⟩,⟨7392479795896858130519412200692328353959889030375787191803,7392479795896858130519412200692328353959889030380400472250⟩⟩, + ⟨⟨-6421019246318242552374301842616936282794233865068095427469,-6421019246318242552374301842616936282794233865064898890907⟩,⟨-6822804411548815820351967919703954122291405983503068137102,-6822804411548815820351967919703954122291405983499840944326⟩⟩, + ⟨⟨5246755450974466690188834218729279092914992501385608937432,5246755450974466690188834218729279092914992501389088089564⟩,⟨-5516555976020910807204716336822605733777934228398806120318,-5516555976020910807204716336822605733777934228395349163942⟩⟩, + ⟨⟨4679089985004862895010655683309336706910990120369104617707,4679089985004862895010655683309336706910990120370566769078⟩,⟨3912641110026975845770651373213992893522362872702599419432,3912641110026975845770651373213992893522362872704076976630⟩⟩, + ⟨⟨-2801851033350431111270884701968911767960918339494215531205,-2801851033350431111270884701968911767960918339492309240235⟩,⟨3908621273270098815792119882077129202193401540983823603785,3908621273270098815792119882077129202193401540985719786043⟩⟩, + ⟨⟨-3205149840816618569549108933125983219625168490242364970958,-3205149840816618569549108933125983219625168490241407025227⟩,⟨-1895774865588920310862999523804851960078060143801441904165,-1895774865588920310862999523804851960078060143800477831742⟩⟩, + ⟨⟨1175802251386531268720461157532629713721189527669898286268,1175802251386531268720461157532629713721189527670640586068⟩,⟨-2568675687644422156281622836455898759206290968141548432681,-2568675687644422156281622836455898759206290968140809414937⟩⟩, + ⟨⟨1999198813753509575989661592066875820936768974682539859743,1999198813753509575989661592066875820936768974682761664939⟩,⟨623322835387351809016734921963061272737707733144918280599,623322835387351809016734921963061272737707733145141482879⟩⟩, + ⟨⟨-219726262235469755925286135906962880975016002269210487381,-219726262235469755925286135906962880975016002268949504785⟩,⟨1496719219143880828673225199958914404816602509866171429168,1496719219143880828673225199958914404816602509866432117704⟩⟩, + ⟨⟨-1061236903815535914332313660132014510845791573692194689024,-1061236903815535914332313660132014510845791573692069683500⟩,⟨53597823425027066380419881824849217719484422913679028998,53597823425027066380419881824849217719484422913803829793⟩⟩, + ⟨⟨-215259776950050833726917812421558779498392300359651779864,-215259776950050833726917812421558779498392300359539426727⟩,⟨-692751867768474832966926972586176139024336166160198514515,-692751867768474832966926972586176139024336166160085884378⟩⟩, + ⟨⟨391264111002697584577065137321399289352236287270312252152,391264111002697584577065137321399289352236287270351709954⟩,⟨-283869953695513721940742337072349560514306388024663412881,-283869953695513721940742337072349560514306388024624055547⟩⟩, + ⟨⟨278038709017327906848428136966405316919825443865030016434,278038709017327906848428136966405316919825443865064045062⟩,⟨156773633518204169162728154337683961829491937022684704394,156773633518204169162728154337683961829491937022718632790⟩⟩, + ⟨⟨10719564685005413276083976364969843543896884582743243929,10719564685005413276083976364969843543896884582754018048⟩,⟨216376398271405564276509893292909804867548225836961311907,216376398271405564276509893292909804867548225836972091081⟩⟩, + ⟨⟨-117493376813658870051522287241046780510073491896568009046,-117493376813658870051522287241046780510073491896559901045⟩,⟨111215483606931162739371254786562126767930177546014552669,111215483606931162739371254786562126767930177546023129919⟩⟩, + ⟨⟨-144714123247573079227133680927092887842607941867110924349,-144714123247573079227133680927092887842607941867106908628⟩,⟨-11,10⟩⟩, + ⟨⟨-117493376813658870051522287241046780510073491896568009045,-117493376813658870051522287241046780510073491896559901044⟩,⟨-111215483606931162739371254786562126767930177546023129920,-111215483606931162739371254786562126767930177546014552670⟩⟩, + ⟨⟨10719564685005413276083976364969843543896884582743243931,10719564685005413276083976364969843543896884582754018050⟩,⟨-216376398271405564276509893292909804867548225836972091081,-216376398271405564276509893292909804867548225836961311906⟩⟩, + ⟨⟨278038709017327906848428136966405316919825443865030016436,278038709017327906848428136966405316919825443865064045063⟩,⟨-156773633518204169162728154337683961829491937022718632787,-156773633518204169162728154337683961829491937022684704392⟩⟩, + ⟨⟨391264111002697584577065137321399289352236287270312252149,391264111002697584577065137321399289352236287270351709953⟩,⟨283869953695513721940742337072349560514306388024624055549,283869953695513721940742337072349560514306388024663412885⟩⟩, + ⟨⟨-215259776950050833726917812421558779498392300359651779869,-215259776950050833726917812421558779498392300359539426730⟩,⟨692751867768474832966926972586176139024336166160085884376,692751867768474832966926972586176139024336166160198514515⟩⟩, + ⟨⟨-1061236903815535914332313660132014510845791573692194689026,-1061236903815535914332313660132014510845791573692069683498⟩,⟨-53597823425027066380419881824849217719484422913803829800,-53597823425027066380419881824849217719484422913679029001⟩⟩, + ⟨⟨-219726262235469755925286135906962880975016002269210487366,-219726262235469755925286135906962880975016002268949504779⟩,⟨-1496719219143880828673225199958914404816602509866432117701,-1496719219143880828673225199958914404816602509866171429174⟩⟩, + ⟨⟨1999198813753509575989661592066875820936768974682539859751,1999198813753509575989661592066875820936768974682761664941⟩,⟨-623322835387351809016734921963061272737707733145141482859,-623322835387351809016734921963061272737707733144918280586⟩⟩, + ⟨⟨1175802251386531268720461157532629713721189527669898286232,1175802251386531268720461157532629713721189527670640586067⟩,⟨2568675687644422156281622836455898759206290968140809414930,2568675687644422156281622836455898759206290968141548432710⟩⟩, + ⟨⟨-3205149840816618569549108933125983219625168490242364970970,-3205149840816618569549108933125983219625168490241407025234⟩,⟨1895774865588920310862999523804851960078060143800477831725,1895774865588920310862999523804851960078060143801441904154⟩⟩, + ⟨⟨-2801851033350431111270884701968911767960918339494215531171,-2801851033350431111270884701968911767960918339492309240220⟩,⟨-3908621273270098815792119882077129202193401540985719786046,-3908621273270098815792119882077129202193401540983823603807⟩⟩, + ⟨⟨4679089985004862895010655683309336706910990120369104617753,4679089985004862895010655683309336706910990120370566769096⟩,⟨-3912641110026975845770651373213992893522362872704076976576,-3912641110026975845770651373213992893522362872702599419406⟩⟩, + ⟨⟨5246755450974466690188834218729279092914992501385608937416,5246755450974466690188834218729279092914992501389088089509⟩,⟨5516555976020910807204716336822605733777934228395349164001,5516555976020910807204716336822605733777934228398806120339⟩⟩, + ⟨⟨-6421019246318242552374301842616936282794233865068095427548,-6421019246318242552374301842616936282794233865064898890910⟩,⟨6822804411548815820351967919703954122291405983499840944254,6822804411548815820351967919703954122291405983503068137105⟩⟩, + ⟨⟨-8659398347105935412086587157327201737804202077004144610906,-8659398347105935412086587157327201737804202076999490365606⟩,⟨-7392479795896858130519412200692328353959889030380400472260,-7392479795896858130519412200692328353959889030375787191875⟩⟩] +lemma tw1_0_4_1_calc (j : Fin 31) : taylorWaveBox 1 0 4 1 j = tw1_0_4_1 j := by + revert j + decide +kernel +def tw1_0_4_2 : Fin 31 → CI := ![⟨⟨6198581823797226848152981313957324485810638423803914496306,6198581823797226848152981313957324485810638423807027721139⟩,⟨4506354954023223879610390809743151568248316452976774187199,4506354954023223879610390809743151568248316452979909794706⟩⟩, + ⟨⟨-3159202697399634249477692885000644702868713407148036448072,-3159202697399634249477692885000644702868713407146023738323⟩,⟨4994101062186323848331416649655562294648465572314589585806,4994101062186323848331416649655562294648465572316587803850⟩⟩, + ⟨⟨-3953325536442542478153582863292684357025905884254867326257,-3953325536442542478153582863292684357025905884252895192333⟩,⟨-2109589037790883872270879104215709145129461508417884482495,-2109589037790883872270879104215709145129461508415903597168⟩⟩, + ⟨⟨1313664358446850882906807267940429469975307230869286705669,1313664358446850882906807267940429469975307230870056684706⟩,⟨-3064562015432516906930642035015913226261558419375862164161,-3064562015432516906930642035015913226261558419375096937463⟩⟩, + ⟨⟨2316117268022881303973756244972471455674022237435075679215,2316117268022881303973756244972471455674022237435952783547⟩,⟨730827162376681702604790154463772876429163976432458503466,730827162376681702604790154463772876429163976433337734245⟩⟩, + ⟨⟨-323724072348791038886595519811589187592112074880101901367,-323724072348791038886595519811589187592112074879709229920⟩,⟨1696298063080269838594087573309581598581896398188919820794,1696298063080269838594087573309581598581896398189311945235⟩⟩, + ⟨⟨-1193411169471316680102798100174466208303779961391543528411,-1193411169471316680102798100174466208303779961391286500423⟩,⟨-58249830890861885576446097746610850643398783829951863936,-58249830890861885576446097746610850643398783829695107286⟩⟩, + ⟨⟨-96452699710154477198980400231547063159561711252462033178,-96452699710154477198980400231547063159561711252380918756⟩,⟨-795763356062655997811049905714347838158271986797582911106,-795763356062655997811049905714347838158271986797501224093⟩⟩, + ⟨⟨491661391720921961030005070076449041463971534162575894998,491661391720921961030005070076449041463971534162678954179⟩,⟨-167992537408038483010551284886386858481188297056156728464,-167992537408038483010551284886386858481188297056054228683⟩⟩, + ⟨⟨180730580397302279126678889244528215907732932424681898102,180730580397302279126678889244528215907732932424733074812⟩,⟨269412045312748739070825673407992371539477663241775647055,269412045312748739070825673407992371539477663241827181084⟩⟩, + ⟨⟨-117322085704770501244673795856200381703389433790211843446,-117322085704770501244673795856200381703389433790176792689⟩,⟨155779607113189726513320568595708191947280648355891798142,155779607113189726513320568595708191947280648355926739132⟩⟩, + ⟨⟨-111004276231676399833978700492781219029749548001599871566,-111004276231676399833978700492781219029749548001590926227⟩,⟨-23698281763621416862711517568295625274305905562940855136,-23698281763621416862711517568295625274305905562931902076⟩⟩, + ⟨⟨-23152597644064344763899081308499344429173861684845760608,-23152597644064344763899081308499344429173861684838630638⟩,⟨-61021126669469587449700684751719105506890806667856814408,-61021126669469587449700684751719105506890806667849697167⟩⟩, + ⟨⟨17198577584008291419078943451611035652288671814971735626,17198577584008291419078943451611035652288671814974309625⟩,⟨-34923783651652614323995920626961974088450808198012532622,-34923783651652614323995920626961974088450808198009912568⟩⟩, + ⟨⟨23308507392509222506416920239869710384925874221439834970,23308507392509222506416920239869710384925874221441245600⟩,⟨-12343071626536772501749079065336430338639536942553043304,-12343071626536772501749079065336430338639536942551581707⟩⟩, + ⟨⟨22731641323263174859100916193799356348643427836026605182,22731641323263174859100916193799356348643427836027308328⟩,⟨-2,2⟩⟩, + ⟨⟨23308507392509222506416920239869710384925874221439834970,23308507392509222506416920239869710384925874221441245600⟩,⟨12343071626536772501749079065336430338639536942551581707,12343071626536772501749079065336430338639536942553043304⟩⟩, + ⟨⟨17198577584008291419078943451611035652288671814971735625,17198577584008291419078943451611035652288671814974309625⟩,⟨34923783651652614323995920626961974088450808198009912568,34923783651652614323995920626961974088450808198012532622⟩⟩, + ⟨⟨-23152597644064344763899081308499344429173861684845760609,-23152597644064344763899081308499344429173861684838630638⟩,⟨61021126669469587449700684751719105506890806667849697167,61021126669469587449700684751719105506890806667856814407⟩⟩, + ⟨⟨-111004276231676399833978700492781219029749548001599871567,-111004276231676399833978700492781219029749548001590926227⟩,⟨23698281763621416862711517568295625274305905562931902075,23698281763621416862711517568295625274305905562940855135⟩⟩, + ⟨⟨-117322085704770501244673795856200381703389433790211843445,-117322085704770501244673795856200381703389433790176792687⟩,⟨-155779607113189726513320568595708191947280648355926739133,-155779607113189726513320568595708191947280648355891798142⟩⟩, + ⟨⟨180730580397302279126678889244528215907732932424681898103,180730580397302279126678889244528215907732932424733074815⟩,⟨-269412045312748739070825673407992371539477663241827181084,-269412045312748739070825673407992371539477663241775647053⟩⟩, + ⟨⟨491661391720921961030005070076449041463971534162575894999,491661391720921961030005070076449041463971534162678954176⟩,⟨167992537408038483010551284886386858481188297056054228689,167992537408038483010551284886386858481188297056156728466⟩⟩, + ⟨⟨-96452699710154477198980400231547063159561711252462033183,-96452699710154477198980400231547063159561711252380918764⟩,⟨795763356062655997811049905714347838158271986797501224093,795763356062655997811049905714347838158271986797582911104⟩⟩, + ⟨⟨-1193411169471316680102798100174466208303779961391543528419,-1193411169471316680102798100174466208303779961391286500418⟩,⟨58249830890861885576446097746610850643398783829695107272,58249830890861885576446097746610850643398783829951863933⟩⟩, + ⟨⟨-323724072348791038886595519811589187592112074880101901360,-323724072348791038886595519811589187592112074879709229911⟩,⟨-1696298063080269838594087573309581598581896398189311945238,-1696298063080269838594087573309581598581896398188919820795⟩⟩, + ⟨⟨2316117268022881303973756244972471455674022237435075679222,2316117268022881303973756244972471455674022237435952783545⟩,⟨-730827162376681702604790154463772876429163976433337734227,-730827162376681702604790154463772876429163976432458503456⟩⟩, + ⟨⟨1313664358446850882906807267940429469975307230869286705651,1313664358446850882906807267940429469975307230870056684674⟩,⟨3064562015432516906930642035015913226261558419375096937481,3064562015432516906930642035015913226261558419375862164164⟩⟩, + ⟨⟨-3953325536442542478153582863292684357025905884254867326263,-3953325536442542478153582863292684357025905884252895192361⟩,⟨2109589037790883872270879104215709145129461508415903597153,2109589037790883872270879104215709145129461508417884482457⟩⟩, + ⟨⟨-3159202697399634249477692885000644702868713407148036448067,-3159202697399634249477692885000644702868713407146023738272⟩,⟨-4994101062186323848331416649655562294648465572316587803893,-4994101062186323848331416649655562294648465572314589585802⟩⟩, + ⟨⟨6198581823797226848152981313957324485810638423803914496348,6198581823797226848152981313957324485810638423807027721139⟩,⟨-4506354954023223879610390809743151568248316452979909794653,-4506354954023223879610390809743151568248316452976774187187⟩⟩] +lemma tw1_0_4_2_calc (j : Fin 31) : taylorWaveBox 1 0 4 2 j = tw1_0_4_2 j := by + revert j + decide +kernel +def tw1_0_4_3 : Fin 31 → CI := ![⟨⟨1580585171525224832565690420188418411059397848234944780899,1580585171525224832565690420188418411059397848236547090584⟩,⟨-3811855118107191570486280666578204826410976861001230395699,-3811855118107191570486280666578204826410976860999634849377⟩⟩, + ⟨⟨2837575307363998139976507016070215515977151464006738269783,2837575307363998139976507016070215515977151464007679781141⟩,⟨916300438280290626367264201298567465842191435493158478421,916300438280290626367264201298567465842191435494103130354⟩⟩, + ⟨⟨-460511600407707417826745505391885538970957905593746404082,-460511600407707417826745505391885538970957905592909137025⟩,⟨2059060999295125596723297772182052890222494971778548164070,2059060999295125596723297772182052890222494971779384485280⟩⟩, + ⟨⟨-1448760667131591781593001551975596294702463683989266027895,-1448760667131591781593001551975596294702463683988971024826⟩,⟨-165162219137791716619862156919720616510224635557931646694,-165162219137791716619862156919720616510224635557636884338⟩⟩, + ⟨⟨-10434394340358731595405592131691074574677127132470492960,-10434394340358731595405592131691074574677127132176165453⟩,⟨-981163637939153954647052260137771049375813433668751990343,-981163637939153954647052260137771049375813433668456908655⟩⟩, + ⟨⟨632800092618308795141969088980548448604599587205814127856,632800092618308795141969088980548448604599587205961358801⟩,⟨-100162082721848117177459864359293392640751023804642020435,-100162082721848117177459864359293392640751023804495643341⟩⟩, + ⟨⟨131668746428965738499719959061278607590474343860702144802,131668746428965738499719959061278607590474343860808676409⟩,⟨382241065904292401529356518440945761154177044346903271482,382241065904292401529356518440945761154177044347010535331⟩⟩, + ⟨⟨-210098446367080291455904316081026230193200238195341233066,-210098446367080291455904316081026230193200238195309339435⟩,⟨126933247454169173949257154355155727094936784042879001361,126933247454169173949257154355155727094936784042910465163⟩⟩, + ⟨⟨-102832313203067453925429509295818822816979207699202271610,-102832313203067453925429509295818822816979207699169963588⟩,⟨-99024976411387401763387537087899073293623135212047370964,-99024976411387401763387537087899073293623135212014874276⟩⟩, + ⟨⟨33714252276668088488666524273719482430699235215631093878,33714252276668088488666524273719482430699235215643964874⟩,⟨-71707440337404232838516665993615356634332404050002089922,-71707440337404232838516665993615356634332404049989272508⟩⟩, + ⟨⟨41931798618040961108354651732414506862755847453832419222,41931798618040961108354651732414506862755847453838563952⟩,⟨900724037116126863686908075688623982981571382229447899,900724037116126863686908075688623982981571382235592011⟩⟩, + ⟨⟨10640304398335288684520393443946361267677289754569938039,10640304398335288684520393443946361267677289754572035073⟩,⟨18477134747940057162970681087675494479176456673341665682,18477134747940057162970681087675494479176456673343766488⟩⟩, + ⟨⟨-3480676215148079437217958044515909344827354141259404644,-3480676215148079437217958044515909344827354141258139335⟩,⟨10092675286013544533839174597892358136125248303634523954,10092675286013544533839174597892358136125248303635791521⟩⟩, + ⟨⟨-4599377047506607867067942073810277033910671016297457669,-4599377047506607867067942073810277033910671016297025447⟩,⟨3187964864221101628589521884219963571613374773591304516,3187964864221101628589521884219963571613374773591742461⟩⟩, + ⟨⟨-3359887903003131590042169539892817970883922500320897970,-3359887903003131590042169539892817970883922500320708414⟩,⟨737455730336973328080085065684946030717608713630343007,737455730336973328080085065684946030717608713630534021⟩⟩, + ⟨⟨-2856542295408070258976975383024349452810290849860535729,-2856542295408070258976975383024349452810290849860438275⟩,⟨-1,1⟩⟩, + ⟨⟨-3359887903003131590042169539892817970883922500320897970,-3359887903003131590042169539892817970883922500320708414⟩,⟨-737455730336973328080085065684946030717608713630534021,-737455730336973328080085065684946030717608713630343007⟩⟩, + ⟨⟨-4599377047506607867067942073810277033910671016297457669,-4599377047506607867067942073810277033910671016297025447⟩,⟨-3187964864221101628589521884219963571613374773591742461,-3187964864221101628589521884219963571613374773591304516⟩⟩, + ⟨⟨-3480676215148079437217958044515909344827354141259404644,-3480676215148079437217958044515909344827354141258139335⟩,⟨-10092675286013544533839174597892358136125248303635791521,-10092675286013544533839174597892358136125248303634523954⟩⟩, + ⟨⟨10640304398335288684520393443946361267677289754569938039,10640304398335288684520393443946361267677289754572035073⟩,⟨-18477134747940057162970681087675494479176456673343766488,-18477134747940057162970681087675494479176456673341665682⟩⟩, + ⟨⟨41931798618040961108354651732414506862755847453832419222,41931798618040961108354651732414506862755847453838563952⟩,⟨-900724037116126863686908075688623982981571382235592010,-900724037116126863686908075688623982981571382229447898⟩⟩, + ⟨⟨33714252276668088488666524273719482430699235215631093877,33714252276668088488666524273719482430699235215643964874⟩,⟨71707440337404232838516665993615356634332404049989272508,71707440337404232838516665993615356634332404050002089922⟩⟩, + ⟨⟨-102832313203067453925429509295818822816979207699202271610,-102832313203067453925429509295818822816979207699169963589⟩,⟨99024976411387401763387537087899073293623135212014874276,99024976411387401763387537087899073293623135212047370963⟩⟩, + ⟨⟨-210098446367080291455904316081026230193200238195341233065,-210098446367080291455904316081026230193200238195309339434⟩,⟨-126933247454169173949257154355155727094936784042910465164,-126933247454169173949257154355155727094936784042879001363⟩⟩, + ⟨⟨131668746428965738499719959061278607590474343860702144803,131668746428965738499719959061278607590474343860808676414⟩,⟨-382241065904292401529356518440945761154177044347010535333,-382241065904292401529356518440945761154177044346903271479⟩⟩, + ⟨⟨632800092618308795141969088980548448604599587205814127855,632800092618308795141969088980548448604599587205961358801⟩,⟨100162082721848117177459864359293392640751023804495643343,100162082721848117177459864359293392640751023804642020439⟩⟩, + ⟨⟨-10434394340358731595405592131691074574677127132470492965,-10434394340358731595405592131691074574677127132176165460⟩,⟨981163637939153954647052260137771049375813433668456908656,981163637939153954647052260137771049375813433668751990341⟩⟩, + ⟨⟨-1448760667131591781593001551975596294702463683989266027893,-1448760667131591781593001551975596294702463683988971024831⟩,⟨165162219137791716619862156919720616510224635557636884329,165162219137791716619862156919720616510224635557931646679⟩⟩, + ⟨⟨-460511600407707417826745505391885538970957905593746404063,-460511600407707417826745505391885538970957905592909137016⟩,⟨-2059060999295125596723297772182052890222494971779384485280,-2059060999295125596723297772182052890222494971778548164078⟩⟩, + ⟨⟨2837575307363998139976507016070215515977151464006738269778,2837575307363998139976507016070215515977151464007679781158⟩,⟨-916300438280290626367264201298567465842191435494103130349,-916300438280290626367264201298567465842191435493158478395⟩⟩, + ⟨⟨1580585171525224832565690420188418411059397848234944780890,1580585171525224832565690420188418411059397848236547090554⟩,⟨3811855118107191570486280666578204826410976860999634849395,3811855118107191570486280666578204826410976861001230395695⟩⟩] +lemma tw1_0_4_3_calc (j : Fin 31) : taylorWaveBox 1 0 4 3 j = tw1_0_4_3 j := by + revert j + decide +kernel +def tw1_0_4_4 : Fin 31 → CI := ![⟨⟨-1828754052607082358249446533385672904950037007763065035335,-1828754052607082358249446533385672904950037007762421074908⟩,⟨-290483849263055553082017438036592556056762825369906739413,-290483849263055553082017438036592556056762825369262891399⟩⟩, + ⟨⟨76007199006605862520107333297281628133593933294883715881,76007199006605862520107333297281628133593933295228541233⟩,⟨-1251538834871225859316495362553254538585851805462302531901,-1251538834871225859316495362553254538585851805461956806531⟩⟩, + ⟨⟨826868197328390375112398411454092179409403043173907985610,826868197328390375112398411454092179409403043174204455650⟩,⟨-41479750756530123098166929801823498623018439952061988048,-41479750756530123098166929801823498623018439951766650711⟩⟩, + ⟨⟨94061371811918106620845195846892522170939516045321351526,94061371811918106620845195846892522170939516045436803719⟩,⟨523008621439846530486094123005955925771329493044550650033,523008621439846530486094123005955925771329493044667159398⟩⟩, + ⟨⟨-312857139132725112784711536625313695322322637536480403133,-312857139132725112784711536625313695322322637536354763822⟩,⟨106085982403299291497280797210886020133131641076361670863,106085982403299291497280797210886020133131641076486482702⟩⟩, + ⟨⟨-95402639557873544838554709101284568200446141941161633601,-95402639557873544838554709101284568200446141941107138731⟩,⟨-173585136610335520892171011573585238913122614788949156323,-173585136610335520892171011573585238913122614788894186856⟩⟩, + ⟨⟨86282158162484214267784950303396154494514163978618843178,86282158162484214267784950303396154494514163978653194812⟩,⟨-74498988025559907433056572203999529062191834217539766150,-74498988025559907433056572203999529062191834217505654823⟩⟩, + ⟨⟨51540165832234450717232582923465511864480181531416231174,51540165832234450717232582923465511864480181531425020822⟩,⟨35599709975793161984858521804831901017322570679412351096,35599709975793161984858521804831901017322570679421229641⟩⟩, + ⟨⟨-9395063944018291769290384951691812332409612222730856877,-9395063944018291769290384951691812332409612222723826636⟩,⟨31308766446945480701500251218914502196347106411329049647,31308766446945480701500251218914502196347106411336062427⟩⟩, + ⟨⟨-16045857563106088851330026036831662603651452632253707400,-16045857563106088851330026036831662603651452632251264579⟩,⟨1624938521632060961826588152256888909330496942094686303,1624938521632060961826588152256888909330496942097124422⟩⟩, + ⟨⟨-4260082682178704061604588827025077356975159887578352990,-4260082682178704061604588827025077356975159887576831555⟩,⟨-6193056493664049923493788339592803630750099048444181058,-6193056493664049923493788339592803630750099048442654279⟩⟩, + ⟨⟨1035662180249066757480211730283525389949724915179381806,1035662180249066757480211730283525389949724915179744410⟩,⟨-3172976660553139614760148470147711059577451847837734358,-3172976660553139614760148470147711059577451847837372089⟩⟩, + ⟨⟨1245247631279114899013415210429817566170174858324844955,1245247631279114899013415210429817566170174858325049695⟩,⟨-753156183702637977923009326299970341264773300548824798,-753156183702637977923009326299970341264773300548619652⟩⟩, + ⟨⟨667113915846383082880063686468397495225213620367240264,667113915846383082880063686468397495225213620367293341⟩,⟨-66261989845826653512569438307519974230087604447634696,-66261989845826653512569438307519974230087604447581562⟩⟩, + ⟨⟨373298356068794494892593923481176712618915983169892249,373298356068794494892593923481176712618915983169914153⟩,⟨20508993849743169591060114275232561298408765887660301,20508993849743169591060114275232561298408765887681685⟩⟩, + ⟨⟨299136409664083949790803728029109094672205118885838820,299136409664083949790803728029109094672205118885849978⟩,⟨-1,1⟩⟩, + ⟨⟨373298356068794494892593923481176712618915983169892249,373298356068794494892593923481176712618915983169914153⟩,⟨-20508993849743169591060114275232561298408765887681685,-20508993849743169591060114275232561298408765887660301⟩⟩, + ⟨⟨667113915846383082880063686468397495225213620367240264,667113915846383082880063686468397495225213620367293341⟩,⟨66261989845826653512569438307519974230087604447581562,66261989845826653512569438307519974230087604447634696⟩⟩, + ⟨⟨1245247631279114899013415210429817566170174858324844955,1245247631279114899013415210429817566170174858325049695⟩,⟨753156183702637977923009326299970341264773300548619652,753156183702637977923009326299970341264773300548824798⟩⟩, + ⟨⟨1035662180249066757480211730283525389949724915179381806,1035662180249066757480211730283525389949724915179744410⟩,⟨3172976660553139614760148470147711059577451847837372089,3172976660553139614760148470147711059577451847837734358⟩⟩, + ⟨⟨-4260082682178704061604588827025077356975159887578352991,-4260082682178704061604588827025077356975159887576831555⟩,⟨6193056493664049923493788339592803630750099048442654279,6193056493664049923493788339592803630750099048444181058⟩⟩, + ⟨⟨-16045857563106088851330026036831662603651452632253707400,-16045857563106088851330026036831662603651452632251264579⟩,⟨-1624938521632060961826588152256888909330496942097124422,-1624938521632060961826588152256888909330496942094686303⟩⟩, + ⟨⟨-9395063944018291769290384951691812332409612222730856876,-9395063944018291769290384951691812332409612222723826635⟩,⟨-31308766446945480701500251218914502196347106411336062427,-31308766446945480701500251218914502196347106411329049647⟩⟩, + ⟨⟨51540165832234450717232582923465511864480181531416231174,51540165832234450717232582923465511864480181531425020822⟩,⟨-35599709975793161984858521804831901017322570679421229641,-35599709975793161984858521804831901017322570679412351096⟩⟩, + ⟨⟨86282158162484214267784950303396154494514163978618843177,86282158162484214267784950303396154494514163978653194812⟩,⟨74498988025559907433056572203999529062191834217505654823,74498988025559907433056572203999529062191834217539766152⟩⟩, + ⟨⟨-95402639557873544838554709101284568200446141941161633602,-95402639557873544838554709101284568200446141941107138731⟩,⟨173585136610335520892171011573585238913122614788894186855,173585136610335520892171011573585238913122614788949156323⟩⟩, + ⟨⟨-312857139132725112784711536625313695322322637536480403132,-312857139132725112784711536625313695322322637536354763821⟩,⟨-106085982403299291497280797210886020133131641076486482703,-106085982403299291497280797210886020133131641076361670865⟩⟩, + ⟨⟨94061371811918106620845195846892522170939516045321351531,94061371811918106620845195846892522170939516045436803722⟩,⟨-523008621439846530486094123005955925771329493044667159396,-523008621439846530486094123005955925771329493044550650033⟩⟩, + ⟨⟨826868197328390375112398411454092179409403043173907985612,826868197328390375112398411454092179409403043174204455648⟩,⟨41479750756530123098166929801823498623018439951766650718,41479750756530123098166929801823498623018439952061988052⟩⟩, + ⟨⟨76007199006605862520107333297281628133593933294883715870,76007199006605862520107333297281628133593933295228541230⟩,⟨1251538834871225859316495362553254538585851805461956806528,1251538834871225859316495362553254538585851805462302531906⟩⟩, + ⟨⟨-1828754052607082358249446533385672904950037007763065035332,-1828754052607082358249446533385672904950037007762421074913⟩,⟨290483849263055553082017438036592556056762825369262891394,290483849263055553082017438036592556056762825369906739400⟩⟩] +lemma tw1_0_4_4_calc (j : Fin 31) : taylorWaveBox 1 0 4 4 j = tw1_0_4_4 j := by + revert j + decide +kernel +def tw1_0_4_5 : Fin 31 → CI := ![⟨⟨55507874336072991633835253553169894764119534135038086748,55507874336072991633835253553169894764119534135276089632⟩,⟨710026185634819554225987407981835695729349885088424368791,710026185634819554225987407981835695729349885088663795395⟩⟩, + ⟨⟨-443691857930647146940709535645304987796584148933408782865,-443691857930647146940709535645304987796584148933268292448⟩,⟨85806345565573930925772275404281502502278597992121956604,85806345565573930925772275404281502502278597992261243361⟩⟩, + ⟨⟨-87664454273118438642153393701475615571530762480131010191,-87664454273118438642153393701475615571530762480010745526⟩,⟨-264291704570498131774528742634073551065206886899581835498,-264291704570498131774528742634073551065206886899460719434⟩⟩, + ⟨⟨148040884616978770990254402890964805065967082965722013623,148040884616978770990254402890964805065967082965764978869⟩,⟨-75088240717596581881387712630759678295236299280925723698,-75088240717596581881387712630759678295236299280883265831⟩⟩, + ⟨⟨57177771875862166412269124373797819988247858066110999075,57177771875862166412269124373797819988247858066151419822⟩,⟨76283828527507613253641971683172336869930170822341548673,76283828527507613253641971683172336869930170822382243531⟩⟩, + ⟨⟨-34717138617690329040186464716416812518819554297315314533,-34717138617690329040186464716416812518819554297299659777⟩,⟨39367967932472888375543699049780011787099961733546207590,39367967932472888375543699049780011787099961733561746901⟩⟩, + ⟨⟨-24462202226330442093955335754399733194956240424610770083,-24462202226330442093955335754399733194956240424602499592⟩,⟨-12674657487624559209372458919970335540930806147889035466,-12674657487624559209372458919970335540930806147880727570⟩⟩, + ⟨⟨2474704411134776746380614902548252552618545218501136981,2474704411134776746380614902548252552618545218503025546⟩,⟨-13475943532812254315063152937847772531751259423500561690,-13475943532812254315063152937847772531751259423498677312⟩⟩, + ⟨⟨6307709559986515211124096363729785479963796039891379430,6307709559986515211124096363729785479963796039892787251⟩,⟨-1170520312062838328749278920931594054644008035669940716,-1170520312062838328749278920931594054644008035668537327⟩⟩, + ⟨⟨1683363041265510884498740531722166341632797659102674653,1683363041265510884498740531722166341632797659103234445⟩,⟨2254600537502176460334242890815235916458420576737481598,2254600537502176460334242890815235916458420576738044419⟩⟩, + ⟨⟨-389681776745586733722278319525343220832236484952086827,-389681776745586733722278319525343220832236484951843989⟩,⟨1086976516758969433794506838753083963168019940397095821,1086976516758969433794506838753083963168019940397338259⟩⟩, + ⟨⟨-409411618862531722475924539269030224336532790822715204,-409411618862531722475924539269030224336532790822655589⟩,⟨181515919144565088011372454932339749296365193452940328,181515919144565088011372454932339749296365193452999879⟩⟩, + ⟨⟨-168109116812328643416284740875093825620081992116384948,-168109116812328643416284740875093825620081992116360114⟩,⟨-25541164044177150305819308600711051141586756940272382,-25541164044177150305819308600711051141586756940247565⟩⟩, + ⟨⟨-63184261894393975475156680931633124420122332711683454,-63184261894393975475156680931633124420122332711676278⟩,⟨-27319007177922440681164557994321648659351695314746109,-27319007177922440681164557994321648659351695314739007⟩⟩, + ⟨⟨-32995825702154494803107887164667450973575580463303415,-32995825702154494803107887164667450973575580463300838⟩,⟨-11148433562714354050698911982162564854079086860536403,-11148433562714354050698911982162564854079086860533932⟩⟩, + ⟨⟨-26850421343483227612453654989179486763747363326756581,-26850421343483227612453654989179486763747363326755493⟩,⟨-1,1⟩⟩, + ⟨⟨-32995825702154494803107887164667450973575580463303415,-32995825702154494803107887164667450973575580463300838⟩,⟨11148433562714354050698911982162564854079086860533932,11148433562714354050698911982162564854079086860536403⟩⟩, + ⟨⟨-63184261894393975475156680931633124420122332711683454,-63184261894393975475156680931633124420122332711676278⟩,⟨27319007177922440681164557994321648659351695314739007,27319007177922440681164557994321648659351695314746109⟩⟩, + ⟨⟨-168109116812328643416284740875093825620081992116384948,-168109116812328643416284740875093825620081992116360114⟩,⟨25541164044177150305819308600711051141586756940247565,25541164044177150305819308600711051141586756940272382⟩⟩, + ⟨⟨-409411618862531722475924539269030224336532790822715204,-409411618862531722475924539269030224336532790822655589⟩,⟨-181515919144565088011372454932339749296365193452999879,-181515919144565088011372454932339749296365193452940328⟩⟩, + ⟨⟨-389681776745586733722278319525343220832236484952086827,-389681776745586733722278319525343220832236484951843989⟩,⟨-1086976516758969433794506838753083963168019940397338259,-1086976516758969433794506838753083963168019940397095821⟩⟩, + ⟨⟨1683363041265510884498740531722166341632797659102674653,1683363041265510884498740531722166341632797659103234445⟩,⟨-2254600537502176460334242890815235916458420576738044419,-2254600537502176460334242890815235916458420576737481598⟩⟩, + ⟨⟨6307709559986515211124096363729785479963796039891379430,6307709559986515211124096363729785479963796039892787251⟩,⟨1170520312062838328749278920931594054644008035668537327,1170520312062838328749278920931594054644008035669940716⟩⟩, + ⟨⟨2474704411134776746380614902548252552618545218501136981,2474704411134776746380614902548252552618545218503025545⟩,⟨13475943532812254315063152937847772531751259423498677312,13475943532812254315063152937847772531751259423500561690⟩⟩, + ⟨⟨-24462202226330442093955335754399733194956240424610770083,-24462202226330442093955335754399733194956240424602499592⟩,⟨12674657487624559209372458919970335540930806147880727570,12674657487624559209372458919970335540930806147889035466⟩⟩, + ⟨⟨-34717138617690329040186464716416812518819554297315314533,-34717138617690329040186464716416812518819554297299659777⟩,⟨-39367967932472888375543699049780011787099961733561746901,-39367967932472888375543699049780011787099961733546207590⟩⟩, + ⟨⟨57177771875862166412269124373797819988247858066110999076,57177771875862166412269124373797819988247858066151419822⟩,⟨-76283828527507613253641971683172336869930170822382243530,-76283828527507613253641971683172336869930170822341548673⟩⟩, + ⟨⟨148040884616978770990254402890964805065967082965722013623,148040884616978770990254402890964805065967082965764978868⟩,⟨75088240717596581881387712630759678295236299280883265833,75088240717596581881387712630759678295236299280925723699⟩⟩, + ⟨⟨-87664454273118438642153393701475615571530762480131010192,-87664454273118438642153393701475615571530762480010745529⟩,⟨264291704570498131774528742634073551065206886899460719434,264291704570498131774528742634073551065206886899581835497⟩⟩, + ⟨⟨-443691857930647146940709535645304987796584148933408782866,-443691857930647146940709535645304987796584148933268292446⟩,⟨-85806345565573930925772275404281502502278597992261243366,-85806345565573930925772275404281502502278597992121956605⟩⟩, + ⟨⟨55507874336072991633835253553169894764119534135038086753,55507874336072991633835253553169894764119534135276089634⟩,⟨-710026185634819554225987407981835695729349885088663795393,-710026185634819554225987407981835695729349885088424368792⟩⟩] +lemma tw1_0_4_5_calc (j : Fin 31) : taylorWaveBox 1 0 4 5 j = tw1_0_4_5 j := by + revert j + decide +kernel +def tw1_0_4_6 : Fin 31 → CI := ![⟨⟨227995947644936430853240670029048081527595210888592387002,227995947644936430853240670029048081527595210888687718843⟩,⟨-73930235615188332019048096691512713016528112969270561018,-73930235615188332019048096691512713016528112969176101431⟩⟩, + ⟨⟨61055533894720951771312273849429661274461681505465512876,61055533894720951771312273849429661274461681505516095149⟩,⟨128778751619157523312884380692397804552121283442108649748,128778751619157523312884380692397804552121283442159763596⟩⟩, + ⟨⟨-68072206856894567854735748676923987556739510713279305606,-68072206856894567854735748676923987556739510713239602060⟩,⟨45620464102571371264476500243511354049319037008496313884,45620464102571371264476500243511354049319037008535727530⟩⟩, + ⟨⟨-31285159339372818979058077104217921714329810932561846141,-31285159339372818979058077104217921714329810932549200020⟩,⟨-32859596326734976410595241010947756834418917753021508507,-32859596326734976410595241010947756834418917753008726849⟩⟩, + ⟨⟨13816072938341010509259960818606847326183389710508635004,13816072938341010509259960818606847326183389710519162799⟩,⟨-19712998082328163132039518079497028129830555237120636810,-19712998082328163132039518079497028129830555237110163087⟩⟩, + ⟨⟨11315435943889818647049095833379263138521999481129580232,11315435943889818647049095833379263138521999481133113935⟩,⟨4482151725789229697400571101531989422854004379689548490,4482151725789229697400571101531989422854004379693096245⟩⟩, + ⟨⟨-567406307996321269944741992690502467024499825302065704,-567406307996321269944741992690502467024499825300502156⟩,⟨5798607446551429616989443071322674304376000181855188879,5798607446551429616989443071322674304376000181856752441⟩⟩, + ⟨⟨-2546358674549785246598583453647245234374614230393131739,-2546358674549785246598583453647245234374614230392712585⟩,⟨626480730192553799158422140283505603082884168409269119,626480730192553799158422140283505603082884168409685314⟩⟩, + ⟨⟨-674163892676763834918519364952933026233952082955305732,-674163892676763834918519364952933026233952082955004892⟩,⟨-871357675379909176559561296544405444943516695648944029,-871357675379909176559561296544405444943516695648641646⟩⟩, + ⟨⟨162915496130744004906632398290934357621771888304989894,162915496130744004906632398290934357621771888305082086⟩,⟨-397427618958423457154094249816073965624247341400124663,-397427618958423457154094249816073965624247341400032725⟩⟩, + ⟨⟨149176279609689703338532948600203789498656931290491112,149176279609689703338532948600203789498656931290527353⟩,⟨-42863248246665264392228233559100368810244903756492531,-42863248246665264392228233559100368810244903756456346⟩⟩, + ⟨⟨47995365522103201664952540086452339843189057309296047,47995365522103201664952540086452339843189057309304648⟩,⟨21471676773002387567152925790960443301687231336211182,21471676773002387567152925790960443301687231336219790⟩⟩, + ⟨⟨11531593881866195228969053921877528288827701551003684,11531593881866195228969053921877528288827701551007073⟩,⟨13008714299363802433796801960658307809977141823420510,13008714299363802433796801960658307809977141823423893⟩⟩, + ⟨⟨3770463765671263292585826770620639745256697236280608,3770463765671263292585826770620639745256697236281414⟩,⟨4902563320087110696887049601615751091824128254681401,4902563320087110696887049601615751091824128254682200⟩⟩, + ⟨⟨2348265000488937022149441255728975435848350120276862,2348265000488937022149441255728975435848350120277113⟩,⟨1595453171887389740347170407629283841430070613023643,1595453171887389740347170407629283841430070613023884⟩⟩, + ⟨⟨2108827160961937356356764665051809401252496447112660,2108827160961937356356764665051809401252496447112753⟩,⟨-1,1⟩⟩, + ⟨⟨2348265000488937022149441255728975435848350120276862,2348265000488937022149441255728975435848350120277113⟩,⟨-1595453171887389740347170407629283841430070613023884,-1595453171887389740347170407629283841430070613023643⟩⟩, + ⟨⟨3770463765671263292585826770620639745256697236280608,3770463765671263292585826770620639745256697236281414⟩,⟨-4902563320087110696887049601615751091824128254682200,-4902563320087110696887049601615751091824128254681401⟩⟩, + ⟨⟨11531593881866195228969053921877528288827701551003684,11531593881866195228969053921877528288827701551007073⟩,⟨-13008714299363802433796801960658307809977141823423893,-13008714299363802433796801960658307809977141823420510⟩⟩, + ⟨⟨47995365522103201664952540086452339843189057309296047,47995365522103201664952540086452339843189057309304648⟩,⟨-21471676773002387567152925790960443301687231336219790,-21471676773002387567152925790960443301687231336211182⟩⟩, + ⟨⟨149176279609689703338532948600203789498656931290491112,149176279609689703338532948600203789498656931290527353⟩,⟨42863248246665264392228233559100368810244903756456346,42863248246665264392228233559100368810244903756492531⟩⟩, + ⟨⟨162915496130744004906632398290934357621771888304989894,162915496130744004906632398290934357621771888305082086⟩,⟨397427618958423457154094249816073965624247341400032725,397427618958423457154094249816073965624247341400124663⟩⟩, + ⟨⟨-674163892676763834918519364952933026233952082955305732,-674163892676763834918519364952933026233952082955004892⟩,⟨871357675379909176559561296544405444943516695648641646,871357675379909176559561296544405444943516695648944029⟩⟩, + ⟨⟨-2546358674549785246598583453647245234374614230393131739,-2546358674549785246598583453647245234374614230392712585⟩,⟨-626480730192553799158422140283505603082884168409685314,-626480730192553799158422140283505603082884168409269119⟩⟩, + ⟨⟨-567406307996321269944741992690502467024499825302065704,-567406307996321269944741992690502467024499825300502156⟩,⟨-5798607446551429616989443071322674304376000181856752441,-5798607446551429616989443071322674304376000181855188879⟩⟩, + ⟨⟨11315435943889818647049095833379263138521999481129580232,11315435943889818647049095833379263138521999481133113935⟩,⟨-4482151725789229697400571101531989422854004379693096245,-4482151725789229697400571101531989422854004379689548490⟩⟩, + ⟨⟨13816072938341010509259960818606847326183389710508635003,13816072938341010509259960818606847326183389710519162798⟩,⟨19712998082328163132039518079497028129830555237110163087,19712998082328163132039518079497028129830555237120636810⟩⟩, + ⟨⟨-31285159339372818979058077104217921714329810932561846141,-31285159339372818979058077104217921714329810932549200020⟩,⟨32859596326734976410595241010947756834418917753008726849,32859596326734976410595241010947756834418917753021508507⟩⟩, + ⟨⟨-68072206856894567854735748676923987556739510713279305606,-68072206856894567854735748676923987556739510713239602060⟩,⟨-45620464102571371264476500243511354049319037008535727530,-45620464102571371264476500243511354049319037008496313885⟩⟩, + ⟨⟨61055533894720951771312273849429661274461681505465512876,61055533894720951771312273849429661274461681505516095151⟩,⟨-128778751619157523312884380692397804552121283442159763597,-128778751619157523312884380692397804552121283442108649747⟩⟩, + ⟨⟨227995947644936430853240670029048081527595210888592387002,227995947644936430853240670029048081527595210888687718841⟩,⟨73930235615188332019048096691512713016528112969176101432,73930235615188332019048096691512713016528112969270561019⟩⟩] +lemma tw1_0_4_6_calc (j : Fin 31) : taylorWaveBox 1 0 4 6 j = tw1_0_4_6 j := by + revert j + decide +kernel +def tw1_0_4_7 : Fin 31 → CI := ![⟨⟨-37422553674771875099942803828662392883229787810068076081,-37422553674771875099942803828662392883229787810036744479⟩,⟨-61160028680438357001719696039645933487588734123425078726,-61160028680438357001719696039645933487588734123393445875⟩⟩, + ⟨⟨30700391975754141212683362481702308098356430544682394570,30700391975754141212683362481702308098356430544697910992⟩,⟨-25566765447629427773777993896947979925034284334581190086,-25566765447629427773777993896947979925034284334565824351⟩⟩, + ⟨⟨16253397625462279642123555530664174000456019396320949450,16253397625462279642123555530664174000456019396331695730⟩,⟨13976306118010241077803391060951187085638964666657533830,13976306118010241077803391060951187085638964666668345984⟩⟩, + ⟨⟨-5462659140437691107351527847772184794161537719113257742,-5462659140437691107351527847772184794161537719110088893⟩,⟨9574419753552502541157680041544856108766838422376242668,9574419753552502541157680041544856108766838422379388622⟩⟩, + ⟨⟨-5169681562918398486391931410635199976634242947340052384,-5169681562918398486391931410635199976634242947337828412⟩,⟨-1570990431170758737087112195259811993136504509843577426,-1570990431170758737087112195259811993136504509841348388⟩⟩, + ⟨⟨79236936910975695359538653921495024944562832474831262,79236936910975695359538653921495024944562832475484585⟩,⟨-2507264482082424369519839922172922064948498882259085160,-2507264482082424369519839922172922064948498882258430881⟩⟩, + ⟨⟨1051660352814318951027618373633182332777900153951007776,1051660352814318951027618373633182332777900153951355478⟩,⟨-305788085180725884318833809684792467125741029765542016,-305788085180725884318833809684792467125741029765196059⟩⟩, + ⟨⟨274961828494079418938986354652148759818393516414023755,274961828494079418938986354652148759818393516414111762⟩,⟨351306441410144452698515805318636973610048001821320139,351306441410144452698515805318636973610048001821408920⟩⟩, + ⟨⟨-71219395704830055330577999468716831666952331971011831,-71219395704830055330577999468716831666952331970962665⟩,⟨152348527565945077635666496020228744856366894602766926,152348527565945077635666496020228744856366894602815949⟩⟩, + ⟨⟨-57616450501245771062090815894959620808311796846096350,-57616450501245771062090815894959620808311796846082876⟩,⟨8789603223399937386730267871819800618287460081709016,8789603223399937386730267871819800618287460081722468⟩⟩, + ⟨⟨-14570606813614597828469079045633808905508876330424176,-14570606813614597828469079045633808905508876330418777⟩,⟨-11472121010343834284325811598604102377639096412563182,-11472121010343834284325811598604102377639096412557773⟩⟩, + ⟨⟨-1685146591289326994004598967961334795876610921019541,-1685146591289326994004598967961334795876610921018423⟩,⟨-5222015396046500713612601244645117334545781875640111,-5222015396046500713612601244645117334545781875638992⟩⟩, + ⟨⟨-48240805048377739217055837422902012318889885557961,-48240805048377739217055837422902012318889885557627⟩,⟨-1579060521371993040789530593134658143857285775195852,-1579060521371993040789530593134658143857285775195518⟩⟩, + ⟨⟨-73081646545708322862705480726582279651512384984288,-73081646545708322862705480726582279651512384984213⟩,⟨-488501280310115602183534199768151560117638480594586,-488501280310115602183534199768151560117638480594510⟩⟩, + ⟨⟨-132999922859488389807476752535159759233944222870451,-132999922859488389807476752535159759233944222870429⟩,⟨-156922483607597054671839404943689557966180539458735,-156922483607597054671839404943689557966180539458714⟩⟩, + ⟨⟨-147223909257080951377741730649660575575049422006619,-147223909257080951377741730649660575575049422006611⟩,⟨-1,1⟩⟩, + ⟨⟨-132999922859488389807476752535159759233944222870451,-132999922859488389807476752535159759233944222870429⟩,⟨156922483607597054671839404943689557966180539458714,156922483607597054671839404943689557966180539458735⟩⟩, + ⟨⟨-73081646545708322862705480726582279651512384984288,-73081646545708322862705480726582279651512384984213⟩,⟨488501280310115602183534199768151560117638480594510,488501280310115602183534199768151560117638480594586⟩⟩, + ⟨⟨-48240805048377739217055837422902012318889885557961,-48240805048377739217055837422902012318889885557627⟩,⟨1579060521371993040789530593134658143857285775195518,1579060521371993040789530593134658143857285775195852⟩⟩, + ⟨⟨-1685146591289326994004598967961334795876610921019541,-1685146591289326994004598967961334795876610921018423⟩,⟨5222015396046500713612601244645117334545781875638992,5222015396046500713612601244645117334545781875640111⟩⟩, + ⟨⟨-14570606813614597828469079045633808905508876330424176,-14570606813614597828469079045633808905508876330418777⟩,⟨11472121010343834284325811598604102377639096412557773,11472121010343834284325811598604102377639096412563182⟩⟩, + ⟨⟨-57616450501245771062090815894959620808311796846096350,-57616450501245771062090815894959620808311796846082876⟩,⟨-8789603223399937386730267871819800618287460081722468,-8789603223399937386730267871819800618287460081709016⟩⟩, + ⟨⟨-71219395704830055330577999468716831666952331971011831,-71219395704830055330577999468716831666952331970962665⟩,⟨-152348527565945077635666496020228744856366894602815949,-152348527565945077635666496020228744856366894602766926⟩⟩, + ⟨⟨274961828494079418938986354652148759818393516414023755,274961828494079418938986354652148759818393516414111762⟩,⟨-351306441410144452698515805318636973610048001821408920,-351306441410144452698515805318636973610048001821320139⟩⟩, + ⟨⟨1051660352814318951027618373633182332777900153951007776,1051660352814318951027618373633182332777900153951355478⟩,⟨305788085180725884318833809684792467125741029765196059,305788085180725884318833809684792467125741029765542016⟩⟩, + ⟨⟨79236936910975695359538653921495024944562832474831262,79236936910975695359538653921495024944562832475484585⟩,⟨2507264482082424369519839922172922064948498882258430881,2507264482082424369519839922172922064948498882259085160⟩⟩, + ⟨⟨-5169681562918398486391931410635199976634242947340052384,-5169681562918398486391931410635199976634242947337828412⟩,⟨1570990431170758737087112195259811993136504509841348388,1570990431170758737087112195259811993136504509843577426⟩⟩, + ⟨⟨-5462659140437691107351527847772184794161537719113257742,-5462659140437691107351527847772184794161537719110088893⟩,⟨-9574419753552502541157680041544856108766838422379388622,-9574419753552502541157680041544856108766838422376242668⟩⟩, + ⟨⟨16253397625462279642123555530664174000456019396320949450,16253397625462279642123555530664174000456019396331695730⟩,⟨-13976306118010241077803391060951187085638964666668345984,-13976306118010241077803391060951187085638964666657533830⟩⟩, + ⟨⟨30700391975754141212683362481702308098356430544682394570,30700391975754141212683362481702308098356430544697910992⟩,⟨25566765447629427773777993896947979925034284334565824351,25566765447629427773777993896947979925034284334581190086⟩⟩, + ⟨⟨-37422553674771875099942803828662392883229787810068076081,-37422553674771875099942803828662392883229787810036744480⟩,⟨61160028680438357001719696039645933487588734123393445875,61160028680438357001719696039645933487588734123425078726⟩⟩] +lemma tw1_0_4_7_calc (j : Fin 31) : taylorWaveBox 1 0 4 7 j = tw1_0_4_7 j := by + revert j + decide +kernel +def tw1_0_4_8 : Fin 31 → CI := ![⟨⟨-13660329672252522345223471091806314265063828971728301483,-13660329672252522345223471091806314265063828971719323261⟩,⟨13639999577852210920151264643877581978953450507768497232,13639999577852210920151264643877581978953450507777400481⟩⟩, + ⟨⟨-8176101823914700551664983655378890760257814751826332285,-8176101823914700551664983655378890760257814751822336901⟩,⟨-5895113652690077610032010603808015662646033417442711913,-5895113652690077610032010603808015662646033417438686212⟩⟩, + ⟨⟨2149892175816254459113402742717764504948497206042452219,2149892175816254459113402742717764504948497206044948322⟩,⟨-4565936154095145199252451655105575806933203764592514256,-4565936154095145199252451655105575806933203764590027772⟩⟩, + ⟨⟨2348490780502986411304788140969809456335624868977429907,2348490780502986411304788140969809456335624868978097135⟩,⟨542518119774701520828088680634304290410808021861167615,542518119774701520828088680634304290410808021861836281⟩⟩, + ⟨⟨23212161435454761531083804849912095346550562851725450,23212161435454761531083804849912095346550562852128195⟩,⟨1091215850026815306839939217294831852411820048555129139,1091215850026815306839939217294831852411820048555532709⟩⟩, + ⟨⟨-442578807884336371066895858692318834138451674865970900,-442578807884336371066895858692318834138451674865819266⟩,⟨143706619167419734163980090774269117499240701012903874,143706619167419734163980090774269117499240701013054538⟩⟩, + ⟨⟨-114110848867415207121173478206998509817989888525644984,-114110848867415207121173478206998509817989888525575744⟩,⟨-145981189884474555541307655166981769314926889984529343,-145981189884474555541307655166981769314926889984459714⟩⟩, + ⟨⟨31775271480280243258674512512506440588923723865533961,31775271480280243258674512512506440588923723865549452⟩,⟨-60465148506062840223807079538394642328290776133798140,-60465148506062840223807079538394642328290776133782727⟩⟩, + ⟨⟨23087730522925561098645795060882599733072402090603249,23087730522925561098645795060882599733072402090609923⟩,⟨-871249675417958566332611181098375650695832172997818,-871249675417958566332611181098375650695832172991151⟩⟩, + ⟨⟨4540593449566087143741489247910544033999010758870887,4540593449566087143741489247910544033999010758873046⟩,⟨5481313529062407631033043650136223194433197396042501,5481313529062407631033043650136223194433197396044667⟩⟩, + ⟨⟨-85633192608651712919436442638360595035327829042806,-85633192608651712919436442638360595035327829042197⟩,⟨1992339936299258520840820768327897884523410652738605,1992339936299258520840820768327897884523410652739213⟩⟩, + ⟨⟨-258684565975059841503209738204282071695792668681247,-258684565975059841503209738204282071695792668681107⟩,⟨445754329690081437356062856084436245120763024055804,445754329690081437356062856084436245120763024055944⟩⟩, + ⟨⟨-79648356383733882277762001835534735093358063132981,-79648356383733882277762001835534735093358063132941⟩,⟨101741181316039122639610002446208757144790676370849,101741181316039122639610002446208757144790676370888⟩⟩, + ⟨⟨-12460056205233664525700743894998813717415529231668,-12460056205233664525700743894998813717415529231660⟩,⟨33244471379832051532096504117062615219708373950532,33244471379832051532096504117062615219708373950540⟩⟩, + ⟨⟨5617817602308160518775326232866857346305949290724,5617817602308160518775326232866857346305949290727⟩,⟨12181016992490377301256695090112912882217302281347,12181016992490377301256695090112912882217302281349⟩⟩, + ⟨⟨9250351035096317425888555299200157858566141740373,9250351035096317425888555299200157858566141740374⟩,⟨-1,1⟩⟩, + ⟨⟨5617817602308160518775326232866857346305949290724,5617817602308160518775326232866857346305949290727⟩,⟨-12181016992490377301256695090112912882217302281349,-12181016992490377301256695090112912882217302281347⟩⟩, + ⟨⟨-12460056205233664525700743894998813717415529231668,-12460056205233664525700743894998813717415529231660⟩,⟨-33244471379832051532096504117062615219708373950540,-33244471379832051532096504117062615219708373950532⟩⟩, + ⟨⟨-79648356383733882277762001835534735093358063132981,-79648356383733882277762001835534735093358063132941⟩,⟨-101741181316039122639610002446208757144790676370888,-101741181316039122639610002446208757144790676370849⟩⟩, + ⟨⟨-258684565975059841503209738204282071695792668681247,-258684565975059841503209738204282071695792668681107⟩,⟨-445754329690081437356062856084436245120763024055944,-445754329690081437356062856084436245120763024055804⟩⟩, + ⟨⟨-85633192608651712919436442638360595035327829042806,-85633192608651712919436442638360595035327829042197⟩,⟨-1992339936299258520840820768327897884523410652739213,-1992339936299258520840820768327897884523410652738605⟩⟩, + ⟨⟨4540593449566087143741489247910544033999010758870887,4540593449566087143741489247910544033999010758873046⟩,⟨-5481313529062407631033043650136223194433197396044667,-5481313529062407631033043650136223194433197396042501⟩⟩, + ⟨⟨23087730522925561098645795060882599733072402090603249,23087730522925561098645795060882599733072402090609923⟩,⟨871249675417958566332611181098375650695832172991151,871249675417958566332611181098375650695832172997818⟩⟩, + ⟨⟨31775271480280243258674512512506440588923723865533961,31775271480280243258674512512506440588923723865549452⟩,⟨60465148506062840223807079538394642328290776133782727,60465148506062840223807079538394642328290776133798140⟩⟩, + ⟨⟨-114110848867415207121173478206998509817989888525644984,-114110848867415207121173478206998509817989888525575744⟩,⟨145981189884474555541307655166981769314926889984459714,145981189884474555541307655166981769314926889984529343⟩⟩, + ⟨⟨-442578807884336371066895858692318834138451674865970900,-442578807884336371066895858692318834138451674865819266⟩,⟨-143706619167419734163980090774269117499240701013054538,-143706619167419734163980090774269117499240701012903874⟩⟩, + ⟨⟨23212161435454761531083804849912095346550562851725450,23212161435454761531083804849912095346550562852128195⟩,⟨-1091215850026815306839939217294831852411820048555532709,-1091215850026815306839939217294831852411820048555129139⟩⟩, + ⟨⟨2348490780502986411304788140969809456335624868977429907,2348490780502986411304788140969809456335624868978097135⟩,⟨-542518119774701520828088680634304290410808021861836281,-542518119774701520828088680634304290410808021861167615⟩⟩, + ⟨⟨2149892175816254459113402742717764504948497206042452219,2149892175816254459113402742717764504948497206044948322⟩,⟨4565936154095145199252451655105575806933203764590027772,4565936154095145199252451655105575806933203764592514256⟩⟩, + ⟨⟨-8176101823914700551664983655378890760257814751826332285,-8176101823914700551664983655378890760257814751822336901⟩,⟨5895113652690077610032010603808015662646033417438686212,5895113652690077610032010603808015662646033417442711913⟩⟩, + ⟨⟨-13660329672252522345223471091806314265063828971728301483,-13660329672252522345223471091806314265063828971719323261⟩,⟨-13639999577852210920151264643877581978953450507777400481,-13639999577852210920151264643877581978953450507768497232⟩⟩] +lemma tw1_0_4_8_calc (j : Fin 31) : taylorWaveBox 1 0 4 8 j = tw1_0_4_8 j := by + revert j + decide +kernel +def tw1_0_4_9 : Fin 31 → CI := ![⟨⟨4026588514492390379312510357813349147426147388631847399,4026588514492390379312510357813349147426147388634051219⟩,⟨2472035905413907529355193260923188152409282497250832526,2472035905413907529355193260923188152409282497253049919⟩⟩, + ⟨⟨-842480339783370901028824097200960861603424517055605236,-842480339783370901028824097200960861603424517054698110⟩,⟨2152908609223739384769013831942862235533491329637611974,2152908609223739384769013831942862235533491329638515296⟩⟩, + ⟨⟨-1064599782303261242192023831225573812175952029635668298,-1064599782303261242192023831225573812175952029635174342⟩,⟨-182644392574411832172138348112397016753333591639512229,-182644392574411832172138348112397016753333591639017986⟩⟩, + ⟨⟨-30850271235873496320358026640884076403415499169881984,-30850271235873496320358026640884076403415499169749840⟩,⟨-478140161509612526473508273459092741480174583090195031,-478140161509612526473508273459092741480174583090062313⟩⟩, + ⟨⟨189127218768446444963648343130369027293543459258645196,189127218768446444963648343130369027293543459258738515⟩,⟨-66381390034167470990255303059258605134578560640057115,-66381390034167470990255303059258605134578560639964292⟩⟩, + ⟨⟨48081439312263508288109911362884910540404707104774032,48081439312263508288109911362884910540404707104803774⟩,⟨62013837082144771883678034254319620541852484120945954,62013837082144771883678034254319620541852484120975890⟩⟩, + ⟨⟨-14328068722938872001580568654796375988144478952158588,-14328068722938872001580568654796375988144478952147083⟩,⟨24633417180823252425719487000221430780547378995202966,24633417180823252425719487000221430780547378995214429⟩⟩, + ⟨⟨-9490024165518555137264267296428965798174496462520742,-9490024165518555137264267296428965798174496462518399⟩,⟨-579570488609349116047090330688410791273457474850692,-579570488609349116047090330688410791273457474848350⟩⟩, + ⟨⟨-1415534654616820479439196813869660261526695809100186,-1415534654616820479439196813869660261526695809099073⟩,⟨-2514505608611810431096856772539780580719314869055428,-2514505608611810431096856772539780580719314869054311⟩⟩, + ⟨⟨262461736377816648943655863285177462095317149854988,262461736377816648943655863285177462095317149855268⟩,⟨-745355382213625417987438875773451652638652692190254,-745355382213625417987438875773451652638652692189974⟩⟩, + ⟨⟨162949955193669414245269991938712716877817339937927,162949955193669414245269991938712716877817339938010⟩,⟨-107008640315044474282776994359953089875470724599582,-107008640315044474282776994359953089875470724599499⟩⟩, + ⟨⟨43066503157941080176239406654319394447788697033909,43066503157941080176239406654319394447788697033925⟩,⟨-9043619043431718444524610740254591489583997865111,-9043619043431718444524610740254591489583997865094⟩⟩, + ⟨⟨9392372383830056514295367530653774579535587275856,9392372383830056514295367530653774579535587275861⟩,⟨-2020189788823919578022826788930355495191316425834,-2020189788823919578022826788930355495191316425830⟩⟩, + ⟨⟨1766672170981584903479764524751444649406447791025,1766672170981584903479764524751444649406447791027⟩,⟨-1503521572415795154574902403493806743367351799259,-1503521572415795154574902403493806743367351799257⟩⟩, + ⟨⟨-127617306738218538331100161138916794702960336151,-127617306738218538331100161138916794702960336150⟩,⟨-784913894430886307221365691590637782272325637052,-784913894430886307221365691590637782272325637051⟩⟩, + ⟨⟨-528378815545187826662419631284401465106719073094,-528378815545187826662419631284401465106719073093⟩,⟨-1,1⟩⟩, + ⟨⟨-127617306738218538331100161138916794702960336151,-127617306738218538331100161138916794702960336150⟩,⟨784913894430886307221365691590637782272325637051,784913894430886307221365691590637782272325637052⟩⟩, + ⟨⟨1766672170981584903479764524751444649406447791025,1766672170981584903479764524751444649406447791027⟩,⟨1503521572415795154574902403493806743367351799257,1503521572415795154574902403493806743367351799259⟩⟩, + ⟨⟨9392372383830056514295367530653774579535587275856,9392372383830056514295367530653774579535587275861⟩,⟨2020189788823919578022826788930355495191316425830,2020189788823919578022826788930355495191316425834⟩⟩, + ⟨⟨43066503157941080176239406654319394447788697033909,43066503157941080176239406654319394447788697033925⟩,⟨9043619043431718444524610740254591489583997865094,9043619043431718444524610740254591489583997865111⟩⟩, + ⟨⟨162949955193669414245269991938712716877817339937927,162949955193669414245269991938712716877817339938010⟩,⟨107008640315044474282776994359953089875470724599499,107008640315044474282776994359953089875470724599582⟩⟩, + ⟨⟨262461736377816648943655863285177462095317149854988,262461736377816648943655863285177462095317149855268⟩,⟨745355382213625417987438875773451652638652692189974,745355382213625417987438875773451652638652692190254⟩⟩, + ⟨⟨-1415534654616820479439196813869660261526695809100186,-1415534654616820479439196813869660261526695809099073⟩,⟨2514505608611810431096856772539780580719314869054311,2514505608611810431096856772539780580719314869055428⟩⟩, + ⟨⟨-9490024165518555137264267296428965798174496462520742,-9490024165518555137264267296428965798174496462518399⟩,⟨579570488609349116047090330688410791273457474848350,579570488609349116047090330688410791273457474850692⟩⟩, + ⟨⟨-14328068722938872001580568654796375988144478952158588,-14328068722938872001580568654796375988144478952147083⟩,⟨-24633417180823252425719487000221430780547378995214429,-24633417180823252425719487000221430780547378995202966⟩⟩, + ⟨⟨48081439312263508288109911362884910540404707104774032,48081439312263508288109911362884910540404707104803774⟩,⟨-62013837082144771883678034254319620541852484120975890,-62013837082144771883678034254319620541852484120945954⟩⟩, + ⟨⟨189127218768446444963648343130369027293543459258645196,189127218768446444963648343130369027293543459258738515⟩,⟨66381390034167470990255303059258605134578560639964292,66381390034167470990255303059258605134578560640057115⟩⟩, + ⟨⟨-30850271235873496320358026640884076403415499169881984,-30850271235873496320358026640884076403415499169749840⟩,⟨478140161509612526473508273459092741480174583090062313,478140161509612526473508273459092741480174583090195031⟩⟩, + ⟨⟨-1064599782303261242192023831225573812175952029635668298,-1064599782303261242192023831225573812175952029635174342⟩,⟨182644392574411832172138348112397016753333591639017986,182644392574411832172138348112397016753333591639512229⟩⟩, + ⟨⟨-842480339783370901028824097200960861603424517055605236,-842480339783370901028824097200960861603424517054698110⟩,⟨-2152908609223739384769013831942862235533491329638515296,-2152908609223739384769013831942862235533491329637611974⟩⟩, + ⟨⟨4026588514492390379312510357813349147426147388631847399,4026588514492390379312510357813349147426147388634051219⟩,⟨-2472035905413907529355193260923188152409282497253049919,-2472035905413907529355193260923188152409282497250832526⟩⟩] +lemma tw1_0_4_9_calc (j : Fin 31) : taylorWaveBox 1 0 4 9 j = tw1_0_4_9 j := by + revert j + decide +kernel +def tw1_0_4_10 : Fin 31 → CI := ![⟨⟨328482890609758689145809317757407029767516288595544254,328482890609758689145809317757407029767516288596026512⟩,⟨-1007900837341970714673159381982437120765800607457402492,-1007900837341970714673159381982437120765800607456921664⟩⟩, + ⟨⟨482491177568293684183474973542122362260841263565819057,482491177568293684183474973542122362260841263565998686⟩,⟨58821286636512614537881084430350311277713555697986698,58821286636512614537881084430350311277713555698166272⟩⟩, + ⟨⟨21208399135394148800648360377865806137094093342039004,21208399135394148800648360377865806137094093342136773⟩,⟨210854928385259053656353266266832634219284234678278118,210854928385259053656353266266832634219284234678376231⟩⟩, + ⟨⟨-81835884619004118339145138355520390362485175531326743,-81835884619004118339145138355520390362485175531296921⟩,⟨30419748395073526019980014987920869137808076026851803,30419748395073526019980014987920869137808076026881381⟩⟩, + ⟨⟨-20522938017625774544535142116526275398193311506771694,-20522938017625774544535142116526275398193311506753815⟩,⟨-26782461378175564320165398973861878135719188504619387,-26782461378175564320165398973861878135719188504601413⟩⟩, + ⟨⟨6502008715365987410553184103058048096189834310124565,6502008715365987410553184103058048096189834310129601⟩,⟨-10240198792443307014268634459498133754180039425745947,-10240198792443307014268634459498133754180039425740933⟩⟩, + ⟨⟨3974722692672196065258332188409555411963982126910629,3974722692672196065258332188409555411963982126912254⟩,⟨585737102536653367459033908733781438961990045070010,585737102536653367459033908733781438961990045071636⟩⟩, + ⟨⟨429460414855542120464954629225182076941300352480362,429460414855542120464954629225182076941300352480749⟩,⟨1134560691701717073945951952396191601618317314574071,1134560691701717073945951952396191601618317314574460⟩⟩, + ⟨⟨-181886790061717048325392564817404384289985366005566,-181886790061717048325392564817404384289985366005413⟩,⟨275776024785428165384882135366510306458255609101597,275776024785428165384882135366510306458255609101750⟩⟩, + ⟨⟨-78786991966325553297463605969098365419210873208830,-78786991966325553297463605969098365419210873208794⟩,⟨16122609249794251628376832466745593145201055584808,16122609249794251628376832466745593145201055584843⟩⟩, + ⟨⟨-16313927625569748110716407165878783803394553138696,-16313927625569748110716407165878783803394553138686⟩,⟨-6247095837371918308241496551904454858763936371477,-6247095837371918308241496551904454858763936371467⟩⟩, + ⟨⟨-2781093260959633991580340466340848253262424001921,-2781093260959633991580340466340848253262424001918⟩,⟨-2031984805610193935432655084113632703267116056420,-2031984805610193935432655084113632703267116056418⟩⟩, + ⟨⟨-579930876339035175833730660894159507889482702094,-579930876339035175833730660894159507889482702092⟩,⟨-304042666687618742072007605753854675557354234688,-304042666687618742072007605753854675557354234687⟩⟩, + ⟨⟨-136238408249984603646538061295938394273923164815,-136238408249984603646538061295938394273923164814⟩,⟨27333795128612474489014133914308626246225547277,27333795128612474489014133914308626246225547278⟩⟩, + ⟨⟨-4734083280063415104258471455583030742986738891,-4734083280063415104258471455583030742986738890⟩,⟨42954113895001664755901748261217153395286919755,42954113895001664755901748261217153395286919756⟩⟩, + ⟨⟨27665850087153975308385784188808298198713022012,27665850087153975308385784188808298198713022013⟩,⟨-1,1⟩⟩, + ⟨⟨-4734083280063415104258471455583030742986738891,-4734083280063415104258471455583030742986738890⟩,⟨-42954113895001664755901748261217153395286919756,-42954113895001664755901748261217153395286919755⟩⟩, + ⟨⟨-136238408249984603646538061295938394273923164815,-136238408249984603646538061295938394273923164814⟩,⟨-27333795128612474489014133914308626246225547278,-27333795128612474489014133914308626246225547277⟩⟩, + ⟨⟨-579930876339035175833730660894159507889482702094,-579930876339035175833730660894159507889482702092⟩,⟨304042666687618742072007605753854675557354234687,304042666687618742072007605753854675557354234688⟩⟩, + ⟨⟨-2781093260959633991580340466340848253262424001921,-2781093260959633991580340466340848253262424001918⟩,⟨2031984805610193935432655084113632703267116056418,2031984805610193935432655084113632703267116056420⟩⟩, + ⟨⟨-16313927625569748110716407165878783803394553138696,-16313927625569748110716407165878783803394553138686⟩,⟨6247095837371918308241496551904454858763936371467,6247095837371918308241496551904454858763936371477⟩⟩, + ⟨⟨-78786991966325553297463605969098365419210873208830,-78786991966325553297463605969098365419210873208794⟩,⟨-16122609249794251628376832466745593145201055584843,-16122609249794251628376832466745593145201055584808⟩⟩, + ⟨⟨-181886790061717048325392564817404384289985366005566,-181886790061717048325392564817404384289985366005413⟩,⟨-275776024785428165384882135366510306458255609101750,-275776024785428165384882135366510306458255609101597⟩⟩, + ⟨⟨429460414855542120464954629225182076941300352480362,429460414855542120464954629225182076941300352480749⟩,⟨-1134560691701717073945951952396191601618317314574460,-1134560691701717073945951952396191601618317314574071⟩⟩, + ⟨⟨3974722692672196065258332188409555411963982126910629,3974722692672196065258332188409555411963982126912254⟩,⟨-585737102536653367459033908733781438961990045071636,-585737102536653367459033908733781438961990045070010⟩⟩, + ⟨⟨6502008715365987410553184103058048096189834310124565,6502008715365987410553184103058048096189834310129601⟩,⟨10240198792443307014268634459498133754180039425740933,10240198792443307014268634459498133754180039425745947⟩⟩, + ⟨⟨-20522938017625774544535142116526275398193311506771694,-20522938017625774544535142116526275398193311506753815⟩,⟨26782461378175564320165398973861878135719188504601413,26782461378175564320165398973861878135719188504619387⟩⟩, + ⟨⟨-81835884619004118339145138355520390362485175531326743,-81835884619004118339145138355520390362485175531296921⟩,⟨-30419748395073526019980014987920869137808076026881381,-30419748395073526019980014987920869137808076026851803⟩⟩, + ⟨⟨21208399135394148800648360377865806137094093342039004,21208399135394148800648360377865806137094093342136773⟩,⟨-210854928385259053656353266266832634219284234678376231,-210854928385259053656353266266832634219284234678278118⟩⟩, + ⟨⟨482491177568293684183474973542122362260841263565819057,482491177568293684183474973542122362260841263565998686⟩,⟨-58821286636512614537881084430350311277713555698166272,-58821286636512614537881084430350311277713555697986698⟩⟩, + ⟨⟨328482890609758689145809317757407029767516288595544254,328482890609758689145809317757407029767516288596026512⟩,⟨1007900837341970714673159381982437120765800607456921664,1007900837341970714673159381982437120765800607457402492⟩⟩] +lemma tw1_0_4_10_calc (j : Fin 31) : taylorWaveBox 1 0 4 10 j = tw1_0_4_10 j := by + revert j + decide +kernel +def tw1_0_4_11 : Fin 31 → CI := ![⟨⟨-218851546844437830951593085555464057676760777988414349,-218851546844437830951593085555464057676760777988321073⟩,⟨-17437186416399285451054369325575633626778066383019650,-17437186416399285451054369325575633626778066382926486⟩⟩, + ⟨⟨-12263894668059993342351822541202878741850625577428229,-12263894668059993342351822541202878741850625577390916⟩,⟨-93531296680706159505907762454428500454697673004620758,-93531296680706159505907762454428500454697673004583249⟩⟩, + ⟨⟨35776078968132297982491267075436449964276693759572499,35776078968132297982491267075436449964276693759593821⟩,⟨-13892645385871801085964844485222349552926299803875718,-13892645385871801085964844485222349552926299803854515⟩⟩, + ⟨⟨8856151910653255424984222471954810832811416592948622,8856151910653255424984222471954810832811416592954373⟩,⟨11714106486896483382841116248834391386760588032164679,11714106486896483382841116248834391386760588032170476⟩⟩, + ⟨⟨-2963360950066279632774028473017473525024055126118227,-2963360950066279632774028473017473525024055126115241⟩,⟨4325317634390569598843458847770228187428461619071005,4325317634390569598843458847770228187428461619073980⟩⟩, + ⟨⟨-1689065466264802540803665207569421945573827981318045,-1689065466264802540803665207569421945573827981317302⟩,⟨-378003026778656732659308569594993605049950573366612,-378003026778656732659308569594993605049950573365868⟩⟩, + ⟨⟨-121332171779927823113363176669514265684985191547286,-121332171779927823113363176669514265684985191547036⟩,⟨-508577637025433128111427263687744380708390949447738,-508577637025433128111427263687744380708390949447487⟩⟩, + ⟨⟨101100587219106339750433384639766795957505116644822,101100587219106339750433384639766795957505116644881⟩,⟨-100961951270551689711688809632093810019235537556118,-100961951270551689711688809632093810019235537556059⟩⟩, + ⟨⟨34708216525252967881912277862707604249992103850012,34708216525252967881912277862707604249992103850031⟩,⟨3764726767063601553864702724749199774923775652928,3764726767063601553864702724749199774923775652946⟩⟩, + ⟨⟨5106683381327187658227140162861284928324164202382,5106683381327187658227140162861284928324164202387⟩,⟨5567339299854741939140345771780199033787678557297,5567339299854741939140345771780199033787678557302⟩⟩, + ⟨⟨369132575649883837449031391717204026831416795461,369132575649883837449031391717204026831416795463⟩,⟨1397057971361879853095035144894610950752947493369,1397057971361879853095035144894610950752947493371⟩⟩, + ⟨⟨25293801783075414394208254425536529842415801575,25293801783075414394208254425536529842415801576⟩,⟨247561775065621030632259375515135254298914046307,247561775065621030632259375515135254298914046308⟩⟩, + ⟨⟨15783457548618606551319459626451265514773202497,15783457548618606551319459626451265514773202498⟩,⟨38052826030115533196901608879215871431896983230,38052826030115533196901608879215871431896983231⟩⟩, + ⟨⟨7318646995398556459983920626777132185086233319,7318646995398556459983920626777132185086233320⟩,⟨2337065064508712313733736718131198478619372843,2337065064508712313733736718131198478619372844⟩⟩, + ⟨⟨805493799866934517212125567674770643203686135,805493799866934517212125567674770643203686136⟩,⟨-2012508640599392585978984335705336630130648398,-2012508640599392585978984335705336630130648397⟩⟩, + ⟨⟨-1337151252140299535789119025915893223509115809,-1337151252140299535789119025915893223509115808⟩,⟨-1,1⟩⟩, + ⟨⟨805493799866934517212125567674770643203686135,805493799866934517212125567674770643203686136⟩,⟨2012508640599392585978984335705336630130648397,2012508640599392585978984335705336630130648398⟩⟩, + ⟨⟨7318646995398556459983920626777132185086233319,7318646995398556459983920626777132185086233320⟩,⟨-2337065064508712313733736718131198478619372844,-2337065064508712313733736718131198478619372843⟩⟩, + ⟨⟨15783457548618606551319459626451265514773202497,15783457548618606551319459626451265514773202498⟩,⟨-38052826030115533196901608879215871431896983231,-38052826030115533196901608879215871431896983230⟩⟩, + ⟨⟨25293801783075414394208254425536529842415801575,25293801783075414394208254425536529842415801576⟩,⟨-247561775065621030632259375515135254298914046308,-247561775065621030632259375515135254298914046307⟩⟩, + ⟨⟨369132575649883837449031391717204026831416795461,369132575649883837449031391717204026831416795463⟩,⟨-1397057971361879853095035144894610950752947493371,-1397057971361879853095035144894610950752947493369⟩⟩, + ⟨⟨5106683381327187658227140162861284928324164202382,5106683381327187658227140162861284928324164202387⟩,⟨-5567339299854741939140345771780199033787678557302,-5567339299854741939140345771780199033787678557297⟩⟩, + ⟨⟨34708216525252967881912277862707604249992103850012,34708216525252967881912277862707604249992103850031⟩,⟨-3764726767063601553864702724749199774923775652946,-3764726767063601553864702724749199774923775652928⟩⟩, + ⟨⟨101100587219106339750433384639766795957505116644822,101100587219106339750433384639766795957505116644881⟩,⟨100961951270551689711688809632093810019235537556059,100961951270551689711688809632093810019235537556118⟩⟩, + ⟨⟨-121332171779927823113363176669514265684985191547286,-121332171779927823113363176669514265684985191547036⟩,⟨508577637025433128111427263687744380708390949447487,508577637025433128111427263687744380708390949447738⟩⟩, + ⟨⟨-1689065466264802540803665207569421945573827981318045,-1689065466264802540803665207569421945573827981317302⟩,⟨378003026778656732659308569594993605049950573365868,378003026778656732659308569594993605049950573366612⟩⟩, + ⟨⟨-2963360950066279632774028473017473525024055126118227,-2963360950066279632774028473017473525024055126115241⟩,⟨-4325317634390569598843458847770228187428461619073980,-4325317634390569598843458847770228187428461619071005⟩⟩, + ⟨⟨8856151910653255424984222471954810832811416592948622,8856151910653255424984222471954810832811416592954373⟩,⟨-11714106486896483382841116248834391386760588032170476,-11714106486896483382841116248834391386760588032164679⟩⟩, + ⟨⟨35776078968132297982491267075436449964276693759572499,35776078968132297982491267075436449964276693759593821⟩,⟨13892645385871801085964844485222349552926299803854515,13892645385871801085964844485222349552926299803875718⟩⟩, + ⟨⟨-12263894668059993342351822541202878741850625577428229,-12263894668059993342351822541202878741850625577390916⟩,⟨93531296680706159505907762454428500454697673004583249,93531296680706159505907762454428500454697673004620758⟩⟩, + ⟨⟨-218851546844437830951593085555464057676760777988414349,-218851546844437830951593085555464057676760777988321073⟩,⟨17437186416399285451054369325575633626778066382926486,17437186416399285451054369325575633626778066383019650⟩⟩] +lemma tw1_0_4_11_calc (j : Fin 31) : taylorWaveBox 1 0 4 11 j = tw1_0_4_11 j := by + revert j + decide +kernel +def tw1_0_4_12 : Fin 31 → CI := ![⟨⟨6561288219365707389976537315114532410340427323626927,6561288219365707389976537315114532410340427323646732⟩,⟨41707722655479581014095573947400125062603694630498037,41707722655479581014095573947400125062603694630517949⟩⟩, + ⟨⟨-15773888501757141489346881941770035391773218234945059,-15773888501757141489346881941770035391773218234937043⟩,⟨6338128189794723556036210895657785119215066031862185,6338128189794723556036210895657785119215066031870142⟩⟩, + ⟨⟨-3857156133251177414566919696431345603663941003497883,-3857156133251177414566919696431345603663941003493871⟩,⟨-5174595839394709660105870164922016443870143908928653,-5174595839394709660105870164922016443870143908924619⟩⟩, + ⟨⟨1354963064196547157660187217135701454734171805581636,1354963064196547157660187217135701454734171805582638⟩,⟨-1850605097445916110460289904035436991246389517739022,-1850605097445916110460289904035436991246389517738026⟩⟩, + ⟨⟨726139166339162311995187637482942283220845788198298,726139166339162311995187637482942283220845788198736⟩,⟨212254813176890350207120862277910163669224802292653,212254813176890350207120862277910163669224802293091⟩⟩, + ⟨⟨28680813719339928107898387486234637498177966884952,28680813719339928107898387486234637498177966885062⟩,⟨227534405228422008017145883635245524007278085301248,227534405228422008017145883635245524007278085301358⟩⟩, + ⟨⟨-51616902301999668227634669269313948298255739574615,-51616902301999668227634669269313948298255739574577⟩,⟨36438348814699247602658763358252445941052709161372,36438348814699247602658763358252445941052709161411⟩⟩, + ⟨⟨-14606632137783405056374453734269276885847704750702,-14606632137783405056374453734269276885847704750694⟩,⟨-5551913209508364285611442831096359017256461789790,-5551913209508364285611442831096359017256461789781⟩⟩, + ⟨⟨-1229166727454443886997335675268503459464004027515,-1229166727454443886997335675268503459464004027512⟩,⟨-3197823821506419040998556321685259215647922258435,-3197823821506419040998556321685259215647922258431⟩⟩, + ⟨⟨187248591606510805694927803369856187223095506243,187248591606510805694927803369856187223095506245⟩,⟨-631840627182519468014584688859440124863258333547,-631840627182519468014584688859440124863258333546⟩⟩, + ⟨⟨70516445321600136109189479352455447049266477845,70516445321600136109189479352455447049266477846⟩,⟨-85709025211913165443831688475766553227926222274,-85709025211913165443831688475766553227926222272⟩⟩, + ⟨⟨11209868479032450196300071573103918219523956200,11209868479032450196300071573103918219523956201⟩,⟨-12371861116401422702370535329394011130841186111,-12371861116401422702370535329394011130841186110⟩⟩, + ⟨⟨714812447201875213221056494653124668571865364,714812447201875213221056494653124668571865365⟩,⟨-2298106770576622375927209969113449110757345918,-2298106770576622375927209969113449110757345917⟩⟩, + ⟨⟨-270189423058000683310467387898651059462784294,-270189423058000683310467387898651059462784293⟩,⟨-287365073195877671365492474256489461102275465,-287365073195877671365492474256489461102275464⟩⟩, + ⟨⟨-61239692919126001612041076161148741343037633,-61239692919126001612041076161148741343037632⟩,⟨80279377356987424829047149119976680571640179,80279377356987424829047149119976680571640180⟩⟩, + ⟨⟨60011207863747975916694468027277999168899192,60011207863747975916694468027277999168899193⟩,⟨-1,1⟩⟩, + ⟨⟨-61239692919126001612041076161148741343037633,-61239692919126001612041076161148741343037632⟩,⟨-80279377356987424829047149119976680571640180,-80279377356987424829047149119976680571640179⟩⟩, + ⟨⟨-270189423058000683310467387898651059462784294,-270189423058000683310467387898651059462784293⟩,⟨287365073195877671365492474256489461102275464,287365073195877671365492474256489461102275465⟩⟩, + ⟨⟨714812447201875213221056494653124668571865364,714812447201875213221056494653124668571865365⟩,⟨2298106770576622375927209969113449110757345917,2298106770576622375927209969113449110757345918⟩⟩, + ⟨⟨11209868479032450196300071573103918219523956200,11209868479032450196300071573103918219523956201⟩,⟨12371861116401422702370535329394011130841186110,12371861116401422702370535329394011130841186111⟩⟩, + ⟨⟨70516445321600136109189479352455447049266477845,70516445321600136109189479352455447049266477846⟩,⟨85709025211913165443831688475766553227926222272,85709025211913165443831688475766553227926222274⟩⟩, + ⟨⟨187248591606510805694927803369856187223095506243,187248591606510805694927803369856187223095506245⟩,⟨631840627182519468014584688859440124863258333546,631840627182519468014584688859440124863258333547⟩⟩, + ⟨⟨-1229166727454443886997335675268503459464004027515,-1229166727454443886997335675268503459464004027512⟩,⟨3197823821506419040998556321685259215647922258431,3197823821506419040998556321685259215647922258435⟩⟩, + ⟨⟨-14606632137783405056374453734269276885847704750702,-14606632137783405056374453734269276885847704750694⟩,⟨5551913209508364285611442831096359017256461789781,5551913209508364285611442831096359017256461789790⟩⟩, + ⟨⟨-51616902301999668227634669269313948298255739574615,-51616902301999668227634669269313948298255739574577⟩,⟨-36438348814699247602658763358252445941052709161411,-36438348814699247602658763358252445941052709161372⟩⟩, + ⟨⟨28680813719339928107898387486234637498177966884952,28680813719339928107898387486234637498177966885062⟩,⟨-227534405228422008017145883635245524007278085301358,-227534405228422008017145883635245524007278085301248⟩⟩, + ⟨⟨726139166339162311995187637482942283220845788198298,726139166339162311995187637482942283220845788198736⟩,⟨-212254813176890350207120862277910163669224802293091,-212254813176890350207120862277910163669224802292653⟩⟩, + ⟨⟨1354963064196547157660187217135701454734171805581636,1354963064196547157660187217135701454734171805582638⟩,⟨1850605097445916110460289904035436991246389517738026,1850605097445916110460289904035436991246389517739022⟩⟩, + ⟨⟨-3857156133251177414566919696431345603663941003497883,-3857156133251177414566919696431345603663941003493871⟩,⟨5174595839394709660105870164922016443870143908924619,5174595839394709660105870164922016443870143908928653⟩⟩, + ⟨⟨-15773888501757141489346881941770035391773218234945059,-15773888501757141489346881941770035391773218234937043⟩,⟨-6338128189794723556036210895657785119215066031870142,-6338128189794723556036210895657785119215066031862185⟩⟩, + ⟨⟨6561288219365707389976537315114532410340427323626927,6561288219365707389976537315114532410340427323646732⟩,⟨-41707722655479581014095573947400125062603694630517949,-41707722655479581014095573947400125062603694630498037⟩⟩] +lemma tw1_0_4_12_calc (j : Fin 31) : taylorWaveBox 1 0 4 12 j = tw1_0_4_12 j := by + revert j + decide +kernel +def tw1_0_4_13 : Fin 31 → CI := ![⟨⟨7004532240226918878841428118868836653640508496692458,7004532240226918878841428118868836653640508496696633⟩,⟨-2892209827234678800917294922211521829138287932966224,-2892209827234678800917294922211521829138287932962078⟩⟩, + ⟨⟨1693199679512465857074689790953353321127115681107769,1693199679512465857074689790953353321127115681109281⟩,⟨2304034482401690086488206301305925146727607277101470,2304034482401690086488206301305925146727607277102993⟩⟩, + ⟨⟨-621150857138181177317671453356384767947201224815794,-621150857138181177317671453356384767947201224815114⟩,⟨800193607493476628129448663122759763059706093124748,800193607493476628129448663122759763059706093125425⟩⟩, + ⟨⟨-315149776948512438962017479566624563284389412072202,-315149776948512438962017479566624563284389412072045⟩,⟨-111670568654036173546607964563734290792054108251189,-111670568654036173546607964563734290792054108251031⟩⟩, + ⟨⟨-3249780423023054318740985639642431323594847727415,-3249780423023054318740985639642431323594847727355⟩,⟨-101830050212445759697689120989563204399133497362731,-101830050212445759697689120989563204399133497362670⟩⟩, + ⟨⟨25273451102957688107941511569601321383023921285579,25273451102957688107941511569601321383023921285597⟩,⟨-12868103089084732432575573610995923805910429881687,-12868103089084732432575573610995923805910429881669⟩⟩, + ⟨⟨5977938712480373479232862415746197315299969355518,5977938712480373479232862415746197315299969355524⟩,⟨3878983383164788077018781815977775085597493436632,3878983383164788077018781815977775085597493436638⟩⟩, + ⟨⟨95045628018589837116391287808213825606074811773,95045628018589837116391287808213825606074811775⟩,⟨1592205055001799864769055377384872490906924617029,1592205055001799864769055377384872490906924617031⟩⟩, + ⟨⟨-208971372578535672289712855116667119791588664013,-208971372578535672289712855116667119791588664011⟩,⟨234064161101791241763137047407239444630392008130,234064161101791241763137047407239444630392008131⟩⟩, + ⟨⟨-51954247832617787574862551863615723647203564471,-51954247832617787574862551863615723647203564470⟩,⟨13394060528258946241954032679445588889232965238,13394060528258946241954032679445588889232965239⟩⟩, + ⟨⟨-7940134916470455769361248711896370942051517670,-7940134916470455769361248711896370942051517669⟩,⟨-512309239520396601624289064047886926019674202,-512309239520396601624289064047886926019674201⟩⟩, + ⟨⟨-1045370435700925165046123561256820661049160294,-1045370435700925165046123561256820661049160293⟩,⟨-3499663205454815755898544873766536177542701,-3499663205454815755898544873766536177542700⟩⟩, + ⟨⟨-110161053188858055725418411271416632660603372,-110161053188858055725418411271416632660603371⟩,⟨71311209825624715459743191317320047080628161,71311209825624715459743191317320047080628162⟩⟩, + ⟨⟨4630379177418969203672185265203560887122380,4630379177418969203672185265203560887122381⟩,⟨18324713419907497283574600664587485723824157,18324713419907497283574600664587485723824158⟩⟩, + ⟨⟨3499295229324557562840915756275964222509202,3499295229324557562840915756275964222509203⟩,⟨-2650178512293655640663688684884894251466073,-2650178512293655640663688684884894251466072⟩⟩, + ⟨⟨-2513743596770675610846974007638227822021668,-2513743596770675610846974007638227822021667⟩,⟨-1,1⟩⟩, + ⟨⟨3499295229324557562840915756275964222509202,3499295229324557562840915756275964222509203⟩,⟨2650178512293655640663688684884894251466072,2650178512293655640663688684884894251466073⟩⟩, + ⟨⟨4630379177418969203672185265203560887122380,4630379177418969203672185265203560887122381⟩,⟨-18324713419907497283574600664587485723824158,-18324713419907497283574600664587485723824157⟩⟩, + ⟨⟨-110161053188858055725418411271416632660603372,-110161053188858055725418411271416632660603371⟩,⟨-71311209825624715459743191317320047080628162,-71311209825624715459743191317320047080628161⟩⟩, + ⟨⟨-1045370435700925165046123561256820661049160294,-1045370435700925165046123561256820661049160293⟩,⟨3499663205454815755898544873766536177542700,3499663205454815755898544873766536177542701⟩⟩, + ⟨⟨-7940134916470455769361248711896370942051517670,-7940134916470455769361248711896370942051517669⟩,⟨512309239520396601624289064047886926019674201,512309239520396601624289064047886926019674202⟩⟩, + ⟨⟨-51954247832617787574862551863615723647203564471,-51954247832617787574862551863615723647203564470⟩,⟨-13394060528258946241954032679445588889232965239,-13394060528258946241954032679445588889232965238⟩⟩, + ⟨⟨-208971372578535672289712855116667119791588664013,-208971372578535672289712855116667119791588664011⟩,⟨-234064161101791241763137047407239444630392008131,-234064161101791241763137047407239444630392008130⟩⟩, + ⟨⟨95045628018589837116391287808213825606074811773,95045628018589837116391287808213825606074811775⟩,⟨-1592205055001799864769055377384872490906924617031,-1592205055001799864769055377384872490906924617029⟩⟩, + ⟨⟨5977938712480373479232862415746197315299969355518,5977938712480373479232862415746197315299969355524⟩,⟨-3878983383164788077018781815977775085597493436638,-3878983383164788077018781815977775085597493436632⟩⟩, + ⟨⟨25273451102957688107941511569601321383023921285579,25273451102957688107941511569601321383023921285597⟩,⟨12868103089084732432575573610995923805910429881669,12868103089084732432575573610995923805910429881687⟩⟩, + ⟨⟨-3249780423023054318740985639642431323594847727415,-3249780423023054318740985639642431323594847727355⟩,⟨101830050212445759697689120989563204399133497362670,101830050212445759697689120989563204399133497362731⟩⟩, + ⟨⟨-315149776948512438962017479566624563284389412072202,-315149776948512438962017479566624563284389412072045⟩,⟨111670568654036173546607964563734290792054108251031,111670568654036173546607964563734290792054108251189⟩⟩, + ⟨⟨-621150857138181177317671453356384767947201224815794,-621150857138181177317671453356384767947201224815114⟩,⟨-800193607493476628129448663122759763059706093125425,-800193607493476628129448663122759763059706093124748⟩⟩, + ⟨⟨1693199679512465857074689790953353321127115681107769,1693199679512465857074689790953353321127115681109281⟩,⟨-2304034482401690086488206301305925146727607277102993,-2304034482401690086488206301305925146727607277101470⟩⟩, + ⟨⟨7004532240226918878841428118868836653640508496692458,7004532240226918878841428118868836653640508496696633⟩,⟨2892209827234678800917294922211521829138287932962078,2892209827234678800917294922211521829138287932966224⟩⟩] +lemma tw1_0_4_13_calc (j : Fin 31) : taylorWaveBox 1 0 4 13 j = tw1_0_4_13 j := by + revert j + decide +kernel +def tw1_0_4_14 : Fin 31 → CI := ![⟨⟨-748304064194573482585873151002114310842832044827486,-748304064194573482585873151002114310842832044826705⟩,⟨-1032537093370749159881869442853488955641016803272777,-1032537093370749159881869442853488955641016803271991⟩⟩, + ⟨⟨285371847299475417779722688146360771866056621288776,285371847299475417779722688146360771866056621289039⟩,⟨-349058428929680319158462239055371749200667331836656,-349058428929680319158462239055371749200667331836395⟩⟩, + ⟨⟨137866393590854154509478809411533465397081316998480,137866393590854154509478809411533465397081316998584⟩,⟨56660632335862488424907154535506996968766680794398,56660632335862488424907154535506996968766680794502⟩⟩, + ⟨⟨-2241740453880920600702379247239237768160545964547,-2241740453880920600702379247239237768160545964523⟩,⟨45638302311400960477113898908809792872737208922101,45638302311400960477113898908809792872737208922124⟩⟩, + ⟨⟨-12091110290254152858337228625080289685217228941990,-12091110290254152858337228625080289685217228941980⟩,⟨4388802378172911266265815110455022750961328450148,4388802378172911266265815110455022750961328450158⟩⟩, + ⟨⟨-2396178400140045240815352195309564910462090055552,-2396178400140045240815352195309564910462090055549⟩,⟨-2251576617673716349565258467460494580764254963109,-2251576617673716349565258467460494580764254963106⟩⟩, + ⟨⟨146065198839126026809879342887542760653013302271,146065198839126026809879342887542760653013302273⟩,⟨-739210081959916271082640955440259962808416793847,-739210081959916271082640955440259962808416793846⟩⟩, + ⟨⟨135213669799156211411547390085486175962884215535,135213669799156211411547390085486175962884215537⟩,⟨-70820042040278173837098714997519496464422411239,-70820042040278173837098714997519496464422411238⟩⟩, + ⟨⟨26078994051924333746680135356619508944838315620,26078994051924333746680135356619508944838315621⟩,⟨6764990298518610755383620909378137056974223869,6764990298518610755383620909378137056974223870⟩⟩, + ⟨⟨2916877753032429547925150731922528235967014253,2916877753032429547925150731922528235967014254⟩,⟨2874414042069714184274386291124825869725894171,2874414042069714184274386291124825869725894172⟩⟩, + ⟨⟨283866234594882454368706039497368815397845710,283866234594882454368706039497368815397845711⟩,⟨453185515993588119277844726460816553622369348,453185515993588119277844726460816553622369349⟩⟩, + ⟨⟨40898899399359634447659824410450325491930809,40898899399359634447659824410450325491930810⟩,⟨45750321467675744989371851235716761191875779,45750321467675744989371851235716761191875780⟩⟩, + ⟨⟨6659668327068541739299483363624611273675482,6659668327068541739299483363624611273675483⟩,⟨804627374184286142845878785538818474127339,804627374184286142845878785538818474127340⟩⟩, + ⟨⟨217948664488287772273007128344148465015172,217948664488287772273007128344148465015173⟩,⟨-820629016066180725992987992559064145857166,-820629016066180725992987992559064145857165⟩⟩, + ⟨⟨-166325965318053830533414497011348444172714,-166325965318053830533414497011348444172713⟩,⟨65900877279638726131354863480961390662944,65900877279638726131354863480961390662945⟩⟩, + ⟨⟨98714480207789225018590632549430736941220,98714480207789225018590632549430736941221⟩,⟨-1,1⟩⟩, + ⟨⟨-166325965318053830533414497011348444172714,-166325965318053830533414497011348444172713⟩,⟨-65900877279638726131354863480961390662945,-65900877279638726131354863480961390662944⟩⟩, + ⟨⟨217948664488287772273007128344148465015172,217948664488287772273007128344148465015173⟩,⟨820629016066180725992987992559064145857165,820629016066180725992987992559064145857166⟩⟩, + ⟨⟨6659668327068541739299483363624611273675482,6659668327068541739299483363624611273675483⟩,⟨-804627374184286142845878785538818474127340,-804627374184286142845878785538818474127339⟩⟩, + ⟨⟨40898899399359634447659824410450325491930809,40898899399359634447659824410450325491930810⟩,⟨-45750321467675744989371851235716761191875780,-45750321467675744989371851235716761191875779⟩⟩, + ⟨⟨283866234594882454368706039497368815397845710,283866234594882454368706039497368815397845711⟩,⟨-453185515993588119277844726460816553622369349,-453185515993588119277844726460816553622369348⟩⟩, + ⟨⟨2916877753032429547925150731922528235967014253,2916877753032429547925150731922528235967014254⟩,⟨-2874414042069714184274386291124825869725894172,-2874414042069714184274386291124825869725894171⟩⟩, + ⟨⟨26078994051924333746680135356619508944838315620,26078994051924333746680135356619508944838315621⟩,⟨-6764990298518610755383620909378137056974223870,-6764990298518610755383620909378137056974223869⟩⟩, + ⟨⟨135213669799156211411547390085486175962884215535,135213669799156211411547390085486175962884215537⟩,⟨70820042040278173837098714997519496464422411238,70820042040278173837098714997519496464422411239⟩⟩, + ⟨⟨146065198839126026809879342887542760653013302271,146065198839126026809879342887542760653013302273⟩,⟨739210081959916271082640955440259962808416793846,739210081959916271082640955440259962808416793847⟩⟩, + ⟨⟨-2396178400140045240815352195309564910462090055552,-2396178400140045240815352195309564910462090055549⟩,⟨2251576617673716349565258467460494580764254963106,2251576617673716349565258467460494580764254963109⟩⟩, + ⟨⟨-12091110290254152858337228625080289685217228941990,-12091110290254152858337228625080289685217228941980⟩,⟨-4388802378172911266265815110455022750961328450158,-4388802378172911266265815110455022750961328450148⟩⟩, + ⟨⟨-2241740453880920600702379247239237768160545964547,-2241740453880920600702379247239237768160545964523⟩,⟨-45638302311400960477113898908809792872737208922124,-45638302311400960477113898908809792872737208922101⟩⟩, + ⟨⟨137866393590854154509478809411533465397081316998480,137866393590854154509478809411533465397081316998584⟩,⟨-56660632335862488424907154535506996968766680794502,-56660632335862488424907154535506996968766680794398⟩⟩, + ⟨⟨285371847299475417779722688146360771866056621288776,285371847299475417779722688146360771866056621289039⟩,⟨349058428929680319158462239055371749200667331836395,349058428929680319158462239055371749200667331836656⟩⟩, + ⟨⟨-748304064194573482585873151002114310842832044827486,-748304064194573482585873151002114310842832044826705⟩,⟨1032537093370749159881869442853488955641016803271991,1032537093370749159881869442853488955641016803272777⟩⟩] +lemma tw1_0_4_14_calc (j : Fin 31) : taylorWaveBox 1 0 4 14 j = tw1_0_4_14 j := by + revert j + decide +kernel +def tw1_0_4_15 : Fin 31 → CI := ![⟨⟨-131353087005808346062058218145349087760441908192406,-131353087005808346062058218145349087760441908192270⟩,⟨153401038138591080568526273095853265607263475005877,153401038138591080568526273095853265607263475006012⟩⟩, + ⟨⟨-60718533008005457302291133846637371880348859840017,-60718533008005457302291133846637371880348859839975⟩,⟨-28116181570740654789003129501368134101063561578748,-28116181570740654789003129501368134101063561578706⟩⟩, + ⟨⟨2466758053621782741881062400377077457475944622963,2466758053621782741881062400377077457475944622978⟩,⟨-20494697043542663832672460592375152289584010670849,-20494697043542663832672460592375152289584010670833⟩⟩, + ⟨⟨5705480230045393817555362372163528477237257598378,5705480230045393817555362372163528477237257598383⟩,⟨-1410605930900974605840656037409127388988053924713,-1410605930900974605840656037409127388988053924709⟩⟩, + ⟨⟨942527314197264001308383774409295805552777743736,942527314197264001308383774409295805552777743738⟩,⟨1203276439098362214882158782248702079742697502058,1203276439098362214882158782248702079742697502060⟩⟩, + ⟨⟨-142598778954016936517575053896914929736902724901,-142598778954016936517575053896914929736902724900⟩,⟨329225150998650287652956415393541105202997773090,329225150998650287652956415393541105202997773091⟩⟩, + ⟨⟨-73701408976236299836428313479671201387331671729,-73701408976236299836428313479671201387331671728⟩,⟨13824747928228883556814307227524250088744002072,13824747928228883556814307227524250088744002073⟩⟩, + ⟨⟨-10814158067145976061442485278007971833475840624,-10814158067145976061442485278007971833475840623⟩,⟨-8488020810343765940900597149791656975237694139,-8488020810343765940900597149791656975237694138⟩⟩, + ⟨⟨-477701200299047768892550778623055253099367270,-477701200299047768892550778623055253099367269⟩,⟨-2124239446569013254597127563122028032370558045,-2124239446569013254597127563122028032370558044⟩⟩, + ⟨⟨69255941288898953193797130500420188213929590,69255941288898953193797130500420188213929591⟩,⟨-285917343982570942973942280105016794600412566,-285917343982570942973942280105016794600412565⟩⟩, + ⟨⟨12771797257692988855101459971716955517848229,12771797257692988855101459971716955517848230⟩,⟨-31321463470453986734042965819995546892606318,-31321463470453986734042965819995546892606317⟩⟩, + ⟨⟨367189021157894331678217614800860761866541,367189021157894331678217614800860761866542⟩,⟨-3370505468404387055496414071851243422805351,-3370505468404387055496414071851243422805350⟩⟩, + ⟨⟨-221358300611580313011656599164024001703145,-221358300611580313011656599164024001703144⟩,⟨-234856263027457626513177897545499428359808,-234856263027457626513177897545499428359807⟩⟩, + ⟨⟨-24905573529314604633578114711090924459799,-24905573529314604633578114711090924459798⟩,⟨25855175395666204427134515743935841527581,25855175395666204427134515743935841527582⟩⟩, + ⟨⟨6823974060806466298994585958062067537461,6823974060806466298994585958062067537462⟩,⟨-728081477752219912499833185482573439667,-728081477752219912499833185482573439666⟩⟩, + ⟨⟨-3648478656749713831245607536225277339040,-3648478656749713831245607536225277339039⟩,⟨-1,1⟩⟩, + ⟨⟨6823974060806466298994585958062067537461,6823974060806466298994585958062067537462⟩,⟨728081477752219912499833185482573439666,728081477752219912499833185482573439667⟩⟩, + ⟨⟨-24905573529314604633578114711090924459799,-24905573529314604633578114711090924459798⟩,⟨-25855175395666204427134515743935841527582,-25855175395666204427134515743935841527581⟩⟩, + ⟨⟨-221358300611580313011656599164024001703145,-221358300611580313011656599164024001703144⟩,⟨234856263027457626513177897545499428359807,234856263027457626513177897545499428359808⟩⟩, + ⟨⟨367189021157894331678217614800860761866541,367189021157894331678217614800860761866542⟩,⟨3370505468404387055496414071851243422805350,3370505468404387055496414071851243422805351⟩⟩, + ⟨⟨12771797257692988855101459971716955517848229,12771797257692988855101459971716955517848230⟩,⟨31321463470453986734042965819995546892606317,31321463470453986734042965819995546892606318⟩⟩, + ⟨⟨69255941288898953193797130500420188213929590,69255941288898953193797130500420188213929591⟩,⟨285917343982570942973942280105016794600412565,285917343982570942973942280105016794600412566⟩⟩, + ⟨⟨-477701200299047768892550778623055253099367270,-477701200299047768892550778623055253099367269⟩,⟨2124239446569013254597127563122028032370558044,2124239446569013254597127563122028032370558045⟩⟩, + ⟨⟨-10814158067145976061442485278007971833475840624,-10814158067145976061442485278007971833475840623⟩,⟨8488020810343765940900597149791656975237694138,8488020810343765940900597149791656975237694139⟩⟩, + ⟨⟨-73701408976236299836428313479671201387331671729,-73701408976236299836428313479671201387331671728⟩,⟨-13824747928228883556814307227524250088744002073,-13824747928228883556814307227524250088744002072⟩⟩, + ⟨⟨-142598778954016936517575053896914929736902724901,-142598778954016936517575053896914929736902724900⟩,⟨-329225150998650287652956415393541105202997773091,-329225150998650287652956415393541105202997773090⟩⟩, + ⟨⟨942527314197264001308383774409295805552777743736,942527314197264001308383774409295805552777743738⟩,⟨-1203276439098362214882158782248702079742697502060,-1203276439098362214882158782248702079742697502058⟩⟩, + ⟨⟨5705480230045393817555362372163528477237257598378,5705480230045393817555362372163528477237257598383⟩,⟨1410605930900974605840656037409127388988053924709,1410605930900974605840656037409127388988053924713⟩⟩, + ⟨⟨2466758053621782741881062400377077457475944622963,2466758053621782741881062400377077457475944622978⟩,⟨20494697043542663832672460592375152289584010670833,20494697043542663832672460592375152289584010670849⟩⟩, + ⟨⟨-60718533008005457302291133846637371880348859840017,-60718533008005457302291133846637371880348859839975⟩,⟨28116181570740654789003129501368134101063561578706,28116181570740654789003129501368134101063561578748⟩⟩, + ⟨⟨-131353087005808346062058218145349087760441908192406,-131353087005808346062058218145349087760441908192270⟩,⟨-153401038138591080568526273095853265607263475006012,-153401038138591080568526273095853265607263475005877⟩⟩] +lemma tw1_0_4_15_calc (j : Fin 31) : taylorWaveBox 1 0 4 15 j = tw1_0_4_15 j := by + revert j + decide +kernel +def tw1_0_4_16 : Fin 31 → CI := ![⟨⟨26896364297618270970571843476058036608675107588156,26896364297618270970571843476058036608675107588179⟩,⟨13749825707924515175426648750966366859271017667407,13749825707924515175426648750966366859271017667429⟩⟩, + ⟨⟨-1697234020154260835403520884146867723164407853624,-1697234020154260835403520884146867723164407853617⟩,⟨9223849022766908887528163458412886867033134032288,9223849022766908887528163458412886867033134032296⟩⟩, + ⟨⟨-2669494574166781103725635450745843897974141771827,-2669494574166781103725635450745843897974141771824⟩,⟨404461191597561932404176177840978560545584350357,404461191597561932404176177840978560545584350360⟩⟩, + ⟨⟨-363290283792682116781676156892551190268517209365,-363290283792682116781676156892551190268517209364⟩,⟨-614623333593474249476215821953839931480608613533,-614623333593474249476215821953839931480608613532⟩⟩, + ⟨⟨95439863717520600469074904234183329655893842151,95439863717520600469074904234183329655893842152⟩,⟨-142531301431176052867612078148996455347753945379,-142531301431176052867612078148996455347753945378⟩⟩, + ⟨⟨36900207878042077739647389661589726304434774370,36900207878042077739647389661589726304434774371⟩,⟨2334642058680505660065229682752742350343673859,2334642058680505660065229682752742350343673860⟩⟩, + ⟨⟨3779101348017747118637587273150033555114483443,3779101348017747118637587273150033555114483444⟩,⟨5949086510759415942860621262729552706739350888,5949086510759415942860621262729552706739350889⟩⟩, + ⟨⟨-280932050097930627031880699763803752335773882,-280932050097930627031880699763803752335773881⟩,⟨1135144105137939822853844258360396589212486566,1135144105137939822853844258360396589212486567⟩⟩, + ⟨⟨-127505530818994345068583994693074092992702693,-127505530818994345068583994693074092992702692⟩,⟨106573395720982408207301163328131803253105472,106573395720982408207301163328131803253105473⟩⟩, + ⟨⟨-19051485207628543395620121356383346793908979,-19051485207628543395620121356383346793908978⟩,⟨5951250741908878939526294848157937500749498,5951250741908878939526294848157937500749499⟩⟩, + ⟨⟨-1964327227372716646962743532315120694535006,-1964327227372716646962743532315120694535005⟩,⟨474131123916421996625564253576934412592105,474131123916421996625564253576934412592106⟩⟩, + ⟨⟨-143542687859716895438551339276464272478229,-143542687859716895438551339276464272478228⟩,⟨103411374879415242228600280453171522520713,103411374879415242228600280453171522520714⟩⟩, + ⟨⟨895170579984639294438574543000301754221,895170579984639294438574543000301754222⟩,⟨14637082071337013057919736345540787702470,14637082071337013057919736345540787702471⟩⟩, + ⟨⟨1370766230740394130459520824682276303976,1370766230740394130459520824682276303977⟩,⟨-419533367354356551748691256143235759162,-419533367354356551748691256143235759161⟩⟩, + ⟨⟨-245261308091055639843628816935025985530,-245261308091055639843628816935025985529⟩,⟨-40752281665187268855805784545394482639,-40752281665187268855805784545394482638⟩⟩, + ⟨⟨127355930498045087494665902889024875354,127355930498045087494665902889024875355⟩,⟨-1,1⟩⟩, + ⟨⟨-245261308091055639843628816935025985530,-245261308091055639843628816935025985529⟩,⟨40752281665187268855805784545394482638,40752281665187268855805784545394482639⟩⟩, + ⟨⟨1370766230740394130459520824682276303976,1370766230740394130459520824682276303977⟩,⟨419533367354356551748691256143235759161,419533367354356551748691256143235759162⟩⟩, + ⟨⟨895170579984639294438574543000301754221,895170579984639294438574543000301754222⟩,⟨-14637082071337013057919736345540787702471,-14637082071337013057919736345540787702470⟩⟩, + ⟨⟨-143542687859716895438551339276464272478229,-143542687859716895438551339276464272478228⟩,⟨-103411374879415242228600280453171522520714,-103411374879415242228600280453171522520713⟩⟩, + ⟨⟨-1964327227372716646962743532315120694535006,-1964327227372716646962743532315120694535005⟩,⟨-474131123916421996625564253576934412592106,-474131123916421996625564253576934412592105⟩⟩, + ⟨⟨-19051485207628543395620121356383346793908979,-19051485207628543395620121356383346793908978⟩,⟨-5951250741908878939526294848157937500749499,-5951250741908878939526294848157937500749498⟩⟩, + ⟨⟨-127505530818994345068583994693074092992702693,-127505530818994345068583994693074092992702692⟩,⟨-106573395720982408207301163328131803253105473,-106573395720982408207301163328131803253105472⟩⟩, + ⟨⟨-280932050097930627031880699763803752335773882,-280932050097930627031880699763803752335773881⟩,⟨-1135144105137939822853844258360396589212486567,-1135144105137939822853844258360396589212486566⟩⟩, + ⟨⟨3779101348017747118637587273150033555114483443,3779101348017747118637587273150033555114483444⟩,⟨-5949086510759415942860621262729552706739350889,-5949086510759415942860621262729552706739350888⟩⟩, + ⟨⟨36900207878042077739647389661589726304434774370,36900207878042077739647389661589726304434774371⟩,⟨-2334642058680505660065229682752742350343673860,-2334642058680505660065229682752742350343673859⟩⟩, + ⟨⟨95439863717520600469074904234183329655893842151,95439863717520600469074904234183329655893842152⟩,⟨142531301431176052867612078148996455347753945378,142531301431176052867612078148996455347753945379⟩⟩, + ⟨⟨-363290283792682116781676156892551190268517209365,-363290283792682116781676156892551190268517209364⟩,⟨614623333593474249476215821953839931480608613532,614623333593474249476215821953839931480608613533⟩⟩, + ⟨⟨-2669494574166781103725635450745843897974141771827,-2669494574166781103725635450745843897974141771824⟩,⟨-404461191597561932404176177840978560545584350360,-404461191597561932404176177840978560545584350357⟩⟩, + ⟨⟨-1697234020154260835403520884146867723164407853624,-1697234020154260835403520884146867723164407853617⟩,⟨-9223849022766908887528163458412886867033134032296,-9223849022766908887528163458412886867033134032288⟩⟩, + ⟨⟨26896364297618270970571843476058036608675107588156,26896364297618270970571843476058036608675107588179⟩,⟨-13749825707924515175426648750966366859271017667429,-13749825707924515175426648750966366859271017667407⟩⟩] +lemma tw1_0_4_16_calc (j : Fin 31) : taylorWaveBox 1 0 4 16 j = tw1_0_4_16 j := by + revert j + decide +kernel +def tw1_0_4_17 : Fin 31 → CI := ![⟨⟨1005130285771682840292942008630050137712186643780,1005130285771682840292942008630050137712186643784⟩,⟨-4160725650411830512209756188019275933901089627605,-4160725650411830512209756188019275933901089627600⟩⟩, + ⟨⟨1242343079337263952052834095909713436218593216791,1242343079337263952052834095909713436218593216793⟩,⟨-86757379450102734781152298713521973717701227502,-86757379450102734781152298713521973717701227500⟩⟩, + ⟨⟨136578223278381840777791967434834804222326940950,136578223278381840777791967434834804222326940951⟩,⟨305408452484023335540812764446393950796382360784,305408452484023335540812764446393950796382360786⟩⟩, + ⟨⟨-55736951703053863066182432445296180997319170308,-55736951703053863066182432445296180997319170307⟩,⟨60371190580571210856213734061886832537414505946,60371190580571210856213734061886832537414505947⟩⟩, + ⟨⟨-17558267875096465956744626556949664295025629407,-17558267875096465956744626556949664295025629406⟩,⟨-4930332981644214148308412873337430095071360303,-4930332981644214148308412873337430095071360302⟩⟩, + ⟨⟨-1005808701008804856250226542133311848260644859,-1005808701008804856250226542133311848260644858⟩,⟨-3466837425383206972993557562429867225266522350,-3466837425383206972993557562429867225266522349⟩⟩, + ⟨⟨366859149077115316371509003860998580653019081,366859149077115316371509003860998580653019082⟩,⟨-509164200610858050377488928190056637408510974,-509164200610858050377488928190056637408510973⟩⟩, + ⟨⟨92709209604739695726920583496031246513098981,92709209604739695726920583496031246513098982⟩,⟨-16893522968763078727811272307194284223439636,-16893522968763078727811272307194284223439635⟩⟩, + ⟨⟨11069371226733813638808534603090838712591330,11069371226733813638808534603090838712591331⟩,⟨4674492289346709905474700098868028271068456,4674492289346709905474700098868028271068457⟩⟩, + ⟨⟨958028231428210700098196913216815773854698,958028231428210700098196913216815773854699⟩,⟨853230922841919372122608746057714068368069,853230922841919372122608746057714068368070⟩⟩, + ⟨⟨86735824067276136864557113721196133555461,86735824067276136864557113721196133555462⟩,⟨74541763898128357882660297849767397552774,74541763898128357882660297849767397552775⟩⟩, + ⟨⟨8546594197774835973049286018631860522120,8546594197774835973049286018631860522121⟩,⟨1854548299411783462632809551811824287997,1854548299411783462632809551811824287998⟩⟩, + ⟨⟨373763473017156890241160675709582342621,373763473017156890241160675709582342622⟩,⟨-508708427404853843781373903504980419497,-508708427404853843781373903504980419496⟩⟩, + ⟨⟨-53038031352781421186282915743823845067,-53038031352781421186282915743823845066⟩,⟨-11309846898326148795178143247014626273,-11309846898326148795178143247014626272⟩⟩, + ⟨⟨7736295253376858425881434200104958946,7736295253376858425881434200104958947⟩,⟨3600609856770850800877433250628898642,3600609856770850800877433250628898643⟩⟩, + ⟨⟨-4211583743618428888651051795742833026,-4211583743618428888651051795742833025⟩,⟨-1,1⟩⟩, + ⟨⟨7736295253376858425881434200104958946,7736295253376858425881434200104958947⟩,⟨-3600609856770850800877433250628898643,-3600609856770850800877433250628898642⟩⟩, + ⟨⟨-53038031352781421186282915743823845067,-53038031352781421186282915743823845066⟩,⟨11309846898326148795178143247014626272,11309846898326148795178143247014626273⟩⟩, + ⟨⟨373763473017156890241160675709582342621,373763473017156890241160675709582342622⟩,⟨508708427404853843781373903504980419496,508708427404853843781373903504980419497⟩⟩, + ⟨⟨8546594197774835973049286018631860522120,8546594197774835973049286018631860522121⟩,⟨-1854548299411783462632809551811824287998,-1854548299411783462632809551811824287997⟩⟩, + ⟨⟨86735824067276136864557113721196133555461,86735824067276136864557113721196133555462⟩,⟨-74541763898128357882660297849767397552775,-74541763898128357882660297849767397552774⟩⟩, + ⟨⟨958028231428210700098196913216815773854698,958028231428210700098196913216815773854699⟩,⟨-853230922841919372122608746057714068368070,-853230922841919372122608746057714068368069⟩⟩, + ⟨⟨11069371226733813638808534603090838712591330,11069371226733813638808534603090838712591331⟩,⟨-4674492289346709905474700098868028271068457,-4674492289346709905474700098868028271068456⟩⟩, + ⟨⟨92709209604739695726920583496031246513098981,92709209604739695726920583496031246513098982⟩,⟨16893522968763078727811272307194284223439635,16893522968763078727811272307194284223439636⟩⟩, + ⟨⟨366859149077115316371509003860998580653019081,366859149077115316371509003860998580653019082⟩,⟨509164200610858050377488928190056637408510973,509164200610858050377488928190056637408510974⟩⟩, + ⟨⟨-1005808701008804856250226542133311848260644859,-1005808701008804856250226542133311848260644858⟩,⟨3466837425383206972993557562429867225266522349,3466837425383206972993557562429867225266522350⟩⟩, + ⟨⟨-17558267875096465956744626556949664295025629407,-17558267875096465956744626556949664295025629406⟩,⟨4930332981644214148308412873337430095071360302,4930332981644214148308412873337430095071360303⟩⟩, + ⟨⟨-55736951703053863066182432445296180997319170308,-55736951703053863066182432445296180997319170307⟩,⟨-60371190580571210856213734061886832537414505947,-60371190580571210856213734061886832537414505946⟩⟩, + ⟨⟨136578223278381840777791967434834804222326940950,136578223278381840777791967434834804222326940951⟩,⟨-305408452484023335540812764446393950796382360786,-305408452484023335540812764446393950796382360784⟩⟩, + ⟨⟨1242343079337263952052834095909713436218593216791,1242343079337263952052834095909713436218593216793⟩,⟨86757379450102734781152298713521973717701227500,86757379450102734781152298713521973717701227502⟩⟩, + ⟨⟨1005130285771682840292942008630050137712186643780,1005130285771682840292942008630050137712186643784⟩,⟨4160725650411830512209756188019275933901089627600,4160725650411830512209756188019275933901089627605⟩⟩] +lemma tw1_0_4_17_calc (j : Fin 31) : taylorWaveBox 1 0 4 17 j = tw1_0_4_17 j := by + revert j + decide +kernel +def tw1_0_4_18 : Fin 31 → CI := ![⟨⟨-576214813255826825309592194188253023583459915430,-576214813255826825309592194188253023583459915428⟩,⟨-858195367341135363189631266843934193932316174,-858195367341135363189631266843934193932316173⟩⟩, + ⟨⟨-49628772365485222735407880938063858326384048071,-49628772365485222735407880938063858326384048070⟩,⟨-149055276757351277206101038327148642907830569920,-149055276757351277206101038327148642907830569919⟩⟩, + ⟨⟨30356758456317493903896641288096457744454540954,30356758456317493903896641288096457744454540955⟩,⟨-25088997444436577636295576894442663229792298474,-25088997444436577636295576894442663229792298473⟩⟩, + ⟨⟨8073084273917759330241516419229230478317014734,8073084273917759330241516419229230478317014735⟩,⟨3940143045296185964916674568822421118589173976,3940143045296185964916674568822421118589173977⟩⟩, + ⟨⟨78331263040163476415706302599428935465526271,78331263040163476415706302599428935465526272⟩,⟨1840363698270549226025702693409203044949275865,1840363698270549226025702693409203044949275866⟩⟩, + ⟨⟨-270940226261441458272383025471804286298407262,-270940226261441458272383025471804286298407261⟩,⟨196687277256794643297982966633037869196289395,196687277256794643297982966633037869196289396⟩⟩, + ⟨⟨-51514882879178466686387050403528939650720211,-51514882879178466686387050403528939650720210⟩,⟨-12817185069971792689715179534815678370987892,-12817185069971792689715179534815678370987891⟩⟩, + ⟨⟨-4091936110408476875962235282868191989303084,-4091936110408476875962235282868191989303083⟩,⟨-5941598141577868711752368658212448721300828,-5941598141577868711752368658212448721300827⟩⟩, + ⟨⟨-62206068678995459512879998842639899062163,-62206068678995459512879998842639899062162⟩,⟨-823042915466838426557608697689709893117815,-823042915466838426557608697689709893117814⟩⟩, + ⟨⟨14577722112398670095131118254181439077339,14577722112398670095131118254181439077340⟩,⟨-76967280886599619515467743758425481001252,-76967280886599619515467743758425481001251⟩⟩, + ⟨⟨527611748738342274496576877355366253341,527611748738342274496576877355366253342⟩,⟨-6126362851991119899376483889237738033837,-6126362851991119899376483889237738033836⟩⟩, + ⟨⟨-203763227525431291162438474681170313088,-203763227525431291162438474681170313087⟩,⟨-356594770297623666518333773122726585352,-356594770297623666518333773122726585351⟩⟩, + ⟨⟨-25060081296394949009953926222999697538,-25060081296394949009953926222999697537⟩,⟨6196441741785496509115616281000847002,6196441741785496509115616281000847003⟩⟩, + ⟨⟨1468844830315372704750779444763411967,1468844830315372704750779444763411968⟩,⟨1280997595172085361630442082598675256,1280997595172085361630442082598675257⟩⟩, + ⟨⟨-211621634799896869109233765026189485,-211621634799896869109233765026189484⟩,⟨-180628406783660598901729305385141246,-180628406783660598901729305385141245⟩⟩, + ⟨⟨132310805489298554471944357650509706,132310805489298554471944357650509707⟩,⟨-1,1⟩⟩, + ⟨⟨-211621634799896869109233765026189485,-211621634799896869109233765026189484⟩,⟨180628406783660598901729305385141245,180628406783660598901729305385141246⟩⟩, + ⟨⟨1468844830315372704750779444763411967,1468844830315372704750779444763411968⟩,⟨-1280997595172085361630442082598675257,-1280997595172085361630442082598675256⟩⟩, + ⟨⟨-25060081296394949009953926222999697538,-25060081296394949009953926222999697537⟩,⟨-6196441741785496509115616281000847003,-6196441741785496509115616281000847002⟩⟩, + ⟨⟨-203763227525431291162438474681170313088,-203763227525431291162438474681170313087⟩,⟨356594770297623666518333773122726585351,356594770297623666518333773122726585352⟩⟩, + ⟨⟨527611748738342274496576877355366253341,527611748738342274496576877355366253342⟩,⟨6126362851991119899376483889237738033836,6126362851991119899376483889237738033837⟩⟩, + ⟨⟨14577722112398670095131118254181439077339,14577722112398670095131118254181439077340⟩,⟨76967280886599619515467743758425481001251,76967280886599619515467743758425481001252⟩⟩, + ⟨⟨-62206068678995459512879998842639899062163,-62206068678995459512879998842639899062162⟩,⟨823042915466838426557608697689709893117814,823042915466838426557608697689709893117815⟩⟩, + ⟨⟨-4091936110408476875962235282868191989303084,-4091936110408476875962235282868191989303083⟩,⟨5941598141577868711752368658212448721300827,5941598141577868711752368658212448721300828⟩⟩, + ⟨⟨-51514882879178466686387050403528939650720211,-51514882879178466686387050403528939650720210⟩,⟨12817185069971792689715179534815678370987891,12817185069971792689715179534815678370987892⟩⟩, + ⟨⟨-270940226261441458272383025471804286298407262,-270940226261441458272383025471804286298407261⟩,⟨-196687277256794643297982966633037869196289396,-196687277256794643297982966633037869196289395⟩⟩, + ⟨⟨78331263040163476415706302599428935465526271,78331263040163476415706302599428935465526272⟩,⟨-1840363698270549226025702693409203044949275866,-1840363698270549226025702693409203044949275865⟩⟩, + ⟨⟨8073084273917759330241516419229230478317014734,8073084273917759330241516419229230478317014735⟩,⟨-3940143045296185964916674568822421118589173977,-3940143045296185964916674568822421118589173976⟩⟩, + ⟨⟨30356758456317493903896641288096457744454540954,30356758456317493903896641288096457744454540955⟩,⟨25088997444436577636295576894442663229792298473,25088997444436577636295576894442663229792298474⟩⟩, + ⟨⟨-49628772365485222735407880938063858326384048071,-49628772365485222735407880938063858326384048070⟩,⟨149055276757351277206101038327148642907830569919,149055276757351277206101038327148642907830569920⟩⟩, + ⟨⟨-576214813255826825309592194188253023583459915430,-576214813255826825309592194188253023583459915428⟩,⟨858195367341135363189631266843934193932316173,858195367341135363189631266843934193932316174⟩⟩] +lemma tw1_0_4_18_calc (j : Fin 31) : taylorWaveBox 1 0 4 18 j = tw1_0_4_18 j := by + revert j + decide +kernel +def tw1_0_4_19 : Fin 31 → CI := ![⟨⟨17133318791666870423641371660904506843349399449,17133318791666870423641371660904506843349399450⟩,⟨71860289217335406894905466494104391128537022298,71860289217335406894905466494104391128537022299⟩⟩, + ⟨⟨-15858479582389726331093316052656375322174050544,-15858479582389726331093316052656375322174050543⟩,⟨10234293328476499795656437853532765740715421656,10234293328476499795656437853532765740715421657⟩⟩, + ⟨⟨-3618992540786445434434743771840696469640135376,-3618992540786445434434743771840696469640135375⟩,⟨-2529210384615394572577699192292173378470182503,-2529210384615394572577699192292173378470182502⟩⟩, + ⟨⟨151416564164127521780121184082314652062707464,151416564164127521780121184082314652062707465⟩,⟨-923042526359045932866771870018993348045303636,-923042526359045932866771870018993348045303635⟩⟩, + ⟨⟨165906079642256373938575622227136012656525882,165906079642256373938575622227136012656525883⟩,⟨-62224754480316458018835099104400637350417241,-62224754480316458018835099104400637350417240⟩⟩, + ⟨⟨24453372541351565610668302866344958865893602,24453372541351565610668302866344958865893603⟩,⟨16633221018054812224312257759135752117450025,16633221018054812224312257759135752117450026⟩⟩, + ⟨⟨582598490142431213485601963623209195292703,582598490142431213485601963623209195292704⟩,⟨4236793509189889352113096954920176749721360,4236793509189889352113096954920176749721361⟩⟩, + ⟨⟨-272618892732818450098245953499754285129617,-272618892732818450098245953499754285129616⟩,⟨449839849860143371309957498041120428454506,449839849860143371309957498041120428454507⟩⟩, + ⟨⟨-46021494644454842107464146350895271766493,-46021494644454842107464146350895271766492⟩,⟨28244388823136299505650393543386047114138,28244388823136299505650393543386047114139⟩⟩, + ⟨⟨-4274257190742135859354115643630035664561,-4274257190742135859354115643630035664560⟩,⟨1575914949614110150656847649697634225823,1575914949614110150656847649697634225824⟩⟩, + ⟨⟨-270369923129169640849765048616031288507,-270369923129169640849765048616031288506⟩,⟨161375199829699413085876772120012160746,161375199829699413085876772120012160747⟩⟩, + ⟨⟨-5758185797634686545533934171181967003,-5758185797634686545533934171181967002⟩,⟨17443270034641686512709870166439495197,17443270034641686512709870166439495198⟩⟩, + ⟨⟨904293465185168911243889421298549919,904293465185168911243889421298549920⟩,⟨439432795824196854347029587587794903,439432795824196854347029587587794904⟩⟩, + ⟨⟨-22654757653275148136212894415337595,-22654757653275148136212894415337594⟩,⟨-62742766507132216744466707902687879,-62742766507132216744466707902687878⟩⟩, + ⟨⟨4830485258835154464382660583077131,4830485258835154464382660583077132⟩,⟨7163196100635595285424839703642471,7163196100635595285424839703642472⟩⟩, + ⟨⟨-3958730043006937402911571201013128,-3958730043006937402911571201013127⟩,⟨-1,1⟩⟩, + ⟨⟨4830485258835154464382660583077131,4830485258835154464382660583077132⟩,⟨-7163196100635595285424839703642472,-7163196100635595285424839703642471⟩⟩, + ⟨⟨-22654757653275148136212894415337595,-22654757653275148136212894415337594⟩,⟨62742766507132216744466707902687878,62742766507132216744466707902687879⟩⟩, + ⟨⟨904293465185168911243889421298549919,904293465185168911243889421298549920⟩,⟨-439432795824196854347029587587794904,-439432795824196854347029587587794903⟩⟩, + ⟨⟨-5758185797634686545533934171181967003,-5758185797634686545533934171181967002⟩,⟨-17443270034641686512709870166439495198,-17443270034641686512709870166439495197⟩⟩, + ⟨⟨-270369923129169640849765048616031288507,-270369923129169640849765048616031288506⟩,⟨-161375199829699413085876772120012160747,-161375199829699413085876772120012160746⟩⟩, + ⟨⟨-4274257190742135859354115643630035664561,-4274257190742135859354115643630035664560⟩,⟨-1575914949614110150656847649697634225824,-1575914949614110150656847649697634225823⟩⟩, + ⟨⟨-46021494644454842107464146350895271766493,-46021494644454842107464146350895271766492⟩,⟨-28244388823136299505650393543386047114139,-28244388823136299505650393543386047114138⟩⟩, + ⟨⟨-272618892732818450098245953499754285129617,-272618892732818450098245953499754285129616⟩,⟨-449839849860143371309957498041120428454507,-449839849860143371309957498041120428454506⟩⟩, + ⟨⟨582598490142431213485601963623209195292703,582598490142431213485601963623209195292704⟩,⟨-4236793509189889352113096954920176749721361,-4236793509189889352113096954920176749721360⟩⟩, + ⟨⟨24453372541351565610668302866344958865893602,24453372541351565610668302866344958865893603⟩,⟨-16633221018054812224312257759135752117450026,-16633221018054812224312257759135752117450025⟩⟩, + ⟨⟨165906079642256373938575622227136012656525882,165906079642256373938575622227136012656525883⟩,⟨62224754480316458018835099104400637350417240,62224754480316458018835099104400637350417241⟩⟩, + ⟨⟨151416564164127521780121184082314652062707464,151416564164127521780121184082314652062707465⟩,⟨923042526359045932866771870018993348045303635,923042526359045932866771870018993348045303636⟩⟩, + ⟨⟨-3618992540786445434434743771840696469640135376,-3618992540786445434434743771840696469640135375⟩,⟨2529210384615394572577699192292173378470182502,2529210384615394572577699192292173378470182503⟩⟩, + ⟨⟨-15858479582389726331093316052656375322174050544,-15858479582389726331093316052656375322174050543⟩,⟨-10234293328476499795656437853532765740715421657,-10234293328476499795656437853532765740715421656⟩⟩, + ⟨⟨17133318791666870423641371660904506843349399449,17133318791666870423641371660904506843349399450⟩,⟨-71860289217335406894905466494104391128537022299,-71860289217335406894905466494104391128537022298⟩⟩] +lemma tw1_0_4_19_calc (j : Fin 31) : taylorWaveBox 1 0 4 19 j = tw1_0_4_19 j := by + revert j + decide +kernel +def tw1_0_4_20 : Fin 31 → CI := ![⟨⟨8062027979644535031622554082865429323872553193,8062027979644535031622554082865429323872553194⟩,⟨-4091185229284738358253105805301503104484942149,-4091185229284738358253105805301503104484942148⟩⟩, + ⟨⟨1589603305371840225986696378850640861652216590,1589603305371840225986696378850640861652216591⟩,⟨1469053612869749632206358492094181442012316868,1469053612869749632206358492094181442012316869⟩⟩, + ⟨⟨-157487102428454952793824381313851411470841279,-157487102428454952793824381313851411470841278⟩,⟨445471970917144200390284964931450631127500245,445471970917144200390284964931450631127500246⟩⟩, + ⟨⟨-92197889983136089573886526761905763987526341,-92197889983136089573886526761905763987526340⟩,⟨11947209706616120023587072472377230809120877,11947209706616120023587072472377230809120878⟩⟩, + ⟨⟨-10168400764087583646594431650681864046265094,-10168400764087583646594431650681864046265093⟩,⟨-12700901861922997015665842710766166330593368,-12700901861922997015665842710766166330593367⟩⟩, + ⟨⟨621179095064412559780054346166346762115960,621179095064412559780054346166346762115961⟩,⟨-2415006699886685184247456908153478742302934,-2415006699886685184247456908153478742302933⟩⟩, + ⟨⟨285867375195415671484921147056805622660514,285867375195415671484921147056805622660515⟩,⟨-162599974589161774728509353938788078065401,-162599974589161774728509353938788078065400⟩⟩, + ⟨⟨36335746412125350225508994345043833932278,36335746412125350225508994345043833932279⟩,⟨4454775862900069026663153356251243848558,4454775862900069026663153356251243848559⟩⟩, + ⟨⟨2882872204947877513514808623050661913274,2882872204947877513514808623050661913275⟩,⟨1749063167729429864780970433357366277765,1749063167729429864780970433357366277766⟩⟩, + ⟨⟨197085876096717008945541525198229142135,197085876096717008945541525198229142136⟩,⟨158446140802345925063003797729718654814,158446140802345925063003797729718654815⟩⟩, + ⟨⟨14122948238884075565017312795756855763,14122948238884075565017312795756855764⟩,⟨6115783608958423299284786737260831362,6115783608958423299284786737260831363⟩⟩, + ⟨⟨717985209851334284139047999260589684,717985209851334284139047999260589685⟩,⟨-315452625212300559842499838484182834,-315452625212300559842499838484182833⟩⟩, + ⟨⟨-15368084887805003939377184476190975,-15368084887805003939377184476190974⟩,⟨-34072305444274610592831830189122286,-34072305444274610592831830189122285⟩⟩, + ⟨⟨-348497868396014516632035027003726,-348497868396014516632035027003725⟩,⟨2151383868670998465986795404381378,2151383868670998465986795404381379⟩⟩, + ⟨⟨-81130446875680010925191979745195,-81130446875680010925191979745194⟩,⟨-242902162343327611124372280730151,-242902162343327611124372280730150⟩⟩, + ⟨⟨113061065642325461684384672924569,113061065642325461684384672924570⟩,⟨-1,1⟩⟩, + ⟨⟨-81130446875680010925191979745195,-81130446875680010925191979745194⟩,⟨242902162343327611124372280730150,242902162343327611124372280730151⟩⟩, + ⟨⟨-348497868396014516632035027003726,-348497868396014516632035027003725⟩,⟨-2151383868670998465986795404381379,-2151383868670998465986795404381378⟩⟩, + ⟨⟨-15368084887805003939377184476190975,-15368084887805003939377184476190974⟩,⟨34072305444274610592831830189122285,34072305444274610592831830189122286⟩⟩, + ⟨⟨717985209851334284139047999260589684,717985209851334284139047999260589685⟩,⟨315452625212300559842499838484182833,315452625212300559842499838484182834⟩⟩, + ⟨⟨14122948238884075565017312795756855763,14122948238884075565017312795756855764⟩,⟨-6115783608958423299284786737260831363,-6115783608958423299284786737260831362⟩⟩, + ⟨⟨197085876096717008945541525198229142135,197085876096717008945541525198229142136⟩,⟨-158446140802345925063003797729718654815,-158446140802345925063003797729718654814⟩⟩, + ⟨⟨2882872204947877513514808623050661913274,2882872204947877513514808623050661913275⟩,⟨-1749063167729429864780970433357366277766,-1749063167729429864780970433357366277765⟩⟩, + ⟨⟨36335746412125350225508994345043833932278,36335746412125350225508994345043833932279⟩,⟨-4454775862900069026663153356251243848559,-4454775862900069026663153356251243848558⟩⟩, + ⟨⟨285867375195415671484921147056805622660514,285867375195415671484921147056805622660515⟩,⟨162599974589161774728509353938788078065400,162599974589161774728509353938788078065401⟩⟩, + ⟨⟨621179095064412559780054346166346762115960,621179095064412559780054346166346762115961⟩,⟨2415006699886685184247456908153478742302933,2415006699886685184247456908153478742302934⟩⟩, + ⟨⟨-10168400764087583646594431650681864046265094,-10168400764087583646594431650681864046265093⟩,⟨12700901861922997015665842710766166330593367,12700901861922997015665842710766166330593368⟩⟩, + ⟨⟨-92197889983136089573886526761905763987526341,-92197889983136089573886526761905763987526340⟩,⟨-11947209706616120023587072472377230809120878,-11947209706616120023587072472377230809120877⟩⟩, + ⟨⟨-157487102428454952793824381313851411470841279,-157487102428454952793824381313851411470841278⟩,⟨-445471970917144200390284964931450631127500246,-445471970917144200390284964931450631127500245⟩⟩, + ⟨⟨1589603305371840225986696378850640861652216590,1589603305371840225986696378850640861652216591⟩,⟨-1469053612869749632206358492094181442012316869,-1469053612869749632206358492094181442012316868⟩⟩, + ⟨⟨8062027979644535031622554082865429323872553193,8062027979644535031622554082865429323872553194⟩,⟨4091185229284738358253105805301503104484942148,4091185229284738358253105805301503104484942149⟩⟩] +lemma tw1_0_4_20_calc (j : Fin 31) : taylorWaveBox 1 0 4 20 j = tw1_0_4_20 j := by + revert j + decide +kernel +def tw1_0_4 : Fin 21 → Fin 31 → CI := ![tw1_0_4_0,tw1_0_4_1,tw1_0_4_2,tw1_0_4_3,tw1_0_4_4,tw1_0_4_5,tw1_0_4_6,tw1_0_4_7,tw1_0_4_8,tw1_0_4_9,tw1_0_4_10,tw1_0_4_11,tw1_0_4_12,tw1_0_4_13,tw1_0_4_14,tw1_0_4_15,tw1_0_4_16,tw1_0_4_17,tw1_0_4_18,tw1_0_4_19,tw1_0_4_20] +lemma tw1_0_4_mem (l : Fin 21) (j : Fin 31) : (tw1_0_4 l j).Mem (taylorWave 1 0 (nearNode 4) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 4 l j = tw1_0_4 l j := by + fin_cases l + · exact tw1_0_4_0_calc j + · exact tw1_0_4_1_calc j + · exact tw1_0_4_2_calc j + · exact tw1_0_4_3_calc j + · exact tw1_0_4_4_calc j + · exact tw1_0_4_5_calc j + · exact tw1_0_4_6_calc j + · exact tw1_0_4_7_calc j + · exact tw1_0_4_8_calc j + · exact tw1_0_4_9_calc j + · exact tw1_0_4_10_calc j + · exact tw1_0_4_11_calc j + · exact tw1_0_4_12_calc j + · exact tw1_0_4_13_calc j + · exact tw1_0_4_14_calc j + · exact tw1_0_4_15_calc j + · exact tw1_0_4_16_calc j + · exact tw1_0_4_17_calc j + · exact tw1_0_4_18_calc j + · exact tw1_0_4_19_calc j + · exact tw1_0_4_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 4 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave105.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave105.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6318a6277c6ef90086b907de868ec331282b594 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave105.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_5_0 : Fin 31 → CI := ![⟨⟨-1716482127752839656360070633098920064164326173013935810956,-1716482127752839656360070633098920064164326173013063029161⟩,⟨874269335018424273188490984600468623513239137357868099837,874269335018424273188490984600468623513239137358734184151⟩⟩, + ⟨⟨34198820279789702554383088607819074211611691342162286348,34198820279789702554383088607819074211611691343363634644⟩,⟨-1691203519651237962374057339170004847645166435247567091635,-1691203519651237962374057339170004847645166435246363623646⟩⟩, + ⟨⟨1287766170378717054233273882336161003577413641779985826248,1287766170378717054233273882336161003577413641780782693635⟩,⟨715076254665735229583935985417999682690896094595282292913,715076254665735229583935985417999682690896094596080753385⟩⟩, + ⟨⟨-1060780126489021451468702394648568596529396819994885792825,-1060780126489021451468702394648568596529396819994635028652⟩,⟨699415468014739418550792787680374898810591309886521656177,699415468014739418550792787680374898810591309886768784046⟩⟩, + ⟨⟨-117939030270915349433014929178076919252156693283854807281,-117939030270915349433014929178076919252156693283366954904⟩,⟨-1077985298735726404720543052900004085870633863098019408758,-1077985298735726404720543052900004085870633863097530489229⟩⟩, + ⟨⟨857057797583805924095011243721744581365689268167654341400,857057797583805924095011243721744581365689268168101965274⟩,⟨318775203747002056994893111092888957572868042590993315045,318775203747002056994893111092888957572868042591441696925⟩⟩, + ⟨⟨-550789681061607292108749320298295232813340656535839358935,-550789681061607292108749320298295232813340656535643003589⟩,⟨524561601011054563913094590760281174107943482414889000927,524561601011054563913094590760281174107943482415083853515⟩⟩, + ⟨⟨-197221102903418378654705364913933860756488483130252688294,-197221102903418378654705364913933860756488483129992418872⟩,⟨-590956986799495438347348411704392259957671368967920402051,-590956986799495438347348411704392259957671368967659772953⟩⟩, + ⟨⟨499205202707096816722456187157367211113401489335147969905,499205202707096816722456187157367211113401489335311759469⟩,⟨48664061807549475686169881842167168316410068605879538107,48664061807549475686169881842167168316410068606043558119⟩⟩, + ⟨⟨-186510791470597178280211410048099973016157682636465736790,-186510791470597178280211410048099973016157682636417726481⟩,⟨349707734007369709275396393840187449405295654943301624337,349707734007369709275396393840187449405295654943349337805⟩⟩, + ⟨⟨-203647397617719385110688218599751750301383678196804838044,-203647397617719385110688218599751750301383678196740519095⟩,⟨-230118583842545063254473415583169369906278952857043303045,-230118583842545063254473415583169369906278952856978961048⟩⟩, + ⟨⟨214208385748589732115608712643028892820550305282421030030,214208385748589732115608712643028892820550305282459001127⟩,⟨-95257171152622514342233702334165685078477827360105699086,-95257171152622514342233702334165685078477827360067719593⟩⟩, + ⟨⟨32056542284008890016911336102017182862152101703131338931,32056542284008890016911336102017182862152101703144537350⟩,⟨174853867003684854637698196920093724702647827471656509479,174853867003684854637698196920093724702647827471669689346⟩⟩, + ⟨⟨-137217914413818368800963490235530587886842278483569526343,-137217914413818368800963490235530587886842278483554228944⟩,⟨4529910135124720558081935463664584283543385234553879447,4529910135124720558081935463664584283543385234569237546⟩⟩, + ⟨⟨2067346708284670274468820178729626487135716009505391423,2067346708284670274468820178729626487135716009513063786⟩,⟨-112988495133513913090317641436109602611795645306931549295,-112988495133513913090317641436109602611795645306923701207⟩⟩, + ⟨⟨104912320202210912782618918152056234821588696482996216487,104912320202210912782618918152056234821588696482999439645⟩,⟨-8,9⟩⟩, + ⟨⟨2067346708284670274468820178729626487135716009505391422,2067346708284670274468820178729626487135716009513063785⟩,⟨112988495133513913090317641436109602611795645306923701208,112988495133513913090317641436109602611795645306931549296⟩⟩, + ⟨⟨-137217914413818368800963490235530587886842278483569526342,-137217914413818368800963490235530587886842278483554228943⟩,⟨-4529910135124720558081935463664584283543385234569237546,-4529910135124720558081935463664584283543385234553879447⟩⟩, + ⟨⟨32056542284008890016911336102017182862152101703131338933,32056542284008890016911336102017182862152101703144537352⟩,⟨-174853867003684854637698196920093724702647827471669689345,-174853867003684854637698196920093724702647827471656509478⟩⟩, + ⟨⟨214208385748589732115608712643028892820550305282421030033,214208385748589732115608712643028892820550305282459001126⟩,⟨95257171152622514342233702334165685078477827360067719598,95257171152622514342233702334165685078477827360105699086⟩⟩, + ⟨⟨-203647397617719385110688218599751750301383678196804838046,-203647397617719385110688218599751750301383678196740519095⟩,⟨230118583842545063254473415583169369906278952856978961046,230118583842545063254473415583169369906278952857043303045⟩⟩, + ⟨⟨-186510791470597178280211410048099973016157682636465736786,-186510791470597178280211410048099973016157682636417726479⟩,⟨-349707734007369709275396393840187449405295654943349337805,-349707734007369709275396393840187449405295654943301624340⟩⟩, + ⟨⟨499205202707096816722456187157367211113401489335147969903,499205202707096816722456187157367211113401489335311759475⟩,⟨-48664061807549475686169881842167168316410068606043558121,-48664061807549475686169881842167168316410068605879538101⟩⟩, + ⟨⟨-197221102903418378654705364913933860756488483130252688291,-197221102903418378654705364913933860756488483129992418881⟩,⟨590956986799495438347348411704392259957671368967659772957,590956986799495438347348411704392259957671368967920402042⟩⟩, + ⟨⟨-550789681061607292108749320298295232813340656535839358925,-550789681061607292108749320298295232813340656535643003587⟩,⟨-524561601011054563913094590760281174107943482415083853516,-524561601011054563913094590760281174107943482414889000937⟩⟩, + ⟨⟨857057797583805924095011243721744581365689268167654341400,857057797583805924095011243721744581365689268168101965286⟩,⟨-318775203747002056994893111092888957572868042591441696928,-318775203747002056994893111092888957572868042590993315036⟩⟩, + ⟨⟨-117939030270915349433014929178076919252156693283854807278,-117939030270915349433014929178076919252156693283366954916⟩,⟨1077985298735726404720543052900004085870633863097530489233,1077985298735726404720543052900004085870633863098019408748⟩⟩, + ⟨⟨-1060780126489021451468702394648568596529396819994885792818,-1060780126489021451468702394648568596529396819994635028644⟩,⟨-699415468014739418550792787680374898810591309886768784058,-699415468014739418550792787680374898810591309886521656189⟩⟩, + ⟨⟨1287766170378717054233273882336161003577413641779985826253,1287766170378717054233273882336161003577413641780782693642⟩,⟨-715076254665735229583935985417999682690896094596080753382,-715076254665735229583935985417999682690896094595282292909⟩⟩, + ⟨⟨34198820279789702554383088607819074211611691342162286359,34198820279789702554383088607819074211611691343363634618⟩,⟨1691203519651237962374057339170004847645166435246363623661,1691203519651237962374057339170004847645166435247567091614⟩⟩, + ⟨⟨-1716482127752839656360070633098920064164326173013935810949,-1716482127752839656360070633098920064164326173013063029154⟩,⟨-874269335018424273188490984600468623513239137358734184164,-874269335018424273188490984600468623513239137357868099849⟩⟩] +lemma tw1_0_5_0_calc (j : Fin 31) : taylorWaveBox 1 0 5 0 j = tw1_0_5_0 j := by + revert j + decide +kernel +def tw1_0_5_1 : Fin 31 → CI := ![⟨⟨1122443098435743050778486558627996976436891257195081334705,1122443098435743050778486558627996976436891257195901865950⟩,⟨1314806692702735085310126769101582465148343257136796170156,1314806692702735085310126769101582465148343257137622921342⟩⟩, + ⟨⟨-1384625838667595551123505827205056280776329508863959696060,-1384625838667595551123505827205056280776329508862899791959⟩,⟨326350342875695574148375025686757598874020325132670570569,326350342875695574148375025686757598874020325133728763646⟩⟩, + ⟨⟨271109735998800936789377125054731206892647119287664743229,271109735998800936789377125054731206892647119288316195728⟩,⟨-1123714806213590259928665809871981112456034717296004075806,-1123714806213590259928665809871981112456034717295353862824⟩⟩, + ⟨⟨710453380412835731977247609702549472850756619562471854781,710453380412835731977247609702549472850756619562658772596⟩,⟨594079000803402158468947027586324301467413897228633436606,594079000803402158468947027586324301467413897228822693577⟩⟩, + ⟨⟨-665159974799839275337128933676037356834306955240812158645,-665159974799839275337128933676037356834306955240479462065⟩,⟨301248274156410649463187289080686117103891236528251523146,301248274156410649463187289080686117103891236528583682551⟩⟩, + ⟨⟨5954130597289519908533555398320975401207793669948209595,5954130597289519908533555398320975401207793670221351729⟩,⟨-565380137473495253019626708573127550494477434947450885005,-565380137473495253019626708573127550494477434947178107250⟩⟩, + ⟨⟨390016933061685595131839538316090303394874123625789900876,390016933061685595131839538316090303394874123625895159370⟩,⟨178528877809926504813870211201027251553991676307553420355,178528877809926504813870211201027251553991676307659177183⟩⟩, + ⟨⟨-233737979660805951004744466637314828763740790821171185205,-233737979660805951004744466637314828763740790821050890205⟩,⟨215560611223235659208357877468372278526938570985747089245,215560611223235659208357877468372278526938570985867328294⟩⟩, + ⟨⟨-84735170692060160244700918735945033331420949745821039023,-84735170692060160244700918735945033331420949745758070091⟩,⟨-213490247312135294578785991756747606272665322275093415412,-213490247312135294578785991756747606272665322275030483488⟩⟩, + ⟨⟨161133756382292640242262344468619468069243769385316914568,161133756382292640242262344468619468069243769385333092297⟩,⟨-8138068504156193951629411336798963033800190373003755118,-8138068504156193951629411336798963033800190372987608475⟩⟩, + ⟨⟨-24286971416083479814695065801397179617450019689797903558,-24286971416083479814695065801397179617450019689774304798⟩,⟨107434550189402762532149656491061222364100720878778013669,107434550189402762532149656491061222364100720878801633029⟩⟩, + ⟨⟨-67031049703660201981983657635558336252420106874681080718,-67031049703660201981983657635558336252420106874665641923⟩,⟨-29897939616278225457880793781596140569659986905510316500,-29897939616278225457880793781596140569659986905494872542⟩⟩, + ⟨⟨23803850374656867308516028160136966873865556841011786324,23803850374656867308516028160136966873865556841016186338⟩,⟨-42216230365310256124077571309644620737838487559920012807,-42216230365310256124077571309644620737838487559915597575⟩⟩, + ⟨⟨29265931768740236544676629119207107551746354068367021187,29265931768740236544676629119207107551746354068370104127⟩,⟨15017287168144118582825491789998087836316078580784805382,15017287168144118582825491789998087836316078580787896842⟩⟩, + ⟨⟨-7006388271922703614972021588010450308970673631608138142,-7006388271922703614972021588010450308970673631606290317⟩,⟨23543981727308113491351750993571985835476963534781801015,23543981727308113491351750993571985835476963534783673726⟩⟩, + ⟨⟨-21972784961221723669399410609357200191260514007090142050,-21972784961221723669399410609357200191260514007089397051⟩,⟨-2,2⟩⟩, + ⟨⟨-7006388271922703614972021588010450308970673631608138142,-7006388271922703614972021588010450308970673631606290317⟩,⟨-23543981727308113491351750993571985835476963534783673726,-23543981727308113491351750993571985835476963534781801015⟩⟩, + ⟨⟨29265931768740236544676629119207107551746354068367021187,29265931768740236544676629119207107551746354068370104127⟩,⟨-15017287168144118582825491789998087836316078580787896841,-15017287168144118582825491789998087836316078580784805382⟩⟩, + ⟨⟨23803850374656867308516028160136966873865556841011786324,23803850374656867308516028160136966873865556841016186337⟩,⟨42216230365310256124077571309644620737838487559915597576,42216230365310256124077571309644620737838487559920012808⟩⟩, + ⟨⟨-67031049703660201981983657635558336252420106874681080717,-67031049703660201981983657635558336252420106874665641924⟩,⟨29897939616278225457880793781596140569659986905494872543,29897939616278225457880793781596140569659986905510316499⟩⟩, + ⟨⟨-24286971416083479814695065801397179617450019689797903558,-24286971416083479814695065801397179617450019689774304797⟩,⟨-107434550189402762532149656491061222364100720878801633029,-107434550189402762532149656491061222364100720878778013669⟩⟩, + ⟨⟨161133756382292640242262344468619468069243769385316914569,161133756382292640242262344468619468069243769385333092296⟩,⟨8138068504156193951629411336798963033800190372987608477,8138068504156193951629411336798963033800190373003755120⟩⟩, + ⟨⟨-84735170692060160244700918735945033331420949745821039026,-84735170692060160244700918735945033331420949745758070091⟩,⟨213490247312135294578785991756747606272665322275030483488,213490247312135294578785991756747606272665322275093415414⟩⟩, + ⟨⟨-233737979660805951004744466637314828763740790821171185201,-233737979660805951004744466637314828763740790821050890206⟩,⟨-215560611223235659208357877468372278526938570985867328292,-215560611223235659208357877468372278526938570985747089248⟩⟩, + ⟨⟨390016933061685595131839538316090303394874123625789900880,390016933061685595131839538316090303394874123625895159370⟩,⟨-178528877809926504813870211201027251553991676307659177176,-178528877809926504813870211201027251553991676307553420353⟩⟩, + ⟨⟨5954130597289519908533555398320975401207793669948209588,5954130597289519908533555398320975401207793670221351730⟩,⟨565380137473495253019626708573127550494477434947178107249,565380137473495253019626708573127550494477434947450885013⟩⟩, + ⟨⟨-665159974799839275337128933676037356834306955240812158636,-665159974799839275337128933676037356834306955240479462066⟩,⟨-301248274156410649463187289080686117103891236528583682548,-301248274156410649463187289080686117103891236528251523153⟩⟩, + ⟨⟨710453380412835731977247609702549472850756619562471854787,710453380412835731977247609702549472850756619562658772603⟩,⟨-594079000803402158468947027586324301467413897228822693569,-594079000803402158468947027586324301467413897228633436598⟩⟩, + ⟨⟨271109735998800936789377125054731206892647119287664743225,271109735998800936789377125054731206892647119288316195724⟩,⟨1123714806213590259928665809871981112456034717295353862827,1123714806213590259928665809871981112456034717296004075811⟩⟩, + ⟨⟨-1384625838667595551123505827205056280776329508863959696039,-1384625838667595551123505827205056280776329508862899791971⟩,⟨-326350342875695574148375025686757598874020325133728763634,-326350342875695574148375025686757598874020325132670570590⟩⟩, + ⟨⟨1122443098435743050778486558627996976436891257195081334715,1122443098435743050778486558627996976436891257195901865960⟩,⟨-1314806692702735085310126769101582465148343257137622921333,-1314806692702735085310126769101582465148343257136796170147⟩⟩] +lemma tw1_0_5_1_calc (j : Fin 31) : taylorWaveBox 1 0 5 1 j = tw1_0_5_1 j := by + revert j + decide +kernel +def tw1_0_5_2 : Fin 31 → CI := ![⟨⟨684226018453586339923336634441724062977843165119534340697,684226018453586339923336634441724062977843165120090512479⟩,⟨-941166642358925165824931269190549950593255415296564108226,-941166642358925165824931269190549950593255415296011334936⟩⟩, + ⟨⟨416852598073201981814106879776483115837526154193646450023,416852598073201981814106879776483115837526154194303883612⟩,⟨794556800769067765270288386681747749878919905829359747142,794556800769067765270288386681747749878919905830017952865⟩⟩, + ⟨⟨-679992822456233579673943475118109211027961625787680946758,-679992822456233579673943475118109211027961625787309834819⟩,⟨22730589356305258575377572247841448218176686909379075803,22730589356305258575377572247841448218176686909750714903⟩⟩, + ⟨⟨199461281398172210581845083014418305318710972224150445441,199461281398172210581845083014418305318710972224249474904⟩,⟨-465310231332629895226179941576040994249161251161814601629,-465310231332629895226179941576040994249161251161716293741⟩⟩, + ⟨⟨249071876389104857714054400055408077030408435177270831420,249071876389104857714054400055408077030408435177424821122⟩,⟨271933901100522730040278566004405650165637603261027401621,271933901100522730040278566004405650165637603261181474232⟩⟩, + ⟨⟨-247628895754414621971257365291293674318467311348488451679,-247628895754414621971257365291293674318467311348377931041⟩,⟨86211724743205035425523693502911091071060975718832639138,86211724743205035425523693502911091071060975718943215213⟩⟩, + ⟨⟨8844409788551189801088276018624268211432374743047050216,8844409788551189801088276018624268211432374743083711615⟩,⟨-181202542009341449583271996479131348722029141077437093187,-181202542009341449583271996479131348722029141077400390588⟩⟩, + ⟨⟨111960324057503500033877591534150332496748423741193934267,111960324057503500033877591534150332496748423741236054771⟩,⟨47729765009699920148369760567788327747172506419852114137,47729765009699920148369760567788327747172506419894191793⟩⟩, + ⟨⟨-51896715901297698952741133943146720495393017757076583675,-51896715901297698952741133943146720495393017757051851874⟩,⟨59415854742721026748188914262362099591577136997081982609,59415854742721026748188914262362099591577136997106688559⟩⟩, + ⟨⟨-27441372617052532282569586298074212481360791735184301569,-27441372617052532282569586298074212481360791735177662726⟩,⟨-40906393963308122657246588270421186307618571530708206571,-40906393963308122657246588270421186307618571530701513475⟩⟩, + ⟨⟨27253571438987855700271004152533112986864229143656891029,27253571438987855700271004152533112986864229143664235730⟩,⟨-11577184473982502026473587557365298936386832470896146207,-11577184473982502026473587557365298936386832470888807187⟩⟩, + ⟨⟨5311037806906508052312783060007988951544429509888843978,5311037806906508052312783060007988951544429509892150599⟩,⟨16395482556766944504231616813996657350365453322146044025,16395482556766944504231616813996657350365453322149349876⟩⟩, + ⟨⟨-9265191705621677000296932330260111143502930361675075863,-9265191705621677000296932330260111143502930361674140696⟩,⟨3515393231221791790857128679489320698310970990919457401,3515393231221791790857128679489320698310970990920394501⟩⟩, + ⟨⟨-3286576283248672626304497828536945625692919987459796124,-3286576283248672626304497828536945625692919987459061022⟩,⟨-4912844292357115841638046264139100589859906128938858112,-4912844292357115841638046264139100589859906128938124810⟩⟩, + ⟨⟨2127860896590773448378264172930197655861324345483329141,2127860896590773448378264172930197655861324345483646885⟩,⟨-3392568641492757609138806590560262937025747787130822912,-3392568641492757609138806590560262937025747787130504419⟩⟩, + ⟨⟨3451476990654122849205180885316787594705316972903150955,3451476990654122849205180885316787594705316972903278967⟩,⟨-1,1⟩⟩, + ⟨⟨2127860896590773448378264172930197655861324345483329141,2127860896590773448378264172930197655861324345483646885⟩,⟨3392568641492757609138806590560262937025747787130504419,3392568641492757609138806590560262937025747787130822912⟩⟩, + ⟨⟨-3286576283248672626304497828536945625692919987459796124,-3286576283248672626304497828536945625692919987459061022⟩,⟨4912844292357115841638046264139100589859906128938124810,4912844292357115841638046264139100589859906128938858112⟩⟩, + ⟨⟨-9265191705621677000296932330260111143502930361675075863,-9265191705621677000296932330260111143502930361674140696⟩,⟨-3515393231221791790857128679489320698310970990920394501,-3515393231221791790857128679489320698310970990919457401⟩⟩, + ⟨⟨5311037806906508052312783060007988951544429509888843978,5311037806906508052312783060007988951544429509892150599⟩,⟨-16395482556766944504231616813996657350365453322149349875,-16395482556766944504231616813996657350365453322146044025⟩⟩, + ⟨⟨27253571438987855700271004152533112986864229143656891029,27253571438987855700271004152533112986864229143664235730⟩,⟨11577184473982502026473587557365298936386832470888807187,11577184473982502026473587557365298936386832470896146207⟩⟩, + ⟨⟨-27441372617052532282569586298074212481360791735184301569,-27441372617052532282569586298074212481360791735177662727⟩,⟨40906393963308122657246588270421186307618571530701513475,40906393963308122657246588270421186307618571530708206571⟩⟩, + ⟨⟨-51896715901297698952741133943146720495393017757076583676,-51896715901297698952741133943146720495393017757051851873⟩,⟨-59415854742721026748188914262362099591577136997106688560,-59415854742721026748188914262362099591577136997081982608⟩⟩, + ⟨⟨111960324057503500033877591534150332496748423741193934268,111960324057503500033877591534150332496748423741236054770⟩,⟨-47729765009699920148369760567788327747172506419894191791,-47729765009699920148369760567788327747172506419852114137⟩⟩, + ⟨⟨8844409788551189801088276018624268211432374743047050214,8844409788551189801088276018624268211432374743083711612⟩,⟨181202542009341449583271996479131348722029141077400390588,181202542009341449583271996479131348722029141077437093186⟩⟩, + ⟨⟨-247628895754414621971257365291293674318467311348488451682,-247628895754414621971257365291293674318467311348377931040⟩,⟨-86211724743205035425523693502911091071060975718943215216,-86211724743205035425523693502911091071060975718832639138⟩⟩, + ⟨⟨249071876389104857714054400055408077030408435177270831423,249071876389104857714054400055408077030408435177424821121⟩,⟨-271933901100522730040278566004405650165637603261181474227,-271933901100522730040278566004405650165637603261027401621⟩⟩, + ⟨⟨199461281398172210581845083014418305318710972224150445435,199461281398172210581845083014418305318710972224249474899⟩,⟨465310231332629895226179941576040994249161251161716293743,465310231332629895226179941576040994249161251161814601631⟩⟩, + ⟨⟨-679992822456233579673943475118109211027961625787680946760,-679992822456233579673943475118109211027961625787309834821⟩,⟨-22730589356305258575377572247841448218176686909750714906,-22730589356305258575377572247841448218176686909379075805⟩⟩, + ⟨⟨416852598073201981814106879776483115837526154193646450035,416852598073201981814106879776483115837526154194303883605⟩,⟨-794556800769067765270288386681747749878919905830017952851,-794556800769067765270288386681747749878919905829359747148⟩⟩, + ⟨⟨684226018453586339923336634441724062977843165119534340690,684226018453586339923336634441724062977843165120090512472⟩,⟨941166642358925165824931269190549950593255415296011334941,941166642358925165824931269190549950593255415296564108231⟩⟩] +lemma tw1_0_5_2_calc (j : Fin 31) : taylorWaveBox 1 0 5 2 j = tw1_0_5_2 j := by + revert j + decide +kernel +def tw1_0_5_3 : Fin 31 → CI := ![⟨⟨-578776078891846514494453859856847576368445379978113376898,-578776078891846514494453859856847576368445379977830779697⟩,⟨-239989417117253993236917590604656009465237431393633226800,-239989417117253993236917590604656009465237431393349602679⟩⟩, + ⟨⟨335910461101456080556579772239582892507676362014920495189,335910461101456080556579772239582892507676362015227527740⟩,⟨-303559561618594957948454620889120888322665546560890089893,-303559561618594957948454620889120888322665546560583197063⟩⟩, + ⟨⟨95765232475735616731132267704839031750045545136752292902,95765232475735616731132267704839031750045545136909866812⟩,⟨305714544585211890533959033072721969169564230840240888536,305714544585211890533959033072721969169564230840398374510⟩⟩, + ⟨⟨-219973737771945146144950561065504862353743637019577753422,-219973737771945146144950561065504862353743637019539552745⟩,⟨-25077537999690281016662653318811967544364370391237889173,-25077537999690281016662653318811967544364370391199725045⟩⟩, + ⟨⟨73115827200735097298613305650111586605935154023440529776,73115827200735097298613305650111586605935154023492474730⟩,⟨-129808956814801133829858087431451602887840701231037171192,-129808956814801133829858087431451602887840701230985162726⟩⟩, + ⟨⟨61211533800584684604270057611652186068803164207257349671,61211533800584684604270057611652186068803164207298360495⟩,⟨75605106235584523719815120839219832598265005485548829598,75605106235584523719815120839219832598265005485589878159⟩⟩, + ⟨⟨-58037878791516301924252500016036791239028649612311673085,-58037878791516301924252500016036791239028649612296340560⟩,⟨19992029709828712129442418851857605576265123348462039175,19992029709828712129442418851857605576265123348477260519⟩⟩, + ⟨⟨-740684452144273666764506707609885539044295805585909876,-740684452144273666764506707609885539044295805569826821⟩,⟨-37263119746933669629372331325735151260217064322614256846,-37263119746933669629372331325735151260217064322598148592⟩⟩, + ⟨⟨21039565760898522316845529090703132217285246542673776408,21039565760898522316845529090703132217285246542681532549⟩,⟨5214343377636753847172359053882014367264566261933037660,5214343377636753847172359053882014367264566261940804348⟩⟩, + ⟨⟨-5119030532605816794006298200594499851760641585909164744,-5119030532605816794006298200594499851760641585907475485⟩,⟨10887756711609303501896240942687046407161755116470737676,10887756711609303501896240942687046407161755116472418799⟩⟩, + ⟨⟨-5445384664489978914210135468095048609014342885369760344,-5445384664489978914210135468095048609014342885368472612⟩,⟨-3301813637669580128999180551341589564268233086089509778,-3301813637669580128999180551341589564268233086088222528⟩⟩, + ⟨⟨1621836530266445055670152805085605428038155387289486420,1621836530266445055670152805085605428038155387290235298⟩,⟨-2801877873523284545765494300368081630169807122275730083,-2801877873523284545765494300368081630169807122274981383⟩⟩, + ⟨⟨1532429446182141416040457600714056931303084324128708700,1532429446182141416040457600714056931303084324128877703⟩,⟨528491264561978230945014769118646335593532939183157751,528491264561978230945014769118646335593532939183326411⟩⟩, + ⟨⟨70022122118888838449375664919209209093878028083727435,70022122118888838449375664919209209093878028083847083⟩,⟨846812530526574846898973414362954879840131914661176492,846812530526574846898973414362954879840131914661295761⟩⟩, + ⟨⟨-385817872211542053325694189076699078144302615577341825,-385817872211542053325694189076699078144302615577299821⟩,⟨352046391496614930109559940632390630956809408298585917,352046391496614930109559940632390630956809408298627504⟩⟩, + ⟨⟨-433725390314927991960784680175893815891853523492237848,-433725390314927991960784680175893815891853523492220380⟩,⟨-1,1⟩⟩, + ⟨⟨-385817872211542053325694189076699078144302615577341825,-385817872211542053325694189076699078144302615577299821⟩,⟨-352046391496614930109559940632390630956809408298627504,-352046391496614930109559940632390630956809408298585917⟩⟩, + ⟨⟨70022122118888838449375664919209209093878028083727435,70022122118888838449375664919209209093878028083847083⟩,⟨-846812530526574846898973414362954879840131914661295761,-846812530526574846898973414362954879840131914661176492⟩⟩, + ⟨⟨1532429446182141416040457600714056931303084324128708700,1532429446182141416040457600714056931303084324128877703⟩,⟨-528491264561978230945014769118646335593532939183326411,-528491264561978230945014769118646335593532939183157751⟩⟩, + ⟨⟨1621836530266445055670152805085605428038155387289486420,1621836530266445055670152805085605428038155387290235298⟩,⟨2801877873523284545765494300368081630169807122274981383,2801877873523284545765494300368081630169807122275730083⟩⟩, + ⟨⟨-5445384664489978914210135468095048609014342885369760344,-5445384664489978914210135468095048609014342885368472612⟩,⟨3301813637669580128999180551341589564268233086088222528,3301813637669580128999180551341589564268233086089509778⟩⟩, + ⟨⟨-5119030532605816794006298200594499851760641585909164744,-5119030532605816794006298200594499851760641585907475485⟩,⟨-10887756711609303501896240942687046407161755116472418799,-10887756711609303501896240942687046407161755116470737676⟩⟩, + ⟨⟨21039565760898522316845529090703132217285246542673776408,21039565760898522316845529090703132217285246542681532549⟩,⟨-5214343377636753847172359053882014367264566261940804348,-5214343377636753847172359053882014367264566261933037660⟩⟩, + ⟨⟨-740684452144273666764506707609885539044295805585909875,-740684452144273666764506707609885539044295805569826821⟩,⟨37263119746933669629372331325735151260217064322598148592,37263119746933669629372331325735151260217064322614256845⟩⟩, + ⟨⟨-58037878791516301924252500016036791239028649612311673085,-58037878791516301924252500016036791239028649612296340560⟩,⟨-19992029709828712129442418851857605576265123348477260519,-19992029709828712129442418851857605576265123348462039176⟩⟩, + ⟨⟨61211533800584684604270057611652186068803164207257349671,61211533800584684604270057611652186068803164207298360496⟩,⟨-75605106235584523719815120839219832598265005485589878160,-75605106235584523719815120839219832598265005485548829597⟩⟩, + ⟨⟨73115827200735097298613305650111586605935154023440529776,73115827200735097298613305650111586605935154023492474729⟩,⟨129808956814801133829858087431451602887840701230985162726,129808956814801133829858087431451602887840701231037171191⟩⟩, + ⟨⟨-219973737771945146144950561065504862353743637019577753422,-219973737771945146144950561065504862353743637019539552745⟩,⟨25077537999690281016662653318811967544364370391199725043,25077537999690281016662653318811967544364370391237889171⟩⟩, + ⟨⟨95765232475735616731132267704839031750045545136752292904,95765232475735616731132267704839031750045545136909866814⟩,⟨-305714544585211890533959033072721969169564230840398374510,-305714544585211890533959033072721969169564230840240888537⟩⟩, + ⟨⟨335910461101456080556579772239582892507676362014920495192,335910461101456080556579772239582892507676362015227527733⟩,⟨303559561618594957948454620889120888322665546560583197069,303559561618594957948454620889120888322665546560890089890⟩⟩, + ⟨⟨-578776078891846514494453859856847576368445379978113376900,-578776078891846514494453859856847576368445379977830779699⟩,⟨239989417117253993236917590604656009465237431393349602674,239989417117253993236917590604656009465237431393633226796⟩⟩] +lemma tw1_0_5_3_calc (j : Fin 31) : taylorWaveBox 1 0 5 3 j = tw1_0_5_3 j := by + revert j + decide +kernel +def tw1_0_5_4 : Fin 31 → CI := ![⟨⟨-44105848215281963046868796740914979933077544451854849782,-44105848215281963046868796740914979933077544451741238431⟩,⟨277670338202958114208790699154568075473588145187042019916,277670338202958114208790699154568075473588145187155648337⟩⟩, + ⟨⟨-158799117172295232723087142845866073431395267369264565864,-158799117172295232723087142845866073431395267369153535179⟩,⟨-105008666265700223144073525737160196147193451289121226162,-105008666265700223144073525737160196147193451289010266800⟩⟩, + ⟨⟨105578871414847590781500235969153680669071198347270589987,105578871414847590781500235969153680669071198347326461737⟩,⟨-68228422251001755889768576038077954162803931740067681883,-68228422251001755889768576038077954162803931740011855706⟩⟩, + ⟨⟨14281883824462586631178960208086063732865248800930405692,14281883824462586631178960208086063732865248800945415321⟩,⟨79411433479112693718369312355863940045262112632775039480,79411433479112693718369312355863940045262112632790209625⟩⟩, + ⟨⟨-49192555928118205796832379292210968888476261930949222036,-49192555928118205796832379292210968888476261930927088656⟩,⟨-9801823029503235692590777345963778935365621011369406300,-9801823029503235692590777345963778935365621011347323508⟩⟩, + ⟨⟨15582577088754754570979038031286185685947965920401769297,15582577088754754570979038031286185685947965920417016891⟩,⟨-25723061627719621819193676402600843776080457033435422321,-25723061627719621819193676402600843776080457033420199677⟩⟩, + ⟨⟨11311613593607646699722868199324043056561579609335819135,11311613593607646699722868199324043056561579609340699999⟩,⟨13100720681221981183065697155374981794599834342703253789,13100720681221981183065697155374981794599834342708171141⟩⟩, + ⟨⟨-8593957427535962069523970698660780962733013287307935075,-8593957427535962069523970698660780962733013287303637706⟩,⟨4074549873670091723316046669198772615952293823045115847,4074549873670091723316046669198772615952293823049408527⟩⟩, + ⟨⟨-1141504471163165015380222574282380119872308550986145357,-1141504471163165015380222574282380119872308550984478479⟩,⟨-4830157878320635144335198377297174091389689751710799464,-4830157878320635144335198377297174091389689751709133911⟩⟩, + ⟨⟨2436335651561473407054177525430889792347227833790049310,2436335651561473407054177525430889792347227833790375795⟩,⟨-246723843601253955910764704396131433553984815410579356,-246723843601253955910764704396131433553984815410253584⟩⟩, + ⟨⟨90010021392864241043770512930313473514200593675985357,90010021392864241043770512930313473514200593676304505⟩,⟨1137764210862152163181766311844034380293323162652071009,1137764210862152163181766311844034380293323162652390475⟩⟩, + ⟨⟨-495851618505344603818347938090895038215412921622447260,-495851618505344603818347938090895038215412921622326793⟩,⟨104702715575417191911937261911689000312339025821804180,104702715575417191911937261911689000312339025821924674⟩⟩, + ⟨⟨-114356073169174956387632650965550676168533152941329636,-114356073169174956387632650965550676168533152941301941⟩,⟨-189073172759767768769684031280842199435191488514110598,-189073172759767768769684031280842199435191488514082965⟩⟩, + ⟨⟨41932856534863457226033514715880721923840149328647052,41932856534863457226033514715880721923840149328660834⟩,⟨-92751722763029530714910397624064864080175149816390584,-92751722763029530714910397624064864080175149816376832⟩⟩, + ⟨⟨50643367517749035703196171327394148440337602923941991,50643367517749035703196171327394148440337602923946753⟩,⟨-25643224936401815218878652176095747081693438360513162,-25643224936401815218878652176095747081693438360508496⟩⟩, + ⟨⟨45419616662958114610845320582015104813347204655099881,45419616662958114610845320582015104813347204655101856⟩,⟨-1,1⟩⟩, + ⟨⟨50643367517749035703196171327394148440337602923941991,50643367517749035703196171327394148440337602923946753⟩,⟨25643224936401815218878652176095747081693438360508496,25643224936401815218878652176095747081693438360513162⟩⟩, + ⟨⟨41932856534863457226033514715880721923840149328647052,41932856534863457226033514715880721923840149328660834⟩,⟨92751722763029530714910397624064864080175149816376832,92751722763029530714910397624064864080175149816390584⟩⟩, + ⟨⟨-114356073169174956387632650965550676168533152941329636,-114356073169174956387632650965550676168533152941301941⟩,⟨189073172759767768769684031280842199435191488514082965,189073172759767768769684031280842199435191488514110598⟩⟩, + ⟨⟨-495851618505344603818347938090895038215412921622447260,-495851618505344603818347938090895038215412921622326793⟩,⟨-104702715575417191911937261911689000312339025821924674,-104702715575417191911937261911689000312339025821804180⟩⟩, + ⟨⟨90010021392864241043770512930313473514200593675985357,90010021392864241043770512930313473514200593676304505⟩,⟨-1137764210862152163181766311844034380293323162652390475,-1137764210862152163181766311844034380293323162652071009⟩⟩, + ⟨⟨2436335651561473407054177525430889792347227833790049310,2436335651561473407054177525430889792347227833790375795⟩,⟨246723843601253955910764704396131433553984815410253584,246723843601253955910764704396131433553984815410579356⟩⟩, + ⟨⟨-1141504471163165015380222574282380119872308550986145357,-1141504471163165015380222574282380119872308550984478479⟩,⟨4830157878320635144335198377297174091389689751709133911,4830157878320635144335198377297174091389689751710799464⟩⟩, + ⟨⟨-8593957427535962069523970698660780962733013287307935075,-8593957427535962069523970698660780962733013287303637706⟩,⟨-4074549873670091723316046669198772615952293823049408526,-4074549873670091723316046669198772615952293823045115847⟩⟩, + ⟨⟨11311613593607646699722868199324043056561579609335819135,11311613593607646699722868199324043056561579609340699999⟩,⟨-13100720681221981183065697155374981794599834342708171140,-13100720681221981183065697155374981794599834342703253789⟩⟩, + ⟨⟨15582577088754754570979038031286185685947965920401769297,15582577088754754570979038031286185685947965920417016892⟩,⟨25723061627719621819193676402600843776080457033420199677,25723061627719621819193676402600843776080457033435422322⟩⟩, + ⟨⟨-49192555928118205796832379292210968888476261930949222035,-49192555928118205796832379292210968888476261930927088656⟩,⟨9801823029503235692590777345963778935365621011347323508,9801823029503235692590777345963778935365621011369406300⟩⟩, + ⟨⟨14281883824462586631178960208086063732865248800930405693,14281883824462586631178960208086063732865248800945415322⟩,⟨-79411433479112693718369312355863940045262112632790209625,-79411433479112693718369312355863940045262112632775039480⟩⟩, + ⟨⟨105578871414847590781500235969153680669071198347270589987,105578871414847590781500235969153680669071198347326461737⟩,⟨68228422251001755889768576038077954162803931740011855706,68228422251001755889768576038077954162803931740067681884⟩⟩, + ⟨⟨-158799117172295232723087142845866073431395267369264565862,-158799117172295232723087142845866073431395267369153535181⟩,⟨105008666265700223144073525737160196147193451289010266801,105008666265700223144073525737160196147193451289121226159⟩⟩, + ⟨⟨-44105848215281963046868796740914979933077544451854849780,-44105848215281963046868796740914979933077544451741238429⟩,⟨-277670338202958114208790699154568075473588145187155648337,-277670338202958114208790699154568075473588145187042019917⟩⟩] +lemma tw1_0_5_4_calc (j : Fin 31) : taylorWaveBox 1 0 5 4 j = tw1_0_5_4 j := by + revert j + decide +kernel +def tw1_0_5_5 : Fin 31 → CI := ![⟨⟨107807395323123909106586941647162472052275403279717477812,107807395323123909106586941647162472052275403279759557636⟩,⟨-8428082616058721060073975705236104336644605088301242058,-8428082616058721060073975705236104336644605088259378406⟩⟩, + ⟨⟨-22401163963429423920322332968945692784418133220775770432,-22401163963429423920322332968945692784418133220731085338⟩,⟨64856904721295991902458692699434823461494822236794137260,64856904721295991902458692699434823461494822236838895734⟩⟩, + ⟨⟨-31591791555137105578414357146181733093281957770054405302,-31591791555137105578414357146181733093281957770031633758⟩,⟨-28097382636113140787912159612091444899544948541830973831,-28097382636113140787912159612091444899544948541808158877⟩⟩, + ⟨⟨22477906441743678606043378663240083474546263804582362773,22477906441743678606043378663240083474546263804587975165⟩,⟨-11401083248672291482499748111975418353836059242170658528,-11401083248672291482499748111975418353836059242165123175⟩⟩, + ⟨⟨1727206451589456326259712186763693638348853979662623380,1727206451589456326259712186763693638348853979669796399⟩,⟨14371656367162553100444413148654027615307782013598988864,14371656367162553100444413148654027615307782013606177542⟩⟩, + ⟨⟨-7812290550131091752846329495175439475497510806939687782,-7812290550131091752846329495175439475497510806935386555⟩,⟨-1576350189566288432536733017530734867292758885365593743,-1576350189566288432536733017530734867292758885361286015⟩⟩, + ⟨⟨1924466784463511291683106626896897984738695825938486432,1924466784463511291683106626896897984738695825939678932⟩,⟨-3714238093247697349965666136433447394828092644101805231,-3714238093247697349965666136433447394828092644100618410⟩⟩, + ⟨⟨1584126795786150324448260693920735964168646127284207081,1584126795786150324448260693920735964168646127285049122⟩,⟨1348473291568075250299418858594707897600388439739002433,1348473291568075250299418858594707897600388439739844534⟩⟩, + ⟨⟨-740560381945641462955714638239580920974443306287562589,-740560381945641462955714638239580920974443306287232410⟩,⟨632784071800652378297331909255100908918462627136665537,632784071800652378297331909255100908918462627136995553⟩⟩, + ⟨⟨-255594777395132991458267121503520022192691951284144595,-255594777395132991458267121503520022192691951284069497⟩,⟨-342329080757645009564415763703442564293905346970497983,-342329080757645009564415763703442564293905346970422425⟩⟩, + ⟨⟨133761659307646123879941053176255417686555315161361027,133761659307646123879941053176255417686555315161411812⟩,⟨-113346699846740829794038371077698326730114392399588976,-113346699846740829794038371077698326730114392399538206⟩⟩, + ⟨⟨54949863613743863924863704588791176254181568157495671,54949863613743863924863704588791176254181568157514390⟩,⟨40054725336845407503815418391020063870604150643811154,40054725336845407503815418391020063870604150643829876⟩⟩, + ⟨⟨-3878063126166951092187415598008285005461044673997746,-3878063126166951092187415598008285005461044673994311⟩,⟨25524982571458504525167138937395097147789902073517634,25524982571458504525167138937395097147789902073521071⟩⟩, + ⟨⟨-8389092827004158669160453078641169889022780611860155,-8389092827004158669160453078641169889022780611858336⟩,⟨6234328277432914284922874060117038951016889904212530,6234328277432914284922874060117038951016889904214352⟩⟩, + ⟨⟨-5185107618436988379840899775401059816972254182313863,-5185107618436988379840899775401059816972254182313309⟩,⟨1039025477155345990956748356487445614918314414260702,1039025477155345990956748356487445614918314414261246⟩⟩, + ⟨⟨-4076855258206107797415471984422941015632601796037967,-4076855258206107797415471984422941015632601796037775⟩,⟨-1,1⟩⟩, + ⟨⟨-5185107618436988379840899775401059816972254182313863,-5185107618436988379840899775401059816972254182313309⟩,⟨-1039025477155345990956748356487445614918314414261246,-1039025477155345990956748356487445614918314414260702⟩⟩, + ⟨⟨-8389092827004158669160453078641169889022780611860155,-8389092827004158669160453078641169889022780611858336⟩,⟨-6234328277432914284922874060117038951016889904214352,-6234328277432914284922874060117038951016889904212530⟩⟩, + ⟨⟨-3878063126166951092187415598008285005461044673997746,-3878063126166951092187415598008285005461044673994311⟩,⟨-25524982571458504525167138937395097147789902073521071,-25524982571458504525167138937395097147789902073517634⟩⟩, + ⟨⟨54949863613743863924863704588791176254181568157495671,54949863613743863924863704588791176254181568157514390⟩,⟨-40054725336845407503815418391020063870604150643829876,-40054725336845407503815418391020063870604150643811154⟩⟩, + ⟨⟨133761659307646123879941053176255417686555315161361027,133761659307646123879941053176255417686555315161411812⟩,⟨113346699846740829794038371077698326730114392399538206,113346699846740829794038371077698326730114392399588976⟩⟩, + ⟨⟨-255594777395132991458267121503520022192691951284144595,-255594777395132991458267121503520022192691951284069497⟩,⟨342329080757645009564415763703442564293905346970422425,342329080757645009564415763703442564293905346970497983⟩⟩, + ⟨⟨-740560381945641462955714638239580920974443306287562589,-740560381945641462955714638239580920974443306287232410⟩,⟨-632784071800652378297331909255100908918462627136995553,-632784071800652378297331909255100908918462627136665537⟩⟩, + ⟨⟨1584126795786150324448260693920735964168646127284207081,1584126795786150324448260693920735964168646127285049122⟩,⟨-1348473291568075250299418858594707897600388439739844534,-1348473291568075250299418858594707897600388439739002433⟩⟩, + ⟨⟨1924466784463511291683106626896897984738695825938486432,1924466784463511291683106626896897984738695825939678932⟩,⟨3714238093247697349965666136433447394828092644100618410,3714238093247697349965666136433447394828092644101805231⟩⟩, + ⟨⟨-7812290550131091752846329495175439475497510806939687782,-7812290550131091752846329495175439475497510806935386555⟩,⟨1576350189566288432536733017530734867292758885361286015,1576350189566288432536733017530734867292758885365593743⟩⟩, + ⟨⟨1727206451589456326259712186763693638348853979662623380,1727206451589456326259712186763693638348853979669796399⟩,⟨-14371656367162553100444413148654027615307782013606177542,-14371656367162553100444413148654027615307782013598988865⟩⟩, + ⟨⟨22477906441743678606043378663240083474546263804582362773,22477906441743678606043378663240083474546263804587975165⟩,⟨11401083248672291482499748111975418353836059242165123175,11401083248672291482499748111975418353836059242170658528⟩⟩, + ⟨⟨-31591791555137105578414357146181733093281957770054405302,-31591791555137105578414357146181733093281957770031633758⟩,⟨28097382636113140787912159612091444899544948541808158877,28097382636113140787912159612091444899544948541830973831⟩⟩, + ⟨⟨-22401163963429423920322332968945692784418133220775770431,-22401163963429423920322332968945692784418133220731085339⟩,⟨-64856904721295991902458692699434823461494822236838895733,-64856904721295991902458692699434823461494822236794137261⟩⟩, + ⟨⟨107807395323123909106586941647162472052275403279717477812,107807395323123909106586941647162472052275403279759557636⟩,⟨8428082616058721060073975705236104336644605088259378407,8428082616058721060073975705236104336644605088301242059⟩⟩] +lemma tw1_0_5_5_calc (j : Fin 31) : taylorWaveBox 1 0 5 5 j = tw1_0_5_5 j := by + revert j + decide +kernel +def tw1_0_5_6 : Fin 31 → CI := ![⟨⟨-11225256615250451420962353931941886855846070974586229401,-11225256615250451420962353931941886855846070974569628606⟩,⟨-34617947559006958844413170156669792671939779517022467304,-34617947559006958844413170156669792671939779517005734070⟩⟩, + ⟨⟨21568797579164488635277935762562295861673421032190546927,21568797579164488635277935762562295861673421032206740118⟩,⟨1748196795041639735716517153192616717184312586100191928,1748196795041639735716517153192616717184312586116354349⟩⟩, + ⟨⟨-5487653864049974466101904457444059289448258703080950116,-5487653864049974466101904457444059289448258703073460770⟩,⟨11166700934532197688907365099231145126028005634317291762,11166700934532197688907365099231145126028005634324765494⟩⟩, + ⟨⟨-4750207258386059489411246298642831910730229391612865277,-4750207258386059489411246298642831910730229391611207113⟩,⟨-4989263161030189419240148610393516540837635105442133992,-4989263161030189419240148610393516540837635105440455248⟩⟩, + ⟨⟨3313295457879004112743260243925406852589054114434235056,3313295457879004112743260243925406852589054114436105135⟩,⟨-1543247043901327154779062408225525286224257418621713074,-1543247043901327154779062408225525286224257418619845869⟩⟩, + ⟨⟨269669602845413826789055127705608603643076934102445229,269669602845413826789055127705608603643076934103408121⟩,⟨1828183657153491726775339396998159942123590894745326580,1828183657153491726775339396998159942123590894746288566⟩⟩, + ⟨⟨-880436212018098941520016523770249825957484700473918504,-880436212018098941520016523770249825957484700473692916⟩,⟨-86152591823500509422105012305811901670435868571125679,-86152591823500509422105012305811901670435868570900092⟩⟩, + ⟨⟨110935960530771314674890665934573130879316412502779954,110935960530771314674890665934573130879316412502956158⟩,⟨-382391128214169394991674100671384190170572236216789595,-382391128214169394991674100671384190170572236216613196⟩⟩, + ⟨⟨154799924573605855356698768587482601582735098175671356,154799924573605855356698768587482601582735098175741843⟩,⟨63396903747370231015112112153271419388307800176041818,63396903747370231015112112153271419388307800176112386⟩⟩, + ⟨⟨-24736405010086816647472663292204744845258705796922838,-24736405010086816647472663292204744845258705796910248⟩,⟨60343741253811963462125932612190494701271908329981809,60343741253811963462125932612190494701271908329994361⟩⟩, + ⟨⟨-22869823084043169003249467036225498919850891750952947,-22869823084043169003249467036225498919850891750945374⟩,⟨-5688904560379189278332412173015621376534738973887767,-5688904560379189278332412173015621376534738973880199⟩⟩, + ⟨⟨-820318005567734474630149345986994372447089802980614,-820318005567734474630149345986994372447089802978080⟩,⟨-7941170989403062513018020155504353142107625362776697,-7941170989403062513018020155504353142107625362774164⟩⟩, + ⟨⟨1975188568381037930385009054679610970412737273712395,1975188568381037930385009054679610970412737273712868⟩,⟨-1750908805168297831646157829435108666630506553796330,-1750908805168297831646157829435108666630506553795857⟩⟩, + ⟨⟨930901697618454514795954095554166527856366619299400,930901697618454514795954095554166527856366619299600⟩,⟨-123599770194604748422481424473236763001249357065809,-123599770194604748422481424473236763001249357065609⟩⟩, + ⟨⟨429905419539435178692185559867375633147888775592912,429905419539435178692185559867375633147888775592966⟩,⟨31516629866862494655861722777458576312710927534037,31516629866862494655861722777458576312710927534091⟩⟩, + ⟨⟨320195463223230697039182391845061655453420185165180,320195463223230697039182391845061655453420185165197⟩,⟨-1,1⟩⟩, + ⟨⟨429905419539435178692185559867375633147888775592912,429905419539435178692185559867375633147888775592966⟩,⟨-31516629866862494655861722777458576312710927534091,-31516629866862494655861722777458576312710927534037⟩⟩, + ⟨⟨930901697618454514795954095554166527856366619299400,930901697618454514795954095554166527856366619299600⟩,⟨123599770194604748422481424473236763001249357065609,123599770194604748422481424473236763001249357065809⟩⟩, + ⟨⟨1975188568381037930385009054679610970412737273712395,1975188568381037930385009054679610970412737273712868⟩,⟨1750908805168297831646157829435108666630506553795857,1750908805168297831646157829435108666630506553796330⟩⟩, + ⟨⟨-820318005567734474630149345986994372447089802980614,-820318005567734474630149345986994372447089802978080⟩,⟨7941170989403062513018020155504353142107625362774164,7941170989403062513018020155504353142107625362776697⟩⟩, + ⟨⟨-22869823084043169003249467036225498919850891750952947,-22869823084043169003249467036225498919850891750945374⟩,⟨5688904560379189278332412173015621376534738973880199,5688904560379189278332412173015621376534738973887767⟩⟩, + ⟨⟨-24736405010086816647472663292204744845258705796922838,-24736405010086816647472663292204744845258705796910248⟩,⟨-60343741253811963462125932612190494701271908329994361,-60343741253811963462125932612190494701271908329981809⟩⟩, + ⟨⟨154799924573605855356698768587482601582735098175671356,154799924573605855356698768587482601582735098175741843⟩,⟨-63396903747370231015112112153271419388307800176112386,-63396903747370231015112112153271419388307800176041818⟩⟩, + ⟨⟨110935960530771314674890665934573130879316412502779954,110935960530771314674890665934573130879316412502956158⟩,⟨382391128214169394991674100671384190170572236216613196,382391128214169394991674100671384190170572236216789595⟩⟩, + ⟨⟨-880436212018098941520016523770249825957484700473918504,-880436212018098941520016523770249825957484700473692916⟩,⟨86152591823500509422105012305811901670435868570900092,86152591823500509422105012305811901670435868571125679⟩⟩, + ⟨⟨269669602845413826789055127705608603643076934102445229,269669602845413826789055127705608603643076934103408121⟩,⟨-1828183657153491726775339396998159942123590894746288566,-1828183657153491726775339396998159942123590894745326580⟩⟩, + ⟨⟨3313295457879004112743260243925406852589054114434235056,3313295457879004112743260243925406852589054114436105135⟩,⟨1543247043901327154779062408225525286224257418619845869,1543247043901327154779062408225525286224257418621713074⟩⟩, + ⟨⟨-4750207258386059489411246298642831910730229391612865277,-4750207258386059489411246298642831910730229391611207113⟩,⟨4989263161030189419240148610393516540837635105440455248,4989263161030189419240148610393516540837635105442133992⟩⟩, + ⟨⟨-5487653864049974466101904457444059289448258703080950116,-5487653864049974466101904457444059289448258703073460770⟩,⟨-11166700934532197688907365099231145126028005634324765494,-11166700934532197688907365099231145126028005634317291762⟩⟩, + ⟨⟨21568797579164488635277935762562295861673421032190546927,21568797579164488635277935762562295861673421032206740117⟩,⟨-1748196795041639735716517153192616717184312586116354348,-1748196795041639735716517153192616717184312586100191928⟩⟩, + ⟨⟨-11225256615250451420962353931941886855846070974586229401,-11225256615250451420962353931941886855846070974569628606⟩,⟨34617947559006958844413170156669792671939779517005734070,34617947559006958844413170156669792671939779517022467304⟩⟩] +lemma tw1_0_5_6_calc (j : Fin 31) : taylorWaveBox 1 0 5 6 j = tw1_0_5_6 j := by + revert j + decide +kernel +def tw1_0_5_7 : Fin 31 → CI := ![⟨⟨-9286282003853845013654416327853290375165019728753155835,-9286282003853845013654416327853290375165019728747615425⟩,⟨5682083449372866753537846885598356593883656673561849532,5682083449372866753537846885598356593883656673567344202⟩⟩, + ⟨⟨-1031158288645913527458898619660486725667569283377238949,-1031158288645913527458898619660486725667569283372371390⟩,⟨-5977882125003419590283878193877574408292505603743697487,-5977882125003419590283878193877574408292505603738821460⟩⟩, + ⟨⟨3198270593228167609670834355977217542634179536941101950,3198270593228167609670834355977217542634179536943143492⟩,⟨603871837079760934073165877517237926968373531143848782,603871837079760934073165877517237926968373531145894036⟩⟩, + ⟨⟨-829427231535278925364094573907819497718550288883367542,-829427231535278925364094573907819497718550288882947809⟩,⟨1453739701780010892758402647910095712556935363103792438,1453739701780010892758402647910095712556935363104208695⟩⟩, + ⟨⟨-560514062620140210183979620545475454650228007151917925,-560514062620140210183979620545475454650228007151518411⟩,⟨-599046657365652695633221244207762107000704992316573139,-599046657365652695633221244207762107000704992316173424⟩⟩, + ⟨⟨335704889578759525956809842832631454636166549402537524,335704889578759525956809842832631454636166549402710473⟩,⟨-179927101729451135284376739787652889131365180275646047,-179927101729451135284376739787652889131365180275473107⟩⟩, + ⟨⟨46429579149542489761396892073931153840957228426471981,46429579149542489761396892073931153840957228426521991⟩,⟨159679693080814276564589313350710126171901064445475215,159679693080814276564589313350710126171901064445525490⟩⟩, + ⟨⟨-67069095238302546843716298327539979853500989782610611,-67069095238302546843716298327539979853500989782574555⟩,⟨9485290025461622499913952611512116219924436330976008,9485290025461622499913952611512116219924436331012021⟩⟩, + ⟨⟨-2201081305114546205310785403630554737384427836710776,-2201081305114546205310785403630554737384427836699435⟩,⟨-25439692778888512442793432345864992424814813558866842,-25439692778888512442793432345864992424814813558855510⟩⟩, + ⟨⟨8748239969135011197243161713547422226464723622604681,8748239969135011197243161713547422226464723622606560⟩,⟨-1334576454516626053630119853794973019154534500802197,-1334576454516626053630119853794973019154534500800321⟩⟩, + ⟨⟨1045003096380976364126684743458792485096604086754619,1045003096380976364126684743458792485096604086755748⟩,⟨2614681084781111614974148791154786788663227316464510,2614681084781111614974148791154786788663227316465640⟩⟩, + ⟨⟨-558729133908640193640480061487547309431975283086619,-558729133908640193640480061487547309431975283086312⟩,⟨618030543629312879849046482099119823694199320854160,618030543629312879849046482099119823694199320854467⟩⟩, + ⟨⟨-239757920638498124918267143499104933891314957404802,-239757920638498124918267143499104933891314957404754⟩,⟨7324681322712569557598652866649288892547679097531,7324681322712569557598652866649288892547679097580⟩⟩, + ⟨⟨-69783027309173874774158434406270203411445600342606,-69783027309173874774158434406270203411445600342587⟩,⟨-27476218523464707258168865503223563599663153885095,-27476218523464707258168865503223563599663153885077⟩⟩, + ⟨⟨-29401872438846019519828330040241667608270464287119,-29401872438846019519828330040241667608270464287114⟩,⟨-10537237000270651027235069441442488873556264002118,-10537237000270651027235069441442488873556264002112⟩⟩, + ⟨⟨-22353860332775163909729771497588717693528067413773,-22353860332775163909729771497588717693528067413771⟩,⟨-1,1⟩⟩, + ⟨⟨-29401872438846019519828330040241667608270464287119,-29401872438846019519828330040241667608270464287114⟩,⟨10537237000270651027235069441442488873556264002112,10537237000270651027235069441442488873556264002118⟩⟩, + ⟨⟨-69783027309173874774158434406270203411445600342606,-69783027309173874774158434406270203411445600342587⟩,⟨27476218523464707258168865503223563599663153885077,27476218523464707258168865503223563599663153885095⟩⟩, + ⟨⟨-239757920638498124918267143499104933891314957404802,-239757920638498124918267143499104933891314957404754⟩,⟨-7324681322712569557598652866649288892547679097580,-7324681322712569557598652866649288892547679097531⟩⟩, + ⟨⟨-558729133908640193640480061487547309431975283086619,-558729133908640193640480061487547309431975283086312⟩,⟨-618030543629312879849046482099119823694199320854467,-618030543629312879849046482099119823694199320854160⟩⟩, + ⟨⟨1045003096380976364126684743458792485096604086754619,1045003096380976364126684743458792485096604086755748⟩,⟨-2614681084781111614974148791154786788663227316465640,-2614681084781111614974148791154786788663227316464510⟩⟩, + ⟨⟨8748239969135011197243161713547422226464723622604681,8748239969135011197243161713547422226464723622606560⟩,⟨1334576454516626053630119853794973019154534500800321,1334576454516626053630119853794973019154534500802197⟩⟩, + ⟨⟨-2201081305114546205310785403630554737384427836710776,-2201081305114546205310785403630554737384427836699435⟩,⟨25439692778888512442793432345864992424814813558855510,25439692778888512442793432345864992424814813558866842⟩⟩, + ⟨⟨-67069095238302546843716298327539979853500989782610611,-67069095238302546843716298327539979853500989782574555⟩,⟨-9485290025461622499913952611512116219924436331012021,-9485290025461622499913952611512116219924436330976008⟩⟩, + ⟨⟨46429579149542489761396892073931153840957228426471981,46429579149542489761396892073931153840957228426521991⟩,⟨-159679693080814276564589313350710126171901064445525490,-159679693080814276564589313350710126171901064445475215⟩⟩, + ⟨⟨335704889578759525956809842832631454636166549402537524,335704889578759525956809842832631454636166549402710473⟩,⟨179927101729451135284376739787652889131365180275473107,179927101729451135284376739787652889131365180275646047⟩⟩, + ⟨⟨-560514062620140210183979620545475454650228007151917925,-560514062620140210183979620545475454650228007151518411⟩,⟨599046657365652695633221244207762107000704992316173424,599046657365652695633221244207762107000704992316573139⟩⟩, + ⟨⟨-829427231535278925364094573907819497718550288883367542,-829427231535278925364094573907819497718550288882947809⟩,⟨-1453739701780010892758402647910095712556935363104208695,-1453739701780010892758402647910095712556935363103792438⟩⟩, + ⟨⟨3198270593228167609670834355977217542634179536941101950,3198270593228167609670834355977217542634179536943143492⟩,⟨-603871837079760934073165877517237926968373531145894036,-603871837079760934073165877517237926968373531143848782⟩⟩, + ⟨⟨-1031158288645913527458898619660486725667569283377238949,-1031158288645913527458898619660486725667569283372371390⟩,⟨5977882125003419590283878193877574408292505603738821460,5977882125003419590283878193877574408292505603743697487⟩⟩, + ⟨⟨-9286282003853845013654416327853290375165019728753155835,-9286282003853845013654416327853290375165019728747615425⟩,⟨-5682083449372866753537846885598356593883656673567344202,-5682083449372866753537846885598356593883656673561849532⟩⟩] +lemma tw1_0_5_7_calc (j : Fin 31) : taylorWaveBox 1 0 5 7 j = tw1_0_5_7 j := by + revert j + decide +kernel +def tw1_0_5_8 : Fin 31 → CI := ![⟨⟨2071040274918902707780810473092545186937541354725448073,2071040274918902707780810473092545186937541354727004116⟩,⟨2074127111106516292099982199266105549742480801584912287,2074127111106516292099982199266105549742480801586479713⟩⟩, + ⟨⟨-1395882569197984327773127239548773669827258779005771545,-1395882569197984327773127239548773669827258779004521475⟩,⟨627560912804147235284692135726412538884138165587992469,627560912804147235284692135726412538884138165589240896⟩⟩, + ⟨⟨-63939094375145720858485064127276860451193942105490970,-63939094375145720858485064127276860451193942105016682⟩,⟨-763606965421660193016136065057936072259179564221515916,-763606965421660193016136065057936072259179564221042216⟩⟩, + ⟨⟨356584981101830994406672015374797834954910137676149662,356584981101830994406672015374797834954910137676239165⟩,⟨82373673805025535221505076075858435114665991511623253,82373673805025535221505076075858435114665991511712974⟩⟩, + ⟨⟨-79790564757842750428067144636537639948350493063905689,-79790564757842750428067144636537639948350493063832386⟩,⟨145250186419711463566805251194655230905798827031206706,145250186419711463566805251194655230905798827031280079⟩⟩, + ⟨⟨-52496163684993132664514740024318076566112803352334596,-52496163684993132664514740024318076566112803352294806⟩,⟨-47286403162434595610375276692530530592298962004484035,-47286403162434595610375276692530530592298962004444197⟩⟩, + ⟨⟨22165171040198582970727943644356347446924292699278200,22165171040198582970727943644356347446924292699288290⟩,⟨-17326112252476607695873489761362057109069986944111113,-17326112252476607695873489761362057109069986944101082⟩⟩, + ⟨⟨5538471869278366000338133567143424236875040964370284,5538471869278366000338133567143424236875040964376095⟩,⟨8768633956713067332946078318061900091909933859359071,8768633956713067332946078318061900091909933859364885⟩⟩, + ⟨⟨-2969746780649978598391071255285934397675926612113201,-2969746780649978598391071255285934397675926612111693⟩,⟨1867335850023148414561327184408386600859387992809647,1867335850023148414561327184408386600859387992811155⟩⟩, + ⟨⟨-689424647882947856008797222992431605211422616247208,-689424647882947856008797222992431605211422616246905⟩,⟨-832259635592571452575515036466843085567496063197288,-832259635592571452575515036466843085567496063196983⟩⟩, + ⟨⟨162514488083855748638049122960551668270060427424631,162514488083855748638049122960551668270060427424758⟩,⟨-255478981375489020494235048831880193461386855739504,-255478981375489020494235048831880193461386855739376⟩⟩, + ⟨⟨78252658305567338185634389325986172539801284001285,78252658305567338185634389325986172539801284001322⟩,⟨174647742889153105814163261823594316073391967719,174647742889153105814163261823594316073391967757⟩⟩, + ⟨⟨15447953859579410541007951926986611503016051982096,15447953859579410541007951926986611503016051982102⟩,⟨12093472067964769416213901470017061469752526705680,12093472067964769416213901470017061469752526705686⟩⟩, + ⟨⟨3425495960331303239454184937284803872281837343344,3425495960331303239454184937284803872281837343347⟩,⟨4162268902343296652797111077659587831069497278945,4162268902343296652797111077659587831069497278947⟩⟩, + ⟨⟨1663464649395563960056492628902594686973395562379,1663464649395563960056492628902594686973395562380⟩,⟨1175233607292934727628086739504456752643322874344,1175233607292934727628086739504456752643322874345⟩⟩, + ⟨⟨1404534468016374914349737847484127208075401691809,1404534468016374914349737847484127208075401691810⟩,⟨-1,1⟩⟩, + ⟨⟨1663464649395563960056492628902594686973395562379,1663464649395563960056492628902594686973395562380⟩,⟨-1175233607292934727628086739504456752643322874345,-1175233607292934727628086739504456752643322874344⟩⟩, + ⟨⟨3425495960331303239454184937284803872281837343344,3425495960331303239454184937284803872281837343347⟩,⟨-4162268902343296652797111077659587831069497278947,-4162268902343296652797111077659587831069497278945⟩⟩, + ⟨⟨15447953859579410541007951926986611503016051982096,15447953859579410541007951926986611503016051982102⟩,⟨-12093472067964769416213901470017061469752526705686,-12093472067964769416213901470017061469752526705680⟩⟩, + ⟨⟨78252658305567338185634389325986172539801284001285,78252658305567338185634389325986172539801284001322⟩,⟨-174647742889153105814163261823594316073391967757,-174647742889153105814163261823594316073391967719⟩⟩, + ⟨⟨162514488083855748638049122960551668270060427424631,162514488083855748638049122960551668270060427424758⟩,⟨255478981375489020494235048831880193461386855739376,255478981375489020494235048831880193461386855739504⟩⟩, + ⟨⟨-689424647882947856008797222992431605211422616247208,-689424647882947856008797222992431605211422616246905⟩,⟨832259635592571452575515036466843085567496063196983,832259635592571452575515036466843085567496063197288⟩⟩, + ⟨⟨-2969746780649978598391071255285934397675926612113201,-2969746780649978598391071255285934397675926612111693⟩,⟨-1867335850023148414561327184408386600859387992811155,-1867335850023148414561327184408386600859387992809647⟩⟩, + ⟨⟨5538471869278366000338133567143424236875040964370284,5538471869278366000338133567143424236875040964376095⟩,⟨-8768633956713067332946078318061900091909933859364885,-8768633956713067332946078318061900091909933859359071⟩⟩, + ⟨⟨22165171040198582970727943644356347446924292699278200,22165171040198582970727943644356347446924292699288290⟩,⟨17326112252476607695873489761362057109069986944101082,17326112252476607695873489761362057109069986944111113⟩⟩, + ⟨⟨-52496163684993132664514740024318076566112803352334596,-52496163684993132664514740024318076566112803352294806⟩,⟨47286403162434595610375276692530530592298962004444197,47286403162434595610375276692530530592298962004484035⟩⟩, + ⟨⟨-79790564757842750428067144636537639948350493063905689,-79790564757842750428067144636537639948350493063832386⟩,⟨-145250186419711463566805251194655230905798827031280079,-145250186419711463566805251194655230905798827031206706⟩⟩, + ⟨⟨356584981101830994406672015374797834954910137676149662,356584981101830994406672015374797834954910137676239165⟩,⟨-82373673805025535221505076075858435114665991511712974,-82373673805025535221505076075858435114665991511623253⟩⟩, + ⟨⟨-63939094375145720858485064127276860451193942105490970,-63939094375145720858485064127276860451193942105016682⟩,⟨763606965421660193016136065057936072259179564221042216,763606965421660193016136065057936072259179564221515916⟩⟩, + ⟨⟨-1395882569197984327773127239548773669827258779005771545,-1395882569197984327773127239548773669827258779004521475⟩,⟨-627560912804147235284692135726412538884138165589240896,-627560912804147235284692135726412538884138165587992469⟩⟩, + ⟨⟨2071040274918902707780810473092545186937541354725448073,2071040274918902707780810473092545186937541354727004116⟩,⟨-2074127111106516292099982199266105549742480801586479713,-2074127111106516292099982199266105549742480801584912287⟩⟩] +lemma tw1_0_5_8_calc (j : Fin 31) : taylorWaveBox 1 0 5 8 j = tw1_0_5_8 j := by + revert j + decide +kernel +def tw1_0_5_9 : Fin 31 → CI := ![⟨⟨375343554223480145237326461111346803716463371845427565,375343554223480145237326461111346803716463371845812856⟩,⟨-611380296344021746318476625913469171385532052169204283,-611380296344021746318476625913469171385532052168821052⟩⟩, + ⟨⟨219134497351705829690379133330588030968637132354857272,219134497351705829690379133330588030968637132355133790⟩,⟨274225127440837692879610849457473666610600451681020542,274225127440837692879610849457473666610600451681297247⟩⟩, + ⟨⟨-153854102552448313048575813943815960006395141696670857,-153854102552448313048575813943815960006395141696576328⟩,⟨56805600895126808323370740888081014841185011742057074,56805600895126808323370740888081014841185011742151639⟩⟩, + ⟨⟨-4684175674419396395955017337592584475546821030272232,-4684175674419396395955017337592584475546821030254246⟩,⟨-72598794881969004314964584238561974266873678634460776,-72598794881969004314964584238561974266873678634442703⟩⟩, + ⟨⟨29908566322850092665604121783719860431875838610286699,29908566322850092665604121783719860431875838610303661⟩,⟨5629409423433562317726888432697250637865486229765674,5629409423433562317726888432697250637865486229782606⟩⟩, + ⟨⟨-4504184566009993679973149731096501036287941209028406,-4504184566009993679973149731096501036287941209020622⟩,⟨11030364859532626436756171520302384740540594479216439,11030364859532626436756171520302384740540594479224212⟩⟩, + ⟨⟨-3740234653174193509971166081601343674202223765230824,-3740234653174193509971166081601343674202223765229155⟩,⟨-2175513805381275348722590506500763483626304702697402,-2175513805381275348722590506500763483626304702695727⟩⟩, + ⟨⟨796672560765268018028709523778880331499704510308038,796672560765268018028709523778880331499704510308810⟩,⟨-1203878252356813831096915820434405506703546212107440,-1203878252356813831096915820434405506703546212106668⟩⟩, + ⟨⟨377029822860231857694592626805692025857544638689418,377029822860231857694592626805692025857544638689670⟩,⟨223177130132323804609970091421542540308825059737903,223177130132323804609970091421542540308825059738155⟩⟩, + ⟨⟨-39851088232159439151652840683808963059130236547478,-39851088232159439151652840683808963059130236547437⟩,⟨113171632218998894353763198759680295757251041859176,113171632218998894353763198759680295757251041859217⟩⟩, + ⟨⟨-29550757645946108862944850509066394279478437449106,-29550757645946108862944850509066394279478437449088⟩,⟨1700139385849937527167995248340088179809920588896,1700139385849937527167995248340088179809920588914⟩⟩, + ⟨⟨-4458697105958622186111297512223879805408344877129,-4458697105958622186111297512223879805408344877124⟩,⟨-4976399622546800194035244413950199959137744880297,-4976399622546800194035244413950199959137744880293⟩⟩, + ⟨⟨-306737136739197544790270424147266746465532332951,-306737136739197544790270424147266746465532332949⟩,⟨-1426098393399735602112290204816604252834706548546,-1426098393399735602112290204816604252834706548544⟩⟩, + ⟨⟨-63581514071859107093855185445774663843030194784,-63581514071859107093855185445774663843030194783⟩,⟨-346450394691301535404596068360380796626024873246,-346450394691301535404596068360380796626024873244⟩⟩, + ⟨⟨-76369882285087947449011742720033239631184021464,-76369882285087947449011742720033239631184021463⟩,⟨-93522764055410917625725223825268290860817992628,-93522764055410917625725223825268290860817992627⟩⟩, + ⟨⟨-80226821207888942673425899456440828092034718052,-80226821207888942673425899456440828092034718051⟩,⟨-1,1⟩⟩, + ⟨⟨-76369882285087947449011742720033239631184021464,-76369882285087947449011742720033239631184021463⟩,⟨93522764055410917625725223825268290860817992627,93522764055410917625725223825268290860817992628⟩⟩, + ⟨⟨-63581514071859107093855185445774663843030194784,-63581514071859107093855185445774663843030194783⟩,⟨346450394691301535404596068360380796626024873244,346450394691301535404596068360380796626024873246⟩⟩, + ⟨⟨-306737136739197544790270424147266746465532332951,-306737136739197544790270424147266746465532332949⟩,⟨1426098393399735602112290204816604252834706548544,1426098393399735602112290204816604252834706548546⟩⟩, + ⟨⟨-4458697105958622186111297512223879805408344877129,-4458697105958622186111297512223879805408344877124⟩,⟨4976399622546800194035244413950199959137744880293,4976399622546800194035244413950199959137744880297⟩⟩, + ⟨⟨-29550757645946108862944850509066394279478437449106,-29550757645946108862944850509066394279478437449088⟩,⟨-1700139385849937527167995248340088179809920588914,-1700139385849937527167995248340088179809920588896⟩⟩, + ⟨⟨-39851088232159439151652840683808963059130236547478,-39851088232159439151652840683808963059130236547437⟩,⟨-113171632218998894353763198759680295757251041859217,-113171632218998894353763198759680295757251041859176⟩⟩, + ⟨⟨377029822860231857694592626805692025857544638689418,377029822860231857694592626805692025857544638689670⟩,⟨-223177130132323804609970091421542540308825059738155,-223177130132323804609970091421542540308825059737903⟩⟩, + ⟨⟨796672560765268018028709523778880331499704510308038,796672560765268018028709523778880331499704510308810⟩,⟨1203878252356813831096915820434405506703546212106668,1203878252356813831096915820434405506703546212107440⟩⟩, + ⟨⟨-3740234653174193509971166081601343674202223765230824,-3740234653174193509971166081601343674202223765229155⟩,⟨2175513805381275348722590506500763483626304702695727,2175513805381275348722590506500763483626304702697402⟩⟩, + ⟨⟨-4504184566009993679973149731096501036287941209028406,-4504184566009993679973149731096501036287941209020622⟩,⟨-11030364859532626436756171520302384740540594479224212,-11030364859532626436756171520302384740540594479216439⟩⟩, + ⟨⟨29908566322850092665604121783719860431875838610286699,29908566322850092665604121783719860431875838610303661⟩,⟨-5629409423433562317726888432697250637865486229782606,-5629409423433562317726888432697250637865486229765674⟩⟩, + ⟨⟨-4684175674419396395955017337592584475546821030272232,-4684175674419396395955017337592584475546821030254246⟩,⟨72598794881969004314964584238561974266873678634442703,72598794881969004314964584238561974266873678634460776⟩⟩, + ⟨⟨-153854102552448313048575813943815960006395141696670857,-153854102552448313048575813943815960006395141696576328⟩,⟨-56805600895126808323370740888081014841185011742151639,-56805600895126808323370740888081014841185011742057074⟩⟩, + ⟨⟨219134497351705829690379133330588030968637132354857272,219134497351705829690379133330588030968637132355133790⟩,⟨-274225127440837692879610849457473666610600451681297247,-274225127440837692879610849457473666610600451681020542⟩⟩, + ⟨⟨375343554223480145237326461111346803716463371845427565,375343554223480145237326461111346803716463371845812856⟩,⟨611380296344021746318476625913469171385532052168821052,611380296344021746318476625913469171385532052169204283⟩⟩] +lemma tw1_0_5_9_calc (j : Fin 31) : taylorWaveBox 1 0 5 9 j = tw1_0_5_9 j := by + revert j + decide +kernel +def tw1_0_5_10 : Fin 31 → CI := ![⟨⟨-153035431954785668608296378967478661654662836730724240,-153035431954785668608296378967478661654662836730641236⟩,⟨-49875463132654470019573581588406364772222335853760338,-49875463132654470019573581588406364772222335853677116⟩⟩, + ⟨⟨44364343814205960491818624443645450558531818084198016,44364343814205960491818624443645450558531818084251321⟩,⟨-58978943070681723892097841456681622942960163020961894,-58978943070681723892097841456681622942960163020908579⟩⟩, + ⟨⟨18796433637989881141663340526733698716935803942546003,18796433637989881141663340526733698716935803942564834⟩,⟨26115989479198641708112160934360051039509104820835564,26115989479198641708112160934360051039509104820854410⟩⟩, + ⟨⟨-12425617171922339288994916700237425104073021181743344,-12425617171922339288994916700237425104073021181739274⟩,⟨4618806893615545680012923792515741644974147063916389,4618806893615545680012923792515741644974147063920423⟩⟩, + ⟨⟨-665368017988795588428299341620206071837262510268178,-665368017988795588428299341620206071837262510264898⟩,⟨-5079782292922719164348326208658736445918767954519850,-5079782292922719164348326208658736445918767954516565⟩⟩, + ⟨⟨1840140089842543548941632001030990234343368160785945,1840140089842543548941632001030990234343368160787229⟩,⟨77558536467840341166849723740848239834391292601228,77558536467840341166849723740848239834391292602513⟩⟩, + ⟨⟨-88935862713474333515846323150831663233086635318545,-88935862713474333515846323150831663233086635318306⟩,⟨603505207692567104233194700264339957158478486139894,603505207692567104233194700264339957158478486140133⟩⟩, + ⟨⟨-181791273048822810670942565753107837771114610663889,-181791273048822810670942565753107837771114610663763⟩,⟨-29662143747312061810264185211414524684302114998940,-29662143747312061810264185211414524684302114998815⟩⟩, + ⟨⟨2980623098405816889559432562616233392446959122195,2980623098405816889559432562616233392446959122230⟩,⟨-50071262632761207002692964230490092813460916652113,-50071262632761207002692964230490092813460916652078⟩⟩, + ⟨⟨11962686110849981384287100566856829025110371985005,11962686110849981384287100566856829025110371985011⟩,⟨-2447989305463138095642565890108311932088609518832,-2447989305463138095642565890108311932088609518826⟩⟩, + ⟨⟨1670911677249927228935399245935015243866469734665,1670911677249927228935399245935015243866469734668⟩,⟨2059972649008287794665199906673653339820987768999,2059972649008287794665199906673653339820987769002⟩⟩, + ⟨⟨-56058359817121037757455360778601088719037604479,-56058359817121037757455360778601088719037604478⟩,⟨519960157752402261594315352672802786689106744935,519960157752402261594315352672802786689106744937⟩⟩, + ⟨⟨-46164562132849711137119426234747569452767860377,-46164562132849711137119426234747569452767860376⟩,⟨88054269702277921840564556310886344065169625273,88054269702277921840564556310886344065169625274⟩⟩, + ⟨⟨-6748713178457348789888427159537511066918646243,-6748713178457348789888427159537511066918646242⟩,⟨19989611519853033373920475518873766426791568066,19989611519853033373920475518873766426791568067⟩⟩, + ⟨⟨2638484220428555541202632762855302749814011418,2638484220428555541202632762855302749814011419⟩,⟨6007595387694238197624372780981487823572689836,6007595387694238197624372780981487823572689837⟩⟩, + ⟨⟨4200666535459428743908954711823415858349189558,4200666535459428743908954711823415858349189559⟩,⟨-1,1⟩⟩, + ⟨⟨2638484220428555541202632762855302749814011418,2638484220428555541202632762855302749814011419⟩,⟨-6007595387694238197624372780981487823572689837,-6007595387694238197624372780981487823572689836⟩⟩, + ⟨⟨-6748713178457348789888427159537511066918646243,-6748713178457348789888427159537511066918646242⟩,⟨-19989611519853033373920475518873766426791568067,-19989611519853033373920475518873766426791568066⟩⟩, + ⟨⟨-46164562132849711137119426234747569452767860377,-46164562132849711137119426234747569452767860376⟩,⟨-88054269702277921840564556310886344065169625274,-88054269702277921840564556310886344065169625273⟩⟩, + ⟨⟨-56058359817121037757455360778601088719037604479,-56058359817121037757455360778601088719037604478⟩,⟨-519960157752402261594315352672802786689106744937,-519960157752402261594315352672802786689106744935⟩⟩, + ⟨⟨1670911677249927228935399245935015243866469734665,1670911677249927228935399245935015243866469734668⟩,⟨-2059972649008287794665199906673653339820987769002,-2059972649008287794665199906673653339820987768999⟩⟩, + ⟨⟨11962686110849981384287100566856829025110371985005,11962686110849981384287100566856829025110371985011⟩,⟨2447989305463138095642565890108311932088609518826,2447989305463138095642565890108311932088609518832⟩⟩, + ⟨⟨2980623098405816889559432562616233392446959122195,2980623098405816889559432562616233392446959122230⟩,⟨50071262632761207002692964230490092813460916652078,50071262632761207002692964230490092813460916652113⟩⟩, + ⟨⟨-181791273048822810670942565753107837771114610663889,-181791273048822810670942565753107837771114610663763⟩,⟨29662143747312061810264185211414524684302114998815,29662143747312061810264185211414524684302114998940⟩⟩, + ⟨⟨-88935862713474333515846323150831663233086635318545,-88935862713474333515846323150831663233086635318306⟩,⟨-603505207692567104233194700264339957158478486140133,-603505207692567104233194700264339957158478486139894⟩⟩, + ⟨⟨1840140089842543548941632001030990234343368160785945,1840140089842543548941632001030990234343368160787229⟩,⟨-77558536467840341166849723740848239834391292602513,-77558536467840341166849723740848239834391292601228⟩⟩, + ⟨⟨-665368017988795588428299341620206071837262510268178,-665368017988795588428299341620206071837262510264898⟩,⟨5079782292922719164348326208658736445918767954516565,5079782292922719164348326208658736445918767954519850⟩⟩, + ⟨⟨-12425617171922339288994916700237425104073021181743344,-12425617171922339288994916700237425104073021181739274⟩,⟨-4618806893615545680012923792515741644974147063920423,-4618806893615545680012923792515741644974147063916389⟩⟩, + ⟨⟨18796433637989881141663340526733698716935803942546003,18796433637989881141663340526733698716935803942564834⟩,⟨-26115989479198641708112160934360051039509104820854410,-26115989479198641708112160934360051039509104820835564⟩⟩, + ⟨⟨44364343814205960491818624443645450558531818084198016,44364343814205960491818624443645450558531818084251321⟩,⟨58978943070681723892097841456681622942960163020908579,58978943070681723892097841456681622942960163020961894⟩⟩, + ⟨⟨-153035431954785668608296378967478661654662836730724240,-153035431954785668608296378967478661654662836730641236⟩,⟨49875463132654470019573581588406364772222335853677116,49875463132654470019573581588406364772222335853760338⟩⟩] +lemma tw1_0_5_10_calc (j : Fin 31) : taylorWaveBox 1 0 5 10 j = tw1_0_5_10 j := by + revert j + decide +kernel +def tw1_0_5_11 : Fin 31 → CI := ![⟨⟨-2647589183820062491893293832194523094816527988148583,-2647589183820062491893293832194523094816527988132669⟩,⟨33229500129830766262751489670673652563397533909589650,33229500129830766262751489670673652563397533909605581⟩⟩, + ⟨⟨-13229821827058843040559779336041539619817481135351279,-13229821827058843040559779336041539619817481135340374⟩,⟨-5488075304060417145935928216600652320214729489140448,-5488075304060417145935928216600652320214729489129555⟩⟩, + ⟨⟨3649627148577584129783328458732441132618529706551451,3649627148577584129783328458732441132618529706555549⟩,⟨-4542839633679682401755307672623909721412418279797075,-4542839633679682401755307672623909721412418279792983⟩⟩, + ⟨⟨1344680927816492983954616401730893934445875947975101,1344680927816492983954616401730893934445875947975891⟩,⟨1778620752924649045715113195043812604308287148540529,1778620752924649045715113195043812604308287148541326⟩⟩, + ⟨⟨-718032218239345728999618210684688852147482250098083,-718032218239345728999618210684688852147482250097531⟩,⟨343779710639028737551641591129728876809730775470220,343779710639028737551641591129728876809730775470771⟩⟩, + ⟨⟨-78525302701991436123918418678342861088253418354786,-78525302701991436123918418678342861088253418354601⟩,⟨-250798599403674893432211914977111467292861466824997,-250798599403674893432211914977111467292861466824812⟩⟩, + ⟨⟨77220293387179990021063093884680013484650391645498,77220293387179990021063093884680013484650391645536⟩,⟨-18422567608259195943627694567142287307074606672641,-18422567608259195943627694567142287307074606672603⟩⟩, + ⟨⟨5600512296319079264252317642527850391768061708604,5600512296319079264252317642527850391768061708622⟩,⟨20958905835751928653818830613555539480228488781729,20958905835751928653818830613555539480228488781748⟩⟩, + ⟨⟨-4849720636606805565321836685901856714861573267146,-4849720636606805565321836685901856714861573267141⟩,⟨2139937237741322743063007951149537732190998302761,2139937237741322743063007951149537732190998302766⟩⟩, + ⟨⟨-775377366665065354724158193925839899152316458058,-775377366665065354724158193925839899152316458056⟩,⟨-845321427491829013277480748877274203582213220970,-845321427491829013277480748877274203582213220968⟩⟩, + ⟨⟨57523114715542467208111079982538883780643535040,57523114715542467208111079982538883780643535041⟩,⟨-211728038618897814463547450998505851048340303260,-211728038618897814463547450998505851048340303259⟩⟩, + ⟨⟨30632551965653360155668762383358989244955028754,30632551965653360155668762383358989244955028755⟩,⟨-22120344943677649806561675250531585821326315230,-22120344943677649806561675250531585821326315229⟩⟩, + ⟨⟨5777781357912703594660299719092593419240836780,5777781357912703594660299719092593419240836781⟩,⟨-2396493934922032645433646480954736330325499156,-2396493934922032645433646480954736330325499155⟩⟩, + ⟨⟨862925560988131670263643552214810970669900266,862925560988131670263643552214810970669900267⟩,⟨-784930618080045415119386062641515559527635768,-784930618080045415119386062641515559527635767⟩⟩, + ⟨⟨-46868102482560895035672899287318571677934036,-46868102482560895035672899287318571677934035⟩,⟨-325783528940613089097676017254272812094773920,-325783528940613089097676017254272812094773919⟩⟩, + ⟨⟨-203027432738151231401410146124129979325786353,-203027432738151231401410146124129979325786352⟩,⟨-1,1⟩⟩, + ⟨⟨-46868102482560895035672899287318571677934036,-46868102482560895035672899287318571677934035⟩,⟨325783528940613089097676017254272812094773919,325783528940613089097676017254272812094773920⟩⟩, + ⟨⟨862925560988131670263643552214810970669900266,862925560988131670263643552214810970669900267⟩,⟨784930618080045415119386062641515559527635767,784930618080045415119386062641515559527635768⟩⟩, + ⟨⟨5777781357912703594660299719092593419240836780,5777781357912703594660299719092593419240836781⟩,⟨2396493934922032645433646480954736330325499155,2396493934922032645433646480954736330325499156⟩⟩, + ⟨⟨30632551965653360155668762383358989244955028754,30632551965653360155668762383358989244955028755⟩,⟨22120344943677649806561675250531585821326315229,22120344943677649806561675250531585821326315230⟩⟩, + ⟨⟨57523114715542467208111079982538883780643535040,57523114715542467208111079982538883780643535041⟩,⟨211728038618897814463547450998505851048340303259,211728038618897814463547450998505851048340303260⟩⟩, + ⟨⟨-775377366665065354724158193925839899152316458058,-775377366665065354724158193925839899152316458056⟩,⟨845321427491829013277480748877274203582213220968,845321427491829013277480748877274203582213220970⟩⟩, + ⟨⟨-4849720636606805565321836685901856714861573267146,-4849720636606805565321836685901856714861573267141⟩,⟨-2139937237741322743063007951149537732190998302766,-2139937237741322743063007951149537732190998302761⟩⟩, + ⟨⟨5600512296319079264252317642527850391768061708604,5600512296319079264252317642527850391768061708622⟩,⟨-20958905835751928653818830613555539480228488781748,-20958905835751928653818830613555539480228488781729⟩⟩, + ⟨⟨77220293387179990021063093884680013484650391645498,77220293387179990021063093884680013484650391645536⟩,⟨18422567608259195943627694567142287307074606672603,18422567608259195943627694567142287307074606672641⟩⟩, + ⟨⟨-78525302701991436123918418678342861088253418354786,-78525302701991436123918418678342861088253418354601⟩,⟨250798599403674893432211914977111467292861466824812,250798599403674893432211914977111467292861466824997⟩⟩, + ⟨⟨-718032218239345728999618210684688852147482250098083,-718032218239345728999618210684688852147482250097531⟩,⟨-343779710639028737551641591129728876809730775470771,-343779710639028737551641591129728876809730775470220⟩⟩, + ⟨⟨1344680927816492983954616401730893934445875947975101,1344680927816492983954616401730893934445875947975891⟩,⟨-1778620752924649045715113195043812604308287148541326,-1778620752924649045715113195043812604308287148540529⟩⟩, + ⟨⟨3649627148577584129783328458732441132618529706551451,3649627148577584129783328458732441132618529706555549⟩,⟨4542839633679682401755307672623909721412418279792983,4542839633679682401755307672623909721412418279797075⟩⟩, + ⟨⟨-13229821827058843040559779336041539619817481135351279,-13229821827058843040559779336041539619817481135340374⟩,⟨5488075304060417145935928216600652320214729489129555,5488075304060417145935928216600652320214729489140448⟩⟩, + ⟨⟨-2647589183820062491893293832194523094816527988148583,-2647589183820062491893293832194523094816527988132669⟩,⟨-33229500129830766262751489670673652563397533909605581,-33229500129830766262751489670673652563397533909589650⟩⟩] +lemma tw1_0_5_11_calc (j : Fin 31) : taylorWaveBox 1 0 5 11 j = tw1_0_5_11 j := by + revert j + decide +kernel +def tw1_0_5_12 : Fin 31 → CI := ![⟨⟨6332725518181221018920147786452331397080944072063108,6332725518181221018920147786452331397080944072066493⟩,⟨-996238458813575882325023207740033883530383200402652,-996238458813575882325023207740033883530383200399283⟩⟩, + ⟨⟨-364096821386861251776600653491759121875292954255627,-364096821386861251776600653491759121875292954253316⟩,⟨2555343747023654766559573282105862881980820217999827,2555343747023654766559573282105862881980820218002141⟩⟩, + ⟨⟨-900036038384078655433040473275107839086935272250883,-900036038384078655433040473275107839086935272250106⟩,⟨-387599357410694225609979549928524243379313380675919,-387599357410694225609979549928524243379313380675141⟩⟩, + ⟨⟨205731903506440179788868630755409681239740934343588,205731903506440179788868630755409681239740934343728⟩,⟨-280988109120177555679981788247587031243701185874320,-280988109120177555679981788247587031243701185874181⟩⟩, + ⟨⟨79368758008199267024146849019525517667500096428426,79368758008199267024146849019525517667500096428509⟩,⟨83037123937492687693869813207190530982966322095011,83037123937492687693869813207190530982966322095094⟩⟩, + ⟨⟨-27741944934324514734579995941027987238964879095800,-27741944934324514734579995941027987238964879095773⟩,⟨21045279665066709238737533830560776380681188471714,21045279665066709238737533830560776380681188471741⟩⟩, + ⟨⟨-5532645915130487038818519223637849000955311018512,-5532645915130487038818519223637849000955311018505⟩,⟨-7837293756780921313856475769044525397937958357989,-7837293756780921313856475769044525397937958357982⟩⟩, + ⟨⟨1838946249903924112598448209243915801292543505730,1838946249903924112598448209243915801292543505733⟩,⟨-1499189947836528564324102431910874234496173529269,-1499189947836528564324102431910874234496173529266⟩⟩, + ⟨⟨404399706122047384353272216472311970599612610541,404399706122047384353272216472311970599612610543⟩,⟨327177805907358499557302061101771336014751430696,327177805907358499557302061101771336014751430697⟩⟩, + ⟨⟨-28431040076321567927087515122005634405256149177,-28431040076321567927087515122005634405256149176⟩,⟨95936028352214024357773943381212958094605020067,95936028352214024357773943381212958094605020069⟩⟩, + ⟨⟨-15779314896775996629572321842140039240893319152,-15779314896775996629572321842140039240893319151⟩,⟨5916733053385014853902343763372795666155371648,5916733053385014853902343763372795666155371649⟩⟩, + ⟨⟨-2477851005783072893416702778909272419894065872,-2477851005783072893416702778909272419894065871⟩,⟨-534780926397894073880170486915991135525150534,-534780926397894073880170486915991135525150533⟩⟩, + ⟨⟨-348934884547660536826558799270219740632443544,-348934884547660536826558799270219740632443543⟩,⟨-108534121186646962379747788207599244577519748,-108534121186646962379747788207599244577519747⟩⟩, + ⟨⟨-58298899593089399835293563212412634138509379,-58298899593089399835293563212412634138509378⟩,⟨13712043420739476247524588640037899415254123,13712043420739476247524588640037899415254124⟩⟩, + ⟨⟨-1957989642744139628213888071784389088294227,-1957989642744139628213888071784389088294226⟩,⟨15205418232921838151430952148923916147459071,15205418232921838151430952148923916147459072⟩⟩, + ⟨⟨9111849873819596977499481831223973268545148,9111849873819596977499481831223973268545149⟩,⟨-1,1⟩⟩, + ⟨⟨-1957989642744139628213888071784389088294227,-1957989642744139628213888071784389088294226⟩,⟨-15205418232921838151430952148923916147459072,-15205418232921838151430952148923916147459071⟩⟩, + ⟨⟨-58298899593089399835293563212412634138509379,-58298899593089399835293563212412634138509378⟩,⟨-13712043420739476247524588640037899415254124,-13712043420739476247524588640037899415254123⟩⟩, + ⟨⟨-348934884547660536826558799270219740632443544,-348934884547660536826558799270219740632443543⟩,⟨108534121186646962379747788207599244577519747,108534121186646962379747788207599244577519748⟩⟩, + ⟨⟨-2477851005783072893416702778909272419894065872,-2477851005783072893416702778909272419894065871⟩,⟨534780926397894073880170486915991135525150533,534780926397894073880170486915991135525150534⟩⟩, + ⟨⟨-15779314896775996629572321842140039240893319152,-15779314896775996629572321842140039240893319151⟩,⟨-5916733053385014853902343763372795666155371649,-5916733053385014853902343763372795666155371648⟩⟩, + ⟨⟨-28431040076321567927087515122005634405256149177,-28431040076321567927087515122005634405256149176⟩,⟨-95936028352214024357773943381212958094605020069,-95936028352214024357773943381212958094605020067⟩⟩, + ⟨⟨404399706122047384353272216472311970599612610541,404399706122047384353272216472311970599612610543⟩,⟨-327177805907358499557302061101771336014751430697,-327177805907358499557302061101771336014751430696⟩⟩, + ⟨⟨1838946249903924112598448209243915801292543505730,1838946249903924112598448209243915801292543505733⟩,⟨1499189947836528564324102431910874234496173529266,1499189947836528564324102431910874234496173529269⟩⟩, + ⟨⟨-5532645915130487038818519223637849000955311018512,-5532645915130487038818519223637849000955311018505⟩,⟨7837293756780921313856475769044525397937958357982,7837293756780921313856475769044525397937958357989⟩⟩, + ⟨⟨-27741944934324514734579995941027987238964879095800,-27741944934324514734579995941027987238964879095773⟩,⟨-21045279665066709238737533830560776380681188471741,-21045279665066709238737533830560776380681188471714⟩⟩, + ⟨⟨79368758008199267024146849019525517667500096428426,79368758008199267024146849019525517667500096428509⟩,⟨-83037123937492687693869813207190530982966322095094,-83037123937492687693869813207190530982966322095011⟩⟩, + ⟨⟨205731903506440179788868630755409681239740934343588,205731903506440179788868630755409681239740934343728⟩,⟨280988109120177555679981788247587031243701185874181,280988109120177555679981788247587031243701185874320⟩⟩, + ⟨⟨-900036038384078655433040473275107839086935272250883,-900036038384078655433040473275107839086935272250106⟩,⟨387599357410694225609979549928524243379313380675141,387599357410694225609979549928524243379313380675919⟩⟩, + ⟨⟨-364096821386861251776600653491759121875292954255627,-364096821386861251776600653491759121875292954253316⟩,⟨-2555343747023654766559573282105862881980820218002141,-2555343747023654766559573282105862881980820217999827⟩⟩, + ⟨⟨6332725518181221018920147786452331397080944072063108,6332725518181221018920147786452331397080944072066493⟩,⟨996238458813575882325023207740033883530383200399283,996238458813575882325023207740033883530383200402652⟩⟩] +lemma tw1_0_5_12_calc (j : Fin 31) : taylorWaveBox 1 0 5 12 j = tw1_0_5_12 j := by + revert j + decide +kernel +def tw1_0_5_13 : Fin 31 → CI := ![⟨⟨-439140998614491418423345407202431782978387877443109,-439140998614491418423345407202431782978387877442405⟩,⟨-1063538770194165394242102196480964943274297718711907,-1063538770194165394242102196480964943274297718711198⟩⟩, + ⟨⟨431510096444435166157784905005699038384764804443170,431510096444435166157784905005699038384764804443604⟩,⟨-47727564167648318914174483416086869306461590217400,-47727564167648318914174483416086869306461590216966⟩⟩, + ⟨⟨-20928381618354676749220690666024880530496090631901,-20928381618354676749220690666024880530496090631768⟩,⟨152376856805905541790982829435199149266515789253135,152376856805905541790982829435199149266515789253267⟩⟩, + ⟨⟨-47851019126999999894092009074615141079673632671311,-47851019126999999894092009074615141079673632671288⟩,⟨-16955590349220693141541875068984088390618599695262,-16955590349220693141541875068984088390618599695239⟩⟩, + ⟨⟨7303398142261468623106584223493756520195370110589,7303398142261468623106584223493756520195370110602⟩,⟨-13636722683882450599185386126237415007632127774924,-13636722683882450599185386126237415007632127774912⟩⟩, + ⟨⟨3610781353082376629112664116673608575217200129458,3610781353082376629112664116673608575217200129463⟩,⟨2346379253559282548851122361013432404385330431772,2346379253559282548851122361013432404385330431777⟩⟩, + ⟨⟨-588968552852436249605704104192259706871619859729,-588968552852436249605704104192259706871619859728⟩,⟨907665118600625148244230198840412636959180014639,907665118600625148244230198840412636959180014641⟩⟩, + ⟨⟨-216580537467526046890508593774859349184164353655,-216580537467526046890508593774859349184164353653⟩,⟨-108378968063352931774777036314881932506642229106,-108378968063352931774777036314881932506642229105⟩⟩, + ⟨⟨9708751166935072604095091352992533365478607024,9708751166935072604095091352992533365478607025⟩,⟨-46642621593742713929363306066953325619177445747,-46642621593742713929363306066953325619177445746⟩⟩, + ⟨⟨7888514885966911009151867361277960529654689879,7888514885966911009151867361277960529654689880⟩,⟨-2033697922085550785937148744701457977252706696,-2033697922085550785937148744701457977252706695⟩⟩, + ⟨⟨1005183972589039223869713235423361765568155188,1005183972589039223869713235423361765568155189⟩,⟨670163794275550819337693314790228023348088009,670163794275550819337693314790228023348088010⟩⟩, + ⟨⟨78902145706085865525075921133548321145086515,78902145706085865525075921133548321145086516⟩,⟨137725273528068047989782022707287967552152221,137725273528068047989782022707287967552152222⟩⟩, + ⟨⟨10827594734084057534971278475103040526188310,10827594734084057534971278475103040526188311⟩,⟨16726391857963181353830326818226574673462386,16726391857963181353830326818226574673462387⟩⟩, + ⟨⟨2761112335478021908841091864421009395203519,2761112335478021908841091864421009395203520⟩,⟨782308265901331336756482314179415087141141,782308265901331336756482314179415087141142⟩⟩, + ⟨⟨258939153237507987566771456081742550989602,258939153237507987566771456081742550989603⟩,⟨-614140825546878738853921596054554600744781,-614140825546878738853921596054554600744780⟩⟩, + ⟨⟨-381676274989396404765318226867379503306143,-381676274989396404765318226867379503306142⟩,⟨-1,1⟩⟩, + ⟨⟨258939153237507987566771456081742550989602,258939153237507987566771456081742550989603⟩,⟨614140825546878738853921596054554600744780,614140825546878738853921596054554600744781⟩⟩, + ⟨⟨2761112335478021908841091864421009395203519,2761112335478021908841091864421009395203520⟩,⟨-782308265901331336756482314179415087141142,-782308265901331336756482314179415087141141⟩⟩, + ⟨⟨10827594734084057534971278475103040526188310,10827594734084057534971278475103040526188311⟩,⟨-16726391857963181353830326818226574673462387,-16726391857963181353830326818226574673462386⟩⟩, + ⟨⟨78902145706085865525075921133548321145086515,78902145706085865525075921133548321145086516⟩,⟨-137725273528068047989782022707287967552152222,-137725273528068047989782022707287967552152221⟩⟩, + ⟨⟨1005183972589039223869713235423361765568155188,1005183972589039223869713235423361765568155189⟩,⟨-670163794275550819337693314790228023348088010,-670163794275550819337693314790228023348088009⟩⟩, + ⟨⟨7888514885966911009151867361277960529654689879,7888514885966911009151867361277960529654689880⟩,⟨2033697922085550785937148744701457977252706695,2033697922085550785937148744701457977252706696⟩⟩, + ⟨⟨9708751166935072604095091352992533365478607024,9708751166935072604095091352992533365478607025⟩,⟨46642621593742713929363306066953325619177445746,46642621593742713929363306066953325619177445747⟩⟩, + ⟨⟨-216580537467526046890508593774859349184164353655,-216580537467526046890508593774859349184164353653⟩,⟨108378968063352931774777036314881932506642229105,108378968063352931774777036314881932506642229106⟩⟩, + ⟨⟨-588968552852436249605704104192259706871619859729,-588968552852436249605704104192259706871619859728⟩,⟨-907665118600625148244230198840412636959180014641,-907665118600625148244230198840412636959180014639⟩⟩, + ⟨⟨3610781353082376629112664116673608575217200129458,3610781353082376629112664116673608575217200129463⟩,⟨-2346379253559282548851122361013432404385330431777,-2346379253559282548851122361013432404385330431772⟩⟩, + ⟨⟨7303398142261468623106584223493756520195370110589,7303398142261468623106584223493756520195370110602⟩,⟨13636722683882450599185386126237415007632127774912,13636722683882450599185386126237415007632127774924⟩⟩, + ⟨⟨-47851019126999999894092009074615141079673632671311,-47851019126999999894092009074615141079673632671288⟩,⟨16955590349220693141541875068984088390618599695239,16955590349220693141541875068984088390618599695262⟩⟩, + ⟨⟨-20928381618354676749220690666024880530496090631901,-20928381618354676749220690666024880530496090631768⟩,⟨-152376856805905541790982829435199149266515789253267,-152376856805905541790982829435199149266515789253135⟩⟩, + ⟨⟨431510096444435166157784905005699038384764804443170,431510096444435166157784905005699038384764804443604⟩,⟨47727564167648318914174483416086869306461590216966,47727564167648318914174483416086869306461590217400⟩⟩, + ⟨⟨-439140998614491418423345407202431782978387877443109,-439140998614491418423345407202431782978387877442405⟩,⟨1063538770194165394242102196480964943274297718711198,1063538770194165394242102196480964943274297718711907⟩⟩] +lemma tw1_0_5_13_calc (j : Fin 31) : taylorWaveBox 1 0 5 13 j = tw1_0_5_13 j := by + revert j + decide +kernel +def tw1_0_5_14 : Fin 31 → CI := ![⟨⟨-156776097646715839939669626504472494049792031816788,-156776097646715839939669626504472494049792031816654⟩,⟨113619347712362032183853448548409193383173067665678,113619347712362032183853448548409193383173067665811⟩⟩, + ⟨⟨-24234139325216146636569145949565107639505492493776,-24234139325216146636569145949565107639505492493702⟩,⟨-64024372400309373618824025645907772080817113924034,-64024372400309373618824025645907772080817113923960⟩⟩, + ⟨⟨22430113197008561714241292985035303671406333467662,22430113197008561714241292985035303671406333467683⟩,⟨-3016013197354253082914195382242372147175696593533,-3016013197354253082914195382242372147175696593512⟩⟩, + ⟨⟨-340376459647473418802867607066259470616471205418,-340376459647473418802867607066259470616471205414⟩,⟨6929528232486866627094830500999122703335003949063,6929528232486866627094830500999122703335003949068⟩⟩, + ⟨⟨-1923093030728757816576375931545701692345371208696,-1923093030728757816576375931545701692345371208693⟩,⟨-340832018610606547435834300596050959460613833433,-340832018610606547435834300596050959460613833430⟩⟩, + ⟨⟨114155219562319652230936294119248298799481039622,114155219562319652230936294119248298799481039623⟩,⟨-486017242699612912085717490632854115880257615778,-486017242699612912085717490632854115880257615776⟩⟩, + ⟨⟨112238555626565080959087845913757862793111224184,112238555626565080959087845913757862793111224185⟩,⟨22177926607201645074487140654096827198656099818,22177926607201645074487140654096827198656099819⟩⟩, + ⟨⟨-952751345365095426520439062495472885623843836,-952751345365095426520439062495472885623843835⟩,⟨23156249496129760216181825142806459890143652320,23156249496129760216181825142806459890143652321⟩⟩, + ⟨⟨-3942806285524874128257306846552377034126338052,-3942806285524874128257306846552377034126338051⟩,⟨1090309142514002966673602518264058436645661544,1090309142514002966673602518264058436645661545⟩⟩, + ⟨⟨-442886472911192041068896204686927793589685874,-442886472911192041068896204686927793589685873⟩,⟨-436438961302093681805488583241914016763036905,-436438961302093681805488583241914016763036904⟩⟩, + ⟨⟨-2921717491879469019815709987290987061626939,-2921717491879469019815709987290987061626938⟩,⟨-81141551628584040876104033153887152739954952,-81141551628584040876104033153887152739954951⟩⟩, + ⟨⟨2910918699402551108867942137782404387552134,2910918699402551108867942137782404387552135⟩,⟨-8851214417766553723684571626311795892117772,-8851214417766553723684571626311795892117771⟩⟩, + ⟨⟨122171242654854746961222627764481373993230,122171242654854746961222627764481373993231⟩,⟨-1011176081365578348834952619918556920693392,-1011176081365578348834952619918556920693391⟩⟩, + ⟨⟨-91361309103991981861841851270928490560137,-91361309103991981861841851270928490560136⟩,⟨-90959300351879568019859162845011810867992,-90959300351879568019859162845011810867991⟩⟩, + ⟨⟨-16867753942164672255949698811973199652297,-16867753942164672255949698811973199652296⟩,⟨21292665831145157619622129424382899457313,21292665831145157619622129424382899457314⟩⟩, + ⟨⟨14988392269452568554821155689303182269896,14988392269452568554821155689303182269897⟩,⟨-1,1⟩⟩, + ⟨⟨-16867753942164672255949698811973199652297,-16867753942164672255949698811973199652296⟩,⟨-21292665831145157619622129424382899457314,-21292665831145157619622129424382899457313⟩⟩, + ⟨⟨-91361309103991981861841851270928490560137,-91361309103991981861841851270928490560136⟩,⟨90959300351879568019859162845011810867991,90959300351879568019859162845011810867992⟩⟩, + ⟨⟨122171242654854746961222627764481373993230,122171242654854746961222627764481373993231⟩,⟨1011176081365578348834952619918556920693391,1011176081365578348834952619918556920693392⟩⟩, + ⟨⟨2910918699402551108867942137782404387552134,2910918699402551108867942137782404387552135⟩,⟨8851214417766553723684571626311795892117771,8851214417766553723684571626311795892117772⟩⟩, + ⟨⟨-2921717491879469019815709987290987061626939,-2921717491879469019815709987290987061626938⟩,⟨81141551628584040876104033153887152739954951,81141551628584040876104033153887152739954952⟩⟩, + ⟨⟨-442886472911192041068896204686927793589685874,-442886472911192041068896204686927793589685873⟩,⟨436438961302093681805488583241914016763036904,436438961302093681805488583241914016763036905⟩⟩, + ⟨⟨-3942806285524874128257306846552377034126338052,-3942806285524874128257306846552377034126338051⟩,⟨-1090309142514002966673602518264058436645661545,-1090309142514002966673602518264058436645661544⟩⟩, + ⟨⟨-952751345365095426520439062495472885623843836,-952751345365095426520439062495472885623843835⟩,⟨-23156249496129760216181825142806459890143652321,-23156249496129760216181825142806459890143652320⟩⟩, + ⟨⟨112238555626565080959087845913757862793111224184,112238555626565080959087845913757862793111224185⟩,⟨-22177926607201645074487140654096827198656099819,-22177926607201645074487140654096827198656099818⟩⟩, + ⟨⟨114155219562319652230936294119248298799481039622,114155219562319652230936294119248298799481039623⟩,⟨486017242699612912085717490632854115880257615776,486017242699612912085717490632854115880257615778⟩⟩, + ⟨⟨-1923093030728757816576375931545701692345371208696,-1923093030728757816576375931545701692345371208693⟩,⟨340832018610606547435834300596050959460613833430,340832018610606547435834300596050959460613833433⟩⟩, + ⟨⟨-340376459647473418802867607066259470616471205418,-340376459647473418802867607066259470616471205414⟩,⟨-6929528232486866627094830500999122703335003949068,-6929528232486866627094830500999122703335003949063⟩⟩, + ⟨⟨22430113197008561714241292985035303671406333467662,22430113197008561714241292985035303671406333467683⟩,⟨3016013197354253082914195382242372147175696593512,3016013197354253082914195382242372147175696593533⟩⟩, + ⟨⟨-24234139325216146636569145949565107639505492493776,-24234139325216146636569145949565107639505492493702⟩,⟨64024372400309373618824025645907772080817113923960,64024372400309373618824025645907772080817113924034⟩⟩, + ⟨⟨-156776097646715839939669626504472494049792031816788,-156776097646715839939669626504472494049792031816654⟩,⟨-113619347712362032183853448548409193383173067665811,-113619347712362032183853448548409193383173067665678⟩⟩] +lemma tw1_0_5_14_calc (j : Fin 31) : taylorWaveBox 1 0 5 14 j = tw1_0_5_14 j := by + revert j + decide +kernel +def tw1_0_5_15 : Fin 31 → CI := ![⟨⟨23291769650437083026808745222965077871059580506863,23291769650437083026808745222965077871059580506887⟩,⟨19944101308160860437645433313717639481200502754101,19944101308160860437645433313717639481200502754125⟩⟩, + ⟨⟨-8306723245478799447197526555656084572169687170327,-8306723245478799447197526555656084572169687170315⟩,⟨5849580750728824634106773460698575624258937541367,5849580750728824634106773460698575624258937541379⟩⟩, + ⟨⟨-1231551331932249172119185406998602940302824877733,-1231551331932249172119185406998602940302824877729⟩,⟨-2882193853763554382752174585791021877150273848114,-2882193853763554382752174585791021877150273848110⟩⟩, + ⟨⟨866296166413679473373156884020620731555398532273,866296166413679473373156884020620731555398532275⟩,⟨-214180482797009266926384839687964763949323802742,-214180482797009266926384839687964763949323802741⟩⟩, + ⟨⟨32586146246725596147724106055277774799092307287,32586146246725596147724106055277774799092307288⟩,⟨229777920357418617743518628207708040158878405065,229777920357418617743518628207708040158878405066⟩⟩, + ⟨⟨-54116820616849682087969342591107169274419370022,-54116820616849682087969342591107169274419370021⟩,⟨6243246815686028305455881782682641088065978890,6243246815686028305455881782682641088065978891⟩⟩, + ⟨⟨-2099091688862946713433589739504548031344903025,-2099091688862946713433589739504548031344903024⟩,⟨-11190512539010633225159124182527055734664470046,-11190512539010633225159124182527055734664470045⟩⟩, + ⟨⟨1937109118536396211084828854170085947856683757,1937109118536396211084828854170085947856683758⟩,⟨-777600519176035215916807706648510512605173236,-777600519176035215916807706648510512605173235⟩⟩, + ⟨⟨224082480019358919872378901624010421711351437,224082480019358919872378901624010421711351438⟩,⟨243057950770518411822404884914027998236851722,243057950770518411822404884914027998236851723⟩⟩, + ⟨⟨-10515531387524706701201016521294503865126572,-10515531387524706701201016521294503865126571⟩,⟨43412489223770714282686165113903357949061285,43412489223770714282686165113903357949061286⟩⟩, + ⟨⟨-4057270150771603660364257089460632346528184,-4057270150771603660364257089460632346528183⟩,⟨3148965882456922376810420731307485565699964,3148965882456922376810420731307485565699965⟩⟩, + ⟨⟨-471076325638165404718533105855482225827668,-471076325638165404718533105855482225827667⟩,⟨207598671502521668198908365524987014327499,207598671502521668198908365524987014327500⟩⟩, + ⟨⟨-35659589046952246630449843699605483283412,-35659589046952246630449843699605483283411⟩,⟨33610115098432857798906180606129565070080,33610115098432857798906180606129565070081⟩⟩, + ⟨⟨1509012821863223294402799556758594568515,1509012821863223294402799556758594568516⟩,⟨5237795706362651818780417896002866694395,5237795706362651818780417896002866694396⟩⟩, + ⟨⟨842034919191573028383304628230951864869,842034919191573028383304628230951864870⟩,⟨-613799886648431769368640979422941773421,-613799886648431769368640979422941773420⟩⟩, + ⟨⟨-553969682856873389644162939380104244431,-553969682856873389644162939380104244430⟩,⟨-1,1⟩⟩, + ⟨⟨842034919191573028383304628230951864869,842034919191573028383304628230951864870⟩,⟨613799886648431769368640979422941773420,613799886648431769368640979422941773421⟩⟩, + ⟨⟨1509012821863223294402799556758594568515,1509012821863223294402799556758594568516⟩,⟨-5237795706362651818780417896002866694396,-5237795706362651818780417896002866694395⟩⟩, + ⟨⟨-35659589046952246630449843699605483283412,-35659589046952246630449843699605483283411⟩,⟨-33610115098432857798906180606129565070081,-33610115098432857798906180606129565070080⟩⟩, + ⟨⟨-471076325638165404718533105855482225827668,-471076325638165404718533105855482225827667⟩,⟨-207598671502521668198908365524987014327500,-207598671502521668198908365524987014327499⟩⟩, + ⟨⟨-4057270150771603660364257089460632346528184,-4057270150771603660364257089460632346528183⟩,⟨-3148965882456922376810420731307485565699965,-3148965882456922376810420731307485565699964⟩⟩, + ⟨⟨-10515531387524706701201016521294503865126572,-10515531387524706701201016521294503865126571⟩,⟨-43412489223770714282686165113903357949061286,-43412489223770714282686165113903357949061285⟩⟩, + ⟨⟨224082480019358919872378901624010421711351437,224082480019358919872378901624010421711351438⟩,⟨-243057950770518411822404884914027998236851723,-243057950770518411822404884914027998236851722⟩⟩, + ⟨⟨1937109118536396211084828854170085947856683757,1937109118536396211084828854170085947856683758⟩,⟨777600519176035215916807706648510512605173235,777600519176035215916807706648510512605173236⟩⟩, + ⟨⟨-2099091688862946713433589739504548031344903025,-2099091688862946713433589739504548031344903024⟩,⟨11190512539010633225159124182527055734664470045,11190512539010633225159124182527055734664470046⟩⟩, + ⟨⟨-54116820616849682087969342591107169274419370022,-54116820616849682087969342591107169274419370021⟩,⟨-6243246815686028305455881782682641088065978891,-6243246815686028305455881782682641088065978890⟩⟩, + ⟨⟨32586146246725596147724106055277774799092307287,32586146246725596147724106055277774799092307288⟩,⟨-229777920357418617743518628207708040158878405066,-229777920357418617743518628207708040158878405065⟩⟩, + ⟨⟨866296166413679473373156884020620731555398532273,866296166413679473373156884020620731555398532275⟩,⟨214180482797009266926384839687964763949323802741,214180482797009266926384839687964763949323802742⟩⟩, + ⟨⟨-1231551331932249172119185406998602940302824877733,-1231551331932249172119185406998602940302824877729⟩,⟨2882193853763554382752174585791021877150273848110,2882193853763554382752174585791021877150273848114⟩⟩, + ⟨⟨-8306723245478799447197526555656084572169687170327,-8306723245478799447197526555656084572169687170315⟩,⟨-5849580750728824634106773460698575624258937541379,-5849580750728824634106773460698575624258937541367⟩⟩, + ⟨⟨23291769650437083026808745222965077871059580506863,23291769650437083026808745222965077871059580506887⟩,⟨-19944101308160860437645433313717639481200502754125,-19944101308160860437645433313717639481200502754101⟩⟩] +lemma tw1_0_5_15_calc (j : Fin 31) : taylorWaveBox 1 0 5 15 j = tw1_0_5_15 j := by + revert j + decide +kernel +def tw1_0_5_16 : Fin 31 → CI := ![⟨⟨2087715813456862084502275974815662515937295475483,2087715813456862084502275974815662515937295475488⟩,⟨-4083831043492562274697701529908453566861453523547,-4083831043492562274697701529908453566861453523543⟩⟩, + ⟨⟨1084027238849439327835596029395690956383722227017,1084027238849439327835596029395690956383722227020⟩,⟨923430772964644627339253551801482725264266250417,923430772964644627339253551801482725264266250419⟩⟩, + ⟨⟨-320315771798662347670286806445156637766347362678,-320315771798662347670286806445156637766347362676⟩,⟨255846507882286668204994267278993047626015279277,255846507882286668204994267278993047626015279279⟩⟩, + ⟨⟨-55160471591439419556446734591670262915864367568,-55160471591439419556446734591670262915864367567⟩,⟨-93321826772185058982554063844547957665370331288,-93321826772185058982554063844547957665370331287⟩⟩, + ⟨⟨23370414384274751579496739847264337011777998650,23370414384274751579496739847264337011777998651⟩,⟨-11496368610555241216476718922028262319492809001,-11496368610555241216476718922028262319492809000⟩⟩, + ⟨⟨2494395695107977812576120157290456400118027661,2494395695107977812576120157290456400118027663⟩,⟨5029384576743119426620444552759008598514773492,5029384576743119426620444552759008598514773493⟩⟩, + ⟨⟨-903284321413416102720397641101832362722524485,-903284321413416102720397641101832362722524484⟩,⟨573802883942425926323582169789384523220307936,573802883942425926323582169789384523220307937⟩⟩, + ⟨⟨-127936483399237664592142797615205373040716528,-127936483399237664592142797615205373040716527⟩,⟨-123118541745278362733959824005892054279524761,-123118541745278362733959824005892054279524760⟩⟩, + ⟨⟨8675340632294917497712194409306100252212031,8675340632294917497712194409306100252212032⟩,⟨-23693678309639192120699372549880955361418296,-23693678309639192120699372549880955361418295⟩⟩, + ⟨⟨2892697535422748959256803864531763874222117,2892697535422748959256803864531763874222118⟩,⟨-903612929185666318406667865010537847190752,-903612929185666318406667865010537847190751⟩⟩, + ⟨⟨294291619663930372836723975549750998106252,294291619663930372836723975549750998106253⟩,⟨86782362341458242101489756951278772674232,86782362341458242101489756951278772674233⟩⟩, + ⟨⟨24495399911132877527461324960144896979482,24495399911132877527461324960144896979483⟩,⟨11024179120325222847234856518258084208127,11024179120325222847234856518258084208128⟩⟩, + ⟨⟨2222433094958032759061308877522119444348,2222433094958032759061308877522119444349⟩,⟨-135918942921450307799064482536847640129,-135918942921450307799064482536847640128⟩⟩, + ⟨⟨48899716299408139892038450654571687340,48899716299408139892038450654571687341⟩,⟨-212097163686060675746005329238215181032,-212097163686060675746005329238215181031⟩⟩, + ⟨⟨-35344135163527520870582645309890430000,-35344135163527520870582645309890429999⟩,⟨13261056964845490127636800732800049054,13261056964845490127636800732800049055⟩⟩, + ⟨⟨19337189844162456274662082555965150337,19337189844162456274662082555965150338⟩,⟨-1,1⟩⟩, + ⟨⟨-35344135163527520870582645309890430000,-35344135163527520870582645309890429999⟩,⟨-13261056964845490127636800732800049055,-13261056964845490127636800732800049054⟩⟩, + ⟨⟨48899716299408139892038450654571687340,48899716299408139892038450654571687341⟩,⟨212097163686060675746005329238215181031,212097163686060675746005329238215181032⟩⟩, + ⟨⟨2222433094958032759061308877522119444348,2222433094958032759061308877522119444349⟩,⟨135918942921450307799064482536847640128,135918942921450307799064482536847640129⟩⟩, + ⟨⟨24495399911132877527461324960144896979482,24495399911132877527461324960144896979483⟩,⟨-11024179120325222847234856518258084208128,-11024179120325222847234856518258084208127⟩⟩, + ⟨⟨294291619663930372836723975549750998106252,294291619663930372836723975549750998106253⟩,⟨-86782362341458242101489756951278772674233,-86782362341458242101489756951278772674232⟩⟩, + ⟨⟨2892697535422748959256803864531763874222117,2892697535422748959256803864531763874222118⟩,⟨903612929185666318406667865010537847190751,903612929185666318406667865010537847190752⟩⟩, + ⟨⟨8675340632294917497712194409306100252212031,8675340632294917497712194409306100252212032⟩,⟨23693678309639192120699372549880955361418295,23693678309639192120699372549880955361418296⟩⟩, + ⟨⟨-127936483399237664592142797615205373040716528,-127936483399237664592142797615205373040716527⟩,⟨123118541745278362733959824005892054279524760,123118541745278362733959824005892054279524761⟩⟩, + ⟨⟨-903284321413416102720397641101832362722524485,-903284321413416102720397641101832362722524484⟩,⟨-573802883942425926323582169789384523220307937,-573802883942425926323582169789384523220307936⟩⟩, + ⟨⟨2494395695107977812576120157290456400118027661,2494395695107977812576120157290456400118027663⟩,⟨-5029384576743119426620444552759008598514773493,-5029384576743119426620444552759008598514773492⟩⟩, + ⟨⟨23370414384274751579496739847264337011777998650,23370414384274751579496739847264337011777998651⟩,⟨11496368610555241216476718922028262319492809000,11496368610555241216476718922028262319492809001⟩⟩, + ⟨⟨-55160471591439419556446734591670262915864367568,-55160471591439419556446734591670262915864367567⟩,⟨93321826772185058982554063844547957665370331287,93321826772185058982554063844547957665370331288⟩⟩, + ⟨⟨-320315771798662347670286806445156637766347362678,-320315771798662347670286806445156637766347362676⟩,⟨-255846507882286668204994267278993047626015279279,-255846507882286668204994267278993047626015279277⟩⟩, + ⟨⟨1084027238849439327835596029395690956383722227017,1084027238849439327835596029395690956383722227020⟩,⟨-923430772964644627339253551801482725264266250419,-923430772964644627339253551801482725264266250417⟩⟩, + ⟨⟨2087715813456862084502275974815662515937295475483,2087715813456862084502275974815662515937295475488⟩,⟨4083831043492562274697701529908453566861453523543,4083831043492562274697701529908453566861453523547⟩⟩] +lemma tw1_0_5_16_calc (j : Fin 31) : taylorWaveBox 1 0 5 16 j = tw1_0_5_16 j := by + revert j + decide +kernel +def tw1_0_5_17 : Fin 31 → CI := ![⟨⟨-631747115951737243397483502194727748113549258965,-631747115951737243397483502194727748113549258964⟩,⟨-152614763035182263087735297448704309407086427065,-152614763035182263087735297448704309407086427063⟩⟩, + ⟨⟨82908033388082892691871814713278249191593651140,82908033388082892691871814713278249191593651141⟩,⟨-169946678756868047824094203663325437192326682730,-169946678756868047824094203663325437192326682729⟩⟩, + ⟨⟨41145139347270685176466186016159683690079654216,41145139347270685176466186016159683690079654217⟩,⟨29790543704843708203652648912909675893695453978,29790543704843708203652648912909675893695453979⟩⟩, + ⟨⟨-8462864761789877090622195065875296498892030216,-8462864761789877090622195065875296498892030215⟩,⟨9166508138327625680502223801701686080356503017,9166508138327625680502223801701686080356503018⟩⟩, + ⟨⟨-1934500405193682854598910852634382073548992803,-1934500405193682854598910852634382073548992802⟩,⟨-1981294379354632681775282071674517464225214996,-1981294379354632681775282071674517464225214995⟩⟩, + ⟨⟨379508262270496879795068384648148741307836485,379508262270496879795068384648148741307836486⟩,⟨-395452489494499043744096875183807253356641616,-395452489494499043744096875183807253356641615⟩⟩, + ⟨⟨77309354739585627945826066743175721783721741,77309354739585627945826066743175721783721742⟩,⟨55702353114062231015774931018956698057489051,55702353114062231015774931018956698057489052⟩⟩, + ⟨⟨-4816897401163365419188827116324497992651131,-4816897401163365419188827116324497992651130⟩,⟨13473194250142742435324983027900574586512072,13473194250142742435324983027900574586512073⟩⟩, + ⟨⟨-1810429798335323083832986463894765671854031,-1810429798335323083832986463894765671854030⟩,⟨225697321011839551480973474659287872659386,225697321011839551480973474659287872659387⟩⟩, + ⟨⟨-145462984839005064398276363872062140681347,-145462984839005064398276363872062140681346⟩,⟨-129551001444391978982319579900683802407879,-129551001444391978982319579900683802407878⟩⟩, + ⟨⟨-5746156857578418125325609140293986864860,-5746156857578418125325609140293986864859⟩,⟨-16386571189828537565777654891840229115169,-16386571189828537565777654891840229115168⟩⟩, + ⟨⟨-404978145386333340315926140171232435274,-404978145386333340315926140171232435273⟩,⟨-1264616380470218252901199794669617215999,-1264616380470218252901199794669617215998⟩⟩, + ⟨⟨-77240152049330687740796559717738117727,-77240152049330687740796559717738117726⟩,⟨-56750676676632636944052207066114827106,-56750676676632636944052207066114827105⟩⟩, + ⟨⟨-5513709195106914146782752555117134199,-5513709195106914146782752555117134198⟩,⟨6115545115913464796992158273438045171,6115545115913464796992158273438045172⟩⟩, + ⟨⟨1290624533618702441656746253214284656,1290624533618702441656746253214284657⟩,⟨-113865922588645979541991057046507349,-113865922588645979541991057046507348⟩⟩, + ⟨⟨-639469195320967698861764863498813754,-639469195320967698861764863498813753⟩,⟨-1,1⟩⟩, + ⟨⟨1290624533618702441656746253214284656,1290624533618702441656746253214284657⟩,⟨113865922588645979541991057046507348,113865922588645979541991057046507349⟩⟩, + ⟨⟨-5513709195106914146782752555117134199,-5513709195106914146782752555117134198⟩,⟨-6115545115913464796992158273438045172,-6115545115913464796992158273438045171⟩⟩, + ⟨⟨-77240152049330687740796559717738117727,-77240152049330687740796559717738117726⟩,⟨56750676676632636944052207066114827105,56750676676632636944052207066114827106⟩⟩, + ⟨⟨-404978145386333340315926140171232435274,-404978145386333340315926140171232435273⟩,⟨1264616380470218252901199794669617215998,1264616380470218252901199794669617215999⟩⟩, + ⟨⟨-5746156857578418125325609140293986864860,-5746156857578418125325609140293986864859⟩,⟨16386571189828537565777654891840229115168,16386571189828537565777654891840229115169⟩⟩, + ⟨⟨-145462984839005064398276363872062140681347,-145462984839005064398276363872062140681346⟩,⟨129551001444391978982319579900683802407878,129551001444391978982319579900683802407879⟩⟩, + ⟨⟨-1810429798335323083832986463894765671854031,-1810429798335323083832986463894765671854030⟩,⟨-225697321011839551480973474659287872659387,-225697321011839551480973474659287872659386⟩⟩, + ⟨⟨-4816897401163365419188827116324497992651131,-4816897401163365419188827116324497992651130⟩,⟨-13473194250142742435324983027900574586512073,-13473194250142742435324983027900574586512072⟩⟩, + ⟨⟨77309354739585627945826066743175721783721741,77309354739585627945826066743175721783721742⟩,⟨-55702353114062231015774931018956698057489052,-55702353114062231015774931018956698057489051⟩⟩, + ⟨⟨379508262270496879795068384648148741307836485,379508262270496879795068384648148741307836486⟩,⟨395452489494499043744096875183807253356641615,395452489494499043744096875183807253356641616⟩⟩, + ⟨⟨-1934500405193682854598910852634382073548992803,-1934500405193682854598910852634382073548992802⟩,⟨1981294379354632681775282071674517464225214995,1981294379354632681775282071674517464225214996⟩⟩, + ⟨⟨-8462864761789877090622195065875296498892030216,-8462864761789877090622195065875296498892030215⟩,⟨-9166508138327625680502223801701686080356503018,-9166508138327625680502223801701686080356503017⟩⟩, + ⟨⟨41145139347270685176466186016159683690079654216,41145139347270685176466186016159683690079654217⟩,⟨-29790543704843708203652648912909675893695453979,-29790543704843708203652648912909675893695453978⟩⟩, + ⟨⟨82908033388082892691871814713278249191593651140,82908033388082892691871814713278249191593651141⟩,⟨169946678756868047824094203663325437192326682729,169946678756868047824094203663325437192326682730⟩⟩, + ⟨⟨-631747115951737243397483502194727748113549258965,-631747115951737243397483502194727748113549258964⟩,⟨152614763035182263087735297448704309407086427063,152614763035182263087735297448704309407086427065⟩⟩] +lemma tw1_0_5_17_calc (j : Fin 31) : taylorWaveBox 1 0 5 17 j = tw1_0_5_17 j := by + revert j + decide +kernel +def tw1_0_5_18 : Fin 31 → CI := ![⟨⟨-130304781856318859830135957455025523251902747,-130304781856318859830135957455025523251902746⟩,⟨87490038283828299162709760066878075045612707219,87490038283828299162709760066878075045612707221⟩⟩, + ⟨⟨-23367536366110944223602288122012302754584435925,-23367536366110944223602288122012302754584435924⟩,⟨-4790094737982440859665491819410261757825108412,-4790094737982440859665491819410261757825108411⟩⟩, + ⟨⟨2087017303414012195565136911699131218847913786,2087017303414012195565136911699131218847913787⟩,⟨-5603665525707162739972008841531370344821460183,-5603665525707162739972008841531370344821460182⟩⟩, + ⟨⟨1225783225187667502958602693499451063389741774,1225783225187667502958602693499451063389741775⟩,⟨598254779201022569755654680555423016986238809,598254779201022569755654680555423016986238810⟩⟩, + ⟨⟨-129416484427247955243572567876251347420219846,-129416484427247955243572567876251347420219845⟩,⟨247942906652660618109461261604769932280211791,247942906652660618109461261604769932280211792⟩⟩, + ⟨⟨-46432343571692689593043892421676646594708071,-46432343571692689593043892421676646594708070⟩,⟨-20694837217314577581861044703990209772370515,-20694837217314577581861044703990209772370514⟩⟩, + ⟨⟨1946107574233566462283831361243257929335016,1946107574233566462283831361243257929335017⟩,⟨-7821803555899261264628701445977476369919259,-7821803555899261264628701445977476369919258⟩⟩, + ⟨⟨1091933696588943353163995354395893996173029,1091933696588943353163995354395893996173030⟩,⟨-86990003242131361025333230835620293350232,-86990003242131361025333230835620293350231⟩⟩, + ⟨⟨70663394318958149131358907003087364880809,70663394318958149131358907003087364880810⟩,⟨103502372543832279158037865627710618187131,103502372543832279158037865627710618187132⟩⟩, + ⟨⟨-2213420127987091068035308245761416434385,-2213420127987091068035308245761416434384⟩,⟨11686388819686721723243789510909517307644,11686388819686721723243789510909517307645⟩⟩, + ⟨⟨-534478209235952115006601002041488964663,-534478209235952115006601002041488964662⟩,⟨765522707926900605796604155533283851375,765522707926900605796604155533283851376⟩⟩, + ⟨⟨-31420675563616010029931387520525529602,-31420675563616010029931387520525529601⟩,⟨53865499376169125839818560653766444247,53865499376169125839818560653766444248⟩⟩, + ⟨⟨940841701290369729358550737780166261,940841701290369729358550737780166262⟩,⟨3805017541338386323775461591260127581,3805017541338386323775461591260127582⟩⟩, + ⟨⟨279954680840731965178709902659176464,279954680840731965178709902659176465⟩,⟨-95893136636404740849071380652569345,-95893136636404740849071380652569344⟩⟩, + ⟨⟨-41539833161089115790301977759015713,-41539833161089115790301977759015712⟩,⟨-7685620300344158975033285447099717,-7685620300344158975033285447099716⟩⟩, + ⟨⟨20089517262173287071998911382128241,20089517262173287071998911382128242⟩,⟨-1,1⟩⟩, + ⟨⟨-41539833161089115790301977759015713,-41539833161089115790301977759015712⟩,⟨7685620300344158975033285447099716,7685620300344158975033285447099717⟩⟩, + ⟨⟨279954680840731965178709902659176464,279954680840731965178709902659176465⟩,⟨95893136636404740849071380652569344,95893136636404740849071380652569345⟩⟩, + ⟨⟨940841701290369729358550737780166261,940841701290369729358550737780166262⟩,⟨-3805017541338386323775461591260127582,-3805017541338386323775461591260127581⟩⟩, + ⟨⟨-31420675563616010029931387520525529602,-31420675563616010029931387520525529601⟩,⟨-53865499376169125839818560653766444248,-53865499376169125839818560653766444247⟩⟩, + ⟨⟨-534478209235952115006601002041488964663,-534478209235952115006601002041488964662⟩,⟨-765522707926900605796604155533283851376,-765522707926900605796604155533283851375⟩⟩, + ⟨⟨-2213420127987091068035308245761416434385,-2213420127987091068035308245761416434384⟩,⟨-11686388819686721723243789510909517307645,-11686388819686721723243789510909517307644⟩⟩, + ⟨⟨70663394318958149131358907003087364880809,70663394318958149131358907003087364880810⟩,⟨-103502372543832279158037865627710618187132,-103502372543832279158037865627710618187131⟩⟩, + ⟨⟨1091933696588943353163995354395893996173029,1091933696588943353163995354395893996173030⟩,⟨86990003242131361025333230835620293350231,86990003242131361025333230835620293350232⟩⟩, + ⟨⟨1946107574233566462283831361243257929335016,1946107574233566462283831361243257929335017⟩,⟨7821803555899261264628701445977476369919258,7821803555899261264628701445977476369919259⟩⟩, + ⟨⟨-46432343571692689593043892421676646594708071,-46432343571692689593043892421676646594708070⟩,⟨20694837217314577581861044703990209772370514,20694837217314577581861044703990209772370515⟩⟩, + ⟨⟨-129416484427247955243572567876251347420219846,-129416484427247955243572567876251347420219845⟩,⟨-247942906652660618109461261604769932280211792,-247942906652660618109461261604769932280211791⟩⟩, + ⟨⟨1225783225187667502958602693499451063389741774,1225783225187667502958602693499451063389741775⟩,⟨-598254779201022569755654680555423016986238810,-598254779201022569755654680555423016986238809⟩⟩, + ⟨⟨2087017303414012195565136911699131218847913786,2087017303414012195565136911699131218847913787⟩,⟨5603665525707162739972008841531370344821460182,5603665525707162739972008841531370344821460183⟩⟩, + ⟨⟨-23367536366110944223602288122012302754584435925,-23367536366110944223602288122012302754584435924⟩,⟨4790094737982440859665491819410261757825108411,4790094737982440859665491819410261757825108412⟩⟩, + ⟨⟨-130304781856318859830135957455025523251902747,-130304781856318859830135957455025523251902746⟩,⟨-87490038283828299162709760066878075045612707221,-87490038283828299162709760066878075045612707219⟩⟩] +lemma tw1_0_5_18_calc (j : Fin 31) : taylorWaveBox 1 0 5 18 j = tw1_0_5_18 j := by + revert j + decide +kernel +def tw1_0_5_19 : Fin 31 → CI := ![⟨⟨10910964643875497223584198109648724930991920858,10910964643875497223584198109648724930991920859⟩,⟨-2601451199322861397588128883437065493825577671,-2601451199322861397588128883437065493825577670⟩⟩, + ⟨⟨141802222077070496067277844120018533026703593,141802222077070496067277844120018533026703594⟩,⟨2862255617205216400278246908969530313085659164,2862255617205216400278246908969530313085659165⟩⟩, + ⟨⟨-667886924485505256913568482661001228668924206,-667886924485505256913568482661001228668924205⟩,⟨-57828817335220907546509202389639387607385634,-57828817335220907546509202389639387607385633⟩⟩, + ⟨⟨22990455453014682838755666722322250075932550,22990455453014682838755666722322250075932551⟩,⟨-140150902251969978831838124237227954137132564,-140150902251969978831838124237227954137132563⟩⟩, + ⟨⟨26539570663425659737692572205140087880483477,26539570663425659737692572205140087880483478⟩,⟨4413080511777106161510477567293896992861822,4413080511777106161510477567293896992861823⟩⟩, + ⟨⟨-330714422375364843826332625632217064864223,-330714422375364843826332625632217064864222⟩,⟨4478222723245549645018357615747885059694323,4478222723245549645018357615747885059694324⟩⟩, + ⟨⟨-643296940294254549617577485975804863931039,-643296940294254549617577485975804863931038⟩,⟨88459308983491208244595341667465143113774,88459308983491208244595341667465143113775⟩⟩, + ⟨⟨-38454434938754899455619505539275363720315,-38454434938754899455619505539275363720314⟩,⟨-69998553642463835547471153375437298305490,-69998553642463835547471153375437298305489⟩⟩, + ⟨⟨3907280134384006109900017612175474589140,3907280134384006109900017612175474589141⟩,⟨-7207813383220228132491709248410801754730,-7207813383220228132491709248410801754729⟩⟩, + ⟨⟨648985268427887539006701273167649869628,648985268427887539006701273167649869629⟩,⟨-239280310227952296787799311610448986037,-239280310227952296787799311610448986036⟩⟩, + ⟨⟨47803197653964982955140016000863378636,47803197653964982955140016000863378637⟩,⟨-693898881396983087663119099227444548,-693898881396983087663119099227444547⟩⟩, + ⟨⟨2730828828480999685068624638406780887,2730828828480999685068624638406780888⟩,⟨-567091512046796523698416627052692878,-567091512046796523698416627052692877⟩⟩, + ⟨⟨66721630970565666646130122492420147,66721630970565666646130122492420148⟩,⟨-137304123512250115007978833747787313,-137304123512250115007978833747787312⟩⟩, + ⟨⟨-9970177762898334385181321571424326,-9970177762898334385181321571424325⟩,⟨-1784342096356710482346192295491657,-1784342096356710482346192295491656⟩⟩, + ⟨⟨1178993006907306586347400779645407,1178993006907306586347400779645408⟩,⟨575194583269983303461962168260819,575194583269983303461962168260820⟩⟩, + ⟨⟨-601076950904846999271047830057274,-601076950904846999271047830057273⟩,⟨-1,1⟩⟩, + ⟨⟨1178993006907306586347400779645407,1178993006907306586347400779645408⟩,⟨-575194583269983303461962168260820,-575194583269983303461962168260819⟩⟩, + ⟨⟨-9970177762898334385181321571424326,-9970177762898334385181321571424325⟩,⟨1784342096356710482346192295491656,1784342096356710482346192295491657⟩⟩, + ⟨⟨66721630970565666646130122492420147,66721630970565666646130122492420148⟩,⟨137304123512250115007978833747787312,137304123512250115007978833747787313⟩⟩, + ⟨⟨2730828828480999685068624638406780887,2730828828480999685068624638406780888⟩,⟨567091512046796523698416627052692877,567091512046796523698416627052692878⟩⟩, + ⟨⟨47803197653964982955140016000863378636,47803197653964982955140016000863378637⟩,⟨693898881396983087663119099227444547,693898881396983087663119099227444548⟩⟩, + ⟨⟨648985268427887539006701273167649869628,648985268427887539006701273167649869629⟩,⟨239280310227952296787799311610448986036,239280310227952296787799311610448986037⟩⟩, + ⟨⟨3907280134384006109900017612175474589140,3907280134384006109900017612175474589141⟩,⟨7207813383220228132491709248410801754729,7207813383220228132491709248410801754730⟩⟩, + ⟨⟨-38454434938754899455619505539275363720315,-38454434938754899455619505539275363720314⟩,⟨69998553642463835547471153375437298305489,69998553642463835547471153375437298305490⟩⟩, + ⟨⟨-643296940294254549617577485975804863931039,-643296940294254549617577485975804863931038⟩,⟨-88459308983491208244595341667465143113775,-88459308983491208244595341667465143113774⟩⟩, + ⟨⟨-330714422375364843826332625632217064864223,-330714422375364843826332625632217064864222⟩,⟨-4478222723245549645018357615747885059694324,-4478222723245549645018357615747885059694323⟩⟩, + ⟨⟨26539570663425659737692572205140087880483477,26539570663425659737692572205140087880483478⟩,⟨-4413080511777106161510477567293896992861823,-4413080511777106161510477567293896992861822⟩⟩, + ⟨⟨22990455453014682838755666722322250075932550,22990455453014682838755666722322250075932551⟩,⟨140150902251969978831838124237227954137132563,140150902251969978831838124237227954137132564⟩⟩, + ⟨⟨-667886924485505256913568482661001228668924206,-667886924485505256913568482661001228668924205⟩,⟨57828817335220907546509202389639387607385633,57828817335220907546509202389639387607385634⟩⟩, + ⟨⟨141802222077070496067277844120018533026703593,141802222077070496067277844120018533026703594⟩,⟨-2862255617205216400278246908969530313085659165,-2862255617205216400278246908969530313085659164⟩⟩, + ⟨⟨10910964643875497223584198109648724930991920858,10910964643875497223584198109648724930991920859⟩,⟨2601451199322861397588128883437065493825577670,2601451199322861397588128883437065493825577671⟩⟩] +lemma tw1_0_5_19_calc (j : Fin 31) : taylorWaveBox 1 0 5 19 j = tw1_0_5_19 j := by + revert j + decide +kernel +def tw1_0_5_20 : Fin 31 → CI := ![⟨⟨-621188390339833146829036171793707426123979053,-621188390339833146829036171793707426123979052⟩,⟨-1224104483879758436053046459456922299524528935,-1224104483879758436053046459456922299524528934⟩⟩, + ⟨⟨313850585169212783896978398137973985159425239,313850585169212783896978398137973985159425240⟩,⟨-97495292573003436752625790907594318329763944,-97495292573003436752625790907594318329763943⟩⟩, + ⟨⟨13110741210184167667951785450549130221722179,13110741210184167667951785450549130221722180⟩,⟨70532830898592156493055367233326354197525069,70532830898592156493055367233326354197525070⟩⟩, + ⟨⟨-13998940566513102837337464344414940020345754,-13998940566513102837337464344414940020345753⟩,⟨1814014167235051483438515850826088487711570,1814014167235051483438515850826088487711571⟩⟩, + ⟨⟨-372854440257149577958922075432886951402173,-372854440257149577958922075432886951402172⟩,⟨-2442051735398724736749229124404111307387037,-2442051735398724736749229124404111307387036⟩⟩, + ⟨⟨364716687080922381052076603235051492235154,364716687080922381052076603235051492235155⟩,⟨-101661125739513046228958173446204424749784,-101661125739513046228958173446204424749783⟩⟩, + ⟨⟨24688497543778508072470910114471862968515,24688497543778508072470910114471862968516⟩,⟨43404902172898993289275492552080322217064,43404902172898993289275492552080322217065⟩⟩, + ⟨⟨-3344308388876421615123983239842625894459,-3344308388876421615123983239842625894458⟩,⟨4439723114137838676967447453749087174817,4439723114137838676967447453749087174818⟩⟩, + ⟨⟨-511864626890680085109583580499394767476,-511864626890680085109583580499394767475⟩,⟨-11129113879979377148735787829126588511,-11129113879979377148735787829126588510⟩⟩, + ⟨⟨-29924692056203825538080560246669936779,-29924692056203825538080560246669936778⟩,⟨-24057796859463007819677361745799258282,-24057796859463007819677361745799258281⟩⟩, + ⟨⟨-1392780723698799779930772776905567472,-1392780723698799779930772776905567471⟩,⟨-1876371367115441346704360964234834519,-1876371367115441346704360964234834518⟩⟩, + ⟨⟨-95987950862118796117789066457807421,-95987950862118796117789066457807420⟩,⟨-70462003135593139573286679631087782,-70462003135593139573286679631087781⟩⟩, + ⟨⟨-5173395822461064770774536054079777,-5173395822461064770774536054079776⟩,⟨2333425493846563243685412600335814,2333425493846563243685412600335815⟩⟩, + ⟨⟨256436115986995229677421142480877,256436115986995229677421142480878⟩,⟨209153808350682734550864384167156,209153808350682734550864384167157⟩⟩, + ⟨⟨-29108761847716724446667889070585,-29108761847716724446667889070584⟩,⟨-25780841532833268744248616989014,-25780841532833268744248616989013⟩⟩, + ⟨⟨17166717574589274149440374857201,17166717574589274149440374857202⟩,⟨-1,1⟩⟩, + ⟨⟨-29108761847716724446667889070585,-29108761847716724446667889070584⟩,⟨25780841532833268744248616989013,25780841532833268744248616989014⟩⟩, + ⟨⟨256436115986995229677421142480877,256436115986995229677421142480878⟩,⟨-209153808350682734550864384167157,-209153808350682734550864384167156⟩⟩, + ⟨⟨-5173395822461064770774536054079777,-5173395822461064770774536054079776⟩,⟨-2333425493846563243685412600335815,-2333425493846563243685412600335814⟩⟩, + ⟨⟨-95987950862118796117789066457807421,-95987950862118796117789066457807420⟩,⟨70462003135593139573286679631087781,70462003135593139573286679631087782⟩⟩, + ⟨⟨-1392780723698799779930772776905567472,-1392780723698799779930772776905567471⟩,⟨1876371367115441346704360964234834518,1876371367115441346704360964234834519⟩⟩, + ⟨⟨-29924692056203825538080560246669936779,-29924692056203825538080560246669936778⟩,⟨24057796859463007819677361745799258281,24057796859463007819677361745799258282⟩⟩, + ⟨⟨-511864626890680085109583580499394767476,-511864626890680085109583580499394767475⟩,⟨11129113879979377148735787829126588510,11129113879979377148735787829126588511⟩⟩, + ⟨⟨-3344308388876421615123983239842625894459,-3344308388876421615123983239842625894458⟩,⟨-4439723114137838676967447453749087174818,-4439723114137838676967447453749087174817⟩⟩, + ⟨⟨24688497543778508072470910114471862968515,24688497543778508072470910114471862968516⟩,⟨-43404902172898993289275492552080322217065,-43404902172898993289275492552080322217064⟩⟩, + ⟨⟨364716687080922381052076603235051492235154,364716687080922381052076603235051492235155⟩,⟨101661125739513046228958173446204424749783,101661125739513046228958173446204424749784⟩⟩, + ⟨⟨-372854440257149577958922075432886951402173,-372854440257149577958922075432886951402172⟩,⟨2442051735398724736749229124404111307387036,2442051735398724736749229124404111307387037⟩⟩, + ⟨⟨-13998940566513102837337464344414940020345754,-13998940566513102837337464344414940020345753⟩,⟨-1814014167235051483438515850826088487711571,-1814014167235051483438515850826088487711570⟩⟩, + ⟨⟨13110741210184167667951785450549130221722179,13110741210184167667951785450549130221722180⟩,⟨-70532830898592156493055367233326354197525070,-70532830898592156493055367233326354197525069⟩⟩, + ⟨⟨313850585169212783896978398137973985159425239,313850585169212783896978398137973985159425240⟩,⟨97495292573003436752625790907594318329763943,97495292573003436752625790907594318329763944⟩⟩, + ⟨⟨-621188390339833146829036171793707426123979053,-621188390339833146829036171793707426123979052⟩,⟨1224104483879758436053046459456922299524528934,1224104483879758436053046459456922299524528935⟩⟩] +lemma tw1_0_5_20_calc (j : Fin 31) : taylorWaveBox 1 0 5 20 j = tw1_0_5_20 j := by + revert j + decide +kernel +def tw1_0_5 : Fin 21 → Fin 31 → CI := ![tw1_0_5_0,tw1_0_5_1,tw1_0_5_2,tw1_0_5_3,tw1_0_5_4,tw1_0_5_5,tw1_0_5_6,tw1_0_5_7,tw1_0_5_8,tw1_0_5_9,tw1_0_5_10,tw1_0_5_11,tw1_0_5_12,tw1_0_5_13,tw1_0_5_14,tw1_0_5_15,tw1_0_5_16,tw1_0_5_17,tw1_0_5_18,tw1_0_5_19,tw1_0_5_20] +lemma tw1_0_5_mem (l : Fin 21) (j : Fin 31) : (tw1_0_5 l j).Mem (taylorWave 1 0 (nearNode 5) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 5 l j = tw1_0_5 l j := by + fin_cases l + · exact tw1_0_5_0_calc j + · exact tw1_0_5_1_calc j + · exact tw1_0_5_2_calc j + · exact tw1_0_5_3_calc j + · exact tw1_0_5_4_calc j + · exact tw1_0_5_5_calc j + · exact tw1_0_5_6_calc j + · exact tw1_0_5_7_calc j + · exact tw1_0_5_8_calc j + · exact tw1_0_5_9_calc j + · exact tw1_0_5_10_calc j + · exact tw1_0_5_11_calc j + · exact tw1_0_5_12_calc j + · exact tw1_0_5_13_calc j + · exact tw1_0_5_14_calc j + · exact tw1_0_5_15_calc j + · exact tw1_0_5_16_calc j + · exact tw1_0_5_17_calc j + · exact tw1_0_5_18_calc j + · exact tw1_0_5_19_calc j + · exact tw1_0_5_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 5 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave106.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave106.lean new file mode 100644 index 0000000000000000000000000000000000000000..b81f20710db7bcc8e4d610634270bf8b1feeaf01 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave106.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_0_6_0 : Fin 31 → CI := ![⟨⟨1026245324190641739229063708660066984510002690592195520776,1026245324190641739229063708660066984510002690593074362524⟩,⟨53936504925529992247549110558291104241480844888498733343,53936504925529992247549110558291104241480844889376215483⟩⟩, + ⟨⟨-593922947301882098310422110060306087930563396510640317695,-593922947301882098310422110060306087930563396510103660604⟩,⟨679426148686644831958940795182525283742174004324076231218,679426148686644831958940795182525283742174004324611151988⟩⟩, + ⟨⟨-149365967575466059358768445069256012779312210007091353636,-149365967575466059358768445069256012779312210006503356545⟩,⟨-771492213081559550417128852818583492301125046042422325785,-771492213081559550417128852818583492301125046041832853958⟩⟩, + ⟨⟨606096687924322618865461275582828025474619394681443946492,606096687924322618865461275582828025474619394681821396622⟩,⟨303530611962596959728911749988838895927503833952083566355,303530611962596959728911749988838895927503833952461699316⟩⟩, + ⟨⟨-518890419969054096783619291315113393128760316100341892386,-518890419969054096783619291315113393128760316100206300670⟩,⟨255817741477473226606365708107423075084262090168932958024,255817741477473226606365708107423075084262090169067313252⟩⟩, + ⟨⟨88081960684990639578321108737895928384354014569889950451,88081960684990639578321108737895928384354014570111218580⟩,⟨-479814866303302759421393300774232816197424519879701086212,-479814866303302759421393300774232816197424519879479946457⟩⟩, + ⟨⟨279847367183080436492888174150629702098191409738163805656,279847367183080436492888174150629702098191409738365393532⟩,⟨293839735542234458317532582858161187203100980225079774578,293839735542234458317532582858161187203100980225282164157⟩⟩, + ⟨⟨-328749289724538306900388785441194542366694652300486619467,-328749289724538306900388785441194542366694652300360879741⟩,⟨48870852705671485474165605969117297640444148784494844064,48870852705671485474165605969117297640444148784620522210⟩⟩, + ⟨⟨115482830561091631200709047772330807889155726106657113278,115482830561091631200709047772330807889155726106742978777⟩,⟨-241379544095063389319670018008689257427562455659181603118,-241379544095063389319670018008689257427562455659095998306⟩⟩, + ⟨⟨111819309720389677829257052121817049636878900686308437457,111819309720389677829257052121817049636878900686361354504⟩,⟨179453097207778563207373660879090550778746254313217937063,179453097207778563207373660879090550778746254313270902476⟩⟩, + ⟨⟨-163878518349437329221269104286052039659365064111553795705,-163878518349437329221269104286052039659365064111520084058⟩,⟨4313562158988585562502516987602596800536944925948642726,4313562158988585562502516987602596800536944925982392660⟩⟩, + ⟨⟨54876193100903898473066397265156537989650271584611230066,54876193100903898473066397265156537989650271584630688823⟩,⟨-112385520404599634551300642464541725847797007332189979866,-112385520404599634551300642464541725847797007332170521334⟩⟩, + ⟨⟨61451806868236363292676992011318812082086697900206168974,61451806868236363292676992011318812082086697900216930767⟩,⟨72234084612541197710047002886361924107500615911228021000,72234084612541197710047002886361924107500615911238784906⟩⟩, + ⟨⟨-67962830361492725220848564694062276996839600434258730548,-67962830361492725220848564694062276996839600434249655430⟩,⟨27308195812366857949108559081456645182315532916499999610,27308195812366857949108559081456645182315532916509134323⟩⟩, + ⟨⟨-9381018487038815485107909149681247124959934087929506569,-9381018487038815485107909149681247124959934087925007279⟩,⟨-59553775485329304137391103916093306216629662358929136389,-59553775485329304137391103916093306216629662358924585305⟩⟩, + ⟨⟨55969473436616087298577634830125940419638281947652316060,55969473436616087298577634830125940419638281947654150991⟩,⟨-5,6⟩⟩, + ⟨⟨-9381018487038815485107909149681247124959934087929506569,-9381018487038815485107909149681247124959934087925007279⟩,⟨59553775485329304137391103916093306216629662358924585307,59553775485329304137391103916093306216629662358929136390⟩⟩, + ⟨⟨-67962830361492725220848564694062276996839600434258730547,-67962830361492725220848564694062276996839600434249655429⟩,⟨-27308195812366857949108559081456645182315532916509134323,-27308195812366857949108559081456645182315532916499999609⟩⟩, + ⟨⟨61451806868236363292676992011318812082086697900206168975,61451806868236363292676992011318812082086697900216930768⟩,⟨-72234084612541197710047002886361924107500615911238784904,-72234084612541197710047002886361924107500615911228020999⟩⟩, + ⟨⟨54876193100903898473066397265156537989650271584611230066,54876193100903898473066397265156537989650271584630688823⟩,⟨112385520404599634551300642464541725847797007332170521335,112385520404599634551300642464541725847797007332189979867⟩⟩, + ⟨⟨-163878518349437329221269104286052039659365064111553795703,-163878518349437329221269104286052039659365064111520084056⟩,⟨-4313562158988585562502516987602596800536944925982392661,-4313562158988585562502516987602596800536944925948642727⟩⟩, + ⟨⟨111819309720389677829257052121817049636878900686308437461,111819309720389677829257052121817049636878900686361354506⟩,⟨-179453097207778563207373660879090550778746254313270902474,-179453097207778563207373660879090550778746254313217937062⟩⟩, + ⟨⟨115482830561091631200709047772330807889155726106657113276,115482830561091631200709047772330807889155726106742978779⟩,⟨241379544095063389319670018008689257427562455659095998304,241379544095063389319670018008689257427562455659181603121⟩⟩, + ⟨⟨-328749289724538306900388785441194542366694652300486619466,-328749289724538306900388785441194542366694652300360879735⟩,⟨-48870852705671485474165605969117297640444148784620522217,-48870852705671485474165605969117297640444148784494844065⟩⟩, + ⟨⟨279847367183080436492888174150629702098191409738163805660,279847367183080436492888174150629702098191409738365393536⟩,⟨-293839735542234458317532582858161187203100980225282164157,-293839735542234458317532582858161187203100980225079774578⟩⟩, + ⟨⟨88081960684990639578321108737895928384354014569889950450,88081960684990639578321108737895928384354014570111218582⟩,⟨479814866303302759421393300774232816197424519879479946453,479814866303302759421393300774232816197424519879701086212⟩⟩, + ⟨⟨-518890419969054096783619291315113393128760316100341892381,-518890419969054096783619291315113393128760316100206300669⟩,⟨-255817741477473226606365708107423075084262090169067313255,-255817741477473226606365708107423075084262090168932958031⟩⟩, + ⟨⟨606096687924322618865461275582828025474619394681443946499,606096687924322618865461275582828025474619394681821396624⟩,⟨-303530611962596959728911749988838895927503833952461699313,-303530611962596959728911749988838895927503833952083566357⟩⟩, + ⟨⟨-149365967575466059358768445069256012779312210007091353636,-149365967575466059358768445069256012779312210006503356545⟩,⟨771492213081559550417128852818583492301125046041832853952,771492213081559550417128852818583492301125046042422325779⟩⟩, + ⟨⟨-593922947301882098310422110060306087930563396510640317689,-593922947301882098310422110060306087930563396510103660598⟩,⟨-679426148686644831958940795182525283742174004324611151992,-679426148686644831958940795182525283742174004324076231222⟩⟩, + ⟨⟨1026245324190641739229063708660066984510002690592195520776,1026245324190641739229063708660066984510002690593074362531⟩,⟨-53936504925529992247549110558291104241480844889376215488,-53936504925529992247549110558291104241480844888498733335⟩⟩] +lemma tw1_0_6_0_calc (j : Fin 31) : taylorWaveBox 1 0 6 0 j = tw1_0_6_0 j := by + revert j + decide +kernel +def tw1_0_6_1 : Fin 31 → CI := ![⟨⟨-167867838185447853699849742631709330884193616491279253428,-167867838185447853699849742631709330884193616490449565740⟩,⟨-906864427191789151592693337521092064591048369591643149884,-906864427191789151592693337521092064591048369590812235797⟩⟩, + ⟨⟨677774686076702701619568197747634031160360538711055448914,677774686076702701619568197747634031160360538711526987405⟩,⟨341443830408390706221333292947693457264128357383880480831,341443830408390706221333292947693457264128357384353499727⟩⟩, + ⟨⟨-552203633347977216221397124922711081639153409700958404095,-552203633347977216221397124922711081639153409700478875054⟩,⟨274547827994739491449459080123643211692407999601685205524,274547827994739491449459080123643211692407999602163661851⟩⟩, + ⟨⟨84963748897080350164423964717114256688468085735410758265,84963748897080350164423964717114256688468085735693596876⟩,⟨-486706614300566696543945980577699280080522085178049521408,-486706614300566696543945980577699280080522085177767148335⟩⟩, + ⟨⟨272387757465437806361098167748261735665697698532390579478,272387757465437806361098167748261735665697698532482851639⟩,⟨278487687983353809420123844909515603071164656858395380713,278487687983353809420123844909515603071164656858488306091⟩⟩, + ⟨⟨-297592816607084324681115580386562268713716801872990091607,-297592816607084324681115580386562268713716801872855160489⟩,⟨49248183085265432626242047252910968472195305765358755985,49248183085265432626242047252910968472195305765493765304⟩⟩, + ⟨⟨95243030227454513100693106161050818801916518519794486832,95243030227454513100693106161050818801916518519902527863⟩,⟨-208069389112285244004591093459526404151879163535720000514,-208069389112285244004591093459526404151879163535612225339⟩⟩, + ⟨⟨91598617910662048864126837622491702670991827486295719507,91598617910662048864126837622491702670991827486353926967⟩,⟨142771379725305061199677807481275092763069592142855655971,142771379725305061199677807481275092763069592142913861541⟩⟩, + ⟨⟨-122486915940271520132835860884064647707522940216735152085,-122486915940271520132835860884064647707522940216702370635⟩,⟨3524782298072122585839996509079246694547949169677012472,3524782298072122585839996509079246694547949169709818050⟩⟩, + ⟨⟨39221566520406376732962480903987738829231951462398764269,39221566520406376732962480903987738829231951462416236655⟩,⟨-76616871228688141350509110478009467976769034868637706706,-76616871228688141350509110478009467976769034868620219252⟩⟩, + ⟨⟨35577400991247928380139222307155072119873259217586021751,35577400991247928380139222307155072119873259217598376183⟩,⟨46766898295494980109140584212361377734576561497473844049,46766898295494980109140584212361377734576561497486209619⟩⟩, + ⟨⟨-37646541175218751394041738334439900037912096059562654009,-37646541175218751394041738334439900037912096059554743284⟩,⟨10767698343917469234681750343916438030169845458296903864,10767698343917469234681750343916438030169845458304809538⟩⟩, + ⟨⟨-263210247274513151509655388168533833268626568733684909,-263210247274513151509655388168533833268626568730107368⟩,⟨-25854034915340094547887455144478268554127484840396875374,-25854034915340094547887455144478268554127484840393294122⟩⟩, + ⟨⟨17411554770089855266063919420125444858194448596738703863,17411554770089855266063919420125444858194448596740495600⟩,⟨2188419235421222199544674626520539765677244751321079265,2188419235421222199544674626520539765677244751322872445⟩⟩, + ⟨⟨-1499942296570189226874253114994411036607102660195448206,-1499942296570189226874253114994411036607102660194369463⟩,⟨13018679103180712124049370300853760430505280890255790944,13018679103180712124049370300853760430505280890256873657⟩⟩, + ⟨⟨-11722219104917478535469920758283177698697417663981428905,-11722219104917478535469920758283177698697417663981007284⟩,⟨-2,2⟩⟩, + ⟨⟨-1499942296570189226874253114994411036607102660195448206,-1499942296570189226874253114994411036607102660194369463⟩,⟨-13018679103180712124049370300853760430505280890256873657,-13018679103180712124049370300853760430505280890255790944⟩⟩, + ⟨⟨17411554770089855266063919420125444858194448596738703863,17411554770089855266063919420125444858194448596740495600⟩,⟨-2188419235421222199544674626520539765677244751322872444,-2188419235421222199544674626520539765677244751321079264⟩⟩, + ⟨⟨-263210247274513151509655388168533833268626568733684909,-263210247274513151509655388168533833268626568730107369⟩,⟨25854034915340094547887455144478268554127484840393294122,25854034915340094547887455144478268554127484840396875374⟩⟩, + ⟨⟨-37646541175218751394041738334439900037912096059562654009,-37646541175218751394041738334439900037912096059554743284⟩,⟨-10767698343917469234681750343916438030169845458304809538,-10767698343917469234681750343916438030169845458296903864⟩⟩, + ⟨⟨35577400991247928380139222307155072119873259217586021751,35577400991247928380139222307155072119873259217598376183⟩,⟨-46766898295494980109140584212361377734576561497486209618,-46766898295494980109140584212361377734576561497473844048⟩⟩, + ⟨⟨39221566520406376732962480903987738829231951462398764268,39221566520406376732962480903987738829231951462416236654⟩,⟨76616871228688141350509110478009467976769034868620219253,76616871228688141350509110478009467976769034868637706707⟩⟩, + ⟨⟨-122486915940271520132835860884064647707522940216735152086,-122486915940271520132835860884064647707522940216702370635⟩,⟨-3524782298072122585839996509079246694547949169709818051,-3524782298072122585839996509079246694547949169677012471⟩⟩, + ⟨⟨91598617910662048864126837622491702670991827486295719507,91598617910662048864126837622491702670991827486353926969⟩,⟨-142771379725305061199677807481275092763069592142913861539,-142771379725305061199677807481275092763069592142855655967⟩⟩, + ⟨⟨95243030227454513100693106161050818801916518519794486831,95243030227454513100693106161050818801916518519902527862⟩,⟨208069389112285244004591093459526404151879163535612225341,208069389112285244004591093459526404151879163535720000517⟩⟩, + ⟨⟨-297592816607084324681115580386562268713716801872990091607,-297592816607084324681115580386562268713716801872855160487⟩,⟨-49248183085265432626242047252910968472195305765493765304,-49248183085265432626242047252910968472195305765358755983⟩⟩, + ⟨⟨272387757465437806361098167748261735665697698532390579483,272387757465437806361098167748261735665697698532482851641⟩,⟨-278487687983353809420123844909515603071164656858488306087,-278487687983353809420123844909515603071164656858395380711⟩⟩, + ⟨⟨84963748897080350164423964717114256688468085735410758266,84963748897080350164423964717114256688468085735693596873⟩,⟨486706614300566696543945980577699280080522085177767148340,486706614300566696543945980577699280080522085178049521410⟩⟩, + ⟨⟨-552203633347977216221397124922711081639153409700958404091,-552203633347977216221397124922711081639153409700478875049⟩,⟨-274547827994739491449459080123643211692407999602163661849,-274547827994739491449459080123643211692407999601685205522⟩⟩, + ⟨⟨677774686076702701619568197747634031160360538711055448916,677774686076702701619568197747634031160360538711526987407⟩,⟨-341443830408390706221333292947693457264128357384353499721,-341443830408390706221333292947693457264128357383880480825⟩⟩, + ⟨⟨-167867838185447853699849742631709330884193616491279253435,-167867838185447853699849742631709330884193616490449565737⟩,⟨906864427191789151592693337521092064591048369590812235796,906864427191789151592693337521092064591048369591643149891⟩⟩] +lemma tw1_0_6_1_calc (j : Fin 31) : taylorWaveBox 1 0 6 1 j = tw1_0_6_1 j := by + revert j + decide +kernel +def tw1_0_6_2 : Fin 31 → CI := ![⟨⟨-567172761278221661087724919119194332760180344244157149034,-567172761278221661087724919119194332760180344243599318837⟩,⟨252319174283674358191266430376112884273768643299368603309,252319174283674358191266430376112884273768643299925785681⟩⟩, + ⟨⟨102111568065279469747113748508588795940036506873181162158,102111568065279469747113748508588795940036506873475192476⟩,⟨-467662866516058049803661220373729829813790349331078156929,-467662866516058049803661220373729829813790349330784845340⟩⟩, + ⟨⟨242472259353565972822036943156342178450829482931276335024,242472259353565972822036943156342178450829482931548328630⟩,⟨270101703186061845160872962292173583740800922129388199627,270101703186061845160872962292173583740800922129660604283⟩⟩, + ⟨⟨-268185061791195999263468062730050163462298698212986520927,-268185061791195999263468062730050163462298698212840532869⟩,⟨31964781304258479251230133430642516107507893588378217816,31964781304258479251230133430642516107507893588524366809⟩⟩, + ⟨⟨90877925854283827575116769634763403973993586994786722328,90877925854283827575116769634763403973993586994830227320⟩,⟨-174481482006316036332927529792232952358827735137741942326,-174481482006316036332927529792232952358827735137698561319⟩⟩, + ⟨⟨68234343957267064589274162221696139862919478846531220104,68234343957267064589274162221696139862919478846586031226⟩,⟨122113475492766296226309561281831295292504374849193920973,122113475492766296226309561281831295292504374849248708781⟩⟩, + ⟨⟨-96669398237419014803710560059367372882350454174228905824,-96669398237419014803710560059367372882350454174192070143⟩,⟨-4718387294921642389228729717183407485924248358522054902,-4718387294921642389228729717183407485924248358485241200⟩⟩, + ⟨⟨35448335821077297333158426152911128907022523183044303629,35448335821077297333158426152911128907022523183064750073⟩,⟨-54400425340740895373240589728916271445812221631641119462,-54400425340740895373240589728916271445812221631620659251⟩⟩, + ⟨⟨20316783252995365020693684692142078805539983776564546086,20316783252995365020693684692142078805539983776577369364⟩,⟨36857828032340786390926743060711255189896142952456516600,36857828032340786390926743060711255189896142952469375416⟩⟩, + ⟨⟨-26219159244896424814199362491060319091773823587830037089,-26219159244896424814199362491060319091773823587822871353⟩,⟨1766767886088087810368616161545983162813142453255074018,1766767886088087810368616161545983162813142453262228368⟩⟩, + ⟨⟨4614469373125256580680991754674032575681940944045331110,4614469373125256580680991754674032575681940944049171993⟩,⟨-15107912038310035954225773102571329489987940745751638601,-15107912038310035954225773102571329489987940745747803215⟩⟩, + ⟨⟨7792822749085650316593429999633153476808076364697131955,7792822749085650316593429999633153476808076364698822502⟩,⟨4879174854285722035957481543480916123100694767585680678,4879174854285722035957481543480916123100694767587371445⟩⟩, + ⟨⟨-3342940287527577371246993215909458217213828861337633521,-3342940287527577371246993215909458217213828861336880275⟩,⟨4095596448583787792695296937429179898950899552620890747,4095596448583787792695296937429179898950899552621644141⟩⟩, + ⟨⟨-2544025022304144317234841058530185648396966658021890897,-2544025022304144317234841058530185648396966658021466462⟩,⟨-1863200882795656603634396812023653482955041798801914311,-1863200882795656603634396812023653482955041798801492748⟩⟩, + ⟨⟨803657421513390512275573465841908489397137717358398195,803657421513390512275573465841908489397137717358582512⟩,⟨-1979522002337086521913938654238091189703031802743378464,-1979522002337086521913938654238091189703031802743194886⟩⟩, + ⟨⟨1841321871188933615308772572559378531092389603318259444,1841321871188933615308772572559378531092389603318331534⟩,⟨-1,1⟩⟩, + ⟨⟨803657421513390512275573465841908489397137717358398195,803657421513390512275573465841908489397137717358582512⟩,⟨1979522002337086521913938654238091189703031802743194886,1979522002337086521913938654238091189703031802743378464⟩⟩, + ⟨⟨-2544025022304144317234841058530185648396966658021890897,-2544025022304144317234841058530185648396966658021466462⟩,⟨1863200882795656603634396812023653482955041798801492749,1863200882795656603634396812023653482955041798801914311⟩⟩, + ⟨⟨-3342940287527577371246993215909458217213828861337633521,-3342940287527577371246993215909458217213828861336880275⟩,⟨-4095596448583787792695296937429179898950899552621644141,-4095596448583787792695296937429179898950899552620890747⟩⟩, + ⟨⟨7792822749085650316593429999633153476808076364697131955,7792822749085650316593429999633153476808076364698822502⟩,⟨-4879174854285722035957481543480916123100694767587371445,-4879174854285722035957481543480916123100694767585680678⟩⟩, + ⟨⟨4614469373125256580680991754674032575681940944045331110,4614469373125256580680991754674032575681940944049171993⟩,⟨15107912038310035954225773102571329489987940745747803215,15107912038310035954225773102571329489987940745751638601⟩⟩, + ⟨⟨-26219159244896424814199362491060319091773823587830037089,-26219159244896424814199362491060319091773823587822871353⟩,⟨-1766767886088087810368616161545983162813142453262228368,-1766767886088087810368616161545983162813142453255074019⟩⟩, + ⟨⟨20316783252995365020693684692142078805539983776564546085,20316783252995365020693684692142078805539983776577369364⟩,⟨-36857828032340786390926743060711255189896142952469375416,-36857828032340786390926743060711255189896142952456516600⟩⟩, + ⟨⟨35448335821077297333158426152911128907022523183044303628,35448335821077297333158426152911128907022523183064750072⟩,⟨54400425340740895373240589728916271445812221631620659251,54400425340740895373240589728916271445812221631641119463⟩⟩, + ⟨⟨-96669398237419014803710560059367372882350454174228905825,-96669398237419014803710560059367372882350454174192070144⟩,⟨4718387294921642389228729717183407485924248358485241200,4718387294921642389228729717183407485924248358522054902⟩⟩, + ⟨⟨68234343957267064589274162221696139862919478846531220103,68234343957267064589274162221696139862919478846586031226⟩,⟨-122113475492766296226309561281831295292504374849248708781,-122113475492766296226309561281831295292504374849193920972⟩⟩, + ⟨⟨90877925854283827575116769634763403973993586994786722327,90877925854283827575116769634763403973993586994830227317⟩,⟨174481482006316036332927529792232952358827735137698561321,174481482006316036332927529792232952358827735137741942326⟩⟩, + ⟨⟨-268185061791195999263468062730050163462298698212986520928,-268185061791195999263468062730050163462298698212840532872⟩,⟨-31964781304258479251230133430642516107507893588524366809,-31964781304258479251230133430642516107507893588378217818⟩⟩, + ⟨⟨242472259353565972822036943156342178450829482931276335023,242472259353565972822036943156342178450829482931548328628⟩,⟨-270101703186061845160872962292173583740800922129660604280,-270101703186061845160872962292173583740800922129388199625⟩⟩, + ⟨⟨102111568065279469747113748508588795940036506873181162154,102111568065279469747113748508588795940036506873475192473⟩,⟨467662866516058049803661220373729829813790349330784845340,467662866516058049803661220373729829813790349331078156930⟩⟩, + ⟨⟨-567172761278221661087724919119194332760180344244157149038,-567172761278221661087724919119194332760180344243599318835⟩,⟨-252319174283674358191266430376112884273768643299925785685,-252319174283674358191266430376112884273768643299368603308⟩⟩] +lemma tw1_0_6_2_calc (j : Fin 31) : taylorWaveBox 1 0 6 2 j = tw1_0_6_2 j := by + revert j + decide +kernel +def tw1_0_6_3 : Fin 31 → CI := ![⟨⟨203387041920821622838356289869054752832135052604121435805,203387041920821622838356289869054752832135052604404953015⟩,⟨265263600786405758058182658798491557193882811162205257411,265263600786405758058182658798491557193882811162488954316⟩⟩, + ⟨⟨-241374908763775411566329142881852080361319259534157430187,-241374908763775411566329142881852080361319259534020255930⟩,⟨8867123152967842165860826598850088811727639276179189714,8867123152967842165860826598850088811727639276316533965⟩⟩, + ⟨⟨92098302184492898442513980926695224064806597796836682899,92098302184492898442513980926695224064806597796951418715⟩,⟨-143972402090259849191563248099251719796288274945771997870,-143972402090259849191563248099251719796288274945657296893⟩⟩, + ⟨⟨47090505079571552020250370876508210355519814616438580616,47090505079571552020250370876508210355519814616493748422⟩,⟨108320283105336968679599520188448351558179915270479134496,108320283105336968679599520188448351558179915270534294752⟩⟩, + ⟨⟨-78416136554419881791493983431618532898300643968346811384,-78416136554419881791493983431618532898300643968331807257⟩,⟨-12968628835551647941131629932477141915128695921629418677,-12968628835551647941131629932477141915128695921614473740⟩⟩, + ⟨⟨34051063620096766796043732538635685708650320617634364212,34051063620096766796043732538635685708650320617654753666⟩,⟨-39163511200347819762708411004662623386914895266365652388,-39163511200347819762708411004662623386914895266345264531⟩⟩, + ⟨⟨10665509766933142475091988673521792572386808814936509266,10665509766933142475091988673521792572386808814951714385⟩,⟨30962517167462858358199251186454451386413773115647607300,30962517167462858358199251186454451386413773115662871732⟩⟩, + ⟨⟨-19646033842799802524418873969941087458725886335481970669,-19646033842799802524418873969941087458725886335474135752⟩,⟨-3062883726781877239686017084305344524874376232555041590,-3062883726781877239686017084305344524874376232547211921⟩⟩, + ⟨⟨6452984079687481570621413834692348137869936517285293854,6452984079687481570621413834692348137869936517289318754⟩,⟨-9596017927450495487856468681864211722626146693962234017,-9596017927450495487856468681864211722626146693958221528⟩⟩, + ⟨⟨3664827723451547773257539253397341952814501164095450473,3664827723451547773257539253397341952814501164097217103⟩,⟨5269309270676526372377231264716069958330895933332578905,5269309270676526372377231264716069958330895933334346785⟩⟩, + ⟨⟨-3216699405014994396621290530758598748144526507326113836,-3216699405014994396621290530758598748144526507325443872⟩,⟨1093139380890679616632832456881471074455352687644265483,1093139380890679616632832456881471074455352687644935612⟩⟩, + ⟨⟨-298013660067792526762585241797019413558069393128445632,-298013660067792526762585241797019413558069393128063202⟩,⟨-1701218515079047221895761643338422618210625176348612907,-1701218515079047221895761643338422618210625176348230280⟩⟩, + ⟨⟨848976123112082029878968337835264869438714268085341430,848976123112082029878968337835264869438714268085475987⟩,⟨-164595940308038063672667362539447860525912887678261499,-164595940308038063672667362539447860525912887678127049⟩⟩, + ⟨⟨189615652701375672140918389594852399839735316075997980,189615652701375672140918389594852399839735316076065790⟩,⟨411743179791432079534624592366940985661957922243294662,411743179791432079534624592366940985661957922243362084⟩⟩, + ⟨⟨-170088923170081434387535167786236034316187183130526883,-170088923170081434387535167786236034316187183130502720⟩,⟨220701135079468791697755455317092673662550786978558229,220701135079468791697755455317092673662550786978582108⟩⟩, + ⟨⟨-231387330536854616408775347493354143943307038697101078,-231387330536854616408775347493354143943307038697091282⟩,⟨-1,1⟩⟩, + ⟨⟨-170088923170081434387535167786236034316187183130526883,-170088923170081434387535167786236034316187183130502720⟩,⟨-220701135079468791697755455317092673662550786978582108,-220701135079468791697755455317092673662550786978558229⟩⟩, + ⟨⟨189615652701375672140918389594852399839735316075997980,189615652701375672140918389594852399839735316076065790⟩,⟨-411743179791432079534624592366940985661957922243362084,-411743179791432079534624592366940985661957922243294662⟩⟩, + ⟨⟨848976123112082029878968337835264869438714268085341430,848976123112082029878968337835264869438714268085475987⟩,⟨164595940308038063672667362539447860525912887678127049,164595940308038063672667362539447860525912887678261499⟩⟩, + ⟨⟨-298013660067792526762585241797019413558069393128445632,-298013660067792526762585241797019413558069393128063202⟩,⟨1701218515079047221895761643338422618210625176348230280,1701218515079047221895761643338422618210625176348612907⟩⟩, + ⟨⟨-3216699405014994396621290530758598748144526507326113836,-3216699405014994396621290530758598748144526507325443872⟩,⟨-1093139380890679616632832456881471074455352687644935612,-1093139380890679616632832456881471074455352687644265483⟩⟩, + ⟨⟨3664827723451547773257539253397341952814501164095450473,3664827723451547773257539253397341952814501164097217103⟩,⟨-5269309270676526372377231264716069958330895933334346785,-5269309270676526372377231264716069958330895933332578905⟩⟩, + ⟨⟨6452984079687481570621413834692348137869936517285293854,6452984079687481570621413834692348137869936517289318754⟩,⟨9596017927450495487856468681864211722626146693958221528,9596017927450495487856468681864211722626146693962234017⟩⟩, + ⟨⟨-19646033842799802524418873969941087458725886335481970669,-19646033842799802524418873969941087458725886335474135752⟩,⟨3062883726781877239686017084305344524874376232547211921,3062883726781877239686017084305344524874376232555041590⟩⟩, + ⟨⟨10665509766933142475091988673521792572386808814936509266,10665509766933142475091988673521792572386808814951714385⟩,⟨-30962517167462858358199251186454451386413773115662871733,-30962517167462858358199251186454451386413773115647607300⟩⟩, + ⟨⟨34051063620096766796043732538635685708650320617634364212,34051063620096766796043732538635685708650320617654753667⟩,⟨39163511200347819762708411004662623386914895266345264530,39163511200347819762708411004662623386914895266365652388⟩⟩, + ⟨⟨-78416136554419881791493983431618532898300643968346811384,-78416136554419881791493983431618532898300643968331807257⟩,⟨12968628835551647941131629932477141915128695921614473739,12968628835551647941131629932477141915128695921629418676⟩⟩, + ⟨⟨47090505079571552020250370876508210355519814616438580616,47090505079571552020250370876508210355519814616493748422⟩,⟨-108320283105336968679599520188448351558179915270534294752,-108320283105336968679599520188448351558179915270479134497⟩⟩, + ⟨⟨92098302184492898442513980926695224064806597796836682898,92098302184492898442513980926695224064806597796951418714⟩,⟨143972402090259849191563248099251719796288274945657296892,143972402090259849191563248099251719796288274945771997869⟩⟩, + ⟨⟨-241374908763775411566329142881852080361319259534157430187,-241374908763775411566329142881852080361319259534020255930⟩,⟨-8867123152967842165860826598850088811727639276316533966,-8867123152967842165860826598850088811727639276179189716⟩⟩, + ⟨⟨203387041920821622838356289869054752832135052604121435805,203387041920821622838356289869054752832135052604404953017⟩,⟨-265263600786405758058182658798491557193882811162488954318,-265263600786405758058182658798491557193882811162205257409⟩⟩] +lemma tw1_0_6_3_calc (j : Fin 31) : taylorWaveBox 1 0 6 3 j = tw1_0_6_3 j := by + revert j + decide +kernel +def tw1_0_6_4 : Fin 31 → CI := ![⟨⟨94444439261004586820966335364835098939521315506014202908,94444439261004586820966335364835098939521315506127369733⟩,⟨-116522677751763339907709707934616863062623777213352140733,-116522677751763339907709707934616863062623777213238956213⟩⟩, + ⟨⟨28887799535752006369859504695942761551868034744341230624,28887799535752006369859504695942761551868034744390976317⟩,⟨97369797792810602133757757936046231419831489982709000091,97369797792810602133757757936046231419831489982758778376⟩⟩, + ⟨⟨-64088348035434206045528257499737761605459709094803645613,-64088348035434206045528257499737761605459709094763299126⟩,⟨-19750648495800684876358849285653061503362915046517950375,-19750648495800684876358849285653061503362915046477664106⟩⟩, + ⟨⟨32879605577216529727233736757342112571281655211778094558,32879605577216529727233736757342112571281655211799557224⟩,⟨-27780960722595866071494482198313322563705929879941334326,-27780960722595866071494482198313322563705929879919898096⟩⟩, + ⟨⟨4062055285501985380336547116279688459279079208183959299,4062055285501985380336547116279688459279079208190324814⟩,⟨26449434077978717499422017257107824491574683118015138487,26449434077978717499422017257107824491574683118021560424⟩⟩, + ⟨⟨-14958022661989590548139813952435039412767621584677133941,-14958022661989590548139813952435039412767621584669555629⟩,⟨-5803859597085993180088392498864894643262773128240325857,-5803859597085993180088392498864894643262773128232743823⟩⟩, + ⟨⟨6989078468142852535396104148581782119454419322409306719,6989078468142852535396104148581782119454419322414146582⟩,⟨-6034611143213918015258857206080445568904874841818190768,-6034611143213918015258857206080445568904874841813370371⟩⟩, + ⟨⟨1344562444582568039677542463136156384774900664685260670,1344562444582568039677542463136156384774900664687358805⟩,⟨4892584107363130913004162951020821151442629749220474022,4892584107363130913004162951020821151442629749222572861⟩⟩, + ⟨⟨-2629712838284093676006028023151211296024834025883674686,-2629712838284093676006028023151211296024834025882819181⟩,⟨-309075238155617098396455038274207036849686966111556738,-309075238155617098396455038274207036849686966110700003⟩⟩, + ⟨⟨535888099036078512878591870008552658537116427228939009,535888099036078512878591870008552658537116427229266918⟩,⟨-1191433879400976046639295240341616253749060858654470077,-1191433879400976046639295240341616253749060858654141900⟩⟩, + ⟨⟨495842652151348375875075812337126476750312387831511389,495842652151348375875075812337126476750312387831677339⟩,⟨353376675591923634530719227452538028873219081482538260,353376675591923634530719227452538028873219081482704460⟩⟩, + ⟨⟨-166737845055508407806446183390808614333412369938807946,-166737845055508407806446183390808614333412369938746517⟩,⟨212826650198123237229004142632008721457398054123058937,212826650198123237229004142632008721457398054123120354⟩⟩, + ⟨⟨-103268277183691928986252038997056722442207392105987142,-103268277183691928986252038997056722442207392105965289⟩,⟨-56850696532864915700229235035777981800812028869470610,-56850696532864915700229235035777981800812028869448765⟩⟩, + ⟨⟨4097742482229048829799011512040455293922713244499845,4097742482229048829799011512040455293922713244507356⟩,⟨-54149036469805767236486081370045938165195598096796055,-54149036469805767236486081370045938165195598096788552⟩⟩, + ⟨⟨24231606166313365982920688193235981828266104799485091,24231606166313365982920688193235981828266104799487806⟩,⟨-18164082602670271769316644446851670955527838253841741,-18164082602670271769316644446851670955527838253839071⟩⟩, + ⟨⟨24230824591611189721849981880240198030611204584742051,24230824591611189721849981880240198030611204584743155⟩,⟨-1,1⟩⟩, + ⟨⟨24231606166313365982920688193235981828266104799485091,24231606166313365982920688193235981828266104799487806⟩,⟨18164082602670271769316644446851670955527838253839071,18164082602670271769316644446851670955527838253841741⟩⟩, + ⟨⟨4097742482229048829799011512040455293922713244499845,4097742482229048829799011512040455293922713244507356⟩,⟨54149036469805767236486081370045938165195598096788552,54149036469805767236486081370045938165195598096796055⟩⟩, + ⟨⟨-103268277183691928986252038997056722442207392105987142,-103268277183691928986252038997056722442207392105965289⟩,⟨56850696532864915700229235035777981800812028869448765,56850696532864915700229235035777981800812028869470610⟩⟩, + ⟨⟨-166737845055508407806446183390808614333412369938807946,-166737845055508407806446183390808614333412369938746517⟩,⟨-212826650198123237229004142632008721457398054123120354,-212826650198123237229004142632008721457398054123058937⟩⟩, + ⟨⟨495842652151348375875075812337126476750312387831511389,495842652151348375875075812337126476750312387831677339⟩,⟨-353376675591923634530719227452538028873219081482704460,-353376675591923634530719227452538028873219081482538260⟩⟩, + ⟨⟨535888099036078512878591870008552658537116427228939009,535888099036078512878591870008552658537116427229266918⟩,⟨1191433879400976046639295240341616253749060858654141900,1191433879400976046639295240341616253749060858654470077⟩⟩, + ⟨⟨-2629712838284093676006028023151211296024834025883674686,-2629712838284093676006028023151211296024834025882819181⟩,⟨309075238155617098396455038274207036849686966110700003,309075238155617098396455038274207036849686966111556738⟩⟩, + ⟨⟨1344562444582568039677542463136156384774900664685260670,1344562444582568039677542463136156384774900664687358805⟩,⟨-4892584107363130913004162951020821151442629749222572861,-4892584107363130913004162951020821151442629749220474022⟩⟩, + ⟨⟨6989078468142852535396104148581782119454419322409306719,6989078468142852535396104148581782119454419322414146582⟩,⟨6034611143213918015258857206080445568904874841813370371,6034611143213918015258857206080445568904874841818190768⟩⟩, + ⟨⟨-14958022661989590548139813952435039412767621584677133941,-14958022661989590548139813952435039412767621584669555628⟩,⟨5803859597085993180088392498864894643262773128232743823,5803859597085993180088392498864894643262773128240325857⟩⟩, + ⟨⟨4062055285501985380336547116279688459279079208183959299,4062055285501985380336547116279688459279079208190324814⟩,⟨-26449434077978717499422017257107824491574683118021560424,-26449434077978717499422017257107824491574683118015138487⟩⟩, + ⟨⟨32879605577216529727233736757342112571281655211778094558,32879605577216529727233736757342112571281655211799557224⟩,⟨27780960722595866071494482198313322563705929879919898096,27780960722595866071494482198313322563705929879941334326⟩⟩, + ⟨⟨-64088348035434206045528257499737761605459709094803645613,-64088348035434206045528257499737761605459709094763299125⟩,⟨19750648495800684876358849285653061503362915046477664105,19750648495800684876358849285653061503362915046517950375⟩⟩, + ⟨⟨28887799535752006369859504695942761551868034744341230625,28887799535752006369859504695942761551868034744390976318⟩,⟨-97369797792810602133757757936046231419831489982758778375,-97369797792810602133757757936046231419831489982709000091⟩⟩, + ⟨⟨94444439261004586820966335364835098939521315506014202907,94444439261004586820966335364835098939521315506127369734⟩,⟨116522677751763339907709707934616863062623777213238956213,116522677751763339907709707934616863062623777213352140734⟩⟩] +lemma tw1_0_6_4_calc (j : Fin 31) : taylorWaveBox 1 0 6 4 j = tw1_0_6_4 j := by + revert j + decide +kernel +def tw1_0_6_5 : Fin 31 → CI := ![⟨⟨-52056692616035431210068377464934130398031361150286452160,-52056692616035431210068377464934130398031361150244868635⟩,⟨-24863086587905633107516644925105001982265350659147340664,-24863086587905633107516644925105001982265350659105805461⟩⟩, + ⟨⟨31395508446858960453665061723989303059804104772778183081,31395508446858960453665061723989303059804104772798284049⟩,⟨-18823636923311165305195931891612986173814136388460721962,-18823636923311165305195931891612986173814136388440675923⟩⟩, + ⟨⟨-649271894498167140532953989948695896755845778075601644,-649271894498167140532953989948695896755845778059203500⟩,⟨22545935363330854850020788829188479129385674037100551244,22545935363330854850020788829188479129385674037116991817⟩⟩, + ⟨⟨-11263310506292171394358162868632865560362246943637428043,-11263310506292171394358162868632865560362246943629593550⟩,⟨-7343941780912506001411983246367434883661418330856582614,-7343941780912506001411983246367434883661418330848733912⟩⟩, + ⟨⟨6889571926544198891190292908690776535904648771111444965,6889571926544198891190292908690776535904648771113553302⟩,⟨-3488179408928909341623560780458333713634873943525523973,-3488179408928909341623560780458333713634873943523433836⟩⟩, + ⟨⟨-104463301119282769460636232139413375094859172517773058,-104463301119282769460636232139413375094859172515625067⟩,⟨4250478148356988184645279617170776166434497009133975955,4250478148356988184645279617170776166434497009136122733⟩⟩, + ⟨⟨-1981501790224573215314556416909016364013006378355891173,-1981501790224573215314556416909016364013006378354746053⟩,⟨-1026680111211672279001295955258556675782651214621220007,-1026680111211672279001295955258556675782651214620071857⟩⟩, + ⟨⟨855217518385726358398761348906766300260731621720839463,855217518385726358398761348906766300260731621721254288⟩,⟨-707352084326115173387670566342269066180087962344751020,-707352084326115173387670566342269066180087962344336110⟩⟩, + ⟨⟨182098666972390830039796246523637719465594563012693645,182098666972390830039796246523637719465594563012861645⟩,⟨486714002602974900400608572309693926013453394413015846,486714002602974900400608572309693926013453394413184118⟩⟩, + ⟨⟨-226339294848136205929608790321121326595143957414474429,-226339294848136205929608790321121326595143957414399346⟩,⟨26774182789548219323979802440720199533655030377966039,26774182789548219323979802440720199533655030378041027⟩⟩, + ⟨⟨-452543175069085647745176467594411260453336354808136,-452543175069085647745176467594411260453336354781825⟩,⟨-93533922313001840724985630155766702536913015598514941,-93533922313001840724985630155766702536913015598488653⟩⟩, + ⟨⟨36192215585465056380868244990792817624300760039945956,36192215585465056380868244990792817624300760039955486⟩,⟨-2473993256308424234692716570874053859646712696557201,-2473993256308424234692716570874053859646712696547675⟩⟩, + ⟨⟨5016916727616240094209565931082682125133606609121804,5016916727616240094209565931082682125133606609124471⟩,⟨12827355658192723940380251796602071977891964229461060,12827355658192723940380251796602071977891964229463728⟩⟩, + ⟨⟨-3068038142758095887029677324671217552982262165135538,-3068038142758095887029677324671217552982262165134558⟩,⟨4656065867175239346087963802541376643482358090343172,4656065867175239346087963802541376643482358090344157⟩⟩, + ⟨⟨-2627913950508916126855401712534236135615562387778932,-2627913950508916126855401712534236135615562387778617⟩,⟨1026230940894590042258128175083429114085227721837845,1026230940894590042258128175083429114085227721838157⟩⟩, + ⟨⟨-2174953729355103301978846815284089479000684443935066,-2174953729355103301978846815284089479000684443934959⟩,⟨-1,1⟩⟩, + ⟨⟨-2627913950508916126855401712534236135615562387778932,-2627913950508916126855401712534236135615562387778617⟩,⟨-1026230940894590042258128175083429114085227721838157,-1026230940894590042258128175083429114085227721837845⟩⟩, + ⟨⟨-3068038142758095887029677324671217552982262165135538,-3068038142758095887029677324671217552982262165134558⟩,⟨-4656065867175239346087963802541376643482358090344157,-4656065867175239346087963802541376643482358090343172⟩⟩, + ⟨⟨5016916727616240094209565931082682125133606609121804,5016916727616240094209565931082682125133606609124471⟩,⟨-12827355658192723940380251796602071977891964229463728,-12827355658192723940380251796602071977891964229461060⟩⟩, + ⟨⟨36192215585465056380868244990792817624300760039945956,36192215585465056380868244990792817624300760039955486⟩,⟨2473993256308424234692716570874053859646712696547675,2473993256308424234692716570874053859646712696557201⟩⟩, + ⟨⟨-452543175069085647745176467594411260453336354808136,-452543175069085647745176467594411260453336354781825⟩,⟨93533922313001840724985630155766702536913015598488653,93533922313001840724985630155766702536913015598514941⟩⟩, + ⟨⟨-226339294848136205929608790321121326595143957414474429,-226339294848136205929608790321121326595143957414399346⟩,⟨-26774182789548219323979802440720199533655030378041027,-26774182789548219323979802440720199533655030377966039⟩⟩, + ⟨⟨182098666972390830039796246523637719465594563012693645,182098666972390830039796246523637719465594563012861645⟩,⟨-486714002602974900400608572309693926013453394413184118,-486714002602974900400608572309693926013453394413015846⟩⟩, + ⟨⟨855217518385726358398761348906766300260731621720839463,855217518385726358398761348906766300260731621721254288⟩,⟨707352084326115173387670566342269066180087962344336110,707352084326115173387670566342269066180087962344751020⟩⟩, + ⟨⟨-1981501790224573215314556416909016364013006378355891173,-1981501790224573215314556416909016364013006378354746053⟩,⟨1026680111211672279001295955258556675782651214620071857,1026680111211672279001295955258556675782651214621220007⟩⟩, + ⟨⟨-104463301119282769460636232139413375094859172517773058,-104463301119282769460636232139413375094859172515625067⟩,⟨-4250478148356988184645279617170776166434497009136122733,-4250478148356988184645279617170776166434497009133975955⟩⟩, + ⟨⟨6889571926544198891190292908690776535904648771111444965,6889571926544198891190292908690776535904648771113553302⟩,⟨3488179408928909341623560780458333713634873943523433836,3488179408928909341623560780458333713634873943525523973⟩⟩, + ⟨⟨-11263310506292171394358162868632865560362246943637428043,-11263310506292171394358162868632865560362246943629593551⟩,⟨7343941780912506001411983246367434883661418330848733912,7343941780912506001411983246367434883661418330856582614⟩⟩, + ⟨⟨-649271894498167140532953989948695896755845778075601644,-649271894498167140532953989948695896755845778059203500⟩,⟨-22545935363330854850020788829188479129385674037116991817,-22545935363330854850020788829188479129385674037100551243⟩⟩, + ⟨⟨31395508446858960453665061723989303059804104772778183081,31395508446858960453665061723989303059804104772798284049⟩,⟨18823636923311165305195931891612986173814136388440675924,18823636923311165305195931891612986173814136388460721962⟩⟩, + ⟨⟨-52056692616035431210068377464934130398031361150286452161,-52056692616035431210068377464934130398031361150244868635⟩,⟨24863086587905633107516644925105001982265350659105805461,24863086587905633107516644925105001982265350659147340664⟩⟩] +lemma tw1_0_6_5_calc (j : Fin 31) : taylorWaveBox 1 0 6 5 j = tw1_0_6_5 j := by + revert j + decide +kernel +def tw1_0_6_6 : Fin 31 → CI := ![⟨⟨-4047902982070698848438433117896747063558999942277210266,-4047902982070698848438433117896747063558999942260750296⟩,⟨18988255076411504941171106785820633613670426806458435103,18988255076411504941171106785820633613670426806474922372⟩⟩, + ⟨⟨-8215150193764926158243440700005520989149295209765405715,-8215150193764926158243440700005520989149295209758149350⟩,⟨-8110807386066252563530158085468175017531909762526904522,-8110807386066252563530158085468175017531909762519623054⟩⟩, + ⟨⟨6445381777117590151007828948301297859662312438627338191,6445381777117590151007828948301297859662312438632708620⟩,⟨-1586609722774381545709676973203873596303347878738437853,-1586609722774381545709676973203873596303347878733081613⟩⟩, + ⟨⟨-1038021123733783800410430847721212225843507152601209619,-1038021123733783800410430847721212225843507152598905169⟩,⟨3525519633821665151001556955938788129746451792577543302,3525519633821665151001556955938788129746451792579843751⟩⟩, + ⟨⟨-1378208678078831797652132302852138388778600542110887377,-1378208678078831797652132302852138388778600542110332502⟩,⟨-1379417599716165115686591132195891904867739303441843624,-1379417599716165115686591132195891904867739303441285256⟩⟩, + ⟨⟨935515009395420080333615710649462517936213307665120878,935515009395420080333615710649462517936213307665603185⟩,⟨-311041416227634508394848840035516417008761956497121565,-311041416227634508394848840035516417008761956496639029⟩⟩, + ⟨⟨-45961381754470276921462937987723465164785796162120834,-45961381754470276921462937987723465164785796161912725⟩,⟨469702234077017463128328540147797820489704600008155353,469702234077017463128328540147797820489704600008363464⟩⟩, + ⟨⟨-190624855247900149839568921515226190662399187387414987,-190624855247900149839568921515226190662399187387327595⟩,⟨-93708312375151874710564391321126901386013891432528256,-93708312375151874710564391321126901386013891432440915⟩⟩, + ⟨⟨60027170423869997937892208632392628252175312224358686,60027170423869997937892208632392628252175312224394529⟩,⟨-66035864768327385132701556752238279526102293481417997,-66035864768327385132701556752238279526102293481382254⟩⟩, + ⟨⟨21281378979403094482793266870485522093286463766640453,21281378979403094482793266870485522093286463766652477⟩,⟨27524905014128744299847323562022504785461469673301745,27524905014128744299847323562022504785461469673313775⟩⟩, + ⟨⟨-10167425508809721248650005303610540791013305732018731,-10167425508809721248650005303610540791013305732014825⟩,⟨7395501882576529740519748012173855876363712038542652,7395501882576529740519748012173855876363712038546556⟩⟩, + ⟨⟨-3058426604984465856910586303464318396833754281055775,-3058426604984465856910586303464318396833754281054488⟩,⟨-2964059651813631288238734269094786193986916856520536,-2964059651813631288238734269094786193986916856519248⟩⟩, + ⟨⟨445520746220429534310754592746322503057386616061109,445520746220429534310754592746322503057386616061474⟩,⟨-1335814589501354161578897491090314363434342527397091,-1335814589501354161578897491090314363434342527396725⟩⟩, + ⟨⟨444122351185384933109919805143829678440791304503075,444122351185384933109919805143829678440791304503181⟩,⟨-231818140153946558057826024077901376068622207611369,-231818140153946558057826024077901376068622207611263⟩⟩, + ⟨⟨228784765035185958431000910374692496601983660621100,228784765035185958431000910374692496601983660621131⟩,⟨-23267801000684757117300087548239983177468140497365,-23267801000684757117300087548239983177468140497334⟩⟩, + ⟨⟨170820466450992899127388387410818918150191112332685,170820466450992899127388387410818918150191112332694⟩,⟨-1,1⟩⟩, + ⟨⟨228784765035185958431000910374692496601983660621100,228784765035185958431000910374692496601983660621131⟩,⟨23267801000684757117300087548239983177468140497334,23267801000684757117300087548239983177468140497365⟩⟩, + ⟨⟨444122351185384933109919805143829678440791304503075,444122351185384933109919805143829678440791304503181⟩,⟨231818140153946558057826024077901376068622207611263,231818140153946558057826024077901376068622207611369⟩⟩, + ⟨⟨445520746220429534310754592746322503057386616061109,445520746220429534310754592746322503057386616061474⟩,⟨1335814589501354161578897491090314363434342527396725,1335814589501354161578897491090314363434342527397091⟩⟩, + ⟨⟨-3058426604984465856910586303464318396833754281055775,-3058426604984465856910586303464318396833754281054488⟩,⟨2964059651813631288238734269094786193986916856519248,2964059651813631288238734269094786193986916856520536⟩⟩, + ⟨⟨-10167425508809721248650005303610540791013305732018731,-10167425508809721248650005303610540791013305732014825⟩,⟨-7395501882576529740519748012173855876363712038546556,-7395501882576529740519748012173855876363712038542652⟩⟩, + ⟨⟨21281378979403094482793266870485522093286463766640453,21281378979403094482793266870485522093286463766652477⟩,⟨-27524905014128744299847323562022504785461469673313775,-27524905014128744299847323562022504785461469673301745⟩⟩, + ⟨⟨60027170423869997937892208632392628252175312224358686,60027170423869997937892208632392628252175312224394529⟩,⟨66035864768327385132701556752238279526102293481382254,66035864768327385132701556752238279526102293481417997⟩⟩, + ⟨⟨-190624855247900149839568921515226190662399187387414987,-190624855247900149839568921515226190662399187387327595⟩,⟨93708312375151874710564391321126901386013891432440915,93708312375151874710564391321126901386013891432528256⟩⟩, + ⟨⟨-45961381754470276921462937987723465164785796162120834,-45961381754470276921462937987723465164785796161912725⟩,⟨-469702234077017463128328540147797820489704600008363464,-469702234077017463128328540147797820489704600008155353⟩⟩, + ⟨⟨935515009395420080333615710649462517936213307665120878,935515009395420080333615710649462517936213307665603185⟩,⟨311041416227634508394848840035516417008761956496639029,311041416227634508394848840035516417008761956497121565⟩⟩, + ⟨⟨-1378208678078831797652132302852138388778600542110887377,-1378208678078831797652132302852138388778600542110332502⟩,⟨1379417599716165115686591132195891904867739303441285256,1379417599716165115686591132195891904867739303441843624⟩⟩, + ⟨⟨-1038021123733783800410430847721212225843507152601209619,-1038021123733783800410430847721212225843507152598905169⟩,⟨-3525519633821665151001556955938788129746451792579843751,-3525519633821665151001556955938788129746451792577543302⟩⟩, + ⟨⟨6445381777117590151007828948301297859662312438627338191,6445381777117590151007828948301297859662312438632708620⟩,⟨1586609722774381545709676973203873596303347878733081613,1586609722774381545709676973203873596303347878738437853⟩⟩, + ⟨⟨-8215150193764926158243440700005520989149295209765405715,-8215150193764926158243440700005520989149295209758149350⟩,⟨8110807386066252563530158085468175017531909762519623054,8110807386066252563530158085468175017531909762526904521⟩⟩, + ⟨⟨-4047902982070698848438433117896747063558999942277210266,-4047902982070698848438433117896747063558999942260750296⟩,⟨-18988255076411504941171106785820633613670426806474922372,-18988255076411504941171106785820633613670426806458435103⟩⟩] +lemma tw1_0_6_6_calc (j : Fin 31) : taylorWaveBox 1 0 6 6 j = tw1_0_6_6 j := by + revert j + decide +kernel +def tw1_0_6_7 : Fin 31 → CI := ![⟨⟨5806056444218859976958675038368644551301630021571800501,5806056444218859976958675038368644551301630021577238978⟩,⟨-148143033860454781305820817855418628107558153312806652,-148143033860454781305820817855418628107558153307377328⟩⟩, + ⟨⟨-1628523338232955871853229560017720302699511937933797193,-1628523338232955871853229560017720302699511937931600675⟩,⟨2796618811059583217515129169553951513504577034529415291,2796618811059583217515129169553951513504577034531604562⟩⟩, + ⟨⟨-849961786329843779200152737604984404911482195901946269,-849961786329843779200152737604984404911482195900494703⟩,⟨-1514134563644495230568785209945474907179235366039855261,-1514134563644495230568785209945474907179235366038400521⟩⟩, + ⟨⟨892893217976195872543241631178464854980006488777917682,892893217976195872543241631178464854980006488778476651⟩,⟨-4569217623491807584664688877876912483389116736660525,-4569217623491807584664688877876912483389116736100830⟩⟩, + ⟨⟨-198037513846359903726543382091020287747988451893743827,-198037513846359903726543382091020287747988451893620943⟩,⟨390298261424879719619180061538354248103430305545184387,390298261424879719619180061538354248103430305545306974⟩⟩, + ⟨⟨-125630122054640209610133617384576409249846707447102659,-125630122054640209610133617384576409249846707447015206⟩,⟨-159705402882332933430428275822717664674436287730837299,-159705402882332933430428275822717664674436287730749869⟩⟩, + ⟨⟨85187214647696856316393897725923599463980400947916160,85187214647696856316393897725923599463980400947961695⟩,⟨-24769627550652711997438939837631496195140036890965051,-24769627550652711997438939837631496195140036890919657⟩⟩, + ⟨⟨-1229817558557296472677589763481088361937041122616141,-1229817558557296472677589763481088361937041122598221⟩,⟨36115686440521207031661404496380890429470396980313762,36115686440521207031661404496380890429470396980331691⟩⟩, + ⟨⟨-13154912449612775120344379948724626699159211590975184,-13154912449612775120344379948724626699159211590969498⟩,⟨-3538385110303904838007355452571923347948901059678821,-3538385110303904838007355452571923347948901059673125⟩⟩, + ⟨⟨1716947595080441449158627449572231115819447487231992,1716947595080441449158627449572231115819447487233699⟩,⟨-4397801758882935173071352294244201256805351878085140,-4397801758882935173071352294244201256805351878083431⟩⟩, + ⟨⟨1426908304588843622622411264761715692563866319361915,1426908304588843622622411264761715692563866319362496⟩,⟨469557966913009554090517799030978353063811840979131,469557966913009554090517799030978353063811840979713⟩⟩, + ⟨⟨-16404210581558793061308169305064410030546486649641,-16404210581558793061308169305064410030546486649485⟩,⟨444173130321195864603282908129127518993166844755449,444173130321195864603282908129127518993166844755605⟩⟩, + ⟨⟨-108817758239871341869398368496959807261251494389186,-108817758239871341869398368496959807261251494389149⟩,⟨67338104773605174613765717125426058842148988125464,67338104773605174613765717125426058842148988125501⟩⟩, + ⟨⟨-39996677709614126904575469499948953218914421636796,-39996677709614126904575469499948953218914421636786⟩,⟨-1041368109152517103178950532655973058663958985653,-1041368109152517103178950532655973058663958985643⟩⟩, + ⟨⟨-16423411643241027136720400614564905630385675809562,-16423411643241027136720400614564905630385675809558⟩,⟨-2812320416096429009248035395365328885318336181296,-2812320416096429009248035395365328885318336181292⟩⟩, + ⟨⟨-11925518277449356279057864395354807757397891450337,-11925518277449356279057864395354807757397891450335⟩,⟨-1,1⟩⟩, + ⟨⟨-16423411643241027136720400614564905630385675809562,-16423411643241027136720400614564905630385675809558⟩,⟨2812320416096429009248035395365328885318336181292,2812320416096429009248035395365328885318336181296⟩⟩, + ⟨⟨-39996677709614126904575469499948953218914421636796,-39996677709614126904575469499948953218914421636786⟩,⟨1041368109152517103178950532655973058663958985643,1041368109152517103178950532655973058663958985653⟩⟩, + ⟨⟨-108817758239871341869398368496959807261251494389186,-108817758239871341869398368496959807261251494389149⟩,⟨-67338104773605174613765717125426058842148988125501,-67338104773605174613765717125426058842148988125464⟩⟩, + ⟨⟨-16404210581558793061308169305064410030546486649641,-16404210581558793061308169305064410030546486649485⟩,⟨-444173130321195864603282908129127518993166844755605,-444173130321195864603282908129127518993166844755449⟩⟩, + ⟨⟨1426908304588843622622411264761715692563866319361915,1426908304588843622622411264761715692563866319362496⟩,⟨-469557966913009554090517799030978353063811840979713,-469557966913009554090517799030978353063811840979131⟩⟩, + ⟨⟨1716947595080441449158627449572231115819447487231992,1716947595080441449158627449572231115819447487233699⟩,⟨4397801758882935173071352294244201256805351878083431,4397801758882935173071352294244201256805351878085140⟩⟩, + ⟨⟨-13154912449612775120344379948724626699159211590975184,-13154912449612775120344379948724626699159211590969498⟩,⟨3538385110303904838007355452571923347948901059673125,3538385110303904838007355452571923347948901059678821⟩⟩, + ⟨⟨-1229817558557296472677589763481088361937041122616141,-1229817558557296472677589763481088361937041122598221⟩,⟨-36115686440521207031661404496380890429470396980331691,-36115686440521207031661404496380890429470396980313762⟩⟩, + ⟨⟨85187214647696856316393897725923599463980400947916160,85187214647696856316393897725923599463980400947961695⟩,⟨24769627550652711997438939837631496195140036890919657,24769627550652711997438939837631496195140036890965051⟩⟩, + ⟨⟨-125630122054640209610133617384576409249846707447102659,-125630122054640209610133617384576409249846707447015206⟩,⟨159705402882332933430428275822717664674436287730749869,159705402882332933430428275822717664674436287730837299⟩⟩, + ⟨⟨-198037513846359903726543382091020287747988451893743827,-198037513846359903726543382091020287747988451893620943⟩,⟨-390298261424879719619180061538354248103430305545306974,-390298261424879719619180061538354248103430305545184387⟩⟩, + ⟨⟨892893217976195872543241631178464854980006488777917682,892893217976195872543241631178464854980006488778476651⟩,⟨4569217623491807584664688877876912483389116736100830,4569217623491807584664688877876912483389116736660525⟩⟩, + ⟨⟨-849961786329843779200152737604984404911482195901946269,-849961786329843779200152737604984404911482195900494703⟩,⟨1514134563644495230568785209945474907179235366038400521,1514134563644495230568785209945474907179235366039855261⟩⟩, + ⟨⟨-1628523338232955871853229560017720302699511937933797193,-1628523338232955871853229560017720302699511937931600675⟩,⟨-2796618811059583217515129169553951513504577034531604562,-2796618811059583217515129169553951513504577034529415291⟩⟩, + ⟨⟨5806056444218859976958675038368644551301630021571800501,5806056444218859976958675038368644551301630021577238978⟩,⟨148143033860454781305820817855418628107558153307377328,148143033860454781305820817855418628107558153312806652⟩⟩] +lemma tw1_0_6_7_calc (j : Fin 31) : taylorWaveBox 1 0 6 7 j = tw1_0_6_7 j := by + revert j + decide +kernel +def tw1_0_6_8 : Fin 31 → CI := ![⟨⟨-403589041001088680535414541063492179126785731829488908,-403589041001088680535414541063492179126785731827960607⟩,⟨-1510713921286673797157448807291022564188910702244863405,-1510713921286673797157448807291022564188910702243332881⟩⟩, + ⟨⟨785666025578628721427293037656345903269988736792108169,785666025578628721427293037656345903269988736792671297⟩,⟨222206576533964511081285104685688351315611658842925239,222206576533964511081285104685688351315611658843489856⟩⟩, + ⟨⟨-290141560824655075927023056123524501710520564302186643,-290141560824655075927023056123524501710520564301853558⟩,⟨287986092372486624275309994270318185424138900661789385,287986092372486624275309994270318185424138900662122021⟩⟩, + ⟨⟨-57059110181924329065583815424131815179612540506721612,-57059110181924329065583815424131815179612540506607303⟩,⟨-186720025858572160115357481310168829606800614639257790,-186720025858572160115357481310168829606800614639143544⟩⟩, + ⟨⟨87374950966109212705508111515099873734355876829983012,87374950966109212705508111515099873734355876830006626⟩,⟨13497310233885827609859868180718162308678341481637073,13497310233885827609859868180718162308678341481660622⟩⟩, + ⟨⟨-19980277764878583679625209844299813753288231664346529,-19980277764878583679625209844299813753288231664326369⟩,⟨31961179104032859101098431681742276965956166630153716,31961179104032859101098431681742276965956166630173871⟩⟩, + ⟨⟨-9243274551603920618263748663770099835864608445912021,-9243274551603920618263748663770099835864608445903083⟩,⟨-11824854786943345434587016503290065039106440848999065,-11824854786943345434587016503290065039106440848990096⟩⟩, + ⟨⟨5119972836184117122125541978984315354288929106541372,5119972836184117122125541978984315354288929106544290⟩,⟨-2097500579252574754053361935890946562368070672672770,-2097500579252574754053361935890946562368070672669852⟩⟩, + ⟨⟨394252233557986977756159588222089118620773297239094,394252233557986977756159588222089118620773297239837⟩,⟨1829499038763394252980546847167961000584528768476582,1829499038763394252980546847167961000584528768477325⟩⟩, + ⟨⟨-568415722281097569937081801276353326257111457691293,-568415722281097569937081801276353326257111457691019⟩,⟨96523702242905411264138455774933732741113127956065,96523702242905411264138455774933732741113127956338⟩⟩, + ⟨⟨-48678630182838507522062887216155957616693687544264,-48678630182838507522062887216155957616693687544199⟩,⟨-154024437381396572065943982930909615916647564211752,-154024437381396572065943982930909615916647564211686⟩⟩, + ⟨⟨32039841240998207022865125653300093692972638969585,32039841240998207022865125653300093692972638969604⟩,⟨-26762990919426236368698265044357703051962034171232,-26762990919426236368698265044357703051962034171212⟩⟩, + ⟨⟨10363036318386763342596336156315785498266273309726,10363036318386763342596336156315785498266273309731⟩,⟨1466706592506477213096534499570700158313417051575,1466706592506477213096534499570700158313417051580⟩⟩, + ⟨⟨2476714772750489331813448227729753197382079204694,2476714772750489331813448227729753197382079204696⟩,⟨1461578519811506817841361941111504864551585237967,1461578519811506817841361941111504864551585237968⟩⟩, + ⟨⟨982829136423802080451367261178595067700221607606,982829136423802080451367261178595067700221607607⟩,⟨463345910759910888174579962427164694137350917364,463345910759910888174579962427164694137350917366⟩⟩, + ⟨⟨749302412213714066221398097807976807283572467214,749302412213714066221398097807976807283572467215⟩,⟨-1,1⟩⟩, + ⟨⟨982829136423802080451367261178595067700221607606,982829136423802080451367261178595067700221607607⟩,⟨-463345910759910888174579962427164694137350917366,-463345910759910888174579962427164694137350917364⟩⟩, + ⟨⟨2476714772750489331813448227729753197382079204694,2476714772750489331813448227729753197382079204696⟩,⟨-1461578519811506817841361941111504864551585237968,-1461578519811506817841361941111504864551585237967⟩⟩, + ⟨⟨10363036318386763342596336156315785498266273309726,10363036318386763342596336156315785498266273309731⟩,⟨-1466706592506477213096534499570700158313417051580,-1466706592506477213096534499570700158313417051575⟩⟩, + ⟨⟨32039841240998207022865125653300093692972638969585,32039841240998207022865125653300093692972638969604⟩,⟨26762990919426236368698265044357703051962034171212,26762990919426236368698265044357703051962034171232⟩⟩, + ⟨⟨-48678630182838507522062887216155957616693687544264,-48678630182838507522062887216155957616693687544199⟩,⟨154024437381396572065943982930909615916647564211686,154024437381396572065943982930909615916647564211752⟩⟩, + ⟨⟨-568415722281097569937081801276353326257111457691293,-568415722281097569937081801276353326257111457691019⟩,⟨-96523702242905411264138455774933732741113127956338,-96523702242905411264138455774933732741113127956065⟩⟩, + ⟨⟨394252233557986977756159588222089118620773297239094,394252233557986977756159588222089118620773297239837⟩,⟨-1829499038763394252980546847167961000584528768477325,-1829499038763394252980546847167961000584528768476582⟩⟩, + ⟨⟨5119972836184117122125541978984315354288929106541372,5119972836184117122125541978984315354288929106544290⟩,⟨2097500579252574754053361935890946562368070672669852,2097500579252574754053361935890946562368070672672770⟩⟩, + ⟨⟨-9243274551603920618263748663770099835864608445912021,-9243274551603920618263748663770099835864608445903083⟩,⟨11824854786943345434587016503290065039106440848990096,11824854786943345434587016503290065039106440848999065⟩⟩, + ⟨⟨-19980277764878583679625209844299813753288231664346529,-19980277764878583679625209844299813753288231664326369⟩,⟨-31961179104032859101098431681742276965956166630173871,-31961179104032859101098431681742276965956166630153716⟩⟩, + ⟨⟨87374950966109212705508111515099873734355876829983012,87374950966109212705508111515099873734355876830006626⟩,⟨-13497310233885827609859868180718162308678341481660622,-13497310233885827609859868180718162308678341481637073⟩⟩, + ⟨⟨-57059110181924329065583815424131815179612540506721612,-57059110181924329065583815424131815179612540506607303⟩,⟨186720025858572160115357481310168829606800614639143544,186720025858572160115357481310168829606800614639257790⟩⟩, + ⟨⟨-290141560824655075927023056123524501710520564302186643,-290141560824655075927023056123524501710520564301853558⟩,⟨-287986092372486624275309994270318185424138900662122021,-287986092372486624275309994270318185424138900661789385⟩⟩, + ⟨⟨785666025578628721427293037656345903269988736792108169,785666025578628721427293037656345903269988736792671297⟩,⟨-222206576533964511081285104685688351315611658843489856,-222206576533964511081285104685688351315611658842925239⟩⟩, + ⟨⟨-403589041001088680535414541063492179126785731829488908,-403589041001088680535414541063492179126785731827960607⟩,⟨1510713921286673797157448807291022564188910702243332881,1510713921286673797157448807291022564188910702244863405⟩⟩] +lemma tw1_0_6_8_calc (j : Fin 31) : taylorWaveBox 1 0 6 8 j = tw1_0_6_8 j := by + revert j + decide +kernel +def tw1_0_6_9 : Fin 31 → CI := ![⟨⟨-336496120369942026642313547139397476545406185555926157,-336496120369942026642313547139397476545406185555552788⟩,⟨182345744538483371714218167848093989176481441086591720,182345744538483371714218167848093989176481441086964702⟩⟩, + ⟨⟨4482233671614629405790060261259905752021489496498595,4482233671614629405790060261259905752021489496624073⟩,⟨-187214615010945130416477638561008665737330062143881739,-187214615010945130416477638561008665737330062143756458⟩⟩, + ⟨⟨75974639612579734977994292831060996827403161852288957,75974639612579734977994292831060996827403161852354034⟩,⟨43396665536167651291602906881834129402228418186832291,43396665536167651291602906881834129402228418186897376⟩⟩, + ⟨⟨-32292201036667594614181003759859683976260685628645705,-32292201036667594614181003759859683976260685628623937⟩,⟨21529452110455757586672554785945255612139370372627878,21529452110455757586672554785945255612139370372649633⟩⟩, + ⟨⟨-2635120490971974979861970657641766692241191189661116,-2635120490971974979861970657641766692241191189655666⟩,⟨-16020770338981117116397081221535746828459340495668073,-16020770338981117116397081221535746828459340495662589⟩⟩, + ⟨⟨6212432689733061571041944362798166441729959822818648,6212432689733061571041944362798166441729959822822599⟩,⟨1344578377395911424180110415504219628177697271902781,1344578377395911424180110415504219628177697271906734⟩⟩, + ⟨⟨-1160610707175198493583295450999899058736488889803562,-1160610707175198493583295450999899058736488889802131⟩,⟨1995370645354695123163409662705468261431152093858448,1995370645354695123163409662705468261431152093859876⟩⟩, + ⟨⟨-558694282125701772028552572442332443681927440007773,-558694282125701772028552572442332443681927440007379⟩,⟨-530084746017342187230828903329099647275660899527739,-530084746017342187230828903329099647275660899527344⟩⟩, + ⟨⟨180676249824823095999978069892511626946835303725570,180676249824823095999978069892511626946835303725695⟩,⟨-148288919737339285832129494846134046330930326423309,-148288919737339285832129494846134046330930326423185⟩⟩, + ⟨⟨41656865098349686485219771534430367960411189649876,41656865098349686485219771534430367960411189649911⟩,⟨48599629241971881912920489898006670207655919026502,48599629241971881912920489898006670207655919026537⟩⟩, + ⟨⟨-9438726604365109207848691258518451838084834997739,-9438726604365109207848691258518451838084834997729⟩,⟨12659684253881853077513298455678487914854635440605,12659684253881853077513298455678487914854635440615⟩⟩, + ⟨⟨-3528665303817631038419507519602068386880891055841,-3528665303817631038419507519602068386880891055838⟩,⟨-504758702432311557203447383200227000623294352486,-504758702432311557203447383200227000623294352484⟩⟩, + ⟨⟨-522120179758842736931035391918398486198163141437,-522120179758842736931035391918398486198163141435⟩,⟨-577057459907820515734114549687216941119807672232,-577057459907820515734114549687216941119807672231⟩⟩, + ⟨⟨-95088967098120998304352757382427013401587612467,-95088967098120998304352757382427013401587612466⟩,⟨-162079401494770752723345498739856999431331055106,-162079401494770752723345498739856999431331055105⟩⟩, + ⟨⟨-48787331069134617493620241642586964516600940441,-48787331069134617493620241642586964516600940440⟩,⟨-42060442364920030363399396654762160633543710177,-42060442364920030363399396654762160633543710176⟩⟩, + ⟨⟨-42800053700503910410387212830375009663466519080,-42800053700503910410387212830375009663466519079⟩,⟨-1,1⟩⟩, + ⟨⟨-48787331069134617493620241642586964516600940441,-48787331069134617493620241642586964516600940440⟩,⟨42060442364920030363399396654762160633543710176,42060442364920030363399396654762160633543710177⟩⟩, + ⟨⟨-95088967098120998304352757382427013401587612467,-95088967098120998304352757382427013401587612466⟩,⟨162079401494770752723345498739856999431331055105,162079401494770752723345498739856999431331055106⟩⟩, + ⟨⟨-522120179758842736931035391918398486198163141437,-522120179758842736931035391918398486198163141435⟩,⟨577057459907820515734114549687216941119807672231,577057459907820515734114549687216941119807672232⟩⟩, + ⟨⟨-3528665303817631038419507519602068386880891055841,-3528665303817631038419507519602068386880891055838⟩,⟨504758702432311557203447383200227000623294352484,504758702432311557203447383200227000623294352486⟩⟩, + ⟨⟨-9438726604365109207848691258518451838084834997739,-9438726604365109207848691258518451838084834997729⟩,⟨-12659684253881853077513298455678487914854635440615,-12659684253881853077513298455678487914854635440605⟩⟩, + ⟨⟨41656865098349686485219771534430367960411189649876,41656865098349686485219771534430367960411189649911⟩,⟨-48599629241971881912920489898006670207655919026537,-48599629241971881912920489898006670207655919026502⟩⟩, + ⟨⟨180676249824823095999978069892511626946835303725570,180676249824823095999978069892511626946835303725695⟩,⟨148288919737339285832129494846134046330930326423185,148288919737339285832129494846134046330930326423309⟩⟩, + ⟨⟨-558694282125701772028552572442332443681927440007773,-558694282125701772028552572442332443681927440007379⟩,⟨530084746017342187230828903329099647275660899527344,530084746017342187230828903329099647275660899527739⟩⟩, + ⟨⟨-1160610707175198493583295450999899058736488889803562,-1160610707175198493583295450999899058736488889802131⟩,⟨-1995370645354695123163409662705468261431152093859876,-1995370645354695123163409662705468261431152093858448⟩⟩, + ⟨⟨6212432689733061571041944362798166441729959822818648,6212432689733061571041944362798166441729959822822599⟩,⟨-1344578377395911424180110415504219628177697271906734,-1344578377395911424180110415504219628177697271902781⟩⟩, + ⟨⟨-2635120490971974979861970657641766692241191189661116,-2635120490971974979861970657641766692241191189655666⟩,⟨16020770338981117116397081221535746828459340495662589,16020770338981117116397081221535746828459340495668073⟩⟩, + ⟨⟨-32292201036667594614181003759859683976260685628645705,-32292201036667594614181003759859683976260685628623937⟩,⟨-21529452110455757586672554785945255612139370372649633,-21529452110455757586672554785945255612139370372627878⟩⟩, + ⟨⟨75974639612579734977994292831060996827403161852288957,75974639612579734977994292831060996827403161852354034⟩,⟨-43396665536167651291602906881834129402228418186897376,-43396665536167651291602906881834129402228418186832291⟩⟩, + ⟨⟨4482233671614629405790060261259905752021489496498595,4482233671614629405790060261259905752021489496624073⟩,⟨187214615010945130416477638561008665737330062143756458,187214615010945130416477638561008665737330062143881739⟩⟩, + ⟨⟨-336496120369942026642313547139397476545406185555926157,-336496120369942026642313547139397476545406185555552788⟩,⟨-182345744538483371714218167848093989176481441086964702,-182345744538483371714218167848093989176481441086591720⟩⟩] +lemma tw1_0_6_9_calc (j : Fin 31) : taylorWaveBox 1 0 6 9 j = tw1_0_6_9 j := by + revert j + decide +kernel +def tw1_0_6_10 : Fin 31 → CI := ![⟨⟨57400565901890480514648336364984041527809776475332694,57400565901890480514648336364984041527809776475412399⟩,⟨63864464400442091934098369375499273013890257518589800,63864464400442091934098369375499273013890257518669541⟩⟩, + ⟨⟨-38355656003843867949480772999248655969324024982463723,-38355656003843867949480772999248655969324024982439402⟩,⟨8889854072893765668243941012759959898618444095093141,8889854072893765668243941012759959898618444095117463⟩⟩, + ⟨⟨4227303067155945559487062170537201865813257977044079,4227303067155945559487062170537201865813257977056804⟩,⟨-16637326527581237264381688951518174768429756078054325,-16637326527581237264381688951518174768429756078041583⟩⟩, + ⟨⟨5448413947196275777737249932018011665255817334689767,5448413947196275777737249932018011665255817334694618⟩,⟨4508772831624072073893268934809957379896343208345201,4508772831624072073893268934809957379896343208350059⟩⟩, + ⟨⟨-2425164665680436950134339324487781468386724491516893,-2425164665680436950134339324487781468386724491515812⟩,⟨1260434586943651680673057509849361098442724306311299,1260434586943651680673057509849361098442724306312374⟩⟩, + ⟨⟨-129721217177428137162894824223745697281156063115757,-129721217177428137162894824223745697281156063115100⟩,⟨-973963667496455106447961491673930142591131382870550,-973963667496455106447961491673930142591131382869893⟩⟩, + ⟨⟨321962841215447425849042887334244670398678174150774,321962841215447425849042887334244670398678174150965⟩,⟨47446223628551848404182181456422617957276194959441,47446223628551848404182181456422617957276194959632⟩⟩, + ⟨⟨-32424996678524667268769669538739975525406734029505,-32424996678524667268769669538739975525406734029441⟩,⟨92762203965532227803389014805724440807116659975645,92762203965532227803389014805724440807116659975710⟩⟩, + ⟨⟨-24557610698376330591046516414866040672295169666192,-24557610698376330591046516414866040672295169666175⟩,⟨-10630417050067588467552774193488650401292561491456,-10630417050067588467552774193488650401292561491439⟩⟩, + ⟨⟨2059969371528685979291522367650368339606900162397,2059969371528685979291522367650368339606900162402⟩,⟨-6179917896689343571075820435596533889697831805467,-6179917896689343571075820435596533889697831805461⟩⟩, + ⟨⟨1414848788046599655898626047379780398271156787448,1414848788046599655898626047379780398271156787450⟩,⟨23544051027953725105975472444773207574204284901,23544051027953725105975472444773207574204284903⟩⟩, + ⟨⟨155394812305717267140193961393174563783012061264,155394812305717267140193961393174563783012061265⟩,⟨231718529698293431445430341837062349260269863540,231718529698293431445430341837062349260269863541⟩⟩, + ⟨⟨2159267062222771520040498224084676429766659815,2159267062222771520040498224084676429766659816⟩,⟨52996448515501073595122898252054226535962523534,52996448515501073595122898252054226535962523535⟩⟩, + ⟨⟨264147998305693787352756400735478909791051710,264147998305693787352756400735478909791051711⟩,⟨11252483547541321461222057953699734603209183600,11252483547541321461222057953699734603209183601⟩⟩, + ⟨⟨1942754344489802396794083320769204027977289261,1942754344489802396794083320769204027977289262⟩,⟨2911862579353598259175503303967724776231648139,2911862579353598259175503303967724776231648140⟩⟩, + ⟨⟨2241005571312528827023965465236719750877457918,2241005571312528827023965465236719750877457919⟩,⟨-1,1⟩⟩, + ⟨⟨1942754344489802396794083320769204027977289261,1942754344489802396794083320769204027977289262⟩,⟨-2911862579353598259175503303967724776231648140,-2911862579353598259175503303967724776231648139⟩⟩, + ⟨⟨264147998305693787352756400735478909791051710,264147998305693787352756400735478909791051711⟩,⟨-11252483547541321461222057953699734603209183601,-11252483547541321461222057953699734603209183600⟩⟩, + ⟨⟨2159267062222771520040498224084676429766659815,2159267062222771520040498224084676429766659816⟩,⟨-52996448515501073595122898252054226535962523535,-52996448515501073595122898252054226535962523534⟩⟩, + ⟨⟨155394812305717267140193961393174563783012061264,155394812305717267140193961393174563783012061265⟩,⟨-231718529698293431445430341837062349260269863541,-231718529698293431445430341837062349260269863540⟩⟩, + ⟨⟨1414848788046599655898626047379780398271156787448,1414848788046599655898626047379780398271156787450⟩,⟨-23544051027953725105975472444773207574204284903,-23544051027953725105975472444773207574204284901⟩⟩, + ⟨⟨2059969371528685979291522367650368339606900162397,2059969371528685979291522367650368339606900162402⟩,⟨6179917896689343571075820435596533889697831805461,6179917896689343571075820435596533889697831805467⟩⟩, + ⟨⟨-24557610698376330591046516414866040672295169666192,-24557610698376330591046516414866040672295169666175⟩,⟨10630417050067588467552774193488650401292561491439,10630417050067588467552774193488650401292561491456⟩⟩, + ⟨⟨-32424996678524667268769669538739975525406734029505,-32424996678524667268769669538739975525406734029441⟩,⟨-92762203965532227803389014805724440807116659975710,-92762203965532227803389014805724440807116659975645⟩⟩, + ⟨⟨321962841215447425849042887334244670398678174150774,321962841215447425849042887334244670398678174150965⟩,⟨-47446223628551848404182181456422617957276194959632,-47446223628551848404182181456422617957276194959441⟩⟩, + ⟨⟨-129721217177428137162894824223745697281156063115757,-129721217177428137162894824223745697281156063115100⟩,⟨973963667496455106447961491673930142591131382869893,973963667496455106447961491673930142591131382870550⟩⟩, + ⟨⟨-2425164665680436950134339324487781468386724491516893,-2425164665680436950134339324487781468386724491515812⟩,⟨-1260434586943651680673057509849361098442724306312374,-1260434586943651680673057509849361098442724306311299⟩⟩, + ⟨⟨5448413947196275777737249932018011665255817334689767,5448413947196275777737249932018011665255817334694618⟩,⟨-4508772831624072073893268934809957379896343208350059,-4508772831624072073893268934809957379896343208345201⟩⟩, + ⟨⟨4227303067155945559487062170537201865813257977044079,4227303067155945559487062170537201865813257977056804⟩,⟨16637326527581237264381688951518174768429756078041583,16637326527581237264381688951518174768429756078054325⟩⟩, + ⟨⟨-38355656003843867949480772999248655969324024982463723,-38355656003843867949480772999248655969324024982439402⟩,⟨-8889854072893765668243941012759959898618444095117463,-8889854072893765668243941012759959898618444095093141⟩⟩, + ⟨⟨57400565901890480514648336364984041527809776475332694,57400565901890480514648336364984041527809776475412399⟩,⟨-63864464400442091934098369375499273013890257518669541,-63864464400442091934098369375499273013890257518589800⟩⟩] +lemma tw1_0_6_10_calc (j : Fin 31) : taylorWaveBox 1 0 6 10 j = tw1_0_6_10 j := by + revert j + decide +kernel +def tw1_0_6_11 : Fin 31 → CI := ![⟨⟨10086995199362149674483035988915514299264450673851585,10086995199362149674483035988915514299264450673866573⟩,⟨-14646273581659365340331483761271511739636299587848710,-14646273581659365340331483761271511739636299587833717⟩⟩, + ⟨⟨3524736979091847443166674038903851422660182535732917,3524736979091847443166674038903851422660182535737907⟩,⟨6779606747287632063646599993954654943069302766239191,6779606747287632063646599993954654943069302766244189⟩⟩, + ⟨⟨-3108076101130334966836057708854793894182193403007946,-3108076101130334966836057708854793894182193403005185⟩,⟨66314934514334752655395750884535242077611587066891,66314934514334752655395750884535242077611587069645⟩⟩, + ⟨⟨463062483870104529411824195825911179844059357521478,463062483870104529411824195825911179844059357522406⟩,⟨-1095698231363518872986953016320479308572699709878595,-1095698231363518872986953016320479308572699709877668⟩⟩, + ⟨⟨303356660753030879256950363709508298311916900845403,303356660753030879256950363709508298311916900845590⟩,⟨297232885182468814884632613608719253434328258465126,297232885182468814884632613608719253434328258465313⟩⟩, + ⟨⟨-124490848821644234734475289467936636361227961526550,-124490848821644234734475289467936636361227961526454⟩,⟨64489665806009362926668158227907128294573182437374,64489665806009362926668158227907128294573182437470⟩⟩, + ⟨⟨-9828220426326990081278011389042618393288125025570,-9828220426326990081278011389042618393288125025541⟩,⟨-41196106912621596534051921285548326380553959637823,-41196106912621596534051921285548326380553959637793⟩⟩, + ⟨⟨11530284363076272697492804114068480355135813293247,11530284363076272697492804114068480355135813293257⟩,⟨-1000798118669564902034935307267715818819432260200,-1000798118669564902034935307267715818819432260190⟩⟩, + ⟨⟨187884414236913550320759438250985126273393746040,187884414236913550320759438250985126273393746043⟩,⟨2821697649191782929696371342616804524266718573327,2821697649191782929696371342616804524266718573330⟩⟩, + ⟨⟨-597377832065539244380479650577243708039724450239,-597377832065539244380479650577243708039724450238⟩,⟨132750927030817791988451924942128844802315379844,132750927030817791988451924942128844802315379846⟩⟩, + ⟨⟨-66802280862212045319099755944625732444298279398,-66802280862212045319099755944625732444298279397⟩,⟨-96113973231712330167825657617666688094144937745,-96113973231712330167825657617666688094144937744⟩⟩, + ⟨⟨4933277776576776471282428489719916704323701727,4933277776576776471282428489719916704323701728⟩,⟨-19544545440791699855584084193502138362140717474,-19544545440791699855584084193502138362140717473⟩⟩, + ⟨⟨2030166772754703944269709895109346869670167809,2030166772754703944269709895109346869670167810⟩,⟨-2648403096499934944492599790880789469864464894,-2648403096499934944492599790880789469864464893⟩⟩, + ⟨⟨289376050494941198905587220543210299964288318,289376050494941198905587220543210299964288319⟩,⟨-550949921167607790816226639111122062255372095,-550949921167607790816226639111122062255372094⟩⟩, + ⟨⟨-54804050886339541836137779905847491964643775,-54804050886339541836137779905847491964643774⟩,⟨-166819370476905401394667853263564711969172643,-166819370476905401394667853263564711969172642⟩⟩, + ⟨⟨-108312717530603662509945237643576242738798768,-108312717530603662509945237643576242738798767⟩,⟨-1,1⟩⟩, + ⟨⟨-54804050886339541836137779905847491964643775,-54804050886339541836137779905847491964643774⟩,⟨166819370476905401394667853263564711969172642,166819370476905401394667853263564711969172643⟩⟩, + ⟨⟨289376050494941198905587220543210299964288318,289376050494941198905587220543210299964288319⟩,⟨550949921167607790816226639111122062255372094,550949921167607790816226639111122062255372095⟩⟩, + ⟨⟨2030166772754703944269709895109346869670167809,2030166772754703944269709895109346869670167810⟩,⟨2648403096499934944492599790880789469864464893,2648403096499934944492599790880789469864464894⟩⟩, + ⟨⟨4933277776576776471282428489719916704323701727,4933277776576776471282428489719916704323701728⟩,⟨19544545440791699855584084193502138362140717473,19544545440791699855584084193502138362140717474⟩⟩, + ⟨⟨-66802280862212045319099755944625732444298279398,-66802280862212045319099755944625732444298279397⟩,⟨96113973231712330167825657617666688094144937744,96113973231712330167825657617666688094144937745⟩⟩, + ⟨⟨-597377832065539244380479650577243708039724450239,-597377832065539244380479650577243708039724450238⟩,⟨-132750927030817791988451924942128844802315379846,-132750927030817791988451924942128844802315379844⟩⟩, + ⟨⟨187884414236913550320759438250985126273393746040,187884414236913550320759438250985126273393746043⟩,⟨-2821697649191782929696371342616804524266718573330,-2821697649191782929696371342616804524266718573327⟩⟩, + ⟨⟨11530284363076272697492804114068480355135813293247,11530284363076272697492804114068480355135813293257⟩,⟨1000798118669564902034935307267715818819432260190,1000798118669564902034935307267715818819432260200⟩⟩, + ⟨⟨-9828220426326990081278011389042618393288125025570,-9828220426326990081278011389042618393288125025541⟩,⟨41196106912621596534051921285548326380553959637793,41196106912621596534051921285548326380553959637823⟩⟩, + ⟨⟨-124490848821644234734475289467936636361227961526550,-124490848821644234734475289467936636361227961526454⟩,⟨-64489665806009362926668158227907128294573182437470,-64489665806009362926668158227907128294573182437374⟩⟩, + ⟨⟨303356660753030879256950363709508298311916900845403,303356660753030879256950363709508298311916900845590⟩,⟨-297232885182468814884632613608719253434328258465313,-297232885182468814884632613608719253434328258465126⟩⟩, + ⟨⟨463062483870104529411824195825911179844059357521478,463062483870104529411824195825911179844059357522406⟩,⟨1095698231363518872986953016320479308572699709877668,1095698231363518872986953016320479308572699709878595⟩⟩, + ⟨⟨-3108076101130334966836057708854793894182193403007946,-3108076101130334966836057708854793894182193403005185⟩,⟨-66314934514334752655395750884535242077611587069645,-66314934514334752655395750884535242077611587066891⟩⟩, + ⟨⟨3524736979091847443166674038903851422660182535732917,3524736979091847443166674038903851422660182535737907⟩,⟨-6779606747287632063646599993954654943069302766244189,-6779606747287632063646599993954654943069302766239191⟩⟩, + ⟨⟨10086995199362149674483035988915514299264450673851585,10086995199362149674483035988915514299264450673866573⟩,⟨14646273581659365340331483761271511739636299587833717,14646273581659365340331483761271511739636299587848710⟩⟩] +lemma tw1_0_6_11_calc (j : Fin 31) : taylorWaveBox 1 0 6 11 j = tw1_0_6_11 j := by + revert j + decide +kernel +def tw1_0_6_12 : Fin 31 → CI := ![⟨⟨-3191550041085364567466455646638569875956449319306512,-3191550041085364567466455646638569875956449319303357⟩,⟨-1228940470138445349385690119429611907594944240251458,-1228940470138445349385690119429611907594944240248307⟩⟩, + ⟨⟨1025074771600905714890786185118063716958472420103612,1025074771600905714890786185118063716958472420104675⟩,⟨-919450694826750109993394757699342026494652501422134,-919450694826750109993394757699342026494652501421073⟩⟩, + ⟨⟨150237544484954099262579110127895286553995981077030,150237544484954099262579110127895286553995981077548⟩,⟨500738148251909518001982751513544406380190286204822,500738148251909518001982751513544406380190286205341⟩⟩, + ⟨⟨-184698267783179487010985066437890271685102435202043,-184698267783179487010985066437890271685102435201887⟩,⟨-20099163962784494112267340298482556679038344747407,-20099163962784494112267340298482556679038344747251⟩⟩, + ⟨⟨27145825908010544668651317555376307847962439529686,27145825908010544668651317555376307847962439529716⟩,⟨-54939993491317999036653769640281502938705651955498,-54939993491317999036653769640281502938705651955468⟩⟩, + ⟨⟨13626829100143831002432255547117791185201301815482,13626829100143831002432255547117791185201301815497⟩,⟨12625533427735394036052883974212571855837940857941,12625533427735394036052883974212571855837940857956⟩⟩, + ⟨⟨-4181102885625274958612506171323583265642739062976,-4181102885625274958612506171323583265642739062971⟩,⟨2951600707945953576712051246666222876493622781999,2951600707945953576712051246666222876493622782004⟩⟩, + ⟨⟨-617290651089446036107297740240718846352083737068,-617290651089446036107297740240718846352083737065⟩,⟨-1105035290191721603253433007143481561486995246657,-1105035290191721603253433007143481561486995246655⟩⟩, + ⟨⟨237807339578178217599688308334930308313792681190,237807339578178217599688308334930308313792681192⟩,⟨-143033502570253752306651168439710554218696341606,-143033502570253752306651168439710554218696341604⟩⟩, + ⟨⟨36740000530903549179242744618876662761328217528,36740000530903549179242744618876662761328217529⟩,⟨38725909675336766270371375638157239944250783354,38725909675336766270371375638157239944250783355⟩⟩, + ⟨⟨-2993010967385733457557805130824248600049587299,-2993010967385733457557805130824248600049587298⟩,⟨8477584134771038027380757539664475025109897194,8477584134771038027380757539664475025109897195⟩⟩, + ⟨⟨-1196024042435767346274720354406033304477105626,-1196024042435767346274720354406033304477105625⟩,⟨631151605017101460934173094320382351434556287,631151605017101460934173094320382351434556288⟩⟩, + ⟨⟨-190163715884840338300847789795527384280212196,-190163715884840338300847789795527384280212195⟩,⟨42931993276215594437286095221876832395228554,42931993276215594437286095221876832395228555⟩⟩, + ⟨⟨-26724152687964743930450328491673055536052699,-26724152687964743930450328491673055536052698⟩,⟨17511481986866046965922656222257441139860768,17511481986866046965922656222257441139860769⟩⟩, + ⟨⟨379923430073919654391834145878851041360061,379923430073919654391834145878851041360062⟩,⟨8170058076236816223677313806728636789487546,8170058076236816223677313806728636789487547⟩⟩, + ⟨⟨4861063395492726817645710833005050959240964,4861063395492726817645710833005050959240965⟩,⟨-1,1⟩⟩, + ⟨⟨379923430073919654391834145878851041360061,379923430073919654391834145878851041360062⟩,⟨-8170058076236816223677313806728636789487547,-8170058076236816223677313806728636789487546⟩⟩, + ⟨⟨-26724152687964743930450328491673055536052699,-26724152687964743930450328491673055536052698⟩,⟨-17511481986866046965922656222257441139860769,-17511481986866046965922656222257441139860768⟩⟩, + ⟨⟨-190163715884840338300847789795527384280212196,-190163715884840338300847789795527384280212195⟩,⟨-42931993276215594437286095221876832395228555,-42931993276215594437286095221876832395228554⟩⟩, + ⟨⟨-1196024042435767346274720354406033304477105626,-1196024042435767346274720354406033304477105625⟩,⟨-631151605017101460934173094320382351434556288,-631151605017101460934173094320382351434556287⟩⟩, + ⟨⟨-2993010967385733457557805130824248600049587299,-2993010967385733457557805130824248600049587298⟩,⟨-8477584134771038027380757539664475025109897195,-8477584134771038027380757539664475025109897194⟩⟩, + ⟨⟨36740000530903549179242744618876662761328217528,36740000530903549179242744618876662761328217529⟩,⟨-38725909675336766270371375638157239944250783355,-38725909675336766270371375638157239944250783354⟩⟩, + ⟨⟨237807339578178217599688308334930308313792681190,237807339578178217599688308334930308313792681192⟩,⟨143033502570253752306651168439710554218696341604,143033502570253752306651168439710554218696341606⟩⟩, + ⟨⟨-617290651089446036107297740240718846352083737068,-617290651089446036107297740240718846352083737065⟩,⟨1105035290191721603253433007143481561486995246655,1105035290191721603253433007143481561486995246657⟩⟩, + ⟨⟨-4181102885625274958612506171323583265642739062976,-4181102885625274958612506171323583265642739062971⟩,⟨-2951600707945953576712051246666222876493622782004,-2951600707945953576712051246666222876493622781999⟩⟩, + ⟨⟨13626829100143831002432255547117791185201301815482,13626829100143831002432255547117791185201301815497⟩,⟨-12625533427735394036052883974212571855837940857956,-12625533427735394036052883974212571855837940857941⟩⟩, + ⟨⟨27145825908010544668651317555376307847962439529686,27145825908010544668651317555376307847962439529716⟩,⟨54939993491317999036653769640281502938705651955468,54939993491317999036653769640281502938705651955498⟩⟩, + ⟨⟨-184698267783179487010985066437890271685102435202043,-184698267783179487010985066437890271685102435201887⟩,⟨20099163962784494112267340298482556679038344747251,20099163962784494112267340298482556679038344747407⟩⟩, + ⟨⟨150237544484954099262579110127895286553995981077030,150237544484954099262579110127895286553995981077548⟩,⟨-500738148251909518001982751513544406380190286205341,-500738148251909518001982751513544406380190286204822⟩⟩, + ⟨⟨1025074771600905714890786185118063716958472420103612,1025074771600905714890786185118063716958472420104675⟩,⟨919450694826750109993394757699342026494652501421073,919450694826750109993394757699342026494652501422134⟩⟩, + ⟨⟨-3191550041085364567466455646638569875956449319306512,-3191550041085364567466455646638569875956449319303357⟩,⟨1228940470138445349385690119429611907594944240248307,1228940470138445349385690119429611907594944240251458⟩⟩] +lemma tw1_0_6_12_calc (j : Fin 31) : taylorWaveBox 1 0 6 12 j = tw1_0_6_12 j := by + revert j + decide +kernel +def tw1_0_6_13 : Fin 31 → CI := ![⟨⟨-80803239647389466496139389310494445732803948236525,-80803239647389466496139389310494445732803948235869⟩,⟨608508302626814138064574768305195621609305143988970,608508302626814138064574768305195621609305143989627⟩⟩, + ⟨⟨-192714356346334788848706212249107414377613157916176,-192714356346334788848706212249107414377613157915975⟩,⟨-128468151230526933165872573849123613327195241615525,-128468151230526933165872573849123613327195241615324⟩⟩, + ⟨⟨69449452389608661552023805794565419852314627769213,69449452389608661552023805794565419852314627769300⟩,⟨-43700082204178521370431086682938072621854299169284,-43700082204178521370431086682938072621854299169197⟩⟩, + ⟨⟨4930250244921717143602991576749980832409427643158,4930250244921717143602991576749980832409427643182⟩,⟨26630654975690275902539044674274359465562152044479,26630654975690275902539044674274359465562152044504⟩⟩, + ⟨⟨-8168896064593306515372000553126889469784449914923,-8168896064593306515372000553126889469784449914918⟩,⟨-1173095229423788914012025269165221678418116689507,-1173095229423788914012025269165221678418116689502⟩⟩, + ⟨⟨898248238327448315578464872267750866350974537021,898248238327448315578464872267750866350974537024⟩,⟨-2114410670216918045705357053959285537273986995963,-2114410670216918045705357053959285537273986995960⟩⟩, + ⟨⟨484228531472227345026729065577876803745173045977,484228531472227345026729065577876803745173045979⟩,⟨314207708973935769506469061706341862459645878584,314207708973935769506469061706341862459645878585⟩⟩, + ⟨⟨-77004345216511380988029944275761319911924651128,-77004345216511380988029944275761319911924651126⟩,⟨103747632945865600495775974258003851984407986648,103747632945865600495775974258003851984407986649⟩⟩, + ⟨⟨-21611143162230439509206254093962032487963200410,-21611143162230439509206254093962032487963200409⟩,⟨-13377724939662341441170921078374825348125470218,-13377724939662341441170921078374825348125470217⟩⟩, + ⟨⟨1164616975181263640604026542870607497479024871,1164616975181263640604026542870607497479024872⟩,⟨-4187083016989858252994164329967604774883880370,-4187083016989858252994164329967604774883880369⟩⟩, + ⟨⟨618576802785333723142608862029605371461890877,618576802785333723142608862029605371461890878⟩,⟨-180981894075875458319400934573376025604710674,-180981894075875458319400934573376025604710673⟩⟩, + ⟨⟨79474067501226803993740794102029814114782695,79474067501226803993740794102029814114782696⟩,⟨29227869987735618643586297762600870080730707,29227869987735618643586297762600870080730708⟩⟩, + ⟨⟨9464168378270073334808742225880387217970112,9464168378270073334808742225880387217970113⟩,⟨4839634790961341134914426358635807970329041,4839634790961341134914426358635807970329042⟩⟩, + ⟨⟨1526929380204947462368079169984848630790428,1526929380204947462368079169984848630790429⟩,⟨-111619969897874808536023514014399582364327,-111619969897874808536023514014399582364326⟩⟩, + ⟨⟨79148746915032738280001832318300360333229,79148746915032738280001832318300360333230⟩,⟨-346647202262940771091850374004934447035442,-346647202262940771091850374004934447035441⟩⟩, + ⟨⟨-203619747358856082768689395743823742140903,-203619747358856082768689395743823742140902⟩,⟨-1,1⟩⟩, + ⟨⟨79148746915032738280001832318300360333229,79148746915032738280001832318300360333230⟩,⟨346647202262940771091850374004934447035441,346647202262940771091850374004934447035442⟩⟩, + ⟨⟨1526929380204947462368079169984848630790428,1526929380204947462368079169984848630790429⟩,⟨111619969897874808536023514014399582364326,111619969897874808536023514014399582364327⟩⟩, + ⟨⟨9464168378270073334808742225880387217970112,9464168378270073334808742225880387217970113⟩,⟨-4839634790961341134914426358635807970329042,-4839634790961341134914426358635807970329041⟩⟩, + ⟨⟨79474067501226803993740794102029814114782695,79474067501226803993740794102029814114782696⟩,⟨-29227869987735618643586297762600870080730708,-29227869987735618643586297762600870080730707⟩⟩, + ⟨⟨618576802785333723142608862029605371461890877,618576802785333723142608862029605371461890878⟩,⟨180981894075875458319400934573376025604710673,180981894075875458319400934573376025604710674⟩⟩, + ⟨⟨1164616975181263640604026542870607497479024871,1164616975181263640604026542870607497479024872⟩,⟨4187083016989858252994164329967604774883880369,4187083016989858252994164329967604774883880370⟩⟩, + ⟨⟨-21611143162230439509206254093962032487963200410,-21611143162230439509206254093962032487963200409⟩,⟨13377724939662341441170921078374825348125470217,13377724939662341441170921078374825348125470218⟩⟩, + ⟨⟨-77004345216511380988029944275761319911924651128,-77004345216511380988029944275761319911924651126⟩,⟨-103747632945865600495775974258003851984407986649,-103747632945865600495775974258003851984407986648⟩⟩, + ⟨⟨484228531472227345026729065577876803745173045977,484228531472227345026729065577876803745173045979⟩,⟨-314207708973935769506469061706341862459645878585,-314207708973935769506469061706341862459645878584⟩⟩, + ⟨⟨898248238327448315578464872267750866350974537021,898248238327448315578464872267750866350974537024⟩,⟨2114410670216918045705357053959285537273986995960,2114410670216918045705357053959285537273986995963⟩⟩, + ⟨⟨-8168896064593306515372000553126889469784449914923,-8168896064593306515372000553126889469784449914918⟩,⟨1173095229423788914012025269165221678418116689502,1173095229423788914012025269165221678418116689507⟩⟩, + ⟨⟨4930250244921717143602991576749980832409427643158,4930250244921717143602991576749980832409427643182⟩,⟨-26630654975690275902539044674274359465562152044504,-26630654975690275902539044674274359465562152044479⟩⟩, + ⟨⟨69449452389608661552023805794565419852314627769213,69449452389608661552023805794565419852314627769300⟩,⟨43700082204178521370431086682938072621854299169197,43700082204178521370431086682938072621854299169284⟩⟩, + ⟨⟨-192714356346334788848706212249107414377613157916176,-192714356346334788848706212249107414377613157915975⟩,⟨128468151230526933165872573849123613327195241615324,128468151230526933165872573849123613327195241615525⟩⟩, + ⟨⟨-80803239647389466496139389310494445732803948236525,-80803239647389466496139389310494445732803948235869⟩,⟨-608508302626814138064574768305195621609305143989627,-608508302626814138064574768305195621609305143988970⟩⟩] +lemma tw1_0_6_13_calc (j : Fin 31) : taylorWaveBox 1 0 6 13 j = tw1_0_6_13 j := by + revert j + decide +kernel +def tw1_0_6_14 : Fin 31 → CI := ![⟨⟨102740073987280864712977865660164895230385943220598,102740073987280864712977865660164895230385943220721⟩,⟨-10674665994838348546193797440469840681088500976181,-10674665994838348546193797440469840681088500976059⟩⟩, + ⟨⟨-12051306873836987011992695231832831828175009062637,-12051306873836987011992695231832831828175009062602⟩,⟨34475557799996327696409806683354589452066528696745,34475557799996327696409806683354589452066528696779⟩⟩, + ⟨⟨-8924294950360514503289032497533966659153528190501,-8924294950360514503289032497533966659153528190487⟩,⟨-8132389849059967296999683402345715361888509190508,-8132389849059967296999683402345715361888509190494⟩⟩, + ⟨⟨3292334110290476708349666868987525022416364665412,3292334110290476708349666868987525022416364665416⟩,⟨-1691151623307469115946121217374315134186855611913,-1691151623307469115946121217374315134186855611909⟩⟩, + ⟨⟨180030475729738076513214582511341090516640646498,180030475729738076513214582511341090516640646500⟩,⟨1026264503423966608420945051709153830870523842660,1026264503423966608420945051709153830870523842662⟩⟩, + ⟨⟨-265920550424026232636003019160807926855474496685,-265920550424026232636003019160807926855474496684⟩,⟨-14950970016262593693418844272774212272558227786,-14950970016262593693418844272774212272558227784⟩⟩, + ⟨⟨11831659730034593701100523276718546034189937383,11831659730034593701100523276718546034189937384⟩,⟨-59877932788038811252972472411312629367499649945,-59877932788038811252972472411312629367499649944⟩⟩, + ⟨⟨12077642495613049738490495244901711195812918384,12077642495613049738490495244901711195812918385⟩,⟨2645736793226574849899943436202074355945881131,2645736793226574849899943436202074355945881132⟩⟩, + ⟨⟨-172830784050040319899609219532405543308307046,-172830784050040319899609219532405543308307045⟩,⟨2175529044343265668643521831142026906881511706,2175529044343265668643521831142026906881511707⟩⟩, + ⟨⟨-319778344296482932578818464833644316970372073,-319778344296482932578818464833644316970372072⟩,⟨88202362796086067819037326650900036224688753,88202362796086067819037326650900036224688754⟩⟩, + ⟨⟨-34162485298017231613044674563977982144976767,-34162485298017231613044674563977982144976766⟩,⟨-26630988530054870208816891258011459014784854,-26630988530054870208816891258011459014784853⟩⟩, + ⟨⟨-1845632921082365242671482533759298743084775,-1845632921082365242671482533759298743084774⟩,⟨-4615486140040923629392130847049541909710024,-4615486140040923629392130847049541909710023⟩⟩, + ⟨⟨-213280344938233163686322850426935244981287,-213280344938233163686322850426935244981286⟩,⟨-499766199749168318197455181308896766041980,-499766199749168318197455181308896766041979⟩⟩, + ⟨⟨-62397546524647082870001495347038396274041,-62397546524647082870001495347038396274040⟩,⟨-28929125444702360790838069617791925052182,-28929125444702360790838069617791925052181⟩⟩, + ⟨⟨-6889498412060717563946240483185151274711,-6889498412060717563946240483185151274710⟩,⟨12749424904899482272182462756026948875184,12749424904899482272182462756026948875185⟩⟩, + ⟨⟨7996128780354899679002493874507078274717,7996128780354899679002493874507078274718⟩,⟨-1,1⟩⟩, + ⟨⟨-6889498412060717563946240483185151274711,-6889498412060717563946240483185151274710⟩,⟨-12749424904899482272182462756026948875185,-12749424904899482272182462756026948875184⟩⟩, + ⟨⟨-62397546524647082870001495347038396274041,-62397546524647082870001495347038396274040⟩,⟨28929125444702360790838069617791925052181,28929125444702360790838069617791925052182⟩⟩, + ⟨⟨-213280344938233163686322850426935244981287,-213280344938233163686322850426935244981286⟩,⟨499766199749168318197455181308896766041979,499766199749168318197455181308896766041980⟩⟩, + ⟨⟨-1845632921082365242671482533759298743084775,-1845632921082365242671482533759298743084774⟩,⟨4615486140040923629392130847049541909710023,4615486140040923629392130847049541909710024⟩⟩, + ⟨⟨-34162485298017231613044674563977982144976767,-34162485298017231613044674563977982144976766⟩,⟨26630988530054870208816891258011459014784853,26630988530054870208816891258011459014784854⟩⟩, + ⟨⟨-319778344296482932578818464833644316970372073,-319778344296482932578818464833644316970372072⟩,⟨-88202362796086067819037326650900036224688754,-88202362796086067819037326650900036224688753⟩⟩, + ⟨⟨-172830784050040319899609219532405543308307046,-172830784050040319899609219532405543308307045⟩,⟨-2175529044343265668643521831142026906881511707,-2175529044343265668643521831142026906881511706⟩⟩, + ⟨⟨12077642495613049738490495244901711195812918384,12077642495613049738490495244901711195812918385⟩,⟨-2645736793226574849899943436202074355945881132,-2645736793226574849899943436202074355945881131⟩⟩, + ⟨⟨11831659730034593701100523276718546034189937383,11831659730034593701100523276718546034189937384⟩,⟨59877932788038811252972472411312629367499649944,59877932788038811252972472411312629367499649945⟩⟩, + ⟨⟨-265920550424026232636003019160807926855474496685,-265920550424026232636003019160807926855474496684⟩,⟨14950970016262593693418844272774212272558227784,14950970016262593693418844272774212272558227786⟩⟩, + ⟨⟨180030475729738076513214582511341090516640646498,180030475729738076513214582511341090516640646500⟩,⟨-1026264503423966608420945051709153830870523842662,-1026264503423966608420945051709153830870523842660⟩⟩, + ⟨⟨3292334110290476708349666868987525022416364665412,3292334110290476708349666868987525022416364665416⟩,⟨1691151623307469115946121217374315134186855611909,1691151623307469115946121217374315134186855611913⟩⟩, + ⟨⟨-8924294950360514503289032497533966659153528190501,-8924294950360514503289032497533966659153528190487⟩,⟨8132389849059967296999683402345715361888509190494,8132389849059967296999683402345715361888509190508⟩⟩, + ⟨⟨-12051306873836987011992695231832831828175009062637,-12051306873836987011992695231832831828175009062602⟩,⟨-34475557799996327696409806683354589452066528696779,-34475557799996327696409806683354589452066528696745⟩⟩, + ⟨⟨102740073987280864712977865660164895230385943220598,102740073987280864712977865660164895230385943220721⟩,⟨10674665994838348546193797440469840681088500976059,10674665994838348546193797440469840681088500976181⟩⟩] +lemma tw1_0_6_14_calc (j : Fin 31) : taylorWaveBox 1 0 6 14 j = tw1_0_6_14 j := by + revert j + decide +kernel +def tw1_0_6_15 : Fin 31 → CI := ![⟨⟨-5441158973978438675429862439631597204346792814337,-5441158973978438675429862439631597204346792814316⟩,⟨-15427399662900746861595752982507896656634656592225,-15427399662900746861595752982507896656634656592204⟩⟩, + ⟨⟨5400690514012782496277513638482047786832935067786,5400690514012782496277513638482047786832935067792⟩,⟨457956820809381869648911917937693624409210322861,457956820809381869648911917937693624409210322867⟩⟩, + ⟨⟨-755559256996336989293900253305633566182345535477,-755559256996336989293900253305633566182345535474⟩,⟨1491665540033137432169001514934135174936351426610,1491665540033137432169001514934135174936351426612⟩⟩, + ⟨⟨-330033776945282087971414239085229848881176321150,-330033776945282087971414239085229848881176321148⟩,⟨-343109796050387851828682381024260677903066314219,-343109796050387851828682381024260677903066314217⟩⟩, + ⟨⟨109245289407367526810005060632629576912068444855,109245289407367526810005060632629576912068444857⟩,⟨-58262041530297994689719480097342626981377690001,-58262041530297994689719480097342626981377690000⟩⟩, + ⟨⟨8293437895003632693309234897152724619500821155,8293437895003632693309234897152724619500821156⟩,⟨27853699227936027799258089465075293573012196038,27853699227936027799258089465075293573012196039⟩⟩, + ⟨⟨-5970005172767837822617970684281934619646576478,-5970005172767837822617970684281934619646576477⟩,⟨1119840418116693480155780900691615992238105046,1119840418116693480155780900691615992238105047⟩⟩, + ⟨⟨-229085948984915261888471307902349346199499771,-229085948984915261888471307902349346199499770⟩,⟨-1089760920515598041640148334575689004513149206,-1089760920515598041640148334575689004513149205⟩⟩, + ⟨⟨162735465885650206332500915725126893397679209,162735465885650206332500915725126893397679210⟩,⟨-67986622149567654477072871082621075406336813,-67986622149567654477072871082621075406336812⟩⟩, + ⟨⟨17252232810211935078645512455308764110120663,17252232810211935078645512455308764110120664⟩,⟨16438348239711194686208833019197554186259235,16438348239711194686208833019197554186259236⟩⟩, + ⟨⟨-104411710434768703302632743604877331980650,-104411710434768703302632743604877331980649⟩,⟨2737949178852866675021299448096262936292750,2737949178852866675021299448096262936292751⟩⟩, + ⟨⟨-121327754337409555116949538844800720485136,-121327754337409555116949538844800720485135⟩,⟨246381783547243122244701486068296937905831,246381783547243122244701486068296937905832⟩⟩, + ⟨⟨-7509939841851136620768466223871818918808,-7509939841851136620768466223871818918807⟩,⟨25040334811631588031959945954697068936551,25040334811631588031959945954697068936552⟩⟩, + ⟨⟨1712197939889483666564299553571113607591,1712197939889483666564299553571113607592⟩,⟨2350444602047037285128688216658019975451,2350444602047037285128688216658019975452⟩⟩, + ⟨⟨385529055465429899019842691128894559877,385529055465429899019842691128894559878⟩,⟨-400485624278328647248780134951970565992,-400485624278328647248780134951970565991⟩⟩, + ⟨⟨-295536228629657250031013603150058568957,-295536228629657250031013603150058568956⟩,⟨-1,1⟩⟩, + ⟨⟨385529055465429899019842691128894559877,385529055465429899019842691128894559878⟩,⟨400485624278328647248780134951970565991,400485624278328647248780134951970565992⟩⟩, + ⟨⟨1712197939889483666564299553571113607591,1712197939889483666564299553571113607592⟩,⟨-2350444602047037285128688216658019975452,-2350444602047037285128688216658019975451⟩⟩, + ⟨⟨-7509939841851136620768466223871818918808,-7509939841851136620768466223871818918807⟩,⟨-25040334811631588031959945954697068936552,-25040334811631588031959945954697068936551⟩⟩, + ⟨⟨-121327754337409555116949538844800720485136,-121327754337409555116949538844800720485135⟩,⟨-246381783547243122244701486068296937905832,-246381783547243122244701486068296937905831⟩⟩, + ⟨⟨-104411710434768703302632743604877331980650,-104411710434768703302632743604877331980649⟩,⟨-2737949178852866675021299448096262936292751,-2737949178852866675021299448096262936292750⟩⟩, + ⟨⟨17252232810211935078645512455308764110120663,17252232810211935078645512455308764110120664⟩,⟨-16438348239711194686208833019197554186259236,-16438348239711194686208833019197554186259235⟩⟩, + ⟨⟨162735465885650206332500915725126893397679209,162735465885650206332500915725126893397679210⟩,⟨67986622149567654477072871082621075406336812,67986622149567654477072871082621075406336813⟩⟩, + ⟨⟨-229085948984915261888471307902349346199499771,-229085948984915261888471307902349346199499770⟩,⟨1089760920515598041640148334575689004513149205,1089760920515598041640148334575689004513149206⟩⟩, + ⟨⟨-5970005172767837822617970684281934619646576478,-5970005172767837822617970684281934619646576477⟩,⟨-1119840418116693480155780900691615992238105047,-1119840418116693480155780900691615992238105046⟩⟩, + ⟨⟨8293437895003632693309234897152724619500821155,8293437895003632693309234897152724619500821156⟩,⟨-27853699227936027799258089465075293573012196039,-27853699227936027799258089465075293573012196038⟩⟩, + ⟨⟨109245289407367526810005060632629576912068444855,109245289407367526810005060632629576912068444857⟩,⟨58262041530297994689719480097342626981377690000,58262041530297994689719480097342626981377690001⟩⟩, + ⟨⟨-330033776945282087971414239085229848881176321150,-330033776945282087971414239085229848881176321148⟩,⟨343109796050387851828682381024260677903066314217,343109796050387851828682381024260677903066314219⟩⟩, + ⟨⟨-755559256996336989293900253305633566182345535477,-755559256996336989293900253305633566182345535474⟩,⟨-1491665540033137432169001514934135174936351426612,-1491665540033137432169001514934135174936351426610⟩⟩, + ⟨⟨5400690514012782496277513638482047786832935067786,5400690514012782496277513638482047786832935067792⟩,⟨-457956820809381869648911917937693624409210322867,-457956820809381869648911917937693624409210322861⟩⟩, + ⟨⟨-5441158973978438675429862439631597204346792814337,-5441158973978438675429862439631597204346792814316⟩,⟨15427399662900746861595752982507896656634656592204,15427399662900746861595752982507896656634656592225⟩⟩] +lemma tw1_0_6_15_calc (j : Fin 31) : taylorWaveBox 1 0 6 15 j = tw1_0_6_15 j := by + revert j + decide +kernel +def tw1_0_6_16 : Fin 31 → CI := ![⟨⟨-2053892047714957288979032954955687282474857583137,-2053892047714957288979032954955687282474857583133⟩,⟨1329902331780364502751682624354112334805838963382,1329902331780364502751682624354112334805838963387⟩⟩, + ⟨⟨-126353017717467377745581448011768693660585748696,-126353017717467377745581448011768693660585748694⟩,⟨-749117730327107759771312107673116535076163702326,-749117730327107759771312107673116535076163702324⟩⟩, + ⟨⟨214400757433420580022385080936695021824957779836,214400757433420580022385080936695021824957779837⟩,⟨43170470792767750339060245234440086989894553951,43170470792767750339060245234440086989894553953⟩⟩, + ⟨⟨-28402285478527908394786053459602723966891406186,-28402285478527908394786053459602723966891406185⟩,⟨50377964943769181479629156251825571025766940197,50377964943769181479629156251825571025766940198⟩⟩, + ⟨⟨-10027551646022592013735913787392727678605191708,-10027551646022592013735913787392727678605191707⟩,⟨-9618265491046987833150425850318222644396074175,-9618265491046987833150425850318222644396074174⟩⟩, + ⟨⟨2411275295887738908307160183261252295185066396,2411275295887738908307160183261252295185066397⟩,⟨-1776431951761378979781485819021408986241772009,-1776431951761378979781485819021408986241772008⟩⟩, + ⟨⟨306117005217014669604440326849277249990116120,306117005217014669604440326849277249990116121⟩,⟨481891428343365916845791296487372011926019930,481891428343365916845791296487372011926019931⟩⟩, + ⟨⟨-76536352385032301968821775378497556657180779,-76536352385032301968821775378497556657180778⟩,⟨55810072599978517758147042721619263262090862,55810072599978517758147042721619263262090863⟩⟩, + ⟨⟨-10295057616017913570912860923098446284868086,-10295057616017913570912860923098446284868085⟩,⟨-8672312429195114286185079886166061943165825,-8672312429195114286185079886166061943165824⟩⟩, + ⟨⟨354127802856996914552278087047127054260868,354127802856996914552278087047127054260869⟩,⟨-1577500820274056446344915713374326243962186,-1577500820274056446344915713374326243962185⟩⟩, + ⟨⟨136384178258500231325482666436208445245053,136384178258500231325482666436208445245054⟩,⟨-90510433277832937047638345915310798309989,-90510433277832937047638345915310798309988⟩⟩, + ⟨⟨13791078329667003811893664666594493881226,13791078329667003811893664666594493881227⟩,⟨-3894638263584933241793469251733540386126,-3894638263584933241793469251733540386125⟩⟩, + ⟨⟨990540167508551346533867817955061270331,990540167508551346533867817955061270332⟩,⟨-655617281751109655649189921496800830801,-655617281751109655649189921496800830800⟩⟩, + ⟨⟨-14185875003372389425996223009674665334,-14185875003372389425996223009674665333⟩,⟨-115249873823936689252967134974380225143,-115249873823936689252967134974380225142⟩⟩, + ⟨⟨-17340720954707724708725481524187778863,-17340720954707724708725481524187778862⟩,⟨10241390290025998180955843049785115992,10241390290025998180955843049785115993⟩⟩, + ⟨⟨10316160497028497155245978786890423141,10316160497028497155245978786890423142⟩,⟨-1,1⟩⟩, + ⟨⟨-17340720954707724708725481524187778863,-17340720954707724708725481524187778862⟩,⟨-10241390290025998180955843049785115993,-10241390290025998180955843049785115992⟩⟩, + ⟨⟨-14185875003372389425996223009674665334,-14185875003372389425996223009674665333⟩,⟨115249873823936689252967134974380225142,115249873823936689252967134974380225143⟩⟩, + ⟨⟨990540167508551346533867817955061270331,990540167508551346533867817955061270332⟩,⟨655617281751109655649189921496800830800,655617281751109655649189921496800830801⟩⟩, + ⟨⟨13791078329667003811893664666594493881226,13791078329667003811893664666594493881227⟩,⟨3894638263584933241793469251733540386125,3894638263584933241793469251733540386126⟩⟩, + ⟨⟨136384178258500231325482666436208445245053,136384178258500231325482666436208445245054⟩,⟨90510433277832937047638345915310798309988,90510433277832937047638345915310798309989⟩⟩, + ⟨⟨354127802856996914552278087047127054260868,354127802856996914552278087047127054260869⟩,⟨1577500820274056446344915713374326243962185,1577500820274056446344915713374326243962186⟩⟩, + ⟨⟨-10295057616017913570912860923098446284868086,-10295057616017913570912860923098446284868085⟩,⟨8672312429195114286185079886166061943165824,8672312429195114286185079886166061943165825⟩⟩, + ⟨⟨-76536352385032301968821775378497556657180779,-76536352385032301968821775378497556657180778⟩,⟨-55810072599978517758147042721619263262090863,-55810072599978517758147042721619263262090862⟩⟩, + ⟨⟨306117005217014669604440326849277249990116120,306117005217014669604440326849277249990116121⟩,⟨-481891428343365916845791296487372011926019931,-481891428343365916845791296487372011926019930⟩⟩, + ⟨⟨2411275295887738908307160183261252295185066396,2411275295887738908307160183261252295185066397⟩,⟨1776431951761378979781485819021408986241772008,1776431951761378979781485819021408986241772009⟩⟩, + ⟨⟨-10027551646022592013735913787392727678605191708,-10027551646022592013735913787392727678605191707⟩,⟨9618265491046987833150425850318222644396074174,9618265491046987833150425850318222644396074175⟩⟩, + ⟨⟨-28402285478527908394786053459602723966891406186,-28402285478527908394786053459602723966891406185⟩,⟨-50377964943769181479629156251825571025766940198,-50377964943769181479629156251825571025766940197⟩⟩, + ⟨⟨214400757433420580022385080936695021824957779836,214400757433420580022385080936695021824957779837⟩,⟨-43170470792767750339060245234440086989894553953,-43170470792767750339060245234440086989894553951⟩⟩, + ⟨⟨-126353017717467377745581448011768693660585748696,-126353017717467377745581448011768693660585748694⟩,⟨749117730327107759771312107673116535076163702324,749117730327107759771312107673116535076163702326⟩⟩, + ⟨⟨-2053892047714957288979032954955687282474857583137,-2053892047714957288979032954955687282474857583133⟩,⟨-1329902331780364502751682624354112334805838963387,-1329902331780364502751682624354112334805838963382⟩⟩] +lemma tw1_0_6_16_calc (j : Fin 31) : taylorWaveBox 1 0 6 16 j = tw1_0_6_16 j := by + revert j + decide +kernel +def tw1_0_6_17 : Fin 31 → CI := ![⟨⟨251167084031640464495438553598495928649553753667,251167084031640464495438553598495928649553753669⟩,⟨239024975151081401545362078466618916402243140824,239024975151081401545362078466618916402243140825⟩⟩, + ⟨⟨-92160525297604312750938706822035158594266580435,-92160525297604312750938706822035158594266580434⟩,⟨41022274563893440754420503947493383464304953520,41022274563893440754420503947493383464304953521⟩⟩, + ⟨⟨-1934804092068661197095244728469021018743167220,-1934804092068661197095244728469021018743167219⟩,⟨-27030773392457416284380083208042689520616103392,-27030773392457416284380083208042689520616103391⟩⟩, + ⟨⟨6492476069877207172482852069454289884646193889,6492476069877207172482852069454289884646193890⟩,⟨1464852562577491988560261103508774467654826048,1464852562577491988560261103508774467654826049⟩⟩, + ⟨⟨-640276189975881094236551360193773099520994682,-640276189975881094236551360193773099520994681⟩,⟨1331307977707669429418599853812628152007831582,1331307977707669429418599853812628152007831583⟩⟩, + ⟨⟨-242921452666063665425216086949699808774798333,-242921452666063665425216086949699808774798332⟩,⟨-162752852351210938977489178160852536101353123,-162752852351210938977489178160852536101353122⟩⟩, + ⟨⟨29716542032103630346636448953945198882688962,29716542032103630346636448953945198882688963⟩,⟨-41243620083506472346929182456434816036361950,-41243620083506472346929182456434816036361949⟩⟩, + ⟨⟨6632356330990063891911058091449610112806865,6632356330990063891911058091449610112806866⟩,⟨3778863416397535553315405340199406700196569,3778863416397535553315405340199406700196570⟩⟩, + ⟨⟨-217192258980139985083737091128695189058101,-217192258980139985083737091128695189058100⟩,⟨948776855220058667412672384533234149946886,948776855220058667412672384533234149946887⟩⟩, + ⟨⟨-98655792462058072909790607820378687997643,-98655792462058072909790607820378687997642⟩,⟨32649012086236368375597165719806511663253,32649012086236368375597165719806511663254⟩⟩, + ⟨⟨-8667261047463075969190683853322158705919,-8667261047463075969190683853322158705918⟩,⟨-3270961340005838780272270157709095135047,-3270961340005838780272270157709095135046⟩⟩, + ⟨⟨-599166342529532927529322731841016430172,-599166342529532927529322731841016430171⟩,⟨-377942925193238998089867932424488183401,-377942925193238998089867932424488183400⟩⟩, + ⟨⟨-50823955192213661845442297824485980834,-50823955192213661845442297824485980833⟩,⟨-5616270089750116384817133065301262702,-5616270089750116384817133065301262701⟩⟩, + ⟨⟨-1648239319770889515818260058002170101,-1648239319770889515818260058002170100⟩,⟨4071865047799485313796275781703495112,4071865047799485313796275781703495113⟩⟩, + ⟨⟨667524006172599014751327501070872612,667524006172599014751327501070872613⟩,⟨-179385712960318977891330217488725477,-179385712960318977891330217488725476⟩⟩, + ⟨⟨-341149200323346912658894710262681501,-341149200323346912658894710262681500⟩,⟨-1,1⟩⟩, + ⟨⟨667524006172599014751327501070872612,667524006172599014751327501070872613⟩,⟨179385712960318977891330217488725476,179385712960318977891330217488725477⟩⟩, + ⟨⟨-1648239319770889515818260058002170101,-1648239319770889515818260058002170100⟩,⟨-4071865047799485313796275781703495113,-4071865047799485313796275781703495112⟩⟩, + ⟨⟨-50823955192213661845442297824485980834,-50823955192213661845442297824485980833⟩,⟨5616270089750116384817133065301262701,5616270089750116384817133065301262702⟩⟩, + ⟨⟨-599166342529532927529322731841016430172,-599166342529532927529322731841016430171⟩,⟨377942925193238998089867932424488183400,377942925193238998089867932424488183401⟩⟩, + ⟨⟨-8667261047463075969190683853322158705919,-8667261047463075969190683853322158705918⟩,⟨3270961340005838780272270157709095135046,3270961340005838780272270157709095135047⟩⟩, + ⟨⟨-98655792462058072909790607820378687997643,-98655792462058072909790607820378687997642⟩,⟨-32649012086236368375597165719806511663254,-32649012086236368375597165719806511663253⟩⟩, + ⟨⟨-217192258980139985083737091128695189058101,-217192258980139985083737091128695189058100⟩,⟨-948776855220058667412672384533234149946887,-948776855220058667412672384533234149946886⟩⟩, + ⟨⟨6632356330990063891911058091449610112806865,6632356330990063891911058091449610112806866⟩,⟨-3778863416397535553315405340199406700196570,-3778863416397535553315405340199406700196569⟩⟩, + ⟨⟨29716542032103630346636448953945198882688962,29716542032103630346636448953945198882688963⟩,⟨41243620083506472346929182456434816036361949,41243620083506472346929182456434816036361950⟩⟩, + ⟨⟨-242921452666063665425216086949699808774798333,-242921452666063665425216086949699808774798332⟩,⟨162752852351210938977489178160852536101353122,162752852351210938977489178160852536101353123⟩⟩, + ⟨⟨-640276189975881094236551360193773099520994682,-640276189975881094236551360193773099520994681⟩,⟨-1331307977707669429418599853812628152007831583,-1331307977707669429418599853812628152007831582⟩⟩, + ⟨⟨6492476069877207172482852069454289884646193889,6492476069877207172482852069454289884646193890⟩,⟨-1464852562577491988560261103508774467654826049,-1464852562577491988560261103508774467654826048⟩⟩, + ⟨⟨-1934804092068661197095244728469021018743167220,-1934804092068661197095244728469021018743167219⟩,⟨27030773392457416284380083208042689520616103391,27030773392457416284380083208042689520616103392⟩⟩, + ⟨⟨-92160525297604312750938706822035158594266580435,-92160525297604312750938706822035158594266580434⟩,⟨-41022274563893440754420503947493383464304953521,-41022274563893440754420503947493383464304953520⟩⟩, + ⟨⟨251167084031640464495438553598495928649553753667,251167084031640464495438553598495928649553753669⟩,⟨-239024975151081401545362078466618916402243140825,-239024975151081401545362078466618916402243140824⟩⟩] +lemma tw1_0_6_17_calc (j : Fin 31) : taylorWaveBox 1 0 6 17 j = tw1_0_6_17 j := by + revert j + decide +kernel +def tw1_0_6_18 : Fin 31 → CI := ![⟨⟨23397649421456289254326390834153852372218139649,23397649421456289254326390834153852372218139650⟩,⟨-40386885476981700047785666205193172449507286887,-40386885476981700047785666205193172449507286886⟩⟩, + ⟨⟨7907124596838730626641804935512991603231589956,7907124596838730626641804935512991603231589957⟩,⟨9970779483640344910602625282437990667770201468,9970779483640344910602625282437990667770201469⟩⟩, + ⟨⟨-3005760304664801617880625638330315856998826117,-3005760304664801617880625638330315856998826116⟩,⟨1068693352725721407346314593656212621920004536,1068693352725721407346314593656212621920004537⟩⟩, + ⟨⟨-50568149607816614481912675321902821091388572,-50568149607816614481912675321902821091388571⟩,⟨-725910204649648555515972413198471208538434226,-725910204649648555515972413198471208538434225⟩⟩, + ⟨⟨147911261376830474028273474242494652532446052,147911261376830474028273474242494652532446053⟩,⟨19637828380302124577133067286398145519888952,19637828380302124577133067286398145519888953⟩⟩, + ⟨⟨-6571263191753464554603804780342215132191249,-6571263191753464554603804780342215132191248⟩,⟨26311927516725327711523767120469393465435008,26311927516725327711523767120469393465435009⟩⟩, + ⟨⟨-4172839047926300414377330413595535735382533,-4172839047926300414377330413595535735382532⟩,⟨-1038225214835802887235818449662909877728767,-1038225214835802887235818449662909877728766⟩⟩, + ⟨⟨55452815142912501724500732555257529244634,55452815142912501724500732555257529244635⟩,⟨-581742316043807029757142148875571236775068,-581742316043807029757142148875571236775067⟩⟩, + ⟨⟨64780776018362302071043011430571813793809,64780776018362302071043011430571813793810⟩,⟨-16539183880886806732066564778468475332103,-16539183880886806732066564778468475332102⟩⟩, + ⟨⟨4808861403613551822439070656386479062814,4808861403613551822439070656386479062815⟩,⟨4139906248710503601889286971157492777579,4139906248710503601889286971157492777580⟩⟩, + ⟨⟨129567423613180743670219040952588353923,129567423613180743670219040952588353924⟩,⟨480940887179593685755010478501803196648,480940887179593685755010478501803196649⟩⟩, + ⟨⟨5630668941209169787682622737452516607,5630668941209169787682622737452516608⟩,⟨32788278061178123547937667018208054967,32788278061178123547937667018208054968⟩⟩, + ⟨⟨1449648035461227226802047290238705632,1449648035461227226802047290238705633⟩,⟨1507008364030644443515542937442480174,1507008364030644443515542937442480175⟩⟩, + ⟨⟨122848417164477953035208905394298928,122848417164477953035208905394298929⟩,⟨-99154210214925461563846672619955112,-99154210214925461563846672619955111⟩⟩, + ⟨⟨-22536320799964163772489785883103267,-22536320799964163772489785883103266⟩,⟨-189677491956347768309707987519814,-189677491956347768309707987519813⟩⟩, + ⟨⟨10717518215138593768370641597168866,10717518215138593768370641597168867⟩,⟨-1,1⟩⟩, + ⟨⟨-22536320799964163772489785883103267,-22536320799964163772489785883103266⟩,⟨189677491956347768309707987519813,189677491956347768309707987519814⟩⟩, + ⟨⟨122848417164477953035208905394298928,122848417164477953035208905394298929⟩,⟨99154210214925461563846672619955111,99154210214925461563846672619955112⟩⟩, + ⟨⟨1449648035461227226802047290238705632,1449648035461227226802047290238705633⟩,⟨-1507008364030644443515542937442480175,-1507008364030644443515542937442480174⟩⟩, + ⟨⟨5630668941209169787682622737452516607,5630668941209169787682622737452516608⟩,⟨-32788278061178123547937667018208054968,-32788278061178123547937667018208054967⟩⟩, + ⟨⟨129567423613180743670219040952588353923,129567423613180743670219040952588353924⟩,⟨-480940887179593685755010478501803196649,-480940887179593685755010478501803196648⟩⟩, + ⟨⟨4808861403613551822439070656386479062814,4808861403613551822439070656386479062815⟩,⟨-4139906248710503601889286971157492777580,-4139906248710503601889286971157492777579⟩⟩, + ⟨⟨64780776018362302071043011430571813793809,64780776018362302071043011430571813793810⟩,⟨16539183880886806732066564778468475332102,16539183880886806732066564778468475332103⟩⟩, + ⟨⟨55452815142912501724500732555257529244634,55452815142912501724500732555257529244635⟩,⟨581742316043807029757142148875571236775067,581742316043807029757142148875571236775068⟩⟩, + ⟨⟨-4172839047926300414377330413595535735382533,-4172839047926300414377330413595535735382532⟩,⟨1038225214835802887235818449662909877728766,1038225214835802887235818449662909877728767⟩⟩, + ⟨⟨-6571263191753464554603804780342215132191249,-6571263191753464554603804780342215132191248⟩,⟨-26311927516725327711523767120469393465435009,-26311927516725327711523767120469393465435008⟩⟩, + ⟨⟨147911261376830474028273474242494652532446052,147911261376830474028273474242494652532446053⟩,⟨-19637828380302124577133067286398145519888953,-19637828380302124577133067286398145519888952⟩⟩, + ⟨⟨-50568149607816614481912675321902821091388572,-50568149607816614481912675321902821091388571⟩,⟨725910204649648555515972413198471208538434225,725910204649648555515972413198471208538434226⟩⟩, + ⟨⟨-3005760304664801617880625638330315856998826117,-3005760304664801617880625638330315856998826116⟩,⟨-1068693352725721407346314593656212621920004537,-1068693352725721407346314593656212621920004536⟩⟩, + ⟨⟨7907124596838730626641804935512991603231589956,7907124596838730626641804935512991603231589957⟩,⟨-9970779483640344910602625282437990667770201469,-9970779483640344910602625282437990667770201468⟩⟩, + ⟨⟨23397649421456289254326390834153852372218139649,23397649421456289254326390834153852372218139650⟩,⟨40386885476981700047785666205193172449507286886,40386885476981700047785666205193172449507286887⟩⟩] +lemma tw1_0_6_18_calc (j : Fin 31) : taylorWaveBox 1 0 6 18 j = tw1_0_6_18 j := by + revert j + decide +kernel +def tw1_0_6_19 : Fin 31 → CI := ![⟨⟨-5734942649363095019685598390915212196386741680,-5734942649363095019685598390915212196386741679⟩,⟨-1708527352456770998243572413567952971285177395,-1708527352456770998243572413567952971285177394⟩⟩, + ⟨⟨923572258489801565590454430114791055136124693,923572258489801565590454430114791055136124694⟩,⟨-1218360748405275099231464130365024130744622534,-1218360748405275099231464130365024130744622533⟩⟩, + ⟨⟨205398247581841720427968458405948125224980024,205398247581841720427968458405948125224980025⟩,⟨292779712490792947593209643516792617666396463,292779712490792947593209643516792617666396464⟩⟩, + ⟨⟨-70884279615845568045398337322586893810128560,-70884279615845568045398337322586893810128559⟩,⟨26762500861635112431438072045980895248630795,26762500861635112431438072045980895248630796⟩⟩, + ⟨⟨-2630164879779322499407185443905371523958766,-2630164879779322499407185443905371523958765⟩,⟨-14109907036800013938486526510437168115260319,-14109907036800013938486526510437168115260318⟩⟩, + ⟨⟨2383420152614227340446400362885166623496941,2383420152614227340446400362885166623496942⟩,⟨-241107322216444723929175069588086678976612,-241107322216444723929175069588086678976611⟩⟩, + ⟨⟨47191987888840805846847253868020382085822,47191987888840805846847253868020382085823⟩,⟨343191256682329280675753088250291215956501,343191256682329280675753088250291215956502⟩⟩, + ⟨⟨-40338454113624696624424829278133866138062,-40338454113624696624424829278133866138061⟩,⟨13718701951124748953433048667509479454429,13718701951124748953433048667509479454430⟩⟩, + ⟨⟨-2900447000410664919790145282707793833657,-2900447000410664919790145282707793833656⟩,⟨-3273941553852637751268825630020644185458,-3273941553852637751268825630020644185457⟩⟩, + ⟨⟨62562045442303110391831201159715241086,62562045442303110391831201159715241087⟩,⟨-363667033209896421094524886682164785531,-363667033209896421094524886682164785530⟩⟩, + ⟨⟨16109070771608556368064417067586780730,16109070771608556368064417067586780731⟩,⟨-19773951374461257661969177077237124858,-19773951374461257661969177077237124857⟩⟩, + ⟨⟨921556318713307192319143768164126320,921556318713307192319143768164126321⟩,⟨-1168211008606030382626655206725358115,-1168211008606030382626655206725358114⟩⟩, + ⟨⟨-5798713784587267014643237420839517,-5798713784587267014643237420839516⟩,⟨-81234057975399380987058056609385300,-81234057975399380987058056609385299⟩⟩, + ⟨⟨-5323775508719643470291484941504511,-5323775508719643470291484941504510⟩,⟨924678117574687614282156482519028,924678117574687614282156482519029⟩⟩, + ⟨⟨672708714538400978484213008364025,672708714538400978484213008364026⟩,⟨192976565500326207648019685836350,192976565500326207648019685836351⟩⟩, + ⟨⟨-320667395137087612722416687117974,-320667395137087612722416687117973⟩,⟨-1,1⟩⟩, + ⟨⟨672708714538400978484213008364025,672708714538400978484213008364026⟩,⟨-192976565500326207648019685836351,-192976565500326207648019685836350⟩⟩, + ⟨⟨-5323775508719643470291484941504511,-5323775508719643470291484941504510⟩,⟨-924678117574687614282156482519029,-924678117574687614282156482519028⟩⟩, + ⟨⟨-5798713784587267014643237420839517,-5798713784587267014643237420839516⟩,⟨81234057975399380987058056609385299,81234057975399380987058056609385300⟩⟩, + ⟨⟨921556318713307192319143768164126320,921556318713307192319143768164126321⟩,⟨1168211008606030382626655206725358114,1168211008606030382626655206725358115⟩⟩, + ⟨⟨16109070771608556368064417067586780730,16109070771608556368064417067586780731⟩,⟨19773951374461257661969177077237124857,19773951374461257661969177077237124858⟩⟩, + ⟨⟨62562045442303110391831201159715241086,62562045442303110391831201159715241087⟩,⟨363667033209896421094524886682164785530,363667033209896421094524886682164785531⟩⟩, + ⟨⟨-2900447000410664919790145282707793833657,-2900447000410664919790145282707793833656⟩,⟨3273941553852637751268825630020644185457,3273941553852637751268825630020644185458⟩⟩, + ⟨⟨-40338454113624696624424829278133866138062,-40338454113624696624424829278133866138061⟩,⟨-13718701951124748953433048667509479454430,-13718701951124748953433048667509479454429⟩⟩, + ⟨⟨47191987888840805846847253868020382085822,47191987888840805846847253868020382085823⟩,⟨-343191256682329280675753088250291215956502,-343191256682329280675753088250291215956501⟩⟩, + ⟨⟨2383420152614227340446400362885166623496941,2383420152614227340446400362885166623496942⟩,⟨241107322216444723929175069588086678976611,241107322216444723929175069588086678976612⟩⟩, + ⟨⟨-2630164879779322499407185443905371523958766,-2630164879779322499407185443905371523958765⟩,⟨14109907036800013938486526510437168115260318,14109907036800013938486526510437168115260319⟩⟩, + ⟨⟨-70884279615845568045398337322586893810128560,-70884279615845568045398337322586893810128559⟩,⟨-26762500861635112431438072045980895248630796,-26762500861635112431438072045980895248630795⟩⟩, + ⟨⟨205398247581841720427968458405948125224980024,205398247581841720427968458405948125224980025⟩,⟨-292779712490792947593209643516792617666396464,-292779712490792947593209643516792617666396463⟩⟩, + ⟨⟨923572258489801565590454430114791055136124693,923572258489801565590454430114791055136124694⟩,⟨1218360748405275099231464130365024130744622533,1218360748405275099231464130365024130744622534⟩⟩, + ⟨⟨-5734942649363095019685598390915212196386741680,-5734942649363095019685598390915212196386741679⟩,⟨1708527352456770998243572413567952971285177394,1708527352456770998243572413567952971285177395⟩⟩] +lemma tw1_0_6_19_calc (j : Fin 31) : taylorWaveBox 1 0 6 19 j = tw1_0_6_19 j := by + revert j + decide +kernel +def tw1_0_6_20 : Fin 31 → CI := ![⟨⟨-39524700450602984341395233982229653008614399,-39524700450602984341395233982229653008614398⟩,⟨731252006475090284710790543082316113929475731,731252006475090284710790543082316113929475732⟩⟩, + ⟨⟨-161696112709499151576597997720839551131171087,-161696112709499151576597997720839551131171086⟩,⟨-67781550699062346772413903730454682878118964,-67781550699062346772413903730454682878118963⟩⟩, + ⟨⟨24329116838554790586773957462237072927049543,24329116838554790586773957462237072927049544⟩,⟨-29545125433322358666911484414800129570488161,-29545125433322358666911484414800129570488160⟩⟩, + ⟨⟨4572234415983240338466808949363909938243409,4572234415983240338466808949363909938243410⟩,⟨5983832402017095561653415834737554303286521,5983832402017095561653415834737554303286522⟩⟩, + ⟨⟨-1156204341402888407577374668040285228803760,-1156204341402888407577374668040285228803759⟩,⟨632503187745494146539942879079539318368742,632503187745494146539942879079539318368743⟩⟩, + ⟨⟨-87198123214023970949091507721456235416373,-87198123214023970949091507721456235416372⟩,⟨-182198214259546466829664571483106343962372,-182198214259546466829664571483106343962371⟩⟩, + ⟨⟨23155998404215963570633055665536100062502,23155998404215963570633055665536100062503⟩,⟨-13171019426537787591292874225962659587404,-13171019426537787591292874225962659587403⟩⟩, + ⟨⟨2022741803266283207479527911516221155040,2022741803266283207479527911516221155041⟩,⟨2168336022841084005625733998328530532089,2168336022841084005625733998328530532090⟩⟩, + ⟨⟨-98975889843536579399739332092553522895,-98975889843536579399739332092553522894⟩,⟨254574665561196352459191528188908959798,254574665561196352459191528188908959799⟩⟩, + ⟨⟨-19097278140879698722362012283056501339,-19097278140879698722362012283056501338⟩,⟨7408359781453232090788245348432378547,7408359781453232090788245348432378548⟩⟩, + ⟨⟨-1244438889051320753334176251882409611,-1244438889051320753334176251882409610⟩,⟨-74248915726262876979568430782255405,-74248915726262876979568430782255404⟩⟩, + ⟨⟨-63390729567116260125792955360956374,-63390729567116260125792955360956373⟩,⟨4120042924166717410240534783120113,4120042924166717410240534783120114⟩⟩, + ⟨⟨-1767755180346113472193059419411024,-1767755180346113472193059419411023⟩,⟨2458048335864330929426038010996463,2458048335864330929426038010996464⟩⟩, + ⟨⟨166718198134882276663779137559841,166718198134882276663779137559842⟩,⟨58061628593740991517399556801151,58061628593740991517399556801152⟩⟩, + ⟨⟨-17681572120373766437941842033681,-17681572120373766437941842033680⟩,⟨-10848207811531832159835365708440,-10848207811531832159835365708439⟩⟩, + ⟨⟨9158239389167725758121241802230,9158239389167725758121241802231⟩,⟨-1,1⟩⟩, + ⟨⟨-17681572120373766437941842033681,-17681572120373766437941842033680⟩,⟨10848207811531832159835365708439,10848207811531832159835365708440⟩⟩, + ⟨⟨166718198134882276663779137559841,166718198134882276663779137559842⟩,⟨-58061628593740991517399556801152,-58061628593740991517399556801151⟩⟩, + ⟨⟨-1767755180346113472193059419411024,-1767755180346113472193059419411023⟩,⟨-2458048335864330929426038010996464,-2458048335864330929426038010996463⟩⟩, + ⟨⟨-63390729567116260125792955360956374,-63390729567116260125792955360956373⟩,⟨-4120042924166717410240534783120114,-4120042924166717410240534783120113⟩⟩, + ⟨⟨-1244438889051320753334176251882409611,-1244438889051320753334176251882409610⟩,⟨74248915726262876979568430782255404,74248915726262876979568430782255405⟩⟩, + ⟨⟨-19097278140879698722362012283056501339,-19097278140879698722362012283056501338⟩,⟨-7408359781453232090788245348432378548,-7408359781453232090788245348432378547⟩⟩, + ⟨⟨-98975889843536579399739332092553522895,-98975889843536579399739332092553522894⟩,⟨-254574665561196352459191528188908959799,-254574665561196352459191528188908959798⟩⟩, + ⟨⟨2022741803266283207479527911516221155040,2022741803266283207479527911516221155041⟩,⟨-2168336022841084005625733998328530532090,-2168336022841084005625733998328530532089⟩⟩, + ⟨⟨23155998404215963570633055665536100062502,23155998404215963570633055665536100062503⟩,⟨13171019426537787591292874225962659587403,13171019426537787591292874225962659587404⟩⟩, + ⟨⟨-87198123214023970949091507721456235416373,-87198123214023970949091507721456235416372⟩,⟨182198214259546466829664571483106343962371,182198214259546466829664571483106343962372⟩⟩, + ⟨⟨-1156204341402888407577374668040285228803760,-1156204341402888407577374668040285228803759⟩,⟨-632503187745494146539942879079539318368743,-632503187745494146539942879079539318368742⟩⟩, + ⟨⟨4572234415983240338466808949363909938243409,4572234415983240338466808949363909938243410⟩,⟨-5983832402017095561653415834737554303286522,-5983832402017095561653415834737554303286521⟩⟩, + ⟨⟨24329116838554790586773957462237072927049543,24329116838554790586773957462237072927049544⟩,⟨29545125433322358666911484414800129570488160,29545125433322358666911484414800129570488161⟩⟩, + ⟨⟨-161696112709499151576597997720839551131171087,-161696112709499151576597997720839551131171086⟩,⟨67781550699062346772413903730454682878118963,67781550699062346772413903730454682878118964⟩⟩, + ⟨⟨-39524700450602984341395233982229653008614399,-39524700450602984341395233982229653008614398⟩,⟨-731252006475090284710790543082316113929475732,-731252006475090284710790543082316113929475731⟩⟩] +lemma tw1_0_6_20_calc (j : Fin 31) : taylorWaveBox 1 0 6 20 j = tw1_0_6_20 j := by + revert j + decide +kernel +def tw1_0_6 : Fin 21 → Fin 31 → CI := ![tw1_0_6_0,tw1_0_6_1,tw1_0_6_2,tw1_0_6_3,tw1_0_6_4,tw1_0_6_5,tw1_0_6_6,tw1_0_6_7,tw1_0_6_8,tw1_0_6_9,tw1_0_6_10,tw1_0_6_11,tw1_0_6_12,tw1_0_6_13,tw1_0_6_14,tw1_0_6_15,tw1_0_6_16,tw1_0_6_17,tw1_0_6_18,tw1_0_6_19,tw1_0_6_20] +lemma tw1_0_6_mem (l : Fin 21) (j : Fin 31) : (tw1_0_6 l j).Mem (taylorWave 1 0 (nearNode 6) l.val (frequency j)) := by + have he : taylorWaveBox 1 0 6 l j = tw1_0_6 l j := by + fin_cases l + · exact tw1_0_6_0_calc j + · exact tw1_0_6_1_calc j + · exact tw1_0_6_2_calc j + · exact tw1_0_6_3_calc j + · exact tw1_0_6_4_calc j + · exact tw1_0_6_5_calc j + · exact tw1_0_6_6_calc j + · exact tw1_0_6_7_calc j + · exact tw1_0_6_8_calc j + · exact tw1_0_6_9_calc j + · exact tw1_0_6_10_calc j + · exact tw1_0_6_11_calc j + · exact tw1_0_6_12_calc j + · exact tw1_0_6_13_calc j + · exact tw1_0_6_14_calc j + · exact tw1_0_6_15_calc j + · exact tw1_0_6_16_calc j + · exact tw1_0_6_17_calc j + · exact tw1_0_6_18_calc j + · exact tw1_0_6_19_calc j + · exact tw1_0_6_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 0 6 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave11.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave11.lean new file mode 100644 index 0000000000000000000000000000000000000000..7cfafbfe9a938b60ed35d586176a6d24b8a93ec8 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave11.lean @@ -0,0 +1,28 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave110 +import OAI.Analysis.Triangular.Taylor.TaylorWave111 +import OAI.Analysis.Triangular.Taylor.TaylorWave112 +import OAI.Analysis.Triangular.Taylor.TaylorWave113 +import OAI.Analysis.Triangular.Taylor.TaylorWave114 +import OAI.Analysis.Triangular.Taylor.TaylorWave115 +import OAI.Analysis.Triangular.Taylor.TaylorWave116 + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1 : Fin 7 → Fin 21 → Fin 31 → CI := ![tw1_1_0,tw1_1_1,tw1_1_2,tw1_1_3,tw1_1_4,tw1_1_5,tw1_1_6] +lemma tw1_1_mem (n : Fin 7) (l : Fin 21) (j : Fin 31) : (tw1_1 n l j).Mem (taylorWave 1 1 (nearNode n) l.val (frequency j)) := by + fin_cases n + · exact tw1_1_0_mem l j + · exact tw1_1_1_mem l j + · exact tw1_1_2_mem l j + · exact tw1_1_3_mem l j + · exact tw1_1_4_mem l j + · exact tw1_1_5_mem l j + · exact tw1_1_6_mem l j +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave110.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave110.lean new file mode 100644 index 0000000000000000000000000000000000000000..dff7d1c5e602d3ff2a74ddc9bba341502f092337 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave110.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_0_0 : Fin 31 → CI := ![⟨⟨2389363560523390198300249803676017524358419811496781172676097,2389363560523390198300249803676017524358419811496913764173801⟩,⟨165939169882836964303243734415724886035481899828324627743691,165939169882836964303243734415724886035481899828455653739385⟩⟩, + ⟨⟨2089840965546599852830581297602192826944802669867483318275766,2089840965546599852830581297602192826944802669867617638044223⟩,⟨623694299231204028363143995198337729902102377263590081360184,623694299231204028363143995198337729902102377263722518392790⟩⟩, + ⟨⟨1686754313506404777152180821699975947404313167275722586035003,1686754313506404777152180821699975947404313167275853000974735⟩,⟨950134430213978292487708673276263136347217715510267704169048,950134430213978292487708673276263136347217715510396364902026⟩⟩, + ⟨⟨1238260958414329972490369214736377219917630551544447606036897,1238260958414329972490369214736377219917630551544568178138269⟩,⟨1118667766929068960866470498893886683661295184362487386150734,1118667766929068960866470498893886683661295184362606611455992⟩⟩, + ⟨⟨809076215356245382335110057352480054762410487656224807023927,809076215356245382335110057352480054762410487656330122428084⟩,⟨1131767551791868202076305508685591163319272606406467778376106,1131767551791868202076305508685591163319272606406572247387598⟩⟩, + ⟨⟨454006889507803118301205235387850006869053115726140306562976,454006889507803118301205235387850006869053115726226396515289⟩,⟨1021285920104796788400457439714534107396275521728198020916653,1021285920104796788400457439714534107396275521728283700508800⟩⟩, + ⟨⟨203581188866921270478223332007579030696881458796672378533624,203581188866921270478223332007579030696881458796737473756649⟩,⟨838420736474790711084624774336449642109644991273910839728052,838420736474790711084624774336449642109644991273975806232849⟩⟩, + ⟨⟨58715743783742989221245496139665147918388881697828170175337,58715743783742989221245496139665147918388881697873011952088⟩,⟨636681965701358644918217402909081201997231292650181707455237,636681965701358644918217402909081201997231292650226537789308⟩⟩, + ⟨⟨-2883867919858241357813239828312854995378970422202970514726,-2883867919858241357813239828312854995378970422170367479614⟩,⟨455860063563393132131269405417481024193374075271643634884798,455860063563393132131269405417481024193374075271676230153605⟩⟩, + ⟨⟨-12830883136741729354789458986509311445352176463132116795771,-12830883136741729354789458986509311445352176463108235755604⟩,⟨314648431464370446578780593339456488395291930367894482326991,314648431464370446578780593339456488395291930367918316640148⟩⟩, + ⟨⟨1008644194328061437768011469145904931844340333167615907391,1008644194328061437768011469145904931844340333182787727196⟩,⟨213645491848632722928806049585942156862092008375267814104369,213645491848632722928806049585942156862092008375282923597652⟩⟩, + ⟨⟨20777212458696466055858518272691651245437411901951115059390,20777212458696466055858518272691651245437411901962544954814⟩,⟨143938014820280423844372941553961187214964842151601463954942,143938014820280423844372941553961187214964842151612892423903⟩⟩, + ⟨⟨38060433136909536898801376589682567582135799124989026675359,38060433136909536898801376589682567582135799124996594059722⟩,⟨94883910169148858463265354428549709086230541666503220212069,94883910169148858463265354428549709086230541666510944310735⟩⟩, + ⟨⟨50263920281961688768392668122067309319123336531884479234206,50263920281961688768392668122067309319123336531888822974829⟩,⟨58006109786762967976758919811836672257365742824409993018984,58006109786762967976758919811836672257365742824414527532080⟩⟩, + ⟨⟨57274578891825579283095695246773687716511857848637821438582,57274578891825579283095695246773687716511857848640189039143⟩,⟨27615509063055586997223923933333688144375431290870415334967,27615509063055586997223923933333688144375431290872472078822⟩⟩, + ⟨⟨59540097428626778454227838922637234346812350269551270936574,59540097428626778454227838922637234346812350269552934347584⟩,⟨-3849,4140⟩⟩, + ⟨⟨57274578891825579283095695246773687716511857848637821438708,57274578891825579283095695246773687716511857848640189039328⟩,⟨-27615509063055586997223923933333688144375431290872472078473,-27615509063055586997223923933333688144375431290870415334625⟩⟩, + ⟨⟨50263920281961688768392668122067309319123336531884479234521,50263920281961688768392668122067309319123336531888822975173⟩,⟨-58006109786762967976758919811836672257365742824414527531798,-58006109786762967976758919811836672257365742824409993018616⟩⟩, + ⟨⟨38060433136909536898801376589682567582135799124989026676134,38060433136909536898801376589682567582135799124996594060238⟩,⟨-94883910169148858463265354428549709086230541666510944310372,-94883910169148858463265354428549709086230541666503220211965⟩⟩, + ⟨⟨20777212458696466055858518272691651245437411901951115060780,20777212458696466055858518272691651245437411901962544955773⟩,⟨-143938014820280423844372941553961187214964842151612892423551,-143938014820280423844372941553961187214964842151601463955021⟩⟩, + ⟨⟨1008644194328061437768011469145904931844340333167615908492,1008644194328061437768011469145904931844340333182787729169⟩,⟨-213645491848632722928806049585942156862092008375282923598076,-213645491848632722928806049585942156862092008375267814103905⟩⟩, + ⟨⟨-12830883136741729354789458986509311445352176463132116793784,-12830883136741729354789458986509311445352176463108235753738⟩,⟨-314648431464370446578780593339456488395291930367918316640175,-314648431464370446578780593339456488395291930367894482327139⟩⟩, + ⟨⟨-2883867919858241357813239828312854995378970422202970510813,-2883867919858241357813239828312854995378970422170367477289⟩,⟨-455860063563393132131269405417481024193374075271676230152815,-455860063563393132131269405417481024193374075271643634885570⟩⟩, + ⟨⟨58715743783742989221245496139665147918388881697828170177633,58715743783742989221245496139665147918388881697873011957060⟩,⟨-636681965701358644918217402909081201997231292650226537790201,-636681965701358644918217402909081201997231292650181707453428⟩⟩, + ⟨⟨203581188866921270478223332007579030696881458796672378537199,203581188866921270478223332007579030696881458796737473762402⟩,⟨-838420736474790711084624774336449642109644991273975806232751,-838420736474790711084624774336449642109644991273910839725784⟩⟩, + ⟨⟨454006889507803118301205235387850006869053115726140306565368,454006889507803118301205235387850006869053115726226396525833⟩,⟨-1021285920104796788400457439714534107396275521728283700509940,-1021285920104796788400457439714534107396275521728198020909626⟩⟩, + ⟨⟨809076215356245382335110057352480054762410487656224807029410,809076215356245382335110057352480054762410487656330122439847⟩,⟨-1131767551791868202076305508685591163319272606406572247384616,-1131767551791868202076305508685591163319272606406467778366838⟩⟩, + ⟨⟨1238260958414329972490369214736377219917630551544447606047482,1238260958414329972490369214736377219917630551544568178143172⟩,⟨-1118667766929068960866470498893886683661295184362606611444847,-1118667766929068960866470498893886683661295184362487386145274⟩⟩, + ⟨⟨1686754313506404777152180821699975947404313167275722586037984,1686754313506404777152180821699975947404313167275853000984064⟩,⟨-950134430213978292487708673276263136347217715510396364893703,-950134430213978292487708673276263136347217715510267704154377⟩⟩, + ⟨⟨2089840965546599852830581297602192826944802669867483318276448,2089840965546599852830581297602192826944802669867617638051702⟩,⟨-623694299231204028363143995198337729902102377263722518382384,-623694299231204028363143995198337729902102377263590081342982⟩⟩, + ⟨⟨2389363560523390198300249803676017524358419811496781172681221,2389363560523390198300249803676017524358419811496913764170352⟩,⟨-165939169882836964303243734415724886035481899828455653719043,-165939169882836964303243734415724886035481899828324627731916⟩⟩] +lemma tw1_1_0_0_calc (j : Fin 31) : taylorWaveBox 1 1 0 0 j = tw1_1_0_0 j := by + revert j + decide +kernel +def tw1_1_0_1 : Fin 31 → CI := ![⟨⟨-1172120494321203533617629087425315730313868863893366332497013,-1172120494321203533617629087425315730313868863893187081968596⟩,⟨2751694631572147267569799770968056860451579538657959395914241,2751694631572147267569799770968056860451579538658140032213912⟩⟩, + ⟨⟨-1768944227400475275466280110101310709450979980788776089550175,-1768944227400475275466280110101310709450979980788594997439808⟩,⟨2228980138033373210653467266563297286557272344269690147743449,2228980138033373210653467266563297286557272344269872594801266⟩⟩, + ⟨⟨-2141561634946684952925335320353233703767943373823381416275503,-2141561634946684952925335320353233703767943373823208312475120⟩,⟨1549007870877149468785238771646254977104823888304604043723401,1549007870877149468785238771646254977104823888304777973980791⟩⟩, + ⟨⟨-2242287481821297561235365064933153649377817572047295949313009,-2242287481821297561235365064933153649377817572047141621447984⟩,⟨818341077726196564712407306671232583457995323809088482985222,818341077726196564712407306671232583457995323809242945625606⟩⟩, + ⟨⟨-2081254302371706642205052789844230250493424962954400849877535,-2081254302371706642205052789844230250493424962954261537917759⟩,⟨157915157467762948857772817669223703985226701174774621633365,157915157467762948857772817669223703985226701174913529398693⟩⟩, + ⟨⟨-1728467444827313776902630958814723706009846923968511094135519,-1728467444827313776902630958814723706009846923968371973579760⟩,⟨-332522357117507177201519086376990002991617415960281288043811,-332522357117507177201519086376990002991617415960142779548824⟩⟩, + ⟨⟨-1291667442121503611981330667182454507637601845506898997669594,-1291667442121503611981330667182454507637601845506771339082437⟩,⟨-606260848721918916965866728760247765956904391867061792461729,-606260848721918916965866728760247765956904391866934616628724⟩⟩, + ⟨⟨-877363137005954860656233236229110377311076657914123939843043,-877363137005954860656233236229110377311076657914017671974302⟩,⟨-680246724435688948782092059645790885702158046184444248795546,-680246724435688948782092059645790885702158046184338133306264⟩⟩, + ⟨⟨-555079460850712881961556916667175324664883145845676212390975,-555079460850712881961556916667175324664883145845597017389002⟩,⟨-617388235296814683364679638152756862637839512245397623020279,-617388235296814683364679638152756862637839512245318284593321⟩⟩, + ⟨⟨-344190942901045908999765254424768630950074061808111578347220,-344190942901045908999765254424768630950074061808060000213467⟩,⟨-491904715003954166105296120252578666471095326498031571127496,-491904715003954166105296120252578666471095326497979812672744⟩⟩, + ⟨⟨-226408945668971196662864890555988893132990090563874776901246,-226408945668971196662864890555988893132990090563846560067011⟩,⟨-359699258294711519191132929208225788781809689899706868038711,-359699258294711519191132929208225788781809689899678600477385⟩⟩, + ⟨⟨-169522869172172846395976301593033975296452460785754477877285,-169522869172172846395976301593033975296452460785732101330255⟩,⟨-248121105956170254426205400257420231027734547393937793960331,-248121105956170254426205400257420231027734547393915468990830⟩⟩, + ⟨⟨-145437144309166062623222742171532612417931575315779315497930,-145437144309166062623222742171532612417931575315762345492592⟩,⟨-162485103569963529982471525537381240129007423203822339916436,-162485103569963529982471525537381240129007423203805194129395⟩⟩, + ⟨⟨-136398325802766219256927581321646849099969394925802152545563,-136398325802766219256927581321646849099969394925791532183832⟩,⟨-97584048020138467408637263210903927372728502965899895178352,-97584048020138467408637263210903927372728502965888836752265⟩⟩, + ⟨⟨-133419031837558091802364674758397862392995787019704094844006,-133419031837558091802364674758397862392995787019698108308481⟩,⟨-45748024757062977551312680780512418755603188865546054554423,-45748024757062977551312680780512418755603188865540665789381⟩⟩, + ⟨⟨-132752137272705788887347110336579035449979456278012541229682,-132752137272705788887347110336579035449979456278008409882405⟩,⟨-9229,8580⟩⟩, + ⟨⟨-133419031837558091802364674758397862392995787019704094844318,-133419031837558091802364674758397862392995787019698108308672⟩,⟨45748024757062977551312680780512418755603188865540665788577,45748024757062977551312680780512418755603188865546054553625⟩⟩, + ⟨⟨-136398325802766219256927581321646849099969394925802152546155,-136398325802766219256927581321646849099969394925791532184307⟩,⟨97584048020138467408637263210903927372728502965888836751334,97584048020138467408637263210903927372728502965899895177569⟩⟩, + ⟨⟨-145437144309166062623222742171532612417931575315779315498786,-145437144309166062623222742171532612417931575315762345493983⟩,⟨162485103569963529982471525537381240129007423203805194128723,162485103569963529982471525537381240129007423203822339915229⟩⟩, + ⟨⟨-169522869172172846395976301593033975296452460785754477878964,-169522869172172846395976301593033975296452460785732101332685⟩,⟨248121105956170254426205400257420231027734547393915468989885,248121105956170254426205400257420231027734547393937793958636⟩⟩, + ⟨⟨-226408945668971196662864890555988893132990090563874776904520,-226408945668971196662864890555988893132990090563846560068887⟩,⟨359699258294711519191132929208225788781809689899678600475004,359699258294711519191132929208225788781809689899706868037792⟩⟩, + ⟨⟨-344190942901045908999765254424768630950074061808111578350121,-344190942901045908999765254424768630950074061808060000216612⟩,⟨491904715003954166105296120252578666471095326497979812670774,491904715003954166105296120252578666471095326498031571125282⟩⟩, + ⟨⟨-555079460850712881961556916667175324664883145845676212393319,-555079460850712881961556916667175324664883145845597017395036⟩,⟨617388235296814683364679638152756862637839512245318284591324,617388235296814683364679638152756862637839512245397623014603⟩⟩, + ⟨⟨-877363137005954860656233236229110377311076657914123939849853,-877363137005954860656233236229110377311076657914017671974944⟩,⟨680246724435688948782092059645790885702158046184338133298031,680246724435688948782092059645790885702158046184444248793474⟩⟩, + ⟨⟨-1291667442121503611981330667182454507637601845506898997674918,-1291667442121503611981330667182454507637601845506771339083725⟩,⟨606260848721918916965866728760247765956904391866934616619462,606260848721918916965866728760247765956904391867061792456512⟩⟩, + ⟨⟨-1728467444827313776902630958814723706009846923968511094143639,-1728467444827313776902630958814723706009846923968371973575671⟩,⟨332522357117507177201519086376990002991617415960142779531724,332522357117507177201519086376990002991617415960281288038895⟩⟩, + ⟨⟨-2081254302371706642205052789844230250493424962954400849880098,-2081254302371706642205052789844230250493424962954261537912892⟩,⟨-157915157467762948857772817669223703985226701174913529418226,-157915157467762948857772817669223703985226701174774621645484⟩⟩, + ⟨⟨-2242287481821297561235365064933153649377817572047295949304447,-2242287481821297561235365064933153649377817572047141621445892⟩,⟨-818341077726196564712407306671232583457995323809242945637720,-818341077726196564712407306671232583457995323809088483003792⟩⟩, + ⟨⟨-2141561634946684952925335320353233703767943373823381416268554,-2141561634946684952925335320353233703767943373823208312460585⟩,⟨-1549007870877149468785238771646254977104823888304777973998782,-1549007870877149468785238771646254977104823888304604043733806⟩⟩, + ⟨⟨-1768944227400475275466280110101310709450979980788776089539593,-1768944227400475275466280110101310709450979980788594997420907⟩,⟨-2228980138033373210653467266563297286557272344269872594817052,-2228980138033373210653467266563297286557272344269690147750932⟩⟩, + ⟨⟨-1172120494321203533617629087425315730313868863893366332473140,-1172120494321203533617629087425315730313868863893187081955255⟩,⟨-2751694631572147267569799770968056860451579538658140032216200,-2751694631572147267569799770968056860451579538657959395927050⟩⟩] +lemma tw1_1_0_1_calc (j : Fin 31) : taylorWaveBox 1 1 0 1 j = tw1_1_0_1 j := by + revert j + decide +kernel +def tw1_1_0_2 : Fin 31 → CI := ![⟨⟨-2076090620876077696108999441196891226845008844543314183204351,-2076090620876077696108999441196891226845008844543141361064339⟩,⟨-1880614498220189570116831337007558967753382676120517663553642,-1880614498220189570116831337007558967753382676120345099684326⟩⟩, + ⟨⟨-1381602274237181534578566814293405919944992370264426064903583,-1381602274237181534578566814293405919944992370264256580341373⟩,⟨-2417750892675479817289861166335275168829040727588881830307285,-2417750892675479817289861166335275168829040727588711907463495⟩⟩, + ⟨⟨-523305069518022904305983206900545765298337220662887046446231,-523305069518022904305983206900545765298337220662699736354194⟩,⟨-2655237661367823329886452557307800727779223507861431262114884,-2655237661367823329886452557307800727779223507861242569958432⟩⟩, + ⟨⟨347740494727893879368319495483621394206353469603185390037273,347740494727893879368319495483621394206353469603391814724858⟩,⟨-2536977357663986864139734255241090785422761782193266780345880,-2536977357663986864139734255241090785422761782193058194228409⟩⟩, + ⟨⟨1061932626608956866644310865819366272350093402158696157193745,1061932626608956866644310865819366272350093402158908321478203⟩,⟨-2094800536897620917018166012613014757958530861868516147720238,-2094800536897620917018166012613014757958530861868301830867331⟩⟩, + ⟨⟨1489116317443658359795855125376894085039643065160478025610978,1489116317443658359795855125376894085039643065160678892959041⟩,⟨-1450820329368399624270095137764949321998386682018793872466166,-1450820329368399624270095137764949321998386682018591724318039⟩⟩, + ⟨⟨1589824610122956350218890513798532900568853957462770569701090,1589824610122956350218890513798532900568853957462940944729314⟩,⟨-777629906650868323619077077189823152614605944770752108929422,-777629906650868323619077077189823152614605944770581257092909⟩⟩, + ⟨⟨1427309986140014177163554367630859417251371275599854914084470,1427309986140014177163554367630859417251371275599980590578488⟩,⟨-230047797012851615175710873307417362910384858348471021808999,-230047797012851615175710873307417362910384858348345300023441⟩⟩, + ⟨⟨1128362341283753842631927393321098181685337822574863033380412,1128362341283753842631927393321098181685337822574965339691018⟩,⟨113054915487845599338489843380846922290815974863332810164250,113054915487845599338489843380846922290815974863435163926539⟩⟩, + ⟨⟨817779487348777412471219999069409562936837362010861055744689,817779487348777412471219999069409562936837362010945859608384⟩,⟨261035147020942913786973132861141540377314953293573323621462,261035147020942913786973132861141540377314953293658378198540⟩⟩, + ⟨⟨570474753262880407756493383783121453661184116765836396269158,570474753262880407756493383783121453661184116765893189040999⟩,⟨276941557905336280215849049546740506542689329299746704691078,276941557905336280215849049546740506542689329299803781703446⟩⟩, + ⟨⟨405203869845751631388814144641489948473393536795639036927222,405203869845751631388814144641489948473393536795678624263365⟩,⟨229533295776889622844489174213912657037837494636919037344151,229533295776889622844489174213912657037837494636958536723222⟩⟩, + ⟨⟨307467031135252716732368142610678103824335003397652497499756,307467031135252716732368142610678103824335003397678763649706⟩,⟨164826816321645434545759387946672726579799015044590009732902,164826816321645434545759387946672726579799015044616165734725⟩⟩, + ⟨⟨254700735667867596520670995278700993167882676339780601130818,254700735667867596520670995278700993167882676339799387083518⟩,⟨103279893360184607136862556948532896010582731761111194718881,103279893360184607136862556948532896010582731761130573215823⟩⟩, + ⟨⟨229427698215744266526031708586918289719554447885087522314445,229427698215744266526031708586918289719554447885098726538879⟩,⟨49231668438535551367167653734335906503633844406369211322070,49231668438535551367167653734335906503633844406379604227751⟩⟩, + ⟨⟨221990692552992242867249533502915481576355059495786114667231,221990692552992242867249533502915481576355059495793729804408⟩,⟨-14348,15434⟩⟩, + ⟨⟨229427698215744266526031708586918289719554447885087522314612,229427698215744266526031708586918289719554447885098726539227⟩,⟨-49231668438535551367167653734335906503633844406379604226398,-49231668438535551367167653734335906503633844406369211320677⟩⟩, + ⟨⟨254700735667867596520670995278700993167882676339780601131207,254700735667867596520670995278700993167882676339799387084172⟩,⟨-103279893360184607136862556948532896010582731761130573214335,-103279893360184607136862556948532896010582731761111194717229⟩⟩, + ⟨⟨307467031135252716732368142610678103824335003397652497501292,307467031135252716732368142610678103824335003397678763650520⟩,⟨-164826816321645434545759387946672726579799015044616165732337,-164826816321645434545759387946672726579799015044590009731236⟩⟩, + ⟨⟨405203869845751631388814144641489948473393536795639036929780,405203869845751631388814144641489948473393536795678624264723⟩,⟨-229533295776889622844489174213912657037837494636958536719383,-229533295776889622844489174213912657037837494636919037341511⟩⟩, + ⟨⟨570474753262880407756493383783121453661184116765836396269757,570474753262880407756493383783121453661184116765893189044317⟩,⟨-276941557905336280215849049546740506542689329299803781700694,-276941557905336280215849049546740506542689329299746704685588⟩⟩, + ⟨⟨817779487348777412471219999069409562936837362010861055746496,817779487348777412471219999069409562936837362010945859609825⟩,⟨-261035147020942913786973132861141540377314953293658378193358,-261035147020942913786973132861141540377314953293573323616646⟩⟩, + ⟨⟨1128362341283753842631927393321098181685337822574863033383193,1128362341283753842631927393321098181685337822574965339689639⟩,⟨-113054915487845599338489843380846922290815974863435163916702,-113054915487845599338489843380846922290815974863332810158632⟩⟩, + ⟨⟨1427309986140014177163554367630859417251371275599854914079655,1427309986140014177163554367630859417251371275599980590580124⟩,⟨230047797012851615175710873307417362910384858348345300028368,230047797012851615175710873307417362910384858348471021820325⟩⟩, + ⟨⟨1589824610122956350218890513798532900568853957462770569694180,1589824610122956350218890513798532900568853957462940944727355⟩,⟨777629906650868323619077077189823152614605944770581257099250,777629906650868323619077077189823152614605944770752108940726⟩⟩, + ⟨⟨1489116317443658359795855125376894085039643065160478025593334,1489116317443658359795855125376894085039643065160678892958059⟩,⟨1450820329368399624270095137764949321998386682018591724319094,1450820329368399624270095137764949321998386682018793872483877⟩⟩, + ⟨⟨1061932626608956866644310865819366272350093402158696157172368,1061932626608956866644310865819366272350093402158908321467776⟩,⟨2094800536897620917018166012613014757958530861868301830869975,2094800536897620917018166012613014757958530861868516147733836⟩⟩, + ⟨⟨347740494727893879368319495483621394206353469603185390024108,347740494727893879368319495483621394206353469603391814703575⟩,⟨2536977357663986864139734255241090785422761782193058194235106,2536977357663986864139734255241090785422761782193266780344451⟩⟩, + ⟨⟨-523305069518022904305983206900545765298337220662887046467632,-523305069518022904305983206900545765298337220662699736368408⟩,⟨2655237661367823329886452557307800727779223507861242569950929,2655237661367823329886452557307800727779223507861431262114568⟩⟩, + ⟨⟨-1381602274237181534578566814293405919944992370264426064922718,-1381602274237181534578566814293405919944992370264256580354098⟩,⟨2417750892675479817289861166335275168829040727588711907451114,2417750892675479817289861166335275168829040727588881830301342⟩⟩, + ⟨⟨-2076090620876077696108999441196891226845008844543314183212437,-2076090620876077696108999441196891226845008844543141361081021⟩,⟨1880614498220189570116831337007558967753382676120345099674480,1880614498220189570116831337007558967753382676120517663535177⟩⟩] +lemma tw1_1_0_2_calc (j : Fin 31) : taylorWaveBox 1 1 0 2 j = tw1_1_0_2 j := by + revert j + decide +kernel +def tw1_1_0_3 : Fin 31 → CI := ![⟨⟨1840480538155113331887012083480970070652817798759227011354447,1840480538155113331887012083480970070652817798759367314778853⟩,⟨-1008839435327820470535287817951016814060431061720062001810691,-1008839435327820470535287817951016814060431061719922446092500⟩⟩, + ⟨⟨2159183637275168231776082436034099734936603847840548666209467,2159183637275168231776082436034099734936603847840721294615570⟩,⟨-300639647584358744857924445810836187278039704014962585097394,-300639647584358744857924445810836187278039704014791763411807⟩⟩, + ⟨⟨2154895966375404127360905890795561809417791624473311209583324,2154895966375404127360905890795561809417791624473511321556549⟩,⟨520532245393131664822945199780326982646145104543832695110433,520532245393131664822945199780326982646145104544030548676643⟩⟩, + ⟨⟨1785598762711045922535724512790942461058286638601567629900693,1785598762711045922535724512790942461058286638601781681014238⟩,⟨1281175789233850486134172230258872932023956865127052299734929,1281175789233850486134172230258872932023956865127264384764274⟩⟩, + ⟨⟨1117089428504486161932238437597455798898884442535188996638144,1117089428504486161932238437597455798898884442535396725305110⟩,⟨1794910216854388529462590736631920237606807844675088506477554,1794910216854388529462590736631920237606807844675295121986040⟩⟩, + ⟨⟨320753144321407856181261188871179689132726262370964903713682,320753144321407856181261188871179689132726262371143235903705⟩,⟨1938160177820666944747392125683053648587879015579703027293856,1938160177820666944747392125683053648587879015579881221311392⟩⟩, + ⟨⟨-386895161565533432451768925083266466573503319884422440630154,-386895161565533432451768925083266466573503319884245784255297⟩,⟨1713004120039480202882304109840500022069588834313295597297564,1713004120039480202882304109840500022069588834313472583764659⟩⟩, + ⟨⟨-840065137529627528126166468746619875693168281123511525027093,-840065137529627528126166468746619875693168281123340399106741⟩,⟨1250121803163047444492025820579484556669823866446620143815406,1250121803163047444492025820579484556669823866446791458236695⟩⟩, + ⟨⟨-994833064566344217531353333324593980318501059099578239835508,-994833064566344217531353333324593980318501059099436881599838⟩,⟨738797243381027305675146794476716794147357529744995700838184,738797243381027305675146794476716794147357529745136870532625⟩⟩, + ⟨⟨-924969558231721370795992273217609099691022638029501632515391,-924969558231721370795992273217609099691022638029406138412950⟩,⟨329602470174947924379254608801492542895765222151636130491207,329602470174947924379254608801492542895765222151731499449414⟩⟩, + ⟨⟨-752746711602933235131716546471933746420248860524035015639744,-752746711602933235131716546471933746420248860523961303863054⟩,⟨79419860073874417827057251584875862059067827213838151088901,79419860073874417827057251584875862059067827213912031991520⟩⟩, + ⟨⟨-576349679690862439428971676048968659368818690261075533323592,-576349679690862439428971676048968659368818690261014198192362⟩,⟨-34260437058272821046642823595602325591265009558923337381153,-34260437058272821046642823595602325591265009558862036930171⟩⟩, + ⟨⟨-441893837756088917427513883329240568042203317031617720869751,-441893837756088917427513883329240568042203317031580223061726⟩,⟨-63841551859425199502526226185961715032715880185879969482263,-63841551859425199502526226185961715032715880185843084475267⟩⟩, + ⟨⟨-356312195524149718599247994863535382714919260867604643909087,-356312195524149718599247994863535382714919260867578822231965⟩,⟨-53654304540757646946427959298532914545785826574221155116037,-53654304540757646946427959298532914545785826574194880524540⟩⟩, + ⟨⟨-310970377178330445248632147300135240244145783453321500807895,-310970377178330445248632147300135240244145783453304899022884⟩,⟨-28825669200577692135379762322354970229756823510854161213927,-28825669200577692135379762322354970229756823510838361074402⟩⟩, + ⟨⟨-296973705087242791305106329536322409040573936690223910701519,-296973705087242791305106329536322409040573936690212778061066⟩,⟨-20648,19194⟩⟩, + ⟨⟨-310970377178330445248632147300135240244145783453321500808123,-310970377178330445248632147300135240244145783453304899022902⟩,⟨28825669200577692135379762322354970229756823510838361072500,28825669200577692135379762322354970229756823510854161212118⟩⟩, + ⟨⟨-356312195524149718599247994863535382714919260867604643909485,-356312195524149718599247994863535382714919260867578822231935⟩,⟨53654304540757646946427959298532914545785826574194880522329,53654304540757646946427959298532914545785826574221155113925⟩⟩, + ⟨⟨-441893837756088917427513883329240568042203317031617720869819,-441893837756088917427513883329240568042203317031580223062711⟩,⟨63841551859425199502526226185961715032715880185843084472774,63841551859425199502526226185961715032715880185879969478852⟩⟩, + ⟨⟨-576349679690862439428971676048968659368818690261075533323142,-576349679690862439428971676048968659368818690261014198193633⟩,⟨34260437058272821046642823595602325591265009558862036926356,34260437058272821046642823595602325591265009558923337375618⟩⟩, + ⟨⟨-752746711602933235131716546471933746420248860524035015640634,-752746711602933235131716546471933746420248860523961303860930⟩,⟨-79419860073874417827057251584875862059067827213912031998401,-79419860073874417827057251584875862059067827213838151092843⟩⟩, + ⟨⟨-924969558231721370795992273217609099691022638029501632513232,-924969558231721370795992273217609099691022638029406138411130⟩,⟨-329602470174947924379254608801492542895765222151731499454919,-329602470174947924379254608801492542895765222151636130497050⟩⟩, + ⟨⟨-994833064566344217531353333324593980318501059099578239827703,-994833064566344217531353333324593980318501059099436881597402⟩,⟨-738797243381027305675146794476716794147357529745136870536685,-738797243381027305675146794476716794147357529744995700847641⟩⟩, + ⟨⟨-840065137529627528126166468746619875693168281123511525023915,-840065137529627528126166468746619875693168281123340399095285⟩,⟨-1250121803163047444492025820579484556669823866446791458245411,-1250121803163047444492025820579484556669823866446620143815829⟩⟩, + ⟨⟨-386895161565533432451768925083266466573503319884422440622813,-386895161565533432451768925083266466573503319884245784243470⟩,⟨-1713004120039480202882304109840500022069588834313472583768944,-1713004120039480202882304109840500022069588834313295597297382⟩⟩, + ⟨⟨320753144321407856181261188871179689132726262370964903719884,320753144321407856181261188871179689132726262371143235922112⟩,⟨-1938160177820666944747392125683053648587879015579881221315354,-1938160177820666944747392125683053648587879015579703027285579⟩⟩, + ⟨⟨1117089428504486161932238437597455798898884442535188996647141,1117089428504486161932238437597455798898884442535396725323454⟩,⟨-1794910216854388529462590736631920237606807844675295121982264,-1794910216854388529462590736631920237606807844675088506464423⟩⟩, + ⟨⟨1785598762711045922535724512790942461058286638601567629913385,1785598762711045922535724512790942461058286638601781681019352⟩,⟨-1281175789233850486134172230258872932023956865127264384748468,-1281175789233850486134172230258872932023956865127052299726703⟩⟩, + ⟨⟨2154895966375404127360905890795561809417791624473311209582946,2154895966375404127360905890795561809417791624473511321563312⟩,⟨-520532245393131664822945199780326982646145104544030548665623,-520532245393131664822945199780326982646145104543832695092274⟩⟩, + ⟨⟨2159183637275168231776082436034099734936603847840548666204382,2159183637275168231776082436034099734936603847840721294616605⟩,⟨300639647584358744857924445810836187278039704014791763422997,300639647584358744857924445810836187278039704014962585114689⟩⟩, + ⟨⟨1840480538155113331887012083480970070652817798759227011350378,1840480538155113331887012083480970070652817798759367314768948⟩,⟨1008839435327820470535287817951016814060431061719922446107646,1008839435327820470535287817951016814060431061720062001820022⟩⟩] +lemma tw1_1_0_3_calc (j : Fin 31) : taylorWaveBox 1 1 0 3 j = tw1_1_0_3 j := by + revert j + decide +kernel +def tw1_1_0_4 : Fin 31 → CI := ![⟨⟨219209788335962644723226460228938931738342347545332848741885,219209788335962644723226460228938931738342347545444770319794⟩,⟨1292011587390207417124154915358989554640717423330506813636388,1292011587390207417124154915358989554640717423330619630854162⟩⟩, + ⟨⟨-341459962795437750255202896975241805305650963449772643047306,-341459962795437750255202896975241805305650963449635809626850⟩,⟨1380613542018545592694486768418874022316931810148134307885130,1380613542018545592694486768418874022316931810148272456723122⟩⟩, + ⟨⟨-938101398518789381164186555123006130698097817698530203084206,-938101398518789381164186555123006130698097817698374600690425⟩,⟨1187441398490397225506549970483990566614610298708057467683422,1187441398490397225506549970483990566614610298708214185105558⟩⟩, + ⟨⟨-1406801350894033044003974881522488925825898503770851105950699,-1406801350894033044003974881522488925825898503770691549213789⟩,⟨700963323316670045339624408264603968578753456794898363306632,700963323316670045339624408264603968578753456795058310984296⟩⟩, + ⟨⟨-1585800650043214511036101449878260926184623352576236729903119,-1585800650043214511036101449878260926184623352576073744510347⟩,⟨18697979184897996755510038688851261964586115966353067932933,18697979184897996755510038688851261964586115966515581319016⟩⟩, + ⟨⟨-1396709303399285563142414670286244409993031144525225946453576,-1396709303399285563142414670286244409993031144525039885545509⟩,⟨-664995712288448055931940197860824410202351832486082784050347,-664995712288448055931940197860824410202351832485897722071674⟩⟩, + ⟨⟨-903616493135644381630381328319793779314526333579053184662594,-903616493135644381630381328319793779314526333578868720990403⟩,⟨-1136771654352896224781824844767246497254689640074930770667129,-1136771654352896224781824844767246497254689640074746855093008⟩⟩, + ⟨⟨-295098636167205871059077354319483410467886667065298631657407,-295098636167205871059077354319483410467886667065145878118976⟩,⟨-1273859953090566142329831608653753808547987340349488737801809,-1273859953090566142329831608653753808547987340349336042603255⟩⟩, + ⟨⟨216865007721961828689642217047906838611100540767094534290816,216865007721961828689642217047906838611100540767232820271417⟩,⟨-1107343051324493792549122337796004332781341656329196182054790,-1107343051324493792549122337796004332781341656329057970876113⟩⟩, + ⟨⟨510764013647485039430927421777387749648397428347436629496512,510764013647485039430927421777387749648397428347559871869100⟩,⟨-784377436748114289049512037000043518143731843413768383734577,-784377436748114289049512037000043518143731843413645530528788⟩⟩, + ⟨⟨593775444227187555417192556991391669117752578508636605354594,593775444227187555417192556991391669117752578508719735193066⟩,⟨-462911798586600652967645942696475347171179463710469952756098,-462911798586600652967645942696475347171179463710386974264464⟩⟩, + ⟨⟨550197251035302952938040325950027636659720345030674143169692,550197251035302952938040325950027636659720345030744218424410⟩,⟨-230448445253142794456053584082513731694550218500673374952646,-230448445253142794456053584082513731694550218500603239190623⟩⟩, + ⟨⟨466199294855239686050802833142529294325181918326439263776119,466199294855239686050802833142529294325181918326489224653370⟩,⟨-96997385919694785403116817799385933513166613154452427269434,-96997385919694785403116817799385933513166613154403296287272⟩⟩, + ⟨⟨392203743884446991570522087188217862777678922589376366995811,392203743884446991570522087188217862777678922589405270937434⟩,⟨-33937694516090684382851380299303340271970851511026457965595,-33937694516090684382851380299303340271970851510997534596247⟩⟩, + ⟨⟨346256941584264723379186255357640728426846857282210640078423,346256941584264723379186255357640728426846857282230970422037⟩,⟨-9183393807581662798539916895566942784817989111111770565680,-9183393807581662798539916895566942784817989111091989718647⟩⟩, + ⟨⟨331070117170909756641404372575275789310955678349127217243377,331070117170909756641404372575275789310955678349140681883477⟩,⟨-21398,23019⟩⟩, + ⟨⟨346256941584264723379186255357640728426846857282210640078217,346256941584264723379186255357640728426846857282230970422026⟩,⟨9183393807581662798539916895566942784817989111091989720634,9183393807581662798539916895566942784817989111111770567813⟩⟩, + ⟨⟨392203743884446991570522087188217862777678922589376366995191,392203743884446991570522087188217862777678922589405270937341⟩,⟨33937694516090684382851380299303340271970851510997534598601,33937694516090684382851380299303340271970851511026457967926⟩⟩, + ⟨⟨466199294855239686050802833142529294325181918326439263776146,466199294855239686050802833142529294325181918326489224652245⟩,⟨96997385919694785403116817799385933513166613154403296290999,96997385919694785403116817799385933513166613154452427272009⟩⟩, + ⟨⟨550197251035302952938040325950027636659720345030674143168774,550197251035302952938040325950027636659720345030744218421836⟩,⟨230448445253142794456053584082513731694550218500603239195974,230448445253142794456053584082513731694550218500673374956341⟩⟩, + ⟨⟨593775444227187555417192556991391669117752578508636605349852,593775444227187555417192556991391669117752578508719735191073⟩,⟨462911798586600652967645942696475347171179463710386974267382,462911798586600652967645942696475347171179463710469952761667⟩⟩, + ⟨⟨510764013647485039430927421777387749648397428347436629491931,510764013647485039430927421777387749648397428347559871864106⟩,⟨784377436748114289049512037000043518143731843413645530532146,784377436748114289049512037000043518143731843413768383737522⟩⟩, + ⟨⟨216865007721961828689642217047906838611100540767094534285433,216865007721961828689642217047906838611100540767232820261617⟩,⟨1107343051324493792549122337796004332781341656329057970879707,1107343051324493792549122337796004332781341656329196182054016⟩⟩, + ⟨⟨-295098636167205871059077354319483410467886667065298631667680,-295098636167205871059077354319483410467886667065145878123174⟩,⟨1273859953090566142329831608653753808547987340349336042598263,1273859953090566142329831608653753808547987340349488737802935⟩⟩, + ⟨⟨-903616493135644381630381328319793779314526333579053184671018,-903616493135644381630381328319793779314526333578868720994553⟩,⟨1136771654352896224781824844767246497254689640074746855085755,1136771654352896224781824844767246497254689640074930770664146⟩⟩, + ⟨⟨-1396709303399285563142414670286244409993031144525225946463700,-1396709303399285563142414670286244409993031144525039885543667⟩,⟨664995712288448055931940197860824410202351832485897722056773,664995712288448055931940197860824410202351832486082784047401⟩⟩, + ⟨⟨-1585800650043214511036101449878260926184623352576236729905994,-1585800650043214511036101449878260926184623352576073744507256⟩,⟨-18697979184897996755510038688851261964586115966515581334051,-18697979184897996755510038688851261964586115966353067942012⟩⟩, + ⟨⟨-1406801350894033044003974881522488925825898503770851105943776,-1406801350894033044003974881522488925825898503770691549211463⟩,⟨-700963323316670045339624408264603968578753456795058310991646,-700963323316670045339624408264603968578753456794898363318571⟩⟩, + ⟨⟨-938101398518789381164186555123006130698097817698530203078487,-938101398518789381164186555123006130698097817698374600679875⟩,⟨-1187441398490397225506549970483990566614610298708214185114120,-1187441398490397225506549970483990566614610298708057467687152⟩⟩, + ⟨⟨-341459962795437750255202896975241805305650963449772643040400,-341459962795437750255202896975241805305650963449635809615523⟩,⟨-1380613542018545592694486768418874022316931810148272456727560,-1380613542018545592694486768418874022316931810148134307885144⟩⟩, + ⟨⟨219209788335962644723226460228938931738342347545332848752740,219209788335962644723226460228938931738342347545444770326236⟩,⟨-1292011587390207417124154915358989554640717423330619630850330,-1292011587390207417124154915358989554640717423330506813636977⟩⟩] +lemma tw1_1_0_4_calc (j : Fin 31) : taylorWaveBox 1 1 0 4 j = tw1_1_0_4 j := by + revert j + decide +kernel +def tw1_1_0_5 : Fin 31 → CI := ![⟨⟨-691787518329751764538129248959103078167595530740221908129081,-691787518329751764538129248959103078167595530740149069192614⟩,⟨-115393673049535146710833455550760182477845599726458531694381,-115393673049535146710833455550760182477845599726386155626534⟩⟩, + ⟨⟨-645752851178146511728747088551776195067850850467047435588358,-645752851178146511728747088551776195067850850466958903117442⟩,⟨-464200796635872109127511992485623802663433568467532603230680,-464200796635872109127511992485623802663433568467444519293542⟩⟩, + ⟨⟨-401446587064247664355228819479732686722693994217119442072904,-401446587064247664355228819479732686722693994217021641015120⟩,⟨-789201107694267752071622904419334216446864204045581539813136,-789201107694267752071622904419334216446864204045483760240170⟩⟩, + ⟨⟨23023480458053300974233208454408444300286229587502416640121,23023480458053300974233208454408444300286229587619737511935⟩,⟨-963252210141871515453393054598124927293324364292249105654554,-963252210141871515453393054598124927293324364292131165024046⟩⟩, + ⟨⟨518241547135107029309014615432421006281233652945911879530562,518241547135107029309014615432421006281233652946051120740010⟩,⟨-878199871096263678722533294872149661521573284199154171162229,-878199871096263678722533294872149661521573284199014025546273⟩⟩, + ⟨⟨907088084092054634316820139426378492785136498083532903351140,907088084092054634316820139426378492785136498083678568253630⟩,⟨-517044542644945129092195474316595548274016617316406025807926,-517044542644945129092195474316595548274016617316259895822421⟩⟩, + ⟨⟨1029234618302365275084503545158703143758437268281519797781759,1029234618302365275084503545158703143758437268281650457677632⟩,⟨5580914546502293777029333092494939862610106463388577091703,5580914546502293777029333092494939862610106463519207406042⟩⟩, + ⟨⟨842557236010516607131925205557003275952137703782363074829136,842557236010516607131925205557003275952137703782509249052427⟩,⟨486717730444236409488802928058720376580071999518359895251542,486717730444236409488802928058720376580071999518505960033096⟩⟩, + ⟨⟨456757227740081803047719304600650919492143613358791301883311,456757227740081803047719304600650919492143613358924929323312⟩,⟨753017130573724489631434471524529152471192596271645451829858,753017130573724489631434471524529152471192596271779193957972⟩⟩, + ⟨⟨56610208536693471016951528825079775446796800230491701178999,56610208536693471016951528825079775446796800230599824338270⟩,⟨762680430436779585595962914215791504431058121996193331189375,762680430436779585595962914215791504431058121996301405108809⟩⟩, + ⟨⟨-221043520713009587547837106033873613713212941333761020509076,-221043520713009587547837106033873613713212941333667466554300⟩,⟨602650293685541946802825765693075989596416543562675201864948,602650293685541946802825765693075989596416543562768485264686⟩⟩, + ⟨⟨-347572741369233531186126312175337462076027055937187358568469,-347572741369233531186126312175337462076027055937121060636180⟩,⟨397789553251379735472015711645730246657691627369609473781057,397789553251379735472015711645730246657691627369675892249819⟩⟩, + ⟨⟨-370256316338614315136714577508365334437416526311493007641000,-370256316338614315136714577508365334437416526311440322867196⟩,⟨228919081354846068030159633673926238260323262098214658553442,228919081354846068030159633673926238260323262098266781941898⟩⟩, + ⟨⟨-349694515866130190721924214995690160240216036418309734620419,-349694515866130190721924214995690160240216036418280181897644⟩,⟨116697101260411335438859906335464723655589152125747227263237,116697101260411335438859906335464723655589152125776279768630⟩⟩, + ⟨⟨-325812429963000353114099823005431832880496275190484256561537,-325812429963000353114099823005431832880496275190463057209909⟩,⟨47730819008613465348935123097405886527086185964457097692552,47730819008613465348935123097405886527086185964478120306867⟩⟩, + ⟨⟨-316355346154377745621903168800828755542370254921914184940037,-316355346154377745621903168800828755542370254921900311760146⟩,⟨-21997,20447⟩⟩, + ⟨⟨-325812429963000353114099823005431832880496275190484256561275,-325812429963000353114099823005431832880496275190463057209501⟩,⟨-47730819008613465348935123097405886527086185964478120308888,-47730819008613465348935123097405886527086185964457097694396⟩⟩, + ⟨⟨-349694515866130190721924214995690160240216036418309734619835,-349694515866130190721924214995690160240216036418280181896555⟩,⟨-116697101260411335438859906335464723655589152125776279770654,-116697101260411335438859906335464723655589152125747227265323⟩⟩, + ⟨⟨-370256316338614315136714577508365334437416526311493007639003,-370256316338614315136714577508365334437416526311440322866280⟩,⟨-228919081354846068030159633673926238260323262098266781943893,-228919081354846068030159633673926238260323262098214658556518⟩⟩, + ⟨⟨-347572741369233531186126312175337462076027055937187358564731,-347572741369233531186126312175337462076027055937121060633614⟩,⟨-397789553251379735472015711645730246657691627369675892252148,-397789553251379735472015711645730246657691627369609473784557⟩⟩, + ⟨⟨-221043520713009587547837106033873613713212941333761020506103,-221043520713009587547837106033873613713212941333667466548573⟩,⟨-602650293685541946802825765693075989596416543562768485267613,-602650293685541946802825765693075989596416543562675201865124⟩⟩, + ⟨⟨56610208536693471016951528825079775446796800230491701183807,56610208536693471016951528825079775446796800230599824342806⟩,⟨-762680430436779585595962914215791504431058121996301405108350,-762680430436779585595962914215791504431058121996193331189188⟩⟩, + ⟨⟨456757227740081803047719304600650919492143613358791301890287,456757227740081803047719304600650919492143613358924929326579⟩,⟨-753017130573724489631434471524529152471192596271779193952954,-753017130573724489631434471524529152471192596271645451828522⟩⟩, + ⟨⟨842557236010516607131925205557003275952137703782363074829118,842557236010516607131925205557003275952137703782509249057695⟩,⟨-486717730444236409488802928058720376580071999518505960030816,-486717730444236409488802928058720376580071999518359895243990⟩⟩, + ⟨⟨1029234618302365275084503545158703143758437268281519797780626,1029234618302365275084503545158703143758437268281650457678689⟩,⟨-5580914546502293777029333092494939862610106463519207401397,-5580914546502293777029333092494939862610106463388577084853⟩⟩, + ⟨⟨907088084092054634316820139426378492785136498083532903343823,907088084092054634316820139426378492785136498083678568254254⟩,⟨517044542644945129092195474316595548274016617316259895824190,517044542644945129092195474316595548274016617316406025817627⟩⟩, + ⟨⟨518241547135107029309014615432421006281233652945911879521489,518241547135107029309014615432421006281233652946051120735750⟩,⟨878199871096263678722533294872149661521573284199014025547825,878199871096263678722533294872149661521573284199154171168595⟩⟩, + ⟨⟨23023480458053300974233208454408444300286229587502416635004,23023480458053300974233208454408444300286229587619737503947⟩,⟨963252210141871515453393054598124927293324364292131165025738,963252210141871515453393054598124927293324364292249105653371⟩⟩, + ⟨⟨-401446587064247664355228819479732686722693994217119442079303,-401446587064247664355228819479732686722693994217021641019237⟩,⟨789201107694267752071622904419334216446864204045483760236209,789201107694267752071622904419334216446864204045581539811458⟩⟩, + ⟨⟨-645752851178146511728747088551776195067850850467047435592587,-645752851178146511728747088551776195067850850466958903119312⟩,⟨464200796635872109127511992485623802663433568467444519288090,464200796635872109127511992485623802663433568467532603227591⟩⟩, + ⟨⟨-691787518329751764538129248959103078167595530740221908128515,-691787518329751764538129248959103078167595530740149069194568⟩,⟨115393673049535146710833455550760182477845599726386155623136,115393673049535146710833455550760182477845599726458531688463⟩⟩] +lemma tw1_1_0_5_calc (j : Fin 31) : taylorWaveBox 1 1 0 5 j = tw1_1_0_5 j := by + revert j + decide +kernel +def tw1_1_0_6 : Fin 31 → CI := ![⟨⟨157063354472667844597792867535672313776682988938512755354105,157063354472667844597792867535672313776682988938552189549689⟩,⟨-288439876114679727009237273900481914152189392282825173584632,-288439876114679727009237273900481914152189392282785610088021⟩⟩, + ⟨⟨328291678585274517163676153928146306594056509354295801439340,328291678585274517163676153928146306594056509354343638488172⟩,⟨-208909680467495037756997896943298141814166572372186667808520,-208909680467495037756997896943298141814166572372138853486872⟩⟩, + ⟨⟨452971265714202054586258074051481812784999534920526368321495,452971265714202054586258074051481812784999534920590148093277⟩,⟨-17654622810594921190753406949718282571152692397558529652301,-17654622810594921190753406949718282571152692397495116858056⟩⟩, + ⟨⟨451047963334123925848023759185766639029832818752384944532050,451047963334123925848023759185766639029832818752466274929603⟩,⟨252330267803604966227278667445282163849735974966496723440346,252330267803604966227278667445282163849735974966577561619272⟩⟩, + ⟨⟨271394349588784451451303240524758678698670356813092564570939,271394349588784451451303240524758678698670356813183779603878⟩,⟨505444319679482525833472014500300369733026740140107730266877,505444319679482525833472014500300369733026740140198696239428⟩⟩, + ⟨⟨-55601350320606027519512756134910177114245261774612071481327,-55601350320606027519512756134910177114245261774514528150610⟩,⟨614110114921346295645230722584342516682130108845383313229200,614110114921346295645230722584342516682130108845480999455373⟩⟩, + ⟨⟨-402590628721648500695994508559687986819656687466281591245831,-402590628721648500695994508559687986819656687466167577205544⟩,⟨495344535149888328236468049367551355662797417440897399694453,495344535149888328236468049367551355662797417441011712335349⟩⟩, + ⟨⟨-606108543249727396326621894155424012458205503663684555094939,-606108543249727396326621894155424012458205503663575000646575⟩,⟨184494907324232306666550142873828651062501610653478059846801,184494907324232306666550142873828651062501610653587650851506⟩⟩, + ⟨⟨-576895762293278547086922946858456611918683960465420322957184,-576895762293278547086922946858456611918683960465310665257635⟩,⟨-170225636440427283848235044255088306348399989548376658398529,-170225636440427283848235044255088306348399989548266946469393⟩⟩, + ⟨⟨-362729322245644098930823189099418229511152381101380843279641,-362729322245644098930823189099418229511152381101278340992583⟩,⟨-409111778744743239452591159832847352809388070309345006716893,-409111778744743239452591159832847352809388070309242301029054⟩⟩, + ⟨⟨-97723750847950206115568640781410279093716101804863819471459,-97723750847950206115568640781410279093716101804782115898197⟩,⟨-468794019114685311115061066025953727617405522428239125743487,-468794019114685311115061066025953727617405522428157493814406⟩⟩, + ⟨⟨106060915871137655101409854005104088338757774651626415615183,106060915871137655101409854005104088338757774651695575232392⟩,⟨-395339736924201057000122638528312358841143862206620320339100,-395339736924201057000122638528312358841143862206551108853035⟩⟩, + ⟨⟨215800434348893881289744486374076032506994021597469984027981,215800434348893881289744486374076032506994021597516217447292⟩,⟨-273264483767599777073779931558200008189442266153696099626724,-273264483767599777073779931558200008189442266153649975571274⟩⟩, + ⟨⟨256273709133753130270640311881310144599005500201173525381541,256273709133753130270640311881310144599005500201203190106218⟩,⟨-159909870059302192566217679172298062208434710507929870327831,-159909870059302192566217679172298062208434710507900985822825⟩⟩, + ⟨⟨264394586971737374925884696930687160702614551720319381867527,264394586971737374925884696930687160702614551720338623940523⟩,⟨-71584774569853570666813648906666669315400538001411308251060,-71584774569853570666813648906666669315400538001391912389186⟩⟩, + ⟨⟨264507765480966642700176990439759039428399570225510274701407,264507765480966642700176990439759039428399570225522716155702⟩,⟨-17096,18393⟩⟩, + ⟨⟨264394586971737374925884696930687160702614551720319381867015,264394586971737374925884696930687160702614551720338623940100⟩,⟨71584774569853570666813648906666669315400538001391912390660,71584774569853570666813648906666669315400538001411308252712⟩⟩, + ⟨⟨256273709133753130270640311881310144599005500201173525380293,256273709133753130270640311881310144599005500201203190105346⟩,⟨159909870059302192566217679172298062208434710507900985824277,159909870059302192566217679172298062208434710507929870329334⟩⟩, + ⟨⟨215800434348893881289744486374076032506994021597469984026583,215800434348893881289744486374076032506994021597516217445115⟩,⟨273264483767599777073779931558200008189442266153649975573172,273264483767599777073779931558200008189442266153696099627841⟩⟩, + ⟨⟨106060915871137655101409854005104088338757774651626415612584,106060915871137655101409854005104088338757774651695575228616⟩,⟨395339736924201057000122638528312358841143862206551108854576,395339736924201057000122638528312358841143862206620320339464⟩⟩, + ⟨⟨-97723750847950206115568640781410279093716101804863819475688,-97723750847950206115568640781410279093716101804782115900702⟩,⟨468794019114685311115061066025953727617405522428157493812781,468794019114685311115061066025953727617405522428239125743643⟩⟩, + ⟨⟨-362729322245644098930823189099418229511152381101380843282042,-362729322245644098930823189099418229511152381101278340995215⟩,⟨409111778744743239452591159832847352809388070309242301026961,409111778744743239452591159832847352809388070309345006714570⟩⟩, + ⟨⟨-576895762293278547086922946858456611918683960465420322957101,-576895762293278547086922946858456611918683960465310665259968⟩,⟨170225636440427283848235044255088306348399989548266946466652,170225636440427283848235044255088306348399989548376658393351⟩⟩, + ⟨⟨-606108543249727396326621894155424012458205503663684555095311,-606108543249727396326621894155424012458205503663575000643859⟩,⟨-184494907324232306666550142873828651062501610653587650856475,-184494907324232306666550142873828651062501610653478059848700⟩⟩, + ⟨⟨-402590628721648500695994508559687986819656687466281591243972,-402590628721648500695994508559687986819656687466167577201815⟩,⟨-495344535149888328236468049367551355662797417441011712338498,-495344535149888328236468049367551355662797417440897399695733⟩⟩, + ⟨⟨-55601350320606027519512756134910177114245261774612071479418,-55601350320606027519512756134910177114245261774514528144701⟩,⟨-614110114921346295645230722584342516682130108845480999457690,-614110114921346295645230722584342516682130108845383313227508⟩⟩, + ⟨⟨271394349588784451451303240524758678698670356813092564573548,271394349588784451451303240524758678698670356813183779608966⟩,⟨-505444319679482525833472014500300369733026740140198696238616,-505444319679482525833472014500300369733026740140107730263583⟩⟩, + ⟨⟨451047963334123925848023759185766639029832818752384944534700,451047963334123925848023759185766639029832818752466274930478⟩,⟨-252330267803604966227278667445282163849735974966577561615340,-252330267803604966227278667445282163849735974966496723438190⟩⟩, + ⟨⟨452971265714202054586258074051481812784999534920526368320650,452971265714202054586258074051481812784999534920590148093752⟩,⟨17654622810594921190753406949718282571152692397495116860445,17654622810594921190753406949718282571152692397558529656010⟩⟩, + ⟨⟨328291678585274517163676153928146306594056509354295801437486,328291678585274517163676153928146306594056509354343638487256⟩,⟨208909680467495037756997896943298141814166572372138853488567,208909680467495037756997896943298141814166572372186667811148⟩⟩, + ⟨⟨157063354472667844597792867535672313776682988938512755352712,157063354472667844597792867535672313776682988938552189547172⟩,⟨288439876114679727009237273900481914152189392282785610089603,288439876114679727009237273900481914152189392282825173585092⟩⟩] +lemma tw1_1_0_6_calc (j : Fin 31) : taylorWaveBox 1 1 0 6 j = tw1_1_0_6 j := by + revert j + decide +kernel +def tw1_1_0_7 : Fin 31 → CI := ![⟨⟨92062650959471014430893160312199456110265017654572654991136,92062650959471014430893160312199456110265017654591374937856⟩,⟨101065445743170269106525113177409876165234928986540053844053,101065445743170269106525113177409876165234928986558776666287⟩⟩, + ⟨⟨31283346125957277420460060007598529486103619291876973051521,31283346125957277420460060007598529486103619291903327199735⟩,⟨166323895395491641904196467815102841830317161530513591201922,166323895395491641904196467815102841830317161530540070514689⟩⟩, + ⟨⟨-78937115618144078561778781047777219382920847252091493724231,-78937115618144078561778781047777219382920847252054737243784⟩,⟨190596248497689490666762144566913028276665128847109343566070,190596248497689490666762144566913028276665128847146303308973⟩⟩, + ⟨⟨-206852206439582626741102959486972075293299793624013314026005,-206852206439582626741102959486972075293299793623967522941490⟩,⟨133927279180274297417898255348074204715971195811400659624696,133927279180274297417898255348074204715971195811446556704989⟩⟩, + ⟨⟨-286513950919565826847715577191987449010631698807439776218423,-286513950919565826847715577191987449010631698807384869015681⟩,⟨-14955041499911426378566491374885810523375617065298373471767,-14955041499911426378566491374885810523375617065243581951897⟩⟩, + ⟨⟨-247859350524212823625521078159962238695256029114308357698845,-247859350524212823625521078159962238695256029114239157883110⟩,⟨-208201579532943253324264246071917251298589201326167032972595,-208201579532943253324264246071917251298589201326098051567864⟩⟩, + ⟨⟨-73795644163252826102315970069438082787575724197724089182885,-73795644163252826102315970069438082787575724197650963787759⟩,⟨-344056145552566280758606928356556886633318274616186171481087,-344056145552566280758606928356556886633318274616113091858511⟩⟩, + ⟨⟨161475952267113049321613275349404819730484157971863118039862,161475952267113049321613275349404819730484157971945199423846⟩,⟨-329225495725428476535842653289018143180019478995598754479108,-329225495725428476535842653289018143180019478995516636690416⟩⟩, + ⟨⟨328520762476412281132088173126910913737668903017578234553557,328520762476412281132088173126910913737668903017661759658387⟩,⟨-159383644457673445958038778251475615084114321596515717299175,-159383644457673445958038778251475615084114321596432231319958⟩⟩, + ⟨⟨340931821550900714947201741216289659500588169266012627853781,340931821550900714947201741216289659500588169266094060307088⟩,⟨67029834019713479145228190877487743283310896212537918892303,67029834019713479145228190877487743283310896212619432231985⟩⟩, + ⟨⟨219359565686870368182741182948070234285035955851584558302077,219359565686870368182741182948070234285035955851653854115762⟩,⟨229606368874710943757897909534951448884595807626238404919462,229606368874710943757897909534951448884595807626307790191628⟩⟩, + ⟨⟨54327963807505778145147370664847840558421155351309368026022,54327963807505778145147370664847840558421155351368238092904⟩,⟨276642772488196831145989511586117747768268479229389413657895,276642772488196831145989511586117747768268479229448275992292⟩⟩, + ⟨⟨-77837524819142962221790430519706665414585251230283560357431,-77837524819142962221790430519706665414585251230248466086484⟩,⟨235021290800960643375225991442854120738680217409448928708709,235021290800960643375225991442854120738680217409484250484488⟩⟩, + ⟨⟨-154285971107116430133403098742452860586547765805180056273781,-154285971107116430133403098742452860586547765805154603696208⟩,⟨156850741845125041031767676985395765844063795955676070021089,156850741845125041031767676985395765844063795955700856820582⟩⟩, + ⟨⟨-187832542833263549904996142297903132702202985248426205254007,-187832542833263549904996142297903132702202985248410742425384⟩,⟨75755045988982325303783709124423942455798385143403781537278,75755045988982325303783709124423942455798385143419586131121⟩⟩, + ⟨⟨-196584445940925492182048646011192528826451327794929031999142,-196584445940925492182048646011192528826451327794919159655589⟩,⟨-13671,12707⟩⟩, + ⟨⟨-187832542833263549904996142297903132702202985248426205253546,-187832542833263549904996142297903132702202985248410742424884⟩,⟨-75755045988982325303783709124423942455798385143419586132304,-75755045988982325303783709124423942455798385143403781538309⟩⟩, + ⟨⟨-154285971107116430133403098742452860586547765805180056272894,-154285971107116430133403098742452860586547765805154603695091⟩,⟨-156850741845125041031767676985395765844063795955700856821502,-156850741845125041031767676985395765844063795955676070021900⟩⟩, + ⟨⟨-77837524819142962221790430519706665414585251230283560355658,-77837524819142962221790430519706665414585251230248466085135⟩,⟨-235021290800960643375225991442854120738680217409484250484849,-235021290800960643375225991442854120738680217409448928709493⟩⟩, + ⟨⟨54327963807505778145147370664847840558421155351309368028697,54327963807505778145147370664847840558421155351368238094749⟩,⟨-276642772488196831145989511586117747768268479229448275991500,-276642772488196831145989511586117747768268479229389413657932⟩⟩, + ⟨⟨219359565686870368182741182948070234285035955851584558303133,219359565686870368182741182948070234285035955851653854117980⟩,⟨-229606368874710943757897909534951448884595807626307790190633,-229606368874710943757897909534951448884595807626238404917270⟩⟩, + ⟨⟨340931821550900714947201741216289659500588169266012627854274,340931821550900714947201741216289659500588169266094060307438⟩,⟨-67029834019713479145228190877487743283310896212619432229828,-67029834019713479145228190877487743283310896212537918890289⟩⟩, + ⟨⟨328520762476412281132088173126910913737668903017578234553166,328520762476412281132088173126910913737668903017661759656550⟩,⟨159383644457673445958038778251475615084114321596432231322925,159383644457673445958038778251475615084114321596515717300682⟩⟩, + ⟨⟨161475952267113049321613275349404819730484157971863118036973,161475952267113049321613275349404819730484157971945199422905⟩,⟨329225495725428476535842653289018143180019478995516636690300,329225495725428476535842653289018143180019478995598754480947⟩⟩, + ⟨⟨-73795644163252826102315970069438082787575724197724089185225,-73795644163252826102315970069438082787575724197650963789253⟩,⟨344056145552566280758606928356556886633318274616113091857653,344056145552566280758606928356556886633318274616186171481071⟩⟩, + ⟨⟨-247859350524212823625521078159962238695256029114308357701454,-247859350524212823625521078159962238695256029114239157883116⟩,⟨208201579532943253324264246071917251298589201326098051564972,208201579532943253324264246071917251298589201326167032972306⟩⟩, + ⟨⟨-286513950919565826847715577191987449010631698807439776219111,-286513950919565826847715577191987449010631698807384869015232⟩,⟨14955041499911426378566491374885810523375617065243581949151,14955041499911426378566491374885810523375617065298373470157⟩⟩, + ⟨⟨-206852206439582626741102959486972075293299793624013314024734,-206852206439582626741102959486972075293299793623967522940979⟩,⟨-133927279180274297417898255348074204715971195811446556706031,-133927279180274297417898255348074204715971195811400659626496⟩⟩, + ⟨⟨-78937115618144078561778781047777219382920847252091493723272,-78937115618144078561778781047777219382920847252054737242151⟩,⟨-190596248497689490666762144566913028276665128847146303309814,-190596248497689490666762144566913028276665128847109343566237⟩⟩, + ⟨⟨31283346125957277420460060007598529486103619291876973052386,31283346125957277420460060007598529486103619291903327201063⟩,⟨-166323895395491641904196467815102841830317161530540070514711,-166323895395491641904196467815102841830317161530513591201480⟩⟩, + ⟨⟨92062650959471014430893160312199456110265017654572654991999,92062650959471014430893160312199456110265017654591374938328⟩,⟨-101065445743170269106525113177409876165234928986558776665461,-101065445743170269106525113177409876165234928986540053843619⟩⟩] +lemma tw1_1_0_7_calc (j : Fin 31) : taylorWaveBox 1 1 0 7 j = tw1_1_0_7 j := by + revert j + decide +kernel +def tw1_1_0_8 : Fin 31 → CI := ![⟨⟨-47063006654376588295552617169738089910341683299288112451493,-47063006654376588295552617169738089910341683299279480273555⟩,⟨20201958258250141659867396561983659610066599952006643100381,20201958258250141659867396561983659610066599952015251081504⟩⟩, + ⟨⟨-64991981905075952992384131197167451942814148107933971106551,-64991981905075952992384131197167451942814148107920798067764⟩,⟨-12829298053712945754331330874722382110524050798929083105601,-12829298053712945754331330874722382110524050798915971245163⟩⟩, + ⟨⟨-57379575269206751268253222995347644548553466168473644442702,-57379575269206751268253222995347644548553466168455298231900⟩,⟨-62022096040457710358583004210730511575421796353105649575030,-62022096040457710358583004210730511575421796353087346692057⟩⟩, + ⟨⟨-9338291346704054400423925128981645814855328954861355862426,-9338291346704054400423925128981645814855328954837328738257⟩,⟨-105331020351079498284337874814448035173015515704758232325260,-105331020351079498284337874814448035173015515704734158941114⟩⟩, + ⟨⟨72599690017314623572266673672107528628738429032070549808521,72599690017314623572266673672107528628738429032103478438357⟩,⟨-106790766006391384888793942936555072094881906375120571843550,-106790766006391384888793942936555072094881906375087532852345⟩⟩, + ⟨⟨147646845283022807245180945528745216491813284647657314167248,147646845283022807245180945528745216491813284647696641132121⟩,⟨-39874099617289007849616264987524210228957638219463426466861,-39874099617289007849616264987524210228957638219424070518976⟩⟩, + ⟨⟨155985993231958856527738618563163911237749193547210726891695,155985993231958856527738618563163911237749193547259245823644⟩,⟨78404926132353941771461088645344196183160002190965202102839,78404926132353941771461088645344196183160002191013658781064⟩⟩, + ⟨⟨67881404126831453605077969790887824700596836412967361161378,67881404126831453605077969790887824700596836413021213950196⟩,⟨178541245372297194324692212133384000637291006005218579122023,178541245372297194324692212133384000637291006005272418441375⟩⟩, + ⟨⟨-74084336343259690133688977983852689156333391149561219950267,-74084336343259690133688977983852689156333391149501812780325⟩,⟨185233738597442990906114599612976445316025454650723082851263,185233738597442990906114599612976445316025454650782467430091⟩⟩, + ⟨⟨-178318461499528802096630495288471341488981233238945691379069,-178318461499528802096630495288471341488981233238886843827282⟩,⟨87716914174584681153652625080963766396165523024222420831768,87716914174584681153652625080963766396165523024281227984557⟩⟩, + ⟨⟨-183570532919929401804879643430695194276406841671162088654470,-183570532919929401804879643430695194276406841671107210947805⟩,⟨-47098766482425571621715824542760315989250513239090583769497,-47098766482425571621715824542760315989250513239035631993303⟩⟩, + ⟨⟨-105756250039918893206618591541897636807490577728710441651073,-105756250039918893206618591541897636807490577728667211753982⟩,⟨-139133804297677461954857159102854612148518529413620868649366,-139133804297677461954857159102854612148518529413577671646671⟩⟩, + ⟨⟨-4560437762674629768082151982347278626877222716444393674844,-4560437762674629768082151982347278626877222716415312324850⟩,⟨-158361412823036508744995067794370211066340173478647889565330,-158361412823036508744995067794370211066340173478618528087594⟩⟩, + ⟨⟨74320837798773846321011396004167621159218748539584155288833,74320837798773846321011396004167621159218748539603307485787⟩,⟨-123598822664918788822740066301312165631992024223246451361135,-123598822664918788822740066301312165631992024223227707180010⟩⟩, + ⟨⟨118130572652400122267152945631330416574481566169748941197258,118130572652400122267152945631330416574481566169760091262596⟩,⟨-64889085061770325878601686045416738195445255628032100819291,-64889085061770325878601686045416738195445255628020570559844⟩⟩, + ⟨⟨131492925676744803676242270789498339062589105628580425726271,131492925676744803676242270789498339062589105628587447770819⟩,⟨-8500,9145⟩⟩, + ⟨⟨118130572652400122267152945631330416574481566169748941196848,118130572652400122267152945631330416574481566169760091262195⟩,⟨64889085061770325878601686045416738195445255628020570560481,64889085061770325878601686045416738195445255628032100820040⟩⟩, + ⟨⟨74320837798773846321011396004167621159218748539584155288004,74320837798773846321011396004167621159218748539603307485073⟩,⟨123598822664918788822740066301312165631992024223227707180351,123598822664918788822740066301312165631992024223246451361591⟩⟩, + ⟨⟨-4560437762674629768082151982347278626877222716444393675735,-4560437762674629768082151982347278626877222716415312326087⟩,⟨158361412823036508744995067794370211066340173478618528087769,158361412823036508744995067794370211066340173478647889565161⟩⟩, + ⟨⟨-105756250039918893206618591541897636807490577728710441652017,-105756250039918893206618591541897636807490577728667211755347⟩,⟨139133804297677461954857159102854612148518529413577671646054,139133804297677461954857159102854612148518529413620868648328⟩⟩, + ⟨⟨-183570532919929401804879643430695194276406841671162088655190,-183570532919929401804879643430695194276406841671107210947738⟩,⟨47098766482425571621715824542760315989250513239035631991588,47098766482425571621715824542760315989250513239090583768565⟩⟩, + ⟨⟨-178318461499528802096630495288471341488981233238945691378500,-178318461499528802096630495288471341488981233238886843826788⟩,⟨-87716914174584681153652625080963766396165523024281227985614,-87716914174584681153652625080963766396165523024222420832900⟩⟩, + ⟨⟨-74084336343259690133688977983852689156333391149561219948584,-74084336343259690133688977983852689156333391149501812779462⟩,⟨-185233738597442990906114599612976445316025454650782467430177,-185233738597442990906114599612976445316025454650723082852164⟩⟩, + ⟨⟨67881404126831453605077969790887824700596836412967361161907,67881404126831453605077969790887824700596836413021213951685⟩,⟨-178541245372297194324692212133384000637291006005272418441435,-178541245372297194324692212133384000637291006005218579121118⟩⟩, + ⟨⟨155985993231958856527738618563163911237749193547210726891882,155985993231958856527738618563163911237749193547259245824310⟩,⟨-78404926132353941771461088645344196183160002191013658780427,-78404926132353941771461088645344196183160002190965202101721⟩⟩, + ⟨⟨147646845283022807245180945528745216491813284647657314166471,147646845283022807245180945528745216491813284647696641132371⟩,⟨39874099617289007849616264987524210228957638219424070519400,39874099617289007849616264987524210228957638219463426468310⟩⟩, + ⟨⟨72599690017314623572266673672107528628738429032070549807401,72599690017314623572266673672107528628738429032103478437855⟩,⟨106790766006391384888793942936555072094881906375087532852591,106790766006391384888793942936555072094881906375120571844413⟩⟩, + ⟨⟨-9338291346704054400423925128981645814855328954861355863000,-9338291346704054400423925128981645814855328954837328739119⟩,⟨105331020351079498284337874814448035173015515704734158941206,105331020351079498284337874814448035173015515704758232325062⟩⟩, + ⟨⟨-57379575269206751268253222995347644548553466168473644443239,-57379575269206751268253222995347644548553466168455298232182⟩,⟨62022096040457710358583004210730511575421796353087346691534,62022096040457710358583004210730511575421796353105649574762⟩⟩, + ⟨⟨-64991981905075952992384131197167451942814148107933971106737,-64991981905075952992384131197167451942814148107920798067744⟩,⟨12829298053712945754331330874722382110524050798915971244631,12829298053712945754331330874722382110524050798929083105275⟩⟩, + ⟨⟨-47063006654376588295552617169738089910341683299288112451276,-47063006654376588295552617169738089910341683299279480273490⟩,⟨-20201958258250141659867396561983659610066599952015251081742,-20201958258250141659867396561983659610066599952006643100770⟩⟩] +lemma tw1_1_0_8_calc (j : Fin 31) : taylorWaveBox 1 1 0 8 j = tw1_1_0_8 j := by + revert j + decide +kernel +def tw1_1_0_9 : Fin 31 → CI := ![⟨⟨-1256861089060091603499809416701255261949926247643074268823,-1256861089060091603499809416701255261949926247639362272270⟩,⟨-17397263757532374061757900568068353734999429560966218198618,-17397263757532374061757900568068353734999429560962494087887⟩⟩, + ⟨⟨12833942847659913234806337432400322879877374788420311359580,12833942847659913234806337432400322879877374788426062947144⟩,⟨-19773736009083779398088932240987578849351997748733732232669,-19773736009083779398088932240987578849351997748727966109161⟩⟩, + ⟨⟨29913087535415075381751526842361596811188210600146329838217,29913087535415075381751526842361596811188210600154562673127⟩,⟨-9744794469189464050356027271723325853253113832503318311386,-9744794469189464050356027271723325853253113832495094273141⟩⟩, + ⟨⟨38031381017456480037386151293068094701527226054241801263810,38031381017456480037386151293068094701527226054254355116879⟩,⟨15977854088800579616866221160057234848224196524982423477705,15977854088800579616866221160057234848224196524994936101106⟩⟩, + ⟨⟨21969565245882511667559536192090939205186620391407732967687,21969565245882511667559536192090939205186620391424591608731⟩,⟨48052686861745272586069886934466715561967148908229169166873,48052686861745272586069886934466715561967148908246009828604⟩⟩, + ⟨⟨-22190332250578532271861725435833766451660015696305500644224,-22190332250578532271861725435833766451660015696282981803357⟩,⟨61826260614632216241287471710723818266587983951322316808690,61826260614632216241287471710723818266587983951344870627842⟩⟩, + ⟨⟨-71640283387416867007775958558779014798680424990734506202022,-71640283387416867007775958558779014798680424990706198708328⟩,⟨32681987983523937611251313010581656273676845025368142679687,32681987983523937611251313010581656273676845025396470259559⟩⟩, + ⟨⟨-83722939185984776059947818960303326207938129234200822648625,-83722939185984776059947818960303326207938129234167139287282⟩,⟨-34234413160605121018995965894213238120442122234610257708582,-34234413160605121018995965894213238120442122234576582092210⟩⟩, + ⟨⟨-34736704307765450926702100356365104170268898230086350456969,-34736704307765450926702100356365104170268898230048274881777⟩,⟨-92801512380058309012363012181954340494243477455986252414177,-92801512380058309012363012181954340494243477455948168600159⟩⟩, + ⟨⟨46089167220545100761074362309301185452233349541113829672537,46089167220545100761074362309301185452233349541155465100723⟩,⟨-92477499300754600730823502688267583231478762458341521650168,-92477499300754600730823502688267583231478762458299924034925⟩⟩, + ⟨⟨98048948434220784316506591763942851183602044843386325152476,98048948434220784316506591763942851183602044843423931054622⟩,⟨-30966335090742845621446174576633298678403835478066901886656,-30966335090742845621446174576633298678403835478029288336148⟩⟩, + ⟨⟨88036539028646679096413876713720222093994362454261878372941,88036539028646679096413876713720222093994362454293465783198⟩,⟨44149360273263943383112537698670615367398759511823930607350,44149360273263943383112537698670615367398759511855500504520⟩⟩, + ⟨⟨33962868150573303502820876419341243115130495074640908414457,33962868150573303502820876419341243115130495074661889343542⟩,⟨85677326011903385493348960167026665210165068616117099470592,85677326011903385493348960167026665210165068616138232940494⟩⟩, + ⟨⟨-25858535247135278532471539087201632026717788327168737480337,-25858535247135278532471539087201632026717788327155850853664⟩,⟨81963574304052000402857423901272280959528162322385940525214,81963574304052000402857423901272280959528162322398644405730⟩⟩, + ⟨⟨-66301942520196441640418530708612004511875236509189885561805,-66301942520196441640418530708612004511875236509182591370840⟩,⟨47459063227809419147057296856794575672711574927910682545475,47459063227809419147057296856794575672711574927918298136019⟩⟩, + ⟨⟨-79958187111959427768042231967049943579222540889545501025210,-79958187111959427768042231967049943579222540889540976547208⟩,⟨-5561,5169⟩⟩, + ⟨⟨-66301942520196441640418530708612004511875236509189885561510,-66301942520196441640418530708612004511875236509182591370550⟩,⟨-47459063227809419147057296856794575672711574927918298136444,-47459063227809419147057296856794575672711574927910682545825⟩⟩, + ⟨⟨-25858535247135278532471539087201632026717788327168737479856,-25858535247135278532471539087201632026717788327155850853141⟩,⟨-81963574304052000402857423901272280959528162322398644405898,-81963574304052000402857423901272280959528162322385940525292⟩⟩, + ⟨⟨33962868150573303502820876419341243115130495074640908415149,33962868150573303502820876419341243115130495074661889344015⟩,⟨-85677326011903385493348960167026665210165068616138232940175,-85677326011903385493348960167026665210165068616117099470491⟩⟩, + ⟨⟨88036539028646679096413876713720222093994362454261878373450,88036539028646679096413876713720222093994362454293465783446⟩,⟨-44149360273263943383112537698670615367398759511855500503685,-44149360273263943383112537698670615367398759511823930606775⟩⟩, + ⟨⟨98048948434220784316506591763942851183602044843386325152077,98048948434220784316506591763942851183602044843423931054562⟩,⟨30966335090742845621446174576633298678403835478029288336689,30966335090742845621446174576633298678403835478066901887522⟩⟩, + ⟨⟨46089167220545100761074362309301185452233349541113829671994,46089167220545100761074362309301185452233349541155465100136⟩,⟨92477499300754600730823502688267583231478762458299924035232,92477499300754600730823502688267583231478762458341521650430⟩⟩, + ⟨⟨-34736704307765450926702100356365104170268898230086350457419,-34736704307765450926702100356365104170268898230048274882592⟩,⟨92801512380058309012363012181954340494243477455948168600095,92801512380058309012363012181954340494243477455986252413752⟩⟩, + ⟨⟨-83722939185984776059947818960303326207938129234200822649041,-83722939185984776059947818960303326207938129234167139287227⟩,⟨34234413160605121018995965894213238120442122234576582091489,34234413160605121018995965894213238120442122234610257708331⟩⟩, + ⟨⟨-71640283387416867007775958558779014798680424990734506201937,-71640283387416867007775958558779014798680424990706198708037⟩,⟨-32681987983523937611251313010581656273676845025396470260061,-32681987983523937611251313010581656273676845025368142679982⟩⟩, + ⟨⟨-22190332250578532271861725435833766451660015696305500644075,-22190332250578532271861725435833766451660015696282981802716⟩,⟨-61826260614632216241287471710723818266587983951344870628225,-61826260614632216241287471710723818266587983951322316808581⟩⟩, + ⟨⟨21969565245882511667559536192090939205186620391407732967941,21969565245882511667559536192090939205186620391424591609209⟩,⟨-48052686861745272586069886934466715561967148908246009828550,-48052686861745272586069886934466715561967148908229169166595⟩⟩, + ⟨⟨38031381017456480037386151293068094701527226054241801263991,38031381017456480037386151293068094701527226054254355116922⟩,⟨-15977854088800579616866221160057234848224196524994936100780,-15977854088800579616866221160057234848224196524982423477517⟩⟩, + ⟨⟨29913087535415075381751526842361596811188210600146329838110,29913087535415075381751526842361596811188210600154562673094⟩,⟨9744794469189464050356027271723325853253113832495094273303,9744794469189464050356027271723325853253113832503318311624⟩⟩, + ⟨⟨12833942847659913234806337432400322879877374788420311359414,12833942847659913234806337432400322879877374788426062947049⟩,⟨19773736009083779398088932240987578849351997748727966109209,19773736009083779398088932240987578849351997748733732232789⟩⟩, + ⟨⟨-1256861089060091603499809416701255261949926247643074268910,-1256861089060091603499809416701255261949926247639362272416⟩,⟨17397263757532374061757900568068353734999429560962494087907,17397263757532374061757900568068353734999429560966218198578⟩⟩] +lemma tw1_1_0_9_calc (j : Fin 31) : taylorWaveBox 1 1 0 9 j = tw1_1_0_9 j := by + revert j + decide +kernel +def tw1_1_0_10 : Fin 31 → CI := ![⟨⟨5260673065698637691464655762460548108059984992617957078967,5260673065698637691464655762460548108059984992619395365516⟩,⟨1406377080889290108078461379928483468046815622715600135223,1406377080889290108078461379928483468046815622717035177200⟩⟩, + ⟨⟨4432072640285536876697531423166048186707346655344595687275,4432072640285536876697531423166048186707346655346878323739⟩,⟨6283756392877191728985515033729894906609942593891946871452,6283756392877191728985515033729894906609942593894229340111⟩⟩, + ⟨⟨-1250038416176682688564505183209958181049265595024202046817,-1250038416176682688564505183209958181049265595020465154089⟩,⟨10664787335547126295471106748297943927514332999508525530484,10664787335547126295471106748297943927514332999512273505374⟩⟩, + ⟨⟨-11405933262805240269589613513172515888713919786719958762771,-11405933262805240269589613513172515888713919786714234728354⟩,⟨9354550504092935127852253573632169427970106273099449968779,9354550504092935127852253573632169427970106273105182952637⟩⟩, + ⟨⟨-19684209878073052379136607504666572724058473683519933040197,-19684209878073052379136607504666572724058473683511678277591⟩,⟨-2295436970143399418572374500847820574233807482442911984075,-2295436970143399418572374500847820574233807482434667269809⟩⟩, + ⟨⟨-14981468763374696428134349006626980952612234049124331064920,-14981468763374696428134349006626980952612234049112535219693⟩,⟨-21081422752210416810835430780899717052173531720204315287088,-21081422752210416810835430780899717052173531720192532796680⟩⟩, + ⟨⟨8024559067783627672055376515514080349969943653626149822622,8024559067783627672055376515514080349969943653641543484360⟩,⟨-31551770389468373980439064354250574570683340603259474262498,-31551770389468373980439064354250574570683340603244073853038⟩⟩, + ⟨⟨35670163694522400223606001853724061275799097261383546816162,35670163694522400223606001853724061275799097261403045159471⟩,⟨-16409280704697107153192088712644333298601513865348475734776,-16409280704697107153192088712644333298601513865328974132189⟩⟩, + ⟨⟨40141591914172162414056806597435831563547175349020435193305,40141591914172162414056806597435831563547175349044094865984⟩,⟨20592875789611444044075299822894978915180236382066125414542,20592875789611444044075299822894978915180236382089791192650⟩⟩, + ⟨⟨9249201759502683200306252464338014644695872815843697846923,9249201759502683200306252464338014644695872815869124601507⟩,⟨48370565419722936904768961718404375753072345507840785345250,48370565419722936904768961718404375753072345507866213139872⟩⟩, + ⟨⟨-33248813626596709161519710103025778009306434870948555088674,-33248813626596709161519710103025778009306434870923238501147⟩,⟨38853595300038619120298853069406316696838146571868776945112,38853595300038619120298853069406316696838146571894075146539⟩⟩, + ⟨⟨-50873931671580239091538529193682858781433712139731417919666,-50873931671580239091538529193682858781433712139710069127694⟩,⟨-448553077268139812862661250911746679658919414493949957502,-448553077268139812862661250911746679658919414472603351421⟩⟩, + ⟨⟨-32628585093418374541717181679095296159599634145247992293234,-32628585093418374541717181679095296159599634145234485396295⟩,⟨-36753488907145460207276629734542520437420206996458384268212,-36753488907145460207276629734542520437420206996444833754708⟩⟩, + ⟨⟨3275775780702255531771133255724847921496503032266887363575,3275775780702255531771133255724847921496503032274763932166⟩,⟨-46834656708345923424709070310005021334038666320915343358776,-46834656708345923424709070310005021334038666320907515987378⟩⟩, + ⟨⟨33385088184987582906031223180345202152375350904234197476577,33385088184987582906031223180345202152375350904238566084781⟩,⟨-30495833913007414319255038680551160594330904662159432138416,-30495833913007414319255038680551160594330904662154836051800⟩⟩, + ⟨⟨44569209196742266656304855944362659248769981206865785289662,44569209196742266656304855944362659248769981206868449131082⟩,⟨-2881,3100⟩⟩, + ⟨⟨33385088184987582906031223180345202152375350904234197476395,33385088184987582906031223180345202152375350904238566084590⟩,⟨30495833913007414319255038680551160594330904662154836051972,30495833913007414319255038680551160594330904662159432138633⟩⟩, + ⟨⟨3275775780702255531771133255724847921496503032266887363288,3275775780702255531771133255724847921496503032274763931887⟩,⟨46834656708345923424709070310005021334038666320907515987350,46834656708345923424709070310005021334038666320915343358807⟩⟩, + ⟨⟨-32628585093418374541717181679095296159599634145247992293432,-32628585093418374541717181679095296159599634145234485396603⟩,⟨36753488907145460207276629734542520437420206996444833754551,36753488907145460207276629734542520437420206996458384267945⟩⟩, + ⟨⟨-50873931671580239091538529193682858781433712139731417919605,-50873931671580239091538529193682858781433712139710069127785⟩,⟨448553077268139812862661250911746679658919414472603351084,448553077268139812862661250911746679658919414493949957013⟩⟩, + ⟨⟨-33248813626596709161519710103025778009306434870948555088486,-33248813626596709161519710103025778009306434870923238500771⟩,⟨-38853595300038619120298853069406316696838146571894075146868,-38853595300038619120298853069406316696838146571868776945257⟩⟩, + ⟨⟨9249201759502683200306252464338014644695872815843697847227,9249201759502683200306252464338014644695872815869124601796⟩,⟨-48370565419722936904768961718404375753072345507866213139809,-48370565419722936904768961718404375753072345507840785345202⟩⟩, + ⟨⟨40141591914172162414056806597435831563547175349020435193534,40141591914172162414056806597435831563547175349044094866031⟩,⟨-20592875789611444044075299822894978915180236382089791192282,-20592875789611444044075299822894978915180236382066125414357⟩⟩, + ⟨⟨35670163694522400223606001853724061275799097261383546815959,35670163694522400223606001853724061275799097261403045159472⟩,⟨16409280704697107153192088712644333298601513865328974132288,16409280704697107153192088712644333298601513865348475735079⟩⟩, + ⟨⟨8024559067783627672055376515514080349969943653626149822406,8024559067783627672055376515514080349969943653641543484222⟩,⟨31551770389468373980439064354250574570683340603244073853042,31551770389468373980439064354250574570683340603259474262579⟩⟩, + ⟨⟨-14981468763374696428134349006626980952612234049124331065154,-14981468763374696428134349006626980952612234049112535219725⟩,⟨21081422752210416810835430780899717052173531720192532796482,21081422752210416810835430780899717052173531720204315287092⟩⟩, + ⟨⟨-19684209878073052379136607504666572724058473683519933040256,-19684209878073052379136607504666572724058473683511678277567⟩,⟨2295436970143399418572374500847820574233807482434667269618,2295436970143399418572374500847820574233807482442911983967⟩⟩, + ⟨⟨-11405933262805240269589613513172515888713919786719958762685,-11405933262805240269589613513172515888713919786714234728315⟩,⟨-9354550504092935127852253573632169427970106273105182952692,-9354550504092935127852253573632169427970106273099449968881⟩⟩, + ⟨⟨-1250038416176682688564505183209958181049265595024202046761,-1250038416176682688564505183209958181049265595020465154000⟩,⟨-10664787335547126295471106748297943927514332999512273505397,-10664787335547126295471106748297943927514332999508525530474⟩⟩, + ⟨⟨4432072640285536876697531423166048186707346655344595687307,4432072640285536876697531423166048186707346655346878323790⟩,⟨-6283756392877191728985515033729894906609942593894229340091,-6283756392877191728985515033729894906609942593891946871413⟩⟩, + ⟨⟨5260673065698637691464655762460548108059984992617957078985,5260673065698637691464655762460548108059984992619395365515⟩,⟨-1406377080889290108078461379928483468046815622717035177155,-1406377080889290108078461379928483468046815622715600135197⟩⟩] +lemma tw1_1_0_10_calc (j : Fin 31) : taylorWaveBox 1 1 0 10 j = tw1_1_0_10 j := by + revert j + decide +kernel +def tw1_1_0_11 : Fin 31 → CI := ![⟨⟨-879022578278747593713822735378483590085628424536310684272,-879022578278747593713822735378483590085628424535804489400⟩,⟨1299934283424915065604889584567133351435880757477659725051,1299934283424915065604889584567133351435880757478166360329⟩⟩, + ⟨⟨-2252508306750928201693432474079348364476124832938550559566,-2252508306750928201693432474079348364476124832937672329560⟩,⟨535688812702872445456215683196527006103869464945864980754,535688812702872445456215683196527006103869464946741684470⟩⟩, + ⟨⟨-2887132823886340161334898108235278937466829211041860471115,-2887132823886340161334898108235278937466829211040336417703⟩,⟨-1763319148478962036931693065457411179661711742061852894870,-1763319148478962036931693065457411179661711742060331886945⟩⟩, + ⟨⟨-970944730364105492757137573760732816620046711449100857930,-970944730364105492757137573760732816620046711446703675784⟩,⟨-4771484970436898438371910410869802291066422956127311670889,-4771484970436898438371910410869802291066422956124913388403⟩⟩, + ⟨⟨4212175249819663497076441042432060394526164980407175110117,4212175249819663497076441042432060394526164980411024540848⟩,⟨-5416127917934266401371593684373731070132256328355106272311,-5416127917934266401371593684373731070132256328351251223372⟩⟩, + ⟨⟨9398865036161744400079521436355618249162569032866239827611,9398865036161744400079521436355618249162569032871791653621⟩,⟨-89017993568380764177083102091506832367046992059462189438,-89017993568380764177083102091506832367046992053911436530⟩⟩, + ⟨⟨7466907090578938342373757462949000341904815229834758006661,7466907090578938342373757462949000341904815229842815967993⟩,⟨9930995017570977166693021790295962877912976104743341165283,9930995017570977166693021790295962877912976104751394592986⟩⟩, + ⟨⟨-4953658869416427177789149025352156033962007639672712340503,-4953658869416427177789149025352156033962007639662165142574⟩,⟨14932342049786521948289144508144929712521970386090108722727,14932342049786521948289144508144929712521970386100657046769⟩⟩, + ⟨⟨-18300987184120535857628766118358185236535529576383839867278,-18300987184120535857628766118358185236535529576370612383377⟩,⟨4959354415801088003457736249759201328087497721675210629123,4959354415801088003457736249759201328087497721688437005474⟩⟩, + ⟨⟨-16136913145820978807960918814617542150032049178724331153511,-16136913145820978807960918814617542150032049178708670965011⟩,⟨-14457892645186856294895524178437059680910590219656608083144,-14457892645186856294895524178437059680910590219640938385401⟩⟩, + ⟨⟨3525847420753983542704562027962500998002304467387929863697,3525847420753983542704562027962500998002304467403573656821⟩,⟨-23210298215424887546178473251044489396781735352212247212160,-23210298215424887546178473251044489396781735352196611782264⟩⟩, + ⟨⟨21873985668418315374509969524268540284110159125791087871589,21873985668418315374509969524268540284110159125804071823116⟩,⟨-10491028879349251814578912826299584744684753138713559158458,-10491028879349251814578912826299584744684753138700572311448⟩⟩, + ⟨⟨21275012168703785110070362516643601775540019693707775645741,21275012168703785110070362516643601775540019693715706789513⟩,⟨11516931122069612468438275499988338283421852659493008019556,11516931122069612468438275499988338283421852659500932887289⟩⟩, + ⟨⟨3910544994135518989213487476185252388326454858939662190029,3910544994135518989213487476185252388326454858944094098134⟩,⟨23348532942982158894754194209057815499018631467160213449102,23348532942982158894754194209057815499018631467164651964357⟩⟩, + ⟨⟨-15116478062115988396901692337379323852218896753745183190163,-15116478062115988396901692337379323852218896753742769319788⟩,⟨17528394617648955378908295111665941924046442944313273575851,17528394617648955378908295111665941924046442944315827937888⟩⟩, + ⟨⟨-22932151994832948715875290565797128061031703943800691619024,-22932151994832948715875290565797128061031703943799247999973⟩,⟨-1595,1483⟩⟩, + ⟨⟨-15116478062115988396901692337379323852218896753745183190053,-15116478062115988396901692337379323852218896753742769319685⟩,⟨-17528394617648955378908295111665941924046442944315827937987,-17528394617648955378908295111665941924046442944313273575927⟩⟩, + ⟨⟨3910544994135518989213487476185252388326454858939662190170,3910544994135518989213487476185252388326454858944094098271⟩,⟨-23348532942982158894754194209057815499018631467164651964341,-23348532942982158894754194209057815499018631467160213449053⟩⟩, + ⟨⟨21275012168703785110070362516643601775540019693707775645845,21275012168703785110070362516643601775540019693715706789573⟩,⟨-11516931122069612468438275499988338283421852659500932887127,-11516931122069612468438275499988338283421852659493008019437⟩⟩, + ⟨⟨21873985668418315374509969524268540284110159125791087871541,21873985668418315374509969524268540284110159125804071823003⟩,⟨10491028879349251814578912826299584744684753138700572311661,10491028879349251814578912826299584744684753138713559158605⟩⟩, + ⟨⟨3525847420753983542704562027962500998002304467387929863486,3525847420753983542704562027962500998002304467403573656697⟩,⟨23210298215424887546178473251044489396781735352196611782244,23210298215424887546178473251044489396781735352212247212228⟩⟩, + ⟨⟨-16136913145820978807960918814617542150032049178724331153595,-16136913145820978807960918814617542150032049178708670965105⟩,⟨14457892645186856294895524178437059680910590219640938385307,14457892645186856294895524178437059680910590219656608083041⟩⟩, + ⟨⟨-18300987184120535857628766118358185236535529576383839867213,-18300987184120535857628766118358185236535529576370612383372⟩,⟨-4959354415801088003457736249759201328087497721688437005569,-4959354415801088003457736249759201328087497721675210629278⟩⟩, + ⟨⟨-4953658869416427177789149025352156033962007639672712340457,-4953658869416427177789149025352156033962007639662165142448⟩,⟨-14932342049786521948289144508144929712521970386100657046835,-14932342049786521948289144508144929712521970386090108722712⟩⟩, + ⟨⟨7466907090578938342373757462949000341904815229834758006700,7466907090578938342373757462949000341904815229842815968064⟩,⟨-9930995017570977166693021790295962877912976104751394592960,-9930995017570977166693021790295962877912976104743341165224⟩⟩, + ⟨⟨9398865036161744400079521436355618249162569032866239827581,9398865036161744400079521436355618249162569032871791653648⟩,⟨89017993568380764177083102091506832367046992053911436562,89017993568380764177083102091506832367046992059462189526⟩⟩, + ⟨⟨4212175249819663497076441042432060394526164980407175110059,4212175249819663497076441042432060394526164980411024540824⟩,⟨5416127917934266401371593684373731070132256328351251223387,5416127917934266401371593684373731070132256328355106272360⟩⟩, + ⟨⟨-970944730364105492757137573760732816620046711449100857957,-970944730364105492757137573760732816620046711446703675822⟩,⟨4771484970436898438371910410869802291066422956124913388402,4771484970436898438371910410869802291066422956127311670877⟩⟩, + ⟨⟨-2887132823886340161334898108235278937466829211041860471132,-2887132823886340161334898108235278937466829211040336417709⟩,⟨1763319148478962036931693065457411179661711742060331886920,1763319148478962036931693065457411179661711742061852894855⟩⟩, + ⟨⟨-2252508306750928201693432474079348364476124832938550559566,-2252508306750928201693432474079348364476124832937672329553⟩,⟨-535688812702872445456215683196527006103869464946741684488,-535688812702872445456215683196527006103869464945864980766⟩⟩, + ⟨⟨-879022578278747593713822735378483590085628424536310684260,-879022578278747593713822735378483590085628424535804489393⟩,⟨-1299934283424915065604889584567133351435880757478166360333,-1299934283424915065604889584567133351435880757477659725059⟩⟩] +lemma tw1_1_0_11_calc (j : Fin 31) : taylorWaveBox 1 1 0 11 j = tw1_1_0_11 j := by + revert j + decide +kernel +def tw1_1_0_12 : Fin 31 → CI := ![⟨⟨-251737549622255373742163834311714685218703456263594796486,-251737549622255373742163834311714685218703456263429606025⟩,⟨-336091300606198631249760056482768760599751563136522330353,-336091300606198631249760056482768760599751563136357073270⟩⟩, + ⟨⟨95027299916990383496846657309751636455223449790806389407,95027299916990383496846657309751636455223449791122880884⟩,⟨-640340985282444333213303524892434783303842387518918182993,-640340985282444333213303524892434783303842387518601092158⟩⟩, + ⟨⟨821896509059166744915460806800379463118874263589742823178,821896509059166744915460806800379463118874263590309920831⟩,⟨-551379092976370119456834292715883978457672778412749994702,-551379092976370119456834292715883978457672778412182637007⟩⟩, + ⟨⟨1432111552955857165050151035320522068002699182731074187649,1432111552955857165050151035320522068002699182732069740232⟩,⟨420211026884792809628648169925969149879389103590432827341,420211026884792809628648169925969149879389103591426836877⟩⟩, + ⟨⟨787129258032396563961460893763983087995947849446454563890,787129258032396563961460893763983087995947849448080099684⟩,⟨2060608855812151565562167236977157820502332216817039735959,2060608855812151565562167236977157820502332216818664731267⟩⟩, + ⟨⟨-1788154757823113649640481859194455729354003976686184109075,-1788154757823113649640481859194455729354003976683580266190⟩,⟨2619947297246712571929533716497810399430740037822424901093,2619947297246712571929533716497810399430740037825031049630⟩⟩, + ⟨⟨-4400918825766841945748831864860619537206364240578848179639,-4400918825766841945748831864860619537206364240575052174078⟩,⟨-142381469432389988894803717343335813960313108046365517803,-142381469432389988894803717343335813960313108042569726883⟩⟩, + ⟨⟨-2801250243669731733227154507569819307556987582211377626000,-2801250243669731733227154507569819307556987582205974333156⟩,⟨-5139837773773162102892589334421391650347466768430222050726,-5139837773773162102892589334421391650347466768424819314689⟩⟩, + ⟨⟨3977726787552779491934449405552271976387621158903011260301,3977726787552779491934449405552271976387621158910220453893⟩,⟨-6239641133467434049954346507773535576124607582336260372486,-6239641133467434049954346507773535576124607582329052334987⟩⟩, + ⟨⟨8823505389400794283507801726056654308144386695936260783323,8823505389400794283507801726056654308144386695944919400939⟩,⟨701052619396333793554354237643208096084951390211857556570,701052619396333793554354237643208096084951390220517683199⟩⟩, + ⟨⟨3955319820368394165979445135757988066341722986640178280832,3955319820368394165979445135757988066341722986648996992170⟩,⟨9193094416540921469841928895166186400407730526441042626262,9193094416540921469841928895166186400407730526449861353565⟩⟩, + ⟨⟨-6649981402965459539558903833959921923658850253608040653333,-6649981402965459539558903833959921923658850253600643051650⟩,⟨8435777247367053352378106963705692969770403316126328666706,8435777247367053352378106963705692969770403316133728622484⟩⟩, + ⟨⟨-10937675476054138707506054880564437951210031811919195086480,-10937675476054138707506054880564437951210031811914691547634⟩,⟨-1625712572357368707378517270622246679134112284719334934331,-1625712572357368707378517270622246679134112284714846186089⟩⟩, + ⟨⟨-4334129548373929083105402479871968299534928754344279647458,-4334129548373929083105402479871968299534928754341821452601⟩,⟨-10202204227410504328810300083691507567267618004466619858606,-10202204227410504328810300083691507567267618004464142045031⟩⟩, + ⟨⟨6145869480050600443129205014217228170428953144943407130003,6145869480050600443129205014217228170428953144944701994159⟩,⟨-9125608881358093199548742570086865224577229453325566670738,-9125608881358093199548742570086865224577229453324206220228⟩⟩, + ⟨⟨10956453793510230836431656701879765185201234067759068729096,10956453793510230836431656701879765185201234067759793332490⟩,⟨-709,763⟩⟩, + ⟨⟨6145869480050600443129205014217228170428953144943407129949,6145869480050600443129205014217228170428953144944701994103⟩,⟨9125608881358093199548742570086865224577229453324206220257,9125608881358093199548742570086865224577229453325566670779⟩⟩, + ⟨⟨-4334129548373929083105402479871968299534928754344279647517,-4334129548373929083105402479871968299534928754341821452661⟩,⟨10202204227410504328810300083691507567267618004464142044994,10202204227410504328810300083691507567267618004466619858583⟩⟩, + ⟨⟨-10937675476054138707506054880564437951210031811919195086483,-10937675476054138707506054880564437951210031811914691547657⟩,⟨1625712572357368707378517270622246679134112284714846186025,1625712572357368707378517270622246679134112284719334934248⟩⟩, + ⟨⟨-6649981402965459539558903833959921923658850253608040653253,-6649981402965459539558903833959921923658850253600643051595⟩,⟨-8435777247367053352378106963705692969770403316133728622528,-8435777247367053352378106963705692969770403316126328666774⟩⟩, + ⟨⟨3955319820368394165979445135757988066341722986640178280886,3955319820368394165979445135757988066341722986648996992248⟩,⟨-9193094416540921469841928895166186400407730526449861353549,-9193094416540921469841928895166186400407730526441042626220⟩⟩, + ⟨⟨8823505389400794283507801726056654308144386695936260783330,8823505389400794283507801726056654308144386695944919400942⟩,⟨-701052619396333793554354237643208096084951390220517683143,-701052619396333793554354237643208096084951390211857556518⟩⟩, + ⟨⟨3977726787552779491934449405552271976387621158903011260272,3977726787552779491934449405552271976387621158910220453836⟩,⟨6239641133467434049954346507773535576124607582329052335028,6239641133467434049954346507773535576124607582336260372499⟩⟩, + ⟨⟨-2801250243669731733227154507569819307556987582211377626044,-2801250243669731733227154507569819307556987582205974333169⟩,⟨5139837773773162102892589334421391650347466768424819314656,5139837773773162102892589334421391650347466768430222050724⟩⟩, + ⟨⟨-4400918825766841945748831864860619537206364240578848179643,-4400918825766841945748831864860619537206364240575052174075⟩,⟨142381469432389988894803717343335813960313108042569726855,142381469432389988894803717343335813960313108046365517783⟩⟩, + ⟨⟨-1788154757823113649640481859194455729354003976686184109071,-1788154757823113649640481859194455729354003976683580266160⟩,⟨-2619947297246712571929533716497810399430740037825031049654,-2619947297246712571929533716497810399430740037822424901091⟩⟩, + ⟨⟨787129258032396563961460893763983087995947849446454563901,787129258032396563961460893763983087995947849448080099704⟩,⟨-2060608855812151565562167236977157820502332216818664731266,-2060608855812151565562167236977157820502332216817039735948⟩⟩, + ⟨⟨1432111552955857165050151035320522068002699182731074187655,1432111552955857165050151035320522068002699182732069740233⟩,⟨-420211026884792809628648169925969149879389103591426836865,-420211026884792809628648169925969149879389103590432827333⟩⟩, + ⟨⟨821896509059166744915460806800379463118874263589742823173,821896509059166744915460806800379463118874263590309920829⟩,⟨551379092976370119456834292715883978457672778412182637011,551379092976370119456834292715883978457672778412749994708⟩⟩, + ⟨⟨95027299916990383496846657309751636455223449790806389401,95027299916990383496846657309751636455223449791122880881⟩,⟨640340985282444333213303524892434783303842387518601092158,640340985282444333213303524892434783303842387518918182994⟩⟩, + ⟨⟨-251737549622255373742163834311714685218703456263594796488,-251737549622255373742163834311714685218703456263429606027⟩,⟨336091300606198631249760056482768760599751563136357073269,336091300606198631249760056482768760599751563136522330351⟩⟩] +lemma tw1_1_0_12_calc (j : Fin 31) : taylorWaveBox 1 1 0 12 j = tw1_1_0_12 j := by + revert j + decide +kernel +def tw1_1_0_13 : Fin 31 → CI := ![⟨⟨99891243280030642538185298851033426250997428009579414741,99891243280030642538185298851033426250997428009631942651⟩,⟨-31945302816600928014391320851625783362634408225767502332,-31945302816600928014391320851625783362634408225715037294⟩⟩, + ⟨⟨145913226005167619848029254785062814020308240973473625726,145913226005167619848029254785062814020308240973579031264⟩,⟨85127551045711698165499427686043624875615234985179439618,85127551045711698165499427686043624875615234985284731784⟩⟩, + ⟨⟨42865831530878482561467653207246208964254159460669097355,42865831530878482561467653207246208964254159460870417632⟩,⟨266819529471949314741775534246763514568187515594733376205,266819529471949314741775534246763514568187515594934851176⟩⟩, + ⟨⟨-297707114479086594224327075297360968924962712281545403346,-297707114479086594224327075297360968924962712281168774856⟩,⟨306058030539153432478623431923830580362190998923864418193,306058030539153432478623431923830580362190998924241377816⟩⟩, + ⟨⟨-651179245772501364960881023095630329123768860703018032424,-651179245772501364960881023095630329123768860702358902022⟩,⟨-118513853950190639889721021162125319766537415552427122765,-118513853950190639889721021162125319766537415551768395316⟩⟩, + ⟨⟨-355261947325071803588196849405651983150755178394403670268,-355261947325071803588196849405651983150755178393296445072⟩,⟨-933806116479672064082536570989095322012603653279710214082,-933806116479672064082536570989095322012603653278603295458⟩⟩, + ⟨⟨948657243056398205833032522933430511112426426108241972312,948657243056398205833032522933430511112426426110004634693⟩,⟨-1105067945909130298136206493765167980902767041725428522596,-1105067945909130298136206493765167980902767041723665193639⟩⟩, + ⟨⟨1968320054059139886056029947695891354727404346113646248954,1968320054059139886056029947695891354727404346116223457042⟩,⟨507789155462329561140326440519608061693630199685461070668,507789155462329561140326440519608061693630199688038162477⟩⟩, + ⟨⟨458908984408983041949063732648191306678258455604719424137,458908984408983041949063732648191306678258455608293742824⟩,⟨2655910788548345450076864365155976776034676690330013267625,2655910788548345450076864365155976776034676690333587675708⟩⟩, + ⟨⟨-2837716692720214177949910219466122278127274168091466283237,-2837716692720214177949910219466122278127274168086917029634⟩,⟨1826909858501056573702705625038452805424076647779904433722,1826909858501056573702705625038452805424076647784452754314⟩⟩, + ⟨⟨-3269587257854475114234339244649209551484906274719324963737,-3269587257854475114234339244649209551484906274714497653593⟩,⟨-2272660829648848901585563894622090711920810165439083587325,-2272660829648848901585563894622090711920810165434254550073⟩⟩, + ⟨⟨932106678468325304808656995428172857382945236591788513546,932106678468325304808656995428172857382945236595874774480⟩,⟨-4340181319056613805243742326178409155867259305145897528575,-4340181319056613805243742326178409155867259305141810777293⟩⟩, + ⟨⟨4622345127511216812354343228982954512608027541249628832612,4622345127511216812354343228982954512608027541252078715624⟩,⟨-942094232456612307412308017623139703076404420327970956656,-942094232456612307412308017623139703076404420325529231306⟩⟩, + ⟨⟨2883143704233867104161265909741915591678582218892909174047,2883143704233867104161265909741915591678582218894202150227⟩,⟨3892675801683479324997354226183751440150233170051973655079,3892675801683479324997354226183751440150233170053279905995⟩⟩, + ⟨⟨-2226884203833866970045006733798722787095660468637842474965,-2226884203833866970045006733798722787095660468637190391587⟩,⟨4343467001889243770368323671777980990177672297511510815507,4343467001889243770368323671777980990177672297512189409741⟩⟩, + ⟨⟨-4885758407640128020632360008366208334841202880882034831040,-4885758407640128020632360008366208334841202880881696160303⟩,⟨-340,316⟩⟩, + ⟨⟨-2226884203833866970045006733798722787095660468637842474939,-2226884203833866970045006733798722787095660468637190391561⟩,⟨-4343467001889243770368323671777980990177672297512189409756,-4343467001889243770368323671777980990177672297511510815517⟩⟩, + ⟨⟨2883143704233867104161265909741915591678582218892909174068,2883143704233867104161265909741915591678582218894202150250⟩,⟨-3892675801683479324997354226183751440150233170053279905979,-3892675801683479324997354226183751440150233170051973655057⟩⟩, + ⟨⟨4622345127511216812354343228982954512608027541249628832611,4622345127511216812354343228982954512608027541252078715614⟩,⟨942094232456612307412308017623139703076404420325529231342,942094232456612307412308017623139703076404420327970956683⟩⟩, + ⟨⟨932106678468325304808656995428172857382945236591788513518,932106678468325304808656995428172857382945236595874774439⟩,⟨4340181319056613805243742326178409155867259305141810777308,4340181319056613805243742326178409155867259305145897528578⟩⟩, + ⟨⟨-3269587257854475114234339244649209551484906274719324963759,-3269587257854475114234339244649209551484906274714497653603⟩,⟨2272660829648848901585563894622090711920810165434254550043,2272660829648848901585563894622090711920810165439083587308⟩⟩, + ⟨⟨-2837716692720214177949910219466122278127274168091466283226,-2837716692720214177949910219466122278127274168086917029623⟩,⟨-1826909858501056573702705625038452805424076647784452754330,-1826909858501056573702705625038452805424076647779904433740⟩⟩, + ⟨⟨458908984408983041949063732648191306678258455604719424158,458908984408983041949063732648191306678258455608293742839⟩,⟨-2655910788548345450076864365155976776034676690333587675702,-2655910788548345450076864365155976776034676690330013267625⟩⟩, + ⟨⟨1968320054059139886056029947695891354727404346113646248951,1968320054059139886056029947695891354727404346116223457049⟩,⟨-507789155462329561140326440519608061693630199688038162471,-507789155462329561140326440519608061693630199685461070652⟩⟩, + ⟨⟨948657243056398205833032522933430511112426426108241972304,948657243056398205833032522933430511112426426110004634689⟩,⟨1105067945909130298136206493765167980902767041723665193643,1105067945909130298136206493765167980902767041725428522603⟩⟩, + ⟨⟨-355261947325071803588196849405651983150755178394403670278,-355261947325071803588196849405651983150755178393296445075⟩,⟨933806116479672064082536570989095322012603653278603295452,933806116479672064082536570989095322012603653279710214084⟩⟩, + ⟨⟨-651179245772501364960881023095630329123768860703018032426,-651179245772501364960881023095630329123768860702358902022⟩,⟨118513853950190639889721021162125319766537415551768395309,118513853950190639889721021162125319766537415552427122761⟩⟩, + ⟨⟨-297707114479086594224327075297360968924962712281545403343,-297707114479086594224327075297360968924962712281168774854⟩,⟨-306058030539153432478623431923830580362190998924241377818,-306058030539153432478623431923830580362190998923864418196⟩⟩, + ⟨⟨42865831530878482561467653207246208964254159460669097357,42865831530878482561467653207246208964254159460870417634⟩,⟨-266819529471949314741775534246763514568187515594934851176,-266819529471949314741775534246763514568187515594733376204⟩⟩, + ⟨⟨145913226005167619848029254785062814020308240973473625727,145913226005167619848029254785062814020308240973579031265⟩,⟨-85127551045711698165499427686043624875615234985284731783,-85127551045711698165499427686043624875615234985179439616⟩⟩, + ⟨⟨99891243280030642538185298851033426250997428009579414741,99891243280030642538185298851033426250997428009631942650⟩,⟨31945302816600928014391320851625783362634408225715037295,31945302816600928014391320851625783362634408225767502333⟩⟩] +lemma tw1_1_0_13_calc (j : Fin 31) : taylorWaveBox 1 1 0 13 j = tw1_1_0_13 j := by + revert j + decide +kernel +def tw1_1_0_14 : Fin 31 → CI := ![⟨⟨-585012498360696239856774957810970781820297664273789023,-585012498360696239856774957810970781820297664258230413⟩,⟨24548771724438173940645858137418389028143876502724086515,24548771724438173940645858137418389028143876502739662525⟩⟩, + ⟨⟨-32601663642602900492956339349817415171045920827027805079,-32601663642602900492956339349817415171045920826995128080⟩,⟨25399388638644217608864451097456382746200107745531623070,25399388638644217608864451097456382746200107745564304360⟩⟩, + ⟨⟨-66628239005101344341775869457367979935351712281127286619,-66628239005101344341775869457367979935351712281059103899⟩,⟨-18606011762602147567863758264013805266858085462635196920,-18606011762602147567863758264013805266858085462567084046⟩⟩, + ⟨⟨-35267473340830369918853864458126484829916012758599707104,-35267473340830369918853864458126484829916012758466960351⟩,⟨-108945471543642662010115704353772292425596270603255101635,-108945471543642662010115704353772292425596270603122354066⟩⟩, + ⟨⟨123459864664557181352865959382663632200251032962238349831,123459864664557181352865959382663632200251032962490367276⟩,⟨-139369341873067323539003796677236642593273498197950008188,-139369341873067323539003796677236642593273498197697845576⟩⟩, + ⟨⟨286225740357576430905837313836130640840225355793585812289,286225740357576430905837313836130640840225355794034019671⟩,⟨71511158631068366672754425566826878633155457947610693411,71511158631068366672754425566826878633155457948058778673⟩⟩, + ⟨⟨82791744004953145264898964376530755004073855612163169064,82791744004953145264898964376530755004073855612911387617⟩,⟨443960034308072773307482131999796042525517220638180641498,443960034308072773307482131999796042525517220638928810119⟩⟩, + ⟨⟨-558287182532566119276266468226013628577075063767555309992,-558287182532566119276266468226013628577075063766382322502⟩,⟨355362339735474096460877746927741596510114972181292989917,355362339735474096460877746927741596510114972182466048083⟩⟩, + ⟨⟨-726480192649272405567808194703471080892470434979373630687,-726480192649272405567808194703471080892470434977653211872⟩,⟨-565067897514179058894095836691741475791856923295902091998,-565067897514179058894095836691741475791856923294181511405⟩⟩, + ⟨⟨410850622979739903107367442721861161222608418193505366539,410850622979739903107367442721861161222608418195761140184⟩,⟨-1134299928617365539102803106699526689482046620259299035270,-1134299928617365539102803106699526689482046620257043637209⟩⟩, + ⟨⟨1483371454178698486174874368308790132076869004889035331939,1483371454178698486174874368308790132076869004891486386491⟩,⟨74764898718147696359542279139690918063011228628572829701,74764898718147696359542279139690918063011228631024356642⟩⟩, + ⟨⟨416285473245540897631126280556089937530766178118144436270,416285473245540897631126280556089937530766178120230031038⟩,⟨1668730457805620454099105214270950144918238993799737361376,1668730457805620454099105214270950144918238993801822876828⟩⟩, + ⟨⟨-1608777131483750926622812604754658681743444233186662960285,-1608777131483750926622812604754658681743444233185432465120⟩,⟨985624689345441131446923553044519130483984182609237343313,985624689345441131446923553044519130483984182610465405103⟩⟩, + ⟨⟨-1521081468112391373228582926769223633924200983239537622451,-1521081468112391373228582926769223633924200983238906298055⟩,⟨-1274768243158405849520905533510038585570840735092031968453,-1274768243158405849520905533510038585570840735091394748080⟩⟩, + ⟨⟨705277988841850903671850242953668561968884721899926361668,705277988841850903671850242953668561968884721900232680024⟩,⟨-1903661526638230600846978143747278852246801705363004732882,-1903661526638230600846978143747278852246801705362688758918⟩⟩, + ⟨⟨2042514935805918549327449362117092685729265870903435018505,2042514935805918549327449362117092685729265870903583102972⟩,⟨-133,143⟩⟩, + ⟨⟨705277988841850903671850242953668561968884721899926361657,705277988841850903671850242953668561968884721900232680012⟩,⟨1903661526638230600846978143747278852246801705362688758921,1903661526638230600846978143747278852246801705363004732887⟩⟩, + ⟨⟨-1521081468112391373228582926769223633924200983239537622458,-1521081468112391373228582926769223633924200983238906298062⟩,⟨1274768243158405849520905533510038585570840735091394748070,1274768243158405849520905533510038585570840735092031968444⟩⟩, + ⟨⟨-1608777131483750926622812604754658681743444233186662960277,-1608777131483750926622812604754658681743444233185432465115⟩,⟨-985624689345441131446923553044519130483984182610465405112,-985624689345441131446923553044519130483984182609237343326⟩⟩, + ⟨⟨416285473245540897631126280556089937530766178118144436286,416285473245540897631126280556089937530766178120230031049⟩,⟨-1668730457805620454099105214270950144918238993801822876823,-1668730457805620454099105214270950144918238993799737361375⟩⟩, + ⟨⟨1483371454178698486174874368308790132076869004889035331937,1483371454178698486174874368308790132076869004891486386493⟩,⟨-74764898718147696359542279139690918063011228631024356633,-74764898718147696359542279139690918063011228628572829688⟩⟩, + ⟨⟨410850622979739903107367442721861161222608418193505366532,410850622979739903107367442721861161222608418195761140177⟩,⟨1134299928617365539102803106699526689482046620257043637211,1134299928617365539102803106699526689482046620259299035272⟩⟩, + ⟨⟨-726480192649272405567808194703471080892470434979373630689,-726480192649272405567808194703471080892470434977653211877⟩,⟨565067897514179058894095836691741475791856923294181511401,565067897514179058894095836691741475791856923295902091992⟩⟩, + ⟨⟨-558287182532566119276266468226013628577075063767555309991,-558287182532566119276266468226013628577075063766382322498⟩,⟨-355362339735474096460877746927741596510114972182466048088,-355362339735474096460877746927741596510114972181292989919⟩⟩, + ⟨⟨82791744004953145264898964376530755004073855612163169067,82791744004953145264898964376530755004073855612911387620⟩,⟨-443960034308072773307482131999796042525517220638928810119,-443960034308072773307482131999796042525517220638180641498⟩⟩, + ⟨⟨286225740357576430905837313836130640840225355793585812288,286225740357576430905837313836130640840225355794034019672⟩,⟨-71511158631068366672754425566826878633155457948058778672,-71511158631068366672754425566826878633155457947610693408⟩⟩, + ⟨⟨123459864664557181352865959382663632200251032962238349829,123459864664557181352865959382663632200251032962490367275⟩,⟨139369341873067323539003796677236642593273498197697845577,139369341873067323539003796677236642593273498197950008189⟩⟩, + ⟨⟨-35267473340830369918853864458126484829916012758599707104,-35267473340830369918853864458126484829916012758466960352⟩,⟨108945471543642662010115704353772292425596270603122354065,108945471543642662010115704353772292425596270603255101635⟩⟩, + ⟨⟨-66628239005101344341775869457367979935351712281127286619,-66628239005101344341775869457367979935351712281059103899⟩,⟨18606011762602147567863758264013805266858085462567084045,18606011762602147567863758264013805266858085462635196919⟩⟩, + ⟨⟨-32601663642602900492956339349817415171045920827027805079,-32601663642602900492956339349817415171045920826995128079⟩,⟨-25399388638644217608864451097456382746200107745564304360,-25399388638644217608864451097456382746200107745531623070⟩⟩, + ⟨⟨-585012498360696239856774957810970781820297664273789023,-585012498360696239856774957810970781820297664258230413⟩,⟨-24548771724438173940645858137418389028143876502739662524,-24548771724438173940645858137418389028143876502724086515⟩⟩] +lemma tw1_1_0_14_calc (j : Fin 31) : taylorWaveBox 1 1 0 14 j = tw1_1_0_14 j := by + revert j + decide +kernel +def tw1_1_0_15 : Fin 31 → CI := ![⟨⟨-5069826797849390516116762368441094928560529059009585176,-5069826797849390516116762368441094928560529059005268533⟩,⟨-1891960230211672781705834325004670578988921651803507938,-1891960230211672781705834325004670578988921651799194175⟩⟩, + ⟨⟨-2639366511534879380288373617908711534579800331999383076,-2639366511534879380288373617908711534579800331989700111⟩,⟨-9142575914878852064575373325284311909654241656362821465,-9142575914878852064575373325284311909654241656353133015⟩⟩, + ⟨⟨10786850682696455792227886139553700181842114568988944697,10786850682696455792227886139553700181842114569010438839⟩,⟨-12705135884852209992639887307182351206861942287574844471,-12705135884852209992639887307182351206861942287553338903⟩⟩, + ⟨⟨28473266261358581459665999669519132844032836870833597694,28473266261358581459665999669519132844032836870878793441⟩,⟨4978167914722333892091445282197689942349057321779820353,4978167914722333892091445282197689942349057321824989857⟩⟩, + ⟨⟨14612024243200806514404265747902775586355772778583245676,14612024243200806514404265747902775586355772778673115569⟩,⟨47079228312813017775287446801497744661507773156028464999,47079228312813017775287446801497744661507773156118327557⟩⟩, + ⟨⟨-61772113297209110751807825769710848195013772800576078378,-61772113297209110751807825769710848195013772800404034498⟩,⟨53916688953431296995613690514345645804830946645770686547,53916688953431296995613690514345645804830946645942778161⟩⟩, + ⟨⟨-116126809500525877936995545033062795361592072674596646868,-116126809500525877936995545033062795361592072674291210028⟩,⟨-62340561967390171592106057100454882192332951972647243668,-62340561967390171592106057100454882192332951972341856204⟩⟩, + ⟨⟨37228100129499647050256376611090765097996583882679127814,37228100129499647050256376611090765097996583883178641654⟩,⟨-199333439100483500343482464544368491552460709048022107031,-199333439100483500343482464544368491552460709047522584560⟩⟩, + ⟨⟨294906038170917440059636907131689808166901577525493169846,294906038170917440059636907131689808166901577526257998917⟩,⟨-22920072346457236672122733850167331023525325665572151288,-22920072346457236672122733850167331023525325664807324423⟩⟩, + ⟨⟨121410586044822022474196343780833440564104154786031853641,121410586044822022474196343780833440564104154787077390655⟩,⟨387295553578547115160976401135146785739048394137282679394,387295553578547115160976401135146785739048394138328257620⟩⟩, + ⟨⟨-455902049031896798833025078796089934005138301955669954906,-455902049031896798833025078796089934005138301954502748702⟩,⟨253044183806174463541284679326018756295268387873887583738,253044183806174463541284679326018756295268387875054749708⟩⟩, + ⟨⟨-404250578737544808605787641635711922102599005150324026430,-404250578737544808605787641635711922102599005149327251386⟩,⟨-479462276111224308118470964608844671185312023730086494443,-479462276111224308118470964608844671185312023729089847866⟩⟩, + ⟨⟨442414111527268267004780428555750392826489879725804270773,442414111527268267004780428555750392826489879726382032107⟩,⟨-555553069757762200618458287728715142792592702977356090476,-555553069757762200618458287728715142792592702976778557993⟩⟩, + ⟨⟨685122339013067455618877458610306276665122892053854684259,685122339013067455618877458610306276665122892054142924910⟩,⟨340937845986222026546699267814629538365789434929438349054,340937845986222026546699267814629538365789434929728581093⟩⟩, + ⟨⟨-185701082524743828076846578410013727892315112837392908631,-185701082524743828076846578410013727892315112837258063506⟩,⟨772685186643386989777719049711996996145888456335952423610,772685186643386989777719049711996996145888456336090410804⟩⟩, + ⟨⟨-803654822596988058494959247880897118688887265987159747341,-803654822596988058494959247880897118688887265987098923414⟩,⟨-56,52⟩⟩, + ⟨⟨-185701082524743828076846578410013727892315112837392908627,-185701082524743828076846578410013727892315112837258063501⟩,⟨-772685186643386989777719049711996996145888456336090410805,-772685186643386989777719049711996996145888456335952423611⟩⟩, + ⟨⟨685122339013067455618877458610306276665122892053854684260,685122339013067455618877458610306276665122892054142924912⟩,⟨-340937845986222026546699267814629538365789434929728581089,-340937845986222026546699267814629538365789434929438349049⟩⟩, + ⟨⟨442414111527268267004780428555750392826489879725804270770,442414111527268267004780428555750392826489879726382032103⟩,⟨555553069757762200618458287728715142792592702976778557996,555553069757762200618458287728715142792592702977356090479⟩⟩, + ⟨⟨-404250578737544808605787641635711922102599005150324026434,-404250578737544808605787641635711922102599005149327251390⟩,⟨479462276111224308118470964608844671185312023729089847863,479462276111224308118470964608844671185312023730086494440⟩⟩, + ⟨⟨-455902049031896798833025078796089934005138301955669954904,-455902049031896798833025078796089934005138301954502748700⟩,⟨-253044183806174463541284679326018756295268387875054749712,-253044183806174463541284679326018756295268387873887583741⟩⟩, + ⟨⟨121410586044822022474196343780833440564104154786031853643,121410586044822022474196343780833440564104154787077390658⟩,⟨-387295553578547115160976401135146785739048394138328257619,-387295553578547115160976401135146785739048394137282679394⟩⟩, + ⟨⟨294906038170917440059636907131689808166901577525493169846,294906038170917440059636907131689808166901577526257998917⟩,⟨22920072346457236672122733850167331023525325664807324425,22920072346457236672122733850167331023525325665572151290⟩⟩, + ⟨⟨37228100129499647050256376611090765097996583882679127812,37228100129499647050256376611090765097996583883178641654⟩,⟨199333439100483500343482464544368491552460709047522584559,199333439100483500343482464544368491552460709048022107032⟩⟩, + ⟨⟨-116126809500525877936995545033062795361592072674596646868,-116126809500525877936995545033062795361592072674291210028⟩,⟨62340561967390171592106057100454882192332951972341856204,62340561967390171592106057100454882192332951972647243667⟩⟩, + ⟨⟨-61772113297209110751807825769710848195013772800576078378,-61772113297209110751807825769710848195013772800404034497⟩,⟨-53916688953431296995613690514345645804830946645942778162,-53916688953431296995613690514345645804830946645770686547⟩⟩, + ⟨⟨14612024243200806514404265747902775586355772778583245677,14612024243200806514404265747902775586355772778673115569⟩,⟨-47079228312813017775287446801497744661507773156118327557,-47079228312813017775287446801497744661507773156028464998⟩⟩, + ⟨⟨28473266261358581459665999669519132844032836870833597694,28473266261358581459665999669519132844032836870878793441⟩,⟨-4978167914722333892091445282197689942349057321824989857,-4978167914722333892091445282197689942349057321779820353⟩⟩, + ⟨⟨10786850682696455792227886139553700181842114568988944697,10786850682696455792227886139553700181842114569010438839⟩,⟨12705135884852209992639887307182351206861942287553338903,12705135884852209992639887307182351206861942287574844471⟩⟩, + ⟨⟨-2639366511534879380288373617908711534579800331999383076,-2639366511534879380288373617908711534579800331989700111⟩,⟨9142575914878852064575373325284311909654241656353133015,9142575914878852064575373325284311909654241656362821465⟩⟩, + ⟨⟨-5069826797849390516116762368441094928560529059009585176,-5069826797849390516116762368441094928560529059005268533⟩,⟨1891960230211672781705834325004670578988921651799194175,1891960230211672781705834325004670578988921651803507938⟩⟩] +lemma tw1_1_0_15_calc (j : Fin 31) : taylorWaveBox 1 1 0 15 j = tw1_1_0_15 j := by + revert j + decide +kernel +def tw1_1_0_16 : Fin 31 → CI := ![⟨⟨717352503700334924022761771576354039120805374484740878,717352503700334924022761771576354039120805374485867236⟩,⟨-868238952964033732753287524819290851977148072808086028,-868238952964033732753287524819290851977148072806959480⟩⟩, + ⟨⟨2059068501851841893209403852413172988427383842345902174,2059068501851841893209403852413172988427383842348637002⟩,⟨206095079450921997267963914920457207267538409316053531,206095079450921997267963914920457207267538409318786443⟩⟩, + ⟨⟨1599051783109613354697988687795295639789634838490477835,1599051783109613354697988687795295639789634838496864875⟩,⟨3438740601760249748708408830665544513899625037393119948,3438740601760249748708408830665544513899625037399507164⟩⟩, + ⟨⟨-4220835639260730390929455747658678994367524462823399333,-4220835639260730390929455747658678994367524462808942567⟩,⟨5446971981283061641435704321202134217152616033170102764,5446971981283061641435704321202134217152616033184565546⟩⟩, + ⟨⟨-11961032010571167646227685600068861415413832152596910850,-11961032010571167646227685600068861415413832152566179607⟩,⟨-2977416013001981303742639161261422090318882221411334817,-2977416013001981303742639161261422090318882221380612302⟩⟩, + ⟨⟨-2346219033702241714648595984589469343621206042843141800,-2346219033702241714648595984589469343621206042781266019⟩,⟨-21393093155750184887774473111977647533247310034400438130,-21393093155750184887774473111977647533247310034338562453⟩⟩, + ⟨⟨33446006860110619220103257391960125819112101416978279748,33446006860110619220103257391960125819112101417095445892⟩,⟨-14183155473253290145764570380826489235811994339731751317,-14183155473253290145764570380826489235811994339614576432⟩⟩, + ⟨⟨34793941469318423223179802382014012776207435745683447832,34793941469318423223179802382014012776207435745886933732⟩,⟨47254412818539877871972969846159959114615676734374572230,47254412818539877871972969846159959114615676734578051207⟩⟩, + ⟨⟨-61501778404826113525275045455183345144177616682007877120,-61501778404826113525275045455183345144177616681679771671⟩,⟨65411537451647066242760164991213747810755736266625175617,65411537451647066242760164991213747810755736266953263999⟩⟩, + ⟨⟨-105281677189308694634453446983979320422714776684962792720,-105281677189308694634453446983979320422714776684497501153⟩,⟨-74484689034913153575592054241587541636439522733012354711,-74484689034913153575592054241587541636439522732547007524⟩⟩, + ⟨⟨83948095341176075092335744268793544512269480845173502032,83948095341176075092335744268793544512269480845706769536⟩,⟨-151132032828648826818521733703409696892012349167311120288,-151132032828648826818521733703409696892012349166777932658⟩⟩, + ⟨⟨197706626804322472770414293238352458840541698644409453040,197706626804322472770414293238352458840541698644867543238⟩,⟨86937593556341749121417433277113208235512487208914938260,86937593556341749121417433277113208235512487209372992485⟩⟩, + ⟨⟨-80354594542863846393371327664813243114384374594210731349,-80354594542863846393371327664813243114384374593954680752⟩,⟨239349605886528110676771295978964249977263982541280575950,239349605886528110676771295978964249977263982541536855568⟩⟩, + ⟨⟨-271605575768677030751413685655971401976387479689131948529,-271605575768677030751413685655971401976387479689008111059⟩,⟨-62442620999964314265912092115917992599471497541228888093,-62442620999964314265912092115917992599471497541104557756⟩⟩, + ⟨⟨34270215944565055631524561251352437790181222181746435287,34270215944565055631524561251352437790181222181802290678⟩,⟨-291792596560378646615192381793875561589376776367486086079,-291792596560378646615192381793875561589376776367429336607⟩⟩, + ⟨⟨298641587593295006172335281543284749294782642455396209655,298641587593295006172335281543284749294782642455419762694⟩,⟨-20,21⟩⟩, + ⟨⟨34270215944565055631524561251352437790181222181746435285,34270215944565055631524561251352437790181222181802290677⟩,⟨291792596560378646615192381793875561589376776367429336607,291792596560378646615192381793875561589376776367486086080⟩⟩, + ⟨⟨-271605575768677030751413685655971401976387479689131948530,-271605575768677030751413685655971401976387479689008111059⟩,⟨62442620999964314265912092115917992599471497541104557754,62442620999964314265912092115917992599471497541228888091⟩⟩, + ⟨⟨-80354594542863846393371327664813243114384374594210731348,-80354594542863846393371327664813243114384374593954680750⟩,⟨-239349605886528110676771295978964249977263982541536855568,-239349605886528110676771295978964249977263982541280575951⟩⟩, + ⟨⟨197706626804322472770414293238352458840541698644409453041,197706626804322472770414293238352458840541698644867543239⟩,⟨-86937593556341749121417433277113208235512487209372992483,-86937593556341749121417433277113208235512487208914938259⟩⟩, + ⟨⟨83948095341176075092335744268793544512269480845173502031,83948095341176075092335744268793544512269480845706769535⟩,⟨151132032828648826818521733703409696892012349166777932659,151132032828648826818521733703409696892012349167311120289⟩⟩, + ⟨⟨-105281677189308694634453446983979320422714776684962792721,-105281677189308694634453446983979320422714776684497501154⟩,⟨74484689034913153575592054241587541636439522732547007523,74484689034913153575592054241587541636439522733012354710⟩⟩, + ⟨⟨-61501778404826113525275045455183345144177616682007877120,-61501778404826113525275045455183345144177616681679771670⟩,⟨-65411537451647066242760164991213747810755736266953264000,-65411537451647066242760164991213747810755736266625175617⟩⟩, + ⟨⟨34793941469318423223179802382014012776207435745683447832,34793941469318423223179802382014012776207435745886933732⟩,⟨-47254412818539877871972969846159959114615676734578051207,-47254412818539877871972969846159959114615676734374572230⟩⟩, + ⟨⟨33446006860110619220103257391960125819112101416978279748,33446006860110619220103257391960125819112101417095445892⟩,⟨14183155473253290145764570380826489235811994339614576433,14183155473253290145764570380826489235811994339731751317⟩⟩, + ⟨⟨-2346219033702241714648595984589469343621206042843141800,-2346219033702241714648595984589469343621206042781266019⟩,⟨21393093155750184887774473111977647533247310034338562453,21393093155750184887774473111977647533247310034400438130⟩⟩, + ⟨⟨-11961032010571167646227685600068861415413832152596910850,-11961032010571167646227685600068861415413832152566179607⟩,⟨2977416013001981303742639161261422090318882221380612302,2977416013001981303742639161261422090318882221411334817⟩⟩, + ⟨⟨-4220835639260730390929455747658678994367524462823399333,-4220835639260730390929455747658678994367524462808942567⟩,⟨-5446971981283061641435704321202134217152616033184565546,-5446971981283061641435704321202134217152616033170102764⟩⟩, + ⟨⟨1599051783109613354697988687795295639789634838490477835,1599051783109613354697988687795295639789634838496864875⟩,⟨-3438740601760249748708408830665544513899625037399507164,-3438740601760249748708408830665544513899625037393119948⟩⟩, + ⟨⟨2059068501851841893209403852413172988427383842345902174,2059068501851841893209403852413172988427383842348637002⟩,⟨-206095079450921997267963914920457207267538409318786443,-206095079450921997267963914920457207267538409316053531⟩⟩, + ⟨⟨717352503700334924022761771576354039120805374484740878,717352503700334924022761771576354039120805374485867236⟩,⟨868238952964033732753287524819290851977148072806959480,868238952964033732753287524819290851977148072808086028⟩⟩] +lemma tw1_1_0_16_calc (j : Fin 31) : taylorWaveBox 1 1 0 16 j = tw1_1_0_16 j := by + revert j + decide +kernel +def tw1_1_0_17 : Fin 31 → CI := ![⟨⟨115488191804008871153203354056385269690213480341707702,115488191804008871153203354056385269690213480341987006⟩,⟨189672416179025428572311526131381697527384757099862978,189672416179025428572311526131381697527384757100142345⟩⟩, + ⟨⟨-197081147599358762197090113227068889129634199916885339,-197081147599358762197090113227068889129634199916158179⟩,⟨378034448333606390661450036655730276901114258269334798,378034448333606390661450036655730276901114258270062268⟩⟩, + ⟨⟨-817493898020468233768644245827832799188618496114642519,-817493898020468233768644245827832799188618496112818552⟩,⟨2991089809398242714354107779598404135309852709276192,2991089809398242714354107779598404135309852711099442⟩⟩, + ⟨⟨-642261654694664932995173611640985272369742067678459006,-642261654694664932995173611640985272369742067674092971⟩,⟨-1417616748960677013641020742884416524182544797772988815,-1417616748960677013641020742884416524182544797768623073⟩⟩, + ⟨⟨2071848364340679948702142167974009052497966825755878236,2071848364340679948702142167974009052497966825765826499⟩,⟨-2057471209485833157322315496385096754402656521778131178,-2057471209485833157322315496385096754402656521768180762⟩⟩, + ⟨⟨4698696984349004537499356658860440936456809462984567945,4698696984349004537499356658860440936456809463005980776⟩,⟨2561607041463087329964629581844461886906674073867372791,2561607041463087329964629581844461886906674073888781848⟩⟩, + ⟨⟨-2584861327556440905876832021767906799775440392763403007,-2584861327556440905876832021767906799775440392720677031⟩,⟨9127503524374194618565946277568883827835349693367645472,9127503524374194618565946277568883827835349693410373596⟩⟩, + ⟨⟨-15978543218663919535995741849027305964943311737795193049,-15978543218663919535995741849027305964943311737717097760⟩,⟨-1874757592877453718089791946290014648240118735673280693,-1874757592877453718089791946290014648240118735595185850⟩⟩, + ⟨⟨412307778060866504553949604517581001551363629876629123,412307778060866504553949604517581001551363630008624713⟩,⟨-25814784274325322807235381487801712399729714007082820118,-25814784274325322807235381487801712399729714006950825034⟩⟩, + ⟨⟨38796861543222832942025644550676204518612751904499183853,38796861543222832942025644550676204518612751904693901724⟩,⟨-1380162268237777721796865436934763714789614739581670896,-1380162268237777721796865436934763714789614739386949417⟩⟩, + ⟨⟨2716092843275659338149428285716180255147463602933721700,2716092843275659338149428285716180255147463603163146559⟩,⟨54235958229520335818436578893409614914575871957140097715,54235958229520335818436578893409614914575871957369508272⟩⟩, + ⟨⟨-70403131678715167049422071946075015361984833802893031822,-70403131678715167049422071946075015361984833802693847890⟩,⟨2940371185881773836526594771842328258397004178110506041,2940371185881773836526594771842328258397004178309688151⟩⟩, + ⟨⟨-2101447331618062926156303851646354318813532036946461075,-2101447331618062926156303851646354318813532036835821347⟩,⟨-85007770041956384082281367160516190840392663344057390988,-85007770041956384082281367160516190840392663343946601542⟩⟩, + ⟨⟨96146128224393048070980467194553486652297775051265953670,96146128224393048070980467194553486652297775051316294619⟩,⟨-942261083081392131293893352616713564511077712796334774,-942261083081392131293893352616713564511077712745936162⟩⟩, + ⟨⟨209490193174165430165555341928924342715708881623332933,209490193174165430165555341928924342715708881645182728⟩,⟨102901126199397647504909708440420140936375088478041783508,102901126199397647504909708440420140936375088478063843600⟩⟩, + ⟨⟨-105135629716768133742465240921712096111857268069299570731,-105135629716768133742465240921712096111857268069290944316⟩,⟨-8,7⟩⟩, + ⟨⟨209490193174165430165555341928924342715708881623332934,209490193174165430165555341928924342715708881645182729⟩,⟨-102901126199397647504909708440420140936375088478063843600,-102901126199397647504909708440420140936375088478041783507⟩⟩, + ⟨⟨96146128224393048070980467194553486652297775051265953670,96146128224393048070980467194553486652297775051316294619⟩,⟨942261083081392131293893352616713564511077712745936163,942261083081392131293893352616713564511077712796334775⟩⟩, + ⟨⟨-2101447331618062926156303851646354318813532036946461076,-2101447331618062926156303851646354318813532036835821348⟩,⟨85007770041956384082281367160516190840392663343946601542,85007770041956384082281367160516190840392663344057390988⟩⟩, + ⟨⟨-70403131678715167049422071946075015361984833802893031822,-70403131678715167049422071946075015361984833802693847890⟩,⟨-2940371185881773836526594771842328258397004178309688151,-2940371185881773836526594771842328258397004178110506041⟩⟩, + ⟨⟨2716092843275659338149428285716180255147463602933721700,2716092843275659338149428285716180255147463603163146559⟩,⟨-54235958229520335818436578893409614914575871957369508272,-54235958229520335818436578893409614914575871957140097715⟩⟩, + ⟨⟨38796861543222832942025644550676204518612751904499183853,38796861543222832942025644550676204518612751904693901724⟩,⟨1380162268237777721796865436934763714789614739386949417,1380162268237777721796865436934763714789614739581670896⟩⟩, + ⟨⟨412307778060866504553949604517581001551363629876629122,412307778060866504553949604517581001551363630008624713⟩,⟨25814784274325322807235381487801712399729714006950825034,25814784274325322807235381487801712399729714007082820118⟩⟩, + ⟨⟨-15978543218663919535995741849027305964943311737795193049,-15978543218663919535995741849027305964943311737717097760⟩,⟨1874757592877453718089791946290014648240118735595185850,1874757592877453718089791946290014648240118735673280693⟩⟩, + ⟨⟨-2584861327556440905876832021767906799775440392763403007,-2584861327556440905876832021767906799775440392720677031⟩,⟨-9127503524374194618565946277568883827835349693410373596,-9127503524374194618565946277568883827835349693367645472⟩⟩, + ⟨⟨4698696984349004537499356658860440936456809462984567945,4698696984349004537499356658860440936456809463005980776⟩,⟨-2561607041463087329964629581844461886906674073888781848,-2561607041463087329964629581844461886906674073867372791⟩⟩, + ⟨⟨2071848364340679948702142167974009052497966825755878236,2071848364340679948702142167974009052497966825765826499⟩,⟨2057471209485833157322315496385096754402656521768180762,2057471209485833157322315496385096754402656521778131178⟩⟩, + ⟨⟨-642261654694664932995173611640985272369742067678459006,-642261654694664932995173611640985272369742067674092971⟩,⟨1417616748960677013641020742884416524182544797768623073,1417616748960677013641020742884416524182544797772988815⟩⟩, + ⟨⟨-817493898020468233768644245827832799188618496114642519,-817493898020468233768644245827832799188618496112818552⟩,⟨-2991089809398242714354107779598404135309852711099442,-2991089809398242714354107779598404135309852709276192⟩⟩, + ⟨⟨-197081147599358762197090113227068889129634199916885339,-197081147599358762197090113227068889129634199916158179⟩,⟨-378034448333606390661450036655730276901114258270062268,-378034448333606390661450036655730276901114258269334798⟩⟩, + ⟨⟨115488191804008871153203354056385269690213480341707702,115488191804008871153203354056385269690213480341987006⟩,⟨-189672416179025428572311526131381697527384757100142345,-189672416179025428572311526131381697527384757099862978⟩⟩] +lemma tw1_1_0_17_calc (j : Fin 31) : taylorWaveBox 1 1 0 17 j = tw1_1_0_17 j := by + revert j + decide +kernel +def tw1_1_0_18 : Fin 31 → CI := ![⟨⟨-40650985235406550618240535344988166671778248436967400,-40650985235406550618240535344988166671778248436900746⟩,⟨8816568466541659452726967574643077823531996913576558,8816568466541659452726967574643077823531996913643185⟩⟩, + ⟨⟨-54351291841725721721362064517620899113856512436501865,-54351291841725721721362064517620899113856512436318403⟩,⟨-63307775142386387050273750975117291928367470293442897,-63307775142386387050273750975117291928367470293259450⟩⟩, + ⟨⟨69477505267168621366207792864298580208933070121410071,69477505267168621366207792864298580208933070121903986⟩,⟨-152315888961424335359139749077910376572305574234960433,-152315888961424335359139749077910376572305574234466355⟩⟩, + ⟨⟨333305181118771518562022624226215833114999961990313143,333305181118771518562022624226215833114999961991575008⟩,⟨20278049219594688828029887115371430332116758747488154,20278049219594688828029887115371430332116758748749782⟩⟩, + ⟨⟨154282042362621871000936398229080245407277300519221406,154282042362621871000936398229080245407277300522271301⟩,⟨638732348002758815155252283929540294561278874193934802,638732348002758815155252283929540294561278874196984662⟩⟩, + ⟨⟨-1130943404363275475759889153996079086887768653625964795,-1130943404363275475759889153996079086887768653618961972⟩,⟨564980741714688824487682303273157046134939784606867199,564980741714688824487682303273157046134939784613870533⟩⟩, + ⟨⟨-1363103437479907224791254369435604162106758852578642392,-1363103437479907224791254369435604162106758852563783510⟩,⟨-1918328753417658854256896739053107361973069155715355712,-1918328753417658854256896739053107361973069155700497659⟩⟩, + ⟨⟨3197984169019123834474878691486560237595882224510766470,3197984169019123834474878691486560237595882224539477436⟩,⟨-2707444434562355038739641802384490080512688921131639424,-2707444434562355038739641802384490080512688921102927919⟩⟩, + ⟨⟨4664723810249497942725438240851917263686191620889364792,4664723810249497942725438240851917263686191620940257989⟩,⟨5290085485498787808959240085212835457446387209001585338,5290085485498787808959240085212835457446387209052479739⟩⟩, + ⟨⟨-8584416506848219073165343008794526992190417914089594460,-8584416506848219073165343008794526992190417914011702874⟩,⟨7039638294698734795021439579229672193854385429970260499,7039638294698734795021439579229672193854385430048148217⟩⟩, + ⟨⟨-9244512891314684180501890115836278493628471068830778450,-9244512891314684180501890115836278493628471068736929729⟩,⟨-13308857277143914398000934943495610601395466405834178054,-13308857277143914398000934943495610601395466405740326810⟩⟩, + ⟨⟨19189981061380363026176834890880053745777721894304923844,19189981061380363026176834890880053745777721894386929268⟩,⟨-10427836197408548168414633596039864644910191399260464980,-10427836197408548168414633596039864644910191399178456566⟩⟩, + ⟨⟨9922902631547086989272524029147927744328268058554576908,9922902631547086989272524029147927744328268058599736872⟩,⟨25333063750754416279510640763262039878043444762330982551,25333063750754416279510640763262039878043444762376187640⟩⟩, + ⟨⟨-30568678894200391304311966727833057192788064223649648240,-30568678894200391304311966727833057192788064223630187671⟩,⟨7661545456528377047195924592899067335636250474732006953,7661545456528377047195924592899067335636250474751442996⟩⟩, + ⟨⟨-4132205096677441362202024879555159795256149132960887854,-4132205096677441362202024879555159795256149132952789352⟩,⟨-33988375813958042560002933311244780970341051930058950017,-33988375813958042560002933311244780970341051930050818125⟩⟩, + ⟨⟨35161966853875881706958593719392082277855992095416697532,35161966853875881706958593719392082277855992095419694508⟩,⟨-3,3⟩⟩, + ⟨⟨-4132205096677441362202024879555159795256149132960887854,-4132205096677441362202024879555159795256149132952789352⟩,⟨33988375813958042560002933311244780970341051930050818125,33988375813958042560002933311244780970341051930058950017⟩⟩, + ⟨⟨-30568678894200391304311966727833057192788064223649648240,-30568678894200391304311966727833057192788064223630187671⟩,⟨-7661545456528377047195924592899067335636250474751442996,-7661545456528377047195924592899067335636250474732006953⟩⟩, + ⟨⟨9922902631547086989272524029147927744328268058554576908,9922902631547086989272524029147927744328268058599736873⟩,⟨-25333063750754416279510640763262039878043444762376187640,-25333063750754416279510640763262039878043444762330982551⟩⟩, + ⟨⟨19189981061380363026176834890880053745777721894304923844,19189981061380363026176834890880053745777721894386929268⟩,⟨10427836197408548168414633596039864644910191399178456566,10427836197408548168414633596039864644910191399260464980⟩⟩, + ⟨⟨-9244512891314684180501890115836278493628471068830778450,-9244512891314684180501890115836278493628471068736929729⟩,⟨13308857277143914398000934943495610601395466405740326810,13308857277143914398000934943495610601395466405834178054⟩⟩, + ⟨⟨-8584416506848219073165343008794526992190417914089594460,-8584416506848219073165343008794526992190417914011702874⟩,⟨-7039638294698734795021439579229672193854385430048148217,-7039638294698734795021439579229672193854385429970260499⟩⟩, + ⟨⟨4664723810249497942725438240851917263686191620889364792,4664723810249497942725438240851917263686191620940257989⟩,⟨-5290085485498787808959240085212835457446387209052479739,-5290085485498787808959240085212835457446387209001585338⟩⟩, + ⟨⟨3197984169019123834474878691486560237595882224510766470,3197984169019123834474878691486560237595882224539477436⟩,⟨2707444434562355038739641802384490080512688921102927919,2707444434562355038739641802384490080512688921131639424⟩⟩, + ⟨⟨-1363103437479907224791254369435604162106758852578642392,-1363103437479907224791254369435604162106758852563783510⟩,⟨1918328753417658854256896739053107361973069155700497659,1918328753417658854256896739053107361973069155715355712⟩⟩, + ⟨⟨-1130943404363275475759889153996079086887768653625964795,-1130943404363275475759889153996079086887768653618961972⟩,⟨-564980741714688824487682303273157046134939784613870533,-564980741714688824487682303273157046134939784606867199⟩⟩, + ⟨⟨154282042362621871000936398229080245407277300519221406,154282042362621871000936398229080245407277300522271301⟩,⟨-638732348002758815155252283929540294561278874196984662,-638732348002758815155252283929540294561278874193934802⟩⟩, + ⟨⟨333305181118771518562022624226215833114999961990313143,333305181118771518562022624226215833114999961991575008⟩,⟨-20278049219594688828029887115371430332116758748749782,-20278049219594688828029887115371430332116758747488154⟩⟩, + ⟨⟨69477505267168621366207792864298580208933070121410071,69477505267168621366207792864298580208933070121903986⟩,⟨152315888961424335359139749077910376572305574234466355,152315888961424335359139749077910376572305574234960433⟩⟩, + ⟨⟨-54351291841725721721362064517620899113856512436501865,-54351291841725721721362064517620899113856512436318403⟩,⟨63307775142386387050273750975117291928367470293259450,63307775142386387050273750975117291928367470293442897⟩⟩, + ⟨⟨-40650985235406550618240535344988166671778248436967400,-40650985235406550618240535344988166671778248436900746⟩,⟨-8816568466541659452726967574643077823531996913643185,-8816568466541659452726967574643077823531996913576558⟩⟩] +lemma tw1_1_0_18_calc (j : Fin 31) : taylorWaveBox 1 1 0 18 j = tw1_1_0_18 j := by + revert j + decide +kernel +def tw1_1_0_19 : Fin 31 → CI := ![⟨⟨886644688016671435890975233137959603659391572970425,886644688016671435890975233137959603659391572985512⟩,⟨-7367358287970682392572820196105702226673602943775517,-7367358287970682392572820196105702226673602943760425⟩⟩, + ⟨⟨14720363165835498999113057912310713863670026554481404,14720363165835498999113057912310713863670026554525657⟩,⟨-5019320604398070412494718387091777118973470509053721,-5019320604398070412494718387091777118973470509009476⟩⟩, + ⟨⟨21314062159459202512868945446214645094066794034087944,21314062159459202512868945446214645094066794034215081⟩,⟨24735289732288385628078193279567253550067499532799714,24735289732288385628078193279567253550067499532926836⟩⟩, + ⟨⟨-35485767837406249300271619773610739096545183216971114,-35485767837406249300271619773610739096545183216623379⟩,⟨58280537304689636364442592923134572516180382298758048,58280537304689636364442592923134572516180382299105846⟩⟩, + ⟨⟨-134211032262220925841220249056229162782516679841932252,-134211032262220925841220249056229162782516679841035178⟩,⟨-42682034839667287462097030990535613920538974524103976,-42682034839667287462097030990535613920538974523207015⟩⟩, + ⟨⟨41115717251627543753790652941154775705128193338425337,41115717251627543753790652941154775705128193340609612⟩,⟨-281437885938311885216852469527793772753886737123636145,-281437885938311885216852469527793772753886737121451786⟩⟩, + ⟨⟨555008346691928715958643299645639550597341917894983828,555008346691928715958643299645639550597341917899892815⟩,⟨32928592102603683408129301378207943672991753560081449,32928592102603683408129301378207943672991753564990398⟩⟩, + ⟨⟨-50861878547380393214624444117926669660550670197698824,-50861878547380393214624444117926669660550670187686505⟩,⟨1038109432711832641669954473630885338684240752056315606,1038109432711832641669954473630885338684240752066327939⟩⟩, + ⟨⟨-1823996990996897907435100902872673496531484313494511110,-1823996990996897907435100902872673496531484313475886631⟩,⟨-200538671260101511384703793862464444440280904269433933,-200538671260101511384703793862464444440280904250809373⟩⟩, + ⟨⟨697143436493751914939780161157217164089314080013226923,697143436493751914939780161157217164089314080042878795⟩,⟨-2942115614295543999023679282021082777598411053931940852,-2942115614295543999023679282021082777598411053902289744⟩⟩, + ⟨⟨4229722776658097446431291106375736520046903073966762157,4229722776658097446431291106375736520046903074003483763⟩,⟨1821448397716368818510687723311945690946872069914443206,1821448397716368818510687723311945690946872069951166822⟩⟩, + ⟨⟨-3730214393409974786454030571490720176031658946431580001,-3730214393409974786454030571490720176031658946399336638⟩,⟨5258198623853165578280094747016497941817880481363443878,5258198623853165578280094747016497941817880481395688592⟩⟩, + ⟨⟨-5478776137639244396685712743968691097541866200903254227,-5478776137639244396685712743968691097541866200885759303⟩,⟨-6222278824632363619721179587252451422093188817118120422,-6222278824632363619721179587252451422093188817100618054⟩⟩, + ⟨⟨8719374786735509481511396808504608219470979464172225952,8719374786735509481511396808504608219470979464179580541⟩,⟨-4554376218506775628658895205736233129851091988222014567,-4554376218506775628658895205736233129851091988214682483⟩⟩, + ⟨⟨2578301787008007199057308016651298501473081787228615472,2578301787008007199057308016651298501473081787231467937⟩,⟨10539027668076186185881179697371033647606825751430935357,10539027668076186185881179697371033647606825751433786281⟩⟩, + ⟨⟨-11199718346254164000312241261312555700833117753919946174,-11199718346254164000312241261312555700833117753918955933⟩,⟨-1,1⟩⟩, + ⟨⟨2578301787008007199057308016651298501473081787228615472,2578301787008007199057308016651298501473081787231467937⟩,⟨-10539027668076186185881179697371033647606825751433786281,-10539027668076186185881179697371033647606825751430935357⟩⟩, + ⟨⟨8719374786735509481511396808504608219470979464172225952,8719374786735509481511396808504608219470979464179580541⟩,⟨4554376218506775628658895205736233129851091988214682483,4554376218506775628658895205736233129851091988222014567⟩⟩, + ⟨⟨-5478776137639244396685712743968691097541866200903254227,-5478776137639244396685712743968691097541866200885759303⟩,⟨6222278824632363619721179587252451422093188817100618054,6222278824632363619721179587252451422093188817118120422⟩⟩, + ⟨⟨-3730214393409974786454030571490720176031658946431580001,-3730214393409974786454030571490720176031658946399336638⟩,⟨-5258198623853165578280094747016497941817880481395688592,-5258198623853165578280094747016497941817880481363443878⟩⟩, + ⟨⟨4229722776658097446431291106375736520046903073966762157,4229722776658097446431291106375736520046903074003483763⟩,⟨-1821448397716368818510687723311945690946872069951166822,-1821448397716368818510687723311945690946872069914443206⟩⟩, + ⟨⟨697143436493751914939780161157217164089314080013226923,697143436493751914939780161157217164089314080042878795⟩,⟨2942115614295543999023679282021082777598411053902289744,2942115614295543999023679282021082777598411053931940852⟩⟩, + ⟨⟨-1823996990996897907435100902872673496531484313494511110,-1823996990996897907435100902872673496531484313475886631⟩,⟨200538671260101511384703793862464444440280904250809373,200538671260101511384703793862464444440280904269433933⟩⟩, + ⟨⟨-50861878547380393214624444117926669660550670197698824,-50861878547380393214624444117926669660550670187686505⟩,⟨-1038109432711832641669954473630885338684240752066327939,-1038109432711832641669954473630885338684240752056315606⟩⟩, + ⟨⟨555008346691928715958643299645639550597341917894983828,555008346691928715958643299645639550597341917899892815⟩,⟨-32928592102603683408129301378207943672991753564990398,-32928592102603683408129301378207943672991753560081449⟩⟩, + ⟨⟨41115717251627543753790652941154775705128193338425337,41115717251627543753790652941154775705128193340609612⟩,⟨281437885938311885216852469527793772753886737121451786,281437885938311885216852469527793772753886737123636145⟩⟩, + ⟨⟨-134211032262220925841220249056229162782516679841932252,-134211032262220925841220249056229162782516679841035178⟩,⟨42682034839667287462097030990535613920538974523207015,42682034839667287462097030990535613920538974524103976⟩⟩, + ⟨⟨-35485767837406249300271619773610739096545183216971114,-35485767837406249300271619773610739096545183216623379⟩,⟨-58280537304689636364442592923134572516180382299105846,-58280537304689636364442592923134572516180382298758048⟩⟩, + ⟨⟨21314062159459202512868945446214645094066794034087944,21314062159459202512868945446214645094066794034215081⟩,⟨-24735289732288385628078193279567253550067499532926836,-24735289732288385628078193279567253550067499532799714⟩⟩, + ⟨⟨14720363165835498999113057912310713863670026554481404,14720363165835498999113057912310713863670026554525657⟩,⟨5019320604398070412494718387091777118973470509009476,5019320604398070412494718387091777118973470509053721⟩⟩, + ⟨⟨886644688016671435890975233137959603659391572970425,886644688016671435890975233137959603659391572985512⟩,⟨7367358287970682392572820196105702226673602943760425,7367358287970682392572820196105702226673602943775517⟩⟩] +lemma tw1_1_0_19_calc (j : Fin 31) : taylorWaveBox 1 1 0 19 j = tw1_1_0_19 j := by + revert j + decide +kernel +def tw1_1_0_20 : Fin 31 → CI := ![⟨⟨1136092715789256548959405053261295088771711260112493,1136092715789256548959405053261295088771711260115749⟩,⟨553173760884627738152269238418211191599845379371173,553173760884627738152269238418211191599845379374429⟩⟩, + ⟨⟨-144360025846005028455677290349611722875001379602483,-144360025846005028455677290349611722875001379592251⟩,⟨2763404915793042893137275249232210309281382245724547,2763404915793042893137275249232210309281382245734781⟩⟩, + ⟨⟨-5842629792267814034530768869800708675313735695815005,-5842629792267814034530768869800708675313735695783749⟩,⟨1677744732146321630113835524631777734099007835314422,1677744732146321630113835524631777734099007835345676⟩⟩, + ⟨⟨-6816655055622004947977569464667738370790829963813489,-6816655055622004947977569464667738370790829963722180⟩,⟨-11431022373110017175341570223643711244152804605628629,-11431022373110017175341570223643711244152804605537325⟩⟩, + ⟨⟨21699872016648402503244296529461690410302569965796508,21699872016648402503244296529461690410302569966047999⟩,⟨-18954726566130844922834017497281942760042192878194197,-18954726566130844922834017497281942760042192877942687⟩⟩, + ⟨⟨44549852170289800635568589630258522175922472280623879,44549852170289800635568589630258522175922472281276307⟩,⟨41788910931761047992361703422814402049007865249354980,41788910931761047992361703422814402049007865250007368⟩⟩, + ⟨⟨-84202484196580743297857353124992637423004881037506324,-84202484196580743297857353124992637423004881035950337⟩,⟨92904308118387236955024029375981417996854818135202949,92904308118387236955024029375981417996854818136758991⟩⟩, + ⟨⟨-171376219611398752829426805131493636095516199069460510,-171376219611398752829426805131493636095516199066110686⟩,⟨-176608743544730032075480613004326021384723263823382868,-176608743544730032075480613004326021384723263820033079⟩⟩, + ⟨⟨368461779876508677921887789294811894073844265374086189,368461779876508677921887789294811894073844265380613749⟩,⟨-268158073586154307026250580260712763028245779150183816,-268158073586154307026250580260712763028245779143656324⟩⟩, + ⟨⟨319532575861991207150757720172281470087408187479866621,319532575861991207150757720172281470087408187490642215⟩,⟨718171750423996357820566454525983974970234051405169855,718171750423996357820566454525983974970234051415945590⟩⟩, + ⟨⟨-1235184606755890987401682241100132437119244911587376910,-1235184606755890987401682241100132437119244911573689181⟩,⟨187228457745457754623023592823089036886511524265390993,187228457745457754623023592823089036886511524279078960⟩⟩, + ⟨⟨291188073108174660593869912580171733205247484035695832,291188073108174660593869912580171733205247484047847811⟩,⟨-1793063000201882779436243134132052851324390550649108215,-1793063000201882779436243134132052851324390550636956066⟩⟩, + ⟨⟨2115994612565130104955619615161216840337091519352241239,2115994612565130104955619615161216840337091519358703664⟩,⟨1156635877228254935003659051455413949021593582562952223,1156635877228254935003659051455413949021593582569414056⟩⟩, + ⟨⟨-2209164511388924522715308877956307248068600930165190346,-2209164511388924522715308877956307248068600930162551733⟩,⟨1926380032247069343386582660544287021589386900932951558,1926380032247069343386582660544287021589386900935581476⟩⟩, + ⟨⟨-1152682996755392874828928800392260923730577696513875880,-1152682996755392874828928800392260923730577696512918561⟩,⟨-3072817192401225405361720138395546688546475086208064684,-3072817192401225405361720138395546688546475086207111592⟩⟩, + ⟨⟨3405161040117501275125182804093215093174801762100061166,3405161040117501275125182804093215093174801762100373078⟩,⟨-1,1⟩⟩, + ⟨⟨-1152682996755392874828928800392260923730577696513875880,-1152682996755392874828928800392260923730577696512918561⟩,⟨3072817192401225405361720138395546688546475086207111592,3072817192401225405361720138395546688546475086208064684⟩⟩, + ⟨⟨-2209164511388924522715308877956307248068600930165190346,-2209164511388924522715308877956307248068600930162551733⟩,⟨-1926380032247069343386582660544287021589386900935581476,-1926380032247069343386582660544287021589386900932951558⟩⟩, + ⟨⟨2115994612565130104955619615161216840337091519352241239,2115994612565130104955619615161216840337091519358703664⟩,⟨-1156635877228254935003659051455413949021593582569414056,-1156635877228254935003659051455413949021593582562952223⟩⟩, + ⟨⟨291188073108174660593869912580171733205247484035695832,291188073108174660593869912580171733205247484047847811⟩,⟨1793063000201882779436243134132052851324390550636956066,1793063000201882779436243134132052851324390550649108215⟩⟩, + ⟨⟨-1235184606755890987401682241100132437119244911587376910,-1235184606755890987401682241100132437119244911573689181⟩,⟨-187228457745457754623023592823089036886511524279078960,-187228457745457754623023592823089036886511524265390993⟩⟩, + ⟨⟨319532575861991207150757720172281470087408187479866621,319532575861991207150757720172281470087408187490642215⟩,⟨-718171750423996357820566454525983974970234051415945590,-718171750423996357820566454525983974970234051405169855⟩⟩, + ⟨⟨368461779876508677921887789294811894073844265374086189,368461779876508677921887789294811894073844265380613749⟩,⟨268158073586154307026250580260712763028245779143656324,268158073586154307026250580260712763028245779150183816⟩⟩, + ⟨⟨-171376219611398752829426805131493636095516199069460510,-171376219611398752829426805131493636095516199066110686⟩,⟨176608743544730032075480613004326021384723263820033079,176608743544730032075480613004326021384723263823382868⟩⟩, + ⟨⟨-84202484196580743297857353124992637423004881037506324,-84202484196580743297857353124992637423004881035950337⟩,⟨-92904308118387236955024029375981417996854818136758991,-92904308118387236955024029375981417996854818135202949⟩⟩, + ⟨⟨44549852170289800635568589630258522175922472280623879,44549852170289800635568589630258522175922472281276307⟩,⟨-41788910931761047992361703422814402049007865250007368,-41788910931761047992361703422814402049007865249354980⟩⟩, + ⟨⟨21699872016648402503244296529461690410302569965796508,21699872016648402503244296529461690410302569966047999⟩,⟨18954726566130844922834017497281942760042192877942687,18954726566130844922834017497281942760042192878194197⟩⟩, + ⟨⟨-6816655055622004947977569464667738370790829963813489,-6816655055622004947977569464667738370790829963722180⟩,⟨11431022373110017175341570223643711244152804605537325,11431022373110017175341570223643711244152804605628629⟩⟩, + ⟨⟨-5842629792267814034530768869800708675313735695815005,-5842629792267814034530768869800708675313735695783749⟩,⟨-1677744732146321630113835524631777734099007835345676,-1677744732146321630113835524631777734099007835314422⟩⟩, + ⟨⟨-144360025846005028455677290349611722875001379602483,-144360025846005028455677290349611722875001379592251⟩,⟨-2763404915793042893137275249232210309281382245734781,-2763404915793042893137275249232210309281382245724547⟩⟩, + ⟨⟨1136092715789256548959405053261295088771711260112493,1136092715789256548959405053261295088771711260115749⟩,⟨-553173760884627738152269238418211191599845379374429,-553173760884627738152269238418211191599845379371173⟩⟩] +lemma tw1_1_0_20_calc (j : Fin 31) : taylorWaveBox 1 1 0 20 j = tw1_1_0_20 j := by + revert j + decide +kernel +def tw1_1_0 : Fin 21 → Fin 31 → CI := ![tw1_1_0_0,tw1_1_0_1,tw1_1_0_2,tw1_1_0_3,tw1_1_0_4,tw1_1_0_5,tw1_1_0_6,tw1_1_0_7,tw1_1_0_8,tw1_1_0_9,tw1_1_0_10,tw1_1_0_11,tw1_1_0_12,tw1_1_0_13,tw1_1_0_14,tw1_1_0_15,tw1_1_0_16,tw1_1_0_17,tw1_1_0_18,tw1_1_0_19,tw1_1_0_20] +lemma tw1_1_0_mem (l : Fin 21) (j : Fin 31) : (tw1_1_0 l j).Mem (taylorWave 1 1 (nearNode 0) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 0 l j = tw1_1_0 l j := by + fin_cases l + · exact tw1_1_0_0_calc j + · exact tw1_1_0_1_calc j + · exact tw1_1_0_2_calc j + · exact tw1_1_0_3_calc j + · exact tw1_1_0_4_calc j + · exact tw1_1_0_5_calc j + · exact tw1_1_0_6_calc j + · exact tw1_1_0_7_calc j + · exact tw1_1_0_8_calc j + · exact tw1_1_0_9_calc j + · exact tw1_1_0_10_calc j + · exact tw1_1_0_11_calc j + · exact tw1_1_0_12_calc j + · exact tw1_1_0_13_calc j + · exact tw1_1_0_14_calc j + · exact tw1_1_0_15_calc j + · exact tw1_1_0_16_calc j + · exact tw1_1_0_17_calc j + · exact tw1_1_0_18_calc j + · exact tw1_1_0_19_calc j + · exact tw1_1_0_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 0 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave111.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave111.lean new file mode 100644 index 0000000000000000000000000000000000000000..abe4e3c96773914b1f9badf4cbe3fd527f384a60 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave111.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_1_0 : Fin 31 → CI := ![⟨⟨133643216065796354457227718745009987114718101121864199433322,133643216065796354457227718745009987114718101121915889950815⟩,⟨157219118048673924940769384835854299466338136876132517704547,157219118048673924940769384835854299466338136876183814931609⟩⟩, + ⟨⟨34680276086089629915934165786435328356720195563854759389002,34680276086089629915934165786435328356720195563886504944046⟩,⟨113673633539981558635087546375756811359355660430231620099900,113673633539981558635087546375756811359355660430263276427853⟩⟩, + ⟨⟨-6235487223601637475403346632738350109792231270547347060182,-6235487223601637475403346632738350109792231270530031212725⟩,⟨62593143639127518105458327573368897052713402848010084152249,62593143639127518105458327573368897052713402848027402843118⟩⟩, + ⟨⟨-13668689332537638971458093218979529666905998768902080488887,-13668689332537638971458093218979529666905998768893723596022⟩,⟨26998966327443648007348335204821489547849874962284007288342,26998966327443648007348335204821489547849874962292377219629⟩⟩, + ⟨⟨-9338234880364377812072827802690414785555956452987234631093,-9338234880364377812072827802690414785555956452983664612794⟩,⟨9175077980380920999074664634188090465995043447748172766485,9175077980380920999074664634188090465995043447751749016619⟩⟩, + ⟨⟨-4382546082050110481688618901717717571625025022096646218009,-4382546082050110481688618901717717571625025022095289365372⟩,⟨2499962219686716571359169805178960896569059589659149506824,2499962219686716571359169805178960896569059589660507992849⟩⟩, + ⟨⟨-1612981314827764014911866370466276114932385675230585850051,-1612981314827764014911866370466276114932385675230124177287⟩,⟨603604286363424345086824085996145252684761830161590810910,603604286363424345086824085996145252684761830162052706063⟩⟩, + ⟨⟨-492231679821775380753167301456060016458791407964318782734,-492231679821775380753167301456060016458791407964178637590⟩,⟨170654805319273326369302429045315221516293949991849749496,170654805319273326369302429045315221516293949991989901094⟩⟩, + ⟨⟨-124581648078941980472773134489522052607973724813217475651,-124581648078941980472773134489522052607973724813173407182⟩,⟨66550238443867550946469206940063795964777377421673910782,66550238443867550946469206940063795964777377421717980283⟩⟩, + ⟨⟨-22495185962061316995826229893245871959140255531963822031,-22495185962061316995826229893245871959140255531950787497⟩,⟨27151188954744770664977906120021334701271297134383434624,27151188954744770664977906120021334701271297134396465838⟩⟩, + ⟨⟨-193100215318356393805772873410160870043859440128738081,-193100215318356393805772873410160870043859440126026007⟩,⟨8501759849067073541450614016613471575594133362588101608,8501759849067073541450614016613471575594133362590811015⟩⟩, + ⟨⟨1753802397859707496886017129012076170443159509562797071,1753802397859707496886017129012076170443159509563675812⟩,⟨1210206761255842174317455308130198879222440185309581041,1210206761255842174317455308130198879222440185310462416⟩⟩, + ⟨⟨458181332941277785736423280111193275190956358985129432,458181332941277785736423280111193275190956358985273253⟩,⟨-403514465377643856917139360180708357474609560230352275,-403514465377643856917139360180708357474609560230209835⟩⟩, + ⟨⟨-159103673756571010993662931197579710884448853188636218,-159103673756571010993662931197579710884448853188577055⟩,⟨-156679160527669597942569988465918998076436338534638659,-156679160527669597942569988465918998076436338534578995⟩⟩, + ⟨⟨-51224881925234500658099440100441496347813333906323130,-51224881925234500658099440100441496347813333906305867⟩,⟨103950725575716254075474167891591850746620673550670897,103950725575716254075474167891591850746620673550688557⟩⟩, + ⟨⟨92241096083502850332621520945226019564443847121507437,92241096083502850332621520945226019564443847121514357⟩,⟨-113,136⟩⟩, + ⟨⟨-51224881925234500658099440100441496347813333906323130,-51224881925234500658099440100441496347813333906305867⟩,⟨-103950725575716254075474167891591850746620673550688556,-103950725575716254075474167891591850746620673550670897⟩⟩, + ⟨⟨-159103673756571010993662931197579710884448853188636218,-159103673756571010993662931197579710884448853188577055⟩,⟨156679160527669597942569988465918998076436338534578996,156679160527669597942569988465918998076436338534638659⟩⟩, + ⟨⟨458181332941277785736423280111193275190956358985129432,458181332941277785736423280111193275190956358985273253⟩,⟨403514465377643856917139360180708357474609560230209836,403514465377643856917139360180708357474609560230352276⟩⟩, + ⟨⟨1753802397859707496886017129012076170443159509562797071,1753802397859707496886017129012076170443159509563675812⟩,⟨-1210206761255842174317455308130198879222440185310462416,-1210206761255842174317455308130198879222440185309581041⟩⟩, + ⟨⟨-193100215318356393805772873410160870043859440128738081,-193100215318356393805772873410160870043859440126026007⟩,⟨-8501759849067073541450614016613471575594133362590811014,-8501759849067073541450614016613471575594133362588101608⟩⟩, + ⟨⟨-22495185962061316995826229893245871959140255531963822031,-22495185962061316995826229893245871959140255531950787497⟩,⟨-27151188954744770664977906120021334701271297134396465837,-27151188954744770664977906120021334701271297134383434623⟩⟩, + ⟨⟨-124581648078941980472773134489522052607973724813217475654,-124581648078941980472773134489522052607973724813173407167⟩,⟨-66550238443867550946469206940063795964777377421717980313,-66550238443867550946469206940063795964777377421673910782⟩⟩, + ⟨⟨-492231679821775380753167301456060016458791407964318782734,-492231679821775380753167301456060016458791407964178637590⟩,⟨-170654805319273326369302429045315221516293949991989901094,-170654805319273326369302429045315221516293949991849749495⟩⟩, + ⟨⟨-1612981314827764014911866370466276114932385675230585850051,-1612981314827764014911866370466276114932385675230124177287⟩,⟨-603604286363424345086824085996145252684761830162052706063,-603604286363424345086824085996145252684761830161590810910⟩⟩, + ⟨⟨-4382546082050110481688618901717717571625025022096646217995,-4382546082050110481688618901717717571625025022095289365358⟩,⟨-2499962219686716571359169805178960896569059589660507992855,-2499962219686716571359169805178960896569059589659149506831⟩⟩, + ⟨⟨-9338234880364377812072827802690414785555956452987234631061,-9338234880364377812072827802690414785555956452983664612711⟩,⟨-9175077980380920999074664634188090465995043447751749016704,-9175077980380920999074664634188090465995043447748172766510⟩⟩, + ⟨⟨-13668689332537638971458093218979529666905998768902080488659,-13668689332537638971458093218979529666905998768893723595886⟩,⟨-26998966327443648007348335204821489547849874962292377219673,-26998966327443648007348335204821489547849874962284007288472⟩⟩, + ⟨⟨-6235487223601637475403346632738350109792231270547347059911,-6235487223601637475403346632738350109792231270530031212459⟩,⟨-62593143639127518105458327573368897052713402848027402843144,-62593143639127518105458327573368897052713402848010084152282⟩⟩, + ⟨⟨34680276086089629915934165786435328356720195563854759390305,34680276086089629915934165786435328356720195563886504944721⟩,⟨-113673633539981558635087546375756811359355660430263276427211,-113673633539981558635087546375756811359355660430231620099886⟩⟩, + ⟨⟨133643216065796354457227718745009987114718101121864199433764,133643216065796354457227718745009987114718101121915889952170⟩,⟨-157219118048673924940769384835854299466338136876183814931279,-157219118048673924940769384835854299466338136876132517703307⟩⟩] +lemma tw1_1_1_0_calc (j : Fin 31) : taylorWaveBox 1 1 1 0 j = tw1_1_1_0 j := by + revert j + decide +kernel +def tw1_1_1_1 : Fin 31 → CI := ![⟨⟨-240129261410661507874209315299882739568798390966040831729595,-240129261410661507874209315299882739568798390965976427263763⟩,⟨93461047043205249845045329048946666158143205080124768561891,93461047043205249845045329048946666158143205080189538739676⟩⟩, + ⟨⟨-154511661065581745579215982232544746389237259268747174988853,-154511661065581745579215982232544746389237259268707413421226⟩,⟨-13117088602128516131508606280937161302601905776001284973468,-13117088602128516131508606280937161302601905775961455746104⟩⟩, + ⟨⟨-74057196420311393222816875354130175331372892327146023054791,-74057196420311393222816875354130175331372892327124651389132⟩,⟨-43480903593989675480515747220656393613834300659343900338787,-43480903593989675480515747220656393613834300659322529528815⟩⟩, + ⟨⟨-25009272655922565786469002107604218106610718317986630431113,-25009272655922565786469002107604218106610718317976744403615⟩,⟨-35330215885297703172167202269305129928759084532254533770184,-35330215885297703172167202269305129928759084532244649049031⟩⟩, + ⟨⟨-4509675162475736056435049716579889261098121632276645865206,-4509675162475736056435049716579889261098121632272269661932⟩,⟨-19116141398428826291281735759290544506202783005198432608701,-19116141398428826291281735759290544506202783005194053450701⟩⟩, + ⟨⟨713917136438324964733303814225123864788072752780892811806,713917136438324964733303814225123864788072752782972092723⟩,⟨-7913805625523583616971616656005418171008536274174200132257,-7913805625523583616971616656005418171008536274172118417558⟩⟩, + ⟨⟨893139744452705005178269568634695955372049078872159185923,893139744452705005178269568634695955372049078873031942562⟩,⟨-2704549811816868564179760601315489031849595550089264574785,-2704549811816868564179760601315489031849595550088390981119⟩⟩, + ⟨⟨366994201743614547989494406247062663250668761743905640064,366994201743614547989494406247062663250668761744230230964⟩,⟨-826794214235694364255427884465775347857662623553118563256,-826794214235694364255427884465775347857662623552793882934⟩⟩, + ⟨⟨86157140388689091438890939499721533099639714789796231406,86157140388689091438890939499721533099639714789900597971⟩,⟨-242373752305816582132846796218865466982709535606658512545,-242373752305816582132846796218865466982709535606554159685⟩⟩, + ⟨⟨2728458003112814677923200822931033138975085089207233158,2728458003112814677923200822931033138975085089233963312⟩,⟨-67165266196450140357319776664009628303749032899324995869,-67165266196450140357319776664009628303749032899298251951⟩⟩, + ⟨⟨-8615821983109523092513780617297293669830657876942639773,-8615821983109523092513780617297293669830657876938086665⟩,⟨-14559102558055680925271981063666697169286073435782154355,-14559102558055680925271981063666697169286073435777599008⟩⟩, + ⟨⟨-4354818125019340195410885528452603179437939892978568825,-4354818125019340195410885528452603179437939892977011693⟩,⟨-649232290103549095029157503451212785239314725898257817,-649232290103549095029157503451212785239314725896699636⟩⟩, + ⟨⟨-624517711739111133729970423515639645614695130316187726,-624517711739111133729970423515639645614695130315884630⟩,⟨1142788693402791033560920566944517880480625546943517921,1142788693402791033560920566944517880480625546943819145⟩⟩, + ⟨⟨418004191621969737295882151223017702356005923808050747,418004191621969737295882151223017702356005923808188303⟩,⟨251670753548192503869902313173139319561615788264830423,251670753548192503869902313173139319561615788264969094⟩⟩, + ⟨⟨85462177094881704167337638694282805124952827071457122,85462177094881704167337638694282805124952827071498828⟩,⟨-242440010793767167663742219916575298291732313735350900,-242440010793767167663742219916575298291732313735308411⟩⟩, + ⟨⟨-205663127510680590775789233518335294080647922859392459,-205663127510680590775789233518335294080647922859376378⟩,⟨-300,250⟩⟩, + ⟨⟨85462177094881704167337638694282805124952827071457122,85462177094881704167337638694282805124952827071498828⟩,⟨242440010793767167663742219916575298291732313735308411,242440010793767167663742219916575298291732313735350900⟩⟩, + ⟨⟨418004191621969737295882151223017702356005923808050747,418004191621969737295882151223017702356005923808188303⟩,⟨-251670753548192503869902313173139319561615788264969094,-251670753548192503869902313173139319561615788264830423⟩⟩, + ⟨⟨-624517711739111133729970423515639645614695130316187726,-624517711739111133729970423515639645614695130315884630⟩,⟨-1142788693402791033560920566944517880480625546943819144,-1142788693402791033560920566944517880480625546943517921⟩⟩, + ⟨⟨-4354818125019340195410885528452603179437939892978568825,-4354818125019340195410885528452603179437939892977011693⟩,⟨649232290103549095029157503451212785239314725896699636,649232290103549095029157503451212785239314725898257818⟩⟩, + ⟨⟨-8615821983109523092513780617297293669830657876942639773,-8615821983109523092513780617297293669830657876938086665⟩,⟨14559102558055680925271981063666697169286073435777599008,14559102558055680925271981063666697169286073435782154355⟩⟩, + ⟨⟨2728458003112814677923200822931033138975085089207233158,2728458003112814677923200822931033138975085089233963312⟩,⟨67165266196450140357319776664009628303749032899298251951,67165266196450140357319776664009628303749032899324995869⟩⟩, + ⟨⟨86157140388689091438890939499721533099639714789796231352,86157140388689091438890939499721533099639714789900597971⟩,⟨242373752305816582132846796218865466982709535606554159669,242373752305816582132846796218865466982709535606658512589⟩⟩, + ⟨⟨366994201743614547989494406247062663250668761743905640064,366994201743614547989494406247062663250668761744230230964⟩,⟨826794214235694364255427884465775347857662623552793882934,826794214235694364255427884465775347857662623553118563256⟩⟩, + ⟨⟨893139744452705005178269568634695955372049078872159185923,893139744452705005178269568634695955372049078873031942562⟩,⟨2704549811816868564179760601315489031849595550088390981119,2704549811816868564179760601315489031849595550089264574785⟩⟩, + ⟨⟨713917136438324964733303814225123864788072752780892811784,713917136438324964733303814225123864788072752782972092701⟩,⟨7913805625523583616971616656005418171008536274172118417545,7913805625523583616971616656005418171008536274174200132244⟩⟩, + ⟨⟨-4509675162475736056435049716579889261098121632276645865361,-4509675162475736056435049716579889261098121632272269662009⟩,⟨19116141398428826291281735759290544506202783005194053450645,19116141398428826291281735759290544506202783005198432608696⟩⟩, + ⟨⟨-25009272655922565786469002107604218106610718317986630431300,-25009272655922565786469002107604218106610718317976744403892⟩,⟨35330215885297703172167202269305129928759084532244649048915,35330215885297703172167202269305129928759084532254533769955⟩⟩, + ⟨⟨-74057196420311393222816875354130175331372892327146023054976,-74057196420311393222816875354130175331372892327124651389328⟩,⟨43480903593989675480515747220656393613834300659322529528501,43480903593989675480515747220656393613834300659343900338470⟩⟩, + ⟨⟨-154511661065581745579215982232544746389237259268747174988552,-154511661065581745579215982232544746389237259268707413421694⟩,⟨13117088602128516131508606280937161302601905775961455745131,13117088602128516131508606280937161302601905776001284971728⟩⟩, + ⟨⟨-240129261410661507874209315299882739568798390966040831729597,-240129261410661507874209315299882739568798390965976427262643⟩,⟨-93461047043205249845045329048946666158143205080189538741616,-93461047043205249845045329048946666158143205080124768562712⟩⟩] +lemma tw1_1_1_1_calc (j : Fin 31) : taylorWaveBox 1 1 1 1 j = tw1_1_1_1 j := by + revert j + decide +kernel +def tw1_1_1_2 : Fin 31 → CI := ![⟨⟨-9125741524329764252521000959522382955175598897011363423933,-9125741524329764252521000959522382955175598896956609644381⟩,⟨-241159695273011342441959944723796921079735518394205395528956,-241159695273011342441959944723796921079735518394150736435938⟩⟩, + ⟨⟨68113928248076079235572547367636231598026946051425319600873,68113928248076079235572547367636231598026946051457679623057⟩,⟨-135599929613527887569822770861677309016340201622958296522018,-135599929613527887569822770861677309016340201622925921943780⟩⟩, + ⟨⟨72160800282139580615117126327426669860157596613977029414395,72160800282139580615117126327426669860157596613998130887543⟩,⟨-50250987385350352341500301177205708549902785893067495289748,-50250987385350352341500301177205708549902785893046396737160⟩⟩, + ⟨⟨46046110815842232668029956122001677968693764188198421222301,46046110815842232668029956122001677968693764188211134672039⟩,⟨-6012069312289044810654847882070721623916870611218392567593,-6012069312289044810654847882070721623916870611205700041155⟩⟩, + ⟨⟨21024856617655364537726719945814235912941437606176941318763,21024856617655364537726719945814235912941437606183490953138⟩,⟨6809993291851256275171892795806899540669859261012691404376,6809993291851256275171892795806899540669859261019225209654⟩⟩, + ⟨⟨7188410409467905834881179364270886950572344559558984218494,7188410409467905834881179364270886950572344559561886501774⟩,⟨6034267780398677573346093915417998617763321684862981052800,6034267780398677573346093915417998617763321684865878240018⟩⟩, + ⟨⟨1920627571868259422402343286089535205151935990034424319917,1920627571868259422402343286089535205151935990035528642510⟩,⟨2965074909796300976628260980344096097130164609287741081674,2965074909796300976628260980344096097130164609288844578977⟩⟩, + ⟨⟨460433439190604342275704380079843828253001336372635267523,460433439190604342275704380079843828253001336372988321145⟩,⟨1084282513287855472520533018648980652933845285124632245873,1084282513287855472520533018648980652933845285124985273469⟩⟩, + ⟨⟨135880799295440413874276219165823761703683429336664508450,135880799295440413874276219165823761703683429336788209824⟩,⟨324014365851019463159164730969246719987443489842229360575,324014365851019463159164730969246719987443489842353056758⟩⟩, + ⟨⟨55115458011850278211415152634563893088613043037508483850,55115458011850278211415152634563893088613043037549619497⟩,⟨78742919926148270317649231249429681997720817113536575615,78742919926148270317649231249429681997720817113577729784⟩⟩, + ⟨⟨22396069784745233731414499982764373294071787710518434363,22396069784745233731414499982764373294071787710527247835⟩,⟨11641898265528449631541733875194320322472200385969007960,11641898265528449631541733875194320322472200385977833682⟩⟩, + ⟨⟨6502233644923170781157096835175131148513007408741809150,6502233644923170781157096835175131148513007408744345257⟩,⟨-2068713275989796060501218468224556464439129741945543466,-2068713275989796060501218468224556464439129741943014201⟩⟩, + ⟨⟨314486803403356659835971970721877154553516366402025792,314486803403356659835971970721877154553516366402450873⟩,⟨-2059528897230673520539957549641660606770229612844143859,-2059528897230673520539957549641660606770229612843718749⟩⟩, + ⟨⟨-762412639270789043855618370371694502346722096551766698,-762412639270789043855618370371694502346722096551538701⟩,⟨-241006204543975240322139512763794390759797175386319833,-241006204543975240322139512763794390759797175386090378⟩⟩, + ⟨⟨-93312649517187876429008423872073910593886917253909880,-93312649517187876429008423872073910593886917253835465⟩,⟨417360827000303177383972465340565184827353015506492096,417360827000303177383972465340565184827353015506567602⟩⟩, + ⟨⟨343913861175154077357313573194335050890788551163730633,343913861175154077357313573194335050890788551163758617⟩,⟨-418,501⟩⟩, + ⟨⟨-93312649517187876429008423872073910593886917253909880,-93312649517187876429008423872073910593886917253835465⟩,⟨-417360827000303177383972465340565184827353015506567602,-417360827000303177383972465340565184827353015506492096⟩⟩, + ⟨⟨-762412639270789043855618370371694502346722096551766698,-762412639270789043855618370371694502346722096551538701⟩,⟨241006204543975240322139512763794390759797175386090378,241006204543975240322139512763794390759797175386319833⟩⟩, + ⟨⟨314486803403356659835971970721877154553516366402025792,314486803403356659835971970721877154553516366402450873⟩,⟨2059528897230673520539957549641660606770229612843718749,2059528897230673520539957549641660606770229612844143859⟩⟩, + ⟨⟨6502233644923170781157096835175131148513007408741809150,6502233644923170781157096835175131148513007408744345257⟩,⟨2068713275989796060501218468224556464439129741943014201,2068713275989796060501218468224556464439129741945543466⟩⟩, + ⟨⟨22396069784745233731414499982764373294071787710518434363,22396069784745233731414499982764373294071787710527247835⟩,⟨-11641898265528449631541733875194320322472200385977833682,-11641898265528449631541733875194320322472200385969007960⟩⟩, + ⟨⟨55115458011850278211415152634563893088613043037508483850,55115458011850278211415152634563893088613043037549619497⟩,⟨-78742919926148270317649231249429681997720817113577729784,-78742919926148270317649231249429681997720817113536575615⟩⟩, + ⟨⟨135880799295440413874276219165823761703683429336664508450,135880799295440413874276219165823761703683429336788209904⟩,⟨-324014365851019463159164730969246719987443489842353056772,-324014365851019463159164730969246719987443489842229360538⟩⟩, + ⟨⟨460433439190604342275704380079843828253001336372635267523,460433439190604342275704380079843828253001336372988321145⟩,⟨-1084282513287855472520533018648980652933845285124985273469,-1084282513287855472520533018648980652933845285124632245873⟩⟩, + ⟨⟨1920627571868259422402343286089535205151935990034424319917,1920627571868259422402343286089535205151935990035528642510⟩,⟨-2965074909796300976628260980344096097130164609288844578977,-2965074909796300976628260980344096097130164609287741081674⟩⟩, + ⟨⟨7188410409467905834881179364270886950572344559558984218496,7188410409467905834881179364270886950572344559561886501776⟩,⟨-6034267780398677573346093915417998617763321684865878239989,-6034267780398677573346093915417998617763321684862981052771⟩⟩, + ⟨⟨21024856617655364537726719945814235912941437606176941318755,21024856617655364537726719945814235912941437606183490953222⟩,⟨-6809993291851256275171892795806899540669859261019225209574,-6809993291851256275171892795806899540669859261012691404197⟩⟩, + ⟨⟨46046110815842232668029956122001677968693764188198421222322,46046110815842232668029956122001677968693764188211134671924⟩,⟨6012069312289044810654847882070721623916870611205700041522,6012069312289044810654847882070721623916870611218392567840⟩⟩, + ⟨⟨72160800282139580615117126327426669860157596613977029414184,72160800282139580615117126327426669860157596613998130887330⟩,⟨50250987385350352341500301177205708549902785893046396737478,50250987385350352341500301177205708549902785893067495290055⟩⟩, + ⟨⟨68113928248076079235572547367636231598026946051425319599968,68113928248076079235572547367636231598026946051457679621558⟩,⟨135599929613527887569822770861677309016340201622925921944646,135599929613527887569822770861677309016340201622958296522290⟩⟩, + ⟨⟨-9125741524329764252521000959522382955175598897011363425784,-9125741524329764252521000959522382955175598896956609645317⟩,⟨241159695273011342441959944723796921079735518394150736435406,241159695273011342441959944723796921079735518394205395529345⟩⟩] +lemma tw1_1_1_2_calc (j : Fin 31) : taylorWaveBox 1 1 1 2 j = tw1_1_1_2 j := by + revert j + decide +kernel +def tw1_1_1_3 : Fin 31 → CI := ![⟨⟨172981357307116274307448050373622314151333795785689267474241,172981357307116274307448050373622314151333795785728080319103⟩,⟨52662474478756789149641465433801123575684143467961206694172,52662474478756789149641465433801123575684143467999855435355⟩⟩, + ⟨⟨78732915107709905781444199445986722620071486240534007116033,78732915107709905781444199445986722620071486240565416252504⟩,⟨88959263551106417415726154364542324195579889122988402075814,88959263551106417415726154364542324195579889123019728602209⟩⟩, + ⟨⟨12660386988702154671376478861483645951457794363755234003203,12660386988702154671376478861483645951457794363776635738384⟩,⟨70909479851072266193889102257009842381300596955579596885782,70909479851072266193889102257009842381300596955601002532004⟩⟩, + ⟨⟨-13902298923145320223119988331320106513389333827825343572925,-13902298923145320223119988331320106513389333827813097032654⟩,⟨37350269668612442900777528239205071825318306141946707149801,37350269668612442900777528239205071825318306141958972723551⟩⟩, + ⟨⟨-15052521816939241839999346855349224972995847146613585172532,-15052521816939241839999346855349224972995847146607746167876⟩,⟨13007483088416993554844615228938674891587384162204844812640,13007483088416993554844615228938674891587384162210692016150⟩⟩, + ⟨⟨-8561006880078088305492012850866495569578489366743884345688,-8561006880078088305492012850866495569578489366741608634405⟩,⟨2315009445427618331957268542066841566823484859378069782297,2315009445427618331957268542066841566823484859380346045233⟩⟩, + ⟨⟨-3487186888410846575082527000443995207249100527722906663186,-3487186888410846575082527000443995207249100527721857271936⟩,⟨-357819978062146388587068653678222717853504308670941889287,-357819978062146388587068653678222717853504308669893071171⟩⟩, + ⟨⟨-1152865048028122137174900660385962854953300184813744627244,-1152865048028122137174900660385962854953300184813280381692⟩,⟨-420710376716785817435479617989046109653200378059651673167,-420710376716785817435479617989046109653200378059187538304⟩⟩, + ⟨⟨-348163027929009104914595818743883023262505457694113110143,-348163027929009104914595818743883023262505457693950171924⟩,⟨-161818855713463618623714521455224697053480766114669793195,-161818855713463618623714521455224697053480766114506837090⟩⟩, + ⟨⟨-104743093000900991133072615333218999674853835976690866920,-104743093000900991133072615333218999674853835976650728973⟩,⟨-33416079143915282747581954892261382106441586630528098772,-33416079143915282747581954892261382106441586630487970889⟩⟩, + ⟨⟨-30037452066066994727166401100645605377057036943913086052,-30037452066066994727166401100645605377057036943902985089⟩,⟨2338246969512315795898617909813983855377985961859180779,2338246969512315795898617909813983855377985961869288957⟩⟩, + ⟨⟨-6108128409748629529611301360845248117633188475031244404,-6108128409748629529611301360845248117633188475027555059⟩,⟨5852737075980318961845258224678836479994268228610856543,5852737075980318961845258224678836479994268228614533886⟩⟩, + ⟨⟨522111627584430965321201951840111584777242425287455689,522111627584430965321201951840111584777242425288014178⟩,⟨2614777273812286041240360273519002279201153990421454502,2614777273812286041240360273519002279201153990422017312⟩⟩, + ⟨⟨1045702345150882884717671578344410393179497861295783350,1045702345150882884717671578344410393179497861296071328⟩,⟨73734153402584610980836476358576012850970252131559801,73734153402584610980836476358576012850970252131848805⟩⟩, + ⟨⟨57398126731902723151181258112130357528488746755759533,57398126731902723151181258112130357528488746755864349⟩,⟨-566291083331256374653164921830004579285488339562661229,-566291083331256374653164921830004579285488339562555293⟩⟩, + ⟨⟨-460079530404926861078318847846884433847267960976561328,-460079530404926861078318847846884433847267960976522428⟩,⟨-670,558⟩⟩, + ⟨⟨57398126731902723151181258112130357528488746755759533,57398126731902723151181258112130357528488746755864349⟩,⟨566291083331256374653164921830004579285488339562555293,566291083331256374653164921830004579285488339562661229⟩⟩, + ⟨⟨1045702345150882884717671578344410393179497861295783350,1045702345150882884717671578344410393179497861296071328⟩,⟨-73734153402584610980836476358576012850970252131848805,-73734153402584610980836476358576012850970252131559801⟩⟩, + ⟨⟨522111627584430965321201951840111584777242425287455689,522111627584430965321201951840111584777242425288014178⟩,⟨-2614777273812286041240360273519002279201153990422017312,-2614777273812286041240360273519002279201153990421454502⟩⟩, + ⟨⟨-6108128409748629529611301360845248117633188475031244404,-6108128409748629529611301360845248117633188475027555059⟩,⟨-5852737075980318961845258224678836479994268228614533886,-5852737075980318961845258224678836479994268228610856543⟩⟩, + ⟨⟨-30037452066066994727166401100645605377057036943913086052,-30037452066066994727166401100645605377057036943902985089⟩,⟨-2338246969512315795898617909813983855377985961869288957,-2338246969512315795898617909813983855377985961859180779⟩⟩, + ⟨⟨-104743093000900991133072615333218999674853835976690866920,-104743093000900991133072615333218999674853835976650728973⟩,⟨33416079143915282747581954892261382106441586630487970889,33416079143915282747581954892261382106441586630528098772⟩⟩, + ⟨⟨-348163027929009104914595818743883023262505457694113110212,-348163027929009104914595818743883023262505457693950171903⟩,⟨161818855713463618623714521455224697053480766114506837013,161818855713463618623714521455224697053480766114669793195⟩⟩, + ⟨⟨-1152865048028122137174900660385962854953300184813744627244,-1152865048028122137174900660385962854953300184813280381692⟩,⟨420710376716785817435479617989046109653200378059187538304,420710376716785817435479617989046109653200378059651673167⟩⟩, + ⟨⟨-3487186888410846575082527000443995207249100527722906663186,-3487186888410846575082527000443995207249100527721857271936⟩,⟨357819978062146388587068653678222717853504308669893071171,357819978062146388587068653678222717853504308670941889287⟩⟩, + ⟨⟨-8561006880078088305492012850866495569578489366743884345666,-8561006880078088305492012850866495569578489366741608634384⟩,⟨-2315009445427618331957268542066841566823484859380346045251,-2315009445427618331957268542066841566823484859378069782315⟩⟩, + ⟨⟨-15052521816939241839999346855349224972995847146613585172487,-15052521816939241839999346855349224972995847146607746167757⟩,⟨-13007483088416993554844615228938674891587384162210692016285,-13007483088416993554844615228938674891587384162204844812685⟩⟩, + ⟨⟨-13902298923145320223119988331320106513389333827825343572613,-13902298923145320223119988331320106513389333827813097032462⟩,⟨-37350269668612442900777528239205071825318306141958972723579,-37350269668612442900777528239205071825318306141946707149947⟩⟩, + ⟨⟨12660386988702154671376478861483645951457794363755234003512,12660386988702154671376478861483645951457794363776635738685⟩,⟨-70909479851072266193889102257009842381300596955601002531950,-70909479851072266193889102257009842381300596955579596885734⟩⟩, + ⟨⟨78732915107709905781444199445986722620071486240534007117079,78732915107709905781444199445986722620071486240565416252985⟩,⟨-88959263551106417415726154364542324195579889123019728601218,-88959263551106417415726154364542324195579889122988402075388⟩⟩, + ⟨⟨172981357307116274307448050373622314151333795785689267474220,172981357307116274307448050373622314151333795785728080319706⟩,⟨-52662474478756789149641465433801123575684143467999855434661,-52662474478756789149641465433801123575684143467961206692858⟩⟩] +lemma tw1_1_1_3_calc (j : Fin 31) : taylorWaveBox 1 1 1 3 j = tw1_1_1_3 j := by + revert j + decide +kernel +def tw1_1_1_4 : Fin 31 → CI := ![⟨⟨-66412034788225657858907714326051107085167562815614620403728,-66412034788225657858907714326051107085167562815584898896984⟩,⟨91301681690550434491617181631053301721762174254118900786959,91301681690550434491617181631053301721762174254148841470015⟩⟩, + ⟨⟨-72969059476787479142377375682393164642990394573308687282470,-72969059476787479142377375682393164642990394573285294292614⟩,⟨26114642904262187935582611520662945183615620725778220313668,26114642904262187935582611520662945183615620725801675426551⟩⟩, + ⟨⟨-47580890293487940719058202443833235649034447193258965682871,-47580890293487940719058202443833235649034447193243701002379⟩,⟨-12399404583742380790705712792183912172320871587582982620824,-12399404583742380790705712792183912172320871587567719646613⟩⟩, + ⟨⟨-18971986583268700493190811479077710415104884090538871082514,-18971986583268700493190811479077710415104884090530806236517⟩,⟨-21271834630501142996399839687785873881886345896311086456865,-21271834630501142996399839687785873881886345896303025396398⟩⟩, + ⟨⟨-2491440304148218640052407072139888176705320188256545217308,-2491440304148218640052407072139888176705320188252506920889⟩,⟨-14713965418200794230859988837482363144891397477588478757064,-14713965418200794230859988837482363144891397477584437001559⟩⟩, + ⟨⟨2356948623848044085233468849279034521236859920207662075192,2356948623848044085233468849279034521236859920209941711702⟩,⟨-6573610775147487478960662073295831163674578590840484796739,-6573610775147487478960662073295831163674578590838201186522⟩⟩, + ⟨⟨2037140184682526432277367545313484696065782337073052407397,2037140184682526432277367545313484696065782337074088551842⟩,⟨-2062154794697842314210874078347321153610661947390432868289,-2062154794697842314210874078347321153610661947389395774479⟩⟩, + ⟨⟨950196396379564239213290314934000611254806046091160994834,950196396379564239213290314934000611254806046091528669661⟩,⟨-481960771733658482885739029249982377543462904885752160760,-481960771733658482885739029249982377543462904885384452161⟩⟩, + ⟨⟨333623583355539001614161155449507707091356316644974921823,333623583355539001614161155449507707091356316645117344461⟩,⟨-104502838018125425003162609830636735931783024458434038177,-104502838018125425003162609830636735931783024458291607804⟩⟩, + ⟨⟨98716523343647536432874292360319885817813230048469269381,98716523343647536432874292360319885817813230048518962549⟩,⟨-35193783266004084663326126969712607092326239187353387079,-35193783266004084663326126969712607092326239187303723058⟩⟩, + ⟨⟨24130856084275898778091859149283861010258620300683658673,24130856084275898778091859149283861010258620300693499789⟩,⟨-17770406929757498115725525042258578344998061803249740238,-17770406929757498115725525042258578344998061803239905721⟩⟩, + ⟨⟨3002887726684231878079545788971309645836994594023676963,3002887726684231878079545788971309645836994594027345653⟩,⟨-8207949025252173573190930758006331191352808812994539251,-8207949025252173573190930758006331191352808812990876935⟩⟩, + ⟨⟨-1475960589549652839379851604488805134313764051214694495,-1475960589549652839379851604488805134313764051213979017⟩,⟨-2430756330875818140030483423673658742513885432711196923,-2430756330875818140030483423673658742513885432710474503⟩⟩, + ⟨⟨-1129667774662444605916763931458407187924444592170796227,-1129667774662444605916763931458407187924444592170508093⟩,⟨188546604307603347741927505764283758378146379924793516,188546604307603347741927505764283758378146379925081508⟩⟩, + ⟨⟨11321322231072104238094155475638568271657384685034090,11321322231072104238094155475638568271657384685155689⟩,⟨631195116569608272518443570136452389103313980889575280,631195116569608272518443570136452389103313980889697704⟩⟩, + ⟨⟨512902595178752340311786507790609902221712581669131978,512902595178752340311786507790609902221712581669176977⟩,⟨-622,747⟩⟩, + ⟨⟨11321322231072104238094155475638568271657384685034090,11321322231072104238094155475638568271657384685155689⟩,⟨-631195116569608272518443570136452389103313980889697704,-631195116569608272518443570136452389103313980889575280⟩⟩, + ⟨⟨-1129667774662444605916763931458407187924444592170796227,-1129667774662444605916763931458407187924444592170508093⟩,⟨-188546604307603347741927505764283758378146379925081508,-188546604307603347741927505764283758378146379924793516⟩⟩, + ⟨⟨-1475960589549652839379851604488805134313764051214694495,-1475960589549652839379851604488805134313764051213979017⟩,⟨2430756330875818140030483423673658742513885432710474503,2430756330875818140030483423673658742513885432711196923⟩⟩, + ⟨⟨3002887726684231878079545788971309645836994594023676963,3002887726684231878079545788971309645836994594027345653⟩,⟨8207949025252173573190930758006331191352808812990876935,8207949025252173573190930758006331191352808812994539251⟩⟩, + ⟨⟨24130856084275898778091859149283861010258620300683658673,24130856084275898778091859149283861010258620300693499789⟩,⟨17770406929757498115725525042258578344998061803239905721,17770406929757498115725525042258578344998061803249740238⟩⟩, + ⟨⟨98716523343647536432874292360319885817813230048469269381,98716523343647536432874292360319885817813230048518962549⟩,⟨35193783266004084663326126969712607092326239187303723058,35193783266004084663326126969712607092326239187353387079⟩⟩, + ⟨⟨333623583355539001614161155449507707091356316644974921788,333623583355539001614161155449507707091356316645117344481⟩,⟨104502838018125425003162609830636735931783024458291607804,104502838018125425003162609830636735931783024458434038259⟩⟩, + ⟨⟨950196396379564239213290314934000611254806046091160994834,950196396379564239213290314934000611254806046091528669661⟩,⟨481960771733658482885739029249982377543462904885384452161,481960771733658482885739029249982377543462904885752160760⟩⟩, + ⟨⟨2037140184682526432277367545313484696065782337073052407397,2037140184682526432277367545313484696065782337074088551842⟩,⟨2062154794697842314210874078347321153610661947389395774479,2062154794697842314210874078347321153610661947390432868289⟩⟩, + ⟨⟨2356948623848044085233468849279034521236859920207662075171,2356948623848044085233468849279034521236859920209941711681⟩,⟨6573610775147487478960662073295831163674578590838201186516,6573610775147487478960662073295831163674578590840484796733⟩⟩, + ⟨⟨-2491440304148218640052407072139888176705320188256545217428,-2491440304148218640052407072139888176705320188252506920948⟩,⟨14713965418200794230859988837482363144891397477584437001520,14713965418200794230859988837482363144891397477588478757067⟩⟩, + ⟨⟨-18971986583268700493190811479077710415104884090538871082620,-18971986583268700493190811479077710415104884090530806236689⟩,⟨21271834630501142996399839687785873881886345896303025396307,21271834630501142996399839687785873881886345896311086456695⟩⟩, + ⟨⟨-47580890293487940719058202443833235649034447193258965682923,-47580890293487940719058202443833235649034447193243701002437⟩,⟨12399404583742380790705712792183912172320871587567719646411,12399404583742380790705712792183912172320871587582982620618⟩⟩, + ⟨⟨-72969059476787479142377375682393164642990394573308687282022,-72969059476787479142377375682393164642990394573285294292574⟩,⟨-26114642904262187935582611520662945183615620725801675426981,-26114642904262187935582611520662945183615620725778220314506⟩⟩, + ⟨⟨-66412034788225657858907714326051107085167562815614620403431,-66412034788225657858907714326051107085167562815584898896216⟩,⟨-91301681690550434491617181631053301721762174254148841470628,-91301681690550434491617181631053301721762174254118900787100⟩⟩] +lemma tw1_1_1_4_calc (j : Fin 31) : taylorWaveBox 1 1 1 4 j = tw1_1_1_4 j := by + revert j + decide +kernel +def tw1_1_1_5 : Fin 31 → CI := ![⟨⟨-34543500462714468713086775919655667366170465006237826069788,-34543500462714468713086775919655667366170465006220119637979⟩,⟨-49574575947451138831339749546435976936987181255343631276471,-49574575947451138831339749546435976936987181255326042471634⟩⟩, + ⟨⟨1608510075613753898166008049534788671159308887668049380906,1608510075613753898166008049534788671159308887681390164209⟩,⟨-43308033867391317312100446716033353042898592247157755940335,-43308033867391317312100446716033353042898592247144437264121⟩⟩, + ⟨⟨18235952305360067447809557224946712463632314205488339540617,18235952305360067447809557224946712463632314205496418934276⟩,⟨-22251821925807781353030772703678980142549317673836419790918,-22251821925807781353030772703678980142549317673828340578788⟩⟩, + ⟨⟨16963265708054719449651124390774567508089230593671254747092,16963265708054719449651124390774567508089230593676668640366⟩,⟨-4189951359817452289909974535325734284720050942975735433820,-4189951359817452289909974535325734284720050942970327539795⟩⟩, + ⟨⟨8920977466954676199532592404051636755708626852372961454195,8920977466954676199532592404051636755708626852376312416839⟩,⟨3533993947919735626339448677565309908925553894007299447045,3533993947919735626339448677565309908925553894010643758265⟩⟩, + ⟨⟨2731597579568315893400072766189210044837508636309962877608,2731597579568315893400072766189210044837508636311588916049⟩,⟨3841164897865945377693080111314129102895926295397795866895,3841164897865945377693080111314129102895926295399420054424⟩⟩, + ⟨⟨234638382740832101155674545221682475803217254840892108177,234638382740832101155674545221682475803217254841507709446⟩,⟨2041066922968861812711022409635506764563026615707056395920,2041066922968861812711022409635506764563026615707672049394⟩⟩, + ⟨⟨-220681275521907106656550605907068342037070221034888831436,-220681275521907106656550605907068342037070221034556958972⟩,⟨761505184768891994101241578885171649244641095688770104371,761505184768891994101241578885171649244641095689102041150⟩⟩, + ⟨⟨-137619621543702395062558255289310404044383291629620577623,-137619621543702395062558255289310404044383291629493592523⟩,⟨235629139714279849364396305225405569318452035140912354650,235629139714279849364396305225405569318452035141039328975⟩⟩, + ⟨⟨-46715007925595451607160395837864631886368392623689115188,-46715007925595451607160395837864631886368392623653029168⟩,⟨71764325503212552244592183272959438616258467731666277915,71764325503212552244592183272959438616258467731702360767⟩⟩, + ⟨⟨-9452918084659101002754560257818387927964860991842891034,-9452918084659101002754560257818387927964860991832494532⟩,⟨23737312889744068170276652957436165743267387058381901310,23737312889744068170276652957436165743267387058392286164⟩⟩, + ⟨⟨813463519306448411715850827351731156638155503692038081,813463519306448411715850827351731156638155503694812445⟩,⟨7696945243389073436993358059426584070779091168547252933,7696945243389073436993358059426584070779091168550030935⟩⟩, + ⟨⟨2027165855724283891253472664783172855069020576394588513,2027165855724283891253472664783172855069020576395291770⟩,⟨1627538136405166467110907421260287981823239384298152379,1627538136405166467110907421260287981823239384298860921⟩⟩, + ⟨⟨987366368169743257435520373942110039287587160543092719,987366368169743257435520373942110039287587160543358990⟩,⟨-418796945681231381399998137578111170483864827219013719,-418796945681231381399998137578111170483864827218748907⟩⟩, + ⟨⟨-81893552586141665547638506977273278581788171301431462,-81893552586141665547638506977273278581788171301311797⟩,⟨-594537970935019373083700429975232979868180602978254273,-594537970935019373083700429975232979868180602978134258⟩⟩, + ⟨⟨-490106082142982912611937806425304453547108840470629354,-490106082142982912611937806425304453547108840470584795⟩,⟨-714,595⟩⟩, + ⟨⟨-81893552586141665547638506977273278581788171301431462,-81893552586141665547638506977273278581788171301311797⟩,⟨594537970935019373083700429975232979868180602978134258,594537970935019373083700429975232979868180602978254273⟩⟩, + ⟨⟨987366368169743257435520373942110039287587160543092719,987366368169743257435520373942110039287587160543358990⟩,⟨418796945681231381399998137578111170483864827218748907,418796945681231381399998137578111170483864827219013719⟩⟩, + ⟨⟨2027165855724283891253472664783172855069020576394588513,2027165855724283891253472664783172855069020576395291770⟩,⟨-1627538136405166467110907421260287981823239384298860921,-1627538136405166467110907421260287981823239384298152379⟩⟩, + ⟨⟨813463519306448411715850827351731156638155503692038081,813463519306448411715850827351731156638155503694812445⟩,⟨-7696945243389073436993358059426584070779091168550030935,-7696945243389073436993358059426584070779091168547252933⟩⟩, + ⟨⟨-9452918084659101002754560257818387927964860991842891034,-9452918084659101002754560257818387927964860991832494532⟩,⟨-23737312889744068170276652957436165743267387058392286164,-23737312889744068170276652957436165743267387058381901310⟩⟩, + ⟨⟨-46715007925595451607160395837864631886368392623689115188,-46715007925595451607160395837864631886368392623653029168⟩,⟨-71764325503212552244592183272959438616258467731702360767,-71764325503212552244592183272959438616258467731666277915⟩⟩, + ⟨⟨-137619621543702395062558255289310404044383291629620577623,-137619621543702395062558255289310404044383291629493592472⟩,⟨-235629139714279849364396305225405569318452035141039329027,-235629139714279849364396305225405569318452035140912354637⟩⟩, + ⟨⟨-220681275521907106656550605907068342037070221034888831436,-220681275521907106656550605907068342037070221034556958972⟩,⟨-761505184768891994101241578885171649244641095689102041150,-761505184768891994101241578885171649244641095688770104371⟩⟩, + ⟨⟨234638382740832101155674545221682475803217254840892108177,234638382740832101155674545221682475803217254841507709446⟩,⟨-2041066922968861812711022409635506764563026615707672049394,-2041066922968861812711022409635506764563026615707056395920⟩⟩, + ⟨⟨2731597579568315893400072766189210044837508636309962877613,2731597579568315893400072766189210044837508636311588916054⟩,⟨-3841164897865945377693080111314129102895926295399420054410,-3841164897865945377693080111314129102895926295397795866881⟩⟩, + ⟨⟨8920977466954676199532592404051636755708626852372961454195,8920977466954676199532592404051636755708626852376312416880⟩,⟨-3533993947919735626339448677565309908925553894010643758232,-3533993947919735626339448677565309908925553894007299446968⟩⟩, + ⟨⟨16963265708054719449651124390774567508089230593671254747086,16963265708054719449651124390774567508089230593676668640311⟩,⟨4189951359817452289909974535325734284720050942970327539928,4189951359817452289909974535325734284720050942975735433912⟩⟩, + ⟨⟨18235952305360067447809557224946712463632314205488339540523,18235952305360067447809557224946712463632314205496418934181⟩,⟨22251821925807781353030772703678980142549317673828340578869,22251821925807781353030772703678980142549317673836419790995⟩⟩, + ⟨⟨1608510075613753898166008049534788671159308887668049380635,1608510075613753898166008049534788671159308887681390163721⟩,⟨43308033867391317312100446716033353042898592247144437264235,43308033867391317312100446716033353042898592247157755940231⟩⟩, + ⟨⟨-34543500462714468713086775919655667366170465006237826070206,-34543500462714468713086775919655667366170465006220119638128⟩,⟨49574575947451138831339749546435976936987181255326042471296,49574575947451138831339749546435976936987181255343631276402⟩⟩] +lemma tw1_1_1_5_calc (j : Fin 31) : taylorWaveBox 1 1 1 5 j = tw1_1_1_5 j := by + revert j + decide +kernel +def tw1_1_1_6 : Fin 31 → CI := ![⟨⟨27230142877806964437798274176317581011274808733888623525777,27230142877806964437798274176317581011274808733896996835146⟩,⟨-7689586560253840548724195851259290762636397946439755626258,-7689586560253840548724195851259290762636397946431347383757⟩⟩, + ⟨⟨19379723794773612943378193275611824100408110976475659607268,19379723794773612943378193275611824100408110976481648488475⟩,⟨8606415327818272043708925741473610513761576772042328914750,8606415327818272043708925741473610513761576772048317544192⟩⟩, + ⟨⟨6441851915911225320394376947636019325741715565160092393528,6441851915911225320394376947636019325741715565165019218119⟩,⟨13245767445602234212344626953388896301297574993356751032896,13245767445602234212344626953388896301297574993361678547061⟩⟩, + ⟨⟨-2264288974611775221004536699080213528525739738789239080508,-2264288974611775221004536699080213528525739738785723237779⟩,⟨9094845273688542727980105471433059824200737383613481667345,9094845273688542727980105471433059824200737383617002275131⟩⟩, + ⟨⟨-4301872006699209908023224584112228308103757854137360165494,-4301872006699209908023224584112228308103757854135439658711⟩,⟨3261529190770862758621714790141666610282972780146798152420,3261529190770862758621714790141666610282972780148720494575⟩⟩, + ⟨⟨-2783498084037205028859404099144248457096832098295725173142,-2783498084037205028859404099144248457096832098294787768337⟩,⟨27268856246492830568939278254998851894732048943572717830,27268856246492830568939278254998851894732048944509554669⟩⟩, + ⟨⟨-1077778920064254245871673153858324058376768179300747109876,-1077778920064254245871673153858324058376768179300216178528⟩,⟨-679604601966008266323118104677161629817220794021156130609,-679604601966008266323118104677161629817220794020625716683⟩⟩, + ⟨⟨-264195783578221012754903219427891667825331789235570969522,-264195783578221012754903219427891667825331789235353569369⟩,⟨-443507671106396695231980787938217485142685917163783213899,-443507671106396695231980787938217485142685917163565834992⟩⟩, + ⟨⟨-38852245581939654156932997664411876482477235936977322209,-38852245581939654156932997664411876482477235936884928244⟩,⟨-182264566315582080034774633218445428150530074116752674970,-182264566315582080034774633218445428150530074116660286463⟩⟩, + ⟨⟨-4540977853191292139796503050398722056636195627402043022,-4540977853191292139796503050398722056636195627370062009⟩,⟨-61049946826551527028666798263240001768896413142162675382,-61049946826551527028666798263240001768896413142130678969⟩⟩, + ⟨⟨-3376519300662560609741057063969818141532284302532592296,-3376519300662560609741057063969818141532284302525050784⟩,⟨-18759349043281811439291293753060306933919577735675355353,-18759349043281811439291293753060306933919577735667816875⟩⟩, + ⟨⟨-3192381461378205587985343508028146214204611116122301949,-3192381461378205587985343508028146214204611116119491139⟩,⟨-5077056953838618497746623773289564036596304135979009768,-5077056953838618497746623773289564036596304135976189885⟩⟩, + ⟨⟨-1968682842013020968569890644658103190625627684496517156,-1968682842013020968569890644658103190625627684495964827⟩,⟨-669644412293402350926435298091656528362508900139963766,-669644412293402350926435298091656528362508900139409731⟩⟩, + ⟨⟨-706498677514217418933174227515014335142721531334007930,-706498677514217418933174227515014335142721531333748522⟩,⟨522655970499432724527072019002667380355138484772147454,522655970499432724527072019002667380355138484772404783⟩⟩, + ⟨⟨126327822187185310756355609274356614063195404800029946,126327822187185310756355609274356614063195404800132029⟩,⟨482977338213323183147305492457302292694757937251207915,482977338213323183147305492457302292694757937251309906⟩⟩, + ⟨⟨409782436782371329857372161556845953182185690941659741,409782436782371329857372161556845953182185690941698302⟩,⟨-497,597⟩⟩, + ⟨⟨126327822187185310756355609274356614063195404800029946,126327822187185310756355609274356614063195404800132029⟩,⟨-482977338213323183147305492457302292694757937251309906,-482977338213323183147305492457302292694757937251207915⟩⟩, + ⟨⟨-706498677514217418933174227515014335142721531334007930,-706498677514217418933174227515014335142721531333748522⟩,⟨-522655970499432724527072019002667380355138484772404783,-522655970499432724527072019002667380355138484772147454⟩⟩, + ⟨⟨-1968682842013020968569890644658103190625627684496517156,-1968682842013020968569890644658103190625627684495964827⟩,⟨669644412293402350926435298091656528362508900139409731,669644412293402350926435298091656528362508900139963766⟩⟩, + ⟨⟨-3192381461378205587985343508028146214204611116122301949,-3192381461378205587985343508028146214204611116119491139⟩,⟨5077056953838618497746623773289564036596304135976189885,5077056953838618497746623773289564036596304135979009768⟩⟩, + ⟨⟨-3376519300662560609741057063969818141532284302532592296,-3376519300662560609741057063969818141532284302525050784⟩,⟨18759349043281811439291293753060306933919577735667816875,18759349043281811439291293753060306933919577735675355353⟩⟩, + ⟨⟨-4540977853191292139796503050398722056636195627402043022,-4540977853191292139796503050398722056636195627370062009⟩,⟨61049946826551527028666798263240001768896413142130678969,61049946826551527028666798263240001768896413142162675382⟩⟩, + ⟨⟨-38852245581939654156932997664411876482477235936977322253,-38852245581939654156932997664411876482477235936884928244⟩,⟨182264566315582080034774633218445428150530074116660286445,182264566315582080034774633218445428150530074116752674984⟩⟩, + ⟨⟨-264195783578221012754903219427891667825331789235570969522,-264195783578221012754903219427891667825331789235353569369⟩,⟨443507671106396695231980787938217485142685917163565834992,443507671106396695231980787938217485142685917163783213899⟩⟩, + ⟨⟨-1077778920064254245871673153858324058376768179300747109876,-1077778920064254245871673153858324058376768179300216178528⟩,⟨679604601966008266323118104677161629817220794020625716683,679604601966008266323118104677161629817220794021156130609⟩⟩, + ⟨⟨-2783498084037205028859404099144248457096832098295725173137,-2783498084037205028859404099144248457096832098294787768332⟩,⟨-27268856246492830568939278254998851894732048944509554676,-27268856246492830568939278254998851894732048943572717837⟩⟩, + ⟨⟨-4301872006699209908023224584112228308103757854137360165483,-4301872006699209908023224584112228308103757854135439658681⟩,⟨-3261529190770862758621714790141666610282972780148720494613,-3261529190770862758621714790141666610282972780146798152433⟩⟩, + ⟨⟨-2264288974611775221004536699080213528525739738789239080433,-2264288974611775221004536699080213528525739738785723237732⟩,⟨-9094845273688542727980105471433059824200737383617002275131,-9094845273688542727980105471433059824200737383613481667372⟩⟩, + ⟨⟨6441851915911225320394376947636019325741715565160092393586,6441851915911225320394376947636019325741715565165019218176⟩,⟨-13245767445602234212344626953388896301297574993361678547033,-13245767445602234212344626953388896301297574993356751032869⟩⟩, + ⟨⟨19379723794773612943378193275611824100408110976475659607383,19379723794773612943378193275611824100408110976481648488504⟩,⟨-8606415327818272043708925741473610513761576772048317543977,-8606415327818272043708925741473610513761576772042328914622⟩⟩, + ⟨⟨27230142877806964437798274176317581011274808733888623525670,27230142877806964437798274176317581011274808733896996835160⟩,⟨7689586560253840548724195851259290762636397946431347383854,7689586560253840548724195851259290762636397946439755626475⟩⟩] +lemma tw1_1_1_6_calc (j : Fin 31) : taylorWaveBox 1 1 1 6 j = tw1_1_1_6 j := by + revert j + decide +kernel +def tw1_1_1_7 : Fin 31 → CI := ![⟨⟨-684178312677070944424228159163251960875401086631342405746,-684178312677070944424228159163251960875401086628049434326⟩,⟨11758048225367129110605331152905187287802722485752318434539,11758048225367129110605331152905187287802722485755610514636⟩⟩, + ⟨⟨-6607706485560653273190040691305062750743045717181141584626,-6607706485560653273190040691305062750743045717178028381976⟩,⟨6433714011332234420264600706478351444965632967294472186330,6433714011332234420264600706478351444965632967297591061506⟩⟩, + ⟨⟨-6701496202957358680415286157743323499262892707978984880638,-6701496202957358680415286157743323499262892707976310605237⟩,⟨141063571472213361388197346534048785360890347774679771330,141063571472213361388197346534048785360890347777353706848⟩⟩, + ⟨⟨-3329521364641419857051102250106706487171121285933411895730,-3329521364641419857051102250106706487171121285931674614468⟩,⟨-2980613959990425370469852452164299510566487507197673030363,-2980613959990425370469852452164299510566487507195936775342⟩⟩, + ⟨⟨-279717370998272056415123169230328061721046165475941860607,-279717370998272056415123169230328061721046165474927170118⟩,⟨-2685234180141242078334595098766651914627936069740794393944,-2685234180141242078334595098766651914627936069739778854637⟩⟩, + ⟨⟨823380066239918790267463568951354418594946777934385103696,823380066239918790267463568951354418594946777935021337053⟩,⟨-1207233803407377371440500601218388859182892465254946241973,-1207233803407377371440500601218388859182892465254309139653⟩⟩, + ⟨⟨664233150153379151581083277358856276709434152972337086311,664233150153379151581083277358856276709434152972626068191⟩,⟨-228381022359082293820665216545801367146817536700607719992,-228381022359082293820665216545801367146817536700318659073⟩⟩, + ⟨⟨291954626593911372817467223034390418062026572483031760252,291954626593911372817467223034390418062026572483181929521⟩,⟨63519938660605573690444975477186496599211163575005006065,63519938660605573690444975477186496599211163575155153919⟩⟩, + ⟨⟨91935120204737223710841742887355202433982397621474465352,91935120204737223710841742887355202433982397621537130363⟩,⟨65931438468079256830882141263015764929378265818429883284,65931438468079256830882141263015764929378265818492551919⟩⟩, + ⟨⟨25813912257700118886357771855674674357706639056813962307,25813912257700118886357771855674674357706639056835983522⟩,⟨29105656370648719074114298422579375911148065870282667823,29105656370648719074114298422579375911148065870304694950⟩⟩, + ⟨⟨8477356865688961451177549692304946172965711660437042211,8477356865688961451177549692304946172965711660442711840⟩,⟨9375190680645386725435338243260561645362300195821617018,9375190680645386725435338243260561645362300195827290528⟩⟩, + ⟨⟨3514095949327973873687984337932110397572060615610890482,3514095949327973873687984337932110397572060615612983442⟩,⟨2171264895177199844119917842085662853688447191525102277,2171264895177199844119917842085662853688447191527200098⟩⟩, + ⟨⟨1478206898281773444128906628082644481547849827571682655,1478206898281773444128906628082644481547849827572037103⟩,⟨-30664786217915122970353889826594692699819049008835872,-30664786217915122970353889826594692699819049008482644⟩⟩, + ⟨⟨411417626352784522686522466226690988576012611424611169,411417626352784522686522466226690988576012611424822980⟩,⟨-490349115009593493246774975676225514638485029471537167,-490349115009593493246774975676225514638485029471327076⟩⟩, + ⟨⟨-135125530168621820640372864792067523595294007319062369,-135125530168621820640372864792067523595294007318985612⟩,⟨-343508629446459259489570885736617083946932285066741802,-343508629446459259489570885736617083946932285066665407⟩⟩, + ⟨⟨-304553830942182589956089087094298429821092415263506896,-304553830942182589956089087094298429821092415263477267⟩,⟨-444,370⟩⟩, + ⟨⟨-135125530168621820640372864792067523595294007319062369,-135125530168621820640372864792067523595294007318985612⟩,⟨343508629446459259489570885736617083946932285066665407,343508629446459259489570885736617083946932285066741802⟩⟩, + ⟨⟨411417626352784522686522466226690988576012611424611169,411417626352784522686522466226690988576012611424822980⟩,⟨490349115009593493246774975676225514638485029471327076,490349115009593493246774975676225514638485029471537167⟩⟩, + ⟨⟨1478206898281773444128906628082644481547849827571682655,1478206898281773444128906628082644481547849827572037103⟩,⟨30664786217915122970353889826594692699819049008482644,30664786217915122970353889826594692699819049008835872⟩⟩, + ⟨⟨3514095949327973873687984337932110397572060615610890482,3514095949327973873687984337932110397572060615612983442⟩,⟨-2171264895177199844119917842085662853688447191527200098,-2171264895177199844119917842085662853688447191525102277⟩⟩, + ⟨⟨8477356865688961451177549692304946172965711660437042211,8477356865688961451177549692304946172965711660442711840⟩,⟨-9375190680645386725435338243260561645362300195827290528,-9375190680645386725435338243260561645362300195821617018⟩⟩, + ⟨⟨25813912257700118886357771855674674357706639056813962307,25813912257700118886357771855674674357706639056835983522⟩,⟨-29105656370648719074114298422579375911148065870304694950,-29105656370648719074114298422579375911148065870282667823⟩⟩, + ⟨⟨91935120204737223710841742887355202433982397621474465348,91935120204737223710841742887355202433982397621537130385⟩,⟨-65931438468079256830882141263015764929378265818492551919,-65931438468079256830882141263015764929378265818429883264⟩⟩, + ⟨⟨291954626593911372817467223034390418062026572483031760252,291954626593911372817467223034390418062026572483181929521⟩,⟨-63519938660605573690444975477186496599211163575155153919,-63519938660605573690444975477186496599211163575005006065⟩⟩, + ⟨⟨664233150153379151581083277358856276709434152972337086311,664233150153379151581083277358856276709434152972626068191⟩,⟨228381022359082293820665216545801367146817536700318659073,228381022359082293820665216545801367146817536700607719992⟩⟩, + ⟨⟨823380066239918790267463568951354418594946777934385103692,823380066239918790267463568951354418594946777935021337049⟩,⟨1207233803407377371440500601218388859182892465254309139653,1207233803407377371440500601218388859182892465254946241973⟩⟩, + ⟨⟨-279717370998272056415123169230328061721046165475941860629,-279717370998272056415123169230328061721046165474927170129⟩,⟨2685234180141242078334595098766651914627936069739778854631,2685234180141242078334595098766651914627936069740794393946⟩⟩, + ⟨⟨-3329521364641419857051102250106706487171121285933411895744,-3329521364641419857051102250106706487171121285931674614493⟩,⟨2980613959990425370469852452164299510566487507195936775326,2980613959990425370469852452164299510566487507197673030334⟩⟩, + ⟨⟨-6701496202957358680415286157743323499262892707978984880637,-6701496202957358680415286157743323499262892707976310605237⟩,⟨-141063571472213361388197346534048785360890347777353706877,-141063571472213361388197346534048785360890347774679771359⟩⟩, + ⟨⟨-6607706485560653273190040691305062750743045717181141584547,-6607706485560653273190040691305062750743045717178028381939⟩,⟨-6433714011332234420264600706478351444965632967297591061542,-6433714011332234420264600706478351444965632967294472186408⟩⟩, + ⟨⟨-684178312677070944424228159163251960875401086631342405699,-684178312677070944424228159163251960875401086628049434237⟩,⟨-11758048225367129110605331152905187287802722485755610514661,-11758048225367129110605331152905187287802722485752318434521⟩⟩] +lemma tw1_1_1_7_calc (j : Fin 31) : taylorWaveBox 1 1 1 7 j = tw1_1_1_7 j := by + revert j + decide +kernel +def tw1_1_1_8 : Fin 31 → CI := ![⟨⟨-4078554157685919020139664043854679811640507618829775852124,-4078554157685919020139664043854679811640507618828395814237⟩,⟨-1683526903009561432650584158177803154540676677198285693857,-1683526903009561432650584158177803154540676677196911254742⟩⟩, + ⟨⟨-1376646368711758129227377276395639525923328243759062060804,-1376646368711758129227377276395639525923328243757601067928⟩,⟨-3337187831688066095170102646101674674733965877550948835470,-3337187831688066095170102646101674674733965877549490721356⟩⟩, + ⟨⟨1095743056745222565772194180371089244729096515712539108305,1095743056745222565772194180371089244729096515713708998847⟩,⟨-2517220901834523238811040322602543325775437859383425049548,-2517220901834523238811040322602543325775437859382255100033⟩⟩, + ⟨⟨1798393554187226524356886093963992444952284044279659837836,1798393554187226524356886093963992444952284044280457739825⟩,⟨-665604544089883375880384730291498501032414196578081968643,-665604544089883375880384730291498501032414196577284514420⟩⟩, + ⟨⟨1098809573596671796350264790312337143750048132486284254156,1098809573596671796350264790312337143750048132486868842158⟩,⟨518799149351173082502188294424066196462828199224136276408,518799149351173082502188294424066196462828199224720052658⟩⟩, + ⟨⟨245704819538756576231588988791846664652150932106452883536,245704819538756576231588988791846664652150932106762964500⟩,⟨645203295785351749611516948173585833426887357501091844227,645203295785351749611516948173585833426887357501401809748⟩⟩, + ⟨⟨-118145754273014005077516818259973548699564012417570280345,-118145754273014005077516818259973548699564012417390148389⟩,⟨327849463724805801769112084832815481812995738301343271221,327849463724805801769112084832815481812995738301523511106⟩⟩, + ⟨⟨-128003575609926834514916722862776233998718448236602695507,-128003575609926834514916722862776233998718448236515630195⟩,⟨88531601239047486389710764618580219123406061230695117709,88531601239047486389710764618580219123406061230782190869⟩⟩, + ⟨⟨-61392386680882849893685987997607405214443691503974826411,-61392386680882849893685987997607405214443691503934471887⟩,⟨7183889419714508932578761959659430683173217323928548861,7183889419714508932578761959659430683173217323968905622⟩⟩, + ⟨⟨-21833253821457476519054177122696758216304798672102060728,-21833253821457476519054177122696758216304798672088575716⟩,⟨-4289067979969161374834899887618949367267052560723727478,-4289067979969161374834899887618949367267052560710245609⟩⟩, + ⟨⟨-7252600858150758527660853685882290617686591090313105690,-7252600858150758527660853685882290617686591090308966500⟩,⟨-2074395303960654670464776432400561491314205510677410137,-2074395303960654670464776432400561491314205510673267762⟩⟩, + ⟨⟨-2548488894205401977582368021034127264046392694745221061,-2548488894205401977582368021034127264046392694744011988⟩,⟨-249104456664480747721353057444255870910072423972678504,-249104456664480747721353057444255870910072423971469147⟩⟩, + ⟨⟨-882322093751844707493626900594982389305238509809698380,-882322093751844707493626900594982389305238509809406313⟩,⟨341565468501439382940992557577604988856568444643909124,341565468501439382940992557577604988856568444644198973⟩⟩, + ⟨⟨-187144063845307741292024458975399698102998642236289365,-187144063845307741292024458975399698102998642236140551⟩,⟨375537747342729607064383268470709229971535364423601750,375537747342729607064383268470709229971535364423749537⟩⟩, + ⟨⟨116412492509340204162432396827144041991977926780144262,116412492509340204162432396827144041991977926780195811⟩,⟨216307207458860083622750036183761743489889913270083587,216307207458860083622750036183761743489889913270134695⟩⟩, + ⟨⟨203712323551185338525989716797858490961613709772586109,203712323551185338525989716797858490961613709772606576⟩,⟨-248,297⟩⟩, + ⟨⟨116412492509340204162432396827144041991977926780144262,116412492509340204162432396827144041991977926780195811⟩,⟨-216307207458860083622750036183761743489889913270134695,-216307207458860083622750036183761743489889913270083587⟩⟩, + ⟨⟨-187144063845307741292024458975399698102998642236289365,-187144063845307741292024458975399698102998642236140551⟩,⟨-375537747342729607064383268470709229971535364423749537,-375537747342729607064383268470709229971535364423601750⟩⟩, + ⟨⟨-882322093751844707493626900594982389305238509809698380,-882322093751844707493626900594982389305238509809406313⟩,⟨-341565468501439382940992557577604988856568444644198973,-341565468501439382940992557577604988856568444643909124⟩⟩, + ⟨⟨-2548488894205401977582368021034127264046392694745221061,-2548488894205401977582368021034127264046392694744011988⟩,⟨249104456664480747721353057444255870910072423971469147,249104456664480747721353057444255870910072423972678504⟩⟩, + ⟨⟨-7252600858150758527660853685882290617686591090313105690,-7252600858150758527660853685882290617686591090308966500⟩,⟨2074395303960654670464776432400561491314205510673267762,2074395303960654670464776432400561491314205510677410137⟩⟩, + ⟨⟨-21833253821457476519054177122696758216304798672102060728,-21833253821457476519054177122696758216304798672088575716⟩,⟨4289067979969161374834899887618949367267052560710245609,4289067979969161374834899887618949367267052560723727478⟩⟩, + ⟨⟨-61392386680882849893685987997607405214443691503974826417,-61392386680882849893685987997607405214443691503934471881⟩,⟨-7183889419714508932578761959659430683173217323968905636,-7183889419714508932578761959659430683173217323928548861⟩⟩, + ⟨⟨-128003575609926834514916722862776233998718448236602695507,-128003575609926834514916722862776233998718448236515630195⟩,⟨-88531601239047486389710764618580219123406061230782190869,-88531601239047486389710764618580219123406061230695117709⟩⟩, + ⟨⟨-118145754273014005077516818259973548699564012417570280345,-118145754273014005077516818259973548699564012417390148389⟩,⟨-327849463724805801769112084832815481812995738301523511106,-327849463724805801769112084832815481812995738301343271221⟩⟩, + ⟨⟨245704819538756576231588988791846664652150932106452883537,245704819538756576231588988791846664652150932106762964501⟩,⟨-645203295785351749611516948173585833426887357501401809746,-645203295785351749611516948173585833426887357501091844225⟩⟩, + ⟨⟨1098809573596671796350264790312337143750048132486284254156,1098809573596671796350264790312337143750048132486868842163⟩,⟨-518799149351173082502188294424066196462828199224720052654,-518799149351173082502188294424066196462828199224136276398⟩⟩, + ⟨⟨1798393554187226524356886093963992444952284044279659837834,1798393554187226524356886093963992444952284044280457739818⟩,⟨665604544089883375880384730291498501032414196577284514434,665604544089883375880384730291498501032414196578081968653⟩⟩, + ⟨⟨1095743056745222565772194180371089244729096515712539108294,1095743056745222565772194180371089244729096515713708998836⟩,⟨2517220901834523238811040322602543325775437859382255100038,2517220901834523238811040322602543325775437859383425049553⟩⟩, + ⟨⟨-1376646368711758129227377276395639525923328243759062060823,-1376646368711758129227377276395639525923328243757601067966⟩,⟨3337187831688066095170102646101674674733965877549490721353,3337187831688066095170102646101674674733965877550948835448⟩⟩, + ⟨⟨-4078554157685919020139664043854679811640507618829775852141,-4078554157685919020139664043854679811640507618828395814239⟩,⟨1683526903009561432650584158177803154540676677196911254710,1683526903009561432650584158177803154540676677198285693841⟩⟩] +lemma tw1_1_1_8_calc (j : Fin 31) : taylorWaveBox 1 1 1 8 j = tw1_1_1_8 j := by + revert j + decide +kernel +def tw1_1_1_9 : Fin 31 → CI := ![⟨⟨996305238304563553642077395583898913725687967060009328251,996305238304563553642077395583898913725687967060576218509⟩,⟨-1124966907438169570165417545160549898454255248449606888601,-1124966907438169570165417545160549898454255248449037000333⟩⟩, + ⟨⟨1284533454898823660764293245724136713444741330925926874175,1284533454898823660764293245724136713444741330926498495048⟩,⟨-13414370454425559122208171752858240083989765492226676033,-13414370454425559122208171752858240083989765491654344550⟩⟩, + ⟨⟨680635809925175218413544469579956860372948061327590703778,680635809925175218413544469579956860372948061328036638191⟩,⟨762661282947959637235430488347314062805285743031997865274,762661282947959637235430488347314062805285743032443822766⟩⟩, + ⟨⟨-98222271292000543142055453638334919439175977909469149565,-98222271292000543142055453638334919439175977909066420874⟩,⟨741596296309710139097595184464077021241641789747209302095,741596296309710139097595184464077021241641789747612429916⟩⟩, + ⟨⟨-414580125211069642748884058699637724960653517429097900921,-414580125211069642748884058699637724960653517428835873406⟩,⟨274453168806090294159701275620789799399953843409037277273,274453168806090294159701275620789799399953843409299437386⟩⟩, + ⟨⟨-287716608713285148847580310325752999350417201584617787428,-287716608713285148847580310325752999350417201584451128010⟩,⟨-71784168450307534216104421905057212337110215268021642267,-71784168450307534216104421905057212337110215267855121977⟩⟩, + ⟨⟨-81871034003069385151186259734305129991008857212672978751,-81871034003069385151186259734305129991008857212578361988⟩,⟨-134174702510626360614712610881035943538679416584989484821,-134174702510626360614712610881035943538679416584894902821⟩⟩, + ⟨⟨10750512248699587043973502252527095309650459693706665838,10750512248699587043973502252527095309650459693756413960⟩,⟨-72912581612704798873073985228769587694720100371062801107,-72912581612704798873073985228769587694720100371013048423⟩⟩, + ⟨⟨20143932608517767275558813328225372727105601332095180479,20143932608517767275558813328225372727105601332117926894⟩,⟨-23168537745569534425002224217302880476894797611392992853,-23168537745569534425002224217302880476894797611370247184⟩⟩, + ⟨⟨10380258022752211890213094184782729290571864877155227741,10380258022752211890213094184782729290571864877164156900⟩,⟨-5108169585506177910315369602466178283236868929583826558,-5108169585506177910315369602466178283236868929574900217⟩⟩, + ⟨⟨3935037460990709489874152686743843938838049761156913939,3935037460990709489874152686743843938838049761159265031⟩,⟨-1125069462142710917290102879856778085361185647001929392,-1125069462142710917290102879856778085361185646999577983⟩⟩, + ⟨⟨1351232987295339163625591236570995008234465832570065075,1351232987295339163625591236570995008234465832570867524⟩,⟨-506426215289036118653056129358362354981277909868932406,-506426215289036118653056129358362354981277909868131590⟩⟩, + ⟨⟨414531014167971794436268893016494481115796382941093284,414531014167971794436268893016494481115796382941291675⟩,⟨-362084178352855866955297864777663127722791676581074985,-362084178352855866955297864777663127722791676580877940⟩⟩, + ⟨⟨56161071821540806358514593554077170183887552755852638,56161071821540806358514593554077170183887552755944290⟩,⟨-243651856443352065999216587033326509990441540671766238,-243651856443352065999216587033326509990441540671675030⟩⟩, + ⟨⟨-85456953450133866911046111918962060318400344914680900,-85456953450133866911046111918962060318400344914649641⟩,⟨-121577195405118224614488377905766686737176847167428380,-121577195405118224614488377905766686737176847167397508⟩⟩, + ⟨⟨-123873341472075827565386486103783310505376053696726935,-123873341472075827565386486103783310505376053696714095⟩,⟨-181,151⟩⟩, + ⟨⟨-85456953450133866911046111918962060318400344914680900,-85456953450133866911046111918962060318400344914649641⟩,⟨121577195405118224614488377905766686737176847167397508,121577195405118224614488377905766686737176847167428380⟩⟩, + ⟨⟨56161071821540806358514593554077170183887552755852638,56161071821540806358514593554077170183887552755944290⟩,⟨243651856443352065999216587033326509990441540671675030,243651856443352065999216587033326509990441540671766238⟩⟩, + ⟨⟨414531014167971794436268893016494481115796382941093284,414531014167971794436268893016494481115796382941291675⟩,⟨362084178352855866955297864777663127722791676580877940,362084178352855866955297864777663127722791676581074985⟩⟩, + ⟨⟨1351232987295339163625591236570995008234465832570065075,1351232987295339163625591236570995008234465832570867524⟩,⟨506426215289036118653056129358362354981277909868131590,506426215289036118653056129358362354981277909868932406⟩⟩, + ⟨⟨3935037460990709489874152686743843938838049761156913939,3935037460990709489874152686743843938838049761159265031⟩,⟨1125069462142710917290102879856778085361185646999577983,1125069462142710917290102879856778085361185647001929392⟩⟩, + ⟨⟨10380258022752211890213094184782729290571864877155227741,10380258022752211890213094184782729290571864877164156900⟩,⟨5108169585506177910315369602466178283236868929574900217,5108169585506177910315369602466178283236868929583826558⟩⟩, + ⟨⟨20143932608517767275558813328225372727105601332095180474,20143932608517767275558813328225372727105601332117926894⟩,⟨23168537745569534425002224217302880476894797611370247184,23168537745569534425002224217302880476894797611392992859⟩⟩, + ⟨⟨10750512248699587043973502252527095309650459693706665838,10750512248699587043973502252527095309650459693756413960⟩,⟨72912581612704798873073985228769587694720100371013048423,72912581612704798873073985228769587694720100371062801107⟩⟩, + ⟨⟨-81871034003069385151186259734305129991008857212672978751,-81871034003069385151186259734305129991008857212578361988⟩,⟨134174702510626360614712610881035943538679416584894902821,134174702510626360614712610881035943538679416584989484821⟩⟩, + ⟨⟨-287716608713285148847580310325752999350417201584617787427,-287716608713285148847580310325752999350417201584451128010⟩,⟨71784168450307534216104421905057212337110215267855121976,71784168450307534216104421905057212337110215268021642266⟩⟩, + ⟨⟨-414580125211069642748884058699637724960653517429097900920,-414580125211069642748884058699637724960653517428835873403⟩,⟨-274453168806090294159701275620789799399953843409299437390,-274453168806090294159701275620789799399953843409037277274⟩⟩, + ⟨⟨-98222271292000543142055453638334919439175977909469149559,-98222271292000543142055453638334919439175977909066420870⟩,⟨-741596296309710139097595184464077021241641789747612429915,-741596296309710139097595184464077021241641789747209302097⟩⟩, + ⟨⟨680635809925175218413544469579956860372948061327590703781,680635809925175218413544469579956860372948061328036638195⟩,⟨-762661282947959637235430488347314062805285743032443822764,-762661282947959637235430488347314062805285743031997865271⟩⟩, + ⟨⟨1284533454898823660764293245724136713444741330925926874178,1284533454898823660764293245724136713444741330926498495044⟩,⟨13414370454425559122208171752858240083989765491654344565,13414370454425559122208171752858240083989765492226676041⟩⟩, + ⟨⟨996305238304563553642077395583898913725687967060009328241,996305238304563553642077395583898913725687967060576218506⟩,⟨1124966907438169570165417545160549898454255248449037000335,1124966907438169570165417545160549898454255248449606888610⟩⟩] +lemma tw1_1_1_9_calc (j : Fin 31) : taylorWaveBox 1 1 1 9 j = tw1_1_1_9 j := by + revert j + decide +kernel +def tw1_1_1_10 : Fin 31 → CI := ![⟨⟨230096920986154632393400411266725231038017696543896769406,230096920986154632393400411266725231038017696544097764514⟩,⟨408832318321539471760009283583125323968539895372391664656,408832318321539471760009283583125323968539895372591825141⟩⟩, + ⟨⟨-151669995626681071004017153449925535335056769013048919599,-151669995626681071004017153449925535335056769012854238263⟩,⟨390617244465958506050607415076747220907453657580653404374,390617244465958506050607415076747220907453657580848062352⟩⟩, + ⟨⟨-333616279036075760702776406548836661316509172844081781690,-333616279036075760702776406548836661316509172843880726328⟩,⟨102111097331418335529127200483536511982664500269208336308,102111097331418335529127200483536511982664500269409371992⟩⟩, + ⟨⟨-218054801570372809185593605500646030000140308432247607873,-218054801570372809185593605500646030000140308432080420648⟩,⟨-154960853394226713980159608931844401591204769118321024955,-154960853394226713980159608931844401591204769118153924374⟩⟩, + ⟨⟨-7430290724148027469256620984654271301549180244867081806,-7430290724148027469256620984654271301549180244749356830⟩,⟨-186335312087850369189845380114881316393125653073828478161,-186335312087850369189845380114881316393125653073710679403⟩⟩, + ⟨⟨87934173959248020778672235587776849557736464336735405736,87934173959248020778672235587776849557736464336816258756⟩,⟨-76802211119613803311837410899292086934669477059282284206,-76802211119613803311837410899292086934669477059201378042⟩⟩, + ⟨⟨64444842058376504250648269378139983872544038064906874390,64444842058376504250648269378139983872544038064953310986⟩,⟨8371020949128560468413241589008587170263511013348973208,8371020949128560468413241589008587170263511013395398092⟩⟩, + ⟨⟨19940107290360437856375743280224521627943315804126695700,19940107290360437856375743280224521627943315804153045389⟩,⟨25017922729942077490293247560584895270226593012909494044,25017922729942077490293247560584895270226593012935841831⟩⟩, + ⟨⟨320797740681809340810177493424916341813976348414930895,320797740681809340810177493424916341813976348428212134⟩,⟨13974554566402551579298526083499697153768837850288995538,13974554566402551579298526083499697153768837850302276179⟩⟩, + ⟨⟨-2458782174111336051114257569066816694070735868266861960,-2458782174111336051114257569066816694070735868262391428⟩,⟨4935442438555274563187685537368485556781895210609320246,4935442438555274563187685537368485556781895210613790894⟩⟩, + ⟨⟨-1365340064576333938483794765359202522082793282792517471,-1365340064576333938483794765359202522082793282791023708⟩,⟨1509633731670240387640022103009667408517127011273245858,1509633731670240387640022103009667408517127011274738826⟩⟩, + ⟨⟨-511480223802934839224334232872671481069132516461061543,-511480223802934839224334232872671481069132516460561768⟩,⟨542267087720760496943067790772169252353347314505114420,542267087720760496943067790772169252353347314505613162⟩⟩, + ⟨⟨-141799480895288065990177458807773165421031936012189101,-141799480895288065990177458807773165421031936012073734⟩,⟨256981645595007175151487464324071492827564348653174495,256981645595007175151487464324071492827564348653289405⟩⟩, + ⟨⟨1261315400906247073712933726903220316295745518728195,1261315400906247073712933726903220316295745518778398⟩,⟨136582186663847987353891363191143899027110641719335204,136582186663847987353891363191143899027110641719385301⟩⟩, + ⟨⟨55056366252621290842473362902835623346138469513120000,55056366252621290842473362902835623346138469513137272⟩,⟨61321097743019661260643288268661498684520786730764254,61321097743019661260643288268661498684520786730781245⟩⟩, + ⟨⟨69047799473465863907401442043769960758445945992211289,69047799473465863907401442043769960758445945992218667⟩,⟨-84,101⟩⟩, + ⟨⟨55056366252621290842473362902835623346138469513120000,55056366252621290842473362902835623346138469513137272⟩,⟨-61321097743019661260643288268661498684520786730781245,-61321097743019661260643288268661498684520786730764254⟩⟩, + ⟨⟨1261315400906247073712933726903220316295745518728195,1261315400906247073712933726903220316295745518778398⟩,⟨-136582186663847987353891363191143899027110641719385301,-136582186663847987353891363191143899027110641719335204⟩⟩, + ⟨⟨-141799480895288065990177458807773165421031936012189101,-141799480895288065990177458807773165421031936012073734⟩,⟨-256981645595007175151487464324071492827564348653289405,-256981645595007175151487464324071492827564348653174495⟩⟩, + ⟨⟨-511480223802934839224334232872671481069132516461061543,-511480223802934839224334232872671481069132516460561768⟩,⟨-542267087720760496943067790772169252353347314505613162,-542267087720760496943067790772169252353347314505114420⟩⟩, + ⟨⟨-1365340064576333938483794765359202522082793282792517471,-1365340064576333938483794765359202522082793282791023708⟩,⟨-1509633731670240387640022103009667408517127011274738826,-1509633731670240387640022103009667408517127011273245858⟩⟩, + ⟨⟨-2458782174111336051114257569066816694070735868266861960,-2458782174111336051114257569066816694070735868262391428⟩,⟨-4935442438555274563187685537368485556781895210613790894,-4935442438555274563187685537368485556781895210609320246⟩⟩, + ⟨⟨320797740681809340810177493424916341813976348414930895,320797740681809340810177493424916341813976348428212137⟩,⟨-13974554566402551579298526083499697153768837850302276180,-13974554566402551579298526083499697153768837850288995537⟩⟩, + ⟨⟨19940107290360437856375743280224521627943315804126695700,19940107290360437856375743280224521627943315804153045389⟩,⟨-25017922729942077490293247560584895270226593012935841831,-25017922729942077490293247560584895270226593012909494044⟩⟩, + ⟨⟨64444842058376504250648269378139983872544038064906874390,64444842058376504250648269378139983872544038064953310986⟩,⟨-8371020949128560468413241589008587170263511013395398092,-8371020949128560468413241589008587170263511013348973208⟩⟩, + ⟨⟨87934173959248020778672235587776849557736464336735405736,87934173959248020778672235587776849557736464336816258756⟩,⟨76802211119613803311837410899292086934669477059201378042,76802211119613803311837410899292086934669477059282284206⟩⟩, + ⟨⟨-7430290724148027469256620984654271301549180244867081807,-7430290724148027469256620984654271301549180244749356831⟩,⟨186335312087850369189845380114881316393125653073710679402,186335312087850369189845380114881316393125653073828478161⟩⟩, + ⟨⟨-218054801570372809185593605500646030000140308432247607873,-218054801570372809185593605500646030000140308432080420650⟩,⟨154960853394226713980159608931844401591204769118153924373,154960853394226713980159608931844401591204769118321024953⟩⟩, + ⟨⟨-333616279036075760702776406548836661316509172844081781689,-333616279036075760702776406548836661316509172843880726328⟩,⟨-102111097331418335529127200483536511982664500269409371994,-102111097331418335529127200483536511982664500269208336309⟩⟩, + ⟨⟨-151669995626681071004017153449925535335056769013048919595,-151669995626681071004017153449925535335056769012854238260⟩,⟨-390617244465958506050607415076747220907453657580848062352,-390617244465958506050607415076747220907453657580653404376⟩⟩, + ⟨⟨230096920986154632393400411266725231038017696543896769408,230096920986154632393400411266725231038017696544097764517⟩,⟨-408832318321539471760009283583125323968539895372591825141,-408832318321539471760009283583125323968539895372391664654⟩⟩] +lemma tw1_1_1_10_calc (j : Fin 31) : taylorWaveBox 1 1 1 10 j = tw1_1_1_10 j := by + revert j + decide +kernel +def tw1_1_1_11 : Fin 31 → CI := ![⟨⟨-133026836715322952928040921725614670634479717640327199127,-133026836715322952928040921725614670634479717640264884622⟩,⟨24107928829925941606871474370766027190242571291316437892,24107928829925941606871474370766027190242571291378876895⟩⟩, + ⟨⟨-92216655828890287119740920549499678993867330116890986479,-92216655828890287119740920549499678993867330116820460657⟩,⟨-86110842077828242590628627391617230426408781219257385556,-86110842077828242590628627391617230426408781219186928185⟩⟩, + ⟨⟨14749508496560775719749963043307355293300012664305126849,14749508496560775719749963043307355293300012664381744272⟩,⟨-108927293032177092039940092024970104993212915554241122450,-108927293032177092039940092024970104993212915554164500139⟩⟩, + ⟨⟨78854568921830559395490325894696539072475725482982830439,78854568921830559395490325894696539072475725483044636060⟩,⟨-39738491760319665773651990869954515177651045215462958701,-39738491760319665773651990869954515177651045215401163728⟩⟩, + ⟨⟨56503305166647942401347724300924252731589337605496187843,56503305166647942401347724300924252731589337605549092482⟩,⟨31239953897495196765646340476592708042496251809147638333,31239953897495196765646340476592708042496251809200501643⟩⟩, + ⟨⟨4639520915772578107331151684514619211509648790474643576,4639520915772578107331151684514619211509648790508243940⟩,⟨42177015398891862238453380921953293181462707994604736576,42177015398891862238453380921953293181462707994638341200⟩⟩, + ⟨⟨-17898723473151312429498480197458858742388420856631743053,-17898723473151312429498480197458858742388420856608575913⟩,⟨17168622801216721646363490724976464062685264628132609298,17168622801216721646363490724976464062685264628155784291⟩⟩, + ⟨⟨-12779498365211318522347055771442868536653619327421775399,-12779498365211318522347055771442868536653619327408624396⟩,⟨-1005886278058449517467364256981141336515841718814465913,-1005886278058449517467364256981141336515841718801315574⟩⟩, + ⟨⟨-4053966140180240200304107253816727292066056145165164412,-4053966140180240200304107253816727292066056145158541453⟩,⟨-4251808785177184720613014384658558934611460263543183282,-4251808785177184720613014384658558934611460263536560227⟩⟩, + ⟨⟨-455985312875522040249449782098910984259742647124550214,-455985312875522040249449782098910984259742647121830268⟩,⟨-2382662895902834381459238173511264484584216098360551715,-2382662895902834381459238173511264484584216098357831053⟩⟩, + ⟨⟨165626840876864856150545650473777336595562770452663342,165626840876864856150545650473777336595562770453521815⟩,⟨-919656573630749749525119871033114829804420035571467719,-919656573630749749525119871033114829804420035570609605⟩⟩, + ⟨⟨105100226076812636555745718577104172377335532060185428,105100226076812636555745718577104172377335532060442679⟩,⟨-339557780706576350562266302374185052760660868314827374,-339557780706576350562266302374185052760660868314570342⟩⟩, + ⟨⟨22390235524651518309085056547605560719759781576077931,22390235524651518309085056547605560719759781576137119⟩,⟨-142731045253755076787683977139289559075549944203419889,-142731045253755076787683977139289559075549944203360710⟩⟩, + ⟨⟨-16706368198802011946210551986681747196872409097827638,-16706368198802011946210551986681747196872409097802870⟩,⟨-66816651550935284434193509066499557279190634065680945,-66816651550935284434193509066499557279190634065656147⟩⟩, + ⟨⟨-31708991155441283607352049140777733961690861440523373,-31708991155441283607352049140777733961690861440514608⟩,⟨-27823842715818612725514332107026134318497009511701834,-27823842715818612725514332107026134318497009511693245⟩⟩, + ⟨⟨-35527097316099641420872386243935916307278255949116824,-35527097316099641420872386243935916307278255949112915⟩,⟨-52,44⟩⟩, + ⟨⟨-31708991155441283607352049140777733961690861440523373,-31708991155441283607352049140777733961690861440514608⟩,⟨27823842715818612725514332107026134318497009511693245,27823842715818612725514332107026134318497009511701834⟩⟩, + ⟨⟨-16706368198802011946210551986681747196872409097827638,-16706368198802011946210551986681747196872409097802870⟩,⟨66816651550935284434193509066499557279190634065656147,66816651550935284434193509066499557279190634065680945⟩⟩, + ⟨⟨22390235524651518309085056547605560719759781576077931,22390235524651518309085056547605560719759781576137119⟩,⟨142731045253755076787683977139289559075549944203360710,142731045253755076787683977139289559075549944203419889⟩⟩, + ⟨⟨105100226076812636555745718577104172377335532060185428,105100226076812636555745718577104172377335532060442679⟩,⟨339557780706576350562266302374185052760660868314570342,339557780706576350562266302374185052760660868314827374⟩⟩, + ⟨⟨165626840876864856150545650473777336595562770452663342,165626840876864856150545650473777336595562770453521815⟩,⟨919656573630749749525119871033114829804420035570609605,919656573630749749525119871033114829804420035571467719⟩⟩, + ⟨⟨-455985312875522040249449782098910984259742647124550214,-455985312875522040249449782098910984259742647121830268⟩,⟨2382662895902834381459238173511264484584216098357831053,2382662895902834381459238173511264484584216098360551715⟩⟩, + ⟨⟨-4053966140180240200304107253816727292066056145165164413,-4053966140180240200304107253816727292066056145158541453⟩,⟨4251808785177184720613014384658558934611460263536560226,4251808785177184720613014384658558934611460263543183282⟩⟩, + ⟨⟨-12779498365211318522347055771442868536653619327421775399,-12779498365211318522347055771442868536653619327408624396⟩,⟨1005886278058449517467364256981141336515841718801315574,1005886278058449517467364256981141336515841718814465913⟩⟩, + ⟨⟨-17898723473151312429498480197458858742388420856631743053,-17898723473151312429498480197458858742388420856608575913⟩,⟨-17168622801216721646363490724976464062685264628155784291,-17168622801216721646363490724976464062685264628132609298⟩⟩, + ⟨⟨4639520915772578107331151684514619211509648790474643577,4639520915772578107331151684514619211509648790508243941⟩,⟨-42177015398891862238453380921953293181462707994638341199,-42177015398891862238453380921953293181462707994604736576⟩⟩, + ⟨⟨56503305166647942401347724300924252731589337605496187843,56503305166647942401347724300924252731589337605549092482⟩,⟨-31239953897495196765646340476592708042496251809200501642,-31239953897495196765646340476592708042496251809147638333⟩⟩, + ⟨⟨78854568921830559395490325894696539072475725482982830438,78854568921830559395490325894696539072475725483044636059⟩,⟨39738491760319665773651990869954515177651045215401163729,39738491760319665773651990869954515177651045215462958701⟩⟩, + ⟨⟨14749508496560775719749963043307355293300012664305126848,14749508496560775719749963043307355293300012664381744271⟩,⟨108927293032177092039940092024970104993212915554164500139,108927293032177092039940092024970104993212915554241122450⟩⟩, + ⟨⟨-92216655828890287119740920549499678993867330116890986480,-92216655828890287119740920549499678993867330116820460658⟩,⟨86110842077828242590628627391617230426408781219186928185,86110842077828242590628627391617230426408781219257385555⟩⟩, + ⟨⟨-133026836715322952928040921725614670634479717640327199127,-133026836715322952928040921725614670634479717640264884622⟩,⟨-24107928829925941606871474370766027190242571291378876896,-24107928829925941606871474370766027190242571291316437893⟩⟩] +lemma tw1_1_1_11_calc (j : Fin 31) : taylorWaveBox 1 1 1 11 j = tw1_1_1_11 j := by + revert j + decide +kernel +def tw1_1_1_12 : Fin 31 → CI := ![⟨⟨5551658576472873265706326170894286769645286897190701277,5551658576472873265706326170894286769645286897208228201⟩,⟨-35748228885283812952008846046670016358303179817404427623,-35748228885283812952008846046670016358303179817386889325⟩⟩, + ⟨⟨31934290442974122530851039850603427654243596582923888168,31934290442974122530851039850603427654243596582948481816⟩,⟨-14987905351381623239586104657003589047395523562274186490,-14987905351381623239586104657003589047395523562249564740⟩⟩, + ⟨⟨27139530489640382304672175983190016733538184872515366883,27139530489640382304672175983190016733538184872541246654⟩,⟨17250290078771018683543427728980787324622267569237265615,17250290078771018683543427728980787324622267569263145159⟩⟩, + ⟨⟨-523900566307938381513605215685349700323414000594233798,-523900566307938381513605215685349700323414000568741157⟩,⟨27060425400407395061720966807988369149341833929351180476,27060425400407395061720966807988369149341833929376688055⟩⟩, + ⟨⟨-18004636937171555966319757600469040108008049657606691335,-18004636937171555966319757600469040108008049657586300130⟩,⟨10328553156835097612174525277339766325968381609423945513,10328553156835097612174525277339766325968381609444340710⟩⟩, + ⟨⟨-12574705228185390665008814657873812237494468737325566806,-12574705228185390665008814657873812237494468737309920083⟩,⟨-6850093628743982428313791131868698760937619062128207060,-6850093628743982428313791131868698760937619062112569510⟩⟩, + ⟨⟨-768414971685690239947981764507673193198783533533133026,-768414971685690239947981764507673193198783533523309093⟩,⟨-8755719429875305116013384584875210720882797498131580682,-8755719429875305116013384584875210720882797498121756372⟩⟩, + ⟨⟨3519712177701243355834453544621662912761578978086537819,3519712177701243355834453544621662912761578978092931132⟩,⟨-3218780678077900196778730419812279409103679439248429293,-3218780678077900196778730419812279409103679439242035655⟩⟩, + ⟨⟨2286951217748907517172976258980345919129143451228418253,2286951217748907517172976258980345919129143451231926076⟩,⟨161687531338797270100020622654714951093702047675211257,161687531338797270100020622654714951093702047678719192⟩⟩, + ⟨⟨738227933401162648498111867861614582020856974892672413,738227933401162648498111867861614582020856974894030821⟩,⟨661210003171681764836144539905884244773425942720165458,661210003171681764836144539905884244773425942721523974⟩⟩, + ⟨⟨147340778350136525571887918643779558333931381903097054,147340778350136525571887918643779558333931381903522645⟩,⟨370098464726266447275399999074035471134138788241584009,370098464726266447275399999074035471134138788242009602⟩⟩, + ⟨⟨24430018339274135666255652441034035295912201310024684,24430018339274135666255652441034035295912201310148962⟩,⟨155479257517916345494674628173850108220933399358729199,155479257517916345494674628173850108220933399358853572⟩⟩, + ⟨⟨12666989072356845698991325460719712040229798088622046,12666989072356845698991325460719712040229798088653198⟩,⟨64811287267374988530258853425672009006065878671609477,64811287267374988530258853425672009006065878671640732⟩⟩, + ⟨⟨14914074036011691231812610162546775955682091692195994,14914074036011691231812610162546775955682091692209117⟩,⟨28592448187297075876221316998445955839967506490936899,28592448187297075876221316998445955839967506490950077⟩⟩, + ⟨⟨16535255385955176236218508334361868988238738986370025,16535255385955176236218508334361868988238738986374586⟩,⟨11343537513294445147142708114111641031409143727748908,11343537513294445147142708114111641031409143727753385⟩⟩, + ⟨⟨16974028440466151290176321770980389375923512161528220,16974028440466151290176321770980389375923512161530142⟩,⟨-21,25⟩⟩, + ⟨⟨16535255385955176236218508334361868988238738986370025,16535255385955176236218508334361868988238738986374586⟩,⟨-11343537513294445147142708114111641031409143727753385,-11343537513294445147142708114111641031409143727748908⟩⟩, + ⟨⟨14914074036011691231812610162546775955682091692195994,14914074036011691231812610162546775955682091692209117⟩,⟨-28592448187297075876221316998445955839967506490950077,-28592448187297075876221316998445955839967506490936899⟩⟩, + ⟨⟨12666989072356845698991325460719712040229798088622046,12666989072356845698991325460719712040229798088653198⟩,⟨-64811287267374988530258853425672009006065878671640732,-64811287267374988530258853425672009006065878671609477⟩⟩, + ⟨⟨24430018339274135666255652441034035295912201310024684,24430018339274135666255652441034035295912201310148962⟩,⟨-155479257517916345494674628173850108220933399358853572,-155479257517916345494674628173850108220933399358729199⟩⟩, + ⟨⟨147340778350136525571887918643779558333931381903097054,147340778350136525571887918643779558333931381903522645⟩,⟨-370098464726266447275399999074035471134138788242009602,-370098464726266447275399999074035471134138788241584009⟩⟩, + ⟨⟨738227933401162648498111867861614582020856974892672413,738227933401162648498111867861614582020856974894030821⟩,⟨-661210003171681764836144539905884244773425942721523974,-661210003171681764836144539905884244773425942720165458⟩⟩, + ⟨⟨2286951217748907517172976258980345919129143451228418253,2286951217748907517172976258980345919129143451231926076⟩,⟨-161687531338797270100020622654714951093702047678719192,-161687531338797270100020622654714951093702047675211257⟩⟩, + ⟨⟨3519712177701243355834453544621662912761578978086537819,3519712177701243355834453544621662912761578978092931132⟩,⟨3218780678077900196778730419812279409103679439242035655,3218780678077900196778730419812279409103679439248429293⟩⟩, + ⟨⟨-768414971685690239947981764507673193198783533533133026,-768414971685690239947981764507673193198783533523309093⟩,⟨8755719429875305116013384584875210720882797498121756372,8755719429875305116013384584875210720882797498131580682⟩⟩, + ⟨⟨-12574705228185390665008814657873812237494468737325566806,-12574705228185390665008814657873812237494468737309920083⟩,⟨6850093628743982428313791131868698760937619062112569510,6850093628743982428313791131868698760937619062128207060⟩⟩, + ⟨⟨-18004636937171555966319757600469040108008049657606691335,-18004636937171555966319757600469040108008049657586300130⟩,⟨-10328553156835097612174525277339766325968381609444340710,-10328553156835097612174525277339766325968381609423945513⟩⟩, + ⟨⟨-523900566307938381513605215685349700323414000594233797,-523900566307938381513605215685349700323414000568741156⟩,⟨-27060425400407395061720966807988369149341833929376688055,-27060425400407395061720966807988369149341833929351180476⟩⟩, + ⟨⟨27139530489640382304672175983190016733538184872515366883,27139530489640382304672175983190016733538184872541246654⟩,⟨-17250290078771018683543427728980787324622267569263145159,-17250290078771018683543427728980787324622267569237265614⟩⟩, + ⟨⟨31934290442974122530851039850603427654243596582923888168,31934290442974122530851039850603427654243596582948481816⟩,⟨14987905351381623239586104657003589047395523562249564740,14987905351381623239586104657003589047395523562274186490⟩⟩, + ⟨⟨5551658576472873265706326170894286769645286897190701277,5551658576472873265706326170894286769645286897208228201⟩,⟨35748228885283812952008846046670016358303179817386889325,35748228885283812952008846046670016358303179817404427623⟩⟩] +lemma tw1_1_1_12_calc (j : Fin 31) : taylorWaveBox 1 1 1 12 j = tw1_1_1_12 j := by + revert j + decide +kernel +def tw1_1_1_13 : Fin 31 → CI := ![⟨⟨7983041404076494142436557692759097738012460354478276979,7983041404076494142436557692759097738012460354483742866⟩,⟨4231604208745069326842952071563733835768120270996208274,4231604208745069326842952071563733835768120271001659131⟩⟩, + ⟨⟨533710492079256343587883934025342887401697003659464668,533710492079256343587883934025342887401697003667123362⟩,⟨9190106653868217767427321771381871097101524294515972576,9190106653868217767427321771381871097101524294523625767⟩⟩, + ⟨⟨-7378255794953686533182888156269904676033798159930213173,-7378255794953686533182888156269904676033798159921527821⟩,⟨4760439730082832022888328120207451410775443972604711998,4760439730082832022888328120207451410775443972613397034⟩⟩, + ⟨⟨-6774393318564361086836719541694266757673501819084644872,-6774393318564361086836719541694266757673501819075452397⟩,⟨-3749533584905398329271401942747352222045207909640800681,-3749533584905398329271401942747352222045207909631611411⟩⟩, + ⟨⟨149991361832375859496403125024679920816248192086249757,149991361832375859496403125024679920816248192094205343⟩,⟨-6226441236512024676593777000601408069517439618475361030,-6226441236512024676593777000601408069517439618467402484⟩⟩, + ⟨⟨4034152615560255564983150417132747739225560266502323605,4034152615560255564983150417132747739225560266508550661⟩,⟨-2016965813120079339107653659398401198830143151095444252,-2016965813120079339107653659398401198830143151089215975⟩⟩, + ⟨⟨2416484166663315631598233657041414621372762154031028820,2416484166663315631598233657041414621372762154035562633⟩,⟨1616245065189377956653000357697069596652736131401776325,1616245065189377956653000357697069596652736131406308983⟩⟩, + ⟨⟨-17736890858167844871710923927510476674667816569202763,-17736890858167844871710923927510476674667816566329868⟩,⟨1656218910181205423519398518840262245218318106172388208,1656218910181205423519398518840262245218318106175261172⟩⟩, + ⟨⟨-655563970288690647941005825994842321160883418740536473,-655563970288690647941005825994842321160883418738937212⟩,⟨517294039577509175134410963850757730502270856046271953,517294039577509175134410963850757730502270856047871208⟩⟩, + ⟨⟨-376697663403301727392449289359801380993431617653842420,-376697663403301727392449289359801380993431617653168393⟩,⟨-29870882235723017419362533376438069146448694878635609,-29870882235723017419362533376438069146448694877961654⟩⟩, + ⟨⟨-127611335239667656999093544831882981030597232325609297,-127611335239667656999093544831882981030597232325379032⟩,⟨-93995379234108383216531287142607242868100537050742898,-93995379234108383216531287142607242868100537050512559⟩⟩, + ⟨⟨-37360293836651193643029893175001910447373938246873498,-37360293836651193643029893175001910447373938246806310⟩,⟨-53241601791503085434848806193701203243111181242119171,-53241601791503085434848806193701203243111181242051885⟩⟩, + ⟨⟨-14523582689717072784166316144959869138750104959411946,-14523582689717072784166316144959869138750104959395378⟩,⟨-24139998500058845892048678975666691945025532919774426,-24139998500058845892048678975666691945025532919757789⟩⟩, + ⟨⟨-9256130251562839224704616260914192000834968647659517,-9256130251562839224704616260914192000834968647652767⟩,⟨-10627015272227109974527299203527597068108134563605954,-10627015272227109974527299203527597068108134563599169⟩⟩, + ⟨⟨-7881118344988943363023947037093773532744969849323404,-7881118344988943363023947037093773532744969849321157⟩,⟨-4126415637954794929332172928659193164025266392952282,-4126415637954794929332172928659193164025266392950069⟩⟩, + ⟨⟨-7569146343103473993079299025472974392354027228111628,-7569146343103473993079299025472974392354027228110746⟩,⟨-12,10⟩⟩, + ⟨⟨-7881118344988943363023947037093773532744969849323404,-7881118344988943363023947037093773532744969849321157⟩,⟨4126415637954794929332172928659193164025266392950069,4126415637954794929332172928659193164025266392952282⟩⟩, + ⟨⟨-9256130251562839224704616260914192000834968647659517,-9256130251562839224704616260914192000834968647652767⟩,⟨10627015272227109974527299203527597068108134563599169,10627015272227109974527299203527597068108134563605954⟩⟩, + ⟨⟨-14523582689717072784166316144959869138750104959411946,-14523582689717072784166316144959869138750104959395378⟩,⟨24139998500058845892048678975666691945025532919757789,24139998500058845892048678975666691945025532919774426⟩⟩, + ⟨⟨-37360293836651193643029893175001910447373938246873498,-37360293836651193643029893175001910447373938246806310⟩,⟨53241601791503085434848806193701203243111181242051885,53241601791503085434848806193701203243111181242119171⟩⟩, + ⟨⟨-127611335239667656999093544831882981030597232325609297,-127611335239667656999093544831882981030597232325379032⟩,⟨93995379234108383216531287142607242868100537050512559,93995379234108383216531287142607242868100537050742898⟩⟩, + ⟨⟨-376697663403301727392449289359801380993431617653842420,-376697663403301727392449289359801380993431617653168393⟩,⟨29870882235723017419362533376438069146448694877961654,29870882235723017419362533376438069146448694878635609⟩⟩, + ⟨⟨-655563970288690647941005825994842321160883418740536473,-655563970288690647941005825994842321160883418738937211⟩,⟨-517294039577509175134410963850757730502270856047871208,-517294039577509175134410963850757730502270856046271953⟩⟩, + ⟨⟨-17736890858167844871710923927510476674667816569202763,-17736890858167844871710923927510476674667816566329868⟩,⟨-1656218910181205423519398518840262245218318106175261172,-1656218910181205423519398518840262245218318106172388208⟩⟩, + ⟨⟨2416484166663315631598233657041414621372762154031028820,2416484166663315631598233657041414621372762154035562633⟩,⟨-1616245065189377956653000357697069596652736131406308983,-1616245065189377956653000357697069596652736131401776325⟩⟩, + ⟨⟨4034152615560255564983150417132747739225560266502323605,4034152615560255564983150417132747739225560266508550661⟩,⟨2016965813120079339107653659398401198830143151089215976,2016965813120079339107653659398401198830143151095444252⟩⟩, + ⟨⟨149991361832375859496403125024679920816248192086249757,149991361832375859496403125024679920816248192094205343⟩,⟨6226441236512024676593777000601408069517439618467402484,6226441236512024676593777000601408069517439618475361030⟩⟩, + ⟨⟨-6774393318564361086836719541694266757673501819084644872,-6774393318564361086836719541694266757673501819075452397⟩,⟨3749533584905398329271401942747352222045207909631611411,3749533584905398329271401942747352222045207909640800681⟩⟩, + ⟨⟨-7378255794953686533182888156269904676033798159930213173,-7378255794953686533182888156269904676033798159921527821⟩,⟨-4760439730082832022888328120207451410775443972613397034,-4760439730082832022888328120207451410775443972604711998⟩⟩, + ⟨⟨533710492079256343587883934025342887401697003659464668,533710492079256343587883934025342887401697003667123362⟩,⟨-9190106653868217767427321771381871097101524294523625767,-9190106653868217767427321771381871097101524294515972576⟩⟩, + ⟨⟨7983041404076494142436557692759097738012460354478276979,7983041404076494142436557692759097738012460354483742866⟩,⟨-4231604208745069326842952071563733835768120271001659131,-4231604208745069326842952071563733835768120270996208274⟩⟩] +lemma tw1_1_1_13_calc (j : Fin 31) : taylorWaveBox 1 1 1 13 j = tw1_1_1_13 j := by + revert j + decide +kernel +def tw1_1_1_14 : Fin 31 → CI := ![⟨⟨-1547868926718254035718604769712706950137042966748452005,-1547868926718254035718604769712706950137042966746890180⟩,⟨1442080140667909636475524719392068584619901149364717257,1442080140667909636475524719392068584619901149366283435⟩⟩, + ⟨⟨-2135785612758927185427336452912459874270645617188950848,-2135785612758927185427336452912459874270645617186765690⟩,⟨-714415340139840075655074250421965289411568539382053328,-714415340139840075655074250421965289411568539379867890⟩⟩, + ⟨⟨-316734743926508016476321878749314409469466046568482421,-316734743926508016476321878749314409469466046565592849⟩,⟨-2225287210078745263648345231288856362094825695319272079,-2225287210078745263648345231288856362094825695316382388⟩⟩, + ⟨⟨1738003427451093164956041166403336446900270035606748485,1738003427451093164956041166403336446900270035609770609⟩,⟨-1136506746825105045670751479315853968369923319350031524,-1136506746825105045670751479315853968369923319347009408⟩⟩, + ⟨⟨1475985135269147378928110584520807511656844659196214310,1475985135269147378928110584520807511656844659199182994⟩,⟨943972196631752373081243326562780029896869271526316917,943972196631752373081243326562780029896869271529284533⟩⟩, + ⟨⟨-192097057564538837157340667623020586107830966232522535,-192097057564538837157340667623020586107830966230089926⟩,⟨1317906452801281454334394813891578735586520244727039235,1317906452801281454334394813891578735586520244729472330⟩⟩, + ⟨⟨-860074885809219589465366573779164107866799543978639086,-860074885809219589465366573779164107866799543976824764⟩,⟨270058501855272436916036158158903372277358481037516160,270058501855272436916036158158903372277358481039330567⟩⟩, + ⟨⟨-390041843506344012484214281449090238667778186152985508,-390041843506344012484214281449090238667778186151710964⟩,⟨-372342796709694439341699961427668547880528846022060348,-372342796709694439341699961427668547880528846020785845⟩⟩, + ⟨⟨46589624643362171852374980622218388165549870236720381,46589624643362171852374980622218388165549870237483858⟩,⟨-281327257173889656032370596232754260237482968126369412,-281327257173889656032370596232754260237482968125605949⟩⟩, + ⟨⟨113564695758629278438811819964213471017841997090500798,113564695758629278438811819964213471017841997090822723⟩,⟨-73137392610933956828228339113032174237601386400935652,-73137392610933956828228339113032174237601386400613754⟩⟩, + ⟨⟨58939679793147564525763011852207025156463307024466864,58939679793147564525763011852207025156463307024578438⟩,⟨4594160721981643118284893983426522462576686051014223,4594160721981643118284893983426522462576686051125818⟩⟩, + ⟨⟨22079426198554291547853583912240116487135730028708336,22079426198554291547853583912240116487135730028739856⟩,⟨12145334593185488574214178623667312271806700824002469,12145334593185488574214178623667312271806700824034016⟩⟩, + ⟨⟨8757239631259466860363994362035357034671688751298208,8757239631259466860363994362035357034671688751306120⟩,⟨7089739062973504376648302606955439835879738987263158,7089739062973504376648302606955439835879738987271092⟩⟩, + ⟨⟨4704344605682429356612248192233445015337989975913919,4704344605682429356612248192233445015337989975917073⟩,⟨3347557205583903498295397148397804270933841489781071,3347557205583903498295397148397804270933841489784241⟩⟩, + ⟨⟨3458382958666678600005031822127556868959652108990962,3458382958666678600005031822127556868959652108991988⟩,⟨1315138253640153139289019068666698803274197855029784,1315138253640153139289019068666698803274197855030797⟩⟩, + ⟨⟨3164318242366179803739309997178438352955703483070516,3164318242366179803739309997178438352955703483070895⟩,⟨-4,5⟩⟩, + ⟨⟨3458382958666678600005031822127556868959652108990962,3458382958666678600005031822127556868959652108991988⟩,⟨-1315138253640153139289019068666698803274197855030797,-1315138253640153139289019068666698803274197855029784⟩⟩, + ⟨⟨4704344605682429356612248192233445015337989975913919,4704344605682429356612248192233445015337989975917073⟩,⟨-3347557205583903498295397148397804270933841489784241,-3347557205583903498295397148397804270933841489781071⟩⟩, + ⟨⟨8757239631259466860363994362035357034671688751298208,8757239631259466860363994362035357034671688751306120⟩,⟨-7089739062973504376648302606955439835879738987271092,-7089739062973504376648302606955439835879738987263158⟩⟩, + ⟨⟨22079426198554291547853583912240116487135730028708336,22079426198554291547853583912240116487135730028739856⟩,⟨-12145334593185488574214178623667312271806700824034016,-12145334593185488574214178623667312271806700824002469⟩⟩, + ⟨⟨58939679793147564525763011852207025156463307024466864,58939679793147564525763011852207025156463307024578438⟩,⟨-4594160721981643118284893983426522462576686051125818,-4594160721981643118284893983426522462576686051014223⟩⟩, + ⟨⟨113564695758629278438811819964213471017841997090500798,113564695758629278438811819964213471017841997090822723⟩,⟨73137392610933956828228339113032174237601386400613754,73137392610933956828228339113032174237601386400935652⟩⟩, + ⟨⟨46589624643362171852374980622218388165549870236720381,46589624643362171852374980622218388165549870237483858⟩,⟨281327257173889656032370596232754260237482968125605949,281327257173889656032370596232754260237482968126369412⟩⟩, + ⟨⟨-390041843506344012484214281449090238667778186152985508,-390041843506344012484214281449090238667778186151710964⟩,⟨372342796709694439341699961427668547880528846020785845,372342796709694439341699961427668547880528846022060348⟩⟩, + ⟨⟨-860074885809219589465366573779164107866799543978639086,-860074885809219589465366573779164107866799543976824764⟩,⟨-270058501855272436916036158158903372277358481039330567,-270058501855272436916036158158903372277358481037516160⟩⟩, + ⟨⟨-192097057564538837157340667623020586107830966232522535,-192097057564538837157340667623020586107830966230089926⟩,⟨-1317906452801281454334394813891578735586520244729472330,-1317906452801281454334394813891578735586520244727039235⟩⟩, + ⟨⟨1475985135269147378928110584520807511656844659196214310,1475985135269147378928110584520807511656844659199182994⟩,⟨-943972196631752373081243326562780029896869271529284533,-943972196631752373081243326562780029896869271526316917⟩⟩, + ⟨⟨1738003427451093164956041166403336446900270035606748485,1738003427451093164956041166403336446900270035609770609⟩,⟨1136506746825105045670751479315853968369923319347009408,1136506746825105045670751479315853968369923319350031524⟩⟩, + ⟨⟨-316734743926508016476321878749314409469466046568482421,-316734743926508016476321878749314409469466046565592849⟩,⟨2225287210078745263648345231288856362094825695316382388,2225287210078745263648345231288856362094825695319272079⟩⟩, + ⟨⟨-2135785612758927185427336452912459874270645617188950848,-2135785612758927185427336452912459874270645617186765690⟩,⟨714415340139840075655074250421965289411568539379867890,714415340139840075655074250421965289411568539382053328⟩⟩, + ⟨⟨-1547868926718254035718604769712706950137042966748452005,-1547868926718254035718604769712706950137042966746890180⟩,⟨-1442080140667909636475524719392068584619901149366283435,-1442080140667909636475524719392068584619901149364717257⟩⟩] +lemma tw1_1_1_14_calc (j : Fin 31) : taylorWaveBox 1 1 1 14 j = tw1_1_1_14 j := by + revert j + decide +kernel +def tw1_1_1_15 : Fin 31 → CI := ![⟨⟨-188685087528480848435298999539983349041980884730314846,-188685087528480848435298999539983349041980884729905244⟩,⟨-426310636726464885744306360953842157432569776301462247,-426310636726464885744306360953842157432569776301053396⟩⟩, + ⟨⟨335491036097660942875337202421498887387585103448037824,335491036097660942875337202421498887387585103448660149⟩,⟨-395406779155130299722271732865785032213574188476011612,-395406779155130299722271732865785032213574188475389045⟩⟩, + ⟨⟨518886468585867856094327881697391734095247095263993722,518886468585867856094327881697391734095247095264869466⟩,⟨154968453562747736867557745861808758382804380050122412,154968453562747736867557745861808758382804380050998140⟩⟩, + ⟨⟨48660108948452006023854783778295610135434400250491807,48660108948452006023854783778295610135434400251510711⟩,⟨521916827421345158417012239385525089413895614308166170,521916827421345158417012239385525089413895614309185328⟩⟩, + ⟨⟨-416283998108803581950735638048478511557895883560026306,-416283998108803581950735638048478511557895883559017171⟩,⟨204636211222778102605728726859643553505732749732222283,204636211222778102605728726859643553505732749733231473⟩⟩, + ⟨⟨-270043644922799222328641388033622789887903552244165955,-270043644922799222328641388033622789887903552243249664⟩,⟨-253142746697890559132943106596659449049245884617629523,-253142746697890559132943106596659449049245884616713422⟩⟩, + ⟨⟨95824610845990654559914760753482279475293663550877233,95824610845990654559914760753482279475293663551607847⟩,⟨-245021750007936324802603144423791088706342458465009910,-245021750007936324802603144423791088706342458464279210⟩⟩, + ⟨⟨164957304231916496271789406772846913705213433427190364,164957304231916496271789406772846913705213433427712394⟩,⟨-9434487692520489174383334425720188727893225428724580,-9434487692520489174383334425720188727893225428202554⟩⟩, + ⟨⟨49803339798183022132864831224835514282065786829486608,49803339798183022132864831224835514282065786829808459⟩,⟨76933516517912754838059137691823885305332252273581701,76933516517912754838059137691823885305332252273903551⟩⟩, + ⟨⟨-15469868254626414919998941326151531858232204484569361,-15469868254626414919998941326151531858232204484428945⟩,⟨42730804271061842927828207797431769830629127733674859,42730804271061842927828207797431769830629127733815278⟩⟩, + ⟨⟨-18415955779559375729584068467492329950581719884630028,-18415955779559375729584068467492329950581719884579988⟩,⟨9570578501416547607854741743380386530183355944228377,9570578501416547607854741743380386530183355944278415⟩⟩, + ⟨⟨-9178687834667204611984569468820674444970280375158450,-9178687834667204611984569468820674444970280375145026⟩,⟨-430604807917906819397272974266091516727832251278786,-430604807917906819397272974266091516727832251265363⟩⟩, + ⟨⟨-4009732449456321532364702961469860953039049600450844,-4009732449456321532364702961469860953039049600447369⟩,⟨-1382155741210721240484313589765161369461599749923407,-1382155741210721240484313589765161369461599749919929⟩⟩, + ⟨⟨-2065326922893588899260912989754917723366028500158974,-2065326922893588899260912989754917723366028500157617⟩,⟨-831357289384652683365867272714458793720860286959033,-831357289384652683365867272714458793720860286957670⟩⟩, + ⟨⟨-1405310453644198791113540882384084020229006018743248,-1405310453644198791113540882384084020229006018742810⟩,⟨-350523854373996334529049052077548797722289854680317,-350523854373996334529049052077548797722289854679884⟩⟩, + ⟨⟨-1245043339037225581568534845761853604362687177711851,-1245043339037225581568534845761853604362687177711697⟩,⟨-2,2⟩⟩, + ⟨⟨-1405310453644198791113540882384084020229006018743248,-1405310453644198791113540882384084020229006018742810⟩,⟨350523854373996334529049052077548797722289854679884,350523854373996334529049052077548797722289854680317⟩⟩, + ⟨⟨-2065326922893588899260912989754917723366028500158974,-2065326922893588899260912989754917723366028500157617⟩,⟨831357289384652683365867272714458793720860286957670,831357289384652683365867272714458793720860286959033⟩⟩, + ⟨⟨-4009732449456321532364702961469860953039049600450844,-4009732449456321532364702961469860953039049600447369⟩,⟨1382155741210721240484313589765161369461599749919929,1382155741210721240484313589765161369461599749923407⟩⟩, + ⟨⟨-9178687834667204611984569468820674444970280375158450,-9178687834667204611984569468820674444970280375145026⟩,⟨430604807917906819397272974266091516727832251265363,430604807917906819397272974266091516727832251278786⟩⟩, + ⟨⟨-18415955779559375729584068467492329950581719884630028,-18415955779559375729584068467492329950581719884579988⟩,⟨-9570578501416547607854741743380386530183355944278415,-9570578501416547607854741743380386530183355944228377⟩⟩, + ⟨⟨-15469868254626414919998941326151531858232204484569361,-15469868254626414919998941326151531858232204484428945⟩,⟨-42730804271061842927828207797431769830629127733815278,-42730804271061842927828207797431769830629127733674859⟩⟩, + ⟨⟨49803339798183022132864831224835514282065786829486608,49803339798183022132864831224835514282065786829808459⟩,⟨-76933516517912754838059137691823885305332252273903551,-76933516517912754838059137691823885305332252273581701⟩⟩, + ⟨⟨164957304231916496271789406772846913705213433427190364,164957304231916496271789406772846913705213433427712394⟩,⟨9434487692520489174383334425720188727893225428202554,9434487692520489174383334425720188727893225428724580⟩⟩, + ⟨⟨95824610845990654559914760753482279475293663550877233,95824610845990654559914760753482279475293663551607847⟩,⟨245021750007936324802603144423791088706342458464279210,245021750007936324802603144423791088706342458465009910⟩⟩, + ⟨⟨-270043644922799222328641388033622789887903552244165955,-270043644922799222328641388033622789887903552243249664⟩,⟨253142746697890559132943106596659449049245884616713422,253142746697890559132943106596659449049245884617629523⟩⟩, + ⟨⟨-416283998108803581950735638048478511557895883560026306,-416283998108803581950735638048478511557895883559017171⟩,⟨-204636211222778102605728726859643553505732749733231473,-204636211222778102605728726859643553505732749732222283⟩⟩, + ⟨⟨48660108948452006023854783778295610135434400250491807,48660108948452006023854783778295610135434400251510711⟩,⟨-521916827421345158417012239385525089413895614309185328,-521916827421345158417012239385525089413895614308166170⟩⟩, + ⟨⟨518886468585867856094327881697391734095247095263993722,518886468585867856094327881697391734095247095264869466⟩,⟨-154968453562747736867557745861808758382804380050998140,-154968453562747736867557745861808758382804380050122412⟩⟩, + ⟨⟨335491036097660942875337202421498887387585103448037824,335491036097660942875337202421498887387585103448660149⟩,⟨395406779155130299722271732865785032213574188475389045,395406779155130299722271732865785032213574188476011612⟩⟩, + ⟨⟨-188685087528480848435298999539983349041980884730314846,-188685087528480848435298999539983349041980884729905244⟩,⟨426310636726464885744306360953842157432569776301053396,426310636726464885744306360953842157432569776301462247⟩⟩] +lemma tw1_1_1_15_calc (j : Fin 31) : taylorWaveBox 1 1 1 15 j = tw1_1_1_15 j := by + revert j + decide +kernel +def tw1_1_1_16 : Fin 31 → CI := ![⟨⟨96692211611103417437914841771477217526959540497401591,96692211611103417437914841771477217526959540497501253⟩,⟨-8076520322672595944231476973732039810442970728787688,-8076520322672595944231476973732039810442970728687968⟩⟩, + ⟨⟨52710648543126366830979289534446116647204134601491074,52710648543126366830979289534446116647204134601664550⟩,⟨99688878243876445430580681109837295440172496422215826,99688878243876445430580681109837295440172496422389212⟩⟩, + ⟨⟨-81419670074331628055981331509453835660931794792287597,-81419670074331628055981331509453835660931794792039741⟩,⟨92489513999822697545443701682120145447752929130122515,92489513999822697545443701682120145447752929130370369⟩⟩, + ⟨⟨-115427566563560670235577574730249376441069390537351601,-115427566563560670235577574730249376441069390537031804⟩,⟨-47878493285837217647745049963745652460515680108714826,-47878493285837217647745049963745652460515680108395087⟩⟩, + ⟨⟨10196579467918860971499832303853178750109071811468750,10196579467918860971499832303853178750109071811809406⟩,⟨-115538866875168104774357397854036776114200884676099694,-115538866875168104774357397854036776114200884675758973⟩⟩, + ⟨⟨95033670337847640444357659496320215668824816504241207,95033670337847640444357659496320215668824816504558349⟩,⟨-20188662362725224527177502915940468728176203461927558,-20188662362725224527177502915940468728176203461610416⟩⟩, + ⟨⟨36092365042964395876724978740837569459797530394083013,36092365042964395876724978740837569459797530394356625⟩,⟨62897415311240091493230782220911476283489763198197097,62897415311240091493230782220911476283489763198470694⟩⟩, + ⟨⟨-30595860875799572071975791190129342093976210729798971,-30595860875799572071975791190129342093976210729588612⟩,⟨36744270152665986353378812818308625704410235124323113,36744270152665986353378812818308625704410235124533476⟩⟩, + ⟨⟨-26899651459814820058215874399715678514481035896962403,-26899651459814820058215874399715678514481035896824419⟩,⟨-7088281504445408929510248925004807454827712311482910,-7088281504445408929510248925004807454827712311344925⟩⟩, + ⟨⟨-4321521115481202213137147636108329785657677699578819,-4321521115481202213137147636108329785657677699516636⟩,⟨-13778011924012227005476021440653655875493121863135897,-13778011924012227005476021440653655875493121863073710⟩⟩, + ⟨⟨3505166649138084626691861364544491828049472091507496,3505166649138084626691861364544491828049472091530297⟩,⟨-5921690068845876089393215022088471446711746203702924,-5921690068845876089393215022088471446711746203680126⟩⟩, + ⟨⟨2903289304864314660742237567664300549101736722986323,2903289304864314660742237567664300549101736722992352⟩,⟨-1258900465891515642388974709273690895566537113076772,-1258900465891515642388974709273690895566537113070747⟩⟩, + ⟨⟨1507592035068357482493358980006421058258026587355399,1507592035068357482493358980006421058258026587356831⟩,⟨-25130152934670716327418448418514994884602902661538,-25130152934670716327418448418514994884602902660108⟩⟩, + ⟨⟨802056303700877958854037763689235742194751922860920,802056303700877958854037763689235742194751922861465⟩,⟨118685887711322694861385136222330280641042795837032,118685887711322694861385136222330280641042795837577⟩⟩, + ⟨⟨531254525784833178361714755313666832628796559678148,531254525784833178361714755313666832628796559678323⟩,⟨67020849759307414279345525641899042405404593123677,67020849759307414279345525641899042405404593123851⟩⟩, + ⟨⟨462663458163546657161625732252290837432314667505694,462663458163546657161625732252290837432314667505753⟩,⟨-1,1⟩⟩, + ⟨⟨531254525784833178361714755313666832628796559678148,531254525784833178361714755313666832628796559678323⟩,⟨-67020849759307414279345525641899042405404593123851,-67020849759307414279345525641899042405404593123677⟩⟩, + ⟨⟨802056303700877958854037763689235742194751922860920,802056303700877958854037763689235742194751922861465⟩,⟨-118685887711322694861385136222330280641042795837577,-118685887711322694861385136222330280641042795837032⟩⟩, + ⟨⟨1507592035068357482493358980006421058258026587355399,1507592035068357482493358980006421058258026587356831⟩,⟨25130152934670716327418448418514994884602902660108,25130152934670716327418448418514994884602902661538⟩⟩, + ⟨⟨2903289304864314660742237567664300549101736722986323,2903289304864314660742237567664300549101736722992352⟩,⟨1258900465891515642388974709273690895566537113070747,1258900465891515642388974709273690895566537113076772⟩⟩, + ⟨⟨3505166649138084626691861364544491828049472091507496,3505166649138084626691861364544491828049472091530297⟩,⟨5921690068845876089393215022088471446711746203680126,5921690068845876089393215022088471446711746203702924⟩⟩, + ⟨⟨-4321521115481202213137147636108329785657677699578819,-4321521115481202213137147636108329785657677699516636⟩,⟨13778011924012227005476021440653655875493121863073710,13778011924012227005476021440653655875493121863135897⟩⟩, + ⟨⟨-26899651459814820058215874399715678514481035896962403,-26899651459814820058215874399715678514481035896824419⟩,⟨7088281504445408929510248925004807454827712311344925,7088281504445408929510248925004807454827712311482910⟩⟩, + ⟨⟨-30595860875799572071975791190129342093976210729798971,-30595860875799572071975791190129342093976210729588612⟩,⟨-36744270152665986353378812818308625704410235124533476,-36744270152665986353378812818308625704410235124323113⟩⟩, + ⟨⟨36092365042964395876724978740837569459797530394083013,36092365042964395876724978740837569459797530394356625⟩,⟨-62897415311240091493230782220911476283489763198470694,-62897415311240091493230782220911476283489763198197097⟩⟩, + ⟨⟨95033670337847640444357659496320215668824816504241207,95033670337847640444357659496320215668824816504558349⟩,⟨20188662362725224527177502915940468728176203461610416,20188662362725224527177502915940468728176203461927558⟩⟩, + ⟨⟨10196579467918860971499832303853178750109071811468750,10196579467918860971499832303853178750109071811809406⟩,⟨115538866875168104774357397854036776114200884675758973,115538866875168104774357397854036776114200884676099694⟩⟩, + ⟨⟨-115427566563560670235577574730249376441069390537351601,-115427566563560670235577574730249376441069390537031804⟩,⟨47878493285837217647745049963745652460515680108395087,47878493285837217647745049963745652460515680108714826⟩⟩, + ⟨⟨-81419670074331628055981331509453835660931794792287597,-81419670074331628055981331509453835660931794792039741⟩,⟨-92489513999822697545443701682120145447752929130370369,-92489513999822697545443701682120145447752929130122515⟩⟩, + ⟨⟨52710648543126366830979289534446116647204134601491074,52710648543126366830979289534446116647204134601664550⟩,⟨-99688878243876445430580681109837295440172496422389212,-99688878243876445430580681109837295440172496422215826⟩⟩, + ⟨⟨96692211611103417437914841771477217526959540497401591,96692211611103417437914841771477217526959540497501253⟩,⟨8076520322672595944231476973732039810442970728687968,8076520322672595944231476973732039810442970728787688⟩⟩] +lemma tw1_1_1_16_calc (j : Fin 31) : taylorWaveBox 1 1 1 16 j = tw1_1_1_16 j := by + revert j + decide +kernel +def tw1_1_1_17 : Fin 31 → CI := ![⟨⟨-4733459889607789923644964582992895165340867126109839,-4733459889607789923644964582992895165340867126086532⟩,⟨18536672482211463784652778892755004589856593627933964,18536672482211463784652778892755004589856593627957284⟩⟩, + ⟨⟨-23102461012072704054412647767358961753000791219543065,-23102461012072704054412647767358961753000791219498245⟩,⟨2448168164086237353256507579136519795847965442507968,2448168164086237353256507579136519795847965442552803⟩⟩, + ⟨⟨-10766908860302740740091172136175152144687663867507506,-10766908860302740740091172136175152144687663867437318⟩,⟨-24282228147917807448389750302018635919270442857238445,-24282228147917807448389750302018635919270442857168255⟩⟩, + ⟨⟨21740954838441423934922351583529568086757107888924744,21740954838441423934922351583529568086757107889018473⟩,⟨-17996483780709273098514197428001966791252018803182567,-17996483780709273098514197428001966791252018803088835⟩⟩, + ⟨⟨22153829551598571767480061728508705917179912275147993,22153829551598571767480061728508705917179912275256851⟩,⟨16252528545656908418146613584364606801324901356372405,16252528545656908418146613584364606801324901356481247⟩⟩, + ⟨⟨-9386542565615885520537344311214095324351381675098686,-9386542565615885520537344311214095324351381674989207⟩,⟨22260780692110062063167111770048123693977768407294972,22260780692110062063167111770048123693977768407404465⟩⟩, + ⟨⟨-18705921590405766057450930863081237919330477769767798,-18705921590405766057450930863081237919330477769669683⟩,⟨-2943756541928430580549840327252903886827557354723580,-2943756541928430580549840327252903886827557354625468⟩⟩, + ⟨⟨-1633959021984531335139965900249448631994999550240884,-1633959021984531335139965900249448631994999550162012⟩,⟨-13006526220397729419376729810213465872019897730334690,-13006526220397729419376729810213465872019897730255818⟩⟩, + ⟨⟨7091682454449717255373850467370067002258347242630851,7091682454449717255373850467370067002258347242684941⟩,⟨-3700840842839843133830700596109758932278563114455324,-3700840842839843133830700596109758932278563114401233⟩⟩, + ⟨⟨3548824666546422395091468535303574354214910490770097,3548824666546422395091468535303574354214910490795320⟩,⟨2509896554644648550907356553656310804629457960707379,2509896554644648550907356553656310804629457960732603⟩⟩, + ⟨⟨48861201352891186289944218538094616116640310090848,48861201352891186289944218538094616116640310100422⟩,⟨2160938898062234877677322373027806874467906393778488,2160938898062234877677322373027806874467906393788061⟩⟩, + ⟨⟨-669553664247808624622707422201120782610594698007086,-669553664247808624622707422201120782610594698004542⟩,⟨785895092768819052992184292734003361590080588202505,785895092768819052992184292734003361590080588205048⟩⟩, + ⟨⟨-474318296657574417398123477129975156520734625258767,-474318296657574417398123477129975156520734625258148⟩,⟨181400081159179943719099801993978603168329547481307,181400081159179943719099801993978603168329547481925⟩⟩, + ⟨⟨-278625678461470723584401008538028625312959782094189,-278625678461470723584401008538028625312959782093983⟩,⟨24825246996655498157504045738112796017641812251887,24825246996655498157504045738112796017641812252093⟩⟩, + ⟨⟨-187540048316138539956798871846531490847079748943223,-187540048316138539956798871846531490847079748943156⟩,⟨-1227551199091843813215797963627333392255777664189,-1227551199091843813215797963627333392255777664122⟩⟩, + ⟨⟨-162878902476254409538289795472715755717530816721100,-162878902476254409538289795472715755717530816721078⟩,⟨-1,1⟩⟩, + ⟨⟨-187540048316138539956798871846531490847079748943223,-187540048316138539956798871846531490847079748943156⟩,⟨1227551199091843813215797963627333392255777664122,1227551199091843813215797963627333392255777664189⟩⟩, + ⟨⟨-278625678461470723584401008538028625312959782094189,-278625678461470723584401008538028625312959782093983⟩,⟨-24825246996655498157504045738112796017641812252093,-24825246996655498157504045738112796017641812251887⟩⟩, + ⟨⟨-474318296657574417398123477129975156520734625258767,-474318296657574417398123477129975156520734625258148⟩,⟨-181400081159179943719099801993978603168329547481925,-181400081159179943719099801993978603168329547481307⟩⟩, + ⟨⟨-669553664247808624622707422201120782610594698007086,-669553664247808624622707422201120782610594698004542⟩,⟨-785895092768819052992184292734003361590080588205048,-785895092768819052992184292734003361590080588202505⟩⟩, + ⟨⟨48861201352891186289944218538094616116640310090848,48861201352891186289944218538094616116640310100422⟩,⟨-2160938898062234877677322373027806874467906393788061,-2160938898062234877677322373027806874467906393778488⟩⟩, + ⟨⟨3548824666546422395091468535303574354214910490770097,3548824666546422395091468535303574354214910490795320⟩,⟨-2509896554644648550907356553656310804629457960732603,-2509896554644648550907356553656310804629457960707379⟩⟩, + ⟨⟨7091682454449717255373850467370067002258347242630851,7091682454449717255373850467370067002258347242684941⟩,⟨3700840842839843133830700596109758932278563114401233,3700840842839843133830700596109758932278563114455324⟩⟩, + ⟨⟨-1633959021984531335139965900249448631994999550240884,-1633959021984531335139965900249448631994999550162012⟩,⟨13006526220397729419376729810213465872019897730255818,13006526220397729419376729810213465872019897730334690⟩⟩, + ⟨⟨-18705921590405766057450930863081237919330477769767798,-18705921590405766057450930863081237919330477769669683⟩,⟨2943756541928430580549840327252903886827557354625468,2943756541928430580549840327252903886827557354723580⟩⟩, + ⟨⟨-9386542565615885520537344311214095324351381675098686,-9386542565615885520537344311214095324351381674989207⟩,⟨-22260780692110062063167111770048123693977768407404465,-22260780692110062063167111770048123693977768407294972⟩⟩, + ⟨⟨22153829551598571767480061728508705917179912275147993,22153829551598571767480061728508705917179912275256851⟩,⟨-16252528545656908418146613584364606801324901356481247,-16252528545656908418146613584364606801324901356372405⟩⟩, + ⟨⟨21740954838441423934922351583529568086757107888924744,21740954838441423934922351583529568086757107889018473⟩,⟨17996483780709273098514197428001966791252018803088835,17996483780709273098514197428001966791252018803182567⟩⟩, + ⟨⟨-10766908860302740740091172136175152144687663867507506,-10766908860302740740091172136175152144687663867437318⟩,⟨24282228147917807448389750302018635919270442857168255,24282228147917807448389750302018635919270442857238445⟩⟩, + ⟨⟨-23102461012072704054412647767358961753000791219543065,-23102461012072704054412647767358961753000791219498245⟩,⟨-2448168164086237353256507579136519795847965442552803,-2448168164086237353256507579136519795847965442507968⟩⟩, + ⟨⟨-4733459889607789923644964582992895165340867126109839,-4733459889607789923644964582992895165340867126086532⟩,⟨-18536672482211463784652778892755004589856593627957284,-18536672482211463784652778892755004589856593627933964⟩⟩] +lemma tw1_1_1_17_calc (j : Fin 31) : taylorWaveBox 1 1 1 17 j = tw1_1_1_17 j := by + revert j + decide +kernel +def tw1_1_1_18 : Fin 31 → CI := ![⟨⟨-2990930344983128839946057461977649354608816758157094,-2990930344983128839946057461977649354608816758151546⟩,⟨-1973967068590569294604412728370791693739193243718803,-1973967068590569294604412728370791693739193243713262⟩⟩, + ⟨⟨1235693351271594814400116403228016341219479321131786,1235693351271594814400116403228016341219479321142706⟩,⟨-4375708487449041341880789131091279849053875283323435,-4375708487449041341880789131091279849053875283312516⟩⟩, + ⟨⟨5439056238956279675043835347810387188779441296352236,5439056238956279675043835347810387188779441296371033⟩,⟨77512560600667677712777076985168321656220179743482,77512560600667677712777076985168321656220179762279⟩⟩, + ⟨⟨1234403206080801212682039269068704195199841253853153,1234403206080801212682039269068704195199841253879964⟩,⟨5928341581648162294840874483184399722395507724693830,5928341581648162294840874483184399722395507724720643⟩⟩, + ⟨⟨-5712049567434074684603869188245656196893157969095428,-5712049567434074684603869188245656196893157969062768⟩,⟨2367674882295578311146941489570297164655601141116539,2367674882295578311146941489570297164655601141149199⟩⟩, + ⟨⟨-3047891589178340461015646216692054258074454520005924,-3047891589178340461015646216692054258074454519970607⟩,⟨-4825039452350023994205198575080426478199723417356637,-4825039452350023994205198575080426478199723417321323⟩⟩, + ⟨⟨3476339525342247444599150024245953382972644279974353,3476339525342247444599150024245953382972644280008208⟩,⟨-3159338008161359600296593177198745189939859811003761,-3159338008161359600296593177198745189939859810969904⟩⟩, + ⟨⟨2765752390057785456480994456610398151336984762797739,2765752390057785456480994456610398151336984762826624⟩,⟨2001790523415680007458258017988173948474525938965664,2001790523415680007458258017988173948474525938994549⟩⟩, + ⟨⟨-751747752789982358486347143982928502428904362988477,-751747752789982358486347143982928502428904362967688⟩,⟨2051865137030969248512465350504692835925459890453430,2051865137030969248512465350504692835925459890474220⟩⟩, + ⟨⟨-1242229612840586320940401081730204842162426599922904,-1242229612840586320940401081730204842162426599912901⟩,⟨44384161527345703399609180498899442132232392868624,44384161527345703399609180498899442132232392878627⟩⟩, + ⟨⟨-353297356663379739135382333807430901977960426493750,-353297356663379739135382333807430901977960426489913⟩,⟨-539633091228366363144090518215901417411987157239508,-539633091228366363144090518215901417411987157235672⟩⟩, + ⟨⟨79049018679237969183717083097145265404079218941161,79049018679237969183717083097145265404079218942158⟩,⟨-310083854301322950831277827609889843514663255617628,-310083854301322950831277827609889843514663255616631⟩⟩, + ⟨⟨122806338110552568181744568832358656313367753167779,122806338110552568181744568832358656313367753168028⟩,⟨-106389839875813332608723778409379143632959694243303,-106389839875813332608723778409379143632959694243055⟩⟩, + ⟨⟨86894551145159403453215754723655257875775984739424,86894551145159403453215754723655257875775984739498⟩,⟨-29244037205123061394377699745392226072166874400186,-29244037205123061394377699745392226072166874400112⟩⟩, + ⟨⟨62008266257370773943659060480920965982079985744842,62008266257370773943659060480920965982079985744866⟩,⟨-6999353407708741403909071612239424044362906824900,-6999353407708741403909071612239424044362906824876⟩⟩, + ⟨⟨54473850449124337237986883283827245982538101570820,54473850449124337237986883283827245982538101570828⟩,⟨-1,1⟩⟩, + ⟨⟨62008266257370773943659060480920965982079985744842,62008266257370773943659060480920965982079985744866⟩,⟨6999353407708741403909071612239424044362906824876,6999353407708741403909071612239424044362906824900⟩⟩, + ⟨⟨86894551145159403453215754723655257875775984739424,86894551145159403453215754723655257875775984739498⟩,⟨29244037205123061394377699745392226072166874400112,29244037205123061394377699745392226072166874400186⟩⟩, + ⟨⟨122806338110552568181744568832358656313367753167779,122806338110552568181744568832358656313367753168028⟩,⟨106389839875813332608723778409379143632959694243055,106389839875813332608723778409379143632959694243303⟩⟩, + ⟨⟨79049018679237969183717083097145265404079218941161,79049018679237969183717083097145265404079218942158⟩,⟨310083854301322950831277827609889843514663255616631,310083854301322950831277827609889843514663255617628⟩⟩, + ⟨⟨-353297356663379739135382333807430901977960426493750,-353297356663379739135382333807430901977960426489913⟩,⟨539633091228366363144090518215901417411987157235672,539633091228366363144090518215901417411987157239508⟩⟩, + ⟨⟨-1242229612840586320940401081730204842162426599922904,-1242229612840586320940401081730204842162426599912901⟩,⟨-44384161527345703399609180498899442132232392878627,-44384161527345703399609180498899442132232392868624⟩⟩, + ⟨⟨-751747752789982358486347143982928502428904362988477,-751747752789982358486347143982928502428904362967688⟩,⟨-2051865137030969248512465350504692835925459890474220,-2051865137030969248512465350504692835925459890453430⟩⟩, + ⟨⟨2765752390057785456480994456610398151336984762797739,2765752390057785456480994456610398151336984762826624⟩,⟨-2001790523415680007458258017988173948474525938994549,-2001790523415680007458258017988173948474525938965664⟩⟩, + ⟨⟨3476339525342247444599150024245953382972644279974353,3476339525342247444599150024245953382972644280008208⟩,⟨3159338008161359600296593177198745189939859810969904,3159338008161359600296593177198745189939859811003761⟩⟩, + ⟨⟨-3047891589178340461015646216692054258074454520005924,-3047891589178340461015646216692054258074454519970607⟩,⟨4825039452350023994205198575080426478199723417321323,4825039452350023994205198575080426478199723417356637⟩⟩, + ⟨⟨-5712049567434074684603869188245656196893157969095428,-5712049567434074684603869188245656196893157969062768⟩,⟨-2367674882295578311146941489570297164655601141149199,-2367674882295578311146941489570297164655601141116539⟩⟩, + ⟨⟨1234403206080801212682039269068704195199841253853153,1234403206080801212682039269068704195199841253879964⟩,⟨-5928341581648162294840874483184399722395507724720643,-5928341581648162294840874483184399722395507724693830⟩⟩, + ⟨⟨5439056238956279675043835347810387188779441296352236,5439056238956279675043835347810387188779441296371033⟩,⟨-77512560600667677712777076985168321656220179762279,-77512560600667677712777076985168321656220179743482⟩⟩, + ⟨⟨1235693351271594814400116403228016341219479321131786,1235693351271594814400116403228016341219479321142706⟩,⟨4375708487449041341880789131091279849053875283312516,4375708487449041341880789131091279849053875283323435⟩⟩, + ⟨⟨-2990930344983128839946057461977649354608816758157094,-2990930344983128839946057461977649354608816758151546⟩,⟨1973967068590569294604412728370791693739193243713262,1973967068590569294604412728370791693739193243718803⟩⟩] +lemma tw1_1_1_18_calc (j : Fin 31) : taylorWaveBox 1 1 1 18 j = tw1_1_1_18 j := by + revert j + decide +kernel +def tw1_1_1_19 : Fin 31 → CI := ![⟨⟨507347820002556747023571932436461690419166789253918,507347820002556747023571932436461690419166789255151⟩,⟨-388969201292409131276250080285638655664748537479933,-388969201292409131276250080285638655664748537478699⟩⟩, + ⟨⟨671582868459050181476455706388668020768055654706017,671582868459050181476455706388668020768055654708599⟩,⟨516969164187897667013328835636728930362659079192998,516969164187897667013328835636728930362659079195579⟩⟩, + ⟨⟨-457501227903970110688229094938460909651247574899187,-457501227903970110688229094938460909651247574894437⟩,⟨957202377815740334471526363964169239504617363516601,957202377815740334471526363964169239504617363521352⟩⟩, + ⟨⟨-1188898166967991662874447025743230498233022764790752,-1188898166967991662874447025743230498233022764783408⟩,⟨-342993574224059602949874663397543505250348842419252,-342993574224059602949874663397543505250348842411909⟩⟩, + ⟨⟨200616114321025681886803716661785073147877678726791,200616114321025681886803716661785073147877678736366⟩,⟨-1309978724831280399347301829042796675077424684053931,-1309978724831280399347301829042796675077424684044355⟩⟩, + ⟨⟨1282689808244532528569272275948071799824326220177908,1282689808244532528569272275948071799824326220188807⟩,⟨57728646210977003294195402215609171448756679984307,57728646210977003294195402215609171448756679995206⟩⟩, + ⟨⟨67233647678658276959054245802911181909575981101352,67233647678658276959054245802911181909575981112389⟩,⟨1107774888722330937564413308733727220344997094878175,1107774888722330937564413308733727220344997094889212⟩⟩, + ⟨⟨-831181719533218296447477391005554359267202979473578,-831181719533218296447477391005554359267202979463637⟩,⟨162277381655710768173266271624694124484145516097343,162277381655710768173266271624694124484145516107283⟩⟩, + ⟨⟨-214807264844551198468085748149169162255913567646622,-214807264844551198468085748149169162255913567639105⟩,⟨-526396126835956468880320769961463951079490412950279,-526396126835956468880320769961463951079490412942761⟩⟩, + ⟨⟨261742289558331301596953859314797788204952776395244,261742289558331301596953859314797788204952776399011⟩,⟨-214709319029934614116425197923327268714186433849236,-214709319029934614116425197923327268714186433845469⟩⟩, + ⟨⟨166306380177323271823231071208427598165582155525213,166306380177323271823231071208427598165582155526710⟩,⟨77090422344491843673427810593881532214086940775580,77090422344491843673427810593881532214086940777077⟩⟩, + ⟨⟨19359387797427857924350812296666134611481214445629,19359387797427857924350812296666134611481214446009⟩,⟨92455079391361038252066047071402565783030247605179,92455079391361038252066047071402565783030247605559⟩⟩, + ⟨⟨-24096413290957761464872337288981955148710287525657,-24096413290957761464872337288981955148710287525563⟩,⟨43252143938489571756050369016521083056849491588443,43252143938489571756050369016521083056849491588537⟩⟩, + ⟨⟨-24241350326878019751124757739399687854408833877583,-24241350326878019751124757739399687854408833877554⟩,⟨15212106223970940903871595819813995760754567755394,15212106223970940903871595819813995760754567755422⟩⟩, + ⟨⟨-19247647534366354790704391643625683326547802078892,-19247647534366354790704391643625683326547802078883⟩,⟨4534114149087587405863001929976276546550809903176,4534114149087587405863001929976276546550809903185⟩⟩, + ⟨⟨-17350900329368618182292360042396372416131919426809,-17350900329368618182292360042396372416131919426806⟩,⟨-1,1⟩⟩, + ⟨⟨-19247647534366354790704391643625683326547802078892,-19247647534366354790704391643625683326547802078883⟩,⟨-4534114149087587405863001929976276546550809903185,-4534114149087587405863001929976276546550809903176⟩⟩, + ⟨⟨-24241350326878019751124757739399687854408833877583,-24241350326878019751124757739399687854408833877554⟩,⟨-15212106223970940903871595819813995760754567755422,-15212106223970940903871595819813995760754567755394⟩⟩, + ⟨⟨-24096413290957761464872337288981955148710287525657,-24096413290957761464872337288981955148710287525563⟩,⟨-43252143938489571756050369016521083056849491588537,-43252143938489571756050369016521083056849491588443⟩⟩, + ⟨⟨19359387797427857924350812296666134611481214445629,19359387797427857924350812296666134611481214446009⟩,⟨-92455079391361038252066047071402565783030247605559,-92455079391361038252066047071402565783030247605179⟩⟩, + ⟨⟨166306380177323271823231071208427598165582155525213,166306380177323271823231071208427598165582155526710⟩,⟨-77090422344491843673427810593881532214086940777077,-77090422344491843673427810593881532214086940775580⟩⟩, + ⟨⟨261742289558331301596953859314797788204952776395244,261742289558331301596953859314797788204952776399011⟩,⟨214709319029934614116425197923327268714186433845469,214709319029934614116425197923327268714186433849236⟩⟩, + ⟨⟨-214807264844551198468085748149169162255913567646622,-214807264844551198468085748149169162255913567639105⟩,⟨526396126835956468880320769961463951079490412942761,526396126835956468880320769961463951079490412950279⟩⟩, + ⟨⟨-831181719533218296447477391005554359267202979473578,-831181719533218296447477391005554359267202979463637⟩,⟨-162277381655710768173266271624694124484145516107283,-162277381655710768173266271624694124484145516097343⟩⟩, + ⟨⟨67233647678658276959054245802911181909575981101352,67233647678658276959054245802911181909575981112389⟩,⟨-1107774888722330937564413308733727220344997094889212,-1107774888722330937564413308733727220344997094878175⟩⟩, + ⟨⟨1282689808244532528569272275948071799824326220177908,1282689808244532528569272275948071799824326220188807⟩,⟨-57728646210977003294195402215609171448756679995206,-57728646210977003294195402215609171448756679984307⟩⟩, + ⟨⟨200616114321025681886803716661785073147877678726791,200616114321025681886803716661785073147877678736366⟩,⟨1309978724831280399347301829042796675077424684044355,1309978724831280399347301829042796675077424684053931⟩⟩, + ⟨⟨-1188898166967991662874447025743230498233022764790752,-1188898166967991662874447025743230498233022764783408⟩,⟨342993574224059602949874663397543505250348842411909,342993574224059602949874663397543505250348842419252⟩⟩, + ⟨⟨-457501227903970110688229094938460909651247574899187,-457501227903970110688229094938460909651247574894437⟩,⟨-957202377815740334471526363964169239504617363521352,-957202377815740334471526363964169239504617363516601⟩⟩, + ⟨⟨671582868459050181476455706388668020768055654706017,671582868459050181476455706388668020768055654708599⟩,⟨-516969164187897667013328835636728930362659079195579,-516969164187897667013328835636728930362659079192998⟩⟩, + ⟨⟨507347820002556747023571932436461690419166789253918,507347820002556747023571932436461690419166789255151⟩,⟨388969201292409131276250080285638655664748537478699,388969201292409131276250080285638655664748537479933⟩⟩] +lemma tw1_1_1_19_calc (j : Fin 31) : taylorWaveBox 1 1 1 19 j = tw1_1_1_19 j := by + revert j + decide +kernel +def tw1_1_1_20 : Fin 31 → CI := ![⟨⟨34320848136236669200062252398067580403825327518817,34320848136236669200062252398067580403825327519078⟩,⟨103311294385969880993605739690214382149567743183869,103311294385969880993605739690214382149567743184130⟩⟩, + ⟨⟨-129803086042227966793752492807966762441584166533573,-129803086042227966793752492807966762441584166532977⟩,⟨76744194497462938840048931999757360412325076931767,76744194497462938840048931999757360412325076932363⟩⟩, + ⟨⟨-126229769534194413485212148998482874456909960932128,-126229769534194413485212148998482874456909960930977⟩,⟨-151910014075705425251685424255228939502111918635295,-151910014075705425251685424255228939502111918634144⟩⟩, + ⟨⟨167500493062246028724169908631341044214310599155680,167500493062246028724169908631341044214310599157587⟩,⟨-173770276622637067364487084527432667297172441095633,-173770276622637067364487084527432667297172441093727⟩⟩, + ⟨⟨207913513970043297432032146081620995182501258465552,207913513970043297432032146081620995182501258468221⟩,⟨174015667896422692266947210921558884243191400954491,174015667896422692266947210921558884243191400957160⟩⟩, + ⟨⟨-167608813173975157278747260963470528829052278488523,-167608813173975157278747260963470528829052278485277⟩,⟨218956237710507314609603348420971490670850006365361,218956237710507314609603348420971490670850006368608⟩⟩, + ⟨⟨-204218326081778035513415416985771645447583707904164,-204218326081778035513415416985771645447583707900669⟩,⟨-144694184439540773300230979603883104845963459372240,-144694184439540773300230979603883104845963459368744⟩⟩, + ⟨⟨106284946678125974592534555914543795312599990847815,106284946678125974592534555914543795312599990851138⟩,⟨-170030472579284847621367804423271709292149594218932,-170030472579284847621367804423271709292149594215609⟩⟩, + ⟨⟨127460094962198011569057224958762865559596500998332,127460094962198011569057224958762865559596501000959⟩,⟨60742355357774884660051480364398700550221548023914,60742355357774884660051480364398700550221548026541⟩⟩, + ⟨⟨-20279285522032991777906685190915127465098605806285,-20279285522032991777906685190915127465098605804930⟩,⟨85642768438065208707137767152077779415230382454691,85642768438065208707137767152077779415230382456046⟩⟩, + ⟨⟨-49350681510660937611589528274965806053900433062326,-49350681510660937611589528274965806053900433061774⟩,⟨6101133618453566903920906813194894324249889524260,6101133618453566903920906813194894324249889524812⟩⟩, + ⟨⟨-16369793445024714724057067808684438178588457989948,-16369793445024714724057067808684438178588457989805⟩,⟨-20986686436736272960564755633713146736458136919787,-20986686436736272960564755633713146736458136919644⟩⟩, + ⟨⟨2289799497548926416684851232317936705038770450881,2289799497548926416684851232317936705038770450916⟩,⟨-14218193333723644396401257968613226918277425072598,-14218193333723644396401257968613226918277425072564⟩⟩, + ⟨⟨5964355673764787956701850629656125904795356728411,5964355673764787956701850629656125904795356728422⟩,⟨-6094494169399510063743198773957438318673053649658,-6094494169399510063743198773957438318673053649647⟩⟩, + ⟨⟨5618221142571049068448520176370228374257873492769,5618221142571049068448520176370228374257873492773⟩,⟨-2052700782242358455335361770369800039189779229808,-2052700782242358455335361770369800039189779229804⟩⟩, + ⟨⟨5275365682056512968436655616557290952650257741303,5275365682056512968436655616557290952650257741305⟩,⟨-1,1⟩⟩, + ⟨⟨5618221142571049068448520176370228374257873492769,5618221142571049068448520176370228374257873492773⟩,⟨2052700782242358455335361770369800039189779229804,2052700782242358455335361770369800039189779229808⟩⟩, + ⟨⟨5964355673764787956701850629656125904795356728411,5964355673764787956701850629656125904795356728422⟩,⟨6094494169399510063743198773957438318673053649647,6094494169399510063743198773957438318673053649658⟩⟩, + ⟨⟨2289799497548926416684851232317936705038770450881,2289799497548926416684851232317936705038770450916⟩,⟨14218193333723644396401257968613226918277425072564,14218193333723644396401257968613226918277425072598⟩⟩, + ⟨⟨-16369793445024714724057067808684438178588457989948,-16369793445024714724057067808684438178588457989805⟩,⟨20986686436736272960564755633713146736458136919644,20986686436736272960564755633713146736458136919787⟩⟩, + ⟨⟨-49350681510660937611589528274965806053900433062326,-49350681510660937611589528274965806053900433061774⟩,⟨-6101133618453566903920906813194894324249889524812,-6101133618453566903920906813194894324249889524260⟩⟩, + ⟨⟨-20279285522032991777906685190915127465098605806285,-20279285522032991777906685190915127465098605804930⟩,⟨-85642768438065208707137767152077779415230382456046,-85642768438065208707137767152077779415230382454691⟩⟩, + ⟨⟨127460094962198011569057224958762865559596500998332,127460094962198011569057224958762865559596501000959⟩,⟨-60742355357774884660051480364398700550221548026541,-60742355357774884660051480364398700550221548023914⟩⟩, + ⟨⟨106284946678125974592534555914543795312599990847815,106284946678125974592534555914543795312599990851138⟩,⟨170030472579284847621367804423271709292149594215609,170030472579284847621367804423271709292149594218932⟩⟩, + ⟨⟨-204218326081778035513415416985771645447583707904164,-204218326081778035513415416985771645447583707900669⟩,⟨144694184439540773300230979603883104845963459368744,144694184439540773300230979603883104845963459372240⟩⟩, + ⟨⟨-167608813173975157278747260963470528829052278488523,-167608813173975157278747260963470528829052278485277⟩,⟨-218956237710507314609603348420971490670850006368608,-218956237710507314609603348420971490670850006365361⟩⟩, + ⟨⟨207913513970043297432032146081620995182501258465552,207913513970043297432032146081620995182501258468221⟩,⟨-174015667896422692266947210921558884243191400957160,-174015667896422692266947210921558884243191400954491⟩⟩, + ⟨⟨167500493062246028724169908631341044214310599155680,167500493062246028724169908631341044214310599157587⟩,⟨173770276622637067364487084527432667297172441093727,173770276622637067364487084527432667297172441095633⟩⟩, + ⟨⟨-126229769534194413485212148998482874456909960932128,-126229769534194413485212148998482874456909960930977⟩,⟨151910014075705425251685424255228939502111918634144,151910014075705425251685424255228939502111918635295⟩⟩, + ⟨⟨-129803086042227966793752492807966762441584166533573,-129803086042227966793752492807966762441584166532977⟩,⟨-76744194497462938840048931999757360412325076932363,-76744194497462938840048931999757360412325076931767⟩⟩, + ⟨⟨34320848136236669200062252398067580403825327518817,34320848136236669200062252398067580403825327519078⟩,⟨-103311294385969880993605739690214382149567743184130,-103311294385969880993605739690214382149567743183869⟩⟩] +lemma tw1_1_1_20_calc (j : Fin 31) : taylorWaveBox 1 1 1 20 j = tw1_1_1_20 j := by + revert j + decide +kernel +def tw1_1_1 : Fin 21 → Fin 31 → CI := ![tw1_1_1_0,tw1_1_1_1,tw1_1_1_2,tw1_1_1_3,tw1_1_1_4,tw1_1_1_5,tw1_1_1_6,tw1_1_1_7,tw1_1_1_8,tw1_1_1_9,tw1_1_1_10,tw1_1_1_11,tw1_1_1_12,tw1_1_1_13,tw1_1_1_14,tw1_1_1_15,tw1_1_1_16,tw1_1_1_17,tw1_1_1_18,tw1_1_1_19,tw1_1_1_20] +lemma tw1_1_1_mem (l : Fin 21) (j : Fin 31) : (tw1_1_1 l j).Mem (taylorWave 1 1 (nearNode 1) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 1 l j = tw1_1_1 l j := by + fin_cases l + · exact tw1_1_1_0_calc j + · exact tw1_1_1_1_calc j + · exact tw1_1_1_2_calc j + · exact tw1_1_1_3_calc j + · exact tw1_1_1_4_calc j + · exact tw1_1_1_5_calc j + · exact tw1_1_1_6_calc j + · exact tw1_1_1_7_calc j + · exact tw1_1_1_8_calc j + · exact tw1_1_1_9_calc j + · exact tw1_1_1_10_calc j + · exact tw1_1_1_11_calc j + · exact tw1_1_1_12_calc j + · exact tw1_1_1_13_calc j + · exact tw1_1_1_14_calc j + · exact tw1_1_1_15_calc j + · exact tw1_1_1_16_calc j + · exact tw1_1_1_17_calc j + · exact tw1_1_1_18_calc j + · exact tw1_1_1_19_calc j + · exact tw1_1_1_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 1 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave112.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave112.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd915ed9482b7fdbbe735f36e26b15f9dda2b883 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave112.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_2_0 : Fin 31 → CI := ![⟨⟨-18248198557768227734934119738699636709503071594800314872435,-18248198557768227734934119738699636709503071594778225693050⟩,⟨-57751462385754132149473099601316996553486767825528538202384,-57751462385754132149473099601316996553486767825506487755520⟩⟩, + ⟨⟨5408652812903287628102667491972641407370869175566582345743,5408652812903287628102667491972641407370869175578106923473⟩,⟨-27210942280196625845228837884816546579089540435248016195568,-27210942280196625845228837884816546579089540435236474700012⟩⟩, + ⟨⟨7110582547520868592087592236893182448844477162850233320650,7110582547520868592087592236893182448844477162855290865791⟩,⟨-8831969303615269994252183855625171748841841390628447038627,-8831969303615269994252183855625171748841841390623375689956⟩⟩, + ⟨⟨3669887978218238713249496773578623424407333557238358368526,3669887978218238713249496773578623424407333557240223690821⟩,⟨-1771741137044768371780582840513339530490119538406086064699,-1771741137044768371780582840513339530490119538404216968183⟩⟩, + ⟨⟨1266896566803342797396507367886025925346316719177076115782,1266896566803342797396507367886025925346316719177655438952⟩,⟨-87757350110649011217243956303414116775372959817675069951,-87757350110649011217243956303414116775372959817095276351⟩⟩, + ⟨⟨331050015968686669601345588954883063776850866926535848374,331050015968686669601345588954883063776850866926688478508⟩,⟨72971709727558667744939979534885200813247004581689301846,72971709727558667744939979534885200813247004581841972116⟩⟩, + ⟨⟨71811092263778221487061017038122295010351584086292184982,71811092263778221487061017038122295010351584086326791909⟩,⟨27636254937732995261406934419646011019435316317768609282,27636254937732995261406934419646011019435316317803219533⟩⟩, + ⟨⟨14064950373769573914123337367900593882141028431379517608,14064950373769573914123337367900593882141028431386206634⟩,⟨4829953110640580148933212348002356850473480043664990562,4829953110640580148933212348002356850473480043671679730⟩⟩, + ⟨⟨2483496721266968137571733785577221774023255843019525949,2483496721266968137571733785577221774023255843020765620⟩,⟨115066476111705568236668058371757579608688457470771486,115066476111705568236668058371757579608688457472011209⟩⟩, + ⟨⟨317418078465704270881876272418705525431421916037759751,317418078465704270881876272418705525431421916037948947⟩,⟨-196073151896408923245671516417724635559034024414398974,-196073151896408923245671516417724635559034024414209782⟩⟩, + ⟨⟨1953777839507228205097492032948500245335585982169465,1953777839507228205097492032948500245335585982184483⟩,⟨-53615924096939751598065184181016626024174911817296920,-53615924096939751598065184181016626024174911817281903⟩⟩, + ⟨⟨-8005993390150556551002278855348976626807083047094908,-8005993390150556551002278855348976626807083047090233⟩,⟨-1558843886350798784101362260456236176673589122643375,-1558843886350798784101362260456236176673589122638702⟩⟩, + ⟨⟨159231402089827915228191841744749834199608066515431,159231402089827915228191841744749834199608066516411⟩,⟨1483488322731352984196380896267906245232821261569276,1483488322731352984196380896267906245232821261570255⟩⟩, + ⟨⟨256307449456207543678932655542492674855864545487406,256307449456207543678932655542492674855864545487699⟩,⟨-281726812169901722579247554098851913067321285981640,-281726812169901722579247554098851913067321285981376⟩⟩, + ⟨⟨-148346840554698956601579535341111666074672853778929,-148346840554698956601579535341111666074672853778760⟩,⟨49696593695953404484453376986335099847974043839660,49696593695953404484453376986335099847974043839844⟩⟩, + ⟨⟨114810580272639657175658074869347399416106388682271,114810580272639657175658074869347399416106388682498⟩,⟨-113,136⟩⟩, + ⟨⟨-148346840554698956601579535341111666074672853778929,-148346840554698956601579535341111666074672853778760⟩,⟨-49696593695953404484453376986335099847974043839844,-49696593695953404484453376986335099847974043839660⟩⟩, + ⟨⟨256307449456207543678932655542492674855864545487406,256307449456207543678932655542492674855864545487699⟩,⟨281726812169901722579247554098851913067321285981376,281726812169901722579247554098851913067321285981640⟩⟩, + ⟨⟨159231402089827915228191841744749834199608066515431,159231402089827915228191841744749834199608066516411⟩,⟨-1483488322731352984196380896267906245232821261570254,-1483488322731352984196380896267906245232821261569276⟩⟩, + ⟨⟨-8005993390150556551002278855348976626807083047094908,-8005993390150556551002278855348976626807083047090233⟩,⟨1558843886350798784101362260456236176673589122638703,1558843886350798784101362260456236176673589122643375⟩⟩, + ⟨⟨1953777839507228205097492032948500245335585982169465,1953777839507228205097492032948500245335585982184483⟩,⟨53615924096939751598065184181016626024174911817281903,53615924096939751598065184181016626024174911817296921⟩⟩, + ⟨⟨317418078465704270881876272418705525431421916037759751,317418078465704270881876272418705525431421916037948947⟩,⟨196073151896408923245671516417724635559034024414209783,196073151896408923245671516417724635559034024414398975⟩⟩, + ⟨⟨2483496721266968137571733785577221774023255843019525949,2483496721266968137571733785577221774023255843020765620⟩,⟨-115066476111705568236668058371757579608688457472011208,-115066476111705568236668058371757579608688457470771485⟩⟩, + ⟨⟨14064950373769573914123337367900593882141028431379517608,14064950373769573914123337367900593882141028431386206634⟩,⟨-4829953110640580148933212348002356850473480043671679729,-4829953110640580148933212348002356850473480043664990562⟩⟩, + ⟨⟨71811092263778221487061017038122295010351584086292184982,71811092263778221487061017038122295010351584086326791909⟩,⟨-27636254937732995261406934419646011019435316317803219533,-27636254937732995261406934419646011019435316317768609282⟩⟩, + ⟨⟨331050015968686669601345588954883063776850866926535848374,331050015968686669601345588954883063776850866926688478508⟩,⟨-72971709727558667744939979534885200813247004581841972115,-72971709727558667744939979534885200813247004581689301845⟩⟩, + ⟨⟨1266896566803342797396507367886025925346316719177076115760,1266896566803342797396507367886025925346316719177655438984⟩,⟨87757350110649011217243956303414116775372959817095276338,87757350110649011217243956303414116775372959817675069993⟩⟩, + ⟨⟨3669887978218238713249496773578623424407333557238358368492,3669887978218238713249496773578623424407333557240223690839⟩,⟨1771741137044768371780582840513339530490119538404216968186,1771741137044768371780582840513339530490119538406086064753⟩⟩, + ⟨⟨7110582547520868592087592236893182448844477162850233320676,7110582547520868592087592236893182448844477162855290865670⟩,⟨8831969303615269994252183855625171748841841390623375690073,8831969303615269994252183855625171748841841390628447038596⟩⟩, + ⟨⟨5408652812903287628102667491972641407370869175566582345563,5408652812903287628102667491972641407370869175578106923304⟩,⟨27210942280196625845228837884816546579089540435236474700025,27210942280196625845228837884816546579089540435248016195591⟩⟩, + ⟨⟨-18248198557768227734934119738699636709503071594800314872426,-18248198557768227734934119738699636709503071594778225693756⟩,⟨57751462385754132149473099601316996553486767825506487755758,57751462385754132149473099601316996553486767825528538201908⟩⟩] +lemma tw1_1_2_0_calc (j : Fin 31) : taylorWaveBox 1 1 2 0 j = tw1_1_2_0 j := by + revert j + decide +kernel +def tw1_1_2_1 : Fin 31 → CI := ![⟨⟨75604247508103199775670829857735441631376054441046528361887,75604247508103199775670829857735441631376054441074083234475⟩,⟨2064355815277202724623802339436844584999656936980170364939,2064355815277202724623802339436844584999656937007761749884⟩⟩, + ⟨⟨30337888959195688194946952387090435127939586571929596628171,30337888959195688194946952387090435127939586571943949595774⟩,⟨19747364152567258549847996846738298446367969302076542778027,19747364152567258549847996846738298446367969302090883299891⟩⟩, + ⟨⟨6891015859982411582733930036282475925459030074956013636386,6891015859982411582733930036282475925459030074962171104436⟩,⟨13861629603873020365851870264735477672728273220675190847313,13861629603873020365851870264735477672728273220681341472533⟩⟩, + ⟨⟨-212030628413897751276690102274381647899740282162098873711,-212030628413897751276690102274381647899740282159932055203⟩,⟨5825238078004243793386937618733499475845883371066444333399,5825238078004243793386937618733499475845883371068610682399⟩⟩, + ⟨⟨-872626475901034889542341254591065439815715534548183830774,-872626475901034889542341254591065439815715534547483378091⟩,⟨1693682050683643054154922714147229547417544183478375827584,1693682050683643054154922714147229547417544183479076497813⟩⟩, + ⟨⟨-392275050083043154560724283098561515123259606568095774185,-392275050083043154560724283098561515123259606567863498937⟩,⟨362140383696138372432671309423750995565686929432731285631,362140383696138372432671309423750995565686929432963620635⟩⟩, + ⟨⟨-110026460835082035821858903805736646624540272761957427694,-110026460835082035821858903805736646624540272761892282149⟩,⟨63932045631419461941352948809403244513656327997292298012,63932045631419461941352948809403244513656327997357455995⟩⟩, + ⟨⟨-22800734932051216194960245497903361799476762673564755062,-22800734932051216194960245497903361799476762673549318924⟩,⟨12118683274186081615244404747768895837770446505854777960,12118683274186081615244404747768895837770446505870216036⟩⟩, + ⟨⟨-3485318697129292942963921456791927243324088348742734291,-3485318697129292942963921456791927243324088348739815377⟩,⟨2890247767964135973852589054195573582126622739622649778,2890247767964135973852589054195573582126622739625567876⟩⟩, + ⟨⟨-254669612571998909144744239891615043283002601179216719,-254669612571998909144744239891615043283002601178829991⟩,⟨664136066686645654675368510931164229667779436379237356,664136066686645654675368510931164229667779436379624098⟩⟩, + ⟨⟨53092445725039004429145825068779133662660395037856964,53092445725039004429145825068779133662660395037882260⟩,⟨92590356703278342959929333435495829074800484450370803,92590356703278342959929333435495829074800484450396176⟩⟩, + ⟨⟨16270856932892139484384449949935837004303897659050052,16270856932892139484384449949935837004303897659058340⟩,⟨-4393237258323973686270146646885015581460069388607757,-4393237258323973686270146646885015581460069388599528⟩⟩, + ⟨⟨-1400142151279251384525050179406454985703238306283706,-1400142151279251384525050179406454985703238306281671⟩,⟨-2857983082769821270888415337673963144443890699531317,-2857983082769821270888415337673963144443890699529265⟩⟩, + ⟨⟨-400751624323262049106747864997181337166772983094989,-400751624323262049106747864997181337166772983094342⟩,⟨729381822391333680645453259975797437232958340754970,729381822391333680645453259975797437232958340755601⟩⟩, + ⟨⟨313658912633931436394017053449288759863918269228982,313658912633931436394017053449288759863918269229383⟩,⟨-148508242074122294826333827085290532247336173806927,-148508242074122294826333827085290532247336173806499⟩⟩, + ⟨⟨-255984631717858957466301187777914175221994308474158,-255984631717858957466301187777914175221994308473655⟩,⟨-300,250⟩⟩, + ⟨⟨313658912633931436394017053449288759863918269228982,313658912633931436394017053449288759863918269229383⟩,⟨148508242074122294826333827085290532247336173806499,148508242074122294826333827085290532247336173806927⟩⟩, + ⟨⟨-400751624323262049106747864997181337166772983094989,-400751624323262049106747864997181337166772983094342⟩,⟨-729381822391333680645453259975797437232958340755600,-729381822391333680645453259975797437232958340754970⟩⟩, + ⟨⟨-1400142151279251384525050179406454985703238306283706,-1400142151279251384525050179406454985703238306281671⟩,⟨2857983082769821270888415337673963144443890699529265,2857983082769821270888415337673963144443890699531317⟩⟩, + ⟨⟨16270856932892139484384449949935837004303897659050052,16270856932892139484384449949935837004303897659058340⟩,⟨4393237258323973686270146646885015581460069388599528,4393237258323973686270146646885015581460069388607757⟩⟩, + ⟨⟨53092445725039004429145825068779133662660395037856964,53092445725039004429145825068779133662660395037882260⟩,⟨-92590356703278342959929333435495829074800484450396176,-92590356703278342959929333435495829074800484450370803⟩⟩, + ⟨⟨-254669612571998909144744239891615043283002601179216719,-254669612571998909144744239891615043283002601178829991⟩,⟨-664136066686645654675368510931164229667779436379624097,-664136066686645654675368510931164229667779436379237355⟩⟩, + ⟨⟨-3485318697129292942963921456791927243324088348742734291,-3485318697129292942963921456791927243324088348739815377⟩,⟨-2890247767964135973852589054195573582126622739625567876,-2890247767964135973852589054195573582126622739622649778⟩⟩, + ⟨⟨-22800734932051216194960245497903361799476762673564755062,-22800734932051216194960245497903361799476762673549318924⟩,⟨-12118683274186081615244404747768895837770446505870216036,-12118683274186081615244404747768895837770446505854777960⟩⟩, + ⟨⟨-110026460835082035821858903805736646624540272761957427694,-110026460835082035821858903805736646624540272761892282149⟩,⟨-63932045631419461941352948809403244513656327997357455995,-63932045631419461941352948809403244513656327997292298011⟩⟩, + ⟨⟨-392275050083043154560724283098561515123259606568095774185,-392275050083043154560724283098561515123259606567863498937⟩,⟨-362140383696138372432671309423750995565686929432963620634,-362140383696138372432671309423750995565686929432731285631⟩⟩, + ⟨⟨-872626475901034889542341254591065439815715534548183830792,-872626475901034889542341254591065439815715534547483378044⟩,⟨-1693682050683643054154922714147229547417544183479076497861,-1693682050683643054154922714147229547417544183478375827567⟩⟩, + ⟨⟨-212030628413897751276690102274381647899740282162098873699,-212030628413897751276690102274381647899740282159932055134⟩,⟨-5825238078004243793386937618733499475845883371068610682437,-5825238078004243793386937618733499475845883371066444333378⟩⟩, + ⟨⟨6891015859982411582733930036282475925459030074956013636555,6891015859982411582733930036282475925459030074962171104425⟩,⟨-13861629603873020365851870264735477672728273220681341472412,-13861629603873020365851870264735477672728273220675190847365⟩⟩, + ⟨⟨30337888959195688194946952387090435127939586571929596628273,30337888959195688194946952387090435127939586571943949595884⟩,⟨-19747364152567258549847996846738298446367969302090883299698,-19747364152567258549847996846738298446367969302076542777815⟩⟩, + ⟨⟨75604247508103199775670829857735441631376054441046528362328,75604247508103199775670829857735441631376054441074083234038⟩,⟨-2064355815277202724623802339436844584999656937007761748986,-2064355815277202724623802339436844584999656936980170364918⟩⟩] +lemma tw1_1_2_1_calc (j : Fin 31) : taylorWaveBox 1 1 2 1 j = tw1_1_2_1 j := by + revert j + decide +kernel +def tw1_1_2_2 : Fin 31 → CI := ![⟨⟨-24996261961864050509033216990229484571112951552282201900500,-24996261961864050509033216990229484571112951552258992347795⟩,⟨66278300109556231667801333414723629657905996820987603438434,66278300109556231667801333414723629657905996821010802825209⟩⟩, + ⟨⟨-28974253283326289485574967556746850450305304684346837893329,-28974253283326289485574967556746850450305304684335367318950⟩,⟨20379063226009677498379892099293538258995281079698534387846,20379063226009677498379892099293538258995281079710001511827⟩⟩, + ⟨⟨-15843537123642603551504986644876728156001792394145936207725,-15843537123642603551504986644876728156001792394139972362661⟩,⟨471329966164880651067386988237554110137357251268827003928,471329966164880651067386988237554110137357251274780451218⟩⟩, + ⟨⟨-5418908465691109115139385395217943537804278581141188893856,-5418908465691109115139385395217943537804278581138430813294⟩,⟨-3120966212057407879288112771673301037358007744966291164261,-3120966212057407879288112771673301037358007744963539044908⟩⟩, + ⟨⟨-1120796032888162386915677835224254167822803898158512534408,-1120796032888162386915677835224254167822803898157469870415⟩,⟨-1827525505479996379846097790699585234503416929006547606710,-1827525505479996379846097790699585234503416929005506132491⟩⟩, + ⟨⟨-86189501492269240102205065626346686235842167636081450255,-86189501492269240102205065626346686235842167635759410184⟩,⟨-624674672912103124230683193743997144820025804996527973115,-624674672912103124230683193743997144820025804996206058227⟩⟩, + ⟨⟨23690972135105615737381400455830206385821749555170546372,23690972135105615737381400455830206385821749555252302741⟩,⟨-156049079112238472996792019772745149668529174419224568321,-156049079112238472996792019772745149668529174419142824251⟩⟩, + ⟨⟨8740190591526587418038494307659804061583314805125430327,8740190591526587418038494307659804061583314805141967630⟩,⟨-32469864890325732030989950500582135400753385296724879380,-32469864890325732030989950500582135400753385296708342646⟩⟩, + ⟨⟨861990214340729314473879875527345173033584379055829195,861990214340729314473879875527345173033584379059218988⟩,⟨-6124162727374271108240784723448133041433995307292123917,-6124162727374271108240784723448133041433995307288734413⟩⟩, + ⟨⟨-286065206873313760880733387667914764977824330860456450,-286065206873313760880733387667914764977824330859864099⟩,⟨-975976606166399058706319736262901847565104252011786713,-975976606166399058706319736262901847565104252011194341⟩⟩, + ⟨⟨-140276385743521299532065514776802997814528903097413149,-140276385743521299532065514776802997814528903097364054⟩,⟨-75379767209671248788257688022578894696973977683559566,-75379767209671248788257688022578894696973977683510372⟩⟩, + ⟨⟨-19640485838558129678365905342791006277182985239675952,-19640485838558129678365905342791006277182985239662493⟩,⟨17216983191321954865400317602787591432076662412935601,17216983191321954865400317602787591432076662412948960⟩⟩, + ⟨⟨3667013199707279213126511475448349266071540723584314,3667013199707279213126511475448349266071540723587108⟩,⟨3531983040372980176873985330183511596138822391669445,3531983040372980176873985330183511596138822391672295⟩⟩, + ⟨⟨359358855880208633471687064665294193693383443767175,359358855880208633471687064665294193693383443768195⟩,⟨-1315648066164550310615910791522454151909072977062241,-1315648066164550310615910791522454151909072977061173⟩⟩, + ⟨⟨-488816975580067199096030598202470462675681353433869,-488816975580067199096030598202470462675681353433163⟩,⟨307245248983414830299687975799936265996762813055790,307245248983414830299687975799936265996762813056528⟩⟩, + ⟨⟨428062454175295612006762605744441959022742736207533,428062454175295612006762605744441959022742736208374⟩,⟨-418,501⟩⟩, + ⟨⟨-488816975580067199096030598202470462675681353433869,-488816975580067199096030598202470462675681353433163⟩,⟨-307245248983414830299687975799936265996762813056528,-307245248983414830299687975799936265996762813055790⟩⟩, + ⟨⟨359358855880208633471687064665294193693383443767175,359358855880208633471687064665294193693383443768195⟩,⟨1315648066164550310615910791522454151909072977061173,1315648066164550310615910791522454151909072977062241⟩⟩, + ⟨⟨3667013199707279213126511475448349266071540723584314,3667013199707279213126511475448349266071540723587108⟩,⟨-3531983040372980176873985330183511596138822391672295,-3531983040372980176873985330183511596138822391669445⟩⟩, + ⟨⟨-19640485838558129678365905342791006277182985239675952,-19640485838558129678365905342791006277182985239662493⟩,⟨-17216983191321954865400317602787591432076662412948960,-17216983191321954865400317602787591432076662412935601⟩⟩, + ⟨⟨-140276385743521299532065514776802997814528903097413149,-140276385743521299532065514776802997814528903097364054⟩,⟨75379767209671248788257688022578894696973977683510372,75379767209671248788257688022578894696973977683559566⟩⟩, + ⟨⟨-286065206873313760880733387667914764977824330860456450,-286065206873313760880733387667914764977824330859864099⟩,⟨975976606166399058706319736262901847565104252011194341,975976606166399058706319736262901847565104252011786713⟩⟩, + ⟨⟨861990214340729314473879875527345173033584379055829195,861990214340729314473879875527345173033584379059218988⟩,⟨6124162727374271108240784723448133041433995307288734413,6124162727374271108240784723448133041433995307292123917⟩⟩, + ⟨⟨8740190591526587418038494307659804061583314805125430327,8740190591526587418038494307659804061583314805141967630⟩,⟨32469864890325732030989950500582135400753385296708342646,32469864890325732030989950500582135400753385296724879380⟩⟩, + ⟨⟨23690972135105615737381400455830206385821749555170546372,23690972135105615737381400455830206385821749555252302741⟩,⟨156049079112238472996792019772745149668529174419142824251,156049079112238472996792019772745149668529174419224568321⟩⟩, + ⟨⟨-86189501492269240102205065626346686235842167636081450255,-86189501492269240102205065626346686235842167635759410184⟩,⟨624674672912103124230683193743997144820025804996206058227,624674672912103124230683193743997144820025804996527973115⟩⟩, + ⟨⟨-1120796032888162386915677835224254167822803898158512534479,-1120796032888162386915677835224254167822803898157469870391⟩,⟨1827525505479996379846097790699585234503416929005506132439,1827525505479996379846097790699585234503416929006547606753⟩⟩, + ⟨⟨-5418908465691109115139385395217943537804278581141188893921,-5418908465691109115139385395217943537804278581138430813286⟩,⟨3120966212057407879288112771673301037358007744963539044837,3120966212057407879288112771673301037358007744966291164264⟩⟩, + ⟨⟨-15843537123642603551504986644876728156001792394145936207646,-15843537123642603551504986644876728156001792394139972362744⟩,⟨-471329966164880651067386988237554110137357251274780451220,-471329966164880651067386988237554110137357251268827004103⟩⟩, + ⟨⟨-28974253283326289485574967556746850450305304684346837893193,-28974253283326289485574967556746850450305304684335367318795⟩,⟨-20379063226009677498379892099293538258995281079710001511996,-20379063226009677498379892099293538258995281079698534388015⟩⟩, + ⟨⟨-24996261961864050509033216990229484571112951552282201899737,-24996261961864050509033216990229484571112951552258992347747⟩,⟨-66278300109556231667801333414723629657905996821010802824991,-66278300109556231667801333414723629657905996820987603438937⟩⟩] +lemma tw1_1_2_2_calc (j : Fin 31) : taylorWaveBox 1 1 2 2 j = tw1_1_2_2 j := by + revert j + decide +kernel +def tw1_1_2_3 : Fin 31 → CI := ![⟨⟨-40797681755646296147230053512099826307080899501734892208474,-40797681755646296147230053512099826307080899501718587299492⟩,⟨-33946699505522393135223713174328925794908279102715760839199,-33946699505522393135223713174328925794908279102699471421926⟩⟩, + ⟨⟨-6380612523863896752290205294909222626495562209229299666636,-6380612523863896752290205294909222626495562209218259382794⟩,⟨-26987663690633232165488642694169511905624246858250447849375,-26987663690633232165488642694169511905624246858239391567407⟩⟩, + ⟨⟨5078515890327059759851895053554234246587762541508941574963,5078515890327059759851895053554234246587762541514919005429⟩,⟨-11949553155661564911490126352162250649174050886481448221430,-11949553155661564911490126352162250649174050886475453195666⟩⟩, + ⟨⟨4541117139106139386455582212254812789907548604434536313286,4541117139106139386455582212254812789907548604437150724161⟩,⟨-2860340948777527675570680791524516711677136691088325487341,-2860340948777527675570680791524516711677136691085705584978⟩⟩, + ⟨⟨1929797648751552226254103541488503677737124012830392831411,1929797648751552226254103541488503677737124012831308342900⟩,⟨-10072693839806153583258273852409773386569532331223361946,-10072693839806153583258273852409773386569532330307230799⟩⟩, + ⟨⟨530912622148493391371790838243707134309435328073445524420,530912622148493391371790838243707134309435328073693725523⟩,⟨270525140017159512444463913165495066114250573958940668806,270525140017159512444463913165495066114250573959188883497⟩⟩, + ⟨⟨105962358469843789596889539186511031053355185765713791130,105962358469843789596889539186511031053355185765790535133⟩,⟨115331505317236462206519745287505946798228189951641970474,115331505317236462206519745287505946798228189951718705980⟩⟩, + ⟨⟨18500246782878092945405291650983545808058744779519967515,18500246782878092945405291650983545808058744779541566178⟩,⟨29747599166140735663298485761546819514279194265260732469,29747599166140735663298485761546819514279194265282328732⟩⟩, + ⟨⟨3809122556338508061241770801730316699536100911785616533,3809122556338508061241770801730316699536100911790027342⟩,⟨5582174545365670568978714366527378060993864147333941648,5582174545365670568978714366527378060993864147338353525⟩⟩, + ⟨⟨937015626195610784930539702718945296690164031635534572,937015626195610784930539702718945296690164031636105922⟩,⟨689509639715748463727850193246658929967706343549567786,689509639715748463727850193246658929967706343550139128⟩⟩, + ⟨⟨189691042040007303460830880512260891422454282754809654,189691042040007303460830880512260891422454282754866290⟩,⟨-12151618809669717002725225389234781096193954169487982,-12151618809669717002725225389234781096193954169431372⟩⟩, + ⟨⟨12461641779495596165407149032864106200653677226382013,12461641779495596165407149032864106200653677226401512⟩,⟨-29887357274609039888750755820747039416583264914670863,-29887357274609039888750755820747039416583264914651402⟩⟩, + ⟨⟨-5954960634615102864115230507492547547530821671290826,-5954960634615102864115230507492547547530821671287200⟩,⟨-2645266220026147200730124972912161298185783555569276,-2645266220026147200730124972912161298185783555565579⟩⟩, + ⟨⟨-55175517907414994880031950645607306694939173687496,-55175517907414994880031950645607306694939173686283⟩,⟨1787190845410562664733519887497974279654962151675214,1787190845410562664733519887497974279654962151676589⟩⟩, + ⟨⟨597459076578439259676761190836186280365439510102310,597459076578439259676761190836186280365439510103291⟩,⟨-483235470480869047812346602724378611822950953324359,-483235470480869047812346602724378611822950953323353⟩⟩, + ⟨⟨-572651454721821437428757160484828974468728932504870,-572651454721821437428757160484828974468728932503744⟩,⟨-670,558⟩⟩, + ⟨⟨597459076578439259676761190836186280365439510102310,597459076578439259676761190836186280365439510103291⟩,⟨483235470480869047812346602724378611822950953323353,483235470480869047812346602724378611822950953324359⟩⟩, + ⟨⟨-55175517907414994880031950645607306694939173687496,-55175517907414994880031950645607306694939173686283⟩,⟨-1787190845410562664733519887497974279654962151676588,-1787190845410562664733519887497974279654962151675214⟩⟩, + ⟨⟨-5954960634615102864115230507492547547530821671290826,-5954960634615102864115230507492547547530821671287200⟩,⟨2645266220026147200730124972912161298185783555565579,2645266220026147200730124972912161298185783555569276⟩⟩, + ⟨⟨12461641779495596165407149032864106200653677226382013,12461641779495596165407149032864106200653677226401512⟩,⟨29887357274609039888750755820747039416583264914651402,29887357274609039888750755820747039416583264914670863⟩⟩, + ⟨⟨189691042040007303460830880512260891422454282754809654,189691042040007303460830880512260891422454282754866290⟩,⟨12151618809669717002725225389234781096193954169431372,12151618809669717002725225389234781096193954169487982⟩⟩, + ⟨⟨937015626195610784930539702718945296690164031635534572,937015626195610784930539702718945296690164031636105922⟩,⟨-689509639715748463727850193246658929967706343550139128,-689509639715748463727850193246658929967706343549567786⟩⟩, + ⟨⟨3809122556338508061241770801730316699536100911785616533,3809122556338508061241770801730316699536100911790027342⟩,⟨-5582174545365670568978714366527378060993864147338353525,-5582174545365670568978714366527378060993864147333941648⟩⟩, + ⟨⟨18500246782878092945405291650983545808058744779519967515,18500246782878092945405291650983545808058744779541566178⟩,⟨-29747599166140735663298485761546819514279194265282328732,-29747599166140735663298485761546819514279194265260732469⟩⟩, + ⟨⟨105962358469843789596889539186511031053355185765713791130,105962358469843789596889539186511031053355185765790535133⟩,⟨-115331505317236462206519745287505946798228189951718705980,-115331505317236462206519745287505946798228189951641970474⟩⟩, + ⟨⟨530912622148493391371790838243707134309435328073445524420,530912622148493391371790838243707134309435328073693725523⟩,⟨-270525140017159512444463913165495066114250573959188883497,-270525140017159512444463913165495066114250573958940668806⟩⟩, + ⟨⟨1929797648751552226254103541488503677737124012830392831378,1929797648751552226254103541488503677737124012831308342948⟩,⟨10072693839806153583258273852409773386569532330307230778,10072693839806153583258273852409773386569532331223362007⟩⟩, + ⟨⟨4541117139106139386455582212254812789907548604434536313238,4541117139106139386455582212254812789907548604437150724181⟩,⟨2860340948777527675570680791524516711677136691085705584979,2860340948777527675570680791524516711677136691088325487411⟩⟩, + ⟨⟨5078515890327059759851895053554234246587762541508941574981,5078515890327059759851895053554234246587762541514919005280⟩,⟨11949553155661564911490126352162250649174050886475453195781,11949553155661564911490126352162250649174050886481448221379⟩⟩, + ⟨⟨-6380612523863896752290205294909222626495562209229299666803,-6380612523863896752290205294909222626495562209218259382957⟩,⟨26987663690633232165488642694169511905624246858239391567343,26987663690633232165488642694169511905624246858250447849326⟩⟩, + ⟨⟨-40797681755646296147230053512099826307080899501734892208430,-40797681755646296147230053512099826307080899501718587299937⟩,⟨33946699505522393135223713174328925794908279102699471421915,33946699505522393135223713174328925794908279102715760838704⟩⟩] +lemma tw1_1_2_3_calc (j : Fin 31) : taylorWaveBox 1 1 2 3 j = tw1_1_2_3 j := by + revert j + decide +kernel +def tw1_1_2_4 : Fin 31 → CI := ![⟨⟨28363997214389922971828904611046471407090307567012410511454,28363997214389922971828904611046471407090307567024918079733⟩,⟨-17135637564780485813507711902198692612884534034367533565814,-17135637564780485813507711902198692612884534034355004576810⟩⟩, + ⟨⟨17892291479503599773381891582093023754265799250569810926453,17892291479503599773381891582093023754265799250577982525647⟩,⟨2679336156462870698367428496744911772307375099276549920866,2679336156462870698367428496744911772307375099284709717104⟩⟩, + ⟨⟨5958766996044059166363043919017437395159678265234549574899,5958766996044059166363043919017437395159678265238722791403⟩,⟨6561153018269658506750736067641177752163678201197655116303,6561153018269658506750736067641177752163678201201819487922⟩⟩, + ⟨⟨291204868353970665393107263594746642292990531473908605454,291204868353970665393107263594746642292990531475568514546⟩,⟨3827289527652774034459199671948320730556882470165699114856,3827289527652774034459199671948320730556882470167357881383⟩⟩, + ⟨⟨-743905308325498603553683467230810547267117055461973743952,-743905308325498603553683467230810547267117055461358128615⟩,⟨1241887895089280803233215155919431688065866104989309457963,1241887895089280803233215155919431688065866104989925330230⟩⟩, + ⟨⟨-413734683235335590132347919758019488594950838691112034484,-413734683235335590132347919758019488594950838690864799392⟩,⟨221305671644234474518687228650855899039111359991485331493,221305671644234474518687228650855899039111359991732664181⟩⟩, + ⟨⟨-129225488527420287734570304411823898564171822028466946328,-129225488527420287734570304411823898564171822028391741204⟩,⟨8546660663187070825954040561484695994883737408314928552,8546660663187070825954040561484695994883737408390147809⟩⟩, + ⟨⟨-29835764859581807476441864925501330060906447746743638085,-29835764859581807476441864925501330060906447746726950568⟩,⟨-5896138884416664423749876942931761055558739587069036717,-5896138884416664423749876942931761055558739587052348465⟩⟩, + ⟨⟨-5986997336893105257810138397879925926606304425188990255,-5986997336893105257810138397879925926606304425185257626⟩,⟨-1423103142158368147534236987424394358202742362845751978,-1423103142158368147534236987424394358202742362842018906⟩⟩, + ⟨⟨-1108800182106151445392170635447540970235220179727562824,-1108800182106151445392170635447540970235220179726858085⟩,⟨18739995204721422499085692748081671747564236049134389,18739995204721422499085692748081671747564236049839096⟩⟩, + ⟨⟨-153765061160719007531429226257268577175429039806135841,-153765061160719007531429226257268577175429039806080225⟩,⟨110015166303835894931387690585720787931078223337901019,110015166303835894931387690585720787931078223337956495⟩⟩, + ⟨⟨2039007272011663931471381031348447128768321611847785,2039007272011663931471381031348447128768321611867086⟩,⟨33392662795622677875749733321227598576859485857673266,33392662795622677875749733321227598576859485857692638⟩⟩, + ⟨⟨6932786995821652248971878514908181757841537994524448,6932786995821652248971878514908181757841537994529085⟩,⟨482029240837024443435416248500350968669515576385888,482029240837024443435416248500350968669515576390555⟩⟩, + ⟨⟨-397497248313285968733478650890495313781475681883341,-397497248313285968733478650890495313781475681882220⟩,⟨-1912614950099955909454677043107618193452137885366083,-1912614950099955909454677043107618193452137885364687⟩⟩, + ⟨⟨-594364180311320325198916715839535148391948500408913,-594364180311320325198916715839535148391948500407794⟩,⟨610808286717527985182284531934790432788167877244737,610808286717527985182284531934790432788167877245863⟩⟩, + ⟨⟨638399228501222409061524399232208311725866710840122,638399228501222409061524399232208311725866710841379⟩,⟨-622,747⟩⟩, + ⟨⟨-594364180311320325198916715839535148391948500408913,-594364180311320325198916715839535148391948500407794⟩,⟨-610808286717527985182284531934790432788167877245863,-610808286717527985182284531934790432788167877244737⟩⟩, + ⟨⟨-397497248313285968733478650890495313781475681883341,-397497248313285968733478650890495313781475681882220⟩,⟨1912614950099955909454677043107618193452137885364687,1912614950099955909454677043107618193452137885366083⟩⟩, + ⟨⟨6932786995821652248971878514908181757841537994524448,6932786995821652248971878514908181757841537994529085⟩,⟨-482029240837024443435416248500350968669515576390555,-482029240837024443435416248500350968669515576385888⟩⟩, + ⟨⟨2039007272011663931471381031348447128768321611847785,2039007272011663931471381031348447128768321611867086⟩,⟨-33392662795622677875749733321227598576859485857692638,-33392662795622677875749733321227598576859485857673266⟩⟩, + ⟨⟨-153765061160719007531429226257268577175429039806135841,-153765061160719007531429226257268577175429039806080225⟩,⟨-110015166303835894931387690585720787931078223337956495,-110015166303835894931387690585720787931078223337901019⟩⟩, + ⟨⟨-1108800182106151445392170635447540970235220179727562824,-1108800182106151445392170635447540970235220179726858085⟩,⟨-18739995204721422499085692748081671747564236049839096,-18739995204721422499085692748081671747564236049134389⟩⟩, + ⟨⟨-5986997336893105257810138397879925926606304425188990255,-5986997336893105257810138397879925926606304425185257626⟩,⟨1423103142158368147534236987424394358202742362842018906,1423103142158368147534236987424394358202742362845751978⟩⟩, + ⟨⟨-29835764859581807476441864925501330060906447746743638085,-29835764859581807476441864925501330060906447746726950568⟩,⟨5896138884416664423749876942931761055558739587052348465,5896138884416664423749876942931761055558739587069036717⟩⟩, + ⟨⟨-129225488527420287734570304411823898564171822028466946328,-129225488527420287734570304411823898564171822028391741204⟩,⟨-8546660663187070825954040561484695994883737408390147809,-8546660663187070825954040561484695994883737408314928552⟩⟩, + ⟨⟨-413734683235335590132347919758019488594950838691112034484,-413734683235335590132347919758019488594950838690864799392⟩,⟨-221305671644234474518687228650855899039111359991732664181,-221305671644234474518687228650855899039111359991485331493⟩⟩, + ⟨⟨-743905308325498603553683467230810547267117055461973743968,-743905308325498603553683467230810547267117055461358128579⟩,⟨-1241887895089280803233215155919431688065866104989925330269,-1241887895089280803233215155919431688065866104989309457950⟩⟩, + ⟨⟨291204868353970665393107263594746642292990531473908605460,291204868353970665393107263594746642292990531475568514594⟩,⟨-3827289527652774034459199671948320730556882470167357881406,-3827289527652774034459199671948320730556882470165699114838⟩⟩, + ⟨⟨5958766996044059166363043919017437395159678265234549574994,5958766996044059166363043919017437395159678265238722791384⟩,⟨-6561153018269658506750736067641177752163678201201819487835,-6561153018269658506750736067641177752163678201197655116328⟩⟩, + ⟨⟨17892291479503599773381891582093023754265799250569810926455,17892291479503599773381891582093023754265799250577982525656⟩,⟨-2679336156462870698367428496744911772307375099284709716994,-2679336156462870698367428496744911772307375099276549920749⟩⟩, + ⟨⟨28363997214389922971828904611046471407090307567012410511530,28363997214389922971828904611046471407090307567024918079441⟩,⟨17135637564780485813507711902198692612884534034355004577165,17135637564780485813507711902198692612884534034367533565799⟩⟩] +lemma tw1_1_2_4_calc (j : Fin 31) : taylorWaveBox 1 1 2 4 j = tw1_1_2_4 j := by + revert j + decide +kernel +def tw1_1_2_5 : Fin 31 → CI := ![⟨⟨3698871699303434392410536488323504932499531639326222552459,3698871699303434392410536488323504932499531639333588513163⟩,⟨17345070665390574349730329393479035547603703741949488804398,17345070665390574349730329393479035547603703741956843142905⟩⟩, + ⟨⟨-5109551164907203808710764294314708429896247754112744880139,-5109551164907203808710764294314708429896247754108192225782⟩,⟨8731592905977169924573233202213282940234111145794414055700,8731592905977169924573233202213282940234111145798970807208⟩⟩, + ⟨⟨-4945435284828368157949653763203688523593394075169092937074,-4945435284828368157949653763203688523593394075166992893195⟩,⟨1560815719614320042825996000576051814691072059262271644573,1560815719614320042825996000576051814691072059264372009337⟩⟩, + ⟨⟨-2157779894776744172279656192648858158171203965532944610368,-2157779894776744172279656192648858158171203965531863445341⟩,⟨-938397136021254072146513741477185072114284602837401939692,-938397136021254072146513741477185072114284602836322472089⟩⟩, + ⟨⟨-434932177736657304786928805727419959854179533140772310962,-434932177736657304786928805727419959854179533140266176387⟩,⟨-822945685366763288234374033625585139827952975506117783080,-822945685366763288234374033625585139827952975505612148656⟩⟩, + ⟨⟨37028132451184048716671870280619739670299569154901165112,37028132451184048716671870280619739670299569155074237916⟩,⟨-314515372672894708831075855352877277801213327795097426301,-314515372672894708831075855352877277801213327794924398972⟩⟩, + ⟨⟨52659695261006342831837122855264910779262908596152318928,52659695261006342831837122855264910779262908596195607005⟩,⟨-75183855133672202580290699021339163833165719787769738339,-75183855133672202580290699021339163833165719787726449509⟩⟩, + ⟨⟨18363662258327363550021684437188263190098666742633906943,18363662258327363550021684437188263190098666742648767136⟩,⟨-13227115358948826621403595289713795805514683214943445829,-13227115358948826621403595289713795805514683214928584242⟩⟩, + ⟨⟨4202974704908395307376639465836189838518017403575726461,4202974704908395307376639465836189838518017403578967994⟩,⟨-2324899587552255048343757362333595819534782991939387543,-2324899587552255048343757362333595819534782991936146656⟩⟩, + ⟨⟨711225130882547379037128653507488831958310212870994024,711225130882547379037128653507488831958310212871496323⟩,⟨-561375453921430516489823163702302621869446490318256155,-561375453921430516489823163702302621869446490317753861⟩⟩, + ⟨⟨61686823176544818426367683462346012412059916378648444,61686823176544818426367683462346012412059916378707364⟩,⟨-148926907558554188512188285180744886778112409649096351,-148926907558554188512188285180744886778112409649037512⟩⟩, + ⟨⟨-14643718784947727001929130438395599234748299906710936,-14643718784947727001929130438395599234748299906696431⟩,⟨-25754228611166576155309642502867555327943432574407809,-25754228611166576155309642502867555327943432574393167⟩⟩, + ⟨⟨-6106990376440011925870765604713921931161636290783467,-6106990376440011925870765604713921931161636290778979⟩,⟨1750776472397988573762087876227822234248756443748393,1750776472397988573762087876227822234248756443752867⟩⟩, + ⟨⟨780326817220763343628118286021046770660106826252854,780326817220763343628118286021046770660106826253840⟩,⟨1654565224428653135075263606461088103759853470256511,1654565224428653135075263606461088103759853470257784⟩⟩, + ⟨⟨492141759443146887633353082576356133947009724271112,492141759443146887633353082576356133947009724272191⟩,⟨-643622879145254945207544595443659054683437821885553,-643622879145254945207544595443659054683437821884487⟩⟩, + ⟨⟨-610024881263846311874736384073867085311592964744067,-610024881263846311874736384073867085311592964742863⟩,⟨-714,595⟩⟩, + ⟨⟨492141759443146887633353082576356133947009724271112,492141759443146887633353082576356133947009724272191⟩,⟨643622879145254945207544595443659054683437821884487,643622879145254945207544595443659054683437821885553⟩⟩, + ⟨⟨780326817220763343628118286021046770660106826252854,780326817220763343628118286021046770660106826253840⟩,⟨-1654565224428653135075263606461088103759853470257784,-1654565224428653135075263606461088103759853470256511⟩⟩, + ⟨⟨-6106990376440011925870765604713921931161636290783467,-6106990376440011925870765604713921931161636290778979⟩,⟨-1750776472397988573762087876227822234248756443752867,-1750776472397988573762087876227822234248756443748393⟩⟩, + ⟨⟨-14643718784947727001929130438395599234748299906710936,-14643718784947727001929130438395599234748299906696431⟩,⟨25754228611166576155309642502867555327943432574393167,25754228611166576155309642502867555327943432574407809⟩⟩, + ⟨⟨61686823176544818426367683462346012412059916378648444,61686823176544818426367683462346012412059916378707364⟩,⟨148926907558554188512188285180744886778112409649037512,148926907558554188512188285180744886778112409649096351⟩⟩, + ⟨⟨711225130882547379037128653507488831958310212870994024,711225130882547379037128653507488831958310212871496323⟩,⟨561375453921430516489823163702302621869446490317753861,561375453921430516489823163702302621869446490318256155⟩⟩, + ⟨⟨4202974704908395307376639465836189838518017403575726461,4202974704908395307376639465836189838518017403578967994⟩,⟨2324899587552255048343757362333595819534782991936146656,2324899587552255048343757362333595819534782991939387543⟩⟩, + ⟨⟨18363662258327363550021684437188263190098666742633906943,18363662258327363550021684437188263190098666742648767136⟩,⟨13227115358948826621403595289713795805514683214928584242,13227115358948826621403595289713795805514683214943445829⟩⟩, + ⟨⟨52659695261006342831837122855264910779262908596152318928,52659695261006342831837122855264910779262908596195607005⟩,⟨75183855133672202580290699021339163833165719787726449509,75183855133672202580290699021339163833165719787769738339⟩⟩, + ⟨⟨37028132451184048716671870280619739670299569154901165112,37028132451184048716671870280619739670299569155074237916⟩,⟨314515372672894708831075855352877277801213327794924398972,314515372672894708831075855352877277801213327795097426301⟩⟩, + ⟨⟨-434932177736657304786928805727419959854179533140772310994,-434932177736657304786928805727419959854179533140266176377⟩,⟨822945685366763288234374033625585139827952975505612148634,822945685366763288234374033625585139827952975506117783100⟩⟩, + ⟨⟨-2157779894776744172279656192648858158171203965532944610391,-2157779894776744172279656192648858158171203965531863445337⟩,⟨938397136021254072146513741477185072114284602836322472062,938397136021254072146513741477185072114284602837401939691⟩⟩, + ⟨⟨-4945435284828368157949653763203688523593394075169092937041,-4945435284828368157949653763203688523593394075166992893214⟩,⟨-1560815719614320042825996000576051814691072059264372009337,-1560815719614320042825996000576051814691072059262271644628⟩⟩, + ⟨⟨-5109551164907203808710764294314708429896247754112744880083,-5109551164907203808710764294314708429896247754108192225722⟩,⟨-8731592905977169924573233202213282940234111145798970807236,-8731592905977169924573233202213282940234111145794414055726⟩⟩, + ⟨⟨3698871699303434392410536488323504932499531639326222552669,3698871699303434392410536488323504932499531639333588513163⟩,⟨-17345070665390574349730329393479035547603703741956843142775,-17345070665390574349730329393479035547603703741949488804478⟩⟩] +lemma tw1_1_2_5_calc (j : Fin 31) : taylorWaveBox 1 1 2 5 j = tw1_1_2_5 j := by + revert j + decide +kernel +def tw1_1_2_6 : Fin 31 → CI := ![⟨⟨-8242096533693281628522761237009215344365493042283696494373,-8242096533693281628522761237009215344365493042280235684109⟩,⟨-1020959581077845187428923921483663902876702736307159393559,-1020959581077845187428923921483663902876702736303695073848⟩⟩, + ⟨⟨-3037042794130692208447952960629975091443526840090400207595,-3037042794130692208447952960629975091443526840088428501822⟩,⟨-3908842684878138015472110464826193789369104766289246666534,-3908842684878138015472110464826193789369104766287274821329⟩⟩, + ⟨⟨333369102122945710313028491100089446802113409446967512995,333369102122945710313028491100089446802113409448219084753⟩,⟨-2633998557684630463510152516032649438907990450653661813735,-2633998557684630463510152516032649438907990450652407420779⟩⟩, + ⟨⟨985816244364112742313065745437756506926201412936228964404,985816244364112742313065745437756506926201412936916049368⟩,⟨-788135380607667038972115235683699414901699978444259118687,-788135380607667038972115235683699414901699978443570662715⟩⟩, + ⟨⟨522778343169961163404692315251997195412261461931680118182,522778343169961163404692315251997195412261461931960635589⟩,⟨30732900443808416110054737136279923131059323813842718944,30732900443808416110054737136279923131059323814123375310⟩⟩, + ⟨⟨139921734385029552416309968645010690691841949745257925607,139921734385029552416309968645010690691841949745354696270⟩,⟨124103272027870518265504196447407340787207793470568412049,124103272027870518265504196447407340787207793470665168771⟩⟩, + ⟨⟨15882384034797178249265972834797405016016897335369814926,15882384034797178249265972834797405016016897335407033240⟩,⟨54666223375667969898357980271962699661358575187945443738,54666223375667969898357980271962699661358575187982654355⟩⟩, + ⟨⟨-1870310420752728381385574662663655740906605659065493853,-1870310420752728381385574662663655740906605659056100563⟩,⟨14616672322013543203126252801673312969708385982943812158,14616672322013543203126252801673312969708385982953204986⟩⟩, + ⟨⟨-1053343389314986138938320233949113034049919394014349738,-1053343389314986138938320233949113034049919394012094570⟩,⟨3106587495684839967364655412788131768086057656659361137,3106587495684839967364655412788131768086057656661615988⟩⟩, + ⟨⟨-161092560122156920655580246542968459943148968817957404,-161092560122156920655580246542968459943148968817515597⟩,⟨627429284491089639006642388371033725251906307056474842,627429284491089639006642388371033725251906307056916665⟩⟩, + ⟨⟨19677318673024816816312977963876580159065089533269249,19677318673024816816312977963876580159065089533312474⟩,⟨118633921262187571771514367647572066157369835795207523,118633921262187571771514367647572066157369835795250784⟩⟩, + ⟨⟨18975644058592096862780248612994234364688429001095599,18975644058592096862780248612994234364688429001110338⟩,⟨12919845489194669876042466704555698732070553718577872,12919845489194669876042466704555698732070553718592669⟩⟩, + ⟨⟨4112712375738188968111650351792835249065634482527870,4112712375738188968111650351792835249065634482531286⟩,⟨-2984860779097365959607175521702302998600392573895822,-2984860779097365959607175521702302998600392573892449⟩⟩, + ⟨⟨-938403183038933590140896541503974561110090676597631,-938403183038933590140896541503974561110090676596624⟩,⟨-1168873173158809499265882002040442276614296491938692,-1168873173158809499265882002040442276614296491937518⟩⟩, + ⟨⟨-342953835958089670980177347614758426573638551407338,-342953835958089670980177347614758426573638551406440⟩,⟨580182882379165730239490264463935996448040523344417,580182882379165730239490264463935996448040523345289⟩⟩, + ⟨⟨510047704874732755501905470646041811746567459817328,510047704874732755501905470646041811746567459818336⟩,⟨-497,597⟩⟩, + ⟨⟨-342953835958089670980177347614758426573638551407338,-342953835958089670980177347614758426573638551406440⟩,⟨-580182882379165730239490264463935996448040523345289,-580182882379165730239490264463935996448040523344417⟩⟩, + ⟨⟨-938403183038933590140896541503974561110090676597631,-938403183038933590140896541503974561110090676596624⟩,⟨1168873173158809499265882002040442276614296491937518,1168873173158809499265882002040442276614296491938692⟩⟩, + ⟨⟨4112712375738188968111650351792835249065634482527870,4112712375738188968111650351792835249065634482531286⟩,⟨2984860779097365959607175521702302998600392573892449,2984860779097365959607175521702302998600392573895822⟩⟩, + ⟨⟨18975644058592096862780248612994234364688429001095599,18975644058592096862780248612994234364688429001110338⟩,⟨-12919845489194669876042466704555698732070553718592669,-12919845489194669876042466704555698732070553718577872⟩⟩, + ⟨⟨19677318673024816816312977963876580159065089533269249,19677318673024816816312977963876580159065089533312474⟩,⟨-118633921262187571771514367647572066157369835795250784,-118633921262187571771514367647572066157369835795207523⟩⟩, + ⟨⟨-161092560122156920655580246542968459943148968817957404,-161092560122156920655580246542968459943148968817515597⟩,⟨-627429284491089639006642388371033725251906307056916665,-627429284491089639006642388371033725251906307056474842⟩⟩, + ⟨⟨-1053343389314986138938320233949113034049919394014349738,-1053343389314986138938320233949113034049919394012094570⟩,⟨-3106587495684839967364655412788131768086057656661615988,-3106587495684839967364655412788131768086057656659361137⟩⟩, + ⟨⟨-1870310420752728381385574662663655740906605659065493853,-1870310420752728381385574662663655740906605659056100563⟩,⟨-14616672322013543203126252801673312969708385982953204986,-14616672322013543203126252801673312969708385982943812158⟩⟩, + ⟨⟨15882384034797178249265972834797405016016897335369814926,15882384034797178249265972834797405016016897335407033240⟩,⟨-54666223375667969898357980271962699661358575187982654355,-54666223375667969898357980271962699661358575187945443738⟩⟩, + ⟨⟨139921734385029552416309968645010690691841949745257925607,139921734385029552416309968645010690691841949745354696270⟩,⟨-124103272027870518265504196447407340787207793470665168771,-124103272027870518265504196447407340787207793470568412049⟩⟩, + ⟨⟨522778343169961163404692315251997195412261461931680118174,522778343169961163404692315251997195412261461931960635602⟩,⟨-30732900443808416110054737136279923131059323814123375315,-30732900443808416110054737136279923131059323813842718928⟩⟩, + ⟨⟨985816244364112742313065745437756506926201412936228964392,985816244364112742313065745437756506926201412936916049372⟩,⟨788135380607667038972115235683699414901699978443570662715,788135380607667038972115235683699414901699978444259118703⟩⟩, + ⟨⟨333369102122945710313028491100089446802113409446967512996,333369102122945710313028491100089446802113409448219084723⟩,⟨2633998557684630463510152516032649438907990450652407420796,2633998557684630463510152516032649438907990450653661813722⟩⟩, + ⟨⟨-3037042794130692208447952960629975091443526840090400207618,-3037042794130692208447952960629975091443526840088428501844⟩,⟨3908842684878138015472110464826193789369104766287274821306,3908842684878138015472110464826193789369104766289246666514⟩⟩, + ⟨⟨-8242096533693281628522761237009215344365493042283696494331,-8242096533693281628522761237009215344365493042280235684162⟩,⟨1020959581077845187428923921483663902876702736303695073844,1020959581077845187428923921483663902876702736307159393462⟩⟩] +lemma tw1_1_2_6_calc (j : Fin 31) : taylorWaveBox 1 1 2 6 j = tw1_1_2_6 j := by + revert j + decide +kernel +def tw1_1_2_7 : Fin 31 → CI := ![⟨⟨1524175143358310302596417364924802040525709113114670455787,1524175143358310302596417364924802040525709113116005331222⟩,⟨-3102891299510039307273679604801974271666399866261629122182,-3102891299510039307273679604801974271666399866260294380058⟩⟩, + ⟨⟨2069202417354358105664310407800446915232197599480320623150,2069202417354358105664310407800446915232197599481333103940⟩,⟨-594404499299025128350443728717626147032574205732402765696,-594404499299025128350443728717626147032574205731391389249⟩⟩, + ⟨⟨1025295477553543817192544190286487253700898746344596510355,1025295477553543817192544190286487253700898746345260864586⟩,⟨639246627233006400212076189236527650334635849512704708658,639246627233006400212076189236527650334635849513367470761⟩⟩, + ⟨⟨112625100994585178971904849835736791529474097256617515121,112625100994585178971904849835736791529474097256938638245⟩,⟨591148901249576152351497708246612856351351777046224504260,591148901249576152351497708246612856351351777046545325150⟩⟩, + ⟨⟨-148658782058041253668095204292081292248428725161629231024,-148658782058041253668095204292081292248428725161487048010⟩,⟨215609354076951527293281656617536866678619113915303123647,215609354076951527293281656617536866678619113915445369979⟩⟩, + ⟨⟨-95440591611375324621189514667265120789391593282992412425,-95440591611375324621189514667265120789391593282927305205⟩,⟨23039905014897552748782688357709734105450748639403877707,23039905014897552748782688357709734105450748639469006272⟩⟩, + ⟨⟨-28973767294817734361465194217776034495630205369298140789,-28973767294817734361465194217776034495630205369278581673⟩,⟨-12055512336256038152822244593679309000436347325099955115,-12055512336256038152822244593679309000436347325080394816⟩⟩, + ⟨⟨-5442364151377311836328971157870171194337322951815944195,-5442364151377311836328971157870171194337322951809613311⟩,⟨-6566618259494586837861589068984133569695825302642503227,-6566618259494586837861589068984133569695825302636172808⟩⟩, + ⟨⟨-796933039311131557963911248471766744840850603136375666,-796933039311131557963911248471766744840850603134922058⟩,⟨-1824949732745882427383022032255654937654747763106737586,-1824949732745882427383022032255654937654747763105283758⟩⟩, + ⟨⟨-160293598984679888867421481399629534042798504376650445,-160293598984679888867421481399629534042798504376351804⟩,⟨-379165932976236658225922600027621438643432894994363228,-379165932976236658225922600027621438643432894994064580⟩⟩, + ⟨⟨-52667492319776583478964236231035703833262372068196414,-52667492319776583478964236231035703833262372068163621⟩,⟨-59876106693160803932435781831620981409360833022600814,-59876106693160803932435781831620981409360833022567961⟩⟩, + ⟨⟨-15653112319550972776583144461253896660071344083961017,-15653112319550972776583144461253896660071344083950061⟩,⟨-2233750522110013602416782325485080170079109156154377,-2233750522110013602416782325485080170079109156143430⟩⟩, + ⟨⟨-2023342918879181609917145401782837666290562655759066,-2023342918879181609917145401782837666290562655757001⟩,⟨2993512918315010568192582075582012993774336390761003,2993512918315010568192582075582012993774336390763019⟩⟩, + ⟨⟨863450016470738500228115087444058803660824010642652,863450016470738500228115087444058803660824010643497⟩,⟨668135946241575040456462224717809713235218299462177,668135946241575040456462224717809713235218299463085⟩⟩, + ⟨⟨200883265934974083938679918681424808304530560508319,200883265934974083938679918681424808304530560508974⟩,⟨-456051418430862519099663255476767635712609308575355,-456051418430862519099663255476767635712609308574730⟩⟩, + ⟨⟨-379071840419955575142687061194069250370921787882475,-379071840419955575142687061194069250370921787881725⟩,⟨-444,370⟩⟩, + ⟨⟨200883265934974083938679918681424808304530560508319,200883265934974083938679918681424808304530560508974⟩,⟨456051418430862519099663255476767635712609308574730,456051418430862519099663255476767635712609308575355⟩⟩, + ⟨⟨863450016470738500228115087444058803660824010642652,863450016470738500228115087444058803660824010643497⟩,⟨-668135946241575040456462224717809713235218299463085,-668135946241575040456462224717809713235218299462177⟩⟩, + ⟨⟨-2023342918879181609917145401782837666290562655759066,-2023342918879181609917145401782837666290562655757001⟩,⟨-2993512918315010568192582075582012993774336390763019,-2993512918315010568192582075582012993774336390761003⟩⟩, + ⟨⟨-15653112319550972776583144461253896660071344083961017,-15653112319550972776583144461253896660071344083950061⟩,⟨2233750522110013602416782325485080170079109156143430,2233750522110013602416782325485080170079109156154377⟩⟩, + ⟨⟨-52667492319776583478964236231035703833262372068196414,-52667492319776583478964236231035703833262372068163621⟩,⟨59876106693160803932435781831620981409360833022567961,59876106693160803932435781831620981409360833022600814⟩⟩, + ⟨⟨-160293598984679888867421481399629534042798504376650445,-160293598984679888867421481399629534042798504376351804⟩,⟨379165932976236658225922600027621438643432894994064580,379165932976236658225922600027621438643432894994363228⟩⟩, + ⟨⟨-796933039311131557963911248471766744840850603136375666,-796933039311131557963911248471766744840850603134922058⟩,⟨1824949732745882427383022032255654937654747763105283758,1824949732745882427383022032255654937654747763106737586⟩⟩, + ⟨⟨-5442364151377311836328971157870171194337322951815944195,-5442364151377311836328971157870171194337322951809613311⟩,⟨6566618259494586837861589068984133569695825302636172808,6566618259494586837861589068984133569695825302642503227⟩⟩, + ⟨⟨-28973767294817734361465194217776034495630205369298140789,-28973767294817734361465194217776034495630205369278581673⟩,⟨12055512336256038152822244593679309000436347325080394816,12055512336256038152822244593679309000436347325099955115⟩⟩, + ⟨⟨-95440591611375324621189514667265120789391593282992412425,-95440591611375324621189514667265120789391593282927305205⟩,⟨-23039905014897552748782688357709734105450748639469006272,-23039905014897552748782688357709734105450748639403877707⟩⟩, + ⟨⟨-148658782058041253668095204292081292248428725161629231027,-148658782058041253668095204292081292248428725161487048003⟩,⟨-215609354076951527293281656617536866678619113915445369987,-215609354076951527293281656617536866678619113915303123645⟩⟩, + ⟨⟨112625100994585178971904849835736791529474097256617515122,112625100994585178971904849835736791529474097256938638253⟩,⟨-591148901249576152351497708246612856351351777046545325153,-591148901249576152351497708246612856351351777046224504256⟩⟩, + ⟨⟨1025295477553543817192544190286487253700898746344596510367,1025295477553543817192544190286487253700898746345260864582⟩,⟨-639246627233006400212076189236527650334635849513367470748,-639246627233006400212076189236527650334635849512704708660⟩⟩, + ⟨⟨2069202417354358105664310407800446915232197599480320623145,2069202417354358105664310407800446915232197599481333103936⟩,⟨594404499299025128350443728717626147032574205731391389261,594404499299025128350443728717626147032574205732402765708⟩⟩, + ⟨⟨1524175143358310302596417364924802040525709113114670455784,1524175143358310302596417364924802040525709113116005331187⟩,⟨3102891299510039307273679604801974271666399866260294380083,3102891299510039307273679604801974271666399866261629122174⟩⟩] +lemma tw1_1_2_7_calc (j : Fin 31) : taylorWaveBox 1 1 2 7 j = tw1_1_2_7 j := by + revert j + decide +kernel +def tw1_1_2_8 : Fin 31 → CI := ![⟨⟨911606530369784052435219974276305494225899398481264109439,911606530369784052435219974276305494225899398481816866885⟩,⟨919925673269084482519077340772756901626164361188946956615,919925673269084482519077340772756901626164361189499176219⟩⟩, + ⟨⟨-85033394357778860241637155910016433892337181060034776917,-85033394357778860241637155910016433892337181059568095753⟩,⟨838407669042781969875078247325863722199773311391181948162,838407669042781969875078247325863722199773311391649177442⟩⟩, + ⟨⟨-413480822597268165343570420906279789520219667045706247941,-413480822597268165343570420906279789520219667045431575166⟩,⟨271897202738230995807206679621655120397561462917117148499,271897202738230995807206679621655120397561462917392170113⟩⟩, + ⟨⟨-246860815322928503383648481620973675990650357281982838808,-246860815322928503383648481620973675990650357281844904625⟩,⟨-75794018000710543080949222750698102830285154048861007520,-75794018000710543080949222750698102830285154048723198344⟩⟩, + ⟨⟨-48306480500345347605928230127076996824789945136760932150,-48306480500345347605928230127076996824789945136680330212⟩,⟨-107520530713795948770628124666604764176718443914595597867,-107520530713795948770628124666604764176718443914515056996⟩⟩, + ⟨⟨16838898435276885583999491768344358303502033603557763946,16838898435276885583999491768344358303502033603588195681⟩,⟨-43223151265733657440428622562278825617562354367800366820,-43223151265733657440428622562278825617562354367769937923⟩⟩, + ⟨⟨13667769884004423275346976192432089263755375206086465556,13667769884004423275346976192432089263755375206098470039⟩,⟨-7457121360108786964212985322177990392010209734767722881,-7457121360108786964212985322177990392010209734755716793⟩⟩, + ⟨⟨4434781784407867576583649531056493782782441336141982443,4434781784407867576583649531056493782782441336145499965⟩,⟨263850372961228013710735427817469743496853201730875343,263850372961228013710735427817469743496853201734393035⟩⟩, + ⟨⟨993250914157098403193198358995542327831528976728026985,993250914157098403193198358995542327831528976728916297⟩,⟨444079250840691845660609188525902807915704118867607605,444079250840691845660609188525902807915704118868497049⟩⟩, + ⟨⟨204374894825879821999799395210725253845753936439035191,204374894825879821999799395210725253845753936439213444⟩,⟨116893197288585875956632335515254520503140749624815826,116893197288585875956632335515254520503140749624994077⟩⟩, + ⟨⟨45572929815097084379366070490118245612468186467351871,45572929815097084379366070490118245612468186467375986⟩,⟨13713684167691357631747046598745289853388648557932513,13713684167691357631747046598745289853388648557956646⟩⟩, + ⟨⟨9321479313417515192352825561944093463902310406755440,9321479313417515192352825561944093463902310406761730⟩,⟨-3029926479067079755938049113741753483791422667095771,-3029926479067079755938049113741753483791422667089520⟩⟩, + ⟨⟨562526005979772795239401433510898016730733068036312,562526005979772795239401433510898016730733068037993⟩,⟨-2242647441251235900208134999023658299116697498557589,-2242647441251235900208134999023658299116697498555926⟩⟩, + ⟨⟨-652655248683067272975779746831931702327504277329019,-652655248683067272975779746831931702327504277328418⟩,⟨-293639644760458517906333175828734556032318238627988,-293639644760458517906333175828734556032318238627385⟩⟩, + ⟨⟨-96722433594028717603766965589576469867736895073063,-96722433594028717603766965589576469867736895072638⟩,⟨317205598375600422393487067110396109521792565742242,317205598375600422393487067110396109521792565742639⟩⟩, + ⟨⟨253556506466777188431926863762818303825257284992763,253556506466777188431926863762818303825257284993266⟩,⟨-248,297⟩⟩, + ⟨⟨-96722433594028717603766965589576469867736895073063,-96722433594028717603766965589576469867736895072638⟩,⟨-317205598375600422393487067110396109521792565742639,-317205598375600422393487067110396109521792565742242⟩⟩, + ⟨⟨-652655248683067272975779746831931702327504277329019,-652655248683067272975779746831931702327504277328418⟩,⟨293639644760458517906333175828734556032318238627385,293639644760458517906333175828734556032318238627988⟩⟩, + ⟨⟨562526005979772795239401433510898016730733068036312,562526005979772795239401433510898016730733068037993⟩,⟨2242647441251235900208134999023658299116697498555926,2242647441251235900208134999023658299116697498557589⟩⟩, + ⟨⟨9321479313417515192352825561944093463902310406755440,9321479313417515192352825561944093463902310406761730⟩,⟨3029926479067079755938049113741753483791422667089520,3029926479067079755938049113741753483791422667095771⟩⟩, + ⟨⟨45572929815097084379366070490118245612468186467351871,45572929815097084379366070490118245612468186467375986⟩,⟨-13713684167691357631747046598745289853388648557956646,-13713684167691357631747046598745289853388648557932513⟩⟩, + ⟨⟨204374894825879821999799395210725253845753936439035191,204374894825879821999799395210725253845753936439213444⟩,⟨-116893197288585875956632335515254520503140749624994077,-116893197288585875956632335515254520503140749624815826⟩⟩, + ⟨⟨993250914157098403193198358995542327831528976728026985,993250914157098403193198358995542327831528976728916297⟩,⟨-444079250840691845660609188525902807915704118868497049,-444079250840691845660609188525902807915704118867607605⟩⟩, + ⟨⟨4434781784407867576583649531056493782782441336141982443,4434781784407867576583649531056493782782441336145499965⟩,⟨-263850372961228013710735427817469743496853201734393035,-263850372961228013710735427817469743496853201730875343⟩⟩, + ⟨⟨13667769884004423275346976192432089263755375206086465556,13667769884004423275346976192432089263755375206098470039⟩,⟨7457121360108786964212985322177990392010209734755716793,7457121360108786964212985322177990392010209734767722881⟩⟩, + ⟨⟨16838898435276885583999491768344358303502033603557763946,16838898435276885583999491768344358303502033603588195681⟩,⟨43223151265733657440428622562278825617562354367769937923,43223151265733657440428622562278825617562354367800366820⟩⟩, + ⟨⟨-48306480500345347605928230127076996824789945136760932154,-48306480500345347605928230127076996824789945136680330211⟩,⟨107520530713795948770628124666604764176718443914515056993,107520530713795948770628124666604764176718443914595597870⟩⟩, + ⟨⟨-246860815322928503383648481620973675990650357281982838811,-246860815322928503383648481620973675990650357281844904625⟩,⟨75794018000710543080949222750698102830285154048723198341,75794018000710543080949222750698102830285154048861007520⟩⟩, + ⟨⟨-413480822597268165343570420906279789520219667045706247937,-413480822597268165343570420906279789520219667045431575167⟩,⟨-271897202738230995807206679621655120397561462917392170112,-271897202738230995807206679621655120397561462917117148504⟩⟩, + ⟨⟨-85033394357778860241637155910016433892337181060034776912,-85033394357778860241637155910016433892337181059568095747⟩,⟨-838407669042781969875078247325863722199773311391649177443,-838407669042781969875078247325863722199773311391181948162⟩⟩, + ⟨⟨911606530369784052435219974276305494225899398481264109451,911606530369784052435219974276305494225899398481816866884⟩,⟨-919925673269084482519077340772756901626164361189499176207,-919925673269084482519077340772756901626164361188946956615⟩⟩] +lemma tw1_1_2_8_calc (j : Fin 31) : taylorWaveBox 1 1 2 8 j = tw1_1_2_8 j := by + revert j + decide +kernel +def tw1_1_2_9 : Fin 31 → CI := ![⟨⟨-397641661984573812026372077589329046670861919878392071221,-397641661984573812026372077589329046670861919878165395520⟩,⟨190861961801637306405708012653866095785265096883971467154,190861961801637306405708012653866095785265096884198436829⟩⟩, + ⟨⟨-265726934884460176574851264344860829542962150952304808082,-265726934884460176574851264344860829542962150952127315583⟩,⟨-138977358225232249613193401413833901010763867808588457803,-138977358225232249613193401413833901010763867808411097626⟩⟩, + ⟨⟨-27549675538930106891658141206893324345528809746804408555,-27549675538930106891658141206893324345528809746708416554⟩,⟨-182188205264673110742813712485694351108933675968806971786,-182188205264673110742813712485694351108933675968710916755⟩⟩, + ⟨⟨71137126850032678831855524113571216333830857910664474377,71137126850032678831855524113571216333830857910732832860⟩,⟨-71328775932027008566721362901531861345021490704886721946,-71328775932027008566721362901531861345021490704818248909⟩⟩, + ⟨⟨47867925878786320513980189182282482777934597547180683360,47867925878786320513980189182282482777934597547214989394⟩,⟨5901085472483806129238434253393469313764628894695906754,5901085472483806129238434253393469313764628894730222855⟩⟩, + ⟨⟨11100416840220907524198283471215240846866334471094426880,11100416840220907524198283471215240846866334471110466872⟩,⟨16545164462025160815889202767854823313254977652236894083,16545164462025160815889202767854823313254977652252930658⟩⟩, + ⟨⟨-1240554833790467312150753911422911198813173007010146681,-1240554833790467312150753911422911198813173007004029054⟩,⟨6912067977195341855849260716227832261559724687685715939,6912067977195341855849260716227832261559724687691833047⟩⟩, + ⟨⟨-1525051215478312192645732992777324780536259683714634939,-1525051215478312192645732992777324780536259683712696568⟩,⟨1449175424687084158226989224810963978259602340234312906,1449175424687084158226989224810963978259602340236251376⟩⟩, + ⟨⟨-513275316305595457203942531646566619144659604650220841,-513275316305595457203942531646566619144659604649757825⟩,⟨169065844164646202984117500377631601192179228642900717,169065844164646202984117500377631601192179228643363687⟩⟩, + ⟨⟨-121356213728073321439757522289100014491887210486628383,-121356213728073321439757522289100014491887210486511720⟩,⟨16081209249575694273767648392426336170281220820016611,16081209249575694273767648392426336170281220820133271⟩⟩, + ⟨⟨-24921198203735681827276477773523867624293317083362972,-24921198203735681827276477773523867624293317083349027⟩,⟨6756923231905979081079055542793614683585982416493796,6756923231905979081079055542793614683585982416507729⟩⟩, + ⟨⟨-3964279109083823003537572667205639588664493423836923,-3964279109083823003537572667205639588664493423832772⟩,⟨3846317601385933499431379712900596032557274240646843,3846317601385933499431379712900596032557274240650974⟩⟩, + ⟨⟨138098045618825752074137497861207918730167748449037,138098045618825752074137497861207918730167748450147⟩,⟨1337944744817108610319853195849625438678692334780301,1337944744817108610319853195849625438678692334781409⟩⟩, + ⟨⟨419048681988220836349874031120519263503991695401381,419048681988220836349874031120519263503991695401751⟩,⟨79292134496871311679995984253705504419253939407801,79292134496871311679995984253705504419253939408148⟩⟩, + ⟨⟨35328427336697643078564313899035256096871534600898,35328427336697643078564313899035256096871534601145⟩,⟨-197487183814533424887159475286295034064054848369523,-197487183814533424887159475286295034064054848369296⟩⟩, + ⟨⟨-154182580417791002639298734733261616587092147347150,-154182580417791002639298734733261616587092147346844⟩,⟨-181,151⟩⟩, + ⟨⟨35328427336697643078564313899035256096871534600898,35328427336697643078564313899035256096871534601145⟩,⟨197487183814533424887159475286295034064054848369296,197487183814533424887159475286295034064054848369523⟩⟩, + ⟨⟨419048681988220836349874031120519263503991695401381,419048681988220836349874031120519263503991695401751⟩,⟨-79292134496871311679995984253705504419253939408148,-79292134496871311679995984253705504419253939407801⟩⟩, + ⟨⟨138098045618825752074137497861207918730167748449037,138098045618825752074137497861207918730167748450147⟩,⟨-1337944744817108610319853195849625438678692334781409,-1337944744817108610319853195849625438678692334780301⟩⟩, + ⟨⟨-3964279109083823003537572667205639588664493423836923,-3964279109083823003537572667205639588664493423832772⟩,⟨-3846317601385933499431379712900596032557274240650974,-3846317601385933499431379712900596032557274240646843⟩⟩, + ⟨⟨-24921198203735681827276477773523867624293317083362972,-24921198203735681827276477773523867624293317083349027⟩,⟨-6756923231905979081079055542793614683585982416507729,-6756923231905979081079055542793614683585982416493796⟩⟩, + ⟨⟨-121356213728073321439757522289100014491887210486628383,-121356213728073321439757522289100014491887210486511720⟩,⟨-16081209249575694273767648392426336170281220820133271,-16081209249575694273767648392426336170281220820016611⟩⟩, + ⟨⟨-513275316305595457203942531646566619144659604650220841,-513275316305595457203942531646566619144659604649757825⟩,⟨-169065844164646202984117500377631601192179228643363687,-169065844164646202984117500377631601192179228642900717⟩⟩, + ⟨⟨-1525051215478312192645732992777324780536259683714634939,-1525051215478312192645732992777324780536259683712696568⟩,⟨-1449175424687084158226989224810963978259602340236251376,-1449175424687084158226989224810963978259602340234312906⟩⟩, + ⟨⟨-1240554833790467312150753911422911198813173007010146681,-1240554833790467312150753911422911198813173007004029054⟩,⟨-6912067977195341855849260716227832261559724687691833047,-6912067977195341855849260716227832261559724687685715939⟩⟩, + ⟨⟨11100416840220907524198283471215240846866334471094426880,11100416840220907524198283471215240846866334471110466872⟩,⟨-16545164462025160815889202767854823313254977652252930658,-16545164462025160815889202767854823313254977652236894083⟩⟩, + ⟨⟨47867925878786320513980189182282482777934597547180683359,47867925878786320513980189182282482777934597547214989395⟩,⟨-5901085472483806129238434253393469313764628894730222855,-5901085472483806129238434253393469313764628894695906753⟩⟩, + ⟨⟨71137126850032678831855524113571216333830857910664474376,71137126850032678831855524113571216333830857910732832860⟩,⟨71328775932027008566721362901531861345021490704818248909,71328775932027008566721362901531861345021490704886721947⟩⟩, + ⟨⟨-27549675538930106891658141206893324345528809746804408555,-27549675538930106891658141206893324345528809746708416556⟩,⟨182188205264673110742813712485694351108933675968710916756,182188205264673110742813712485694351108933675968806971785⟩⟩, + ⟨⟨-265726934884460176574851264344860829542962150952304808082,-265726934884460176574851264344860829542962150952127315583⟩,⟨138977358225232249613193401413833901010763867808411097624,138977358225232249613193401413833901010763867808588457802⟩⟩, + ⟨⟨-397641661984573812026372077589329046670861919878392071217,-397641661984573812026372077589329046670861919878165395522⟩,⟨-190861961801637306405708012653866095785265096884198436829,-190861961801637306405708012653866095785265096883971467159⟩⟩] +lemma tw1_1_2_9_calc (j : Fin 31) : taylorWaveBox 1 1 2 9 j = tw1_1_2_9 j := by + revert j + decide +kernel +def tw1_1_2_10 : Fin 31 → CI := ![⟨⟨-15685550087802484290083051052573006683407768805332172383,-15685550087802484290083051052573006683407768805253012094⟩,⟨-136803192756601649223369947925284541571000424861304955352,-136803192756601649223369947925284541571000424861225877811⟩⟩, + ⟨⟨74301824264694359196051266314126571538600724602656885674,74301824264694359196051266314126571538600724602714320331⟩,⟨-63620075649205231931195874658338299327877989904013429968,-63620075649205231931195874658338299327877989903955992594⟩⟩, + ⟨⟨60414078362940975756141643306466280965657300931912696753,60414078362940975756141643306466280965657300931955799307⟩,⟨17472405710132382973721562741607255804239830646785066287,17472405710132382973721562741607255804239830646828082840⟩⟩, + ⟨⟨10665921881286506356253388236438687255624134272217306952,10665921881286506356253388236438687255624134272244012099⟩,⟨34408652152037020471968604916355762954419176702250768168,34408652152037020471968604916355762954419176702277448059⟩⟩, + ⟨⟨-11199071882764622094051383560092468069649338097929094548,-11199071882764622094051383560092468069649338097914289071⟩,⟨14206447835288416515685915113569121734169430346707393991,14206447835288416515685915113569121734169430346722204985⟩⟩, + ⟨⟨-7843217276419947590453465610203003842355698869939598306,-7843217276419947590453465610203003842355698869932002584⟩,⟨-136696947467594541259053716827361383505512678465821948,-136696947467594541259053716827361383505512678458224920⟩⟩, + ⟨⟨-1906111538381116558917987928776981184853512057985900735,-1906111538381116558917987928776981184853512057982995322⟩,⟨-2190157632109934774080969072269645519802834916814019311,-2190157632109934774080969072269645519802834916811114072⟩⟩, + ⟨⟨-7684147344568431333876891334382117225776077759353107,-7684147344568431333876891334382117225776077758367282⟩,⟨-913181698741746662526989861976361667578523920564017913,-913181698741746662526989861976361667578523920563032130⟩⟩, + ⟨⟨120965640711717079337614438482063419065685127524899107,120965640711717079337614438482063419065685127525157567⟩,⟨-214256125931149508729237625660110219274063159753695142,-214256125931149508729237625660110219274063159753436717⟩⟩, + ⟨⟨41354295549858369022757994054386396924369137746117883,41354295549858369022757994054386396924369137746173953⟩,⟨-41159096658546236776350807353494751529547998654180362,-41159096658546236776350807353494751529547998654124292⟩⟩, + ⟨⟨8743754456925248559747800315972636368026765643438454,8743754456925248559747800315972636368026765643447365⟩,⟨-9405259463656625251611661541270861234233065277763302,-9405259463656625251611661541270861234233065277754401⟩⟩, + ⟨⟨963590412925957492729268358443358477253368827024907,963590412925957492729268358443358477253368827027479⟩,⟨-2685714501631754246092003321112054734533594865455770,-2685714501631754246092003321112054734533594865453201⟩⟩, + ⟨⟨-312931707999089020654446326700883401198369414060650,-312931707999089020654446326700883401198369414060035⟩,⟨-645401232941430059005655546394718375503107034114830,-645401232941430059005655546394718375503107034114212⟩⟩, + ⟨⟨-232695893828065090871150614319286977684484120469220,-232695893828065090871150614319286977684484120469020⟩,⟨11356819881212468366932157865072309283863293578026,11356819881212468366932157865072309283863293578201⟩⟩, + ⟨⟨-6456990696571147163278574441066632431284624582923,-6456990696571147163278574441066632431284624582793⟩,⟨111068452746276600656465667006516733503779072253086,111068452746276600656465667006516733503779072253202⟩⟩, + ⟨⟨85942364745113679070404229246850975496008820250296,85942364745113679070404229246850975496008820250468⟩,⟨-84,101⟩⟩, + ⟨⟨-6456990696571147163278574441066632431284624582923,-6456990696571147163278574441066632431284624582793⟩,⟨-111068452746276600656465667006516733503779072253202,-111068452746276600656465667006516733503779072253086⟩⟩, + ⟨⟨-232695893828065090871150614319286977684484120469220,-232695893828065090871150614319286977684484120469020⟩,⟨-11356819881212468366932157865072309283863293578201,-11356819881212468366932157865072309283863293578026⟩⟩, + ⟨⟨-312931707999089020654446326700883401198369414060650,-312931707999089020654446326700883401198369414060035⟩,⟨645401232941430059005655546394718375503107034114212,645401232941430059005655546394718375503107034114830⟩⟩, + ⟨⟨963590412925957492729268358443358477253368827024907,963590412925957492729268358443358477253368827027479⟩,⟨2685714501631754246092003321112054734533594865453201,2685714501631754246092003321112054734533594865455770⟩⟩, + ⟨⟨8743754456925248559747800315972636368026765643438454,8743754456925248559747800315972636368026765643447365⟩,⟨9405259463656625251611661541270861234233065277754401,9405259463656625251611661541270861234233065277763302⟩⟩, + ⟨⟨41354295549858369022757994054386396924369137746117883,41354295549858369022757994054386396924369137746173953⟩,⟨41159096658546236776350807353494751529547998654124292,41159096658546236776350807353494751529547998654180362⟩⟩, + ⟨⟨120965640711717079337614438482063419065685127524899107,120965640711717079337614438482063419065685127525157567⟩,⟨214256125931149508729237625660110219274063159753436717,214256125931149508729237625660110219274063159753695142⟩⟩, + ⟨⟨-7684147344568431333876891334382117225776077759353107,-7684147344568431333876891334382117225776077758367282⟩,⟨913181698741746662526989861976361667578523920563032130,913181698741746662526989861976361667578523920564017913⟩⟩, + ⟨⟨-1906111538381116558917987928776981184853512057985900735,-1906111538381116558917987928776981184853512057982995322⟩,⟨2190157632109934774080969072269645519802834916811114072,2190157632109934774080969072269645519802834916814019311⟩⟩, + ⟨⟨-7843217276419947590453465610203003842355698869939598306,-7843217276419947590453465610203003842355698869932002584⟩,⟨136696947467594541259053716827361383505512678458224920,136696947467594541259053716827361383505512678465821948⟩⟩, + ⟨⟨-11199071882764622094051383560092468069649338097929094548,-11199071882764622094051383560092468069649338097914289070⟩,⟨-14206447835288416515685915113569121734169430346722204986,-14206447835288416515685915113569121734169430346707393991⟩⟩, + ⟨⟨10665921881286506356253388236438687255624134272217306952,10665921881286506356253388236438687255624134272244012099⟩,⟨-34408652152037020471968604916355762954419176702277448059,-34408652152037020471968604916355762954419176702250768168⟩⟩, + ⟨⟨60414078362940975756141643306466280965657300931912696753,60414078362940975756141643306466280965657300931955799307⟩,⟨-17472405710132382973721562741607255804239830646828082840,-17472405710132382973721562741607255804239830646785066287⟩⟩, + ⟨⟨74301824264694359196051266314126571538600724602656885673,74301824264694359196051266314126571538600724602714320330⟩,⟨63620075649205231931195874658338299327877989903955992594,63620075649205231931195874658338299327877989904013429969⟩⟩, + ⟨⟨-15685550087802484290083051052573006683407768805332172383,-15685550087802484290083051052573006683407768805253012096⟩,⟨136803192756601649223369947925284541571000424861225877812,136803192756601649223369947925284541571000424861304955351⟩⟩] +lemma tw1_1_2_10_calc (j : Fin 31) : taylorWaveBox 1 1 2 10 j = tw1_1_2_10 j := by + revert j + decide +kernel +def tw1_1_2_11 : Fin 31 → CI := ![⟨⟨38732263824094011901141136782365094887078766656502087886,38732263824094011901141136782365094887078766656526244131⟩,⟨8628314704245563672055572828557560839251684807879732769,8628314704245563672055572828557560839251684807903901666⟩⟩, + ⟨⟨9468707591786342378221565528052816491330182063750719594,9468707591786342378221565528052816491330182063771045092⟩,⟨27889514244927430515871501051119413323587865215941639674,27889514244927430515871501051119413323587865215961978582⟩⟩, + ⟨⟨-12962466968934845482035536271815752008567738956021904630,-12962466968934845482035536271815752008567738956006183024⟩,⟨14985542398460749898191113354046129354342668176254742628,14985542398460749898191113354046129354342668176270488232⟩⟩, + ⟨⟨-11686928736232583408782858947592970895148567672055902518,-11686928736232583408782858947592970895148567672046923298⟩,⟨-2194014210486752260143822769703120021266518931285674907,-2194014210486752260143822769703120021266518931276698546⟩⟩, + ⟨⟨-2196426657061794603923203521048684978321609977566883829,-2196426657061794603923203521048684978321609977560364350⟩,⟨-5865305013671402456892593029081758905606679269121616280,-5865305013671402456892593029081758905606679269115099912⟩⟩, + ⟨⟨1669893345277794647734152966020532946219328330009756594,1669893345277794647734152966020532946219328330012765952⟩,⟨-2310662553493909335468678466500134222159377554309887509,-2310662553493909335468678466500134222159377554306878046⟩⟩, + ⟨⟨1107243815017914722423631924635140499375929287164805510,1107243815017914722423631924635140499375929287166231228⟩,⟨-43340091803509791585900360459788491703561002541966707,-43340091803509791585900360459788491703561002540540871⟩⟩, + ⟨⟨269461112905615847237189266391358064341675210559910690,269461112905615847237189266391358064341675210560382696⟩,⟨247560157591178219683175101906322033110059375035309750,247560157591178219683175101906322033110059375035781742⟩⟩, + ⟨⟨23036519663260766387904037719755893341484394798563500,23036519663260766387904037719755893341484394798680507⟩,⟨100808705340108765797687389766634415245795233091458961,100808705340108765797687389766634415245795233091575973⟩⟩, + ⟨⟨-3492410159026831621987241240034808602587834867275737,-3492410159026831621987241240034808602587834867241718⟩,⟨25430806100675843387545723025414000029963002819748876,25430806100675843387545723025414000029963002819782896⟩⟩, + ⟨⟨-1124416914309942348779527808774424942684074811504107,-1124416914309942348779527808774424942684074811498947⟩,⟨5787244643162330603322897518674261922587812861501654,5787244643162330603322897518674261922587812861506813⟩⟩, + ⟨⟨151449856298981659662537214492225658324847370336462,151449856298981659662537214492225658324847370337773⟩,⟨1352134576761228322786570855106331288239687295713615,1352134576761228322786570855106331288239687295714930⟩⟩, + ⟨⟨253294483109147732552434635460816035804154325739250,253294483109147732552434635460816035804154325739543⟩,⟨245964574108611952311881476022170397854455256816946,245964574108611952311881476022170397854455256817244⟩⟩, + ⟨⟨112751336059993844218489183593116723583627153395851,112751336059993844218489183593116723583627153395947⟩,⟨-32977308906401289214187388163800845664961013318428,-32977308906401289214187388163800845664961013318350⟩⟩, + ⟨⟨-3464929580989943096704280886836885764687550651886,-3464929580989943096704280886836885764687550651824⟩,⟨-56846051051612196080781560509744192838516614649512,-56846051051612196080781560509744192838516614649458⟩⟩, + ⟨⟨-44219841604781625608326691708371017106438998447387,-44219841604781625608326691708371017106438998447298⟩,⟨-52,44⟩⟩, + ⟨⟨-3464929580989943096704280886836885764687550651886,-3464929580989943096704280886836885764687550651824⟩,⟨56846051051612196080781560509744192838516614649458,56846051051612196080781560509744192838516614649512⟩⟩, + ⟨⟨112751336059993844218489183593116723583627153395851,112751336059993844218489183593116723583627153395947⟩,⟨32977308906401289214187388163800845664961013318350,32977308906401289214187388163800845664961013318428⟩⟩, + ⟨⟨253294483109147732552434635460816035804154325739250,253294483109147732552434635460816035804154325739543⟩,⟨-245964574108611952311881476022170397854455256817244,-245964574108611952311881476022170397854455256816946⟩⟩, + ⟨⟨151449856298981659662537214492225658324847370336462,151449856298981659662537214492225658324847370337773⟩,⟨-1352134576761228322786570855106331288239687295714930,-1352134576761228322786570855106331288239687295713615⟩⟩, + ⟨⟨-1124416914309942348779527808774424942684074811504107,-1124416914309942348779527808774424942684074811498947⟩,⟨-5787244643162330603322897518674261922587812861506813,-5787244643162330603322897518674261922587812861501654⟩⟩, + ⟨⟨-3492410159026831621987241240034808602587834867275737,-3492410159026831621987241240034808602587834867241718⟩,⟨-25430806100675843387545723025414000029963002819782896,-25430806100675843387545723025414000029963002819748876⟩⟩, + ⟨⟨23036519663260766387904037719755893341484394798563500,23036519663260766387904037719755893341484394798680507⟩,⟨-100808705340108765797687389766634415245795233091575973,-100808705340108765797687389766634415245795233091458961⟩⟩, + ⟨⟨269461112905615847237189266391358064341675210559910690,269461112905615847237189266391358064341675210560382696⟩,⟨-247560157591178219683175101906322033110059375035781742,-247560157591178219683175101906322033110059375035309750⟩⟩, + ⟨⟨1107243815017914722423631924635140499375929287164805510,1107243815017914722423631924635140499375929287166231228⟩,⟨43340091803509791585900360459788491703561002540540871,43340091803509791585900360459788491703561002541966707⟩⟩, + ⟨⟨1669893345277794647734152966020532946219328330009756594,1669893345277794647734152966020532946219328330012765952⟩,⟨2310662553493909335468678466500134222159377554306878046,2310662553493909335468678466500134222159377554309887509⟩⟩, + ⟨⟨-2196426657061794603923203521048684978321609977566883829,-2196426657061794603923203521048684978321609977560364350⟩,⟨5865305013671402456892593029081758905606679269115099912,5865305013671402456892593029081758905606679269121616280⟩⟩, + ⟨⟨-11686928736232583408782858947592970895148567672055902518,-11686928736232583408782858947592970895148567672046923298⟩,⟨2194014210486752260143822769703120021266518931276698546,2194014210486752260143822769703120021266518931285674907⟩⟩, + ⟨⟨-12962466968934845482035536271815752008567738956021904629,-12962466968934845482035536271815752008567738956006183024⟩,⟨-14985542398460749898191113354046129354342668176270488232,-14985542398460749898191113354046129354342668176254742629⟩⟩, + ⟨⟨9468707591786342378221565528052816491330182063750719594,9468707591786342378221565528052816491330182063771045092⟩,⟨-27889514244927430515871501051119413323587865215961978582,-27889514244927430515871501051119413323587865215941639674⟩⟩, + ⟨⟨38732263824094011901141136782365094887078766656502087886,38732263824094011901141136782365094887078766656526244131⟩,⟨-8628314704245563672055572828557560839251684807903901665,-8628314704245563672055572828557560839251684807879732769⟩⟩] +lemma tw1_1_2_11_calc (j : Fin 31) : taylorWaveBox 1 1 2 11 j = tw1_1_2_11 j := by + revert j + decide +kernel +def tw1_1_2_12 : Fin 31 → CI := ![⟨⟨-5573107322127850771197195306875703663860856737025126214,-5573107322127850771197195306875703663860856737018504879⟩,⟨9038419089752634111731004917099976874546633249486612270,9038419089752634111731004917099976874546633249493234574⟩⟩, + ⟨⟨-8223119709113079703370486514464785342156546555218025844,-8223119709113079703370486514464785342156546555211021302⟩,⟨-440440959410030831353657352848234341649906781435019756,-440440959410030831353657352848234341649906781428020577⟩⟩, + ⟨⟨-2395622157905321460162991215947726821752208480011159062,-2395622157905321460162991215947726821752208480006216021⟩,⟨-5278438080189093947152062744844746614928638169951872856,-5278438080189093947152062744844746614928638169946931998⟩⟩, + ⟨⟨2268282532066448373468956610903840755148819655196444890,2268282532066448373468956610903840755148819655200129879⟩,⟨-2852918915221629231753831133819200791361720871869902684,-2852918915221629231753831133819200791361720871866213417⟩⟩, + ⟨⟨1978565404734781126152233237547918567791260520746300679,1978565404734781126152233237547918567791260520748688805⟩,⟨373544268340222238826508403708123111653551511815919488,373544268340222238826508403708123111653551511818307918⟩⟩, + ⟨⟨317798882728294324106196666966919937228892731860483729,317798882728294324106196666966919937228892731861880061⟩,⟨908103753108997565976010845107874260649392285676819044,908103753108997565976010845107874260649392285678215151⟩⟩, + ⟨⟨-233858496181245471838128062799379632710947299423072586,-233858496181245471838128062799379632710947299422492753⟩,⟨315462983045676265079265797254164639899278013847366910,315462983045676265079265797254164639899278013847946747⟩⟩, + ⟨⟨-135751383135988580848647580901826105898880592571824678,-135751383135988580848647580901826105898880592571601960⟩,⟨10371782370693177969394034515637690769495833454238013,10371782370693177969394034515637690769495833454460738⟩⟩, + ⟨⟨-33134855678630951201239974726030663378912142517386865,-33134855678630951201239974726030663378912142517326583⟩,⟨-23035771817795610749010832028187155246084444211186162,-23035771817795610749010832028187155246084444211125873⟩⟩, + ⟨⟨-5163348072507971401787101386012363216619139339032624,-5163348072507971401787101386012363216619139339016064⟩,⟨-9127480450758885017933297483585519369889389908974992,-9127480450758885017933297483585519369889389908958431⟩⟩, + ⟨⟨-897463764611802798282886064314866575052434068858311,-897463764611802798282886064314866575052434068855713⟩,⟨-2347483609144375765154908609223691424915742771734170,-2347483609144375765154908609223691424915742771731570⟩⟩, + ⟨⟨-323861155078607777270098161564084710496524278909672,-323861155078607777270098161564084710496524278909043⟩,⟨-507987407377566337708665441816828092363624213977962,-507987407377566337708665441816828092363624213977331⟩⟩, + ⟨⟨-147215994922466566051212669833196336096660422809752,-147215994922466566051212669833196336096660422809604⟩,⟨-66114568168628681057477986383446150289034633277717,-66114568168628681057477986383446150289034633277567⟩⟩, + ⟨⟨-47725555062877654584993632798766593012189308121187,-47725555062877654584993632798766593012189308121138⟩,⟨27345923989549912854645488547267817766945231666267,27345923989549912854645488547267817766945231666308⟩⟩, + ⟨⟨4841833972334039378316708716691137055437856824206,4841833972334039378316708716691137055437856824238⟩,⟨26634404717006633254921085253001249139765745641036,26634404717006633254921085253001249139765745641064⟩⟩, + ⟨⟨21127221353159381283743853499126905474701219149938,21127221353159381283743853499126905474701219149981⟩,⟨-21,25⟩⟩, + ⟨⟨4841833972334039378316708716691137055437856824206,4841833972334039378316708716691137055437856824238⟩,⟨-26634404717006633254921085253001249139765745641064,-26634404717006633254921085253001249139765745641036⟩⟩, + ⟨⟨-47725555062877654584993632798766593012189308121187,-47725555062877654584993632798766593012189308121138⟩,⟨-27345923989549912854645488547267817766945231666308,-27345923989549912854645488547267817766945231666267⟩⟩, + ⟨⟨-147215994922466566051212669833196336096660422809752,-147215994922466566051212669833196336096660422809604⟩,⟨66114568168628681057477986383446150289034633277567,66114568168628681057477986383446150289034633277717⟩⟩, + ⟨⟨-323861155078607777270098161564084710496524278909672,-323861155078607777270098161564084710496524278909043⟩,⟨507987407377566337708665441816828092363624213977331,507987407377566337708665441816828092363624213977962⟩⟩, + ⟨⟨-897463764611802798282886064314866575052434068858311,-897463764611802798282886064314866575052434068855713⟩,⟨2347483609144375765154908609223691424915742771731570,2347483609144375765154908609223691424915742771734170⟩⟩, + ⟨⟨-5163348072507971401787101386012363216619139339032624,-5163348072507971401787101386012363216619139339016064⟩,⟨9127480450758885017933297483585519369889389908958431,9127480450758885017933297483585519369889389908974992⟩⟩, + ⟨⟨-33134855678630951201239974726030663378912142517386865,-33134855678630951201239974726030663378912142517326583⟩,⟨23035771817795610749010832028187155246084444211125873,23035771817795610749010832028187155246084444211186162⟩⟩, + ⟨⟨-135751383135988580848647580901826105898880592571824678,-135751383135988580848647580901826105898880592571601960⟩,⟨-10371782370693177969394034515637690769495833454460738,-10371782370693177969394034515637690769495833454238013⟩⟩, + ⟨⟨-233858496181245471838128062799379632710947299423072586,-233858496181245471838128062799379632710947299422492753⟩,⟨-315462983045676265079265797254164639899278013847946747,-315462983045676265079265797254164639899278013847366910⟩⟩, + ⟨⟨317798882728294324106196666966919937228892731860483729,317798882728294324106196666966919937228892731861880061⟩,⟨-908103753108997565976010845107874260649392285678215151,-908103753108997565976010845107874260649392285676819044⟩⟩, + ⟨⟨1978565404734781126152233237547918567791260520746300679,1978565404734781126152233237547918567791260520748688805⟩,⟨-373544268340222238826508403708123111653551511818307918,-373544268340222238826508403708123111653551511815919488⟩⟩, + ⟨⟨2268282532066448373468956610903840755148819655196444890,2268282532066448373468956610903840755148819655200129879⟩,⟨2852918915221629231753831133819200791361720871866213417,2852918915221629231753831133819200791361720871869902684⟩⟩, + ⟨⟨-2395622157905321460162991215947726821752208480011159062,-2395622157905321460162991215947726821752208480006216021⟩,⟨5278438080189093947152062744844746614928638169946931998,5278438080189093947152062744844746614928638169951872856⟩⟩, + ⟨⟨-8223119709113079703370486514464785342156546555218025844,-8223119709113079703370486514464785342156546555211021302⟩,⟨440440959410030831353657352848234341649906781428020577,440440959410030831353657352848234341649906781435019756⟩⟩, + ⟨⟨-5573107322127850771197195306875703663860856737025126214,-5573107322127850771197195306875703663860856737018504879⟩,⟨-9038419089752634111731004917099976874546633249493234574,-9038419089752634111731004917099976874546633249486612270⟩⟩] +lemma tw1_1_2_12_calc (j : Fin 31) : taylorWaveBox 1 1 2 12 j = tw1_1_2_12 j := by + revert j + decide +kernel +def tw1_1_2_13 : Fin 31 → CI := ![⟨⟨-1677663008723573241525736473777682165890138987113960067,-1677663008723573241525736473777682165890138987111905633⟩,⟨-2053907251386143671911503957328700801547482941147979077,-2053907251386143671911503957328700801547482941145926101⟩⟩, + ⟨⟨904255008328114175227349730514780279882329334881360083,904255008328114175227349730514780279882329334883475891⟩,⟨-1949425704268792791299583171396640703913813058809577690,-1949425704268792791299583171396640703913813058807460854⟩⟩, + ⟨⟨1582743085867565750469124937481578267833619657686232121,1582743085867565750469124937481578267833619657687813640⟩,⟨8794334279531630841654374119406613396082582704972725,8794334279531630841654374119406613396082582706553072⟩⟩, + ⟨⟨418402377957313375532049423084199707089742591773105816,418402377957313375532049423084199707089742591774377029⟩,⟨955053429216861683637927334014558738641500267639873846,955053429216861683637927334014558738641500267641144130⟩⟩, + ⟨⟨-403583706883299185305120947848538831671256214425049508,-403583706883299185305120947848538831671256214424139948⟩,⟨449604014240049766885983946046279022060360882210943773,449604014240049766885983946046279022060360882211853555⟩⟩, + ⟨⟨-291920369073307815468513561883260642539866035540675025,-291920369073307815468513561883260642539866035540134850⟩,⟨-81334533895229354853307608930948933141923871313409620,-81334533895229354853307608930948933141923871312869415⟩⟩, + ⟨⟨-32867686135917910898919126741896369214034130746260702,-32867686135917910898919126741896369214034130745993875⟩,⟨-125659218957675347757297750735166540871787570625799171,-125659218957675347757297750735166540871787570625532361⟩⟩, + ⟨⟨29552910196773035929351944163482743220378126000782446,29552910196773035929351944163482743220378126000878861⟩,⟨-36904618367824116635282270230104460171294757943352200,-36904618367824116635282270230104460171294757943255783⟩⟩, + ⟨⟨14572911273448584876412429896568689204437875945960363,14572911273448584876412429896568689204437875945985453⟩,⟨-1921903417698593161350674146075855042111656317111644,-1921903417698593161350674146075855042111656317086555⟩⟩, + ⟨⟨3675514555901901830963915512342116266797115580734110,3675514555901901830963915512342116266797115580742198⟩,⟨1574374630144320130136254907266688188037486200347162,1574374630144320130136254907266688188037486200355250⟩⟩, + ⟨⟨796892280378768694622218964440010378754354010249902,796892280378768694622218964440010378754354010251311⟩,⟨604003563682997600047775446009392991504213665919482,604003563682997600047775446009392991504213665920891⟩⟩, + ⟨⟨212612307338976550933733896838429023758787376520110,212612307338976550933733896838429023758787376520450⟩,⟨129539066700303199055091394321749001269174134056593,129539066700303199055091394321749001269174134056934⟩⟩, + ⟨⟨68660600433776617378067743865043102652154803602414,68660600433776617378067743865043102652154803602493⟩,⟨5055060470591089418086473814353107236238272452577,5055060470591089418086473814353107236238272452656⟩⟩, + ⟨⟨17487961739872384138563247464417693798333756935751,17487961739872384138563247464417693798333756935775⟩,⟨-16491863398473756014397344300580650373608123015594,-16491863398473756014397344300580650373608123015571⟩⟩, + ⟨⟨-3535063769331637431629130446806270581876916539119,-3535063769331637431629130446806270581876916539103⟩,⟨-11477789857711120272486425216763395378854268748420,-11477789857711120272486425216763395378854268748406⟩⟩, + ⟨⟨-9421159555969983670776839811029028861416033135867,-9421159555969983670776839811029028861416033135848⟩,⟨-12,10⟩⟩, + ⟨⟨-3535063769331637431629130446806270581876916539119,-3535063769331637431629130446806270581876916539103⟩,⟨11477789857711120272486425216763395378854268748406,11477789857711120272486425216763395378854268748420⟩⟩, + ⟨⟨17487961739872384138563247464417693798333756935751,17487961739872384138563247464417693798333756935775⟩,⟨16491863398473756014397344300580650373608123015571,16491863398473756014397344300580650373608123015594⟩⟩, + ⟨⟨68660600433776617378067743865043102652154803602414,68660600433776617378067743865043102652154803602493⟩,⟨-5055060470591089418086473814353107236238272452656,-5055060470591089418086473814353107236238272452577⟩⟩, + ⟨⟨212612307338976550933733896838429023758787376520110,212612307338976550933733896838429023758787376520450⟩,⟨-129539066700303199055091394321749001269174134056934,-129539066700303199055091394321749001269174134056593⟩⟩, + ⟨⟨796892280378768694622218964440010378754354010249902,796892280378768694622218964440010378754354010251311⟩,⟨-604003563682997600047775446009392991504213665920891,-604003563682997600047775446009392991504213665919482⟩⟩, + ⟨⟨3675514555901901830963915512342116266797115580734110,3675514555901901830963915512342116266797115580742198⟩,⟨-1574374630144320130136254907266688188037486200355250,-1574374630144320130136254907266688188037486200347162⟩⟩, + ⟨⟨14572911273448584876412429896568689204437875945960363,14572911273448584876412429896568689204437875945985453⟩,⟨1921903417698593161350674146075855042111656317086555,1921903417698593161350674146075855042111656317111644⟩⟩, + ⟨⟨29552910196773035929351944163482743220378126000782446,29552910196773035929351944163482743220378126000878861⟩,⟨36904618367824116635282270230104460171294757943255783,36904618367824116635282270230104460171294757943352200⟩⟩, + ⟨⟨-32867686135917910898919126741896369214034130746260702,-32867686135917910898919126741896369214034130745993875⟩,⟨125659218957675347757297750735166540871787570625532361,125659218957675347757297750735166540871787570625799171⟩⟩, + ⟨⟨-291920369073307815468513561883260642539866035540675025,-291920369073307815468513561883260642539866035540134850⟩,⟨81334533895229354853307608930948933141923871312869415,81334533895229354853307608930948933141923871313409620⟩⟩, + ⟨⟨-403583706883299185305120947848538831671256214425049508,-403583706883299185305120947848538831671256214424139948⟩,⟨-449604014240049766885983946046279022060360882211853555,-449604014240049766885983946046279022060360882210943773⟩⟩, + ⟨⟨418402377957313375532049423084199707089742591773105816,418402377957313375532049423084199707089742591774377029⟩,⟨-955053429216861683637927334014558738641500267641144130,-955053429216861683637927334014558738641500267639873846⟩⟩, + ⟨⟨1582743085867565750469124937481578267833619657686232121,1582743085867565750469124937481578267833619657687813639⟩,⟨-8794334279531630841654374119406613396082582706553072,-8794334279531630841654374119406613396082582704972725⟩⟩, + ⟨⟨904255008328114175227349730514780279882329334881360083,904255008328114175227349730514780279882329334883475891⟩,⟨1949425704268792791299583171396640703913813058807460854,1949425704268792791299583171396640703913813058809577690⟩⟩, + ⟨⟨-1677663008723573241525736473777682165890138987113960067,-1677663008723573241525736473777682165890138987111905633⟩,⟨2053907251386143671911503957328700801547482941145926101,2053907251386143671911503957328700801547482941147979077⟩⟩] +lemma tw1_1_2_13_calc (j : Fin 31) : taylorWaveBox 1 1 2 13 j = tw1_1_2_13 j := by + revert j + decide +kernel +def tw1_1_2_14 : Fin 31 → CI := ![⟨⟨582966860682327082930834627758925365996094158576668074,582966860682327082930834627758925365996094158577252417⟩,⟨-213832075978220553802223091160613837117402120742046022,-213832075978220553802223091160613837117402120741461251⟩⟩, + ⟨⟨360532036037709268889655313064771353043847930730335440,360532036037709268889655313064771353043847930730915682⟩,⟨382630401087766626713384754300339406479060947732357595,382630401087766626713384754300339406479060947732937792⟩⟩, + ⟨⟨-171534744404690820838916619893860403373764332981882093,-171534744404690820838916619893860403373764332981364399⟩,⟨367060004416802246685143026553622641863972554064636226,367060004416802246685143026553622641863972554065154464⟩⟩, + ⟨⟨-278895216256330408126384614504332481567651260323325021,-278895216256330408126384614504332481567651260322935395⟩,⟨-20465600593218533968462440632785927959038089014647044,-20465600593218533968462440632785927959038089014257415⟩⟩, + ⟨⟨-49311061058955221634963716451627729196714638808017431,-49311061058955221634963716451627729196714638807683703⟩,⟨-162645236574797286061452110367887488505765314057761326,-162645236574797286061452110367887488505765314057427679⟩⟩, + ⟨⟨68974221331561969689894015989299821562992840817349014,68974221331561969689894015989299821562992840817556520⟩,⟨-57008494464681937753619180283977122847972453722803414,-57008494464681937753619180283977122847972453722595896⟩⟩, + ⟨⟨36755778266263422635606785708215036751895657937388925,36755778266263422635606785708215036751895657937492955⟩,⟨16467641554418757903345951557097402143407589825938562,16467641554418757903345951557097402143407589826042593⟩⟩, + ⟨⟨2210284208660427332188317729829832861463880153096382,2210284208660427332188317729829832861463880153138426⟩,⟨15232791187109179257472684886269090164594607832561922,15232791187109179257472684886269090164594607832603966⟩⟩, + ⟨⟨-3237564214899811868603524367681242733245305713723474,-3237564214899811868603524367681242733245305713711613⟩,⟨3835667241146102397888494844332274986831392056199991,3835667241146102397888494844332274986831392056211851⟩⟩, + ⟨⟨-1386078614095936460932945957280857445394662545640464,-1386078614095936460932945957280857445394662545636643⟩,⟨348894031100373644030423407417240802262008890744091,348894031100373644030423407417240802262008890747912⟩⟩, + ⟨⟨-371418466736667708922067532424774994864985270577251,-371418466736667708922067532424774994864985270576564⟩,⟨-34081676270607050908210743674545298132969059888487,-34081676270607050908210743674545298132969059887799⟩⟩, + ⟨⟨-96057098045674749346009419424242219165680815850736,-96057098045674749346009419424242219165680815850577⟩,⟨-8783713327834838198223181364162626699165858100644,-8783713327834838198223181364162626699165858100484⟩⟩, + ⟨⟨-26499337967024282811159590216593567690917196033385,-26499337967024282811159590216593567690917196033349⟩,⟨7480238466187982601658259578443361677308864245191,7480238466187982601658259578443361677308864245227⟩⟩, + ⟨⟨-5388213356561639729637139223921711815175742611238,-5388213356561639729637139223921711815175742611227⟩,⟨8243410565694190848728836994619905687914602271757,8243410565694190848728836994619905687914602271768⟩⟩, + ⟨⟨2026393039379056016374739531171580771520533024427,2026393039379056016374739531171580771520533024434⟩,⟨4565589417358858815563376019460027271622029991884,4565589417358858815563376019460027271622029991892⟩⟩, + ⟨⟨3938561324601772073815332691369926142851270955961,3938561324601772073815332691369926142851270955970⟩,⟨-4,5⟩⟩, + ⟨⟨2026393039379056016374739531171580771520533024427,2026393039379056016374739531171580771520533024434⟩,⟨-4565589417358858815563376019460027271622029991892,-4565589417358858815563376019460027271622029991884⟩⟩, + ⟨⟨-5388213356561639729637139223921711815175742611238,-5388213356561639729637139223921711815175742611227⟩,⟨-8243410565694190848728836994619905687914602271768,-8243410565694190848728836994619905687914602271757⟩⟩, + ⟨⟨-26499337967024282811159590216593567690917196033385,-26499337967024282811159590216593567690917196033349⟩,⟨-7480238466187982601658259578443361677308864245227,-7480238466187982601658259578443361677308864245191⟩⟩, + ⟨⟨-96057098045674749346009419424242219165680815850736,-96057098045674749346009419424242219165680815850577⟩,⟨8783713327834838198223181364162626699165858100484,8783713327834838198223181364162626699165858100644⟩⟩, + ⟨⟨-371418466736667708922067532424774994864985270577251,-371418466736667708922067532424774994864985270576564⟩,⟨34081676270607050908210743674545298132969059887799,34081676270607050908210743674545298132969059888487⟩⟩, + ⟨⟨-1386078614095936460932945957280857445394662545640464,-1386078614095936460932945957280857445394662545636643⟩,⟨-348894031100373644030423407417240802262008890747912,-348894031100373644030423407417240802262008890744091⟩⟩, + ⟨⟨-3237564214899811868603524367681242733245305713723474,-3237564214899811868603524367681242733245305713711613⟩,⟨-3835667241146102397888494844332274986831392056211851,-3835667241146102397888494844332274986831392056199991⟩⟩, + ⟨⟨2210284208660427332188317729829832861463880153096382,2210284208660427332188317729829832861463880153138426⟩,⟨-15232791187109179257472684886269090164594607832603966,-15232791187109179257472684886269090164594607832561922⟩⟩, + ⟨⟨36755778266263422635606785708215036751895657937388925,36755778266263422635606785708215036751895657937492955⟩,⟨-16467641554418757903345951557097402143407589826042593,-16467641554418757903345951557097402143407589825938562⟩⟩, + ⟨⟨68974221331561969689894015989299821562992840817349014,68974221331561969689894015989299821562992840817556520⟩,⟨57008494464681937753619180283977122847972453722595896,57008494464681937753619180283977122847972453722803414⟩⟩, + ⟨⟨-49311061058955221634963716451627729196714638808017431,-49311061058955221634963716451627729196714638807683703⟩,⟨162645236574797286061452110367887488505765314057427679,162645236574797286061452110367887488505765314057761326⟩⟩, + ⟨⟨-278895216256330408126384614504332481567651260323325021,-278895216256330408126384614504332481567651260322935395⟩,⟨20465600593218533968462440632785927959038089014257415,20465600593218533968462440632785927959038089014647044⟩⟩, + ⟨⟨-171534744404690820838916619893860403373764332981882093,-171534744404690820838916619893860403373764332981364399⟩,⟨-367060004416802246685143026553622641863972554065154464,-367060004416802246685143026553622641863972554064636226⟩⟩, + ⟨⟨360532036037709268889655313064771353043847930730335440,360532036037709268889655313064771353043847930730915682⟩,⟨-382630401087766626713384754300339406479060947732937792,-382630401087766626713384754300339406479060947732357595⟩⟩, + ⟨⟨582966860682327082930834627758925365996094158576668074,582966860682327082930834627758925365996094158577252417⟩,⟨213832075978220553802223091160613837117402120741461251,213832075978220553802223091160613837117402120742046022⟩⟩] +lemma tw1_1_2_14_calc (j : Fin 31) : taylorWaveBox 1 1 2 14 j = tw1_1_2_14 j := by + revert j + decide +kernel +def tw1_1_2_15 : Fin 31 → CI := ![⟨⟨2492184503780163031975070283422666139975329364203591,2492184503780163031975070283422666139975329364354787⟩,⟨136815188753958818666633138988892098755318826573651958,136815188753958818666633138988892098755318826573803078⟩⟩, + ⟨⟨-112644906109280341517493411239812631000043234029623234,-112644906109280341517493411239812631000043234029461397⟩,⟨44322327950937630918191601214640659498930594284476767,44322327950937630918191601214640659498930594284638555⟩⟩, + ⟨⟨-63035940565263342684671703116000789881991431147893330,-63035940565263342684671703116000789881991431147742262⟩,⟨-74532155110158963880903362075914392175791442211542472,-74532155110158963880903362075914392175791442211391495⟩⟩, + ⟨⟨37460137415803666625658876684238175827617707533724402,37460137415803666625658876684238175827617707533854401⟩,⟨-59828573553791254458645884385921235799643436258404419,-59828573553791254458645884385921235799643436258274348⟩⟩, + ⟨⟨43592170836081779870115590772217141331175726786545811,43592170836081779870115590772217141331175726786655539⟩,⟨11155927654477249171474076416693123440575480581881139,11155927654477249171474076416693123440575480581990872⟩⟩, + ⟨⟨2045365511172951944999476117123470854850256129208128,2045365511172951944999476117123470854850256129285539⟩,⟨24785088685329400957920247562272904339361539000736887,24785088685329400957920247562272904339361539000814293⟩⟩, + ⟨⟨-10466367839684637097081373160802179388006888248710083,-10466367839684637097081373160802179388006888248668456⟩,⟨5350031988457964837568958466891184747493804036074564,5350031988457964837568958466891184747493804036116192⟩⟩, + ⟨⟨-3872824948267078798581050888299791936449394908889091,-3872824948267078798581050888299791936449394908872337⟩,⟨-2691733761554041922969316786285436180410106420686797,-2691733761554041922969316786285436180410106420670044⟩⟩, + ⟨⟨-60626085451072320071452209419731042319400256712159,-60626085451072320071452209419731042319400256707488⟩,⟨-1612031261236610515384196917864728405451220453500828,-1612031261236610515384196917864728405451220453496157⟩⟩, + ⟨⟨299713152286081229945456335083921078539808193463328,299713152286081229945456335083921078539808193464963⟩,⟨-376044332127167088306631535407504390499391455635624,-376044332127167088306631535407504390499391455633989⟩⟩, + ⟨⟨117003599789471352846654230364556969626073183610413,117003599789471352846654230364556969626073183610725⟩,⟨-58781729122531447324033806439127655089978858719902,-58781729122531447324033806439127655089978858719591⟩⟩, + ⟨⟨32857726248274253213820369883034633864083451268695,32857726248274253213820369883034633864083451268763⟩,⟨-12549350958958149678023030767164232581665035398256,-12549350958958149678023030767164232581665035398189⟩⟩, + ⟨⟨8413030935692627731574998981162336310408391009988,8413030935692627731574998981162336310408391010004⟩,⟨-6053704031540769678510343397464948744806087285046,-6053704031540769678510343397464948744806087285031⟩⟩, + ⟨⟨1277680479064955445178297965791746404353316589336,1277680479064955445178297965791746404353316589341⟩,⟨-3576038158612703969717483363735960343905949567284,-3576038158612703969717483363735960343905949567279⟩⟩, + ⟨⟨-999709280818994701715227598292984327111744173455,-999709280818994701715227598292984327111744173452⟩,⟨-1680442503226403531412403238680740573097877301191,-1680442503226403531412403238680740573097877301187⟩⟩, + ⟨⟨-1549679636179149833727991317337733514855965646266,-1549679636179149833727991317337733514855965646262⟩,⟨-2,2⟩⟩, + ⟨⟨-999709280818994701715227598292984327111744173455,-999709280818994701715227598292984327111744173452⟩,⟨1680442503226403531412403238680740573097877301187,1680442503226403531412403238680740573097877301191⟩⟩, + ⟨⟨1277680479064955445178297965791746404353316589336,1277680479064955445178297965791746404353316589341⟩,⟨3576038158612703969717483363735960343905949567279,3576038158612703969717483363735960343905949567284⟩⟩, + ⟨⟨8413030935692627731574998981162336310408391009988,8413030935692627731574998981162336310408391010004⟩,⟨6053704031540769678510343397464948744806087285031,6053704031540769678510343397464948744806087285046⟩⟩, + ⟨⟨32857726248274253213820369883034633864083451268695,32857726248274253213820369883034633864083451268763⟩,⟨12549350958958149678023030767164232581665035398189,12549350958958149678023030767164232581665035398256⟩⟩, + ⟨⟨117003599789471352846654230364556969626073183610413,117003599789471352846654230364556969626073183610725⟩,⟨58781729122531447324033806439127655089978858719591,58781729122531447324033806439127655089978858719902⟩⟩, + ⟨⟨299713152286081229945456335083921078539808193463328,299713152286081229945456335083921078539808193464963⟩,⟨376044332127167088306631535407504390499391455633989,376044332127167088306631535407504390499391455635624⟩⟩, + ⟨⟨-60626085451072320071452209419731042319400256712159,-60626085451072320071452209419731042319400256707488⟩,⟨1612031261236610515384196917864728405451220453496157,1612031261236610515384196917864728405451220453500828⟩⟩, + ⟨⟨-3872824948267078798581050888299791936449394908889091,-3872824948267078798581050888299791936449394908872337⟩,⟨2691733761554041922969316786285436180410106420670044,2691733761554041922969316786285436180410106420686797⟩⟩, + ⟨⟨-10466367839684637097081373160802179388006888248710083,-10466367839684637097081373160802179388006888248668456⟩,⟨-5350031988457964837568958466891184747493804036116192,-5350031988457964837568958466891184747493804036074564⟩⟩, + ⟨⟨2045365511172951944999476117123470854850256129208128,2045365511172951944999476117123470854850256129285539⟩,⟨-24785088685329400957920247562272904339361539000814293,-24785088685329400957920247562272904339361539000736887⟩⟩, + ⟨⟨43592170836081779870115590772217141331175726786545811,43592170836081779870115590772217141331175726786655539⟩,⟨-11155927654477249171474076416693123440575480581990872,-11155927654477249171474076416693123440575480581881139⟩⟩, + ⟨⟨37460137415803666625658876684238175827617707533724402,37460137415803666625658876684238175827617707533854401⟩,⟨59828573553791254458645884385921235799643436258274348,59828573553791254458645884385921235799643436258404419⟩⟩, + ⟨⟨-63035940565263342684671703116000789881991431147893330,-63035940565263342684671703116000789881991431147742262⟩,⟨74532155110158963880903362075914392175791442211391495,74532155110158963880903362075914392175791442211542472⟩⟩, + ⟨⟨-112644906109280341517493411239812631000043234029623234,-112644906109280341517493411239812631000043234029461397⟩,⟨-44322327950937630918191601214640659498930594284638555,-44322327950937630918191601214640659498930594284476767⟩⟩, + ⟨⟨2492184503780163031975070283422666139975329364203591,2492184503780163031975070283422666139975329364354787⟩,⟨-136815188753958818666633138988892098755318826573803078,-136815188753958818666633138988892098755318826573651958⟩⟩] +lemma tw1_1_2_15_calc (j : Fin 31) : taylorWaveBox 1 1 2 15 j = tw1_1_2_15 j := by + revert j + decide +kernel +def tw1_1_2_16 : Fin 31 → CI := ![⟨⟨-27077179004105522319647594246316972371238991087909676,-27077179004105522319647594246316972371238991087873413⟩,⟨-8827118261638546178259590274613179403662700833014841,-8827118261638546178259590274613179403662700832978573⟩⟩, + ⟨⟨156455253102875571706001411943545888991119659673113,156455253102875571706001411943545888991119659717869⟩,⟨-26323571305207059896217840277084112673617361746798514,-26323571305207059896217840277084112673617361746753742⟩⟩, + ⟨⟨21404147375160812571767843585804086919920596893989740,21404147375160812571767843585804086919920596894030360⟩,⟨-5933374318573492757461120839832060753475054820940030,-5933374318573492757461120839832060753475054820899411⟩⟩, + ⟨⟨8437836361674137930056898197914247762869393231966473,8437836361674137930056898197914247762869393232006389⟩,⟨14559830416720362619976400291795606488929933529100326,14559830416720362619976400291795606488929933529140224⟩⟩, + ⟨⟨-8035530511817749746712503276816884803964109608316786,-8035530511817749746712503276816884803964109608280091⟩,⟨7875578249352022731356490294500340127673246643985427,7875578249352022731356490294500340127673246644022126⟩⟩, + ⟨⟨-5645191454852610221700448239142207867296219202757383,-5645191454852610221700448239142207867296219202731107⟩,⟨-3277564570862825466399522810021465024870289074722269,-3277564570862825466399522810021465024870289074695993⟩⟩, + ⟨⟨657971730393833947637115431641168806756551101616997,657971730393833947637115431641168806756551101632404⟩,⟨-3172408317374991423337333761917838827962785587123293,-3172408317374991423337333761917838827962785587107887⟩⟩, + ⟨⟨1334326265350169069191699755813979439155732373635903,1334326265350169069191699755813979439155732373642601⟩,⟨-287101744067504046321047636815223941865677271431692,-287101744067504046321047636815223941865677271424994⟩⟩, + ⟨⟨343044231446712411372304407926571627393078737956617,343044231446712411372304407926571627393078737958619⟩,⟨349398551460896051611343380408824479716678931597346,349398551460896051611343380408824479716678931599348⟩⟩, + ⟨⟨-3304808174898963186934423636924624600403365290581,-3304808174898963186934423636924624600403365289857⟩,⟨152758298530086373297940020755690914126001266048094,152758298530086373297940020755690914126001266048818⟩⟩, + ⟨⟨-22624425962888146623178377853081150527722078205183,-22624425962888146623178377853081150527722078205040⟩,⟨37053193156641850442218241128330851289011403889257,37053193156641850442218241128330851289011403889399⟩⟩, + ⟨⟨-8256135486830122397772168554513136291038834138372,-8256135486830122397772168554513136291038834138341⟩,⟨8863373110086890252973197020706724151282928010162,8863373110086890252973197020706724151282928010192⟩⟩, + ⟨⟨-2075827657770921341430959223504927475733813172906,-2075827657770921341430959223504927475733813172899⟩,⟨3044356201690557885585776916454107361642607392598,3044356201690557885585776916454107361642607392604⟩⟩, + ⟨⟨-148212433707795973759395309979145947480241744189,-148212433707795973759395309979145947480241744187⟩,⟨1374968176313108884688288623091399678507385786462,1374968176313108884688288623091399678507385786464⟩⟩, + ⟨⟨440707742174321895223971806938014924275528536155,440707742174321895223971806938014924275528536157⟩,⟨573016070680600797425342874023532548766728447109,573016070680600797425342874023532548766728447111⟩⟩, + ⟨⟨575867616041946702730493959126235116720594161110,575867616041946702730493959126235116720594161112⟩,⟨-1,1⟩⟩, + ⟨⟨440707742174321895223971806938014924275528536155,440707742174321895223971806938014924275528536157⟩,⟨-573016070680600797425342874023532548766728447111,-573016070680600797425342874023532548766728447109⟩⟩, + ⟨⟨-148212433707795973759395309979145947480241744189,-148212433707795973759395309979145947480241744187⟩,⟨-1374968176313108884688288623091399678507385786464,-1374968176313108884688288623091399678507385786462⟩⟩, + ⟨⟨-2075827657770921341430959223504927475733813172906,-2075827657770921341430959223504927475733813172899⟩,⟨-3044356201690557885585776916454107361642607392604,-3044356201690557885585776916454107361642607392598⟩⟩, + ⟨⟨-8256135486830122397772168554513136291038834138372,-8256135486830122397772168554513136291038834138341⟩,⟨-8863373110086890252973197020706724151282928010192,-8863373110086890252973197020706724151282928010162⟩⟩, + ⟨⟨-22624425962888146623178377853081150527722078205183,-22624425962888146623178377853081150527722078205040⟩,⟨-37053193156641850442218241128330851289011403889399,-37053193156641850442218241128330851289011403889257⟩⟩, + ⟨⟨-3304808174898963186934423636924624600403365290581,-3304808174898963186934423636924624600403365289857⟩,⟨-152758298530086373297940020755690914126001266048818,-152758298530086373297940020755690914126001266048094⟩⟩, + ⟨⟨343044231446712411372304407926571627393078737956617,343044231446712411372304407926571627393078737958619⟩,⟨-349398551460896051611343380408824479716678931599348,-349398551460896051611343380408824479716678931597346⟩⟩, + ⟨⟨1334326265350169069191699755813979439155732373635903,1334326265350169069191699755813979439155732373642601⟩,⟨287101744067504046321047636815223941865677271424994,287101744067504046321047636815223941865677271431692⟩⟩, + ⟨⟨657971730393833947637115431641168806756551101616997,657971730393833947637115431641168806756551101632404⟩,⟨3172408317374991423337333761917838827962785587107887,3172408317374991423337333761917838827962785587123293⟩⟩, + ⟨⟨-5645191454852610221700448239142207867296219202757383,-5645191454852610221700448239142207867296219202731107⟩,⟨3277564570862825466399522810021465024870289074695993,3277564570862825466399522810021465024870289074722269⟩⟩, + ⟨⟨-8035530511817749746712503276816884803964109608316786,-8035530511817749746712503276816884803964109608280091⟩,⟨-7875578249352022731356490294500340127673246644022126,-7875578249352022731356490294500340127673246643985427⟩⟩, + ⟨⟨8437836361674137930056898197914247762869393231966473,8437836361674137930056898197914247762869393232006389⟩,⟨-14559830416720362619976400291795606488929933529140224,-14559830416720362619976400291795606488929933529100326⟩⟩, + ⟨⟨21404147375160812571767843585804086919920596893989740,21404147375160812571767843585804086919920596894030360⟩,⟨5933374318573492757461120839832060753475054820899411,5933374318573492757461120839832060753475054820940030⟩⟩, + ⟨⟨156455253102875571706001411943545888991119659673113,156455253102875571706001411943545888991119659717869⟩,⟨26323571305207059896217840277084112673617361746753742,26323571305207059896217840277084112673617361746798514⟩⟩, + ⟨⟨-27077179004105522319647594246316972371238991087909676,-27077179004105522319647594246316972371238991087873413⟩,⟨8827118261638546178259590274613179403662700832978573,8827118261638546178259590274613179403662700833014841⟩⟩] +lemma tw1_1_2_16_calc (j : Fin 31) : taylorWaveBox 1 1 2 16 j = tw1_1_2_16 j := by + revert j + decide +kernel +def tw1_1_2_17 : Fin 31 → CI := ![⟨⟨3391592554959153535668994446875382558164902148854646,3391592554959153535668994446875382558164902148863008⟩,⟨-4475497201917143382297597888847301704873768501765809,-4475497201917143382297597888847301704873768501757445⟩⟩, + ⟨⟨5022638055797696128090964434399964818919833975090001,5022638055797696128090964434399964818919833975101384⟩,⟨2045528900125737046123340015353975186531805037143974,2045528900125737046123340015353975186531805037155355⟩⟩, + ⟨⟨-768444121567561538195666457939210117695438022534582,-768444121567561538195666457939210117695438022523185⟩,⟨4725925143912756142139004774842186706300320173716425,4725925143912756142139004774842186706300320173727827⟩⟩, + ⟨⟨-3797741860702093587249419523601104700120097373914572,-3797741860702093587249419523601104700120097373903281⟩,⟨148464776405001961379448499190146520900185444352911,148464776405001961379448499190146520900185444364204⟩⟩, + ⟨⟨-608759197039717995192706843744999171039442100443570,-608759197039717995192706843744999171039442100431963⟩,⟨-2594872013251690464755089279826390123464227315213333,-2594872013251690464755089279826390123464227315201726⟩⟩, + ⟨⟨1471072016735657223993594610075914210839941409457616,1471072016735657223993594610075914210839941409466677⟩,⟨-686097812454925086109943705853454389433520283934669,-686097812454925086109943705853454389433520283925609⟩⟩, + ⟨⟨538037362522472110531930615903464508596927675172029,538037362522472110531930615903464508596927675177508⟩,⟨652901331908429307680409327097665441649497919875770,652901331908429307680409327097665441649497919881249⟩⟩, + ⟨⟨-192236642530423614261341493706563484182265676542505,-192236642530423614261341493706563484182265676540037⟩,⟨321031723388620194057547231476480547302702604328811,321031723388620194057547231476480547302702604331278⟩⟩, + ⟨⟨-140583040586855502509456673542037788719325477729080,-140583040586855502509456673542037788719325477728323⟩,⟨-7872938735011311468943465326479859272132383327988,-7872938735011311468943465326479859272132383327231⟩⟩, + ⟨⟨-27084466045329534372338963181165616121722866936828,-27084466045329534372338963181165616121722866936537⟩,⟨-37173854013518916103418762081530505002960779842861,-37173854013518916103418762081530505002960779842570⟩⟩, + ⟨⟨-121259808917902934858420475666663346968505063443,-121259808917902934858420475666663346968505063383⟩,⟨-13636327846469878010272632918275030554655009126273,-13636327846469878010272632918275030554655009126212⟩⟩, + ⟨⟨1144911365761542613082830555456210661364285253675,1144911365761542613082830555456210661364285253689⟩,⟨-3782479010144667827023578787736853115392217659039,-3782479010144667827023578787736853115392217659025⟩⟩, + ⟨⟨306830291014763396047433255654942466921393934429,306830291014763396047433255654942466921393934432⟩,⟨-1202472830374508770897479153958471714163822962522,-1202472830374508770897479153958471714163822962519⟩⟩, + ⟨⟨-61092776620693015959362825801269626934036503320,-61092776620693015959362825801269626934036503319⟩,⟨-473196207156186693746436611702067672719480478564,-473196207156186693746436611702067672719480478562⟩⟩, + ⟨⟨-177081036936602984391423087719507457899333685348,-177081036936602984391423087719507457899333685346⟩,⟨-180960964398268934935856789686381878454174926125,-180960964398268934935856789686381878454174926124⟩⟩, + ⟨⟨-202731993671679202442714136487995481718568782276,-202731993671679202442714136487995481718568782274⟩,⟨-1,1⟩⟩, + ⟨⟨-177081036936602984391423087719507457899333685348,-177081036936602984391423087719507457899333685346⟩,⟨180960964398268934935856789686381878454174926124,180960964398268934935856789686381878454174926125⟩⟩, + ⟨⟨-61092776620693015959362825801269626934036503320,-61092776620693015959362825801269626934036503319⟩,⟨473196207156186693746436611702067672719480478562,473196207156186693746436611702067672719480478564⟩⟩, + ⟨⟨306830291014763396047433255654942466921393934429,306830291014763396047433255654942466921393934432⟩,⟨1202472830374508770897479153958471714163822962519,1202472830374508770897479153958471714163822962522⟩⟩, + ⟨⟨1144911365761542613082830555456210661364285253675,1144911365761542613082830555456210661364285253689⟩,⟨3782479010144667827023578787736853115392217659025,3782479010144667827023578787736853115392217659039⟩⟩, + ⟨⟨-121259808917902934858420475666663346968505063443,-121259808917902934858420475666663346968505063383⟩,⟨13636327846469878010272632918275030554655009126212,13636327846469878010272632918275030554655009126273⟩⟩, + ⟨⟨-27084466045329534372338963181165616121722866936828,-27084466045329534372338963181165616121722866936537⟩,⟨37173854013518916103418762081530505002960779842570,37173854013518916103418762081530505002960779842861⟩⟩, + ⟨⟨-140583040586855502509456673542037788719325477729080,-140583040586855502509456673542037788719325477728323⟩,⟨7872938735011311468943465326479859272132383327231,7872938735011311468943465326479859272132383327988⟩⟩, + ⟨⟨-192236642530423614261341493706563484182265676542505,-192236642530423614261341493706563484182265676540037⟩,⟨-321031723388620194057547231476480547302702604331278,-321031723388620194057547231476480547302702604328811⟩⟩, + ⟨⟨538037362522472110531930615903464508596927675172029,538037362522472110531930615903464508596927675177508⟩,⟨-652901331908429307680409327097665441649497919881249,-652901331908429307680409327097665441649497919875770⟩⟩, + ⟨⟨1471072016735657223993594610075914210839941409457616,1471072016735657223993594610075914210839941409466677⟩,⟨686097812454925086109943705853454389433520283925609,686097812454925086109943705853454389433520283934669⟩⟩, + ⟨⟨-608759197039717995192706843744999171039442100443570,-608759197039717995192706843744999171039442100431963⟩,⟨2594872013251690464755089279826390123464227315201726,2594872013251690464755089279826390123464227315213333⟩⟩, + ⟨⟨-3797741860702093587249419523601104700120097373914572,-3797741860702093587249419523601104700120097373903281⟩,⟨-148464776405001961379448499190146520900185444364204,-148464776405001961379448499190146520900185444352911⟩⟩, + ⟨⟨-768444121567561538195666457939210117695438022534582,-768444121567561538195666457939210117695438022523185⟩,⟨-4725925143912756142139004774842186706300320173727827,-4725925143912756142139004774842186706300320173716425⟩⟩, + ⟨⟨5022638055797696128090964434399964818919833975090001,5022638055797696128090964434399964818919833975101384⟩,⟨-2045528900125737046123340015353975186531805037155355,-2045528900125737046123340015353975186531805037143974⟩⟩, + ⟨⟨3391592554959153535668994446875382558164902148854646,3391592554959153535668994446875382558164902148863008⟩,⟨4475497201917143382297597888847301704873768501757445,4475497201917143382297597888847301704873768501765809⟩⟩] +lemma tw1_1_2_17_calc (j : Fin 31) : taylorWaveBox 1 1 2 17 j = tw1_1_2_17 j := by + revert j + decide +kernel +def tw1_1_2_18 : Fin 31 → CI := ![⟨⟨584303008541034298150365256302349044432684955338419,584303008541034298150365256302349044432684955340407⟩,⟨874629809845974862910075175356947303243605001268706,874629809845974862910075175356947303243605001270693⟩⟩, + ⟨⟨-737020334274792859368920835585087051769486904799559,-737020334274792859368920835585087051769486904796843⟩,⟨763797578991364276891438460704650234678745377401200,763797578991364276891438460704650234678745377403916⟩⟩, + ⟨⟨-813223667952667146382453874356500579382334785883051,-813223667952667146382453874356500579382334785880036⟩,⟨-547801230911388730238243440192577198854208352147543,-547801230911388730238243440192577198854208352144530⟩⟩, + ⟨⟨352554433282501162266978782290382915737672016230913,352554433282501162266978782290382915737672016234102⟩,⟨-735308341864070258994024026802319960787282152051720,-735308341864070258994024026802319960787282152048530⟩⟩, + ⟨⟨570397093803390091501371731615826083273939826766148,570397093803390091501371731615826083273939826769573⟩,⟨185534453159490481491359328892832382760724336859793,185534453159490481491359328892832382760724336863218⟩⟩, + ⟨⟨-65614899436437506049708961714370565807944029831608,-65614899436437506049708961714370565807944029828707⟩,⟨377795109837715447168297661908621328730055547131036,377795109837715447168297661908621328730055547133938⟩⟩, + ⟨⟨-209858535300196027701983111445930784232335886304279,-209858535300196027701983111445930784232335886302395⟩,⟨2561093764036216259931695849852583940515395320387,2561093764036216259931695849852583940515395322271⟩⟩, + ⟨⟨-26911703672944498536825359250113588662109847883168,-26911703672944498536825359250113588662109847882267⟩,⟨-93667580067083785958811784676885928784843043157290,-93667580067083785958811784676885928784843043156388⟩⟩, + ⟨⟨29843986483210225684853408531068332652101425233577,29843986483210225684853408531068332652101425233867⟩,⟨-24266615552967465682099686449908308282184854253767,-24266615552967465682099686449908308282184854253476⟩⟩, + ⟨⟨12604278659710223438256827869724581546469694089010,12604278659710223438256827869724581546469694089125⟩,⟨3759246126510767507453948434755645951616022495049,3759246126510767507453948434755645951616022495165⟩⟩, + ⟨⟨2182054285207591602417097030472202588411745797861,2182054285207591602417097030472202588411745797886⟩,⟨3434799003008410637220451178410080674864780942085,3434799003008410637220451178410080674864780942110⟩⟩, + ⟨⟨197687429055877302388245122266591944813221144256,197687429055877302388245122266591944813221144262⟩,⟨1208837180156212227528961293848043428410525431134,1208837180156212227528961293848043428410525431140⟩⟩, + ⟨⟨39157846905288238366902896864261043850439419407,39157846905288238366902896864261043850439419409⟩,⟨395131599251327494182020142946538058078943686236,395131599251327494182020142946538058078943686238⟩⟩, + ⟨⟨55699084828218751446617390107977749397386024298,55699084828218751446617390107977749397386024299⟩,⟨146125498393168370446261602968382052927802504901,146125498393168370446261602968382052927802504903⟩⟩, + ⟨⟨65649473681522316069894612750734276596037809198,65649473681522316069894612750734276596037809199⟩,⟨52794242627301918839897671733700311387336664027,52794242627301918839897671733700311387336664028⟩⟩, + ⟨⟨67802472491082042751223244142285122932866161531,67802472491082042751223244142285122932866161532⟩,⟨-1,1⟩⟩, + ⟨⟨65649473681522316069894612750734276596037809198,65649473681522316069894612750734276596037809199⟩,⟨-52794242627301918839897671733700311387336664028,-52794242627301918839897671733700311387336664027⟩⟩, + ⟨⟨55699084828218751446617390107977749397386024298,55699084828218751446617390107977749397386024299⟩,⟨-146125498393168370446261602968382052927802504903,-146125498393168370446261602968382052927802504901⟩⟩, + ⟨⟨39157846905288238366902896864261043850439419407,39157846905288238366902896864261043850439419409⟩,⟨-395131599251327494182020142946538058078943686238,-395131599251327494182020142946538058078943686236⟩⟩, + ⟨⟨197687429055877302388245122266591944813221144256,197687429055877302388245122266591944813221144262⟩,⟨-1208837180156212227528961293848043428410525431140,-1208837180156212227528961293848043428410525431134⟩⟩, + ⟨⟨2182054285207591602417097030472202588411745797861,2182054285207591602417097030472202588411745797886⟩,⟨-3434799003008410637220451178410080674864780942110,-3434799003008410637220451178410080674864780942085⟩⟩, + ⟨⟨12604278659710223438256827869724581546469694089010,12604278659710223438256827869724581546469694089125⟩,⟨-3759246126510767507453948434755645951616022495165,-3759246126510767507453948434755645951616022495049⟩⟩, + ⟨⟨29843986483210225684853408531068332652101425233577,29843986483210225684853408531068332652101425233867⟩,⟨24266615552967465682099686449908308282184854253476,24266615552967465682099686449908308282184854253767⟩⟩, + ⟨⟨-26911703672944498536825359250113588662109847883168,-26911703672944498536825359250113588662109847882267⟩,⟨93667580067083785958811784676885928784843043156388,93667580067083785958811784676885928784843043157290⟩⟩, + ⟨⟨-209858535300196027701983111445930784232335886304279,-209858535300196027701983111445930784232335886302395⟩,⟨-2561093764036216259931695849852583940515395322271,-2561093764036216259931695849852583940515395320387⟩⟩, + ⟨⟨-65614899436437506049708961714370565807944029831608,-65614899436437506049708961714370565807944029828707⟩,⟨-377795109837715447168297661908621328730055547133938,-377795109837715447168297661908621328730055547131036⟩⟩, + ⟨⟨570397093803390091501371731615826083273939826766148,570397093803390091501371731615826083273939826769573⟩,⟨-185534453159490481491359328892832382760724336863218,-185534453159490481491359328892832382760724336859793⟩⟩, + ⟨⟨352554433282501162266978782290382915737672016230913,352554433282501162266978782290382915737672016234102⟩,⟨735308341864070258994024026802319960787282152048530,735308341864070258994024026802319960787282152051720⟩⟩, + ⟨⟨-813223667952667146382453874356500579382334785883051,-813223667952667146382453874356500579382334785880036⟩,⟨547801230911388730238243440192577198854208352144530,547801230911388730238243440192577198854208352147543⟩⟩, + ⟨⟨-737020334274792859368920835585087051769486904799559,-737020334274792859368920835585087051769486904796843⟩,⟨-763797578991364276891438460704650234678745377403916,-763797578991364276891438460704650234678745377401200⟩⟩, + ⟨⟨584303008541034298150365256302349044432684955338419,584303008541034298150365256302349044432684955340407⟩,⟨-874629809845974862910075175356947303243605001270693,-874629809845974862910075175356947303243605001268706⟩⟩] +lemma tw1_1_2_18_calc (j : Fin 31) : taylorWaveBox 1 1 2 18 j = tw1_1_2_18 j := by + revert j + decide +kernel +def tw1_1_2_19 : Fin 31 → CI := ![⟨⟨-181547301835549381614190820415516923238461488912215,-181547301835549381614190820415516923238461488911774⟩,⟨47444348767005092637048831534084026708884319100324,47444348767005092637048831534084026708884319100765⟩⟩, + ⟨⟨-81111169097675947677119081109007264221873857201937,-81111169097675947677119081109007264221873857201303⟩,⟨-180451119200876628161122794235656920378375395597288,-180451119200876628161122794235656920378375395596654⟩⟩, + ⟨⟨163393281134052160175023260794677920489615446729467,163393281134052160175023260794677920489615446730213⟩,⟨-99367408743767904887178184099911743398682773045981,-99367408743767904887178184099911743398682773045235⟩⟩, + ⟨⟨99184426853459999102220827299123734590584179309793,99184426853459999102220827299123734590584179310660⟩,⟨133897637203833592079904439565340338315760102417628,133897637203833592079904439565340338315760102418495⟩⟩, + ⟨⟨-97374157534698083060170089940440271146821141194464,-97374157534698083060170089940440271146821141193462⟩,⟨83934234793111476804340360735748028961372042517840,83934234793111476804340360735748028961372042518843⟩⟩, + ⟨⟨-61310217991748035789092060078350411794944521882396,-61310217991748035789092060078350411794944521881505⟩,⟨-60691744316676898792420991701634215292812572872748,-60691744316676898792420991701634215292812572871857⟩⟩, + ⟨⟨30590189348643819777507524623629356622408426228042,30590189348643819777507524623629356622408426228653⟩,⟨-39023540433503509122393037512168379446346505992362,-39023540433503509122393037512168379446346505991751⟩⟩, + ⟨⟨21534018039125790017626402714392767093888372234192,21534018039125790017626402714392767093888372234499⟩,⟨10984723840124830774944161282757142833643767074295,10984723840124830774944161282757142833643767074603⟩⟩, + ⟨⟨-1490325276741613009114481385183747094860131952979,-1490325276741613009114481385183747094860131952875⟩,⟨9895828852627730384109881032604004732553404258931,9895828852627730384109881032604004732553404259035⟩⟩, + ⟨⟨-3350782365174637316914873224402895784835714267890,-3350782365174637316914873224402895784835714267846⟩,⟨1266739029338165782606403618810343423715434823942,1266739029338165782606403618810343423715434823986⟩⟩, + ⟨⟨-1042459410163357604957170349880809968810391590622,-1042459410163357604957170349880809968810391590612⟩,⟨-500708193620213119982837170569723881105586575646,-500708193620213119982837170569723881105586575636⟩⟩, + ⟨⟨-209533577191388844459027707476913473495699870727,-209533577191388844459027707476913473495699870724⟩,⟨-294670634849248546989872448491540973053492151451,-294670634849248546989872448491540973053492151448⟩⟩, + ⟨⟨-52344120220962788551572509525452233718600352897,-52344120220962788551572509525452233718600352895⟩,⟨-109086194280111286491719416010530328838432000611,-109086194280111286491719416010530328838432000609⟩⟩, + ⟨⟨-27560557464083059694334761998300121203828812289,-27560557464083059694334761998300121203828812288⟩,⟨-40289764145035431659539011244934903016295710517,-40289764145035431659539011244934903016295710516⟩⟩, + ⟨⟨-22641842691817375270311238597854032328867207905,-22641842691817375270311238597854032328867207904⟩,⟨-14142969609831913963615744958152380602602479192,-14142969609831913963615744958152380602602479191⟩⟩, + ⟨⟨-21596305981275336306754974640744976972719990124,-21596305981275336306754974640744976972719990123⟩,⟨-1,1⟩⟩, + ⟨⟨-22641842691817375270311238597854032328867207905,-22641842691817375270311238597854032328867207904⟩,⟨14142969609831913963615744958152380602602479191,14142969609831913963615744958152380602602479192⟩⟩, + ⟨⟨-27560557464083059694334761998300121203828812289,-27560557464083059694334761998300121203828812288⟩,⟨40289764145035431659539011244934903016295710516,40289764145035431659539011244934903016295710517⟩⟩, + ⟨⟨-52344120220962788551572509525452233718600352897,-52344120220962788551572509525452233718600352895⟩,⟨109086194280111286491719416010530328838432000609,109086194280111286491719416010530328838432000611⟩⟩, + ⟨⟨-209533577191388844459027707476913473495699870727,-209533577191388844459027707476913473495699870724⟩,⟨294670634849248546989872448491540973053492151448,294670634849248546989872448491540973053492151451⟩⟩, + ⟨⟨-1042459410163357604957170349880809968810391590622,-1042459410163357604957170349880809968810391590612⟩,⟨500708193620213119982837170569723881105586575636,500708193620213119982837170569723881105586575646⟩⟩, + ⟨⟨-3350782365174637316914873224402895784835714267890,-3350782365174637316914873224402895784835714267846⟩,⟨-1266739029338165782606403618810343423715434823986,-1266739029338165782606403618810343423715434823942⟩⟩, + ⟨⟨-1490325276741613009114481385183747094860131952979,-1490325276741613009114481385183747094860131952875⟩,⟨-9895828852627730384109881032604004732553404259035,-9895828852627730384109881032604004732553404258931⟩⟩, + ⟨⟨21534018039125790017626402714392767093888372234192,21534018039125790017626402714392767093888372234499⟩,⟨-10984723840124830774944161282757142833643767074603,-10984723840124830774944161282757142833643767074295⟩⟩, + ⟨⟨30590189348643819777507524623629356622408426228042,30590189348643819777507524623629356622408426228653⟩,⟨39023540433503509122393037512168379446346505991751,39023540433503509122393037512168379446346505992362⟩⟩, + ⟨⟨-61310217991748035789092060078350411794944521882396,-61310217991748035789092060078350411794944521881505⟩,⟨60691744316676898792420991701634215292812572871857,60691744316676898792420991701634215292812572872748⟩⟩, + ⟨⟨-97374157534698083060170089940440271146821141194464,-97374157534698083060170089940440271146821141193462⟩,⟨-83934234793111476804340360735748028961372042518843,-83934234793111476804340360735748028961372042517840⟩⟩, + ⟨⟨99184426853459999102220827299123734590584179309793,99184426853459999102220827299123734590584179310660⟩,⟨-133897637203833592079904439565340338315760102418495,-133897637203833592079904439565340338315760102417628⟩⟩, + ⟨⟨163393281134052160175023260794677920489615446729467,163393281134052160175023260794677920489615446730213⟩,⟨99367408743767904887178184099911743398682773045235,99367408743767904887178184099911743398682773045981⟩⟩, + ⟨⟨-81111169097675947677119081109007264221873857201937,-81111169097675947677119081109007264221873857201303⟩,⟨180451119200876628161122794235656920378375395596654,180451119200876628161122794235656920378375395597288⟩⟩, + ⟨⟨-181547301835549381614190820415516923238461488912215,-181547301835549381614190820415516923238461488911774⟩,⟨-47444348767005092637048831534084026708884319100765,-47444348767005092637048831534084026708884319100324⟩⟩] +lemma tw1_1_2_19_calc (j : Fin 31) : taylorWaveBox 1 1 2 19 j = tw1_1_2_19 j := by + revert j + decide +kernel +def tw1_1_2_20 : Fin 31 → CI := ![⟨⟨2481279051601949591697480970406535029927805180789,2481279051601949591697480970406535029927805180882⟩,⟨-31856676401978620573169644340559537746180176694667,-31856676401978620573169644340559537746180176694574⟩⟩, + ⟨⟨35170380449822440838262567885308474396407686557082,35170380449822440838262567885308474396407686557229⟩,⟨-1464750541765776462189246634954301331222185000405,-1464750541765776462189246634954301331222185000258⟩⟩, + ⟨⟨4077549775413180853913977366495015410777172472677,4077549775413180853913977366495015410777172472855⟩,⟨35368191134336317172464051472278426456186919393275,35368191134336317172464051472278426456186919393453⟩⟩, + ⟨⟨-32130215789575042369449056222777408344380841631862,-32130215789575042369449056222777408344380841631640⟩,⟨4901885422694198035171545418126900036063935391585,4901885422694198035171545418126900036063935391807⟩⟩, + ⟨⟨-4358698541728041544194323524720350634148792584825,-4358698541728041544194323524720350634148792584546⟩,⟨-25936947967798462424229448271664999106988945531599,-25936947967798462424229448271664999106988945531321⟩⟩, + ⟨⟨18220523677067132620047840786046933259086364773478,18220523677067132620047840786046933259086364773743⟩,⟨-3355160045537159962558593518518464851210049810770,-3355160045537159962558593518518464851210049810505⟩⟩, + ⟨⟨2537424857671784143082920618870818828300314728415,2537424857671784143082920618870818828300314728609⟩,⟨10890440893709067781552833280252134205359173168101,10890440893709067781552833280252134205359173168294⟩⟩, + ⟨⟨-5381364070625446177961731943888069365608786318625,-5381364070625446177961731943888069365608786318521⟩,⟨1949820077725869141910355583282874758319774948522,1949820077725869141910355583282874758319774948625⟩⟩, + ⟨⟨-1380974352085008257396966077083668869911032613541,-1380974352085008257396966077083668869911032613505⟩,⟨-2066307523867679558014626487956131103147368379323,-2066307523867679558014626487956131103147368379286⟩⟩, + ⟨⟨493162291375375678294963953089986213690167141163,493162291375375678294963953089986213690167141179⟩,⟨-789984305712759454488972790059810487647672247452,-789984305712759454488972790059810487647672247435⟩⟩, + ⟨⟨311852501661801561689404621977676809970142449803,311852501661801561689404621977676809970142449807⟩,⟨-34218378250541925793641116041625975390326400537,-34218378250541925793641116041625975390326400533⟩⟩, + ⟨⟨89571297032763532367061829252321850356485643743,89571297032763532367061829252321850356485643745⟩,⟨48544486053085976914034295960419140408319895488,48544486053085976914034295960419140408319895490⟩⟩, + ⟨⟨25148250685178649817534714223527940434710883079,25148250685178649817534714223527940434710883080⟩,⟨24620363327101067558814839242844304871965864309,24620363327101067558814839242844304871965864310⟩⟩, + ⟨⟨10789082817766689747550714987488670710531036076,10789082817766689747550714987488670710531036077⟩,⟨9754386504770769656816570941816636809542466653,9754386504770769656816570941816636809542466654⟩⟩, + ⟨⟨7308070335680334910181408956963262454084904624,7308070335680334910181408956963262454084904625⟩,⟨3435070580406262799686926775582616356142627597,3435070580406262799686926775582616356142627598⟩⟩, + ⟨⟨6566138313870278306639502345850969191837774481,6566138313870278306639502345850969191837774482⟩,⟨-1,1⟩⟩, + ⟨⟨7308070335680334910181408956963262454084904624,7308070335680334910181408956963262454084904625⟩,⟨-3435070580406262799686926775582616356142627598,-3435070580406262799686926775582616356142627597⟩⟩, + ⟨⟨10789082817766689747550714987488670710531036076,10789082817766689747550714987488670710531036077⟩,⟨-9754386504770769656816570941816636809542466654,-9754386504770769656816570941816636809542466653⟩⟩, + ⟨⟨25148250685178649817534714223527940434710883079,25148250685178649817534714223527940434710883080⟩,⟨-24620363327101067558814839242844304871965864310,-24620363327101067558814839242844304871965864309⟩⟩, + ⟨⟨89571297032763532367061829252321850356485643743,89571297032763532367061829252321850356485643745⟩,⟨-48544486053085976914034295960419140408319895490,-48544486053085976914034295960419140408319895488⟩⟩, + ⟨⟨311852501661801561689404621977676809970142449803,311852501661801561689404621977676809970142449807⟩,⟨34218378250541925793641116041625975390326400533,34218378250541925793641116041625975390326400537⟩⟩, + ⟨⟨493162291375375678294963953089986213690167141163,493162291375375678294963953089986213690167141179⟩,⟨789984305712759454488972790059810487647672247435,789984305712759454488972790059810487647672247452⟩⟩, + ⟨⟨-1380974352085008257396966077083668869911032613541,-1380974352085008257396966077083668869911032613505⟩,⟨2066307523867679558014626487956131103147368379286,2066307523867679558014626487956131103147368379323⟩⟩, + ⟨⟨-5381364070625446177961731943888069365608786318625,-5381364070625446177961731943888069365608786318521⟩,⟨-1949820077725869141910355583282874758319774948625,-1949820077725869141910355583282874758319774948522⟩⟩, + ⟨⟨2537424857671784143082920618870818828300314728415,2537424857671784143082920618870818828300314728609⟩,⟨-10890440893709067781552833280252134205359173168294,-10890440893709067781552833280252134205359173168101⟩⟩, + ⟨⟨18220523677067132620047840786046933259086364773478,18220523677067132620047840786046933259086364773743⟩,⟨3355160045537159962558593518518464851210049810505,3355160045537159962558593518518464851210049810770⟩⟩, + ⟨⟨-4358698541728041544194323524720350634148792584825,-4358698541728041544194323524720350634148792584546⟩,⟨25936947967798462424229448271664999106988945531321,25936947967798462424229448271664999106988945531599⟩⟩, + ⟨⟨-32130215789575042369449056222777408344380841631862,-32130215789575042369449056222777408344380841631640⟩,⟨-4901885422694198035171545418126900036063935391807,-4901885422694198035171545418126900036063935391585⟩⟩, + ⟨⟨4077549775413180853913977366495015410777172472677,4077549775413180853913977366495015410777172472855⟩,⟨-35368191134336317172464051472278426456186919393453,-35368191134336317172464051472278426456186919393275⟩⟩, + ⟨⟨35170380449822440838262567885308474396407686557082,35170380449822440838262567885308474396407686557229⟩,⟨1464750541765776462189246634954301331222185000258,1464750541765776462189246634954301331222185000405⟩⟩, + ⟨⟨2481279051601949591697480970406535029927805180789,2481279051601949591697480970406535029927805180882⟩,⟨31856676401978620573169644340559537746180176694574,31856676401978620573169644340559537746180176694667⟩⟩] +lemma tw1_1_2_20_calc (j : Fin 31) : taylorWaveBox 1 1 2 20 j = tw1_1_2_20 j := by + revert j + decide +kernel +def tw1_1_2 : Fin 21 → Fin 31 → CI := ![tw1_1_2_0,tw1_1_2_1,tw1_1_2_2,tw1_1_2_3,tw1_1_2_4,tw1_1_2_5,tw1_1_2_6,tw1_1_2_7,tw1_1_2_8,tw1_1_2_9,tw1_1_2_10,tw1_1_2_11,tw1_1_2_12,tw1_1_2_13,tw1_1_2_14,tw1_1_2_15,tw1_1_2_16,tw1_1_2_17,tw1_1_2_18,tw1_1_2_19,tw1_1_2_20] +lemma tw1_1_2_mem (l : Fin 21) (j : Fin 31) : (tw1_1_2 l j).Mem (taylorWave 1 1 (nearNode 2) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 2 l j = tw1_1_2 l j := by + fin_cases l + · exact tw1_1_2_0_calc j + · exact tw1_1_2_1_calc j + · exact tw1_1_2_2_calc j + · exact tw1_1_2_3_calc j + · exact tw1_1_2_4_calc j + · exact tw1_1_2_5_calc j + · exact tw1_1_2_6_calc j + · exact tw1_1_2_7_calc j + · exact tw1_1_2_8_calc j + · exact tw1_1_2_9_calc j + · exact tw1_1_2_10_calc j + · exact tw1_1_2_11_calc j + · exact tw1_1_2_12_calc j + · exact tw1_1_2_13_calc j + · exact tw1_1_2_14_calc j + · exact tw1_1_2_15_calc j + · exact tw1_1_2_16_calc j + · exact tw1_1_2_17_calc j + · exact tw1_1_2_18_calc j + · exact tw1_1_2_19_calc j + · exact tw1_1_2_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 2 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave113.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave113.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ddd87fc48fa8d88661cbb29a21bf27c7aa10cbb --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave113.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_3_0 : Fin 31 → CI := ![⟨⟨-1189499674089717383323782585312786472349386044280872575343,-1189499674089717383323782585312786472349386044280306044541⟩,⟨964735937139205678464890920506886084377741748438789521912,964735937139205678464890920506886084377741748439358874875⟩⟩, + ⟨⟨-351070208584119236580348285575321778367284011259403453717,-351070208584119236580348285575321778367284011259264276962⟩,⟨-36073841277930029960422895778926019590498320033183352376,-36073841277930029960422895778926019590498320033044300028⟩⟩, + ⟨⟨-44192222513505232216722693122164839296116021406521256340,-44192222513505232216722693122164839296116021406480427689⟩,⟨-49569958561115269686107498149445079950867931919831919994,-49569958561115269686107498149445079950867931919791190477⟩⟩, + ⟨⟨-631071298912473174957529259720249567173093930517908717,-631071298912473174957529259720249567173093930509920473⟩,⟨-9931851436010558380510186203388710250105296974310234194,-9931851436010558380510186203388710250105296974302249796⟩⟩, + ⟨⟨537689647500161566877620202160902389842104274807922440,537689647500161566877620202160902389842104274808985558⟩,⟨-1026972059416079589091710419805968141818211003439410272,-1026972059416079589091710419805968141818211003438346949⟩⟩, + ⟨⟨77398361884770349635280499824017046721950015692126825,77398361884770349635280499824017046721950015692225593⟩,⟨-67689029838879139032422551373848981812209495012590126,-67689029838879139032422551373848981812209495012491333⟩⟩, + ⟨⟨5671976326200385073300717666707406821682285809569065,5671976326200385073300717666707406821682285809575635⟩,⟨-3862455400419309501886329879875447213210842800704689,-3862455400419309501886329879875447213210842800698119⟩⟩, + ⟨⟨236659371345658105689085976622425219303660465282938,236659371345658105689085976622425219303660465283291⟩,⟨-252243285667354976883230361544124838886265934276535,-252243285667354976883230361544124838886265934276169⟩⟩, + ⟨⟨1168293480213582827484450594801017012757244933972,1168293480213582827484450594801017012757244934120⟩,⟨-13508278892808188500760376460665236322621440990938,-13508278892808188500760376460665236322621440990789⟩⟩, + ⟨⟨-403003292754813337043912743318784806219533046509,-403003292754813337043912743318784806219533046366⟩,⟨-181595271977952894657077962812202828030432837510,-181595271977952894657077962812202828030432837367⟩⟩, + ⟨⟨-1044046557903800882247154808011945785516456193,-1044046557903800882247154808011945785516456016⟩,⟨13432518386377471764834069789281102314198600168,13432518386377471764834069789281102314198600352⟩⟩, + ⟨⟨230449263122072371806252311634099908394197973,230449263122072371806252311634099908394198179⟩,⟨-395155113618184236569618713077645708983672172,-395155113618184236569618713077645708983671969⟩⟩, + ⟨⟨-3632900973156335806985271043980388417035857,-3632900973156335806985271043980388417035653⟩,⟨21469532358599189850604117182851777974048539,21469532358599189850604117182851777974048743⟩⟩, + ⟨⟨-1538662527555762211494016903967250945867352,-1538662527555762211494016903967250945867148⟩,⟨-1097517534122994852777127972844561783240510,-1097517534122994852777127972844561783240306⟩⟩, + ⟨⟨176056156828181549765918364828886004892850,176056156828181549765918364828886004893039⟩,⟨-342325445181827597690216101851901888316460,-342325445181827597690216101851901888316271⟩⟩, + ⟨⟨221388105021853830258386146429376550432664,221388105021853830258386146429376550432868⟩,⟨-113,136⟩⟩, + ⟨⟨176056156828181549765918364828886004892850,176056156828181549765918364828886004893039⟩,⟨342325445181827597690216101851901888316271,342325445181827597690216101851901888316460⟩⟩, + ⟨⟨-1538662527555762211494016903967250945867352,-1538662527555762211494016903967250945867148⟩,⟨1097517534122994852777127972844561783240307,1097517534122994852777127972844561783240511⟩⟩, + ⟨⟨-3632900973156335806985271043980388417035857,-3632900973156335806985271043980388417035653⟩,⟨-21469532358599189850604117182851777974048742,-21469532358599189850604117182851777974048539⟩⟩, + ⟨⟨230449263122072371806252311634099908394197973,230449263122072371806252311634099908394198179⟩,⟨395155113618184236569618713077645708983671969,395155113618184236569618713077645708983672172⟩⟩, + ⟨⟨-1044046557903800882247154808011945785516456193,-1044046557903800882247154808011945785516456016⟩,⟨-13432518386377471764834069789281102314198600352,-13432518386377471764834069789281102314198600167⟩⟩, + ⟨⟨-403003292754813337043912743318784806219533046509,-403003292754813337043912743318784806219533046366⟩,⟨181595271977952894657077962812202828030432837367,181595271977952894657077962812202828030432837510⟩⟩, + ⟨⟨1168293480213582827484450594801017012757244933972,1168293480213582827484450594801017012757244934120⟩,⟨13508278892808188500760376460665236322621440990790,13508278892808188500760376460665236322621440990938⟩⟩, + ⟨⟨236659371345658105689085976622425219303660465282938,236659371345658105689085976622425219303660465283291⟩,⟨252243285667354976883230361544124838886265934276169,252243285667354976883230361544124838886265934276535⟩⟩, + ⟨⟨5671976326200385073300717666707406821682285809569065,5671976326200385073300717666707406821682285809575635⟩,⟨3862455400419309501886329879875447213210842800698119,3862455400419309501886329879875447213210842800704690⟩⟩, + ⟨⟨77398361884770349635280499824017046721950015692126825,77398361884770349635280499824017046721950015692225593⟩,⟨67689029838879139032422551373848981812209495012491333,67689029838879139032422551373848981812209495012590126⟩⟩, + ⟨⟨537689647500161566877620202160902389842104274807922440,537689647500161566877620202160902389842104274808985558⟩,⟨1026972059416079589091710419805968141818211003438346950,1026972059416079589091710419805968141818211003439410272⟩⟩, + ⟨⟨-631071298912473174957529259720249567173093930517908717,-631071298912473174957529259720249567173093930509920473⟩,⟨9931851436010558380510186203388710250105296974302249797,9931851436010558380510186203388710250105296974310234195⟩⟩, + ⟨⟨-44192222513505232216722693122164839296116021406521256340,-44192222513505232216722693122164839296116021406480427689⟩,⟨49569958561115269686107498149445079950867931919791190478,49569958561115269686107498149445079950867931919831919994⟩⟩, + ⟨⟨-351070208584119236580348285575321778367284011259403453717,-351070208584119236580348285575321778367284011259264276962⟩,⟨36073841277930029960422895778926019590498320033044300028,36073841277930029960422895778926019590498320033183352376⟩⟩, + ⟨⟨-1189499674089717383323782585312786472349386044280872575351,-1189499674089717383323782585312786472349386044280306044520⟩,⟨-964735937139205678464890920506886084377741748439358874898,-964735937139205678464890920506886084377741748438789521906⟩⟩] +lemma tw1_1_3_0_calc (j : Fin 31) : taylorWaveBox 1 1 3 0 j = tw1_1_3_0 j := by + revert j + decide +kernel +def tw1_1_3_1 : Fin 31 → CI := ![⟨⟨-652371375069355805769831961628348017631685780001532312849,-652371375069355805769831961628348017631685780000823249055⟩,⟨-1797831329445414469602001486796744872672712274716305330490,-1797831329445414469602001486796744872672712274715598873875⟩⟩, + ⟨⟨213946445360850353235928492197518391220740930627067405751,213946445360850353235928492197518391220740930627240629013⟩,⟨-407759777447917487270973876093934660960579448637061341249,-407759777447917487270973876093934660960579448636888032471⟩⟩, + ⟨⟨86708436373084884893131345667985665950028232054472623164,86708436373084884893131345667985665950028232054521859648⟩,⟨-26489720189180869492454021716266384256885845851769509896,-26489720189180869492454021716266384256885845851720224325⟩⟩, + ⟨⟨12982125011132107509276459583207468763206306906547773153,12982125011132107509276459583207468763206306906556984675⟩,⟨5839600880628393407576953563168872142008627078170063461,5839600880628393407576953563168872142008627078179275486⟩⟩, + ⟨⟨899469841140552097246716882958284783562208636722543681,899469841140552097246716882958284783562208636723814715⟩,⟨1488498313944981863405951662396990787965833985116872355,1488498313944981863405951662396990787965833985118143495⟩⟩, + ⟨⟨17810595581197173038168346546298319208241414789622943,17810595581197173038168346546298319208241414789771753⟩,⟨160948853223242279417861961087209302433579275372790270,160948853223242279417861961087209302433579275372939114⟩⟩, + ⟨⟨-897914434424090819824267926671823553640731619743425,-897914434424090819824267926671823553640731619731143⟩,⟨11313131631340698248676667597797499482380264299105883,11313131631340698248676667597797499482380264299118167⟩⟩, + ⟨⟨39479430383726067404362652903807774886915260856268,39479430383726067404362652903807774886915260857093⟩,⟨599266135928063019900052300250966924113219798866903,599266135928063019900052300250966924113219798867725⟩⟩, + ⟨⟨14990271763878554663977327047848430605148773649773,14990271763878554663977327047848430605148773650118⟩,⟨19622509041191052442525980003644550868565797608680,19622509041191052442525980003644550868565797609025⟩⟩, + ⟨⟨820914317145269236397488064741986313341963306049,820914317145269236397488064741986313341963306334⟩,⟨-190420680652522730692508292829456991139506917076,-190420680652522730692508292829456991139506916791⟩⟩, + ⟨⟨-12364940760811862734035468349070399991809407939,-12364940760811862734035468349070399991809407662⟩,⟨-23780142341245882825685403627748586378487472126,-23780142341245882825685403627748586378487471818⟩⟩, + ⟨⟨-67943961076778553000801891445282206687747389,-67943961076778553000801891445282206687747021⟩,⟨942774277893884115312926997310490568132217675,942774277893884115312926997310490568132218012⟩⟩, + ⟨⟨-8360488764262085938216316251888383530445472,-8360488764262085938216316251888383530445053⟩,⟨-45687848949896285361271193113326590785661156,-45687848949896285361271193113326590785660737⟩⟩, + ⟨⟨3829240099936048829785655838364355484379255,3829240099936048829785655838364355484379720⟩,⟨1546420376615055537216458893699108273008308,1546420376615055537216458893699108273008773⟩⟩, + ⟨⟨-297661340455524507611855156990368964792269,-297661340455524507611855156990368964791825⟩,⟨800330240401375340380231743078730459985367,800330240401375340380231743078730459985811⟩⟩, + ⟨⟨-493612630440117588468668468729079492819105,-493612630440117588468668468729079492818655⟩,⟨-300,250⟩⟩, + ⟨⟨-297661340455524507611855156990368964792269,-297661340455524507611855156990368964791825⟩,⟨-800330240401375340380231743078730459985811,-800330240401375340380231743078730459985367⟩⟩, + ⟨⟨3829240099936048829785655838364355484379255,3829240099936048829785655838364355484379720⟩,⟨-1546420376615055537216458893699108273008773,-1546420376615055537216458893699108273008308⟩⟩, + ⟨⟨-8360488764262085938216316251888383530445472,-8360488764262085938216316251888383530445053⟩,⟨45687848949896285361271193113326590785660737,45687848949896285361271193113326590785661156⟩⟩, + ⟨⟨-67943961076778553000801891445282206687747389,-67943961076778553000801891445282206687747021⟩,⟨-942774277893884115312926997310490568132218012,-942774277893884115312926997310490568132217675⟩⟩, + ⟨⟨-12364940760811862734035468349070399991809407939,-12364940760811862734035468349070399991809407662⟩,⟨23780142341245882825685403627748586378487471818,23780142341245882825685403627748586378487472126⟩⟩, + ⟨⟨820914317145269236397488064741986313341963306049,820914317145269236397488064741986313341963306334⟩,⟨190420680652522730692508292829456991139506916791,190420680652522730692508292829456991139506917077⟩⟩, + ⟨⟨14990271763878554663977327047848430605148773649773,14990271763878554663977327047848430605148773650118⟩,⟨-19622509041191052442525980003644550868565797609024,-19622509041191052442525980003644550868565797608680⟩⟩, + ⟨⟨39479430383726067404362652903807774886915260856268,39479430383726067404362652903807774886915260857093⟩,⟨-599266135928063019900052300250966924113219798867725,-599266135928063019900052300250966924113219798866903⟩⟩, + ⟨⟨-897914434424090819824267926671823553640731619743425,-897914434424090819824267926671823553640731619731143⟩,⟨-11313131631340698248676667597797499482380264299118167,-11313131631340698248676667597797499482380264299105883⟩⟩, + ⟨⟨17810595581197173038168346546298319208241414789622943,17810595581197173038168346546298319208241414789771753⟩,⟨-160948853223242279417861961087209302433579275372939114,-160948853223242279417861961087209302433579275372790270⟩⟩, + ⟨⟨899469841140552097246716882958284783562208636722543681,899469841140552097246716882958284783562208636723814715⟩,⟨-1488498313944981863405951662396990787965833985118143495,-1488498313944981863405951662396990787965833985116872355⟩⟩, + ⟨⟨12982125011132107509276459583207468763206306906547773153,12982125011132107509276459583207468763206306906556984675⟩,⟨-5839600880628393407576953563168872142008627078179275486,-5839600880628393407576953563168872142008627078170063460⟩⟩, + ⟨⟨86708436373084884893131345667985665950028232054472623164,86708436373084884893131345667985665950028232054521859648⟩,⟨26489720189180869492454021716266384256885845851720224325,26489720189180869492454021716266384256885845851769509896⟩⟩, + ⟨⟨213946445360850353235928492197518391220740930627067405751,213946445360850353235928492197518391220740930627240629013⟩,⟨407759777447917487270973876093934660960579448636888032472,407759777447917487270973876093934660960579448637061341249⟩⟩, + ⟨⟨-652371375069355805769831961628348017631685780001532312881,-652371375069355805769831961628348017631685780000823249050⟩,⟨1797831329445414469602001486796744872672712274715598873854,1797831329445414469602001486796744872672712274716305330505⟩⟩] +lemma tw1_1_3_1_calc (j : Fin 31) : taylorWaveBox 1 1 3 1 j = tw1_1_3_1 j := by + revert j + decide +kernel +def tw1_1_3_2 : Fin 31 → CI := ![⟨⟨1791030866606133256073656363361512031919573036365856003660,1791030866606133256073656363361512031919573036366448790612⟩,⟨-26404970041823626178807265602562624526062492408256529554,-26404970041823626178807265602562624526062492407663092127⟩⟩, + ⟨⟨292627258283509026105792961860698393395584501173038890355,292627258283509026105792961860698393395584501173177707797⟩,⟨342672035988008415465253414496452097236824034687763989270,342672035988008415465253414496452097236824034687902842915⟩⟩, + ⟨⟨-12504740600012531927262627519064182827036547792424119652,-12504740600012531927262627519064182827036547792376821953⟩,⟨91988647967736995639813752290490730883310165736421260532,91988647967736995639813752290490730883310165736468632984⟩⟩, + ⟨⟨-12046003295001679293886405945617439414535637506484983124,-12046003295001679293886405945617439414535637506473312391⟩,⟨9386375458218210261509727850637569868797759643394327995,9386375458218210261509727850637569868797759643406004777⟩⟩, + ⟨⟨-1956928493146081635400078084093927302981871660637068473,-1956928493146081635400078084093927302981871660635184737⟩,⟨-2644409781253417477689615932253269240955408942479038,-2644409781253417477689615932253269240955408940595831⟩⟩, + ⟨⟨-168020764251416166569376978863034810007120631116696996,-168020764251416166569376978863034810007120631116492365⟩,⟨-91387853072020175541240130813279431067070730346491181,-91387853072020175541240130813279431067070730346286623⟩⟩, + ⟨⟨-10239374659755209314696647091170582292401962092660970,-10239374659755209314696647091170582292401962092645736⟩,⟨-9659148960812050330041453176317845919413743504871052,-9659148960812050330041453176317845919413743504855820⟩⟩, + ⟨⟨-605317763879462918604120124153019064483596630719663,-605317763879462918604120124153019064483596630718782⟩,⟨-495223630593309997662414350958238623899220971868736,-495223630593309997662414350958238623899220971867880⟩⟩, + ⟨⟨-33184629451382595863218213347889288593902388582961,-33184629451382595863218213347889288593902388582569⟩,⟨-6031973025782309213892517920685020693264973744423,-6031973025782309213892517920685020693264973744030⟩⟩, + ⟨⟨-768459493760825833928152253127530689047663083326,-768459493760825833928152253127530689047663082897⟩,⟨928099626082706552611849957379253167525209418417,928099626082706552611849957379253167525209418846⟩⟩, + ⟨⟨34417923949416978208826536968577546903609820581,34417923949416978208826536968577546903609821133⟩,⟨20362424559303082227126111974454460011548741785,20362424559303082227126111974454460011548742347⟩⟩, + ⟨⟨-548880406307138648467824090688664009799695902,-548880406307138648467824090688664009799695316⟩,⟨-1358115115401429038020444539263902550580920552,-1358115115401429038020444539263902550580920010⟩⟩, + ⟨⟨37537844239414552263422515535874021015674795,37537844239414552263422515535874021015675363⟩,⟨64125293141254855613152305517091018510740259,64125293141254855613152305517091018510740828⟩⟩, + ⟨⟨-6693699527852483347577281336661232758291081,-6693699527852483347577281336661232758290328⟩,⟨-998249940297119018189863037181299716539218,-998249940297119018189863037181299716538464⟩⟩, + ⟨⟨333706317472966994462953487974513631712481,333706317472966994462953487974513631713253⟩,⟨-1380837222272095443874191673332320554745953,-1380837222272095443874191673332320554745182⟩⟩, + ⟨⟨825428591475004040287890767578224424785756,825428591475004040287890767578224424786508⟩,⟨-418,501⟩⟩, + ⟨⟨333706317472966994462953487974513631712481,333706317472966994462953487974513631713253⟩,⟨1380837222272095443874191673332320554745182,1380837222272095443874191673332320554745953⟩⟩, + ⟨⟨-6693699527852483347577281336661232758291081,-6693699527852483347577281336661232758290328⟩,⟨998249940297119018189863037181299716538464,998249940297119018189863037181299716539218⟩⟩, + ⟨⟨37537844239414552263422515535874021015674795,37537844239414552263422515535874021015675363⟩,⟨-64125293141254855613152305517091018510740828,-64125293141254855613152305517091018510740259⟩⟩, + ⟨⟨-548880406307138648467824090688664009799695902,-548880406307138648467824090688664009799695316⟩,⟨1358115115401429038020444539263902550580920010,1358115115401429038020444539263902550580920552⟩⟩, + ⟨⟨34417923949416978208826536968577546903609820581,34417923949416978208826536968577546903609821133⟩,⟨-20362424559303082227126111974454460011548742347,-20362424559303082227126111974454460011548741785⟩⟩, + ⟨⟨-768459493760825833928152253127530689047663083326,-768459493760825833928152253127530689047663082897⟩,⟨-928099626082706552611849957379253167525209418845,-928099626082706552611849957379253167525209418417⟩⟩, + ⟨⟨-33184629451382595863218213347889288593902388582961,-33184629451382595863218213347889288593902388582569⟩,⟨6031973025782309213892517920685020693264973744030,6031973025782309213892517920685020693264973744423⟩⟩, + ⟨⟨-605317763879462918604120124153019064483596630719663,-605317763879462918604120124153019064483596630718782⟩,⟨495223630593309997662414350958238623899220971867880,495223630593309997662414350958238623899220971868736⟩⟩, + ⟨⟨-10239374659755209314696647091170582292401962092660970,-10239374659755209314696647091170582292401962092645736⟩,⟨9659148960812050330041453176317845919413743504855820,9659148960812050330041453176317845919413743504871052⟩⟩, + ⟨⟨-168020764251416166569376978863034810007120631116696996,-168020764251416166569376978863034810007120631116492365⟩,⟨91387853072020175541240130813279431067070730346286623,91387853072020175541240130813279431067070730346491181⟩⟩, + ⟨⟨-1956928493146081635400078084093927302981871660637068473,-1956928493146081635400078084093927302981871660635184737⟩,⟨2644409781253417477689615932253269240955408940595831,2644409781253417477689615932253269240955408942479038⟩⟩, + ⟨⟨-12046003295001679293886405945617439414535637506484983124,-12046003295001679293886405945617439414535637506473312391⟩,⟨-9386375458218210261509727850637569868797759643406004777,-9386375458218210261509727850637569868797759643394327994⟩⟩, + ⟨⟨-12504740600012531927262627519064182827036547792424119652,-12504740600012531927262627519064182827036547792376821953⟩,⟨-91988647967736995639813752290490730883310165736468632984,-91988647967736995639813752290490730883310165736421260532⟩⟩, + ⟨⟨292627258283509026105792961860698393395584501173038890355,292627258283509026105792961860698393395584501173177707797⟩,⟨-342672035988008415465253414496452097236824034687902842915,-342672035988008415465253414496452097236824034687763989270⟩⟩, + ⟨⟨1791030866606133256073656363361512031919573036365856003647,1791030866606133256073656363361512031919573036366448790628⟩,⟨26404970041823626178807265602562624526062492407663092125,26404970041823626178807265602562624526062492408256529581⟩⟩] +lemma tw1_1_3_2_calc (j : Fin 31) : taylorWaveBox 1 1 3 2 j = tw1_1_3_2 j := by + revert j + decide +kernel +def tw1_1_3_3 : Fin 31 → CI := ![⟨⟨-420400778367641389562223007358121022172361541030768691767,-420400778367641389562223007358121022172361541030354934464⟩,⟨1274545616577571005307264926067253631277585868461169911912,1274545616577571005307264926067253631277585868461584869863⟩⟩, + ⟨⟨-334193508591684902094016615327473652034624514276673181346,-334193508591684902094016615327473652034624514276539265347⟩,⟨112970396315342365861227329079972929601836469580823126974,112970396315342365861227329079972929601836469580956920075⟩⟩, + ⟨⟨-64157082277841326006699930046105380113756804217842198102,-64157082277841326006699930046105380113756804217794763714⟩,⟨-40826175575748088406687693744229526582516565126834840240,-40826175575748088406687693744229526582516565126787532246⟩⟩, + ⟨⟨-2291940597553787591586006874036609518841814678664890937,-2291940597553787591586006874036609518841814678653856328⟩,⟨-12904303189272632818649707317127655325972900726543895709,-12904303189272632818649707317127655325972900726532866692⟩⟩, + ⟨⟨915135251537254920451225742950793583070588717593816132,915135251537254920451225742950793583070588717595448633⟩,⟨-1505217121977608343523284962612916987745993121862581740,-1505217121977608343523284962612916987745993121860948970⟩⟩, + ⟨⟨161600763603535589964601775317168532932669091579191163,161600763603535589964601775317168532932669091579344648⟩,⟨-80927474271542670590169868068399285589488532786139806,-80927474271542670590169868068399285589488532785986313⟩⟩, + ⟨⟨13835842019412536951684737682362250056872663165428284,13835842019412536951684737682362250056872663165442307⟩,⟨-1914581283769565785056672769850510252336359241933572,-1914581283769565785056672769850510252336359241919550⟩⟩, + ⟨⟨807510600677005267200800516580351403609930903962301,807510600677005267200800516580351403609930903963424⟩,⟨-108550205547191763075690546401492609657712658419355,-108550205547191763075690546401492609657712658418225⟩⟩, + ⟨⟨31249199836643585136732423541799378765653609570156,31249199836643585136732423541799378765653609570660⟩,⟨-19540515834825808110562020448799415429581185189295,-19540515834825808110562020448799415429581185188791⟩⟩, + ⟨⟨55517786937408760351687405323233856919364791607,55517786937408760351687405323233856919364792004⟩,⟨-1377195392650946111071405025646296849074430906088,-1377195392650946111071405025646296849074430905692⟩⟩, + ⟨⟨-47720646639149182429308491199773703441344027009,-47720646639149182429308491199773703441344026381⟩,⟨1089529024306101225673692625870248204715060881,1089529024306101225673692625870248204715061472⟩⟩, + ⟨⟨1352453990197757382840187730575063705084762069,1352453990197757382840187730575063705084762881⟩,⟨1212034013367135622556611167917826211954217841,1212034013367135622556611167917826211954218644⟩⟩, + ⟨⟨-73186568673694559969463147113214091590404807,-73186568673694559969463147113214091590404082⟩,⟨-60721752612629219649996211711026889821411674,-60721752612629219649996211711026889821410949⟩⟩, + ⟨⟨8838580579789631628369765635968120691070001,8838580579789631628369765635968120691070925⟩,⟨-777434891721092005100428108623251015229059,-777434891721092005100428108623251015228136⟩⟩, + ⟨⟨-222915481819186977351319194021024407372585,-222915481819186977351319194021024407371527⟩,⟨1877518139069188440399665877863753946835497,1877518139069188440399665877863753946836555⟩⟩, + ⟨⟨-1104238129428602075015501063988326917397846,-1104238129428602075015501063988326917396840⟩,⟨-670,558⟩⟩, + ⟨⟨-222915481819186977351319194021024407372585,-222915481819186977351319194021024407371527⟩,⟨-1877518139069188440399665877863753946836555,-1877518139069188440399665877863753946835497⟩⟩, + ⟨⟨8838580579789631628369765635968120691070001,8838580579789631628369765635968120691070925⟩,⟨777434891721092005100428108623251015228136,777434891721092005100428108623251015229059⟩⟩, + ⟨⟨-73186568673694559969463147113214091590404807,-73186568673694559969463147113214091590404082⟩,⟨60721752612629219649996211711026889821410949,60721752612629219649996211711026889821411674⟩⟩, + ⟨⟨1352453990197757382840187730575063705084762069,1352453990197757382840187730575063705084762881⟩,⟨-1212034013367135622556611167917826211954218644,-1212034013367135622556611167917826211954217841⟩⟩, + ⟨⟨-47720646639149182429308491199773703441344027009,-47720646639149182429308491199773703441344026381⟩,⟨-1089529024306101225673692625870248204715061472,-1089529024306101225673692625870248204715060881⟩⟩, + ⟨⟨55517786937408760351687405323233856919364791607,55517786937408760351687405323233856919364792004⟩,⟨1377195392650946111071405025646296849074430905692,1377195392650946111071405025646296849074430906088⟩⟩, + ⟨⟨31249199836643585136732423541799378765653609570156,31249199836643585136732423541799378765653609570660⟩,⟨19540515834825808110562020448799415429581185188791,19540515834825808110562020448799415429581185189295⟩⟩, + ⟨⟨807510600677005267200800516580351403609930903962301,807510600677005267200800516580351403609930903963424⟩,⟨108550205547191763075690546401492609657712658418225,108550205547191763075690546401492609657712658419355⟩⟩, + ⟨⟨13835842019412536951684737682362250056872663165428284,13835842019412536951684737682362250056872663165442307⟩,⟨1914581283769565785056672769850510252336359241919550,1914581283769565785056672769850510252336359241933572⟩⟩, + ⟨⟨161600763603535589964601775317168532932669091579191163,161600763603535589964601775317168532932669091579344648⟩,⟨80927474271542670590169868068399285589488532785986313,80927474271542670590169868068399285589488532786139806⟩⟩, + ⟨⟨915135251537254920451225742950793583070588717593816132,915135251537254920451225742950793583070588717595448633⟩,⟨1505217121977608343523284962612916987745993121860948970,1505217121977608343523284962612916987745993121862581740⟩⟩, + ⟨⟨-2291940597553787591586006874036609518841814678664890937,-2291940597553787591586006874036609518841814678653856328⟩,⟨12904303189272632818649707317127655325972900726532866692,12904303189272632818649707317127655325972900726543895709⟩⟩, + ⟨⟨-64157082277841326006699930046105380113756804217842198102,-64157082277841326006699930046105380113756804217794763714⟩,⟨40826175575748088406687693744229526582516565126787532246,40826175575748088406687693744229526582516565126834840240⟩⟩, + ⟨⟨-334193508591684902094016615327473652034624514276673181346,-334193508591684902094016615327473652034624514276539265347⟩,⟨-112970396315342365861227329079972929601836469580956920075,-112970396315342365861227329079972929601836469580823126974⟩⟩, + ⟨⟨-420400778367641389562223007358121022172361541030768691768,-420400778367641389562223007358121022172361541030354934445⟩,⟨-1274545616577571005307264926067253631277585868461584869877,-1274545616577571005307264926067253631277585868461169911906⟩⟩] +lemma tw1_1_3_3_calc (j : Fin 31) : taylorWaveBox 1 1 3 3 j = tw1_1_3_3 j := by + revert j + decide +kernel +def tw1_1_3_4 : Fin 31 → CI := ![⟨⟨-666105902733935350076950095138203633275963084782881864467,-666105902733935350076950095138203633275963084782563373402⟩,⟨-508434447171602346211094099223355238590719609781248096273,-508434447171602346211094099223355238590719609780931183634⟩⟩, + ⟨⟨12611953945506889735693721770770258337483212216853243391,12611953945506889735693721770770258337483212216952271861⟩,⟨-229797636932737481517322622132648548130137984565457367093,-229797636932737481517322622132648548130137984565358251450⟩⟩, + ⟨⟨43634097282833374511594524315077353278910488183392291012,43634097282833374511594524315077353278910488183424930116⟩,⟨-28120446963173502260349112710662243414491604875279671362,-28120446963173502260349112710662243414491604875246968748⟩⟩, + ⟨⟨8925624329239756192746656791955314253537781942573302343,8925624329239756192746656791955314253537781942580207347⟩,⟨2862866604325630490880664952291700524437987962303250917,2862866604325630490880664952291700524437987962310157099⟩⟩, + ⟨⟨609767736066829147841116460188292988438542263601131924,609767736066829147841116460188292988438542263602202667⟩,⟨1172338666521627231483557658093469526524261988839727675,1172338666521627231483557658093469526524261988840798538⟩⟩, + ⟨⟨-20435168124110128627534821111524728952221384534504260,-20435168124110128627534821111524728952221384534352839⟩,⟨140840304145960416485059098629914221375806177206580191,140840304145960416485059098629914221375806177206731668⟩⟩, + ⟨⟨-5933634243622969221587942903952384728251754031366262,-5933634243622969221587942903952384728251754031352701⟩,⟨9909159563183213339872295849669955900470206021740373,9909159563183213339872295849669955900470206021753937⟩⟩, + ⟨⟨-409763187245261104600843197213084819424042543046043,-409763187245261104600843197213084819424042543045205⟩,⟨576584460106740990830780864600231323747157169483790,576584460106740990830780864600231323747157169484650⟩⟩, + ⟨⟨-9059760118456534177410313087098870801163533997274,-9059760118456534177410313087098870801163533996860⟩,⟨32314881521125230369331747472453210012191391071513,32314881521125230369331747472453210012191391071927⟩⟩, + ⟨⟨753737319362289318145060846042384805063345700724,753737319362289318145060846042384805063345701207⟩,⟨1076146149033157786928154310982332348782168593301,1076146149033157786928154310982332348782168593783⟩⟩, + ⟨⟨39717390197494755177038951349308839643766637539,39717390197494755177038951349308839643766638119⟩,⟨-26015439286562169159914861775222985755894647575,-26015439286562169159914861775222985755894647044⟩⟩, + ⟨⟨-1805958369673577271187900253411286545681489870,-1805958369673577271187900253411286545681489113⟩,⟨-508916635646720395356748779674760534847611646,-508916635646720395356748779674760534847610848⟩⟩, + ⟨⟨95482005499809014192278230576523811234639236,95482005499809014192278230576523811234640148⟩,⟨34202361987192521096916831762120858646514998,34202361987192521096916831762120858646515910⟩⟩, + ⟨⟨-9190818071258140289776526456638642863301505,-9190818071258140289776526456638642863300622⟩,⟨3081569725647317014541017172036920102125289,3081569725647317014541017172036920102126172⟩⟩, + ⟨⟨-1618534892000093597389328806073706277398,-1618534892000093597389328806073706276206⟩,⟨-2096997662041246080221164129044456932472306,-2096997662041246080221164129044456932471114⟩⟩, + ⟨⟨1231018910536594397110152275897984884473981,1231018910536594397110152275897984884475102⟩,⟨-622,747⟩⟩, + ⟨⟨-1618534892000093597389328806073706277398,-1618534892000093597389328806073706276206⟩,⟨2096997662041246080221164129044456932471114,2096997662041246080221164129044456932472306⟩⟩, + ⟨⟨-9190818071258140289776526456638642863301505,-9190818071258140289776526456638642863300622⟩,⟨-3081569725647317014541017172036920102126172,-3081569725647317014541017172036920102125289⟩⟩, + ⟨⟨95482005499809014192278230576523811234639236,95482005499809014192278230576523811234640148⟩,⟨-34202361987192521096916831762120858646515910,-34202361987192521096916831762120858646514998⟩⟩, + ⟨⟨-1805958369673577271187900253411286545681489870,-1805958369673577271187900253411286545681489113⟩,⟨508916635646720395356748779674760534847610848,508916635646720395356748779674760534847611646⟩⟩, + ⟨⟨39717390197494755177038951349308839643766637539,39717390197494755177038951349308839643766638119⟩,⟨26015439286562169159914861775222985755894647044,26015439286562169159914861775222985755894647575⟩⟩, + ⟨⟨753737319362289318145060846042384805063345700724,753737319362289318145060846042384805063345701207⟩,⟨-1076146149033157786928154310982332348782168593783,-1076146149033157786928154310982332348782168593301⟩⟩, + ⟨⟨-9059760118456534177410313087098870801163533997274,-9059760118456534177410313087098870801163533996860⟩,⟨-32314881521125230369331747472453210012191391071927,-32314881521125230369331747472453210012191391071513⟩⟩, + ⟨⟨-409763187245261104600843197213084819424042543046043,-409763187245261104600843197213084819424042543045205⟩,⟨-576584460106740990830780864600231323747157169484650,-576584460106740990830780864600231323747157169483790⟩⟩, + ⟨⟨-5933634243622969221587942903952384728251754031366262,-5933634243622969221587942903952384728251754031352701⟩,⟨-9909159563183213339872295849669955900470206021753937,-9909159563183213339872295849669955900470206021740373⟩⟩, + ⟨⟨-20435168124110128627534821111524728952221384534504260,-20435168124110128627534821111524728952221384534352839⟩,⟨-140840304145960416485059098629914221375806177206731668,-140840304145960416485059098629914221375806177206580191⟩⟩, + ⟨⟨609767736066829147841116460188292988438542263601131924,609767736066829147841116460188292988438542263602202667⟩,⟨-1172338666521627231483557658093469526524261988840798538,-1172338666521627231483557658093469526524261988839727675⟩⟩, + ⟨⟨8925624329239756192746656791955314253537781942573302343,8925624329239756192746656791955314253537781942580207347⟩,⟨-2862866604325630490880664952291700524437987962310157099,-2862866604325630490880664952291700524437987962303250917⟩⟩, + ⟨⟨43634097282833374511594524315077353278910488183392291012,43634097282833374511594524315077353278910488183424930116⟩,⟨28120446963173502260349112710662243414491604875246968748,28120446963173502260349112710662243414491604875279671362⟩⟩, + ⟨⟨12611953945506889735693721770770258337483212216853243391,12611953945506889735693721770770258337483212216952271861⟩,⟨229797636932737481517322622132648548130137984565358251450,229797636932737481517322622132648548130137984565457367093⟩⟩, + ⟨⟨-666105902733935350076950095138203633275963084782881864479,-666105902733935350076950095138203633275963084782563373398⟩,⟨508434447171602346211094099223355238590719609780931183622,508434447171602346211094099223355238590719609781248096277⟩⟩] +lemma tw1_1_3_4_calc (j : Fin 31) : taylorWaveBox 1 1 3 4 j = tw1_1_3_4 j := by + revert j + decide +kernel +def tw1_1_3_5 : Fin 31 → CI := ![⟨⟨373773507776452067985235454706874780174644341020548321407,373773507776452067985235454706874780174644341020733921068⟩,⟨-247829680966395072219975984856586911581009410058915319552,-247829680966395072219975984856586911581009410058728877133⟩⟩, + ⟨⟨116673969321018486603110345470549123890801903540606848330,116673969321018486603110345470549123890801903540662278770⟩,⟨54306987323392501217796708224306487231679929907422957266,54306987323392501217796708224306487231679929907478359059⟩⟩, + ⟨⟨4264323778588927056903491668667819589500025374826763687,4264323778588927056903491668667819589500025374842878141⟩,⟨30072287584872200330271891691004077987014376398618702251,30072287584872200330271891691004077987014376398634814426⟩⟩, + ⟨⟨-4108175034113473512205027725525486740845413564442520805,-4108175034113473512205027725525486740845413564438074832⟩,⟨4017649101948106798567435319548499341924613849140795119,4017649101948106798567435319548499341924613849145242811⟩⟩, + ⟨⟨-847848125349683224303024031376688781141957385746341860,-847848125349683224303024031376688781141957385745468850⟩,⟨-55435532637266893921236822986778428474078728375277417,-55435532637266893921236822986778428474078728374404629⟩⟩, + ⟨⟨-70121454229740040253073540433520932747143461873804057,-70121454229740040253073540433520932747143461873701018⟩,⟨-65647151616978117375179548518802368724590484393534858,-65647151616978117375179548518802368724590484393431846⟩⟩, + ⟨⟨-2839409810474073575006218290202187328805476402877040,-2839409810474073575006218290202187328805476402869644⟩,⟨-7678007672627012233187275267591134647161527151490814,-7678007672627012233187275267591134647161527151483417⟩⟩, + ⟨⟨-105330022355184696793772112995407657179761890162396,-105330022355184696793772112995407657179761890161647⟩,⟨-515728249912699864528610545700670634281483095646268,-515728249912699864528610545700670634281483095645526⟩⟩, + ⟨⟨-11753103365707783339059366999809426859425597028605,-11753103365707783339059366999809426859425597028255⟩,⟨-23410029430713709964789794386360007648864721725841,-23410029430713709964789794386360007648864721725491⟩⟩, + ⟨⟨-1022808764260761040916857929094513389106174415821,-1022808764260761040916857929094513389106174415502⟩,⟨-325955923412107262264901633832071404268775400153,-325955923412107262264901633832071404268775399835⟩⟩, + ⟨⟨-17016101982050966606705624743023436286195717740,-17016101982050966606705624743023436286195717171⟩,⟨36729856376397956569407546215225254712000016929,36729856376397956569407546215225254712000017496⟩⟩, + ⟨⟨1634326885249884133373025399581627918258515008,1634326885249884133373025399581627918258515525⟩,⟨-299670223417888070069268379125351335417527677,-299670223417888070069268379125351335417527094⟩⟩, + ⟨⟨-92716070129280209640974818987989816394599632,-92716070129280209640974818987989816394598771⟩,⟨430708481127066066797017827949435322216154,430708481127066066797017827949435322217015⟩⟩, + ⟨⟨7694537351097900834848169432276231216731399,7694537351097900834848169432276231216732178⟩,⟨-4816412468867029839804465412023432193996472,-4816412468867029839804465412023432193995694⟩⟩, + ⟨⟨238095752202182815099258651813304754262873,238095752202182815099258651813304754264007⟩,⟨1979273466175412061732302430311268743757653,1979273466175412061732302430311268743758788⟩⟩, + ⟨⟨-1176304937737244644587658640332695925041182,-1176304937737244644587658640332695925040112⟩,⟨-714,595⟩⟩, + ⟨⟨238095752202182815099258651813304754262873,238095752202182815099258651813304754264007⟩,⟨-1979273466175412061732302430311268743758788,-1979273466175412061732302430311268743757653⟩⟩, + ⟨⟨7694537351097900834848169432276231216731399,7694537351097900834848169432276231216732178⟩,⟨4816412468867029839804465412023432193995694,4816412468867029839804465412023432193996472⟩⟩, + ⟨⟨-92716070129280209640974818987989816394599632,-92716070129280209640974818987989816394598771⟩,⟨-430708481127066066797017827949435322217015,-430708481127066066797017827949435322216154⟩⟩, + ⟨⟨1634326885249884133373025399581627918258515008,1634326885249884133373025399581627918258515525⟩,⟨299670223417888070069268379125351335417527094,299670223417888070069268379125351335417527677⟩⟩, + ⟨⟨-17016101982050966606705624743023436286195717740,-17016101982050966606705624743023436286195717171⟩,⟨-36729856376397956569407546215225254712000017496,-36729856376397956569407546215225254712000016929⟩⟩, + ⟨⟨-1022808764260761040916857929094513389106174415821,-1022808764260761040916857929094513389106174415502⟩,⟨325955923412107262264901633832071404268775399835,325955923412107262264901633832071404268775400153⟩⟩, + ⟨⟨-11753103365707783339059366999809426859425597028605,-11753103365707783339059366999809426859425597028255⟩,⟨23410029430713709964789794386360007648864721725491,23410029430713709964789794386360007648864721725841⟩⟩, + ⟨⟨-105330022355184696793772112995407657179761890162396,-105330022355184696793772112995407657179761890161647⟩,⟨515728249912699864528610545700670634281483095645526,515728249912699864528610545700670634281483095646268⟩⟩, + ⟨⟨-2839409810474073575006218290202187328805476402877040,-2839409810474073575006218290202187328805476402869644⟩,⟨7678007672627012233187275267591134647161527151483417,7678007672627012233187275267591134647161527151490814⟩⟩, + ⟨⟨-70121454229740040253073540433520932747143461873804057,-70121454229740040253073540433520932747143461873701018⟩,⟨65647151616978117375179548518802368724590484393431846,65647151616978117375179548518802368724590484393534858⟩⟩, + ⟨⟨-847848125349683224303024031376688781141957385746341860,-847848125349683224303024031376688781141957385745468850⟩,⟨55435532637266893921236822986778428474078728374404629,55435532637266893921236822986778428474078728375277417⟩⟩, + ⟨⟨-4108175034113473512205027725525486740845413564442520805,-4108175034113473512205027725525486740845413564438074832⟩,⟨-4017649101948106798567435319548499341924613849145242811,-4017649101948106798567435319548499341924613849140795119⟩⟩, + ⟨⟨4264323778588927056903491668667819589500025374826763687,4264323778588927056903491668667819589500025374842878141⟩,⟨-30072287584872200330271891691004077987014376398634814426,-30072287584872200330271891691004077987014376398618702251⟩⟩, + ⟨⟨116673969321018486603110345470549123890801903540606848330,116673969321018486603110345470549123890801903540662278770⟩,⟨-54306987323392501217796708224306487231679929907478359059,-54306987323392501217796708224306487231679929907422957266⟩⟩, + ⟨⟨373773507776452067985235454706874780174644341020548321401,373773507776452067985235454706874780174644341020733921071⟩,⟨247829680966395072219975984856586911581009410058728877132,247829680966395072219975984856586911581009410058915319559⟩⟩] +lemma tw1_1_3_5_calc (j : Fin 31) : taylorWaveBox 1 1 3 5 j = tw1_1_3_5 j := by + revert j + decide +kernel +def tw1_1_3_6 : Fin 31 → CI := ![⟨⟨52394236333700199353354908490891801935348364126075778305,52394236333700199353354908490891801935348364126162784751⟩,⟨203371957723337917643271829894388760671413892681019634163,203371957723337917643271829894388760671413892681106392318⟩⟩, + ⟨⟨-45886102466591606853957861599248031680729651713770199203,-45886102466591606853957861599248031680729651713746079582⟩,⟨43122000764109035873721767981763954709753187364246129829,43122000764109035873721767981763954709753187364270246986⟩⟩, + ⟨⟨-14897445993437147646734924308961378587653664994061222664,-14897445993437147646734924308961378587653664994051694416⟩,⟨-4457669638290594724682072950669255008412347581135453010,-4457669638290594724682072950669255008412347581125945034⟩⟩, + ⟨⟨-875756464492467738354342690892673243575516275504256046,-875756464492467738354342690892673243575516275501446643⟩,⟨-2955192279005456214734094960439737663130575866332530624,-2955192279005456214734094960439737663130575866329722617⟩⟩, + ⟨⟨273924379234422088624544549360293263335751058648814455,273924379234422088624544549360293263335751058649282978⟩,⟨-391756615851510537793152907376170334612523156155572665,-391756615851510537793152907376170334612523156155104082⟩⟩, + ⟨⟨55481988360741001410431432928571201931075540916732212,55481988360741001410431432928571201931075540916786866⟩,⟨-11824171138347873958920213967132820515962107624173813,-11824171138347873958920213967132820515962107624119167⟩⟩, + ⟨⟨4814614413670024106150972447970000084768080179667131,4814614413670024106150972447970000084768080179673460⟩,⟨1610651082355239909497757124788176893367042023084799,1610651082355239909497757124788176893367042023091126⟩⟩, + ⟨⟨292187495809978322191616824706169855839216074849360,292187495809978322191616824706169855839216074849818⟩,⟨179147011358332508981610004208841245177515704755667,179147011358332508981610004208841245177515704756116⟩⟩, + ⟨⟨16699206412394147387779874298893140958028457160992,16699206412394147387779874298893140958028457161224⟩,⟨6417058342568660997890692150177208793514875385478,6417058342568660997890692150177208793514875385710⟩⟩, + ⟨⟨722818257611195300106641881906960476976227339394,722818257611195300106641881906960476976227339665⟩,⟨-257947394582463295889008637530834581279817251834,-257947394582463295889008637530834581279817251563⟩⟩, + ⟨⟨-3711778294620855693176311368217131374091999266,-3711778294620855693176311368217131374091998914⟩,⟨-29969536146561719943865498660091395526961017700,-29969536146561719943865498660091395526961017320⟩⟩, + ⟨⟨-1034716552971445514046178079407431090933827681,-1034716552971445514046178079407431090933827139⟩,⟨766165444449036627022425328012096465619499462,766165444449036627022425328012096465619500025⟩⟩, + ⟨⟨69584090409058257482964362976589736774862359,69584090409058257482964362976589736774862986⟩,⟨-25657442278719045887044535570403026070831089,-25657442278719045887044535570403026070830461⟩⟩, + ⟨⟨-5208532644531051209765984354966874773961322,-5208532644531051209765984354966874773960575⟩,⟨5310153892630660502735296369608708932560320,5310153892630660502735296369608708932561068⟩⟩, + ⟨⟨-392032451757516139130657735664578375448488,-392032451757516139130657735664578375447556⟩,⟨-1611286561123810195035113974685471670388128,-1611286561123810195035113974685471670387196⟩⟩, + ⟨⟨983519938535423340081418429721520826290175,983519938535423340081418429721520826291070⟩,⟨-497,597⟩⟩, + ⟨⟨-392032451757516139130657735664578375448488,-392032451757516139130657735664578375447556⟩,⟨1611286561123810195035113974685471670387196,1611286561123810195035113974685471670388128⟩⟩, + ⟨⟨-5208532644531051209765984354966874773961322,-5208532644531051209765984354966874773960575⟩,⟨-5310153892630660502735296369608708932561068,-5310153892630660502735296369608708932560320⟩⟩, + ⟨⟨69584090409058257482964362976589736774862359,69584090409058257482964362976589736774862986⟩,⟨25657442278719045887044535570403026070830461,25657442278719045887044535570403026070831089⟩⟩, + ⟨⟨-1034716552971445514046178079407431090933827681,-1034716552971445514046178079407431090933827139⟩,⟨-766165444449036627022425328012096465619500025,-766165444449036627022425328012096465619499462⟩⟩, + ⟨⟨-3711778294620855693176311368217131374091999266,-3711778294620855693176311368217131374091998914⟩,⟨29969536146561719943865498660091395526961017320,29969536146561719943865498660091395526961017700⟩⟩, + ⟨⟨722818257611195300106641881906960476976227339394,722818257611195300106641881906960476976227339665⟩,⟨257947394582463295889008637530834581279817251563,257947394582463295889008637530834581279817251834⟩⟩, + ⟨⟨16699206412394147387779874298893140958028457160992,16699206412394147387779874298893140958028457161224⟩,⟨-6417058342568660997890692150177208793514875385710,-6417058342568660997890692150177208793514875385478⟩⟩, + ⟨⟨292187495809978322191616824706169855839216074849360,292187495809978322191616824706169855839216074849818⟩,⟨-179147011358332508981610004208841245177515704756116,-179147011358332508981610004208841245177515704755667⟩⟩, + ⟨⟨4814614413670024106150972447970000084768080179667131,4814614413670024106150972447970000084768080179673460⟩,⟨-1610651082355239909497757124788176893367042023091126,-1610651082355239909497757124788176893367042023084799⟩⟩, + ⟨⟨55481988360741001410431432928571201931075540916732212,55481988360741001410431432928571201931075540916786866⟩,⟨11824171138347873958920213967132820515962107624119167,11824171138347873958920213967132820515962107624173813⟩⟩, + ⟨⟨273924379234422088624544549360293263335751058648814455,273924379234422088624544549360293263335751058649282978⟩,⟨391756615851510537793152907376170334612523156155104082,391756615851510537793152907376170334612523156155572665⟩⟩, + ⟨⟨-875756464492467738354342690892673243575516275504256046,-875756464492467738354342690892673243575516275501446643⟩,⟨2955192279005456214734094960439737663130575866329722617,2955192279005456214734094960439737663130575866332530624⟩⟩, + ⟨⟨-14897445993437147646734924308961378587653664994061222664,-14897445993437147646734924308961378587653664994051694416⟩,⟨4457669638290594724682072950669255008412347581125945034,4457669638290594724682072950669255008412347581135453010⟩⟩, + ⟨⟨-45886102466591606853957861599248031680729651713770199203,-45886102466591606853957861599248031680729651713746079582⟩,⟨-43122000764109035873721767981763954709753187364270246986,-43122000764109035873721767981763954709753187364246129829⟩⟩, + ⟨⟨52394236333700199353354908490891801935348364126075778304,52394236333700199353354908490891801935348364126162784754⟩,⟨-203371957723337917643271829894388760671413892681106392320,-203371957723337917643271829894388760671413892681019634161⟩⟩] +lemma tw1_1_3_6_calc (j : Fin 31) : taylorWaveBox 1 1 3 6 j = tw1_1_3_6 j := by + revert j + decide +kernel +def tw1_1_3_7 : Fin 31 → CI := ![⟨⟨-87130575704299785407650909588151707618517543111957666928,-87130575704299785407650909588151707618517543111924589260⟩,⟨-7090922369650468725835122922661988013141424266807772153,-7090922369650468725835122922661988013141424266774689657⟩⟩, + ⟨⟨-9993898339748364109423232605078673829670153906423412880,-9993898339748364109423232605078673829670153906411014430⟩,⟨-25497986961067329182313966879434872201037787326266582200,-25497986961067329182313966879434872201037787326254175177⟩⟩, + ⟨⟨4678682417560000695736552988503874188673129263471188741,4678682417560000695736552988503874188673129263476166128⟩,⟨-5309213947150454266166325658057726669008164321968989917,-5309213947150454266166325658057726669008164321964001094⟩⟩, + ⟨⟨1440862372965993186295612085460041241982154631368084493,1440862372965993186295612085460041241982154631369366291⟩,⟨289164756334839987424195146879318016434921682616043437,289164756334839987424195146879318016434921682617325545⟩⟩, + ⟨⟨96535041282140275382350425897770324335763475317270100,96535041282140275382350425897770324335763475317497623⟩,⟨218700563114366809525401497661356323252274851397190018,218700563114366809525401497661356323252274851397417570⟩⟩, + ⟨⟨-11552618077318403452954419639343208515492757368212229,-11552618077318403452954419639343208515492757368176085⟩,⟨27447653871574926273035077950548843576080392845574650,27447653871574926273035077950548843576080392845610807⟩⟩, + ⟨⟨-2354845797639775914429795284027100642147452729584134,-2354845797639775914429795284027100642147452729581025⟩,⟨1512446319442849191992378165887913225402073709394770,1512446319442849191992378165887913225402073709397880⟩⟩, + ⟨⟨-191216993924038531421718922979245669303592251549838,-191216993924038531421718922979245669303592251549543⟩,⟨52777803054169730183904929976390545903531520641145,52777803054169730183904929976390545903531520641444⟩⟩, + ⟨⟨-10118412314792909460319518615207528778818161390500,-10118412314792909460319518615207528778818161390359⟩,⟨3945004978035087580692182829458955952255408945119,3945004978035087580692182829458955952255408945260⟩⟩, + ⟨⟨-265945212529082477366614405621052511164910437214,-265945212529082477366614405621052511164910437046⟩,⟨408826629436941657518841706370772336663591729953,408826629436941657518841706370772336663591730121⟩⟩, + ⟨⟨12596238772897790115115812950878403990179099285,12596238772897790115115812950878403990179099526⟩,⟨15567463958016163204274494961931820933888071785,15567463958016163204274494961931820933888072044⟩⟩, + ⟨⟨407460322437099748096285652266445996846564144,407460322437099748096285652266445996846564538⟩,⟨-787635954784941606966666822187086090484145788,-787635954784941606966666822187086090484145403⟩⟩, + ⟨⟨-40267627370063302195238735933529398913198198,-40267627370063302195238735933529398913197849⟩,⟨34046002565538293377739566291081895907522946,34046002565538293377739566291081895907523296⟩⟩, + ⟨⟨2785212186924552062368534847119874195596956,2785212186924552062368534847119874195597550⟩,⟨-4646834606634516649240576823195346894534636,-4646834606634516649240576823195346894534042⟩⟩, + ⟨⟨429202421857407038377631539948513905913087,429202421857407038377631539948513905913758⟩,⟨1148578636531788748868886480394490847350568,1148578636531788748868886480394490847351239⟩⟩, + ⟨⟨-730960476102740069841032799059932250902203,-730960476102740069841032799059932250901537⟩,⟨-444,370⟩⟩, + ⟨⟨429202421857407038377631539948513905913087,429202421857407038377631539948513905913758⟩,⟨-1148578636531788748868886480394490847351239,-1148578636531788748868886480394490847350568⟩⟩, + ⟨⟨2785212186924552062368534847119874195596956,2785212186924552062368534847119874195597550⟩,⟨4646834606634516649240576823195346894534042,4646834606634516649240576823195346894534636⟩⟩, + ⟨⟨-40267627370063302195238735933529398913198198,-40267627370063302195238735933529398913197849⟩,⟨-34046002565538293377739566291081895907523296,-34046002565538293377739566291081895907522946⟩⟩, + ⟨⟨407460322437099748096285652266445996846564144,407460322437099748096285652266445996846564538⟩,⟨787635954784941606966666822187086090484145403,787635954784941606966666822187086090484145788⟩⟩, + ⟨⟨12596238772897790115115812950878403990179099285,12596238772897790115115812950878403990179099526⟩,⟨-15567463958016163204274494961931820933888072044,-15567463958016163204274494961931820933888071785⟩⟩, + ⟨⟨-265945212529082477366614405621052511164910437214,-265945212529082477366614405621052511164910437046⟩,⟨-408826629436941657518841706370772336663591730121,-408826629436941657518841706370772336663591729953⟩⟩, + ⟨⟨-10118412314792909460319518615207528778818161390500,-10118412314792909460319518615207528778818161390359⟩,⟨-3945004978035087580692182829458955952255408945260,-3945004978035087580692182829458955952255408945119⟩⟩, + ⟨⟨-191216993924038531421718922979245669303592251549838,-191216993924038531421718922979245669303592251549543⟩,⟨-52777803054169730183904929976390545903531520641444,-52777803054169730183904929976390545903531520641145⟩⟩, + ⟨⟨-2354845797639775914429795284027100642147452729584134,-2354845797639775914429795284027100642147452729581025⟩,⟨-1512446319442849191992378165887913225402073709397880,-1512446319442849191992378165887913225402073709394770⟩⟩, + ⟨⟨-11552618077318403452954419639343208515492757368212229,-11552618077318403452954419639343208515492757368176085⟩,⟨-27447653871574926273035077950548843576080392845610807,-27447653871574926273035077950548843576080392845574650⟩⟩, + ⟨⟨96535041282140275382350425897770324335763475317270100,96535041282140275382350425897770324335763475317497623⟩,⟨-218700563114366809525401497661356323252274851397417570,-218700563114366809525401497661356323252274851397190018⟩⟩, + ⟨⟨1440862372965993186295612085460041241982154631368084493,1440862372965993186295612085460041241982154631369366291⟩,⟨-289164756334839987424195146879318016434921682617325545,-289164756334839987424195146879318016434921682616043437⟩⟩, + ⟨⟨4678682417560000695736552988503874188673129263471188741,4678682417560000695736552988503874188673129263476166128⟩,⟨5309213947150454266166325658057726669008164321964001094,5309213947150454266166325658057726669008164321968989917⟩⟩, + ⟨⟨-9993898339748364109423232605078673829670153906423412880,-9993898339748364109423232605078673829670153906411014430⟩,⟨25497986961067329182313966879434872201037787326254175177,25497986961067329182313966879434872201037787326266582200⟩⟩, + ⟨⟨-87130575704299785407650909588151707618517543111957666929,-87130575704299785407650909588151707618517543111924589259⟩,⟨7090922369650468725835122922661988013141424266774689656,7090922369650468725835122922661988013141424266807772153⟩⟩] +lemma tw1_1_3_7_calc (j : Fin 31) : taylorWaveBox 1 1 3 7 j = tw1_1_3_7 j := by + revert j + decide +kernel +def tw1_1_3_8 : Fin 31 → CI := ![⟨⟨13190859389501162179124027090744889418544969488270123704,13190859389501162179124027090744889418544969488283692607⟩,⟨-29975545803882365458846258377296479535153241509602947616,-29975545803882365458846258377296479535153241509589338071⟩⟩, + ⟨⟨10719712510582845474524507218441463000056899701551178760,10719712510582845474524507218441463000056899701556916770⟩,⟨77839033553523970285878373187229987886132203580480178,77839033553523970285878373187229987886132203586214122⟩⟩, + ⟨⟨1173466759665001997160898653325981133948212124570043708,1173466759665001997160898653325981133948212124572053633⟩,⟨2650205919415037617198033888869057882363420953327270402,2650205919415037617198033888869057882363420953329277823⟩⟩, + ⟨⟨-398596689590771764996554808639565348383549925404952042,-398596689590771764996554808639565348383549925404417147⟩,⟨488681461438544410066975827063713775438158877801721753,488681461438544410066975827063713775438158877802256774⟩⟩, + ⟨⟨-106699807488439336723799427682819660298378685593101761,-106699807488439336723799427682819660298378685592975024⟩,⟨-13866138182674215429518914580102165432571430955596786,-13866138182674215429518914580102165432571430955470076⟩⟩, + ⟨⟨-7521811330067707443390337875206453311668479791453848,-7521811330067707443390337875206453311668479791438254⟩,⟨-11890440052037037535913242360011556605247440331033952,-11890440052037037535913242360011556605247440331018361⟩⟩, + ⟨⟨147079845491382677463685375778798192319173654101664,147079845491382677463685375778798192319173654103513⟩,⟨-1380740779687550548344611894304523033618206475901781,-1380740779687550548344611894304523033618206475899932⟩⟩, + ⟨⟨47914296668090264216234270839613600238549186868179,47914296668090264216234270839613600238549186868335⟩,⟨-91548497302913246807281751906308681702917431381847,-91548497302913246807281751906308681702917431381689⟩⟩, + ⟨⟨2636399655864710188799473674707764198990378255548,2636399655864710188799473674707764198990378255629⟩,⟨-5315753618874532996590790988420104832532201309650,-5315753618874532996590790988420104832532201309569⟩⟩, + ⟨⟨-20777362318978359283823820918283950643799290397,-20777362318978359283823820918283950643799290309⟩,⟨-278168595072082676644512618516375319999129488548,-278168595072082676644512618516375319999129488460⟩⟩, + ⟨⟨-11292987233990453773969498319890417227311713443,-11292987233990453773969498319890417227311713274⟩,⟨-3911628691799296742036512604643407985273447100,-3911628691799296742036512604643407985273446933⟩⟩, + ⟨⟨-11755551665813579508094173609174321701744114,-11755551665813579508094173609174321701743906⟩,⟨549588214356533001700627369040631626659510305,549588214356533001700627369040631626659510494⟩⟩, + ⟨⟨16775653277562806342320737340398685901362896,16775653277562806342320737340398685901363181⟩,⟨-29278140634093662320807439207719250565577705,-29278140634093662320807439207719250565577420⟩⟩, + ⟨⟨-1063686085866821772120927389403142585844880,-1063686085866821772120927389403142585844479⟩,⟨3388290152652838536486946183427345130720981,3388290152652838536486946183427345130721381⟩⟩, + ⟨⟨-374303207499439327237745585496105824782902,-374303207499439327237745585496105824782473⟩,⟨-725045054775332973893800494058860948899978,-725045054775332973893800494058860948899550⟩⟩, + ⟨⟨488930500563096049172133296607275046104479,488930500563096049172133296607275046104925⟩,⟨-248,297⟩⟩, + ⟨⟨-374303207499439327237745585496105824782902,-374303207499439327237745585496105824782473⟩,⟨725045054775332973893800494058860948899550,725045054775332973893800494058860948899978⟩⟩, + ⟨⟨-1063686085866821772120927389403142585844880,-1063686085866821772120927389403142585844479⟩,⟨-3388290152652838536486946183427345130721381,-3388290152652838536486946183427345130720981⟩⟩, + ⟨⟨16775653277562806342320737340398685901362896,16775653277562806342320737340398685901363181⟩,⟨29278140634093662320807439207719250565577420,29278140634093662320807439207719250565577705⟩⟩, + ⟨⟨-11755551665813579508094173609174321701744114,-11755551665813579508094173609174321701743906⟩,⟨-549588214356533001700627369040631626659510494,-549588214356533001700627369040631626659510305⟩⟩, + ⟨⟨-11292987233990453773969498319890417227311713443,-11292987233990453773969498319890417227311713274⟩,⟨3911628691799296742036512604643407985273446933,3911628691799296742036512604643407985273447100⟩⟩, + ⟨⟨-20777362318978359283823820918283950643799290397,-20777362318978359283823820918283950643799290309⟩,⟨278168595072082676644512618516375319999129488460,278168595072082676644512618516375319999129488548⟩⟩, + ⟨⟨2636399655864710188799473674707764198990378255548,2636399655864710188799473674707764198990378255629⟩,⟨5315753618874532996590790988420104832532201309569,5315753618874532996590790988420104832532201309650⟩⟩, + ⟨⟨47914296668090264216234270839613600238549186868179,47914296668090264216234270839613600238549186868335⟩,⟨91548497302913246807281751906308681702917431381689,91548497302913246807281751906308681702917431381847⟩⟩, + ⟨⟨147079845491382677463685375778798192319173654101664,147079845491382677463685375778798192319173654103513⟩,⟨1380740779687550548344611894304523033618206475899932,1380740779687550548344611894304523033618206475901781⟩⟩, + ⟨⟨-7521811330067707443390337875206453311668479791453848,-7521811330067707443390337875206453311668479791438254⟩,⟨11890440052037037535913242360011556605247440331018361,11890440052037037535913242360011556605247440331033952⟩⟩, + ⟨⟨-106699807488439336723799427682819660298378685593101761,-106699807488439336723799427682819660298378685592975024⟩,⟨13866138182674215429518914580102165432571430955470076,13866138182674215429518914580102165432571430955596786⟩⟩, + ⟨⟨-398596689590771764996554808639565348383549925404952042,-398596689590771764996554808639565348383549925404417147⟩,⟨-488681461438544410066975827063713775438158877802256774,-488681461438544410066975827063713775438158877801721753⟩⟩, + ⟨⟨1173466759665001997160898653325981133948212124570043708,1173466759665001997160898653325981133948212124572053633⟩,⟨-2650205919415037617198033888869057882363420953329277823,-2650205919415037617198033888869057882363420953327270402⟩⟩, + ⟨⟨10719712510582845474524507218441463000056899701551178760,10719712510582845474524507218441463000056899701556916770⟩,⟨-77839033553523970285878373187229987886132203586214122,-77839033553523970285878373187229987886132203580480178⟩⟩, + ⟨⟨13190859389501162179124027090744889418544969488270123703,13190859389501162179124027090744889418544969488283692607⟩,⟨29975545803882365458846258377296479535153241509589338071,29975545803882365458846258377296479535153241509602947616⟩⟩] +lemma tw1_1_3_8_calc (j : Fin 31) : taylorWaveBox 1 1 3 8 j = tw1_1_3_8 j := by + revert j + decide +kernel +def tw1_1_3_9 : Fin 31 → CI := ![⟨⟨8176880876988775055573500588581500825808593779844737597,8176880876988775055573500588581500825808593779850306240⟩,⟨7585549551153637464624731981870748087329151282559634122,7585549551153637464624731981870748087329151282565181208⟩⟩, + ⟨⟨-1443481297848648766305642248191503111327907730986762884,-1443481297848648766305642248191503111327907730984573660⟩,⟨3531029961662582437872931919129620788577415039154438653,3531029961662582437872931919129620788577415039156628812⟩⟩, + ⟨⟨-1079066802574598602311198935312162993899601124193615885,-1079066802574598602311198935312162993899601124192946940⟩,⟨-15940592054460652973151592166672161428389378579773147,-15940592054460652973151592166672161428389378579104655⟩⟩, + ⟨⟨-95896898569561377716455881470939762453006863458469774,-95896898569561377716455881470939762453006863458206412⟩,⟨-226550324485997353704869194003738499458952373674434618,-226550324485997353704869194003738499458952373674171372⟩⟩, + ⟨⟨27481890158296191210669383509513887578935264724122320,27481890158296191210669383509513887578935264724173070⟩,⟨-34394545803978987163078569771074517943600516899807982,-34394545803978987163078569771074517943600516899757228⟩⟩, + ⟨⟨6037214847999478066107670523500003019969452669492219,6037214847999478066107670523500003019969452669500106⟩,⟨267773103839437260420510830731536968662284703927837,267773103839437260420510830731536968662284703935722⟩⟩, + ⟨⟨443839204432683812358959617953131543551078188288925,443839204432683812358959617953131543551078188289807⟩,⟨441862381474635089037855967713192625996141818494852,441862381474635089037855967713192625996141818495734⟩⟩, + ⟨⟨16186072910950521102368791611627445563829787984336,16186072910950521102368791611627445563829787984419⟩,⟨46176266813225855905894619784630479995141359603837,46176266813225855905894619784630479995141359603919⟩⟩, + ⟨⟨809428493523800059872557061719143247551014919919,809428493523800059872557061719143247551014919957⟩,⟨2833845722538381733315934040670751095065724846272,2833845722538381733315934040670751095065724846310⟩⟩, + ⟨⟨96269434844239739247967062091110096446091659410,96269434844239739247967062091110096446091659463⟩,⟨108477708789426347755381711056465051775020258165,108477708789426347755381711056465051775020258219⟩⟩, + ⟨⟨6322740362761275216983706388273072424042879645,6322740362761275216983706388273072424042879723⟩,⟨-1437946573685762059076898893114495527199833387,-1437946573685762059076898893114495527199833316⟩⟩, + ⟨⟨-130444118872069981194057869742408117762526746,-130444118872069981194057869742408117762526619⟩,⟨-280982520456541448887106431714905042506680883,-280982520456541448887106431714905042506680764⟩⟩, + ⟨⟨-3353901649348013412757429804513651488457089,-3353901649348013412757429804513651488456906⟩,⟨19341371020880762400109060412430305582036289,19341371020880762400109060412430305582036472⟩⟩, + ⟨⟨144668874116260848667192480831994894567574,144668874116260848667192480831994894567807⟩,⟨-2111370592765114950905897301536164173555893,-2111370592765114950905897301536164173555660⟩⟩, + ⟨⟨276892586194663987142898321713546787837221,276892586194663987142898321713546787837466⟩,⟨408659007146168602913031052691941264189795,408659007146168602913031052691941264190039⟩⟩, + ⟨⟨-297308743018423777057356883497928739247716,-297308743018423777057356883497928739247444⟩,⟨-181,151⟩⟩, + ⟨⟨276892586194663987142898321713546787837221,276892586194663987142898321713546787837466⟩,⟨-408659007146168602913031052691941264190039,-408659007146168602913031052691941264189795⟩⟩, + ⟨⟨144668874116260848667192480831994894567574,144668874116260848667192480831994894567807⟩,⟨2111370592765114950905897301536164173555660,2111370592765114950905897301536164173555893⟩⟩, + ⟨⟨-3353901649348013412757429804513651488457089,-3353901649348013412757429804513651488456906⟩,⟨-19341371020880762400109060412430305582036472,-19341371020880762400109060412430305582036289⟩⟩, + ⟨⟨-130444118872069981194057869742408117762526746,-130444118872069981194057869742408117762526619⟩,⟨280982520456541448887106431714905042506680764,280982520456541448887106431714905042506680883⟩⟩, + ⟨⟨6322740362761275216983706388273072424042879645,6322740362761275216983706388273072424042879723⟩,⟨1437946573685762059076898893114495527199833316,1437946573685762059076898893114495527199833387⟩⟩, + ⟨⟨96269434844239739247967062091110096446091659410,96269434844239739247967062091110096446091659463⟩,⟨-108477708789426347755381711056465051775020258219,-108477708789426347755381711056465051775020258165⟩⟩, + ⟨⟨809428493523800059872557061719143247551014919919,809428493523800059872557061719143247551014919957⟩,⟨-2833845722538381733315934040670751095065724846310,-2833845722538381733315934040670751095065724846272⟩⟩, + ⟨⟨16186072910950521102368791611627445563829787984336,16186072910950521102368791611627445563829787984419⟩,⟨-46176266813225855905894619784630479995141359603919,-46176266813225855905894619784630479995141359603837⟩⟩, + ⟨⟨443839204432683812358959617953131543551078188288925,443839204432683812358959617953131543551078188289807⟩,⟨-441862381474635089037855967713192625996141818495734,-441862381474635089037855967713192625996141818494852⟩⟩, + ⟨⟨6037214847999478066107670523500003019969452669492219,6037214847999478066107670523500003019969452669500106⟩,⟨-267773103839437260420510830731536968662284703935722,-267773103839437260420510830731536968662284703927837⟩⟩, + ⟨⟨27481890158296191210669383509513887578935264724122320,27481890158296191210669383509513887578935264724173070⟩,⟨34394545803978987163078569771074517943600516899757228,34394545803978987163078569771074517943600516899807982⟩⟩, + ⟨⟨-95896898569561377716455881470939762453006863458469774,-95896898569561377716455881470939762453006863458206412⟩,⟨226550324485997353704869194003738499458952373674171372,226550324485997353704869194003738499458952373674434618⟩⟩, + ⟨⟨-1079066802574598602311198935312162993899601124193615885,-1079066802574598602311198935312162993899601124192946940⟩,⟨15940592054460652973151592166672161428389378579104655,15940592054460652973151592166672161428389378579773147⟩⟩, + ⟨⟨-1443481297848648766305642248191503111327907730986762884,-1443481297848648766305642248191503111327907730984573660⟩,⟨-3531029961662582437872931919129620788577415039156628812,-3531029961662582437872931919129620788577415039154438653⟩⟩, + ⟨⟨8176880876988775055573500588581500825808593779844737597,8176880876988775055573500588581500825808593779850306241⟩,⟨-7585549551153637464624731981870748087329151282565181208,-7585549551153637464624731981870748087329151282559634122⟩⟩] +lemma tw1_1_3_9_calc (j : Fin 31) : taylorWaveBox 1 1 3 9 j = tw1_1_3_9 j := by + revert j + decide +kernel +def tw1_1_3_10 : Fin 31 → CI := ![⟨⟨-3073057454710347225845494433992513882580783009753997671,-3073057454710347225845494433992513882580783009752078502⟩,⟨1637346424934438386449694773771680742898685877705094548,1637346424934438386449694773771680742898685877707019686⟩⟩, + ⟨⟨-894287405703966407931180433542403585384414001450978346,-894287405703966407931180433542403585384414001450263918⟩,⟨-865213968667875419141233136046884683220554757009970368,-865213968667875419141233136046884683220554757009255933⟩⟩, + ⟨⟨159012693525148285787955585742725916661427629942925021,159012693525148285787955585742725916661427629943223633⟩,⟨-332247401399166257885955915363644171557524019328086163,-332247401399166257885955915363644171557524019327786934⟩⟩, + ⟨⟨87649533081572193770389298872838152477976049384004863,87649533081572193770389298872838152477976049384104558⟩,⟨7533096161797463327535836619948373877472411415176215,7533096161797463327535836619948373877472411415275936⟩⟩, + ⟨⟨5689186687032171569041604754396414159151898067957342,5689186687032171569041604754396414159151898067978125⟩,⟨15501708905305136999499850895860568724850173862400506,15501708905305136999499850895860568724850173862421292⟩⟩, + ⟨⟨-1445010895413920849022321439488448639611989718427247,-1445010895413920849022321439488448639611989718423717⟩,⟨1890241757669197375856611744927746237821457817376552,1890241757669197375856611744927746237821457817380082⟩⟩, + ⟨⟨-257356542805537662114067584429762251905053281712113,-257356542805537662114067584429762251905053281711726⟩,⟨28576638057204277497656535428033143952764598464848,28576638057204277497656535428033143952764598465235⟩⟩, + ⟨⟨-19442834408126536123175435876928460690901002112180,-19442834408126536123175435876928460690901002112139⟩,⟨-8550812512636154062508212840926996528717603615364,-8550812512636154062508212840926996528717603615324⟩⟩, + ⟨⟨-1141185617002699716457571366107991858256292178678,-1141185617002699716457571366107991858256292178659⟩,⟨-705875479380582463865777033773164077207453211203,-705875479380582463865777033773164077207453211183⟩⟩, + ⟨⟨-67833831691131200385248338031415520234045729454,-67833831691131200385248338031415520234045729435⟩,⟨-13303861811929782697972398327852341476863247812,-13303861811929782697972398327852341476863247792⟩⟩, + ⟨⟨-2291035580689613127028246649144229733718763872,-2291035580689613127028246649144229733718763827⟩,⟨2269542314655895623852298799605303254541581838,2269542314655895623852298799605303254541581879⟩⟩, + ⟨⟨124419303238303034882755667116339222017868787,124419303238303034882755667116339222017868859⟩,⟨100641893828274104584620330837354433708663574,100641893828274104584620330837354433708663646⟩⟩, + ⟨⟨-1842287867865874476905541584737907682379052,-1842287867865874476905541584737907682378956⟩,⟨-10304538571321708483758159800050237886553122,-10304538571321708483758159800050237886553027⟩⟩, + ⟨⟨192581279508711190358188085712514762501726,192581279508711190358188085712514762501843⟩,⟨1139915445262202674890497228251540718746642,1139915445262202674890497228251540718746759⟩⟩, + ⟨⟨-179359852063870266588564935602589562606169,-179359852063870266588564935602589562606043⟩,⟨-206800837340201136751704152564751106783846,-206800837340201136751704152564751106783720⟩⟩, + ⟨⟨165721810889165071396449470640960395730870,165721810889165071396449470640960395731021⟩,⟨-84,101⟩⟩, + ⟨⟨-179359852063870266588564935602589562606169,-179359852063870266588564935602589562606043⟩,⟨206800837340201136751704152564751106783720,206800837340201136751704152564751106783846⟩⟩, + ⟨⟨192581279508711190358188085712514762501726,192581279508711190358188085712514762501843⟩,⟨-1139915445262202674890497228251540718746759,-1139915445262202674890497228251540718746642⟩⟩, + ⟨⟨-1842287867865874476905541584737907682379052,-1842287867865874476905541584737907682378956⟩,⟨10304538571321708483758159800050237886553027,10304538571321708483758159800050237886553122⟩⟩, + ⟨⟨124419303238303034882755667116339222017868787,124419303238303034882755667116339222017868859⟩,⟨-100641893828274104584620330837354433708663646,-100641893828274104584620330837354433708663574⟩⟩, + ⟨⟨-2291035580689613127028246649144229733718763872,-2291035580689613127028246649144229733718763827⟩,⟨-2269542314655895623852298799605303254541581879,-2269542314655895623852298799605303254541581838⟩⟩, + ⟨⟨-67833831691131200385248338031415520234045729454,-67833831691131200385248338031415520234045729435⟩,⟨13303861811929782697972398327852341476863247792,13303861811929782697972398327852341476863247812⟩⟩, + ⟨⟨-1141185617002699716457571366107991858256292178678,-1141185617002699716457571366107991858256292178659⟩,⟨705875479380582463865777033773164077207453211183,705875479380582463865777033773164077207453211203⟩⟩, + ⟨⟨-19442834408126536123175435876928460690901002112180,-19442834408126536123175435876928460690901002112139⟩,⟨8550812512636154062508212840926996528717603615324,8550812512636154062508212840926996528717603615364⟩⟩, + ⟨⟨-257356542805537662114067584429762251905053281712113,-257356542805537662114067584429762251905053281711726⟩,⟨-28576638057204277497656535428033143952764598465235,-28576638057204277497656535428033143952764598464848⟩⟩, + ⟨⟨-1445010895413920849022321439488448639611989718427247,-1445010895413920849022321439488448639611989718423717⟩,⟨-1890241757669197375856611744927746237821457817380082,-1890241757669197375856611744927746237821457817376552⟩⟩, + ⟨⟨5689186687032171569041604754396414159151898067957342,5689186687032171569041604754396414159151898067978125⟩,⟨-15501708905305136999499850895860568724850173862421292,-15501708905305136999499850895860568724850173862400506⟩⟩, + ⟨⟨87649533081572193770389298872838152477976049384004863,87649533081572193770389298872838152477976049384104558⟩,⟨-7533096161797463327535836619948373877472411415275936,-7533096161797463327535836619948373877472411415176215⟩⟩, + ⟨⟨159012693525148285787955585742725916661427629942925021,159012693525148285787955585742725916661427629943223633⟩,⟨332247401399166257885955915363644171557524019327786934,332247401399166257885955915363644171557524019328086163⟩⟩, + ⟨⟨-894287405703966407931180433542403585384414001450978346,-894287405703966407931180433542403585384414001450263918⟩,⟨865213968667875419141233136046884683220554757009255933,865213968667875419141233136046884683220554757009970368⟩⟩, + ⟨⟨-3073057454710347225845494433992513882580783009753997671,-3073057454710347225845494433992513882580783009752078502⟩,⟨-1637346424934438386449694773771680742898685877707019686,-1637346424934438386449694773771680742898685877705094548⟩⟩] +lemma tw1_1_3_10_calc (j : Fin 31) : taylorWaveBox 1 1 3 10 j = tw1_1_3_10 j := by + revert j + decide +kernel +def tw1_1_3_11 : Fin 31 → CI := ![⟨⟨-156099741021300866574292665191467284432834519993111701,-156099741021300866574292665191467284432834519992532236⟩,⟨-991223376375363328847571862017445968559708575246770219,-991223376375363328847571862017445968559708575246191634⟩⟩, + ⟨⟨341935405562382264776299428835711545257242584193470300,341935405562382264776299428835711545257242584193724187⟩,⟨-153155634571302129442932130684807114764591974847165175,-153155634571302129442932130684807114764591974846911393⟩⟩, + ⟨⟨74119862314742837972709912077465448489830472063348259,74119862314742837972709912077465448489830472063454763⟩,⟨89293510180111858701979395112695925592086618505663203,89293510180111858701979395112695925592086618505769534⟩⟩, + ⟨⟨-15716538026362998220985570335032974289022877978350882,-15716538026362998220985570335032974289022877978319043⟩,⟨24418124729632890307000517701890902139457768111356588,24418124729632890307000517701890902139457768111388430⟩⟩, + ⟨⟨-5610707508526636709585762666314530245677702714417025,-5610707508526636709585762666314530245677702714408128⟩,⟨-1097505382483866127473109666848362591679723745257637,-1097505382483866127473109666848362591679723745248742⟩⟩, + ⟨⟨-263574960903119709280815704465225624818787836689091,-263574960903119709280815704465225624818787836687855⟩,⟨-823565709999775312742422274816731243181444707983336,-823565709999775312742422274816731243181444707982100⟩⟩, + ⟨⟨53032873429288206907865747150665296567176062213852,53032873429288206907865747150665296567176062214035⟩,⟨-83387310358102635601054729714457806227574676531075,-83387310358102635601054729714457806227574676530893⟩⟩, + ⟨⟨7822265377328274791378259927378618063993650974644,7822265377328274791378259927378618063993650974662⟩,⟨-3353264601101951614318725397440589390093868718388,-3353264601101951614318725397440589390093868718369⟩⟩, + ⟨⟨554359066003848781992297474936321226257559599384,554359066003848781992297474936321226257559599391⟩,⟨-103562739244444636221817000825791567245634031867,-103562739244444636221817000825791567245634031859⟩⟩, + ⟨⟨27283027631016766158848903245066092023806793265,27283027631016766158848903245066092023806793277⟩,⟨-13436614017134701721181545306869010802864411184,-13436614017134701721181545306869010802864411172⟩⟩, + ⟨⟨341905407658659900431805057411380994215511084,341905407658659900431805057411380994215511106⟩,⟨-1440455144179968602473916060480146822256892913,-1440455144179968602473916060480146822256892892⟩⟩, + ⟨⟨-74399403462304472146333025092036393883469369,-74399403462304472146333025092036393883469338⟩,⟨-16959191674439466391969375078778110731817101,-16959191674439466391969375078778110731817068⟩⟩, + ⟨⟨2584978925670607216604846602592538154546934,2584978925670607216604846602592538154546974⟩,⟨4457431767045280774151319383488096115812316,4457431767045280774151319383488096115812357⟩⟩, + ⟨⟨-228691287192681176631126670394476231655247,-228691287192681176631126670394476231655196⟩,⟨-536207927046749381185974847723547571776997,-536207927046749381185974847723547571776947⟩⟩, + ⟨⟨103727115973062257311831224226910817359051,103727115973062257311831224226910817359109⟩,⟨94217362521327900543595202806203425349368,94217362521327900543595202806203425349427⟩⟩, + ⟨⟨-85268682677167135048074103645190019043467,-85268682677167135048074103645190019043389⟩,⟨-52,44⟩⟩, + ⟨⟨103727115973062257311831224226910817359051,103727115973062257311831224226910817359109⟩,⟨-94217362521327900543595202806203425349427,-94217362521327900543595202806203425349368⟩⟩, + ⟨⟨-228691287192681176631126670394476231655247,-228691287192681176631126670394476231655196⟩,⟨536207927046749381185974847723547571776947,536207927046749381185974847723547571776997⟩⟩, + ⟨⟨2584978925670607216604846602592538154546934,2584978925670607216604846602592538154546974⟩,⟨-4457431767045280774151319383488096115812357,-4457431767045280774151319383488096115812316⟩⟩, + ⟨⟨-74399403462304472146333025092036393883469369,-74399403462304472146333025092036393883469338⟩,⟨16959191674439466391969375078778110731817068,16959191674439466391969375078778110731817101⟩⟩, + ⟨⟨341905407658659900431805057411380994215511084,341905407658659900431805057411380994215511106⟩,⟨1440455144179968602473916060480146822256892892,1440455144179968602473916060480146822256892913⟩⟩, + ⟨⟨27283027631016766158848903245066092023806793265,27283027631016766158848903245066092023806793277⟩,⟨13436614017134701721181545306869010802864411172,13436614017134701721181545306869010802864411184⟩⟩, + ⟨⟨554359066003848781992297474936321226257559599384,554359066003848781992297474936321226257559599391⟩,⟨103562739244444636221817000825791567245634031859,103562739244444636221817000825791567245634031867⟩⟩, + ⟨⟨7822265377328274791378259927378618063993650974644,7822265377328274791378259927378618063993650974662⟩,⟨3353264601101951614318725397440589390093868718369,3353264601101951614318725397440589390093868718388⟩⟩, + ⟨⟨53032873429288206907865747150665296567176062213852,53032873429288206907865747150665296567176062214035⟩,⟨83387310358102635601054729714457806227574676530893,83387310358102635601054729714457806227574676531075⟩⟩, + ⟨⟨-263574960903119709280815704465225624818787836689091,-263574960903119709280815704465225624818787836687855⟩,⟨823565709999775312742422274816731243181444707982100,823565709999775312742422274816731243181444707983336⟩⟩, + ⟨⟨-5610707508526636709585762666314530245677702714417025,-5610707508526636709585762666314530245677702714408128⟩,⟨1097505382483866127473109666848362591679723745248742,1097505382483866127473109666848362591679723745257637⟩⟩, + ⟨⟨-15716538026362998220985570335032974289022877978350882,-15716538026362998220985570335032974289022877978319043⟩,⟨-24418124729632890307000517701890902139457768111388430,-24418124729632890307000517701890902139457768111356588⟩⟩, + ⟨⟨74119862314742837972709912077465448489830472063348259,74119862314742837972709912077465448489830472063454763⟩,⟨-89293510180111858701979395112695925592086618505769534,-89293510180111858701979395112695925592086618505663203⟩⟩, + ⟨⟨341935405562382264776299428835711545257242584193470300,341935405562382264776299428835711545257242584193724187⟩,⟨153155634571302129442932130684807114764591974846911393,153155634571302129442932130684807114764591974847165175⟩⟩, + ⟨⟨-156099741021300866574292665191467284432834519993111701,-156099741021300866574292665191467284432834519992532236⟩,⟨991223376375363328847571862017445968559708575246191634,991223376375363328847571862017445968559708575246770219⟩⟩] +lemma tw1_1_3_11_calc (j : Fin 31) : taylorWaveBox 1 1 3 11 j = tw1_1_3_11 j := by + revert j + decide +kernel +def tw1_1_3_12 : Fin 31 → CI := ![⟨⟨264310158964660461503369010271859959625000087233454232,264310158964660461503369010271859959625000087233609836⟩,⟨47318384353591741214324014044583227414079520167969929,47318384353591741214324014044583227414079520168125447⟩⟩, + ⟨⟨4221071502812488533892117898103283337942414237309906,4221071502812488533892117898103283337942414237397496⟩,⟨104670158594402067381533706487949915187209854800810690,104670158594402067381533706487949915187209854800898319⟩⟩, + ⟨⟨-32798567621868607931445954780303482490906534251581926,-32798567621868607931445954780303482490906534251550118⟩,⟨8767334941041403690657369747005226429686381552844515,8767334941041403690657369747005226429686381552876339⟩⟩, + ⟨⟨-4366451436278536750259484027601766790712401028800866,-4366451436278536750259484027601766790712401028787823⟩,⟨-7756114540652378308862891909810046779153280879426220,-7756114540652378308862891909810046779153280879413181⟩⟩, + ⟨⟨1236718069795164370513940496153502347971698036087524,1236718069795164370513940496153502347971698036090539⟩,⟨-1359660643905221114832378987962485865506738112437291,-1359660643905221114832378987962485865506738112434276⟩⟩, + ⟨⟨278902712525528620014571228723399327727920707306377,278902712525528620014571228723399327727920707306946⟩,⟨85854812580154531620962641311861111128383921942793,85854812580154531620962641311861111128383921943362⟩⟩, + ⟨⟨11258736872237902029268661825081298303527686587049,11258736872237902029268661825081298303527686587115⟩,⟨33162248137255999017723766881059566532101432199204,33162248137255999017723766881059566532101432199270⟩⟩, + ⟨⟨-1075376568538727154641238163955015254584923515846,-1075376568538727154641238163955015254584923515837⟩,⟨2978394640633793363650034425409527928433555124084,2978394640633793363650034425409527928433555124092⟩⟩, + ⟨⟨-132750684550207691527421515321511520536392912122,-132750684550207691527421515321511520536392912118⟩,⟨175541799307744117279654369946960467823869336434,175541799307744117279654369946960467823869336438⟩⟩, + ⟨⟨-5536730591879257201602761692401177742122195313,-5536730591879257201602761692401177742122195308⟩,⟨11122366036833520879127537252112935140935274455,11122366036833520879127537252112935140935274460⟩⟩, + ⟨⟨200933056474796338211253990114974731840245098,200933056474796338211253990114974731840245105⟩,⟨598274350076974059515945370349473159647321913,598274350076974059515945370349473159647321921⟩⟩, + ⟨⟨32883156458445172440536961762394354013203489,32883156458445172440536961762394354013203501⟩,⟨-7765404267233150568012170335427343575632663,-7765404267233150568012170335427343575632650⟩⟩, + ⟨⟨-1806440555334934222738330462566948188872858,-1806440555334934222738330462566948188872839⟩,⟨-1511243479274148908283885281121074104337025,-1511243479274148908283885281121074104337007⟩⟩, + ⟨⟨162764934688171673374428124868913363838938,162764934688171673374428124868913363838964⟩,⟨219106901828415900883210572820549581355333,219106901828415900883210572820549581355359⟩⟩, + ⟨⟨-54270941621581667691409654378401367650346,-54270941621581667691409654378401367650315⟩,⟨-38617262610045667029973439636016804225154,-38617262610045667029973439636016804225124⟩⟩, + ⟨⟨40739411721864157896221632008658478402629,40739411721864157896221632008658478402667⟩,⟨-21,25⟩⟩, + ⟨⟨-54270941621581667691409654378401367650346,-54270941621581667691409654378401367650315⟩,⟨38617262610045667029973439636016804225124,38617262610045667029973439636016804225154⟩⟩, + ⟨⟨162764934688171673374428124868913363838938,162764934688171673374428124868913363838964⟩,⟨-219106901828415900883210572820549581355359,-219106901828415900883210572820549581355333⟩⟩, + ⟨⟨-1806440555334934222738330462566948188872858,-1806440555334934222738330462566948188872839⟩,⟨1511243479274148908283885281121074104337007,1511243479274148908283885281121074104337025⟩⟩, + ⟨⟨32883156458445172440536961762394354013203489,32883156458445172440536961762394354013203501⟩,⟨7765404267233150568012170335427343575632650,7765404267233150568012170335427343575632663⟩⟩, + ⟨⟨200933056474796338211253990114974731840245098,200933056474796338211253990114974731840245105⟩,⟨-598274350076974059515945370349473159647321921,-598274350076974059515945370349473159647321913⟩⟩, + ⟨⟨-5536730591879257201602761692401177742122195313,-5536730591879257201602761692401177742122195308⟩,⟨-11122366036833520879127537252112935140935274460,-11122366036833520879127537252112935140935274455⟩⟩, + ⟨⟨-132750684550207691527421515321511520536392912122,-132750684550207691527421515321511520536392912118⟩,⟨-175541799307744117279654369946960467823869336438,-175541799307744117279654369946960467823869336434⟩⟩, + ⟨⟨-1075376568538727154641238163955015254584923515846,-1075376568538727154641238163955015254584923515837⟩,⟨-2978394640633793363650034425409527928433555124092,-2978394640633793363650034425409527928433555124084⟩⟩, + ⟨⟨11258736872237902029268661825081298303527686587049,11258736872237902029268661825081298303527686587115⟩,⟨-33162248137255999017723766881059566532101432199270,-33162248137255999017723766881059566532101432199204⟩⟩, + ⟨⟨278902712525528620014571228723399327727920707306377,278902712525528620014571228723399327727920707306946⟩,⟨-85854812580154531620962641311861111128383921943362,-85854812580154531620962641311861111128383921942793⟩⟩, + ⟨⟨1236718069795164370513940496153502347971698036087524,1236718069795164370513940496153502347971698036090539⟩,⟨1359660643905221114832378987962485865506738112434276,1359660643905221114832378987962485865506738112437291⟩⟩, + ⟨⟨-4366451436278536750259484027601766790712401028800866,-4366451436278536750259484027601766790712401028787823⟩,⟨7756114540652378308862891909810046779153280879413181,7756114540652378308862891909810046779153280879426220⟩⟩, + ⟨⟨-32798567621868607931445954780303482490906534251581926,-32798567621868607931445954780303482490906534251550118⟩,⟨-8767334941041403690657369747005226429686381552876339,-8767334941041403690657369747005226429686381552844515⟩⟩, + ⟨⟨4221071502812488533892117898103283337942414237309906,4221071502812488533892117898103283337942414237397496⟩,⟨-104670158594402067381533706487949915187209854800898319,-104670158594402067381533706487949915187209854800810690⟩⟩, + ⟨⟨264310158964660461503369010271859959625000087233454232,264310158964660461503369010271859959625000087233609836⟩,⟨-47318384353591741214324014044583227414079520168125447,-47318384353591741214324014044583227414079520167969929⟩⟩] +lemma tw1_1_3_12_calc (j : Fin 31) : taylorWaveBox 1 1 3 12 j = tw1_1_3_12 j := by + revert j + decide +kernel +def tw1_1_3_13 : Fin 31 → CI := ![⟨⟨-32767090055899341930970509875893648175143235131748625,-32767090055899341930970509875893648175143235131700581⟩,⟨58511373287844357032222471392256092031432935750504609,58511373287844357032222471392256092031432935750552762⟩⟩, + ⟨⟨-25766926964142646245514140793239860696929877075004218,-25766926964142646245514140793239860696929877074977605⟩,⟨-9129265104582632450402485965789692233919267646881654,-9129265104582632450402485965789692233919267646855048⟩⟩, + ⟨⟨1572044762265636457392256440393375830162679504048753,1572044762265636457392256440393375830162679504058567⟩,⟨-9135805517804690466107115790727697573790549580448905,-9135805517804690466107115790727697573790549580439083⟩⟩, + ⟨⟨2545402066857200240435766572700544455311539167432972,2545402066857200240435766572700544455311539167437344⟩,⟨-67692397085974303726005363184722810369148587577025,-67692397085974303726005363184722810369148587572651⟩⟩, + ⟨⟨156540448473122983978202267194476182687842956804056,156540448473122983978202267194476182687842956805160⟩,⟨528815222200563708730331487342588049638302712642238,528815222200563708730331487342588049638302712643342⟩⟩, + ⟨⟨-72397432747205118330969577706821946519639473407901,-72397432747205118330969577706821946519639473407699⟩,⟨56630751934023351826943077630696501483275296333030,56630751934023351826943077630696501483275296333232⟩⟩, + ⟨⟨-10882357510510404640865674595010080992899101432632,-10882357510510404640865674595010080992899101432601⟩,⟨-3969282847707884904232941987732172755272346102100,-3969282847707884904232941987732172755272346102070⟩⟩, + ⟨⟨-500783370627045726298537150492175522673337524675,-500783370627045726298537150492175522673337524671⟩,⟨-979000023968047904808656099001274236235005514276,-979000023968047904808656099001274236235005514272⟩⟩, + ⟨⟨-7296998239806868206933511937089890990679169267,-7296998239806868206933511937089890990679169265⟩,⟨-79831253821667192479471292455656218231598809328,-79831253821667192479471292455656218231598809326⟩⟩, + ⟨⟨-891888531451567327607727928999043352819239143,-891888531451567327607727928999043352819239140⟩,⟨-4652569343422777141670399772226819870957852365,-4652569343422777141670399772226819870957852362⟩⟩, + ⟨⟨-193708111784774108647790535634729655092510024,-193708111784774108647790535634729655092510019⟩,⟨-159781243074947488815098437084665989059801336,-159781243074947488815098437084665989059801332⟩⟩, + ⟨⟨-10787438361381708849252222456762930753022841,-10787438361381708849252222456762930753022834⟩,⟨8865681855658251936667714936131712048045742,8865681855658251936667714936131712048045749⟩⟩, + ⟨⟨944517589150100951818828992163010013169700,944517589150100951818828992163010013169710⟩,⟨342681367093127691481678882684512907128286,342681367093127691481678882684512907128296⟩⟩, + ⟨⟨-91529472899313678623184889760506507815806,-91529472899313678623184889760506507815793⟩,⟨-76487199595213650136211737446950111996920,-76487199595213650136211737446950111996906⟩⟩, + ⟨⟨25939874820735951348301348956870475896387,25939874820735951348301348956870475896402⟩,⟨14154104693340538427677520507366533902824,14154104693340538427677520507366533902839⟩⟩, + ⟨⟨-18166728678243362804090900688174327506734,-18166728678243362804090900688174327506716⟩,⟨-12,10⟩⟩, + ⟨⟨25939874820735951348301348956870475896387,25939874820735951348301348956870475896402⟩,⟨-14154104693340538427677520507366533902839,-14154104693340538427677520507366533902824⟩⟩, + ⟨⟨-91529472899313678623184889760506507815806,-91529472899313678623184889760506507815793⟩,⟨76487199595213650136211737446950111996906,76487199595213650136211737446950111996920⟩⟩, + ⟨⟨944517589150100951818828992163010013169700,944517589150100951818828992163010013169710⟩,⟨-342681367093127691481678882684512907128296,-342681367093127691481678882684512907128286⟩⟩, + ⟨⟨-10787438361381708849252222456762930753022841,-10787438361381708849252222456762930753022834⟩,⟨-8865681855658251936667714936131712048045749,-8865681855658251936667714936131712048045742⟩⟩, + ⟨⟨-193708111784774108647790535634729655092510024,-193708111784774108647790535634729655092510019⟩,⟨159781243074947488815098437084665989059801332,159781243074947488815098437084665989059801336⟩⟩, + ⟨⟨-891888531451567327607727928999043352819239143,-891888531451567327607727928999043352819239140⟩,⟨4652569343422777141670399772226819870957852362,4652569343422777141670399772226819870957852365⟩⟩, + ⟨⟨-7296998239806868206933511937089890990679169267,-7296998239806868206933511937089890990679169265⟩,⟨79831253821667192479471292455656218231598809326,79831253821667192479471292455656218231598809328⟩⟩, + ⟨⟨-500783370627045726298537150492175522673337524675,-500783370627045726298537150492175522673337524671⟩,⟨979000023968047904808656099001274236235005514272,979000023968047904808656099001274236235005514276⟩⟩, + ⟨⟨-10882357510510404640865674595010080992899101432632,-10882357510510404640865674595010080992899101432601⟩,⟨3969282847707884904232941987732172755272346102070,3969282847707884904232941987732172755272346102100⟩⟩, + ⟨⟨-72397432747205118330969577706821946519639473407901,-72397432747205118330969577706821946519639473407699⟩,⟨-56630751934023351826943077630696501483275296333232,-56630751934023351826943077630696501483275296333030⟩⟩, + ⟨⟨156540448473122983978202267194476182687842956804056,156540448473122983978202267194476182687842956805160⟩,⟨-528815222200563708730331487342588049638302712643342,-528815222200563708730331487342588049638302712642238⟩⟩, + ⟨⟨2545402066857200240435766572700544455311539167432972,2545402066857200240435766572700544455311539167437344⟩,⟨67692397085974303726005363184722810369148587572651,67692397085974303726005363184722810369148587577025⟩⟩, + ⟨⟨1572044762265636457392256440393375830162679504048753,1572044762265636457392256440393375830162679504058567⟩,⟨9135805517804690466107115790727697573790549580439083,9135805517804690466107115790727697573790549580448905⟩⟩, + ⟨⟨-25766926964142646245514140793239860696929877075004218,-25766926964142646245514140793239860696929877074977605⟩,⟨9129265104582632450402485965789692233919267646855048,9129265104582632450402485965789692233919267646881654⟩⟩, + ⟨⟨-32767090055899341930970509875893648175143235131748625,-32767090055899341930970509875893648175143235131700581⟩,⟨-58511373287844357032222471392256092031432935750552762,-58511373287844357032222471392256092031432935750504609⟩⟩] +lemma tw1_1_3_13_calc (j : Fin 31) : taylorWaveBox 1 1 3 13 j = tw1_1_3_13 j := by + revert j + decide +kernel +def tw1_1_3_14 : Fin 31 → CI := ![⟨⟨-10435461226587565030763774737883382882210962628834418,-10435461226587565030763774737883382882210962628820785⟩,⟨-11732616683474080805555958950065185588989164939869995,-11732616683474080805555958950065185588989164939856393⟩⟩, + ⟨⟨4416355709304076541125484787929376920286337448945915,4416355709304076541125484787929376920286337448953261⟩,⟨-5022084206375616310311599723215712392449424223012539,-5022084206375616310311599723215712392449424223005193⟩⟩, + ⟨⟨1955811188544120788109310563254166132479414255659428,1955811188544120788109310563254166132479414255662608⟩,⟨1343833237004891578582580763390268739651642335635743,1343833237004891578582580763390268739651642335638919⟩⟩, + ⟨⟨-302914526070121186541906389611955270923474056168128,-302914526070121186541906389611955270923474056166849⟩,⟨612055461557979155399689104577986505051163270611311,612055461557979155399689104577986505051163270612591⟩⟩, + ⟨⟨-150039213252168099787521425400518692526602836965120,-150039213252168099787521425400518692526602836964727⟩,⟨-39449646538690754656591630788233782364078348449823,-39449646538690754656591630788233782364078348449430⟩⟩, + ⟨⟨-1503949998939395272714219876241450440608742824681,-1503949998939395272714219876241450440608742824607⟩,⟨-27099882118689134817343808849515350386041993120203,-27099882118689134817343808849515350386041993120128⟩⟩, + ⟨⟨3073423229411893866285118088028154673530556801229,3073423229411893866285118088028154673530556801240⟩,⟨-1859063619660931788730041694343870409690527211529,-1859063619660931788730041694343870409690527211518⟩⟩, + ⟨⟨344194024965319691388999379771403010290717531346,344194024965319691388999379771403010290717531349⟩,⟨98472614319890875463063988002088296744522629336,98472614319890875463063988002088296744522629339⟩⟩, + ⟨⟨20196156885193595185032171318848833322390339823,20196156885193595185032171318848833322390339824⟩,⟨18478464006649480357454095772116906491679828448,18478464006649480357454095772116906491679828449⟩⟩, + ⟨⟨1261755692423361758724581204311808664565315861,1261755692423361758724581204311808664565315862⟩,⟨1129413601213779813916061836765547150649821567,1129413601213779813916061836765547150649821568⟩⟩, + ⟨⟨92840064533527275107843903461205058006072034,92840064533527275107843903461205058006072037⟩,⟨12387962445203904610919921078704713525655507,12387962445203904610919921078704713525655509⟩⟩, + ⟨⟨2239681399678935440292771116426899248003904,2239681399678935440292771116426899248003907⟩,⟨-4924381643127776110203655544873500195058060,-4924381643127776110203655544873500195058057⟩⟩, + ⟨⟨-401850091270253849465824637712629271875916,-401850091270253849465824637712629271875912⟩,⟨229592402820653719163503292570912027881,229592402820653719163503292570912027886⟩⟩, + ⟨⟨43782055573629932609325400130133429779751,43782055573629932609325400130133429779757⟩,⟨21709906046590291285782691444648373535127,21709906046590291285782691444648373535134⟩⟩, + ⟨⟨-11411158052846037568560132764771871777738,-11411158052846037568560132764771871777731⟩,⟨-4565044391759178542752763510501652217010,-4565044391759178542752763510501652217003⟩⟩, + ⟨⟨7594688800416612291415940988015883334954,7594688800416612291415940988015883334962⟩,⟨-4,5⟩⟩, + ⟨⟨-11411158052846037568560132764771871777738,-11411158052846037568560132764771871777731⟩,⟨4565044391759178542752763510501652217003,4565044391759178542752763510501652217010⟩⟩, + ⟨⟨43782055573629932609325400130133429779751,43782055573629932609325400130133429779757⟩,⟨-21709906046590291285782691444648373535134,-21709906046590291285782691444648373535127⟩⟩, + ⟨⟨-401850091270253849465824637712629271875916,-401850091270253849465824637712629271875912⟩,⟨-229592402820653719163503292570912027886,-229592402820653719163503292570912027881⟩⟩, + ⟨⟨2239681399678935440292771116426899248003904,2239681399678935440292771116426899248003907⟩,⟨4924381643127776110203655544873500195058057,4924381643127776110203655544873500195058060⟩⟩, + ⟨⟨92840064533527275107843903461205058006072034,92840064533527275107843903461205058006072037⟩,⟨-12387962445203904610919921078704713525655509,-12387962445203904610919921078704713525655507⟩⟩, + ⟨⟨1261755692423361758724581204311808664565315861,1261755692423361758724581204311808664565315862⟩,⟨-1129413601213779813916061836765547150649821568,-1129413601213779813916061836765547150649821567⟩⟩, + ⟨⟨20196156885193595185032171318848833322390339823,20196156885193595185032171318848833322390339824⟩,⟨-18478464006649480357454095772116906491679828449,-18478464006649480357454095772116906491679828448⟩⟩, + ⟨⟨344194024965319691388999379771403010290717531346,344194024965319691388999379771403010290717531349⟩,⟨-98472614319890875463063988002088296744522629339,-98472614319890875463063988002088296744522629336⟩⟩, + ⟨⟨3073423229411893866285118088028154673530556801229,3073423229411893866285118088028154673530556801240⟩,⟨1859063619660931788730041694343870409690527211518,1859063619660931788730041694343870409690527211529⟩⟩, + ⟨⟨-1503949998939395272714219876241450440608742824681,-1503949998939395272714219876241450440608742824607⟩,⟨27099882118689134817343808849515350386041993120128,27099882118689134817343808849515350386041993120203⟩⟩, + ⟨⟨-150039213252168099787521425400518692526602836965120,-150039213252168099787521425400518692526602836964727⟩,⟨39449646538690754656591630788233782364078348449430,39449646538690754656591630788233782364078348449823⟩⟩, + ⟨⟨-302914526070121186541906389611955270923474056168128,-302914526070121186541906389611955270923474056166849⟩,⟨-612055461557979155399689104577986505051163270612591,-612055461557979155399689104577986505051163270611311⟩⟩, + ⟨⟨1955811188544120788109310563254166132479414255659428,1955811188544120788109310563254166132479414255662608⟩,⟨-1343833237004891578582580763390268739651642335638919,-1343833237004891578582580763390268739651642335635743⟩⟩, + ⟨⟨4416355709304076541125484787929376920286337448945915,4416355709304076541125484787929376920286337448953261⟩,⟨5022084206375616310311599723215712392449424223005193,5022084206375616310311599723215712392449424223012539⟩⟩, + ⟨⟨-10435461226587565030763774737883382882210962628834418,-10435461226587565030763774737883382882210962628820785⟩,⟨11732616683474080805555958950065185588989164939856393,11732616683474080805555958950065185588989164939869995⟩⟩] +lemma tw1_1_3_14_calc (j : Fin 31) : taylorWaveBox 1 1 3 14 j = tw1_1_3_14 j := by + revert j + decide +kernel +def tw1_1_3_15 : Fin 31 → CI := ![⟨⟨3195657317420073122052759246975538940556090393900436,3195657317420073122052759246975538940556090393903921⟩,⟨-1327065836526495737223881547540443810250026883555773,-1327065836526495737223881547540443810250026883552283⟩⟩, + ⟨⟨695574857152124256890949358115025291489964919383314,695574857152124256890949358115025291489964919385371⟩,⟨1373823222093259099483271321003881012479549815160811,1373823222093259099483271321003881012479549815162868⟩⟩, + ⟨⟨-491193923934081278862827467362624601807430129437863,-491193923934081278862827467362624601807430129436965⟩,⟨292552807383889674505367965729090720316947012151346,292552807383889674505367965729090720316947012152244⟩⟩, + ⟨⟨-100869552263308978912361127125855309894893753973388,-100869552263308978912361127125855309894893753972963⟩,⟨-139788233926118913435931045887537305064504107254749,-139788233926118913435931045887537305064504107254325⟩⟩, + ⟨⟨29522510277361188950084954811698173586096479977197,29522510277361188950084954811698173586096479977319⟩,⟨-28556946421132422923867867049627650621658835777152,-28556946421132422923867867049627650621658835777030⟩⟩, + ⟨⟨6419165760054766171690521873007577101212167010874,6419165760054766171690521873007577101212167010902⟩,⟨3961513041836856431596498128413116921854806250432,3961513041836856431596498128413116921854806250459⟩⟩, + ⟨⟨-139055714405945759309299332532713124278578345530,-139055714405945759309299332532713124278578345525⟩,⟨1039033255028488082458764310437226228458915309208,1039033255028488082458764310437226228458915309213⟩⟩, + ⟨⟨-94049838531975632448749608906199025112993731432,-94049838531975632448749608906199025112993731430⟩,⟨56461370925267869911745439075809998057076999252,56461370925267869911745439075809998057076999254⟩⟩, + ⟨⟨-8797679699680730723714406125081165110517297987,-8797679699680730723714406125081165110517297986⟩,⟨-20959778405747192283898607736902659606539952,-20959778405747192283898607736902659606539951⟩⟩, + ⟨⟨-567949930813461454482187616664939066984967948,-567949930813461454482187616664939066984967947⟩,⟨-44859197870825761198393554544641440919775432,-44859197870825761198393554544641440919775430⟩⟩, + ⟨⟨-29964404156083901022990464714031228228290011,-29964404156083901022990464714031228228290010⟩,⟨13540254180838484579409733821819295485392611,13540254180838484579409733821819295485392612⟩⟩, + ⟨⟨57535159120506605587388076305351311035526,57535159120506605587388076305351311035527⟩,⟨1971797643300589297835918123140217332198965,1971797643300589297835918123140217332198966⟩⟩, + ⟨⟨142135897649536978797269947923728212907580,142135897649536978797269947923728212907582⟩,⟨-51752337294902914684575686587711912716696,-51752337294902914684575686587711912716694⟩⟩, + ⟨⟨-18370692657761370663157363807888411464758,-18370692657761370663157363807888411464755⟩,⟨-4196044629680048808103388959402775804381,-4196044629680048808103388959402775804378⟩⟩, + ⟨⟨4647395109439909582583183955152372333923,4647395109439909582583183955152372333927⟩,⟨1244286902829841630542532826687699713855,1244286902829841630542532826687699713859⟩⟩, + ⟨⟨-2988231896659239401608286309845085358975,-2988231896659239401608286309845085358971⟩,⟨-2,2⟩⟩, + ⟨⟨4647395109439909582583183955152372333923,4647395109439909582583183955152372333927⟩,⟨-1244286902829841630542532826687699713859,-1244286902829841630542532826687699713855⟩⟩, + ⟨⟨-18370692657761370663157363807888411464758,-18370692657761370663157363807888411464755⟩,⟨4196044629680048808103388959402775804378,4196044629680048808103388959402775804381⟩⟩, + ⟨⟨142135897649536978797269947923728212907580,142135897649536978797269947923728212907582⟩,⟨51752337294902914684575686587711912716694,51752337294902914684575686587711912716696⟩⟩, + ⟨⟨57535159120506605587388076305351311035526,57535159120506605587388076305351311035527⟩,⟨-1971797643300589297835918123140217332198966,-1971797643300589297835918123140217332198965⟩⟩, + ⟨⟨-29964404156083901022990464714031228228290011,-29964404156083901022990464714031228228290010⟩,⟨-13540254180838484579409733821819295485392612,-13540254180838484579409733821819295485392611⟩⟩, + ⟨⟨-567949930813461454482187616664939066984967948,-567949930813461454482187616664939066984967947⟩,⟨44859197870825761198393554544641440919775430,44859197870825761198393554544641440919775432⟩⟩, + ⟨⟨-8797679699680730723714406125081165110517297987,-8797679699680730723714406125081165110517297986⟩,⟨20959778405747192283898607736902659606539951,20959778405747192283898607736902659606539952⟩⟩, + ⟨⟨-94049838531975632448749608906199025112993731432,-94049838531975632448749608906199025112993731430⟩,⟨-56461370925267869911745439075809998057076999254,-56461370925267869911745439075809998057076999252⟩⟩, + ⟨⟨-139055714405945759309299332532713124278578345530,-139055714405945759309299332532713124278578345525⟩,⟨-1039033255028488082458764310437226228458915309213,-1039033255028488082458764310437226228458915309208⟩⟩, + ⟨⟨6419165760054766171690521873007577101212167010874,6419165760054766171690521873007577101212167010902⟩,⟨-3961513041836856431596498128413116921854806250459,-3961513041836856431596498128413116921854806250432⟩⟩, + ⟨⟨29522510277361188950084954811698173586096479977197,29522510277361188950084954811698173586096479977319⟩,⟨28556946421132422923867867049627650621658835777030,28556946421132422923867867049627650621658835777152⟩⟩, + ⟨⟨-100869552263308978912361127125855309894893753973388,-100869552263308978912361127125855309894893753972963⟩,⟨139788233926118913435931045887537305064504107254325,139788233926118913435931045887537305064504107254749⟩⟩, + ⟨⟨-491193923934081278862827467362624601807430129437863,-491193923934081278862827467362624601807430129436965⟩,⟨-292552807383889674505367965729090720316947012152244,-292552807383889674505367965729090720316947012151346⟩⟩, + ⟨⟨695574857152124256890949358115025291489964919383314,695574857152124256890949358115025291489964919385371⟩,⟨-1373823222093259099483271321003881012479549815162868,-1373823222093259099483271321003881012479549815160811⟩⟩, + ⟨⟨3195657317420073122052759246975538940556090393900436,3195657317420073122052759246975538940556090393903921⟩,⟨1327065836526495737223881547540443810250026883552283,1327065836526495737223881547540443810250026883555773⟩⟩] +lemma tw1_1_3_15_calc (j : Fin 31) : taylorWaveBox 1 1 3 15 j = tw1_1_3_15 j := by + revert j + decide +kernel +def tw1_1_3_16 : Fin 31 → CI := ![⟨⟨43366605423048147747834177996467619567055155639103,43366605423048147747834177996467619567055155639930⟩,⟨718864848101403935006362394040605078293534432796313,718864848101403935006362394040605078293534432797140⟩⟩, + ⟨⟨-333572834529141231817778147953417765987139989678604,-333572834529141231817778147953417765987139989678034⟩,⟨29387462222979060013110662507549457434463418570837,29387462222979060013110662507549457434463418571408⟩⟩, + ⟨⟨-13707564298733197672300022638389296744890928769196,-13707564298733197672300022638389296744890928768965⟩,⟨-129364715372703841585274349709659401362791639941108,-129364715372703841585274349709659401362791639940877⟩⟩, + ⟨⟨40699560596642315337897155153883010458934591295950,40699560596642315337897155153883010458934591296079⟩,⟨-5690239765836555204176741827006443349167108558814,-5690239765836555204176741827006443349167108558685⟩⟩, + ⟨⟨2280025524084469281449329393195402194897715130353,2280025524084469281449329393195402194897715130394⟩,⟨10014212321347233482180046108597345853893027621128,10014212321347233482180046108597345853893027621169⟩⟩, + ⟨⟨-1816217977678365794825180209572581533041309348413,-1816217977678365794825180209572581533041309348404⟩,⟨788315730427770166833007685523659135985866772238,788315730427770166833007685523659135985866772248⟩⟩, + ⟨⟨-199209546988383907231890789571835018951111492313,-199209546988383907231890789571835018951111492310⟩,⟨-209296433686956494321688155589488117308538309712,-209296433686956494321688155589488117308538309710⟩⟩, + ⟨⟨6642745285398844211444360395482862656271635079,6642745285398844211444360395482862656271635081⟩,⟨-31042008413771969834374996256756618111695022697,-31042008413771969834374996256756618111695022696⟩⟩, + ⟨⟨1978746871749511623202442574414087286759308679,1978746871749511623202442574414087286759308680⟩,⟨-1793207332547126607986062800480415723251485526,-1793207332547126607986062800480415723251485525⟩⟩, + ⟨⟨152163486246490196120837424538448690769110093,152163486246490196120837424538448690769110094⟩,⟨-98062421530787986159140679754799716063097526,-98062421530787986159140679754799716063097525⟩⟩, + ⟨⟨6059406234469515291136505845765826438259559,6059406234469515291136505845765826438259560⟩,⟨-9063267790411900077819897119884817454927208,-9063267790411900077819897119884817454927207⟩⟩, + ⟨⟨-316832403919529479149081578735320775768740,-316832403919529479149081578735320775768738⟩,⟨-600939754510930684133629611357582256081838,-600939754510930684133629611357582256081836⟩⟩, + ⟨⟨-41206085626494832453849155775609611036492,-41206085626494832453849155775609611036491⟩,⟨34552563772097114567389729464428037038079,34552563772097114567389729464428037038080⟩⟩, + ⟨⟨6862023273462974217760223470379218402833,6862023273462974217760223470379218402834⟩,⟨-76979123621962996998075811406697760537,-76979123621962996998075811406697760535⟩⟩, + ⟨⟨-1760604663336249606860550033270634621717,-1760604663336249606860550033270634621715⟩,⟨-252877564784399075492433725086302676246,-252877564784399075492433725086302676244⟩⟩, + ⟨⟨1110439821453991103654118605809739496277,1110439821453991103654118605809739496279⟩,⟨-1,1⟩⟩, + ⟨⟨-1760604663336249606860550033270634621717,-1760604663336249606860550033270634621715⟩,⟨252877564784399075492433725086302676244,252877564784399075492433725086302676246⟩⟩, + ⟨⟨6862023273462974217760223470379218402833,6862023273462974217760223470379218402834⟩,⟨76979123621962996998075811406697760535,76979123621962996998075811406697760537⟩⟩, + ⟨⟨-41206085626494832453849155775609611036492,-41206085626494832453849155775609611036491⟩,⟨-34552563772097114567389729464428037038080,-34552563772097114567389729464428037038079⟩⟩, + ⟨⟨-316832403919529479149081578735320775768740,-316832403919529479149081578735320775768738⟩,⟨600939754510930684133629611357582256081836,600939754510930684133629611357582256081838⟩⟩, + ⟨⟨6059406234469515291136505845765826438259559,6059406234469515291136505845765826438259560⟩,⟨9063267790411900077819897119884817454927207,9063267790411900077819897119884817454927208⟩⟩, + ⟨⟨152163486246490196120837424538448690769110093,152163486246490196120837424538448690769110094⟩,⟨98062421530787986159140679754799716063097525,98062421530787986159140679754799716063097526⟩⟩, + ⟨⟨1978746871749511623202442574414087286759308679,1978746871749511623202442574414087286759308680⟩,⟨1793207332547126607986062800480415723251485525,1793207332547126607986062800480415723251485526⟩⟩, + ⟨⟨6642745285398844211444360395482862656271635079,6642745285398844211444360395482862656271635081⟩,⟨31042008413771969834374996256756618111695022696,31042008413771969834374996256756618111695022697⟩⟩, + ⟨⟨-199209546988383907231890789571835018951111492313,-199209546988383907231890789571835018951111492310⟩,⟨209296433686956494321688155589488117308538309710,209296433686956494321688155589488117308538309712⟩⟩, + ⟨⟨-1816217977678365794825180209572581533041309348413,-1816217977678365794825180209572581533041309348404⟩,⟨-788315730427770166833007685523659135985866772248,-788315730427770166833007685523659135985866772238⟩⟩, + ⟨⟨2280025524084469281449329393195402194897715130353,2280025524084469281449329393195402194897715130394⟩,⟨-10014212321347233482180046108597345853893027621169,-10014212321347233482180046108597345853893027621128⟩⟩, + ⟨⟨40699560596642315337897155153883010458934591295950,40699560596642315337897155153883010458934591296079⟩,⟨5690239765836555204176741827006443349167108558685,5690239765836555204176741827006443349167108558814⟩⟩, + ⟨⟨-13707564298733197672300022638389296744890928769196,-13707564298733197672300022638389296744890928768965⟩,⟨129364715372703841585274349709659401362791639940877,129364715372703841585274349709659401362791639941108⟩⟩, + ⟨⟨-333572834529141231817778147953417765987139989678604,-333572834529141231817778147953417765987139989678034⟩,⟨-29387462222979060013110662507549457434463418571408,-29387462222979060013110662507549457434463418570837⟩⟩, + ⟨⟨43366605423048147747834177996467619567055155639103,43366605423048147747834177996467619567055155639930⟩,⟨-718864848101403935006362394040605078293534432797140,-718864848101403935006362394040605078293534432796313⟩⟩] +lemma tw1_1_3_16_calc (j : Fin 31) : taylorWaveBox 1 1 3 16 j = tw1_1_3_16 j := by + revert j + decide +kernel +def tw1_1_3_17 : Fin 31 → CI := ![⟨⟨-136736092307421092318144143416618727316357983034019,-136736092307421092318144143416618727316357983033830⟩,⟨-38298815693684348753271781476174144449922115322038,-38298815693684348753271781476174144449922115321849⟩⟩, + ⟨⟨19921178996731757515952087671711550492761136230603,19921178996731757515952087671711550492761136230750⟩,⟨-66048989679563343694549650394027861971128515457454,-66048989679563343694549650394027861971128515457307⟩⟩, + ⟨⟨26565331401825504795278743512233627001254908209947,26565331401825504795278743512233627001254908210012⟩,⟨8981936258405714126642479184564475798759843618289,8981936258405714126642479184564475798759843618354⟩⟩, + ⟨⟨-3158570072677684395555207435158342643948035821275,-3158570072677684395555207435158342643948035821239⟩,⟨8727445565537815433565146820935967734289044938346,8727445565537815433565146820935967734289044938383⟩⟩, + ⟨⟨-2308640751406902897488601990665015452572304116251,-2308640751406902897488601990665015452572304116238⟩,⟨-767748016711524022103208263556429343385074504060,-767748016711524022103208263556429343385074504047⟩⟩, + ⟨⟨97262368590048744377285172267905743987171530313,97262368590048744377285172267905743987171530317⟩,⟨-482633070635393984880608620141318691066794971921,-482633070635393984880608620141318691066794971917⟩⟩, + ⟨⟨75187261820203188007474680899748018485472999103,75187261820203188007474680899748018485472999104⟩,⟨-6305415222525174012121659323866510951980493522,-6305415222525174012121659323866510951980493520⟩⟩, + ⟨⟨4975039964904394028247809344574428489870303710,4975039964904394028247809344574428489870303711⟩,⟨7140896750688611732734645193429045498826863644,7140896750688611732734645193429045498826863645⟩⟩, + ⟨⟨-73541172469423812543943082942218963824961670,-73541172469423812543943082942218963824961669⟩,⟨764365470733835100058169737438416796063355233,764365470733835100058169737438416796063355234⟩⟩, + ⟨⟨-18533754742334173402120868543332116601927588,-18533754742334173402120868543332116601927587⟩,⟨51243536346550785310685363901382628712861864,51243536346550785310685363901382628712861865⟩⟩, + ⟨⟨-110431586115666870010840403726510126518970,-110431586115666870010840403726510126518969⟩,⟨3422725380251337930311426435664350502485809,3422725380251337930311426435664350502485810⟩⟩, + ⟨⟨179148166530782959442562736172594862850697,179148166530782959442562736172594862850698⟩,⟨130505111160937776338307532144626992469193,130505111160937776338307532144626992469194⟩⟩, + ⟨⟨9068069611969326304494902147797688083508,9068069611969326304494902147797688083509⟩,⟨-15677861082085691730615341319845090481402,-15677861082085691730615341319845090481401⟩⟩, + ⟨⟨-2295752917971749466034724426446544504919,-2295752917971749466034724426446544504918⟩,⟨578853696554874377424560278138670425820,578853696554874377424560278138670425821⟩⟩, + ⟨⟨622796066976641941818421490169117273939,622796066976641941818421490169117273940⟩,⟨14768027502860792134289867843522965079,14768027502860792134289867843522965081⟩⟩, + ⟨⟨-390926095832749600476625408479534581142,-390926095832749600476625408479534581140⟩,⟨-1,1⟩⟩, + ⟨⟨622796066976641941818421490169117273939,622796066976641941818421490169117273940⟩,⟨-14768027502860792134289867843522965081,-14768027502860792134289867843522965079⟩⟩, + ⟨⟨-2295752917971749466034724426446544504919,-2295752917971749466034724426446544504918⟩,⟨-578853696554874377424560278138670425821,-578853696554874377424560278138670425820⟩⟩, + ⟨⟨9068069611969326304494902147797688083508,9068069611969326304494902147797688083509⟩,⟨15677861082085691730615341319845090481401,15677861082085691730615341319845090481402⟩⟩, + ⟨⟨179148166530782959442562736172594862850697,179148166530782959442562736172594862850698⟩,⟨-130505111160937776338307532144626992469194,-130505111160937776338307532144626992469193⟩⟩, + ⟨⟨-110431586115666870010840403726510126518970,-110431586115666870010840403726510126518969⟩,⟨-3422725380251337930311426435664350502485810,-3422725380251337930311426435664350502485809⟩⟩, + ⟨⟨-18533754742334173402120868543332116601927588,-18533754742334173402120868543332116601927587⟩,⟨-51243536346550785310685363901382628712861865,-51243536346550785310685363901382628712861864⟩⟩, + ⟨⟨-73541172469423812543943082942218963824961670,-73541172469423812543943082942218963824961669⟩,⟨-764365470733835100058169737438416796063355234,-764365470733835100058169737438416796063355233⟩⟩, + ⟨⟨4975039964904394028247809344574428489870303710,4975039964904394028247809344574428489870303711⟩,⟨-7140896750688611732734645193429045498826863645,-7140896750688611732734645193429045498826863644⟩⟩, + ⟨⟨75187261820203188007474680899748018485472999103,75187261820203188007474680899748018485472999104⟩,⟨6305415222525174012121659323866510951980493520,6305415222525174012121659323866510951980493522⟩⟩, + ⟨⟨97262368590048744377285172267905743987171530313,97262368590048744377285172267905743987171530317⟩,⟨482633070635393984880608620141318691066794971917,482633070635393984880608620141318691066794971921⟩⟩, + ⟨⟨-2308640751406902897488601990665015452572304116251,-2308640751406902897488601990665015452572304116238⟩,⟨767748016711524022103208263556429343385074504047,767748016711524022103208263556429343385074504060⟩⟩, + ⟨⟨-3158570072677684395555207435158342643948035821275,-3158570072677684395555207435158342643948035821239⟩,⟨-8727445565537815433565146820935967734289044938383,-8727445565537815433565146820935967734289044938346⟩⟩, + ⟨⟨26565331401825504795278743512233627001254908209947,26565331401825504795278743512233627001254908210012⟩,⟨-8981936258405714126642479184564475798759843618354,-8981936258405714126642479184564475798759843618289⟩⟩, + ⟨⟨19921178996731757515952087671711550492761136230603,19921178996731757515952087671711550492761136230750⟩,⟨66048989679563343694549650394027861971128515457307,66048989679563343694549650394027861971128515457454⟩⟩, + ⟨⟨-136736092307421092318144143416618727316357983034019,-136736092307421092318144143416618727316357983033830⟩,⟨38298815693684348753271781476174144449922115321849,38298815693684348753271781476174144449922115322038⟩⟩] +lemma tw1_1_3_17_calc (j : Fin 31) : taylorWaveBox 1 1 3 17 j = tw1_1_3_17 j := by + revert j + decide +kernel +def tw1_1_3_18 : Fin 31 → CI := ![⟨⟨15159692101629097455311202201247610020299827275400,15159692101629097455311202201247610020299827275445⟩,⟨-21855342250987453773590813734200264549793533914080,-21855342250987453773590813734200264549793533914035⟩⟩, + ⟨⟨10551732354821036418244649757355730965790258906867,10551732354821036418244649757355730965790258906903⟩,⟨8424123496910695094548228372990062648542223086824,8424123496910695094548228372990062648542223086859⟩⟩, + ⟨⟨-3946528521296258446262068893201160968313124111182,-3946528521296258446262068893201160968313124111165⟩,⟨4171866152563254193140811257411143868833017949090,4171866152563254193140811257411143868833017949108⟩⟩, + ⟨⟨-1338939191397315188956613827642050853404759586117,-1338939191397315188956613827642050853404759586106⟩,⟨-1474088566619932080650716860053448874228492958234,-1474088566619932080650716860053448874228492958223⟩⟩, + ⟨⟨417055818194471693366658378196068164652761165170,417055818194471693366658378196068164652761165174⟩,⟨-354742622020649799967862665803438680120361691858,-354742622020649799967862665803438680120361691853⟩⟩, + ⟨⟨80425480240088634998168004480508030711010348873,80425480240088634998168004480508030711010348874⟩,⟨84015542591593436285230408208240265049694160768,84015542591593436285230408208240265049694160769⟩⟩, + ⟨⟨-10465962794499859358589086586590875581954331605,-10465962794499859358589086586590875581954331603⟩,⟨15517598702684304928673569924276250679178051801,15517598702684304928673569924276250679178051802⟩⟩, + ⟨⟨-2243582413644615327895270993704977501938495857,-2243582413644615327895270993704977501938495856⟩,⟨-322974207394705070836284581241297398998647664,-322974207394705070836284581241297398998647663⟩⟩, + ⟨⟨-125732161667906562099381430837626498780487938,-125732161667906562099381430837626498780487937⟩,⟨-167918025048167942601048301781430044377499937,-167918025048167942601048301781430044377499936⟩⟩, + ⟨⟨-4668290467962550533086225906317590896903834,-4668290467962550533086225906317590896903833⟩,⟨-14867434228661525532268648005394390724784064,-14867434228661525532268648005394390724784063⟩⟩, + ⟨⟨-512016503684406569423099362171837662027540,-512016503684406569423099362171837662027539⟩,⟨-884360408354828810616701617617173105613930,-884360408354828810616701617617173105613928⟩⟩, + ⟨⟨-67665354943220284860550054576867954446149,-67665354943220284860550054576867954446148⟩,⟨-11863451468490303173134824913609586185617,-11863451468490303173134824913609586185616⟩⟩, + ⟨⟨-1013344010154177108226073936246718341613,-1013344010154177108226073936246718341612⟩,⟨5705600050184530841255171208599357246500,5705600050184530841255171208599357246501⟩⟩, + ⟨⟨687314882907880303752304240613668984005,687314882907880303752304240613668984006⟩,⟨-360245167313257133904717211415472135858,-360245167313257133904717211415472135857⟩⟩, + ⟨⟨-206343521045938344510621703916936925107,-206343521045938344510621703916936925106⟩,⟨19711668318759044886038465090123512818,19711668318759044886038465090123512819⟩⟩, + ⟨⟨130742836286963662283478945361546728337,130742836286963662283478945361546728338⟩,⟨-1,1⟩⟩, + ⟨⟨-206343521045938344510621703916936925107,-206343521045938344510621703916936925106⟩,⟨-19711668318759044886038465090123512819,-19711668318759044886038465090123512818⟩⟩, + ⟨⟨687314882907880303752304240613668984005,687314882907880303752304240613668984006⟩,⟨360245167313257133904717211415472135857,360245167313257133904717211415472135858⟩⟩, + ⟨⟨-1013344010154177108226073936246718341613,-1013344010154177108226073936246718341612⟩,⟨-5705600050184530841255171208599357246501,-5705600050184530841255171208599357246500⟩⟩, + ⟨⟨-67665354943220284860550054576867954446149,-67665354943220284860550054576867954446148⟩,⟨11863451468490303173134824913609586185616,11863451468490303173134824913609586185617⟩⟩, + ⟨⟨-512016503684406569423099362171837662027540,-512016503684406569423099362171837662027539⟩,⟨884360408354828810616701617617173105613928,884360408354828810616701617617173105613930⟩⟩, + ⟨⟨-4668290467962550533086225906317590896903834,-4668290467962550533086225906317590896903833⟩,⟨14867434228661525532268648005394390724784063,14867434228661525532268648005394390724784064⟩⟩, + ⟨⟨-125732161667906562099381430837626498780487938,-125732161667906562099381430837626498780487937⟩,⟨167918025048167942601048301781430044377499936,167918025048167942601048301781430044377499937⟩⟩, + ⟨⟨-2243582413644615327895270993704977501938495857,-2243582413644615327895270993704977501938495856⟩,⟨322974207394705070836284581241297398998647663,322974207394705070836284581241297398998647664⟩⟩, + ⟨⟨-10465962794499859358589086586590875581954331605,-10465962794499859358589086586590875581954331603⟩,⟨-15517598702684304928673569924276250679178051802,-15517598702684304928673569924276250679178051801⟩⟩, + ⟨⟨80425480240088634998168004480508030711010348873,80425480240088634998168004480508030711010348874⟩,⟨-84015542591593436285230408208240265049694160769,-84015542591593436285230408208240265049694160768⟩⟩, + ⟨⟨417055818194471693366658378196068164652761165170,417055818194471693366658378196068164652761165174⟩,⟨354742622020649799967862665803438680120361691853,354742622020649799967862665803438680120361691858⟩⟩, + ⟨⟨-1338939191397315188956613827642050853404759586117,-1338939191397315188956613827642050853404759586106⟩,⟨1474088566619932080650716860053448874228492958223,1474088566619932080650716860053448874228492958234⟩⟩, + ⟨⟨-3946528521296258446262068893201160968313124111182,-3946528521296258446262068893201160968313124111165⟩,⟨-4171866152563254193140811257411143868833017949108,-4171866152563254193140811257411143868833017949090⟩⟩, + ⟨⟨10551732354821036418244649757355730965790258906867,10551732354821036418244649757355730965790258906903⟩,⟨-8424123496910695094548228372990062648542223086859,-8424123496910695094548228372990062648542223086824⟩⟩, + ⟨⟨15159692101629097455311202201247610020299827275400,15159692101629097455311202201247610020299827275445⟩,⟨21855342250987453773590813734200264549793533914035,21855342250987453773590813734200264549793533914080⟩⟩] +lemma tw1_1_3_18_calc (j : Fin 31) : taylorWaveBox 1 1 3 18 j = tw1_1_3_18 j := by + revert j + decide +kernel +def tw1_1_3_19 : Fin 31 → CI := ![⟨⟨2799344446230734374765596397494262028596471108920,2799344446230734374765596397494262028596471108931⟩,⟨3831282745777563154261807381800218390821461663979,3831282745777563154261807381800218390821461663990⟩⟩, + ⟨⟨-2188744603901860509603476473901813786406544503410,-2188744603901860509603476473901813786406544503401⟩,⟨1242305736114406489122465816145811911879983821330,1242305736114406489122465816145811911879983821340⟩⟩, + ⟨⟨-417049072621946218520604203384724580293597795299,-417049072621946218520604203384724580293597795294⟩,⟨-1039506411083002444880314272604562716750899299316,-1039506411083002444880314272604562716750899299311⟩⟩, + ⟨⟨394151111300156183898517037522228401575926000323,394151111300156183898517037522228401575926000326⟩,⟨-101161183176986930571159309438269269015985632982,-101161183176986930571159309438269269015985632978⟩⟩, + ⟨⟨18686826205409064242457978642260498097941318562,18686826205409064242457978642260498097941318564⟩,⟨115850826667341023444601353928903045150414242294,115850826667341023444601353928903045150414242296⟩⟩, + ⟨⟨-25852029071153723604025981495685569959891616429,-25852029071153723604025981495685569959891616427⟩,⟨4044870205977578523004871816023630654937796051,4044870205977578523004871816023630654937796052⟩⟩, + ⟨⟨-1308393911694607766028895780578991154075983631,-1308393911694607766028895780578991154075983630⟩,⟨-4224065144923401159309883625938278967190954279,-4224065144923401159309883625938278967190954278⟩⟩, + ⟨⟨438479957359766447990891204388032650237041521,438479957359766447990891204388032650237041522⟩,⟨-351939475636860501785132205090079719290079760,-351939475636860501785132205090079719290079759⟩⟩, + ⟨⟨53600686504824772531049700402244542859721488,53600686504824772531049700402244542859721489⟩,⟨10277975999405138676884986159642763108258720,10277975999405138676884986159642763108258721⟩⟩, + ⟨⟨3465819205883194875780125745648535213739339,3465819205883194875780125745648535213739340⟩,⟨2449577964864205791723815128879629249301703,2449577964864205791723815128879629249301704⟩⟩, + ⟨⟨256390024256018080730738771027057501728477,256390024256018080730738771027057501728478⟩,⟨136400130212511497693865218570101405443248,136400130212511497693865218570101405443249⟩⟩, + ⟨⟨19475013508819043662354594391212061950052,19475013508819043662354594391212061950053⟩,⟨-5652033092814742206481206292875436371550,-5652033092814742206481206292875436371549⟩⟩, + ⟨⟨-303689161524628461851254763955473878974,-303689161524628461851254763955473878973⟩,⟨-1739513142577935140175485322435929888277,-1739513142577935140175485322435929888276⟩⟩, + ⟨⟨-182341846041006524585958771978534695270,-182341846041006524585958771978534695269⟩,⟨159456771457345022170205584421284795769,159456771457345022170205584421284795770⟩⟩, + ⟨⟨64184586562431154665393228906607864776,64184586562431154665393228906607864777⟩,⟨-13961650115958757021845722452886509327,-13961650115958757021845722452886509326⟩⟩, + ⟨⟨-41643942965124676313445099170592704347,-41643942965124676313445099170592704346⟩,⟨-1,1⟩⟩, + ⟨⟨64184586562431154665393228906607864776,64184586562431154665393228906607864777⟩,⟨13961650115958757021845722452886509326,13961650115958757021845722452886509327⟩⟩, + ⟨⟨-182341846041006524585958771978534695270,-182341846041006524585958771978534695269⟩,⟨-159456771457345022170205584421284795770,-159456771457345022170205584421284795769⟩⟩, + ⟨⟨-303689161524628461851254763955473878974,-303689161524628461851254763955473878973⟩,⟨1739513142577935140175485322435929888276,1739513142577935140175485322435929888277⟩⟩, + ⟨⟨19475013508819043662354594391212061950052,19475013508819043662354594391212061950053⟩,⟨5652033092814742206481206292875436371549,5652033092814742206481206292875436371550⟩⟩, + ⟨⟨256390024256018080730738771027057501728477,256390024256018080730738771027057501728478⟩,⟨-136400130212511497693865218570101405443249,-136400130212511497693865218570101405443248⟩⟩, + ⟨⟨3465819205883194875780125745648535213739339,3465819205883194875780125745648535213739340⟩,⟨-2449577964864205791723815128879629249301704,-2449577964864205791723815128879629249301703⟩⟩, + ⟨⟨53600686504824772531049700402244542859721488,53600686504824772531049700402244542859721489⟩,⟨-10277975999405138676884986159642763108258721,-10277975999405138676884986159642763108258720⟩⟩, + ⟨⟨438479957359766447990891204388032650237041521,438479957359766447990891204388032650237041522⟩,⟨351939475636860501785132205090079719290079759,351939475636860501785132205090079719290079760⟩⟩, + ⟨⟨-1308393911694607766028895780578991154075983631,-1308393911694607766028895780578991154075983630⟩,⟨4224065144923401159309883625938278967190954278,4224065144923401159309883625938278967190954279⟩⟩, + ⟨⟨-25852029071153723604025981495685569959891616429,-25852029071153723604025981495685569959891616427⟩,⟨-4044870205977578523004871816023630654937796052,-4044870205977578523004871816023630654937796051⟩⟩, + ⟨⟨18686826205409064242457978642260498097941318562,18686826205409064242457978642260498097941318564⟩,⟨-115850826667341023444601353928903045150414242296,-115850826667341023444601353928903045150414242294⟩⟩, + ⟨⟨394151111300156183898517037522228401575926000323,394151111300156183898517037522228401575926000326⟩,⟨101161183176986930571159309438269269015985632978,101161183176986930571159309438269269015985632982⟩⟩, + ⟨⟨-417049072621946218520604203384724580293597795299,-417049072621946218520604203384724580293597795294⟩,⟨1039506411083002444880314272604562716750899299311,1039506411083002444880314272604562716750899299316⟩⟩, + ⟨⟨-2188744603901860509603476473901813786406544503410,-2188744603901860509603476473901813786406544503401⟩,⟨-1242305736114406489122465816145811911879983821340,-1242305736114406489122465816145811911879983821330⟩⟩, + ⟨⟨2799344446230734374765596397494262028596471108920,2799344446230734374765596397494262028596471108931⟩,⟨-3831282745777563154261807381800218390821461663990,-3831282745777563154261807381800218390821461663979⟩⟩] +lemma tw1_1_3_19_calc (j : Fin 31) : taylorWaveBox 1 1 3 19 j = tw1_1_3_19 j := by + revert j + decide +kernel +def tw1_1_3_20 : Fin 31 → CI := ![⟨⟨-772475789165684988854507575612169652282823337105,-772475789165684988854507575612169652282823337102⟩,⟨236972498919938239943041843219087968627938167248,236972498919938239943041843219087968627938167251⟩⟩, + ⟨⟨-60462392279560459195925453924424895319126009173,-60462392279560459195925453924424895319126009171⟩,⟨-443685182477718578121853507575175650761636985186,-443685182477718578121853507575175650761636985183⟩⟩, + ⟨⟨208257919640881245940911645912119179947262984668,208257919640881245940911645912119179947262984670⟩,⟨10435798628344552592242805190644453248923374644,10435798628344552592242805190644453248923374646⟩⟩, + ⟨⟨-18475418477631794051910242032044155141735799386,-18475418477631794051910242032044155141735799384⟩,⟨77191847099594691938154961101102873785937531968,77191847099594691938154961101102873785937531969⟩⟩, + ⟨⟨-22250374795645875192819641046036942960948944484,-22250374795645875192819641046036942960948944482⟩,⟨-9016048367799392567918739212704027274377659914,-9016048367799392567918739212704027274377659913⟩⟩, + ⟨⟨2460236201085487530679114728309106016069708162,2460236201085487530679114728309106016069708163⟩,⟨-5052230851811385168447849226536595985158716774,-5052230851811385168447849226536595985158716773⟩⟩, + ⟨⟨927342022289383304012066029072811159969036442,927342022289383304012066029072811159969036443⟩,⟨366814808318327587909045695796387351272057013,366814808318327587909045695796387351272057014⟩⟩, + ⟨⟨-9992617830278289686687990494959136150454724,-9992617830278289686687990494959136150454723⟩,⟨132749847979090014061398591121879657348894334,132749847979090014061398591121879657348894335⟩⟩, + ⟨⟨-11560934566606179900274131689194839354330505,-11560934566606179900274131689194839354330504⟩,⟨7075028098165575432585698803736565589810068,7075028098165575432585698803736565589810069⟩⟩, + ⟨⟨-1102631583966185782063579329498382858313760,-1102631583966185782063579329498382858313759⟩,⟨39739028121765665092627728483660266844787,39739028121765665092627728483660266844788⟩⟩, + ⟨⟨-78599954505131855877813566782233867022927,-78599954505131855877813566782233867022926⟩,⟨5364400935198083889850055800664207732087,5364400935198083889850055800664207732088⟩⟩, + ⟨⟨-4225373465412505087683949816282960754000,-4225373465412505087683949816282960753999⟩,⟨3846394958098321805219731870332734529055,3846394958098321805219731870332734529056⟩⟩, + ⟨⟨255857906021497528907655237661479977036,255857906021497528907655237661479977037⟩,⟨445362052742120470443093186840634827528,445362052742120470443093186840634827529⟩⟩, + ⟨⟨41729111946340621385165287751801730961,41729111946340621385165287751801730962⟩,⟨-58889068236176531426143539486453701807,-58889068236176531426143539486453701806⟩⟩, + ⟨⟨-18776494446289609448435688660897868269,-18776494446289609448435688660897868268⟩,⟨6497241782342028469026131911638007902,6497241782342028469026131911638007903⟩⟩, + ⟨⟨12661419489102191918444430882053072767,12661419489102191918444430882053072768⟩,⟨-1,1⟩⟩, + ⟨⟨-18776494446289609448435688660897868269,-18776494446289609448435688660897868268⟩,⟨-6497241782342028469026131911638007903,-6497241782342028469026131911638007902⟩⟩, + ⟨⟨41729111946340621385165287751801730961,41729111946340621385165287751801730962⟩,⟨58889068236176531426143539486453701806,58889068236176531426143539486453701807⟩⟩, + ⟨⟨255857906021497528907655237661479977036,255857906021497528907655237661479977037⟩,⟨-445362052742120470443093186840634827529,-445362052742120470443093186840634827528⟩⟩, + ⟨⟨-4225373465412505087683949816282960754000,-4225373465412505087683949816282960753999⟩,⟨-3846394958098321805219731870332734529056,-3846394958098321805219731870332734529055⟩⟩, + ⟨⟨-78599954505131855877813566782233867022927,-78599954505131855877813566782233867022926⟩,⟨-5364400935198083889850055800664207732088,-5364400935198083889850055800664207732087⟩⟩, + ⟨⟨-1102631583966185782063579329498382858313760,-1102631583966185782063579329498382858313759⟩,⟨-39739028121765665092627728483660266844788,-39739028121765665092627728483660266844787⟩⟩, + ⟨⟨-11560934566606179900274131689194839354330505,-11560934566606179900274131689194839354330504⟩,⟨-7075028098165575432585698803736565589810069,-7075028098165575432585698803736565589810068⟩⟩, + ⟨⟨-9992617830278289686687990494959136150454724,-9992617830278289686687990494959136150454723⟩,⟨-132749847979090014061398591121879657348894335,-132749847979090014061398591121879657348894334⟩⟩, + ⟨⟨927342022289383304012066029072811159969036442,927342022289383304012066029072811159969036443⟩,⟨-366814808318327587909045695796387351272057014,-366814808318327587909045695796387351272057013⟩⟩, + ⟨⟨2460236201085487530679114728309106016069708162,2460236201085487530679114728309106016069708163⟩,⟨5052230851811385168447849226536595985158716773,5052230851811385168447849226536595985158716774⟩⟩, + ⟨⟨-22250374795645875192819641046036942960948944484,-22250374795645875192819641046036942960948944482⟩,⟨9016048367799392567918739212704027274377659913,9016048367799392567918739212704027274377659914⟩⟩, + ⟨⟨-18475418477631794051910242032044155141735799386,-18475418477631794051910242032044155141735799384⟩,⟨-77191847099594691938154961101102873785937531969,-77191847099594691938154961101102873785937531968⟩⟩, + ⟨⟨208257919640881245940911645912119179947262984668,208257919640881245940911645912119179947262984670⟩,⟨-10435798628344552592242805190644453248923374646,-10435798628344552592242805190644453248923374644⟩⟩, + ⟨⟨-60462392279560459195925453924424895319126009173,-60462392279560459195925453924424895319126009171⟩,⟨443685182477718578121853507575175650761636985183,443685182477718578121853507575175650761636985186⟩⟩, + ⟨⟨-772475789165684988854507575612169652282823337105,-772475789165684988854507575612169652282823337102⟩,⟨-236972498919938239943041843219087968627938167251,-236972498919938239943041843219087968627938167248⟩⟩] +lemma tw1_1_3_20_calc (j : Fin 31) : taylorWaveBox 1 1 3 20 j = tw1_1_3_20 j := by + revert j + decide +kernel +def tw1_1_3 : Fin 21 → Fin 31 → CI := ![tw1_1_3_0,tw1_1_3_1,tw1_1_3_2,tw1_1_3_3,tw1_1_3_4,tw1_1_3_5,tw1_1_3_6,tw1_1_3_7,tw1_1_3_8,tw1_1_3_9,tw1_1_3_10,tw1_1_3_11,tw1_1_3_12,tw1_1_3_13,tw1_1_3_14,tw1_1_3_15,tw1_1_3_16,tw1_1_3_17,tw1_1_3_18,tw1_1_3_19,tw1_1_3_20] +lemma tw1_1_3_mem (l : Fin 21) (j : Fin 31) : (tw1_1_3 l j).Mem (taylorWave 1 1 (nearNode 3) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 3 l j = tw1_1_3 l j := by + fin_cases l + · exact tw1_1_3_0_calc j + · exact tw1_1_3_1_calc j + · exact tw1_1_3_2_calc j + · exact tw1_1_3_3_calc j + · exact tw1_1_3_4_calc j + · exact tw1_1_3_5_calc j + · exact tw1_1_3_6_calc j + · exact tw1_1_3_7_calc j + · exact tw1_1_3_8_calc j + · exact tw1_1_3_9_calc j + · exact tw1_1_3_10_calc j + · exact tw1_1_3_11_calc j + · exact tw1_1_3_12_calc j + · exact tw1_1_3_13_calc j + · exact tw1_1_3_14_calc j + · exact tw1_1_3_15_calc j + · exact tw1_1_3_16_calc j + · exact tw1_1_3_17_calc j + · exact tw1_1_3_18_calc j + · exact tw1_1_3_19_calc j + · exact tw1_1_3_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 3 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave114.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave114.lean new file mode 100644 index 0000000000000000000000000000000000000000..f991f33f09c086318372baed5b0d949209fc068c --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave114.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_4_0 : Fin 31 → CI := ![⟨⟨-131067017905622720276338707577411866391206157604596973591,-131067017905622720276338707577411866391206157604469596654⟩,⟨-15205942216596138071871454164251440059407444471317549903,-15205942216596138071871454164251440059407444471190278930⟩⟩, + ⟨⟨-8944706451478870018318980352196708625414023494761655936,-8944706451478870018318980352196708625414023494734291664⟩,⟨-17025082375591482822440244648065065075790497839200084300,-17025082375591482822440244648065065075790497839172743858⟩⟩, + ⟨⟨897529190047392556182622661606720879166111264131112913,897529190047392556182622661606720879166111264134593405⟩,⟨-1962236377474274132756927800972935874441329988901622964,-1962236377474274132756927800972935874441329988898140872⟩⟩, + ⟨⟨170763154458481703942878096739961443955323265474806654,170763154458481703942878096739961443955323265475079120⟩,⟨-58396509357961868311048997099371720988804494086681467,-58396509357961868311048997099371720988804494086408862⟩⟩, + ⟨⟨10332357746058029888197051659579432809777844671603593,10332357746058029888197051659579432809777844671618674⟩,⟨3497351012495933166895546117475821083988780047405857,3497351012495933166895546117475821083988780047420934⟩⟩, + ⟨⟨338954038444245078392278444460630112234033036737053,338954038444245078392278444460630112234033036737858⟩,⟨317119165803929983331862669844114098930359259487455,317119165803929983331862669844114098930359259488254⟩⟩, + ⟨⟨9008617404573029706277438992557145733631006024412,9008617404573029706277438992557145733631006024505⟩,⟨10318664438539132150049794422707301248036816170499,10318664438539132150049794422707301248036816170601⟩⟩, + ⟨⟨245719978619229204116986193508650093611982328340,245719978619229204116986193508650093611982328442⟩,⟨138016069459006925558651422727739756204587720561,138016069459006925558651422727739756204587720651⟩⟩, + ⟨⟨3851614479511103625430495590176363387232608840,3851614479511103625430495590176363387232608955⟩,⟨-1677134854803006666388897513407307092930068086,-1677134854803006666388897513407307092930067970⟩⟩, + ⟨⟨-23567288283565598020336962580321265780324994,-23567288283565598020336962580321265780324836⟩,⟨-43520866673503591617279711625732829559838592,-43520866673503591617279711625732829559838445⟩⟩, + ⟨⟨-56205197213169294724864074292631600883651,-56205197213169294724864074292631600883482⟩,⟨533321568558502130618890126961324375129383,533321568558502130618890126961324375129552⟩⟩, + ⟨⟨-1951598615004930963849157547212092578058,-1951598615004930963849157547212092577853⟩,⟨-6412000615017912536339098641338399158868,-6412000615017912536339098641338399158665⟩⟩, + ⟨⟨128099171436933568696255936595858915705,128099171436933568696255936595858915896⟩,⟨-22377129147710651612341564341818320317,-22377129147710651612341564341818320128⟩⟩, + ⟨⟨4714604282511230398027618218431915510,4714604282511230398027618218431915733⟩,⟨2829456405981721881006968180868864130,2829456405981721881006968180868864344⟩⟩, + ⟨⟨621132887791418465953653541897318868,621132887791418465953653541897319035⟩,⟨326215316168912656323124120172755812,326215316168912656323124120172755995⟩⟩, + ⟨⟨342980316610080277029180137013222287,342980316610080277029180137013222513⟩,⟨-113,136⟩⟩, + ⟨⟨621132887791418465953653541897318868,621132887791418465953653541897319035⟩,⟨-326215316168912656323124120172755995,-326215316168912656323124120172755811⟩⟩, + ⟨⟨4714604282511230398027618218431915510,4714604282511230398027618218431915733⟩,⟨-2829456405981721881006968180868864343,-2829456405981721881006968180868864129⟩⟩, + ⟨⟨128099171436933568696255936595858915705,128099171436933568696255936595858915896⟩,⟨22377129147710651612341564341818320129,22377129147710651612341564341818320318⟩⟩, + ⟨⟨-1951598615004930963849157547212092578058,-1951598615004930963849157547212092577853⟩,⟨6412000615017912536339098641338399158666,6412000615017912536339098641338399158869⟩⟩, + ⟨⟨-56205197213169294724864074292631600883651,-56205197213169294724864074292631600883482⟩,⟨-533321568558502130618890126961324375129552,-533321568558502130618890126961324375129383⟩⟩, + ⟨⟨-23567288283565598020336962580321265780324994,-23567288283565598020336962580321265780324836⟩,⟨43520866673503591617279711625732829559838445,43520866673503591617279711625732829559838592⟩⟩, + ⟨⟨3851614479511103625430495590176363387232608840,3851614479511103625430495590176363387232608955⟩,⟨1677134854803006666388897513407307092930067971,1677134854803006666388897513407307092930068086⟩⟩, + ⟨⟨245719978619229204116986193508650093611982328340,245719978619229204116986193508650093611982328442⟩,⟨-138016069459006925558651422727739756204587720650,-138016069459006925558651422727739756204587720560⟩⟩, + ⟨⟨9008617404573029706277438992557145733631006024412,9008617404573029706277438992557145733631006024505⟩,⟨-10318664438539132150049794422707301248036816170601,-10318664438539132150049794422707301248036816170499⟩⟩, + ⟨⟨338954038444245078392278444460630112234033036737053,338954038444245078392278444460630112234033036737858⟩,⟨-317119165803929983331862669844114098930359259488253,-317119165803929983331862669844114098930359259487455⟩⟩, + ⟨⟨10332357746058029888197051659579432809777844671603593,10332357746058029888197051659579432809777844671618674⟩,⟨-3497351012495933166895546117475821083988780047420934,-3497351012495933166895546117475821083988780047405857⟩⟩, + ⟨⟨170763154458481703942878096739961443955323265474806654,170763154458481703942878096739961443955323265475079120⟩,⟨58396509357961868311048997099371720988804494086408862,58396509357961868311048997099371720988804494086681468⟩⟩, + ⟨⟨897529190047392556182622661606720879166111264131112913,897529190047392556182622661606720879166111264134593405⟩,⟨1962236377474274132756927800972935874441329988898140873,1962236377474274132756927800972935874441329988901622965⟩⟩, + ⟨⟨-8944706451478870018318980352196708625414023494761655936,-8944706451478870018318980352196708625414023494734291664⟩,⟨17025082375591482822440244648065065075790497839172743859,17025082375591482822440244648065065075790497839200084301⟩⟩, + ⟨⟨-131067017905622720276338707577411866391206157604596973591,-131067017905622720276338707577411866391206157604469596654⟩,⟨15205942216596138071871454164251440059407444471190278930,15205942216596138071871454164251440059407444471317549903⟩⟩] +lemma tw1_1_4_0_calc (j : Fin 31) : taylorWaveBox 1 1 4 0 j = tw1_1_4_0 j := by + revert j + decide +kernel +def tw1_1_4_1 : Fin 31 → CI := ![⟨⟨71498126642085283297809903907338809022551925691481453433,71498126642085283297809903907338809022551925691638835291⟩,⟨-148448548677542099795772533427020821236584474498202529537,-148448548677542099795772533427020821236584474498045050431⟩⟩, + ⟨⟨24960289514047462194062651117599496822031056587070812748,24960289514047462194062651117599496822031056587104406418⟩,⟨-2578541715602566588207363246296354375631397961652482306,-2578541715602566588207363246296354375631397961618870563⟩⟩, + ⟨⟨1920662864766199056216870438012479043976095812059178285,1920662864766199056216870438012479043976095812063362142⟩,⟨2233663775218787990737536064453231875005587263934142064,2233663775218787990737536064453231875005587263938325125⟩⟩, + ⟨⟨-40273569387587836422361753451516974101438036591911049,-40273569387587836422361753451516974101438036591598850⟩,⟨254984224091417433718049371365035345907169439102611856,254984224091417433718049371365035345907169439102924036⟩⟩, + ⟨⟨-12522225044353772656122251527592357866301607019650053,-12522225044353772656122251527592357866301607019632106⟩,⟨10536716910535108896297110724020690860642273385970547,10536716910535108896297110724020690860642273385988508⟩⟩, + ⟨⟨-714904822272512971999534122536368954814719108668855,-714904822272512971999534122536368954814719108667659⟩,⟨152601823369207315917991620569036665435969211571811,152601823369207315917991620569036665435969211573019⟩⟩, + ⟨⟨-22634686493523832537557870858175344631683091964174,-22634686493523832537557870858175344631683091963991⟩,⟨921183267838082402945385873501225539482740243824,921183267838082402945385873501225539482740243998⟩⟩, + ⟨⟨-466384240390659218398743335400665184657915358661,-466384240390659218398743335400665184657915358446⟩,⟨148137656812650457997486814081300451014089162305,148137656812650457997486814081300451014089162524⟩⟩, + ⟨⟨-3130051937669699741909723227187279536289172434,-3130051937669699741909723227187279536289172166⟩,⟨6981138133811122698636635454680469785117509394,6981138133811122698636635454680469785117509661⟩⟩, + ⟨⟨86031081058458102245997431690214892319542716,86031081058458102245997431690214892319543031⟩,⟨38749971000588538816949288492430512564377315,38749971000588538816949288492430512564377612⟩⟩, + ⟨⟨-466023561884913553436552573357338019481214,-466023561884913553436552573357338019480941⟩,⟨-959677558703624295824761034218996369816072,-959677558703624295824761034218996369815800⟩⟩, + ⟨⟨9455187286541458340592310947291829450676,9455187286541458340592310947291829451044⟩,⟨10119387322450593052543723449184233209156,10119387322450593052543723449184233209494⟩⟩, + ⟨⟨-240500431838707136905820138593448452672,-240500431838707136905820138593448452290⟩,⟨138198111782609826903890666493711166166,138198111782609826903890666493711166563⟩⟩, + ⟨⟨-11460867213848065633754629234847552279,-11460867213848065633754629234847551779⟩,⟨-3605030497698580664174091374225011740,-3605030497698580664174091374225011245⟩⟩, + ⟨⟨-1453942393196803796558725745642696470,-1453942393196803796558725745642696072⟩,⟨-555003208412883394675440293622418830,-555003208412883394675440293622418404⟩⟩, + ⟨⟨-764717762295196789011672536914365933,-764717762295196789011672536914365433⟩,⟨-300,250⟩⟩, + ⟨⟨-1453942393196803796558725745642696470,-1453942393196803796558725745642696072⟩,⟨555003208412883394675440293622418404,555003208412883394675440293622418830⟩⟩, + ⟨⟨-11460867213848065633754629234847552279,-11460867213848065633754629234847551779⟩,⟨3605030497698580664174091374225011245,3605030497698580664174091374225011740⟩⟩, + ⟨⟨-240500431838707136905820138593448452672,-240500431838707136905820138593448452290⟩,⟨-138198111782609826903890666493711166563,-138198111782609826903890666493711166165⟩⟩, + ⟨⟨9455187286541458340592310947291829450676,9455187286541458340592310947291829451044⟩,⟨-10119387322450593052543723449184233209494,-10119387322450593052543723449184233209156⟩⟩, + ⟨⟨-466023561884913553436552573357338019481214,-466023561884913553436552573357338019480941⟩,⟨959677558703624295824761034218996369815800,959677558703624295824761034218996369816073⟩⟩, + ⟨⟨86031081058458102245997431690214892319542716,86031081058458102245997431690214892319543031⟩,⟨-38749971000588538816949288492430512564377612,-38749971000588538816949288492430512564377315⟩⟩, + ⟨⟨-3130051937669699741909723227187279536289172434,-3130051937669699741909723227187279536289172166⟩,⟨-6981138133811122698636635454680469785117509661,-6981138133811122698636635454680469785117509394⟩⟩, + ⟨⟨-466384240390659218398743335400665184657915358661,-466384240390659218398743335400665184657915358446⟩,⟨-148137656812650457997486814081300451014089162524,-148137656812650457997486814081300451014089162305⟩⟩, + ⟨⟨-22634686493523832537557870858175344631683091964174,-22634686493523832537557870858175344631683091963991⟩,⟨-921183267838082402945385873501225539482740243998,-921183267838082402945385873501225539482740243823⟩⟩, + ⟨⟨-714904822272512971999534122536368954814719108668855,-714904822272512971999534122536368954814719108667659⟩,⟨-152601823369207315917991620569036665435969211573019,-152601823369207315917991620569036665435969211571810⟩⟩, + ⟨⟨-12522225044353772656122251527592357866301607019650053,-12522225044353772656122251527592357866301607019632106⟩,⟨-10536716910535108896297110724020690860642273385988508,-10536716910535108896297110724020690860642273385970547⟩⟩, + ⟨⟨-40273569387587836422361753451516974101438036591911049,-40273569387587836422361753451516974101438036591598850⟩,⟨-254984224091417433718049371365035345907169439102924036,-254984224091417433718049371365035345907169439102611856⟩⟩, + ⟨⟨1920662864766199056216870438012479043976095812059178285,1920662864766199056216870438012479043976095812063362142⟩,⟨-2233663775218787990737536064453231875005587263938325124,-2233663775218787990737536064453231875005587263934142063⟩⟩, + ⟨⟨24960289514047462194062651117599496822031056587070812748,24960289514047462194062651117599496822031056587104406418⟩,⟨2578541715602566588207363246296354375631397961618870563,2578541715602566588207363246296354375631397961652482307⟩⟩, + ⟨⟨71498126642085283297809903907338809022551925691481453433,71498126642085283297809903907338809022551925691638835291⟩,⟨148448548677542099795772533427020821236584474498045050431,148448548677542099795772533427020821236584474498202529537⟩⟩] +lemma tw1_1_4_1_calc (j : Fin 31) : taylorWaveBox 1 1 4 1 j = tw1_1_4_1 j := by + revert j + decide +kernel +def tw1_1_4_2 : Fin 31 → CI := ![⟨⟨109468332767072219276283346383277204569567197693332482009,109468332767072219276283346383277204569567197693462693242⟩,⟨108769702591640340315948048898367614817288978789118013015,108769702591640340315948048898367614817288978789248200915⟩⟩, + ⟨⟨-6735734379684912578481594457649801701723634491397159365,-6735734379684912578481594457649801701723634491370949872⟩,⟨23613760321620235686062951143551269093573518778716097875,23613760321620235686062951143551269093573518778742311249⟩⟩, + ⟨⟨-2900092430819327965329655025568679074840869292031312189,-2900092430819327965329655025568679074840869292027319071⟩,⟨829505870804612486948618126292368945271957108775531966,829505870804612486948618126292368945271957108779523882⟩⟩, + ⟨⟨-221663475006163338139334913574578577133645523091707354,-221663475006163338139334913574578577133645523091313212⟩,⟨-166008062716697208059022084229017547693304676883182781,-166008062716697208059022084229017547693304676882788856⟩⟩, + ⟨⟨-2835444275028637386290254799531412608172299575325387,-2835444275028637386290254799531412608172299575298820⟩,⟨-18195088796565359891159204346340537831117956459893768,-18195088796565359891159204346340537831117956459867204⟩⟩, + ⟨⟨334698168536257809382219524059660104389294382590995,334698168536257809382219524059660104389294382592641⟩,⟨-795927596443241616261795375974940978819963020693119,-795927596443241616261795375974940978819963020691471⟩⟩, + ⟨⟨16698136872064198993149517397508227964138979583870,16698136872064198993149517397508227964138979584096⟩,⟨-22598197225489659188470254471481847032398750618250,-22598197225489659188470254471481847032398750618037⟩⟩, + ⟨⟨273691146557846305709913671630906745626770361709,273691146557846305709913671630906745626770361921⟩,⟨-575481814327763106349478653378820338957778674519,-575481814327763106349478653378820338957778674280⟩⟩, + ⟨⟨-3258907406414346258555106476261024618325633112,-3258907406414346258555106476261024618325632807⟩,⟨-9928982980415115619988518493024702751618188245,-9928982980415115619988518493024702751618187940⟩⟩, + ⟨⟨-131419521893691882038277551305138753021410867,-131419521893691882038277551305138753021410416⟩,⟨30505785720179563323461107097202328576907214,30505785720179563323461107097202328576907681⟩⟩, + ⟨⟨1347212330518376407216733378534393238282601,1347212330518376407216733378534393238283122⟩,⟨847766121353087406898483733384146481399966,847766121353087406898483733384146481400486⟩⟩, + ⟨⟨-20061820228229016133350143164673975961335,-20061820228229016133350143164673975960749⟩,⟨-7626901239840563642461419174848624725942,-7626901239840563642461419174848624725401⟩⟩, + ⟨⟨286082992782041525428939004750260285572,286082992782041525428939004750260286072⟩,⟨-339216419440021344229367182140859830005,-339216419440021344229367182140859829449⟩⟩, + ⟨⟨19642389434517006487072207153844314710,19642389434517006487072207153844315508⟩,⟨1357034176430263471061390907357574050,1357034176430263471061390907357574865⟩⟩, + ⟨⟨2511349640827077116027446326860837801,2511349640827077116027446326860838500⟩,⟨629773966574874471313787402659345897,629773966574874471313787402659346631⟩⟩, + ⟨⟨1278775838544547573953966398193193652,1278775838544547573953966398193194487⟩,⟨-418,501⟩⟩, + ⟨⟨2511349640827077116027446326860837801,2511349640827077116027446326860838500⟩,⟨-629773966574874471313787402659346631,-629773966574874471313787402659345897⟩⟩, + ⟨⟨19642389434517006487072207153844314710,19642389434517006487072207153844315508⟩,⟨-1357034176430263471061390907357574865,-1357034176430263471061390907357574050⟩⟩, + ⟨⟨286082992782041525428939004750260285572,286082992782041525428939004750260286072⟩,⟨339216419440021344229367182140859829449,339216419440021344229367182140859830005⟩⟩, + ⟨⟨-20061820228229016133350143164673975961335,-20061820228229016133350143164673975960749⟩,⟨7626901239840563642461419174848624725401,7626901239840563642461419174848624725942⟩⟩, + ⟨⟨1347212330518376407216733378534393238282601,1347212330518376407216733378534393238283122⟩,⟨-847766121353087406898483733384146481400486,-847766121353087406898483733384146481399966⟩⟩, + ⟨⟨-131419521893691882038277551305138753021410867,-131419521893691882038277551305138753021410416⟩,⟨-30505785720179563323461107097202328576907681,-30505785720179563323461107097202328576907214⟩⟩, + ⟨⟨-3258907406414346258555106476261024618325633112,-3258907406414346258555106476261024618325632807⟩,⟨9928982980415115619988518493024702751618187940,9928982980415115619988518493024702751618188245⟩⟩, + ⟨⟨273691146557846305709913671630906745626770361709,273691146557846305709913671630906745626770361921⟩,⟨575481814327763106349478653378820338957778674280,575481814327763106349478653378820338957778674519⟩⟩, + ⟨⟨16698136872064198993149517397508227964138979583870,16698136872064198993149517397508227964138979584096⟩,⟨22598197225489659188470254471481847032398750618037,22598197225489659188470254471481847032398750618251⟩⟩, + ⟨⟨334698168536257809382219524059660104389294382590995,334698168536257809382219524059660104389294382592641⟩,⟨795927596443241616261795375974940978819963020691471,795927596443241616261795375974940978819963020693119⟩⟩, + ⟨⟨-2835444275028637386290254799531412608172299575325387,-2835444275028637386290254799531412608172299575298820⟩,⟨18195088796565359891159204346340537831117956459867204,18195088796565359891159204346340537831117956459893768⟩⟩, + ⟨⟨-221663475006163338139334913574578577133645523091707354,-221663475006163338139334913574578577133645523091313212⟩,⟨166008062716697208059022084229017547693304676882788856,166008062716697208059022084229017547693304676883182781⟩⟩, + ⟨⟨-2900092430819327965329655025568679074840869292031312189,-2900092430819327965329655025568679074840869292027319071⟩,⟨-829505870804612486948618126292368945271957108779523882,-829505870804612486948618126292368945271957108775531966⟩⟩, + ⟨⟨-6735734379684912578481594457649801701723634491397159365,-6735734379684912578481594457649801701723634491370949872⟩,⟨-23613760321620235686062951143551269093573518778742311249,-23613760321620235686062951143551269093573518778716097875⟩⟩, + ⟨⟨109468332767072219276283346383277204569567197693332482009,109468332767072219276283346383277204569567197693462693242⟩,⟨-108769702591640340315948048898367614817288978789248200915,-108769702591640340315948048898367614817288978789118013015⟩⟩] +lemma tw1_1_4_2_calc (j : Fin 31) : taylorWaveBox 1 1 4 2 j = tw1_1_4_2 j := by + revert j + decide +kernel +def tw1_1_4_3 : Fin 31 → CI := ![⟨⟨-103847964786406239806705631975478370287900934015012372387,-103847964786406239806705631975478370287900934014922912663⟩,⟨50838550774635267133266139797244020845886838607552032241,50838550774635267133266139797244020845886838607641446014⟩⟩, + ⟨⟨-15202221968238128648217588377098153900912850646190214635,-15202221968238128648217588377098153900912850646165173255⟩,⟨-11766257395405158374045801439093238685313819771186825215,-11766257395405158374045801439093238685313819771161805893⟩⟩, + ⟨⟨376616023182741044003683887918853396241239052195891532,376616023182741044003683887918853396241239052199872122⟩,⟨-2442002482463903776809284950371017097229692041749431658,-2442002482463903776809284950371017097229692041745449028⟩⟩, + ⟨⟨214851480584374121184025223675131476581845267814735963,214851480584374121184025223675131476581845267815105945⟩,⟨-101628449821020535588447290010025298509558585991508581,-101628449821020535588447290010025298509558585991138396⟩⟩, + ⟨⟨15329662154098978430129783062654627624348351165208884,15329662154098978430129783062654627624348351165231798⟩,⟨6307062330629615986661726756641429250481966454609777,6307062330629615986661726756641429250481966454632683⟩⟩, + ⟨⟨436399906929344824611639344652862477515827620304513,436399906929344824611639344652862477515827620305746⟩,⟨689362024522671600378170498538062841595311179856752,689362024522671600378170498538062841595311179857968⟩⟩, + ⟨⟨7097201181552957804192441037490156453222377269004,7097201181552957804192441037490156453222377269194⟩,⟨26962789508242016336638101318151513363795663763831,26962789508242016336638101318151513363795663764040⟩⟩, + ⟨⟨243404697042831333553276957683123743614701104019,243404697042831333553276957683123743614701104313⟩,⟨617654330202739953905378481762089809471281371409,617654330202739953905378481762089809471281371696⟩⟩, + ⟨⟨9937812249985659369610542133263697415907218701,9937812249985659369610542133263697415907219092⟩,⟨5624514397444187924579753594522701967363207528,5624514397444187924579753594522701967363207919⟩⟩, + ⟨⟨98402754815220420962989198940666274998491994,98402754815220420962989198940666274998492396⟩,⟨-118882536503964492977441797431946311299945695,-118882536503964492977441797431946311299945248⟩⟩, + ⟨⟨-1899927968860865137000106341365329312511554,-1899927968860865137000106341365329312510985⟩,⟨-8744880723571638763006554854393649785780,-8744880723571638763006554854393649785211⟩⟩, + ⟨⟨26494796571981157770808221359841459829703,26494796571981157770808221359841459830515⟩,⟨-2463819416792680957364157918771208409276,-2463819416792680957364157918771208408472⟩⟩, + ⟨⟨-195813378144157659328877063649855456176,-195813378144157659328877063649855455539⟩,⟨533094420900761343177072404334936033190,533094420900761343177072404334936033900⟩⟩, + ⟨⟨-25454937584913545933259130778886659990,-25454937584913545933259130778886659028⟩,⟨4285643953736034689017183444140773269,4285643953736034689017183444140774285⟩⟩, + ⟨⟨-3418280789764118238664032913617738273,-3418280789764118238664032913617737305⟩,⟨-435626196061499683308244777260512941,-435626196061499683308244777260511944⟩⟩, + ⟨⟨-1710714960078632357763833883633282060,-1710714960078632357763833883633280944⟩,⟨-670,558⟩⟩, + ⟨⟨-3418280789764118238664032913617738273,-3418280789764118238664032913617737305⟩,⟨435626196061499683308244777260511944,435626196061499683308244777260512941⟩⟩, + ⟨⟨-25454937584913545933259130778886659990,-25454937584913545933259130778886659028⟩,⟨-4285643953736034689017183444140774285,-4285643953736034689017183444140773269⟩⟩, + ⟨⟨-195813378144157659328877063649855456176,-195813378144157659328877063649855455539⟩,⟨-533094420900761343177072404334936033900,-533094420900761343177072404334936033190⟩⟩, + ⟨⟨26494796571981157770808221359841459829703,26494796571981157770808221359841459830515⟩,⟨2463819416792680957364157918771208408472,2463819416792680957364157918771208409276⟩⟩, + ⟨⟨-1899927968860865137000106341365329312511554,-1899927968860865137000106341365329312510985⟩,⟨8744880723571638763006554854393649785211,8744880723571638763006554854393649785780⟩⟩, + ⟨⟨98402754815220420962989198940666274998491994,98402754815220420962989198940666274998492396⟩,⟨118882536503964492977441797431946311299945248,118882536503964492977441797431946311299945695⟩⟩, + ⟨⟨9937812249985659369610542133263697415907218701,9937812249985659369610542133263697415907219092⟩,⟨-5624514397444187924579753594522701967363207919,-5624514397444187924579753594522701967363207528⟩⟩, + ⟨⟨243404697042831333553276957683123743614701104019,243404697042831333553276957683123743614701104313⟩,⟨-617654330202739953905378481762089809471281371696,-617654330202739953905378481762089809471281371409⟩⟩, + ⟨⟨7097201181552957804192441037490156453222377269004,7097201181552957804192441037490156453222377269194⟩,⟨-26962789508242016336638101318151513363795663764040,-26962789508242016336638101318151513363795663763831⟩⟩, + ⟨⟨436399906929344824611639344652862477515827620304513,436399906929344824611639344652862477515827620305746⟩,⟨-689362024522671600378170498538062841595311179857968,-689362024522671600378170498538062841595311179856752⟩⟩, + ⟨⟨15329662154098978430129783062654627624348351165208884,15329662154098978430129783062654627624348351165231798⟩,⟨-6307062330629615986661726756641429250481966454632683,-6307062330629615986661726756641429250481966454609777⟩⟩, + ⟨⟨214851480584374121184025223675131476581845267814735963,214851480584374121184025223675131476581845267815105945⟩,⟨101628449821020535588447290010025298509558585991138396,101628449821020535588447290010025298509558585991508581⟩⟩, + ⟨⟨376616023182741044003683887918853396241239052195891532,376616023182741044003683887918853396241239052199872122⟩,⟨2442002482463903776809284950371017097229692041745449028,2442002482463903776809284950371017097229692041749431658⟩⟩, + ⟨⟨-15202221968238128648217588377098153900912850646190214635,-15202221968238128648217588377098153900912850646165173255⟩,⟨11766257395405158374045801439093238685313819771161805893,11766257395405158374045801439093238685313819771186825215⟩⟩, + ⟨⟨-103847964786406239806705631975478370287900934015012372387,-103847964786406239806705631975478370287900934014922912663⟩,⟨-50838550774635267133266139797244020845886838607641446014,-50838550774635267133266139797244020845886838607552032241⟩⟩] +lemma tw1_1_4_3_calc (j : Fin 31) : taylorWaveBox 1 1 4 3 j = tw1_1_4_3 j := by + revert j + decide +kernel +def tw1_1_4_4 : Fin 31 → CI := ![⟨⟨-8778807777349734109209526645249127266009439021287000288,-8778807777349734109209526645249127266009439021218857086⟩,⟨-71657847297568162808134638708758616347197723480688053646,-71657847297568162808134638708758616347197723480619850965⟩⟩, + ⟨⟨10812397717498325031460976666747033596916081744625562805,10812397717498325031460976666747033596916081744643772299⟩,⟨-6354277621160799019027693556339674673970821479506551161,-6354277621160799019027693556339674673970821479488325077⟩⟩, + ⟨⟨1406551392312821150794062908893530712350899087498541957,1406551392312821150794062908893530712350899087501264133⟩,⟨930857024211847017099878271935876330128091499326859274,930857024211847017099878271935876330128091499329580424⟩⟩, + ⟨⟨-7532669583177123207307357500049714148756530624017851,-7532669583177123207307357500049714148756530623789715⟩,⟨169816830397715766178544709283994722672386902493889529,169816830397715766178544709283994722672386902494117622⟩⟩, + ⟨⟨-10006662833829498559763408373530205768871530844919025,-10006662833829498559763408373530205768871530844904146⟩,⟨7381639559681756320871647726718008787958783024730891,7381639559681756320871647726718008787958783024745780⟩⟩, + ⟨⟨-641834682135701016041364097371099065345755039901510,-641834682135701016041364097371099065345755039900308⟩,⟨-28258486356068068725585954141583765966971290817744,-28258486356068068725585954141583765966971290816537⟩⟩, + ⟨⟨-21054423832041995209167555403160375499406646123195,-21054423832041995209167555403160375499406646123006⟩,⟨-9393749783837170373780866339341461445597190602468,-9393749783837170373780866339341461445597190602275⟩⟩, + ⟨⟨-536078933804554049749469559835941901889374699670,-536078933804554049749469559835941901889374699445⟩,⟨-211687771576640499430168383697050977509576216623,-211687771576640499430168383697050977509576216419⟩⟩, + ⟨⟨-10139341280607582307343049693268635472946261433,-10139341280607582307343049693268635472946261112⟩,⟨2305803532316873499757908336589837858228542875,2305803532316873499757908336589837858228543196⟩⟩, + ⟨⟨-5902604529230236674084803860213655473216630,-5902604529230236674084803860213655473216114⟩,⟨146988955306693141326773988152809480895277251,146988955306693141326773988152809480895277768⟩⟩, + ⟨⟨1608700608836648472938187831866554364723420,1608700608836648472938187831866554364723940⟩,⟨-991759630500052111641787652915999361497771,-991759630500052111641787652915999361497252⟩⟩, + ⟨⟨-23455008212630224553311453531370508600400,-23455008212630224553311453531370508599643⟩,⟨14339992666398655554493767689790433720887,14339992666398655554493767689790433721685⟩⟩, + ⟨⟨2060990244785034368322617841871164442,2060990244785034368322617841871165271⟩,⟨-605695718903904217617869570979061363046,-605695718903904217617869570979061362181⟩⟩, + ⟨⟨25947048444427144013714248517782422577,25947048444427144013714248517782423477⟩,⟨-11049013724253014008414332172592840813,-11049013724253014008414332172592839822⟩⟩, + ⟨⟨3821792740514577959293039841597579349,3821792740514577959293039841597580450⟩,⟨29846709123621538364689929538167581,29846709123621538364689929538168694⟩⟩, + ⟨⟨1907127104444745131321719455229177012,1907127104444745131321719455229178257⟩,⟨-622,747⟩⟩, + ⟨⟨3821792740514577959293039841597579349,3821792740514577959293039841597580450⟩,⟨-29846709123621538364689929538168694,-29846709123621538364689929538167581⟩⟩, + ⟨⟨25947048444427144013714248517782422577,25947048444427144013714248517782423477⟩,⟨11049013724253014008414332172592839822,11049013724253014008414332172592840813⟩⟩, + ⟨⟨2060990244785034368322617841871164442,2060990244785034368322617841871165271⟩,⟨605695718903904217617869570979061362181,605695718903904217617869570979061363046⟩⟩, + ⟨⟨-23455008212630224553311453531370508600400,-23455008212630224553311453531370508599643⟩,⟨-14339992666398655554493767689790433721685,-14339992666398655554493767689790433720887⟩⟩, + ⟨⟨1608700608836648472938187831866554364723420,1608700608836648472938187831866554364723940⟩,⟨991759630500052111641787652915999361497252,991759630500052111641787652915999361497771⟩⟩, + ⟨⟨-5902604529230236674084803860213655473216630,-5902604529230236674084803860213655473216114⟩,⟨-146988955306693141326773988152809480895277768,-146988955306693141326773988152809480895277251⟩⟩, + ⟨⟨-10139341280607582307343049693268635472946261433,-10139341280607582307343049693268635472946261112⟩,⟨-2305803532316873499757908336589837858228543196,-2305803532316873499757908336589837858228542875⟩⟩, + ⟨⟨-536078933804554049749469559835941901889374699670,-536078933804554049749469559835941901889374699445⟩,⟨211687771576640499430168383697050977509576216419,211687771576640499430168383697050977509576216623⟩⟩, + ⟨⟨-21054423832041995209167555403160375499406646123195,-21054423832041995209167555403160375499406646123006⟩,⟨9393749783837170373780866339341461445597190602275,9393749783837170373780866339341461445597190602468⟩⟩, + ⟨⟨-641834682135701016041364097371099065345755039901510,-641834682135701016041364097371099065345755039900308⟩,⟨28258486356068068725585954141583765966971290816537,28258486356068068725585954141583765966971290817744⟩⟩, + ⟨⟨-10006662833829498559763408373530205768871530844919025,-10006662833829498559763408373530205768871530844904146⟩,⟨-7381639559681756320871647726718008787958783024745780,-7381639559681756320871647726718008787958783024730891⟩⟩, + ⟨⟨-7532669583177123207307357500049714148756530624017851,-7532669583177123207307357500049714148756530623789715⟩,⟨-169816830397715766178544709283994722672386902494117622,-169816830397715766178544709283994722672386902493889529⟩⟩, + ⟨⟨1406551392312821150794062908893530712350899087498541957,1406551392312821150794062908893530712350899087501264133⟩,⟨-930857024211847017099878271935876330128091499329580424,-930857024211847017099878271935876330128091499326859274⟩⟩, + ⟨⟨10812397717498325031460976666747033596916081744625562805,10812397717498325031460976666747033596916081744643772299⟩,⟨6354277621160799019027693556339674673970821479488325077,6354277621160799019027693556339674673970821479506551161⟩⟩, + ⟨⟨-8778807777349734109209526645249127266009439021287000288,-8778807777349734109209526645249127266009439021218857086⟩,⟨71657847297568162808134638708758616347197723480619850965,71657847297568162808134638708758616347197723480688053646⟩⟩] +lemma tw1_1_4_4_calc (j : Fin 31) : taylorWaveBox 1 1 4 4 j = tw1_1_4_4 j := by + revert j + decide +kernel +def tw1_1_4_5 : Fin 31 → CI := ![⟨⟨37776350220420106698304863211375720990887266257961837068,37776350220420106698304863211375720990887266258001231552⟩,⟨8108857841893139797880124614641481425642510747122787722,8108857841893139797880124614641481425642510747162150613⟩⟩, + ⟨⟨1051522601662965588474696131037188269116507288773111503,1051522601662965588474696131037188269116507288782966189⟩,⟨6933688702992583473697012375934417786758822874000110524,6933688702992583473697012375934417786758822874009959304⟩⟩, + ⟨⟨-838982322058576402998508069311523545565650790165061465,-838982322058576402998508069311523545565650790163745898⟩,⟨519665519327226284990572976426268954860715904075080380,519665519327226284990572976426268954860715904076395985⟩⟩, + ⟨⟨-89882331501202646093927289353712570152910225455078310,-89882331501202646093927289353712570152910225454933370⟩,⟨-52722335566263347596170219171573638658063431518495591,-52722335566263347596170219171573638658063431518350712⟩⟩, + ⟨⟨-723801434667982736263529878779259710391444753974156,-723801434667982736263529878779259710391444753962059⟩,⟨-7962448458065236506727303595347951647172629742560179,-7962448458065236506727303595347951647172629742548084⟩⟩, + ⟨⟨263238667378436604713336653511312189940828347618081,263238667378436604713336653511312189940828347618890⟩,⟨-344579052616255022488988416320184611037140824759824,-344579052616255022488988416320184611037140824759011⟩⟩, + ⟨⟨14538433635284685921740530991761888203818381261544,14538433635284685921740530991761888203818381261652⟩,⟨-7460027448660577525228573791888575536558092585619,-7460027448660577525228573791888575536558092585525⟩⟩, + ⟨⟨387450360781569551096839280087680300228820529073,387450360781569551096839280087680300228820529255⟩,⟨-183936169268567878906705916377783650671730228855,-183936169268567878906705916377783650671730228666⟩⟩, + ⟨⟨4639767516755818627197757084450522920828781270,4639767516755818627197757084450522920828781542⟩,⟨-6658939326473882593806886391159699587958757390,-6658939326473882593806886391159699587958757118⟩⟩, + ⟨⟨-68969306240714905715385452744222304739925723,-68969306240714905715385452744222304739925366⟩,⟨-98438206002189901444972478753556705498183054,-98438206002189901444972478753556705498182730⟩⟩, + ⟨⟨-717144465915678379929236405520098064259439,-717144465915678379929236405520098064258909⟩,⟨1442854042820654355918196988642514658420193,1442854042820654355918196988642514658420724⟩⟩, + ⟨⟨13055951286468796821228604781277135400129,13055951286468796821228604781277135400646⟩,⟨-20548310817880813743564794213110894030876,-20548310817880813743564794213110894030292⟩⟩, + ⟨⟨187371753550294966010340685628521039393,187371753550294966010340685628521040198⟩,⟨521041191325567862249050743349965737884,521041191325567862249050743349965738678⟩⟩, + ⟨⟨-21208914591769856954056985896234283004,-21208914591769856954056985896234282217⟩,⟨15736573851304345437185488441277944948,15736573851304345437185488441277945830⟩⟩, + ⟨⟨-3610939440739098823613090860009618776,-3610939440739098823613090860009617719⟩,⟨402972974987639176655676733999992806,402972974987639176655676733999993856⟩⟩, + ⟨⟨-1822362768475277065333081910924535263,-1822362768475277065333081910924534073⟩,⟨-714,595⟩⟩, + ⟨⟨-3610939440739098823613090860009618776,-3610939440739098823613090860009617719⟩,⟨-402972974987639176655676733999993856,-402972974987639176655676733999992806⟩⟩, + ⟨⟨-21208914591769856954056985896234283004,-21208914591769856954056985896234282217⟩,⟨-15736573851304345437185488441277945830,-15736573851304345437185488441277944948⟩⟩, + ⟨⟨187371753550294966010340685628521039393,187371753550294966010340685628521040198⟩,⟨-521041191325567862249050743349965738678,-521041191325567862249050743349965737884⟩⟩, + ⟨⟨13055951286468796821228604781277135400129,13055951286468796821228604781277135400646⟩,⟨20548310817880813743564794213110894030292,20548310817880813743564794213110894030876⟩⟩, + ⟨⟨-717144465915678379929236405520098064259439,-717144465915678379929236405520098064258909⟩,⟨-1442854042820654355918196988642514658420724,-1442854042820654355918196988642514658420193⟩⟩, + ⟨⟨-68969306240714905715385452744222304739925723,-68969306240714905715385452744222304739925366⟩,⟨98438206002189901444972478753556705498182730,98438206002189901444972478753556705498183054⟩⟩, + ⟨⟨4639767516755818627197757084450522920828781270,4639767516755818627197757084450522920828781542⟩,⟨6658939326473882593806886391159699587958757118,6658939326473882593806886391159699587958757390⟩⟩, + ⟨⟨387450360781569551096839280087680300228820529073,387450360781569551096839280087680300228820529255⟩,⟨183936169268567878906705916377783650671730228666,183936169268567878906705916377783650671730228855⟩⟩, + ⟨⟨14538433635284685921740530991761888203818381261544,14538433635284685921740530991761888203818381261652⟩,⟨7460027448660577525228573791888575536558092585525,7460027448660577525228573791888575536558092585619⟩⟩, + ⟨⟨263238667378436604713336653511312189940828347618081,263238667378436604713336653511312189940828347618890⟩,⟨344579052616255022488988416320184611037140824759011,344579052616255022488988416320184611037140824759824⟩⟩, + ⟨⟨-723801434667982736263529878779259710391444753974156,-723801434667982736263529878779259710391444753962059⟩,⟨7962448458065236506727303595347951647172629742548084,7962448458065236506727303595347951647172629742560179⟩⟩, + ⟨⟨-89882331501202646093927289353712570152910225455078310,-89882331501202646093927289353712570152910225454933370⟩,⟨52722335566263347596170219171573638658063431518350712,52722335566263347596170219171573638658063431518495591⟩⟩, + ⟨⟨-838982322058576402998508069311523545565650790165061465,-838982322058576402998508069311523545565650790163745898⟩,⟨-519665519327226284990572976426268954860715904076395985,-519665519327226284990572976426268954860715904075080380⟩⟩, + ⟨⟨1051522601662965588474696131037188269116507288773111503,1051522601662965588474696131037188269116507288782966189⟩,⟨-6933688702992583473697012375934417786758822874009959304,-6933688702992583473697012375934417786758822874000110524⟩⟩, + ⟨⟨37776350220420106698304863211375720990887266257961837068,37776350220420106698304863211375720990887266258001231552⟩,⟨-8108857841893139797880124614641481425642510747162150613,-8108857841893139797880124614641481425642510747122787722⟩⟩] +lemma tw1_1_4_5_calc (j : Fin 31) : taylorWaveBox 1 1 4 5 j = tw1_1_4_5 j := by + revert j + decide +kernel +def tw1_1_4_6 : Fin 31 → CI := ![⟨⟨-9376602027921131805602219018598351716130515340683622840,-9376602027921131805602219018598351716130515340665676580⟩,⟨15473829216554340884006451512214309873137891088864303502,15473829216554340884006451512214309873137891088882258995⟩⟩, + ⟨⟨-3340782588884355112112009211166914156388946973589165639,-3340782588884355112112009211166914156388946973585156650⟩,⟨-783279721189374252842555201553634728375603156901916861,-783279721189374252842555201553634728375603156897907938⟩⟩, + ⟨⟨-61966751306812496278465962230520781670583801045658353,-61966751306812496278465962230520781670583801044888909⟩,⟨-501439648992744073913088782806494464044955628190561411,-501439648992744073913088782806494464044955628189791640⟩⟩, + ⟨⟨47529759690914851700747843873969076347790750729696470,47529759690914851700747843873969076347790750729787060⟩,⟨-29412963402305769484749802259167603443115305123703639,-29412963402305769484749802259167603443115305123612998⟩⟩, + ⟨⟨4042029787407182261314132295303570679937290085529257,4042029787407182261314132295303570679937290085535667⟩,⟨1973800054787859029409314179292450862829278679165135,1973800054787859029409314179292450862829278679171542⟩⟩, + ⟨⟨78138019662864723233595645439746704275103716514711,78138019662864723233595645439746704275103716515136⟩,⟨243876454131096656043844222132206373775156464389689,243876454131096656043844222132206373775156464390108⟩⟩, + ⟨⟨-2042640849786428272045032951538060427509655428121,-2042640849786428272045032951538060427509655428036⟩,⟨9926085281310621947254852108660620207073310481587,9926085281310621947254852108660620207073310481673⟩⟩, + ⟨⟨-84725090420907535769936673418961275479364418132,-84725090420907535769936673418961275479364418028⟩,⟨266100742062811448706568156667711537720122141910,266100742062811448706568156667711537720122142023⟩⟩, + ⟨⟨718944634211562902196604785444101373876335497,718944634211562902196604785444101373876335677⟩,⟨5495980626865087195752415400434801951865153957,5495980626865087195752415400434801951865154137⟩⟩, + ⟨⟨81877317364804630989426192282829499304537131,81877317364804630989426192282829499304537427⟩,⟨26079247693042709855130645726291055432226448,26079247693042709855130645726291055432226732⟩⟩, + ⟨⟨-114969346309952103721253604288048556876722,-114969346309952103721253604288048556876380⟩,⟨-1196498485625430398438986883331322693816860,-1196498485625430398438986883331322693816518⟩⟩, + ⟨⟨-2071006765598352537504591597447389521426,-2071006765598352537504591597447389520884⟩,⟨18750274058016016244304105973257686431280,18750274058016016244304105973257686431843⟩⟩, + ⟨⟨-283230480285111394388859060466899330092,-283230480285111394388859060466899329489⟩,⟨-340509332833175991008307947081666716798,-340509332833175991008307947081666716236⟩⟩, + ⟨⟨13885572497510313681870048635929962318,13885572497510313681870048635929963092⟩,⟨-16597283066403255963511495598770103073,-16597283066403255963511495598770102246⟩⟩, + ⟨⟨2942692732269034456644674583834585522,2942692732269034456644674583834586399⟩,⟨-689277032668575947538583205281160903,-689277032668575947538583205281160048⟩⟩, + ⟨⟨1523695141064185069753269786148995659,1523695141064185069753269786148996654⟩,⟨-497,597⟩⟩, + ⟨⟨2942692732269034456644674583834585522,2942692732269034456644674583834586399⟩,⟨689277032668575947538583205281160048,689277032668575947538583205281160903⟩⟩, + ⟨⟨13885572497510313681870048635929962318,13885572497510313681870048635929963092⟩,⟨16597283066403255963511495598770102246,16597283066403255963511495598770103073⟩⟩, + ⟨⟨-283230480285111394388859060466899330092,-283230480285111394388859060466899329489⟩,⟨340509332833175991008307947081666716236,340509332833175991008307947081666716798⟩⟩, + ⟨⟨-2071006765598352537504591597447389521426,-2071006765598352537504591597447389520884⟩,⟨-18750274058016016244304105973257686431843,-18750274058016016244304105973257686431280⟩⟩, + ⟨⟨-114969346309952103721253604288048556876722,-114969346309952103721253604288048556876380⟩,⟨1196498485625430398438986883331322693816518,1196498485625430398438986883331322693816860⟩⟩, + ⟨⟨81877317364804630989426192282829499304537131,81877317364804630989426192282829499304537427⟩,⟨-26079247693042709855130645726291055432226732,-26079247693042709855130645726291055432226448⟩⟩, + ⟨⟨718944634211562902196604785444101373876335497,718944634211562902196604785444101373876335677⟩,⟨-5495980626865087195752415400434801951865154137,-5495980626865087195752415400434801951865153957⟩⟩, + ⟨⟨-84725090420907535769936673418961275479364418132,-84725090420907535769936673418961275479364418028⟩,⟨-266100742062811448706568156667711537720122142023,-266100742062811448706568156667711537720122141910⟩⟩, + ⟨⟨-2042640849786428272045032951538060427509655428121,-2042640849786428272045032951538060427509655428036⟩,⟨-9926085281310621947254852108660620207073310481673,-9926085281310621947254852108660620207073310481587⟩⟩, + ⟨⟨78138019662864723233595645439746704275103716514711,78138019662864723233595645439746704275103716515136⟩,⟨-243876454131096656043844222132206373775156464390108,-243876454131096656043844222132206373775156464389689⟩⟩, + ⟨⟨4042029787407182261314132295303570679937290085529257,4042029787407182261314132295303570679937290085535667⟩,⟨-1973800054787859029409314179292450862829278679171542,-1973800054787859029409314179292450862829278679165135⟩⟩, + ⟨⟨47529759690914851700747843873969076347790750729696470,47529759690914851700747843873969076347790750729787060⟩,⟨29412963402305769484749802259167603443115305123612998,29412963402305769484749802259167603443115305123703639⟩⟩, + ⟨⟨-61966751306812496278465962230520781670583801045658353,-61966751306812496278465962230520781670583801044888909⟩,⟨501439648992744073913088782806494464044955628189791640,501439648992744073913088782806494464044955628190561411⟩⟩, + ⟨⟨-3340782588884355112112009211166914156388946973589165639,-3340782588884355112112009211166914156388946973585156650⟩,⟨783279721189374252842555201553634728375603156897907938,783279721189374252842555201553634728375603156901916861⟩⟩, + ⟨⟨-9376602027921131805602219018598351716130515340683622840,-9376602027921131805602219018598351716130515340665676580⟩,⟨-15473829216554340884006451512214309873137891088882258995,-15473829216554340884006451512214309873137891088864303502⟩⟩] +lemma tw1_1_4_6_calc (j : Fin 31) : taylorWaveBox 1 1 4 6 j = tw1_1_4_6 j := by + revert j + decide +kernel +def tw1_1_4_7 : Fin 31 → CI := ![⟨⟨-4809366809304789233180040234654982703139750725780396026,-4809366809304789233180040234654982703139750725773852023⟩,⟨-5795762449237597063093414847977257509119076641045476659,-5795762449237597063093414847977257509119076641038932778⟩⟩, + ⟨⟨856296590877190543982512128918331791819844924454868956,856296590877190543982512128918331791819844924456875684⟩,⟨-1222287872259614812257885323546588198036876402625336400,-1222287872259614812257885323546588198036876402623328157⟩⟩, + ⟨⟨219066552692702454690958822439955447438212336415022440,219066552692702454690958822439955447438212336415420865⟩,⟨69847932905226350736956729232796463840486518611470015,69847932905226350736956729232796463840486518611868255⟩⟩, + ⟨⟨1810667232525026389925640304555495550771423389844725,1810667232525026389925640304555495550771423389884902⟩,⟨26588705859247983794707860216614813863657993818970734,26588705859247983794707860216614813863657993819010900⟩⟩, + ⟨⟨-1891912864802965585269139905285871174587658361077985,-1891912864802965585269139905285871174587658361074930⟩,⟨1216998939390473954349069081882790971827378556291376,1216998939390473954349069081882790971827378556294433⟩⟩, + ⟨⟨-128498666880274648033548137750425555930461778272968,-128498666880274648033548137750425555930461778272690⟩,⟨-39510055564332290151407517554388831868913655242583,-39510055564332290151407517554388831868913655242305⟩⟩, + ⟨⟨-3559510603706020570598329053064738845513202622536,-3559510603706020570598329053064738845513202622497⟩,⟨-4305776840931917534178247115283788673030541985376,-4305776840931917534178247115283788673030541985334⟩⟩, + ⟨⟨-79055769166521673719689401659853690963523751540,-79055769166521673719689401659853690963523751469⟩,⟨-140977912908909797638798135633641223674371908588,-140977912908909797638798135633641223674371908521⟩⟩, + ⟨⟨-2569044609391262688057860739125887636088999484,-2569044609391262688057860739125887636088999375⟩,⟨-2173076244256735772009438223689815875173978903,-2173076244256735772009438223689815875173978794⟩⟩, + ⟨⟨-51428070582437041889485822144122827652919515,-51428070582437041889485822144122827652919340⟩,⟨18361793798605893860874705361876943769542277,18361793798605893860874705361876943769542462⟩⟩, + ⟨⟨484192216825509975405055902086898873385771,484192216825509975405055902086898873386004⟩,⟨633158944507886108281330445260881369144583,633158944507886108281330445260881369144816⟩⟩, + ⟨⟨-4406654829491608200340459505359584817997,-4406654829491608200340459505359584817602⟩,⟨-12223075705421019048496549902930940569893,-12223075705421019048496549902930940569508⟩⟩, + ⟨⟨271970212948556173587586314459897230212,271970212948556173587586314459897230561⟩,⟨158753204179990638805716115759934140504,158753204179990638805716115759934140804⟩⟩, + ⟨⟨-7009896769993578206615114208257291126,-7009896769993578206615114208257290500⟩,⟨14116698171764221468355702524093938677,14116698171764221468355702524093939324⟩⟩, + ⟨⟨-2099991253753471811891795427924975846,-2099991253753471811891795427924975209⟩,⟨764255739283282970423435465066497816,764255739283282970423435465066498425⟩⟩, + ⟨⟨-1132423331860693329042953286755160902,-1132423331860693329042953286755160162⟩,⟨-444,370⟩⟩, + ⟨⟨-2099991253753471811891795427924975846,-2099991253753471811891795427924975209⟩,⟨-764255739283282970423435465066498425,-764255739283282970423435465066497816⟩⟩, + ⟨⟨-7009896769993578206615114208257291126,-7009896769993578206615114208257290500⟩,⟨-14116698171764221468355702524093939324,-14116698171764221468355702524093938677⟩⟩, + ⟨⟨271970212948556173587586314459897230212,271970212948556173587586314459897230561⟩,⟨-158753204179990638805716115759934140804,-158753204179990638805716115759934140504⟩⟩, + ⟨⟨-4406654829491608200340459505359584817997,-4406654829491608200340459505359584817602⟩,⟨12223075705421019048496549902930940569508,12223075705421019048496549902930940569893⟩⟩, + ⟨⟨484192216825509975405055902086898873385771,484192216825509975405055902086898873386004⟩,⟨-633158944507886108281330445260881369144816,-633158944507886108281330445260881369144583⟩⟩, + ⟨⟨-51428070582437041889485822144122827652919515,-51428070582437041889485822144122827652919340⟩,⟨-18361793798605893860874705361876943769542462,-18361793798605893860874705361876943769542277⟩⟩, + ⟨⟨-2569044609391262688057860739125887636088999484,-2569044609391262688057860739125887636088999375⟩,⟨2173076244256735772009438223689815875173978794,2173076244256735772009438223689815875173978903⟩⟩, + ⟨⟨-79055769166521673719689401659853690963523751540,-79055769166521673719689401659853690963523751469⟩,⟨140977912908909797638798135633641223674371908521,140977912908909797638798135633641223674371908588⟩⟩, + ⟨⟨-3559510603706020570598329053064738845513202622536,-3559510603706020570598329053064738845513202622497⟩,⟨4305776840931917534178247115283788673030541985334,4305776840931917534178247115283788673030541985376⟩⟩, + ⟨⟨-128498666880274648033548137750425555930461778272968,-128498666880274648033548137750425555930461778272690⟩,⟨39510055564332290151407517554388831868913655242305,39510055564332290151407517554388831868913655242583⟩⟩, + ⟨⟨-1891912864802965585269139905285871174587658361077985,-1891912864802965585269139905285871174587658361074930⟩,⟨-1216998939390473954349069081882790971827378556294433,-1216998939390473954349069081882790971827378556291376⟩⟩, + ⟨⟨1810667232525026389925640304555495550771423389844725,1810667232525026389925640304555495550771423389884902⟩,⟨-26588705859247983794707860216614813863657993819010900,-26588705859247983794707860216614813863657993818970734⟩⟩, + ⟨⟨219066552692702454690958822439955447438212336415022440,219066552692702454690958822439955447438212336415420865⟩,⟨-69847932905226350736956729232796463840486518611868255,-69847932905226350736956729232796463840486518611470015⟩⟩, + ⟨⟨856296590877190543982512128918331791819844924454868956,856296590877190543982512128918331791819844924456875684⟩,⟨1222287872259614812257885323546588198036876402623328157,1222287872259614812257885323546588198036876402625336400⟩⟩, + ⟨⟨-4809366809304789233180040234654982703139750725780396026,-4809366809304789233180040234654982703139750725773852023⟩,⟨5795762449237597063093414847977257509119076641038932778,5795762449237597063093414847977257509119076641045476659⟩⟩] +lemma tw1_1_4_7_calc (j : Fin 31) : taylorWaveBox 1 1 4 7 j = tw1_1_4_7 j := by + revert j + decide +kernel +def tw1_1_4_8 : Fin 31 → CI := ![⟨⟨2641277037594926549470890108175416156077125846645131244,2641277037594926549470890108175416156077125846647746863⟩,⟨-992090288497927332550305884071333803901389672335904449,-992090288497927332550305884071333803901389672333290373⟩⟩, + ⟨⟨319592388200531920831431531285035220711348210157224142,319592388200531920831431531285035220711348210158125479⟩,⟨488994242626600446304393141075170297752317680324322541,488994242626600446304393141075170297752317680325223109⟩⟩, + ⟨⟨-63518835427753994786664386594326554847560592184479223,-63518835427753994786664386594326554847560592184323140⟩,⟨69528253084017555048909369734220888326540088281292503,69528253084017555048909369734220888326540088281448627⟩⟩, + ⟨⟨-10450695098329006925837594095456663824684792798289285,-10450695098329006925837594095456663824684792798273180⟩,⟨-4643995186866956945487400665896040435909283991855152,-4643995186866956945487400665896040435909283991839051⟩⟩, + ⟨⟨-27043511336920979089797420335196785787611961224816,-27043511336920979089797420335196785787611961223126⟩,⟨-1012125699414429802601691696214291910167709900791200,-1012125699414429802601691696214291910167709900789510⟩⟩, + ⟨⟨50015686307430558092252756452743391812180704668151,50015686307430558092252756452743391812180704668266⟩,⟨-39149535625550775592612846716067721495281344542050,-39149535625550775592612846716067721495281344541933⟩⟩, + ⟨⟨2771459562323058978649001200416941457543946958335,2771459562323058978649001200416941457543946958359⟩,⟨-38127608759904274642929228784841362321904408825,-38127608759904274642929228784841362321904408802⟩⟩, + ⟨⟨81772141624463127334532007098909668523563368343,81772141624463127334532007098909668523563368379⟩,⟨20046202901510852517074320118222444182217843042,20046202901510852517074320118222444182217843076⟩⟩, + ⟨⟨1837196887046537248530639455972910545520978108,1837196887046537248530639455972910545520978170⟩,⟨-67160719560006682192723621408648524691097856,-67160719560006682192723621408648524691097794⟩⟩, + ⟨⟨17026533886086535050216650216118292651363431,17026533886086535050216650216118292651363521⟩,⟨-26183077231368897732286981940429877718402277,-26183077231368897732286981940429877718402179⟩⟩, + ⟨⟨-445062096563550758104920467457214043086696,-445062096563550758104920467457214043086539⟩,⟨-167966639558713382186284988917776715453628,-167966639558713382186284988917776715453471⟩⟩, + ⟨⟨5789264642944905749848795171738405053998,5789264642944905749848795171738405054206⟩,⟨5599751185209408612171814070840490061055,5599751185209408612171814070840490061244⟩⟩, + ⟨⟨-198270737444383926666152018421780280291,-198270737444383926666152018421780280017⟩,⟨-36027267993808607674595214158251796535,-36027267993808607674595214158251796279⟩⟩, + ⟨⟨2306330288640691717113735051459044510,2306330288640691717113735051459044940⟩,⟨-10071104942262084339848487833810480174,-10071104942262084339848487833810479745⟩⟩, + ⟨⟨1327244875740539037083745636418616195,1327244875740539037083745636418616606⟩,⟨-670826155719383919105356793805367198,-670826155719383919105356793805366814⟩⟩, + ⟨⟨757464082665607642405000970919152870,757464082665607642405000970919153365⟩,⟨-248,297⟩⟩, + ⟨⟨1327244875740539037083745636418616195,1327244875740539037083745636418616606⟩,⟨670826155719383919105356793805366814,670826155719383919105356793805367198⟩⟩, + ⟨⟨2306330288640691717113735051459044510,2306330288640691717113735051459044940⟩,⟨10071104942262084339848487833810479745,10071104942262084339848487833810480174⟩⟩, + ⟨⟨-198270737444383926666152018421780280291,-198270737444383926666152018421780280017⟩,⟨36027267993808607674595214158251796279,36027267993808607674595214158251796535⟩⟩, + ⟨⟨5789264642944905749848795171738405053998,5789264642944905749848795171738405054206⟩,⟨-5599751185209408612171814070840490061244,-5599751185209408612171814070840490061055⟩⟩, + ⟨⟨-445062096563550758104920467457214043086696,-445062096563550758104920467457214043086539⟩,⟨167966639558713382186284988917776715453471,167966639558713382186284988917776715453628⟩⟩, + ⟨⟨17026533886086535050216650216118292651363431,17026533886086535050216650216118292651363521⟩,⟨26183077231368897732286981940429877718402179,26183077231368897732286981940429877718402277⟩⟩, + ⟨⟨1837196887046537248530639455972910545520978108,1837196887046537248530639455972910545520978170⟩,⟨67160719560006682192723621408648524691097794,67160719560006682192723621408648524691097856⟩⟩, + ⟨⟨81772141624463127334532007098909668523563368343,81772141624463127334532007098909668523563368379⟩,⟨-20046202901510852517074320118222444182217843076,-20046202901510852517074320118222444182217843042⟩⟩, + ⟨⟨2771459562323058978649001200416941457543946958335,2771459562323058978649001200416941457543946958359⟩,⟨38127608759904274642929228784841362321904408802,38127608759904274642929228784841362321904408825⟩⟩, + ⟨⟨50015686307430558092252756452743391812180704668151,50015686307430558092252756452743391812180704668266⟩,⟨39149535625550775592612846716067721495281344541933,39149535625550775592612846716067721495281344542050⟩⟩, + ⟨⟨-27043511336920979089797420335196785787611961224816,-27043511336920979089797420335196785787611961223126⟩,⟨1012125699414429802601691696214291910167709900789510,1012125699414429802601691696214291910167709900791200⟩⟩, + ⟨⟨-10450695098329006925837594095456663824684792798289285,-10450695098329006925837594095456663824684792798273180⟩,⟨4643995186866956945487400665896040435909283991839051,4643995186866956945487400665896040435909283991855152⟩⟩, + ⟨⟨-63518835427753994786664386594326554847560592184479223,-63518835427753994786664386594326554847560592184323140⟩,⟨-69528253084017555048909369734220888326540088281448627,-69528253084017555048909369734220888326540088281292503⟩⟩, + ⟨⟨319592388200531920831431531285035220711348210157224142,319592388200531920831431531285035220711348210158125479⟩,⟨-488994242626600446304393141075170297752317680325223109,-488994242626600446304393141075170297752317680324322541⟩⟩, + ⟨⟨2641277037594926549470890108175416156077125846645131244,2641277037594926549470890108175416156077125846647746863⟩,⟨992090288497927332550305884071333803901389672333290373,992090288497927332550305884071333803901389672335904449⟩⟩] +lemma tw1_1_4_8_calc (j : Fin 31) : taylorWaveBox 1 1 4 8 j = tw1_1_4_8 j := by + revert j + decide +kernel +def tw1_1_4_9 : Fin 31 → CI := ![⟨⟨24939489943442626324096003902470960164452032637100300,24939489943442626324096003902470960164452032638154140⟩,⟨960582490322484466946070184205506244843488466331843263,960582490322484466946070184205506244843488466332897914⟩⟩, + ⟨⟨-203810957654012748133973800813148832944448295312942489,-203810957654012748133973800813148832944448295312620663⟩,⟨40906013272904442775977065464085523267961875828675262,40906013272904442775977065464085523267961875828997277⟩⟩, + ⟨⟨-13620277807632412622434398297707332980172830594069160,-13620277807632412622434398297707332980172830594019933⟩,⟨-32311576547425741294825255017799008250864741413742225,-32311576547425741294825255017799008250864741413692991⟩⟩, + ⟨⟨3506589624653212966594516629298880601704459537589587,3506589624653212966594516629298880601704459537597418⟩,⟨-2758045380936483392457158933982651183331703836880917,-2758045380936483392457158933982651183331703836873082⟩⟩, + ⟨⟨359889396085606391915531236363482943302877076573366,359889396085606391915531236363482943302877076574025⟩,⟨205199076053515468323025916894451246093245877566952,205199076053515468323025916894451246093245877567610⟩⟩, + ⟨⟨1520525362343182453670593668134979293880040493128,1520525362343182453670593668134979293880040493187⟩,⟨27238330974897187489714331518442015105791880416776,27238330974897187489714331518442015105791880416834⟩⟩, + ⟨⟨-769728604901737864174790351771296237430962149883,-769728604901737864174790351771296237430962149872⟩,⟨985080724458966235893735010806204113045010382554,985080724458966235893735010806204113045010382564⟩⟩, + ⟨⟨-33372957649129636525676367068987680422985861029,-33372957649129636525676367068987680422985861013⟩,⟨21813059580109214300044996889396711293273007484,21813059580109214300044996889396711293273007501⟩⟩, + ⟨⟨-652249714965023551372220691166083183332294050,-652249714965023551372220691166083183332294021⟩,⟨639042701009773915075150145046541980642954802,639042701009773915075150145046541980642954831⟩⟩, + ⟨⟨1212095018697022141855151532394698065391238,1212095018697022141855151532394698065391296⟩,⟨16193773268641446919551785169316118144486241,16193773268641446919551785169316118144486298⟩⟩, + ⟨⟨253142876400438311151667213323829694852050,253142876400438311151667213323829694852120⟩,⟨-50311489066254765135760476977273918162696,-50311489066254765135760476977273918162626⟩⟩, + ⟨⟨-4318784626197234796527404846812761123950,-4318784626197234796527404846812761123823⟩,⟨-1396476417849082381824254782746472028512,-1396476417849082381824254782746472028393⟩⟩, + ⟨⟨115563174965939344224701494310499586738,115563174965939344224701494310499586909⟩,⟨-19702427542207906442578685331023637478,-19702427542207906442578685331023637309⟩⟩, + ⟨⟨65584425655016548260248310195937756,65584425655016548260248310195938009⟩,⟨6156621311842011412681514562033888747,6156621311842011412681514562033888992⟩⟩, + ⟨⟨-749109459232711975484334715515891487,-749109459232711975484334715515891249⟩,⟨498243993505123959047553596645596949,498243993505123959047553596645597166⟩⟩, + ⟨⟨-460598580042672744298601150438212704,-460598580042672744298601150438212403⟩,⟨-181,151⟩⟩, + ⟨⟨-749109459232711975484334715515891487,-749109459232711975484334715515891249⟩,⟨-498243993505123959047553596645597166,-498243993505123959047553596645596949⟩⟩, + ⟨⟨65584425655016548260248310195937756,65584425655016548260248310195938009⟩,⟨-6156621311842011412681514562033888992,-6156621311842011412681514562033888747⟩⟩, + ⟨⟨115563174965939344224701494310499586738,115563174965939344224701494310499586909⟩,⟨19702427542207906442578685331023637309,19702427542207906442578685331023637478⟩⟩, + ⟨⟨-4318784626197234796527404846812761123950,-4318784626197234796527404846812761123823⟩,⟨1396476417849082381824254782746472028393,1396476417849082381824254782746472028512⟩⟩, + ⟨⟨253142876400438311151667213323829694852050,253142876400438311151667213323829694852120⟩,⟨50311489066254765135760476977273918162626,50311489066254765135760476977273918162696⟩⟩, + ⟨⟨1212095018697022141855151532394698065391238,1212095018697022141855151532394698065391296⟩,⟨-16193773268641446919551785169316118144486298,-16193773268641446919551785169316118144486241⟩⟩, + ⟨⟨-652249714965023551372220691166083183332294050,-652249714965023551372220691166083183332294021⟩,⟨-639042701009773915075150145046541980642954831,-639042701009773915075150145046541980642954802⟩⟩, + ⟨⟨-33372957649129636525676367068987680422985861029,-33372957649129636525676367068987680422985861013⟩,⟨-21813059580109214300044996889396711293273007501,-21813059580109214300044996889396711293273007484⟩⟩, + ⟨⟨-769728604901737864174790351771296237430962149883,-769728604901737864174790351771296237430962149872⟩,⟨-985080724458966235893735010806204113045010382564,-985080724458966235893735010806204113045010382554⟩⟩, + ⟨⟨1520525362343182453670593668134979293880040493128,1520525362343182453670593668134979293880040493187⟩,⟨-27238330974897187489714331518442015105791880416834,-27238330974897187489714331518442015105791880416776⟩⟩, + ⟨⟨359889396085606391915531236363482943302877076573366,359889396085606391915531236363482943302877076574025⟩,⟨-205199076053515468323025916894451246093245877567610,-205199076053515468323025916894451246093245877566952⟩⟩, + ⟨⟨3506589624653212966594516629298880601704459537589587,3506589624653212966594516629298880601704459537597418⟩,⟨2758045380936483392457158933982651183331703836873082,2758045380936483392457158933982651183331703836880917⟩⟩, + ⟨⟨-13620277807632412622434398297707332980172830594069160,-13620277807632412622434398297707332980172830594019933⟩,⟨32311576547425741294825255017799008250864741413692991,32311576547425741294825255017799008250864741413742225⟩⟩, + ⟨⟨-203810957654012748133973800813148832944448295312942489,-203810957654012748133973800813148832944448295312620663⟩,⟨-40906013272904442775977065464085523267961875828997277,-40906013272904442775977065464085523267961875828675262⟩⟩, + ⟨⟨24939489943442626324096003902470960164452032637100300,24939489943442626324096003902470960164452032638154140⟩,⟨-960582490322484466946070184205506244843488466332897914,-960582490322484466946070184205506244843488466331843263⟩⟩] +lemma tw1_1_4_9_calc (j : Fin 31) : taylorWaveBox 1 1 4 9 j = tw1_1_4_9 j := by + revert j + decide +kernel +def tw1_1_4_10 : Fin 31 → CI := ![⟨⟨-285924408325361419031276936093001571865059661812302176,-285924408325361419031276936093001571865059661811949367⟩,⟨-90767719620756422857108657174605266155296666481163792,-90767719620756422857108657174605266155296666480811206⟩⟩, + ⟨⟨12321878707474427227452492513440017174977600956753374,12321878707474427227452492513440017174977600956846432⟩,⟨-66678683184670136877112387533456489798223154397603606,-66678683184670136877112387533456489798223154397510554⟩⟩, + ⟨⟨11961695041275542795935996829629876982663947659908293,11961695041275542795935996829629876982663947659930222⟩,⟨391053092347881465637496994216073091143460169789886,391053092347881465637496994216073091143460169811805⟩⟩, + ⟨⟨286110011013979516408868355991193385812238975329406,286110011013979516408868355991193385812238975332241⟩,⟨1569473042668963008611879639940498950450294059793228,1569473042668963008611879639940498950450294059796062⟩⟩, + ⟨⟨-135786175873515909812250716701629176330610639011492,-135786175873515909812250716701629176330610639011229⟩,⟨75541116361117600680756372517157636809409188094280,75541116361117600680756372517157636809409188094543⟩⟩, + ⟨⟨-9142277855917992010083317191953658598888170937847,-9142277855917992010083317191953658598888170937821⟩,⟨-5637942203060383186092741851238032528329234444122,-5637942203060383186092741851238032528329234444096⟩⟩, + ⟨⟨-118069199637239943990844246879897373255314128148,-118069199637239943990844246879897373255314128144⟩,⟨-503206759147493808166368107522396039160099084193,-503206759147493808166368107522396039160099084188⟩⟩, + ⟨⟨2971724837992271564926442318460153439341424485,2971724837992271564926442318460153439341424493⟩,⟨-17049531534528533937928955105178295907304694687,-17049531534528533937928955105178295907304694679⟩⟩, + ⟨⟨23682573701857231039636739158591110196596381,23682573701857231039636739158591110196596396⟩,⟨-415073130842231276856026014944800656458770263,-415073130842231276856026014944800656458770248⟩⟩, + ⟨⟨-5138315647935670558753604677747562947704458,-5138315647935670558753604677747562947704435⟩,⟨-5788114652980742175107560468629278271729405,-5788114652980742175107560468629278271729385⟩⟩, + ⟨⟨-93634754879543727932688081381807715163130,-93634754879543727932688081381807715163090⟩,⟨87800870256418327283073229850887593855377,87800870256418327283073229850887593855417⟩⟩, + ⟨⟨2320689904307164086736517335134852658710,2320689904307164086736517335134852658783⟩,⟨-334810125389251837525532174772986920258,-334810125389251837525532174772986920186⟩⟩, + ⟨⟨-54329483507878428211844416918574249829,-54329483507878428211844416918574249743⟩,⟨30925460427221829252503077205353372019,30925460427221829252503077205353372109⟩⟩, + ⟨⟨-820452993124175621401646858284665594,-820452993124175621401646858284665465⟩,⟨-3261721748047574818564111270063356867,-3261721748047574818564111270063356746⟩⟩, + ⟨⟨379698599746272049393940336704294802,379698599746272049393940336704294926⟩,⟨-323648096024139266921732093454567371,-323648096024139266921732093454567260⟩⟩, + ⟨⟨256740619205132631440221713986447794,256740619205132631440221713986447963⟩,⟨-84,101⟩⟩, + ⟨⟨379698599746272049393940336704294802,379698599746272049393940336704294926⟩,⟨323648096024139266921732093454567260,323648096024139266921732093454567371⟩⟩, + ⟨⟨-820452993124175621401646858284665594,-820452993124175621401646858284665465⟩,⟨3261721748047574818564111270063356746,3261721748047574818564111270063356867⟩⟩, + ⟨⟨-54329483507878428211844416918574249829,-54329483507878428211844416918574249743⟩,⟨-30925460427221829252503077205353372109,-30925460427221829252503077205353372019⟩⟩, + ⟨⟨2320689904307164086736517335134852658710,2320689904307164086736517335134852658783⟩,⟨334810125389251837525532174772986920186,334810125389251837525532174772986920258⟩⟩, + ⟨⟨-93634754879543727932688081381807715163130,-93634754879543727932688081381807715163090⟩,⟨-87800870256418327283073229850887593855417,-87800870256418327283073229850887593855377⟩⟩, + ⟨⟨-5138315647935670558753604677747562947704458,-5138315647935670558753604677747562947704435⟩,⟨5788114652980742175107560468629278271729385,5788114652980742175107560468629278271729405⟩⟩, + ⟨⟨23682573701857231039636739158591110196596381,23682573701857231039636739158591110196596396⟩,⟨415073130842231276856026014944800656458770248,415073130842231276856026014944800656458770263⟩⟩, + ⟨⟨2971724837992271564926442318460153439341424485,2971724837992271564926442318460153439341424493⟩,⟨17049531534528533937928955105178295907304694679,17049531534528533937928955105178295907304694687⟩⟩, + ⟨⟨-118069199637239943990844246879897373255314128148,-118069199637239943990844246879897373255314128144⟩,⟨503206759147493808166368107522396039160099084188,503206759147493808166368107522396039160099084193⟩⟩, + ⟨⟨-9142277855917992010083317191953658598888170937847,-9142277855917992010083317191953658598888170937821⟩,⟨5637942203060383186092741851238032528329234444096,5637942203060383186092741851238032528329234444122⟩⟩, + ⟨⟨-135786175873515909812250716701629176330610639011492,-135786175873515909812250716701629176330610639011229⟩,⟨-75541116361117600680756372517157636809409188094543,-75541116361117600680756372517157636809409188094280⟩⟩, + ⟨⟨286110011013979516408868355991193385812238975329406,286110011013979516408868355991193385812238975332241⟩,⟨-1569473042668963008611879639940498950450294059796062,-1569473042668963008611879639940498950450294059793228⟩⟩, + ⟨⟨11961695041275542795935996829629876982663947659908293,11961695041275542795935996829629876982663947659930222⟩,⟨-391053092347881465637496994216073091143460169811805,-391053092347881465637496994216073091143460169789886⟩⟩, + ⟨⟨12321878707474427227452492513440017174977600956753374,12321878707474427227452492513440017174977600956846432⟩,⟨66678683184670136877112387533456489798223154397510554,66678683184670136877112387533456489798223154397603606⟩⟩, + ⟨⟨-285924408325361419031276936093001571865059661812302176,-285924408325361419031276936093001571865059661811949367⟩,⟨90767719620756422857108657174605266155296666480811206,90767719620756422857108657174605266155296666481163792⟩⟩] +lemma tw1_1_4_10_calc (j : Fin 31) : taylorWaveBox 1 1 4 10 j = tw1_1_4_10 j := by + revert j + decide +kernel +def tw1_1_4_11 : Fin 31 → CI := ![⟨⟨51678064932380002311679245201180220929194597405443320,51678064932380002311679245201180220929194597405543735⟩,⟨-69301951951236217042902979928427456669905979496890139,-69301951951236217042902979928427456669905979496789692⟩⟩, + ⟨⟨17259895786361592836693955391517688283741636931811995,17259895786361592836693955391517688283741636931843094⟩,⟨10906409656837382953040316593913009377945763187400937,10906409656837382953040316593913009377945763187432018⟩⟩, + ⟨⟨-1688438252364828320330371015843894039559644360226029,-1688438252364828320330371015843894039559644360218469⟩,⟨3371474978795701630078253316173287632511764465765590,3371474978795701630078253316173287632511764465773153⟩⟩, + ⟨⟨-502166744826217150912644302474290903241104669387681,-502166744826217150912644302474290903241104669386852⟩,⟨-158558088725421594634259885773441233891586708428977,-158558088725421594634259885773441233891586708428147⟩⟩, + ⟨⟨2002217185694699504745714688951877540958799080122,2002217185694699504745714688951877540958799080233⟩,⟨-53760028398560312704772753819604023523407601516535,-53760028398560312704772753819604023523407601516423⟩⟩, + ⟨⟨3580340922316176649052292765827213019237820256102,3580340922316176649052292765827213019237820256112⟩,⟨-1555404902654601930219258059543826894092397259751,-1555404902654601930219258059543826894092397259741⟩⟩, + ⟨⟨177916761672955616768945248394811607992444613729,177916761672955616768945248394811607992444613731⟩,⟨85194221356762018379590966740090365162662897631,85194221356762018379590966740090365162662897634⟩⟩, + ⟨⟨4178774131992123855490486963461923701691228836,4178774131992123855490486963461923701691228840⟩,⟨5534122419176305729618958829943946898962608089,5534122419176305729618958829943946898962608093⟩⟩, + ⟨⟨110090894704358939580393877594979418047662394,110090894704358939580393877594979418047662400⟩,⟨135684957784280002539274148741826554871421165,135684957784280002539274148741826554871421171⟩⟩, + ⟨⟨3341595592473523085781489526153601277704046,3341595592473523085781489526153601277704059⟩,⟨654829615963412747757054605060083838331638,654829615963412747757054605060083838331651⟩⟩, + ⟨⟨15176461290101447455299200285053697636314,15176461290101447455299200285053697636334⟩,⟨-56940466875763519111431175193584689571159,-56940466875763519111431175193584689571138⟩⟩, + ⟨⟨-923210549715034760309874958274134299574,-923210549715034760309874958274134299543⟩,⟨630660233430923263720946298811981476333,630660233430923263720946298811981476366⟩⟩, + ⟨⟨19934520316654191181907867060963962838,19934520316654191181907867060963962874⟩,⟨-23442444610807349274332453901899669612,-23442444610807349274332453901899669572⟩⟩, + ⟨⟨786458693440207253440877467605036562,786458693440207253440877467605036619⟩,⟨1502556908608887269521511021874369399,1502556908608887269521511021874369451⟩⟩, + ⟨⟨-173332921669881443573220121744901707,-173332921669881443573220121744901649⟩,⟨187568599786737716938509741676426448,187568599786737716938509741676426499⟩⟩, + ⟨⟨-132100501870470184332069843501154022,-132100501870470184332069843501153935⟩,⟨-52,44⟩⟩, + ⟨⟨-173332921669881443573220121744901707,-173332921669881443573220121744901649⟩,⟨-187568599786737716938509741676426499,-187568599786737716938509741676426448⟩⟩, + ⟨⟨786458693440207253440877467605036562,786458693440207253440877467605036619⟩,⟨-1502556908608887269521511021874369451,-1502556908608887269521511021874369399⟩⟩, + ⟨⟨19934520316654191181907867060963962838,19934520316654191181907867060963962874⟩,⟨23442444610807349274332453901899669572,23442444610807349274332453901899669612⟩⟩, + ⟨⟨-923210549715034760309874958274134299574,-923210549715034760309874958274134299543⟩,⟨-630660233430923263720946298811981476366,-630660233430923263720946298811981476333⟩⟩, + ⟨⟨15176461290101447455299200285053697636314,15176461290101447455299200285053697636334⟩,⟨56940466875763519111431175193584689571138,56940466875763519111431175193584689571159⟩⟩, + ⟨⟨3341595592473523085781489526153601277704046,3341595592473523085781489526153601277704059⟩,⟨-654829615963412747757054605060083838331651,-654829615963412747757054605060083838331638⟩⟩, + ⟨⟨110090894704358939580393877594979418047662394,110090894704358939580393877594979418047662400⟩,⟨-135684957784280002539274148741826554871421171,-135684957784280002539274148741826554871421165⟩⟩, + ⟨⟨4178774131992123855490486963461923701691228836,4178774131992123855490486963461923701691228840⟩,⟨-5534122419176305729618958829943946898962608093,-5534122419176305729618958829943946898962608089⟩⟩, + ⟨⟨177916761672955616768945248394811607992444613729,177916761672955616768945248394811607992444613731⟩,⟨-85194221356762018379590966740090365162662897634,-85194221356762018379590966740090365162662897631⟩⟩, + ⟨⟨3580340922316176649052292765827213019237820256102,3580340922316176649052292765827213019237820256112⟩,⟨1555404902654601930219258059543826894092397259741,1555404902654601930219258059543826894092397259751⟩⟩, + ⟨⟨2002217185694699504745714688951877540958799080122,2002217185694699504745714688951877540958799080233⟩,⟨53760028398560312704772753819604023523407601516423,53760028398560312704772753819604023523407601516535⟩⟩, + ⟨⟨-502166744826217150912644302474290903241104669387681,-502166744826217150912644302474290903241104669386852⟩,⟨158558088725421594634259885773441233891586708428147,158558088725421594634259885773441233891586708428977⟩⟩, + ⟨⟨-1688438252364828320330371015843894039559644360226029,-1688438252364828320330371015843894039559644360218469⟩,⟨-3371474978795701630078253316173287632511764465773153,-3371474978795701630078253316173287632511764465765590⟩⟩, + ⟨⟨17259895786361592836693955391517688283741636931811995,17259895786361592836693955391517688283741636931843094⟩,⟨-10906409656837382953040316593913009377945763187432018,-10906409656837382953040316593913009377945763187400937⟩⟩, + ⟨⟨51678064932380002311679245201180220929194597405443320,51678064932380002311679245201180220929194597405543735⟩,⟨69301951951236217042902979928427456669905979496789692,69301951951236217042902979928427456669905979496890139⟩⟩] +lemma tw1_1_4_11_calc (j : Fin 31) : taylorWaveBox 1 1 4 11 j = tw1_1_4_11 j := by + revert j + decide +kernel +def tw1_1_4_12 : Fin 31 → CI := ![⟨⟨12998947922387825609544728561921360957231315673703384,12998947922387825609544728561921360957231315673728061⟩,⟨19135370303451707928358004998456551454457467742687413,19135370303451707928358004998456551454457467742712094⟩⟩, + ⟨⟨-4624524903199649636844836605840236150127783572796083,-4624524903199649636844836605840236150127783572785769⟩,⟨3346716074222642887833687731154873388450924204959367,3346716074222642887833687731154873388450924204969687⟩⟩, + ⟨⟨-689244858039678883359184545884159314041013608135148,-689244858039678883359184545884159314041013608133031⟩,⟨-861274684296930235689221458496816740819985368627544,-861274684296930235689221458496816740819985368625427⟩⟩, + ⟨⟨114885223395107879308451374140127861149971317759690,114885223395107879308451374140127861149971317760029⟩,⟨-113378485019087060202439328243758617965564734083468,-113378485019087060202439328243758617965564734083129⟩⟩, + ⟨⟨14446586853002774175521690402586562120738012392048,14446586853002774175521690402586562120738012392085⟩,⟨9509162177919293314423847764388536235170335224007,9509162177919293314423847764388536235170335224044⟩⟩, + ⟨⟨-259828186828101160605166424350761129653488836806,-259828186828101160605166424350761129653488836801⟩,⟨1291483574782811074639840678748341339896807906704,1291483574782811074639840678748341339896807906709⟩⟩, + ⟨⟨-63033179430966691263136731604578699201303581054,-63033179430966691263136731604578699201303581052⟩,⟨30229020604288464295229296027969176685435010851,30229020604288464295229296027969176685435010852⟩⟩, + ⟨⟨-2566024964115088398247075274326813864497636544,-2566024964115088398247075274326813864497636542⟩,⟨-269715699199944476482641060541933215580192441,-269715699199944476482641060541933215580192439⟩⟩, + ⟨⟨-67418422076830320932500891341311564319044012,-67418422076830320932500891341311564319044009⟩,⟨-10225779821560574804604832701058901353703116,-10225779821560574804604832701058901353703113⟩⟩, + ⟨⟨-1247869051335882724129940167979440741206513,-1247869051335882724129940167979440741206508⟩,⟨614803444819643402215319672213255765399952,614803444819643402215319672213255765399958⟩⟩, + ⟨⟨7341723625874085120347411118466439348514,7341723625874085120347411118466439348521⟩,⟨24023864052460330326843407052976892835621,24023864052460330326843407052976892835629⟩⟩, + ⟨⟨244033767860365873473210466888300428047,244033767860365873473210466888300428060⟩,⟨-430726809936809275818904257384395032610,-430726809936809275818904257384395032597⟩⟩, + ⟨⟨-4903381121390411788023161969441045968,-4903381121390411788023161969441045952⟩,⟨13183069021627960802712375569513480343,13183069021627960802712375569513480362⟩⟩, + ⟨⟨-522395995821321097752070418576609197,-522395995821321097752070418576609168⟩,⟨-598051777541433572670167815469894200,-598051777541433572670167815469894173⟩⟩, + ⟨⟨71228544959418025658625635013126453,71228544959418025658625635013126483⟩,⟨-98304547664584303028373526551787760,-98304547664584303028373526551787734⟩⟩, + ⟨⟨63114575778559057396990797087699350,63114575778559057396990797087699392⟩,⟨-21,25⟩⟩, + ⟨⟨71228544959418025658625635013126453,71228544959418025658625635013126483⟩,⟨98304547664584303028373526551787734,98304547664584303028373526551787760⟩⟩, + ⟨⟨-522395995821321097752070418576609197,-522395995821321097752070418576609168⟩,⟨598051777541433572670167815469894173,598051777541433572670167815469894200⟩⟩, + ⟨⟨-4903381121390411788023161969441045968,-4903381121390411788023161969441045952⟩,⟨-13183069021627960802712375569513480362,-13183069021627960802712375569513480343⟩⟩, + ⟨⟨244033767860365873473210466888300428047,244033767860365873473210466888300428060⟩,⟨430726809936809275818904257384395032597,430726809936809275818904257384395032610⟩⟩, + ⟨⟨7341723625874085120347411118466439348514,7341723625874085120347411118466439348521⟩,⟨-24023864052460330326843407052976892835629,-24023864052460330326843407052976892835621⟩⟩, + ⟨⟨-1247869051335882724129940167979440741206513,-1247869051335882724129940167979440741206508⟩,⟨-614803444819643402215319672213255765399958,-614803444819643402215319672213255765399952⟩⟩, + ⟨⟨-67418422076830320932500891341311564319044012,-67418422076830320932500891341311564319044009⟩,⟨10225779821560574804604832701058901353703113,10225779821560574804604832701058901353703116⟩⟩, + ⟨⟨-2566024964115088398247075274326813864497636544,-2566024964115088398247075274326813864497636542⟩,⟨269715699199944476482641060541933215580192439,269715699199944476482641060541933215580192441⟩⟩, + ⟨⟨-63033179430966691263136731604578699201303581054,-63033179430966691263136731604578699201303581052⟩,⟨-30229020604288464295229296027969176685435010852,-30229020604288464295229296027969176685435010851⟩⟩, + ⟨⟨-259828186828101160605166424350761129653488836806,-259828186828101160605166424350761129653488836801⟩,⟨-1291483574782811074639840678748341339896807906709,-1291483574782811074639840678748341339896807906704⟩⟩, + ⟨⟨14446586853002774175521690402586562120738012392048,14446586853002774175521690402586562120738012392085⟩,⟨-9509162177919293314423847764388536235170335224044,-9509162177919293314423847764388536235170335224007⟩⟩, + ⟨⟨114885223395107879308451374140127861149971317759690,114885223395107879308451374140127861149971317760029⟩,⟨113378485019087060202439328243758617965564734083129,113378485019087060202439328243758617965564734083468⟩⟩, + ⟨⟨-689244858039678883359184545884159314041013608135148,-689244858039678883359184545884159314041013608133031⟩,⟨861274684296930235689221458496816740819985368625427,861274684296930235689221458496816740819985368627544⟩⟩, + ⟨⟨-4624524903199649636844836605840236150127783572796083,-4624524903199649636844836605840236150127783572785769⟩,⟨-3346716074222642887833687731154873388450924204969687,-3346716074222642887833687731154873388450924204959367⟩⟩, + ⟨⟨12998947922387825609544728561921360957231315673703384,12998947922387825609544728561921360957231315673728061⟩,⟨-19135370303451707928358004998456551454457467742712094,-19135370303451707928358004998456551454457467742687413⟩⟩] +lemma tw1_1_4_12_calc (j : Fin 31) : taylorWaveBox 1 1 4 12 j = tw1_1_4_12 j := by + revert j + decide +kernel +def tw1_1_4_13 : Fin 31 → CI := ![⟨⟨-5578316758218709394385575697582238708751671906461070,-5578316758218709394385575697582238708751671906453548⟩,⟨1504039156945631144591558956317618809801528522985497,1504039156945631144591558956317618809801528522993015⟩⟩, + ⟨⟨-362251157565383370504296265990958869011882939078290,-362251157565383370504296265990958869011882939075426⟩,⟨-1444938497896758808916938728683904341567674940184978,-1444938497896758808916938728683904341567674940182115⟩⟩, + ⟨⟨292333447631844853611809439835141631489494477950278,292333447631844853611809439835141631489494477950898⟩,⟨-72559856834475792602442324349659217759714539593922,-72559856834475792602442324349659217759714539593302⟩⟩, + ⟨⟨13320837266695054206416492081324986870159261441234,13320837266695054206416492081324986870159261441343⟩,⟨44212731886640032925028639922462402020339282004242,44212731886640032925028639922462402020339282004350⟩⟩, + ⟨⟨-4686980860364439857799178935220296396421472376096,-4686980860364439857799178935220296396421472376083⟩,⟨2228026096948164649266561870031635945857356311652,2228026096948164649266561870031635945857356311666⟩⟩, + ⟨⟨-287027394571849410109121803777409301347059783274,-287027394571849410109121803777409301347059783272⟩,⟨-299644549599718146695710340464149385644477308889,-299644549599718146695710340464149385644477308887⟩⟩, + ⟨⟨5268481427573289334782055373783316970701639679,5268481427573289334782055373783316970701639680⟩,⟨-22514175678923067050524913220687306994291294126,-22514175678923067050524913220687306994291294125⟩⟩, + ⟨⟨676804474921610025097735825844229280881983355,676804474921610025097735825844229280881983356⟩,⟨-587158801797371028214431921819270908639399917,-587158801797371028214431921819270908639399916⟩⟩, + ⟨⟨20664574782268534613920001466162099192501789,20664574782268534613920001466162099192501791⟩,⟨-13779349081470310476839427385922660958140854,-13779349081470310476839427385922660958140853⟩⟩, + ⟨⟨236300377807982430221812997879640113221869,236300377807982430221812997879640113221872⟩,⟨-474872636670045051581125103709194019032800,-474872636670045051581125103709194019032797⟩⟩, + ⟨⟨-7532947760208364629062980038506680358780,-7532947760208364629062980038506680358776⟩,⟨-6568942255622228272453671676023399718705,-6568942255622228272453671676023399718701⟩⟩, + ⟨⟨-12155301969473989011694058174305878803,-12155301969473989011694058174305878796⟩,⟨204225340574550870095582825757896903604,204225340574550870095582825757896903611⟩⟩, + ⟨⟨44863428562048526206230551549653252,44863428562048526206230551549653261⟩,⟨-6000276486105185611759923155839539737,-6000276486105185611759923155839539728⟩⟩, + ⟨⟨283028276895908430143491336192535568,283028276895908430143491336192535582⟩,⟨200795840621981080380558718032424674,200795840621981080380558718032424688⟩⟩, + ⟨⟨-26201475505982015908709165260164621,-26201475505982015908709165260164606⟩,⟨47053921717624222680241940173561830,47053921717624222680241940173561843⟩⟩, + ⟨⟨-28144377283586538311545357448584206,-28144377283586538311545357448584186⟩,⟨-12,10⟩⟩, + ⟨⟨-26201475505982015908709165260164621,-26201475505982015908709165260164606⟩,⟨-47053921717624222680241940173561843,-47053921717624222680241940173561830⟩⟩, + ⟨⟨283028276895908430143491336192535568,283028276895908430143491336192535582⟩,⟨-200795840621981080380558718032424688,-200795840621981080380558718032424674⟩⟩, + ⟨⟨44863428562048526206230551549653252,44863428562048526206230551549653261⟩,⟨6000276486105185611759923155839539728,6000276486105185611759923155839539737⟩⟩, + ⟨⟨-12155301969473989011694058174305878803,-12155301969473989011694058174305878796⟩,⟨-204225340574550870095582825757896903611,-204225340574550870095582825757896903604⟩⟩, + ⟨⟨-7532947760208364629062980038506680358780,-7532947760208364629062980038506680358776⟩,⟨6568942255622228272453671676023399718701,6568942255622228272453671676023399718705⟩⟩, + ⟨⟨236300377807982430221812997879640113221869,236300377807982430221812997879640113221872⟩,⟨474872636670045051581125103709194019032797,474872636670045051581125103709194019032800⟩⟩, + ⟨⟨20664574782268534613920001466162099192501789,20664574782268534613920001466162099192501791⟩,⟨13779349081470310476839427385922660958140853,13779349081470310476839427385922660958140854⟩⟩, + ⟨⟨676804474921610025097735825844229280881983355,676804474921610025097735825844229280881983356⟩,⟨587158801797371028214431921819270908639399916,587158801797371028214431921819270908639399917⟩⟩, + ⟨⟨5268481427573289334782055373783316970701639679,5268481427573289334782055373783316970701639680⟩,⟨22514175678923067050524913220687306994291294125,22514175678923067050524913220687306994291294126⟩⟩, + ⟨⟨-287027394571849410109121803777409301347059783274,-287027394571849410109121803777409301347059783272⟩,⟨299644549599718146695710340464149385644477308887,299644549599718146695710340464149385644477308889⟩⟩, + ⟨⟨-4686980860364439857799178935220296396421472376096,-4686980860364439857799178935220296396421472376083⟩,⟨-2228026096948164649266561870031635945857356311666,-2228026096948164649266561870031635945857356311652⟩⟩, + ⟨⟨13320837266695054206416492081324986870159261441234,13320837266695054206416492081324986870159261441343⟩,⟨-44212731886640032925028639922462402020339282004350,-44212731886640032925028639922462402020339282004242⟩⟩, + ⟨⟨292333447631844853611809439835141631489494477950278,292333447631844853611809439835141631489494477950898⟩,⟨72559856834475792602442324349659217759714539593302,72559856834475792602442324349659217759714539593922⟩⟩, + ⟨⟨-362251157565383370504296265990958869011882939078290,-362251157565383370504296265990958869011882939075426⟩,⟨1444938497896758808916938728683904341567674940182115,1444938497896758808916938728683904341567674940184978⟩⟩, + ⟨⟨-5578316758218709394385575697582238708751671906461070,-5578316758218709394385575697582238708751671906453548⟩,⟨-1504039156945631144591558956317618809801528522993015,-1504039156945631144591558956317618809801528522985497⟩⟩] +lemma tw1_1_4_13_calc (j : Fin 31) : taylorWaveBox 1 1 4 13 j = tw1_1_4_13 j := by + revert j + decide +kernel +def tw1_1_4_14 : Fin 31 → CI := ![⟨⟨94600816332039382095685423147142837484351643840721,94600816332039382095685423147142837484351643842794⟩,⟨-1349454168936940619224553160717314896281628145276651,-1349454168936940619224553160717314896281628145274576⟩⟩, + ⟨⟨361112911757986062735656260629607427344999188279243,361112911757986062735656260629607427344999188279928⟩,⟨49109894449724322190577393180600106886847112216270,49109894449724322190577393180600106886847112216955⟩⟩, + ⟨⟨-14434077638714682209482933968064374788731774948918,-14434077638714682209482933968064374788731774948720⟩,⟨75740271588757987007926118383966259116040135979652,75740271588757987007926118383966259116040135979849⟩⟩, + ⟨⟨-12153089631277600101576199769123478468506557789481,-12153089631277600101576199769123478468506557789452⟩,⟨-2381650966728435982727237241467662578157986514822,-2381650966728435982727237241467662578157986514792⟩⟩, + ⟨⟨147435779800520766623632262792347888774130076827,147435779800520766623632262792347888774130076832⟩,⟨-1452390300970533388427907454448922108594448628126,-1452390300970533388427907454448922108594448628120⟩⟩, + ⟨⟨121046963070271718300872193256932608021651202002,121046963070271718300872193256932608021651202004⟩,⟨-18979656980141839156861176977413676260809886129,-18979656980141839156861176977413676260809886127⟩⟩, + ⟨⟨4417974542471427403402129236830927804731702384,4417974542471427403402129236830927804731702385⟩,⟨5647107443688367323574210224705783183899027926,5647107443688367323574210224705783183899027927⟩⟩, + ⟨⟨-10757252580635795755793790751351822451608897,-10757252580635795755793790751351822451608896⟩,⟨291505677608673306773331025574383018301395992,291505677608673306773331025574383018301395993⟩⟩, + ⟨⟨-2049497844858568213985106596861457401778522,-2049497844858568213985106596861457401778521⟩,⟨8229997484528752722604125732677163804927028,8229997484528752722604125732677163804927030⟩⟩, + ⟨⟨35725610910530701787172747014800632542574,35725610910530701787172747014800632542575⟩,⟨186207697343693353953616888175145479979066,186207697343693353953616888175145479979068⟩⟩, + ⟨⟨3680454099621363799236046306102995704854,3680454099621363799236046306102995704857⟩,⟨594251653716165464446457708064463575678,594251653716165464446457708064463575681⟩⟩, + ⟨⟨-30616308248051542986673776613892872174,-30616308248051542986673776613892872170⟩,⟨-73112027583723881002444419867467865637,-73112027583723881002444419867467865634⟩⟩, + ⟨⟨802891115340456001711499282086465887,802891115340456001711499282086465891⟩,⟨2261563102049582818287618082393429025,2261563102049582818287618082393429029⟩⟩, + ⟨⟨-131964862970543489002603969696657040,-131964862970543489002603969696657033⟩,⟨-52902622358018162484276666103069597,-52902622358018162484276666103069591⟩⟩, + ⟨⟨8498237316153715446322587277635832,8498237316153715446322587277635839⟩,⟨-20725380646925425326946252128481983,-20725380646925425326946252128481976⟩⟩, + ⟨⟨11765893063969225595067972508907923,11765893063969225595067972508907932⟩,⟨-4,5⟩⟩, + ⟨⟨8498237316153715446322587277635832,8498237316153715446322587277635839⟩,⟨20725380646925425326946252128481976,20725380646925425326946252128481983⟩⟩, + ⟨⟨-131964862970543489002603969696657040,-131964862970543489002603969696657033⟩,⟨52902622358018162484276666103069591,52902622358018162484276666103069597⟩⟩, + ⟨⟨802891115340456001711499282086465887,802891115340456001711499282086465891⟩,⟨-2261563102049582818287618082393429029,-2261563102049582818287618082393429025⟩⟩, + ⟨⟨-30616308248051542986673776613892872174,-30616308248051542986673776613892872170⟩,⟨73112027583723881002444419867467865634,73112027583723881002444419867467865637⟩⟩, + ⟨⟨3680454099621363799236046306102995704854,3680454099621363799236046306102995704857⟩,⟨-594251653716165464446457708064463575681,-594251653716165464446457708064463575678⟩⟩, + ⟨⟨35725610910530701787172747014800632542574,35725610910530701787172747014800632542575⟩,⟨-186207697343693353953616888175145479979068,-186207697343693353953616888175145479979066⟩⟩, + ⟨⟨-2049497844858568213985106596861457401778522,-2049497844858568213985106596861457401778521⟩,⟨-8229997484528752722604125732677163804927030,-8229997484528752722604125732677163804927028⟩⟩, + ⟨⟨-10757252580635795755793790751351822451608897,-10757252580635795755793790751351822451608896⟩,⟨-291505677608673306773331025574383018301395993,-291505677608673306773331025574383018301395992⟩⟩, + ⟨⟨4417974542471427403402129236830927804731702384,4417974542471427403402129236830927804731702385⟩,⟨-5647107443688367323574210224705783183899027927,-5647107443688367323574210224705783183899027926⟩⟩, + ⟨⟨121046963070271718300872193256932608021651202002,121046963070271718300872193256932608021651202004⟩,⟨18979656980141839156861176977413676260809886127,18979656980141839156861176977413676260809886129⟩⟩, + ⟨⟨147435779800520766623632262792347888774130076827,147435779800520766623632262792347888774130076832⟩,⟨1452390300970533388427907454448922108594448628120,1452390300970533388427907454448922108594448628126⟩⟩, + ⟨⟨-12153089631277600101576199769123478468506557789481,-12153089631277600101576199769123478468506557789452⟩,⟨2381650966728435982727237241467662578157986514792,2381650966728435982727237241467662578157986514822⟩⟩, + ⟨⟨-14434077638714682209482933968064374788731774948918,-14434077638714682209482933968064374788731774948720⟩,⟨-75740271588757987007926118383966259116040135979849,-75740271588757987007926118383966259116040135979652⟩⟩, + ⟨⟨361112911757986062735656260629607427344999188279243,361112911757986062735656260629607427344999188279928⟩,⟨-49109894449724322190577393180600106886847112216955,-49109894449724322190577393180600106886847112216270⟩⟩, + ⟨⟨94600816332039382095685423147142837484351643840721,94600816332039382095685423147142837484351643842794⟩,⟨1349454168936940619224553160717314896281628145274576,1349454168936940619224553160717314896281628145276651⟩⟩] +lemma tw1_1_4_14_calc (j : Fin 31) : taylorWaveBox 1 1 4 14 j = tw1_1_4_14 j := by + revert j + decide +kernel +def tw1_1_4_15 : Fin 31 → CI := ![⟨⟨274187530816443483164075380950592662439112522574960,274187530816443483164075380950592662439112522575466⟩,⟨117004641767024926631133935988072733975166913430576,117004641767024926631133935988072733975166913431082⟩⟩, + ⟨⟨-41401282332346428265423681444038771887602722764427,-41401282332346428265423681444038771887602722764251⟩,⟨72988728010153373272722952893969660956858631225140,72988728010153373272722952893969660956858631225317⟩⟩, + ⟨⟨-15119615690002534722768871982735905820001916917934,-15119615690002534722768871982735905820001916917880⟩,⟨-10792273387833641811538274205891405995193953036944,-10792273387833641811538274205891405995193953036890⟩⟩, + ⟨⟨1964851845253829713592018795369797797742980028652,1964851845253829713592018795369797797742980028663⟩,⟨-2431368047873437239507784835297947106503666583573,-2431368047873437239507784835297947106503666583563⟩⟩, + ⟨⟨308606555905800597219686268195301125794000667051,308606555905800597219686268195301125794000667053⟩,⟨232699858554827325620536948968414678556638322182,232699858554827325620536948968414678556638322184⟩⟩, + ⟨⟨-14898467577492658788171820152900761602743218927,-14898467577492658788171820152900761602743218926⟩,⟨30620137955732700520331080128133326684342117042,30620137955732700520331080128133326684342117044⟩⟩, + ⟨⟨-2092348907434322856173372438896095292891316012,-2092348907434322856173372438896095292891316011⟩,⟨-27542521007360100442721201468766519076376800,-27542521007360100442721201468766519076376799⟩⟩, + ⟨⟨-63014475741224333157231812277371100314563025,-63014475741224333157231812277371100314563024⟩,⟨-63389336797187574917079286957180959443048425,-63389336797187574917079286957180959443048424⟩⟩, + ⟨⟨-1293808036925363095300317790076597989240901,-1293808036925363095300317790076597989240900⟩,⟨-2399186132836736471575986233576349588364982,-2399186132836736471575986233576349588364981⟩⟩, + ⟨⟨-47536187034332337913063974813476947709016,-47536187034332337913063974813476947709015⟩,⟨-42536962748055225025623691427157986816176,-42536962748055225025623691427157986816175⟩⟩, + ⟨⟨-1207023853460629121185425318397681013356,-1207023853460629121185425318397681013354⟩,⟨506036415319158513254776023215282261967,506036415319158513254776023215282261969⟩⟩, + ⟨⟨21763604257269315279254966816753771110,21763604257269315279254966816753771111⟩,⟨19019051865223343685383066512863506243,19019051865223343685383066512863506244⟩⟩, + ⟨⟨-574843303761565234075762291434786241,-574843303761565234075762291434786239⟩,⟨-696851376987091417011741866265754987,-696851376987091417011741866265754985⟩⟩, + ⟨⟨54242697606452064937288787135633214,54242697606452064937288787135633217⟩,⟨7948105619844149191176605404754879,7948105619844149191176605404754882⟩⟩, + ⟨⟨-2340390477124225294926964157000013,-2340390477124225294926964157000010⟩,⟨8450393312030611540900223358405860,8450393312030611540900223358405864⟩⟩, + ⟨⟨-4629448009048884747646148791803853,-4629448009048884747646148791803849⟩,⟨-2,2⟩⟩, + ⟨⟨-2340390477124225294926964157000013,-2340390477124225294926964157000010⟩,⟨-8450393312030611540900223358405864,-8450393312030611540900223358405860⟩⟩, + ⟨⟨54242697606452064937288787135633214,54242697606452064937288787135633217⟩,⟨-7948105619844149191176605404754882,-7948105619844149191176605404754879⟩⟩, + ⟨⟨-574843303761565234075762291434786241,-574843303761565234075762291434786239⟩,⟨696851376987091417011741866265754985,696851376987091417011741866265754987⟩⟩, + ⟨⟨21763604257269315279254966816753771110,21763604257269315279254966816753771111⟩,⟨-19019051865223343685383066512863506244,-19019051865223343685383066512863506243⟩⟩, + ⟨⟨-1207023853460629121185425318397681013356,-1207023853460629121185425318397681013354⟩,⟨-506036415319158513254776023215282261969,-506036415319158513254776023215282261967⟩⟩, + ⟨⟨-47536187034332337913063974813476947709016,-47536187034332337913063974813476947709015⟩,⟨42536962748055225025623691427157986816175,42536962748055225025623691427157986816176⟩⟩, + ⟨⟨-1293808036925363095300317790076597989240901,-1293808036925363095300317790076597989240900⟩,⟨2399186132836736471575986233576349588364981,2399186132836736471575986233576349588364982⟩⟩, + ⟨⟨-63014475741224333157231812277371100314563025,-63014475741224333157231812277371100314563024⟩,⟨63389336797187574917079286957180959443048424,63389336797187574917079286957180959443048425⟩⟩, + ⟨⟨-2092348907434322856173372438896095292891316012,-2092348907434322856173372438896095292891316011⟩,⟨27542521007360100442721201468766519076376799,27542521007360100442721201468766519076376800⟩⟩, + ⟨⟨-14898467577492658788171820152900761602743218927,-14898467577492658788171820152900761602743218926⟩,⟨-30620137955732700520331080128133326684342117044,-30620137955732700520331080128133326684342117042⟩⟩, + ⟨⟨308606555905800597219686268195301125794000667051,308606555905800597219686268195301125794000667053⟩,⟨-232699858554827325620536948968414678556638322184,-232699858554827325620536948968414678556638322182⟩⟩, + ⟨⟨1964851845253829713592018795369797797742980028652,1964851845253829713592018795369797797742980028663⟩,⟨2431368047873437239507784835297947106503666583563,2431368047873437239507784835297947106503666583573⟩⟩, + ⟨⟨-15119615690002534722768871982735905820001916917934,-15119615690002534722768871982735905820001916917880⟩,⟨10792273387833641811538274205891405995193953036890,10792273387833641811538274205891405995193953036944⟩⟩, + ⟨⟨-41401282332346428265423681444038771887602722764427,-41401282332346428265423681444038771887602722764251⟩,⟨-72988728010153373272722952893969660956858631225317,-72988728010153373272722952893969660956858631225140⟩⟩, + ⟨⟨274187530816443483164075380950592662439112522574960,274187530816443483164075380950592662439112522575466⟩,⟨-117004641767024926631133935988072733975166913431082,-117004641767024926631133935988072733975166913430576⟩⟩] +lemma tw1_1_4_15_calc (j : Fin 31) : taylorWaveBox 1 1 4 15 j = tw1_1_4_15 j := by + revert j + decide +kernel +def tw1_1_4_16 : Fin 31 → CI := ![⟨⟨-41683771792441116551626862111729546879829657508042,-41683771792441116551626862111729546879829657507929⟩,⟨45956355063466549235271892826105243153410960961932,45956355063466549235271892826105243153410960962044⟩⟩, + ⟨⟨-11389058359493794934529766963966249794599894835987,-11389058359493794934529766963966249794599894835939⟩,⟨-14257534695983495204718210974089239352686866418890,-14257534695983495204718210974089239352686866418842⟩⟩, + ⟨⟨3669690252612157624325910165696438454705752751504,3669690252612157624325910165696438454705752751517⟩,⟨-2097547070192113245459786060316214074440291143550,-2097547070192113245459786060316214074440291143537⟩⟩, + ⟨⟨293614217534783621238060863589107123409850284486,293614217534783621238060863589107123409850284490⟩,⟨684966621006317229600535146668829334280810906093,684966621006317229600535146668829334280810906096⟩⟩, + ⟨⟨-89757928138289278257935001614665893298836208201,-89757928138289278257935001614665893298836208200⟩,⟨35830315135851735476394341641443556141004639485,35830315135851735476394341641443556141004639486⟩⟩, + ⟨⟨-4360168480148220293817160742904471610588200571,-4360168480148220293817160742904471610588200570⟩,⟨-7802365440966354937921490910220652211970372029,-7802365440966354937921490910220652211970372028⟩⟩, + ⟨⟨367227907984483800060125159769679495264714620,367227907984483800060125159769679495264714621⟩,⟨-444756184104960121619155571004526295058266209,-444756184104960121619155571004526295058266208⟩⟩, + ⟨⟨25853536719652998246946861444560053712088071,25853536719652998246946861444560053712088072⟩,⟨-800538764460285717517913003781412993065463,-800538764460285717517913003781412993065462⟩⟩, + ⟨⟨780671826194406048464432696270633341792825,780671826194406048464432696270633341792826⟩,⟨274044221907213223629221273187411522021091,274044221907213223629221273187411522021092⟩⟩, + ⟨⟨20206009108192602944987739205015619143809,20206009108192602944987739205015619143810⟩,⟨1592805149380484552901208667789758872476,1592805149380484552901208667789758872477⟩⟩, + ⟨⟨250989595567614391045359214588201141509,250989595567614391045359214588201141511⟩,⟨-353999954319032750577329132406812588047,-353999954319032750577329132406812588046⟩⟩, + ⟨⟨-9613579254283031738775794607766427889,-9613579254283031738775794607766427888⟩,⟨-2579883454841578555746709757319706644,-2579883454841578555746709757319706643⟩⟩, + ⟨⟨276693663617947924576017357469879447,276693663617947924576017357469879448⟩,⟨163025328484850750943853154519600227,163025328484850750943853154519600228⟩⟩, + ⟨⟨-19883493828846411782840997633037887,-19883493828846411782840997633037885⟩,⟨1800013624808002232289365905689429,1800013624808002232289365905689431⟩⟩, + ⟨⟨488403442400765161718576655537960,488403442400765161718576655537962⟩,⟨-3204737984104390519931355664246890,-3204737984104390519931355664246888⟩⟩, + ⟨⟨1720322785639884491275421158882046,1720322785639884491275421158882048⟩,⟨-1,1⟩⟩, + ⟨⟨488403442400765161718576655537960,488403442400765161718576655537962⟩,⟨3204737984104390519931355664246888,3204737984104390519931355664246890⟩⟩, + ⟨⟨-19883493828846411782840997633037887,-19883493828846411782840997633037885⟩,⟨-1800013624808002232289365905689431,-1800013624808002232289365905689429⟩⟩, + ⟨⟨276693663617947924576017357469879447,276693663617947924576017357469879448⟩,⟨-163025328484850750943853154519600228,-163025328484850750943853154519600227⟩⟩, + ⟨⟨-9613579254283031738775794607766427889,-9613579254283031738775794607766427888⟩,⟨2579883454841578555746709757319706643,2579883454841578555746709757319706644⟩⟩, + ⟨⟨250989595567614391045359214588201141509,250989595567614391045359214588201141511⟩,⟨353999954319032750577329132406812588046,353999954319032750577329132406812588047⟩⟩, + ⟨⟨20206009108192602944987739205015619143809,20206009108192602944987739205015619143810⟩,⟨-1592805149380484552901208667789758872477,-1592805149380484552901208667789758872476⟩⟩, + ⟨⟨780671826194406048464432696270633341792825,780671826194406048464432696270633341792826⟩,⟨-274044221907213223629221273187411522021092,-274044221907213223629221273187411522021091⟩⟩, + ⟨⟨25853536719652998246946861444560053712088071,25853536719652998246946861444560053712088072⟩,⟨800538764460285717517913003781412993065462,800538764460285717517913003781412993065463⟩⟩, + ⟨⟨367227907984483800060125159769679495264714620,367227907984483800060125159769679495264714621⟩,⟨444756184104960121619155571004526295058266208,444756184104960121619155571004526295058266209⟩⟩, + ⟨⟨-4360168480148220293817160742904471610588200571,-4360168480148220293817160742904471610588200570⟩,⟨7802365440966354937921490910220652211970372028,7802365440966354937921490910220652211970372029⟩⟩, + ⟨⟨-89757928138289278257935001614665893298836208201,-89757928138289278257935001614665893298836208200⟩,⟨-35830315135851735476394341641443556141004639486,-35830315135851735476394341641443556141004639485⟩⟩, + ⟨⟨293614217534783621238060863589107123409850284486,293614217534783621238060863589107123409850284490⟩,⟨-684966621006317229600535146668829334280810906096,-684966621006317229600535146668829334280810906093⟩⟩, + ⟨⟨3669690252612157624325910165696438454705752751504,3669690252612157624325910165696438454705752751517⟩,⟨2097547070192113245459786060316214074440291143537,2097547070192113245459786060316214074440291143550⟩⟩, + ⟨⟨-11389058359493794934529766963966249794599894835987,-11389058359493794934529766963966249794599894835939⟩,⟨14257534695983495204718210974089239352686866418842,14257534695983495204718210974089239352686866418890⟩⟩, + ⟨⟨-41683771792441116551626862111729546879829657508042,-41683771792441116551626862111729546879829657507929⟩,⟨-45956355063466549235271892826105243153410960962044,-45956355063466549235271892826105243153410960961932⟩⟩] +lemma tw1_1_4_16_calc (j : Fin 31) : taylorWaveBox 1 1 4 16 j = tw1_1_4_16 j := by + revert j + decide +kernel +def tw1_1_4_17 : Fin 31 → CI := ![⟨⟨-5873242160616108957824419546218991890461194395929,-5873242160616108957824419546218991890461194395905⟩,⟨-10731436702976978220618112531247068557063497732778,-10731436702976978220618112531247068557063497732754⟩⟩, + ⟨⟨3598945071759146632603228348255919891595975924097,3598945071759146632603228348255919891595975924109⟩,⟨-1086554411686625102410816058714959337984991507622,-1086554411686625102410816058714959337984991507610⟩⟩, + ⟨⟨79768381304981737922594375553845998935724344111,79768381304981737922594375553845998935724344116⟩,⟨907666373041637341192242547801176076081011313518,907666373041637341192242547801176076081011313522⟩⟩, + ⟨⟨-167759318701504122021438795026459212032102064033,-167759318701504122021438795026459212032102064031⟩,⟨-13651344321925978477682960774344699775824153463,-13651344321925978477682960774344699775824153462⟩⟩, + ⟨⟨3762786008415100890421418877544438898273587278,3762786008415100890421418877544438898273587280⟩,⟨-22582726294176222232877485304306719998262491027,-22582726294176222232877485304306719998262491025⟩⟩, + ⟨⟨2211731228797618026377946112401694539253617082,2211731228797618026377946112401694539253617083⟩,⟨219168384722337190238744047346225435867782418,219168384722337190238744047346225435867782419⟩⟩, + ⟨⟨30444740423753614260982374897681519683365774,30444740423753614260982374897681519683365775⟩,⟨147500704411983809050595058813889326297787180,147500704411983809050595058813889326297787181⟩⟩, + ⟨⟨-4678707829219978746318495538316615654175753,-4678707829219978746318495538316615654175752⟩,⟨5328856472355457157532739464691838998354415,5328856472355457157532739464691838998354416⟩⟩, + ⟨⟨-219041451932533106216930928532560985324191,-219041451932533106216930928532560985324190⟩,⟨92876112360206679201594642144958023204542,92876112360206679201594642144958023204543⟩⟩, + ⟨⟨-5128036338962747955937211836508025382312,-5128036338962747955937211836508025382311⟩,⟨3305911644611115422294087769346242375259,3305911644611115422294087769346242375260⟩⟩, + ⟨⟨-8130445178902079344009820933394190463,-8130445178902079344009820933394190462⟩,⟨136064954478026399326638555758299190263,136064954478026399326638555758299190264⟩⟩, + ⟨⟨3186676714054258990316491632132117748,3186676714054258990316491632132117749⟩,⟨-625561337050429211235771113340682955,-625561337050429211235771113340682954⟩⟩, + ⟨⟨-106339668496879679721638848170290785,-106339668496879679721638848170290784⟩,⟨-19770584164333736130267002627783110,-19770584164333736130267002627783109⟩⟩, + ⟨⟨6525113971743198777281317176211288,6525113971743198777281317176211290⟩,⟨-2206305964928191910208838742455240,-2206305964928191910208838742455239⟩⟩, + ⟨⟨-36655017315521228733076778454353,-36655017315521228733076778454352⟩,⟨1134811652975440919602531274513595,1134811652975440919602531274513596⟩⟩, + ⟨⟨-605633062836070798879824323983829,-605633062836070798879824323983828⟩,⟨-1,1⟩⟩, + ⟨⟨-36655017315521228733076778454353,-36655017315521228733076778454352⟩,⟨-1134811652975440919602531274513596,-1134811652975440919602531274513595⟩⟩, + ⟨⟨6525113971743198777281317176211288,6525113971743198777281317176211290⟩,⟨2206305964928191910208838742455239,2206305964928191910208838742455240⟩⟩, + ⟨⟨-106339668496879679721638848170290785,-106339668496879679721638848170290784⟩,⟨19770584164333736130267002627783109,19770584164333736130267002627783110⟩⟩, + ⟨⟨3186676714054258990316491632132117748,3186676714054258990316491632132117749⟩,⟨625561337050429211235771113340682954,625561337050429211235771113340682955⟩⟩, + ⟨⟨-8130445178902079344009820933394190463,-8130445178902079344009820933394190462⟩,⟨-136064954478026399326638555758299190264,-136064954478026399326638555758299190263⟩⟩, + ⟨⟨-5128036338962747955937211836508025382312,-5128036338962747955937211836508025382311⟩,⟨-3305911644611115422294087769346242375260,-3305911644611115422294087769346242375259⟩⟩, + ⟨⟨-219041451932533106216930928532560985324191,-219041451932533106216930928532560985324190⟩,⟨-92876112360206679201594642144958023204543,-92876112360206679201594642144958023204542⟩⟩, + ⟨⟨-4678707829219978746318495538316615654175753,-4678707829219978746318495538316615654175752⟩,⟨-5328856472355457157532739464691838998354416,-5328856472355457157532739464691838998354415⟩⟩, + ⟨⟨30444740423753614260982374897681519683365774,30444740423753614260982374897681519683365775⟩,⟨-147500704411983809050595058813889326297787181,-147500704411983809050595058813889326297787180⟩⟩, + ⟨⟨2211731228797618026377946112401694539253617082,2211731228797618026377946112401694539253617083⟩,⟨-219168384722337190238744047346225435867782419,-219168384722337190238744047346225435867782418⟩⟩, + ⟨⟨3762786008415100890421418877544438898273587278,3762786008415100890421418877544438898273587280⟩,⟨22582726294176222232877485304306719998262491025,22582726294176222232877485304306719998262491027⟩⟩, + ⟨⟨-167759318701504122021438795026459212032102064033,-167759318701504122021438795026459212032102064031⟩,⟨13651344321925978477682960774344699775824153462,13651344321925978477682960774344699775824153463⟩⟩, + ⟨⟨79768381304981737922594375553845998935724344111,79768381304981737922594375553845998935724344116⟩,⟨-907666373041637341192242547801176076081011313522,-907666373041637341192242547801176076081011313518⟩⟩, + ⟨⟨3598945071759146632603228348255919891595975924097,3598945071759146632603228348255919891595975924109⟩,⟨1086554411686625102410816058714959337984991507610,1086554411686625102410816058714959337984991507622⟩⟩, + ⟨⟨-5873242160616108957824419546218991890461194395929,-5873242160616108957824419546218991890461194395905⟩,⟨10731436702976978220618112531247068557063497732754,10731436702976978220618112531247068557063497732778⟩⟩] +lemma tw1_1_4_17_calc (j : Fin 31) : taylorWaveBox 1 1 4 17 j = tw1_1_4_17 j := by + revert j + decide +kernel +def tw1_1_4_18 : Fin 31 → CI := ![⟨⟨2259474086149906279399393392639285724953764782855,2259474086149906279399393392639285724953764782862⟩,⟨-381842292162819353660601291346811376135179527913,-381842292162819353660601291346811376135179527906⟩⟩, + ⟨⟨-64371342494087951843955576996400371732933636874,-64371342494087951843955576996400371732933636870⟩,⟨732951813161946293099331169550349971585657792158,732951813161946293099331169550349971585657792161⟩⟩, + ⟨⟨-175666039221819922502224608850328300886343231058,-175666039221819922502224608850328300886343231057⟩,⟨-62921370212889210065932025544248861588914207808,-62921370212889210065932025544248861588914207806⟩⟩, + ⟨⟨19407256844588874008870376063568296867744975721,19407256844588874008870376063568296867744975722⟩,⟨-30455121674920666665311448660586795833036825730,-30455121674920666665311448660586795833036825729⟩⟩, + ⟨⟨3907139733599385344418587130092334068156010192,3907139733599385344418587130092334068156010193⟩,⟨3358417363202384009280260276082812363973143645,3358417363202384009280260276082812363973143646⟩⟩, + ⟨⟨-341096552206405576187903004829345274317579319,-341096552206405576187903004829345274317579318⟩,⟨399147646075221778729552118008260555604082443,399147646075221778729552118008260555604082444⟩⟩, + ⟨⟨-33251171112867060855059916850098258915481886,-33251171112867060855059916850098258915481885⟩,⟨-17037062256638831670521193968385392899057700,-17037062256638831670521193968385392899057699⟩⟩, + ⟨⟨-182170487676133974061998839541901538023793,-182170487676133974061998839541901538023792⟩,⟨-1837928164281010993081976137901634079214209,-1837928164281010993081976137901634079214208⟩⟩, + ⟨⟨27161218529077684332809756437675662979386,27161218529077684332809756437675662979387⟩,⟨-59047141966038351504903342045501609943868,-59047141966038351504903342045501609943867⟩⟩, + ⟨⟨593177585323373344512224224529380363495,593177585323373344512224224529380363496⟩,⟨-1640858554705513861956657650577421767419,-1640858554705513861956657650577421767418⟩⟩, + ⟨⟨-19406989101735429367492445560764119140,-19406989101735429367492445560764119139⟩,⟨-35746436724540623741109006105888688292,-35746436724540623741109006105888688291⟩⟩, + ⟨⟨-801382206228710758632169714820555147,-801382206228710758632169714820555146⟩,⟨609039553049789753527600802800014329,609039553049789753527600802800014330⟩⟩, + ⟨⟨34138309778898732705027659361406107,34138309778898732705027659361406108⟩,⟨-5677232176679805560579217975615612,-5677232176679805560579217975615611⟩⟩, + ⟨⟨-1910567508272675739011935043738835,-1910567508272675739011935043738834⟩,⟨1202711587181779584348545066044120,1202711587181779584348545066044121⟩⟩, + ⟨⟨-32697256590206126686442660819959,-32697256590206126686442660819958⟩,⟨-376368288412224142351925280746628,-376368288412224142351925280746627⟩⟩, + ⟨⟨202550265199551666235972009595285,202550265199551666235972009595286⟩,⟨-1,1⟩⟩, + ⟨⟨-32697256590206126686442660819959,-32697256590206126686442660819958⟩,⟨376368288412224142351925280746627,376368288412224142351925280746628⟩⟩, + ⟨⟨-1910567508272675739011935043738835,-1910567508272675739011935043738834⟩,⟨-1202711587181779584348545066044121,-1202711587181779584348545066044120⟩⟩, + ⟨⟨34138309778898732705027659361406107,34138309778898732705027659361406108⟩,⟨5677232176679805560579217975615611,5677232176679805560579217975615612⟩⟩, + ⟨⟨-801382206228710758632169714820555147,-801382206228710758632169714820555146⟩,⟨-609039553049789753527600802800014330,-609039553049789753527600802800014329⟩⟩, + ⟨⟨-19406989101735429367492445560764119140,-19406989101735429367492445560764119139⟩,⟨35746436724540623741109006105888688291,35746436724540623741109006105888688292⟩⟩, + ⟨⟨593177585323373344512224224529380363495,593177585323373344512224224529380363496⟩,⟨1640858554705513861956657650577421767418,1640858554705513861956657650577421767419⟩⟩, + ⟨⟨27161218529077684332809756437675662979386,27161218529077684332809756437675662979387⟩,⟨59047141966038351504903342045501609943867,59047141966038351504903342045501609943868⟩⟩, + ⟨⟨-182170487676133974061998839541901538023793,-182170487676133974061998839541901538023792⟩,⟨1837928164281010993081976137901634079214208,1837928164281010993081976137901634079214209⟩⟩, + ⟨⟨-33251171112867060855059916850098258915481886,-33251171112867060855059916850098258915481885⟩,⟨17037062256638831670521193968385392899057699,17037062256638831670521193968385392899057700⟩⟩, + ⟨⟨-341096552206405576187903004829345274317579319,-341096552206405576187903004829345274317579318⟩,⟨-399147646075221778729552118008260555604082444,-399147646075221778729552118008260555604082443⟩⟩, + ⟨⟨3907139733599385344418587130092334068156010192,3907139733599385344418587130092334068156010193⟩,⟨-3358417363202384009280260276082812363973143646,-3358417363202384009280260276082812363973143645⟩⟩, + ⟨⟨19407256844588874008870376063568296867744975721,19407256844588874008870376063568296867744975722⟩,⟨30455121674920666665311448660586795833036825729,30455121674920666665311448660586795833036825730⟩⟩, + ⟨⟨-175666039221819922502224608850328300886343231058,-175666039221819922502224608850328300886343231057⟩,⟨62921370212889210065932025544248861588914207806,62921370212889210065932025544248861588914207808⟩⟩, + ⟨⟨-64371342494087951843955576996400371732933636874,-64371342494087951843955576996400371732933636870⟩,⟨-732951813161946293099331169550349971585657792161,-732951813161946293099331169550349971585657792158⟩⟩, + ⟨⟨2259474086149906279399393392639285724953764782855,2259474086149906279399393392639285724953764782862⟩,⟨381842292162819353660601291346811376135179527906,381842292162819353660601291346811376135179527913⟩⟩] +lemma tw1_1_4_18_calc (j : Fin 31) : taylorWaveBox 1 1 4 18 j = tw1_1_4_18 j := by + revert j + decide +kernel +def tw1_1_4_19 : Fin 31 → CI := ![⟨⟨-67521913268999100160551291038315453668857712016,-67521913268999100160551291038315453668857712014⟩,⟨403178469324147945306656866179755683847137169202,403178469324147945306656866179755683847137169204⟩⟩, + ⟨⟨-122373243095995032392259363674272038905986146146,-122373243095995032392259363674272038905986146144⟩,⟨-61916458783514099174309454747832743782408255613,-61916458783514099174309454747832743782408255611⟩⟩, + ⟨⟨25479000302974434976650045621197788006202065310,25479000302974434976650045621197788006202065311⟩,⟨-25985443550580440855622051129279202075164012424,-25985443550580440855622051129279202075164012423⟩⟩, + ⟨⟨3649271139574532652987093822866426944632016690,3649271139574532652987093822866426944632016691⟩,⟨6413907598943745698161426506737268686787739837,6413907598943745698161426506737268686787739839⟩⟩, + ⟨⟨-1049616036681089815533686299102397524664885145,-1049616036681089815533686299102397524664885144⟩,⟨343023591628240456707877918335953390610921380,343023591628240456707877918335953390610921381⟩⟩, + ⟨⟨-29829899768395612944442283679255583254242627,-29829899768395612944442283679255583254242626⟩,⟨-114295775287444414448749485833223431269499157,-114295775287444414448749485833223431269499156⟩⟩, + ⟨⟨8058902508955824876996368037999650522406150,8058902508955824876996368037999650522406151⟩,⟨-3601339607023018484087759720550741447595770,-3601339607023018484087759720550741447595769⟩⟩, + ⟨⟨363961942151624555315904153038080000857463,363961942151624555315904153038080000857464⟩,⟨278229742580618178084563982895593389553173,278229742580618178084563982895593389553174⟩⟩, + ⟨⟨5118170119615612165933824887294303395448,5118170119615612165933824887294303395449⟩,⟨16116576285205816459254425390709196281991,16116576285205816459254425390709196281992⟩⟩, + ⟨⟨142426504272130198563201462163832735602,142426504272130198563201462163832735603⟩,⟨453349610658700009912416209774017270049,453349610658700009912416209774017270050⟩⟩, + ⟨⟨10052499114507892980533533358815965982,10052499114507892980533533358815965983⟩,⟨5707068769191565542980818788714063252,5707068769191565542980818788714063253⟩⟩, + ⟨⟨133212509603195671451753452731468008,133212509603195671451753452731468009⟩,⟨-265584248104520221948390484800717289,-265584248104520221948390484800717288⟩⟩, + ⟨⟨-9185959243301056334177424099624507,-9185959243301056334177424099624506⟩,⟨5179401145228608112117462111809658,5179401145228608112117462111809659⟩⟩, + ⟨⟨492186223769448336050982737688163,492186223769448336050982737688164⟩,⟨-504353794267329486522488737770015,-504353794267329486522488737770014⟩⟩, + ⟨⟨24441205643542669827694341986327,24441205643542669827694341986329⟩,⟨117194434538396031615820046431814,117194434538396031615820046431815⟩⟩, + ⟨⟨-64515899540585828694846543458572,-64515899540585828694846543458571⟩,⟨-1,1⟩⟩, + ⟨⟨24441205643542669827694341986327,24441205643542669827694341986329⟩,⟨-117194434538396031615820046431815,-117194434538396031615820046431814⟩⟩, + ⟨⟨492186223769448336050982737688163,492186223769448336050982737688164⟩,⟨504353794267329486522488737770014,504353794267329486522488737770015⟩⟩, + ⟨⟨-9185959243301056334177424099624507,-9185959243301056334177424099624506⟩,⟨-5179401145228608112117462111809659,-5179401145228608112117462111809658⟩⟩, + ⟨⟨133212509603195671451753452731468008,133212509603195671451753452731468009⟩,⟨265584248104520221948390484800717288,265584248104520221948390484800717289⟩⟩, + ⟨⟨10052499114507892980533533358815965982,10052499114507892980533533358815965983⟩,⟨-5707068769191565542980818788714063253,-5707068769191565542980818788714063252⟩⟩, + ⟨⟨142426504272130198563201462163832735602,142426504272130198563201462163832735603⟩,⟨-453349610658700009912416209774017270050,-453349610658700009912416209774017270049⟩⟩, + ⟨⟨5118170119615612165933824887294303395448,5118170119615612165933824887294303395449⟩,⟨-16116576285205816459254425390709196281992,-16116576285205816459254425390709196281991⟩⟩, + ⟨⟨363961942151624555315904153038080000857463,363961942151624555315904153038080000857464⟩,⟨-278229742580618178084563982895593389553174,-278229742580618178084563982895593389553173⟩⟩, + ⟨⟨8058902508955824876996368037999650522406150,8058902508955824876996368037999650522406151⟩,⟨3601339607023018484087759720550741447595769,3601339607023018484087759720550741447595770⟩⟩, + ⟨⟨-29829899768395612944442283679255583254242627,-29829899768395612944442283679255583254242626⟩,⟨114295775287444414448749485833223431269499156,114295775287444414448749485833223431269499157⟩⟩, + ⟨⟨-1049616036681089815533686299102397524664885145,-1049616036681089815533686299102397524664885144⟩,⟨-343023591628240456707877918335953390610921381,-343023591628240456707877918335953390610921380⟩⟩, + ⟨⟨3649271139574532652987093822866426944632016690,3649271139574532652987093822866426944632016691⟩,⟨-6413907598943745698161426506737268686787739839,-6413907598943745698161426506737268686787739837⟩⟩, + ⟨⟨25479000302974434976650045621197788006202065310,25479000302974434976650045621197788006202065311⟩,⟨25985443550580440855622051129279202075164012423,25985443550580440855622051129279202075164012424⟩⟩, + ⟨⟨-122373243095995032392259363674272038905986146146,-122373243095995032392259363674272038905986146144⟩,⟨61916458783514099174309454747832743782408255611,61916458783514099174309454747832743782408255613⟩⟩, + ⟨⟨-67521913268999100160551291038315453668857712016,-67521913268999100160551291038315453668857712014⟩,⟨-403178469324147945306656866179755683847137169204,-403178469324147945306656866179755683847137169202⟩⟩] +lemma tw1_1_4_19_calc (j : Fin 31) : taylorWaveBox 1 1 4 19 j = tw1_1_4_19 j := by + revert j + decide +kernel +def tw1_1_4_20 : Fin 31 → CI := ![⟨⟨-61113962244727009454104364886314495166170679764,-61113962244727009454104364886314495166170679762⟩,⟨-33329793993839870889279499153820437741823118558,-33329793993839870889279499153820437741823118556⟩⟩, + ⟨⟨18319660935876651318114886546778429787149936715,18319660935876651318114886546778429787149936717⟩,⟨-16118916746048164980782915655011229551932932297,-16118916746048164980782915655011229551932932295⟩⟩, + ⟨⟨2409742043386834834715869938770860813740487141,2409742043386834834715869938770860813740487142⟩,⟨6332200617583219490847161364543557051079520055,6332200617583219490847161364543557051079520056⟩⟩, + ⟨⟨-1438673632180126493856622349257227911602388166,-1438673632180126493856622349257227911602388165⟩,⟨44796083330923388104020725927611537044300003,44796083330923388104020725927611537044300004⟩⟩, + ⟨⟨51292779153025512264671202152049668766118226,51292779153025512264671202152049668766118227⟩,⟨-220011966981082136528130821065246255636201865,-220011966981082136528130821065246255636201864⟩⟩, + ⟨⟨23803032846334102551094510612384705540929893,23803032846334102551094510612384705540929894⟩,⟨8771738644764548483992241175768580480390783,8771738644764548483992241175768580480390784⟩⟩, + ⟨⟨-505577838685954155907207598504224243524773,-505577838685954155907207598504224243524772⟩,⟨1925370088450775888023806056766817849366230,1925370088450775888023806056766817849366231⟩⟩, + ⟨⟨-106969199637616457602393062905623856617714,-106969199637616457602393062905623856617713⟩,⟨17991620465214385630298244275272338787147,17991620465214385630298244275272338787148⟩⟩, + ⟨⟨-3634598182869286108933157254840063309174,-3634598182869286108933157254840063309173⟩,⟨-2103614355057708255871277374646283532581,-2103614355057708255871277374646283532580⟩⟩, + ⟨⟨-100894739964777875595640628600305432299,-100894739964777875595640628600305432298⟩,⟨-71287093171127147392742328427153821105,-71287093171127147392742328427153821104⟩⟩, + ⟨⟨-3133239732069164000274539172401950077,-3133239732069164000274539172401950076⟩,⟨127636001326633621515505202961900056,127636001326633621515505202961900057⟩⟩, + ⟨⟨-744397661948098282773802929738607,-744397661948098282773802929738606⟩,⟨83716152448771667097720114899175257,83716152448771667097720114899175258⟩⟩, + ⟨⟨1996572845782760941582862640753670,1996572845782760941582862640753671⟩,⟨-2328623676474258742625896112543079,-2328623676474258742625896112543078⟩⟩, + ⟨⟨-107490857248842039947530946024426,-107490857248842039947530946024425⟩,⟨180378117881557204455647206217910,180378117881557204455647206217911⟩⟩, + ⟨⟨-11547530315190432921243202558395,-11547530315190432921243202558394⟩,⟨-34321679435444812727486863026098,-34321679435444812727486863026097⟩⟩, + ⟨⟨19615406458610948798622707476005,19615406458610948798622707476006⟩,⟨-1,1⟩⟩, + ⟨⟨-11547530315190432921243202558395,-11547530315190432921243202558394⟩,⟨34321679435444812727486863026097,34321679435444812727486863026098⟩⟩, + ⟨⟨-107490857248842039947530946024426,-107490857248842039947530946024425⟩,⟨-180378117881557204455647206217911,-180378117881557204455647206217910⟩⟩, + ⟨⟨1996572845782760941582862640753670,1996572845782760941582862640753671⟩,⟨2328623676474258742625896112543078,2328623676474258742625896112543079⟩⟩, + ⟨⟨-744397661948098282773802929738607,-744397661948098282773802929738606⟩,⟨-83716152448771667097720114899175258,-83716152448771667097720114899175257⟩⟩, + ⟨⟨-3133239732069164000274539172401950077,-3133239732069164000274539172401950076⟩,⟨-127636001326633621515505202961900057,-127636001326633621515505202961900056⟩⟩, + ⟨⟨-100894739964777875595640628600305432299,-100894739964777875595640628600305432298⟩,⟨71287093171127147392742328427153821104,71287093171127147392742328427153821105⟩⟩, + ⟨⟨-3634598182869286108933157254840063309174,-3634598182869286108933157254840063309173⟩,⟨2103614355057708255871277374646283532580,2103614355057708255871277374646283532581⟩⟩, + ⟨⟨-106969199637616457602393062905623856617714,-106969199637616457602393062905623856617713⟩,⟨-17991620465214385630298244275272338787148,-17991620465214385630298244275272338787147⟩⟩, + ⟨⟨-505577838685954155907207598504224243524773,-505577838685954155907207598504224243524772⟩,⟨-1925370088450775888023806056766817849366231,-1925370088450775888023806056766817849366230⟩⟩, + ⟨⟨23803032846334102551094510612384705540929893,23803032846334102551094510612384705540929894⟩,⟨-8771738644764548483992241175768580480390784,-8771738644764548483992241175768580480390783⟩⟩, + ⟨⟨51292779153025512264671202152049668766118226,51292779153025512264671202152049668766118227⟩,⟨220011966981082136528130821065246255636201864,220011966981082136528130821065246255636201865⟩⟩, + ⟨⟨-1438673632180126493856622349257227911602388166,-1438673632180126493856622349257227911602388165⟩,⟨-44796083330923388104020725927611537044300004,-44796083330923388104020725927611537044300003⟩⟩, + ⟨⟨2409742043386834834715869938770860813740487141,2409742043386834834715869938770860813740487142⟩,⟨-6332200617583219490847161364543557051079520056,-6332200617583219490847161364543557051079520055⟩⟩, + ⟨⟨18319660935876651318114886546778429787149936715,18319660935876651318114886546778429787149936717⟩,⟨16118916746048164980782915655011229551932932295,16118916746048164980782915655011229551932932297⟩⟩, + ⟨⟨-61113962244727009454104364886314495166170679764,-61113962244727009454104364886314495166170679762⟩,⟨33329793993839870889279499153820437741823118556,33329793993839870889279499153820437741823118558⟩⟩] +lemma tw1_1_4_20_calc (j : Fin 31) : taylorWaveBox 1 1 4 20 j = tw1_1_4_20 j := by + revert j + decide +kernel +def tw1_1_4 : Fin 21 → Fin 31 → CI := ![tw1_1_4_0,tw1_1_4_1,tw1_1_4_2,tw1_1_4_3,tw1_1_4_4,tw1_1_4_5,tw1_1_4_6,tw1_1_4_7,tw1_1_4_8,tw1_1_4_9,tw1_1_4_10,tw1_1_4_11,tw1_1_4_12,tw1_1_4_13,tw1_1_4_14,tw1_1_4_15,tw1_1_4_16,tw1_1_4_17,tw1_1_4_18,tw1_1_4_19,tw1_1_4_20] +lemma tw1_1_4_mem (l : Fin 21) (j : Fin 31) : (tw1_1_4 l j).Mem (taylorWave 1 1 (nearNode 4) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 4 l j = tw1_1_4 l j := by + fin_cases l + · exact tw1_1_4_0_calc j + · exact tw1_1_4_1_calc j + · exact tw1_1_4_2_calc j + · exact tw1_1_4_3_calc j + · exact tw1_1_4_4_calc j + · exact tw1_1_4_5_calc j + · exact tw1_1_4_6_calc j + · exact tw1_1_4_7_calc j + · exact tw1_1_4_8_calc j + · exact tw1_1_4_9_calc j + · exact tw1_1_4_10_calc j + · exact tw1_1_4_11_calc j + · exact tw1_1_4_12_calc j + · exact tw1_1_4_13_calc j + · exact tw1_1_4_14_calc j + · exact tw1_1_4_15_calc j + · exact tw1_1_4_16_calc j + · exact tw1_1_4_17_calc j + · exact tw1_1_4_18_calc j + · exact tw1_1_4_19_calc j + · exact tw1_1_4_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 4 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave115.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave115.lean new file mode 100644 index 0000000000000000000000000000000000000000..527e5a35b39dbe987257222793e6400b0d98714a --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave115.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_5_0 : Fin 31 → CI := ![⟨⟨857401280074343215142262971836513199775591475914562941,857401280074343215142262971836513199775591475920677306⟩,⟨3224505754601965008534146016308361050564639439046957266,3224505754601965008534146016308361050564639439053070022⟩⟩, + ⟨⟨-204962487707137303869285569041917299472153897896588017,-204962487707137303869285569041917299472153897896254788⟩,⟨133572396668000749836996732283347196814744551866845255,133572396668000749836996732283347196814744551867178844⟩⟩, + ⟨⟨-10474120886230051187876212916492760736779010397121894,-10474120886230051187876212916492760736779010397101393⟩,⟨-7071433592691139631719539061226064879598152723769793,-7071433592691139631719539061226064879598152723749305⟩⟩, + ⟨⟨25025828001868477371104217416208874188195187904078,25025828001868477371104217416208874188195187905069⟩,⟨-440014147690187486065906742003370057082022062414769,-440014147690187486065906742003370057082022062413778⟩⟩, + ⟨⟨7660827087957663323888693866977857188356400958327,7660827087957663323888693866977857188356400958425⟩,⟨-6360629278077004190080835344356570964606706817486,-6360629278077004190080835344356570964606706817388⟩⟩, + ⟨⟨138427155535810883630243081651357739903924587621,138427155535810883630243081651357739903924587709⟩,⟨-25676580181004599747273614173655340766927941688,-25676580181004599747273614173655340766927941600⟩⟩, + ⟨⟨1213936130886396699688582454436315411038827564,1213936130886396699688582454436315411038827655⟩,⟨-136703267044693597019762825283540700062243453,-136703267044693597019762825283540700062243363⟩⟩, + ⟨⟨5272180459604043372631889017116130907924435,5272180459604043372631889017116130907924524⟩,⟨-3894987289834277401080707395503576927406506,-3894987289834277401080707395503576927406417⟩⟩, + ⟨⟨-8299805462205118642485455588318755439134,-8299805462205118642485455588318755439017⟩,⟨-21354181172067684013741963802207844071644,-21354181172067684013741963802207844071513⟩⟩, + ⟨⟨-27097527638694718442180128106253185818,-27097527638694718442180128106253185676⟩,⟨51999757309558931316595866741864837248,51999757309558931316595866741864837391⟩⟩, + ⟨⟨19611326914011097222945872561147278,19611326914011097222945872561147455⟩,⟨-133234430424797929149506915628289919,-133234430424797929149506915628289758⟩⟩, + ⟨⟨375597503480594343162542345744722,375597503480594343162542345744913⟩,⟨15108527636214581184257519407070,15108527636214581184257519407261⟩⟩, + ⟨⟨1888029945037679614693466201196,1888029945037679614693466201415⟩,⟨192504893503011172001722942538,192504893503011172001722942755⟩⟩, + ⟨⟨11173767462599609937882405421,11173767462599609937882405625⟩,⟨-24891939497327156390276070029,-24891939497327156390276069825⟩⟩, + ⟨⟨-1654699000869625822960533115,-1654699000869625822960532931⟩,⟨491850539310009938201370344,491850539310009938201370511⟩⟩, + ⟨⟨661365548138391546652644592,661365548138391546652644795⟩,⟨-113,136⟩⟩, + ⟨⟨-1654699000869625822960533115,-1654699000869625822960532931⟩,⟨-491850539310009938201370511,-491850539310009938201370343⟩⟩, + ⟨⟨11173767462599609937882405421,11173767462599609937882405625⟩,⟨24891939497327156390276069826,24891939497327156390276070030⟩⟩, + ⟨⟨1888029945037679614693466201196,1888029945037679614693466201415⟩,⟨-192504893503011172001722942754,-192504893503011172001722942538⟩⟩, + ⟨⟨375597503480594343162542345744722,375597503480594343162542345744913⟩,⟨-15108527636214581184257519407260,-15108527636214581184257519407070⟩⟩, + ⟨⟨19611326914011097222945872561147278,19611326914011097222945872561147455⟩,⟨133234430424797929149506915628289758,133234430424797929149506915628289919⟩⟩, + ⟨⟨-27097527638694718442180128106253185818,-27097527638694718442180128106253185676⟩,⟨-51999757309558931316595866741864837390,-51999757309558931316595866741864837248⟩⟩, + ⟨⟨-8299805462205118642485455588318755439134,-8299805462205118642485455588318755439017⟩,⟨21354181172067684013741963802207844071513,21354181172067684013741963802207844071644⟩⟩, + ⟨⟨5272180459604043372631889017116130907924435,5272180459604043372631889017116130907924524⟩,⟨3894987289834277401080707395503576927406418,3894987289834277401080707395503576927406507⟩⟩, + ⟨⟨1213936130886396699688582454436315411038827564,1213936130886396699688582454436315411038827655⟩,⟨136703267044693597019762825283540700062243364,136703267044693597019762825283540700062243454⟩⟩, + ⟨⟨138427155535810883630243081651357739903924587621,138427155535810883630243081651357739903924587709⟩,⟨25676580181004599747273614173655340766927941601,25676580181004599747273614173655340766927941689⟩⟩, + ⟨⟨7660827087957663323888693866977857188356400958327,7660827087957663323888693866977857188356400958425⟩,⟨6360629278077004190080835344356570964606706817388,6360629278077004190080835344356570964606706817486⟩⟩, + ⟨⟨25025828001868477371104217416208874188195187904078,25025828001868477371104217416208874188195187905069⟩,⟨440014147690187486065906742003370057082022062413779,440014147690187486065906742003370057082022062414769⟩⟩, + ⟨⟨-10474120886230051187876212916492760736779010397121894,-10474120886230051187876212916492760736779010397101393⟩,⟨7071433592691139631719539061226064879598152723749306,7071433592691139631719539061226064879598152723769794⟩⟩, + ⟨⟨-204962487707137303869285569041917299472153897896588017,-204962487707137303869285569041917299472153897896254788⟩,⟨-133572396668000749836996732283347196814744551867178843,-133572396668000749836996732283347196814744551866845255⟩⟩, + ⟨⟨857401280074343215142262971836513199775591475914562941,857401280074343215142262971836513199775591475920677306⟩,⟨-3224505754601965008534146016308361050564639439053070022,-3224505754601965008534146016308361050564639439046957266⟩⟩] +lemma tw1_1_5_0_calc (j : Fin 31) : taylorWaveBox 1 1 5 0 j = tw1_1_5_0 j := by + revert j + decide +kernel +def tw1_1_5_1 : Fin 31 → CI := ![⟨⟨-4155322976103572638451209333764027075409826163149812840,-4155322976103572638451209333764027075409826163142276307⟩,⟨-305801907405084553864540366290026284524209663445995089,-305801907405084553864540366290026284524209663438457030⟩⟩, + ⟨⟨-62401449242980356859628812660415385517022101165340482,-62401449242980356859628812660415385517022101164930767⟩,⟨-313047747075481812361036628646852370002009750563349144,-313047747075481812361036628646852370002009750562939703⟩⟩, + ⟨⟨14750959404709022084915078895773006484070733535020604,14750959404709022084915078895773006484070733535045214⟩,⟨-8949720238052888443861399544449108635375718553240779,-8949720238052888443861399544449108635375718553216154⟩⟩, + ⟨⟨539740734999189301882750150101187414507316400945404,539740734999189301882750150101187414507316400946536⟩,⟨325720772156381870311169344309643541351092855940145,325720772156381870311169344309643541351092855941277⟩⟩, + ⟨⟨2203179100625958800386401422105282048497533053717,2203179100625958800386401422105282048497533053832⟩,⟨14775321438140724758520984018647926856249511809383,14775321438140724758520984018647926856249511809498⟩⟩, + ⟨⟨-91413734375758588789654238681314164182628198903,-91413734375758588789654238681314164182628198773⟩,⟨202002592540197346235089893813733020554587747182,202002592540197346235089893813733020554587747312⟩⟩, + ⟨⟨-1081535901353212026366158717548348981899572291,-1081535901353212026366158717548348981899572125⟩,⟨1706421595914040702202611191448304136682237558,1706421595914040702202611191448304136682237723⟩⟩, + ⟨⟨-1308201435442345795277138074125716871506130,-1308201435442345795277138074125716871505930⟩,⟨11306048388377950436377504049736120722906425,11306048388377950436377504049736120722906625⟩⟩, + ⟨⟨37360251200866768167636678007149193951666,37360251200866768167636678007149193951950⟩,⟨18578128105338982884903350195123656383770,18578128105338982884903350195123656384059⟩⟩, + ⟨⟨-19011363909045392616159364649185854919,-19011363909045392616159364649185854633⟩,⟨-110160144889267568750879883330751669011,-110160144889267568750879883330751668726⟩⟩, + ⟨⟨107016341424305021852208858537426020,107016341424305021852208858537426325⟩,⟨245605215491939235383123519502353156,245605215491939235383123519502353397⟩⟩, + ⟨⟨-710540316329698167179393737587375,-710540316329698167179393737587045⟩,⟨313750156975585066678583481344794,313750156975585066678583481345123⟩⟩, + ⟨⟨-3925271130067675938406058134241,-3925271130067675938406058133800⟩,⟨989767247790591595456257205072,989767247790591595456257205529⟩⟩, + ⟨⟨-11034416990351047831644537611,-11034416990351047831644537147⟩,⟨58588765055300731184764940824,58588765055300731184764941289⟩⟩, + ⟨⟨3515078667300373212669607986,3515078667300373212669608413⟩,⟨-1518888490908733028763067836,-1518888490908733028763067439⟩⟩, + ⟨⟨-1474597688375516190785139647,-1474597688375516190785139196⟩,⟨-300,250⟩⟩, + ⟨⟨3515078667300373212669607986,3515078667300373212669608413⟩,⟨1518888490908733028763067439,1518888490908733028763067837⟩⟩, + ⟨⟨-11034416990351047831644537611,-11034416990351047831644537147⟩,⟨-58588765055300731184764941289,-58588765055300731184764940824⟩⟩, + ⟨⟨-3925271130067675938406058134241,-3925271130067675938406058133800⟩,⟨-989767247790591595456257205529,-989767247790591595456257205072⟩⟩, + ⟨⟨-710540316329698167179393737587375,-710540316329698167179393737587045⟩,⟨-313750156975585066678583481345123,-313750156975585066678583481344793⟩⟩, + ⟨⟨107016341424305021852208858537426020,107016341424305021852208858537426325⟩,⟨-245605215491939235383123519502353397,-245605215491939235383123519502353156⟩⟩, + ⟨⟨-19011363909045392616159364649185854919,-19011363909045392616159364649185854633⟩,⟨110160144889267568750879883330751668726,110160144889267568750879883330751669011⟩⟩, + ⟨⟨37360251200866768167636678007149193951666,37360251200866768167636678007149193951950⟩,⟨-18578128105338982884903350195123656384059,-18578128105338982884903350195123656383770⟩⟩, + ⟨⟨-1308201435442345795277138074125716871506130,-1308201435442345795277138074125716871505930⟩,⟨-11306048388377950436377504049736120722906625,-11306048388377950436377504049736120722906425⟩⟩, + ⟨⟨-1081535901353212026366158717548348981899572291,-1081535901353212026366158717548348981899572125⟩,⟨-1706421595914040702202611191448304136682237723,-1706421595914040702202611191448304136682237558⟩⟩, + ⟨⟨-91413734375758588789654238681314164182628198903,-91413734375758588789654238681314164182628198773⟩,⟨-202002592540197346235089893813733020554587747312,-202002592540197346235089893813733020554587747181⟩⟩, + ⟨⟨2203179100625958800386401422105282048497533053717,2203179100625958800386401422105282048497533053832⟩,⟨-14775321438140724758520984018647926856249511809498,-14775321438140724758520984018647926856249511809383⟩⟩, + ⟨⟨539740734999189301882750150101187414507316400945404,539740734999189301882750150101187414507316400946536⟩,⟨-325720772156381870311169344309643541351092855941277,-325720772156381870311169344309643541351092855940145⟩⟩, + ⟨⟨14750959404709022084915078895773006484070733535020604,14750959404709022084915078895773006484070733535045214⟩,⟨8949720238052888443861399544449108635375718553216154,8949720238052888443861399544449108635375718553240779⟩⟩, + ⟨⟨-62401449242980356859628812660415385517022101165340482,-62401449242980356859628812660415385517022101164930767⟩,⟨313047747075481812361036628646852370002009750562939703,313047747075481812361036628646852370002009750563349144⟩⟩, + ⟨⟨-4155322976103572638451209333764027075409826163149812840,-4155322976103572638451209333764027075409826163142276307⟩,⟨305801907405084553864540366290026284524209663438457030,305801907405084553864540366290026284524209663445995089⟩⟩] +lemma tw1_1_5_1_calc (j : Fin 31) : taylorWaveBox 1 1 5 1 j = tw1_1_5_1 j := by + revert j + decide +kernel +def tw1_1_5_2 : Fin 31 → CI := ![⟨⟨1544057580198024845234556187990503673322192970614576304,1544057580198024845234556187990503673322192970620779336⟩,⟨-3583810855232122514980519798431321220329135568465820551,-3583810855232122514980519798431321220329135568459617956⟩⟩, + ⟨⟨307093563692793116140239791978826662421786545863214105,307093563692793116140239791978826662421786545863533591⟩,⟨57167893428703951570083035050406275959161404452115883,57167893428703951570083035050406275959161404452435315⟩⟩, + ⟨⟨2005057932398740879025505125234485585844116705248580,2005057932398740879025505125234485585844116705272061⟩,⟨17552480809704215844824735922176440041419306606016131,17552480809704215844824735922176440041419306606039613⟩⟩, + ⟨⟨-579484302743638319461894578497382574978732204149036,-579484302743638319461894578497382574978732204147609⟩,⟨348674252857785872953185414106529016321787552463370,348674252857785872953185414106529016321787552464797⟩⟩, + ⟨⟨-15502622942463492502315923980579585371121916570637,-15502622942463492502315923980579585371121916570469⟩,⟨-6497655893676941418375269694750108381068996025776,-6497655893676941418375269694750108381068996025608⟩⟩, + ⟨⟨-134078298865685430309140867975083833225556639156,-134078298865685430309140867975083833225556638979⟩,⟨-224965896881609569046154147763881959732523665773,-224965896881609569046154147763881959732523665596⟩⟩, + ⟨⟨-809277538104942792230299446752084395563319396,-809277538104942792230299446752084395563319193⟩,⟨-2371595291047870691872476289923586613581779660,-2371595291047870691872476289923586613581779458⟩⟩, + ⟨⟨-9594925960040833649189340792970001207536903,-9594925960040833649189340792970001207536694⟩,⟨-11296653863403220157585214906062508324953302,-11296653863403220157585214906062508324953093⟩⟩, + ⟨⟨-54816414368181100363462266079012639693776,-54816414368181100363462266079012639693435⟩,⟨15594864834442000205013182742382436496390,15594864834442000205013182742382436496702⟩⟩, + ⟨⟨117104718922986279165479868939415789886,117104718922986279165479868939415790314⟩,⟨108791292658198173096344945866624262517,108791292658198173096344945866624262945⟩⟩, + ⟨⟨-329270231011411672846292967237770625,-329270231011411672846292967237770095⟩,⟨-226627923195686299476026183828968790,-226627923195686299476026183828968280⟩⟩, + ⟨⟨774497467032153067581172095580665,774497467032153067581172095581191⟩,⟨-921464378374394870079737209642073,-921464378374394870079737209641547⟩⟩, + ⟨⟨5360968360888127642280474383809,5360968360888127642280474384389⟩,⟨-3633242081924344461142211616632,-3633242081924344461142211615995⟩⟩, + ⟨⟨-4845920923225550712548994024,-4845920923225550712548993271⟩,⟨-97582455598277686736091318538,-97582455598277686736091317785⟩⟩, + ⟨⟨-5506725747662108609842502411,-5506725747662108609842501676⟩,⟨3203019260298496835441998060,3203019260298496835441998759⟩⟩, + ⟨⟨2465850786319699652815655869,2465850786319699652815656621⟩,⟨-418,501⟩⟩, + ⟨⟨-5506725747662108609842502411,-5506725747662108609842501676⟩,⟨-3203019260298496835441998759,-3203019260298496835441998060⟩⟩, + ⟨⟨-4845920923225550712548994024,-4845920923225550712548993271⟩,⟨97582455598277686736091317785,97582455598277686736091318538⟩⟩, + ⟨⟨5360968360888127642280474383809,5360968360888127642280474384389⟩,⟨3633242081924344461142211615995,3633242081924344461142211616632⟩⟩, + ⟨⟨774497467032153067581172095580665,774497467032153067581172095581191⟩,⟨921464378374394870079737209641547,921464378374394870079737209642073⟩⟩, + ⟨⟨-329270231011411672846292967237770625,-329270231011411672846292967237770095⟩,⟨226627923195686299476026183828968280,226627923195686299476026183828968790⟩⟩, + ⟨⟨117104718922986279165479868939415789886,117104718922986279165479868939415790314⟩,⟨-108791292658198173096344945866624262945,-108791292658198173096344945866624262517⟩⟩, + ⟨⟨-54816414368181100363462266079012639693776,-54816414368181100363462266079012639693435⟩,⟨-15594864834442000205013182742382436496702,-15594864834442000205013182742382436496390⟩⟩, + ⟨⟨-9594925960040833649189340792970001207536903,-9594925960040833649189340792970001207536694⟩,⟨11296653863403220157585214906062508324953093,11296653863403220157585214906062508324953302⟩⟩, + ⟨⟨-809277538104942792230299446752084395563319396,-809277538104942792230299446752084395563319193⟩,⟨2371595291047870691872476289923586613581779458,2371595291047870691872476289923586613581779660⟩⟩, + ⟨⟨-134078298865685430309140867975083833225556639156,-134078298865685430309140867975083833225556638979⟩,⟨224965896881609569046154147763881959732523665596,224965896881609569046154147763881959732523665773⟩⟩, + ⟨⟨-15502622942463492502315923980579585371121916570637,-15502622942463492502315923980579585371121916570469⟩,⟨6497655893676941418375269694750108381068996025608,6497655893676941418375269694750108381068996025776⟩⟩, + ⟨⟨-579484302743638319461894578497382574978732204149036,-579484302743638319461894578497382574978732204147609⟩,⟨-348674252857785872953185414106529016321787552464797,-348674252857785872953185414106529016321787552463370⟩⟩, + ⟨⟨2005057932398740879025505125234485585844116705248580,2005057932398740879025505125234485585844116705272061⟩,⟨-17552480809704215844824735922176440041419306606039613,-17552480809704215844824735922176440041419306606016131⟩⟩, + ⟨⟨307093563692793116140239791978826662421786545863214105,307093563692793116140239791978826662421786545863533591⟩,⟨-57167893428703951570083035050406275959161404452435315,-57167893428703951570083035050406275959161404452115883⟩⟩, + ⟨⟨1544057580198024845234556187990503673322192970614576304,1544057580198024845234556187990503673322192970620779336⟩,⟨3583810855232122514980519798431321220329135568459617956,3583810855232122514980519798431321220329135568465820551⟩⟩] +lemma tw1_1_5_2_calc (j : Fin 31) : taylorWaveBox 1 1 5 2 j = tw1_1_5_2 j := by + revert j + decide +kernel +def tw1_1_5_3 : Fin 31 → CI := ![⟨⟨2158835620529657498827199917490130494954696500800583810,2158835620529657498827199917490130494954696500804817530⟩,⟨1971832395174849476914255768146417905956714883105467359,1971832395174849476914255768146417905956714883109700446⟩⟩, + ⟨⟨-130902915555609876209749396963121008590412380263309272,-130902915555609876209749396963121008590412380263004382⟩,⟨206556667541128602488751088987072963753020705419555013,206556667541128602488751088987072963753020705419860233⟩⟩, + ⟨⟨-13746627239576705191601643418731540010704077422667314,-13746627239576705191601643418731540010704077422643896⟩,⟨-4522992760760449143417461796117368545575060308009332,-4522992760760449143417461796117368545575060307985928⟩⟩, + ⟨⟨-32201838612312142239506409528797133273389236741602,-32201838612312142239506409528797133273389236740263⟩,⟨-579524912726732133701974446593074313901283679082843,-579524912726732133701974446593074313901283679081505⟩⟩, + ⟨⟨12235418266257227059987713663390638678985681064890,12235418266257227059987713663390638678985681065034⟩,⟨-8902182705526653907724636681672868040857542332398,-8902182705526653907724636681672868040857542332255⟩⟩, + ⟨⟨246845105759868288844010464878504762363099661991,246845105759868288844010464878504762363099662120⟩,⟨17529966581153889409394960203516850110591507954,17529966581153889409394960203516850110591508084⟩⟩, + ⟨⟨2337307522663426594810221844140164916419406952,2337307522663426594810221844140164916419407135⟩,⟨848410075138832511729092894860111770605611874,848410075138832511729092894860111770605612057⟩⟩, + ⟨⟨15423701668503186928934767689606912239907716,15423701668503186928934767689606912239907985⟩,⟨730946703768456808304216815966176788646866,730946703768456808304216815966176788647135⟩⟩, + ⟨⟨32815626185648612898954206744705812112492,32815626185648612898954206744705812112918⟩,⟨-52928450961188866452691833458404357992223,-52928450961188866452691833458404357991810⟩⟩, + ⟨⟨-181973152522113150648879468921567576169,-181973152522113150648879468921567575772⟩,⟨-17766697362367728357842218701209712761,-17766697362367728357842218701209712364⟩⟩, + ⟨⟨476618061117030840005968198883005611,476618061117030840005968198883006143⟩,⟨21819510551116595555897837986287040,21819510551116595555897837986287646⟩⟩, + ⟨⟨-358990776524530453895934936104112,-358990776524530453895934936103358⟩,⟨1448533583635787137423888793486951,1448533583635787137423888793487705⟩⟩, + ⟨⟨-4860011894445181562518239053652,-4860011894445181562518239052912⟩,⟨6713939467509098005004693351447,6713939467509098005004693352260⟩⟩, + ⟨⟨36062292498506631152193151151,36062292498506631152193152074⟩,⟨122910182062089740392018104063,122910182062089740392018104986⟩⟩, + ⟨⟨6771407624718472377839611251,6771407624718472377839612248⟩,⟨-5102595531623755416938916892,-5102595531623755416938915924⟩⟩, + ⟨⟨-3298754717073752156512795380,-3298754717073752156512794375⟩,⟨-670,558⟩⟩, + ⟨⟨6771407624718472377839611251,6771407624718472377839612248⟩,⟨5102595531623755416938915924,5102595531623755416938916892⟩⟩, + ⟨⟨36062292498506631152193151151,36062292498506631152193152074⟩,⟨-122910182062089740392018104986,-122910182062089740392018104063⟩⟩, + ⟨⟨-4860011894445181562518239053652,-4860011894445181562518239052912⟩,⟨-6713939467509098005004693352260,-6713939467509098005004693351447⟩⟩, + ⟨⟨-358990776524530453895934936104112,-358990776524530453895934936103358⟩,⟨-1448533583635787137423888793487705,-1448533583635787137423888793486951⟩⟩, + ⟨⟨476618061117030840005968198883005611,476618061117030840005968198883006143⟩,⟨-21819510551116595555897837986287646,-21819510551116595555897837986287040⟩⟩, + ⟨⟨-181973152522113150648879468921567576169,-181973152522113150648879468921567575772⟩,⟨17766697362367728357842218701209712364,17766697362367728357842218701209712761⟩⟩, + ⟨⟨32815626185648612898954206744705812112492,32815626185648612898954206744705812112918⟩,⟨52928450961188866452691833458404357991810,52928450961188866452691833458404357992223⟩⟩, + ⟨⟨15423701668503186928934767689606912239907716,15423701668503186928934767689606912239907985⟩,⟨-730946703768456808304216815966176788647135,-730946703768456808304216815966176788646866⟩⟩, + ⟨⟨2337307522663426594810221844140164916419406952,2337307522663426594810221844140164916419407135⟩,⟨-848410075138832511729092894860111770605612057,-848410075138832511729092894860111770605611874⟩⟩, + ⟨⟨246845105759868288844010464878504762363099661991,246845105759868288844010464878504762363099662120⟩,⟨-17529966581153889409394960203516850110591508084,-17529966581153889409394960203516850110591507954⟩⟩, + ⟨⟨12235418266257227059987713663390638678985681064890,12235418266257227059987713663390638678985681065034⟩,⟨8902182705526653907724636681672868040857542332255,8902182705526653907724636681672868040857542332398⟩⟩, + ⟨⟨-32201838612312142239506409528797133273389236741602,-32201838612312142239506409528797133273389236740263⟩,⟨579524912726732133701974446593074313901283679081505,579524912726732133701974446593074313901283679082843⟩⟩, + ⟨⟨-13746627239576705191601643418731540010704077422667314,-13746627239576705191601643418731540010704077422643896⟩,⟨4522992760760449143417461796117368545575060307985928,4522992760760449143417461796117368545575060308009332⟩⟩, + ⟨⟨-130902915555609876209749396963121008590412380263309272,-130902915555609876209749396963121008590412380263004382⟩,⟨-206556667541128602488751088987072963753020705419860233,-206556667541128602488751088987072963753020705419555013⟩⟩, + ⟨⟨2158835620529657498827199917490130494954696500800583810,2158835620529657498827199917490130494954696500804817530⟩,⟨-1971832395174849476914255768146417905956714883109700446,-1971832395174849476914255768146417905956714883105467359⟩⟩] +lemma tw1_1_5_3_calc (j : Fin 31) : taylorWaveBox 1 1 5 3 j = tw1_1_5_3 j := by + revert j + decide +kernel +def tw1_1_5_4 : Fin 31 → CI := ![⟨⟨-1604458345419183480415171527963784682567944026346200485,-1604458345419183480415171527963784682567944026342981379⟩,⟨870883834165561470779282425649447663322800301939282972,870883834165561470779282425649447663322800301942502965⟩⟩, + ⟨⟨-93361319134413012048987915603471893966221252808004204,-93361319134413012048987915603471893966221252807782064⟩,⟨-129366154494672941553464357303650046793541201907408347,-129366154494672941553464357303650046793541201907186456⟩⟩, + ⟨⟨6729893935809135571583946867283127209619447481450290,6729893935809135571583946867283127209619447481466276⟩,⟨-7231632284970818461180262587890008964902016421571518,-7231632284970818461180262587890008964902016421555521⟩⟩, + ⟨⟨377210152224039379411166471644144900449940601283884,377210152224039379411166471644144900449940601284707⟩,⟨173292911190003519328267447613358868077996597136697,173292911190003519328267447613358868077996597137520⟩⟩, + ⟨⟨953256946059539105641004077492080374279345576113,953256946059539105641004077492080374279345576205⟩,⟨11310512626042819921416304242348398296519038643623,11310512626042819921416304242348398296519038643715⟩⟩, + ⟨⟨-122417701515105967275369466626374598353116666237,-122417701515105967275369466626374598353116666110⟩,⟨151611638594909080706991239269100558569015370179,151611638594909080706991239269100558569015370306⟩⟩, + ⟨⟨-1757639665649546437514656696059612724522005844,-1757639665649546437514656696059612724522005669⟩,⟨1066899584979866006138838619844839075134658827,1066899584979866006138838619844839075134659002⟩⟩, + ⟨⟨-9605507531788857535968815547990483517382503,-9605507531788857535968815547990483517382306⟩,⟨9350802113368478738428587929396329803944051,9350802113368478738428587929396329803944248⟩⟩, + ⟨⟨10355255213970460514510049176121214708705,10355255213970460514510049176121214709036⟩,⟨55755001055093259117740635810353222003211,55755001055093259117740635810353222003567⟩⟩, + ⟨⟨148222201791814928081472153990751576997,148222201791814928081472153990751577479⟩,⟨-91685872986977011813136133044989913951,-91685872986977011813136133044989913469⟩⟩, + ⟨⟨-413881324293853024989659094168584533,-413881324293853024989659094168584063⟩,⟨232223980235512227015284775100978646,232223980235512227015284775100979214⟩⟩, + ⟨⟨-326062033763483051950588926016685,-326062033763483051950588926015959⟩,⟨-1506961944942929365312362706926375,-1506961944942929365312362706925650⟩⟩, + ⟨⟨2425511207473501282273405111235,2425511207473501282273405112195⟩,⟨-8500436922508519983813277373127,-8500436922508519983813277372132⟩⟩, + ⟨⟨-69676981491875023281991917801,-69676981491875023281991916918⟩,⟨-121364053935475425744175645400,-121364053935475425744175644517⟩⟩, + ⟨⟨-6785586430944804781147873589,-6785586430944804781147872476⟩,⟨6510564491486401153483549340,6510564491486401153483550441⟩⟩, + ⟨⟨3677494310073221874579834531,3677494310073221874579835651⟩,⟨-622,747⟩⟩, + ⟨⟨-6785586430944804781147873589,-6785586430944804781147872476⟩,⟨-6510564491486401153483550441,-6510564491486401153483549340⟩⟩, + ⟨⟨-69676981491875023281991917801,-69676981491875023281991916918⟩,⟨121364053935475425744175644517,121364053935475425744175645400⟩⟩, + ⟨⟨2425511207473501282273405111235,2425511207473501282273405112195⟩,⟨8500436922508519983813277372132,8500436922508519983813277373127⟩⟩, + ⟨⟨-326062033763483051950588926016685,-326062033763483051950588926015959⟩,⟨1506961944942929365312362706925650,1506961944942929365312362706926375⟩⟩, + ⟨⟨-413881324293853024989659094168584533,-413881324293853024989659094168584063⟩,⟨-232223980235512227015284775100979214,-232223980235512227015284775100978646⟩⟩, + ⟨⟨148222201791814928081472153990751576997,148222201791814928081472153990751577479⟩,⟨91685872986977011813136133044989913469,91685872986977011813136133044989913951⟩⟩, + ⟨⟨10355255213970460514510049176121214708705,10355255213970460514510049176121214709036⟩,⟨-55755001055093259117740635810353222003567,-55755001055093259117740635810353222003211⟩⟩, + ⟨⟨-9605507531788857535968815547990483517382503,-9605507531788857535968815547990483517382306⟩,⟨-9350802113368478738428587929396329803944248,-9350802113368478738428587929396329803944051⟩⟩, + ⟨⟨-1757639665649546437514656696059612724522005844,-1757639665649546437514656696059612724522005669⟩,⟨-1066899584979866006138838619844839075134659002,-1066899584979866006138838619844839075134658827⟩⟩, + ⟨⟨-122417701515105967275369466626374598353116666237,-122417701515105967275369466626374598353116666110⟩,⟨-151611638594909080706991239269100558569015370306,-151611638594909080706991239269100558569015370179⟩⟩, + ⟨⟨953256946059539105641004077492080374279345576113,953256946059539105641004077492080374279345576205⟩,⟨-11310512626042819921416304242348398296519038643715,-11310512626042819921416304242348398296519038643623⟩⟩, + ⟨⟨377210152224039379411166471644144900449940601283884,377210152224039379411166471644144900449940601284707⟩,⟨-173292911190003519328267447613358868077996597137520,-173292911190003519328267447613358868077996597136697⟩⟩, + ⟨⟨6729893935809135571583946867283127209619447481450290,6729893935809135571583946867283127209619447481466276⟩,⟨7231632284970818461180262587890008964902016421555521,7231632284970818461180262587890008964902016421571518⟩⟩, + ⟨⟨-93361319134413012048987915603471893966221252808004204,-93361319134413012048987915603471893966221252807782064⟩,⟨129366154494672941553464357303650046793541201907186456,129366154494672941553464357303650046793541201907408347⟩⟩, + ⟨⟨-1604458345419183480415171527963784682567944026346200485,-1604458345419183480415171527963784682567944026342981379⟩,⟨-870883834165561470779282425649447663322800301942502965,-870883834165561470779282425649447663322800301939282972⟩⟩] +lemma tw1_1_5_4_calc (j : Fin 31) : taylorWaveBox 1 1 5 4 j = tw1_1_5_4 j := by + revert j + decide +kernel +def tw1_1_5_5 : Fin 31 → CI := ![⟨⟨-159458251497403374229417103052333684285189691496359634,-159458251497403374229417103052333684285189691494509602⟩,⟨-963918252110740093063318867132155209561070338708558326,-963918252110740093063318867132155209561070338706708777⟩⟩, + ⟨⟨86561669903225828926537514281451037587481021135894578,86561669903225828926537514281451037587481021136014580⟩,⟨-21580123419446946398917814024579279196605072912423906,-21580123419446946398917814024579279196605072912303814⟩⟩, + ⟨⟨2195975952309551072070862403345045638244960029524941,2195975952309551072070862403345045638244960029532661⟩,⟨5346669787382922945454800253186310035051183558965779,5346669787382922945454800253186310035051183558973495⟩⟩, + ⟨⟨-201966042437247627718505474339889538838232122430999,-201966042437247627718505474339889538838232122430477⟩,⟨154810711847213472733573739614006226676106104844446,154810711847213472733573739614006226676106104844967⟩⟩, + ⟨⟨-6536902681045319295451364384521948225871109131734,-6536902681045319295451364384521948225871109131659⟩,⟨-3245461089440293960513800085761043267487239857529,-3245461089440293960513800085761043267487239857455⟩⟩, + ⟨⟨-36747390436248849725403546120696943795515014207,-36747390436248849725403546120696943795515014122⟩,⟨-126285160243052813883572634068455285629614640114,-126285160243052813883572634068455285629614640029⟩⟩, + ⟨⟨191067179430678042984113674536831087662150600,191067179430678042984113674536831087662150691⟩,⟨-1444728503637610751718927894417835796995316995,-1444728503637610751718927894417835796995316903⟩⟩, + ⟨⟨-204327546051291678364164295129301663560297,-204327546051291678364164295129301663560125⟩,⟨-9973378791178603252985422546174008563017176,-9973378791178603252985422546174008563017005⟩⟩, + ⟨⟨-35275456815446242111404500112018926920962,-35275456815446242111404500112018926920678⟩,⟨-26734823499799401955238247682264045265231,-26734823499799401955238247682264045264934⟩⟩, + ⟨⟨-50903185755573366499879206564809014483,-50903185755573366499879206564809014164⟩,⟨132993915179818515124240873147901794204,132993915179818515124240873147901794522⟩⟩, + ⟨⟨194841750914471775558137225873764869,194841750914471775558137225873765398⟩,⟨-354616824446772552669091220167374388,-354616824446772552669091220167373855⟩⟩, + ⟨⟨846930747204014082969829017654283,846930747204014082969829017654796⟩,⟨1070977174861152863242138514206466,1070977174861152863242138514206979⟩⟩, + ⟨⟨570523584242847364854739045404,570523584242847364854739046331⟩,⟨8060770570387584387460309366556,8060770570387584387460309367473⟩⟩, + ⟨⟨89992535099438068626758246130,89992535099438068626758246909⟩,⟨95265234122245726410939405578,95265234122245726410939406356⟩⟩, + ⟨⟨5670764230959939167840370550,5670764230959939167840371600⟩,⟨-6911132418408201693964528829,-6911132418408201693964527771⟩⟩, + ⟨⟨-3514044080406641635930209652,-3514044080406641635930208581⟩,⟨-714,595⟩⟩, + ⟨⟨5670764230959939167840370550,5670764230959939167840371600⟩,⟨6911132418408201693964527771,6911132418408201693964528829⟩⟩, + ⟨⟨89992535099438068626758246130,89992535099438068626758246909⟩,⟨-95265234122245726410939406356,-95265234122245726410939405578⟩⟩, + ⟨⟨570523584242847364854739045404,570523584242847364854739046331⟩,⟨-8060770570387584387460309367473,-8060770570387584387460309366556⟩⟩, + ⟨⟨846930747204014082969829017654283,846930747204014082969829017654796⟩,⟨-1070977174861152863242138514206979,-1070977174861152863242138514206466⟩⟩, + ⟨⟨194841750914471775558137225873764869,194841750914471775558137225873765398⟩,⟨354616824446772552669091220167373855,354616824446772552669091220167374388⟩⟩, + ⟨⟨-50903185755573366499879206564809014483,-50903185755573366499879206564809014164⟩,⟨-132993915179818515124240873147901794522,-132993915179818515124240873147901794204⟩⟩, + ⟨⟨-35275456815446242111404500112018926920962,-35275456815446242111404500112018926920678⟩,⟨26734823499799401955238247682264045264934,26734823499799401955238247682264045265231⟩⟩, + ⟨⟨-204327546051291678364164295129301663560297,-204327546051291678364164295129301663560125⟩,⟨9973378791178603252985422546174008563017005,9973378791178603252985422546174008563017176⟩⟩, + ⟨⟨191067179430678042984113674536831087662150600,191067179430678042984113674536831087662150691⟩,⟨1444728503637610751718927894417835796995316903,1444728503637610751718927894417835796995316995⟩⟩, + ⟨⟨-36747390436248849725403546120696943795515014207,-36747390436248849725403546120696943795515014122⟩,⟨126285160243052813883572634068455285629614640029,126285160243052813883572634068455285629614640114⟩⟩, + ⟨⟨-6536902681045319295451364384521948225871109131734,-6536902681045319295451364384521948225871109131659⟩,⟨3245461089440293960513800085761043267487239857455,3245461089440293960513800085761043267487239857529⟩⟩, + ⟨⟨-201966042437247627718505474339889538838232122430999,-201966042437247627718505474339889538838232122430477⟩,⟨-154810711847213472733573739614006226676106104844967,-154810711847213472733573739614006226676106104844446⟩⟩, + ⟨⟨2195975952309551072070862403345045638244960029524941,2195975952309551072070862403345045638244960029532661⟩,⟨-5346669787382922945454800253186310035051183558973495,-5346669787382922945454800253186310035051183558965779⟩⟩, + ⟨⟨86561669903225828926537514281451037587481021135894578,86561669903225828926537514281451037587481021136014580⟩,⟨21580123419446946398917814024579279196605072912303814,21580123419446946398917814024579279196605072912423906⟩⟩, + ⟨⟨-159458251497403374229417103052333684285189691496359634,-159458251497403374229417103052333684285189691494509602⟩,⟨963918252110740093063318867132155209561070338706708777,963918252110740093063318867132155209561070338708558326⟩⟩] +lemma tw1_1_5_5_calc (j : Fin 31) : taylorWaveBox 1 1 5 5 j = tw1_1_5_5 j := by + revert j + decide +kernel +def tw1_1_5_6 : Fin 31 → CI := ![⟨⟨450974664579197500020838217279373227145191075971949498,450974664579197500020838217279373227145191075972784413⟩,⟨77137114207165145877685200204480564405143892999282137,77137114207165145877685200204480564405143893000117199⟩⟩, + ⟨⟨-5939085111667655946611696549676401771701953662576520,-5939085111667655946611696549676401771701953662527681⟩,⟨43244212907213149695658251182722388403606925008249888,43244212907213149695658251182722388403606925008298728⟩⟩, + ⟨⟨-2956613518548033286774041464650323256657852366634302,-2956613518548033286774041464650323256657852366629790⟩,⟨-123941743556651029083527481348884681696703968211288,-123941743556651029083527481348884681696703968206777⟩⟩, + ⟨⟨-22801317138414499345498338138358983003564971045970,-22801317138414499345498338138358983003564971045645⟩,⟨-134580365805338352617243669338695660658371772549245,-134580365805338352617243669338695660658371772548919⟩⟩, + ⟨⟨3467797621933836484783474009547693629838543045182,3467797621933836484783474009547693629838543045221⟩,⟨-2198628634938483684059691203714097310296905297687,-2198628634938483684059691203714097310296905297648⟩⟩, + ⟨⟨73603484145860466942207200148425958823195623004,73603484145860466942207200148425958823195623047⟩,⟨24816731101595955974153315173257065368882015140,24816731101595955974153315173257065368882015183⟩⟩, + ⟨⟨624118797669082045371959330288409549789721525,624118797669082045371959330288409549789721603⟩,⟨653684858776031930503189079698275643466018074,653684858776031930503189079698275643466018152⟩⟩, + ⟨⟨4835799399103066681894034842541098966643787,4835799399103066681894034842541098966643887⟩,⟨4336302905202062158737490013057707347027893,4336302905202062158737490013057707347027993⟩⟩, + ⟨⟨30106020292246964387773503902846352108983,30106020292246964387773503902846352109181⟩,⟨-2719947202105179218660386221606833575535,-2719947202105179218660386221606833575348⟩⟩, + ⟨⟨-28696244776151444965670505538755336157,-28696244776151444965670505538755335887⟩,⟨-97679123127677474089222432366280805707,-97679123127677474089222432366280805436⟩⟩, + ⟨⟨16487550084580508433627978295317076,16487550084580508433627978295317446⟩,⟨301399416682908364464053683449119744,301399416682908364464053683449120058⟩⟩, + ⟨⟨-954650951425254752226383752613082,-954650951425254752226383752612566⟩,⟨-456058827007581561882656823056304,-456058827007581561882656823055789⟩⟩, + ⟨⟨-2631423148716776986931727704080,-2631423148716776986931727703387⟩,⟨-5904009819543492176376641663587,-5904009819543492176376641662936⟩⟩, + ⟨⟨-89933860384028060657603131216,-89933860384028060657603130469⟩,⟨-58674929651382869900103936814,-58674929651382869900103936067⟩⟩, + ⟨⟨-4001586110060328392734340930,-4001586110060328392734340075⟩,⟨6268046305812585470728587928,6268046305812585470728588805⟩⟩, + ⟨⟨2938126252041897679158222800,2938126252041897679158223695⟩,⟨-497,597⟩⟩, + ⟨⟨-4001586110060328392734340930,-4001586110060328392734340075⟩,⟨-6268046305812585470728588805,-6268046305812585470728587928⟩⟩, + ⟨⟨-89933860384028060657603131216,-89933860384028060657603130469⟩,⟨58674929651382869900103936067,58674929651382869900103936814⟩⟩, + ⟨⟨-2631423148716776986931727704080,-2631423148716776986931727703387⟩,⟨5904009819543492176376641662936,5904009819543492176376641663587⟩⟩, + ⟨⟨-954650951425254752226383752613082,-954650951425254752226383752612566⟩,⟨456058827007581561882656823055789,456058827007581561882656823056304⟩⟩, + ⟨⟨16487550084580508433627978295317076,16487550084580508433627978295317446⟩,⟨-301399416682908364464053683449120058,-301399416682908364464053683449119744⟩⟩, + ⟨⟨-28696244776151444965670505538755336157,-28696244776151444965670505538755335887⟩,⟨97679123127677474089222432366280805436,97679123127677474089222432366280805707⟩⟩, + ⟨⟨30106020292246964387773503902846352108983,30106020292246964387773503902846352109181⟩,⟨2719947202105179218660386221606833575348,2719947202105179218660386221606833575535⟩⟩, + ⟨⟨4835799399103066681894034842541098966643787,4835799399103066681894034842541098966643887⟩,⟨-4336302905202062158737490013057707347027993,-4336302905202062158737490013057707347027893⟩⟩, + ⟨⟨624118797669082045371959330288409549789721525,624118797669082045371959330288409549789721603⟩,⟨-653684858776031930503189079698275643466018152,-653684858776031930503189079698275643466018074⟩⟩, + ⟨⟨73603484145860466942207200148425958823195623004,73603484145860466942207200148425958823195623047⟩,⟨-24816731101595955974153315173257065368882015183,-24816731101595955974153315173257065368882015140⟩⟩, + ⟨⟨3467797621933836484783474009547693629838543045182,3467797621933836484783474009547693629838543045221⟩,⟨2198628634938483684059691203714097310296905297648,2198628634938483684059691203714097310296905297687⟩⟩, + ⟨⟨-22801317138414499345498338138358983003564971045970,-22801317138414499345498338138358983003564971045645⟩,⟨134580365805338352617243669338695660658371772548919,134580365805338352617243669338695660658371772549245⟩⟩, + ⟨⟨-2956613518548033286774041464650323256657852366634302,-2956613518548033286774041464650323256657852366629790⟩,⟨123941743556651029083527481348884681696703968206777,123941743556651029083527481348884681696703968211288⟩⟩, + ⟨⟨-5939085111667655946611696549676401771701953662576520,-5939085111667655946611696549676401771701953662527681⟩,⟨-43244212907213149695658251182722388403606925008298728,-43244212907213149695658251182722388403606925008249888⟩⟩, + ⟨⟨450974664579197500020838217279373227145191075971949498,450974664579197500020838217279373227145191075972784413⟩,⟨-77137114207165145877685200204480564405143893000117199,-77137114207165145877685200204480564405143892999282137⟩⟩] +lemma tw1_1_5_6_calc (j : Fin 31) : taylorWaveBox 1 1 5 6 j = tw1_1_5_6 j := by + revert j + decide +kernel +def tw1_1_5_7 : Fin 31 → CI := ![⟨⟨-91764816164998157711882454764789009040400101799548605,-91764816164998157711882454764789009040400101799249775⟩,⟨166880241400238028965615925882753625535879183864609731,166880241400238028965615925882753625535879183864908555⟩⟩, + ⟨⟨-16500621077043545312435076753903647689110096651542684,-16500621077043545312435076753903647689110096651518218⟩,⟨-9388381638363050937561879046834752273603097286937625,-9388381638363050937561879046834752273603097286913182⟩⟩, + ⟨⟨614098017028385814165322277772558985401147965976846,614098017028385814165322277772558985401147965979179⟩,⟨-1198517904742608570673267550372082599761011854656767,-1198517904742608570673267550372082599761011854654433⟩⟩, + ⟨⟨61812127310444857684128960523214508763015194180709,61812127310444857684128960523214508763015194180853⟩,⟨20369134445342996372179339526995691959743228504328,20369134445342996372179339526995691959743228504472⟩⟩, + ⟨⟨41357830298554929242572152278698156598176568961,41357830298554929242572152278698156598176568979⟩,⟨2053000144982218831594855069629034238760731054598,2053000144982218831594855069629034238760731054616⟩⟩, + ⟨⟨-32773436243506461196697337115328891397865175291,-32773436243506461196697337115328891397865175263⟩,⟨24260594493235156566300863080441441307160433866,24260594493235156566300863080441441307160433894⟩⟩, + ⟨⟨-496418371485547215175107617871038179034659807,-496418371485547215175107617871038179034659771⟩,⟨42407533719568574244647950110652381500209952,42407533719568574244647950110652381500209988⟩⟩, + ⟨⟨-3744653887590362668035782935102235304990651,-3744653887590362668035782935102235304990587⟩,⟨331607669531169670317727758529871941249944,331607669531169670317727758529871941250008⟩⟩, + ⟨⟨-12401682225617676991078329190471379221141,-12401682225617676991078329190471379221021⟩,⟨13525928118790737702137985799671817991160,13525928118790737702137985799671817991273⟩⟩, + ⟨⟨52133153396547964665715396132113513857,52133153396547964665715396132113514025⟩,⟨38312697457369377961678858219071143697,38312697457369377961678858219071143865⟩⟩, + ⟨⟨-114947794990202412093175616618597287,-114947794990202412093175616618597036⟩,⟨-163866539174159508034204620361958016,-163866539174159508034204620361957801⟩⟩, + ⟨⟨728674128743973759308111090609329,728674128743973759308111090609693⟩,⟨-7544674122907362066439011080593,-7544674122907362066439011080229⟩⟩, + ⟨⟨3192398387248625977472786419908,3192398387248625977472786420307⟩,⟨3306212729510690662461451124340,3306212729510690662461451124690⟩⟩, + ⟨⟨73674164344761764850127396868,73674164344761764850127397462⟩,⟨26252212341695402526855772182,26252212341695402526855772776⟩⟩, + ⟨⟨2387912132947901449596160387,2387912132947901449596160996⟩,⟨-4952995745046042919706240825,-4952995745046042919706240187⟩⟩, + ⟨⟨-2183640696944704541761406446,-2183640696944704541761405780⟩,⟨-444,370⟩⟩, + ⟨⟨2387912132947901449596160387,2387912132947901449596160996⟩,⟨4952995745046042919706240187,4952995745046042919706240825⟩⟩, + ⟨⟨73674164344761764850127396868,73674164344761764850127397462⟩,⟨-26252212341695402526855772776,-26252212341695402526855772182⟩⟩, + ⟨⟨3192398387248625977472786419908,3192398387248625977472786420307⟩,⟨-3306212729510690662461451124690,-3306212729510690662461451124340⟩⟩, + ⟨⟨728674128743973759308111090609329,728674128743973759308111090609693⟩,⟨7544674122907362066439011080229,7544674122907362066439011080593⟩⟩, + ⟨⟨-114947794990202412093175616618597287,-114947794990202412093175616618597036⟩,⟨163866539174159508034204620361957801,163866539174159508034204620361958016⟩⟩, + ⟨⟨52133153396547964665715396132113513857,52133153396547964665715396132113514025⟩,⟨-38312697457369377961678858219071143865,-38312697457369377961678858219071143697⟩⟩, + ⟨⟨-12401682225617676991078329190471379221141,-12401682225617676991078329190471379221021⟩,⟨-13525928118790737702137985799671817991273,-13525928118790737702137985799671817991160⟩⟩, + ⟨⟨-3744653887590362668035782935102235304990651,-3744653887590362668035782935102235304990587⟩,⟨-331607669531169670317727758529871941250008,-331607669531169670317727758529871941249944⟩⟩, + ⟨⟨-496418371485547215175107617871038179034659807,-496418371485547215175107617871038179034659771⟩,⟨-42407533719568574244647950110652381500209988,-42407533719568574244647950110652381500209952⟩⟩, + ⟨⟨-32773436243506461196697337115328891397865175291,-32773436243506461196697337115328891397865175263⟩,⟨-24260594493235156566300863080441441307160433894,-24260594493235156566300863080441441307160433866⟩⟩, + ⟨⟨41357830298554929242572152278698156598176568961,41357830298554929242572152278698156598176568979⟩,⟨-2053000144982218831594855069629034238760731054616,-2053000144982218831594855069629034238760731054598⟩⟩, + ⟨⟨61812127310444857684128960523214508763015194180709,61812127310444857684128960523214508763015194180853⟩,⟨-20369134445342996372179339526995691959743228504472,-20369134445342996372179339526995691959743228504328⟩⟩, + ⟨⟨614098017028385814165322277772558985401147965976846,614098017028385814165322277772558985401147965979179⟩,⟨1198517904742608570673267550372082599761011854654433,1198517904742608570673267550372082599761011854656767⟩⟩, + ⟨⟨-16500621077043545312435076753903647689110096651542684,-16500621077043545312435076753903647689110096651518218⟩,⟨9388381638363050937561879046834752273603097286913182,9388381638363050937561879046834752273603097286937625⟩⟩, + ⟨⟨-91764816164998157711882454764789009040400101799548605,-91764816164998157711882454764789009040400101799249775⟩,⟨-166880241400238028965615925882753625535879183864908555,-166880241400238028965615925882753625535879183864609731⟩⟩] +lemma tw1_1_5_7_calc (j : Fin 31) : taylorWaveBox 1 1 5 7 j = tw1_1_5_7 j := by + revert j + decide +kernel +def tw1_1_5_8 : Fin 31 → CI := ![⟨⟨-47827937979162474503965927464951397280149708707526349,-47827937979162474503965927464951397280149708707408398⟩,⟨-52941806211398196151809812856432391785227135442155581,-52941806211398196151809812856432391785227135442037652⟩⟩, + ⟨⟨5812233610049292750966682159986127777488052719955774,5812233610049292750966682159986127777488052719966742⟩,⟨-4630336504335771615704017533048416113200628140142194,-4630336504335771615704017533048416113200628140131214⟩⟩, + ⟨⟨340647306899222836220718708174220401230035820513928,340647306899222836220718708174220401230035820514841⟩,⟨433804761567455695577071155632858607869825898361446,433804761567455695577071155632858607869825898362359⟩⟩, + ⟨⟨-20121124769387843207179388394082458388789715759229,-20121124769387843207179388394082458388789715759171⟩,⟨19367353755397184137977003894648362214958412036100,19367353755397184137977003894648362214958412036158⟩⟩, + ⟨⟨-799852408491912506612129199708238998838621136743,-799852408491912506612129199708238998838621136732⟩,⟨-463044516208252591020325311207576274354066403947,-463044516208252591020325311207576274354066403936⟩⟩, + ⟨⟨-556054394820412622963289057578307597228011188,-556054394820412622963289057578307597228011176⟩,⟨-19257050782182133615375794398141557662393913354,-19257050782182133615375794398141557662393913342⟩⟩, + ⟨⟨137901226790703164459997829793056012783038541,137901226790703164459997829793056012783038562⟩,⟨-205148965754474547000591244869663892574241778,-205148965754474547000591244869663892574241757⟩⟩, + ⟨⟨1205489896377568620990567813394250644239710,1205489896377568620990567813394250644239742⟩,⟨-1543184369722683643136306305965065424842034,-1543184369722683643136306305965065424842002⟩⟩, + ⟨⟨34423699604221670790010832522951404759,34423699604221670790010832522951404825⟩,⟨-10026102375169430799021735999486270947582,-10026102375169430799021735999486270947514⟩⟩, + ⟨⟨-36997198309562507175778875754781217208,-36997198309562507175778875754781217120⟩,⟨648264912672110433955637340683852698,648264912672110433955637340683852786⟩⟩, + ⟨⟨109934922005376163025033476848898401,109934922005376163025033476848898557⟩,⟨46741563293918133322684779124830727,46741563293918133322684779124830885⟩⟩, + ⟨⟨-403481760532333722634109764155532,-403481760532333722634109764155347⟩,⟨203118337708179902379480065257508,203118337708179902379480065257693⟩⟩, + ⟨⟨-2642685447627884898818381942855,-2642685447627884898818381942540⟩,⟨-1290596650318233132178421494296,-1290596650318233132178421494000⟩⟩, + ⟨⟨-50978364255188317116655414533,-50978364255188317116655414132⟩,⟨-5451180602578588449397582881,-5451180602578588449397582480⟩⟩, + ⟨⟨-1186712336575990740346664426,-1186712336575990740346664041⟩,⟨3461328903832190984830344522,3461328903832190984830344932⟩⟩, + ⟨⟨1460610489775727750137092757,1460610489775727750137093203⟩,⟨-248,297⟩⟩, + ⟨⟨-1186712336575990740346664426,-1186712336575990740346664041⟩,⟨-3461328903832190984830344932,-3461328903832190984830344522⟩⟩, + ⟨⟨-50978364255188317116655414533,-50978364255188317116655414132⟩,⟨5451180602578588449397582480,5451180602578588449397582881⟩⟩, + ⟨⟨-2642685447627884898818381942855,-2642685447627884898818381942540⟩,⟨1290596650318233132178421494000,1290596650318233132178421494296⟩⟩, + ⟨⟨-403481760532333722634109764155532,-403481760532333722634109764155347⟩,⟨-203118337708179902379480065257693,-203118337708179902379480065257508⟩⟩, + ⟨⟨109934922005376163025033476848898401,109934922005376163025033476848898557⟩,⟨-46741563293918133322684779124830885,-46741563293918133322684779124830727⟩⟩, + ⟨⟨-36997198309562507175778875754781217208,-36997198309562507175778875754781217120⟩,⟨-648264912672110433955637340683852786,-648264912672110433955637340683852698⟩⟩, + ⟨⟨34423699604221670790010832522951404759,34423699604221670790010832522951404825⟩,⟨10026102375169430799021735999486270947514,10026102375169430799021735999486270947582⟩⟩, + ⟨⟨1205489896377568620990567813394250644239710,1205489896377568620990567813394250644239742⟩,⟨1543184369722683643136306305965065424842002,1543184369722683643136306305965065424842034⟩⟩, + ⟨⟨137901226790703164459997829793056012783038541,137901226790703164459997829793056012783038562⟩,⟨205148965754474547000591244869663892574241757,205148965754474547000591244869663892574241778⟩⟩, + ⟨⟨-556054394820412622963289057578307597228011188,-556054394820412622963289057578307597228011176⟩,⟨19257050782182133615375794398141557662393913342,19257050782182133615375794398141557662393913354⟩⟩, + ⟨⟨-799852408491912506612129199708238998838621136743,-799852408491912506612129199708238998838621136732⟩,⟨463044516208252591020325311207576274354066403936,463044516208252591020325311207576274354066403947⟩⟩, + ⟨⟨-20121124769387843207179388394082458388789715759229,-20121124769387843207179388394082458388789715759171⟩,⟨-19367353755397184137977003894648362214958412036158,-19367353755397184137977003894648362214958412036100⟩⟩, + ⟨⟨340647306899222836220718708174220401230035820513928,340647306899222836220718708174220401230035820514841⟩,⟨-433804761567455695577071155632858607869825898362359,-433804761567455695577071155632858607869825898361446⟩⟩, + ⟨⟨5812233610049292750966682159986127777488052719955774,5812233610049292750966682159986127777488052719966742⟩,⟨4630336504335771615704017533048416113200628140131214,4630336504335771615704017533048416113200628140142194⟩⟩, + ⟨⟨-47827937979162474503965927464951397280149708707526349,-47827937979162474503965927464951397280149708707408398⟩,⟨52941806211398196151809812856432391785227135442037652,52941806211398196151809812856432391785227135442155581⟩⟩] +lemma tw1_1_5_8_calc (j : Fin 31) : taylorWaveBox 1 1 5 8 j = tw1_1_5_8 j := by + revert j + decide +kernel +def tw1_1_5_9 : Fin 31 → CI := ![⟨⟨22367787176311565289445563502037698380401302594932815,22367787176311565289445563502037698380401302594980047⟩,⟨-9492437417558026273601001844809542475474824357112003,-9492437417558026273601001844809542475474824357064759⟩⟩, + ⟨⟨760947113150715903240354083911092842263066095599586,760947113150715903240354083911092842263066095603509⟩,⟨2532506702334300433174623394128339939745864613974953,2532506702334300433174623394128339939745864613978872⟩⟩, + ⟨⟨-199770292016403271421183299472947370066756143990416,-199770292016403271421183299472947370066756143990129⟩,⟨47634901632099466044376160589218732529200262170214,47634901632099466044376160589218732529200262170501⟩⟩, + ⟨⟨-3012437049868893809125837035314728035613781877657,-3012437049868893809125837035314728035613781877628⟩,⟨-10469982405503863771775121967318334119209645519971,-10469982405503863771775121967318334119209645519942⟩⟩, + ⟨⟨331665105250469380130141325834566623548940807951,331665105250469380130141325834566623548940807956⟩,⟨-181669830560245552868595151021665440333991909337,-181669830560245552868595151021665440333991909332⟩⟩, + ⟨⟨6923639094889996550894516558533244977645362809,6923639094889996550894516558533244977645362815⟩,⟨4531187000942536090883116148344537933972903131,4531187000942536090883116148344537933972903137⟩⟩, + ⟨⟨33153345703450780190820868207871958986494340,33153345703450780190820868207871958986494350⟩,⟨106448215735383022555067345996608205744015636,106448215735383022555067345996608205744015646⟩⟩, + ⟨⟨144224277167747020707899974687302223943845,144224277167747020707899974687302223943861⟩,⟨916019795213733460310927154267901072129855,916019795213733460310927154267901072129871⟩⟩, + ⟨⟨3340192136115927071821949133823040812064,3340192136115927071821949133823040812094⟩,⟨3693589067978085320821768621159435885706,3693589067978085320821768621159435885738⟩⟩, + ⟨⟨15094535074084901245164920643217861880,15094535074084901245164920643217861934⟩,⟨-11929445304084011757686681893748722942,-11929445304084011757686681893748722888⟩⟩, + ⟨⟨-64035434880843700543882356930715751,-64035434880843700543882356930715688⟩,⟨10008744152351207802490092916330470,10008744152351207802490092916330547⟩⟩, + ⟨⟨153734230888114782360817047921854,153734230888114782360817047921969⟩,⟨-202900558990968044779914091071898,-202900558990968044779914091071783⟩⟩, + ⟨⟨1701345852574368265099764223881,1701345852574368265099764224078⟩,⟨180476884500575398555860226725,180476884500575398555860226920⟩⟩, + ⟨⟨30297565555775763113879140617,30297565555775763113879140849⟩,⟨-3937872299881767650377059732,-3937872299881767650377059499⟩⟩, + ⟨⟨464362520728988866706885815,464362520728988866706886032⟩,⟨-2164393357216842603655690931,-2164393357216842603655690694⟩⟩, + ⟨⟨-888167680794350565728803779,-888167680794350565728803507⟩,⟨-181,151⟩⟩, + ⟨⟨464362520728988866706885815,464362520728988866706886032⟩,⟨2164393357216842603655690694,2164393357216842603655690931⟩⟩, + ⟨⟨30297565555775763113879140617,30297565555775763113879140849⟩,⟨3937872299881767650377059499,3937872299881767650377059732⟩⟩, + ⟨⟨1701345852574368265099764223881,1701345852574368265099764224078⟩,⟨-180476884500575398555860226920,-180476884500575398555860226725⟩⟩, + ⟨⟨153734230888114782360817047921854,153734230888114782360817047921969⟩,⟨202900558990968044779914091071783,202900558990968044779914091071898⟩⟩, + ⟨⟨-64035434880843700543882356930715751,-64035434880843700543882356930715688⟩,⟨-10008744152351207802490092916330547,-10008744152351207802490092916330470⟩⟩, + ⟨⟨15094535074084901245164920643217861880,15094535074084901245164920643217861934⟩,⟨11929445304084011757686681893748722888,11929445304084011757686681893748722942⟩⟩, + ⟨⟨3340192136115927071821949133823040812064,3340192136115927071821949133823040812094⟩,⟨-3693589067978085320821768621159435885738,-3693589067978085320821768621159435885706⟩⟩, + ⟨⟨144224277167747020707899974687302223943845,144224277167747020707899974687302223943861⟩,⟨-916019795213733460310927154267901072129871,-916019795213733460310927154267901072129855⟩⟩, + ⟨⟨33153345703450780190820868207871958986494340,33153345703450780190820868207871958986494350⟩,⟨-106448215735383022555067345996608205744015646,-106448215735383022555067345996608205744015636⟩⟩, + ⟨⟨6923639094889996550894516558533244977645362809,6923639094889996550894516558533244977645362815⟩,⟨-4531187000942536090883116148344537933972903137,-4531187000942536090883116148344537933972903131⟩⟩, + ⟨⟨331665105250469380130141325834566623548940807951,331665105250469380130141325834566623548940807956⟩,⟨181669830560245552868595151021665440333991909332,181669830560245552868595151021665440333991909337⟩⟩, + ⟨⟨-3012437049868893809125837035314728035613781877657,-3012437049868893809125837035314728035613781877628⟩,⟨10469982405503863771775121967318334119209645519942,10469982405503863771775121967318334119209645519971⟩⟩, + ⟨⟨-199770292016403271421183299472947370066756143990416,-199770292016403271421183299472947370066756143990129⟩,⟨-47634901632099466044376160589218732529200262170501,-47634901632099466044376160589218732529200262170214⟩⟩, + ⟨⟨760947113150715903240354083911092842263066095599586,760947113150715903240354083911092842263066095603509⟩,⟨-2532506702334300433174623394128339939745864613978872,-2532506702334300433174623394128339939745864613974953⟩⟩, + ⟨⟨22367787176311565289445563502037698380401302594932815,22367787176311565289445563502037698380401302594980047⟩,⟨9492437417558026273601001844809542475474824357064759,9492437417558026273601001844809542475474824357112003⟩⟩] +lemma tw1_1_5_9_calc (j : Fin 31) : taylorWaveBox 1 1 5 9 j = tw1_1_5_9 j := by + revert j + decide +kernel +def tw1_1_5_10 : Fin 31 → CI := ![⟨⟨515413799609961856123391988421131926567838961246807,515413799609961856123391988421131926567838961262365⟩,⟨7568280124282097220925594378068208992695830520813829,7568280124282097220925594378068208992695830520829384⟩⟩, + ⟨⟨-859164960332393939937127298773097153636566707696414,-859164960332393939937127298773097153636566707695280⟩,⟨-76596971942187086738693855624177914941346067697057,-76596971942187086738693855624177914941346067695924⟩⟩, + ⟨⟨13756148014132917731913454651846008622290647674970,13756148014132917731913454651846008622290647675099⟩,⟨-68732533871215017192960607706756930681215313629635,-68732533871215017192960607706756930681215313629507⟩⟩, + ⟨⟨3813549345503143760520539267772226038258161387958,3813549345503143760520539267772226038258161387969⟩,⟨796910084325400210340241973806413568158292561854,796910084325400210340241973806413568158292561865⟩⟩, + ⟨⟨-6210107856020127532894224754602090341888340173,-6210107856020127532894224754602090341888340171⟩,⟨141701625057412930099688723025417036075555828866,141701625057412930099688723025417036075555828869⟩⟩, + ⟨⟨-3021893566992475954615724366505452999331007339,-3021893566992475954615724366505452999331007336⟩,⟨1217269743019552098026216761325112295911434986,1217269743019552098026216761325112295911434989⟩⟩, + ⟨⟨-42890868443702362872599631142174133913689731,-42890868443702362872599631142174133913689726⟩,⟨-16888711677588204341356980964311467712294831,-16888711677588204341356980964311467712294827⟩⟩, + ⟨⟨-333280944974219342548946798920646817882951,-333280944974219342548946798920646817882943⟩,⟨-225724060922342868426858122522716016574073,-225724060922342868426858122522716016574065⟩⟩, + ⟨⟨-2256702936971456545040248435870424825752,-2256702936971456545040248435870424825736⟩,⟨-219515968667206003861927579569847845810,-219515968667206003861927579569847845794⟩⟩, + ⟨⟨-2274880287278529219869871983132456053,-2274880287278529219869871983132456034⟩,⟨8883174383465426048729479753387510632,8883174383465426048729479753387510652⟩⟩, + ⟨⟨24400712263912375877990578628725956,24400712263912375877990578628725994⟩,⟨-21062797115549668430779270878624009,-21062797115549668430779270878623966⟩⟩, + ⟨⟨-25142398392004962577133685127012,-25142398392004962577133685126944⟩,⟨129076087520098752895605633806549,129076087520098752895605633806616⟩⟩, + ⟨⟨-885563607160758847427126447190,-885563607160758847427126447090⟩,⟨219463813798411843576668028729,219463813798411843576668028833⟩⟩, + ⟨⟨-15590064584740777187993858452,-15590064584740777187993858335⟩,⟨5957733109864050567719732991,5957733109864050567719733108⟩⟩, + ⟨⟨-113261685927477977967154139,-113261685927477977967154029⟩,⟨1222351696058598942955272453,1222351696058598942955272576⟩⟩, + ⟨⟨495070393625621114925545901,495070393625621114925546053⟩,⟨-84,101⟩⟩, + ⟨⟨-113261685927477977967154139,-113261685927477977967154029⟩,⟨-1222351696058598942955272576,-1222351696058598942955272453⟩⟩, + ⟨⟨-15590064584740777187993858452,-15590064584740777187993858335⟩,⟨-5957733109864050567719733108,-5957733109864050567719732991⟩⟩, + ⟨⟨-885563607160758847427126447190,-885563607160758847427126447090⟩,⟨-219463813798411843576668028833,-219463813798411843576668028729⟩⟩, + ⟨⟨-25142398392004962577133685127012,-25142398392004962577133685126944⟩,⟨-129076087520098752895605633806616,-129076087520098752895605633806549⟩⟩, + ⟨⟨24400712263912375877990578628725956,24400712263912375877990578628725994⟩,⟨21062797115549668430779270878623966,21062797115549668430779270878624009⟩⟩, + ⟨⟨-2274880287278529219869871983132456053,-2274880287278529219869871983132456034⟩,⟨-8883174383465426048729479753387510652,-8883174383465426048729479753387510632⟩⟩, + ⟨⟨-2256702936971456545040248435870424825752,-2256702936971456545040248435870424825736⟩,⟨219515968667206003861927579569847845794,219515968667206003861927579569847845810⟩⟩, + ⟨⟨-333280944974219342548946798920646817882951,-333280944974219342548946798920646817882943⟩,⟨225724060922342868426858122522716016574065,225724060922342868426858122522716016574073⟩⟩, + ⟨⟨-42890868443702362872599631142174133913689731,-42890868443702362872599631142174133913689726⟩,⟨16888711677588204341356980964311467712294827,16888711677588204341356980964311467712294831⟩⟩, + ⟨⟨-3021893566992475954615724366505452999331007339,-3021893566992475954615724366505452999331007336⟩,⟨-1217269743019552098026216761325112295911434989,-1217269743019552098026216761325112295911434986⟩⟩, + ⟨⟨-6210107856020127532894224754602090341888340173,-6210107856020127532894224754602090341888340171⟩,⟨-141701625057412930099688723025417036075555828869,-141701625057412930099688723025417036075555828866⟩⟩, + ⟨⟨3813549345503143760520539267772226038258161387958,3813549345503143760520539267772226038258161387969⟩,⟨-796910084325400210340241973806413568158292561865,-796910084325400210340241973806413568158292561854⟩⟩, + ⟨⟨13756148014132917731913454651846008622290647674970,13756148014132917731913454651846008622290647675099⟩,⟨68732533871215017192960607706756930681215313629507,68732533871215017192960607706756930681215313629635⟩⟩, + ⟨⟨-859164960332393939937127298773097153636566707696414,-859164960332393939937127298773097153636566707695280⟩,⟨76596971942187086738693855624177914941346067695924,76596971942187086738693855624177914941346067697057⟩⟩, + ⟨⟨515413799609961856123391988421131926567838961246807,515413799609961856123391988421131926567838961262365⟩,⟨-7568280124282097220925594378068208992695830520829384,-7568280124282097220925594378068208992695830520813829⟩⟩] +lemma tw1_1_5_10_calc (j : Fin 31) : taylorWaveBox 1 1 5 10 j = tw1_1_5_10 j := by + revert j + decide +kernel +def tw1_1_5_11 : Fin 31 → CI := ![⟨⟨-2109537309332041918516859284278163697340401701507243,-2109537309332041918516859284278163697340401701502939⟩,⟨-573287881404011140613783028606589034148981348855782,-573287881404011140613783028606589034148981348851477⟩⟩, + ⟨⟨117560933378784055242827843029092859097158466127082,117560933378784055242827843029092859097158466127461⟩,⟨-231592325289605861229895469093859904092667744840079,-231592325289605861229895469093859904092667744839699⟩⟩, + ⟨⟨17855787863020445217408973082184675159873937049755,17855787863020445217408973082184675159873937049800⟩,⟨12995364503763665984642740820007223886417780337014,12995364503763665984642740820007223886417780337059⟩⟩, + ⟨⟨-820730866112076995838514790455035943521701498776,-820730866112076995838514790455035943521701498772⟩,⟨990053197360790568480839444336310508844710382258,990053197360790568480839444336310508844710382262⟩⟩, + ⟨⟨-40840316959312055791370674876972559469941303448,-40840316959312055791370674876972559469941303447⟩,⟨-27268579555005226869658919891934723699791584893,-27268579555005226869658919891934723699791584891⟩⟩, + ⟨⟨264659916352300026401747054506784705917125151,264659916352300026401747054506784705917125152⟩,⟨-1154050032384664684291095235717598584847782664,-1154050032384664684291095235717598584847782662⟩⟩, + ⟨⟨15278930404988329142623311247220516012698943,15278930404988329142623311247220516012698945⟩,⟨-8720496324329028717080824563836367800244898,-8720496324329028717080824563836367800244895⟩⟩, + ⟨⟨157259227314187891853161968663738227620810,157259227314187891853161968663738227620814⟩,⟨-35828102140064979196024014168743479768592,-35828102140064979196024014168743479768589⟩⟩, + ⟨⟨763383628631520778483263081704952240129,763383628631520778483263081704952240136⟩,⟨-570348456521502378898196601047069933456,-570348456521502378898196601047069933450⟩⟩, + ⟨⟨-1573209946156509064311242058140607314,-1573209946156509064311242058140607302⟩,⟨-3714913436309757808024500656573887554,-3714913436309757808024500656573887542⟩⟩, + ⟨⟨-4396073350638926581275107420029663,-4396073350638926581275107420029643⟩,⟨14130091004121821810202635827666166,14130091004121821810202635827666186⟩⟩, + ⟨⟨-16341009057747945402370632730279,-16341009057747945402370632730250⟩,⟨-60538830105768220752952133784271,-60538830105768220752952133784241⟩⟩, + ⟨⟨372787674974858284530882700208,372787674974858284530882700249⟩,⟨-250435864588766922618258906822,-250435864588766922618258906777⟩⟩, + ⟨⟨6941932971523369426615783543,6941932971523369426615783594⟩,⟨-4757378581594979257329600589,-4757378581594979257329600538⟩⟩, + ⟨⟨-16683516877170294810761239,-16683516877170294810761188⟩,⟨-628176441147117322727340744,-628176441147117322727340686⟩⟩, + ⟨⟨-254728089624582268332292209,-254728089624582268332292130⟩,⟨-52,44⟩⟩, + ⟨⟨-16683516877170294810761239,-16683516877170294810761188⟩,⟨628176441147117322727340686,628176441147117322727340744⟩⟩, + ⟨⟨6941932971523369426615783543,6941932971523369426615783594⟩,⟨4757378581594979257329600538,4757378581594979257329600589⟩⟩, + ⟨⟨372787674974858284530882700208,372787674974858284530882700249⟩,⟨250435864588766922618258906777,250435864588766922618258906822⟩⟩, + ⟨⟨-16341009057747945402370632730279,-16341009057747945402370632730250⟩,⟨60538830105768220752952133784241,60538830105768220752952133784271⟩⟩, + ⟨⟨-4396073350638926581275107420029663,-4396073350638926581275107420029643⟩,⟨-14130091004121821810202635827666186,-14130091004121821810202635827666166⟩⟩, + ⟨⟨-1573209946156509064311242058140607314,-1573209946156509064311242058140607302⟩,⟨3714913436309757808024500656573887542,3714913436309757808024500656573887554⟩⟩, + ⟨⟨763383628631520778483263081704952240129,763383628631520778483263081704952240136⟩,⟨570348456521502378898196601047069933450,570348456521502378898196601047069933456⟩⟩, + ⟨⟨157259227314187891853161968663738227620810,157259227314187891853161968663738227620814⟩,⟨35828102140064979196024014168743479768589,35828102140064979196024014168743479768592⟩⟩, + ⟨⟨15278930404988329142623311247220516012698943,15278930404988329142623311247220516012698945⟩,⟨8720496324329028717080824563836367800244895,8720496324329028717080824563836367800244898⟩⟩, + ⟨⟨264659916352300026401747054506784705917125151,264659916352300026401747054506784705917125152⟩,⟨1154050032384664684291095235717598584847782662,1154050032384664684291095235717598584847782664⟩⟩, + ⟨⟨-40840316959312055791370674876972559469941303448,-40840316959312055791370674876972559469941303447⟩,⟨27268579555005226869658919891934723699791584891,27268579555005226869658919891934723699791584893⟩⟩, + ⟨⟨-820730866112076995838514790455035943521701498776,-820730866112076995838514790455035943521701498772⟩,⟨-990053197360790568480839444336310508844710382262,-990053197360790568480839444336310508844710382258⟩⟩, + ⟨⟨17855787863020445217408973082184675159873937049755,17855787863020445217408973082184675159873937049800⟩,⟨-12995364503763665984642740820007223886417780337059,-12995364503763665984642740820007223886417780337014⟩⟩, + ⟨⟨117560933378784055242827843029092859097158466127082,117560933378784055242827843029092859097158466127461⟩,⟨231592325289605861229895469093859904092667744839699,231592325289605861229895469093859904092667744840079⟩⟩, + ⟨⟨-2109537309332041918516859284278163697340401701507243,-2109537309332041918516859284278163697340401701502939⟩,⟨573287881404011140613783028606589034148981348851477,573287881404011140613783028606589034148981348855782⟩⟩] +lemma tw1_1_5_11_calc (j : Fin 31) : taylorWaveBox 1 1 5 11 j = tw1_1_5_11 j := by + revert j + decide +kernel +def tw1_1_5_12 : Fin 31 → CI := ![⟨⟨329670352962398171616024422952018968051229606517149,329670352962398171616024422952018968051229606518155⟩,⟨-483224709939333344168190218189175297640455749828982,-483224709939333344168190218189175297640455749827976⟩⟩, + ⟨⟨47896849194354297214870933055228787527199704926573,47896849194354297214870933055228787527199704926700⟩,⟨54581145460339366723822939258406046735167855957491,54581145460339366723822939258406046735167855957618⟩⟩, + ⟨⟨-5638452620075476534473083410437796969863054917539,-5638452620075476534473083410437796969863054917526⟩,⟨3154290233591588022240060127655585040798048562018,3154290233591588022240060127655585040798048562031⟩⟩, + ⟨⟨-150763304829303748435568579702402495984346259845,-150763304829303748435568579702402495984346259842⟩,⟨-364203654225760305026954006817532341652249807532,-364203654225760305026954006817532341652249807530⟩⟩, + ⟨⟨14302671479197647687892367474374522220984669575,14302671479197647687892367474374522220984669576⟩,⟨-6684127706923658820227784019118178084178169458,-6684127706923658820227784019118178084178169457⟩⟩, + ⟨⟨268538687974853760128454426825443764571434443,268538687974853760128454426825443764571434445⟩,⟨295878263302094331118782216605112441244139608,295878263302094331118782216605112441244139609⟩⟩, + ⟨⟨-983463976928748639920477200199127701083400,-983463976928748639920477200199127701083399⟩,⟨6156436015414309231130953122636694959605528,6156436015414309231130953122636694959605529⟩⟩, + ⟨⟨-30206575725276040936326599227865058841704,-30206575725276040936326599227865058841702⟩,⟨51854300601329580018458086513814122487796,51854300601329580018458086513814122487798⟩⟩, + ⟨⟨-70416851430940510173367116020122739661,-70416851430940510173367116020122739658⟩,⟨365155607904990952372088475765553458520,365155607904990952372088475765553458524⟩⟩, + ⟨⟨1431156123865959132368395553744569055,1431156123865959132368395553744569060⟩,⟨817378141872816538717775572211171199,817378141872816538717775572211171204⟩⟩, + ⟨⟨-1593947091398070641593703782637127,-1593947091398070641593703782637119⟩,⟨-6103632155644205611479752161904541,-6103632155644205611479752161904535⟩⟩, + ⟨⟨18300656824440042442144012452877,18300656824440042442144012452889⟩,⟨20879857385476695715709550680301,20879857385476695715709550680313⟩⟩, + ⟨⟨-121042415126238795495023056855,-121042415126238795495023056836⟩,⟨165789694233731655544187518117,165789694233731655544187518138⟩⟩, + ⟨⟨-2640121856308594033391838132,-2640121856308594033391838106⟩,⟨2925180333554286944667481138,2925180333554286944667481164⟩⟩, + ⟨⟨43307319422544007900185035,43307319422544007900185062⟩,⟨295541787859535260563207743,295541787859535260563207773⟩⟩, + ⟨⟨121703211478352105868345668,121703211478352105868345706⟩,⟨-21,25⟩⟩, + ⟨⟨43307319422544007900185035,43307319422544007900185062⟩,⟨-295541787859535260563207773,-295541787859535260563207743⟩⟩, + ⟨⟨-2640121856308594033391838132,-2640121856308594033391838106⟩,⟨-2925180333554286944667481164,-2925180333554286944667481138⟩⟩, + ⟨⟨-121042415126238795495023056855,-121042415126238795495023056836⟩,⟨-165789694233731655544187518138,-165789694233731655544187518117⟩⟩, + ⟨⟨18300656824440042442144012452877,18300656824440042442144012452889⟩,⟨-20879857385476695715709550680313,-20879857385476695715709550680301⟩⟩, + ⟨⟨-1593947091398070641593703782637127,-1593947091398070641593703782637119⟩,⟨6103632155644205611479752161904535,6103632155644205611479752161904541⟩⟩, + ⟨⟨1431156123865959132368395553744569055,1431156123865959132368395553744569060⟩,⟨-817378141872816538717775572211171204,-817378141872816538717775572211171199⟩⟩, + ⟨⟨-70416851430940510173367116020122739661,-70416851430940510173367116020122739658⟩,⟨-365155607904990952372088475765553458524,-365155607904990952372088475765553458520⟩⟩, + ⟨⟨-30206575725276040936326599227865058841704,-30206575725276040936326599227865058841702⟩,⟨-51854300601329580018458086513814122487798,-51854300601329580018458086513814122487796⟩⟩, + ⟨⟨-983463976928748639920477200199127701083400,-983463976928748639920477200199127701083399⟩,⟨-6156436015414309231130953122636694959605529,-6156436015414309231130953122636694959605528⟩⟩, + ⟨⟨268538687974853760128454426825443764571434443,268538687974853760128454426825443764571434445⟩,⟨-295878263302094331118782216605112441244139609,-295878263302094331118782216605112441244139608⟩⟩, + ⟨⟨14302671479197647687892367474374522220984669575,14302671479197647687892367474374522220984669576⟩,⟨6684127706923658820227784019118178084178169457,6684127706923658820227784019118178084178169458⟩⟩, + ⟨⟨-150763304829303748435568579702402495984346259845,-150763304829303748435568579702402495984346259842⟩,⟨364203654225760305026954006817532341652249807530,364203654225760305026954006817532341652249807532⟩⟩, + ⟨⟨-5638452620075476534473083410437796969863054917539,-5638452620075476534473083410437796969863054917526⟩,⟨-3154290233591588022240060127655585040798048562031,-3154290233591588022240060127655585040798048562018⟩⟩, + ⟨⟨47896849194354297214870933055228787527199704926573,47896849194354297214870933055228787527199704926700⟩,⟨-54581145460339366723822939258406046735167855957618,-54581145460339366723822939258406046735167855957491⟩⟩, + ⟨⟨329670352962398171616024422952018968051229606517149,329670352962398171616024422952018968051229606518155⟩,⟨483224709939333344168190218189175297640455749827976,483224709939333344168190218189175297640455749828982⟩⟩] +lemma tw1_1_5_12_calc (j : Fin 31) : taylorWaveBox 1 1 5 12 j = tw1_1_5_12 j := by + revert j + decide +kernel +def tw1_1_5_13 : Fin 31 → CI := ![⟨⟨87101957871998534232061846761752068061495721041730,87101957871998534232061846761752068061495721042034⟩,⟨117293292368469904622277841050305235494192753336219,117293292368469904622277841050305235494192753336524⟩⟩, + ⟨⟨-17868372999239475529150748087973864812402342472482,-17868372999239475529150748087973864812402342472446⟩,⟨6309775366585377576366462038255482821836921337995,6309775366585377576366462038255482821836921338031⟩⟩, + ⟨⟨-138239729337251717376805108953287340420171780470,-138239729337251717376805108953287340420171780466⟩,⟨-1758689180363707976652228462575478171952420258791,-1758689180363707976652228462575478171952420258787⟩⟩, + ⟨⟨112270120306159337166338985670951882049824731907,112270120306159337166338985670951882049824731909⟩,⟨10548449424312787771216482245945932279301299550,10548449424312787771216482245945932279301299552⟩⟩, + ⟨⟨-509378582185041998669497752661498752369431089,-509378582185041998669497752661498752369431088⟩,⟨4709684590732616199223604600059691928581906952,4709684590732616199223604600059691928581906953⟩⟩, + ⟨⟨-124815039492146298801182214942319490290187596,-124815039492146298801182214942319490290187595⟩,⟨16144314039217116359728479659090080139315417,16144314039217116359728479659090080139315418⟩⟩, + ⟨⟨-1383358639786795139357940821308619104987340,-1383358639786795139357940821308619104987339⟩,⟨-1529266447498901729738685131878293768590134,-1529266447498901729738685131878293768590133⟩⟩, + ⟨⟨-5996001640724094183950355552203511417175,-5996001640724094183950355552203511417174⟩,⟨-19958521230869802146204114677307798699803,-19958521230869802146204114677307798699802⟩⟩, + ⟨⟨-70584325282193037534162062144720307970,-70584325282193037534162062144720307968⟩,⟨-115610892905960254451792279803883324636,-115610892905960254451792279803883324634⟩⟩, + ⟨⟨-622921105302857459199755301786430544,-622921105302857459199755301786430541⟩,⟨82938251243849673998694907468264325,82938251243849673998694907468264327⟩⟩, + ⟨⟨1822227849832276416669024962907693,1822227849832276416669024962907697⟩,⟨1726016271747128285297723594148041,1726016271747128285297723594148045⟩⟩, + ⟨⟨-10590085061098665278276684040606,-10590085061098665278276684040599⟩,⟨-4416506222343612914733920129653,-4416506222343612914733920129647⟩⟩, + ⟨⟨24371547917336903022098535519,24371547917336903022098535529⟩,⟨-84112175423112132725467162284,-84112175423112132725467162273⟩⟩, + ⟨⟨823226085856639947849208353,823226085856639947849208366⟩,⟨-1512483043933989806082874463,-1512483043933989806082874449⟩⟩, + ⟨⟨-34636329629601051994947068,-34636329629601051994947055⟩,⟨-127908837950815600924621842,-127908837950815600924621827⟩⟩, + ⟨⟨-54270524014747044236362657,-54270524014747044236362640⟩,⟨-12,10⟩⟩, + ⟨⟨-34636329629601051994947068,-34636329629601051994947055⟩,⟨127908837950815600924621827,127908837950815600924621842⟩⟩, + ⟨⟨823226085856639947849208353,823226085856639947849208366⟩,⟨1512483043933989806082874449,1512483043933989806082874463⟩⟩, + ⟨⟨24371547917336903022098535519,24371547917336903022098535529⟩,⟨84112175423112132725467162273,84112175423112132725467162284⟩⟩, + ⟨⟨-10590085061098665278276684040606,-10590085061098665278276684040599⟩,⟨4416506222343612914733920129647,4416506222343612914733920129653⟩⟩, + ⟨⟨1822227849832276416669024962907693,1822227849832276416669024962907697⟩,⟨-1726016271747128285297723594148045,-1726016271747128285297723594148041⟩⟩, + ⟨⟨-622921105302857459199755301786430544,-622921105302857459199755301786430541⟩,⟨-82938251243849673998694907468264327,-82938251243849673998694907468264325⟩⟩, + ⟨⟨-70584325282193037534162062144720307970,-70584325282193037534162062144720307968⟩,⟨115610892905960254451792279803883324634,115610892905960254451792279803883324636⟩⟩, + ⟨⟨-5996001640724094183950355552203511417175,-5996001640724094183950355552203511417174⟩,⟨19958521230869802146204114677307798699802,19958521230869802146204114677307798699803⟩⟩, + ⟨⟨-1383358639786795139357940821308619104987340,-1383358639786795139357940821308619104987339⟩,⟨1529266447498901729738685131878293768590133,1529266447498901729738685131878293768590134⟩⟩, + ⟨⟨-124815039492146298801182214942319490290187596,-124815039492146298801182214942319490290187595⟩,⟨-16144314039217116359728479659090080139315418,-16144314039217116359728479659090080139315417⟩⟩, + ⟨⟨-509378582185041998669497752661498752369431089,-509378582185041998669497752661498752369431088⟩,⟨-4709684590732616199223604600059691928581906953,-4709684590732616199223604600059691928581906952⟩⟩, + ⟨⟨112270120306159337166338985670951882049824731907,112270120306159337166338985670951882049824731909⟩,⟨-10548449424312787771216482245945932279301299552,-10548449424312787771216482245945932279301299550⟩⟩, + ⟨⟨-138239729337251717376805108953287340420171780470,-138239729337251717376805108953287340420171780466⟩,⟨1758689180363707976652228462575478171952420258787,1758689180363707976652228462575478171952420258791⟩⟩, + ⟨⟨-17868372999239475529150748087973864812402342472482,-17868372999239475529150748087973864812402342472446⟩,⟨-6309775366585377576366462038255482821836921338031,-6309775366585377576366462038255482821836921337995⟩⟩, + ⟨⟨87101957871998534232061846761752068061495721041730,87101957871998534232061846761752068061495721042034⟩,⟨-117293292368469904622277841050305235494192753336524,-117293292368469904622277841050305235494192753336219⟩⟩] +lemma tw1_1_5_13_calc (j : Fin 31) : taylorWaveBox 1 1 5 13 j = tw1_1_5_13 j := by + revert j + decide +kernel +def tw1_1_5_14 : Fin 31 → CI := ![⟨⟨-32624796248505745644961292997869442309848773079594,-32624796248505745644961292997869442309848773079511⟩,⟨10285376468618474437819736830646572094695495398784,10285376468618474437819736830646572094695495398867⟩⟩, + ⟨⟨191647045029911662986237742941062307673093413552,191647045029911662986237742941062307673093413562⟩,⟨-4631995237322388810675697000621824817231254975015,-4631995237322388810675697000621824817231254975005⟩⟩, + ⟨⟨423714349462128807130717700486439789269279208804,423714349462128807130717700486439789269279208806⟩,⟨156189428315313623613557981894502908106976267522,156189428315313623613557981894502908106976267525⟩⟩, + ⟨⟨-16569917481044047684811472304758242588647335448,-16569917481044047684811472304758242588647335447⟩,⟨25299973292910828658958361763244005432513264361,25299973292910828658958361763244005432513264362⟩⟩, + ⟨⟨-1058705599411717125743498544783353707029824510,-1058705599411717125743498544783353707029824509⟩,⟨-809266423314637299783025810012483862573475754,-809266423314637299783025810012483862573475753⟩⟩, + ⟨⟨17152573005057427859359098646507021427872334,17152573005057427859359098646507021427872335⟩,⟨-32968427447547109500091907257547284775083680,-32968427447547109500091907257547284775083679⟩⟩, + ⟨⟨638350626321234299916466261621606962425728,638350626321234299916466261621606962425729⟩,⟨-37258736257910095184544494426615962982734,-37258736257910095184544494426615962982733⟩⟩, + ⟨⟨6080482894188100099835893197513506255825,6080482894188100099835893197513506255826⟩,⟨3009790063121682956463362300610095805949,3009790063121682956463362300610095805950⟩⟩, + ⟨⟨44401178493708440557266320313606109212,44401178493708440557266320313606109214⟩,⟨12962027878582277133538320878641849666,12962027878582277133538320878641849667⟩⟩, + ⟨⟨159118353029939837292393534556466880,159118353029939837292393534556466881⟩,⟨-158563999995887852022574586591786188,-158563999995887852022574586591786187⟩⟩, + ⟨⟨-917319492781972435038667744542041,-917319492781972435038667744542039⟩,⟨-187120214211461001415846600112361,-187120214211461001415846600112359⟩⟩, + ⟨⟨4437208290565473533962373951577,4437208290565473533962373951580⟩,⟨-270608879239992238754635050384,-270608879239992238754635050380⟩⟩, + ⟨⟨2330382738813940261641218350,2330382738813940261641218355⟩,⟨34946413417115872496058539253,34946413417115872496058539258⟩⟩, + ⟨⟨-183191833004219773548395914,-183191833004219773548395907⟩,⟨681302798153832443597168986,681302798153832443597168992⟩⟩, + ⟨⟨20617022256714039253007833,20617022256714039253007840⟩,⟨51113926578897845647807953,51113926578897845647807960⟩⟩, + ⟨⟨22688055082870036044515832,22688055082870036044515839⟩,⟨-4,5⟩⟩, + ⟨⟨20617022256714039253007833,20617022256714039253007840⟩,⟨-51113926578897845647807960,-51113926578897845647807953⟩⟩, + ⟨⟨-183191833004219773548395914,-183191833004219773548395907⟩,⟨-681302798153832443597168992,-681302798153832443597168986⟩⟩, + ⟨⟨2330382738813940261641218350,2330382738813940261641218355⟩,⟨-34946413417115872496058539258,-34946413417115872496058539253⟩⟩, + ⟨⟨4437208290565473533962373951577,4437208290565473533962373951580⟩,⟨270608879239992238754635050380,270608879239992238754635050384⟩⟩, + ⟨⟨-917319492781972435038667744542041,-917319492781972435038667744542039⟩,⟨187120214211461001415846600112359,187120214211461001415846600112361⟩⟩, + ⟨⟨159118353029939837292393534556466880,159118353029939837292393534556466881⟩,⟨158563999995887852022574586591786187,158563999995887852022574586591786188⟩⟩, + ⟨⟨44401178493708440557266320313606109212,44401178493708440557266320313606109214⟩,⟨-12962027878582277133538320878641849667,-12962027878582277133538320878641849666⟩⟩, + ⟨⟨6080482894188100099835893197513506255825,6080482894188100099835893197513506255826⟩,⟨-3009790063121682956463362300610095805950,-3009790063121682956463362300610095805949⟩⟩, + ⟨⟨638350626321234299916466261621606962425728,638350626321234299916466261621606962425729⟩,⟨37258736257910095184544494426615962982733,37258736257910095184544494426615962982734⟩⟩, + ⟨⟨17152573005057427859359098646507021427872334,17152573005057427859359098646507021427872335⟩,⟨32968427447547109500091907257547284775083679,32968427447547109500091907257547284775083680⟩⟩, + ⟨⟨-1058705599411717125743498544783353707029824510,-1058705599411717125743498544783353707029824509⟩,⟨809266423314637299783025810012483862573475753,809266423314637299783025810012483862573475754⟩⟩, + ⟨⟨-16569917481044047684811472304758242588647335448,-16569917481044047684811472304758242588647335447⟩,⟨-25299973292910828658958361763244005432513264362,-25299973292910828658958361763244005432513264361⟩⟩, + ⟨⟨423714349462128807130717700486439789269279208804,423714349462128807130717700486439789269279208806⟩,⟨-156189428315313623613557981894502908106976267525,-156189428315313623613557981894502908106976267522⟩⟩, + ⟨⟨191647045029911662986237742941062307673093413552,191647045029911662986237742941062307673093413562⟩,⟨4631995237322388810675697000621824817231254975005,4631995237322388810675697000621824817231254975015⟩⟩, + ⟨⟨-32624796248505745644961292997869442309848773079594,-32624796248505745644961292997869442309848773079511⟩,⟨-10285376468618474437819736830646572094695495398867,-10285376468618474437819736830646572094695495398784⟩⟩] +lemma tw1_1_5_14_calc (j : Fin 31) : taylorWaveBox 1 1 5 14 j = tw1_1_5_14 j := by + revert j + decide +kernel +def tw1_1_5_15 : Fin 31 → CI := ![⟨⟨210659674861384467214145096343241084077111447496,210659674861384467214145096343241084077111447516⟩,⟨-7535400554683349185506026854694237004584769037458,-7535400554683349185506026854694237004584769037437⟩⟩, + ⟨⟨973734280739981046214948871922283151755274568491,973734280739981046214948871922283151755274568495⟩,⟨437366329849584837116327946688965706454409828172,437366329849584837116327946688965706454409828175⟩⟩, + ⟨⟨-76884134765126438167033267532169237787012598586,-76884134765126438167033267532169237787012598585⟩,⟨76980324517203892676700926286396182208830441301,76980324517203892676700926286396182208830441303⟩⟩, + ⟨⟨-3692060138001655992534243976265228014592705457,-3692060138001655992534243976265228014592705456⟩,⟨-6681845604337122578089517200197459529222589634,-6681845604337122578089517200197459529222589633⟩⟩, + ⟨⟨328519600147619382753121441611165533487141721,328519600147619382753121441611165533487141722⟩,⟨-128645068627086193833414801772649568147172650,-128645068627086193833414801772649568147172649⟩⟩, + ⟨⟨4794151528078264052881416423038903245025617,4794151528078264052881416423038903245025618⟩,⟨9148387721133574258941052536416622278553625,9148387721133574258941052536416622278553626⟩⟩, + ⟨⟨-108240428821265618562873635044758156147479,-108240428821265618562873635044758156147478⟩,⟨152020301478466766343816864971577518572434,152020301478466766343816864971577518572435⟩⟩, + ⟨⟨-1945851551760864344485110739892336935952,-1945851551760864344485110739892336935951⟩,⟨731724555786367299350848704696199370504,731724555786367299350848704696199370505⟩⟩, + ⟨⟨-13355897816672510582614797877521766315,-13355897816672510582614797877521766313⟩,⟨6527482898602296812312798874491718518,6527482898602296812312798874491718519⟩⟩, + ⟨⟨-10235767717617452613542513151235507,-10235767717617452613542513151235505⟩,⟨74878922274884760766375359245335010,74878922274884760766375359245335011⟩⟩, + ⟨⟨308079857843115860704780397788652,308079857843115860704780397788654⟩,⟨-114500944558756749782593113164160,-114500944558756749782593113164158⟩⟩, + ⟨⟨-1409201030866224076903105842280,-1409201030866224076903105842278⟩,⟨801124498166204573022400289350,801124498166204573022400289351⟩⟩, + ⟨⟨-5317953019742130824921022648,-5317953019742130824921022646⟩,⟨-12063598227479124522504836181,-12063598227479124522504836178⟩⟩, + ⟨⟨7316116390218362056754215,7316116390218362056754218⟩,⟨-271941443775128736543668545,-271941443775128736543668541⟩⟩, + ⟨⟨-10387872148326022132140799,-10387872148326022132140795⟩,⟨-18909474803880832045886826,-18909474803880832045886823⟩⟩, + ⟨⟨-8926918752493842895922029,-8926918752493842895922025⟩,⟨-2,2⟩⟩, + ⟨⟨-10387872148326022132140799,-10387872148326022132140795⟩,⟨18909474803880832045886823,18909474803880832045886826⟩⟩, + ⟨⟨7316116390218362056754215,7316116390218362056754218⟩,⟨271941443775128736543668541,271941443775128736543668545⟩⟩, + ⟨⟨-5317953019742130824921022648,-5317953019742130824921022646⟩,⟨12063598227479124522504836178,12063598227479124522504836181⟩⟩, + ⟨⟨-1409201030866224076903105842280,-1409201030866224076903105842278⟩,⟨-801124498166204573022400289351,-801124498166204573022400289350⟩⟩, + ⟨⟨308079857843115860704780397788652,308079857843115860704780397788654⟩,⟨114500944558756749782593113164158,114500944558756749782593113164160⟩⟩, + ⟨⟨-10235767717617452613542513151235507,-10235767717617452613542513151235505⟩,⟨-74878922274884760766375359245335011,-74878922274884760766375359245335010⟩⟩, + ⟨⟨-13355897816672510582614797877521766315,-13355897816672510582614797877521766313⟩,⟨-6527482898602296812312798874491718519,-6527482898602296812312798874491718518⟩⟩, + ⟨⟨-1945851551760864344485110739892336935952,-1945851551760864344485110739892336935951⟩,⟨-731724555786367299350848704696199370505,-731724555786367299350848704696199370504⟩⟩, + ⟨⟨-108240428821265618562873635044758156147479,-108240428821265618562873635044758156147478⟩,⟨-152020301478466766343816864971577518572435,-152020301478466766343816864971577518572434⟩⟩, + ⟨⟨4794151528078264052881416423038903245025617,4794151528078264052881416423038903245025618⟩,⟨-9148387721133574258941052536416622278553626,-9148387721133574258941052536416622278553625⟩⟩, + ⟨⟨328519600147619382753121441611165533487141721,328519600147619382753121441611165533487141722⟩,⟨128645068627086193833414801772649568147172649,128645068627086193833414801772649568147172650⟩⟩, + ⟨⟨-3692060138001655992534243976265228014592705457,-3692060138001655992534243976265228014592705456⟩,⟨6681845604337122578089517200197459529222589633,6681845604337122578089517200197459529222589634⟩⟩, + ⟨⟨-76884134765126438167033267532169237787012598586,-76884134765126438167033267532169237787012598585⟩,⟨-76980324517203892676700926286396182208830441303,-76980324517203892676700926286396182208830441301⟩⟩, + ⟨⟨973734280739981046214948871922283151755274568491,973734280739981046214948871922283151755274568495⟩,⟨-437366329849584837116327946688965706454409828175,-437366329849584837116327946688965706454409828172⟩⟩, + ⟨⟨210659674861384467214145096343241084077111447496,210659674861384467214145096343241084077111447516⟩,⟨7535400554683349185506026854694237004584769037437,7535400554683349185506026854694237004584769037458⟩⟩] +lemma tw1_1_5_15_calc (j : Fin 31) : taylorWaveBox 1 1 5 15 j = tw1_1_5_15 j := by + revert j + decide +kernel +def tw1_1_5_16 : Fin 31 → CI := ![⟨⟨1467641936918551650389699760615036817420163182396,1467641936918551650389699760615036817420163182401⟩,⟨554599067205290524714164293622533726985278434436,554599067205290524714164293622533726985278434441⟩⟩, + ⟨⟨-166998812624692089190549492141946890559566995117,-166998812624692089190549492141946890559566995115⟩,⟨161231963328726446659253890900864948797676134118,161231963328726446659253890900864948797676134120⟩⟩, + ⟨⟨-8591443554728493599314904493052689949677777760,-8591443554728493599314904493052689949677777759⟩,⟨-23217576273310710509793967987755736872670074921,-23217576273310710509793967987755736872670074920⟩⟩, + ⟨⟨1819619886859213018845269600280855148704983865,1819619886859213018845269600280855148704983866⟩,⟨-33924783724143138734297954792974830392253382,-33924783724143138734297954792974830392253381⟩⟩, + ⟨⟨-15070898578593713375870293087422820372237400,-15070898578593713375870293087422820372237399⟩,⟨86922559099779657243069331111521652515703835,86922559099779657243069331111521652515703836⟩⟩, + ⟨⟨-2689622867055547876990601883116998372403667,-2689622867055547876990601883116998372403666⟩,⟨-339792614542888350428007957554350971381503,-339792614542888350428007957554350971381502⟩⟩, + ⟨⟨-13968300672682542574189927187673963906569,-13968300672682542574189927187673963906568⟩,⟨-49505115895722280181230573693641014242289,-49505115895722280181230573693641014242288⟩⟩, + ⟨⟨229720473382946952629470358410704396682,229720473382946952629470358410704396683⟩,⟨-556018681630066891937239621360042081456,-556018681630066891937239621360042081455⟩⟩, + ⟨⟨1663495104486896312169280581835945810,1663495104486896312169280581835945811⟩,⟨-4194401025275251641702595232696417774,-4194401025275251641702595232696417773⟩⟩, + ⟨⟨-11836563041832272494176143804266944,-11836563041832272494176143804266943⟩,⟨-20893749010132554007157241994128384,-20893749010132554007157241994128383⟩⟩, + ⟨⟨-66632114174927962463318213537668,-66632114174927962463318213537667⟩,⟨86229054106399887099534325619633,86229054106399887099534325619634⟩⟩, + ⟨⟨314216155416136740433442506973,314216155416136740433442506974⟩,⟨-461421401971478446908201446956,-461421401971478446908201446955⟩⟩, + ⟨⟨3241848157683627133974075329,3241848157683627133974075331⟩,⟨3384915267324444685128793265,3384915267324444685128793267⟩⟩, + ⟨⟨20543484104924666094751834,20543484104924666094751836⟩,⟨96916886121139099711989827,96916886121139099711989829⟩⟩, + ⟨⟨4642880809201232596215869,4642880809201232596215871⟩,⟨6485760913591824406689886,6485760913591824406689888⟩⟩, + ⟨⟨3317281391961511043928062,3317281391961511043928064⟩,⟨-1,1⟩⟩, + ⟨⟨4642880809201232596215869,4642880809201232596215871⟩,⟨-6485760913591824406689888,-6485760913591824406689886⟩⟩, + ⟨⟨20543484104924666094751834,20543484104924666094751836⟩,⟨-96916886121139099711989829,-96916886121139099711989827⟩⟩, + ⟨⟨3241848157683627133974075329,3241848157683627133974075331⟩,⟨-3384915267324444685128793267,-3384915267324444685128793265⟩⟩, + ⟨⟨314216155416136740433442506973,314216155416136740433442506974⟩,⟨461421401971478446908201446955,461421401971478446908201446956⟩⟩, + ⟨⟨-66632114174927962463318213537668,-66632114174927962463318213537667⟩,⟨-86229054106399887099534325619634,-86229054106399887099534325619633⟩⟩, + ⟨⟨-11836563041832272494176143804266944,-11836563041832272494176143804266943⟩,⟨20893749010132554007157241994128383,20893749010132554007157241994128384⟩⟩, + ⟨⟨1663495104486896312169280581835945810,1663495104486896312169280581835945811⟩,⟨4194401025275251641702595232696417773,4194401025275251641702595232696417774⟩⟩, + ⟨⟨229720473382946952629470358410704396682,229720473382946952629470358410704396683⟩,⟨556018681630066891937239621360042081455,556018681630066891937239621360042081456⟩⟩, + ⟨⟨-13968300672682542574189927187673963906569,-13968300672682542574189927187673963906568⟩,⟨49505115895722280181230573693641014242288,49505115895722280181230573693641014242289⟩⟩, + ⟨⟨-2689622867055547876990601883116998372403667,-2689622867055547876990601883116998372403666⟩,⟨339792614542888350428007957554350971381502,339792614542888350428007957554350971381503⟩⟩, + ⟨⟨-15070898578593713375870293087422820372237400,-15070898578593713375870293087422820372237399⟩,⟨-86922559099779657243069331111521652515703836,-86922559099779657243069331111521652515703835⟩⟩, + ⟨⟨1819619886859213018845269600280855148704983865,1819619886859213018845269600280855148704983866⟩,⟨33924783724143138734297954792974830392253381,33924783724143138734297954792974830392253382⟩⟩, + ⟨⟨-8591443554728493599314904493052689949677777760,-8591443554728493599314904493052689949677777759⟩,⟨23217576273310710509793967987755736872670074920,23217576273310710509793967987755736872670074921⟩⟩, + ⟨⟨-166998812624692089190549492141946890559566995117,-166998812624692089190549492141946890559566995115⟩,⟨-161231963328726446659253890900864948797676134120,-161231963328726446659253890900864948797676134118⟩⟩, + ⟨⟨1467641936918551650389699760615036817420163182396,1467641936918551650389699760615036817420163182401⟩,⟨-554599067205290524714164293622533726985278434441,-554599067205290524714164293622533726985278434436⟩⟩] +lemma tw1_1_5_16_calc (j : Fin 31) : taylorWaveBox 1 1 5 16 j = tw1_1_5_16 j := by + revert j + decide +kernel +def tw1_1_5_17 : Fin 31 → CI := ![⟨⟨-198019896345386037059910420485871615348482797847,-198019896345386037059910420485871615348482797845⟩,⟨237668715673699053327550548605038765132130354837,237668715673699053327550548605038765132130354839⟩⟩, + ⟨⟨-18049891751120946064393245285961471012070545451,-18049891751120946064393245285961471012070545450⟩,⟨-44285603130215514567183744508245847601205832575,-44285603130215514567183744508245847601205832573⟩⟩, + ⟨⟨5320687964940822320494031154387921521447393676,5320687964940822320494031154387921521447393677⟩,⟨411533524807375630435980078367452126699596693,411533524807375630435980078367452126699596694⟩⟩, + ⟨⟨-185240736785969413896748033756850553262129153,-185240736785969413896748033756850553262129152⟩,⟨366925905181557108654203905043192675191024904,366925905181557108654203905043192675191024905⟩⟩, + ⟨⟨-15758226453350745765203443495090640786187325,-15758226453350745765203443495090640786187324⟩,⟨-13726199035158690227404326969564039294841792,-13726199035158690227404326969564039294841791⟩⟩, + ⟨⟨451579553465299926373595872159977383313282,451579553465299926373595872159977383313283⟩,⟨-500526178187124242354830681582111630033906,-500526178187124242354830681582111630033905⟩⟩, + ⟨⟨12360849543382616051289164793397922352768,12360849543382616051289164793397922352769⟩,⟨5255754373493243169164200855567316376068,5255754373493243169164200855567316376069⟩⟩, + ⟨⟨68385088860802406251434919385124147846,68385088860802406251434919385124147847⟩,⟨150089380303193427656715223739282325273,150089380303193427656715223739282325274⟩⟩, + ⟨⟨458372740036445519352343561365580272,458372740036445519352343561365580273⟩,⟨1213867615194079133046531674381432905,1213867615194079133046531674381432906⟩⟩, + ⟨⟨6646442063214525974719835460479333,6646442063214525974719835460479334⟩,⟨2842064711449068367277188892761102,2842064711449068367277188892761103⟩⟩, + ⟨⟨3445484837235054960672253422803,3445484837235054960672253422804⟩,⟨-34055892575579286943205002268724,-34055892575579286943205002268723⟩⟩, + ⟨⟨-25743941235892612566372191002,-25743941235892612566372191001⟩,⟨180305236742952365137051321797,180305236742952365137051321798⟩⟩, + ⟨⟨-1415594355625828605830377752,-1415594355625828605830377750⟩,⟨-698484605366456379889191534,-698484605366456379889191532⟩⟩, + ⟨⟨-14702392978972609958271244,-14702392978972609958271243⟩,⟨-30856399240817641015248503,-30856399240817641015248502⟩⟩, + ⟨⟨-1884220444761459627489094,-1884220444761459627489093⟩,⟨-2062584280192157071478699,-2062584280192157071478698⟩⟩, + ⟨⟨-1167836237753180677822453,-1167836237753180677822452⟩,⟨-1,1⟩⟩, + ⟨⟨-1884220444761459627489094,-1884220444761459627489093⟩,⟨2062584280192157071478698,2062584280192157071478699⟩⟩, + ⟨⟨-14702392978972609958271244,-14702392978972609958271243⟩,⟨30856399240817641015248502,30856399240817641015248503⟩⟩, + ⟨⟨-1415594355625828605830377752,-1415594355625828605830377750⟩,⟨698484605366456379889191532,698484605366456379889191534⟩⟩, + ⟨⟨-25743941235892612566372191002,-25743941235892612566372191001⟩,⟨-180305236742952365137051321798,-180305236742952365137051321797⟩⟩, + ⟨⟨3445484837235054960672253422803,3445484837235054960672253422804⟩,⟨34055892575579286943205002268723,34055892575579286943205002268724⟩⟩, + ⟨⟨6646442063214525974719835460479333,6646442063214525974719835460479334⟩,⟨-2842064711449068367277188892761103,-2842064711449068367277188892761102⟩⟩, + ⟨⟨458372740036445519352343561365580272,458372740036445519352343561365580273⟩,⟨-1213867615194079133046531674381432906,-1213867615194079133046531674381432905⟩⟩, + ⟨⟨68385088860802406251434919385124147846,68385088860802406251434919385124147847⟩,⟨-150089380303193427656715223739282325274,-150089380303193427656715223739282325273⟩⟩, + ⟨⟨12360849543382616051289164793397922352768,12360849543382616051289164793397922352769⟩,⟨-5255754373493243169164200855567316376069,-5255754373493243169164200855567316376068⟩⟩, + ⟨⟨451579553465299926373595872159977383313282,451579553465299926373595872159977383313283⟩,⟨500526178187124242354830681582111630033905,500526178187124242354830681582111630033906⟩⟩, + ⟨⟨-15758226453350745765203443495090640786187325,-15758226453350745765203443495090640786187324⟩,⟨13726199035158690227404326969564039294841791,13726199035158690227404326969564039294841792⟩⟩, + ⟨⟨-185240736785969413896748033756850553262129153,-185240736785969413896748033756850553262129152⟩,⟨-366925905181557108654203905043192675191024905,-366925905181557108654203905043192675191024904⟩⟩, + ⟨⟨5320687964940822320494031154387921521447393676,5320687964940822320494031154387921521447393677⟩,⟨-411533524807375630435980078367452126699596694,-411533524807375630435980078367452126699596693⟩⟩, + ⟨⟨-18049891751120946064393245285961471012070545451,-18049891751120946064393245285961471012070545450⟩,⟨44285603130215514567183744508245847601205832573,44285603130215514567183744508245847601205832575⟩⟩, + ⟨⟨-198019896345386037059910420485871615348482797847,-198019896345386037059910420485871615348482797845⟩,⟨-237668715673699053327550548605038765132130354839,-237668715673699053327550548605038765132130354837⟩⟩] +lemma tw1_1_5_17_calc (j : Fin 31) : taylorWaveBox 1 1 5 17 j = tw1_1_5_17 j := by + revert j + decide +kernel +def tw1_1_5_18 : Fin 31 → CI := ![⟨⟨-29931275310324161349839842093415875582514541998,-29931275310324161349839842093415875582514541997⟩,⟨-49617073647943762452861745878981633198905353773,-49617073647943762452861745878981633198905353772⟩⟩, + ⟨⟨9359498354442100960309169521432845169580699420,9359498354442100960309169521432845169580699421⟩,⟨-58176195340899069243730355019849569887270831,-58176195340899069243730355019849569887270830⟩⟩, + ⟨⟨-532366061024368477683556685580451259283157697,-532366061024368477683556685580451259283157696⟩,⟨954429925187474896955936635552806699921598064,954429925187474896955936635552806699921598065⟩⟩, + ⟨⟨-51035093875397699450265634838471367460267006,-51035093875397699450265634838471367460267005⟩,⟨-71923616030143915913857745957929119124521000,-71923616030143915913857745957929119124520999⟩⟩, + ⟨⟨4479810612498689478270672142904960553329230,4479810612498689478270672142904960553329231⟩,⟨-1431530268242737815588919548579436276156950,-1431530268242737815588919548579436276156949⟩⟩, + ⟨⟨36056763251160515014857810516478094332350,36056763251160515014857810516478094332351⟩,⟨155114763685136339127213959775776210672859,155114763685136339127213959775776210672860⟩⟩, + ⟨⟨-2937259094320256833224979676105797649450,-2937259094320256833224979676105797649449⟩,⟨1573185830140830351979560440422860740377,1573185830140830351979560440422860740378⟩⟩, + ⟨⟨-40722636203710661768299718162742755720,-40722636203710661768299718162742755719⟩,⟨-13673935069635737332590690463715877817,-13673935069635737332590690463715877816⟩⟩, + ⟨⟨-315846907607750451157280516514524880,-315846907607750451157280516514524879⟩,⟨-160878938100803055395133818351674053,-160878938100803055395133818351674052⟩⟩, + ⟨⟨-2004313379119741712062302943057688,-2004313379119741712062302943057687⟩,⟨505834811606047096446245001408700,505834811606047096446245001408701⟩⟩, + ⟨⟨4500138202540925231747488810878,4500138202540925231747488810879⟩,⟨9169555625621139591800917594694,9169555625621139591800917594696⟩⟩, + ⟨⟨-17446736748565861591988863795,-17446736748565861591988863794⟩,⟨-53688060069839866429933710991,-53688060069839866429933710990⟩⟩, + ⟨⟨502025606202753051190955037,502025606202753051190955038⟩,⟨55323536286903920481766902,55323536286903920481766903⟩⟩, + ⟨⟨7047972385340838369039857,7047972385340838369039858⟩,⟨8707967274927520448757788,8707967274927520448757789⟩⟩, + ⟨⟨703951910490240287466799,703951910490240287466800⟩,⟨607042679384257390226321,607042679384257390226323⟩⟩, + ⟨⟨390575670619521932675344,390575670619521932675345⟩,⟨-1,1⟩⟩, + ⟨⟨703951910490240287466799,703951910490240287466800⟩,⟨-607042679384257390226323,-607042679384257390226321⟩⟩, + ⟨⟨7047972385340838369039857,7047972385340838369039858⟩,⟨-8707967274927520448757789,-8707967274927520448757788⟩⟩, + ⟨⟨502025606202753051190955037,502025606202753051190955038⟩,⟨-55323536286903920481766903,-55323536286903920481766902⟩⟩, + ⟨⟨-17446736748565861591988863795,-17446736748565861591988863794⟩,⟨53688060069839866429933710990,53688060069839866429933710991⟩⟩, + ⟨⟨4500138202540925231747488810878,4500138202540925231747488810879⟩,⟨-9169555625621139591800917594696,-9169555625621139591800917594694⟩⟩, + ⟨⟨-2004313379119741712062302943057688,-2004313379119741712062302943057687⟩,⟨-505834811606047096446245001408701,-505834811606047096446245001408700⟩⟩, + ⟨⟨-315846907607750451157280516514524880,-315846907607750451157280516514524879⟩,⟨160878938100803055395133818351674052,160878938100803055395133818351674053⟩⟩, + ⟨⟨-40722636203710661768299718162742755720,-40722636203710661768299718162742755719⟩,⟨13673935069635737332590690463715877816,13673935069635737332590690463715877817⟩⟩, + ⟨⟨-2937259094320256833224979676105797649450,-2937259094320256833224979676105797649449⟩,⟨-1573185830140830351979560440422860740378,-1573185830140830351979560440422860740377⟩⟩, + ⟨⟨36056763251160515014857810516478094332350,36056763251160515014857810516478094332351⟩,⟨-155114763685136339127213959775776210672860,-155114763685136339127213959775776210672859⟩⟩, + ⟨⟨4479810612498689478270672142904960553329230,4479810612498689478270672142904960553329231⟩,⟨1431530268242737815588919548579436276156949,1431530268242737815588919548579436276156950⟩⟩, + ⟨⟨-51035093875397699450265634838471367460267006,-51035093875397699450265634838471367460267005⟩,⟨71923616030143915913857745957929119124520999,71923616030143915913857745957929119124521000⟩⟩, + ⟨⟨-532366061024368477683556685580451259283157697,-532366061024368477683556685580451259283157696⟩,⟨-954429925187474896955936635552806699921598065,-954429925187474896955936635552806699921598064⟩⟩, + ⟨⟨9359498354442100960309169521432845169580699420,9359498354442100960309169521432845169580699421⟩,⟨58176195340899069243730355019849569887270830,58176195340899069243730355019849569887270831⟩⟩, + ⟨⟨-29931275310324161349839842093415875582514541998,-29931275310324161349839842093415875582514541997⟩,⟨49617073647943762452861745878981633198905353772,49617073647943762452861745878981633198905353773⟩⟩] +lemma tw1_1_5_18_calc (j : Fin 31) : taylorWaveBox 1 1 5 18 j = tw1_1_5_18 j := by + revert j + decide +kernel +def tw1_1_5_19 : Fin 31 → CI := ![⟨⟨10111325509062662245283923556281610944364057441,10111325509062662245283923556281610944364057442⟩,⟨-2149382611468055571302460120475472661656531795,-2149382611468055571302460120475472661656531794⟩⟩, + ⟨⟨-638339814807343403298435652265375177396169438,-638339814807343403298435652265375177396169437⟩,⟨1623633369700594372598662666623626673950403393,1623633369700594372598662666623626673950403394⟩⟩, + ⟨⟨-125641387369536843596312309697912555414583366,-125641387369536843596312309697912555414583365⟩,⟨-172179895814014159857515881262107973808302641,-172179895814014159857515881262107973808302640⟩⟩, + ⟨⟨17866643464608128938165992119587807088769373,17866643464608128938165992119587807088769374⟩,⟨-2353364639914722535169144993922687121346289,-2353364639914722535169144993922687121346288⟩⟩, + ⟨⟨-235303505249633781058521715444582258276396,-235303505249633781058521715444582258276395⟩,⟨980124974127934244578204277975077511955018,980124974127934244578204277975077511955019⟩⟩, + ⟨⟨-33273039058504079314375728169090121717503,-33273039058504079314375728169090121717502⟩,⟨-13288500353280561806207733302590784227800,-13288500353280561806207733302590784227799⟩⟩, + ⟨⟨145057896446081882729230714237693586687,145057896446081882729230714237693586688⟩,⟨-773734527162355112117198308724450474048,-773734527162355112117198308724450474047⟩⟩, + ⟨⟨9374548209082196059044222307528538616,9374548209082196059044222307528538617⟩,⟨-5065066464334610303981660942466083313,-5065066464334610303981660942466083312⟩⟩, + ⟨⟨88939774232847296854873777500034262,88939774232847296854873777500034263⟩,⟨-24378032911391384648131794023732363,-24378032911391384648131794023732362⟩⟩, + ⟨⟨350624864870019783346564617901943,350624864870019783346564617901944⟩,⟨-440482923758624918045328933998785,-440482923758624918045328933998784⟩⟩, + ⟨⟨-2463307857756345427792365904581,-2463307857756345427792365904580⟩,⟨-1535790501718702132069208758756,-1535790501718702132069208758755⟩⟩, + ⟨⟨11602919131867598554935579456,11602919131867598554935579457⟩,⟨11960559348625106872011617066,11960559348625106872011617067⟩⟩, + ⟨⟨-149534353021815130897314206,-149534353021815130897314205⟩,⟨36412201357658794526470804,36412201357658794526470805⟩⟩, + ⟨⟨-2774122960762509411022918,-2774122960762509411022917⟩,⟨-2129074071907667793201727,-2129074071907667793201726⟩⟩, + ⟨⟨-244325293779683118618993,-244325293779683118618992⟩,⟨-164533938890252910102135,-164533938890252910102134⟩⟩, + ⟨⟨-124405370211985247672534,-124405370211985247672533⟩,⟨-1,1⟩⟩, + ⟨⟨-244325293779683118618993,-244325293779683118618992⟩,⟨164533938890252910102134,164533938890252910102135⟩⟩, + ⟨⟨-2774122960762509411022918,-2774122960762509411022917⟩,⟨2129074071907667793201726,2129074071907667793201727⟩⟩, + ⟨⟨-149534353021815130897314206,-149534353021815130897314205⟩,⟨-36412201357658794526470805,-36412201357658794526470804⟩⟩, + ⟨⟨11602919131867598554935579456,11602919131867598554935579457⟩,⟨-11960559348625106872011617067,-11960559348625106872011617066⟩⟩, + ⟨⟨-2463307857756345427792365904581,-2463307857756345427792365904580⟩,⟨1535790501718702132069208758755,1535790501718702132069208758756⟩⟩, + ⟨⟨350624864870019783346564617901943,350624864870019783346564617901944⟩,⟨440482923758624918045328933998784,440482923758624918045328933998785⟩⟩, + ⟨⟨88939774232847296854873777500034262,88939774232847296854873777500034263⟩,⟨24378032911391384648131794023732362,24378032911391384648131794023732363⟩⟩, + ⟨⟨9374548209082196059044222307528538616,9374548209082196059044222307528538617⟩,⟨5065066464334610303981660942466083312,5065066464334610303981660942466083313⟩⟩, + ⟨⟨145057896446081882729230714237693586687,145057896446081882729230714237693586688⟩,⟨773734527162355112117198308724450474047,773734527162355112117198308724450474048⟩⟩, + ⟨⟨-33273039058504079314375728169090121717503,-33273039058504079314375728169090121717502⟩,⟨13288500353280561806207733302590784227799,13288500353280561806207733302590784227800⟩⟩, + ⟨⟨-235303505249633781058521715444582258276396,-235303505249633781058521715444582258276395⟩,⟨-980124974127934244578204277975077511955019,-980124974127934244578204277975077511955018⟩⟩, + ⟨⟨17866643464608128938165992119587807088769373,17866643464608128938165992119587807088769374⟩,⟨2353364639914722535169144993922687121346288,2353364639914722535169144993922687121346289⟩⟩, + ⟨⟨-125641387369536843596312309697912555414583366,-125641387369536843596312309697912555414583365⟩,⟨172179895814014159857515881262107973808302640,172179895814014159857515881262107973808302641⟩⟩, + ⟨⟨-638339814807343403298435652265375177396169438,-638339814807343403298435652265375177396169437⟩,⟨-1623633369700594372598662666623626673950403394,-1623633369700594372598662666623626673950403393⟩⟩, + ⟨⟨10111325509062662245283923556281610944364057441,10111325509062662245283923556281610944364057442⟩,⟨2149382611468055571302460120475472661656531794,2149382611468055571302460120475472661656531795⟩⟩] +lemma tw1_1_5_19_calc (j : Fin 31) : taylorWaveBox 1 1 5 19 j = tw1_1_5_19 j := by + revert j + decide +kernel +def tw1_1_5_20 : Fin 31 → CI := ![⟨⟨-217532003620356257335706885752503290518776047,-217532003620356257335706885752503290518776046⟩,⟨1746794225697201204555514269149057531152998888,1746794225697201204555514269149057531152998889⟩⟩, + ⟨⟨-225976031296118055277243585157515568372442005,-225976031296118055277243585157515568372442004⟩,⟨-212808967556905672731136050677972293652829753,-212808967556905672731136050677972293652829752⟩⟩, + ⟨⟨38900225162726420228818550823854361264266913,38900225162726420228818550823854361264266914⟩,⟨-7836100208774059226805070092676221683274949,-7836100208774059226805070092676221683274948⟩⟩, + ⟨⟨-1222431943871549837503012683247824322427263,-1222431943871549837503012683247824322427262⟩,⟨3295629285366382349146163644203989942110972,3295629285366382349146163644203989942110973⟩⟩, + ⟨⟨-146525388732744585773535756215012469257714,-146525388732744585773535756215012469257713⟩,⟨-145105048563515738122780963749070272157882,-145105048563515738122780963749070272157881⟩⟩, + ⟨⟨6425650822085474732091591828816194862953,6425650822085474732091591828816194862954⟩,⟨-4232522753714720046272977342500065997723,-4232522753714720046272977342500065997722⟩⟩, + ⟨⟨115508707733992416343760542687535766832,115508707733992416343760542687535766833⟩,⟨134814789952033002740415744967163590250,134814789952033002740415744967163590251⟩⟩, + ⟨⟨-639105500733740547675254064744527617,-639105500733740547675254064744527616⟩,⟨2440605665833097298245641865569139108,2440605665833097298245641865569139109⟩⟩, + ⟨⟨-12255392103521685278991183632352783,-12255392103521685278991183632352782⟩,⟨19347604268147057356756187081450404,19347604268147057356756187081450405⟩⟩, + ⟨⟨-3074889672066843268678306351279,-3074889672066843268678306351278⟩,⟨146330788525691173305034361651974,146330788525691173305034361651975⟩⟩, + ⟨⟨787475419046658383224409170364,787475419046658383224409170365⟩,⟨339884095768914026291679962,339884095768914026291679963⟩⟩, + ⟨⟨-4419390807845163465701418712,-4419390807845163465701418711⟩,⟨-1585979056557225853708746923,-1585979056557225853708746922⟩⟩, + ⟨⟨37260800717594210501759767,37260800717594210501759768⟩,⟨-24811803256813384941968490,-24811803256813384941968489⟩⟩, + ⟨⟨951903937879812546533930,951903937879812546533931⟩,⟨423744654922878047520576,423744654922878047520577⟩⟩, + ⟨⟨79288302387717594625312,79288302387717594625313⟩,⟨40647229475547631086112,40647229475547631086113⟩⟩, + ⟨⟨37824194031533812966295,37824194031533812966296⟩,⟨-1,1⟩⟩, + ⟨⟨79288302387717594625312,79288302387717594625313⟩,⟨-40647229475547631086113,-40647229475547631086112⟩⟩, + ⟨⟨951903937879812546533930,951903937879812546533931⟩,⟨-423744654922878047520577,-423744654922878047520576⟩⟩, + ⟨⟨37260800717594210501759767,37260800717594210501759768⟩,⟨24811803256813384941968489,24811803256813384941968490⟩⟩, + ⟨⟨-4419390807845163465701418712,-4419390807845163465701418711⟩,⟨1585979056557225853708746922,1585979056557225853708746923⟩⟩, + ⟨⟨787475419046658383224409170364,787475419046658383224409170365⟩,⟨-339884095768914026291679963,-339884095768914026291679962⟩⟩, + ⟨⟨-3074889672066843268678306351279,-3074889672066843268678306351278⟩,⟨-146330788525691173305034361651975,-146330788525691173305034361651974⟩⟩, + ⟨⟨-12255392103521685278991183632352783,-12255392103521685278991183632352782⟩,⟨-19347604268147057356756187081450405,-19347604268147057356756187081450404⟩⟩, + ⟨⟨-639105500733740547675254064744527617,-639105500733740547675254064744527616⟩,⟨-2440605665833097298245641865569139109,-2440605665833097298245641865569139108⟩⟩, + ⟨⟨115508707733992416343760542687535766832,115508707733992416343760542687535766833⟩,⟨-134814789952033002740415744967163590251,-134814789952033002740415744967163590250⟩⟩, + ⟨⟨6425650822085474732091591828816194862953,6425650822085474732091591828816194862954⟩,⟨4232522753714720046272977342500065997722,4232522753714720046272977342500065997723⟩⟩, + ⟨⟨-146525388732744585773535756215012469257714,-146525388732744585773535756215012469257713⟩,⟨145105048563515738122780963749070272157881,145105048563515738122780963749070272157882⟩⟩, + ⟨⟨-1222431943871549837503012683247824322427263,-1222431943871549837503012683247824322427262⟩,⟨-3295629285366382349146163644203989942110973,-3295629285366382349146163644203989942110972⟩⟩, + ⟨⟨38900225162726420228818550823854361264266913,38900225162726420228818550823854361264266914⟩,⟨7836100208774059226805070092676221683274948,7836100208774059226805070092676221683274949⟩⟩, + ⟨⟨-225976031296118055277243585157515568372442005,-225976031296118055277243585157515568372442004⟩,⟨212808967556905672731136050677972293652829752,212808967556905672731136050677972293652829753⟩⟩, + ⟨⟨-217532003620356257335706885752503290518776047,-217532003620356257335706885752503290518776046⟩,⟨-1746794225697201204555514269149057531152998889,-1746794225697201204555514269149057531152998888⟩⟩] +lemma tw1_1_5_20_calc (j : Fin 31) : taylorWaveBox 1 1 5 20 j = tw1_1_5_20 j := by + revert j + decide +kernel +def tw1_1_5 : Fin 21 → Fin 31 → CI := ![tw1_1_5_0,tw1_1_5_1,tw1_1_5_2,tw1_1_5_3,tw1_1_5_4,tw1_1_5_5,tw1_1_5_6,tw1_1_5_7,tw1_1_5_8,tw1_1_5_9,tw1_1_5_10,tw1_1_5_11,tw1_1_5_12,tw1_1_5_13,tw1_1_5_14,tw1_1_5_15,tw1_1_5_16,tw1_1_5_17,tw1_1_5_18,tw1_1_5_19,tw1_1_5_20] +lemma tw1_1_5_mem (l : Fin 21) (j : Fin 31) : (tw1_1_5 l j).Mem (taylorWave 1 1 (nearNode 5) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 5 l j = tw1_1_5 l j := by + fin_cases l + · exact tw1_1_5_0_calc j + · exact tw1_1_5_1_calc j + · exact tw1_1_5_2_calc j + · exact tw1_1_5_3_calc j + · exact tw1_1_5_4_calc j + · exact tw1_1_5_5_calc j + · exact tw1_1_5_6_calc j + · exact tw1_1_5_7_calc j + · exact tw1_1_5_8_calc j + · exact tw1_1_5_9_calc j + · exact tw1_1_5_10_calc j + · exact tw1_1_5_11_calc j + · exact tw1_1_5_12_calc j + · exact tw1_1_5_13_calc j + · exact tw1_1_5_14_calc j + · exact tw1_1_5_15_calc j + · exact tw1_1_5_16_calc j + · exact tw1_1_5_17_calc j + · exact tw1_1_5_18_calc j + · exact tw1_1_5_19_calc j + · exact tw1_1_5_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 5 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/TaylorWave116.lean b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave116.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d2b47199f346d61d6f536c0d2f403570f6ea8d1 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/TaylorWave116.lean @@ -0,0 +1,754 @@ +import OAI.Analysis.Triangular.Taylor.TaylorWave + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def tw1_1_6_0 : Fin 31 → CI := ![⟨⟨135283688200556072912975464347986434607851782194593556,135283688200556072912975464347986434607851782196311920⟩,⟨-969946586123743657787606893301257296431975346776654042,-969946586123743657787606893301257296431975346774934818⟩⟩, + ⟨⟨56902225549169075589594955500587240207117640306772514,56902225549169075589594955500587240207117640306850068⟩,⟨-4861944948131864138347575733299363925493252793934050,-4861944948131864138347575733299363925493252793856486⟩⟩, + ⟨⟨883757923029467068767130705225265243090168973499469,883757923029467068767130705225265243090168973503172⟩,⟨2099608946266340874294484014963836392351054266599632,2099608946266340874294484014963836392351054266603332⟩⟩, + ⟨⟨-38649668246078223204447907076786244159667716395526,-38649668246078223204447907076786244159667716395365⟩,⟨45040223922965636015358548903760758078474312957358,45040223922965636015358548903760758078474312957521⟩⟩, + ⟨⟨-965798011895757931660891657631506342418510958006,-965798011895757931660891657631506342418510957923⟩,⟨-13998233511525569462764255280840002894303812025,-13998233511525569462764255280840002894303811941⟩⟩, + ⟨⟨-8054706945685410447473857142117486694372306827,-8054706945685410447473857142117486694372306729⟩,⟨-4960015612185212495545133191521525551761416802,-4960015612185212495545133191521525551761416710⟩⟩, + ⟨⟨-44631564524931566989164554640386269724801672,-44631564524931566989164554640386269724801570⟩,⟨-31414896538067140722140081665833674778065140,-31414896538067140722140081665833674778065048⟩⟩, + ⟨⟨-187034273414944828586866754070735098409364,-187034273414944828586866754070735098409276⟩,⟨-5281819714125616375617838414337798687946,-5281819714125616375617838414337798687857⟩⟩, + ⟨⟨-66722929453308755780525599802235699831,-66722929453308755780525599802235699731⟩,⟨397712200732264394469630181848230861302,397712200732264394469630181848230861416⟩⟩, + ⟨⟨447657105415917608964104305705409766,447657105415917608964104305705409924⟩,⟨-429618055117194860312187953529190326,-429618055117194860312187953529190179⟩⟩, + ⟨⟨-135244609753142702813623820342740,-135244609753142702813623820342587⟩,⟨838801239119164054527189078195551,838801239119164054527189078195712⟩⟩, + ⟨⟨-1340710194851063365355651637262,-1340710194851063365355651637060⟩,⟨522339289415708999474168294293,522339289415708999474168294498⟩⟩, + ⟨⟨-3046680984280168862939228857,-3046680984280168862939228624⟩,⟨3496745146073953819239023223,3496745146073953819239023457⟩⟩, + ⟨⟨43177276544258727813531526,43177276544258727813531730⟩,⟨17365783603123801673423285,17365783603123801673423490⟩⟩, + ⟨⟨-2044336720071005513605468,-2044336720071005513605284⟩,⟨-1118848999769871173628652,-1118848999769871173628484⟩⟩, + ⟨⟨823187988631039104741884,823187988631039104742110⟩,⟨-113,136⟩⟩, + ⟨⟨-2044336720071005513605468,-2044336720071005513605284⟩,⟨1118848999769871173628485,1118848999769871173628652⟩⟩, + ⟨⟨43177276544258727813531526,43177276544258727813531730⟩,⟨-17365783603123801673423489,-17365783603123801673423285⟩⟩, + ⟨⟨-3046680984280168862939228857,-3046680984280168862939228624⟩,⟨-3496745146073953819239023456,-3496745146073953819239023223⟩⟩, + ⟨⟨-1340710194851063365355651637262,-1340710194851063365355651637060⟩,⟨-522339289415708999474168294498,-522339289415708999474168294292⟩⟩, + ⟨⟨-135244609753142702813623820342740,-135244609753142702813623820342587⟩,⟨-838801239119164054527189078195712,-838801239119164054527189078195551⟩⟩, + ⟨⟨447657105415917608964104305705409766,447657105415917608964104305705409924⟩,⟨429618055117194860312187953529190180,429618055117194860312187953529190327⟩⟩, + ⟨⟨-66722929453308755780525599802235699831,-66722929453308755780525599802235699731⟩,⟨-397712200732264394469630181848230861416,-397712200732264394469630181848230861301⟩⟩, + ⟨⟨-187034273414944828586866754070735098409364,-187034273414944828586866754070735098409276⟩,⟨5281819714125616375617838414337798687858,5281819714125616375617838414337798687947⟩⟩, + ⟨⟨-44631564524931566989164554640386269724801672,-44631564524931566989164554640386269724801570⟩,⟨31414896538067140722140081665833674778065048,31414896538067140722140081665833674778065141⟩⟩, + ⟨⟨-8054706945685410447473857142117486694372306827,-8054706945685410447473857142117486694372306729⟩,⟨4960015612185212495545133191521525551761416711,4960015612185212495545133191521525551761416802⟩⟩, + ⟨⟨-965798011895757931660891657631506342418510958006,-965798011895757931660891657631506342418510957923⟩,⟨13998233511525569462764255280840002894303811941,13998233511525569462764255280840002894303812026⟩⟩, + ⟨⟨-38649668246078223204447907076786244159667716395526,-38649668246078223204447907076786244159667716395365⟩,⟨-45040223922965636015358548903760758078474312957521,-45040223922965636015358548903760758078474312957357⟩⟩, + ⟨⟨883757923029467068767130705225265243090168973499469,883757923029467068767130705225265243090168973503172⟩,⟨-2099608946266340874294484014963836392351054266603332,-2099608946266340874294484014963836392351054266599632⟩⟩, + ⟨⟨56902225549169075589594955500587240207117640306772514,56902225549169075589594955500587240207117640306850068⟩,⟨4861944948131864138347575733299363925493252793856487,4861944948131864138347575733299363925493252793934050⟩⟩, + ⟨⟨135283688200556072912975464347986434607851782194593556,135283688200556072912975464347986434607851782196311920⟩,⟨969946586123743657787606893301257296431975346774934818,969946586123743657787606893301257296431975346776654043⟩⟩] +lemma tw1_1_6_0_calc (j : Fin 31) : taylorWaveBox 1 1 6 0 j = tw1_1_6_0 j := by + revert j + decide +kernel +def tw1_1_6_1 : Fin 31 → CI := ![⟨⟨1089279270811473405449727137299881344533275450551697462,1089279270811473405449727137299881344533275450553817071⟩,⟨555963769822141581817681279437922749274461735700663154,555963769822141581817681279437922749274461735702781964⟩⟩, + ⟨⟨-21705180543666183939924045148165237069645095969958218,-21705180543666183939924045148165237069645095969862863⟩,⟨71283815292057263223488728486169200955631435678238457,71283815292057263223488728486169200955631435678333810⟩⟩, + ⟨⟨-3108351669845746177478190670795646757788480048677595,-3108351669845746177478190670795646757788480048673153⟩,⟨-103240907620140841710414157942698965839592963525415,-103240907620140841710414157942698965839592963520964⟩⟩, + ⟨⟨-31129867009492220393589916312647844046111180173658,-31129867009492220393589916312647844046111180173467⟩,⟨-78979929045068287295371905340007837339772073077240,-78979929045068287295371905340007837339772073077061⟩⟩, + ⟨⟨769026061379170500551530140254363752331331830216,769026061379170500551530140254363752331331830315⟩,⟨-1228239052513485255017693925517919835928722807835,-1228239052513485255017693925517919835928722807737⟩⟩, + ⟨⟨13659811335284929794294453705266818356454157114,13659811335284929794294453705266818356454157248⟩,⟨-5944793789303468556102443544458195210716651296,-5944793789303468556102443544458195210716651149⟩⟩, + ⟨⟨86736720365919736296281308646351803830402110,86736720365919736296281308646351803830402284⟩,⟨-24982149639660637543187498067691820989124496,-24982149639660637543187498067691820989124313⟩⟩, + ⟨⟨228416399431303605262675937758999717274004,228416399431303605262675937758999717274204⟩,⟨-231029627711103008921711390596032312048609,-231029627711103008921711390596032312048408⟩⟩, + ⟨⟨-397815769164823275827732085539549366277,-397815769164823275827732085539549366031⟩,⟨-617365143019559866898941588260352573609,-617365143019559866898941588260352573358⟩⟩, + ⟨⟨-182228023002225196730727599509209423,-182228023002225196730727599509209109⟩,⟨1168760997562633218614850468730641689,1168760997562633218614850468730641986⟩⟩, + ⟨⟨-653852344767572546230901680212416,-653852344767572546230901680212178⟩,⟨-1558639382275818723948168597679339,-1558639382275818723948168597679069⟩⟩, + ⟨⟨2011919201567149758772656972906,2011919201567149758772656973244⟩,⟨-2189014269971960351657825707712,-2189014269971960351657825707344⟩⟩, + ⟨⟨3559937344933244884199151949,3559937344933244884199152427⟩,⟨-9229982410533889676713301129,-9229982410533889676713300650⟩⟩, + ⟨⟨-100598344661362706365209975,-100598344661362706365209510⟩,⟨-14856752286934591284163778,-14856752286934591284163313⟩⟩, + ⟨⟨4797256906120493527015966,4797256906120493527016392⟩,⟨1926184840972557645369883,1926184840972557645370280⟩⟩, + ⟨⟨-1835401176475882833770669,-1835401176475882833770168⟩,⟨-300,250⟩⟩, + ⟨⟨4797256906120493527015966,4797256906120493527016392⟩,⟨-1926184840972557645370280,-1926184840972557645369883⟩⟩, + ⟨⟨-100598344661362706365209975,-100598344661362706365209510⟩,⟨14856752286934591284163313,14856752286934591284163778⟩⟩, + ⟨⟨3559937344933244884199151949,3559937344933244884199152427⟩,⟨9229982410533889676713300650,9229982410533889676713301129⟩⟩, + ⟨⟨2011919201567149758772656972906,2011919201567149758772656973244⟩,⟨2189014269971960351657825707344,2189014269971960351657825707712⟩⟩, + ⟨⟨-653852344767572546230901680212416,-653852344767572546230901680212178⟩,⟨1558639382275818723948168597679069,1558639382275818723948168597679339⟩⟩, + ⟨⟨-182228023002225196730727599509209423,-182228023002225196730727599509209109⟩,⟨-1168760997562633218614850468730641986,-1168760997562633218614850468730641689⟩⟩, + ⟨⟨-397815769164823275827732085539549366277,-397815769164823275827732085539549366031⟩,⟨617365143019559866898941588260352573358,617365143019559866898941588260352573609⟩⟩, + ⟨⟨228416399431303605262675937758999717274004,228416399431303605262675937758999717274204⟩,⟨231029627711103008921711390596032312048409,231029627711103008921711390596032312048609⟩⟩, + ⟨⟨86736720365919736296281308646351803830402110,86736720365919736296281308646351803830402284⟩,⟨24982149639660637543187498067691820989124313,24982149639660637543187498067691820989124496⟩⟩, + ⟨⟨13659811335284929794294453705266818356454157114,13659811335284929794294453705266818356454157248⟩,⟨5944793789303468556102443544458195210716651149,5944793789303468556102443544458195210716651296⟩⟩, + ⟨⟨769026061379170500551530140254363752331331830216,769026061379170500551530140254363752331331830315⟩,⟨1228239052513485255017693925517919835928722807737,1228239052513485255017693925517919835928722807835⟩⟩, + ⟨⟨-31129867009492220393589916312647844046111180173658,-31129867009492220393589916312647844046111180173467⟩,⟨78979929045068287295371905340007837339772073077062,78979929045068287295371905340007837339772073077240⟩⟩, + ⟨⟨-3108351669845746177478190670795646757788480048677595,-3108351669845746177478190670795646757788480048673153⟩,⟨103240907620140841710414157942698965839592963520964,103240907620140841710414157942698965839592963525415⟩⟩, + ⟨⟨-21705180543666183939924045148165237069645095969958218,-21705180543666183939924045148165237069645095969862863⟩,⟨-71283815292057263223488728486169200955631435678333810,-71283815292057263223488728486169200955631435678238457⟩⟩, + ⟨⟨1089279270811473405449727137299881344533275450551697462,1089279270811473405449727137299881344533275450553817071⟩,⟨-555963769822141581817681279437922749274461735702781964,-555963769822141581817681279437922749274461735700663154⟩⟩] +lemma tw1_1_6_1_calc (j : Fin 31) : taylorWaveBox 1 1 6 1 j = tw1_1_6_1 j := by + revert j + decide +kernel +def tw1_1_6_2 : Fin 31 → CI := ![⟨⟨-825851282996437219697169974202617120206253470363841586,-825851282996437219697169974202617120206253470362097487⟩,⟨793651352384115593252280678762925534070353327005346491,793651352384115593252280678762925534070353327007090793⟩⟩, + ⟨⟨-56865537707791419449343530836165338205018942102775755,-56865537707791419449343530836165338205018942102701255⟩,⟨-45645301389311112277439463592014991572963840050757551,-45645301389311112277439463592014991572963840050683062⟩⟩, + ⟨⟨1427464292951646894491820051428560007333167930897386,1427464292951646894491820051428560007333167930901632⟩,⟨-2846654228498463246617500812717765591503638025855620,-2846654228498463246617500812717765591503638025851383⟩⟩, + ⟨⟨90515383105382854266105272394694878772096247550773,90515383105382854266105272394694878772096247551000⟩,⟨10061692888936054020808094325726389469518396766864,10061692888936054020808094325726389469518396767100⟩⟩, + ⟨⟨733346020454378607038404044018905169209951486250,733346020454378607038404044018905169209951486393⟩,⟨1456366854472817958039574207882078981813740514394,1456366854472817958039574207882078981813740514538⟩⟩, + ⟨⟨-3459315126701315840865402665177302013061653995,-3459315126701315840865402665177302013061653805⟩,⟨17252694648802057872165525764169375342708317123,17252694648802057872165525764169375342708317316⟩⟩, + ⟨⟨-43248561251167639873982325213478447472960435,-43248561251167639873982325213478447472960222⟩,⟨103266683956447494955176130226811341152010736,103266683956447494955176130226811341152010961⟩⟩, + ⟨⟨16752784991383641266098070347818993988064,16752784991383641266098070347818993988272⟩,⟨422745772482762234149413129013314477936827,422745772482762234149413129013314477937036⟩⟩, + ⟨⟨969514979613799958230413809179492933623,969514979613799958230413809179492933920⟩,⟨257655838662106394653828083156372544599,257655838662106394653828083156372544868⟩⟩, + ⟨⟨-805846873761318557405701787442600807,-805846873761318557405701787442600356⟩,⟨-1487026269651298629586073328649465531,-1487026269651298629586073328649465063⟩⟩, + ⟨⟨2057564216313836978903632018824456,2057564216313836978903632018824934⟩,⟨1458153433612375317554394222724960,1458153433612375317554394222725447⟩⟩, + ⟨⟨-1305381594598163167316495843599,-1305381594598163167316495843057⟩,⟨4418798105366086792720296749204,4418798105366086792720296749790⟩⟩, + ⟨⟨-308573344061282531578308327,-308573344061282531578307677⟩,⟨15823197939065084893899766099,15823197939065084893899766749⟩⟩, + ⟨⟨165985897341187315160949622,165985897341187315160950375⟩,⟨-14837159612797846745104745,-14837159612797846745103992⟩⟩, + ⟨⟨-8304900741337511429708699,-8304900741337511429707965⟩,⟨-2234795943223135467737108,-2234795943223135467736409⟩⟩, + ⟨⟨3069193360265614166053731,3069193360265614166054566⟩,⟨-418,501⟩⟩, + ⟨⟨-8304900741337511429708699,-8304900741337511429707965⟩,⟨2234795943223135467736409,2234795943223135467737108⟩⟩, + ⟨⟨165985897341187315160949622,165985897341187315160950375⟩,⟨14837159612797846745103992,14837159612797846745104745⟩⟩, + ⟨⟨-308573344061282531578308327,-308573344061282531578307677⟩,⟨-15823197939065084893899766749,-15823197939065084893899766099⟩⟩, + ⟨⟨-1305381594598163167316495843599,-1305381594598163167316495843057⟩,⟨-4418798105366086792720296749790,-4418798105366086792720296749204⟩⟩, + ⟨⟨2057564216313836978903632018824456,2057564216313836978903632018824934⟩,⟨-1458153433612375317554394222725447,-1458153433612375317554394222724960⟩⟩, + ⟨⟨-805846873761318557405701787442600807,-805846873761318557405701787442600356⟩,⟨1487026269651298629586073328649465063,1487026269651298629586073328649465531⟩⟩, + ⟨⟨969514979613799958230413809179492933623,969514979613799958230413809179492933920⟩,⟨-257655838662106394653828083156372544868,-257655838662106394653828083156372544599⟩⟩, + ⟨⟨16752784991383641266098070347818993988064,16752784991383641266098070347818993988272⟩,⟨-422745772482762234149413129013314477937036,-422745772482762234149413129013314477936827⟩⟩, + ⟨⟨-43248561251167639873982325213478447472960435,-43248561251167639873982325213478447472960222⟩,⟨-103266683956447494955176130226811341152010961,-103266683956447494955176130226811341152010736⟩⟩, + ⟨⟨-3459315126701315840865402665177302013061653995,-3459315126701315840865402665177302013061653805⟩,⟨-17252694648802057872165525764169375342708317316,-17252694648802057872165525764169375342708317123⟩⟩, + ⟨⟨733346020454378607038404044018905169209951486250,733346020454378607038404044018905169209951486393⟩,⟨-1456366854472817958039574207882078981813740514537,-1456366854472817958039574207882078981813740514394⟩⟩, + ⟨⟨90515383105382854266105272394694878772096247550773,90515383105382854266105272394694878772096247551000⟩,⟨-10061692888936054020808094325726389469518396767100,-10061692888936054020808094325726389469518396766864⟩⟩, + ⟨⟨1427464292951646894491820051428560007333167930897386,1427464292951646894491820051428560007333167930901632⟩,⟨2846654228498463246617500812717765591503638025851383,2846654228498463246617500812717765591503638025855620⟩⟩, + ⟨⟨-56865537707791419449343530836165338205018942102775755,-56865537707791419449343530836165338205018942102701255⟩,⟨45645301389311112277439463592014991572963840050683062,45645301389311112277439463592014991572963840050757551⟩⟩, + ⟨⟨-825851282996437219697169974202617120206253470363841586,-825851282996437219697169974202617120206253470362097487⟩,⟨-793651352384115593252280678762925534070353327007090793,-793651352384115593252280678762925534070353327005346491⟩⟩] +lemma tw1_1_6_2_calc (j : Fin 31) : taylorWaveBox 1 1 6 2 j = tw1_1_6_2 j := by + revert j + decide +kernel +def tw1_1_6_3 : Fin 31 → CI := ![⟨⟨-359446215754654511143197990121199751461229434911351055,-359446215754654511143197990121199751461229434910160645⟩,⟨-779287488320249895221863587663019249991566071682470704,-779287488320249895221863587663019249991566071681279933⟩⟩, + ⟨⟨49720287163353167559200500205052031948852705752589166,49720287163353167559200500205052031948852705752660336⟩,⟨-28047663740670241302891236656360229979858423368977591,-28047663740670241302891236656360229979858423368906408⟩⟩, + ⟨⟨1628833613295180516638364478868151163786923916224155,1628833613295180516638364478868151163786923916228384⟩,⟨2037553673781613020580170047906566978357597948541313,2037553673781613020580170047906566978357597948545541⟩⟩, + ⟨⟨-43930869038326468917298996554377706181570923800718,-43930869038326468917298996554377706181570923800502⟩,⟨64647759030655535793116538983033179331785097468412,64647759030655535793116538983033179331785097468630⟩⟩, + ⟨⟨-1463294776786628448043513632469800052921364137356,-1463294776786628448043513632469800052921364137233⟩,⟨-115005791547355785595445823313784925383209679551,-115005791547355785595445823313784925383209679428⟩⟩, + ⟨⟨-11509349702017095748896155109512599907406669842,-11509349702017095748896155109512599907406669692⟩,⟨-11999632990830732565678163062751842915317141414,-11999632990830732565678163062751842915317141282⟩⟩, + ⟨⟨-52981840513834353576118919749663101967096221,-52981840513834353576118919749663101967096013⟩,⟨-97645115497145770967863493892933502780827503,-97645115497145770967863493892933502780827314⟩⟩, + ⟨⟨-333718666029169824022563575228900667385824,-333718666029169824022563575228900667385556⟩,⟨-287927788393637033142221400012333934551599,-287927788393637033142221400012333934551331⟩⟩, + ⟨⟨-972875998157533472104180199100482778985,-972875998157533472104180199100482778615⟩,⟨505102695893837865667579692164108941375,505102695893837865667579692164108941733⟩⟩, + ⟨⟨1764255287139393858900979413107777298,1764255287139393858900979413107777700⟩,⟨793994326499903304248965788742010887,793994326499903304248965788742011334⟩⟩, + ⟨⟨-3004816737513353059475471138395240,-3004816737513353059475471138394693⟩,⟨-178886288868916720791747129098377,-178886288868916720791747129097867⟩⟩, + ⟨⟨-959546374812415262221663512060,-959546374812415262221663511256⟩,⟨-5631244557695674881678655628092,-5631244557695674881678655627281⟩⟩, + ⟨⟨-6546458313705317039475428780,-6546458313705317039475427951⟩,⟨-19167720057431072414951430697,-19167720057431072414951429869⟩⟩, + ⟨⟨-207048341901396767972481892,-207048341901396767972480968⟩,⟨69747477002610398055990848,69747477002610398055991771⟩⟩, + ⟨⟨11328107056111622551222643,11328107056111622551223640⟩,⟨1641685163563913391682733,1641685163563913391683702⟩⟩, + ⟨⟨-4105891617999542088868184,-4105891617999542088867067⟩,⟨-670,558⟩⟩, + ⟨⟨11328107056111622551222643,11328107056111622551223640⟩,⟨-1641685163563913391683702,-1641685163563913391682733⟩⟩, + ⟨⟨-207048341901396767972481892,-207048341901396767972480968⟩,⟨-69747477002610398055991771,-69747477002610398055990848⟩⟩, + ⟨⟨-6546458313705317039475428780,-6546458313705317039475427951⟩,⟨19167720057431072414951429869,19167720057431072414951430697⟩⟩, + ⟨⟨-959546374812415262221663512060,-959546374812415262221663511256⟩,⟨5631244557695674881678655627281,5631244557695674881678655628092⟩⟩, + ⟨⟨-3004816737513353059475471138395240,-3004816737513353059475471138394693⟩,⟨178886288868916720791747129097867,178886288868916720791747129098377⟩⟩, + ⟨⟨1764255287139393858900979413107777298,1764255287139393858900979413107777700⟩,⟨-793994326499903304248965788742011334,-793994326499903304248965788742010887⟩⟩, + ⟨⟨-972875998157533472104180199100482778985,-972875998157533472104180199100482778615⟩,⟨-505102695893837865667579692164108941733,-505102695893837865667579692164108941375⟩⟩, + ⟨⟨-333718666029169824022563575228900667385824,-333718666029169824022563575228900667385556⟩,⟨287927788393637033142221400012333934551331,287927788393637033142221400012333934551599⟩⟩, + ⟨⟨-52981840513834353576118919749663101967096221,-52981840513834353576118919749663101967096013⟩,⟨97645115497145770967863493892933502780827314,97645115497145770967863493892933502780827503⟩⟩, + ⟨⟨-11509349702017095748896155109512599907406669842,-11509349702017095748896155109512599907406669692⟩,⟨11999632990830732565678163062751842915317141282,11999632990830732565678163062751842915317141414⟩⟩, + ⟨⟨-1463294776786628448043513632469800052921364137356,-1463294776786628448043513632469800052921364137233⟩,⟨115005791547355785595445823313784925383209679428,115005791547355785595445823313784925383209679551⟩⟩, + ⟨⟨-43930869038326468917298996554377706181570923800718,-43930869038326468917298996554377706181570923800502⟩,⟨-64647759030655535793116538983033179331785097468630,-64647759030655535793116538983033179331785097468412⟩⟩, + ⟨⟨1628833613295180516638364478868151163786923916224155,1628833613295180516638364478868151163786923916228384⟩,⟨-2037553673781613020580170047906566978357597948545541,-2037553673781613020580170047906566978357597948541313⟩⟩, + ⟨⟨49720287163353167559200500205052031948852705752589166,49720287163353167559200500205052031948852705752660336⟩,⟨28047663740670241302891236656360229979858423368906408,28047663740670241302891236656360229979858423368977592⟩⟩, + ⟨⟨-359446215754654511143197990121199751461229434911351055,-359446215754654511143197990121199751461229434910160645⟩,⟨779287488320249895221863587663019249991566071681279933,779287488320249895221863587663019249991566071682470704⟩⟩] +lemma tw1_1_6_3_calc (j : Fin 31) : taylorWaveBox 1 1 6 3 j = tw1_1_6_3 j := by + revert j + decide +kernel +def tw1_1_6_4 : Fin 31 → CI := ![⟨⟨533223657470288828477259269148901086708590207164517840,533223657470288828477259269148901086708590207165423585⟩,⟨-52866121452113131062762872924327637517883521498974380,-52866121452113131062762872924327637517883521498069115⟩⟩, + ⟨⟨4931340644041481321235536613646351039680269881497516,4931340644041481321235536613646351039680269881549376⟩,⟨36914049886971208203316581786096726425388394195518162,36914049886971208203316581786096726425388394195570015⟩⟩, + ⟨⟨-1728466353604326476978728434969363720607641060499128,-1728466353604326476978728434969363720607641060496241⟩,⟨428064741532496414032714842365351988914685683841546,428064741532496414032714842365351988914685683844437⟩⟩, + ⟨⟨-26198541972229376197195648495363180601060597365364,-26198541972229376197195648495363180601060597365228⟩,⟨-49381499834806233592905190019371844440267171436878,-49381499834806233592905190019371844440267171436748⟩⟩, + ⟨⟨642752334165673864218601331400833333975091330531,642752334165673864218601331400833333975091330610⟩,⟨-893990312952065145394291344063916794970255992486,-893990312952065145394291344063916794970255992407⟩⟩, + ⟨⟨12933341435357070286890033063498855677967391492,12933341435357070286890033063498855677967391626⟩,⟨-2036519700559916308133661390860304755550276703,-2036519700559916308133661390860304755550276563⟩⟩, + ⟨⟨90380129464973926303071966939179917257843724,90380129464973926303071966939179917257843916⟩,⟨16437380060634734722540953085008941402072729,16437380060634734722540953085008941402072917⟩⟩, + ⟨⟨380446778700624891200835478297576803549941,380446778700624891200835478297576803550139⟩,⟨-41036257054474960850100803491447318532089,-41036257054474960850100803491447318531891⟩⟩, + ⟨⟨345356381479596376580351379942643316090,345356381479596376580351379942643316376⟩,⟨-936537261344936424616531153693444816035,-936537261344936424616531153693444815724⟩⟩, + ⟨⟨-1796315773479883954432737762776413449,-1796315773479883954432737762776412933⟩,⟨417557736131825002277302586731070753,417557736131825002277302586731071270⟩⟩, + ⟨⟨2631028658070817739853398429250946,2631028658070817739853398429251453⟩,⟨-1429153910989471510624937379119390,-1429153910989471510624937379118932⟩⟩, + ⟨⟨3452159023215875129206035173643,3452159023215875129206035174441⟩,⟨4786845426681971797529996534195,4786845426681971797529996534952⟩⟩, + ⟨⟨13545124067988839719547405823,13545124067988839719547406865⟩,⟨16828128965154387446103437349,16828128965154387446103438392⟩⟩, + ⟨⟨202147236162197552174879184,202147236162197552174880067⟩,⟨-126933725322024398791867605,-126933725322024398791866722⟩⟩, + ⟨⟨-12691400373034751175005046,-12691400373034751175003933⟩,⟨-316995810464185657109073,-316995810464185657107972⟩⟩, + ⟨⟨4577300938690272702767087,4577300938690272702768331⟩,⟨-622,747⟩⟩, + ⟨⟨-12691400373034751175005046,-12691400373034751175003933⟩,⟨316995810464185657107972,316995810464185657109073⟩⟩, + ⟨⟨202147236162197552174879184,202147236162197552174880067⟩,⟨126933725322024398791866722,126933725322024398791867605⟩⟩, + ⟨⟨13545124067988839719547405823,13545124067988839719547406865⟩,⟨-16828128965154387446103438392,-16828128965154387446103437349⟩⟩, + ⟨⟨3452159023215875129206035173643,3452159023215875129206035174441⟩,⟨-4786845426681971797529996534952,-4786845426681971797529996534195⟩⟩, + ⟨⟨2631028658070817739853398429250946,2631028658070817739853398429251453⟩,⟨1429153910989471510624937379118932,1429153910989471510624937379119390⟩⟩, + ⟨⟨-1796315773479883954432737762776413449,-1796315773479883954432737762776412933⟩,⟨-417557736131825002277302586731071270,-417557736131825002277302586731070753⟩⟩, + ⟨⟨345356381479596376580351379942643316090,345356381479596376580351379942643316376⟩,⟨936537261344936424616531153693444815724,936537261344936424616531153693444816035⟩⟩, + ⟨⟨380446778700624891200835478297576803549941,380446778700624891200835478297576803550139⟩,⟨41036257054474960850100803491447318531891,41036257054474960850100803491447318532089⟩⟩, + ⟨⟨90380129464973926303071966939179917257843724,90380129464973926303071966939179917257843916⟩,⟨-16437380060634734722540953085008941402072917,-16437380060634734722540953085008941402072729⟩⟩, + ⟨⟨12933341435357070286890033063498855677967391492,12933341435357070286890033063498855677967391626⟩,⟨2036519700559916308133661390860304755550276563,2036519700559916308133661390860304755550276703⟩⟩, + ⟨⟨642752334165673864218601331400833333975091330531,642752334165673864218601331400833333975091330610⟩,⟨893990312952065145394291344063916794970255992407,893990312952065145394291344063916794970255992486⟩⟩, + ⟨⟨-26198541972229376197195648495363180601060597365364,-26198541972229376197195648495363180601060597365228⟩,⟨49381499834806233592905190019371844440267171436748,49381499834806233592905190019371844440267171436878⟩⟩, + ⟨⟨-1728466353604326476978728434969363720607641060499128,-1728466353604326476978728434969363720607641060496241⟩,⟨-428064741532496414032714842365351988914685683844437,-428064741532496414032714842365351988914685683841546⟩⟩, + ⟨⟨4931340644041481321235536613646351039680269881497516,4931340644041481321235536613646351039680269881549376⟩,⟨-36914049886971208203316581786096726425388394195570015,-36914049886971208203316581786096726425388394195518162⟩⟩, + ⟨⟨533223657470288828477259269148901086708590207164517840,533223657470288828477259269148901086708590207165423585⟩,⟨52866121452113131062762872924327637517883521498069115,52866121452113131062762872924327637517883521498974380⟩⟩] +lemma tw1_1_6_4_calc (j : Fin 31) : taylorWaveBox 1 1 6 4 j = tw1_1_6_4 j := by + revert j + decide +kernel +def tw1_1_6_5 : Fin 31 → CI := ![⟨⟨-66640882806183526578994658564423593327140274955405245,-66640882806183526578994658564423593327140274954885052⟩,⟨278921300979806556956033175261138630493387354410965534,278921300979806556956033175261138630493387354411485985⟩⟩, + ⟨⟨-20188140476174453755210032269251601687849939162485826,-20188140476174453755210032269251601687849939162457727⟩,⟨-5111975344922041360329074411851094539548932466964501,-5111975344922041360329074411851094539548932466936401⟩⟩, + ⟨⟨195579663797580110112339308520726664783644387609490,195579663797580110112339308520726664783644387610888⟩,⟨-1023368095779187411526263765081138027929744029784688,-1023368095779187411526263765081138027929744029783294⟩⟩, + ⟨⟨34268424439611719126863680531497206947376505225028,34268424439611719126863680531497206947376505225110⟩,⟨-55417049992549984355333828887717390344249269073,-55417049992549984355333828887717390344249268986⟩⟩, + ⟨⟨277349982680970763262613157166046912027795360987,277349982680970763262613157166046912027795361050⟩,⟨651376844935803133238647166665857262628351056343,651376844935803133238647166665857262628351056407⟩⟩, + ⟨⟨-3861111064225247957317483535199940857437485507,-3861111064225247957317483535199940857437485418⟩,⟨7948711042499016540975559792153565855030770172,7948711042499016540975559792153565855030770266⟩⟩, + ⟨⟨-49212916357344306550490644779208758593990643,-49212916357344306550490644779208758593990551⟩,⟨42630390507317009878954339500615555168514690,42630390507317009878954339500615555168514796⟩⟩, + ⟨⟨-170969489525656432760494430959345332636405,-170969489525656432760494430959345332636234⟩,⟨227708231443818902325749718009907034215736,227708231443818902325749718009907034215907⟩⟩, + ⟨⟨292845283970087476910617680527094920245,292845283970087476910617680527094920491⟩,⟨721966628927279090863377171054629859945,721966628927279090863377171054629860204⟩⟩, + ⟨⟨960440468265507275420682712593518629,960440468265507275420682712593518987⟩,⟨-1161062659675779480370726869927777715,-1161062659675779480370726869927777391⟩⟩, + ⟨⟨-1259826190802762475032982039007609,-1259826190802762475032982039007115⟩,⟨2220211378785004854115670867250224,2220211378785004854115670867250716⟩⟩, + ⟨⟨-4611486384614735973085378211192,-4611486384614735973085378210609⟩,⟨-2459579826978344624763405486914,-2459579826978344624763405486397⟩⟩, + ⟨⟨-16892581762857400817005285962,-16892581762857400817005284978⟩,⟨-10228501003932961527190837472,-10228501003932961527190836488⟩⟩, + ⟨⟨-156296783281139389869974182,-156296783281139389869973403⟩,⟨159798759200840809571859870,159798759200840809571860648⟩⟩, + ⟨⟨12015778962382129250044017,12015778962382129250045067⟩,⟨-1132523515529008559754932,-1132523515529008559753874⟩⟩, + ⟨⟨-4373857825907568791709134,-4373857825907568791707944⟩,⟨-714,595⟩⟩, + ⟨⟨12015778962382129250044017,12015778962382129250045067⟩,⟨1132523515529008559753874,1132523515529008559754932⟩⟩, + ⟨⟨-156296783281139389869974182,-156296783281139389869973403⟩,⟨-159798759200840809571860648,-159798759200840809571859870⟩⟩, + ⟨⟨-16892581762857400817005285962,-16892581762857400817005284978⟩,⟨10228501003932961527190836488,10228501003932961527190837472⟩⟩, + ⟨⟨-4611486384614735973085378211192,-4611486384614735973085378210609⟩,⟨2459579826978344624763405486397,2459579826978344624763405486914⟩⟩, + ⟨⟨-1259826190802762475032982039007609,-1259826190802762475032982039007115⟩,⟨-2220211378785004854115670867250716,-2220211378785004854115670867250224⟩⟩, + ⟨⟨960440468265507275420682712593518629,960440468265507275420682712593518987⟩,⟨1161062659675779480370726869927777391,1161062659675779480370726869927777715⟩⟩, + ⟨⟨292845283970087476910617680527094920245,292845283970087476910617680527094920491⟩,⟨-721966628927279090863377171054629860204,-721966628927279090863377171054629859945⟩⟩, + ⟨⟨-170969489525656432760494430959345332636405,-170969489525656432760494430959345332636234⟩,⟨-227708231443818902325749718009907034215907,-227708231443818902325749718009907034215736⟩⟩, + ⟨⟨-49212916357344306550490644779208758593990643,-49212916357344306550490644779208758593990551⟩,⟨-42630390507317009878954339500615555168514796,-42630390507317009878954339500615555168514690⟩⟩, + ⟨⟨-3861111064225247957317483535199940857437485507,-3861111064225247957317483535199940857437485418⟩,⟨-7948711042499016540975559792153565855030770266,-7948711042499016540975559792153565855030770172⟩⟩, + ⟨⟨277349982680970763262613157166046912027795360987,277349982680970763262613157166046912027795361050⟩,⟨-651376844935803133238647166665857262628351056407,-651376844935803133238647166665857262628351056343⟩⟩, + ⟨⟨34268424439611719126863680531497206947376505225028,34268424439611719126863680531497206947376505225110⟩,⟨55417049992549984355333828887717390344249268986,55417049992549984355333828887717390344249269073⟩⟩, + ⟨⟨195579663797580110112339308520726664783644387609490,195579663797580110112339308520726664783644387610888⟩,⟨1023368095779187411526263765081138027929744029783294,1023368095779187411526263765081138027929744029784688⟩⟩, + ⟨⟨-20188140476174453755210032269251601687849939162485826,-20188140476174453755210032269251601687849939162457727⟩,⟨5111975344922041360329074411851094539548932466936401,5111975344922041360329074411851094539548932466964501⟩⟩, + ⟨⟨-66640882806183526578994658564423593327140274955405245,-66640882806183526578994658564423593327140274954885052⟩,⟨-278921300979806556956033175261138630493387354411485985,-278921300979806556956033175261138630493387354410965534⟩⟩] +lemma tw1_1_6_5_calc (j : Fin 31) : taylorWaveBox 1 1 6 5 j = tw1_1_6_5 j := by + revert j + decide +kernel +def tw1_1_6_6 : Fin 31 → CI := ![⟨⟨-113213633573865488775079588227989410550999444912419961,-113213633573865488775079588227989410550999444912184997⟩,⟨-72227475641397527923406949012786035107263308055574286,-72227475641397527923406949012786035107263308055339398⟩⟩, + ⟨⟨5993369886491705580127742019172593321851369974349380,5993369886491705580127742019172593321851369974360864⟩,⟨-8240623444981695357954987350645229722237460580300173,-8240623444981695357954987350645229722237460580288689⟩⟩, + ⟨⟨433996478349324092794588486441601415531426395217852,433996478349324092794588486441601415531426395218668⟩,⟨310125255497010448134205283229913028064305417589155,310125255497010448134205283229913028064305417589972⟩⟩, + ⟨⟨-8562114437700927726419161859472708001133120638585,-8562114437700927726419161859472708001133120638531⟩,⟨16265538722563735971499179897593835160328259331014,16265538722563735971499179897593835160328259331067⟩⟩, + ⟨⟨-394277133298999840974178468540052211777934178980,-394277133298999840974178468540052211777934178946⟩,⟨-56516424287966130450319970824082607514753380586,-56516424287966130450319970824082607514753380553⟩⟩, + ⟨⟨-2548844737730168298883185826510833800318629962,-2548844737730168298883185826510833800318629913⟩,⟨-4554103135942142717753973275907535665646539459,-4554103135942142717753973275907535665646539415⟩⟩, + ⟨⟨-1485835148603472481809925039551557268297241,-1485835148603472481809925039551557268297156⟩,⟨-40351977902664773858084999201052751930182215,-40351977902664773858084999201052751930182131⟩⟩, + ⟨⟨-32333347338412722302835365409844947486632,-32333347338412722302835365409844947486532⟩,⟨-182565272201347203509540279460189484843170,-182565272201347203509540279460189484843070⟩⟩, + ⟨⟨-479848077755101326769538943562824241748,-479848077755101326769538943562824241576⟩,⟨-229915225391884438462925053840812925572,-229915225391884438462925053840812925411⟩⟩, + ⟨⟨-42890559072247961524979909369316121,-42890559072247961524979909369315825⟩,⟨1076409271550088408347921149531283967,1076409271550088408347921149531284251⟩⟩, + ⟨⟨-77931491523253781458787704913554,-77931491523253781458787704913251⟩,⟨-1902779301828630534734319687550238,-1902779301828630534734319687549906⟩⟩, + ⟨⟨4047430932917294646755187806311,4047430932917294646755187806874⟩,⟨137488392838589038717625311020,137488392838589038717625311562⟩⟩, + ⟨⟨15494273877368449738424232540,15494273877368449738424233257⟩,⟨3073836195367863552942277231,3073836195367863552942277949⟩⟩, + ⟨⟨93938838020085240140177905,93938838020085240140178652⟩,⟨-157232173949442848148587831,-157232173949442848148587084⟩⟩, + ⟨⟨-9812690594431302538973486,-9812690594431302538972631⟩,⟨2121503334773190456992037,2121503334773190456992914⟩⟩, + ⟨⟨3657024842873009583745259,3657024842873009583746254⟩,⟨-497,597⟩⟩, + ⟨⟨-9812690594431302538973486,-9812690594431302538972631⟩,⟨-2121503334773190456992914,-2121503334773190456992037⟩⟩, + ⟨⟨93938838020085240140177905,93938838020085240140178652⟩,⟨157232173949442848148587084,157232173949442848148587831⟩⟩, + ⟨⟨15494273877368449738424232540,15494273877368449738424233257⟩,⟨-3073836195367863552942277949,-3073836195367863552942277231⟩⟩, + ⟨⟨4047430932917294646755187806311,4047430932917294646755187806874⟩,⟨-137488392838589038717625311562,-137488392838589038717625311020⟩⟩, + ⟨⟨-77931491523253781458787704913554,-77931491523253781458787704913251⟩,⟨1902779301828630534734319687549906,1902779301828630534734319687550238⟩⟩, + ⟨⟨-42890559072247961524979909369316121,-42890559072247961524979909369315825⟩,⟨-1076409271550088408347921149531284251,-1076409271550088408347921149531283967⟩⟩, + ⟨⟨-479848077755101326769538943562824241748,-479848077755101326769538943562824241576⟩,⟨229915225391884438462925053840812925411,229915225391884438462925053840812925572⟩⟩, + ⟨⟨-32333347338412722302835365409844947486632,-32333347338412722302835365409844947486532⟩,⟨182565272201347203509540279460189484843070,182565272201347203509540279460189484843170⟩⟩, + ⟨⟨-1485835148603472481809925039551557268297241,-1485835148603472481809925039551557268297156⟩,⟨40351977902664773858084999201052751930182131,40351977902664773858084999201052751930182215⟩⟩, + ⟨⟨-2548844737730168298883185826510833800318629962,-2548844737730168298883185826510833800318629913⟩,⟨4554103135942142717753973275907535665646539415,4554103135942142717753973275907535665646539459⟩⟩, + ⟨⟨-394277133298999840974178468540052211777934178980,-394277133298999840974178468540052211777934178946⟩,⟨56516424287966130450319970824082607514753380553,56516424287966130450319970824082607514753380586⟩⟩, + ⟨⟨-8562114437700927726419161859472708001133120638585,-8562114437700927726419161859472708001133120638531⟩,⟨-16265538722563735971499179897593835160328259331067,-16265538722563735971499179897593835160328259331014⟩⟩, + ⟨⟨433996478349324092794588486441601415531426395217852,433996478349324092794588486441601415531426395218668⟩,⟨-310125255497010448134205283229913028064305417589972,-310125255497010448134205283229913028064305417589155⟩⟩, + ⟨⟨5993369886491705580127742019172593321851369974349380,5993369886491705580127742019172593321851369974360864⟩,⟨8240623444981695357954987350645229722237460580288689,8240623444981695357954987350645229722237460580300173⟩⟩, + ⟨⟨-113213633573865488775079588227989410550999444912419961,-113213633573865488775079588227989410550999444912184997⟩,⟨72227475641397527923406949012786035107263308055339398,72227475641397527923406949012786035107263308055574286⟩⟩] +lemma tw1_1_6_6_calc (j : Fin 31) : taylorWaveBox 1 1 6 6 j = tw1_1_6_6 j := by + revert j + decide +kernel +def tw1_1_6_7 : Fin 31 → CI := ![⟨⟨43829903703991678962773141605191087588148230280143476,43829903703991678962773141605191087588148230280227589⟩,⟨-34693944012604775119101306463098797690857159894440954,-34693944012604775119101306463098797690857159894356840⟩⟩, + ⟨⟨2358487415035177535226830448699922223865985643874749,2358487415035177535226830448699922223865985643880511⟩,⟨3752020788690051279890506096372534751049198125821596,3752020788690051279890506096372534751049198125827357⟩⟩, + ⟨⟨-210812280787860780047213494384983895092717449577972,-210812280787860780047213494384983895092717449577549⟩,⟨120351775731755327995534195469242093407230220556058,120351775731755327995534195469242093407230220556480⟩⟩, + ⟨⟨-4949344449057466393473140097569693742857423905024,-4949344449057466393473140097569693742857423905000⟩,⟨-7232920042391501980962721648543753882050403612959,-7232920042391501980962721648543753882050403612936⟩⟩, + ⟨⟨126375339999755899551031581851158598682388915446,126375339999755899551031581851158598682388915461⟩,⟨-153969759901819390896477535199962571734643048726,-153969759901819390896477535199962571734643048711⟩⟩, + ⟨⟨2726503256651095033290141018879939713473016994,2726503256651095033290141018879939713473017024⟩,⟨268387050221451108259650570822600802756647932,268387050221451108259650570822600802756647962⟩⟩, + ⟨⟨17851284487367880761246346884923053363739058,17851284487367880761246346884923053363739099⟩,⟨13297689805843844768297113989705410665132669,13297689805843844768297113989705410665132706⟩⟩, + ⟨⟨89983267466713385419314988998846700440706,89983267466713385419314988998846700440770⟩,⟨58465424815944766691759052494964687754377,58465424815944766691759052494964687754441⟩⟩, + ⟨⟨309356500049952252328092992735184836734,309356500049952252328092992735184836839⟩,⟨-92925656383435429857257796931553260682,-92925656383435429857257796931553260584⟩⟩, + ⟨⟨-392998618009147872634491270419027074,-392998618009147872634491270419026899⟩,⟨-560547081530345156288109936984619065,-560547081530345156288109936984618880⟩⟩, + ⟨⟨710959751570932337781600757946167,710959751570932337781600757946375⟩,⟨1043684138032276499780583887874888,1043684138032276499780583887875113⟩⟩, + ⟨⟨-2544575615340808719140883632706,-2544575615340808719140883632321⟩,⟨1142646410497606384472609235837,1142646410497606384472609236231⟩⟩, + ⟨⟨-11100555773194451837822877990,-11100555773194451837822877590⟩,⟨1709156905792259520012525970,1709156905792259520012526369⟩⟩, + ⟨⟨-39775955486460490611832712,-39775955486460490611832118⟩,⟨127334666187846665403787537,127334666187846665403788131⟩⟩, + ⟨⟨7018148615346140629155056,7018148615346140629155665⟩,⟨-2418565425462231353748081,-2418565425462231353747444⟩⟩, + ⟨⟨-2717932311821378535332016,-2717932311821378535331276⟩,⟨-444,370⟩⟩, + ⟨⟨7018148615346140629155056,7018148615346140629155665⟩,⟨2418565425462231353747444,2418565425462231353748081⟩⟩, + ⟨⟨-39775955486460490611832712,-39775955486460490611832118⟩,⟨-127334666187846665403788131,-127334666187846665403787537⟩⟩, + ⟨⟨-11100555773194451837822877990,-11100555773194451837822877590⟩,⟨-1709156905792259520012526369,-1709156905792259520012525970⟩⟩, + ⟨⟨-2544575615340808719140883632706,-2544575615340808719140883632321⟩,⟨-1142646410497606384472609236231,-1142646410497606384472609235837⟩⟩, + ⟨⟨710959751570932337781600757946167,710959751570932337781600757946375⟩,⟨-1043684138032276499780583887875113,-1043684138032276499780583887874888⟩⟩, + ⟨⟨-392998618009147872634491270419027074,-392998618009147872634491270419026899⟩,⟨560547081530345156288109936984618880,560547081530345156288109936984619065⟩⟩, + ⟨⟨309356500049952252328092992735184836734,309356500049952252328092992735184836839⟩,⟨92925656383435429857257796931553260584,92925656383435429857257796931553260682⟩⟩, + ⟨⟨89983267466713385419314988998846700440706,89983267466713385419314988998846700440770⟩,⟨-58465424815944766691759052494964687754441,-58465424815944766691759052494964687754377⟩⟩, + ⟨⟨17851284487367880761246346884923053363739058,17851284487367880761246346884923053363739099⟩,⟨-13297689805843844768297113989705410665132706,-13297689805843844768297113989705410665132669⟩⟩, + ⟨⟨2726503256651095033290141018879939713473016994,2726503256651095033290141018879939713473017024⟩,⟨-268387050221451108259650570822600802756647962,-268387050221451108259650570822600802756647932⟩⟩, + ⟨⟨126375339999755899551031581851158598682388915446,126375339999755899551031581851158598682388915461⟩,⟨153969759901819390896477535199962571734643048711,153969759901819390896477535199962571734643048726⟩⟩, + ⟨⟨-4949344449057466393473140097569693742857423905024,-4949344449057466393473140097569693742857423905000⟩,⟨7232920042391501980962721648543753882050403612936,7232920042391501980962721648543753882050403612959⟩⟩, + ⟨⟨-210812280787860780047213494384983895092717449577972,-210812280787860780047213494384983895092717449577549⟩,⟨-120351775731755327995534195469242093407230220556480,-120351775731755327995534195469242093407230220556058⟩⟩, + ⟨⟨2358487415035177535226830448699922223865985643874749,2358487415035177535226830448699922223865985643880511⟩,⟨-3752020788690051279890506096372534751049198125827357,-3752020788690051279890506096372534751049198125821596⟩⟩, + ⟨⟨43829903703991678962773141605191087588148230280143476,43829903703991678962773141605191087588148230280227589⟩,⟨34693944012604775119101306463098797690857159894356840,34693944012604775119101306463098797690857159894440954⟩⟩] +lemma tw1_1_6_7_calc (j : Fin 31) : taylorWaveBox 1 1 6 7 j = tw1_1_6_7 j := by + revert j + decide +kernel +def tw1_1_6_8 : Fin 31 → CI := ![⟨⟨6909119862792504030392971550701685638150019840725170,6909119862792504030392971550701685638150019840758372⟩,⟨19768906341813341714670403010639867994722638065348130,19768906341813341714670403010639867994722638065381344⟩⟩, + ⟨⟨-1706575618924366444796928940901173541629453747450586,-1706575618924366444796928940901173541629453747447995⟩,⟨311197513138308199581147170206212607552397895737369,311197513138308199581147170206212607552397895739960⟩⟩, + ⟨⟨-8652416027224385885921399848557951129421160545896,-8652416027224385885921399848557951129421160545730⟩,⟨-99045977613385789623805984508694975674502366957919,-99045977613385789623805984508694975674502366957753⟩⟩, + ⟨⟨3736473248222111737791062117884515598144869296267,3736473248222111737791062117884515598144869296277⟩,⟨-427585091740395289887945950774001320275910891459,-427585091740395289887945950774001320275910891448⟩⟩, + ⟨⟨29779991919183963591149982104067620467212179260,29779991919183963591149982104067620467212179269⟩,⟨84563125498862267940711829478029389795259960318,84563125498862267940711829478029389795259960327⟩⟩, + ⟨⟨-840276227454324103520354798904662544502621547,-840276227454324103520354798904662544502621535⟩,⟨984579353033884138397301907655766030596058801,984579353033884138397301907655766030596058814⟩⟩, + ⟨⟨-10690953745251459423208979439573061477862289,-10690953745251459423208979439573061477862267⟩,⟨2769897146842914629490218083410388556022655,2769897146842914629490218083410388556022678⟩⟩, + ⟨⟨-54253126671537018276000643202664774051654,-54253126671537018276000643202664774051622⟩,⟨13456661576875910789619886165537980073453,13456661576875910789619886165537980073485⟩⟩, + ⟨⟨-90789147796075165567913624857332274779,-90789147796075165567913624857332274722⟩,⟨151336831859222906900915095751310549877,151336831859222906900915095751310549936⟩⟩, + ⟨⟨373112125734045694447949887310220421,373112125734045694447949887310220511⟩,⟨118714712774809313996111748647848588,118714712774809313996111748647848686⟩⟩, + ⟨⟨-689470797691557294935896408857952,-689470797691557294935896408857805⟩,⟨-304377400748985210306885517214140,-304377400748985210306885517213995⟩⟩, + ⟨⟨1104246925505386900786067983747,1104246925505386900786067983936⟩,⟨-1330575264146398231778131586579,-1330575264146398231778131586371⟩⟩, + ⟨⟨6302504270619801695291680286,6302504270619801695291680611⟩,⟨-3454407155592341140487768373,-3454407155592341140487768048⟩⟩, + ⟨⟨5854106847207043683369529,5854106847207043683369930⟩,⟨-87251350475900327696825533,-87251350475900327696825132⟩⟩, + ⟨⟨-4446344119790529252457400,-4446344119790529252457015⟩,⟨2152314778945345637907890,2152314778945345637908300⟩⟩, + ⟨⟨1817991600312817571118769,1817991600312817571119265⟩,⟨-248,297⟩⟩, + ⟨⟨-4446344119790529252457400,-4446344119790529252457015⟩,⟨-2152314778945345637908300,-2152314778945345637907890⟩⟩, + ⟨⟨5854106847207043683369529,5854106847207043683369930⟩,⟨87251350475900327696825132,87251350475900327696825533⟩⟩, + ⟨⟨6302504270619801695291680286,6302504270619801695291680611⟩,⟨3454407155592341140487768048,3454407155592341140487768373⟩⟩, + ⟨⟨1104246925505386900786067983747,1104246925505386900786067983936⟩,⟨1330575264146398231778131586371,1330575264146398231778131586579⟩⟩, + ⟨⟨-689470797691557294935896408857952,-689470797691557294935896408857805⟩,⟨304377400748985210306885517213995,304377400748985210306885517214140⟩⟩, + ⟨⟨373112125734045694447949887310220421,373112125734045694447949887310220511⟩,⟨-118714712774809313996111748647848686,-118714712774809313996111748647848588⟩⟩, + ⟨⟨-90789147796075165567913624857332274779,-90789147796075165567913624857332274722⟩,⟨-151336831859222906900915095751310549936,-151336831859222906900915095751310549877⟩⟩, + ⟨⟨-54253126671537018276000643202664774051654,-54253126671537018276000643202664774051622⟩,⟨-13456661576875910789619886165537980073485,-13456661576875910789619886165537980073453⟩⟩, + ⟨⟨-10690953745251459423208979439573061477862289,-10690953745251459423208979439573061477862267⟩,⟨-2769897146842914629490218083410388556022678,-2769897146842914629490218083410388556022655⟩⟩, + ⟨⟨-840276227454324103520354798904662544502621547,-840276227454324103520354798904662544502621535⟩,⟨-984579353033884138397301907655766030596058814,-984579353033884138397301907655766030596058801⟩⟩, + ⟨⟨29779991919183963591149982104067620467212179260,29779991919183963591149982104067620467212179269⟩,⟨-84563125498862267940711829478029389795259960327,-84563125498862267940711829478029389795259960318⟩⟩, + ⟨⟨3736473248222111737791062117884515598144869296267,3736473248222111737791062117884515598144869296277⟩,⟨427585091740395289887945950774001320275910891448,427585091740395289887945950774001320275910891459⟩⟩, + ⟨⟨-8652416027224385885921399848557951129421160545896,-8652416027224385885921399848557951129421160545730⟩,⟨99045977613385789623805984508694975674502366957753,99045977613385789623805984508694975674502366957919⟩⟩, + ⟨⟨-1706575618924366444796928940901173541629453747450586,-1706575618924366444796928940901173541629453747447995⟩,⟨-311197513138308199581147170206212607552397895739960,-311197513138308199581147170206212607552397895737369⟩⟩, + ⟨⟨6909119862792504030392971550701685638150019840725170,6909119862792504030392971550701685638150019840758372⟩,⟨-19768906341813341714670403010639867994722638065381344,-19768906341813341714670403010639867994722638065348130⟩⟩] +lemma tw1_1_6_8_calc (j : Fin 31) : taylorWaveBox 1 1 6 8 j = tw1_1_6_8 j := by + revert j + decide +kernel +def tw1_1_6_9 : Fin 31 → CI := ![⟨⟨-7132043922922703208521450382074013839640170675336797,-7132043922922703208521450382074013839640170675323490⟩,⟨20510719170653320549172088186721044669217093711075,20510719170653320549172088186721044669217093724375⟩⟩, + ⟨⟨122902044475281804000181006266218874729881335328540,122902044475281804000181006266218874729881335329471⟩,⟨-604936373282279779865010182229775581711798320042799,-604936373282279779865010182229775581711798320041868⟩⟩, + ⟨⟨34844537874461519211157747699464629658411406023969,34844537874461519211157747699464629658411406024021⟩,⟨12501377095108755354922202243311517769935200278976,12501377095108755354922202243311517769935200279029⟩⟩, + ⟨⟨-533570385921035250659152127845562090034568992982,-533570385921035250659152127845562090034568992977⟩,⟨1366667613904525885239950495756438245610704034657,1366667613904525885239950495756438245610704034662⟩⟩, + ⟨⟨-35905595613084961507840037782878742274923412949,-35905595613084961507840037782878742274923412945⟩,⟨-7514664729644137685470823654701408073117731506,-7514664729644137685470823654701408073117731502⟩⟩, + ⟨⟨-140745916127472453499481503965227623167845252,-140745916127472453499481503965227623167845245⟩,⟨-537846890842287004467743546546673728279883400,-537846890842287004467743546546673728279883394⟩⟩, + ⟨⟨2047189096921116233118634942536290921399054,2047189096921116233118634942536290921399064⟩,⟨-4541097143627858046983917216882326236681001,-4541097143627858046983917216882326236680990⟩⟩, + ⟨⟨12883795285129585477385011354672306081066,12883795285129585477385011354672306081082⟩,⟨-23122623649846831718576980070949135880087,-23122623649846831718576980070949135880070⟩⟩, + ⟨⟨-17266394207943674380095816148075908071,-17266394207943674380095816148075908045⟩,⟨-85939167568968414577681674963543972354,-85939167568968414577681674963543972326⟩⟩, + ⟨⟨-191705584583278865737163283216783372,-191705584583278865737163283216783314⟩,⟨68513331068686525734709582504295326,68513331068686525734709582504295383⟩⟩, + ⟨⟨404828134165156054317527701292015,404828134165156054317527701292083⟩,⟨-57598598611640001271355830788809,-57598598611640001271355830788748⟩⟩, + ⟨⟨-228485489089733314225540212577,-228485489089733314225540212458⟩,⟨947248991088959916949034529350,947248991088959916949034529477⟩⟩, + ⟨⟨-2759415871279677663007889449,-2759415871279677663007889240⟩,⟨3141114596032162295312822806,3141114596032162295312823015⟩⟩, + ⟨⟨8753813441867596361457665,8753813441867596361457898⟩,⟨51371550584192970918350737,51371550584192970918350969⟩⟩, + ⟨⟨2516377665541873680332777,2516377665541873680332994⟩,⟨-1612085075099194321761341,-1612085075099194321761104⟩⟩, + ⟨⟨-1105483901872685081471067,-1105483901872685081470765⟩,⟨-181,151⟩⟩, + ⟨⟨2516377665541873680332777,2516377665541873680332994⟩,⟨1612085075099194321761104,1612085075099194321761341⟩⟩, + ⟨⟨8753813441867596361457665,8753813441867596361457898⟩,⟨-51371550584192970918350969,-51371550584192970918350737⟩⟩, + ⟨⟨-2759415871279677663007889449,-2759415871279677663007889240⟩,⟨-3141114596032162295312823015,-3141114596032162295312822806⟩⟩, + ⟨⟨-228485489089733314225540212577,-228485489089733314225540212458⟩,⟨-947248991088959916949034529477,-947248991088959916949034529350⟩⟩, + ⟨⟨404828134165156054317527701292015,404828134165156054317527701292083⟩,⟨57598598611640001271355830788748,57598598611640001271355830788809⟩⟩, + ⟨⟨-191705584583278865737163283216783372,-191705584583278865737163283216783314⟩,⟨-68513331068686525734709582504295383,-68513331068686525734709582504295326⟩⟩, + ⟨⟨-17266394207943674380095816148075908071,-17266394207943674380095816148075908045⟩,⟨85939167568968414577681674963543972326,85939167568968414577681674963543972354⟩⟩, + ⟨⟨12883795285129585477385011354672306081066,12883795285129585477385011354672306081082⟩,⟨23122623649846831718576980070949135880070,23122623649846831718576980070949135880087⟩⟩, + ⟨⟨2047189096921116233118634942536290921399054,2047189096921116233118634942536290921399064⟩,⟨4541097143627858046983917216882326236680990,4541097143627858046983917216882326236681001⟩⟩, + ⟨⟨-140745916127472453499481503965227623167845252,-140745916127472453499481503965227623167845245⟩,⟨537846890842287004467743546546673728279883394,537846890842287004467743546546673728279883400⟩⟩, + ⟨⟨-35905595613084961507840037782878742274923412949,-35905595613084961507840037782878742274923412945⟩,⟨7514664729644137685470823654701408073117731502,7514664729644137685470823654701408073117731506⟩⟩, + ⟨⟨-533570385921035250659152127845562090034568992982,-533570385921035250659152127845562090034568992977⟩,⟨-1366667613904525885239950495756438245610704034662,-1366667613904525885239950495756438245610704034657⟩⟩, + ⟨⟨34844537874461519211157747699464629658411406023969,34844537874461519211157747699464629658411406024021⟩,⟨-12501377095108755354922202243311517769935200279029,-12501377095108755354922202243311517769935200278976⟩⟩, + ⟨⟨122902044475281804000181006266218874729881335328540,122902044475281804000181006266218874729881335329471⟩,⟨604936373282279779865010182229775581711798320041868,604936373282279779865010182229775581711798320042799⟩⟩, + ⟨⟨-7132043922922703208521450382074013839640170675336797,-7132043922922703208521450382074013839640170675323490⟩,⟨-20510719170653320549172088186721044669217093724375,-20510719170653320549172088186721044669217093711075⟩⟩] +lemma tw1_1_6_9_calc (j : Fin 31) : taylorWaveBox 1 1 6 9 j = tw1_1_6_9 j := by + revert j + decide +kernel +def tw1_1_6_10 : Fin 31 → CI := ![⟨⟨722498631076655673958740584594707735298014172540777,722498631076655673958740584594707735298014172545159⟩,⟨-2106085029715665943289666947928963227182074617100675,-2106085029715665943289666947928963227182074617096291⟩⟩, + ⟨⟨168290639297163363616705939898055652990567563374237,168290639297163363616705939898055652990567563374510⟩,⟨110558325655318244213576566483974401534659985682396,110558325655318244213576566483974401534659985682668⟩⟩, + ⟨⟨-8850734305194929999202805918101459495556735637409,-8850734305194929999202805918101459495556735637385⟩,⟨9017250311846832220907024770793387739012932230725,9017250311846832220907024770793387739012932230749⟩⟩, + ⟨⟨-342941360442145047789089025037413004796434017379,-342941360442145047789089025037413004796434017377⟩,⟨-397039584077388863401832879722157919429334265101,-397039584077388863401832879722157919429334265099⟩⟩, + ⟨⟨9390961914964139055536473135725061927146666042,9390961914964139055536473135725061927146666044⟩,⟨-10055805859189225300219184394327397485926752219,-10055805859189225300219184394327397485926752217⟩⟩, + ⟨⟨205437704221396215090006098697996452371433881,205437704221396215090006098697996452371433884⟩,⟨75554726678675165332470077504410556047469709,75554726678675165332470077504410556047469712⟩⟩, + ⟨⟨933119306645454113430629287173789495208770,933119306645454113430629287173789495208775⟩,⟨1835963376179867628713292666914338381187275,1835963376179867628713292666914338381187280⟩⟩, + ⟨⟨3515734791668740000593176304209395277555,3515734791668740000593176304209395277562⟩,⟨10938966972442678122032385788072858612292,10938966972442678122032385788072858612299⟩⟩, + ⟨⟨32156695002717216995684086964022388247,32156695002717216995684086964022388262⟩,⟨23638102468916664137562763384074755051,23638102468916664137562763384074755065⟩⟩, + ⟨⟨52871344079488532197532265928111341,52871344079488532197532265928111363⟩,⟨-81359773654782649734269381874458546,-81359773654782649734269381874458527⟩⟩, + ⟨⟨-155752302682454640400905007503473,-155752302682454640400905007503435⟩,⟨130761581536960381280870419570587,130761581536960381280870419570623⟩⟩, + ⟨⟨-109520672999999691540276321807,-109520672999999691540276321735⟩,⟨-491301968557274412247533528043,-491301968557274412247533527971⟩⟩, + ⟨⟨810792955438454697229887846,810792955438454697229887955⟩,⟨-2076931086269271907128318580,-2076931086269271907128318471⟩⟩, + ⟨⟨-11204874451693396640826500,-11204874451693396640826384⟩,⟨-26168976200844928427982336,-26168976200844928427982220⟩⟩, + ⟨⟨-1279521358724102556731289,-1279521358724102556731179⟩,⟨1053268577438182222802021,1053268577438182222802145⟩⟩, + ⟨⟨616203856863397492877798,616203856863397492877966⟩,⟨-84,101⟩⟩, + ⟨⟨-1279521358724102556731289,-1279521358724102556731179⟩,⟨-1053268577438182222802145,-1053268577438182222802021⟩⟩, + ⟨⟨-11204874451693396640826500,-11204874451693396640826384⟩,⟨26168976200844928427982220,26168976200844928427982336⟩⟩, + ⟨⟨810792955438454697229887846,810792955438454697229887955⟩,⟨2076931086269271907128318471,2076931086269271907128318580⟩⟩, + ⟨⟨-109520672999999691540276321807,-109520672999999691540276321735⟩,⟨491301968557274412247533527971,491301968557274412247533528043⟩⟩, + ⟨⟨-155752302682454640400905007503473,-155752302682454640400905007503435⟩,⟨-130761581536960381280870419570623,-130761581536960381280870419570587⟩⟩, + ⟨⟨52871344079488532197532265928111341,52871344079488532197532265928111363⟩,⟨81359773654782649734269381874458527,81359773654782649734269381874458546⟩⟩, + ⟨⟨32156695002717216995684086964022388247,32156695002717216995684086964022388262⟩,⟨-23638102468916664137562763384074755065,-23638102468916664137562763384074755051⟩⟩, + ⟨⟨3515734791668740000593176304209395277555,3515734791668740000593176304209395277562⟩,⟨-10938966972442678122032385788072858612299,-10938966972442678122032385788072858612292⟩⟩, + ⟨⟨933119306645454113430629287173789495208770,933119306645454113430629287173789495208775⟩,⟨-1835963376179867628713292666914338381187280,-1835963376179867628713292666914338381187275⟩⟩, + ⟨⟨205437704221396215090006098697996452371433881,205437704221396215090006098697996452371433884⟩,⟨-75554726678675165332470077504410556047469712,-75554726678675165332470077504410556047469709⟩⟩, + ⟨⟨9390961914964139055536473135725061927146666042,9390961914964139055536473135725061927146666044⟩,⟨10055805859189225300219184394327397485926752217,10055805859189225300219184394327397485926752219⟩⟩, + ⟨⟨-342941360442145047789089025037413004796434017379,-342941360442145047789089025037413004796434017377⟩,⟨397039584077388863401832879722157919429334265099,397039584077388863401832879722157919429334265101⟩⟩, + ⟨⟨-8850734305194929999202805918101459495556735637409,-8850734305194929999202805918101459495556735637385⟩,⟨-9017250311846832220907024770793387739012932230749,-9017250311846832220907024770793387739012932230725⟩⟩, + ⟨⟨168290639297163363616705939898055652990567563374237,168290639297163363616705939898055652990567563374510⟩,⟨-110558325655318244213576566483974401534659985682668,-110558325655318244213576566483974401534659985682396⟩⟩, + ⟨⟨722498631076655673958740584594707735298014172540777,722498631076655673958740584594707735298014172545159⟩,⟨2106085029715665943289666947928963227182074617096291,2106085029715665943289666947928963227182074617100675⟩⟩] +lemma tw1_1_6_10_calc (j : Fin 31) : taylorWaveBox 1 1 6 10 j = tw1_1_6_10 j := by + revert j + decide +kernel +def tw1_1_6_11 : Fin 31 → CI := ![⟨⟨505386102180314145837445812473651873469858217237136,505386102180314145837445812473651873469858217238351⟩,⟨395336029454719313398380803237380875773289585575882,395336029454719313398380803237380875773289585577096⟩⟩, + ⟨⟨-49738114908924503258174406777547492763925220915869,-49738114908924503258174406777547492763925220915777⟩,⟨34670023674012108591580475855292121465563640369995,34670023674012108591580475855292121465563640370087⟩⟩, + ⟨⟨-1413906044534883607245489295509913724378515014768,-1413906044534883607245489295509913724378515014759⟩,⟨-3721227395198082374066067919602753396725255507639,-3721227395198082374066067919602753396725255507630⟩⟩, + ⟨⟨168764724848807803085734564502414712108196801547,168764724848807803085734564502414712108196801549⟩,⟨-38850384872431729784854252756747722628205001359,-38850384872431729784854252756747722628205001358⟩⟩, + ⟨⟨1291996316470693124348893281573711947035953733,1291996316470693124348893281573711947035953734⟩,⟨4585084796895206778851126389275489586433516611,4585084796895206778851126389275489586433516612⟩⟩, + ⟨⟨-65204210199043195248112461117061275912106782,-65204210199043195248112461117061275912106781⟩,⟨45573401683771192329601203002508039228872838,45573401683771192329601203002508039228872840⟩⟩, + ⟨⟨-769242736147555202192364865472883160320228,-769242736147555202192364865472883160320226⟩,⟨-161404388330561289717309551105681004502410,-161404388330561289717309551105681004502407⟩⟩, + ⟨⟨-4164447296094388112015422067641857956788,-4164447296094388112015422067641857956785⟩,⟨-1963134836189282775789060921365265048747,-1963134836189282775789060921365265048744⟩⟩, + ⟨⟨-16681372050670098059630663182411996608,-16681372050670098059630663182411996602⟩,⟨1753624016929312829940523178634805837,1753624016929312829940523178634805843⟩⟩, + ⟨⟨3199516263732197654950978317353706,3199516263732197654950978317353719⟩,⟨42568535514111746419960396425186070,42568535514111746419960396425186083⟩⟩, + ⟨⟨28954873832414146633721708481518,28954873832414146633721708481537⟩,⟨-88758109125004275037074687673921,-88758109125004275037074687673902⟩⟩, + ⟨⟨150056147837890819644469242926,150056147837890819644469242959⟩,⟨187334440561964170578359185843,187334440561964170578359185873⟩⟩, + ⟨⟨-25868709745592966605303504,-25868709745592966605303458⟩,⟨1097186799429806740055227726,1097186799429806740055227772⟩⟩, + ⟨⟨8576097882546220195589933,8576097882546220195589984⟩,⟨11510635528580988709211280,11510635528580988709211331⟩⟩, + ⟨⟨586373387178632361792029,586373387178632361792080⟩,⟨-613079740930068270216482,-613079740930068270216423⟩⟩, + ⟨⟨-317054773016403385479881,-317054773016403385479794⟩,⟨-52,44⟩⟩, + ⟨⟨586373387178632361792029,586373387178632361792080⟩,⟨613079740930068270216423,613079740930068270216482⟩⟩, + ⟨⟨8576097882546220195589933,8576097882546220195589984⟩,⟨-11510635528580988709211331,-11510635528580988709211280⟩⟩, + ⟨⟨-25868709745592966605303504,-25868709745592966605303458⟩,⟨-1097186799429806740055227772,-1097186799429806740055227726⟩⟩, + ⟨⟨150056147837890819644469242926,150056147837890819644469242959⟩,⟨-187334440561964170578359185873,-187334440561964170578359185843⟩⟩, + ⟨⟨28954873832414146633721708481518,28954873832414146633721708481537⟩,⟨88758109125004275037074687673902,88758109125004275037074687673921⟩⟩, + ⟨⟨3199516263732197654950978317353706,3199516263732197654950978317353719⟩,⟨-42568535514111746419960396425186083,-42568535514111746419960396425186070⟩⟩, + ⟨⟨-16681372050670098059630663182411996608,-16681372050670098059630663182411996602⟩,⟨-1753624016929312829940523178634805843,-1753624016929312829940523178634805837⟩⟩, + ⟨⟨-4164447296094388112015422067641857956788,-4164447296094388112015422067641857956785⟩,⟨1963134836189282775789060921365265048744,1963134836189282775789060921365265048747⟩⟩, + ⟨⟨-769242736147555202192364865472883160320228,-769242736147555202192364865472883160320226⟩,⟨161404388330561289717309551105681004502407,161404388330561289717309551105681004502410⟩⟩, + ⟨⟨-65204210199043195248112461117061275912106782,-65204210199043195248112461117061275912106781⟩,⟨-45573401683771192329601203002508039228872840,-45573401683771192329601203002508039228872838⟩⟩, + ⟨⟨1291996316470693124348893281573711947035953733,1291996316470693124348893281573711947035953734⟩,⟨-4585084796895206778851126389275489586433516612,-4585084796895206778851126389275489586433516611⟩⟩, + ⟨⟨168764724848807803085734564502414712108196801547,168764724848807803085734564502414712108196801549⟩,⟨38850384872431729784854252756747722628205001358,38850384872431729784854252756747722628205001359⟩⟩, + ⟨⟨-1413906044534883607245489295509913724378515014768,-1413906044534883607245489295509913724378515014759⟩,⟨3721227395198082374066067919602753396725255507630,3721227395198082374066067919602753396725255507639⟩⟩, + ⟨⟨-49738114908924503258174406777547492763925220915869,-49738114908924503258174406777547492763925220915777⟩,⟨-34670023674012108591580475855292121465563640370087,-34670023674012108591580475855292121465563640369995⟩⟩, + ⟨⟨505386102180314145837445812473651873469858217237136,505386102180314145837445812473651873469858217238351⟩,⟨-395336029454719313398380803237380875773289585577096,-395336029454719313398380803237380875773289585575882⟩⟩] +lemma tw1_1_6_11_calc (j : Fin 31) : taylorWaveBox 1 1 6 11 j = tw1_1_6_11 j := by + revert j + decide +kernel +def tw1_1_6_12 : Fin 31 → CI := ![⟨⟨-144216128781524190231535952005142691596962239679085,-144216128781524190231535952005142691596962239678800⟩,⟨93177704100454648132101891149352898262266940024280,93177704100454648132101891149352898262266940024565⟩⟩, + ⟨⟨-3830516465473297383715932127297883384622830134294,-3830516465473297383715932127297883384622830134263⟩,⟨-16513109829882105742111373946977376114609064610281,-16513109829882105742111373946977376114609064610250⟩⟩, + ⟨⟨1161860710514993279541366355339404046956228941211,1161860710514993279541366355339404046956228941215⟩,⟨79710338408659573422234657042113462500068961997,79710338408659573422234657042113462500068962000⟩⟩, + ⟨⟨-13640801945483623761251258253063066258526797962,-13640801945483623761251258253063066258526797961⟩,⟨51298664683876803233093054788179312935850896982,51298664683876803233093054788179312935850896983⟩⟩, + ⟨⟨-1475878231984684590482211219936932169433969899,-1475878231984684590482211219936932169433969898⟩,⟨-408860445729439484966316571096758456695646854,-408860445729439484966316571096758456695646853⟩⟩, + ⟨⟨-44139271015368728394110730553404025344559,-44139271015368728394110730553404025344558⟩,⟨-26846626433046077591101685615255032859166295,-26846626433046077591101685615255032859166293⟩⟩, + ⟨⟨215369741954619051490533622025248979131796,215369741954619051490533622025248979131797⟩,⟨-176643728922623127403242362935187957807700,-176643728922623127403242362935187957807699⟩⟩, + ⟨⟨1591559820987999943937054109424530824583,1591559820987999943937054109424530824585⟩,⟨-633491304229650915816777422699826507442,-633491304229650915816777422699826507440⟩⟩, + ⟨⟨4352691445060875184079070221211394712,4352691445060875184079070221211394715⟩,⟨-4889062649933125287188663514980463140,-4889062649933125287188663514980463137⟩⟩, + ⟨⟨-11581812428140558215160474415198834,-11581812428140558215160474415198828⟩,⟨-13038313409829253491366363119128935,-13038313409829253491366363119128929⟩⟩, + ⟨⟨9527158693646213558246082455347,9527158693646213558246082455353⟩,⟨38642164247689976749225655304183,38642164247689976749225655304190⟩⟩, + ⟨⟨-96180976179034502128069470539,-96180976179034502128069470526⟩,⟨-45212048770777967314001340740,-45212048770777967314001340728⟩⟩, + ⟨⟨-160198128539911923335324571,-160198128539911923335324550⟩,⟨-475375862050433957476962173,-475375862050433957476962152⟩⟩, + ⟨⟨-5163441268614433803430265,-5163441268614433803430239⟩,⟨-4302446104780500142065650,-4302446104780500142065624⟩⟩, + ⟨⟨-242171310015294838873779,-242171310015294838873752⟩,⟨322432775108029112755434,322432775108029112755463⟩⟩, + ⟨⟨151481464598211739668489,151481464598211739668531⟩,⟨-21,25⟩⟩, + ⟨⟨-242171310015294838873779,-242171310015294838873752⟩,⟨-322432775108029112755463,-322432775108029112755434⟩⟩, + ⟨⟨-5163441268614433803430265,-5163441268614433803430239⟩,⟨4302446104780500142065624,4302446104780500142065650⟩⟩, + ⟨⟨-160198128539911923335324571,-160198128539911923335324550⟩,⟨475375862050433957476962152,475375862050433957476962173⟩⟩, + ⟨⟨-96180976179034502128069470539,-96180976179034502128069470526⟩,⟨45212048770777967314001340728,45212048770777967314001340740⟩⟩, + ⟨⟨9527158693646213558246082455347,9527158693646213558246082455353⟩,⟨-38642164247689976749225655304190,-38642164247689976749225655304183⟩⟩, + ⟨⟨-11581812428140558215160474415198834,-11581812428140558215160474415198828⟩,⟨13038313409829253491366363119128929,13038313409829253491366363119128935⟩⟩, + ⟨⟨4352691445060875184079070221211394712,4352691445060875184079070221211394715⟩,⟨4889062649933125287188663514980463137,4889062649933125287188663514980463140⟩⟩, + ⟨⟨1591559820987999943937054109424530824583,1591559820987999943937054109424530824585⟩,⟨633491304229650915816777422699826507440,633491304229650915816777422699826507442⟩⟩, + ⟨⟨215369741954619051490533622025248979131796,215369741954619051490533622025248979131797⟩,⟨176643728922623127403242362935187957807699,176643728922623127403242362935187957807700⟩⟩, + ⟨⟨-44139271015368728394110730553404025344559,-44139271015368728394110730553404025344558⟩,⟨26846626433046077591101685615255032859166293,26846626433046077591101685615255032859166295⟩⟩, + ⟨⟨-1475878231984684590482211219936932169433969899,-1475878231984684590482211219936932169433969898⟩,⟨408860445729439484966316571096758456695646853,408860445729439484966316571096758456695646854⟩⟩, + ⟨⟨-13640801945483623761251258253063066258526797962,-13640801945483623761251258253063066258526797961⟩,⟨-51298664683876803233093054788179312935850896983,-51298664683876803233093054788179312935850896982⟩⟩, + ⟨⟨1161860710514993279541366355339404046956228941211,1161860710514993279541366355339404046956228941215⟩,⟨-79710338408659573422234657042113462500068962000,-79710338408659573422234657042113462500068961997⟩⟩, + ⟨⟨-3830516465473297383715932127297883384622830134294,-3830516465473297383715932127297883384622830134263⟩,⟨16513109829882105742111373946977376114609064610250,16513109829882105742111373946977376114609064610281⟩⟩, + ⟨⟨-144216128781524190231535952005142691596962239679085,-144216128781524190231535952005142691596962239678800⟩,⟨-93177704100454648132101891149352898262266940024565,-93177704100454648132101891149352898262266940024280⟩⟩] +lemma tw1_1_6_12_calc (j : Fin 31) : taylorWaveBox 1 1 6 12 j = tw1_1_6_12 j := by + revert j + decide +kernel +def tw1_1_6_13 : Fin 31 → CI := ![⟨⟨-10204801720179866884190838537509424754330580280153,-10204801720179866884190838537509424754330580280066⟩,⟨-41650200960112807790386037927328381335863017200858,-41650200960112807790386037927328381335863017200771⟩⟩, + ⟨⟨4372005941315707465670003364924590319949937924010,4372005941315707465670003364924590319949937924020⟩,⟨673606211867078339460471280063769606213054193146,673606211867078339460471280063769606213054193156⟩⟩, + ⟨⟨-152482812739880360825848585149680998341616342437,-152482812739880360825848585149680998341616342436⟩,⟨279047471936079090860270396526202025513235821469,279047471936079090860270396526202025513235821471⟩⟩, + ⟨⟨-11151728968127548272893857876896217208330461221,-11151728968127548272893857876896217208330461220⟩,⟨-10307000810357802288519214276818098805877197812,-10307000810357802288519214276818098805877197811⟩⟩, + ⟨⟨334461550331116268846893915699282609416467124,334461550331116268846893915699282609416467125⟩,⟨-315121025041032560555918669652826633199478844,-315121025041032560555918669652826633199478843⟩⟩, + ⟨⟨6946807035121237984111568842900938947840135,6946807035121237984111568842900938947840137⟩,⟨4821431686199377852841309622890633690880359,4821431686199377852841309622890633690880360⟩⟩, + ⟨⟨910813412865798465857515478237913601454,910813412865798465857515478237913601455⟩,⟨92126868123489738000345888664643693776435,92126868123489738000345888664643693776436⟩⟩, + ⟨⟨-216592975571762860642165645635793198463,-216592975571762860642165645635793198462⟩,⟨554034607120478010943199991252872544925,554034607120478010943199991252872544926⟩⟩, + ⟨⟨26716701859404709746229235552495745,26716701859404709746229235552495746⟩,⟨2384132579018477537660736540464561625,2384132579018477537660736540464561627⟩⟩, + ⟨⟨6525838872973587057821060889200007,6525838872973587057821060889200010⟩,⟨1276721140963535878332334270834844,1276721140963535878332334270834847⟩⟩, + ⟨⟨-11346025200327071237768576900802,-11346025200327071237768576900798⟩,⟨-11046097227590675131303196941229,-11046097227590675131303196941225⟩⟩, + ⟨⟨43914387345056099441166054521,43914387345056099441166054528⟩,⟨-729089836965099545512373161,-729089836965099545512373154⟩⟩, + ⟨⟨133506365249867401279368881,133506365249867401279368892⟩,⟨167255519170056455985538206,167255519170056455985538218⟩⟩, + ⟨⟨2633262420326922532776020,2633262420326922532776033⟩,⟨1301089923610565723303979,1301089923610565723303993⟩⟩, + ⟨⟨89703850262857958723060,89703850262857958723074⟩,⟨-154783842705934867211216,-154783842705934867211201⟩⟩, + ⟨⟨-67549396292871093330079,-67549396292871093330060⟩,⟨-12,10⟩⟩, + ⟨⟨89703850262857958723060,89703850262857958723074⟩,⟨154783842705934867211201,154783842705934867211216⟩⟩, + ⟨⟨2633262420326922532776020,2633262420326922532776033⟩,⟨-1301089923610565723303993,-1301089923610565723303979⟩⟩, + ⟨⟨133506365249867401279368881,133506365249867401279368892⟩,⟨-167255519170056455985538218,-167255519170056455985538206⟩⟩, + ⟨⟨43914387345056099441166054521,43914387345056099441166054528⟩,⟨729089836965099545512373154,729089836965099545512373161⟩⟩, + ⟨⟨-11346025200327071237768576900802,-11346025200327071237768576900798⟩,⟨11046097227590675131303196941225,11046097227590675131303196941229⟩⟩, + ⟨⟨6525838872973587057821060889200007,6525838872973587057821060889200010⟩,⟨-1276721140963535878332334270834847,-1276721140963535878332334270834844⟩⟩, + ⟨⟨26716701859404709746229235552495745,26716701859404709746229235552495746⟩,⟨-2384132579018477537660736540464561627,-2384132579018477537660736540464561625⟩⟩, + ⟨⟨-216592975571762860642165645635793198463,-216592975571762860642165645635793198462⟩,⟨-554034607120478010943199991252872544926,-554034607120478010943199991252872544925⟩⟩, + ⟨⟨910813412865798465857515478237913601454,910813412865798465857515478237913601455⟩,⟨-92126868123489738000345888664643693776436,-92126868123489738000345888664643693776435⟩⟩, + ⟨⟨6946807035121237984111568842900938947840135,6946807035121237984111568842900938947840137⟩,⟨-4821431686199377852841309622890633690880360,-4821431686199377852841309622890633690880359⟩⟩, + ⟨⟨334461550331116268846893915699282609416467124,334461550331116268846893915699282609416467125⟩,⟨315121025041032560555918669652826633199478843,315121025041032560555918669652826633199478844⟩⟩, + ⟨⟨-11151728968127548272893857876896217208330461221,-11151728968127548272893857876896217208330461220⟩,⟨10307000810357802288519214276818098805877197811,10307000810357802288519214276818098805877197812⟩⟩, + ⟨⟨-152482812739880360825848585149680998341616342437,-152482812739880360825848585149680998341616342436⟩,⟨-279047471936079090860270396526202025513235821471,-279047471936079090860270396526202025513235821469⟩⟩, + ⟨⟨4372005941315707465670003364924590319949937924010,4372005941315707465670003364924590319949937924020⟩,⟨-673606211867078339460471280063769606213054193156,-673606211867078339460471280063769606213054193146⟩⟩, + ⟨⟨-10204801720179866884190838537509424754330580280153,-10204801720179866884190838537509424754330580280066⟩,⟨41650200960112807790386037927328381335863017200771,41650200960112807790386037927328381335863017200858⟩⟩] +lemma tw1_1_6_13_calc (j : Fin 31) : taylorWaveBox 1 1 6 13 j = tw1_1_6_13 j := by + revert j + decide +kernel +def tw1_1_6_14 : Fin 31 → CI := ![⟨⟨9997095748701354708492582730136436107420694422974,9997095748701354708492582730136436107420694422998⟩,⟨933122745469957724003020227262052738285009772858,933122745469957724003020227262052738285009772882⟩⟩, + ⟨⟨-550524150759325726253266777566448461545821286150,-550524150759325726253266777566448461545821286147⟩,⟨931720662717220774383176674351043226065997798933,931720662717220774383176674351043226065997798936⟩⟩, + ⟨⟨-48552194614965866310101789110313639900162897975,-48552194614965866310101789110313639900162897974⟩,⟨-65335742349482726761011612518764900228044038918,-65335742349482726761011612518764900228044038917⟩⟩, + ⟨⟨3841455156030708532841004169871064404845588342,3841455156030708532841004169871064404845588343⟩,⟨-1352752514860782154794221201283442070956429399,-1352752514860782154794221201283442070956429398⟩⟩, + ⟨⟨27038175549111786927581038854387515829892941,27038175549111786927581038854387515829892942⟩,⟨126407724758270944967904253273028112485920949,126407724758270944967904253273028112485920950⟩⟩, + ⟨⟨-2340659061072305858498610647790321896666089,-2340659061072305858498610647790321896666088⟩,⟨869582786209120876618021389680337246000396,869582786209120876618021389680337246000397⟩⟩, + ⟨⟨-22443150190161627416610192938582182097239,-22443150190161627416610192938582182097238⟩,⟨-17677087449057580599710770772955055430466,-17677087449057580599710770772955055430465⟩⟩, + ⟨⟨-83653133151839579496068069877282145314,-83653133151839579496068069877282145313⟩,⟨-174667352425907188859414474465088585630,-174667352425907188859414474465088585629⟩⟩, + ⟨⟨-554874873566510069079082912169632500,-554874873566510069079082912169632498⟩,⟨-595812442433218479133144997903789178,-595812442433218479133144997903789177⟩⟩, + ⟨⟨-2131899395351068657630271459656926,-2131899395351068657630271459656924⟩,⟨1051172189457494270304573467731223,1051172189457494270304573467731225⟩⟩, + ⟨⟨5770641635399257230420521300565,5770641635399257230420521300567⟩,⟨1259803822589138890258498619565,1259803822589138890258498619567⟩⟩, + ⟨⟨-15150866037779651767991798309,-15150866037779651767991798306⟩,⟨7746173922831834039572691926,7746173922831834039572691930⟩⟩, + ⟨⟨-73033848996071547990799404,-73033848996071547990799399⟩,⟨-44629824645865310317532421,-44629824645865310317532416⟩⟩, + ⟨⟨-1173512931151578329883093,-1173512931151578329883086⟩,⟨-266291856803098978713354,-266291856803098978713348⟩⟩, + ⟨⟨-29406194706781532134792,-29406194706781532134786⟩,⟨68349566269990907475459,68349566269990907475466⟩⟩, + ⟨⟨28239351871576353449281,28239351871576353449290⟩,⟨-4,5⟩⟩, + ⟨⟨-29406194706781532134792,-29406194706781532134786⟩,⟨-68349566269990907475466,-68349566269990907475459⟩⟩, + ⟨⟨-1173512931151578329883093,-1173512931151578329883086⟩,⟨266291856803098978713348,266291856803098978713354⟩⟩, + ⟨⟨-73033848996071547990799404,-73033848996071547990799399⟩,⟨44629824645865310317532416,44629824645865310317532421⟩⟩, + ⟨⟨-15150866037779651767991798309,-15150866037779651767991798306⟩,⟨-7746173922831834039572691930,-7746173922831834039572691926⟩⟩, + ⟨⟨5770641635399257230420521300565,5770641635399257230420521300567⟩,⟨-1259803822589138890258498619567,-1259803822589138890258498619565⟩⟩, + ⟨⟨-2131899395351068657630271459656926,-2131899395351068657630271459656924⟩,⟨-1051172189457494270304573467731225,-1051172189457494270304573467731223⟩⟩, + ⟨⟨-554874873566510069079082912169632500,-554874873566510069079082912169632498⟩,⟨595812442433218479133144997903789177,595812442433218479133144997903789178⟩⟩, + ⟨⟨-83653133151839579496068069877282145314,-83653133151839579496068069877282145313⟩,⟨174667352425907188859414474465088585629,174667352425907188859414474465088585630⟩⟩, + ⟨⟨-22443150190161627416610192938582182097239,-22443150190161627416610192938582182097238⟩,⟨17677087449057580599710770772955055430465,17677087449057580599710770772955055430466⟩⟩, + ⟨⟨-2340659061072305858498610647790321896666089,-2340659061072305858498610647790321896666088⟩,⟨-869582786209120876618021389680337246000397,-869582786209120876618021389680337246000396⟩⟩, + ⟨⟨27038175549111786927581038854387515829892941,27038175549111786927581038854387515829892942⟩,⟨-126407724758270944967904253273028112485920950,-126407724758270944967904253273028112485920949⟩⟩, + ⟨⟨3841455156030708532841004169871064404845588342,3841455156030708532841004169871064404845588343⟩,⟨1352752514860782154794221201283442070956429398,1352752514860782154794221201283442070956429399⟩⟩, + ⟨⟨-48552194614965866310101789110313639900162897975,-48552194614965866310101789110313639900162897974⟩,⟨65335742349482726761011612518764900228044038917,65335742349482726761011612518764900228044038918⟩⟩, + ⟨⟨-550524150759325726253266777566448461545821286150,-550524150759325726253266777566448461545821286147⟩,⟨-931720662717220774383176674351043226065997798936,-931720662717220774383176674351043226065997798933⟩⟩, + ⟨⟨9997095748701354708492582730136436107420694422974,9997095748701354708492582730136436107420694422998⟩,⟨-933122745469957724003020227262052738285009772882,-933122745469957724003020227262052738285009772858⟩⟩] +lemma tw1_1_6_14_calc (j : Fin 31) : taylorWaveBox 1 1 6 14 j = tw1_1_6_14 j := by + revert j + decide +kernel +def tw1_1_6_15 : Fin 31 → CI := ![⟨⟨-915172899689457546734968206793650853773652962608,-915172899689457546734968206793650853773652962601⟩,⟨2014499989763067708285068585135312085403150612513,2014499989763067708285068585135312085403150612519⟩⟩, + ⟨⟨-152051473971829931207610746067276584720851690693,-152051473971829931207610746067276584720851690691⟩,⟨-197415416497002420318595058556044815595118452817,-197415416497002420318595058556044815595118452815⟩⟩, + ⟨⟨19190973039397750387419779021723066960763657870,19190973039397750387419779021723066960763657871⟩,⟨-4039770632541264327666616196554941669574580867,-4039770632541264327666616196554941669574580866⟩⟩, + ⟨⟨-151159239969958006234823491927949753638786833,-151159239969958006234823491927949753638786832⟩,⟨1016857319714587647140008282814092714677449042,1016857319714587647140008282814092714677449043⟩⟩, + ⟨⟨-32330916207704416889061702291256366163375674,-32330916207704416889061702291256366163375673⟩,⟨-11225748053850411986969060528532628439576743,-11225748053850411986969060528532628439576742⟩⟩, + ⟨⟨173472883355346801327685705778433683661547,173472883355346801327685705778433683661548⟩,⟨-671923494974378150309757672414333624964539,-671923494974378150309757672414333624964538⟩⟩, + ⟨⟨8124568892142519190011108642190210761240,8124568892142519190011108642190210761241⟩,⟨-1873152016106262654261539399990437147689,-1873152016106262654261539399990437147688⟩⟩, + ⟨⟨56605679112403143029450593264524557154,56605679112403143029450593264524557155⟩,⟨17810176994164559538667734500993608207,17810176994164559538667734500993608208⟩⟩, + ⟨⟨260779764116864033112501632592834615,260779764116864033112501632592834616⟩,⟨21518331511248391665819723065574447,21518331511248391665819723065574448⟩⟩, + ⟨⟨356040924485689794461454962580349,356040924485689794461454962580350⟩,⟨-716062026576840952742305701044254,-716062026576840952742305701044253⟩⟩, + ⟨⟨-1953402985611687718010418908926,-1953402985611687718010418908925⟩,⟨695662662267734002424132150891,695662662267734002424132150892⟩⟩, + ⟨⟨3716208809030800081033784497,3716208809030800081033784499⟩,⟨-4968891628249417002712734232,-4968891628249417002712734230⟩⟩, + ⟨⟨31576353333250711756969749,31576353333250711756969752⟩,⟨6398101051809334718416557,6398101051809334718416559⟩⟩, + ⟨⟨463970752412796401524926,463970752412796401524929⟩,⟨-5862743278531917441221,-5862743278531917441218⟩⟩, + ⟨⟨8254733853113548220398,8254733853113548220402⟩,⟨-27932390567660770901425,-27932390567660770901421⟩⟩, + ⟨⟨-11111150729309567844381,-11111150729309567844377⟩,⟨-2,2⟩⟩, + ⟨⟨8254733853113548220398,8254733853113548220402⟩,⟨27932390567660770901421,27932390567660770901425⟩⟩, + ⟨⟨463970752412796401524926,463970752412796401524929⟩,⟨5862743278531917441218,5862743278531917441221⟩⟩, + ⟨⟨31576353333250711756969749,31576353333250711756969752⟩,⟨-6398101051809334718416559,-6398101051809334718416557⟩⟩, + ⟨⟨3716208809030800081033784497,3716208809030800081033784499⟩,⟨4968891628249417002712734230,4968891628249417002712734232⟩⟩, + ⟨⟨-1953402985611687718010418908926,-1953402985611687718010418908925⟩,⟨-695662662267734002424132150892,-695662662267734002424132150891⟩⟩, + ⟨⟨356040924485689794461454962580349,356040924485689794461454962580350⟩,⟨716062026576840952742305701044253,716062026576840952742305701044254⟩⟩, + ⟨⟨260779764116864033112501632592834615,260779764116864033112501632592834616⟩,⟨-21518331511248391665819723065574448,-21518331511248391665819723065574447⟩⟩, + ⟨⟨56605679112403143029450593264524557154,56605679112403143029450593264524557155⟩,⟨-17810176994164559538667734500993608208,-17810176994164559538667734500993608207⟩⟩, + ⟨⟨8124568892142519190011108642190210761240,8124568892142519190011108642190210761241⟩,⟨1873152016106262654261539399990437147688,1873152016106262654261539399990437147689⟩⟩, + ⟨⟨173472883355346801327685705778433683661547,173472883355346801327685705778433683661548⟩,⟨671923494974378150309757672414333624964538,671923494974378150309757672414333624964539⟩⟩, + ⟨⟨-32330916207704416889061702291256366163375674,-32330916207704416889061702291256366163375673⟩,⟨11225748053850411986969060528532628439576742,11225748053850411986969060528532628439576743⟩⟩, + ⟨⟨-151159239969958006234823491927949753638786833,-151159239969958006234823491927949753638786832⟩,⟨-1016857319714587647140008282814092714677449043,-1016857319714587647140008282814092714677449042⟩⟩, + ⟨⟨19190973039397750387419779021723066960763657870,19190973039397750387419779021723066960763657871⟩,⟨4039770632541264327666616196554941669574580866,4039770632541264327666616196554941669574580867⟩⟩, + ⟨⟨-152051473971829931207610746067276584720851690693,-152051473971829931207610746067276584720851690691⟩,⟨197415416497002420318595058556044815595118452815,197415416497002420318595058556044815595118452817⟩⟩, + ⟨⟨-915172899689457546734968206793650853773652962608,-915172899689457546734968206793650853773652962601⟩,⟨-2014499989763067708285068585135312085403150612519,-2014499989763067708285068585135312085403150612513⟩⟩] +lemma tw1_1_6_15_calc (j : Fin 31) : taylorWaveBox 1 1 6 15 j = tw1_1_6_15 j := by + revert j + decide +kernel +def tw1_1_6_16 : Fin 31 → CI := ![⟨⟨-333867715796499512626646995562146436387335860066,-333867715796499512626646995562146436387335860064⟩,⟨-317176699569263716490532527533863223533615168644,-317176699569263716490532527533863223533615168642⟩⟩, + ⟨⟨52144546421136998764606428584225927386254353338,52144546421136998764606428584225927386254353339⟩,⟨-14740865860933297250382372773101496202773800832,-14740865860933297250382372773101496202773800831⟩⟩, + ⟨⟨-991828000525885759624596395995915942388698455,-991828000525885759624596395995915942388698454⟩,⟨4350821903815390835508327712075092144257156871,4350821903815390835508327712075092144257156872⟩⟩, + ⟨⟨-197491735969301338294399299751774782333197628,-197491735969301338294399299751774782333197627⟩,⟨-145125631129490333458155603991154464165956313,-145125631129490333458155603991154464165956312⟩⟩, + ⟨⟨6590882000638057530562506732924109187686044,6590882000638057530562506732924109187686045⟩,⟨-5458485266434324049328888932282066493409688,-5458485266434324049328888932282066493409687⟩⟩, + ⟨⟨118699494684169205930486894760408268340760,118699494684169205930486894760408268340761⟩,⟨138161463786577581464359456782094930599607,138161463786577581464359456782094930599608⟩⟩, + ⟨⟨-1000545112182787923537767656312925156981,-1000545112182787923537767656312925156980⟩,⟨2068910913265443116113102059725831891557,2068910913265443116113102059725831891558⟩⟩, + ⟨⟨-14949612332448747103956291275988561181,-14949612332448747103956291275988561180⟩,⟨8450518398846912251331325294112391942,8450518398846912251331325294112391943⟩⟩, + ⟨⟨-62924338480304992833519218673409379,-62924338480304992833519218673409378⟩,⟨48464111990513528987965952862741848,48464111990513528987965952862741849⟩⟩, + ⟨⟨47955175945897383670418701758029,47955175945897383670418701758030⟩,⟨249531677241538750114282380741762,249531677241538750114282380741763⟩⟩, + ⟨⟨427804088115120057483383031321,427804088115120057483383031322⟩,⟨-538203291389883768712335897213,-538203291389883768712335897212⟩⟩, + ⟨⟨-395442425051061468752756522,-395442425051061468752756521⟩,⟨2099945730701053638884089410,2099945730701053638884089411⟩⟩, + ⟨⟨-11327367055419187286819139,-11327367055419187286819138⟩,⟨1696865787762202809174476,1696865787762202809174477⟩⟩, + ⟨⟨-163793361887776914177181,-163793361887776914177179⟩,⟨41546098096338077566831,41546098096338077566833⟩⟩, + ⟨⟨-1804797853684164618473,-1804797853684164618471⟩,⟨10615870883931535258249,10615870883931535258251⟩⟩, + ⟨⟨4128951386201565433011,4128951386201565433013⟩,⟨-1,1⟩⟩, + ⟨⟨-1804797853684164618473,-1804797853684164618471⟩,⟨-10615870883931535258251,-10615870883931535258249⟩⟩, + ⟨⟨-163793361887776914177181,-163793361887776914177179⟩,⟨-41546098096338077566833,-41546098096338077566831⟩⟩, + ⟨⟨-11327367055419187286819139,-11327367055419187286819138⟩,⟨-1696865787762202809174477,-1696865787762202809174476⟩⟩, + ⟨⟨-395442425051061468752756522,-395442425051061468752756521⟩,⟨-2099945730701053638884089411,-2099945730701053638884089410⟩⟩, + ⟨⟨427804088115120057483383031321,427804088115120057483383031322⟩,⟨538203291389883768712335897212,538203291389883768712335897213⟩⟩, + ⟨⟨47955175945897383670418701758029,47955175945897383670418701758030⟩,⟨-249531677241538750114282380741763,-249531677241538750114282380741762⟩⟩, + ⟨⟨-62924338480304992833519218673409379,-62924338480304992833519218673409378⟩,⟨-48464111990513528987965952862741849,-48464111990513528987965952862741848⟩⟩, + ⟨⟨-14949612332448747103956291275988561181,-14949612332448747103956291275988561180⟩,⟨-8450518398846912251331325294112391943,-8450518398846912251331325294112391942⟩⟩, + ⟨⟨-1000545112182787923537767656312925156981,-1000545112182787923537767656312925156980⟩,⟨-2068910913265443116113102059725831891558,-2068910913265443116113102059725831891557⟩⟩, + ⟨⟨118699494684169205930486894760408268340760,118699494684169205930486894760408268340761⟩,⟨-138161463786577581464359456782094930599608,-138161463786577581464359456782094930599607⟩⟩, + ⟨⟨6590882000638057530562506732924109187686044,6590882000638057530562506732924109187686045⟩,⟨5458485266434324049328888932282066493409687,5458485266434324049328888932282066493409688⟩⟩, + ⟨⟨-197491735969301338294399299751774782333197628,-197491735969301338294399299751774782333197627⟩,⟨145125631129490333458155603991154464165956312,145125631129490333458155603991154464165956313⟩⟩, + ⟨⟨-991828000525885759624596395995915942388698455,-991828000525885759624596395995915942388698454⟩,⟨-4350821903815390835508327712075092144257156872,-4350821903815390835508327712075092144257156871⟩⟩, + ⟨⟨52144546421136998764606428584225927386254353338,52144546421136998764606428584225927386254353339⟩,⟨14740865860933297250382372773101496202773800831,14740865860933297250382372773101496202773800832⟩⟩, + ⟨⟨-333867715796499512626646995562146436387335860066,-333867715796499512626646995562146436387335860064⟩,⟨317176699569263716490532527533863223533615168642,317176699569263716490532527533863223533615168644⟩⟩] +lemma tw1_1_6_16_calc (j : Fin 31) : taylorWaveBox 1 1 6 16 j = tw1_1_6_16 j := by + revert j + decide +kernel +def tw1_1_6_17 : Fin 31 → CI := ![⟨⟨80636130602654953101243651283626006643097894293,80636130602654953101243651283626006643097894294⟩,⟨-41742699851090891641101446023296586504255242315,-41742699851090891641101446023296586504255242314⟩⟩, + ⟨⟨-1173404775381080835130299648402744009846546183,-1173404775381080835130299648402744009846546182⟩,⟨11101823242040287818220893475171557775132030720,11101823242040287818220893475171557775132030721⟩⟩, + ⟨⟨-762436572388109802724612720080012174586566179,-762436572388109802724612720080012174586566178⟩,⟨-586544736410029893984919153022374637573064236,-586544736410029893984919153022374637573064235⟩⟩, + ⟨⟨49819293491359083632222900760627275294899590,49819293491359083632222900760627275294899591⟩,⟨-24121272090641510259415725447945528870997785,-24121272090641510259415725447945528870997784⟩⟩, + ⟨⟨296491621922237826642745924549412218509083,296491621922237826642745924549412218509084⟩,⟨2005422676608422031189288430614369532518459,2005422676608422031189288430614369532518460⟩⟩, + ⟨⟨-45061201182123881500948058823199426008565,-45061201182123881500948058823199426008564⟩,⟨4585317822559036292588726199032091124534,4585317822559036292588726199032091124535⟩⟩, + ⟨⟨-257400873309303290678260420714564167770,-257400873309303290678260420714564167769⟩,⟨-542100093698304873339962091933841991855,-542100093698304873339962091933841991854⟩⟩, + ⟨⟨1105337384179151472608585763610910863,1105337384179151472608585763610910864⟩,⟨-4576433038534485036857719591408832462,-4576433038534485036857719591408832461⟩⟩, + ⟨⟨3995894429404027418080350821157300,3995894429404027418080350821157301⟩,⟨-22486874226288863057687635688504325,-22486874226288863057687635688504324⟩⟩, + ⟨⟨-57015661108283574275822169410182,-57015661108283574275822169410181⟩,⟨-50987658666930376616822922157990,-50987658666930376616822922157989⟩⟩, + ⟨⟨-24682262375905414371427834102,-24682262375905414371427834101⟩,⟨214540591833339911250521313857,214540591833339911250521313858⟩⟩, + ⟨⟨-185883124394089292564546567,-185883124394089292564546565⟩,⟨-671931305180392257919446145,-671931305180392257919446144⟩⟩, + ⟨⟨3390315864133088627574979,3390315864133088627574980⟩,⟨-1840312612816662283995236,-1840312612816662283995235⟩⟩, + ⟨⟨51598341084146577831541,51598341084146577831543⟩,⟨-27137764830680400675737,-27137764830680400675736⟩⟩, + ⟨⟨186432036938092608454,186432036938092608455⟩,⟨-3766895514541857438356,-3766895514541857438355⟩⟩, + ⟨⟨-1453581557600755727289,-1453581557600755727287⟩,⟨-1,1⟩⟩, + ⟨⟨186432036938092608454,186432036938092608455⟩,⟨3766895514541857438355,3766895514541857438356⟩⟩, + ⟨⟨51598341084146577831541,51598341084146577831543⟩,⟨27137764830680400675736,27137764830680400675737⟩⟩, + ⟨⟨3390315864133088627574979,3390315864133088627574980⟩,⟨1840312612816662283995235,1840312612816662283995236⟩⟩, + ⟨⟨-185883124394089292564546567,-185883124394089292564546565⟩,⟨671931305180392257919446144,671931305180392257919446145⟩⟩, + ⟨⟨-24682262375905414371427834102,-24682262375905414371427834101⟩,⟨-214540591833339911250521313858,-214540591833339911250521313857⟩⟩, + ⟨⟨-57015661108283574275822169410182,-57015661108283574275822169410181⟩,⟨50987658666930376616822922157989,50987658666930376616822922157990⟩⟩, + ⟨⟨3995894429404027418080350821157300,3995894429404027418080350821157301⟩,⟨22486874226288863057687635688504324,22486874226288863057687635688504325⟩⟩, + ⟨⟨1105337384179151472608585763610910863,1105337384179151472608585763610910864⟩,⟨4576433038534485036857719591408832461,4576433038534485036857719591408832462⟩⟩, + ⟨⟨-257400873309303290678260420714564167770,-257400873309303290678260420714564167769⟩,⟨542100093698304873339962091933841991854,542100093698304873339962091933841991855⟩⟩, + ⟨⟨-45061201182123881500948058823199426008565,-45061201182123881500948058823199426008564⟩,⟨-4585317822559036292588726199032091124535,-4585317822559036292588726199032091124534⟩⟩, + ⟨⟨296491621922237826642745924549412218509083,296491621922237826642745924549412218509084⟩,⟨-2005422676608422031189288430614369532518460,-2005422676608422031189288430614369532518459⟩⟩, + ⟨⟨49819293491359083632222900760627275294899590,49819293491359083632222900760627275294899591⟩,⟨24121272090641510259415725447945528870997784,24121272090641510259415725447945528870997785⟩⟩, + ⟨⟨-762436572388109802724612720080012174586566179,-762436572388109802724612720080012174586566178⟩,⟨586544736410029893984919153022374637573064235,586544736410029893984919153022374637573064236⟩⟩, + ⟨⟨-1173404775381080835130299648402744009846546183,-1173404775381080835130299648402744009846546182⟩,⟨-11101823242040287818220893475171557775132030721,-11101823242040287818220893475171557775132030720⟩⟩, + ⟨⟨80636130602654953101243651283626006643097894293,80636130602654953101243651283626006643097894294⟩,⟨41742699851090891641101446023296586504255242314,41742699851090891641101446023296586504255242315⟩⟩] +lemma tw1_1_6_17_calc (j : Fin 31) : taylorWaveBox 1 1 6 17 j = tw1_1_6_17 j := by + revert j + decide +kernel +def tw1_1_6_18 : Fin 31 → CI := ![⟨⟨2446323523178448858939148340073370489274845133,2446323523178448858939148340073370489274845134⟩,⟨16831294333276491833042539716363723349540494227,16831294333276491833042539716363723349540494228⟩⟩, + ⟨⟨-1931800987181505854028430488459008645818397118,-1931800987181505854028430488459008645818397116⟩,⟨-1020770041160314037083392081731317731445794205,-1020770041160314037083392081731317731445794204⟩⟩, + ⟨⟨174418632441045918829830812378015480774072010,174418632441045918829830812378015480774072011⟩,⟨-91569903670033942093427713922111111028194094,-91569903670033942093427713922111111028194093⟩⟩, + ⟨⟨-418546644936356505453289038306668539739106,-418546644936356505453289038306668539739105⟩,⟨11868754044160160240483678475308037117838219,11868754044160160240483678475308037117838220⟩⟩, + ⟨⟨-420531125740340788427408087283593248390660,-420531125740340788427408087283593248390659⟩,⟨-176871625370630172158358681465825308920854,-176871625370630172158358681465825308920853⟩⟩, + ⟨⟨5194973784559309505374009081879234846121,5194973784559309505374009081879234846122⟩,⟨-9354067178178847294910187396637638857585,-9354067178178847294910187396637638857584⟩⟩, + ⟨⟨144820073400952483046205389898816775550,144820073400952483046205389898816775551⟩,⟨34480663165473251886608973650174800042,34480663165473251886608973650174800043⟩⟩, + ⟨⟨674375355011038493613008441402002045,674375355011038493613008441402002046⟩,⟨1024105227599768546518536961823556036,1024105227599768546518536961823556037⟩⟩, + ⟨⟨3328797317470822486049507836129276,3328797317470822486049507836129277⟩,⟨5277004850151539916874330911847590,5277004850151539916874330911847591⟩⟩, + ⟨⟨21806346733174072446006251265274,21806346733174072446006251265275⟩,⟨1712147882522263555089538153332,1712147882522263555089538153333⟩⟩, + ⟨⟨-27595337831627156576493812163,-27595337831627156576493812162⟩,⟨-58234743374699417194153672435,-58234743374699417194153672434⟩⟩, + ⟨⟨143440971453825979022408204,143440971453825979022408205⟩,⟨161608719327662675145791090,161608719327662675145791091⟩⟩, + ⟨⟨-818366056879928886628665,-818366056879928886628664⟩,⟨923948219633350539974713,923948219633350539974714⟩⟩, + ⟨⟨-14366127291543796741999,-14366127291543796741998⟩,⟨12599072208341857572640,12599072208341857572641⟩⟩, + ⟨⟨87140030623482267084,87140030623482267085⟩,⟨1251874450291328612613,1251874450291328612614⟩⟩, + ⟨⟨486141441159897897899,486141441159897897900⟩,⟨-1,1⟩⟩, + ⟨⟨87140030623482267084,87140030623482267085⟩,⟨-1251874450291328612614,-1251874450291328612613⟩⟩, + ⟨⟨-14366127291543796741999,-14366127291543796741998⟩,⟨-12599072208341857572641,-12599072208341857572640⟩⟩, + ⟨⟨-818366056879928886628665,-818366056879928886628664⟩,⟨-923948219633350539974714,-923948219633350539974713⟩⟩, + ⟨⟨143440971453825979022408204,143440971453825979022408205⟩,⟨-161608719327662675145791091,-161608719327662675145791090⟩⟩, + ⟨⟨-27595337831627156576493812163,-27595337831627156576493812162⟩,⟨58234743374699417194153672434,58234743374699417194153672435⟩⟩, + ⟨⟨21806346733174072446006251265274,21806346733174072446006251265275⟩,⟨-1712147882522263555089538153333,-1712147882522263555089538153332⟩⟩, + ⟨⟨3328797317470822486049507836129276,3328797317470822486049507836129277⟩,⟨-5277004850151539916874330911847591,-5277004850151539916874330911847590⟩⟩, + ⟨⟨674375355011038493613008441402002045,674375355011038493613008441402002046⟩,⟨-1024105227599768546518536961823556037,-1024105227599768546518536961823556036⟩⟩, + ⟨⟨144820073400952483046205389898816775550,144820073400952483046205389898816775551⟩,⟨-34480663165473251886608973650174800043,-34480663165473251886608973650174800042⟩⟩, + ⟨⟨5194973784559309505374009081879234846121,5194973784559309505374009081879234846122⟩,⟨9354067178178847294910187396637638857584,9354067178178847294910187396637638857585⟩⟩, + ⟨⟨-420531125740340788427408087283593248390660,-420531125740340788427408087283593248390659⟩,⟨176871625370630172158358681465825308920853,176871625370630172158358681465825308920854⟩⟩, + ⟨⟨-418546644936356505453289038306668539739106,-418546644936356505453289038306668539739105⟩,⟨-11868754044160160240483678475308037117838220,-11868754044160160240483678475308037117838219⟩⟩, + ⟨⟨174418632441045918829830812378015480774072010,174418632441045918829830812378015480774072011⟩,⟨91569903670033942093427713922111111028194093,91569903670033942093427713922111111028194094⟩⟩, + ⟨⟨-1931800987181505854028430488459008645818397118,-1931800987181505854028430488459008645818397116⟩,⟨1020770041160314037083392081731317731445794204,1020770041160314037083392081731317731445794205⟩⟩, + ⟨⟨2446323523178448858939148340073370489274845133,2446323523178448858939148340073370489274845134⟩,⟨-16831294333276491833042539716363723349540494228,-16831294333276491833042539716363723349540494227⟩⟩] +lemma tw1_1_6_18_calc (j : Fin 31) : taylorWaveBox 1 1 6 18 j = tw1_1_6_18 j := by + revert j + decide +kernel +def tw1_1_6_19 : Fin 31 → CI := ![⟨⟨-2980122628922447718053443535125087207809505625,-2980122628922447718053443535125087207809505624⟩,⟨-570094202929628737801328630535441336532109718,-570094202929628737801328630535441336532109717⟩⟩, + ⟨⟨310469122953190015000359030236350646571097128,310469122953190015000359030236350646571097129⟩,⟨-263569304850429301462291244398089387126670393,-263569304850429301462291244398089387126670392⟩⟩, + ⟨⟨1990841013818290199370808009830169033166903,1990841013818290199370808009830169033166904⟩,⟨38369332605272810054593973271125647011237373,38369332605272810054593973271125647011237374⟩⟩, + ⟨⟨-2104307762298839029543490143606049343909740,-2104307762298839029543490143606049343909739⟩,⟨-1208783242297304517231437805010920690667119,-1208783242297304517231437805010920690667118⟩⟩, + ⟨⟨79137041148020891815997711061357846317691,79137041148020891815997711061357846317692⟩,⟨-57428203515343490473973933902208100283629,-57428203515343490473973933902208100283628⟩⟩, + ⟨⟨1058927853184841064558889015390429738399,1058927853184841064558889015390429738400⟩,⟨2161854833021706321259503508748196251555,2161854833021706321259503508748196251556⟩⟩, + ⟨⟨-27784713791630137788350520660016145576,-27784713791630137788350520660016145575⟩,⟨21564349103769228000037385704160144590,21564349103769228000037385704160144591⟩⟩, + ⟨⟨-299815292415875460623734633576786212,-299815292415875460623734633576786211⟩,⟨-51202799849643265592985009847602978,-51202799849643265592985009847602977⟩⟩, + ⟨⟨-1564715388345435275309494415250585,-1564715388345435275309494415250584⟩,⟨-432033165573774092053307306982028,-432033165573774092053307306982027⟩⟩, + ⟨⟨-5005993132754889656979019330770,-5005993132754889656979019330769⟩,⟨3229433191335825711288093423005,3229433191335825711288093423006⟩⟩, + ⟨⟨15406683591071045781410236021,15406683591071045781410236022⟩,⟨9901544015475705181202577481,9901544015475705181202577482⟩⟩, + ⟨⟨-59023283046379313367390754,-59023283046379313367390753⟩,⟨-24183409988288634957550932,-24183409988288634957550931⟩⟩, + ⟨⟨138198023762507582139044,138198023762507582139045⟩,⟨-349795130185844964640644,-349795130185844964640643⟩⟩, + ⟨⟨3441635684170270512080,3441635684170270512081⟩,⟨-4871539699659596606336,-4871539699659596606335⟩⟩, + ⟨⟨-74494316285758946518,-74494316285758946517⟩,⟨-390624489913951193701,-390624489913951193700⟩⟩, + ⟨⟨-154844785562181587354,-154844785562181587353⟩,⟨-1,1⟩⟩, + ⟨⟨-74494316285758946518,-74494316285758946517⟩,⟨390624489913951193700,390624489913951193701⟩⟩, + ⟨⟨3441635684170270512080,3441635684170270512081⟩,⟨4871539699659596606335,4871539699659596606336⟩⟩, + ⟨⟨138198023762507582139044,138198023762507582139045⟩,⟨349795130185844964640643,349795130185844964640644⟩⟩, + ⟨⟨-59023283046379313367390754,-59023283046379313367390753⟩,⟨24183409988288634957550931,24183409988288634957550932⟩⟩, + ⟨⟨15406683591071045781410236021,15406683591071045781410236022⟩,⟨-9901544015475705181202577482,-9901544015475705181202577481⟩⟩, + ⟨⟨-5005993132754889656979019330770,-5005993132754889656979019330769⟩,⟨-3229433191335825711288093423006,-3229433191335825711288093423005⟩⟩, + ⟨⟨-1564715388345435275309494415250585,-1564715388345435275309494415250584⟩,⟨432033165573774092053307306982027,432033165573774092053307306982028⟩⟩, + ⟨⟨-299815292415875460623734633576786212,-299815292415875460623734633576786211⟩,⟨51202799849643265592985009847602977,51202799849643265592985009847602978⟩⟩, + ⟨⟨-27784713791630137788350520660016145576,-27784713791630137788350520660016145575⟩,⟨-21564349103769228000037385704160144591,-21564349103769228000037385704160144590⟩⟩, + ⟨⟨1058927853184841064558889015390429738399,1058927853184841064558889015390429738400⟩,⟨-2161854833021706321259503508748196251556,-2161854833021706321259503508748196251555⟩⟩, + ⟨⟨79137041148020891815997711061357846317691,79137041148020891815997711061357846317692⟩,⟨57428203515343490473973933902208100283628,57428203515343490473973933902208100283629⟩⟩, + ⟨⟨-2104307762298839029543490143606049343909740,-2104307762298839029543490143606049343909739⟩,⟨1208783242297304517231437805010920690667118,1208783242297304517231437805010920690667119⟩⟩, + ⟨⟨1990841013818290199370808009830169033166903,1990841013818290199370808009830169033166904⟩,⟨-38369332605272810054593973271125647011237374,-38369332605272810054593973271125647011237373⟩⟩, + ⟨⟨310469122953190015000359030236350646571097128,310469122953190015000359030236350646571097129⟩,⟨263569304850429301462291244398089387126670392,263569304850429301462291244398089387126670393⟩⟩, + ⟨⟨-2980122628922447718053443535125087207809505625,-2980122628922447718053443535125087207809505624⟩,⟨570094202929628737801328630535441336532109717,570094202929628737801328630535441336532109718⟩⟩] +lemma tw1_1_6_19_calc (j : Fin 31) : taylorWaveBox 1 1 6 19 j = tw1_1_6_19 j := by + revert j + decide +kernel +def tw1_1_6_20 : Fin 31 → CI := ![⟨⟨257784494725509693190031842067429280393135538,257784494725509693190031842067429280393135539⟩,⟨-447772129512452726964473141065132372164988000,-447772129512452726964473141065132372164987999⟩⟩, + ⟨⟨23004895623075298972670583933233514795097003,23004895623075298972670583933233514795097004⟩,⟨68712280222927589657832642893322936123642221,68712280222927589657832642893322936123642222⟩⟩, + ⟨⟨-6643200441982685493135535716710416272692709,-6643200441982685493135535716710416272692708⟩,⟨-2651591923707294466636041265056709141758839,-2651591923707294466636041265056709141758838⟩⟩, + ⟨⟨400234333251028788687827134009097032720789,400234333251028788687827134009097032720790⟩,⟨-252731617981118494734277527291551657430053,-252731617981118494734277527291551657430052⟩⟩, + ⟨⟨1655281360929908687224793525012270506639,1655281360929908687224793525012270506640⟩,⟨19935431691622961689205734029390088985053,19935431691622961689205734029390088985054⟩⟩, + ⟨⟨-510943822559350624688844662485547672540,-510943822559350624688844662485547672539⟩,⟨-78733742376089153593999975325338025273,-78733742376089153593999975325338025272⟩⟩, + ⟨⟨135093561634831607675342805350239627,135093561634831607675342805350239628⟩,⟨-7930583103335623192591607765848683504,-7930583103335623192591607765848683503⟩⟩, + ⟨⟨57323187454529771628550877025765938,57323187454529771628550877025765939⟩,⟨-43592624072922765689266803229029791,-43592624072922765689266803229029790⟩⟩, + ⟨⟨359558406063286184819387104732805,359558406063286184819387104732806⟩,⟨-182296748147006679506143817329216,-182296748147006679506143817329215⟩⟩, + ⟨⟨526071913997254973472332134254,526071913997254973472332134255⟩,⟨-1456643351980797155532948982477,-1456643351980797155532948982476⟩⟩, + ⟨⟨-4967692604330698799527284157,-4967692604330698799527284156⟩,⟨-70281062020875005693785502,-70281062020875005693785501⟩⟩, + ⟨⟨17932278069943167291495676,17932278069943167291495677⟩,⟨-1206114201706991297496172,-1206114201706991297496171⟩⟩, + ⟨⟨-3024137532602885603486,-3024137532602885603485⟩,⟨109355963888508262416044,109355963888508262416045⟩⟩, + ⟨⟨-658031440801791391842,-658031440801791391841⟩,⟨1650922054347984123794,1650922054347984123795⟩⟩, + ⟨⟨36395588231517476832,36395588231517476833⟩,⟨114648918749838322442,114648918749838322443⟩⟩, + ⟨⟨47078990271040152987,47078990271040152988⟩,⟨-1,1⟩⟩, + ⟨⟨36395588231517476832,36395588231517476833⟩,⟨-114648918749838322443,-114648918749838322442⟩⟩, + ⟨⟨-658031440801791391842,-658031440801791391841⟩,⟨-1650922054347984123795,-1650922054347984123794⟩⟩, + ⟨⟨-3024137532602885603486,-3024137532602885603485⟩,⟨-109355963888508262416045,-109355963888508262416044⟩⟩, + ⟨⟨17932278069943167291495676,17932278069943167291495677⟩,⟨1206114201706991297496171,1206114201706991297496172⟩⟩, + ⟨⟨-4967692604330698799527284157,-4967692604330698799527284156⟩,⟨70281062020875005693785501,70281062020875005693785502⟩⟩, + ⟨⟨526071913997254973472332134254,526071913997254973472332134255⟩,⟨1456643351980797155532948982476,1456643351980797155532948982477⟩⟩, + ⟨⟨359558406063286184819387104732805,359558406063286184819387104732806⟩,⟨182296748147006679506143817329215,182296748147006679506143817329216⟩⟩, + ⟨⟨57323187454529771628550877025765938,57323187454529771628550877025765939⟩,⟨43592624072922765689266803229029790,43592624072922765689266803229029791⟩⟩, + ⟨⟨135093561634831607675342805350239627,135093561634831607675342805350239628⟩,⟨7930583103335623192591607765848683503,7930583103335623192591607765848683504⟩⟩, + ⟨⟨-510943822559350624688844662485547672540,-510943822559350624688844662485547672539⟩,⟨78733742376089153593999975325338025272,78733742376089153593999975325338025273⟩⟩, + ⟨⟨1655281360929908687224793525012270506639,1655281360929908687224793525012270506640⟩,⟨-19935431691622961689205734029390088985054,-19935431691622961689205734029390088985053⟩⟩, + ⟨⟨400234333251028788687827134009097032720789,400234333251028788687827134009097032720790⟩,⟨252731617981118494734277527291551657430052,252731617981118494734277527291551657430053⟩⟩, + ⟨⟨-6643200441982685493135535716710416272692709,-6643200441982685493135535716710416272692708⟩,⟨2651591923707294466636041265056709141758838,2651591923707294466636041265056709141758839⟩⟩, + ⟨⟨23004895623075298972670583933233514795097003,23004895623075298972670583933233514795097004⟩,⟨-68712280222927589657832642893322936123642222,-68712280222927589657832642893322936123642221⟩⟩, + ⟨⟨257784494725509693190031842067429280393135538,257784494725509693190031842067429280393135539⟩,⟨447772129512452726964473141065132372164987999,447772129512452726964473141065132372164988000⟩⟩] +lemma tw1_1_6_20_calc (j : Fin 31) : taylorWaveBox 1 1 6 20 j = tw1_1_6_20 j := by + revert j + decide +kernel +def tw1_1_6 : Fin 21 → Fin 31 → CI := ![tw1_1_6_0,tw1_1_6_1,tw1_1_6_2,tw1_1_6_3,tw1_1_6_4,tw1_1_6_5,tw1_1_6_6,tw1_1_6_7,tw1_1_6_8,tw1_1_6_9,tw1_1_6_10,tw1_1_6_11,tw1_1_6_12,tw1_1_6_13,tw1_1_6_14,tw1_1_6_15,tw1_1_6_16,tw1_1_6_17,tw1_1_6_18,tw1_1_6_19,tw1_1_6_20] +lemma tw1_1_6_mem (l : Fin 21) (j : Fin 31) : (tw1_1_6 l j).Mem (taylorWave 1 1 (nearNode 6) l.val (frequency j)) := by + have he : taylorWaveBox 1 1 6 l j = tw1_1_6 l j := by + fin_cases l + · exact tw1_1_6_0_calc j + · exact tw1_1_6_1_calc j + · exact tw1_1_6_2_calc j + · exact tw1_1_6_3_calc j + · exact tw1_1_6_4_calc j + · exact tw1_1_6_5_calc j + · exact tw1_1_6_6_calc j + · exact tw1_1_6_7_calc j + · exact tw1_1_6_8_calc j + · exact tw1_1_6_9_calc j + · exact tw1_1_6_10_calc j + · exact tw1_1_6_11_calc j + · exact tw1_1_6_12_calc j + · exact tw1_1_6_13_calc j + · exact tw1_1_6_14_calc j + · exact tw1_1_6_15_calc j + · exact tw1_1_6_16_calc j + · exact tw1_1_6_17_calc j + · exact tw1_1_6_18_calc j + · exact tw1_1_6_19_calc j + · exact tw1_1_6_20_calc j + rw [← he] + exact taylorWaveBox_mem 1 1 6 l j + +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/VariationBound.lean b/lean/OAI/Analysis/Triangular/Taylor/VariationBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7909d10dc28ae68538cdb9ac3d6684713acac39 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/VariationBound.lean @@ -0,0 +1,37 @@ +import OAI.Analysis.Triangular.Schwartz.SpectralCLM +import OAI.Analysis.Triangular.Envelope.EnvelopeSumsBase +import OAI.Analysis.Triangular.Envelope.EnvelopeNorms + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.FiniteCertificate +open Construction AtomicTriangular.Interval Complex +def varFreqBox (j : Fin 31) : RI := (RI.point (frequencyDistance j)).divNat 18 +lemma varFreqBox_mem (j : Fin 31) : (varFreqBox j).Mem |frequency j| := by + have hx := RI.mem_divNat (RI.mem_point (frequencyDistance j)) (by norm_num : 0<(18:ℕ)) + change ((RI.point (frequencyDistance j)).divNat 18).Mem _ + convert hx using 1 + fin_cases j <;> norm_num [frequencyDistance, frequency] +def cVariationBox : RI := ((RI.sum (fun j : Fin 31 => (columnNorm22 j).mul ((varFreqBox j).pow 2))).mul (piBox.pow 2)).divNat 2 + +lemma cVariationBox_mem : cVariationBox.Mem cVariation := by + have hx := RI.mem_mul (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (fourierNorm_mem j) (RI.mem_pow (varFreqBox_mem j) 2))) (RI.mem_pow piBox_mem 2) + have hy := RI.mem_divNat hx (by norm_num : 0<2) + simpa only [cVariationBox,cVariation,coeffAbs,sq_abs,Nat.cast_ofNat] using hy +lemma cVariation_lt : cVariation < 119 := by + have hx := ri_mem_lt cVariationBox_mem 119 1 (by norm_num) (by decide +kernel) + simpa using hx +def dVariationBox : RI := (RI.sum (fun j : Fin 31 => (columnNorm22 j).mul ((varFreqBox j).pow 1))).mul (piBox.pow 1) + +lemma dVariationBox_mem : dVariationBox.Mem dVariation := by + have hx := RI.mem_mul (RI.mem_sum (fun j : Fin 31 => RI.mem_mul (fourierNorm_mem j) (RI.mem_pow (varFreqBox_mem j) 1))) (RI.mem_pow piBox_mem 1) + simpa only [dVariationBox,dVariation,coeffAbs,pow_one] using hx +lemma dVariation_lt : dVariation < 119 := by + have hx := ri_mem_lt dVariationBox_mem 119 1 (by norm_num) (by decide +kernel) + simpa using hx +end AtomicTriangular.FiniteCertificate +end + +end OAI diff --git a/lean/OAI/Analysis/Triangular/Taylor/WaveFunction.lean b/lean/OAI/Analysis/Triangular/Taylor/WaveFunction.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bcc978389ae097b0f99518f3f98f39fbefe4127 --- /dev/null +++ b/lean/OAI/Analysis/Triangular/Taylor/WaveFunction.lean @@ -0,0 +1,78 @@ +import OAI.Analysis.Triangular.Schwartz.InputCLM +import OAI.Analysis.Triangular.Schwartz.FourierCLM +import OAI.Analysis.Triangular.Construction.CurvatureBoxes +import OAI.Analysis.Triangular.Taylor.FiniteTaylorIdentity + +namespace OAI + +noncomputable section +open scoped BigOperators +namespace AtomicTriangular.Construction +open Complex + +def wavePhaseFunction (q br : Fin 2) : C(Spectrum,ℂ) := + if br.val=0 then frequencyFunction - ContinuousMap.const _ ((Real.pi*(damping q-h):ℝ):ℂ) + else zetaFunction (damping q) h (damping_pos q) +def waveAmplitudeFunction (q br : Fin 2) : C(Spectrum,ℂ) := + if br.val=0 then 1 else lambdaFunction (damping q) (damping_pos q) +lemma wavePhaseFunction_apply (q br : Fin 2) (t : Spectrum) : + wavePhaseFunction q br t=taylorPhase q br t.val := by + fin_cases br <;> rfl +lemma waveAmplitudeFunction_apply (q br : Fin 2) (t : Spectrum) : + waveAmplitudeFunction q br t=taylorAmplitude q br t.val := by + fin_cases br <;> rfl + +def waveFunctionJet (q br : Fin 2) (k : ℕ) (s : ℂ) : C(Spectrum,ℂ) := + waveAmplitudeFunction q br * NormedSpace.exp (s • wavePhaseFunction q br) * wavePhaseFunction q br^k +lemma waveFunctionJet_apply (q br : Fin 2) (k : ℕ) (s : ℂ) (t : Spectrum) : + waveFunctionJet q br k s t=finiteWaveJet q br t.val k s := by + simp only [waveFunctionJet,ContinuousMap.mul_apply,ContinuousMap.pow_apply, + exponential_apply,ContinuousMap.smul_apply,smul_eq_mul,wavePhaseFunction_apply, + waveAmplitudeFunction_apply,finiteWaveJet,mul_comm s] +lemma hasDerivAt_waveFunctionJet (q br : Fin 2) (k : ℕ) (s : ℂ) : + HasDerivAt (waveFunctionJet q br k) (waveFunctionJet q br (k+1) s) s := by + have hh := ((hasDerivAt_exp_smul_const (wavePhaseFunction q br) s).const_mul + (waveAmplitudeFunction q br)).mul_const ((wavePhaseFunction q br)^k) + convert hh using 1 <;> try simp only [waveFunctionJet,pow_succ] + all_goals first | rfl | (ext t; simp [ContinuousMap.mul_apply,ContinuousMap.pow_apply]; ring) +lemma differentiable_waveFunctionJet (q br : Fin 2) (k : ℕ) : + Differentiable ℂ (waveFunctionJet q br k) := fun s => (hasDerivAt_waveFunctionJet q br k s).differentiableAt + +lemma norm_finiteWaveJet_two (q br : Fin 2) (s t : ℝ) : + ‖finiteWaveJet q br t 2 s‖=curvatureWave q br s t := by + simp only [finiteWaveJet,norm_mul,norm_pow,Complex.norm_exp,mul_re,ofReal_re,ofReal_im,mul_zero,sub_zero,curvatureWave] + ring +lemma waveFunctionJet_uniform (q br : Fin 2) (s : ℝ) {M : ℝ} (hM : 0≤M) + (hb : ∀ t : ℝ, |t|≤5/6 → curvatureWave q br s t≤M) : + ‖waveFunctionJet q br 2 s‖≤M := by + apply (ContinuousMap.norm_le _ hM).mpr + intro t + rw [waveFunctionJet_apply,norm_finiteWaveJet_two] + exact hb t.val (abs_le.mpr t.property) + +def inputJJet (a : InputCoefficients) (br : Fin 2) (k : ℕ) (s : ℂ) : ℂ := + tailSpectral a (waveFunctionJet 0 br k s)+finiteSpectral a (waveFunctionJet 1 br k s) +def pairJJet (a₁ a₂ : InputCoefficients) (k : ℕ) (s : ℂ) : ℂ := + inputJJet a₁ 0 k s+inputJJet a₂ 1 k s +def pairJ (a₁ a₂ : InputCoefficients) (s : ℝ) : ℝ := (pairJJet a₁ a₂ 0 s).re +lemma hasDerivAt_inputJJet (a : InputCoefficients) (br : Fin 2) (k : ℕ) (s : ℂ) : + HasDerivAt (inputJJet a br k) (inputJJet a br (k+1) s) s := by + exact ((tailSpectral a).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_waveFunctionJet 0 br k s)).add + ((finiteSpectral a).hasFDerivAt.comp_hasDerivAt s (hasDerivAt_waveFunctionJet 1 br k s)) +lemma hasDerivAt_pairJJet (a₁ a₂ : InputCoefficients) (k : ℕ) (s : ℂ) : + HasDerivAt (pairJJet a₁ a₂ k) (pairJJet a₁ a₂ (k+1) s) s := + (hasDerivAt_inputJJet a₁ 0 k s).add (hasDerivAt_inputJJet a₂ 1 k s) +lemma pairJJet_iterated (a₁ a₂ : InputCoefficients) (k : ℕ) : + (fun s : ℝ => (pairJJet a₁ a₂ k s).re)=iteratedDeriv k (pairJ a₁ a₂) := by + induction k with + | zero => rfl + | succ k hk => + rw [iteratedDeriv_succ,←hk] + exact funext fun s => ((hasDerivAt_pairJJet a₁ a₂ k s).real_of_complex).deriv.symm +lemma pairJ_contDiff (a₁ a₂ : InputCoefficients) : ContDiff ℝ ⊤ (pairJ a₁ a₂) := by + have hh : Differentiable ℂ (pairJJet a₁ a₂ 0) := fun s => (hasDerivAt_pairJJet a₁ a₂ 0 s).differentiableAt + exact hh.contDiff.real_of_complex +end AtomicTriangular.Construction +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/AbsCost.lean b/lean/OAI/Analysis/TriangularHilbert/AbsCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..06203bda16ca26ec7a0c207b4e431275b91de44d --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/AbsCost.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.TriangularHilbert.PlaneDom + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma two_abs_hessianPairPD_le {P : Matrix ι ι ℂ} (hP : P.PosDef) (K L : Matrix ι ι ℂ) : + 2 * |hessianPairPD hP K L| ≤ hessianCost P K + hessianCost P L := by + have hp := two_hessianPairPD_le hP K L + have hn := two_hessianPairPD_le hP (-K) L + have hneg : hessianPairPD hP (-K) L = -hessianPairPD hP K L := by + simp [hessianPairPD, hsReal, traceReal] + have hc : hessianCost P (-K) = hessianCost P K := by + rw [← hessianPairPD_self hP, ← hessianPairPD_self hP] + simp [hessianPairPD, hsReal, traceReal] + rw [hneg, hc] at hn + rcases le_total 0 (hessianPairPD hP K L) with hh | hh + · rwa [abs_of_nonneg hh] + · rw [abs_of_nonpos hh] + exact hn + +lemma two_abs_hessianPair_le_of_projection {P Q K L : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) (hKQ : K * Q = 0) (hQK : Q * K = 0) + (hLQ : L * Q = 0) (hQL : Q * L = 0) (hPD : (P + Q).PosDef) : + 2 * |hessianPair P K L| ≤ hessianCost P K + hessianCost P L := by + rw [← hessianPair_add_projection hP hQ hQQ hPQ hQP hKQ hQK hLQ hQL hPD, + ← hessianCost_add_projection hP hQ hQQ hPQ hQP hKQ hQK hPD, + ← hessianCost_add_projection hP hQ hQQ hPQ hQP hLQ hQL hPD, + hessianPair_eq_PD hPD] + exact two_abs_hessianPairPD_le hPD K L + +lemma two_abs_hessianPair_weightedGram_le (B : Matrix ι ι ℂ) {w : ι → ℝ} + (hw : ∀ i, 0 < w i) (k l : ι → ℝ) : + 2 * |hessianPair (weightedGram B w) (weightedGram B k) (weightedGram B l)| ≤ + hessianCost (weightedGram B w) (weightedGram B k) + + hessianCost (weightedGram B w) (weightedGram B l) := by + obtain ⟨Q, hQ, hQQ, hBQ, hPD⟩ := weightedGram_kernel_projection B hw + have hP := weightedGram_posSemidef B (fun i => (hw i).le) + have hPQ := weightedGram_mul_eq_zero B Q w hBQ + have hKQ := weightedGram_mul_eq_zero B Q k hBQ + have hLQ := weightedGram_mul_eq_zero B Q l hBQ + exact two_abs_hessianPair_le_of_projection hP hQ hQQ hPQ + (hermitian_mul_zero_flip hP.isHermitian hQ.isHermitian hPQ) hKQ + (hermitian_mul_zero_flip (weightedGram_isHermitian B k) hQ.isHermitian hKQ) hLQ + (hermitian_mul_zero_flip (weightedGram_isHermitian B l) hQ.isHermitian hLQ) hPD +end +end TriangularHilbert.MatrixEnergy +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] +lemma two_abs_heatMixed_le (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) : + 2 * |heatMixed A h u p σ v w z| ≤ heatCost A h u p σ v w + heatCost A h u p σ v z := by + simp only [heatMixed, heatCost, localGram, localFirst, fixedBase, ite_eq_right hw, ite_eq_right hz] + exact two_abs_hessianPair_weightedGram_le _ (groupWeight_pos hh _ _ p hσ) _ _ +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/BoundedBox.lean b/lean/OAI/Analysis/TriangularHilbert/BoundedBox.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb5bdac801d7e0ba89d0f455238a56316c6c2f4c --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/BoundedBox.lean @@ -0,0 +1,57 @@ +import OAI.Analysis.TriangularHilbert.GridLine + +namespace OAI + +universe uE + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology +noncomputable section + +def closedBox (M : ℝ) : Set (ℝ×ℝ) := Set.Icc (-M) M ×ˢ Set.Icc (-M) M +lemma mem_closedBox (M : ℝ) (z : ℝ×ℝ) : z ∈ closedBox M ↔ |z.1| ≤ M ∧ |z.2| ≤ M := by + simp only [closedBox,Set.mem_prod,Set.mem_Icc,abs_le] +lemma measurableSet_closedBox (M : ℝ) : MeasurableSet (closedBox M) := measurableSet_Icc.prod measurableSet_Icc +lemma isCompact_closedBox (M : ℝ) : IsCompact (closedBox M) := isCompact_Icc.prod isCompact_Icc +lemma volume_closedBox_ne_top (M : ℝ) : volume (closedBox M) ≠ ⊤ := (isCompact_closedBox M).measure_ne_top + +def BoxSupport {E : Type uE} [Zero E] (f : ℝ×ℝ → E) (M : ℝ) : Prop := + ∀ z, f z ≠ 0 → |z.1| ≤ M ∧ |z.2| ≤ M + +lemma compactSupport_box {E : Type uE} [Zero E] (f : ℝ×ℝ → E) (hf : HasCompactSupport f) : + ∃ M > 0, BoxSupport f M := by + obtain ⟨M,hM,hm⟩ := hf.isBounded.exists_pos_norm_le + refine ⟨M,hM,fun z hz => ?_⟩ + have hb := hm z (subset_tsupport f hz) + have hleft : |z.1| ≤ ‖z‖ := by simpa only [Real.norm_eq_abs] using norm_fst_le z + have hright : |z.2| ≤ ‖z‖ := by simpa only [Real.norm_eq_abs] using norm_snd_le z + exact ⟨hleft.trans hb,hright.trans hb⟩ + +lemma sampled_cubic_tendsto (f : ℝ×ℝ → ℂ) (hf : Continuous f) {M C : ℝ} + (hs : BoxSupport f M) (hC : 0 ≤ C) (hb : ∀ z, ‖f z‖ ≤ C) + {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (hh1 : ∀ n, h n ≤ 1) (ht : Tendsto h atTop (𝓝 0)) : + Tendsto (fun n => ∫ z : ℝ×ℝ, ‖f (gridSquare (h n) z)‖^3) atTop (𝓝 (∫ z : ℝ×ℝ, ‖f z‖^3)) := by + let b : ℝ×ℝ → ℝ := (closedBox (M+1)).indicator (fun _ => C^3) + apply tendsto_integral_of_dominated_convergence b + · intro n + exact (((hf.measurable.comp (measurable_gridSquare (h n))).norm).pow_const 3).aestronglyMeasurable + · exact (integrableOn_const (μ := volume) (s := closedBox (M+1)) (C := C^3) + (volume_closedBox_ne_top _)).integrable_indicator (measurableSet_closedBox _) + · intro n + filter_upwards [] with z + rw [Real.norm_of_nonneg (pow_nonneg (norm_nonneg _) _)] + by_cases hz : f (gridSquare (h n) z) = 0 + · simp only [hz,norm_zero,zero_pow (by norm_num : 3 ≠ 0),b] + exact Set.indicator_nonneg (fun _ _ => pow_nonneg hC _) _ + · dsimp only [b] + rw [Set.indicator_of_mem ((mem_closedBox _ _).mpr (sampled_support f (hh n) (hh1 n) hs z hz))] + exact pow_le_pow_left₀ (norm_nonneg _) (hb _) _ + · filter_upwards [] with z + exact (((hf.tendsto _).comp (tendsto_gridSquare hh ht z)).norm).pow 3 +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CompactMoment.lean b/lean/OAI/Analysis/TriangularHilbert/CompactMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e4bf2b141b283f82645683d24f06c392a562d48 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CompactMoment.lean @@ -0,0 +1,59 @@ +import OAI.Analysis.TriangularHilbert.ContinuumMesh + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter MatrixEnergy +open scoped Topology BigOperators +noncomputable section + +lemma continuum_moment_le_box (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + {M CB CC : ℝ} (hsB : BoxSupport B M) (hsC : BoxSupport C M) + (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) (hr : ∀ k, 0 < r k) (hR : ∀ k, r k ≤ R k) : + (∫ z : ℝ×ℝ, finiteMoment (fun k => cyclicKernelOutput B C (hardKernel (r k) (R k)) z)) ≤ + momentConstant*((∫ z : ℝ×ℝ, ‖B z‖^3)+(∫ z : ℝ×ℝ, ‖C z‖^3)) := by + classical + let δ : ℝ := min 1 (Finset.univ.inf' Finset.univ_nonempty r) + have hδ : 0 < δ := lt_min zero_lt_one ((Finset.lt_inf'_iff _).mpr (fun k _ => hr k)) + have hδ1 : δ ≤ 1 := min_le_left _ _ + have hδr (k : κ) : δ ≤ r k := (min_le_right _ _).trans (Finset.inf'_le _ (Finset.mem_univ k)) + let h : ℕ → ℝ := fun n => δ/((n:ℝ)+1) + have hh (n : ℕ) : 0 < h n := div_pos hδ (by positivity) + have hhδ (n : ℕ) : h n ≤ δ := (div_le_self hδ.le (by have hn : (0:ℝ) ≤ n := Nat.cast_nonneg n; linarith)) + have hh1 (n : ℕ) : h n ≤ 1 := (hhδ n).trans hδ1 + have ht : Tendsto h atTop (𝓝 0) := by + simpa only [mul_one_div,mul_zero] using (tendsto_const_nhds (x := δ)).mul (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)) + have hs := sampled_moment_tendsto B C hB hC hsB hsC hCB hCC (show 0 ≤ 1/δ by positivity) hb hc + hh hh1 ht (fun k => hardKernel (r k) (R k)) (fun k => measurable_hardKernel _ _) + (fun k t => (abs_hardKernel_le (hr k) (hR k) t).trans (one_div_le_one_div_of_le hδ (hδr k))) + (fun k z => ae_continuousAt_hardKernel (r k) (R k) (z.1+z.2)) + have hsB' := sampled_cubic_tendsto B hB hsB hCB hb hh hh1 ht + have hsC' := sampled_cubic_tendsto C hC hsC hCC hc hh hh1 ht + exact le_of_tendsto_of_tendsto hs (tendsto_const_nhds.mul (hsB'.add hsC')) + (Filter.Eventually.of_forall (fun n => sampled_moment_le B C (hh n) hsB hsC r R + (fun k => (hhδ n).trans (hδr k)) hR)) + +lemma continuum_moment_le_compact (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + (hsB : HasCompactSupport B) (hsC : HasCompactSupport C) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) (hr : ∀ k, 0 < r k) (hR : ∀ k, r k ≤ R k) : + (∫ z : ℝ×ℝ, finiteMoment (fun k => cyclicKernelOutput B C (hardKernel (r k) (R k)) z)) ≤ + momentConstant*((∫ z : ℝ×ℝ, ‖B z‖^3)+(∫ z : ℝ×ℝ, ‖C z‖^3)) := by + obtain ⟨MB,hMB,hb⟩ := compactSupport_box B hsB + obtain ⟨MC,hMC,hc⟩ := compactSupport_box C hsC + obtain ⟨CB,hCB⟩ := hB.bounded_above_of_compact_support hsB + obtain ⟨CC,hCC⟩ := hC.bounded_above_of_compact_support hsC + have hCB0 : 0 ≤ CB := (norm_nonneg (B 0)).trans (hCB 0) + have hCC0 : 0 ≤ CC := (norm_nonneg (C 0)).trans (hCC 0) + exact continuum_moment_le_box B C hB hC + (M := max MB MC) (fun z hz => ⟨(hb z hz).1.trans (le_max_left _ _),(hb z hz).2.trans (le_max_left _ _)⟩) + (fun z hz => ⟨(hc z hz).1.trans (le_max_right _ _),(hc z hz).2.trans (le_max_right _ _)⟩) + hCB0 hCC0 hCB hCC r R hr hR +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/ContinuumMesh.lean b/lean/OAI/Analysis/TriangularHilbert/ContinuumMesh.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec4efe1b3dcdfde872b93948189f6ee21251d125 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/ContinuumMesh.lean @@ -0,0 +1,55 @@ +import OAI.Analysis.TriangularHilbert.DiscreteMax + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter MatrixEnergy +open scoped Topology BigOperators +noncomputable section + +lemma gridLift_pi (D : Finset ℤ) {h : ℝ} (hh : 0 < h) {κ : Type uκ} + (U : κ → D → D → ℂ) (z : ℝ×ℝ) : + gridLift D h (fun i j k => U k i j) z = fun k => gridLift D h (U k) z := by + funext k + simp only [gridLift_eq hh] + split_ifs <;> rfl + +lemma sampled_moment_integral_eq (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) + (hsB : BoxSupport B M) (hsC : BoxSupport C M) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (K : κ → ℝ → ℝ) : + (∫ z : ℝ×ℝ, finiteMoment (fun k => sampledKernelOutput B C h (K k) z)) = + ∑ i, ∑ j, h^2*finiteMoment (fun k => kernelOutput (sampledMatrix B h M) (sampledMatrix C h M) h + (fun m => h*(m:ℤ)) (fun _ _ => K k) i j) := by + have he (z : ℝ×ℝ) : finiteMoment (fun k => sampledKernelOutput B C h (K k) z) = + gridLift (sampleIndices h M) h (fun i j => finiteMoment (fun k => + kernelOutput (sampledMatrix B h M) (sampledMatrix C h M) h (fun m => h*(m:ℤ)) + (fun _ _ => K k) i j)) z := by + simp_rw [← gridLift_kernelOutput_eq B C hh hsB hsC] + rw [← gridLift_pi _ hh,gridLift_comp hh _ finiteMoment finiteMoment_zero] + simp_rw [he] + rw [integral_gridLift _ _ _ hh.le] + rfl + +lemma sampled_cubic_integral_eq (B : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) + (hsB : BoxSupport B M) : + (∫ z : ℝ×ℝ, ‖B (gridSquare h z)‖^3) = matrixCubic (sampledMatrix B h M) h := by + simp_rw [← gridLift_sampled B hh hsB,gridLift_comp hh _ (fun w : ℂ => ‖w‖^3) (by simp)] + rw [integral_gridLift _ _ _ hh.le] + rfl + +lemma sampled_moment_le (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) + (hsB : BoxSupport B M) (hsC : BoxSupport C M) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) + (hr : ∀ k, h ≤ r k) (hb : ∀ k, r k ≤ R k) : + (∫ z : ℝ×ℝ, finiteMoment (fun k => sampledKernelOutput B C h (hardKernel (r k) (R k)) z)) ≤ + momentConstant*((∫ z : ℝ×ℝ, ‖B (gridSquare h z)‖^3)+(∫ z : ℝ×ℝ, ‖C (gridSquare h z)‖^3)) := by + rw [sampled_moment_integral_eq B C hh hsB hsC,sampled_cubic_integral_eq B hh hsB,sampled_cubic_integral_eq C hh hsC] + exact finiteHardOutput_moment (sampleIndices h M) (sampledMatrix B h M) (sampledMatrix C h M) hh r R hr hb +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Coordinates.lean b/lean/OAI/Analysis/TriangularHilbert/Coordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..11c583577b4b543df98926cc42a74abc3c5803d6 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Coordinates.lean @@ -0,0 +1,81 @@ +import OAI.Analysis.TriangularHilbert.CyclicNorm + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory MeasureTheory.Measure Heat +open scoped ENNReal +noncomputable section + +def chartB (z : Plane) : Plane := (z.1+z.2,-z.1) +def chartC (z : Plane) : Plane := (-z.2,z.1+z.2) +def cyclicB (F : Plane → ℂ) : Plane → ℂ := F ∘ chartB +def cyclicC (G : Plane → ℂ) : Plane → ℂ := G ∘ chartC + +lemma measurePreserving_chartB : MeasurePreserving chartB volume volume := by + exact measurePreserving_add_prod_neg_right (volume : Measure ℝ) volume + +lemma measurePreserving_chartC : MeasurePreserving chartC volume volume := by + have hs : MeasurePreserving (Prod.swap : Plane → Plane) volume volume := measurePreserving_swap + have h := (hs.comp measurePreserving_chartB).comp hs + convert h using 1 + funext z + simp only [Function.comp_apply,chartC,chartB,Prod.swap,add_comm] + +lemma measurePreserving_reflect : MeasurePreserving (fun z : Plane => -z) volume volume := + volume.measurePreserving_neg + +lemma memLp_cyclicB {F : Plane → ℂ} (hF : MemLp F 3 volume) : MemLp (cyclicB F) 3 volume := + hF.comp_measurePreserving measurePreserving_chartB +lemma memLp_cyclicC {G : Plane → ℂ} (hG : MemLp G 3 volume) : MemLp (cyclicC G) 3 volume := + hG.comp_measurePreserving measurePreserving_chartC + +lemma eLpNorm_cyclicB {F : Plane → ℂ} (hF : MemLp F 3 volume) : + eLpNorm (cyclicB F) 3 volume = eLpNorm F 3 volume := + eLpNorm_comp_measurePreserving hF.aestronglyMeasurable measurePreserving_chartB +lemma eLpNorm_cyclicC {G : Plane → ℂ} (hG : MemLp G 3 volume) : + eLpNorm (cyclicC G) 3 volume = eLpNorm G 3 volume := + eLpNorm_comp_measurePreserving hG.aestronglyMeasurable measurePreserving_chartC + +lemma measurableSet_annulus (r R : ℝ) : MeasurableSet (annulus r R) := + (isOpen_lt continuous_const continuous_abs).measurableSet.inter + (isOpen_lt continuous_abs continuous_const).measurableSet + +lemma hardKernel_eq_indicator_ae {r R : ℝ} (hR : r ≤ R) : + (fun t => hardKernel r R t) =ᵐ[volume] + (annulus r R).indicator (fun t : ℝ => 1/t) := by + have hne (x : ℝ) : ∀ᵐ t : ℝ, t ≠ x := by simp [ae_iff] + filter_upwards [hne R,hne (-R)] with t ht1 ht2 + have ht : |t| ≠ R := by + intro he + rcases eq_or_eq_neg_of_abs_eq he with he|he + · exact ht1 he + · exact ht2 he + classical + by_cases h1 : r < |t| + · by_cases h2 : |t| < R + · simp only [hardKernel,h1,ite_true,not_lt.mpr h2.le,ite_false,sub_zero, + Set.indicator_of_mem (show t ∈ annulus r R from ⟨h1,h2⟩)] + · have h3 : R < |t| := lt_of_le_of_ne (le_of_not_gt h2) (Ne.symm ht) + simp only [hardKernel,h1,h3,ite_true,sub_self,zero_div, + Set.indicator_of_notMem (show t ∉ annulus r R from fun h => h2 h.2)] + · have h2 : ¬ R < |t| := not_lt.mpr ((le_of_not_gt h1).trans hR) + simp only [hardKernel,h1,h2,ite_false,sub_self,zero_div, + Set.indicator_of_notMem (show t ∉ annulus r R from fun h => h1 h.1)] + +lemma cyclicHard_coordinate_integrand (F G : Plane → ℂ) (z : Plane) (r R t : ℝ) : + cyclicB F ((-z).2,t+z.1+z.2) * cyclicC G (t+z.1+z.2,(-z).1) * + (hardKernel r R ((-z).1+(-z).2+(t+z.1+z.2)):ℂ) = + F (z.1+t,z.2)*G (z.1,z.2+t)*(hardKernel r R t:ℂ) := by + change F (-z.2+(t+z.1+z.2),-(-z.2))*G (-(-z.1),(t+z.1+z.2)+(-z.1))* + (hardKernel r R (-z.1 + -z.2+(t+z.1+z.2)):ℂ) = _ + rw [show -z.2+(t+z.1+z.2) = z.1+t by ring, + show (t+z.1+z.2)+(-z.1) = z.2+t by ring, + show -z.1 + -z.2+(t+z.1+z.2) = t by ring] + simp only [neg_neg] +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CostBlock.lean b/lean/OAI/Analysis/TriangularHilbert/CostBlock.lean new file mode 100644 index 0000000000000000000000000000000000000000..b355a9c1cd3a92def8267d0e44f05a65c4b6a4fc --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CostBlock.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.TriangularHilbert.WeightedGram + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators Topology +open Filter +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma hessianPair_self_of_projection {P Q K : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) (hKQ : K * Q = 0) (hQK : Q * K = 0) + (hPD : (P + Q).PosDef) : hessianPair P K K = hessianCost P K := by + rw [← hessianPair_add_projection hP hQ hQQ hPQ hQP hKQ hQK hKQ hQK hPD, + hessianPair_eq_PD hPD, hessianPairPD_self, + hessianCost_add_projection hP hQ hQQ hPQ hQP hKQ hQK hPD] + +lemma two_hessianPair_le_of_projection {P Q K L : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) + (hKQ : K * Q = 0) (hQK : Q * K = 0) (hLQ : L * Q = 0) (hQL : Q * L = 0) + (hPD : (P + Q).PosDef) : + 2 * hessianPair P K L ≤ hessianCost P K + hessianCost P L := by + rw [← hessianPair_add_projection hP hQ hQQ hPQ hQP hKQ hQK hLQ hQL hPD, + ← hessianCost_add_projection hP hQ hQQ hPQ hQP hKQ hQK hPD, + ← hessianCost_add_projection hP hQ hQQ hPQ hQP hLQ hQL hPD, + hessianPair_eq_PD hPD] + exact two_hessianPairPD_le hPD K L + +lemma hessianPair_weightedGram_self (B : Matrix ι ι ℂ) {w : ι → ℝ} + (hw : ∀ i, 0 < w i) (k : ι → ℝ) : + hessianPair (weightedGram B w) (weightedGram B k) (weightedGram B k) = + hessianCost (weightedGram B w) (weightedGram B k) := by + obtain ⟨Q, hQ, hQQ, hBQ, hPD⟩ := weightedGram_kernel_projection B hw + have hP := weightedGram_posSemidef B (fun i => (hw i).le) + have hPQ := weightedGram_mul_eq_zero B Q w hBQ + have hKQ := weightedGram_mul_eq_zero B Q k hBQ + exact hessianPair_self_of_projection hP hQ hQQ hPQ + (hermitian_mul_zero_flip hP.isHermitian hQ.isHermitian hPQ) hKQ + (hermitian_mul_zero_flip (weightedGram_isHermitian B k) hQ.isHermitian hKQ) hPD + +lemma two_hessianPair_weightedGram_le (B : Matrix ι ι ℂ) {w : ι → ℝ} + (hw : ∀ i, 0 < w i) (k l : ι → ℝ) : + 2 * hessianPair (weightedGram B w) (weightedGram B k) (weightedGram B l) ≤ + hessianCost (weightedGram B w) (weightedGram B k) + + hessianCost (weightedGram B w) (weightedGram B l) := by + obtain ⟨Q, hQ, hQQ, hBQ, hPD⟩ := weightedGram_kernel_projection B hw + have hP := weightedGram_posSemidef B (fun i => (hw i).le) + have hPQ := weightedGram_mul_eq_zero B Q w hBQ + have hKQ := weightedGram_mul_eq_zero B Q k hBQ + have hLQ := weightedGram_mul_eq_zero B Q l hBQ + exact two_hessianPair_le_of_projection hP hQ hQQ hPQ + (hermitian_mul_zero_flip hP.isHermitian hQ.isHermitian hPQ) hKQ + (hermitian_mul_zero_flip (weightedGram_isHermitian B k) hQ.isHermitian hKQ) hLQ + (hermitian_mul_zero_flip (weightedGram_isHermitian B l) hQ.isHermitian hLQ) hPD + +omit [DecidableEq ι] in +lemma traceReal_blockD (P : Three → Matrix ι ι ℂ) : + traceReal (blockD P) = ∑ v, traceReal (P v) := by + simp [traceReal, Matrix.trace, blockD, Fintype.sum_prod_type] + +omit [DecidableEq ι] in +lemma hsReal_blockD (A B : Three → Matrix ι ι ℂ) : + hsReal (blockD A) (blockD B) = ∑ v, hsReal (A v) (B v) := by + simp only [hsReal, blockD_star, blockD_mul, traceReal_blockD] + +lemma rootCost_blockD (A K : Three → Matrix ι ι ℂ) + (hA : ∀ v, (A v).PosSemidef) + (hsol : ∀ v, ∃ Y, sylv (A v) Y = K v) : + rootCost (blockD A) (blockD K) = ∑ v, rootCost (A v) (K v) := by + choose Y hY using hsol + have hsol' : sylv (blockD A) (blockD Y) = blockD K := by + rw [sylv_blockD] + congr 1 + funext v + exact hY v + rw [rootCost_eq_of_solution (blockD_posSemidef A hA) hsol', + hsReal_blockD, Finset.mul_sum] + apply Finset.sum_congr rfl + intro v _ + exact (rootCost_eq_of_solution (hA v) (hY v)).symm + +lemma hessianCost_blockD (P K : Three → Matrix ι ι ℂ) + (hP : ∀ v, (P v).PosSemidef) + (hsol : ∀ v, ∃ Y, sylv (CFC.sqrt (P v)) Y = K v) : + hessianCost (blockD P) (blockD K) = ∑ v, hessianCost (P v) (K v) := by + change rootCost (CFC.sqrt (blockD P)) (blockD K) = + ∑ v, rootCost (CFC.sqrt (P v)) (K v) + rw [sqrt_blockD P hP] + exact rootCost_blockD _ K + (fun v => Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (P v))) hsol + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CubicApprox.lean b/lean/OAI/Analysis/TriangularHilbert/CubicApprox.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb45eb6fb420a410aa6132154f897a20b75f78d8 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CubicApprox.lean @@ -0,0 +1,81 @@ +import OAI.Analysis.TriangularHilbert.CyclicCompact + +namespace OAI + +universe uα + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology ENNReal NNReal +noncomputable section + +lemma lintegral_enorm_cube {α : Type uα} [MeasurableSpace α] (f : α → ℂ) (μ : Measure α) + (hf : AEStronglyMeasurable f μ) : + (∫⁻ x, ‖f x‖ₑ^3 ∂μ) = eLpNorm f 3 μ ^ (3:ℕ) := by + simpa only [ENNReal.rpow_ofNat,NNReal.coe_ofNat,ENNReal.coe_ofNat] using + (eLpNorm_nnreal_pow_eq_lintegral (f := f) (μ := μ) (p := (3:ℝ≥0)) (by norm_num) hf).symm + +lemma norm_cube_le_four_sub (u v : ℂ) : ‖u‖^3 ≤ 4*(‖v‖^3+‖u-v‖^3) := by + have ht : ‖u‖ ≤ ‖v‖+‖u-v‖ := by + calc + ‖u‖ = ‖(u-v)+v‖ := by rw [sub_add_cancel] + _ ≤ ‖u-v‖+‖v‖ := norm_add_le _ _ + _ = ‖v‖+‖u-v‖ := add_comm _ _ + have hp := pow_le_pow_left₀ (norm_nonneg u) ht 3 + have hn := mul_nonneg (sq_nonneg (‖v‖-‖u-v‖)) (add_nonneg (norm_nonneg v) (norm_nonneg (u-v))) + nlinarith + +lemma tendsto_of_enorm_cube {α : Type uα} {l : Filter α} {f : α → ℂ} {z : ℂ} + (h : Tendsto (fun n => ‖f n-z‖ₑ^3) l (𝓝 0)) : Tendsto f l (𝓝 z) := by + have he : Tendsto (fun n => ‖f n-z‖ₑ) l (𝓝 0) := by + have ht := ((ENNReal.continuous_rpow_const (y := (1:ℝ)/3)).tendsto (0:ℝ≥0∞)).comp h + have hp (x : ℝ≥0∞) : (x^(3:ℕ))^((1:ℝ)/3) = x := by + rw [← ENNReal.rpow_natCast,← ENNReal.rpow_mul] + norm_num + simpa only [Function.comp_def,hp,ENNReal.zero_rpow_of_pos (by norm_num : 0 < (1:ℝ)/3)] using ht + have hr := (ENNReal.continuousAt_toReal (by simp : (0:ℝ≥0∞) ≠ ⊤)).tendsto.comp he + rw [tendsto_iff_norm_sub_tendsto_zero] + simpa only [Function.comp_def,ENNReal.toReal_zero,enorm_eq_nnnorm,ENNReal.coe_toReal,coe_nnnorm] using hr + +lemma exists_cubic_approximation (f : ℝ×ℝ → ℂ) (hf : MemLp f 3 volume) : + ∃ g : ℕ → ℝ×ℝ → ℂ, (∀ n, Continuous (g n) ∧ HasCompactSupport (g n) ∧ MemLp (g n) 3 volume) ∧ + ∃ D : ℝ×ℝ → ℝ, Integrable D ∧ (∀ z, 0 ≤ D z) ∧ + (∀ᵐ z : ℝ×ℝ, (∀ n, ‖g n z‖^3 ≤ D z) ∧ Tendsto (fun n => g n z) atTop (𝓝 (f z))) := by + have hex (n : ℕ) : ∃ g : ℝ×ℝ → ℂ, HasCompactSupport g ∧ + eLpNorm (f-g) 3 volume ≤ (2⁻¹:ℝ≥0∞)^n ∧ Continuous g ∧ MemLp g 3 volume := + hf.exists_hasCompactSupport_eLpNorm_sub_le (by norm_num) (by simp) + choose g hgs hge hgc hgm using hex + let S (z : ℝ×ℝ) : ℝ≥0∞ := ∑' n, ‖f z-g n z‖ₑ^3 + have hm (n : ℕ) : AEMeasurable (fun z => ‖f z-g n z‖ₑ^3) volume := + ((hf.aestronglyMeasurable.sub (hgc n).aestronglyMeasurable).enorm).pow_const 3 + have hS : AEMeasurable S volume := AEMeasurable.tsum hm + have hSint : (∫⁻ z, S z) < ⊤ := by + rw [show (∫⁻ z, S z) = ∑' n, ∫⁻ z, ‖f z-g n z‖ₑ^3 from lintegral_tsum hm] + apply lt_of_le_of_lt (ENNReal.tsum_le_tsum (fun n => ?_)) + ((tsum_geometric_lt_top).mpr (show ((2⁻¹:ℝ≥0∞)^3) < 1 by + apply pow_lt_one₀ zero_le _ (by norm_num) + exact ENNReal.inv_lt_one.mpr (show (1:ℝ≥0∞) < 2 by norm_num))) + rw [lintegral_enorm_cube (fun point => f point - g n point) _ + (hf.aestronglyMeasurable.sub (hgc n).aestronglyMeasurable)] + exact (ENNReal.pow_le_pow_left (hge n)).trans_eq (by rw [← pow_mul,← pow_mul,Nat.mul_comm]) + have hSfinite : ∀ᵐ z, S z < ⊤ := ae_lt_top' hS hSint.ne + let D (z : ℝ×ℝ) : ℝ := 4*(‖f z‖^3+(S z).toReal) + refine ⟨g,fun n => ⟨hgc n,hgs n,hgm n⟩,D,?_,?_,?_⟩ + · exact ((hf.integrable_norm_pow (by norm_num : (3:ℕ) ≠ 0)).add + (integrable_toReal_of_lintegral_ne_top hS hSint.ne)).const_mul 4 + · intro z; exact mul_nonneg (by norm_num) (add_nonneg (by positivity) ENNReal.toReal_nonneg) + · filter_upwards [hSfinite] with z hz + refine ⟨fun n => ?_,?_⟩ + · have he : ‖g n z-f z‖^3 ≤ (S z).toReal := by + have hh := ENNReal.toReal_mono hz.ne + (ENNReal.le_tsum (f := fun index => ‖f z-g index z‖ₑ^3) n : ‖f z-g n z‖ₑ^3 ≤ S z) + simpa only [ENNReal.toReal_pow,enorm_eq_nnnorm,ENNReal.coe_toReal,coe_nnnorm,norm_sub_rev] using hh + exact (norm_cube_le_four_sub (g n z) (f z)).trans (by dsimp [D]; linarith) + · apply tendsto_of_enorm_cube + simpa only [enorm_sub_rev] using ENNReal.tendsto_atTop_zero_of_tsum_ne_top hz.ne +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CubicLimit.lean b/lean/OAI/Analysis/TriangularHilbert/CubicLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..2093ffa17ce3d621c0e56d1371562a6d5bd0ace8 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CubicLimit.lean @@ -0,0 +1,41 @@ +import OAI.Analysis.TriangularHilbert.CubicApprox + +namespace OAI + +universe uα + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology ENNReal +noncomputable section + +lemma tendsto_integral_cubes (f : ℝ×ℝ → ℂ) (g : ℕ → ℝ×ℝ → ℂ) (hg : ∀ n, Continuous (g n)) + {D : ℝ×ℝ → ℝ} (hD : Integrable D) + (hb : ∀ᵐ z : ℝ×ℝ, (∀ n, ‖g n z‖^3 ≤ D z) ∧ Tendsto (fun n => g n z) atTop (𝓝 (f z))) : + Tendsto (fun n => ∫ z : ℝ×ℝ, ‖g n z‖^3) atTop (𝓝 (∫ z : ℝ×ℝ, ‖f z‖^3)) := by + apply tendsto_integral_of_dominated_convergence D (fun n => (hg n).norm.pow 3 |>.aestronglyMeasurable) hD + · intro n + filter_upwards [hb] with z hz + simpa only [Pi.pow_apply,Real.norm_of_nonneg (pow_nonneg (norm_nonneg _) 3)] using hz.1 n + · filter_upwards [hb] with z hz + exact hz.2.norm.pow 3 + +lemma lintegral_le_of_ae_tendsto {α : Type uα} [MeasurableSpace α] {μ : Measure α} + {F : ℕ → α → ℝ≥0∞} {f : α → ℝ≥0∞} {b : ℕ → ℝ≥0∞} {c : ℝ≥0∞} + (hm : ∀ n, AEMeasurable (F n) μ) (ht : ∀ᵐ a ∂μ, Tendsto (fun n => F n a) atTop (𝓝 (f a))) + (hb : ∀ n, (∫⁻ a, F n a ∂μ) ≤ b n) (hc : Tendsto b atTop (𝓝 c)) : + (∫⁻ a, f a ∂μ) ≤ c := by + calc + (∫⁻ a, f a ∂μ) = ∫⁻ a, liminf (fun n => F n a) atTop ∂μ := by + apply lintegral_congr_ae + filter_upwards [ht] with a ha + exact ha.liminf_eq.symm + _ ≤ liminf (fun n => ∫⁻ a, F n a ∂μ) atTop := lintegral_liminf_le' hm + _ ≤ liminf b atTop := liminf_le_liminf (Eventually.of_forall hb) + _ = c := hc.liminf_eq +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CubicProduct.lean b/lean/OAI/Analysis/TriangularHilbert/CubicProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..4cdb70e6b2b1a01e8d33687784fac9099b18cd79 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CubicProduct.lean @@ -0,0 +1,75 @@ +import OAI.Analysis.TriangularHilbert.Model + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma sq_le_cube_add_one {x : ℝ} (hx : 0 ≤ x) : x^2 ≤ x^3+1 := by + by_cases h : x ≤ 1 + · have hs := pow_le_pow_left₀ hx h 2 + nlinarith [pow_nonneg hx 3] + · have hm := mul_nonneg (sq_nonneg x) (sub_nonneg.mpr (le_of_not_ge h)) + nlinarith + +lemma mul_le_cube_add_cube_add_two {x y : ℝ} (hx : 0 ≤ x) (hy : 0 ≤ y) : + x*y ≤ x^3+y^3+2 := by + nlinarith [sq_nonneg (x-y),sq_le_cube_add_one hx,sq_le_cube_add_one hy, + pow_nonneg hx 3,pow_nonneg hy 3] + +lemma norm_product_kernel_le (f g : ℝ → ℂ) (K : ℝ → ℝ) {D E : ℝ → ℝ} {L : ℝ} + (_hL : 0 ≤ L) {c : ℝ} (hf : ‖f c‖^3 ≤ D c) (hg : ‖g c‖^3 ≤ E c) + (hk : |K c| ≤ L) : ‖f c*g c*(K c:ℂ)‖ ≤ (D c+E c+2)*L := by + rw [norm_mul,norm_mul,Complex.norm_real,Real.norm_eq_abs] + have hp := mul_le_cube_add_cube_add_two (norm_nonneg (f c)) (norm_nonneg (g c)) + have hD : 0 ≤ D c := (pow_nonneg (norm_nonneg _) 3).trans hf + have hE : 0 ≤ E c := (pow_nonneg (norm_nonneg _) 3).trans hg + exact mul_le_mul (by linarith : ‖f c‖*‖g c‖ ≤ D c+E c+2) hk (abs_nonneg _) (by positivity) + +lemma integrable_product_bounded_kernel (f g : ℝ → ℂ) (K : ℝ → ℝ) + (hf : AEStronglyMeasurable f volume) (hg : AEStronglyMeasurable g volume) (hK : Measurable K) + {D E : ℝ → ℝ} (hD : Integrable D) (hE : Integrable E) + (hbound : ∀ᵐ c : ℝ, ‖f c‖^3 ≤ D c ∧ ‖g c‖^3 ≤ E c) + {s : Set ℝ} (hs : MeasurableSet s) (hμ : volume s ≠ ⊤) {L : ℝ} (hL : 0 ≤ L) + (hk : ∀ c, |K c| ≤ L) (hzero : ∀ c ∉ s, K c = 0) : + Integrable (fun c => f c*g c*(K c:ℂ)) := by + have hb : Integrable (s.indicator (fun c => (D c+E c+2)*L)) := + IntegrableOn.integrable_indicator + (((hD.integrableOn.add hE.integrableOn).add (integrableOn_const (C := (2:ℝ)) hμ)).mul_const L) hs + apply hb.mono' ((hf.mul hg).mul (Complex.continuous_ofReal.comp_aestronglyMeasurable hK.aestronglyMeasurable)) + filter_upwards [hbound] with c hc + by_cases hc' : c ∈ s + · rw [Set.indicator_of_mem hc'] + exact norm_product_kernel_le f g K hL hc.1 hc.2 (hk c) + · simp only [Pi.mul_apply,hzero c hc',Complex.ofReal_zero,mul_zero,norm_zero,Set.indicator_of_notMem hc',le_refl] + +lemma tendsto_integral_product_bounded_kernel (f g : ℝ → ℂ) (F G : ℕ → ℝ → ℂ) (K : ℝ → ℝ) + (hF : ∀ n, AEStronglyMeasurable (F n) volume) (hG : ∀ n, AEStronglyMeasurable (G n) volume) + (hK : Measurable K) {D E : ℝ → ℝ} (hD : Integrable D) (hE : Integrable E) + (hbound : ∀ᵐ c : ℝ, ∀ n, ‖F n c‖^3 ≤ D c ∧ ‖G n c‖^3 ≤ E c) + (ht : ∀ᵐ c : ℝ, Tendsto (fun n => F n c) atTop (𝓝 (f c)) ∧ Tendsto (fun n => G n c) atTop (𝓝 (g c))) + {s : Set ℝ} (hs : MeasurableSet s) (hμ : volume s ≠ ⊤) {L : ℝ} (hL : 0 ≤ L) + (hk : ∀ c, |K c| ≤ L) (hzero : ∀ c ∉ s, K c = 0) : + Tendsto (fun n => ∫ c : ℝ, F n c*G n c*(K c:ℂ)) atTop + (𝓝 (∫ c : ℝ, f c*g c*(K c:ℂ))) := by + apply tendsto_integral_of_dominated_convergence (s.indicator (fun c => (D c+E c+2)*L)) + · intro n + exact ((hF n).mul (hG n)).mul (Complex.continuous_ofReal.comp_aestronglyMeasurable hK.aestronglyMeasurable) + · exact IntegrableOn.integrable_indicator + (((hD.integrableOn.add hE.integrableOn).add (integrableOn_const (C := (2:ℝ)) hμ)).mul_const L) hs + · intro n + filter_upwards [hbound] with c hc + by_cases hc' : c ∈ s + · rw [Set.indicator_of_mem hc'] + exact norm_product_kernel_le (F n) (G n) K hL (hc n).1 (hc n).2 (hk c) + · simp only [hzero c hc',Complex.ofReal_zero,mul_zero,norm_zero,Set.indicator_of_notMem hc',le_refl] + · filter_upwards [ht] with c hc + exact (hc.1.mul hc.2).mul tendsto_const_nhds +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicCompact.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..3149050a5ff105918e35df58bd5f9342c7124f6d --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicCompact.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.TriangularHilbert.CyclicMeasurable + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology ENNReal +noncomputable section + +lemma integrable_cyclic_moment_compact (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + (hsB : HasCompactSupport B) (hsC : HasCompactSupport C) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) (hr : ∀ k, 0 < r k) (hR : ∀ k, r k ≤ R k) : + Integrable (fun z : ℝ×ℝ => finiteMoment (fun k => cyclicKernelOutput B C (hardKernel (r k) (R k)) z)) := by + classical + obtain ⟨MB,_,hb⟩ := compactSupport_box B hsB + obtain ⟨MC,_,hc⟩ := compactSupport_box C hsC + obtain ⟨CB,hCB⟩ := hB.bounded_above_of_compact_support hsB + obtain ⟨CC,hCC⟩ := hC.bounded_above_of_compact_support hsC + let δ : ℝ := Finset.univ.inf' Finset.univ_nonempty r + have hδ : 0 < δ := (Finset.lt_inf'_iff _).mpr (fun k _ => hr k) + have hδr (k : κ) : δ ≤ r k := Finset.inf'_le _ (Finset.mem_univ k) + apply integrable_cyclic_moment_box B C hB.measurable hC.measurable + (M := max MB MC) (fun z hz => ⟨(hb z hz).1.trans (le_max_left _ _),(hb z hz).2.trans (le_max_left _ _)⟩) + (fun z hz => ⟨(hc z hz).1.trans (le_max_right _ _),(hc z hz).2.trans (le_max_right _ _)⟩) + ((norm_nonneg (B 0)).trans (hCB 0)) ((norm_nonneg (C 0)).trans (hCC 0)) + (show 0 ≤ 1/δ by positivity) hCB hCC (fun k => hardKernel (r k) (R k)) + (fun k => measurable_hardKernel _ _) + exact fun k t => (abs_hardKernel_le (hr k) (hR k) t).trans (one_div_le_one_div_of_le hδ (hδr k)) + +lemma lintegral_cyclic_moment_le_compact (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + (hsB : HasCompactSupport B) (hsC : HasCompactSupport C) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) (hr : ∀ k, 0 < r k) (hR : ∀ k, r k ≤ R k) : + (∫⁻ z : ℝ×ℝ, ENNReal.ofReal (finiteMoment (fun k => cyclicKernelOutput B C (hardKernel (r k) (R k)) z))) ≤ + ENNReal.ofReal (momentConstant*((∫ z : ℝ×ℝ, ‖B z‖^3)+(∫ z : ℝ×ℝ, ‖C z‖^3))) := by + rw [← ofReal_integral_eq_lintegral_ofReal (integrable_cyclic_moment_compact B C hB hC hsB hsC r R hr hR) + (Eventually.of_forall (fun z => finiteMoment_nonneg _))] + exact ENNReal.ofReal_le_ofReal (continuum_moment_le_compact B C hB hC hsB hsC r R hr hR) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicDensity.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..93bb5033413c1d9803fa2d8f07df7174faa066d6 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicDensity.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.TriangularHilbert.CubicLimit + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology ENNReal +noncomputable section + +lemma aemeasurable_cyclic_hard (B C : ℝ×ℝ → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) + {r R : ℝ} (hr : 0 < r) (hR : r ≤ R) : AEMeasurable (cyclicKernelOutput B C (hardKernel r R)) volume := by + obtain ⟨F,hF,D,hD,_,hb⟩ := exists_cubic_approximation B hB + obtain ⟨G,hG,E,hE,_,hc⟩ := exists_cubic_approximation C hC + have ht := tendsto_cyclicKernelOutput_of_cubic_dom B C F G (fun n => (hF n).1) (fun n => (hG n).1) hD hE hb hc + apply aemeasurable_of_tendsto_metrizable_ae atTop + (fun n => (measurable_cyclicKernelOutput (F n) (G n) (hF n).1.measurable (hG n).1.measurable _ + (measurable_hardKernel r R)).aemeasurable) + filter_upwards [ht] with z hz + exact hz r R hr hR + +lemma lintegral_cyclic_moment_le (B C : ℝ×ℝ → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) (hr : ∀ k, 0 < r k) (hR : ∀ k, r k ≤ R k) : + (∫⁻ z : ℝ×ℝ, ENNReal.ofReal (finiteMoment (fun k => cyclicKernelOutput B C (hardKernel (r k) (R k)) z))) ≤ + ENNReal.ofReal (momentConstant*((∫ z : ℝ×ℝ, ‖B z‖^3)+(∫ z : ℝ×ℝ, ‖C z‖^3))) := by + obtain ⟨F,hF,D,hD,_,hb⟩ := exists_cubic_approximation B hB + obtain ⟨G,hG,E,hE,_,hc⟩ := exists_cubic_approximation C hC + have ht := tendsto_cyclicKernelOutput_of_cubic_dom B C F G (fun n => (hF n).1) (fun n => (hG n).1) hD hE hb hc + apply lintegral_le_of_ae_tendsto + (F := fun n z => ENNReal.ofReal (finiteMoment (fun k => cyclicKernelOutput (F n) (G n) (hardKernel (r k) (R k)) z))) + (b := fun n => ENNReal.ofReal (momentConstant*((∫ z : ℝ×ℝ, ‖F n z‖^3)+(∫ z : ℝ×ℝ, ‖G n z‖^3)))) + · intro n + exact (ENNReal.continuous_ofReal.comp continuous_finiteMoment).measurable.comp + (Measurable.of_eval (fun k => measurable_cyclicKernelOutput (F n) (G n) + (hF n).1.measurable (hG n).1.measurable _ (measurable_hardKernel _ _))) |>.aemeasurable + · filter_upwards [ht] with z hz + exact (ENNReal.continuous_ofReal.comp continuous_finiteMoment).continuousAt.tendsto.comp + (tendsto_pi_nhds.mpr (fun k => hz (r k) (R k) (hr k) (hR k))) + · intro n + exact lintegral_cyclic_moment_le_compact (F n) (G n) (hF n).1 (hG n).1 (hF n).2.1 (hG n).2.1 r R hr hR + · exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp + (tendsto_const_nhds.mul ((tendsto_integral_cubes B F (fun n => (hF n).1) hD hb).add + (tendsto_integral_cubes C G (fun n => (hG n).1) hE hc))) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicHomogeneity.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicHomogeneity.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b490631d7fc3294d8c475947442cfea93cf2ded --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicHomogeneity.lean @@ -0,0 +1,73 @@ +import OAI.Analysis.TriangularHilbert.CyclicMaxMoment + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory MeasureTheory.Measure Heat Filter +open scoped ENNReal +noncomputable section + +def cyclicNorm (B C : Plane → ℂ) : ℝ≥0∞ := + (∫⁻ z : Plane, cyclicMax B C z ^ ((3:ℝ)/2)) ^ ((2:ℝ)/3) + +lemma cyclicKernelOutput_congr_ae {B C B' C' : Plane → ℂ} + (hb : B =ᵐ[volume] B') (hc : C =ᵐ[volume] C') : + ∀ᵐ z : Plane, ∀ K : ℝ → ℝ, cyclicKernelOutput B C K z = cyclicKernelOutput B' C' K z := by + filter_upwards [quasiMeasurePreserving_snd.ae (ae_ae_of_ae_prod hb), + quasiMeasurePreserving_fst.ae (ae_ae_of_ae_prod (measurePreserving_swap.quasiMeasurePreserving.ae hc))] + with z hzB hzC + intro K + apply integral_congr_ae + filter_upwards [hzB,hzC] with c hB hC + change C (c,z.1) = C' (c,z.1) at hC + simp only [hB,hC] + +lemma cyclicMax_congr_ae {B C B' C' : Plane → ℂ} + (hb : B =ᵐ[volume] B') (hc : C =ᵐ[volume] C') : + cyclicMax B C =ᵐ[volume] cyclicMax B' C' := by + filter_upwards [cyclicKernelOutput_congr_ae hb hc] with z hz + simp only [cyclicMax,hz] + +lemma cyclicNorm_congr_ae {B C B' C' : Plane → ℂ} + (hb : B =ᵐ[volume] B') (hc : C =ᵐ[volume] C') : + cyclicNorm B C = cyclicNorm B' C' := by + unfold cyclicNorm + congr 1 + apply lintegral_congr_ae + filter_upwards [cyclicMax_congr_ae hb hc] with z hz + rw [hz] + +@[simp] lemma cyclicNorm_zero_left (C : Plane → ℂ) : cyclicNorm 0 C = 0 := by + simp [cyclicNorm,cyclicMax,cyclicKernelOutput] +@[simp] lemma cyclicNorm_zero_right (B : Plane → ℂ) : cyclicNorm B 0 = 0 := by + simp [cyclicNorm,cyclicMax,cyclicKernelOutput] + +lemma cyclicKernelOutput_smul (B C : Plane → ℂ) (u v : ℂ) (K : ℝ → ℝ) (z : Plane) : + cyclicKernelOutput (u • B) (v • C) K z = (u*v)*cyclicKernelOutput B C K z := by + rw [cyclicKernelOutput,cyclicKernelOutput,← integral_const_mul] + congr 1 + funext c + simp only [Pi.smul_apply,smul_eq_mul] + ring + +lemma cyclicMax_smul (B C : Plane → ℂ) (u v : ℂ) (z : Plane) : + cyclicMax (u • B) (v • C) z = (‖u‖ₑ*‖v‖ₑ)*cyclicMax B C z := by + simp only [cyclicMax,cyclicKernelOutput_smul,ofReal_norm,enorm_mul] + rw [ENNReal.mul_iSup] + +lemma cyclicNorm_smul (B C : Plane → ℂ) (u v : ℂ) : + cyclicNorm (u • B) (v • C) = (‖u‖ₑ*‖v‖ₑ)*cyclicNorm B C := by + have he : (fun z : Plane => cyclicMax (u • B) (v • C) z ^ ((3:ℝ)/2)) = + (fun z : Plane => (‖u‖ₑ*‖v‖ₑ)^((3:ℝ)/2)*cyclicMax B C z^((3:ℝ)/2)) := by + funext z + rw [cyclicMax_smul,ENNReal.mul_rpow_of_nonneg _ _ (by norm_num)] + rw [cyclicNorm,cyclicNorm,he, + lintegral_const_mul' _ _ (ENNReal.rpow_ne_top_of_nonneg (by norm_num) (ENNReal.mul_ne_top enorm_ne_top enorm_ne_top)), + ENNReal.mul_rpow_of_nonneg _ _ (by norm_num : (0:ℝ) ≤ 2/3),← ENNReal.rpow_mul] + norm_num +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicMaxMoment.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicMaxMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0f72ae0517fe829b5948ae01143119c8b35dbb3 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicMaxMoment.lean @@ -0,0 +1,76 @@ +import OAI.Analysis.TriangularHilbert.MomentPower + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Filter Heat +open scoped Topology ENNReal +noncomputable section + +lemma aemeasurable_cyclicMax (B C : Plane → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) : + AEMeasurable (cyclicMax B C) volume := by + apply AEMeasurable.iSup + intro q + exact (aemeasurable_cyclic_hard B C hB hC q.toEndpoints.lower_pos q.toEndpoints.lower_lt_upper.le).norm.ennreal_ofReal + +def rationalMoment (B C : Plane → ℂ) (n : ℕ) (z : Plane) : ℝ≥0∞ := + ⨆ k : Fin (n+1), ENNReal.ofReal (complexMoment (cyclicKernelOutput B C + (hardKernel (RatEndpoints.sequence k).toEndpoints.lower (RatEndpoints.sequence k).toEndpoints.upper) z)) + +lemma rationalMoment_mono (B C : Plane → ℂ) (z : Plane) : Monotone (fun n => rationalMoment B C n z) := by + intro n m hnm + apply iSup_le + intro k + exact le_iSup (fun k : Fin (m+1) => ENNReal.ofReal (complexMoment (cyclicKernelOutput B C + (hardKernel (RatEndpoints.sequence k).toEndpoints.lower (RatEndpoints.sequence k).toEndpoints.upper) z))) + ⟨k,lt_of_lt_of_le k.2 (Nat.add_le_add_right hnm 1)⟩ + +lemma cyclicMax_rpow_eq (B C : Plane → ℂ) (z : Plane) : + cyclicMax B C z ^ ((3:ℝ)/2) = ⨆ n, rationalMoment B C n z := by + rw [cyclicMax] + change (ENNReal.orderIsoRpow ((3:ℝ)/2) (by norm_num)) _ = _ + rw [OrderIso.map_iSup] + simp only [ENNReal.orderIsoRpow_apply, ← ofReal_complexMoment] + apply le_antisymm + · apply iSup_le + intro q + obtain ⟨n,rfl⟩ := RatEndpoints.sequence_surjective q + exact le_iSup_of_le n (le_iSup (fun k : Fin (n+1) => ENNReal.ofReal (complexMoment (cyclicKernelOutput B C + (hardKernel (RatEndpoints.sequence k).toEndpoints.lower (RatEndpoints.sequence k).toEndpoints.upper) z))) + ⟨n,Nat.lt_succ_self n⟩) + · apply iSup_le + intro n + apply iSup_le + intro k + exact le_iSup (fun q : RatEndpoints => ENNReal.ofReal (complexMoment (cyclicKernelOutput B C + (hardKernel (q.1.1:ℝ) (q.1.2:ℝ)) z))) (RatEndpoints.sequence k) + +lemma aemeasurable_rationalMoment (B C : Plane → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) (n : ℕ) : + AEMeasurable (rationalMoment B C n) volume := by + unfold rationalMoment + simp_rw [ofReal_complexMoment] + apply AEMeasurable.iSup + intro k + exact ((aemeasurable_cyclic_hard B C hB hC (RatEndpoints.sequence k).toEndpoints.lower_pos + (RatEndpoints.sequence k).toEndpoints.lower_lt_upper.le).norm.ennreal_ofReal).pow_const _ + +lemma lintegral_cyclicMax_moment_le (B C : Plane → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) : + (∫⁻ z : Plane, cyclicMax B C z ^ ((3:ℝ)/2)) ≤ + ENNReal.ofReal (momentConstant*((∫ z : Plane, ‖B z‖^3)+(∫ z : Plane, ‖C z‖^3))) := by + simp_rw [cyclicMax_rpow_eq] + rw [lintegral_iSup' (aemeasurable_rationalMoment B C hB hC) + (Eventually.of_forall (rationalMoment_mono B C))] + apply iSup_le + intro n + have h := lintegral_cyclic_moment_le B C hB hC + (fun k : Fin (n+1) => (RatEndpoints.sequence k).toEndpoints.lower) + (fun k : Fin (n+1) => (RatEndpoints.sequence k).toEndpoints.upper) + (fun k => (RatEndpoints.sequence k).toEndpoints.lower_pos) + (fun k => (RatEndpoints.sequence k).toEndpoints.lower_lt_upper.le) + simpa only [ofReal_finiteMoment,rationalMoment] using h +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicMeasurable.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicMeasurable.lean new file mode 100644 index 0000000000000000000000000000000000000000..52c87da75a360e58d20f75353027b2a8ea6d86e9 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicMeasurable.lean @@ -0,0 +1,80 @@ +import OAI.Analysis.TriangularHilbert.CompactMoment + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma measurable_cyclicKernelOutput (B C : ℝ×ℝ → ℂ) (hB : Measurable B) (hC : Measurable C) + (K : ℝ → ℝ) (hK : Measurable K) : Measurable (cyclicKernelOutput B C K) := by + have hm : Measurable (fun q : (ℝ×ℝ)×ℝ => B (q.1.2,q.2)*C (q.2,q.1.1)*(K (q.1.1+q.1.2+q.2):ℂ)) := by + apply Measurable.mul + · exact (hB.comp ((measurable_snd.comp measurable_fst).prodMk measurable_snd)).mul + (hC.comp (measurable_snd.prodMk (measurable_fst.comp measurable_fst))) + · exact Complex.measurable_ofReal.comp (hK.comp + (((measurable_fst.comp measurable_fst).add (measurable_snd.comp measurable_fst)).add measurable_snd)) + exact hm.stronglyMeasurable.integral_prod_right'.measurable + +lemma cyclicKernelOutput_support (B C : ℝ×ℝ → ℂ) {M : ℝ} + (hB : BoxSupport B M) (hC : BoxSupport C M) (K : ℝ → ℝ) (z : ℝ×ℝ) (hz : z ∉ closedBox M) : + cyclicKernelOutput B C K z = 0 := by + apply integral_eq_zero_of_ae + filter_upwards [] with c + by_cases hb : B (z.2,c) = 0 + · simp only [hb,zero_mul,Pi.zero_apply] + · have hc : C (c,z.1) = 0 := by + by_contra hc + exact hz ((mem_closedBox _ _).mpr ⟨(hC _ hc).2,(hB _ hb).1⟩) + simp only [hc,mul_zero,zero_mul,Pi.zero_apply] + +lemma cyclicKernelOutput_bound (B C : ℝ×ℝ → ℂ) {M CB CC L : ℝ} + (hs : BoxSupport B M) (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (_hL : 0 ≤ L) + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) + (K : ℝ → ℝ) (hk : ∀ t, |K t| ≤ L) (z : ℝ×ℝ) : + ‖cyclicKernelOutput B C K z‖ ≤ outputBound M CB CC L := by + apply norm_integral_le_of_norm_le + ((integrableOn_const (μ := volume) (s := Set.Icc (-(M+1)) (M+1)) (C := CB*CC*L) + isCompact_Icc.measure_ne_top).integrable_indicator measurableSet_Icc) + filter_upwards [] with c + by_cases hmem : c ∈ Set.Icc (-(M+1)) (M+1) + · rw [Set.indicator_of_mem hmem,norm_mul,norm_mul,Complex.norm_real,Real.norm_eq_abs] + exact mul_le_mul (mul_le_mul (hb _) (hc _) (norm_nonneg _) hCB) (hk _) (abs_nonneg _) + (mul_nonneg hCB hCC) + · have he : B (z.2,c) = 0 := by + by_contra he + apply hmem + exact abs_le.mp ((hs _ he).2.trans (by linarith)) + simp only [he,zero_mul,norm_zero,Set.indicator_of_notMem hmem,le_refl] + +lemma integrable_cyclic_moment_box (B C : ℝ×ℝ → ℂ) (hB : Measurable B) (hC : Measurable C) + {M CB CC L : ℝ} (hsB : BoxSupport B M) (hsC : BoxSupport C M) + (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hL : 0 ≤ L) + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (K : κ → ℝ → ℝ) + (hK : ∀ k, Measurable (K k)) (hk : ∀ k t, |K k t| ≤ L) : + Integrable (fun z : ℝ×ℝ => finiteMoment (fun k => cyclicKernelOutput B C (K k) z)) := by + let T := outputBound M CB CC L + have hT : 0 ≤ T := outputBound_nonneg M hCB hCC hL + apply ((integrableOn_const (μ := volume) (s := closedBox M) (C := T*Real.sqrt T) + (volume_closedBox_ne_top _)).integrable_indicator (measurableSet_closedBox _)).mono' + · exact (continuous_finiteMoment.measurable.comp (Measurable.of_eval + (fun k => measurable_cyclicKernelOutput B C hB hC (K k) (hK k)))).aestronglyMeasurable + · filter_upwards [] with z + rw [Real.norm_of_nonneg (finiteMoment_nonneg _)] + by_cases hz : z ∈ closedBox M + · rw [Set.indicator_of_mem hz] + exact finiteMoment_le _ (fun k => cyclicKernelOutput_bound B C hsB hCB hCC hL hb hc (K k) (hk k) z) + · have he : (fun k => cyclicKernelOutput B C (K k) z) = fun _ : κ => (0:ℂ) := + funext (fun k => cyclicKernelOutput_support B C hsB hsC (K k) z hz) + rw [he,finiteMoment_zero] + exact Set.indicator_nonneg (fun _ _ => mul_nonneg hT (Real.sqrt_nonneg _)) z +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicNorm.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ad829e3b8c2110bf50dfcb9232c102c9e6ef1d6 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicNorm.lean @@ -0,0 +1,85 @@ +import OAI.Analysis.TriangularHilbert.CyclicHomogeneity + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Heat Filter +open scoped ENNReal NNReal +noncomputable section + +def mainConstant : ℝ≥0 := ⟨(2*momentConstant)^((2:ℝ)/3),Real.rpow_nonneg (mul_nonneg (by norm_num) momentConstant_pos.le) _⟩ + +lemma coe_mainConstant : (mainConstant : ℝ≥0∞) = ENNReal.ofReal (2*momentConstant)^((2:ℝ)/3) := by + rw [ENNReal.coe_nnreal_eq] + exact (ENNReal.ofReal_rpow_of_nonneg (mul_nonneg (by norm_num) momentConstant_pos.le) (by norm_num)).symm + +lemma ofReal_integral_cube (B : Plane → ℂ) (hB : MemLp B 3 volume) : + ENNReal.ofReal (∫ z : Plane, ‖B z‖^3) = eLpNorm B 3 volume ^ (3:ℕ) := by + rw [ofReal_integral_eq_lintegral_ofReal (hB.integrable_norm_pow (by norm_num : (3:ℕ) ≠ 0)) + (Eventually.of_forall (fun z => pow_nonneg (norm_nonneg (B z)) 3))] + simp_rw [ENNReal.ofReal_pow (norm_nonneg _),ofReal_norm] + exact lintegral_enorm_cube B volume hB.aestronglyMeasurable + +lemma integral_cube_eq_one (B : Plane → ℂ) (hB : MemLp B 3 volume) (hn : eLpNorm B 3 volume = 1) : + (∫ z : Plane, ‖B z‖^3) = 1 := by + have h := congrArg ENNReal.toReal (ofReal_integral_cube B hB) + simpa only [hn,one_pow,ENNReal.toReal_one, + ENNReal.toReal_ofReal (integral_nonneg (fun z => pow_nonneg (norm_nonneg (B z)) 3))] using h + +lemma cyclicNorm_le_unit (B C : Plane → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) + (hnB : eLpNorm B 3 volume = 1) (hnC : eLpNorm C 3 volume = 1) : + cyclicNorm B C ≤ (mainConstant : ℝ≥0∞) := by + rw [cyclicNorm,coe_mainConstant] + apply ENNReal.rpow_le_rpow _ (by norm_num) + have h := lintegral_cyclicMax_moment_le B C hB hC + rw [integral_cube_eq_one B hB hnB,integral_cube_eq_one C hC hnC] at h + simpa only [show momentConstant*((1:ℝ)+1) = 2*momentConstant by ring] using h + +lemma cyclicNorm_le (B C : Plane → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) : + cyclicNorm B C ≤ (mainConstant : ℝ≥0∞)*eLpNorm B 3 volume*eLpNorm C 3 volume := by + by_cases hb0 : eLpNorm B 3 volume = 0 + · have hb := (eLpNorm_eq_zero_iff (by norm_num)).mp hb0 + rw [cyclicNorm_congr_ae hb (EventuallyEq.refl _ _),cyclicNorm_zero_left] + exact bot_le + by_cases hc0 : eLpNorm C 3 volume = 0 + · have hc := (eLpNorm_eq_zero_iff (by norm_num)).mp hc0 + rw [cyclicNorm_congr_ae (EventuallyEq.refl _ _) hc,cyclicNorm_zero_right] + exact bot_le + let u : ℂ := (eLpNorm B 3 volume).toReal + let v : ℂ := (eLpNorm C 3 volume).toReal + have hu : ‖u‖ₑ = eLpNorm B 3 volume := by + rw [← ofReal_norm] + simp only [u,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg ENNReal.toReal_nonneg, + ENNReal.ofReal_toReal hB.ne] + have hv : ‖v‖ₑ = eLpNorm C 3 volume := by + rw [← ofReal_norm] + simp only [v,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg ENNReal.toReal_nonneg, + ENNReal.ofReal_toReal hC.ne] + have hu0 : u ≠ 0 := by + intro he + exact hb0 (by simpa only [he,enorm_zero] using hu.symm) + have hv0 : v ≠ 0 := by + intro he + exact hc0 (by simpa only [he,enorm_zero] using hv.symm) + have hiB : MemLp (u⁻¹ • B) 3 volume := hB.const_smul _ + have hiC : MemLp (v⁻¹ • C) 3 volume := hC.const_smul _ + have hnB : eLpNorm (u⁻¹ • B) 3 volume = 1 := by + rw [eLpNorm_const_smul,enorm_inv hu0,hu,ENNReal.inv_mul_cancel hb0 hB.ne] + have hnC : eLpNorm (v⁻¹ • C) 3 volume = 1 := by + rw [eLpNorm_const_smul,enorm_inv hv0,hv,ENNReal.inv_mul_cancel hc0 hC.ne] + calc + cyclicNorm B C = cyclicNorm (u • (u⁻¹ • B)) (v • (v⁻¹ • C)) := by + rw [smul_smul,smul_smul,mul_inv_cancel₀ hu0,mul_inv_cancel₀ hv0,one_smul,one_smul] + _ = (‖u‖ₑ*‖v‖ₑ)*cyclicNorm (u⁻¹ • B) (v⁻¹ • C) := cyclicNorm_smul _ _ _ _ + _ ≤ (‖u‖ₑ*‖v‖ₑ)*(mainConstant : ℝ≥0∞) := by + gcongr + exact cyclicNorm_le_unit _ _ hiB hiC hnB hnC + _ = (mainConstant : ℝ≥0∞)*eLpNorm B 3 volume*eLpNorm C 3 volume := by + rw [hu,hv] + ac_rfl +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/CyclicSlice.lean b/lean/OAI/Analysis/TriangularHilbert/CyclicSlice.lean new file mode 100644 index 0000000000000000000000000000000000000000..08052e4578c3f34b16231517e8e864141b457a86 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/CyclicSlice.lean @@ -0,0 +1,81 @@ +import OAI.Analysis.TriangularHilbert.SampledOutput + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory MeasureTheory.Measure Filter +open scoped Topology +noncomputable section + +def CubicSliceGood (B C : ℝ×ℝ → ℂ) (z : ℝ×ℝ) : Prop := + AEStronglyMeasurable (fun c => B (z.2,c)) volume ∧ + AEStronglyMeasurable (fun c => C (c,z.1)) volume ∧ + Integrable (fun c : ℝ => ‖B (z.2,c)‖^3) ∧ + Integrable (fun c : ℝ => ‖C (c,z.1)‖^3) + +lemma ae_cubicSliceGood (B C : ℝ×ℝ → ℂ) (hB : MemLp B 3 volume) (hC : MemLp C 3 volume) : + ∀ᵐ z : ℝ×ℝ, CubicSliceGood B C z := by + have hb := hB.aestronglyMeasurable.prodMk_left + have hc := hC.aestronglyMeasurable.prodMk_right + have hbi := (hB.integrable_norm_pow (by norm_num : (3:ℕ) ≠ 0)).prod_right_ae + have hci := (hC.integrable_norm_pow (by norm_num : (3:ℕ) ≠ 0)).prod_left_ae + filter_upwards [quasiMeasurePreserving_snd.ae hb,quasiMeasurePreserving_fst.ae hc, + quasiMeasurePreserving_snd.ae hbi,quasiMeasurePreserving_fst.ae hci] with z hzB hzC hiB hiC + exact ⟨hzB,hzC,hiB,hiC⟩ + +lemma hardKernel_shift_support {r R : ℝ} (hr : r ≤ R) (a c : ℝ) + (hc : c ∉ Set.Icc (-(R+|a|)) (R+|a|)) : hardKernel r R (a+c) = 0 := by + have hR : R < |a+c| := by + by_contra hR + apply hc + apply abs_le.mp + have hh : |c| ≤ |a+c|+|a| := by + calc + |c| = |(a+c)-a| := by congr 1; ring + _ ≤ |a+c|+|a| := abs_sub _ _ + linarith [le_of_not_gt hR] + simp only [hardKernel,hr.trans_lt hR,hR,ite_true,sub_self,zero_div] + +lemma CubicSliceGood.integrable_hard {B C : ℝ×ℝ → ℂ} {z : ℝ×ℝ} (hz : CubicSliceGood B C z) + {r R : ℝ} (hr : 0 < r) (hR : r ≤ R) : + Integrable (fun c : ℝ => B (z.2,c)*C (c,z.1)*(hardKernel r R (z.1+z.2+c):ℂ)) := by + apply integrable_product_bounded_kernel _ _ _ hz.1 hz.2.1 + ((measurable_hardKernel _ _).comp (measurable_const.add measurable_id)) hz.2.2.1 hz.2.2.2 + (Eventually.of_forall (fun _ => ⟨le_rfl,le_rfl⟩)) measurableSet_Icc isCompact_Icc.measure_ne_top + (show 0 ≤ 1/r by positivity) (fun c => abs_hardKernel_le hr hR _) + exact hardKernel_shift_support hR (z.1+z.2) + +lemma tendsto_cyclicKernelOutput_of_cubic_dom (B C : ℝ×ℝ → ℂ) (F G : ℕ → ℝ×ℝ → ℂ) + (hF : ∀ n, Continuous (F n)) (hG : ∀ n, Continuous (G n)) + {D E : ℝ×ℝ → ℝ} (hD : Integrable D) (hE : Integrable E) + (hb : ∀ᵐ z : ℝ×ℝ, (∀ n, ‖F n z‖^3 ≤ D z) ∧ Tendsto (fun n => F n z) atTop (𝓝 (B z))) + (hc : ∀ᵐ z : ℝ×ℝ, (∀ n, ‖G n z‖^3 ≤ E z) ∧ Tendsto (fun n => G n z) atTop (𝓝 (C z))) : + ∀ᵐ z : ℝ×ℝ, ∀ r R : ℝ, 0 < r → r ≤ R → + Tendsto (fun n => cyclicKernelOutput (F n) (G n) (hardKernel r R) z) atTop + (𝓝 (cyclicKernelOutput B C (hardKernel r R) z)) := by + have hb' := ae_ae_of_ae_prod hb + have hc' := ae_ae_of_ae_prod (measurePreserving_swap.quasiMeasurePreserving.ae hc) + filter_upwards [quasiMeasurePreserving_snd.ae hb',quasiMeasurePreserving_fst.ae hc', + quasiMeasurePreserving_snd.ae hD.prod_right_ae,quasiMeasurePreserving_fst.ae hE.prod_left_ae] + with z hzb hzc hzD hzE + intro r R hr hR + apply tendsto_integral_product_bounded_kernel _ _ _ _ _ + (s := Set.Icc (-(R+|z.1+z.2|)) (R+|z.1+z.2|)) (L := 1/r) + (fun n => ((hF n).comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable) + (fun n => ((hG n).comp (continuous_id.prodMk continuous_const)).aestronglyMeasurable) + ((measurable_hardKernel _ _).comp (measurable_const.add measurable_id)) hzD hzE + · filter_upwards [hzb,hzc] with c hb hc + exact fun n => ⟨hb.1 n,hc.1 n⟩ + · filter_upwards [hzb,hzc] with c hb hc + exact ⟨hb.2,hc.2⟩ + · exact measurableSet_Icc + · exact isCompact_Icc.measure_ne_top + · exact show 0 ≤ 1/r by positivity + · exact fun c => abs_hardKernel_le hr hR _ + · exact hardKernel_shift_support hR (z.1+z.2) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/DiscreteMax.lean b/lean/OAI/Analysis/TriangularHilbert/DiscreteMax.lean new file mode 100644 index 0000000000000000000000000000000000000000..c95c8dae46843668adf4d51a8e6be39cf5c011de --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/DiscreteMax.lean @@ -0,0 +1,61 @@ +import OAI.Analysis.TriangularHilbert.FiniteDual + +namespace OAI + +universe uι uκ + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section + +def matrixCubic {ι : Type uι} [Fintype ι] (B : Matrix ι ι ℂ) (h : ℝ) : ℝ := ∑ i, ∑ j, h^2*‖B i j‖^3 + +def momentConstant : ℝ := 4*hardPairingConstant*(hardPairingConstant+1) +lemma momentConstant_pos : 0 < momentConstant := by + unfold momentConstant + have hp := hardPairingConstant_pos + positivity + +lemma hardOutput_moment (D : Finset ℤ) (B C : Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + (r R : Matrix D D ℝ) (hr : ∀ i j, h ≤ r i j) (hb : ∀ i j, r i j ≤ R i j) : + (∑ i, ∑ j, h^2*complexMoment (kernelOutput B C h (fun m => h*(m:ℤ)) + (fun i j => hardKernel (r i j) (R i j)) i j)) ≤ + momentConstant*(matrixCubic B h+matrixCubic C h) := by + classical + let u : D×D → ℂ := fun p => kernelOutput B C h (fun m => h*(m:ℤ)) + (fun i j => hardKernel (r i j) (R i j)) p.1 p.2 + have HH (f : D×D → ℂ) : ‖∑ p, (h^2:ℝ)*f p*u p‖ ≤ hardPairingConstant* + ((∑ p, h^2*‖f p‖^3)+(matrixCubic B h+matrixCubic C h)) := by + let A : Three → Matrix D D ℂ := ![fun i j => f (i,j),B,C] + have ha := hardPairing_le D A hh r R hr hb + have hA0 : A 0 = fun i j => f (i,j) := rfl + have hA1 : A 1 = B := rfl + have hA2 : A 2 = C := rfl + simpa only [kernelPairing,arrayCubic,Fin.sum_univ_three,hA0,hA1,hA2, + Fintype.sum_prod_type,matrixCubic,u,add_assoc] using ha + have hh' := finite_cubic_dual u (fun _ => h^2) (fun _ => sq_nonneg h) hardPairingConstant_pos HH + simpa only [Fintype.sum_prod_type,u,complexMoment,momentConstant] using hh' + +lemma finiteHardOutput_moment (D : Finset ℤ) (B C : Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (r R : κ → ℝ) + (hr : ∀ k, h ≤ r k) (hb : ∀ k, r k ≤ R k) : + (∑ i, ∑ j, h^2*finiteMoment (fun k => kernelOutput B C h (fun m => h*(m:ℤ)) + (fun _ _ => hardKernel (r k) (R k)) i j)) ≤ + momentConstant*(matrixCubic B h+matrixCubic C h) := by + classical + let U (i j : D) (k : κ) := kernelOutput B C h (fun m => h*(m:ℤ)) + (fun _ _ => hardKernel (r k) (R k)) i j + choose s hs using (fun i j : D => finiteMoment_eq (U i j)) + have ha := hardOutput_moment D B C hh (fun i j => r (s i j)) (fun i j => R (s i j)) + (fun i j => hr (s i j)) (fun i j => hb (s i j)) + have he (i j : D) : finiteMoment (U i j) = complexMoment (kernelOutput B C h (fun m => h*(m:ℤ)) + (fun i j => hardKernel (r (s i j)) (R (s i j))) i j) := hs i j + simp_rw [← he] at ha + exact ha +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/DiscretePairing.lean b/lean/OAI/Analysis/TriangularHilbert/DiscretePairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..a10ce5932cc7aae3066d893024a9de3e1cea6dd2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/DiscretePairing.lean @@ -0,0 +1,55 @@ +import OAI.Analysis.TriangularHilbert.SelectedScale + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] + +def kernelOutput (B C : Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (K : ι → ι → ℝ → ℝ) (i j : ι) : ℂ := + ∑ k, (h:ℂ)*B j k*C k i*(K i j (u i+u j+u k):ℂ) + +def kernelPairing (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (K : ι → ι → ℝ → ℝ) : ℂ := + ∑ i, ∑ j, (h^2:ℝ)*A 0 i j*kernelOutput (A 1) (A 2) h u K i j + +lemma kernelPairing_eq (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (K : ι → ι → ℝ → ℝ) : + kernelPairing A h u K = ∑ i, ∑ j, ∑ k, (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)*(K i j (u i+u j+u k):ℂ) := by + simp only [kernelPairing,kernelOutput,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + push_cast + ring + +lemma kernelPairing_add (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (K L : ι → ι → ℝ → ℝ) : + kernelPairing A h u (fun i j t => K i j t+L i j t) = kernelPairing A h u K+kernelPairing A h u L := by + simp only [kernelPairing_eq,Complex.ofReal_add,mul_add,Finset.sum_add_distrib] + +lemma kernelPairing_const_mul (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (K : ι → ι → ℝ → ℝ) (c : ℝ) : + kernelPairing A h u (fun i j t => c*K i j t) = (c:ℂ)*kernelPairing A h u K := by + simp only [kernelPairing_eq,Complex.ofReal_mul,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + ring + +lemma kernelPairing_smooth [DecidableEq ι] (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (a b : Matrix ι ι ℝ) : + kernelPairing A h u (fun i j => smoothKernel (a i j) (b i j)) = selectedSum A h u a b := by + rw [kernelPairing_eq] + rfl +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/DissipationAlgebra.lean b/lean/OAI/Analysis/TriangularHilbert/DissipationAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..841fa6f2d721a7d44b8752c260229d71ba2a15a2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/DissipationAlgebra.lean @@ -0,0 +1,59 @@ +import OAI.Analysis.TriangularHilbert.PlaneTime + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped BigOperators + +lemma finite_cost_dissipation (α : Three → ℝ) (hα : ∀ w, 0 ≤ α w) + (K : Three → Three → ℝ) (Z : Three → ℝ) (hK : ∀ v w, 0 ≤ K v w) + (hrow : ∀ v, 2*Z v ≤ ∑ w, if w = v then 0 else K v w) + (hcol : ∀ w, (∑ v, if v = w then 0 else K v w) ≤ Real.sqrt 2 * K w w) : + (∑ v, ((∑ w, α w)*Z v - (∑ w, α w*K v w))) ≤ + ∑ w, (-α w + Real.sqrt 2 * max 0 ((∑ v, α v)/2-α w))*K w w := by + let S := ∑ w, α w + have hS : 0 ≤ S := Finset.sum_nonneg (fun w _ => hα w) + have hr v : S*Z v ≤ S/2 * ∑ w, if w = v then 0 else K v w := by + have hh := mul_le_mul_of_nonneg_left (hrow v) (show 0 ≤ S/2 by positivity) + nlinarith + have hc w : (S/2-α w)*(∑ v, if v = w then 0 else K v w) ≤ + Real.sqrt 2 * max 0 (S/2-α w)*K w w := by + have ho : 0 ≤ ∑ v, if v = w then 0 else K v w := + Finset.sum_nonneg (fun v _ => by split_ifs; exact le_refl 0; exact hK v w) + calc + _ ≤ max 0 (S/2-α w)*(∑ v, if v = w then 0 else K v w) := + mul_le_mul_of_nonneg_right (le_max_right _ _) ho + _ ≤ max 0 (S/2-α w)*(Real.sqrt 2*K w w) := + mul_le_mul_of_nonneg_left (hcol w) (le_max_left _ _) + _ = _ := by ring + calc + _ ≤ ∑ v, (S/2*(∑ w, if w = v then 0 else K v w) - (∑ w, α w*K v w)) := by + apply Finset.sum_le_sum + intro v _ + exact sub_le_sub_right (hr v) _ + _ = ∑ w, (-α w*K w w + (S/2-α w)*(∑ v, if v = w then 0 else K v w)) := by + simp [Fin.sum_univ_three] + ring + _ ≤ ∑ w, (-α w*K w w + Real.sqrt 2 * max 0 (S/2-α w)*K w w) := by + apply Finset.sum_le_sum + intro w _ + exact add_le_add (le_refl _) (hc w) + _ = _ := by + apply Finset.sum_congr rfl + intro w _ + dsimp [S] + ring + +lemma offdiag_sum_eq (f : Three → ℝ) (v : Three) : + (∑ w, if w = v then 0 else f w) = f (v+1)+f (v+2) := by + fin_cases v <;> simp [Fin.sum_univ_three, add_comm] + +lemma neighbor_one_ne (v : Three) : v+1 ≠ v := by fin_cases v <;> decide +lemma neighbor_two_ne (v : Three) : v+2 ≠ v := by fin_cases v <;> decide +lemma neighbors_ne (v : Three) : v+1 ≠ v+2 := by fin_cases v <;> decide +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/EndpointContinuity.lean b/lean/OAI/Analysis/TriangularHilbert/EndpointContinuity.lean new file mode 100644 index 0000000000000000000000000000000000000000..17041fa2e6aea037dd74d856ad1c634b2a43fa97 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/EndpointContinuity.lean @@ -0,0 +1,92 @@ +import OAI.Analysis.TriangularHilbert.CyclicSlice + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma continuousAt_threshold (u v : ℝ) (hu : u ≠ v) : + ContinuousAt (fun r : ℝ => if r < v then (1:ℝ) else 0) u := by + rcases lt_or_gt_of_ne hu with h|h + · have he : ∀ᶠ r in 𝓝 u, r < v := eventually_lt_nhds h + apply (show ContinuousAt (fun _ : ℝ => (1:ℝ)) u from continuousAt_const).congr_of_eventuallyEq + filter_upwards [he] with r hr + simp only [hr,ite_true] + · have he : ∀ᶠ r in 𝓝 u, v < r := eventually_gt_nhds h + apply (show ContinuousAt (fun _ : ℝ => (0:ℝ)) u from continuousAt_const).congr_of_eventuallyEq + filter_upwards [he] with r hr + simp only [not_lt.mpr hr.le,ite_false] + +lemma continuousAt_hardKernel_endpoints (r R t : ℝ) (hr : r ≠ |t|) (hR : R ≠ |t|) : + ContinuousAt (fun p : ℝ×ℝ => hardKernel p.1 p.2 t) (r,R) := by + have h1 : ContinuousAt (fun p : ℝ×ℝ => if p.1 < |t| then (1:ℝ) else 0) (r,R) := by + simpa only [Function.comp_def] using (continuousAt_threshold r |t| hr).comp (continuousAt_fst (p := (r,R))) + have h2 : ContinuousAt (fun p : ℝ×ℝ => if p.2 < |t| then (1:ℝ) else 0) (r,R) := by + simpa only [Function.comp_def] using (continuousAt_threshold R |t| hR).comp (continuousAt_snd (p := (r,R))) + exact (h1.sub h2).div_const t + +lemma ae_continuousAt_hardKernel_endpoints (r R a : ℝ) : + ∀ᵐ c : ℝ, ContinuousAt (fun p : ℝ×ℝ => hardKernel p.1 p.2 (a+c)) (r,R) := by + have hne (x : ℝ) : ∀ᵐ c : ℝ, c ≠ x := by simp [ae_iff] + filter_upwards [hne (r-a),hne (-r-a),hne (R-a),hne (-R-a)] with c h1 h2 h3 h4 + apply continuousAt_hardKernel_endpoints + · intro he + rcases eq_or_eq_neg_of_abs_eq he.symm with he|he + · apply h1; linarith + · apply h2; linarith + · intro he + rcases eq_or_eq_neg_of_abs_eq he.symm with he|he + · apply h3; linarith + · apply h4; linarith + +lemma continuousAt_cyclicHard {B C : ℝ×ℝ → ℂ} {z : ℝ×ℝ} (hz : CubicSliceGood B C z) + {r R : ℝ} (hr : 0 < r) (hR : r < R) : + ContinuousAt (fun p : ℝ×ℝ => cyclicKernelOutput B C (hardKernel p.1 p.2) z) (r,R) := by + let s := Set.Icc (-(R+1+|z.1+z.2|)) (R+1+|z.1+z.2|) + let L := 1/(r/2) + have hL : 0 ≤ L := by dsimp [L]; positivity + let D (c : ℝ) := ‖B (z.2,c)‖^3 + let E (c : ℝ) := ‖C (c,z.1)‖^3 + have hdom : Integrable (s.indicator (fun c => (D c+E c+2)*L)) := + IntegrableOn.integrable_indicator + (((hz.2.2.1.integrableOn.add hz.2.2.2.integrableOn).add + (integrableOn_const (C := (2:ℝ)) isCompact_Icc.measure_ne_top)).mul_const L) measurableSet_Icc + have hnear : ∀ᶠ p : ℝ×ℝ in 𝓝 (r,R), r/2 < p.1 ∧ p.1 < p.2 ∧ p.2 < R+1 := by + have h1 : ∀ᶠ p : ℝ×ℝ in 𝓝 (r,R), r/2 < p.1 := + (continuous_fst.tendsto (r,R)) (eventually_gt_nhds (show r/2 < r by linarith)) + have h2 : ∀ᶠ p : ℝ×ℝ in 𝓝 (r,R), 0 < p.2-p.1 := + ((continuous_snd.sub continuous_fst).tendsto (r,R)) (eventually_gt_nhds (show 0 < R-r by linarith)) + have h3 : ∀ᶠ p : ℝ×ℝ in 𝓝 (r,R), p.2 < R+1 := + (continuous_snd.tendsto (r,R)) (eventually_lt_nhds (show R < R+1 by linarith)) + filter_upwards [h1,h2,h3] with p hp1 hp2 hp3 + exact ⟨hp1,by linarith,hp3⟩ + + apply tendsto_integral_filter_of_dominated_convergence (s.indicator (fun c => (D c+E c+2)*L)) + · exact Eventually.of_forall (fun p => (hz.1.mul hz.2.1).mul + (Complex.continuous_ofReal.comp_aestronglyMeasurable + (((measurable_hardKernel _ _).comp (measurable_const.add measurable_id)).aestronglyMeasurable))) + · filter_upwards [hnear] with p hp + filter_upwards [] with c + by_cases hc : c ∈ s + · rw [Set.indicator_of_mem hc] + exact norm_product_kernel_le (fun c => B (z.2,c)) (fun c => C (c,z.1)) + (fun c => hardKernel p.1 p.2 (z.1+z.2+c)) (D := D) (E := E) hL (c := c) le_rfl le_rfl + ((abs_hardKernel_le (by linarith [hp.1]) hp.2.1.le _).trans + (one_div_le_one_div_of_le (by positivity) hp.1.le)) + · have he : hardKernel p.1 p.2 (z.1+z.2+c) = 0 := by + apply hardKernel_shift_support hp.2.1.le + intro hh + apply hc + exact ⟨by linarith [hh.1,hp.2.2],by linarith [hh.2,hp.2.2]⟩ + simp only [he,Complex.ofReal_zero,mul_zero,norm_zero,Set.indicator_of_notMem hc,le_refl] + · exact hdom + · filter_upwards [ae_continuousAt_hardKernel_endpoints r R (z.1+z.2)] with c hc + exact tendsto_const_nhds.mul (Complex.continuous_ofReal.continuousAt.tendsto.comp hc.tendsto) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/ErrorEnvelope.lean b/lean/OAI/Analysis/TriangularHilbert/ErrorEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f31576404bc6c9a1d5eed0cd5ee1ba0439bc8f1 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/ErrorEnvelope.lean @@ -0,0 +1,118 @@ +import OAI.Analysis.TriangularHilbert.SmoothFormula + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +def errorProfile (v : ℝ) : ℝ := kernelProfile v - if 1 < |v| then kernelConstant else 0 + +def endpointError (r t : ℝ) : ℝ := errorProfile (t/r)/t + +lemma kernelProfile_zero : kernelProfile 0 = 0 := by + unfold kernelProfile kernelConstant + ring + +lemma profile_contDiff : ContDiff ℝ 1 kernelProfile := by + unfold kernelProfile density + fun_prop + +lemma density_three_six (v : ℝ) : + density 3 v = Real.sqrt 2*Real.exp (-v^2/12)*density 6 v := by + have hp : Real.sqrt (2*Real.pi*3) ≠ 0 := by positivity + have h2 : Real.sqrt (2:ℝ) ≠ 0 := by positivity + unfold density + rw [show 2*Real.pi*6 = 2*(2*Real.pi*3) by ring,Real.sqrt_mul (by norm_num : (0:ℝ)≤2)] + have he : -v^2/(2*3) = -v^2/12 + -v^2/(2*6) := by ring + rw [he,Real.exp_add] + field_simp + +lemma polynomial_exp_le (v : ℝ) : (v^2/9+1/3)*Real.exp (-v^2/12) ≤ 5/3 := by + have ha := Real.add_one_le_exp (v^2/12) + have he : Real.exp (v^2/12)*Real.exp (-v^2/12) = 1 := by + rw [← Real.exp_add,show v^2/12+-v^2/12=0 by ring,Real.exp_zero] + have hm := mul_le_mul_of_nonneg_right ha (Real.exp_pos (-v^2/12)).le + rw [he] at hm + have hle : Real.exp (-v^2/12) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith [sq_nonneg v]) + nlinarith + +lemma errorProfile_exists_bound : ∃ K : ℝ, 0 < K ∧ ∀ v, + |errorProfile v| ≤ K*|v| *density 6 v := by + obtain ⟨L,hL⟩ := profile_contDiff.contDiffOn.exists_lipschitzOnWith + (by norm_num : (1:WithTop ℕ∞) ≠ 0) (convex_Icc (-1:ℝ) 1) (isCompact_Icc (a := (-1:ℝ)) (b := 1)) + let K : ℝ := (L:ℝ)/density 6 1 + 10*Real.sqrt 2 + have hd : 0 < density 6 1 := density_pos (by norm_num) 1 + have hK : 0 < K := add_pos_of_nonneg_of_pos (div_nonneg L.coe_nonneg hd.le) (by positivity) + refine ⟨K,hK,fun v => ?_⟩ + by_cases hv : 1 < |v| + · have he : errorProfile v = -2*(v^2/9-1/3)*density 3 v := by + unfold errorProfile kernelProfile + rw [ite_eq_left hv] + ring + have hab : |v^2/9-1/3| ≤ v^2/9+1/3 := by + exact abs_le.mpr ⟨by nlinarith [sq_nonneg v],by linarith⟩ + have hb : |errorProfile v| ≤ (10/3)*Real.sqrt 2*density 6 v := by + rw [he,abs_mul,abs_mul,abs_of_nonneg (density_nonneg (by norm_num) v)] + norm_num only [abs_neg] + calc + _ ≤ 2*(v^2/9+1/3)*density 3 v := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hab (by norm_num)) (density_nonneg (by norm_num) v) + _ = 2*Real.sqrt 2*((v^2/9+1/3)*Real.exp (-v^2/12))*density 6 v := by rw [density_three_six]; ring + _ ≤ 2*Real.sqrt 2*(5/3)*density 6 v := by + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (polynomial_exp_le v) (by positivity)) (density_nonneg (by norm_num) v) + _ = _ := by ring + apply hb.trans + have hk : 10*Real.sqrt 2 ≤ K := le_add_of_nonneg_left (div_nonneg L.coe_nonneg hd.le) + apply mul_le_mul_of_nonneg_right _ (density_nonneg (by norm_num) v) + calc + (10/3)*Real.sqrt 2 ≤ 10*Real.sqrt 2 := by gcongr; norm_num + _ ≤ K := hk + _ ≤ K*|v| := le_mul_of_one_le_right hK.le hv.le + · have hv' : |v| ≤ 1 := le_of_not_gt hv + have hmem : v ∈ Set.Icc (-1:ℝ) 1 := abs_le.mp hv' + have hb : |kernelProfile v| ≤ (L:ℝ)*|v| := by + have hh := hL.dist_le_mul v hmem 0 (by constructor <;> norm_num) + simpa only [Real.dist_eq,kernelProfile_zero,sub_zero] using hh + have hden : density 6 1 ≤ density 6 v := by + unfold density + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Real.exp_le_exp.mpr + have hs : v^2 ≤ 1 := by nlinarith [sq_abs v,abs_nonneg v] + nlinarith + unfold errorProfile + rw [ite_eq_right hv,sub_zero] + apply hb.trans + have hk : (L:ℝ) ≤ K*density 6 v := by + calc + (L:ℝ) = ((L:ℝ)/density 6 1)*density 6 1 := (div_mul_cancel₀ _ hd.ne').symm + _ ≤ ((L:ℝ)/density 6 1)*density 6 v := mul_le_mul_of_nonneg_left hden (div_nonneg L.coe_nonneg hd.le) + _ ≤ K*density 6 v := mul_le_mul_of_nonneg_right + (le_add_of_nonneg_right (by positivity)) (density_nonneg (by norm_num) v) + nlinarith [mul_le_mul_of_nonneg_right hk (abs_nonneg v)] + +def envelopeConstant : ℝ := errorProfile_exists_bound.choose +lemma envelopeConstant_pos : 0 < envelopeConstant := errorProfile_exists_bound.choose_spec.1 +lemma errorProfile_bound (v : ℝ) : |errorProfile v| ≤ envelopeConstant*|v| *density 6 v := + errorProfile_exists_bound.choose_spec.2 v + +lemma endpointError_bound {r : ℝ} (hr : 0 < r) (t : ℝ) : + |endpointError r t| ≤ envelopeConstant*density (6*r^2) t := by + by_cases ht : t = 0 + · subst t + simp only [endpointError,div_zero,abs_zero] + exact mul_nonneg envelopeConstant_pos.le (density_nonneg (by positivity) _) + have hd := density_dilation (sq_pos_of_pos hr) (by norm_num : (0:ℝ)<6) t + rw [Real.sqrt_sq hr.le] at hd + unfold endpointError + rw [abs_div] + apply (div_le_div_of_nonneg_right (errorProfile_bound (t/r)) (abs_nonneg t)).trans_eq + rw [abs_div,abs_of_pos hr,hd] + field_simp + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/ErrorPairing.lean b/lean/OAI/Analysis/TriangularHilbert/ErrorPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..129ab859f4bb003afd2c5bdacf87507220f147fd --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/ErrorPairing.lean @@ -0,0 +1,89 @@ +import OAI.Analysis.TriangularHilbert.ErrorEnvelope + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section + +lemma errorOutput_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + (r : Matrix D D ℝ) (hr : ∀ i j, h ≤ r i j) (i j : D) : + ‖kernelOutput (A 1) (A 2) h (fun m => h*(m:ℤ)) (fun a b => endpointError (r a b)) i j‖ ≤ + envelopeConstant*meshMassConstant*jumpMax D A i j := by + have hri := hh.trans_le (hr i j) + have hs : h^2 ≤ 6*(r i j)^2 := by have hr' := hr i j; nlinarith [sq_nonneg (r i j),sq_nonneg h] + have hed (k : D) : h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ) = h*((((k:ℤ)-(-(i:ℤ)-(j:ℤ))):ℤ):ℝ) := by + push_cast + ring + have h1 := gaussian_sum_le_lineMax D (fun k => ‖A 1 j k‖^2) (fun _ => sq_nonneg _) hh hs (-(i:ℤ)-(j:ℤ)) + have h2 := gaussian_sum_le_lineMax D (fun k => ‖A 2 k i‖^2) (fun _ => sq_nonneg _) hh hs (-(i:ℤ)-(j:ℤ)) + simp_rw [← hed] at h1 h2 + unfold kernelOutput + apply (norm_sum_le _ _).trans + calc + _ ≤ ∑ k, envelopeConstant*(‖A 1 j k‖^2+‖A 2 k i‖^2)* + (h*density (6*(r i j)^2) (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ))) := by + apply Finset.sum_le_sum + intro k _ + simp only [norm_mul,Complex.norm_real,Real.norm_of_nonneg hh.le,Real.norm_eq_abs] + have hp : ‖A 1 j k‖*‖A 2 k i‖ ≤ ‖A 1 j k‖^2+‖A 2 k i‖^2 := by nlinarith [sq_nonneg (‖A 1 j k‖-‖A 2 k i‖)] + have hg := endpointError_bound hri (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ)) + calc + _ ≤ h*‖A 1 j k‖*‖A 2 k i‖*(envelopeConstant*density (6*(r i j)^2) (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ))) := by gcongr + _ = envelopeConstant*(‖A 1 j k‖*‖A 2 k i‖)*(h*density (6*(r i j)^2) (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ))) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hp envelopeConstant_pos.le) + (mul_nonneg hh.le (density_nonneg (by positivity) _)) + _ = envelopeConstant*((∑ k, ‖A 1 j k‖^2*(h*density (6*(r i j)^2) (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ))))+ + (∑ k, ‖A 2 k i‖^2*(h*density (6*(r i j)^2) (h*(i:ℤ)+h*(j:ℤ)+h*(k:ℤ))))) := by + simp only [mul_assoc,mul_add,add_mul,Finset.mul_sum,Finset.sum_add_distrib] + _ ≤ envelopeConstant*(meshMassConstant*lineMax D (fun k => ‖A 1 j k‖^2) (-(i:ℤ)-(j:ℤ))+ + meshMassConstant*lineMax D (fun k => ‖A 2 k i‖^2) (-(i:ℤ)-(j:ℤ))) := + mul_le_mul_of_nonneg_left (add_le_add h1 h2) envelopeConstant_pos.le + _ ≤ _ := by + unfold jumpMax + have h0 := lineMax_nonneg D (fun k => ‖A 0 i k‖^2) (fun _ => sq_nonneg _) (j:ℤ) + have h3 := lineMax_nonneg D (fun k => ‖A 0 k j‖^2) (fun _ => sq_nonneg _) (i:ℤ) + have hC := envelopeConstant_pos + have hM := meshMassConstant_pos + nlinarith [mul_nonneg (mul_nonneg hC.le hM.le) h0,mul_nonneg (mul_nonneg hC.le hM.le) h3] + +def errorPairingConstant : ℝ := envelopeConstant*meshMassConstant*jumpScalarConstant +lemma errorPairingConstant_pos : 0 < errorPairingConstant := + mul_pos (mul_pos envelopeConstant_pos meshMassConstant_pos) jumpScalarConstant_pos + +lemma errorPairing_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + (r : Matrix D D ℝ) (hr : ∀ i j, h ≤ r i j) : + ‖kernelPairing A h (fun m => h*(m:ℤ)) (fun i j => endpointError (r i j))‖ ≤ + errorPairingConstant*arrayCubic A h := by + unfold kernelPairing + apply (norm_sum_le _ _).trans + calc + _ ≤ ∑ i, ∑ j, h^2*‖A 0 i j‖*(envelopeConstant*meshMassConstant*jumpMax D A i j) := by + apply Finset.sum_le_sum + intro i _ + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro j _ + simp only [norm_mul,Complex.norm_real,Real.norm_of_nonneg (sq_nonneg h)] + exact mul_le_mul_of_nonneg_left (errorOutput_le D A hh r hr i j) (by positivity) + _ = envelopeConstant*meshMassConstant*h^2*(∑ i, ∑ j, ‖A 0 i j‖*jumpMax D A i j) := by + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + ring + _ ≤ envelopeConstant*meshMassConstant*h^2*(jumpScalarConstant*(∑ v,∑ i,∑ j,‖A v i j‖^3)) := + mul_le_mul_of_nonneg_left (sum_jumpMax_le D A) (mul_nonneg (mul_nonneg envelopeConstant_pos.le meshMassConstant_pos.le) (sq_nonneg h)) + _ = _ := by + unfold errorPairingConstant arrayCubic + simp only [← Finset.mul_sum] + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/FiniteAbel.lean b/lean/OAI/Analysis/TriangularHilbert/FiniteAbel.lean new file mode 100644 index 0000000000000000000000000000000000000000..23dcb6e6283ba27bb517e022f00a8d5747dd77d5 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/FiniteAbel.lean @@ -0,0 +1,71 @@ +import OAI.Analysis.TriangularHilbert.IntMax + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert +open scoped BigOperators + +lemma descending_layer_identity (g : ℕ → ℝ) (k N : ℕ) (hk : k ≤ N) : + g k = g N + ∑ r ∈ Finset.range N, if k ≤ r then g r-g (r+1) else 0 := by + induction N with + | zero => + have he : k = 0 := by omega + subst k + simp + | succ N ih => + rw [Finset.sum_range_succ] + by_cases hkN : k ≤ N + · rw [ite_eq_left hkN] + linarith [ih hkN] + · have he : k = N+1 := by omega + subst k + have hs : (∑ r ∈ Finset.range N, if N+1 ≤ r then g r-g (r+1) else 0) = 0 := by + apply Finset.sum_eq_zero + intro r hr + rw [ite_eq_right (by have := Finset.mem_range.mp hr; omega)] + rw [hs,ite_eq_right (by omega)] + ring + +lemma weighted_prefix_identity {κ : Type uκ} (s : Finset κ) (d : κ → ℕ) (a : κ → ℝ) + (g : ℕ → ℝ) (N : ℕ) (hd : ∀ i ∈ s, d i ≤ N) : + (∑ i ∈ s, a i*g (d i)) = g N*(∑ i ∈ s, a i) + + ∑ r ∈ Finset.range N, (g r-g (r+1)) * ∑ i ∈ s.filter (fun i => d i ≤ r), a i := by + classical + calc + _ = ∑ i ∈ s, a i*(g N+∑ r ∈ Finset.range N, if d i ≤ r then g r-g (r+1) else 0) := + Finset.sum_congr rfl (fun i hi => congrArg (a i*·) (descending_layer_identity g (d i) N (hd i hi))) + _ = g N*(∑ i ∈ s, a i) + ∑ r ∈ Finset.range N, ∑ i ∈ s, a i*(if d i ≤ r then g r-g (r+1) else 0) := by + simp_rw [mul_add,Finset.mul_sum] + rw [Finset.sum_add_distrib,Finset.sum_comm] + congr 1 + simp_rw [mul_comm (g N)] + _ = _ := by + congr 1 + apply Finset.sum_congr rfl + intro r _ + rw [Finset.mul_sum,Finset.sum_filter] + apply Finset.sum_congr rfl + intro i _ + split_ifs <;> ring + +lemma weighted_prefix_le {κ : Type uκ} (s : Finset κ) (d : κ → ℕ) (a b : κ → ℝ) + (g : ℕ → ℝ) (N : ℕ) (hd : ∀ i ∈ s, d i ≤ N) (hg : 0 ≤ g N) + (hdec : ∀ r < N, g (r+1) ≤ g r) + (hp : ∀ r ≤ N, (∑ i ∈ s.filter (fun i => d i ≤ r), a i) ≤ ∑ i ∈ s.filter (fun i => d i ≤ r), b i) : + (∑ i ∈ s, a i*g (d i)) ≤ ∑ i ∈ s, b i*g (d i) := by + classical + rw [weighted_prefix_identity s d a g N hd,weighted_prefix_identity s d b g N hd] + apply add_le_add + · have he : s.filter (fun i => d i ≤ N) = s := Finset.filter_eq_self.mpr hd + have ht := hp N le_rfl + rw [he] at ht + exact mul_le_mul_of_nonneg_left ht hg + · exact Finset.sum_le_sum (fun r hr => mul_le_mul_of_nonneg_left + (hp r (Finset.mem_range.mp hr).le) (sub_nonneg.mpr (hdec r (Finset.mem_range.mp hr)))) +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/FiniteDual.lean b/lean/OAI/Analysis/TriangularHilbert/FiniteDual.lean new file mode 100644 index 0000000000000000000000000000000000000000..15289188d80f605cd28fc86692fa3ef27ff24efb --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/FiniteDual.lean @@ -0,0 +1,83 @@ +import OAI.Analysis.TriangularHilbert.SampledMoment + +namespace OAI + +universe uι + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +def dualRoot (z : ℂ) : ℂ := (Real.sqrt ‖z‖:ℂ)*star z/(‖z‖:ℂ) + +lemma dualRoot_mul (z : ℂ) : dualRoot z*z = (‖z‖*Real.sqrt ‖z‖:ℝ) := by + by_cases hz : z = 0 + · subst z + simp [dualRoot] + have hn : (‖z‖:ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (norm_ne_zero_iff.mpr hz) + unfold dualRoot + rw [div_mul_eq_mul_div, mul_assoc, RCLike.star_def,Complex.conj_mul'] + push_cast + field_simp + +lemma norm_dualRoot (z : ℂ) : ‖dualRoot z‖ = Real.sqrt ‖z‖ := by + by_cases hz : z = 0 + · subst z + simp [dualRoot] + unfold dualRoot + rw [norm_div,norm_mul,norm_star,Complex.norm_real,Real.norm_of_nonneg (Real.sqrt_nonneg _), + Complex.norm_real,Real.norm_of_nonneg (norm_nonneg _),mul_div_cancel_right₀ _ (norm_ne_zero_iff.mpr hz)] + +lemma cube_norm_dualRoot (z : ℂ) : ‖dualRoot z‖^3 = ‖z‖*Real.sqrt ‖z‖ := by + rw [norm_dualRoot,pow_succ,Real.sq_sqrt (norm_nonneg _)] + +lemma finite_cubic_dual {ι : Type uι} [Fintype ι] (u : ι → ℂ) (w : ι → ℝ) + (hw : ∀ i, 0 ≤ w i) {K b : ℝ} (hK : 0 < K) + (H : ∀ f : ι → ℂ, ‖∑ i, (w i:ℂ)*f i*u i‖ ≤ K*((∑ i, w i*‖f i‖^3)+b)) : + (∑ i, w i*(‖u i‖*Real.sqrt ‖u i‖)) ≤ 4*K*(K+1)*b := by + let d : ℝ := 1/(2*(K+1)) + let m : ℝ := ∑ i, w i*(‖u i‖*Real.sqrt ‖u i‖) + have hd : 0 < d := by dsimp [d]; positivity + have hm : 0 ≤ m := Finset.sum_nonneg (fun i _ => mul_nonneg (hw i) (by positivity)) + have hd1 : d ≤ 1 := by + dsimp [d] + rw [div_le_one (by positivity)] + linarith + have hk1 : K*d ≤ 1/2 := by + dsimp [d] + rw [← mul_div_assoc, mul_one,div_le_iff₀ (by positivity)] + linarith + have hk2 : K*d^3 ≤ d/2 := by + have ha := mul_le_mul_of_nonneg_right hk1 (sq_nonneg d) + nlinarith [mul_le_mul_of_nonneg_left hd1 hd.le] + let f : ι → ℂ := fun i => (d:ℂ)*dualRoot (u i) + have hprod (i : ι) : (w i:ℂ)*f i*u i = (d*(w i*(‖u i‖*Real.sqrt ‖u i‖)):ℝ) := by + dsimp [f] + rw [mul_assoc,mul_assoc,dualRoot_mul] + push_cast + ring + have hnorm (i : ι) : w i*‖f i‖^3 = d^3*(w i*(‖u i‖*Real.sqrt ‖u i‖)) := by + dsimp [f] + rw [norm_mul,Complex.norm_real,Real.norm_of_nonneg hd.le,mul_pow,cube_norm_dualRoot] + ring + have hp : (∑ i, (w i:ℂ)*f i*u i) = (d*m:ℝ) := by + simp_rw [hprod] + rw [← Complex.ofReal_sum,← Finset.mul_sum] + have ha := H f + rw [hp,Complex.norm_real,Real.norm_of_nonneg (mul_nonneg hd.le hm)] at ha + simp_rw [hnorm] at ha + rw [← Finset.mul_sum] at ha + change d*m ≤ K*(d^3*m+b) at ha + have hb : m ≤ (2*K/d)*b := by + rw [div_mul_eq_mul_div,le_div_iff₀ hd] + nlinarith [mul_le_mul_of_nonneg_right hk2 hm] + apply hb.trans_eq + dsimp [d] + field_simp + ring +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/FiniteLineMax.lean b/lean/OAI/Analysis/TriangularHilbert/FiniteLineMax.lean new file mode 100644 index 0000000000000000000000000000000000000000..c471481dd3cc7540ae475f662a07e8bca67a5990 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/FiniteLineMax.lean @@ -0,0 +1,78 @@ +import OAI.Analysis.TriangularHilbert.GaussianRadial + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +def lineExtend (D : Finset ℤ) (f : D → ℝ) (n : ℤ) : ℝ := + if hn : n ∈ D then f ⟨n,hn⟩ else 0 + +lemma lineExtend_apply (D : Finset ℤ) (f : D → ℝ) (n : D) : lineExtend D f n = f n := by + simp only [lineExtend,dite_eq_left n.property] + +lemma sum_lineExtend (D : Finset ℤ) (f : D → ℝ) (g : ℤ → ℝ) : + (∑ n ∈ D, lineExtend D f n*g n) = ∑ n : D, f n*g n := by + rw [← Finset.sum_coe_sort] + simp only [lineExtend_apply] + +def lineMax (D : Finset ℤ) (f : D → ℝ) (n : ℤ) : ℝ := intMax D (lineExtend D f) n + +lemma lineMax_nonneg (D : Finset ℤ) (f : D → ℝ) (hf : ∀ m, 0 ≤ f m) (n : ℤ) : + 0 ≤ lineMax D f n := by + exact intMax_nonneg D (lineExtend D f) (fun m hm => by simpa only [lineExtend,dite_eq_left hm] using hf ⟨m,hm⟩) n + +lemma lineMax_strong (D : Finset ℤ) (f : D → ℝ) (hf : ∀ m, 0 ≤ f m) + {κ : Type uκ} [Fintype κ] (u : κ → ℤ) (hu : Function.Injective u) : + (∑ n, lineMax D f (u n)*Real.sqrt (lineMax D f (u n))) ≤ + 18*Real.sqrt 2 * ∑ m : D, f m*Real.sqrt (f m) := by + classical + have hi := intMax_strong D (Finset.univ.image u) (lineExtend D f) + (fun m hm => by simpa only [lineExtend,dite_eq_left hm] using hf ⟨m,hm⟩) + rw [Finset.sum_image (fun _ _ _ _ h => hu h)] at hi + rw [← Finset.sum_coe_sort D (fun m => lineExtend D f m*Real.sqrt (lineExtend D f m))] at hi + simpa only [lineMax,lineExtend_apply] using hi + +lemma gaussian_sum_le_lineMax (D : Finset ℤ) (f : D → ℝ) (hf : ∀ m, 0 ≤ f m) + {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (n : ℤ) : + (∑ m : D, f m*(h*Heat.density σ (h*((m-n:ℤ):ℝ)))) ≤ Heat.meshMassConstant*lineMax D f n := by + have hi := Heat.gaussian_sum_le_intMax D (lineExtend D f) + (fun m hm => by simpa only [lineExtend,dite_eq_left hm] using hf ⟨m,hm⟩) hh hσ n + rw [sum_lineExtend] at hi + exact hi + +lemma cubic_young {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + a*b ≤ (a^3+2*b*Real.sqrt b)/3 := by + have hs := Real.sq_sqrt hb + have hnn : 0 ≤ (a-Real.sqrt b)^2*(a+2*Real.sqrt b) := + mul_nonneg (sq_nonneg _) (by positivity) + have hs3 : (Real.sqrt b)^3 = b*Real.sqrt b := by rw [pow_succ,hs] + have ha2 : a*(Real.sqrt b)^2 = a*b := by rw [hs] + nlinarith only [hnn,hs3,ha2] + +lemma sum_abs_sq_sqrt {κ : Type uκ} [Fintype κ] (f : κ → ℂ) : + (∑ m, ‖f m‖^2*Real.sqrt (‖f m‖^2)) = ∑ m, ‖f m‖^3 := by + apply Finset.sum_congr rfl + intro m _ + rw [Real.sqrt_sq (norm_nonneg _)]; ring + +lemma lineMax_scalar_product_bound (D : Finset ℤ) (f : D → ℂ) + {κ : Type uκ} [Fintype κ] (u : κ → ℤ) (hu : Function.Injective u) (a : κ → ℝ) + (ha : ∀ i, 0 ≤ a i) : + (∑ i, a i*lineMax D (fun m => ‖f m‖^2) (u i)) ≤ + ((∑ i, a i^3)+36*Real.sqrt 2*(∑ m, ‖f m‖^3))/3 := by + have hs := Finset.sum_le_sum (fun i (_ : i ∈ (Finset.univ : Finset κ)) => + cubic_young (ha i) (lineMax_nonneg D (fun m => ‖f m‖^2) (fun m => sq_nonneg _) (u i))) + have hm := lineMax_strong D (fun m => ‖f m‖^2) (fun m => sq_nonneg _) u hu + rw [sum_abs_sq_sqrt] at hm + simp only [mul_assoc,← Finset.sum_div,Finset.sum_add_distrib,← Finset.mul_sum] at hs + linarith +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/FiniteMoment.lean b/lean/OAI/Analysis/TriangularHilbert/FiniteMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..462b89fafe5742f9aed59ce1d02b31c47de544f0 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/FiniteMoment.lean @@ -0,0 +1,46 @@ +import OAI.Analysis.TriangularHilbert.SampledConvergence + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology BigOperators +noncomputable section + +def complexMoment (z : ℂ) : ℝ := ‖z‖*Real.sqrt ‖z‖ +lemma complexMoment_nonneg (z : ℂ) : 0 ≤ complexMoment z := by unfold complexMoment; positivity +@[simp] lemma complexMoment_zero : complexMoment 0 = 0 := by simp [complexMoment] +lemma continuous_complexMoment : Continuous complexMoment := continuous_norm.mul (Real.continuous_sqrt.comp continuous_norm) +lemma complexMoment_le {z : ℂ} {b : ℝ} (hz : ‖z‖ ≤ b) : complexMoment z ≤ b*Real.sqrt b := + mul_le_mul hz (Real.sqrt_le_sqrt hz) (Real.sqrt_nonneg _) ((norm_nonneg _).trans hz) + +def finiteMoment {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) : ℝ := + Finset.univ.sup' Finset.univ_nonempty (fun k => complexMoment (f k)) +lemma finiteMoment_eq {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) : + ∃ k, finiteMoment f = complexMoment (f k) := by + obtain ⟨k,_,hk⟩ := Finset.exists_mem_eq_sup' Finset.univ_nonempty (fun k => complexMoment (f k)) + exact ⟨k,hk⟩ +lemma le_finiteMoment {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) (k : κ) : + complexMoment (f k) ≤ finiteMoment f := by + exact Finset.le_sup' (fun k => complexMoment (f k)) (Finset.mem_univ k) +lemma finiteMoment_nonneg {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) : + 0 ≤ finiteMoment f := by + obtain ⟨k,hk⟩ := finiteMoment_eq f + rw [hk] + exact complexMoment_nonneg _ +lemma finiteMoment_le {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) {b : ℝ} + (hb : ∀ k, ‖f k‖ ≤ b) : finiteMoment f ≤ b*Real.sqrt b := + Finset.sup'_le _ _ (fun k _ => complexMoment_le (hb k)) +@[simp] lemma finiteMoment_zero {κ : Type uκ} [Fintype κ] [Nonempty κ] : finiteMoment (fun _ : κ => (0:ℂ)) = 0 := by + simp [finiteMoment] +lemma continuous_finiteMoment {κ : Type uκ} [Fintype κ] [Nonempty κ] : Continuous (finiteMoment (κ := κ)) := by + unfold finiteMoment + exact Continuous.finset_sup'_apply _ (fun k _ => continuous_complexMoment.comp (continuous_apply k)) +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/FiniteVitali.lean b/lean/OAI/Analysis/TriangularHilbert/FiniteVitali.lean new file mode 100644 index 0000000000000000000000000000000000000000..abdb998cd62f82d8c6cf05dc812e4683b1df8410 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/FiniteVitali.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.TriangularHilbert.TotalJump + +namespace OAI + +universe uκ uX + +section +namespace TriangularHilbert +open scoped BigOperators + +lemma finite_disjoint_selection {κ : Type uκ} {X : Type uX} (s : Finset κ) (B : κ → Set X) + (δ : κ → ℝ) (hne : ∀ a ∈ s, (B a).Nonempty) : + ∃ u : Finset κ, u ⊆ s ∧ + (∀ a ∈ u, ∀ b ∈ u, a ≠ b → Disjoint (B a) (B b)) ∧ + ∀ a ∈ s, ∃ b ∈ u, (B a ∩ B b).Nonempty ∧ δ a ≤ δ b := by + classical + revert hne + refine Finset.strongInductionOn s (fun s ih hne => ?_) + by_cases hs : s.Nonempty + · obtain ⟨b,hb,hmax⟩ := s.exists_max_image δ hs + let t := s.filter (fun a => Disjoint (B a) (B b)) + have hts : t ⊆ s := Finset.filter_subset _ _ + have hbt : b ∉ t := by + simp only [t,Finset.mem_filter,not_and] + intro _ hd + obtain ⟨x,hx⟩ := hne b hb + exact Set.disjoint_left.mp hd hx hx + have htss : t ⊂ s := Finset.ssubset_iff_subset_ne.mpr ⟨hts,by + intro he; exact hbt (he.symm ▸ hb)⟩ + obtain ⟨u,hu,hdis,hcover⟩ := ih t htss (fun a ha => hne a (hts ha)) + refine ⟨insert b u,Finset.insert_subset hb (hu.trans hts),?_,?_⟩ + · intro a ha c hc hac + rcases Finset.mem_insert.mp ha with hab | hau + · subst a + rcases Finset.mem_insert.mp hc with hcb | hcu + · exact (hac hcb.symm).elim + · exact (Finset.mem_filter.mp (hu hcu)).2.symm + · rcases Finset.mem_insert.mp hc with hcb | hcu + · subst c + exact (Finset.mem_filter.mp (hu hau)).2 + · exact hdis a hau c hcu hac + · intro a ha + by_cases hab : Disjoint (B a) (B b) + · obtain ⟨c,hc,hac,hδ⟩ := hcover a (Finset.mem_filter.mpr ⟨ha,hab⟩) + exact ⟨c,Finset.mem_insert_of_mem hc,hac,hδ⟩ + · exact ⟨b,Finset.mem_insert_self _ _,Set.not_disjoint_iff_nonempty_inter.mp hab,hmax a ha⟩ + · refine ⟨∅,Finset.empty_subset _,by simp,?_⟩ + simp [Finset.not_nonempty_iff_eq_empty.mp hs] + +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Gaussian.lean b/lean/OAI/Analysis/TriangularHilbert/Gaussian.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f0b17fd6ffb4b22573c77bf98fddca4bfd5aafb --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Gaussian.lean @@ -0,0 +1,97 @@ +import OAI.Analysis.TriangularHilbert.CubicProduct + +namespace OAI + +section + +noncomputable section +open MeasureTheory Filter +open scoped Topology +namespace TriangularHilbert.Heat + +def density (σ t : ℝ) : ℝ := + (Real.sqrt (2 * Real.pi * σ))⁻¹ * Real.exp (-t ^ 2 / (2 * σ)) + +def weight (h u p σ : ℝ) : ℝ := h * density σ (u - p) +def score (u p σ : ℝ) : ℝ := (u - p) / σ + +theorem density_pos {σ : ℝ} (hσ : 0 < σ) (t : ℝ) : 0 < density σ t := by + unfold density + positivity + +theorem density_nonneg {σ : ℝ} (_hσ : 0 ≤ σ) (t : ℝ) : 0 ≤ density σ t := by + unfold density + positivity + +theorem density_eq_gaussianPDFReal {σ : ℝ} (hσ : 0 ≤ σ) : + density σ = ProbabilityTheory.gaussianPDFReal 0 ⟨σ, hσ⟩ := by + ext t + change (Real.sqrt (2 * Real.pi * σ))⁻¹ * Real.exp (-t^2 / (2*σ)) = + (Real.sqrt (2 * Real.pi * σ))⁻¹ * Real.exp (-(t-0)^2 / (2*σ)) + rw [sub_zero] + +theorem density_integrable {σ : ℝ} (hσ : 0 ≤ σ) : Integrable (density σ) := by + rw [density_eq_gaussianPDFReal hσ] + exact ProbabilityTheory.integrable_gaussianPDFReal 0 _ + +theorem weight_hasDerivAt_center (h u p σ : ℝ) (_hσ : 0 < σ) : + HasDerivAt (fun q => weight h u q σ) (score u p σ * weight h u p σ) p := by + have hexp : HasDerivAt (fun q : ℝ => -(u - q)^2 / (2 * σ)) ((u - p) / σ) p := by + convert! ((((hasDerivAt_const p u).sub (hasDerivAt_id p)).pow 2).neg.div_const + (2 * σ)) using 1 + dsimp + ring + have ht := ((Real.hasDerivAt_exp _).comp p hexp).const_mul + (h * (Real.sqrt (2 * Real.pi * σ))⁻¹) + convert! ht using 1 + · ext q + simp only [weight, density, Function.comp_apply] + ring + · simp only [score, weight, density] + ring + +theorem score_hasDerivAt_center (u p σ : ℝ) : + HasDerivAt (fun q => score u q σ) (-σ⁻¹) p := by + convert! ((hasDerivAt_const p u).sub (hasDerivAt_id p)).div_const σ using 1 + simp [div_eq_mul_inv] + +theorem weight_score_hasDerivAt_center (h u p σ : ℝ) (hσ : 0 < σ) : + HasDerivAt (fun q => score u q σ * weight h u q σ) + ((score u p σ ^ 2 - σ⁻¹) * weight h u p σ) p := by + convert! (score_hasDerivAt_center u p σ).mul (weight_hasDerivAt_center h u p σ hσ) using 1 + ring + +theorem density_normalization_hasDerivAt (σ : ℝ) (hσ : 0 < σ) : + HasDerivAt (fun s => (Real.sqrt (2 * Real.pi * s))⁻¹) + (-((Real.sqrt (2 * Real.pi * σ))⁻¹) / (2 * σ)) σ := by + have hpos : 0 < 2 * Real.pi * σ := by positivity + have hspos : 0 < Real.sqrt (2 * Real.pi * σ) := Real.sqrt_pos.2 hpos + have ht := ((Real.hasDerivAt_sqrt hpos.ne').comp σ + ((hasDerivAt_id σ).const_mul (2 * Real.pi))).inv hspos.ne' + convert! ht using 1 + dsimp + field_simp + nlinarith [Real.sq_sqrt hpos.le] + +theorem weight_hasDerivAt_variance (h u p σ : ℝ) (hσ : 0 < σ) : + HasDerivAt (fun s => weight h u p s) + ((1 / 2 : ℝ) * (score u p σ ^ 2 - σ⁻¹) * weight h u p σ) σ := by + have hexp : HasDerivAt (fun s : ℝ => -(u-p)^2 / (2*s)) + ((u-p)^2 / (2*σ^2)) σ := by + convert! (hasDerivAt_const σ (-(u-p)^2)).div + ((hasDerivAt_id σ).const_mul 2) (by positivity : 2*σ ≠ 0) using 1 + dsimp + ring + have ht := ((density_normalization_hasDerivAt σ hσ).mul + ((Real.hasDerivAt_exp _).comp σ hexp)).const_mul h + convert! ht using 1 + unfold score weight density + dsimp + field_simp + ring + +end TriangularHilbert.Heat +end +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianConvolution.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianConvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..63052ab15f80007aa021011832777be16d3e1536 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianConvolution.lean @@ -0,0 +1,50 @@ +import OAI.Analysis.TriangularHilbert.MeshMass + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +lemma density_neg (σ x : ℝ) : density σ (-x) = density σ x := by + simp [density] + +lemma density_le_zero (σ x : ℝ) : density σ x ≤ density σ 0 := by + by_cases hs : 0 < σ + · unfold density + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Real.exp_le_exp.mpr + simp only [zero_pow (by decide : 2 ≠ 0),neg_zero,zero_div] + exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (sq_nonneg x)) (by positivity) + · have he : Real.sqrt (2*Real.pi*σ) = 0 := Real.sqrt_eq_zero_of_nonpos (mul_nonpos_of_nonneg_of_nonpos (by positivity) (le_of_not_gt hs)) + simp [density,he] + +lemma density_product {s t : ℝ} (hs : 0 < s) (ht : 0 < t) (a b p : ℝ) : + density s (a-p)*density t (b-p) = + density (s+t) (a-b)*density (s*t/(s+t)) (p-(t*a+s*b)/(s+t)) := by + have hst : s+t ≠ 0 := (add_pos hs ht).ne' + have hn : Real.sqrt (2*Real.pi*s)*Real.sqrt (2*Real.pi*t) = + Real.sqrt (2*Real.pi*(s+t))*Real.sqrt (2*Real.pi*(s*t/(s+t))) := by + rw [← Real.sqrt_mul (by positivity : 0 ≤ 2*Real.pi*s),← Real.sqrt_mul (by positivity : 0 ≤ 2*Real.pi*(s+t))] + congr 1 + field_simp + have he : -(a-p)^2/(2*s) + -(b-p)^2/(2*t) = + -(a-b)^2/(2*(s+t)) + -(p-(t*a+s*b)/(s+t))^2/(2*(s*t/(s+t))) := by + field_simp + ring + unfold density + calc + _ = (Real.sqrt (2*Real.pi*s)*Real.sqrt (2*Real.pi*t))⁻¹ * + Real.exp (-(a-p)^2/(2*s) + -(b-p)^2/(2*t)) := by rw [mul_inv,Real.exp_add]; ring + _ = _ := by rw [hn,he,mul_inv,Real.exp_add]; ring + +lemma integral_density_product {s t : ℝ} (hs : 0 < s) (ht : 0 < t) (a b : ℝ) : + (∫ p, density s (a-p)*density t (b-p)) = density (s+t) (a-b) := by + simp_rw [density_product hs ht] + rw [integral_const_mul,integral_sub_right_eq_self,integral_density (by positivity),mul_one] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianDom.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianDom.lean new file mode 100644 index 0000000000000000000000000000000000000000..99a85394ae9152a27bb408f14b0f927416ccf93e --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianDom.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.TriangularHilbert.HeatInsert + +namespace OAI + +section + +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +lemma gaussian_exponent_le {σ b : ℝ} (hσ : 0 < σ) (hσb : σ ≤ b) (u p : ℝ) : + -(u-p)^2 / (2*σ) ≤ u^2/(2*b) - p^2/(4*b) := by + have hb : 0 < b := hσ.trans_le hσb + calc + _ ≤ -(u-p)^2 / (2*b) := by + rw [neg_div, neg_div] + exact neg_le_neg (div_le_div_of_nonneg_left (sq_nonneg _) (by positivity) (by linarith)) + _ = (-2*(u-p)^2)/(4*b) := by field_simp; ring + _ ≤ (2*u^2-p^2)/(4*b) := by + apply div_le_div_of_nonneg_right _ (by positivity) + nlinarith [sq_nonneg (p - 2*u)] + _ = _ := by field_simp; ring + +lemma weight_le_gaussian {h a σ b : ℝ} (hh : 0 ≤ h) (ha : 0 < a) + (haσ : a ≤ σ) (hσb : σ ≤ b) (u p : ℝ) : + weight h u p σ ≤ + (h * (Real.sqrt (2*Real.pi*a))⁻¹ * Real.exp (u^2/(2*b))) * + Real.exp (-p^2/(4*b)) := by + have hσ := ha.trans_le haσ + have hn : (Real.sqrt (2*Real.pi*σ))⁻¹ ≤ (Real.sqrt (2*Real.pi*a))⁻¹ := by + simp only [← one_div] + apply one_div_le_one_div_of_le (by positivity) + exact Real.sqrt_le_sqrt (by gcongr) + have he := Real.exp_le_exp.mpr (gaussian_exponent_le hσ hσb u p) + unfold weight density + calc + _ ≤ h * ((Real.sqrt (2*Real.pi*a))⁻¹ * Real.exp (u^2/(2*b)-p^2/(4*b))) := by + gcongr + _ = _ := by rw [sub_eq_add_neg, Real.exp_add]; ring_nf + +lemma rootWeight_le_gaussian {h a σ b : ℝ} (hh : 0 ≤ h) (ha : 0 < a) + (haσ : a ≤ σ) (hσb : σ ≤ b) (u p : ℝ) : + Real.sqrt (weight h u p σ) ≤ + Real.sqrt (h * (Real.sqrt (2*Real.pi*a))⁻¹ * Real.exp (u^2/(2*b))) * + Real.exp (-p^2/(8*b)) := by + have hh' := Real.sqrt_le_sqrt (weight_le_gaussian hh ha haσ hσb u p) + rw [Real.sqrt_mul (by positivity), ← Real.exp_half] at hh' + convert! hh' using 1 + congr 2 + field_simp + ring + +lemma score_le_linear {a σ : ℝ} (ha : 0 < a) (haσ : a ≤ σ) (u p : ℝ) : + |score u p σ| ≤ (|u|+|p|)/a := by + unfold score + rw [abs_div, abs_of_pos (ha.trans_le haσ)] + exact (div_le_div_of_nonneg_right (by simpa using abs_sub_le u 0 p) (ha.trans_le haσ).le).trans + (div_le_div_of_nonneg_left (add_nonneg (abs_nonneg _) (abs_nonneg _)) ha haσ) + +lemma integrable_one_add_sq_sq_gaussian {b : ℝ} (hb : 0 < b) : + Integrable (fun x : ℝ => (1+x^2)^2 * Real.exp (-b*x^2)) := by + have h0 : Integrable (fun x : ℝ => Real.exp (-b*x^2)) := by + simpa using (integrable_rpow_mul_exp_neg_mul_sq hb (s := 0) (by norm_num)) + have h2 : Integrable (fun x : ℝ => x^2 * Real.exp (-b*x^2)) := by + simpa only [Real.rpow_natCast] using + (integrable_rpow_mul_exp_neg_mul_sq hb (s := (2:ℕ)) (by norm_num)) + have h4 : Integrable (fun x : ℝ => x^4 * Real.exp (-b*x^2)) := by + simpa only [Real.rpow_natCast] using + (integrable_rpow_mul_exp_neg_mul_sq hb (s := (4:ℕ)) (by norm_num)) + convert! h0.add ((h2.const_mul 2).add h4) using 1 + ext x + dsimp + ring + +def planeGaussian (b : ℝ) (z : ℝ × ℝ) : ℝ := + Real.exp (-b*(z.1^2 + z.2^2)) + +def planePoly (z : ℝ × ℝ) : ℝ := (1+z.1^2) * (1+z.2^2) + +lemma planeGaussian_pos (b : ℝ) (z : ℝ × ℝ) : 0 < planeGaussian b z := Real.exp_pos _ +lemma planeGaussian_le_one {b : ℝ} (hb : 0 ≤ b) (z : ℝ × ℝ) : planeGaussian b z ≤ 1 := by + apply Real.exp_le_one_iff.mpr + exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hb) (add_nonneg (sq_nonneg _) (sq_nonneg _)) +lemma one_le_planePoly (z : ℝ × ℝ) : 1 ≤ planePoly z := by + unfold planePoly + nlinarith [sq_nonneg z.1, sq_nonneg z.2, mul_nonneg (sq_nonneg z.1) (sq_nonneg z.2)] +lemma planePoly_nonneg (z : ℝ × ℝ) : 0 ≤ planePoly z := (by norm_num : (0:ℝ) ≤ 1).trans (one_le_planePoly z) + +lemma integrable_planePoly_sq_gaussian {b : ℝ} (hb : 0 < b) : + Integrable (fun z => planePoly z ^2 * planeGaussian b z) := by + have hh := (integrable_one_add_sq_sq_gaussian hb).mul_prod (integrable_one_add_sq_sq_gaussian hb) + convert! hh using 1 + ext z + simp only [planePoly, planeGaussian] + rw [show -b * (z.1^2+z.2^2) = -b*z.1^2 + -b*z.2^2 by ring, Real.exp_add] + ring + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianExpectation.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianExpectation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0d9e93890eaac6d1a82c059ca7620fe2caf38f5e --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianExpectation.lean @@ -0,0 +1,59 @@ +import OAI.Analysis.TriangularHilbert.JointHeat + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +noncomputable section + +lemma weight_three_integrable {h : ℝ} (hh : 0 < h) (a b c d : ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v : Three) : + Integrable (fun z : ℝ×ℝ => weight h a (chart 2 d z 0) (σ 0)* + weight h b (chart 2 d z 1) (σ 1)*weight h c (chart 2 d z v) (σ v)) := by + have hi := weight_pair_integrable h a b d σ hσ 0 2 + have he : (0:Three)+1=1 := by decide + rw [he] at hi + apply (hi.mul_const (h*density (σ v) 0)).mono' + · have hc (k : Three) : Continuous (fun z : ℝ×ℝ => chart 2 d z k) := + (continuous_apply k).comp ((chart_continuous 2).comp (continuous_const.prodMk continuous_id)) + exact ((continuous_weight_param h a (hc 0) continuous_const (fun _ => hσ 0)).mul + (continuous_weight_param h b (hc 1) continuous_const (fun _ => hσ 1)) |>.mul + (continuous_weight_param h c (hc v) continuous_const (fun _ => hσ v))).aestronglyMeasurable + · apply Filter.Eventually.of_forall + intro z + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (mul_nonneg + (weight_pos hh (hσ 0) _ _).le (weight_pos hh (hσ 1) _ _).le) (weight_pos hh (hσ v) _ _).le)] + exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left (density_le_zero (σ v) _) hh.le) + (mul_nonneg (weight_pos hh (hσ 0) _ _).le (weight_pos hh (hσ 1) _ _).le) + +lemma planeIntegral_weight_repeat_zero (h a b c d : ℝ) (σ : Three → ℝ) + (hσ : ∀ w, 0 < σ w) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)*weight h c (p 0) (σ 0)) d = + h^3*density (2*σ 0) (a-c) := by + unfold planeIntegral + change (∫ z : ℝ×ℝ, h*density (σ 0) (a-z.1)*(h*density (σ 1) (b-z.2))*(h*density (σ 0) (c-z.1)) ∂volume.prod volume) = _ + have he (z : ℝ×ℝ) : h*density (σ 0) (a-z.1)*(h*density (σ 1) (b-z.2))*(h*density (σ 0) (c-z.1)) = + h^3*((density (σ 0) (a-z.1)*density (σ 0) (c-z.1))*density (σ 1) (b-z.2)) := by ring + simp_rw [he] + rw [integral_const_mul,integral_prod_mul (fun p => density (σ 0) (a-p)*density (σ 0) (c-p)) (fun q => density (σ 1) (b-q)),integral_density_product (hσ 0) (hσ 0),integral_sub_left_eq_self,integral_density (hσ 1),mul_one] + congr 2 + ring + +lemma planeIntegral_weight_repeat_one (h a b c d : ℝ) (σ : Three → ℝ) + (hσ : ∀ w, 0 < σ w) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)*weight h c (p 1) (σ 1)) d = + h^3*density (2*σ 1) (b-c) := by + unfold planeIntegral + change (∫ z : ℝ×ℝ, h*density (σ 0) (a-z.1)*(h*density (σ 1) (b-z.2))*(h*density (σ 1) (c-z.2)) ∂volume.prod volume) = _ + have he (z : ℝ×ℝ) : h*density (σ 0) (a-z.1)*(h*density (σ 1) (b-z.2))*(h*density (σ 1) (c-z.2)) = + h^3*(density (σ 0) (a-z.1)*(density (σ 1) (b-z.2)*density (σ 1) (c-z.2))) := by ring + simp_rw [he] + rw [integral_const_mul,integral_prod_mul (fun p => density (σ 0) (a-p)) (fun q => density (σ 1) (b-q)*density (σ 1) (c-q)),integral_density_product (hσ 1) (hσ 1),integral_sub_left_eq_self,integral_density (hσ 0),one_mul] + congr 2 + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianGram.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ac6ba01429c6c0dc8cade7e58dcb88a0ccd7c4a --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianGram.lean @@ -0,0 +1,34 @@ +import OAI.Analysis.TriangularHilbert.CostBlock + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +open Filter +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma weight_pos {h σ : ℝ} (hh : 0 < h) (hσ : 0 < σ) (u p : ℝ) : + 0 < weight h u p σ := mul_pos hh (density_pos hσ _) + +lemma weightedGram_smul (B : Matrix ι ι ℂ) (c : ℝ) (w : ι → ℝ) : + weightedGram B (fun i => c * w i) = c • weightedGram B w := by + have he : Matrix.diagonal (fun i => ((c * w i : ℝ) : ℂ)) = + c • Matrix.diagonal (fun i => (w i : ℂ)) := by + rw [← Matrix.diagonal_smul] + congr 1 + funext i + simp + unfold weightedGram + rw [he, Matrix.mul_smul, Matrix.smul_mul] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianMax.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianMax.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf1666d38834d2bc9c15bb770e856bc672bbc756 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianMax.lean @@ -0,0 +1,79 @@ +import OAI.Analysis.TriangularHilbert.FiniteAbel + +namespace OAI + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +lemma intMax_strong (D s : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) : + (∑ n ∈ s, intMax D f n * Real.sqrt (intMax D f n)) ≤ + 18*Real.sqrt 2 * ∑ m ∈ D, f m*Real.sqrt (f m) := by + choose r hr using intMax_attained D f + apply int_intervals_strong D s f (intMax D f) hf (fun n _ => intMax_nonneg D f hf n) r + intro n _ + rw [hr n,intAverage] + exact le_of_eq (div_mul_cancel₀ _ (by positivity)) + +lemma intInterval_filter (n : ℤ) (N r : ℕ) (hr : r ≤ N) : + (intInterval n N).filter (fun m => (m-n).natAbs ≤ r) = intInterval n r := by + ext m + simp only [Finset.mem_filter,mem_intInterval_iff_dist] + exact ⟨And.right,fun h => ⟨h.trans hr,h⟩⟩ + +lemma intInterval_sum_fin (n : ℤ) (N : ℕ) (f : ℤ → ℝ) : + (∑ m ∈ intInterval n N, f m) = ∑ i : Fin (2*N+1), f (n-(N:ℤ)+(i:ℕ)) := by + symm + apply Finset.sum_bij (fun (i : Fin (2*N+1)) _ => n-(N:ℤ)+(i:ℕ)) + · intro i _ + rw [mem_intInterval] + have hi := i.isLt + constructor <;> omega + · intro i _ j _ he + apply Fin.ext + omega + · intro m hm + rw [mem_intInterval] at hm + refine ⟨⟨(m-(n-(N:ℤ))).toNat,by omega⟩,Finset.mem_univ _,?_⟩ + dsimp + omega + · intro i _ + rfl + +lemma intInterval_weighted_le (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) + (n : ℤ) (g : ℕ → ℝ) (hg : ∀ r, 0 ≤ g r) (hdec : ∀ r, g (r+1) ≤ g r) : + (∑ m ∈ D, f m*g (m-n).natAbs) ≤ + intMax D f n * ∑ m ∈ intInterval n (supportRadius D n), g (m-n).natAbs := by + classical + let N := supportRadius D n + have hD : D ⊆ intInterval n N := by + intro m hm + rw [mem_intInterval_iff_dist] + exact (Finset.le_sup (f := fun k : ℤ => (k-n).natAbs) hm) + have he : (∑ m ∈ D, f m*g (m-n).natAbs) = + ∑ m ∈ intInterval n N, (if m ∈ D then f m else 0)*g (m-n).natAbs := by + simp only [ite_mul,zero_mul,Finset.sum_ite,Finset.sum_const_zero,add_zero] + congr 1 + ext m + simp only [Finset.mem_filter] + exact ⟨fun hm => ⟨hD hm,hm⟩,And.right⟩ + rw [he] + have hw := weighted_prefix_le (intInterval n N) (fun m => (m-n).natAbs) + (fun m => if m ∈ D then f m else 0) (fun _ => intMax D f n) g N + (fun m hm => (mem_intInterval_iff_dist m n N).mp hm) (hg N) (fun r _ => hdec r) ?_ + · simpa only [← Finset.mul_sum] using hw + · intro r hr + rw [intInterval_filter n N r hr] + have he' : (∑ m ∈ intInterval n r, if m ∈ D then f m else 0) = ∑ m ∈ D ∩ intInterval n r, f m := by + rw [Finset.sum_ite,Finset.sum_const_zero,add_zero] + congr 1 + ext m + simp only [Finset.mem_filter,Finset.mem_inter,and_comm] + rw [he',Finset.sum_const,card_intInterval,nsmul_eq_mul] + simpa only [Nat.cast_add,Nat.cast_mul,Nat.cast_one,Nat.cast_ofNat,mul_comm] using sum_interval_le_intMax D f hf n r +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianMoments.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2c7b73dc08d840de0572cfbc0d70e52128bcfd2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianMoments.lean @@ -0,0 +1,77 @@ +import OAI.Analysis.TriangularHilbert.GaussianConvolution + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +open scoped NNReal +noncomputable section + +lemma integrable_pow_density {s : ℝ} (hs : 0 < s) (n : ℕ) : + Integrable (fun x : ℝ => x^n*density s x) := by + have hi : Integrable (fun x : ℝ => x^n*Real.exp (-(1/(2*s))*x^2)) := by + simpa only [Real.rpow_natCast] using + (integrable_rpow_mul_exp_neg_mul_sq (by positivity : 0 < 1/(2*s)) (by have hn : 0 ≤ (n:ℝ) := Nat.cast_nonneg n; linarith : -1 < (n:ℝ))) + convert hi.mul_const (Real.sqrt (2*Real.pi*s))⁻¹ using 1 + funext x + unfold density + rw [show -(1/(2*s))*x^2 = -x^2/(2*s) by ring] + ring + +lemma integral_density_first (s : ℝ) : (∫ x : ℝ, x*density s x) = 0 := by + have he := integral_neg_eq_self (fun x : ℝ => x*density s x) volume + simp only [density_neg,neg_mul,integral_neg] at he + linarith + +lemma integral_density_third (s : ℝ) : (∫ x : ℝ, x^3*density s x) = 0 := by + have he := integral_neg_eq_self (fun x : ℝ => x^3*density s x) volume + simp only [density_neg,neg_pow,show (-1:ℝ)^3 = -1 by norm_num,neg_mul,one_mul,integral_neg] at he + linarith + +lemma integral_density_second {s : ℝ} (hs : 0 < s) : (∫ x : ℝ, x^2*density s x) = s := by + let v : ℝ≥0 := ⟨s,hs.le⟩ + have hv : v ≠ 0 := by + intro he + have h := congrArg (fun q : ℝ≥0 => (q:ℝ)) he + exact hs.ne' h + have hh := ProbabilityTheory.variance_fun_id_gaussianReal (μ:=0) (v:=v) + rw [ProbabilityTheory.variance_eq_integral (X := fun x : ℝ => x) (by fun_prop)] at hh + simp only [ProbabilityTheory.integral_id_gaussianReal,sub_zero] at hh + rw [ProbabilityTheory.integral_gaussianReal_eq_integral_smul hv] at hh + change (∫ x : ℝ, ProbabilityTheory.gaussianPDFReal 0 v x * (x^2)) = s at hh + change (∫ x : ℝ, x^2*density s x) = s + convert hh using 1 + congr 1 + funext x + change x^2*((Real.sqrt (2*Real.pi*s))⁻¹*Real.exp (-x^2/(2*s))) = + ((Real.sqrt (2*Real.pi*s))⁻¹*Real.exp (-((x-0)^2)/(2*s)))*x^2 + simp only [sub_zero] + ring + +def cubic (c0 c1 c2 c3 x : ℝ) : ℝ := c0+c1*x+c2*x^2+c3*x^3 + +lemma integral_cubic_density {s : ℝ} (hs : 0 < s) (c0 c1 c2 c3 : ℝ) : + (∫ x : ℝ, cubic c0 c1 c2 c3 x*density s x) = c0+c2*s := by + have h0 := (density_integrable hs.le).const_mul c0 + have h1 : Integrable (fun x : ℝ => c1*(x*density s x)) := by simpa only [pow_one] using (integrable_pow_density hs 1).const_mul c1 + have h2 := (integrable_pow_density hs 2).const_mul c2 + have h3 := (integrable_pow_density hs 3).const_mul c3 + have he (x : ℝ) : cubic c0 c1 c2 c3 x*density s x = + (c0*density s x+c1*(x*density s x))+c2*(x^2*density s x)+c3*(x^3*density s x) := by unfold cubic; ring + simp_rw [he] + have e3 := integral_add ((h0.add h1).add h2) h3 + have e2 := integral_add (h0.add h1) h2 + have e1 := integral_add h0 h1 + dsimp only [Pi.add_apply] at e1 e2 e3 + rw [e3,e2,e1] + simp only [integral_const_mul,integral_density hs,integral_density_first,integral_density_second hs,integral_density_third,mul_one,mul_zero,add_zero] + +lemma integral_shifted_cubic_density {s : ℝ} (hs : 0 < s) (c0 c1 c2 c3 m : ℝ) : + (∫ x : ℝ, cubic c0 c1 c2 c3 (x-m)*density s (x-m)) = c0+c2*s := by + rw [integral_sub_right_eq_self (fun x : ℝ => cubic c0 c1 c2 c3 x*density s x),integral_cubic_density hs] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianRadial.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianRadial.lean new file mode 100644 index 0000000000000000000000000000000000000000..993d07839d68a1daaecd9e0829d274e9ad077c15 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianRadial.lean @@ -0,0 +1,53 @@ +import OAI.Analysis.TriangularHilbert.GaussianMax + +namespace OAI + +section +namespace TriangularHilbert.Heat +open scoped BigOperators +noncomputable section + +lemma density_radial_int (σ h : ℝ) (m : ℤ) : + density σ (h*(m:ℝ)) = density σ (h*(m.natAbs:ℝ)) := by + have he := congrArg (fun n : ℤ => (n : ℝ)) (Int.natAbs_sq m).symm + simp only [Int.cast_pow,Int.cast_natCast] at he + simp only [density,mul_pow,he] + +lemma density_radial_descending {σ h : ℝ} (hσ : 0 < σ) (hh : 0 ≤ h) (r : ℕ) : + h*density σ (h*(r+1:ℕ)) ≤ h*density σ (h*(r:ℝ)) := by + apply mul_le_mul_of_nonneg_left _ hh + unfold density + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply Real.exp_le_exp.mpr + apply div_le_div_of_nonneg_right _ (by positivity) + have hr : (0:ℝ) ≤ r := by positivity + push_cast + nlinarith [sq_nonneg h] + +lemma intInterval_density_mass {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (n : ℤ) (N : ℕ) : + (∑ m ∈ intInterval n N, h*density σ (h*((m-n).natAbs:ℝ))) ≤ meshMassConstant := by + simp_rw [← density_radial_int] + rw [intInterval_sum_fin] + have he (i : Fin (2*N+1)) : h*density σ (h*((n-(N:ℤ)+(i:ℕ)-n:ℤ):ℝ)) = + h*density σ (-(h*N)+h*i) := by + congr 2 + push_cast + ring + simp_rw [he] + exact mesh_mass_le hh hσ (-(h*N)) (2*N+1) + +lemma gaussian_sum_le_intMax (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) + {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (n : ℤ) : + (∑ m ∈ D, f m*(h*density σ (h*((m-n:ℤ):ℝ)))) ≤ meshMassConstant * intMax D f n := by + have hpos : 0 < σ := (sq_pos_of_pos hh).trans_le hσ + simp_rw [density_radial_int] + have hw := intInterval_weighted_le D f hf n (fun r => h*density σ (h*(r:ℝ))) + (fun r => mul_nonneg hh.le (density_nonneg hpos.le _)) (density_radial_descending hpos hh.le) + apply hw.trans + rw [mul_comm meshMassConstant] + exact mul_le_mul_of_nonneg_left (intInterval_density_mass hh hσ n (supportRadius D n)) (intMax_nonneg D f hf n) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GaussianTriple.lean b/lean/OAI/Analysis/TriangularHilbert/GaussianTriple.lean new file mode 100644 index 0000000000000000000000000000000000000000..aca89862e1accfe78dd134ed1339f323cc559447 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GaussianTriple.lean @@ -0,0 +1,63 @@ +import OAI.Analysis.TriangularHilbert.MassPlane + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +lemma density_triple_integrable {s t v : ℝ} (hs : 0 < s) (ht : 0 < t) (hv : 0 < v) (a b c : ℝ) : + Integrable (fun z : ℝ×ℝ => density s (a-z.1)*density t (b-z.2)*density v (c+z.1+z.2)) := by + have hst : Integrable (fun z : ℝ×ℝ => density s (a-z.1)*density t (b-z.2)) := by + exact ((volume.measurePreserving_sub_left a).integrable_comp_of_integrable (density_integrable hs.le)).mul_prod + ((volume.measurePreserving_sub_left b).integrable_comp_of_integrable (density_integrable ht.le)) + apply (hst.mul_const (density v 0)).mono' + · have hc : Continuous (fun z : ℝ×ℝ => density s (a-z.1)*density t (b-z.2)*density v (c+z.1+z.2)) := + (((continuous_density s).comp (continuous_const.sub continuous_fst)).mul + ((continuous_density t).comp (continuous_const.sub continuous_snd))).mul + ((continuous_density v).comp ((continuous_const.add continuous_fst).add continuous_snd)) + exact hc.aestronglyMeasurable + · apply Filter.Eventually.of_forall + intro z + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (mul_nonneg (density_nonneg hs.le _) (density_nonneg ht.le _)) (density_nonneg hv.le _))] + exact mul_le_mul_of_nonneg_left (density_le_zero v _) (mul_nonneg (density_nonneg hs.le _) (density_nonneg ht.le _)) + +lemma integral_density_triple {s t v : ℝ} (hs : 0 < s) (ht : 0 < t) (hv : 0 < v) (a b c : ℝ) : + (∫ z : ℝ×ℝ, density s (a-z.1)*density t (b-z.2)*density v (c+z.1+z.2)) = + density (s+t+v) (a+b+c) := by + rw [MeasureTheory.Measure.volume_eq_prod,integral_prod _ (density_triple_integrable hs ht hv a b c)] + have inner (p : ℝ) : (∫ q, density s (a-p)*density t (b-q)*density v (c+p+q)) = + density s (a-p)*density (t+v) (b+c+p) := by + have he (q : ℝ) : density v (c+p+q) = density v ((-c-p)-q) := by + rw [show (-c-p)-q = -(c+p+q) by ring,density_neg] + simp_rw [he,mul_assoc] + rw [integral_const_mul,integral_density_product ht hv] + congr 2 + ring + simp_rw [inner] + have he (p : ℝ) : density (t+v) (b+c+p) = density (t+v) ((-b-c)-p) := by + rw [show (-b-c)-p = -(b+c+p) by ring,density_neg] + simp_rw [he] + rw [integral_density_product hs (add_pos ht hv)] + congr 1 <;> ring + +lemma planeIntegral_weight_triple (h a b c : ℝ) (σ : MatrixEnergy.Three → ℝ) + (hσ : ∀ w, 0 < σ w) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)*weight h c (p 2) (σ 2)) 0 = + h^3*density (σ 0+σ 1+σ 2) (a+b+c) := by + unfold planeIntegral + change (∫ z : ℝ×ℝ, h*density (σ 0) (a-z.1) * (h*density (σ 1) (b-z.2)) * + (h*density (σ 2) (c-(0-z.1-z.2)))) = _ + have he (z : ℝ×ℝ) : h*density (σ 0) (a-z.1) * (h*density (σ 1) (b-z.2)) * + (h*density (σ 2) (c-(0-z.1-z.2))) = + h^3*(density (σ 0) (a-z.1)*density (σ 1) (b-z.2)*density (σ 2) (c+z.1+z.2)) := by + rw [show c-(0-z.1-z.2) = c+z.1+z.2 by ring] + ring + simp_rw [he] + rw [integral_const_mul,integral_density_triple (hσ 0) (hσ 1) (hσ 2)] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GramDeriv.lean b/lean/OAI/Analysis/TriangularHilbert/GramDeriv.lean new file mode 100644 index 0000000000000000000000000000000000000000..4227c8e66016f8759af092f33136c2874c574c2e --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GramDeriv.lean @@ -0,0 +1,132 @@ +import OAI.Analysis.TriangularHilbert.HeatBound + +namespace OAI + +universe uι uE uF + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators Topology +open Filter MeasureTheory +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def gramGradientAt (R P : Matrix ι ι ℂ) : Matrix ι ι ℂ →L[ℝ] ℝ := + (3 : ℝ) • traceRealCLM.comp ((ContinuousLinearMap.mul ℝ _) ((R * CFC.sqrt P)ᴴ)) + +@[simp] lemma gramGradientAt_apply (R P D : Matrix ι ι ℂ) : + gramGradientAt R P D = 3 * hsReal (R * CFC.sqrt P) D := rfl + +lemma regularized_energyGram_hasFDerivAt (R : Matrix ι ι ℂ) {η : ℝ} (hη : 0 < η) : + HasFDerivAt (fun X : Matrix ι ι ℂ => energy (regularize (Xᴴ * X) η)) + (gramGradientAt R (regularize (Rᴴ * R) η)) R := by + have hg := (((hasFDerivAt_id R (𝕜 := ℝ)).star).mul' (hasFDerivAt_id R)).add_const + (η • (1 : Matrix ι ι ℂ)) + have hp := regularize_posDef (Matrix.posSemidef_conjTranspose_mul_self R) hη + have hn : ∀ᶠ X : Matrix ι ι ℂ in 𝓝 R, 0 ≤ regularize (Xᴴ * X) η := + Eventually.of_forall fun X => + (regularize_posSemidef (Matrix.posSemidef_conjTranspose_mul_self X) hη.le).nonneg + have hh := (energy_hasFDerivWithinAt hp).comp_hasFDerivAt R hg hn + convert! hh using 1 + ext D + simp only [ContinuousLinearMap.comp_apply, add_apply, + smul_apply, ContinuousLinearMap.id_apply, id_eq, + ContinuousLinearEquiv.coe_coe, starL'_apply, smul_eq_mul, + MulOpposite.smul_eq_mul_unop, MulOpposite.unop_op, Matrix.star_eq_conjTranspose] + rw [energyGradient_gram, gramGradientAt_apply] + +lemma continuousAt_tendstoUniformlyOnFilter {E : Type uE} {F : Type uF} [TopologicalSpace E] + [UniformSpace F] {H : ℝ × E → F} {x : E} + (hH : ContinuousAt H (0, x)) : + TendstoUniformlyOnFilter (fun η y => H (η, y)) (fun y => H (0, y)) + (𝓝[>] 0) (𝓝 x) := by + apply tendstoUniformlyOnFilter_iff_tendsto.mpr + have hp : (𝓝[>] (0 : ℝ)) ×ˢ 𝓝 x ≤ 𝓝 (0, x) := by + rw [nhds_prod_eq] + exact Filter.prod_mono nhdsWithin_le_nhds le_rfl + have h₂ : Tendsto H ((𝓝[>] (0 : ℝ)) ×ˢ 𝓝 x) (𝓝 (H (0, x))) := + hH.mono_left hp + have h₁ : Tendsto (fun p : ℝ × E => H (0, p.2)) + ((𝓝[>] (0 : ℝ)) ×ˢ 𝓝 x) (𝓝 (H (0, x))) := + hH.tendsto.comp (tendsto_const_nhds.prodMk_nhds tendsto_snd) + exact (h₁.prodMk_nhds h₂).mono_right (nhds_le_uniformity _) + +def gramRegularization (η : ℝ) (R : Matrix ι ι ℂ) : Matrix ι ι ℂ := + regularize (Rᴴ * R) (η^2) + +lemma continuous_gramRegularization : Continuous + (fun p : ℝ × Matrix ι ι ℂ => gramRegularization p.1 p.2) := by + unfold gramRegularization regularize + fun_prop + +lemma gramRegularization_posSemidef (η : ℝ) (R : Matrix ι ι ℂ) : + (gramRegularization η R).PosSemidef := + regularize_posSemidef (Matrix.posSemidef_conjTranspose_mul_self _) (sq_nonneg _) + +@[simp] lemma gramRegularization_zero (R : Matrix ι ι ℂ) : + gramRegularization 0 R = Rᴴ * R := by simp [gramRegularization, regularize] + +lemma continuous_regularizedGradient : Continuous + (fun p : ℝ × Matrix ι ι ℂ => gramGradientAt p.2 (gramRegularization p.1 p.2)) := by + unfold gramGradientAt + have hs : Continuous (fun p : ℝ × Matrix ι ι ℂ => CFC.sqrt (gramRegularization p.1 p.2)) := + continuous_sqrt_matrix continuous_gramRegularization + (fun p => gramRegularization_posSemidef p.1 p.2) + have hr : Continuous (fun p : ℝ × Matrix ι ι ℂ => + (p.2 * CFC.sqrt (gramRegularization p.1 p.2))ᴴ) := (continuous_snd.mul hs).star + have hm : Continuous (fun p : ℝ × Matrix ι ι ℂ => + (ContinuousLinearMap.mul ℝ (Matrix ι ι ℂ)) + ((p.2 * CFC.sqrt (gramRegularization p.1 p.2))ᴴ)) := + (ContinuousLinearMap.mul ℝ (Matrix ι ι ℂ)).continuous.comp hr + have ht : Continuous (fun p : ℝ × Matrix ι ι ℂ => + traceRealCLM.comp ((ContinuousLinearMap.mul ℝ (Matrix ι ι ℂ)) + ((p.2 * CFC.sqrt (gramRegularization p.1 p.2))ᴴ))) := + (ContinuousLinearMap.compL ℝ (Matrix ι ι ℂ) (Matrix ι ι ℂ) ℝ + traceRealCLM).continuous.comp hm + exact ht.const_smul (3 : ℝ) + +lemma eventually_regularizedEnergy_deriv (R : Matrix ι ι ℂ) : + ∀ᶠ p : ℝ × Matrix ι ι ℂ in (𝓝[>] (0 : ℝ)) ×ˢ 𝓝 R, + HasFDerivAt (fun X => energy (gramRegularization p.1 X)) + (gramGradientAt p.2 (gramRegularization p.1 p.2)) p.2 := by + have hp0 : ∀ᶠ η : ℝ in 𝓝[>] (0 : ℝ), 0 < η := self_mem_nhdsWithin + have hh : ∀ᶠ p : ℝ × Matrix ι ι ℂ in (𝓝[>] (0 : ℝ)) ×ˢ 𝓝 R, 0 < p.1 := + hp0.prod_inl _ + filter_upwards [hh] with p hp + exact regularized_energyGram_hasFDerivAt p.2 (sq_pos_of_pos hp) + +lemma continuous_regularizedEnergy_single (R : Matrix ι ι ℂ) : + Continuous (fun η : ℝ => energy (gramRegularization η R)) := by + have hp : Continuous (fun η : ℝ => gramRegularization η R) := by + unfold gramRegularization regularize + fun_prop + exact traceRealCLM.continuous.comp (hp.mul (continuous_sqrt_matrix hp + (fun η => gramRegularization_posSemidef η R))) + +lemma tendsto_regularizedEnergy (R : Matrix ι ι ℂ) : + Tendsto (fun η => energy (gramRegularization η R)) + (𝓝[>] 0) (𝓝 (energy (Rᴴ * R))) := by + have ht := (continuous_regularizedEnergy_single R).tendsto (0 : ℝ) + rw [gramRegularization_zero] at ht + exact ht.mono_left nhdsWithin_le_nhds + +theorem energyGram_hasFDerivAt (R : Matrix ι ι ℂ) : + HasFDerivAt (fun X : Matrix ι ι ℂ => energy (Xᴴ * X)) + (gramGradientAt R (Rᴴ * R)) R := by + have hh := hasFDerivAt_of_tendstoUniformlyOnFilter (𝕜 := ℝ) (x := R) + (f := fun (η : ℝ) (X : Matrix ι ι ℂ) => energy (gramRegularization η X)) + (f' := fun (η : ℝ) (X : Matrix ι ι ℂ) => gramGradientAt X (gramRegularization η X)) + (g := fun X : Matrix ι ι ℂ => energy (Xᴴ * X)) + (g' := fun X : Matrix ι ι ℂ => gramGradientAt X (gramRegularization 0 X)) + (continuousAt_tendstoUniformlyOnFilter + (continuous_regularizedGradient.continuousAt (x := (0, R)))) + (eventually_regularizedEnergy_deriv R) + (Eventually.of_forall (fun X => tendsto_regularizedEnergy X)) + simpa only [gramRegularization_zero] using hh + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GridCell.lean b/lean/OAI/Analysis/TriangularHilbert/GridCell.lean new file mode 100644 index 0000000000000000000000000000000000000000..57b67a2c955a4ac72ccdf5e45ee9278ff7a41858 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GridCell.lean @@ -0,0 +1,121 @@ +import OAI.Analysis.TriangularHilbert.HardScalar + +namespace OAI + +universe uE uF + +section +namespace TriangularHilbert +open MeasureTheory +open scoped BigOperators +noncomputable section + +def gridCell (h : ℝ) (i : ℤ) : Set ℝ := Set.Ico (h*i) (h*(i+1)) +def gridIndex (h x : ℝ) : ℤ := ⌊x/h⌋ +def gridPoint (h x : ℝ) : ℝ := h*gridIndex h x + +lemma gridCell_mem_iff {h x : ℝ} (hh : 0 < h) (i : ℤ) : + x ∈ gridCell h i ↔ gridIndex h x = i := by + unfold gridCell gridIndex + rw [Int.floor_eq_iff] + simp only [Set.mem_Ico] + constructor + · intro hx + exact ⟨(le_div_iff₀ hh).mpr (by simpa only [mul_comm] using hx.1), + (div_lt_iff₀ hh).mpr (by simpa only [mul_comm] using hx.2)⟩ + · intro hx + exact ⟨by simpa only [mul_comm] using (le_div_iff₀ hh).mp hx.1, + by simpa only [mul_comm] using (div_lt_iff₀ hh).mp hx.2⟩ + +lemma gridPoint_le {h : ℝ} (hh : 0 < h) (x : ℝ) : gridPoint h x ≤ x := by + exact ((gridCell_mem_iff hh (gridIndex h x)).mpr rfl).1 + +lemma gridPoint_lt_add {h : ℝ} (hh : 0 < h) (x : ℝ) : x < gridPoint h x+h := by + have hh' := ((gridCell_mem_iff hh (gridIndex h x)).mpr rfl).2 + dsimp [gridCell,gridPoint] at * + linarith only [hh'] + +lemma abs_gridPoint_sub_lt {h : ℝ} (hh : 0 < h) (x : ℝ) : |gridPoint h x-x| < h := by + rw [abs_of_nonpos (sub_nonpos.mpr (gridPoint_le hh x))] + linarith only [gridPoint_lt_add hh x] + +lemma volume_gridCell (h : ℝ) (i : ℤ) : volume (gridCell h i) = ENNReal.ofReal h := by + rw [gridCell,Real.volume_Ico] + congr 1 + ring + +def gridRect (h : ℝ) (i j : ℤ) : Set (ℝ×ℝ) := gridCell h i ×ˢ gridCell h j + +def gridLift (D : Finset ℤ) (h : ℝ) {E : Type uE} [AddCommMonoid E] (f : D → D → E) (z : ℝ×ℝ) : E := + ∑ i : D, ∑ j : D, (gridRect h i j).indicator (fun _ => f i j) z + +lemma gridRect_mem_iff {h : ℝ} (hh : 0 < h) (z : ℝ×ℝ) (i j : ℤ) : + z ∈ gridRect h i j ↔ gridIndex h z.1 = i ∧ gridIndex h z.2 = j := by + exact and_congr (gridCell_mem_iff hh i) (gridCell_mem_iff hh j) + +lemma gridLift_eq {D : Finset ℤ} {h : ℝ} (hh : 0 < h) {E : Type uE} [AddCommMonoid E] + (f : D → D → E) (z : ℝ×ℝ) : gridLift D h f z = + if hi : gridIndex h z.1 ∈ D then if hj : gridIndex h z.2 ∈ D then + f ⟨gridIndex h z.1,hi⟩ ⟨gridIndex h z.2,hj⟩ else 0 else 0 := by + classical + unfold gridLift + simp_rw [Set.indicator_apply,gridRect_mem_iff hh] + split_ifs with hi hj + · rw [Finset.sum_eq_single (⟨gridIndex h z.1,hi⟩:D)] + · rw [Finset.sum_eq_single (⟨gridIndex h z.2,hj⟩:D)] + · simp + · intro j _ hj' + have hne : gridIndex h z.2 ≠ (j:ℤ) := by intro he; exact hj' (Subtype.ext he.symm) + simp only [hne,and_false,ite_false] + · simp + · intro i _ hi' + have hne : gridIndex h z.1 ≠ (i:ℤ) := by intro he; exact hi' (Subtype.ext he.symm) + simp only [hne,false_and,ite_false,Finset.sum_const_zero] + · simp + · apply Finset.sum_eq_zero + intro i _ + apply Finset.sum_eq_zero + intro j _ + have hne : gridIndex h z.2 ≠ (j:ℤ) := by intro he; exact hj (he ▸ j.property) + simp only [hne,and_false,ite_false] + · apply Finset.sum_eq_zero + intro i _ + apply Finset.sum_eq_zero + intro j _ + have hne : gridIndex h z.1 ≠ (i:ℤ) := by intro he; exact hi (he ▸ i.property) + simp only [hne,false_and,ite_false] + +lemma gridLift_comp {D : Finset ℤ} {h : ℝ} (hh : 0 < h) {E : Type uE} {F : Type uF} [AddCommMonoid E] [AddCommMonoid F] + (f : D → D → E) (g : E → F) (hg : g 0 = 0) (z : ℝ×ℝ) : + g (gridLift D h f z) = gridLift D h (fun i j => g (f i j)) z := by + simp only [gridLift_eq hh] + split_ifs <;> simp only [hg] + +lemma measurableSet_gridRect (h : ℝ) (i j : ℤ) : MeasurableSet (gridRect h i j) := + measurableSet_Ico.prod measurableSet_Ico + +lemma volume_gridRect (h : ℝ) (i j : ℤ) : volume (gridRect h i j) = (ENNReal.ofReal h)^2 := by + change (volume.prod volume) (gridCell h i ×ˢ gridCell h j) = _ + rw [Measure.prod_prod,volume_gridCell,volume_gridCell,pow_two] + +lemma integral_gridLift (D : Finset ℤ) (h : ℝ) {E : Type uE} [NormedAddCommGroup E] + [NormedSpace ℝ E] [CompleteSpace E] (f : D → D → E) (hh : 0 ≤ h) : + (∫ z : ℝ×ℝ, gridLift D h f z) = ∑ i, ∑ j, h^2 • f i j := by + have hi (i j : D) : Integrable ((gridRect h i j).indicator (fun _ : ℝ×ℝ => f i j)) := + IntegrableOn.integrable_indicator + (integrableOn_const (μ := volume) (s := gridRect h i j) (C := f i j) + (by rw [volume_gridRect]; finiteness)) (measurableSet_gridRect h i j) + unfold gridLift + rw [integral_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => hi i j))] + apply Finset.sum_congr rfl + intro i _ + rw [integral_finsetSum _ (fun j _ => hi i j)] + apply Finset.sum_congr rfl + intro j _ + rw [integral_indicator (measurableSet_gridRect h i j),setIntegral_const,measureReal_def,volume_gridRect, + ENNReal.toReal_pow,ENNReal.toReal_ofReal hh] +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GridLine.lean b/lean/OAI/Analysis/TriangularHilbert/GridLine.lean new file mode 100644 index 0000000000000000000000000000000000000000..56e92a5705ba95602ed9185762a5988c2af189cb --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GridLine.lean @@ -0,0 +1,68 @@ +import OAI.Analysis.TriangularHilbert.Quantization + +namespace OAI + +universe uE + +section +namespace TriangularHilbert +open MeasureTheory +open scoped BigOperators +noncomputable section + +def gridLine (D : Finset ℤ) (h : ℝ) {E : Type uE} [AddCommMonoid E] (f : D → E) (x : ℝ) : E := + ∑ i : D, (gridCell h i).indicator (fun _ => f i) x + +lemma gridLine_eq {D : Finset ℤ} {h : ℝ} (hh : 0 < h) {E : Type uE} [AddCommMonoid E] + (f : D → E) (x : ℝ) : gridLine D h f x = + if hi : gridIndex h x ∈ D then f ⟨gridIndex h x,hi⟩ else 0 := by + classical + unfold gridLine + simp_rw [Set.indicator_apply,gridCell_mem_iff hh] + split_ifs with hi + · rw [Finset.sum_eq_single (⟨gridIndex h x,hi⟩:D)] + · simp + · intro i _ hi' + have hne : gridIndex h x ≠ (i:ℤ) := by intro he; exact hi' (Subtype.ext he.symm) + simp only [hne,ite_false] + · simp + · apply Finset.sum_eq_zero + intro i _ + have hne : gridIndex h x ≠ (i:ℤ) := by intro he; exact hi (he ▸ i.property) + simp only [hne,ite_false] + +lemma gridLine_sampled {E : Type uE} [AddCommMonoid E] (f : ℝ → E) {h M : ℝ} + (hh : 0 < h) (hf : ∀ x, f x ≠ 0 → |x| ≤ M) (x : ℝ) : + gridLine (sampleIndices h M) h (fun i => f (h*(i:ℤ))) x = f (gridPoint h x) := by + rw [gridLine_eq hh] + split_ifs with hi + · rfl + · symm + by_contra hn + exact hi ((mem_sampleIndices hh M _).mpr (hf _ hn)) + +lemma integral_gridLine (D : Finset ℤ) (h : ℝ) {E : Type uE} [NormedAddCommGroup E] + [NormedSpace ℝ E] [CompleteSpace E] (f : D → E) (hh : 0 ≤ h) : + (∫ x : ℝ, gridLine D h f x) = ∑ i, h • f i := by + have hi (i : D) : Integrable ((gridCell h i).indicator (fun _ : ℝ => f i)) := + IntegrableOn.integrable_indicator + (integrableOn_const (μ := volume) (s := gridCell h i) (C := f i) + (by rw [volume_gridCell]; finiteness)) measurableSet_Ico + unfold gridLine + rw [integral_finsetSum _ (fun i _ => hi i)] + apply Finset.sum_congr rfl + intro i _ + rw [integral_indicator (show MeasurableSet (gridCell h i) from measurableSet_Ico),setIntegral_const,measureReal_def,volume_gridCell, + ENNReal.toReal_ofReal hh] + +lemma integral_sampled_line {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + (f : ℝ → E) {h M : ℝ} (hh : 0 < h) (hf : ∀ x, f x ≠ 0 → |x| ≤ M) : + (∫ x : ℝ, f (gridPoint h x)) = ∑ i : sampleIndices h M, h • f (h*(i:ℤ)) := by + have he : (fun x => f (gridPoint h x)) = gridLine (sampleIndices h M) h (fun i => f (h*(i:ℤ))) := + funext (fun x => (gridLine_sampled f hh hf x).symm) + rw [he,integral_gridLine _ _ _ hh.le] +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/GroupedGaussian.lean b/lean/OAI/Analysis/TriangularHilbert/GroupedGaussian.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3e42dd81b32b1474f69625f736ac0e20fca10fb --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/GroupedGaussian.lean @@ -0,0 +1,132 @@ +import OAI.Analysis.TriangularHilbert.WeightedCompare + +namespace OAI + +universe uι uν + +section + +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +open Filter +noncomputable section +variable {ι : Type uι} {ν : Type uν} [Fintype ι] [DecidableEq ι] [DecidableEq ν] + +def groupWeight (h : ℝ) (u : ι → ℝ) (loc : ι → ν) (p σ : ν → ℝ) (i : ι) : ℝ := + weight h (u i) (p (loc i)) (σ (loc i)) + +def groupFirst (h : ℝ) (u : ι → ℝ) (loc : ι → ν) (p σ : ν → ℝ) (v : ν) (i : ι) : ℝ := + if loc i = v then score (u i) (p v) (σ v) * weight h (u i) (p v) (σ v) else 0 + +def groupSecond (h : ℝ) (u : ι → ℝ) (loc : ι → ν) (p σ : ν → ℝ) (v : ν) (i : ι) : ℝ := + if loc i = v then (score (u i) (p v) (σ v)^2 - (σ v)⁻¹) * + weight h (u i) (p v) (σ v) else 0 + +omit [Fintype ι] [DecidableEq ι] [DecidableEq ν] in +lemma groupWeight_pos {h : ℝ} (hh : 0 < h) (u : ι → ℝ) (loc : ι → ν) + (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (i : ι) : + 0 < groupWeight h u loc p σ i := weight_pos hh (hσ (loc i)) _ _ + +omit [Fintype ι] [DecidableEq ι] in +lemma groupWeight_hasDerivAt_center (h : ℝ) (u : ι → ℝ) (loc : ι → ν) + (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) (i : ι) : + HasDerivAt (fun q => groupWeight h u loc (Function.update p v q) σ i) + (groupFirst h u loc p σ v i) (p v) := by + by_cases hi : loc i = v + · simpa [groupWeight, groupFirst, hi] using + weight_hasDerivAt_center h (u i) (p v) (σ v) (hσ v) + · simpa [groupWeight, groupFirst, hi] using + hasDerivAt_const (p v) (weight h (u i) (p (loc i)) (σ (loc i))) + +omit [Fintype ι] [DecidableEq ι] in +lemma groupFirst_hasDerivAt_center (h : ℝ) (u : ι → ℝ) (loc : ι → ν) + (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) (i : ι) : + HasDerivAt (fun q => groupFirst h u loc (Function.update p v q) σ v i) + (groupSecond h u loc p σ v i) (p v) := by + by_cases hi : loc i = v + · simpa [groupFirst, groupSecond, hi] using + weight_score_hasDerivAt_center h (u i) (p v) (σ v) (hσ v) + · simpa [groupFirst, groupSecond, hi] using hasDerivAt_const (p v) (0 : ℝ) + +omit [Fintype ι] [DecidableEq ι] in +lemma groupFirst_hasDerivAt_other (h : ℝ) (u : ι → ℝ) (loc : ι → ν) + (p σ : ν → ℝ) {v w : ν} (hvw : v ≠ w) (i : ι) : + HasDerivAt (fun q => groupFirst h u loc (Function.update p w q) σ v i) 0 (p w) := by + simpa [groupFirst, Function.update_of_ne hvw] using + hasDerivAt_const (p w) (groupFirst h u loc p σ v i) + +omit [Fintype ι] [DecidableEq ι] in +lemma groupWeight_hasDerivAt_variance (h : ℝ) (u : ι → ℝ) (loc : ι → ν) + (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) (i : ι) : + HasDerivAt (fun q => groupWeight h u loc p (Function.update σ v q) i) + ((1/2 : ℝ) * groupSecond h u loc p σ v i) (σ v) := by + by_cases hi : loc i = v + · simpa [groupWeight, groupSecond, hi, mul_assoc] using + weight_hasDerivAt_variance h (u i) (p v) (σ v) (hσ v) + · simpa [groupWeight, groupSecond, hi] using + hasDerivAt_const (σ v) (weight h (u i) (p (loc i)) (σ (loc i))) + +lemma groupEnergy_hasDerivAt_center (B : Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (loc : ι → ν) (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) : + HasDerivAt (fun q => energy (weightedGram B (groupWeight h u loc (Function.update p v q) σ))) + (energyGradient (weightedGram B (groupWeight h u loc p σ)) + (weightedGram B (groupFirst h u loc p σ v))) (p v) := by + have hd := energy_weightedGram_hasDerivAt B + (Eventually.of_forall fun q i => groupWeight_pos hh u loc (Function.update p v q) hσ i) + (groupWeight_hasDerivAt_center h u loc p hσ v) + simpa only [Function.update_eq_self] using hd + +lemma groupEnergyFirst_hasDerivAt_center (B : Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (loc : ι → ν) (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) : + HasDerivAt (fun q => energyGradient + (weightedGram B (groupWeight h u loc (Function.update p v q) σ)) + (weightedGram B (groupFirst h u loc (Function.update p v q) σ v))) + (hessianCost (weightedGram B (groupWeight h u loc p σ)) + (weightedGram B (groupFirst h u loc p σ v)) + + energyGradient (weightedGram B (groupWeight h u loc p σ)) + (weightedGram B (groupSecond h u loc p σ v))) (p v) := by + have hd := energyGradient_weightedGram_hasDerivAt B + (Eventually.of_forall fun q i => groupWeight_pos hh u loc (Function.update p v q) hσ i) + (groupWeight_hasDerivAt_center h u loc p hσ v) + (groupFirst_hasDerivAt_center h u loc p hσ v) + simp only [Function.update_eq_self] at hd + rw [hessianPair_weightedGram_self B (groupWeight_pos hh u loc p hσ)] at hd + exact hd + +lemma groupEnergyFirst_hasDerivAt_other (B : Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (loc : ι → ν) (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) + {v w : ν} (hvw : v ≠ w) : + HasDerivAt (fun q => energyGradient + (weightedGram B (groupWeight h u loc (Function.update p w q) σ)) + (weightedGram B (groupFirst h u loc (Function.update p w q) σ v))) + (hessianPair (weightedGram B (groupWeight h u loc p σ)) + (weightedGram B (groupFirst h u loc p σ v)) + (weightedGram B (groupFirst h u loc p σ w))) (p w) := by + have hd := energyGradient_weightedGram_hasDerivAt B + (Eventually.of_forall fun q i => groupWeight_pos hh u loc (Function.update p w q) hσ i) + (groupWeight_hasDerivAt_center h u loc p hσ w) + (groupFirst_hasDerivAt_other h u loc p σ hvw) + simpa only [Function.update_eq_self, weightedGram, Complex.ofReal_zero, + Matrix.diagonal_zero, mul_zero, zero_mul, map_zero, add_zero] using hd + +lemma groupEnergy_hasDerivAt_variance (B : Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (loc : ι → ν) (p : ν → ℝ) {σ : ν → ℝ} (hσ : ∀ v, 0 < σ v) (v : ν) : + HasDerivAt (fun q => energy (weightedGram B (groupWeight h u loc p (Function.update σ v q)))) + ((1/2 : ℝ) * energyGradient (weightedGram B (groupWeight h u loc p σ)) + (weightedGram B (groupSecond h u loc p σ v))) (σ v) := by + have hw : ∀ᶠ q in 𝓝 (σ v), ∀ i, 0 < groupWeight h u loc p (Function.update σ v q) i := by + filter_upwards [eventually_gt_nhds (hσ v)] with q hq + apply groupWeight_pos hh u loc p + intro w + by_cases hw : w = v + · simpa [hw] using hq + · simpa [hw] using hσ w + have hd := energy_weightedGram_hasDerivAt B hw (groupWeight_hasDerivAt_variance h u loc p hσ v) + simpa only [Function.update_eq_self, weightedGram_smul, map_smul, smul_eq_mul] using hd + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HardPairing.lean b/lean/OAI/Analysis/TriangularHilbert/HardPairing.lean new file mode 100644 index 0000000000000000000000000000000000000000..c90a4a703cc97046821a8a65f69b3b71effd2b61 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HardPairing.lean @@ -0,0 +1,90 @@ +import OAI.Analysis.TriangularHilbert.ErrorPairing + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section + +def hardKernel (r R t : ℝ) : ℝ := + ((if r < |t| then 1 else 0)-(if R < |t| then 1 else 0))/t + +lemma hardKernel_decomposition {r R : ℝ} (hr : 0 < r) (hb : r ≤ R) (t : ℝ) : + smoothKernel (r^2) (R^2) t = kernelConstant*hardKernel r R t+endpointError r t-endpointError R t := by + have hR := hr.trans_le hb + by_cases ht : t = 0 + · subst t + simp [smoothKernel,signedKernel,hardKernel,endpointError] + unfold smoothKernel + rw [smoothKernel_eq_profile (sq_pos_of_pos hr) (by nlinarith) ht,Real.sqrt_sq hr.le,Real.sqrt_sq hR.le] + unfold endpointError errorProfile hardKernel + simp only [abs_div,abs_of_pos hr,abs_of_pos hR,lt_div_iff₀ hr,lt_div_iff₀ hR,one_mul] + split_ifs <;> ring + +lemma selectedSum_le_no_finset (D : Finset ℤ) (A : Three → Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + (r R : Matrix D D ℝ) (hr : ∀ i j, h ≤ r i j) (hb : ∀ i j, r i j ≤ R i j) : + ‖selectedSum A h (fun m => h*(m:ℤ)) (fun i j => (r i j)^2) (fun i j => (R i j)^2)‖ ≤ + selectedConstant*arrayCubic A h := by + classical + let S : Finset ℝ := insert (h^2) ((Finset.univ.image (fun p : D×D => (r p.1 p.2)^2)) ∪ + (Finset.univ.image (fun p : D×D => (R p.1 p.2)^2))) + apply selectedSum_le_cubic D A _ _ (fun i j => by have hh' := hr i j; have hb' := hb i j; nlinarith) S + (Finset.insert_nonempty _ _) ?_ ?_ hh ?_ + · intro i j + exact Finset.mem_insert_of_mem (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨(i,j),Finset.mem_univ _,rfl⟩)) + · intro i j + exact Finset.mem_insert_of_mem (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨(i,j),Finset.mem_univ _,rfl⟩)) + · intro s hs + rcases Finset.mem_insert.mp hs with rfl|hs + · rfl + rcases Finset.mem_union.mp hs with hs|hs + · rcases Finset.mem_image.mp hs with ⟨⟨i,j⟩,_,rfl⟩ + have hh' := hr i j + nlinarith + · rcases Finset.mem_image.mp hs with ⟨⟨i,j⟩,_,rfl⟩ + have hh' := (hr i j).trans (hb i j) + nlinarith + +def hardPairingConstant : ℝ := (selectedConstant+2*errorPairingConstant)/|kernelConstant| +lemma hardPairingConstant_pos : 0 < hardPairingConstant := by + unfold hardPairingConstant + exact div_pos (add_pos selectedConstant_pos (mul_pos (by norm_num) errorPairingConstant_pos)) (abs_pos.mpr kernelConstant_ne_zero) + +lemma hardPairing_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) {h : ℝ} (hh : 0 < h) + (r R : Matrix D D ℝ) (hr : ∀ i j, h ≤ r i j) (hb : ∀ i j, r i j ≤ R i j) : + ‖kernelPairing A h (fun m => h*(m:ℤ)) (fun i j => hardKernel (r i j) (R i j))‖ ≤ + hardPairingConstant*arrayCubic A h := by + classical + let u : D → ℝ := fun m => h*(m:ℤ) + have he : (kernelConstant:ℂ)*kernelPairing A h u (fun i j => hardKernel (r i j) (R i j)) = + selectedSum A h u (fun i j => (r i j)^2) (fun i j => (R i j)^2)- + kernelPairing A h u (fun i j => endpointError (r i j))+ + kernelPairing A h u (fun i j => endpointError (R i j)) := by + have hk : (fun i j => smoothKernel ((r i j)^2) ((R i j)^2)) = (fun i j t => + kernelConstant*hardKernel (r i j) (R i j) t+endpointError (r i j) t+-1*endpointError (R i j) t) := by + funext i j t + convert hardKernel_decomposition (hh.trans_le (hr i j)) (hb i j) t using 1 + ring + have hs := kernelPairing_smooth A h u (fun i j => (r i j)^2) (fun i j => (R i j)^2) + rw [hk,kernelPairing_add,kernelPairing_add,kernelPairing_const_mul,kernelPairing_const_mul] at hs + push_cast at hs + linear_combination hs + have hn := (norm_add_le (selectedSum A h u (fun i j => (r i j)^2) (fun i j => (R i j)^2)- + kernelPairing A h u (fun i j => endpointError (r i j))) + (kernelPairing A h u (fun i j => endpointError (R i j)))).trans + (add_le_add (norm_sub_le _ _) le_rfl) + rw [← he,norm_mul,Complex.norm_real,Real.norm_eq_abs] at hn + have h1 := selectedSum_le_no_finset D A hh r R hr hb + have h2 := errorPairing_le D A hh r hr + have h3 := errorPairing_le D A hh R (fun i j => (hr i j).trans (hb i j)) + have hden := abs_pos.mpr kernelConstant_ne_zero + rw [hardPairingConstant,div_mul_eq_mul_div,le_div_iff₀ hden] + dsimp [u] at hn + nlinarith only [hn,h1,h2,h3] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HardScalar.lean b/lean/OAI/Analysis/TriangularHilbert/HardScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a7042c85a4011f4556394731c865a69fb774a5b --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HardScalar.lean @@ -0,0 +1,45 @@ +import OAI.Analysis.TriangularHilbert.HardPairing + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma abs_hardKernel_le {r R : ℝ} (hr : 0 < r) (hb : r ≤ R) (t : ℝ) : |hardKernel r R t| ≤ 1/r := by + unfold hardKernel + by_cases hrt : r < |t| + · by_cases hRt : R < |t| + · simp [hrt,hRt,hr.le] + · simp only [hrt,hRt,ite_true,ite_false,sub_zero,abs_div,abs_one] + exact one_div_le_one_div_of_le hr hrt.le + · have hRt : ¬R < |t| := fun h => hrt (hb.trans_lt h) + simp [hrt,hRt,hr.le] + +lemma measurable_hardKernel (r R : ℝ) : Measurable (hardKernel r R) := by + unfold hardKernel + exact ((measurable_const.ite (measurableSet_lt measurable_const measurable_abs) measurable_const).sub + (measurable_const.ite (measurableSet_lt measurable_const measurable_abs) measurable_const)).div measurable_id + +lemma continuousAt_absStep (r t : ℝ) (ht : |t| ≠ r) : + ContinuousAt (fun x : ℝ => if r < |x| then (1:ℝ) else 0) t := by + rcases lt_or_gt_of_ne ht with h|h + · have he : ∀ᶠ x in 𝓝 t, |x| < r := continuous_abs.continuousAt.eventually (eventually_lt_nhds h) + apply (show ContinuousAt (fun _ : ℝ => (0:ℝ)) t from continuousAt_const).congr_of_eventuallyEq + filter_upwards [he] with x hx + simp only [not_lt.mpr hx.le,ite_false] + · have he : ∀ᶠ x in 𝓝 t, r < |x| := continuous_abs.continuousAt.eventually (eventually_gt_nhds h) + apply (show ContinuousAt (fun _ : ℝ => (1:ℝ)) t from continuousAt_const).congr_of_eventuallyEq + filter_upwards [he] with x hx + simp only [hx,ite_true] + +lemma continuousAt_hardKernel (r R t : ℝ) (ht0 : t ≠ 0) (htr : |t| ≠ r) (htR : |t| ≠ R) : + ContinuousAt (hardKernel r R) t := + ((continuousAt_absStep r t htr).sub (continuousAt_absStep R t htR)).div continuousAt_id ht0 +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatBound.lean b/lean/OAI/Analysis/TriangularHilbert/HeatBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..f54cc3a17bed2bce395d97f7e7b3633882844b71 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatBound.lean @@ -0,0 +1,150 @@ +import OAI.Analysis.TriangularHilbert.AbsCost + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +structure HeatAtBounds (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (M : ℝ) : Prop where + energy : ∀ v, ‖heatEnergy A h u p σ v‖ ≤ M + first : ∀ v w, ‖heatFirst A h u p σ v w‖ ≤ M + pure : ∀ v w, ‖heatPure A h u p σ v w‖ ≤ M + variance : ∀ v w, ‖heatVariance A h u p σ v w‖ ≤ M + cost : ∀ v w, ‖heatCost A h u p σ v w‖ ≤ M + mixed : ∀ v w z, w ≠ v → z ≠ v → ‖heatMixed A h u p σ v w z‖ ≤ M + +lemma heatAtBounds_of_norms (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {E L Q : ℝ} (hE : 0 ≤ E) (hL : 0 ≤ L) (hQ : 0 ≤ Q) + (hr : ∀ v w, ‖heatCarrier A h u p σ v w‖^3 ≤ E) + (hl : ∀ w, ‖heatMask (fun a j => if a = w then score (u j) (p a) (σ a) else 0)‖ ≤ L) + (hq : ∀ w, ‖heatMask (fun a j => if a = w then score (u j) (p a) (σ a)^2-(σ a)⁻¹ else 0)‖ ≤ Q) : + HeatAtBounds A h u p σ + (‖traceRealCLM (ι := BlockSpace ι)‖ * E * (1 + (3/2:ℝ)*L + (3/4:ℝ)*L^2 + (3/2:ℝ)*Q)) := by + let N := ‖traceRealCLM (ι := BlockSpace ι)‖ + have hN : 0 ≤ N := norm_nonneg _ + have he v : ‖heatEnergy A h u p σ v‖ ≤ N * E := by + rw [heatEnergy_eq_localGram A hh u p hσ v v, localGram_eq_carrier A hh u p hσ v v] + exact (norm_energy_gram_le _).trans (mul_le_mul_of_nonneg_left (hr v v) hN) + have hf v w : ‖heatFirst A h u p σ v w‖ ≤ (3/2:ℝ)*N*L*E := by + simp only [heatFirst, localGram_eq_carrier A hh u p hσ, localFirst_eq_carrier A hh u p hσ] + apply (norm_energyGradient_inserted_gram_le _ _).trans + gcongr + · exact hl w + · exact hr v w + have hg v w : ‖energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w)‖ ≤ + (3/2:ℝ)*N*Q*E := by + simp only [localGram_eq_carrier A hh u p hσ, localSecond_eq_carrier A hh u p hσ] + apply (norm_energyGradient_inserted_gram_le _ _).trans + gcongr + · exact hq w + · exact hr v w + have hc v w : ‖heatCost A h u p σ v w‖ ≤ (3/4:ℝ)*N*L^2*E := by + simp only [heatCost, localGram_eq_carrier A hh u p hσ, localFirst_eq_carrier A hh u p hσ] + apply (norm_hessianCost_inserted_gram_le _ _ (heatMask_isHermitian _)).trans + gcongr + · exact hl w + · exact hr v w + have hNE := mul_nonneg hN hE + have hNLE := mul_nonneg (mul_nonneg hN hL) hE + have hNL2E := mul_nonneg (mul_nonneg hN (sq_nonneg L)) hE + have hNQE := mul_nonneg (mul_nonneg hN hQ) hE + constructor + · intro v; dsimp only [N] at *; nlinarith [he v] + · intro v w; dsimp only [N] at *; nlinarith [hf v w] + · intro v w + have hp : ‖heatPure A h u p σ v w‖ ≤ ‖heatCost A h u p σ v w‖ + + ‖energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w)‖ := norm_add_le _ _ + dsimp only [N] at *; nlinarith [hc v w, hg v w] + · intro v w + have hv : ‖heatVariance A h u p σ v w‖ = (1/2:ℝ) * + ‖energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w)‖ := by + simp [heatVariance, norm_mul] + rw [hv]; dsimp only [N] at *; nlinarith [hg v w] + · intro v w; dsimp only [N] at *; nlinarith [hc v w] + · intro v w z hw hz + have hx := two_abs_heatMixed_le A hh u p hσ hw hz + rw [← Real.norm_eq_abs] at hx + have hwle := le_abs_self (heatCost A h u p σ v w) + have hzle := le_abs_self (heatCost A h u p σ v z) + rw [← Real.norm_eq_abs] at hwle hzle + dsimp only [N] at *; nlinarith [hc v w, hc v z] + +lemma HeatAtBounds.mono {A : Three → Matrix ι ι ℂ} {h : ℝ} {u : ι → ℝ} + {p σ : Three → ℝ} {M N : ℝ} (hb : HeatAtBounds A h u p σ M) (hMN : M ≤ N) : + HeatAtBounds A h u p σ N := by + exact ⟨fun v => (hb.energy v).trans hMN, fun v w => (hb.first v w).trans hMN, + fun v w => (hb.pure v w).trans hMN, fun v w => (hb.variance v w).trans hMN, + fun v w => (hb.cost v w).trans hMN, fun v w z hw hz => (hb.mixed v w z hw hz).trans hMN⟩ + +lemma exists_heat_uniform_majorant (A : Three → Matrix ι ι ℂ) {h a b D : ℝ} + (hh : 0 < h) (ha : 0 < a) (hab : a ≤ b) (hD : 0 ≤ D) (u : ι → ℝ) : + ∃ B : (ℝ × ℝ) → ℝ, Integrable B ∧ (∀ z, 0 ≤ B z) ∧ + ∀ (i : Three) (d : ℝ) (z : ℝ × ℝ), |d| ≤ D → ∀ (σ : Three → ℝ), + (∀ w, a ≤ σ w) → (∀ w, σ w ≤ b) → HeatAtBounds A h u (chart i d z) σ (B z) := by + obtain ⟨R,hR,hRB⟩ := exists_heatCarrier_gaussian_bound A hh ha hab hD u + obtain ⟨S,hS,hSB⟩ := exists_score_polynomial_bound u ha hD + let T := entryNormConstant (BlockSpace ι) + let L := T*S + let Q := T*(S^2+a⁻¹) + have hT : 0 ≤ T := entryNormConstant_nonneg + have hL : 0 ≤ L := mul_nonneg hT hS + have hQ : 0 ≤ Q := mul_nonneg hT (add_nonneg (sq_nonneg _) (inv_nonneg.mpr ha.le)) + let N := ‖traceRealCLM (ι := BlockSpace ι)‖ + let C := N * R^3 * (1+(3/2:ℝ)*L+(3/4:ℝ)*L^2+(3/2:ℝ)*Q) + have hN : 0 ≤ N := norm_nonneg _ + have hC : 0 ≤ C := by dsimp [C]; positivity + have hbpos : 0 < b := ha.trans_le hab + have hb : 0 < 1/(32*b) := by positivity + refine ⟨fun z => C * (planePoly z^2 * planeGaussian (1/(32*b)) z), + (integrable_planePoly_sq_gaussian hb).const_mul C, + fun z => mul_nonneg hC (mul_nonneg (sq_nonneg _) (planeGaussian_pos _ _).le), ?_⟩ + intro i d z hd σ hσa hσb + have hσ : ∀ w, 0 < σ w := fun w => ha.trans_le (hσa w) + let P := planePoly z + let G := planeGaussian (1/(32*b)) z + have hP : 0 ≤ P := planePoly_nonneg z + have hP1 : 1 ≤ P := one_le_planePoly z + have hG : 0 ≤ G := (planeGaussian_pos _ _).le + have hG1 : G ≤ 1 := planeGaussian_le_one hb.le z + have hr v w : ‖heatCarrier A h u (chart i d z) σ v w‖^3 ≤ R^3 * G := by + calc + _ ≤ (R*G)^3 := pow_le_pow_left₀ (norm_nonneg _) (hRB i d z hd σ hσa hσb v w) 3 + _ = R^3*G^3 := mul_pow _ _ _ + _ ≤ R^3 * G := by gcongr; nlinarith [mul_nonneg hG (sub_nonneg.mpr hG1)] + have hl w : ‖heatMask (fun a j => if a = w then score (u j) (chart i d z a) (σ a) else 0)‖ ≤ L*P := by + calc + _ ≤ T*(S*P) := norm_heatMask_le _ (mul_nonneg hS hP) (by + intro a j; split_ifs + · exact (hSB i d z hd σ hσa a j).1 + · simpa using mul_nonneg hS hP) + _ = _ := by dsimp [L]; ring + have hq w : ‖heatMask (fun a j => if a = w then score (u j) (chart i d z a) (σ a)^2-(σ a)⁻¹ else 0)‖ ≤ Q*P^2 := by + calc + _ ≤ T*((S^2+a⁻¹)*P^2) := norm_heatMask_le _ (by positivity) (by + intro k j; split_ifs + · exact (hSB i d z hd σ hσa k j).2 + · simpa using (show 0 ≤ (S^2+a⁻¹)*P^2 by positivity)) + _ = _ := by dsimp [Q]; ring + apply (heatAtBounds_of_norms A hh u (chart i d z) hσ + (mul_nonneg (pow_nonneg hR _) hG) (mul_nonneg hL hP) + (mul_nonneg hQ (sq_nonneg P)) hr hl hq).mono + change N*(R^3*G)*(1+(3/2:ℝ)*(L*P)+(3/4:ℝ)*(L*P)^2+(3/2:ℝ)*(Q*P^2)) ≤ C*(P^2*G) + have hP2 : P ≤ P^2 := by nlinarith + have h1P2 : 1 ≤ P^2 := le_trans hP1 hP2 + calc + _ = N*R^3*G*(1+(3/2:ℝ)*L*P+(3/4:ℝ)*L^2*P^2+(3/2:ℝ)*Q*P^2) := by ring + _ ≤ N*R^3*G*(P^2+(3/2:ℝ)*L*P^2+(3/4:ℝ)*L^2*P^2+(3/2:ℝ)*Q*P^2) := by gcongr + _ = _ := by dsimp [C]; ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatContinuous.lean b/lean/OAI/Analysis/TriangularHilbert/HeatContinuous.lean new file mode 100644 index 0000000000000000000000000000000000000000..0bb3e86ae8ab32c762fc588a2ef082ab45e88ecd --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatContinuous.lean @@ -0,0 +1,151 @@ +import OAI.Analysis.TriangularHilbert.HeatTime + +namespace OAI + +universe uι uE + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma heatArray_differentiableAt_centers (A : Three → Matrix ι ι ℂ) {h : ℝ} + (hh : 0 < h) (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + (p : Three → ℝ) (v : Three) : + DifferentiableAt ℝ (fun q => heatArray A h u q σ v) p := by + apply differentiableAt_pi.mpr + intro i + apply differentiableAt_pi.mpr + intro j + have happ (w : Three) : DifferentiableAt ℝ (fun q : Three → ℝ => q w) p := by + convert! (ContinuousLinearMap.proj w : (Three → ℝ) →L[ℝ] ℝ).differentiableAt + have hw (a : Three) (k : ι) : DifferentiableAt ℝ + (fun q : Three → ℝ => weight h (u k) (q a) (σ a)) p := by + have hd := (weight_hasDerivAt_center h (u k) (p a) (σ a) (hσ a)).differentiableAt.comp p (happ a) + exact hd + have hleft := (hw v i).sqrt (weight_pos hh (hσ v) (u i) (p v)).ne' + have hright := (hw (v+1) j).sqrt (weight_pos hh (hσ (v+1)) (u j) (p (v+1))).ne' + exact ((Complex.ofRealCLM.differentiableAt.comp p hleft).mul_const (A v i j)).mul + (Complex.ofRealCLM.differentiableAt.comp p hright) + +lemma continuous_heatRow (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + Continuous (fun p => rowStar (heatArray A h u p σ) v) := by + apply continuous_iff_continuousAt.mpr + intro p + exact (rowStar_differentiableAt (heatArray_differentiableAt_centers A hh u hσ p) v).continuousAt + +lemma continuous_heatCarrier (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Continuous (fun p => heatCarrier A h u p σ v w) := by + unfold heatCarrier + split_ifs + · exact continuous_heatRow A hh u hσ v + · exact (continuous_heatRow A hh u hσ v).star + +lemma continuous_heatEnergy (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + Continuous (fun p => heatEnergy A h u p σ v) := by + exact continuous_energyGram.comp (continuous_heatRow A hh u hσ v) + +omit [Fintype ι] in +lemma continuous_heatMask {E : Type uE} [TopologicalSpace E] {r : E → Three → ι → ℝ} + (hr : ∀ w j, Continuous (fun x => r x w j)) : Continuous (fun x => heatMask (r x)) := by + simp only [heatMask_eq_diagonal] + apply continuous_pi + intro a + apply continuous_pi + intro b + by_cases hab : a = b + · subst b + simp only [Matrix.diagonal_apply_eq] + exact Complex.continuous_ofReal.comp (hr a.1 a.2) + · simp only [Matrix.diagonal_apply_ne _ hab] + exact continuous_const + +omit [Fintype ι] in +lemma continuous_scoreMask (u : ι → ℝ) (σ : Three → ℝ) (w : Three) : + Continuous (fun p : Three → ℝ => heatMask (fun a j => if a = w then score (u j) (p a) (σ a) else 0)) := by + apply continuous_heatMask + intro a j + split_ifs + · unfold score; fun_prop + · exact continuous_const + +omit [Fintype ι] in +lemma continuous_secondMask (u : ι → ℝ) (σ : Three → ℝ) (w : Three) : + Continuous (fun p : Three → ℝ => heatMask (fun a j => if a = w then score (u j) (p a) (σ a)^2-(σ a)⁻¹ else 0)) := by + apply continuous_heatMask + intro a j + split_ifs + · unfold score; fun_prop + · exact continuous_const + +lemma continuous_energyGradient_insert {E : Type uE} [TopologicalSpace E] + {R L : E → Matrix ι ι ℂ} (hr : Continuous R) (hl : Continuous L) : + Continuous (fun x => energyGradient ((R x)ᴴ * R x) ((R x)ᴴ * L x * R x)) := by + have hs := continuous_sqrt_matrix (hr.star.mul hr) (fun x => Matrix.posSemidef_conjTranspose_mul_self (R x)) + simp only [energyGradient_apply] + exact continuous_const.mul (traceRealCLM.continuous.comp (hs.mul ((hr.star.mul hl).mul hr))) + +lemma continuous_heatFirst (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Continuous (fun p => heatFirst A h u p σ v w) := by + simp only [heatFirst, localGram_eq_carrier A hh u _ hσ, localFirst_eq_carrier A hh u _ hσ] + exact continuous_energyGradient_insert (continuous_heatCarrier A hh u hσ v w) + (continuous_scoreMask u σ w) + +lemma continuous_heatSecondGradient (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Continuous (fun p => energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w)) := by + simp only [localGram_eq_carrier A hh u _ hσ, localSecond_eq_carrier A hh u _ hσ] + exact continuous_energyGradient_insert (continuous_heatCarrier A hh u hσ v w) + (continuous_secondMask u σ w) + +lemma continuous_heatVariance (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Continuous (fun p => heatVariance A h u p σ v w) := + continuous_const.mul (continuous_heatSecondGradient A hh u hσ v w) + +lemma measurable_heatPure (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Measurable (fun p => heatPure A h u p σ v w) := by + have hc : Continuous (fun q : (Three → ℝ) × ℝ => heatFirst A h u (Function.update q.1 w q.2) σ v w) := + (continuous_heatFirst A hh u hσ v w).comp (by fun_prop) + have hm := (measurable_deriv_with_param + (f := fun p q => heatFirst A h u (Function.update p w q) σ v w) hc).comp + (show Measurable (fun p : Three → ℝ => (p, p w)) by fun_prop) + convert! hm using 1 + funext p + exact (heatFirst_hasDerivAt_center A hh u p hσ v w).deriv.symm + +lemma measurable_heatCost (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + Measurable (fun p => heatCost A h u p σ v w) := by + have hm := (measurable_heatPure A hh u hσ v w).sub + (continuous_heatSecondGradient A hh u hσ v w).measurable + convert! hm using 1 + funext p + simp [heatPure, heatCost] + +lemma measurable_heatMixed (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ a, 0 < σ a) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (hwz : w ≠ z) : + Measurable (fun p => heatMixed A h u p σ v w z) := by + have hc : Continuous (fun q : (Three → ℝ) × ℝ => heatFirst A h u (Function.update q.1 z q.2) σ v w) := + (continuous_heatFirst A hh u hσ v w).comp (by fun_prop) + have hm := (measurable_deriv_with_param + (f := fun p q => heatFirst A h u (Function.update p z q) σ v w) hc).comp + (show Measurable (fun p : Three → ℝ => (p, p z)) by fun_prop) + convert! hm using 1 + funext p + exact (heatFirst_hasDerivAt_other A hh u p hσ hw hz hwz).deriv.symm + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatCost.lean b/lean/OAI/Analysis/TriangularHilbert/HeatCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..63e11c150f224c2b378b4872de3f93d67d57d564 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatCost.lean @@ -0,0 +1,157 @@ +import OAI.Analysis.TriangularHilbert.StarInsertion + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology BigOperators +open Filter +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def heatCost (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w : Three) : ℝ := + hessianCost (localGram A h u p σ v w) (localFirst A h u p σ v w) + +def heatMixed (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w z : Three) : ℝ := + hessianPair (localGram A h u p σ v w) (localFirst A h u p σ v w) + (localFirst A h u p σ v z) + +def heatScores (u : ι → ℝ) (p σ : Three → ℝ) : Three → Matrix ι ι ℂ := + fun w => Matrix.diagonal (fun i => (score (u i) (p w) (σ w) : ℂ)) + +lemma fixedBase_update_other (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (q : ℝ) : + fixedBase A (heatWeights h u (Function.update p z q) σ) v w = + fixedBase A (heatWeights h u p σ) v w := by + simp only [fixedBase, ite_eq_right hw] + apply colBare_congr + intro i + simp only [heatWeights, Function.update_of_ne (Ne.symm hz)] + +lemma heatFirst_hasDerivAt_other (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (hwz : w ≠ z) : + HasDerivAt (fun q => heatFirst A h u (Function.update p z q) σ v w) + (heatMixed A h u p σ v w z) (p z) := by + have hd := groupEnergyFirst_hasDerivAt_other (colBare A (heatWeights h u p σ) v) + hh (fun a : BlockSpace ι => u a.2) Prod.fst p hσ hwz + simp only [heatMixed, localGram, localFirst, fixedBase, ite_eq_right hw, ite_eq_right hz] + apply hd.congr_of_eventuallyEq + apply Eventually.of_forall + intro q + dsimp only + unfold heatFirst localGram localFirst + rw [fixedBase_update_other A h u p σ hw hz q] + simp only [fixedBase, ite_eq_right hw] + +lemma two_heatMixed_le (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) : + 2 * heatMixed A h u p σ v w z ≤ heatCost A h u p σ v w + heatCost A h u p σ v z := by + simp only [heatMixed, heatCost, localGram, localFirst, fixedBase, ite_eq_right hw, ite_eq_right hz] + exact two_hessianPair_weightedGram_le _ (groupWeight_pos hh _ _ p hσ) _ _ + +lemma localGram_center (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + localGram A h u p σ v v = starGram (heatArray A h u p σ) v := by + simp only [localGram, fixedBase, ite_true] + exact (starGram_weightedArray A _ (fun w i => (weight_pos hh (hσ w) (u i) (p w)).le) v).symm + +lemma localGram_other (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w : Three} (hw : w ≠ v) : + localGram A h u p σ v w = rowStar (heatArray A h u p σ) v * + (rowStar (heatArray A h u p σ) v)ᴴ := by + simp only [localGram, fixedBase, ite_eq_right hw] + exact (centerGram_weightedArray_padded A _ + (fun w i => (weight_pos hh (hσ w) (u i) (p w)).le) v).symm + +omit [Fintype ι] [DecidableEq ι] in +lemma groupFirst_eq_insert (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (w : Three) : + groupFirst h (fun a : BlockSpace ι => u a.2) Prod.fst p σ w = + fun a : BlockSpace ι => heatWeights h u p σ a.1 a.2 * + (if a.1 = w then score (u a.2) (p a.1) (σ a.1) else 0) := by + funext a + simp only [groupFirst, heatWeights] + split_ifs with ha + · rw [ha, mul_comm] + · rw [mul_zero] + +lemma localFirst_center (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + localFirst A h u p σ v v = + starInsert (heatArray A h u p σ) (heatScores u p σ) v := by + simp only [localFirst, fixedBase, ite_true, groupFirst_eq_insert] + rw [rowBare_insert A (heatWeights h u p σ) + (fun w i => if w = v then score (u i) (p w) (σ w) else 0) + (fun w i => (weight_pos hh (hσ w) (u i) (p w)).le) v] + rw [starInsert_eq_insertRow, starInsert_eq_insertRow] + simp only [heatArray, heatScores, ite_true] + +lemma localFirst_other (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w : Three} (hw : w ≠ v) : + localFirst A h u p σ v w = rowStar (heatArray A h u p σ) v * + blockD (fun a => if a = w then heatScores u p σ w else 0) * + (rowStar (heatArray A h u p σ) v)ᴴ := by + simp only [localFirst, fixedBase, ite_eq_right hw, groupFirst_eq_insert] + rw [colBare_insert A (heatWeights h u p σ) + (fun a i => if a = w then score (u i) (p a) (σ a) else 0) + (fun a i => (weight_pos hh (hσ a) (u i) (p a)).le) v] + congr 2 + congr 1 + funext a + by_cases ha : a = w + · subst a + simp [heatScores] + · simp [ha] + +lemma heatCost_center (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + heatCost A h u p σ v v = hessianCost (starGram (heatArray A h u p σ) v) + (starInsert (heatArray A h u p σ) (heatScores u p σ) v) := by + rw [heatCost, localGram_center A hh u p hσ, localFirst_center A hh u p hσ] + +lemma heatCost_other (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + {v w : Three} (hw : w ≠ v) : + heatCost A h u p σ v w = hessianCost (centerGram (heatArray A h u p σ) v) + ((triangleBlocks (heatArray A h u p σ) w v)ᴴ * heatScores u p σ w * + triangleBlocks (heatArray A h u p σ) w v) := by + rw [heatCost, localGram_other A hh u p hσ hw, localFirst_other A hh u p hσ hw] + exact hessianCost_rowStar_singleBlock _ _ v w + +lemma heatCost_nonneg (A : Three → Matrix ι ι ℂ) (h : ℝ) + (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) : + 0 ≤ heatCost A h u p σ v w := by + unfold heatCost hessianCost rootCost + apply mul_nonneg (by norm_num) + by_cases hb : BddAbove (Set.range (variation (CFC.sqrt (localGram A h u p σ v w)) + (localFirst A h u p σ v w))) + · apply le_csSup hb + exact ⟨0, by simp [variation, penalty]⟩ + · rw [Real.sSup_of_not_bddAbove hb] + +lemma heatCost_neighbors (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (w : Three) : + (∑ v, if v = w then 0 else heatCost A h u p σ v w) ≤ + Real.sqrt 2 * heatCost A h u p σ w w := by + rw [heatCost_center A hh u p hσ] + convert neighbor_comparison (heatArray A h u p σ) (heatScores u p σ) w using 1 + apply Finset.sum_congr rfl + intro v _ + by_cases hv : v = w + · subst v + simp [triangleBlocks_diag, hessianCost_zero_direction] + · rw [ite_eq_right hv, heatCost_other A hh u p hσ (Ne.symm hv)] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatInsert.lean b/lean/OAI/Analysis/TriangularHilbert/HeatInsert.lean new file mode 100644 index 0000000000000000000000000000000000000000..46e802638f5e907553d5c73d6a0cea8d63ba7f3a --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatInsert.lean @@ -0,0 +1,97 @@ +import OAI.Analysis.TriangularHilbert.NormBounds + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def heatCarrier (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w : Three) := + if w = v then rowStar (heatArray A h u p σ) v else (rowStar (heatArray A h u p σ) v)ᴴ + +def heatMask (d : Three → ι → ℝ) : Matrix (BlockSpace ι) (BlockSpace ι) ℂ := + blockD (fun w => Matrix.diagonal (fun i => (d w i : ℂ))) + +omit [Fintype ι] in +lemma heatMask_eq_diagonal (d : Three → ι → ℝ) : + heatMask d = Matrix.diagonal (fun a : BlockSpace ι => (d a.1 a.2 : ℂ)) := by + ext ⟨v,i⟩ ⟨w,j⟩ + by_cases hv : v = w <;> by_cases hi : i = j <;> + simp [heatMask, blockD, blocks, Matrix.diagonal, hv, hi, Prod.mk.injEq] + +omit [Fintype ι] in +lemma heatMask_isHermitian (d : Three → ι → ℝ) : (heatMask d).IsHermitian := by + rw [heatMask_eq_diagonal] + exact Matrix.isHermitian_diagonal_iff.mpr (fun a => by change star (d a.1 a.2 : ℂ) = _; exact Complex.conj_ofReal _) + +lemma heatCarrier_norm (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w : Three) : + ‖heatCarrier A h u p σ v w‖ = ‖rowStar (heatArray A h u p σ) v‖ := by + unfold heatCarrier + split_ifs + · rfl + · exact norm_star (rowStar (heatArray A h u p σ) v) + +lemma localGram_eq_carrier (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + localGram A h u p σ v w = + (heatCarrier A h u p σ v w)ᴴ * heatCarrier A h u p σ v w := by + unfold heatCarrier + split_ifs with hw + · subst w + exact localGram_center A hh u p hσ v + · rw [Matrix.conjTranspose_conjTranspose] + exact localGram_other A hh u p hσ hw + +lemma localInsert_eq_carrier (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) + (v w : Three) (d : Three → ι → ℝ) : + weightedGram (fixedBase A (heatWeights h u p σ) v w) + (fun a : BlockSpace ι => heatWeights h u p σ a.1 a.2 * d a.1 a.2) = + (heatCarrier A h u p σ v w)ᴴ * heatMask d * heatCarrier A h u p σ v w := by + simp only [fixedBase, heatCarrier] + split_ifs + · exact rowBare_insert A _ d (fun a j => (weight_pos hh (hσ a) (u j) (p a)).le) v + · rw [Matrix.conjTranspose_conjTranspose] + exact colBare_insert A _ d (fun a j => (weight_pos hh (hσ a) (u j) (p a)).le) v + +lemma localFirst_eq_carrier (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + localFirst A h u p σ v w = (heatCarrier A h u p σ v w)ᴴ * + heatMask (fun a i => if a = w then score (u i) (p a) (σ a) else 0) * + heatCarrier A h u p σ v w := by + rw [localFirst, groupFirst_eq_insert] + exact localInsert_eq_carrier A hh u p hσ v w + (fun a i => if a = w then score (u i) (p a) (σ a) else 0) + +omit [Fintype ι] [DecidableEq ι] in +lemma groupSecond_eq_insert (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (w : Three) : + groupSecond h (fun a : BlockSpace ι => u a.2) Prod.fst p σ w = + fun a : BlockSpace ι => heatWeights h u p σ a.1 a.2 * + (if a.1 = w then score (u a.2) (p a.1) (σ a.1)^2 - (σ a.1)⁻¹ else 0) := by + funext a + simp only [groupSecond, heatWeights] + split_ifs with ha + · rw [ha, mul_comm] + · rw [mul_zero] + +lemma localSecond_eq_carrier (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + localSecond A h u p σ v w = (heatCarrier A h u p σ v w)ᴴ * + heatMask (fun a i => if a = w then score (u i) (p a) (σ a)^2 - (σ a)⁻¹ else 0) * + heatCarrier A h u p σ v w := by + rw [localSecond, groupSecond_eq_insert] + exact localInsert_eq_carrier A hh u p hσ v w + (fun a i => if a = w then score (u i) (p a) (σ a)^2 - (σ a)⁻¹ else 0) + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatStar.lean b/lean/OAI/Analysis/TriangularHilbert/HeatStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..61ecd4bee200df8beedc0c5a575fa2a907e42a79 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatStar.lean @@ -0,0 +1,138 @@ +import OAI.Analysis.TriangularHilbert.GroupedGaussian + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +open Filter +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def heatWeights (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) : Three → ι → ℝ := + fun v i => weight h (u i) (p v) (σ v) + +def heatArray (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) := + weightedArray A (heatWeights h u p σ) + +def heatEnergy (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v : Three) : ℝ := + energy (starGram (heatArray A h u p σ) v) + +def fixedBase (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v w : Three) := + if w = v then rowBare A g v else colBare A g v + +def localGram (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) := + weightedGram (fixedBase A (heatWeights h u p σ) v w) + (groupWeight h (fun a : BlockSpace ι => u a.2) Prod.fst p σ) + +def localFirst (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) := + weightedGram (fixedBase A (heatWeights h u p σ) v w) + (groupFirst h (fun a : BlockSpace ι => u a.2) Prod.fst p σ w) + +def localSecond (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) := + weightedGram (fixedBase A (heatWeights h u p σ) v w) + (groupSecond h (fun a : BlockSpace ι => u a.2) Prod.fst p σ w) + +def heatFirst (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) : ℝ := + energyGradient (localGram A h u p σ v w) (localFirst A h u p σ v w) + +def heatPure (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) : ℝ := + hessianCost (localGram A h u p σ v w) (localFirst A h u p σ v w) + + energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w) + +def heatVariance (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v w : Three) : ℝ := + (1/2 : ℝ) * energyGradient (localGram A h u p σ v w) (localSecond A h u p σ v w) + +lemma heatEnergy_eq_localGram (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + heatEnergy A h u p σ v = energy (localGram A h u p σ v w) := by + have hg : ∀ w i, 0 ≤ heatWeights h u p σ w i := fun w i => + (weight_pos hh (hσ w) (u i) (p w)).le + unfold heatEnergy localGram fixedBase + split_ifs + · rw [heatArray, starGram_weightedArray A _ hg] + rfl + · rw [starGram, energy_gram_flip, heatArray, centerGram_weightedArray_padded A _ hg] + rfl + +lemma fixedBase_update_center (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w : Three) (q : ℝ) : + fixedBase A (heatWeights h u (Function.update p w q) σ) v w = + fixedBase A (heatWeights h u p σ) v w := by + unfold fixedBase + split_ifs with hw + · subst w + apply rowBare_congr + intro w hw i + simp only [heatWeights, Function.update_of_ne hw] + · apply colBare_congr + intro i + simp only [heatWeights, Function.update_of_ne (Ne.symm hw)] + +lemma fixedBase_update_variance (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p σ : Three → ℝ) (v w : Three) (q : ℝ) : + fixedBase A (heatWeights h u p (Function.update σ w q)) v w = + fixedBase A (heatWeights h u p σ) v w := by + unfold fixedBase + split_ifs with hw + · subst w + apply rowBare_congr + intro w hw i + simp only [heatWeights, Function.update_of_ne hw] + · apply colBare_congr + intro i + simp only [heatWeights, Function.update_of_ne (Ne.symm hw)] + +lemma heatEnergy_hasDerivAt_center (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + HasDerivAt (fun q => heatEnergy A h u (Function.update p w q) σ v) + (heatFirst A h u p σ v w) (p w) := by + have hd := groupEnergy_hasDerivAt_center (fixedBase A (heatWeights h u p σ) v w) + hh (fun a : BlockSpace ι => u a.2) Prod.fst p hσ w + apply hd.congr_of_eventuallyEq + apply Eventually.of_forall + intro q + dsimp only + rw [heatEnergy_eq_localGram A hh u _ hσ v w] + unfold localGram + rw [fixedBase_update_center] + +lemma heatFirst_hasDerivAt_center (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + HasDerivAt (fun q => heatFirst A h u (Function.update p w q) σ v w) + (heatPure A h u p σ v w) (p w) := by + have hd := groupEnergyFirst_hasDerivAt_center (fixedBase A (heatWeights h u p σ) v w) + hh (fun a : BlockSpace ι => u a.2) Prod.fst p hσ w + apply hd.congr_of_eventuallyEq + apply Eventually.of_forall + intro q + dsimp only + unfold heatFirst localGram localFirst + rw [fixedBase_update_center] + +lemma heatEnergy_hasDerivAt_variance (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + HasDerivAt (fun q => heatEnergy A h u p (Function.update σ w q) v) + (heatVariance A h u p σ v w) (σ w) := by + have hd := groupEnergy_hasDerivAt_variance (fixedBase A (heatWeights h u p σ) v w) + hh (fun a : BlockSpace ι => u a.2) Prod.fst p hσ w + apply hd.congr_of_eventuallyEq + filter_upwards [eventually_gt_nhds (hσ w)] with q hq + have hσ' : ∀ a, 0 < Function.update σ w q a := by + intro a + by_cases ha : a = w + · simpa [ha] using hq + · simpa [ha] using hσ a + rw [heatEnergy_eq_localGram A hh u _ hσ' v w] + unfold localGram + rw [fixedBase_update_variance] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/HeatTime.lean b/lean/OAI/Analysis/TriangularHilbert/HeatTime.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8469335d569b66346f0577a6890a331c5490e0a --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/HeatTime.lean @@ -0,0 +1,124 @@ +import OAI.Analysis.TriangularHilbert.GramDeriv + +namespace OAI + +universe uν uι uE + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology BigOperators +open Filter +noncomputable section + +lemma hasDerivAt_of_coordinates {ν : Type uν} [Fintype ν] [DecidableEq ν] + {f : (ν → ℝ) → ℝ} {g : ℝ → ν → ℝ} {g' k : ν → ℝ} {s : ℝ} + (hf : DifferentiableAt ℝ f (g s)) (hg : HasDerivAt g g' s) + (hk : ∀ i, HasDerivAt (fun q => f (Function.update (g s) i q)) (k i) (g s i)) : + HasDerivAt (fun t => f (g t)) (∑ i, g' i * k i) s := by + let T := fderiv ℝ f (g s) + have hTi : ∀ i, T (Pi.single i 1) = k i := by + intro i + have hfu : HasFDerivAt f T (Function.update (g s) i (g s i)) := by + simpa only [Function.update_eq_self] using hf.hasFDerivAt + have hi := hfu.comp_hasDerivAt (g s i) + ((hasFDerivAt_update (i := i) (g s) (g s i)).hasDerivAt) + have he : (ContinuousLinearMap.pi (Pi.single i (ContinuousLinearMap.id ℝ ℝ)) : ℝ →L[ℝ] (ν → ℝ)) 1 = + Pi.single i (1 : ℝ) := by + ext j + by_cases hj : j = i <;> simp [hj] + rw [he] at hi + exact hi.unique (hk i) + have hT : T g' = ∑ i, g' i * k i := by + conv_lhs => rw [← Finset.univ_sum_single g'] + rw [map_sum] + apply Finset.sum_congr rfl + intro i _ + have he : Pi.single i (g' i) = g' i • Pi.single i (1 : ℝ) := by + ext j + by_cases hj : j = i <;> simp [hj] + rw [he, map_smul, hTi, smul_eq_mul] + have hd := hf.hasFDerivAt.comp_hasDerivAt s hg + change HasDerivAt _ (T g') s at hd + rwa [hT] at hd + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma weight_differentiableAt_variances (h a b : ℝ) (w : Three) + {σ : Three → ℝ} (hσ : 0 < σ w) : + DifferentiableAt ℝ (fun τ : Three → ℝ => weight h a b (τ w)) σ := by + have hap : DifferentiableAt ℝ (fun τ : Three → ℝ => τ w) σ := by + convert! (ContinuousLinearMap.proj w : (Three → ℝ) →L[ℝ] ℝ).differentiableAt + have hd := (weight_hasDerivAt_variance h a b (σ w) hσ).differentiableAt.comp σ hap + exact hd + +omit [DecidableEq ι] in +lemma heatArray_differentiableAt_variances (A : Three → Matrix ι ι ℂ) {h : ℝ} + (hh : 0 < h) (u : ι → ℝ) (p : Three → ℝ) + {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + DifferentiableAt ℝ (fun τ => heatArray A h u p τ v) σ := by + apply differentiableAt_pi.mpr + intro i + apply differentiableAt_pi.mpr + intro j + have hleft := (weight_differentiableAt_variances h (u i) (p v) v (hσ v)).sqrt + (weight_pos hh (hσ v) (u i) (p v)).ne' + have hright := (weight_differentiableAt_variances h (u j) (p (v+1)) (v+1) (hσ (v+1))).sqrt + (weight_pos hh (hσ (v+1)) (u j) (p (v+1))).ne' + exact ((Complex.ofRealCLM.differentiableAt.comp σ hleft).mul_const (A v i j)).mul + (Complex.ofRealCLM.differentiableAt.comp σ hright) + +omit [DecidableEq ι] in +lemma triangleBlocks_differentiableAt {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] + {W : E → Three → Matrix ι ι ℂ} {x : E} (hW : ∀ v, DifferentiableAt ℝ (fun y => W y v) x) + (v w : Three) : DifferentiableAt ℝ (fun y => triangleBlocks (W y) v w) x := by + apply differentiableAt_pi.mpr + intro i + apply differentiableAt_pi.mpr + intro j + have he v i j := (differentiableAt_pi.mp (differentiableAt_pi.mp (hW v) i) j) + fin_cases v <;> fin_cases w <;> simp only [triangleBlocks] + all_goals first | exact differentiableAt_const _ | exact he _ _ _ | exact (he _ _ _).star + +lemma rowStar_differentiableAt {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] + {W : E → Three → Matrix ι ι ℂ} {x : E} (hW : ∀ v, DifferentiableAt ℝ (fun y => W y v) x) + (v : Three) : DifferentiableAt ℝ (fun y => rowStar (W y) v) x := by + apply differentiableAt_pi.mpr + intro a + apply differentiableAt_pi.mpr + intro b + simp only [rowStar_apply] + by_cases ha : a.1 = v + · simp only [ite_eq_left ha] + exact differentiableAt_pi.mp (differentiableAt_pi.mp + (triangleBlocks_differentiableAt hW a.1 b.1) a.2) b.2 + · simp only [ite_eq_right ha] + exact differentiableAt_const _ + +lemma heatEnergy_differentiableAt_variances (A : Three → Matrix ι ι ℂ) {h : ℝ} + (hh : 0 < h) (u : ι → ℝ) (p : Three → ℝ) + {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v : Three) : + DifferentiableAt ℝ (fun τ => heatEnergy A h u p τ v) σ := by + have hd := (energyGram_hasFDerivAt (rowStar (heatArray A h u p σ) v)).differentiableAt.comp σ + (rowStar_differentiableAt (heatArray_differentiableAt_variances A hh u p hσ) v) + exact hd + +lemma heatEnergy_hasDerivAt_time (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (p : Three → ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {s : ℝ} (hs : 0 < s) (v : Three) : + HasDerivAt (fun t => heatEnergy A h u p (fun w => α w * t) v) + (∑ w, α w * heatVariance A h u p (fun w => α w * s) v w) s := by + apply hasDerivAt_of_coordinates (f := fun τ => heatEnergy A h u p τ v) + (g := fun t w => α w * t) (g' := α) + (heatEnergy_differentiableAt_variances A hh u p (fun w => mul_pos (hα w) hs) v) + · apply hasDerivAt_pi.mpr + intro w + convert! (hasDerivAt_id s).const_mul (α w) using 1 + simp only [mul_one] + · exact fun w => heatEnergy_hasDerivAt_variance A hh u p (fun a => mul_pos (hα a) hs) v w + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/InitialAlgebra.lean b/lean/OAI/Analysis/TriangularHilbert/InitialAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..99cdeefe1c062f84edb774a724f854fb6f01ae2f --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/InitialAlgebra.lean @@ -0,0 +1,98 @@ +import OAI.Analysis.TriangularHilbert.WeightedCubic + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] + +def hsSquare (R : Matrix ι ι ℂ) : ℝ := ∑ i, ∑ j, ‖R i j‖^2 + +def hsCube (R : Matrix ι ι ℂ) : ℝ := hsSquare R * Real.sqrt (hsSquare R) + +lemma hsSquare_nonneg (R : Matrix ι ι ℂ) : 0 ≤ hsSquare R := + Finset.sum_nonneg (fun _ _ => Finset.sum_nonneg (fun _ _ => sq_nonneg _)) + +lemma hsSquare_star (R : Matrix ι ι ℂ) : hsSquare Rᴴ = hsSquare R := by + unfold hsSquare + simp only [Matrix.conjTranspose_apply,norm_star] + rw [Finset.sum_comm] + +lemma hsSquare_rowStar_sum [DecidableEq ι] (A : Three → Matrix ι ι ℂ) (v : Three) : + hsSquare (rowStar A v) = ∑ w, hsSquare (triangleBlocks A v w) := by + unfold hsSquare + simp only [Fintype.sum_prod_type,rowStar_apply] + have he (a : Three) : (∑ i, ∑ b : Three, ∑ j, ‖if a = v then triangleBlocks A a b i j else 0‖^2) = + if a = v then (∑ b : Three, ∑ i, ∑ j, ‖triangleBlocks A a b i j‖^2) else 0 := by + split_ifs with ha + · exact Finset.sum_comm + · simp + simp_rw [he] + simp + +lemma hsSquare_zero : hsSquare (0 : Matrix ι ι ℂ) = 0 := by simp [hsSquare] + +lemma hsSquare_rowStar [DecidableEq ι] (A : Three → Matrix ι ι ℂ) (v : Three) : + hsSquare (rowStar A v) = hsSquare (A v) + hsSquare (A (v+2)) := by + rw [hsSquare_rowStar_sum,Fin.sum_univ_three] + fin_cases v <;> simp [triangleBlocks,hsSquare_zero,hsSquare_star] + ac_rfl + +lemma cubic_add_le {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) : + (a+b)*Real.sqrt (a+b) ≤ Real.sqrt 2*(a*Real.sqrt a+b*Real.sqrt b) := by + have hh := TriangularHilbert.weighted_cubic (Finset.univ : Finset (Fin 2)) + ![Real.sqrt a,Real.sqrt b] (fun _ => 1) + (by intro i _; fin_cases i <;> simp [Real.sqrt_nonneg]) (by simp) + have he (x : ℝ) (hx : 0 ≤ x) : (Real.sqrt x)^3 = x*Real.sqrt x := by + rw [pow_succ,Real.sq_sqrt hx] + simpa only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.head_cons, + Real.sq_sqrt ha,Real.sq_sqrt hb,he a ha,he b hb,mul_one,one_mul,one_add_one_eq_two,mul_comm] using hh + +lemma energy_star_le_hsCube [DecidableEq ι] (A : Three → Matrix ι ι ℂ) (v : Three) : + energy (starGram A v) ≤ Real.sqrt 2*(hsCube (A v)+hsCube (A (v+2))) := by + have hh := energy_gram_le_HS (rowStar A v) + change energy (starGram A v) ≤ hsSquare (rowStar A v)*Real.sqrt (hsSquare (rowStar A v)) at hh + rw [hsSquare_rowStar] at hh + exact hh.trans (cubic_add_le (hsSquare_nonneg _) (hsSquare_nonneg _)) + +lemma hsSquare_weightedArray (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) : + hsSquare (weightedArray A g v) = ∑ i, ∑ j, ‖A v i j‖^2 * (g v i*g (v+1) j) := by + unfold hsSquare weightedArray + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _),mul_pow, + Real.sq_sqrt (hg v i),Real.sq_sqrt (hg (v+1) j)] + ring + +lemma hsCube_weightedArray_le (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) {M : ℝ} (hM : 0 ≤ M) + (hm : ∀ v, (∑ i, g v i) ≤ M) (v : Three) : + hsCube (weightedArray A g v) ≤ M * ∑ i, ∑ j, ‖A v i j‖^3 * (g v i*g (v+1) j) := by + have hh := TriangularHilbert.weighted_cubic (Finset.univ : Finset (ι×ι)) + (fun a => ‖A v a.1 a.2‖) (fun a => g v a.1*g (v+1) a.2) + (fun _ _ => norm_nonneg _) (fun a _ => mul_nonneg (hg _ _) (hg _ _)) + simp only [Fintype.sum_prod_type] at hh + have hw : (∑ i, ∑ j, g v i*g (v+1) j) ≤ M^2 := by + simp_rw [← Finset.mul_sum] + rw [← Finset.sum_mul,pow_two] + exact mul_le_mul (hm v) (hm (v+1)) (Finset.sum_nonneg (fun j _ => hg _ j)) hM + have hs : Real.sqrt (∑ i, ∑ j, g v i*g (v+1) j) ≤ M := by + simpa only [Real.sqrt_sq hM] using Real.sqrt_le_sqrt hw + unfold hsCube + rw [hsSquare_weightedArray A g hg] + exact hh.trans (by + rw [mul_comm M] + exact mul_le_mul_of_nonneg_left hs (Finset.sum_nonneg (fun i _ => Finset.sum_nonneg + (fun j _ => mul_nonneg (pow_nonneg (norm_nonneg _) _) (mul_nonneg (hg _ _) (hg _ _)))))) +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/InitialPlane.lean b/lean/OAI/Analysis/TriangularHilbert/InitialPlane.lean new file mode 100644 index 0000000000000000000000000000000000000000..a75cfd0ebbc54a4ca9cdc6c646ca31d41472385f --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/InitialPlane.lean @@ -0,0 +1,61 @@ +import OAI.Analysis.TriangularHilbert.InitialAlgebra + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def arrayCubic (A : Three → Matrix ι ι ℂ) (h : ℝ) : ℝ := + ∑ v, ∑ i, ∑ j, h^2*‖A v i j‖^3 + +lemma sum_three_shift (f : Three → ℝ) : (∑ v, f (v+2)) = ∑ v, f v := by + simp [Fin.sum_univ_three] + ring + +lemma totalPlaneEnergy_nonneg (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (d : ℝ) (σ : Three → ℝ) : 0 ≤ totalPlaneEnergy A h u d σ := by + apply Finset.sum_nonneg + intro v _ + exact integral_nonneg (fun _ => energy_gram_nonneg _) + +lemma totalPlaneEnergy_le_mass (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ v, 0 < σ v) + {M : ℝ} (hM : 0 ≤ M) (hm : ∀ p v, (∑ i, heatWeights h u p σ v i) ≤ M) : + totalPlaneEnergy A h u d σ ≤ 2*Real.sqrt 2*M*arrayCubic A h := by + have hg p v i : 0 ≤ heatWeights h u p σ v i := (weight_pos hh (hσ v) (u i) (p v)).le + have hb p v : heatEnergy A h u p σ v ≤ Real.sqrt 2*M*(edgeCubic A h u p σ v+edgeCubic A h u p σ (v+2)) := by + have he := energy_star_le_hsCube (heatArray A h u p σ) v + have h1 := hsCube_weightedArray_le A (heatWeights h u p σ) (hg p) hM (hm p) v + have h2 := hsCube_weightedArray_le A (heatWeights h u p σ) (hg p) hM (hm p) (v+2) + change hsCube (heatArray A h u p σ v) ≤ M*edgeCubic A h u p σ v at h1 + change hsCube (heatArray A h u p σ (v+2)) ≤ M*edgeCubic A h u p σ (v+2) at h2 + exact he.trans (by nlinarith [Real.sqrt_nonneg (2:ℝ)]) + have hi v : planeIntegral (fun p => heatEnergy A h u p σ v) d ≤ + Real.sqrt 2*M*((∑ i, ∑ j, h^2*‖A v i j‖^3)+(∑ i, ∑ j, h^2*‖A (v+2) i j‖^3)) := by + have ht := integral_mono ((heatPlane_integrable A hh u d hσ).energy 2 v) + (((edgeCubic_integrable A h u d σ hσ v 2).add + (edgeCubic_integrable A h u d σ hσ (v+2) 2)).const_mul (Real.sqrt 2*M)) + (fun z => hb (chart 2 d z) v) + simp only [Pi.add_apply] at ht + rw [integral_const_mul,integral_add (edgeCubic_integrable A h u d σ hσ v 2) + (edgeCubic_integrable A h u d σ hσ (v+2) 2)] at ht + change planeIntegral (fun p => heatEnergy A h u p σ v) d ≤ + Real.sqrt 2*M*(planeIntegral (fun p => edgeCubic A h u p σ v) d+ + planeIntegral (fun p => edgeCubic A h u p σ (v+2)) d) at ht + simpa only [planeIntegral_edgeCubic A h u d σ hσ] using ht + have ht := Finset.sum_le_sum (fun v (_ : v ∈ (Finset.univ : Finset Three)) => hi v) + rw [← Finset.mul_sum,Finset.sum_add_distrib, + sum_three_shift (fun v => ∑ i, ∑ j, h^2*‖A v i j‖^3)] at ht + exact ht.trans_eq (by unfold arrayCubic; ring) + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/IntMax.lean b/lean/OAI/Analysis/TriangularHilbert/IntMax.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1cc9fdda6336953700d31c6b900a45d86692fea --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/IntMax.lean @@ -0,0 +1,67 @@ +import OAI.Analysis.TriangularHilbert.IntStrong + +namespace OAI + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +lemma mem_intInterval_iff_dist (m n : ℤ) (r : ℕ) : + m ∈ intInterval n r ↔ (m-n).natAbs ≤ r := by + rw [mem_intInterval] + have he : (m-n).natAbs ≤ r ↔ |m-n| ≤ (r:ℤ) := by + rw [← Int.natCast_natAbs] + omega + rw [he,abs_le] + constructor <;> intro h <;> constructor <;> omega + +def supportRadius (D : Finset ℤ) (n : ℤ) : ℕ := D.sup (fun m => (m-n).natAbs) + +def intAverage (D : Finset ℤ) (f : ℤ → ℝ) (n : ℤ) (r : ℕ) : ℝ := + (∑ m ∈ D ∩ intInterval n r, f m)/(2*(r:ℝ)+1) + +lemma intAverage_nonneg (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) (n : ℤ) (r : ℕ) : + 0 ≤ intAverage D f n r := by + exact div_nonneg (Finset.sum_nonneg (fun m hm => hf m (Finset.mem_inter.mp hm).1)) (by positivity) + +lemma inter_intInterval_of_supportRadius_le (D : Finset ℤ) (n : ℤ) {r : ℕ} + (hr : supportRadius D n ≤ r) : D ∩ intInterval n r = D := by + apply Finset.inter_eq_left.mpr + intro m hm + rw [mem_intInterval_iff_dist] + exact (Finset.le_sup hm).trans hr + +def intMax (D : Finset ℤ) (f : ℤ → ℝ) (n : ℤ) : ℝ := + (Finset.range (supportRadius D n+1)).sup' (by exact ⟨0,Finset.mem_range.mpr (Nat.zero_lt_succ _)⟩) (intAverage D f n) + +lemma intAverage_le_intMax (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) + (n : ℤ) (r : ℕ) : intAverage D f n r ≤ intMax D f n := by + by_cases hr : r ≤ supportRadius D n + · exact Finset.le_sup' _ (Finset.mem_range.mpr (Nat.lt_succ_of_le hr)) + · have hb : supportRadius D n ≤ r := le_of_lt (lt_of_not_ge hr) + have hm : intAverage D f n r ≤ intAverage D f n (supportRadius D n) := by + unfold intAverage + rw [inter_intInterval_of_supportRadius_le D n hb, + inter_intInterval_of_supportRadius_le D n le_rfl] + apply div_le_div_of_nonneg_left (Finset.sum_nonneg hf) (by positivity) + exact_mod_cast (by omega : 2*supportRadius D n+1 ≤ 2*r+1) + exact hm.trans (Finset.le_sup' _ (Finset.mem_range.mpr (Nat.lt_succ_self _))) + +lemma intMax_nonneg (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) (n : ℤ) : + 0 ≤ intMax D f n := (intAverage_nonneg D f hf n 0).trans (intAverage_le_intMax D f hf n 0) + +lemma intMax_attained (D : Finset ℤ) (f : ℤ → ℝ) (n : ℤ) : + ∃ r : ℕ, intMax D f n = intAverage D f n r := by + obtain ⟨r,_,hr⟩ := Finset.exists_mem_eq_sup' + (s := Finset.range (supportRadius D n+1)) (by exact ⟨0,Finset.mem_range.mpr (Nat.zero_lt_succ _)⟩) (intAverage D f n) + exact ⟨r,hr⟩ + +lemma sum_interval_le_intMax (D : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) + (n : ℤ) (r : ℕ) : (∑ m ∈ D ∩ intInterval n r, f m) ≤ intMax D f n*(2*(r:ℝ)+1) := by + exact (div_le_iff₀ (by positivity : 0 < 2*(r:ℝ)+1)).mp (intAverage_le_intMax D f hf n r) +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/IntStrong.lean b/lean/OAI/Analysis/TriangularHilbert/IntStrong.lean new file mode 100644 index 0000000000000000000000000000000000000000..44a0bcd4e84393e3da1979b3ce6404ba4cda226b --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/IntStrong.lean @@ -0,0 +1,84 @@ +import OAI.Analysis.TriangularHilbert.StrongLayer + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory +open scoped BigOperators +noncomputable section + +lemma truncated_average_lower (D : Finset ℤ) (f : ℤ → ℝ) (r : ℤ → ℕ) (n : ℤ) + {ρ : ℝ} (hρ : 0 ≤ ρ) + (hav : ρ*(2*(r n:ℝ)+1) ≤ ∑ m ∈ D ∩ intInterval n (r n), f m) : + (ρ/2)*(2*(r n:ℝ)+1) ≤ + ∑ m ∈ D ∩ intInterval n (r n), if ρ < 2*f m then f m else 0 := by + classical + have he (m : ℤ) : f m ≤ (if ρ < 2*f m then f m else 0) + ρ/2 := by + split_ifs <;> linarith + have hsum := Finset.sum_le_sum (fun m (_ : m ∈ D ∩ intInterval n (r n)) => he m) + have hc : ((D ∩ intInterval n (r n)).card:ℝ) ≤ 2*(r n:ℝ)+1 := by + have ht := Finset.card_le_card (Finset.inter_subset_right : D ∩ intInterval n (r n) ⊆ intInterval n (r n)) + rw [card_intInterval] at ht + exact_mod_cast ht + simp only [Finset.sum_add_distrib,Finset.sum_const,nsmul_eq_mul] at hsum + have hp := mul_le_mul_of_nonneg_right hc (by positivity : 0 ≤ ρ/2) + linarith + +lemma int_intervals_strong (D s : Finset ℤ) (f g : ℤ → ℝ) + (hf : ∀ m ∈ D, 0 ≤ f m) (hg : ∀ n ∈ s, 0 ≤ g n) (r : ℤ → ℕ) + (hav : ∀ n ∈ s, g n*(2*(r n:ℝ)+1) ≤ ∑ m ∈ D ∩ intInterval n (r n), f m) : + (∑ n ∈ s, g n*Real.sqrt (g n)) ≤ + 18*Real.sqrt 2 * ∑ m ∈ D, f m*Real.sqrt (f m) := by + classical + have layer_bound (t : ℝ) : (∑ n ∈ s, 3*squareLayer (g n) t) ≤ + 18 * ∑ m ∈ D, f m * oneLayer (2*f m) t := by + by_cases ht : 0 < t + · let u := s.filter (fun n => t^2 < g n) + let f' := fun m => if t^2 < 2*f m then f m else 0 + have hw := int_intervals_weak D u f' + (fun m hm => by unfold f'; split_ifs; exact hf m hm; exact le_rfl) r (by positivity : 0 ≤ t^2/2) + (fun n hn => truncated_average_lower D f r n (sq_nonneg t) + ((mul_le_mul_of_nonneg_right (Finset.mem_filter.mp hn).2.le (by positivity)).trans + (hav n (Finset.mem_filter.mp hn).1))) + have hl : (∑ n ∈ s, 3*squareLayer (g n) t) = 3*t^2*(u.card:ℝ) := by + simp only [squareLayer,Set.indicator_apply,layer_iff ht,mul_ite,mul_zero] + rw [Finset.sum_ite,Finset.sum_const_zero,add_zero,Finset.sum_const] + simp only [u,nsmul_eq_mul] + ring + have hr : (∑ m ∈ D, f m*oneLayer (2*f m) t) = ∑ m ∈ D, f' m := by + apply Finset.sum_congr rfl + intro m _ + simp only [oneLayer,Set.indicator_apply,layer_iff ht,f'] + split_ifs <;> simp + rw [hl,hr] + linarith + · have he (a : ℝ) : squareLayer a t = 0 ∧ oneLayer a t = 0 := by + simp [squareLayer,oneLayer,Set.indicator_of_notMem,ht] + simp only [(he _).1,(he _).2,mul_zero,Finset.sum_const_zero,le_refl] + have hL : Integrable (fun t => ∑ n ∈ s, 3*squareLayer (g n) t) := + integrable_finsetSum _ (fun n _ => (squareLayer_integrable (g n)).const_mul 3) + have hR : Integrable (fun t => 18*∑ m ∈ D, f m*oneLayer (2*f m) t) := + (integrable_finsetSum _ (fun m _ => (oneLayer_integrable (2*f m)).const_mul (f m))).const_mul 18 + have hi := integral_mono hL hR layer_bound + rw [integral_finsetSum _ (fun n _ => (squareLayer_integrable (g n)).const_mul 3), + integral_const_mul,integral_finsetSum _ (fun m _ => (oneLayer_integrable (2*f m)).const_mul (f m))] at hi + have hl : (∑ n ∈ s, ∫ t, 3*squareLayer (g n) t) = ∑ n ∈ s, g n*Real.sqrt (g n) := by + apply Finset.sum_congr rfl + intro n hn + rw [integral_const_mul,integral_squareLayer (hg n hn)] + ring + have hr : (∑ m ∈ D, ∫ t, f m*oneLayer (2*f m) t) = + Real.sqrt 2 * ∑ m ∈ D, f m*Real.sqrt (f m) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + rw [integral_const_mul,integral_oneLayer,Real.sqrt_mul (by norm_num : (0:ℝ) ≤ 2)] + ring + rw [hl,hr] at hi + simpa only [mul_assoc] using hi +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/IntWeak.lean b/lean/OAI/Analysis/TriangularHilbert/IntWeak.lean new file mode 100644 index 0000000000000000000000000000000000000000..64d6e2339f306fbccb8a0e7d885d13fa556c46d6 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/IntWeak.lean @@ -0,0 +1,75 @@ +import OAI.Analysis.TriangularHilbert.FiniteVitali + +namespace OAI + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +def intInterval (n : ℤ) (r : ℕ) : Finset ℤ := Finset.Icc (n-r) (n+r) + +lemma mem_intInterval (m n : ℤ) (r : ℕ) : + m ∈ intInterval n r ↔ n-(r:ℤ) ≤ m ∧ m ≤ n+r := Finset.mem_Icc + +lemma center_mem_intInterval (n : ℤ) (r : ℕ) : n ∈ intInterval n r := by + rw [mem_intInterval]; constructor <;> omega + +lemma card_intInterval (n : ℤ) (r : ℕ) : (intInterval n r).card = 2*r+1 := by + rw [intInterval,Int.card_Icc] + have he : n+(r:ℤ)+1-(n-r) = ((2*r+1 : ℕ):ℤ) := by push_cast; ring + rw [he,Int.toNat_natCast] + +lemma interval_inter_center {a b : ℤ} {r s : ℕ} + (hab : ((intInterval a r : Set ℤ) ∩ (intInterval b s : Set ℤ)).Nonempty) + (hrs : r ≤ s) : a ∈ intInterval b (3*s) := by + obtain ⟨m,hm,hm'⟩ := hab + have hm1 := (mem_intInterval m a r).mp hm + have hm2 := (mem_intInterval m b s).mp hm' + rw [mem_intInterval] + constructor <;> push_cast <;> omega + +lemma int_intervals_weak (D s : Finset ℤ) (f : ℤ → ℝ) (hf : ∀ m ∈ D, 0 ≤ f m) + (r : ℤ → ℕ) {ρ : ℝ} (hρ : 0 ≤ ρ) + (hav : ∀ n ∈ s, ρ * (2*(r n:ℝ)+1) ≤ ∑ m ∈ D ∩ intInterval n (r n), f m) : + ρ * (s.card:ℝ) ≤ 3 * ∑ m ∈ D, f m := by + classical + obtain ⟨u,hu,hd,hcov⟩ := finite_disjoint_selection s + (fun n => (intInterval n (r n) : Set ℤ)) (fun n => (r n : ℝ)) + (fun n _ => ⟨n,center_mem_intInterval n (r n)⟩) + have hcover : s ⊆ u.biUnion (fun n => intInterval n (3*r n)) := by + intro a ha + obtain ⟨b,hb,hab,hrs⟩ := hcov a ha + exact Finset.mem_biUnion.mpr ⟨b,hb,interval_inter_center hab (by exact_mod_cast hrs)⟩ + have hc : (s.card:ℝ) ≤ 3*∑ n ∈ u, (2*(r n:ℝ)+1) := by + have h1 := (Finset.card_le_card hcover).trans (Finset.card_biUnion_le : (u.biUnion (fun n => intInterval n (3*r n))).card ≤ _) + have h2 : (∑ n ∈ u, (intInterval n (3*r n)).card) ≤ ∑ n ∈ u, 3*(2*r n+1) := by + apply Finset.sum_le_sum + intro n _ + rw [card_intInterval] + omega + have h3 : (s.card:ℝ) ≤ (∑ n ∈ u, 3*(2*r n+1):ℕ) := by exact_mod_cast h1.trans h2 + simpa only [Nat.cast_sum,Nat.cast_mul,Nat.cast_ofNat,Nat.cast_add,Nat.cast_one,Finset.mul_sum] using h3 + have hdis : (↑u : Set ℤ).PairwiseDisjoint (fun n => D ∩ intInterval n (r n)) := by + intro a ha b hb hab + apply Finset.disjoint_left.mpr + intro m hm hm' + exact Set.disjoint_left.mp (hd a ha b hb hab) (Finset.mem_inter.mp hm).2 (Finset.mem_inter.mp hm').2 + have hsubset : u.biUnion (fun n => D ∩ intInterval n (r n)) ⊆ D := by + intro m hm + obtain ⟨n,_,hn⟩ := Finset.mem_biUnion.mp hm + exact (Finset.mem_inter.mp hn).1 + have hsum : (∑ n ∈ u, ∑ m ∈ D ∩ intInterval n (r n), f m) ≤ ∑ m ∈ D, f m := by + rw [← Finset.sum_biUnion hdis] + exact Finset.sum_le_sum_of_subset_of_nonneg hsubset (fun m hm _ => hf m hm) + calc + _ ≤ ρ*(3*∑ n ∈ u, (2*(r n:ℝ)+1)) := mul_le_mul_of_nonneg_left hc hρ + _ = 3*∑ n ∈ u, ρ*(2*(r n:ℝ)+1) := by rw [← Finset.mul_sum]; ring + _ ≤ 3*∑ n ∈ u, ∑ m ∈ D ∩ intInterval n (r n), f m := + mul_le_mul_of_nonneg_left (Finset.sum_le_sum (fun n hn => hav n (hu hn))) (by norm_num) + _ ≤ _ := mul_le_mul_of_nonneg_left hsum (by norm_num) +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/IntegratedDissipation.lean b/lean/OAI/Analysis/TriangularHilbert/IntegratedDissipation.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9e61b591745c241008f791597fbfffcc235bb1c --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/IntegratedDissipation.lean @@ -0,0 +1,62 @@ +import OAI.Analysis.TriangularHilbert.PlaneInterval + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma totalPlaneTime_intervalIntegrable (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : + IntervalIntegrable (totalPlaneTime A h u d α) volume a b := by + have hi : IntervalIntegrable (∑ v : Three, ∑ w : Three, + fun s => α w * planeIntegral (fun p => heatVariance A h u p (fun z => α z*s) v w) d) volume a b := by + apply IntervalIntegrable.sum Finset.univ + intro v _ + apply IntervalIntegrable.sum Finset.univ + intro w _ + exact ((planeTime_intervalIntegrable A hh u d α hα ha hab).1 v w).const_mul (α w) + convert hi using 1 + ext s + simp [totalPlaneTime] + +lemma integral_totalPlaneTime (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : + (∫ s in a..b, totalPlaneTime A h u d α s) = + totalPlaneEnergy A h u d (fun w => α w*b) - totalPlaneEnergy A h u d (fun w => α w*a) := by + apply intervalIntegral.integral_eq_sub_of_hasDerivAt _ (totalPlaneTime_intervalIntegrable A hh u d α hα ha hab) + intro s hs + rw [Set.uIcc_of_le hab] at hs + exact totalPlaneEnergy_hasDerivAt A hh u d α hα (ha.trans_le hs.1) + +lemma integrated_strict_dissipation (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (i : Three) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : + strictConstant * (∫ s in a..b, ∑ w, planeIntegral (fun p => heatCost A h u p (fun z => strictRate i z*s) w w) d) ≤ + totalPlaneEnergy A h u d (fun w => strictRate i w*a) - totalPlaneEnergy A h u d (fun w => strictRate i w*b) := by + have hc : IntervalIntegrable (fun s => ∑ w, planeIntegral (fun p => heatCost A h u p (fun z => strictRate i z*s) w w) d) volume a b := + by + have hi : IntervalIntegrable (∑ w : Three, fun s => planeIntegral (fun p => heatCost A h u p (fun z => strictRate i z*s) w w) d) volume a b := IntervalIntegrable.sum Finset.univ (fun w _ => (planeTime_intervalIntegrable A hh u d (strictRate i) (strictRate_pos i) ha hab).2 w w) + convert hi using 1 + ext s + simp + have ht := totalPlaneTime_intervalIntegrable A hh u d (strictRate i) (strictRate_pos i) ha hab + have hi := intervalIntegral.integral_mono_on hab (hc.const_mul strictConstant) ht.neg + (fun s hs => plane_strict_dissipation A hh u d i (ha.trans_le hs.1)) + rw [intervalIntegral.integral_const_mul] at hi + change strictConstant * (∫ s in a..b, ∑ w, planeIntegral (fun p => heatCost A h u p (fun z => strictRate i z*s) w w) d) ≤ ∫ s in a..b, -(totalPlaneTime A h u d (strictRate i) s) at hi + rw [intervalIntegral.integral_neg,integral_totalPlaneTime A hh u d (strictRate i) (strictRate_pos i) ha hab] at hi + linarith + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/IntervalMask.lean b/lean/OAI/Analysis/TriangularHilbert/IntervalMask.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cf835bfb0c28cd715bf154c404056952c3737b2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/IntervalMask.lean @@ -0,0 +1,39 @@ +import OAI.Analysis.TriangularHilbert.SignedCenter + +namespace OAI + +universe uE uι + +section +namespace TriangularHilbert +open MeasureTheory +noncomputable section + +lemma intervalIntegrable_indicator {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] + {f : ℝ → E} {L U a b : ℝ} (hf : IntervalIntegrable f volume L U) : + IntervalIntegrable ((Set.Ico a b).indicator f) volume L U := + ⟨hf.1.indicator measurableSet_Ico,hf.2.indicator measurableSet_Ico⟩ + +lemma intervalIntegral_indicator_Ico {E : Type uE} [NormedAddCommGroup E] [NormedSpace ℝ E] + {f : ℝ → E} {L U a b : ℝ} (hLa : L ≤ a) (hab : a ≤ b) (hbU : b ≤ U) : + (∫ s in L..U, (Set.Ico a b).indicator f s) = ∫ s in a..b, f s := by + rw [intervalIntegral.integral_of_le (hLa.trans (hab.trans hbU)), + ← integral_Icc_eq_integral_Ioc,integral_indicator measurableSet_Ico, + Measure.restrict_restrict measurableSet_Ico] + rw [Set.inter_eq_left.mpr (show Set.Ico a b ⊆ Set.Icc L U from fun s hs => + ⟨hLa.trans hs.1,hs.2.le.trans hbU⟩),integral_Ico_eq_integral_Ioc, + intervalIntegral.integral_of_le hab] + +lemma intervalIntegrable_finsetSum {E : Type uE} {ι : Type uι} [NormedAddCommGroup E] [NormedSpace ℝ E] + {f : ι → ℝ → E} (S : Finset ι) {a b : ℝ} + (hf : ∀ i ∈ S, IntervalIntegrable (f i) volume a b) : + IntervalIntegrable (fun s => ∑ i ∈ S, f i s) volume a b := by + have hh := IntervalIntegrable.sum S hf + convert! hh using 1 + ext s + simp +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/JointHeat.lean b/lean/OAI/Analysis/TriangularHilbert/JointHeat.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2c5865ecca01be80e1a4da70e3f2d7e520c4bed --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/JointHeat.lean @@ -0,0 +1,64 @@ +import OAI.Analysis.TriangularHilbert.StarJump + +namespace OAI + +universe uι uE + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [Fintype ι] [DecidableEq ι] in +lemma continuous_weight_param {E : Type uE} [TopologicalSpace E] (h u : ℝ) + {p σ : E → ℝ} (hp : Continuous p) (hσ : Continuous σ) (hpos : ∀ t, 0 < σ t) : + Continuous (fun t => weight h u (p t) (σ t)) := by + unfold weight density + have hden : ∀ t, Real.sqrt (2*Real.pi*σ t) ≠ 0 := fun t => (Real.sqrt_pos.mpr (mul_pos (mul_pos (by norm_num) Real.pi_pos) (hpos t))).ne' + apply continuous_const.mul + apply Continuous.mul + · exact (Real.continuous_sqrt.comp (continuous_const.mul hσ)).inv₀ hden + · apply Real.continuous_exp.comp + exact ((continuous_const.sub hp).pow 2 |>.neg).div (continuous_const.mul hσ) (fun t => (mul_pos (by norm_num) (hpos t)).ne') + +omit [Fintype ι] [DecidableEq ι] in +lemma continuous_heatArray_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v : Three) : + Continuous (fun t => heatArray A h u (p t) (σ t) v) := by + apply continuous_pi + intro i + apply continuous_pi + intro j + have hw (w : Three) (k : ι) : Continuous (fun t => (Real.sqrt (heatWeights h u (p t) (σ t) w k) : ℂ)) := + Complex.continuous_ofReal.comp (Real.continuous_sqrt.comp + (continuous_weight_param h (u k) ((continuous_apply w).comp hp) ((continuous_apply w).comp hσ) (hpos · w))) + exact ((hw v i).mul continuous_const).mul (hw (v+1) j) + +lemma continuous_heatRow_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v : Three) : + Continuous (fun t => rowStar (heatArray A h u (p t) (σ t)) v) := by + have he := continuous_heatArray_param A h u hp hσ hpos + have hb (a b : Three) : Continuous (fun t => triangleBlocks (heatArray A h u (p t) (σ t)) a b) := by + unfold triangleBlocks + split_ifs <;> first | exact continuous_const | exact he _ | exact (he _).star + apply continuous_pi + intro a + apply continuous_pi + intro b + simp only [rowStar_apply] + by_cases hv : a.1 = v + · simp only [ite_eq_left hv] + exact (continuous_apply b.2).comp ((continuous_apply a.2).comp (hb a.1 b.1)) + · simp only [ite_eq_right hv] + exact continuous_const +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/JointInsert.lean b/lean/OAI/Analysis/TriangularHilbert/JointInsert.lean new file mode 100644 index 0000000000000000000000000000000000000000..47e83252f85ac82efb69330db79d3a230c411b76 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/JointInsert.lean @@ -0,0 +1,79 @@ +import OAI.Analysis.TriangularHilbert.MeshFinite + +namespace OAI + +universe uι uE + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma continuous_heatCarrier_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Continuous (fun t => heatCarrier A h u (p t) (σ t) v w) := by + unfold heatCarrier + split_ifs + · exact continuous_heatRow_param A h u hp hσ hpos v + · exact (continuous_heatRow_param A h u hp hσ hpos v).star + +omit [Fintype ι] in +lemma continuous_scoreMask_param {E : Type uE} [TopologicalSpace E] (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (w : Three) : + Continuous (fun t => heatMask (fun a j => if a = w then score (u j) (p t a) (σ t a) else 0)) := by + apply continuous_heatMask + intro a j + split_ifs + · unfold score + exact (continuous_const.sub ((continuous_apply a).comp hp)).div + ((continuous_apply a).comp hσ) (fun t => (hpos t a).ne') + · exact continuous_const + +omit [Fintype ι] in +lemma continuous_secondMask_param {E : Type uE} [TopologicalSpace E] (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (w : Three) : + Continuous (fun t => heatMask (fun a j => if a = w then score (u j) (p t a) (σ t a)^2-(σ t a)⁻¹ else 0)) := by + apply continuous_heatMask + intro a j + split_ifs + · unfold score + exact (((continuous_const.sub ((continuous_apply a).comp hp)).div + ((continuous_apply a).comp hσ) (fun t => (hpos t a).ne')).pow 2).sub + (((continuous_apply a).comp hσ).inv₀ (fun t => (hpos t a).ne')) + · exact continuous_const + +lemma continuous_heatFirst_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Continuous (fun t => heatFirst A h u (p t) (σ t) v w) := by + simp only [heatFirst,localGram_eq_carrier A hh u _ (hpos _),localFirst_eq_carrier A hh u _ (hpos _)] + exact continuous_energyGradient_insert (continuous_heatCarrier_param A h u hp hσ hpos v w) + (continuous_scoreMask_param u hp hσ hpos w) + +lemma continuous_heatSecondGradient_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Continuous (fun t => energyGradient (localGram A h u (p t) (σ t) v w) (localSecond A h u (p t) (σ t) v w)) := by + simp only [localGram_eq_carrier A hh u _ (hpos _),localSecond_eq_carrier A hh u _ (hpos _)] + exact continuous_energyGradient_insert (continuous_heatCarrier_param A h u hp hσ hpos v w) + (continuous_secondMask_param u hp hσ hpos w) + +lemma continuous_heatVariance_param {E : Type uE} [TopologicalSpace E] + (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Continuous (fun t => heatVariance A h u (p t) (σ t) v w) := + continuous_const.mul (continuous_heatSecondGradient_param A hh u hp hσ hpos v w) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/JointMeasurable.lean b/lean/OAI/Analysis/TriangularHilbert/JointMeasurable.lean new file mode 100644 index 0000000000000000000000000000000000000000..caf9a839f6ee7cae1f5b90128ce87407ce6050de --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/JointMeasurable.lean @@ -0,0 +1,42 @@ +import OAI.Analysis.TriangularHilbert.JointInsert + +namespace OAI + +universe uι uE + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder Topology +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma measurable_heatPure_param {E : Type uE} [TopologicalSpace E] [MeasurableSpace E] + [OpensMeasurableSpace E] (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Measurable (fun t => heatPure A h u (p t) (σ t) v w) := by + have hc : Continuous (fun q : E × ℝ => heatFirst A h u (Function.update (p q.1) w q.2) (σ q.1) v w) := + continuous_heatFirst_param A hh u (by fun_prop) (hσ.comp continuous_fst) (fun q a => hpos q.1 a) v w + have hm := (measurable_deriv_with_param + (f := fun t q => heatFirst A h u (Function.update (p t) w q) (σ t) v w) hc).comp + (show Measurable (fun t : E => (t,p t w)) from measurable_id.prodMk (((continuous_apply w).comp hp).measurable)) + convert! hm using 1 + funext t + exact (heatFirst_hasDerivAt_center A hh u (p t) (hpos t) v w).deriv.symm + +lemma measurable_heatCost_param {E : Type uE} [TopologicalSpace E] [MeasurableSpace E] + [OpensMeasurableSpace E] (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) (u : ι → ℝ) + {p σ : E → Three → ℝ} (hp : Continuous p) (hσ : Continuous σ) + (hpos : ∀ t w, 0 < σ t w) (v w : Three) : + Measurable (fun t => heatCost A h u (p t) (σ t) v w) := by + have hm := (measurable_heatPure_param A hh u hp hσ hpos v w).sub + (continuous_heatSecondGradient_param A hh u hp hσ hpos v w).measurable + convert! hm using 1 + funext t + simp [heatPure,heatCost] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/JumpScalar.lean b/lean/OAI/Analysis/TriangularHilbert/JumpScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..17e80cd6ff3a81824251b0dc450b8425aa33da8e --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/JumpScalar.lean @@ -0,0 +1,71 @@ +import OAI.Analysis.TriangularHilbert.MeshJump + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped BigOperators +noncomputable section + +lemma sum_lineMax_scalar_product_bound (D : Finset ℤ) (f g : D → D → ℂ) (u : D → D → ℤ) + (hu : ∀ i, Function.Injective (u i)) : + (∑ i, ∑ j, ‖g i j‖*lineMax D (fun m => ‖f i m‖^2) (u i j)) ≤ + ((∑ i, ∑ j, ‖g i j‖^3)+36*Real.sqrt 2*(∑ i, ∑ m, ‖f i m‖^3))/3 := by + have hs := Finset.sum_le_sum (fun i (_ : i ∈ (Finset.univ : Finset D)) => + lineMax_scalar_product_bound D (f i) (u i) (hu i) (fun j => ‖g i j‖) (fun j => norm_nonneg _)) + simpa only [← Finset.sum_div,Finset.sum_add_distrib,← Finset.mul_sum] using hs + +def jumpScalarConstant : ℝ := 2+48*Real.sqrt 2 + +lemma jumpScalarConstant_pos : 0 < jumpScalarConstant := by unfold jumpScalarConstant; positivity + +lemma sum_jumpMax_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) : + (∑ i, ∑ j, ‖A 0 i j‖*jumpMax D A i j) ≤ + jumpScalarConstant * (∑ v, ∑ i, ∑ j, ‖A v i j‖^3) := by + have hu : Function.Injective (fun i : D => (i:ℤ)) := Subtype.val_injective + have hn (i : D) : Function.Injective (fun j : D => -(i:ℤ)-(j:ℤ)) := by + intro j k hjk + apply Subtype.ext + dsimp at hjk + omega + have hX := sum_lineMax_scalar_product_bound D (fun i m => A 0 i m) (fun i j => A 0 i j) + (fun _ j => (j:ℤ)) (fun _ => hu) + have hY := sum_lineMax_scalar_product_bound D (fun j m => A 0 m j) (fun j i => A 0 i j) + (fun _ i => (i:ℤ)) (fun _ => hu) + have hH := sum_lineMax_scalar_product_bound D (fun i m => A 2 m i) (fun i j => A 0 i j) + (fun i j => -(i:ℤ)-(j:ℤ)) hn + have hK := sum_lineMax_scalar_product_bound D (fun j m => A 1 j m) (fun j i => A 0 i j) + (fun j i => -(j:ℤ)-(i:ℤ)) hn + have hc (v : Three) : (∑ j : D, ∑ i : D, ‖A v i j‖^3) = ∑ i : D, ∑ j : D, ‖A v i j‖^3 := by rw [Finset.sum_comm] + rw [hc] at hY hH hK + have hYe : (∑ j : D, ∑ i : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 0 m j‖^2) (i:ℤ)) = + ∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 0 m j‖^2) (i:ℤ) := by rw [Finset.sum_comm] + rw [hYe] at hY + have hKe : (∑ j : D, ∑ i : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 1 j m‖^2) (-(j:ℤ)-(i:ℤ))) = + ∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 1 j m‖^2) (-(i:ℤ)-(j:ℤ)) := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + congr 2 + omega + rw [hKe] at hK + have hb (v : Three) : 0 ≤ ∑ i : D, ∑ j : D, ‖A v i j‖^3 := + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => pow_nonneg (norm_nonneg _) _)) + have he : (∑ i : D, ∑ j : D, ‖A 0 i j‖*jumpMax D A i j) = + 2*(∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 0 i m‖^2) j)+ + 2*(∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 0 m j‖^2) i)+ + (∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 2 m i‖^2) (-(i:ℤ)-(j:ℤ)))+ + (∑ i : D, ∑ j : D, ‖A 0 i j‖*lineMax D (fun m => ‖A 1 j m‖^2) (-(i:ℤ)-(j:ℤ))) := by + simp only [jumpMax,mul_add,Finset.sum_add_distrib,Finset.mul_sum, + mul_left_comm] + rw [he,Fin.sum_univ_three] + unfold jumpScalarConstant + nlinarith [hb 0,hb 1,hb 2,Real.sqrt_nonneg (2:ℝ)] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Main.lean b/lean/OAI/Analysis/TriangularHilbert/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..79bef397195538364db8addcdf0850d38d85e417 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Main.lean @@ -0,0 +1,47 @@ +import OAI.Analysis.TriangularHilbert.TruncationCoordinates + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Heat Filter +open scoped ENNReal +noncomputable section + +lemma maximal_eq_cyclicMax_ae (F G : Plane → ℂ) (hF : MemLp F 3 volume) (hG : MemLp G 3 volume) : + maximal F G =ᵐ[volume] (fun z => cyclicMax (cyclicB F) (cyclicC G) (-z)) := by + filter_upwards [measurePreserving_reflect.quasiMeasurePreserving.ae + (ae_cubicSliceGood (cyclicB F) (cyclicC G) (memLp_cyclicB hF) (memLp_cyclicC hG))] with z hz + rw [maximal,ite_eq_left hz.goodPoint] + simp_rw [truncation_eq_cyclicHard] + exact (cyclicMax_eq_iSup hz).symm + +lemma aemeasurable_maximal (F G : Plane → ℂ) (hF : MemLp F 3 volume) (hG : MemLp G 3 volume) : + AEMeasurable (maximal F G) volume := by + have h := (aemeasurable_cyclicMax (cyclicB F) (cyclicC G) (memLp_cyclicB hF) (memLp_cyclicC hG)).comp_quasiMeasurePreserving + measurePreserving_reflect.quasiMeasurePreserving + exact h.congr (maximal_eq_cyclicMax_ae F G hF hG).symm + +lemma maximalNorm_eq_cyclicNorm (F G : Plane → ℂ) (hF : MemLp F 3 volume) (hG : MemLp G 3 volume) : + maximalNorm F G = cyclicNorm (cyclicB F) (cyclicC G) := by + unfold maximalNorm cyclicNorm + congr 1 + calc + (∫⁻ z : Plane, maximal F G z ^ ((3:ℝ)/2)) = + ∫⁻ z : Plane, cyclicMax (cyclicB F) (cyclicC G) (-z)^((3:ℝ)/2) := by + apply lintegral_congr_ae + filter_upwards [maximal_eq_cyclicMax_ae F G hF hG] with z hz + rw [hz] + _ = _ := measurePreserving_reflect.lintegral_comp_emb (Homeomorph.neg Plane).measurableEmbedding + (fun z => cyclicMax (cyclicB F) (cyclicC G) z^((3:ℝ)/2)) + +theorem main_estimate : MainEstimate := by + refine ⟨mainConstant,fun F G hF hG => ⟨ae_goodPoint F G hF hG,aemeasurable_maximal F G hF hG,?_⟩⟩ + rw [maximalNorm_eq_cyclicNorm F G hF hG] + simpa only [eLpNorm_cyclicB hF,eLpNorm_cyclicC hG] using + cyclicNorm_le (cyclicB F) (cyclicC G) (memLp_cyclicB hF) (memLp_cyclicC hG) +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MaskedActual.lean b/lean/OAI/Analysis/TriangularHilbert/MaskedActual.lean new file mode 100644 index 0000000000000000000000000000000000000000..5936421837f82de0b26b223c5cc160b816ed33cf --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MaskedActual.lean @@ -0,0 +1,83 @@ +import OAI.Analysis.TriangularHilbert.SortedWindows + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def maskedArray (A : Three → Matrix ι ι ℂ) (a b : Matrix ι ι ℝ) (s : ℝ) : Three → Matrix ι ι ℂ := + replaceZero A (fun i j => windowMask (a i j) (b i j) s (A 0 i j)) + +def maskedCost (A : Three → Matrix ι ι ℂ) (a b : Matrix ι ι ℝ) + (h : ℝ) (u : ι → ℝ) (r : Three) (s : ℝ) : ℝ := + ∑ v, planeIntegral (fun p => heatCost (maskedArray A a b s) h u p (fun z => strictRate r z*s) v v) 0 + +omit [Fintype ι] [DecidableEq ι] in +lemma maskedArray_const (A : Three → Matrix ι ι ℂ) (a b : Matrix ι ι ℝ) + (S : Finset ℝ) (hS : S.Nonempty) (ha : ∀ i j, a i j ∈ S) (hb : ∀ i j, b i j ∈ S) + (k : ℕ) {s : ℝ} (hs : s ∈ Set.Ico (sortedTimes S hS k) (sortedTimes S hS (k+1))) : + maskedArray A a b s = maskedArray A a b (sortedTimes S hS k) := by + unfold maskedArray + congr 1 + funext i j + exact sortedTimes_mask_const S hS k (ha i j) (hb i j) hs _ + +lemma planeSumCost_intervalIntegrable (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (r : Three) {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : + IntervalIntegrable (fun s => ∑ v, planeIntegral (fun p => heatCost A h u p (fun z => strictRate r z*s) v v) d) volume a b := by + have hi : IntervalIntegrable (∑ v : Three, fun s => planeIntegral (fun p => heatCost A h u p (fun z => strictRate r z*s) v v) d) volume a b := + IntervalIntegrable.sum Finset.univ (fun v _ => (planeTime_intervalIntegrable A hh u d (strictRate r) (strictRate_pos r) ha hab).2 v v) + convert hi using 1 + ext s + simp + +lemma maskedCost_interval_piece (A : Three → Matrix ι ι ℂ) (a b : Matrix ι ι ℝ) + (S : Finset ℝ) (hS : S.Nonempty) (ha : ∀ i j, a i j ∈ S) (hb : ∀ i j, b i j ∈ S) + {h : ℝ} (hh : 0 < h) (u : ι → ℝ) (ht0 : 0 < sortedTimes S hS 0) (r : Three) (k : ℕ) : + IntervalIntegrable (maskedCost A a b h u r) volume (sortedTimes S hS k) (sortedTimes S hS (k+1)) := by + have ht := sortedTimes_monotone S hS + apply intervalIntegrable_of_Ico_eq (ht (Nat.le_succ k)) + (planeSumCost_intervalIntegrable (maskedArray A a b (sortedTimes S hS k)) hh u 0 r + (ht0.trans_le (ht (Nat.zero_le k))) (ht (Nat.le_succ k))) + intro s hs + unfold maskedCost + rw [maskedArray_const A a b S hS ha hb k hs] + +lemma masked_cost_integral_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) (a b : Matrix D D ℝ) + (hab : ∀ i j, a i j ≤ b i j) (S : Finset ℝ) (hS : S.Nonempty) + (ha : ∀ i j, a i j ∈ S) (hb : ∀ i j, b i j ∈ S) + {h : ℝ} (hh : 0 < h) (hl : ∀ s ∈ S, h^2 ≤ s) (r : Three) : + strictConstant*(∫ s in S.min' hS..S.max' hS, maskedCost A a b h (fun m => h*(m:ℤ)) r s) ≤ + maskedConstant*arrayCubic A h := by + let t := sortedTimes S hS + have ht : Monotone t := sortedTimes_monotone S hS + have ht0 : h^2 ≤ t 0 := hl _ (sortedTimes_mem S hS 0) + let B : ℕ → Matrix D D ℂ := fun k i j => windowMask (a i j) (b i j) (t k) (A 0 i j) + have hB (k : ℕ) (i j : D) : ‖B k i j‖ ≤ ‖A 0 i j‖ := windowMask_norm_le _ _ _ _ + have hv (i j : D) : (∑ k ∈ Finset.range (S.card-1), ‖B (k+1) i j-B k i j‖) ≤ 2*‖A 0 i j‖ := + sum_windowMask_variation t ht _ _ (hab i j) _ _ + have hin := finite_masked_dissipation D A B hB (S.card-1) hv hh t ht ht0 r + have he (k : ℕ) : (∫ s in t k..t (k+1), ∑ v, planeIntegral (fun p => heatCost (replaceZero A (B k)) h + (fun m => h*(m:ℤ)) p (fun z => strictRate r z*s) v v) 0) = + ∫ s in t k..t (k+1), maskedCost A a b h (fun m => h*(m:ℤ)) r s := by + apply intervalIntegral.integral_congr_Ioo_of_le (ht (Nat.le_succ k)) + intro s hs + unfold maskedCost + rw [maskedArray_const A a b S hS ha hb k ⟨hs.1.le,hs.2⟩] + rfl + simp_rw [he] at hin + rw [intervalIntegral.sum_integral_adjacent_intervals] at hin + · simpa only [t,sortedTimes_zero,sortedTimes_last] using hin + · intro k _ + exact maskedCost_interval_piece A a b S hS ha hb hh _ ((sq_pos_of_pos hh).trans_le ht0) r k +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MaskedDissipation.lean b/lean/OAI/Analysis/TriangularHilbert/MaskedDissipation.lean new file mode 100644 index 0000000000000000000000000000000000000000..70128df0613a90da521a862655806c6e97a86ae1 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MaskedDissipation.lean @@ -0,0 +1,118 @@ +import OAI.Analysis.TriangularHilbert.Switch + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section + +lemma arrayCubic_eq (D : Finset ℤ) (A : Three → Matrix D D ℂ) (h : ℝ) : + arrayCubic A h = h^2*(∑ v, ∑ i, ∑ j, ‖A v i j‖^3) := by + simp only [arrayCubic,Finset.mul_sum] + +lemma arrayCubic_mono {ι : Type uι} [Fintype ι] (A B : Three → Matrix ι ι ℂ) + (hAB : ∀ v i j, ‖A v i j‖ ≤ ‖B v i j‖) (h : ℝ) : arrayCubic A h ≤ arrayCubic B h := by + unfold arrayCubic + apply Finset.sum_le_sum + intro v _ + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + gcongr + exact hAB v i j + +lemma arrayCubic_replaceZero_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) (B : Matrix D D ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (h : ℝ) : arrayCubic (replaceZero A B) h ≤ arrayCubic A h := by + apply arrayCubic_mono + intro v i j + by_cases hv : v=0 + · subst v; exact hB i j + · simp [replaceZero,hv] + +lemma finite_mesh_total_jumps_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) + (B : ℕ → Matrix D D ℂ) (hB : ∀ k i j, ‖B k i j‖ ≤ ‖A 0 i j‖) (n : ℕ) + (hvar : ∀ i j, (∑ k ∈ Finset.range n, ‖B (k+1) i j-B k i j‖) ≤ 2*‖A 0 i j‖) + {h : ℝ} (hh : 0 < h) (σ : ℕ → Three → ℝ) (hσ : ∀ k v, h^2 ≤ σ k v) : + (∑ k ∈ Finset.range n, + |totalPlaneEnergy (replaceZero A (B (k+1))) h (fun m => h*(m:ℤ)) 0 (σ k)- + totalPlaneEnergy (replaceZero A (B k)) h (fun m => h*(m:ℤ)) 0 (σ k)|) ≤ + 3*meshMassConstant*jumpScalarConstant*arrayCubic A h := by + have hj := Finset.sum_le_sum (fun k (_ : k ∈ Finset.range n) => + finite_mesh_energy_jump_le D A (B (k+1)) (B k) (hB (k+1)) (hB k) hh (hσ k)) + apply hj.trans + rw [← Finset.mul_sum] + have he : (∑ k ∈ Finset.range n, ∑ i : D, ∑ j : D, ‖B (k+1) i j-B k i j‖*jumpMax D A i j) = + ∑ i : D, ∑ j : D, (∑ k ∈ Finset.range n, ‖B (k+1) i j-B k i j‖)*jumpMax D A i j := by + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i _ + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro j _ + rw [Finset.sum_mul] + rw [he] + have hs : (∑ i : D, ∑ j : D, (∑ k ∈ Finset.range n, ‖B (k+1) i j-B k i j‖)*jumpMax D A i j) ≤ + 2*(∑ i : D, ∑ j : D, ‖A 0 i j‖*jumpMax D A i j) := by + simp only [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + have ht := mul_le_mul_of_nonneg_right (hvar i j) (jumpMax_nonneg D A i j) + simpa only [mul_assoc] using ht + have hz : 0 ≤ 3/2*meshMassConstant*h^2 := by have hm := meshMassConstant_pos; positivity + calc + _ ≤ (3/2*meshMassConstant*h^2)*(2*(∑ i : D, ∑ j : D, ‖A 0 i j‖*jumpMax D A i j)) := mul_le_mul_of_nonneg_left hs hz + _ ≤ (3/2*meshMassConstant*h^2)*(2*(jumpScalarConstant*(∑ v, ∑ i, ∑ j, ‖A v i j‖^3))) := by + gcongr + exact sum_jumpMax_le D A + _ = _ := by rw [arrayCubic_eq]; ring + +lemma strictRate_ge_one (i v : Three) : 1 ≤ strictRate i v := by + unfold strictRate; split_ifs <;> norm_num + +def maskedConstant : ℝ := meshMassConstant*(2*Real.sqrt 2+3*jumpScalarConstant) + +lemma maskedConstant_pos : 0 < maskedConstant := by + unfold maskedConstant + have hm := meshMassConstant_pos + have hj := jumpScalarConstant_pos + positivity + +lemma finite_masked_dissipation (D : Finset ℤ) (A : Three → Matrix D D ℂ) + (B : ℕ → Matrix D D ℂ) (hB : ∀ k i j, ‖B k i j‖ ≤ ‖A 0 i j‖) (n : ℕ) + (hvar : ∀ i j, (∑ k ∈ Finset.range n, ‖B (k+1) i j-B k i j‖) ≤ 2*‖A 0 i j‖) + {h : ℝ} (hh : 0 < h) (t : ℕ → ℝ) (ht : Monotone t) (ht0 : h^2 ≤ t 0) (r : Three) : + strictConstant * (∑ k ∈ Finset.range n, + ∫ s in t k..t (k+1), ∑ v, planeIntegral (fun p => heatCost (replaceZero A (B k)) h + (fun m => h*(m:ℤ)) p (fun z => strictRate r z*s) v v) 0) ≤ maskedConstant*arrayCubic A h := by + have htpos (k : ℕ) : 0 < t k := (sq_pos_of_pos hh).trans_le (ht0.trans (ht (Nat.zero_le _))) + have hσ (k : ℕ) (v : Three) : h^2 ≤ strictRate r v*t k := + (ht0.trans (ht (Nat.zero_le _))).trans (le_mul_of_one_le_left (htpos k).le (strictRate_ge_one r v)) + have hi := Finset.sum_le_sum (fun k (_ : k ∈ Finset.range n) => + integrated_strict_dissipation (replaceZero A (B k)) hh (fun m => h*(m:ℤ)) 0 r + (htpos k) (ht (Nat.le_succ k))) + rw [← Finset.mul_sum] at hi + apply hi.trans + let E : ℕ → ℕ → ℝ := fun k l => totalPlaneEnergy (replaceZero A (B k)) h (fun m => h*(m:ℤ)) 0 + (fun v => strictRate r v*t l) + have htel := telescope_with_jumps E n (totalPlaneEnergy_nonneg _ _ _ _ _) + apply htel.trans + have hin := (finite_mesh_totalPlaneEnergy_le D (replaceZero A (B 0)) hh 0 (hσ 0)).trans + (mul_le_mul_of_nonneg_left (arrayCubic_replaceZero_le D A (B 0) (hB 0) h) (by have hm := meshMassConstant_pos; positivity)) + have hj := finite_mesh_total_jumps_le D A B hB n hvar hh (fun k v => strictRate r v*t (k+1)) (fun k v => hσ (k+1) v) + change E 0 0 ≤ _ at hin + change (∑ k ∈ Finset.range n, |E (k+1) (k+1)-E k (k+1)|) ≤ _ at hj + apply (add_le_add hin hj).trans_eq + unfold maskedConstant + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MassPlane.lean b/lean/OAI/Analysis/TriangularHilbert/MassPlane.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d150552b0a14a5766d762685aa75d1ce3efb0a3 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MassPlane.lean @@ -0,0 +1,86 @@ +import OAI.Analysis.TriangularHilbert.TraceWeights + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory Filter +open scoped BigOperators Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section + +lemma weight_integrable_center (h u σ : ℝ) (hσ : 0 ≤ σ) : + Integrable (fun p => weight h u p σ) := by + exact ((volume.measurePreserving_sub_left u).integrable_comp_of_integrable (density_integrable hσ)).const_mul h + +lemma integral_weight_center (h u : ℝ) {σ : ℝ} (hσ : 0 < σ) : + (∫ p, weight h u p σ) = h := by + unfold weight + rw [integral_const_mul,integral_sub_left_eq_self,integral_density hσ,mul_one] + +lemma chart_integrable_iff (f : (Three → ℝ) → ℝ) (i j : Three) (d : ℝ) : + Integrable (fun z : ℝ×ℝ => f (chart i d z)) ↔ + Integrable (fun z : ℝ×ℝ => f (chart j d z)) := by + have hi k : Integrable (fun z : ℝ×ℝ => f (chart k d z)) ↔ + Integrable (fun z : ℝ×ℝ => f (chart 2 d z)) := by + simp_rw [chartChange_eq k d] + exact (chartChange_preserving k d).integrable_comp_emb (chartChange k d).measurableEmbedding (g := fun z : ℝ×ℝ => f (chart 2 d z)) + exact (hi i).trans (hi j).symm + +lemma weight_pair_integrable (h a b d : ℝ) (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v k : Three) : + Integrable (fun z : ℝ×ℝ => weight h a (chart k d z v) (σ v) * + weight h b (chart k d z (v+1)) (σ (v+1))) := by + apply (chart_integrable_iff (fun p => weight h a (p v) (σ v)*weight h b (p (v+1)) (σ (v+1))) (v+2) k d).mp + change Integrable (fun z : ℝ×ℝ => weight h a (chart (v+2) d z v) (σ v)*weight h b (chart (v+2) d z (v+1)) (σ (v+1))) (volume.prod volume) + fin_cases v + · simpa [chart] using (weight_integrable_center h a (σ 0) (hσ 0).le).mul_prod + (weight_integrable_center h b (σ 1) (hσ 1).le) + · simpa [chart] using (weight_integrable_center h a (σ 1) (hσ 1).le).mul_prod + (weight_integrable_center h b (σ 2) (hσ 2).le) + · simpa [chart,mul_comm] using (weight_integrable_center h b (σ 0) (hσ 0).le).mul_prod + (weight_integrable_center h a (σ 2) (hσ 2).le) + +lemma integral_weight_pair (h a b d : ℝ) (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v : Three) : + planeIntegral (fun p => weight h a (p v) (σ v)*weight h b (p (v+1)) (σ (v+1))) d = h^2 := by + rw [planeIntegral_eq _ (v+2)] + change (∫ z : ℝ×ℝ, weight h a (chart (v+2) d z v) (σ v)*weight h b (chart (v+2) d z (v+1)) (σ (v+1)) ∂volume.prod volume) = h^2 + have hp (a b σ τ : ℝ) (hσ : 0 < σ) (hτ : 0 < τ) : + (∫ z : ℝ×ℝ, weight h a z.1 σ * weight h b z.2 τ ∂volume.prod volume) = h^2 := by + rw [integral_prod_mul (fun p => weight h a p σ) (fun p => weight h b p τ), + integral_weight_center h a hσ,integral_weight_center h b hτ,pow_two] + fin_cases v + · simpa [chart] using hp a b (σ 0) (σ 1) (hσ 0) (hσ 1) + · simpa [chart] using hp a b (σ 1) (σ 2) (hσ 1) (hσ 2) + · simpa [chart,mul_comm] using hp b a (σ 0) (σ 2) (hσ 0) (hσ 2) + +variable {ι : Type uι} [Fintype ι] + +def edgeCubic (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p σ : Three → ℝ) (v : Three) : ℝ := + ∑ i, ∑ j, ‖A v i j‖^3 * (heatWeights h u p σ v i*heatWeights h u p σ (v+1) j) + +lemma edgeCubic_integrable (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (d : ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v k : Three) : + Integrable (fun z : ℝ×ℝ => edgeCubic A h u (chart k d z) σ v) := by + exact integrable_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => + (weight_pair_integrable h (u i) (u j) d σ hσ v k).const_mul _)) + +lemma planeIntegral_edgeCubic (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (d : ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v : Three) : + planeIntegral (fun p => edgeCubic A h u p σ v) d = ∑ i, ∑ j, h^2 * ‖A v i j‖^3 := by + unfold planeIntegral edgeCubic heatWeights + rw [integral_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => + (weight_pair_integrable h (u i) (u j) d σ hσ v 2).const_mul _))] + apply Finset.sum_congr rfl + intro i _ + rw [integral_finsetSum _ (fun j _ => (weight_pair_integrable h (u i) (u j) d σ hσ v 2).const_mul _)] + apply Finset.sum_congr rfl + intro j _ + rw [integral_const_mul] + change ‖A v i j‖^3 * planeIntegral (fun p => weight h (u i) (p v) (σ v)*weight h (u j) (p (v+1)) (σ (v+1))) d = _ + rw [integral_weight_pair h (u i) (u j) d σ hσ v,mul_comm] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MatrixSupport.lean b/lean/OAI/Analysis/TriangularHilbert/MatrixSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff0ae1385de38135efbe6ead64791544786f646a --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MatrixSupport.lean @@ -0,0 +1,1920 @@ +import OAI.Analysis.TriangularHilbert.SignedWindowScalar + +namespace OAI + +universe uι uκ uX uμ + +section +open scoped BigOperators +noncomputable section +namespace TriangularHilbert.MatrixEnergy + +theorem cyclic_sum_insert {ι : Type uι} [DecidableEq ι] + (s : Finset ι) (a : ι) (ha : a ∉ s) (f : ι → ι → ι → ℂ) + (hf : ∀ i j k, f i j k = f j k i) : + (∑ i ∈ insert a s, ∑ j ∈ insert a s, ∑ k ∈ insert a s, f i j k) = + f a a a + 3 * (∑ j ∈ s, f a a j) + + 3 * (∑ j ∈ s, ∑ k ∈ s, f a j k) + + (∑ i ∈ s, ∑ j ∈ s, ∑ k ∈ s, f i j k) := by + simp only [Finset.sum_insert ha, Finset.sum_add_distrib] + have h1 : (∑ i ∈ s, f a i a) = ∑ i ∈ s, f a a i := by + apply Finset.sum_congr rfl + intro i _ + exact (hf a i a).trans (hf i a a) + have h2 : (∑ i ∈ s, f i a a) = ∑ i ∈ s, f a a i := by + apply Finset.sum_congr rfl + intro i _ + exact hf i a a + have h3 : (∑ i ∈ s, ∑ j ∈ s, f i a j) = ∑ i ∈ s, ∑ j ∈ s, f a i j := by + simp_rw [hf _ a _] + exact Finset.sum_comm + have h4 : (∑ i ∈ s, ∑ j ∈ s, f i j a) = ∑ i ∈ s, ∑ j ∈ s, f a i j := by + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + exact (hf i j a).trans (hf j a i) + rw [h1, h2, h3, h4] + ring + +open scoped Matrix.Norms.L2Operator ComplexInnerProductSpace InnerProductSpace + +theorem norm_quad_sum_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (x : ι → ℂ) : + ‖∑ j, ∑ k, star (x j) * D j k * x k‖ ≤ + ‖D‖ * ∑ j, ‖x j‖ ^ 2 := by + let v : EuclideanSpace ℂ ι := WithLp.toLp 2 x + have hform : (∑ j, ∑ k, star (x j) * D j k * x k) = + ⟪v, Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) D v⟫_ℂ := by + simp [EuclideanSpace.inner_eq_star_dotProduct, Matrix.mulVec, + dotProduct, Finset.sum_mul, mul_assoc, mul_comm, mul_left_comm, v] + rw [hform] + calc + _ ≤ ‖v‖ * ‖Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) D v‖ := norm_inner_le_norm _ _ + _ ≤ ‖v‖ * (‖D‖ * ‖v‖) := by + gcongr + exact (Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) D).le_opNorm v + _ = ‖D‖ * ∑ j, ‖x j‖ ^ 2 := by + rw [← EuclideanSpace.norm_sq_eq v] + ring + +theorem column_sq_sum_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (i : ι) : + (∑ j, ‖D j i‖ ^ 2) ≤ ‖D‖ ^ 2 := by + let v : EuclideanSpace ℂ ι := EuclideanSpace.single i 1 + have hn : ‖v‖ = 1 := by simp [v] + have h := (Matrix.toEuclideanCLM (n := ι) (𝕜 := ℂ) D).le_opNorm v + rw [hn, Matrix.l2_opNorm_toEuclideanCLM, mul_one] at h + have hs := sq_le_sq₀ (norm_nonneg _) (norm_nonneg _) |>.mpr h + simpa [EuclideanSpace.norm_sq_eq, v, Matrix.mulVec, dotProduct] using hs + +theorem row_sq_sum_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (i : ι) : + (∑ j, ‖D i j‖ ^ 2) ≤ ‖D‖ ^ 2 := by + convert column_sq_sum_le D i using 1 + apply Finset.sum_congr rfl + intro j _ + rw [← hD.apply i j, norm_star] + +theorem hermitian_entry_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (i j : ι) : + ‖D i j‖ ≤ ‖D‖ := by + apply (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mp + exact (Finset.single_le_sum (fun k _ => sq_nonneg ‖D i k‖) + (Finset.mem_univ j)).trans (row_sq_sum_le D hD i) + +theorem norm_cyclic_tail_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) + (i : ι) (s : Finset ι) : + ‖∑ j ∈ s, ∑ k ∈ s, + (m j : ℂ) * (m k : ℂ) * D i j * D j k * D k i‖ ≤ + ‖D‖ * ∑ j ∈ s, (m j) ^ 2 * ‖D i j‖ ^ 2 := by + let x : ι → ℂ := fun j => if j ∈ s then (m j : ℂ) * D j i else 0 + have hf' (j k : ι) : star (x j) * D j k * x k = + if j ∈ s then if k ∈ s then + (m j : ℂ) * (m k : ℂ) * D i j * D j k * D k i else 0 else 0 := by + by_cases hj : j ∈ s <;> by_cases hk : k ∈ s + all_goals simp [x, hj, hk, hD.apply, mul_comm, mul_left_comm] + have hf : (∑ j, ∑ k, star (x j) * D j k * x k) = + ∑ j ∈ s, ∑ k ∈ s, + (m j : ℂ) * (m k : ℂ) * D i j * D j k * D k i := by + simp_rw [hf'] + simp [Finset.sum_ite_mem] + have hn' (j : ι) : ‖x j‖ ^ 2 = + if j ∈ s then (m j) ^ 2 * ‖D i j‖ ^ 2 else 0 := by + by_cases hj : j ∈ s + · simp [x, hj, mul_pow, ← hD.apply i j] + · simp [x, hj] + have hn : (∑ j, ‖x j‖ ^ 2) = ∑ j ∈ s, (m j) ^ 2 * ‖D i j‖ ^ 2 := by + simp_rw [hn'] + simp [Finset.sum_ite_mem] + simpa only [hf, hn] using norm_quad_sum_le D x + +theorem norm_weighted_row_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) + (i : ι) (s : Finset ι) : + ‖∑ j ∈ s, (m j : ℂ) * D i j * D j i‖ ≤ + Real.sqrt (∑ j ∈ s, (m j)^2 * ‖D i j‖^2) * ‖D‖ := by + have hs : (∑ j ∈ s, ‖D i j‖^2) ≤ ‖D‖^2 := + (Finset.sum_le_sum_of_subset_of_nonneg s.subset_univ + (fun j _ _ => sq_nonneg ‖D i j‖)).trans (row_sq_sum_le D hD i) + have hr : Real.sqrt (∑ j ∈ s, ‖D i j‖^2) ≤ ‖D‖ := + (Real.sqrt_le_iff).mpr ⟨norm_nonneg _, hs⟩ + calc + _ ≤ ∑ j ∈ s, ‖(m j : ℂ) * D i j * D j i‖ := norm_sum_le _ _ + _ = ∑ j ∈ s, (|m j| * ‖D i j‖) * ‖D i j‖ := by + apply Finset.sum_congr rfl + intro j _ + simp [← hD.apply i j] + _ ≤ Real.sqrt (∑ j ∈ s, (|m j| * ‖D i j‖)^2) * + Real.sqrt (∑ j ∈ s, ‖D i j‖^2) := Real.sum_mul_le_sqrt_mul_sqrt _ _ _ + _ ≤ Real.sqrt (∑ j ∈ s, (m j)^2 * ‖D i j‖^2) * ‖D‖ := by + simp only [mul_pow, sq_abs] + exact mul_le_mul_of_nonneg_left hr (Real.sqrt_nonneg _) + +theorem norm_twice_tail_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) + (i : ι) (s : Finset ι) : + ‖(m i : ℂ)^2 * D i i * (∑ j ∈ s, (m j : ℂ) * D i j * D j i)‖ ≤ + ‖D‖ / 2 * (|m i|^3 * ‖D i i‖^2 + + |m i| * ∑ j ∈ s, (m j)^2 * ‖D i j‖^2) := by + let B := ∑ j ∈ s, (m j)^2 * ‖D i j‖^2 + have hB : 0 ≤ B := Finset.sum_nonneg fun j _ => mul_nonneg (sq_nonneg _) (sq_nonneg _) + have hYoung : |m i|^2 * ‖D i i‖ * Real.sqrt B ≤ + (|m i|^3 * ‖D i i‖^2 + |m i| * B) / 2 := by + have hsq := mul_nonneg (abs_nonneg (m i)) + (sq_nonneg (|m i| * ‖D i i‖ - Real.sqrt B)) + have hr := congrArg (fun z : ℝ => |m i| * z) (Real.sq_sqrt hB) + nlinarith + calc + _ = |m i|^2 * ‖D i i‖ * ‖∑ j ∈ s, (m j : ℂ) * D i j * D j i‖ := by + simp [norm_pow] + _ ≤ |m i|^2 * ‖D i i‖ * (Real.sqrt B * ‖D‖) := + mul_le_mul_of_nonneg_left (norm_weighted_row_le D hD m i s) (by positivity) + _ = ‖D‖ * (|m i|^2 * ‖D i i‖ * Real.sqrt B) := by ring + _ ≤ ‖D‖ * ((|m i|^3 * ‖D i i‖^2 + |m i| * B) / 2) := + mul_le_mul_of_nonneg_left hYoung (norm_nonneg _) + _ = _ := by dsimp [B]; ring + +def spectralWeight {ι : Type uι} (D : Matrix ι ι ℂ) (m : ι → ℝ) (i j : ι) : ℝ := + |m i|^2 * |m j|^2 / (|m i| + |m j|) * ‖D i j‖^2 + +theorem spectralWeight_symm {ι : Type uι} (D : Matrix ι ι ℂ) + (hD : D.IsHermitian) (m : ι → ℝ) (i j : ι) : + spectralWeight D m i j = spectralWeight D m j i := by + unfold spectralWeight + rw [← hD.apply i j, norm_star] + ring + +theorem spectralWeight_diag {ι : Type uι} (D : Matrix ι ι ℂ) (m : ι → ℝ) (i : ι) : + spectralWeight D m i i = |m i|^3 * ‖D i i‖^2 / 2 := by + unfold spectralWeight + by_cases h : m i = 0 + · simp [h] + · have h' : |m i| ≠ 0 := abs_ne_zero.mpr h + field_simp + ring + +theorem spectralWeight_pair_ge {ι : Type uι} (D : Matrix ι ι ℂ) (m : ι → ℝ) + (i j : ι) (hij : |m j| ≤ |m i|) : + |m i| * (m j)^2 * ‖D i j‖^2 ≤ 2 * spectralWeight D m i j := by + unfold spectralWeight + by_cases hi : m i = 0 + · simp [hi] + · have hp : 0 < |m i| + |m j| := add_pos_of_pos_of_nonneg (abs_pos.mpr hi) (abs_nonneg _) + have hbase : |m i| * |m j|^2 ≤ 2 * (|m i|^2 * |m j|^2 / (|m i| + |m j|)) := by + rw [← mul_div_assoc, le_div_iff₀ hp] + have hmul := mul_nonneg (mul_nonneg (abs_nonneg (m i)) (sq_nonneg |m j|)) + (sub_nonneg.mpr hij) + nlinarith + simpa only [sq_abs, mul_assoc] using mul_le_mul_of_nonneg_right hbase (sq_nonneg ‖D i j‖) + +def cubicTerm {ι : Type uι} (D : Matrix ι ι ℂ) (m : ι → ℝ) (i j k : ι) : ℂ := + (m i : ℂ) * (m j : ℂ) * (m k : ℂ) * D i j * D j k * D k i + +theorem cubicTerm_cyclic {ι : Type uι} (D : Matrix ι ι ℂ) (m : ι → ℝ) (i j k : ι) : + cubicTerm D m i j k = cubicTerm D m j k i := by unfold cubicTerm; ring + +theorem norm_cubicTerm_diag_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) (i : ι) : + ‖cubicTerm D m i i i‖ ≤ ‖D‖ * (|m i|^3 * ‖D i i‖^2) := by + calc + _ = (|m i|^3 * ‖D i i‖^2) * ‖D i i‖ := by + simp only [cubicTerm, norm_mul, Complex.norm_real, Real.norm_eq_abs] + ring + _ ≤ (|m i|^3 * ‖D i i‖^2) * ‖D‖ := by + gcongr + exact hermitian_entry_le D hD i i + _ = _ := by ring + +theorem norm_cubicTerm_twice_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) (i : ι) (s : Finset ι) : + ‖∑ j ∈ s, cubicTerm D m i i j‖ ≤ + ‖D‖ / 2 * (|m i|^3 * ‖D i i‖^2 + + |m i| * ∑ j ∈ s, (m j)^2 * ‖D i j‖^2) := by + convert norm_twice_tail_le D hD m i s using 1 + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j _ + unfold cubicTerm + ring + +theorem norm_cubicTerm_once_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) (i : ι) (s : Finset ι) : + ‖∑ j ∈ s, ∑ k ∈ s, cubicTerm D m i j k‖ ≤ + ‖D‖ * (|m i| * ∑ j ∈ s, (m j)^2 * ‖D i j‖^2) := by + have heq : (∑ j ∈ s, ∑ k ∈ s, cubicTerm D m i j k) = + (m i : ℂ) * (∑ j ∈ s, ∑ k ∈ s, + (m j : ℂ) * (m k : ℂ) * D i j * D j k * D k i) := by + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + unfold cubicTerm + ring + rw [heq, norm_mul, Complex.norm_real, Real.norm_eq_abs] + calc + _ ≤ |m i| * (‖D‖ * ∑ j ∈ s, (m j)^2 * ‖D i j‖^2) := + mul_le_mul_of_nonneg_left (norm_cyclic_tail_le D hD m i s) (abs_nonneg _) + _ = _ := by ring + +theorem spectralWeight_insert_ge {ι : Type uι} [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) + (s : Finset ι) (a : ι) (ha : a ∉ s) (hmax : ∀ j ∈ s, |m j| ≤ |m a|) : + |m a|^3 * ‖D a a‖^2 / 2 + + |m a| * ∑ j ∈ s, (m j)^2 * ‖D a j‖^2 + + (∑ i ∈ s, ∑ j ∈ s, spectralWeight D m i j) ≤ + ∑ i ∈ insert a s, ∑ j ∈ insert a s, spectralWeight D m i j := by + have hrs : (∑ j ∈ s, spectralWeight D m j a) = + ∑ j ∈ s, spectralWeight D m a j := by + apply Finset.sum_congr rfl + intro j _ + exact spectralWeight_symm D hD m j a + have hp : |m a| * ∑ j ∈ s, (m j)^2 * ‖D a j‖^2 ≤ + 2 * ∑ j ∈ s, spectralWeight D m a j := by + simp only [Finset.mul_sum] + apply Finset.sum_le_sum + intro j hj + simpa only [mul_assoc] using spectralWeight_pair_ge D m a j (hmax j hj) + simp only [Finset.sum_insert ha, Finset.sum_add_distrib] + rw [hrs, spectralWeight_diag] + linarith + +theorem norm_cubic_sum_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) (s : Finset ι) : + ‖∑ i ∈ s, ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m i j k‖ ≤ + 5 * ‖D‖ * ∑ i ∈ s, ∑ j ∈ s, spectralWeight D m i j := by + induction s using Finset.induction_on_max_value (fun i => |m i|) with + | empty => simp + | insert a s ha hmax ih => + rw [cyclic_sum_insert s a ha _ (cubicTerm_cyclic D m)] + let A := |m a|^3 * ‖D a a‖^2 + let E := |m a| * ∑ j ∈ s, (m j)^2 * ‖D a j‖^2 + let Q := ∑ i ∈ s, ∑ j ∈ s, spectralWeight D m i j + have hE : 0 ≤ E := by dsimp [E]; positivity + have hdiag := norm_cubicTerm_diag_le D hD m a + have htwice := norm_cubicTerm_twice_le D hD m a s + have honce := norm_cubicTerm_once_le D hD m a s + calc + _ ≤ ‖cubicTerm D m a a a + 3 * ∑ j ∈ s, cubicTerm D m a a j + + 3 * ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m a j k‖ + + ‖∑ i ∈ s, ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m i j k‖ := norm_add_le _ _ + _ ≤ (‖cubicTerm D m a a a‖ + 3 * ‖∑ j ∈ s, cubicTerm D m a a j‖ + + 3 * ‖∑ j ∈ s, ∑ k ∈ s, cubicTerm D m a j k‖) + + ‖∑ i ∈ s, ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m i j k‖ := by + gcongr + calc + _ ≤ ‖cubicTerm D m a a a + 3 * ∑ j ∈ s, cubicTerm D m a a j‖ + + ‖3 * ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m a j k‖ := norm_add_le _ _ + _ ≤ (‖cubicTerm D m a a a‖ + ‖3 * ∑ j ∈ s, cubicTerm D m a a j‖) + + ‖3 * ∑ j ∈ s, ∑ k ∈ s, cubicTerm D m a j k‖ := by + gcongr + exact norm_add_le _ _ + _ = _ := by simp + _ ≤ (‖D‖ * A + 3 * (‖D‖ / 2 * (A + E)) + 3 * (‖D‖ * E)) + + 5 * ‖D‖ * Q := by + exact add_le_add (add_le_add (add_le_add hdiag + (mul_le_mul_of_nonneg_left htwice (by norm_num))) + (mul_le_mul_of_nonneg_left honce (by norm_num))) ih + _ ≤ 5 * ‖D‖ * (A / 2 + E + Q) := by + nlinarith [mul_nonneg (norm_nonneg D) hE] + _ ≤ _ := mul_le_mul_of_nonneg_left + (spectralWeight_insert_ge D hD m s a ha hmax) (by positivity) + +theorem trace_cube_mul_diagonal {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (m : ι → ℝ) : + Matrix.trace ((D * Matrix.diagonal (fun i => (m i : ℂ)))^3) = + ∑ i, ∑ j, ∑ k, cubicTerm D m i j k := by + have expand (A : Matrix ι ι ℂ) : + Matrix.trace (A^3) = ∑ i, ∑ j, ∑ k, A i j * (A j k * A k i) := by + have hp : A^3 = A * (A * A) := by noncomm_ring + rw [hp] + simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, Finset.mul_sum] + rw [expand] + simp only [Matrix.mul_diagonal] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + unfold cubicTerm + ring + +theorem norm_trace_cube_mul_diagonal_le {ι : Type uι} [Fintype ι] [DecidableEq ι] + (D : Matrix ι ι ℂ) (hD : D.IsHermitian) (m : ι → ℝ) : + ‖Matrix.trace ((D * Matrix.diagonal (fun i => (m i : ℂ)))^3)‖ ≤ + 5 * ‖D‖ * ∑ i, ∑ j, spectralWeight D m i j := by + rw [trace_cube_mul_diagonal] + exact norm_cubic_sum_le D hD m Finset.univ + +end TriangularHilbert.MatrixEnergy + +noncomputable section +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator ContDiff +open Unitary +namespace TriangularHilbert.MatrixEnergy + +variable {ι : Type uι} [Fintype ι] + +def traceReal (A : Matrix ι ι ℂ) : ℝ := A.trace.re + +@[simp] theorem traceReal_add (A B : Matrix ι ι ℂ) : + traceReal (A + B) = traceReal A + traceReal B := by simp [traceReal] +@[simp] theorem traceReal_sub (A B : Matrix ι ι ℂ) : + traceReal (A - B) = traceReal A - traceReal B := by simp [traceReal] +@[simp] theorem traceReal_smul (c : ℝ) (A : Matrix ι ι ℂ) : + traceReal (c • A) = c * traceReal A := by simp [traceReal] +@[simp] theorem traceReal_zero : traceReal (0 : Matrix ι ι ℂ) = 0 := by simp [traceReal] +@[simp] theorem traceReal_star (A : Matrix ι ι ℂ) : traceReal Aᴴ = traceReal A := by + simp [traceReal] +theorem traceReal_mul_comm (A B : Matrix ι ι ℂ) : traceReal (A * B) = traceReal (B * A) := by + unfold traceReal; rw [Matrix.trace_mul_comm] +theorem traceReal_mul_cycle (A B C : Matrix ι ι ℂ) : + traceReal (A * B * C) = traceReal (C * A * B) := by + unfold traceReal; rw [Matrix.trace_mul_cycle] +theorem traceReal_nonneg {A : Matrix ι ι ℂ} (hA : A.PosSemidef) : 0 ≤ traceReal A := + (RCLike.nonneg_iff.mp hA.trace_nonneg).1 + +def hsReal (X Y : Matrix ι ι ℂ) : ℝ := traceReal (Xᴴ * Y) + +@[simp] theorem hsReal_add_left (X Y Z : Matrix ι ι ℂ) : + hsReal (X + Y) Z = hsReal X Z + hsReal Y Z := by + simp [hsReal, add_mul] +@[simp] theorem hsReal_add_right (X Y Z : Matrix ι ι ℂ) : + hsReal X (Y + Z) = hsReal X Y + hsReal X Z := by + simp [hsReal, mul_add] +@[simp] theorem hsReal_sub_left (X Y Z : Matrix ι ι ℂ) : + hsReal (X - Y) Z = hsReal X Z - hsReal Y Z := by + simp [hsReal, sub_mul] +@[simp] theorem hsReal_sub_right (X Y Z : Matrix ι ι ℂ) : + hsReal X (Y - Z) = hsReal X Y - hsReal X Z := by + simp [hsReal, mul_sub] +@[simp] theorem hsReal_smul_left (c : ℝ) (X Y : Matrix ι ι ℂ) : + hsReal (c • X) Y = c * hsReal X Y := by + simp [hsReal, Matrix.smul_mul] +@[simp] theorem hsReal_smul_right (c : ℝ) (X Y : Matrix ι ι ℂ) : + hsReal X (c • Y) = c * hsReal X Y := by + simp [hsReal, Matrix.mul_smul] +@[simp] theorem hsReal_zero_right (X : Matrix ι ι ℂ) : hsReal X 0 = 0 := by simp [hsReal] + +theorem hsReal_symm (X Y : Matrix ι ι ℂ) : hsReal X Y = hsReal Y X := by + unfold hsReal + rw [← traceReal_star (Xᴴ * Y), Matrix.conjTranspose_mul, Matrix.conjTranspose_conjTranspose] + +def sylv (A X : Matrix ι ι ℂ) : Matrix ι ι ℂ := A * X + X * A + +@[simp] theorem sylv_add_right (A X Y : Matrix ι ι ℂ) : + sylv A (X + Y) = sylv A X + sylv A Y := by unfold sylv; noncomm_ring +@[simp] theorem sylv_sub_right (A X Y : Matrix ι ι ℂ) : + sylv A (X - Y) = sylv A X - sylv A Y := by unfold sylv; noncomm_ring +@[simp] theorem sylv_smul_right (c : ℝ) (A X : Matrix ι ι ℂ) : + sylv A (c • X) = c • sylv A X := by simp [sylv, smul_add] +@[simp] theorem sylv_smul_left (c : ℝ) (A X : Matrix ι ι ℂ) : + sylv (c • A) X = c • sylv A X := by simp [sylv, smul_add] +@[simp] theorem sylv_sub_left (A B X : Matrix ι ι ℂ) : + sylv (A - B) X = sylv A X - sylv B X := by unfold sylv; noncomm_ring +@[simp] theorem sylv_zero_right (A : Matrix ι ι ℂ) : sylv A 0 = 0 := by simp [sylv] + +theorem hsReal_sylv_symm {A : Matrix ι ι ℂ} (hA : A.IsHermitian) + (X Y : Matrix ι ι ℂ) : hsReal X (sylv A Y) = hsReal (sylv A X) Y := by + simp only [hsReal, sylv, Matrix.conjTranspose_add, Matrix.conjTranspose_mul, + hA.eq, mul_add, add_mul, traceReal_add] + rw [← Matrix.mul_assoc Xᴴ A Y, ← Matrix.mul_assoc Xᴴ Y A, + traceReal_mul_cycle Xᴴ Y A] + +def penalty (A X : Matrix ι ι ℂ) : ℝ := hsReal X (sylv A X) + +theorem penalty_nonneg {A : Matrix ι ι ℂ} (hA : A.PosSemidef) + (X : Matrix ι ι ℂ) : 0 ≤ penalty A X := by + simp only [penalty, hsReal, sylv, mul_add, traceReal_add] + have h₁ := traceReal_nonneg (hA.conjTranspose_mul_mul_same X) + have h₂ := traceReal_nonneg (hA.mul_mul_conjTranspose_same X) + rw [Matrix.mul_assoc] at h₁ + rw [← Matrix.mul_assoc Xᴴ X A, traceReal_mul_cycle Xᴴ X A, + traceReal_mul_cycle A Xᴴ X] + exact add_nonneg h₁ h₂ + +theorem penalty_sub {A : Matrix ι ι ℂ} (hA : A.IsHermitian) + (X Y : Matrix ι ι ℂ) : + penalty A (X - Y) = penalty A X + penalty A Y - 2 * hsReal (sylv A Y) X := by + simp only [penalty, sylv_sub_right, hsReal_sub_left, hsReal_sub_right] + rw [hsReal_symm Y (sylv A X), ← hsReal_sylv_symm hA, hsReal_symm X (sylv A Y)] + ring + +theorem penalty_mono {A B : Matrix ι ι ℂ} (hAB : A ≤ B) (X : Matrix ι ι ℂ) : + penalty A X ≤ penalty B X := by + have h := penalty_nonneg hAB X + simpa only [penalty, sylv_sub_left, hsReal_sub_right, sub_nonneg] using h + +def variation (A K X : Matrix ι ι ℂ) : ℝ := 2 * hsReal K X - penalty A X + +def rootCost (A K : Matrix ι ι ℂ) : ℝ := (3 / 2 : ℝ) * sSup (Set.range (variation A K)) + +theorem variation_sylv {A : Matrix ι ι ℂ} (hA : A.IsHermitian) + (X Y : Matrix ι ι ℂ) : + variation A (sylv A Y) X = penalty A Y - penalty A (X - Y) := by + rw [variation, penalty_sub hA] + ring + +theorem rootCost_eq_of_solution {A K Y : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hY : sylv A Y = K) : rootCost A K = (3 / 2 : ℝ) * hsReal K Y := by + subst K + have heq : sSup (Set.range (variation A (sylv A Y))) = penalty A Y := by + apply csSup_eq_of_forall_le_of_forall_lt_exists_gt (Set.range_nonempty _) + · rintro _ ⟨X, rfl⟩ + rw [variation_sylv hA.isHermitian] + exact sub_le_self _ (penalty_nonneg hA (X - Y)) + · intro w hw + refine ⟨variation A (sylv A Y) Y, ⟨Y, rfl⟩, ?_⟩ + simpa [variation_sylv hA.isHermitian, penalty] using hw + rw [rootCost, heq] + congr 1 + exact hsReal_symm _ _ + +theorem variation_bddAbove {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hsol : ∃ Y, sylv A Y = K) : BddAbove (Set.range (variation A K)) := by + obtain ⟨Y, rfl⟩ := hsol + refine ⟨penalty A Y, ?_⟩ + rintro _ ⟨X, rfl⟩ + rw [variation_sylv hA.isHermitian] + exact sub_le_self _ (penalty_nonneg hA _) + +theorem variation_le_rootCost {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hsol : ∃ Y, sylv A Y = K) (X : Matrix ι ι ℂ) : + (3 / 2 : ℝ) * variation A K X ≤ rootCost A K := by + apply mul_le_mul_of_nonneg_left _ (by norm_num) + exact le_csSup (variation_bddAbove hA hsol) ⟨X, rfl⟩ + +theorem rootCost_nonneg {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hsol : ∃ Y, sylv A Y = K) : 0 ≤ rootCost A K := by + simpa [variation, penalty] using variation_le_rootCost hA hsol 0 + +theorem rootCost_antitone {A B K : Matrix ι ι ℂ} + (hA : A.PosSemidef) (hsol : ∃ Y, sylv A Y = K) (hAB : A ≤ B) : + rootCost B K ≤ rootCost A K := by + apply mul_le_mul_of_nonneg_left _ (by norm_num) + apply csSup_le (Set.range_nonempty _) + rintro _ ⟨X, rfl⟩ + exact (sub_le_sub_left (penalty_mono hAB X) _).trans + (le_csSup (variation_bddAbove hA hsol) ⟨X, rfl⟩) + +theorem rootCost_scale {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hsol : ∃ Y, sylv A Y = K) {c : ℝ} (hc : 0 < c) : + rootCost (c • A) K = c⁻¹ * rootCost A K := by + obtain ⟨Y, hY⟩ := hsol + have hY' : sylv (c • A) (c⁻¹ • Y) = K := by + simp [sylv_smul_left, sylv_smul_right, smul_smul, ne_of_gt hc, hY] + rw [rootCost_eq_of_solution (hA.smul (le_of_lt hc)) hY', + rootCost_eq_of_solution hA hY, hsReal_smul_right] + ring + +theorem hsReal_eq_sum (X Y : Matrix ι ι ℂ) : + hsReal X Y = ∑ i, ∑ j, (star (X i j) * Y i j).re := by + simp only [hsReal, traceReal, Matrix.trace, Matrix.diag, Matrix.mul_apply, + Matrix.conjTranspose_apply, Complex.re_sum] + exact Finset.sum_comm + +variable [DecidableEq ι] + +theorem sylv_diagonal_apply (q : ι → ℝ) (X : Matrix ι ι ℂ) (i j : ι) : + sylv (Matrix.diagonal (fun i => (q i : ℂ))) X i j = + ((q i + q j : ℝ) : ℂ) * X i j := by + simp only [sylv, Matrix.add_apply, Matrix.diagonal_mul, Matrix.mul_diagonal, + Complex.ofReal_add] + ring + +def diagonalSolution (q : ι → ℝ) (K : Matrix ι ι ℂ) : Matrix ι ι ℂ := + fun i j => K i j / ((q i + q j : ℝ) : ℂ) + +theorem diagonalSolution_solves (q : ι → ℝ) (K : Matrix ι ι ℂ) + (hsupp : ∀ i j, q i + q j = 0 → K i j = 0) : + sylv (Matrix.diagonal (fun i => (q i : ℂ))) (diagonalSolution q K) = K := by + ext i j + rw [sylv_diagonal_apply] + by_cases h : q i + q j = 0 + · simp [diagonalSolution, h, hsupp i j h] + · exact mul_div_cancel₀ _ (Complex.ofReal_ne_zero.mpr h) + +theorem rootCost_diagonal (q : ι → ℝ) (hq : ∀ i, 0 ≤ q i) + (K : Matrix ι ι ℂ) (hsupp : ∀ i j, q i + q j = 0 → K i j = 0) : + rootCost (Matrix.diagonal (fun i => (q i : ℂ))) K = + (3 / 2 : ℝ) * ∑ i, ∑ j, ‖K i j‖^2 / (q i + q j) := by + have hq' : (Matrix.diagonal (fun i => (q i : ℂ))).PosSemidef := + Matrix.PosSemidef.diagonal (fun i => RCLike.ofReal_nonneg.mpr (hq i)) + rw [rootCost_eq_of_solution hq' (diagonalSolution_solves q K hsupp), hsReal_eq_sum] + congr 1 + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + simp only [diagonalSolution, ← mul_div_assoc, RCLike.star_def, + ← Complex.normSq_eq_conj_mul_self, Complex.div_ofReal_re, Complex.ofReal_re, + Complex.normSq_eq_norm_sq] + +theorem traceReal_unitary_conj (U : unitary (Matrix ι ι ℂ)) (X : Matrix ι ι ℂ) : + traceReal (conjStarAlgAut ℂ _ U X) = traceReal X := by + unfold traceReal + rw [conjStarAlgAut_apply, Matrix.trace_mul_cycle, + Unitary.coe_star_mul_self, one_mul] + +theorem hsReal_unitary_conj (U : unitary (Matrix ι ι ℂ)) (X Y : Matrix ι ι ℂ) : + hsReal (conjStarAlgAut ℂ _ U X) (conjStarAlgAut ℂ _ U Y) = hsReal X Y := by + change traceReal (star (conjStarAlgAut ℂ _ U X) * conjStarAlgAut ℂ _ U Y) = _ + rw [← map_star, ← map_mul, traceReal_unitary_conj] + rfl + +theorem sylv_unitary_conj (U : unitary (Matrix ι ι ℂ)) (A X : Matrix ι ι ℂ) : + sylv (conjStarAlgAut ℂ _ U A) (conjStarAlgAut ℂ _ U X) = + conjStarAlgAut ℂ _ U (sylv A X) := by simp only [sylv, map_add, map_mul] + +theorem variation_unitary_conj (U : unitary (Matrix ι ι ℂ)) (A K X : Matrix ι ι ℂ) : + variation (conjStarAlgAut ℂ _ U A) (conjStarAlgAut ℂ _ U K) + (conjStarAlgAut ℂ _ U X) = variation A K X := by + simp only [variation, penalty, sylv_unitary_conj, hsReal_unitary_conj] + +theorem rootCost_unitary_conj (U : unitary (Matrix ι ι ℂ)) (A K : Matrix ι ι ℂ) : + rootCost (conjStarAlgAut ℂ _ U A) (conjStarAlgAut ℂ _ U K) = rootCost A K := by + unfold rootCost + congr 2 + ext z + constructor + · rintro ⟨X, rfl⟩ + obtain ⟨Y, rfl⟩ := (conjStarAlgAut ℂ _ U).surjective X + exact ⟨Y, (variation_unitary_conj U A K Y).symm⟩ + · rintro ⟨X, rfl⟩ + exact ⟨conjStarAlgAut ℂ _ U X, variation_unitary_conj U A K X⟩ + +def hessianCost (P K : Matrix ι ι ℂ) : ℝ := rootCost (CFC.sqrt P) K + +theorem exists_sylv_solution {A K : Matrix ι ι ℂ} (hA : A.IsHermitian) + (hsupp : ∀ i j, hA.eigenvalues i + hA.eigenvalues j = 0 → + conjStarAlgAut ℂ _ (star hA.eigenvectorUnitary) K i j = 0) : + ∃ Y, sylv A Y = K := by + let U := hA.eigenvectorUnitary + let K' := conjStarAlgAut ℂ _ (star U) K + let Y := diagonalSolution hA.eigenvalues K' + refine ⟨conjStarAlgAut ℂ _ U Y, ?_⟩ + have hy : sylv (Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ))) Y = K' := + diagonalSolution_solves _ _ hsupp + have hh := congrArg (conjStarAlgAut ℂ _ U) hy + rw [← sylv_unitary_conj] at hh + have ha : conjStarAlgAut ℂ _ U + (Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ))) = A := + hA.spectral_theorem.symm + rw [ha] at hh + simpa only [K', ← conjStarAlgAut_mul_apply, Unitary.mul_star_self, map_one, + StarAlgEquiv.one_apply] using hh + +theorem exists_sylv_solution_posDef {A : Matrix ι ι ℂ} (hA : A.PosDef) + (K : Matrix ι ι ℂ) : ∃ Y, sylv A Y = K := by + apply exists_sylv_solution hA.isHermitian + intro i j hij + exact False.elim ((ne_of_gt (add_pos (hA.eigenvalues_pos i) + (hA.eigenvalues_pos j))) hij) + +theorem hessianCost_antitone {P Q K : Matrix ι ι ℂ} + (hsol : ∃ Y, sylv (CFC.sqrt P) Y = K) (hPQ : P ≤ Q) : + hessianCost Q K ≤ hessianCost P K := by + exact rootCost_antitone (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) hsol (CFC.monotone_sqrt hPQ) + +def sylvLinear (A : Matrix ι ι ℂ) : Matrix ι ι ℂ →ₗ[ℝ] Matrix ι ι ℂ where + toFun := sylv A + map_add' := sylv_add_right A + map_smul' c X := sylv_smul_right c A X + +def sylvEquiv {A : Matrix ι ι ℂ} (hA : A.PosDef) : + Matrix ι ι ℂ ≃L[ℝ] Matrix ι ι ℂ := + (LinearEquiv.ofBijective (sylvLinear A) + (let hs : Function.Surjective (sylvLinear A) := exists_sylv_solution_posDef hA + ⟨(LinearMap.injective_iff_surjective).mpr hs, hs⟩)).toContinuousLinearEquiv + +theorem hasFDerivAt_square {A : Matrix ι ι ℂ} (hA : A.PosDef) : + HasFDerivAt (fun X : Matrix ι ι ℂ => X * X) (sylvEquiv hA : _ →L[ℝ] _) A := by + convert! (hasFDerivAt_id A (𝕜 := ℝ)).mul' (hasFDerivAt_id A (𝕜 := ℝ)) using 1 + +theorem contDiff_square {n : WithTop ℕ∞} : + ContDiff ℝ n (fun X : Matrix ι ι ℂ => X * X) := contDiff_id.mul contDiff_id + +theorem sqrt_smul {P : Matrix ι ι ℂ} (hP : P.PosSemidef) {c : ℝ} (hc : 0 ≤ c) : + CFC.sqrt (c • P) = Real.sqrt c • CFC.sqrt P := by + apply CFC.sqrt_unique + · rw [smul_mul_smul_comm, Real.mul_self_sqrt hc, CFC.sqrt_mul_sqrt_self P hP.nonneg] + · exact smul_nonneg (Real.sqrt_nonneg c) (CFC.sqrt_nonneg P) + +theorem sqrt_smoothWithin_posDef {P : Matrix ι ι ℂ} (hP : P.PosDef) : + ContDiffWithinAt ℝ ∞ CFC.sqrt {Q : Matrix ι ι ℂ | 0 ≤ Q} P ∧ + HasFDerivWithinAt CFC.sqrt + ((sylvEquiv (Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt P hP.isStrictlyPositive))).symm : _ →L[ℝ] _) + {Q : Matrix ι ι ℂ | 0 ≤ Q} P := by + let A := CFC.sqrt P + have hA : A.PosDef := Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt P hP.isStrictlyPositive) + let f : Matrix ι ι ℂ → Matrix ι ι ℂ := fun X => X * X + have hc : ContDiffAt ℝ ∞ f A := contDiff_square.contDiffAt + have hd : HasFDerivAt f (sylvEquiv hA : _ →L[ℝ] _) A := hasFDerivAt_square hA + have hn : (∞ : WithTop ℕ∞) ≠ 0 := by simp + let g := hc.localInverse hd hn + have hstrict := hc.hasStrictFDerivAt' hd hn + have hAP : f A = P := CFC.sqrt_mul_sqrt_self P hP.posSemidef.nonneg + have hgC : ContDiffAt ℝ ∞ g P := hAP ▸ hc.to_localInverse hd hn + have hgD : HasFDerivAt g ((sylvEquiv hA).symm : _ →L[ℝ] _) P := + hAP ▸ hstrict.to_localInverse.hasFDerivAt + have heq : g =ᶠ[nhdsWithin P {Q : Matrix ι ι ℂ | 0 ≤ Q}] CFC.sqrt := by + have ht := (CFC.continuousOn_sqrt P hP.posSemidef.nonneg).eventually + hstrict.eventually_left_inverse + filter_upwards [ht, self_mem_nhdsWithin] with Q hQ hQpos + change g (CFC.sqrt Q * CFC.sqrt Q) = CFC.sqrt Q at hQ + rwa [CFC.sqrt_mul_sqrt_self Q hQpos] at hQ + refine ⟨hgC.contDiffWithinAt.congr_of_eventuallyEq_of_mem heq.symm + hP.posSemidef.nonneg, ?_⟩ + exact hgD.hasFDerivWithinAt.congr_of_eventuallyEq heq.symm + (heq.symm.self_of_nhdsWithin hP.posSemidef.nonneg) + +def traceRealCLM : Matrix ι ι ℂ →L[ℝ] ℝ := + (show Matrix ι ι ℂ →ₗ[ℝ] ℝ from + { toFun := traceReal + map_add' := traceReal_add + map_smul' := traceReal_smul }).toContinuousLinearMap + +omit [DecidableEq ι] in +@[simp] theorem traceRealCLM_apply (X : Matrix ι ι ℂ) : + traceRealCLM X = traceReal X := rfl + +def energy (P : Matrix ι ι ℂ) : ℝ := traceReal (P * CFC.sqrt P) + +def energyGradient (P : Matrix ι ι ℂ) : Matrix ι ι ℂ →L[ℝ] ℝ := + (3 / 2 : ℝ) • traceRealCLM.comp ((ContinuousLinearMap.mul ℝ _) (CFC.sqrt P)) + +@[simp] theorem energyGradient_apply (P K : Matrix ι ι ℂ) : + energyGradient P K = (3 / 2 : ℝ) * traceReal (CFC.sqrt P * K) := rfl + +theorem traceReal_mul_sylv (A Y : Matrix ι ι ℂ) : + traceReal (A * sylv A Y) = 2 * traceReal (A * A * Y) := by + simp only [sylv, mul_add, traceReal_add] + simp only [← Matrix.mul_assoc] + rw [traceReal_mul_cycle A Y A] + ring + +theorem energy_hasFDerivWithinAt {P : Matrix ι ι ℂ} (hP : P.PosDef) : + HasFDerivWithinAt energy (energyGradient P) + {Q : Matrix ι ι ℂ | 0 ≤ Q} P := by + let A := CFC.sqrt P + have hA : A.PosDef := Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt P hP.isStrictlyPositive) + let e := sylvEquiv hA + have hd := (sqrt_smoothWithin_posDef hP).2 + change HasFDerivWithinAt CFC.sqrt (e.symm : _ →L[ℝ] _) _ P at hd + have hmul := (hasFDerivWithinAt_id (s := {Q : Matrix ι ι ℂ | 0 ≤ Q}) + P (𝕜 := ℝ)).mul' hd + have h := traceRealCLM.hasFDerivAt.comp_hasFDerivWithinAt P hmul + apply h.congr_fderiv + ext K + change traceReal (P * e.symm K + K * A) = + (3 / 2 : ℝ) * traceReal (A * K) + have he : sylv A (e.symm K) = K := e.apply_symm_apply K + have hp : A * A = P := CFC.sqrt_mul_sqrt_self P hP.posSemidef.nonneg + have ht := traceReal_mul_sylv A (e.symm K) + rw [he, hp] at ht + rw [traceReal_add, traceReal_mul_comm K A] + linarith + +theorem hsReal_single (K : Matrix ι ι ℂ) (i j : ι) (z : ℂ) : + hsReal K (Matrix.single i j z) = (star (K i j) * z).re := by + simp [hsReal_eq_sum, Matrix.single_apply, ite_and, apply_ite] + +theorem sylv_diagonal_single (q : ι → ℝ) (i j : ι) (z : ℂ) : + sylv (Matrix.diagonal (fun i => (q i : ℂ))) (Matrix.single i j z) = + Matrix.single i j (((q i + q j : ℝ) : ℂ) * z) := by + ext a b + rw [sylv_diagonal_apply] + by_cases ha : i = a + · subst a + by_cases hb : j = b + · subst b; simp + · simp [hb] + · simp [ha] + +theorem sylv_solvable_diagonal_of_bddAbove (q : ι → ℝ) (K : Matrix ι ι ℂ) + (hb : BddAbove (Set.range (variation (Matrix.diagonal (fun i => (q i : ℂ))) K))) : + ∃ Y, sylv (Matrix.diagonal (fun i => (q i : ℂ))) Y = K := by + refine ⟨diagonalSolution q K, diagonalSolution_solves q K ?_⟩ + intro i j hij + by_contra hK + obtain ⟨b, hb⟩ := hb + let X := Matrix.single i j (K i j) + have hzero : sylv (Matrix.diagonal (fun i => (q i : ℂ))) X = 0 := by + simp [X, sylv_diagonal_single, hij] + have hhs : hsReal K X = ‖K i j‖^2 := by + rw [hsReal_single] + simp only [RCLike.star_def, ← Complex.normSq_eq_conj_mul_self, Complex.ofReal_re, + Complex.normSq_eq_norm_sq] + have hpos : 0 < ‖K i j‖^2 := sq_pos_of_pos (norm_pos_iff.mpr hK) + let t : ℝ := b / (2 * ‖K i j‖^2) + 1 + have ht := hb (Set.mem_range_self (t • X)) + change variation _ K (t • X) ≤ b at ht + simp only [variation, penalty, sylv_smul_right, hzero, smul_zero, + hsReal_zero_right, sub_zero, hsReal_smul_right, hhs] at ht + have hcalc : 2 * (t * ‖K i j‖^2) = b + 2 * ‖K i j‖^2 := by + dsimp [t] + field_simp [ne_of_gt hpos] + rw [hcalc] at ht + linarith + +theorem sylv_solvable_of_bddAbove {A K : Matrix ι ι ℂ} (hA : A.IsHermitian) + (hb : BddAbove (Set.range (variation A K))) : ∃ Y, sylv A Y = K := by + let U := hA.eigenvectorUnitary + let f := conjStarAlgAut ℂ (Matrix ι ι ℂ) (star U) + let K' := f K + have hAd : f A = Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ)) := + hA.conjStarAlgAut_star_eigenvectorUnitary + have hb' : BddAbove (Set.range (variation (f A) K')) := by + obtain ⟨b, hb⟩ := hb + refine ⟨b, ?_⟩ + rintro _ ⟨X, rfl⟩ + obtain ⟨Y, rfl⟩ := f.surjective X + change variation (f A) (f K) (f Y) ≤ b + exact (variation_unitary_conj (star U) A K Y) ▸ hb (Set.mem_range_self Y) + rw [hAd] at hb' + obtain ⟨Y, hY⟩ := sylv_solvable_diagonal_of_bddAbove _ K' hb' + refine ⟨f.symm Y, ?_⟩ + apply f.injective + change f (sylv A (f.symm Y)) = f K + calc + _ = sylv (f A) (f (f.symm Y)) := (sylv_unitary_conj (star U) A (f.symm Y)).symm + _ = sylv (Matrix.diagonal (fun i => (hA.eigenvalues i : ℂ))) Y := by + rw [f.apply_symm_apply, hAd] + _ = _ := hY + +theorem sylv_solvable_mono {A B K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hB : B.IsHermitian) (hsol : ∃ Y, sylv A Y = K) (hAB : A ≤ B) : + ∃ Y, sylv B Y = K := by + apply sylv_solvable_of_bddAbove hB + obtain ⟨b, hb⟩ := variation_bddAbove hA hsol + refine ⟨b, ?_⟩ + rintro _ ⟨X, rfl⟩ + exact (sub_le_sub_left (penalty_mono hAB X) _).trans (hb (Set.mem_range_self X)) + +omit [DecidableEq ι] in +theorem rootCost_smul_direction {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hsol : ∃ Y, sylv A Y = K) (c : ℝ) : + rootCost A (c • K) = c^2 * rootCost A K := by + obtain ⟨Y, hY⟩ := hsol + have hc : sylv A (c • Y) = c • K := by rw [sylv_smul_right, hY] + rw [rootCost_eq_of_solution hA hc, rootCost_eq_of_solution hA hY, + hsReal_smul_left, hsReal_smul_right] + ring + +omit [DecidableEq ι] in +theorem penalty_three_identity (A X Y Z : Matrix ι ι ℂ) : + 3 * (penalty A X + penalty A Y + penalty A Z) - penalty A (X + Y + Z) = + penalty A (X - Y) + penalty A (Y - Z) + penalty A (Z - X) := by + simp only [penalty, sylv_add_right, sylv_sub_right, hsReal_add_left, + hsReal_add_right, hsReal_sub_left, hsReal_sub_right] + ring + +omit [DecidableEq ι] in +theorem rootCost_three_le {A K L M : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hK : ∃ X, sylv A X = K) (hL : ∃ Y, sylv A Y = L) + (hM : ∃ Z, sylv A Z = M) : + rootCost A (K + L + M) ≤ 3 * (rootCost A K + rootCost A L + rootCost A M) := by + obtain ⟨X, rfl⟩ := hK + obtain ⟨Y, rfl⟩ := hL + obtain ⟨Z, rfl⟩ := hM + have hall : sylv A (X + Y + Z) = sylv A X + sylv A Y + sylv A Z := by simp + rw [rootCost_eq_of_solution hA hall, rootCost_eq_of_solution hA rfl, + rootCost_eq_of_solution hA rfl, rootCost_eq_of_solution hA rfl] + rw [← hall] + have hc := penalty_three_identity A X Y Z + have hn := add_nonneg (add_nonneg (penalty_nonneg hA (X - Y)) + (penalty_nonneg hA (Y - Z))) (penalty_nonneg hA (Z - X)) + rw [hsReal_symm (sylv A _) _, hsReal_symm (sylv A _) _, + hsReal_symm (sylv A _) _, hsReal_symm (sylv A _) _] + change (3 / 2 : ℝ) * penalty A (X + Y + Z) ≤ + 3 * ((3 / 2 : ℝ) * penalty A X + (3 / 2 : ℝ) * penalty A Y + + (3 / 2 : ℝ) * penalty A Z) + linarith + +omit [Fintype ι] [DecidableEq ι] in + +theorem gram_diag_eq_zero_iff {κ : Type uκ} [Fintype κ] + (R : Matrix κ ι ℂ) (j : ι) : + (Rᴴ * R) j j = 0 ↔ ∀ i, R i j = 0 := by + change star (fun i => R i j) ⬝ᵥ (fun i => R i j) = 0 ↔ _ + rw [dotProduct_star_self_eq_zero] + exact funext_iff + +theorem sylv_solvable_inserted_gram {κ : Type uκ} [Fintype κ] + (R : Matrix κ ι ℂ) (D : Matrix κ κ ℂ) : + ∃ Y, sylv (CFC.sqrt (Rᴴ * R)) Y = Rᴴ * D * R := by + let P := Rᴴ * R + let A := CFC.sqrt P + have hP : P.PosSemidef := Matrix.posSemidef_conjTranspose_mul_self R + have hA : A.PosSemidef := Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P) + let U := hA.isHermitian.eigenvectorUnitary + let f := conjStarAlgAut ℂ (Matrix ι ι ℂ) (star U) + let R' := R * (U : Matrix ι ι ℂ) + let q := hA.isHermitian.eigenvalues + have hAd : f A = Matrix.diagonal (fun i => (q i : ℂ)) := + hA.isHermitian.conjStarAlgAut_star_eigenvectorUnitary + have hAp : A * A = P := CFC.sqrt_mul_sqrt_self P hP.nonneg + have hGram : R'ᴴ * R' = f P := by + simp only [R', f, P, conjStarAlgAut_apply, Unitary.coe_star, + Matrix.star_eq_conjTranspose, Matrix.conjTranspose_mul, + Matrix.conjTranspose_conjTranspose, Matrix.mul_assoc] + have hIns : f (Rᴴ * D * R) = R'ᴴ * D * R' := by + simp only [R', f, conjStarAlgAut_apply, Unitary.coe_star, + Matrix.star_eq_conjTranspose, Matrix.conjTranspose_mul, + Matrix.conjTranspose_conjTranspose, Matrix.mul_assoc] + apply exists_sylv_solution hA.isHermitian + intro i j hij + have hj : q j = 0 := + ((add_eq_zero_iff_of_nonneg (hA.eigenvalues_nonneg i) + (hA.eigenvalues_nonneg j)).mp hij).2 + have hdiag : (R'ᴴ * R') j j = 0 := by + rw [hGram, ← hAp, map_mul, hAd, Matrix.diagonal_mul_diagonal] + simp [hj] + have hcol := (gram_diag_eq_zero_iff R' j).mp hdiag + change f (Rᴴ * D * R) i j = 0 + rw [hIns] + simp only [Matrix.mul_apply, hcol, mul_zero, Finset.sum_const_zero] + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open Unitary +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +theorem trace_unitary_conj (U : unitary (Matrix ι ι ℂ)) (X : Matrix ι ι ℂ) : + Matrix.trace (conjStarAlgAut ℂ _ U X) = Matrix.trace X := by + rw [conjStarAlgAut_apply, Matrix.trace_mul_cycle, + Unitary.coe_star_mul_self, one_mul] + +theorem norm_unitary_conj (U : unitary (Matrix ι ι ℂ)) (X : Matrix ι ι ℂ) : + ‖conjStarAlgAut ℂ _ U X‖ = ‖X‖ := by + rw [conjStarAlgAut_apply, ← Unitary.coe_star, + CStarRing.norm_mul_coe_unitary, CStarRing.norm_coe_unitary_mul] + +theorem hermitian_unitary_conj (U : unitary (Matrix ι ι ℂ)) + {X : Matrix ι ι ℂ} (hX : X.IsHermitian) : + (conjStarAlgAut ℂ _ U X).IsHermitian := by + change star (conjStarAlgAut ℂ _ U X) = conjStarAlgAut ℂ _ U X + rw [← map_star] + exact congrArg (conjStarAlgAut ℂ _ U) hX + +theorem sqrt_unitary_conj (U : unitary (Matrix ι ι ℂ)) + {P : Matrix ι ι ℂ} (hP : P.PosSemidef) : + CFC.sqrt (conjStarAlgAut ℂ _ U P) = conjStarAlgAut ℂ _ U (CFC.sqrt P) := by + apply CFC.sqrt_unique + · rw [← map_mul, CFC.sqrt_mul_sqrt_self P hP.nonneg] + · simpa only [conjStarAlgAut_apply, Matrix.star_eq_conjTranspose] using + ((Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).mul_mul_conjTranspose_same + (U : Matrix ι ι ℂ)).nonneg + +theorem hessianCost_unitary_conj (U : unitary (Matrix ι ι ℂ)) + {P : Matrix ι ι ℂ} (hP : P.PosSemidef) (K : Matrix ι ι ℂ) : + hessianCost (conjStarAlgAut ℂ _ U P) (conjStarAlgAut ℂ _ U K) = + hessianCost P K := by + simp only [hessianCost, sqrt_unitary_conj U hP, rootCost_unitary_conj] + +theorem sqrt_diagonal_square (m : ι → ℝ) : + CFC.sqrt (Matrix.diagonal (fun i => (m i : ℂ)) * + Matrix.diagonal (fun i => (m i : ℂ))) = + Matrix.diagonal (fun i => ((|m i| : ℝ) : ℂ)) := by + apply CFC.sqrt_unique + · simp only [Matrix.diagonal_mul_diagonal] + congr 1 + ext i + change ((|m i| : ℝ) : ℂ) * ((|m i| : ℝ) : ℂ) = (m i : ℂ) * (m i : ℂ) + exact_mod_cast (show |m i| * |m i| = m i * m i by nlinarith [sq_abs (m i)]) + · exact (Matrix.PosSemidef.diagonal + (fun i => RCLike.ofReal_nonneg.mpr (abs_nonneg (m i)))).nonneg + +theorem hessianCost_diagonal_square (m : ι → ℝ) (D : Matrix ι ι ℂ) : + hessianCost (Matrix.diagonal (fun i => (m i : ℂ)) * + Matrix.diagonal (fun i => (m i : ℂ))) + (Matrix.diagonal (fun i => (m i : ℂ)) * D * + Matrix.diagonal (fun i => (m i : ℂ))) = + (3 / 2 : ℝ) * ∑ i, ∑ j, spectralWeight D m i j := by + unfold hessianCost + rw [sqrt_diagonal_square] + have hs : ∀ i j, |m i| + |m j| = 0 → + (Matrix.diagonal (fun i => (m i : ℂ)) * D * + Matrix.diagonal (fun i => (m i : ℂ))) i j = 0 := by + intro i j hij + have hi : m i = 0 := abs_eq_zero.mp + ((add_eq_zero_iff_of_nonneg (abs_nonneg _) (abs_nonneg _)).mp hij).1 + simp [Matrix.mul_diagonal, Matrix.diagonal_mul, hi] + rw [rootCost_diagonal _ (fun i => abs_nonneg (m i)) _ hs] + congr 1 + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + simp only [spectralWeight, Matrix.mul_diagonal, Matrix.diagonal_mul, + norm_mul, Complex.norm_real, Real.norm_eq_abs, mul_pow] + ring + +theorem norm_trace_cube_le_hessian (M D : Matrix ι ι ℂ) + (hM : M.IsHermitian) (hD : D.IsHermitian) : + ‖Matrix.trace ((D * M)^3)‖ ≤ + (10 / 3 : ℝ) * ‖D‖ * hessianCost (M * M) (M * D * M) := by + let U := star hM.eigenvectorUnitary + let f := conjStarAlgAut ℂ (Matrix ι ι ℂ) U + let D' := f D + let m := hM.eigenvalues + have hM' : f M = Matrix.diagonal (fun i => (m i : ℂ)) := + hM.conjStarAlgAut_star_eigenvectorUnitary + have hd : D'.IsHermitian := hermitian_unitary_conj U hD + have hn : ‖D'‖ = ‖D‖ := norm_unitary_conj U D + have ht : Matrix.trace ((D' * Matrix.diagonal (fun i => (m i : ℂ)))^3) = + Matrix.trace ((D * M)^3) := by + rw [← hM', ← map_mul, ← map_pow] + exact trace_unitary_conj U _ + have hp : (M * M).PosSemidef := by + simpa only [hM.eq] using Matrix.posSemidef_conjTranspose_mul_self M + have hc := hessianCost_unitary_conj U hp (M * D * M) + change hessianCost (f (M * M)) (f (M * D * M)) = _ at hc + simp only [map_mul, hM'] at hc + rw [hessianCost_diagonal_square] at hc + have hb := norm_trace_cube_mul_diagonal_le D' hd m + rw [ht, hn] at hb + rw [← hc] + nlinarith + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open Unitary +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +abbrev Three := Fin 3 +abbrev BlockSpace (ι : Type uι) := Three × ι +abbrev blocks (A : Matrix Three Three (Matrix ι ι ℂ)) : + Matrix (BlockSpace ι) (BlockSpace ι) ℂ := Matrix.comp _ _ _ _ _ A + +omit [DecidableEq ι] in +theorem blocks_mul (A B : Matrix Three Three (Matrix ι ι ℂ)) : + blocks (A * B) = blocks A * blocks B := by + exact (Matrix.compRingEquiv Three ι ℂ).map_mul A B + +omit [Fintype ι] [DecidableEq ι] in +theorem blocks_star (A : Matrix Three Three (Matrix ι ι ℂ)) : + blocks Aᴴ = (blocks A)ᴴ := rfl + +omit [DecidableEq ι] in +theorem blocks_trace (A : Matrix Three Three (Matrix ι ι ℂ)) : + Matrix.trace (blocks A) = ∑ v, Matrix.trace (A v v) := by + simp only [Matrix.trace, Matrix.diag, Matrix.comp_apply, Fintype.sum_prod_type] + +def triangleBlocks (W : Three → Matrix ι ι ℂ) : Matrix Three Three (Matrix ι ι ℂ) := + fun i j => if i = 0 then (if j = 0 then 0 else if j = 1 then W 0 else (W 2)ᴴ) + else if i = 1 then (if j = 0 then (W 0)ᴴ else if j = 1 then 0 else W 1) + else (if j = 0 then W 2 else if j = 1 then (W 1)ᴴ else 0) + +def triangle (W : Three → Matrix ι ι ℂ) := blocks (triangleBlocks W) +def blockD (D : Three → Matrix ι ι ℂ) := blocks (Matrix.diagonal D) + +omit [Fintype ι] [DecidableEq ι] in +theorem triangle_hermitian (W : Three → Matrix ι ι ℂ) : + (triangle W).IsHermitian := by + change (blocks (triangleBlocks W))ᴴ = blocks (triangleBlocks W) + rw [← blocks_star] + congr 1 + ext v w i j + fin_cases v <;> fin_cases w <;> simp [triangleBlocks, Matrix.conjTranspose_apply] + +omit [Fintype ι] [DecidableEq ι] in +theorem blockD_hermitian (D : Three → Matrix ι ι ℂ) + (hD : ∀ v, (D v).IsHermitian) : (blockD D).IsHermitian := by + unfold blockD + change (blocks (Matrix.diagonal D))ᴴ = blocks (Matrix.diagonal D) + rw [← blocks_star, Matrix.diagonal_conjTranspose] + have hs : star D = D := funext hD + rw [hs] + +theorem triangle_trace_cube (W D : Three → Matrix ι ι ℂ) + (hD : ∀ v, (D v).IsHermitian) : + Matrix.trace ((blockD D * triangle W)^3) = + (6 : ℂ) * (Matrix.trace (D 0 * W 0 * D 1 * W 1 * D 2 * W 2)).re := by + let τ := Matrix.trace (D 0 * W 0 * D 1 * W 1 * D 2 * W 2) + have hreverse : + Matrix.trace (D 0 * (W 2)ᴴ * D 2 * (W 1)ᴴ * D 1 * (W 0)ᴴ) = star τ := by + simp only [τ, ← Matrix.trace_conjTranspose, Matrix.conjTranspose_mul, (hD _).eq, + Matrix.mul_assoc] + rw [Matrix.trace_mul_comm] + simp only [Matrix.mul_assoc] + have hrot (A B C E F G : Matrix ι ι ℂ) : + Matrix.trace (A * B * C * E * F * G) = + Matrix.trace (F * G * A * B * C * E) := by + simpa only [Matrix.mul_assoc] using Matrix.trace_mul_cycle (A * B) (C * E) (F * G) + have hf1 := hrot (D 1) (W 1) (D 2) (W 2) (D 0) (W 0) + have hf2 := (hrot (D 2) (W 2) (D 0) (W 0) (D 1) (W 1)).trans hf1 + have hr2 := hrot (D 2) (W 1)ᴴ (D 1) (W 0)ᴴ (D 0) (W 2)ᴴ + have hr1 := (hrot (D 1) (W 0)ᴴ (D 0) (W 2)ᴴ (D 2) (W 1)ᴴ).trans hr2 + simp only [Matrix.mul_assoc] at hf1 hf2 hr1 hr2 hreverse + unfold blockD triangle + rw [← blocks_mul, pow_three, ← blocks_mul, ← blocks_mul, blocks_trace] + simp only [Matrix.mul_apply, Fin.sum_univ_three, Matrix.diagonal_apply, triangleBlocks, + zero_mul, mul_zero, add_zero, zero_add, ite_true, ite_false, Fin.reduceEq, + mul_add, add_mul, Matrix.trace_add, Matrix.mul_assoc] + simp only [Matrix.trace_zero, add_zero, zero_add] + rw [hf1, hf2, hr1, hr2, hreverse] + simp only [← Matrix.mul_assoc] + change τ + star τ + (star τ + τ) + (τ + star τ) = (6 : ℂ) * (τ.re : ℂ) + apply Complex.ext <;> simp [RCLike.star_def, Complex.mul_re, Complex.mul_im] + ring + +def vertexProj (v : Three) : Matrix (BlockSpace ι) (BlockSpace ι) ℂ := + Matrix.diagonal (fun a => if a.1 = v then 1 else 0) + +omit [Fintype ι] in +theorem vertexProj_hermitian (v : Three) : (vertexProj (ι := ι) v).IsHermitian := by + apply Matrix.isHermitian_diagonal_iff.mpr + intro i + change star (if i.1 = v then (1 : ℂ) else 0) = _ + split_ifs <;> simp + +theorem vertexProj_sq (v : Three) : vertexProj (ι := ι) v * vertexProj v = vertexProj v := by + simp only [vertexProj, Matrix.diagonal_mul_diagonal] + congr 1 + ext a + split_ifs <;> simp + +omit [Fintype ι] in +theorem sum_vertexProj : ∑ v, vertexProj (ι := ι) v = 1 := by + ext a b + by_cases hab : a = b + · subst b + simp [vertexProj, Matrix.sum_apply] + · simp [vertexProj, Matrix.sum_apply, hab] + +theorem vertexProj_commute_blockD (v : Three) (D : Three → Matrix ι ι ℂ) : + vertexProj v * blockD D = blockD D * vertexProj v := by + ext a b + simp only [vertexProj, Matrix.diagonal_mul, Matrix.mul_diagonal, blockD, + Matrix.comp_apply, Matrix.diagonal_apply] + by_cases hab : a.1 = b.1 + · simp [hab] + · simp [hab] + +def rowStar (W : Three → Matrix ι ι ℂ) (v : Three) := vertexProj v * triangle W + +def starGram (W : Three → Matrix ι ι ℂ) (v : Three) := (rowStar W v)ᴴ * rowStar W v + +def starInsert (W D : Three → Matrix ι ι ℂ) (v : Three) := + (rowStar W v)ᴴ * blockD D * rowStar W v + +theorem starGram_eq (W : Three → Matrix ι ι ℂ) (v : Three) : + starGram W v = triangle W * vertexProj v * triangle W := by + simp only [starGram, rowStar, Matrix.conjTranspose_mul, + (vertexProj_hermitian v).eq, (triangle_hermitian W).eq] + rw [← Matrix.mul_assoc, Matrix.mul_assoc (triangle W), vertexProj_sq] + +theorem starInsert_eq (W D : Three → Matrix ι ι ℂ) (v : Three) : + starInsert W D v = triangle W * vertexProj v * blockD D * triangle W := by + simp only [starInsert, rowStar, Matrix.conjTranspose_mul, + (vertexProj_hermitian v).eq, (triangle_hermitian W).eq] + have hp := vertexProj_commute_blockD v D + calc + _ = triangle W * (vertexProj v * (blockD D * vertexProj v)) * triangle W := by + simp only [Matrix.mul_assoc] + _ = _ := by rw [← hp, ← Matrix.mul_assoc (vertexProj v), vertexProj_sq]; + simp only [Matrix.mul_assoc] + +theorem sum_starGram (W : Three → Matrix ι ι ℂ) : + ∑ v, starGram W v = triangle W * triangle W := by + simp_rw [starGram_eq] + rw [← Matrix.sum_mul, ← Matrix.mul_sum, sum_vertexProj, mul_one] + +theorem sum_starInsert (W D : Three → Matrix ι ι ℂ) : + ∑ v, starInsert W D v = triangle W * blockD D * triangle W := by + simp_rw [starInsert_eq] + rw [← Matrix.sum_mul, ← Matrix.sum_mul, ← Matrix.mul_sum, sum_vertexProj, mul_one] + +theorem starGram_le (W : Three → Matrix ι ι ℂ) (v : Three) : + starGram W v ≤ triangle W * triangle W := by + rw [← sum_starGram] + exact Finset.single_le_sum (fun w _ => + (Matrix.posSemidef_conjTranspose_mul_self (rowStar W w)).nonneg) (Finset.mem_univ v) + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open Unitary +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +theorem hessianCost_common_three (P K : Fin 3 → Matrix ι ι ℂ) + {Q : Matrix ι ι ℂ} (hPQ : ∀ v, P v ≤ Q) + (hsol : ∀ v, ∃ X, sylv (CFC.sqrt (P v)) X = K v) : + hessianCost Q (∑ v, K v) ≤ 3 * ∑ v, hessianCost (P v) (K v) := by + have hq : (CFC.sqrt Q).PosSemidef := Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg Q) + have hsolQ (v : Fin 3) : ∃ X, sylv (CFC.sqrt Q) X = K v := + sylv_solvable_mono (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (P v))) + hq.isHermitian (hsol v) (CFC.monotone_sqrt (hPQ v)) + calc + _ ≤ 3 * ∑ v, hessianCost Q (K v) := by + simpa only [Fin.sum_univ_three, hessianCost] using + rootCost_three_le hq (hsolQ 0) (hsolQ 1) (hsolQ 2) + _ ≤ _ := mul_le_mul_of_nonneg_left (Finset.sum_le_sum + (fun v _ => hessianCost_antitone (hsol v) (hPQ v))) (by norm_num) + +theorem triangle_common_metric (W D : Three → Matrix ι ι ℂ) : + hessianCost (triangle W * triangle W) (triangle W * blockD D * triangle W) ≤ + 3 * ∑ v, hessianCost (starGram W v) (starInsert W D v) := by + rw [← sum_starInsert] + exact hessianCost_common_three (starGram W) (starInsert W D) + (starGram_le W) (fun v => sylv_solvable_inserted_gram (rowStar W v) (blockD D)) + +theorem triangle_real_trace_le (W D : Three → Matrix ι ι ℂ) + (hD : ∀ v, (D v).IsHermitian) : + |(Matrix.trace (D 0 * W 0 * D 1 * W 1 * D 2 * W 2)).re| ≤ + (5 / 3 : ℝ) * ‖blockD D‖ * ∑ v, hessianCost (starGram W v) (starInsert W D v) := by + have h := norm_trace_cube_le_hessian (triangle W) (blockD D) + (triangle_hermitian W) (blockD_hermitian D hD) + rw [triangle_trace_cube W D hD, norm_mul, Complex.norm_ofNat, + Complex.norm_real, Real.norm_eq_abs] at h + have hm := triangle_common_metric W D + have hc := mul_le_mul_of_nonneg_left hm + (show 0 ≤ (10 / 3 : ℝ) * ‖blockD D‖ by positivity) + nlinarith + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open Unitary +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def diagonalUnitary (c : ι → ℂ) (hc : ∀ i, ‖c i‖ = 1) : unitary (Matrix ι ι ℂ) := + ⟨Matrix.diagonal c, by + apply Matrix.mem_unitaryGroup_iff'.mpr + rw [Matrix.star_eq_conjTranspose, Matrix.diagonal_conjTranspose, + Matrix.diagonal_mul_diagonal] + have hci (i : ι) : star (c i) * c i = 1 := by + simpa only [RCLike.star_def, mul_comm, hc, one_pow, Complex.ofReal_one] using + Complex.mul_conj' (c i) + ext i j + by_cases hij : i = j + · subst j; simpa using hci i + · simp [hij]⟩ + +theorem insertedCost_right_unitary (R L : Matrix ι ι ℂ) + (U : unitary (Matrix ι ι ℂ)) : + hessianCost ((R * (U : Matrix ι ι ℂ))ᴴ * (R * (U : Matrix ι ι ℂ))) + ((R * (U : Matrix ι ι ℂ))ᴴ * L * (R * (U : Matrix ι ι ℂ))) = + hessianCost (Rᴴ * R) (Rᴴ * L * R) := by + simpa only [conjStarAlgAut_apply, Unitary.coe_star, Matrix.star_eq_conjTranspose, + Matrix.conjTranspose_mul, Matrix.conjTranspose_conjTranspose, Matrix.mul_assoc] using + hessianCost_unitary_conj (star U) (Matrix.posSemidef_conjTranspose_mul_self R) + (Rᴴ * L * R) + +def phaseEdge (z : ℂ) (W : Three → Matrix ι ι ℂ) : Three → Matrix ι ι ℂ := + fun v => if v = 0 then z • W 0 else W v + +def rowPhase (z : ℂ) (v : Three) : BlockSpace ι → ℂ := fun a => + if v = 0 then (if a.1 = 1 then z else 1) + else if v = 1 then (if a.1 = 0 then star z else 1) else 1 + +omit [Fintype ι] [DecidableEq ι] in +theorem rowPhase_norm (z : ℂ) (hz : ‖z‖ = 1) (v : Three) (a : BlockSpace ι) : + ‖rowPhase z v a‖ = 1 := by + unfold rowPhase + split_ifs <;> simp [hz] + +theorem rowStar_phase (z : ℂ) (W : Three → Matrix ι ι ℂ) (v : Three) : + rowStar (phaseEdge z W) v = rowStar W v * Matrix.diagonal (rowPhase z v) := by + ext ⟨a, i⟩ ⟨b, j⟩ + fin_cases v <;> fin_cases a <;> fin_cases b + all_goals simp [rowStar, vertexProj, triangle, Matrix.comp_apply, + triangleBlocks, phaseEdge, rowPhase, Matrix.diagonal_mul, Matrix.mul_diagonal, + Matrix.conjTranspose_apply, smul_eq_mul, mul_comm] + +theorem starCost_phase (z : ℂ) (hz : ‖z‖ = 1) + (W D : Three → Matrix ι ι ℂ) (v : Three) : + hessianCost (starGram (phaseEdge z W) v) (starInsert (phaseEdge z W) D v) = + hessianCost (starGram W v) (starInsert W D v) := by + let U := diagonalUnitary (rowPhase (ι := ι) z v) (rowPhase_norm z hz v) + have he : rowStar (phaseEdge z W) v = rowStar W v * (U : Matrix _ _ ℂ) := + rowStar_phase z W v + simp only [starGram, starInsert, he] + exact insertedCost_right_unitary (rowStar W v) (blockD D) U + +omit [Fintype ι] [DecidableEq ι] in +theorem exists_phase_norm (τ : ℂ) : ∃ z : ℂ, ‖z‖ = 1 ∧ z * τ = (‖τ‖ : ℂ) := by + by_cases hτ : τ = 0 + · exact ⟨1, norm_one, by simp [hτ]⟩ + have hn : ‖τ‖ ≠ 0 := norm_ne_zero_iff.mpr hτ + have hnc : (‖τ‖ : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hn + refine ⟨star τ / (‖τ‖ : ℂ), ?_, ?_⟩ + · simp [hn] + · calc + (star τ / (‖τ‖ : ℂ)) * τ = (τ * star τ) / (‖τ‖ : ℂ) := by ring + _ = (‖τ‖ : ℂ)^2 / (‖τ‖ : ℂ) := by rw [RCLike.star_def, Complex.mul_conj'] + _ = _ := by field_simp + +theorem mixed_trace_le (W D : Three → Matrix ι ι ℂ) + (hD : ∀ v, (D v).IsHermitian) : + ‖Matrix.trace (D 0 * W 0 * D 1 * W 1 * D 2 * W 2)‖ ≤ + (5 / 3 : ℝ) * ‖blockD D‖ * ∑ v, hessianCost (starGram W v) (starInsert W D v) := by + let τ := Matrix.trace (D 0 * W 0 * D 1 * W 1 * D 2 * W 2) + obtain ⟨z, hz, he⟩ := exists_phase_norm τ + have ht : Matrix.trace (D 0 * phaseEdge z W 0 * D 1 * + phaseEdge z W 1 * D 2 * phaseEdge z W 2) = z * τ := by + simp [phaseEdge, τ] + have h := triangle_real_trace_le (phaseEdge z W) D hD + rw [ht, he] at h + simp only [Complex.ofReal_re, abs_of_nonneg (norm_nonneg τ)] at h + simpa only [starCost_phase z hz] using h + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator ContDiff +open Unitary MeasureTheory Filter +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def regularize (P : Matrix ι ι ℂ) (η : ℝ) : Matrix ι ι ℂ := P + η • 1 + +omit [Fintype ι] in +theorem regularize_posDef {P : Matrix ι ι ℂ} (hP : P.PosSemidef) + {η : ℝ} (hη : 0 < η) : (regularize P η).PosDef := + Matrix.PosDef.posSemidef_add hP (Matrix.PosDef.one.smul hη) + +omit [Fintype ι] in +theorem regularize_posSemidef {P : Matrix ι ι ℂ} (hP : P.PosSemidef) + {η : ℝ} (hη : 0 ≤ η) : (regularize P η).PosSemidef := + hP.add (Matrix.PosSemidef.one.smul hη) + +theorem continuous_sqrt_matrix {X : Type uX} [TopologicalSpace X] + {P : X → Matrix ι ι ℂ} (hP : _root_.Continuous P) + (hn : ∀ x, (P x).PosSemidef) : _root_.Continuous (fun x => CFC.sqrt (P x)) := + CFC.continuousOn_sqrt.comp_continuous hP (fun x => (hn x).nonneg) + +theorem continuous_energyGram : _root_.Continuous + (fun R : Matrix ι ι ℂ => energy (Rᴴ * R)) := by + unfold energy + exact traceRealCLM.continuous.comp + ((continuous_star.mul continuous_id).mul + (continuous_sqrt_matrix (continuous_star.mul continuous_id) + Matrix.posSemidef_conjTranspose_mul_self)) + +theorem energy_unitary_conj (U : unitary (Matrix ι ι ℂ)) + {P : Matrix ι ι ℂ} (hP : P.PosSemidef) : + energy (conjStarAlgAut ℂ _ U P) = energy P := by + have hs : CFC.sqrt (conjStarAlgAut ℂ _ U P) = + conjStarAlgAut ℂ _ U (CFC.sqrt P) := by + apply CFC.sqrt_unique + · rw [← map_mul, CFC.sqrt_mul_sqrt_self P hP.nonneg] + · simpa only [conjStarAlgAut_apply, Matrix.star_eq_conjTranspose] using + ((Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).mul_mul_conjTranspose_same + (U : Matrix ι ι ℂ)).nonneg + simp only [energy, hs, ← map_mul, traceReal_unitary_conj] + +theorem sqrt_diagonal_nonneg (q : ι → ℝ) (hq : ∀ i, 0 ≤ q i) : + CFC.sqrt (Matrix.diagonal (fun i => (q i : ℂ))) = + Matrix.diagonal (fun i => ((Real.sqrt (q i) : ℝ) : ℂ)) := by + apply CFC.sqrt_unique + · rw [Matrix.diagonal_mul_diagonal] + congr 1 + ext i + exact_mod_cast (Real.mul_self_sqrt (hq i)) + · exact (Matrix.PosSemidef.diagonal (fun i => + RCLike.ofReal_nonneg.mpr (Real.sqrt_nonneg _))).nonneg + +theorem energy_diagonal (q : ι → ℝ) (hq : ∀ i, 0 ≤ q i) : + energy (Matrix.diagonal (fun i => (q i : ℂ))) = ∑ i, q i * Real.sqrt (q i) := by + simp [energy, sqrt_diagonal_nonneg q hq, Matrix.diagonal_mul_diagonal, traceReal] + +theorem energy_spectral {P : Matrix ι ι ℂ} (hP : P.PosSemidef) : + energy P = ∑ i, hP.isHermitian.eigenvalues i * Real.sqrt (hP.isHermitian.eigenvalues i) := by + rw [← energy_unitary_conj (star hP.isHermitian.eigenvectorUnitary) hP, + hP.isHermitian.conjStarAlgAut_star_eigenvectorUnitary] + exact energy_diagonal _ hP.eigenvalues_nonneg + +theorem energy_eq_of_charpoly_eq {P Q : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hPQ : P.charpoly = Q.charpoly) : + energy P = energy Q := by + rw [energy_spectral hP, energy_spectral hQ, + (hP.isHermitian.eigenvalues_eq_eigenvalues_iff hQ.isHermitian).mpr hPQ] + +theorem energy_gram_flip (R : Matrix ι ι ℂ) : energy (Rᴴ * R) = energy (R * Rᴴ) := + energy_eq_of_charpoly_eq (Matrix.posSemidef_conjTranspose_mul_self R) + (Matrix.posSemidef_self_mul_conjTranspose R) (Matrix.charpoly_mul_comm _ _) + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open MeasureTheory Filter Topology +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma gradient_gram (R D A : Matrix ι ι ℂ) (hA : A.IsHermitian) : + traceReal (A * (Rᴴ * D + Dᴴ * R)) = 2 * hsReal (R * A) D := by + have he : traceReal (A * (Dᴴ * R)) = traceReal (A * (Rᴴ * D)) := by + rw [traceReal_mul_comm, ← traceReal_star (Dᴴ * R * A)] + simp only [Matrix.conjTranspose_mul, hA.eq, Matrix.conjTranspose_conjTranspose, + Matrix.mul_assoc] + simp only [hsReal, Matrix.conjTranspose_mul, hA.eq, Matrix.mul_assoc, + mul_add, traceReal_add, he] + ring + +lemma energyGradient_gram (P R D : Matrix ι ι ℂ) : + energyGradient P (Rᴴ * D + Dᴴ * R) = + 3 * hsReal (R * CFC.sqrt P) D := by + have hs : (CFC.sqrt P).IsHermitian := + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).isHermitian + rw [energyGradient_apply, gradient_gram R D (CFC.sqrt P) hs] + ring + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open Unitary Filter Topology +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma hsReal_nonneg_of_posSemidef {X Y : Matrix ι ι ℂ} + (hX : X.PosSemidef) (hY : Y.PosSemidef) : 0 ≤ hsReal X Y := by + let B := CFC.sqrt Y + have hB : B.IsHermitian := (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg Y)).isHermitian + have hBB : B * B = Y := CFC.sqrt_mul_sqrt_self Y hY.nonneg + have hn := traceReal_nonneg (hX.conjTranspose_mul_mul_same B) + rw [hB.eq, traceReal_mul_cycle, hBB, traceReal_mul_comm] at hn + simpa only [hsReal, hX.isHermitian.eq] using hn + +omit [DecidableEq ι] in +lemma sylv_star {A : Matrix ι ι ℂ} (hA : A.IsHermitian) (Y : Matrix ι ι ℂ) : + sylv A Yᴴ = (sylv A Y)ᴴ := by + simp only [sylv, Matrix.conjTranspose_add, Matrix.conjTranspose_mul, hA.eq] + exact add_comm _ _ + +lemma sylv_solution_isHermitian {A K Y : Matrix ι ι ℂ} (hA : A.PosDef) + (hK : K.IsHermitian) (hY : sylv A Y = K) : Y.IsHermitian := by + change Yᴴ = Y + apply (sylvEquiv hA).injective + change sylv A Yᴴ = sylv A Y + rw [sylv_star hA.isHermitian, hY, hK.eq] + +lemma posSemidef_of_sylv_posSemidef {A Y : Matrix ι ι ℂ} (hA : A.PosDef) + (hY : Y.IsHermitian) (hS : (sylv A Y).PosSemidef) : Y.PosSemidef := by + apply hY.posSemidef_iff_eigenvalues_nonneg.mpr + intro i + change 0 ≤ hY.eigenvalues i + let U := hY.eigenvectorUnitary + let f := conjStarAlgAut ℂ (Matrix ι ι ℂ) (star U) + have hD : f Y = Matrix.diagonal (fun i => (hY.eigenvalues i : ℂ)) := + hY.conjStarAlgAut_star_eigenvectorUnitary + have hAf : (f A).PosDef := by + exact (Matrix.IsUnit.posDef_star_right_conjugate_iff + (Unitary.isUnit_coe (U := star U))).mpr hA + have hSf : (f (sylv A Y)).PosSemidef := by + exact hS.mul_mul_conjTranspose_same (star U : Matrix ι ι ℂ) + have he : f (sylv A Y) = sylv (f A) (f Y) := + (sylv_unitary_conj (star U) A Y).symm + rw [he, hD] at hSf + have hn : 0 ≤ (sylv (f A) (Matrix.diagonal (fun i => (hY.eigenvalues i : ℂ))) i i).re := + (RCLike.nonneg_iff.mp hSf.diag_nonneg).1 + have hp : 0 < (f A i i).re := (RCLike.pos_iff.mp hAf.diag_pos).1 + simp only [sylv, Matrix.add_apply, Matrix.mul_diagonal, Matrix.diagonal_mul, + Complex.add_re, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, + mul_zero, zero_mul, sub_zero] at hn + nlinarith + +lemma rootCost_le_of_order_posDef {A K : Matrix ι ι ℂ} (hA : A.PosDef) + (hK : K.IsHermitian) (c : ℝ) + (hm : (c • (A * A) - K).PosSemidef) + (hp : (c • (A * A) + K).PosSemidef) : + rootCost A K ≤ (3 / 4 : ℝ) * c^2 * traceReal (A * A * A) := by + let Y := (sylvEquiv hA).symm K + have hY : sylv A Y = K := (sylvEquiv hA).apply_symm_apply K + have hYh : Y.IsHermitian := sylv_solution_isHermitian hA hK hY + let Z : Matrix ι ι ℂ := (c / 2) • A + have hZ : sylv A Z = c • (A * A) := by + change A * ((c / 2) • A) + ((c / 2) • A) * A = _ + rw [Matrix.mul_smul, Matrix.smul_mul, ← add_smul] + congr 1 + ring + have hYZ : (Z + Y).PosSemidef := by + apply posSemidef_of_sylv_posSemidef hA + ((hA.isHermitian.smul (show IsSelfAdjoint (c / 2) from rfl)).add hYh) + rwa [sylv_add_right, hZ, hY] + have hn := hsReal_nonneg_of_posSemidef hm hYZ + have hc : hsReal (sylv A Z) Y = hsReal K Z := by + rw [← hsReal_sylv_symm hA.isHermitian, hY, hsReal_symm] + have hb : hsReal K Y ≤ hsReal (sylv A Z) Z := by + rw [← hZ, hsReal_sub_left, hsReal_add_right, hsReal_add_right, hc] at hn + linarith + rw [rootCost_eq_of_solution hA.posSemidef hY] + calc + _ ≤ (3 / 2 : ℝ) * hsReal (sylv A Z) Z := mul_le_mul_of_nonneg_left hb (by norm_num) + _ = _ := by + rw [hZ] + change (3 / 2 : ℝ) * hsReal (c • (A * A)) ((c / 2) • A) = _ + rw [hsReal_smul_left, hsReal_smul_right] + simp only [hsReal, Matrix.conjTranspose_mul, hA.isHermitian.eq] + ring + +lemma regularize_square (A : Matrix ι ι ℂ) (δ : ℝ) : + regularize A δ * regularize A δ = A * A + (2 * δ) • A + δ^2 • 1 := by + simp only [regularize, add_mul, mul_add, Matrix.mul_smul, Matrix.smul_mul, + one_mul, mul_one, smul_smul] + module + +lemma regularize_square_le {A : Matrix ι ι ℂ} (hA : A.PosSemidef) + {δ : ℝ} (hδ : 0 ≤ δ) : A * A ≤ regularize A δ * regularize A δ := by + rw [regularize_square, add_assoc] + exact le_add_of_nonneg_right + (((hA.smul (mul_nonneg (by norm_num) hδ)).add + (Matrix.PosSemidef.one.smul (sq_nonneg δ))).nonneg) + +omit [DecidableEq ι] in +lemma continuous_variation_left (K X : Matrix ι ι ℂ) : + Continuous (fun A : Matrix ι ι ℂ => variation A K X) := by + exact continuous_const.sub (traceRealCLM.continuous.comp + (continuous_const.mul ((continuous_id.mul continuous_const).add + (continuous_const.mul continuous_id)))) + +theorem rootCost_le_of_order {A K : Matrix ι ι ℂ} (hA : A.PosSemidef) + (hK : K.IsHermitian) {c : ℝ} (hc : 0 ≤ c) + (hm : (c • (A * A) - K).PosSemidef) + (hp : (c • (A * A) + K).PosSemidef) : + rootCost A K ≤ (3 / 4 : ℝ) * c^2 * traceReal (A * A * A) := by + have hb (δ : ℝ) (hδ : 0 < δ) (X : Matrix ι ι ℂ) : + (3 / 2 : ℝ) * variation (regularize A δ) K X ≤ + (3 / 4 : ℝ) * c^2 * traceReal (regularize A δ * regularize A δ * regularize A δ) := by + have hd := regularize_posDef hA hδ + have ho := smul_le_smul_of_nonneg_left (regularize_square_le hA hδ.le) hc + have hmd : (c • (regularize A δ * regularize A δ) - K).PosSemidef := + Matrix.nonneg_iff_posSemidef.mp (hm.nonneg.trans (sub_le_sub_right ho K)) + have hpd : (c • (regularize A δ * regularize A δ) + K).PosSemidef := + Matrix.nonneg_iff_posSemidef.mp (hp.nonneg.trans (add_le_add ho le_rfl)) + exact (variation_le_rootCost hd.posSemidef (exists_sylv_solution_posDef hd K) X).trans + (rootCost_le_of_order_posDef hd hK c hmd hpd) + have hv (X : Matrix ι ι ℂ) : variation A K X ≤ (1 / 2 : ℝ) * c^2 * traceReal (A * A * A) := by + have hAc : Continuous (regularize A) := by unfold regularize; fun_prop + have hf : Continuous (fun δ => (3 / 2 : ℝ) * variation (regularize A δ) K X) := + continuous_const.mul ((continuous_variation_left K X).comp hAc) + have hg : Continuous (fun δ => (3 / 4 : ℝ) * c^2 * + traceReal (regularize A δ * regularize A δ * regularize A δ)) := + continuous_const.mul (traceRealCLM.continuous.comp ((hAc.mul hAc).mul hAc)) + have hl := le_of_tendsto_of_tendsto + (hf.continuousAt.tendsto.mono_left nhdsWithin_le_nhds : + Tendsto _ (𝓝[>] (0 : ℝ)) (𝓝 _)) + (hg.continuousAt.tendsto.mono_left nhdsWithin_le_nhds) + (show ∀ᶠ δ in 𝓝[>] (0 : ℝ), _ from by + filter_upwards [self_mem_nhdsWithin] with δ hδ + exact hb δ hδ X) + simp only [regularize, zero_smul, add_zero] at hl + linarith + have hs : sSup (Set.range (variation A K)) ≤ (1 / 2 : ℝ) * c^2 * traceReal (A * A * A) := by + apply csSup_le (Set.range_nonempty _) + rintro _ ⟨X, rfl⟩ + exact hv X + unfold rootCost + nlinarith + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +theorem hessianCost_inserted_gram_le (R L : Matrix ι ι ℂ) (hL : L.IsHermitian) : + hessianCost (Rᴴ * R) (Rᴴ * L * R) ≤ + (3 / 4 : ℝ) * ‖L‖^2 * energy (Rᴴ * R) := by + have hP := Matrix.posSemidef_conjTranspose_mul_self R + have hA : (CFC.sqrt (Rᴴ * R)).PosSemidef := + Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (Rᴴ * R)) + have hAA : CFC.sqrt (Rᴴ * R) * CFC.sqrt (Rᴴ * R) = Rᴴ * R := + CFC.sqrt_mul_sqrt_self (Rᴴ * R) hP.nonneg + have hb : L ≤ ‖L‖ • (1 : Matrix ι ι ℂ) := by + simpa only [Algebra.algebraMap_eq_smul_one] using + (show IsSelfAdjoint L from hL).le_algebraMap_norm_self + have ha : -(‖L‖ • (1 : Matrix ι ι ℂ)) ≤ L := by + simpa only [Algebra.algebraMap_eq_smul_one] using + (show IsSelfAdjoint L from hL).neg_algebraMap_norm_le_self + have hm : (‖L‖ • (Rᴴ * R) - Rᴴ * L * R).PosSemidef := by + simpa only [Matrix.mul_sub, Matrix.sub_mul, Matrix.mul_smul, Matrix.smul_mul, + Matrix.mul_one] using + (Matrix.nonneg_iff_posSemidef.mp (sub_nonneg.mpr hb)).conjTranspose_mul_mul_same R + have hp : (‖L‖ • (Rᴴ * R) + Rᴴ * L * R).PosSemidef := by + simpa only [Matrix.mul_add, Matrix.add_mul, Matrix.mul_smul, Matrix.smul_mul, + Matrix.mul_one, add_comm] using + (Matrix.nonneg_iff_posSemidef.mp (neg_le_iff_add_nonneg.mp ha)).conjTranspose_mul_mul_same R + unfold hessianCost + simpa only [hAA, energy] using rootCost_le_of_order hA + (by + change (Rᴴ * L * R)ᴴ = Rᴴ * L * R + simp only [Matrix.conjTranspose_mul, Matrix.conjTranspose_conjTranspose, hL.eq, Matrix.mul_assoc]) (norm_nonneg L) (by simpa [hAA] using hm) + (by simpa [hAA] using hp) + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma blockD_mul (A B : Three → Matrix ι ι ℂ) : + blockD A * blockD B = blockD (fun v => A v * B v) := by + unfold blockD + rw [← blocks_mul, Matrix.diagonal_mul_diagonal] + +omit [Fintype ι] [DecidableEq ι] in +lemma blockD_star (A : Three → Matrix ι ι ℂ) : + (blockD A)ᴴ = blockD (fun v => (A v)ᴴ) := by + unfold blockD + rw [← blocks_star, Matrix.diagonal_conjTranspose] + rfl + +lemma blockD_posSemidef (A : Three → Matrix ι ι ℂ) + (hA : ∀ v, (A v).PosSemidef) : (blockD A).PosSemidef := by + have he : blockD A = (blockD (fun v => CFC.sqrt (A v)))ᴴ * + blockD (fun v => CFC.sqrt (A v)) := by + rw [blockD_star, blockD_mul] + congr 1 + funext v + rw [(Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (A v))).isHermitian.eq, + CFC.sqrt_mul_sqrt_self (A v) (hA v).nonneg] + rw [he] + exact Matrix.posSemidef_conjTranspose_mul_self _ + +lemma sqrt_blockD (A : Three → Matrix ι ι ℂ) (hA : ∀ v, (A v).PosSemidef) : + CFC.sqrt (blockD A) = blockD (fun v => CFC.sqrt (A v)) := by + apply CFC.sqrt_unique + · rw [blockD_mul] + congr 1 + funext v + exact CFC.sqrt_mul_sqrt_self (A v) (hA v).nonneg + · exact (blockD_posSemidef _ (fun v => + Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (A v)))).nonneg + +omit [DecidableEq ι] in +lemma hsReal_blocks_blockD (K : Matrix Three Three (Matrix ι ι ℂ)) + (Y : Three → Matrix ι ι ℂ) : + hsReal (blocks K) (blockD Y) = ∑ v, hsReal (K v v) (Y v) := by + simp only [hsReal, blockD, ← blocks_star, ← blocks_mul, traceReal, blocks_trace, + Matrix.mul_diagonal, Matrix.conjTranspose_apply, Matrix.star_eq_conjTranspose, Complex.re_sum] + +omit [DecidableEq ι] in +lemma sylv_blockD (A Y : Three → Matrix ι ι ℂ) : + sylv (blockD A) (blockD Y) = blockD (fun v => sylv (A v) (Y v)) := by + unfold sylv + rw [blockD_mul, blockD_mul] + unfold blockD + change (Matrix.compRingEquiv Three ι ℂ) _ + (Matrix.compRingEquiv Three ι ℂ) _ = + (Matrix.compRingEquiv Three ι ℂ) _ + rw [← map_add, ← Matrix.diagonal_add] + +lemma rootCost_blockD_ge_diagonal (A : Three → Matrix ι ι ℂ) + (hA : ∀ v, (A v).PosSemidef) (K : Matrix Three Three (Matrix ι ι ℂ)) + (hsol : ∃ Y, sylv (blockD A) Y = blocks K) + (hdiag : ∀ v, ∃ Y, sylv (A v) Y = K v v) : + ∑ v, rootCost (A v) (K v v) ≤ rootCost (blockD A) (blocks K) := by + choose Y hY using hdiag + have hv := variation_le_rootCost (blockD_posSemidef A hA) hsol (blockD Y) + have he : variation (blockD A) (blocks K) (blockD Y) = + ∑ v, hsReal (K v v) (Y v) := by + rw [variation, penalty, sylv_blockD] + simp only [hY] + rw [hsReal_blocks_blockD] + change 2 * (∑ v, hsReal (K v v) (Y v)) - + hsReal (blocks (Matrix.diagonal Y)) (blockD (fun v => K v v)) = _ + rw [hsReal_blocks_blockD, Finset.mul_sum, ← Finset.sum_sub_distrib] + simp only [Matrix.diagonal_apply_eq] + apply Finset.sum_congr rfl + intro v _ + rw [hsReal_symm (Y v) (K v v)] + ring + rw [he] at hv + simp_rw [rootCost_eq_of_solution (hA _) (hY _)] + simpa only [Finset.mul_sum] using hv + +theorem hessianCost_le_of_le_smul {P Q K : Matrix ι ι ℂ} + (hQ : Q.PosSemidef) (hsol : ∃ Y, sylv (CFC.sqrt P) Y = K) + {c : ℝ} (hc : 0 < c) (hPQ : P ≤ c • Q) : + hessianCost Q K ≤ Real.sqrt c * hessianCost P K := by + have hr : 0 < Real.sqrt c := Real.sqrt_pos.mpr hc + have hAs : (CFC.sqrt Q).PosSemidef := Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg Q) + have hps : (CFC.sqrt P).PosSemidef := Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P) + have hsolc := sylv_solvable_mono hps + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (c • Q))).isHermitian hsol + (CFC.monotone_sqrt hPQ) + rw [sqrt_smul hQ hc.le] at hsolc + have hsolQ : ∃ Y, sylv (CFC.sqrt Q) Y = K := by + obtain ⟨Y, hY⟩ := hsolc + refine ⟨Real.sqrt c • Y, ?_⟩ + rwa [sylv_smul_right, ← sylv_smul_left] + have hm := hessianCost_antitone hsol hPQ + change rootCost (CFC.sqrt (c • Q)) K ≤ rootCost (CFC.sqrt P) K at hm + rw [sqrt_smul hQ hc.le, rootCost_scale hAs hsolQ hr] at hm + have hx := mul_le_mul_of_nonneg_left hm hr.le + simpa only [hessianCost, ← mul_assoc, mul_inv_cancel₀ hr.ne', one_mul] using hx + +def wideRow (R : Three → Matrix ι ι ℂ) : Matrix ι (BlockSpace ι) ℂ := + fun i a => R a.1 i a.2 + +def gramRow (R : Three → Matrix ι ι ℂ) := blocks (fun i j => (R i)ᴴ * R j) +def insertRow (R : Three → Matrix ι ι ℂ) (L : Matrix ι ι ℂ) := + blocks (fun i j => (R i)ᴴ * L * R j) +def pinchedRow (R : Three → Matrix ι ι ℂ) := blockD (fun v => (R v)ᴴ * R v) + +omit [DecidableEq ι] in +lemma gramRow_eq (R : Three → Matrix ι ι ℂ) : gramRow R = (wideRow R)ᴴ * wideRow R := by + rfl + +omit [DecidableEq ι] in +lemma insertRow_eq (R : Three → Matrix ι ι ℂ) (L : Matrix ι ι ℂ) : + insertRow R L = (wideRow R)ᴴ * L * wideRow R := by + rfl + +omit [DecidableEq ι] in +lemma gramRow_posSemidef (R : Three → Matrix ι ι ℂ) : (gramRow R).PosSemidef := by + rw [gramRow_eq] + exact Matrix.posSemidef_conjTranspose_mul_self _ + +lemma pinchedRow_posSemidef (R : Three → Matrix ι ι ℂ) : (pinchedRow R).PosSemidef := + blockD_posSemidef _ (fun _ => Matrix.posSemidef_conjTranspose_mul_self _) + +lemma gramRow_le_two_pinchedRow (R : Three → Matrix ι ι ℂ) + (v : Three) (hR : R v = 0) : gramRow R ≤ (2 : ℝ) • pinchedRow R := by + let R' : Three → Matrix ι ι ℂ := fun i => if i = v + 1 then R i else -(R i) + have he : (2 : ℝ) • pinchedRow R - gramRow R = gramRow R' := by + ext a b + rcases a with ⟨a, i⟩ + rcases b with ⟨b, j⟩ + change (2 : ℝ) • (Matrix.diagonal (fun k => (R k)ᴴ * R k) a b i j) - + ((R a)ᴴ * R b) i j = ((R' a)ᴴ * R' b) i j + fin_cases v + · change R 0 = 0 at hR + fin_cases a <;> fin_cases b <;> simp [R', hR, two_mul, sub_eq_add_neg] + · change R 1 = 0 at hR + fin_cases a <;> fin_cases b <;> simp [R', hR, two_mul, sub_eq_add_neg] + · change R 2 = 0 at hR + fin_cases a <;> fin_cases b <;> simp [R', hR, two_mul, sub_eq_add_neg] + rw [Matrix.le_iff, he] + exact gramRow_posSemidef R' + +theorem hessianCost_gramRow_ge_edges (R : Three → Matrix ι ι ℂ) + (L : Matrix ι ι ℂ) (v : Three) (hR : R v = 0) : + (∑ w, hessianCost ((R w)ᴴ * R w) ((R w)ᴴ * L * R w)) ≤ + Real.sqrt 2 * hessianCost (gramRow R) (insertRow R L) := by + have hsol : ∃ Y, sylv (CFC.sqrt (gramRow R)) Y = insertRow R L := by + rw [gramRow_eq, insertRow_eq] + exact sylv_solvable_inserted_gram _ _ + have hQ := pinchedRow_posSemidef R + have hle := gramRow_le_two_pinchedRow R v hR + have hqs : (CFC.sqrt (pinchedRow R)).PosSemidef := + Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (pinchedRow R)) + have hsol2 := sylv_solvable_mono + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (gramRow R))) + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg ((2 : ℝ) • pinchedRow R))).isHermitian + hsol (CFC.monotone_sqrt hle) + rw [sqrt_smul hQ (by norm_num : (0 : ℝ) ≤ 2)] at hsol2 + have hsolQ : ∃ Y, sylv (CFC.sqrt (pinchedRow R)) Y = insertRow R L := by + obtain ⟨Y, hY⟩ := hsol2 + refine ⟨Real.sqrt 2 • Y, ?_⟩ + rwa [sylv_smul_right, ← sylv_smul_left] + have hdiag (w : Three) := sylv_solvable_inserted_gram (R w) L + have hs : CFC.sqrt (pinchedRow R) = blockD (fun w => CFC.sqrt ((R w)ᴴ * R w)) := + sqrt_blockD _ (fun _ => Matrix.posSemidef_conjTranspose_mul_self _) + have hl := rootCost_blockD_ge_diagonal + (fun w => CFC.sqrt ((R w)ᴴ * R w)) + (fun w => Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg ((R w)ᴴ * R w))) + (fun i j => (R i)ᴴ * L * R j) (by simpa only [← hs, insertRow] using hsolQ) hdiag + calc + _ ≤ hessianCost (pinchedRow R) (insertRow R L) := by + simpa only [hessianCost, hs, insertRow] using hl + _ ≤ _ := hessianCost_le_of_le_smul hQ hsol (by norm_num : (0 : ℝ) < 2) hle + +lemma rowStar_blocks (W : Three → Matrix ι ι ℂ) (v : Three) : + rowStar W v = blocks (fun a b => if a = v then triangleBlocks W a b else 0) := by + ext a b + rcases a with ⟨a, i⟩ + rcases b with ⟨b, j⟩ + simp only [rowStar, vertexProj, Matrix.diagonal_mul, triangle, blocks, Matrix.comp_apply] + change (if a = v then (1 : ℂ) else 0) * triangleBlocks W a b i j = + (if a = v then triangleBlocks W a b else 0) i j + split_ifs <;> simp + +lemma starGram_eq_gramRow (W : Three → Matrix ι ι ℂ) (v : Three) : + starGram W v = gramRow (triangleBlocks W v) := by + unfold starGram + rw [rowStar_blocks] + let A : Matrix Three Three (Matrix ι ι ℂ) := fun a b => if a = v then triangleBlocks W a b else 0 + change (blocks A)ᴴ * blocks A = _ + rw [← blocks_star, ← blocks_mul] + unfold gramRow + congr 1 + apply Matrix.ext + intro a b + change (∑ c, star (A c a) * A c b) = (triangleBlocks W v a)ᴴ * triangleBlocks W v b + simp [A, apply_ite, Matrix.star_eq_conjTranspose] + +lemma starInsert_eq_insertRow (W D : Three → Matrix ι ι ℂ) (v : Three) : + starInsert W D v = insertRow (triangleBlocks W v) (D v) := by + unfold starInsert blockD + rw [rowStar_blocks] + let A : Matrix Three Three (Matrix ι ι ℂ) := fun a b => if a = v then triangleBlocks W a b else 0 + change (blocks A)ᴴ * blocks (Matrix.diagonal D) * blocks A = _ + rw [← blocks_star, ← blocks_mul, ← blocks_mul] + unfold insertRow + congr 1 + apply Matrix.ext + intro a b + rw [Matrix.mul_apply] + simp only [Matrix.mul_diagonal, Matrix.conjTranspose_apply] + change (∑ c, star (A c a) * D c * A c b) = + (triangleBlocks W v a)ᴴ * D v * triangleBlocks W v b + simp [A, apply_ite, Matrix.star_eq_conjTranspose] + +def centerGram (W : Three → Matrix ι ι ℂ) (v : Three) : Matrix ι ι ℂ := + ∑ w, triangleBlocks W v w * (triangleBlocks W v w)ᴴ + +omit [Fintype ι] [DecidableEq ι] in +lemma triangleBlocks_adj (W : Three → Matrix ι ι ℂ) (v w : Three) : + (triangleBlocks W v w)ᴴ = triangleBlocks W w v := by + fin_cases v <;> fin_cases w <;> simp [triangleBlocks] + +omit [Fintype ι] [DecidableEq ι] in +lemma triangleBlocks_diag (W : Three → Matrix ι ι ℂ) (v : Three) : + triangleBlocks W v v = 0 := by + fin_cases v <;> simp [triangleBlocks] + +omit [DecidableEq ι] in +lemma centerGram_posSemidef (W : Three → Matrix ι ι ℂ) (v : Three) : + (centerGram W v).PosSemidef := by + apply Matrix.nonneg_iff_posSemidef.mp + exact Finset.sum_nonneg (fun w _ => (Matrix.posSemidef_self_mul_conjTranspose _).nonneg) + +omit [DecidableEq ι] in +lemma edgeGram_le_centerGram (W : Three → Matrix ι ι ℂ) (v w : Three) : + (triangleBlocks W w v)ᴴ * triangleBlocks W w v ≤ centerGram W v := by + rw [triangleBlocks_adj] + rw [← triangleBlocks_adj W v w] + exact Finset.single_le_sum (fun a _ => + (Matrix.posSemidef_self_mul_conjTranspose (triangleBlocks W v a)).nonneg) + (Finset.mem_univ w) + +theorem neighbor_comparison (W D : Three → Matrix ι ι ℂ) (w : Three) : + (∑ v, hessianCost (centerGram W v) + ((triangleBlocks W w v)ᴴ * D w * triangleBlocks W w v)) ≤ + Real.sqrt 2 * hessianCost (starGram W w) (starInsert W D w) := by + rw [starGram_eq_gramRow, starInsert_eq_insertRow] + calc + _ ≤ ∑ v, hessianCost ((triangleBlocks W w v)ᴴ * triangleBlocks W w v) + ((triangleBlocks W w v)ᴴ * D w * triangleBlocks W w v) := by + apply Finset.sum_le_sum + intro v _ + exact hessianCost_antitone (sylv_solvable_inserted_gram _ _) + (edgeGram_le_centerGram W v w) + _ ≤ _ := hessianCost_gramRow_ge_edges _ (D w) w (triangleBlocks_diag W w) + +end TriangularHilbert.MatrixEnergy + +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +open MeasureTheory Filter Topology +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def sqrtInverse {P : Matrix ι ι ℂ} (hP : P.PosDef) : + Matrix ι ι ℂ ≃L[ℝ] Matrix ι ι ℂ := + (sylvEquiv (Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt P hP.isStrictlyPositive))).symm + +lemma sqrtInverse_solves {P : Matrix ι ι ℂ} (hP : P.PosDef) (K : Matrix ι ι ℂ) : + sylv (CFC.sqrt P) (sqrtInverse hP K) = K := by + exact (sylvEquiv (Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt P hP.isStrictlyPositive))).apply_symm_apply K + +def hessianPairPD {P : Matrix ι ι ℂ} (hP : P.PosDef) (K L : Matrix ι ι ℂ) : ℝ := + (3 / 2 : ℝ) * hsReal K (sqrtInverse hP L) + +lemma hessianPairPD_symm {P : Matrix ι ι ℂ} (hP : P.PosDef) (K L : Matrix ι ι ℂ) : + hessianPairPD hP K L = hessianPairPD hP L K := by + have hs := hsReal_sylv_symm + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).isHermitian + (sqrtInverse hP K) (sqrtInverse hP L) + rw [sqrtInverse_solves, sqrtInverse_solves, hsReal_symm _ L] at hs + exact congrArg ((3 / 2 : ℝ) * ·) hs.symm + +lemma hessianPairPD_self {P : Matrix ι ι ℂ} (hP : P.PosDef) (K : Matrix ι ι ℂ) : + hessianPairPD hP K K = hessianCost P K := by + exact (rootCost_eq_of_solution + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) (sqrtInverse_solves hP K)).symm + +lemma two_hessianPairPD_le {P : Matrix ι ι ℂ} (hP : P.PosDef) (K L : Matrix ι ι ℂ) : + 2 * hessianPairPD hP K L ≤ hessianCost P K + hessianCost P L := by + have hn := rootCost_nonneg (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) + (show ∃ Y, sylv (CFC.sqrt P) Y = K - L from ⟨_, sqrtInverse_solves hP (K - L)⟩) + change 0 ≤ hessianCost P (K - L) at hn + rw [← hessianPairPD_self hP] at hn + have he : hessianPairPD hP (K - L) (K - L) = + hessianPairPD hP K K + hessianPairPD hP L L - 2 * hessianPairPD hP K L := by + have hs := hessianPairPD_symm hP K L + simp only [hessianPairPD, map_sub, hsReal_sub_left, hsReal_sub_right] at * + linarith + rw [he, hessianPairPD_self, hessianPairPD_self] at hn + linarith + +lemma hessianPairPD_eq_trace {P K L : Matrix ι ι ℂ} + (hP : P.PosDef) (hK : K.IsHermitian) : + hessianPairPD hP K L = (3 / 2 : ℝ) * traceReal (sqrtInverse hP L * K) := by + simp only [hessianPairPD, hsReal, hK.eq, traceReal_mul_comm K] + +theorem energy_path_hasDerivAt {P : ℝ → Matrix ι ι ℂ} {U : Matrix ι ι ℂ} {x : ℝ} + (hP : (P x).PosDef) (hn : ∀ᶠ t in 𝓝 x, 0 ≤ P t) (hd : HasDerivAt P U x) : + HasDerivAt (fun t => energy (P t)) (energyGradient (P x) U) x := by + exact (energy_hasFDerivWithinAt hP).comp_hasDerivAt x hd hn + +theorem energyGradient_path_hasDerivAt {P K : ℝ → Matrix ι ι ℂ} + {U V : Matrix ι ι ℂ} {x : ℝ} + (hP : (P x).PosDef) (hn : ∀ᶠ t in 𝓝 x, 0 ≤ P t) + (hK : (K x).IsHermitian) (hdP : HasDerivAt P U x) (hdK : HasDerivAt K V x) : + HasDerivAt (fun t => energyGradient (P t) (K t)) + (hessianPairPD hP (K x) U + energyGradient (P x) V) x := by + have hs : HasDerivAt (fun t => CFC.sqrt (P t)) (sqrtInverse hP U) x := + (sqrt_smoothWithin_posDef hP).2.comp_hasDerivAt x hdP hn + have hm := hs.fun_mul hdK + have ht := (traceRealCLM.hasFDerivAt.comp_hasDerivAt x hm).const_smul (3 / 2 : ℝ) + convert! ht using 1 + simp only [hessianPairPD_eq_trace hP hK, energyGradient_apply, + traceRealCLM_apply, traceReal_add, smul_eq_mul] + ring + +end TriangularHilbert.MatrixEnergy + +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +noncomputable section +namespace TriangularHilbert.MatrixEnergy +variable {ι : Type uι} {κ : Type uκ} {μ : Type uμ} [Fintype ι] [Fintype κ] [Fintype μ] + +def rowNorm (R : Matrix ι κ ℂ) (i : ι) : ℝ := Real.sqrt (∑ j, ‖R i j‖^2) +def colNorm (R : Matrix ι κ ℂ) (j : κ) : ℝ := Real.sqrt (∑ i, ‖R i j‖^2) + +omit [Fintype ι] [Fintype μ] in +theorem norm_mul_entry_le (R : Matrix ι κ ℂ) (S : Matrix κ μ ℂ) (i : ι) (j : μ) : + ‖(R * S) i j‖ ≤ rowNorm R i * colNorm S j := by + calc + ‖(R * S) i j‖ ≤ ∑ k, ‖R i k * S k j‖ := norm_sum_le _ _ + _ = ∑ k, ‖R i k‖ * ‖S k j‖ := by simp only [norm_mul] + _ ≤ _ := Real.sum_mul_le_sqrt_mul_sqrt _ _ _ + +omit [Fintype κ] in +theorem colNorm_sq (R : Matrix ι κ ℂ) (j : κ) : + (colNorm R j)^2 = ((Rᴴ * R) j j).re := by + rw [colNorm, Real.sq_sqrt (Finset.sum_nonneg (fun _ _ => sq_nonneg _))] + simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Complex.re_sum] + apply Finset.sum_congr rfl + intro i _ + simp only [Complex.star_def, Complex.conj_mul', ← Complex.ofReal_pow, Complex.ofReal_re] + +variable [DecidableEq κ] + +theorem colNorm_sqrt_gram (R : Matrix ι κ ℂ) (j : κ) : + colNorm (CFC.sqrt (Rᴴ * R)) j = colNorm R j := by + have hsP := Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (Rᴴ * R)) + have he : (colNorm (CFC.sqrt (Rᴴ * R)) j)^2 = (colNorm R j)^2 := by + rw [colNorm_sq, hsP.isHermitian.eq, + CFC.sqrt_mul_sqrt_self (Rᴴ * R) (Matrix.posSemidef_conjTranspose_mul_self R).nonneg, + colNorm_sq] + exact (sq_eq_sq₀ (Real.sqrt_nonneg _) (Real.sqrt_nonneg _)).mp he + +theorem entry_gradient_le (R : Matrix ι κ ℂ) (i : ι) (j : κ) : + ‖(R * CFC.sqrt (Rᴴ * R)) i j‖ ≤ rowNorm R i * colNorm R j := by + simpa only [colNorm_sqrt_gram] using norm_mul_entry_le R (CFC.sqrt (Rᴴ * R)) i j + +end TriangularHilbert.MatrixEnergy +end +end +end +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MeshFinite.lean b/lean/OAI/Analysis/TriangularHilbert/MeshFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..2570c7944b101c749ffeff5aa3ac9b246b797163 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MeshFinite.lean @@ -0,0 +1,44 @@ +import OAI.Analysis.TriangularHilbert.JumpScalar + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped BigOperators +noncomputable section + +lemma finite_mesh_mass_le (D : Finset ℤ) {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (p : ℝ) : + (∑ i : D, weight h (h*(i:ℤ)) p σ) ≤ meshMassConstant := by + let N := supportRadius D 0 + have hD : D ⊆ intInterval 0 N := by + intro m hm + rw [mem_intInterval_iff_dist] + exact Finset.le_sup (f := fun k : ℤ => (k-0).natAbs) hm + rw [Finset.sum_coe_sort D (fun i : ℤ => weight h (h*(i:ℝ)) p σ)] + have hi : (∑ i ∈ D, weight h (h*(i:ℝ)) p σ) ≤ ∑ i ∈ intInterval 0 N, weight h (h*(i:ℝ)) p σ := by + apply Finset.sum_le_sum_of_subset_of_nonneg hD + intro i _ _ + exact (weight_pos hh ((sq_pos_of_pos hh).trans_le hσ) _ _).le + apply hi.trans + rw [intInterval_sum_fin] + have he (i : Fin (2*N+1)) : weight h (h*((0-(N:ℤ)+(i:ℕ):ℤ):ℝ)) p σ = + h*density σ ((-(h*N)-p)+h*i) := by + unfold weight + congr 2 + push_cast + ring + simp_rw [he] + exact mesh_mass_le hh hσ (-(h*N)-p) (2*N+1) + +lemma finite_mesh_totalPlaneEnergy_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) + {h : ℝ} (hh : 0 < h) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ v, h^2 ≤ σ v) : + totalPlaneEnergy A h (fun i => h*(i:ℤ)) d σ ≤ + 2*Real.sqrt 2*meshMassConstant*arrayCubic A h := by + exact totalPlaneEnergy_le_mass A hh _ d (fun v => (sq_pos_of_pos hh).trans_le (hσ v)) meshMassConstant_pos.le + (fun p v => finite_mesh_mass_le D hh (hσ v) (p v)) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MeshJump.lean b/lean/OAI/Analysis/TriangularHilbert/MeshJump.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbd509d54d0080c725dd8e741d9e7bd413c817cd --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MeshJump.lean @@ -0,0 +1,76 @@ +import OAI.Analysis.TriangularHilbert.FiniteLineMax + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped BigOperators +noncomputable section + +def jumpMax (D : Finset ℤ) (A : Three → Matrix D D ℂ) (i j : D) : ℝ := + 2*lineMax D (fun m => ‖A 0 i m‖^2) j+ + 2*lineMax D (fun m => ‖A 0 m j‖^2) i+ + lineMax D (fun m => ‖A 2 m i‖^2) (-(i:ℤ)-(j:ℤ))+ + lineMax D (fun m => ‖A 1 j m‖^2) (-(i:ℤ)-(j:ℤ)) + +lemma jumpMax_nonneg (D : Finset ℤ) (A : Three → Matrix D D ℂ) (i j : D) : + 0 ≤ jumpMax D A i j := by + unfold jumpMax + exact add_nonneg (add_nonneg (add_nonneg + (mul_nonneg (by norm_num) (lineMax_nonneg _ _ (fun _ => sq_nonneg _) _)) + (mul_nonneg (by norm_num) (lineMax_nonneg _ _ (fun _ => sq_nonneg _) _))) + (lineMax_nonneg _ _ (fun _ => sq_nonneg _) _)) (lineMax_nonneg _ _ (fun _ => sq_nonneg _) _) + +lemma gaussian_sum_back_le_lineMax (D : Finset ℤ) (f : D → ℝ) (hf : ∀ m, 0 ≤ f m) + {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (n : ℤ) : + (∑ m : D, f m*(h*density σ (h*n-h*(m:ℤ)))) ≤ meshMassConstant*lineMax D f n := by + have he (m : D) : density σ (h*n-h*(m:ℤ)) = density σ (h*((m-n:ℤ):ℝ)) := by + rw [show h*n-h*(m:ℤ) = -(h*((m-n:ℤ):ℝ)) by push_cast; ring,density_neg] + simp_rw [he] + exact gaussian_sum_le_lineMax D f hf hh hσ n + +lemma gaussian_sum_triangle_le_lineMax (D : Finset ℤ) (f : D → ℝ) (hf : ∀ m, 0 ≤ f m) + {σ h : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (i j : ℤ) : + (∑ m : D, f m*(h*density σ (h*i+h*j+h*(m:ℤ)))) ≤ meshMassConstant*lineMax D f (-i-j) := by + have he (m : D) : h*i+h*j+h*(m:ℤ) = h*((m-(-i-j):ℤ):ℝ) := by push_cast; ring + simp_rw [he] + exact gaussian_sum_le_lineMax D f hf hh hσ (-i-j) + +lemma jumpExpectation_le_jumpMax (D : Finset ℤ) (A : Three → Matrix D D ℂ) + {h : ℝ} (hh : 0 < h) {σ : Three → ℝ} (hσ : ∀ v, h^2 ≤ σ v) (i j : D) : + jumpExpectation A h (fun m => h*(m:ℤ)) σ i j ≤ meshMassConstant*jumpMax D A i j := by + have htwo (v : Three) : h^2 ≤ 2*σ v := by nlinarith [hσ v,sq_nonneg h] + have hsum : h^2 ≤ σ 0+σ 1+σ 2 := by nlinarith [hσ 0,hσ 1,hσ 2,sq_nonneg h] + have hX := gaussian_sum_back_le_lineMax D (fun m => ‖A 0 i m‖^2) (fun _ => sq_nonneg _) hh (htwo 1) j + have hY := gaussian_sum_back_le_lineMax D (fun m => ‖A 0 m j‖^2) (fun _ => sq_nonneg _) hh (htwo 0) i + have hH := gaussian_sum_triangle_le_lineMax D (fun m => ‖A 2 m i‖^2) (fun _ => sq_nonneg _) hh hsum i j + have hK := gaussian_sum_triangle_le_lineMax D (fun m => ‖A 1 j m‖^2) (fun _ => sq_nonneg _) hh hsum i j + unfold jumpExpectation jumpMax + linarith + +lemma finite_mesh_energy_jump_le (D : Finset ℤ) (A : Three → Matrix D D ℂ) (B C : Matrix D D ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (hC : ∀ i j, ‖C i j‖ ≤ ‖A 0 i j‖) + {h : ℝ} (hh : 0 < h) {σ : Three → ℝ} (hσ : ∀ v, h^2 ≤ σ v) : + |totalPlaneEnergy (replaceZero A B) h (fun m => h*(m:ℤ)) 0 σ- + totalPlaneEnergy (replaceZero A C) h (fun m => h*(m:ℤ)) 0 σ| ≤ + 3/2*meshMassConstant*h^2*∑ i, ∑ j, ‖B i j-C i j‖*jumpMax D A i j := by + have hj := totalPlaneEnergy_replaceZero_jump A B C hB hC hh (fun m => h*(m:ℤ)) + (fun v => (sq_pos_of_pos hh).trans_le (hσ v)) + apply hj.trans + calc + _ ≤ 3/2*h^2*∑ i, ∑ j, ‖B i j-C i j‖*(meshMassConstant*jumpMax D A i j) := by + gcongr with i j + exact jumpExpectation_le_jumpMax D A hh hσ i j + _ = _ := by + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MeshMass.lean b/lean/OAI/Analysis/TriangularHilbert/MeshMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad86c4538f91cc26546519b913076ac0ff2f504b --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MeshMass.lean @@ -0,0 +1,102 @@ +import OAI.Analysis.TriangularHilbert.Gaussian + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology BigOperators +noncomputable section + +lemma continuous_density (σ : ℝ) : Continuous (density σ) := by + unfold density + fun_prop + +lemma integral_density {σ : ℝ} (hσ : 0 < σ) : (∫ t, density σ t) = 1 := by + rw [density_eq_gaussianPDFReal hσ.le] + apply ProbabilityTheory.integral_gaussianPDFReal_eq_one + intro he + have he' : σ = 0 := congrArg (fun r : NNReal => (r : ℝ)) he + exact hσ.ne' he' + +def meshMassConstant : ℝ := 2 * Real.exp (1/2) + +lemma meshMassConstant_pos : 0 < meshMassConstant := by unfold meshMassConstant; positivity + +lemma density_cell_le {σ a b : ℝ} (hσ : 0 < σ) (hab : (b-a)^2 ≤ σ) : + density σ a ≤ meshMassConstant * density (2*σ) b := by + have hA : 0 < 2*Real.pi*σ := by positivity + have hB : 0 < 2*Real.pi*(2*σ) := by positivity + have hsa := Real.sqrt_pos.mpr hA + have hsb := Real.sqrt_pos.mpr hB + have hn : Real.sqrt (2*Real.pi*(2*σ)) ≤ 2*Real.sqrt (2*Real.pi*σ) := by + nlinarith [Real.sq_sqrt hA.le,Real.sq_sqrt hB.le] + have hn' : (Real.sqrt (2*Real.pi*σ))⁻¹ ≤ 2 * (Real.sqrt (2*Real.pi*(2*σ)))⁻¹ := by + have hh : 1 / Real.sqrt (2*Real.pi*σ) ≤ 2 / Real.sqrt (2*Real.pi*(2*σ)) := + (div_le_div_iff₀ hsa hsb).mpr (by simpa only [one_mul] using hn) + simpa only [one_div,div_eq_mul_inv,one_mul] using hh + have hquad : b^2 ≤ 2*a^2+2*σ := by nlinarith [sq_nonneg (b-2*a)] + have hex : -a^2/(2*σ) ≤ 1/2 + (-b^2/(2*(2*σ))) := by + apply (mul_le_mul_iff_of_pos_right (show 0 < 4*σ by positivity)).mp + field_simp + nlinarith + unfold density + calc + _ ≤ (2 * (Real.sqrt (2*Real.pi*(2*σ)))⁻¹) * + (Real.exp (1/2) * Real.exp (-b^2/(2*(2*σ)))) := + mul_le_mul hn' (by rw [← Real.exp_add]; exact Real.exp_le_exp.mpr hex) + (Real.exp_nonneg _) (by positivity) + _ = _ := by unfold meshMassConstant; ring + +lemma mesh_cell_le {h σ : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (c : ℝ) (i : ℕ) + {t : ℝ} (ht : t ∈ Set.Icc (i:ℝ) (i+1)) : + density σ (c+h*i) ≤ meshMassConstant * density (2*σ) (c+h*t) := by + have hσ0 : 0 < σ := (sq_pos_of_pos hh).trans_le hσ + apply density_cell_le hσ0 + have hti : 0 ≤ t-i := sub_nonneg.mpr ht.1 + have hti1 : t-i ≤ 1 := by linarith [ht.2] + have he : c+h*t-(c+h*i) = h*(t-i) := by ring + rw [he,mul_pow] + have hs : (t-i)^2 ≤ 1 := by nlinarith + exact (by nlinarith [mul_le_mul_of_nonneg_left hs (sq_nonneg h)] : h^2*(t-i)^2 ≤ h^2).trans hσ + +lemma mesh_mass_le {h σ : ℝ} (hh : 0 < h) (hσ : h^2 ≤ σ) (c : ℝ) (n : ℕ) : + (∑ i : Fin n, h*density σ (c+h*i)) ≤ meshMassConstant := by + have hs : 0 < σ := (sq_pos_of_pos hh).trans_le hσ + let f : ℝ → ℝ := fun t => h*density (2*σ) (c+h*t) + have hf : Continuous f := continuous_const.mul ((continuous_density _).comp + (continuous_const.add (continuous_const.mul continuous_id))) + have hc (i : ℕ) : h*density σ (c+h*(i:ℝ)) ≤ meshMassConstant * ∫ t in (i:ℝ)..(i+1), f t := by + have hi := intervalIntegral.integral_mono_on (show (i:ℝ) ≤ i+1 by linarith) + (intervalIntegrable_const : IntervalIntegrable (fun _ : ℝ => h*density σ (c+h*i)) volume i (i+1)) + ((continuous_const.mul hf : Continuous (fun t => meshMassConstant * f t)).intervalIntegrable i (i+1)) + (fun t ht => by + have hb := mul_le_mul_of_nonneg_left (mesh_cell_le hh hσ c i ht) hh.le + simpa only [Pi.mul_apply,f,mul_assoc,mul_left_comm h meshMassConstant] using hb) + simpa only [Pi.mul_apply,intervalIntegral.integral_const,add_sub_cancel_left,one_smul,intervalIntegral.integral_const_mul] using hi + rw [Fin.sum_univ_eq_sum_range (fun i : ℕ => h*density σ (c+h*i)) n] + calc + _ ≤ ∑ i ∈ Finset.range n, meshMassConstant * ∫ t in (i:ℝ)..(i+1), f t := Finset.sum_le_sum (fun i _ => hc i) + _ = meshMassConstant * ∫ t in (0:ℝ)..n, f t := by + rw [← Finset.mul_sum] + congr 1 + simpa only [Nat.cast_zero,Nat.cast_add,Nat.cast_one] using + (intervalIntegral.sum_integral_adjacent_intervals (a := fun k : ℕ => (k:ℝ)) (n := n) (fun i _ => hf.intervalIntegrable _ _)) + _ ≤ meshMassConstant := by + have hval : (∫ t in (0:ℝ)..n, f t) = ∫ x in c..(c+h*n), density (2*σ) x := by + unfold f + rw [intervalIntegral.integral_const_mul,intervalIntegral.integral_comp_mul_left (fun y => density (2*σ) (c+y)) hh.ne'] + rw [intervalIntegral.integral_comp_add_left] + simp [smul_eq_mul,hh.ne'] + rw [hval] + have hi : (∫ x in c..(c+h*n), density (2*σ) x) ≤ 1 := by + rw [intervalIntegral.integral_of_le (by nlinarith [show (0:ℝ) ≤ n by positivity] : c ≤ c+h*n)] + rw [← integral_density (show 0 < 2*σ by positivity)] + exact setIntegral_le_integral (density_integrable (by positivity)) + (ae_of_all _ (fun x => density_nonneg (by positivity) x)) + simpa only [mul_one] using mul_le_mul_of_nonneg_left hi meshMassConstant_pos.le +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Model.lean b/lean/OAI/Analysis/TriangularHilbert/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4f5978e77a9248f66be9c5c82d532892a807bb5 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Model.lean @@ -0,0 +1,51 @@ +import Mathlib + +namespace OAI + +section + +open MeasureTheory +open scoped ENNReal NNReal +noncomputable section +namespace TriangularHilbert + +abbrev Plane := ℝ × ℝ + +structure Endpoints where + lower : ℝ + upper : ℝ + lower_pos : 0 < lower + lower_lt_upper : lower < upper + +def annulus (ε R : ℝ) : Set ℝ := {t | ε < |t| ∧ |t| < R} + +def integrand (F G : Plane → ℂ) (z : Plane) (t : ℝ) : ℂ := + F (z.1 + t, z.2) * G (z.1, z.2 + t) / (t : ℂ) + +def truncation (F G : Plane → ℂ) (E : Endpoints) (z : Plane) : ℂ := + ∫ t in annulus E.lower E.upper, integrand F G z t + +def GoodPoint (F G : Plane → ℂ) (z : Plane) : Prop := + ∀ n : ℕ, IntegrableOn (integrand F G z) + (annulus (1 / ((n : ℝ) + 2)) ((n : ℝ) + 2)) + +def maximal (F G : Plane → ℂ) (z : Plane) : ℝ≥0∞ := by + classical + exact if GoodPoint F G z then + ⨆ E : Endpoints, ENNReal.ofReal ‖truncation F G E z‖ else 0 + +def maximalNorm (F G : Plane → ℂ) : ℝ≥0∞ := + (∫⁻ z : Plane, maximal F G z ^ ((3 : ℝ) / 2)) ^ ((2 : ℝ) / 3) + +def MainEstimate : Prop := + ∃ C : ℝ≥0, ∀ F G : Plane → ℂ, + MemLp F 3 volume → MemLp G 3 volume → + (∀ᵐ z ∂volume, GoodPoint F G z) ∧ + AEMeasurable (maximal F G) volume ∧ + maximalNorm F G ≤ (C : ℝ≥0∞) * eLpNorm F 3 volume * eLpNorm G 3 volume + +end TriangularHilbert +end +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/MomentPower.lean b/lean/OAI/Analysis/TriangularHilbert/MomentPower.lean new file mode 100644 index 0000000000000000000000000000000000000000..832c0d8ce4cded0aae2b5244547429a8847c799f --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/MomentPower.lean @@ -0,0 +1,33 @@ +import OAI.Analysis.TriangularHilbert.CyclicDensity + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped ENNReal Topology +noncomputable section + +lemma real_three_halves (x : ℝ) (hx : 0 ≤ x) : x^((3:ℝ)/2) = x*Real.sqrt x := by + by_cases he : x = 0 + · subst x; norm_num + · rw [show (3:ℝ)/2 = 1+(1:ℝ)/2 by norm_num,Real.rpow_add (lt_of_le_of_ne hx (Ne.symm he)),Real.rpow_one,Real.sqrt_eq_rpow] + +lemma ofReal_complexMoment (z : ℂ) : ENNReal.ofReal (complexMoment z) = ENNReal.ofReal ‖z‖^((3:ℝ)/2) := by + rw [ENNReal.ofReal_rpow_of_nonneg (norm_nonneg _) (by norm_num),real_three_halves _ (norm_nonneg _)] + rfl + +lemma ofReal_finiteMoment {κ : Type uκ} [Fintype κ] [Nonempty κ] (f : κ → ℂ) : + ENNReal.ofReal (finiteMoment f) = ⨆ k, ENNReal.ofReal (complexMoment (f k)) := by + apply le_antisymm + · obtain ⟨k,hk⟩ := finiteMoment_eq f + rw [hk] + exact le_iSup (fun k => ENNReal.ofReal (complexMoment (f k))) k + · exact iSup_le (fun k => ENNReal.ofReal_le_ofReal (le_finiteMoment f k)) +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/NormBounds.lean b/lean/OAI/Analysis/TriangularHilbert/NormBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffdbe2b006a14d039a8aba86745cc9390b1bb587 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/NormBounds.lean @@ -0,0 +1,109 @@ +import OAI.Analysis.TriangularHilbert.HeatCost + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma norm_sqrt_gram (R : Matrix ι ι ℂ) : ‖CFC.sqrt (Rᴴ * R)‖ = ‖R‖ := by + rw [CFC.norm_sqrt _ (Matrix.posSemidef_conjTranspose_mul_self R).nonneg] + rw [show ‖Rᴴ * R‖ = ‖R‖ * ‖R‖ from CStarRing.norm_star_mul_self, + Real.sqrt_mul_self (norm_nonneg R)] + +lemma norm_traceReal_le (X : Matrix ι ι ℂ) : + ‖traceReal X‖ ≤ ‖traceRealCLM (ι := ι)‖ * ‖X‖ := by + exact (traceRealCLM (ι := ι)).le_opNorm X + +lemma norm_energy_gram_le (R : Matrix ι ι ℂ) : + ‖energy (Rᴴ * R)‖ ≤ ‖traceRealCLM (ι := ι)‖ * ‖R‖^3 := by + calc + _ ≤ ‖traceRealCLM (ι := ι)‖ * ‖Rᴴ * R * CFC.sqrt (Rᴴ * R)‖ := + norm_traceReal_le _ + _ ≤ ‖traceRealCLM (ι := ι)‖ * (‖Rᴴ * R‖ * ‖CFC.sqrt (Rᴴ * R)‖) := + mul_le_mul_of_nonneg_left (norm_mul_le _ _) (norm_nonneg _) + _ = _ := by + rw [norm_sqrt_gram, + show ‖Rᴴ * R‖ = ‖R‖ * ‖R‖ from CStarRing.norm_star_mul_self] + ring + +lemma energy_gram_nonneg (R : Matrix ι ι ℂ) : 0 ≤ energy (Rᴴ * R) := by + rw [energy_spectral (Matrix.posSemidef_conjTranspose_mul_self R)] + apply Finset.sum_nonneg + intro i _ + exact mul_nonneg ((Matrix.posSemidef_conjTranspose_mul_self R).eigenvalues_nonneg i) + (Real.sqrt_nonneg _) + +lemma norm_energyGradient_inserted_gram_le (R L : Matrix ι ι ℂ) : + ‖energyGradient (Rᴴ * R) (Rᴴ * L * R)‖ ≤ + (3/2 : ℝ) * ‖traceRealCLM (ι := ι)‖ * ‖L‖ * ‖R‖^3 := by + rw [energyGradient_apply, norm_mul, Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 3/2)] + have hh : ‖traceReal (CFC.sqrt (Rᴴ * R) * (Rᴴ * L * R))‖ ≤ + ‖traceRealCLM (ι := ι)‖ * (‖R‖ * ((‖R‖ * ‖L‖) * ‖R‖)) := by + calc + _ ≤ ‖traceRealCLM (ι := ι)‖ * ‖CFC.sqrt (Rᴴ * R) * (Rᴴ * L * R)‖ := + norm_traceReal_le _ + _ ≤ ‖traceRealCLM (ι := ι)‖ * (‖CFC.sqrt (Rᴴ * R)‖ * ‖Rᴴ * L * R‖) := + mul_le_mul_of_nonneg_left (norm_mul_le _ _) (norm_nonneg _) + _ ≤ ‖traceRealCLM (ι := ι)‖ * (‖R‖ * ((‖R‖ * ‖L‖) * ‖R‖)) := by + rw [norm_sqrt_gram] + gcongr + calc + _ ≤ ‖Rᴴ * L‖ * ‖R‖ := norm_mul_le _ _ + _ ≤ (‖Rᴴ‖ * ‖L‖) * ‖R‖ := mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _) + _ = _ := by rw [show ‖Rᴴ‖ = ‖R‖ from norm_star R] + calc + _ ≤ (3/2 : ℝ) * (‖traceRealCLM (ι := ι)‖ * (‖R‖ * ((‖R‖ * ‖L‖) * ‖R‖))) := by gcongr + _ = _ := by ring + +lemma hessianCost_nonneg (P K : Matrix ι ι ℂ) : 0 ≤ hessianCost P K := by + unfold hessianCost rootCost + apply mul_nonneg (by norm_num) + by_cases hb : BddAbove (Set.range (variation (CFC.sqrt P) K)) + · apply le_csSup hb + exact ⟨0, by simp [variation, penalty]⟩ + · rw [Real.sSup_of_not_bddAbove hb] + +lemma norm_hessianCost_inserted_gram_le (R L : Matrix ι ι ℂ) (hL : L.IsHermitian) : + ‖hessianCost (Rᴴ * R) (Rᴴ * L * R)‖ ≤ + (3/4 : ℝ) * ‖traceRealCLM (ι := ι)‖ * ‖L‖^2 * ‖R‖^3 := by + rw [Real.norm_eq_abs, abs_of_nonneg (hessianCost_nonneg _ _)] + calc + _ ≤ (3/4 : ℝ) * ‖L‖^2 * energy (Rᴴ * R) := hessianCost_inserted_gram_le R L hL + _ ≤ (3/4 : ℝ) * ‖L‖^2 * (‖traceRealCLM (ι := ι)‖ * ‖R‖^3) := by + gcongr + exact (le_abs_self _).trans (norm_energy_gram_le R) + _ = _ := by ring + +def entryNormConstant (ι : Type uι) [Fintype ι] [DecidableEq ι] : ℝ := + ∑ i : ι, ∑ j : ι, ‖(Matrix.single i j (1 : ℂ))‖ + +lemma entryNormConstant_nonneg : 0 ≤ entryNormConstant ι := by + exact Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => norm_nonneg _)) + +lemma norm_matrix_le_entries (R : Matrix ι ι ℂ) {M : ℝ} (hM : ∀ i j, ‖R i j‖ ≤ M) : + ‖R‖ ≤ entryNormConstant ι * M := by + calc + _ = ‖∑ i, ∑ j, Matrix.single i j (R i j)‖ := congrArg norm (Matrix.matrix_eq_sum_single R) + _ ≤ ∑ i, ‖∑ j, Matrix.single i j (R i j)‖ := norm_sum_le _ _ + _ ≤ ∑ i, ∑ j, ‖Matrix.single i j (R i j)‖ := Finset.sum_le_sum (fun _ _ => norm_sum_le _ _) + _ ≤ ∑ i : ι, ∑ j : ι, ‖Matrix.single i j (1 : ℂ)‖ * M := by + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + rw [show Matrix.single i j (R i j) = (R i j) • Matrix.single i j (1 : ℂ) by + rw [Matrix.smul_single]; simp, norm_smul, mul_comm] + exact mul_le_mul_of_nonneg_left (hM i j) (norm_nonneg _) + _ = _ := by simp [entryNormConstant, Finset.sum_mul] + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneChart.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..d50155fc222def62205b753868165345edd58b1d --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneChart.lean @@ -0,0 +1,87 @@ +import OAI.Analysis.TriangularHilbert.GaussianDom + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +open MatrixEnergy +noncomputable section + +def chart (i : Three) (d : ℝ) (z : ℝ × ℝ) : Three → ℝ := + if i = 0 then ![d-z.1-z.2, z.1, z.2] + else if i = 1 then ![z.1, d-z.1-z.2, z.2] + else ![z.1, z.2, d-z.1-z.2] + +lemma chart_continuous (i : Three) : Continuous (fun q : ℝ × (ℝ × ℝ) => chart i q.1 q.2) := by + unfold chart + split_ifs <;> fun_prop + +lemma chart_hasDerivAt (i : Three) (d : ℝ) (z : ℝ × ℝ) : + HasDerivAt (fun e => chart i e z i) 1 d := by + have he : (fun e => chart i e z i) = (fun e => e-z.1-z.2) := by + funext e + fin_cases i <;> simp [chart] + rw [he] + exact ((hasDerivAt_id d).sub_const z.1).sub_const z.2 + +def chartReflection (d : ℝ) : (ℝ × ℝ) ≃ₜ (ℝ × ℝ) where + toFun z := (z.1, d-z.1-z.2) + invFun z := (z.1, d-z.1-z.2) + left_inv z := by exact Prod.ext rfl (by dsimp; ring) + right_inv z := by exact Prod.ext rfl (by dsimp; ring) + continuous_toFun := by fun_prop + continuous_invFun := by fun_prop + +lemma chartReflection_preserving (d : ℝ) : MeasurePreserving (chartReflection d) := by + exact (MeasurePreserving.id volume).skew_product + (g := fun x y : ℝ => d-x-y) (by fun_prop) + (Filter.Eventually.of_forall (fun x => (volume.measurePreserving_sub_left (d-x)).map_eq)) + +lemma swap_preserving : MeasurePreserving (Prod.swap : ℝ × ℝ → ℝ × ℝ) := + ⟨measurable_swap, Measure.prod_swap⟩ + +def chartChange (i : Three) (d : ℝ) : (ℝ × ℝ) ≃ₜ (ℝ × ℝ) := + if i = 0 then (chartReflection d).trans (Homeomorph.prodComm ℝ ℝ) + else if i = 1 then chartReflection d + else Homeomorph.refl _ + +lemma chartChange_preserving (i : Three) (d : ℝ) : MeasurePreserving (chartChange i d) := by + unfold chartChange + split_ifs + · exact swap_preserving.comp (chartReflection_preserving d) + · exact chartReflection_preserving d + · exact MeasurePreserving.id volume + +lemma chartChange_eq (i : Three) (d : ℝ) (z : ℝ × ℝ) : + chart i d z = chart 2 d (chartChange i d z) := by + ext j + fin_cases i <;> fin_cases j <;> + simp [chart, chartChange, chartReflection] + all_goals ring + +lemma integral_chart_eq (i j : Three) (d : ℝ) (f : (Three → ℝ) → ℝ) : + (∫ z : ℝ × ℝ, f (chart i d z)) = ∫ z : ℝ × ℝ, f (chart j d z) := by + have hi k : (∫ z : ℝ × ℝ, f (chart k d z)) = ∫ z : ℝ × ℝ, f (chart 2 d z) := by + simp_rw [chartChange_eq k d] + exact (chartChange_preserving k d).integral_comp (chartChange k d).measurableEmbedding + (fun z : ℝ × ℝ => f (chart 2 d z)) + exact (hi i).trans (hi j).symm + +lemma chart_pair_bound {D : ℝ} {d : ℝ} (hd : |d| ≤ D) (i j k : Three) (hjk : j ≠ k) + (z : ℝ × ℝ) : z.1^2+z.2^2 ≤ 4*((chart i d z j)^2+(chart i d z k)^2)+3*D^2 := by + have hD : 0 ≤ D := (abs_nonneg d).trans hd + have hd2 : d^2 ≤ D^2 := by + simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) hD).2 hd + have hgen (x y : ℝ) : x^2+y^2+(d-x-y)^2 ≤ 4*(x^2+y^2)+3*D^2 := by + nlinarith [sq_nonneg (x-y), sq_nonneg (d+x), sq_nonneg (d+y)] + fin_cases i <;> fin_cases j <;> fin_cases k <;> norm_num at hjk + all_goals norm_num [chart] + all_goals nlinarith [hgen z.1 z.2, hgen (d-z.1-z.2) z.1, hgen (d-z.1-z.2) z.2, + sq_nonneg z.1, sq_nonneg z.2, sq_nonneg (d-z.1-z.2)] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneDissipation.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneDissipation.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc06acd9926a982322e568e777e8ef5ea3e45abf --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneDissipation.lean @@ -0,0 +1,109 @@ +import OAI.Analysis.TriangularHilbert.DissipationAlgebra + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory Filter +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def totalPlaneEnergy (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (d : ℝ) (σ : Three → ℝ) : ℝ := + ∑ v, planeIntegral (fun p => heatEnergy A h u p σ v) d + +def totalPlaneTime (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (d : ℝ) (α : Three → ℝ) (s : ℝ) : ℝ := + ∑ v, ∑ w, α w * planeIntegral (fun p => heatVariance A h u p (fun a => α a*s) v w) d + +lemma totalPlaneEnergy_hasDerivAt (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {s : ℝ} (hs : 0 < s) : + HasDerivAt (fun t => totalPlaneEnergy A h u d (fun w => α w*t)) + (totalPlaneTime A h u d α s) s := by + exact HasDerivAt.fun_sum (fun v _ => planeEnergy_hasDerivAt_time A hh u d α hα hs v) + +lemma two_totalPlaneTime (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {s : ℝ} (hs : 0 < s) : + 2 * totalPlaneTime A h u d α s = + ∑ v, ((∑ w, α w) * planeIntegral (fun p => heatMixed A h u p (fun a => α a*s) v (v+1) (v+2)) d - + (∑ w, α w * planeIntegral (fun p => heatCost A h u p (fun a => α a*s) v w) d)) := by + have hσ : ∀ w, 0 < α w*s := fun w => mul_pos (hα w) hs + unfold totalPlaneTime + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro v _ + rw [Finset.mul_sum, Finset.sum_mul, ← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro w _ + have hp := two_planeVariance A hh u d hσ v w + rw [planePure_eq_mixed A hh u d hσ w (neighbor_one_ne v) (neighbor_two_ne v) (neighbors_ne v)] at hp + linear_combination (α w)*hp + +lemma plane_dissipation (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {s : ℝ} (hs : 0 < s) : + 2 * totalPlaneTime A h u d α s ≤ + ∑ w, (-α w + Real.sqrt 2 * max 0 ((∑ v, α v)/2-α w)) * + planeIntegral (fun p => heatCost A h u p (fun a => α a*s) w w) d := by + have hσ : ∀ w, 0 < α w*s := fun w => mul_pos (hα w) hs + rw [two_totalPlaneTime A hh u d α hα hs] + apply finite_cost_dissipation α (fun w => (hα w).le) + · exact fun v w => planeCost_nonneg A h u d _ v w + · intro v + rw [offdiag_sum_eq] + exact two_planeMixed_le A hh u d hσ (neighbor_one_ne v) (neighbor_two_ne v) (neighbors_ne v) + · exact planeCost_neighbors A hh u d hσ + +def strictRate (i w : Three) : ℝ := if w = i then 1 else 11/10 + +def strictConstant : ℝ := (1/2) * min (1 - (3/5)*Real.sqrt 2) (11/10 - (1/2)*Real.sqrt 2) + +lemma strictRate_pos (i w : Three) : 0 < strictRate i w := by + unfold strictRate; split_ifs <;> norm_num + +lemma sum_strictRate (i : Three) : (∑ w, strictRate i w) = 16/5 := by + have he (w : Three) : strictRate i w = (11/10:ℝ) + if w = i then (-1/10:ℝ) else 0 := by + unfold strictRate + split_ifs <;> norm_num + simp_rw [he] + rw [Finset.sum_add_distrib] + norm_num [Finset.sum_ite_eq', Fintype.card_fin, Three] + +lemma strictConstant_pos : 0 < strictConstant := by + have h := Real.sq_sqrt (show (0:ℝ) ≤ 2 by norm_num) + have h0 := Real.sqrt_nonneg (2:ℝ) + have h1 : 0 < 1 - (3/5)*Real.sqrt 2 := by nlinarith + have h2 : 0 < 11/10 - (1/2)*Real.sqrt 2 := by nlinarith + exact mul_pos (by norm_num) (lt_min h1 h2) + +lemma strictRate_coefficient (i w : Three) : + -strictRate i w + Real.sqrt 2 * max 0 ((∑ v, strictRate i v)/2-strictRate i w) ≤ + -2 * strictConstant := by + rw [sum_strictRate] + have h1 := min_le_left (1 - (3/5)*Real.sqrt 2) (11/10 - (1/2)*Real.sqrt 2) + have h2 := min_le_right (1 - (3/5)*Real.sqrt 2) (11/10 - (1/2)*Real.sqrt 2) + unfold strictRate strictConstant + split_ifs <;> norm_num <;> linarith + +lemma plane_strict_dissipation (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (i : Three) {s : ℝ} (hs : 0 < s) : + strictConstant * (∑ w, planeIntegral (fun p => heatCost A h u p (fun a => strictRate i a*s) w w) d) ≤ + -totalPlaneTime A h u d (strictRate i) s := by + have hd := plane_dissipation A hh u d (strictRate i) (strictRate_pos i) hs + have he : (∑ w, (-strictRate i w + Real.sqrt 2 * max 0 ((∑ v, strictRate i v)/2-strictRate i w)) * + planeIntegral (fun p => heatCost A h u p (fun a => strictRate i a*s) w w) d) ≤ + -2 * strictConstant * (∑ w, planeIntegral (fun p => heatCost A h u p (fun a => strictRate i a*s) w w) d) := by + rw [Finset.mul_sum] + exact Finset.sum_le_sum (fun w _ => mul_le_mul_of_nonneg_right + (strictRate_coefficient i w) (planeCost_nonneg A h u d _ w w)) + linarith +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneDom.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneDom.lean new file mode 100644 index 0000000000000000000000000000000000000000..b48919257abf9e572e5b00d3266249a2d010c655 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneDom.lean @@ -0,0 +1,181 @@ +import OAI.Analysis.TriangularHilbert.PlaneChart + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section + +lemma abs_le_one_add_sq (x : ℝ) : |x| ≤ 1+x^2 := by + nlinarith [sq_nonneg (|x|-1), sq_abs x] + +lemma planePoly_ge_first (z : ℝ × ℝ) : |z.1| ≤ planePoly z := by + have := abs_le_one_add_sq z.1 + unfold planePoly + nlinarith [sq_nonneg z.1, sq_nonneg z.2, mul_nonneg (sq_nonneg z.1) (sq_nonneg z.2)] + +lemma planePoly_ge_second (z : ℝ × ℝ) : |z.2| ≤ planePoly z := by + have := abs_le_one_add_sq z.2 + unfold planePoly + nlinarith [sq_nonneg z.1, sq_nonneg z.2, mul_nonneg (sq_nonneg z.1) (sq_nonneg z.2)] + +lemma chart_abs_bound {D d : ℝ} (hd : |d| ≤ D) (i w : Three) (z : ℝ × ℝ) : + |chart i d z w| ≤ (D+2) * planePoly z := by + have hD : 0 ≤ D := (abs_nonneg d).trans hd + have hP := one_le_planePoly z + have hx := planePoly_ge_first z + have hy := planePoly_ge_second z + have hDP : D ≤ D * planePoly z := by nlinarith + have hab : |d-z.1-z.2| ≤ |d|+|z.1|+|z.2| := by + calc + _ ≤ |d-z.1| + |z.2| := by simpa using abs_sub_le (d-z.1) 0 z.2 + _ ≤ _ := by simpa using add_le_add_right (abs_sub_le d 0 z.1) (abs z.2) + fin_cases i <;> fin_cases w <;> simp [chart] <;> nlinarith + +lemma endpoint_gaussian_bound {D d b : ℝ} (hb : 0 < b) (hd : |d| ≤ D) + (i j k : Three) (hjk : j ≠ k) (z : ℝ × ℝ) : + Real.exp (-((chart i d z j)^2+(chart i d z k)^2)/(8*b)) ≤ + Real.exp (3*D^2/(32*b)) * planeGaussian (1/(32*b)) z := by + have hh := chart_pair_bound hd i j k hjk z + rw [planeGaussian, ← Real.exp_add] + apply Real.exp_le_exp.mpr + have he : -((chart i d z j)^2+(chart i d z k)^2)/(8*b) ≤ + (3*D^2-(z.1^2+z.2^2))/(32*b) := by + rw [div_le_div_iff₀ (by positivity : 0 < 8*b) (by positivity : 0 < 32*b)] + nlinarith + convert! he using 1 + ring + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def rootCoefficient (h a b u : ℝ) : ℝ := + Real.sqrt (h * (Real.sqrt (2*Real.pi*a))⁻¹ * Real.exp (u^2/(2*b))) + +omit [DecidableEq ι] in +lemma exists_heatArray_gaussian_bound (A : Three → Matrix ι ι ℂ) {h a b D : ℝ} + (hh : 0 < h) (ha : 0 < a) (hab : a ≤ b) (_hD : 0 ≤ D) (u : ι → ℝ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (p : Three → ℝ) (i : Three) (d : ℝ) (z : ℝ × ℝ), + |d| ≤ D → p = chart i d z → ∀ (σ : Three → ℝ), + (∀ w, a ≤ σ w) → (∀ w, σ w ≤ b) → ∀ v k l, + ‖heatArray A h u p σ v k l‖ ≤ C * planeGaussian (1/(32*b)) z := by + let K : Three × ι × ι → ℝ := fun t => rootCoefficient h a b (u t.2.1) * + ‖A t.1 t.2.1 t.2.2‖ * rootCoefficient h a b (u t.2.2) + have hK t : 0 ≤ K t := by dsimp [K, rootCoefficient]; positivity + let C := (∑ t, K t) * Real.exp (3*D^2/(32*b)) + refine ⟨C, mul_nonneg (Finset.sum_nonneg (fun t _ => hK t)) (Real.exp_pos _).le, ?_⟩ + intro p i d z hd hp σ hσa hσb v k l + subst p + have hb := ha.trans_le hab + have hv : v ≠ v+1 := by fin_cases v <;> decide + have hleft := rootWeight_le_gaussian hh.le ha (hσa v) (hσb v) (u k) (chart i d z v) + have hright := rootWeight_le_gaussian hh.le ha (hσa (v+1)) (hσb (v+1)) (u l) (chart i d z (v+1)) + have hc : K (v,k,l) ≤ ∑ t, K t := Finset.single_le_sum (fun t _ => hK t) (Finset.mem_univ _) + calc + _ = Real.sqrt (weight h (u k) (chart i d z v) (σ v)) * ‖A v k l‖ * + Real.sqrt (weight h (u l) (chart i d z (v+1)) (σ (v+1))) := by + simp only [heatArray, weightedArray, heatWeights, norm_mul, Complex.norm_real, + Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _)] + _ ≤ (rootCoefficient h a b (u k) * Real.exp (-(chart i d z v)^2/(8*b))) * ‖A v k l‖ * + (rootCoefficient h a b (u l) * Real.exp (-(chart i d z (v+1))^2/(8*b))) := by + dsimp only [rootCoefficient] + gcongr + _ = K (v,k,l) * Real.exp (-((chart i d z v)^2+(chart i d z (v+1))^2)/(8*b)) := by + dsimp [K] + rw [show -((chart i d z v)^2+(chart i d z (v+1))^2)/(8*b) = + -(chart i d z v)^2/(8*b) + -(chart i d z (v+1))^2/(8*b) by ring, Real.exp_add] + ring + _ ≤ (∑ t, K t) * (Real.exp (3*D^2/(32*b)) * planeGaussian (1/(32*b)) z) := by + exact mul_le_mul hc (endpoint_gaussian_bound hb hd i v (v+1) hv z) + (Real.exp_pos _).le (Finset.sum_nonneg (fun t _ => hK t)) + _ = _ := by dsimp [C]; ring + +omit [Fintype ι] [DecidableEq ι] in +lemma triangleBlocks_entry_bound (W : Three → Matrix ι ι ℂ) {M : ℝ} (hM : 0 ≤ M) + (hW : ∀ v i j, ‖W v i j‖ ≤ M) (a b : Three) (i j : ι) : + ‖triangleBlocks W a b i j‖ ≤ M := by + fin_cases a <;> fin_cases b <;> simp [triangleBlocks, Matrix.conjTranspose_apply] + all_goals first | exact hM | exact hW _ _ _ + +lemma norm_rowStar_le_bound (W : Three → Matrix ι ι ℂ) {M : ℝ} (hM : 0 ≤ M) + (hW : ∀ v i j, ‖W v i j‖ ≤ M) (v : Three) : + ‖rowStar W v‖ ≤ entryNormConstant (BlockSpace ι) * M := by + apply norm_matrix_le_entries + intro a b + rw [rowStar_apply] + split_ifs + · exact triangleBlocks_entry_bound W hM hW _ _ _ _ + · simpa using hM + +lemma exists_heatCarrier_gaussian_bound (A : Three → Matrix ι ι ℂ) {h a b D : ℝ} + (hh : 0 < h) (ha : 0 < a) (hab : a ≤ b) (hD : 0 ≤ D) (u : ι → ℝ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (i : Three) (d : ℝ) (z : ℝ × ℝ), |d| ≤ D → + ∀ (σ : Three → ℝ), (∀ w, a ≤ σ w) → (∀ w, σ w ≤ b) → ∀ v w, + ‖heatCarrier A h u (chart i d z) σ v w‖ ≤ C * planeGaussian (1/(32*b)) z := by + obtain ⟨C,hC,hbound⟩ := exists_heatArray_gaussian_bound A hh ha hab hD u + refine ⟨entryNormConstant (BlockSpace ι) * C, mul_nonneg entryNormConstant_nonneg hC, ?_⟩ + intro i d z hd σ hσa hσb v w + rw [heatCarrier_norm] + calc + _ ≤ entryNormConstant (BlockSpace ι) * (C * planeGaussian (1/(32*b)) z) := + norm_rowStar_le_bound _ (mul_nonneg hC (planeGaussian_pos _ _).le) + (hbound _ i d z hd rfl σ hσa hσb) v + _ = _ := by ring + +lemma norm_heatMask_le (r : Three → ι → ℝ) {M : ℝ} (hM : 0 ≤ M) + (hr : ∀ w j, |r w j| ≤ M) : ‖heatMask r‖ ≤ entryNormConstant (BlockSpace ι) * M := by + apply norm_matrix_le_entries + intro a b + rw [heatMask_eq_diagonal] + by_cases hab : a = b + · subst b + simpa only [Matrix.diagonal_apply_eq, Complex.norm_real, Real.norm_eq_abs] using hr a.1 a.2 + · simpa only [Matrix.diagonal_apply_ne _ hab, norm_zero] using hM + +omit [DecidableEq ι] in +lemma exists_score_polynomial_bound (u : ι → ℝ) {a D : ℝ} (ha : 0 < a) (hD : 0 ≤ D) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (i : Three) (d : ℝ) (z : ℝ × ℝ), |d| ≤ D → + ∀ (σ : Three → ℝ), (∀ w, a ≤ σ w) → ∀ w j, + |score (u j) (chart i d z w) (σ w)| ≤ C * planePoly z ∧ + |score (u j) (chart i d z w) (σ w)^2 - (σ w)⁻¹| ≤ (C^2+a⁻¹) * planePoly z^2 := by + let U := ∑ j, |u j| + have hU : 0 ≤ U := Finset.sum_nonneg (fun j _ => abs_nonneg (u j)) + have hu j : |u j| ≤ U := Finset.single_le_sum (fun j _ => abs_nonneg (u j)) (Finset.mem_univ j) + let C := (U+D+2)/a + have hC : 0 ≤ C := div_nonneg (by linarith) ha.le + refine ⟨C,hC,?_⟩ + intro i d z hd σ hσ w j + have hP := one_le_planePoly z + have hpn := planePoly_nonneg z + have hsp : 0 < σ w := ha.trans_le (hσ w) + have hs : |score (u j) (chart i d z w) (σ w)| ≤ C * planePoly z := by + calc + _ ≤ (|u j|+|chart i d z w|)/a := score_le_linear ha (hσ w) _ _ + _ ≤ (U+(D+2)*planePoly z)/a := by gcongr; exacts [hu j, chart_abs_bound hd i w z] + _ ≤ C * planePoly z := by + dsimp [C] + rw [div_mul_eq_mul_div, div_le_div_iff_of_pos_right ha] + nlinarith + have hinv : (σ w)⁻¹ ≤ a⁻¹ := by + simp only [← one_div] + exact one_div_le_one_div_of_le ha (hσ w) + have hs2 : score (u j) (chart i d z w) (σ w)^2 ≤ C^2 * planePoly z^2 := by + have := (sq_le_sq₀ (abs_nonneg _) (mul_nonneg hC hpn)).2 hs + simpa only [sq_abs, mul_pow] using this + refine ⟨hs,?_⟩ + calc + _ ≤ score (u j) (chart i d z w) (σ w)^2 + (σ w)⁻¹ := by + calc + _ ≤ |score (u j) (chart i d z w) (σ w)^2| + |(σ w)⁻¹| := abs_sub _ _ + _ = _ := by rw [abs_of_nonneg (sq_nonneg _), abs_of_pos (inv_pos.mpr hsp)] + _ ≤ C^2 * planePoly z^2 + a⁻¹ := add_le_add hs2 hinv + _ ≤ _ := by nlinarith [inv_pos.mpr ha, sq_nonneg (planePoly z-1)] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneIntegral.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8746b991e23adeb0b1851f0ebfb14b7ae556487 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneIntegral.lean @@ -0,0 +1,160 @@ +import OAI.Analysis.TriangularHilbert.HeatContinuous + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory Filter +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder +noncomputable section + +lemma measurable_chart (i : Three) (d : ℝ) : Measurable (chart i d) := + ((chart_continuous i).comp (continuous_const.prodMk continuous_id)).measurable + +lemma hasDerivAt_chart_of_center {f : (Three → ℝ) → ℝ} {g : (Three → ℝ) → ℝ} + (i : Three) (d : ℝ) (z : ℝ × ℝ) + (h : ∀ p, HasDerivAt (fun t => f (Function.update p i t)) (g p) (p i)) : + HasDerivAt (fun e => f (chart i e z)) (g (chart i d z)) d := by + have hd := (h (chart i d z)).comp d (chart_hasDerivAt i d z) + simp only [mul_one] at hd + apply hd.congr_of_eventuallyEq + apply Eventually.of_forall + intro e + apply congrArg f + ext j + fin_cases i <;> fin_cases j <;> simp [chart,Function.update] + +def planeIntegral (f : (Three → ℝ) → ℝ) (d : ℝ) : ℝ := + ∫ z : ℝ × ℝ, f (chart 2 d z) + +lemma planeIntegral_eq (f : (Three → ℝ) → ℝ) (i : Three) (d : ℝ) : + planeIntegral f d = ∫ z : ℝ × ℝ, f (chart i d z) := integral_chart_eq 2 i d f + +lemma hasDerivAt_planeIntegral {f g : (Three → ℝ) → ℝ} {B : (ℝ × ℝ) → ℝ} + (hf : Measurable f) (hg : Measurable g) (hB : Integrable B) + (i : Three) (d : ℝ) + (hb0 : ∀ z, ‖f (chart i d z)‖ ≤ B z) + (hb : ∀ e ∈ Set.Ioo (d-1) (d+1), ∀ z, ‖g (chart i e z)‖ ≤ B z) + (hd : ∀ p, HasDerivAt (fun t => f (Function.update p i t)) (g p) (p i)) : + HasDerivAt (planeIntegral f) (planeIntegral g d) d := by + have hs : Set.Ioo (d-1) (d+1) ∈ 𝓝 d := Ioo_mem_nhds (by linarith) (by linarith) + have hint : Integrable (fun z => f (chart i d z)) := + hB.mono' (hf.comp (measurable_chart i d)).aestronglyMeasurable (Eventually.of_forall hb0) + have hh := (hasDerivAt_integral_of_dominated_loc_of_deriv_le (F := fun e z => f (chart i e z)) + (F' := fun e z => g (chart i e z)) hs + (Eventually.of_forall (fun e => (hf.comp (measurable_chart i e)).aestronglyMeasurable)) hint + (hg.comp (measurable_chart i d)).aestronglyMeasurable + (Eventually.of_forall (fun z e he => hb e he z)) hB + (Eventually.of_forall (fun z e _ => hasDerivAt_chart_of_center i e z hd))).2 + rw [← planeIntegral_eq g i d] at hh + exact hh.congr_of_eventuallyEq (Eventually.of_forall (fun e => planeIntegral_eq f i e)) + +lemma finite_variance_bounds (σ : Three → ℝ) (hσ : ∀ w, 0 < σ w) : + ∃ a b : ℝ, 0 < a ∧ a ≤ b ∧ (∀ w, a ≤ σ w) ∧ (∀ w, σ w ≤ b) := by + let a := min (σ 0) (min (σ 1) (σ 2)) + let b := σ 0 + σ 1 + σ 2 + have ha : 0 < a := lt_min (hσ 0) (lt_min (hσ 1) (hσ 2)) + have hlo : ∀ w, a ≤ σ w := by + intro w; fin_cases w + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (min_le_left _ _) + · exact (min_le_right _ _).trans (min_le_right _ _) + have hhi : ∀ w, σ w ≤ b := by + intro w; fin_cases w <;> dsimp [b] <;> linarith [hσ 0,hσ 1,hσ 2] + exact ⟨a,b,ha,(hlo 0).trans (hhi 0),hlo,hhi⟩ + +lemma abs_le_add_one_of_mem_Ioo {d e : ℝ} (he : e ∈ Set.Ioo (d-1) (d+1)) : + |e| ≤ |d|+1 := by + apply abs_le.mpr + constructor <;> linarith [he.1,he.2,le_abs_self d,neg_le_abs d] + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +structure HeatPlaneIntegrable (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (d : ℝ) (σ : Three → ℝ) : Prop where + energy : ∀ i v, Integrable (fun z => heatEnergy A h u (chart i d z) σ v) + first : ∀ i v w, Integrable (fun z => heatFirst A h u (chart i d z) σ v w) + pure : ∀ i v w, Integrable (fun z => heatPure A h u (chart i d z) σ v w) + variance : ∀ i v w, Integrable (fun z => heatVariance A h u (chart i d z) σ v w) + cost : ∀ i v w, Integrable (fun z => heatCost A h u (chart i d z) σ v w) + mixed : ∀ i v w z, w ≠ v → z ≠ v → w ≠ z → Integrable (fun x => heatMixed A h u (chart i d x) σ v w z) + +lemma heatPlane_integrable (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) : + HeatPlaneIntegrable A h u d σ := by + obtain ⟨a,b,ha,hab,hla,hlb⟩ := finite_variance_bounds σ hσ + obtain ⟨B,hB,_,hbound⟩ := exists_heat_uniform_majorant A hh ha hab (abs_nonneg d) u + have hb i z := hbound i d z (le_refl |d|) σ hla hlb + have hmono (f : (Three → ℝ) → ℝ) (hf : Measurable f) (i : Three) + (hb : ∀ z, ‖f (chart i d z)‖ ≤ B z) : Integrable (fun z => f (chart i d z)) := + hB.mono' (hf.comp (measurable_chart i d)).aestronglyMeasurable (Eventually.of_forall hb) + constructor + · intro i v + exact hmono _ (continuous_heatEnergy A hh u hσ v).measurable i (fun z => (hb i z).energy v) + · intro i v w + exact hmono _ (continuous_heatFirst A hh u hσ v w).measurable i (fun z => (hb i z).first v w) + · intro i v w + exact hmono _ (measurable_heatPure A hh u hσ v w) i (fun z => (hb i z).pure v w) + · intro i v w + exact hmono _ (continuous_heatVariance A hh u hσ v w).measurable i (fun z => (hb i z).variance v w) + · intro i v w + exact hmono _ (measurable_heatCost A hh u hσ v w) i (fun z => (hb i z).cost v w) + · intro i v w z hw hz hwz + exact hmono _ (measurable_heatMixed A hh u hσ hw hz hwz) i (fun x => (hb i x).mixed v w z hw hz) + +lemma planeEnergy_hasDerivAt (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + HasDerivAt (planeIntegral (fun p => heatEnergy A h u p σ v)) + (planeIntegral (fun p => heatFirst A h u p σ v w) d) d := by + obtain ⟨a,b,ha,hab,hla,hlb⟩ := finite_variance_bounds σ hσ + obtain ⟨B,hB,_,hb⟩ := exists_heat_uniform_majorant A hh ha hab (by positivity : 0 ≤ |d|+1) u + apply hasDerivAt_planeIntegral (continuous_heatEnergy A hh u hσ v).measurable + (continuous_heatFirst A hh u hσ v w).measurable hB w d + · exact fun z => (hb w d z (by linarith) σ hla hlb).energy v + · exact fun e he z => (hb w e z (abs_le_add_one_of_mem_Ioo he) σ hla hlb).first v w + · exact fun p => heatEnergy_hasDerivAt_center A hh u p hσ v w + +lemma planeFirst_hasDerivAt (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + HasDerivAt (planeIntegral (fun p => heatFirst A h u p σ v w)) + (planeIntegral (fun p => heatPure A h u p σ v w) d) d := by + obtain ⟨a,b,ha,hab,hla,hlb⟩ := finite_variance_bounds σ hσ + obtain ⟨B,hB,_,hb⟩ := exists_heat_uniform_majorant A hh ha hab (by positivity : 0 ≤ |d|+1) u + apply hasDerivAt_planeIntegral (continuous_heatFirst A hh u hσ v w).measurable + (measurable_heatPure A hh u hσ v w) hB w d + · exact fun z => (hb w d z (by linarith) σ hla hlb).first v w + · exact fun e he z => (hb w e z (abs_le_add_one_of_mem_Ioo he) σ hla hlb).pure v w + · exact fun p => heatFirst_hasDerivAt_center A hh u p hσ v w + +lemma planeFirst_hasDerivAt_other (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ a, 0 < σ a) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (hwz : w ≠ z) : + HasDerivAt (planeIntegral (fun p => heatFirst A h u p σ v w)) + (planeIntegral (fun p => heatMixed A h u p σ v w z) d) d := by + obtain ⟨a,b,ha,hab,hla,hlb⟩ := finite_variance_bounds σ hσ + obtain ⟨B,hB,_,hb⟩ := exists_heat_uniform_majorant A hh ha hab (by positivity : 0 ≤ |d|+1) u + apply hasDerivAt_planeIntegral (continuous_heatFirst A hh u hσ v w).measurable + (measurable_heatMixed A hh u hσ hw hz hwz) hB z d + · exact fun x => (hb z d x (by linarith) σ hla hlb).first v w + · exact fun e he x => (hb z e x (abs_le_add_one_of_mem_Ioo he) σ hla hlb).mixed v w z hw hz + · exact fun p => heatFirst_hasDerivAt_other A hh u p hσ hw hz hwz + +lemma planePure_eq_mixed (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ a, 0 < σ a) + (i : Three) {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (hwz : w ≠ z) : + planeIntegral (fun p => heatPure A h u p σ v i) d = + planeIntegral (fun p => heatMixed A h u p σ v w z) d := by + have hf : planeIntegral (fun p => heatFirst A h u p σ v i) = + planeIntegral (fun p => heatFirst A h u p σ v w) := by + funext e + exact (planeEnergy_hasDerivAt A hh u e hσ v i).unique (planeEnergy_hasDerivAt A hh u e hσ v w) + have hi := planeFirst_hasDerivAt A hh u d hσ v i + rw [hf] at hi + exact hi.unique (planeFirst_hasDerivAt_other A hh u d hσ hw hz hwz) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneInterval.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneInterval.lean new file mode 100644 index 0000000000000000000000000000000000000000..49ca40123488b369c80bbf08cdea32db78b1bc4f --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneInterval.lean @@ -0,0 +1,73 @@ +import OAI.Analysis.TriangularHilbert.JointMeasurable + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory Filter +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section + +lemma intervalIntegrable_of_clamped {f g : ℝ → ℝ} {a b C : ℝ} (hab : a ≤ b) + (hg : StronglyMeasurable g) (hbound : ∀ t, ‖g t‖ ≤ C) + (he : ∀ t ∈ Set.Icc a b, f t = g t) : IntervalIntegrable f volume a b := by + have hi : IntervalIntegrable g volume a b := + intervalIntegrable_const.mono_fun' hg.aestronglyMeasurable (Eventually.of_forall hbound) + apply hi.congr + rw [Set.uIoc_of_le hab] + exact fun t ht => (he t ⟨ht.1.le,ht.2⟩).symm + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma planeTime_intervalIntegrable (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : + (∀ v w, IntervalIntegrable (fun t => planeIntegral (fun p => heatVariance A h u p (fun z => α z*t) v w) d) volume a b) ∧ + (∀ v w, IntervalIntegrable (fun t => planeIntegral (fun p => heatCost A h u p (fun z => α z*t) v w) d) volume a b) := by + let T : ℝ → ℝ := fun t => max a (min b t) + have hT : Continuous T := by unfold T; fun_prop + have hTl (t : ℝ) : a ≤ T t := le_max_left _ _ + have hTu (t : ℝ) : T t ≤ b := max_le hab (min_le_left _ _) + have hTe (t : ℝ) (ht : t ∈ Set.Icc a b) : T t = t := by + simp [T,min_eq_right ht.2,max_eq_right ht.1] + let σ : ℝ → Three → ℝ := fun t w => α w*T t + have hσ : Continuous σ := by apply continuous_pi; intro w; exact continuous_const.mul hT + have hpos (t : ℝ) (w : Three) : 0 < σ t w := mul_pos (hα w) (ha.trans_le (hTl t)) + obtain ⟨l,r,hl,hlr,hlo,hhi⟩ := finite_variance_bounds α hα + obtain ⟨B,hB,_,hbound⟩ := exists_heat_uniform_majorant A hh (mul_pos hl ha) + (show l*a ≤ r*b from mul_le_mul hlr hab ha.le (hl.trans_le hlr).le) (abs_nonneg d) u + have hb t z : HeatAtBounds A h u (chart 2 d z) (σ t) (B z) := + hbound 2 d z le_rfl (σ t) + (fun w => mul_le_mul (hlo w) (hTl t) ha.le (hα w).le) + (fun w => mul_le_mul (hhi w) (hTu t) (ha.trans_le (hTl t)).le (hl.trans_le hlr).le) + have hp : Continuous (fun q : ℝ × (ℝ×ℝ) => chart 2 d q.2) := + (chart_continuous 2).comp (continuous_const.prodMk continuous_snd) + have hσq : Continuous (fun q : ℝ × (ℝ×ℝ) => σ q.1) := hσ.comp continuous_fst + have hclamp (f : ℝ → (Three → ℝ) → ℝ) + (hm : Measurable (fun q : ℝ × (ℝ×ℝ) => f q.1 (chart 2 d q.2))) + (hbo : ∀ t z, ‖f t (chart 2 d z)‖ ≤ B z) : + StronglyMeasurable (fun t => planeIntegral (f t) d) ∧ + ∀ t, ‖planeIntegral (f t) d‖ ≤ ∫ z, B z := + ⟨hm.stronglyMeasurable.integral_prod_right,fun t => norm_integral_le_of_norm_le hB (Eventually.of_forall (hbo t))⟩ + constructor + · intro v w + have hc := hclamp (fun t p => heatVariance A h u p (σ t) v w) + (continuous_heatVariance_param A hh u hp hσq (fun q z => hpos q.1 z) v w).measurable + (fun t z => (hb t z).variance v w) + apply intervalIntegrable_of_clamped hab hc.1 hc.2 + intro t ht + simp only [σ,hTe t ht] + · intro v w + have hc := hclamp (fun t p => heatCost A h u p (σ t) v w) + (measurable_heatCost_param A hh u hp hσq (fun q z => hpos q.1 z) v w) + (fun t z => (hb t z).cost v w) + apply intervalIntegrable_of_clamped hab hc.1 hc.2 + intro t ht + simp only [σ,hTe t ht] +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/PlaneTime.lean b/lean/OAI/Analysis/TriangularHilbert/PlaneTime.lean new file mode 100644 index 0000000000000000000000000000000000000000..719ad32bf5a7ff98377734d7ac72a90cd3ed0e91 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/PlaneTime.lean @@ -0,0 +1,123 @@ +import OAI.Analysis.TriangularHilbert.PlaneIntegral + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory Filter +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma planeEnergy_hasDerivAt_time (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) (α : Three → ℝ) (hα : ∀ w, 0 < α w) + {s : ℝ} (hs : 0 < s) (v : Three) : + HasDerivAt (fun t => planeIntegral (fun p => heatEnergy A h u p (fun w => α w*t) v) d) + (∑ w, α w * planeIntegral (fun p => heatVariance A h u p (fun a => α a*s) v w) d) s := by + obtain ⟨a,b,ha,hab,hla,hlb⟩ := finite_variance_bounds α hα + have hb : 0 < b := ha.trans_le hab + have has : 0 < a*(s/2) := mul_pos ha (by linarith) + have habs : a*(s/2) ≤ b*(2*s) := by gcongr; linarith + obtain ⟨B,hB,hBn,hbound⟩ := exists_heat_uniform_majorant A hh has habs (abs_nonneg d) u + let C := ∑ w, α w + have hC : 0 ≤ C := Finset.sum_nonneg (fun w _ => (hα w).le) + have hσ : ∀ w, 0 < α w*s := fun w => mul_pos (hα w) hs + have hint := (heatPlane_integrable A hh u d hσ).energy 2 v + have hvar := (heatPlane_integrable A hh u d hσ).variance 2 v + have hmeas : AEStronglyMeasurable (fun z : ℝ × ℝ => ∑ w, α w * heatVariance A h u (chart 2 d z) (fun a => α a*s) v w) := by + exact (Finset.aestronglyMeasurable_fun_sum Finset.univ (fun w _ => + (hvar w).aestronglyMeasurable.const_mul (α w))) + have hboundσ (t : ℝ) (ht : t ∈ Set.Ioo (s/2) (2*s)) : + (∀ w, a*(s/2) ≤ α w*t) ∧ (∀ w, α w*t ≤ b*(2*s)) := by + have ht0 : 0 < t := (by linarith : 0 < s/2).trans ht.1 + constructor + · intro w; exact mul_le_mul (hla w) ht.1.le (by linarith) (hα w).le + · intro w; exact mul_le_mul (hlb w) ht.2.le ht0.le hb.le + have hn : Set.Ioo (s/2) (2*s) ∈ 𝓝 s := Ioo_mem_nhds (by linarith) (by linarith) + have hfmeas : ∀ᶠ t in 𝓝 s, AEStronglyMeasurable (fun z : ℝ × ℝ => heatEnergy A h u (chart 2 d z) (fun w => α w*t) v) := by + filter_upwards [hn] with t ht + have ht0 : 0 < t := (by linarith : 0 < s/2).trans ht.1 + exact ((continuous_heatEnergy A hh u (fun w => mul_pos (hα w) ht0) v).measurable.comp + (measurable_chart 2 d)).aestronglyMeasurable + have hder := (hasDerivAt_integral_of_dominated_loc_of_deriv_le + (F := fun t z => heatEnergy A h u (chart 2 d z) (fun w => α w*t) v) + (F' := fun t z => ∑ w, α w * heatVariance A h u (chart 2 d z) (fun a => α a*t) v w) + (bound := fun z => C*B z) hn hfmeas hint hmeas + (Eventually.of_forall (fun z t ht => by + calc + _ ≤ ∑ w, ‖α w * heatVariance A h u (chart 2 d z) (fun a => α a*t) v w‖ := norm_sum_le _ _ + _ ≤ ∑ w, α w * B z := by + apply Finset.sum_le_sum + intro w _ + rw [norm_mul, Real.norm_eq_abs, abs_of_pos (hα w)] + exact mul_le_mul_of_nonneg_left + ((hbound 2 d z (le_refl _) _ (hboundσ t ht).1 (hboundσ t ht).2).variance v w) (hα w).le + _ = C*B z := (Finset.sum_mul _ _ _).symm)) + (hB.const_mul C) + (Eventually.of_forall (fun z t ht => heatEnergy_hasDerivAt_time A hh u (chart 2 d z) α hα + ((by linarith : 0 < s/2).trans ht.1) v))).2 + have he : (∫ z : ℝ × ℝ, ∑ w, α w * heatVariance A h u (chart 2 d z) (fun a => α a*s) v w) = + ∑ w, α w * planeIntegral (fun p => heatVariance A h u p (fun a => α a*s) v w) d := by + rw [integral_finsetSum _ (fun w _ => (hvar w).const_mul (α w))] + simp only [integral_const_mul, planeIntegral] + rw [he] at hder + exact hder + +lemma two_planeVariance (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ w, 0 < σ w) (v w : Three) : + 2 * planeIntegral (fun p => heatVariance A h u p σ v w) d = + planeIntegral (fun p => heatPure A h u p σ v w) d - + planeIntegral (fun p => heatCost A h u p σ v w) d := by + rw [planeIntegral, ← integral_const_mul] + have he : (fun z : ℝ × ℝ => 2 * heatVariance A h u (chart 2 d z) σ v w) = + (fun z => heatPure A h u (chart 2 d z) σ v w - heatCost A h u (chart 2 d z) σ v w) := by + funext z + simp only [heatVariance,heatPure,heatCost] + ring + rw [he, integral_sub ((heatPlane_integrable A hh u d hσ).pure 2 v w) + ((heatPlane_integrable A hh u d hσ).cost 2 v w)] + rfl + +lemma planeCost_nonneg (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (d : ℝ) (σ : Three → ℝ) (v w : Three) : + 0 ≤ planeIntegral (fun p => heatCost A h u p σ v w) d := + integral_nonneg (fun z => heatCost_nonneg A h u (chart 2 d z) σ v w) + +lemma two_planeMixed_le (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ a, 0 < σ a) + {v w z : Three} (hw : w ≠ v) (hz : z ≠ v) (hwz : w ≠ z) : + 2 * planeIntegral (fun p => heatMixed A h u p σ v w z) d ≤ + planeIntegral (fun p => heatCost A h u p σ v w) d + + planeIntegral (fun p => heatCost A h u p σ v z) d := by + have hi := heatPlane_integrable A hh u d hσ + simp only [planeIntegral] + rw [← integral_const_mul, ← integral_add (hi.cost 2 v w) (hi.cost 2 v z)] + exact integral_mono ((hi.mixed 2 v w z hw hz hwz).const_mul 2) + ((hi.cost 2 v w).add (hi.cost 2 v z)) (fun p => two_heatMixed_le A hh u (chart 2 d p) hσ hw hz) + +lemma planeCost_neighbors (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) (d : ℝ) {σ : Three → ℝ} (hσ : ∀ a, 0 < σ a) (w : Three) : + (∑ v, if v = w then 0 else planeIntegral (fun p => heatCost A h u p σ v w) d) ≤ + Real.sqrt 2 * planeIntegral (fun p => heatCost A h u p σ w w) d := by + have hi := heatPlane_integrable A hh u d hσ + have hv v : Integrable (fun z : ℝ × ℝ => if v = w then (0:ℝ) else heatCost A h u (chart 2 d z) σ v w) := by + split_ifs + · exact integrable_zero _ _ _ + · exact hi.cost 2 v w + have he : (∑ v, if v = w then 0 else planeIntegral (fun p => heatCost A h u p σ v w) d) = + ∫ z : ℝ × ℝ, ∑ v, if v = w then 0 else heatCost A h u (chart 2 d z) σ v w := by + rw [integral_finsetSum _ (fun v _ => hv v)] + apply Finset.sum_congr rfl + intro v _ + split_ifs <;> simp [planeIntegral] + rw [he, planeIntegral, ← integral_const_mul] + exact integral_mono (integrable_finsetSum _ (fun v _ => hv v)) + ((hi.cost 2 w w).const_mul _) (fun z => heatCost_neighbors A hh u (chart 2 d z) hσ w) + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Quantization.lean b/lean/OAI/Analysis/TriangularHilbert/Quantization.lean new file mode 100644 index 0000000000000000000000000000000000000000..12792403669284765a5d283730cc31325c7238ce --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Quantization.lean @@ -0,0 +1,80 @@ +import OAI.Analysis.TriangularHilbert.GridCell + +namespace OAI + +universe uE + +section +namespace TriangularHilbert +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma measurable_gridIndex (h : ℝ) : Measurable (gridIndex h) := by + exact Int.measurable_floor.comp (measurable_id.div_const h) + +lemma measurable_gridPoint (h : ℝ) : Measurable (gridPoint h) := by + exact measurable_const.mul ((measurable_of_countable (fun i : ℤ => (i:ℝ))).comp (measurable_gridIndex h)) + +def gridSquare (h : ℝ) (z : ℝ×ℝ) : ℝ×ℝ := (gridPoint h z.1,gridPoint h z.2) + +lemma measurable_gridSquare (h : ℝ) : Measurable (gridSquare h) := + ((measurable_gridPoint h).comp measurable_fst).prodMk ((measurable_gridPoint h).comp measurable_snd) + +lemma tendsto_gridPoint {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (ht : Tendsto h atTop (𝓝 0)) (x : ℝ) : + Tendsto (fun n => gridPoint (h n) x) atTop (𝓝 x) := by + apply tendsto_iff_norm_sub_tendsto_zero.mpr + apply squeeze_zero (fun n => norm_nonneg _) (fun n => ?_) ht + exact (show ‖gridPoint (h n) x-x‖ < h n by simpa only [Real.norm_eq_abs] using abs_gridPoint_sub_lt (hh n) x).le + +lemma tendsto_gridSquare {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (ht : Tendsto h atTop (𝓝 0)) (z : ℝ×ℝ) : + Tendsto (fun n => gridSquare (h n) z) atTop (𝓝 z) := + (tendsto_gridPoint hh ht z.1).prodMk_nhds (tendsto_gridPoint hh ht z.2) + +def sampleIndices (h M : ℝ) : Finset ℤ := Finset.Icc ⌈-M/h⌉ ⌊M/h⌋ + +lemma mem_sampleIndices {h : ℝ} (hh : 0 < h) (M : ℝ) (i : ℤ) : + i ∈ sampleIndices h M ↔ |h*i| ≤ M := by + rw [sampleIndices,Finset.mem_Icc,Int.ceil_le,Int.le_floor,abs_le] + constructor + · rintro ⟨hi,hj⟩ + exact ⟨by simpa only [mul_comm] using (div_le_iff₀ hh).mp hi, + by simpa only [mul_comm] using (le_div_iff₀ hh).mp hj⟩ + · rintro ⟨hi,hj⟩ + exact ⟨(div_le_iff₀ hh).mpr (by simpa only [mul_comm] using hi), + (le_div_iff₀ hh).mpr (by simpa only [mul_comm] using hj)⟩ + +def sampledMatrix {E : Type uE} (f : ℝ×ℝ → E) (h M : ℝ) : + sampleIndices h M → sampleIndices h M → E := fun i j => f (h*(i:ℤ),h*(j:ℤ)) + +lemma gridLift_sampled {E : Type uE} [AddCommMonoid E] (f : ℝ×ℝ → E) {h M : ℝ} + (hh : 0 < h) (hf : ∀ z, f z ≠ 0 → |z.1| ≤ M ∧ |z.2| ≤ M) (z : ℝ×ℝ) : + gridLift (sampleIndices h M) h (sampledMatrix f h M) z = f (gridSquare h z) := by + rw [gridLift_eq hh] + split_ifs with hi hj + · rfl + · symm + by_contra hn + exact hj ((mem_sampleIndices hh M _).mpr (hf _ hn).2) + · symm + by_contra hn + exact hi ((mem_sampleIndices hh M _).mpr (hf _ hn).1) + +lemma sampled_support {E : Type uE} [Zero E] (f : ℝ×ℝ → E) {h M : ℝ} + (hh : 0 < h) (hh1 : h ≤ 1) (hf : ∀ z, f z ≠ 0 → |z.1| ≤ M ∧ |z.2| ≤ M) + (z : ℝ×ℝ) (hz : f (gridSquare h z) ≠ 0) : + |z.1| ≤ M+1 ∧ |z.2| ≤ M+1 := by + have ha := hf _ hz + have h1 := abs_gridPoint_sub_lt hh z.1 + have h2 := abs_gridPoint_sub_lt hh z.2 + have e1 := abs_add_le (z.1-gridPoint h z.1) (gridPoint h z.1) + have e2 := abs_add_le (z.2-gridPoint h z.2) (gridPoint h z.2) + simp only [sub_add_cancel] at e1 e2 + rw [abs_sub_comm] at h1 h2 + dsimp [gridSquare] at ha + exact ⟨by linarith [ha.1],by linarith [ha.2]⟩ +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/RankJump.lean b/lean/OAI/Analysis/TriangularHilbert/RankJump.lean new file mode 100644 index 0000000000000000000000000000000000000000..3620302d0dd75e1d950c776cff58b81dfdd812f9 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/RankJump.lean @@ -0,0 +1,93 @@ +import OAI.Analysis.TriangularHilbert.SignedConvolution + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open MeasureTheory Filter +open scoped Topology Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma abs_hsReal_le_sum (X Y : Matrix ι ι ℂ) : + |hsReal X Y| ≤ ∑ i, ∑ j, ‖X i j‖ * ‖Y i j‖ := by + unfold hsReal traceReal + calc + _ ≤ ‖(Xᴴ * Y).trace‖ := Complex.abs_re_le_norm _ + _ ≤ ∑ j, ∑ i, ‖star (X i j) * Y i j‖ := by + unfold Matrix.trace + apply (norm_sum_le _ _).trans + apply Finset.sum_le_sum + intro j _ + exact norm_sum_le _ _ + _ = _ := by simp only [norm_mul,norm_star]; rw [Finset.sum_comm] + +def segmentMatrix (A B : Matrix ι ι ℂ) (t : ℝ) : Matrix ι ι ℂ := + (1-t) • A + t • B + +lemma segmentMatrix_hasDerivAt (A B : Matrix ι ι ℂ) (t : ℝ) : + HasDerivAt (segmentMatrix A B) (B-A) t := by + convert! (((hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_id t)).smul_const A).add + ((hasDerivAt_id t).smul_const B) using 1; simp [sub_eq_add_neg,add_comm] + +lemma segmentEnergy_hasDerivAt (A B : Matrix ι ι ℂ) (t : ℝ) : + HasDerivAt (fun s => energy ((segmentMatrix A B s)ᴴ * segmentMatrix A B s)) + (3 * hsReal (segmentMatrix A B t * CFC.sqrt ((segmentMatrix A B t)ᴴ * segmentMatrix A B t)) (B-A)) t := by + exact (energyGram_hasFDerivAt _).comp_hasDerivAt t (segmentMatrix_hasDerivAt A B t) + +omit [Fintype ι] [DecidableEq ι] in +lemma segmentMatrix_norm_entry_le (A B : Matrix ι ι ℂ) (M : ι → ι → ℝ) + (hA : ∀ i j, ‖A i j‖ ≤ M i j) (hB : ∀ i j, ‖B i j‖ ≤ M i j) + {t : ℝ} (ht : t ∈ Set.Icc 0 1) (i j : ι) : + ‖segmentMatrix A B t i j‖ ≤ M i j := by + calc + _ ≤ ‖((1-t):ℝ) • A i j‖ + ‖t • B i j‖ := norm_add_le _ _ + _ = (1-t)*‖A i j‖+t*‖B i j‖ := by + rw [norm_smul,norm_smul,Real.norm_eq_abs,Real.norm_eq_abs,abs_of_nonneg ht.1, + abs_of_nonneg (by linarith [ht.2] : 0 ≤ 1-t)] + _ ≤ (1-t)*M i j+t*M i j := add_le_add + (mul_le_mul_of_nonneg_left (hA i j) (by linarith [ht.2])) + (mul_le_mul_of_nonneg_left (hB i j) ht.1) + _ = _ := by ring + +omit [DecidableEq ι] in +lemma rowNorm_mono {X Y : Matrix ι ι ℂ} (h : ∀ i j, ‖X i j‖ ≤ ‖Y i j‖) (i : ι) : + rowNorm X i ≤ rowNorm Y i := by + apply Real.sqrt_le_sqrt + exact Finset.sum_le_sum (fun j _ => sq_le_sq₀ (norm_nonneg _) (norm_nonneg _) |>.mpr (h i j)) + +omit [DecidableEq ι] in +lemma colNorm_mono {X Y : Matrix ι ι ℂ} (h : ∀ i j, ‖X i j‖ ≤ ‖Y i j‖) (j : ι) : + colNorm X j ≤ colNorm Y j := by + apply Real.sqrt_le_sqrt + exact Finset.sum_le_sum (fun i _ => sq_le_sq₀ (norm_nonneg _) (norm_nonneg _) |>.mpr (h i j)) + +lemma energy_jump_le (A B M : Matrix ι ι ℂ) + (hA : ∀ i j, ‖A i j‖ ≤ ‖M i j‖) (hB : ∀ i j, ‖B i j‖ ≤ ‖M i j‖) : + |energy (Bᴴ*B) - energy (Aᴴ*A)| ≤ + 3 * ∑ i, ∑ j, rowNorm M i * colNorm M j * ‖(B-A) i j‖ := by + have hb (t : ℝ) (ht : t ∈ Set.Ico 0 1) : + ‖3 * hsReal (segmentMatrix A B t * CFC.sqrt ((segmentMatrix A B t)ᴴ * segmentMatrix A B t)) (B-A)‖ ≤ + 3 * ∑ i, ∑ j, rowNorm M i * colNorm M j * ‖(B-A) i j‖ := by + rw [norm_mul, Real.norm_of_nonneg (by norm_num : (0:ℝ) ≤ 3), Real.norm_eq_abs] + apply mul_le_mul_of_nonneg_left _ (by norm_num) + apply (abs_hsReal_le_sum _ _).trans + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + apply (entry_gradient_le _ i j).trans + have he := segmentMatrix_norm_entry_le A B (fun i j => ‖M i j‖) hA hB ⟨ht.1,ht.2.le⟩ + exact mul_le_mul (rowNorm_mono he i) (colNorm_mono he j) (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) + have h := norm_image_sub_le_of_norm_deriv_le_segment_01' + (fun t _ => (segmentEnergy_hasDerivAt A B t).hasDerivWithinAt) hb + simpa [segmentMatrix,Real.norm_eq_abs] using h +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/RationalSup.lean b/lean/OAI/Analysis/TriangularHilbert/RationalSup.lean new file mode 100644 index 0000000000000000000000000000000000000000..19bcd53fdd9052043f8436ed5a6fb33758078da2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/RationalSup.lean @@ -0,0 +1,56 @@ +import OAI.Analysis.TriangularHilbert.EndpointContinuity + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Filter Heat +open scoped Topology ENNReal +noncomputable section + +abbrev RatEndpoints := {p : ℚ×ℚ // 0 < p.1 ∧ p.1 < p.2} +instance : Inhabited RatEndpoints := ⟨⟨(1,2),by norm_num⟩⟩ + +def RatEndpoints.toEndpoints (q : RatEndpoints) : Endpoints where + lower := q.1.1 + upper := q.1.2 + lower_pos := by exact_mod_cast q.2.1 + lower_lt_upper := by exact_mod_cast q.2.2 + +def cyclicMax (B C : Plane → ℂ) (z : Plane) : ℝ≥0∞ := + ⨆ q : RatEndpoints, ENNReal.ofReal ‖cyclicKernelOutput B C (hardKernel (q.1.1:ℝ) (q.1.2:ℝ)) z‖ + +lemma cyclicHard_le_cyclicMax {B C : Plane → ℂ} {z : Plane} (hz : CubicSliceGood B C z) + {r R : ℝ} (hr : 0 < r) (hR : r < R) : + ENNReal.ofReal ‖cyclicKernelOutput B C (hardKernel r R) z‖ ≤ cyclicMax B C z := by + obtain ⟨u,_,hu,htu⟩ := Real.exists_seq_rat_strictMono_tendsto r + obtain ⟨v,_,hv,htv⟩ := Real.exists_seq_rat_strictAnti_tendsto R + have ht := (continuousAt_cyclicHard hz hr hR).tendsto.comp (htu.prodMk_nhds htv) + apply le_of_tendsto (ENNReal.continuous_ofReal.continuousAt.tendsto.comp ht.norm) + filter_upwards [htu (eventually_gt_nhds hr)] with n hn + have hq : 0 < u n ∧ u n < v n := by + constructor + · exact_mod_cast (show (0:ℝ) < (u n:ℝ) from hn) + · exact_mod_cast ((hu n).trans (hR.trans (hv n))) + exact le_iSup (fun q : RatEndpoints => ENNReal.ofReal ‖cyclicKernelOutput B C (hardKernel (q.1.1:ℝ) (q.1.2:ℝ)) z‖) + ⟨(u n,v n),hq⟩ + +lemma cyclicMax_eq_iSup {B C : Plane → ℂ} {z : Plane} (hz : CubicSliceGood B C z) : + cyclicMax B C z = ⨆ E : Endpoints, ENNReal.ofReal ‖cyclicKernelOutput B C (hardKernel E.lower E.upper) z‖ := by + apply le_antisymm + · apply iSup_le + intro q + exact le_iSup (fun E : Endpoints => ENNReal.ofReal ‖cyclicKernelOutput B C (hardKernel E.lower E.upper) z‖) q.toEndpoints + · apply iSup_le + intro E + exact cyclicHard_le_cyclicMax hz E.lower_pos E.lower_lt_upper + +def RatEndpoints.sequence (n : ℕ) : RatEndpoints := (Encodable.decode (α := RatEndpoints) n).getD default +lemma RatEndpoints.sequence_surjective : Function.Surjective RatEndpoints.sequence := by + intro q + exact ⟨Encodable.encode q,by simp [RatEndpoints.sequence,Encodable.encodek]⟩ +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SampledConvergence.lean b/lean/OAI/Analysis/TriangularHilbert/SampledConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bc1b1dc462598e77f57ae64347e4d18793c6601 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SampledConvergence.lean @@ -0,0 +1,75 @@ +import OAI.Analysis.TriangularHilbert.RationalSup + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology +noncomputable section + +lemma norm_sampledIntegrand_le (B C : ℝ×ℝ → ℂ) {CB CC L : ℝ} + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) (K : ℝ → ℝ) + (hk : ∀ t, |K t| ≤ L) (h : ℝ) (z : ℝ×ℝ) (c : ℝ) : + ‖sampledIntegrand B C h K z c‖ ≤ CB*CC*L := by + unfold sampledIntegrand + rw [norm_mul,norm_mul,Complex.norm_real,Real.norm_eq_abs] + exact mul_le_mul (mul_le_mul (hb _) (hc _) (norm_nonneg _) ((norm_nonneg (B 0)).trans (hb 0))) + (hk _) (abs_nonneg _) (mul_nonneg ((norm_nonneg (B 0)).trans (hb 0)) ((norm_nonneg (C 0)).trans (hc 0))) + +lemma sampledIntegrand_tendsto (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (ht : Tendsto h atTop (𝓝 0)) + (K : ℝ → ℝ) (z : ℝ×ℝ) (c : ℝ) (hk : ContinuousAt K (z.1+z.2+c)) : + Tendsto (fun n => sampledIntegrand B C (h n) K z c) atTop + (𝓝 (B (z.2,c)*C (c,z.1)*(K (z.1+z.2+c):ℂ))) := by + have ha := tendsto_gridPoint hh ht z.1 + have hb := tendsto_gridPoint hh ht z.2 + have hc := tendsto_gridPoint hh ht c + exact (((hB.tendsto _).comp (hb.prodMk_nhds hc)).mul + ((hC.tendsto _).comp (hc.prodMk_nhds ha))).mul + (Complex.continuous_ofReal.continuousAt.tendsto.comp (hk.tendsto.comp ((ha.add hb).add hc))) + +lemma sampledKernelOutput_tendsto (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + {M CB CC L : ℝ} (hs : BoxSupport B M) (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hL : 0 ≤ L) + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) + {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (hh1 : ∀ n, h n ≤ 1) (ht : Tendsto h atTop (𝓝 0)) + (K : ℝ → ℝ) (hK : Measurable K) (hk : ∀ t, |K t| ≤ L) (z : ℝ×ℝ) + (hcont : ∀ᵐ c : ℝ, ContinuousAt K (z.1+z.2+c)) : + Tendsto (fun n => sampledKernelOutput B C (h n) K z) atTop (𝓝 (cyclicKernelOutput B C K z)) := by + let b : ℝ → ℝ := (Set.Icc (-(M+1)) (M+1)).indicator (fun _ => CB*CC*L) + apply tendsto_integral_of_dominated_convergence b + · intro n + exact ((measurable_sampledIntegrand B C hB.measurable hC.measurable (h n) K hK).comp + (measurable_const.prodMk measurable_id)).aestronglyMeasurable + · exact (integrableOn_const (μ := volume) (s := Set.Icc (-(M+1)) (M+1)) (C := CB*CC*L) + isCompact_Icc.measure_ne_top).integrable_indicator measurableSet_Icc + · intro n + filter_upwards [] with c + by_cases he : sampledIntegrand B C (h n) K z c = 0 + · rw [he,norm_zero] + exact Set.indicator_nonneg (fun _ _ => mul_nonneg (mul_nonneg hCB hCC) hL) _ + · have hmem : c ∈ Set.Icc (-(M+1)) (M+1) := abs_le.mp (sampledIntegrand_support_c B C (hh n) (hh1 n) hs K z c he) + dsimp only [b] + rw [Set.indicator_of_mem hmem] + exact norm_sampledIntegrand_le B C hb hc K hk _ _ _ + · filter_upwards [hcont] with c hct + exact sampledIntegrand_tendsto B C hB hC hh ht K z c hct + +lemma ae_continuousAt_hardKernel (r R a : ℝ) : ∀ᵐ c : ℝ, ContinuousAt (hardKernel r R) (a+c) := by + have hne (x : ℝ) : ∀ᵐ c : ℝ, c ≠ x := by simp [ae_iff] + filter_upwards [hne (-a),hne (r-a),hne (-r-a),hne (R-a),hne (-R-a)] with c h0 h1 h2 h3 h4 + apply continuousAt_hardKernel + · intro he; apply h0; linarith + · intro he + rcases eq_or_eq_neg_of_abs_eq he with he|he + · apply h1; linarith + · apply h2; linarith + · intro he + rcases eq_or_eq_neg_of_abs_eq he with he|he + · apply h3; linarith + · apply h4; linarith +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SampledMoment.lean b/lean/OAI/Analysis/TriangularHilbert/SampledMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..69b22e513e2362d75eb994ca98253b175192ae7b --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SampledMoment.lean @@ -0,0 +1,74 @@ +import OAI.Analysis.TriangularHilbert.FiniteMoment + +namespace OAI + +universe uκ + +section +namespace TriangularHilbert.Heat +open MeasureTheory Filter +open scoped Topology +noncomputable section + +def outputBound (M CB CC L : ℝ) : ℝ := ∫ c : ℝ, + (Set.Icc (-(M+1)) (M+1)).indicator (fun _ => CB*CC*L) c + +lemma outputBound_nonneg (M : ℝ) {CB CC L : ℝ} (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hL : 0 ≤ L) : + 0 ≤ outputBound M CB CC L := + integral_nonneg (fun c => Set.indicator_nonneg (fun _ _ => mul_nonneg (mul_nonneg hCB hCC) hL) c) + +lemma sampledKernelOutput_bound (B C : ℝ×ℝ → ℂ) {M CB CC L h : ℝ} + (hs : BoxSupport B M) (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hL : 0 ≤ L) + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) (hh : 0 < h) (hh1 : h ≤ 1) + (K : ℝ → ℝ) (hk : ∀ t, |K t| ≤ L) (z : ℝ×ℝ) : + ‖sampledKernelOutput B C h K z‖ ≤ outputBound M CB CC L := by + apply norm_integral_le_of_norm_le + ((integrableOn_const (μ := volume) (s := Set.Icc (-(M+1)) (M+1)) (C := CB*CC*L) + isCompact_Icc.measure_ne_top).integrable_indicator measurableSet_Icc) + filter_upwards [] with c + by_cases he : sampledIntegrand B C h K z c = 0 + · rw [he,norm_zero] + exact Set.indicator_nonneg (fun _ _ => mul_nonneg (mul_nonneg hCB hCC) hL) c + · rw [Set.indicator_of_mem (show c ∈ Set.Icc (-(M+1)) (M+1) from + abs_le.mp (sampledIntegrand_support_c B C hh hh1 hs K z c he))] + exact norm_sampledIntegrand_le B C hb hc K hk _ _ _ + +lemma sampled_moment_tendsto (B C : ℝ×ℝ → ℂ) (hB : Continuous B) (hC : Continuous C) + {M CB CC L : ℝ} (hsB : BoxSupport B M) (hsC : BoxSupport C M) + (hCB : 0 ≤ CB) (hCC : 0 ≤ CC) (hL : 0 ≤ L) + (hb : ∀ z, ‖B z‖ ≤ CB) (hc : ∀ z, ‖C z‖ ≤ CC) + {h : ℕ → ℝ} (hh : ∀ n, 0 < h n) (hh1 : ∀ n, h n ≤ 1) (ht : Tendsto h atTop (𝓝 0)) + {κ : Type uκ} [Fintype κ] [Nonempty κ] (K : κ → ℝ → ℝ) + (hK : ∀ k, Measurable (K k)) (hk : ∀ k t, |K k t| ≤ L) + (hcont : ∀ k (z : ℝ×ℝ), ∀ᵐ c : ℝ, ContinuousAt (K k) (z.1+z.2+c)) : + Tendsto (fun n => ∫ z : ℝ×ℝ, finiteMoment (fun k => sampledKernelOutput B C (h n) (K k) z)) atTop + (𝓝 (∫ z : ℝ×ℝ, finiteMoment (fun k => cyclicKernelOutput B C (K k) z))) := by + let T := outputBound M CB CC L + have hT : 0 ≤ T := outputBound_nonneg M hCB hCC hL + let b : ℝ×ℝ → ℝ := (closedBox (M+1)).indicator (fun _ => T*Real.sqrt T) + apply tendsto_integral_of_dominated_convergence b + · intro n + exact (continuous_finiteMoment.measurable.comp (Measurable.of_eval + (fun k => measurable_sampledKernelOutput B C hB.measurable hC.measurable (h n) (K k) (hK k)))).aestronglyMeasurable + · exact (integrableOn_const (μ := volume) (s := closedBox (M+1)) (C := T*Real.sqrt T) + (volume_closedBox_ne_top _)).integrable_indicator (measurableSet_closedBox _) + · intro n + filter_upwards [] with z + rw [Real.norm_of_nonneg (finiteMoment_nonneg _)] + by_cases hz : z ∈ closedBox (M+1) + · dsimp only [b] + rw [Set.indicator_of_mem hz] + exact finiteMoment_le _ (fun k => sampledKernelOutput_bound B C hsB hCB hCC hL hb hc (hh n) (hh1 n) (K k) (hk k) z) + · have he : (fun k => sampledKernelOutput B C (h n) (K k) z) = fun _ : κ => (0:ℂ) := + funext (fun k => sampledKernelOutput_support B C (hh n) (hh1 n) hsB hsC (K k) z hz) + rw [he,finiteMoment_zero] + exact Set.indicator_nonneg (fun _ _ => mul_nonneg hT (Real.sqrt_nonneg _)) z + · filter_upwards [] with z + apply continuous_finiteMoment.continuousAt.tendsto.comp + exact tendsto_pi_nhds.mpr (fun k => sampledKernelOutput_tendsto B C hB hC hsB hCB hCC hL hb hc + hh hh1 ht (K k) (hK k) (hk k) z (hcont k z)) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SampledOutput.lean b/lean/OAI/Analysis/TriangularHilbert/SampledOutput.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7ee60c59e0291d1220ddeab1f71d843398309ba --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SampledOutput.lean @@ -0,0 +1,97 @@ +import OAI.Analysis.TriangularHilbert.BoundedBox + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section + +def cyclicKernelOutput (B C : ℝ×ℝ → ℂ) (K : ℝ → ℝ) (z : ℝ×ℝ) : ℂ := + ∫ c : ℝ, B (z.2,c)*C (c,z.1)*(K (z.1+z.2+c):ℂ) + +def sampledIntegrand (B C : ℝ×ℝ → ℂ) (h : ℝ) (K : ℝ → ℝ) (z : ℝ×ℝ) (c : ℝ) : ℂ := + B (gridPoint h z.2,gridPoint h c)*C (gridPoint h c,gridPoint h z.1)* + (K (gridPoint h z.1+gridPoint h z.2+gridPoint h c):ℂ) + +def sampledKernelOutput (B C : ℝ×ℝ → ℂ) (h : ℝ) (K : ℝ → ℝ) (z : ℝ×ℝ) : ℂ := + ∫ c : ℝ, sampledIntegrand B C h K z c + +lemma sampledKernelOutput_eq_sum (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) + (hB : BoxSupport B M) (K : ℝ → ℝ) (z : ℝ×ℝ) : + sampledKernelOutput B C h K z = ∑ k : sampleIndices h M, + (h:ℂ)*B (gridPoint h z.2,h*(k:ℤ))*C (h*(k:ℤ),gridPoint h z.1)* + (K (gridPoint h z.1+gridPoint h z.2+h*(k:ℤ)):ℂ) := by + have hs (c : ℝ) (hc : B (gridPoint h z.2,c)*C (c,gridPoint h z.1)* + (K (gridPoint h z.1+gridPoint h z.2+c):ℂ) ≠ 0) : |c| ≤ M := by + exact (hB (gridPoint h z.2,c) (fun he => hc (by simp only [he,zero_mul]))).2 + have he := integral_sampled_line (fun c => B (gridPoint h z.2,c)*C (c,gridPoint h z.1)* + (K (gridPoint h z.1+gridPoint h z.2+c):ℂ)) hh hs + rw [show sampledKernelOutput B C h K z = _ from he] + apply Finset.sum_congr rfl + intro k _ + simp only [Complex.real_smul] + ring + +lemma gridLift_kernelOutput_eq (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) + (hB : BoxSupport B M) (hC : BoxSupport C M) (K : ℝ → ℝ) (z : ℝ×ℝ) : + gridLift (sampleIndices h M) h (kernelOutput (sampledMatrix B h M) (sampledMatrix C h M) h + (fun m => h*(m:ℤ)) (fun _ _ => K)) z = sampledKernelOutput B C h K z := by + rw [gridLift_eq hh,sampledKernelOutput_eq_sum B C hh hB K z] + split_ifs with hi hj + · rfl + · symm + apply Finset.sum_eq_zero + intro k _ + have he : B (gridPoint h z.2,h*(k:ℤ)) = 0 := by + by_contra he + exact hj ((mem_sampleIndices hh M _).mpr (hB _ he).1) + simp only [he,mul_zero,zero_mul] + · symm + apply Finset.sum_eq_zero + intro k _ + have he : C (h*(k:ℤ),gridPoint h z.1) = 0 := by + by_contra he + exact hi ((mem_sampleIndices hh M _).mpr (hC _ he).2) + simp only [he,mul_zero,zero_mul] + +lemma measurable_sampledIntegrand (B C : ℝ×ℝ → ℂ) (hB : Measurable B) (hC : Measurable C) + (h : ℝ) (K : ℝ → ℝ) (hK : Measurable K) : + Measurable (fun q : (ℝ×ℝ)×ℝ => sampledIntegrand B C h K q.1 q.2) := by + have ha : Measurable (fun q : (ℝ×ℝ)×ℝ => gridPoint h q.1.1) := (measurable_gridPoint h).comp (measurable_fst.comp measurable_fst) + have hb : Measurable (fun q : (ℝ×ℝ)×ℝ => gridPoint h q.1.2) := (measurable_gridPoint h).comp (measurable_snd.comp measurable_fst) + have hc : Measurable (fun q : (ℝ×ℝ)×ℝ => gridPoint h q.2) := (measurable_gridPoint h).comp measurable_snd + exact ((hB.comp (hb.prodMk hc)).mul (hC.comp (hc.prodMk ha))).mul + (Complex.measurable_ofReal.comp (hK.comp ((ha.add hb).add hc))) + +lemma measurable_sampledKernelOutput (B C : ℝ×ℝ → ℂ) (hB : Measurable B) (hC : Measurable C) + (h : ℝ) (K : ℝ → ℝ) (hK : Measurable K) : Measurable (sampledKernelOutput B C h K) := + (measurable_sampledIntegrand B C hB hC h K hK).stronglyMeasurable.integral_prod_right'.measurable + +lemma sampledIntegrand_support_c (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) (hh1 : h ≤ 1) + (hB : BoxSupport B M) (K : ℝ → ℝ) (z : ℝ×ℝ) (c : ℝ) + (hc : sampledIntegrand B C h K z c ≠ 0) : |c| ≤ M+1 := by + have hne : B (gridSquare h (z.2,c)) ≠ 0 := fun he => hc (by simp only [sampledIntegrand,gridSquare] at he ⊢; rw [he]; simp) + exact (sampled_support B hh hh1 hB (z.2,c) hne).2 + +lemma sampledIntegrand_support_z (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) (hh1 : h ≤ 1) + (hB : BoxSupport B M) (hC : BoxSupport C M) (K : ℝ → ℝ) (z : ℝ×ℝ) (c : ℝ) + (hc : sampledIntegrand B C h K z c ≠ 0) : z ∈ closedBox (M+1) := by + apply (mem_closedBox _ _).mpr + have hneB : B (gridSquare h (z.2,c)) ≠ 0 := fun he => hc (by simp only [sampledIntegrand,gridSquare] at he ⊢; rw [he]; simp) + have hneC : C (gridSquare h (c,z.1)) ≠ 0 := fun he => hc (by simp only [sampledIntegrand,gridSquare] at he ⊢; rw [he]; simp) + exact ⟨(sampled_support C hh hh1 hC (c,z.1) hneC).2,(sampled_support B hh hh1 hB (z.2,c) hneB).1⟩ + +lemma sampledKernelOutput_support (B C : ℝ×ℝ → ℂ) {h M : ℝ} (hh : 0 < h) (hh1 : h ≤ 1) + (hB : BoxSupport B M) (hC : BoxSupport C M) (K : ℝ → ℝ) (z : ℝ×ℝ) (hz : z ∉ closedBox (M+1)) : + sampledKernelOutput B C h K z = 0 := by + apply integral_eq_zero_of_ae + filter_upwards [] with c + by_contra hc + exact hz (sampledIntegrand_support_z B C hh hh1 hB hC K z c hc) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SelectedScale.lean b/lean/OAI/Analysis/TriangularHilbert/SelectedScale.lean new file mode 100644 index 0000000000000000000000000000000000000000..2bec2b492fe035c0f7b9ee4bf7686a93a3d482d4 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SelectedScale.lean @@ -0,0 +1,131 @@ +import OAI.Analysis.TriangularHilbert.IntervalMask + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def smoothKernel (a b t : ℝ) : ℝ := ∫ s in a..b, signedKernel s t / s + +def selectedSum (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (a b : Matrix ι ι ℝ) : ℂ := + ∑ i, ∑ j, ∑ k, (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)*(smoothKernel (a i j) (b i j) (u i+u j+u k):ℂ) + +def maskedSigned (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (a b : Matrix ι ι ℝ) (s : ℝ) : ℂ := + signedCenter (maskedArray A a b s) h u s / (s:ℂ) + +omit [DecidableEq ι] in +lemma maskedSigned_eq (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (a b : Matrix ι ι ℝ) (s : ℝ) : + maskedSigned A h u a b s = ∑ i, ∑ j, ∑ k, + (Set.Ico (a i j) (b i j)).indicator + (fun s => (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)*((signedKernel s (u i+u j+u k)/s:ℝ):ℂ)) s := by + simp only [maskedSigned,signedCenter,Finset.sum_div] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + change (h^3:ℝ)*(windowMask (a i j) (b i j) s (A 0 i j)*A 1 j k*A 2 k i)* + (signedKernel s (u i+u j+u k):ℂ)/(s:ℂ) = _ + by_cases hs : s ∈ Set.Ico (a i j) (b i j) + · rw [Set.indicator_of_mem hs] + simp only [Set.mem_Ico] at hs + simp only [windowMask,ite_eq_left hs] + push_cast + ring + · rw [Set.indicator_of_notMem hs] + simp only [Set.mem_Ico] at hs + simp only [windowMask,ite_eq_right hs] + simp + +omit [DecidableEq ι] in +lemma selectedSum_eq_integral (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (a b : Matrix ι ι ℝ) + {L U : ℝ} (hL : 0 < L) (hLU : L ≤ U) (ha : ∀ i j, L ≤ a i j) (hab : ∀ i j, a i j ≤ b i j) + (hb : ∀ i j, b i j ≤ U) : selectedSum A h u a b = ∫ s in L..U, maskedSigned A h u a b s := by + have hc (i j k : ι) : IntervalIntegrable (fun s => ((signedKernel s (u i+u j+u k)/s:ℝ):ℂ)) volume L U := + ⟨(signedKernel_intervalIntegrable hL hLU (u i+u j+u k)).1.ofReal, + (signedKernel_intervalIntegrable hL hLU (u i+u j+u k)).2.ofReal⟩ + have hi (i j k : ι) := intervalIntegrable_indicator + ((hc i j k).const_mul ((h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i))) (a := a i j) (b := b i j) + simp_rw [maskedSigned_eq] + rw [intervalIntegral.integral_finsetSum (fun i _ => intervalIntegrable_finsetSum _ (fun j _ => intervalIntegrable_finsetSum _ (fun k _ => hi i j k)))] + unfold selectedSum + apply Finset.sum_congr rfl + intro i _ + rw [intervalIntegral.integral_finsetSum (fun j _ => intervalIntegrable_finsetSum _ (fun k _ => hi i j k))] + apply Finset.sum_congr rfl + intro j _ + rw [intervalIntegral.integral_finsetSum (fun k _ => hi i j k)] + apply Finset.sum_congr rfl + intro k _ + rw [intervalIntegral_indicator_Ico (ha i j) (hab i j) (hb i j),intervalIntegral.integral_const_mul, + intervalIntegral.integral_ofReal] + rfl + +lemma maskedSigned_norm_le (A : Three → Matrix ι ι ℂ) {h s : ℝ} (hh : 0 < h) (hs : 0 < s) + (u : ι → ℝ) (a b : Matrix ι ι ℝ) : + ‖maskedSigned A h u a b s‖ ≤ (440/3)*∑ r, maskedCost A a b h u r s := by + have hn (r w : Three) : 0 ≤ planeIntegral (fun p => heatCost (maskedArray A a b s) h u p + (fun z => strictRate r z*s) w w) 0 := integral_nonneg (fun _ => heatCost_nonneg _ _ _ _ _ _ _) + have hb : (∑ v, planeIntegral (fun p => heatCost (maskedArray A a b s) h u p + (fun z => strictRate v z*s) v v) 0) ≤ ∑ r, maskedCost A a b h u r s := by + apply Finset.sum_le_sum + intro v _ + exact Finset.single_le_sum (fun w _ => hn v w) (Finset.mem_univ v) + unfold maskedSigned + rw [norm_div,Complex.norm_real,Real.norm_of_nonneg hs.le] + apply (div_le_div_of_nonneg_right (signedCenter_norm_le _ hh hs u) hs.le).trans + rw [mul_assoc,mul_div_assoc,mul_div_cancel_left₀ _ hs.ne'] + exact mul_le_mul_of_nonneg_left hb (by norm_num) + +lemma maskedCost_intervalIntegrable (A : Three → Matrix ι ι ℂ) (a b : Matrix ι ι ℝ) + (S : Finset ℝ) (hS : S.Nonempty) (ha : ∀ i j, a i j ∈ S) (hb : ∀ i j, b i j ∈ S) + {h : ℝ} (hh : 0 < h) (u : ι → ℝ) (hL : 0 < S.min' hS) (r : Three) : + IntervalIntegrable (maskedCost A a b h u r) volume (S.min' hS) (S.max' hS) := by + have ht0 : 0 < sortedTimes S hS 0 := by simpa only [sortedTimes_zero] using hL + have hi := IntervalIntegrable.trans_iterate (n := S.card-1) + (fun k _ => maskedCost_interval_piece A a b S hS ha hb hh u ht0 r k) + simpa only [sortedTimes_zero,sortedTimes_last] using hi + +def selectedConstant : ℝ := (440/3)*3*maskedConstant/strictConstant +lemma selectedConstant_pos : 0 < selectedConstant := by + unfold selectedConstant + exact div_pos (mul_pos (by norm_num) maskedConstant_pos) strictConstant_pos + +lemma selectedSum_le_cubic (D : Finset ℤ) (A : Three → Matrix D D ℂ) (a b : Matrix D D ℝ) + (hab : ∀ i j, a i j ≤ b i j) (S : Finset ℝ) (hS : S.Nonempty) + (ha : ∀ i j, a i j ∈ S) (hb : ∀ i j, b i j ∈ S) + {h : ℝ} (hh : 0 < h) (hl : ∀ s ∈ S, h^2 ≤ s) : + ‖selectedSum A h (fun m => h*(m:ℤ)) a b‖ ≤ selectedConstant*arrayCubic A h := by + have hL : 0 < S.min' hS := (sq_pos_of_pos hh).trans_le (hl _ (Finset.min'_mem S hS)) + have hLU : S.min' hS ≤ S.max' hS := Finset.min'_le S _ (Finset.max'_mem S hS) + have hi r := maskedCost_intervalIntegrable A a b S hS ha hb hh (fun m => h*(m:ℤ)) hL r + rw [selectedSum_eq_integral A _ _ a b hL hLU + (fun i j => Finset.min'_le _ _ (ha i j)) hab (fun i j => Finset.le_max' _ _ (hb i j))] + have hbound := intervalIntegral.norm_integral_le_of_norm_le hLU + (Filter.Eventually.of_forall (fun s hs => maskedSigned_norm_le A hh (hL.trans hs.1) _ a b)) + ((intervalIntegrable_finsetSum _ (fun r _ => hi r)).const_mul (440/3:ℝ)) + apply hbound.trans + rw [intervalIntegral.integral_const_mul,intervalIntegral.integral_finsetSum (fun r _ => hi r)] + have hs := Finset.sum_le_sum (fun r (_ : r ∈ (Finset.univ : Finset Three)) => + masked_cost_integral_le D A a b hab S hS ha hb hh hl r) + simp only [← Finset.mul_sum,Finset.sum_const,Finset.card_univ,Three,Fintype.card_fin,nsmul_eq_mul,Nat.cast_ofNat] at hs + have hc : (∑ r, ∫ s in S.min' hS..S.max' hS, maskedCost A a b h (fun m => h*(m:ℤ)) r s) ≤ + (3*(maskedConstant*arrayCubic A h))/strictConstant := + (le_div_iff₀ strictConstant_pos).mpr (by nlinarith only [hs]) + unfold selectedConstant + calc + _ ≤ (440/3)*((3*(maskedConstant*arrayCubic A h))/strictConstant) := + mul_le_mul_of_nonneg_left hc (by norm_num) + _ = _ := by ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SignedCenter.lean b/lean/OAI/Analysis/TriangularHilbert/SignedCenter.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c9b4049fad52083771cd66cabe15a1214147065 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SignedCenter.lean @@ -0,0 +1,76 @@ +import OAI.Analysis.TriangularHilbert.MaskedActual + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def signedCenter (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (s : ℝ) : ℂ := + ∑ i, ∑ j, ∑ k, (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)*(signedKernel s (u i+u j+u k):ℂ) + +lemma signedCenter_eq_integral (A : Three → Matrix ι ι ℂ) {h s : ℝ} (hh : 0 < h) (hs : 0 < s) + (u : ι → ℝ) : signedCenter A h u s = ∫ z : ℝ×ℝ, windowTrace A h u (chart 2 0 z) s := by + have hi (i j k : ι) : Integrable (fun z : ℝ×ℝ => (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)* + ((oddWindow s (u i-z.1)*oddWindow s (u j-z.2)*oddWindow s (u k+z.1+z.2):ℝ):ℂ)) := + (oddWindow_triple_integrable hs (u i) (u j) (u k)).ofReal.const_mul _ + have he (z : ℝ×ℝ) : windowTrace A h u (chart 2 0 z) s = + ∑ i, ∑ j, ∑ k, (h^3:ℝ)*(A 0 i j*A 1 j k*A 2 k i)* + ((oddWindow s (u i-z.1)*oddWindow s (u j-z.2)*oddWindow s (u k+z.1+z.2):ℝ):ℂ) := by + rw [windowTrace_eq A hh hs] + congr 1 + ext i + congr 1 + ext j + congr 1 + ext k + rw [show chart 2 0 z 0 = z.1 by rfl,show chart 2 0 z 1 = z.2 by rfl, + show chart 2 0 z 2 = 0-z.1-z.2 by rfl,show u k-(0-z.1-z.2) = u k+z.1+z.2 by ring] + simp_rw [he] + rw [integral_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => integrable_finsetSum _ (fun k _ => hi i j k)))] + unfold signedCenter + apply Finset.sum_congr rfl + intro i _ + rw [integral_finsetSum _ (fun j _ => integrable_finsetSum _ (fun k _ => hi i j k))] + apply Finset.sum_congr rfl + intro j _ + rw [integral_finsetSum _ (fun k _ => hi i j k)] + apply Finset.sum_congr rfl + intro k _ + rw [integral_const_mul,integral_complex_ofReal,integral_oddWindow_triple hs] + +lemma signedCenter_norm_le (A : Three → Matrix ι ι ℂ) {h s : ℝ} (hh : 0 < h) (hs : 0 < s) + (u : ι → ℝ) : ‖signedCenter A h u s‖ ≤ (440/3)*s*∑ v, + planeIntegral (fun p => heatCost A h u p (fun z => strictRate v z*s) v v) 0 := by + have hi (v : Three) := (heatPlane_integrable A hh u 0 (fun z => mul_pos (strictRate_pos v z) hs)).cost 2 v v + rw [signedCenter_eq_integral A hh hs] + have hb := norm_integral_le_of_norm_le + ((integrable_finsetSum _ (fun v _ => hi v)).const_mul ((440/3)*s)) + (Filter.Eventually.of_forall (fun z => windowTrace_le A hh hs u (chart 2 0 z))) + apply hb.trans_eq + rw [integral_const_mul,integral_finsetSum _ (fun v _ => hi v)] + rfl + +lemma continuousOn_signedKernel (t : ℝ) : ContinuousOn (fun s => signedKernel s t) (Set.Ioi 0) := by + intro s hs + apply ContinuousAt.continuousWithinAt + have hs' : 0 < s := hs + unfold signedKernel density + fun_prop (disch := positivity) + +lemma signedKernel_intervalIntegrable {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) (t : ℝ) : + IntervalIntegrable (fun s => signedKernel s t / s) volume a b := by + apply ContinuousOn.intervalIntegrable + rw [Set.uIcc_of_le hab] + exact ((continuousOn_signedKernel t).div continuousOn_id (fun s hs => ne_of_gt hs)).mono + (fun s hs => ha.trans_le hs.1) +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SignedConvolution.lean b/lean/OAI/Analysis/TriangularHilbert/SignedConvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..0901f7a31b9c737a06617d83ff993ca2f3f4e252 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SignedConvolution.lean @@ -0,0 +1,98 @@ +import OAI.Analysis.TriangularHilbert.SignedExpansion + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +lemma density_equal_pair {s : ℝ} (hs : 0 < s) (a b p : ℝ) : + density s (a-p)*density s (b+p) = + density (2*s) (a+b)*density (s/2) (p-(a-b)/2) := by + rw [show b+p = -((-b)-p) by ring,density_neg,density_product hs hs] + congr 1 + · congr 1 <;> ring + · congr 1 + · field_simp; ring + · field_simp; ring + +lemma weighted_signed_pair {s : ℝ} (hs : 0 < s) (a b p : ℝ) : + (a-p)*(b+p)*density s (a-p)*density s (b+p) = + density (2*s) (a+b)*(cubic ((a+b)^2/4) 0 (-1) 0 (p-(a-b)/2)*density (s/2) (p-(a-b)/2)) := by + rw [mul_assoc ((a-p)*(b+p)),density_equal_pair hs] + unfold cubic + ring + +lemma integral_signed_pair {s : ℝ} (hs : 0 < s) (a b : ℝ) : + (∫ p : ℝ, (a-p)*(b+p)*density s (a-p)*density s (b+p)) = + ((a+b)^2/4-s/2)*density (2*s) (a+b) := by + simp_rw [weighted_signed_pair hs] + rw [integral_const_mul,integral_shifted_cubic_density (by positivity : 0 < s/2)] + ring + +lemma integral_oddWindow_pair {s : ℝ} (hs : 0 < s) (a b : ℝ) : + (∫ p : ℝ, oddWindow s (a-p)*oddWindow s (b+p)) = + (((a+b)^2/4-s/2)*density (2*s) (a+b))/s := by + have hr := (Real.sqrt_pos.mpr hs).ne' + have he (p : ℝ) : oddWindow s (a-p)*oddWindow s (b+p) = + ((a-p)*(b+p)*density s (a-p)*density s (b+p))/s := by + unfold oddWindow + field_simp + rw [Real.sq_sqrt hs.le] + ring + simp_rw [he] + rw [integral_div,integral_signed_pair hs] + +lemma density_one_two_pair {s : ℝ} (hs : 0 < s) (a b p : ℝ) : + density s (a-p)*density (2*s) (b+p) = + density (3*s) (a+b)*density (2*s/3) (p-(2*a-b)/3) := by + rw [show b+p = -((-b)-p) by ring,density_neg,density_product hs (by positivity : 0 < 2*s)] + congr 1 + · congr 1 <;> ring + · congr 1 + · field_simp; ring + · field_simp; ring + +lemma weighted_signed_outer {s : ℝ} (hs : 0 < s) (a b p : ℝ) : + (a-p)*density s (a-p)*(((b+p)^2/4-s/2)*density (2*s) (b+p)) = + density (3*s) (a+b)*(cubic ((a+b)^3/27-(a+b)*s/6) (s/2) (-(a+b)/4) (-1/4) + (p-(2*a-b)/3)*density (2*s/3) (p-(2*a-b)/3)) := by + calc + _ = ((a-p)*((b+p)^2/4-s/2))*(density s (a-p)*density (2*s) (b+p)) := by ring + _ = _ := by rw [density_one_two_pair hs]; unfold cubic; ring + +lemma integral_signed_outer {s : ℝ} (hs : 0 < s) (a b : ℝ) : + (∫ p : ℝ, (a-p)*density s (a-p)*(((b+p)^2/4-s/2)*density (2*s) (b+p))) = + ((a+b)^3/27-(a+b)*s/3)*density (3*s) (a+b) := by + simp_rw [weighted_signed_outer hs] + rw [integral_const_mul,integral_shifted_cubic_density (by positivity : 0 < 2*s/3)] + ring + +def signedKernel (s t : ℝ) : ℝ := + (t^3/27-t*s/3)/(s*Real.sqrt s)*density (3*s) t + +lemma integral_oddWindow_triple {s : ℝ} (hs : 0 < s) (a b c : ℝ) : + (∫ z : ℝ×ℝ, oddWindow s (a-z.1)*oddWindow s (b-z.2)*oddWindow s (c+z.1+z.2)) = + signedKernel s (a+b+c) := by + rw [Measure.volume_eq_prod,integral_prod _ (oddWindow_triple_integrable hs a b c)] + have inner (p : ℝ) : (∫ q : ℝ, oddWindow s (a-p)*oddWindow s (b-q)*oddWindow s (c+p+q)) = + oddWindow s (a-p)*((((b+c+p)^2/4-s/2)*density (2*s) (b+c+p))/s) := by + simp_rw [mul_assoc] + rw [integral_const_mul,integral_oddWindow_pair hs] + congr 3 <;> ring_nf + simp_rw [inner] + have he (p : ℝ) : oddWindow s (a-p)*((((b+c+p)^2/4-s/2)*density (2*s) (b+c+p))/s) = + ((a-p)*density s (a-p)*(((b+c+p)^2/4-s/2)*density (2*s) (b+c+p)))/(s*Real.sqrt s) := by + unfold oddWindow + ring + simp_rw [he] + rw [integral_div,integral_signed_outer hs] + unfold signedKernel + rw [show a+(b+c) = a+b+c by ring] + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SignedExpansion.lean b/lean/OAI/Analysis/TriangularHilbert/SignedExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..4af71a7fb400fb7beffe28600ff3790b81ee57d0 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SignedExpansion.lean @@ -0,0 +1,77 @@ +import OAI.Analysis.TriangularHilbert.GaussianTriple + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section + +lemma density_mul_windowRatio {s : ℝ} (hs : 0 < s) (t : ℝ) : + density ((11/10)*s) t * windowRatio s t = oddWindow s t := by + unfold windowRatio + exact mul_div_cancel₀ _ (density_pos (by positivity) _).ne' + +lemma abs_oddWindow_le {s : ℝ} (hs : 0 < s) (t : ℝ) : + |oddWindow s t| ≤ 44*density ((11/10)*s) t := by + rw [← density_mul_windowRatio hs t,abs_mul,abs_of_nonneg (density_nonneg (by positivity) _)] + simpa only [mul_comm] using mul_le_mul_of_nonneg_left (abs_windowRatio_le hs t) (density_nonneg (by positivity) t) + +lemma continuous_oddWindow (s : ℝ) : Continuous (oddWindow s) := by + unfold oddWindow + exact (continuous_id.div_const _).mul (continuous_density s) + +lemma oddWindow_triple_integrable {s : ℝ} (hs : 0 < s) (a b c : ℝ) : + Integrable (fun z : ℝ×ℝ => oddWindow s (a-z.1)*oddWindow s (b-z.2)*oddWindow s (c+z.1+z.2)) := by + have hi := (density_triple_integrable (by positivity : 0 < (11/10)*s) + (by positivity : 0 < (11/10)*s) (by positivity : 0 < (11/10)*s) a b c).const_mul (44^3:ℝ) + apply hi.mono' + · exact (((continuous_oddWindow s).comp (continuous_const.sub continuous_fst)).mul + ((continuous_oddWindow s).comp (continuous_const.sub continuous_snd)) |>.mul + ((continuous_oddWindow s).comp ((continuous_const.add continuous_fst).add continuous_snd))).aestronglyMeasurable + · apply Filter.Eventually.of_forall + intro z + rw [Real.norm_eq_abs,abs_mul,abs_mul] + have h0 := abs_oddWindow_le hs (a-z.1) + have h1 := abs_oddWindow_le hs (b-z.2) + have h2 := abs_oddWindow_le hs (c+z.1+z.2) + have hd0 := density_nonneg (by positivity : 0 ≤ (11/10)*s) (a-z.1) + have hd1 := density_nonneg (by positivity : 0 ≤ (11/10)*s) (b-z.2) + calc + _ ≤ (44*density ((11/10)*s) (a-z.1))*(44*density ((11/10)*s) (b-z.2))*(44*density ((11/10)*s) (c+z.1+z.2)) := by gcongr + _ = _ := by ring + +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma windowTrace_eq (A : Three → Matrix ι ι ℂ) {h s : ℝ} (hh : 0 < h) (hs : 0 < s) + (u : ι → ℝ) (p : Three → ℝ) : + windowTrace A h u p s = ∑ i, ∑ j, ∑ k, + (h^3:ℝ)* (A 0 i j*A 1 j k*A 2 k i) * + ((oddWindow s (u i-p 0)*oddWindow s (u j-p 1)*oddWindow s (u k-p 2):ℝ):ℂ) := by + unfold windowTrace windowDiags heatArray + have hg (v : Three) (i : ι) : 0 ≤ heatWeights h u p (fun _ => (11/10)*s) v i := + (weight_pos hh (by positivity) _ _).le + rw [trace_weighted_triangle A (heatWeights h u p (fun _ => (11/10)*s)) + (fun v i => windowRatio s (u i-p v)) hg] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + have he (v : Three) (i : ι) : heatWeights h u p (fun _ => (11/10)*s) v i * windowRatio s (u i-p v) = + h*oddWindow s (u i-p v) := by + unfold heatWeights weight + rw [mul_assoc,density_mul_windowRatio hs] + rw [he,he,he] + push_cast + ring + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SignedTraceOrder.lean b/lean/OAI/Analysis/TriangularHilbert/SignedTraceOrder.lean new file mode 100644 index 0000000000000000000000000000000000000000..482d8cfdc3ab9d3cc93d16d33c764707a9f9417c --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SignedTraceOrder.lean @@ -0,0 +1,136 @@ +import OAI.Analysis.TriangularHilbert.PlaneDissipation + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def windowDiags (u : ι → ℝ) (p : Three → ℝ) (s : ℝ) : Three → Matrix ι ι ℂ := + fun v => Matrix.diagonal (fun i => (windowRatio s (u i-p v):ℂ)) + +def windowTrace (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (p : Three → ℝ) (s : ℝ) : ℂ := + Matrix.trace (windowDiags u p s 0 * heatArray A h u p (fun _ => (11/10)*s) 0 * + windowDiags u p s 1 * heatArray A h u p (fun _ => (11/10)*s) 1 * + windowDiags u p s 2 * heatArray A h u p (fun _ => (11/10)*s) 2) + +lemma rowBare_strict_eq_base (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) + (p : Three → ℝ) (s : ℝ) (v : Three) : + rowBare A (heatWeights h u p (fun z => strictRate v z*s)) v = + rowBare A (heatWeights h u p (fun _ => (11/10)*s)) v := by + apply rowBare_congr + intro w hw i + simp [heatWeights,strictRate,hw] + +omit [Fintype ι] [DecidableEq ι] in +lemma heatWeights_strict_le_base {h s : ℝ} (hh : 0 < h) (hs : 0 < s) + (u : ι → ℝ) (p : Three → ℝ) (v w : Three) (i : ι) : + heatWeights h u p (fun z => strictRate v z*s) w i ≤ + Real.sqrt (11/10)*heatWeights h u p (fun _ => (11/10)*s) w i := by + have hr : 1 ≤ Real.sqrt (11/10) := by rw [Real.le_sqrt (by norm_num) (by norm_num)]; norm_num + by_cases hw : w=v + · subst w + simp only [heatWeights,strictRate,ite_true,one_mul,weight] + have hd := mul_le_mul_of_nonneg_left (density_le_lambda hs (u i-p v)) hh.le + simpa only [mul_left_comm] using hd + · simp only [heatWeights,strictRate,ite_eq_right hw] + exact le_mul_of_one_le_left (weight_pos hh (by positivity) _ _).le hr + +lemma strict_starGram_le_base (A : Three → Matrix ι ι ℂ) {h s : ℝ} + (hh : 0 < h) (hs : 0 < s) (u : ι → ℝ) (p : Three → ℝ) (v : Three) : + starGram (heatArray A h u p (fun z => strictRate v z*s)) v ≤ + Real.sqrt (11/10) • starGram (heatArray A h u p (fun _ => (11/10)*s)) v := by + have hb (w : Three) (i : ι) : 0 ≤ heatWeights h u p (fun _ => (11/10)*s) w i := + (weight_pos hh (by positivity) _ _).le + have ht (w : Three) (i : ι) : 0 ≤ heatWeights h u p (fun z => strictRate v z*s) w i := + (weight_pos hh (mul_pos (strictRate_pos v w) hs) _ _).le + unfold heatArray + rw [starGram_weightedArray _ _ ht,starGram_weightedArray _ _ hb, + rowBare_strict_eq_base,← weightedGram_smul] + exact weightedGram_mono _ _ _ (fun a => heatWeights_strict_le_base hh hs u p v a.1 a.2) + +lemma windowInsertion_eq_score (A : Three → Matrix ι ι ℂ) {h s : ℝ} + (hh : 0 < h) (hs : 0 < s) (u : ι → ℝ) (p : Three → ℝ) (v : Three) : + starInsert (heatArray A h u p (fun _ => (11/10)*s)) (windowDiags u p s) v = + Real.sqrt s • starInsert (heatArray A h u p (fun z => strictRate v z*s)) + (heatScores u p (fun z => strictRate v z*s)) v := by + have hb (w : Three) (i : ι) : 0 ≤ heatWeights h u p (fun _ => (11/10)*s) w i := + (weight_pos hh (by positivity) _ _).le + have ht (w : Three) (i : ι) : 0 ≤ heatWeights h u p (fun z => strictRate v z*s) w i := + (weight_pos hh (mul_pos (strictRate_pos v w) hs) _ _).le + unfold heatArray windowDiags heatScores + rw [← rowBare_insert _ _ _ hb,← rowBare_insert _ _ _ ht, + rowBare_strict_eq_base,← weightedGram_smul] + apply weightedGram_rowBare_congr + intro i + dsimp only + simp only [heatWeights,strictRate,ite_true,one_mul,weight] + have hn : density ((11/10)*s) (u i-p v) ≠ 0 := (density_pos (by positivity) _).ne' + unfold windowRatio + rw [oddWindow_score hs] + simp only [div_eq_mul_inv] + calc + _ = (Real.sqrt s*(h*density s (u i-p v)*score (u i) (p v) s))* + (density ((11/10)*s) (u i-p v)*(density ((11/10)*s) (u i-p v))⁻¹) := by ring_nf + _ = _ := by rw [mul_inv_cancel₀ hn]; ring + +lemma windowStarCost_le (A : Three → Matrix ι ι ℂ) {h s : ℝ} + (hh : 0 < h) (hs : 0 < s) (u : ι → ℝ) (p : Three → ℝ) (v : Three) : + hessianCost (starGram (heatArray A h u p (fun _ => (11/10)*s)) v) + (starInsert (heatArray A h u p (fun _ => (11/10)*s)) (windowDiags u p s) v) ≤ + 2*s*heatCost A h u p (fun z => strictRate v z*s) v v := by + have hσ : ∀ z, 0 < strictRate v z*s := fun z => mul_pos (strictRate_pos v z) hs + let P := starGram (heatArray A h u p (fun z => strictRate v z*s)) v + let K := starInsert (heatArray A h u p (fun z => strictRate v z*s)) + (heatScores u p (fun z => strictRate v z*s)) v + have hsol : ∃ Y, sylv (CFC.sqrt P) Y = K := sylv_solvable_inserted_gram _ _ + have hsol' : ∃ Y, sylv (CFC.sqrt P) Y = Real.sqrt s • K := by + obtain ⟨Y,hY⟩ := hsol + exact ⟨Real.sqrt s • Y,by rw [sylv_smul_right,hY]⟩ + have hc := hessianCost_le_of_le_smul + (Matrix.posSemidef_conjTranspose_mul_self (rowStar (heatArray A h u p (fun _ => (11/10)*s)) v)) + hsol' (by positivity : 0 < Real.sqrt (11/10)) (strict_starGram_le_base A hh hs u p v) + rw [windowInsertion_eq_score A hh hs,heatCost_center A hh u p hσ] + change hessianCost _ (Real.sqrt s • K) ≤ 2*s*hessianCost P K + rw [hessianCost_smul_direction hsol,Real.sq_sqrt hs.le] at hc + have hr : Real.sqrt (Real.sqrt (11/10)) ≤ 2 := by + rw [Real.sqrt_le_iff] + constructor + · norm_num + · rw [Real.sqrt_le_iff]; norm_num + have hn : 0 ≤ hessianCost P K := hessianCost_nonneg _ _ + exact hc.trans (by + calc + _ ≤ 2*(s*hessianCost P K) := mul_le_mul_of_nonneg_right hr (mul_nonneg hs.le hn) + _ = _ := by ring) + +lemma windowTrace_le (A : Three → Matrix ι ι ℂ) {h s : ℝ} + (hh : 0 < h) (hs : 0 < s) (u : ι → ℝ) (p : Three → ℝ) : + ‖windowTrace A h u p s‖ ≤ (440/3)*s*∑ v, + heatCost A h u p (fun z => strictRate v z*s) v v := by + have hD (v : Three) : (windowDiags u p s v).IsHermitian := by + unfold windowDiags Matrix.IsHermitian + rw [Matrix.diagonal_conjTranspose] + simp + have hd : ‖blockD (windowDiags u p s)‖ ≤ 44 := + norm_blockD_real_diagonal_le _ (by norm_num) (fun v i => abs_windowRatio_le hs _) + have hm := mixed_trace_le (heatArray A h u p (fun _ => (11/10)*s)) (windowDiags u p s) hD + have hi := Finset.sum_le_sum (fun v (_ : v ∈ (Finset.univ : Finset Three)) => + windowStarCost_le A hh hs u p v) + apply hm.trans + calc + _ ≤ (5/3:ℝ)*44*(∑ v, 2*s*heatCost A h u p (fun z => strictRate v z*s) v v) := by + gcongr + exact Finset.sum_nonneg (fun v _ => hessianCost_nonneg _ _) + _ = _ := by rw [← Finset.mul_sum]; ring + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SignedWindowScalar.lean b/lean/OAI/Analysis/TriangularHilbert/SignedWindowScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..395d527933ba07190642e59b7acd5294b4c8bf4a --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SignedWindowScalar.lean @@ -0,0 +1,91 @@ +import OAI.Analysis.TriangularHilbert.GaussianMoments + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +def oddWindow (s t : ℝ) : ℝ := t / Real.sqrt s * density s t + +def windowRatio (s t : ℝ) : ℝ := oddWindow s t / density ((11/10)*s) t + +lemma density_dilation {s q : ℝ} (hs : 0 < s) (hq : 0 < q) (t : ℝ) : + density (q*s) t = (Real.sqrt s)⁻¹ * density q (t/Real.sqrt s) := by + have hr : Real.sqrt s ≠ 0 := (Real.sqrt_pos.mpr hs).ne' + have hsq := Real.sq_sqrt hs.le + have he : -(t/Real.sqrt s)^2/(2*q) = -t^2/(2*(q*s)) := by + field_simp + nlinarith [hsq] + unfold density + rw [show 2*Real.pi*(q*s)=s*(2*Real.pi*q) by ring,Real.sqrt_mul hs.le,he] + simp only [mul_inv_rev] + ring + +lemma density_one_lambda (z : ℝ) : + density 1 z = Real.sqrt (11/10) * Real.exp (-z^2/22) * density (11/10) z := by + have hr : Real.sqrt (11/10) ≠ 0 := by positivity + have hp : Real.sqrt (2*Real.pi) ≠ 0 := by positivity + have hn : 2*Real.pi*(11/10) = (11/10)*(2*Real.pi) := by ring + unfold density + rw [hn,Real.sqrt_mul (by norm_num : (0:ℝ) ≤ 11/10)] + simp only [mul_one,mul_inv_rev] + have he : -z^2/22 + -z^2/(2*(11/10)) = -z^2/(2*1) := by ring + calc + _ = (Real.sqrt (2*Real.pi))⁻¹ * Real.exp (-z^2/22 + -z^2/(2*(11/10))) := by rw [he]; simp + _ = _ := by rw [Real.exp_add]; field_simp + +lemma density_lambda_relation {s : ℝ} (hs : 0 < s) (t : ℝ) : + density s t = Real.sqrt (11/10) * Real.exp (-(t/Real.sqrt s)^2/22) * density ((11/10)*s) t := by + have h1 := density_dilation hs (by norm_num : (0:ℝ)<1) t + rw [one_mul] at h1 + rw [h1,density_dilation hs (by norm_num : (0:ℝ)<11/10),density_one_lambda] + ring + +lemma density_le_lambda {s : ℝ} (hs : 0 < s) (t : ℝ) : + density s t ≤ Real.sqrt (11/10)*density ((11/10)*s) t := by + rw [density_lambda_relation hs t] + have he : Real.exp (-(t/Real.sqrt s)^2/22) ≤ 1 := Real.exp_le_one_iff.mpr (div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (sq_nonneg _)) (by norm_num)) + simpa only [mul_one] using mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left he (Real.sqrt_nonneg _)) (density_nonneg (by positivity) t) + +lemma windowRatio_eq {s : ℝ} (hs : 0 < s) (t : ℝ) : + windowRatio s t = Real.sqrt (11/10)*(t/Real.sqrt s)*Real.exp (-(t/Real.sqrt s)^2/22) := by + unfold windowRatio oddWindow + rw [density_lambda_relation hs t] + have hn : density ((11/10)*s) t ≠ 0 := (density_pos (by positivity) t).ne' + rw [← mul_assoc, mul_div_cancel_right₀ _ hn] + ring + +lemma abs_mul_exp_square_le (z : ℝ) : |z| *Real.exp (-z^2/22) ≤ 22 := by + have h := Real.add_one_le_exp (z^2/22) + have hp := Real.exp_pos (-z^2/22) + have ha : |z| ≤ 22*(z^2/22+1) := by nlinarith [sq_nonneg (|z|-1),sq_abs z] + have he : Real.exp (z^2/22) * Real.exp (-z^2/22) = 1 := by rw [← Real.exp_add,show z^2/22 + -z^2/22 = 0 by ring,Real.exp_zero] + have hb := mul_le_mul_of_nonneg_right h hp.le + rw [he] at hb + have hc := mul_le_mul_of_nonneg_right ha hp.le + nlinarith + +lemma abs_windowRatio_le {s : ℝ} (hs : 0 < s) (t : ℝ) : |windowRatio s t| ≤ 44 := by + rw [windowRatio_eq hs t,abs_mul,abs_mul,abs_of_nonneg (Real.sqrt_nonneg _),abs_of_pos (Real.exp_pos _)] + have h := abs_mul_exp_square_le (t/Real.sqrt s) + have hr : Real.sqrt (11/10) ≤ 2 := by rw [Real.sqrt_le_iff]; norm_num + have hn := Real.sqrt_nonneg (11/10) + nlinarith + +lemma oddWindow_score {s : ℝ} (hs : 0 < s) (u p : ℝ) : + oddWindow s (u-p) = Real.sqrt s*score u p s*density s (u-p) := by + have hr : Real.sqrt s ≠ 0 := (Real.sqrt_pos.mpr hs).ne' + have hsq := Real.sq_sqrt hs.le + unfold oddWindow score + congr 1 + field_simp + rw [hsq] + +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SmoothFormula.lean b/lean/OAI/Analysis/TriangularHilbert/SmoothFormula.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3693b87fb7faa10116b0f798eeb9a5a0769e024 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SmoothFormula.lean @@ -0,0 +1,70 @@ +import OAI.Analysis.TriangularHilbert.DiscretePairing + +namespace OAI + +section +namespace TriangularHilbert.Heat +open MeasureTheory +noncomputable section + +def scalePrimitive (s t : ℝ) : ℝ := + 2*(Real.sqrt s*((t^2/9)/s-1/3))*density (3*s) t/t + +lemma density_three_hasDerivAt {s : ℝ} (hs : 0 < s) (t : ℝ) : + HasDerivAt (fun s => density (3*s) t) + ((1/2)*((t/(3*s))^2-(3*s)⁻¹)*density (3*s) t*3) s := by + have hd := (weight_hasDerivAt_variance 1 t 0 (3*s) (by positivity)).comp s + ((hasDerivAt_id s).const_mul 3) + simpa only [weight,score,sub_zero,one_mul,mul_one,Function.comp_def] using hd + +lemma scalePrimitive_hasDerivAt {s t : ℝ} (hs : 0 < s) (ht : t ≠ 0) : + HasDerivAt (fun s => scalePrimitive s t) (signedKernel s t/s) s := by + have hr := Real.hasDerivAt_sqrt hs.ne' + have hq := ((hasDerivAt_const s (t^2/9)).div (hasDerivAt_id s) hs.ne').sub_const (1/3) + have hd := ((((hr.mul hq).const_mul 2).mul (density_three_hasDerivAt hs t)).div_const t) + convert! hd using 1 + unfold signedKernel + dsimp + field_simp + ring_nf + simp only [Real.sq_sqrt hs.le] + ring + +lemma smoothKernel_eq_primitive {a b t : ℝ} (ha : 0 < a) (hab : a ≤ b) (ht : t ≠ 0) : + (∫ s in a..b, signedKernel s t/s) = scalePrimitive b t-scalePrimitive a t := by + apply intervalIntegral.integral_eq_sub_of_hasDerivAt + · intro s hs + rw [Set.uIcc_of_le hab] at hs + exact scalePrimitive_hasDerivAt (ha.trans_le hs.1) ht + · exact signedKernel_intervalIntegrable ha hab t + +def kernelConstant : ℝ := -(2/3)*density 3 0 + +def kernelProfile (v : ℝ) : ℝ := kernelConstant-2*(v^2/9-1/3)*density 3 v + +lemma kernelConstant_ne_zero : kernelConstant ≠ 0 := by + unfold kernelConstant + exact mul_ne_zero (by norm_num) (density_pos (by norm_num) 0).ne' + +lemma scalePrimitive_profile {s t : ℝ} (hs : 0 < s) : + scalePrimitive s t = (kernelConstant-kernelProfile (t/Real.sqrt s))/t := by + have hd := density_dilation hs (by norm_num : 0 < (3:ℝ)) t + have he : density 3 (t/Real.sqrt s) = Real.sqrt s*density (3*s) t := by + rw [hd] + field_simp + unfold kernelProfile scalePrimitive + rw [he] + field_simp + rw [Real.sq_sqrt hs.le] + ring + +lemma smoothKernel_eq_profile {a b t : ℝ} (ha : 0 < a) (hab : a ≤ b) (ht : t ≠ 0) : + (∫ s in a..b, signedKernel s t/s) = + (kernelProfile (t/Real.sqrt a)-kernelProfile (t/Real.sqrt b))/t := by + rw [smoothKernel_eq_primitive ha hab ht,scalePrimitive_profile (ha.trans_le hab),scalePrimitive_profile ha] + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/SortedWindows.lean b/lean/OAI/Analysis/TriangularHilbert/SortedWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..93d5b34eda6bf77c570448e22b6e90de61fefaf5 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/SortedWindows.lean @@ -0,0 +1,71 @@ +import OAI.Analysis.TriangularHilbert.MaskedDissipation + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory +open scoped BigOperators +noncomputable section + +def sortedTimes (S : Finset ℝ) (hS : S.Nonempty) (k : ℕ) : ℝ := + S.orderEmbOfFin rfl ⟨min k (S.card-1),lt_of_le_of_lt (min_le_right _ _) (Nat.sub_lt (Finset.card_pos.mpr hS) (by omega))⟩ + +lemma sortedTimes_monotone (S : Finset ℝ) (hS : S.Nonempty) : Monotone (sortedTimes S hS) := by + intro k l hkl + apply (S.orderEmbOfFin rfl).monotone + exact min_le_min_right _ hkl + +lemma sortedTimes_mem (S : Finset ℝ) (hS : S.Nonempty) (k : ℕ) : sortedTimes S hS k ∈ S := + Finset.orderEmbOfFin_mem _ _ _ + +lemma sortedTimes_zero (S : Finset ℝ) (hS : S.Nonempty) : sortedTimes S hS 0 = S.min' hS := by + exact Finset.orderEmbOfFin_zero rfl (Finset.card_pos.mpr hS) + +lemma sortedTimes_last (S : Finset ℝ) (hS : S.Nonempty) : sortedTimes S hS (S.card-1) = S.max' hS := by + simp only [sortedTimes,min_self] + exact Finset.orderEmbOfFin_last rfl (Finset.card_pos.mpr hS) + +lemma sortedTimes_no_between (S : Finset ℝ) (hS : S.Nonempty) (k : ℕ) {e : ℝ} + (he : e ∈ S) : ¬ (sortedTimes S hS k < e ∧ e < sortedTimes S hS (k+1)) := by + have he' : e ∈ Set.range (S.orderEmbOfFin rfl) := by simpa using he + obtain ⟨j,rfl⟩ := he' + intro ⟨h1,h2⟩ + have h1' := (S.orderEmbOfFin rfl).lt_iff_lt.mp h1 + have h2' := (S.orderEmbOfFin rfl).lt_iff_lt.mp h2 + change min k (S.card-1) < j.val at h1' + change j.val < min (k+1) (S.card-1) at h2' + omega + +lemma sortedTimes_le_iff (S : Finset ℝ) (hS : S.Nonempty) (k : ℕ) {e s : ℝ} + (he : e ∈ S) (hs : s ∈ Set.Ico (sortedTimes S hS k) (sortedTimes S hS (k+1))) : + e ≤ s ↔ e ≤ sortedTimes S hS k := by + constructor + · intro hes + by_contra h + exact sortedTimes_no_between S hS k he ⟨lt_of_not_ge h,hes.trans_lt hs.2⟩ + · exact fun h => h.trans hs.1 + +lemma sortedTimes_mask_const (S : Finset ℝ) (hS : S.Nonempty) (k : ℕ) {a b s : ℝ} + (ha : a ∈ S) (hb : b ∈ S) + (hs : s ∈ Set.Ico (sortedTimes S hS k) (sortedTimes S hS (k+1))) (A : ℂ) : + windowMask a b s A = windowMask a b (sortedTimes S hS k) A := by + have h1 := sortedTimes_le_iff S hS k ha hs + have h2 := not_congr (sortedTimes_le_iff S hS k hb hs) + simp only [not_le] at h2 + simp only [windowMask,h1,h2] + +lemma intervalIntegrable_of_Ico_eq {f g : ℝ → ℝ} {a b : ℝ} (hab : a ≤ b) + (hg : IntervalIntegrable g volume a b) (he : ∀ s ∈ Set.Ico a b, f s=g s) : + IntervalIntegrable f volume a b := by + apply hg.congr_ae + rw [Set.uIoc_of_le hab] + apply (ae_restrict_iff' measurableSet_Ioc).2 + filter_upwards [volume.ae_ne b] with s hsb hs + exact (he s ⟨hs.1.le,lt_of_le_of_ne hs.2 hsb⟩).symm + +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/StarInsertion.lean b/lean/OAI/Analysis/TriangularHilbert/StarInsertion.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ac56e54bdc55a43157f834a68833a14873a285c --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/StarInsertion.lean @@ -0,0 +1,125 @@ +import OAI.Analysis.TriangularHilbert.HeatStar + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma hessianCost_zero_direction (P : Matrix ι ι ℂ) : hessianCost P 0 = 0 := by + unfold hessianCost + rw [rootCost_eq_of_solution (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) + (show sylv (CFC.sqrt P) 0 = 0 by simp [sylv])] + simp [hsReal] + +lemma hessianCost_singleBlock (P K : Matrix ι ι ℂ) (hP : P.PosSemidef) (v : Three) + (hsol : ∃ Y, sylv (CFC.sqrt P) Y = K) : + hessianCost (blockD (fun w => if w = v then P else 0)) + (blockD (fun w => if w = v then K else 0)) = hessianCost P K := by + rw [hessianCost_blockD _ _ (fun w => by split_ifs; exact hP; exact Matrix.PosSemidef.zero) + (fun w => by split_ifs; exact hsol; exact ⟨0, by simp [sylv]⟩)] + apply (Finset.sum_eq_single v _ _).trans + · simp only [ite_true] + · intro w _ hw + simp only [ite_eq_right hw, hessianCost_zero_direction] + · simp + +lemma rowStar_blockD_adjoint (W D : Three → Matrix ι ι ℂ) (v : Three) : + rowStar W v * blockD D * (rowStar W v)ᴴ = + blockD (fun a => if a = v then + ∑ w, triangleBlocks W v w * D w * (triangleBlocks W v w)ᴴ else 0) := by + rw [rowStar_blocks] + let R : Matrix Three Three (Matrix ι ι ℂ) := fun a b => if a = v then triangleBlocks W a b else 0 + change blocks R * blocks (Matrix.diagonal D) * (blocks R)ᴴ = _ + rw [← blocks_star, ← blocks_mul, ← blocks_mul] + unfold blockD + congr 1 + apply Matrix.ext + intro a b + rw [Matrix.mul_apply] + simp only [Matrix.mul_diagonal, Matrix.conjTranspose_apply, Matrix.star_eq_conjTranspose] + change (∑ c, R a c * D c * (R b c)ᴴ) = _ + dsimp only [R] + by_cases ha : a = v <;> by_cases hb : b = v + · subst a + subst b + simp only [ite_true, Matrix.diagonal_apply_eq] + · simp [ha, hb, Ne.symm hb] + · simp [ha, hb] + · simp only [ite_eq_right ha, zero_mul, Finset.sum_const_zero] + by_cases hab : a = b + · subst b + rw [Matrix.diagonal_apply_eq, ite_eq_right ha] + · rw [Matrix.diagonal_apply_ne _ hab] + +lemma rowStar_singleBlock_adjoint (W : Three → Matrix ι ι ℂ) (L : Matrix ι ι ℂ) + (v w : Three) : + rowStar W v * blockD (fun a => if a = w then L else 0) * (rowStar W v)ᴴ = + blockD (fun a => if a = v then triangleBlocks W v w * L * (triangleBlocks W v w)ᴴ else 0) := by + rw [rowStar_blockD_adjoint] + congr 1 + funext a + simp only [mul_ite, mul_zero, ite_mul, zero_mul, Finset.sum_ite_eq', Finset.mem_univ, ite_true] + +lemma hessianCost_rowStar_singleBlock (W : Three → Matrix ι ι ℂ) (L : Matrix ι ι ℂ) + (v w : Three) : + hessianCost (rowStar W v * (rowStar W v)ᴴ) + (rowStar W v * blockD (fun a => if a = w then L else 0) * (rowStar W v)ᴴ) = + hessianCost (centerGram W v) ((triangleBlocks W w v)ᴴ * L * triangleBlocks W w v) := by + rw [rowStar_mul_adjoint, rowStar_singleBlock_adjoint] + have hsol := sylv_solvable_mono + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg ((triangleBlocks W w v)ᴴ * triangleBlocks W w v))) + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (centerGram W v))).isHermitian + (sylv_solvable_inserted_gram (triangleBlocks W w v) L) + (CFC.sqrt_le_sqrt _ _ (edgeGram_le_centerGram W v w)) + rw [← triangleBlocks_adj W w v, Matrix.conjTranspose_conjTranspose] + exact hessianCost_singleBlock _ _ (centerGram_posSemidef W v) v hsol + +lemma vertexRoot_insert (g d : Three → ι → ℝ) (hg : ∀ v i, 0 ≤ g v i) : + vertexRoot g * blockD (fun v => Matrix.diagonal (fun i => (d v i : ℂ))) * vertexRoot g = + Matrix.diagonal (fun a => (g a.1 a.2 * d a.1 a.2 : ℂ)) := by + have hb : blockD (fun v => Matrix.diagonal (fun i => (d v i : ℂ))) = + Matrix.diagonal (fun a => (d a.1 a.2 : ℂ)) := by + ext ⟨v,i⟩ ⟨w,j⟩ + by_cases hv : v = w <;> by_cases hi : i = j <;> simp [blockD, blocks, Matrix.diagonal, hv, hi, Prod.mk.injEq] + rw [hb, vertexRoot, Matrix.diagonal_mul_diagonal, Matrix.diagonal_mul_diagonal] + congr 1 + funext ⟨v,i⟩ + rw [mul_comm (Real.sqrt _ : ℂ) (d v i), mul_assoc, ← Complex.ofReal_mul, + Real.mul_self_sqrt (hg v i)] + push_cast + ring + +lemma rowBare_insert (A : Three → Matrix ι ι ℂ) (g d : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) : + weightedGram (rowBare A g v) (fun a => g a.1 a.2 * d a.1 a.2) = + starInsert (weightedArray A g) (fun v => Matrix.diagonal (fun i => (d v i : ℂ))) v := by + unfold starInsert + rw [rowStar_weightedArray] + unfold weightedGram rowBare + simp only [Complex.ofReal_mul] + rw [← vertexRoot_insert g d hg] + simp only [Matrix.conjTranspose_mul, vertexRoot_star, Matrix.mul_assoc] + +lemma colBare_insert (A : Three → Matrix ι ι ℂ) (g d : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) : + weightedGram (colBare A g v) (fun a => g a.1 a.2 * d a.1 a.2) = + rowStar (weightedArray A g) v * + blockD (fun v => Matrix.diagonal (fun i => (d v i : ℂ))) * + (rowStar (weightedArray A g) v)ᴴ := by + rw [rowStar_weightedArray] + unfold weightedGram colBare + simp only [Complex.ofReal_mul] + rw [← vertexRoot_insert g d hg] + simp only [Matrix.conjTranspose_mul, vertexRoot_star, Matrix.conjTranspose_conjTranspose, Matrix.mul_assoc] + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/StarJump.lean b/lean/OAI/Analysis/TriangularHilbert/StarJump.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8b103a1944415ed85e916ca6edc583fc524c9bf --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/StarJump.lean @@ -0,0 +1,93 @@ +import OAI.Analysis.TriangularHilbert.ZeroStar + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [Fintype ι] [DecidableEq ι] in +lemma sqrt_weight_product_le {a b x y d : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) + (hx : 0 ≤ x) (hy : 0 ≤ y) (hd : 0 ≤ d) : + (Real.sqrt a*Real.sqrt x)*(Real.sqrt b*Real.sqrt y)*(Real.sqrt a*d*Real.sqrt b) ≤ d*a*b*(x+y)/2 := by + have hxy : Real.sqrt x*Real.sqrt y ≤ (x+y)/2 := by + nlinarith [Real.sq_sqrt hx,Real.sq_sqrt hy,sq_nonneg (Real.sqrt x-Real.sqrt y)] + calc + _ = (Real.sqrt a*Real.sqrt a)*(Real.sqrt b*Real.sqrt b)*d*(Real.sqrt x*Real.sqrt y) := by ring + _ = d*a*b*(Real.sqrt x*Real.sqrt y) := by rw [Real.mul_self_sqrt ha,Real.mul_self_sqrt hb]; ring + _ ≤ d*a*b*((x+y)/2) := mul_le_mul_of_nonneg_left hxy (by positivity) + _ = _ := by ring + +def jumpSlicing (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (i j : ι) : ℝ := + 2*(∑ m, ‖A 0 i m‖^2*g 1 m)+2*(∑ m, ‖A 0 m j‖^2*g 0 m)+ + (∑ m, ‖A 2 m i‖^2*g 2 m)+(∑ m, ‖A 1 j m‖^2*g 2 m) + +lemma energy_replaceZero_jump_zero (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (hC : ∀ i j, ‖C i j‖ ≤ ‖A 0 i j‖) + (g : Three → ι → ℝ) (hg : ∀ v i, 0 ≤ g v i) : + |energy (starGram (weightedArray (replaceZero A B) g) 0)-energy (starGram (weightedArray (replaceZero A C) g) 0)| ≤ + 3/2 * ∑ i, ∑ j, ‖B i j-C i j‖*g 0 i*g 1 j* + ((∑ m, ‖A 0 i m‖^2*g 1 m)+(∑ m, ‖A 2 m i‖^2*g 2 m)+(∑ m, ‖A 0 m j‖^2*g 0 m)) := by + have hj := energy_jump_le (rowStar (weightedArray (replaceZero A C) g) 0) + (rowStar (weightedArray (replaceZero A B) g) 0) (rowStar (weightedArray A g) 0) + (weightedStar_replaceZero_norm_le A C hC g 0) (weightedStar_replaceZero_norm_le A B hB g 0) + rw [← rowStar_sub,← weightedArray_sub,replaceZero_sub,weightedArray_replaceZero_zero,jump_sum_zero (weightedArray A g) (fun i j => (Real.sqrt (g 0 i):ℂ)*(B-C) i j*(Real.sqrt (g 1 j):ℂ))] at hj + apply hj.trans + rw [Finset.mul_sum,Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + rw [Finset.mul_sum,Finset.mul_sum] + apply Finset.sum_le_sum + intro j _ + rw [rowNorm_weightedStar_zero A g hg,colNorm_weightedStar_zero_one A g hg] + have hnorm : ‖(Real.sqrt (g 0 i):ℂ)*(B-C) i j*(Real.sqrt (g 1 j):ℂ)‖ = + Real.sqrt (g 0 i)*‖B i j-C i j‖*Real.sqrt (g 1 j) := by + simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _),Matrix.sub_apply] + rw [hnorm] + have h := sqrt_weight_product_le + (x := (∑ m, ‖A 0 i m‖^2*g 1 m)+(∑ m, ‖A 2 m i‖^2*g 2 m)) + (y := ∑ m, ‖A 0 m j‖^2*g 0 m) (hg 0 i) (hg 1 j) + (add_nonneg (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 1 m))) + (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 2 m)))) + (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 0 m))) (norm_nonneg (B i j-C i j)) + linarith + +lemma energy_replaceZero_jump_one (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (hC : ∀ i j, ‖C i j‖ ≤ ‖A 0 i j‖) + (g : Three → ι → ℝ) (hg : ∀ v i, 0 ≤ g v i) : + |energy (starGram (weightedArray (replaceZero A B) g) 1)-energy (starGram (weightedArray (replaceZero A C) g) 1)| ≤ + 3/2 * ∑ i, ∑ j, ‖B i j-C i j‖*g 0 i*g 1 j* + ((∑ m, ‖A 0 m j‖^2*g 0 m)+(∑ m, ‖A 1 j m‖^2*g 2 m)+(∑ m, ‖A 0 i m‖^2*g 1 m)) := by + have hj := energy_jump_le (rowStar (weightedArray (replaceZero A C) g) 1) + (rowStar (weightedArray (replaceZero A B) g) 1) (rowStar (weightedArray A g) 1) + (weightedStar_replaceZero_norm_le A C hC g 1) (weightedStar_replaceZero_norm_le A B hB g 1) + rw [← rowStar_sub,← weightedArray_sub,replaceZero_sub,weightedArray_replaceZero_zero,jump_sum_one (weightedArray A g) (fun i j => (Real.sqrt (g 0 i):ℂ)*(B-C) i j*(Real.sqrt (g 1 j):ℂ))] at hj + apply hj.trans + rw [Finset.mul_sum,Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + rw [Finset.mul_sum,Finset.mul_sum] + apply Finset.sum_le_sum + intro j _ + rw [rowNorm_weightedStar_one A g hg,colNorm_weightedStar_one_zero A g hg] + have hnorm : ‖(Real.sqrt (g 0 i):ℂ)*(B-C) i j*(Real.sqrt (g 1 j):ℂ)‖ = + Real.sqrt (g 1 j)*‖B i j-C i j‖*Real.sqrt (g 0 i) := by + simp only [norm_mul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _),Matrix.sub_apply] + ring + rw [hnorm] + have h := sqrt_weight_product_le + (x := (∑ m, ‖A 0 m j‖^2*g 0 m)+(∑ m, ‖A 1 j m‖^2*g 2 m)) + (y := ∑ m, ‖A 0 i m‖^2*g 1 m) (hg 1 j) (hg 0 i) + (add_nonneg (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 0 m))) + (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 2 m)))) + (Finset.sum_nonneg (fun m _ => mul_nonneg (sq_nonneg _) (hg 1 m))) (norm_nonneg (B i j-C i j)) + nlinarith +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/StarNorm.lean b/lean/OAI/Analysis/TriangularHilbert/StarNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ced7578a875d727f9163592566d8f83279233a2 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/StarNorm.lean @@ -0,0 +1,108 @@ +import OAI.Analysis.TriangularHilbert.RankJump + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma rowNorm_rowStar (A : Three → Matrix ι ι ℂ) (v : Three) (i : ι) : + rowNorm (rowStar A v) (v,i) = Real.sqrt (∑ w, ∑ j, ‖triangleBlocks A v w i j‖^2) := by + simp only [rowNorm,Fintype.sum_prod_type,rowStar_apply,ite_true] + +lemma colNorm_rowStar (A : Three → Matrix ι ι ℂ) (v w : Three) (j : ι) : + colNorm (rowStar A v) (w,j) = Real.sqrt (∑ i, ‖triangleBlocks A v w i j‖^2) := by + unfold colNorm + simp only [Fintype.sum_prod_type,rowStar_apply] + congr 1 + have he (a : Three) : (∑ i, ‖if a = v then triangleBlocks A a w i j else 0‖^2) = + if a = v then (∑ i, ‖triangleBlocks A a w i j‖^2) else 0 := by + split_ifs <;> simp + simp_rw [he] + simp + +lemma rowStar_norm_mono {A B : Three → Matrix ι ι ℂ} + (h : ∀ v i j, ‖A v i j‖ ≤ ‖B v i j‖) (v : Three) (a b : BlockSpace ι) : + ‖rowStar A v a b‖ ≤ ‖rowStar B v a b‖ := by + simp only [rowStar_apply] + by_cases hv : a.1 = v + · simp only [ite_eq_left hv] + unfold triangleBlocks + split_ifs <;> first | exact le_rfl | exact h _ _ _ | simpa only [Matrix.conjTranspose_apply,norm_star] using h _ _ _ + · simp [hv] + +omit [Fintype ι] [DecidableEq ι] in +lemma weightedArray_norm (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v : Three) (i j : ι) : + ‖weightedArray A g v i j‖ = Real.sqrt (g v i)*‖A v i j‖*Real.sqrt (g (v+1) j) := by + simp only [weightedArray,norm_mul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (Real.sqrt_nonneg _)] + +omit [Fintype ι] [DecidableEq ι] in +lemma weightedArray_norm_sq (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) (i j : ι) : + ‖weightedArray A g v i j‖^2 = g v i*‖A v i j‖^2*g (v+1) j := by + rw [weightedArray_norm,mul_pow,mul_pow,Real.sq_sqrt (hg v i),Real.sq_sqrt (hg (v+1) j)] + +lemma rowNorm_weightedStar_zero (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (i : ι) : + rowNorm (rowStar (weightedArray A g) 0) (0,i) = + Real.sqrt (g 0 i) * Real.sqrt ((∑ j, ‖A 0 i j‖^2*g 1 j)+(∑ j, ‖A 2 j i‖^2*g 2 j)) := by + rw [rowNorm_rowStar,Fin.sum_univ_three] + simp only [triangleBlocks,show (0:Three) ≠ 1 by decide,show (1:Three) ≠ 0 by decide,show (2:Three) ≠ 0 by decide,show (2:Three) ≠ 1 by decide,ite_true,ite_false,Matrix.zero_apply,Matrix.conjTranspose_apply,norm_star,norm_zero,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero,zero_add] + simp_rw [weightedArray_norm_sq A g hg] + simp only [show (0:Three)+1=1 by decide,show (2:Three)+1=0 by decide] + have he : (∑ j, g 0 i*‖A 0 i j‖^2*g 1 j)+(∑ j, g 2 j*‖A 2 j i‖^2*g 0 i) = + g 0 i*((∑ j, ‖A 0 i j‖^2*g 1 j)+(∑ j, ‖A 2 j i‖^2*g 2 j)) := by + simp only [mul_add,Finset.mul_sum] + congr 1 <;> apply Finset.sum_congr rfl <;> intro j _ <;> ring + rw [he,Real.sqrt_mul (hg 0 i)] + +lemma colNorm_weightedStar_zero_one (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (j : ι) : + colNorm (rowStar (weightedArray A g) 0) (1,j) = + Real.sqrt (g 1 j) * Real.sqrt (∑ i, ‖A 0 i j‖^2*g 0 i) := by + rw [colNorm_rowStar] + simp only [triangleBlocks,show (0:Three) ≠ 1 by decide,show (1:Three) ≠ 0 by decide,ite_true,ite_false] + simp_rw [weightedArray_norm_sq A g hg] + rw [show (0:Three)+1=1 by decide] + have he : (∑ i, g 0 i*‖A 0 i j‖^2*g 1 j) = g 1 j*(∑ i, ‖A 0 i j‖^2*g 0 i) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + ring + rw [he,Real.sqrt_mul (hg 1 j)] + +lemma rowNorm_weightedStar_one (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (j : ι) : + rowNorm (rowStar (weightedArray A g) 1) (1,j) = + Real.sqrt (g 1 j) * Real.sqrt ((∑ i, ‖A 0 i j‖^2*g 0 i)+(∑ i, ‖A 1 j i‖^2*g 2 i)) := by + rw [rowNorm_rowStar,Fin.sum_univ_three] + simp only [triangleBlocks,show (1:Three) ≠ 0 by decide,show (2:Three) ≠ 0 by decide,show (2:Three) ≠ 1 by decide,ite_true,ite_false,Matrix.zero_apply,Matrix.conjTranspose_apply,norm_star,norm_zero,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero,add_zero] + simp_rw [weightedArray_norm_sq A g hg] + simp only [show (0:Three)+1=1 by decide,show (1:Three)+1=2 by decide] + have he : (∑ i, g 0 i*‖A 0 i j‖^2*g 1 j)+(∑ i, g 1 j*‖A 1 j i‖^2*g 2 i) = + g 1 j*((∑ i, ‖A 0 i j‖^2*g 0 i)+(∑ i, ‖A 1 j i‖^2*g 2 i)) := by + simp only [mul_add,Finset.mul_sum] + congr 1 <;> apply Finset.sum_congr rfl <;> intro i _ <;> ring + rw [he,Real.sqrt_mul (hg 1 j)] + +lemma colNorm_weightedStar_one_zero (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (i : ι) : + colNorm (rowStar (weightedArray A g) 1) (0,i) = + Real.sqrt (g 0 i) * Real.sqrt (∑ j, ‖A 0 i j‖^2*g 1 j) := by + rw [colNorm_rowStar] + simp only [triangleBlocks,show (1:Three) ≠ 0 by decide,ite_true,ite_false,Matrix.conjTranspose_apply,norm_star] + simp_rw [weightedArray_norm_sq A g hg] + rw [show (0:Three)+1=1 by decide] + have he : (∑ j, g 0 i*‖A 0 i j‖^2*g 1 j) = g 0 i*(∑ j, ‖A 0 i j‖^2*g 1 j) := by + simp only [Finset.mul_sum,mul_assoc] + rw [he,Real.sqrt_mul (hg 0 i)] + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/StrongLayer.lean b/lean/OAI/Analysis/TriangularHilbert/StrongLayer.lean new file mode 100644 index 0000000000000000000000000000000000000000..72813c6a4bd2aad6b2607e4eb16db3d174f82d2c --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/StrongLayer.lean @@ -0,0 +1,49 @@ +import OAI.Analysis.TriangularHilbert.IntWeak + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory +open scoped BigOperators +noncomputable section + +def squareLayer (a t : ℝ) : ℝ := (Set.Ioo 0 (Real.sqrt a)).indicator (fun t => t^2) t + +def oneLayer (a t : ℝ) : ℝ := (Set.Ioo 0 (Real.sqrt a)).indicator (fun _ => (1:ℝ)) t + +lemma squareLayer_integrable (a : ℝ) : Integrable (squareLayer a) := by + have h : IntegrableOn (fun t : ℝ => t^2) (Set.Icc 0 (Real.sqrt a)) volume := + (continuous_id.pow 2).integrableOn_Icc + exact (integrable_indicator_iff measurableSet_Ioo).mpr (h.mono_set Set.Ioo_subset_Icc_self) + +lemma oneLayer_integrable (a : ℝ) : Integrable (oneLayer a) := by + have h : IntegrableOn (fun _ : ℝ => (1:ℝ)) (Set.Ioo 0 (Real.sqrt a)) volume := + integrableOn_const measure_Ioo_lt_top.ne + exact (integrable_indicator_iff measurableSet_Ioo).mpr h + +lemma integral_squareLayer {a : ℝ} (ha : 0 ≤ a) : + (∫ t, squareLayer a t) = a * Real.sqrt a / 3 := by + simp only [squareLayer] + rw [integral_indicator measurableSet_Ioo] + rw [← integral_Icc_eq_integral_Ioo,integral_Icc_eq_integral_Ioc,← intervalIntegral.integral_of_le (Real.sqrt_nonneg a)] + rw [integral_pow] + have he : (Real.sqrt a)^3 = a*Real.sqrt a := by + rw [pow_succ,Real.sq_sqrt ha] + norm_num [he] + +lemma integral_oneLayer (a : ℝ) : (∫ t, oneLayer a t) = Real.sqrt a := by + simp only [oneLayer] + rw [integral_indicator measurableSet_Ioo,← integral_Icc_eq_integral_Ioo,integral_Icc_eq_integral_Ioc, + ← intervalIntegral.integral_of_le (Real.sqrt_nonneg a),intervalIntegral.integral_const] + simp + +lemma layer_iff {a t : ℝ} (ht : 0 < t) : + t ∈ Set.Ioo 0 (Real.sqrt a) ↔ t^2 < a := by + exact and_iff_right ht |>.trans (Real.lt_sqrt (by positivity)) + +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Support.lean b/lean/OAI/Analysis/TriangularHilbert/Support.lean new file mode 100644 index 0000000000000000000000000000000000000000..569417c9e43f5b52e7afb5d8013677547dee8ec7 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Support.lean @@ -0,0 +1,240 @@ +import OAI.Analysis.TriangularHilbert.MatrixSupport + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators Topology +open Filter Unitary +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma sqrt_mul_eq_zero_of_mul_eq_zero {P Q : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hPQ : P * Q = 0) : CFC.sqrt P * Q = 0 := by + apply (CStarRing.star_mul_self_eq_zero_iff _).mp + have hs := (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).isHermitian + change (CFC.sqrt P * Q)ᴴ * (CFC.sqrt P * Q) = 0 + rw [Matrix.conjTranspose_mul, hs.eq, ← Matrix.mul_assoc, + Matrix.mul_assoc Qᴴ, CFC.sqrt_mul_sqrt_self P hP.nonneg, + Matrix.mul_assoc, hPQ, mul_zero] + +lemma mul_sqrt_eq_zero_of_mul_eq_zero {P Q : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQP : Q * P = 0) : Q * CFC.sqrt P = 0 := by + have ht : P * Qᴴ = 0 := by + simpa only [Matrix.conjTranspose_mul, hP.isHermitian.eq, + Matrix.conjTranspose_zero] using congrArg Matrix.conjTranspose hQP + have hz := sqrt_mul_eq_zero_of_mul_eq_zero hP ht + have hs := (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)).isHermitian + simpa only [Matrix.conjTranspose_mul, hs.eq, Matrix.conjTranspose_conjTranspose, + Matrix.conjTranspose_zero] using congrArg Matrix.conjTranspose hz + +lemma sqrt_add_projection {P Q : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) : + CFC.sqrt (P + Q) = CFC.sqrt P + Q := by + apply CFC.sqrt_unique + · have hsQ := sqrt_mul_eq_zero_of_mul_eq_zero hP hPQ + have hQs := mul_sqrt_eq_zero_of_mul_eq_zero hP hQP + simp only [add_mul, mul_add, hsQ, hQs, hQQ, + CFC.sqrt_mul_sqrt_self P hP.nonneg, add_zero, zero_add] + · exact add_nonneg (CFC.sqrt_nonneg P) hQ.nonneg + +lemma energy_add_projection {P Q : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) : + energy (P + Q) = energy P + traceReal Q := by + rw [energy, sqrt_add_projection hP hQ hQQ hPQ hQP] + simp only [add_mul, mul_add, hPQ, mul_sqrt_eq_zero_of_mul_eq_zero hP hQP, + hQQ, add_zero, zero_add, traceReal_add, energy] + +lemma energyGradient_add_projection {P Q K : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) (hQK : Q * K = 0) : + energyGradient (P + Q) K = energyGradient P K := by + simp only [energyGradient_apply, sqrt_add_projection hP hQ hQQ hPQ hQP, + add_mul, hQK, add_zero] + +lemma hessianCost_add_projection {P Q K : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) (hKQ : K * Q = 0) (hQK : Q * K = 0) + (hPD : (P + Q).PosDef) : hessianCost (P + Q) K = hessianCost P K := by + let A := CFC.sqrt P + let E := 1 - Q + let Y := sqrtInverse hPD K + let Z := E * Y * E + have hAQ : A * Q = 0 := sqrt_mul_eq_zero_of_mul_eq_zero hP hPQ + have hQA : Q * A = 0 := mul_sqrt_eq_zero_of_mul_eq_zero hP hQP + have hQE : Q * E = 0 := by simp [E, mul_sub, hQQ] + have hEQ : E * Q = 0 := by simp [E, sub_mul, hQQ] + have hAE : A * E = A := by simp [E, mul_sub, hAQ] + have hEA : E * A = A := by simp [E, sub_mul, hQA] + have hKE : K * E = K := by simp [E, mul_sub, hKQ] + have hEK : E * K = K := by simp [E, sub_mul, hQK] + have hY : sylv (A + Q) Y = K := by + simpa only [sqrt_add_projection hP hQ hQQ hPQ hQP] using sqrtInverse_solves hPD K + have hZ : sylv A Z = K := by + have hm := congrArg (fun B => E * B * E) hY + simp only [sylv, add_mul, mul_add, Matrix.mul_assoc] at hm ⊢ + simp only [← Matrix.mul_assoc E A, hEA, ← Matrix.mul_assoc E Q, hEQ, + zero_mul, add_zero, hQE, mul_zero, + hEK, hKE] at hm + simpa only [Z, Matrix.mul_assoc, ← Matrix.mul_assoc A E, hAE, + ← Matrix.mul_assoc E A, hEA] using hm + have hQZ : Q * Z = 0 := by simp only [Z, ← Matrix.mul_assoc, hQE, zero_mul] + have hZQ : Z * Q = 0 := by simp only [Z, Matrix.mul_assoc, hEQ, mul_zero] + have hZ' : sylv (CFC.sqrt (P + Q)) Z = K := by + rw [sqrt_add_projection hP hQ hQQ hPQ hQP] + change sylv (A + Q) Z = K + simpa [sylv, add_mul, mul_add, hQZ, hZQ] using hZ + exact (rootCost_eq_of_solution + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg (P + Q))) hZ').trans + (rootCost_eq_of_solution (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) hZ).symm + +lemma exists_kernel_projection {P : Matrix ι ι ℂ} (hP : P.PosSemidef) : + ∃ Q : Matrix ι ι ℂ, Q.PosSemidef ∧ Q * Q = Q ∧ P * Q = 0 ∧ Q * P = 0 ∧ + (P + Q).PosDef := by + let ev := hP.isHermitian.eigenvalues + let U := hP.isHermitian.eigenvectorUnitary + let f := conjStarAlgAut ℂ (Matrix ι ι ℂ) U + let D : Matrix ι ι ℂ := Matrix.diagonal (fun i => (ev i : ℂ)) + let q : Matrix ι ι ℂ := Matrix.diagonal (fun i => if ev i = 0 then 1 else 0) + let Q := f q + have hD : f D = P := hP.isHermitian.spectral_theorem.symm + have hq : q.PosSemidef := by + apply Matrix.PosSemidef.diagonal + intro i + change 0 ≤ (if ev i = 0 then (1 : ℂ) else 0) + split_ifs <;> simp + have hQ : Q.PosSemidef := by + simpa only [Q, f, conjStarAlgAut_apply, Matrix.star_eq_conjTranspose] using + hq.mul_mul_conjTranspose_same (U : Matrix ι ι ℂ) + have hqq : q * q = q := by + simp only [q, Matrix.diagonal_mul_diagonal] + congr 1 + ext i + split_ifs <;> simp + have hQQ : Q * Q = Q := by exact (map_mul f q q).symm.trans (congrArg f hqq) + have hDq : D * q = 0 := by + simp only [D, q, Matrix.diagonal_mul_diagonal] + rw [← Matrix.diagonal_zero] + congr 1 + ext i + split_ifs with hi <;> simp [hi] + have hPQ : P * Q = 0 := by + rw [← hD] + change f D * f q = 0 + rw [← map_mul, hDq, map_zero] + have hQP : Q * P = 0 := by + simpa only [Matrix.conjTranspose_mul, hQ.isHermitian.eq, hP.isHermitian.eq, + Matrix.conjTranspose_zero] using congrArg Matrix.conjTranspose hPQ + have hpos : (D + q).PosDef := by + simp only [D, q, Matrix.diagonal_add] + apply Matrix.PosDef.diagonal + intro i + change 0 < (ev i : ℂ) + (if ev i = 0 then 1 else 0) + by_cases hi : ev i = 0 + · simp [hi] + · simp only [hi, ite_false, add_zero] + exact_mod_cast lt_of_le_of_ne (hP.eigenvalues_nonneg i) (Ne.symm hi) + have hu : IsUnit (P + Q) := by + have hh := hpos.isUnit.map f.toMonoidHom + change IsUnit (f (D + q)) at hh + simpa only [map_add, hD] using hh + exact ⟨Q, hQ, hQQ, hPQ, hQP, (hP.add hQ).posDef_iff_isUnit.mpr hu⟩ + +lemma deriv_mul_projection_eq_zero {P : ℝ → Matrix ι ι ℂ} {U Q : Matrix ι ι ℂ} + {x : ℝ} (hd : HasDerivAt P U x) (hz : ∀ᶠ t in 𝓝 x, P t * Q = 0) : U * Q = 0 := by + have hh := hd.mul_const Q + have he : HasDerivAt (fun _ : ℝ => (0 : Matrix ι ι ℂ)) (U * Q) x := + hh.congr_of_eventuallyEq (hz.mono fun _ ht => ht.symm) + exact he.unique (hasDerivAt_const x 0) + +lemma projection_mul_deriv_eq_zero {P : ℝ → Matrix ι ι ℂ} {U Q : Matrix ι ι ℂ} + {x : ℝ} (hd : HasDerivAt P U x) (hz : ∀ᶠ t in 𝓝 x, Q * P t = 0) : Q * U = 0 := by + have hh := hd.const_mul Q + have he : HasDerivAt (fun _ : ℝ => (0 : Matrix ι ι ℂ)) (Q * U) x := + hh.congr_of_eventuallyEq (hz.mono fun _ ht => ht.symm) + exact he.unique (hasDerivAt_const x 0) + +omit [DecidableEq ι] in +lemma hermitian_mul_zero_flip {P Q : Matrix ι ι ℂ} + (hP : P.IsHermitian) (hQ : Q.IsHermitian) (h : P * Q = 0) : Q * P = 0 := by + simpa only [Matrix.conjTranspose_mul, hP.eq, hQ.eq, Matrix.conjTranspose_zero] using + congrArg Matrix.conjTranspose h + +noncomputable def hessianPair (P K L : Matrix ι ι ℂ) : ℝ := + (hessianCost P (K + L) - hessianCost P (K - L)) / 4 + +lemma hessianPair_eq_PD {P : Matrix ι ι ℂ} (hP : P.PosDef) + (K L : Matrix ι ι ℂ) : hessianPair P K L = hessianPairPD hP K L := by + have hs := hessianPairPD_symm hP K L + unfold hessianPair + rw [← hessianPairPD_self hP, ← hessianPairPD_self hP] + simp only [hessianPairPD, map_add, map_sub, hsReal_add_left, hsReal_add_right, + hsReal_sub_left, hsReal_sub_right] at hs ⊢ + linarith + +lemma hessianPair_add_projection {P Q K L : Matrix ι ι ℂ} + (hP : P.PosSemidef) (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) + (hPQ : P * Q = 0) (hQP : Q * P = 0) + (hKQ : K * Q = 0) (hQK : Q * K = 0) (hLQ : L * Q = 0) (hQL : Q * L = 0) + (hPD : (P + Q).PosDef) : hessianPair (P + Q) K L = hessianPair P K L := by + unfold hessianPair + rw [hessianCost_add_projection hP hQ hQQ hPQ hQP + (by simp [add_mul, hKQ, hLQ]) (by simp [mul_add, hQK, hQL]) hPD, + hessianCost_add_projection hP hQ hQQ hPQ hQP + (by simp [sub_mul, hKQ, hLQ]) (by simp [mul_sub, hQK, hQL]) hPD] + +theorem energy_supported_path_hasDerivAt {P : ℝ → Matrix ι ι ℂ} + {Q U : Matrix ι ι ℂ} {x : ℝ} + (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) (hPD : (P x + Q).PosDef) + (hn : ∀ᶠ t in 𝓝 x, (P t).PosSemidef) (hz : ∀ᶠ t in 𝓝 x, P t * Q = 0) + (hd : HasDerivAt P U x) : + HasDerivAt (fun t => energy (P t)) (energyGradient (P x) U) x := by + have hzl : ∀ᶠ t in 𝓝 x, Q * P t = 0 := by + filter_upwards [hn, hz] with t ht htz + exact hermitian_mul_zero_flip ht.isHermitian hQ.isHermitian htz + have hQU := projection_mul_deriv_eq_zero hd hzl + have hnonneg : ∀ᶠ t in 𝓝 x, 0 ≤ P t + Q := hn.mono fun _ ht => (ht.add hQ).nonneg + have hh := (energy_path_hasDerivAt hPD hnonneg (hd.add_const Q)).sub_const (traceReal Q) + rw [energyGradient_add_projection hn.self_of_nhds hQ hQQ hz.self_of_nhds + hzl.self_of_nhds hQU] at hh + apply hh.congr_of_eventuallyEq + filter_upwards [hn, hz, hzl] with t ht hr hl + rw [energy_add_projection ht hQ hQQ hr hl] + ring + +theorem energyGradient_supported_path_hasDerivAt {P K : ℝ → Matrix ι ι ℂ} + {Q U V : Matrix ι ι ℂ} {x : ℝ} + (hQ : Q.PosSemidef) (hQQ : Q * Q = Q) (hPD : (P x + Q).PosDef) + (hn : ∀ᶠ t in 𝓝 x, (P t).PosSemidef) (hz : ∀ᶠ t in 𝓝 x, P t * Q = 0) + (hK : ∀ᶠ t in 𝓝 x, (K t).IsHermitian) (hkz : ∀ᶠ t in 𝓝 x, K t * Q = 0) + (hdP : HasDerivAt P U x) (hdK : HasDerivAt K V x) : + HasDerivAt (fun t => energyGradient (P t) (K t)) + (hessianPair (P x) (K x) U + energyGradient (P x) V) x := by + have hzl : ∀ᶠ t in 𝓝 x, Q * P t = 0 := by + filter_upwards [hn, hz] with t ht htz + exact hermitian_mul_zero_flip ht.isHermitian hQ.isHermitian htz + have hkzl : ∀ᶠ t in 𝓝 x, Q * K t = 0 := by + filter_upwards [hK, hkz] with t ht htz + exact hermitian_mul_zero_flip ht hQ.isHermitian htz + have hUQ := deriv_mul_projection_eq_zero hdP hz + have hQU := projection_mul_deriv_eq_zero hdP hzl + have hQV := projection_mul_deriv_eq_zero hdK hkzl + have hnonneg : ∀ᶠ t in 𝓝 x, 0 ≤ P t + Q := hn.mono fun _ ht => (ht.add hQ).nonneg + have hh := energyGradient_path_hasDerivAt hPD hnonneg hK.self_of_nhds + (hdP.add_const Q) hdK + rw [← hessianPair_eq_PD, hessianPair_add_projection hn.self_of_nhds hQ hQQ + hz.self_of_nhds hzl.self_of_nhds hkz.self_of_nhds hkzl.self_of_nhds hUQ hQU hPD, + energyGradient_add_projection hn.self_of_nhds hQ hQQ hz.self_of_nhds + hzl.self_of_nhds hQV] at hh + apply hh.congr_of_eventuallyEq + filter_upwards [hn, hz, hzl, hkzl] with t ht hr hl hkl + exact (energyGradient_add_projection ht hQ hQQ hr hl hkl).symm + +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/Switch.lean b/lean/OAI/Analysis/TriangularHilbert/Switch.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b2d7ba9e795129f0ced027b2f04fb1aa68085bf --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/Switch.lean @@ -0,0 +1,67 @@ +import OAI.Analysis.TriangularHilbert.IntegratedDissipation + +namespace OAI + +section +namespace TriangularHilbert +open scoped BigOperators +noncomputable section + +lemma telescope_with_jumps (E : ℕ → ℕ → ℝ) (n : ℕ) (hn : 0 ≤ E n n) : + (∑ k ∈ Finset.range n, (E k k-E k (k+1))) ≤ E 0 0+ + ∑ k ∈ Finset.range n, |E (k+1) (k+1)-E k (k+1)| := by + have he : (∑ k ∈ Finset.range n, (E k k-E k (k+1))) = E 0 0-E n n+ + ∑ k ∈ Finset.range n, (E (k+1) (k+1)-E k (k+1)) := by + clear hn + induction n with + | zero => simp + | succ n ih => rw [Finset.sum_range_succ,Finset.sum_range_succ,ih]; ring + rw [he] + have hi := Finset.sum_le_sum (fun k (_ : k ∈ Finset.range n) => + le_abs_self (E (k+1) (k+1)-E k (k+1))) + linarith + +def opening (a s : ℝ) (A : ℂ) : ℂ := if a ≤ s then A else 0 + +def windowMask (a b s : ℝ) (A : ℂ) : ℂ := if a ≤ s ∧ s < b then A else 0 + +lemma windowMask_eq_sub (a b s : ℝ) (hab : a ≤ b) (A : ℂ) : + windowMask a b s A = opening a s A-opening b s A := by + unfold windowMask opening + split_ifs <;> simp_all <;> linarith + +lemma windowMask_norm_le (a b s : ℝ) (A : ℂ) : ‖windowMask a b s A‖ ≤ ‖A‖ := by + unfold windowMask + split_ifs <;> simp + +lemma sum_opening_variation (t : ℕ → ℝ) (ht : Monotone t) (a : ℝ) (A : ℂ) (n : ℕ) : + (∑ k ∈ Finset.range n, ‖opening a (t (k+1)) A-opening a (t k) A‖) = + (if a ≤ t n then ‖A‖ else 0)-(if a ≤ t 0 then ‖A‖ else 0) := by + induction n with + | zero => simp + | succ n ih => + rw [Finset.sum_range_succ,ih] + have hh := ht (Nat.le_succ n) + have h0 := ht (Nat.zero_le n) + unfold opening + split_ifs <;> simp_all <;> linarith + +lemma sum_windowMask_variation (t : ℕ → ℝ) (ht : Monotone t) (a b : ℝ) (hab : a ≤ b) + (A : ℂ) (n : ℕ) : + (∑ k ∈ Finset.range n, ‖windowMask a b (t (k+1)) A-windowMask a b (t k) A‖) ≤ 2*‖A‖ := by + have hi := Finset.sum_le_sum (fun k (_ : k ∈ Finset.range n) => + norm_sub_le (opening a (t (k+1)) A-opening a (t k) A) + (opening b (t (k+1)) A-opening b (t k) A)) + have he (k : ℕ) : windowMask a b (t (k+1)) A-windowMask a b (t k) A = + (opening a (t (k+1)) A-opening a (t k) A)-(opening b (t (k+1)) A-opening b (t k) A) := by + rw [windowMask_eq_sub _ _ _ hab,windowMask_eq_sub _ _ _ hab] + ring + simp_rw [he] + apply hi.trans + rw [Finset.sum_add_distrib,sum_opening_variation t ht a A n,sum_opening_variation t ht b A n] + split_ifs <;> linarith [norm_nonneg A] +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/TotalJump.lean b/lean/OAI/Analysis/TriangularHilbert/TotalJump.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b2314167aeead0af8095d5e568cc4d55c2e95a1 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/TotalJump.lean @@ -0,0 +1,144 @@ +import OAI.Analysis.TriangularHilbert.InitialPlane + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma sum_energy_replaceZero_jump (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (hC : ∀ i j, ‖C i j‖ ≤ ‖A 0 i j‖) + (g : Three → ι → ℝ) (hg : ∀ v i, 0 ≤ g v i) : + |(∑ v, energy (starGram (weightedArray (replaceZero A B) g) v))- + (∑ v, energy (starGram (weightedArray (replaceZero A C) g) v))| ≤ + 3/2 * ∑ i, ∑ j, ‖B i j-C i j‖*g 0 i*g 1 j*jumpSlicing A g i j := by + have h0 := energy_replaceZero_jump_zero A B C hB hC g hg + have h1 := energy_replaceZero_jump_one A B C hB hC g hg + have h2 : energy (starGram (weightedArray (replaceZero A B) g) 2) = + energy (starGram (weightedArray (replaceZero A C) g) 2) := by + simp only [starGram,rowStar_replaceZero_two A B C g] + rw [Fin.sum_univ_three,Fin.sum_univ_three,h2] + have he : ∀ a b c d e : ℝ, a+b+c-(d+e+c) = (a-d)+(b-e) := by intros; ring + rw [he] + apply (abs_add_le _ _).trans ((add_le_add h0 h1).trans_eq _) + rw [Finset.mul_sum,Finset.mul_sum,Finset.mul_sum,← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i _ + rw [Finset.mul_sum,Finset.mul_sum,Finset.mul_sum,← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro j _ + unfold jumpSlicing + ring +end +end TriangularHilbert.MatrixEnergy +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def jumpExpectation (A : Three → Matrix ι ι ℂ) (h : ℝ) (u : ι → ℝ) (σ : Three → ℝ) (i j : ι) : ℝ := + 2*(∑ m, ‖A 0 i m‖^2*(h*density (2*σ 1) (u j-u m)))+ + 2*(∑ m, ‖A 0 m j‖^2*(h*density (2*σ 0) (u i-u m)))+ + (∑ m, ‖A 2 m i‖^2*(h*density (σ 0+σ 1+σ 2) (u i+u j+u m)))+ + (∑ m, ‖A 1 j m‖^2*(h*density (σ 0+σ 1+σ 2) (u i+u j+u m))) + +omit [DecidableEq ι] in +lemma heat_jumpSlice_integrable (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ v, 0 < σ v) (i j : ι) : + Integrable (fun z : ℝ×ℝ => heatWeights h u (chart 2 0 z) σ 0 i* + heatWeights h u (chart 2 0 z) σ 1 j*jumpSlicing A (heatWeights h u (chart 2 0 z) σ) i j) := by + have hX := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 0 i m‖^2) σ hσ 1 + have hY := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 0 m j‖^2) σ hσ 0 + have hH := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 2 m i‖^2) σ hσ 2 + have hK := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 1 j m‖^2) σ hσ 2 + have hi : Integrable (fun z : ℝ×ℝ => + 2*(weight h (u i) (chart 2 0 z 0) (σ 0)*weight h (u j) (chart 2 0 z 1) (σ 1)* + ∑ m, ‖A 0 i m‖^2*weight h (u m) (chart 2 0 z 1) (σ 1))+ + 2*(weight h (u i) (chart 2 0 z 0) (σ 0)*weight h (u j) (chart 2 0 z 1) (σ 1)* + ∑ m, ‖A 0 m j‖^2*weight h (u m) (chart 2 0 z 0) (σ 0))+ + (weight h (u i) (chart 2 0 z 0) (σ 0)*weight h (u j) (chart 2 0 z 1) (σ 1)* + ∑ m, ‖A 2 m i‖^2*weight h (u m) (chart 2 0 z 2) (σ 2))+ + (weight h (u i) (chart 2 0 z 0) (σ 0)*weight h (u j) (chart 2 0 z 1) (σ 1)* + ∑ m, ‖A 1 j m‖^2*weight h (u m) (chart 2 0 z 2) (σ 2))) := + (((hX.const_mul 2).add (hY.const_mul 2)).add hH).add hK + convert hi using 1 + ext z + simp only [heatWeights,jumpSlicing] + ring + +omit [DecidableEq ι] in +lemma planeIntegral_heat_jumpSlice (A : Three → Matrix ι ι ℂ) {h : ℝ} (hh : 0 < h) + (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ v, 0 < σ v) (i j : ι) : + planeIntegral (fun p => heatWeights h u p σ 0 i*heatWeights h u p σ 1 j* + jumpSlicing A (heatWeights h u p σ) i j) 0 = h^2*jumpExpectation A h u σ i j := by + have hX := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 0 i m‖^2) σ hσ 1 + have hY := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 0 m j‖^2) σ hσ 0 + have hH := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 2 m i‖^2) σ hσ 2 + have hK := weight_slice_integrable hh (u i) (u j) 0 u (fun m => ‖A 1 j m‖^2) σ hσ 2 + have he (p : Three → ℝ) : heatWeights h u p σ 0 i*heatWeights h u p σ 1 j* + jumpSlicing A (heatWeights h u p σ) i j = + 2*(weight h (u i) (p 0) (σ 0)*weight h (u j) (p 1) (σ 1)* + ∑ m, ‖A 0 i m‖^2*weight h (u m) (p 1) (σ 1))+ + 2*(weight h (u i) (p 0) (σ 0)*weight h (u j) (p 1) (σ 1)* + ∑ m, ‖A 0 m j‖^2*weight h (u m) (p 0) (σ 0))+ + (weight h (u i) (p 0) (σ 0)*weight h (u j) (p 1) (σ 1)* + ∑ m, ‖A 2 m i‖^2*weight h (u m) (p 2) (σ 2))+ + (weight h (u i) (p 0) (σ 0)*weight h (u j) (p 1) (σ 1)* + ∑ m, ‖A 1 j m‖^2*weight h (u m) (p 2) (σ 2)) := by + unfold heatWeights jumpSlicing; ring + simp_rw [he] + unfold planeIntegral + erw [integral_add (((hX.const_mul 2).add (hY.const_mul 2)).add hH) hK, + integral_add ((hX.const_mul 2).add (hY.const_mul 2)) hH, + integral_add (hX.const_mul 2) (hY.const_mul 2),integral_const_mul,integral_const_mul] + have hXI := weight_slice_one_integral hh (u i) (u j) 0 u (fun m => ‖A 0 i m‖^2) σ hσ + have hYI := weight_slice_zero_integral hh (u i) (u j) 0 u (fun m => ‖A 0 m j‖^2) σ hσ + have hHI := weight_slice_two_integral hh (u i) (u j) u (fun m => ‖A 2 m i‖^2) σ hσ + have hKI := weight_slice_two_integral hh (u i) (u j) u (fun m => ‖A 1 j m‖^2) σ hσ + unfold planeIntegral at hXI hYI hHI hKI + erw [hXI,hYI,hHI,hKI] + unfold jumpExpectation + ring + +lemma totalPlaneEnergy_replaceZero_jump (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (hC : ∀ i j, ‖C i j‖ ≤ ‖A 0 i j‖) + {h : ℝ} (hh : 0 < h) (u : ι → ℝ) {σ : Three → ℝ} (hσ : ∀ v, 0 < σ v) : + |totalPlaneEnergy (replaceZero A B) h u 0 σ-totalPlaneEnergy (replaceZero A C) h u 0 σ| ≤ + 3/2*h^2*∑ i, ∑ j, ‖B i j-C i j‖*jumpExpectation A h u σ i j := by + have hE (M : Three → Matrix ι ι ℂ) : Integrable (fun z : ℝ×ℝ => ∑ v, heatEnergy M h u (chart 2 0 z) σ v) := + integrable_finsetSum _ (fun v _ => (heatPlane_integrable M hh u 0 hσ).energy 2 v) + have hj (i j : ι) : Integrable (fun z : ℝ×ℝ => ‖B i j-C i j‖*(heatWeights h u (chart 2 0 z) σ 0 i* + heatWeights h u (chart 2 0 z) σ 1 j*jumpSlicing A (heatWeights h u (chart 2 0 z) σ) i j)) := + (heat_jumpSlice_integrable A hh u hσ i j).const_mul _ + have hJ := integrable_finsetSum Finset.univ (fun i _ => integrable_finsetSum Finset.univ (fun j _ => hj i j)) + have hb := (abs_integral_le_integral_abs (f := fun z : ℝ×ℝ => (∑ v, heatEnergy (replaceZero A B) h u (chart 2 0 z) σ v)- + (∑ v, heatEnergy (replaceZero A C) h u (chart 2 0 z) σ v))).trans + (integral_mono ((hE _).sub (hE _)).abs (hJ.const_mul (3/2)) (fun z => by + simpa only [heatEnergy,heatArray,mul_assoc] using + sum_energy_replaceZero_jump A B C hB hC (heatWeights h u (chart 2 0 z) σ) + (fun v i => (weight_pos hh (hσ v) _ _).le))) + rw [integral_sub (hE _) (hE _),integral_finsetSum _ (fun v _ => (heatPlane_integrable (replaceZero A B) hh u 0 hσ).energy 2 v), + integral_finsetSum _ (fun v _ => (heatPlane_integrable (replaceZero A C) hh u 0 hσ).energy 2 v)] at hb + change |totalPlaneEnergy (replaceZero A B) h u 0 σ-totalPlaneEnergy (replaceZero A C) h u 0 σ| ≤ _ at hb + apply hb.trans_eq + rw [integral_const_mul,integral_finsetSum _ (fun i _ => integrable_finsetSum _ (fun j _ => hj i j))] + simp_rw [integral_finsetSum _ (fun j _ => hj _ j),integral_const_mul] + change 3/2*(∑ i, ∑ j, ‖B i j-C i j‖*planeIntegral (fun p => + heatWeights h u p σ 0 i*heatWeights h u p σ 1 j*jumpSlicing A (heatWeights h u p σ) i j) 0) = _ + simp_rw [planeIntegral_heat_jumpSlice A hh u hσ] + simp only [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/TraceWeights.lean b/lean/OAI/Analysis/TriangularHilbert/TraceWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..157da02b174ba52e54c2ae30dd87a7bb43cf8183 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/TraceWeights.lean @@ -0,0 +1,66 @@ +import OAI.Analysis.TriangularHilbert.SignedTraceOrder + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [DecidableEq ι] in +lemma trace_mul_three (X Y Z : Matrix ι ι ℂ) : + Matrix.trace (X*Y*Z) = ∑ i, ∑ j, ∑ k, X i j*Y j k*Z k i := by + simp only [Matrix.trace,Matrix.diag_apply,Matrix.mul_apply,Finset.sum_mul] + apply Finset.sum_congr rfl + intro i _ + rw [Finset.sum_comm] + +lemma trace_diagonal_triangle (W : Three → Matrix ι ι ℂ) (d : Three → ι → ℝ) : + Matrix.trace (Matrix.diagonal (fun i => (d 0 i:ℂ))*W 0* + Matrix.diagonal (fun i => (d 1 i:ℂ))*W 1* + Matrix.diagonal (fun i => (d 2 i:ℂ))*W 2) = + ∑ i, ∑ j, ∑ k, ((d 0 i:ℂ)*W 0 i j)*((d 1 j:ℂ)*W 1 j k)*((d 2 k:ℂ)*W 2 k i) := by + rw [show Matrix.diagonal (fun i => (d 0 i:ℂ))*W 0* + Matrix.diagonal (fun i => (d 1 i:ℂ))*W 1* + Matrix.diagonal (fun i => (d 2 i:ℂ))*W 2 = + (Matrix.diagonal (fun i => (d 0 i:ℂ))*W 0)* + (Matrix.diagonal (fun i => (d 1 i:ℂ))*W 1)* + (Matrix.diagonal (fun i => (d 2 i:ℂ))*W 2) by simp only [Matrix.mul_assoc]] + simp only [trace_mul_three,Matrix.diagonal_mul] + +lemma weighted_triangle_entry (a b c : ℂ) (g0 g1 g2 d0 d1 d2 : ℝ) + (hg0 : 0 ≤ g0) (hg1 : 0 ≤ g1) (hg2 : 0 ≤ g2) : + ((d0:ℂ)*((Real.sqrt g0:ℂ)*a*(Real.sqrt g1:ℂ)))* + ((d1:ℂ)*((Real.sqrt g1:ℂ)*b*(Real.sqrt g2:ℂ)))* + ((d2:ℂ)*((Real.sqrt g2:ℂ)*c*(Real.sqrt g0:ℂ))) = + a*b*c*((g0*d0)*(g1*d1)*(g2*d2):ℝ) := by + have h0 : (Real.sqrt g0:ℂ)^2 = (g0:ℂ) := by exact_mod_cast Real.sq_sqrt hg0 + have h1 : (Real.sqrt g1:ℂ)^2 = (g1:ℂ) := by exact_mod_cast Real.sq_sqrt hg1 + have h2 : (Real.sqrt g2:ℂ)^2 = (g2:ℂ) := by exact_mod_cast Real.sq_sqrt hg2 + calc + _ = a*b*c*(Real.sqrt g0:ℂ)^2*(Real.sqrt g1:ℂ)^2*(Real.sqrt g2:ℂ)^2*d0*d1*d2 := by ring + _ = _ := by rw [h0,h1,h2]; push_cast; ring + +lemma trace_weighted_triangle (A : Three → Matrix ι ι ℂ) (g d : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) : + Matrix.trace (Matrix.diagonal (fun i => (d 0 i:ℂ))*weightedArray A g 0* + Matrix.diagonal (fun i => (d 1 i:ℂ))*weightedArray A g 1* + Matrix.diagonal (fun i => (d 2 i:ℂ))*weightedArray A g 2) = + ∑ i, ∑ j, ∑ k, A 0 i j*A 1 j k*A 2 k i*((g 0 i*d 0 i)*(g 1 j*d 1 j)*(g 2 k*d 2 k):ℝ) := by + rw [trace_diagonal_triangle] + apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + exact weighted_triangle_entry _ _ _ _ _ _ _ _ _ (hg 0 i) (hg 1 j) (hg 2 k) + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/TruncationCoordinates.lean b/lean/OAI/Analysis/TriangularHilbert/TruncationCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a8e2d634354c10f788841c6196b9368b04da507 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/TruncationCoordinates.lean @@ -0,0 +1,64 @@ +import OAI.Analysis.TriangularHilbert.Coordinates + +namespace OAI + +section +namespace TriangularHilbert +open MeasureTheory Heat Filter +noncomputable section + +lemma cyclicHard_coordinate_output (F G : Plane → ℂ) (z : Plane) (r R : ℝ) : + cyclicKernelOutput (cyclicB F) (cyclicC G) (hardKernel r R) (-z) = + ∫ t : ℝ, F (z.1+t,z.2)*G (z.1,z.2+t)*(hardKernel r R t:ℂ) := by + rw [cyclicKernelOutput,← integral_add_right_eq_self _ (z.1+z.2)] + apply integral_congr_ae + exact Eventually.of_forall (fun t => by simpa only [add_assoc] using cyclicHard_coordinate_integrand F G z r R t) + +lemma hardIntegrand_eq_indicator_ae (F G : Plane → ℂ) (z : Plane) {r R : ℝ} (hR : r ≤ R) : + (fun t : ℝ => F (z.1+t,z.2)*G (z.1,z.2+t)*(hardKernel r R t:ℂ)) =ᵐ[volume] + (annulus r R).indicator (integrand F G z) := by + filter_upwards [hardKernel_eq_indicator_ae hR] with t ht + classical + by_cases hm : t ∈ annulus r R + · rw [Set.indicator_of_mem hm] at ht + rw [ht,Set.indicator_of_mem hm] + simp only [integrand,div_eq_mul_inv,one_mul,Complex.ofReal_inv] + · rw [Set.indicator_of_notMem hm] at ht + simp only [ht,Complex.ofReal_zero,mul_zero,Set.indicator_of_notMem hm] + +lemma truncation_eq_cyclicHard (F G : Plane → ℂ) (z : Plane) (E : Endpoints) : + truncation F G E z = cyclicKernelOutput (cyclicB F) (cyclicC G) (hardKernel E.lower E.upper) (-z) := by + rw [cyclicHard_coordinate_output,integral_congr_ae (hardIntegrand_eq_indicator_ae F G z E.lower_lt_upper.le), + integral_indicator (measurableSet_annulus E.lower E.upper)] + rfl + +lemma Heat.CubicSliceGood.integrableOn_annulus {F G : Plane → ℂ} {z : Plane} + (hz : CubicSliceGood (cyclicB F) (cyclicC G) (-z)) + {r R : ℝ} (hr : 0 < r) (hR : r ≤ R) : IntegrableOn (integrand F G z) (annulus r R) := by + have hi := hz.integrable_hard hr hR + have ht := ((measurePreserving_add_right (volume : Measure ℝ) (z.1+z.2)).integrable_comp hi.aestronglyMeasurable).mpr hi + have hi' : Integrable (fun t : ℝ => F (z.1+t,z.2)*G (z.1,z.2+t)*(hardKernel r R t:ℂ)) := by + convert ht using 1 + funext t + simpa only [Function.comp_apply,add_assoc] using (cyclicHard_coordinate_integrand F G z r R t).symm + exact (integrable_indicator_iff (measurableSet_annulus r R)).mp + (hi'.congr (hardIntegrand_eq_indicator_ae F G z hR)) + +lemma Heat.CubicSliceGood.goodPoint {F G : Plane → ℂ} {z : Plane} + (hz : CubicSliceGood (cyclicB F) (cyclicC G) (-z)) : GoodPoint F G z := by + intro n + apply hz.integrableOn_annulus + · positivity + · apply (div_le_iff₀ (show (0:ℝ) < n+2 by positivity)).mpr + nlinarith [Nat.cast_nonneg (α := ℝ) n] + +lemma ae_goodPoint (F G : Plane → ℂ) (hF : MemLp F 3 volume) (hG : MemLp G 3 volume) : + ∀ᵐ z : Plane, GoodPoint F G z := by + filter_upwards [measurePreserving_reflect.quasiMeasurePreserving.ae + (ae_cubicSliceGood (cyclicB F) (cyclicC G) (memLp_cyclicB hF) (memLp_cyclicC hG))] with z hz + exact hz.goodPoint +end +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/WeightSlice.lean b/lean/OAI/Analysis/TriangularHilbert/WeightSlice.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8e1481caa61f34ac4d4efd266fa523488eb1523 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/WeightSlice.lean @@ -0,0 +1,81 @@ +import OAI.Analysis.TriangularHilbert.GaussianExpectation + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.Heat +open MatrixEnergy MeasureTheory +open scoped BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] + +lemma weight_slice_integrable {h : ℝ} (hh : 0 < h) (a b d : ℝ) + (c f : ι → ℝ) (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v : Three) : + Integrable (fun z : ℝ×ℝ => weight h a (chart 2 d z 0) (σ 0)*weight h b (chart 2 d z 1) (σ 1)* + ∑ m, f m*weight h (c m) (chart 2 d z v) (σ v)) := by + have hi : Integrable (fun z : ℝ×ℝ => ∑ m, f m*(weight h a (chart 2 d z 0) (σ 0)* + weight h b (chart 2 d z 1) (σ 1)*weight h (c m) (chart 2 d z v) (σ v))) := + integrable_finsetSum _ (fun m _ => (weight_three_integrable hh a b (c m) d σ hσ v).const_mul (f m)) + convert hi using 1 + ext z + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + ring + +lemma planeIntegral_weight_slice {h : ℝ} (hh : 0 < h) (a b d : ℝ) + (c f : ι → ℝ) (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) (v : Three) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)* + ∑ m, f m*weight h (c m) (p v) (σ v)) d = + ∑ m, f m*planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)*weight h (c m) (p v) (σ v)) d := by + unfold planeIntegral + have he (z : ℝ×ℝ) : weight h a (chart 2 d z 0) (σ 0)*weight h b (chart 2 d z 1) (σ 1)* + (∑ m, f m*weight h (c m) (chart 2 d z v) (σ v)) = + ∑ m, f m*(weight h a (chart 2 d z 0) (σ 0)*weight h b (chart 2 d z 1) (σ 1)*weight h (c m) (chart 2 d z v) (σ v)) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + ring + simp_rw [he] + rw [integral_finsetSum _ (fun m _ => (weight_three_integrable hh a b (c m) d σ hσ v).const_mul (f m))] + simp only [integral_const_mul] + +lemma weight_slice_zero_integral {h : ℝ} (hh : 0 < h) (a b d : ℝ) (c f : ι → ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)* + ∑ m, f m*weight h (c m) (p 0) (σ 0)) d = h^2*∑ m, f m*(h*density (2*σ 0) (a-c m)) := by + rw [planeIntegral_weight_slice hh a b d c f σ hσ 0] + simp_rw [planeIntegral_weight_repeat_zero h a b _ d σ hσ] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + ring + +lemma weight_slice_one_integral {h : ℝ} (hh : 0 < h) (a b d : ℝ) (c f : ι → ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)* + ∑ m, f m*weight h (c m) (p 1) (σ 1)) d = h^2*∑ m, f m*(h*density (2*σ 1) (b-c m)) := by + rw [planeIntegral_weight_slice hh a b d c f σ hσ 1] + simp_rw [planeIntegral_weight_repeat_one h a b _ d σ hσ] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + ring + +lemma weight_slice_two_integral {h : ℝ} (hh : 0 < h) (a b : ℝ) (c f : ι → ℝ) + (σ : Three → ℝ) (hσ : ∀ v, 0 < σ v) : + planeIntegral (fun p => weight h a (p 0) (σ 0)*weight h b (p 1) (σ 1)* + ∑ m, f m*weight h (c m) (p 2) (σ 2)) 0 = h^2*∑ m, f m*(h*density (σ 0+σ 1+σ 2) (a+b+c m)) := by + rw [planeIntegral_weight_slice hh a b 0 c f σ hσ 2] + simp_rw [planeIntegral_weight_triple h a b _ σ hσ] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m _ + ring +end +end TriangularHilbert.Heat +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/WeightedCompare.lean b/lean/OAI/Analysis/TriangularHilbert/WeightedCompare.lean new file mode 100644 index 0000000000000000000000000000000000000000..243df30b849fc9ce5a91fd9d2eb209e0c8358a57 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/WeightedCompare.lean @@ -0,0 +1,72 @@ +import OAI.Analysis.TriangularHilbert.WeightedStar + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma weightedGram_sub (B : Matrix ι ι ℂ) (f g : ι → ℝ) : + weightedGram B (fun i => f i-g i) = weightedGram B f-weightedGram B g := by + unfold weightedGram + have hd : Matrix.diagonal (fun i => ((f i-g i:ℝ):ℂ)) = + Matrix.diagonal (fun i => (f i:ℂ))-Matrix.diagonal (fun i => (g i:ℂ)) := by + rw [Matrix.diagonal_sub] + simp only [Complex.ofReal_sub] + rw [hd,Matrix.mul_sub,Matrix.sub_mul] + +lemma weightedGram_mono (B : Matrix ι ι ℂ) (f g : ι → ℝ) (hfg : ∀ i, f i ≤ g i) : + weightedGram B f ≤ weightedGram B g := by + rw [← sub_nonneg,← weightedGram_sub] + exact (weightedGram_posSemidef B (fun i => sub_nonneg.mpr (hfg i))).nonneg + +lemma rowBare_apply_zero (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v : Three) + (a b : BlockSpace ι) (ha : a.1 ≠ v) : rowBare A g v a b = 0 := by + simp [rowBare,vertexRoot,Matrix.mul_diagonal,rowStar_apply,ha] + +lemma weightedGram_rowBare_congr (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (v : Three) (f f' : BlockSpace ι → ℝ) (he : ∀ i, f (v,i)=f' (v,i)) : + weightedGram (rowBare A g v) f = weightedGram (rowBare A g v) f' := by + ext a b + unfold weightedGram + conv_lhs => rw [Matrix.mul_apply] + conv_rhs => rw [Matrix.mul_apply] + simp only [Matrix.mul_diagonal,Matrix.conjTranspose_apply] + apply Finset.sum_congr rfl + intro k _ + by_cases hk : k.1 = v + · obtain ⟨w,i⟩ := k + change w = v at hk + subst w + rw [he i] + · rw [rowBare_apply_zero A g v k b hk] + simp + +lemma hessianCost_smul_direction {P K : Matrix ι ι ℂ} + (hsol : ∃ Y, sylv (CFC.sqrt P) Y = K) (c : ℝ) : + hessianCost P (c • K) = c^2*hessianCost P K := by + exact rootCost_smul_direction (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg P)) hsol c + +omit [Fintype ι] in +lemma blockD_real_diagonal (d : Three → ι → ℝ) : + blockD (fun v => Matrix.diagonal (fun i => (d v i:ℂ))) = + Matrix.diagonal (fun a : BlockSpace ι => (d a.1 a.2:ℂ)) := by + ext ⟨v,i⟩ ⟨w,j⟩ + by_cases hv : v=w <;> by_cases hi : i=j <;> + simp [blockD,blocks,Matrix.diagonal,hv,hi,Prod.mk.injEq] + +lemma norm_blockD_real_diagonal_le (d : Three → ι → ℝ) {C : ℝ} (hC : 0 ≤ C) + (hd : ∀ v i, |d v i| ≤ C) : + ‖blockD (fun v => Matrix.diagonal (fun i => (d v i:ℂ)))‖ ≤ C := by + rw [blockD_real_diagonal,Matrix.l2_opNorm_diagonal] + exact (pi_norm_le_iff_of_nonneg hC).mpr (fun a => by simpa using hd a.1 a.2) + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/WeightedCubic.lean b/lean/OAI/Analysis/TriangularHilbert/WeightedCubic.lean new file mode 100644 index 0000000000000000000000000000000000000000..87e66245533765de3f1a6b4643bf776dde21db63 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/WeightedCubic.lean @@ -0,0 +1,96 @@ +import OAI.Analysis.TriangularHilbert.WeightSlice + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped BigOperators Matrix MatrixOrder ComplexOrder Matrix.Norms.L2Operator +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +lemma energy_le_trace_sqrt {P : Matrix ι ι ℂ} (hP : P.PosSemidef) : + energy P ≤ traceReal P * Real.sqrt (traceReal P) := by + have he : traceReal P = ∑ i, hP.isHermitian.eigenvalues i := by + have hh := congrArg Complex.re hP.isHermitian.trace_eq_sum_eigenvalues + simp only [Complex.re_sum] at hh + exact hh + rw [energy_spectral hP,he,Finset.sum_mul] + apply Finset.sum_le_sum + intro i _ + apply mul_le_mul_of_nonneg_left _ (hP.eigenvalues_nonneg i) + apply Real.sqrt_le_sqrt + exact Finset.single_le_sum (fun j _ => hP.eigenvalues_nonneg j) (Finset.mem_univ i) + +omit [DecidableEq ι] in +lemma traceReal_gram (R : Matrix ι ι ℂ) : + traceReal (Rᴴ*R) = ∑ i, ∑ j, ‖R i j‖^2 := by + unfold traceReal Matrix.trace + simp only [Matrix.diag_apply,Matrix.mul_apply,Matrix.conjTranspose_apply, Complex.re_sum, + Complex.star_def, Complex.conj_mul', ← Complex.ofReal_pow, Complex.ofReal_re] + rw [Finset.sum_comm] + +lemma energy_gram_le_HS (R : Matrix ι ι ℂ) : + energy (Rᴴ*R) ≤ (∑ i, ∑ j, ‖R i j‖^2) * Real.sqrt (∑ i, ∑ j, ‖R i j‖^2) := by + simpa only [traceReal_gram] using energy_le_trace_sqrt (Matrix.posSemidef_conjTranspose_mul_self R) + +end +end TriangularHilbert.MatrixEnergy +namespace TriangularHilbert +open scoped BigOperators + +lemma sum_sq_le_sum_mul_of_nonneg {ι : Type uι} (s : Finset ι) (x y z : ι → ℝ) + (hx : ∀ i ∈ s, 0 ≤ x i) (hy : ∀ i ∈ s, 0 ≤ y i) (hz : ∀ i ∈ s, 0 ≤ z i) + (he : ∀ i ∈ s, x i ^ 2 = y i * z i) : + (∑ i ∈ s, x i)^2 ≤ (∑ i ∈ s, y i)*(∑ i ∈ s, z i) := by + have hp i (hi : i ∈ s) : Real.sqrt (y i) * Real.sqrt (z i) = x i := by + rw [← Real.sqrt_mul (hy i hi),← he i hi,Real.sqrt_sq (hx i hi)] + have hh := Real.sum_mul_le_sqrt_mul_sqrt s (fun i => Real.sqrt (y i)) (fun i => Real.sqrt (z i)) + have hys : (∑ i ∈ s, (Real.sqrt (y i))^2) = ∑ i ∈ s, y i := + Finset.sum_congr rfl (fun i hi => Real.sq_sqrt (hy i hi)) + have hzs : (∑ i ∈ s, (Real.sqrt (z i))^2) = ∑ i ∈ s, z i := + Finset.sum_congr rfl (fun i hi => Real.sq_sqrt (hz i hi)) + rw [hys,hzs] at hh + have he' : (∑ i ∈ s, Real.sqrt (y i) * Real.sqrt (z i)) = ∑ i ∈ s, x i := + Finset.sum_congr rfl hp + rw [he'] at hh + have hq := sq_le_sq₀ (Finset.sum_nonneg hx) (mul_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _)) |>.mpr hh + simpa only [mul_pow,Real.sq_sqrt (Finset.sum_nonneg hy),Real.sq_sqrt (Finset.sum_nonneg hz)] using hq + +lemma weighted_cubic {ι : Type uι} (s : Finset ι) (a w : ι → ℝ) + (ha : ∀ i ∈ s, 0 ≤ a i) (hw : ∀ i ∈ s, 0 ≤ w i) : + (∑ i ∈ s, a i^2*w i) * Real.sqrt (∑ i ∈ s, a i^2*w i) ≤ + (∑ i ∈ s, a i^3*w i) * Real.sqrt (∑ i ∈ s, w i) := by + let T := ∑ i ∈ s, a i^2*w i + let B := ∑ i ∈ s, a i^3*w i + let L := ∑ i ∈ s, a i*w i + let W := ∑ i ∈ s, w i + have hT : 0 ≤ T := Finset.sum_nonneg (fun i hi => mul_nonneg (sq_nonneg _) (hw i hi)) + have hB : 0 ≤ B := Finset.sum_nonneg (fun i hi => mul_nonneg (pow_nonneg (ha i hi) _) (hw i hi)) + have hL : 0 ≤ L := Finset.sum_nonneg (fun i hi => mul_nonneg (ha i hi) (hw i hi)) + have hW : 0 ≤ W := Finset.sum_nonneg hw + have hTL : T^2 ≤ B*L := sum_sq_le_sum_mul_of_nonneg s _ _ _ + (fun i hi => mul_nonneg (sq_nonneg _) (hw i hi)) + (fun i hi => mul_nonneg (pow_nonneg (ha i hi) _) (hw i hi)) + (fun i hi => mul_nonneg (ha i hi) (hw i hi)) (fun i _ => by ring) + have hLW : L^2 ≤ T*W := sum_sq_le_sum_mul_of_nonneg s _ _ _ + (fun i hi => mul_nonneg (ha i hi) (hw i hi)) + (fun i hi => mul_nonneg (sq_nonneg _) (hw i hi)) hw (fun i _ => by ring) + change T * Real.sqrt T ≤ B * Real.sqrt W + by_cases ht : T = 0 + · simpa only [ht,zero_mul] using mul_nonneg hB (Real.sqrt_nonneg W) + have htpos : 0 < T := hT.lt_of_ne' ht + have hq := mul_le_mul hTL hTL (sq_nonneg T) (mul_nonneg hB hL) + have hh := mul_le_mul_of_nonneg_left hLW (sq_nonneg B) + have hc : T^3 ≤ B^2 * W := by + by_contra! hc + have hp := mul_pos htpos (sub_pos.mpr hc) + nlinarith + apply (sq_le_sq₀ (mul_nonneg hT (Real.sqrt_nonneg T)) (mul_nonneg hB (Real.sqrt_nonneg W))).mp + rw [mul_pow,mul_pow,Real.sq_sqrt hT,Real.sq_sqrt hW] + nlinarith [hc] +end TriangularHilbert +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/WeightedGram.lean b/lean/OAI/Analysis/TriangularHilbert/WeightedGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a5506f3d2dc0dd76f926fd653c00deb4f71ad54 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/WeightedGram.lean @@ -0,0 +1,119 @@ +import OAI.Analysis.TriangularHilbert.Support + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators Topology +open Filter +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def weightedGram (B : Matrix ι ι ℂ) (w : ι → ℝ) : Matrix ι ι ℂ := + Bᴴ * Matrix.diagonal (fun i => (w i : ℂ)) * B + +lemma weightedGram_posSemidef (B : Matrix ι ι ℂ) {w : ι → ℝ} + (hw : ∀ i, 0 ≤ w i) : (weightedGram B w).PosSemidef := + (Matrix.PosSemidef.diagonal (fun i => RCLike.ofReal_nonneg.mpr (hw i))).conjTranspose_mul_mul_same B + +lemma weightedGram_isHermitian (B : Matrix ι ι ℂ) (w : ι → ℝ) : + (weightedGram B w).IsHermitian := by + have hd : (Matrix.diagonal (fun i => (w i : ℂ))).IsHermitian := by + rw [Matrix.IsHermitian, Matrix.diagonal_conjTranspose] + simp + exact Matrix.isHermitian_conjTranspose_mul_mul B hd + +lemma weightedGram_mul_zero {B Q : Matrix ι ι ℂ} {w : ι → ℝ} + (hw : ∀ i, 0 < w i) (hz : weightedGram B w * Q = 0) : B * Q = 0 := by + let D : Matrix ι ι ℂ := Matrix.diagonal (fun i => (w i : ℂ)) + have hD : D.PosDef := Matrix.PosDef.diagonal (fun i => RCLike.ofReal_pos.mpr (hw i)) + have hs : (CFC.sqrt D).IsHermitian := + (Matrix.nonneg_iff_posSemidef.mp (CFC.sqrt_nonneg D)).isHermitian + have hunit : IsUnit (CFC.sqrt D) := + (Matrix.isStrictlyPositive_iff_posDef.mp + (IsStrictlyPositive.sqrt D hD.isStrictlyPositive)).isUnit + have hgram : (CFC.sqrt D * B)ᴴ * (CFC.sqrt D * B) = weightedGram B w := by + calc + _ = Bᴴ * (CFC.sqrt D * CFC.sqrt D) * B := by + rw [Matrix.conjTranspose_mul, hs.eq] + simp only [Matrix.mul_assoc] + _ = _ := by rw [CFC.sqrt_mul_sqrt_self D hD.posSemidef.nonneg]; rfl + have hsq : (CFC.sqrt D * B * Q)ᴴ * (CFC.sqrt D * B * Q) = 0 := by + calc + _ = Qᴴ * ((CFC.sqrt D * B)ᴴ * (CFC.sqrt D * B)) * Q := by + rw [Matrix.conjTranspose_mul] + simp only [Matrix.mul_assoc] + _ = Qᴴ * (weightedGram B w * Q) := by rw [hgram, Matrix.mul_assoc] + _ = 0 := by rw [hz, mul_zero] + have hzero := (CStarRing.star_mul_self_eq_zero_iff _).mp hsq + apply hunit.mul_left_cancel + simpa only [Matrix.mul_assoc, mul_zero] using hzero + +lemma weightedGram_kernel_projection (B : Matrix ι ι ℂ) {w : ι → ℝ} + (hw : ∀ i, 0 < w i) : + ∃ Q : Matrix ι ι ℂ, Q.PosSemidef ∧ Q * Q = Q ∧ B * Q = 0 ∧ + (weightedGram B w + Q).PosDef := by + obtain ⟨Q, hQ, hQQ, hPQ, _, hPD⟩ := + exists_kernel_projection (weightedGram_posSemidef B (fun i => (hw i).le)) + exact ⟨Q, hQ, hQQ, weightedGram_mul_zero hw hPQ, hPD⟩ + +lemma weightedGram_mul_eq_zero (B Q : Matrix ι ι ℂ) (w : ι → ℝ) (hz : B * Q = 0) : + weightedGram B w * Q = 0 := by + simp only [weightedGram, Matrix.mul_assoc, hz, mul_zero] + +lemma diagonal_real_hasDerivAt {w : ℝ → ι → ℝ} {w' : ι → ℝ} {x : ℝ} + (hd : ∀ i, HasDerivAt (fun t => w t i) (w' i) x) : + HasDerivAt (fun t => Matrix.diagonal (fun i => (w t i : ℂ))) + (Matrix.diagonal (fun i => (w' i : ℂ))) x := by + apply hasDerivAt_pi.mpr + intro i + apply hasDerivAt_pi.mpr + intro j + by_cases hij : i = j + · subst j + simpa only [Matrix.diagonal_apply_eq] using (hd i).ofReal_comp + · simpa only [Matrix.diagonal_apply_ne _ hij] using + (hasDerivAt_const x (0 : ℂ)) + +lemma weightedGram_hasDerivAt (B : Matrix ι ι ℂ) + {w : ℝ → ι → ℝ} {w' : ι → ℝ} {x : ℝ} + (hd : ∀ i, HasDerivAt (fun t => w t i) (w' i) x) : + HasDerivAt (fun t => weightedGram B (w t)) (weightedGram B w') x := + ((diagonal_real_hasDerivAt hd).const_mul Bᴴ).mul_const B + +theorem energy_weightedGram_hasDerivAt (B : Matrix ι ι ℂ) + {w : ℝ → ι → ℝ} {w' : ι → ℝ} {x : ℝ} + (hw : ∀ᶠ t in 𝓝 x, ∀ i, 0 < w t i) + (hd : ∀ i, HasDerivAt (fun t => w t i) (w' i) x) : + HasDerivAt (fun t => energy (weightedGram B (w t))) + (energyGradient (weightedGram B (w x)) (weightedGram B w')) x := by + obtain ⟨Q, hQ, hQQ, hBQ, hPD⟩ := weightedGram_kernel_projection B hw.self_of_nhds + exact energy_supported_path_hasDerivAt hQ hQQ hPD + (hw.mono fun t ht => weightedGram_posSemidef B (fun i => (ht i).le)) + (Eventually.of_forall fun t => weightedGram_mul_eq_zero B Q (w t) hBQ) + (weightedGram_hasDerivAt B hd) + +theorem energyGradient_weightedGram_hasDerivAt (B : Matrix ι ι ℂ) + {w k : ℝ → ι → ℝ} {w' k' : ι → ℝ} {x : ℝ} + (hw : ∀ᶠ t in 𝓝 x, ∀ i, 0 < w t i) + (hdw : ∀ i, HasDerivAt (fun t => w t i) (w' i) x) + (hdk : ∀ i, HasDerivAt (fun t => k t i) (k' i) x) : + HasDerivAt (fun t => energyGradient (weightedGram B (w t)) (weightedGram B (k t))) + (hessianPair (weightedGram B (w x)) (weightedGram B (k x)) (weightedGram B w') + + energyGradient (weightedGram B (w x)) (weightedGram B k')) x := by + obtain ⟨Q, hQ, hQQ, hBQ, hPD⟩ := weightedGram_kernel_projection B hw.self_of_nhds + exact energyGradient_supported_path_hasDerivAt hQ hQQ hPD + (hw.mono fun t ht => weightedGram_posSemidef B (fun i => (ht i).le)) + (Eventually.of_forall fun t => weightedGram_mul_eq_zero B Q (w t) hBQ) + (Eventually.of_forall fun t => weightedGram_isHermitian B (k t)) + (Eventually.of_forall fun t => weightedGram_mul_eq_zero B Q (k t) hBQ) + (weightedGram_hasDerivAt B hdw) (weightedGram_hasDerivAt B hdk) + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/WeightedStar.lean b/lean/OAI/Analysis/TriangularHilbert/WeightedStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..e631deef177ea74edf6b409161a72ed1bd372434 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/WeightedStar.lean @@ -0,0 +1,144 @@ +import OAI.Analysis.TriangularHilbert.GaussianGram + +namespace OAI + +universe uι + +section + +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +def vertexRoot (g : Three → ι → ℝ) : Matrix (BlockSpace ι) (BlockSpace ι) ℂ := + Matrix.diagonal (fun a => (Real.sqrt (g a.1 a.2) : ℂ)) + +def weightedArray (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) : Three → Matrix ι ι ℂ := + fun v i j => (Real.sqrt (g v i) : ℂ) * A v i j * (Real.sqrt (g (v+1) j) : ℂ) + +omit [Fintype ι] in +lemma vertexRoot_star (g : Three → ι → ℝ) : (vertexRoot g)ᴴ = vertexRoot g := by + unfold vertexRoot + rw [Matrix.diagonal_conjTranspose] + simp + +lemma vertexRoot_sq (g : Three → ι → ℝ) (hg : ∀ v i, 0 ≤ g v i) : + vertexRoot g * vertexRoot g = Matrix.diagonal (fun a => (g a.1 a.2 : ℂ)) := by + rw [vertexRoot, Matrix.diagonal_mul_diagonal] + congr 1 + funext a + rw [← Complex.ofReal_mul, Real.mul_self_sqrt (hg a.1 a.2)] + +lemma vertexRoot_commute_vertexProj (g : Three → ι → ℝ) (v : Three) : + vertexRoot g * vertexProj v = vertexProj v * vertexRoot g := by + dsimp only [vertexRoot, vertexProj] + rw [Matrix.diagonal_mul_diagonal, Matrix.diagonal_mul_diagonal] + congr 1 + funext a + exact mul_comm _ _ + +lemma triangle_weightedArray (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) : + triangle (weightedArray A g) = vertexRoot g * triangle A * vertexRoot g := by + ext ⟨v,i⟩ ⟨w,j⟩ + fin_cases v <;> fin_cases w <;> + simp [triangle, triangleBlocks, blocks, weightedArray, vertexRoot, + Matrix.diagonal_mul, Matrix.mul_diagonal, Matrix.conjTranspose_apply, + mul_comm, mul_left_comm, mul_assoc] <;> first | exact Or.inl (mul_comm _ _) | ring + +lemma rowStar_weightedArray (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v : Three) : + rowStar (weightedArray A g) v = vertexRoot g * rowStar A v * vertexRoot g := by + unfold rowStar + rw [triangle_weightedArray] + simp only [← Matrix.mul_assoc] + rw [← vertexRoot_commute_vertexProj] + +lemma rowStar_apply (A : Three → Matrix ι ι ℂ) (v : Three) (a b : BlockSpace ι) : + rowStar A v a b = if a.1 = v then triangleBlocks A a.1 b.1 a.2 b.2 else 0 := by + simp [rowStar, vertexProj, triangle, blocks, Matrix.diagonal_mul, ite_mul] + +lemma rowStar_eq_blocks (A : Three → Matrix ι ι ℂ) (v : Three) : + rowStar A v = blocks (fun a b => if a = v then triangleBlocks A a b else 0) := by + exact rowStar_blocks A v + +def rowBare (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v : Three) := + rowStar A v * vertexRoot g + +def colBare (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) (v : Three) := + (rowStar A v)ᴴ * vertexRoot g + +lemma starGram_weightedArray (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) : + starGram (weightedArray A g) v = weightedGram (rowBare A g v) (fun a => g a.1 a.2) := by + have hr : rowStar (weightedArray A g) v = vertexRoot g * rowBare A g v := by + rw [rowStar_weightedArray, rowBare, Matrix.mul_assoc] + rw [starGram, hr, Matrix.conjTranspose_mul, vertexRoot_star] + unfold weightedGram + calc + _ = (rowBare A g v)ᴴ * (vertexRoot g * vertexRoot g) * rowBare A g v := by + simp only [Matrix.mul_assoc] + _ = _ := by rw [vertexRoot_sq g hg] + +lemma centerGram_weightedArray_padded (A : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) + (hg : ∀ v i, 0 ≤ g v i) (v : Three) : + rowStar (weightedArray A g) v * (rowStar (weightedArray A g) v)ᴴ = + weightedGram (colBare A g v) (fun a => g a.1 a.2) := by + rw [rowStar_weightedArray] + unfold colBare weightedGram + simp only [Matrix.conjTranspose_mul, Matrix.conjTranspose_conjTranspose, vertexRoot_star] + rw [← vertexRoot_sq g hg] + simp only [Matrix.mul_assoc] + +lemma rowBare_congr (A : Three → Matrix ι ι ℂ) (g g' : Three → ι → ℝ) (v : Three) + (he : ∀ w, w ≠ v → ∀ i, g' w i = g w i) : rowBare A g' v = rowBare A g v := by + ext a b + dsimp only [rowBare, vertexRoot] + rw [Matrix.mul_diagonal, Matrix.mul_diagonal, rowStar_apply] + by_cases ha : a.1 = v + · rw [ite_eq_left ha] + by_cases hb : b.1 = v + · rw [ha, hb, triangleBlocks_diag, Matrix.zero_apply, zero_mul, zero_mul] + · rw [he b.1 hb] + · rw [ite_eq_right ha, zero_mul, zero_mul] + +lemma colBare_congr (A : Three → Matrix ι ι ℂ) (g g' : Three → ι → ℝ) (v : Three) + (he : ∀ i, g' v i = g v i) : colBare A g' v = colBare A g v := by + ext a b + dsimp only [colBare, vertexRoot] + rw [Matrix.mul_diagonal, Matrix.mul_diagonal] + simp only [Matrix.conjTranspose_apply, rowStar_apply] + by_cases hb : b.1 = v + · rw [ite_eq_left hb, hb, he] + · rw [ite_eq_right hb, star_zero, zero_mul, zero_mul] + +lemma rowStar_mul_adjoint (A : Three → Matrix ι ι ℂ) (v : Three) : + rowStar A v * (rowStar A v)ᴴ = + blockD (fun w => if w = v then centerGram A v else 0) := by + rw [rowStar_eq_blocks] + let R : Matrix Three Three (Matrix ι ι ℂ) := fun a b => if a = v then triangleBlocks A a b else 0 + change blocks R * (blocks R)ᴴ = _ + rw [← blocks_star, ← blocks_mul] + unfold blockD + congr 1 + apply Matrix.ext + intro a b + change (∑ c, R a c * (R b c)ᴴ) = Matrix.diagonal (fun w => if w = v then centerGram A v else 0) a b + dsimp only [R] + by_cases ha : a = v <;> by_cases hb : b = v + · subst a + subst b + simp only [ite_true, Matrix.diagonal_apply_eq] + rfl + · simp [ha, hb, Ne.symm hb] + · simp [ha, hb] + · simp only [ite_eq_right ha, zero_mul, Finset.sum_const_zero] + by_cases hab : a = b + · subst b + rw [Matrix.diagonal_apply_eq, ite_eq_right ha] + · rw [Matrix.diagonal_apply_ne _ hab] + +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/TriangularHilbert/ZeroStar.lean b/lean/OAI/Analysis/TriangularHilbert/ZeroStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..a01b256cfd6624d667eff475d8e4242f880465d6 --- /dev/null +++ b/lean/OAI/Analysis/TriangularHilbert/ZeroStar.lean @@ -0,0 +1,89 @@ +import OAI.Analysis.TriangularHilbert.StarNorm + +namespace OAI + +universe uι + +section +namespace TriangularHilbert.MatrixEnergy +open scoped Matrix MatrixOrder Matrix.Norms.L2Operator ComplexOrder BigOperators +noncomputable section +variable {ι : Type uι} [Fintype ι] [DecidableEq ι] + +omit [Fintype ι] [DecidableEq ι] in +def replaceZero (A : Three → Matrix ι ι ℂ) (B : Matrix ι ι ℂ) : Three → Matrix ι ι ℂ := + fun v => if v = 0 then B else A v + +omit [Fintype ι] [DecidableEq ι] in +lemma weightedArray_sub (A B : Three → Matrix ι ι ℂ) (g : Three → ι → ℝ) : + weightedArray (A-B) g = weightedArray A g-weightedArray B g := by + ext v i j + simp [weightedArray,mul_sub,sub_mul] + +lemma rowStar_sub (A B : Three → Matrix ι ι ℂ) (v : Three) : + rowStar (A-B) v = rowStar A v-rowStar B v := by + ext ⟨a,i⟩ ⟨b,j⟩ + simp only [rowStar_apply,Matrix.sub_apply] + by_cases hv : a = v + · simp only [ite_eq_left hv] + fin_cases a <;> fin_cases b <;> simp [triangleBlocks] + · simp only [ite_eq_right hv,sub_self] + +omit [Fintype ι] [DecidableEq ι] in +lemma replaceZero_sub (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) : + replaceZero A B-replaceZero A C = replaceZero 0 (B-C) := by + ext v i j + by_cases hv : v=0 <;> simp [replaceZero,hv] + +omit [Fintype ι] [DecidableEq ι] in +lemma weightedArray_replaceZero_zero (B : Matrix ι ι ℂ) (g : Three → ι → ℝ) : + weightedArray (replaceZero 0 B) g = replaceZero 0 (fun i j => (Real.sqrt (g 0 i):ℂ)*B i j*(Real.sqrt (g 1 j):ℂ)) := by + ext v i j + by_cases hv : v=0 + · subst v + simp [weightedArray,replaceZero,show (0:Three)+1=1 by decide] + · simp [weightedArray,replaceZero,hv] + +lemma rowStar_replaceZero_two (A : Three → Matrix ι ι ℂ) (B C : Matrix ι ι ℂ) + (g : Three → ι → ℝ) : + rowStar (weightedArray (replaceZero A B) g) 2 = rowStar (weightedArray (replaceZero A C) g) 2 := by + ext ⟨a,i⟩ ⟨b,j⟩ + simp only [rowStar_apply] + by_cases ha : a=2 + · subst a + simp only [ite_true] + fin_cases b <;> simp [triangleBlocks,weightedArray,replaceZero] + · simp [ha] + +lemma jump_sum_zero (M : Three → Matrix ι ι ℂ) (B : Matrix ι ι ℂ) : + (∑ a, ∑ b, rowNorm (rowStar M 0) a*colNorm (rowStar M 0) b*‖rowStar (replaceZero 0 B) 0 a b‖) = + ∑ i, ∑ j, rowNorm (rowStar M 0) (0,i)*colNorm (rowStar M 0) (1,j)*‖B i j‖ := by + simp only [Fintype.sum_prod_type,rowStar_apply] + simp [Fin.sum_univ_three,triangleBlocks,replaceZero] + +lemma jump_sum_one (M : Three → Matrix ι ι ℂ) (B : Matrix ι ι ℂ) : + (∑ a, ∑ b, rowNorm (rowStar M 1) a*colNorm (rowStar M 1) b*‖rowStar (replaceZero 0 B) 1 a b‖) = + ∑ i, ∑ j, rowNorm (rowStar M 1) (1,j)*colNorm (rowStar M 1) (0,i)*‖B i j‖ := by + simp only [Fintype.sum_prod_type,rowStar_apply] + simp only [Fin.sum_univ_three] + simp only [show (1:Three) ≠ 0 by decide, show (2:Three) ≠ 1 by decide,show (0:Three) ≠ 1 by decide,ite_true,ite_false,triangleBlocks,replaceZero] + simp + rw [Finset.sum_comm] + +lemma weightedStar_replaceZero_norm_le (A : Three → Matrix ι ι ℂ) (B : Matrix ι ι ℂ) + (hB : ∀ i j, ‖B i j‖ ≤ ‖A 0 i j‖) (g : Three → ι → ℝ) (v : Three) (a b : BlockSpace ι) : + ‖rowStar (weightedArray (replaceZero A B) g) v a b‖ ≤ ‖rowStar (weightedArray A g) v a b‖ := by + apply rowStar_norm_mono _ v a b + intro w i j + simp only [weightedArray_norm] + apply mul_le_mul_of_nonneg_right _ (Real.sqrt_nonneg _) + apply mul_le_mul_of_nonneg_left _ (Real.sqrt_nonneg _) + by_cases hw : w=0 + · subst w + simpa only [replaceZero,ite_true] using hB i j + · simp [replaceZero,hw] +end +end TriangularHilbert.MatrixEnergy +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/AllDiscrete.lean b/lean/OAI/Analysis/Unitarizability/AllDiscrete.lean new file mode 100644 index 0000000000000000000000000000000000000000..07ebfcdfe0955c13b36aa1751f47b33e3c9c5445 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/AllDiscrete.lean @@ -0,0 +1,29 @@ +import Mathlib +import OAI.Analysis.Unitarizability.DiscreteModel +import OAI.Analysis.Unitarizability.NearOne +import OAI.Analysis.Unitarizability.Amenable + +namespace OAI + +noncomputable section +namespace Dixmier +universe u v + +theorem current_main_theorem : CurrentMainTheorem.{u,v} := by + intro G _ _ _ + constructor + · constructor + · intro hG + exact amenable_unitarizable hG + · intro hunit + by_contra hnot + obtain ⟨H, hnorm, hinner, hcomplete, π, _, hb, hn⟩ := + nonamenable_near_one_large.{u,v} hnot 1 zero_lt_one + exact hn (@hunit H hnorm hinner hcomplete π ⟨1 + 1, hb⟩) + · intro ε hε hG + exact nonamenable_near_one_large.{u,v} hG ε hε + +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Amenable.lean b/lean/OAI/Analysis/Unitarizability/Amenable.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0978db1a3baead96bd51f3dfb6e6a66e79666f8 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Amenable.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Analysis.Unitarizability.AveragedForm + +namespace OAI + +noncomputable section +namespace Dixmier +namespace DayDixmier +open scoped BoundedContinuousFunction ComplexConjugate +variable {G : Type*} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +theorem representation_similar {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [CompleteSpace H] (hG : Amenable G) (π : G →* (H →L[ℂ] H)) + (hb : ∃ C : ℝ, ∀ g, ‖π g‖ ≤ C) : SimilarToUnitary π := by + obtain ⟨m, h1, hp, hinv⟩ := hG + obtain ⟨C, hC⟩ := hb + let M : ℝ := max C 1 + have hM : 0 < M := lt_of_lt_of_le zero_lt_one (le_max_right _ _) + have hπ : ∀ g, ‖π g‖ ≤ M := fun g => (hC g).trans (le_max_left _ _) + let B : H →L⋆[ℂ] H →L[ℂ] ℂ := (averagedForm π hM.le hπ m).mkContinuous₂ + (2 * M^2) (averagedForm_bound π hM.le hπ m h1 hp) + let Q : H →L[ℂ] H := InnerProductSpace.continuousLinearMapOfBilin B + have hQ (x y : H) : inner ℂ (Q x) y = m (coefficient π hM.le hπ x y) := by + exact InnerProductSpace.continuousLinearMapOfBilin_apply B x y + have hQpos : Q.IsPositive := by + rw [ContinuousLinearMap.isPositive_iff_complex] + intro x + rw [hQ] + have h := averagedForm_nonneg π hM.le hπ m hp x + refine ⟨?_, h.1⟩ + apply Complex.ext <;> simp [h.2] + have hQnonneg : 0 ≤ Q := ContinuousLinearMap.nonneg_iff_isPositive.mpr hQpos + have hunit : IsUnit Q := by + apply ContinuousLinearMap.isUnit_of_forall_le_norm_inner_map Q + (c := ⟨(M^2)⁻¹, inv_nonneg.mpr (sq_nonneg M)⟩) + (by change (0 : ℝ) < (M^2)⁻¹; positivity) + intro x + change ‖x‖^2 * (M^2)⁻¹ ≤ _ + rw [hQ] + calc + ‖x‖^2 * (M^2)⁻¹ ≤ (m (coefficient π hM.le hπ x x)).re := by + rw [← div_eq_mul_inv, div_le_iff₀ (sq_pos_of_pos hM)] + simpa only [mul_comm] using averagedForm_lower π hM.le hπ m h1 hp x + _ ≤ ‖m (coefficient π hM.le hπ x x)‖ := Complex.re_le_norm _ + obtain ⟨s, hs⟩ := (CFC.isUnit_sqrt_iff Q hQnonneg).mpr hunit + let S : H ≃L[ℂ] H := ContinuousLinearEquiv.ofUnit s + have hS (x : H) : S x = CFC.sqrt Q x := by + change (s : H →L[ℂ] H) x = _ + rw [hs] + have hSsymmetric := (ContinuousLinearMap.nonneg_iff_isPositive.mp + (CFC.sqrt_nonneg Q)).isSymmetric + have hdiag (x : H) : ‖S x‖^2 = (m (coefficient π hM.le hπ x x)).re := by + rw [hS, ← inner_self_eq_norm_sq (𝕜 := ℂ)] + have heq : inner ℂ (CFC.sqrt Q x) (CFC.sqrt Q x) = inner ℂ (Q x) x := by + calc + _ = inner ℂ (CFC.sqrt Q (CFC.sqrt Q x)) x := (hSsymmetric _ _).symm + _ = inner ℂ (Q x) x := by + congr 1 + exact congrArg (fun T : H →L[ℂ] H => T x) (CFC.sqrt_mul_sqrt_self Q hQnonneg) + rw [heq, hQ, RCLike.re_to_complex] + refine ⟨S, ?_⟩ + intro g x + have hequal : ‖S (π g (S.symm x))‖^2 = ‖x‖^2 := by + rw [hdiag, coefficient_translate, hinv, ← hdiag, S.apply_symm_apply] + exact (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp hequal + +end DayDixmier + +universe v +variable {G : Type*} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +theorem amenable_unitarizable (hG : Amenable G) : Unitarizable.{_, v} G := by + intro H _ _ _ π hπ + exact DayDixmier.representation_similar hG π hπ + +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Average.lean b/lean/OAI/Analysis/Unitarizability/Average.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb7a91861292cfafe2890a5c296871fc0a231783 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Average.lean @@ -0,0 +1,88 @@ +import OAI.Analysis.Unitarizability.Regular +import Mathlib.Analysis.InnerProductSpace.Basic +import Mathlib.Analysis.Normed.Operator.BoundedLinearMaps + +namespace OAI + +/-! Finite-average identities for contracting averages in Hilbert spaces. -/ +noncomputable section +namespace Dixmier +open Finset +open scoped ComplexConjugate +variable {H I : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +/-- The finite Hilbert-space variance identity, without normalization. -/ +theorem sum_pairwise_sq (S : Finset I) (v : I → H) : + ∑ i ∈ S, ∑ j ∈ S, ‖v i - v j‖ ^ 2 = + 2 * (S.card : ℝ) * (∑ i ∈ S, ‖v i‖ ^ 2) - 2 * ‖∑ i ∈ S, v i‖ ^ 2 := by + have hs : (∑ i ∈ S, ∑ j ∈ S, (inner ℂ (v i) (v j)).re) = + ‖∑ i ∈ S, v i‖ ^ 2 := by + rw [← @inner_self_eq_norm_sq ℂ] + simp only [sum_inner, inner_sum, map_sum] + exact Finset.sum_comm + simp_rw [@norm_sub_sq ℂ H] + simp only [Finset.sum_add_distrib, Finset.sum_sub_distrib, + Finset.mul_sum, Finset.sum_const, nsmul_eq_mul] + rw [← Finset.mul_sum, ← Finset.mul_sum] + simp only [← Finset.mul_sum] + change _ - 2 * (∑ i ∈ S, ∑ j ∈ S, (inner ℂ (v i) (v j)).re) + _ = _ + rw [hs] + ring + +omit [InnerProductSpace ℂ H] in +/-- A chosen pair contributes at most the total squared defect. -/ +theorem pairwise_sq_le_sum (S : Finset I) (v : I → H) {i j : I} + (hi : i ∈ S) (hj : j ∈ S) : + ‖v i - v j‖ ^ 2 ≤ ∑ a ∈ S, ∑ b ∈ S, ‖v a - v b‖ ^ 2 := by + exact (Finset.single_le_sum (fun b _ => sq_nonneg ‖v i - v b‖) hj).trans + (Finset.single_le_sum (fun a _ => Finset.sum_nonneg (s := S) (fun b _ => sq_nonneg ‖v a - v b‖)) hi) + +variable {G : Type*} [Group G] +/-- Defect in a finite sum of right translations of a unit vector. -/ +theorem regular_sum_variance (S : Finset G) (ξ : ScalarL2 G) (hξ : ‖ξ‖ = 1) : + ∑ g ∈ S, ∑ h ∈ S, ‖rightRegular g ξ - rightRegular h ξ‖ ^ 2 = + 2 * ((S.card : ℝ) ^ 2 - ‖∑ g ∈ S, rightRegular g ξ‖ ^ 2) := by + rw [sum_pairwise_sq] + simp only [rightRegular_norm_map, hξ, one_pow, Finset.sum_const, nsmul_eq_mul, mul_one] + ring + +/-- A norm-one vector witnessing any strict lower bound for an operator norm. -/ +theorem exists_unit_near_opNorm (A : H →L[ℂ] H) {c : ℝ} + (hc : 0 ≤ c) (hA : c < ‖A‖) : ∃ ξ : H, ‖ξ‖ = 1 ∧ c < ‖A ξ‖ := by + by_contra h + push Not at h + exact (not_le_of_gt hA) (ContinuousLinearMap.opNorm_le_of_unit_norm hc h) + +/-- The norm-one-average hypothesis yields simultaneous almost invariance. -/ +theorem almost_invariant_of_sum_norm (S : Finset G) (h1 : (1 : G) ∈ S) + (hS : ‖∑ g ∈ S, rightRegular g‖ = (S.card : ℝ)) + {ε : ℝ} (hε : 0 < ε) : + ∃ ξ : ScalarL2 G, ‖ξ‖ = 1 ∧ ∀ g ∈ S, ‖rightRegular g ξ - ξ‖ < ε := by + have hd : (0 : ℝ) < S.card := by exact_mod_cast Finset.card_pos.mpr ⟨1, h1⟩ + let c := Real.sqrt (max 0 ((S.card : ℝ)^2 - ε^2/2)) + have hc : 0 ≤ c := Real.sqrt_nonneg _ + have hc2 : c^2 = max 0 ((S.card : ℝ)^2 - ε^2/2) := + Real.sq_sqrt (le_max_left _ _) + have hcd : c < (S.card : ℝ) := by + have hm : max 0 ((S.card : ℝ)^2 - ε^2/2) < (S.card : ℝ)^2 := + max_lt (sq_pos_of_pos hd) (by nlinarith [sq_pos_of_pos hε]) + nlinarith + obtain ⟨ξ, hξ, hclose⟩ := exists_unit_near_opNorm + (∑ g ∈ S, rightRegular g) hc (by rwa [hS]) + have hclose' : c < ‖∑ g ∈ S, rightRegular g ξ‖ := by + simpa only [_root_.sum_apply] using hclose + have hdefect : 2 * ((S.card : ℝ)^2 - ‖∑ g ∈ S, rightRegular g ξ‖^2) < ε^2 := by + have hm := le_max_right 0 ((S.card : ℝ)^2 - ε^2/2) + nlinarith [norm_nonneg (∑ g ∈ S, rightRegular g ξ)] + refine ⟨ξ, hξ, fun g hg => ?_⟩ + have hp := pairwise_sq_le_sum S (fun g => rightRegular g ξ) hg h1 + rw [regular_sum_variance S ξ hξ] at hp + have he : rightRegular (1 : G) ξ = ξ := by ext x; simp + rw [he] at hp + nlinarith [norm_nonneg (rightRegular g ξ - ξ)] + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/AveragedForm.lean b/lean/OAI/Analysis/Unitarizability/AveragedForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..011f173c54868746355a66cd85e7fbfb986621b1 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/AveragedForm.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.Analysis.Unitarizability.MeanBounds + +namespace OAI + +noncomputable section +namespace Dixmier +namespace DayDixmier +open scoped BoundedContinuousFunction ComplexConjugate +variable {G : Type*} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +section Form +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] +variable (π : G →* (H →L[ℂ] H)) {M : ℝ} (hM : 0 ≤ M) (hπ : ∀ g, ‖π g‖ ≤ M) + +def coefficient (x y : H) : G →ᵇ ℂ := + BoundedContinuousFunction.ofNormedAddCommGroupDiscrete + (fun g => inner ℂ (π g⁻¹ x) (π g⁻¹ y)) (M^2 * ‖x‖ * ‖y‖) (fun g => by + calc + ‖inner ℂ (π g⁻¹ x) (π g⁻¹ y)‖ ≤ ‖π g⁻¹ x‖ * ‖π g⁻¹ y‖ := norm_inner_le_norm _ _ + _ ≤ (M * ‖x‖) * (M * ‖y‖) := mul_le_mul + ((π g⁻¹).le_opNorm x |>.trans (mul_le_mul_of_nonneg_right (hπ _) (norm_nonneg _))) + ((π g⁻¹).le_opNorm y |>.trans (mul_le_mul_of_nonneg_right (hπ _) (norm_nonneg _))) + (norm_nonneg _) (mul_nonneg hM (norm_nonneg _)) + _ = M^2 * ‖x‖ * ‖y‖ := by ring) + +@[simp] lemma coefficient_apply (x y : H) (g : G) : + coefficient π hM hπ x y g = inner ℂ (π g⁻¹ x) (π g⁻¹ y) := rfl + +lemma coefficient_norm_le (x y : H) : + ‖coefficient π hM hπ x y‖ ≤ M^2 * ‖x‖ * ‖y‖ := by + unfold coefficient BoundedContinuousFunction.ofNormedAddCommGroupDiscrete + exact BoundedContinuousFunction.norm_ofNormedAddCommGroup_le _ (by positivity) _ + +lemma coefficient_add_left (x y z : H) : + coefficient π hM hπ (x + y) z = coefficient π hM hπ x z + coefficient π hM hπ y z := by + ext g + simp + +lemma coefficient_add_right (x y z : H) : + coefficient π hM hπ x (y + z) = coefficient π hM hπ x y + coefficient π hM hπ x z := by + ext g + simp + +lemma coefficient_smul_left (c : ℂ) (x y : H) : + coefficient π hM hπ (c • x) y = (starRingEnd ℂ c) • coefficient π hM hπ x y := by + ext g + simp [mul_comm] + +lemma coefficient_smul_right (c : ℂ) (x y : H) : + coefficient π hM hπ x (c • y) = c • coefficient π hM hπ x y := by + ext g + simp + +lemma coefficient_translate (h : G) (x y : H) : + coefficient π hM hπ (π h x) (π h y) = leftTranslate h (coefficient π hM hπ x y) := by + ext g + simp [leftTranslate, coefficient, map_mul, mul_apply_eq_comp] + +def averagedForm (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) : H →ₗ⋆[ℂ] H →ₗ[ℂ] ℂ where + toFun x := + { toFun y := m (coefficient π hM hπ x y) + map_add' y z := by rw [coefficient_add_right, map_add] + map_smul' c y := by rw [coefficient_smul_right, map_smul]; rfl } + map_add' x y := by + ext z + change m (coefficient π hM hπ (x + y) z) = _ + rw [coefficient_add_left, map_add] + rfl + map_smul' c x := by + ext y + change m (coefficient π hM hπ (c • x) y) = _ + rw [coefficient_smul_left, map_smul] + rfl + +lemma averagedForm_bound (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (h1 : m (BoundedContinuousFunction.const G 1) = 1) + (hp : ∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) (x y : H) : + ‖averagedForm π hM hπ m x y‖ ≤ (2 * M^2) * ‖x‖ * ‖y‖ := by + change ‖m (coefficient π hM hπ x y)‖ ≤ _ + calc + _ ≤ 2 * ‖coefficient π hM hπ x y‖ := mean_norm_le m h1 hp _ + _ ≤ 2 * (M^2 * ‖x‖ * ‖y‖) := mul_le_mul_of_nonneg_left + (coefficient_norm_le π hM hπ x y) (by norm_num) + _ = _ := by ring + +lemma averagedForm_nonneg (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (hp : ∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) (x : H) : + 0 ≤ (m (coefficient π hM hπ x x)).re ∧ (m (coefficient π hM hπ x x)).im = 0 := by + apply hp + intro g + simpa only [coefficient_apply, RCLike.re_to_complex, RCLike.im_to_complex] using + And.intro (inner_self_nonneg (𝕜 := ℂ) (x := π g⁻¹ x)) (inner_self_im (𝕜 := ℂ) (π g⁻¹ x)) + +lemma averagedForm_lower (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (h1 : m (BoundedContinuousFunction.const G 1) = 1) + (hp : ∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) (x : H) : + ‖x‖^2 ≤ M^2 * (m (coefficient π hM hπ x x)).re := by + have hnorm (g : G) : ‖x‖ ≤ M * ‖π g⁻¹ x‖ := by + calc + ‖x‖ = ‖π g (π g⁻¹ x)‖ := by simp [← mul_apply_eq_comp, ← map_mul] + _ ≤ ‖π g‖ * ‖π g⁻¹ x‖ := (π g).le_opNorm _ + _ ≤ M * ‖π g⁻¹ x‖ := mul_le_mul_of_nonneg_right (hπ g) (norm_nonneg _) + have hpos := hp (((M^2 : ℝ) : ℂ) • coefficient π hM hπ x x - + BoundedContinuousFunction.const G ((‖x‖^2 : ℝ) : ℂ)) (by + intro g + have hre : (inner ℂ (π g⁻¹ x) (π g⁻¹ x)).re = ‖π g⁻¹ x‖^2 := by + simpa only [RCLike.re_to_complex] using inner_self_eq_norm_sq (𝕜 := ℂ) (π g⁻¹ x) + have him : (inner ℂ (π g⁻¹ x) (π g⁻¹ x)).im = 0 := by + simpa only [RCLike.im_to_complex] using inner_self_im (𝕜 := ℂ) (π g⁻¹ x) + simp only [BoundedContinuousFunction.sub_apply, BoundedContinuousFunction.smul_apply, + BoundedContinuousFunction.const_apply, coefficient_apply, smul_eq_mul, Complex.sub_re, + Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero, + Complex.sub_im, Complex.mul_im, zero_add, hre, him, mul_zero] + constructor + · have hsqr := (sq_le_sq₀ (norm_nonneg x) + (mul_nonneg hM (norm_nonneg (π g⁻¹ x)))).mpr (hnorm g) + nlinarith [hsqr] + · simp) + rw [map_sub, map_smul, mean_const m h1] at hpos + simpa only [smul_eq_mul, Complex.sub_re, Complex.mul_re, Complex.ofReal_re, + Complex.ofReal_im, zero_mul, sub_zero, sub_nonneg] using hpos.1 + +end Form + +end DayDixmier +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Cocycle.lean b/lean/OAI/Analysis/Unitarizability/Cocycle.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d10519ee30e54e9e3f6c5977b99c072135e9eff --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Cocycle.lean @@ -0,0 +1,87 @@ +import Mathlib.Algebra.Group.Hom.Defs +import Mathlib.Algebra.GroupWithZero.Units.Basic +import Mathlib.Tactic.NoncommRing + +namespace OAI + +/-! Cocycle algebra in an arbitrary ring, specializing to bounded complex Hilbert-space operators. -/ +namespace Dixmier +section Ring +variable {G R : Type*} [Group G] [Ring R] + +def conjugate (U : G →* R) (g : G) (T : R) : R := U g * T * U g⁻¹ + +@[simp] theorem conjugate_one (U : G →* R) (T : R) : conjugate U 1 T = T := by + simp [conjugate] + +theorem conjugate_mul (U : G →* R) (g h : G) (T : R) : + conjugate U (g * h) T = conjugate U g (conjugate U h T) := by + simp [conjugate, map_mul, mul_assoc] + +theorem conjugate_sub (U : G →* R) (g : G) (A B : R) : + conjugate U g (A - B) = conjugate U g A - conjugate U g B := by + simp [conjugate, mul_sub, sub_mul] + +def coboundary (U : G →* R) (T : R) (g : G) : R := T - conjugate U g T + +@[simp] theorem coboundary_one (U : G →* R) (T : R) : coboundary U T 1 = 0 := by + simp [coboundary] + +/-- The coboundary cocycle identity, before taking direct sums. -/ +theorem coboundary_cocycle (U : G →* R) (T : R) (g h : G) : + coboundary U T (g * h) = coboundary U T g + conjugate U g (coboundary U T h) := by + simp only [coboundary, conjugate_mul, conjugate_sub] + abel + +theorem conjugate_eq_self_iff_commute (U : G →* R) (g : G) (T : R) : + conjugate U g T = T ↔ Commute (U g) T := by + have hinv : U g⁻¹ * U g = 1 := by rw [← map_mul]; simp + have hginv : U g * U g⁻¹ = 1 := by rw [← map_mul]; simp + constructor + · intro h + have hh := congrArg (fun x : R => x * U g) h + change U g * T = T * U g + simpa [conjugate, mul_assoc, hinv] using hh + · intro h + change U g * T * U g⁻¹ = T + rw [h.eq, mul_assoc, hginv, mul_one] + +/-- Comparing the two implementers gives the commutant element T - B. -/ +theorem equal_coboundaries_iff_commute_sub (U : G →* R) (T B : R) (g : G) : + coboundary U T g = coboundary U B g ↔ Commute (U g) (T - B) := by + rw [← conjugate_eq_self_iff_commute, conjugate_sub] + simp only [coboundary] + constructor + · intro h + calc + conjugate U g T - conjugate U g B = + (T - (T - conjugate U g T)) - (B - (B - conjugate U g B)) := by abel + _ = T - B := by rw [h]; abel + · intro h + calc + T - conjugate U g T = B - conjugate U g B + + ((T - B) - (conjugate U g T - conjugate U g B)) := by abel + _ = B - conjugate U g B := by rw [h]; abel + +/-- Algebraic upper triangular operator product, without any norm assertion. -/ +def triangular (a b : R) : R × R → R × R := + fun x => (a * x.1 + b * a * x.2, a * x.2) + +theorem triangular_cocycle_mul (U : G →* R) (D : G → R) + (hD : ∀ g h, D (g * h) = D g + conjugate U g (D h)) + (g h : G) (x : R × R) : + triangular (U g) (D g) (triangular (U h) (D h) x) = + triangular (U (g * h)) (D (g * h)) x := by + have hinv : U g⁻¹ * U g = 1 := by rw [← map_mul]; simp + have hinv_assoc (z : R) : U g⁻¹ * (U g * z) = z := by + rw [← mul_assoc, hinv, one_mul] + simp only [triangular, map_mul, hD, conjugate, Prod.mk.injEq] + constructor + · simp only [add_mul, mul_add, mul_assoc, hinv_assoc] + abel + · simp only [mul_assoc] + +end Ring +end Dixmier + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/CompactMean.lean b/lean/OAI/Analysis/Unitarizability/CompactMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac5dea5b37baa94144d9d18e16f2bc41250bb808 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/CompactMean.lean @@ -0,0 +1,89 @@ +import OAI.Analysis.Unitarizability.Model +import Mathlib.Analysis.Normed.Module.WeakDual +import OAI.Analysis.Unitarizability.Average + +namespace OAI + +/-! Weak-star compactness for positive normalized invariant means. -/ +noncomputable section +namespace Dixmier +open Filter Topology +open scoped BoundedContinuousFunction +variable {G : Type*} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +/-- Approximate positive normalized means, with all finite translation tests, +have a positive normalized invariant weak-star cluster point. -/ +theorem amenable_of_approximate_means + (h : ∀ (S : Finset G) (ε : ℝ), 0 < ε → + ∃ m : (G →ᵇ ℂ) →L[ℂ] ℂ, + ‖m‖ ≤ 1 ∧ m (BoundedContinuousFunction.const G (1 : ℂ)) = 1 ∧ + (∀ b : G →ᵇ ℂ, (∀ x, 0 ≤ (b x).re ∧ (b x).im = 0) → + 0 ≤ (m b).re ∧ (m b).im = 0) ∧ + ∀ g ∈ S, ∀ b : G →ᵇ ℂ, ‖m (leftTranslate g b) - m b‖ ≤ ε * ‖b‖) : + Amenable G := by + classical + let J := Finset G × ℕ + have hm : ∀ a : J, ∃ m : (G →ᵇ ℂ) →L[ℂ] ℂ, + ‖m‖ ≤ 1 ∧ m (BoundedContinuousFunction.const G (1 : ℂ)) = 1 ∧ + (∀ b : G →ᵇ ℂ, (∀ x, 0 ≤ (b x).re ∧ (b x).im = 0) → + 0 ≤ (m b).re ∧ (m b).im = 0) ∧ + ∀ g ∈ a.1, ∀ b : G →ᵇ ℂ, ‖m (leftTranslate g b) - m b‖ ≤ + (1 / ((a.2 : ℝ) + 1)) * ‖b‖ := by + intro a + exact h a.1 _ (by positivity) + choose m hm using hm + let μ : J → WeakDual ℂ (G →ᵇ ℂ) := fun a => StrongDual.toWeakDual (m a) + have hball : ∀ a, μ a ∈ WeakDual.toStrongDual ⁻¹' Metric.closedBall (0 : StrongDual ℂ (G →ᵇ ℂ)) 1 := by + intro a + change m a ∈ Metric.closedBall 0 1 + simpa [Metric.mem_closedBall, dist_zero_right] using (hm a).1 + obtain ⟨M, _, hM⟩ := (WeakDual.isCompact_closedBall (0 : StrongDual ℂ (G →ᵇ ℂ)) 1).exists_mapClusterPt + (f := (atTop : Filter J)) (u := μ) + (by + rw [Filter.le_principal_iff] + change ∀ᶠ a in (atTop : Filter J), μ a ∈ WeakDual.toStrongDual ⁻¹' Metric.closedBall (0 : StrongDual ℂ (G →ᵇ ℂ)) 1 + exact Filter.Eventually.of_forall hball) + refine ⟨M.toStrongDual.toLinearMap, ?_, ?_, ?_⟩ + · have hc : IsClosed {M : WeakDual ℂ (G →ᵇ ℂ) | M (BoundedContinuousFunction.const G (1 : ℂ)) = 1} := + isClosed_eq (WeakDual.eval_continuous _) continuous_const + exact hc.mem_of_mapClusterPt hM (Filter.Eventually.of_forall (fun a => (hm a).2.1)) + · intro b hb + have hr : IsClosed {M : WeakDual ℂ (G →ᵇ ℂ) | 0 ≤ (M b).re} := + isClosed_le continuous_const (Complex.continuous_re.comp (WeakDual.eval_continuous b)) + have hi : IsClosed {M : WeakDual ℂ (G →ᵇ ℂ) | (M b).im = 0} := + isClosed_eq (Complex.continuous_im.comp (WeakDual.eval_continuous b)) continuous_const + exact (hr.inter hi).mem_of_mapClusterPt hM + (Filter.Eventually.of_forall (fun a => (hm a).2.2.1 b hb)) + · intro g b + have hsmall : ∀ ε : ℝ, 0 < ε → ‖M (leftTranslate g b) - M b‖ ≤ ε := by + intro ε hε + have hc : IsClosed {M : WeakDual ℂ (G →ᵇ ℂ) | ‖M (leftTranslate g b) - M b‖ ≤ ε} := + isClosed_le (((WeakDual.eval_continuous (leftTranslate g b)).sub + (WeakDual.eval_continuous b)).norm) continuous_const + apply hc.mem_of_mapClusterPt hM + obtain ⟨n, hn⟩ := exists_nat_gt (‖b‖ / ε) + apply Filter.eventually_atTop.mpr + refine ⟨({g}, n), fun a ha => ?_⟩ + have hg : g ∈ a.1 := ha.1 (Finset.mem_singleton_self g) + have hna : (n : ℝ) ≤ a.2 := by exact_mod_cast ha.2 + have hpos : (0 : ℝ) < a.2 + 1 := by positivity + have hbn : ‖b‖ < ε * (n : ℝ) := by + have := (div_lt_iff₀ hε).mp hn + nlinarith + have he : (1 / ((a.2 : ℝ) + 1)) * ‖b‖ ≤ ε := by + rw [one_div_mul_eq_div] + apply (div_le_iff₀ hpos).mpr + nlinarith + exact ((hm a).2.2.2 g hg b).trans he + apply sub_eq_zero.mp + apply norm_eq_zero.mp + by_contra hne + have hp : 0 < ‖M (leftTranslate g b) - M b‖ := lt_of_le_of_ne (norm_nonneg _) (Ne.symm hne) + have := hsmall (‖M (leftTranslate g b) - M b‖ / 2) (by positivity) + linarith + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/ComplexFrames.lean b/lean/OAI/Analysis/Unitarizability/ComplexFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..50c0cc88354e52e2b2d7c4c48615e3e8515b494d --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/ComplexFrames.lean @@ -0,0 +1,67 @@ +import OAI.Analysis.Unitarizability.FiniteSynthesis +import OAI.Analysis.Unitarizability.SignMatrix + +namespace OAI + +/-! Complexification preserves real synthesis norm bounds. +The real and imaginary coefficient vectors are handled separately. -/ +noncomputable section +namespace Dixmier +namespace ComplexFrames +open Finset +variable {I K : Type*} [Fintype K] +local instance : DecidableEq I := Classical.decEq I + +def ofReal (v : EuclideanSpace ℝ K) : EuclideanSpace ℂ K := WithLp.toLp 2 (fun a => (v a : ℂ)) +def realPart (z : EuclideanSpace ℂ K) : EuclideanSpace ℝ K := WithLp.toLp 2 (fun a => (z a).re) +def imagPart (z : EuclideanSpace ℂ K) : EuclideanSpace ℝ K := WithLp.toLp 2 (fun a => (z a).im) + +theorem ofReal_norm (v : EuclideanSpace ℝ K) : ‖ofReal v‖ = ‖v‖ := by + have h : ‖ofReal v‖^2 = ‖v‖^2 := by + simp only [EuclideanSpace.norm_sq_eq, ofReal, Complex.norm_real] + nlinarith [norm_nonneg (ofReal v), norm_nonneg v] + +theorem norm_sq_split (z : EuclideanSpace ℂ K) : + ‖z‖^2 = ‖realPart z‖^2 + ‖imagPart z‖^2 := by + simp only [EuclideanSpace.norm_sq_eq, realPart, imagPart, + Real.norm_eq_abs, sq_abs, ← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro a ha + rw [← Complex.normSq_eq_norm_sq, Complex.normSq_apply] + ring + +theorem synthesis_realPart (v : I → EuclideanSpace ℝ K) (J : Finset I) (z : EuclideanSpace ℂ J) : + realPart (FiniteSynthesis.synthesis (fun i => ofReal (v i)) J z) = + ∑ i : J, (realPart z) i • v i := by + ext a + simp only [FiniteSynthesis.synthesis_apply, realPart, ofReal, WithLp.ofLp_toLp, + WithLp.ofLp_sum, Finset.sum_apply, PiLp.smul_apply, smul_eq_mul, Complex.re_sum, + Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, mul_zero, sub_zero] + +theorem synthesis_imagPart (v : I → EuclideanSpace ℝ K) (J : Finset I) (z : EuclideanSpace ℂ J) : + imagPart (FiniteSynthesis.synthesis (fun i => ofReal (v i)) J z) = + ∑ i : J, (imagPart z) i • v i := by + ext a + simp only [FiniteSynthesis.synthesis_apply, imagPart, ofReal, WithLp.ofLp_toLp, + WithLp.ofLp_sum, Finset.sum_apply, PiLp.smul_apply, smul_eq_mul, Complex.im_sum, + Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, mul_zero, zero_add] + +theorem synthesis_bound (v : I → EuclideanSpace ℝ K) (J : Finset I) {b : ℝ} (hb : 0 ≤ b) + (h : ∀ z : EuclideanSpace ℝ J, ‖∑ i : J, z i • v i‖ ≤ b*‖z‖) : + ‖FiniteSynthesis.synthesis (fun i => ofReal (v i)) J‖ ≤ b := by + apply ContinuousLinearMap.opNorm_le_bound _ hb + intro z + have hr := pow_le_pow_left₀ (norm_nonneg _) (h (realPart z)) 2 + have hi := pow_le_pow_left₀ (norm_nonneg _) (h (imagPart z)) 2 + have hsq : ‖FiniteSynthesis.synthesis (fun i => ofReal (v i)) J z‖^2 ≤ b^2*‖z‖^2 := by + rw [norm_sq_split, synthesis_realPart, synthesis_imagPart, norm_sq_split z] + nlinarith [hr, hi] + nlinarith [norm_nonneg (FiniteSynthesis.synthesis (fun i => ofReal (v i)) J z), + norm_nonneg z, mul_nonneg hb (norm_nonneg z)] + +end ComplexFrames +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Contracting.lean b/lean/OAI/Analysis/Unitarizability/Contracting.lean new file mode 100644 index 0000000000000000000000000000000000000000..86eb918573dde946b82d7ca36e198fc71125c55e --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Contracting.lean @@ -0,0 +1,114 @@ +import OAI.Analysis.Unitarizability.VectorMean +import OAI.Analysis.Unitarizability.CompactMean + +namespace OAI + +/-! Contracting averages and sparse splitting for nonamenable groups. -/ +noncomputable section +namespace Dixmier +open Finset +open scoped BoundedContinuousFunction +variable {G : Type*} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +omit [TopologicalSpace G] [DiscreteTopology G] in +theorem rightRegular_opNorm (g : G) : ‖rightRegular g‖ = 1 := by + classical + apply le_antisymm + · apply ContinuousLinearMap.opNorm_le_bound _ (by norm_num) + intro ξ + simp [rightRegular_norm_map] + · have h := (rightRegular g).le_opNorm (indicatorL2 ({1} : Finset G)) + simpa [rightRegular_norm_map, indicatorL2_norm] using h + +omit [TopologicalSpace G] [DiscreteTopology G] in +theorem regular_sum_norm_le (S : Finset G) : + ‖∑ g ∈ S, rightRegular g‖ ≤ (S.card : ℝ) := by + calc + ‖∑ g ∈ S, rightRegular g‖ ≤ ∑ g ∈ S, ‖rightRegular g‖ := norm_sum_le _ _ + _ = (S.card : ℝ) := by simp [rightRegular_opNorm] + +/-- Contrapositive analytic argument using the invariant-mean definition. -/ +theorem amenable_of_all_sum_norm + (h : ∀ S : Finset G, 1 ∈ S → ‖∑ g ∈ S, rightRegular g‖ = (S.card : ℝ)) : + Amenable G := by + classical + apply amenable_of_approximate_means + intro S ε hε + let T := insert 1 (S.image fun g => g⁻¹) + have h1 : (1 : G) ∈ T := mem_insert_self _ _ + obtain ⟨ξ, hξ, hinv⟩ := almost_invariant_of_sum_norm T h1 (h T h1) + (show 0 < ε / 2 by positivity) + refine ⟨vectorMean ξ, ?_, ?_, vectorMean_positive ξ, ?_⟩ + · simpa [hξ] using vectorMean_opNorm_le ξ + · rw [vectorMean_one, hξ] + norm_num + · intro g hg b + have hg' : g⁻¹ ∈ T := mem_insert_of_mem (mem_image.mpr ⟨g, hg, rfl⟩) + have hb := vectorMean_translation_bound ξ hξ g b + have hi := hinv g⁻¹ hg' + calc + ‖vectorMean ξ (leftTranslate g b) - vectorMean ξ b‖ ≤ 2 * ‖b‖ * ‖rightRegular g⁻¹ ξ - ξ‖ := hb + _ ≤ 2 * ‖b‖ * (ε / 2) := mul_le_mul_of_nonneg_left hi.le (by positivity) + _ = ε * ‖b‖ := by ring + +/-- Nonamenability provides a strict contraction after normalization. -/ +theorem exists_contracting_sum (hG : ¬ Amenable G) : + ∃ S : Finset G, 1 ∈ S ∧ 2 ≤ S.card ∧ + ∃ ρ : ℝ, 0 < ρ ∧ ρ < 1 ∧ ‖∑ g ∈ S, rightRegular g‖ ≤ (S.card : ℝ) * ρ := by + classical + have hex : ∃ S : Finset G, 1 ∈ S ∧ ‖∑ g ∈ S, rightRegular g‖ < (S.card : ℝ) := by + by_contra hnot + push Not at hnot + exact hG (amenable_of_all_sum_norm (fun S h1 => le_antisymm (regular_sum_norm_le S) (hnot S h1))) + obtain ⟨S, h1, hlt⟩ := hex + have hd : 0 < S.card := card_pos.mpr ⟨1, h1⟩ + have hd2 : 2 ≤ S.card := by + by_contra hnot + have hc : S.card = 1 := by omega + obtain ⟨g, rfl⟩ := card_eq_one.mp hc + have hg : g = 1 := by simpa [eq_comm] using h1 + subst g + simp only [sum_singleton, rightRegular_opNorm, card_singleton, Nat.cast_one, lt_self_iff_false] at hlt + have hdR : (0 : ℝ) < S.card := by exact_mod_cast hd + obtain ⟨t, hAt, htd⟩ := exists_between hlt + have ht : 0 < t := lt_of_le_of_lt (norm_nonneg _) hAt + refine ⟨S, h1, hd2, t / S.card, div_pos ht hdR, (div_lt_one hdR).mpr htd, ?_⟩ + rw [mul_div_cancel₀ _ hdR.ne'] + exact hAt.le + +/-- A contracting average with e ∈ S, d ≥ 2, and 0 < ρ < 1. -/ +theorem contracting_average (hG : ¬ Amenable G) : + ∃ S : Finset G, 1 ∈ S ∧ 2 ≤ S.card ∧ + ∃ ρ : ℝ, 0 < ρ ∧ ρ < 1 ∧ + ‖((S.card : ℂ)⁻¹) • (∑ g ∈ S, rightRegular g)‖ ≤ ρ := by + obtain ⟨S, h1, hd, ρ, hρ, hρ1, hsum⟩ := exists_contracting_sum hG + refine ⟨S, h1, hd, ρ, hρ, hρ1, ?_⟩ + have hdR : (0 : ℝ) < S.card := by exact_mod_cast (by omega : 0 < S.card) + rw [norm_smul, norm_inv] + simp only [Complex.norm_natCast] + calc + (S.card : ℝ)⁻¹ * ‖∑ g ∈ S, rightRegular g‖ ≤ (S.card : ℝ)⁻¹ * ((S.card : ℝ) * ρ) := + mul_le_mul_of_nonneg_left hsum (inv_nonneg.mpr hdR.le) + _ = ρ := by field_simp + +/-- Sparse splitting from nonamenability. A single S and ρ work for every +positive word length; all words remain separate labels, even when their group products agree. -/ +theorem sparse_splitting_of_nonamenable (hG : ¬ Amenable G) : + ∃ S : Finset G, 1 ∈ S ∧ 2 ≤ S.card ∧ ∃ ρ : ℝ, 0 < ρ ∧ ρ < 1 ∧ + ∀ ℓ : ℕ, 0 < ℓ → ∃ a : G → Word S ℓ → Bool, + (∀ x, (rowOnes a x).card ≤ ⌈(S.card : ℝ)^ℓ * ρ^ℓ⌉₊) ∧ + ∀ y, (columnZeros a (wordProduct (fun s : S => (s : G)) ℓ) y).card ≤ + ⌈(S.card : ℝ)^ℓ * ρ^ℓ⌉₊ := by + classical + obtain ⟨S, h1, hd, ρ, hρ, hρ1, hsum⟩ := exists_contracting_sum hG + refine ⟨S, h1, hd, ρ, hρ, hρ1, fun ℓ hℓ => ?_⟩ + have hsum' : ‖∑ g : S, rightRegular (g : G)‖ ≤ (Fintype.card S : ℝ) * ρ := by + simpa only [Fintype.card_coe, Finset.sum_coe_sort] using hsum + simpa only [Fintype.card_coe] using + sparse_mask_for_words (fun s : S => (s : G)) hρ.le hsum' ℓ hℓ + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/DiscreteModel.lean b/lean/OAI/Analysis/Unitarizability/DiscreteModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..c651f9793e44db9b680f395d17da978386a6f7e6 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/DiscreteModel.lean @@ -0,0 +1,21 @@ +import OAI.Analysis.Unitarizability.Model + +namespace OAI + +noncomputable section +namespace Dixmier +universe u v + +def CurrentMainTheorem : Prop := + ∀ (G : Type u) [Group G] [TopologicalSpace G] [DiscreteTopology G], + (Amenable G ↔ Unitarizable.{u, max u v} G) ∧ + ∀ (ε : ℝ), 0 < ε → ¬ Amenable G → + ∃ (H : Type (max u v)) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) + (_ : CompleteSpace H) (π : G →* (H →L[ℂ] H)), + (Countable G → TopologicalSpace.SeparableSpace H) ∧ + (∀ g, ‖π g‖ ≤ 1 + ε) ∧ ¬ SimilarToUnitary π + +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/EndpointAssignment.lean b/lean/OAI/Analysis/Unitarizability/EndpointAssignment.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6b24d4d724b25d245673e216aa7bbdf9c0fc120 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/EndpointAssignment.lean @@ -0,0 +1,145 @@ +import Mathlib.Combinatorics.Hall.Basic +import OAI.Analysis.Unitarizability.SparseMask + +namespace OAI + +/-! Infinite endpoint assignment from a finite density inequality. +No countability or distinctness assumption on the edge labels is needed. -/ +noncomputable section +namespace Dixmier +open Finset +attribute [local instance] Classical.propDecidable + +variable {E V W : Type*} + +def endpointSlots (row : E → V) (col : E → W) (r : ℕ) + (e : E) : Finset ((V × Fin r) ⊕ (W × Fin r)) := + (({row e} : Finset V) ×ˢ univ).disjSum (({col e} : Finset W) ×ˢ univ) + +/-- All neighboring slots of a finite edge set: endpoints have distinct copies. -/ +theorem endpointSlots_biUnion (row : E → V) (col : E → W) (r : ℕ) + (F : Finset E) : + F.biUnion (endpointSlots row col r) = + ((F.image row) ×ˢ (univ : Finset (Fin r))).disjSum ((F.image col) ×ˢ univ) := by + classical + ext z + rcases z with ⟨v, j⟩ | ⟨w, j⟩ <;> simp [endpointSlots] + +/-- Infinite Hall matching with r slots at every row and every column. -/ +theorem exists_endpoint_assignment (row : E → V) (col : E → W) (r : ℕ) + (hdensity : ∀ F : Finset E, F.card ≤ r * ((F.image row).card + (F.image col).card)) : + ∃ f : E → (V × Fin r) ⊕ (W × Fin r), Function.Injective f ∧ + ∀ e, f e ∈ endpointSlots row col r e := by + classical + apply (all_card_le_biUnion_card_iff_exists_injective (endpointSlots row col r)).mp + intro F + rw [endpointSlots_biUnion] + simpa only [card_disjSum, card_product, card_univ, Fintype.card_fin, Nat.mul_add, + Nat.mul_comm] using hdensity F + +def slotIndex {r : ℕ} : (V × Fin r) ⊕ (W × Fin r) → Fin r + | .inl p => p.2 + | .inr p => p.2 + +def isRowSlot {r : ℕ} : (V × Fin r) ⊕ (W × Fin r) → Bool + | .inl _ => true + | .inr _ => false + +private theorem assigned_row_eq {row : E → V} {col : E → W} {r : ℕ} + {f : E → (V × Fin r) ⊕ (W × Fin r)} + (hf : ∀ e, f e ∈ endpointSlots row col r e) (e : E) (h : isRowSlot (f e) = true) : + f e = Sum.inl (row e, slotIndex (f e)) := by + have hm := hf e + cases he : f e with + | inl p => + simp [he, endpointSlots] at hm + rcases p with ⟨v, j⟩ + simp_all [slotIndex] + | inr p => simp [he, isRowSlot] at h + +private theorem assigned_col_eq {row : E → V} {col : E → W} {r : ℕ} + {f : E → (V × Fin r) ⊕ (W × Fin r)} + (hf : ∀ e, f e ∈ endpointSlots row col r e) (e : E) (h : isRowSlot (f e) = false) : + f e = Sum.inr (col e, slotIndex (f e)) := by + have hm := hf e + cases he : f e with + | inl p => simp [he, isRowSlot] at h + | inr p => + simp [he, endpointSlots] at hm + rcases p with ⟨v, j⟩ + simp_all [slotIndex] + +/-- Injectivity of the slot assignment bounds every finite row load. -/ +theorem assigned_row_card_le {row : E → V} {col : E → W} {r : ℕ} + {f : E → (V × Fin r) ⊕ (W × Fin r)} + (hinj : Function.Injective f) (hf : ∀ e, f e ∈ endpointSlots row col r e) + (v : V) (F : Finset E) (hF : ∀ e ∈ F, row e = v ∧ isRowSlot (f e) = true) : + F.card ≤ r := by + classical + have hi : Set.InjOn (fun e => slotIndex (f e)) (↑F : Set E) := by + intro e he e' he' hh + dsimp only at hh + apply hinj + rw [assigned_row_eq hf e (hF e he).2, assigned_row_eq hf e' (hF e' he').2] + rw [(hF e he).1, (hF e' he').1, hh] + calc + F.card = (F.image (fun e => slotIndex (f e))).card := (card_image_of_injOn hi).symm + _ ≤ Fintype.card (Fin r) := card_le_univ _ + _ = r := Fintype.card_fin r + +/-- Injectivity also bounds every finite column load. -/ +theorem assigned_col_card_le {row : E → V} {col : E → W} {r : ℕ} + {f : E → (V × Fin r) ⊕ (W × Fin r)} + (hinj : Function.Injective f) (hf : ∀ e, f e ∈ endpointSlots row col r e) + (w : W) (F : Finset E) (hF : ∀ e ∈ F, col e = w ∧ isRowSlot (f e) = false) : + F.card ≤ r := by + classical + have hi : Set.InjOn (fun e => slotIndex (f e)) (↑F : Set E) := by + intro e he e' he' hh + dsimp only at hh + apply hinj + rw [assigned_col_eq hf e (hF e he).2, assigned_col_eq hf e' (hF e' he').2] + rw [(hF e he).1, (hF e' he').1, hh] + calc + F.card = (F.image (fun e => slotIndex (f e))).card := (card_image_of_injOn hi).symm + _ ≤ Fintype.card (Fin r) := card_le_univ _ + _ = r := Fintype.card_fin r + +/-- A sparse mask from finite endpoint density. -/ +theorem exists_sparse_mask {G I : Type*} [Group G] [Fintype I] (s : I → G) (r : ℕ) + (hdensity : ∀ F : Finset (G × I), F.card ≤ + r * ((F.image Prod.fst).card + (F.image (fun e => e.1 * s e.2)).card)) : + ∃ a : G → I → Bool, (∀ x, (rowOnes a x).card ≤ r) ∧ + ∀ y, (columnZeros a s y).card ≤ r := by + classical + obtain ⟨f, hinj, hf⟩ := exists_endpoint_assignment Prod.fst (fun e : G × I => e.1 * s e.2) r hdensity + let a : G → I → Bool := fun x i => isRowSlot (f (x, i)) + refine ⟨a, ?_, ?_⟩ + · intro x + let F := (rowOnes a x).image (fun i => (x, i)) + have hF : ∀ e ∈ F, e.1 = x ∧ isRowSlot (f e) = true := by + rintro e he + obtain ⟨i, hi, rfl⟩ := mem_image.mp he + exact ⟨rfl, (mem_filter.mp hi).2⟩ + have hbound := assigned_row_card_le hinj hf x F hF + have hi : Function.Injective (fun i : I => (x, i)) := by + intro i j h + exact congrArg Prod.snd h + simpa only [F, card_image_of_injective _ hi] using hbound + · intro y + let F := (columnZeros a s y).image (fun i => (y * (s i)⁻¹, i)) + have hF : ∀ e ∈ F, e.1 * s e.2 = y ∧ isRowSlot (f e) = false := by + rintro e he + obtain ⟨i, hi, rfl⟩ := mem_image.mp he + exact ⟨by simp, (mem_filter.mp hi).2⟩ + have hbound := assigned_col_card_le hinj hf y F hF + have hi : Function.Injective (fun i => (y * (s i)⁻¹, i)) := by + intro i j h + exact congrArg Prod.snd h + simpa only [F, card_image_of_injective _ hi] using hbound + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/FiniteSigns.lean b/lean/OAI/Analysis/Unitarizability/FiniteSigns.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9d9d48d6b732a719864b8f34fbbd9c8be6817ce --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/FiniteSigns.lean @@ -0,0 +1,110 @@ +import Mathlib.Analysis.SpecialFunctions.Trigonometric.Series +import Mathlib.Algebra.BigOperators.Ring.Finset +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.Linarith + +namespace OAI + +/-! Finite independent signs. Expectations are explicit finite sums over all sign +assignments with equal weight. -/ +noncomputable section +namespace Dixmier +namespace FiniteSigns +open Finset +variable {J : Type*} [Fintype J] +local instance : DecidableEq J := Classical.decEq J + +def sign (b : Bool) : ℝ := if b then 1 else -1 + +def value (a : J → ℝ) (σ : J → Bool) : ℝ := ∑ j, a j * sign (σ j) + +theorem sign_mgf (a : J → ℝ) : + ∑ σ : J → Bool, Real.exp (value a σ) = + (2 : ℝ) ^ Fintype.card J * ∏ j, Real.cosh (a j) := by + simp only [value, Real.exp_sum] + rw [← Fintype.prod_sum (fun j (b : Bool) => Real.exp (a j * sign b))] + have h (j : J) : (∑ b : Bool, Real.exp (a j * sign b)) = 2 * Real.cosh (a j) := by + simp [sign, Real.cosh_eq] + ring + simp_rw [h] + rw [Finset.prod_mul_distrib] + simp + +theorem sign_mgf_le (a : J → ℝ) : + ∑ σ : J → Bool, Real.exp (value a σ) ≤ + (2 : ℝ) ^ Fintype.card J * Real.exp ((∑ j, (a j)^2) / 2) := by + rw [sign_mgf] + apply mul_le_mul_of_nonneg_left _ (by positivity) + calc + ∏ j, Real.cosh (a j) ≤ ∏ j, Real.exp ((a j)^2/2) := + Finset.prod_le_prod₀ (fun j _ => (Real.cosh_pos _).le) (fun j _ => Real.cosh_le_exp_half_sq _) + _ = _ := by rw [← Real.exp_sum]; simp only [div_eq_mul_inv, Finset.sum_mul] + +theorem value_smul (a : J → ℝ) (t : ℝ) (σ : J → Bool) : + value (fun j => t * a j) σ = t * value a σ := by + simp only [value, Finset.mul_sum, mul_assoc] + +/-- Finite Markov inequality for the equiprobable sign space. -/ +theorem upper_tail_mgf (a : J → ℝ) {t u : ℝ} (ht : 0 ≤ t) : + (((univ.filter fun σ : J → Bool => u < value a σ).card : ℕ) : ℝ) * Real.exp (t*u) ≤ + (2 : ℝ) ^ Fintype.card J * Real.exp (t^2 * (∑ j, (a j)^2) / 2) := by + classical + let S := univ.filter (fun σ : J → Bool => u < value a σ) + have h1 : (S.card : ℝ) * Real.exp (t*u) ≤ ∑ σ ∈ S, Real.exp (t * value a σ) := by + calc + _ = ∑ σ ∈ S, Real.exp (t*u) := by simp + _ ≤ _ := Finset.sum_le_sum (fun σ hσ => Real.exp_le_exp.mpr + (mul_le_mul_of_nonneg_left (Finset.mem_filter.mp hσ).2.le ht)) + have h2 : (∑ σ ∈ S, Real.exp (t * value a σ)) ≤ ∑ σ : J → Bool, Real.exp (t * value a σ) := + Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun _ _ _ => (Real.exp_pos _).le) + have h3 := sign_mgf_le (fun j => t*a j) + simp only [value_smul, mul_pow, ← Finset.mul_sum] at h3 + exact h1.trans (h2.trans h3) + +/-- One-sided sign tail for coefficients of total squared size 1/k. -/ +theorem upper_tail (a : J → ℝ) {k u : ℝ} (hk : 0 < k) (hu : 0 < u) + (ha : ∑ j, (a j)^2 = 1/k) : + (((univ.filter fun σ : J → Bool => u < value a σ).card : ℕ) : ℝ) ≤ + (2 : ℝ) ^ Fintype.card J * Real.exp (-k*u^2/2) := by + have h := upper_tail_mgf a (mul_nonneg hk.le hu.le) (u := u) + rw [ha] at h + have hexp : (k*u)^2*(1/k)/2 = (-k*u^2/2) + (k*u)*u := by field_simp; ring + rw [hexp, Real.exp_add, ← mul_assoc] at h + exact (mul_le_mul_iff_left₀ (Real.exp_pos ((k*u)*u))).mp h + + +theorem value_neg (a : J → ℝ) (σ : J → Bool) : value (fun j => -a j) σ = -value a σ := by + simp [value, Finset.sum_neg_distrib] + +/-- The two-sided sign-tail bound as a fraction of the finite equiprobable sign space. -/ +theorem two_sided_tail (a : J → ℝ) {k u : ℝ} (hk : 0 < k) (hu : 0 < u) + (ha : ∑ j, (a j)^2 = 1/k) : + (((univ.filter fun σ : J → Bool => u < |value a σ|).card : ℕ) : ℝ) / + (2 : ℝ)^Fintype.card J ≤ 2 * Real.exp (-k*u^2/2) := by + classical + have hn : ∑ j, (-a j)^2 = 1/k := by simpa only [neg_sq] using ha + have hp := upper_tail a hk hu ha + have hm := upper_tail (fun j => -a j) hk hu hn + have hs : (univ.filter fun σ : J → Bool => u < |value a σ|) ⊆ + (univ.filter fun σ : J → Bool => u < value a σ) ∪ + (univ.filter fun σ : J → Bool => u < value (fun j => -a j) σ) := by + intro σ hσ + simp only [mem_filter, mem_univ, true_and, mem_union, value_neg] at * + rcases lt_abs.mp hσ with h | h + · exact Or.inl h + · exact Or.inr (by linarith) + have hcard := (Finset.card_le_card hs).trans (Finset.card_union_le _ _) + have hr : (((univ.filter fun σ : J → Bool => u < |value a σ|).card : ℕ) : ℝ) ≤ + (((univ.filter fun σ : J → Bool => u < value a σ).card : ℕ) : ℝ) + + (((univ.filter fun σ : J → Bool => u < value (fun j => -a j) σ).card : ℕ) : ℝ) := by + exact_mod_cast hcard + apply (div_le_iff₀ (by positivity : (0 : ℝ) < 2 ^ Fintype.card J)).mpr + nlinarith + + +end FiniteSigns +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/FiniteSynthesis.lean b/lean/OAI/Analysis/Unitarizability/FiniteSynthesis.lean new file mode 100644 index 0000000000000000000000000000000000000000..27bcd0230ebe31ce8b56568ba324365427043a06 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/FiniteSynthesis.lean @@ -0,0 +1,55 @@ +import OAI.Analysis.Unitarizability.KernelEnergy +import Mathlib.Analysis.InnerProductSpace.Adjoint + +namespace OAI + +/-! Finite synthesis maps and their adjoints, with bounds for all small subfamilies. -/ +noncomputable section +namespace Dixmier +namespace FiniteSynthesis +open scoped ComplexConjugate +variable {I K : Type*} [Fintype K] +local instance : DecidableEq I := Classical.decEq I + +def synthesis (v : I → EuclideanSpace ℂ K) (J : Finset I) : + EuclideanSpace ℂ J →L[ℂ] EuclideanSpace ℂ K := + ∑ i : J, InnerProductSpace.rankOne ℂ (v i) (EuclideanSpace.basisFun J ℂ i) + +@[simp] theorem synthesis_apply (v : I → EuclideanSpace ℂ K) (J : Finset I) + (z : EuclideanSpace ℂ J) : synthesis v J z = ∑ i : J, z i • v i := by + simp only [synthesis, _root_.sum_apply, InnerProductSpace.rankOne_apply, EuclideanSpace.basisFun_inner] + +@[simp] theorem synthesis_adjoint_apply (v : I → EuclideanSpace ℂ K) (J : Finset I) + (x : EuclideanSpace ℂ K) (i : J) : (synthesis v J).adjoint x i = inner ℂ (v i) x := by + rw [← EuclideanSpace.basisFun_inner, ContinuousLinearMap.adjoint_inner_right] + have h : synthesis v J (EuclideanSpace.basisFun J ℂ i) = v i := by + simp [synthesis_apply, EuclideanSpace.basisFun_apply, PiLp.single_apply] + rw [h] + +/-- The synthesis operator bound on subfamily coordinate spaces, +including the empty subfamily. -/ +def FrameBound (v : I → EuclideanSpace ℂ K) (p : ℕ) (b : ℝ) : Prop := + ∀ J : Finset I, J.card ≤ p → ‖synthesis v J‖ ≤ b + +theorem synthesis_sq_le (v : I → EuclideanSpace ℂ K) (J : Finset I) {b : ℝ} + (_hb : 0 ≤ b) (hJ : ‖synthesis v J‖ ≤ b) (z : J → ℂ) : + ‖∑ i : J, z i • v i‖^2 ≤ b^2 * ∑ i : J, ‖z i‖^2 := by + let z' : EuclideanSpace ℂ J := WithLp.toLp 2 z + have h := (synthesis v J).le_of_opNorm_le hJ z' + have hpow := pow_le_pow_left₀ (norm_nonneg _) h 2 + simpa only [synthesis_apply, mul_pow, EuclideanSpace.norm_sq_eq] using hpow + +theorem analysis_sq_le (v : I → EuclideanSpace ℂ K) (J : Finset I) {b : ℝ} + (_hb : 0 ≤ b) (hJ : ‖synthesis v J‖ ≤ b) (x : EuclideanSpace ℂ K) : + ∑ i : J, ‖inner ℂ (v i) x‖^2 ≤ b^2 * ‖x‖^2 := by + have hj : ‖(synthesis v J).adjoint‖ ≤ b := by simpa using hJ + have h := (synthesis v J).adjoint.le_of_opNorm_le hj x + have hpow := pow_le_pow_left₀ (norm_nonneg _) h 2 + simpa only [EuclideanSpace.norm_sq_eq, synthesis_adjoint_apply, mul_pow] using hpow + +end FiniteSynthesis +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/FrameParameters.lean b/lean/OAI/Analysis/Unitarizability/FrameParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..4253367509b21f8f6beb72ef1eac6382d767a818 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/FrameParameters.lean @@ -0,0 +1,80 @@ +import OAI.Analysis.Unitarizability.Parameters +import Mathlib.Analysis.Complex.ExponentialBounds + +namespace OAI + +/-! Ceiling dimensions and finite union-bound arithmetic for frames. -/ +noncomputable section +namespace Dixmier +namespace FrameParameters + +def dimension (n r : ℕ) : ℕ := ⌈2 * (r : ℝ) * Real.log (2 * (n : ℝ))⌉₊ +def subfamilySize (n r : ℕ) : ℕ := min (2*r) n + +theorem bounds {n r : ℕ} (hn : 2 ≤ n) (hr : 1 ≤ r) : + 1 ≤ dimension n r ∧ subfamilySize n r ≤ dimension n r ∧ + (subfamilySize n r : ℝ) * Real.log n ≤ dimension n r := by + have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) + have hn2 : (2 : ℝ) ≤ n := by exact_mod_cast hn + have hr1 : (1 : ℝ) ≤ r := by exact_mod_cast hr + have hlog : 1 < Real.log (2 * (n : ℝ)) := by + apply Real.exp_lt_exp.mp + rw [Real.exp_log (by positivity)] + linarith [Real.exp_one_lt_three] + have hceil : 2 * (r : ℝ) * Real.log (2 * (n : ℝ)) ≤ dimension n r := Nat.le_ceil _ + have hp : (subfamilySize n r : ℝ) ≤ 2 * r := by exact_mod_cast Nat.min_le_left (2*r) n + have hlogn : Real.log (n : ℝ) ≤ Real.log (2 * (n : ℝ)) := Real.log_le_log hn0 (by linarith) + have hp0 : (0 : ℝ) ≤ subfamilySize n r := Nat.cast_nonneg _ + have hkp : (subfamilySize n r : ℝ) ≤ dimension n r := by + have hp2 := mul_le_mul_of_nonneg_left hlog.le (by positivity : (0 : ℝ) ≤ 2 * r) + nlinarith + refine ⟨?_, by exact_mod_cast hkp, ?_⟩ + · have : (1 : ℝ) ≤ dimension n r := by nlinarith + exact_mod_cast this + · calc + _ ≤ (subfamilySize n r : ℝ) * Real.log (2 * (n : ℝ)) := mul_le_mul_of_nonneg_left hlogn hp0 + _ ≤ 2 * (r : ℝ) * Real.log (2 * (n : ℝ)) := mul_le_mul_of_nonneg_right hp (by linarith) + _ ≤ _ := hceil + +/-- The frame failure probability is strictly below one. -/ +theorem failure_bound_lt_one {n k p : ℕ} (hn : 2 ≤ n) (hk : 1 ≤ k) + (hp : p ≤ k) (hplog : (p : ℝ) * Real.log n ≤ k) : + 2 * (n : ℝ)^p * 9^(k+p) * Real.exp (-25*(k : ℝ)/2) < 1 := by + have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) + have hk1 : (1 : ℝ) ≤ k := by exact_mod_cast hk + have hpk : (p : ℝ) ≤ k := by exact_mod_cast hp + have hl2 : Real.log 2 ≤ 1 := by + have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 2) + linarith + have hl9 : Real.log 9 ≤ 4 := by + have h3 := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 3) + have h9 : Real.log 9 = 2 * Real.log 3 := by + rw [show (9 : ℝ) = 3^2 by norm_num, Real.log_pow] + norm_num + rw [h9] + linarith + have he : Real.log 2 + (p : ℝ)*Real.log n + ((k : ℝ)+p)*Real.log 9 -25*(k : ℝ)/2 < 0 := by + have hh := mul_le_mul_of_nonneg_left hl9 (by positivity : (0 : ℝ) ≤ (k : ℝ)+p) + nlinarith + have hid : 2 * (n : ℝ)^p * 9^(k+p) * Real.exp (-25*(k : ℝ)/2) = + Real.exp (Real.log 2 + (p : ℝ)*Real.log n + ((k : ℝ)+p)*Real.log 9 -25*(k : ℝ)/2) := by + rw [sub_eq_add_neg, Real.exp_add, Real.exp_add, Real.exp_add] + simp only [Real.exp_log (by norm_num : (0 : ℝ) < 2), Real.exp_nat_mul, + Real.exp_log hn0, ← Nat.cast_add] + rw [Real.exp_log (by norm_num : (0 : ℝ) < 9)] + congr 1 + ring_nf + rw [hid] + exact Real.exp_lt_one_iff.mpr he + +theorem exact_failure_bound {n r : ℕ} (hn : 2 ≤ n) (hr : 1 ≤ r) : + 2 * (n : ℝ)^(subfamilySize n r) * 9^(dimension n r + subfamilySize n r) * + Real.exp (-25*(dimension n r : ℝ)/2) < 1 := + failure_bound_lt_one hn (bounds hn hr).1 (bounds hn hr).2.1 (bounds hn hr).2.2 + +end FrameParameters +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/FrameSelection.lean b/lean/OAI/Analysis/Unitarizability/FrameSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ccbe9a6819e487d9b750e32450ba9ff78501e510 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/FrameSelection.lean @@ -0,0 +1,94 @@ +import OAI.Analysis.Unitarizability.SignMatrix +import OAI.Analysis.Unitarizability.FrameParameters + +namespace OAI + +/-! The finite union bound chooses one sign matrix that passes every real +net test for every injective subfamily of the prescribed size. -/ +noncomputable section +namespace Dixmier +namespace SignMatrix +open Finset + +theorem embedding_card_le (n p : ℕ) : Fintype.card (Fin p ↪ Fin n) ≤ n^p := by + have h := Fintype.card_le_of_injective (fun e : Fin p ↪ Fin n => (e : Fin p → Fin n)) + (by intro e f h; apply Function.Embedding.ext; intro i; exact congrFun h i) + simpa using h + +/-- A real sign-matrix realization for all size-p subfamilies. The proof +uses the actual finite sign sample space, cardinality bounds, and net tests. -/ +theorem exists_sign_matrix {n k p : ℕ} (hk : 0 < k) + (hf : 2 * (n : ℝ)^p * 9^(k+p) * Real.exp (-25*(k : ℝ)/2) < 1) : + ∃ σ : Fin k × Fin n → Bool, ∀ e : Fin p ↪ Fin n, ‖synthesis σ e‖ ≤ 10 := by + classical + let : Nonempty (Fin k) := Fin.pos_iff_nonempty.mp hk + obtain ⟨s, hs, hsc, hsnet⟩ := SphereNet.exists_quarter_net (E := EuclideanSpace ℝ (Fin p)) + obtain ⟨t, ht, htc, htnet⟩ := SphereNet.exists_quarter_net (E := EuclideanSpace ℝ (Fin k)) + simp only [finrank_euclideanSpace_fin] at hsc htc + let Ω := Fin k × Fin n → Bool + let L := (Fin p ↪ Fin n) × s × t + let bad : L → Finset Ω := fun l => univ.filter (fun σ => + (5 : ℝ) < |inner ℝ (synthesis σ l.1 l.2.1) l.2.2|) + let B : Finset Ω := univ.biUnion bad + let N : ℝ := 2 ^ Fintype.card (Fin k × Fin n) + let q : ℝ := 2 * Real.exp (-25*(k : ℝ)/2) + have hN : 0 < N := by positivity + have hq : 0 ≤ q := by positivity + have hb (l : L) : ((bad l).card : ℝ) ≤ q * N := by + have h := bilinear_tail l.1 l.2.2 l.2.1 (ht _ l.2.2.2) (hs _ l.2.1.2) + simp only [Fintype.card_fin] at h + have he : -(k : ℝ)*25/2 = -25*(k : ℝ)/2 := by ring + rw [he] at h + apply (div_le_iff₀ hN).mp + convert h using 1 + try rfl + apply congrArg (fun m : ℕ => (m : ℝ) / N) + apply congrArg Finset.card + ext σ + simp only [bad, Finset.mem_filter, Finset.mem_univ, true_and] + have hB : (B.card : ℝ) ≤ (Fintype.card L : ℝ) * (q*N) := by + have hc := Finset.card_biUnion_le (s := (univ : Finset L)) (t := bad) + calc + _ ≤ ∑ l : L, ((bad l).card : ℝ) := by exact_mod_cast hc + _ ≤ ∑ _l : L, q*N := Finset.sum_le_sum (fun l _ => hb l) + _ = _ := by simp + have hL : (Fintype.card L : ℝ) ≤ (n : ℝ)^p * 9^p * 9^k := by + have hc : Fintype.card L = Fintype.card (Fin p ↪ Fin n) * s.card * t.card := by + simp [L, mul_assoc] + rw [hc, Nat.cast_mul, Nat.cast_mul] + exact mul_le_mul (mul_le_mul (by exact_mod_cast embedding_card_le n p) (by exact_mod_cast hsc) + (by positivity) (by positivity)) (by exact_mod_cast htc) (by positivity) (by positivity) + have hB' : (B.card : ℝ) < N := by + have hle := hB.trans (mul_le_mul_of_nonneg_right hL (mul_nonneg hq hN.le)) + have hid : (n : ℝ)^p * 9^p * 9^k * (q*N) = + (2 * (n : ℝ)^p * 9^(k+p) * Real.exp (-25*(k : ℝ)/2)) * N := by + dsimp [q] + rw [pow_add] + ring + rw [hid] at hle + exact hle.trans_lt (by simpa using mul_lt_mul_of_pos_right hf hN) + have hcard : B.card < (univ : Finset Ω).card := by + have hNcard : N = (Fintype.card Ω : ℝ) := by simp [N, Ω] + rw [hNcard] at hB' + exact_mod_cast hB' + have hnotall : ∃ σ : Ω, σ ∉ B := by + by_contra hh + push Not at hh + have hle := Finset.card_le_card (show (univ : Finset Ω) ⊆ B from fun σ _ => hh σ) + omega + obtain ⟨σ, hnσ⟩ := hnotall + refine ⟨σ, ?_⟩ + intro e + apply SphereNet.operator_norm_le_ten (synthesis σ e) s t hs ht hsnet htnet + intro z hz w hw + by_contra hnot + have hbad : σ ∈ bad (e, ⟨z,hz⟩, ⟨w,hw⟩) := by + exact mem_filter.mpr ⟨mem_univ _, lt_of_not_ge hnot⟩ + exact hnσ (mem_biUnion.mpr ⟨(e, ⟨z,hz⟩, ⟨w,hw⟩), mem_univ _, hbad⟩) + +end SignMatrix +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Frames.lean b/lean/OAI/Analysis/Unitarizability/Frames.lean new file mode 100644 index 0000000000000000000000000000000000000000..33802bb5f129e5a0a8f38bbb06ad402afa25a90c --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Frames.lean @@ -0,0 +1,109 @@ +import OAI.Analysis.Unitarizability.FrameSelection +import OAI.Analysis.Unitarizability.ComplexFrames + +namespace OAI + +/-! Frame existence with prescribed dimensions and bounds for all small subfamilies. -/ +noncomputable section +namespace Dixmier +namespace SignMatrix +open Finset +variable {I J L K : Type*} [Fintype I] [Fintype J] [Fintype L] [Fintype K] +local instance : DecidableEq I := Classical.decEq I +local instance : DecidableEq J := Classical.decEq J +local instance : DecidableEq L := Classical.decEq L +local instance : DecidableEq K := Classical.decEq K + +def extendVector (e : J ↪ L) (z : EuclideanSpace ℝ J) : EuclideanSpace ℝ L := + WithLp.toLp 2 (extend e z) + +theorem extendVector_norm (e : J ↪ L) (z : EuclideanSpace ℝ J) : ‖extendVector e z‖ = ‖z‖ := by + have h : ‖extendVector e z‖^2 = ‖z‖^2 := by + simp only [EuclideanSpace.norm_sq_eq, extendVector, Real.norm_eq_abs, sq_abs] + exact sum_extend_sq e z + nlinarith [norm_nonneg (extendVector e z), norm_nonneg z] + +omit [Fintype I] in +theorem synthesis_extendVector (σ : K × I → Bool) (e : L ↪ I) (f : J ↪ L) + (z : EuclideanSpace ℝ J) : synthesis σ e (extendVector f z) = synthesis σ (f.trans e) z := by + simp only [synthesis_apply, extendVector] + rw [sum_on_embedding f _ (fun i hi => by rw [extend_off f z i hi]; simp)] + simp only [extend_apply, Function.Embedding.trans_apply] + +omit [Fintype I] in +theorem synthesis_restrict_norm (σ : K × I → Bool) (e : L ↪ I) (f : J ↪ L) : + ‖synthesis σ (f.trans e)‖ ≤ ‖synthesis σ e‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro z + rw [← synthesis_extendVector] + exact ((synthesis σ e).le_opNorm _).trans_eq (by rw [extendVector_norm]) + +/-- Extend each smaller subset to size p, then restrict a coordinate synthesis operator. -/ +theorem all_subfamilies {k p : ℕ} (hp : p ≤ Fintype.card I) (σ : Fin k × I → Bool) + (hσ : ∀ e : Fin p ↪ I, ‖synthesis σ e‖ ≤ 10) : + ∀ J : Finset I, J.card ≤ p → + ‖FiniteSynthesis.synthesis (fun i => ComplexFrames.ofReal (vector σ i)) J‖ ≤ 10 := by + classical + intro J hJ + obtain ⟨L, hJL, hLu, hLc⟩ := Finset.exists_subsuperset_card_eq (s := J) (t := univ) + (Finset.subset_univ _) hJ (by simpa using hp) + let eL : L ↪ I := ⟨Subtype.val, Subtype.val_injective⟩ + let q : L ≃ Fin p := L.equivFinOfCardEq hLc + let e : Fin p ↪ I := q.symm.toEmbedding.trans eL + have he : q.toEmbedding.trans e = eL := by ext i; simp [e] + have hL : ‖synthesis σ eL‖ ≤ 10 := by + have h := synthesis_restrict_norm σ e q.toEmbedding + rw [he] at h + exact h.trans (hσ e) + let f : J ↪ L := ⟨fun i => ⟨i.1, hJL i.2⟩, by intro a b h; exact Subtype.ext (congrArg (fun x : L => (x : I)) h)⟩ + let eJ : J ↪ I := ⟨Subtype.val, Subtype.val_injective⟩ + have hf : f.trans eL = eJ := by ext i; rfl + have hJnorm : ‖synthesis σ eJ‖ ≤ 10 := by + have h := synthesis_restrict_norm σ eL f + rw [hf] at h + exact h.trans hL + apply ComplexFrames.synthesis_bound _ J (by norm_num : (0 : ℝ) ≤ 10) + intro z + have h := (synthesis σ eJ).le_of_opNorm_le hJnorm z + simpa only [synthesis_apply, eJ, Function.Embedding.coeFn_mk] using h + +/-- Frames with k=ceil(2r log(2n)), p=min(2r,n), and bound 10. -/ +theorem frames {n r : ℕ} (hn : 2 ≤ n) (hr : 1 ≤ r) : + ∃ v : Fin n → EuclideanSpace ℂ (Fin (FrameParameters.dimension n r)), + (∀ i, ‖v i‖ = 1) ∧ + FiniteSynthesis.FrameBound v (FrameParameters.subfamilySize n r) 10 := by + have hk : 0 < FrameParameters.dimension n r := (FrameParameters.bounds hn hr).1 + let : Nonempty (Fin (FrameParameters.dimension n r)) := Fin.pos_iff_nonempty.mp hk + obtain ⟨σ, hσ⟩ := exists_sign_matrix hk (FrameParameters.exact_failure_bound hn hr) + refine ⟨fun i => ComplexFrames.ofReal (vector σ i), ?_, ?_⟩ + · intro i + rw [ComplexFrames.ofReal_norm, vector_norm] + · exact all_subfamilies (by simpa only [FrameParameters.subfamilySize, Fintype.card_fin] using Nat.min_le_right (2*r) n) σ hσ + + +/-- The frame lemma for arbitrary finite label types. -/ +theorem frames_for_fintype {r : ℕ} (hn : 2 ≤ Fintype.card I) (hr : 1 ≤ r) : + ∃ v : I → EuclideanSpace ℂ (Fin (FrameParameters.dimension (Fintype.card I) r)), + (∀ i, ‖v i‖ = 1) ∧ + FiniteSynthesis.FrameBound v (FrameParameters.subfamilySize (Fintype.card I) r) 10 := by + have hk : 0 < FrameParameters.dimension (Fintype.card I) r := (FrameParameters.bounds hn hr).1 + let : Nonempty (Fin (FrameParameters.dimension (Fintype.card I) r)) := Fin.pos_iff_nonempty.mp hk + obtain ⟨σ, hσ⟩ := exists_sign_matrix hk (FrameParameters.exact_failure_bound hn hr) + let q := Fintype.equivFin I + let σ' : Fin (FrameParameters.dimension (Fintype.card I) r) × I → Bool := fun ai => σ (ai.1, q ai.2) + have hσ' (e : Fin (FrameParameters.subfamilySize (Fintype.card I) r) ↪ I) : ‖synthesis σ' e‖ ≤ 10 := by + have hid : synthesis σ' e = synthesis σ (e.trans q.toEmbedding) := rfl + rw [hid] + exact hσ _ + refine ⟨fun i => ComplexFrames.ofReal (vector σ' i), ?_, ?_⟩ + · intro i + rw [ComplexFrames.ofReal_norm, vector_norm] + · exact all_subfamilies (Nat.min_le_right _ _) σ' hσ' + + +end SignMatrix +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/HilbertSum.lean b/lean/OAI/Analysis/Unitarizability/HilbertSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1d74187c092e2a00a270846a302031fe3957758 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/HilbertSum.lean @@ -0,0 +1,159 @@ +import OAI.Analysis.Unitarizability.Cocycle +import Mathlib.Analysis.InnerProductSpace.l2Space +import Mathlib.Analysis.Normed.Lp.lpHolder + +namespace OAI + +/-! Uniformly bounded Hilbert direct sums. The component implementers +are never summed and need not be uniformly bounded. -/ +noncomputable section +namespace Dixmier +namespace HilbertSum +variable {G I : Type*} [Group G] {E : I → Type*} +variable [∀ i, NormedAddCommGroup (E i)] [∀ i, InnerProductSpace ℂ (E i)] +local instance : DecidableEq I := Classical.decEq I +abbrev Space (E : I → Type*) [∀ i, NormedAddCommGroup (E i)] := lp E 2 + +def inclusion (i : I) : E i →L[ℂ] Space E := lp.singleContinuousLinearMap ℂ E 2 i + +def evaluation (i : I) : Space E →L[ℂ] E i := lp.evalCLM ℂ E 2 i + +@[simp] theorem inclusion_apply (i : I) (x : E i) : inclusion i x = lp.single 2 i x := rfl +@[simp] theorem evaluation_apply (i : I) (x : Space E) : evaluation i x = x i := rfl + +def boundedSum (T : ∀ i, E i →L[ℂ] E i) {κ : ℝ} (hκ : 0 ≤ κ) (hT : ∀ i, ‖T i‖ ≤ κ) : + Space E →L[ℂ] Space E := lp.mapCLM 2 T hκ hT + +@[simp] theorem boundedSum_apply (T : ∀ i, E i →L[ℂ] E i) {κ : ℝ} + (hκ : 0 ≤ κ) (hT : ∀ i, ‖T i‖ ≤ κ) (x : Space E) (i : I) : + boundedSum T hκ hT x i = T i (x i) := rfl + +theorem boundedSum_norm_le (T : ∀ i, E i →L[ℂ] E i) {κ : ℝ} + (hκ : 0 ≤ κ) (hT : ∀ i, ‖T i‖ ≤ κ) : ‖boundedSum T hκ hT‖ ≤ κ := + lp.norm_mapCLM_le 2 T hκ hT + +theorem unitary_bound {index : I} (U : G →* (E index →L[ℂ] E index)) + (hU : ∀ g x, ‖U g x‖ = ‖x‖) (g : G) : + ‖U g‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro x + simp [hU] + +def representation (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) : G →* (Space E →L[ℂ] Space E) where + toFun g := boundedSum (fun i => U i g) zero_le_one (fun i => unitary_bound (U i) (hU i) g) + map_one' := by ext x i; change U i 1 (x i) = x i; simp + map_mul' g h := by + ext x i + change U i (g*h) (x i) = U i g (U i h (x i)) + rw [map_mul]; rfl + +@[simp] theorem representation_apply (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (g : G) (x : Space E) (i : I) : + representation U hU g x i = U i g (x i) := rfl + +theorem representation_norm_map (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (g : G) (x : Space E) : + ‖representation U hU g x‖ = ‖x‖ := by + have hs : ‖representation U hU g x‖^2 = ‖x‖^2 := by + have norm_sq (y : Space E) : ‖y‖^2 = ∑' i, ‖y i‖^2 := by + simpa using lp.norm_rpow_eq_tsum (p := 2) (by norm_num) y + simp only [norm_sq, representation_apply, hU] + nlinarith [norm_nonneg (representation U hU g x), norm_nonneg x] + +def cocycle (D : ∀ i, G → (E i →L[ℂ] E i)) {κ : ℝ} + (hκ : 0 ≤ κ) (hb : ∀ i g, ‖D i g‖ ≤ κ) (g : G) : Space E →L[ℂ] Space E := + boundedSum (fun i => D i g) hκ (fun i => hb i g) + +omit [Group G] in +@[simp] theorem cocycle_apply (D : ∀ i, G → (E i →L[ℂ] E i)) {κ : ℝ} + (hκ : 0 ≤ κ) (hb : ∀ i g, ‖D i g‖ ≤ κ) (g : G) (x : Space E) (i : I) : + cocycle D hκ hb g x i = D i g (x i) := rfl + +theorem cocycle_one (D : ∀ i, G → (E i →L[ℂ] E i)) {κ : ℝ} + (hκ : 0 ≤ κ) (hb : ∀ i g, ‖D i g‖ ≤ κ) (h1 : ∀ i, D i 1 = 0) : + cocycle D hκ hb 1 = 0 := by ext x i; simp [h1] + +theorem cocycle_identity (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (D : ∀ i, G → (E i →L[ℂ] E i)) {κ : ℝ} + (hκ : 0 ≤ κ) (hb : ∀ i g, ‖D i g‖ ≤ κ) + (hD : ∀ i g h, D i (g*h) = D i g + conjugate (U i) g (D i h)) (g h : G) : + cocycle D hκ hb (g*h) = cocycle D hκ hb g + + conjugate (representation U hU) g (cocycle D hκ hb h) := by + ext x i + change D i (g*h) (x i) = D i g (x i) + U i g (D i h (U i g⁻¹ (x i))) + rw [hD] + rfl + +theorem representation_inclusion (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (g : G) (i : I) (x : E i) : + representation U hU g (inclusion i x) = inclusion i (U i g x) := by + ext j + by_cases h : j = i + · subst j; simp + · simp [Pi.single_eq_of_ne h] + +def compression (B : Space E →L[ℂ] Space E) (i : I) : E i →L[ℂ] E i := + (evaluation i).comp (B.comp (inclusion i)) + +theorem compression_norm_le (B : Space E →L[ℂ] Space E) (i : I) : ‖compression B i‖ ≤ ‖B‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg B) + intro x + change ‖B (lp.single 2 i x) i‖ ≤ ‖B‖ * ‖x‖ + calc + _ ≤ ‖B (lp.single 2 i x)‖ := lp.norm_apply_le_norm (by norm_num) _ i + _ ≤ ‖B‖ * ‖lp.single 2 i x‖ := B.le_opNorm _ + _ = _ := by rw [lp.norm_single (by norm_num : (0 : ENNReal) < 2)] + +theorem compression_conjugate (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (B : Space E →L[ℂ] Space E) (i : I) (g : G) : + compression (conjugate (representation U hU) g B) i = + conjugate (U i) g (compression B i) := by + ext x + change (representation U hU g (B (representation U hU g⁻¹ (inclusion i x)))) i = _ + rw [representation_inclusion, representation_apply] + rfl + +theorem compression_implementer (U : ∀ i, G →* (E i →L[ℂ] E i)) + (hU : ∀ i g x, ‖U i g x‖ = ‖x‖) (D : ∀ i, G → (E i →L[ℂ] E i)) {κ : ℝ} + (hκ : 0 ≤ κ) (hb : ∀ i g, ‖D i g‖ ≤ κ) (B : Space E →L[ℂ] Space E) + (hB : ∀ g, cocycle D hκ hb g = coboundary (representation U hU) B g) (i : I) (g : G) : + D i g = coboundary (U i) (compression B i) g := by + have h := congrArg (fun T => compression T i) (hB g) + have hc : compression (cocycle D hκ hb g) i = D i g := by + ext x + change D i g (lp.single 2 i x i) = D i g x + rw [lp.single_apply_self] + have hs (A C : Space E →L[ℂ] Space E) : compression (A-C) i = compression A i - compression C i := by + ext x; rfl + rwa [hc, coboundary, hs, compression_conjugate] at h + + +/-- Countably many separable fibres have a separable Hilbert sum. The proof +uses the dense span of coordinate inclusions and convergence of finite sums. -/ +theorem separableSpace [Countable I] [∀ i, TopologicalSpace.SeparableSpace (E i)] : + TopologicalSpace.SeparableSpace (Space E) := by + let s : Set (Space E) := ⋃ i, Set.range (inclusion (E := E) i) + let V : Submodule ℂ (Space E) := Submodule.span ℂ s + have hs : TopologicalSpace.IsSeparable s := + TopologicalSpace.IsSeparable.iUnion (fun i => + TopologicalSpace.isSeparable_range (inclusion (E := E) i).continuous) + have hv : TopologicalSpace.IsSeparable (V : Set (Space E)) := hs.span + have hd : Dense (V : Set (Space E)) := by + intro x + apply isClosed_closure.mem_of_tendsto (lp.hasSum_single (by norm_num : (2 : ENNReal) ≠ ⊤) x) + apply Filter.Eventually.of_forall + intro F + apply subset_closure + apply V.sum_mem + intro i hi + exact Submodule.subset_span (Set.mem_iUnion.mpr ⟨i, ⟨x i, rfl⟩⟩) + exact hd.isSeparable_iff.mp hv + + +end HilbertSum +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/InvariantProjection.lean b/lean/OAI/Analysis/Unitarizability/InvariantProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..0783508ea99f4d53c0d4d6ba46f2556ff25c1eb8 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/InvariantProjection.lean @@ -0,0 +1,84 @@ +import OAI.Analysis.Unitarizability.Model +import Mathlib.Analysis.InnerProductSpace.Projection.Basic + +namespace OAI + +/-! A unitarizing similarity gives a bounded commuting projection +onto every closed invariant subspace. -/ +noncomputable section +namespace Dixmier +namespace InvariantProjection +variable {G H : Type*} [Group G] +variable [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +omit [CompleteSpace H] in +@[simp] theorem rep_inv (U : G →* (H →L[ℂ] H)) (g : G) (x : H) : U g (U g⁻¹ x) = x := by + have h : U g * U g⁻¹ = 1 := by rw [← map_mul]; simp + exact congrArg (fun T : H →L[ℂ] H => T x) h + +theorem orthogonal_projection_commutes (U : G →* (H →L[ℂ] H)) + (hU : ∀ g x, ‖U g x‖ = ‖x‖) (M : ClosedSubmodule ℂ H) + (hM : ∀ g x, x ∈ M → U g x ∈ M) (g : G) : + Commute M.toSubmodule.starProjection (U g) := by + change M.toSubmodule.starProjection * U g = U g * M.toSubmodule.starProjection + apply ContinuousLinearMap.ext + intro x + apply Submodule.eq_starProjection_of_mem_of_inner_eq_zero + · exact hM g _ (Submodule.starProjection_apply_mem _ _) + · intro w hw + have hi := (LinearMap.norm_map_iff_inner_map_map (U g)).mp (hU g) + have hm : U g⁻¹ w ∈ M := hM g⁻¹ w hw + have hz := M.toSubmodule.starProjection_inner_eq_zero x (U g⁻¹ w) hm + have he := hi (x - M.toSubmodule.starProjection x) (U g⁻¹ w) + rw [map_sub, rep_inv] at he + exact he.trans hz + +def conjugated (π : G →* (H →L[ℂ] H)) (S : H ≃L[ℂ] H) : G →* (H →L[ℂ] H) where + toFun g := S.toContinuousLinearMap.comp ((π g).comp S.symm.toContinuousLinearMap) + map_one' := by ext x; simp + map_mul' g h := by ext x; simp [map_mul, mul_apply_eq_comp] + +omit [CompleteSpace H] in +@[simp] theorem conjugated_apply (π : G →* (H →L[ℂ] H)) (S : H ≃L[ℂ] H) (g : G) (x : H) : + conjugated π S g x = S (π g (S.symm x)) := rfl + +/-- The conclusion supplies one bounded projection; it assumes only the +actual similarity and closed invariance, not a cocycle implementer. -/ +theorem exists_commuting_projection (π : G →* (H →L[ℂ] H)) + (hπ : SimilarToUnitary π) (M : ClosedSubmodule ℂ H) + (hM : ∀ g x, x ∈ M → π g x ∈ M) : + ∃ P : H →L[ℂ] H, (∀ x, P x ∈ M) ∧ + (∀ x, x ∈ M → P x = x) ∧ ∀ g, Commute P (π g) := by + rcases hπ with ⟨S, hS⟩ + let N : ClosedSubmodule ℂ H := M.mapEquiv S + have hN : ∀ g x, x ∈ N → conjugated π S g x ∈ N := by + intro g x hx + rcases hx with ⟨y, hy, rfl⟩ + exact ⟨π g y, hM g y hy, by simp⟩ + let Q := N.toSubmodule.starProjection + let P : H →L[ℂ] H := S.symm.toContinuousLinearMap.comp (Q.comp S.toContinuousLinearMap) + have hmem (x : H) : P x ∈ M := by + have h := Submodule.starProjection_apply_mem N.toSubmodule (S x) + rcases h with ⟨y, hy, he⟩ + change S.symm (Q (S x)) ∈ M + rw [← he] + simpa using hy + have hfix (x : H) (hx : x ∈ M) : P x = x := by + have hn : S x ∈ N := ⟨x, hx, rfl⟩ + change S.symm (Q (S x)) = x + rw [Submodule.starProjection_eq_self_iff.mpr hn] + simp + refine ⟨P, hmem, hfix, ?_⟩ + intro g + have hq := orthogonal_projection_commutes (conjugated π S) hS N hN g + change P * π g = π g * P + ext x + have h := congrArg (fun T : H →L[ℂ] H => S.symm (T (S x))) hq.eq + simpa [P, Q, mul_apply_eq_comp] using h + +end InvariantProjection +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/KernelEnergy.lean b/lean/OAI/Analysis/Unitarizability/KernelEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..f0ea61ef484818fda68537b50c23f0569bb10a92 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/KernelEnergy.lean @@ -0,0 +1,124 @@ +import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.LinearAlgebra.Matrix.Trace +import Mathlib.Analysis.Normed.Group.InfiniteSum +import Mathlib.Tactic.Ring + +namespace OAI + +/-! Positive rank-one kernel energy. Matrices are represented by their entries +with the unnormalized Hilbert–Schmidt (Euclidean coefficient) norm. -/ +noncomputable section +namespace Dixmier +attribute [local instance] Classical.propDecidable +open Finset +open scoped ComplexConjugate +variable {K I G : Type*} [Fintype K] [Fintype I] + +def rankOneCoefficients (v : EuclideanSpace ℂ K) : EuclideanSpace ℂ (K × K) := + WithLp.toLp 2 (fun p => v p.1 * conj (v p.2)) + +omit [Fintype K] in +@[simp] theorem rankOneCoefficients_apply (v : EuclideanSpace ℂ K) (a b : K) : + rankOneCoefficients v (a, b) = v a * conj (v b) := rfl + +theorem rankOne_inner (v w : EuclideanSpace ℂ K) : + inner ℂ (rankOneCoefficients v) (rankOneCoefficients w) = + inner ℂ v w * conj (inner ℂ v w) := by + simp only [EuclideanSpace.inner_eq_star_dotProduct, dotProduct, Pi.star_apply, + rankOneCoefficients, map_sum, map_mul] + rw [Fintype.sum_prod_type, Finset.sum_mul] + apply Finset.sum_congr rfl + intro a ha + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro b hb + simp only [← Complex.star_def, star_mul, star_star] + ring + +theorem rankOne_inner_re (v w : EuclideanSpace ℂ K) : + (inner ℂ (rankOneCoefficients v) (rankOneCoefficients w)).re = ‖inner ℂ v w‖^2 := by + rw [rankOne_inner, Complex.mul_conj, Complex.ofReal_re] + exact Complex.normSq_eq_norm_sq _ + +theorem rankOne_norm_sq (v : EuclideanSpace ℂ K) (hv : ‖v‖ = 1) : + ‖rankOneCoefficients v‖^2 = 1 := by + rw [← @inner_self_eq_norm_sq ℂ] + change (inner ℂ (rankOneCoefficients v) (rankOneCoefficients v)).re = 1 + rw [rankOne_inner_re, inner_self_eq_norm_sq_to_K, hv] + norm_num + +/-- Collision blocks are sums of the rank-one matrices with that label value. -/ +def kernelCoefficients (v : I → EuclideanSpace ℂ K) (s : I → G) (g : G) : + EuclideanSpace ℂ (K × K) := + ∑ i ∈ (Finset.univ.filter fun i => s i = g), rankOneCoefficients (v i) + +omit [Fintype I] in +/-- Positivity of every pairwise Hilbert–Schmidt inner product makes each +block’s energy at least the number of its unit rank-one summands. -/ +theorem rankOne_sum_energy (v : I → EuclideanSpace ℂ K) (hv : ∀ i, ‖v i‖ = 1) + (J : Finset I) : (J.card : ℝ) ≤ ‖∑ i ∈ J, rankOneCoefficients (v i)‖^2 := by + rw [← @inner_self_eq_norm_sq ℂ] + simp only [sum_inner, inner_sum, map_sum] + calc + (J.card : ℝ) = ∑ i ∈ J, (1 : ℝ) := by simp + _ ≤ ∑ i ∈ J, ∑ j ∈ J, (inner ℂ (rankOneCoefficients (v j)) (rankOneCoefficients (v i))).re := by + apply Finset.sum_le_sum + intro i hi + have he : (inner ℂ (rankOneCoefficients (v i)) (rankOneCoefficients (v i))).re = 1 := by + change RCLike.re (inner ℂ (rankOneCoefficients (v i)) (rankOneCoefficients (v i))) = 1 + rw [inner_self_eq_norm_sq, rankOne_norm_sq _ (hv i)] + rw [← he] + apply Finset.single_le_sum (f := fun j => (inner ℂ (rankOneCoefficients (v j)) (rankOneCoefficients (v i))).re) _ hi + intro j hj + rw [rankOne_inner_re] + positivity + +def coefficientMatrix (W : EuclideanSpace ℂ (K × K)) : Matrix K K ℂ := + fun a b => W (a,b) + +/-- The coefficient norm is the unnormalized trace definition of +Hilbert–Schmidt squared norm. -/ +theorem coefficient_norm_sq_eq_trace (W : EuclideanSpace ℂ (K × K)) : + ‖W‖^2 = (Matrix.trace (Matrix.conjTranspose (coefficientMatrix W) * coefficientMatrix W)).re := by + rw [EuclideanSpace.norm_sq_eq] + simp only [Matrix.trace, Matrix.diag, Matrix.mul_apply, Matrix.conjTranspose_apply, + coefficientMatrix, Complex.star_def, ← Complex.normSq_eq_conj_mul_self, + Complex.normSq_eq_norm_sq, Fintype.sum_prod_type] + simp only [← Complex.ofReal_sum, Complex.ofReal_re] + exact Finset.sum_comm (f := fun (a b : K) => ‖W (a,b)‖^2) + +omit [Fintype K] in +theorem kernelCoefficients_offsupport (v : I → EuclideanSpace ℂ K) (s : I → G) + {g : G} (hg : g ∉ Finset.univ.image s) : kernelCoefficients v s g = 0 := by + classical + apply Finset.sum_eq_zero + intro i hi + exact (hg (Finset.mem_image.mpr ⟨i, mem_univ _, (mem_filter.mp hi).2⟩)).elim + +theorem kernel_energy_summable (v : I → EuclideanSpace ℂ K) (s : I → G) : + Summable (fun g => ‖kernelCoefficients v s g‖^2) := by + classical + apply summable_of_ne_finset_zero (s := Finset.univ.image s) + intro g hg + simp [kernelCoefficients_offsupport v s hg] + +/-- The kernel-energy lower bound preserves every colliding product label. -/ +theorem kernel_energy_ge_card (v : I → EuclideanSpace ℂ K) (hv : ∀ i, ‖v i‖ = 1) + (s : I → G) : (Fintype.card I : ℝ) ≤ ∑' g, ‖kernelCoefficients v s g‖^2 := by + classical + rw [tsum_eq_sum (s := Finset.univ.image s) (fun g hg => by + simp [kernelCoefficients_offsupport v s hg])] + have hc := congrArg (fun n : ℕ => (n : ℝ)) (Finset.card_eq_sum_card_image s Finset.univ) + simp only [Finset.card_univ, Nat.cast_sum] at hc + calc + (Fintype.card I : ℝ) = ∑ g ∈ Finset.univ.image s, ((Finset.univ.filter fun i => s i = g).card : ℝ) := hc + _ ≤ ∑ g ∈ Finset.univ.image s, ‖kernelCoefficients v s g‖^2 := by + apply Finset.sum_le_sum + intro g hg + exact rankOne_sum_energy v hv _ + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/KernelObstruction.lean b/lean/OAI/Analysis/Unitarizability/KernelObstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..b171a38a6bd7558bb1f4853ba353c3dbd8dc1333 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/KernelObstruction.lean @@ -0,0 +1,331 @@ +import OAI.Analysis.Unitarizability.KernelEnergy +import Mathlib.Analysis.InnerProductSpace.l2Space +import Mathlib.Analysis.InnerProductSpace.Adjoint +import Mathlib.Tactic.Linarith +import Mathlib.Topology.MetricSpace.HausdorffDistance + +namespace OAI + +/-! Coordinate maps and the invariant-kernel obstruction. +The Hilbert space is the lp space with finite Euclidean fibres. -/ +noncomputable section +namespace Dixmier +namespace KernelObstruction +open scoped ComplexConjugate +open Finset +variable {G K : Type*} [Fintype K] +local instance : DecidableEq G := Classical.decEq G +local instance : DecidableEq K := Classical.decEq K + +abbrev Fibre (K : Type*) [Fintype K] := EuclideanSpace ℂ K +abbrev Space (G K : Type*) [Fintype K] := lp (fun _ : G => Fibre K) 2 +abbrev Op (G K : Type*) [Fintype K] := Space G K →L[ℂ] Space G K + +def inclusion (x : G) : Fibre K →L[ℂ] Space G K := + lp.singleContinuousLinearMap ℂ (fun _ : G => Fibre K) 2 x + +def evaluation (x : G) : Space G K →L[ℂ] Fibre K := + lp.evalCLM ℂ (fun _ : G => Fibre K) 2 x + +@[simp] theorem inclusion_apply (x : G) (v : Fibre K) : + inclusion x v = lp.single 2 x v := rfl +@[simp] theorem evaluation_apply (x : G) (ξ : Space G K) : + evaluation x ξ = ξ x := rfl + +@[simp] theorem inclusion_norm (x : G) (v : Fibre K) : ‖inclusion x v‖ = ‖v‖ := + lp.norm_single (p := 2) (E := fun _ : G => Fibre K) (by norm_num) x v + +theorem inclusion_opNorm_le (x : G) : ‖inclusion (K := K) x‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro v + simp + +theorem evaluation_opNorm_le (x : G) : ‖evaluation (K := K) x‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro ξ + simpa using lp.norm_apply_le_norm (by norm_num : (2 : ENNReal) ≠ 0) ξ x + +@[simp] theorem inclusion_adjoint (x : G) : + (inclusion (K := K) x).adjoint = evaluation x := by + apply ContinuousLinearMap.ext + intro ξ + apply ext_inner_left ℂ + intro v + rw [ContinuousLinearMap.adjoint_inner_right] + change inner ℂ (lp.single 2 x v) ξ = inner ℂ v (ξ x) + exact lp.inner_single_left (𝕜 := ℂ) (G := fun _ : G => Fibre K) x v ξ + +@[simp] theorem evaluation_inclusion (x : G) : + (evaluation (K := K) x).comp (inclusion x) = ContinuousLinearMap.id ℂ (Fibre K) := by + ext v a + simp + +def block (F : Op G K) (x y : G) : Fibre K →L[ℂ] Fibre K := + (evaluation x).comp (F.comp (inclusion y)) + +def row (F : Op G K) (x : G) : Space G K →L[ℂ] Fibre K := + (evaluation x).comp F + +def col (F : Op G K) (y : G) : Fibre K →L[ℂ] Space G K := + F.comp (inclusion y) + +def coefficients (B : Fibre K →L[ℂ] Fibre K) : EuclideanSpace ℂ (K × K) := + WithLp.toLp 2 (fun ab => (B (EuclideanSpace.basisFun K ℂ ab.2)) ab.1) + +@[simp] theorem coefficients_apply (B : Fibre K →L[ℂ] Fibre K) (a b : K) : + coefficients B (a,b) = (B (EuclideanSpace.basisFun K ℂ b)) a := rfl + +theorem coefficients_norm_sq (B : Fibre K →L[ℂ] Fibre K) : + ‖coefficients B‖^2 = ∑ b : K, ‖B (EuclideanSpace.basisFun K ℂ b)‖^2 := by + simp only [EuclideanSpace.norm_sq_eq, Fintype.sum_prod_type, coefficients_apply] + exact Finset.sum_comm + +theorem space_norm_sq (ξ : Space G K) : ‖ξ‖^2 = ∑' x, ‖ξ x‖^2 := by + simpa using lp.norm_rpow_eq_tsum (p := 2) (by norm_num) ξ + +theorem space_summable (ξ : Space G K) : Summable (fun x => ‖ξ x‖^2) := by + simpa using (lp.memℓp ξ).summable (by norm_num : (0 : ℝ) < (2 : ENNReal).toReal) + +theorem column_summable (L : Fibre K →L[ℂ] Space G K) : + Summable (fun x => ‖coefficients ((evaluation x).comp L)‖^2) := by + simp_rw [coefficients_norm_sq] + exact summable_sum (fun b _ => space_summable (L (EuclideanSpace.basisFun K ℂ b))) + +theorem column_energy (L : Fibre K →L[ℂ] Space G K) : + ∑' x, ‖coefficients ((evaluation x).comp L)‖^2 = + ∑ b : K, ‖L (EuclideanSpace.basisFun K ℂ b)‖^2 := by + simp_rw [coefficients_norm_sq] + rw [Summable.tsum_finsetSum] + · apply Finset.sum_congr rfl + intro b hb + exact (space_norm_sq _).symm + · intro b hb + exact space_summable _ + +theorem column_energy_le (L : Fibre K →L[ℂ] Space G K) : + ∑' x, ‖coefficients ((evaluation x).comp L)‖^2 ≤ + (Fintype.card K : ℝ) * ‖L‖^2 := by + rw [column_energy] + calc + _ ≤ ∑ b : K, ‖L‖^2 := by + apply Finset.sum_le_sum + intro b hb + have h := L.le_opNorm (EuclideanSpace.basisFun K ℂ b) + simp only [(EuclideanSpace.basisFun K ℂ).norm_eq_one, mul_one] at h + exact pow_le_pow_left₀ (norm_nonneg _) h 2 + _ = _ := by simp [nsmul_eq_mul] + + +theorem coefficients_adjoint_apply (B : Fibre K →L[ℂ] Fibre K) (a b : K) : + coefficients B.adjoint (a,b) = conj (coefficients B (b,a)) := by + simp only [coefficients_apply] + rw [← EuclideanSpace.basisFun_inner, ← EuclideanSpace.basisFun_inner] + rw [ContinuousLinearMap.adjoint_inner_right, inner_conj_symm] + +theorem coefficients_adjoint_norm (B : Fibre K →L[ℂ] Fibre K) : + ‖coefficients B.adjoint‖ = ‖coefficients B‖ := by + have h : ‖coefficients B.adjoint‖^2 = ‖coefficients B‖^2 := by + simp only [EuclideanSpace.norm_sq_eq, Fintype.sum_prod_type, + coefficients_adjoint_apply, RCLike.norm_conj] + exact Finset.sum_comm + nlinarith [norm_nonneg (coefficients B.adjoint), norm_nonneg (coefficients B)] + +theorem row_block_norm (R : Space G K →L[ℂ] Fibre K) (x : G) : + ‖coefficients (R.comp (inclusion x))‖ = + ‖coefficients ((evaluation x).comp R.adjoint)‖ := by + rw [← coefficients_adjoint_norm (R.comp (inclusion x)), + ContinuousLinearMap.adjoint_comp, inclusion_adjoint] + +theorem row_summable (R : Space G K →L[ℂ] Fibre K) : + Summable (fun x => ‖coefficients (R.comp (inclusion x))‖^2) := by + simp_rw [row_block_norm] + exact column_summable R.adjoint + +theorem row_energy_le (R : Space G K →L[ℂ] Fibre K) : + ∑' x, ‖coefficients (R.comp (inclusion x))‖^2 ≤ + (Fintype.card K : ℝ) * ‖R‖^2 := by + simp_rw [row_block_norm] + simpa only [ContinuousLinearMap.adjoint.norm_map] using column_energy_le R.adjoint + +variable [Group G] + +def reindex (e : G ≃ G) (ξ : Space G K) : Space G K := + ⟨fun x => ξ (e x), memℓp_gen (((lp.memℓp ξ).summable (by norm_num)).comp_injective e.injective)⟩ + +omit [Group G] in +theorem reindex_norm (e : G ≃ G) (ξ : Space G K) : ‖reindex e ξ‖ = ‖ξ‖ := by + have h : ‖reindex e ξ‖^2 = ‖ξ‖^2 := by + rw [space_norm_sq, space_norm_sq] + exact e.tsum_eq (fun x => ‖ξ x‖^2) + nlinarith [norm_nonneg (reindex e ξ), norm_nonneg ξ] + +def reindexIsometry (e : G ≃ G) : Space G K →ₗᵢ[ℂ] Space G K where + toFun := reindex e + map_add' ξ η := by ext x a; rfl + map_smul' z ξ := by ext x a; rfl + norm_map' := reindex_norm e + +/-- The fibre-valued left regular representation. -/ +def translation : G →* Op G K where + toFun g := (reindexIsometry (K := K) (Equiv.mulLeft g⁻¹)).toContinuousLinearMap + map_one' := by ext ξ x a; simp [reindexIsometry, reindex] + map_mul' g h := by ext ξ x a; simp [reindexIsometry, reindex] + +@[simp] theorem translation_apply (g : G) (ξ : Space G K) (x : G) : + translation g ξ x = ξ (g⁻¹ * x) := rfl + +@[simp] theorem translation_inclusion (g y : G) (v : Fibre K) : + translation g (inclusion y v) = inclusion (g*y) v := by + ext x a + simp only [translation_apply, inclusion_apply, lp.single_apply] + by_cases h : x = g*y + · subst x + simp + · have h' : g⁻¹*x ≠ y := by intro he; apply h; rw [← he]; simp + simp [Pi.single_eq_of_ne h, Pi.single_eq_of_ne h'] + +def Commutant : Set (Op G K) := {F | ∀ g, Commute F (translation g)} + +theorem block_invariant {F : Op G K} (hF : F ∈ Commutant) (g x y : G) : + block F (g*x) (g*y) = block F x y := by + ext v a + have h := congrArg (fun B : Op G K => B (inclusion y v) (g*x)) (hF g).eq + simp only [mul_apply_eq_comp, translation_inclusion, translation_apply, + inv_mul_cancel_left] at h + exact congrArg (fun v : Fibre K => v a) h + +theorem block_kernel {F : Op G K} (hF : F ∈ Commutant) (x y : G) : + block F x y = block F 1 (x⁻¹*y) := by + simpa only [mul_one, mul_inv_cancel_left] using block_invariant hF x 1 (x⁻¹*y) + + + +omit [Group G] in +@[simp] theorem block_sub (A C : Op G K) (x y : G) : + block (A-C) x y = block A x y - block C x y := by + ext v a + rfl + +@[simp] theorem coefficients_sub (A C : Fibre K →L[ℂ] Fibre K) : + coefficients (A-C) = coefficients A - coefficients C := by ext ab; rfl + +theorem commutant_sub {A C : Op G K} (hA : A ∈ Commutant) (hC : C ∈ Commutant) : + A-C ∈ Commutant := by + intro g + change (A-C) * translation g = translation g * (A-C) + simp only [sub_mul, mul_sub, (hA g).eq, (hC g).eq] + +def energy (A : Op G K) : ℝ := ∑' s, ‖coefficients (block A 1 s)‖^2 + +theorem energy_summable (A : Op G K) : + Summable (fun s => ‖coefficients (block A 1 s)‖^2) := + row_summable (row A 1) + +theorem energy_nonneg (A : Op G K) : 0 ≤ energy A := tsum_nonneg (fun _ => sq_nonneg _) + +theorem energy_le_row (A : Op G K) : + energy A ≤ (Fintype.card K : ℝ) * ‖row A 1‖^2 := + row_energy_le (row A 1) + +theorem energy_eq_column {A : Op G K} (hA : A ∈ Commutant) : + energy A = ∑' x, ‖coefficients ((evaluation x).comp (col A 1))‖^2 := by + change (∑' s, ‖coefficients (block A 1 s)‖^2) = ∑' x, ‖coefficients (block A x 1)‖^2 + simp_rw [block_kernel hA _ 1, mul_one] + exact ((Equiv.inv G).tsum_eq (fun s => ‖coefficients (block A 1 s)‖^2)).symm + +theorem energy_le_column {A : Op G K} (hA : A ∈ Commutant) : + energy A ≤ (Fintype.card K : ℝ) * ‖col A 1‖^2 := by + rw [energy_eq_column hA] + exact column_energy_le _ + +omit [Group G] in +theorem row_norm_le (F : Op G K) (x : G) : ‖row F x‖ ≤ ‖F‖ := by + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + (by simpa using mul_le_mul_of_nonneg_right (evaluation_opNorm_le (K := K) x) (norm_nonneg F)) + +omit [Group G] in +theorem col_norm_le (F : Op G K) (x : G) : ‖col F x‖ ≤ ‖F‖ := by + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + (by simpa using mul_le_mul_of_nonneg_left (inclusion_opNorm_le (K := K) x) (norm_nonneg F)) + +omit [Group G] in +theorem row_difference_bound (T C : Op G K) (x : G) : + ‖row C x‖ ≤ ‖row T x‖ + ‖T-C‖ := by + have h : row C x = row T x - row (T-C) x := by ext v a; simp [row] + rw [h] + exact (norm_sub_le _ _).trans (add_le_add (le_refl _) (row_norm_le _ _)) + +omit [Group G] in +theorem col_difference_bound (A T C : Op G K) (x : G) : + ‖col (A-C) x‖ ≤ ‖col (A-T) x‖ + ‖T-C‖ := by + have h : col (A-C) x = col (A-T) x + col (T-C) x := by + ext v y a + simp [col] + rw [h] + exact (norm_add_le _ _).trans (add_le_add (le_refl _) (col_norm_le _ _)) + +theorem energy_split_le (A C : Op G K) : energy A ≤ 2 * energy C + 2 * energy (A-C) := by + have hp (s : G) : ‖coefficients (block A 1 s)‖^2 ≤ + 2 * ‖coefficients (block C 1 s)‖^2 + 2 * ‖coefficients (block (A-C) 1 s)‖^2 := by + rw [block_sub, coefficients_sub] + have ht := norm_add_le (coefficients (block C 1 s)) + (coefficients (block A 1 s) - coefficients (block C 1 s)) + rw [add_sub_cancel] at ht + nlinarith [norm_nonneg (coefficients (block A 1 s)), + norm_nonneg (coefficients (block C 1 s)), + norm_nonneg (coefficients (block A 1 s) - coefficients (block C 1 s)), + sq_nonneg (‖coefficients (block C 1 s)‖ - + ‖coefficients (block A 1 s) - coefficients (block C 1 s)‖)] + have hs := ((energy_summable C).mul_left 2).add ((energy_summable (A-C)).mul_left 2) + have h := (energy_summable A).tsum_le_tsum hp hs + rw [((energy_summable C).mul_left 2).tsum_add ((energy_summable (A-C)).mul_left 2), + tsum_mul_left, tsum_mul_left] at h + exact h + +/-- The kernel-energy obstruction, proved from coordinate estimates and commutation. -/ +theorem kernel_obstruction {A T : Op G K} (hA : A ∈ Commutant) + {κ : ℝ} (_hκ : 0 ≤ κ) (hr : ‖row T 1‖ ≤ κ) (hc : ‖col (A-T) 1‖ ≤ κ) + {C : Op G K} (hC : C ∈ Commutant) : + energy A ≤ 4 * (Fintype.card K : ℝ) * (κ + ‖T-C‖)^2 := by + have hR : ‖row C 1‖ ≤ κ + ‖T-C‖ := + (row_difference_bound T C 1).trans (add_le_add hr (le_refl _)) + have hL : ‖col (A-C) 1‖ ≤ κ + ‖T-C‖ := + (col_difference_bound A T C 1).trans (add_le_add hc (le_refl _)) + have heC := (energy_le_row C).trans (mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (norm_nonneg _) hR 2) (Nat.cast_nonneg (Fintype.card K))) + have heAC := (energy_le_column (commutant_sub hA hC)).trans (mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (norm_nonneg _) hL 2) (Nat.cast_nonneg (Fintype.card K))) + nlinarith [energy_split_le A C] + +/-- Pointwise distance inequality for positive fibre dimension. -/ +theorem kernel_distance_pointwise [Nonempty K] {A T : Op G K} (hA : A ∈ Commutant) + {κ : ℝ} (hκ : 0 ≤ κ) (hr : ‖row T 1‖ ≤ κ) (hc : ‖col (A-T) 1‖ ≤ κ) + {C : Op G K} (hC : C ∈ Commutant) : + (1/2 : ℝ) * Real.sqrt (energy A / Fintype.card K) - κ ≤ ‖T-C‖ := by + have hk : (0 : ℝ) < Fintype.card K := Nat.cast_pos.mpr Fintype.card_pos + have he := kernel_obstruction hA hκ hr hc hC + have hdiv : energy A / Fintype.card K ≤ 4 * (κ + ‖T-C‖)^2 := by + apply (div_le_iff₀ hk).mpr + nlinarith [he] + have hs := Real.sq_sqrt (div_nonneg (energy_nonneg A) hk.le) + have hh : 0 ≤ κ + ‖T-C‖ := add_nonneg hκ (norm_nonneg _) + have hsqrt : Real.sqrt (energy A / Fintype.card K) ≤ 2 * (κ + ‖T-C‖) := by + nlinarith [Real.sqrt_nonneg (energy A / Fintype.card K)] + linarith + +/-- The distance obstruction for the metric distance to +all bounded translation-commuting operators. -/ +theorem kernel_distance [Nonempty K] {A T : Op G K} (hA : A ∈ Commutant) + {κ : ℝ} (hκ : 0 ≤ κ) (hr : ‖row T 1‖ ≤ κ) (hc : ‖col (A-T) 1‖ ≤ κ) : + (1/2 : ℝ) * Real.sqrt (energy A / Fintype.card K) - κ ≤ Metric.infDist T Commutant := by + apply (Metric.le_infDist (s := Commutant) ⟨0, fun g => Commute.zero_left _⟩).mpr + intro C hC + simpa only [dist_eq_norm] using kernel_distance_pointwise hA hκ hr hc hC + + +end KernelObstruction +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/LocalBounds.lean b/lean/OAI/Analysis/Unitarizability/LocalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..63fa78decf9ff2a510910da87d62db01fc2ade20 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/LocalBounds.lean @@ -0,0 +1,124 @@ +import OAI.Analysis.Unitarizability.MaskAlgebra + +namespace OAI + +/-! Individual block row and column bounds from the endpoint assignment. -/ +noncomputable section +namespace Dixmier +namespace Masked +open Finset +variable {G I K : Type*} [Group G] [Fintype I] [Fintype K] +local instance : DecidableEq I := Classical.decEq I +local instance : DecidableEq G := Classical.decEq G +local instance : DecidableEq ℂ := Classical.decEq ℂ + +theorem support_bound (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) {p : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hv : FiniteSynthesis.FrameBound v p b) (J : Finset I) (hJ : J.card ≤ p) + (hs : ∀ x i, c x i ≠ 0 → i ∈ J) : ‖operator v s c hc‖ ≤ b^2 := by + apply masked_bound_of_frame _ _ _ _ hb hv + · intro x + exact (Finset.card_le_card (fun i hi => hs x i (Finset.mem_filter.mp hi).2)).trans hJ + · intro y + exact (Finset.card_le_card (fun i hi => hs _ i (Finset.mem_filter.mp hi).2)).trans hJ + +def rowMask (a : G → I → Bool) (x₀ x : G) (i : I) : ℂ := + if x = x₀ then boolComplex (a x i) else 0 + +def columnMask (a : G → I → Bool) (s : I → G) (y₀ x : G) (i : I) : ℂ := + if x * s i = y₀ then 1 - boolComplex (a x i) else 0 + +omit [Group G] [Fintype I] in +theorem rowMask_norm (a : G → I → Bool) (x₀ x : G) (i : I) : ‖rowMask a x₀ x i‖ ≤ 1 := by + unfold rowMask + split_ifs + · exact bool_mask_norm a x i + · simp + +omit [Group G] [Fintype I] in +theorem complement_norm (a : G → I → Bool) (x : G) (i : I) : ‖1 - boolComplex (a x i)‖ ≤ 1 := by + cases a x i <;> simp [boolComplex] + +omit [Fintype I] in +theorem columnMask_norm (a : G → I → Bool) (s : I → G) (y₀ x : G) (i : I) : + ‖columnMask a s y₀ x i‖ ≤ 1 := by + unfold columnMask + split_ifs + · exact complement_norm a x i + · simp + +omit [Group G] in +theorem rowMask_support (a : G → I → Bool) (x₀ x : G) (i : I) (h : rowMask a x₀ x i ≠ 0) : + i ∈ rowOnes a x₀ := by + unfold rowMask at h + split_ifs at h with he + · subst x + cases ha : a x₀ i <;> simp_all [boolComplex, rowOnes] + · exact (h rfl).elim + +theorem columnMask_support (a : G → I → Bool) (s : I → G) (y₀ x : G) (i : I) + (h : columnMask a s y₀ x i ≠ 0) : i ∈ columnZeros a s y₀ := by + unfold columnMask at h + split_ifs at h with he + · have hx : y₀ * (s i)⁻¹ = x := by rw [← he, mul_inv_cancel_right] + cases ha : a x i <;> simp_all [boolComplex, columnZeros] + · exact (h rfl).elim + +theorem row_localization (v : I → Fibre K) (s : I → G) (a : G → I → Bool) (x₀ : G) : + KernelObstruction.row (oriented v s a) x₀ = + KernelObstruction.row (operator v s (rowMask a x₀) (rowMask_norm a x₀)) x₀ := by + ext ξ z + change (oriented v s a ξ x₀) z = (operator v s (rowMask a x₀) (rowMask_norm a x₀) ξ x₀) z + simp [oriented, operator_apply, rowMask] + +theorem column_localization (v : I → Fibre K) (s : I → G) (a : G → I → Bool) (y₀ : G) : + KernelObstruction.col (constant v s - oriented v s a) y₀ = + KernelObstruction.col (operator v s (columnMask a s y₀) (columnMask_norm a s y₀)) y₀ := by + have hsub : constant v s - oriented v s a = + operator v s (fun x i => 1 - boolComplex (a x i)) (complement_norm a) := + operator_sub _ _ _ _ _ _ _ + rw [hsub] + apply ContinuousLinearMap.ext + intro z + apply lp.ext + funext x + change operator v s (fun x i => 1 - boolComplex (a x i)) (complement_norm a) (lp.single 2 y₀ z) x = + operator v s (columnMask a s y₀) (columnMask_norm a s y₀) (lp.single 2 y₀ z) x + simp only [operator_apply] + apply Finset.sum_congr rfl + intro i hi + by_cases h : x * s i = y₀ + · simp [columnMask, h] + · rw [lp.single_apply_ne _ _ _ h] + simp [columnMask, h] + +theorem local_row_bound (v : I → Fibre K) (s : I → G) (a : G → I → Bool) + {r : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hv : FiniteSynthesis.FrameBound v (min (2*r) (Fintype.card I)) b) + (hr : ∀ x, (rowOnes a x).card ≤ r) (x₀ : G) : + ‖KernelObstruction.row (oriented v s a) x₀‖ ≤ b^2 := by + have hJ : (rowOnes a x₀).card ≤ min (2*r) (Fintype.card I) := + le_min ((hr x₀).trans (by omega)) (Finset.card_le_univ _) + have h := support_bound v s (rowMask a x₀) (rowMask_norm a x₀) hb hv (rowOnes a x₀) hJ + (rowMask_support a x₀) + rw [row_localization] + exact (KernelObstruction.row_norm_le _ _).trans h + +theorem local_column_bound (v : I → Fibre K) (s : I → G) (a : G → I → Bool) + {r : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hv : FiniteSynthesis.FrameBound v (min (2*r) (Fintype.card I)) b) + (hc : ∀ y, (columnZeros a s y).card ≤ r) (y₀ : G) : + ‖KernelObstruction.col (constant v s - oriented v s a) y₀‖ ≤ b^2 := by + have hJ : (columnZeros a s y₀).card ≤ min (2*r) (Fintype.card I) := + le_min ((hc y₀).trans (by omega)) (Finset.card_le_univ _) + have h := support_bound v s (columnMask a s y₀) (columnMask_norm a s y₀) hb hv (columnZeros a s y₀) hJ + (columnMask_support a s y₀) + rw [column_localization] + exact (KernelObstruction.col_norm_le _ _).trans h + +end Masked +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Main.lean b/lean/OAI/Analysis/Unitarizability/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..020fc9c09d0f5e0f1a887e85e875486a44319400 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Main.lean @@ -0,0 +1,99 @@ +import OAI.Analysis.Unitarizability.Contracting +import OAI.Analysis.Unitarizability.Frames +import OAI.Analysis.Unitarizability.LocalBounds +import OAI.Analysis.Unitarizability.SumObstruction + +namespace OAI + +/-! The uniformly bounded nonunitarizable representation of a countable +nonamenable group, assembled from sparse masks, frames, and the direct-sum obstruction. -/ +noncomputable section +namespace Dixmier +universe u +open Filter +variable {G : Type u} [Group G] [Countable G] [TopologicalSpace G] [DiscreteTopology G] + +/-- A uniformly 101-bounded representation on a separable Hilbert space, +not similar to a unitary representation, constructed from nonamenability. -/ +theorem nonamenable_witness (hG : ¬ Amenable G) : NonamenableWitness.{u,u} G := by + classical + obtain ⟨S, hS, hd, ρ, hρ, hρ1, hmask⟩ := sparse_splitting_of_nonamenable hG + let d := S.card + let k : ℕ → ℕ := fun j => fiberDimension d ρ (j+1) + let r : ℕ → ℕ := fun j => endpointCapacity d ρ (j+1) + let Labels : ℕ → Type u := fun j => Word S (j+1) + let s : ∀ j, Labels j → G := fun j => wordProduct (fun x : S => (x : G)) (j+1) + have hlabel (j : ℕ) : Fintype.card (Labels j) = d^(j+1) := by + simp [Labels, word_card, d] + have hn (j : ℕ) : 2 ≤ Fintype.card (Labels j) := by + rw [hlabel] + have hp : 1 ≤ d^j := one_le_pow₀ (by omega : 1 ≤ d) + rw [pow_succ'] + dsimp [d] at * + nlinarith + have hr (j : ℕ) : 1 ≤ r j := endpointCapacity_pos hd hρ (j+1) + have hk (j : ℕ) : 0 < k j := fiberDimension_pos hd hρ (j+1) + have hdim (j : ℕ) : FrameParameters.dimension (Fintype.card (Labels j)) (r j) = k j := by + simp [FrameParameters.dimension, hlabel, k, fiberDimension, r, Nat.cast_pow] + have hframes (j : ℕ) : ∃ v : Labels j → EuclideanSpace ℂ (Fin (k j)), + (∀ i, ‖v i‖ = 1) ∧ + FiniteSynthesis.FrameBound v (min (2*r j) (Fintype.card (Labels j))) 10 := by + have h := SignMatrix.frames_for_fintype (hn j) (hr j) + rw [hdim j] at h + exact h + choose v hvunit hvframe using hframes + have hmasks (j : ℕ) : ∃ a : G → Labels j → Bool, + (∀ x, (rowOnes a x).card ≤ r j) ∧ ∀ y, (columnZeros a (s j) y).card ≤ r j := + hmask (j+1) (by omega) + choose a har hac using hmasks + let A : ∀ j, DirectSumObstruction.Stage G k j →L[ℂ] DirectSumObstruction.Stage G k j := + fun j => Masked.constant (v j) (s j) + let T : ∀ j, DirectSumObstruction.Stage G k j →L[ℂ] DirectSumObstruction.Stage G k j := + fun j => Masked.oriented (v j) (s j) (a j) + have hA (j : ℕ) : A j ∈ KernelObstruction.Commutant := Masked.constant_commutant _ _ + have hrow (j : ℕ) : ‖KernelObstruction.row (T j) 1‖ ≤ 100 := by + have h := Masked.local_row_bound (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (har j) 1 + norm_num at h + exact h + have hcol (j : ℕ) : ‖KernelObstruction.col (A j-T j) 1‖ ≤ 100 := by + have h := Masked.local_column_bound (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (hac j) 1 + norm_num at h + exact h + have hdiff (j : ℕ) (g : G) : ‖coboundary KernelObstruction.translation (T j) g‖ ≤ 100 := by + have h := Masked.difference_norm_le (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (har j) (hac j) g + norm_num at h + exact h + have henergy (j : ℕ) : (d : ℝ)^(j+1) ≤ KernelObstruction.energy (A j) := by + have h := Masked.constant_energy_ge_card (v j) (hvunit j) (s j) + rw [hlabel] at h + simpa only [Nat.cast_pow] using h + have hratio : Tendsto (fun j => KernelObstruction.energy (A j) / k j) atTop atTop := by + have hbase := (reciprocal_dimension_ratio_tendsto hd hρ hρ1).comp (tendsto_add_atTop_nat 1) + apply tendsto_atTop_mono _ hbase + intro j + exact div_le_div_of_nonneg_right (henergy j) (Nat.cast_nonneg _) + obtain ⟨π, hπbound, hπnot⟩ := DirectSumObstruction.direct_sum_obstruction k hk A T hA + (by norm_num : (0 : ℝ) ≤ 100) hrow hcol hdiff hratio + let : TopologicalSpace.SeparableSpace (DirectSumObstruction.Carrier G k) := + DirectSumObstruction.carrier_separable k + refine ⟨DirectSumObstruction.Carrier G k, inferInstance, inferInstance, inferInstance, inferInstance, + π, ?_, hπnot⟩ + intro g + convert hπbound g using 1 + norm_num + +/-- The conclusion at the common group/Hilbert-space universe. -/ +theorem main_theorem : MainTheorem.{u,u} := by + intro G _ _ _ _ hG + exact nonamenable_witness hG + +/-- Unitarizability implies amenability, without a common similarity bound. -/ +theorem amenable_of_unitarizable (hG : Unitarizable.{u,u} G) : Amenable G := by + by_contra hnot + exact witness_not_unitarizable (nonamenable_witness hnot) hG + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/MaskAlgebra.lean b/lean/OAI/Analysis/Unitarizability/MaskAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..f84d66c444b77a6b53f72fc06b28e448ddd91b15 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/MaskAlgebra.lean @@ -0,0 +1,125 @@ +import OAI.Analysis.Unitarizability.Masked +import OAI.Analysis.Unitarizability.SparseMask + +namespace OAI + +/-! Sparse masks yield operator conjugation identities, and the +constant mask has a rank-one collision kernel. -/ +noncomputable section +namespace Dixmier +namespace Masked +open Finset +open scoped ComplexConjugate +variable {G I K : Type*} [Group G] [Fintype I] [Fintype K] +local instance : DecidableEq I := Classical.decEq I +local instance : DecidableEq G := Classical.decEq G +local instance : DecidableEq ℂ := Classical.decEq ℂ + +/-- The masked operator bound in finite-cardinality form. -/ +theorem masked_bound_of_frame (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) {p : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hv : FiniteSynthesis.FrameBound v p b) + (hr : ∀ x, (rowSet c x).card ≤ p) (hcol : ∀ y, (columnSet s c y).card ≤ p) : + ‖operator v s c hc‖ ≤ b^2 := + masked_bound v s c hc hb (fun x => hv _ (hr x)) (fun y => hv _ (hcol y)) + +theorem operator_sub (v : I → Fibre K) (s : I → G) (c d : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) (hd : ∀ x i, ‖d x i‖ ≤ 1) + (hcd : ∀ x i, ‖c x i - d x i‖ ≤ 1) : + operator v s c hc - operator v s d hd = operator v s (fun x i => c x i-d x i) hcd := by + apply ContinuousLinearMap.ext + intro ξ + apply lp.ext + funext x + change operator v s c hc ξ x - operator v s d hd ξ x = _ + simp only [operator_apply, sub_mul, sub_smul, Finset.sum_sub_distrib] + +theorem conjugate_operator (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) (g : G) : + conjugate KernelObstruction.translation g (operator v s c hc) = + operator v s (fun x i => c (g⁻¹*x) i) (fun _ i => hc _ i) := by + apply ContinuousLinearMap.ext + intro ξ + apply lp.ext + funext x + change KernelObstruction.translation g (operator v s c hc (KernelObstruction.translation g⁻¹ ξ)) x = _ + simp only [KernelObstruction.translation_apply, operator_apply, inv_inv, + ← mul_assoc, mul_inv_cancel, one_mul] + +def constant (v : I → Fibre K) (s : I → G) : Space G K →L[ℂ] Space G K := + operator v s (fun _ _ => 1) (fun _ _ => by simp) + +theorem constant_commutant (v : I → Fibre K) (s : I → G) : + constant v s ∈ KernelObstruction.Commutant := by + intro g + apply Commute.symm + apply (conjugate_eq_self_iff_commute KernelObstruction.translation g (constant v s)).mp + exact conjugate_operator v s (fun _ _ => 1) (fun _ _ => by simp) g + +theorem basis_inner_right (v : Fibre K) (b : K) : + inner ℂ v (EuclideanSpace.basisFun K ℂ b) = conj (v b) := by + rw [← EuclideanSpace.basisFun_inner K ℂ v b, inner_conj_symm] + +theorem constant_kernel (v : I → Fibre K) (s : I → G) (g : G) : + KernelObstruction.coefficients (KernelObstruction.block (constant v s) 1 g) = + kernelCoefficients v s g := by + apply (WithLp.equiv 2 ((K × K) → ℂ)).injective + funext ab + rcases ab with ⟨a,b⟩ + change (constant v s (lp.single (E := fun _ : G => Fibre K) 2 g (EuclideanSpace.basisFun K ℂ b)) 1) a = kernelCoefficients v s g (a,b) + simp only [constant, operator_apply, one_mul, kernelCoefficients, + WithLp.ofLp_sum, Finset.sum_apply, PiLp.smul_apply, smul_eq_mul, Finset.sum_filter] + apply Finset.sum_congr rfl + intro i hi + by_cases h : s i = g + · simp only [h, lp.single_apply_self, ite_true] + change inner ℂ (v i) (EuclideanSpace.basisFun K ℂ b) * v i a = v i a * conj (v i b) + rw [basis_inner_right, mul_comm] + · simp [h] + +theorem constant_energy_ge_card (v : I → Fibre K) (hv : ∀ i, ‖v i‖ = 1) (s : I → G) : + (Fintype.card I : ℝ) ≤ KernelObstruction.energy (constant v s) := by + unfold KernelObstruction.energy + simp_rw [constant_kernel] + exact kernel_energy_ge_card v hv s + +omit [Group G] [Fintype I] in +theorem bool_mask_norm (a : G → I → Bool) (x : G) (i : I) : ‖boolComplex (a x i)‖ ≤ 1 := by + cases a x i <;> simp [boolComplex] + +def oriented (v : I → Fibre K) (s : I → G) (a : G → I → Bool) : Space G K →L[ℂ] Space G K := + operator v s (fun x i => boolComplex (a x i)) (bool_mask_norm a) + +theorem difference_operator (v : I → Fibre K) (s : I → G) (a : G → I → Bool) (g : G) : + coboundary KernelObstruction.translation (oriented v s a) g = + operator v s (fun x i => boolComplex (a x i) - boolComplex (a (g⁻¹*x) i)) + (fun _ _ => difference_mask_norm _ _) := by + rw [coboundary, oriented, conjugate_operator] + exact operator_sub _ _ _ _ _ _ _ + +theorem difference_norm_le (v : I → Fibre K) (s : I → G) (a : G → I → Bool) + {r : ℕ} {b : ℝ} (hb : 0 ≤ b) + (hv : FiniteSynthesis.FrameBound v (min (2*r) (Fintype.card I)) b) + (hr : ∀ x, (rowOnes a x).card ≤ r) (hc : ∀ y, (columnZeros a s y).card ≤ r) (g : G) : + ‖coboundary KernelObstruction.translation (oriented v s a) g‖ ≤ b^2 := by + rw [difference_operator] + apply masked_bound_of_frame _ _ _ _ hb hv + · intro x + have h : rowSet (fun x i => boolComplex (a x i) - boolComplex (a (g⁻¹*x) i)) x = rowDifference a g x := by + ext i + simp [rowSet, rowDifference, difference_mask_ne_zero] + rw [h] + exact rowDifference_card_le a r hr g x + · intro y + have h : columnSet s (fun x i => boolComplex (a x i) - boolComplex (a (g⁻¹*x) i)) y = columnDifference a s g y := by + ext i + simp [columnSet, columnDifference, difference_mask_ne_zero] + rw [h] + exact columnDifference_card_le a s r hc g y + +end Masked +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Masked.lean b/lean/OAI/Analysis/Unitarizability/Masked.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc9ba6855aa6d6b257b2cb5b2c666a39824f795c --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Masked.lean @@ -0,0 +1,166 @@ +import OAI.Analysis.Unitarizability.KernelObstruction +import OAI.Analysis.Unitarizability.HilbertSum +import OAI.Analysis.Unitarizability.FiniteSynthesis + +namespace OAI + +/-! Bounded masked operators. All labels remain separate, including +repeated values of the product list. -/ +noncomputable section +namespace Dixmier +namespace Masked +open Finset +variable {G I K : Type*} [Group G] [Fintype I] [Fintype K] +local instance : DecidableEq I := Classical.decEq I +local instance : DecidableEq G := Classical.decEq G +local instance : DecidableEq ℂ := Classical.decEq ℂ +abbrev Space (G K : Type*) [Fintype K] : Type _ := KernelObstruction.Space G K +abbrev Fibre (K : Type*) [Fintype K] := EuclideanSpace ℂ K + +def shift (s : G) : Space G K →L[ℂ] Space G K := + (KernelObstruction.reindexIsometry (K := K) (Equiv.mulRight s)).toContinuousLinearMap + +@[simp] theorem shift_apply (s : G) (ξ : Space G K) (x : G) : shift s ξ x = ξ (x*s) := rfl + +def term (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) (i : I) : Space G K →L[ℂ] Space G K := + (HilbertSum.boundedSum (κ := ‖v i‖ * ‖v i‖) (fun x => c x i • InnerProductSpace.rankOne ℂ (v i) (v i)) + (mul_nonneg (norm_nonneg _) (norm_nonneg _)) (fun x => by + rw [norm_smul, InnerProductSpace.norm_rankOne] + exact (mul_le_mul_of_nonneg_right (hc x i) (mul_nonneg (norm_nonneg _) (norm_nonneg _))).trans_eq (one_mul _))).comp + (shift (s i)) + +def operator (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) : Space G K →L[ℂ] Space G K := ∑ i, term v s c hc i + +omit [Fintype I] in +@[simp] theorem term_apply (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) (i : I) (ξ : Space G K) (x : G) : + term v s c hc i ξ x = (c x i * inner ℂ (v i) (ξ (x*s i))) • v i := by + change (c x i) • (InnerProductSpace.rankOne ℂ (v i) (v i) (ξ (x*s i))) = _ + rw [InnerProductSpace.rankOne_apply, smul_smul] + +@[simp] theorem operator_apply (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) (ξ : Space G K) (x : G) : + operator v s c hc ξ x = ∑ i, (c x i * inner ℂ (v i) (ξ (x*s i))) • v i := by + simp only [operator, _root_.sum_apply, lp.coeFn_sum, Finset.sum_apply, term_apply] + +def rowSet (c : G → I → ℂ) (x : G) : Finset I := univ.filter (fun i => c x i ≠ 0) +def columnSet (s : I → G) (c : G → I → ℂ) (y : G) : Finset I := + univ.filter (fun i => c (y*(s i)⁻¹) i ≠ 0) + +def edgeEnergy (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) (ξ : Space G K) (x : G) : ℝ := + ∑ i, if c x i ≠ 0 then ‖inner ℂ (v i) (ξ (x*s i))‖^2 else 0 + +omit [Fintype I] in +theorem edge_summable (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) (ξ : Space G K) (i : I) : + Summable (fun x => if c x i ≠ 0 then ‖inner ℂ (v i) (ξ (x*s i))‖^2 else 0) := by + have hs := ((KernelObstruction.space_summable ξ).comp_injective + (Equiv.mulRight (s i)).injective).mul_left (‖v i‖^2) + apply Summable.of_nonneg_of_le _ _ hs + · intro x; split_ifs <;> positivity + · intro x + split_ifs + · change ‖inner ℂ (v i) (ξ (x*s i))‖^2 ≤ ‖v i‖^2 * ‖ξ (x*s i)‖^2 + calc + _ ≤ (‖v i‖ * ‖ξ (x*s i)‖)^2 := pow_le_pow_left₀ (norm_nonneg _) + (norm_inner_le_norm (𝕜 := ℂ) (v i) (ξ (x*s i))) 2 + _ = _ := mul_pow _ _ _ + · change 0 ≤ ‖v i‖^2 * ‖ξ (x*s i)‖^2 + positivity + +theorem edgeEnergy_summable (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) (ξ : Space G K) : + Summable (edgeEnergy v s c ξ) := summable_sum (fun i _ => edge_summable v s c ξ i) + +theorem sum_subfamily {R : Type*} [AddCommMonoid R] (c : I → ℂ) (f : I → R) : + (∑ i : univ.filter (fun i => c i ≠ 0), f i) = ∑ i, if c i ≠ 0 then f i else 0 := by + rw [Finset.sum_coe_sort, Finset.sum_filter] + +theorem row_estimate (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) {b : ℝ} (hb : 0 ≤ b) + (hrow : ∀ x, ‖FiniteSynthesis.synthesis v (rowSet c x)‖ ≤ b) + (ξ : Space G K) (x : G) : + ‖operator v s c hc ξ x‖^2 ≤ b^2 * edgeEnergy v s c ξ x := by + let J := rowSet c x + have hsum : operator v s c hc ξ x = + ∑ i : J, (c x i * inner ℂ (v i) (ξ (x*s i))) • v i := by + calc + _ = ∑ i, (c x i * inner ℂ (v i) (ξ (x*s i))) • v i := operator_apply .. + _ = ∑ i ∈ J, (c x i * inner ℂ (v i) (ξ (x*s i))) • v i := by + symm + apply Finset.sum_subset (Finset.subset_univ _) + intro i hi hn + have hz : c x i = 0 := by simpa [J, rowSet] using hn + simp [hz] + _ = _ := (Finset.sum_coe_sort J (fun i => (c x i * inner ℂ (v i) (ξ (x*s i))) • v i)).symm + rw [hsum] + have h := FiniteSynthesis.synthesis_sq_le v J hb (hrow x) + (fun i => c x i * inner ℂ (v i) (ξ (x*s i))) + apply h.trans + apply mul_le_mul_of_nonneg_left _ (sq_nonneg b) + have he : edgeEnergy v s c ξ x = ∑ i : J, ‖inner ℂ (v i) (ξ (x*s i))‖^2 := by + exact (sum_subfamily (c x) (fun i => ‖inner ℂ (v i) (ξ (x*s i))‖^2)).symm + rw [he] + apply Finset.sum_le_sum + intro i hi + rw [norm_mul, mul_pow] + have hm : ‖c x i‖^2 ≤ 1 := by simpa using pow_le_pow_left₀ (norm_nonneg _) (hc x i) 2 + exact (mul_le_mul_of_nonneg_right hm (sq_nonneg _)).trans_eq (one_mul _) + +theorem edgeEnergy_reindex (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) (ξ : Space G K) : + ∑' x, edgeEnergy v s c ξ x = + ∑' y, ∑ i : columnSet s c y, ‖inner ℂ (v i) (ξ y)‖^2 := by + let f : G → I → ℝ := fun y i => if c (y*(s i)⁻¹) i ≠ 0 then ‖inner ℂ (v i) (ξ y)‖^2 else 0 + have he (i : I) : (fun y => f y i) = + (fun y => if c y i ≠ 0 then ‖inner ℂ (v i) (ξ (y*s i))‖^2 else 0) ∘ + (Equiv.mulRight (s i)⁻¹) := by + funext y + simp [f, mul_assoc] + have hs (i : I) : Summable (fun y => f y i) := by + rw [he] + exact (edge_summable v s c ξ i).comp_injective (Equiv.mulRight (s i)⁻¹).injective + change (∑' x, ∑ i, _) = _ + rw [Summable.tsum_finsetSum (fun i _ => edge_summable v s c ξ i)] + have ht (i : I) : (∑' x, if c x i ≠ 0 then ‖inner ℂ (v i) (ξ (x*s i))‖^2 else 0) = ∑' y, f y i := by + rw [he] + exact ((Equiv.mulRight (s i)⁻¹).tsum_eq _).symm + simp_rw [ht] + rw [← Summable.tsum_finsetSum (fun i _ => hs i)] + apply tsum_congr + intro y + exact (sum_subfamily (fun i => c (y*(s i)⁻¹) i) (fun i => ‖inner ℂ (v i) (ξ y)‖^2)).symm + +/-- Row and column synthesis bounds imply the masked operator bound, +without assuming that the product labels s_i are distinct. -/ +theorem masked_bound (v : I → Fibre K) (s : I → G) (c : G → I → ℂ) + (hc : ∀ x i, ‖c x i‖ ≤ 1) {b : ℝ} (hb : 0 ≤ b) + (hrow : ∀ x, ‖FiniteSynthesis.synthesis v (rowSet c x)‖ ≤ b) + (hcol : ∀ y, ‖FiniteSynthesis.synthesis v (columnSet s c y)‖ ≤ b) : + ‖operator v s c hc‖ ≤ b^2 := by + apply ContinuousLinearMap.opNorm_le_bound _ (sq_nonneg b) + intro ξ + have hr := (KernelObstruction.space_summable (operator v s c hc ξ)).tsum_le_tsum + (row_estimate v s c hc hb hrow ξ) ((edgeEnergy_summable v s c ξ).mul_left (b^2)) + rw [tsum_mul_left, ← KernelObstruction.space_norm_sq, edgeEnergy_reindex] at hr + have hcs : Summable (fun y => ∑ i : columnSet s c y, ‖inner ℂ (v i) (ξ y)‖^2) := by + have h (y : G) : (∑ i : columnSet s c y, ‖inner ℂ (v i) (ξ y)‖^2) = + ∑ i : I, if c (y*(s i)⁻¹) i ≠ 0 then ‖inner ℂ (v i) (ξ y)‖^2 else 0 := by + exact sum_subfamily (fun i => c (y*(s i)⁻¹) i) (fun i => ‖inner ℂ (v i) (ξ y)‖^2) + simp_rw [h] + apply summable_sum + intro i hi + have hs := (edge_summable v s c ξ i).comp_injective (Equiv.mulRight (s i)⁻¹).injective + simpa [Function.comp_def, mul_assoc] using hs + have hcol' := hcs.tsum_le_tsum (fun y => FiniteSynthesis.analysis_sq_le v _ hb (hcol y) (ξ y)) + ((KernelObstruction.space_summable ξ).mul_left (b^2)) + rw [tsum_mul_left, ← KernelObstruction.space_norm_sq] at hcol' + have hh := hr.trans (mul_le_mul_of_nonneg_left hcol' (sq_nonneg b)) + have hpos : 0 ≤ b^2 * ‖ξ‖ := mul_nonneg (sq_nonneg b) (norm_nonneg ξ) + nlinarith [norm_nonneg (operator v s c hc ξ)] + +end Masked +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/MeanBounds.lean b/lean/OAI/Analysis/Unitarizability/MeanBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..17b382fce6e4127b19f31481f95f8ddf5cd4864f --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/MeanBounds.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Analysis.Unitarizability.Model + +namespace OAI + +noncomputable section +namespace Dixmier +namespace DayDixmier +open scoped BoundedContinuousFunction ComplexConjugate +variable {G : Type*} [TopologicalSpace G] + +lemma mean_const (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (h1 : m (BoundedContinuousFunction.const G 1) = 1) (z : ℂ) : + m (BoundedContinuousFunction.const G z) = z := by + have hc : BoundedContinuousFunction.const G z = + z • BoundedContinuousFunction.const G (1 : ℂ) := by + ext g + simp + rw [hc, map_smul, h1, smul_eq_mul, mul_one] + +lemma mean_real_bound (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (h1 : m (BoundedContinuousFunction.const G 1) = 1) + (hp : ∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) + (f : G →ᵇ ℂ) (C : ℝ) (hf : ∀ x, (f x).im = 0) + (hC : ∀ x, |(f x).re| ≤ C) : (m f).im = 0 ∧ ‖m f‖ ≤ C := by + have hplus := hp (BoundedContinuousFunction.const G (C : ℂ) + f) (by + intro x + simp only [BoundedContinuousFunction.add_apply, BoundedContinuousFunction.const_apply, + Complex.add_re, Complex.ofReal_re, Complex.add_im, Complex.ofReal_im, hf, add_zero] + exact ⟨by have := (abs_le.mp (hC x)).1; linarith, trivial⟩) + have hminus := hp (BoundedContinuousFunction.const G (C : ℂ) - f) (by + intro x + simp only [BoundedContinuousFunction.sub_apply, BoundedContinuousFunction.const_apply, + Complex.sub_re, Complex.ofReal_re, Complex.sub_im, Complex.ofReal_im, hf, sub_zero] + exact ⟨sub_nonneg.mpr (abs_le.mp (hC x)).2, trivial⟩) + rw [map_add, mean_const m h1] at hplus + rw [map_sub, mean_const m h1] at hminus + have hi : (m f).im = 0 := by simpa using hplus.2 + refine ⟨hi, ?_⟩ + have hr : |(m f).re| ≤ C := by + apply abs_le.mpr + constructor <;> simp only [Complex.add_re, Complex.sub_re, Complex.ofReal_re] at * <;> + linarith [hplus.1, hminus.1] + have heq : m f = ((m f).re : ℂ) := by + apply Complex.ext <;> simp [hi] + rw [heq, Complex.norm_real, Real.norm_eq_abs] + exact hr + +variable [DiscreteTopology G] + +def realComponent (f : G →ᵇ ℂ) : G →ᵇ ℂ := + BoundedContinuousFunction.ofNormedAddCommGroupDiscrete (fun g => ((f g).re : ℂ)) ‖f‖ + (fun g => by simpa using (Complex.abs_re_le_norm (f g)).trans (f.norm_coe_le_norm g)) + +def imagComponent (f : G →ᵇ ℂ) : G →ᵇ ℂ := + BoundedContinuousFunction.ofNormedAddCommGroupDiscrete (fun g => ((f g).im : ℂ)) ‖f‖ + (fun g => by simpa using (Complex.abs_im_le_norm (f g)).trans (f.norm_coe_le_norm g)) + +lemma mean_norm_le (m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ) + (h1 : m (BoundedContinuousFunction.const G 1) = 1) + (hp : ∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) (f : G →ᵇ ℂ) : ‖m f‖ ≤ 2 * ‖f‖ := by + have hr : ‖m (realComponent f)‖ ≤ ‖f‖ := + (mean_real_bound m h1 hp _ ‖f‖ (fun _ => rfl) + (fun g => by + change |(f g).re| ≤ ‖f‖ + exact (Complex.abs_re_le_norm _).trans (f.norm_coe_le_norm g))).2 + have hi : ‖m (imagComponent f)‖ ≤ ‖f‖ := + (mean_real_bound m h1 hp _ ‖f‖ (fun _ => rfl) + (fun g => by + change |(f g).im| ≤ ‖f‖ + exact (Complex.abs_im_le_norm _).trans (f.norm_coe_le_norm g))).2 + have hf : f = realComponent f + Complex.I • imagComponent f := by + ext g + change f g = ((f g).re : ℂ) + Complex.I * ((f g).im : ℂ) + apply Complex.ext <;> simp + have hm := congrArg m hf + rw [map_add, map_smul] at hm + rw [hm] + calc + ‖m (realComponent f) + Complex.I • m (imagComponent f)‖ ≤ + ‖m (realComponent f)‖ + ‖Complex.I • m (imagComponent f)‖ := norm_add_le _ _ + _ ≤ ‖f‖ + ‖f‖ := by simpa using add_le_add hr hi + _ = 2 * ‖f‖ := by ring + +end DayDixmier +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Model.lean b/lean/OAI/Analysis/Unitarizability/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee0fc98185dbf9cdfe239f3bedf317e4a17b8341 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Model.lean @@ -0,0 +1,64 @@ +import Mathlib.Analysis.InnerProductSpace.LinearMap +import Mathlib.Topology.ContinuousMap.Bounded.Normed +import Mathlib.Topology.Instances.Discrete + +namespace OAI + +/-! Amenability, unitarizability, and bounded nonunitarizable representations. +Representations into the endomorphism monoid have bounded inverses because +their domain is a group. Norm-preserving invertible complex linear maps on +Hilbert spaces are unitary. No bound on similarities is imposed. -/ +noncomputable section +universe u v +namespace Dixmier +open scoped BoundedContinuousFunction + +def leftTranslate {G : Type u} [Group G] [TopologicalSpace G] + [DiscreteTopology G] (g : G) (f : G →ᵇ ℂ) : G →ᵇ ℂ := + f.compContinuous ⟨fun x => g⁻¹ * x, continuous_of_discreteTopology⟩ + +/-- A positive normalized left-invariant complex mean. -/ +def Amenable (G : Type u) [Group G] [TopologicalSpace G] + [DiscreteTopology G] : Prop := + ∃ m : (G →ᵇ ℂ) →ₗ[ℂ] ℂ, + m (BoundedContinuousFunction.const G 1) = 1 ∧ + (∀ f : G →ᵇ ℂ, (∀ x, 0 ≤ (f x).re ∧ (f x).im = 0) → + 0 ≤ (m f).re ∧ (m f).im = 0) ∧ + ∀ (g : G) (f : G →ᵇ ℂ), m (leftTranslate g f) = m f + +def SimilarToUnitary {G : Type u} [Group G] + {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + (π : G →* (H →L[ℂ] H)) : Prop := + ∃ S : H ≃L[ℂ] H, ∀ (g : G) (x : H), ‖S (π g (S.symm x))‖ = ‖x‖ + +/-- A uniformly 101-bounded nonunitarizable representation on a separable +complete complex Hilbert space, with its universe explicit. -/ +def NonamenableWitness (G : Type u) [Group G] : Prop := + ∃ (H : Type v) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) + (_ : CompleteSpace H) (_ : TopologicalSpace.SeparableSpace H) + (π : G →* (H →L[ℂ] H)), + (∀ g : G, ‖π g‖ ≤ 101) ∧ ¬ SimilarToUnitary π + +/-- Unitarizability at an explicitly quantified Hilbert-space universe. -/ +def Unitarizable (G : Type u) [Group G] : Prop := + ∀ (H : Type v) [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [CompleteSpace H] (π : G →* (H →L[ℂ] H)), + (∃ C : ℝ, ∀ g, ‖π g‖ ≤ C) → SimilarToUnitary π + +/-- Every countable discrete nonamenable group has a bounded nonunitarizable witness. -/ +def MainTheorem : Prop := + ∀ (G : Type u) [Group G] [Countable G] [TopologicalSpace G] + [DiscreteTopology G], ¬ Amenable G → NonamenableWitness.{u, v} G + +/-- A nonunitarizable witness contradicts unitarizability. -/ +theorem witness_not_unitarizable {G : Type u} [Group G] + (h : NonamenableWitness.{u, v} G) : ¬ Unitarizable.{u, v} G := by + rcases h with ⟨H, hnorm, hinner, hcomplete, hsep, π, hbound, hnot⟩ + intro hunit + exact hnot (hunit H π ⟨101, hbound⟩) + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/NearOne.lean b/lean/OAI/Analysis/Unitarizability/NearOne.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b79649065910e69f64519c1d6344288ca6dc33b --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/NearOne.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Analysis.Unitarizability.ScaledObstruction +import OAI.Analysis.Unitarizability.UniverseTransport + +namespace OAI + +noncomputable section +namespace Dixmier +universe u +open Filter +variable {G : Type u} [Group G] [TopologicalSpace G] [DiscreteTopology G] + +theorem nonamenable_near_one (hG : ¬ Amenable G) (ε : ℝ) (hε : 0 < ε) : + ∃ (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) + (_ : CompleteSpace H) (π : G →* (H →L[ℂ] H)), + (Countable G → TopologicalSpace.SeparableSpace H) ∧ + (∀ g, ‖π g‖ ≤ 1 + ε) ∧ ¬ SimilarToUnitary π := by + classical + obtain ⟨S, hS, hd, ρ, hρ, hρ1, hmask⟩ := sparse_splitting_of_nonamenable hG + let d := S.card + let k : ℕ → ℕ := fun j => fiberDimension d ρ (j+1) + let r : ℕ → ℕ := fun j => endpointCapacity d ρ (j+1) + let Labels : ℕ → Type u := fun j => Word S (j+1) + let s : ∀ j, Labels j → G := fun j => wordProduct (fun x : S => (x : G)) (j+1) + have hlabel (j : ℕ) : Fintype.card (Labels j) = d^(j+1) := by + simp [Labels, word_card, d] + have hn (j : ℕ) : 2 ≤ Fintype.card (Labels j) := by + rw [hlabel] + have hp : 1 ≤ d^j := one_le_pow₀ (by omega : 1 ≤ d) + rw [pow_succ'] + dsimp [d] at * + nlinarith + have hr (j : ℕ) : 1 ≤ r j := endpointCapacity_pos hd hρ (j+1) + have hk (j : ℕ) : 0 < k j := fiberDimension_pos hd hρ (j+1) + have hdim (j : ℕ) : FrameParameters.dimension (Fintype.card (Labels j)) (r j) = k j := by + simp [FrameParameters.dimension, hlabel, k, fiberDimension, r, Nat.cast_pow] + have hframes (j : ℕ) : ∃ v : Labels j → EuclideanSpace ℂ (Fin (k j)), + (∀ i, ‖v i‖ = 1) ∧ + FiniteSynthesis.FrameBound v (min (2*r j) (Fintype.card (Labels j))) 10 := by + have h := SignMatrix.frames_for_fintype (hn j) (hr j) + rw [hdim j] at h + exact h + choose v hvunit hvframe using hframes + have hmasks (j : ℕ) : ∃ a : G → Labels j → Bool, + (∀ x, (rowOnes a x).card ≤ r j) ∧ ∀ y, (columnZeros a (s j) y).card ≤ r j := + hmask (j+1) (by omega) + choose a har hac using hmasks + let A : ∀ j, DirectSumObstruction.Stage G k j →L[ℂ] DirectSumObstruction.Stage G k j := + fun j => Masked.constant (v j) (s j) + let T : ∀ j, DirectSumObstruction.Stage G k j →L[ℂ] DirectSumObstruction.Stage G k j := + fun j => Masked.oriented (v j) (s j) (a j) + have hA (j : ℕ) : A j ∈ KernelObstruction.Commutant := Masked.constant_commutant _ _ + have hrow (j : ℕ) : ‖KernelObstruction.row (T j) 1‖ ≤ 100 := by + have h := Masked.local_row_bound (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (har j) 1 + norm_num at h + exact h + have hcol (j : ℕ) : ‖KernelObstruction.col (A j-T j) 1‖ ≤ 100 := by + have h := Masked.local_column_bound (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (hac j) 1 + norm_num at h + exact h + have hdiff (j : ℕ) (g : G) : ‖coboundary KernelObstruction.translation (T j) g‖ ≤ 100 := by + have h := Masked.difference_norm_le (v j) (s j) (a j) (by norm_num : (0 : ℝ) ≤ 10) (hvframe j) (har j) (hac j) g + norm_num at h + exact h + have henergy (j : ℕ) : (d : ℝ)^(j+1) ≤ KernelObstruction.energy (A j) := by + have h := Masked.constant_energy_ge_card (v j) (hvunit j) (s j) + rw [hlabel] at h + simpa only [Nat.cast_pow] using h + have hratio : Tendsto (fun j => KernelObstruction.energy (A j) / k j) atTop atTop := by + have hbase := (reciprocal_dimension_ratio_tendsto hd hρ hρ1).comp (tendsto_add_atTop_nat 1) + apply tendsto_atTop_mono _ hbase + intro j + exact div_le_div_of_nonneg_right (henergy j) (Nat.cast_nonneg _) + obtain ⟨π, hπbound, hπnot⟩ := DirectSumObstruction.scaled_direct_sum_obstruction k hk A T hA + (by norm_num : (0 : ℝ) ≤ 100) hrow hcol hdiff hratio + (show 0 < ε / 100 by positivity) + refine ⟨DirectSumObstruction.Carrier G k, inferInstance, inferInstance, inferInstance, + π, ?_, ?_, hπnot⟩ + · intro hcount + let := hcount + exact DirectSumObstruction.carrier_separable k + · intro g + simpa only [div_mul_cancel₀ ε (by norm_num : (100 : ℝ) ≠ 0)] using hπbound g + +universe v + +theorem nonamenable_near_one_large (hG : ¬ Amenable G) (ε : ℝ) (hε : 0 < ε) : + ∃ (H : Type (max u v)) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) + (_ : CompleteSpace H) (π : G →* (H →L[ℂ] H)), + (Countable G → TopologicalSpace.SeparableSpace H) ∧ + (∀ g, ‖π g‖ ≤ 1 + ε) ∧ ¬ SimilarToUnitary π := by + let Q := ULift.{v} G + let : TopologicalSpace Q := ⊥ + let : DiscreteTopology Q := ⟨rfl⟩ + let e : G ≃* Q := MulEquiv.ulift.symm + have hQ : ¬ Amenable Q := fun h => hG (amenable_of_mulEquiv e h) + obtain ⟨H, hnorm, hinner, hcomplete, π, hsep, hb, hn⟩ := nonamenable_near_one hQ ε hε + refine ⟨H, hnorm, hinner, hcomplete, π.comp e.toMonoidHom, ?_, fun g => hb (e g), ?_⟩ + · intro hcount + let := hcount + exact hsep (e.surjective.countable) + · rintro ⟨S, hS⟩ + apply hn + refine ⟨S, ?_⟩ + intro q x + simpa only [MonoidHom.comp_apply, MulEquiv.coe_toMonoidHom, e.apply_symm_apply] + using hS (e.symm q) x + +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/NetOperator.lean b/lean/OAI/Analysis/Unitarizability/NetOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..230657322173e51f11569bfe82f0c10f5e3eda39 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/NetOperator.lean @@ -0,0 +1,54 @@ +import OAI.Analysis.Unitarizability.SphereNet +import Mathlib.Analysis.InnerProductSpace.LinearMap + +namespace OAI + +/-! Finite quarter-net tests imply the operator bound 10 +for real operators. -/ +noncomputable section +namespace Dixmier +namespace SphereNet +variable {E F : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F] +variable [InnerProductSpace ℝ E] [InnerProductSpace ℝ F] + +/-- The two quarter-net errors each cost at most a quarter of the +operator norm. Tests bounded by 5 therefore give operator norm at most 10. -/ +theorem operator_norm_le_ten (M : E →L[ℝ] F) (s : Finset E) (t : Finset F) + (_hs : ∀ x ∈ s, ‖x‖ = 1) (ht : ∀ y ∈ t, ‖y‖ = 1) + (hsnet : ∀ x : E, ‖x‖ = 1 → ∃ x₀ ∈ s, ‖x-x₀‖ ≤ (1/4 : ℝ)) + (htnet : ∀ y : F, ‖y‖ = 1 → ∃ y₀ ∈ t, ‖y-y₀‖ ≤ (1/4 : ℝ)) + (hM : ∀ x ∈ s, ∀ y ∈ t, |inner ℝ (M x) y| ≤ 5) : ‖M‖ ≤ 10 := by + have hb : ‖M‖ ≤ 5 + ‖M‖/2 := by + apply ContinuousLinearMap.opNorm_le_of_re_inner_le (by positivity) + intro x y hx hy + obtain ⟨x₀, hx₀, hdx⟩ := hsnet x hx + obtain ⟨y₀, hy₀, hdy⟩ := htnet y hy + have heq : inner ℝ (M x) y = inner ℝ (M x₀) y₀ + + inner ℝ (M x) (y-y₀) + inner ℝ (M (x-x₀)) y₀ := by + simp only [map_sub, inner_sub_left, inner_sub_right] + ring + have h1 : |inner ℝ (M x) (y-y₀)| ≤ ‖M‖/4 := by + calc + _ ≤ ‖M x‖ * ‖y-y₀‖ := norm_inner_le_norm (𝕜 := ℝ) _ _ + _ ≤ (‖M‖ * ‖x‖) * (1/4) := mul_le_mul (M.le_opNorm x) hdy + (norm_nonneg _) (mul_nonneg (norm_nonneg M) (norm_nonneg x)) + _ = _ := by rw [hx]; ring + have h2 : |inner ℝ (M (x-x₀)) y₀| ≤ ‖M‖/4 := by + calc + _ ≤ ‖M (x-x₀)‖ * ‖y₀‖ := norm_inner_le_norm (𝕜 := ℝ) _ _ + _ = ‖M (x-x₀)‖ := by rw [ht y₀ hy₀, mul_one] + _ ≤ ‖M‖ * ‖x-x₀‖ := M.le_opNorm _ + _ ≤ ‖M‖ * (1/4) := mul_le_mul_of_nonneg_left hdx (norm_nonneg M) + _ = _ := by ring + change inner ℝ (M x) y ≤ 5 + ‖M‖/2 + rw [heq] + linarith [le_abs_self (inner ℝ (M x₀) y₀), hM x₀ hx₀ y₀ hy₀, + le_abs_self (inner ℝ (M x) (y-y₀)), le_abs_self (inner ℝ (M (x-x₀)) y₀)] + linarith + +end SphereNet +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Parameters.lean b/lean/OAI/Analysis/Unitarizability/Parameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec10af13e11bddb7188753b1f4f7eeebadc93868 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Parameters.lean @@ -0,0 +1,116 @@ +import Mathlib.Algebra.Order.Floor.Ring +import Mathlib.Analysis.SpecificLimits.Normed +import Mathlib.Analysis.SpecialFunctions.Log.Basic + +namespace OAI + +/-! Ceiling parameters and dimension-ratio asymptotics. -/ +noncomputable section +namespace Dixmier +open Filter Topology + +def endpointCapacity (d : ℕ) (ρ : ℝ) (ℓ : ℕ) : ℕ := ⌈(d : ℝ)^ℓ * ρ^ℓ⌉₊ +def fiberDimension (d : ℕ) (ρ : ℝ) (ℓ : ℕ) : ℕ := + ⌈2 * (endpointCapacity d ρ ℓ : ℝ) * Real.log (2 * (d : ℝ)^ℓ)⌉₊ + +theorem dimension_ratio_bound {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} (hρ : 0 ≤ ρ) (ℓ : ℕ) : + (fiberDimension d ρ ℓ : ℝ) / (d : ℝ)^ℓ ≤ + 2 * (ρ^ℓ + 1 / (d : ℝ)^ℓ) * Real.log (2 * (d : ℝ)^ℓ) + 1 / (d : ℝ)^ℓ := by + have hdR : (1 : ℝ) ≤ d := by exact_mod_cast (by omega : 1 ≤ d) + have hn : (0 : ℝ) < (d : ℝ)^ℓ := pow_pos (lt_of_lt_of_le zero_lt_one hdR) _ + have hn1 : (1 : ℝ) ≤ (d : ℝ)^ℓ := one_le_pow₀ hdR + have hlog : 0 ≤ Real.log (2 * (d : ℝ)^ℓ) := Real.log_nonneg (by nlinarith) + have hr : (endpointCapacity d ρ ℓ : ℝ) ≤ (d : ℝ)^ℓ * ρ^ℓ + 1 := + (Nat.ceil_lt_add_one (mul_nonneg hn.le (pow_nonneg hρ _))).le + have hk : (fiberDimension d ρ ℓ : ℝ) ≤ + 2 * (endpointCapacity d ρ ℓ : ℝ) * Real.log (2 * (d : ℝ)^ℓ) + 1 := + (Nat.ceil_lt_add_one (mul_nonneg (by positivity) hlog)).le + have hk' : (fiberDimension d ρ ℓ : ℝ) ≤ + 2 * ((d : ℝ)^ℓ * ρ^ℓ + 1) * Real.log (2 * (d : ℝ)^ℓ) + 1 := by + nlinarith [mul_le_mul_of_nonneg_right hr hlog] + apply (div_le_iff₀ hn).mpr + calc + (fiberDimension d ρ ℓ : ℝ) ≤ 2 * ((d : ℝ)^ℓ * ρ^ℓ + 1) * Real.log (2 * (d : ℝ)^ℓ) + 1 := hk' + _ = (2 * (ρ^ℓ + 1 / (d : ℝ)^ℓ) * Real.log (2 * (d : ℝ)^ℓ) + 1 / (d : ℝ)^ℓ) * (d : ℝ)^ℓ := by + field_simp + +/-- The logarithm contributes only a linear factor in the word length. -/ +theorem geometric_log_tendsto {a : ℝ} (ha : 0 ≤ a) (ha1 : a < 1) + {d : ℝ} (hd : 0 < d) : + Tendsto (fun ℓ : ℕ => a^ℓ * Real.log (2 * d^ℓ)) atTop (𝓝 0) := by + have hp := tendsto_pow_atTop_nhds_zero_of_lt_one ha ha1 + have hl : Tendsto (fun ℓ : ℕ => (ℓ : ℝ) * a^ℓ) atTop (𝓝 0) := by + simpa only [pow_one] using (summable_pow_mul_geometric_of_norm_lt_one 1 + (show ‖a‖ < 1 by simpa [Real.norm_eq_abs, abs_of_nonneg ha] using ha1)).tendsto_atTop_zero + have h := (hp.mul_const (Real.log 2)).add (hl.mul_const (Real.log d)) + simp only [zero_mul, zero_add] at h + convert h using 1 + ext ℓ + rw [Real.log_mul (by norm_num) (pow_ne_zero _ hd.ne'), Real.log_pow] + ring + +/-- The dimension ratio tends to zero. -/ +theorem dimension_ratio_tendsto {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} + (hρ : 0 ≤ ρ) (hρ1 : ρ < 1) : + Tendsto (fun ℓ : ℕ => (fiberDimension d ρ ℓ : ℝ) / (d : ℝ)^ℓ) atTop (𝓝 0) := by + have hdR : (1 : ℝ) < d := by exact_mod_cast (by omega : 1 < d) + have hi0 : (0 : ℝ) ≤ (d : ℝ)⁻¹ := inv_nonneg.mpr (by linarith) + have hi1 : (d : ℝ)⁻¹ < 1 := (inv_lt_one₀ (by linarith)).mpr hdR + have h1 := geometric_log_tendsto hρ hρ1 (lt_trans zero_lt_one hdR) + have h2 := geometric_log_tendsto hi0 hi1 (lt_trans zero_lt_one hdR) + have h3 := tendsto_pow_atTop_nhds_zero_of_lt_one hi0 hi1 + have hu : Tendsto (fun ℓ : ℕ => + 2 * (ρ^ℓ + 1 / (d : ℝ)^ℓ) * Real.log (2 * (d : ℝ)^ℓ) + 1 / (d : ℝ)^ℓ) + atTop (𝓝 0) := by + have hh := ((h1.add h2).const_mul 2).add h3 + simp only [zero_add, mul_zero] at hh + convert hh using 1 + ext ℓ + simp only [one_div, inv_pow] + ring + exact squeeze_zero (fun ℓ => div_nonneg (Nat.cast_nonneg _) (by positivity)) + (dimension_ratio_bound hd hρ) hu + +theorem endpointCapacity_pos {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} (hρ : 0 < ρ) (ℓ : ℕ) : + 0 < endpointCapacity d ρ ℓ := by + apply Nat.ceil_pos.mpr + exact mul_pos (pow_pos (by exact_mod_cast (by omega : 0 < d)) _) (pow_pos hρ _) + +theorem fiberDimension_pos {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} (hρ : 0 < ρ) (ℓ : ℕ) : + 0 < fiberDimension d ρ ℓ := by + have hr : (0 : ℝ) < endpointCapacity d ρ ℓ := by exact_mod_cast endpointCapacity_pos hd hρ ℓ + have hdR : (1 : ℝ) ≤ d := by exact_mod_cast (by omega : 1 ≤ d) + have hn1 : (1 : ℝ) ≤ (d : ℝ)^ℓ := one_le_pow₀ hdR + have hlog : 0 < Real.log (2 * (d : ℝ)^ℓ) := Real.log_pos (by nlinarith) + apply Nat.ceil_pos.mpr + exact mul_pos (mul_pos (by norm_num) hr) hlog + +/-- Reciprocal dimension ratio used by the direct-sum obstruction. -/ +theorem reciprocal_dimension_ratio_tendsto {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} + (hρ : 0 < ρ) (hρ1 : ρ < 1) : + Tendsto (fun ℓ : ℕ => (d : ℝ)^ℓ / (fiberDimension d ρ ℓ : ℝ)) atTop atTop := by + have ht : Tendsto (fun ℓ : ℕ => (fiberDimension d ρ ℓ : ℝ) / (d : ℝ)^ℓ) + atTop (𝓝[>] (0 : ℝ)) := by + apply tendsto_nhdsWithin_iff.mpr + refine ⟨dimension_ratio_tendsto hd hρ.le hρ1, Filter.Eventually.of_forall (fun ℓ => ?_)⟩ + change 0 < (fiberDimension d ρ ℓ : ℝ) / (d : ℝ)^ℓ + apply div_pos + · exact_mod_cast fiberDimension_pos hd hρ ℓ + · exact pow_pos (by exact_mod_cast (by omega : 0 < d)) _ + simpa only [Function.comp_def, inv_div] using tendsto_inv_nhdsGT_zero.comp ht + +/-- A kernel energy satisfying the cardinality lower bound has +unbounded energy per fibre dimension. -/ +theorem energy_ratio_tendsto {d : ℕ} (hd : 2 ≤ d) {ρ : ℝ} + (hρ : 0 < ρ) (hρ1 : ρ < 1) (E : ℕ → ℝ) + (hE : ∀ ℓ, (d : ℝ)^ℓ ≤ E ℓ) : + Tendsto (fun ℓ => E ℓ / (fiberDimension d ρ ℓ : ℝ)) atTop atTop := by + apply tendsto_atTop_mono _ (reciprocal_dimension_ratio_tendsto hd hρ hρ1) + intro ℓ + exact div_le_div_of_nonneg_right (hE ℓ) (Nat.cast_nonneg _) + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Regular.lean b/lean/OAI/Analysis/Unitarizability/Regular.lean new file mode 100644 index 0000000000000000000000000000000000000000..f45f593ac1474a10769a53b6e4b5f12b79c9c0a2 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Regular.lean @@ -0,0 +1,131 @@ +import OAI.Analysis.Unitarizability.SparseSplitting +import Mathlib.Algebra.Order.Floor.Ring +import Mathlib.Data.Fintype.Card + +namespace OAI + +/-! Regular convolution operators, product lists with multiplicity, +and sparse splitting from a contracting average. -/ +noncomputable section +namespace Dixmier +universe u +open Finset +attribute [local instance] Classical.propDecidable + +variable {G : Type*} + +def reindexL2 (e : G ≃ G) (ξ : ScalarL2 G) : ScalarL2 G := + ⟨fun x => ξ (e x), memℓp_gen (((lp.memℓp ξ).summable (by norm_num)).comp_injective e.injective)⟩ + +@[simp] theorem reindexL2_apply (e : G ≃ G) (ξ : ScalarL2 G) (x : G) : + reindexL2 e ξ x = ξ (e x) := rfl + +theorem l2_norm_sq (ξ : ScalarL2 G) : ‖ξ‖ ^ 2 = ∑' x, ‖ξ x‖ ^ 2 := by + simpa using lp.norm_rpow_eq_tsum (p := 2) (by norm_num) ξ + +theorem reindexL2_norm (e : G ≃ G) (ξ : ScalarL2 G) : ‖reindexL2 e ξ‖ = ‖ξ‖ := by + have hs : ‖reindexL2 e ξ‖ ^ 2 = ‖ξ‖ ^ 2 := by + rw [l2_norm_sq, l2_norm_sq] + exact e.tsum_eq (fun x => ‖ξ x‖ ^ 2) + nlinarith [norm_nonneg (reindexL2 e ξ), norm_nonneg ξ] + +def reindexIsometry (e : G ≃ G) : ScalarL2 G →ₗᵢ[ℂ] ScalarL2 G where + toFun := reindexL2 e + map_add' ξ η := by ext x; rfl + map_smul' z ξ := by ext x; rfl + norm_map' := reindexL2_norm e + +variable [Group G] + +/-- The right regular representation R_t ξ(x)=ξ(xt). -/ +def rightRegular : G →* (ScalarL2 G →L[ℂ] ScalarL2 G) where + toFun t := (reindexIsometry (Equiv.mulRight t)).toContinuousLinearMap + map_one' := by ext ξ x; simp [reindexIsometry, reindexL2] + map_mul' s t := by ext ξ x; simp [reindexIsometry, reindexL2, mul_assoc] + +@[simp] theorem rightRegular_apply (t : G) (ξ : ScalarL2 G) (x : G) : + rightRegular t ξ x = ξ (x * t) := rfl + +theorem rightRegular_norm_map (t : G) (ξ : ScalarL2 G) : ‖rightRegular t ξ‖ = ‖ξ‖ := + reindexL2_norm (Equiv.mulRight t) ξ + +/-- Left regular operators U_g commute with the right regular operators. -/ +def leftRegular : G →* (ScalarL2 G →L[ℂ] ScalarL2 G) where + toFun g := (reindexIsometry (Equiv.mulLeft g⁻¹)).toContinuousLinearMap + map_one' := by ext ξ x; simp [reindexIsometry, reindexL2] + map_mul' g h := by ext ξ x; simp [reindexIsometry, reindexL2] + +@[simp] theorem leftRegular_apply (g : G) (ξ : ScalarL2 G) (x : G) : + leftRegular g ξ x = ξ (g⁻¹ * x) := rfl + +theorem left_right_commute (g t : G) : Commute (leftRegular g) (rightRegular t) := by + change leftRegular g * rightRegular t = rightRegular t * leftRegular g + ext ξ x + simp [mul_assoc] + +def Word (I : Type u) : ℕ → Type u + | 0 => PUnit + | n + 1 => I × Word I n + +instance wordFintype {I : Type*} [Fintype I] : (n : ℕ) → Fintype (Word I n) + | 0 => inferInstanceAs (Fintype PUnit) + | n + 1 => by + letI : Fintype (Word I n) := wordFintype n + exact inferInstanceAs (Fintype (I × Word I n)) + +def wordProduct {I : Type*} (s : I → G) : (n : ℕ) → Word I n → G + | 0, _ => 1 + | n + 1, w => s w.1 * wordProduct s n w.2 + +theorem word_card {I : Type*} [Fintype I] (n : ℕ) : + Fintype.card (Word I n) = (Fintype.card I) ^ n := by + induction n with + | zero => + change Fintype.card PUnit = 1 + exact Fintype.card_unique + | succ n ih => + change Fintype.card (I × Word I n) = _ + rw [Fintype.card_prod, ih, pow_succ'] + +/-- Product lists are indexed by words, not by their possibly colliding values. -/ +theorem sum_wordProduct {I R : Type*} [Fintype I] [Semiring R] + (s : I → G) (φ : G →* R) (n : ℕ) : + (∑ w : Word I n, φ (wordProduct s n w)) = (∑ i, φ (s i)) ^ n := by + induction n with + | zero => + change (∑ w : PUnit, φ (1 : G)) = _ + simp + | succ n ih => + change (∑ w : I × Word I n, φ (s w.1 * wordProduct s n w.2)) = _ + simp only [Fintype.sum_prod_type, map_mul, ← Finset.mul_sum, ← Finset.sum_mul, ih, + pow_succ'] + +/-- Sparse splitting for words from a norm bound on the finite average. -/ +theorem sparse_mask_for_words {I : Type*} [Fintype I] (s : I → G) + {ρ : ℝ} (_hρ : 0 ≤ ρ) + (havg : ‖∑ i, rightRegular (s i)‖ ≤ (Fintype.card I : ℝ) * ρ) (ℓ : ℕ) (hℓ : 0 < ℓ) : + ∃ a : G → Word I ℓ → Bool, + (∀ x, (rowOnes a x).card ≤ ⌈(Fintype.card I : ℝ) ^ ℓ * ρ ^ ℓ⌉₊) ∧ + ∀ y, (columnZeros a (wordProduct s ℓ) y).card ≤ + ⌈(Fintype.card I : ℝ) ^ ℓ * ρ ^ ℓ⌉₊ := by + let A : ScalarL2 G →L[ℂ] ScalarL2 G := ∑ w : Word I ℓ, rightRegular (wordProduct s ℓ w) + have hA : ∀ (ξ : ScalarL2 G) (x : G), A ξ x = ∑ w, ξ (x * wordProduct s ℓ w) := by + intro ξ x + simp only [A, _root_.sum_apply] + rw [lp.coeFn_sum] + simp only [Finset.sum_apply, rightRegular_apply] + apply sparse_mask_of_convolution_bound (wordProduct s ℓ) A hA + calc + ‖A‖ = ‖(∑ i, rightRegular (s i)) ^ ℓ‖ := by + dsimp only [A] + rw [sum_wordProduct] + _ ≤ ‖∑ i, rightRegular (s i)‖ ^ ℓ := norm_pow_le' _ hℓ + _ ≤ ((Fintype.card I : ℝ) * ρ) ^ ℓ := pow_le_pow_left₀ (norm_nonneg _) havg ℓ + _ = (Fintype.card I : ℝ) ^ ℓ * ρ ^ ℓ := mul_pow _ _ _ + _ ≤ ⌈(Fintype.card I : ℝ) ^ ℓ * ρ ^ ℓ⌉₊ := Nat.le_ceil _ + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/ScaledObstruction.lean b/lean/OAI/Analysis/Unitarizability/ScaledObstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..374124f5d1c1a0956fd2288188f0d584f24b4a96 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/ScaledObstruction.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.Unitarizability.SumObstruction + +namespace OAI + +noncomputable section +namespace Dixmier +namespace KernelObstruction +variable {G K : Type*} [Group G] [Fintype K] + +lemma coefficients_real_smul (t : ℝ) (B : Fibre K →L[ℂ] Fibre K) : + coefficients (t • B) = t • coefficients B := by + ext ab + rfl + +lemma energy_real_smul (t : ℝ) (A : Op G K) : energy (t • A) = t ^ 2 * energy A := by + have hb (x y : G) : block (t • A) x y = t • block A x y := by + simp only [block, ContinuousLinearMap.smul_comp, ContinuousLinearMap.comp_smul] + simp only [energy, hb, coefficients_real_smul, norm_smul, Real.norm_eq_abs, + mul_pow, sq_abs] + exact tsum_mul_left + +end KernelObstruction +namespace DirectSumObstruction +open Filter +variable {G : Type*} [Group G] + +theorem scaled_direct_sum_obstruction (k : ℕ → ℕ) (hk : ∀ j, 0 < k j) + (A T : ∀ j, Stage G k j →L[ℂ] Stage G k j) + (hA : ∀ j, A j ∈ KernelObstruction.Commutant) + {κ : ℝ} (hκ : 0 ≤ κ) + (hr : ∀ j, ‖KernelObstruction.row (T j) 1‖ ≤ κ) + (hc : ∀ j, ‖KernelObstruction.col (A j - T j) 1‖ ≤ κ) + (hb : ∀ j g, ‖coboundary KernelObstruction.translation (T j) g‖ ≤ κ) + (he : Tendsto (fun j => KernelObstruction.energy (A j) / k j) atTop atTop) + {t : ℝ} (ht : 0 < t) : + ∃ π : G →* (Carrier G k →L[ℂ] Carrier G k), + (∀ g, ‖π g‖ ≤ 1 + t * κ) ∧ ¬ SimilarToUnitary π := by + apply direct_sum_obstruction k hk (fun j => t • A j) (fun j => t • T j) + (fun j g => by + change (t • A j).comp (KernelObstruction.translation g) = + (KernelObstruction.translation g).comp (t • A j) + rw [ContinuousLinearMap.smul_comp, ContinuousLinearMap.comp_smul] + exact congrArg (fun operator => t • operator) (hA j g).eq) + (mul_nonneg ht.le hκ) + · intro j + simpa only [KernelObstruction.row, ContinuousLinearMap.comp_smul, + norm_smul, Real.norm_eq_abs, abs_of_pos ht] using mul_le_mul_of_nonneg_left (hr j) ht.le + · intro j + rw [← smul_sub t (A j) (T j)] + simpa only [KernelObstruction.col, ContinuousLinearMap.smul_comp, + norm_smul, Real.norm_eq_abs, abs_of_pos ht] using mul_le_mul_of_nonneg_left (hc j) ht.le + · intro j g + have hscale : coboundary KernelObstruction.translation (t • T j) g = + t • coboundary KernelObstruction.translation (T j) g := by + simp only [coboundary, conjugate, ContinuousLinearMap.mul_def, + ContinuousLinearMap.comp_smul, ContinuousLinearMap.smul_comp, smul_sub] + rw [hscale, norm_smul, Real.norm_eq_abs, abs_of_pos ht] + exact mul_le_mul_of_nonneg_left (hb j g) ht.le + · simpa only [KernelObstruction.energy_real_smul, mul_div_assoc] using + he.const_mul_atTop (sq_pos_of_pos ht) + +end DirectSumObstruction + +end Dixmier +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/SignMatrix.lean b/lean/OAI/Analysis/Unitarizability/SignMatrix.lean new file mode 100644 index 0000000000000000000000000000000000000000..4114816f04d34644cd9baef9cc03dd21c23b3d92 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/SignMatrix.lean @@ -0,0 +1,125 @@ +import OAI.Analysis.Unitarizability.FiniteSigns +import OAI.Analysis.Unitarizability.NetOperator +import OAI.Analysis.Unitarizability.FiniteSynthesis + +namespace OAI + +/-! Normalized sign matrices and their finite-dimensional bilinear +tests. The coordinate selections are injective and retain label identities. -/ +noncomputable section +namespace Dixmier +namespace SignMatrix +open Finset +variable {I J K : Type*} [Fintype I] [Fintype J] [Fintype K] +local instance : DecidableEq I := Classical.decEq I +local instance : DecidableEq J := Classical.decEq J +local instance : DecidableEq K := Classical.decEq K + +theorem sum_on_embedding {R : Type*} [AddCommMonoid R] (e : J ↪ I) (f : I → R) + (hf : ∀ i, (¬ ∃ j, e j = i) → f i = 0) : ∑ i, f i = ∑ j, f (e j) := by + calc + _ = ∑ i ∈ univ.map e, f i := by + symm + apply Finset.sum_subset (Finset.subset_univ _) + intro i hi hn + apply hf i + simpa using hn + _ = _ := by rw [Finset.sum_map] + +def extend (e : J ↪ I) (z : J → ℝ) : I → ℝ := Function.extend e z (fun _ => 0) + +omit [Fintype I] [Fintype J] in +@[simp] theorem extend_apply (e : J ↪ I) (z : J → ℝ) (j : J) : extend e z (e j) = z j := + e.injective.extend_apply z _ j + +omit [Fintype I] [Fintype J] in +theorem extend_off (e : J ↪ I) (z : J → ℝ) (i : I) (hi : ¬ ∃ j, e j = i) : extend e z i = 0 := + Function.extend_apply' z _ i hi + +theorem sum_extend_sq (e : J ↪ I) (z : J → ℝ) : ∑ i, (extend e z i)^2 = ∑ j, (z j)^2 := by + rw [sum_on_embedding e _ (fun i hi => by rw [extend_off e z i hi]; simp)] + simp only [extend_apply] + +def vector (σ : K × I → Bool) (i : I) : EuclideanSpace ℝ K := + WithLp.toLp 2 (fun a => FiniteSigns.sign (σ (a,i)) / Real.sqrt (Fintype.card K)) + +omit [Fintype I] in +@[simp] theorem vector_apply (σ : K × I → Bool) (i : I) (a : K) : + vector σ i a = FiniteSigns.sign (σ (a,i)) / Real.sqrt (Fintype.card K) := rfl + +theorem sign_sq (b : Bool) : (FiniteSigns.sign b)^2 = 1 := by cases b <;> norm_num [FiniteSigns.sign] + +omit [Fintype I] in +theorem vector_norm [Nonempty K] (σ : K × I → Bool) (i : I) : ‖vector σ i‖ = 1 := by + have hk : (0 : ℝ) < Fintype.card K := Nat.cast_pos.mpr Fintype.card_pos + have h : ‖vector σ i‖^2 = 1 := by + rw [EuclideanSpace.norm_sq_eq] + simp only [vector_apply, Real.norm_eq_abs, sq_abs, div_pow, sign_sq, + Real.sq_sqrt hk.le, Finset.sum_const, card_univ, nsmul_eq_mul] + field_simp + nlinarith [norm_nonneg (vector σ i)] + +def synthesis (σ : K × I → Bool) (e : J ↪ I) : EuclideanSpace ℝ J →L[ℝ] EuclideanSpace ℝ K := + ∑ j : J, InnerProductSpace.rankOne ℝ (vector σ (e j)) (EuclideanSpace.basisFun J ℝ j) + +omit [Fintype I] in +@[simp] theorem synthesis_apply (σ : K × I → Bool) (e : J ↪ I) (z : EuclideanSpace ℝ J) : + synthesis σ e z = ∑ j, z j • vector σ (e j) := by + simp only [synthesis, _root_.sum_apply, InnerProductSpace.rankOne_apply, EuclideanSpace.basisFun_inner] + +def testCoefficients (e : J ↪ I) (w : EuclideanSpace ℝ K) (z : EuclideanSpace ℝ J) : K × I → ℝ := + fun ai => w ai.1 * extend e z ai.2 / Real.sqrt (Fintype.card K) + +theorem testCoefficients_sq [Nonempty K] (e : J ↪ I) (w : EuclideanSpace ℝ K) (z : EuclideanSpace ℝ J) + (hw : ‖w‖ = 1) (hz : ‖z‖ = 1) : + ∑ ai, (testCoefficients e w z ai)^2 = 1 / (Fintype.card K : ℝ) := by + have hk : (0 : ℝ) < Fintype.card K := Nat.cast_pos.mpr Fintype.card_pos + have hw' : ∑ a, (w a)^2 = 1 := by + have h : ‖w‖^2 = 1 := by rw [hw]; norm_num + rw [EuclideanSpace.norm_sq_eq] at h + simpa only [Real.norm_eq_abs, sq_abs] using h + have hz' : ∑ j, (z j)^2 = 1 := by + have h : ‖z‖^2 = 1 := by rw [hz]; norm_num + rw [EuclideanSpace.norm_sq_eq] at h + simpa only [Real.norm_eq_abs, sq_abs] using h + simp only [testCoefficients, Fintype.sum_prod_type, mul_pow, + div_eq_mul_inv, ← Finset.sum_mul, ← Finset.mul_sum, sum_extend_sq, hw', hz', mul_one, one_mul] + rw [inv_pow, Real.sq_sqrt hk.le] + +theorem bilinear_test (σ : K × I → Bool) (e : J ↪ I) (w : EuclideanSpace ℝ K) (z : EuclideanSpace ℝ J) : + inner ℝ (synthesis σ e z) w = FiniteSigns.value (testCoefficients e w z) σ := by + rw [synthesis_apply] + simp only [sum_inner, inner_smul_left, RCLike.conj_to_real, EuclideanSpace.inner_eq_star_dotProduct, + dotProduct, Pi.star_apply, star_trivial, vector_apply, FiniteSigns.value, testCoefficients, + Fintype.sum_prod_type] + simp only [Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro a ha + rw [sum_on_embedding e _ (fun i hi => by rw [extend_off e z i hi]; simp)] + simp only [extend_apply] + apply Finset.sum_congr rfl + intro j hj + ring + +/-- The tail bound for each fixed pair of real unit test vectors and +an injective coordinate selection, on the full sign-matrix sample space. -/ +theorem bilinear_tail [Nonempty K] (e : J ↪ I) (w : EuclideanSpace ℝ K) (z : EuclideanSpace ℝ J) + (hw : ‖w‖ = 1) (hz : ‖z‖ = 1) : + (((univ.filter fun σ : K × I → Bool => (5 : ℝ) < |inner ℝ (synthesis σ e z) w|).card : ℕ) : ℝ) / + (2 : ℝ)^Fintype.card (K × I) ≤ 2 * Real.exp (-(Fintype.card K : ℝ)*25/2) := by + simp_rw [bilinear_test] + have h := FiniteSigns.two_sided_tail (k := (Fintype.card K : ℝ)) (u := 5) (testCoefficients e w z) + (Nat.cast_pos.mpr (Fintype.card_pos (α := K))) (by norm_num : (0 : ℝ) < 5) + (testCoefficients_sq e w z hw hz) + convert h using 1 <;> try norm_num + congr 1 + ext σ + simp only [Finset.mem_filter, Finset.mem_univ, true_and] + +end SignMatrix +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/SparseMask.lean b/lean/OAI/Analysis/Unitarizability/SparseMask.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f8b8ab549f094c4feadb34c0c78d8abf576e1ed --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/SparseMask.lean @@ -0,0 +1,87 @@ +import Mathlib.Data.Finset.Card +import Mathlib.Data.Fintype.Card +import Mathlib.Analysis.Complex.Basic + +namespace OAI + +/-! Finite support estimates for mask differences. +The label type is retained even when the products s_i collide. -/ +namespace Dixmier + +open Finset +variable {G I : Type*} [Group G] [Fintype I] [DecidableEq I] + +noncomputable def rowOnes (a : G → I → Bool) (x : G) : Finset I := + univ.filter fun i => a x i = true + +noncomputable def columnZeros (a : G → I → Bool) (s : I → G) (y : G) : Finset I := + univ.filter fun i => a (y * (s i)⁻¹) i = false + +noncomputable def rowDifference (a : G → I → Bool) (g x : G) : Finset I := + univ.filter fun i => a x i ≠ a (g⁻¹ * x) i + +noncomputable def columnDifference (a : G → I → Bool) (s : I → G) + (g y : G) : Finset I := + univ.filter fun i => a (y * (s i)⁻¹) i ≠ a (g⁻¹ * (y * (s i)⁻¹)) i + +private theorem bool_ne_true_union (b c : Bool) (h : b ≠ c) : + b = true ∨ c = true := by cases b <;> cases c <;> simp_all + +private theorem bool_ne_false_union (b c : Bool) (h : b ≠ c) : + b = false ∨ c = false := by cases b <;> cases c <;> simp_all + +/-- A row difference is supported on the union of the two one-sets. -/ +theorem rowDifference_subset (a : G → I → Bool) (g x : G) : + rowDifference a g x ⊆ rowOnes a x ∪ rowOnes a (g⁻¹ * x) := by + intro i hi + simp only [rowDifference, rowOnes, mem_filter, mem_univ, true_and, mem_union] at * + exact bool_ne_true_union _ _ hi + +/-- Column support uses zero-sets at y and g⁻¹y. -/ +theorem columnDifference_subset (a : G → I → Bool) (s : I → G) (g y : G) : + columnDifference a s g y ⊆ columnZeros a s y ∪ columnZeros a s (g⁻¹ * y) := by + intro i hi + simp only [columnDifference, columnZeros, mem_filter, mem_univ, true_and, + mem_union, mul_assoc] at * + exact bool_ne_false_union _ _ hi + +/-- The row support bound p=min(2r,n), without distinctness of group products. -/ +theorem rowDifference_card_le (a : G → I → Bool) (r : ℕ) + (hr : ∀ x, (rowOnes a x).card ≤ r) (g x : G) : + (rowDifference a g x).card ≤ min (2 * r) (Fintype.card I) := by + apply le_min + · calc + _ ≤ (rowOnes a x ∪ rowOnes a (g⁻¹ * x)).card := card_le_card (rowDifference_subset a g x) + _ ≤ (rowOnes a x).card + (rowOnes a (g⁻¹ * x)).card := card_union_le _ _ + _ ≤ r + r := Nat.add_le_add (hr x) (hr (g⁻¹ * x)) + _ = 2 * r := (two_mul r).symm + · exact card_le_univ _ + +/-- The column support bound p=min(2r,n). -/ +theorem columnDifference_card_le (a : G → I → Bool) (s : I → G) (r : ℕ) + (hc : ∀ y, (columnZeros a s y).card ≤ r) (g y : G) : + (columnDifference a s g y).card ≤ min (2 * r) (Fintype.card I) := by + apply le_min + · calc + _ ≤ (columnZeros a s y ∪ columnZeros a s (g⁻¹ * y)).card := + card_le_card (columnDifference_subset a s g y) + _ ≤ (columnZeros a s y).card + (columnZeros a s (g⁻¹ * y)).card := card_union_le _ _ + _ ≤ r + r := Nat.add_le_add (hc y) (hc (g⁻¹ * y)) + _ = 2 * r := (two_mul r).symm + · exact card_le_univ _ + +def boolComplex (b : Bool) : ℂ := if b then 1 else 0 + +/-- The scalar difference mask has absolute value at most one. -/ +theorem difference_mask_norm (b c : Bool) : ‖boolComplex b - boolComplex c‖ ≤ 1 := by + cases b <;> cases c <;> simp [boolComplex] + +/-- Nonzero complex mask coefficients correspond exactly to unequal bits. -/ +theorem difference_mask_ne_zero (b c : Bool) : + boolComplex b - boolComplex c ≠ 0 ↔ b ≠ c := by + cases b <;> cases c <;> simp [boolComplex] + + +end Dixmier + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/SparseSplitting.lean b/lean/OAI/Analysis/Unitarizability/SparseSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..9266e51ed78101f6e94a52265b554ff569bb50dc --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/SparseSplitting.lean @@ -0,0 +1,128 @@ +import OAI.Analysis.Unitarizability.EndpointAssignment +import Mathlib.Analysis.InnerProductSpace.l2Space +import Mathlib.Analysis.Real.Sqrt +import Mathlib.Tactic.NormNum +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.Linarith + +namespace OAI + +/-! Spectral norm bounds imply sparse endpoint assignments. +The input is a bounded convolution operator with its coefficient formula. -/ +noncomputable section +namespace Dixmier +open Finset +open scoped InnerProductSpace +attribute [local instance] Classical.propDecidable +variable {G I : Type*} [Fintype I] + +abbrev ScalarL2 (G : Type*) := lp (fun _ : G => ℂ) 2 + +def indicatorL2 (U : Finset G) : ScalarL2 G := ∑ x ∈ U, lp.single 2 x 1 + +@[simp] theorem indicatorL2_apply (U : Finset G) (x : G) : + indicatorL2 U x = if x ∈ U then 1 else 0 := by + change (∑ i ∈ U, lp.single 2 i (1 : ℂ)) x = _ + rw [lp.coeFn_sum] + simp [Finset.sum_apply, lp.coeFn_single, Pi.single_apply] + +theorem indicatorL2_norm_sq (U : Finset G) : ‖indicatorL2 U‖ ^ 2 = U.card := by + have h := lp.norm_sum_single (p := 2) (by norm_num) (fun _ : G => (1 : ℂ)) U + simpa [indicatorL2] using h + +theorem indicatorL2_norm (U : Finset G) : ‖indicatorL2 U‖ = Real.sqrt U.card := by + rw [← indicatorL2_norm_sq, Real.sqrt_sq (norm_nonneg _)] + +variable [Group G] + +def rectangleEdges (s : I → G) (U V : Finset G) : Finset (G × I) := + (U ×ˢ univ).filter fun e => e.1 * s e.2 ∈ V + +/-- Pairing convolution with the two indicator vectors counts labelled edges. -/ +theorem indicator_convolution_inner (s : I → G) + (A : ScalarL2 G →L[ℂ] ScalarL2 G) + (hA : ∀ (ξ : ScalarL2 G) (x : G), A ξ x = ∑ i, ξ (x * s i)) + (U V : Finset G) : + ⟪indicatorL2 U, A (indicatorL2 V)⟫_ℂ = (rectangleEdges s U V).card := by + calc + _ = ∑ x ∈ U, ∑ i, if x * s i ∈ V then (1 : ℂ) else 0 := by + change ⟪∑ x ∈ U, lp.single 2 x (1 : ℂ), A (indicatorL2 V)⟫_ℂ = _ + simp only [sum_inner, lp.inner_single_left, hA, indicatorL2_apply] + simp + _ = (rectangleEdges s U V).card := by + rw [Finset.card_eq_sum_ones] + simp only [Nat.cast_sum, Nat.cast_one] + rw [rectangleEdges, Finset.sum_filter, Finset.sum_product] + +/-- The rectangular edge-count bound with all multiplicities retained. -/ +theorem rectangleEdges_card_le (s : I → G) + (A : ScalarL2 G →L[ℂ] ScalarL2 G) + (hA : ∀ (ξ : ScalarL2 G) (x : G), A ξ x = ∑ i, ξ (x * s i)) + {q : ℝ} (hq : ‖A‖ ≤ q) (U V : Finset G) : + ((rectangleEdges s U V).card : ℝ) ≤ q * Real.sqrt ((U.card : ℝ) * V.card) := by + have hq0 : 0 ≤ q := (norm_nonneg A).trans hq + calc + _ = ‖⟪indicatorL2 U, A (indicatorL2 V)⟫_ℂ‖ := by + rw [indicator_convolution_inner s A hA] + simp + _ ≤ ‖indicatorL2 U‖ * ‖A (indicatorL2 V)‖ := norm_inner_le_norm _ _ + _ ≤ ‖indicatorL2 U‖ * (q * ‖indicatorL2 V‖) := + mul_le_mul_of_nonneg_left ((A.le_opNorm _).trans + (mul_le_mul_of_nonneg_right hq (norm_nonneg _))) (norm_nonneg _) + _ = q * Real.sqrt ((U.card : ℝ) * V.card) := by + rw [indicatorL2_norm, indicatorL2_norm, Real.sqrt_mul (Nat.cast_nonneg _)] + ring + +/-- Every finite edge family lies in the rectangle of its endpoints. -/ +theorem edges_subset_endpoint_rectangle (s : I → G) (F : Finset (G × I)) : + F ⊆ rectangleEdges s (F.image Prod.fst) (F.image fun e => e.1 * s e.2) := by + intro e he + simp only [rectangleEdges, mem_filter, mem_product, mem_univ, and_true] + exact ⟨mem_image.mpr ⟨e, he, rfl⟩, mem_image.mpr ⟨e, he, rfl⟩⟩ + +/-- Arithmetic used in the Hall argument, including its factor one half. -/ +theorem sqrt_mul_le_half_add {u v : ℝ} (hu : 0 ≤ u) (hv : 0 ≤ v) : + Real.sqrt (u * v) ≤ (u + v) / 2 := by + rw [Real.sqrt_le_iff] + constructor + · positivity + · nlinarith [sq_nonneg (u - v)] + +/-- The finite Hall density follows from the rectangular spectral estimate. -/ +theorem endpoint_density_of_rectangle_bound (s : I → G) {q : ℝ} {r : ℕ} + (hq : 0 ≤ q) (hqr : q ≤ r) + (hrect : ∀ U V : Finset G, ((rectangleEdges s U V).card : ℝ) ≤ + q * Real.sqrt ((U.card : ℝ) * V.card)) + (F : Finset (G × I)) : + F.card ≤ r * ((F.image Prod.fst).card + (F.image fun e => e.1 * s e.2).card) := by + let U := F.image Prod.fst + let V := F.image fun e => e.1 * s e.2 + have he : (F.card : ℝ) ≤ (rectangleEdges s U V).card := by + exact_mod_cast card_le_card (edges_subset_endpoint_rectangle s F) + have hsum : (0 : ℝ) ≤ (U.card : ℝ) + V.card := by positivity + have hhalf : ((U.card : ℝ) + V.card) / 2 ≤ (U.card : ℝ) + V.card := by linarith + have h : (F.card : ℝ) ≤ (r : ℝ) * ((U.card : ℝ) + V.card) := calc + _ ≤ q * Real.sqrt ((U.card : ℝ) * V.card) := he.trans (hrect U V) + _ ≤ q * (((U.card : ℝ) + V.card) / 2) := + mul_le_mul_of_nonneg_left (sqrt_mul_le_half_add (by positivity) (by positivity)) hq + _ ≤ q * ((U.card : ℝ) + V.card) := mul_le_mul_of_nonneg_left hhalf hq + _ ≤ (r : ℝ) * ((U.card : ℝ) + V.card) := mul_le_mul_of_nonneg_right hqr hsum + exact_mod_cast h + +/-- Sparse assignment from a bounded convolution operator, at any integer +capacity above its norm. -/ +theorem sparse_mask_of_convolution_bound (s : I → G) + (A : ScalarL2 G →L[ℂ] ScalarL2 G) + (hA : ∀ (ξ : ScalarL2 G) (x : G), A ξ x = ∑ i, ξ (x * s i)) + {r : ℕ} (hr : ‖A‖ ≤ r) : + ∃ a : G → I → Bool, (∀ x, (rowOnes a x).card ≤ r) ∧ + ∀ y, (columnZeros a s y).card ≤ r := by + apply exists_sparse_mask + exact endpoint_density_of_rectangle_bound s (norm_nonneg A) hr + (rectangleEdges_card_le s A hA le_rfl) + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/SphereNet.lean b/lean/OAI/Analysis/Unitarizability/SphereNet.lean new file mode 100644 index 0000000000000000000000000000000000000000..66fe6c93b238d9f4e7791f363ad5efe0e8099fb7 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/SphereNet.lean @@ -0,0 +1,103 @@ +import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar +import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Order.Lattice.Nat +import Mathlib.Tactic.Linarith + +namespace OAI + +/-! Quarter-nets and their cardinality bounds. Volume comparison with +radii 1/8 and 9/8 gives the constant 9^m. -/ +noncomputable section +namespace Dixmier +namespace SphereNet +open Set Metric MeasureTheory Module +open scoped ENNReal NNReal +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +open scoped Function in + theorem quarter_separated_card (s : Finset E) (hs : ∀ c ∈ s, ‖c‖ ≤ 1) + (h : ∀ c ∈ s, ∀ d ∈ s, c ≠ d → (1/4 : ℝ) ≤ ‖c-d‖) : s.card ≤ 9 ^ finrank ℝ E := by + borelize E + let μ : Measure E := Measure.addHaar + let δ : ℝ := 1/8 + let ρ : ℝ := 9/8 + have ρpos : 0 < ρ := by norm_num [ρ] + set A := ⋃ c ∈ s, ball (c : E) δ with hA + have D : Set.Pairwise (s : Set E) (Disjoint on fun c => ball (c : E) δ) := by + rintro c hc d hd hcd + apply ball_disjoint_ball + rw [dist_eq_norm] + convert h c hc d hd hcd using 1 + norm_num [δ] + have A_subset : A ⊆ ball (0 : E) ρ := by + refine iUnion₂_subset fun x hx => ?_ + apply ball_subset_ball' + calc + δ + dist x 0 ≤ δ + 1 := by rw [dist_zero_right]; exact add_le_add le_rfl (hs x hx) + _ = ρ := by norm_num [δ, ρ] + have I : (s.card : ℝ≥0∞) * ENNReal.ofReal (δ ^ finrank ℝ E) * μ (ball 0 1) ≤ + ENNReal.ofReal (ρ ^ finrank ℝ E) * μ (ball 0 1) := by + calc + _ = μ A := by + rw [hA, measure_biUnion_finset D (fun c _ => measurableSet_ball)] + have hd : 0 < δ := by norm_num [δ] + simp only [μ.addHaar_ball_of_pos _ hd, Finset.sum_const, nsmul_eq_mul, mul_assoc] + _ ≤ μ (ball (0 : E) ρ) := measure_mono A_subset + _ = _ := by simp only [μ.addHaar_ball_of_pos _ ρpos] + have J : (s.card : ℝ≥0∞) * ENNReal.ofReal (δ ^ finrank ℝ E) ≤ ENNReal.ofReal (ρ ^ finrank ℝ E) := + (ENNReal.mul_le_mul_iff_left (measure_ball_pos _ _ zero_lt_one).ne' measure_ball_lt_top.ne).1 I + have K : (s.card : ℝ) ≤ (9 : ℝ) ^ finrank ℝ E := by + have hh := ENNReal.toReal_le_of_le_ofReal (pow_nonneg ρpos.le _) J + simpa [ρ, δ, div_eq_mul_inv, mul_pow] using hh + exact_mod_cast K + +/-- A quarter-net with all centers on the unit sphere and +at most 9^dim centers. -/ +theorem exists_quarter_net : ∃ s : Finset E, + (∀ x ∈ s, ‖x‖ = 1) ∧ s.card ≤ 9 ^ finrank ℝ E ∧ + ∀ x : E, ‖x‖ = 1 → ∃ y ∈ s, ‖x-y‖ ≤ (1/4 : ℝ) := by + classical + let C : Set ℕ := {n | ∃ s : Finset E, s.card = n ∧ (∀ x ∈ s, ‖x‖ = 1) ∧ + ∀ x ∈ s, ∀ y ∈ s, x ≠ y → (1/4 : ℝ) ≤ ‖x-y‖} + have hnonempty : C.Nonempty := ⟨0, ∅, by simp⟩ + have hbounded : BddAbove C := by + refine ⟨9 ^ finrank ℝ E, ?_⟩ + rintro n ⟨s, rfl, hs, hsep⟩ + exact quarter_separated_card s (fun x hx => (hs x hx).le) hsep + obtain ⟨s, hcard, hs, hsep⟩ := Nat.sSup_mem hnonempty hbounded + refine ⟨s, hs, quarter_separated_card s (fun x hx => (hs x hx).le) hsep, ?_⟩ + intro x hx + by_contra hnot + push Not at hnot + have hxnot : x ∉ s := by + intro hmem + have hh := hnot x hmem + simp at hh + linarith + have hiunit : ∀ y ∈ insert x s, ‖y‖ = 1 := by + intro y hy + rcases Finset.mem_insert.mp hy with rfl | hy + · exact hx + · exact hs y hy + have hisep : ∀ y ∈ insert x s, ∀ z ∈ insert x s, y ≠ z → (1/4 : ℝ) ≤ ‖y-z‖ := by + intro y hy z hz hyz + by_cases hyx : y = x + · subst y + have hz' : z ∈ s := (Finset.mem_insert.mp hz).resolve_left (Ne.symm hyz) + exact (hnot z hz').le + · have hy' : y ∈ s := (Finset.mem_insert.mp hy).resolve_left hyx + by_cases hzx : z = x + · subst z + simpa only [norm_sub_rev] using (hnot y hy').le + · have hz' : z ∈ s := (Finset.mem_insert.mp hz).resolve_left hzx + exact hsep y hy' z hz' hyz + have hbig : (insert x s).card ≤ sSup C := le_csSup hbounded ⟨insert x s, rfl, hiunit, hisep⟩ + rw [Finset.card_insert_of_notMem hxnot, hcard] at hbig + omega + +end SphereNet +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/SumObstruction.lean b/lean/OAI/Analysis/Unitarizability/SumObstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a148650c82eb715360f188f950e010d990a58aa --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/SumObstruction.lean @@ -0,0 +1,101 @@ +import OAI.Analysis.Unitarizability.KernelObstruction +import OAI.Analysis.Unitarizability.HilbertSum +import OAI.Analysis.Unitarizability.Unitarizer +import Mathlib.Order.Filter.AtTopBot.Tendsto + +namespace OAI + +/-! The operator-theoretic direct-sum obstruction, constructed from stage operators +without any uniform bound on their norms. -/ +noncomputable section +namespace Dixmier +namespace DirectSumObstruction +open Filter +open scoped Topology +variable {G : Type*} [Group G] + +abbrev Stage (G : Type*) (k : ℕ → ℕ) (j : ℕ) : Type _ := KernelObstruction.Space G (Fin (k j)) +abbrev Total (G : Type*) (k : ℕ → ℕ) : Type _ := HilbertSum.Space (Stage G k) +abbrev Carrier (G : Type*) (k : ℕ → ℕ) := Triangular.Double (Total G k) + +theorem stage_unitary (k : ℕ → ℕ) (j : ℕ) (g : G) (x : Stage G k j) : + ‖KernelObstruction.translation g x‖ = ‖x‖ := + KernelObstruction.reindex_norm (Equiv.mulLeft g⁻¹) x + +/-- The direct-sum obstruction with its representation and bound. +The stage operators A_j and T_j need not be uniformly bounded. -/ +theorem direct_sum_obstruction (k : ℕ → ℕ) (hk : ∀ j, 0 < k j) + (A T : ∀ j, Stage G k j →L[ℂ] Stage G k j) + (hA : ∀ j, A j ∈ KernelObstruction.Commutant) + {κ : ℝ} (hκ : 0 ≤ κ) + (hr : ∀ j, ‖KernelObstruction.row (T j) 1‖ ≤ κ) + (hc : ∀ j, ‖KernelObstruction.col (A j-T j) 1‖ ≤ κ) + (hb : ∀ j g, ‖coboundary KernelObstruction.translation (T j) g‖ ≤ κ) + (he : Tendsto (fun j => KernelObstruction.energy (A j) / k j) atTop atTop) : + ∃ π : G →* (Carrier G k →L[ℂ] Carrier G k), + (∀ g, ‖π g‖ ≤ 1 + κ) ∧ ¬ SimilarToUnitary π := by + let U : ∀ j, G →* (Stage G k j →L[ℂ] Stage G k j) := fun _ => KernelObstruction.translation + have hU : ∀ j g x, ‖U j g x‖ = ‖x‖ := stage_unitary k + let D : ∀ j, G → (Stage G k j →L[ℂ] Stage G k j) := fun j => coboundary (U j) (T j) + have h1 : ∀ j, D j 1 = 0 := fun j => coboundary_one (U j) (T j) + have hD : ∀ j g h, D j (g*h) = D j g + conjugate (U j) g (D j h) := + fun j => coboundary_cocycle (U j) (T j) + let V := HilbertSum.representation U hU + let δ := HilbertSum.cocycle D hκ hb + have hδ1 : δ 1 = 0 := HilbertSum.cocycle_one D hκ hb h1 + have hδ : ∀ g h, δ (g*h) = δ g + conjugate V g (δ h) := + HilbertSum.cocycle_identity U hU D hκ hb hD + let π := Triangular.representation V δ hδ1 hδ + have hδb : ∀ g, ‖δ g‖ ≤ κ := fun g => HilbertSum.boundedSum_norm_le _ hκ _ + refine ⟨π, Triangular.representation_bound V δ hδ1 hδ + (HilbertSum.representation_norm_map U hU) hδb, ?_⟩ + intro hπ + rcases Triangular.implementer_of_similar V δ hδ1 hδ hπ with ⟨B, hB⟩ + have hbound (j : ℕ) : KernelObstruction.energy (A j) / k j ≤ 4 * (κ + ‖B‖)^2 := by + let Bj := HilbertSum.compression B j + have hBj (g : G) : D j g = coboundary (U j) Bj g := + HilbertSum.compression_implementer U hU D hκ hb B hB j g + have hC : T j - Bj ∈ KernelObstruction.Commutant := by + intro g + exact ((equal_coboundaries_iff_commute_sub (U j) (T j) Bj g).mp (hBj g)).symm + have henergy := KernelObstruction.kernel_obstruction (hA j) hκ (hr j) (hc j) hC + simp only [Fintype.card_fin, sub_sub_cancel] at henergy + have hnorm : ‖Bj‖ ≤ ‖B‖ := HilbertSum.compression_norm_le B j + have hs : (κ + ‖Bj‖)^2 ≤ (κ + ‖B‖)^2 := + pow_le_pow_left₀ (add_nonneg hκ (norm_nonneg _)) (add_le_add (le_refl _) hnorm) 2 + have henergy' : KernelObstruction.energy (A j) ≤ 4 * (k j : ℝ) * (κ + ‖B‖)^2 := + henergy.trans (mul_le_mul_of_nonneg_left hs (by positivity)) + apply (div_le_iff₀ (Nat.cast_pos.mpr (hk j))).mpr + nlinarith [henergy'] + obtain ⟨j, hj⟩ := (he.eventually (eventually_gt_atTop (4 * (κ + ‖B‖)^2))).exists + exact (not_lt_of_ge (hbound j)) hj + +omit [Group G] in +/-- The concrete carrier is separable when the group is countable. -/ +theorem carrier_separable [Countable G] (k : ℕ → ℕ) : + TopologicalSpace.SeparableSpace (Carrier G k) := by + have (j : ℕ) : TopologicalSpace.SeparableSpace (Stage G k j) := HilbertSum.separableSpace + have : TopologicalSpace.SeparableSpace (Total G k) := HilbertSum.separableSpace + infer_instance + +/-- The direct-sum obstruction with all Hilbert-space structure and separability +explicit in the conclusion. -/ +theorem separable_direct_sum_obstruction [Countable G] (k : ℕ → ℕ) (hk : ∀ j, 0 < k j) + (A T : ∀ j, Stage G k j →L[ℂ] Stage G k j) + (hA : ∀ j, A j ∈ KernelObstruction.Commutant) + {κ : ℝ} (hκ : 0 ≤ κ) + (hr : ∀ j, ‖KernelObstruction.row (T j) 1‖ ≤ κ) + (hc : ∀ j, ‖KernelObstruction.col (A j-T j) 1‖ ≤ κ) + (hb : ∀ j g, ‖coboundary KernelObstruction.translation (T j) g‖ ≤ κ) + (he : Tendsto (fun j => KernelObstruction.energy (A j) / k j) atTop atTop) : + TopologicalSpace.SeparableSpace (Carrier G k) ∧ + ∃ π : G →* (Carrier G k →L[ℂ] Carrier G k), + (∀ g, ‖π g‖ ≤ 1 + κ) ∧ ¬ SimilarToUnitary π := + ⟨carrier_separable k, direct_sum_obstruction k hk A T hA hκ hr hc hb he⟩ + +end DirectSumObstruction +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Triangular.lean b/lean/OAI/Analysis/Unitarizability/Triangular.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc9791e145bc85afa20128fbd924c1b0e370ed17 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Triangular.lean @@ -0,0 +1,106 @@ +import OAI.Analysis.Unitarizability.Model +import OAI.Analysis.Unitarizability.Cocycle +import Mathlib.Analysis.InnerProductSpace.ProdL2 +import Mathlib.Analysis.Normed.Lp.lpHolder + +namespace OAI + +/-! Bounded Hilbert sums and triangular representations. -/ +noncomputable section +namespace Dixmier +namespace Triangular +variable {G H : Type*} [Group G] +variable [NormedAddCommGroup H] [InnerProductSpace ℂ H] +abbrev Double (H : Type*) := WithLp 2 (H × H) + +def inl : H →L[ℂ] Double H := + (WithLp.prodContinuousLinearEquiv 2 ℂ H H).symm.toContinuousLinearMap.comp + (ContinuousLinearMap.inl ℂ H H) + +def inr : H →L[ℂ] Double H := + (WithLp.prodContinuousLinearEquiv 2 ℂ H H).symm.toContinuousLinearMap.comp + (ContinuousLinearMap.inr ℂ H H) + +@[simp] theorem inl_apply (x : H) : inl x = WithLp.toLp 2 (x,0) := rfl +@[simp] theorem inr_apply (x : H) : inr x = WithLp.toLp 2 (0,x) := rfl +@[simp] theorem inl_norm (x : H) : ‖inl x‖ = ‖x‖ := WithLp.norm_toLp_fst 2 H H x +@[simp] theorem inr_norm (x : H) : ‖inr x‖ = ‖x‖ := WithLp.norm_toLp_snd 2 H H x + +def diagonal (U : H →L[ℂ] H) : Double H →L[ℂ] Double H := + inl.comp (U.comp (WithLp.fstL 2 ℂ H H)) + + inr.comp (U.comp (WithLp.sndL 2 ℂ H H)) + +@[simp] theorem diagonal_fst (U : H →L[ℂ] H) (x : Double H) : + (diagonal U x).fst = U x.fst := by simp [diagonal, inl, inr] +@[simp] theorem diagonal_snd (U : H →L[ℂ] H) (x : Double H) : + (diagonal U x).snd = U x.snd := by simp [diagonal, inl, inr] + +def operator (U D : H →L[ℂ] H) : Double H →L[ℂ] Double H := + diagonal U + inl.comp (D.comp (U.comp (WithLp.sndL 2 ℂ H H))) + +@[simp] theorem operator_fst (U D : H →L[ℂ] H) (x : Double H) : + (operator U D x).fst = U x.fst + D (U x.snd) := by simp [operator, inl] +@[simp] theorem operator_snd (U D : H →L[ℂ] H) (x : Double H) : + (operator U D x).snd = U x.snd := by simp [operator, inl] + +theorem diagonal_norm_map (U : H →L[ℂ] H) (hU : ∀ x, ‖U x‖ = ‖x‖) (x : Double H) : + ‖diagonal U x‖ = ‖x‖ := by + have h : ‖diagonal U x‖^2 = ‖x‖^2 := by + simp only [WithLp.prod_norm_sq_eq_of_L2, diagonal_fst, diagonal_snd, hU] + nlinarith [norm_nonneg (diagonal U x), norm_nonneg x] + +theorem operator_norm_le (U D : H →L[ℂ] H) (hU : ∀ x, ‖U x‖ = ‖x‖) : + ‖operator U D‖ ≤ 1 + ‖D‖ := by + have hd : ‖diagonal U‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro x + simp [diagonal_norm_map U hU] + have hn : ‖inl.comp (D.comp (U.comp (WithLp.sndL 2 ℂ H H)))‖ ≤ ‖D‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg D) + intro x + change ‖inl (D (U x.snd))‖ ≤ ‖D‖ * ‖x‖ + rw [inl_norm] + calc + ‖D (U x.snd)‖ ≤ ‖D‖ * ‖U x.snd‖ := D.le_opNorm _ + _ = ‖D‖ * ‖x.snd‖ := by rw [hU] + _ ≤ ‖D‖ * ‖x‖ := mul_le_mul_of_nonneg_left (WithLp.norm_snd_le H x) (norm_nonneg D) + exact (norm_add_le (diagonal U) (inl.comp (D.comp (U.comp (WithLp.sndL 2 ℂ H H))))).trans + (add_le_add hd hn) + +@[simp] theorem inv_apply (U : G →* (H →L[ℂ] H)) (g : G) (x : H) : U g⁻¹ (U g x) = x := by + have h : U g⁻¹ * U g = 1 := by rw [← map_mul]; simp + exact congrArg (fun T : H →L[ℂ] H => T x) h + +def representation (U : G →* (H →L[ℂ] H)) (D : G → (H →L[ℂ] H)) + (h1 : D 1 = 0) (hD : ∀ g h, D (g*h) = D g + conjugate U g (D h)) : + G →* (Double H →L[ℂ] Double H) where + toFun g := operator (U g) (D g) + map_one' := by + apply ContinuousLinearMap.ext + intro x + apply (WithLp.equiv 2 (H × H)).injective + apply Prod.ext <;> simp [h1] + map_mul' g h := by + apply ContinuousLinearMap.ext + intro x + apply (WithLp.equiv 2 (H × H)).injective + apply Prod.ext + · change (operator (U (g*h)) (D (g*h)) x).fst = + (operator (U g) (D g) (operator (U h) (D h) x)).fst + simp only [operator_fst, operator_snd, map_mul, hD, conjugate, + add_apply, mul_apply_eq_comp, map_add, inv_apply] + abel + · simp [map_mul, mul_apply_eq_comp] + +theorem representation_bound (U : G →* (H →L[ℂ] H)) (D : G → (H →L[ℂ] H)) + (h1 : D 1 = 0) (hD : ∀ g h, D (g*h) = D g + conjugate U g (D h)) + (hU : ∀ g x, ‖U g x‖ = ‖x‖) {κ : ℝ} (hb : ∀ g, ‖D g‖ ≤ κ) (g : G) : + ‖representation U D h1 hD g‖ ≤ 1 + κ := + (operator_norm_le (U g) (D g) (hU g)).trans (add_le_add (le_refl _) (hb g)) + +end Triangular +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/Unitarizer.lean b/lean/OAI/Analysis/Unitarizability/Unitarizer.lean new file mode 100644 index 0000000000000000000000000000000000000000..1025b1848a43b5082a4d09cfe4b35a16bc466d89 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/Unitarizer.lean @@ -0,0 +1,60 @@ +import OAI.Analysis.Unitarizability.Triangular +import OAI.Analysis.Unitarizability.InvariantProjection + +namespace OAI + +/-! The bounded implementer forced by a unitarizing similarity. +The commuting projection onto H ⊕ 0 has upper-right block equal to the +negative implementer, avoiding a bounded inverse for graph coordinates. -/ +noncomputable section +namespace Dixmier +namespace Triangular +variable {G H : Type*} [Group G] +variable [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +/-- A global cocycle implementer obtained from the similarity itself. -/ +theorem implementer_of_similar (U : G →* (H →L[ℂ] H)) (D : G → (H →L[ℂ] H)) + (h1 : D 1 = 0) (hD : ∀ g h, D (g*h) = D g + conjugate U g (D h)) + (hπ : SimilarToUnitary (representation U D h1 hD)) : + ∃ B : H →L[ℂ] H, ∀ g, D g = coboundary U B g := by + let π := representation U D h1 hD + let M : ClosedSubmodule ℂ (Double H) := + ⟨(WithLp.sndL 2 ℂ H H).ker, (WithLp.sndL 2 ℂ H H).isClosed_ker⟩ + have hM : ∀ g x, x ∈ M → π g x ∈ M := by + intro g x hx + change x.snd = 0 at hx + change (operator (U g) (D g) x).snd = 0 + simp [hx] + rcases InvariantProjection.exists_commuting_projection π hπ M hM with ⟨P, hm, hf, hp⟩ + let q : H →L[ℂ] H := (WithLp.fstL 2 ℂ H H).comp (P.comp inr) + have hzero (x : Double H) : (P x).snd = 0 := hm x + have hfix (x : H) : P (inl x) = inl x := hf _ (by change (inl x).snd = 0; simp) + have hdecomp (x : Double H) : x = inl x.fst + inr x.snd := by + apply (WithLp.equiv 2 (H × H)).injective + apply Prod.ext <;> simp + have hfst (x : Double H) : (P x).fst = x.fst + q x.snd := by + nth_rw 1 [hdecomp x] + rw [map_add, hfix] + simp [q] + refine ⟨-q, ?_⟩ + intro g + ext x + have h := congrArg (fun T : Double H →L[ℂ] Double H => (T (inr (U g⁻¹ x))).fst) (hp g).eq + change (P (operator (U g) (D g) (inr (U g⁻¹ x)))).fst = + (operator (U g) (D g) (P (inr (U g⁻¹ x)))).fst at h + rw [hfst, operator_fst, operator_snd, operator_fst, hzero] at h + have hinv : U g (U g⁻¹ x) = x := InvariantProjection.rep_inv U g x + simp only [inr_apply, WithLp.toLp_fst, WithLp.toLp_snd, map_zero, zero_add, hinv, + add_zero] at h + change D g x = (-q) x - U g ((-q) (U g⁻¹ x)) + simp only [neg_apply, map_neg, sub_neg_eq_add] + change D g x + q x = U g (q (U g⁻¹ x)) at h + apply eq_neg_add_iff_add_eq.mpr + simpa only [add_comm] using h + +end Triangular +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/UniverseTransport.lean b/lean/OAI/Analysis/Unitarizability/UniverseTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e1843b4d984f0dbe56fb859cd98b074df32061f --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/UniverseTransport.lean @@ -0,0 +1,75 @@ +import OAI.Analysis.Unitarizability.Main +import Mathlib.Algebra.Group.Shrink +import Mathlib.Basic.Countable.Small + +namespace OAI + +/-! Countability lets a group be represented in any universe. +Transport by group equivalences preserves the positive normalized invariant mean +and the bounded nonunitarizable witness. -/ +noncomputable section +namespace Dixmier +universe u v w +open scoped BoundedContinuousFunction +variable {G : Type u} {Q : Type v} [Group G] [Group Q] +variable [TopologicalSpace G] [DiscreteTopology G] +variable [TopologicalSpace Q] [DiscreteTopology Q] + +def meanPullback (e : G ≃* Q) : (G →ᵇ ℂ) →ₗ[ℂ] (Q →ᵇ ℂ) where + toFun f := f.compContinuous ⟨e.symm, continuous_of_discreteTopology⟩ + map_add' f h := by ext q; rfl + map_smul' z f := by ext q; rfl + +omit [DiscreteTopology G] in +@[simp] theorem meanPullback_apply (e : G ≃* Q) (f : G →ᵇ ℂ) (q : Q) : + meanPullback e f q = f (e.symm q) := rfl + +/-- Amenability transport uses the same positive normalized invariant mean. -/ +theorem amenable_of_mulEquiv (e : G ≃* Q) (hQ : Amenable Q) : Amenable G := by + rcases hQ with ⟨m, h1, hp, hi⟩ + refine ⟨m.comp (meanPullback e), ?_, ?_, ?_⟩ + · have hc : meanPullback e (BoundedContinuousFunction.const G 1) = + BoundedContinuousFunction.const Q 1 := by ext q; rfl + simpa only [LinearMap.comp_apply, hc] using h1 + · intro f hf + exact hp _ (fun q => hf (e.symm q)) + · intro g f + have hc : meanPullback e (leftTranslate g f) = leftTranslate (e g) (meanPullback e f) := by + ext q + simp [meanPullback_apply, leftTranslate, map_mul, map_inv] + simpa only [LinearMap.comp_apply, hc] using hi (e g) (meanPullback e f) + +omit [TopologicalSpace G] [DiscreteTopology G] [TopologicalSpace Q] [DiscreteTopology Q] in +/-- Reindexing the group does not change the Hilbert space, bound or similarities. -/ +theorem witness_of_mulEquiv (e : G ≃* Q) (hQ : NonamenableWitness.{v,w} Q) : + NonamenableWitness.{u,w} G := by + rcases hQ with ⟨H, hnorm, hinner, hcomplete, hsep, π, hb, hn⟩ + refine ⟨H, hnorm, hinner, hcomplete, hsep, π.comp e.toMonoidHom, fun g => hb (e g), ?_⟩ + rintro ⟨S, hS⟩ + apply hn + refine ⟨S, ?_⟩ + intro q x + simpa only [MonoidHom.comp_apply, MulEquiv.coe_toMonoidHom, e.apply_symm_apply] using hS (e.symm q) x + +/-- The main theorem with independent group and Hilbert-space universes. -/ +theorem main_theorem_all_universes : MainTheorem.{u,v} := by + intro G _ _ _ _ hG + let Q := Shrink.{v} G + let e : G ≃* Q := Shrink.mulEquiv.symm + let : Countable Q := e.surjective.countable + let : TopologicalSpace Q := ⊥ + let : DiscreteTopology Q := ⟨rfl⟩ + have hQ : ¬ Amenable Q := fun h => hG (amenable_of_mulEquiv e h) + exact witness_of_mulEquiv e (nonamenable_witness hQ) + +/-- Unitarizability implies amenability, with no uniform similarity bound. -/ +theorem amenable_of_unitarizable_all_universes [Countable G] + (h : Unitarizable.{u,v} G) : Amenable G := by + by_contra hn + exact witness_not_unitarizable (main_theorem_all_universes G hn) h + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/Unitarizability/VectorMean.lean b/lean/OAI/Analysis/Unitarizability/VectorMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c8cce465d18bd0f207e4f37fe65002dc26b2646 --- /dev/null +++ b/lean/OAI/Analysis/Unitarizability/VectorMean.lean @@ -0,0 +1,159 @@ +import OAI.Analysis.Unitarizability.Average +import OAI.Analysis.Unitarizability.Model +import Mathlib.Analysis.Normed.Module.WeakDual + +namespace OAI + +/-! Vector means and their translation error bounds. -/ +noncomputable section +namespace Dixmier +open scoped BoundedContinuousFunction +variable {G : Type*} [Group G] [TopologicalSpace G] + +omit [Group G] [TopologicalSpace G] in +theorem summable_l2_sq (ξ : ScalarL2 G) : Summable (fun x => ‖ξ x‖ ^ 2) := by + simpa using (lp.memℓp ξ).summable (by norm_num) + +def vectorMeanValue (ξ : ScalarL2 G) (b : G →ᵇ ℂ) : ℂ := + ∑' x, (‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹) + +theorem vectorMean_summable (ξ : ScalarL2 G) (b : G →ᵇ ℂ) : + Summable (fun x => (‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹) : G → ℂ) := by + apply Summable.of_norm_bounded ((summable_l2_sq ξ).mul_right ‖b‖) + intro x + simp only [norm_mul, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (sq_nonneg ‖ξ x‖)] + exact mul_le_mul_of_nonneg_left (b.norm_coe_le_norm _) (sq_nonneg _) + +theorem vectorMean_norm_le (ξ : ScalarL2 G) (b : G →ᵇ ℂ) : + ‖vectorMeanValue ξ b‖ ≤ ‖ξ‖ ^ 2 * ‖b‖ := by + have hb : ∀ x, ‖(‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹)‖ ≤ ‖ξ x‖ ^ 2 * ‖b‖ := by + intro x + simp only [norm_mul, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (sq_nonneg ‖ξ x‖)] + exact mul_le_mul_of_nonneg_left (b.norm_coe_le_norm _) (sq_nonneg _) + calc + ‖vectorMeanValue ξ b‖ ≤ ∑' x, ‖(‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹)‖ := + norm_tsum_le_tsum_norm (vectorMean_summable ξ b).norm + _ ≤ ∑' x, ‖ξ x‖ ^ 2 * ‖b‖ := + Summable.tsum_le_tsum hb (vectorMean_summable ξ b).norm ((summable_l2_sq ξ).mul_right ‖b‖) + _ = ‖ξ‖ ^ 2 * ‖b‖ := by rw [tsum_mul_right, ← l2_norm_sq] + +def vectorMeanLinear (ξ : ScalarL2 G) : (G →ᵇ ℂ) →ₗ[ℂ] ℂ where + toFun := vectorMeanValue ξ + map_add' b c := by + simp only [vectorMeanValue, BoundedContinuousFunction.add_apply, mul_add] + exact (vectorMean_summable ξ b).tsum_add (vectorMean_summable ξ c) + map_smul' z b := by + simp only [vectorMeanValue, BoundedContinuousFunction.smul_apply, smul_eq_mul, + RingHom.id_apply] + simp_rw [← mul_assoc, mul_comm _ z, mul_assoc] + exact tsum_mul_left + +def vectorMean (ξ : ScalarL2 G) : (G →ᵇ ℂ) →L[ℂ] ℂ := + (vectorMeanLinear ξ).mkContinuous (‖ξ‖ ^ 2) (vectorMean_norm_le ξ) + +@[simp] theorem vectorMean_apply (ξ : ScalarL2 G) (b : G →ᵇ ℂ) : + vectorMean ξ b = vectorMeanValue ξ b := rfl + +theorem vectorMean_one (ξ : ScalarL2 G) : + vectorMean ξ (BoundedContinuousFunction.const G 1) = (‖ξ‖ ^ 2 : ℝ) := by + simp only [vectorMean_apply, vectorMeanValue, BoundedContinuousFunction.const_apply, mul_one] + rw [← Complex.ofReal_tsum, ← l2_norm_sq] + +theorem vectorMean_opNorm_le (ξ : ScalarL2 G) : ‖vectorMean ξ‖ ≤ ‖ξ‖ ^ 2 := + ContinuousLinearMap.opNorm_le_bound _ (sq_nonneg _) (vectorMean_norm_le ξ) + +theorem vectorMean_positive (ξ : ScalarL2 G) (b : G →ᵇ ℂ) + (hb : ∀ x, 0 ≤ (b x).re ∧ (b x).im = 0) : + 0 ≤ (vectorMean ξ b).re ∧ (vectorMean ξ b).im = 0 := by + change 0 ≤ (∑' x, (‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹)).re ∧ + (∑' x, (‖ξ x‖ ^ 2 : ℝ) * b (x⁻¹)).im = 0 + rw [Complex.re_tsum (vectorMean_summable ξ b), Complex.im_tsum (vectorMean_summable ξ b)] + constructor + · apply tsum_nonneg + intro x + simpa only [← Complex.ofReal_pow, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] using mul_nonneg (sq_nonneg ‖ξ x‖) (hb x⁻¹).1 + · simp only [Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, zero_mul, zero_add, fun x => (hb x).2, mul_zero, tsum_zero] + +theorem vectorMean_translate [DiscreteTopology G] (ξ : ScalarL2 G) (g : G) (b : G →ᵇ ℂ) : + vectorMean ξ (leftTranslate g b) = vectorMean (rightRegular g⁻¹ ξ) b := by + change (∑' x, (‖ξ x‖ ^ 2 : ℝ) * b (g⁻¹ * x⁻¹)) = + ∑' x, (‖ξ (x * g⁻¹)‖ ^ 2 : ℝ) * b x⁻¹ + rw [← (Equiv.mulRight g).tsum_eq (fun x => (‖ξ (x * g⁻¹)‖ ^ 2 : ℝ) * b x⁻¹)] + simp [mul_assoc] + +theorem norm_sq_difference_le (a b : ℂ) : + |‖a‖^2 - ‖b‖^2| ≤ ‖a - b‖ * (‖a‖ + ‖b‖) := by + have he : |‖a‖^2 - ‖b‖^2| = |‖a‖ - ‖b‖| * (‖a‖ + ‖b‖) := by + conv_rhs => rw [← abs_of_nonneg (add_nonneg (norm_nonneg a) (norm_nonneg b))] + rw [← abs_mul] + congr 1 + ring + rw [he] + exact mul_le_mul_of_nonneg_right (abs_norm_sub_norm_le a b) + (add_nonneg (norm_nonneg a) (norm_nonneg b)) + +omit [Group G] [TopologicalSpace G] in +/-- The l2-to-l1 estimate behind the vector-mean translation error bound. -/ +theorem l2_square_difference_bound (ξ η : ScalarL2 G) : + Summable (fun x => |‖ξ x‖^2 - ‖η x‖^2|) ∧ + (∑' x, |‖ξ x‖^2 - ‖η x‖^2|) ≤ ‖ξ - η‖ * (‖ξ‖ + ‖η‖) := by + have hp : (2 : ENNReal).toReal.HolderConjugate (2 : ENNReal).toReal := by + norm_num [Real.HolderConjugate] + constructor <;> norm_num + have h1 := lp.tsum_mul_le_mul_norm hp (ξ - η) ξ + have h2 := lp.tsum_mul_le_mul_norm hp (ξ - η) η + have hsum := h1.1.add h2.1 + have hb : ∀ x, |‖ξ x‖^2 - ‖η x‖^2| ≤ ‖(ξ - η) x‖ * ‖ξ x‖ + ‖(ξ - η) x‖ * ‖η x‖ := by + intro x + simpa [mul_add] using norm_sq_difference_le (ξ x) (η x) + have hs := Summable.of_nonneg_of_le (fun x => abs_nonneg _) hb hsum + refine ⟨hs, ?_⟩ + calc + (∑' x, |‖ξ x‖^2 - ‖η x‖^2|) ≤ ∑' x, (‖(ξ - η) x‖ * ‖ξ x‖ + ‖(ξ - η) x‖ * ‖η x‖) := + Summable.tsum_le_tsum hb hs hsum + _ = (∑' x, ‖(ξ - η) x‖ * ‖ξ x‖) + ∑' x, ‖(ξ - η) x‖ * ‖η x‖ := h1.1.tsum_add h2.1 + _ ≤ ‖ξ - η‖ * ‖ξ‖ + ‖ξ - η‖ * ‖η‖ := add_le_add h1.2 h2.2 + _ = ‖ξ - η‖ * (‖ξ‖ + ‖η‖) := (mul_add _ _ _).symm + +theorem vectorMean_difference_bound (ξ η : ScalarL2 G) (b : G →ᵇ ℂ) : + ‖vectorMean ξ b - vectorMean η b‖ ≤ ‖ξ - η‖ * (‖ξ‖ + ‖η‖) * ‖b‖ := by + let f : G → ℂ := fun x => ((‖ξ x‖^2 - ‖η x‖^2 : ℝ) : ℂ) * b x⁻¹ + have hf : Summable f := ((vectorMean_summable ξ b).sub (vectorMean_summable η b)).congr + (fun x => by dsimp [f]; push_cast; ring) + have he : vectorMean ξ b - vectorMean η b = ∑' x, f x := by + rw [vectorMean_apply, vectorMean_apply, vectorMeanValue, vectorMeanValue, + ← (vectorMean_summable ξ b).tsum_sub (vectorMean_summable η b)] + apply tsum_congr + intro x + dsimp [f] + push_cast + ring + have hsq := l2_square_difference_bound ξ η + have hb : ∀ x, ‖f x‖ ≤ |‖ξ x‖^2 - ‖η x‖^2| * ‖b‖ := by + intro x + dsimp [f] + rw [norm_mul, Complex.norm_real, Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (b.norm_coe_le_norm _) (abs_nonneg _) + rw [he] + calc + ‖∑' x, f x‖ ≤ ∑' x, ‖f x‖ := norm_tsum_le_tsum_norm hf.norm + _ ≤ ∑' x, |‖ξ x‖^2 - ‖η x‖^2| * ‖b‖ := + Summable.tsum_le_tsum hb hf.norm (hsq.1.mul_right ‖b‖) + _ = (∑' x, |‖ξ x‖^2 - ‖η x‖^2|) * ‖b‖ := tsum_mul_right + _ ≤ ‖ξ - η‖ * (‖ξ‖ + ‖η‖) * ‖b‖ := mul_le_mul_of_nonneg_right hsq.2 (norm_nonneg _) + +/-- The vector-mean translation error estimate. -/ +theorem vectorMean_translation_bound [DiscreteTopology G] (ξ : ScalarL2 G) (hξ : ‖ξ‖ = 1) + (g : G) (b : G →ᵇ ℂ) : + ‖vectorMean ξ (leftTranslate g b) - vectorMean ξ b‖ ≤ + 2 * ‖b‖ * ‖rightRegular g⁻¹ ξ - ξ‖ := by + rw [vectorMean_translate] + have h := vectorMean_difference_bound (rightRegular g⁻¹ ξ) ξ b + rw [rightRegular_norm_map, hξ] at h + nlinarith + +end Dixmier + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/Bootstrap.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/Bootstrap.lean new file mode 100644 index 0000000000000000000000000000000000000000..3db64cc57a212a91895e7856caaa295bdf95d038 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/Bootstrap.lean @@ -0,0 +1,626 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.BulkTestWeight +import OAI.Analysis.VlasovMaxwell.Population.BulkReceiverResidual + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma first_level_time {Q : ℝ → ℝ} {T R : ℝ} + (hQ : ContinuousOn Q (Ico 0 T)) (hQ0 : Q 0 < R) + (hex : ∃ t ∈ Ico 0 T, R ≤ Q t) : + ∃ t ∈ Ioo 0 T, Q t=R ∧ ∀ s ∈ Ico 0 t, Q s ⟨hs.1,hs.2.trans_lt hb.2⟩ + have hc := hQ.mono hsub + obtain ⟨x,hx,hfx⟩ := intermediate_value_Icc hb.1 hc ⟨hQ0.le,hRb⟩ + let S : Set ℝ := Icc 0 b ∩ Q ⁻¹' {R} + have hS : IsCompact S := isCompact_Icc.of_isClosed_subset + (hc.preimage_isClosed_of_isClosed isClosed_Icc isClosed_singleton) inter_subset_left + obtain ⟨m,hm,hmin⟩ := hS.exists_isMinOn ⟨x,hx,hfx⟩ continuousOn_id + have hfm : Q m=R := hm.2 + have hm0 : 0 < m := by + apply lt_of_le_of_ne hm.1.1 + intro he + rw [← he] at hfm + linarith + refine ⟨m,⟨hm0,hm.1.2.trans_lt hb.2⟩,hfm,?_⟩ + intro s hs + by_contra hn + have hQs : R ≤ Q s := le_of_not_gt hn + obtain ⟨y,hy,hey⟩ := intermediate_value_Icc hs.1 + (hc.mono (Icc_subset_Icc_right (hs.2.le.trans hm.1.2))) ⟨hQ0.le,hQs⟩ + have hyS : y ∈ S := ⟨⟨hy.1,hy.2.trans (hs.2.le.trans hm.1.2)⟩,hey⟩ + have hms : m ≤ s := (hmin hyS).trans hy.2 + exact (not_le_of_gt hs.2) hms + +lemma last_level_time {Q : ℝ → ℝ} {t R : ℝ} (ht : 0 ≤ t) + (hQ : ContinuousOn Q (Icc 0 t)) (hQ0 : Q 0 < R) (hRt : R < Q t) : + ∃ s ∈ Ico 0 t, Q s=R ∧ ∀ u ∈ Ioc s t, R (2:ℝ)^(N+n) + have hRpos (n : ℕ) : 0 ⟨hs.1,hs.2.trans_lt (ht (n+1)).2⟩)) + ((hmax 0 ⟨le_rfl,hzero⟩ (z n) (hz n)).trans_lt (hR0 n)) + (show R n t (n+1)-s n + apply no_bounded_doubling_times (t := t) (Δ := Δ) (N+1) hM hA + (fun n => (ht n).2.le) (fun n => sub_nonneg.mpr (hs n).2.le) + (fun n => by dsimp [Δ]; linarith [hst n]) + intro n + have hp : (2:ℝ)^(10+(N+(n+1)))=1024*R (n+1) := by + rw [pow_add] + norm_num [R] + have hprefix : ∀ u ∈ Icc 0 (t (n+1)), ∀ y ∈ K, + 1024*q (V y u) ≤ (2:ℝ)^(10+(N+(n+1))) := by + intro u hu y hy + rw [hp] + exact mul_le_mul_of_nonneg_left + ((hmax u ⟨hu.1,hu.2.trans_lt (ht (n+1)).2⟩ y hy).trans (hbounded (n+1) hu)) + (by norm_num) + have hH := H (t (n+1)) ⟨(ht (n+1)).1.le,(ht (n+1)).2⟩ + (10+(N+(n+1))) (by rw [hp]; exact hRP (n+1)) hprefix (z n) (hz n) + have hband : ∀ u ∈ Icc (s n) (t (n+1)), + (2:ℝ)^(N+(n+1))/8 ≤ q (V (z n) u) ∧ + q (V (z n) u) ≤ 8*(2:ℝ)^(N+(n+1)) := by + intro u hu + have hu0 : 0≤u := (hs n).1.trans hu.1 + have hlo : R n≤q (V (z n) u) := by + rcases eq_or_lt_of_le hu.1 with hh|hh + · rw [← hh,hse] + · exact (hlast n u ⟨hh,hu.2⟩).le + have hup := (hmax u ⟨hu0,hu.2.trans_lt (ht (n+1)).2⟩ (z n) (hz n)).trans + (hbounded (n+1) ⟨hu0,hu.2⟩) + change R (n+1)/8 ≤ _ ∧ _ ≤ 8*R (n+1) + rw [hdouble] at * + constructor <;> linarith [hRpos n] + have hi := hH (N+(n+1)) (s n) (t (n+1)) (hs n).1 (hs n).2.le le_rfl hband + rw [hp] at hi + have hlow : R (n+1)/2 ≤ ‖V (z n) (t (n+1))-V (z n) (s n)‖ := by + have hh := q_lipschitz (V (z n) (s n)) (V (z n) (t (n+1))) + rw [hzenergy,hse] at hh + have heq : R (n+1)-R n=R (n+1)/2 := by rw [hdouble]; ring + rw [heq,abs_of_pos (half_pos (hRpos (n+1)))] at hh + exact hh + have heq : M*(1024*R (n+1))*Real.sqrt (Δ n)+ + A*(Δ n)*((1024*R (n+1))^2*Real.log (2+1024*R (n+1))/R (n+1)) = + R (n+1)*(1024*M*Real.sqrt (Δ n)+1024^2*A*(Δ n)*Real.log (2+1024*R (n+1))) := by + field_simp + change ‖V (z n) (t (n+1))-V (z n) (s n)‖ ≤ + M*(1024*R (n+1))*Real.sqrt (Δ n)+ + A*(Δ n)*((1024*R (n+1))^2*Real.log (2+1024*R (n+1))/R (n+1)) at hi + rw [heq] at hi + have hh := hlow.trans hi + have hpR := hRpos (n+1) + have hres : (1:ℝ)/2 ≤ 1024*M*Real.sqrt (Δ n)+1024^2*A*(Δ n)*Real.log (2+1024*R (n+1)) := by + nlinarith + simpa only [R, Nat.add_assoc, Nat.add_comm, Nat.add_left_comm] using hres +end RVM +end + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +def incrementBound (M A P L w I : ℝ) : ℝ := + M*P*Real.sqrt I+A*I*(P^2*L/w) + +lemma incrementBound_nonneg {M A P L w I : ℝ} + (hM : 0≤M) (hA : 0≤A) (hP : 0≤P) (hL : 0≤L) (hw : 0≤w) (hI : 0≤I) : + 0≤ incrementBound M A P L w I := by unfold incrementBound; positivity + +lemma incrementBound_mono {M A P L w I J : ℝ} + (hM : 0≤M) (hA : 0≤A) (hP : 0≤P) (hL : 0≤L) (hw : 0≤w) (hIJ : I≤J) : + incrementBound M A P L w I≤ incrementBound M A P L w J := by + exact add_le_add (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hIJ) (mul_nonneg hM hP)) + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hIJ hA) (by positivity)) + +lemma continuous_incrementBound (M A P L w : ℝ) : Continuous (incrementBound M A P L w) := by + unfold incrementBound + fun_prop + +lemma IncrementBootstrap.ramp_error {V K : ℝ→Vec} {T M A P L a b : ℝ} (n : ℕ) + (H : IncrementBootstrap V T M A P L) (ha : 0≤a) (hab : ahband u ⟨hu.1,hu.2.trans htab⟩)).trans + (incrementBound_mono hM hA hP hL hn (by linarith [ht.2])) + · intro t ht + have hat : a≤t := by linarith [ht.1] + rw [norm_sub_rev] + exact (H n t b (ha.trans hat) ht.2 hb (fun u hu=>hband u ⟨hat.trans hu.1,hu.2⟩)).trans + (incrementBound_mono hM hA hP hL hn (by linarith [ht.1])) + +lemma supported_weight_integral_eq {a b T : ℝ} {ψ : ℝ→ℝ} {K : ℝ→Vec} + (hab : a≤b) (ha : 0≤a) (hb : b≤T) (hout : ∀t∉Icc a b,ψ t=0) : + (∫t in Ioo (0:ℝ) T,ψ t • K t)=∫t in a..b,ψ t • K t := by + rw [restrict_Ioo_eq_restrict_Ioc,←integral_Icc_eq_integral_Ioc, + intervalIntegral.integral_of_le hab,←integral_Icc_eq_integral_Ioc] + apply (setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Icc (Icc_subset_Icc ha hb) ?_) + intro t ht + rw [hout t ht.2,zero_smul] + +lemma closure_coefficient_bound {C M A P L w I : ℝ} + (_ : 0≤C) (_ : 0≤M) (hA : 0≤A) (hP : 0≤P) (hL : 0≤L) (hw : 0≤w) (hI : 0≤I) + (hCM : 8*C≤M) (hCA : 16*C*M≤A) (hC2A : 256*C^2≤A) : + C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*L/w)+ + 2*incrementBound M A P L w (I/256) ≤ incrementBound M A P L w I/4 := by + have hs : Real.sqrt (I/256)=Real.sqrt I/16 := by rw [Real.sqrt_div hI]; norm_num + have hCs : C*Real.sqrt A≤A/16 := by + have h1 : 16*C≤Real.sqrt A := by nlinarith [Real.sq_sqrt hA,Real.sqrt_nonneg A] + have h2 := mul_le_mul_of_nonneg_right h1 (Real.sqrt_nonneg A) + nlinarith [Real.sq_sqrt hA] + have h1 : C+M/8≤M/4 := by linarith + have h2 : C*(M+Real.sqrt A)+A/128≤A/4 := by linarith + have hp := mul_le_mul_of_nonneg_right h1 (mul_nonneg hP (Real.sqrt_nonneg I)) + have hq := mul_le_mul_of_nonneg_right h2 (show 0≤I*(P^2*L/w) by positivity) + unfold incrementBound + rw [hs] + simp only [div_eq_mul_inv] at hp hq ⊢ + nlinarith only [hp,hq] + +lemma PhaseFlowOn.physical_cap_of_labels {d : Datum} {s : Solution} {T P : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : SmoothClassicalPrefix d s T) + (hcap : ∀t∈Icc 0 T,∀z∈tsupport d.f₀,1024*q (F.flow z t).2≤P) : + ∀t∈Icc 0 T,∀z : Phase,s.f (t,z)≠0→1024*q z.2≤P := by + intro t ht z hz + have hf0 : d.f₀ (inversePhase F.flow (t,z))≠0 := by + rw [←hs.initial_f,←F.transport_inverse hs.energyPrefix.f_smooth hs.energyPrefix.vlasov ht] + exact hz + have hh := hcap t ht (inversePhase F.flow (t,z)) (subset_tsupport _ hf0) + simpa only [F.flow_inversePhase ht] using hh + +lemma Admissible.signed_increment_strict {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃M A : ℝ,32≤M ∧ 1≤A ∧ ∀ᶠ P : ℝ in atTop, + 1≤P → 1≤Real.log (2+P) → + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + (∀t∈Icc 0 T,∀z∈tsupport d.f₀,1024*q (F.flow z t).2≤P) → + (∀z∈tsupport d.f₀,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀z∈tsupport d.f₀,∀(n : ℕ) (a b : ℝ),0≤a → a≤b → b≤T → + (∀t∈Icc a b,(2:ℝ)^n/8≤q (F.flow z t).2 ∧ q (F.flow z t).2≤8*(2:ℝ)^n) → + ‖(F.flow z b).2-(F.flow z a).2‖≤ + incrementBound M A P (Real.log (2+P)) (2^n) (b-a)/2 := by + obtain ⟨C,hC,hbulk⟩ := hd.force_bulk_uniform T₀ 512 (by norm_num) + let M := 32+8*C + let A := 1+16*C*M+256*C^2 + have hM32 : 32≤M := by dsimp [M]; linarith + have hM : 0≤M := by linarith + have hA1 : 1≤A := by dsimp [A]; nlinarith [mul_nonneg hC hM, sq_nonneg C] + have hA : 0≤A := by linarith + have hCM : 8*C≤M := by dsimp [M]; linarith + have hCA : 16*C*M≤A := by dsimp [A]; nlinarith [sq_nonneg C] + have hC2 : 256*C^2≤A := by dsimp [A]; nlinarith [mul_nonneg hC hM, sq_nonneg C] + refine ⟨M,A,hM32,hA1,?_⟩ + filter_upwards [hbulk M A (by linarith) hA1] with P hB + intro hP hL s T F hs hT hTT hcap H z hz n a b ha hab hb hband + let w : ℝ := 2^n + let I := b-a + let V := fun t=>(F.flow z t).2 + let K := prefixMomentumForce s F.flow T z + have hw : 1≤w := one_le_pow₀ (by norm_num) + have hw0 : 0(F.flow z r).2) + (prefixMomentumForce s F.flow T z t) (Icc 0 T) t + rw [prefixMomentumForce,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self htT)] + exact (F.ode z t (Ioo_subset_Icc_self htT)).snd + exact hh.hasDerivAt (Icc_mem_nhds htT.1 htT.2) + have he := (H z hz).ramp_error n ha hab' hb hM hA hP0.le hL0 hband + ((F.continuousOn_time z).snd.mono (Icc_subset_Icc ha hb)) + (F.continuous_prefixMomentumForce hs.energyPrefix hT z).continuousOn hdV + have hn := norm_sub_norm_le (V b-V a) (∫t in a..b,ψ t • K t) + rw [norm_sub_rev (V b-V a) (∫t in a..b,ψ t • K t)] at hn + have hc := closure_coefficient_bound hC hM hA hP0.le hL0 hw0.le hI0 hCM hCA hC2 + change _≤ incrementBound M A P (Real.log (2+P)) w I/2 + change ‖(∫t in a..b,ψ t • K t)-(V b-V a)‖≤2*incrementBound M A P (Real.log (2+P)) w (I/256) at he + change ‖V b-V a‖≤_ + linarith + +lemma signed_bootstrap_propagation {α : Type*} {V : α→ℝ→Vec} {K : Set α} + {T M A P L C : ℝ} (hT : 0≤T) (hM : 0∀z∈K,IncrementBootstrap (V z) τ M A P L + let S := {τ : ℝ | τ∈Icc 0 T ∧ H τ} + have hzero : (0:ℝ)∈S := by + refine ⟨⟨le_rfl,hT⟩,?_⟩ + intro z hz n a b ha hab hb hband + have he : a=b := by linarith + rw [he] + simp only [sub_self,norm_zero,Real.sqrt_zero,mul_zero,zero_mul,add_zero,le_refl] + have hbdd : BddAbove S := ⟨T,fun τ hτ=>hτ.1.2⟩ + let τ := sSup S + have hτ0 : 0≤τ := le_csSup hbdd hzero + have hτT : τ≤T := csSup_le ⟨0,hzero⟩ (fun r hr=>hr.1.2) + have hτ : τ∈Icc 0 T := ⟨hτ0,hτT⟩ + have hbound : H τ := by + intro z hz n a b ha hab hb hband + change ‖V z b-V z a‖≤ incrementBound M A P L (2^n) (b-a) + rcases hab.eq_or_lt with he|hab + · rw [he]; simp [incrementBound] + apply le_of_forall_pos_le_add + intro ε hε + let r := max a (b-ε/(C+1)) + have hden : 0hband t ⟨ht.1,ht.2.trans hrb.le⟩) + change ‖V z r-V z a‖≤ incrementBound M A P L (2^n) (r-a) at hpart + have hm := incrementBound_mono hM.le hA hP.le hL (show 0≤(2:ℝ)^n by positivity) + (show r-a≤b-a by linarith) + have hl := hLip z hz r ⟨hr0,hrb.le.trans (hb.trans hτT)⟩ b ⟨ha.trans hab.le,hb.trans hτT⟩ + rw [abs_of_nonneg (sub_nonneg.mpr hrb.le)] at hl + have hdiff : b-r≤ε/(C+1) := by have := le_max_right a (b-ε/(C+1)); dsimp [r]; linarith + have hcost : C*(b-r)≤ε := by + have hh := mul_le_mul_of_nonneg_left hdiff hC + have he := (div_mul_cancel₀ ε (ne_of_gt hden)) + nlinarith [div_pos hε hden] + have hn : ‖V z b-V z a‖≤‖V z b-V z r‖+‖V z r-V z a‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + linarith + have hmem : τ∈S := ⟨hτ,hbound⟩ + by_cases he : τ=T + · rwa [←he] + have hτlt : τhband t ⟨ht.1,ht.2.trans htb⟩) + have hm := incrementBound_mono hM.le hA hP.le hL (show 0≤(2:ℝ)^n by positivity) + (show τ-a≤b-a by linarith) + have hl := hLip z hz τ hτ b ⟨hτ0.trans htb,hb.trans hnewT⟩ + rw [abs_of_nonneg (sub_nonneg.mpr htb)] at hl + have hs := Real.sqrt_le_sqrt (le_of_not_ge hlen) + have hpos := Real.sqrt_nonneg ℓ + have hc : C*(b-τ)≤M*P*Real.sqrt (b-a)/2 := by + have hh := (le_div_iff₀ (by positivity : 0<2*(C+1))).mp hδcost + have h1 := mul_le_mul_of_nonneg_left (show b-τ≤δ by linarith) hC + have h2 := mul_le_mul_of_nonneg_left hs hMP.le + nlinarith + have hrest : 0≤A*(b-a)*(P^2*L/(2:ℝ)^n) := by positivity + have hn : ‖V z b-V z a‖≤‖V z b-V z τ‖+‖V z τ-V z a‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + dsimp [incrementBound] at hp hm ⊢ + linarith + have hnewmem : τ+δ∈S := ⟨⟨by linarith,hnewT⟩,hnew⟩ + have hh : τ+δ≤τ := le_csSup hbdd hnewmem + linarith + +def PhaseFlowOn.restrict {E B : Field} {T τ : ℝ} (F : PhaseFlowOn E B T) (hτT : τ≤T) : + PhaseFlowOn E B τ where + flow := F.flow + differential := F.differential + initial := F.initial + ode := fun z t ht=>(F.ode z t ⟨ht.1,ht.2.trans hτT⟩).mono (Icc_subset_Icc le_rfl hτT) + label := fun z t ht=>F.label z t ⟨ht.1,ht.2.trans hτT⟩ + det_one := fun z t ht=>F.det_one z t ⟨ht.1,ht.2.trans hτT⟩ + joint := fun z t ht=>F.joint z t ⟨ht.1,ht.2.trans_le hτT⟩ + bijective := fun t ht=>F.bijective t ⟨ht.1,ht.2.trans hτT⟩ + +lemma SmoothClassicalPrefix.restrict {d : Datum} {s : Solution} {T τ : ℝ} + (hs : SmoothClassicalPrefix d s T) (hτT : τ≤T) : SmoothClassicalPrefix d s τ where + f_smooth := hs.f_smooth.mono (fun p hp=>⟨hp.1,hp.2.trans hτT⟩) + E_smooth := hs.E_smooth.mono (fun p hp=>⟨hp.1,hp.2.trans hτT⟩) + B_smooth := hs.B_smooth.mono (fun p hp=>⟨hp.1,hp.2.trans hτT⟩) + nonnegative := fun t ht=>hs.nonnegative t ⟨ht.1,ht.2.trans hτT⟩ + E_L2 := by + obtain ⟨F₂,hF,hE⟩ := hs.E_L2 + exact ⟨F₂,hF.mono (Icc_subset_Icc le_rfl hτT),fun t ht=>hE t ⟨ht.1,ht.2.trans hτT⟩⟩ + B_L2 := by + obtain ⟨F₂,hF,hB⟩ := hs.B_L2 + exact ⟨F₂,hF.mono (Icc_subset_Icc le_rfl hτT),fun t ht=>hB t ⟨ht.1,ht.2.trans hτT⟩⟩ + compact := by + obtain ⟨K,hK,hk⟩ := hs.compact + exact ⟨K,hK,fun t ht=>hk t ⟨ht.1,ht.2.trans hτT⟩⟩ + equations := fun t ht htτ=>hs.equations t ht (htτ.trans_le hτT) + initial_f := hs.initial_f + initial_E := hs.initial_E + initial_B := hs.initial_B + +lemma PhaseFlowOn.supported_momentum_lipschitz {d : Datum} {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hd : Admissible d) (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) : + ∃C : ℝ,0≤C ∧ ∀z∈tsupport d.f₀,∀a∈Icc 0 T,∀b∈Icc 0 T, + ‖(F.flow z b).2-(F.flow z a).2‖≤C*|b-a| := by + have hα := F.continuous_prefixFlow hs.energyPrefix hT + have hX : Continuous (fun p : ℝ×Phase=>(p.1,(prefixFlow F.flow T p.2 p.1).1)) := continuous_fst.prodMk hα.fst + have hE := (continuous_prefixField hs.energyPrefix.E_smooth.continuousOn hT).comp hX + have hB := (continuous_prefixField hs.energyPrefix.B_smooth.continuousOn hT).comp hX + have hv := (contDiff_velocity (k:=1)).continuous.comp hα.snd + have hc : Continuous (fun p : ℝ×Phase=>prefixMomentumForce s F.flow T p.2 p.1) := + hE.add ((contDiff_cross (k:=1)).continuous.comp (hv.prodMk hB)) + obtain ⟨R,hR⟩ := (isCompact_Icc.prod hd.2.1).bddAbove_image hc.norm.continuousOn + let C := max 0 R + have hC : 0≤C := le_max_left _ _ + refine ⟨C,hC,?_⟩ + intro z hz a ha b hb + have hLip : LipschitzOnWith ⟨C,hC⟩ (fun t=>(F.flow z t).2) (Icc 0 T) := by + apply (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le (fun t ht=>(F.ode z t ht).snd) + intro t ht + apply NNReal.coe_le_coe.mp + change ‖(lorentzField s.E s.B (t,F.flow z t)).2‖≤C + have hh := hR ⟨(t,z),⟨ht,hz⟩,rfl⟩ + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq ht] at hh + exact hh.trans (le_max_right _ _) + have hh := hLip.dist_le_mul b hb a ha + change ‖(F.flow z b).2-(F.flow z a).2‖≤C*‖b-a‖ at hh + simpa only [Real.norm_eq_abs] using hh + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.uniform_signed_increment {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃M A P₀ : ℝ,32≤M ∧ 1≤A ∧ 1≤P₀ ∧ + ∀P : ℝ,P₀≤P → + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + (∀t∈Icc 0 T,∀z∈tsupport d.f₀,1024*q (F.flow z t).2≤P) → + ∀z∈tsupport d.f₀,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P)) := by + obtain ⟨M,A,hM,hA,hstrict⟩ := hd.signed_increment_strict T₀ + obtain ⟨P₁,hP₁⟩ := Filter.eventually_atTop.mp hstrict + obtain ⟨P₂,hP₂⟩ := Filter.eventually_atTop.mp + ((Real.tendsto_log_atTop.comp (Filter.tendsto_atTop_add_const_left _ 2 tendsto_id)).eventually (eventually_ge_atTop 1)) + let P₀ := max 1 (max P₁ P₂) + refine ⟨M,A,P₀,hM,hA,le_max_left _ _,?_⟩ + intro P hP s T F hs hT hTT hcap + have hP1 : 1≤P := (le_max_left 1 _).trans hP + have hlog : 1≤Real.log (2+P) := hP₂ P (((le_max_right P₁ P₂).trans (le_max_right 1 _)).trans hP) + have hS := hP₁ P (((le_max_left P₁ P₂).trans (le_max_right 1 _)).trans hP) + obtain ⟨C,hC,hLip⟩ := F.supported_momentum_lipschitz hd hs hT + apply signed_bootstrap_propagation hT (by linarith) (by linarith) + (by linarith) (by linarith) hC hLip + intro τ hτ H z hz n a b ha hab hb hband + exact hS hP1 hlog s τ (F.restrict hτ.2) (hs.restrict hτ.2) hτ.1 (hτ.2.trans hTT) + (fun t ht=>hcap t ⟨ht.1,ht.2.trans hτ.2⟩) H z hz n a b ha hab hb hband + +lemma Admissible.population_increment {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃M A P₀ : ℝ,0(flow z t).2) (tsupport d.f₀) T M A P₀ := by + obtain ⟨M,A,P₀,hM,hA,hP₀,hU⟩ := hd.uniform_signed_increment T₀ + refine ⟨M,A,P₀,by linarith,by linarith,hP₀,?_⟩ + intro s T flow hTT hpref τ hτ k hk hcap + obtain ⟨hs,F,hF⟩ := hpref τ hτ + have hh := hU (2^k) hk s τ F hs hτ.1 (hτ.2.le.trans hTT) + rw [hF] at hh + exact hh hcap + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/DerivMovingEnergy.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/DerivMovingEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb163d2a21b1bb2ed275b4d77aa80a51e7ff899a --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/DerivMovingEnergy.lean @@ -0,0 +1,533 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.NullConeFlux +import OAI.Analysis.VlasovMaxwell.Retarded.RetardedPhaseDomain + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace NNReal + +namespace RVM.EnergyPrefix + +lemma deriv_moving_energy {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {U : Set ℝ} (hU : IsOpen U) (hpos : U ⊆ Ioo 0 T) + {g : ℝ × Vec → ℝ} {K : Set Vec} (hK : IsCompact K) + (hg : ContDiffOn ℝ 1 g (U ×ˢ (univ : Set Vec))) + (hz : ∀ r ∈ U, ∀ x ∉ K, g (r,x)=0) + {t : ℝ} (ht : t ∈ U) : + HasDerivAt (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) + (∫ x : Vec, fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) + + fderiv ℝ g (t,x) (0,totalFlux s (t,x))) t := by + have hE := (total_energy_regular hs).mono (prod_mono_left hpos) + have hF : ContDiffOn ℝ 1 (fun p => g p * totalEnergy s p) + (U ×ˢ (univ : Set Vec)) := hg.mul hE + have hzF : ∀ r ∈ U, ∀ x ∉ K, g (r,x)*totalEnergy s (r,x)=0 := by + intro r hr x hx + rw [hz r hr x hx,zero_mul] + have hd := hasFDerivAt_integral_uniform_support hU hK ht hF hzF + have hi := fderiv_integral_uniform_support_apply hU hK ht hF hzF (1:ℝ) + have hgg : ContDiff ℝ 1 (fun x => g (t,x)) := by + apply ContDiffOn.comp_contDiff hg (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hS : ContDiff ℝ 1 (fun x => totalFlux s (t,x)) := by + apply ContDiffOn.comp_contDiff ((total_flux_regular hs).mono (prod_mono_left hpos)) + (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hEc : Continuous (fun x => totalEnergy s (t,x)) := by + apply hE.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hgD : Continuous (fun x => fderiv ℝ g (t,x)) := by + apply (hg.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) (by simp)).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hDc : HasCompactSupport (fun x => fderiv ℝ g (t,x)) := + compactSupport_param_fderiv hU hK ht hz + have hgC : HasCompactSupport (fun x => g (t,x)) := + compactSupport_of_zero_off hK (hz t ht) + have hgDapply (v : ℝ × Vec) : HasCompactSupport (fun x => fderiv ℝ g (t,x) v) := by + apply compactSupport_of_zero_off hDc + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply] + have hIt : Integrable (fun x => fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x)) := + ((hgD.clm_apply continuous_const).mul hEc).integrable_of_hasCompactSupport + (hgDapply (1,0)).mul_right + have hIa : Integrable (fun x => g (t,x) * divergence (fun y => totalFlux s (t,y)) x) := + (hgg.continuous.mul (continuous_divergence hS)).integrable_of_hasCompactSupport hgC.mul_right + have hIs : Integrable (fun x => fderiv ℝ (fun y => g (t,y)) x (totalFlux s (t,x))) := + ((hgg.continuous_fderiv (by simp)).clm_apply hS.continuous).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hgC.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply])) + have heq : ∀ x : Vec, + fderiv ℝ (fun p => g p * totalEnergy s p) (t,x) (1,0) = + fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) - + g (t,x) * divergence (fun y => totalFlux s (t,y)) x := by + intro x + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hg' := (hg.contDiffAt hn).differentiableAt (by simp) + have hE' := (hE.contDiffAt hn).differentiableAt (by simp) + change fderiv ℝ (g * totalEnergy s) (t,x) (1,0) = _ + rw [fderiv_mul hg' hE',add_apply, + smul_apply,smul_apply, + smul_eq_mul,smul_eq_mul,← deriv_time_slice hE'] + have hl := local_energy_conservation hs (hpos ht) x + rw [show deriv (fun r => totalEnergy s (r,x)) t = + -divergence (fun y => totalFlux s (t,y)) x by linarith] + ring + have hxder (x v : Vec) : fderiv ℝ (fun y => g (t,y)) x v = fderiv ℝ g (t,x) (0,v) := by + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hh := ((hg.contDiffAt hn).differentiableAt (by simp)).hasFDerivAt.comp x + ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x)) + change HasFDerivAt (fun y => g (t,y)) _ x at hh + rw [hh.fderiv] + simp + have hh : deriv (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) t = + ∫ x : Vec, fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) + + fderiv ℝ g (t,x) (0,totalFlux s (t,x)) := by + change fderiv ℝ (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) t 1 = _ + rw [hi] + simp only [heq] + rw [integral_sub hIt hIa,integral_mul_divergence hS hgg hgC,sub_neg_eq_add] + simp_rw [← hxder] + exact (integral_add hIt hIs).symm + exact hh ▸ hd.differentiableAt.hasDerivAt + +lemma coneShellFlux_nonneg {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Icc 0 T) (x x₀ : Vec) : + 0 ≤ coneShellFlux s T ε x₀ (t,x) := by + by_cases hr : ‖x-x₀‖ ≤ T-t + · apply mul_nonneg (mul_nonneg (by positivity) (deriv_transition_nonneg _)) + have hb := total_flux_bound hs ht x + have he := total_energy_nonneg hs ht x + have hc := real_inner_le_norm (-(x-x₀)) (totalFlux s (t,x)) + simp only [inner_neg_left,norm_neg] at hc + nlinarith [mul_le_mul_of_nonneg_left hb (norm_nonneg (x-x₀)), + mul_le_mul_of_nonneg_right hr he] + · have hn : coneArgument T ε x₀ (t,x) < 0 := by + dsimp [coneArgument] + apply div_neg_of_neg_of_pos _ hε + have := norm_nonneg (x-x₀) + push Not at hr + have hR : 0 ≤ T-t := sub_nonneg.mpr ht.2 + nlinarith [sq_lt_sq₀ hR (norm_nonneg (x-x₀)) |>.mpr hr] + simp [coneShellFlux,deriv_transition_zero_neg hn] + +lemma deriv_cone_energy {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Ioo 0 T) (x₀ : Vec) : + HasDerivAt (fun r => ∫ x : Vec, coneCutoff T ε x₀ (r,x)*totalEnergy s (r,x)) + (-(∫ x : Vec, coneShellFlux s T ε x₀ (t,x))) t := by + have hh := deriv_moving_energy hs isOpen_Ioo Subset.rfl + (isCompact_closedBall x₀ T) (contDiff_coneCutoff T ε x₀ (k := 1)).contDiffOn + (fun r hr x hx => coneCutoff_zero_outside hε ⟨hr.1.le,hr.2.le⟩ hx) ht + convert hh using 1 + rw [← integral_neg] + apply integral_congr_ae + apply ae_of_all + intro x + dsimp only + rw [coneCutoff_fderiv,coneCutoff_fderiv] + simp only [inner_zero_right,mul_zero,mul_one,sub_zero,zero_sub] + dsimp [coneShellFlux] + ring + +lemma particle_flux_continuous_slab {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (_hT : 0 ≤ T) : + ContinuousOn (particleFlux s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + obtain ⟨K,hK,hzero⟩ := hs.compact + change ContinuousOn (fun p : ℝ × Vec => ∫ v : Vec, s.f (p.1,p.2,v) • v) _ + apply continuousOn_integral_uniform_support + (F := fun z : (ℝ × Vec) × Vec => s.f (z.1.1,z.1.2,z.2) • z.2) (hK.image continuous_snd) + · have hf : ContinuousOn (fun z : (ℝ × Vec) × Vec => s.f (z.1.1,z.1.2,z.2)) + ((Icc 0 T ×ˢ univ) ×ˢ univ) := by + apply hs.f_smooth.continuousOn.comp (contDiff_reassociate (k := 1)).continuous.continuousOn + intro z hz + exact ⟨hz.1.1,mem_univ _⟩ + exact hf.smul continuous_snd.continuousOn + · intro p hp v hv + have hf : s.f (p.1,p.2,v) = 0 := by + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 hp.1 (subset_tsupport _ hn),rfl⟩ + simp only [hf,zero_smul] + +lemma total_flux_continuous_slab {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0 ≤ T) : + ContinuousOn (totalFlux s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + exact ((contDiff_cross (k := 1)).continuous.comp_continuousOn + (hs.E_smooth.continuousOn.prodMk hs.B_smooth.continuousOn)).add + (particle_flux_continuous_slab hs hT) + +lemma coneShellFlux_continuous_slab {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {ε : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + ContinuousOn (coneShellFlux s T ε x₀) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have hθ : Continuous (deriv Real.smoothTransition) := + (Real.smoothTransition.contDiff (n := 2)).continuous_deriv (by simp) + exact ((continuous_const.mul (hθ.comp (contDiff_coneArgument T ε x₀ (k := 1)).continuous)).continuousOn).mul + (((continuous_const.sub continuous_fst).continuousOn.mul + (total_energy_continuous_slab hs)).add + ((continuous_snd.sub continuous_const).continuousOn.inner + (total_flux_continuous_slab hs hT))) + +lemma coneShellFlux_integral_continuous {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {ε : ℝ} (hT : 0 ≤ T) (hε : 0 < ε) (x₀ : Vec) : + ContinuousOn (fun t => ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ T) + (coneShellFlux_continuous_slab hs hT x₀) + intro t ht x hx + exact coneShellFlux_zero_outside s hε ht hx + +lemma cone_energy_continuous {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {ε : ℝ} (_hT : 0 ≤ T) (hε : 0 < ε) (x₀ : Vec) : + ContinuousOn (fun t => ∫ x : Vec, coneCutoff T ε x₀ (t,x)*totalEnergy s (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ T) + ((contDiff_coneCutoff T ε x₀ (k := 1)).continuous.continuousOn.mul + (total_energy_continuous_slab hs)) + intro t ht x hx + change coneCutoff T ε x₀ (t,x)*totalEnergy s (t,x)=0 + simp only [coneCutoff_zero_outside hε ht hx,zero_mul] + +lemma coneShellFlux_bound {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {ε b : ℝ} (hb : 0 ≤ b) (hbT : b ≤ T) (hε : 0 < ε) (x₀ : Vec) : + (∫ t in 0..b, ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + have hT := hb.trans hbT + have hsub : Icc (0:ℝ) b ⊆ Icc 0 T := Icc_subset_Icc_right hbT + have hc := (cone_energy_continuous hs hT hε x₀).mono hsub + have hi := ((coneShellFlux_integral_continuous hs hT hε x₀).mono hsub).intervalIntegrable_of_Icc (μ := volume) hb + have hf := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hb hc + (fun t ht => deriv_cone_energy hs hε ⟨ht.1,ht.2.trans_le hbT⟩ x₀) hi.neg + rw [intervalIntegral.integral_neg] at hf + have hbpos : 0 ≤ ∫ x : Vec, coneCutoff T ε x₀ (b,x)*totalEnergy s (b,x) := by + apply integral_nonneg + intro x + exact mul_nonneg (Real.smoothTransition.nonneg _) (total_energy_nonneg hs ⟨hb,hbT⟩ x) + have hzero : (∫ x : Vec, coneCutoff T ε x₀ (0,x)*totalEnergy s (0,x)) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + refine integral_mono ?_ (total_energy_integrable hs ⟨le_rfl,hT⟩) ?_ + · apply Continuous.integrable_of_hasCompactSupport + · apply Continuous.mul ((contDiff_coneCutoff T ε x₀ (k := 1)).continuous.comp + (continuous_const.prodMk continuous_id)) + apply (total_energy_continuous_slab hs).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨⟨le_rfl,hT⟩,mem_univ x⟩ + · apply HasCompactSupport.mul_right + apply compactSupport_of_zero_off (isCompact_closedBall x₀ T) + exact fun x hx => coneCutoff_zero_outside hε ⟨le_rfl,hT⟩ hx + · intro x + exact mul_le_of_le_one_left (total_energy_nonneg hs ⟨le_rfl,hT⟩ x) + (Real.smoothTransition.le_one _) + linarith + +lemma continuous_radialConeProfile {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (R : ℝ) (x₀ : Vec) : + Continuous (fun p : ℝ × Sphere => radialConeProfile s t R x₀ p.1 p.2) := by + have hU : Continuous (fun x => totalEnergy s (t,x)) := by + apply (total_energy_continuous_slab hs).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hS : Continuous (fun x => totalFlux s (t,x)) := by + apply (total_flux_continuous_slab hs (ht.1.trans ht.2)).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hx : Continuous (fun p : ℝ × Sphere => x₀ + p.1 • p.2.1) := by fun_prop + exact continuous_fst.mul ((continuous_const.mul (hU.comp hx)).add + (continuous_fst.mul ((continuous_subtype_val.comp continuous_snd).inner (hS.comp hx)))) + +lemma continuous_spherical_radialConeProfile {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (R : ℝ) (x₀ : Vec) : + Continuous (fun r => ∫ n : Sphere, radialConeProfile s t R x₀ r n ∂sphereMeasure) := by + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k := univ) isCompact_univ + (continuous_radialConeProfile hs ht R x₀).continuousOn + intro r n _ hn + exact (hn (mem_univ n)).elim + +lemma coneShellFlux_polar {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {ε t : ℝ} (ht : t ∈ Icc 0 T) (hε : 0 < ε) (x₀ : Vec) : + (∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) = + ∫ r in 0..(T-t), radialConeWeight (T-t) ε r * + (∫ n : Sphere, radialConeProfile s t (T-t) x₀ r n ∂sphereMeasure) := by + have hR : 0 ≤ T-t := sub_nonneg.mpr ht.2 + have hC : Continuous (fun x => coneShellFlux s T ε x₀ (t,x₀+x)) := by + apply (coneShellFlux_continuous_slab hs (ht.1.trans ht.2) x₀).comp_continuous + (continuous_const.prodMk (continuous_const.add continuous_id)) + intro x + exact ⟨ht,mem_univ _⟩ + have hK : HasCompactSupport (fun x => coneShellFlux s T ε x₀ (t,x₀+x)) := by + apply compactSupport_of_zero_off (isCompact_closedBall (0:Vec) T) + intro x hx + apply coneShellFlux_zero_outside s hε ht + simpa only [mem_closedBall,dist_eq_norm,add_sub_cancel_left,sub_zero] using hx + have htrans := integral_add_left_eq_self (μ := (volume : Measure Vec)) + (fun x => coneShellFlux s T ε x₀ (t,x)) x₀ + rw [← htrans,integral_polar (hC.integrable_of_hasCompactSupport hK)] + simp_rw [coneShellFlux_polar_kernel,radialConeWeight_integral_Ioi hR hε] + have hcont : Continuous (fun p : ℝ × Sphere => + radialConeWeight (T-t) ε p.1 * radialConeProfile s t (T-t) x₀ p.1 p.2) := + ((continuous_radialConeWeight (T-t) ε).comp continuous_fst).mul + (continuous_radialConeProfile hs ht (T-t) x₀) + have hi : Integrable (fun p : ℝ × Sphere => radialConeWeight (T-t) ε p.1 * + radialConeProfile s t (T-t) x₀ p.1 p.2) + ((volume.restrict (uIoc 0 (T-t))).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [uIoc_of_le hR,Measure.restrict_prod_eq_prod_univ] + exact (hcont.continuousOn.integrableOn_compact + (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ioc_subset_Icc_self) + rw [← intervalIntegral_integral_swap hi] + apply intervalIntegral.integral_congr + intro r _ + exact integral_const_mul _ _ + +lemma coneShellFlux_tendsto {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (htT : t < T) (x₀ : Vec) : + Filter.Tendsto (fun ε => ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) + (𝓝[>] (0 : ℝ)) + (𝓝 (∫ n : Sphere, radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure)) := by + have hh := radialConeWeight_tendsto (sub_pos.mpr htT) + (continuous_spherical_radialConeProfile hs ht (T-t) x₀).continuousOn + apply hh.congr' + filter_upwards [self_mem_nhdsWithin] with ε hε + exact (coneShellFlux_polar hs ht hε x₀).symm + +lemma light_cone_flux {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) (x₀ : Vec) : + IntegrableOn (fun t => ∫ n : Sphere, + radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure) (Ioo 0 T) ∧ + (∫ t in 0..T, ∫ n : Sphere, + radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + let ε : ℕ → ℝ := fun n => 1 / ((n:ℝ)+1) + have hε (n : ℕ) : 0 < ε n := by dsimp [ε]; positivity + have heps : Filter.Tendsto ε Filter.atTop (𝓝[>] (0:ℝ)) := by + apply tendsto_nhdsWithin_iff.mpr + exact ⟨tendsto_one_div_add_atTop_nhds_zero_nat, Filter.Eventually.of_forall hε⟩ + let G : ℕ → ℝ → ℝ := fun n t => ∫ x : Vec, coneShellFlux s T (ε n) x₀ (t,x) + have hGi (n : ℕ) : Integrable (G n) (volume.restrict (Ioo 0 T)) := by + exact ((coneShellFlux_integral_continuous hs hT (hε n) x₀).integrableOn_compact + isCompact_Icc).mono_set Ioo_subset_Icc_self + have hGn (n : ℕ) : ∀ᵐ t ∂volume.restrict (Ioo 0 T), 0 ≤ G n t := by + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + apply integral_nonneg + intro x + exact coneShellFlux_nonneg hs (hε n) ⟨ht.1.le,ht.2.le⟩ x x₀ + have hconv : ∀ᵐ t ∂volume.restrict (Ioo 0 T), + Filter.Tendsto (fun n => G n t) Filter.atTop + (𝓝 (∫ n : Sphere, radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure)) := by + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + exact (coneShellFlux_tendsto hs (Ioo_subset_Icc_self ht) ht.2 x₀).comp heps + have hb (n : ℕ) : (∫ t in Ioo 0 T, G n t) ≤ ∫ x : Vec, totalEnergy s (0,x) := by + rw [restrict_Ioo_eq_restrict_Ioc,← intervalIntegral.integral_of_le hT] + exact coneShellFlux_bound hs hT le_rfl (hε n) x₀ + obtain ⟨hi,hb⟩ := integral_limit_nonneg_le + (integral_nonneg (total_energy_nonneg hs ⟨le_rfl,hT⟩)) hGi hGn hconv hb + refine ⟨hi, ?_⟩ + rwa [restrict_Ioo_eq_restrict_Ioc,← intervalIntegral.integral_of_le hT] at hb + +open scoped Pointwise + +lemma null_cone_flux {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) (x₀ : Vec) : + IntegrableOn (fun t => ∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) (Ioo 0 T) ∧ + (∫ t in 0..T, ∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + simp_rw [nullConeFlux_spherical_eq] + exact light_cone_flux hs hT x₀ + +lemma particle_cone_identity {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (x n : Vec) : + (∫ v : Vec, q v * (1-dot n (velocity v)) * s.f (t,x,v)) = + particleEnergy s (t,x) - dot n (particleFlux s (t,x)) := by + obtain ⟨hf,hc⟩ := velocity_slice hs ht x + have hi : Integrable (fun v : Vec => s.f (t,x,v) • v) := + (hf.continuous.smul continuous_id).integrable_of_hasCompactSupport hc.smul_right + have hqi : Integrable (fun v : Vec => q v * s.f (t,x,v)) := + ((contDiff_q (k := 1)).continuous.mul hf.continuous).integrable_of_hasCompactSupport hc.mul_left + have hni := (innerSL ℝ n).integrable_comp hi + have hh := (innerSL ℝ n).integral_comp_comm hi + simp only [innerSL_apply_apply] at hh hni + simp only [particleEnergy,particleFlux,dot_eq_inner] + rw [← hh,← integral_sub hqi hni] + apply integral_congr_ae + apply ae_of_all + intro v + simp only [inner_smul_right,← dot_eq_inner] + have hq : q v * dot n (velocity v) = dot n v := by + simp only [dot,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [mul_left_comm,q_mul_velocity] + rw [← hq] + ring + +lemma particle_cone_nonneg {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) {n : Vec} (hn : ‖n‖ = 1) : + 0 ≤ particleEnergy s (t,x) - dot n (particleFlux s (t,x)) := by + have hh := dot_le_norm n (particleFlux s (t,x)) + rw [hn,one_mul] at hh + linarith [particle_flux_bound hs ht x] + +lemma goodConeDensity_bounds {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) {n : Vec} (hn : ‖n‖=1) : + 0 ≤ goodConeDensity s (t,x) n ∧ + goodConeDensity s (t,x) n ≤ 4*(totalEnergy s (t,x)-dot n (totalFlux s (t,x))) := by + have hG := good_field_square_le_flux (s.E (t,x)) (s.B (t,x)) n hn + have hP := particle_cone_nonneg hs ht x hn + dsimp [goodConeDensity,totalEnergy,totalFlux] + rw [dot_add_right] + constructor + · positivity + · linarith + +lemma goodConeDensity_continuousOn {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) : + ContinuousOn (fun p : (ℝ × Vec) × Vec => goodConeDensity s p.1 p.2) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := by + have hE : ContinuousOn (fun p : (ℝ × Vec) × Vec => s.E p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + hs.E_smooth.continuousOn.comp continuous_fst.continuousOn (by + intro p hp; exact hp.1) + have hB : ContinuousOn (fun p : (ℝ × Vec) × Vec => s.B p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + hs.B_smooth.continuousOn.comp continuous_fst.continuousOn (by + intro p hp; exact hp.1) + have hF : ContinuousOn (fun p : (ℝ × Vec) × Vec => particleFlux s p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + (particle_flux_continuous_slab hs hT).comp + continuous_fst.continuousOn (fun _ h => h.1) + have hP : ContinuousOn (fun p : (ℝ × Vec) × Vec => particleEnergy s p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + (particle_energy_continuous_slab hs).comp + continuous_fst.continuousOn (fun _ h => h.1) + have hc := (contDiff_cross (k := 1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hB) + simp only [goodConeDensity,dot_eq_inner] + exact (((hE.add hc).norm.add (continuous_snd.continuousOn.inner hB).abs).pow 2).add + (hP.sub (continuous_snd.continuousOn.inner hF)) + +lemma goodConeDensity_cone_continuous {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) (x₀ : Vec) : + ContinuousOn (fun p : ℝ × Sphere => + (T-p.1)^2 * goodConeDensity s (p.1,x₀-(T-p.1) • p.2.1) p.2.1) (Icc 0 T ×ˢ univ) := by + have hn : Continuous (fun p : ℝ × Sphere => p.2.1) := continuous_subtype_val.comp continuous_snd + have hx : Continuous (fun p : ℝ × Sphere => x₀-(T-p.1) • p.2.1) := + continuous_const.sub ((continuous_const.sub continuous_fst).smul hn) + have hmap : Continuous (fun p : ℝ × Sphere => ((p.1,x₀-(T-p.1) • p.2.1),p.2.1)) := + (continuous_fst.prodMk hx).prodMk hn + have hg : ContinuousOn (fun p : ℝ × Sphere => + goodConeDensity s (p.1,x₀-(T-p.1) • p.2.1) p.2.1) (Icc 0 T ×ˢ univ) := by + apply (goodConeDensity_continuousOn hs hT).comp hmap.continuousOn + intro p hp + exact ⟨⟨hp.1,mem_univ _⟩,mem_univ _⟩ + have hw : Continuous (fun p : ℝ × Sphere => (T-p.1)^2) := + (continuous_const.sub continuous_fst).pow 2 + convert! hw.continuousOn.mul hg using 1 + +lemma nullConeFlux_sphere_continuous {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (R : ℝ) (x₀ : Vec) : + Continuous (fun n : Sphere => nullConeFlux s R x₀ t n) := by + have hc : Continuous (fun n : Sphere => radialConeProfile s t (R-t) x₀ (R-t) n) := + (continuous_radialConeProfile hs ht (R-t) x₀).comp + (continuous_const.prodMk continuous_id) + convert! hc.comp continuous_neg using 1 + funext n + simp only [Function.comp_apply,nullConeFlux,radialConeProfile,coe_neg_sphere,smul_neg, + ← sub_eq_add_neg,dot_eq_inner,inner_neg_left] + ring + +lemma goodConeDensity_sphere_integral_bound {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + {t : ℝ} (ht : t ∈ Icc 0 T) (x₀ : Vec) : + (∫ n : Sphere, (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure) ≤ + 4*(∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) := by + rw [← integral_const_mul] + apply integral_mono + · have hc := (goodConeDensity_cone_continuous hs (ht.1.trans ht.2) x₀).comp_continuous + (continuous_const.prodMk continuous_id) (fun n => ⟨ht,mem_univ n⟩) + exact integrableOn_univ.mp (hc.continuousOn.integrableOn_compact isCompact_univ) + · exact integrableOn_univ.mp (((nullConeFlux_sphere_continuous hs ht T x₀).const_mul 4).continuousOn.integrableOn_compact isCompact_univ) + · intro n + have hn := (goodConeDensity_bounds hs ht (x₀-(T-t) • n.1) (sphere_norm n)).2 + dsimp [nullConeFlux] + nlinarith [mul_le_mul_of_nonneg_left hn (sq_nonneg (T-t))] + +lemma goodConeDensity_time_integral_bound {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) (x₀ : Vec) : + (∫ t in 0..T, ∫ n : Sphere, + (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure) ≤ + 4*(∫ x : Vec, totalEnergy s (0,x)) := by + let F : ℝ → ℝ := fun t => ∫ n : Sphere, + (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure + have hFi : ContinuousOn F (Icc 0 T) := by + apply continuousOn_integral_of_compact_support (k := univ) isCompact_univ + (goodConeDensity_cone_continuous hs hT x₀) + intro t n _ hn + exact (hn (mem_univ n)).elim + have hNi := (null_cone_flux hs hT x₀).1 + have hFint : IntegrableOn F (Ioo 0 T) := + (hFi.integrableOn_compact isCompact_Icc).mono_set Ioo_subset_Icc_self + have hle : (∫ t in Ioo 0 T, F t) ≤ + ∫ t in Ioo 0 T, 4*(∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) := by + apply integral_mono_ae hFint (hNi.const_mul 4) + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + exact goodConeDensity_sphere_integral_bound hs ⟨ht.1.le,ht.2.le⟩ x₀ + rw [integral_const_mul] at hle + simp only [restrict_Ioo_eq_restrict_Ioc, + ← intervalIntegral.integral_of_le hT] at hle + have hbound := (null_cone_flux hs hT x₀).2 + exact le_trans hle (by linarith) + +theorem good_cone_energy {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) (x₀ : Vec) : + (∫ t in 0..T, ∫ n : Sphere, (T-t)^2 * + ((‖s.E (t,x₀-(T-t) • n.1)+cross n.1 (s.B (t,x₀-(T-t) • n.1))‖+ + |dot n.1 (s.B (t,x₀-(T-t) • n.1))|)^2 + + ∫ v : Vec, q v*(1-dot n.1 (velocity v))*s.f (t,x₀-(T-t) • n.1,v)) + ∂sphereMeasure) ≤ 4*(∫ x : Vec, totalEnergy s (0,x)) := by + convert! goodConeDensity_time_integral_bound hs hT x₀ using 1 + apply intervalIntegral.integral_congr + intro t ht + rw [uIcc_of_le hT] at ht + apply integral_congr_ae + apply ae_of_all + intro n + dsimp only + rw [particle_cone_identity hs ht] + rfl + +end RVM.EnergyPrefix + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalBoundaryBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalBoundaryBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..d99e5591990172c39a81befe7cfa129f6a50df31 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalBoundaryBound.lean @@ -0,0 +1,312 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM +attribute [local instance] Measure.Subtype.measureSpace +section SphereJets +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) +lemma freeWave_derivative_bound_horizon {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) + (n : ℕ) (H : ℝ) {C : ℝ} (hC : 0≤C) + (hg0 : ∀ x, ‖iteratedFDeriv ℝ n g x‖≤C) + (hg1 : ∀ x, ‖iteratedFDeriv ℝ (n+1) g x‖≤C) + (hh0 : ∀ x, ‖iteratedFDeriv ℝ n h x‖≤C) + {t : ℝ} (ht : t∈Icc (0:ℝ) H) (x : Vec) : + ‖iteratedFDeriv ℝ n (fun y => freeWave g h (t,y)) x‖≤(1+2*H)*C := by + let A : Sphere → Vec → ℝ := fun a y => g (y+t • a.1) + let B : Sphere → Vec → ℝ := fun a y => fderiv ℝ g (y+t • a.1) a.1 + let D : Sphere → Vec → ℝ := fun a y => h (y+t • a.1) + have hA : SmoothCompactFamily A := SmoothCompactFamily.ofJoint + (hg.comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))) continuous_subtype_val + have hB : SmoothCompactFamily B := SmoothCompactFamily.ofJoint + (((hg.fderiv_right (m:=∞) (by simp)).comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))).clm_apply + contDiff_fst) continuous_subtype_val + have hD : SmoothCompactFamily D := SmoothCompactFamily.ofJoint + (hh.comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))) continuous_subtype_val + have ha := sphere_average_derivative_bound hA n (fun a y => by + dsimp only [A]; rw [iteratedFDeriv_comp_add_right]; exact hg0 _) x + have hd := sphere_average_derivative_bound hD n (fun a y => by + dsimp only [D]; rw [iteratedFDeriv_comp_add_right]; exact hh0 _) x + have hb := sphere_average_derivative_bound hB n (fun a y => by + change ‖iteratedFDeriv ℝ n (fun z => (fun w => fderiv ℝ g w a.1) (z+t • a.1)) y‖≤C + rw [iteratedFDeriv_comp_add_right (f:=fun w => fderiv ℝ g w a.1) n (t • a.1) y] + have hh' := norm_iteratedFDeriv_clm_apply_const (x:=y+t • a.1) + (hg.fderiv_right (m:=∞) (by simp)).contDiffAt (by exact_mod_cast le_top : (n:ℕ∞ω)≤∞) + (c:=a.1) + rw [sphere_norm a,one_mul,norm_iteratedFDeriv_fderiv] at hh' + exact hh'.trans (hg1 _)) x + let a : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, A u y ∂sphereMeasure + let b : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, B u y ∂sphereMeasure + let c : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, D u y ∂sphereMeasure + have has : ContDiff ℝ ∞ a := (contDiff_integral_smoothFamily sphereMeasure hA).const_smul _ + have hbs : ContDiff ℝ ∞ b := (contDiff_integral_smoothFamily sphereMeasure hB).const_smul _ + have hcs : ContDiff ℝ ∞ c := (contDiff_integral_smoothFamily sphereMeasure hD).const_smul _ + have he : (fun y => freeWave g h (t,y))=(fun y => a y+t • b y+t • c y) := by + funext y + rw [freeWave_sphere hg] + simp only [a,b,c,A,B,D,smul_eq_mul] + ring + rw [he] + have hb' : ‖iteratedFDeriv ℝ n (fun y => t • b y) x‖≤t*C := by + rw [iteratedFDeriv_const_smul_apply' ((hbs.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left hb ht.1 + have hc' : ‖iteratedFDeriv ℝ n (fun y => t • c y) x‖≤t*C := by + rw [iteratedFDeriv_const_smul_apply' ((hcs.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left hd ht.1 + exact (norm_iteratedFDeriv_add_le (has.add (hbs.const_smul t)) (hcs.const_smul t) n x).trans + ((add_le_add ((norm_iteratedFDeriv_add_le has (hbs.const_smul t) n x).trans + (add_le_add ha hb')) hc').trans (by nlinarith [ht.2])) + +end SphereJets +lemma BoundedSmooth.freeWave_coordinate_jets_horizon {E B : Vec → Vec} + (hE : BoundedSmooth E) (hB : BoundedSmooth B) (H : ℝ) (hH : 0≤H) (n : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) H, ∀ x, + ‖iteratedFDeriv ℝ n (fun y => freeWave (fun z => E z i) (fun z => curl B z i) (t,y)) x‖≤C ∧ + ‖iteratedFDeriv ℝ n (fun y => freeWave (fun z => B z i) (fun z => -curl E z i) (t,y)) x‖≤C := by + obtain ⟨A,hA⟩ := hE.2 n + obtain ⟨D,hD⟩ := hE.2 (n+1) + obtain ⟨K,hK⟩ := hB.2 n + obtain ⟨L,hL⟩ := hB.2 (n+1) + let C := max A 0+2*max D 0+max K 0+2*max L 0 + have hC : 0≤C := by dsimp [C]; positivity + have hAC : A≤C := by dsimp [C]; linarith [le_max_left A 0,le_max_right D 0,le_max_right K 0,le_max_right L 0] + have hDC : 2*D≤C := by dsimp [C]; linarith [le_max_left D 0,le_max_right A 0,le_max_right K 0,le_max_right L 0] + have hKC : K≤C := by dsimp [C]; linarith [le_max_left K 0,le_max_right D 0,le_max_right A 0,le_max_right L 0] + have hLC : 2*L≤C := by dsimp [C]; linarith [le_max_left L 0,le_max_right D 0,le_max_right K 0,le_max_right A 0] + have hD0 : 0≤D := (norm_nonneg _).trans (hD 0) + have hL0 : 0≤L := (norm_nonneg _).trans (hL 0) + have hp : ContDiff ℝ ∞ (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + refine ⟨(1+2*H)*C,by positivity,?_⟩ + intro t ht x + constructor + · apply freeWave_derivative_bound_horizon (hp.comp hE.1) (hp.comp (contDiff_curl hB.1)) n H hC + (fun y => (norm_iteratedFDeriv_coordinate hE.1 n y i).trans ((hA y).trans hAC)) + (fun y => (norm_iteratedFDeriv_coordinate hE.1 (n+1) y i).trans ((hD y).trans (by linarith))) + (fun y => (norm_iteratedFDeriv_curl_coordinate hB.1 n y i).trans + ((mul_le_mul_of_nonneg_left (hL y) (by norm_num)).trans hLC)) ht x + · apply freeWave_derivative_bound_horizon (hp.comp hB.1) (hp.comp (contDiff_curl hE.1) |>.neg) n H hC + (fun y => (norm_iteratedFDeriv_coordinate hB.1 n y i).trans ((hK y).trans hKC)) + (fun y => (norm_iteratedFDeriv_coordinate hB.1 (n+1) y i).trans ((hL y).trans (by linarith))) _ ht x + intro y + change ‖iteratedFDeriv ℝ n (-(fun z => curl E z i)) y‖≤C + rw [iteratedFDeriv_neg_apply,norm_neg] + exact (norm_iteratedFDeriv_curl_coordinate hE.1 n y i).trans + ((mul_le_mul_of_nonneg_left (hD y) (by norm_num)).trans hDC) + +lemma datumWeightedSphere_smooth_bound_horizon {f : Phase → ℝ} (hf : ContDiff ℝ ∞ f) + (hc : HasCompactSupport f) {H : Vec × Vec → ℝ} + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) (n : ℕ) (T : ℝ) (hT : 0≤T) : + ContDiff ℝ ∞ (datumWeightedSphere f H) ∧ ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) T, ∀ x, + ‖iteratedFDeriv ℝ n (fun y => datumWeightedSphere f H (t,y)) x‖≤C := by + obtain ⟨P,hP⟩ := (hc.image continuous_snd).isBounded.exists_norm_le + have hzero (x v : Vec) (hv : v∉closedBall (0:Vec) P) : f (x,v)=0 := by + by_contra hne + exact hv (mem_closedBall_zero_iff.mpr (hP v ⟨(x,v),subset_tsupport _ hne,rfl⟩)) + let : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + let : CompactSpace (closedBall (0:Vec) P) := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure (closedBall (0:Vec) P)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let α := Sphere × closedBall (0:Vec) P + let μ : Measure α := sphereMeasure.prod volume + let c : α → ℝ := fun a => H (a.1.1,a.2.1) + let F : α → (ℝ × Vec) → ℝ := fun a p => f (p.2+p.1 • a.1.1,a.2.1) + have hcc : Continuous c := hH.comp_continuous + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + (fun a => ⟨a.1.2,mem_univ _⟩) + have hF : SmoothCompactFamily F := SmoothCompactFamily.ofJoint + (hf.comp ((contDiff_snd.snd.add (contDiff_snd.fst.smul contDiff_fst.fst)).prodMk contDiff_fst.snd)) + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + have hG := hF.const_smul hcc + have he : datumWeightedSphere f H=(fun p : ℝ × Vec => (4*Real.pi)⁻¹*p.1*(∫ a, c a*F a p ∂μ)) := by + funext p + have hint : Integrable (fun a : α => c a*F a p) μ := + (hcc.mul (hF.continuous.comp (continuous_const.prodMk continuous_id))).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hi : (∫ a : α, c a*F a p ∂μ)= + ∫ a : Sphere, ∫ v : Vec, f (p.2+p.1 • a.1,v)*H (a.1,v) ∂volume ∂sphereMeasure := by + rw [show μ=sphereMeasure.prod volume from rfl,integral_prod _ hint] + apply integral_congr_ae + exact ae_of_all _ (fun a => by + dsimp only [c,F] + rw [integral_subtype measurableSet_closedBall (fun v => H (a.1,v)*f (p.2+p.1 • a.1,v))] + have hz : (∫ v in closedBall (0:Vec) P, H (a.1,v)*f (p.2+p.1 • a.1,v))= + ∫ v : Vec, H (a.1,v)*f (p.2+p.1 • a.1,v) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hzero _ _ hv,mul_zero] + rw [hz] + apply integral_congr_ae + exact ae_of_all _ (fun v => mul_comm _ _)) + rw [hi] + simp only [datumWeightedSphere,integral_const_mul] + ring + have hs : ContDiff ℝ ∞ (datumWeightedSphere f H) := by + rw [he] + exact (contDiff_const.mul contDiff_fst).mul (contDiff_integral_smoothFamily μ hG) + refine ⟨hs,?_⟩ + obtain ⟨D,hD,hd⟩ := smooth_compact_jets_bound hf hc n + obtain ⟨L,hL⟩ := hcc.bounded_above_of_compact_support (HasCompactSupport.of_compactSpace _) + let C := max L 0 + have hC : 0≤C := le_max_right _ _ + have hcB (a : α) : |c a|≤C := (hL a).trans (le_max_left _ _) + refine ⟨(4*Real.pi)⁻¹*(T*(μ.real univ*(C*D))),by positivity,?_⟩ + intro t ht x + have hFt : SmoothCompactFamily (fun a : α => fun y : Vec => f (y+t • a.1.1,a.2.1)) := + SmoothCompactFamily.ofJoint + (hf.comp ((contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst.fst)).prodMk contDiff_fst.snd)) + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + have hGt := hFt.const_smul hcc + have hj := norm_iteratedFDeriv_integral_le μ n hGt x + have hb (a : α) : ‖iteratedFDeriv ℝ n (fun y => c a*f (y+t • a.1.1,a.2.1)) x‖≤C*D := by + rw [show (fun y => c a*f (y+t • a.1.1,a.2.1))=(fun y => c a • (fun z => f (z,a.2.1)) (y+t • a.1.1)) from rfl, + iteratedFDeriv_const_smul_apply' (((hFt.1 a).of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_eq_abs,iteratedFDeriv_comp_add_right (f:=fun z => f (z,a.2.1)) n (t • a.1.1) x] + exact mul_le_mul (hcB a) ((norm_iteratedFDeriv_phase_slice hf n _ _).trans (hd n le_rfl _)) + (norm_nonneg _) hC + have hint : Integrable (fun a => ‖iteratedFDeriv ℝ n (fun y => c a • f (y+t • a.1.1,a.2.1)) x‖) μ := + ((hGt.2 n).comp (continuous_const.prodMk continuous_id)).norm.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hij := hj.trans (integral_mono hint (integrable_const (C*D)) hb) + simp only [integral_const,smul_eq_mul] at hij + have hej : (fun y => datumWeightedSphere f H (t,y))= + (fun y => ((4*Real.pi)⁻¹*t) • (∫ a, c a • f (y+t • a.1.1,a.2.1) ∂μ)) := by + funext y + rw [he] + rfl + rw [hej,iteratedFDeriv_const_smul_apply' (((contDiff_integral_smoothFamily μ hGt).of_le + (by exact_mod_cast le_top)).contDiffAt),norm_smul,Real.norm_of_nonneg (mul_nonneg (by positivity) ht.1 : 0≤(4*Real.pi)⁻¹*t)] + exact (mul_le_mul_of_nonneg_left hij (mul_nonneg (by positivity) ht.1)).trans (by + have hn : 0≤μ.real univ*(C*D) := by positivity + calc + _ = (4*Real.pi)⁻¹*(t*(μ.real univ*(C*D))) := by ring + _ ≤ (4*Real.pi)⁻¹*(T*(μ.real univ*(C*D))) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right ht.2 hn) (by positivity)) + +lemma electricConeBoundary_datum_jets_horizon {d : Datum} (hd : Admissible d) (T : ℝ) (hT : 0≤T) (k : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) T, + ContDiff ℝ ∞ (fun x => electricConeBoundary (datumBoundarySolution d) t x i 0) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (fun y => electricConeBoundary (datumBoundarySolution d) t y i 0) x‖≤C := by + have hp (j : Fin 3) : ContDiff ℝ ∞ (fun v : Vec => v j) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).contDiff + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_jets_horizon hd.2.2.2.1 hd.2.2.2.2.1 T hT k i + obtain ⟨hFs,B,hB,hflux⟩ := datumWeightedSphere_smooth_bound_horizon hd.1 hd.2.1 + (continuousOn_fluxWeight (continuousOn_datumElectricFluxKernel i)) k T hT + obtain ⟨hRs,D,hD,hrho⟩ := datumWeightedSphere_smooth_bound_horizon hd.1 hd.2.1 + (((hp i).continuous.comp continuous_fst).continuousOn) k T hT + obtain ⟨hJs,L,hL,hcurrent⟩ := datumWeightedSphere_smooth_bound_horizon hd.1 hd.2.1 + (((hp i).continuous.comp ((contDiff_velocity (k:=1)).continuous.comp continuous_snd)).continuousOn) k T hT + let a := freeWave (fun y => d.E₀ y i) (fun y => curl d.B₀ y i) + let b := datumWeightedSphere d.f₀ (fun p => dot p.1 (datumElectricFluxKernel i (-p.1,p.2))) + let c := datumWeightedSphere d.f₀ (fun p => p.1 i) + let e := datumWeightedSphere d.f₀ (fun p => velocity p.2 i) + have has : ContDiff ℝ ∞ a := contDiff_freeWave ((hp i).comp hd.2.2.2.1.1) + ((hp i).comp (contDiff_curl hd.2.2.2.2.1.1)) + refine ⟨A+B+D+L,by positivity,?_⟩ + intro t ht + have heq : (fun x => electricConeBoundary (datumBoundarySolution d) t x i 0)= + (fun x => a (t,x)-b (t,x)-c (t,x)-e (t,x)) := by + funext x + simp only [electricConeBoundary,sub_zero] + simp_rw [datum_initial_electric_flux_normalised d i ht.1] + rw [←datumWeightedSphere_flux hd.1.continuous hd.2.1 (continuousOn_datumElectricFluxKernel i)] + simp only [datumBoundarySolution] + rw [←datumWeightedSphere_rho,←datumWeightedSphere_waveCurrent hd] + rw [heq] + have ha := has.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hb := hFs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hc := hRs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hd' := hJs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + refine ⟨((ha.sub hb).sub hc).sub hd',?_⟩ + intro x + exact (norm_iteratedFDeriv_sub_le ((ha.sub hb).sub hc) hd' k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le (ha.sub hb) hc k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le ha hb k x).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x).1 + (hflux t ⟨ht.1.le,ht.2⟩ x))) (hrho t ⟨ht.1.le,ht.2⟩ x))) + (hcurrent t ⟨ht.1.le,ht.2⟩ x)) + +lemma magneticConeBoundary_datum_jets_horizon {d : Datum} (hd : Admissible d) (T : ℝ) (hT : 0≤T) (k : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) T, + ContDiff ℝ ∞ (fun x => magneticConeBoundary (datumBoundarySolution d) t x i 0) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (fun y => magneticConeBoundary (datumBoundarySolution d) t y i 0) x‖≤C := by + have hp (j : Fin 3) : ContDiff ℝ ∞ (fun v : Vec => v j) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).contDiff + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_jets_horizon hd.2.2.2.1 hd.2.2.2.2.1 T hT k i + obtain ⟨hFs,B,hB,hflux⟩ := datumWeightedSphere_smooth_bound_horizon hd.1 hd.2.1 + (continuousOn_fluxWeight (continuousOn_datumMagneticFluxKernel i)) k T hT + obtain ⟨hRs,D,hD,hmoment⟩ := datumWeightedSphere_smooth_bound_horizon hd.1 hd.2.1 + ((continuous_datumMagneticMoment i).continuousOn) k T hT + let a := freeWave (fun y => d.B₀ y i) (fun y => -curl d.E₀ y i) + let b := datumWeightedSphere d.f₀ (fun p => dot p.1 (datumMagneticFluxKernel i (-p.1,p.2))) + let c := datumWeightedSphere d.f₀ (fun p => p.1 (curlA i)*velocity p.2 (curlB i)- + p.1 (curlB i)*velocity p.2 (curlA i)) + have has : ContDiff ℝ ∞ a := contDiff_freeWave ((hp i).comp hd.2.2.2.2.1.1) + (((hp i).comp (contDiff_curl hd.2.2.2.1.1)).neg) + refine ⟨A+B+D,by positivity,?_⟩ + intro t ht + have heq : (fun x => magneticConeBoundary (datumBoundarySolution d) t x i 0)= + (fun x => a (t,x)-b (t,x)+c (t,x)) := by + funext x + simp only [magneticConeBoundary,sub_zero] + simp_rw [datum_initial_magnetic_flux_normalised d i ht.1] + rw [←datumWeightedSphere_flux hd.1.continuous hd.2.1 (continuousOn_datumMagneticFluxKernel i)] + simp only [datumBoundarySolution] + rw [←datumWeightedSphere_magneticMoment hd] + rw [heq] + have ha := has.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hb := hFs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hc := hRs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + refine ⟨(ha.sub hb).add hc,?_⟩ + intro x + exact (norm_iteratedFDeriv_add_le (ha.sub hb) hc k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le ha hb k x).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x).2 + (hflux t ⟨ht.1.le,ht.2⟩ x))) (hmoment t ⟨ht.1.le,ht.2⟩ x)) + +lemma datum_boundary_global_jets_horizon {d : Datum} (hd : Admissible d) (T : ℝ) (hT : 0≤T) (k : ℕ) : + ∃ C : ℝ, 0≤C ∧ + (∀ x, ‖iteratedFDeriv ℝ k d.E₀ x‖≤C ∧ ‖iteratedFDeriv ℝ k d.B₀ x‖≤C) ∧ + ∀ t∈Ioc (0:ℝ) T, + (ContDiff ℝ ∞ (electricBoundaryField (datumBoundarySolution d) t) ∧ + ContDiff ℝ ∞ (magneticBoundaryField (datumBoundarySolution d) t)) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (electricBoundaryField (datumBoundarySolution d) t) x‖≤C ∧ + ‖iteratedFDeriv ℝ k (magneticBoundaryField (datumBoundarySolution d) t) x‖≤C := by + choose CE hCE he using electricConeBoundary_datum_jets_horizon hd T hT k + choose CB hCB hb using magneticConeBoundary_datum_jets_horizon hd T hT k + obtain ⟨D,hD⟩ := hd.2.2.2.1.2 k + obtain ⟨L,hL⟩ := hd.2.2.2.2.1.2 k + let C := max D 0+max L 0+∑ i, (CE i+CB i) + have hC : 0≤C := add_nonneg (add_nonneg (le_max_right _ _) (le_max_right _ _)) + (Finset.sum_nonneg (fun i _ => add_nonneg (hCE i) (hCB i))) + have hEC (i) : CE i≤C := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [C]; linarith [le_max_right D 0,le_max_right L 0,hCB i] + have hBC (i) : CB i≤C := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [C]; linarith [le_max_right D 0,le_max_right L 0,hCE i] + refine ⟨3*C,by positivity,?_,?_⟩ + · intro x + have hS : 0≤∑ i, (CE i+CB i) := Finset.sum_nonneg (fun i _ => add_nonneg (hCE i) (hCB i)) + constructor + · exact (hD x).trans (by dsimp [C]; linarith [le_max_left D 0,le_max_right L 0]) + · exact (hL x).trans (by dsimp [C]; linarith [le_max_left L 0,le_max_right D 0]) + · intro t ht + have hes : ContDiff ℝ ∞ (electricBoundaryField (datumBoundarySolution d) t) := + contDiff_euclidean.mpr (fun i => (he i t ht).1) + have hbs : ContDiff ℝ ∞ (magneticBoundaryField (datumBoundarySolution d) t) := + contDiff_euclidean.mpr (fun i => (hb i t ht).1) + refine ⟨⟨hes,hbs⟩,fun x => ⟨?_,?_⟩⟩ + · exact norm_iteratedFDeriv_vec_le hes k hC (fun i y => ((he i t ht).2 y).trans (hEC i)) x + · exact norm_iteratedFDeriv_vec_le hbs k hC (fun i y => ((hb i t ht).2 y).trans (hBC i)) x + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalContinuation.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalContinuation.lean new file mode 100644 index 0000000000000000000000000000000000000000..86adfadf69ed8c10eab95bf5ae7a9d8dab218249 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/GlobalContinuation.lean @@ -0,0 +1,1058 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SlabEvolutionRegularity +import OAI.Analysis.VlasovMaxwell.Regularity.VolterraSup +import OAI.Analysis.VlasovMaxwell.Regularity.PhysicalGradient +import OAI.Analysis.VlasovMaxwell.Maxwell.FieldGradientNorm +import OAI.Analysis.VlasovMaxwell.Regularity.LowBoundaryControl +import OAI.Analysis.VlasovMaxwell.Population.UniformPopulation +import OAI.Analysis.VlasovMaxwell.LocalPDE.SmoothLocalExistence +import OAI.Analysis.VlasovMaxwell.Continuation.PrefixUniqueness + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma SmoothClassicalPrefix.particle_bound_datum {d : Datum} {s : Solution} {U A : ℝ} + (hs : SmoothClassicalPrefix d s U) (hU : 0 by simpa only [Real.norm_eq_abs] using (hA z).trans (le_max_left A 0)) + have hinterior : ∀ t∈Ioo (0:ℝ) U, ∀ x, + ‖s.E (t,x)‖+‖s.B (t,x)‖≤2*D+2*K*(∫ r in Icc (0:ℝ) t, 1+g r) := by + intro t ht x + have hv := hs.physical_vectors ht.1 ht.2 x + have hdens (z : Vec) (hz : 0<‖z‖) (hzt : ‖z‖≤t) := + hk s U hUH hf hP t ⟨ht.1.le,ht.2.le⟩ x z hz hzt + have hke := kernel_volterra_norm (g:=fun r => 1+g r) ht.1.le hK hv.2.2.1 (by fun_prop) (by + intro z hz hzt + apply (hdens z hz hzt).1.trans + apply div_le_div_of_nonneg_right _ (sq_nonneg _) + apply mul_le_mul_of_nonneg_left _ hK + have hh := hgb (t-‖z‖) ⟨by linarith,by linarith [norm_nonneg z,ht.2]⟩ (x+z) + linarith) + have hkb := kernel_volterra_norm (g:=fun r => 1+g r) ht.1.le hK hv.2.2.2 (by fun_prop) (by + intro z hz hzt + apply (hdens z hz hzt).2.trans + apply div_le_div_of_nonneg_right _ (sq_nonneg _) + apply mul_le_mul_of_nonneg_left _ hK + have hh := hgb (t-‖z‖) ⟨by linarith,by linarith [norm_nonneg z,ht.2]⟩ (x+z) + linarith) + have hb := (hDb t ⟨ht.1,ht.2.le.trans hUH⟩).2 x + simp only [norm_iteratedFDeriv_zero] at hb + have he := physical_field_integral_bound hb.1 hke + have hm := physical_field_integral_bound hb.2 hkb + rw [←hv.1] at he + rw [←hv.2.1] at hm + linarith + intro t ht x + have hEc : ContinuousOn (fun r => s.E (r,x)) (Icc (0:ℝ) U) := + hs.E_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn + (fun r hr => hr) + have hBc : ContinuousOn (fun r => s.B (r,x)) (Icc (0:ℝ) U) := + hs.B_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn + (fun r hr => hr) + have hgc : ContinuousOn (fun t => 2*D+2*K*(∫ r in Icc (0:ℝ) t, 1+g r)) (Icc (0:ℝ) U) := + continuousOn_const.add (continuousOn_const.mul (intervalIntegral.continuousOn_primitive_Icc + ((continuous_const.add hg).continuousOn.integrableOn_compact isCompact_Icc))) + apply le_on_closure (fun r hr => hinterior r hr x) + · rw [_root_.closure_Ioo hU.ne] + intro r hr + exact (hEc r hr).norm.add (hBc r hr).norm + · simpa only [_root_.closure_Ioo hU.ne] using hgc + · simpa only [_root_.closure_Ioo hU.ne] using ht + +lemma bounded_momentum_field_bound {d : Datum} (hd : Admissible d) (P H : ℝ) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (U : ℝ), 0 ‖s.E (t,x)‖+‖s.B (t,x)‖) + · obtain ⟨L,hL,hl⟩ := hs.E_jets.2 0 + obtain ⟨M,hM,hm⟩ := hs.B_jets.2 0 + refine ⟨L+M,add_nonneg hL hM,?_⟩ + intro t ht x + simpa only [norm_iteratedFDeriv_zero] using add_le_add (hl t ht x) (hm t ht x) + · exact hv U hU hUH s hs.classical hP + +lemma ClassicalBefore.mono {d : Datum} {s : Solution} {T U : ℝ} + (hs : ClassicalBefore d s U) (hTU : T≤U) : ClassicalBefore d s T := by + rcases hs with ⟨hf,hE,hB,hn,hEL,hBL,hc,heq,hf₀,hE₀,hB₀⟩ + exact ⟨hf,hE,hB,hn,hEL,hBL,hc,fun t ht h => heq t ht (h.trans_le hTU),hf₀,hE₀,hB₀⟩ + +lemma log_one_add_mul_exp_le {C A I : ℝ} (hC : 0≤C) (hA : 0≤A) (hI : 0≤I) : + Real.log (1+C*(A*Real.exp I))≤Real.log (1+C*A)+I := by + have hCA : 0≤C*A := mul_nonneg hC hA + have hpos : 0<1+C*A := by linarith + have he : 1≤Real.exp I := Real.one_le_exp hI + have hh : 1+C*(A*Real.exp I)≤(1+C*A)*Real.exp I := by nlinarith + apply (Real.log_le_log (by positivity) hh).trans_eq + rw [Real.log_mul hpos.ne' (Real.exp_ne_zero _),Real.log_exp] + +lemma integral_lorentz_coefficient_bound {g : ℝ → ℝ} {L T : ℝ} + (hg : Continuous g) (hL : 0≤L) (hT : 0≤T) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) : + 0≤(∫ r in 0..T,1+2*g r+L) ∧ + (∫ r in 0..T,1+2*g r+L)≤(3+L)*(∫ r in Icc (0:ℝ) T,1+g r) := by + have hc : Continuous (fun r => 1+2*g r+L) := by fun_prop + constructor + · apply intervalIntegral.integral_nonneg hT + intro r hr + linarith [hg0 r hr] + · rw [integral_Icc_eq_integral_Ioc,←intervalIntegral.integral_of_le hT,←intervalIntegral.integral_const_mul] + apply intervalIntegral.integral_mono_on hT (hc.intervalIntegrable 0 T) + ((continuous_const.mul (continuous_const.add hg)).intervalIntegrable 0 T) + intro r hr + change 1+2*g r+L≤(3+L)*(1+g r) + nlinarith [hg0 r hr,mul_nonneg hL (hg0 r hr)] + +lemma classical_electric_log_closed_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hM : 0≤M) (hH : 0≤H) : + ∃ B K : ℝ, 0≤B ∧ 0≤K ∧ + ∀ (s : Solution) (U t : ℝ) (x : Vec) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.E (t,x+q • e) i) 0|≤B+K*(∫ u in Icc (0:ℝ) U,1+g u) := by + obtain ⟨B,C,D,K,hB,hC,hD,hK,hv⟩ := classical_electric_gradient_volterra_bound hd P A M H e i hA hH + obtain ⟨A₀,hA₀,hLip⟩ := admissible_particle_lipschitz hd + refine ⟨B+D*Real.log (1+C*A₀),D*(3+M)+K,?_,by positivity,?_⟩ + · exact add_nonneg hB (mul_nonneg hD (Real.log_nonneg (by nlinarith [mul_nonneg hC hA₀]))) + intro s U t x g hs hm ht htU hUH hg hg0 hfA hP hEB hDF hEx + have hU : 0≤U := ht.le.trans htU.le + let N := A₀*Real.exp (∫ r in 0..U,1+2*g r+M) + have hN : 0≤N := mul_nonneg hA₀ (Real.exp_pos _).le + have hfN := particle_gradient_volterra_before hs hU le_rfl hA₀ hM hLip hg.continuousOn hg0 + (fun u hu y => (hEB u hu y).2) (fun u hu y z => (hEx u hu z y).1) (fun u hu y z => (hEx u hu z y).2) + have hh := hv s U t N x g hs hm ht htU hUH hN hg hg0 hfA hP hEB hDF hfN + have hi := integral_lorentz_coefficient_bound hg hM hU hg0 + have hlog := log_one_add_mul_exp_le hC hA₀ hi.1 + have hi' : (∫ u in Icc (0:ℝ) t,1+g u)≤∫ u in Icc (0:ℝ) U,1+g u := by + rw [integral_Icc_eq_integral_Ioc,integral_Icc_eq_integral_Ioc, + ←intervalIntegral.integral_of_le ht.le,←intervalIntegral.integral_of_le hU] + apply intervalIntegral.integral_mono_interval le_rfl ht.le htU.le _ + ((continuous_const.add hg).intervalIntegrable 0 U) + filter_upwards [ae_restrict_mem measurableSet_Ioc] with u hu + change 0≤1+g u + linarith [hg0 u ⟨hu.1.le,hu.2⟩] + change |deriv (fun q : ℝ => s.E (t,x+q • e) i) 0|≤B+D*Real.log (1+C*A₀)+(D*(3+M)+K)*(∫ u in Icc (0:ℝ) U,1+g u) + dsimp [N] at hh + nlinarith [mul_le_mul_of_nonneg_left hlog hD,mul_le_mul_of_nonneg_left hi.2 hD, + mul_le_mul_of_nonneg_left hi' hK] + +lemma classical_magnetic_log_closed_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hM : 0≤M) (hH : 0≤H) : + ∃ B K : ℝ, 0≤B ∧ 0≤K ∧ + ∀ (s : Solution) (U t : ℝ) (x : Vec) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.B (t,x+q • e) i) 0|≤B+K*(∫ u in Icc (0:ℝ) U,1+g u) := by + obtain ⟨B,C,D,K,hB,hC,hD,hK,hv⟩ := Magnetic.classical_magnetic_gradient_volterra_bound hd P A M H e i hA hH + obtain ⟨A₀,hA₀,hLip⟩ := admissible_particle_lipschitz hd + refine ⟨B+D*Real.log (1+C*A₀),D*(3+M)+K,?_,by positivity,?_⟩ + · exact add_nonneg hB (mul_nonneg hD (Real.log_nonneg (by nlinarith [mul_nonneg hC hA₀]))) + intro s U t x g hs hm ht htU hUH hg hg0 hfA hP hEB hDF hEx + have hU : 0≤U := ht.le.trans htU.le + let N := A₀*Real.exp (∫ r in 0..U,1+2*g r+M) + have hN : 0≤N := mul_nonneg hA₀ (Real.exp_pos _).le + have hfN := particle_gradient_volterra_before hs hU le_rfl hA₀ hM hLip hg.continuousOn hg0 + (fun u hu y => (hEB u hu y).2) (fun u hu y z => (hEx u hu z y).1) (fun u hu y z => (hEx u hu z y).2) + have hh := hv s U t N x g hs hm ht htU hUH hN hg hg0 hfA hP hEB hDF hfN + have hi := integral_lorentz_coefficient_bound hg hM hU hg0 + have hlog := log_one_add_mul_exp_le hC hA₀ hi.1 + have hi' : (∫ u in Icc (0:ℝ) t,1+g u)≤∫ u in Icc (0:ℝ) U,1+g u := by + rw [integral_Icc_eq_integral_Ioc,integral_Icc_eq_integral_Ioc, + ←intervalIntegral.integral_of_le ht.le,←intervalIntegral.integral_of_le hU] + apply intervalIntegral.integral_mono_interval le_rfl ht.le htU.le _ + ((continuous_const.add hg).intervalIntegrable 0 U) + filter_upwards [ae_restrict_mem measurableSet_Ioc] with u hu + change 0≤1+g u + linarith [hg0 u ⟨hu.1.le,hu.2⟩] + change |deriv (fun q : ℝ => s.B (t,x+q • e) i) 0|≤B+D*Real.log (1+C*A₀)+(D*(3+M)+K)*(∫ u in Icc (0:ℝ) U,1+g u) + dsimp [N] at hh + nlinarith [mul_le_mul_of_nonneg_left hlog hD,mul_le_mul_of_nonneg_left hi.2 hD, + mul_le_mul_of_nonneg_left hi' hK] + +lemma classical_fields_gradient_current_volterra {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hM : 0≤M) (hH : 0≤H) : + ∃ B K : ℝ, 0≤B ∧ 0≤K ∧ + ∀ (s : Solution) (U t : ℝ) (x : Vec) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.E (t,x+q • e) i) 0|+ + |deriv (fun q : ℝ => s.B (t,x+q • e) i) 0|≤B+K*(∫ u in Icc (0:ℝ) t,1+g u) := by + obtain ⟨B,K,hB,hK,hE⟩ := classical_electric_log_closed_bound hd P A M H e i hA hM hH + obtain ⟨D,L,hD,hL,hB'⟩ := classical_magnetic_log_closed_bound hd P A M H e i hA hM hH + refine ⟨B+D,K+L,add_nonneg hB hD,add_nonneg hK hL,?_⟩ + intro s U t x g hs hm ht htU hUH hg hg0 hfA hP hEB hDF hEx + have hin : ∀ V∈Ioo t U, + |deriv (fun q : ℝ => s.E (t,x+q • e) i) 0|+ + |deriv (fun q : ℝ => s.B (t,x+q • e) i) 0|≤(B+D)+(K+L)*(∫ u in Icc (0:ℝ) V,1+g u) := by + intro V hV + have hsub : Icc (0:ℝ) V ⊆ Icc (0:ℝ) U := fun u hu => ⟨hu.1,hu.2.trans hV.2.le⟩ + have he := hE s V t x g (hs.mono hV.2.le) hm ht hV.1 (hV.2.le.trans hUH) hg + (fun u hu => hg0 u (hsub hu)) (fun u hu => hfA u (hsub hu)) (fun u hu => hP u (hsub hu)) + (fun u hu => hEB u (hsub hu)) (fun u hu => hDF u ⟨hu.1,hu.2.trans hV.2.le⟩) + (fun u hu => hEx u (hsub hu)) + have hb := hB' s V t x g (hs.mono hV.2.le) hm ht hV.1 (hV.2.le.trans hUH) hg + (fun u hu => hg0 u (hsub hu)) (fun u hu => hfA u (hsub hu)) (fun u hu => hP u (hsub hu)) + (fun u hu => hEB u (hsub hu)) (fun u hu => hDF u ⟨hu.1,hu.2.trans hV.2.le⟩) + (fun u hu => hEx u (hsub hu)) + linarith + have hc : ContinuousOn (fun V => (B+D)+(K+L)*(∫ u in Icc (0:ℝ) V,1+g u)) (Icc (0:ℝ) U) := + continuousOn_const.add (continuousOn_const.mul (intervalIntegral.continuousOn_primitive_Icc + ((continuous_const.add hg).continuousOn.integrableOn_compact isCompact_Icc))) + apply le_on_closure hin continuousOn_const + · rw [_root_.closure_Ioo htU.ne] + exact hc.mono (fun V hV => ⟨ht.le.trans hV.1,hV.2⟩) + · simp only [_root_.closure_Ioo htU.ne,mem_Icc,le_refl,htU.le,and_self] + +lemma component_le_double_sum {F : Fin 3 → Fin 3 → ℝ} (hF : ∀ i j,0≤F i j) (i j : Fin 3) : + F i j≤∑ i : Fin 3, ∑ j : Fin 3,F i j := by + exact (Finset.single_le_sum (fun k _ => hF i k) (Finset.mem_univ j)).trans + (Finset.single_le_sum (fun k _ => Finset.sum_nonneg (fun l _ => hF k l)) (Finset.mem_univ i)) + +lemma prefix_spatial_gradient_volterra {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (hA : 0≤A) (hM : 0≤M) (hH : 0≤H) : + ∃ B K : ℝ, 0≤B ∧ 0≤K ∧ + ∀ (s : Solution) (U : ℝ), BoundedClassicalPrefix d s U → 0 s.E (u,z)) y‖+‖fderiv ℝ (fun z => s.B (u,z)) y‖≤g u) → + ∀ t∈Icc (0:ℝ) U, ∀ x, + ‖fderiv ℝ (fun z => s.E (t,z)) x‖+‖fderiv ℝ (fun z => s.B (t,z)) x‖≤ + B+K*(∫ u in Icc (0:ℝ) t,1+g u) := by + choose B K hB hK hb using fun i j : Fin 3 => + classical_fields_gradient_current_volterra hd P A M H (basis j) i hA hM hH + let D := ∑ i : Fin 3,∑ j : Fin 3,B i j + let L := ∑ i : Fin 3,∑ j : Fin 3,K i j + let J := A*(volume (closedBall (0:Vec) P)).toReal + have hD : 0≤D := Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hB i j)) + have hL : 0≤L := Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hK i j)) + have hJ : 0≤J := by dsimp [J]; positivity + refine ⟨18*D,18*L*(8+J),by positivity,by positivity,?_⟩ + intro s U hs hU hUH hfA hP hEB g hg hgb + have hg0 : ∀ u∈Icc (0:ℝ) U,0≤g u := fun u hu => + (add_nonneg (norm_nonneg _) (norm_nonneg _)).trans (hgb u hu 0) + let G : ℝ → ℝ := fun u => 7*g u+J + have hG : Continuous G := by dsimp [G]; fun_prop + have hG0 : ∀ u∈Icc (0:ℝ) U,0≤G u := fun u hu => by dsimp [G]; positivity [hg0 u hu] + have hgG : ∀ u∈Icc (0:ℝ) U,g u≤G u := fun u hu => by dsimp [G]; nlinarith [hg0 u hu] + have hinterior : ∀ t∈Ioo (0:ℝ) U, ∀ x, + ‖fderiv ℝ (fun z => s.E (t,z)) x‖+‖fderiv ℝ (fun z => s.B (t,z)) x‖≤ + 18*D+18*L*(8+J)*(∫ u in Icc (0:ℝ) t,1+g u) := by + intro t ht x + obtain ⟨τ,htτ,hτU⟩ := exists_between ht.2 + obtain ⟨V,htV,hVτ⟩ := exists_between htτ + let a := cutoffPrefix τ U s + have heq (u : ℝ) (hu : u≤τ) := cutoffPrefix_eq hτU hu s + have ha := hs.classical.cutoff_classical_before (ht.1.le.trans htτ.le) hτU + have hsub : Icc (0:ℝ) V ⊆ Icc (0:ℝ) U := fun u hu => ⟨hu.1,hu.2.trans (hVτ.le.trans hτU.le)⟩ + have hfunE (u : ℝ) (hu : u≤τ) : (fun z => a.E (u,z))=(fun z => s.E (u,z)) := funext (heq u hu).2.1 + have hfunB (u : ℝ) (hu : u≤τ) : (fun z => a.B (u,z))=(fun z => s.B (u,z)) := funext (heq u hu).2.2 + have hab : ∀ u∈Icc (0:ℝ) V,∀ y, + ‖fderiv ℝ (fun z => a.E (u,z)) y‖+‖fderiv ℝ (fun z => a.B (u,z)) y‖≤g u := by + intro u hu y + rw [hfunE u (hu.2.trans hVτ.le),hfunB u (hu.2.trans hVτ.le)] + exact hgb u (hsub hu) y + have haA : ∀ u∈Icc (0:ℝ) V,∀ y v,|a.f (u,y,v)|≤A := by + intro u hu y v + rw [(heq u (hu.2.trans hVτ.le)).1] + exact hfA u (hsub hu) y v + have haP : ∀ u∈Icc (0:ℝ) V,∀ y v,P<‖v‖ → a.f (u,y,v)=0 := by + intro u hu y v hv + rw [(heq u (hu.2.trans hVτ.le)).1] + exact hP u (hsub hu) y v hv + have haEB : ∀ u∈Icc (0:ℝ) V,∀ y,‖a.E (u,y)‖≤M ∧ ‖a.B (u,y)‖≤M := by + intro u hu y + rw [(heq u (hu.2.trans hVτ.le)).2.1,(heq u (hu.2.trans hVτ.le)).2.2] + exact hEB u (hsub hu) y + have haDF : ∀ u∈Ioc (0:ℝ) V,∀ y,‖fderiv ℝ a.E (u,y)‖≤G u ∧ ‖fderiv ℝ a.B (u,y)‖≤G u := by + intro u hu y + exact maxwell_full_derivative_bound ha.2.1 ha.2.2.1 ha.2.2.2.2.2.2.2.1 hu.1 (hu.2.trans_lt hVτ) + hA (haA u ⟨hu.1.le,hu.2⟩) (haP u ⟨hu.1.le,hu.2⟩) (hab u ⟨hu.1.le,hu.2⟩) y + have haLip : ∀ u∈Icc (0:ℝ) V,∀ y z,‖a.E (u,y)-a.E (u,z)‖≤G u*‖y-z‖ ∧ + ‖a.B (u,y)-a.B (u,z)‖≤G u*‖y-z‖ := by + intro u hu y z + simp only [a,(heq u (hu.2.trans hVτ.le)).2.1,(heq u (hu.2.trans hVτ.le)).2.2] + constructor + · apply spatial_field_lipschitz_of_gradient ((hs.E_jets.1.1 u (hsub hu)).differentiable (by simp)) + intro w + exact (le_add_of_nonneg_right (norm_nonneg _)).trans ((hgb u (hsub hu) w).trans (hgG u (hsub hu))) + · apply spatial_field_lipschitz_of_gradient ((hs.B_jets.1.1 u (hsub hu)).differentiable (by simp)) + intro w + exact (le_add_of_nonneg_left (norm_nonneg _)).trans ((hgb u (hsub hu) w).trans (hgG u (hsub hu))) + let I := ∫ u in Icc (0:ℝ) t,1+G u + have hI : 0≤I := by + apply setIntegral_nonneg measurableSet_Icc + intro u hu + linarith [hG0 u ⟨hu.1,hu.2.trans ht.2.le⟩] + have hcomp (i j : Fin 3) : + |fderiv ℝ (fun z => s.E (t,z)) x (basis j) i|+ + |fderiv ℝ (fun z => s.B (t,z)) x (basis j) i|≤D+L*I := by + have hh := hb i j a V t x G (ha.mono hVτ.le) (hs.classical.cutoff_smooth hτU) ht.1 htV + (hVτ.le.trans (hτU.le.trans hUH)) hG (fun u hu => hG0 u (hsub hu)) haA haP haEB haDF haLip + simp only [a,(heq t htτ.le).2.1,(heq t htτ.le).2.2] at hh + rw [(hasDerivAt_vec_component_line i ((hs.E_jets.1.1 t ⟨ht.1.le,ht.2.le⟩).differentiable (by simp)).differentiableAt).deriv, + (hasDerivAt_vec_component_line i ((hs.B_jets.1.1 t ⟨ht.1.le,ht.2.le⟩).differentiable (by simp)).differentiableAt).deriv] at hh + exact hh.trans (add_le_add (component_le_double_sum hB i j) + (mul_le_mul_of_nonneg_right (component_le_double_sum hK i j) hI)) + have hC : 0≤D+L*I := by positivity + have hEn := norm_clm_le_nine_components (fderiv ℝ (fun z => s.E (t,z)) x) hC + (fun i j => (le_add_of_nonneg_right (abs_nonneg _)).trans (hcomp i j)) + have hBn := norm_clm_le_nine_components (fderiv ℝ (fun z => s.B (t,z)) x) hC + (fun i j => (le_add_of_nonneg_left (abs_nonneg _)).trans (hcomp i j)) + have hi : I≤(8+J)*(∫ u in Icc (0:ℝ) t,1+g u) := by + rw [←integral_const_mul] + apply setIntegral_mono_on _ _ measurableSet_Icc + · intro u hu + change 1+(7*g u+J)≤(8+J)*(1+g u) + nlinarith [hg0 u ⟨hu.1,hu.2.trans ht.2.le⟩,mul_nonneg hJ (hg0 u ⟨hu.1,hu.2.trans ht.2.le⟩)] + all_goals + apply ContinuousOn.integrableOn_compact isCompact_Icc + fun_prop + nlinarith [mul_le_mul_of_nonneg_left hi hL] + intro t ht x + have hEc : ContinuousOn (fun r => ‖fderiv ℝ (fun z => s.E (r,z)) x‖) (Icc (0:ℝ) U) := by + simpa only [Function.comp_def,id_eq,norm_iteratedFDeriv_one] using ((hs.E_jets.1.2 1).comp + ((continuous_id.prodMk (continuous_const (y:=x))).continuousOn (s:=Icc (0:ℝ) U)) (fun r hr => hr)).norm + have hBc : ContinuousOn (fun r => ‖fderiv ℝ (fun z => s.B (r,z)) x‖) (Icc (0:ℝ) U) := by + simpa only [Function.comp_def,id_eq,norm_iteratedFDeriv_one] using ((hs.B_jets.1.2 1).comp + ((continuous_id.prodMk (continuous_const (y:=x))).continuousOn (s:=Icc (0:ℝ) U)) (fun r hr => hr)).norm + have hgc : ContinuousOn (fun r => 18*D+18*L*(8+J)*(∫ u in Icc (0:ℝ) r,1+g u)) (Icc (0:ℝ) U) := + continuousOn_const.add (continuousOn_const.mul (intervalIntegral.continuousOn_primitive_Icc + ((continuous_const.add hg).continuousOn.integrableOn_compact isCompact_Icc))) + apply le_on_closure (fun r hr => hinterior r hr x) + · rw [_root_.closure_Ioo hU.ne] + intro r hr + exact (hEc r hr).add (hBc r hr) + · simpa only [_root_.closure_Ioo hU.ne] using hgc + · simpa only [_root_.closure_Ioo hU.ne] using ht + +lemma bounded_momentum_field_gradient_bound {d : Datum} (hd : Admissible d) (P H : ℝ) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (U : ℝ), 0 s.E (t,z)) x‖+‖fderiv ℝ (fun z => s.B (t,z)) x‖≤C := by + obtain ⟨M,hM,hMb⟩ := bounded_momentum_field_bound hd P H hH + obtain ⟨A,hA⟩ := hd.1.continuous.bounded_above_of_compact_support hd.2.1 + obtain ⟨B,K,hB,hK,hv⟩ := prefix_spatial_gradient_volterra hd P (max A 0) M H (le_max_right _ _) hM hH + obtain ⟨C,hC,hb⟩ := volterra_uniform_bound (α:=Vec) B K H hB hK + refine ⟨C,hC,?_⟩ + intro U hU hUH s hs hP + apply hb U hUH (fun t x => ‖fderiv ℝ (fun z => s.E (t,z)) x‖+‖fderiv ℝ (fun z => s.B (t,z)) x‖) + · obtain ⟨L,hL,hl⟩ := hs.E_jets.2 1 + obtain ⟨N,hN,hn⟩ := hs.B_jets.2 1 + refine ⟨L+N,add_nonneg hL hN,?_⟩ + intro t ht x + simpa only [norm_iteratedFDeriv_one] using add_le_add (hl t ht x) (hn t ht x) + · apply hv s U hs hU hUH + · intro t ht x v + exact hs.classical.particle_bound_datum (A:=max A 0) hU + (fun z => by simpa only [Real.norm_eq_abs] using (hA z).trans (le_max_left A 0)) t ht (x,v) + · exact hP + · intro t ht x + have hh := hMb U hU hUH s hs hP t ht x + exact ⟨(le_add_of_nonneg_right (norm_nonneg _)).trans hh,(le_add_of_nonneg_left (norm_nonneg _)).trans hh⟩ + +lemma bounded_momentum_particle_lipschitz_bound {d : Datum} (hd : Admissible d) (P H : ℝ) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (U : ℝ), 0 ⟨hu.1,hu.2.trans hr.2.le⟩ + have hcfE (u : ℝ) (hu : u≤τ) : (fun y => a.E (u,y))=(fun y => s.E (u,y)) := funext (he u hu).2.1 + have hcfB (u : ℝ) (hu : u≤τ) : (fun y => a.B (u,y))=(fun y => s.B (u,y)) := funext (he u hu).2.2 + have hBb : ∀ u∈Icc (0:ℝ) r,∀ y,‖a.B (u,y)‖≤M := by + intro u hu y + rw [(he u (hu.2.trans hrτ.le)).2.2] + exact (le_add_of_nonneg_left (norm_nonneg _)).trans (hMb U hU hUH s hs hP u (hsub hu) y) + have hEx : ∀ u∈Icc (0:ℝ) r,∀ y x,‖a.E (u,x)-a.E (u,y)‖≤D*‖x-y‖ := by + intro u hu y x + simp only [a,(he u (hu.2.trans hrτ.le)).2.1] + apply spatial_field_lipschitz_of_gradient ((hs.E_jets.1.1 u (hsub hu)).differentiable (by simp)) + intro v + exact (le_add_of_nonneg_right (norm_nonneg _)).trans (hDb U hU hUH s hs hP u (hsub hu) v) + have hBx : ∀ u∈Icc (0:ℝ) r,∀ y x,‖a.B (u,x)-a.B (u,y)‖≤D*‖x-y‖ := by + intro u hu y x + simp only [a,(he u (hu.2.trans hrτ.le)).2.2] + apply spatial_field_lipschitz_of_gradient ((hs.B_jets.1.1 u (hsub hu)).differentiable (by simp)) + intro v + exact (le_add_of_nonneg_left (norm_nonneg _)).trans (hDb U hU hUH s hs hP u (hsub hu) v) + have hh := particle_lipschitz_volterra_before (g:=fun _ => D) ha hr.1.le hrτ.le hA hM hAb + continuousOn_const (fun _ _ => hD) hBb hEx hBx z w + simp only [(he r hrτ.le).1,intervalIntegral.integral_const,sub_zero,smul_eq_mul] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (Real.exp_le_exp.mpr (by nlinarith [hr.2.le.trans hUH])) hA) (norm_nonneg _)) + have hfc (z : Phase) : ContinuousOn (fun r => s.f (r,z)) (Icc (0:ℝ) U) := + hs.classical.f_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr) + apply le_on_closure hind + · rw [_root_.closure_Ioo hU.ne] + intro r hr + exact ((hfc z r hr).sub (hfc w r hr)).abs + · exact continuousOn_const + · simpa only [_root_.closure_Ioo hU.ne] using ht + +lemma bounded_momentum_particle_gradient_bound {d : Datum} (hd : Admissible d) (P H : ℝ) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (U : ℝ), 0 s.f (t,w)) z‖≤C := by + obtain ⟨C,hC,hb⟩ := bounded_momentum_particle_lipschitz_bound hd P H hH + refine ⟨C,hC,?_⟩ + intro U hU hUH s hs hP t ht z + have hLip : LipschitzWith ⟨C,hC⟩ (fun w => s.f (t,w)) := by + apply LipschitzWith.of_dist_le_mul + intro x y + change dist (s.f (t,x)) (s.f (t,y))≤C*dist x y + simpa only [dist_eq_norm,Real.norm_eq_abs] using hb U hU hUH s hs hP t ht x y + exact norm_fderiv_le_of_lipschitz ℝ hLip + +def secondJetSum (s : Solution) (t : ℝ) (z : Phase) : ℝ := + ‖iteratedFDeriv ℝ 2 (fun w => s.f (t,w)) z‖+ + ‖iteratedFDeriv ℝ 2 (fun y => s.E (t,y)) z.1‖+ + ‖iteratedFDeriv ℝ 2 (fun y => s.B (t,y)) z.1‖ + +lemma secondJetSum_nonneg (s : Solution) (t : ℝ) (z : Phase) : 0 ≤ secondJetSum s t z := by + dsimp [secondJetSum]; positivity + +lemma prefix_second_jet_volterra {d : Datum} (hd : Admissible d) + (P A L M N H : ℝ) (hL : 0≤L) (hM : 0≤M) (hN : 0≤N) (hH : 0≤H) : + ∃ D K : ℝ,0≤D ∧ 0≤K ∧ ∀ (s : Solution) (U : ℝ), + BoundedClassicalPrefix d s U → 0 (secondJetSum_nonneg s u 0).trans (hgb u hu 0) + have hf2 (u : ℝ) (hu : u∈Icc (0:ℝ) U) (z : Phase) : + ‖iteratedFDeriv ℝ 2 (fun w => s.f (u,w)) z‖≤g u := by + have hh := hgb u hu z + dsimp [secondJetSum] at hh + linarith [norm_nonneg (iteratedFDeriv ℝ 2 (fun y => s.E (u,y)) z.1), + norm_nonneg (iteratedFDeriv ℝ 2 (fun y => s.B (u,y)) z.1)] + have hE2 (u : ℝ) (hu : u∈Icc (0:ℝ) U) (x : Vec) : + ‖iteratedFDeriv ℝ 2 (fun y => s.E (u,y)) x‖≤g u := by + have hh := hgb u hu (x,0) + dsimp [secondJetSum] at hh + linarith [norm_nonneg (iteratedFDeriv ℝ 2 (fun w => s.f (u,w)) (x,0)), + norm_nonneg (iteratedFDeriv ℝ 2 (fun y => s.B (u,y)) x)] + have hB2 (u : ℝ) (hu : u∈Icc (0:ℝ) U) (x : Vec) : + ‖iteratedFDeriv ℝ 2 (fun y => s.B (u,y)) x‖≤g u := by + have hh := hgb u hu (x,0) + dsimp [secondJetSum] at hh + linarith [norm_nonneg (iteratedFDeriv ℝ 2 (fun w => s.f (u,w)) (x,0)), + norm_nonneg (iteratedFDeriv ℝ 2 (fun y => s.E (u,y)) x)] + have hinterior : ∀ t∈Ioo (0:ℝ) U,∀ z, + secondJetSum s t z≤(6*Bf+12*D)+(6*Kf+24*K)*(∫ r in Icc (0:ℝ) t,1+g r) := by + intro t ht z + obtain ⟨τ,htτ,hτU⟩ := exists_between ht.2 + let a := cutoffPrefix τ U s + have heq (u : ℝ) (hu : u≤τ) := cutoffPrefix_eq hτU hu s + have ha := hs.classical.cutoff_classical_before (ht.1.le.trans htτ.le) hτU + have hsub : Icc (0:ℝ) τ ⊆ Icc (0:ℝ) U := fun u hu => ⟨hu.1,hu.2.trans hτU.le⟩ + have hsf (u : ℝ) (hu : u≤τ) : (fun w : Phase => a.f (u,w))=(fun w => s.f (u,w)) := + funext (fun w => (heq u hu).1 w) + have hsE (u : ℝ) (hu : u≤τ) : (fun y => a.E (u,y))=(fun y => s.E (u,y)) := funext (heq u hu).2.1 + have hsB (u : ℝ) (hu : u≤τ) : (fun y => a.B (u,y))=(fun y => s.B (u,y)) := funext (heq u hu).2.2 + have hafc : ∀ u∈Icc (0:ℝ) τ,CurvatureBound (fun w : Phase => a.f (u,w)) (2*g u) := by + intro u hu + rw [hsf u hu.2] + exact curvature_of_second_derivative_bound (hs.f_jets.1.1 u (hsub hu)) (hg0 u (hsub hu)) (hf2 u (hsub hu)) + have haEc : ∀ u∈Icc (0:ℝ) τ,CurvatureBound (fun y => a.E (u,y)) (2*g u) := by + intro u hu + rw [hsE u hu.2] + exact curvature_of_second_derivative_bound (hs.E_jets.1.1 u (hsub hu)) (hg0 u (hsub hu)) (hE2 u (hsub hu)) + have haBc : ∀ u∈Icc (0:ℝ) τ,CurvatureBound (fun y => a.B (u,y)) (2*g u) := by + intro u hu + rw [hsB u hu.2] + exact curvature_of_second_derivative_bound (hs.B_jets.1.1 u (hsub hu)) (hg0 u (hsub hu)) (hB2 u (hsub hu)) + have haEB : ∀ u∈Icc (0:ℝ) τ,∀ y,‖a.E (u,y)‖≤L ∧ ‖a.B (u,y)‖≤L := by + intro u hu y + simp only [a,(heq u hu.2).2.1,(heq u hu.2).2.2] + exact hEB u (hsub hu) y + have haL : SpatialFieldLip τ N a.E a.B := by + intro u hu x y + simp only [a,(heq u hu.2).2.1,(heq u hu.2).2.2] + exact hEBL u (hsub hu) x y + have haA : ∀ u∈Icc (0:ℝ) τ,∀ y v,|a.f (u,y,v)|≤A := by + intro u hu y v + rw [(heq u hu.2).1] + exact hfA u (hsub hu) y v + have haP : ∀ u∈Icc (0:ℝ) τ,∀ y v,P<‖v‖ → a.f (u,y,v)=0 := by + intro u hu y v hv + rw [(heq u hu.2).1] + exact hP u (hsub hu) y v hv + have haLf : ∀ u∈Icc (0:ℝ) τ,∀ v x y,|a.f (u,y,v)-a.f (u,x,v)|≤M*‖y-x‖ := by + intro u hu v x y + simp only [a,(heq u hu.2).1] + have hh := hfL u (hsub hu) (y,v) (x,v) + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,sub_self,norm_zero,max_eq_left (norm_nonneg (y-x))] using hh + have hg2 : Continuous (fun u => 2*g u) := continuous_const.mul hg + have hg20 : ∀ u∈Icc (0:ℝ) τ,0≤2*g u := fun u hu => by positivity [hg0 u (hsub hu)] + have hfields := hfield a τ t (fun u => 2*g u) ha (hs.classical.cutoff_smooth hτU) ht.1 htτ + (hτU.le.trans hUH) hg2 hg20 haA haP haEB + (fun u hu v => (hafc u hu).spatial_slice v) (fun u hu => ⟨haEc u hu,haBc u hu⟩) haLf haL + rw [hsE t htτ.le,hsB t htτ.le] at hfields + have hsubt : Icc (0:ℝ) t ⊆ Icc (0:ℝ) τ := fun u hu => ⟨hu.1,hu.2.trans htτ.le⟩ + have hpart := particle_curvature_volterra_before ha ht.1.le htτ.le hAf hDf hL hN hfl hfc + (hg2.continuousOn) (fun u hu => hg20 u (hsubt hu)) + (fun u hu y => (haEB u (hsubt hu) y).2) + (fun u hu x y => (haL u (hsubt hu) x y).1) (fun u hu x y => (haL u (hsubt hu) x y).2) + (fun u hu => haEc u (hsubt hu)) (fun u hu => haBc u (hsubt hu)) + rw [hsf t htτ.le] at hpart + let I := ∫ r in Icc (0:ℝ) t,1+g r + have hI : 0≤I := integral_nonneg_of_ae (by + filter_upwards [ae_restrict_mem measurableSet_Icc] with r hr + have := hg0 r ⟨hr.1,hr.2.trans ht.2.le⟩ + change 0≤1+g r; linarith) + have hInt2 : (∫ r in Icc (0:ℝ) t,1+2*g r)≤2*I := by + rw [←integral_const_mul] + apply setIntegral_mono_on _ _ measurableSet_Icc (fun r hr => by linarith) + all_goals + apply ContinuousOn.integrableOn_compact isCompact_Icc + fun_prop + have hIntP : (∫ r in 0..t,6+6*L+2*(2*g r)+2*N)≤(10+6*L+2*N)*I := by + rw [intervalIntegral.integral_of_le ht.1.le,←integral_Icc_eq_integral_Ioc,←integral_const_mul] + apply setIntegral_mono_on _ _ measurableSet_Icc + · intro r hr + have hg' := hg0 r ⟨hr.1,hr.2.trans ht.2.le⟩ + change 6+6*L+2*(2*g r)+2*N≤(10+6*L+2*N)*(1+g r) + nlinarith [mul_nonneg hL hg',mul_nonneg hN hg'] + all_goals + apply ContinuousOn.integrableOn_compact isCompact_Icc + fun_prop + have hQt : Real.exp ((1+2*N+L)*t)≤Q := Real.exp_le_exp.mpr + (mul_le_mul_of_nonneg_left (ht.2.le.trans hUH) (by positivity)) + have hpart' : CurvatureBound (fun w => s.f (t,w)) (Bf+Kf*I) := by + apply hpart.mono + have h0 : 0≤∫ r in 0..t,6+6*L+2*(2*g r)+2*N := by + apply intervalIntegral.integral_nonneg ht.1.le + intro r hr + have := hg0 r ⟨hr.1,hr.2.trans ht.2.le⟩ + positivity + dsimp [Bf,Kf] + apply add_le_add + · exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (Real.exp_pos _).le hQt 2) (by positivity) + · exact (mul_le_mul (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (Real.exp_pos _).le hQt 3) + (by positivity)) hIntP h0 (by positivity)).trans_eq (by ring) + have hfields' : CurvatureBound (fun y => s.E (t,y)) (D+K*(2*I)) ∧ + CurvatureBound (fun y => s.B (t,y)) (D+K*(2*I)) := ⟨hfields.1.mono (add_le_add le_rfl (mul_le_mul_of_nonneg_left hInt2 hK)), + hfields.2.mono (add_le_add le_rfl (mul_le_mul_of_nonneg_left hInt2 hK))⟩ + have hp := hpart'.second_derivative_bound (by positivity) ((hs.f_jets.1.1 t ⟨ht.1.le,ht.2.le⟩).differentiable (by simp)) z + have he := hfields'.1.second_derivative_bound (by positivity) ((hs.E_jets.1.1 t ⟨ht.1.le,ht.2.le⟩).differentiable (by simp)) z.1 + have hb := hfields'.2.second_derivative_bound (by positivity) ((hs.B_jets.1.1 t ⟨ht.1.le,ht.2.le⟩).differentiable (by simp)) z.1 + dsimp [secondJetSum] + nlinarith + intro t ht z + have hcont : ContinuousOn (fun r => secondJetSum s r z) (Icc (0:ℝ) U) := by + apply ContinuousOn.add + · apply ContinuousOn.add + · exact (((hs.f_jets.1.2 2).comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr))).norm + · exact (((hs.E_jets.1.2 2).comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr))).norm + · exact (((hs.B_jets.1.2 2).comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr))).norm + have hgc : ContinuousOn (fun r => (6*Bf+12*D)+(6*Kf+24*K)*(∫ u in Icc (0:ℝ) r,1+g u)) (Icc (0:ℝ) U) := + continuousOn_const.add (continuousOn_const.mul (intervalIntegral.continuousOn_primitive_Icc + ((continuous_const.add hg).continuousOn.integrableOn_compact isCompact_Icc))) + apply le_on_closure (fun r hr => hinterior r hr z) + · simpa only [_root_.closure_Ioo hU.ne] using hcont + · simpa only [_root_.closure_Ioo hU.ne] using hgc + · simpa only [_root_.closure_Ioo hU.ne] using ht + +lemma bounded_momentum_second_jet_bound {d : Datum} (hd : Admissible d) (P H : ℝ) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (U : ℝ), 0 add_le_add (add_le_add (hf t ht z) (hE t ht z.1)) (hB t ht z.1)⟩ + · apply hv s U hs hU hUH + · intro t ht x v + exact hs.classical.particle_bound_datum (A:=max A 0) hU + (fun z => by simpa only [Real.norm_eq_abs] using (hA z).trans (le_max_left A 0)) t ht (x,v) + · exact hP + · intro t ht x + have hh := hLb U hU hUH s hs hP t ht x + exact ⟨(le_add_of_nonneg_right (norm_nonneg _)).trans hh,(le_add_of_nonneg_left (norm_nonneg _)).trans hh⟩ + · exact hMb U hU hUH s hs hP + · intro t ht x y + constructor + · apply spatial_field_lipschitz_of_gradient ((hs.E_jets.1.1 t ht).differentiable (by simp)) + intro z + exact (le_add_of_nonneg_right (norm_nonneg _)).trans (hNb U hU hUH s hs hP t ht z) + · apply spatial_field_lipschitz_of_gradient ((hs.B_jets.1.1 t ht).differentiable (by simp)) + intro z + exact (le_add_of_nonneg_left (norm_nonneg _)).trans (hNb U hU hUH s hs hP t ht z) + +lemma family_datum_restart_control {ι : Type*} {d : ι → Datum} + (hd : ∀ j, Admissible (d j)) {A R P L J : ℝ} + (hA : 0≤A) (hL : 0≤L) (hJ : 0≤J) + (hf : ∀ j z, |(d j).f₀ z|≤A) + (hrp : ∀ j (z : Phase), (d j).f₀ z≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P) + (hl : ∀ j z w, |(d j).f₀ z-(d j).f₀ w|≤L*‖z-w‖) + (hEj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).E₀ x‖≤J) + (hBj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).B₀ x‖≤J) : + ∃ D D₁ : ℝ, 0≤D ∧ 0≤D₁ ∧ ∀ j, DatumRestartControl (d j) A R P D D₁ L := by + have hp (j : ι) (x v : Vec) (hv : P<‖v‖) : (d j).f₀ (x,v)=0 := by + by_contra hh + exact (not_le_of_gt hv) (hrp j (x,v) hh).2 + have hfl (j : ι) (x y v : Vec) : |(d j).f₀ (y,v)-(d j).f₀ (x,v)|≤L*‖y-x‖ := by + simpa only [Prod.mk_sub_mk,sub_self,Prod.norm_def,norm_zero,max_eq_left (norm_nonneg _)] using hl j (y,v) (x,v) + choose CE hCE hEe using family_electricConeBoundary_datum_bound_global hd hA hJ hf hp hEj hBj + choose CB hCB hBb using family_magneticConeBoundary_datum_bound_global hd hA hJ hf hp hEj hBj + choose LE hLE hEl using family_electricConeBoundary_datum_lipschitz hd hL hJ hp hfl hEj hBj + choose LB hLB hBl using family_magneticConeBoundary_datum_lipschitz hd hL hJ hp hfl hEj hBj + let S := ∑ i : Fin 3, (CE i+CB i) + let N := ∑ i : Fin 3, (LE i+LB i) + have hS : 0≤S := Finset.sum_nonneg fun i _ => add_nonneg (hCE i) (hCB i) + have hN : 0≤N := Finset.sum_nonneg fun i _ => add_nonneg (hLE i) (hLB i) + have hEC (i : Fin 3) : CE i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCB i] + have hBC (i : Fin 3) : CB i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCE i] + have hEL (i : Fin 3) : LE i≤N := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hLE j) (hLB j)) (Finset.mem_univ i) + dsimp [N]; linarith [hLB i] + have hBL (i : Fin 3) : LB i≤N := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hLE j) (hLB j)) (Finset.mem_univ i) + dsimp [N]; linarith [hLE i] + refine ⟨3*S+J,3*N+3*J,by positivity,by positivity,?_⟩ + intro j + refine ⟨hf j,hrp j,?_,?_,?_,?_,hl j⟩ + · intro x + have he : ‖(d j).E₀ x‖≤J := by simpa only [norm_iteratedFDeriv_zero] using hEj j 0 (by norm_num) x + have hb : ‖(d j).B₀ x‖≤J := by simpa only [norm_iteratedFDeriv_zero] using hBj j 0 (by norm_num) x + exact ⟨he.trans (by linarith),hb.trans (by linarith)⟩ + · intro t ht x + exact ⟨(norm_le_three_of_coordinate_bound hS (v:=electricBoundaryField (datumBoundarySolution (d j)) t x) + (fun i => (hEe i j t ht x).trans (hEC i))).trans (by linarith), + (norm_le_three_of_coordinate_bound hS (v:=magneticBoundaryField (datumBoundarySolution (d j)) t x) + (fun i => (hBb i j t ht x).trans (hBC i))).trans (by linarith)⟩ + · intro x y + have he := (spatial_lipschitz_of_low_jets (hd j).2.2.2.1.1 hJ (hEj j) x y).1 + have hb := (spatial_lipschitz_of_low_jets (hd j).2.2.2.2.1.1 hJ (hBj j) x y).1 + exact ⟨he.trans (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)), + hb.trans (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _))⟩ + · intro t ht x y + have he := norm_le_three_of_coordinate_bound (mul_nonneg hN (norm_nonneg (y-x))) + (v:=electricBoundaryField (datumBoundarySolution (d j)) t y-electricBoundaryField (datumBoundarySolution (d j)) t x) + (fun i => (hEl i j t ht x y).trans (mul_le_mul_of_nonneg_right (hEL i) (norm_nonneg _))) + have hb := norm_le_three_of_coordinate_bound (mul_nonneg hN (norm_nonneg (y-x))) + (v:=magneticBoundaryField (datumBoundarySolution (d j)) t y-magneticBoundaryField (datumBoundarySolution (d j)) t x) + (fun i => (hBl i j t ht x y).trans (mul_le_mul_of_nonneg_right (hBL i) (norm_nonneg _))) + constructor + · exact he.trans (by nlinarith [mul_nonneg hJ (norm_nonneg (y-x))]) + · exact hb.trans (by nlinarith [mul_nonneg hJ (norm_nonneg (y-x))]) + +theorem family_bounded_classical_prefix {ι : Type*} {d : ι → Datum} + (hd : ∀ j, Admissible (d j)) {A R P L J : ℝ} + (hA : 0≤A) (hR : 0≤R) (hP : 0≤P) (hL : 0≤L) (hJ : 0≤J) + (hf : ∀ j z, |(d j).f₀ z|≤A) + (hrp : ∀ j (z : Phase), (d j).f₀ z≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P) + (hl : ∀ j z w, |(d j).f₀ z-(d j).f₀ w|≤L*‖z-w‖) + (hEj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).E₀ x‖≤J) + (hBj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).B₀ x‖≤J) : + ∃ T : ℝ, 0 timeSliceDatum i.1.2 i.1.1 + have hi0 (i : I) : 0 < i.1.1 := i.2.1 + have hiH (i : I) : i.1.1≤H := i.2.2.1 + have hs (i : I) : BoundedClassicalPrefix d i.1.2 i.1.1 := i.2.2.2.1 + have hp (i : I) := i.2.2.2.2 + have hi (i : I) : i.1.1∈Icc (0:ℝ) i.1.1 := ⟨(hi0 i).le,le_rfl⟩ + have hdata (i : I) : Admissible (data i) := + (hs i).classical.slice_admissible (hs i).closed_equations (hs i).E_jets (hs i).B_jets (hi i) + have hf (i : I) (z : Phase) : |(data i).f₀ z|≤A := + (hs i).classical.particle_bound_datum (hi0 i) hfa _ (hi i) z + have hsupp (i : I) (z : Phase) (hz : (data i).f₀ z≠0) : ‖z.1‖≤R+H ∧ ‖z.2‖ ≤ max P 0 := by + constructor + · exact ((hs i).classical.spatial_support_datum (hi0 i) (fun z hz => (hrp z hz).1) _ (hi i) z hz).trans + (by linarith [hiH i]) + · apply (le_of_not_gt ?_).trans (le_max_left P 0) + intro hv + exact hz (hp i _ (hi i) z.1 z.2 hv) + have hLip (i : I) (z w : Phase) : |(data i).f₀ z-(data i).f₀ w|≤L*‖z-w‖ := + hfl _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) z w + let J := C₀+C₁+C₂ + have hJ : 0≤J := by dsimp [J]; positivity + have hEz (i : I) (x : Vec) : ‖(data i).E₀ x‖≤C₀ := + (le_add_of_nonneg_right (norm_nonneg _)).trans (hzero _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) x) + have hBz (i : I) (x : Vec) : ‖(data i).B₀ x‖≤C₀ := + (le_add_of_nonneg_left (norm_nonneg _)).trans (hzero _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) x) + have hEone (i : I) (x : Vec) : ‖fderiv ℝ (data i).E₀ x‖≤C₁ := + (le_add_of_nonneg_right (norm_nonneg _)).trans (hone _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) x) + have hBone (i : I) (x : Vec) : ‖fderiv ℝ (data i).B₀ x‖≤C₁ := + (le_add_of_nonneg_left (norm_nonneg _)).trans (hone _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) x) + have hEtwo (i : I) (x : Vec) : ‖iteratedFDeriv ℝ 2 (data i).E₀ x‖≤C₂ := by + have hh := htwo _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) (x,0) + dsimp [secondJetSum] at hh + change ‖iteratedFDeriv ℝ 2 (fun y => i.1.2.E (i.1.1,y)) x‖≤C₂ + linarith [norm_nonneg (iteratedFDeriv ℝ 2 (fun w => i.1.2.f (i.1.1,w)) (x,0)), + norm_nonneg (iteratedFDeriv ℝ 2 (fun y => i.1.2.B (i.1.1,y)) x)] + have hBtwo (i : I) (x : Vec) : ‖iteratedFDeriv ℝ 2 (data i).B₀ x‖≤C₂ := by + have hh := htwo _ (hi0 i) (hiH i) _ (hs i) (hp i) _ (hi i) (x,0) + dsimp [secondJetSum] at hh + change ‖iteratedFDeriv ℝ 2 (fun y => i.1.2.B (i.1.1,y)) x‖≤C₂ + linarith [norm_nonneg (iteratedFDeriv ℝ 2 (fun w => i.1.2.f (i.1.1,w)) (x,0)), + norm_nonneg (iteratedFDeriv ℝ 2 (fun y => i.1.2.E (i.1.1,y)) x)] + have hEj (i : I) (k : ℕ) (hk : k≤2) (x : Vec) : ‖iteratedFDeriv ℝ k (data i).E₀ x‖≤J := by + interval_cases k + · simpa only [norm_iteratedFDeriv_zero] using (hEz i x).trans (by dsimp [J]; linarith) + · simpa only [norm_iteratedFDeriv_one] using (hEone i x).trans (by dsimp [J]; linarith) + · exact (hEtwo i x).trans (by dsimp [J]; linarith) + have hBj (i : I) (k : ℕ) (hk : k≤2) (x : Vec) : ‖iteratedFDeriv ℝ k (data i).B₀ x‖≤J := by + interval_cases k + · simpa only [norm_iteratedFDeriv_zero] using (hBz i x).trans (by dsimp [J]; linarith) + · simpa only [norm_iteratedFDeriv_one] using (hBone i x).trans (by dsimp [J]; linarith) + · exact (hBtwo i x).trans (by dsimp [J]; linarith) + obtain ⟨δ,hδ,hfamily⟩ := family_bounded_classical_prefix hdata hA (add_nonneg hR hH) + (le_max_right P 0) hL hJ hf hsupp hLip hEj hBj + refine ⟨δ,hδ,?_⟩ + intro U hU hUH s hss hP + let i : I := ⟨(U,s),hU,hUH,hss,hP⟩ + obtain ⟨a,ha⟩ := hfamily i + refine ⟨pasteSolution U s a,hss.paste hU hδ ha,?_⟩ + intro t ht + exact ⟨congrFun (timePaste_left U s.f a.f ht.2),congrFun (timePaste_left U s.E a.E ht.2), + congrFun (timePaste_left U s.B a.B ht.2)⟩ + +theorem bounded_momentum_arbitrarily_long_prefix {d : Datum} (hd : Admissible d) + (H : ℝ) (hH : 0≤H) (P : ℝ) + (hP : ∀ U : ℝ, 0 exact ⟨T,hT,by simp; exact hT.le,s₀,hs₀⟩ + | succ n ih => + obtain ⟨U,hU,hnU,s,hs⟩ := ih + obtain ⟨a,ha,_⟩ := hext U hU (hup U s hs) s hs (hP U hU (hup U s hs) s hs) + refine ⟨U+δ,by linarith,?_,a,ha⟩ + push_cast + nlinarith + obtain ⟨n,hn⟩ := exists_nat_gt (H/δ) + obtain ⟨U,hU,hnum,s,hs⟩ := grow n + have hh : H<(n:ℝ)*δ := (div_lt_iff₀ hδ).mp hn + linarith [hup U s hs] + +lemma time_slab_mem_nhdsWithin {X : Type*} [TopologicalSpace X] + {p : ℝ × X} {H : ℝ} (hp : p.1 F (t,x))) : + TimeContinuousL2 F := by + choose G hG he using fun H : ℝ => hF (max H 0) (le_max_right H 0) + let g : ℝ → Lp Vec 2 (volume : Measure Vec) := fun t => G t t + have hself (t : ℝ) (ht : 0 ≤ t) : (g t : Vec → Vec) =ᵐ[volume] (fun x => F (t,x)) := + he t t ⟨ht,le_max_left t 0⟩ + have heq (H t : ℝ) (ht : t∈Icc (0:ℝ) H) : g t=G H t := by + apply Lp.ext + exact (hself t ht.1).trans (he H t ⟨ht.1,ht.2.trans (le_max_left H 0)⟩).symm + refine ⟨g,?_,hself⟩ + intro t ht + have hmem : Icc (0:ℝ) (max (t+1) 0) ∈ 𝓝[Ici 0] t := by + filter_upwards [self_mem_nhdsWithin, + mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (show t hpre (max H 0) (le_max_right H 0) + let s : Solution := ⟨fun p => (a p.1).f p,fun p => (a p.1).E p,fun p => (a p.1).B p⟩ + have heq (H t : ℝ) (ht : t∈Icc (0:ℝ) H) : + (∀ z, s.f (t,z)=(a H).f (t,z)) ∧ + (∀ x, s.E (t,x)=(a H).E (t,x)) ∧ (∀ x, s.B (t,x)=(a H).B (t,x)) := by + exact (ha t).unique (ha H) ht.1 ((le_max_left t 0).trans (hU t).le) + (ht.2.trans ((le_max_left H 0).trans (hU H).le)) + have hsm : SmoothOnFiniteHorizons s := by + intro T hT + have htU : T ≤ U T := (le_max_left T 0).trans (hU T).le + have hh := (ha T).mono htU + exact ⟨hh.f_smooth.congr (fun p hp => (heq T p.1 hp).1 p.2), + hh.E_smooth.congr (fun p hp => (heq T p.1 hp).2.1 p.2), + hh.B_smooth.congr (fun p hp => (heq T p.1 hp).2.2 p.2)⟩ + have hregf : ContDiffOn ℝ 1 s.f particleHalfSpace := + contDiffOn_halfspace_of_slabs (fun T ht => (hsm T ht).1.of_le (by simp)) + have hregE : ContDiffOn ℝ 1 s.E fieldHalfSpace := + contDiffOn_halfspace_of_slabs (fun T ht => (hsm T ht).2.1.of_le (by simp)) + have hregB : ContDiffOn ℝ 1 s.B fieldHalfSpace := + contDiffOn_halfspace_of_slabs (fun T ht => (hsm T ht).2.2.of_le (by simp)) + have hpos (t : ℝ) (ht : 0 ≤ t) (z : Phase) : 0 ≤ s.f (t,z) := + (ha t).nonnegative t ⟨ht,(le_max_left t 0).trans (hU t).le⟩ z + have hL2E : TimeContinuousL2 s.E := by + apply timeContinuousL2_of_slabs + intro H hH + obtain ⟨G,hG,hrep⟩ := (ha H).E_L2 + refine ⟨G,hG.mono (Icc_subset_Icc_right ((le_max_left H 0).trans (hU H).le)),?_⟩ + intro t ht + exact (hrep t ⟨ht.1,ht.2.trans ((le_max_left H 0).trans (hU H).le)⟩).trans + (Filter.Eventually.of_forall fun x => ((heq H t ht).2.1 x).symm) + have hL2B : TimeContinuousL2 s.B := by + apply timeContinuousL2_of_slabs + intro H hH + obtain ⟨G,hG,hrep⟩ := (ha H).B_L2 + refine ⟨G,hG.mono (Icc_subset_Icc_right ((le_max_left H 0).trans (hU H).le)),?_⟩ + intro t ht + exact (hrep t ⟨ht.1,ht.2.trans ((le_max_left H 0).trans (hU H).le)⟩).trans + (Filter.Eventually.of_forall fun x => ((heq H t ht).2.2 x).symm) + have hcompact : CompactOnFiniteHorizons s := by + intro H hH + obtain ⟨K,hK,hk⟩ := (ha H).compact + refine ⟨K,hK,?_⟩ + intro t ht + rw [show (fun z => s.f (t,z))=(fun z => (a H).f (t,z)) from funext (heq H t ht).1] + exact hk t ⟨ht.1,ht.2.trans ((le_max_left H 0).trans (hU H).le)⟩ + have hequations : Equations s := by + intro t ht + let H := t+1 + have htH : t ≤ H := by dsimp [H]; linarith + have htU : t s.f (r,z)) (Ici 0) t = + derivWithin (fun r => (a H).f (r,z)) (Ici 0) t := by + apply Filter.EventuallyEq.derivWithin_eq_of_mem (hx:=ht) + filter_upwards [self_mem_nhdsWithin, + mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (show t s.E (r,x)) (Ici 0) t = + derivWithin (fun r => (a H).E (r,x)) (Ici 0) t := by + apply Filter.EventuallyEq.derivWithin_eq_of_mem (hx:=ht) + filter_upwards [self_mem_nhdsWithin, + mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (show t s.B (r,x)) (Ici 0) t = + derivWithin (fun r => (a H).B (r,x)) (Ici 0) t := by + apply Filter.EventuallyEq.derivWithin_eq_of_mem (hx:=ht) + filter_upwards [self_mem_nhdsWithin, + mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (show t classical_unique hc hs'⟩ + +theorem global_classical_of_uniform_prefix_momentum {d : Datum} (hd : Admissible d) + (hMom : ∀ H : ℝ, 0 ≤ H → ∃ P : ℝ, ∀ U : ℝ, 0 (F.flow z t).2) (tsupport d.f₀) U M A P₀) : + ∃ s : Solution, Classical d s ∧ SmoothOnFiniteHorizons s ∧ + ∀ s' : Solution, Classical d s' → SameNonnegativeTime s s' := by + classical + apply global_classical_of_uniform_prefix_momentum hd + intro H hH + obtain ⟨M,A,P₀,hM,hA,hinc⟩ := hproducer H hH + let ι := {p : ℝ × Solution // 0 < p.1 ∧ p.1 ≤ H ∧ BoundedClassicalPrefix d p.2 p.1} + let F (i : ι) : PhaseFlowOn i.val.2.E i.val.2.B i.val.1 := + Classical.choice (i.property.2.2.classical.exists_phaseFlowOn i.property.1) + obtain ⟨P,hP⟩ := hd.uniform_physical_support_of_increment + (ι:=ι) (s:=fun i => i.val.2) (T:=fun i => i.val.1) (H:=H) + (fun i => i.property.1) (fun i => i.property.2.1) F + (fun i => i.property.2.2.classical.energyPrefix) + (fun i => i.property.2.2.classical.initial_f) + hM hA (fun i => hinc i.val.1 i.property.1 i.property.2.1 i.val.2 i.property.2.2 (F i)) + refine ⟨P,?_⟩ + intro U hU hUH s hs t ht x v hv + exact hP ⟨(U,s),hU,hUH,hs⟩ t ht x v hv + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/IncrementBootstrap.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/IncrementBootstrap.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6e62479704c8f4f538bc09fcfd2b98e947013e0 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/IncrementBootstrap.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleBySpacetime + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma norm_fderiv_q_le (v : Vec) : ‖fderiv ℝ q v‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro h + rw [fderiv_q_apply,Real.norm_eq_abs,one_mul] + calc + _ ≤ ‖velocity v‖ * ‖h‖ := by simpa only [dot_eq_inner] using abs_real_inner_le_norm (velocity v) h + _ ≤ ‖h‖ := mul_le_of_le_one_left (norm_nonneg h) (norm_velocity_lt_one v).le + +lemma q_lipschitz (v w : Vec) : |q w-q v| ≤ ‖w-v‖ := by + have h := (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun x _ => contDiff_q.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) x) + (fun x _ => norm_fderiv_q_le x) (mem_univ v) (mem_univ w) + simpa only [Real.norm_eq_abs,one_mul] using h + +lemma norm_relativistic_projection_le (u h : Vec) (hu : ‖u‖ ≤ 1) : + ‖h-dot u h • u‖ ≤ ‖h‖ := by + have hsq : ‖h-dot u h • u‖^2 = ‖h‖^2-2*(dot u h)^2+(dot u h)^2*‖u‖^2 := by + rw [norm_sub_sq_real,norm_smul,Real.norm_eq_abs,mul_pow,sq_abs,← dot_eq_inner, + dot_smul_right,dot_comm h u] + ring + have hu2 : ‖u‖^2 ≤ 1 := by nlinarith [norm_nonneg u] + have hh := mul_le_mul_of_nonneg_left hu2 (sq_nonneg (dot u h)) + nlinarith [norm_nonneg (h-dot u h • u),norm_nonneg h,sq_nonneg (dot u h)] + +lemma norm_fderiv_velocity_le (v : Vec) : ‖fderiv ℝ velocity v‖ ≤ (q v)⁻¹ := by + apply ContinuousLinearMap.opNorm_le_bound _ (inv_nonneg.mpr (q_pos v).le) + intro h + rw [fderiv_velocity_apply,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (q_pos v))] + exact mul_le_mul_of_nonneg_left + (norm_relativistic_projection_le _ _ (norm_velocity_lt_one v).le) + (inv_nonneg.mpr (q_pos v).le) + +lemma velocity_local_lipschitz (v w : Vec) (hvw : ‖w-v‖ ≤ q v/2) : + ‖velocity w-velocity v‖ ≤ (2/q v)*‖w-v‖ := by + apply (convex_closedBall v (q v/2)).norm_image_sub_le_of_norm_fderiv_le + (fun x _ => contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) x) + (fun x hx => ?_) (mem_closedBall_self (div_nonneg (q_pos v).le (by norm_num))) + (by simpa only [mem_closedBall,dist_eq_norm] using hvw) + have hb : q v/2 ≤ q x := by + have h := q_lipschitz x v + rw [norm_sub_rev] at h + have hx' : ‖x-v‖ ≤ q v/2 := hx + have hh := (le_abs_self (q v-q x)).trans h + linarith + calc + _ ≤ (q x)⁻¹ := norm_fderiv_velocity_le x + _ ≤ (q v/2)⁻¹ := inv_anti₀ (half_pos (q_pos v)) hb + _ = 2/q v := by field_simp + +lemma continuous_barrier {f : ℝ → ℝ} {a b R C : ℝ} (_hab : a ≤ b) + (hf : ContinuousOn f (Icc a b)) (ha : f a < R) (hCR : C < R) + (hstop : ∀ t ∈ Icc a b, (∀ u ∈ Icc a t, f u ≤ R) → f t ≤ C) : + ∀ t ∈ Icc a b, f t ≤ C := by + have hlt : ∀ t ∈ Icc a b, f t < R := by + intro t ht + by_contra ht' + have hRt : R ≤ f t := le_of_not_gt ht' + obtain ⟨x,hx,hfx⟩ := intermediate_value_Icc ht.1 (hf.mono (Icc_subset_Icc_right ht.2)) ⟨ha.le,hRt⟩ + let S : Set ℝ := Icc a b ∩ f ⁻¹' {R} + have hS : IsCompact S := isCompact_Icc.of_isClosed_subset + (hf.preimage_isClosed_of_isClosed isClosed_Icc isClosed_singleton) inter_subset_left + obtain ⟨m,hm,hmin⟩ := hS.exists_isMinOn ⟨x,⟨⟨hx.1,hx.2.trans ht.2⟩,hfx⟩⟩ continuousOn_id + have hall : ∀ u ∈ Icc a m, f u ≤ R := by + intro u hu + by_contra hu' + have hRu : R < f u := lt_of_not_ge hu' + obtain ⟨y,hy,hey⟩ := intermediate_value_Icc hu.1 + (hf.mono (Icc_subset_Icc_right (hu.2.trans hm.1.2))) ⟨ha.le,hRu.le⟩ + have hyS : y ∈ S := ⟨⟨hy.1,hy.2.trans (hu.2.trans hm.1.2)⟩,hey⟩ + have hmu : m ≤ u := (hmin hyS).trans hy.2 + have he : u=m := le_antisymm hu.2 hmu + have hfm : f m=R := hm.2 + rw [he,hfm] at hRu + exact (lt_irrefl _ hRu) + have hb := hstop m hm.1 hall + have hfm : f m=R := hm.2 + rw [hfm] at hb + exact (not_le_of_gt hCR) hb + intro t ht + exact hstop t ht (fun u hu => (hlt u ⟨hu.1,hu.2.trans ht.2⟩).le) + +lemma momentum_stopping {V : ℝ → Vec} {a b ε : ℝ} (hab : a ≤ b) + (hV : ContinuousOn V (Icc a b)) (hε : ε < q (V a)/2) + (hb : ∀ t ∈ Icc a b, (∀ u ∈ Icc a t, + q (V a)/2 ≤ q (V u) ∧ q (V u) ≤ 2*q (V a)) → ‖V t-V a‖ ≤ ε) : + ∀ t ∈ Icc a b, ‖V t-V a‖ ≤ ε ∧ + q (V a)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V a) := by + have hband (u : ℝ) (hu : ‖V u-V a‖ ≤ q (V a)/2) : + q (V a)/2 ≤ q (V u) ∧ q (V u) ≤ 2*q (V a) := by + have h := (q_lipschitz (V a) (V u)).trans hu + rw [abs_le] at h + constructor <;> linarith [q_pos (V a)] + have hbound := continuous_barrier hab ((hV.sub continuousOn_const).norm) + (by simpa only [Pi.sub_apply,sub_self,norm_zero] using (half_pos (q_pos (V a)))) hε + (fun t ht hu => hb t ht (fun u hu' => hband u (hu u hu'))) + intro t ht + exact ⟨hbound t ht,hband t ((hbound t ht).trans hε.le)⟩ + +lemma one_le_q (v : Vec) : 1 ≤ q v := by + have := q_sq v + have := q_pos v + nlinarith [sq_nonneg ‖v‖] + +def IncrementBootstrap (V : ℝ → Vec) (T M A P L : ℝ) : Prop := + ∀ (n : ℕ) (a b : ℝ), 0 ≤ a → a ≤ b → b ≤ T → + (∀ t ∈ Icc a b, (2 : ℝ)^n/8 ≤ q (V t) ∧ q (V t) ≤ 8*(2 : ℝ)^n) → + ‖V b-V a‖ ≤ M*P*Real.sqrt (b-a)+A*(b-a)*(P^2*L/(2 : ℝ)^n) + +lemma IncrementBootstrap.stopped_forward {V : ℝ → Vec} {T M A P L a b ε : ℝ} + (H : IncrementBootstrap V T M A P L) (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ T) + (hV : ContinuousOn V (Icc a b)) (hM : 0 ≤ M) (hA : 0 ≤ A) (hP : 0 ≤ P) + (hL : 0 ≤ L) (hε : ε < q (V a)/2) + (hstep : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (V a) ≤ ε) : + ∀ t ∈ Icc a b, ‖V t-V a‖ ≤ ε ∧ + q (V a)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V a) := by + obtain ⟨n,hnlo,hnhi⟩ := exists_nat_pow_near (one_le_q (V a)) (by norm_num : (1 : ℝ)<2) + have hn : 0 < (2 : ℝ)^n := by positivity + have hq : q (V a) ≤ 2*(2 : ℝ)^n := by + rw [pow_succ] at hnhi + nlinarith + apply momentum_stopping hab hV hε + intro t ht htband + have hta := ht.1 + have htb := ht.2 + have hqa := q_pos (V a) + have hband : ∀ u ∈ Icc a t, (2 : ℝ)^n/8 ≤ q (V u) ∧ q (V u) ≤ 8*(2 : ℝ)^n := by + intro u hu + have hu' := htband u hu + constructor <;> nlinarith + have Ht := H n a t ha ht.1 (ht.2.trans hb) hband + have hrat : 1/(2 : ℝ)^n ≤ 2/q (V a) := by + apply (div_le_div_iff₀ hn (q_pos (V a))).mpr + nlinarith + have hfirst : M*P*Real.sqrt (t-a) ≤ M*P*Real.sqrt (b-a) := + mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt (by linarith)) (mul_nonneg hM hP) + have hsecond : A*(t-a)*(P^2*L/(2 : ℝ)^n) ≤ 2*A*(b-a)*P^2*L/q (V a) := by + calc + _ = (A*(t-a)*P^2*L)*(1/(2 : ℝ)^n) := by ring + _ ≤ (A*(t-a)*P^2*L)*(2/q (V a)) := + mul_le_mul_of_nonneg_left hrat (by positivity) + _ ≤ (A*(b-a)*P^2*L)*(2/q (V a)) := by + apply mul_le_mul_of_nonneg_right _ (by positivity) + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (by linarith) hA) (sq_nonneg P)) hL + _ = _ := by ring + exact (Ht.trans (add_le_add hfirst hsecond)).trans hstep + +lemma IncrementBootstrap.velocity_stopped_forward {V : ℝ → Vec} {T M A P L a b ε : ℝ} + (H : IncrementBootstrap V T M A P L) (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ T) + (hV : ContinuousOn V (Icc a b)) (hM : 0 ≤ M) (hA : 0 ≤ A) (hP : 0 ≤ P) + (hL : 0 ≤ L) (hε : ε < q (V a)/2) + (hstep : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (V a) ≤ ε) : + ∀ t ∈ Icc a b, ‖V t-V a‖ ≤ ε ∧ + ‖velocity (V t)-velocity (V a)‖ ≤ 2*ε/q (V a) ∧ + q (V a)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V a) := by + intro t ht + have hqa := q_pos (V a) + have hs := H.stopped_forward ha hab hb hV hM hA hP hL hε hstep t ht + refine ⟨hs.1,?_,hs.2⟩ + calc + _ ≤ (2/q (V a))*‖V t-V a‖ := velocity_local_lipschitz _ _ (hs.1.trans hε.le) + _ ≤ (2/q (V a))*ε := mul_le_mul_of_nonneg_left hs.1 (by positivity) + _ = _ := by ring +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/PhysicalBinBasePrefix.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PhysicalBinBasePrefix.lean new file mode 100644 index 0000000000000000000000000000000000000000..c78ed84a269b1b6b812026e74dfbb58489a5dadf --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PhysicalBinBasePrefix.lean @@ -0,0 +1,210 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.DensitySecondMoment +import OAI.Analysis.VlasovMaxwell.Retarded.ConeEulerianIntegrand + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +lemma physicalBinBase_prefix {α : Phase → ℝ → Phase} {T : ℝ} (zX : Phase) + (C : ClosedConeBin) {J : Set ℝ} (hJ : J⊆Icc 0 T) : + physicalBinBase (fun t => (prefixFlow α T zX t).2) C J = + physicalBinBase (fun t => (α zX t).2) C J := by + ext z + by_cases hz : z.1∈J + · simp only [physicalBinBase,mem_ofPred_eq,prefixFlow,prefixClamp_eq (hJ hz)] + · simp only [physicalBinBase,mem_ofPred_eq,hz,false_and] + +lemma PhaseFlowOn.physicalBin_weighted_occupation {s : Solution} {T a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (C : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hS0 : tsupport (fun z => s.f (0,z))⊆S) + (hJ : Icc a b⊆Icc 0 T) (hR : 0≤C.rmin) (hD : 0≤C.Dmin) : + ENNReal.ofReal (C.rmin^2*C.Dmin) * + (∫⁻ z : ConeCoordinate,physicalBinDensity s (fun t => (F.flow zX t).1) + (fun t => (F.flow zX t).2) C z.1 z.2.1 z.2.2 + ∂physicalBinMeasure (fun t => (F.flow zX t).2) C (Icc a b)) ≤ + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T C S a b (max 0 (a-C.rmax)) (min T (b-C.rmin))) := by + let c := max 0 (a-C.rmax) + let d := min T (b-C.rmin) + let H := closedBinEulerian F.flow zX T C S a b c d + let X : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let g : ConeCoordinate → ℝ≥0∞ := fun z => + physicalBinDensity {s with f := prefixParticle s T} X V C z.1 z.2.1 z.2.2 + have hC : Icc c d⊆Icc 0 T := fun _ hr => + ⟨(le_max_left _ _).trans hr.1,hr.2.trans (min_le_left _ _)⟩ + have hH : MeasurableSet H := F.measurable_closedBinEulerian hs hT zX C hS hJ hC + have hα : Continuous (fun t => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hg : Measurable g := measurable_coneBinDensity + (hs.continuous_prefixParticle hT).measurable hX hV C + have hμ : physicalBinMeasure (fun t => (F.flow zX t).2) C (Icc a b) = + physicalBinMeasure V C (Icc a b) := by + unfold physicalBinMeasure V + rw [physicalBinBase_prefix zX C hJ] + have hgactual (t r : ℝ) (n : Sphere) (ht : t∈Icc 0 T) (hr : r∈Icc 0 T) : + g (t,r,n)=physicalBinDensity s (fun t => (F.flow zX t).1) + (fun t => (F.flow zX t).2) C t r n := by + simp only [g,physicalBinDensity,X,V,prefixFlow,prefixClamp_eq ht, + prefixParticle,prefixClamp_eq hr] + rw [hμ] + have he : (∫⁻ z : ConeCoordinate,physicalBinDensity s (fun t => (F.flow zX t).1) + (fun t => (F.flow zX t).2) C z.1 z.2.1 z.2.2 ∂physicalBinMeasure V C (Icc a b)) = + ∫⁻ z,g z ∂physicalBinMeasure V C (Icc a b) := by + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + exact (hgactual z.1 z.2.1 z.2.2 (hJ hz.1) + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩).symm + rw [he,physicalBin_integral_eq_triangle hV C measurableSet_Icc hJ hg, + F.cone_occupation_eq_receiver_coordinates hs hT zX hH] + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro r hr + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro n + dsimp only + have ht' := Ioo_subset_Icc_self ht + have hr' : r∈Ioo 0 T := ⟨hr.1,hr.2.trans ht.2⟩ + by_cases hz : (t,r,n)∈physicalBinBase V C (Icc a b) + · rw [indicator_of_mem hz,hgactual t r n ht' (Ioo_subset_Icc_self hr')] + have hz' : (t,r,n)∈physicalBinBase (fun t => (F.flow zX t).2) C (Icc a b) := by + rwa [show V=(fun t => (prefixFlow F.flow T zX t).2) from rfl, + physicalBinBase_prefix zX C hJ] at hz + have hrC : r∈Icc c d := by + constructor + · exact max_le hr.1.le (by linarith [hz'.1.1,hz'.2.2.1.2]) + · exact le_min hr'.2.le (by linarith [hz'.1.2,hz'.2.2.1.1]) + have hden := F.physicalBinDensity_le_Eulerian hs zX C hS0 n hJ hC hr' hrC hr.2 ht.2 hz' + have hw : C.rmin^2*C.Dmin ≤ (t-r)^2*(1-dot n.1 (velocity (F.flow zX t).2)) := by + exact mul_le_mul (sq_le_sq₀ hR (sub_pos.mpr hr.2).le |>.mpr hz'.2.2.1.1) + hz'.2.2.2.2.1 hD (sq_nonneg _) + change _ ≤ coneEulerianIntegrand s T X V H (t,r,n) + have hprefix : coneEulerianIntegrand s T X V H (t,r,n) = + ENNReal.ofReal ((t-r)^2*(1-dot n.1 (velocity (F.flow zX t).2))) * + ∫⁻ v : Vec,H.indicator (fun p => ENNReal.ofReal (s.f p)) + (r,((F.flow zX t).1-(t-r) • n.1,v)) := by + simp only [coneEulerianIntegrand,X,V,prefixFlow,prefixClamp_eq ht'] + congr 1 + apply lintegral_congr + intro v + by_cases hp : (r,((F.flow zX t).1-(t-r) • n.1,v))∈H + · simp only [indicator_of_mem hp,prefixParticle,prefixClamp_eq (Ioo_subset_Icc_self hr')] + · simp only [indicator_of_notMem hp] + rw [hprefix] + exact mul_le_mul' (ENNReal.ofReal_le_ofReal hw) hden + · rw [indicator_of_notMem hz,mul_zero] + exact bot_le + +lemma PhaseFlowOn.actual_bin_Cauchy {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) : + ∃ C₀ : ℝ, 0≤C₀ ∧ ∀ (zX : Phase) (C : ClosedConeBin) (S : Set Phase) + (a b I P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z => s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0 (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let D := ENNReal.ofReal (128*C₀*P^3*(min θ σ)^2) + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T C S a b (max 0 (a-C.rmax)) (min T (b-C.rmin))) / + ENNReal.ofReal (C.rmin^2*C.Dmin) + (∫⁻ z : ConeCoordinate, ENNReal.ofReal (z.1-z.2.1) * + ENNReal.ofReal (prefixConeGood s T X z) * N z ∂physicalBinMeasure V C (Icc a b)) ≤ + (ENNReal.ofReal I * goodFieldBudget s X (fun t => velocity (V t)) k a b I j)^(1/2:ℝ) * + (min (D^2*(volume (Icc a b)*ENNReal.ofReal (C.rmax-C.rmin)*ENNReal.ofReal (384*φ^2))) + (D*M))^(1/2:ℝ) := by + obtain ⟨C₀,hC₀,hbound⟩ := F.physicalBinDensity_bounds hs hT + refine ⟨C₀,hC₀,?_⟩ + intro zX C S a b I P θ φ σ k j hS hS0 hJ hI hP hθ hφ hσ hR hD hq hd hDmax he hangle + dsimp only + let X : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let μ := physicalBinMeasure V C (Icc a b) + have hα : Continuous (fun t => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hN : AEMeasurable N μ := + physicalBinDensity_aemeasurable hs hT hX hV C measurableSet_Icc hJ + have hG := hs.measurable_prefixConeGood hT hX + have hW : AEMeasurable (fun z : ConeCoordinate => ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)) μ := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal.mul hG.ennreal_ofReal).aemeasurable + apply lintegral_product_bound_two μ hW hN + · have hfield := hs.physicalBin_goodField hT hX hV C k j hJ hI hangle + apply le_trans _ hfield + apply le_of_eq + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hg : 0≤prefixConeGood s T X z := add_nonneg (norm_nonneg _) (abs_nonneg _) + dsimp only + rw [mul_pow,← ENNReal.ofReal_pow hr,← ENNReal.ofReal_pow hg,← ENNReal.ofReal_mul (sq_nonneg _)] + · apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + exact hbound X V C z.1 z.2.1 z.2.2 P θ σ + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ hP.le hθ hσ hq hd he + · have hmass := F.physicalBin_weighted_occupation hs hT zX C hS hS0 hJ hR.le hD.le + have hμ : physicalBinMeasure (fun t => (F.flow zX t).2) C (Icc a b) = μ := by + unfold μ physicalBinMeasure V + rw [physicalBinBase_prefix zX C hJ] + rw [hμ] at hmass + have hne : ENNReal.ofReal (C.rmin^2*C.Dmin)≠0 := (ENNReal.ofReal_pos.mpr (by positivity)).ne' + apply (ENNReal.le_div_iff_mul_le (Or.inl hne) (Or.inl ENNReal.ofReal_ne_top)).mpr + rw [mul_comm] + convert hmass using 1 + congr 1 + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + simp only [N,X,V,physicalBinDensity,prefixFlow,prefixClamp_eq (hJ hz.1)] + · exact physicalBinMeasure_volume hV C measurableSet_Icc hφ hDmax + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixClamp.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixClamp.lean new file mode 100644 index 0000000000000000000000000000000000000000..a58281ebb114e8a1448f92c73a86fbd8645697ec --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixClamp.lean @@ -0,0 +1,247 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.LabelOccupationDurationMass +import OAI.Analysis.VlasovMaxwell.Flow.PhaseAcceleration + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.flow_contDiffOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (z : Phase) : + ContDiffOn ℝ 1 (F.flow z) (Ioo 0 T) := by + have hf : ContinuousOn (F.flow z) (Ioo 0 T) := (F.continuousOn_time z).mono Ioo_subset_Icc_self + have hp : ContinuousOn (fun t => (t,(F.flow z t).1)) (Ioo 0 T) := continuousOn_id.prodMk hf.fst + have hE : ContinuousOn (fun t => s.E (t,(F.flow z t).1)) (Ioo 0 T) := + hs.E_smooth.continuousOn.comp hp (fun t ht => ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hB : ContinuousOn (fun t => s.B (t,(F.flow z t).1)) (Ioo 0 T) := + hs.B_smooth.continuousOn.comp hp (fun t ht => ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hu : ContinuousOn (fun t => velocity (F.flow z t).2) (Ioo 0 T) := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn hf.snd + have hK : ContinuousOn (fun t => s.E (t,(F.flow z t).1)+ + cross (velocity (F.flow z t).2) (s.B (t,(F.flow z t).1))) (Ioo 0 T) := + hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk hB)) + have hd (t : ℝ) (ht : t∈Ioo 0 T) := (F.ode z t (Ioo_subset_Icc_self ht)).mono Ioo_subset_Icc_self + apply (contDiffOn_one_iff_derivWithin isOpen_Ioo.uniqueDiffOn).mpr + refine ⟨fun t ht => (hd t ht).differentiableWithinAt,?_⟩ + apply (hu.prodMk hK).congr + intro t ht + exact (hd t ht).derivWithin (isOpen_Ioo.uniqueDiffWithinAt ht) + +lemma PhaseFlowOn.acceleration_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (z : Phase) : + ContinuousOn (phaseAcceleration s.E s.B F.flow z) (Ioo 0 T) := by + have hf : ContinuousOn (F.flow z) (Ioo 0 T) := (F.continuousOn_time z).mono Ioo_subset_Icc_self + have hp : ContinuousOn (fun t => (t,(F.flow z t).1)) (Ioo 0 T) := continuousOn_id.prodMk hf.fst + have hE : ContinuousOn (fun t => s.E (t,(F.flow z t).1)) (Ioo 0 T) := + hs.E_smooth.continuousOn.comp hp (fun t ht => ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hB : ContinuousOn (fun t => s.B (t,(F.flow z t).1)) (Ioo 0 T) := + hs.B_smooth.continuousOn.comp hp (fun t ht => ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hu : ContinuousOn (fun t => velocity (F.flow z t).2) (Ioo 0 T) := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn hf.snd + have hK : ContinuousOn (fun t => s.E (t,(F.flow z t).1)+ + cross (velocity (F.flow z t).2) (s.B (t,(F.flow z t).1))) (Ioo 0 T) := + hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk hB)) + exact (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp_continuousOn hf.snd).clm_apply hK + +lemma PhaseFlowOn.actual_branch_regular {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c, (F.flow zX r).1≠(F.flow zY r).1) : + let τ := branchTime F.flow zX zY T + ContDiffOn ℝ 1 (fun r => τ r-r) (uIcc b c) ∧ + ContDiffOn ℝ 1 (fun r => velocity (F.flow zX (τ r)).2) (uIcc b c) ∧ + ContDiffOn ℝ 1 (fun r => velocity (F.flow zY r).2) (uIcc b c) ∧ + ContDiffOn ℝ 1 (branchDirection F.flow zX zY T) (uIcc b c) ∧ + ContinuousOn (phaseAcceleration s.E s.B F.flow zY) (uIcc b c) ∧ + ContinuousOn (fun r => phaseAcceleration s.E s.B F.flow zX (τ r)) (uIcc b c) := by + let τ := branchTime F.flow zX zY T + have ht : ∀ r∈uIcc b c, τ r∈Ioo 0 T := by + intro r hr + have hh := F.branch_time_mem zX zY (hS hr) (hne r hr) + exact ⟨(hS hr).1.1.trans hh.1,hh.2⟩ + have hsrc : uIcc b c⊆Ioo 0 T := fun r hr => (hS hr).1 + have hτ : ContDiffOn ℝ 1 τ (uIcc b c) := fun r hr => + (F.branch_differential zX zY (hS hr) (hne r hr)).1.contDiffWithinAt + have hr : ContDiffOn ℝ 1 (fun r => τ r-r) (uIcc b c) := hτ.sub contDiffOn_id + have hr0 : ∀ r∈uIcc b c, τ r-r≠0 := fun r hr => + (sub_pos.mpr (F.branch_time_mem zX zY (hS hr) (hne r hr)).1).ne' + have hX := (F.flow_contDiffOn hs zX).comp hτ ht + have hY := (F.flow_contDiffOn hs zY).mono hsrc + refine ⟨hr,(contDiff_velocity (k:=1)).comp_contDiffOn hX.snd, + (contDiff_velocity (k:=1)).comp_contDiffOn hY.snd,?_, + (F.acceleration_continuousOn hs zY).mono hsrc, + (F.acceleration_continuousOn hs zX).comp hτ.continuousOn ht⟩ + exact (hr.inv hr0).smul (hX.fst.sub hY.fst) + +lemma PhaseFlowOn.actual_weighted_signed_identity {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c, (F.flow zX r).1≠(F.flow zY r).1) + {ψ : ℝ → ℝ} {W W' : ℝ → Vec →L[ℝ] Vec} + (hψ : AbsolutelyContinuousOnInterval ψ b c) + (hW : ContDiffOn ℝ 1 W (uIcc b c)) (hW' : ContinuousOn W' (uIcc b c)) + (hWd : ∀ r∈uIoo b c, HasDerivAt W (W' r) r) : + let τ := branchTime F.flow zX zY T + let r := fun σ => τ σ-σ + let a := fun σ => velocity (F.flow zX (τ σ)).2 + let u := fun σ => velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in b..c, ψ σ • W σ (signedForceKernel (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zY σ)) = + ψ b • W b (retardedPrimitive (r b) (a b) (u b) (n b)) - + ψ c • W c (retardedPrimitive (r c) (a c) (u c) (n c)) + + ∫ σ in b..c, deriv ψ σ • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + ψ σ • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + dsimp only + obtain ⟨hr,ha,hu,hn,hu',ha'⟩ := F.actual_branch_regular hs zX zY hS hne + apply weighted_signed_identity_on_branch hψ hr ha hu hn hW hW' hu' ha' + · intro r h + exact (sub_pos.mpr (F.branch_time_mem zX zY (hS h) (hne r h)).1).ne' + · intro r h + exact (cone_denom_pos (F.flow zY r).2 _ (F.branchDirection_norm zX zY (hS h) (hne r h))).ne' + · intro r h + exact (cone_denom_pos (F.flow zX (branchTime F.flow zX zY T r)).2 _ + (F.branchDirection_norm zX zY (hS h) (hne r h))).ne' + · intro r h + exact (F.branch_differential zX zY (hS (Ioo_subset_Icc_self h)) + (hne r (Ioo_subset_Icc_self h))).2.sub (hasDerivAt_id r) + · intro r h + have hh := hS (Ioo_subset_Icc_self h) + have ht := F.branch_time_mem zX zY hh (hne r (Ioo_subset_Icc_self h)) + exact (F.velocity_hasDerivAt zX ⟨hh.1.1.trans ht.1,ht.2⟩).scomp r + (F.branch_differential zX zY hh (hne r (Ioo_subset_Icc_self h))).2 + · intro r h + exact F.velocity_hasDerivAt zY (hS (Ioo_subset_Icc_self h)).1 + · intro r h + exact F.branchDirection_hasDerivAt zX zY (hS (Ioo_subset_Icc_self h)) + (hne r (Ioo_subset_Icc_self h)) + · exact hWd + +def prefixClamp (T t : ℝ) : ℝ := max 0 (min T t) + +lemma prefixClamp_mem {T : ℝ} (hT : 0≤T) (t : ℝ) : prefixClamp T t∈Icc 0 T := + ⟨le_max_left _ _,max_le hT (min_le_left _ _)⟩ + +lemma prefixClamp_eq {T t : ℝ} (ht : t∈Icc 0 T) : prefixClamp T t=t := by + simp [prefixClamp,min_eq_right ht.2,max_eq_right ht.1] + +def prefixFlow (α : Phase → ℝ → Phase) (T : ℝ) (z : Phase) (t : ℝ) : Phase := + α z (prefixClamp T t) + +lemma PhaseFlowOn.continuous_prefixFlow {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) : + Continuous (fun p : ℝ × Phase => prefixFlow F.flow T p.2 p.1) := by + apply (F.continuousOn_joint hT hs.E_smooth.continuousOn hs.B_smooth.continuousOn).comp_continuous + ((continuous_const.max (continuous_const.min continuous_fst)).prodMk continuous_snd) + intro p + exact ⟨prefixClamp_mem hT p.1,mem_univ _⟩ + +structure ClosedConeBin where + (rmin rmax qmin qmax wmin wmax dmin dmax Dmin Dmax emin emax : ℝ) + +def InClosedConeBin (α : Phase → ℝ → Phase) (zX : Phase) (B : ClosedConeBin) + (t r : ℝ) (z : Phase) : Prop := + let R := t-r + let Δ := (α zX t).1-(α z r).1 + let u := velocity (α z r).2 + let a := velocity (α zX t).2 + R=‖Δ‖ ∧ R∈Icc B.rmin B.rmax ∧ q (α z r).2∈Icc B.qmin B.qmax ∧ + q (α zX t).2∈Icc B.wmin B.wmax ∧ + R-dot Δ u∈Icc (R*B.dmin) (R*B.dmax) ∧ + R-dot Δ a∈Icc (R*B.Dmin) (R*B.Dmax) ∧ + 1-dot a u∈Icc B.emin B.emax + +lemma inClosedConeBin_iff {α : Phase → ℝ → Phase} {zX z : Phase} {B : ClosedConeBin} + {t r : ℝ} (hR : 0 α p.2 p.1)) (zX : Phase) (B : ClosedConeBin) : + IsClosed {p : ℝ × ℝ × Phase | InClosedConeBin α zX B p.1 p.2.1 p.2.2} := by + have hX := hα.comp (continuous_fst.prodMk continuous_const : + Continuous (fun p : ℝ × ℝ × Phase => (p.1,zX))) + have hY := hα.comp (continuous_snd.fst.prodMk continuous_snd.snd : + Continuous (fun p : ℝ × ℝ × Phase => (p.2.1,p.2.2))) + have hR : Continuous (fun p : ℝ × ℝ × Phase => p.1-p.2.1) := continuous_fst.sub continuous_snd.fst + have hΔ := hX.fst.sub hY.fst + have hu := (contDiff_velocity (k:=1)).continuous.comp hY.snd + have ha := (contDiff_velocity (k:=1)).continuous.comp hX.snd + have hd := hR.sub (continuous_dot.comp (hΔ.prodMk hu)) + have hD := hR.sub (continuous_dot.comp (hΔ.prodMk ha)) + have he := continuous_const.sub (continuous_dot.comp (ha.prodMk hu)) (f:=fun _ => (1:ℝ)) + have hq := (contDiff_q (k:=1)).continuous.comp hY.snd + have hw := (contDiff_q (k:=1)).continuous.comp hX.snd + exact (isClosed_eq hR hΔ.norm).inter + ((isClosed_Icc.preimage hR).inter ((isClosed_Icc.preimage hq).inter + ((isClosed_Icc.preimage hw).inter + (((isClosed_le (hR.mul continuous_const) hd).inter (isClosed_le hd (hR.mul continuous_const))).inter + (((isClosed_le (hR.mul continuous_const) hD).inter (isClosed_le hD (hR.mul continuous_const))).inter + (isClosed_Icc.preimage he)))))) + +lemma PhaseFlowOn.compact_closed_bin_hit_labels {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) : + IsCompact {z | z∈S ∧ ∃ t∈Icc 0 T, ∃ r∈Icc 0 T, + t∈Icc a b ∧ r∈Icc c d ∧ InClosedConeBin F.flow zX B t r z} := by + let H : Set (ℝ × ℝ × Phase) := {p | p.1∈Icc a b ∧ p.2.1∈Icc c d ∧ + InClosedConeBin (prefixFlow F.flow T) zX B p.1 p.2.1 p.2.2} + have hH : IsClosed H := (isClosed_Icc.preimage continuous_fst).inter + ((isClosed_Icc.preimage continuous_snd.fst).inter + (isClosed_inClosedConeBin (F.continuous_prefixFlow hs hT) zX B)) + convert compact_hit_labels hS hH using 1 + ext z + constructor + · rintro ⟨hz,t,ht,r,hr,htJ,hrC,hbin⟩ + refine ⟨hz,t,ht,r,hr,htJ,hrC,?_⟩ + simpa only [InClosedConeBin,prefixFlow,prefixClamp_eq ht,prefixClamp_eq hr] using hbin + · rintro ⟨hz,t,ht,r,hr,htJ,hrC,hbin⟩ + refine ⟨hz,t,ht,r,hr,htJ,hrC,?_⟩ + simpa only [InClosedConeBin,prefixFlow,prefixClamp_eq ht,prefixClamp_eq hr] using hbin + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixMomentumForce.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixMomentumForce.lean new file mode 100644 index 0000000000000000000000000000000000000000..e14a82fd52fd34a0b62f427cd7ab70ae99ee8446 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixMomentumForce.lean @@ -0,0 +1,222 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.AngularBump + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def prefixMomentumForce (s : Solution) (α : Phase→ℝ→Phase) (T : ℝ) (z : Phase) (t : ℝ) : Vec := + (lorentzField s.E s.B (prefixClamp T t,prefixFlow α T z t)).2 + +lemma PhaseFlowOn.continuous_prefixMomentumForce {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (z : Phase) : + Continuous (prefixMomentumForce s F.flow T z) := by + have hα : Continuous (prefixFlow F.flow T z) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have ht : Continuous (prefixClamp T) := continuous_const.max (continuous_const.min continuous_id) + have hZ := ht.prodMk hα.fst + have hE := hs.E_smooth.continuousOn.comp_continuous hZ (fun t=>⟨prefixClamp_mem hT t,mem_univ _⟩) + have hB := hs.B_smooth.continuousOn.comp_continuous hZ (fun t=>⟨prefixClamp_mem hT t,mem_univ _⟩) + exact hE.add ((contDiff_cross (k:=1)).continuous.comp (((contDiff_velocity (k:=1)).continuous.comp hα.snd).prodMk hB)) + +lemma PhaseFlowOn.prefixMomentum_hasDerivAt {E B : Field} {T t : ℝ} + (F : PhaseFlowOn E B T) (z : Phase) (ht : t∈Ioo 0 T) : + HasDerivAt (fun r=>(prefixFlow F.flow T z r).2) + (lorentzField E B (t,F.flow z t)).2 t := by + have hd : HasDerivAt (fun r=>(F.flow z r).2) (lorentzField E B (t,F.flow z t)).2 t := + ((F.ode z t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)).snd + apply hd.congr_of_eventuallyEq + filter_upwards [Icc_mem_nhds ht.1 ht.2] with r hr + simp only [prefixFlow,prefixClamp_eq hr] + +def prefixAngularMultiplier (_s : Solution) (α : Phase→ℝ→Phase) (T w : ℝ) + (hw : 0(prefixFlow F.flow T z t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd + have hd := extendedAngularCLM_contDiff w hw + refine ⟨hd.continuous.comp hV,(hd.continuous_fderiv (by simp)).comp hV |>.clm_apply + (F.continuous_prefixMomentumForce hs hT z),?_⟩ + intro t ht + change HasDerivAt (fun r=>extendedAngularCLM w hw (prefixFlow F.flow T z r).2) + (fderiv ℝ (extendedAngularCLM w hw) (prefixFlow F.flow T z t).2 + (prefixMomentumForce s F.flow T z t)) t + have he : prefixMomentumForce s F.flow T z t=(lorentzField s.E s.B (t,F.flow z t)).2 := by + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self ht)] + rw [he] + exact hasDerivAt_extendedAngularCLM (F.prefixMomentum_hasDerivAt z ht) w hw + +lemma prefixAngular_highband {s : Solution} {α : Phase→ℝ→Phase} {T t w : ℝ} + (hw : 0g z.1) z ∂volume.prod (volume.prod sphereMeasure))= + ∫⁻t in J,g t*(ENNReal.ofReal (B.rmax-B.rmin)* + sphereMeasure {n : Sphere | ‖n.1-velocity (V t)‖≤4*φ}) := by + have hmg : Measurable (A.indicator (fun z : ConeCoordinate=>g z.1)) := + (hg.comp measurable_fst).indicator hA + rw [lintegral_prod _ hmg.aemeasurable,←lintegral_indicator hJ] + apply lintegral_congr + intro t + by_cases ht : t∈J + · rw [indicator_of_mem ht] + have he : (fun p : ℝ×Sphere=>A.indicator (fun z=>g z.1) (t,p))= + ((Icc (t-B.rmax) (t-B.rmin))×ˢ{n : Sphere | ‖n.1-velocity (V t)‖≤4*φ}).indicator + (fun _=>g t) := by + funext p + simp [A,ht,indicator] + change (∫⁻p : ℝ×Sphere,A.indicator (fun z=>g z.1) (t,p) ∂volume.prod sphereMeasure)=_ + rw [he,lintegral_indicator] + · rw [lintegral_const,Measure.restrict_apply_univ,Measure.prod_prod,Real.volume_Icc] + congr 2 + ring_nf + · exact measurableSet_Icc.prod (measurableSet_le + ((continuous_subtype_val.sub continuous_const).norm.measurable) measurable_const) + · rw [indicator_of_notMem ht] + have he : (fun p : ℝ×Sphere=>A.indicator (fun z=>g z.1) (t,p))=0 := by + funext p + simp [A,ht,indicator] + change (∫⁻p : ℝ×Sphere,A.indicator (fun z=>g z.1) (t,p) ∂volume.prod sphereMeasure)=_ + rw [he] + exact lintegral_zero + calc + _ ≤ ∫⁻z : ConeCoordinate,g z.1 ∂(volume.prod (volume.prod sphereMeasure)).restrict A := + lintegral_mono_set hsub + _ = ∫⁻z : ConeCoordinate,A.indicator (fun z=>g z.1) z ∂volume.prod (volume.prod sphereMeasure) := + (lintegral_indicator hA _).symm + _ = _ := hm + _ ≤ ∫⁻t in J,g t*(ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + apply lintegral_mono + intro t + apply mul_le_mul' le_rfl + apply mul_le_mul' le_rfl + convert sphere_cap_area (by positivity : 0≤4*φ) (velocity (V t)) using 1 + congr 1 + ring + _ = _ := by + rw [lintegral_mul_const _ hg] + ac_rfl + +lemma physicalBin_radial_density_near {s : Solution} {X V : ℝ→Vec} + (hV : Measurable V) (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) + {C p θ φ : ℝ} (_hC : 0≤C) (_hp : 0≤p) (_hθ : 0≤θ) (hφ : 0≤φ) + (hr : 0≤B.rmax) (hD : B.Dmax≤8*φ^2) + (hdensity : ∀z∈physicalBinBase V B J, + physicalBinDensity s X V B z.1 z.2.1 z.2.2≤ENNReal.ofReal (128*C*p^3*θ^2)) + {g : ℝ→ℝ≥0∞} (hg : Measurable g) : + (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B J)≤ + (∫⁻t in J,g t)*ENNReal.ofReal (49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin)) := by + have hm := physicalBinMeasure_receiver_weight hV B hJ hφ hD hg + have hbound : (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B J)≤ + (∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J)* + (ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2)) := by + calc + _ ≤ ∫⁻z : ConeCoordinate,g z.1*(ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2)) + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + have hr' : ENNReal.ofReal (z.1-z.2.1)≤ENNReal.ofReal B.rmax := ENNReal.ofReal_le_ofReal hz.2.2.1.2 + have hd := hdensity z hz + simpa only [mul_assoc] using mul_le_mul' (mul_le_mul' le_rfl hr') hd + _ = _ := lintegral_mul_const _ (hg.comp measurable_fst) + by_cases hwidth : B.rmin≤B.rmax + · calc + _ ≤ (∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J)* + (ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2)) := hbound + _ ≤ (∫⁻t in J,g t)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)* + (ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2)) := mul_le_mul' hm le_rfl + _ = _ := by + have he : 49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin)= + (B.rmax-B.rmin)*(384*φ^2)*(B.rmax*(128*C*p^3*θ^2)) := by ring + rw [he,ENNReal.ofReal_mul (by positivity : 0≤(B.rmax-B.rmin)*(384*φ^2)), + ENNReal.ofReal_mul (sub_nonneg.mpr hwidth),ENNReal.ofReal_mul hr] + ac_rfl + · have hw : ENNReal.ofReal (B.rmax-B.rmin)=0 := ENNReal.ofReal_eq_zero.mpr (by linarith) + have hzero : (∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J)=0 := by + apply le_antisymm + · change (∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J)≤(0:ℝ≥0∞) + simpa only [hw,mul_zero,zero_mul] using hm + · exact bot_le + calc + _ ≤ (0:ℝ≥0∞) := by simpa only [hzero,zero_mul] using hbound + _ ≤ _ := bot_le + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixParticle.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixParticle.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f84e11a59bba9df61b3ebbc75fda0f79f407307 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixParticle.lean @@ -0,0 +1,275 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RetardedSameTimeSeparation +import OAI.Analysis.VlasovMaxwell.Retarded.SourceCellLast + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +lemma PhaseFlowOn.physical_hit_arrival {E B : Field} {T r t : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (y : Vec) + (hr : r∈Ioo 0 T) (ht : t∈Icc 0 T) (hrt : r ⟨prefixClamp_mem hT p.1,mem_univ _⟩) + +lemma continuous_prefixField {E : Field} {T : ℝ} + (hE : ContinuousOn E (Icc 0 T ×ˢ (univ : Set Vec))) (hT : 0 ≤ T) : + Continuous (prefixField E T) := + hE.comp_continuous + ((continuous_const.max (continuous_const.min continuous_fst)).prodMk continuous_snd) + (fun p => ⟨prefixClamp_mem hT p.1,mem_univ _⟩) + +lemma measurable_coneBinDensity {g : Particle} (hg : Measurable g) + {X V : ℝ → Vec} (hX : Measurable X) (hV : Measurable V) (B : ClosedConeBin) : + Measurable (fun z : ConeCoordinate => ∫⁻ v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal (g (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)))) := by + let H : Set (ConeCoordinate × Vec) := + {p | p.2∈coneBinMomentumSet B p.1.2.2.1 (velocity (V p.1.1))} + have hn : Measurable (fun p : ConeCoordinate × Vec => p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hv : Measurable (fun p : ConeCoordinate × Vec => velocity p.2) := + (contDiff_velocity (k:=0)).continuous.measurable.comp measurable_snd + have ha : Measurable (fun p : ConeCoordinate × Vec => velocity (V p.1.1)) := + (contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp (measurable_fst.comp measurable_fst)) + have hH : MeasurableSet H := by + exact (measurableSet_Icc.preimage ((contDiff_q (k:=0)).continuous.measurable.comp measurable_snd)).inter + ((measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hv)))).inter + (measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (ha.prodMk hv))))) + have hf : Measurable (fun p : ConeCoordinate × Vec => + ENNReal.ofReal (g (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)))) := by + exact (hg.comp ((measurable_fst.comp (measurable_snd.comp measurable_fst)).prodMk + (((hX.comp (measurable_fst.comp measurable_fst)).sub + (((measurable_fst.comp measurable_fst).sub (measurable_fst.comp (measurable_snd.comp measurable_fst))).smul hn)).prodMk + measurable_snd))).ennreal_ofReal + have hm : Measurable (fun z : ConeCoordinate => + ∫⁻ v : Vec, H.indicator (fun p => ENNReal.ofReal (g (p.1.2.1, + (X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)))) (z,v)) := + (hf.indicator hH).lintegral_prod_right' + convert hm using 1 + ext z + rw [← lintegral_indicator (measurableSet_coneBinMomentumSet B _ _)] + apply lintegral_congr + intro v + rfl + +lemma physicalBinDensity_aemeasurable {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0 ≤ T) {X V : ℝ → Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) : + AEMeasurable (fun z : ConeCoordinate => physicalBinDensity s X V B z.1 z.2.1 z.2.2) + (physicalBinMeasure V B J) := by + have hm := (measurable_coneBinDensity (hs.continuous_prefixParticle hT).measurable hX hV B).aemeasurable + (μ := physicalBinMeasure V B J) + apply hm.congr + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B hJ) + intro z hz + unfold physicalBinDensity + apply lintegral_congr + intro v + rw [prefixParticle,prefixClamp_eq (show z.2.1∈Icc 0 T from ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩)] + +lemma physicalBin_integral_le_budget {V : ℝ → Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (k j : ℕ) + (hangle : ∀ D∈Icc B.Dmin B.Dmax, DyadicWindow k j (Real.sqrt (D/2))) + {g : ConeCoordinate → ℝ≥0∞} (hg : Measurable g) : + (∫⁻ z, g z ∂physicalBinMeasure V B J) ≤ + ∫⁻ t in J, ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, + (receiverAngularSet (fun t => velocity (V t)) k j t).indicator + (fun n => g (t,r,n)) n ∂sphereMeasure := by + have hbase := measurableSet_physicalBinBase hV B hJ + unfold physicalBinMeasure + rw [← lintegral_indicator hbase,lintegral_prod _ (hg.indicator hbase).aemeasurable] + rw [← lintegral_indicator hJ] + apply lintegral_mono + intro t + by_cases ht : t∈J + · rw [indicator_of_mem ht] + have hm : Measurable (fun p : ℝ × Sphere => (physicalBinBase V B J).indicator g (t,p)) := + (hg.indicator hbase).comp (measurable_const.prodMk measurable_id) + dsimp only + rw [lintegral_prod _ hm.aemeasurable,← lintegral_indicator measurableSet_Icc] + apply lintegral_mono + intro r + by_cases hr : r∈Icc 0 t + · rw [indicator_of_mem hr] + apply lintegral_mono + intro n + dsimp only + by_cases hz : (t,r,n)∈physicalBinBase V B J + · rw [indicator_of_mem hz,indicator_of_mem (show n∈receiverAngularSet + (fun t => velocity (V t)) k j t from hangle _ hz.2.2.2.2)] + · rw [indicator_of_notMem hz] + exact bot_le + · rw [indicator_of_notMem hr] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro n + exact indicator_of_notMem (fun hz => hr hz.2.1) _ + · rw [indicator_of_notMem ht] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro p + exact indicator_of_notMem (fun hz => ht hz.1) _ + +def prefixConeGood (s : Solution) (T : ℝ) (X : ℝ → Vec) (z : ConeCoordinate) : ℝ := + goodField (prefixField s.E T (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) + (prefixField s.B T (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) z.2.2.1 + +lemma EnergyPrefix.measurable_prefixConeGood {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0 ≤ T) {X : ℝ → Vec} (hX : Measurable X) : + Measurable (prefixConeGood s T X) := by + have hn : Measurable (fun z : ConeCoordinate => z.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp measurable_snd) + have hy : Measurable (fun z : ConeCoordinate => + (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) := + (measurable_fst.comp measurable_snd).prodMk + ((hX.comp measurable_fst).sub ((measurable_fst.sub (measurable_fst.comp measurable_snd)).smul hn)) + have hE := (continuous_prefixField hs.E_smooth.continuousOn hT).measurable.comp hy + have hB := (continuous_prefixField hs.B_smooth.continuousOn hT).measurable.comp hy + exact (hE.add ((contDiff_cross (k:=0)).continuous.measurable.comp (hn.prodMk hB))).norm.add + (continuous_dot.measurable.comp (hn.prodMk hB)).abs + +lemma EnergyPrefix.physicalBin_goodField {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (hT : 0 ≤ T) {X V : ℝ → Vec} + (hX : Measurable X) (hV : Measurable V) (B : ClosedConeBin) (k j : ℕ) + (hJ : Icc lo hi⊆Icc 0 T) (hI : 0 velocity (V t)) k lo hi I j := by + have hg : Measurable (fun z : ConeCoordinate => + ENNReal.ofReal ((z.1-z.2.1)^2 * prefixConeGood s T X z^2)) := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2 |>.mul + ((hs.measurable_prefixConeGood hT hX).pow_const 2)).ennreal_ofReal + have hbound := physicalBin_integral_le_budget hV B (J:=Icc lo hi) measurableSet_Icc k j hangle hg + have heq : (∫⁻ t in Icc lo hi, ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, + (receiverAngularSet (fun t => velocity (V t)) k j t).indicator + (fun n => ENNReal.ofReal ((t-r)^2 * prefixConeGood s T X (t,r,n)^2)) n ∂sphereMeasure) = + ∫⁻ t in Icc lo hi, goodFieldBinConeMass s X (fun t => velocity (V t)) k j t := by + apply setLIntegral_congr_fun measurableSet_Icc + intro t ht + apply setLIntegral_congr_fun measurableSet_Icc + intro r hr + apply lintegral_congr + intro n + have hrT : r∈Icc 0 T := ⟨hr.1,hr.2.trans (hJ ht).2⟩ + simp only [prefixConeGood,prefixField,prefixClamp_eq hrT] + rw [heq] at hbound + unfold goodFieldBudget + rw [← mul_assoc,ENNReal.mul_inv_cancel (ENNReal.ofReal_pos.mpr hI).ne' ENNReal.ofReal_ne_top,one_mul] + exact hbound + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixUniqueness.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixUniqueness.lean new file mode 100644 index 0000000000000000000000000000000000000000..7bb3198548f43df7459b57b0407f3dea0590d345 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/PrefixUniqueness.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.FiniteUniqueness + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma SmoothClassicalPrefix.mono {d : Datum} {s : Solution} {T H : ℝ} + (hs : SmoothClassicalPrefix d s H) (hTH : T ≤ H) : SmoothClassicalPrefix d s T := by + have hsub : Icc (0:ℝ) T ⊆ Icc 0 H := Icc_subset_Icc_right hTH + refine ⟨hs.f_smooth.mono (fun p hp => hsub hp),hs.E_smooth.mono (fun p hp => hsub hp), + hs.B_smooth.mono (fun p hp => hsub hp),fun t ht => hs.nonnegative t (hsub ht),?_,?_,?_, + fun t ht htT => hs.equations t ht (htT.trans_le hTH),hs.initial_f,hs.initial_E,hs.initial_B⟩ + · obtain ⟨F,hc,he⟩ := hs.E_L2 + exact ⟨F,hc.mono hsub,fun t ht => he t (hsub ht)⟩ + · obtain ⟨F,hc,he⟩ := hs.B_L2 + exact ⟨F,hc.mono hsub,fun t ht => he t (hsub ht)⟩ + · obtain ⟨K,hK,hk⟩ := hs.compact + exact ⟨K,hK,fun t ht => hk t (hsub ht)⟩ + +lemma SmoothClassicalPrefix.unique_lt {d : Datum} {s₁ s₂ : Solution} {H₁ H₂ t : ℝ} + (h₁ : SmoothClassicalPrefix d s₁ H₁) (h₂ : SmoothClassicalPrefix d s₂ H₂) + (ht : 0 ≤ t) (ht₁ : t < H₁) (ht₂ : t < H₂) : + (∀ z, s₁.f (t,z)=s₂.f (t,z)) ∧ (∀ x, s₁.E (t,x)=s₂.E (t,x)) ∧ + (∀ x, s₁.B (t,x)=s₂.B (t,x)) := by + obtain ⟨τ,htτ,hτ⟩ := exists_between (lt_min ht₁ ht₂) + have hτ₁ := hτ.trans_le (min_le_left _ _) + have hτ₂ := hτ.trans_le (min_le_right _ _) + have he := classical_unique_before + (h₁.cutoff_classical_before (ht.trans htτ.le) hτ₁) + (h₂.cutoff_classical_before (ht.trans htτ.le) hτ₂) ht htτ.le + have he₁ := cutoffPrefix_eq hτ₁ htτ.le s₁ + have he₂ := cutoffPrefix_eq hτ₂ htτ.le s₂ + exact ⟨fun z => (he₁.1 z).symm.trans ((he.1 z).trans (he₂.1 z)), + fun x => (he₁.2.1 x).symm.trans ((he.2.1 x).trans (he₂.2.1 x)), + fun x => (he₁.2.2 x).symm.trans ((he.2.2 x).trans (he₂.2.2 x))⟩ + +theorem SmoothClassicalPrefix.unique {d : Datum} {s₁ s₂ : Solution} {H₁ H₂ t : ℝ} + (h₁ : SmoothClassicalPrefix d s₁ H₁) (h₂ : SmoothClassicalPrefix d s₂ H₂) + (ht : 0 ≤ t) (ht₁ : t ≤ H₁) (ht₂ : t ≤ H₂) : + (∀ z, s₁.f (t,z)=s₂.f (t,z)) ∧ (∀ x, s₁.E (t,x)=s₂.E (t,x)) ∧ + (∀ x, s₁.B (t,x)=s₂.B (t,x)) := by + rcases ht.eq_or_lt with rfl | ht + · exact ⟨fun z => (h₁.initial_f z).trans (h₂.initial_f z).symm, + fun x => (h₁.initial_E x).trans (h₂.initial_E x).symm, + fun x => (h₁.initial_B x).trans (h₂.initial_B x).symm⟩ + have hp : ∀ r∈Ico (0:ℝ) t, + (∀ z, s₁.f (r,z)=s₂.f (r,z)) ∧ (∀ x, s₁.E (r,x)=s₂.E (r,x)) ∧ + (∀ x, s₁.B (r,x)=s₂.B (r,x)) := + fun r hr => h₁.unique_lt h₂ hr.1 (hr.2.trans_le ht₁) (hr.2.trans_le ht₂) + have hcl : Icc (0:ℝ) t ⊆ closure (Ico 0 t) := by rw [closure_Ico ht.ne] + have h₁r := h₁.mono ht₁ + have h₂r := h₂.mono ht₂ + refine ⟨?_,?_,?_⟩ + · intro z + exact (Set.EqOn.of_subset_closure (fun r hr => (hp r hr).1 z) + (h₁r.f_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + (h₂r.f_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + Ico_subset_Icc_self hcl) ⟨ht.le,le_rfl⟩ + · intro x + exact (Set.EqOn.of_subset_closure (fun r hr => (hp r hr).2.1 x) + (h₁r.E_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + (h₂r.E_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + Ico_subset_Icc_self hcl) ⟨ht.le,le_rfl⟩ + · intro x + exact (Set.EqOn.of_subset_closure (fun r hr => (hp r hr).2.2 x) + (h₁r.B_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + (h₂r.B_smooth.continuousOn.comp (continuous_id.prodMk continuous_const).continuousOn (fun r hr => hr)) + Ico_subset_Icc_self hcl) ⟨ht.le,le_rfl⟩ + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Continuation/SlabSmoothBootstrap.lean b/lean/OAI/Analysis/VlasovMaxwell/Continuation/SlabSmoothBootstrap.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d05b5efaf0dc6fa7c0df4e4edcbb02c326238e5 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Continuation/SlabSmoothBootstrap.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets +import OAI.Analysis.VlasovMaxwell.Regularity.WithinPartial + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM +universe u +variable {U : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] [ProperSpace U] + +lemma iterated_spatial_time_derivative (j : ℕ) {T : ℝ} (hT : 0 F (r,x)) (G (t,x)) (Icc 0 T) t) → + ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt + (fun r => iteratedFDeriv ℝ j (fun y => F (r,y)) x) + (iteratedFDeriv ℝ j (fun y => G (t,y)) x) (Icc 0 T) t := by + induction j with + | zero => + intro W _ _ _ F G hF hG htime t ht x + let A : W →L[ℝ] (U [×0]→L[ℝ] W) := + (continuousMultilinearCurryFin0 ℝ U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + simpa [A,iteratedFDeriv_zero_eq_comp,Function.comp_def] using + A.hasFDerivAt.comp_hasDerivWithinAt t (htime t ht x) + | succ j ih => + intro W _ _ _ F G hF hG htime t ht x + have hdtime := fun (t : ℝ) (ht : t ∈ Icc 0 T) (x : U) => space_time_derivative_slab hT hF hG htime ht x + have hd := ih hF.deriv hG.deriv hdtime t ht x + let A : (U [×j]→L[ℝ] U →L[ℝ] W) →L[ℝ] (U [×(j+1)]→L[ℝ] W) := + (continuousMultilinearCurryRightEquiv' ℝ j U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + convert! A.hasFDerivAt.comp_hasDerivWithinAt t hd using 1 <;> + simp only [A,iteratedFDeriv_succ_eq_comp_right,Function.comp_def, + LinearIsometryEquiv.coe_toContinuousLinearEquiv,ContinuousLinearEquiv.coe_coe] + +omit [ProperSpace U] in +lemma contDiffOn_assembleDerivative {W X : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [NormedAddCommGroup X] [NormedSpace ℝ X] {n : ℕ∞ω} {S : Set X} + {G : X → W} {D : X → (U →L[ℝ] W)} (hG : ContDiffOn ℝ n G S) (hD : ContDiffOn ℝ n D S) : + ContDiffOn ℝ n (fun p => assembleDerivative (G p) (D p)) S := by + let A : W →L[ℝ] ((ℝ × U) →L[ℝ] W) := + ContinuousLinearMap.smulRightL ℝ (ℝ × U) W (ContinuousLinearMap.fst ℝ ℝ U) + exact (A.contDiff.comp_contDiffOn hG).add (hD.clm_comp contDiffOn_const) + +lemma spatialJetRegular_succ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F G : ℝ × U → W} {T : ℝ} (hT : 0 F (r,x)) (G (t,x)) (Icc 0 T) t) : + SpatialJetRegular (n+1) (Icc 0 T) F := by + have hu : UniqueDiffOn ℝ {p : ℝ × U | p.1∈Icc 0 T} := by + have he : {p : ℝ × U | p.1∈Icc 0 T}=Icc 0 T ×ˢ (univ : Set U) := by ext p; simp + rw [he] + exact (uniqueDiffOn_Icc hT).prod uniqueDiffOn_univ + refine ⟨hF.1,fun j => ?_⟩ + let Fj := fun p : ℝ × U => iteratedFDeriv ℝ j (fun y => F (p.1,y)) p.2 + let Gj := fun p : ℝ × U => iteratedFDeriv ℝ j (fun y => G (p.1,y)) p.2 + let Dj := fun p : ℝ × U => fderiv ℝ (fun y => Fj (p.1,y)) p.2 + have hFj : SpatialJetRegular n (Icc 0 T) Fj := spatialJetRegular_iterated j hF + have hGj : ContDiffOn ℝ n Gj {p | p.1∈Icc 0 T} := hG.2 j + have hDj : ContDiffOn ℝ n Dj {p | p.1∈Icc 0 T} := hFj.deriv.regular + have htimej := iterated_spatial_time_derivative j hT + (hF.mono_order (by simp)) (hG.mono_order (by simp)) htime + have hd (p : ℝ × U) (hp : p.1∈Icc 0 T) : HasFDerivWithinAt Fj + (assembleDerivative (Gj p) (Dj p)) {p | p.1∈Icc 0 T} p := by + apply hasFDerivWithinAt_of_time_space hp _ hDj.continuousOn (htimej p.1 hp p.2) + intro r hr y + exact ((hFj.1 r hr).differentiable (by simp) y).hasFDerivAt + have he (p : ℝ × U) (hp : p.1∈Icc 0 T) : + fderivWithin ℝ Fj {p | p.1∈Icc 0 T} p=assembleDerivative (Gj p) (Dj p) := + (hd p hp).fderivWithin (hu p hp) + have hn : ((n+1:ℕ∞):ℕ∞ω)=(n:ℕ∞ω)+1 := by simp + rw [hn,contDiffOn_succ_iff_fderivWithin hu] + refine ⟨fun p hp => (hd p hp).differentiableWithinAt,by simp,?_⟩ + exact (contDiffOn_assembleDerivative hGj hDj).congr he + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchCutoffStateContinuous.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchCutoffStateContinuous.lean new file mode 100644 index 0000000000000000000000000000000000000000..b186584b5081dec8d9c2f6546b54887f2c3f58ab --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchCutoffStateContinuous.lean @@ -0,0 +1,198 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.CutoffState + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.branchCutoffState_continuousAt {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {p : ℝ×Phase} + (hp : p∈jointBranchDomain F.flow zX T) : + ContinuousAt (fun q : ℝ×Phase=>branchCutoffState F.flow T zX q.2 q.1) p := by + have hτ := F.joint_branch_continuousAt zX hp + have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hX := ((F.continuousOn_time zX).continuousAt + (Icc_mem_nhds (hp.1.1.1.trans ht.1) ht.2)).comp (f := fun q : ℝ×Phase=>branchTime F.flow zX q.2 T q.1) hτ + have hY := (F.joint p.2 p.1 hp.1.1).continuousAt + have hr := hτ.sub continuousAt_fst + have hr0 : branchTime F.flow zX p.2 T p.1-p.1≠0 := (sub_pos.mpr ht.1).ne' + exact hr.prodMk (((hr.inv₀ hr0).smul (hX.fst.sub hY.fst)).prodMk + (hY.snd.prodMk hX.snd)) + +lemma PhaseFlowOn.joint_momentumForce_continuousAt {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) {p : ℝ×Phase} + (hp : p.1∈Ioo 0 T) : + ContinuousAt (fun q : ℝ×Phase=>(lorentzField s.E s.B (q.1,F.flow q.2 q.1)).2) p := by + have hF := (F.joint p.2 p.1 hp).continuousAt + have hx := continuousAt_fst.prodMk hF.fst + have hm : (p.1,(F.flow p.2 p.1).1)∈interior (Icc 0 T ×ˢ (univ : Set Vec)) := by + rw [interior_prod_eq,interior_Icc,interior_univ] + exact ⟨hp,mem_univ _⟩ + have hE := (hs.E_smooth.continuousOn.continuousAt (mem_interior_iff_mem_nhds.mp hm)).comp (f := fun q : ℝ×Phase=>(q.1,(F.flow q.2 q.1).1)) hx + have hB := (hs.B_smooth.continuousOn.continuousAt (mem_interior_iff_mem_nhds.mp hm)).comp (f := fun q : ℝ×Phase=>(q.1,(F.flow q.2 q.1).1)) hx + have hu := (contDiff_velocity (k:=1)).continuous.continuousAt.comp hF.snd + exact hE.add ((contDiff_cross (k:=1)).continuous.continuousAt.comp (hu.prodMk hB)) + +lemma PhaseFlowOn.branchCutoffStateRate_continuousAt {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) {p : ℝ×Phase} + (hp : p∈jointBranchDomain F.flow zX T) : + ContinuousAt (fun q : ℝ×Phase=>branchCutoffStateRate s.E s.B F.flow T zX q.2 q.1) p := by + have hz := F.branchCutoffState_continuousAt zX hp + have hτ := F.joint_branch_continuousAt zX hp + have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hn := F.branchDirection_norm zX p.2 hp.1 hp.2 + have ha := (contDiff_velocity (k:=1)).continuous.continuousAt.comp hz.snd.snd.snd + have hu := (contDiff_velocity (k:=1)).continuous.continuousAt.comp hz.snd.snd.fst + have hd := (continuousAt_const (y:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=1)).continuous.continuousAt.comp (hz.snd.fst.prodMk hu)) + have hD := (continuousAt_const (y:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=1)).continuous.continuousAt.comp (hz.snd.fst.prodMk ha)) + have hD0 : 1-dot (branchDirection F.flow zX p.2 T p.1) + (velocity (F.flow zX (branchTime F.flow zX p.2 T p.1)).2)≠0 := + (cone_denom_pos _ _ hn).ne' + have hρ := hd.div hD hD0 + have hr0 : branchTime F.flow zX p.2 T p.1-p.1≠0 := (sub_pos.mpr ht.1).ne' + have hN := (hz.fst.inv₀ hr0).smul + (((hρ.smul (ha.sub hz.snd.fst)).add hz.snd.fst).sub hu) + have hKY := F.joint_momentumForce_continuousAt hs hp.1.1 + have hKX := ((F.momentumForce_continuousOn_closed hs zX).continuousAt + (Icc_mem_nhds (hp.1.1.1.trans ht.1) ht.2)).comp (f := fun q : ℝ×Phase=>branchTime F.flow zX q.2 T q.1) hτ + exact (hρ.sub continuousAt_const).prodMk (hN.prodMk (hKY.prodMk (hρ.smul hKX))) + +lemma PhaseFlowOn.branchSelectedRate_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) : + Measurable ((jointBranchDomain F.flow zX T).indicator + (fun p : ℝ×Phase=>branchSelectedRate s.E s.B F.flow T zX p.2 Q p.1)) := by + classical + have hc : ContinuousOn (fun p : ℝ×Phase=>branchSelectedRate s.E s.B F.flow T zX p.2 Q p.1) + (jointBranchDomain F.flow zX T) := by + intro p hp + have hsc := contDiffAt_stateCutoff T Q (z:=branchCutoffState F.flow T zX p.2 p.1) + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1) + (F.branchDirection_norm zX p.2 hp.1 hp.2) + exact (((hsc.continuousAt_fderiv (by simp)).comp (f := fun q : ℝ×Phase=>branchCutoffState F.flow T zX q.2 q.1) + (F.branchCutoffState_continuousAt zX hp)).clm_apply + (F.branchCutoffStateRate_continuousAt hs zX hp)).continuousWithinAt + exact hc.measurable_piecewise continuousOn_const (F.isOpen_jointBranchDomain zX).measurableSet + +lemma PhaseFlowOn.selectedCutoff_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + Measurable ((jointBranchDomain F.flow zX T).indicator + (fun p : ℝ×Phase=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX p.2 p.1))) := by + classical + have hc : ContinuousOn (fun p : ℝ×Phase=>stateCutoff T Q (branchCutoffState F.flow T zX p.2 p.1)) + (jointBranchDomain F.flow zX T) := by + intro p hp + exact ((contDiffAt_stateCutoff T Q (z:=branchCutoffState F.flow T zX p.2 p.1) + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1) + (F.branchDirection_norm zX p.2 hp.1 hp.2)).continuousAt.comp (f := fun q : ℝ×Phase=>branchCutoffState F.flow T zX q.2 q.1) + (F.branchCutoffState_continuousAt zX hp)).continuousWithinAt + exact hc.measurable_piecewise continuousOn_const (F.isOpen_jointBranchDomain zX).measurableSet + +lemma norm_fderiv_velocity_apply_le (v h : Vec) : + ‖fderiv ℝ velocity v h‖≤‖h‖ := by + apply ((fderiv ℝ velocity v).le_opNorm h).trans + have hi : (q v)⁻¹≤1 := inv_le_one_of_one_le₀ (one_le_q v) + exact (mul_le_mul_of_nonneg_right (norm_fderiv_velocity_le v) (norm_nonneg h)).trans + (by simpa using mul_le_mul_of_nonneg_right hi (norm_nonneg h)) + +lemma deficit_rate_bound {N V : ℝ→Vec} {n' v' : Vec} {t : ℝ} + (hN : HasDerivAt N n' t) (hV : HasDerivAt V v' t) (hn : ‖N t‖=1) : + |deriv (fun s=>1-dot (N s) (velocity (V s))) t|≤‖n'‖+‖v'‖ := by + have hu := ((contDiff_velocity (k:=1)).differentiable one_ne_zero (V t)).hasFDerivAt.comp_hasDerivAt t hV + have hd := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot hN hu) + change HasDerivAt (fun s=>1-dot (N s) (velocity (V s))) _ t at hd + rw [hd.deriv] + simp only [zero_sub,abs_neg] + apply (abs_add_le _ _).trans + have ha : |dot (N t) (fderiv ℝ velocity (V t) v')|≤‖v'‖ := by + apply (abs_dot_le _ _).trans + rw [hn,one_mul] + exact norm_fderiv_velocity_apply_le _ _ + have hb : |dot n' (velocity (V t))|≤‖n'‖ := + (abs_dot_le _ _).trans (by + simpa using mul_le_mul_of_nonneg_left (norm_velocity_lt_one (V t)).le (norm_nonneg n')) + simpa only [Function.comp_apply] using add_le_add ha hb |>.trans (le_of_eq (add_comm _ _)) + +lemma physical_cutoff_coarse_rates {T t : ℝ} {V W N : ℝ→Vec} {R : ℝ→ℝ} + {v' w' n' : Vec} {r' : ℝ} (hn : ‖N t‖=1) (hr : 0physicalCutoffCoordinates T (R s) (N s) (V s) (W s) i) t / + physicalCutoffCoordinates T (R t) (N t) (V t) (W t) i| ≤ + ‖v'‖+(‖n'‖+‖v'‖)/(2*(1-dot (N t) (velocity (V t))))+ + (‖n'‖+‖w'‖)/(2*(1-dot (N t) (velocity (W t))))+|r'|/R t := by + have hq := ((contDiff_q (k:=1)).differentiable one_ne_zero (V t)).hasFDerivAt.comp_hasDerivAt t hV + rw [fderiv_q_apply] at hq + change HasDerivAt (fun s=>q (V s)) _ t at hq + have hu := ((contDiff_velocity (k:=1)).differentiable one_ne_zero (V t)).hasFDerivAt.comp_hasDerivAt t hV + have ha := ((contDiff_velocity (k:=1)).differentiable one_ne_zero (W t)).hasFDerivAt.comp_hasDerivAt t hW + have hd := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot hN hu) + change HasDerivAt (fun s=>1-dot (N s) (velocity (V s))) _ t at hd + have hD := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot hN ha) + change HasDerivAt (fun s=>1-dot (N s) (velocity (W s))) _ t at hD + have hdp := cone_denom_pos (V t) (N t) hn + have hDp := cone_denom_pos (W t) (N t) hn + have hed := angularCoordinate_log_deriv hd hdp + have heD := angularCoordinate_log_deriv hD hDp + have heq := inverseCoordinate_log_deriv hq (q_pos (V t)) + have hdb := deficit_rate_bound hN hV hn + have hDb := deficit_rate_bound hN hW hn + rw [hd.deriv] at hdb + rw [hD.deriv] at hDb + have hqb : |-dot (velocity (V t)) v'/q (V t)|≤‖v'‖ := by + rw [abs_div,abs_neg,abs_of_pos (q_pos _)] + apply (div_le_iff₀ (q_pos _)).mpr + apply (abs_dot_le _ _).trans + apply (mul_le_mul_of_nonneg_right (norm_velocity_lt_one _).le (norm_nonneg _)).trans + rw [one_mul] + exact le_mul_of_one_le_right (norm_nonneg _) (one_le_q _) + have her : deriv (fun s=>R s/max 1 T) t/(R t/max 1 T)=r'/R t := by + rw [(hR.div_const (max 1 T)).deriv] + have hm : max 1 T≠0 := (lt_of_lt_of_le (by norm_num : (0:ℝ)<1) (le_max_left _ _)).ne' + field_simp + simp only [Fin.sum_univ_succ,Fin.isValue,physicalCutoffCoordinates, + Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.sum_univ_zero,add_zero] + rw [heq,hed,heD,her] + rw [abs_div,abs_neg,abs_of_pos (q_pos _)] at hqb + simp only [abs_div,abs_neg,abs_of_pos (q_pos _),abs_of_pos (mul_pos (by norm_num : (0:ℝ)<2) hdp), + abs_of_pos (mul_pos (by norm_num : (0:ℝ)<2) hDp),abs_of_pos hr] + have hddiv := div_le_div_of_nonneg_right hdb (mul_pos (by norm_num : (0:ℝ)<2) hdp).le + have hDdiv := div_le_div_of_nonneg_right hDb (mul_pos (by norm_num : (0:ℝ)<2) hDp).le + linarith + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchIntegral.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b9048089d201d89c2267578d17cab64b77a9859 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/BranchIntegral.lean @@ -0,0 +1,372 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverQCLM +import OAI.Analysis.VlasovMaxwell.Population.DatumElectricFluxKernel + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.branch_integral {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) {H : Set ℝ} (hH : MeasurableSet H) + (hsub : H ⊆ branchDomain F.flow zX zY T) + (hne : ∀ s∈H, (F.flow zX s).1 ≠ (F.flow zY s).1) + {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] (g : ℝ → W) : + ∫ t in branchTime F.flow zX zY T '' H, g t = + ∫ s in H, branchRate F.flow zX zY T s • g (branchTime F.flow zX zY T s) := by + rw [integral_image_eq_integral_abs_deriv_smul hH + (fun s hs => (F.branch_differential zX zY (hsub hs) (hne s hs)).2.hasDerivWithinAt) + ((F.branch_strictMono zX zY).injOn.mono hsub) g] + apply setIntegral_congr_fun hH + intro s hs + change |branchRate F.flow zX zY T s| • _ = branchRate F.flow zX zY T s • _ + rw [abs_of_pos (F.branchRate_pos zX zY (hsub hs) (hne s hs))] + +lemma PhaseFlowOn.branch_integrable_iff {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) {H : Set ℝ} (hH : MeasurableSet H) + (hsub : H ⊆ branchDomain F.flow zX zY T) + (hne : ∀ s∈H, (F.flow zX s).1 ≠ (F.flow zY s).1) + {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] (g : ℝ → W) : + IntegrableOn g (branchTime F.flow zX zY T '' H) ↔ + IntegrableOn (fun s => branchRate F.flow zX zY T s • g (branchTime F.flow zX zY T s)) H := by + rw [integrableOn_image_iff_integrableOn_abs_deriv_smul hH + (fun s hs => (F.branch_differential zX zY (hsub hs) (hne s hs)).2.hasDerivWithinAt) + ((F.branch_strictMono zX zY).injOn.mono hsub) g] + apply integrableOn_congr_fun + · intro s hs + change |branchRate F.flow zX zY T s| • _ = branchRate F.flow zX zY T s • _ + rw [abs_of_pos (F.branchRate_pos zX zY (hsub hs) (hne s hs))] + · exact hH + +lemma PhaseFlowOn.branch_retardedSource {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s∈branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1≠(F.flow zY s).1) : + let t := branchTime F.flow zX zY T s + let ht : t∈Icc 0 T := ⟨hs.1.1.le.trans (F.branch_spec zX zY hs).1.1, + (F.branch_spec zX zY hs).1.2⟩ + F.retardedSource ht (F.flow zX t).1 zY=F.flow zY s := by + dsimp only + let t := branchTime F.flow zX zY T s + have hts := F.branch_time_mem zX zY hs hne + have hspec := (F.branch_spec zX zY hs).2 + have hdom : F.flow zY s∈retardedPhaseDomain t (F.flow zX t).1 := by + change 0<‖(F.flow zX t).1-(F.flow zY s).1‖ ∧ ‖(F.flow zX t).1-(F.flow zY s).1‖ linarith [hs.1.1] + have htime : t-‖(F.flow zX t).1-(F.flow zY s).1‖=s := by linarith + have hlabel : retardedLabel F.flow t (F.flow zX t).1 (F.flow zY s)=zY := by + change inversePhase F.flow (t-‖(F.flow zX t).1-(F.flow zY s).1‖,F.flow zY s)=zY + rw [htime] + exact F.inversePhase_flow (Ioo_subset_Icc_self hs.1) zY + simpa only [hlabel] using F.retardedSource_label + (show t∈Icc 0 T from ⟨hs.1.1.le.trans (F.branch_spec zX zY hs).1.1, + (F.branch_spec zX zY hs).1.2⟩) (F.flow zX t).1 hdom + +lemma PhaseFlowOn.actual_branch_force {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) : + let t := branchTime F.flow zX zY T σ + let r := t-σ + let n := branchDirection F.flow zX zY T σ + let a := velocity (F.flow zX t).2 + let v := (F.flow zY σ).2 + let b := fderiv ℝ velocity v + (s.E (σ,(F.flow zY σ).1)+cross (velocity v) (s.B (σ,(F.flow zY σ).1))) + branchRate F.flow zX zY T σ • ((1-dot n (velocity v))⁻¹ • + physicalPhaseForce s t (F.flow zX t).1 a (F.flow zY σ)) = + signedForceKernel r a (velocity v) n b := by + + let t := branchTime F.flow zX zY T σ + let r := t-σ + let n := branchDirection F.flow zX zY T σ + let a := velocity (F.flow zX t).2 + let v := (F.flow zY σ).2 + let b := fderiv ℝ velocity v + (s.E (σ,(F.flow zY σ).1)+cross (velocity v) (s.B (σ,(F.flow zY σ).1))) + change branchRate F.flow zX zY T σ • ((1-dot n (velocity v))⁻¹ • + physicalPhaseForce s t (F.flow zX t).1 a (F.flow zY σ)) = + signedForceKernel r a (velocity v) n b + have ht := F.branch_time_mem zX zY hσ hne + have hr : coneRadius (F.flow zX t).1 (F.flow zY σ).1=r := + (F.branch_spec zX zY hσ).2.symm + have hn : coneDirection (F.flow zX t).1 (F.flow zY σ).1=n := by + dsimp only [coneDirection] + rw [hr] + rfl + have htime : t-r=σ := by dsimp [r]; ring + have hh : physicalPhaseForce s t (F.flow zX t).1 a (F.flow zY σ)= + forceTransportKernel r n a v+forceSourceKernel r n a v b := by + unfold physicalPhaseForce + rw [hr,hn,htime] + rw [hh] + exact physical_force_branch_kernel r n a v b (sub_ne_zero.mpr ht.1.ne') + (F.branchDirection_norm zX zY hσ hne) + (cone_denom_pos (F.flow zX t).2 n (F.branchDirection_norm zX zY hσ hne)).ne' + +end RVM +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma datum_moment_bounds {d : Datum} (hf : Continuous d.f₀) (hc : HasCompactSupport d.f₀) : + ∃ C : ℝ, 0≤C ∧ ∀ x, |rho d.f₀ x|≤C ∧ ‖current d.f₀ x‖≤C := by + have hn : ‖basis 0‖=1 := by simp [basis,PiLp.norm_single] + obtain ⟨C,hC,hb⟩ := uniform_datum_velocity_integral_bound (H:=fun _ : Vec × Vec => (1:ℝ)) + hf hc continuousOn_const + obtain ⟨D,hD,hd⟩ := uniform_datum_velocity_integral_bound (H:=fun p : Vec × Vec => velocity p.2) + hf hc ((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn + refine ⟨C+D,add_nonneg hC hD,?_⟩ + intro x + constructor + · have hh := hb x (basis 0) hn + simpa only [smul_eq_mul,mul_one,Real.norm_eq_abs,rho] using hh.trans (le_add_of_nonneg_right hD) + · exact (hd x (basis 0) hn).trans (le_add_of_nonneg_left hC) + +lemma norm_coordinate_le (v : Vec) (i : Fin 3) : |v i|≤‖v‖ := by + exact (PiLp.norm_apply_le v i) + +lemma norm_le_three_of_coordinate_bound {v : Vec} {C : ℝ} (hC : 0≤C) + (h : ∀ i : Fin 3, |v i|≤C) : ‖v‖≤3*C := by + have hsq (i : Fin 3) : (v i)^2≤C^2 := sq_le_sq.mpr (by simpa only [abs_of_nonneg hC] using h i) + have hnorm := dot_self v + simp only [dot,Fin.sum_univ_succ,Fin.sum_univ_zero,add_zero] at hnorm + change v 0*v 0+(v 1*v 1+v 2*v 2)=‖v‖^2 at hnorm + nlinarith [hsq 0,hsq 1,hsq 2,norm_nonneg v] + +lemma freeWave_bound_compact {g h : Vec → ℝ} + (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) (T R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) T, ∀ x∈closedBall (0:Vec) R, + |freeWave g h (t,x)|≤C := by + obtain ⟨C,hC⟩ := ((isCompact_Icc.prod (isCompact_closedBall (0:Vec) R)).image + (contDiff_freeWave hg hh).continuous).isBounded.exists_norm_le + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro t ht x hx + exact (hC _ ⟨(t,x),⟨ht,hx⟩,rfl⟩).trans (le_max_left _ _) + +lemma norm_initial_cone_flux {d : Datum} {C : ℝ} (i : Fin 3) + (hb : ∀ t x y, x≠y → ‖retardedElectricFlux (datumBoundarySolution d) t x i y‖≤C/coneRadius x y) + {t : ℝ} (ht : 0 g (x+t • n.1)) + (fun n => hb (x+t • n.1)) + simp only [Real.norm_eq_abs] at hh + dsimp only [waveK,sphereSum] + rw [abs_mul,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹),abs_of_nonneg ht] + calc + _ ≤ (4*Real.pi)⁻¹*(t*(C*(4*Real.pi))) := by gcongr + _ = t*C := by field_simp + +lemma electricConeBoundary_datum_bound {d : Datum} (hd : Admissible d) + (T R : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) T, ∀ x∈closedBall (0:Vec) R, + |electricConeBoundary (datumBoundarySolution d) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := uniform_datumElectricFlux_bound hd.1.continuous hd.2.1 i + obtain ⟨D,hD,hmom⟩ := datum_moment_bounds hd.1.continuous hd.2.1 + obtain ⟨A,hA,hfree⟩ := freeWave_bound_compact (hproj.comp hd.2.2.2.1.1) + (hproj.comp (contDiff_curl hd.2.2.2.2.1.1)) T R + refine ⟨A+(C+2*D)*max T 0,by positivity,?_⟩ + intro t ht x hx + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_cone_flux i hflux ht.1 x n) + have hrho : |∫ n : Sphere, t*n.1 i*rho d.f₀ (x+t • n.1) ∂sphereMeasure|≤ + (t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + have hn : |n.1 i|≤1 := by + exact (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + (hmom (x+t • n.1)).1 (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = t*D := by ring + have hj : |waveK (fun y => current d.f₀ y i) (t,x)|≤t*D := + waveK_bound_of_bounded (fun y => (norm_coordinate_le (current d.f₀ y) i).trans (hmom y).2) ht.1.le x + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t*n.1 i*rho d.f₀ (x+t • n.1) ∂sphereMeasure)|≤t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hrho hp + _ = t*D := by field_simp + have hf := hfree t ⟨ht.1.le,ht.2⟩ x hx + simp only [electricConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_sub _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)) hj)).trans (by + have htT := ht.2.trans (le_max_left T 0) + nlinarith) + +lemma magneticConeBoundary_datum_bound {d : Datum} (hd : Admissible d) + (T R : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) T, ∀ x∈closedBall (0:Vec) R, + |magneticConeBoundary (datumBoundarySolution d) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := uniform_datumMagneticFlux_bound hd.1.continuous hd.2.1 i + obtain ⟨D,hD,hmom⟩ := datum_moment_bounds hd.1.continuous hd.2.1 + obtain ⟨A,hA,hfree⟩ := freeWave_bound_compact (hproj.comp hd.2.2.2.2.1.1) + (hproj.comp (contDiff_curl hd.2.2.2.1.1)).neg T R + refine ⟨A+(C+2*D)*max T 0,by positivity,?_⟩ + intro t ht x hx + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_magnetic_cone_flux i hflux ht.1 x n) + have hem (n : Sphere) (j k : Fin 3) : + |t*n.1 j*current d.f₀ (x+t • n.1) k|≤t*D := by + have hn : |n.1 j|≤1 := + (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + have hj : |current d.f₀ (x+t • n.1) k|≤D := + (norm_coordinate_le _ k).trans (hmom _).2 + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + hj (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = _ := by ring + have hj : |∫ n : Sphere, + t*n.1 (curlA i)*current d.f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current d.f₀ (x+t • n.1) (curlA i) ∂sphereMeasure|≤ + (2*t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + exact (abs_sub _ _).trans ((add_le_add (hem n _ _) (hem n _ _)).trans (by ring_nf; rfl)) + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, + t*n.1 (curlA i)*current d.f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current d.f₀ (x+t • n.1) (curlA i) ∂sphereMeasure)|≤2*t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((2*t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hj hp + _ = 2*t*D := by field_simp + have hf := hfree t ⟨ht.1.le,ht.2⟩ x hx + simp only [magneticConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_add_le _ _).trans (add_le_add + ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)).trans (by + have htT := ht.2.trans (le_max_left T 0) + nlinarith) + +lemma boundaryLorentzForce_datum_bound {d : Datum} (hd : Admissible d) (T R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) T, ∀ x∈closedBall (0:Vec) R, ∀ a : Vec, + ‖a‖≤1 → ‖boundaryLorentzForce (datumBoundarySolution d) t x a‖≤C := by + classical + choose C hC hb using electricConeBoundary_datum_bound hd T R + choose D hD hd' using magneticConeBoundary_datum_bound hd T R + let A := ∑ i : Fin 3, C i + let B := ∑ i : Fin 3, D i + have hA : 0≤A := Finset.sum_nonneg (fun i _ => hC i) + have hB : 0≤B := Finset.sum_nonneg (fun i _ => hD i) + refine ⟨3*A+3*B,by positivity,?_⟩ + intro t ht x hx a ha + have he : ‖electricBoundaryField (datumBoundarySolution d) t x‖≤3*A := by + apply norm_le_three_of_coordinate_bound hA + intro i + exact (hb i t ht x hx).trans (Finset.single_le_sum (fun j _ => hC j) (Finset.mem_univ i)) + have hm : ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤3*B := by + apply norm_le_three_of_coordinate_bound hB + intro i + exact (hd' i t ht x hx).trans (Finset.single_le_sum (fun j _ => hD j) (Finset.mem_univ i)) + exact (norm_add_le _ _).trans (add_le_add he ((norm_cross_le _ _).trans + ((mul_le_mul ha hm (norm_nonneg _) zero_le_one).trans_eq (one_mul _)))) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianCrudeBudget.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianCrudeBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9cf9f0d4576e84b35e71bd793aa4bb8753b52c4 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianCrudeBudget.lean @@ -0,0 +1,180 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.DyadicBalanceConstant +import OAI.Analysis.VlasovMaxwell.Geometry.PhysicalGeometryCutoffDensity + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.closedEulerian_crude_budget {s : Solution} {T a b I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b⊆Icc 0 T) (hI : b-a≤I) (hr : 0≤B.rmin) (hq : 0(F.closedBinEulerian_properties zX B S hC (r,z) hz).1) + (fun r z hz=>(F.closedBinEulerian_properties zX B S hC (r,z) hz).2.1) + have hw : d-c≤I+B.rmax := by + dsimp [c,d] + linarith [min_le_right T (b-B.rmin),le_max_right 0 (a-B.rmax)] + have hb' := hb.trans (mul_le_mul' (ENNReal.ofReal_le_ofReal hw) le_rfl) + have hh := mul_le_mul' (le_refl ((ENNReal.ofReal B.qmin)⁻¹)) hb' + rw [←mul_assoc,ENNReal.inv_mul_cancel (ENNReal.ofReal_pos.mpr hq).ne' ENNReal.ofReal_ne_top,one_mul] at hh + exact hh.trans_eq (by rw [div_eq_mul_inv]; ac_rfl) + +lemma PhaseFlowOn.stable_jointBudget_entry {s : Solution} {T a b I r len : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (hI : 0 (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) ≤ + ENNReal.ofReal (35512320*B.rmax/p*(1+I/len))* + ENNReal.ofReal (∫ x : Vec,totalEnergy s (0,x)) := by + have hp0 : 0

min (I*p^3*θ*φ^4*(H*(2:ℝ)^k)) + (R^2/(p*θ*(H*(2:ℝ)^k)))) ∧ + (∑'k : ℤ,min (I*p^3*θ*φ^4*(H*(2:ℝ)^k)) + (R^2/(p*θ*(H*(2:ℝ)^k)))) ≤ 6*Real.sqrt I*R*p*φ^2 := by + let a := I*p^3*θ*φ^4*H + let b := R^2/(p*θ*H) + let r := R/(Real.sqrt I*p^2*θ*φ^2*H) + have ha : 0 ring + have hs := dyadic_power_min_summable ha.le hb.le (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1) + have ht := dyadic_balance_at ha.le hb.le (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1) hr + simp_rw [he] at hs ht + refine ⟨hs,ht.trans_eq ?_⟩ + norm_num only [Real.rpow_one,Real.rpow_neg_one] + dsimp [a,b,r] + have hsqrt : (Real.sqrt I)^2=I := Real.sq_sqrt hI.le + have hs0 : Real.sqrt I≠0 := (Real.sqrt_pos.mpr hI).ne' + field_simp + nlinarith [hsqrt] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianTimeBudget.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianTimeBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..b192c2c8ecbb04ae0494233aa4945a2513ca43f9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/ClosedEulerianTimeBudget.lean @@ -0,0 +1,345 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.CappedRepresentativePos + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.closedEulerian_time_budget {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) + (hr : 0(hmem z r hh).2.1) (fun z r hh=>(hmem z r hh).2.2) + (by rintro z _ ⟨r,hr,rfl⟩; exact (hmem z r hr).1) + refine ho.trans (mul_le_mul' le_rfl ?_) + apply le_trans (lintegral_mono (fun z=>?_)) (hs.phase_energy_bound (left_mem_Icc.mpr hT)) + apply ENNReal.ofReal_le_ofReal + exact le_mul_of_one_le_left (hs.nonnegative 0 (left_mem_Icc.mpr hT) z) (one_le_q z.2) + +lemma PhaseFlowOn.closedEulerian_angular_time_budget {s : Solution} {T a b c d θ φ I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) + (hr : 0s.f (0,z))⊆S → Icc a b⊆Icc 0 T → b-a≤I → + 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let O := (ENNReal.ofReal (16*I*φ^2/θ^2)* + ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x))) / ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*P^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*P^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/(p*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (80/p)* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hforce⟩ := hd₀.direct_source_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ hJI hI hp hP hθ hφ hσ + hR hD hDmax hqlo hqhi hdlo hdhi hDlo hDhi he hangle + dsimp only + have hforceBound := hforce s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ + hI hp hP hθ hφ hσ hR hD hqlo hqhi hdlo hdhi hDlo hDhi he hangle + have hC : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := by + intro r hr + exact ⟨(le_max_left _ _).trans hr.1,hr.2.trans (min_le_left _ _)⟩ + have ho := F.closedEulerian_angular_time_budget hs hT zX B hS hJ hC hR hθ hφ hI.le hJI hdlo hDmax hDhi + have hod : coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin) ≤ + (ENNReal.ofReal (16*I*φ^2/θ^2)*ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin) := by + simpa only [div_eq_mul_inv] using mul_le_mul' ho (le_refl ((ENNReal.ofReal (B.rmin^2*B.Dmin))⁻¹)) + apply hforceBound.trans + gcongr + +lemma cone_relative_deficit_triangle (v w n : Vec) (hn : ‖n‖=1) : + 1-dot (velocity w) (velocity v)≤2*((1-dot n (velocity v))+(1-dot n (velocity w))) ∧ + 1-dot n (velocity v)≤2*((1-dot (velocity w) (velocity v))+(1-dot n (velocity w))) ∧ + 1-dot n (velocity w)≤2*((1-dot (velocity w) (velocity v))+(1-dot n (velocity v))) := by + have hi := relative_angle_identity v w + have hv := cone_angle_identity v n hn + have hw := cone_angle_identity w n hn + have hab : ‖velocity v-velocity w‖≤‖n-velocity v‖+‖n-velocity w‖ := by + calc + _ = ‖-(n-velocity v)+(n-velocity w)‖ := by congr 1; abel + _ ≤ ‖-(n-velocity v)‖+‖n-velocity w‖ := norm_add_le _ _ + _ = _ := by rw [norm_neg] + have hna : ‖n-velocity v‖≤‖velocity v-velocity w‖+‖n-velocity w‖ := by + calc + _ = ‖-(velocity v-velocity w)+(n-velocity w)‖ := by congr 1; abel + _ ≤ ‖-(velocity v-velocity w)‖+‖n-velocity w‖ := norm_add_le _ _ + _ = _ := by rw [norm_neg] + have hnb : ‖n-velocity w‖≤‖velocity v-velocity w‖+‖n-velocity v‖ := by + calc + _ = ‖(velocity v-velocity w)+(n-velocity v)‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + have hsq {a b c : ℝ} (ha : 0≤a) (h : a≤b+c) : a^2≤2*(b^2+c^2) := by + have hbc : 0≤b+c := ha.trans h + have hh := mul_self_le_mul_self ha h + nlinarith [sq_nonneg (b-c)] + have hab2 := hsq (norm_nonneg _) hab + have hna2 := hsq (norm_nonneg _) hna + have hnb2 := hsq (norm_nonneg _) hnb + refine ⟨?_,?_,?_⟩ <;> + nlinarith [sq_nonneg ((q v)⁻¹),sq_nonneg ((q w)⁻¹)] + +lemma cone_relative_bin_triangle {v w n : Vec} {θ φ σ : ℝ} (hn : ‖n‖=1) + (hdlo : θ^2/2≤1-dot n (velocity v)) (hdhi : 1-dot n (velocity v)≤8*θ^2) + (hDlo : φ^2/2≤1-dot n (velocity w)) (hDhi : 1-dot n (velocity w)≤8*φ^2) + (helo : σ^2/2≤1-dot (velocity w) (velocity v)) + (hehi : 1-dot (velocity w) (velocity v)≤8*σ^2) : + σ^2≤32*(θ^2+φ^2) ∧ θ^2≤32*(σ^2+φ^2) ∧ φ^2≤32*(σ^2+θ^2) := by + obtain ⟨he,hd,hD⟩ := cone_relative_deficit_triangle v w n hn + constructor + · linarith + constructor <;> linarith + +lemma cone_relative_bin_separated {v w n : Vec} {θ φ σ : ℝ} + (hn : ‖n‖=1) (hθ : 0≤θ) (hφ : 0≤φ) (hσ : 0≤σ) (hsep : 16*φ≤θ) + (hdlo : θ^2/2≤1-dot n (velocity v)) (hdhi : 1-dot n (velocity v)≤8*θ^2) + (hDlo : φ^2/2≤1-dot n (velocity w)) (hDhi : 1-dot n (velocity w)≤8*φ^2) + (helo : σ^2/2≤1-dot (velocity w) (velocity v)) + (hehi : 1-dot (velocity w) (velocity v)≤8*σ^2) : θ/8≤σ ∧ σ≤8*θ := by + obtain ⟨he,hd,_⟩ := cone_relative_bin_triangle hn hdlo hdhi hDlo hDhi helo hehi + have hsq := mul_self_le_mul_self (show 0≤16*φ by positivity) hsep + constructor <;> nlinarith + +lemma cone_relative_bin_upper {v w n : Vec} {θ φ σ κ : ℝ} + (hn : ‖n‖=1) (hθ : 0≤θ) (hφ : 0≤φ) (hσ : 0≤σ) (hκ : 0≤κ) (hsector : φ≤κ*θ) + (hdlo : θ^2/2≤1-dot n (velocity v)) (hdhi : 1-dot n (velocity v)≤8*θ^2) + (hDlo : φ^2/2≤1-dot n (velocity w)) (hDhi : 1-dot n (velocity w)≤8*φ^2) + (helo : σ^2/2≤1-dot (velocity w) (velocity v)) + (hehi : 1-dot (velocity w) (velocity v)≤8*σ^2) : σ≤8*(1+κ)*θ := by + have hh := (cone_relative_bin_triangle hn hdlo hdhi hDlo hDhi helo hehi).1 + have hsq := mul_self_le_mul_self hφ hsector + have hκθ : 0≤κ*θ^2 := mul_nonneg hκ (sq_nonneg θ) + have hu : 0≤8*(1+κ)*θ := by positivity + nlinarith [sq_nonneg (κ*θ)] + +lemma cappedRepresentative_factor_eight {i j : ℕ} + (hlo : cappedRepresentative i/8≤cappedRepresentative j) + (hhi : cappedRepresentative j≤8*cappedRepresentative i) : j ≤ i+3 ∧ i ≤ j+3 := by + have aux (a b : ℕ) (h : cappedRepresentative a/8≤cappedRepresentative b) : b≤a+3 := by + by_contra hb + have hab : a+4≤b := by omega + have hp := pow_le_pow_of_le_one (by norm_num : (0:ℝ)≤2⁻¹) + (by norm_num : (2:ℝ)⁻¹≤1) hab + rw [pow_add] at hp + change cappedRepresentative b≤cappedRepresentative a*((2:ℝ)⁻¹)^4 at hp + norm_num only [inv_pow,show (2:ℝ)^4=16 by norm_num] at hp + nlinarith [cappedRepresentative_pos a] + exact ⟨aux i j hlo,aux j i (by linarith)⟩ + +lemma cappedRepresentative_factor_eight_card (i N : ℕ) : + ((Finset.range N).filter (fun j=>cappedRepresentative i/8≤cappedRepresentative j ∧ + cappedRepresentative j≤8*cappedRepresentative i)).card≤7 := by + classical + have hsub : (Finset.range N).filter (fun j=>cappedRepresentative i/8≤cappedRepresentative j ∧ + cappedRepresentative j≤8*cappedRepresentative i) ⊆ Finset.Icc (i-3) (i+3) := by + intro j hj + have h := (Finset.mem_filter.mp hj).2 + have hh := cappedRepresentative_factor_eight h.1 h.2 + apply Finset.mem_Icc.mpr + omega + have hc := Finset.card_le_card hsub + rw [Nat.card_Icc] at hc + omega + +lemma physical_relative_separated_index {T w t r : ℝ} {V : ℝ→Vec} {J : Set ℝ} + {k : Fin 4→ℕ} {j : ℕ} {n : Sphere} {v : Vec} + (hsep : 16*cappedRepresentative (k 2)≤cappedRepresentative (k 1)) + (hb : (t,r,n)∈physicalBinBase V (relativeRepresentativeClosedBin T w k j) J) + (hv : v∈coneBinMomentumSet (relativeRepresentativeClosedBin T w k j) n.1 (velocity (V t))) : + j≤k 1+3 ∧ k 1≤j+3 := by + have hh := cone_relative_bin_separated (v:=v) (w:=V t) (n:=n.1) (sphere_norm n) + (cappedRepresentative_pos (k 1)).le (cappedRepresentative_pos (k 2)).le + (cappedRepresentative_pos j).le hsep hv.2.1.1 hv.2.1.2 + hb.2.2.2.2.1 hb.2.2.2.2.2 hv.2.2.1 hv.2.2.2 + exact cappedRepresentative_factor_eight hh.1 hh.2 + +lemma capped_positive_power_sum {x α : ℝ} (hx : 0j-j₀) S := by + intro i hi j hj hij + have hi' := hjmin i hi + have hj' := hjmin j hj + change i-j₀=j-j₀ at hij + omega + calc + _ ≤ ∑j∈S,(((2:ℝ)⁻¹)^α)^(j-j₀) := Finset.sum_le_sum hpoint + _ = ∑m∈S.image (fun j=>j-j₀),(((2:ℝ)⁻¹)^α)^m := (Finset.sum_image hinj).symm + _ ≤ ∑'m : ℕ,(((2:ℝ)⁻¹)^α)^m := + (summable_geometric_of_norm_lt_one hnorm).sum_le_tsum _ (fun _ _=>by positivity) + _ = _ := tsum_geometric_of_norm_lt_one hnorm + · have he : S=∅ := Finset.not_nonempty_iff_eq_empty.mp hne + rw [he,Finset.sum_empty] + exact inv_nonneg.mpr (sub_nonneg.mpr hbase1.le) + +lemma large_radius_magnetic_coefficient {H p ν θ φ : ℝ} + (hH : 0min (H*(2:ℝ)^k*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (H*(2:ℝ)^k)))) ∧ + (∑'k : ℤ,min (H*(2:ℝ)^k*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (H*(2:ℝ)^k))))≤ + dyadicBalanceConstant 1 (1/2)*(p*ν^(4/3:ℝ)*θ^(-(2/3:ℝ))*φ^(1/3:ℝ)) := by + dsimp only + let ν := min θ σ + have hν : 0<ν := lt_min hθ hσ + let a := H*p^2*ν^2*φ + let b := Real.sqrt p*ν/(θ*Real.sqrt H) + have ha : 0 ring + have hs := dyadic_power_min_summable ha.le hb.le (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1/2) + have ht := dyadic_balance ha hb (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1/2) + simp_rw [he] at hs ht + refine ⟨hs,?_⟩ + rw [show (1/2:ℝ)/(1+1/2)=1/3 by norm_num, + show (1:ℝ)/(1+1/2)=2/3 by norm_num] at ht + change _≤dyadicBalanceConstant 1 (1/2)*(a^(1/3:ℝ)*b^(2/3:ℝ)) at ht + dsimp only [a,b] at ht + rwa [large_radius_magnetic_coefficient hH hp hν hθ hφ] at ht + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/ExtendedLorentz.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/ExtendedLorentz.lean new file mode 100644 index 0000000000000000000000000000000000000000..f41f228b5d6f2a40c6314ced0b007b76cf4ce254 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/ExtendedLorentz.lean @@ -0,0 +1,461 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeMotion + +namespace OAI + +noncomputable section +open MeasureTheory Set +open scoped ContDiff + +namespace RVM +open scoped Topology + +lemma exists_local_retarded_branch {X Y : ℝ → Vec} {s t : ℝ} {a : Vec} + (hst : s < t) (hcone : t-s = ‖X t-Y s‖) + (hX : ContDiffAt ℝ 1 X t) (hY : ContDiffAt ℝ 1 Y s) + (hXd : HasDerivAt X a t) (ha : ‖a‖ < 1) : + ∃ τ : ℝ → ℝ, τ s = t ∧ ContDiffAt ℝ 1 τ s ∧ + ∀ᶠ z in nhds s, z < τ z ∧ τ z-z = ‖X (τ z)-Y z‖ := by + have hF := contDiffAt_squaredCone hX hY + have hbound := dot_le_norm (X t-Y s) a + rw [← hcone] at hbound + have hpos : 0 < 2*(t-s)-2*dot (X t-Y s) a := by + have hgap := mul_pos (sub_pos.mpr hst) (sub_pos.mpr ha) + nlinarith + have hinv : (fderiv ℝ (squaredCone X Y) (s,t) ∘L + ContinuousLinearMap.inr ℝ ℝ ℝ).IsInvertible := by + apply scalar_clm_invertible + rw [receiver_partial_squaredCone hX hY hXd] + exact ne_of_gt hpos + let τ := hF.implicitFunction one_ne_zero hinv + have hτ : τ s = t := hF.implicitFunction_apply_self one_ne_zero hinv + have hτc : ContDiffAt ℝ 1 τ s := hF.contDiffAt_implicitFunction one_ne_zero hinv + refine ⟨τ, hτ, hτc, ?_⟩ + have hsign : 0 < τ s-s := by rw [hτ]; exact sub_pos.mpr hst + have hevent : ∀ᶠ z in nhds s, 0 < τ z-z := + (hτc.continuousAt.sub continuousAt_id) (isOpen_Ioi.mem_nhds hsign) + filter_upwards [hF.eventually_apply_implicitFunction one_ne_zero hinv, hevent] + with z hz hzn + refine ⟨by linarith, ?_⟩ + dsimp [squaredCone] at hz + rw [hcone, sub_self] at hz + change (τ z-z)^2 - ‖X (τ z)-Y z‖^2 = 0 at hz + have hn := norm_nonneg (X (τ z)-Y z) + nlinarith + +lemma derivative_retarded_branch {X Y : ℝ → Vec} {τ : ℝ → ℝ} + {s t k : ℝ} {a u n : Vec} + (hτ : τ s = t) (hst : s < t) (hgeom : X t-Y s = (t-s) • n) + (hD : 1-dot n a ≠ 0) + (hXd : HasDerivAt X a t) (hYd : HasDerivAt Y u s) + (hτd : HasDerivAt τ k s) + (heq : ∀ᶠ z in nhds s, (τ z-z)^2 = ‖X (τ z)-Y z‖^2) : + k = (1-dot n u)/(1-dot n a) := by + have hXτ : HasDerivAt (fun z => X (τ z)) (k • a) s := by + exact (hτ ▸ hXd).scomp s hτd + have hleft := (hτd.sub (hasDerivAt_id s)).pow 2 + have hright := ((hXτ.sub hYd).norm_sq) + have hsame := (hleft.congr_of_eventuallyEq (Filter.EventuallyEq.symm heq)).unique hright + simp only [Pi.sub_apply, id_eq, hτ, Nat.cast_ofNat, Nat.reduceSub, pow_one, ← dot_eq_inner, + hgeom, dot_smul_left, dot_sub_right, dot_smul_right] at hsame + apply (eq_div_iff hD).mpr + have hr : t-s ≠ 0 := ne_of_gt (sub_pos.mpr hst) + apply (mul_left_cancel₀ hr) + nlinarith + +lemma exists_local_retarded_branch_with_derivative {X Y : ℝ → Vec} + {s t : ℝ} {a u n : Vec} + (hst : s < t) (hgeom : X t-Y s = (t-s) • n) (hn : ‖n‖ = 1) + (hX : ContDiffAt ℝ 1 X t) (hY : ContDiffAt ℝ 1 Y s) + (hXd : HasDerivAt X a t) (hYd : HasDerivAt Y u s) (ha : ‖a‖ < 1) : + ∃ τ : ℝ → ℝ, τ s = t ∧ ContDiffAt ℝ 1 τ s ∧ + HasDerivAt τ ((1-dot n u)/(1-dot n a)) s ∧ + ∀ᶠ z in nhds s, z < τ z ∧ τ z-z = ‖X (τ z)-Y z‖ := by + have hcone : t-s = ‖X t-Y s‖ := by + rw [hgeom, norm_smul, Real.norm_eq_abs, abs_of_pos (sub_pos.mpr hst), hn, mul_one] + have hD : 1-dot n a ≠ 0 := by + have hb := dot_le_norm n a + rw [hn, one_mul] at hb + linarith + obtain ⟨τ, hτ, hτc, hevent⟩ := exists_local_retarded_branch hst hcone hX hY hXd ha + have hτd := (hτc.differentiableAt one_ne_zero).hasDerivAt + have heq : ∀ᶠ z in nhds s, (τ z-z)^2 = ‖X (τ z)-Y z‖^2 := by + filter_upwards [hevent] with z hz using congrArg (fun r : ℝ => r^2) hz.2 + have hk := derivative_retarded_branch hτ hst hgeom hD hXd hYd hτd heq + rw [hk] at hτd + exact ⟨τ, hτ, hτc, hτd, hevent⟩ + +lemma hasDerivAt_cone_direction {X Y : ℝ → Vec} {τ : ℝ → ℝ} + {s t k : ℝ} {a u n : Vec} + (hτ : τ s = t) (hst : s < t) (hgeom : X t-Y s = (t-s) • n) + (hXd : HasDerivAt X a t) (hYd : HasDerivAt Y u s) + (hτd : HasDerivAt τ k s) : + HasDerivAt (fun z => (τ z-z)⁻¹ • (X (τ z)-Y z)) + ((t-s)⁻¹ • (k • (a-n)+n-u)) s := by + have hXτ : HasDerivAt (fun z => X (τ z)) (k • a) s := + (hτ ▸ hXd).scomp s hτd + have hrad := hτd.sub (hasDerivAt_id s) + have hr : τ s-s ≠ 0 := by simpa [hτ] using ne_of_gt (sub_pos.mpr hst) + have h := (hrad.inv hr).smul (hXτ.sub hYd) + convert h using 1 <;> try rfl + simp only [Pi.inv_apply, Pi.sub_apply, id_eq, hτ, hgeom] + ext i + simp only [PiLp.add_apply, PiLp.sub_apply, PiLp.smul_apply, smul_eq_mul] + have hts : t-s ≠ 0 := ne_of_gt (sub_pos.mpr hst) + field_simp + ring + +lemma hasDerivAt_particle_energy {V : ℝ → Vec} {K : Vec} {s : ℝ} + (hV : HasDerivAt V K s) : + HasDerivAt (fun t => q (V t)) (dot (velocity (V s)) K) s := by + have hp : 1+‖V s‖^2 ≠ 0 := ne_of_gt (by positivity) + have h := ((hV.norm_sq).const_add 1).sqrt hp + convert h using 1 <;> try rfl + rw [velocity, dot_smul_left, dot_eq_inner] + dsimp [q] + have hq : Real.sqrt (1+‖V s‖^2) ≠ 0 := ne_of_gt (q_pos (V s)) + field_simp + +lemma hasDerivAt_particle_velocity {V : ℝ → Vec} {K : Vec} {s : ℝ} + (hV : HasDerivAt V K s) : + HasDerivAt (fun t => velocity (V t)) + ((q (V s))⁻¹ • (K-dot (velocity (V s)) K • velocity (V s))) s := by + have hq := hasDerivAt_particle_energy hV + have h := (hq.inv (ne_of_gt (q_pos (V s)))).smul hV + convert h using 1 <;> try rfl + ext i + simp only [Pi.inv_apply, velocity, PiLp.sub_apply, PiLp.add_apply, PiLp.smul_apply, smul_eq_mul] + ring + +lemma dot_cross_self_left (a b : Vec) : dot a (cross a b) = 0 := by + simp [dot, cross, Fin.sum_univ_succ] + ring + +lemma hasDerivAt_lorentz_energy {V : ℝ → Vec} {E B : Vec} {s : ℝ} + (hV : HasDerivAt V (E+cross (velocity (V s)) B) s) : + HasDerivAt (fun t => q (V t)) (dot (velocity (V s)) E) s := by + simpa only [dot_add_right, dot_cross_self_left, add_zero] using hasDerivAt_particle_energy hV + +lemma contDiff_q {k : ℕ∞ω} : ContDiff ℝ k q := by + exact ((contDiff_const : ContDiff ℝ k (fun _ : Vec => (1 : ℝ))).add + (contDiff_id.norm_sq ℝ)).sqrt (fun v => by positivity) + +lemma contDiff_velocity {k : ℕ∞ω} : ContDiff ℝ k velocity := by + exact (contDiff_q.inv (fun v => ne_of_gt (q_pos v))).smul contDiff_id + +lemma contDiff_cross {k : ℕ∞ω} : ContDiff ℝ k (fun z : Vec × Vec => cross z.1 z.2) := by + apply contDiff_euclidean.mpr + intro i + fin_cases i + · change ContDiff ℝ k (fun z : Vec × Vec => z.1 1 * z.2 2 - z.1 2 * z.2 1) + fun_prop + · change ContDiff ℝ k (fun z : Vec × Vec => z.1 2 * z.2 0 - z.1 0 * z.2 2) + fun_prop + · change ContDiff ℝ k (fun z : Vec × Vec => z.1 0 * z.2 1 - z.1 1 * z.2 0) + fun_prop + +def extendedLorentz (E B : Field) (z : ℝ × Phase) : ℝ × Phase := + (1, velocity z.2.2, E (z.1,z.2.1)+cross (velocity z.2.2) (B (z.1,z.2.1))) + +lemma contDiffAt_extendedLorentz {E B : Field} {t : ℝ} {x v : Vec} + (hE : ContDiffAt ℝ 1 E (t,x)) (hB : ContDiffAt ℝ 1 B (t,x)) : + ContDiffAt ℝ 1 (extendedLorentz E B) (t,x,v) := by + have htx : ContDiffAt ℝ 1 (fun z : ℝ × Phase => (z.1,z.2.1)) (t,x,v) := + contDiffAt_fst.prodMk (contDiffAt_snd.fst) + have hv : ContDiffAt ℝ 1 (fun z : ℝ × Phase => velocity z.2.2) (t,x,v) := + contDiff_velocity.contDiffAt.comp _ (contDiffAt_snd.snd) + have hE' : ContDiffAt ℝ 1 (fun z : ℝ × Phase => E (z.1,z.2.1)) (t,x,v) := + hE.comp (t,x,v) htx + have hB' : ContDiffAt ℝ 1 (fun z : ℝ × Phase => B (z.1,z.2.1)) (t,x,v) := + hB.comp (t,x,v) htx + exact contDiffAt_const.prodMk (hv.prodMk + (hE'.add (contDiff_cross.contDiffAt.comp (t,x,v) (hv.prodMk hB')))) + +lemma exists_local_characteristic {E B : Field} {t₀ : ℝ} {x₀ v₀ : Vec} + (hE : ContDiffAt ℝ 1 E (t₀,x₀)) (hB : ContDiffAt ℝ 1 B (t₀,x₀)) : + ∃ X V : ℝ → Vec, X t₀ = x₀ ∧ V t₀ = v₀ ∧ ∃ ε > (0 : ℝ), + ∀ t ∈ Ioo (t₀-ε) (t₀+ε), + HasDerivAt X (velocity (V t)) t ∧ + HasDerivAt V (E (t,X t)+cross (velocity (V t)) (B (t,X t))) t := by + obtain ⟨α, hα₀, ε, hε, hα⟩ := + (contDiffAt_extendedLorentz (v := v₀) hE hB).exists_forall_mem_closedBall_exists_eq_forall_mem_Ioo_hasDerivAt₀ t₀ + have ht₀ : t₀ ∈ Ioo (t₀-ε) (t₀+ε) := by constructor <;> linarith + have hdtime (t) (ht : t ∈ Ioo (t₀-ε) (t₀+ε)) : + HasDerivAt (fun s => (α s).1-s) 0 t := by + have h : HasDerivAt (fun s => (α s).1) 1 t := by + simpa [extendedLorentz] using (hα t ht).hasFDerivAt.fst.hasDerivAt + convert h.sub (hasDerivAt_id t) using 1 <;> try rfl + norm_num + have htime (t) (ht : t ∈ Ioo (t₀-ε) (t₀+ε)) : (α t).1 = t := by + have hc := isOpen_Ioo.is_const_of_deriv_eq_zero (convex_Ioo (t₀-ε) (t₀+ε)).isPreconnected + (fun s hs => (hdtime s hs).differentiableAt.differentiableWithinAt) + (fun s hs => (hdtime s hs).deriv) ht ht₀ + have hz : (α t).1-t = 0 := by simpa [hα₀] using hc + exact sub_eq_zero.mp hz + refine ⟨fun t => (α t).2.1, fun t => (α t).2.2, ?_, ?_, ε, hε, ?_⟩ + · simp [hα₀] + · simp [hα₀] + · intro t ht + constructor + · simpa [extendedLorentz] using (hα t ht).hasFDerivAt.snd.fst.hasDerivAt + · simpa [extendedLorentz, htime t ht] using (hα t ht).hasFDerivAt.snd.snd.hasDerivAt + +lemma sum_basis (v : Vec) : ∑ i : Fin 3, v i • basis i = v := by + ext j + simp [basis, Pi.single_apply] + +lemma clm_sum_basis (L : Vec →L[ℝ] ℝ) (v : Vec) : + L v = ∑ i : Fin 3, v i * L (basis i) := by + conv_lhs => rw [← sum_basis v] + simp only [map_sum, map_smul, smul_eq_mul] + +lemma full_directional_derivative {f : Particle} {t : ℝ} {x v u K : Vec} + (hf : DifferentiableAt ℝ f (t,x,v)) : + fderiv ℝ f (t,x,v) (1,u,K) = + deriv (fun t' => f (t',x,v)) t + + (∑ i : Fin 3, u i * spatialPartial (fun y => f (t,y,v)) x i) + + (∑ i : Fin 3, K i * spatialPartial (fun v' => f (t,x,v')) v i) := by + let L := fderiv ℝ f (t,x,v) + have hT := hf.hasFDerivAt.comp_hasDerivAt t + ((hasDerivAt_id t).prodMk (hasDerivAt_const t (x,v))) + have hιX : HasFDerivAt (fun y : Vec => (t,y,v)) + ((0 : Vec →L[ℝ] ℝ).prod ((ContinuousLinearMap.id ℝ Vec).prod 0)) x := by + exact (hasFDerivAt_const t x).prodMk + ((hasFDerivAt_id x).prodMk (hasFDerivAt_const v x)) + have hιV : HasFDerivAt (fun y : Vec => (t,x,y)) + ((0 : Vec →L[ℝ] ℝ).prod ((0 : Vec →L[ℝ] Vec).prod (ContinuousLinearMap.id ℝ Vec))) v := by + exact (hasFDerivAt_const t v).prodMk + ((hasFDerivAt_const x v).prodMk (hasFDerivAt_id v)) + have hX := hf.hasFDerivAt.comp x hιX + have hV := hf.hasFDerivAt.comp v hιV + have ht : deriv (fun t' => f (t',x,v)) t = L (1,0,0) := by + convert hT.deriv using 1 + rfl + have hx : fderiv ℝ (fun y => f (t,y,v)) x u = L (0,u,0) := by + have h := congrArg (fun F : Vec →L[ℝ] ℝ => F u) hX.fderiv + convert h using 1 <;> rfl + have hv : fderiv ℝ (fun v' => f (t,x,v')) v K = L (0,0,K) := by + have h := congrArg (fun F : Vec →L[ℝ] ℝ => F K) hV.fderiv + convert h using 1 <;> rfl + change L (1,u,K) = deriv (fun t' => f (t',x,v)) t + + (∑ i : Fin 3, u i * fderiv ℝ (fun y => f (t,y,v)) x (basis i)) + + (∑ i : Fin 3, K i * fderiv ℝ (fun v' => f (t,x,v')) v (basis i)) + rw [← clm_sum_basis, ← clm_sum_basis, ht, hx, hv] + rw [← map_add, ← map_add] + congr 1 + ext <;> simp + +lemma hasDerivAt_particle_along_curve {f : Particle} {X V : ℝ → Vec} + {t : ℝ} {u K : Vec} (hf : DifferentiableAt ℝ f (t,X t,V t)) + (hX : HasDerivAt X u t) (hV : HasDerivAt V K t) : + HasDerivAt (fun s => f (s,X s,V s)) + (deriv (fun s => f (s,X t,V t)) t + + (∑ i : Fin 3, u i * spatialPartial (fun y => f (t,y,V t)) (X t) i) + + (∑ i : Fin 3, K i * spatialPartial (fun v' => f (t,X t,v')) (V t) i)) t := by + have h := hf.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_id t).prodMk (hX.prodMk hV)) + rw [full_directional_derivative hf] at h + exact h + +lemma particle_differentiableAt_positive {s : Solution} + (hreg : ContDiffOn ℝ 1 s.f particleHalfSpace) {t : ℝ} (ht : 0 < t) (x v : Vec) : + DifferentiableAt ℝ s.f (t,x,v) := by + have hnhds : particleHalfSpace ∈ nhds (t,x,v) := by + have hopen : IsOpen {z : ℝ × Phase | 0 < z.1} := + isOpen_lt continuous_const continuous_fst + apply Filter.mem_of_superset (hopen.mem_nhds ht) + intro z hz + change 0 ≤ z.1 + exact le_of_lt hz + exact ((hreg (t,x,v) ht.le).contDiffAt hnhds).differentiableAt (by norm_num) + +lemma hasDerivAt_transport_zero {s : Solution} {X V : ℝ → Vec} {t : ℝ} + (hreg : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : Equations s) (ht : 0 < t) + (hX : HasDerivAt X (velocity (V t)) t) + (hV : HasDerivAt V (s.E (t,X t) + cross (velocity (V t)) (s.B (t,X t))) t) : + HasDerivAt (fun r => s.f (r,X r,V r)) 0 t := by + have hf := hasDerivAt_particle_along_curve + (particle_differentiableAt_positive hreg ht (X t) (V t)) hX hV + have hpde := (heq t ht.le).1 (X t) (V t) + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at hpde + exact hpde ▸ hf + +lemma transport_on_characteristic {s : Solution} {X V : ℝ → Vec} {a b : ℝ} + (hreg : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : Equations s) + (ha : 0 ≤ a) (hab : a ≤ b) + (hXc : ContinuousOn X (Icc a b)) (hVc : ContinuousOn V (Icc a b)) + (hX : ∀ t ∈ Ioo a b, HasDerivAt X (velocity (V t)) t) + (hV : ∀ t ∈ Ioo a b, + HasDerivAt V (s.E (t,X t) + cross (velocity (V t)) (s.B (t,X t))) t) : + s.f (b,X b,V b) = s.f (a,X a,V a) := by + rcases hab.eq_or_lt with h | h + · simp [h] + have hc : ContinuousOn (fun t => s.f (t,X t,V t)) (Icc a b) := + hreg.continuousOn.comp (continuousOn_id.prodMk (hXc.prodMk hVc)) + (fun t ht => ha.trans ht.1) + have hd : ∀ t ∈ Ioo a b, HasDerivAt (fun r => s.f (r,X r,V r)) (0 : ℝ) t := + fun t ht => hasDerivAt_transport_zero hreg heq (ha.trans_lt ht.1) (hX t ht) (hV t ht) + obtain ⟨t, ht, he⟩ := exists_hasDerivAt_eq_slope (fun r => s.f (r,X r,V r)) (fun _ => 0) h hc hd + have hnum : s.f (b,X b,V b) - s.f (a,X a,V a) = 0 := by + exact (div_eq_zero_iff.mp he.symm).resolve_right (sub_ne_zero.mpr (ne_of_gt h)) + exact sub_eq_zero.mp hnum + +lemma dot_cross_cycle (a b c : Vec) : dot a (cross b c) = dot b (cross c a) := by + simp [dot, cross, Fin.sum_univ_succ] + ring + +lemma cross_antisymm (a b : Vec) : cross a b = -cross b a := by + ext i + fin_cases i <;> simp [cross] <;> ring + +lemma cross_dot_square (a b : Vec) : + dot (cross a b) (cross a b) = dot a a * dot b b - (dot a b)^2 := by + simp [dot, cross, Fin.sum_univ_succ] + ring + +lemma norm_cross_le (a b : Vec) : ‖cross a b‖ ≤ ‖a‖*‖b‖ := by + have h := cross_dot_square a b + simp only [dot_self] at h + nlinarith [norm_nonneg (cross a b), norm_nonneg a, norm_nonneg b, + mul_nonneg (norm_nonneg a) (norm_nonneg b), sq_nonneg (dot a b)] + +lemma poynting_norm_le_energy (E B : Vec) : + ‖cross E B‖ ≤ (‖E‖^2+‖B‖^2)/2 := by + have h := norm_cross_le E B + nlinarith [sq_nonneg (‖E‖-‖B‖)] + +lemma field_cone_energy_identity (E B n : Vec) (hn : ‖n‖ = 1) : + (‖E‖^2+‖B‖^2)/2-dot n (cross E B) = + (‖E+cross n B‖^2+(dot n B)^2)/2 := by + have hcross := cross_dot_square n B + rw [dot_self, dot_self, dot_self, hn] at hcross + rw [norm_add_sq_real, ← dot_eq_inner] + have he : dot E (cross n B) = -dot n (cross E B) := by + rw [dot_cross_cycle, cross_antisymm B E] + simp [dot, Finset.sum_neg_distrib] + rw [he] + nlinarith + +lemma good_field_square_le_flux (E B n : Vec) (hn : ‖n‖ = 1) : + (‖E+cross n B‖+|dot n B|)^2 ≤ + 4*((‖E‖^2+‖B‖^2)/2-dot n (cross E B)) := by + rw [field_cone_energy_identity E B n hn] + nlinarith [sq_abs (dot n B), sq_nonneg (‖E+cross n B‖-|dot n B|)] + +lemma fderiv_velocity_apply (v h : Vec) : + fderiv ℝ velocity v h = (q v)⁻¹ • (h-dot (velocity v) h • velocity v) := by + have hc : HasDerivAt (fun r : ℝ => v+r • h) h 0 := by + have hh := (hasDerivAt_const (0 : ℝ) v).add + ((hasDerivAt_id (0 : ℝ)).smul_const h) + change HasDerivAt (fun r : ℝ => v+r • h) (0+(1 : ℝ) • h) 0 at hh + simpa only [zero_add, one_smul] using hh + have hv : HasFDerivAt velocity (fderiv ℝ velocity v) (v+(0 : ℝ) • h) := by + simpa only [zero_smul, add_zero] using + (contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v).hasFDerivAt + have h₁ := hv.comp_hasDerivAt 0 hc + have h₂ := hasDerivAt_particle_velocity hc + have he := h₁.unique h₂ + simpa using he + +lemma spatialPartial_velocity (v : Vec) (i j : Fin 3) : + spatialPartial (fun w => velocity w j) v i = + (q v)⁻¹ * ((if i=j then 1 else 0)-velocity v i*velocity v j) := by + have hv : DifferentiableAt ℝ velocity v := contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v + have hj := (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) j).hasFDerivAt.comp v hv.hasFDerivAt + have hp := congrArg (fun L : Vec →L[ℝ] ℝ => L (basis i)) hj.fderiv + have h : spatialPartial (fun w => velocity w j) v i = + (fderiv ℝ velocity v (basis i)) j := by + convert hp using 1 <;> rfl + rw [h, fderiv_velocity_apply] + simp [basis, dot, eq_comm] + +lemma spatialPartial_mul {f g : Vec → ℝ} {x : Vec} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) (i : Fin 3) : + spatialPartial (fun y => f y*g y) x i = + f x*spatialPartial g x i+g x*spatialPartial f x i := by + change fderiv ℝ (f*g) x (basis i) = _ + rw [fderiv_mul hf hg] + rfl + +lemma spatialPartial_sub {f g : Vec → ℝ} {x : Vec} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) (i : Fin 3) : + spatialPartial (fun y => f y-g y) x i = + spatialPartial f x i-spatialPartial g x i := by + change fderiv ℝ (f-g) x (basis i) = _ + rw [fderiv_sub hf hg] + rfl + +lemma divergence_magnetic_force (v B : Vec) : + divergence (fun w => cross (velocity w) B) v = 0 := by + have hd (j : Fin 3) : DifferentiableAt ℝ (fun w : Vec => velocity w j) v := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) j).differentiableAt.comp v + (contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v) + simp only [divergence, Fin.sum_univ_succ] + change spatialPartial (fun w => velocity w 1 * B 2 - velocity w 2 * B 1) v 0 + + (spatialPartial (fun w => velocity w 2 * B 0 - velocity w 0 * B 2) v 1 + + (spatialPartial (fun w => velocity w 0 * B 1 - velocity w 1 * B 0) v 2 + 0)) = 0 + simp only [spatialPartial_sub ((hd _).mul_const _) ((hd _).mul_const _), + spatialPartial_mul (hd _) (differentiableAt_const _), spatialPartial_velocity] + simp [spatialPartial] + ring + +lemma divergence_cross {F G : Vec → Vec} {x : Vec} + (hF : DifferentiableAt ℝ F x) (hG : DifferentiableAt ℝ G x) : + divergence (fun y => cross (F y) (G y)) x = + dot (G x) (curl F x) - dot (F x) (curl G x) := by + have hf (i : Fin 3) : DifferentiableAt ℝ (fun y => F y i) x := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hF + have hg (i : Fin 3) : DifferentiableAt ℝ (fun y => G y i) x := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hG + simp only [divergence, Fin.sum_univ_succ] + change spatialPartial (fun y => F y 1 * G y 2 - F y 2 * G y 1) x 0 + + (spatialPartial (fun y => F y 2 * G y 0 - F y 0 * G y 2) x 1 + + (spatialPartial (fun y => F y 0 * G y 1 - F y 1 * G y 0) x 2+0)) = _ + have hm (i j k : Fin 3) : + spatialPartial ((fun y => F y i) * (fun y => G y j)) x k = + F x i * spatialPartial (fun y => G y j) x k + + G x j * spatialPartial (fun y => F y i) x k := + spatialPartial_mul (hf i) (hg j) k + have hs (i j k l r : Fin 3) := spatialPartial_sub ((hf i).mul (hg j)) ((hf k).mul (hg l)) r + simp only [Pi.mul_apply] at hs + simp only [hs, hm] + simp [dot, curl, Fin.sum_univ_succ] + ring + +lemma hasDerivAt_field_energy {E B : ℝ → Vec} {e b : Vec} {t : ℝ} + (he : HasDerivAt E e t) (hb : HasDerivAt B b t) : + HasDerivAt (fun s => (‖E s‖^2+‖B s‖^2)/2) + (dot (E t) e + dot (B t) b) t := by + convert (he.norm_sq.add hb.norm_sq).div_const 2 using 1 + rw [← dot_eq_inner, ← dot_eq_inner] + ring + +lemma maxwell_energy_balance {E B : Field} {j : Vec} {t : ℝ} {x : Vec} + (hE : DifferentiableAt ℝ E (t,x)) (hB : DifferentiableAt ℝ B (t,x)) + (he : deriv (fun s => E (s,x)) t - curl (fun y => B (t,y)) x = -j) + (hb : deriv (fun s => B (s,x)) t + curl (fun y => E (t,y)) x = 0) : + deriv (fun s => (‖E (s,x)‖^2+‖B (s,x)‖^2)/2) t + + divergence (fun y => cross (E (t,y)) (B (t,y))) x = -dot (E (t,x)) j := by + have heT : DifferentiableAt ℝ (fun s => E (s,x)) t := + hE.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hbT : DifferentiableAt ℝ (fun s => B (s,x)) t := + hB.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have heX : DifferentiableAt ℝ (fun y => E (t,y)) x := + hE.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hbX : DifferentiableAt ℝ (fun y => B (t,y)) x := + hB.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + rw [(hasDerivAt_field_energy heT.hasDerivAt hbT.hasDerivAt).deriv, + divergence_cross heX hbX] + have he' : deriv (fun s => E (s,x)) t = curl (fun y => B (t,y)) x-j := by + apply sub_eq_iff_eq_add.mp at he + simpa only [sub_eq_add_neg, add_comm] using he + have hb' : deriv (fun s => B (s,x)) t = -curl (fun y => E (t,y)) x := + eq_neg_of_add_eq_zero_left hb + rw [he', hb'] + simp only [dot, PiLp.sub_apply, PiLp.neg_apply, mul_sub, mul_neg, + Finset.sum_sub_distrib, Finset.sum_neg_distrib] + ring + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/FlowDerivative.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/FlowDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a4c36f909c4d038bb2b8a3373d968bb4b57007a --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/FlowDerivative.lean @@ -0,0 +1,343 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.Variational + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory Metric +open scoped Topology Pointwise +open Set MeasureTheory Filter +open Set MeasureTheory Metric ODE +open scoped Topology NNReal + +namespace RVM +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma hasFDerivAt_variational_flow {f : E → E} (hf : ContDiff ℝ 2 f) + {x₀ : E} {r R ε : ℝ} (hε : 0 < ε) + {α : E → ℝ → E} {A : E → ℝ → (E →L[ℝ] E)} {L : ℝ≥0} + (hsol : ∀ x ∈ Metric.closedBall x₀ r, α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (α x) (f (α x t)) (Icc (-ε) ε) t) ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (A x) + ((fderiv ℝ f (α x t)).comp (A x t)) (Icc (-ε) ε) t) ∧ + ∀ t, α x t ∈ Metric.closedBall x₀ R) + (hLip : ∀ t ∈ Icc (-ε) ε, LipschitzOnWith L (α · t) (Metric.closedBall x₀ r)) + {x : E} (hx : x ∈ Metric.ball x₀ r) {t : ℝ} (ht : t ∈ Icc 0 ε) : + HasFDerivAt (fun y => α y t) (A x t) x := by + have hx' := Metric.ball_subset_closedBall hx + have hdf : ContDiff ℝ 1 (fderiv ℝ f) := hf.fderiv_right (by norm_num) + obtain ⟨LD,hLD⟩ := hdf.contDiffOn.exists_lipschitzOnWith (by norm_num) + (convex_closedBall x₀ R) (isCompact_closedBall x₀ R) + obtain ⟨M,hM⟩ := (isCompact_closedBall x₀ R).bddAbove_image hdf.continuous.norm.continuousOn + let K := max 1 M + have hK : 0 < K := lt_of_lt_of_le zero_lt_one (le_max_left _ _) + let C : ℝ := ((LD : ℝ)*(L : ℝ)^2)/K * (Real.exp (K*t)-1) + have hC : 0 ≤ C := by + dsimp [C] + exact mul_nonneg (div_nonneg (mul_nonneg LD.2 (sq_nonneg _)) hK.le) + (sub_nonneg.mpr (Real.one_le_exp_iff.mpr (mul_nonneg hK.le ht.1))) + apply hasFDerivAt_of_quadratic_bound hC + filter_upwards [Metric.closedBall_mem_nhds_of_mem hx] with y hy + have hsub : Icc 0 ε ⊆ Icc (-ε) ε := Icc_subset_Icc (by linarith) le_rfl + have hxs := hsol x hx' + have hys := hsol y hy + have hdα (z : E) (hz : z ∈ Metric.closedBall x₀ r) (s : ℝ) (hs : s ∈ Ico 0 ε) : + HasDerivWithinAt (α z) (f (α z s)) (Ici s) s := by + exact ((hsol z hz).2.2.1 s (hsub ⟨hs.1,hs.2.le⟩)).hasDerivAt + (Icc_mem_nhds (by linarith [hs.1]) hs.2) |>.hasDerivWithinAt + have hdA (s : ℝ) (hs : s ∈ Ico 0 ε) : + HasDerivWithinAt (A x) ((fderiv ℝ f (α x s)).comp (A x s)) (Ici s) s := by + exact (hxs.2.2.2.1 s (hsub ⟨hs.1,hs.2.le⟩)).hasDerivAt + (Icc_mem_nhds (by linarith [hs.1]) hs.2) |>.hasDerivWithinAt + have hb := variational_remainder_bound + ((HasDerivWithinAt.continuousOn hxs.2.2.1).mono hsub) + ((HasDerivWithinAt.continuousOn hys.2.2.1).mono hsub) + ((HasDerivWithinAt.continuousOn hxs.2.2.2.1).mono hsub) + (hdα x hx') (hdα y hy) hdA + (v := y-x) (K := K) (ε := (LD : ℝ)*(L : ℝ)^2*‖y-x‖^2) + (by simp [hxs.1,hys.1,hxs.2.1]) + (fun s _ => (hM ⟨α x s,hxs.2.2.2.2 s,rfl⟩).trans (le_max_right _ _)) + (fun s hs => ?_) + · have hb' := hb t ht + apply hb'.trans_eq + rw [gronwallBound_of_K_ne_0 hK.ne'] + dsimp [C] + ring_nf + · have hTaylor := taylor_bound_lipschitz_derivative + (convex_closedBall x₀ R) (fun z _ => (hf.differentiable (by norm_num)) z) + hLD (hxs.2.2.2.2 s) (hys.2.2.2.2 s) + apply hTaylor.trans + have hn := (hLip s (hsub ⟨hs.1,hs.2.le⟩)).norm_sub_le hy hx' + have hsq : ‖α y s-α x s‖^2 ≤ ((L : ℝ)*‖y-x‖)^2 := + sq_le_sq₀ (norm_nonneg _) (mul_nonneg L.2 (norm_nonneg _)) |>.mpr hn + calc + _ ≤ (LD : ℝ)*((L : ℝ)*‖y-x‖)^2 := mul_le_mul_of_nonneg_left hsq LD.2 + _ = _ := by ring + +lemma exists_local_differentiable_flow {f : E → E} (hf : ContDiff ℝ 2 f) (x₀ : E) : + ∃ ε > (0 : ℝ), ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ Metric.ball x₀ (1/2 : ℝ), α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (α x) (f (α x t)) (Icc (-ε) ε) t) ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (A x) + ((fderiv ℝ f (α x t)).comp (A x t)) (Icc (-ε) ε) t) ∧ + ∀ t ∈ Icc 0 ε, HasFDerivAt (fun y => α y t) (A x t) x) := by + obtain ⟨ε,hε,α,A,L,hsol,hLip⟩ := exists_local_variational_flow hf x₀ + refine ⟨ε,hε,α,A,?_⟩ + intro x hx + have h := hsol x (Metric.ball_subset_closedBall hx) + exact ⟨h.1,h.2.1,h.2.2.1,h.2.2.2.1, + fun t ht => hasFDerivAt_variational_flow hf hε hsol hLip hx ht⟩ +end RVM + +open Set MeasureTheory + +namespace RVM + +def determinantMultilinear (ι : Type*) [Fintype ι] [DecidableEq ι] : + ContinuousMultilinearMap ℝ (fun _ : ι => ι → ℝ) ℝ where + toMultilinearMap := Matrix.detRowAlternating.toMultilinearMap + cont := continuous_id.matrix_det + +lemma determinant_derivative {ι : Type*} [Fintype ι] [DecidableEq ι] + {A : ℝ → Matrix ι ι ℝ} {A' : Matrix ι ι ℝ} {t : ℝ} + (hA : HasDerivAt A A' t) : + HasDerivAt (fun s => (A s).det) + (∑ i, ((A t).updateRow i (A' i)).det) t := by + have h := ((determinantMultilinear ι).hasFDerivAt (A t)).comp_hasDerivAt t hA + have hd : ((determinantMultilinear ι).linearDeriv (A t)) A' = + ∑ i, ((A t).updateRow i (A' i)).det := by + erw [ContinuousMultilinearMap.linearDeriv_apply] + rfl + rw [hd] at h + exact h + +lemma determinant_row_mul_derivative {ι : Type*} [Fintype ι] [DecidableEq ι] + (A C : Matrix ι ι ℝ) : + (∑ i, (A.updateRow i ((C*A) i)).det) = C.trace * A.det := by + have hrow (i : ι) : (C*A) i = ∑ j, C i j • A j := by + ext k + simp [Matrix.mul_apply,Finset.sum_apply] + simp_rw [hrow,Matrix.det_updateRow_sum,smul_eq_mul] + rw [← Finset.sum_mul] + rfl + +lemma determinant_variational_derivative {ι : Type*} [Fintype ι] [DecidableEq ι] + {A : ℝ → Matrix ι ι ℝ} {C : Matrix ι ι ℝ} {t : ℝ} + (hA : HasDerivAt A (C*A t) t) : + HasDerivAt (fun s => (A s).det) (C.trace*(A t).det) t := by + simpa only [determinant_row_mul_derivative] using determinant_derivative hA + +lemma determinant_eq_one_of_trace_zero {ι : Type*} [Fintype ι] [DecidableEq ι] + {A C : ℝ → Matrix ι ι ℝ} {a b : ℝ} (hab : a ≤ b) + (hA : ContinuousOn A (Icc a b)) (hinit : A a = 1) + (hder : ∀ t ∈ Ioo a b, HasDerivAt A (C t*A t) t) + (htrace : ∀ t ∈ Ioo a b, (C t).trace = 0) : + ∀ t ∈ Icc a b, (A t).det = 1 := by + have hcont : ContinuousOn (fun t => (A t).det) (Icc a b) := + continuous_id.matrix_det.comp_continuousOn hA + have hz : ∀ t ∈ Ioo a b, HasDerivAt (fun s => (A s).det) 0 t := by + intro t ht + simpa [htrace t ht] using determinant_variational_derivative (hder t ht) + rcases hab.eq_or_lt with heq | hlt + · subst b + intro t ht + have : t = a := le_antisymm ht.2 ht.1 + simp [this,hinit] + obtain ⟨c,hc⟩ := isOpen_Ioo.exists_is_const_of_deriv_eq_zero + (convex_Ioo a b).isPreconnected + (fun x hx => (hz x hx).differentiableAt.differentiableWithinAt) + (fun x hx => (hz x hx).deriv) + have heq : EqOn (fun t => (A t).det) (fun _ => c) (Icc a b) := by + rw [← closure_Ioo hlt.ne] at hcont ⊢ + exact Set.EqOn.of_subset_closure hc hcont continuousOn_const subset_closure Subset.rfl + have ha := heq (left_mem_Icc.mpr hab) + have hc1 : c = 1 := by simpa [hinit] using ha.symm + intro t ht + exact (heq ht).trans hc1 + +lemma determinant_retarded_rank_one {ι : Type*} [Fintype ι] [DecidableEq ι] + (U N : ι → ℝ) : + (1 - Matrix.replicateCol Unit U * Matrix.replicateRow Unit N).det = + 1 - ∑ i, N i * U i := by + have h := Matrix.det_one_add_replicateCol_mul_replicateRow (ι := Unit) (-U) N + have hn : Matrix.replicateCol Unit (-U) = - Matrix.replicateCol Unit U := by + ext i j + rfl + simpa [hn,Matrix.neg_mul,sub_eq_add_neg,dotProduct, + mul_neg,Finset.sum_neg_distrib] using h + +end RVM + +end + +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory Metric +open scoped Topology Pointwise +open Set MeasureTheory Filter +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open Set MeasureTheory + +namespace RVM +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +def endomorphismMatrix {ι : Type*} [Fintype ι] [DecidableEq ι] + (b : Module.Basis ι ℝ E) : (E →L[ℝ] E) →L[ℝ] Matrix ι ι ℝ := + ((LinearMap.toMatrix b b).toLinearMap.comp (ContinuousLinearMap.coeLM ℝ)).toContinuousLinearMap + +lemma endomorphismMatrix_apply {ι : Type*} [Fintype ι] [DecidableEq ι] + (b : Module.Basis ι ℝ E) (A : E →L[ℝ] E) : + endomorphismMatrix b A = LinearMap.toMatrix b b A.toLinearMap := rfl + +lemma endomorphismMatrix_comp {ι : Type*} [Fintype ι] [DecidableEq ι] + (b : Module.Basis ι ℝ E) (A C : E →L[ℝ] E) : + endomorphismMatrix b (C.comp A) = endomorphismMatrix b C * endomorphismMatrix b A := by + exact LinearMap.toMatrix_comp b b b _ _ + +lemma hasDerivAt_endomorphismMatrix {ι : Type*} [Fintype ι] [DecidableEq ι] + (b : Module.Basis ι ℝ E) {A : ℝ → E →L[ℝ] E} {D : E →L[ℝ] E} {t : ℝ} + (hA : HasDerivAt A D t) : + HasDerivAt (fun s => endomorphismMatrix b (A s)) (endomorphismMatrix b D) t := by + apply hasDerivAt_pi.mpr + intro i + apply hasDerivAt_pi.mpr + intro j + have hd : HasDerivAt (fun s => A s (b j)) (D (b j)) t := by + simpa using hA.clm_apply (hasDerivAt_const t (b j)) + have hh := (b.coord i).toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt t hd + simpa only [Function.comp_def,endomorphismMatrix_apply,LinearMap.toMatrix_apply, + LinearMap.coe_toContinuousLinearMap',Module.Basis.coord_apply,ContinuousLinearMap.coe_coe] using hh + +lemma determinant_clm_variational_derivative {A : ℝ → E →L[ℝ] E} + {C : E →L[ℝ] E} {t : ℝ} (hA : HasDerivAt A (C.comp (A t)) t) : + HasDerivAt (fun s => (A s).det) + (LinearMap.trace ℝ E C.toLinearMap * (A t).det) t := by + let b := Module.finBasis ℝ E + have hd := hasDerivAt_endomorphismMatrix b hA + have hd' : HasDerivAt (fun s => endomorphismMatrix b (A s)) + (endomorphismMatrix b C * endomorphismMatrix b (A t)) t := by + simpa only [endomorphismMatrix_comp] using hd + have h := determinant_variational_derivative hd' + simpa only [Function.comp_def,endomorphismMatrix_apply,LinearMap.det_toMatrix, + ← LinearMap.trace_eq_matrix_trace ℝ b] using h + +lemma determinant_clm_eq_one_of_trace_zero + {A C : ℝ → E →L[ℝ] E} {a b : ℝ} (hab : a ≤ b) + (hA : ContinuousOn A (Icc a b)) (hinit : A a = ContinuousLinearMap.id ℝ E) + (hder : ∀ t ∈ Ioo a b, HasDerivAt A ((C t).comp (A t)) t) + (htrace : ∀ t ∈ Ioo a b, LinearMap.trace ℝ E (C t).toLinearMap = 0) : + ∀ t ∈ Icc a b, (A t).det = 1 := by + let e := Module.finBasis ℝ E + have h := determinant_eq_one_of_trace_zero hab + ((endomorphismMatrix e).continuous.comp_continuousOn hA) + (show endomorphismMatrix e (A a) = 1 by + rw [hinit,endomorphismMatrix_apply] + exact LinearMap.toMatrix_id _) + (A := fun t => endomorphismMatrix e (A t)) + (C := fun t => endomorphismMatrix e (C t)) + (fun t ht => by + have hh := hasDerivAt_endomorphismMatrix e (hder t ht) + simpa only [endomorphismMatrix_comp] using hh) + (fun t ht => by + rw [endomorphismMatrix_apply,← LinearMap.trace_eq_matrix_trace ℝ e] + exact htrace t ht) + simpa only [endomorphismMatrix_apply,LinearMap.det_toMatrix] using h + +lemma flow_injOn_of_local_ode {f : E → E} (hf : ContDiff ℝ 1 f) + {x₀ : E} {r R ε : ℝ} (hε : 0 < ε) {α : E → ℝ → E} + (hinit : ∀ x ∈ Metric.closedBall x₀ r, α x 0 = x) + (hder : ∀ x ∈ Metric.closedBall x₀ r, ∀ t ∈ Icc (-ε) ε, + HasDerivWithinAt (α x) (f (α x t)) (Icc (-ε) ε) t) + (hrange : ∀ x ∈ Metric.closedBall x₀ r, ∀ t, α x t ∈ Metric.closedBall x₀ R) + {t : ℝ} (ht : t ∈ Ico 0 ε) : Set.InjOn (fun x => α x t) (Metric.closedBall x₀ r) := by + obtain ⟨K,hK⟩ := hf.contDiffOn.exists_lipschitzOnWith (by norm_num) + (convex_closedBall x₀ R) (isCompact_closedBall x₀ R) + have hsub : Icc 0 t ⊆ Icc (-ε) ε := Icc_subset_Icc (by linarith) ht.2.le + have hd (x : E) (hx : x ∈ Metric.closedBall x₀ r) (s : ℝ) (hs : s ∈ Ioc 0 t) : + HasDerivWithinAt (α x) (f (α x s)) (Iic s) s := by + exact ((hder x hx s (hsub ⟨hs.1.le,hs.2⟩)).hasDerivAt + (Icc_mem_nhds (by linarith [hs.1]) (lt_of_le_of_lt hs.2 ht.2))).hasDerivWithinAt + intro x hx y hy heq + have hu := ODE_solution_unique_of_mem_Icc_left + (v := fun _ => f) (s := fun _ => Metric.closedBall x₀ R) + (fun _ _ => hK) + ((HasDerivWithinAt.continuousOn (hder x hx)).mono hsub) (hd x hx) + (fun s _ => hrange x hx s) + ((HasDerivWithinAt.continuousOn (hder y hy)).mono hsub) (hd y hy) + (fun s _ => hrange y hy s) heq + simpa only [hinit x hx,hinit y hy] using hu (left_mem_Icc.mpr ht.1) + +lemma exists_local_volume_flow {f : E → E} (hf : ContDiff ℝ 2 f) + (hdiv : ∀ x, LinearMap.trace ℝ E (fderiv ℝ f x).toLinearMap = 0) (x₀ : E) : + ∃ η > (0 : ℝ), ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ Metric.ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 η, HasDerivAt (α x) (f (α x t)) t) ∧ + (∀ t ∈ Icc 0 η, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + ∀ t ∈ Icc 0 η, (A x t).det = 1) ∧ + ∀ t ∈ Icc 0 η, Set.InjOn (fun x => α x t) (Metric.ball x₀ (1/2 : ℝ)) := by + obtain ⟨ε,hε,α,A,L,hsol,hLip⟩ := exists_local_variational_flow hf x₀ + have hsub : Icc 0 (ε/2) ⊆ Icc 0 ε := Icc_subset_Icc_right (by linarith) + refine ⟨ε/2,by linarith,α,A,?_,?_⟩ + · intro x hx + have hx' := Metric.ball_subset_closedBall hx + have hs := hsol x hx' + have hdet := determinant_clm_eq_one_of_trace_zero hε.le + ((HasDerivWithinAt.continuousOn hs.2.2.2.1).mono + (Icc_subset_Icc_left (by linarith : -ε ≤ 0))) hs.2.1 + (fun t ht => (hs.2.2.2.1 t ⟨by linarith [ht.1],ht.2.le⟩).hasDerivAt + (Icc_mem_nhds (by linarith [ht.1]) ht.2)) (fun t _ => hdiv (α x t)) + refine ⟨hs.1,?_,?_,fun t ht => hdet t (hsub ht)⟩ + · intro t ht + exact (hs.2.2.1 t ⟨by linarith [ht.1],(hsub ht).2⟩).hasDerivAt + (Icc_mem_nhds (by linarith [ht.1]) (by linarith [ht.2])) + · intro t ht + exact hasFDerivAt_variational_flow hf hε hsol hLip hx (hsub ht) + · intro t ht + exact (flow_injOn_of_local_ode (hf.of_le (by norm_num)) hε + (fun x hx => (hsol x hx).1) (fun x hx => (hsol x hx).2.2.1) + (fun x hx => (hsol x hx).2.2.2.2) ⟨ht.1,by linarith [ht.2]⟩).mono + Metric.ball_subset_closedBall + +lemma integral_image_volume_flow [MeasurableSpace E] [BorelSpace E] + (μ : Measure E) [μ.IsAddHaarMeasure] {s : Set E} {α : E → E} {A : E → E →L[ℝ] E} + (hs : MeasurableSet s) (hd : ∀ x ∈ s, HasFDerivAt α (A x) x) + (hi : Set.InjOn α s) (hdet : ∀ x ∈ s, (A x).det = 1) + {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] (g : E → F) : + ∫ y in α '' s, g y ∂μ = ∫ x in s, g (α x) ∂μ := by + rw [integral_image_eq_integral_abs_det_fderiv_smul μ hs + (fun x hx => (hd x hx).hasFDerivWithinAt) hi] + apply setIntegral_congr_fun hs + intro x hx + simp [hdet x hx] + +lemma lintegral_image_volume_flow [MeasurableSpace E] [BorelSpace E] + (μ : Measure E) [μ.IsAddHaarMeasure] {s : Set E} {α : E → E} {A : E → E →L[ℝ] E} + (hs : MeasurableSet s) (hd : ∀ x ∈ s, HasFDerivAt α (A x) x) + (hi : Set.InjOn α s) (hdet : ∀ x ∈ s, (A x).det = 1) (g : E → ENNReal) : + ∫⁻ y in α '' s, g y ∂μ = ∫⁻ x in s, g (α x) ∂μ := by + rw [lintegral_image_eq_lintegral_abs_det_fderiv_mul μ hs + (fun x hx => (hd x hx).hasFDerivWithinAt) hi] + apply setLIntegral_congr_fun hs + intro x hx + simp [hdet x hx] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/HighFlow.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/HighFlow.lean new file mode 100644 index 0000000000000000000000000000000000000000..40c355824599c3a41427b22315cec13c8dc532d6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/HighFlow.lean @@ -0,0 +1,375 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.TameDerivative +import OAI.Analysis.VlasovMaxwell.Regularity.SmoothIntegral +import OAI.Analysis.VlasovMaxwell.Regularity.VelocityDerivatives +import OAI.Analysis.VlasovMaxwell.Regularity.CurvatureBounds + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +section +universe u + +variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [ProperSpace E] [CompleteSpace E] + +omit [ProperSpace E] [CompleteSpace E] in +lemma iteratedFDeriv_id_high (n : ℕ) (hn : 1 ≤ n) (x : E) : + iteratedFDeriv ℝ (n+1) (id : E → E) x=0 := by + rw [iteratedFDeriv_succ_eq_comp_right] + simp only [fderiv_id,iteratedFDeriv_const_of_ne (by omega : n≠0),Function.comp_apply, + Pi.zero_apply,map_zero] + +lemma tame_flow_iteratedFDeriv (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (V Y : ℝ × E → E), ContDiff ℝ ∞ V → ContDiff ℝ ∞ Y → + ∀ T ∈ Icc (0:ℝ) 1, ∀ H : ℝ, 0 ≤ H → + (∀ t ∈ Icc 0 T, ∀ x, Y (t,x)=x+∫ r in 0..t, V (r,Y (r,x))) → + (∀ t ∈ Icc 0 T, ∀ x, ∀ i : ℕ, 1 ≤ i → i ≤ n → + ‖iteratedFDeriv ℝ i (fun z => V (t,z)) (Y (t,x))‖ ≤ A ∧ + ‖iteratedFDeriv ℝ i (fun z => Y (t,z)) x‖ ≤ A) → + (∀ t ∈ Icc 0 T, ∀ x, ‖iteratedFDeriv ℝ (n+1) (fun z => V (t,z)) (Y (t,x))‖ ≤ H) → + ∀ t ∈ Icc 0 T, ∀ x, ‖iteratedFDeriv ℝ (n+1) (fun z => Y (t,z)) x‖ ≤ C*(1+H) := by + obtain ⟨K,hK,hcomp⟩ := tame_iteratedFDeriv_comp (E:=E) (F:=E) (G:=E) n hn A hA + refine ⟨K*Real.exp K,by positivity,?_⟩ + intro V Y hV hY T hT H hH heq hlow htop t ht x + let Z : ℝ × E → E := fun p => V (p.1,Y p) + have hZ : ContDiff ℝ ∞ Z := hV.comp (contDiff_fst.prodMk hY) + let f : ℝ → ℝ := fun r => ‖iteratedFDeriv ℝ (n+1) (fun z => Y (r,z)) x‖ + have hf : Continuous f := ((contDiff_iteratedFDeriv_slice hY (n+1)).continuous.comp + (continuous_id.prodMk continuous_const)).norm + have hb (r : ℝ) (hr : r ∈ Icc 0 T) : f r ≤ K*(1+H)+K*∫ v in 0..r, f v := by + have hfun : (fun z => Y (r,z)) = (fun z => z+∫ v in 0..r, Z (v,z)) := funext (heq r hr) + have hint := (contDiff_spatial_intervalIntegral hZ hr.1).of_le (by exact_mod_cast le_top : (n+1:ℕ) ≤ (∞:ℕ∞ω)) + have hder := fun_iteratedFDeriv_add (contDiff_id : ContDiff ℝ (n+1) (id : E → E)) hint + have hid := iteratedFDeriv_id_high (E:=E) n hn x + have hzbound (v : ℝ) (hv : v ∈ Icc 0 r) : + ‖iteratedFDeriv ℝ (n+1) (fun z => Z (v,z)) x‖ ≤ K*(1+H+f v) := by + have hvT : v ∈ Icc 0 T := ⟨hv.1,hv.2.trans hr.2⟩ + have hh := hcomp (fun z => V (v,z)) (fun z => Y (v,z)) + (hV.comp (contDiff_const.prodMk contDiff_id)) (hY.comp (contDiff_const.prodMk contDiff_id)) x + (fun i hi hi' => (hlow v hvT x i hi hi').1) + (fun i hi hi' => (hlow v hvT x i hi hi').2) + exact hh.trans (mul_le_mul_of_nonneg_left (by gcongr; exact htop v hvT x) hK) + have hzi : Continuous (fun v => ‖iteratedFDeriv ℝ (n+1) (fun z => Z (v,z)) x‖) := + ((contDiff_iteratedFDeriv_slice hZ (n+1)).continuous.comp + (continuous_id.prodMk continuous_const)).norm + have hi := intervalIntegral.integral_mono_on (μ:=volume) hr.1 (hzi.intervalIntegrable 0 r) + ((continuous_const.mul ((continuous_const.add continuous_const).add hf)).intervalIntegrable 0 r) hzbound + have hcint : (∫ v in 0..r, K*(1+H+f v))=K*(1+H)*r+K*∫ v in 0..r, f v := by + simp_rw [mul_add] + rw [intervalIntegral.integral_add (intervalIntegrable_const) ((hf.intervalIntegrable 0 r).const_mul K), + intervalIntegral.integral_const,intervalIntegral.integral_const_mul] + simp only [sub_zero,smul_eq_mul] + ring + calc + f r = ‖iteratedFDeriv ℝ (n+1) (fun z => ∫ v in 0..r, Z (v,z)) x‖ := by + dsimp [f] + rw [hfun] + have hd : iteratedFDeriv ℝ (n+1) (fun z => z+∫ v in 0..r, Z (v,z)) x = + iteratedFDeriv ℝ (n+1) (id : E → E) x+ + iteratedFDeriv ℝ (n+1) (fun z => ∫ v in 0..r, Z (v,z)) x := congrFun hder x + rw [hd,hid,zero_add] + _ ≤ ∫ v in 0..r, ‖iteratedFDeriv ℝ (n+1) (fun z => Z (v,z)) x‖ := + norm_iteratedFDeriv_intervalIntegral_le hZ (n+1) hr.1 x + _ ≤ K*(1+H)*r+K*∫ v in 0..r, f v := hi.trans_eq hcint + _ ≤ K*(1+H)+K*∫ v in 0..r, f v := by + have hh := mul_le_mul_of_nonneg_left (hr.2.trans hT.2) (mul_nonneg hK (by linarith : 0≤1+H)) + nlinarith only [hh] + have hg := integral_gronwall_bound hf (mul_nonneg hK (by linarith)) hK + (fun r _ => norm_nonneg _) hb t ht + exact hg.trans (by + calc + K*(1+H)*Real.exp (K*t) ≤ K*(1+H)*Real.exp K := by + gcongr + nlinarith [ht.2.trans hT.2] + _ = K*Real.exp K*(1+H) := by ring) + +end + +def SpatialJetBound (n : ℕ) (T A : ℝ) (E B : Field) : Prop := + ∀ t∈Icc 0 T, ∀ x, ∀ i : ℕ, i ≤ n → + ‖iteratedFDeriv ℝ i (fun y => E (t,y)) x‖ ≤ A ∧ + ‖iteratedFDeriv ℝ i (fun y => B (t,y)) x‖ ≤ A + +private def lorentzNonlinearity (w : Vec × (Vec × Vec)) : Phase := + (w.1,w.2.1+cross w.1 w.2.2) + +private lemma lorentzNonlinearity_smooth : ContDiff ℝ ∞ lorentzNonlinearity := + contDiff_fst.prodMk ((contDiff_fst.comp contDiff_snd).add + (contDiff_cross.comp (contDiff_fst.prodMk (contDiff_snd.comp contDiff_snd)))) + +private def lorentzArgument (E B : Vec → Vec) (z : Phase) : Vec × (Vec × Vec) := + (velocity z.2,(E z.1,B z.1)) + +private lemma lorentzArgument_smooth {E B : Vec → Vec} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : ContDiff ℝ ∞ (lorentzArgument E B) := + (contDiff_velocity.comp contDiff_snd).prodMk ((hE.comp contDiff_fst).prodMk (hB.comp contDiff_fst)) + +private lemma lorentzArgument_derivative_le {E B : Vec → Vec} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) (i : ℕ) (z : Phase) {C : ℝ} + (hv : ‖iteratedFDeriv ℝ i velocity z.2‖ ≤ C) + (he : ‖iteratedFDeriv ℝ i E z.1‖ ≤ C) (hb : ‖iteratedFDeriv ℝ i B z.1‖ ≤ C) : + ‖iteratedFDeriv ℝ i (lorentzArgument E B) z‖ ≤ C := by + apply norm_iteratedFDeriv_pair_le (contDiff_velocity.comp contDiff_snd) + ((hE.comp contDiff_fst).prodMk (hB.comp contDiff_fst)) + · exact (norm_iteratedFDeriv_precomp_contraction velocity contDiff_velocity + (ContinuousLinearMap.snd ℝ Vec Vec) (ContinuousLinearMap.norm_snd_le ℝ Vec Vec) i z).trans hv + · apply norm_iteratedFDeriv_pair_le (hE.comp contDiff_fst) (hB.comp contDiff_fst) + · exact (norm_iteratedFDeriv_precomp_contraction E hE + (ContinuousLinearMap.fst ℝ Vec Vec) (ContinuousLinearMap.norm_fst_le ℝ Vec Vec) i z).trans he + · exact (norm_iteratedFDeriv_precomp_contraction B hB + (ContinuousLinearMap.fst ℝ Vec Vec) (ContinuousLinearMap.norm_fst_le ℝ Vec Vec) i z).trans hb + +private lemma lorentzArgument_mem {E B : Vec → Vec} {A : ℝ} (hA : 1 ≤ A) + (he : ∀ x, ‖E x‖ ≤ A) (hb : ∀ x, ‖B x‖ ≤ A) (z : Phase) : + lorentzArgument E B z∈closedBall (0:Vec × (Vec × Vec)) A := by + rw [mem_closedBall_zero_iff] + exact max_le ((norm_velocity_lt_one z.2).le.trans hA) (max_le (he z.1) (hb z.1)) + +lemma lorentzField_derivatives_bound (n : ℕ) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ T, SpatialJetBound n T A E B → ∀ t∈Icc 0 T, ∀ z, ∀ i : ℕ, i ≤ n → + ‖iteratedFDeriv ℝ i (fun w => lorentzField E B (t,w)) z‖ ≤ C := by + have hv (i : Fin (n+1)) := velocity_derivatives_bounded i + choose V hV hbV using hv + let D := A+∑ i, V i + have hAD : A ≤ D := le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => hV i)) + have hVD (i : Fin (n+1)) : V i ≤ D := + (Finset.single_le_sum (fun j _ => hV j) (Finset.mem_univ i)).trans + (le_add_of_nonneg_left (zero_le_one.trans hA)) + obtain ⟨C,hC,hcomp⟩ := bounded_derivatives_comp_on_compact (U:=Phase) lorentzNonlinearity_smooth + (isCompact_closedBall (0:Vec × (Vec × Vec)) A) n D (hA.trans hAD) + refine ⟨C,hC,?_⟩ + intro E B hE hB T hbound t ht z i hi + have he : ContDiff ℝ ∞ (fun x => E (t,x)) := hE.comp (contDiff_const.prodMk contDiff_id) + have hb : ContDiff ℝ ∞ (fun x => B (t,x)) := hB.comp (contDiff_const.prodMk contDiff_id) + apply hcomp (lorentzArgument (fun x => E (t,x)) (fun x => B (t,x))) (lorentzArgument_smooth he hb) z + · apply lorentzArgument_mem hA + · intro x; simpa only [norm_iteratedFDeriv_zero] using (hbound t ht x 0 (Nat.zero_le _)).1 + · intro x; simpa only [norm_iteratedFDeriv_zero] using (hbound t ht x 0 (Nat.zero_le _)).2 + · intro j hj hj' + exact lorentzArgument_derivative_le he hb j z ((hbV ⟨j,by omega⟩ z.2).trans (hVD _)) + ((hbound t ht z.1 j hj').1.trans hAD) ((hbound t ht z.1 j hj').2.trans hAD) + · exact hi + +lemma lorentzField_derivative_tame (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ T, SpatialJetBound n T A E B → ∀ H : ℝ, 0 ≤ H → + (∀ t∈Icc 0 T, ∀ x, ‖iteratedFDeriv ℝ (n+1) (fun y => E (t,y)) x‖ ≤ H ∧ + ‖iteratedFDeriv ℝ (n+1) (fun y => B (t,y)) x‖ ≤ H) → + ∀ t∈Icc 0 T, ∀ z, ‖iteratedFDeriv ℝ (n+1) (fun w => lorentzField E B (t,w)) z‖ ≤ C*(1+H) := by + have hv (i : Fin (n+2)) := velocity_derivatives_bounded i + choose V hV hbV using hv + let D := A+∑ i, V i + have hAD : A ≤ D := le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => hV i)) + have hD : 0 ≤ D := (zero_le_one.trans hA).trans hAD + have hVD (i : Fin (n+2)) : V i ≤ D := + (Finset.single_le_sum (fun j _ => hV j) (Finset.mem_univ i)).trans + (le_add_of_nonneg_left (zero_le_one.trans hA)) + obtain ⟨C,hC,hcomp⟩ := tame_comp_on_compact (U:=Phase) lorentzNonlinearity_smooth + (isCompact_closedBall (0:Vec × (Vec × Vec)) A) n hn D (hA.trans hAD) + refine ⟨C*(1+D),by positivity,?_⟩ + intro E B hE hB T hbound H hH htop t ht z + have he : ContDiff ℝ ∞ (fun x => E (t,x)) := hE.comp (contDiff_const.prodMk contDiff_id) + have hb : ContDiff ℝ ∞ (fun x => B (t,x)) := hB.comp (contDiff_const.prodMk contDiff_id) + have harg := lorentzArgument_smooth he hb + have hh := hcomp (lorentzArgument (fun x => E (t,x)) (fun x => B (t,x))) harg z + (lorentzArgument_mem hA + (fun x => by simpa only [norm_iteratedFDeriv_zero] using (hbound t ht x 0 (Nat.zero_le _)).1) + (fun x => by simpa only [norm_iteratedFDeriv_zero] using (hbound t ht x 0 (Nat.zero_le _)).2) z) + (fun j hj hj' => lorentzArgument_derivative_le he hb j z ((hbV ⟨j,by omega⟩ z.2).trans (hVD _)) + ((hbound t ht z.1 j hj').1.trans hAD) ((hbound t ht z.1 j hj').2.trans hAD)) + have hargtop := lorentzArgument_derivative_le he hb (n+1) z + (((hbV ⟨n+1,by omega⟩ z.2).trans (hVD _)).trans (le_add_of_nonneg_right hH)) + ((htop t ht z.1).1.trans (le_add_of_nonneg_left hD)) + ((htop t ht z.1).2.trans (le_add_of_nonneg_left hD)) + apply hh.trans + have hi := mul_le_mul_of_nonneg_left (add_le_add_left hargtop 1) hC + nlinarith [mul_nonneg hD hH,mul_nonneg hC (mul_nonneg hD hH)] + +universe u +variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [ProperSpace E] [CompleteSpace E] + +lemma flow_first_derivative_bound {V Y : ℝ × E → E} + (hV : ContDiff ℝ ∞ V) (hY : ContDiff ℝ ∞ Y) {T : ℝ} (hT : T∈Icc (0:ℝ) 1) + {A : ℝ} (hA : 0 ≤ A) + (heq : ∀ t∈Icc 0 T, ∀ x, Y (t,x)=x+∫ r in 0..t, V (r,Y (r,x))) + (hbound : ∀ t∈Icc 0 T, ∀ x, ‖fderiv ℝ (fun z => V (t,z)) (Y (t,x))‖ ≤ A) + {t : ℝ} (ht : t∈Icc 0 T) (x : E) : + ‖iteratedFDeriv ℝ 1 (fun z => Y (t,z)) x‖ ≤ Real.exp A := by + let Z : ℝ × E → E := fun p => V (p.1,Y p) + have hZ : ContDiff ℝ ∞ Z := hV.comp (contDiff_fst.prodMk hY) + let f : ℝ → ℝ := fun r => ‖iteratedFDeriv ℝ 1 (fun z => Y (r,z)) x‖ + have hf : Continuous f := ((contDiff_iteratedFDeriv_slice hY 1).continuous.comp + (continuous_id.prodMk continuous_const)).norm + have hb (r : ℝ) (hr : r∈Icc 0 T) : f r ≤ 1+A*∫ v in 0..r, f v := by + have hfun : (fun z => Y (r,z))=(fun z => z+∫ v in 0..r, Z (v,z)) := funext (heq r hr) + have hint := (contDiff_spatial_intervalIntegral hZ hr.1).of_le (by simp : (1:ℕ∞ω) ≤ ∞) + have hder : iteratedFDeriv ℝ 1 (fun z => z+∫ v in 0..r, Z (v,z)) x = + iteratedFDeriv ℝ 1 (id : E → E) x+iteratedFDeriv ℝ 1 (fun z => ∫ v in 0..r, Z (v,z)) x := + congrFun (fun_iteratedFDeriv_add (contDiff_id : ContDiff ℝ 1 (id : E → E)) hint) x + have hzi : Continuous (fun v => ‖iteratedFDeriv ℝ 1 (fun z => Z (v,z)) x‖) := + ((contDiff_iteratedFDeriv_slice hZ 1).continuous.comp (continuous_id.prodMk continuous_const)).norm + have hg (v : ℝ) (hv : v∈Icc 0 r) : ‖iteratedFDeriv ℝ 1 (fun z => Z (v,z)) x‖ ≤ A*f v := by + dsimp [Z,f] + simp only [norm_iteratedFDeriv_one] + have he : (fun z => V (v,Y (v,z)))=(fun z => V (v,z)) ∘ (fun z => Y (v,z)) := rfl + have hvD : Differentiable ℝ (fun z => V (v,z)) := + (hV.comp (contDiff_const.prodMk contDiff_id)).differentiable (by simp) + have hyD : Differentiable ℝ (fun z => Y (v,z)) := + (hY.comp (contDiff_const.prodMk contDiff_id)).differentiable (by simp) + rw [he,fderiv_comp x (hvD _) (hyD _)] + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + (mul_le_mul_of_nonneg_right (hbound v ⟨hv.1,hv.2.trans hr.2⟩ x) (norm_nonneg _)) + have hi := intervalIntegral.integral_mono_on (μ:=volume) hr.1 (hzi.intervalIntegrable 0 r) + ((continuous_const.mul hf).intervalIntegrable 0 r) hg + calc + f r = ‖iteratedFDeriv ℝ 1 (fun z => z+∫ v in 0..r, Z (v,z)) x‖ := by dsimp [f]; rw [hfun] + _ ≤ ‖iteratedFDeriv ℝ 1 (id : E → E) x‖+ + ‖iteratedFDeriv ℝ 1 (fun z => ∫ v in 0..r, Z (v,z)) x‖ := by rw [hder]; exact norm_add_le _ _ + _ ≤ 1+∫ v in 0..r, ‖iteratedFDeriv ℝ 1 (fun z => Z (v,z)) x‖ := by + apply add_le_add + · simp only [norm_iteratedFDeriv_one,fderiv_id]; exact ContinuousLinearMap.norm_id_le + · exact norm_iteratedFDeriv_intervalIntegral_le hZ 1 hr.1 x + _ ≤ 1+A*∫ v in 0..r, f v := by + have hi' : (∫ v in 0..r, ‖iteratedFDeriv ℝ 1 (fun z => Z (v,z)) x‖) ≤ A*∫ v in 0..r, f v := by + simpa only [Pi.mul_apply,intervalIntegral.integral_const_mul] using hi + exact add_le_add le_rfl hi' + have hh := integral_gronwall_bound hf zero_le_one hA (fun r _ => norm_nonneg _) hb t ht + apply hh.trans + simp only [one_mul] + apply Real.exp_le_exp.mpr + exact (mul_le_mul_of_nonneg_left (ht.2.trans hT.2) hA).trans_eq (mul_one _) + +lemma flow_derivatives_bound (n : ℕ) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (V Y : ℝ × E → E), ContDiff ℝ ∞ V → ContDiff ℝ ∞ Y → + ∀ T∈Icc (0:ℝ) 1, + (∀ t∈Icc 0 T, ∀ x, Y (t,x)=x+∫ r in 0..t, V (r,Y (r,x))) → + (∀ t∈Icc 0 T, ∀ x, ∀ i : ℕ, 1 ≤ i → i ≤ n → + ‖iteratedFDeriv ℝ i (fun z => V (t,z)) (Y (t,x))‖ ≤ A) → + ∀ t∈Icc 0 T, ∀ x, ∀ i : ℕ, 1 ≤ i → i ≤ n → + ‖iteratedFDeriv ℝ i (fun z => Y (t,z)) x‖ ≤ C := by + induction n with + | zero => exact ⟨0,le_rfl,fun V Y hV hY T hT heq hb t ht x i hi hin => by omega⟩ + | succ n ih => + by_cases hn : n=0 + · subst n + refine ⟨Real.exp A,(Real.exp_pos _).le,?_⟩ + intro V Y hV hY T hT heq hb t ht x i hi hi' + have he : i=1 := by omega + subst i + exact flow_first_derivative_bound hV hY hT (zero_le_one.trans hA) heq + (fun r hr z => by simpa only [norm_iteratedFDeriv_one] using hb r hr z 1 le_rfl le_rfl) ht x + · obtain ⟨D,hD,hd⟩ := ih + obtain ⟨C,hC,hhigh⟩ := tame_flow_iteratedFDeriv (E:=E) n (by omega) (max A D) (hA.trans (le_max_left _ _)) + refine ⟨max D (C*(1+A)),le_max_of_le_left hD,?_⟩ + intro V Y hV hY T hT heq hb t ht x i hi hi' + have hy := hd V Y hV hY T hT heq (fun r hr z j hj hj' => hb r hr z j hj (by omega)) + by_cases hin : i ≤ n + · exact (hy t ht x i hi hin).trans (le_max_left _ _) + · have he : i=n+1 := by omega + subst i + exact (hhigh V Y hV hY T hT A (zero_le_one.trans hA) heq + (fun r hr z j hj hj' => ⟨(hb r hr z j hj (by omega)).trans (le_max_left _ _), + (hy r hr z j hj hj').trans (le_max_right _ _)⟩) + (fun r hr z => hb r hr z (n+1) (by omega) le_rfl) t ht x).trans (le_max_right _ _) + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma SmoothLorentzFlow.reversePath_smooth {E B : Field} (F : SmoothLorentzFlow E B) (t : ℝ) : + ContDiff ℝ ∞ (fun p : ℝ × Phase => F.reversePath t p.2 p.1) := by + exact F.smooth_forward.comp ((contDiff_const.sub contDiff_fst).prodMk + (F.smooth_backward.comp (contDiff_const.prodMk contDiff_snd))) + +lemma SmoothLorentzFlow.reversePath_integral {E B : Field} (F : SmoothLorentzFlow E B) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) (t u : ℝ) (z : Phase) : + F.reversePath t z u=z+∫ r in 0..u, -lorentzField E B (t-r,F.reversePath t z r) := by + have hc : Continuous (fun r => -lorentzField E B (t-r,F.reversePath t z r)) := + ((contDiff_lorentzField hE hB).continuous.comp ((continuous_const.sub continuous_id).prodMk + ((F.reversePath_smooth t).continuous.comp (continuous_id.prodMk continuous_const)))).neg + have hh := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun r _ => F.reversePath_deriv t r z) + (hc.intervalIntegrable 0 u) + rw [F.reversePath_zero] at hh + rw [hh] + abel + +lemma SmoothLorentzFlow.reversePath_derivatives_bound (n : ℕ) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ (F : SmoothLorentzFlow E B) (T : ℝ), T∈Icc (0:ℝ) 1 → SpatialJetBound n T A E B → + ∀ t∈Icc 0 T, ∀ u∈Icc 0 t, ∀ z, ∀ i : ℕ, 1 ≤ i → i ≤ n → + ‖iteratedFDeriv ℝ i (fun w => F.reversePath t w u) z‖ ≤ C := by + obtain ⟨L,hL,hLor⟩ := lorentzField_derivatives_bound n A hA + obtain ⟨C,hC,hflow⟩ := flow_derivatives_bound (E:=Phase) n (max 1 L) (le_max_left _ _) + refine ⟨C,hC,?_⟩ + intro E B hE hB F T hT hbound t ht u hu z i hi hi' + let V : ℝ × Phase → Phase := fun p => -lorentzField E B (t-p.1,p.2) + let Y : ℝ × Phase → Phase := fun p => F.reversePath t p.2 p.1 + have hV : ContDiff ℝ ∞ V := ((contDiff_lorentzField hE hB).comp + ((contDiff_const.sub contDiff_fst).prodMk contDiff_snd)).neg + have hY : ContDiff ℝ ∞ Y := F.reversePath_smooth t + apply hflow V Y hV hY t ⟨ht.1,ht.2.trans hT.2⟩ + (fun r hr x => F.reversePath_integral hE hB t r x) ?_ u hu z i hi hi' + intro r hr x j hj hj' + dsimp only [V] + rw [show (fun z => -lorentzField E B (t-r,z)) = -(fun z => lorentzField E B (t-r,z)) from rfl, + iteratedFDeriv_neg_apply,norm_neg] + exact (hLor E B hE hB T hbound (t-r) ⟨by linarith [hr.2],by linarith [hr.1,ht.2]⟩ _ j hj').trans + (le_max_right _ _) + +lemma SmoothLorentzFlow.backward_derivative_tame (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ (F : SmoothLorentzFlow E B) (T : ℝ), T∈Icc (0:ℝ) 1 → SpatialJetBound n T A E B → + ∀ H : ℝ, 0 ≤ H → + (∀ t∈Icc 0 T, ∀ x, ‖iteratedFDeriv ℝ (n+1) (fun y => E (t,y)) x‖ ≤ H ∧ + ‖iteratedFDeriv ℝ (n+1) (fun y => B (t,y)) x‖ ≤ H) → + ∀ t∈Icc 0 T, ∀ z, ‖iteratedFDeriv ℝ (n+1) (fun w => F.backward (t,w)) z‖ ≤ C*(1+H) := by + obtain ⟨L,hL,hLor⟩ := lorentzField_derivatives_bound n A hA + obtain ⟨D,hD,hlow⟩ := SmoothLorentzFlow.reversePath_derivatives_bound n A hA + obtain ⟨K,hK,hhigh⟩ := lorentzField_derivative_tame n hn A hA + obtain ⟨C,hC,hflow⟩ := tame_flow_iteratedFDeriv (E:=Phase) n hn (1+L+D) (by linarith) + refine ⟨C*(1+K),by positivity,?_⟩ + intro E B hE hB F T hT hbound H hH htop t ht z + let V : ℝ × Phase → Phase := fun p => -lorentzField E B (t-p.1,p.2) + let Y : ℝ × Phase → Phase := fun p => F.reversePath t p.2 p.1 + have hV : ContDiff ℝ ∞ V := ((contDiff_lorentzField hE hB).comp + ((contDiff_const.sub contDiff_fst).prodMk contDiff_snd)).neg + have hY : ContDiff ℝ ∞ Y := F.reversePath_smooth t + have hh := hflow V Y hV hY t ⟨ht.1,ht.2.trans hT.2⟩ (K*(1+H)) (by positivity) + (fun r hr x => F.reversePath_integral hE hB t r x) + (by + intro r hr x j hj hj' + refine ⟨?_,?_⟩ + · dsimp only [V] + rw [show (fun z => -lorentzField E B (t-r,z)) = -(fun z => lorentzField E B (t-r,z)) from rfl, + iteratedFDeriv_neg_apply,norm_neg] + exact (hLor E B hE hB T hbound (t-r) ⟨by linarith [hr.2],by linarith [hr.1,ht.2]⟩ _ j hj').trans (by linarith) + · exact (hlow E B hE hB F T hT hbound t ht r hr x j hj hj').trans (by linarith)) + (by + intro r hr x + dsimp only [V] + rw [show (fun z => -lorentzField E B (t-r,z)) = -(fun z => lorentzField E B (t-r,z)) from rfl, + iteratedFDeriv_neg_apply,norm_neg] + exact hhigh E B hE hB T hbound H hH htop (t-r) ⟨by linarith [hr.2],by linarith [hr.1,ht.2]⟩ _) + t ⟨ht.1,le_rfl⟩ z + have hrep : (fun w => Y (t,w))=(fun w => F.backward (t,w)) := by funext w; exact F.reversePath_end t w + rw [hrep] at hh + exact hh.trans (by nlinarith [mul_nonneg hC hH]) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/LorentzPhase.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/LorentzPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ccad6957d7d4277d3f9ca6fd43e14006322661f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/LorentzPhase.lean @@ -0,0 +1,244 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleBySpacetime + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory Metric +open scoped Topology Pointwise +open Set MeasureTheory Filter +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open Set MeasureTheory +open scoped ContDiff + +namespace RVM + +lemma trace_prod_diagonal {E F : Type*} [AddCommGroup E] [Module ℝ E] + [AddCommGroup F] [Module ℝ F] [FiniteDimensional ℝ E] [FiniteDimensional ℝ F] + (L : (E × F) →ₗ[ℝ] E × F) : + LinearMap.trace ℝ (E × F) L = + LinearMap.trace ℝ E ((LinearMap.fst ℝ E F).comp (L.comp (LinearMap.inl ℝ E F))) + + LinearMap.trace ℝ F ((LinearMap.snd ℝ E F).comp (L.comp (LinearMap.inr ℝ E F))) := by + have heq : L = (LinearMap.inl ℝ E F).comp ((LinearMap.fst ℝ E F).comp L) + + (LinearMap.inr ℝ E F).comp ((LinearMap.snd ℝ E F).comp L) := by + ext z <;> simp + calc + _ = LinearMap.trace ℝ (E × F) ((LinearMap.inl ℝ E F).comp ((LinearMap.fst ℝ E F).comp L)) + + LinearMap.trace ℝ (E × F) ((LinearMap.inr ℝ E F).comp ((LinearMap.snd ℝ E F).comp L)) := by + conv_lhs => rw [heq, map_add] + _ = _ := congrArg₂ (· + ·) + (LinearMap.trace_comp_comm' (LinearMap.inl ℝ E F) ((LinearMap.fst ℝ E F).comp L)).symm + (LinearMap.trace_comp_comm' (LinearMap.inr ℝ E F) ((LinearMap.snd ℝ E F).comp L)).symm + +lemma trace_fderiv_eq_divergence {F : Vec → Vec} {x : Vec} (hF : DifferentiableAt ℝ F x) : + LinearMap.trace ℝ Vec (fderiv ℝ F x).toLinearMap = divergence F x := by + rw [LinearMap.trace_eq_matrix_trace ℝ (EuclideanSpace.basisFun (Fin 3) ℝ).toBasis] + unfold Matrix.trace divergence spatialPartial + apply Finset.sum_congr rfl + intro i _ + have hd := (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp x hF.hasFDerivAt + have hd' : fderiv ℝ (fun y => F y i) x = (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).comp (fderiv ℝ F x) := hd.fderiv + rw [hd'] + simp only [Matrix.diag_apply,LinearMap.toMatrix_apply, + OrthonormalBasis.coe_toBasis_repr_apply,OrthonormalBasis.coe_toBasis, + EuclideanSpace.basisFun_repr,EuclideanSpace.basisFun_apply, + ContinuousLinearMap.comp_apply,ContinuousLinearMap.coe_coe,PiLp.proj_apply] + rfl + +def lorentzPhase (E B : Vec → Vec) (z : Phase) : Phase := + (velocity z.2, E z.1 + cross (velocity z.2) (B z.1)) + +lemma contDiff_lorentzPhase {E B : Vec → Vec} {k : ℕ∞ω} + (hE : ContDiff ℝ k E) (hB : ContDiff ℝ k B) : ContDiff ℝ k (lorentzPhase E B) := by + exact (contDiff_velocity.comp contDiff_snd).prodMk + ((hE.comp contDiff_fst).add (contDiff_cross.comp + ((contDiff_velocity.comp contDiff_snd).prodMk (hB.comp contDiff_fst)))) + +lemma trace_lorentzPhase {E B : Vec → Vec} (hE : Differentiable ℝ E) + (hB : Differentiable ℝ B) (z : Phase) : + LinearMap.trace ℝ Phase (fderiv ℝ (lorentzPhase E B) z).toLinearMap = 0 := by + have hF : DifferentiableAt ℝ (lorentzPhase E B) z := by + exact (contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) z.2 |>.comp z differentiableAt_snd).prodMk + (((hE z.1).comp z differentiableAt_fst).add + ((contDiff_cross.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) _).comp z + ((contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) z.2 |>.comp z differentiableAt_snd).prodMk + ((hB z.1).comp z differentiableAt_fst)))) + let D := fderiv ℝ (lorentzPhase E B) z + have hleft : (LinearMap.fst ℝ Vec Vec).comp (D.toLinearMap.comp (LinearMap.inl ℝ Vec Vec)) = 0 := by + have hd := hF.hasFDerivAt.fst.comp (f := fun x : Vec => (x,z.2)) z.1 + ((hasFDerivAt_id z.1).prodMk (hasFDerivAt_const z.2 z.1)) + have hc : HasFDerivAt (fun _ : Vec => velocity z.2) (0 : Vec →L[ℝ] Vec) z.1 := hasFDerivAt_const _ _ + have hh := hd.unique hc + exact congrArg ContinuousLinearMap.toLinearMap hh + have hright : (LinearMap.snd ℝ Vec Vec).comp (D.toLinearMap.comp (LinearMap.inr ℝ Vec Vec)) = + (fderiv ℝ (fun v => E z.1 + cross (velocity v) (B z.1)) z.2).toLinearMap := by + have hd := hF.hasFDerivAt.snd.comp (f := fun v : Vec => (z.1,v)) z.2 + ((hasFDerivAt_const z.1 z.2).prodMk (hasFDerivAt_id z.2)) + exact congrArg ContinuousLinearMap.toLinearMap hd.fderiv.symm + rw [trace_prod_diagonal,hleft,hright,map_zero,zero_add, + trace_fderiv_eq_divergence ((contDiff_lorentz (E z.1) (B z.1)).differentiable + (by simp : (1 : ℕ∞ω) ≠ 0) z.2)] + exact divergence_lorentz z.2 (E z.1) (B z.1) + +end RVM + +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma exists_bounded_ode_on_Icc {H : Type*} [NormedAddCommGroup H] + [NormedSpace ℝ H] [FiniteDimensional ℝ H] {f : ℝ × H → H} + {a b t₀ L : ℝ} (hab : a ≤ b) (ht₀ : t₀ ∈ Icc a b) (hL : 0 ≤ L) + (hf : ContDiffOn ℝ 1 f (Icc a b ×ˢ (univ : Set H))) + (hb : ∀ t ∈ Icc a b, ∀ z, ‖f (t,z)‖ ≤ L) (z₀ : H) : + ∃ α : ℝ → H, α t₀ = z₀ ∧ + ∀ t ∈ Icc a b, HasDerivWithinAt α (f (t,α t)) (Icc a b) t := by + let R : ℝ≥0 := ⟨L*(b-a),mul_nonneg hL (sub_nonneg.mpr hab)⟩ + have hsub : Icc a b ×ˢ closedBall z₀ (R:ℝ) ⊆ Icc a b ×ˢ (univ : Set H) := + prod_mono_right (subset_univ _) + obtain ⟨K,hK⟩ := (hf.mono hsub).exists_lipschitzOnWith (by norm_num) + ((convex_Icc a b).prod (convex_closedBall z₀ (R:ℝ))) + (isCompact_Icc.prod (isCompact_closedBall z₀ (R:ℝ))) + have hpic : IsPicardLindelof (fun t z => f (t,z)) ⟨t₀,ht₀⟩ z₀ R 0 ⟨L,hL⟩ K := by + refine ⟨?_,?_,?_,?_⟩ + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro z hz w hw + simpa using hK.dist_le_mul (t,z) (show (t,z) ∈ Icc a b ×ˢ closedBall z₀ (R:ℝ) from ⟨ht,hz⟩) + (t,w) (show (t,w) ∈ Icc a b ×ˢ closedBall z₀ (R:ℝ) from ⟨ht,hw⟩) + · intro z _ + exact hf.continuousOn.comp (continuousOn_id.prodMk continuousOn_const) + (fun t ht => ⟨ht,mem_univ z⟩) + · intro t ht z _ + exact hb t ht z + · change L * max (b-t₀) (t₀-a) ≤ (R:ℝ)-0 + simp only [sub_zero] + exact mul_le_mul_of_nonneg_left (max_le (by linarith [ht₀.1]) (by linarith [ht₀.2])) hL + exact hpic.exists_eq_forall_mem_Icc_hasDerivWithinAt₀ + +def cutLorentz (E B : Field) (χ : Vec → ℝ) (p : ℝ × Phase) : Phase := + (velocity p.2.2, χ p.2.1 • (E (p.1,p.2.1)+cross (velocity p.2.2) (B (p.1,p.2.1)))) + +lemma cutLorentz_regular {E B : Field} {χ : Vec → ℝ} {T : ℝ} + (hE : ContDiffOn ℝ 1 E fieldHalfSpace) (hB : ContDiffOn ℝ 1 B fieldHalfSpace) + (hχ : ContDiff ℝ 1 χ) : + ContDiffOn ℝ 1 (cutLorentz E B χ) (Icc 0 T ×ˢ (univ : Set Phase)) := by + have hx : ContDiff ℝ 1 (fun p : ℝ × Phase => (p.1,p.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hm : MapsTo (fun p : ℝ × Phase => (p.1,p.2.1)) + (Icc 0 T ×ˢ (univ : Set Phase)) fieldHalfSpace := fun _ hp => hp.1.1 + have hu : ContDiff ℝ 1 (fun p : ℝ × Phase => velocity p.2.2) := + contDiff_velocity.comp (contDiff_snd.comp contDiff_snd) + exact hu.contDiffOn.prodMk + ((hχ.comp (contDiff_fst.comp contDiff_snd)).contDiffOn.smul + ((hE.comp hx.contDiffOn hm).add + (contDiff_cross.contDiffOn.comp (hu.contDiffOn.prodMk (hB.comp hx.contDiffOn hm)) + (mapsTo_univ _ _)))) + +lemma cutLorentz_bounded {E B : Field} {T : ℝ} (_hT : 0 ≤ T) {x₀ : Vec} + (hE : ContinuousOn E fieldHalfSpace) (hB : ContinuousOn B fieldHalfSpace) + (χ : ContDiffBump x₀) : + ∃ L : ℝ, 0 ≤ L ∧ ∀ t ∈ Icc 0 T, ∀ z, ‖cutLorentz E B χ (t,z)‖ ≤ L := by + have hsub : Icc 0 T ×ˢ closedBall x₀ χ.rOut ⊆ fieldHalfSpace := fun _ hp => hp.1.1 + obtain ⟨M,hM⟩ := (isCompact_Icc.prod (isCompact_closedBall x₀ χ.rOut)).bddAbove_image + ((hE.norm.add hB.norm).mono hsub) + refine ⟨max 1 M, (zero_le_one.trans (le_max_left _ _)),?_⟩ + intro t ht z + rw [Prod.norm_def] + apply max_le + · exact (norm_velocity_lt_one z.2).le.trans (le_max_left _ _) + change ‖χ z.1 • (E (t,z.1)+cross (velocity z.2) (B (t,z.1)))‖ ≤ max 1 M + by_cases hχ : χ z.1 = 0 + · simp only [hχ,zero_smul,norm_zero] + exact zero_le_one.trans (le_max_left _ _) + have hz : z.1 ∈ closedBall x₀ χ.rOut := ball_subset_closedBall (by + rw [← χ.support_eq] + exact hχ) + calc + _ = χ z.1 * ‖E (t,z.1)+cross (velocity z.2) (B (t,z.1))‖ := by + rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + _ ≤ ‖E (t,z.1)+cross (velocity z.2) (B (t,z.1))‖ := + mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖E (t,z.1)‖+‖B (t,z.1)‖ := by + have hc : ‖cross (velocity z.2) (B (t,z.1))‖ ≤ ‖B (t,z.1)‖ := + (norm_cross_le (velocity z.2) (B (t,z.1))).trans + (mul_le_of_le_one_left (norm_nonneg (B (t,z.1))) (norm_velocity_lt_one z.2).le) + exact (norm_add_le (E (t,z.1)) (cross (velocity z.2) (B (t,z.1)))).trans + (add_le_add le_rfl hc) + _ ≤ M := hM ⟨(t,z.1),⟨ht,hz⟩,rfl⟩ + _ ≤ _ := le_max_right _ _ + +lemma exists_characteristic_on_slab {E B : Field} {T t₀ : ℝ} (hT : 0 ≤ T) + (ht₀ : t₀ ∈ Icc 0 T) (hE : ContDiffOn ℝ 1 E fieldHalfSpace) + (hB : ContDiffOn ℝ 1 B fieldHalfSpace) (x₀ v₀ : Vec) : + ∃ X V : ℝ → Vec, X t₀=x₀ ∧ V t₀=v₀ ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt X (velocity (V t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt V + (E (t,X t)+cross (velocity (V t)) (B (t,X t))) (Icc 0 T) t) ∧ + LipschitzOnWith 1 X (Icc 0 T) := by + let χ : ContDiffBump x₀ := ⟨T+1,T+2,by linarith,by linarith⟩ + obtain ⟨L,hL,hbound⟩ := cutLorentz_bounded hT hE.continuousOn hB.continuousOn χ + obtain ⟨α,hα₀,hα⟩ := exists_bounded_ode_on_Icc hT ht₀ hL + (cutLorentz_regular hE hB χ.contDiff) hbound (x₀,v₀) + have hX : ∀ t ∈ Icc 0 T, HasDerivWithinAt (fun r => (α r).1) + (velocity (α t).2) (Icc 0 T) t := fun t ht => (hα t ht).fst + have hLip : LipschitzOnWith 1 (fun r => (α r).1) (Icc 0 T) := + (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le hX + (fun t _ => by exact_mod_cast (norm_velocity_lt_one (α t).2).le) + have hone : ∀ t ∈ Icc 0 T, χ (α t).1=1 := by + intro t ht + apply χ.one_of_mem_closedBall + have hdist := hLip.dist_le_mul t ht t₀ ht₀ + simp only [hα₀,NNReal.coe_one,one_mul] at hdist + change dist (α t).1 x₀ ≤ T+1 + have hd : dist t t₀ ≤ T := by + rw [Real.dist_eq,abs_le] + constructor <;> linarith [ht.1,ht.2,ht₀.1,ht₀.2] + linarith + refine ⟨(fun r => (α r).1),(fun r => (α r).2),congrArg Prod.fst hα₀, + congrArg Prod.snd hα₀,hX,?_,hLip⟩ + intro t ht + have hv : HasDerivWithinAt (fun r => (α r).2) + (χ (α t).1 • (E (t,(α t).1)+cross (velocity (α t).2) (B (t,(α t).1)))) (Icc 0 T) t := + (hα t ht).snd + simpa only [hone t ht,one_smul] using hv + +theorem classical_initial_label {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (z : Phase) : + ∃ z₀ : Phase, s.f (t,z)=d.f₀ z₀ := by + obtain ⟨X,V,hX₀,hV₀,hX,hV,_⟩ := exists_characteristic_on_slab ht + (show t ∈ Icc 0 t from ⟨ht,le_rfl⟩) hs.2.1 hs.2.2.1 z.1 z.2 + have hcX : ContinuousOn X (Icc 0 t) := fun r hr => (hX r hr).continuousWithinAt + have hcV : ContinuousOn V (Icc 0 t) := fun r hr => (hV r hr).continuousWithinAt + have he := transport_on_characteristic hs.1 hs.2.2.2.2.2.2.2.1 + le_rfl ht hcX hcV + (fun r hr => (hX r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2)) + (fun r hr => (hV r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2)) + refine ⟨(X 0,V 0),?_⟩ + rw [hX₀,hV₀] at he + exact he.trans (hs.2.2.2.2.2.2.2.2.1 (X 0,V 0)) + +theorem classical_particle_bound {d : Datum} {s : Solution} + (hd : Admissible d) (hs : Classical d s) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ t, 0 ≤ t → ∀ z, 0 ≤ s.f (t,z) ∧ s.f (t,z) ≤ C := by + obtain ⟨C,hC⟩ := hd.1.continuous.bounded_above_of_compact_support hd.2.1 + refine ⟨max 0 C,le_max_left _ _,?_⟩ + intro t ht z + obtain ⟨z₀,hz⟩ := classical_initial_label hs ht z + refine ⟨hs.2.2.2.1 t ht z,?_⟩ + rw [hz] + exact (le_abs_self _).trans ((hC z₀).trans (le_max_right _ _)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseAcceleration.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseAcceleration.lean new file mode 100644 index 0000000000000000000000000000000000000000..db94bdc5eaf6c41396e5199c227719725fd473c6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseAcceleration.lean @@ -0,0 +1,449 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SignedRemainder +import OAI.Analysis.VlasovMaxwell.Geometry.ArrivalDomain +import OAI.Analysis.VlasovMaxwell.Geometry.BallCutoff + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def phaseAcceleration (E B : Field) (α : Phase → ℝ → Phase) (z : Phase) (t : ℝ) : Vec := + fderiv ℝ velocity (α z t).2 (E (t,(α z t).1)+cross (velocity (α z t).2) (B (t,(α z t).1))) + +lemma PhaseFlowOn.velocity_hasDerivAt {E B : Field} {T t : ℝ} + (F : PhaseFlowOn E B T) (z : Phase) (ht : t∈Ioo 0 T) : + HasDerivAt (fun r => velocity (F.flow z r).2) (phaseAcceleration E B F.flow z t) t := by + have hd := ((F.ode z t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)).snd + exact ((contDiff_velocity (k:=1)).differentiable one_ne_zero (F.flow z t).2).hasFDerivAt.comp_hasDerivAt t hd + +lemma PhaseFlowOn.branchDirection_hasDerivAt {E B : Field} {T s : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hs : s∈branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1≠(F.flow zY s).1) : + HasDerivAt (branchDirection F.flow zX zY T) + ((branchTime F.flow zX zY T s-s)⁻¹ • + coneMotion (velocity (F.flow zX (branchTime F.flow zX zY T s)).2) + (velocity (F.flow zY s).2) (branchDirection F.flow zX zY T s)) s := by + let t := branchTime F.flow zX zY T s + have ht := F.branch_time_mem zX zY hs hne + have hti : t∈Ioo 0 T := ⟨hs.1.1.trans ht.1,ht.2⟩ + have hg : (F.flow zX t).1-(F.flow zY s).1=(t-s) • branchDirection F.flow zX zY T s := by + unfold branchDirection + rw [smul_smul,mul_inv_cancel₀ (sub_ne_zero.mpr ht.1.ne'),one_smul] + exact hasDerivAt_cone_direction rfl ht.1 hg + (((F.ode zX t (Ioo_subset_Icc_self hti)).hasDerivAt (Icc_mem_nhds hti.1 hti.2)).fst) + (((F.ode zY s (Ioo_subset_Icc_self hs.1)).hasDerivAt (Icc_mem_nhds hs.1.1 hs.1.2)).fst) + (F.branch_differential zX zY hs hne).2 + +lemma PhaseFlowOn.actual_signed_identity {E B : Field} {T s : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hs : s∈branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1≠(F.flow zY s).1) : + let τ := branchTime F.flow zX zY T + let r := fun σ => τ σ-σ + let a := fun σ => velocity (F.flow zX (τ σ)).2 + let u := fun σ => velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + signedForceKernel (r s) (a s) (u s) (n s) (phaseAcceleration E B F.flow zY s) = + -deriv (fun σ => retardedPrimitive (r σ) (a σ) (u σ) (n σ)) s+ + signedRemainder (r s) (a s) (u s) (n s) (phaseAcceleration E B F.flow zX (τ s)) := by + let τ := branchTime F.flow zX zY T + let r := fun σ => τ σ-σ + let a := fun σ => velocity (F.flow zX (τ σ)).2 + let u := fun σ => velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + have ht := F.branch_time_mem zX zY hs hne + have hτ := (F.branch_differential zX zY hs hne).2 + have hr : HasDerivAt r ((1-dot (n s) (u s))/(1-dot (n s) (a s))-1) s := + hτ.sub (hasDerivAt_id s) + have ha : HasDerivAt a + (((1-dot (n s) (u s))/(1-dot (n s) (a s))) • phaseAcceleration E B F.flow zX (τ s)) s := + (F.velocity_hasDerivAt zX ⟨hs.1.1.trans ht.1,ht.2⟩).scomp s hτ + have hu := F.velocity_hasDerivAt zY hs.1 + have hn := F.branchDirection_hasDerivAt zX zY hs hne + have hnorm := F.branchDirection_norm zX zY hs hne + have hd := (cone_denom_pos (F.flow zY s).2 (n s) hnorm).ne' + have hD := (cone_denom_pos (F.flow zX (τ s)).2 (n s) hnorm).ne' + have hh := signed_force_identity_along_branch hr ha hu hn + (sub_ne_zero.mpr ht.1.ne') hd hD + simpa only [signedRemainder,add_assoc] using hh + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal ENNReal + +namespace RVM + +def DyadicWindow (k n : ℕ) (x : ℝ) : Prop := + 1/(2:ℝ)^k ≤ (2:ℝ)^n*x ∧ (2:ℝ)^n*x ≤ (2:ℝ)^k + +lemma dyadicWindow_index_le {k n m : ℕ} {x : ℝ} + (hn : DyadicWindow k n x) (hm : DyadicWindow k m x) : m≤n+2*k := by + have hpk : 0<(2:ℝ)^k := by positivity + have hx : 0≤x := by + by_contra hh + have he := mul_neg_of_pos_of_neg (by positivity : 0<(2:ℝ)^n) (lt_of_not_ge hh) + have hp : 0<1/(2:ℝ)^k := by positivity + linarith [hn.1] + by_contra hnm + have hi : n+(2*k+1) ≤ m := by omega + have he := mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num : (1:ℝ)≤2) hi) hx + have hlo : 2*(2:ℝ)^k ≤ (2:ℝ)^(n+(2*k+1))*x := by + calc + _ = (1/(2:ℝ)^k)*(2:ℝ)^(2*k+1) := by + rw [pow_add,show 2*k=k*2 from Nat.mul_comm _ _,pow_mul]; norm_num; field_simp + _ ≤ ((2:ℝ)^n*x)*(2:ℝ)^(2*k+1) := + mul_le_mul_of_nonneg_right hn.1 (by positivity) + _ = _ := by rw [pow_add]; ring + have hh := hlo.trans (he.trans hm.2) + linarith + +lemma dyadicWindow_card_le (k : ℕ) (S : Finset ℕ) {x : ℝ} + (hS : ∀ n∈S, DyadicWindow k n x) : S.card≤4*k+1 := by + classical + by_cases hs : S.Nonempty + · obtain ⟨n,hn⟩ := hs + have hsub : S⊆Finset.Icc (n-2*k) (n+2*k) := by + intro m hm + have hlo := dyadicWindow_index_le (hS m hm) (hS n hn) + have hhi := dyadicWindow_index_le (hS n hn) (hS m hm) + exact Finset.mem_Icc.mpr ⟨by omega,hhi⟩ + have hh := Finset.card_le_card hsub + rw [Nat.card_Icc] at hh + omega + · simp [Finset.not_nonempty_iff_eq_empty.mp hs] + +lemma dyadicWindow_pair_card_le (k : ℕ) (S : Finset (ℕ × ℕ)) {x y : ℝ} + (hS : ∀ n∈S, DyadicWindow k n.1 x ∧ DyadicWindow k n.2 y) : + S.card≤(4*k+1)^2 := by + classical + let A := S.image Prod.fst + let B := S.image Prod.snd + have hA : A.card≤4*k+1 := by + apply dyadicWindow_card_le + intro n hn + obtain ⟨m,hm,rfl⟩ := Finset.mem_image.mp hn + exact (hS m hm).1 + have hB : B.card≤4*k+1 := by + apply dyadicWindow_card_le + intro n hn + obtain ⟨m,hm,rfl⟩ := Finset.mem_image.mp hn + exact (hS m hm).2 + have hsub : S⊆A×ˢ B := by + intro n hn + exact Finset.mem_product.mpr ⟨Finset.mem_image.mpr ⟨n,hn,rfl⟩, + Finset.mem_image.mpr ⟨n,hn,rfl⟩⟩ + calc + _ ≤ (A×ˢ B).card := Finset.card_le_card hsub + _ = A.card*B.card := Finset.card_product _ _ + _ ≤ (4*k+1)*(4*k+1) := Nat.mul_le_mul hA hB + _ = _ := (pow_two _).symm + +lemma measurableSet_dyadicWindow (k n : ℕ) : MeasurableSet {x : ℝ | DyadicWindow k n x} := + ((isClosed_le continuous_const (continuous_const.mul continuous_id)).inter + (isClosed_le (continuous_const.mul continuous_id) continuous_const)).measurableSet + +def sameTimeBudgetSet (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (n : ℕ × ℕ) : Set (ℝ × Phase) := + {p | p.1∈Ioo 0 T ∧ DyadicWindow k n.1 (q p.2.2)⁻¹ ∧ + DyadicWindow k n.2 ‖velocity p.2.2-velocity (α zX p.1).2‖} + +def arrivalFinalDomain (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) : Set (ℝ × Vec) := + {p | p.1∈Ioo 0 T ∧ p.1+‖(α zX T).1-p.2‖=T} + +def arrivalBudgetSet (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (n : ℕ × ℕ) : Set (ℝ × Phase) := + {p | DyadicWindow k n.1 (q p.2.2)⁻¹ ∧ + (( (p.1,p.2.1)∈arrivalDomain α zX T ∧ + DyadicWindow k n.2 (Real.sqrt ((1-dot (arrivalDirection α zX T (p.1,p.2.1)) + (arrivalVelocity α zX T (p.1,p.2.1)))/2))) ∨ + ((p.1,p.2.1)∈arrivalFinalDomain α zX T ∧ + DyadicWindow k n.2 (Real.sqrt ((1-dot ((T-p.1)⁻¹ • ((α zX T).1-p.2.1)) + (velocity (α zX T).2))/2))))} + +lemma PhaseFlowOn.measurable_sameTimeBudgetSet {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (k : ℕ) (n : ℕ × ℕ) : + MeasurableSet (sameTimeBudgetSet F.flow zX T k n) := by + classical + let U : Set (ℝ × Phase) := {p | p.1∈Ioo 0 T} + have hU : IsOpen U := isOpen_Ioo.preimage continuous_fst + have hc : ContinuousOn (fun p : ℝ × Phase => ‖velocity p.2.2-velocity (F.flow zX p.1).2‖) U := by + intro p hp + have hX := ((F.continuousOn_time zX).snd.continuousAt (Icc_mem_nhds hp.1 hp.2)).comp continuousAt_fst + exact (((contDiff_velocity (k:=1)).continuous.continuousAt.comp (continuousAt_snd.snd)).sub + ((contDiff_velocity (k:=1)).continuous.continuousAt.comp hX)).norm.continuousWithinAt + have hm : Measurable (U.piecewise + (fun p : ℝ × Phase => ‖velocity p.2.2-velocity (F.flow zX p.1).2‖) (fun _ => 0)) := + hc.measurable_piecewise continuousOn_const hU.measurableSet + have hq : Measurable (fun p : ℝ × Phase => (q p.2.2)⁻¹) := + ((contDiff_q (k:=1)).continuous.measurable.comp (measurable_snd.snd)).inv + have hh := hU.measurableSet.inter ((measurableSet_dyadicWindow k n.1).preimage hq |>.inter + ((measurableSet_dyadicWindow k n.2).preimage hm)) + convert hh using 1 + ext p + constructor + · rintro ⟨hp,hq,hb⟩ + refine ⟨hp,hq,?_⟩ + change DyadicWindow k n.2 (U.piecewise + (fun p : ℝ × Phase => ‖velocity p.2.2-velocity (F.flow zX p.1).2‖) (fun _ => (0:ℝ)) p) + rw [piecewise_eq_of_mem U _ _ (show p∈U from hp)] + exact hb + · rintro ⟨hp,hq,hb⟩ + change DyadicWindow k n.2 (U.piecewise + (fun p : ℝ × Phase => ‖velocity p.2.2-velocity (F.flow zX p.1).2‖) (fun _ => (0:ℝ)) p) at hb + rw [piecewise_eq_of_mem U _ _ hp] at hb + exact ⟨hp,hq,hb⟩ + +lemma PhaseFlowOn.measurable_arrivalBudgetSet {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (k : ℕ) (n : ℕ × ℕ) : + MeasurableSet (arrivalBudgetSet F.flow zX T k n) := by + classical + let U := arrivalDomain F.flow zX T + let b : ℝ × Vec → ℝ := fun p => Real.sqrt ((1-dot + (arrivalDirection F.flow zX T p) (arrivalVelocity F.flow zX T p))/2) + have hb : ContinuousOn b U := by + intro p hp + exact (((continuousAt_const.sub (continuous_dot.continuousAt.comp ((F.arrivalDirection_continuousAt zX hp).prodMk + (F.arrivalVelocity_continuousAt zX hp)))).div_const 2).sqrt).continuousWithinAt + have hm : Measurable (U.indicator b) := hb.measurable_piecewise continuousOn_const + (F.isOpen_arrivalDomain zX).measurableSet + have hopen : MeasurableSet {p | p∈U ∧ DyadicWindow k n.2 (b p)} := by + convert (F.isOpen_arrivalDomain zX).measurableSet.inter + ((measurableSet_dyadicWindow k n.2).preimage hm) using 1 + ext p + change (p∈U ∧ DyadicWindow k n.2 (b p)) ↔ + (p∈U ∧ DyadicWindow k n.2 (U.indicator b p)) + by_cases hp : p∈U <;> simp [hp] + have hfinal : MeasurableSet (arrivalFinalDomain F.flow zX T) := + (measurable_fst (measurableSet_Ioo)).inter + (measurableSet_eq_fun (measurable_fst.add (measurable_const.sub measurable_snd).norm) measurable_const) + have hbfinal : Measurable (fun p : ℝ × Vec => Real.sqrt ((1-dot + ((T-p.1)⁻¹ • ((F.flow zX T).1-p.2)) (velocity (F.flow zX T).2))/2)) := by + unfold dot + fun_prop + have hq : Measurable (fun p : ℝ × Phase => (q p.2.2)⁻¹) := + ((contDiff_q (k:=1)).continuous.measurable.comp (measurable_snd.snd)).inv + exact (measurableSet_dyadicWindow k n.1).preimage hq |>.inter + ((hopen.union (hfinal.inter ((measurableSet_dyadicWindow k n.2).preimage hbfinal))).preimage + (measurable_fst.prodMk measurable_snd.fst)) + +lemma dyadicWindow_sum_indicator {α : Type*} (k : ℕ) (S : Finset (ℕ × ℕ)) + (G : ℕ × ℕ → Set α) (p : α) (e : ℝ≥0∞) {x y : ℝ} + (hG : ∀ n∈S, p∈G n → DyadicWindow k n.1 x ∧ DyadicWindow k n.2 y) : + (∑ n∈S, (G n).indicator (fun _ => e) p) ≤ ((4*k+1)^2 : ℕ)*e := by + classical + have hc : (S.filter (fun n => p∈G n)).card≤(4*k+1)^2 := by + apply dyadicWindow_pair_card_le + intro n hn + exact hG n (Finset.mem_filter.mp hn).1 (Finset.mem_filter.mp hn).2 + have heq : (∑ n∈S, (G n).indicator (fun _ => e) p)= + (S.filter (fun n => p∈G n)).card*e := by + simp only [Set.indicator] + rw [← Finset.sum_filter] + simp only [Finset.sum_const,nsmul_eq_mul] + rw [heq] + exact mul_le_mul' (by exact_mod_cast hc) le_rfl + +lemma jointBudget_pointwise (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (S : Finset (ℕ × ℕ)) (p : ℝ × Phase) (e : ℝ≥0∞) : + (∑ n∈S, ((sameTimeBudgetSet α zX T k n).indicator (fun _ => e) p+ + (arrivalBudgetSet α zX T k n).indicator (fun _ => e) p)) ≤ + (3*(4*k+1)^2 : ℕ)*e := by + classical + let G₁ := sameTimeBudgetSet α zX T k + let G₂ : ℕ × ℕ → Set (ℝ × Phase) := fun n => + {r | DyadicWindow k n.1 (q r.2.2)⁻¹ ∧ + (r.1,r.2.1)∈arrivalDomain α zX T ∧ + DyadicWindow k n.2 (Real.sqrt ((1-dot (arrivalDirection α zX T (r.1,r.2.1)) + (arrivalVelocity α zX T (r.1,r.2.1)))/2))} + let G₃ : ℕ × ℕ → Set (ℝ × Phase) := fun n => + {r | DyadicWindow k n.1 (q r.2.2)⁻¹ ∧ + (r.1,r.2.1)∈arrivalFinalDomain α zX T ∧ + DyadicWindow k n.2 (Real.sqrt ((1-dot ((T-r.1)⁻¹ • ((α zX T).1-r.2.1)) + (velocity (α zX T).2))/2))} + have h₁ := dyadicWindow_sum_indicator k S G₁ p e + (fun n _ hn => hn.2) + have h₂ := dyadicWindow_sum_indicator k S G₂ p e + (fun n _ hn => ⟨hn.1,hn.2.2⟩) + have h₃ := dyadicWindow_sum_indicator k S G₃ p e + (fun n _ hn => ⟨hn.1,hn.2.2⟩) + have hpart (n : ℕ × ℕ) : (arrivalBudgetSet α zX T k n).indicator (fun _ => e) p ≤ + (G₂ n).indicator (fun _ => e) p+(G₃ n).indicator (fun _ => e) p := by + by_cases hp : p∈arrivalBudgetSet α zX T k n + · rw [indicator_of_mem hp] + rcases hp.2 with h|h + · have hh : p∈G₂ n := ⟨hp.1,h⟩ + rw [indicator_of_mem hh] + exact le_add_right le_rfl + · have hh : p∈G₃ n := ⟨hp.1,h⟩ + rw [indicator_of_mem hh] + exact le_add_left le_rfl + · rw [indicator_of_notMem hp]; exact zero_le + calc + _ ≤ ∑ n∈S, ((G₁ n).indicator (fun _ => e) p+ + ((G₂ n).indicator (fun _ => e) p+(G₃ n).indicator (fun _ => e) p)) := + Finset.sum_le_sum (fun n _ => add_le_add le_rfl (hpart n)) + _ = (∑ n∈S, (G₁ n).indicator (fun _ => e) p)+ + ((∑ n∈S, (G₂ n).indicator (fun _ => e) p)+(∑ n∈S, (G₃ n).indicator (fun _ => e) p)) := by + simp only [Finset.sum_add_distrib] + _ ≤ ((4*k+1)^2:ℕ)*e+(((4*k+1)^2:ℕ)*e+((4*k+1)^2:ℕ)*e) := add_le_add h₁ (add_le_add h₂ h₃) + _ = _ := by push_cast; ring + +def prefixPhaseEnergy (s : Solution) (T : ℝ) : ℝ × Phase → ℝ≥0∞ := + (Icc 0 T ×ˢ (univ : Set Phase)).indicator (fun p => ENNReal.ofReal (q p.2.2*s.f p)) + +lemma EnergyPrefix.measurable_prefixPhaseEnergy {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) : Measurable (prefixPhaseEnergy s T) := by + classical + have hc : ContinuousOn (fun p : ℝ × Phase => ENNReal.ofReal (q p.2.2*s.f p)) + (Icc 0 T ×ˢ (univ : Set Phase)) := + ENNReal.continuous_ofReal.comp_continuousOn + ((((contDiff_q (k:=1)).continuous.comp (continuous_snd.snd)).continuousOn).mul hs.f_smooth.continuousOn) + unfold prefixPhaseEnergy + convert hc.measurable_piecewise (continuousOn_const (c:=(0:ℝ≥0∞))) + (measurableSet_Icc.prod MeasurableSet.univ) using 1 + ext p + by_cases hp : p∈Icc 0 T ×ˢ (univ : Set Phase) + · rw [indicator_of_mem hp,piecewise_eq_of_mem _ _ _ hp] + · rw [indicator_of_notMem hp,piecewise_eq_of_notMem _ _ _ hp] + +def jointEnergyBudget (s : Solution) (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (a b I : ℝ) (n : ℕ × ℕ) : ℝ≥0∞ := + (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc a b, ∫⁻ z : Phase, + (sameTimeBudgetSet α zX T k n).indicator (prefixPhaseEnergy s T) (t,z)+ + (arrivalBudgetSet α zX T k n).indicator (prefixPhaseEnergy s T) (t,z) + +lemma jointEnergyBudget_eq {s : Solution} {α : Phase → ℝ → Phase} {zX : Phase} {T : ℝ} + (k : ℕ) {a b I : ℝ} (hJ : Icc a b⊆Icc (0:ℝ) T) (n : ℕ × ℕ) : + jointEnergyBudget s α zX T k a b I n = + (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc a b, ∫⁻ z : Phase, + (sameTimeBudgetSet α zX T k n).indicator (fun p => ENNReal.ofReal (q p.2.2*s.f p)) (t,z)+ + (arrivalBudgetSet α zX T k n).indicator (fun p => ENNReal.ofReal (q p.2.2*s.f p)) (t,z) := by + unfold jointEnergyBudget + congr 1 + apply setLIntegral_congr_fun measurableSet_Icc + intro t ht + apply lintegral_congr + intro z + have he : prefixPhaseEnergy s T (t,z)=ENNReal.ofReal (q z.2*s.f (t,z)) := + by simp only [prefixPhaseEnergy,indicator_of_mem (show (t,z)∈Icc 0 T ×ˢ (univ : Set Phase) from ⟨hJ ht,mem_univ _⟩)] + by_cases h₁ : (t,z)∈sameTimeBudgetSet α zX T k n <;> + by_cases h₂ : (t,z)∈arrivalBudgetSet α zX T k n <;> simp [h₁,h₂,he] + +lemma PhaseFlowOn.jointEnergyBudget_sum_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (k : ℕ) {a b I : ℝ} (hJ : Icc a b⊆Icc (0:ℝ) T) (S : Finset (ℕ × ℕ)) : + ∑ n∈S, jointEnergyBudget s F.flow zX T k a b I n ≤ + (ENNReal.ofReal I)⁻¹ * (3*(4*k+1)^2:ℕ) * ENNReal.ofReal (b-a) * + ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + classical + let g : ℕ × ℕ → ℝ × Phase → ℝ≥0∞ := fun n p => + (sameTimeBudgetSet F.flow zX T k n).indicator (prefixPhaseEnergy s T) p+ + (arrivalBudgetSet F.flow zX T k n).indicator (prefixPhaseEnergy s T) p + have hg (n : ℕ × ℕ) : Measurable (g n) := + ((hs.measurable_prefixPhaseEnergy).indicator (F.measurable_sameTimeBudgetSet zX k n)).add + ((hs.measurable_prefixPhaseEnergy).indicator (F.measurable_arrivalBudgetSet zX k n)) + have hint (t : ℝ) (ht : t∈Icc a b) : + (∫⁻ z : Phase, ∑ n∈S, g n (t,z)) ≤ (3*(4*k+1)^2:ℕ)* + ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + calc + _ ≤ ∫⁻ z : Phase, (3*(4*k+1)^2:ℕ)*prefixPhaseEnergy s T (t,z) := + lintegral_mono (fun z => jointBudget_pointwise F.flow zX T k S (t,z) (prefixPhaseEnergy s T (t,z))) + _ = (3*(4*k+1)^2:ℕ)*(∫⁻ z : Phase, ENNReal.ofReal (q z.2*s.f (t,z))) := by + rw [lintegral_const_mul' _ _ (by finiteness)] + congr 1 + apply lintegral_congr + intro z + simp only [prefixPhaseEnergy,indicator_of_mem + (show (t,z)∈Icc 0 T ×ˢ (univ : Set Phase) from ⟨hJ ht,mem_univ _⟩)] + _ ≤ _ := mul_le_mul' le_rfl (hs.phase_energy_bound (hJ ht)) + have heq : (∑ n∈S, jointEnergyBudget s F.flow zX T k a b I n)= + (ENNReal.ofReal I)⁻¹*(∫⁻ t in Icc a b, ∫⁻ z : Phase, ∑ n∈S, g n (t,z)) := by + change (∑ n∈S, (ENNReal.ofReal I)⁻¹*(∫⁻ t in Icc a b, ∫⁻ z : Phase, g n (t,z))) = _ + rw [← Finset.mul_sum] + congr 1 + rw [← lintegral_finsetSum S (fun n _ => (hg n).lintegral_prod_right')] + apply lintegral_congr + intro t + exact (lintegral_finsetSum S (fun n _ => (hg n).comp (measurable_const.prodMk measurable_id))).symm + rw [heq] + calc + _ ≤ (ENNReal.ofReal I)⁻¹ * (∫⁻ t in Icc a b, + (3*(4*k+1)^2:ℕ)*ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x))) := + mul_le_mul' le_rfl (lintegral_mono_ae (ae_restrict_of_forall_mem measurableSet_Icc hint)) + _ = _ := by + rw [lintegral_const,Measure.restrict_apply_univ,Real.volume_Icc] + ac_rfl + +lemma PhaseFlowOn.jointEnergyBudget_tsum_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (k : ℕ) {a b I : ℝ} (hJ : Icc a b⊆Icc (0:ℝ) T) : + ∑' n : ℕ × ℕ, jointEnergyBudget s F.flow zX T k a b I n ≤ + (ENNReal.ofReal I)⁻¹ * (3*(4*k+1)^2:ℕ) * ENNReal.ofReal (b-a) * + ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + rw [ENNReal.tsum_eq_iSup_sum] + exact iSup_le (F.jointEnergyBudget_sum_bound hs zX k hJ) + +lemma PhaseFlowOn.jointEnergyBudget_uniform {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (k : ℕ) {a b I C : ℝ} (hJ : Icc a b⊆Icc (0:ℝ) T) + (hI : 0 ENNReal.ofReal (r.1^2)) := + (measurable_subtype_coe.pow_const 2).ennreal_ofReal + calc + _ = ∫⁻ r : Ioi (0 : ℝ), ENNReal.ofReal (r.1^2) * f r.1 ∂volume.comap Subtype.val := + lintegral_withDensity_eq_lintegral_mul _ hpow (hf.comp measurable_subtype_coe) + _ = _ := lintegral_subtype_comap (μ := volume) measurableSet_Ioi + (fun r : ℝ => ENNReal.ofReal (r^2) * f r) + +lemma lintegral_polar {f : Vec → ENNReal} (hf : Measurable f) : + (∫⁻ y : Vec, f y) = ∫⁻ n : Sphere, ∫⁻ r in Ioi (0 : ℝ), + ENNReal.ofReal (r^2) * f (r • n.1) ∂volume ∂sphereMeasure := by + calc + _ = ∫⁻ z : ({0}ᶜ : Set Vec), f z.1 ∂volume.comap Subtype.val := by + rw [lintegral_subtype_comap (measurableSet_singleton _).compl f,restrict_compl_singleton] + _ = ∫⁻ p : Sphere × Ioi (0 : ℝ), f (p.2.1 • p.1.1) + ∂sphereMeasure.prod (Measure.volumeIoiPow 2) := by + have h := (volume : Measure Vec).measurePreserving_homeomorphUnitSphereProd.lintegral_comp_emb + (Homeomorph.measurableEmbedding _) + (fun p => f (((homeomorphUnitSphereProd Vec).symm p).1)) + simpa only [Homeomorph.symm_apply_apply,homeomorphUnitSphereProd_symm_apply_coe, + finrank_euclideanSpace_fin,Nat.reduceSub] using h + _ = ∫⁻ n : Sphere, ∫⁻ r : Ioi (0 : ℝ), f (r.1 • n.1) ∂Measure.volumeIoiPow 2 + ∂sphereMeasure := by + apply lintegral_prod + exact (hf.comp ((measurable_subtype_coe.comp measurable_snd).smul + (measurable_subtype_coe.comp measurable_fst))).aemeasurable + _ = _ := by + apply lintegral_congr + intro n + exact lintegral_radial_measure (hf.comp (measurable_id.smul_const _)) + +lemma PhaseFlowOn.receiver_lintegral {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) (g : Vec → ENNReal) : + ∫⁻ y in ball (F.flow z T).1 (T-s), g y = + ∫⁻ w in receiverRadialDomain s T, + ENNReal.ofReal (1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2)) * + g (receiverRadial F.flow z s w) := by + have hd : ∀ w ∈ receiverRadialDomain s T, + HasFDerivWithinAt (receiverRadial F.flow z s) + (fderiv ℝ (receiverRadial F.flow z s) w) (receiverRadialDomain s T) w := by + intro w hw + exact (F.receiver_differential hs.1 z hw).differentiableAt.hasFDerivAt.hasFDerivWithinAt + calc + _ = ∫⁻ y in receiverRadial F.flow z s '' receiverRadialDomain s T, g y := by + apply setLIntegral_congr + rw [F.receiver_image hs z] + exact (sdiff_null_ae_eq_self (measure_singleton (F.flow z s).1)).symm + _ = ∫⁻ w in receiverRadialDomain s T, + ENNReal.ofReal |(fderiv ℝ (receiverRadial F.flow z s) w).det| * + g (receiverRadial F.flow z s w) := + lintegral_image_eq_lintegral_abs_det_fderiv_mul volume (isOpen_receiverRadialDomain s T).measurableSet + hd (F.receiver_injective hs z) g + _ = _ := by + apply setLIntegral_congr_fun (isOpen_receiverRadialDomain s T).measurableSet + intro w hw + dsimp only + rw [F.receiver_jacobian hs.1 z hw] + +lemma PhaseFlowOn.lintegral_comp {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (g : Phase → ENNReal) : + ∫⁻ z, g (F.flow z t) = ∫⁻ z, g z := by + have hh := lintegral_image_eq_lintegral_abs_det_fderiv_mul volume + (s := univ) MeasurableSet.univ + (fun z _ => (F.label z t ht).hasFDerivWithinAt) (F.bijective t ht).1.injOn g + simpa only [Set.image_univ,(F.bijective t ht).2.range_eq,setLIntegral_univ, + F.det_one _ _ ht,abs_one,ENNReal.ofReal_one,one_mul] using hh.symm + +lemma label_hit_tonelli {f₀ : Phase → ℝ} (hf₀ : Measurable f₀) + {H : Set (ℝ × Phase)} (hH : MeasurableSet H) : + (∫⁻ s : ℝ, ∫⁻ z : Phase, H.indicator + (fun p : ℝ × Phase => ENNReal.ofReal (f₀ p.2)) (s,z)) = + ∫⁻ z : Phase, ENNReal.ofReal (f₀ z) * volume {s : ℝ | (s,z) ∈ H} := by + have hm : Measurable (H.indicator (fun p : ℝ × Phase => ENNReal.ofReal (f₀ p.2))) := + ((hf₀.comp measurable_snd).ennreal_ofReal).indicator hH + rw [lintegral_lintegral_swap (f := fun s z => H.indicator + (fun p : ℝ × Phase => ENNReal.ofReal (f₀ p.2)) (s,z)) hm.aemeasurable] + apply lintegral_congr + intro z + have hs : MeasurableSet {s : ℝ | (s,z) ∈ H} := + hH.preimage (measurable_id.prodMk measurable_const) + calc + _ = ∫⁻ s : ℝ, ENNReal.ofReal (f₀ z) * {s : ℝ | (s,z) ∈ H}.indicator 1 s := by + apply lintegral_congr + intro s + by_cases h : (s,z) ∈ H <;> simp [Set.indicator,h] + _ = _ := by + rw [lintegral_const_mul' _ _ ENNReal.ofReal_ne_top,lintegral_indicator_one hs] + +lemma PhaseFlowOn.transport_weight_lintegral {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) {t : ℝ} (ht : t ∈ Icc 0 T) (g : Phase → ENNReal) : + (∫⁻ z, ENNReal.ofReal (f (t,z)) * g z) = + ∫⁻ z, ENNReal.ofReal (f (0,z)) * g (F.flow z t) := by + rw [← F.lintegral_comp ht (fun z => ENNReal.ofReal (f (t,z)) * g z)] + apply lintegral_congr + intro z + rw [F.transport hf heq ht] + +def phaseHits (α : Phase → ℝ → Phase) (T : ℝ) (H : Set (ℝ × Phase)) : Set (ℝ × Phase) := + {p | p.1 ∈ Ioo 0 T ∧ (p.1,α p.2 p.1) ∈ H} + +lemma PhaseFlowOn.measurable_phaseHits {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {H : Set (ℝ × Phase)} (hH : MeasurableSet H) : + MeasurableSet (phaseHits F.flow T H) := by + let α₀ := (Ioo 0 T ×ˢ (univ : Set Phase)).indicator (fun p : ℝ × Phase => F.flow p.2 p.1) + have hm : Measurable (fun p : ℝ × Phase => (p.1,α₀ p)) := + measurable_fst.prodMk F.measurable_joint_flow_zero + have he : phaseHits F.flow T H = (Ioo 0 T ×ˢ (univ : Set Phase)) ∩ + (fun p : ℝ × Phase => (p.1,α₀ p)) ⁻¹' H := by + ext p + by_cases hp : p.1 ∈ Ioo 0 T + · simp only [phaseHits,mem_ofPred_eq,hp,true_and,mem_inter_iff,mem_prod, + mem_univ,and_true,mem_preimage,α₀,Set.indicator_of_mem (show p ∈ Ioo 0 T ×ˢ (univ : Set Phase) from ⟨hp,mem_univ _⟩)] + · simp only [phaseHits,mem_ofPred_eq,hp,false_and,mem_inter_iff,mem_prod, + mem_univ,and_true] + rw [he] + exact (measurableSet_Ioo.prod MeasurableSet.univ).inter (hH.preimage hm) + +lemma PhaseFlowOn.phase_occupation_identity {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) {H : Set (ℝ × Phase)} (hH : MeasurableSet H) : + (∫⁻ t in Ioo 0 T, ∫⁻ z : Phase, H.indicator (fun p => ENNReal.ofReal (f p)) (t,z)) = + labelOccupation (fun z => f (0,z)) (fun z => {t | (t,z) ∈ phaseHits F.flow T H}) := by + have hf₀ : Measurable (fun z : Phase => f (0,z)) := + (hf.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + (fun _ => ⟨⟨le_rfl,hT⟩,mem_univ _⟩)).measurable + have hfixed (t : ℝ) (ht : t ∈ Ioo 0 T) : + (∫⁻ z : Phase, H.indicator (fun p => ENNReal.ofReal (f p)) (t,z)) = + ∫⁻ z : Phase, (phaseHits F.flow T H).indicator + (fun p : ℝ × Phase => ENNReal.ofReal (f (0,p.2))) (t,z) := by + calc + _ = ∫⁻ z : Phase, ENNReal.ofReal (f (t,z)) * H.indicator 1 (t,z) := by + apply lintegral_congr + intro z + by_cases h : (t,z) ∈ H <;> simp [Set.indicator,h] + _ = ∫⁻ z : Phase, ENNReal.ofReal (f (0,z)) * H.indicator 1 (t,F.flow z t) := + F.transport_weight_lintegral hf heq (Ioo_subset_Icc_self ht) _ + _ = _ := by + apply lintegral_congr + intro z + by_cases h : (t,F.flow z t) ∈ H + · rw [Set.indicator_of_mem h,Set.indicator_of_mem + (show (t,z) ∈ phaseHits F.flow T H from ⟨ht,h⟩)] + simp + · rw [Set.indicator_of_notMem h,Set.indicator_of_notMem + (show (t,z) ∉ phaseHits F.flow T H from fun hh => h hh.2)] + simp + calc + _ = ∫⁻ t : ℝ, ∫⁻ z : Phase, (phaseHits F.flow T H).indicator + (fun p : ℝ × Phase => ENNReal.ofReal (f (0,p.2))) (t,z) := by + rw [← lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro t + by_cases ht : t ∈ Ioo 0 T + · rw [Set.indicator_of_mem ht] + exact hfixed t ht + · rw [Set.indicator_of_notMem ht] + symm + calc + _ = ∫⁻ _z : Phase, (0 : ENNReal) := by + apply lintegral_congr + intro z + exact Set.indicator_of_notMem (fun h => ht h.1) _ + _ = _ := lintegral_zero + _ = _ := label_hit_tonelli hf₀ (F.measurable_phaseHits hH) +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseTimePullback.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseTimePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3e3f47d0470eb3c58e0ed33b0da5fc595d207d8 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/PhaseTimePullback.lean @@ -0,0 +1,316 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ArrivalDomain +import OAI.Analysis.VlasovMaxwell.Regularity.PhysicalCutoffCoordinates + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def phaseTimePullback {W : Type*} [Zero W] (α : Phase→ℝ→Phase) (T : ℝ) + (g : ℝ×Phase→W) : ℝ×Phase→W := + (Ioo (0:ℝ) T ×ˢ (univ : Set Phase)).indicator (fun p=>g (p.1,α p.2 p.1)) + +lemma PhaseFlowOn.measurable_phaseTimePullback {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) {W : Type*} [Zero W] [MeasurableSpace W] + {g : ℝ×Phase→W} (hg : Measurable g) : + Measurable (phaseTimePullback F.flow T g) := by + classical + have hm := (hg.comp (measurable_fst.prodMk F.measurable_joint_flow_zero)).indicator + ((measurableSet_Ioo : MeasurableSet (Ioo (0:ℝ) T)).prod MeasurableSet.univ) + convert hm using 1 + funext p + by_cases hp : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · simp only [phaseTimePullback,Function.comp_apply,indicator_of_mem hp] + · simp only [phaseTimePullback,indicator_of_notMem hp] + +lemma PhaseFlowOn.lintegral_phaseTimePullback {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) {g : ℝ×Phase→ENNReal} (hg : Measurable g) : + (∫⁻ p : ℝ×Phase,phaseTimePullback F.flow T g p)= + ∫⁻ p in Ioo (0:ℝ) T ×ˢ (univ : Set Phase),g p := by + classical + have hS := (measurableSet_Ioo : MeasurableSet (Ioo (0:ℝ) T)).prod (MeasurableSet.univ : MeasurableSet (univ : Set Phase)) + rw [←lintegral_indicator hS] + calc + _ = ∫⁻ t : ℝ,∫⁻ z : Phase,phaseTimePullback F.flow T g (t,z) := + lintegral_prod _ (F.measurable_phaseTimePullback hg).aemeasurable + _ = ∫⁻ t : ℝ,∫⁻ z : Phase,(Ioo (0:ℝ) T ×ˢ (univ : Set Phase)).indicator g (t,z) := by + apply lintegral_congr + intro t + by_cases ht : t∈Ioo (0:ℝ) T + · simpa only [phaseTimePullback,indicator_of_mem (show (t,_)∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) from ⟨ht,mem_univ _⟩)] + using F.lintegral_comp (Ioo_subset_Icc_self ht) (fun z=>g (t,z)) + · have hp : ∀z : Phase,(t,z)∉Ioo (0:ℝ) T ×ˢ (univ : Set Phase) := fun z h=>ht h.1 + simp only [phaseTimePullback,indicator_of_notMem (hp _)] + _ = _ := (lintegral_prod _ (hg.indicator hS).aemeasurable).symm + +lemma PhaseFlowOn.phaseTimePullback_integrable_iff {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] [MeasurableSpace W] [BorelSpace W] [SecondCountableTopology W] + {g : ℝ×Phase→W} (hg : Measurable g) : + Integrable (phaseTimePullback F.flow T g) ↔ + IntegrableOn g (Ioo (0:ℝ) T ×ˢ (univ : Set Phase)) := by + classical + have hS := (measurableSet_Ioo : MeasurableSet (Ioo (0:ℝ) T)).prod (MeasurableSet.univ : MeasurableSet (univ : Set Phase)) + have he : (∫⁻ p : ℝ×Phase,ENNReal.ofReal ‖phaseTimePullback F.flow T g p‖)= + ∫⁻ p in Ioo (0:ℝ) T ×ˢ (univ : Set Phase),ENNReal.ofReal ‖g p‖ := by + rw [←F.lintegral_phaseTimePullback hg.norm.ennreal_ofReal] + apply lintegral_congr + intro p + by_cases hp : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · simp only [phaseTimePullback,indicator_of_mem hp] + · simp only [phaseTimePullback,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + constructor + · intro h + refine ⟨hg.aestronglyMeasurable,?_⟩ + rw [hasFiniteIntegral_iff_norm,←he] + exact (hasFiniteIntegral_iff_norm _).mp h.2 + · intro h + refine ⟨(F.measurable_phaseTimePullback hg).aestronglyMeasurable,?_⟩ + rw [hasFiniteIntegral_iff_norm,he] + exact (hasFiniteIntegral_iff_norm _).mp h.2 + +lemma PhaseFlowOn.integral_phaseTimePullback {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] [MeasurableSpace W] [BorelSpace W] [SecondCountableTopology W] + {g : ℝ×Phase→W} (hg : Measurable g) + (hi : IntegrableOn g (Ioo (0:ℝ) T ×ˢ (univ : Set Phase))) : + (∫ p : ℝ×Phase,phaseTimePullback F.flow T g p)= + ∫ p in Ioo (0:ℝ) T ×ˢ (univ : Set Phase),g p := by + classical + have hS := (measurableSet_Ioo : MeasurableSet (Ioo (0:ℝ) T)).prod (MeasurableSet.univ : MeasurableSet (univ : Set Phase)) + have hip := (F.phaseTimePullback_integrable_iff hg).mpr hi + have hiS := hi.integrable_indicator hS + rw [←integral_indicator hS] + calc + _ = ∫ t : ℝ,∫ z : Phase,phaseTimePullback F.flow T g (t,z) := integral_prod _ hip + _ = ∫ t : ℝ,∫ z : Phase,(Ioo (0:ℝ) T ×ˢ (univ : Set Phase)).indicator g (t,z) := by + apply integral_congr_ae + apply ae_of_all + intro t + by_cases ht : t∈Ioo (0:ℝ) T + · simpa only [phaseTimePullback,indicator_of_mem (show (t,_)∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) from ⟨ht,mem_univ _⟩)] + using F.integral_comp (Ioo_subset_Icc_self ht) (fun z=>g (t,z)) + · have hp : ∀z : Phase,(t,z)∉Ioo (0:ℝ) T ×ˢ (univ : Set Phase) := fun z h=>ht h.1 + simp only [phaseTimePullback,indicator_of_notMem (hp _)] + _ = _ := (integral_prod _ hiS).symm + +lemma PhaseFlowOn.arrival_polar_mem {E B : Field} {T s r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hs : s∈Ioo 0 T) + (hr : r∈Ioo (0:ℝ) (T-s)) (n : Sphere) : + (s,(F.flow zX (s+r)).1-r • n.1)∈arrivalDomain F.flow zX T := by + have hn := sphere_norm n + have hw : r • n.1∈receiverRadialDomain s T := by + change 0<‖r • n.1‖ ∧ s+‖r • n.1‖hy.2 (mem_singleton_iff.mpr hh.symm) + +lemma PhaseFlowOn.arrival_polar_time {E B : Field} {T s r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hs : s∈Ioo 0 T) + (hr : r∈Ioo (0:ℝ) (T-s)) (n : Sphere) : + arrivalTime F.flow zX T (s,(F.flow zX (s+r)).1-r • n.1)=s+r := by + have hd := F.arrival_polar_mem zX hs hr n + have hl := F.arrivalLabel_mem zX hd + have hh : F.flow (arrivalLabel F.flow (s,(F.flow zX (s+r)).1-r • n.1)).2 s = + ((F.flow zX (s+r)).1-r • n.1,0) := + F.flow_inversePhase (Ioo_subset_Icc_self hs) _ + symm + apply F.branch_unique (s:=s) zX _ hl.1 ⟨by linarith [hr.1],by linarith [hr.2]⟩ + rw [hh] + simp only [sub_sub_cancel,norm_smul,Real.norm_eq_abs,abs_of_pos hr.1, + sphere_norm,mul_one] + ring + +lemma PhaseFlowOn.arrival_polar_radius {E B : Field} {T s r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hs : s∈Ioo 0 T) + (hr : r∈Ioo (0:ℝ) (T-s)) (n : Sphere) : + arrivalRadius F.flow zX T (s,(F.flow zX (s+r)).1-r • n.1)=r := by + rw [arrivalRadius,F.arrival_polar_time zX hs hr n] + ring + +lemma PhaseFlowOn.arrival_polar_direction {E B : Field} {T s r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hs : s∈Ioo 0 T) + (hr : r∈Ioo (0:ℝ) (T-s)) (n : Sphere) : + arrivalDirection F.flow zX T (s,(F.flow zX (s+r)).1-r • n.1)=n.1 := by + rw [arrivalDirection,F.arrival_polar_radius zX hs hr n,F.arrival_polar_time zX hs hr n] + simp only [sub_sub_cancel,smul_smul,inv_mul_cancel₀ (ne_of_gt hr.1),one_smul] + +def arrivalInverseSquare (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : ℝ×Vec→ℝ := + (arrivalDomain α zX T).indicator (fun p=>(arrivalRadius α zX T p)⁻¹^2) + +lemma PhaseFlowOn.measurable_arrivalInverseSquare {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + Measurable (arrivalInverseSquare F.flow zX T) := by + classical + have hc : ContinuousOn (fun p : ℝ×Vec=>(arrivalRadius F.flow zX T p)⁻¹^2) + (arrivalDomain F.flow zX T) := by + intro p hp + apply (((F.arrivalRadius_continuousAt zX hp).inv₀ ?_).pow 2).continuousWithinAt + exact ne_of_gt (sub_pos.mpr (F.arrival_time_spec zX hp).1.1) + exact hc.measurable_piecewise continuousOn_const (F.isOpen_arrivalDomain zX).measurableSet + +lemma arrivalInverseSquare_nonneg (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (p : ℝ×Vec) : 0≤arrivalInverseSquare α zX T p := by + classical + exact indicator_nonneg (fun _ _=>sq_nonneg _) _ + +lemma PhaseFlowOn.arrivalInverseSquare_lintegral {E B : Field} {T s : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hs : s∈Ioo 0 T) : + (∫⁻ y : Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,y))) ≤ + (2:ENNReal)*ENNReal.ofReal (T-s)*sphereMeasure univ := by + classical + let g : Vec→ENNReal := fun y=>ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,y)) + have hgm : Measurable g := ((F.measurable_arrivalInverseSquare zX).comp + (measurable_const.prodMk measurable_id)).ennreal_ofReal + have hrestrict : (∫⁻ y : Vec,g y)=∫⁻ y in ball (F.flow zX T).1 (T-s),g y := by + rw [←lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y∈ball (F.flow zX T).1 (T-s) + · rw [indicator_of_mem hy] + · rw [indicator_of_notMem hy] + have hh : (s,y)∉arrivalDomain F.flow zX T := by + intro h + apply hy + rw [mem_ball,dist_eq_norm,norm_sub_rev] + linarith [h.2.1] + simp only [g,arrivalInverseSquare,indicator_of_notMem hh,ENNReal.ofReal_zero] + change (∫⁻ y : Vec,g y)≤_ + rw [hrestrict,F.receiver_polar_lintegral (Ioo_subset_Icc_self hs) zX hgm] + calc + _ ≤ ∫⁻ _n : Sphere,∫⁻ _r in Ioo (0:ℝ) (T-s),(2:ENNReal) ∂volume ∂sphereMeasure := by + apply lintegral_mono + intro n + apply lintegral_mono_ae + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro r hr + have hd := F.arrival_polar_mem zX hs hr n + have hra := F.arrival_polar_radius zX hs hr n + have hD : 0≤1-dot n.1 (velocity (F.flow zX (s+r)).2) := + (cone_denom_pos _ _ (sphere_norm n)).le + change ENNReal.ofReal (r^2*(1-dot n.1 (velocity (F.flow zX (s+r)).2))) * + ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,(F.flow zX (s+r)).1-r • n.1))≤2 + rw [arrivalInverseSquare,indicator_of_mem hd,hra,←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg r) hD)] + have he : r^2*(1-dot n.1 (velocity (F.flow zX (s+r)).2))*r⁻¹^2= + 1-dot n.1 (velocity (F.flow zX (s+r)).2) := by + field_simp [ne_of_gt hr.1] + rw [he] + exact (ENNReal.ofReal_le_ofReal (real_deficit_le_two (sphere_norm n) _)).trans_eq (by norm_num) + _ = _ := by simp [lintegral_const,Real.volume_Ioo,mul_assoc] + +lemma PhaseFlowOn.arrivalInverseSquare_integrable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + Integrable (arrivalInverseSquare F.flow zX T) := by + classical + have hm := F.measurable_arrivalInverseSquare zX + have hfin : (∫⁻ p : ℝ×Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T p))<⊤ := by + change (∫⁻ p : ℝ×Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T p) + ∂((volume : Measure ℝ).prod (volume : Measure Vec)))<⊤ + rw [lintegral_prod _ hm.ennreal_ofReal.aemeasurable] + have hr : (∫⁻ s : ℝ,∫⁻ y : Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,y)))= + ∫⁻ s in Ioo (0:ℝ) T,∫⁻ y : Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,y)) := by + rw [←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro s + by_cases hs : s∈Ioo (0:ℝ) T + · rw [indicator_of_mem hs] + · rw [indicator_of_notMem hs] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro y + have hh : (s,y)∉arrivalDomain F.flow zX T := fun h=>hs h.1 + simp only [arrivalInverseSquare,indicator_of_notMem hh,ENNReal.ofReal_zero,Pi.zero_apply] + rw [hr] + have hb : ∀ s∈Ioo (0:ℝ) T, + (∫⁻ y : Vec,ENNReal.ofReal (arrivalInverseSquare F.flow zX T (s,y)))≤ + (2:ENNReal)*ENNReal.ofReal T*sphereMeasure univ := by + intro s hs + apply (F.arrivalInverseSquare_lintegral zX hs).trans + exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left + (ENNReal.ofReal_le_ofReal (sub_le_self _ hs.1.le)) zero_le) zero_le + apply lt_of_le_of_lt (lintegral_mono_ae (ae_restrict_of_forall_mem measurableSet_Ioo hb)) + change (∫⁻ _s in Ioo (0:ℝ) T,(2:ENNReal)*ENNReal.ofReal T*sphereMeasure univ)<⊤ + simp only [lintegral_const,Measure.restrict_apply_univ,Real.volume_Ioo,sub_zero] + exact ENNReal.mul_lt_top (ENNReal.mul_lt_top + (ENNReal.mul_lt_top (by norm_num) ENNReal.ofReal_lt_top) (measure_lt_top _ _)) ENNReal.ofReal_lt_top + refine ⟨hm.aestronglyMeasurable,(hasFiniteIntegral_iff_norm _).mpr ?_⟩ + simpa only [Real.norm_eq_abs,abs_of_nonneg (arrivalInverseSquare_nonneg F.flow zX T _)] using hfin + +def phaseArrivalMajorant (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (K : Set Vec) (p : ℝ×Phase) : ℝ := + arrivalInverseSquare α zX T (p.1,p.2.1)*K.indicator (fun _=>1) p.2.2 + +lemma PhaseFlowOn.measurable_phaseArrivalMajorant {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {K : Set Vec} (hK : MeasurableSet K) : + Measurable (phaseArrivalMajorant F.flow zX T K) := + ((F.measurable_arrivalInverseSquare zX).comp + (measurable_fst.prodMk (measurable_fst.comp measurable_snd))).mul + ((measurable_const.indicator hK).comp (measurable_snd.comp measurable_snd)) + +lemma phaseArrivalMajorant_nonneg (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (K : Set Vec) (p : ℝ×Phase) : 0≤phaseArrivalMajorant α zX T K p := by + exact mul_nonneg (arrivalInverseSquare_nonneg α zX T _) + (indicator_nonneg (fun _ _=>by norm_num) _) + +lemma PhaseFlowOn.phaseArrivalMajorant_integrable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {K : Set Vec} (hK : IsCompact K) : + Integrable (phaseArrivalMajorant F.flow zX T K) := by + have hk : Integrable (K.indicator (fun _ : Vec=>(1:ℝ))) := + (integrableOn_const hK.measure_lt_top.ne : IntegrableOn (fun _ : Vec=>(1:ℝ)) K).integrable_indicator hK.measurableSet + have hh := (F.arrivalInverseSquare_integrable zX).mul_prod hk + have hm := (volume_preserving_prodAssoc (α₁:=ℝ) (β₁:=Vec) (γ₁:=Vec)).symm + exact hm.integrable_comp_of_integrable hh + +lemma PhaseFlowOn.source_cone_integrable_of_bound {E B : Field} {T C : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {K : Set Vec} (hK : IsCompact K) + {g : ℝ×Phase→Vec} (hg : AEStronglyMeasurable g) + (hb : ∀ᵐ p,‖g p‖≤C*phaseArrivalMajorant F.flow zX T K p) : Integrable g := + ((F.phaseArrivalMajorant_integrable zX hK).const_mul C).mono' hg hb + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/TransportDifferentiation.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/TransportDifferentiation.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0969955c765d628988fc8d1ed7f516f42f0b12d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/TransportDifferentiation.lean @@ -0,0 +1,1084 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.LogSingularBound +import OAI.Analysis.VlasovMaxwell.Geometry.PhysicalDivision + +namespace OAI + +noncomputable section + +namespace RVM + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +section +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma sphere_mean_zero_lipschitz_bound {a : Sphere → ℝ} {F : Vec → ℝ} {x : Vec} + {r C N : ℝ} (ha : Continuous a) (hF : Continuous F) + (hmean : (∫n : Sphere,a n ∂sphereMeasure)=0) + (hC : 0≤C) (hab : ∀ n, |a n|≤C) (hr : 0≤r) + (_hN : 0≤N) (hLip : ∀ y, |F y-F x|≤N*‖y-x‖) : + |∫ n : Sphere, a n*F (x+r • n.1) ∂sphereMeasure|≤(4*Real.pi)*C*N*r := by + have hc : Continuous (fun n : Sphere => a n*F (x+r • n.1)) := + by fun_prop + have hi := hc.integrable_of_hasCompactSupport (μ:=sphereMeasure) (HasCompactSupport.of_compactSpace _) + have hai := ha.integrable_of_hasCompactSupport (μ:=sphereMeasure) (HasCompactSupport.of_compactSpace _) + have he : (∫ n : Sphere,a n*(F (x+r • n.1)-F x) ∂sphereMeasure)= + ∫ n : Sphere,a n*F (x+r • n.1) ∂sphereMeasure := by + simp_rw [mul_sub] + rw [integral_sub hi (hai.mul_const _),integral_mul_const,hmean,zero_mul,sub_zero] + rw [←he] + have hb : ∀ n : Sphere, ‖a n*(F (x+r • n.1)-F x)‖≤C*N*r := by + intro n + rw [norm_mul,Real.norm_eq_abs,Real.norm_eq_abs] + have hh := hLip (x+r • n.1) + simp only [add_sub_cancel_left,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] at hh + exact (mul_le_mul (hab n) hh (abs_nonneg _) hC).trans_eq (by ring) + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_assoc,mul_comm,mul_left_comm] using hh + +def transportSingularShell (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) (r : ℝ) : ℝ := + r⁻¹ * ∫ v in closedBall (0:Vec) P, ∫ n : Sphere, + divergence (transportSpatialFlux v e i) n.1 * f (t-r,x+r • n.1,v) ∂sphereMeasure + +lemma transport_divergence_sphere_continuous (v e : Vec) (i : Fin 3) : + Continuous (fun n : Sphere => divergence (transportSpatialFlux v e i) n.1) := by + apply (continuousOn_transportSpatialDivergence e i).comp_continuous + (continuous_subtype_val.prodMk continuous_const) + intro n + have hn := sphere_norm n + intro hz + change (n : Vec)=0 at hz + rw [hz,norm_zero] at hn + norm_num at hn + +lemma transportSingularShell_near_far {P t U A N : ℝ} {f : Particle} {x e : Vec} {i : Fin 3} + (_hA : 0≤A) (hN : 0≤N) + (hf : ∀ s∈Icc (0:ℝ) U, ∀ v, Differentiable ℝ (fun y => f (s,y,v))) + (hfA : ∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) + (hfN : ∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) + {C : ℝ} (hC : 0≤C) + (hc : ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + |divergence (transportSpatialFlux v e i) n.1|≤C) + (ht : t∈Icc (0:ℝ) U) {r : ℝ} (hr : 0 hf _ hs v z) + (fun z _ => hfN _ hs z v) convex_univ (mem_univ x) (mem_univ y) + have hfar (v : Vec) (hv : v∈closedBall (0:Vec) P) : + ‖∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure‖≤(4*Real.pi)*C*A := by + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (f:=fun n : Sphere => + divergence (transportSpatialFlux v e i) n.1 * f (t-r,x+r • n.1,v)) (C:=C*A) (ae_of_all _ (fun n : Sphere => by + rw [norm_mul,Real.norm_eq_abs,Real.norm_eq_abs] + exact mul_le_mul (hc v hv n) (hfA _ hs _ v) (abs_nonneg _) hC)) + simpa only [sphere_area,smul_eq_mul,mul_assoc,mul_comm,mul_left_comm] using hh + have hnear' := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (by filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv; exact hnear v hv) + have hfar' := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (by filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv; exact hfar v hv) + simp only [Measure.restrict_apply_univ,measureReal_def,Real.norm_eq_abs] at hnear' hfar' + unfold transportSingularShell + rw [abs_mul,abs_of_pos (inv_pos.mpr hr)] + constructor + · exact (mul_le_mul_of_nonneg_left hnear' (inv_nonneg.mpr hr.le)).trans_eq (by simp only [measureReal_def]; field_simp) + · exact (mul_le_mul_of_nonneg_left hfar' (inv_nonneg.mpr hr.le)).trans_eq (by simp only [measureReal_def]; ring) + +attribute [local instance] Measure.Subtype.measureSpace + +lemma transportSingularShell_continuousOn {P t U : ℝ} {f : Particle} (x e : Vec) (i : Fin 3) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) (ht : t∈Icc (0:ℝ) U) : + ContinuousOn (transportSingularShell P f t x e i) (Ioc (0:ℝ) t) := by + let K := closedBall (0:Vec) P + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure K) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let α := K × Sphere + let μ : Measure α := volume.prod sphereMeasure + let G : ℝ × α → ℝ := fun q => divergence (transportSpatialFlux q.2.1.1 e i) q.2.2.1 * + f (t-q.1,x+q.1 • q.2.2.1,q.2.1.1) + have hc : Continuous (fun a : α => divergence (transportSpatialFlux a.1.1 e i) a.2.1) := by + apply (continuousOn_transportSpatialDivergence e i).comp_continuous + ((continuous_subtype_val.comp continuous_snd).prodMk (continuous_subtype_val.comp continuous_fst)) + intro a hz + change (a.2 : Vec)=0 at hz + have hh := sphere_norm a.2 + rw [hz,norm_zero] at hh + norm_num at hh + have hn : Continuous (fun q : ℝ × α => (q.2.2:Vec)) := continuous_subtype_val.comp continuous_snd.snd + have hv : Continuous (fun q : ℝ × α => (q.2.1:Vec)) := continuous_subtype_val.comp continuous_snd.fst + have hmap : Continuous (fun q : ℝ × α => (t-q.1,x+q.1 • (q.2.2:Vec),(q.2.1:Vec))) := + (continuous_const.sub continuous_fst).prodMk ((continuous_const.add (continuous_fst.smul hn)).prodMk hv) + have hG : ContinuousOn G (Ioc (0:ℝ) t ×ˢ univ) := by + exact (hc.comp continuous_snd).continuousOn.mul (hf.comp hmap.continuousOn (by + intro q hq + exact ⟨by linarith [hq.1.2],by linarith [ht.2,hq.1.1]⟩)) + have hi (r : ℝ) (hr : r∈Ioc (0:ℝ) t) : Integrable (fun a : α => G (r,a)) μ := + (hG.comp_continuous (continuous_const.prodMk continuous_id) (fun a => ⟨hr,mem_univ a⟩)).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hg : ContinuousOn (fun r => ∫ a, G (r,a) ∂μ) (Ioc (0:ℝ) t) := by + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hG + intro r a _ ha + exact (ha (mem_univ a)).elim + have he (r : ℝ) (hr : r∈Ioc (0:ℝ) t) : + (∫ a, G (r,a) ∂μ)=∫ v in K,∫ n : Sphere, + divergence (transportSpatialFlux v e i) n.1*f (t-r,x+r • n.1,v) ∂sphereMeasure := by + rw [show μ=(volume : Measure K).prod sphereMeasure from rfl,integral_prod _ (hi r hr)] + exact integral_subtype measurableSet_closedBall + (fun v : Vec => ∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure) + apply ContinuousOn.congr (f:=fun r : ℝ => r⁻¹*(∫ a, G (r,a) ∂μ)) + · exact (continuousOn_id.inv₀ (fun r hr => hr.1.ne')).mul hg + · intro r hr + change r⁻¹*(∫ v in K,∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure) = r⁻¹*(∫ a, G (r,a) ∂μ) + rw [he r hr] + +lemma physical_transport_log_bound (P H A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (U t N : ℝ) (f : Particle), + 0 f (s,y,v))) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) → + ∀ x, IntegrableOn (transportSingularShell P f t x e i) (Ioc (0:ℝ) t) ∧ + |∫ r in Ioc (0:ℝ) t,transportSingularShell P f t x e i r|≤ + 1+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨K,hK,hkb⟩ := transportSpatialDivergence_uniform_bound P e i + let C := volume.real (closedBall (0:Vec) P)*(4*Real.pi)*K + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,C*A,hC,mul_nonneg hC hA,?_⟩ + intro U t N f ht htU hUH hN hfc hfd hfA hfN x + have htt : t∈Icc (0:ℝ) U := ⟨ht.le,htU⟩ + have hh := singular_radial_log_bound ht (htU.trans hUH) (mul_nonneg hC hA) (mul_nonneg hC hN) + (transportSingularShell_continuousOn x e i hfc htt) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).1) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).2) + exact hh + +end + +section +attribute [local instance] Measure.Subtype.measureSpace +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma singular_radial_log_bound_norm {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : ℝ → W} {t H A N : ℝ} (ht : 0 by simpa only [Real.norm_of_nonneg (norm_nonneg _)] using hn r hr) + (fun r hr => by simpa only [Real.norm_of_nonneg (norm_nonneg _)] using ha r hr) + exact ⟨(singular_radial_log_bound ht htH hA hN hg hn ha).1, + (le_abs_self _).trans hh.2⟩ + +lemma integral_annulus_polar_radial {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : Vec → W} {ε R : ℝ} (hε : 0<ε) + (hg : ContinuousOn g {z | ε≤‖z‖ ∧ ‖z‖≤R}) : + (∫z in ball (0:Vec) R \ ball (0:Vec) ε,g z)= + ∫r in Ico ε R, ∫n : Sphere,r^2 • g (r • n.1) ∂sphereMeasure := by + have hclosed : {z : Vec | ε≤‖z‖ ∧ ‖z‖≤R}=closedBall (0:Vec) R \ ball (0:Vec) ε := by + ext z + simp only [mem_ofPred_eq,Set.mem_sdiff,mem_closedBall,mem_ball,dist_zero_right,not_lt] + exact and_comm + have hgi : IntegrableOn g (ball (0:Vec) R \ ball (0:Vec) ε) := by + have hcomp : IsCompact {z : Vec | ε≤‖z‖ ∧ ‖z‖≤R} := by + rw [hclosed] + exact (isCompact_closedBall _ _).diff isOpen_ball + exact (hg.integrableOn_compact hcomp).mono_set (by + intro z hz + simp only [Set.mem_sdiff,mem_ball,dist_zero_right,not_lt] at hz + exact ⟨hz.2,hz.1.le⟩) + have hfun : ContinuousOn (fun p : ℝ × Sphere => p.1^2 • g (p.1 • p.2.1)) (Icc ε R ×ˢ univ) := by + apply (continuous_fst.pow 2).continuousOn.smul + apply hg.comp (continuous_fst.smul (continuous_subtype_val.comp continuous_snd)).continuousOn + intro p hp + have hr : 0≤p.1 := hε.le.trans hp.1.1 + change ε≤‖p.1 • p.2.1‖ ∧ ‖p.1 • p.2.1‖≤R + simpa only [mem_Icc,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] using hp.1 + have hi : Integrable (fun p : ℝ × Sphere => p.1^2 • g (p.1 • p.2.1)) + ((volume.restrict (Ico ε R)).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [Measure.restrict_prod_eq_prod_univ] + exact (hfun.integrableOn_compact (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ico_subset_Icc_self) + rw [integral_annulus_polar hε hgi] + exact (integral_integral_swap hi).symm + +def transportSingularBulk (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) (z : Vec) : ℝ := + ∫ v in closedBall (0:Vec) P, divergence (transportSpatialFlux v e i) z * f (t-coneRadius 0 z,x+z,v) + +lemma transportSingularBulk_continuousOn {P t U ε R : ℝ} {f : Particle} + (x e : Vec) (i : Fin 3) (hε : 0<ε) (hRt : R≤t) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + ContinuousOn (transportSingularBulk P f t x e i) {z | ε≤‖z‖ ∧ ‖z‖≤R} := by + let K := closedBall (0:Vec) P + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure K) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let G : Vec × K → ℝ := fun p => divergence (transportSpatialFlux p.2.1 e i) p.1 * + f (t-coneRadius 0 p.1,x+p.1,p.2.1) + have hdiv : ContinuousOn (fun p : Vec × K => divergence (transportSpatialFlux p.2.1 e i) p.1) + ({z | ε≤‖z‖ ∧ ‖z‖≤R} ×ˢ univ) := by + apply (continuousOn_transportSpatialDivergence e i).comp + (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)).continuousOn + intro p hp + change p.1≠0 + exact norm_pos_iff.mp (hε.trans_le hp.1.1) + have hm : Continuous (fun p : Vec × K => (t-coneRadius 0 p.1,x+p.1,p.2.1)) := by + unfold coneRadius + fun_prop + have hG : ContinuousOn G ({z | ε≤‖z‖ ∧ ‖z‖≤R} ×ˢ univ) := by + apply hdiv.mul (hf.comp hm.continuousOn ?_) + intro p hp + change t-coneRadius 0 p.1∈Icc (0:ℝ) U + simp only [coneRadius,zero_sub,norm_neg] + exact ⟨by linarith [hp.1.2],by linarith [norm_nonneg p.1]⟩ + have hh : ContinuousOn (fun z => ∫ v : K, G (z,v)) {z | ε≤‖z‖ ∧ ‖z‖≤R} := by + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hG + intro z v _ hv + exact (hv (mem_univ v)).elim + apply hh.congr + intro z hz + exact (integral_subtype measurableSet_closedBall + (fun v : Vec => divergence (transportSpatialFlux v e i) z * f (t-coneRadius 0 z,x+z,v))).symm + +lemma transportSingularBulk_shell {P t U r : ℝ} {f : Particle} (x e : Vec) (i : Fin 3) + (hr : 0 transportSpatialFlux_homogeneous v e i ha z) + (fun z hz => (transportSpatialFlux_contDiffAt v e i hz).differentiableAt (by simp)) hr hn + have hrad : coneRadius 0 (r • n.1)=r := by + simp only [coneRadius,zero_sub,norm_neg,norm_smul,Real.norm_of_nonneg hr.le,sphere_norm,mul_one] + simp only [transportSingularBulk,hd,hrad,smul_eq_mul,mul_assoc,integral_const_mul] + rw [←mul_assoc] + congr 1 + field_simp + simp_rw [he] + rw [integral_const_mul] + congr 1 + have hfun : ContinuousOn (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1 * + f (t-r,x+r • p.1.1,p.2)) (univ ×ˢ K) := by + have hc : ContinuousOn (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1) + (univ ×ˢ K) := by + apply (continuousOn_transportSpatialDivergence e i).comp + ((continuous_subtype_val.comp continuous_fst).prodMk continuous_snd).continuousOn + intro p hp + change (p.1:Vec)≠0 + intro hh + have := sphere_norm p.1 + rw [hh,norm_zero] at this + norm_num at this + apply hc.mul + apply hf.comp (by fun_prop : Continuous (fun p : Sphere × Vec => (t-r,x+r • p.1.1,p.2))).continuousOn + intro p hp + exact ⟨by linarith,by linarith⟩ + have hi : Integrable (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1 * + f (t-r,x+r • p.1.1,p.2)) (sphereMeasure.prod (volume.restrict K)) := by + rw [←Measure.restrict_univ (μ:=sphereMeasure),Measure.prod_restrict] + exact hfun.integrableOn_compact (isCompact_univ.prod (isCompact_closedBall _ _)) + exact integral_integral_swap hi + +lemma transportSingularBulk_annulus {P t U ε R : ℝ} {f : Particle} + (x e : Vec) (i : Fin 3) (hε : 0<ε) (hRt : R≤t) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P f t x e i z)= + ∫ r in Ico ε R,transportSingularShell P f t x e i r := by + rw [integral_annulus_polar_radial hε (transportSingularBulk_continuousOn x e i hε hRt htU hf)] + apply setIntegral_congr_fun measurableSet_Ico + intro r hr + exact transportSingularBulk_shell x e i (hε.trans_le hr.1) (hr.2.le.trans hRt) htU hf + +lemma physical_transport_annulus_log_bound (P H A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (U t N ε R : ℝ) (f : Particle), + 0 f (s,y,v))) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) → + ∀ x, |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P f t x e i z|≤ + 1+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨K,hK,hkb⟩ := transportSpatialDivergence_uniform_bound P e i + let C := volume.real (closedBall (0:Vec) P)*(4*Real.pi)*K + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,C*A,hC,mul_nonneg hC hA,?_⟩ + intro U t N ε R f ht htU hUH hN hε hRt hfc hfd hfA hfN x + have htt : t∈Icc (0:ℝ) U := ⟨ht.le,htU⟩ + have hh := singular_radial_log_bound_norm ht (htU.trans hUH) (mul_nonneg hC hA) (mul_nonneg hC hN) + (transportSingularShell_continuousOn x e i hfc htt) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).1) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).2) + rw [transportSingularBulk_annulus x e i hε hRt htU hfc] + rw [←Real.norm_eq_abs] + apply (norm_integral_le_integral_norm _).trans + apply le_trans _ hh.2 + exact integral_mono_measure (Measure.restrict_mono_set volume (by + intro r hr + exact ⟨hε.trans_le hr.1,hr.2.le.trans hRt⟩)) + (Filter.Eventually.of_forall (fun r => norm_nonneg _)) hh.1.norm + +end + +section +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma transportSpatialFlux_uniform_bound (P : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + ‖transportSpatialFlux v e i n.1‖≤C := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => transportSpatialFlux p.2 e i p.1) K := by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + have hz : p.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact (transportSpatialFlux_joint_contDiffAt e i hz).continuousAt.continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro v hv n + exact (hC (n.1,v) ⟨n.2,hv⟩).trans (le_max_left _ _) + +lemma transport_sphere_rescale (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) + {r : ℝ} (hr : 0 by + dsimp only + rw [transportSpatialFlux_homogeneous v e i hr] + simp only [smul_smul,mul_comm]) + rw [he,dot_smul_right,←mul_assoc,mul_inv_cancel₀ (pow_ne_zero 2 hr.ne'),one_mul] + +lemma transport_sphere_boundary_bound (P A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (f : Particle) (t U r : ℝ) (x : Vec), + 0 f (t-r,x+r • n.1,v) • transportSpatialFlux v e i n.1) (C:=A*K) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf _ hs _ v) (hkb v hv n) (norm_nonneg _) hA) + have hd := abs_real_inner_le_norm n.1 + (∫ v in closedBall (0:Vec) P,f (t-r,x+r • n.1,v) • transportSpatialFlux v e i n.1) + rw [sphere_norm,one_mul] at hd + rw [dot_eq_inner,Real.norm_eq_abs] + exact hd.trans (by simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,C,mul_assoc,mul_comm,mul_left_comm] using hh) + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_comm] using hh + +end + +def transportVelocityProfile (e : Vec) (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : Vec := + (transportAngularCore p.1.1 (velocity p.2) i * + (dot p.1.1 e/(1-dot p.1.1 (velocity p.2)))) • + (p.1.2.1+cross (velocity p.2) p.1.2.2) + +lemma transportVelocityProfile_contDiffAt (e : Vec) (i : Fin 3) + {p : (Vec × Vec × Vec) × Vec} (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (transportVelocityProfile e i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have ha := contDiffAt_transportAngularCore hn hu hd + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p ha + have hm := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + exact (hi.mul (hm.div (contDiffAt_const.sub hdu) hd)).smul hforce + +lemma divergence_parameter_slice {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {F : U × Vec → Vec} {a : U} {v : Vec} (hF : DifferentiableAt ℝ F (a,v)) : + divergence (fun w => F (a,w)) v=∑ j : Fin 3,(fderiv ℝ F (a,v) (0,basis j)) j := by + have hP := (hasFDerivAt_const a v).prodMk (hasFDerivAt_id (𝕜:=ℝ) v) + have hh := hF.hasFDerivAt.comp v hP + change HasFDerivAt (fun w : Vec => F (a,w)) _ v at hh + unfold divergence spatialPartial + congr 1 + funext j + rw [fderiv_vec_component_at hh.differentiableAt j,hh.fderiv] + rfl + +lemma continuousOn_transportVelocityDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => transportVelocityProfile e i (p.1,w)) p.2) + {p | 1-dot p.1.1 (velocity p.2)≠0} := by + apply ContinuousOn.congr (f:=fun p : (Vec × Vec × Vec) × Vec => + ∑ j : Fin 3,(fderiv ℝ (transportVelocityProfile e i) p (0,basis j)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((transportVelocityProfile_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact divergence_parameter_slice ((transportVelocityProfile_contDiffAt e i hp).differentiableAt (by simp)) + +lemma transportVelocityDivergence_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (E B v : Vec), ‖E‖≤M → ‖B‖≤M → ‖v‖≤P → + |divergence (fun w => transportVelocityProfile e i ((n.1,E,B),w)) v|≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => transportVelocityProfile e i (p.1,w)) p.2) K := + (continuousOn_transportVelocityDivergence e i).mono (by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact (cone_denom_pos p.2 p.1.1 hn).ne') + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n E B v hE hB hv + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +lemma divergence_real_const_smul {F : Vec → Vec} {v : Vec} (hF : DifferentiableAt ℝ F v) (a : ℝ) : + divergence (fun w => a • F w) v=a*divergence F v := by + rw [divergence_smul (differentiableAt_const a) hF] + have hg : gradient (fun _ : Vec => a) v=0 := by + ext j + simp + rw [hg] + simp [dot] + +lemma transport_velocity_divergence_rescale (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {z : Vec} (hz : z≠0) (v : Vec) : + divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v = + ((coneRadius 0 z)^2)⁻¹* + divergence (fun w => transportVelocityProfile e i + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),w)) v := by + let a := (coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)) + have ha : DifferentiableAt ℝ (fun w => transportVelocityProfile e i (a,w)) v := + ((transportVelocityProfile_contDiffAt e i (p:=(a,v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).comp v + ((differentiableAt_const a).prodMk differentiableAt_id) + have he : (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) = + fun w => ((coneRadius 0 z)^2)⁻¹ • transportVelocityProfile e i (a,w) := by + funext w + simp only [transportConeCoefficient,coneSpatialCoefficient,coneLorentz,transportVelocityProfile,a,smul_smul,mul_assoc] + rw [he,divergence_real_const_smul ha] + +lemma physical_transport_velocity_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v : Vec), z≠0 → ‖v‖≤P → + ‖s.E (t-coneRadius 0 z,x+z)‖≤M → ‖s.B (t-coneRadius 0 z,x+z)‖≤M → + |divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v|≤C/(coneRadius 0 z)^2 := by + obtain ⟨C,hC,hb⟩ := transportVelocityDivergence_uniform_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t x z v hz hv hE hB + rw [transport_velocity_divergence_rescale s t x e i hz v,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + exact (mul_le_mul_of_nonneg_left + (hb ⟨coneDirection 0 z,hn⟩ _ _ v hE hB hv) (inv_nonneg.mpr (sq_nonneg _))).trans_eq (by ring) + +lemma norm_integral_annulus_inverse_sq_le {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] {F : Vec → W} {ε R C : ℝ} (hε : 0<ε) (hεR : ε≤R) + (hC : 0≤C) (hF : ∀ z∈ball (0:Vec) R \ ball (0:Vec) ε, ‖F z‖≤C/‖z‖^2) : + ‖∫ z in ball (0:Vec) R \ ball (0:Vec) ε,F z‖≤4*Real.pi*C*R := by + have hR : 0≤R := hε.le.trans hεR + by_cases hi : IntegrableOn F (ball (0:Vec) R \ ball (0:Vec) ε) + · rw [integral_annulus_polar hε hi] + have hn (n : Sphere) : ‖∫ r in Ico ε R,r^2 • F (r • n.1)‖≤C*R := by + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (Ico ε R)) + (f:=fun r => r^2 • F (r • n.1)) (C:=C) (by + filter_upwards [ae_restrict_mem measurableSet_Ico] with r hr + have hr0 : 0 transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v + +lemma transport_velocity_annulus_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t ε R : ℝ) (x : Vec), + 0<ε → ε≤R → R≤t → t≤U → U≤H → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z|≤C := by + obtain ⟨K,hK,hkb⟩ := physical_transport_velocity_bound P M e i + let D := volume.real (closedBall (0:Vec) P)*A*K + have hD : 0≤D := by dsimp [D]; positivity + refine ⟨4*Real.pi*D*H,by positivity,?_⟩ + intro s U t ε R x hε hεR hRt htU hUH hf hEB + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hb (z : Vec) (hz : z∈ball (0:Vec) R \ ball (0:Vec) ε) : + ‖transportVelocityBulk P s t x e i z‖≤D/‖z‖^2 := by + have hzr : ‖z‖ s.f (t-coneRadius 0 z,x+z,v)* + divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) + (C:=A*(K/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hh := hkb s t x z v hzn hvP (hEB _ hu _).1 (hEB _ hu _).2 + rw [hrad] at hh + rw [Real.norm_eq_abs,abs_mul] + exact mul_le_mul (hf _ hu _ v) hh (abs_nonneg _) hA) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,D]; ring) + rw [←Real.norm_eq_abs] + exact (norm_integral_annulus_inverse_sq_le hε hεR hD hb).trans + (mul_le_mul_of_nonneg_left (hRt.trans (htU.trans hUH)) (by positivity)) + +lemma transport_velocity_divergence_continuousOn {s : Solution} {t : ℝ} (x e : Vec) (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) : + ContinuousOn (fun p : Phase => divergence (fun w => transportConeCoefficient i (p.1,w) • + (coneSpatialCoefficient 0 p.1 w e • coneLorentz s t x (p.1,w))) p.2) + (retardedSpaceDomain t 0 ×ˢ univ) := by + have hk : ContDiffOn ℝ 1 (transportConeCoefficient i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (transportConeCoefficient_contDiffAt i hp.1.1.symm).contDiffWithinAt + have hco : ContDiffOn ℝ 1 (fun z : Phase => coneSpatialCoefficient 0 z.1 z.2 e) + (retardedSpaceDomain t 0 ×ˢ univ) := fun p hp => + (contDiffAt_coneSpatialCoefficient_phase hp.1.1).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + exact (continuousOn_phase_divergences (isOpen_retardedSpaceDomain t 0) (hk.smul (hco.smul hK))).2 + +lemma shifted_particle_continuousOn {f : Particle} {t U : ℝ} (x : Vec) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + ContinuousOn (fun p : Phase => f (t-coneRadius 0 p.1,x+p.1,p.2)) + (retardedSpaceDomain t 0 ×ˢ univ) := by + apply hf.comp (by unfold coneRadius; fun_prop : Continuous + (fun p : Phase => (t-coneRadius 0 p.1,x+p.1,p.2))).continuousOn + intro p hp + exact ⟨hp.1.2.le,by dsimp [coneRadius]; linarith [norm_nonneg ((0:Vec)-p.1)]⟩ + +lemma transport_bulk_split {s : Solution} {t U P ε R : ℝ} (x e : Vec) (i : Fin 3) + (htU : t≤U) (hε : 0<ε) (hRt : R transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) = + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P s.f t x e i z)+ + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z) := by + let A := ball (0:Vec) R \ ball (0:Vec) ε + let C := closedBall (0:Vec) R \ ball (0:Vec) ε + let U₀ := retardedSpaceDomain t 0 + let F : Phase → ℝ := fun p => s.f (t-coneRadius 0 p.1,x+p.1,p.2) + let D : Phase → ℝ := fun p => divergence (transportSpatialFlux p.2 e i) p.1 + let V : Phase → ℝ := fun p => divergence (fun w => transportConeCoefficient i (p.1,w) • + (coneSpatialCoefficient 0 p.1 w e • coneLorentz s t x (p.1,w))) p.2 + have hfC : ContinuousOn F (U₀ ×ˢ univ) := shifted_particle_continuousOn x htU hf + have hDC : ContinuousOn D (U₀ ×ˢ univ) := (continuousOn_transportSpatialDivergence e i).mono + (by intro p hp; exact hp.1.1.symm) + have hVC : ContinuousOn V (U₀ ×ˢ univ) := transport_velocity_divergence_continuousOn x e i hE hB + have hzero (z : Vec) (hz : z∈U₀) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + apply hP _ ⟨hz.2.le,?_⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + dsimp [coneRadius] + linarith [norm_nonneg ((0:Vec)-z)] + have hAU : A⊆C := fun z hz => ⟨ball_subset_closedBall hz.1,hz.2⟩ + have hCU : C⊆U₀ := by + intro z hz + have hrz : ‖z‖≤R ∧ ε≤‖z‖ := by simpa only [C,Set.mem_sdiff,mem_closedBall,mem_ball,dist_zero_right,not_lt] using hz + exact ⟨(norm_pos_iff.mp (hε.trans_le hrz.2)).symm,by simpa [coneRadius] using sub_pos.mpr (hrz.1.trans_lt hRt)⟩ + have hcompact : IsCompact C := (isCompact_closedBall _ _).diff isOpen_ball + have hdI : IntegrableOn (fun z => ∫ v, F (z,v)*D (z,v)) A := + ((continuousOn_integral_uniform_support (isCompact_closedBall (0:Vec) P) (hfC.mul hDC) + (by intro z hz v hv; dsimp only [Pi.mul_apply]; rw [hzero z hz v hv,zero_mul])).mono hCU).integrableOn_compact hcompact |>.mono_set hAU + have hvI : IntegrableOn (fun z => ∫ v, F (z,v)*V (z,v)) A := + ((continuousOn_integral_uniform_support (isCompact_closedBall (0:Vec) P) (hfC.mul hVC) + (by intro z hz v hv; dsimp only [Pi.mul_apply]; rw [hzero z hz v hv,zero_mul])).mono hCU).integrableOn_compact hcompact |>.mono_set hAU + have hdi (z : Vec) (hz : z∈U₀) : Integrable (fun v => F (z,v)*D (z,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hfC.mul hDC).comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hz,mem_univ _⟩) + · exact compactSupport_of_zero_off (isCompact_closedBall (0:Vec) P) (fun v hv => by rw [hzero z hz v hv,zero_mul]) + have hvi (z : Vec) (hz : z∈U₀) : Integrable (fun v => F (z,v)*V (z,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hfC.mul hVC).comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hz,mem_univ _⟩) + · exact compactSupport_of_zero_off (isCompact_closedBall (0:Vec) P) (fun v hv => by rw [hzero z hz v hv,zero_mul]) + calc + _ = ∫ z in A, (∫ v,F (z,v)*D (z,v))+(∫ v,F (z,v)*V (z,v)) := by + apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + simp only [mul_add] + exact integral_add (hdi z (hCU (hAU hz))) (hvi z (hCU (hAU hz))) + _ = (∫ z in A,∫ v,F (z,v)*D (z,v))+(∫ z in A,∫ v,F (z,v)*V (z,v)) := integral_add hdI hvI + _ = _ := by + congr 1 + · apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + rw [transportSingularBulk] + simpa only [F,D,mul_comm] using + (setIntegral_eq_integral_of_forall_compl_eq_zero (μ:=volume) (f:=fun v => F (z,v)*D (z,v)) (fun v hv => by + change F (z,v)*D (z,v)=0 + rw [hzero z (hCU (hAU hz)) v hv,zero_mul])).symm + · apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + exact (setIntegral_eq_integral_of_forall_compl_eq_zero (fun v hv => by + change F (z,v)*V (z,v)=0 + rw [hzero z (hCU (hAU hz)) v hv,zero_mul])).symm + +lemma transport_sphere_support {s : Solution} {t U P r : ℝ} (x e : Vec) (i : Fin 3) + (hr : 0≤r) (hrt : r≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ n : Sphere,r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • + transportSpatialFlux v e i (r • n.1)) ∂sphereMeasure) = + (∫ n : Sphere,r^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • + transportSpatialFlux v e i (r • n.1)) ∂sphereMeasure) := by + apply integral_congr_ae + exact ae_of_all _ (fun n => by + dsimp only + congr 2 + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ ⟨by linarith,by linarith⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_smul]) + +lemma abs_sub_sub_add_le (a b c d : ℝ) : + |a-b-(c+d)|≤|a|+|b|+|c|+|d| := by + linarith [abs_sub a b,abs_sub (a-b) (c+d),abs_add_le c d] + +lemma electric_transport_annulus_gradient_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N ε R : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε, ∫ v, + transportConeCoefficient i (z,v)*fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨Cb,hCb,hcb⟩ := transport_sphere_boundary_bound P A e i hA + obtain ⟨Cv,hCv,hcv⟩ := transport_velocity_annulus_bound P A M H e i hA hH + obtain ⟨C,D,hC,hD,hcd⟩ := physical_transport_annulus_log_bound P H A e i hA + refine ⟨2*Cb+Cv+1,C,D,by positivity,hC,hD,?_⟩ + intro s U t N ε R x ht htU hUH hN hε hεR hRt hf hE hB hc heq hfA hP hEB hfN + have hfc : ContinuousOn s.f {p | p.1∈Icc (0:ℝ) U} := hf.continuousOn.mono (fun p hp => hp.1) + have hfd (u : ℝ) (hu : u∈Icc (0:ℝ) U) (v : Vec) : Differentiable ℝ (fun y => s.f (u,y,v)) := by + have hh : ContDiff ℝ 1 (fun y => s.f (u,y,v)) := by + apply contDiffOn_univ.mp + exact hf.comp ((contDiff_const.prodMk (contDiff_id.prodMk contDiff_const)).contDiffOn) + (fun _ _ => hu.1) + exact hh.differentiable (by simp) + have hbR := hcb s.f t U R x (hε.trans_le hεR) hRt.le htU hfA + have hbε := hcb s.f t U ε x hε (hεR.trans hRt.le) htU hfA + have hbv := hcv s U t ε R x hε hεR hRt.le htU hUH hfA hEB + have hbs := hcd U t N ε R s.f ht htU hUH hN hε hRt.le hfc hfd hfA hfN x + rw [electric_transport_division_annulus hf hE hB hc heq htU hε hεR hRt x e i, + transport_sphere_support x e i (hε.le.trans hεR) hRt.le htU hP, + transport_sphere_support x e i hε.le (hεR.trans hRt.le) htU hP, + transport_bulk_split x e i htU hε hRt hfc hE hB hP] + calc + _ ≤ |∫ n : Sphere,R^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-R,x+R • n.1,v) • + transportSpatialFlux v e i (R • n.1)) ∂sphereMeasure|+ + |∫ n : Sphere,ε^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-ε,x+ε • n.1,v) • + transportSpatialFlux v e i (ε • n.1)) ∂sphereMeasure|+ + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P s.f t x e i z|+ + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z| := by + exact abs_sub_sub_add_le _ _ _ _ + _ ≤ _ := by linarith + +lemma integral_symmetric_annulus_tendsto {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {t : ℝ} (ht : 0 ∫ z in ball (0:Vec) (t-a) \ ball (0:Vec) a,F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t,F z)) := by + have hh : Tendsto (fun a : ℝ => ∫ z in ball (0:Vec) t, + (ball (0:Vec) (t-a) \ ball (0:Vec) a).indicator F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t,F z)) := by + apply tendsto_integral_filter_of_dominated_convergence (fun z => ‖F z‖) + · exact Eventually.of_forall (fun a => hF.aestronglyMeasurable.indicator (measurableSet_ball.diff measurableSet_ball)) + · exact Eventually.of_forall (fun a => ae_of_all _ (fun z => norm_indicator_le_norm_self _ _)) + · exact hF.norm + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hn : ‖z‖ f (u,z,v)) y e=fderiv ℝ f (u,y,v) (0,e,0) := by + have hm : HasFDerivAt (fun z : Vec => (u,z,v)) + ((0 : Vec →L[ℝ] ℝ).prod ((ContinuousLinearMap.id ℝ Vec).prod 0)) y := + (hasFDerivAt_const u y).prodMk ((hasFDerivAt_id (𝕜:=ℝ) y).prodMk (hasFDerivAt_const v y)) + have hh := hf.hasFDerivAt.comp (f:=fun z : Vec => (u,z,v)) y hm + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma transportConeCoefficient_uniform_bound (P : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ z v : Vec, z≠0 → ‖v‖≤P → + |transportConeCoefficient i (z,v)|≤C/‖z‖^2 := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => transportAngularCore p.1 (velocity p.2) i) K := by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + have hh := contDiffAt_transportAngularCore (k:=1) (z:=p) contDiffAt_fst + (contDiff_velocity.contDiffAt.comp p contDiffAt_snd) (cone_denom_pos p.2 p.1 hn).ne' + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.continuousAt.comp hh.continuousAt).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro z v hz hv + have hb := hC (coneDirection 0 z,v) ⟨by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + unfold transportConeCoefficient + rw [abs_mul,abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + apply (mul_le_mul_of_nonneg_left (hb.trans (le_max_left _ _)) (inv_nonneg.mpr (sq_nonneg _))).trans_eq + simp only [coneRadius,zero_sub,norm_neg] + ring + +lemma transport_derivative_integrable {s : Solution} {U t P N : ℝ} (x e : Vec) (i : Fin 3) + (_ht : 0 s.f (u,z,v)) y‖≤N) : + IntegrableOn (fun z => ∫ v,transportConeCoefficient i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => transportConeCoefficient i p* + fderiv ℝ s.f (t-coneRadius 0 p.1,x+p.1,p.2) (0,e,0) + let A := ball (0:Vec) t \ ({0} : Set Vec) + have hzprop {z : Vec} (hz : z∈A) : z≠0 ∧ 0 (t-coneRadius 0 p.1,x+p.1,p.2)) p := + ((contDiffAt_const.sub hr).prodMk ((contDiffAt_const.add contDiffAt_fst).prodMk contDiffAt_snd)).continuousAt + have hdf : ContinuousAt (fun q : Phase => fderiv ℝ s.f (t-coneRadius 0 q.1,x+q.1,q.2)) p := + ((particle_contDiffAt_positive hf hh.2.1 (x+p.1) p.2).continuousAt_fderiv (by simp)).comp (f:=fun q : Phase => (t-coneRadius 0 q.1,x+q.1,q.2)) hm + exact ((transportConeCoefficient_contDiffAt i hh.1).continuousAt.mul + (hdf.clm_apply continuousAt_const)).continuousWithinAt + have hzero (z : Vec) (hz : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + have hh := hzprop hz + have hvP : P<‖v‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hv + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨hh.2.1.le,hh.2.2⟩ y v hvP) + dsimp [F] + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e,he] + simp + obtain ⟨C,hC,hcb⟩ := transportConeCoefficient_uniform_bound P i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have hK : IsCompact (closedBall (0:Vec) P) := isCompact_closedBall _ _ + apply integrableOn_ball_of_punctured_bound (α:=2) (C:=D) (by norm_num) + (continuousOn_integral_uniform_support hK hfc hzero) + intro z hz hzt + have hza : z∈A := ⟨by simpa only [mem_ball,dist_zero_right] using hzt,norm_pos_iff.mp hz⟩ + have hh := hzprop hza + have heq : (∫ v,F (z,v))=∫ v in closedBall (0:Vec) P,F (z,v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero (hzero z hza)).symm + change ‖∫ v,F (z,v)‖≤_ + rw [heq,Real.rpow_neg (norm_nonneg z),Real.rpow_two] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact hK.measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => F (z,v)) (C:=(C/‖z‖^2)*(N*‖e‖)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + dsimp [F] + rw [abs_mul,←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e] + apply mul_le_mul (hcb z v hh.1 (by simpa only [mem_closedBall,dist_zero_right] using hv)) + · simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans (mul_le_mul_of_nonneg_right (hfN _ ⟨hh.2.1.le,hh.2.2⟩ _ v) (norm_nonneg e)) + · exact abs_nonneg _ + · positivity) + exact hb.trans_eq (by simp only [D,Measure.real,Measure.restrict_apply_univ]; ring) + +lemma electric_transport_gradient_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨B,C,D,hB,hC,hD,hbound⟩ := electric_transport_annulus_gradient_bound P A M H e i hA hH + refine ⟨B,C,D,hB,hC,hD,?_⟩ + intro s U t N x ht htU hUH hN hf hE hB hc heq hfA hP hEB hfN + apply norm_integral_ball_of_annulus_bound ht (transport_derivative_integrable x e i ht htU hf hN hP hfN) + intro ε R hε hεR hRt + exact hbound s U t N ε R x ht htU hUH hN hε hεR hRt hf hE hB hc heq hfA hP hEB hfN + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +lemma particle_fixed_time_contDiff {s : Solution} {k : ℕ∞ω} {u : ℝ} + (hf : ContDiffOn ℝ k s.f particleHalfSpace) (hu : 0≤u) : + ContDiff ℝ k (fun p : Phase => s.f (u,p)) := by + apply contDiffOn_univ.mp + exact hf.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun _ _ => hu) + +lemma transport_kernel_velocity_contDiff (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiff ℝ 1 (fun v => transportConeCoefficient i (z,v)) := by + apply contDiff_iff_contDiffAt.mpr + intro v + exact (transportConeCoefficient_contDiffAt i hz).comp v (contDiffAt_const.prodMk contDiffAt_id) + +lemma hasDerivAt_transport_particle_line {s : Solution} {u P : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hu : 0 ∫ v,transportConeCoefficient i (z,v)*s.f (u,x+q • e,v)) + (∫ v,transportConeCoefficient i (z,v)*fderiv ℝ s.f (u,x+a • e,v) (0,e,0)) a := by + let F : ℝ × Vec → ℝ := fun p => s.f (u,x+p.1 • e,p.2) + let w : Vec → ℝ := fun v => transportConeCoefficient i (z,v) + have hF : ContDiff ℝ 1 F := (particle_fixed_time_contDiff hf hu.le).comp + ((contDiff_const.add (contDiff_fst.smul contDiff_const)).prodMk contDiff_snd) + have hw : ContDiff ℝ 1 w := transport_kernel_velocity_contDiff i hz + have hzero (a : ℝ) (_ : a∈(univ : Set ℝ)) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (a,v)=0 := + hP _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + have hG : ContDiffOn ℝ 1 (fun p : ℝ × Vec => w p.2*F p) (univ ×ˢ univ) := + ((hw.comp contDiff_snd).mul hF).contDiffOn + have hd := (hasFDerivAt_integral_uniform_support isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG (by intro q hq v hv; rw [hzero q hq v hv,mul_zero])).differentiableAt.hasDerivAt + rw [show deriv (fun x => ∫ v, w v*F (x,v)) a = fderiv ℝ (fun x => ∫ v,w v*F (x,v)) a 1 from rfl,fderiv_weighted_integral_uniform_support_apply isOpen_univ + (isCompact_closedBall (0:Vec) P) (mem_univ a) hF.contDiffOn hw hzero] at hd + apply hd.congr_deriv + apply integral_congr_ae + exact ae_of_all _ (fun v => by + apply congrArg (fun r : ℝ => w v*r) + have hm : HasFDerivAt (fun p : ℝ × Vec => (u,x+p.1 • e,p.2)) + ((0 : (ℝ × Vec) →L[ℝ] ℝ).prod + (((ContinuousLinearMap.smulRight (ContinuousLinearMap.fst ℝ ℝ Vec) e)).prod + (ContinuousLinearMap.snd ℝ ℝ Vec))) (a,v) := by + convert (hasFDerivAt_const u (a,v)).prodMk + (((hasFDerivAt_const x (a,v)).add ((hasFDerivAt_fst (𝕜:=ℝ)).smul_const e)).prodMk + (hasFDerivAt_snd (𝕜:=ℝ))) using 1 + first | rfl | simp + have hh := (particle_differentiableAt_positive hf hu _ v).hasFDerivAt.comp + (f:=fun p : ℝ × Vec => (u,x+p.1 • e,p.2)) (a,v) hm + simpa only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply, + zero_apply,ContinuousLinearMap.smulRight_apply, + ContinuousLinearMap.coe_fst',ContinuousLinearMap.coe_snd',one_smul,F,Function.comp_def] using + congrArg (fun L : (ℝ × Vec) →L[ℝ] ℝ => L (1,0)) hh.fderiv) + +lemma norm_transport_velocity_integral_le {P C A : ℝ} {z : Vec} {i : Fin 3} + {g : Vec → ℝ} (_hA : 0≤A) + (hk : ∀ v, ‖v‖≤P → |transportConeCoefficient i (z,v)|≤C/‖z‖^2) + (hzero : ∀ v, P<‖v‖ → g v=0) (hg : ∀ v, |g v|≤A) : + ‖∫ v,transportConeCoefficient i (z,v)*g v‖≤volume.real (closedBall (0:Vec) P)*C*A/‖z‖^2 := by + have heq : (∫ v,transportConeCoefficient i (z,v)*g v)= + ∫ v in closedBall (0:Vec) P,transportConeCoefficient i (z,v)*g v := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hzero v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),mul_zero] + rw [heq] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ]; exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => transportConeCoefficient i (z,v)*g v) (C:=(C/‖z‖^2)*A) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [Real.norm_eq_abs,abs_mul] + exact mul_le_mul (hk v (by simpa only [mem_closedBall,dist_zero_right] using hv)) (hg v) + (abs_nonneg _) (le_trans (abs_nonneg _) (hk v (by simpa only [mem_closedBall,dist_zero_right] using hv)))) + exact hb.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ]; ring) + +lemma transport_density_integrable {s : Solution} {U t P A : ℝ} (x : Vec) (i : Fin 3) + (htU : t≤U) (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hA : 0≤A) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) : + IntegrableOn (fun z => ∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) + (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => transportConeCoefficient i p*s.f (t-coneRadius 0 p.1,x+p.1,p.2) + let U₀ := retardedSpaceDomain t 0 + have htime {z : Vec} (hz : z∈U₀) : t-coneRadius 0 z∈Icc (0:ℝ) U := + ⟨hz.2.le,(sub_le_self _ (norm_nonneg _)).trans htU⟩ + have hk : ContinuousOn (transportConeCoefficient i) (U₀ ×ˢ univ) := by + intro p hp + exact (transportConeCoefficient_contDiffAt i hp.1.1.symm).continuousAt.continuousWithinAt + have hfc : ContinuousOn F (U₀ ×ˢ univ) := hk.mul + (shifted_particle_continuousOn x htU (hf.continuousOn.mono (fun p hp => hp.1))) + have hzero (z : Vec) (hz : z∈U₀) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + dsimp [F] + rw [hP _ (htime hz) _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),mul_zero] + have hsub : ball (0:Vec) t \ ({0} : Set Vec)⊆U₀ := by + intro z hz + exact ⟨(show z≠0 from hz.2).symm,by simpa only [coneRadius,zero_sub,norm_neg] using + (sub_pos.mpr (show ‖z‖ hcb z v (norm_pos_iff.mp hz) hv) + (hP _ (htime hzu) (x+z)) (hfA _ (htime hzu) (x+z)) + simpa only [Real.rpow_neg (norm_nonneg z),Real.rpow_two,div_eq_mul_inv] using hb + +lemma hasDerivAt_electric_transport_integral {s : Solution} {U t P A N : ℝ} + (x e : Vec) (i : Fin 3) (a : ℝ) + (ht : 0 s.f (u,z,v)) y‖≤N) : + HasDerivAt (fun q : ℝ => ∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) + (∫ z in ball (0:Vec) t, ∫ v,transportConeCoefficient i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,(x+a • e)+z,v) (0,e,0)) a := by + obtain ⟨C,hC,hcb⟩ := transportConeCoefficient_uniform_bound P i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have htime {z : Vec} (hz : z∈ball (0:Vec) t) : + 0 D*‖z‖^(-(2:ℝ))) (by simp) + (Eventually.of_forall (fun q => (transport_density_integrable (x+q • e) i htU hf hA hP hfA).aestronglyMeasurable)) + (transport_density_integrable (x+a • e) i htU hf hA hP hfA) + (transport_derivative_integrable (x+a • e) e i ht htU hf hN hP hfN).aestronglyMeasurable + ?_ ((integrableOn_norm_rpow_neg (R:=t) (show (2:ℝ)<3 by norm_num)).const_mul D) ?_).2 + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + intro q _ + have htz := htime hz + refine (norm_transport_velocity_integral_le (mul_nonneg hN (norm_nonneg e)) + (fun v hv => hcb z v hz0 hv) ?_ ?_).trans_eq ?_ + · intro v hv + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf htz.1 _ _) e] + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨htz.1.le,htz.2⟩ y v hv) + rw [he] + simp + · intro v + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf htz.1 _ _) e] + simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans + (mul_le_mul_of_nonneg_right (hfN _ ⟨htz.1.le,htz.2⟩ _ v) (norm_nonneg e)) + · simp only [D,Real.rpow_neg (norm_nonneg z),Real.rpow_two] + ring + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + intro q _ + have htz := htime hz + simpa only [add_right_comm] using hasDerivAt_transport_particle_line hf htz.1 + (hP _ ⟨htz.1.le,htz.2⟩) (x+z) e z hz0 i q + +lemma electric_transport_deriv_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨B,C,D,hB,hC,hD,hb⟩ := electric_transport_gradient_bound P A M H e i hA hH + refine ⟨B,C,D,hB,hC,hD,?_⟩ + intro s U t N x ht htU hUH hN hf hE hBB hc heq hfA hP hEB hfN + rw [(hasDerivAt_electric_transport_integral x e i 0 ht htU hf hA hN hP hfA hfN).deriv] + simpa only [zero_smul,add_zero] using hb s U t N x ht htU hUH hN hf hE hBB hc heq hfA hP hEB hfN + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Flow/WithinFlow.lean b/lean/OAI/Analysis/VlasovMaxwell/Flow/WithinFlow.lean new file mode 100644 index 0000000000000000000000000000000000000000..719c933004d12f4fd0a74d8ad809b9f8bc8b6513 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Flow/WithinFlow.lean @@ -0,0 +1,1085 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.ExtendedField +import OAI.Analysis.VlasovMaxwell.Maxwell.FiniteFlow + +namespace OAI + +noncomputable section + +namespace RVM + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal +open Set MeasureTheory +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set MeasureTheory Metric Filter ODE +open scoped Topology NNReal ContDiff + +section WithinFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def spaceDerivative (f : ℝ × E → E) (z : ℝ × E) : E →L[ℝ] E := + fderiv ℝ (fun x => f (z.1,x)) z.2 + +lemma hasFDerivAt_time_slice {f : ℝ × E → E} {T : ℝ} + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set E))) {t : ℝ} (ht : t ∈ Icc 0 T) (x : E) : + HasFDerivAt (fun y => f (t,y)) + ((fderivWithin ℝ f (Icc 0 T ×ˢ (univ : Set E)) (t,x)).comp (ContinuousLinearMap.inr ℝ ℝ E)) x := by + have hh := (hf.differentiableOn (by norm_num) (t,x) ⟨ht,mem_univ x⟩).hasFDerivWithinAt + exact hh.comp_hasFDerivAt x ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x)) + (Filter.Eventually.of_forall (fun _ => ⟨ht,mem_univ _⟩)) + +lemma contDiffOn_spaceDerivative {f : ℝ × E → E} {T : ℝ} (hT : 0 < T) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) : + ContDiffOn ℝ 1 (spaceDerivative f) (Icc 0 T ×ˢ (univ : Set E)) := by + have hu : UniqueDiffOn ℝ (Icc 0 T ×ˢ (univ : Set E)) := + (uniqueDiffOn_Icc hT).prod uniqueDiffOn_univ + have hh := (hf.fderivWithin hu (m := 1) (by norm_num)).clm_comp + (contDiffOn_const (c := ContinuousLinearMap.inr ℝ ℝ E)) + apply hh.congr + intro z hz + exact (hasFDerivAt_time_slice (hf.of_le (by norm_num)) hz.1 z.2).fderiv + +def withinVariationalField (f : ℝ × E → E) (χ : (E →L[ℝ] E) → ℝ) + (z : ℝ × (E × (E →L[ℝ] E))) : E × (E →L[ℝ] E) := + (f (z.1,z.2.1),χ z.2.2 • (spaceDerivative f (z.1,z.2.1)).comp z.2.2) + +lemma contDiffOn_withinVariationalField {f : ℝ × E → E} {χ : (E →L[ℝ] E) → ℝ} + {T : ℝ} (hT : 0 < T) (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + (hχ : ContDiff ℝ 1 χ) : + ContDiffOn ℝ 1 (withinVariationalField f χ) + (Icc 0 T ×ˢ (univ : Set (E × (E →L[ℝ] E)))) := by + have hp : ContDiff ℝ 1 (fun z : ℝ × (E × (E →L[ℝ] E)) => (z.1,z.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hm : MapsTo (fun z : ℝ × (E × (E →L[ℝ] E)) => (z.1,z.2.1)) + (Icc 0 T ×ˢ (univ : Set (E × (E →L[ℝ] E)))) (Icc 0 T ×ˢ (univ : Set E)) := + fun _ h => ⟨h.1,mem_univ _⟩ + exact ((hf.of_le (by norm_num)).comp hp.contDiffOn hm).prodMk + (((hχ.comp (contDiff_snd.comp contDiff_snd)).contDiffOn).smul + (((contDiffOn_spaceDerivative hT hf).comp hp.contDiffOn hm).clm_comp + (contDiff_snd.comp contDiff_snd).contDiffOn)) + +omit [NormedSpace ℝ E] in + +lemma continuousOn_time_label_of_lipschitz {F : Type*} [PseudoMetricSpace F] + {α : E → ℝ → F} {J : Set ℝ} {S : Set E} {L : ℝ≥0} + (hc : ∀ x ∈ S, ContinuousOn (α x) J) + (hl : ∀ t ∈ J, LipschitzOnWith L (α · t) S) : + ContinuousOn (fun z : ℝ × E => α z.2 z.1) (J ×ˢ S) := by + intro z hz + rw [Metric.continuousWithinAt_iff] + intro ε hε + obtain ⟨δ,hδ,htime⟩ := Metric.continuousWithinAt_iff.mp (hc z.2 hz.2 z.1 hz.1) (ε/2) (by positivity) + refine ⟨min δ (ε/(2*((L:ℝ)+1))),lt_min hδ (by positivity),?_⟩ + intro y hy hdist + have hd₁ : dist y.1 z.1 < δ := + (le_max_left _ _).trans_lt ((show max (dist y.1 z.1) (dist y.2 z.2) < _ from hdist).trans_le (min_le_left _ _)) + have hd₂ : dist y.2 z.2 < ε/(2*((L:ℝ)+1)) := + (le_max_right _ _).trans_lt ((show max (dist y.1 z.1) (dist y.2 z.2) < _ from hdist).trans_le (min_le_right _ _)) + have hx : (L:ℝ)*dist y.2 z.2 < ε/2 := by + have hh := (lt_div_iff₀ (show 0 < 2*((L:ℝ)+1) by positivity)).mp hd₂ + nlinarith [dist_nonneg (x := y.2) (y := z.2)] + exact (dist_triangle _ (α z.2 y.1) _).trans_lt + (add_lt_add_of_le_of_lt ((hl y.1 hy.1).dist_le_mul y.2 hy.2 z.2 hz.2) + (htime hy.1 hd₁) |>.trans_le (by linarith)) + +lemma hasStrictFDerivAt_time_flow {f : ℝ × E → E} {α : E → ℝ → E} + {A : E → ℝ → (E →L[ℝ] E)} {T r : ℝ} {x₀ x : E} {t : ℝ} + (hf : ContinuousOn f (Icc 0 T ×ˢ (univ : Set E))) + (hαc : ContinuousOn (fun z : ℝ × E => α z.2 z.1) (Icc 0 T ×ˢ ball x₀ r)) + (hAc : ContinuousOn (fun z : ℝ × E => A z.2 z.1) (Icc 0 T ×ˢ ball x₀ r)) + (hαd : ∀ y ∈ ball x₀ r, ∀ s ∈ Icc 0 T, + HasDerivWithinAt (α y) (f (s,α y s)) (Icc 0 T) s) + (hAd : ∀ s ∈ Icc 0 T, ∀ y ∈ ball x₀ r, HasFDerivAt (α · s) (A y s) y) + (ht : t ∈ Ioo 0 T) (hx : x ∈ ball x₀ r) : + HasStrictFDerivAt (fun z : ℝ × E => α z.2 z.1) + ((ContinuousLinearMap.toSpanSingleton ℝ (f (t,α x t))).coprod (A x t)) (t,x) := by + have hn : Icc 0 T ×ˢ ball x₀ r ∈ 𝓝 (t,x) := + prod_mem_nhds (Icc_mem_nhds ht.1 ht.2) (isOpen_ball.mem_nhds hx) + have hni : Ioo 0 T ×ˢ ball x₀ r ∈ 𝓝 (t,x) := + (isOpen_Ioo.prod isOpen_ball).mem_nhds ⟨ht,hx⟩ + have hfc : ContinuousAt (fun z : ℝ × E => f (z.1,α z.2 z.1)) (t,x) := by + apply (hf.comp (continuousOn_fst.prodMk hαc) (fun z hz => ⟨hz.1,mem_univ _⟩)).continuousAt hn + apply hasStrictFDerivAt_uncurry_coprod (f := fun s y => α y s) (u := (t,x)) + (f₁ := fun s y => ContinuousLinearMap.toSpanSingleton ℝ (f (s,α y s))) + (f₂ := fun s y => A y s) + · filter_upwards [hni] with z hz + exact ((hαd z.2 hz.2 z.1 (Ioo_subset_Icc_self hz.1)).hasDerivAt + (Icc_mem_nhds hz.1.1 hz.1.2)).hasFDerivAt + · filter_upwards [hn] with z hz + exact hAd z.1 hz.1 z.2 hz.2 + · exact (ContinuousLinearMap.toSpanSingletonCLE (𝕜 := ℝ) (E := E)).continuous.continuousAt.comp hfc + · exact hAc.continuousAt hn + +variable [FiniteDimensional ℝ E] + +lemma withinVariationalField_bounded {f : ℝ × E → E} {T L K : ℝ} + (hL : 0 ≤ L) (hK : 0 ≤ K) (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) + (hd : ∀ t ∈ Icc 0 T, ∀ x, ‖spaceDerivative f (t,x)‖ ≤ K) + (χ : ContDiffBump (0 : E →L[ℝ] E)) {t : ℝ} (ht : t ∈ Icc 0 T) (z : E × (E →L[ℝ] E)) : + ‖withinVariationalField f χ (t,z)‖ ≤ max L (K*χ.rOut) := by + change max ‖f (t,z.1)‖ ‖χ z.2 • (spaceDerivative f (t,z.1)).comp z.2‖ ≤ _ + refine max_le ((hb t ht _).trans (le_max_left _ _)) ?_ + by_cases hz : χ z.2 = 0 + · simp only [hz,zero_smul,norm_zero] + exact hL.trans (le_max_left _ _) + have hnorm : ‖z.2‖ ≤ χ.rOut := by + have hh : z.2 ∈ Metric.ball 0 χ.rOut := by rwa [← χ.support_eq] + exact (show ‖z.2‖ < χ.rOut by simpa only [Metric.mem_ball,dist_zero_right] using hh).le + calc + _ = χ z.2 * ‖(spaceDerivative f (t,z.1)).comp z.2‖ := by rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + _ ≤ ‖(spaceDerivative f (t,z.1)).comp z.2‖ := mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖spaceDerivative f (t,z.1)‖ * ‖z.2‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ K*χ.rOut := mul_le_mul (hd t ht _) hnorm (norm_nonneg _) hK + _ ≤ _ := le_max_right _ _ +lemma exists_within_variational_flow {f : ℝ × E → E} {T L K : ℝ} + (hT : 0 < T) (hL : 0 ≤ L) (hK : 0 ≤ K) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) + (hd : ∀ t ∈ Icc 0 T, ∀ x, ‖spaceDerivative f (t,x)‖ ≤ K) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), ∃ L' : ℝ≥0, + (∀ x ∈ closedBall x₀ (1/2 : ℝ), α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (A x) + ((spaceDerivative f (t,α x t)).comp (A x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ (L*T+1/2)) ∧ + ∀ t ∈ Icc 0 T, LipschitzOnWith L' (α · t) (closedBall x₀ (1/2 : ℝ)) ∧ + LipschitzOnWith L' (A · t) (closedBall x₀ (1/2 : ℝ)) := by + let χ : ContDiffBump (0 : E →L[ℝ] E) := + ⟨Real.exp (K*T)+1,Real.exp (K*T)+2,by positivity,by linarith⟩ + let M := max L (K*χ.rOut) + let z₀ : E × (E →L[ℝ] E) := (x₀,ContinuousLinearMap.id ℝ E) + obtain ⟨β,L',hβ,hLip⟩ := exists_bounded_picard_flow hT.le + (hL.trans (le_max_left L (K*χ.rOut))) + (contDiffOn_withinVariationalField hT hf χ.contDiff) + (fun _ ht z => withinVariationalField_bounded hL hK hb hd χ ht z) z₀ + let α : E → ℝ → E := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).1 + let A : E → ℝ → (E →L[ℝ] E) := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).2 + have hmem {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : + (x,ContinuousLinearMap.id ℝ E) ∈ closedBall z₀ (1/2 : ℝ) := by + simpa only [z₀,Metric.mem_closedBall,Prod.dist_eq,dist_self,max_eq_left (dist_nonneg : 0 ≤ dist x x₀)] using hx + have hα₀ {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : α x 0 = x := + congrArg Prod.fst (hβ _ (hmem hx)).1 + have hA₀ {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : A x 0 = ContinuousLinearMap.id ℝ E := + congrArg Prod.snd (hβ _ (hmem hx)).1 + have hαd {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t := + ((hβ _ (hmem hx)).2 t ht).fst + have hAd {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasDerivWithinAt (A x) (χ (A x t) • (spaceDerivative f (t,α x t)).comp (A x t)) (Icc 0 T) t := + ((hβ _ (hmem hx)).2 t ht).snd + have hAbound {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + ‖A x t‖ ≤ Real.exp (K*T) := by + have hh := norm_le_gronwallBound_of_norm_deriv_right_le + (HasDerivWithinAt.continuousOn (fun t ht => hAd hx ht)) + (fun t ht => (hAd hx (Ico_subset_Icc_self ht)).mono_of_mem_nhdsWithin (Icc_mem_nhdsGE_of_mem ht)) + (δ := 1) (K := K) (ε := 0) + (by rw [hA₀ hx]; exact ContinuousLinearMap.norm_id_le) + (fun t ht => by + rw [norm_smul,Real.norm_of_nonneg χ.nonneg,add_zero] + calc + _ ≤ ‖(spaceDerivative f (t,α x t)).comp (A x t)‖ := mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖spaceDerivative f (t,α x t)‖ * ‖A x t‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ K*‖A x t‖ := mul_le_mul_of_nonneg_right (hd t (Ico_subset_Icc_self ht) _) (norm_nonneg _)) t ht + rw [gronwallBound_ε0,one_mul,sub_zero] at hh + exact hh.trans (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 hK)) + have hone {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + χ (A x t) = 1 := by + apply χ.one_of_mem_closedBall + simp only [Metric.mem_closedBall,dist_zero_right] + exact (hAbound hx ht).trans (by dsimp [χ]; linarith) + refine ⟨α,A,L',?_,?_⟩ + · intro x hx + refine ⟨hα₀ hx,hA₀ hx,(fun _ ht => hαd hx ht),?_,?_⟩ + · intro t ht + simpa only [hone hx ht,one_smul] using hAd hx ht + · intro t ht + have hl : LipschitzOnWith ⟨L,hL⟩ (α x) (Icc 0 T) := + (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun s hs => hαd hx hs) (fun s _ => by exact_mod_cast hb s (by assumption) (α x s)) + have hh := hl.dist_le_mul t ht 0 (show 0 ∈ Icc 0 T from ⟨le_rfl,hT.le⟩) + rw [hα₀ hx,Real.dist_eq,sub_zero,abs_of_nonneg ht.1] at hh + change dist (α x t) x₀ ≤ L*T+1/2 + exact (dist_triangle _ x _).trans (add_le_add + (hh.trans (mul_le_mul_of_nonneg_left ht.2 hL)) hx) + · intro t ht + constructor + · apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + exact (le_max_left _ _).trans (by + simpa [Prod.dist_eq] using (hLip t ht).dist_le_mul _ (hmem hx) _ (hmem hy)) + · apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + exact (le_max_right _ _).trans (by + simpa [Prod.dist_eq] using (hLip t ht).dist_le_mul _ (hmem hx) _ (hmem hy)) + +lemma hasFDerivAt_within_variational_flow {f : ℝ × E → E} + {x₀ : E} {r R T : ℝ} (hT : 0 < T) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + {α : E → ℝ → E} {A : E → ℝ → (E →L[ℝ] E)} {L : ℝ≥0} + (hsol : ∀ x ∈ closedBall x₀ r, α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (A x) + ((spaceDerivative f (t,α x t)).comp (A x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ R) + (hLip : ∀ t ∈ Icc 0 T, LipschitzOnWith L (α · t) (closedBall x₀ r)) + {x : E} (hx : x ∈ ball x₀ r) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasFDerivAt (fun y => α y t) (A x t) x := by + have hx' := ball_subset_closedBall hx + have hdf := contDiffOn_spaceDerivative hT hf + have hsub : Icc 0 T ×ˢ closedBall x₀ R ⊆ Icc 0 T ×ˢ (univ : Set E) := + prod_mono Subset.rfl (subset_univ _) + obtain ⟨LD,hLD⟩ := (hdf.mono hsub).exists_lipschitzOnWith (by norm_num) + ((convex_Icc 0 T).prod (convex_closedBall x₀ R)) (isCompact_Icc.prod (isCompact_closedBall x₀ R)) + obtain ⟨M,hM⟩ := (isCompact_Icc.prod (isCompact_closedBall x₀ R)).bddAbove_image + (hdf.continuousOn.mono hsub).norm + have hLDslice (s : ℝ) (hs : s ∈ Icc 0 T) : + LipschitzOnWith LD (spaceDerivative f ∘ (fun x => (s,x))) (closedBall x₀ R) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [Function.comp_apply,Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x y)] + using hLD.dist_le_mul (s,x) ⟨hs,hx⟩ (s,y) ⟨hs,hy⟩ + let K := max 1 M + have hK : 0 < K := lt_of_lt_of_le zero_lt_one (le_max_left _ _) + let C : ℝ := ((LD : ℝ)*(L : ℝ)^2)/K * (Real.exp (K*t)-1) + have hC : 0 ≤ C := by + dsimp [C] + exact mul_nonneg (div_nonneg (mul_nonneg LD.2 (sq_nonneg _)) hK.le) + (sub_nonneg.mpr (Real.one_le_exp_iff.mpr (mul_nonneg hK.le ht.1))) + apply hasFDerivAt_of_quadratic_bound hC + filter_upwards [closedBall_mem_nhds_of_mem hx] with y hy + have hxs := hsol x hx' + have hys := hsol y hy + have hdα (z : E) (hz : z ∈ closedBall x₀ r) (s : ℝ) (hs : s ∈ Ico 0 T) : + HasDerivWithinAt (α z) (f (s,α z s)) (Ici s) s := + ((hsol z hz).2.2.1 s (Ico_subset_Icc_self hs)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem hs) + have hdA (s : ℝ) (hs : s ∈ Ico 0 T) : + HasDerivWithinAt (A x) ((spaceDerivative f (s,α x s)).comp (A x s)) (Ici s) s := + (hxs.2.2.2.1 s (Ico_subset_Icc_self hs)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem hs) + have hb := variational_remainder_bound (f := fun t x => f (t,x)) + (D := fun s => spaceDerivative f (s,α x s)) + (HasDerivWithinAt.continuousOn hxs.2.2.1) + (HasDerivWithinAt.continuousOn hys.2.2.1) + (HasDerivWithinAt.continuousOn hxs.2.2.2.1) + (hdα x hx') (hdα y hy) hdA + (v := y-x) (K := K) (ε := (LD : ℝ)*(L : ℝ)^2*‖y-x‖^2) + (by simp [hxs.1,hys.1,hxs.2.1]) + (fun s hs => (hM ⟨(s,α x s),⟨Ico_subset_Icc_self hs,hxs.2.2.2.2 s (Ico_subset_Icc_self hs)⟩,rfl⟩).trans (le_max_right _ _)) + (fun s hs => ?_) + · have hb' := hb t ht + apply hb'.trans_eq + rw [gronwallBound_of_K_ne_0 hK.ne'] + dsimp [C] + ring_nf + · have hTaylor := taylor_bound_lipschitz_derivative + (convex_closedBall x₀ R) + (fun z _ => (hasFDerivAt_time_slice (hf.of_le (by norm_num)) (Ico_subset_Icc_self hs) z).differentiableAt) + (hLDslice s (Ico_subset_Icc_self hs)) (hxs.2.2.2.2 s (Ico_subset_Icc_self hs)) (hys.2.2.2.2 s (Ico_subset_Icc_self hs)) + apply hTaylor.trans + have hn := (hLip s (Ico_subset_Icc_self hs)).norm_sub_le hy hx' + have hsq : ‖α y s-α x s‖^2 ≤ ((L : ℝ)*‖y-x‖)^2 := + sq_le_sq₀ (norm_nonneg _) (mul_nonneg L.2 (norm_nonneg _)) |>.mpr hn + calc + _ ≤ (LD : ℝ)*((L : ℝ)*‖y-x‖)^2 := mul_le_mul_of_nonneg_left hsq LD.2 + _ = _ := by ring + +lemma flow_injOn_of_within_ode {f : ℝ × E → E} + {x₀ : E} {r R T : ℝ} + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set E))) {α : E → ℝ → E} + (hinit : ∀ x ∈ closedBall x₀ r, α x 0 = x) + (hder : ∀ x ∈ closedBall x₀ r, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) + (hrange : ∀ x ∈ closedBall x₀ r, ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ R) + {t : ℝ} (ht : t ∈ Icc 0 T) : Set.InjOn (fun x => α x t) (closedBall x₀ r) := by + obtain ⟨K,hK⟩ := (hf.mono (prod_mono Subset.rfl (subset_univ (closedBall x₀ R)))).exists_lipschitzOnWith + (by norm_num) ((convex_Icc 0 T).prod (convex_closedBall x₀ R)) + (isCompact_Icc.prod (isCompact_closedBall x₀ R)) + have hKslice (s : ℝ) (hs : s ∈ Icc 0 T) : + LipschitzOnWith K (fun x => f (s,x)) (closedBall x₀ R) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x y)] + using hK.dist_le_mul (s,x) ⟨hs,hx⟩ (s,y) ⟨hs,hy⟩ + have hsub : Icc 0 t ⊆ Icc 0 T := Icc_subset_Icc le_rfl ht.2 + have hd (x : E) (hx : x ∈ closedBall x₀ r) (s : ℝ) (hs : s ∈ Ioc 0 t) : + HasDerivWithinAt (α x) (f (s,α x s)) (Iic s) s := + ((hder x hx s (hsub (Ioc_subset_Icc_self hs))).mono hsub).mono_of_mem_nhdsWithin + (Icc_mem_nhdsLE_of_mem hs) + intro x hx y hy heq + have hu := ODE_solution_unique_of_mem_Icc_left + (v := fun s x => f (s,x)) (s := fun _ => closedBall x₀ R) + (fun s hs => hKslice s (hsub (Ioc_subset_Icc_self hs))) + ((HasDerivWithinAt.continuousOn (hder x hx)).mono hsub) (hd x hx) + (fun s hs => hrange x hx s (hsub (Ioc_subset_Icc_self hs))) + ((HasDerivWithinAt.continuousOn (hder y hy)).mono hsub) (hd y hy) + (fun s hs => hrange y hy s (hsub (Ioc_subset_Icc_self hs))) heq (show 0 ∈ Icc 0 t from ⟨le_rfl,ht.1⟩) + simpa [hinit x hx,hinit y hy] using hu + +lemma exists_bounded_within_variational_flow {f : ℝ × E → E} {T L : ℝ} + (hT : 0 < T) (hL : 0 ≤ L) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), ∃ L' : ℝ≥0, + (∀ x ∈ closedBall x₀ (1/2 : ℝ), α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (A x) + ((spaceDerivative f (t,α x t)).comp (A x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ (L*T+1/2)) ∧ + ∀ t ∈ Icc 0 T, LipschitzOnWith L' (α · t) (closedBall x₀ (1/2 : ℝ)) ∧ + LipschitzOnWith L' (A · t) (closedBall x₀ (1/2 : ℝ)) := by + let χ : ContDiffBump x₀ := ⟨L*T+1,L*T+2,by positivity,by linarith⟩ + let g : ℝ × E → E := fun z => χ z.2 • f z + have hg : ContDiffOn ℝ 2 g (Icc 0 T ×ˢ (univ : Set E)) := + (χ.contDiff.comp contDiff_snd).contDiffOn.smul hf + have hgb (t : ℝ) (ht : t ∈ Icc 0 T) (x : E) : ‖g (t,x)‖ ≤ L := by + change ‖χ x • f (t,x)‖ ≤ L + rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + exact (mul_le_of_le_one_left (norm_nonneg _) χ.le_one).trans (hb t ht x) + obtain ⟨K,hK⟩ := (isCompact_Icc.prod (isCompact_closedBall x₀ χ.rOut)).bddAbove_image + ((contDiffOn_spaceDerivative hT hg).continuousOn.mono + (prod_mono Subset.rfl (subset_univ _))).norm + have hd (t : ℝ) (ht : t ∈ Icc 0 T) (x : E) : ‖spaceDerivative g (t,x)‖ ≤ max 0 K := by + by_cases hx : x ∈ closedBall x₀ χ.rOut + · exact (hK ⟨(t,x),⟨ht,hx⟩,rfl⟩).trans (le_max_right _ _) + have he : (fun y => g (t,y)) =ᶠ[𝓝 x] 0 := by + have hn : x ∉ tsupport (χ : E → ℝ) := by rwa [χ.tsupport_eq] + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + change χ y • f (t,y) = 0 + simp only [hy,Pi.zero_apply,zero_smul] + have hzero : spaceDerivative g (t,x) = 0 := by + change fderiv ℝ (fun y => g (t,y)) x = 0 + rw [he.fderiv_eq] + simp + rw [hzero,norm_zero] + exact le_max_left _ _ + obtain ⟨α,A,L',hsol,hLip⟩ := exists_within_variational_flow hT hL + (le_max_left 0 K) hg hgb hd x₀ + have hlocal {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + (fun y => g (t,y)) =ᶠ[𝓝 (α x t)] (fun y => f (t,y)) := by + have hm : α x t ∈ ball x₀ χ.rIn := by + have hh := (hsol x hx).2.2.2.2 t ht + change dist (α x t) x₀ < L*T+1 + change dist (α x t) x₀ ≤ L*T+1/2 at hh + linarith + filter_upwards [χ.eventuallyEq_one_of_mem_ball hm] with y hy + change χ y • f (t,y) = f (t,y) + rw [hy] + exact one_smul ℝ (f (t,y)) + refine ⟨α,A,L',?_,hLip⟩ + intro x hx + have hh := hsol x hx + refine ⟨hh.1,hh.2.1,?_,?_,hh.2.2.2.2⟩ + · intro t ht + simpa only [(hlocal hx ht).eq_of_nhds] using hh.2.2.1 t ht + · intro t ht + have he : spaceDerivative g (t,α x t) = spaceDerivative f (t,α x t) := + (hlocal hx ht).fderiv_eq + simpa only [he] using hh.2.2.2.1 t ht + +lemma exists_bounded_within_volume_flow {f : ℝ × E → E} {T L : ℝ} + (hT : 0 < T) (hL : 0 ≤ L) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) + (hdiv : ∀ t ∈ Icc 0 T, ∀ x, LinearMap.trace ℝ E (spaceDerivative f (t,x)).toLinearMap = 0) + (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + ∀ t ∈ Icc 0 T, (A x t).det = 1) ∧ + ∀ t ∈ Icc 0 T, Set.InjOn (fun x => α x t) (ball x₀ (1/2 : ℝ)) := by + obtain ⟨α,A,L',hsol,hLip⟩ := exists_bounded_within_variational_flow hT hL hf hb x₀ + refine ⟨α,A,?_,?_⟩ + · intro x hx + have hh := hsol x (ball_subset_closedBall hx) + refine ⟨hh.1,hh.2.2.1,(fun _ ht => hasFDerivAt_within_variational_flow hT hf hsol + (fun t ht => (hLip t ht).1) hx ht),?_⟩ + exact determinant_clm_eq_one_of_trace_zero hT.le + (HasDerivWithinAt.continuousOn hh.2.2.2.1) hh.2.1 + (fun t ht => (hh.2.2.2.1 t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)) + (fun t ht => hdiv t (Ioo_subset_Icc_self ht) _) + · intro t ht + exact (flow_injOn_of_within_ode (hf.of_le (by norm_num)) + (fun x hx => (hsol x hx).1) (fun x hx => (hsol x hx).2.2.1) + (fun x hx => (hsol x hx).2.2.2.2) ht).mono ball_subset_closedBall + +lemma exists_bounded_within_volume_flow_joint {f : ℝ × E → E} {T L : ℝ} + (hT : 0 < T) (hL : 0 ≤ L) + (hf : ContDiffOn ℝ 2 f (Icc 0 T ×ˢ (univ : Set E))) + (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) + (hdiv : ∀ t ∈ Icc 0 T, ∀ x, LinearMap.trace ℝ E (spaceDerivative f (t,x)).toLinearMap = 0) + (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + (∀ t ∈ Icc 0 T, (A x t).det = 1) ∧ + ∀ t ∈ Ioo 0 T, HasStrictFDerivAt (fun z : ℝ × E => α z.2 z.1) + ((ContinuousLinearMap.toSpanSingleton ℝ (f (t,α x t))).coprod (A x t)) (t,x)) ∧ + ∀ t ∈ Icc 0 T, Set.InjOn (fun x => α x t) (ball x₀ (1/2 : ℝ)) := by + obtain ⟨α,A,L',hsol,hLip⟩ := exists_bounded_within_variational_flow hT hL hf hb x₀ + have hαc := continuousOn_time_label_of_lipschitz (fun x hx => + HasDerivWithinAt.continuousOn (hsol x hx).2.2.1) (fun t ht => (hLip t ht).1) + have hAc := continuousOn_time_label_of_lipschitz (fun x hx => + HasDerivWithinAt.continuousOn (hsol x hx).2.2.2.1) (fun t ht => (hLip t ht).2) + have hAd : ∀ t ∈ Icc 0 T, ∀ x ∈ ball x₀ (1/2 : ℝ), HasFDerivAt (α · t) (A x t) x := + fun _ ht _ hx => hasFDerivAt_within_variational_flow hT hf hsol (fun t ht => (hLip t ht).1) hx ht + refine ⟨α,A,?_,?_⟩ + · intro x hx + have hh := hsol x (ball_subset_closedBall hx) + refine ⟨hh.1,hh.2.2.1,(fun t ht => hAd t ht x hx),?_,?_⟩ + · exact determinant_clm_eq_one_of_trace_zero hT.le + (HasDerivWithinAt.continuousOn hh.2.2.2.1) hh.2.1 + (fun t ht => (hh.2.2.2.1 t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)) + (fun t ht => hdiv t (Ioo_subset_Icc_self ht) _) + · intro t ht + exact hasStrictFDerivAt_time_flow hf.continuousOn + (hαc.mono (Set.prod_mono Subset.rfl ball_subset_closedBall)) + (hAc.mono (Set.prod_mono Subset.rfl ball_subset_closedBall)) + (fun y hy => (hsol y (ball_subset_closedBall hy)).2.2.1) hAd ht hx + · intro t ht + exact (flow_injOn_of_within_ode (hf.of_le (by norm_num)) + (fun x hx => (hsol x hx).1) (fun x hx => (hsol x hx).2.2.1) + (fun x hx => (hsol x hx).2.2.2.2) ht).mono ball_subset_closedBall + +end WithinFlow +lemma cutLorentz_regular_slab {E B : Field} {χ : Vec → ℝ} {T : ℝ} + (hE : ContDiffOn ℝ 2 E (Icc 0 T ×ˢ (univ : Set Vec))) (hB : ContDiffOn ℝ 2 B (Icc 0 T ×ˢ (univ : Set Vec))) + (hχ : ContDiff ℝ 2 χ) : + ContDiffOn ℝ 2 (cutLorentz E B χ) (Icc 0 T ×ˢ (univ : Set Phase)) := by + have hx : ContDiff ℝ 2 (fun p : ℝ × Phase => (p.1,p.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hm : MapsTo (fun p : ℝ × Phase => (p.1,p.2.1)) + (Icc 0 T ×ˢ (univ : Set Phase)) (Icc 0 T ×ˢ (univ : Set Vec)) := fun _ hp => ⟨hp.1,mem_univ _⟩ + have hu : ContDiff ℝ 2 (fun p : ℝ × Phase => velocity p.2.2) := + contDiff_velocity.comp (contDiff_snd.comp contDiff_snd) + exact hu.contDiffOn.prodMk + ((hχ.comp (contDiff_fst.comp contDiff_snd)).contDiffOn.smul + ((hE.comp hx.contDiffOn hm).add + (contDiff_cross.contDiffOn.comp (hu.contDiffOn.prodMk (hB.comp hx.contDiffOn hm)) + (mapsTo_univ _ _)))) + +lemma cutLorentz_bounded_slab {E B : Field} {T : ℝ} (_hT : 0 ≤ T) {x₀ : Vec} + (hE : ContinuousOn E (Icc 0 T ×ˢ (univ : Set Vec))) (hB : ContinuousOn B (Icc 0 T ×ˢ (univ : Set Vec))) + (χ : ContDiffBump x₀) : + ∃ L : ℝ, 0 ≤ L ∧ ∀ t ∈ Icc 0 T, ∀ z, ‖cutLorentz E B χ (t,z)‖ ≤ L := by + have hsub : Icc 0 T ×ˢ closedBall x₀ χ.rOut ⊆ (Icc 0 T ×ˢ (univ : Set Vec)) := fun _ hp => ⟨hp.1,mem_univ _⟩ + obtain ⟨M,hM⟩ := (isCompact_Icc.prod (isCompact_closedBall x₀ χ.rOut)).bddAbove_image + ((hE.norm.add hB.norm).mono hsub) + refine ⟨max 1 M, (zero_le_one.trans (le_max_left _ _)),?_⟩ + intro t ht z + rw [Prod.norm_def] + apply max_le + · exact (norm_velocity_lt_one z.2).le.trans (le_max_left _ _) + change ‖χ z.1 • (E (t,z.1)+cross (velocity z.2) (B (t,z.1)))‖ ≤ max 1 M + by_cases hχ : χ z.1 = 0 + · simp only [hχ,zero_smul,norm_zero] + exact zero_le_one.trans (le_max_left _ _) + have hz : z.1 ∈ closedBall x₀ χ.rOut := ball_subset_closedBall (by + rw [← χ.support_eq] + exact hχ) + calc + _ = χ z.1 * ‖E (t,z.1)+cross (velocity z.2) (B (t,z.1))‖ := by + rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + _ ≤ ‖E (t,z.1)+cross (velocity z.2) (B (t,z.1))‖ := + mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖E (t,z.1)‖+‖B (t,z.1)‖ := by + have hc : ‖cross (velocity z.2) (B (t,z.1))‖ ≤ ‖B (t,z.1)‖ := + (norm_cross_le (velocity z.2) (B (t,z.1))).trans + (mul_le_of_le_one_left (norm_nonneg (B (t,z.1))) (norm_velocity_lt_one z.2).le) + exact (norm_add_le (E (t,z.1)) (cross (velocity z.2) (B (t,z.1)))).trans + (add_le_add le_rfl hc) + _ ≤ M := hM ⟨(t,z.1),⟨ht,hz⟩,rfl⟩ + _ ≤ _ := le_max_right _ _ + +lemma cross_smul_right (a b : Vec) (c : ℝ) : cross a (c • b) = c • cross a b := by + ext i + fin_cases i <;> simp [cross] <;> ring + +lemma cutLorentz_eq_lorentzPhase (E B : Field) (χ : Vec → ℝ) (t : ℝ) : + (fun z => cutLorentz E B χ (t,z)) = + lorentzPhase (fun x => χ x • E (t,x)) (fun x => χ x • B (t,x)) := by + ext z : 1 + simp only [cutLorentz,lorentzPhase,cross_smul_right,smul_add] + +lemma trace_cutLorentz_slab {E B : Field} {χ : Vec → ℝ} {T : ℝ} + (hE : ContDiffOn ℝ 1 E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ 1 B (Icc 0 T ×ˢ (univ : Set Vec))) + (hχ : ContDiff ℝ 1 χ) {t : ℝ} (ht : t ∈ Icc 0 T) (z : Phase) : + LinearMap.trace ℝ Phase (spaceDerivative (cutLorentz E B χ) (t,z)).toLinearMap = 0 := by + rw [spaceDerivative,cutLorentz_eq_lorentzPhase] + exact trace_lorentzPhase + ((hχ.differentiable (by norm_num)).smul (fun x => (hasFDerivAt_time_slice hE ht x).differentiableAt)) + ((hχ.differentiable (by norm_num)).smul (fun x => (hasFDerivAt_time_slice hB ht x).differentiableAt)) z + +lemma exists_finite_lorentz_within_volume_flow {E B : Field} {T : ℝ} (hT : 0 < T) + (hE : ContDiffOn ℝ 2 E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ 2 B (Icc 0 T ×ˢ (univ : Set Vec))) (z₀ : Phase) : + ∃ α : Phase → ℝ → Phase, ∃ A : Phase → ℝ → (Phase →L[ℝ] Phase), + (∀ z ∈ ball z₀ (1/2 : ℝ), α z 0 = z ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α z) (lorentzField E B (t,α z t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (fun y => α y t) (A z t) z) ∧ + (∀ t ∈ Icc 0 T, (A z t).det = 1) ∧ + ∀ t ∈ Ioo 0 T, HasStrictFDerivAt (fun p : ℝ × Phase => α p.2 p.1) + ((ContinuousLinearMap.toSpanSingleton ℝ (lorentzField E B (t,α z t))).coprod (A z t)) (t,z)) ∧ + ∀ t ∈ Icc 0 T, Set.InjOn (fun z => α z t) (ball z₀ (1/2 : ℝ)) := by + let χ : ContDiffBump z₀.1 := ⟨T+1,T+2,by linarith,by linarith⟩ + obtain ⟨L,hL,hbound⟩ := cutLorentz_bounded_slab hT.le hE.continuousOn hB.continuousOn χ + obtain ⟨α,A,hsol,hinj⟩ := exists_bounded_within_volume_flow_joint hT hL + (cutLorentz_regular_slab hE hB χ.contDiff) hbound + (fun _ ht z => trace_cutLorentz_slab (hE.of_le (by norm_num)) (hB.of_le (by norm_num)) χ.contDiff ht z) z₀ + have hX {z : Phase} (hz : z ∈ ball z₀ (1/2 : ℝ)) : + LipschitzOnWith 1 (fun t => (α z t).1) (Icc 0 T) := by + apply (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun t ht => ((hsol z hz).2.1 t ht).fst) + intro t _ + exact_mod_cast (norm_velocity_lt_one (α z t).2).le + have hone {z : Phase} (hz : z ∈ ball z₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + χ (α z t).1 = 1 := by + apply χ.one_of_mem_closedBall + have hh := (hX hz).dist_le_mul t ht 0 (show 0 ∈ Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hsol z hz).1,NNReal.coe_one,one_mul,Real.dist_eq,sub_zero,abs_of_nonneg ht.1] at hh + have hz' : dist z.1 z₀.1 < (1/2 : ℝ) := (le_max_left _ _).trans_lt hz + change dist (α z t).1 z₀.1 ≤ T+1 + exact (dist_triangle _ z.1 _).trans (add_le_add hh hz'.le) |>.trans (by linarith [ht.2]) + have heq {z : Phase} (hz : z ∈ ball z₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + cutLorentz E B χ (t,α z t) = lorentzField E B (t,α z t) := by + simp only [cutLorentz,lorentzField,lorentzPhase,hone hz ht,one_smul] + refine ⟨α,A,?_,hinj⟩ + intro z hz + refine ⟨(hsol z hz).1,?_,(hsol z hz).2.2.1,(hsol z hz).2.2.2.1,?_⟩ + · intro t ht + simpa only [heq hz ht] using (hsol z hz).2.1 t ht + · intro t ht + simpa only [heq hz (Ioo_subset_Icc_self ht)] using (hsol z hz).2.2.2.2 t ht + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal +open Set MeasureTheory +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open scoped Topology NNReal ContDiff + +section SlabUniqueness +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +lemma eqOn_of_within_ode {f : ℝ × E → E} {α β : ℝ → E} {T t₀ : ℝ} + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set E))) + (hα : ∀ t ∈ Icc 0 T, HasDerivWithinAt α (f (t,α t)) (Icc 0 T) t) + (hβ : ∀ t ∈ Icc 0 T, HasDerivWithinAt β (f (t,β t)) (Icc 0 T) t) + (ht₀ : t₀ ∈ Icc 0 T) (hinit : α t₀ = β t₀) : EqOn α β (Icc 0 T) := by + have hαc := HasDerivWithinAt.continuousOn hα + have hβc := HasDerivWithinAt.continuousOn hβ + obtain ⟨R,hR⟩ := isCompact_Icc.bddAbove_image (hαc.norm.add hβc.norm) + have hαR (t : ℝ) (ht : t ∈ Icc 0 T) : α t ∈ closedBall (0 : E) R := by + simpa only [Metric.mem_closedBall,dist_zero_right] using (le_add_of_nonneg_right (norm_nonneg (β t))).trans (hR ⟨t,ht,rfl⟩) + have hβR (t : ℝ) (ht : t ∈ Icc 0 T) : β t ∈ closedBall (0 : E) R := by + simpa only [Metric.mem_closedBall,dist_zero_right] using (le_add_of_nonneg_left (norm_nonneg (α t))).trans (hR ⟨t,ht,rfl⟩) + obtain ⟨K,hK⟩ := (hf.mono (prod_mono Subset.rfl (subset_univ (closedBall (0 : E) R)))).exists_lipschitzOnWith + (by norm_num) ((convex_Icc 0 T).prod (convex_closedBall (0 : E) R)) + (isCompact_Icc.prod (isCompact_closedBall (0 : E) R)) + have hKslice (t : ℝ) (ht : t ∈ Icc 0 T) : + LipschitzOnWith K (fun x => f (t,x)) (closedBall (0 : E) R) := by + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x y)] + using hK.dist_le_mul (t,x) ⟨ht,hx⟩ (t,y) ⟨ht,hy⟩ + have hl : Icc 0 t₀ ⊆ Icc 0 T := Icc_subset_Icc le_rfl ht₀.2 + have hr : Icc t₀ T ⊆ Icc 0 T := Icc_subset_Icc ht₀.1 le_rfl + have hleft : EqOn α β (Icc 0 t₀) := + ODE_solution_unique_of_mem_Icc_left (v := fun t x => f (t,x)) (s := fun _ => closedBall (0 : E) R) + (fun t ht => hKslice t (hl (Ioc_subset_Icc_self ht))) (hαc.mono hl) + (fun t ht => ((hα t (hl (Ioc_subset_Icc_self ht))).mono hl).mono_of_mem_nhdsWithin (Icc_mem_nhdsLE_of_mem ht)) + (fun t ht => hαR t (hl (Ioc_subset_Icc_self ht))) (hβc.mono hl) + (fun t ht => ((hβ t (hl (Ioc_subset_Icc_self ht))).mono hl).mono_of_mem_nhdsWithin (Icc_mem_nhdsLE_of_mem ht)) + (fun t ht => hβR t (hl (Ioc_subset_Icc_self ht))) hinit + have hright : EqOn α β (Icc t₀ T) := + ODE_solution_unique_of_mem_Icc_right (v := fun t x => f (t,x)) (s := fun _ => closedBall (0 : E) R) + (fun t ht => hKslice t (hr (Ico_subset_Icc_self ht))) (hαc.mono hr) + (fun t ht => ((hα t (hr (Ico_subset_Icc_self ht))).mono hr).mono_of_mem_nhdsWithin (Icc_mem_nhdsGE_of_mem ht)) + (fun t ht => hαR t (hr (Ico_subset_Icc_self ht))) (hβc.mono hr) + (fun t ht => ((hβ t (hr (Ico_subset_Icc_self ht))).mono hr).mono_of_mem_nhdsWithin (Icc_mem_nhdsGE_of_mem ht)) + (fun t ht => hβR t (hr (Ico_subset_Icc_self ht))) hinit + intro t ht + rcases le_total t t₀ with h | h + · exact hleft ⟨ht.1,h⟩ + · exact hright ⟨h,ht.2⟩ +end SlabUniqueness + +lemma contDiffOn_lorentzField_slab {E B : Field} {T : ℝ} {k : ℕ∞ω} + (hE : ContDiffOn ℝ k E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ k B (Icc 0 T ×ˢ (univ : Set Vec))) : + ContDiffOn ℝ k (lorentzField E B) (Icc 0 T ×ˢ (univ : Set Phase)) := by + have hx : ContDiff ℝ k (fun z : ℝ × Phase => (z.1,z.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hm : MapsTo (fun z : ℝ × Phase => (z.1,z.2.1)) + (Icc 0 T ×ˢ (univ : Set Phase)) (Icc 0 T ×ˢ (univ : Set Vec)) := fun _ h => ⟨h.1,mem_univ _⟩ + have hu : ContDiff ℝ k (fun z : ℝ × Phase => velocity z.2.2) := + contDiff_velocity.comp (contDiff_snd.comp contDiff_snd) + exact hu.contDiffOn.prodMk ((hE.comp hx.contDiffOn hm).add + (contDiff_cross.contDiffOn.comp (hu.contDiffOn.prodMk (hB.comp hx.contDiffOn hm)) (mapsTo_univ _ _))) + +lemma exists_lorentz_ode_on_slab {E B : Field} {T t₀ : ℝ} (hT : 0 ≤ T) + (ht₀ : t₀ ∈ Icc 0 T) (hE : ContDiffOn ℝ 2 E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ 2 B (Icc 0 T ×ˢ (univ : Set Vec))) (z₀ : Phase) : + ∃ α : ℝ → Phase, α t₀=z₀ ∧ + ∀ t ∈ Icc 0 T, HasDerivWithinAt α (lorentzField E B (t,α t)) (Icc 0 T) t := by + let χ : ContDiffBump z₀.1 := ⟨T+1,T+2,by linarith,by linarith⟩ + obtain ⟨L,hL,hbound⟩ := cutLorentz_bounded_slab hT hE.continuousOn hB.continuousOn χ + obtain ⟨α,hα₀,hα⟩ := exists_bounded_ode_on_Icc hT ht₀ hL + ((cutLorentz_regular_slab hE hB χ.contDiff).of_le (by norm_num)) hbound z₀ + have hX : ∀ t ∈ Icc 0 T, HasDerivWithinAt (fun r => (α r).1) + (velocity (α t).2) (Icc 0 T) t := fun t ht => (hα t ht).fst + have hLip : LipschitzOnWith 1 (fun r => (α r).1) (Icc 0 T) := + (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le hX + (fun t _ => by exact_mod_cast (norm_velocity_lt_one (α t).2).le) + have hone : ∀ t ∈ Icc 0 T, χ (α t).1=1 := by + intro t ht + apply χ.one_of_mem_closedBall + have hdist := hLip.dist_le_mul t ht t₀ ht₀ + simp only [hα₀,NNReal.coe_one,one_mul] at hdist + change dist (α t).1 z₀.1 ≤ T+1 + have hd : dist t t₀ ≤ T := by + rw [Real.dist_eq,abs_le] + constructor <;> linarith [ht.1,ht.2,ht₀.1,ht₀.2] + linarith + refine ⟨α,hα₀,?_⟩ + intro t ht + simpa only [cutLorentz,lorentzField,lorentzPhase,hone t ht,one_smul] using hα t ht + +lemma exists_global_lorentz_flow_on_slab {E B : Field} {T : ℝ} (hT : 0 < T) + (hE : ContDiffOn ℝ 2 E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ 2 B (Icc 0 T ×ˢ (univ : Set Vec))) : + ∃ α : Phase → ℝ → Phase, ∃ A : Phase → ℝ → (Phase →L[ℝ] Phase), + (∀ z, α z 0 = z ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α z) (lorentzField E B (t,α z t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (α · t) (A z t) z) ∧ + (∀ t ∈ Icc 0 T, (A z t).det = 1) ∧ + ∀ t ∈ Ioo 0 T, HasStrictFDerivAt (fun p : ℝ × Phase => α p.2 p.1) + ((ContinuousLinearMap.toSpanSingleton ℝ (lorentzField E B (t,α z t))).coprod (A z t)) (t,z)) ∧ + ∀ t ∈ Icc 0 T, Function.Bijective (α · t) := by + choose β D hβ _ using fun z₀ => exists_finite_lorentz_within_volume_flow hT hE hB z₀ + let α : Phase → ℝ → Phase := fun z => β z z + let A : Phase → ℝ → (Phase →L[ℝ] Phase) := fun z => D z z + have hmem (z : Phase) : z ∈ ball z (1/2 : ℝ) := mem_ball_self (by norm_num) + have hinit (z : Phase) : α z 0 = z := (hβ z z (hmem z)).1 + have hder (z : Phase) : ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α z) (lorentzField E B (t,α z t)) (Icc 0 T) t := (hβ z z (hmem z)).2.1 + have hf : ContDiffOn ℝ 1 (lorentzField E B) (Icc 0 T ×ˢ (univ : Set Phase)) := + contDiffOn_lorentzField_slab (hE.of_le (by norm_num)) (hB.of_le (by norm_num)) + have heq (x y : Phase) (hy : y ∈ ball x (1/2 : ℝ)) : EqOn (α y) (β x y) (Icc 0 T) := + eqOn_of_within_ode hf (hder y) (hβ x y hy).2.1 ⟨le_rfl,hT.le⟩ + ((hinit y).trans (hβ x y hy).1.symm) + refine ⟨α,A,?_,?_⟩ + · intro z + refine ⟨hinit z,hder z,?_,(hβ z z (hmem z)).2.2.2.1,?_⟩ + · intro t ht + apply ((hβ z z (hmem z)).2.2.1 t ht).congr_of_eventuallyEq + filter_upwards [isOpen_ball.mem_nhds (hmem z)] with y hy + exact heq z y hy ht + · intro t ht + have hh := (hβ z z (hmem z)).2.2.2.2 t ht + change HasStrictFDerivAt (fun p : ℝ × Phase => α p.2 p.1) _ (t,z) + apply hh.congr_of_eventuallyEq + filter_upwards [(isOpen_Ioo.prod isOpen_ball).mem_nhds ⟨ht,hmem z⟩] with p hp + exact (heq z p.2 hp.2 (Ioo_subset_Icc_self hp.1)).symm + · intro t ht + constructor + · intro x y he + have hh := eqOn_of_within_ode hf (hder x) (hder y) ht he ⟨le_rfl,hT.le⟩ + simpa only [hinit] using hh + · intro y + obtain ⟨γ,hγ₀,hγ⟩ := exists_lorentz_ode_on_slab hT.le ht hE hB y + refine ⟨γ 0,?_⟩ + exact (eqOn_of_within_ode hf (hder (γ 0)) hγ ⟨le_rfl,hT.le⟩ (hinit (γ 0)) ht).trans hγ₀ + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal +open Set MeasureTheory +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff + +section +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +def timeFlowDerivative (v : E) (A : E →L[ℝ] E) : (ℝ × E) →L[ℝ] (ℝ × E) := + (ContinuousLinearMap.fst ℝ ℝ E).prod + ((ContinuousLinearMap.toSpanSingleton ℝ v).coprod A) + +lemma timeFlowDerivative_det (v : E) (A : E →L[ℝ] E) : + (timeFlowDerivative v A).det = A.det := by + have hh := det_time_triangular (timeFlowDerivative v A).toLinearMap (by apply LinearMap.ext; intro p; rfl) + have he : (LinearMap.snd ℝ ℝ E).comp ((timeFlowDerivative v A).toLinearMap.comp (LinearMap.inr ℝ ℝ E)) = A.toLinearMap := by + ext x + simp [timeFlowDerivative] + rwa [he] at hh + +lemma inverse_timeFlowDerivative {v : E} {A : E →L[ℝ] E} (hA : A.det = 1) : + ∃ e : (ℝ × E) ≃L[ℝ] (ℝ × E), ∃ D : E →L[ℝ] E, + (e : (ℝ × E) →L[ℝ] (ℝ × E)) = timeFlowDerivative v A ∧ D.det = 1 ∧ + (ContinuousLinearMap.snd ℝ ℝ E).comp (e.symm : (ℝ × E) →L[ℝ] (ℝ × E)) = + (ContinuousLinearMap.toSpanSingleton ℝ (-D v)).coprod D := by + have hdet : (timeFlowDerivative v A).toLinearMap.det = 1 := (timeFlowDerivative_det v A).trans hA + have hunit : IsUnit (timeFlowDerivative v A).toLinearMap.det := hdet.symm ▸ isUnit_one + let e : (ℝ × E) ≃L[ℝ] (ℝ × E) := (LinearMap.equivOfIsUnitDet hunit).toContinuousLinearEquiv + have he : (e : (ℝ × E) →L[ℝ] (ℝ × E)) = timeFlowDerivative v A := by + apply ContinuousLinearMap.ext + intro z + exact LinearMap.congr_fun (LinearMap.coe_equivOfIsUnitDet hunit) z + have happ (z : ℝ × E) : e z = (z.1,z.1 • v+A z.2) := by + rw [← ContinuousLinearEquiv.coe_coe,he] + rfl + have hfst (z : ℝ × E) : (e.symm z).1 = z.1 := by + have hh := congrArg Prod.fst (e.apply_symm_apply z) + simpa only [happ] using hh + let D : E →L[ℝ] E := (ContinuousLinearMap.snd ℝ ℝ E).comp + ((e.symm : (ℝ × E) →L[ℝ] (ℝ × E)).comp (ContinuousLinearMap.inr ℝ ℝ E)) + have hD : D.det = 1 := by + have hh := det_time_triangular (e.symm : (ℝ × E) →L[ℝ] (ℝ × E)).toLinearMap (by apply LinearMap.ext; intro z; exact hfst z) + change (e.symm : (ℝ × E) →L[ℝ] (ℝ × E)).det = D.det at hh + rw [ContinuousLinearEquiv.det_coe_symm,he,timeFlowDerivative_det,hA,inv_one] at hh + exact hh.symm + have hi : e.symm (1,v) = (1,0) := by + apply e.injective + simp only [e.apply_symm_apply,happ,one_smul,map_zero,add_zero] + refine ⟨e,D,he,hD,?_⟩ + apply ContinuousLinearMap.ext + intro p + change (e.symm p).2 = p.1 • (-D v)+D p.2 + have hp : p = p.1 • (1,v)+(0,p.2-p.1 • v) := by + ext <;> simp + calc + (e.symm p).2 = (e.symm (p.1 • (1,v)+(0,p.2-p.1 • v))).2 := congrArg (fun z => (e.symm z).2) hp + _ = D (p.2-p.1 • v) := by + rw [map_add,map_smul,hi] + change p.1 • (0 : E)+(e.symm (0,p.2-p.1 • v)).2 = D (p.2-p.1 • v) + rw [smul_zero,zero_add] + rfl + _ = p.1 • (-D v)+D p.2 := by simp only [map_sub,map_smul,smul_neg]; abel + +omit [FiniteDimensional ℝ E] in + +def inversePhase (α : E → ℝ → E) (z : ℝ × E) : E := Function.invFun (α · z.1) z.2 + +lemma hasStrictFDerivAt_inversePhase {α : E → ℝ → E} {v x : E} {A : E →L[ℝ] E} {T t : ℝ} + (hbij : ∀ s ∈ Ioo 0 T, Function.Bijective (α · s)) (ht : t ∈ Ioo 0 T) + (hA : A.det = 1) + (hα : HasStrictFDerivAt (fun z : ℝ × E => α z.2 z.1) + ((ContinuousLinearMap.toSpanSingleton ℝ v).coprod A) (t,x)) : + ∃ D : E →L[ℝ] E, D.det = 1 ∧ + HasStrictFDerivAt (inversePhase α) + ((ContinuousLinearMap.toSpanSingleton ℝ (-D v)).coprod D) (t,α x t) := by + obtain ⟨e,D,he,hD,hder⟩ := inverse_timeFlowDerivative hA + let Φ : ℝ × E → ℝ × E := fun z => (z.1,α z.2 z.1) + have hΦ : HasStrictFDerivAt Φ (e : (ℝ × E) →L[ℝ] (ℝ × E)) (t,x) := by + rw [he] + exact hasStrictFDerivAt_fst.prodMk hα + let Z := hΦ.localInverse Φ e (t,x) + have hZ : HasStrictFDerivAt Z (e.symm : (ℝ × E) →L[ℝ] (ℝ × E)) (t,α x t) := hΦ.to_localInverse + have hEq : (fun z => (Z z).2) =ᶠ[𝓝 (t,α x t)] inversePhase α := by + have htime : ∀ᶠ z : ℝ × E in 𝓝 (t,α x t), z.1 ∈ Ioo 0 T := + continuous_fst.continuousAt.eventually (isOpen_Ioo.mem_nhds ht) + filter_upwards [hΦ.eventually_right_inverse,htime] with z hz hzt + have hf : (Z z).1 = z.1 := by + have hh := congrArg Prod.fst hz + exact hh + have hy : α (Z z).2 z.1 = z.2 := by + have hh := congrArg Prod.snd hz + change α (Z z).2 (Z z).1 = z.2 at hh + rwa [hf] at hh + apply (hbij z.1 hzt).1 + exact hy.trans (Function.invFun_eq ((hbij z.1 hzt).2 z.2)).symm + refine ⟨D,hD,?_⟩ + rw [← hder] + exact hZ.snd.congr_of_eventuallyEq hEq + +lemma determinant_retarded_graph {D : E →L[ℝ] E} (hD : D.det = 1) (v : E) (ℓ : E →L[ℝ] ℝ) : + (D.comp ((ContinuousLinearMap.id ℝ E) - (ContinuousLinearMap.toSpanSingleton ℝ v).comp ℓ)).det = + 1 - ℓ v := by + have he : (((ContinuousLinearMap.id ℝ E) - (ContinuousLinearMap.toSpanSingleton ℝ v).comp ℓ) : E →L[ℝ] E).toLinearMap = + LinearMap.transvection ℓ.toLinearMap (-v) := by + ext x + simp [LinearMap.transvection,sub_eq_add_neg] + change LinearMap.det (D.toLinearMap.comp _) = _ + rw [LinearMap.det_comp,he] + change D.det * _ = _ + rw [hD,one_mul,LinearMap.transvection.det,map_neg] + rfl + +end + +open Set MeasureTheory Filter +open scoped Topology ContDiff + + +lemma hasStrictFDerivAt_norm_nonzero {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] + {x : F} (hx : x ≠ 0) : + HasStrictFDerivAt (fun y : F => ‖y‖) (innerSL ℝ (‖x‖⁻¹ • x)) x := by + have hn : ‖x‖ ≠ 0 := norm_ne_zero_iff.mpr hx + have hh := (Real.hasStrictDerivAt_sqrt (pow_ne_zero 2 hn)).comp_hasStrictFDerivAt x + (hasStrictFDerivAt_norm_sq x) + have hf : (Real.sqrt ∘ fun y : F => ‖y‖^2) = fun y : F => ‖y‖ := by + funext y + exact Real.sqrt_sq (norm_nonneg y) + rw [hf,Real.sqrt_sq (norm_nonneg x)] at hh + convert! hh using 1 + apply ContinuousLinearMap.ext + intro y + simp only [smul_apply,innerSL_apply_apply,inner_smul_left, + starRingEnd_apply,star_trivial,smul_eq_mul,two_smul,add_apply] + ring + +def coneCovector (x y : Vec) : Phase →L[ℝ] ℝ := + (innerSL ℝ (‖x-y‖⁻¹ • (x-y))).comp (ContinuousLinearMap.fst ℝ Vec Vec) + +lemma coneCovector_apply (x y : Vec) (z : Phase) : + coneCovector x y z = dot (‖x-y‖⁻¹ • (x-y)) z.1 := by + rw [dot_eq_inner] + rfl + +lemma hasStrictFDerivAt_retarded_time (t : ℝ) (x : Vec) {z : Phase} (hx : x ≠ z.1) : + HasStrictFDerivAt (fun y : Phase => t-‖x-y.1‖) (coneCovector x z.1) z := by + have hn := (hasStrictFDerivAt_norm_nonzero (sub_ne_zero.mpr hx)).comp z + ((hasStrictFDerivAt_const x z).sub hasStrictFDerivAt_fst) + have hh := (hasStrictFDerivAt_const t z).sub hn + convert! hh using 1 + apply ContinuousLinearMap.ext + intro y + simp [coneCovector] + +lemma norm_coneDirection {x y : Vec} (hxy : x ≠ y) : ‖‖x-y‖⁻¹ • (x-y)‖ = 1 := by + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_of_nonneg (norm_nonneg _),inv_mul_cancel₀] + exact norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + +lemma cone_deficit_positive {x y : Vec} (hxy : x ≠ y) (v : Vec) : + 0 < 1 - dot (‖x-y‖⁻¹ • (x-y)) (velocity v) := by + have hh := real_inner_le_norm (‖x-y‖⁻¹ • (x-y)) (velocity v) + rw [norm_coneDirection hxy,one_mul,← dot_eq_inner] at hh + linarith [norm_velocity_lt_one v] + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff + + +section HaarFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] + +lemma measurePreserving_of_bijective_det_one {f : E → E} {f' : E → (E →L[ℝ] E)} + (μ : Measure E) [μ.IsAddHaarMeasure] (hf : ∀ x, HasFDerivAt f (f' x) x) + (hbij : Function.Bijective f) (hdet : ∀ x, (f' x).det = 1) : + MeasurePreserving f μ μ := by + have hc : Continuous f := continuous_iff_continuousAt.mpr (fun x => (hf x).continuousAt) + refine ⟨hc.measurable,?_⟩ + have hh := map_withDensity_abs_det_fderiv_eq_addHaar μ (s := univ) + MeasurableSet.univ.nullMeasurableSet (fun x _ => (hf x).hasFDerivWithinAt) hbij.1.injOn + simp only [Measure.restrict_univ,hdet,abs_one,ENNReal.ofReal_one, + Set.image_univ,hbij.2.range_eq] at hh + change Measure.map f (μ.withDensity 1) = μ at hh + simpa only [withDensity_one] using hh + +lemma integral_eq_integral_comp_of_bijective_det_one {f : E → E} {f' : E → (E →L[ℝ] E)} + (μ : Measure E) [μ.IsAddHaarMeasure] (hf : ∀ x, HasFDerivAt f (f' x) x) + (hbij : Function.Bijective f) (hdet : ∀ x, (f' x).det = 1) + {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] (g : E → F) : + ∫ x, g x ∂μ = ∫ x, g (f x) ∂μ := by + have hh := integral_image_eq_integral_abs_det_fderiv_smul μ (s := univ) MeasurableSet.univ + (fun x _ => (hf x).hasFDerivWithinAt) hbij.1.injOn g + simpa only [Set.image_univ,hbij.2.range_eq,setIntegral_univ,hdet,abs_one,one_smul] using hh +end HaarFlow + +structure PhaseFlowOn (E B : Field) (T : ℝ) where + flow : Phase → ℝ → Phase + differential : Phase → ℝ → (Phase →L[ℝ] Phase) + initial : ∀ z, flow z 0 = z + ode : ∀ z t, t ∈ Icc 0 T → + HasDerivWithinAt (flow z) (lorentzField E B (t,flow z t)) (Icc 0 T) t + label : ∀ z t, t ∈ Icc 0 T → HasFDerivAt (flow · t) (differential z t) z + det_one : ∀ z t, t ∈ Icc 0 T → (differential z t).det=1 + joint : ∀ z t, t ∈ Ioo 0 T → HasStrictFDerivAt (fun p : ℝ × Phase => flow p.2 p.1) + ((ContinuousLinearMap.toSpanSingleton ℝ (lorentzField E B (t,flow z t))).coprod + (differential z t)) (t,z) + bijective : ∀ t, t ∈ Icc 0 T → Function.Bijective (flow · t) + +lemma exists_phaseFlowOn {E B : Field} {T : ℝ} (hT : 0 < T) + (hE : ContDiffOn ℝ 2 E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContDiffOn ℝ 2 B (Icc 0 T ×ˢ (univ : Set Vec))) : + Nonempty (PhaseFlowOn E B T) := by + obtain ⟨α,A,hα,hbij⟩ := exists_global_lorentz_flow_on_slab hT hE hB + exact ⟨⟨α,A,fun z => (hα z).1,fun z => (hα z).2.1,fun z => (hα z).2.2.1, + fun z => (hα z).2.2.2.1,fun z => (hα z).2.2.2.2,hbij⟩⟩ + +instance phaseVolume_isAddHaarMeasure : (volume : Measure Phase).IsAddHaarMeasure := by + change (volume.prod volume : Measure Phase).IsAddHaarMeasure + infer_instance + +lemma PhaseFlowOn.measurePreserving {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) : MeasurePreserving (F.flow · t) := + measurePreserving_of_bijective_det_one volume (fun z => F.label z t ht) + (F.bijective t ht) (fun z => F.det_one z t ht) + +lemma PhaseFlowOn.integral_comp {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] (g : Phase → G) : + ∫ z, g (F.flow z t) = ∫ z, g z := + (integral_eq_integral_comp_of_bijective_det_one volume (fun z => F.label z t ht) + (F.bijective t ht) (fun z => F.det_one z t ht) g).symm + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + + +lemma PhaseFlowOn.continuousOn_time {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (z : Phase) : ContinuousOn (F.flow z) (Icc 0 T) := + fun t ht => (F.ode z t ht).continuousWithinAt + +lemma PhaseFlowOn.timelike {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (z : Phase) : + ∃ c : ℝ≥0, (c : ℝ) < 1 ∧ LipschitzOnWith c (fun t => (F.flow z t).1) (Icc 0 T) := by + have hc : ContinuousOn (fun t => ‖velocity (F.flow z t).2‖) (Icc 0 T) := + ((contDiff_velocity (k := 1)).continuous.comp_continuousOn (F.continuousOn_time z).snd).norm + obtain ⟨t₀,ht₀,hmax⟩ := isCompact_Icc.exists_isMaxOn (nonempty_Icc.mpr hT) hc + refine ⟨⟨‖velocity (F.flow z t₀).2‖,norm_nonneg _⟩,norm_velocity_lt_one _,?_⟩ + apply (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun t ht => (F.ode z t ht).fst) + intro t ht + exact_mod_cast hmax ht + +lemma PhaseFlowOn.emission_strictMono {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (z : Phase) (x : Vec) : + StrictMonoOn (fun s => s+‖x-(F.flow z s).1‖) (Icc 0 T) := by + obtain ⟨c,hc,hLip⟩ := F.timelike hT z + intro a ha b hb hab + have hbound := hLip.dist_le_mul a ha b hb + rw [dist_eq_norm,Real.dist_eq,abs_of_neg (sub_neg.mpr hab)] at hbound + have hn : ‖x-(F.flow z a).1‖ ≤ ‖(F.flow z a).1-(F.flow z b).1‖ + ‖x-(F.flow z b).1‖ := by + calc + _ = ‖((F.flow z b).1-(F.flow z a).1)+(x-(F.flow z b).1)‖ := by congr 1; abel + _ ≤ ‖(F.flow z b).1-(F.flow z a).1‖ + ‖x-(F.flow z b).1‖ := norm_add_le _ _ + _ = _ := by rw [norm_sub_rev] + have hp := mul_pos (sub_pos.mpr hc) (sub_pos.mpr hab) + nlinarith + +lemma PhaseFlowOn.inversePhase_flow {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) : inversePhase F.flow (s,F.flow z s) = z := + Function.leftInverse_invFun (F.bijective s hs).1 z + +lemma PhaseFlowOn.flow_inversePhase {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) : F.flow (inversePhase F.flow (s,z)) s = z := + Function.invFun_eq ((F.bijective s hs).2 z) + +lemma PhaseFlowOn.tip_null {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) : volume {z : Phase | (F.flow z t).1=x} = 0 := by + have hz : (volume : Measure Phase) ({x} ×ˢ univ) = 0 := by + change (volume.prod volume) ({x} ×ˢ (univ : Set Vec)) = 0 + rw [Measure.prod_prod,measure_singleton,zero_mul] + have he : (F.flow · t) ⁻¹' ({x} ×ˢ univ) = {z : Phase | (F.flow z t).1=x} := by + ext z + simp + rw [← he] + exact (F.measurePreserving ht).preimage_null hz + +open Set MeasureTheory Filter +open scoped Topology ContDiff + + +def retardedLabel (α : Phase → ℝ → Phase) (t : ℝ) (x : Vec) (z : Phase) : Phase := + inversePhase α (t-‖x-z.1‖,z) + +lemma PhaseFlowOn.inverse_differential {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Ioo 0 T) (z : Phase) : + ∃ D : Phase →L[ℝ] Phase, D.det=1 ∧ + HasStrictFDerivAt (inversePhase F.flow) + ((ContinuousLinearMap.toSpanSingleton ℝ (-D (lorentzField E B (s,z)))).coprod D) (s,z) := by + let y := Function.invFun (F.flow · s) z + have hy : F.flow y s=z := Function.invFun_eq ((F.bijective s (Ioo_subset_Icc_self hs)).2 z) + have hh := hasStrictFDerivAt_inversePhase + (fun r hr => F.bijective r (Ioo_subset_Icc_self hr)) hs + (F.det_one y s (Ioo_subset_Icc_self hs)) (F.joint y s hs) + simpa only [hy] using hh + +lemma PhaseFlowOn.retarded_differential {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (x : Vec) (z : Phase) (hs : t-‖x-z.1‖ ∈ Ioo 0 T) (hx : x ≠ z.1) : + ∃ D : Phase →L[ℝ] Phase, D.det=1 ∧ + HasStrictFDerivAt (retardedLabel F.flow t x) + (D.comp ((ContinuousLinearMap.id ℝ Phase) - + (ContinuousLinearMap.toSpanSingleton ℝ (lorentzField E B (t-‖x-z.1‖,z))).comp + (coneCovector x z.1))) z := by + obtain ⟨D,hD,hi⟩ := F.inverse_differential hs z + have hg := (hasStrictFDerivAt_retarded_time t x hx).prodMk (hasStrictFDerivAt_id z) + have hh := HasStrictFDerivAt.comp (f := fun y : Phase => (t-‖x-y.1‖,y)) z hi hg + refine ⟨D,hD,?_⟩ + convert! hh using 1 + apply ContinuousLinearMap.ext + intro y + simp [map_smul,sub_eq_add_neg,add_comm] + +lemma PhaseFlowOn.retarded_jacobian {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (x : Vec) (z : Phase) (hs : t-‖x-z.1‖ ∈ Ioo 0 T) (hx : x ≠ z.1) : + (fderiv ℝ (retardedLabel F.flow t x) z).det = + 1-dot (‖x-z.1‖⁻¹ • (x-z.1)) (velocity z.2) := by + obtain ⟨D,hD,hd⟩ := F.retarded_differential x z hs hx + rw [hd.hasFDerivAt.fderiv,determinant_retarded_graph hD,coneCovector_apply] + rfl + +lemma PhaseFlowOn.retarded_jacobian_pos {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (x : Vec) (z : Phase) (hs : t-‖x-z.1‖ ∈ Ioo 0 T) (hx : x ≠ z.1) : + 0 < (fderiv ℝ (retardedLabel F.flow t x) z).det := by + rw [F.retarded_jacobian x z hs hx] + exact cone_deficit_positive hx z.2 + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualCutoffCoordinates.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualCutoffCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d535c56e2c1715e92d3eb02b41e6c60f273354f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualCutoffCoordinates.lean @@ -0,0 +1,161 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.BinHits +import OAI.Analysis.VlasovMaxwell.Population.ContDiffDyadicMultiFactor + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma receiver_cutoff_logarithmic_rate (v w K n : Vec) (hn : ‖n‖=1) : + let d := 1-dot n (velocity v) + let D := 1-dot n (velocity w) + let θ := Real.sqrt (d/2) + let φ := Real.sqrt (D/2) + |dot n (fderiv ℝ velocity w K)*(d/D)/(2*D)| ≤ + θ^2*‖K‖/(q w*φ^3) := by + let d := 1-dot n (velocity v) + let D := 1-dot n (velocity w) + let θ := Real.sqrt (d/2) + let φ := Real.sqrt (D/2) + have hd : 0actualCutoffCoordinates F.flow T zX zY r i) σ := by + let τ := branchTime F.flow zX zY T + have ht := F.branch_time_mem zX zY hσ hne + have hτ : ContDiffAt ℝ 1 τ σ := (F.branch_differential zX zY hσ hne).1 + have hX : ContDiffAt ℝ 1 (fun r=>F.flow zX (τ r)) σ := + ((F.flow_contDiffOn hs zX).contDiffAt (isOpen_Ioo.mem_nhds ⟨hσ.1.1.trans ht.1,ht.2⟩)).comp σ hτ + have hY := (F.flow_contDiffOn hs zY).contDiffAt (isOpen_Ioo.mem_nhds hσ.1) + have hr : ContDiffAt ℝ 1 (fun r=>τ r-r) σ := hτ.sub contDiffAt_id + have hn : ContDiffAt ℝ 1 (branchDirection F.flow zX zY T) σ := + (hr.inv (sub_pos.mpr ht.1).ne').smul (hX.fst.sub hY.fst) + have hunit := F.branchDirection_norm zX zY hσ hne + have hu := (contDiff_velocity (k:=1)).contDiffAt.comp σ hY.snd + have ha := (contDiff_velocity (k:=1)).contDiffAt.comp σ hX.snd + have hd := (contDiffAt_const (c:=(1:ℝ))).sub ((contDiff_dot_pair (k:=1)).contDiffAt.comp σ (hn.prodMk hu)) + have hD := (contDiffAt_const (c:=(1:ℝ))).sub ((contDiff_dot_pair (k:=1)).contDiffAt.comp σ (hn.prodMk ha)) + intro i + fin_cases i <;> simp only [actualCutoffCoordinates,physicalCutoffCoordinates] + · exact contDiffAt_const.div ((contDiff_q (k:=1)).contDiffAt.comp σ hY.snd) (q_pos _).ne' + · exact (hd.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hunit) (by norm_num)).ne' + · exact (hD.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hunit) (by norm_num)).ne' + · exact hr.div_const _ + +lemma PhaseFlowOn.actual_selectedCutoff_contDiffAt {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) (Q : Set (Fin 4→ℕ)) : + ContDiffAt ℝ 1 (fun r=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY r)) σ := + contDiffAt_selectedDyadicCutoff_curve (by simp) + (F.actualCutoffCoordinates_contDiffAt hs zX zY hσ hne) + (F.actualCutoffCoordinates_pos zX zY hσ hne) Q + +lemma PhaseFlowOn.actual_selectedCutoff_absoluteContinuous {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c,(F.flow zX r).1≠(F.flow zY r).1) (Q : Set (Fin 4→ℕ)) : + AbsolutelyContinuousOnInterval + (fun r=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY r)) b c := by + apply ContDiffOn.absolutelyContinuousOnInterval + intro r hr + exact (F.actual_selectedCutoff_contDiffAt hs zX zY (hS hr) (hne r hr) Q).contDiffWithinAt + +lemma PhaseFlowOn.actual_selected_weighted_identity {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c,(F.flow zX r).1≠(F.flow zY r).1) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {W W' : ℝ→Vec→L[ℝ]Vec} + (hψ : AbsolutelyContinuousOnInterval ψ b c) + (hW : ContDiffOn ℝ 1 W (uIcc b c)) (hW' : ContinuousOn W' (uIcc b c)) + (hWd : ∀ r∈uIoo b c,HasDerivAt W (W' r) r) : + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY σ) + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in b..c,(ψ σ*χ σ) • W σ (signedForceKernel (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zY σ)) = + (ψ b*χ b) • W b (retardedPrimitive (r b) (a b) (u b) (n b)) - + (ψ c*χ c) • W c (retardedPrimitive (r c) (a c) (u c) (n c)) + + ∫ σ in b..c,deriv (fun ξ=>ψ ξ*χ ξ) σ • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + (ψ σ*χ σ) • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + exact F.actual_weighted_signed_identity hs zX zY hS hne + (hψ.mul (F.actual_selectedCutoff_absoluteContinuous hs zX zY hS hne Q)) hW hW' hWd + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualLabelCutoffCost.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualLabelCutoffCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..5973b67792680190cb14cd35d3a0737af91fb3ad --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ActualLabelCutoffCost.lean @@ -0,0 +1,182 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.CutoffRateMajorant + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def actualLabelCutoffCost (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (p : ℝ×Phase) : Vec := + (jointBranchDomain α zX T).indicator + (fun p=>branchSelectedRate s.E s.B α T zX p.2 Q p.1) p • actualLabelPrimitive s α zX T p + +lemma PhaseFlowOn.actualLabelCutoffCost_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + Measurable (actualLabelCutoffCost s F.flow zX T Q) := + (F.branchSelectedRate_measurable hs zX Q).smul (F.actualLabelPrimitive_measurable hs zX) + +lemma PhaseFlowOn.actualLabelCutoffCost_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + Integrable (actualLabelCutoffCost s F.flow zX T Q) := by + classical + obtain ⟨C,hC,hcb⟩ := dyadicFactor_log_derivative_bound + let A := normalisedCutoffPrimitive s F.flow zX (5^4*C) + have hA := F.normalisedCutoffPrimitive_continuousOn hs zX (5^4*C) + apply (F.labelConeKernel_integrable hs zX hA).norm.mono' + (F.actualLabelCutoffCost_measurable hs zX Q).aestronglyMeasurable + apply Filter.Eventually.of_forall + intro p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hj : p∈jointBranchDomain F.flow zX T := hp + have hr : 0branchTime α zX p.2 T p.1) + +lemma PhaseFlowOn.labelReceiverTime_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : Measurable (labelReceiverTime F.flow zX T) := by + classical + apply ContinuousOn.measurable_piecewise _ continuousOn_const (F.isOpen_jointBranchDomain zX).measurableSet + intro p hp + exact (F.joint_branch_continuousAt zX hp).continuousWithinAt + +lemma PhaseFlowOn.labelReceiverTime_mem {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) (p : ℝ×Phase) : + labelReceiverTime F.flow zX T p∈Icc 0 T := by + classical + by_cases hp : p∈labelBranchDomain F.flow zX T + · rw [labelReceiverTime,indicator_of_mem hp] + have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + exact ⟨(hp.1.1.1.trans ht.1).le,ht.2.le⟩ + · simp only [labelReceiverTime,indicator_of_notMem hp,mem_Icc,le_refl,hT,and_self] + +def labelSelectedCutoff (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) : ℝ×Phase→ℝ := + (jointBranchDomain α zX T).indicator + (fun p=>selectedDyadicCutoff Q (actualCutoffCoordinates α T zX p.2 p.1)) + +lemma PhaseFlowOn.labelSelectedCutoff_bound {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) (p : ℝ×Phase) : + |labelSelectedCutoff F.flow zX T Q p|≤1 := by + classical + by_cases hp : p∈jointBranchDomain F.flow zX T + · rw [labelSelectedCutoff,indicator_of_mem hp] + have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hn := F.branchDirection_norm zX p.2 hp.1 hp.2 + have hm : selectedDyadicCutoff Q + (actualCutoffCoordinates F.flow T zX p.2 p.1)∈Icc (0:ℝ) 1 := by + apply selectedDyadicCutoff_mem_unit + · exact physicalCutoffCoordinates_pos hn (sub_pos.mpr ht.1) + · exact physicalCutoffCoordinates_le_one hn + (by linarith [le_max_right (1:ℝ) T,hp.1.1.1]) + exact (abs_of_nonneg hm.1).le.trans hm.2 + · simp only [labelSelectedCutoff,indicator_of_notMem hp,abs_zero,zero_le_one] + +def actualLabelRatePrimitive (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (p : ℝ×Phase) : Vec := + branchRate α zX p.2 T p.1 • actualLabelPrimitive s α zX T p + +def normalisedRatePrimitive (α : Phase→ℝ→Phase) (zX : Phase) (p : ConeKernelState) : Vec := + ((1-dot p.2.1 (velocity p.2.2.2))/(1-dot p.2.1 (velocity (α zX p.1.1).2))) • + normalisedPrimitive (p.1.1-p.1.2) (velocity (α zX p.1.1).2) (velocity p.2.2.2) p.2.1 + +lemma PhaseFlowOn.normalisedRatePrimitive_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + ContinuousOn (normalisedRatePrimitive F.flow zX) (coneKernelDomain T) := by + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + have hn : Continuous (fun p : ConeKernelState=>p.2.1) := continuous_snd.fst + have hD : ∀p∈coneKernelDomain T,1-dot p.2.1 (velocity (F.flow zX p.1.1).2)≠0 := fun p hp=> + (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + have hr : ContinuousOn (fun p : ConeKernelState=>(1-dot p.2.1 (velocity p.2.2.2))/ + (1-dot p.2.1 (velocity (F.flow zX p.1.1).2))) (coneKernelDomain T) := by + simp only [dot_eq_inner] + exact (continuousOn_const.sub (hn.continuousOn.inner hu.continuousOn)).div + (continuousOn_const.sub (hn.continuousOn.inner ha)) + (fun p hp=>by simpa only [dot_eq_inner] using hD p hp) + refine hr.smul (continuousOn_normalisedPrimitive + (continuous_fst.fst.sub continuous_fst.snd).continuousOn ha hu.continuousOn hn.continuousOn ?_ hD) + intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + +lemma PhaseFlowOn.actualLabelRatePrimitive_eq {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (s : Solution) (zX : Phase) : + actualLabelRatePrimitive s F.flow zX T = + labelConeKernel s F.flow zX T (normalisedRatePrimitive F.flow zX) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hr : branchTime F.flow zX p.2 T p.1-p.1≠0 := + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1).ne' + rw [actualLabelRatePrimitive,actualLabelPrimitive,indicator_of_mem hp,labelConeKernel,indicator_of_mem hp] + simp only [normalisedRatePrimitive,labelKernelState,normalisedPrimitive_eq _ _ _ hr] + simp only [branchRate,smul_smul] + congr 1 + simp only [branchDirection] + field_simp + · simp only [actualLabelRatePrimitive,actualLabelPrimitive,labelConeKernel,indicator_of_notMem hp,smul_zero] + +lemma PhaseFlowOn.actualLabelRatePrimitive_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Integrable (actualLabelRatePrimitive s F.flow zX T) := by + rw [F.actualLabelRatePrimitive_eq s zX] + exact F.labelConeKernel_integrable hs zX (F.normalisedRatePrimitive_continuousOn zX) + +lemma PhaseFlowOn.actualLabelRatePrimitive_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Measurable (actualLabelRatePrimitive s F.flow zX T) := by + rw [F.actualLabelRatePrimitive_eq s zX] + exact F.measurable_labelConeKernel hs zX (F.normalisedRatePrimitive_continuousOn zX) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ArrivalDomain.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ArrivalDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..b434542a1fb2767a21b39c0e2a70f358ac274828 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ArrivalDomain.lean @@ -0,0 +1,251 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.SpaceConeDomain + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM +namespace EnergyPrefix + +lemma mono {s : Solution} {T U : ℝ} (hs : EnergyPrefix s T) (hU : U ≤ T) : + EnergyPrefix s U := by + have hc : Icc (0 : ℝ) U ⊆ Icc 0 T := Icc_subset_Icc_right hU + have ho : Ioo (0 : ℝ) U ⊆ Ioo 0 T := Ioo_subset_Ioo_right hU + refine ⟨hs.f_smooth.mono (prod_mono hc Subset.rfl), + hs.E_smooth.mono (prod_mono hc Subset.rfl), + hs.B_smooth.mono (prod_mono hc Subset.rfl), + fun t ht => hs.nonnegative t (hc ht),?_,?_,?_, + fun t ht => hs.vlasov t (ho ht),fun t ht => hs.maxwell t (ho ht)⟩ + · obtain ⟨F,hF,hrep⟩ := hs.E_L2 + exact ⟨F,hF.mono hc,fun t ht => hrep t (hc ht)⟩ + · obtain ⟨F,hF,hrep⟩ := hs.B_L2 + exact ⟨F,hF.mono hc,fun t ht => hrep t (hc ht)⟩ + · obtain ⟨K,hK,hrep⟩ := hs.compact + exact ⟨K,hK,fun t ht => hrep t (hc ht)⟩ + +lemma weighted_phase_integrable {s : Solution} {T t : ℝ} (hs : EnergyPrefix s T) + (ht : t ∈ Icc 0 T) : Integrable (fun z : Phase => q z.2 * s.f (t,z)) := by + have hfc : Continuous (fun z : Phase => s.f (t,z)) := + hs.f_smooth.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + (fun _ => ⟨ht,mem_univ _⟩) + have hc : Continuous (fun z : Phase => q z.2 * s.f (t,z)) := + ((contDiff_q (k := 1)).continuous.comp continuous_snd).mul hfc + obtain ⟨K,hK,hKs⟩ := hs.compact + apply hc.integrable_of_hasCompactSupport + apply hK.of_isClosed_subset (isClosed_tsupport _) + apply closure_minimal _ hK.isClosed + intro z hz + by_contra hnot + apply hz + have hz := hnot + have hf : s.f (t,z)=0 := by + by_contra hn + exact hz (hKs t ht (subset_tsupport _ hn)) + change q z.2 * s.f (t,z)=0 + rw [hf,mul_zero] + +lemma phase_energy_lintegral {s : Solution} {T t : ℝ} (hs : EnergyPrefix s T) + (ht : t ∈ Icc 0 T) : + (∫⁻ z : Phase, ENNReal.ofReal (q z.2 * s.f (t,z))) = + ENNReal.ofReal (∫ x : Vec, particleEnergy s (t,x)) := by + have hi := hs.weighted_phase_integrable ht + rw [← ofReal_integral_eq_lintegral_ofReal hi + (ae_of_all _ (fun z => mul_nonneg (q_pos z.2).le (hs.nonnegative t ht z)))] + congr 1 + exact integral_prod _ hi + +lemma phase_energy_bound {s : Solution} {T t : ℝ} (hs : EnergyPrefix s T) + (ht : t ∈ Icc 0 T) : + (∫⁻ z : Phase, ENNReal.ofReal (q z.2 * s.f (t,z))) ≤ + ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + rw [hs.phase_energy_lintegral ht] + apply ENNReal.ofReal_le_ofReal + rw [← (hs.mono ht.2).energy_conservation ht.1] + apply integral_mono (hs.particle_energy_integrable ht) (hs.total_energy_integrable ht) + intro x + change particleEnergy s (t,x) ≤ (‖s.E (t,x)‖^2+‖s.B (t,x)‖^2)/2+particleEnergy s (t,x) + nlinarith [sq_nonneg ‖s.E (t,x)‖,sq_nonneg ‖s.B (t,x)‖] +end EnergyPrefix + +lemma PhaseFlowOn.cone_occupation_energy_bound {s : Solution} {T p a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hT : 0 ≤ T) (hs : EnergyPrefix s T) + (zX : Phase) {H : Set (ℝ × Phase)} (hH : MeasurableSet H) + (hsub : H ⊆ spaceConeDomain F.flow zX T) (hp : 0 ≤ p) + (htime : ∀ t z, (t,z) ∈ H → t ∈ Icc a b) + (hmom : ∀ t z, (t,z) ∈ H → p ≤ q z.2) : + ENNReal.ofReal p * coneOccupation F.flow zX T s.f H ≤ + ENNReal.ofReal (b-a) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + rw [F.cone_occupation_identity hT zX hs.f_smooth hs.vlasov hH hsub, + ← F.phase_occupation_identity hT hs.f_smooth hs.vlasov hH, + ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + let C := ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) + have hpoint (t : ℝ) (ht : t ∈ Ioo 0 T) : + ENNReal.ofReal p * (∫⁻ z : Phase, H.indicator (fun x => ENNReal.ofReal (s.f x)) (t,z)) ≤ + (Icc a b).indicator (fun _ => C) t := by + by_cases hti : t ∈ Icc a b + · rw [Set.indicator_of_mem hti,← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply le_trans (lintegral_mono (fun z => ?_)) (hs.phase_energy_bound (Ioo_subset_Icc_self ht)) + by_cases hz : (t,z) ∈ H + · rw [Set.indicator_of_mem hz,← ENNReal.ofReal_mul hp] + exact ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right + (hmom t z hz) (hs.nonnegative t (Ioo_subset_Icc_self ht) z)) + · rw [Set.indicator_of_notMem hz,mul_zero] + exact bot_le + · rw [Set.indicator_of_notMem hti] + have hz : (∫⁻ z : Phase, H.indicator (fun x => ENNReal.ofReal (s.f x)) (t,z))=0 := by + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro z + exact Set.indicator_of_notMem (fun he => hti (htime t z he)) _ + rw [hz,mul_zero] + calc + _ ≤ ∫⁻ t in Ioo (0 : ℝ) T, (Icc a b).indicator (fun _ => C) t := + lintegral_mono_ae (ae_restrict_of_forall_mem measurableSet_Ioo hpoint) + _ ≤ ∫⁻ t : ℝ, (Icc a b).indicator (fun _ => C) t := lintegral_mono' Measure.restrict_le_self (fun _ => le_rfl) + _ = _ := by rw [lintegral_indicator measurableSet_Icc,lintegral_const,Measure.restrict_apply_univ,Real.volume_Icc]; exact mul_comm _ _ +end RVM +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def arrivalDomain (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) : Set (ℝ × Vec) := + {p | p.1 ∈ Ioo 0 T ∧ p.1+‖(α zX T).1-p.2‖ (q.1,(q.2,0))) + (continuousAt_fst.prodMk (continuousAt_snd.prodMk continuousAt_const))) + +lemma PhaseFlowOn.isOpen_arrivalDomain {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) : IsOpen (arrivalDomain F.flow zX T) := by + apply isOpen_iff_mem_nhds.mpr + intro p hp + have hX : ContinuousAt (fun q : ℝ × Vec => (F.flow zX q.1).1) p := + (((F.continuousOn_time zX).fst.continuousAt (Icc_mem_nhds hp.1.1 hp.1.2)).comp + continuousAt_fst) + have ht : ∀ᶠ q : ℝ × Vec in 𝓝 p, q.1 ∈ Ioo 0 T := + continuousAt_fst.eventually (isOpen_Ioo.mem_nhds hp.1) + have hd : ContinuousAt (fun q : ℝ × Vec => q.1+‖(F.flow zX T).1-q.2‖) p := + continuousAt_fst.add (continuousAt_const.sub continuousAt_snd).norm + have hb := hd.eventually (isOpen_Iio.mem_nhds hp.2.1) + have hn := (hX.sub continuousAt_snd).eventually + (isOpen_compl_singleton.mem_nhds (sub_ne_zero.mpr hp.2.2)) + filter_upwards [ht,hb,hn] with q hq hqt hqn + exact ⟨hq,hqt,sub_ne_zero.mp hqn⟩ + +lemma PhaseFlowOn.arrival_time_spec {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + arrivalTime F.flow zX T p ∈ Ioo p.1 T ∧ + arrivalTime F.flow zX T p-p.1=‖(F.flow zX (arrivalTime F.flow zX T p)).1-p.2‖ := by + have h := F.arrivalLabel_mem zX hp + have ht := F.branch_time_mem zX (arrivalLabel F.flow p).2 h.1 h.2 + have he := (F.branch_spec zX (arrivalLabel F.flow p).2 h.1).2 + have hh := F.flow_inversePhase (Ioo_subset_Icc_self hp.1) (p.2,0) + change _-p.1=‖_- (F.flow (inversePhase F.flow (p.1,(p.2,0))) p.1).1‖ at he + rw [hh] at he + exact ⟨ht,he⟩ + +lemma PhaseFlowOn.arrivalTime_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ContinuousAt (arrivalTime F.flow zX T) p := + (F.joint_branch_continuousAt zX (F.arrivalLabel_mem zX hp)).comp + (f := arrivalLabel F.flow) (F.arrivalLabel_continuousAt hp.1) + +lemma PhaseFlowOn.arrivalRadius_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ContinuousAt (arrivalRadius F.flow zX T) p := + (F.arrivalTime_continuousAt zX hp).sub continuousAt_fst + +lemma PhaseFlowOn.arrivalFlow_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ContinuousAt (fun q => F.flow zX (arrivalTime F.flow zX T q)) p := by + have ht := (F.arrival_time_spec zX hp).1 + have hti : arrivalTime F.flow zX T p ∈ Ioo 0 T := ⟨hp.1.1.trans ht.1,ht.2⟩ + exact (F.joint zX _ hti).continuousAt.comp + (f := fun q => (arrivalTime F.flow zX T q,zX)) + ((F.arrivalTime_continuousAt zX hp).prodMk continuousAt_const) + +lemma PhaseFlowOn.arrivalDirection_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ContinuousAt (arrivalDirection F.flow zX T) p := by + have hn : arrivalRadius F.flow zX T p ≠ 0 := ne_of_gt (sub_pos.mpr (F.arrival_time_spec zX hp).1.1) + exact ((F.arrivalRadius_continuousAt zX hp).inv₀ hn).smul + ((F.arrivalFlow_continuousAt zX hp).fst.sub continuousAt_snd) + +lemma PhaseFlowOn.arrivalVelocity_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ContinuousAt (arrivalVelocity F.flow zX T) p := + (contDiff_velocity (k := 1)).continuous.continuousAt.comp + (f := fun q => (F.flow zX (arrivalTime F.flow zX T q)).2) + (F.arrivalFlow_continuousAt zX hp).snd + +lemma PhaseFlowOn.norm_arrivalDirection {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Vec} (hp : p ∈ arrivalDomain F.flow zX T) : + ‖arrivalDirection F.flow zX T p‖=1 := by + have ht := F.arrival_time_spec zX hp + have hr : 0 < arrivalRadius F.flow zX T p := sub_pos.mpr ht.1.1 + rw [arrivalDirection,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hr),← ht.2] + exact inv_mul_cancel₀ (ne_of_gt hr) + +lemma PhaseFlowOn.measurable_arrival_zero {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) : Measurable ((arrivalDomain F.flow zX T).indicator (arrivalTime F.flow zX T)) := by + classical + exact (show ContinuousOn _ (arrivalDomain F.flow zX T) from + fun _ hp => (F.arrivalTime_continuousAt zX hp).continuousWithinAt).measurable_piecewise + continuousOn_const (F.isOpen_arrivalDomain zX).measurableSet + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/BallCutoff.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/BallCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..9abad2019d17e641f39e31d047b51ecbe738003b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/BallCutoff.lean @@ -0,0 +1,386 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeArgument + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma continuous_dot : Continuous (fun p : Vec × Vec => dot p.1 p.2) := by + simp only [dot_eq_inner] + exact continuous_fst.inner continuous_snd + +def ballCutoff (R ε : ℝ) (x : Vec) : ℝ := + Real.smoothTransition ((R^2-‖x‖^2)/ε) + +lemma contDiff_ballCutoff (R ε : ℝ) {k : ℕ∞} : + ContDiff ℝ k (ballCutoff R ε) := by + exact Real.smoothTransition.contDiff.comp + ((contDiff_const.sub (contDiff_id.norm_sq ℝ)).div_const ε) + +lemma ballCutoff_fderiv (R ε : ℝ) (x h : Vec) : + fderiv ℝ (ballCutoff R ε) x h = + -(2/ε)*deriv Real.smoothTransition ((R^2-‖x‖^2)/ε)*dot x h := by + have hθ := (Real.smoothTransition.contDiff (n:=1)).differentiable (by simp) + have hi := ((hasFDerivAt_const (R^2) x).sub ((hasFDerivAt_id x).norm_sq)).const_smul ε⁻¹ + have harg : (fun y : Vec => ε⁻¹ • (R^2-‖y‖^2)) = + (fun y : Vec => (R^2-‖y‖^2)/ε) := by + ext y + simp [smul_eq_mul,div_eq_mul_inv,mul_comm] + change HasFDerivAt (fun y : Vec => ε⁻¹ • (R^2-‖y‖^2)) _ x at hi + rw [harg] at hi + have hh := (hθ _).hasDerivAt.comp_hasFDerivAt x hi + change HasFDerivAt (ballCutoff R ε) _ x at hh + rw [hh.fderiv] + simp [smul_eq_mul,div_eq_mul_inv,← dot_eq_inner] + ring + +lemma ballCutoff_zero {R ε : ℝ} (hR : 0≤R) (hε : 0<ε) {x : Vec} + (hx : x ∉ closedBall (0:Vec) R) : ballCutoff R ε x=0 := by + have hh := coneCutoff_zero_outside hε (show (0:ℝ) ∈ Icc 0 R from ⟨le_rfl,hR⟩) hx + simpa only [coneCutoff,coneArgument,ballCutoff,sub_zero] using hh + +lemma ballCutoff_compact {R ε : ℝ} (hR : 0≤R) (hε : 0<ε) : + HasCompactSupport (ballCutoff R ε) := + compactSupport_of_zero_off (isCompact_closedBall (0:Vec) R) (fun _ hx => ballCutoff_zero hR hε hx) + +lemma ballCutoff_tendsto {R : ℝ} {x : Vec} (hR : 0 ballCutoff R ε x) (𝓝[>] (0:ℝ)) + (𝓝 ((ball (0:Vec) R).indicator (fun _ => (1:ℝ)) x)) := by + by_cases hxr : ‖x‖ ∫ x, ballCutoff R ε x * F x) (𝓝[>] (0:ℝ)) + (𝓝 (∫ x in ball (0:Vec) R, F x)) := by + have hh : Tendsto (fun ε => ∫ x, ballCutoff R ε x * F x) + (𝓝[>] (0:ℝ)) (𝓝 (∫ x, (ball (0:Vec) R).indicator F x)) := by + apply tendsto_integral_filter_of_dominated_convergence + ((closedBall (0:Vec) R).indicator (fun x => ‖F x‖)) + · exact Eventually.of_forall (fun ε => ((contDiff_ballCutoff R ε (k:=1)).continuous.mul hF).aestronglyMeasurable) + · filter_upwards [self_mem_nhdsWithin] with ε hε + filter_upwards [] with x + by_cases hx : x ∈ closedBall (0:Vec) R + · rw [indicator_of_mem hx,norm_mul,ballCutoff,Real.norm_of_nonneg (Real.smoothTransition.nonneg _)] + exact mul_le_of_le_one_left (norm_nonneg _) (Real.smoothTransition.le_one _) + · rw [indicator_of_notMem hx,ballCutoff_zero hR.le hε hx,zero_mul,norm_zero] + · exact (integrable_indicator_iff measurableSet_closedBall).mpr + (hF.norm.continuousOn.integrableOn_compact (isCompact_closedBall (0:Vec) R)) + · filter_upwards [] with x + have ht := (ballCutoff_tendsto (x:=x) hR).mul_const (F x) + convert ht using 1 + by_cases hx : x ∈ ball (0:Vec) R <;> simp [hx] + simpa only [integral_indicator measurableSet_ball] using hh + +lemma ballCutoff_divergence {R ε : ℝ} (hR : 0≤R) (hε : 0<ε) + {F : Vec → Vec} (hF : ContDiff ℝ 1 F) : + (∫ x, ballCutoff R ε x * divergence F x) = + ∫ x, (2/ε)*deriv Real.smoothTransition ((R^2-‖x‖^2)/ε)*dot x (F x) := by + rw [integral_mul_divergence hF (contDiff_ballCutoff R ε) (ballCutoff_compact hR hε),← integral_neg] + apply integral_congr_ae + filter_upwards [] with x + rw [ballCutoff_fderiv] + ring + +lemma ballShell_polar {R ε : ℝ} (hR : 0≤R) (hε : 0<ε) + {F : Vec → Vec} (hF : ContDiff ℝ 1 F) : + (∫ x : Vec, (2/ε)*deriv Real.smoothTransition ((R^2-‖x‖^2)/ε)*dot x (F x)) = + ∫ r in 0..R, radialConeWeight R ε r * + (∫ n : Sphere, r^2*dot n.1 (F (r • n.1)) ∂sphereMeasure) := by + let G : Vec → ℝ := fun x => (2/ε)*deriv Real.smoothTransition ((R^2-‖x‖^2)/ε)*dot x (F x) + have hG : Continuous G := by + exact (continuous_const.mul (((Real.smoothTransition.contDiff (n:=2)).continuous_deriv + (by simp)).comp ((continuous_const.sub (continuous_id.norm.pow 2)).div_const ε))).mul + (continuous_dot.comp (continuous_id.prodMk hF.continuous)) + have hK : HasCompactSupport G := by + apply compactSupport_of_zero_off (isCompact_closedBall (0:Vec) R) + intro x hx + have hr : R<‖x‖ := by simpa only [mem_closedBall_zero_iff,not_le] using hx + have harg : (R^2-‖x‖^2)/ε<0 := by + apply div_neg_of_neg_of_pos _ hε + nlinarith [norm_nonneg x] + simp [G,deriv_transition_zero_neg harg] + have he (r : ℝ) (n : Sphere) : r^2 • G (r • n.1) = + radialConeWeight R ε r * (r^2*dot n.1 (F (r • n.1))) := by + have hn : ‖r • n.1‖^2=r^2 := by simp [norm_smul,Real.norm_eq_abs,sq_abs] + simp only [G,hn,radialConeWeight,dot_smul_left,smul_eq_mul] + ring + change (∫ x : Vec, G x) = _ + rw [integral_polar (hG.integrable_of_hasCompactSupport hK)] + simp_rw [he,radialConeWeight_integral_Ioi hR hε] + have hc : Continuous (fun p : ℝ × Sphere => radialConeWeight R ε p.1 * + (p.1^2*dot p.2.1 (F (p.1 • p.2.1)))) := + ((continuous_radialConeWeight R ε).comp continuous_fst).mul + ((continuous_fst.pow 2).mul (continuous_dot.comp + ((continuous_subtype_val.comp continuous_snd).prodMk + (hF.continuous.comp (continuous_fst.smul (continuous_subtype_val.comp continuous_snd)))))) + have hi : Integrable (fun p : ℝ × Sphere => radialConeWeight R ε p.1 * + (p.1^2*dot p.2.1 (F (p.1 • p.2.1)))) + ((volume.restrict (uIoc 0 R)).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [uIoc_of_le hR,Measure.restrict_prod_eq_prod_univ] + exact (hc.continuousOn.integrableOn_compact + (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ioc_subset_Icc_self) + rw [← intervalIntegral_integral_swap hi] + apply intervalIntegral.integral_congr + intro r _ + exact integral_const_mul _ _ + +lemma divergence_ball {R : ℝ} (hR : 0 p.1^2*dot p.2.1 (F (p.1 • p.2.1))) := + (continuous_fst.pow 2).mul (continuous_dot.comp + ((continuous_subtype_val.comp continuous_snd).prodMk + (hF.continuous.comp (continuous_fst.smul (continuous_subtype_val.comp continuous_snd))))) + have hh : Continuous (fun r => ∫ n : Sphere, r^2*dot n.1 (F (r • n.1)) ∂sphereMeasure) := by + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hc.continuousOn + intro r n _ hn + exact (hn (mem_univ n)).elim + have hleft := ballCutoff_integral_tendsto hR (continuous_divergence hF) + have hright := radialConeWeight_tendsto hR hh.continuousOn + apply tendsto_nhds_unique hleft + apply hright.congr' + filter_upwards [self_mem_nhdsWithin] with ε hε + rw [ballCutoff_divergence hR.le hε hF,ballShell_polar hR.le hε hF] +end RVM +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma hasFDerivAt_integral_sphere + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} (hF : ContDiff ℝ 1 F) (p : H) : + HasFDerivAt (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) + (∫ n : Sphere, (fderiv ℝ F (p,n.1)).comp (ContinuousLinearMap.inl ℝ H Vec) + ∂sphereMeasure) p := by + let D : H × Sphere → H →L[ℝ] W := fun z => + (fderiv ℝ F (z.1,z.2.1)).comp (ContinuousLinearMap.inl ℝ H Vec) + have hD : Continuous D := by + exact ((hF.continuous_fderiv (by simp)).comp + (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd))).clm_comp continuous_const + obtain ⟨C,hC⟩ := ((isCompact_closedBall p 1).prod isCompact_univ).image hD |>.isBounded |>.exists_norm_le + apply hasFDerivAt_integral_of_dominated_of_fderiv_le + (s:=closedBall p 1) (bound:=fun _ => C) (F':=fun x n => D (x,n)) + (closedBall_mem_nhds p (by norm_num)) + · exact Eventually.of_forall (fun x => (hF.continuous.comp + (continuous_const.prodMk continuous_subtype_val)).aestronglyMeasurable) + · exact (hF.continuous.comp (continuous_const.prodMk continuous_subtype_val)).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + · exact (hD.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable + · exact ae_of_all _ (fun n x hx => hC _ ⟨(x,n),⟨hx,mem_univ n⟩,rfl⟩) + · exact integrable_const _ + · exact ae_of_all _ (fun n x _ => (hF.differentiable (by simp) (x,n.1)).hasFDerivAt.comp x + (by convert (hasFDerivAt_id x).prodMk (hasFDerivAt_const n.1 x) using 1 <;> rfl)) + +lemma continuous_integral_sphere + {H W : Type*} [TopologicalSpace H] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : H × Vec → W} (hF : Continuous F) : + Continuous (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) := by + have hc : Continuous (fun p : H × Sphere => F (p.1,p.2.1)) := + hF.comp (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)) + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hc.continuousOn + intro x n _ hn + exact (hn (mem_univ n)).elim + +lemma contDiff_integral_sphere_nat + {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + (k : ℕ) : ∀ {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W}, ContDiff ℝ k F → + ContDiff ℝ k (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) := by + induction k with + | zero => + intro W _ _ _ F hF + exact contDiff_zero.mpr (continuous_integral_sphere hF.continuous) + | succ k ih => + intro W _ _ _ F hF + have hF1 : ContDiff ℝ 1 F := hF.of_le (by exact_mod_cast Nat.succ_pos k) + let D : H × Vec → H →L[ℝ] W := fun z => + (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ H Vec) + have hD : ContDiff ℝ k D := + ((contDiff_succ_iff_fderiv.mp hF).2.2).clm_comp contDiff_const + have he : fderiv ℝ (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) = + (fun x => ∫ n : Sphere, D (x,n.1) ∂sphereMeasure) := by + funext x + exact (hasFDerivAt_integral_sphere hF1 x).fderiv + rw [show (↑(k+1) : ℕ∞ω) = ↑k+1 by simp,contDiff_succ_iff_fderiv] + refine ⟨fun x => (hasFDerivAt_integral_sphere hF1 x).differentiableAt,?_,?_⟩ + · simp + · rw [he] + exact ih hD + +lemma contDiff_integral_sphere + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) := by + rw [contDiff_infty] + intro k + exact contDiff_integral_sphere_nat k (contDiff_infty.mp hF k) + +def sphereSum (g : Vec → ℝ) (p : ℝ × Vec) : ℝ := + ∫ n : Sphere, g (p.2+p.1 • n.1) ∂sphereMeasure + +lemma contDiff_sphereSum {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) : + ContDiff ℝ ∞ (sphereSum g) := by + apply contDiff_integral_sphere (F:=fun p : (ℝ × Vec) × Vec => g (p.1.2+p.1.1 • p.2)) + exact hg.comp ((contDiff_snd.comp contDiff_fst).add + ((contDiff_fst.comp contDiff_fst).smul contDiff_snd)) + +lemma sphereSum_radial_deriv {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (x : Vec) (r : ℝ) : + HasDerivAt (fun t => sphereSum g (t,x)) + (∫ n : Sphere, fderiv ℝ g (x+r • n.1) n.1 ∂sphereMeasure) r := by + let F : ℝ × Vec → ℝ := fun p => g (x+p.1 • p.2) + have hF : ContDiff ℝ 1 F := hg.comp (contDiff_const.add (contDiff_fst.smul contDiff_snd)) + have hd := (hasFDerivAt_integral_sphere hF r).hasDerivAt + have hDa (n : Sphere) : ((fderiv ℝ F (r,n.1)).comp + (ContinuousLinearMap.inl ℝ ℝ Vec)) 1 = fderiv ℝ g (x+r • n.1) n.1 := by + have hfst : HasFDerivAt (fun p : ℝ × Vec => p.1) + (ContinuousLinearMap.fst ℝ ℝ Vec) (r,n.1) := hasFDerivAt_fst + have hsnd : HasFDerivAt (fun p : ℝ × Vec => p.2) + (ContinuousLinearMap.snd ℝ ℝ Vec) (r,n.1) := hasFDerivAt_snd + have hi := (hasFDerivAt_const x (r,n.1)).add (hfst.smul hsnd) + have he := ((hg.differentiable (by simp)) (x+r • n.1)).hasFDerivAt.comp (r,n.1) hi + change HasFDerivAt F _ (r,n.1) at he + rw [he.fderiv] + simp + have hc : Continuous (fun n : Sphere => (fderiv ℝ F (r,n.1)).comp + (ContinuousLinearMap.inl ℝ ℝ Vec)) := + ((hF.continuous_fderiv (by simp)).comp (continuous_const.prodMk continuous_subtype_val)).clm_comp continuous_const + rw [ContinuousLinearMap.integral_apply (hc.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _)) 1] at hd + simp_rw [hDa] at hd + exact hd + +lemma integral_ball_polar {g : Vec → ℝ} (hg : Continuous g) {R : ℝ} (hR : 0≤R) : + (∫ x in ball (0:Vec) R, g x) = + ∫ r in 0..R, r^2*sphereSum g (r,0) := by + have hi : Integrable ((ball (0:Vec) R).indicator g) := + (integrable_indicator_iff measurableSet_ball).mpr + ((hg.continuousOn.integrableOn_compact (isCompact_closedBall (0:Vec) R)).mono_set ball_subset_closedBall) + rw [← integral_indicator measurableSet_ball,integral_polar hi] + have he (n : Sphere) : (∫ r in Ioi (0:ℝ), r^2 • (ball (0:Vec) R).indicator g (r • n.1)) = + ∫ r in 0..R, r^2*g (r • n.1) := by + have hf : ∀ r ∈ Ioi (0:ℝ), r^2 • (ball (0:Vec) R).indicator g (r • n.1) = + (Ioo (0:ℝ) R).indicator (fun r => r^2*g (r • n.1)) r := by + intro r hr + change 0 < r at hr + have hn : ‖r • n.1‖=r := by simp [norm_smul,abs_of_pos hr] + by_cases hh : r hh h.2),smul_zero] + rw [setIntegral_congr_fun measurableSet_Ioi hf,setIntegral_indicator measurableSet_Ioo, + inter_eq_right.mpr Ioo_subset_Ioi_self,← integral_Ioc_eq_integral_Ioo, + intervalIntegral.integral_of_le hR] + simp_rw [he] + have hc : Continuous (fun p : ℝ × Sphere => p.1^2*g (p.1 • p.2.1)) := + (continuous_fst.pow 2).mul (hg.comp (continuous_fst.smul + (continuous_subtype_val.comp continuous_snd))) + have hi2 : Integrable (fun p : ℝ × Sphere => p.1^2*g (p.1 • p.2.1)) + ((volume.restrict (uIoc 0 R)).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [uIoc_of_le hR,Measure.restrict_prod_eq_prod_univ] + exact (hc.continuousOn.integrableOn_compact + (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ioc_subset_Icc_self) + rw [← intervalIntegral_integral_swap hi2] + apply intervalIntegral.integral_congr + intro r _ + simp only [sphereSum,zero_add] + exact integral_const_mul _ _ + +def laplace (g : Vec → ℝ) : Vec → ℝ := divergence (gradient g) + +lemma contDiff_gradient {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) : + ContDiff ℝ ∞ (gradient g) := by + exact (InnerProductSpace.toDual ℝ Vec).symm.contDiff.comp + (contDiff_infty_iff_fderiv.mp hg).2 + +lemma continuous_laplace {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) : Continuous (laplace g) := + continuous_divergence ((contDiff_gradient hg).of_le (by simp)) + +lemma sphereSum_flux {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) {R : ℝ} (hR : 0 sphereSum g (r,0)) R = + ∫ r in 0..R, r^2*sphereSum (laplace g) (r,0) := by + rw [(sphereSum_radial_deriv (hg.of_le (by simp)) 0 R).deriv] + have hdiv := divergence_ball hR ((contDiff_gradient hg).of_le (by simp)) + change (∫ x in ball (0:Vec) R, laplace g x) = _ at hdiv + rw [integral_ball_polar (continuous_laplace hg) hR.le] at hdiv + rw [hdiv,← integral_const_mul] + apply integral_congr_ae + filter_upwards [] with n + simp only [zero_add,dot_eq_inner,inner_gradient_right,conj_trivial] +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClippedRamp.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClippedRamp.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce60fc71c1a2fb5991dc92fcc7a2d3710b879618 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClippedRamp.lean @@ -0,0 +1,269 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.AbsolutelyContinuousIntervalContinuousDerivative + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def clippedRamp (a ℓ t : ℝ) : ℝ := min 1 (max 0 ((t-a)/ℓ)) + +def directionWeight (a b ℓ t : ℝ) : ℝ := clippedRamp a ℓ t-clippedRamp (b-ℓ) ℓ t + +lemma clippedRamp_lipschitz (a ℓ : ℝ) : LipschitzWith ‖ℓ⁻¹‖₊ (clippedRamp a ℓ) := by + have h : LipschitzWith ‖ℓ⁻¹‖₊ (fun t : ℝ=>(t-a)/ℓ) := by + apply lipschitzWith_iff_dist_le_mul.mpr + intro x y + simp only [Real.dist_eq,coe_nnnorm,Real.norm_eq_abs] + rw [←sub_div,sub_sub_sub_cancel_right,abs_div] + simp only [div_eq_mul_inv,abs_inv] + exact le_of_eq (mul_comm _ _) + exact (h.const_max 0).const_min 1 + +lemma clippedRamp_of_le {a ℓ t : ℝ} (hℓ : 0<ℓ) (ht : t≤a) : clippedRamp a ℓ t=0 := by + rw [clippedRamp,max_eq_left (div_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr ht) hℓ.le)] + norm_num + +lemma clippedRamp_of_ge {a ℓ t : ℝ} (hℓ : 0<ℓ) (ht : a+ℓ≤t) : clippedRamp a ℓ t=1 := by + have h : 1≤(t-a)/ℓ := (le_div_iff₀ hℓ).mpr (by linarith) + rw [clippedRamp,min_eq_left (le_trans h (le_max_right _ _))] + +lemma clippedRamp_of_between {a ℓ t : ℝ} (hℓ : 0<ℓ) (ht : t∈Icc a (a+ℓ)) : + clippedRamp a ℓ t=(t-a)/ℓ := by + have h0 : 0≤(t-a)/ℓ := div_nonneg (sub_nonneg.mpr ht.1) hℓ.le + have h1 : (t-a)/ℓ≤1 := (div_le_iff₀ hℓ).mpr (by linarith [ht.2]) + rw [clippedRamp,max_eq_right h0,min_eq_right h1] + +lemma directionWeight_lipschitz (a b ℓ : ℝ) : + LipschitzWith (‖ℓ⁻¹‖₊+‖ℓ⁻¹‖₊) (directionWeight a b ℓ) := + (clippedRamp_lipschitz a ℓ).sub (clippedRamp_lipschitz (b-ℓ) ℓ) + +lemma directionWeight_left {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∈Icc a (a+ℓ)) : directionWeight a b ℓ t=(t-a)/ℓ := by + rw [directionWeight,clippedRamp_of_between hℓ ht,clippedRamp_of_le hℓ (by linarith [ht.2]),sub_zero] + +lemma directionWeight_middle {a b ℓ t : ℝ} (hℓ : 0<ℓ) (_hab : 2*ℓ≤b-a) + (ht : t∈Icc (a+ℓ) (b-ℓ)) : directionWeight a b ℓ t=1 := by + rw [directionWeight,clippedRamp_of_ge hℓ ht.1,clippedRamp_of_le hℓ ht.2,sub_zero] + +lemma directionWeight_right {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∈Icc (b-ℓ) b) : directionWeight a b ℓ t=(b-t)/ℓ := by + rw [directionWeight,clippedRamp_of_ge hℓ (by linarith [ht.1]), + clippedRamp_of_between hℓ (by simpa only [sub_add_cancel] using ht)] + field_simp + ring + +lemma directionWeight_endpoints {a b ℓ : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) : + directionWeight a b ℓ a=0 ∧ directionWeight a b ℓ b=0 := by + constructor + · rw [directionWeight_left hℓ hab ⟨le_rfl,by linarith⟩,sub_self,zero_div] + · rw [directionWeight_right hℓ hab ⟨by linarith,le_rfl⟩,sub_self,zero_div] + +lemma directionWeight_bounds {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) : + 0≤directionWeight a b ℓ t ∧ directionWeight a b ℓ t≤1 := by + have hmon : clippedRamp (b-ℓ) ℓ t≤clippedRamp a ℓ t := by + apply min_le_min le_rfl + apply max_le_max le_rfl + exact div_le_div_of_nonneg_right (by linarith) hℓ.le + have h0 (c : ℝ) : 0≤clippedRamp c ℓ t := le_min (by norm_num) (le_max_left _ _) + have h1 (c : ℝ) : clippedRamp c ℓ t≤1 := min_le_left _ _ + unfold directionWeight + constructor + · exact sub_nonneg.mpr hmon + · linarith [h0 (b-ℓ),h1 a] + +lemma directionWeight_deriv_left {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∈Ioo a (a+ℓ)) : deriv (directionWeight a b ℓ) t=ℓ⁻¹ := by + have he : directionWeight a b ℓ =ᶠ[𝓝 t] (fun u=>(u-a)/ℓ) := by + filter_upwards [Ioo_mem_nhds ht.1 ht.2] with u hu + exact directionWeight_left hℓ hab (Ioo_subset_Icc_self hu) + have hd := (((hasDerivAt_id t).sub_const a).div_const ℓ).congr_of_eventuallyEq he + simpa only [one_div] using hd.deriv + +lemma directionWeight_deriv_middle {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∈Ioo (a+ℓ) (b-ℓ)) : deriv (directionWeight a b ℓ) t=0 := by + have he : directionWeight a b ℓ =ᶠ[𝓝 t] (fun _=>1) := by + filter_upwards [Ioo_mem_nhds ht.1 ht.2] with u hu + exact directionWeight_middle hℓ hab (Ioo_subset_Icc_self hu) + exact ((hasDerivAt_const t (1:ℝ)).congr_of_eventuallyEq he).deriv + +lemma directionWeight_deriv_right {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∈Ioo (b-ℓ) b) : deriv (directionWeight a b ℓ) t= -ℓ⁻¹ := by + have he : directionWeight a b ℓ =ᶠ[𝓝 t] (fun u=>(b-u)/ℓ) := by + filter_upwards [Ioo_mem_nhds ht.1 ht.2] with u hu + exact directionWeight_right hℓ hab (Ioo_subset_Icc_self hu) + have hd := (((hasDerivAt_id t).const_sub b).div_const ℓ).congr_of_eventuallyEq he + simpa only [neg_div,one_div] using hd.deriv + +lemma directionWeight_signed_average {a b ℓ : ℝ} {g g' : ℝ→Vec} + (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (hg : ContinuousOn g (Icc a b)) (hg' : ContinuousOn g' (Icc a b)) + (hd : ∀t∈Ioo a b,HasDerivAt g (g' t) t) : + (∫t in a..b,directionWeight a b ℓ t • g' t)= + ℓ⁻¹ • ((∫t in b-ℓ..b,g t)-(∫t in a..a+ℓ,g t)) := by + have hab' : a≤b := by linarith + have hL : a≤a+ℓ := by linarith + have hC : a+ℓ≤b-ℓ := by linarith + have hR : b-ℓ≤b := by linarith + have hψ := (directionWeight_lipschitz a b ℓ).lipschitzOnWith (s:=uIcc a b) |>.absolutelyContinuousOnInterval + have hu : ContinuousOn g (uIcc a b) := by simpa only [uIcc_of_le hab'] using hg + have hi := hψ.intervalIntegrable_deriv.smul_continuousOn hu + have hiL : IntervalIntegrable (fun t=>deriv (directionWeight a b ℓ) t • g t) volume a (a+ℓ) := + hi.mono_set (by rw [uIcc_of_le hL,uIcc_of_le hab']; exact Icc_subset_Icc le_rfl (hC.trans hR)) + have hiR : IntervalIntegrable (fun t=>deriv (directionWeight a b ℓ) t • g t) volume (b-ℓ) b := + hi.mono_set (by rw [uIcc_of_le hR,uIcc_of_le hab']; exact Icc_subset_Icc (hL.trans hC) le_rfl) + have hiC : IntervalIntegrable (fun t=>deriv (directionWeight a b ℓ) t • g t) volume (a+ℓ) (b-ℓ) := + hi.mono_set (by rw [uIcc_of_le hC,uIcc_of_le hab']; exact Icc_subset_Icc hL hR) + have eL : (∫t in a..a+ℓ,deriv (directionWeight a b ℓ) t • g t)=ℓ⁻¹ • ∫t in a..a+ℓ,g t := by + rw [←intervalIntegral.integral_smul] + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_left hℓ hab (by simpa only [uIoo_of_le hL] using ht)] + have eR : (∫t in b-ℓ..b,deriv (directionWeight a b ℓ) t • g t)= -ℓ⁻¹ • ∫t in b-ℓ..b,g t := by + rw [←intervalIntegral.integral_smul] + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_right hℓ hab (by simpa only [uIoo_of_le hR] using ht)] + have eC : (∫t in a+ℓ..b-ℓ,deriv (directionWeight a b ℓ) t • g t)=0 := by + rw [←intervalIntegral.integral_zero (a:=a+ℓ) (b:=b-ℓ)] + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_middle hℓ hab (by simpa only [uIoo_of_le hC] using ht),zero_smul] + rw [ac_weighted_vector_ibp_closed hab' hψ hg hg' hd, + (directionWeight_endpoints hℓ hab).1,(directionWeight_endpoints hℓ hab).2] + simp only [zero_smul,sub_self] + rw [←intervalIntegral.integral_add_adjacent_intervals hiL (hiC.trans hiR), + ←intervalIntegral.integral_add_adjacent_intervals hiC hiR,eL,eC,eR,zero_add,zero_sub] + rw [neg_smul,smul_sub] + abel + +lemma interval_average_error {a b ε : ℝ} {g : ℝ→Vec} {v : Vec} + (hab : ahb t ?_) using 1 + · rw [abs_of_pos hpos] + · rw [uIoc_of_le hab.le] at ht + exact Ioc_subset_Icc_self ht + calc + _ ≤ (b-a)⁻¹*(ε*(b-a)) := mul_le_mul_of_nonneg_left hb' (inv_pos.mpr hpos).le + _ = ε := by field_simp + +lemma directionWeight_signed_error {a b ℓ ε : ℝ} {g g' : ℝ→Vec} + (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (hg : ContinuousOn g (Icc a b)) (hg' : ContinuousOn g' (Icc a b)) + (hd : ∀t∈Ioo a b,HasDerivAt g (g' t) t) + (hleft : ∀t∈Icc a (a+ℓ),‖g t-g a‖≤ε) + (hright : ∀t∈Icc (b-ℓ) b,‖g t-g b‖≤ε) : + ‖(∫t in a..b,directionWeight a b ℓ t • g' t)-(g b-g a)‖≤2*ε := by + have hL : ‖ℓ⁻¹ • (∫t in a..a+ℓ,g t)-g a‖≤ε := by + simpa only [add_sub_cancel_left] using interval_average_error (by linarith : a.absolutelyContinuousOnInterval + have hi : IntervalIntegrable (fun t=>|deriv (directionWeight a b ℓ) t|) volume a b := + hψ.intervalIntegrable_deriv.norm + have hiL := hi.mono_set (show uIcc a (a+ℓ)⊆uIcc a b by + rw [uIcc_of_le hL,uIcc_of_le hab']; exact Icc_subset_Icc le_rfl (hC.trans hR)) + have hiC := hi.mono_set (show uIcc (a+ℓ) (b-ℓ)⊆uIcc a b by + rw [uIcc_of_le hC,uIcc_of_le hab']; exact Icc_subset_Icc hL hR) + have hiR := hi.mono_set (show uIcc (b-ℓ) b⊆uIcc a b by + rw [uIcc_of_le hR,uIcc_of_le hab']; exact Icc_subset_Icc (hL.trans hC) le_rfl) + have eL : (∫t in a..a+ℓ,|deriv (directionWeight a b ℓ) t|)=1 := by + calc + _ = ∫t in a..a+ℓ,ℓ⁻¹ := by + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_left hℓ hab (by simpa only [uIoo_of_le hL] using ht), + abs_of_pos (inv_pos.mpr hℓ)] + _ = 1 := by rw [intervalIntegral.integral_const]; simp [hℓ.ne'] + have eR : (∫t in b-ℓ..b,|deriv (directionWeight a b ℓ) t|)=1 := by + calc + _ = ∫t in b-ℓ..b,ℓ⁻¹ := by + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_right hℓ hab (by simpa only [uIoo_of_le hR] using ht), + abs_neg,abs_of_pos (inv_pos.mpr hℓ)] + _ = 1 := by rw [intervalIntegral.integral_const]; simp [hℓ.ne'] + have eC : (∫t in a+ℓ..b-ℓ,|deriv (directionWeight a b ℓ) t|)=0 := by + rw [←intervalIntegral.integral_zero (a:=a+ℓ) (b:=b-ℓ)] + apply intervalIntegral.integral_congr_uIoo + intro t ht + dsimp only + rw [directionWeight_deriv_middle hℓ hab (by simpa only [uIoo_of_le hC] using ht),abs_zero] + rw [←intervalIntegral.integral_add_adjacent_intervals hiL (hiC.trans hiR), + ←intervalIntegral.integral_add_adjacent_intervals hiC hiR,eL,eC,eR] + norm_num + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClosedBranchDomain.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClosedBranchDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc2eaee28b3dcfc8669923073c503dd1e587c403 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ClosedBranchDomain.lean @@ -0,0 +1,593 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverQCLM +import OAI.Analysis.VlasovMaxwell.Flow.PhaseAcceleration + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def closedBranchDomain (α : Phase→ℝ→Phase) (zX zY : Phase) (T : ℝ) : Set ℝ := + {s | s∈Icc 0 T ∧ s+‖(α zX T).1-(α zY s).1‖ ≤ T} + +lemma PhaseFlowOn.branch_spec_closed {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s∈closedBranchDomain F.flow zX zY T) : + branchTime F.flow zX zY T s∈Icc s T ∧ + branchTime F.flow zX zY T s-s= + ‖(F.flow zX (branchTime F.flow zX zY T s)).1-(F.flow zY s).1‖ := by + have hsub : Icc s T⊆Icc 0 T := fun _ ht=>⟨hs.1.1.trans ht.1,ht.2⟩ + have hc : ContinuousOn (fun t=>t-‖(F.flow zX t).1-(F.flow zY s).1‖) (Icc s T) := + continuousOn_id.sub ((((F.continuousOn_time zX).mono hsub).fst.sub continuousOn_const).norm) + have hstart : s-‖(F.flow zX s).1-(F.flow zY s).1‖ ≤ s := sub_le_self _ (norm_nonneg _) + have hend : s ≤ T-‖(F.flow zX T).1-(F.flow zY s).1‖ := by linarith [hs.2] + obtain ⟨t,ht,he⟩ := intermediate_value_Icc hs.1.2 hc ⟨hstart,hend⟩ + have hex : ∃ t,t∈Icc s T ∧ t-s=‖(F.flow zX t).1-(F.flow zY s).1‖ := + ⟨t,ht,by linarith⟩ + simpa only [branchTime,dite_eq_left hex] using hex.choose_spec + +lemma PhaseFlowOn.branch_unique_closed {E B : Field} {T s t : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s∈closedBranchDomain F.flow zX zY T) + (ht : t∈Icc s T) (he : t-s=‖(F.flow zX t).1-(F.flow zY s).1‖) : + t=branchTime F.flow zX zY T s := by + obtain ⟨hτ,hcone⟩ := F.branch_spec_closed zX zY hs + apply (F.arrival_strictMono (hs.1.1.trans hs.1.2) zX (F.flow zY s).1).injOn + ⟨hs.1.1.trans ht.1,ht.2⟩ ⟨hs.1.1.trans hτ.1,hτ.2⟩ + dsimp only + linarith + +lemma PhaseFlowOn.closedBranchDomain_eq {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (zX zY : Phase) {b : ℝ} (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) : + closedBranchDomain F.flow zX zY T=Icc 0 b := by + have hm := F.emission_strictMono hT zY (F.flow zX T).1 + ext s + constructor + · intro hs + refine ⟨hs.1.1,?_⟩ + by_contra h + have hh := hm hb hs.1 (lt_of_not_ge h) + linarith [hs.2] + · intro hs + have ht : s∈Icc 0 T := ⟨hs.1,hs.2.trans hb.2⟩ + refine ⟨ht,?_⟩ + have hh := hm.monotoneOn ht hb hs.2 + linarith + +lemma PhaseFlowOn.branchDomain_eq {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (zX zY : Phase) {b : ℝ} (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) : + branchDomain F.flow zX zY T=Ioo 0 b := by + have hm := F.emission_strictMono hT zY (F.flow zX T).1 + ext s + constructor + · intro hs + refine ⟨hs.1.1,?_⟩ + by_contra h + have hh := hm.monotoneOn hb (Ioo_subset_Icc_self hs.1) (le_of_not_gt h) + linarith [hs.2] + · intro hs + have ht : s∈Ioo 0 T := ⟨hs.1,hs.2.trans_le hb.2⟩ + refine ⟨ht,?_⟩ + have hh := hm (Ioo_subset_Icc_self ht) hb hs.2 + linarith + +lemma PhaseFlowOn.branch_final_endpoint {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) {b : ℝ} (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) : + branchTime F.flow zX zY T b=T := by + symm + apply F.branch_unique_closed zX zY ⟨hb,he.le⟩ ⟨hb.2,le_rfl⟩ + linarith + +lemma PhaseFlowOn.branch_lipschitzOn_closed {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (zX zY : Phase) : + ∃ C : ℝ≥0,LipschitzOnWith C (branchTime F.flow zX zY T) + (closedBranchDomain F.flow zX zY T) := by + obtain ⟨c,hc,hX⟩ := F.timelike hT zX + obtain ⟨d,hd,hY⟩ := F.timelike hT zY + let C : ℝ≥0 := ⟨2/(1-(c:ℝ)),by positivity⟩ + refine ⟨C,LipschitzOnWith.of_dist_le_mul ?_⟩ + intro s hs r hr + let t := branchTime F.flow zX zY T s + let τ := branchTime F.flow zX zY T r + obtain ⟨ht,hst⟩ := F.branch_spec_closed zX zY hs + obtain ⟨hτ,hrt⟩ := F.branch_spec_closed zX zY hr + have ht0 : t∈Icc 0 T := ⟨hs.1.1.trans ht.1,ht.2⟩ + have hτ0 : τ∈Icc 0 T := ⟨hr.1.1.trans hτ.1,hτ.2⟩ + have hdx := hX.dist_le_mul t ht0 τ hτ0 + have hdy := hY.dist_le_mul s hs.1 r hr.1 + have hy : dist (F.flow zY s).1 (F.flow zY r).1 ≤ dist s r := + hdy.trans (mul_le_of_le_one_left dist_nonneg hd.le) + have heq : t-τ=(s-r)+(‖(F.flow zX t).1-(F.flow zY s).1‖- + ‖(F.flow zX τ).1-(F.flow zY r).1‖) := by + change t-s=_ at hst + change τ-r=_ at hrt + linarith + have hn := abs_norm_sub_norm_le ((F.flow zX t).1-(F.flow zY s).1) + ((F.flow zX τ).1-(F.flow zY r).1) + have htriangle : ‖((F.flow zX t).1-(F.flow zY s).1)- + ((F.flow zX τ).1-(F.flow zY r).1)‖ ≤ + dist (F.flow zX t).1 (F.flow zX τ).1+dist (F.flow zY s).1 (F.flow zY r).1 := by + rw [dist_eq_norm,dist_eq_norm] + calc + _ = ‖((F.flow zX t).1-(F.flow zX τ).1)-((F.flow zY s).1-(F.flow zY r).1)‖ := by congr 1; abel + _ ≤ _ := norm_sub_le _ _ + have hg : dist t τ ≤ dist s r+(c:ℝ)*dist t τ+dist s r := by + have hab := abs_add_le (s-r) + (‖(F.flow zX t).1-(F.flow zY s).1‖-‖(F.flow zX τ).1-(F.flow zY r).1‖) + rw [← heq,← Real.dist_eq,← Real.dist_eq] at hab + linarith [hn.trans htriangle] + change dist t τ ≤ (2/(1-(c:ℝ)))*dist s r + rw [div_mul_eq_mul_div] + apply (le_div_iff₀ (sub_pos.mpr hc)).mpr + nlinarith + +lemma PhaseFlowOn.branch_radius_pos_closed {E B : Field} {T σ : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hσ : σ∈closedBranchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) : + 0 < branchTime F.flow zX zY T σ-σ := by + obtain ⟨ht,he⟩ := F.branch_spec_closed zX zY hσ + apply sub_pos.mpr + by_contra h + have hh : branchTime F.flow zX zY T σ=σ := le_antisymm (le_of_not_gt h) ht.1 + rw [hh,sub_self] at he + exact hne (sub_eq_zero.mp (norm_eq_zero.mp he.symm)) + +lemma PhaseFlowOn.branchDirection_norm_closed {E B : Field} {T σ : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hσ : σ∈closedBranchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) : + ‖branchDirection F.flow zX zY T σ‖=1 := by + have hp := F.branch_radius_pos_closed zX zY hσ hne + have he := (F.branch_spec_closed zX zY hσ).2 + dsimp only [branchDirection] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hp),← he] + exact inv_mul_cancel₀ hp.ne' + +lemma PhaseFlowOn.acceleration_continuousOn_closed {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (z : Phase) : + ContinuousOn (phaseAcceleration s.E s.B F.flow z) (Icc 0 T) := by + have hf := F.continuousOn_time z + have hp : ContinuousOn (fun t => (t,(F.flow z t).1)) (Icc 0 T) := continuousOn_id.prodMk hf.fst + have hE : ContinuousOn (fun t => s.E (t,(F.flow z t).1)) (Icc 0 T) := + hs.E_smooth.continuousOn.comp hp (fun t ht => ⟨ht,mem_univ _⟩) + have hB : ContinuousOn (fun t => s.B (t,(F.flow z t).1)) (Icc 0 T) := + hs.B_smooth.continuousOn.comp hp (fun t ht => ⟨ht,mem_univ _⟩) + have hu : ContinuousOn (fun t => velocity (F.flow z t).2) (Icc 0 T) := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn hf.snd + have hK : ContinuousOn (fun t => s.E (t,(F.flow z t).1)+ + cross (velocity (F.flow z t).2) (s.B (t,(F.flow z t).1))) (Icc 0 T) := + hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk hB)) + exact (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp_continuousOn hf.snd).clm_apply hK + +lemma continuousOn_retardedPrimitive {r : ℝ → ℝ} {a u n : ℝ → Vec} {S : Set ℝ} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) + (hu : ContinuousOn u S) (hn : ContinuousOn n S) + (hr0 : ∀ s ∈ S, r s ≠ 0) (hd : ∀ s ∈ S, 1-dot (n s) (u s) ≠ 0) + (hD : ∀ s ∈ S, 1-dot (n s) (a s) ≠ 0) : + ContinuousOn (fun s => retardedPrimitive (r s) (a s) (u s) (n s)) S := by + have hdu : ContinuousOn (fun s => 1-dot (n s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hn.inner hu) + have hDa : ContinuousOn (fun s => 1-dot (n s) (a s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hn.inner ha) + have hea : ContinuousOn (fun s => 1-dot (a s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (ha.inner hu) + exact ((hr.mul hdu).inv₀ (fun s hs => mul_ne_zero (hr0 s hs) (hd s hs))).smul + (hu.sub ((hea.div hDa hD).smul hn)) + +lemma PhaseFlowOn.actual_signed_identity_closed {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) : + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in 0..b,signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ) = + retardedPrimitive (r 0) (a 0) (u 0) (n 0)-retardedPrimitive (r b) (a b) (u b) (n b)+ + ∫ σ in 0..b,signedRemainder (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zX (τ σ)) := by + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + let P := fun σ=>retardedPrimitive (r σ) (a σ) (u σ) (n σ) + let K := fun σ=>signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ) + let R := fun σ=>signedRemainder (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zX (τ σ)) + have hT : 0≤T := hb.1.trans hb.2 + have hsub : Icc 0 b⊆Icc 0 T := fun _ hx=>⟨hx.1,hx.2.trans hb.2⟩ + have hclosed := F.closedBranchDomain_eq hT zX zY hb he + have hopen := F.branchDomain_eq hT zX zY hb he + have hmem : ∀ σ∈Icc 0 b,σ∈closedBranchDomain F.flow zX zY T := by + intro σ hσ + rwa [hclosed] + have htmem : ∀ σ∈Icc 0 b,τ σ∈Icc 0 T := fun σ hσ=> + ⟨hσ.1.trans (F.branch_spec_closed zX zY (hmem σ hσ)).1.1, + (F.branch_spec_closed zX zY (hmem σ hσ)).1.2⟩ + have hτ : ContinuousOn τ (Icc 0 b) := by + obtain ⟨C,hC⟩ := F.branch_lipschitzOn_closed hT zX zY + simpa only [hclosed] using hC.continuousOn + have hr : ContinuousOn r (Icc 0 b) := hτ.sub continuousOn_id + have hX := (F.continuousOn_time zX).comp hτ htmem + have hY := (F.continuousOn_time zY).mono hsub + have ha : ContinuousOn a (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hX.snd + have hu : ContinuousOn u (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hY.snd + have hr0 : ∀ σ∈Icc 0 b,r σ≠0 := fun σ hσ=> + (F.branch_radius_pos_closed zX zY (hmem σ hσ) (hne σ (hsub hσ))).ne' + have hn : ContinuousOn n (Icc 0 b) := (hr.inv₀ hr0).smul (hX.fst.sub hY.fst) + have hnorm : ∀ σ∈Icc 0 b,‖n σ‖=1 := fun σ hσ=> + F.branchDirection_norm_closed zX zY (hmem σ hσ) (hne σ (hsub hσ)) + have hd : ∀ σ∈Icc 0 b,1-dot (n σ) (u σ)≠0 := fun σ hσ=> + (cone_denom_pos (F.flow zY σ).2 _ (hnorm σ hσ)).ne' + have hD : ∀ σ∈Icc 0 b,1-dot (n σ) (a σ)≠0 := fun σ hσ=> + (cone_denom_pos (F.flow zX (τ σ)).2 _ (hnorm σ hσ)).ne' + have hP : ContinuousOn P (Icc 0 b) := continuousOn_retardedPrimitive hr ha hu hn hr0 hd hD + have hK : ContinuousOn K (Icc 0 b) := continuousOn_signedForceKernel hr ha hu hn + ((F.acceleration_continuousOn_closed hs zY).mono hsub) hr0 hd hD + have hR : ContinuousOn R (Icc 0 b) := continuousOn_signedRemainder hr ha hu hn + ((F.acceleration_continuousOn_closed hs zX).comp hτ htmem) hr0 hD + have hder : ∀ σ∈Ioo 0 b,HasDerivAt P (R σ-K σ) σ := by + intro σ hσ + have hσ' : σ∈branchDomain F.flow zX zY T := by rwa [hopen] + have hneσ := hne σ (hsub (Ioo_subset_Icc_self hσ)) + have ht := F.branch_time_mem zX zY hσ' hneσ + have hτ' := (F.branch_differential zX zY hσ' hneσ).2 + have hr' : HasDerivAt r ((1-dot (n σ) (u σ))/(1-dot (n σ) (a σ))-1) σ := + hτ'.sub (hasDerivAt_id σ) + have ha' : HasDerivAt a + (((1-dot (n σ) (u σ))/(1-dot (n σ) (a σ))) • phaseAcceleration s.E s.B F.flow zX (τ σ)) σ := + (F.velocity_hasDerivAt zX ⟨hσ'.1.1.trans ht.1,ht.2⟩).scomp σ hτ' + have hσc := Ioo_subset_Icc_self hσ + have hp := hasDerivAt_retardedPrimitive hr' ha' (F.velocity_hasDerivAt zY hσ'.1) + (F.branchDirection_hasDerivAt zX zY hσ' hneσ) (hr0 σ hσc) (hd σ hσc) (hD σ hσc) + convert hp using 1 + have hh := signed_force_identity (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zY σ) (phaseAcceleration s.E s.B F.flow zX (τ σ)) + (hr0 σ hσc) (hd σ hσc) (hD σ hσc) + dsimp only [R,K] + rw [hh] + unfold signedRemainder + abel + have hKi : IntervalIntegrable K volume 0 b := hK.intervalIntegrable_of_Icc hb.1 + have hRi : IntervalIntegrable R volume 0 b := hR.intervalIntegrable_of_Icc hb.1 + have hftc := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hb.1 hP hder (hRi.sub hKi) + rw [intervalIntegral.integral_sub hRi hKi] at hftc + change (∫ σ in 0..b,K σ)=P 0-P b+∫ σ in 0..b,R σ + have hh := congrArg (fun v=>(∫ σ in 0..b,R σ)-v) hftc + convert hh using 1 <;> abel + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def labelBranchDomain (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : Set (ℝ×Phase) := + {p | p.1∈branchDomain α zX p.2 T ∧ (α zX p.1).1≠(α p.2 p.1).1} + +lemma labelBranchDomain_iff (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) (p : ℝ×Phase) : + p∈labelBranchDomain α zX T ↔ (p.1,α p.2 p.1)∈arrivalPhaseDomain α zX T := by + change ((p.1∈Ioo 0 T ∧ p.1+‖(α zX T).1-(α p.2 p.1).1‖s.f (0,p.2) • + signedForceKernel (branchTime α zX p.2 T p.1-p.1) + (velocity (α zX (branchTime α zX p.2 T p.1)).2) + (velocity (α p.2 p.1).2) + (branchDirection α zX p.2 T p.1) + (sourceAcceleration s (p.1,α p.2 p.1))) + +lemma PhaseFlowOn.actualLabelSignedForce_eq_pullback {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + actualLabelSignedForce s F.flow zX T = + phaseTimePullback F.flow T (actualArrivalSignedForce s F.flow zX T) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have he := (labelBranchDomain_iff _ _ _ _).mp hp + have ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) := ⟨hp.1.1,mem_univ _⟩ + rw [actualLabelSignedForce,indicator_of_mem hp,phaseTimePullback,indicator_of_mem ht, + actualArrivalSignedForce,indicator_of_mem he] + rw [F.transport hs.f_smooth hs.vlasov (Ioo_subset_Icc_self hp.1.1) p.2] + simp only [arrivalRadius,arrivalDirection,branchDirection,F.arrivalTime_flow_eq_branchTime zX p.2 hp] + · have he := mt (labelBranchDomain_iff _ _ _ _).mpr hp + rw [actualLabelSignedForce,indicator_of_notMem hp] + by_cases ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · rw [phaseTimePullback,indicator_of_mem ht,actualArrivalSignedForce,indicator_of_notMem he] + · rw [phaseTimePullback,indicator_of_notMem ht] + +lemma PhaseFlowOn.measurable_actualLabelSignedForce {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Measurable (actualLabelSignedForce s F.flow zX T) := by + rw [F.actualLabelSignedForce_eq_pullback hs zX] + exact F.measurable_phaseTimePullback (F.actualArrivalSignedForce_measurable hs zX) + +lemma PhaseFlowOn.actualLabelSignedForce_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Integrable (actualLabelSignedForce s F.flow zX T) := by + rw [F.actualLabelSignedForce_eq_pullback hs zX] + exact (F.phaseTimePullback_integrable_iff (F.actualArrivalSignedForce_measurable hs zX)).mpr + (F.actualArrivalSignedForce_integrable hs zX).integrableOn + +lemma PhaseFlowOn.label_signed_integral_fubini {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + (∫ z : Phase,∫ σ : ℝ,actualLabelSignedForce s F.flow zX T (σ,z))= + ∫ σ : ℝ,∫ z : Phase,actualLabelSignedForce s F.flow zX T (σ,z) := by + exact (integral_integral_swap (f:=fun σ z=>actualLabelSignedForce s F.flow zX T (σ,z)) + (F.actualLabelSignedForce_integrable hs zX)).symm + +def normalisedPrimitive (r : ℝ) (a u n : Vec) : Vec := + (r/(1-dot n u)) • signedPrimitive a u n + +lemma normalisedPrimitive_eq {r : ℝ} (a u n : Vec) (hr : r≠0) : + normalisedPrimitive r a u n=r^2 • retardedPrimitive r a u n := by + rw [normalisedPrimitive,retardedPrimitive,smul_smul] + congr 1 + field_simp + +def normalisedRemainder (r : ℝ) (a u n b : Vec) : Vec := + ((1-dot a u)/(1-dot n a)^2) • (((1-dot a a)/(1-dot n a)) • n-a)+ + (r*dot b (signedPrimitive a u n)/(1-dot n a)^2) • n + +lemma normalisedRemainder_eq {r : ℝ} (a u n b : Vec) (hr : r≠0) : + normalisedRemainder r a u n b=r^2 • signedRemainder r a u n b := by + simp only [normalisedRemainder,signedRemainder,smul_add,smul_smul] + congr 2 <;> field_simp + +lemma continuousOn_normalisedPrimitive {Q : Type*} [TopologicalSpace Q] + {r : Q→ℝ} {a u n : Q→Vec} {S : Set Q} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) (hu : ContinuousOn u S) + (hn : ContinuousOn n S) (hd : ∀p∈S,1-dot (n p) (u p)≠0) + (hD : ∀p∈S,1-dot (n p) (a p)≠0) : + ContinuousOn (fun p=>normalisedPrimitive (r p) (a p) (u p) (n p)) S := by + have hdot {f g : Q→Vec} (hf : ContinuousOn f S) (hg : ContinuousOn g S) : + ContinuousOn (fun p=>dot (f p) (g p)) S := by + simpa only [dot_eq_inner] using hf.inner hg + exact (hr.div (continuousOn_const.sub (hdot hn hu)) hd).smul + (hu.sub (((continuousOn_const.sub (hdot ha hu)).div + (continuousOn_const.sub (hdot hn ha)) hD).smul hn)) + +lemma continuousOn_normalisedRemainder {Q : Type*} [TopologicalSpace Q] + {r : Q→ℝ} {a u n b : Q→Vec} {S : Set Q} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) (hu : ContinuousOn u S) + (hn : ContinuousOn n S) (hb : ContinuousOn b S) + (hD : ∀p∈S,1-dot (n p) (a p)≠0) : + ContinuousOn (fun p=>normalisedRemainder (r p) (a p) (u p) (n p) (b p)) S := by + have hdot {f g : Q→Vec} (hf : ContinuousOn f S) (hg : ContinuousOn g S) : + ContinuousOn (fun p=>dot (f p) (g p)) S := by + simpa only [dot_eq_inner] using hf.inner hg + have hden : ContinuousOn (fun p=>1-dot (n p) (a p)) S := + continuousOn_const.sub (hdot hn ha) + have hp : ContinuousOn (fun p=>signedPrimitive (a p) (u p) (n p)) S := + hu.sub (((continuousOn_const.sub (hdot ha hu)).div hden hD).smul hn) + exact (((continuousOn_const.sub (hdot ha hu)).div (hden.pow 2) + (fun p hp=>pow_ne_zero _ (hD p hp))).smul + ((((continuousOn_const.sub (hdot ha ha)).div hden hD).smul hn).sub ha)).add + (((hr.mul (hdot hb hp)).div (hden.pow 2) (fun p hp=>pow_ne_zero _ (hD p hp))).smul hn) + +lemma PhaseFlowOn.normalised_primitive_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) : + ContinuousOn (fun p : ConeKernelState=>normalisedPrimitive (p.1.1-p.1.2) + (velocity (F.flow zX p.1.1).2) (velocity p.2.2.2) p.2.1) (coneKernelDomain T) := by + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + refine continuousOn_normalisedPrimitive (continuous_fst.fst.sub continuous_fst.snd).continuousOn + ha hu.continuousOn continuous_snd.fst.continuousOn ?_ ?_ + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + +lemma PhaseFlowOn.normalised_remainder_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (fun p : ConeKernelState=>normalisedRemainder (p.1.1-p.1.2) + (velocity (F.flow zX p.1.1).2) (velocity p.2.2.2) p.2.1 + (phaseAcceleration s.E s.B F.flow zX p.1.1)) (coneKernelDomain T) := by + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + have hb : ContinuousOn (fun p : ConeKernelState=>phaseAcceleration s.E s.B F.flow zX p.1.1) + (coneKernelDomain T) := (F.acceleration_continuousOn_closed hs zX).comp + continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1) + refine continuousOn_normalisedRemainder (continuous_fst.fst.sub continuous_fst.snd).continuousOn + ha hu.continuousOn continuous_snd.fst.continuousOn hb ?_ + intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + +def labelKernelState (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) (p : ℝ×Phase) : ConeKernelState := + ((branchTime α zX p.2 T p.1,p.1),(branchDirection α zX p.2 T p.1,α p.2 p.1)) + +def labelConeKernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A : ConeKernelState→Vec) : ℝ×Phase→Vec := + (labelBranchDomain α zX T).indicator (fun p=>(branchTime α zX p.2 T p.1-p.1)⁻¹^2 • + (s.f (0,p.2) • A (labelKernelState α zX T p))) + +lemma PhaseFlowOn.labelKernelState_eq_arrival {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {p : ℝ×Phase} + (hp : p∈labelBranchDomain F.flow zX T) : + labelKernelState F.flow zX T p=arrivalKernelState F.flow zX T (p.1,F.flow p.2 p.1) := by + simp only [labelKernelState,arrivalKernelState,arrivalDirection,arrivalRadius,branchDirection, + F.arrivalTime_flow_eq_branchTime zX p.2 hp] + +lemma PhaseFlowOn.labelConeKernel_eq_pullback {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (A : ConeKernelState→Vec) : + labelConeKernel s F.flow zX T A=phaseTimePullback F.flow T (arrivalConeKernel s F.flow zX T A) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have he := (labelBranchDomain_iff _ _ _ _).mp hp + have ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) := ⟨hp.1.1,mem_univ _⟩ + rw [labelConeKernel,indicator_of_mem hp,phaseTimePullback,indicator_of_mem ht, + arrivalConeKernel,indicator_of_mem he,F.labelKernelState_eq_arrival zX hp, + F.transport hs.f_smooth hs.vlasov (Ioo_subset_Icc_self hp.1.1) p.2] + simp only [arrivalRadius,F.arrivalTime_flow_eq_branchTime zX p.2 hp] + · have he := mt (labelBranchDomain_iff _ _ _ _).mpr hp + rw [labelConeKernel,indicator_of_notMem hp] + by_cases ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · rw [phaseTimePullback,indicator_of_mem ht,arrivalConeKernel,indicator_of_notMem he] + · rw [phaseTimePullback,indicator_of_notMem ht] + +lemma PhaseFlowOn.measurable_labelConeKernel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Measurable (labelConeKernel s F.flow zX T A) := by + rw [F.labelConeKernel_eq_pullback hs zX] + exact F.measurable_phaseTimePullback (F.measurable_arrivalConeKernel hs zX hA) + +lemma PhaseFlowOn.labelConeKernel_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Integrable (labelConeKernel s F.flow zX T A) := by + rw [F.labelConeKernel_eq_pullback hs zX] + exact (F.phaseTimePullback_integrable_iff (F.measurable_arrivalConeKernel hs zX hA)).mpr + (F.arrivalConeKernel_integrable hs zX hA).integrableOn + +def actualLabelPrimitive (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : ℝ×Phase→Vec := + (labelBranchDomain α zX T).indicator (fun p=>s.f (0,p.2) • + retardedPrimitive (branchTime α zX p.2 T p.1-p.1) + (velocity (α zX (branchTime α zX p.2 T p.1)).2) (velocity (α p.2 p.1).2) + (branchDirection α zX p.2 T p.1)) + +def actualLabelRemainder (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : ℝ×Phase→Vec := + (labelBranchDomain α zX T).indicator (fun p=>s.f (0,p.2) • + signedRemainder (branchTime α zX p.2 T p.1-p.1) + (velocity (α zX (branchTime α zX p.2 T p.1)).2) (velocity (α p.2 p.1).2) + (branchDirection α zX p.2 T p.1) + (phaseAcceleration s.E s.B α zX (branchTime α zX p.2 T p.1))) + +lemma PhaseFlowOn.actualLabelPrimitive_eq_normalised {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) : + actualLabelPrimitive s F.flow zX T=labelConeKernel s F.flow zX T + (fun p=>normalisedPrimitive (p.1.1-p.1.2) (velocity (F.flow zX p.1.1).2) + (velocity p.2.2.2) p.2.1) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hr : branchTime F.flow zX p.2 T p.1-p.1≠0 := + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1).ne' + simp only [actualLabelPrimitive,labelConeKernel,indicator_of_mem hp,labelKernelState, + normalisedPrimitive_eq _ _ _ hr] + rw [smul_comm (s.f (0,p.2)),smul_smul,←mul_pow,inv_mul_cancel₀ hr,one_pow,one_smul] + · simp only [actualLabelPrimitive,labelConeKernel,indicator_of_notMem hp] + +lemma PhaseFlowOn.actualLabelRemainder_eq_normalised {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) : + actualLabelRemainder s F.flow zX T=labelConeKernel s F.flow zX T + (fun p=>normalisedRemainder (p.1.1-p.1.2) (velocity (F.flow zX p.1.1).2) + (velocity p.2.2.2) p.2.1 (phaseAcceleration s.E s.B F.flow zX p.1.1)) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hr : branchTime F.flow zX p.2 T p.1-p.1≠0 := + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1).ne' + simp only [actualLabelRemainder,labelConeKernel,indicator_of_mem hp,labelKernelState, + normalisedRemainder_eq _ _ _ _ hr] + rw [smul_comm (s.f (0,p.2)),smul_smul,←mul_pow,inv_mul_cancel₀ hr,one_pow,one_smul] + · simp only [actualLabelRemainder,labelConeKernel,indicator_of_notMem hp] + +lemma PhaseFlowOn.actualLabelPrimitive_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Integrable (actualLabelPrimitive s F.flow zX T) := by + rw [F.actualLabelPrimitive_eq_normalised zX] + exact F.labelConeKernel_integrable hs zX (F.normalised_primitive_continuousOn zX) + +lemma PhaseFlowOn.actualLabelPrimitive_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Measurable (actualLabelPrimitive s F.flow zX T) := by + rw [F.actualLabelPrimitive_eq_normalised zX] + exact F.measurable_labelConeKernel hs zX (F.normalised_primitive_continuousOn zX) + +lemma PhaseFlowOn.actualLabelRemainder_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Integrable (actualLabelRemainder s F.flow zX T) := by + rw [F.actualLabelRemainder_eq_normalised zX] + exact F.labelConeKernel_integrable hs zX (F.normalised_remainder_continuousOn hs zX) + +lemma PhaseFlowOn.actualLabelRemainder_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Measurable (actualLabelRemainder s F.flow zX T) := by + rw [F.actualLabelRemainder_eq_normalised zX] + exact F.measurable_labelConeKernel hs zX (F.normalised_remainder_continuousOn hs zX) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/CollisionLabels.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/CollisionLabels.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8cb1e50037b333f406051cf81679cf0543d1a7d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/CollisionLabels.lean @@ -0,0 +1,457 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverRadialDomain + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def collisionLabels (α : Phase → ℝ → Phase) (z : Phase) (T : ℝ) : Set Phase := + {y | ∃ t ∈ Ioo 0 T, (α y t).1 = (α z t).1} + +def collisionChart (α : Phase → ℝ → Phase) (z : Phase) (p : ℝ × Vec) : Phase := + inversePhase α (p.1, (α z p.1).1, p.2) + +lemma PhaseFlowOn.collision_image {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) (z : Phase) : + collisionLabels F.flow z T = collisionChart F.flow z '' (Ioo 0 T ×ˢ (univ : Set Vec)) := by + ext y + constructor + · rintro ⟨t,ht,hy⟩ + refine ⟨(t,(F.flow y t).2),⟨ht,mem_univ _⟩,?_⟩ + change inversePhase F.flow (t,((F.flow z t).1,(F.flow y t).2)) = y + rw [← hy,Prod.mk.eta,F.inversePhase_flow (Ioo_subset_Icc_self ht)] + · rintro ⟨⟨t,v⟩,ht,rfl⟩ + refine ⟨t,ht.1,?_⟩ + change (F.flow (inversePhase F.flow (t,(F.flow z t).1,v)) t).1=(F.flow z t).1 + rw [F.flow_inversePhase (Ioo_subset_Icc_self ht.1)] + +lemma PhaseFlowOn.collisionChart_strict {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (z : Phase) {p : ℝ × Vec} (hp : p.1 ∈ Ioo 0 T) : + ∃ D : (ℝ × Vec) →L[ℝ] Phase, HasStrictFDerivAt (collisionChart F.flow z) D p := by + have htime : HasStrictFDerivAt (fun p : ℝ × Vec => (p.1,z)) + ((ContinuousLinearMap.fst ℝ ℝ Vec).prod (0 : (ℝ × Vec) →L[ℝ] Phase)) p := + hasStrictFDerivAt_fst.prodMk (hasStrictFDerivAt_const _ _) + have hX := ((F.joint z p.1 hp).comp p htime).fst + have hmap := hasStrictFDerivAt_fst.prodMk (hX.prodMk hasStrictFDerivAt_snd) + obtain ⟨D,_,hD⟩ := F.inverse_differential hp ((F.flow z p.1).1,p.2) + have hh := hD.comp p hmap + exact ⟨_,hh⟩ + +lemma dimH_strict_image_le {A C : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [SecondCountableTopology A] [NormedAddCommGroup C] [NormedSpace ℝ C] + {f : A → C} {s : Set A} (hf : ∀ x ∈ s, ∃ D : A →L[ℝ] C, HasStrictFDerivAt f D x) : + dimH (f '' s) ≤ dimH s := by + apply dimH_image_le_of_locally_lipschitzOn + intro x hx + obtain ⟨D,hD⟩ := hf x hx + obtain ⟨K,t,ht,hK⟩ := hD.exists_lipschitzOnWith + exact ⟨K,t,mem_nhdsWithin_of_mem_nhds ht,hK⟩ + +lemma PhaseFlowOn.collision_null {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) (z : Phase) : + volume (collisionLabels F.flow z T) = 0 := by + have hdim : dimH (collisionLabels F.flow z T) ≤ 4 := by + rw [F.collision_image z] + calc + _ ≤ dimH (Ioo 0 T ×ˢ (univ : Set Vec)) := + dimH_strict_image_le (fun p hp => F.collisionChart_strict z hp.1) + _ ≤ dimH (univ : Set (ℝ × Vec)) := dimH_mono (subset_univ _) + _ = 4 := by rw [Real.dimH_univ_eq_finrank]; simp [Vec,Module.finrank_prod] + have hrank : Module.finrank ℝ Phase = 6 := by simp [Phase,Vec,Module.finrank_prod] + have hc : (volume : Measure Phase) ≪ Measure.hausdorffMeasure (6 : ℝ) := by + have hh := Measure.absolutelyContinuous_isAddHaarMeasure (volume : Measure Phase) + (Measure.hausdorffMeasure (Module.finrank ℝ Phase : ℝ)) + simpa only [hrank,Nat.cast_ofNat] using hh + apply measure_zero_of_dimH_lt (d := (6 : ℝ≥0)) hc + exact hdim.trans_lt (by norm_num) + +lemma PhaseFlowOn.closed_collision_null {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (z : Phase) : + volume {y : Phase | ∃ t ∈ Icc 0 T, (F.flow y t).1=(F.flow z t).1}=0 := by + apply measure_mono_null (t := collisionLabels F.flow z T ∪ + {y : Phase | (F.flow y 0).1=(F.flow z 0).1} ∪ + {y : Phase | (F.flow y T).1=(F.flow z T).1}) + · rintro y ⟨t,ht,hy⟩ + rcases eq_or_lt_of_le ht.1 with he | hl + · exact Or.inl (Or.inr (he.symm ▸ hy)) + rcases eq_or_lt_of_le ht.2 with he | hr + · exact Or.inr (he ▸ hy) + · exact Or.inl (Or.inl ⟨t,⟨hl,hr⟩,hy⟩) + · exact measure_union_null (measure_union_null (F.collision_null z) + (F.tip_null ⟨le_rfl,hT⟩ (F.flow z 0).1)) + (F.tip_null ⟨hT,le_rfl⟩ (F.flow z T).1) + +lemma PhaseFlowOn.position_contDiffOn {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (z : Phase) : ContDiffOn ℝ 1 (fun t => (F.flow z t).1) (Ioo 0 T) := by + have hd (t : ℝ) (ht : t ∈ Ioo 0 T) : + HasDerivWithinAt (fun t => (F.flow z t).1) (velocity (F.flow z t).2) (Ioo 0 T) t := + by + have hx : HasDerivWithinAt (fun t => (F.flow z t).1) + (velocity (F.flow z t).2) (Icc 0 T) t := (F.ode z t (Ioo_subset_Icc_self ht)).fst + exact hx.mono Ioo_subset_Icc_self + apply (contDiffOn_one_iff_derivWithin isOpen_Ioo.uniqueDiffOn).mpr + constructor + · exact fun t ht => (hd t ht).differentiableWithinAt + · have hc : ContinuousOn (fun t => velocity (F.flow z t).2) (Ioo 0 T) := + ((contDiff_velocity (k := 1)).continuous).comp_continuousOn + ((F.continuousOn_time z).snd.mono Ioo_subset_Icc_self) + apply hc.congr + intro t ht + exact ((hd t ht).derivWithin (isOpen_Ioo.uniqueDiffWithinAt ht)) + +def branchDomain (α : Phase → ℝ → Phase) (zX zY : Phase) (T : ℝ) : Set ℝ := + {s | s ∈ Ioo 0 T ∧ s+‖(α zX T).1-(α zY s).1‖ < T} + +def branchTime (α : Phase → ℝ → Phase) (zX zY : Phase) (T s : ℝ) : ℝ := + by + classical + exact if h : ∃ t, t ∈ Icc s T ∧ t-s=‖(α zX t).1-(α zY s).1‖ then h.choose else 0 + +lemma PhaseFlowOn.branch_spec {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) : + branchTime F.flow zX zY T s ∈ Icc s T ∧ + branchTime F.flow zX zY T s-s = + ‖(F.flow zX (branchTime F.flow zX zY T s)).1-(F.flow zY s).1‖ := by + have hy : ‖(F.flow zX T).1-(F.flow zY s).1‖ < T-s := by linarith [hs.2] + obtain ⟨t,⟨ht,he⟩,_⟩ := F.exists_arrival (Ioo_subset_Icc_self hs.1) zX hy + have hex : ∃ t, t ∈ Icc s T ∧ t-s=‖(F.flow zX t).1-(F.flow zY s).1‖ := + ⟨t,ht,by linarith⟩ + simpa only [branchTime,dite_eq_left hex] using hex.choose_spec + +lemma PhaseFlowOn.branch_unique {E B : Field} {T s t : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (ht : t ∈ Icc s T) (he : t-s=‖(F.flow zX t).1-(F.flow zY s).1‖) : + t=branchTime F.flow zX zY T s := by + obtain ⟨hσ,hcone⟩ := F.branch_spec zX zY hs + apply (F.arrival_strictMono (hs.1.1.le.trans hs.1.2.le) zX (F.flow zY s).1).injOn + ⟨hs.1.1.le.trans ht.1,ht.2⟩ ⟨hs.1.1.le.trans hσ.1,hσ.2⟩ + dsimp only + linarith + +lemma PhaseFlowOn.branch_time_mem {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1 ≠ (F.flow zY s).1) : + s < branchTime F.flow zX zY T s ∧ branchTime F.flow zX zY T s < T := by + obtain ⟨ht,he⟩ := F.branch_spec zX zY hs + constructor + · by_contra h + have hts := le_antisymm (le_of_not_gt h) ht.1 + rw [hts,sub_self] at he + exact hne (sub_eq_zero.mp (norm_eq_zero.mp he.symm)) + · by_contra h + have htT := le_antisymm ht.2 (le_of_not_gt h) + rw [htT] at he + linarith [hs.2] + +lemma PhaseFlowOn.isOpen_branchDomain {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) : IsOpen (branchDomain F.flow zX zY T) := by + apply isOpen_iff_mem_nhds.mpr + intro s hs + have hY := ((F.continuousOn_time zY).fst.continuousAt (Icc_mem_nhds hs.1.1 hs.1.2)) + have hc : ContinuousAt (fun r => r+‖(F.flow zX T).1-(F.flow zY r).1‖) s := + continuousAt_id.add ((continuousAt_const.sub hY).norm) + exact inter_mem (isOpen_Ioo.mem_nhds hs.1) (hc (isOpen_Iio.mem_nhds hs.2)) + +lemma PhaseFlowOn.branch_differential {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1 ≠ (F.flow zY s).1) : + let τ := branchTime F.flow zX zY T + let n := (τ s-s)⁻¹ • ((F.flow zX (τ s)).1-(F.flow zY s).1) + ContDiffAt ℝ 1 τ s ∧ HasDerivAt τ + ((1-dot n (velocity (F.flow zY s).2))/(1-dot n (velocity (F.flow zX (τ s)).2))) s := by + dsimp only + let τ := branchTime F.flow zX zY T + let t := τ s + let n := (t-s)⁻¹ • ((F.flow zX t).1-(F.flow zY s).1) + have ht := F.branch_time_mem zX zY hs hne + have hti : t ∈ Ioo 0 T := ⟨hs.1.1.trans ht.1,ht.2⟩ + have hspec := (F.branch_spec zX zY hs).2 + have hgeom : (F.flow zX t).1-(F.flow zY s).1=(t-s) • n := by + dsimp [n] + rw [smul_smul,mul_inv_cancel₀ (sub_ne_zero.mpr (ne_of_gt ht.1)),one_smul] + have hn : ‖n‖=1 := by + dsimp [n] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (sub_pos.mpr ht.1)),← hspec] + exact inv_mul_cancel₀ (sub_ne_zero.mpr (ne_of_gt ht.1)) + have hX := ((F.position_contDiffOn zX) t hti).contDiffAt (isOpen_Ioo.mem_nhds hti) + have hY := ((F.position_contDiffOn zY) s hs.1).contDiffAt (isOpen_Ioo.mem_nhds hs.1) + have hXd : HasDerivAt (fun r => (F.flow zX r).1) (velocity (F.flow zX t).2) t := + ((F.ode zX t (Ioo_subset_Icc_self hti)).hasDerivAt (Icc_mem_nhds hti.1 hti.2)).fst + have hYd : HasDerivAt (fun r => (F.flow zY r).1) (velocity (F.flow zY s).2) s := + ((F.ode zY s (Ioo_subset_Icc_self hs.1)).hasDerivAt (Icc_mem_nhds hs.1.1 hs.1.2)).fst + obtain ⟨σ,hσ,hσc,hσd,hev⟩ := exists_local_retarded_branch_with_derivative ht.1 hgeom hn + hX hY hXd hYd (norm_velocity_lt_one (F.flow zX t).2) + have hupper : ∀ᶠ r in 𝓝 s, σ r < T := hσc.continuousAt (isOpen_Iio.mem_nhds (hσ ▸ ht.2)) + have heq : σ =ᶠ[𝓝 s] τ := by + filter_upwards [hev,hupper,(F.isOpen_branchDomain zX zY).mem_nhds hs] with r hr hu hdom + exact F.branch_unique zX zY hdom ⟨hr.1.le,hu.le⟩ hr.2 + exact ⟨hσc.congr_of_eventuallyEq heq.symm, hσd.congr_of_eventuallyEq heq.symm⟩ + +lemma PhaseFlowOn.branch_strictMono {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) : StrictMonoOn (branchTime F.flow zX zY T) (branchDomain F.flow zX zY T) := by + intro a ha b hb hab + obtain ⟨hta,hea⟩ := F.branch_spec zX zY ha + obtain ⟨htb,heb⟩ := F.branch_spec zX zY hb + have hT : 0 ≤ T := ha.1.1.le.trans ha.1.2.le + have he := F.emission_strictMono hT zY (F.flow zX (branchTime F.flow zX zY T a)).1 + (Ioo_subset_Icc_self ha.1) (Ioo_subset_Icc_self hb.1) hab + have hat : branchTime F.flow zX zY T a ∈ Icc 0 T := ⟨ha.1.1.le.trans hta.1,hta.2⟩ + have hbt : branchTime F.flow zX zY T b ∈ Icc 0 T := ⟨hb.1.1.le.trans htb.1,htb.2⟩ + have hg := F.arrival_strictMono hT zX (F.flow zY b).1 + apply (hg.lt_iff_lt hat hbt).mp + dsimp only at he ⊢ + linarith + +lemma PhaseFlowOn.branch_convex {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) : Convex ℝ (branchDomain F.flow zX zY T) := by + apply OrdConnected.convex + refine ⟨?_⟩ + intro a ha b hb c hc + refine ⟨⟨lt_of_lt_of_le ha.1.1 hc.1,lt_of_le_of_lt hc.2 hb.1.2⟩,?_⟩ + have hle := (F.emission_strictMono (ha.1.1.le.trans ha.1.2.le) zY (F.flow zX T).1).monotoneOn + ⟨ha.1.1.le.trans hc.1,hc.2.trans hb.1.2.le⟩ (Ioo_subset_Icc_self hb.1) hc.2 + exact lt_of_le_of_lt hle hb.2 + +def branchRate (α : Phase → ℝ → Phase) (zX zY : Phase) (T s : ℝ) : ℝ := + let τ := branchTime α zX zY T s + let n := (τ-s)⁻¹ • ((α zX τ).1-(α zY s).1) + (1-dot n (velocity (α zY s).2))/(1-dot n (velocity (α zX τ).2)) + +lemma PhaseFlowOn.branch_volume_image {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) {H : Set ℝ} (hH : MeasurableSet H) + (hsub : H ⊆ branchDomain F.flow zX zY T) + (hne : ∀ s ∈ H, (F.flow zX s).1 ≠ (F.flow zY s).1) : + (∫⁻ s in H, ENNReal.ofReal (branchRate F.flow zX zY T s)) = + volume (branchTime F.flow zX zY T '' H) := by + apply lintegral_deriv_eq_volume_image_of_monotoneOn hH + · intro s hs + exact (F.branch_differential zX zY (hsub hs) (hne s hs)).2.hasDerivWithinAt + · exact (F.branch_strictMono zX zY).monotoneOn.mono hsub + +lemma PhaseFlowOn.branch_duration_bound {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) {H : Set ℝ} (hH : MeasurableSet H) + (hsub : H ⊆ branchDomain F.flow zX zY T) + (hne : ∀ s ∈ H, (F.flow zX s).1 ≠ (F.flow zY s).1) + {c a b : ℝ} (hder : ∀ s ∈ H, c ≤ branchRate F.flow zX zY T s) + (himage : branchTime F.flow zX zY T '' H ⊆ Icc a b) : + ENNReal.ofReal c * volume H ≤ ENNReal.ofReal (b-a) := by + calc + _ = ∫⁻ _s in H, ENNReal.ofReal c := by simp + _ ≤ ∫⁻ s in H, ENNReal.ofReal (branchRate F.flow zX zY T s) := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem hH] with s hs + exact ENNReal.ofReal_le_ofReal (hder s hs) + _ = volume (branchTime F.flow zX zY T '' H) := F.branch_volume_image zX zY hH hsub hne + _ ≤ volume (Icc a b) := measure_mono himage + _ = _ := Real.volume_Icc + +end RVM +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma exists_continuous_scalar_root {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] [CompleteSpace W] {H : ℝ × W → ℝ} + {L : (ℝ × W) →L[ℝ] ℝ} {t : ℝ} {p : W} + (hH : HasStrictFDerivAt H L (t,p)) (hzero : H (t,p)=0) + (hk : L (1,0) ≠ 0) : + ∃ τ : W → ℝ, τ p=t ∧ ContinuousAt τ p ∧ ∀ᶠ q in 𝓝 p, H (τ q,q)=0 := by + have hL (x : ℝ × W) : L x = x.1 * L (1,0)+L (0,x.2) := by + have he : x = x.1 • (1,(0 : W))+(0,x.2) := by ext <;> simp + conv_lhs => rw [he] + rw [map_add,map_smul,smul_eq_mul] + let A : (ℝ × W) →L[ℝ] (ℝ × W) := L.prod (ContinuousLinearMap.snd ℝ ℝ W) + have hi : Function.Injective A := by + intro x y h + have hh : L x = L y := congrArg Prod.fst h + have he : x.2=y.2 := by + have he := congrArg Prod.snd h + exact he + rw [hL x,hL y,he] at hh + have hf : x.1=y.1 := (mul_right_cancel₀ hk) (add_right_cancel hh) + exact Prod.ext hf he + have hs : Function.Surjective A := by + intro y + refine ⟨((y.1-L (0,y.2))/L (1,0),y.2),?_⟩ + apply Prod.ext + · change L ((y.1-L (0,y.2))/L (1,0),y.2)=y.1 + rw [hL] + dsimp only + field_simp + ring + · rfl + let e : (ℝ × W) ≃L[ℝ] (ℝ × W) := ContinuousLinearEquiv.ofBijective A + (LinearMap.ker_eq_bot.mpr hi) (LinearMap.range_eq_top.mpr hs) + let Φ : ℝ × W → ℝ × W := fun z => (H z,z.2) + have hΦ : HasStrictFDerivAt Φ (e : (ℝ × W) →L[ℝ] (ℝ × W)) (t,p) := + hH.prodMk hasStrictFDerivAt_snd + let Z := hΦ.localInverse Φ e (t,p) + have hZ : HasStrictFDerivAt Z (e.symm : (ℝ × W) →L[ℝ] (ℝ × W)) (0,p) := by + simpa only [Φ,hzero] using hΦ.to_localInverse + have hZ₀ : Z (0,p)=(t,p) := by + simpa only [Φ,hzero] using hΦ.localInverse_apply_image + let τ : W → ℝ := fun q => (Z (0,q)).1 + have hc : ContinuousAt (fun q : W => ((0 : ℝ),q)) p := continuousAt_const.prodMk continuousAt_id + refine ⟨τ,congrArg Prod.fst hZ₀,hZ.continuousAt.fst.comp hc,?_⟩ + have hev : ∀ᶠ z in 𝓝 (0,p), Φ (Z z)=z := by + simpa only [Φ,hzero] using hΦ.eventually_right_inverse + filter_upwards [hc.eventually hev] with q hq + have he : (Z (0,q)).2=q := congrArg Prod.snd hq + have hh : H (Z (0,q))=0 := congrArg Prod.fst hq + have hz : Z (0,q) = (τ q,q) := Prod.ext rfl he + rwa [hz] at hh + +def jointBranchDomain (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) : Set (ℝ × Phase) := + {p | p.1 ∈ branchDomain α zX p.2 T ∧ (α zX p.1).1 ≠ (α p.2 p.1).1} + +lemma PhaseFlowOn.joint_position_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {p : ℝ × Phase} (hp : p.1 ∈ Ioo 0 T) : + ContinuousAt (fun q : ℝ × Phase => (F.flow q.2 q.1).1) p := + (F.joint p.2 p.1 hp).continuousAt.fst + +lemma PhaseFlowOn.isOpen_jointBranchDomain {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) : IsOpen (jointBranchDomain F.flow zX T) := by + apply isOpen_iff_mem_nhds.mpr + intro p hp + have hY := F.joint_position_continuousAt hp.1.1 + have hX : ContinuousAt (fun q : ℝ × Phase => (F.flow zX q.1).1) p := + (((F.continuousOn_time zX).fst.continuousAt (Icc_mem_nhds hp.1.1.1 hp.1.1.2)).comp + continuousAt_fst) + have hd : ContinuousAt (fun q : ℝ × Phase => q.1+‖(F.flow zX T).1-(F.flow q.2 q.1).1‖) p := + continuousAt_fst.add ((continuousAt_const.sub hY).norm) + have ht : ∀ᶠ q : ℝ × Phase in 𝓝 p, q.1 ∈ Ioo 0 T := + continuousAt_fst.eventually (isOpen_Ioo.mem_nhds hp.1.1) + have hb := hd.eventually (isOpen_Iio.mem_nhds hp.1.2) + have hn := (hX.sub hY).eventually (isOpen_compl_singleton.mem_nhds (sub_ne_zero.mpr hp.2)) + filter_upwards [ht,hb,hn] with q hq hqt hqn + exact ⟨⟨hq,hqt⟩,sub_ne_zero.mp hqn⟩ + +lemma PhaseFlowOn.joint_branch_continuousAt {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) {p : ℝ × Phase} (hp : p ∈ jointBranchDomain F.flow zX T) : + ContinuousAt (fun q : ℝ × Phase => branchTime F.flow zX q.2 T q.1) p := by + let t := branchTime F.flow zX p.2 T p.1 + have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hti : t ∈ Ioo 0 T := ⟨hp.1.1.1.trans ht.1,ht.2⟩ + have hspec := (F.branch_spec zX p.2 hp.1).2 + have hxy : (F.flow zX t).1 ≠ (F.flow p.2 p.1).1 := by + intro he + rw [he,sub_self,norm_zero] at hspec + linarith [ht.1] + let H : ℝ × (ℝ × Phase) → ℝ := fun q => q.1-q.2.1-‖(F.flow zX q.1).1-(F.flow q.2.2 q.2.1).1‖ + have hmap : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => (q.1,zX)) + ((ContinuousLinearMap.fst ℝ ℝ (ℝ × Phase)).prod 0) (t,p) := + hasStrictFDerivAt_fst.prodMk (hasStrictFDerivAt_const _ _) + have hparam : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => q.2) + (ContinuousLinearMap.snd ℝ ℝ (ℝ × Phase)) (t,p) := hasStrictFDerivAt_snd + have hX : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => (F.flow zX q.1).1) + _ (t,p) := ((F.joint zX t hti).comp (t,p) hmap).fst + have hY : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => (F.flow q.2.2 q.2.1).1) + _ (t,p) := ((F.joint p.2 p.1 hp.1.1).comp (t,p) hparam).fst + have hN := (hasStrictFDerivAt_norm_nonzero (sub_ne_zero.mpr hxy)).comp (t,p) (hX.sub hY) + have htproj : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => q.1) + (ContinuousLinearMap.fst ℝ ℝ (ℝ × Phase)) (t,p) := hasStrictFDerivAt_fst + have hsproj : HasStrictFDerivAt (fun q : ℝ × (ℝ × Phase) => q.2.1) + ((ContinuousLinearMap.fst ℝ ℝ Phase).comp (ContinuousLinearMap.snd ℝ ℝ (ℝ × Phase))) (t,p) := + hasStrictFDerivAt_fst.comp (t,p) hparam + have hH := (htproj.sub hsproj).sub hN + have hroot : ∃ L : (ℝ × (ℝ × Phase)) →L[ℝ] ℝ, + HasStrictFDerivAt H L (t,p) ∧ L (1,0) = + 1-dot (‖(F.flow zX t).1-(F.flow p.2 p.1).1‖⁻¹ • + ((F.flow zX t).1-(F.flow p.2 p.1).1)) (velocity (F.flow zX t).2) := by + refine ⟨_,hH,?_⟩ + change 1 - (0 : ℝ) - inner ℝ + (‖(F.flow zX t).1-(F.flow p.2 p.1).1‖⁻¹ • + ((F.flow zX t).1-(F.flow p.2 p.1).1)) + (((1 : ℝ) • lorentzField E B (t,F.flow zX t) + F.differential zX t 0).1 - + (((0 : ℝ) • lorentzField E B (p.1,F.flow p.2 p.1) + F.differential p.2 p.1 0).1)) = _ + simp only [map_zero,one_smul,zero_smul,add_zero,Prod.fst_zero,sub_zero,← dot_eq_inner] + rfl + obtain ⟨L,hL,hk⟩ := hroot + have hkne : L (1,0) ≠ 0 := by + rw [hk] + exact ne_of_gt (cone_deficit_positive hxy (F.flow zX t).2) + obtain ⟨τ,hτ,hτc,hev⟩ := exists_continuous_scalar_root hL + (by dsimp [H]; linarith) hkne + have hle : ∀ᶠ q in 𝓝 p, q.1 < τ q ∧ τ q < T := by + have hpos : 0 < τ p-p.1 := by rw [hτ]; exact sub_pos.mpr ht.1 + have h1 : ∀ᶠ q in 𝓝 p, 0 < τ q-q.1 := + (hτc.sub continuousAt_fst).eventually (isOpen_Ioi.mem_nhds hpos) + have hend : τ p < T := by rw [hτ]; exact ht.2 + have h2 := hτc.eventually (isOpen_Iio.mem_nhds hend) + filter_upwards [h1,h2] with q hq hqT + exact ⟨sub_pos.mp hq,hqT⟩ + apply hτc.congr_of_eventuallyEq + filter_upwards [hev,hle,(F.isOpen_jointBranchDomain zX).mem_nhds hp] with q hq hqt hqd + exact (F.branch_unique zX q.2 hqd.1 ⟨hqt.1.le,hqt.2.le⟩ (by change H (τ q,q)=0 at hq; dsimp [H] at hq; linarith)).symm + +lemma PhaseFlowOn.measurable_branch_zero {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + Measurable ((jointBranchDomain F.flow zX T).indicator + (fun p : ℝ × Phase => branchTime F.flow zX p.2 T p.1)) := by + classical + have hc : ContinuousOn (fun p : ℝ × Phase => branchTime F.flow zX p.2 T p.1) + (jointBranchDomain F.flow zX T) := + fun _ hp => (F.joint_branch_continuousAt zX hp).continuousWithinAt + exact hc.measurable_piecewise continuousOn_const (F.isOpen_jointBranchDomain zX).measurableSet + +lemma PhaseFlowOn.measurable_joint_flow_zero {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) : + Measurable ((Ioo 0 T ×ˢ (univ : Set Phase)).indicator + (fun p : ℝ × Phase => F.flow p.2 p.1)) := by + classical + have hc : ContinuousOn (fun p : ℝ × Phase => F.flow p.2 p.1) + (Ioo 0 T ×ˢ (univ : Set Phase)) := + fun p hp => (F.joint p.2 p.1 hp.1).continuousAt.continuousWithinAt + have hh := hc.measurable_piecewise + (continuousOn_const (c := (0 : Phase))) (measurableSet_Ioo.prod MeasurableSet.univ) + convert hh using 1 + funext p + by_cases hp : p ∈ Ioo 0 T ×ˢ (univ : Set Phase) <;> + simp [Set.indicator,Set.piecewise,hp] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/CrossCLM.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/CrossCLM.lean new file mode 100644 index 0000000000000000000000000000000000000000..2272daf36da57f975fdc7c5e4b72b66b482ae840 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/CrossCLM.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.WithinFlow +import OAI.Analysis.VlasovMaxwell.Retarded.SourceWaveSpatialIbp + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma cross_apply_cyclic (n v : Vec) (i : Fin 3) : + cross n v i=n (curlA i)*v (curlB i)-n (curlB i)*v (curlA i) := by + fin_cases i <;> simp [cross,curlA,curlB] + +def crossCLM (n : Vec) : Vec →L[ℝ] Vec := + LinearMap.mkContinuous + { toFun := cross n + map_add' := by intro a b; ext i; fin_cases i <;> simp [cross] <;> ring + map_smul' := by intro a b; exact cross_smul_right n b a } + ‖n‖ (fun v => norm_cross_le n v) + +lemma crossCLM_apply (n v : Vec) : crossCLM n v=cross n v := rfl + +lemma integral_cross_left {F : Vec → Vec} (hF : Integrable F) (n : Vec) : + (∫ v : Vec, cross n (F v))=cross n (∫ v : Vec, F v) := + (crossCLM n).integral_comp_comm hF + +def retardedMagneticDensity (s : Solution) (t : ℝ) (x y : Vec) : Vec := + cross (coneDirection x y) (retardedElectricDensity s t x y) + +def retardedMagneticFlux (s : Solution) (t : ℝ) (x : Vec) (i : Fin 3) (y : Vec) : Vec := + ∫ v : Vec, (retardedDensity s.f t x (y,v)*retardedH x (y,v) i) • velocity v + +lemma integrable_retardedElectricDensity_integrand {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) : + Integrable (fun v : Vec => + (s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))) • + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y))))) := by + obtain ⟨hreg,hcomp⟩ := (show RegularParticle s.f from ⟨hf,hc⟩).slice ht y + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp + (continuous_const.prodMk (contDiff_velocity (k:=1)).continuous)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + exact ((hreg.continuous.mul hd).smul hk).integrable_of_hasCompactSupport (hcomp.mul_right.smul_right) + +lemma retardedMagneticDensity_component {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + retardedMagneticDensity s t x y i = + ∫ v : Vec, s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + cross (coneDirection x y) (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y))))) i := by + have hi := integrable_retardedElectricDensity_integrand hf hc hxy ht + have hcross := (crossCLM (coneDirection x y)).integrable_comp hi + unfold retardedMagneticDensity retardedElectricDensity + rw [← integral_cross_left hi] + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hcross + simpa only [crossCLM_apply,PiLp.proj_apply,cross_smul_right,PiLp.smul_apply,smul_eq_mul] using he.symm + +lemma integrable_retarded_flux_integrand {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + Integrable (fun v : Vec => (retardedDensity s.f t x (y,v)*retardedG x (y,v) i) • velocity v) := by + obtain ⟨hreg,hcomp⟩ := (show RegularParticle s.f from ⟨hf,hc⟩).slice ht y + have hG : Continuous (fun v : Vec => retardedG x (y,v) i) := + (PiLp.continuous_apply 2 _ i).comp (contDiff_retardedG_velocity (k:=1) hxy).continuous + exact ((hreg.continuous.mul hG).smul (contDiff_velocity (k:=1)).continuous).integrable_of_hasCompactSupport + (hcomp.mul_right.smul_right) + +lemma retardedMagneticFlux_components {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + retardedMagneticFlux s t x i y = + coneDirection x y (curlA i) • retardedElectricFlux s t x (curlB i) y - + coneDirection x y (curlB i) • retardedElectricFlux s t x (curlA i) y := by + have hA : Integrable (fun v : Vec => coneDirection x y (curlA i) • + ((retardedDensity s.f t x (y,v)*retardedG x (y,v) (curlB i)) • velocity v)) := + (integrable_retarded_flux_integrand hf hc hxy ht (curlB i)).fun_smul (coneDirection x y (curlA i)) + have hB : Integrable (fun v : Vec => coneDirection x y (curlB i) • + ((retardedDensity s.f t x (y,v)*retardedG x (y,v) (curlA i)) • velocity v)) := + (integrable_retarded_flux_integrand hf hc hxy ht (curlA i)).fun_smul (coneDirection x y (curlB i)) + unfold retardedMagneticFlux retardedElectricFlux + rw [← integral_smul,← integral_smul,← integral_sub hA hB] + apply integral_congr_ae + filter_upwards [] with v + rw [retardedH,cross_apply_cyclic] + simp only [smul_smul,← sub_smul] + congr 1 + ring + +lemma contDiffOn_retardedMagnetic_flux {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t : ℝ} (ht : 0≤t) (x : Vec) (i : Fin 3) : + ContDiffOn ℝ 1 (retardedMagneticFlux s t x i) (retardedSpaceDomain t x) := by + obtain ⟨K,hK,hF,hz⟩ := retarded_local_data hf hc ht x + have hG : ContDiffOn ℝ 1 (fun z => retardedH x z i) (retardedSpaceDomain t x ×ˢ univ) := by + intro z hz + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp z + (contDiffAt_retardedH hz.1.1)).contDiffWithinAt + apply contDiffOn_integral_uniform_support (isOpen_retardedSpaceDomain t x) hK + ((hF.mul hG).smul (contDiff_velocity.comp contDiff_snd).contDiffOn) + intro y hy v hv + change (retardedDensity s.f t x (y,v)*retardedH x (y,v) i) • velocity v=0 + rw [hz y hy v hv,zero_mul,zero_smul] + +lemma retarded_magnetic_flux_norm_bound {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t R : ℝ} (hR : 0≤R) (hRt : R ∫ n : Sphere, ε^2*dot n.1 + (retardedMagneticFlux s t x i (x+ε • n.1)) ∂sphereMeasure) + (𝓝[>] (0:ℝ)) (𝓝 0) := by + obtain ⟨C,_,hbound⟩ := retarded_magnetic_flux_norm_bound hf hc (show 0≤t/2 by linarith) + (show t/2 retardedMagneticFlux s t x i (x+z)) (show 0 ∑ n∈selectedDyadicBox N S,dyadicMultiFactor n y) := by + classical + have hp (i : ι) := pow_unbounded_of_one_lt (4/x i) (by norm_num : (1:ℝ)<2) + choose Ns hNs using hp + let N := ∑ i,Ns i + have hN (i : ι) : 4<(2:ℝ)^N*x i := by + have hNi : Ns i≤N := Finset.single_le_sum (fun j _ => Nat.zero_le _) (Finset.mem_univ i) + exact ((div_lt_iff₀ (hx i)).mp (hNs i)).trans_le + (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hNi) (hx i).le) + have he : ∀ᶠ y in 𝓝 x, ∀ i,x i/2 ?_)] + · simpa only [selectedDyadicBox,id_eq] using + (Finset.sum_indicator_eq_sum_filter (dyadicBox ι N) + (fun _ n => dyadicMultiFactor n y) (fun _ => S) id) + · by_cases hs : n∈S + · rw [indicator_of_mem hs,hz n hn] + · exact indicator_of_notMem hs _ + +lemma contDiffAt_selectedDyadicCutoff {ι : Type*} [Fintype ι] + {x : ι→ℝ} (hx : ∀ i,0 ?_)).congr_of_eventuallyEq he + exact contDiffAt_prod (fun i _ => (contDiff_dyadicFactor (n i)).contDiffAt.comp x (contDiff_apply ℝ ℝ i).contDiffAt) + +abbrev CutoffState := ℝ × Vec × Vec × Vec + +def stateCutoff (T : ℝ) (Q : Set (Fin 4→ℕ)) (z : CutoffState) : ℝ := + selectedDyadicCutoff Q (physicalCutoffCoordinates T z.1 z.2.1 z.2.2.1 z.2.2.2) + +lemma contDiffAt_stateCutoff (T : ℝ) (Q : Set (Fin 4→ℕ)) {z : CutoffState} + (hr : 0 + physicalCutoffCoordinates T z.1 z.2.1 z.2.2.1 z.2.2.2) z := by + apply contDiffAt_pi.mpr + intro i + have hv : ContDiffAt ℝ ∞ (fun z : CutoffState=>velocity z.2.2.1) z := + (contDiff_velocity (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.fst + have hw : ContDiffAt ℝ ∞ (fun z : CutoffState=>velocity z.2.2.2) z := + (contDiff_velocity (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.snd + have hd := (contDiffAt_const (c:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=∞)).contDiffAt.comp z (contDiffAt_id.snd.fst.prodMk hv)) + have hD := (contDiffAt_const (c:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=∞)).contDiffAt.comp z (contDiffAt_id.snd.fst.prodMk hw)) + fin_cases i <;> simp only [physicalCutoffCoordinates] + · exact contDiffAt_const.div ((contDiff_q (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.fst) (q_pos _).ne' + · exact (hd.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hn) (by norm_num)).ne' + · exact (hD.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hn) (by norm_num)).ne' + · exact contDiffAt_id.fst.div_const _ + exact (contDiffAt_selectedDyadicCutoff (physicalCutoffCoordinates_pos hn hr) Q).comp z hc + +lemma stateCutoff_closed_regularity {T a b : ℝ} (Q : Set (Fin 4→ℕ)) + {z z' : ℝ→CutoffState} (hz : ContinuousOn z (Icc a b)) + (hz' : ContinuousOn z' (Icc a b)) + (hr : ∀ t∈Icc a b,0<(z t).1) (hn : ∀ t∈Icc a b,‖(z t).2.1‖=1) + (hd : ∀ t∈Ioo a b,HasDerivAt z (z' t) t) : + ContinuousOn (fun t=>stateCutoff T Q (z t)) (Icc a b) ∧ + ContinuousOn (fun t=>fderiv ℝ (stateCutoff T Q) (z t) (z' t)) (Icc a b) ∧ + ∀ t∈Ioo a b,HasDerivAt (fun t=>stateCutoff T Q (z t)) + (fderiv ℝ (stateCutoff T Q) (z t) (z' t)) t := by + have hsc t (ht : t∈Icc a b) := contDiffAt_stateCutoff T Q (hr t ht) (hn t ht) + refine ⟨fun t ht => (hsc t ht).continuousAt.comp_continuousWithinAt (hz t ht),?_,?_⟩ + · apply ContinuousOn.clm_apply _ hz' + intro t ht + exact ((hsc t ht).continuousAt_fderiv (by simp)).comp_continuousWithinAt (hz t ht) + · intro t ht + exact ((hsc t (Ioo_subset_Icc_self ht)).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t (hd t ht) + +def branchCutoffState (α : Phase→ℝ→Phase) (T : ℝ) (zX zY : Phase) (σ : ℝ) : CutoffState := + (branchTime α zX zY T σ-σ,branchDirection α zX zY T σ, + (α zY σ).2,(α zX (branchTime α zX zY T σ)).2) + +def branchCutoffStateRate (E B : Field) (α : Phase→ℝ→Phase) (T : ℝ) + (zX zY : Phase) (σ : ℝ) : CutoffState := + let τ := branchTime α zX zY T σ + let n := branchDirection α zX zY T σ + let ρ := branchRate α zX zY T σ + (ρ-1,(τ-σ)⁻¹ • coneMotion (velocity (α zX τ).2) (velocity (α zY σ).2) n, + (lorentzField E B (σ,α zY σ)).2,ρ • (lorentzField E B (τ,α zX τ)).2) + +lemma PhaseFlowOn.branchCutoffState_hasDerivAt {E B : Field} {T σ : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) : + HasDerivAt (branchCutoffState F.flow T zX zY) + (branchCutoffStateRate E B F.flow T zX zY σ) σ := by + have hτ := (F.branch_differential zX zY hσ hne).2 + have hY := ((F.ode zY σ (Ioo_subset_Icc_self hσ.1)).hasDerivAt + (Icc_mem_nhds hσ.1.1 hσ.1.2)).snd + exact (hτ.sub (hasDerivAt_id σ)).prodMk + ((F.branchDirection_hasDerivAt zX zY hσ hne).prodMk + (hY.prodMk (F.retardedMomentum_hasDerivAt zX zY hσ hne))) + +lemma PhaseFlowOn.momentumForce_continuousOn_closed {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (z : Phase) : + ContinuousOn (fun t=>(lorentzField s.E s.B (t,F.flow z t)).2) (Icc 0 T) := by + have hf := F.continuousOn_time z + have hp : ContinuousOn (fun t => (t,(F.flow z t).1)) (Icc 0 T) := continuousOn_id.prodMk hf.fst + have hE : ContinuousOn (fun t => s.E (t,(F.flow z t).1)) (Icc 0 T) := + hs.E_smooth.continuousOn.comp hp (fun t ht => ⟨ht,mem_univ _⟩) + have hB : ContinuousOn (fun t => s.B (t,(F.flow z t).1)) (Icc 0 T) := + hs.B_smooth.continuousOn.comp hp (fun t ht => ⟨ht,mem_univ _⟩) + have hu : ContinuousOn (fun t => velocity (F.flow z t).2) (Icc 0 T) := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn hf.snd + exact hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk hB)) + +lemma PhaseFlowOn.branchCutoffState_closed_regularity {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hb : b∈Icc 0 T) (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) : + ContinuousOn (branchCutoffState F.flow T zX zY) (Icc 0 b) ∧ + ContinuousOn (branchCutoffStateRate s.E s.B F.flow T zX zY) (Icc 0 b) ∧ + (∀ σ∈Icc 0 b,0<(branchCutoffState F.flow T zX zY σ).1) ∧ + (∀ σ∈Icc 0 b,‖(branchCutoffState F.flow T zX zY σ).2.1‖=1) := by + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + have hT : 0≤T := hb.1.trans hb.2 + have hsub : Icc 0 b⊆Icc 0 T := fun _ hx=>⟨hx.1,hx.2.trans hb.2⟩ + have hclosed := F.closedBranchDomain_eq hT zX zY hb he + have hmem : ∀ σ∈Icc 0 b,σ∈closedBranchDomain F.flow zX zY T := by + intro σ hσ + rwa [hclosed] + have htmem : ∀ σ∈Icc 0 b,τ σ∈Icc 0 T := fun σ hσ=> + ⟨hσ.1.trans (F.branch_spec_closed zX zY (hmem σ hσ)).1.1, + (F.branch_spec_closed zX zY (hmem σ hσ)).1.2⟩ + have hτ : ContinuousOn τ (Icc 0 b) := by + obtain ⟨C,hC⟩ := F.branch_lipschitzOn_closed hT zX zY + simpa only [hclosed] using hC.continuousOn + have hr : ContinuousOn r (Icc 0 b) := hτ.sub continuousOn_id + have hX := (F.continuousOn_time zX).comp hτ htmem + have hY := (F.continuousOn_time zY).mono hsub + have ha : ContinuousOn a (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hX.snd + have hu : ContinuousOn u (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hY.snd + have hrp : ∀ σ∈Icc 0 b,0 + F.branch_radius_pos_closed zX zY (hmem σ hσ) (hne σ (hsub hσ)) + have hn : ContinuousOn n (Icc 0 b) := (hr.inv₀ (fun σ hσ=>(hrp σ hσ).ne')).smul (hX.fst.sub hY.fst) + have hnorm : ∀ σ∈Icc 0 b,‖n σ‖=1 := fun σ hσ=> + F.branchDirection_norm_closed zX zY (hmem σ hσ) (hne σ (hsub hσ)) + have hd : ContinuousOn (fun σ=>1-dot (n σ) (u σ)) (Icc 0 b) := by + simp only [dot_eq_inner] + exact (continuousOn_const (c:=(1:ℝ))).sub (hn.inner hu) + have hD : ContinuousOn (fun σ=>1-dot (n σ) (a σ)) (Icc 0 b) := by + simp only [dot_eq_inner] + exact (continuousOn_const (c:=(1:ℝ))).sub (hn.inner ha) + have hρ : ContinuousOn (branchRate F.flow zX zY T) (Icc 0 b) := + hd.div hD (fun σ hσ=>(cone_denom_pos _ _ (hnorm σ hσ)).ne') + have hN : ContinuousOn (fun σ=>(r σ)⁻¹ • coneMotion (a σ) (u σ) (n σ)) (Icc 0 b) := + (hr.inv₀ (fun σ hσ=>(hrp σ hσ).ne')).smul + (((hρ.smul (ha.sub hn)).add hn).sub hu) + have hKY := (F.momentumForce_continuousOn_closed hs zY).mono hsub + have hKX := (F.momentumForce_continuousOn_closed hs zX).comp hτ htmem + exact ⟨hr.prodMk (hn.prodMk (hY.snd.prodMk hX.snd)), + (hρ.sub continuousOn_const).prodMk (hN.prodMk (hKY.prodMk (hρ.smul hKX))),hrp,hnorm⟩ + +def branchSelectedRate (E B : Field) (α : Phase→ℝ→Phase) (T : ℝ) + (zX zY : Phase) (Q : Set (Fin 4→ℕ)) (σ : ℝ) : ℝ := + fderiv ℝ (stateCutoff T Q) (branchCutoffState α T zX zY σ) + (branchCutoffStateRate E B α T zX zY σ) + +lemma PhaseFlowOn.actual_selected_closed_regularity {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hb : b∈Icc 0 T) (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) (Q : Set (Fin 4→ℕ)) : + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY σ) + let χ' := branchSelectedRate s.E s.B F.flow T zX zY Q + ContinuousOn χ (Icc 0 b) ∧ ContinuousOn χ' (Icc 0 b) ∧ + ∀ σ∈Ioo 0 b,HasDerivAt χ (χ' σ) σ := by + obtain ⟨hz,hz',hr,hn⟩ := F.branchCutoffState_closed_regularity hs zX zY hb he hne + apply stateCutoff_closed_regularity Q hz hz' hr hn + intro σ hσ + have hdom : σ∈branchDomain F.flow zX zY T := by + rwa [F.branchDomain_eq (hb.1.trans hb.2) zX zY hb he] + exact F.branchCutoffState_hasDerivAt zX zY hdom (hne σ ⟨hσ.1.le,hσ.2.le.trans hb.2⟩) + +lemma PhaseFlowOn.actual_selected_temporal_signed_formula {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) + (Q : Set (Fin 4→ℕ)) + {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} + (hW : ContinuousOn W (Icc 0 b)) (hW' : ContinuousOn W' (Icc 0 b)) + (hWd : ∀ σ∈Ioo 0 b,HasDerivAt W (W' σ) σ) : + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY σ) + let χ' := branchSelectedRate s.E s.B F.flow T zX zY Q + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in 0..b,(ψ (τ σ)*χ σ) • W σ + (signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ)) = + (ψ (τ 0)*χ 0) • W 0 (retardedPrimitive (r 0) (a 0) (u 0) (n 0))+ + ∫ σ in 0..b,(deriv ψ (τ σ)*branchRate F.flow zX zY T σ*χ σ+ψ (τ σ)*χ' σ) • + W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + (ψ (τ σ)*χ σ) • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + obtain ⟨hχ,hχ',hχd⟩ := F.actual_selected_closed_regularity hs zX zY hb he hne Q + have h := F.actual_temporal_signed_formula hs zX zY hb he hne hψ hψT + (hχ.smul hW) ((hχ.smul hW').add (hχ'.smul hW)) + (fun σ hσ=>(hχd σ hσ).smul (hWd σ hσ)) + dsimp only at h ⊢ + simp only [Pi.smul_apply',Pi.add_apply,smul_apply,smul_smul,add_apply,smul_add,add_smul] at h ⊢ + convert h using 1 + congr 1 + apply intervalIntegral.integral_congr + intro σ hσ + abel_nf + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/DensitySecondMoment.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/DensitySecondMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e06ed2462b1a85d6f5706e49bf5e4f71f94b572 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/DensitySecondMoment.lean @@ -0,0 +1,203 @@ +import Mathlib + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +lemma density_second_moment {α : Type*} [MeasurableSpace α] (μ : Measure α) + {N : α → ℝ≥0∞} {D M V : ℝ≥0∞} + (hN : AEMeasurable N μ) (hD : ∀ᵐ z ∂μ, N z≤D) (hM : (∫⁻ z, N z ∂μ)≤M) (hV : μ univ≤V) : + (∫⁻ z, (N z)^2 ∂μ)≤ min (D^2*V) (D*M) := by + apply le_min + · calc + _ ≤ ∫⁻ _z, D^2 ∂μ := lintegral_mono_ae (hD.mono (fun z hz => pow_le_pow_left₀ (zero_le : (0:ℝ≥0∞)≤N z) hz 2)) + _ = D^2*μ univ := lintegral_const _ + _ ≤ _ := mul_le_mul' le_rfl hV + · calc + _ ≤ ∫⁻ z, D*N z ∂μ := lintegral_mono_ae (hD.mono (fun z hz => by + rw [pow_two]; exact mul_le_mul' hz le_rfl)) + _ = D * ∫⁻ z, N z ∂μ := lintegral_const_mul'' _ hN + _ ≤ _ := mul_le_mul' le_rfl hM + +lemma lintegral_product_bound_two {α : Type*} [MeasurableSpace α] (μ : Measure α) + {F N : α → ℝ≥0∞} (hF : AEMeasurable F μ) (hN : AEMeasurable N μ) + {G D M V : ℝ≥0∞} (hG : (∫⁻ z, F z^2 ∂μ)≤G) + (hD : ∀ᵐ z ∂μ, N z≤D) (hM : (∫⁻ z, N z ∂μ)≤M) (hV : μ univ≤V) : + (∫⁻ z, F z*N z ∂μ) ≤ G^(1/2:ℝ)*(min (D^2*V) (D*M))^(1/2:ℝ) := by + have hh := ENNReal.lintegral_mul_le_Lp_mul_Lq μ (Real.HolderConjugate.two_two) hF hN + norm_num only [Pi.mul_apply,ENNReal.rpow_two] at hh + exact hh.trans (mul_le_mul' (ENNReal.rpow_le_rpow hG (by norm_num)) + (ENNReal.rpow_le_rpow (density_second_moment μ hN hD hM hV) (by norm_num))) + +lemma good_field_bin_bound {α : Type*} [MeasurableSpace α] (μ : Measure α) + {r G N : α → ℝ≥0∞} (hrG : AEMeasurable (fun z => r z*G z) μ) + (hN : AEMeasurable N μ) {I h p θ φ ν E C M : ℝ≥0∞} + (hfield : (∫⁻ z, (r z*G z)^2 ∂μ)≤I*E) + (hdensity : ∀ᵐ z ∂μ, N z≤C*p^3*ν^2) + (hoccupation : (∫⁻ z, N z ∂μ)≤M/(h^2*φ^2)) + (hvolume : μ univ≤C*I*h*φ^2) : + (φ/(p*θ^2)) * (∫⁻ z, r z*G z*N z ∂μ) ≤ + (φ/(p*θ^2)) * ((I*E)^(1/2:ℝ) * + (min ((C*p^3*ν^2)^2*(C*I*h*φ^2)) + ((C*p^3*ν^2)*(M/(h^2*φ^2))))^(1/2:ℝ)) := by + exact mul_le_mul' le_rfl (lintegral_product_bound_two μ hrG hN hfield hdensity hoccupation hvolume) + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma geometric_min_summable_bound {A B x y : ℝ} (hA : 0≤A) (hB : 0≤B) + (hx : 1 min (A*x^k) (B*y^(-k))) ∧ + (∑' k : ℤ, min (A*x^k) (B*y^(-k))) ≤ A/(1-x⁻¹)+B/(1-y⁻¹) := by + let f : ℤ → ℝ := fun k => min (A*x^k) (B*y^(-k)) + have hx0 : 0 f n) := + .of_nonneg_of_le (fun n => hf0 _) hp ((summable_geometric_of_abs_lt_one hyi).mul_left B) + have hms : Summable (fun n : ℕ => f (-(n:ℤ))) := + .of_nonneg_of_le (fun n => hf0 _) hm ((summable_geometric_of_abs_lt_one hxi).mul_left A) + have hs : Summable f := hps.of_nat_of_neg hms + refine ⟨hs,?_⟩ + have hpb := hps.tsum_le_tsum hp ((summable_geometric_of_abs_lt_one hyi).mul_left B) + have hmb := hms.tsum_le_tsum hm ((summable_geometric_of_abs_lt_one hxi).mul_left A) + rw [tsum_mul_left,tsum_geometric_of_abs_lt_one hyi] at hpb + rw [tsum_mul_left,tsum_geometric_of_abs_lt_one hxi] at hmb + change (∑' k, f k)≤_ + rw [hps.tsum_of_nat_of_neg hms] + change (∑' n:ℕ, f n)+(∑' n:ℕ, f (-(n:ℤ)))-f 0≤_ + simp only [div_eq_mul_inv] + linarith [hf0 0] + +lemma geometric_min_shift_bound {A B x y : ℝ} (hA : 0≤A) (hB : 0≤B) + (hx : 1 min (A*x^n*x^k) (B*y^(-n)*y^(-k))) = + (fun k : ℤ => min (A*x^(k+n)) (B*y^(-(k+n)))) := by + funext k + rw [zpow_add₀ (ne_of_gt (zero_lt_one.trans hx)),neg_add, + zpow_add₀ (ne_of_gt (zero_lt_one.trans hy))] + congr 1 <;> ring + rw [he] at hn + have ht := (Equiv.addRight n).tsum_eq (fun k : ℤ => min (A*x^k) (B*y^(-k))) + simp only [Equiv.coe_addRight] at ht + rw [ht] at hn + exact hn.2 + +lemma dyadic_balance_at {a b α β R : ℝ} (ha : 0≤a) (hb : 0≤b) + (hα : 0<α) (hβ : 0<β) (hR : 0 min (a*(2^α)^k) (b*(2^β)^(-k))) = + (fun k : ℤ => min (a*((2:ℝ)^k)^α) (b*((2:ℝ)^k)^(-β))) := by + funext k + rw [Real.rpow_zpow_comm (by norm_num : (0:ℝ)≤2), + Real.rpow_zpow_comm (by norm_num : (0:ℝ)≤2),zpow_neg, + Real.inv_rpow (zpow_pos (by norm_num : (0:ℝ)<2) k).le, + Real.rpow_neg (zpow_pos (by norm_num : (0:ℝ)<2) k).le] + rw [hfun] at hsum + have hx : 0≤1-((2:ℝ)^α)⁻¹ := by + have hh := inv_lt_one_of_one_lt₀ (Real.one_lt_rpow (by norm_num : (1:ℝ)<2) hα) + linarith + have hy : 0≤1-((2:ℝ)^β)⁻¹ := by + have hh := inv_lt_one_of_one_lt₀ (Real.one_lt_rpow (by norm_num : (1:ℝ)<2) hβ) + linarith + exact hsum.trans (add_le_add (div_le_div_of_nonneg_right hnear hx) + (div_le_div_of_nonneg_right hfar hy)) + +lemma dyadic_balance {a b α β : ℝ} (ha : 0 fderiv ℝ g x v) := + ((hg.continuous_fderiv (by simp)).clm_apply continuous_const).integrable_of_hasCompactSupport + (hc.fderiv_apply ℝ v) + have h := integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable + (μ := (volume : Measure Vec)) (f := fun _ => (1 : ℝ)) (g := g) (v := v) + (by simp) + (by simpa using hid) + (by simpa using hg.continuous.integrable_of_hasCompactSupport hc) + (fun _ _ => differentiableAt_const 1) + (fun x _ => hg.differentiable (by simp) x) + simpa using h + +lemma integral_divergence_zero {F : Vec → Vec} + (hF : ContDiff ℝ 1 F) (hc : HasCompactSupport F) : + (∫ x, divergence F x) = 0 := by + have hfi (i : Fin 3) : ContDiff ℝ 1 (fun x => F x i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp hF + have hci (i : Fin 3) : HasCompactSupport (fun x => F x i) := by + exact hc.comp_left (g := fun v : Vec => v i) (by simp) + have hi (i : Fin 3) : Integrable (fun x => spatialPartial (fun y => F y i) x i) := + (((hfi i).continuous_fderiv (by simp)).clm_apply continuous_const).integrable_of_hasCompactSupport + ((hci i).fderiv_apply ℝ (basis i)) + rw [show (fun x => divergence F x) = + (fun x => ∑ i : Fin 3, spatialPartial (fun y => F y i) x i) from rfl, + integral_finsetSum _ (fun i _ => hi i)] + simp only [spatialPartial, integral_directional_derivative_zero (hfi _) (hci _), + Finset.sum_const_zero] + +lemma integral_mul_spatialPartial {F g : Vec → ℝ} + (hF : ContDiff ℝ 1 F) (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + (i : Fin 3) : + (∫ v, F v * spatialPartial g v i) = + -(∫ v, spatialPartial F v i * g v) := by + apply integral_mul_fderiv_eq_neg_fderiv_mul_of_integrable + · exact (((hF.continuous_fderiv (by simp)).clm_apply continuous_const).mul hg.continuous).integrable_of_hasCompactSupport hc.mul_left + · exact (hF.continuous.mul + ((hg.continuous_fderiv (by simp)).clm_apply continuous_const)).integrable_of_hasCompactSupport (hc.fderiv_apply ℝ (basis i)).mul_left + · exact (hF.continuous.mul hg.continuous).integrable_of_hasCompactSupport hc.mul_left + · exact fun x _ => hF.differentiable (by simp) x + · exact fun x _ => hg.differentiable (by simp) x + +lemma fderiv_q_apply (v h : Vec) : fderiv ℝ q v h = dot (velocity v) h := by + have hc : HasDerivAt (fun r : ℝ => v+r • h) h 0 := by + have hh := (hasDerivAt_const (0 : ℝ) v).add + ((hasDerivAt_id (0 : ℝ)).smul_const h) + change HasDerivAt (fun r : ℝ => v+r • h) (0+(1 : ℝ) • h) 0 at hh + simpa only [zero_add, one_smul] using hh + have hv : HasFDerivAt q (fderiv ℝ q v) (v+(0 : ℝ) • h) := by + simpa only [zero_smul, add_zero] using + (contDiff_q.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v).hasFDerivAt + have h₁ := hv.comp_hasDerivAt 0 hc + have h₂ := hasDerivAt_particle_energy hc + have he := h₁.unique h₂ + simpa using he + +lemma spatialPartial_q (v : Vec) (i : Fin 3) : spatialPartial q v i = velocity v i := by + simp [spatialPartial, fderiv_q_apply, dot, basis] + +lemma contDiff_lorentz (E B : Vec) {k : ℕ∞ω} : + ContDiff ℝ k (fun v => E+cross (velocity v) B) := by + exact contDiff_const.add (contDiff_cross.comp (contDiff_velocity.prodMk contDiff_const)) + +lemma divergence_lorentz (v E B : Vec) : + divergence (fun w => E+cross (velocity w) B) v = 0 := by + have hh (i : Fin 3) : spatialPartial (fun w => (E+cross (velocity w) B) i) v i = + spatialPartial (fun w => cross (velocity w) B i) v i := by + simp only [PiLp.add_apply, spatialPartial] + rw [fderiv_const_add] + simpa only [divergence, hh] using divergence_magnetic_force v B + +lemma divergence_energy_lorentz (v E B : Vec) : + divergence (fun w => q w • (E+cross (velocity w) B)) v = dot (velocity v) E := by + let F : Vec → Vec := fun w => E+cross (velocity w) B + have hd (i : Fin 3) : DifferentiableAt ℝ (fun w => F w i) v := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp v + ((contDiff_lorentz E B).differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v) + have hh (i : Fin 3) : spatialPartial (fun w => (q w • F w) i) v i = + q v*spatialPartial (fun w => F w i) v i+ F v i*velocity v i := by + simp only [PiLp.smul_apply, smul_eq_mul] + rw [spatialPartial_mul (contDiff_q.differentiable (by simp : (1 : ℕ∞ω) ≠ 0) v) + (hd i), spatialPartial_q] + change (∑ i : Fin 3, spatialPartial (fun w => (q w • F w) i) v i) = _ + simp only [hh, Finset.sum_add_distrib, ← Finset.mul_sum] + rw [show (∑ i : Fin 3, spatialPartial (fun w => F w i) v i) = 0 from + divergence_lorentz v E B, mul_zero, zero_add] + change dot (F v) (velocity v) = _ + rw [dot_comm, show F v = E+cross (velocity v) B from rfl, + dot_add_right, dot_cross_self_left, add_zero] + +lemma integral_momentum_work {g : Vec → ℝ} + (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) (E B : Vec) : + (∫ v, q v * ∑ i : Fin 3, + (E+cross (velocity v) B) i * spatialPartial g v i) = + -dot E (∫ v, g v • velocity v) := by + let F : Vec → Vec := fun v => q v • (E+cross (velocity v) B) + have hF : ContDiff ℝ 1 F := contDiff_q.smul (contDiff_lorentz E B) + have hfi (i : Fin 3) : ContDiff ℝ 1 (fun v => F v i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp hF + have hi (i : Fin 3) : Integrable (fun v => F v i*spatialPartial g v i) := + ((hfi i).continuous.mul + ((hg.continuous_fderiv (by simp)).clm_apply continuous_const)).integrable_of_hasCompactSupport (hc.fderiv_apply ℝ (basis i)).mul_left + have hi' (i : Fin 3) : Integrable (fun v => spatialPartial (fun w => F w i) v i*g v) := + ((((hfi i).continuous_fderiv (by simp)).clm_apply continuous_const).mul hg.continuous).integrable_of_hasCompactSupport hc.mul_left + have hv : Integrable (fun v => g v • velocity v) := + (hg.continuous.smul (contDiff_velocity (k := 1)).continuous).integrable_of_hasCompactSupport hc.smul_right + calc + _ = ∫ v, ∑ i : Fin 3, F v i * spatialPartial g v i := by + congr 1; funext v; simp only [F, PiLp.smul_apply, smul_eq_mul, Finset.mul_sum, mul_assoc] + _ = ∑ i : Fin 3, ∫ v, F v i * spatialPartial g v i := integral_finsetSum _ (fun i _ => hi i) + _ = ∑ i : Fin 3, -(∫ v, spatialPartial (fun w => F w i) v i * g v) := by + congr 1; funext i; exact integral_mul_spatialPartial (hfi i) hg hc i + _ = -(∫ v, divergence F v * g v) := by + rw [Finset.sum_neg_distrib, ← integral_finsetSum _ (fun i _ => hi' i)] + congr 2; funext v; simp only [divergence, Finset.sum_mul] + _ = -(∫ v, dot E (g v • velocity v)) := by + congr 1; apply integral_congr_ae; filter_upwards [] with v + rw [show divergence F v = dot (velocity v) E from divergence_energy_lorentz v E B, + dot_smul_right, dot_comm]; ring + _ = _ := by simp only [dot_eq_inner]; rw [integral_inner hv E] + +lemma hasFDerivAt_integral_uniform_support + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {U : Set H} {K : Set Vec} {F : H × Vec → W} {p : H} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + HasFDerivAt (fun x => ∫ v : Vec, F (x,v)) + ((∫ v : Vec, fderiv ℝ F (p,v)).comp (ContinuousLinearMap.inl ℝ H Vec)) p := by + have h := hasFDerivAt_convolution_right_with_param + (μ := (volume : Measure Vec)) (ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] W →L[ℝ] W) + (g := fun x v => F (x,v)) hU hK (fun x v hx hv => hzero x hx v hv) + (locallyIntegrable_const (1 : ℝ)) hF (p,0) hp + have hi : HasFDerivAt (fun x : H => (x,(0 : Vec))) + (ContinuousLinearMap.inl ℝ H Vec) p := by + convert (hasFDerivAt_id p).prodMk (hasFDerivAt_const (0 : Vec) p) using 1 <;> rfl + have hc := h.comp p hi + have hls : (ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] W →L[ℝ] W) 1 = + ContinuousLinearMap.id ℝ W := by ext w; simp + change HasFDerivAt (fun x => convolution (fun _ => (1 : ℝ)) (fun v => F (x,v)) + (ContinuousLinearMap.lsmul ℝ ℝ) volume 0) + ((convolution (fun _ => (1 : ℝ)) (fun v => fderiv ℝ F (p,v)) + (ContinuousLinearMap.precompR (H × Vec) (ContinuousLinearMap.lsmul ℝ ℝ)) volume 0).comp + (ContinuousLinearMap.inl ℝ H Vec)) p at hc + simp only [convolution_def, zero_sub, ContinuousLinearMap.id_apply, + ContinuousLinearMap.precompR_apply, ContinuousLinearMap.compL_apply, hls, + ContinuousLinearMap.id_comp] at hc + have hn (x : H) : (∫ v : Vec, F (x,-v)) = ∫ v : Vec, F (x,v) := + integral_neg_eq_self (fun v : Vec => F (x,v)) volume + have hn' : (∫ v : Vec, fderiv ℝ F (p,-v)) = ∫ v : Vec, fderiv ℝ F (p,v) := + integral_neg_eq_self (fun v : Vec => fderiv ℝ F (p,v)) volume + simpa only [hn, hn'] using hc + +lemma compactSupport_of_zero_off {W : Type*} [Zero W] + {K : Set Vec} {g : Vec → W} (hK : IsCompact K) + (hz : ∀ v ∉ K, g v = 0) : HasCompactSupport g := by + apply hK.of_isClosed_subset (isClosed_tsupport _) + apply closure_minimal _ hK.isClosed + intro v hv + by_contra hn + exact hv (hz v hn) + +lemma compactSupport_param_fderiv + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] + {U : Set H} {K : Set Vec} {F : H × Vec → W} {p : H} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + HasCompactSupport (fun v : Vec => fderiv ℝ F (p,v)) := by + apply compactSupport_of_zero_off hK + intro v hv + have hn : U ×ˢ Kᶜ ∈ 𝓝 (p,v) := + (hU.prod hK.isClosed.isOpen_compl).mem_nhds ⟨hp,hv⟩ + have hz : F =ᶠ[𝓝 (p,v)] (fun _ => 0) := by + filter_upwards [hn] with y hy + exact hzero y.1 hy.1 y.2 hy.2 + simpa only [fderiv_const_apply] using hz.fderiv_eq (𝕜 := ℝ) + +lemma integrable_param_fderiv + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] + {U : Set H} {K : Set Vec} {F : H × Vec → W} {p : H} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + Integrable (fun v : Vec => fderiv ℝ F (p,v)) := by + have hc : Continuous (fun v : Vec => fderiv ℝ F (p,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hp, mem_univ _⟩) + exact hc.integrable_of_hasCompactSupport (compactSupport_param_fderiv hU hK hp hzero) + +lemma fderiv_integral_uniform_support_apply + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {U : Set H} {K : Set Vec} {F : H × Vec → W} {p : H} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) (b : H) : + fderiv ℝ (fun x => ∫ v : Vec, F (x,v)) p b = + ∫ v : Vec, fderiv ℝ F (p,v) (b,0) := by + rw [(hasFDerivAt_integral_uniform_support hU hK hp hF hzero).fderiv] + simpa only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.inl_apply] using + (ContinuousLinearMap.integral_apply (integrable_param_fderiv hU hK hp hF hzero) (b,0)) + +lemma fderiv_weighted_param {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {F : H × Vec → ℝ} {w : Vec → ℝ} {p : H} {v : Vec} + (hF : DifferentiableAt ℝ F (p,v)) (hw : DifferentiableAt ℝ w v) (b : H) : + fderiv ℝ (fun z : H × Vec => w z.2 * F z) (p,v) (b,0) = + w v * fderiv ℝ F (p,v) (b,0) := by + have hdw := hw.hasFDerivAt.comp (p,v) (hasFDerivAt_snd (𝕜 := ℝ) (p := (p,v))) + have he := congrArg (fun L : (H × Vec) →L[ℝ] ℝ => L (b,0)) (hdw.mul hF.hasFDerivAt).fderiv + change fderiv ℝ (fun z : H × Vec => w z.2 * F z) (p,v) (b,0) = + w v * fderiv ℝ F (p,v) (b,0) + F (p,v) * fderiv ℝ w v 0 at he + simpa only [map_zero, mul_zero, add_zero] using he + +lemma fderiv_weighted_integral_uniform_support_apply + {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {U : Set H} {K : Set Vec} {F : H × Vec → ℝ} {p : H} {w : Vec → ℝ} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) (hw : ContDiff ℝ 1 w) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) (b : H) : + fderiv ℝ (fun x => ∫ v : Vec, w v * F (x,v)) p b = + ∫ v : Vec, w v * fderiv ℝ F (p,v) (b,0) := by + have hG : ContDiffOn ℝ 1 (fun z : H × Vec => w z.2 * F z) (U ×ˢ univ) := + (hw.comp contDiff_snd).contDiffOn.mul hF + rw [fderiv_integral_uniform_support_apply hU hK hp hG + (fun x hx v hv => by simp only [hzero x hx v hv, mul_zero])] + apply integral_congr_ae + filter_upwards [] with v + exact fderiv_weighted_param + (((hF (p,v) ⟨hp,mem_univ _⟩).contDiffAt + ((hU.prod isOpen_univ).mem_nhds ⟨hp,mem_univ _⟩)).differentiableAt (by simp)) + (hw.differentiable (by simp) v) b + +lemma clm_spacetime_velocity_split (L : ((ℝ × Vec) × Vec) →L[ℝ] ℝ) + (u K : Vec) : + L ((1,u),K) = L ((1,0),0) + + ∑ i : Fin 3, u i * L ((0,basis i),0) + + ∑ i : Fin 3, K i * L ((0,0),basis i) := by + let A : Vec →L[ℝ] ((ℝ × Vec) × Vec) := + ((0 : Vec →L[ℝ] ℝ).prod (ContinuousLinearMap.id ℝ Vec)).prod 0 + let B : Vec →L[ℝ] ((ℝ × Vec) × Vec) := + (0 : Vec →L[ℝ] (ℝ × Vec)).prod (ContinuousLinearMap.id ℝ Vec) + have hu := clm_sum_basis (L.comp A) u + have hK := clm_sum_basis (L.comp B) K + change L ((0,u),0) = ∑ i : Fin 3, u i * L ((0,basis i),0) at hu + change L ((0,0),K) = ∑ i : Fin 3, K i * L ((0,0),basis i) at hK + rw [← hu, ← hK, ← map_add, ← map_add] + congr 1 + ext <;> simp + +lemma fderiv_velocity_slice {F : (ℝ × Vec) × Vec → ℝ} {p : ℝ × Vec} {v : Vec} + (hF : DifferentiableAt ℝ F (p,v)) (b : Vec) : + fderiv ℝ (fun w => F (p,w)) v b = fderiv ℝ F (p,v) ((0,0),b) := by + have he := hF.hasFDerivAt.comp v + ((hasFDerivAt_const p v).prodMk (hasFDerivAt_id v)) + exact congrArg (fun L : Vec →L[ℝ] ℝ => L b) he.fderiv + +lemma integrable_param_fderiv_apply_weight + {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {U : Set H} {K : Set Vec} {F : H × Vec → ℝ} {p : H} {w : Vec → ℝ} + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) (hw : Continuous w) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) (b : H × Vec) : + Integrable (fun v => w v * fderiv ℝ F (p,v) b) := by + have hc : Continuous (fun v : Vec => fderiv ℝ F (p,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hp, mem_univ _⟩) + apply (hw.mul (hc.clm_apply continuous_const)).integrable_of_hasCompactSupport + apply (compactSupport_param_fderiv hU hK hp hzero).comp_left + (g := fun L : (H × Vec) →L[ℝ] ℝ => L b) (by simp) |>.mul_left + +lemma q_mul_velocity (v : Vec) (i : Fin 3) : q v * velocity v i = v i := by + simp only [velocity, PiLp.smul_apply, smul_eq_mul] + rw [← mul_assoc, mul_inv_cancel₀ (ne_of_gt (q_pos v)), one_mul] + +lemma particle_energy_balance_param + {U : Set (ℝ × Vec)} {K : Set Vec} {F : (ℝ × Vec) × Vec → ℝ} + {p : ℝ × Vec} (E B : Vec) + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) + (hV : ∀ v, fderiv ℝ F (p,v) ((1,velocity v), E + cross (velocity v) B) = 0) : + fderiv ℝ (fun y => ∫ v : Vec, q v * F (y,v)) p (1,0) + + ∑ i : Fin 3, fderiv ℝ (fun y => ∫ v : Vec, v i * F (y,v)) p (0,basis i) = + dot E (∫ v : Vec, F (p,v) • velocity v) := by + have hdiff (v : Vec) : DifferentiableAt ℝ F (p,v) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hp, mem_univ _⟩)).differentiableAt (by simp) + have hs : ContDiff ℝ 1 (fun v : Vec => F (p,v)) := by + apply contDiffOn_univ.mp + exact hF.comp ((contDiff_const.prodMk contDiff_id).contDiffOn) + (fun v _ => ⟨hp,mem_univ v⟩) + have hc : HasCompactSupport (fun v : Vec => F (p,v)) := + compactSupport_of_zero_off hK (hzero p hp) + have hv (v : Vec) : + q v * fderiv ℝ F (p,v) ((1,0),0) + + ∑ i : Fin 3, v i * fderiv ℝ F (p,v) ((0,basis i),0) = + -(q v * ∑ i : Fin 3, (E + cross (velocity v) B) i * + spatialPartial (fun w => F (p,w)) v i) := by + have he := congrArg (fun r : ℝ => q v * r) (hV v) + rw [clm_spacetime_velocity_split] at he + simp only [mul_add, Finset.mul_sum, ← mul_assoc, q_mul_velocity, mul_zero] at he + simpa only [spatialPartial, fderiv_velocity_slice (hdiff v), Finset.mul_sum, ← mul_assoc] using + (eq_neg_of_add_eq_zero_left he) + have hproj (i : Fin 3) : ContDiff ℝ 1 (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + have hint := integrable_param_fderiv_apply_weight hU hK hp hF + (contDiff_q (k := 1)).continuous hzero (((1 : ℝ),(0 : Vec)),(0 : Vec)) + have hint' (i : Fin 3) := integrable_param_fderiv_apply_weight hU hK hp hF + (hproj i).continuous hzero (((0 : ℝ),basis i),(0 : Vec)) + rw [fderiv_weighted_integral_uniform_support_apply hU hK hp hF contDiff_q hzero] + simp_rw [fderiv_weighted_integral_uniform_support_apply hU hK hp hF (hproj _) hzero] + rw [← integral_finsetSum _ (fun i _ => hint' i), ← integral_add hint + (integrable_finsetSum _ (fun i _ => hint' i))] + calc + _ = ∫ v : Vec, -(q v * ∑ i : Fin 3, (E + cross (velocity v) B) i * + spatialPartial (fun w => F (p,w)) v i) := by + apply integral_congr_ae + filter_upwards [] with v + exact hv v + _ = _ := by rw [integral_neg, integral_momentum_work hs hc]; ring + +def particleBySpacetime (f : Particle) : (ℝ × Vec) × Vec → ℝ := + fun z => f (z.1.1,z.1.2,z.2) + +lemma contDiff_reassociate {k : ℕ∞ω} : + ContDiff ℝ k (fun z : (ℝ × Vec) × Vec => (z.1.1,z.1.2,z.2)) := + contDiff_fst.fst.prodMk (contDiff_fst.snd.prodMk contDiff_snd) + +lemma particle_spacetime_local_data {s : Solution} {t : ℝ} (x : Vec) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hc : CompactOnFiniteHorizons s) (ht : 0 < t) : + ∃ (U : Set (ℝ × Vec)) (K : Set Vec), + IsOpen U ∧ IsCompact K ∧ (t,x) ∈ U ∧ + ContDiffOn ℝ 1 (particleBySpacetime s.f) (U ×ˢ univ) ∧ + ∀ p ∈ U, ∀ v ∉ K, particleBySpacetime s.f (p,v) = 0 := by + obtain ⟨K₀,hK₀,hzero⟩ := hc (t+1) (by linarith) + let U : Set (ℝ × Vec) := {p | p.1 ∈ Ioo 0 (t+1)} + refine ⟨U, Prod.snd '' K₀, isOpen_Ioo.preimage continuous_fst, + hK₀.image continuous_snd, ⟨ht,by linarith⟩, ?_, ?_⟩ + · exact hf.comp contDiff_reassociate.contDiffOn (fun z hz => le_of_lt hz.1.1) + · intro p hp v hv + change s.f (p.1,p.2,v) = 0 + by_contra hn + have hh : (p.2,v) ∈ tsupport (fun z => s.f (p.1,z)) := subset_tsupport _ hn + have hm := hzero p.1 ⟨le_of_lt hp.1, le_of_lt hp.2⟩ hh + exact hv ⟨(p.2,v),hm,rfl⟩ + +lemma fderiv_particleBySpacetime {f : Particle} {t : ℝ} {x v u K : Vec} + (hf : DifferentiableAt ℝ f (t,x,v)) : + fderiv ℝ (particleBySpacetime f) ((t,x),v) ((1,u),K) = + fderiv ℝ f (t,x,v) (1,u,K) := by + let A : ((ℝ × Vec) × Vec) →L[ℝ] (ℝ × Phase) := + ((ContinuousLinearMap.fst ℝ ℝ Vec).comp + (ContinuousLinearMap.fst ℝ (ℝ × Vec) Vec)).prod + (((ContinuousLinearMap.snd ℝ ℝ Vec).comp + (ContinuousLinearMap.fst ℝ (ℝ × Vec) Vec)).prod + (ContinuousLinearMap.snd ℝ (ℝ × Vec) Vec)) + have hA : HasFDerivAt (fun z : (ℝ × Vec) × Vec => (z.1.1,z.1.2,z.2)) A + ((t,x),v) := + hasFDerivAt_fst.fst.prodMk (hasFDerivAt_fst.snd.prodMk hasFDerivAt_snd) + have he := congrArg (fun L : ((ℝ × Vec) × Vec) →L[ℝ] ℝ => L ((1,u),K)) + (hf.hasFDerivAt.comp ((t,x),v) hA).fderiv + exact he + +lemma particle_spacetime_vlasov {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : Equations s) + {t : ℝ} (ht : 0 < t) (x v : Vec) : + fderiv ℝ (particleBySpacetime s.f) ((t,x),v) + ((1,velocity v),s.E (t,x) + cross (velocity v) (s.B (t,x))) = 0 := by + have hd := particle_differentiableAt_positive hf ht x v + rw [fderiv_particleBySpacetime hd, full_directional_derivative hd] + have he := (heq t (le_of_lt ht)).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at he + +lemma classical_particle_energy_balance {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 < t) (x : Vec) : + fderiv ℝ (fun p : ℝ × Vec => ∫ v : Vec, q v * s.f (p.1,p.2,v)) (t,x) (1,0) + + ∑ i : Fin 3, fderiv ℝ (fun p : ℝ × Vec => ∫ v : Vec, v i * s.f (p.1,p.2,v)) + (t,x) (0,basis i) = dot (s.E (t,x)) (current (fun z => s.f (t,z)) x) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + particle_spacetime_local_data x hs.1 hs.2.2.2.2.2.2.1 ht + exact particle_energy_balance_param (s.E (t,x)) (s.B (t,x)) hU hK hp hF hzero + (particle_spacetime_vlasov hs.1 hs.2.2.2.2.2.2.2.1 ht x) + +lemma contDiffOn_integral_uniform_support + {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {n : ℕ∞} {U : Set H} {K : Set Vec} {F : H × Vec → W} + (hU : IsOpen U) (hK : IsCompact K) + (hF : ContDiffOn ℝ n F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + ContDiffOn ℝ n (fun x => ∫ v : Vec, F (x,v)) U := by + have h := contDiffOn_convolution_right_with_param_comp + (μ := (volume : Measure Vec)) (ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] W →L[ℝ] W) + (v := fun _ : H => (0 : Vec)) contDiffOn_const (g := fun x v => F (x,v)) + hU hK (fun x v hx hv => hzero x hx v hv) (locallyIntegrable_const (1 : ℝ)) hF + have hn (x : H) : convolution (fun _ : Vec => (1 : ℝ)) (fun v => F (x,v)) + (ContinuousLinearMap.lsmul ℝ ℝ) volume 0 = ∫ v : Vec, F (x,v) := by + simp only [convolution_def, zero_sub, ContinuousLinearMap.lsmul_apply, one_smul] + exact integral_neg_eq_self (fun v : Vec => F (x,v)) volume + simpa only [hn] using h + +lemma integral_vec_apply {g : Vec → Vec} (hg : Integrable g) (i : Fin 3) : + (∫ v : Vec, g v) i = ∫ v : Vec, g v i := by + exact ((PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hg).symm + +lemma param_moment_component + {U : Set (ℝ × Vec)} {K : Set Vec} {F : (ℝ × Vec) × Vec → ℝ} + {p : ℝ × Vec} (hK : IsCompact K) (hp : p ∈ U) + (hF : ContinuousOn F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) (i : Fin 3) : + (∫ v : Vec, F (p,v) • v) i = ∫ v : Vec, v i * F (p,v) := by + have hc := hF.comp_continuous (continuous_const.prodMk continuous_id) + (fun v : Vec => show (p,v) ∈ U ×ˢ univ from ⟨hp,mem_univ _⟩) + have hi : Integrable (fun v : Vec => F (p,v) • v) := + (hc.smul continuous_id).integrable_of_hasCompactSupport + (compactSupport_of_zero_off hK (hzero p hp)).smul_right + rw [integral_vec_apply hi] + simp only [PiLp.smul_apply, smul_eq_mul, mul_comm] + +def particleEnergy (s : Solution) (p : ℝ × Vec) : ℝ := + ∫ v : Vec, q v * s.f (p.1,p.2,v) + +def particleFlux (s : Solution) (p : ℝ × Vec) : Vec := + ∫ v : Vec, s.f (p.1,p.2,v) • v + +def totalEnergy (s : Solution) (p : ℝ × Vec) : ℝ := + (‖s.E p‖^2 + ‖s.B p‖^2)/2 + particleEnergy s p + +def totalFlux (s : Solution) (p : ℝ × Vec) : Vec := + cross (s.E p) (s.B p) + particleFlux s p + +lemma classical_particle_energy_flux_regular {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 < t) (x : Vec) : + ContDiffAt ℝ 1 (particleEnergy s) (t,x) ∧ ContDiffAt ℝ 1 (particleFlux s) (t,x) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + particle_spacetime_local_data x hs.1 hs.2.2.2.2.2.2.1 ht + constructor + · apply (contDiffOn_integral_uniform_support (n := 1) hU hK + ((contDiff_q.comp contDiff_snd).contDiffOn.mul hF) + (fun p hp v hv => by simp only [hzero p hp v hv, mul_zero])).contDiffAt (hU.mem_nhds hp) + · apply (contDiffOn_integral_uniform_support (n := 1) hU hK + (hF.smul contDiff_snd.contDiffOn) + (fun p hp v hv => by + change particleBySpacetime s.f (p,v) • v = 0 + rw [hzero p hp v hv, zero_smul])).contDiffAt (hU.mem_nhds hp) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ParticleTame.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ParticleTame.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ab72ccc6b4985db5e1f8a6afb065fc7765d8a43 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ParticleTame.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.HighFlow + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma smooth_compact_jets_bound {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → W} + (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ i : ℕ, i ≤ n → ∀ x, ‖iteratedFDeriv ℝ i f x‖ ≤ C := by + have hb (i : Fin (n+1)) : ∃ C : ℝ, 0 ≤ C ∧ ∀ x, ‖iteratedFDeriv ℝ i f x‖ ≤ C := by + obtain ⟨C,hC⟩ := (hf.continuous_iteratedFDeriv (by exact_mod_cast le_top)).bounded_above_of_compact_support + (hc.iteratedFDeriv (i:ℕ)) + exact ⟨max C 0,le_max_right _ _,fun x => (hC x).trans (le_max_left _ _)⟩ + choose C hC hbound using hb + refine ⟨∑ i, C i,Finset.sum_nonneg (fun i _ => hC i),?_⟩ + intro i hi x + exact (hbound ⟨i,by omega⟩ x).trans (Finset.single_le_sum (fun j _ => hC j) (Finset.mem_univ _)) + +lemma transported_derivative_tame {d : Datum} (hd : Admissible d) + (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ (s : Solution), PicardRegular d s → TransportFor s E B → + ∀ T : ℝ, T∈Icc (0:ℝ) 1 → SpatialJetBound n T A E B → + ∀ H : ℝ, 0 ≤ H → + (∀ t∈Icc 0 T, ∀ x, ‖iteratedFDeriv ℝ (n+1) (fun y => E (t,y)) x‖ ≤ H ∧ + ‖iteratedFDeriv ℝ (n+1) (fun y => B (t,y)) x‖ ≤ H) → + ∀ t∈Icc 0 T, ∀ z, ‖iteratedFDeriv ℝ (n+1) (fun w => s.f (t,w)) z‖ ≤ C*(1+H) := by + obtain ⟨D,hD,hdjet⟩ := smooth_compact_jets_bound hd.1 hd.2.1 (n+1) + obtain ⟨L,hL,hlow⟩ := SmoothLorentzFlow.reversePath_derivatives_bound n A hA + obtain ⟨K,hK,htop⟩ := SmoothLorentzFlow.backward_derivative_tame n hn A hA + obtain ⟨C,hC,hcomp⟩ := tame_iteratedFDeriv_comp (E:=Phase) (F:=Phase) (G:=ℝ) n hn (1+D+L) (by linarith) + refine ⟨C*(1+D+K),by positivity,?_⟩ + intro E B hE hB s hs hV T hT hb H hH hh t ht z + obtain ⟨F⟩ := exists_smoothLorentzFlow hE hB + have hback : ContDiff ℝ ∞ (fun z => F.backward (t,z)) := + F.smooth_backward.comp (contDiff_const.prodMk contDiff_id) + have hrep : (fun z => s.f (t,z))=d.f₀ ∘ (fun z => F.backward (t,z)) := by + funext z + rw [F.transport_for_inverse hs.smooth_f hV,hs.initial_f] + rfl + rw [hrep] + have hj := hcomp d.f₀ (fun z => F.backward (t,z)) hd.1 hback z + (fun i hi hi' => (hdjet i (by omega) _).trans (by linarith)) (by + intro i hi hi' + have he : (fun w => F.reversePath t w t)=(fun w => F.backward (t,w)) := by + funext w; exact F.reversePath_end t w + have hl := hlow E B hE hB F T hT hb t ht t ⟨ht.1,le_rfl⟩ z i hi hi' + rw [he] at hl + exact hl.trans (by linarith)) + have hf := hdjet (n+1) le_rfl (F.backward (t,z)) + have hg := htop E B hE hB F T hT hb H hH hh t ht z + refine hj.trans (mul_le_mul_of_nonneg_left (by gcongr) hC |>.trans ?_) + nlinarith [mul_nonneg hC hH,mul_nonneg (mul_nonneg hC hD) hH] + +lemma norm_iteratedFDeriv_phase_slice {f : Phase → ℝ} (hf : ContDiff ℝ ∞ f) + (n : ℕ) (x v : Vec) : + ‖iteratedFDeriv ℝ n (fun y => f (y,v)) x‖ ≤ ‖iteratedFDeriv ℝ n f (x,v)‖ := by + let g : Phase → ℝ := fun z => f (z+(0,v)) + have hg : ContDiff ℝ ∞ g := hf.comp (contDiff_id.add contDiff_const) + have hh := norm_iteratedFDeriv_precomp_contraction g hg (ContinuousLinearMap.inl ℝ Vec Vec) + (by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro w + simp only [ContinuousLinearMap.inl_apply,Prod.norm_mk,norm_zero,max_eq_left (norm_nonneg w),one_mul] + exact le_rfl) n x + simpa only [g,Function.comp_def,ContinuousLinearMap.inl_apply,iteratedFDeriv_comp_add_right, + Prod.mk_add_mk,add_zero,zero_add] using hh + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalDivision.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalDivision.lean new file mode 100644 index 0000000000000000000000000000000000000000..342a26604e3991430e79dfd978a662d5d0680528 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalDivision.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalAngularBound + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def transportConeCoefficient (i : Fin 3) (p : Phase) : ℝ := + ((coneRadius 0 p.1)^2)⁻¹*transportAngularCore (coneDirection 0 p.1) (velocity p.2) i + +def coneLorentz (s : Solution) (t : ℝ) (x : Vec) (p : Phase) : Vec := + s.E (t-coneRadius 0 p.1,x+p.1)+cross (velocity p.2) (s.B (t-coneRadius 0 p.1,x+p.1)) + +lemma transportConeCoefficient_contDiffAt (i : Fin 3) {p : Phase} (hp : p.1≠0) : + ContDiffAt ℝ 1 (transportConeCoefficient i) p := by + have hz : (0:Vec)≠p.1 := hp.symm + have hr := (contDiffAt_coneRadius (k:=1) hz).comp p contDiffAt_fst + have hn := (contDiffAt_coneDirection (k:=1) hz).comp p contDiffAt_fst + have hu : ContDiffAt ℝ 1 (fun z : Phase => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hA := contDiffAt_transportAngularCore hn hu (cone_denom_pos p.2 _ (coneDirection_norm hz)).ne' + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p hA + exact ((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz)))).mul hi + +lemma coneLorentz_contDiffAt {s : Solution} + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {t : ℝ} (x : Vec) {p : Phase} (hp : p.1≠0) (ht : 0 velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have ha : ContDiffAt ℝ 1 (fun z : Phase => (t-coneRadius 0 z.1,x+z.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_const.add contDiffAt_fst) + have he := (field_contDiffAt_positive hE ht (x+p.1)).comp p ha + have hb := (field_contDiffAt_positive hB ht (x+p.1)).comp p ha + exact he.add (contDiff_cross.contDiffAt.comp p (hu.prodMk hb)) + +lemma coneLorentz_vlasov_before {s : Solution} {H t : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : EquationsBefore s H) + (htH : t≤H) (x : Vec) {z : Vec} (hz : z∈retardedSpaceDomain t 0) (v : Vec) : + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (1,velocity v,coneLorentz s t x (z,v))=0 := by + have hr : 0 transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) := by + have hk : ContDiffOn ℝ 1 (transportConeCoefficient i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (transportConeCoefficient_contDiffAt i hp.1.1.symm).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + have hh := retarded_spatial_annulus (e:=e) hf hc hε hεR hRt hk hK + (fun z hz v => coneLorentz_vlasov_before hf heq htH x hz v) + unfold transportSpatialFlux transportConeCoefficient at * + simpa only [smul_smul,smul_eq_mul,mul_assoc] using hh + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalGeometryCutoffDensity.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalGeometryCutoffDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8a8d3e6a821f1aba13d45b3e5a28aa17c8353b5 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/PhysicalGeometryCutoffDensity.lean @@ -0,0 +1,267 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.CutoffSourceTangent + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma projected_geometry_cutoff_bin_cost {A T r f w θ φ : ℝ} {n v W : Vec} + (hA0 : 0 ≤ A) (hA : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x| ≤ A) + (hn : ‖n‖=1) (hw : 0hs.nonnegative _ hzT _) Q + +lemma physicalBin_density_near {s : Solution} {X V : ℝ→Vec} + (hV : Measurable V) (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) + {C p θ φ : ℝ} (hφ : 0 ≤ φ) (hD : B.Dmax ≤ 8*φ^2) + (hdensity : ∀z∈physicalBinBase V B J, + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ≤ ENNReal.ofReal (128*C*p^3*θ^2)) : + (∫⁻z : ConeCoordinate,physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B J) ≤ + ENNReal.ofReal (128*C*p^3*θ^2)* + (volume J*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + have hb : (∫⁻z : ConeCoordinate,physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B J) ≤ + ∫⁻_z : ConeCoordinate,ENNReal.ofReal (128*C*p^3*θ^2) ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact hdensity z hz + refine hb.trans ?_ + rw [lintegral_const] + exact mul_le_mul' le_rfl (physicalBinMeasure_volume hV B hJ hφ hD) + +lemma PhaseFlowOn.physicalBin_density_far {s : Solution} {T a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (C : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hS0 : tsupport (fun z=>s.f (0,z))⊆S) (hJ : Icc a b⊆Icc 0 T) + (hr : 0(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + C z.1 z.2.1 z.2.2 ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) C (Icc a b)) ≤ + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T C S a b (max 0 (a-C.rmax)) (min T (b-C.rmin))) / + ENNReal.ofReal (C.rmin^2*C.Dmin) := by + have hmass := F.physicalBin_weighted_occupation hs hT zX C hS hS0 hJ hr.le hD.le + have hμ : physicalBinMeasure (fun t=>(F.flow zX t).2) C (Icc a b)= + physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) C (Icc a b) := by + unfold physicalBinMeasure + rw [physicalBinBase_prefix zX C hJ] + rw [hμ] at hmass + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have he : (∫⁻z : ConeCoordinate,physicalBinDensity s + (fun t=>(F.flow zX t).1) (fun t=>(F.flow zX t).2) C z.1 z.2.1 z.2.2 + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) C (Icc a b))= + ∫⁻z : ConeCoordinate,physicalBinDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + C z.1 z.2.1 z.2.2 ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) C (Icc a b) := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable C measurableSet_Icc)] with z hz + simp only [physicalBinDensity,prefixFlow,prefixClamp_eq (hJ hz.1)] + rw [he] at hmass + apply (ENNReal.le_div_iff_mul_le (Or.inl (ENNReal.ofReal_pos.mpr (by positivity)).ne') + (Or.inl ENNReal.ofReal_ne_top)).mpr + simpa only [mul_comm] using hmass + +lemma PhaseFlowOn.geometry_cutoff_near_far {s : Solution} {T a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hS0 : tsupport (fun z=>s.f (0,z))⊆S) (hJ : Icc a b⊆Icc 0 T) + {A C w p θ φ : ℝ} + (hA0 : 0 ≤ A) (hA : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x| ≤ A) + (hw : 0(prefixFlow F.flow T zX t).2) B (Icc a b), + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2 ≤ ENNReal.ofReal (128*C*p^3*θ^2)) : + (∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + B T w Q z ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b)) ≤ + min (ENNReal.ofReal (78400000*A*φ^2/θ)*ENNReal.ofReal (128*C*p^3*θ^2)* + (volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))) + (ENNReal.ofReal (78400000*A*φ^2/θ)* + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin))) := by + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hb := physicalGeometryCutoff_integral_bound (X := fun t => (prefixFlow F.flow T zX t).1) + hs hα.snd.measurable B measurableSet_Icc hJ + hA0 hA hw hθ hφ hsmall hr hd hDhi + (fun t ht=>by simpa only [prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht) Q + refine le_min (hb.trans ?_) (hb.trans ?_) + · exact (mul_le_mul' le_rfl + (physicalBin_density_near hα.snd.measurable B measurableSet_Icc hφ hDhi hdensity)).trans_eq + (mul_assoc _ _ _).symm + · exact mul_le_mul' le_rfl (F.physicalBin_density_far hs hT zX B hS hS0 hJ hr hD) + +lemma PhaseFlowOn.closedEulerian_stable_budget {s : Solution} + {T M A P L a b massScale φ C p len I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (np nf : ℕ) (hp : p=64*(2:ℝ)^np) (hφeq : φ=(2:ℝ)⁻¹^nf) + (ha : 0 ≤ a) (hb : b ≤ T) (hlen : 0 < len) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hstable : 2*len ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hrmax : 0 ≤ B.rmax) (hrad : B.rmax ≤ len) + (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (hI : 0 < I) : + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) ≤ + ENNReal.ofReal (40*B.rmax)/ENNReal.ofReal (p/256)* + (ENNReal.ofReal (∫ x : Vec,totalEnergy s (0,x))+ + ENNReal.ofReal I/ENNReal.ofReal len*jointEnergyBudget s F.flow zX T 4 + (max 0 (a-B.rmax-len)) (min T (b+len)) I (np,nf)) := by + have hp0 : 0 < p := by rw [hp]; positivity + have ho := F.small_closed_bin_refined_stable hs hT zX B hS np nf hp hφeq + ha hb hlen hM hA hP hL hm hφ hφ1 hconst hstable hqmin hqmax hmq hmw + hr hrmax hrad hd hDlo hDhi hw HX HZ hI + have hbnd := occupation_divide_cell + (p:=ENNReal.ofReal (p/256)) (len:=ENNReal.ofReal len) + (ENNReal.ofReal_pos.mpr (by positivity)).ne' ENNReal.ofReal_ne_top + (ENNReal.ofReal_pos.mpr hlen).ne' ENNReal.ofReal_ne_top ho + have he := F.closedBinEulerian_occupation_le (c:=max 0 (a-B.rmax)) (d:=min T (b-B.rmin)) + hs hT zX B hS (Icc_subset_Icc ha hb) + (Icc_subset_Icc (le_max_left _ _) (min_le_left _ _)) + refine he.trans ((show labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) ≤ + labelOccupation (fun z=>s.f (0,z)) (closedBinHits F.flow zX B S a b 0 T) from ?_).trans hbnd) + unfold labelOccupation + apply lintegral_mono + intro z + apply mul_le_mul' le_rfl + apply measure_mono + rintro u ⟨hz,hu,t,ht,hbin⟩ + exact ⟨hz,⟨(le_max_left _ _).trans hu.1,hu.2.trans (min_le_left _ _)⟩,t,ht,hbin⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/QuadIndexEquiv.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/QuadIndexEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..943a7a0e6014e6d9a2e1ed1de2938ae4af4f5e9e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/QuadIndexEquiv.lean @@ -0,0 +1,248 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.CappedRepresentativePos + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def quadIndexEquiv : (Fin 4→ℕ) ≃ ℕ×ℕ×ℕ×ℕ where + toFun k := (k 0,k 1,k 2,k 3) + invFun k := ![k.1,k.2.1,k.2.2.1,k.2.2.2] + left_inv k := by funext i; fin_cases i <;> rfl + right_inv k := by rcases k with ⟨a,b,c,d⟩; rfl + +lemma tsum_quad_index (f : (Fin 4→ℕ)→ℝ≥0∞) : + (∑'k,f k)=∑'np,∑'nt,∑'nf,∑'nr,f ![np,nt,nf,nr] := by + have h := quadIndexEquiv.symm.tsum_eq f + rw [←h] + simp only [ENNReal.tsum_prod'] + rfl + +lemma ennreal_capped_half_sum : + (∑'n : ℕ,ENNReal.ofReal ((2:ℝ)⁻¹^n)) = 2 := by + have hsum : Summable (fun n : ℕ=>(2:ℝ)⁻¹^n) := summable_geometric_of_lt_one (by norm_num) (by norm_num) + rw [←ENNReal.ofReal_tsum_of_nonneg (fun n=>by positivity) hsum] + rw [tsum_geometric_of_lt_one (by norm_num : (0:ℝ)≤2⁻¹) (by norm_num : (2:ℝ)⁻¹<1)] + norm_num + +lemma ennreal_tsum_indicator_lt (N : ℕ) (c : ℝ≥0∞) : + (∑'n : ℕ,if nhn (Finset.mem_range.mpr h)) + _ = _ := by + rw [Finset.sum_ite_of_true (fun n hn=>Finset.mem_range.mp hn)] + simp only [Finset.sum_const,Finset.card_range,nsmul_eq_mul] + +lemma tsum_quad_of_radial_bound (f : (Fin 4→ℕ)→ℝ≥0∞) (N : ℕ) (c : ℝ≥0∞) + (h : ∀np nt nf, (∑'nr,f ![np,nt,nf,nr]) ≤ + (if np simp [hp] + _ = c*(2*(N:ℝ≥0∞)^2) := by + rw [ennreal_tsum_indicator_lt] + simp only [ennreal_tsum_indicator_lt] + ring + +lemma Admissible.geometry_cutoff_stable_radial_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (np nθ nφ : ℕ) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w ≤ P → + sourceRepresentative np ≤ 128*P → + cappedRepresentative nθ ≤ cappedRepresentative nφ/16 → + 32 ≤ cappedRepresentative nφ*w → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V (B nr) T w Q z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w* + Real.sqrt (Real.log (2+P))*cappedRepresentative nφ) := by + obtain ⟨C,hC,hbound⟩ := hd₀.geometry_cutoff_baseline_radial_sum + refine ⟨1536*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q np nθ nφ a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hpP hsmall hwφ hband HX HZ + dsimp only + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w φ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hφ : 0 < φ := cappedRepresentative_pos _ + have hI : 0 < I := sq_pos_of_pos (div_pos hw hP) + have hlam : 0 < lam := stabilityLength_pos hP (by norm_num) hM hp hw hφ + have hlen : 0 < len := lt_min hI (by positivity) + have hlenI : len ≤ I := min_le_left _ _ + have hlenlam : 2*len ≤ lam := by + have hh : len ≤ lam/2 := min_le_right _ _ + linarith + have hm : 0 < m := div_pos (lt_min hp hw) (by norm_num) + have hmq : m ≤ p/128 := div_le_div_of_nonneg_right (min_le_left _ _) (by norm_num) + have hmw : m ≤ w/8 := by + have hh : min p w ≤ w := min_le_right _ _ + dsimp [m] + linarith + have hstable : 2*len ≤ (128*(P/m)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2 := by + dsimp only [m,L] + rw [stability_massScale_identity] + convert hlenlam using 1; norm_num [lam] + have hbnd := hbound s T F hs hT h0 zX S Q np nθ nφ a b I len w M A P L m 128 + hS hS0 ha hb hlen hlenI hab hM hA hP (by dsimp [L]; linarith) hm hw (by norm_num) + hmq hmw hsmall hwφ hstable hband HX HZ + have hR := direction_clipped_baseline_R_log_bound128 hP hL (show (0:ℝ) < 16384 by norm_num) + hM hA hp hw hφ (cappedRepresentative_le_one _) hpP hwP + have hR' : Real.sqrt I*Real.sqrt (1+I/len)*p*φ ≤ + 256*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L := hR + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hgeom : 6*Real.sqrt I*Real.sqrt (1+I/len)*p*φ^2 ≤ + 1536*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L*φ := by + calc + _ = 6*(Real.sqrt I*Real.sqrt (1+I/len)*p*φ)*φ := by ring + _ ≤ 6*(256*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L)*φ := by gcongr + _ = _ := by ring + apply hbnd.trans + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ C*(1+E)*(1536*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L*φ) := + mul_le_mul_of_nonneg_left hgeom (by positivity) + _ = _ := by dsimp [E,L,φ]; ring + +lemma Admissible.geometry_cutoff_stable_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (N : ℕ) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w ≤ P → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | k 0∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w* + Real.sqrt (Real.log (2+P))*(N:ℝ)^2) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.geometry_cutoff_stable_radial_bound + refine ⟨2*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q N a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hband HX HZ + dsimp only + let E := ∫x : Vec,totalEnergy s (0,x) + let c := C*(1+E)*(1+16384*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P)) + let sector : Set (Fin 4→ℕ) := {k | k 0∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) (Icc a b)) + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hc : 0 ≤ c := by dsimp [c]; positivity + have he (np nt nf nr : ℕ) : ![np,nt,nf,nr]∈sector ↔ + np(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w ![np,nt,nf,nr]) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w ![np,nt,nf,nr]) (Icc a b) := + indicator_of_mem ((he np nt nf nr).mpr hbin) _ + simp_rw [hf] + rw [ite_eq_left ⟨hbin.1,hbin.2.1⟩,←ENNReal.ofReal_mul hc] + exact hbound s T F hs hT h0 zX S Q np nt nf a b w M A P hS hS0 ha hb hab + hM hA hP hL hw hwP hbin.2.2.1 hbin.2.2.2.1 hbin.2.2.2.2 hband HX HZ + · have hf (nr : ℕ) : f ![np,nt,nf,nr]=0 := indicator_of_notMem (fun hk=>hbin ((he np nt nf nr).mp hk)) _ + simp only [hf,tsum_zero] + exact bot_le + have hsum := tsum_quad_of_radial_bound f N (ENNReal.ofReal c) hrad + apply hsum.trans_eq + have heq : (2:ℝ≥0∞)*(N:ℝ≥0∞)^2=ENNReal.ofReal (2*(N:ℝ)^2) := by + rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2), + ENNReal.ofReal_pow (Nat.cast_nonneg N),ENNReal.ofReal_natCast,ENNReal.ofReal_ofNat] + rw [heq,←ENNReal.ofReal_mul hc] + congr 1 + dsimp [c,E] + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/RelativeAngleCoordinate.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/RelativeAngleCoordinate.lean new file mode 100644 index 0000000000000000000000000000000000000000..98f25e7d7f84f9980c53d1c43e11dde9806f51c9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/RelativeAngleCoordinate.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SelectedReceiverWeightBoundFinite + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def relativeAngleCoordinate (v w : Vec) : ℝ := + Real.sqrt ((1-dot (velocity w) (velocity v))/2) + +lemma relative_deficit_pos (v w : Vec) : 0<1-dot (velocity w) (velocity v) := by + have hd := dot_le_norm (velocity w) (velocity v) + have hm := mul_le_mul_of_nonneg_right (norm_velocity_lt_one w).le (norm_nonneg (velocity v)) + rw [one_mul] at hm + linarith [norm_velocity_lt_one v] + +lemma relativeAngleCoordinate_pos (v w : Vec) : 0 + (coneBinMomentumSet (relativeBinRefinement B k) n (velocity w)).indicator g v) (fun _ _=>bot_le) hj + · rw [indicator_of_notMem hv] + exact bot_le + calc + _ ≤ ∫⁻v : Vec,∑j∈Finset.range N, + (coneBinMomentumSet (relativeBinRefinement B j) n (velocity w)).indicator g v := + lintegral_mono hpoint + _ = ∑j∈Finset.range N,∫⁻v : Vec, + (coneBinMomentumSet (relativeBinRefinement B j) n (velocity w)).indicator g v := by + exact lintegral_finsetSum _ (fun j _=> + (hg.indicator (measurableSet_coneBinMomentumSet _ _ _))) + _ = _ := by + apply Finset.sum_congr rfl + intro j _ + exact lintegral_indicator (measurableSet_coneBinMomentumSet _ _ _) _ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/SelectedRemainderPhysical.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/SelectedRemainderPhysical.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d3dc925a6ce839544ed534539a2229efacac14 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/SelectedRemainderPhysical.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.DirectionCutoffs +import OAI.Analysis.VlasovMaxwell.Retarded.SelectedConeTransfer + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def remainderConeKernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (p : ConeKernelState) : Vec := + normalisedRemainder (p.1.1-p.1.2) (velocity (α zX p.1.1).2) + (velocity p.2.2.2) p.2.1 (phaseAcceleration s.E s.B α zX p.1.1) + +lemma selectedConeTriangle_norm_le {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) (J : Set ℝ) + (p : TrianglePhase) : + ‖selectedConeTriangle s α zX T Q A W J p‖≤ + ‖J.indicator W p.1.1 (triangleConeKernel s α zX T A p)‖ := by + classical + by_cases hp : p∈trianglePhaseDomain T + · have hr : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (remainderConeKernel s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + physicalProjectedRemainderDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B w (prefixMomentumForce s F.flow T zX) z := by + classical + unfold physicalProjectedRemainderDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J (z,v))).trans + rw [Set.indicator_of_mem hz.1] + by_cases hp : (z,v)∈trianglePhaseDomain T + · have ht := hJT hz.1 + have he : (prefixAngularMultiplier s F.flow T w hw zX) z.1 + (triangleConeKernel s F.flow zX T (remainderConeKernel s F.flow zX) (z,v))= + (z.1-z.2.1)^2 • angularMultiplierCLM w (prefixFlow F.flow T zX z.1).2 + ((s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))* + (1-dot z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2))) • + signedRemainder (z.1-z.2.1) (velocity (prefixFlow F.flow T zX z.1).2) (velocity v) z.2.2.1 + (fderiv ℝ velocity (prefixFlow F.flow T zX z.1).2 (prefixMomentumForce s F.flow T zX z.1))) := by + simp only [triangleConeKernel,Set.indicator_of_mem hp,remainderConeKernel,triangleKernelState, + normalisedRemainder_eq _ _ _ _ (sub_pos.mpr hp.2.2).ne', + (prefixAngular_highband hw zX ht (hband _ hz.1)).1, + phaseAcceleration,prefixFlow,prefixMomentumForce,prefixClamp_eq ht,lorentzField,lorentzPhase,map_smul] + module + rw [he,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _),ENNReal.ofReal_mul (sq_nonneg _)] + · simp only [triangleConeKernel,Set.indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.selectedRemainder_label_physical_sum {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (hw : 0∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) w + (prefixMomentumForce s F.flow T zX) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + classical + have hA : ContinuousOn (remainderConeKernel s F.flow zX) (coneKernelInterior T) := + (F.normalised_remainder_continuousOn hs zX).mono inter_subset_left + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + rw [F.actualLabelRemainder_eq_normalised zX] + change (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Q p • labelConeKernel s F.flow zX T (remainderConeKernel s F.flow zX) p)‖)≤_ + rw [F.selectedConeTriangle_norm_transfer hs hT zX Q hA hW hJ] + apply (F.selectedConeTriangle_physical_sum hs hT zX Q hA hW hJ hJT hq).trans + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · rw [Set.indicator_of_mem hk,Set.indicator_of_mem hk] + apply lintegral_mono_ae + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV (representativeClosedBin T w k) hJ)] with z hz + exact F.selectedRemainderTriangle_density_le hw zX Q hJT hband _ hz + · rw [Set.indicator_of_notMem hk,Set.indicator_of_notMem hk] + +lemma Admissible.direction_remainder_label_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤ C ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (hw : 0s.f (0,z))⊆S → + 0≤ a → b≤ T → b-a≤(w/P)^2 → + 0< M → 0≤ A → 0< P → 1≤ Real.log (2+P) → w≤ P → P≤ w^2 → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤ P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + (∀t∈Icc a b,w/16≤‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖(Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T (directionSelection T) p • actualLabelRemainder s F.flow zX T p)‖)≤ + ENNReal.ofReal (C*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.projected_remainder_small_sector_log_sum + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hw hS hS0 ha hb hJI hM hA hP hL hwP hPw hsource hq hW HX HZ + dsimp only + apply (F.selectedRemainder_label_physical_sum hs hT hw zX (directionSelection T) + measurableSet_Icc (Icc_subset_Icc ha hb) hq hW).trans + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)*Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1} + have hsub : directionSelection T⊆sector := by + intro k hk + refine ⟨?_,hk.2⟩ + have hφ := cappedRepresentative_pos (k 2) + linarith only [hk.1,hφ] + apply (tsum_set_indicator_mono hsub _).trans + exact hbound s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hJI hM hA hP hL hw hwP hPw hsource hW HX HZ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/ShiftedRho.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ShiftedRho.lean new file mode 100644 index 0000000000000000000000000000000000000000..46a669668cf795555d64d897f443751093dd8537 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/ShiftedRho.lean @@ -0,0 +1,280 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.PositiveExtension +import OAI.Analysis.VlasovMaxwell.Retarded.SourceWaveSpatialIbp + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma RegularParticle.time_moment_derivative {f : Particle} (hf : RegularParticle f) + {w : Vec → ℝ} (hw : ContDiff ℝ 1 w) {t : ℝ} (ht : 0 ∫ v : Vec, w v*f (p.1,p.2,v)) (1,0) (t,x) = + ∫ v : Vec, w v*fderiv ℝ f (t,x,v) (1,0,0) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := hf.local_data ht x + change fderiv ℝ (fun p => ∫ v : Vec, w v*particleBySpacetime f (p,v)) (t,x) (1,0)=_ + rw [fderiv_weighted_integral_uniform_support_apply hU hK hp hF hw hzero] + apply integral_congr_ae + filter_upwards [] with v + rw [fderiv_particleBySpacetime (particle_differentiableAt_positive (s:=⟨f,0,0⟩) hf.1 ht x v)] + +lemma RegularParticle.time_moment_integrable {f : Particle} (hf : RegularParticle f) + {w : Vec → ℝ} (hw : Continuous w) {t : ℝ} (ht : 0 w v*fderiv ℝ f (t,x,v) (1,0,0)) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := hf.local_data ht x + have hi := integrable_param_fderiv_apply_weight hU hK hp hF hw hzero (((1:ℝ),(0:Vec)),(0:Vec)) + simpa only [fderiv_particleBySpacetime (particle_differentiableAt_positive (s:=⟨f,0,0⟩) hf.1 ht x _)] using hi + +lemma RegularParticle.scalar_moment_integrable {f : Particle} (hf : RegularParticle f) + {w : Vec → ℝ} (hw : Continuous w) {t : ℝ} (ht : 0≤t) (x : Vec) : + Integrable (fun v : Vec => w v*f (t,x,v)) := by + simpa only [smul_eq_mul,mul_comm] using hf.moment_integrable hw ht x + +lemma current_eq_integral_component {f : Particle} (hf : RegularParticle f) + {t : ℝ} (ht : 0≤t) (x : Vec) (i : Fin 3) : + current (fun z => f (t,z)) x i = ∫ v : Vec, velocity v i*f (t,x,v) := by + have hi := hf.moment_integrable (contDiff_velocity (k:=1)).continuous ht x + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi + simpa only [current,PiLp.proj_apply,PiLp.smul_apply,smul_eq_mul,mul_comm] using he.symm + +lemma dirD_rho {f : Particle} (hf : RegularParticle f) {t : ℝ} (ht : 0 rho (fun z => f (p.1,z)) p.2) (1,0) (t,x) = + ∫ v : Vec, fderiv ℝ f (t,x,v) (1,0,0) := by + simpa only [one_mul,rho] using hf.time_moment_derivative (contDiff_const (c:=(1:ℝ))) ht x + +lemma dirD_current_component {f : Particle} (hf : RegularParticle f) + {t : ℝ} (ht : 0 current (fun z => f (p.1,z)) p.2 i) (1,0) (t,x) = + ∫ v : Vec, velocity v i*fderiv ℝ f (t,x,v) (1,0,0) := by + have he : (fun p : ℝ × Vec => current (fun z => f (p.1,z)) p.2 i) =ᶠ[𝓝 (t,x)] + (fun p : ℝ × Vec => ∫ v : Vec, velocity v i*f (p.1,p.2,v)) := by + filter_upwards [((isOpen_lt continuous_const (continuous_fst : Continuous (Prod.fst : ℝ × Vec → ℝ))).mem_nhds ht)] with p hp + exact current_eq_integral_component hf hp.le p.2 i + unfold dirD + rw [he.fderiv_eq] + exact hf.time_moment_derivative ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp contDiff_velocity) ht x + +lemma classical_retarded_electric_moment_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : Equations s) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y + + (coneDirection x y i/coneRadius x y)* + dirD (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) (1,0) (t-coneRadius x y,y) - + (coneRadius x y)⁻¹* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 i) (1,0) (t-coneRadius x y,y) = + (∫ v : Vec, s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))) i) - + divergence (fun z => ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hvel : ContDiff ℝ 1 (fun v => velocity v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp contDiff_velocity + have hfI : Integrable (fun v : Vec => s.f (t-coneRadius x y,y,v)) := by + simpa only [one_mul] using hr.scalar_moment_integrable (continuous_const (y:=(1:ℝ))) ht.le y + have htI : Integrable (fun v : Vec => fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := by + simpa only [one_mul] using hr.time_moment_integrable (continuous_const (y:=(1:ℝ))) ht y + have hjI := hr.time_moment_integrable hvel.continuous ht y + have hsum : Integrable (fun v : Vec => + ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i/coneRadius x y)*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := + (hfI.const_mul _).add (htI.const_mul _) + rw [dirD_rho hr ht y,dirD_current_component hr ht y i,rho] + rw [← integral_const_mul,← integral_const_mul,← integral_const_mul, + ← integral_add (hfI.const_mul _) (htI.const_mul _), + ← integral_sub hsum (hjI.const_mul _)] + convert classical_retarded_electric_integral_identity hf hc heq hxy ht i using 1 + congr 1 + funext v + dsimp only + ring + +def shiftedRho (s : Solution) (a : ℝ) : ℝ × Vec → ℝ := + positiveTimeShift a (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) +def shiftedCurrent (s : Solution) (a : ℝ) : Field := + positiveTimeShift a (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2) +def electricMomentDensity (ρ : ℝ × Vec → ℝ) (j : Field) + (t : ℝ) (x : Vec) (i : Fin 3) (z : Vec) : ℝ := + -(z i/‖z‖^3*ρ (t-‖z‖,x+z)) - z i/‖z‖^2*dirD ρ (1,0) (t-‖z‖,x+z) - + dirD (fun p => j p i) (1,0) (t-‖z‖,x+z)/‖z‖ + +lemma integrableOn_electricMomentDensity {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) {t : ℝ} (ht : 0≤t) (x : Vec) (i : Fin 3) : + IntegrableOn (electricMomentDensity ρ j t x i) (ball (0:Vec) t) := by + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + exact ((integrableOn_ball_direction_div_norm_pow (hρ.continuous.comp harg) 2 (by norm_num) t i).neg.sub + (integrableOn_ball_direction_div_norm_pow ((contDiff_dirD hρ _).continuous.comp harg) 1 (by norm_num) t i)).sub + (integrable_conePotential (contDiff_dirD (contDiff_component hj i) (1,0)).continuous ht x) + +lemma contDiff_shifted_moments {d : Datum} {s : Solution} (hs : Classical d s) + (hm : SmoothOnFiniteHorizons s) {a : ℝ} (ha : 0 (hm.moments_positive hs.2.2.2.2.2.2.1 hp).1), + contDiff_positiveTimeShift ha (fun _p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2)⟩ + +lemma retardedElectricDensity_component {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + retardedElectricDensity s t x y i = + ∫ v : Vec, s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))) i := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + obtain ⟨hreg,hcomp⟩ := hr.slice ht y + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp + (continuous_const.prodMk (contDiff_velocity (k:=1)).continuous)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hi : Integrable (fun v : Vec => (s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))) • + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y))))) := + ((hreg.continuous.mul hd).smul hk).integrable_of_hasCompactSupport (hcomp.mul_right.smul_right) + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi + simpa only [retardedElectricDensity,PiLp.proj_apply,PiLp.smul_apply,smul_eq_mul] using he.symm + +lemma coneDirection_add (x z : Vec) : coneDirection x (x+z)=-(‖z‖⁻¹ • z) := by + unfold coneDirection + rw [coneRadius_add,show x-(x+z) = -z by abel,smul_neg] + +lemma electricMomentDensity_actual {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} (ha : 0 current (fun q => s.f (p.1,q)) p.2 i) + (a+(T-‖z‖),x+z) := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp _ hj).differentiableAt (by simp) + have herr : (fun p => shiftedCurrent s a p i)= + positiveTimeShift a (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 i) := by + funext p + simp only [shiftedCurrent,positiveTimeShift,positiveTimeExtend,PiLp.smul_apply,smul_eq_mul] + unfold electricMomentDensity + rw [herr] + have hρeq : shiftedRho s a (T-‖z‖,x+z)=rho (fun q => s.f (a+(T-‖z‖),q)) (x+z) := + positiveTimeShift_eq ha (sub_nonneg.mpr hzt.le) _ _ + rw [hρeq] + unfold dirD shiftedRho + rw [fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ (hρ.differentiableAt (by simp)), + fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ hji] + have he := classical_retarded_electric_moment_identity hs.1 hc hs.2.2.2.2.2.2.2.1 hxy ht i + rw [← retardedElectricDensity_component hs.1 hc hxy ht.le i] at he + change _ = _ - divergence (retardedElectricFlux s (a+T) x i) (x+z) at he + rw [← he] + simp only [coneRadius_add,coneDirection_add,PiLp.neg_apply,PiLp.smul_apply,smul_eq_mul, + dirD,show a+T-‖z‖=a+(T-‖z‖) by ring] + field_simp [norm_ne_zero_iff.mpr hz] + ring + +lemma integrated_electricMomentDensity_actual {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 ℝ) i).integrable_comp + (integrableOn_retardedElectricDensity hs.1 hs.2.1 hs.2.2.1 hc hT.le + (show T retardedElectricDensity s (a+T) x (x+z) i) (ball (0:Vec) T) at hD + let F : Vec → Vec := fun z => retardedElectricFlux s (a+T) x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) T)] + (fun z => retardedElectricDensity s (a+T) x (x+z) i - + electricMomentDensity (shiftedRho s a) (shiftedCurrent s a) T x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := electricMomentDensity_actual hs hm ha x i hz0 (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ s.E (a,y) i) (fun y => curl (fun z => s.B (a,z)) y i) (T,x) + + (4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, retardedElectricDensity s (a+T) x (x+z) i) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T^2*dot n.1 + (retardedElectricFlux s (a+T) x i (x+T • n.1)) ∂sphereMeasure) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T*n.1 i*rho (fun z => s.f (a,z)) (x+T • n.1) ∂sphereMeasure) - + waveK (fun y => current (fun z => s.f (a,z)) y i) (T,x) := by + have hρj := contDiff_shifted_moments hs hm ha + rw [classical_shifted_electric_potential_representation hs hm ha hT.le x i] + change _ + electricPotentialComponent (shiftedRho s a) (shiftedCurrent s a) i (T,x)=_ + rw [electricPotentialComponent_ball hρj.1 hρj.2 hT] + change _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, + electricMomentDensity (shiftedRho s a) (shiftedCurrent s a) T x i z) - _ - _)=_ + rw [integrated_electricMomentDensity_actual hs hm ha hT x i] + have hρ0 : (fun n : Sphere => T*n.1 i*shiftedRho s a (0,x+T • n.1)) = + (fun n : Sphere => T*n.1 i*rho (fun z => s.f (a,z)) (x+T • n.1)) := by + funext n + simp only [shiftedRho,positiveTimeShift_eq ha (le_refl 0),add_zero] + have hj0 : (fun y => shiftedCurrent s a (0,y) i)=(fun y => current (fun z => s.f (a,z)) y i) := by + funext y + simp only [shiftedCurrent,positiveTimeShift_eq ha (le_refl 0),add_zero] + rw [hρ0,hj0] + ring +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/SpaceDiv.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/SpaceDiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..56005c34dcb512373856a9e6ae9e15d730a6dd49 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/SpaceDiv.lean @@ -0,0 +1,457 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.WaveGradient + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def spaceDiv (F : Field) (p : ℝ × Vec) : ℝ := + ∑ i : Fin 3, dirD F (0, basis i) p i + +lemma contDiff_spaceDiv {F : Field} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (spaceDiv F) := + ContDiff.sum (fun i _ => contDiff_component (contDiff_dirD hF _) i) + +lemma spaceDiv_slice {F : Field} (hF : Differentiable ℝ F) (t : ℝ) (x : Vec) : + spaceDiv F (t,x) = divergence (fun y => F (t,y)) x := by + unfold spaceDiv divergence + apply Finset.sum_congr rfl + intro i _ + have hc : Differentiable ℝ (fun p => F p i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiable.comp hF + rw [spatialPartial_time_slice (hc (t,x))] + exact (dirD_component hF (t,x) (0,basis i) i).symm + +lemma dirD_spaceDiv {F : Field} (hF : ContDiff ℝ ∞ F) (e p : ℝ × Vec) : + dirD (spaceDiv F) e p = spaceDiv (dirD F e) p := by + unfold spaceDiv + rw [dirD_sum Finset.univ (fun i _ => + (contDiff_component (contDiff_dirD hF _) i).differentiable (by simp))] + apply Finset.sum_congr rfl + intro i _ + rw [dirD_component ((contDiff_dirD hF _).differentiable (by simp)), + dirD_comm hF (0,basis i) e] + +lemma spaceDiv_spaceCurl {F : Field} (hF : ContDiff ℝ ∞ F) (p : ℝ × Vec) : + spaceDiv (spaceCurl F) p = 0 := by + rw [spaceDiv_slice ((contDiff_spaceCurl hF).differentiable (by simp))] + have he : (fun y => spaceCurl F (p.1,y)) = curl (fun y => F (p.1,y)) := + funext (spaceCurl_slice (hF.differentiable (by simp)) p.1) + rw [he] + exact divergence_curl (contDiff_field_slice hF p.1) p.2 + +lemma dirD_component_fun {F : Field} (hF : Differentiable ℝ F) + (e : ℝ × Vec) (i : Fin 3) : + (fun p => dirD F e p i) = dirD (fun p => F p i) e := + funext (fun p => (dirD_component hF p e i).symm) + +lemma waveBox_dirD_zero {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (hw : ∀ t, 0 (0:ℝ) := by + filter_upwards [continuous_fst.continuousAt.preimage_mem_nhds (lt_mem_nhds ht)] with p hp + exact hw p.1 hp p.2 + rw [dirD_eq_of_eventuallyEq he] + simp [dirD] + +lemma waveBox_spaceCurl_zero {F : Field} (hF : ContDiff ℝ ∞ F) + (hw : ∀ i : Fin 3, ∀ t, 0 F p i) (t,x)=0) + {t : ℝ} (ht : 0 spaceCurl F p i) (t,x)=0 := by + have he : (fun p => spaceCurl F p i) = + fun p => dirD (fun z => F z (curlB i)) (0,basis (curlA i)) p - + dirD (fun z => F z (curlA i)) (0,basis (curlB i)) p := by + funext p + simp only [spaceCurl_apply,dirD_component (hF.differentiable (by simp))] + rw [he,waveBox_sub (contDiff_dirD (contDiff_component hF _) _) + (contDiff_dirD (contDiff_component hF _) _)] + dsimp only + rw [waveBox_dirD_zero (contDiff_component hF _) (hw _) ht, + waveBox_dirD_zero (contDiff_component hF _) (hw _) ht,sub_self] + +def freeField (G H : Vec → Vec) (p : ℝ × Vec) : Vec := + WithLp.toLp 2 (fun i => freeWave (fun x => G x i) (fun x => H x i) p) + +lemma freeField_apply (G H : Vec → Vec) (p : ℝ × Vec) (i : Fin 3) : + freeField G H p i = freeWave (fun x => G x i) (fun x => H x i) p := rfl + +lemma contDiff_freeField {G H : Vec → Vec} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (freeField G H) := by + apply contDiff_euclidean.mpr + intro i + exact contDiff_freeWave (contDiff_component hG i) (contDiff_component hH i) + +lemma freeField_initial {G H : Vec → Vec} (hG : ContDiff ℝ ∞ G) (x : Vec) : + freeField G H (0,x)=G x := by + ext i + exact freeWave_initial (contDiff_component hG i) x + +lemma freeField_initial_deriv {G H : Vec → Vec} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (x : Vec) : + dirD (freeField G H) (1,0) (0,x)=H x := by + ext i + rw [← dirD_component ((contDiff_freeField hG hH).differentiable (by simp)), + ← deriv_slice_eq_dirD ((contDiff_component (contDiff_freeField hG hH) i).differentiable (by simp))] + exact freeWave_initial_velocity (contDiff_component hG i) (contDiff_component hH i) x + +lemma freeField_box {G H : Vec → Vec} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) (i : Fin 3) : + waveBox (fun p => freeField G H p i) (t,x)=0 := by + have hc : Continuous (fun t => waveBox (fun p => freeField G H p i) (t,x)) := + (contDiff_waveBox (contDiff_component (contDiff_freeField hG hH) i)).continuous.comp + (continuous_id.prodMk continuous_const) + have he : EqOn (fun t => waveBox (fun p => freeField G H p i) (t,x)) + (fun _ => (0:ℝ)) (Ioi 0) := by + intro t ht + exact freeWave_box (contDiff_component hG i) (contDiff_component hH i) ht x + exact he.closure hc continuous_const (by simpa only [closure_Ioi,mem_Ici] using ht) + +lemma field_wave_initial_second {F : Field} {G : Vec → Vec} + (hF : ContDiff ℝ ∞ F) (hG : ∀ x, F (0,x)=G x) + (hw : ∀ x i, waveBox (fun p => F p i) (0,x)=0) (x : Vec) (i : Fin 3) : + dirD (dirD F (1,0)) (1,0) (0,x) i = laplace (fun y => G y i) x := by + have h := hw x i + rw [waveBox_component_eq hF] at h + have he : (fun y => F (0,y) i) = fun y => G y i := by funext y; rw [hG] + rw [he] at h + exact sub_eq_zero.mp h + +def vacuumElectric (E₀ B₀ : Vec → Vec) : Field := freeField E₀ (curl B₀) +def vacuumMagnetic (E₀ B₀ : Vec → Vec) : Field := freeField B₀ (fun x => -curl E₀ x) + +lemma contDiff_vacuumElectric {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) : + ContDiff ℝ ∞ (vacuumElectric E₀ B₀) := + contDiff_freeField hE (contDiff_curl hB) + +lemma contDiff_vacuumMagnetic {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) : + ContDiff ℝ ∞ (vacuumMagnetic E₀ B₀) := + contDiff_freeField hB (contDiff_curl hE).neg + +lemma spaceCurl_of_slice_eq {F G : Field} (hF : Differentiable ℝ F) + (hG : Differentiable ℝ G) {t : ℝ} (he : ∀ x, F (t,x)=G (t,x)) (x : Vec) : + spaceCurl F (t,x)=spaceCurl G (t,x) := by + rw [spaceCurl_slice hF,spaceCurl_slice hG,show (fun y => F (t,y)) = + (fun y => G (t,y)) from funext he] + +lemma dirD_neg_field (F : Field) (e p : ℝ × Vec) : + dirD (fun q => -F q) e p = -dirD F e p := by + simp [dirD,fderiv_fun_neg] + +lemma wave_maxwell_residual {F G : Field} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (hFw : ∀ i : Fin 3, ∀ t, 0 ≤ t → ∀ x, waveBox (fun p => F p i) (t,x)=0) + (hGw : ∀ i : Fin 3, ∀ t, 0 G p i) (t,x)=0) + (hF0 : ∀ x, dirD F (1,0) (0,x)=spaceCurl G (0,x)) + (hG0 : ∀ x, dirD G (1,0) (0,x)= -spaceCurl F (0,x)) + (hdiv : ∀ x, divergence (fun y => F (0,y)) x=0) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + dirD F (1,0) (t,x)=spaceCurl G (t,x) := by + ext i + apply sub_eq_zero.mp + apply wave_zero ((contDiff_component (contDiff_dirD hF _) i).sub + (contDiff_component (contDiff_spaceCurl hG) i)) _ _ _ ht x + · intro r hr y + rw [waveBox_sub (contDiff_component (contDiff_dirD hF _) i) + (contDiff_component (contDiff_spaceCurl hG) i)] + dsimp only + rw [dirD_component_fun (hF.differentiable (by simp)), + waveBox_dirD_zero (contDiff_component hF i) (fun r hr => hFw i r hr.le) hr, + waveBox_spaceCurl_zero hG hGw hr,sub_self] + · intro y + rw [hF0,sub_self] + · intro y + rw [deriv_slice_eq_dirD (((contDiff_component (contDiff_dirD hF _) i).sub + (contDiff_component (contDiff_spaceCurl hG) i)).differentiable (by simp)), + dirD_sub ((contDiff_component (contDiff_dirD hF _) i).differentiable (by simp)) + ((contDiff_component (contDiff_spaceCurl hG) i).differentiable (by simp))] + dsimp only + rw [dirD_component ((contDiff_dirD hF _).differentiable (by simp)), + dirD_component ((contDiff_spaceCurl hG).differentiable (by simp)),dirD_spaceCurl hG] + have hc := spaceCurl_of_slice_eq ((contDiff_dirD hG _).differentiable (by simp)) + ((contDiff_spaceCurl hF).neg.differentiable (by simp)) hG0 y + rw [spaceCurl_neg] at hc + rw [hc,PiLp.neg_apply,spaceCurl_spaceCurl_component hF, + field_wave_initial_second hF (fun _ => rfl) (fun y i => hFw i 0 le_rfl y)] + have hd : divergence (fun y => F (0,y)) = fun _ => (0:ℝ) := funext hdiv + rw [hd] + simp [spatialPartial] + +lemma vacuumElectric_initial {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (x : Vec) : vacuumElectric E₀ B₀ (0,x)=E₀ x := + freeField_initial hE x + +lemma vacuumMagnetic_initial {E₀ B₀ : Vec → Vec} + (hB : ContDiff ℝ ∞ B₀) (x : Vec) : vacuumMagnetic E₀ B₀ (0,x)=B₀ x := + freeField_initial hB x + +lemma vacuum_maxwell_first_order {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hDE : ∀ x, divergence E₀ x=0) (hDB : ∀ x, divergence B₀ x=0) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + dirD (vacuumElectric E₀ B₀) (1,0) (t,x)=spaceCurl (vacuumMagnetic E₀ B₀) (t,x) ∧ + dirD (vacuumMagnetic E₀ B₀) (1,0) (t,x)= -spaceCurl (vacuumElectric E₀ B₀) (t,x) := by + have hEs := contDiff_vacuumElectric hE hB + have hBs := contDiff_vacuumMagnetic hE hB + have hEc (y : Vec) : spaceCurl (vacuumElectric E₀ B₀) (0,y)=curl E₀ y := by + rw [spaceCurl_slice (hEs.differentiable (by simp))] + congr 1 + exact funext (vacuumElectric_initial hE) + have hBc (y : Vec) : spaceCurl (vacuumMagnetic E₀ B₀) (0,y)=curl B₀ y := by + rw [spaceCurl_slice (hBs.differentiable (by simp))] + congr 1 + exact funext (vacuumMagnetic_initial hB) + have hEt (y : Vec) : dirD (vacuumElectric E₀ B₀) (1,0) (0,y)= + spaceCurl (vacuumMagnetic E₀ B₀) (0,y) := by + rw [hBc] + exact freeField_initial_deriv hE (contDiff_curl hB) y + have hBt (y : Vec) : dirD (vacuumMagnetic E₀ B₀) (1,0) (0,y)= + -spaceCurl (vacuumElectric E₀ B₀) (0,y) := by + rw [hEc] + exact freeField_initial_deriv hB (contDiff_curl hE).neg y + have hEw (i : Fin 3) (r : ℝ) (hr : 0 ≤ r) (y : Vec) : + waveBox (fun p => vacuumElectric E₀ B₀ p i) (r,y)=0 := + freeField_box hE (contDiff_curl hB) hr y i + have hBw (i : Fin 3) (r : ℝ) (hr : 0 ≤ r) (y : Vec) : + waveBox (fun p => vacuumMagnetic E₀ B₀ p i) (r,y)=0 := + freeField_box hB (contDiff_curl hE).neg hr y i + constructor + · apply wave_maxwell_residual hEs hBs hEw (fun i r hr => hBw i r hr.le) hEt hBt + (fun y => ?_) ht x + rw [show (fun y => vacuumElectric E₀ B₀ (0,y)) = E₀ from + funext (vacuumElectric_initial hE)] + exact hDE y + · have h := wave_maxwell_residual hBs hEs.neg hBw + (fun i r hr y => by + simpa only [PiLp.neg_apply,waveBox_neg,neg_zero] using + congrArg Neg.neg (hEw i r hr.le y)) + (fun y => by rw [spaceCurl_neg]; exact hBt y) + (fun y => by rw [dirD_neg_field,hEt]) + (fun y => by + rw [show (fun y => vacuumMagnetic E₀ B₀ (0,y)) = B₀ from + funext (vacuumMagnetic_initial hB)] + exact hDB y) ht x + simpa only [spaceCurl_neg] using h + +def fieldBox (F : Field) (p : ℝ × Vec) : Vec := + WithLp.toLp 2 (fun i => waveBox (fun q => F q i) p) + +lemma fieldBox_apply (F : Field) (p : ℝ × Vec) (i : Fin 3) : + fieldBox F p i = waveBox (fun q => F q i) p := rfl + +lemma contDiff_fieldBox {F : Field} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fieldBox F) := by + apply contDiff_euclidean.mpr + intro i + exact contDiff_waveBox (contDiff_component hF i) + +lemma fieldBox_add {F G : Field} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + fieldBox (fun p => F p+G p) = fun p => fieldBox F p+fieldBox G p := by + funext p; ext i + simp only [fieldBox_apply,PiLp.add_apply,waveBox_add (contDiff_component hF i) + (contDiff_component hG i)] + +lemma fieldBox_sub {F G : Field} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + fieldBox (fun p => F p-G p) = fun p => fieldBox F p-fieldBox G p := by + funext p; ext i + simp only [fieldBox_apply,PiLp.sub_apply,waveBox_sub (contDiff_component hF i) + (contDiff_component hG i)] + +lemma fieldBox_neg (F : Field) : + fieldBox (fun p => -F p) = fun p => -fieldBox F p := by + funext p; ext i + simp only [fieldBox_apply,PiLp.neg_apply,waveBox_neg] + +lemma fieldBox_dirD {F : Field} (hF : ContDiff ℝ ∞ F) (e p : ℝ × Vec) : + fieldBox (dirD F e) p = dirD (fieldBox F) e p := by + ext i + rw [fieldBox_apply,dirD_component_fun (hF.differentiable (by simp)), + waveBox_dirD (contDiff_component hF i),← dirD_component + ((contDiff_fieldBox hF).differentiable (by simp))] + rfl + +lemma fieldBox_spaceCurl {F : Field} (hF : ContDiff ℝ ∞ F) (p : ℝ × Vec) : + fieldBox (spaceCurl F) p = spaceCurl (fieldBox F) p := by + ext i + have he : (fun q => spaceCurl F q i) = + fun q => dirD (fun z => F z (curlB i)) (0,basis (curlA i)) q - + dirD (fun z => F z (curlA i)) (0,basis (curlB i)) q := by + funext q + simp only [spaceCurl_apply,dirD_component (hF.differentiable (by simp))] + rw [fieldBox_apply,he,waveBox_sub (contDiff_dirD (contDiff_component hF _) _) + (contDiff_dirD (contDiff_component hF _) _)] + simp only [spaceCurl_apply,waveBox_dirD (contDiff_component hF _), + ← dirD_component ((contDiff_fieldBox hF).differentiable (by simp))] + rfl + +lemma waveGradient_add {u v : ℝ × Vec → ℝ} (hu : Differentiable ℝ u) + (hv : Differentiable ℝ v) : + waveGradient (fun p => u p+v p) = fun p => waveGradient u p+waveGradient v p := by + funext p; ext i + simp only [waveGradient_apply,dirD_add hu hv,PiLp.add_apply] + +lemma waveGradient_sub {u v : ℝ × Vec → ℝ} (hu : Differentiable ℝ u) + (hv : Differentiable ℝ v) : + waveGradient (fun p => u p-v p) = fun p => waveGradient u p-waveGradient v p := by + funext p; ext i + simp only [waveGradient_apply,dirD_sub hu hv,PiLp.sub_apply] + +lemma waveGradient_neg (u : ℝ × Vec → ℝ) : + waveGradient (fun p => -u p)=fun p => -waveGradient u p := by + funext p; ext i + simp [waveGradient_apply,dirD,fderiv_fun_neg,PiLp.neg_apply] + +lemma dirD_waveGradient {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (e p : ℝ × Vec) : + dirD (waveGradient u) e p = waveGradient (dirD u e) p := by + ext i + rw [← dirD_component ((contDiff_waveGradient hu).differentiable (by simp))] + exact dirD_comm hu (0,basis i) e p + +lemma spaceCurl_waveGradient {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (p : ℝ × Vec) : + spaceCurl (waveGradient u) p=0 := by + ext i + rw [spaceCurl_apply,← dirD_component ((contDiff_waveGradient hu).differentiable (by simp)), + ← dirD_component ((contDiff_waveGradient hu).differentiable (by simp))] + change dirD (dirD u (0,basis (curlB i))) (0,basis (curlA i)) p - + dirD (dirD u (0,basis (curlA i))) (0,basis (curlB i)) p = 0 + rw [dirD_comm hu (0,basis (curlB i)) (0,basis (curlA i)),sub_self] + +lemma fieldBox_waveGradient {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (p : ℝ × Vec) : + fieldBox (waveGradient u) p=waveGradient (waveBox u) p := by + ext i + exact waveBox_dirD hu (0,basis i) p + +lemma fieldBox_curl_curl {F : Field} (hF : ContDiff ℝ ∞ F) (p : ℝ × Vec) : + dirD (dirD F (1,0)) (1,0) p + spaceCurl (spaceCurl F) p = + fieldBox F p + waveGradient (spaceDiv F) p := by + rcases p with ⟨t,x⟩ + ext i + rw [PiLp.add_apply,PiLp.add_apply,fieldBox_apply,waveBox_component_eq hF, + spaceCurl_spaceCurl_component hF,waveGradient_apply, + dirD_spatial_slice ((contDiff_spaceDiv hF).differentiable (by simp))] + have he : (fun y => spaceDiv F (t,y)) = divergence (fun y => F (t,y)) := + funext (spaceDiv_slice (hF.differentiable (by simp)) t) + rw [he] + ring + +lemma waveGradient_eq_of_eventuallyEq {u v : ℝ × Vec → ℝ} {p : ℝ × Vec} + (h : u =ᶠ[𝓝 p] v) : waveGradient u p=waveGradient v p := by + ext i + exact dirD_eq_of_eventuallyEq h (0,basis i) + +lemma field_wave_zero {F : Field} (hF : ContDiff ℝ ∞ F) + (hw : ∀ t, 0 v i) (hw r hr y) + · intro y + exact congrArg (fun v : Vec => v i) (h0 y) + · intro y + rw [deriv_slice_eq_dirD ((contDiff_component hF i).differentiable (by simp)), + dirD_component (hF.differentiable (by simp)),h1] + rfl + +def electricResidual (E B j : Field) : Field := + fun p => dirD E (1,0) p-spaceCurl B p+j p + +def magneticResidual (E B : Field) : Field := + fun p => dirD B (1,0) p+spaceCurl E p + +lemma contDiff_electricResidual {E B j : Field} (hE : ContDiff ℝ ∞ E) + (hB : ContDiff ℝ ∞ B) (hj : ContDiff ℝ ∞ j) : + ContDiff ℝ ∞ (electricResidual E B j) := + ((contDiff_dirD hE _).sub (contDiff_spaceCurl hB)).add hj + +lemma contDiff_magneticResidual {E B : Field} (hE : ContDiff ℝ ∞ E) + (hB : ContDiff ℝ ∞ B) : ContDiff ℝ ∞ (magneticResidual E B) := + (contDiff_dirD hB _).add (contDiff_spaceCurl hE) + +lemma electricResidual_box {E B j : Field} {ρ : ℝ × Vec → ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hj : ContDiff ℝ ∞ j) (hρ : ContDiff ℝ ∞ ρ) + (hEw : ∀ t, 0 -waveGradient ρ p-dirD j (1,0) p) hEw ht x) (1,0) + rw [dirD_sub ((contDiff_waveGradient hρ).neg.differentiable (by simp)) + ((contDiff_dirD hj _).differentiable (by simp))] at hEd + dsimp only at hEd + rw [dirD_neg_field,dirD_waveGradient hρ] at hEd + have hBc := spaceCurl_eq_of_eventuallyEq (positive_time_eventuallyEq hBw ht x) + have hgc := waveGradient_eq_of_eventuallyEq (positive_time_eventuallyEq + (F:=fun p => dirD ρ (1,0) p+spaceDiv j p) (G:=fun _ => 0) hcont ht x) + rw [waveGradient_add ((contDiff_dirD hρ _).differentiable (by simp)) + ((contDiff_spaceDiv hj).differentiable (by simp))] at hgc + have hg0 : waveGradient (fun _ : ℝ × Vec => (0:ℝ)) (t,x)=0 := by + ext i; simp [waveGradient_apply,dirD] + rw [hg0] at hgc + have hwj := fieldBox_curl_curl hj (t,x) + unfold electricResidual + rw [fieldBox_add ((contDiff_dirD hE _).sub (contDiff_spaceCurl hB)) hj, + fieldBox_sub (contDiff_dirD hE _) (contDiff_spaceCurl hB)] + dsimp only + rw [fieldBox_dirD hE,fieldBox_spaceCurl hB,hEd,hBc] + linear_combination (norm := module) -hwj -hgc + +lemma magneticResidual_box {E B j : Field} {ρ : ℝ × Vec → ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hj : ContDiff ℝ ∞ j) (hρ : ContDiff ℝ ∞ ρ) + (hEw : ∀ t, 0 -waveGradient ρ p-dirD j (1,0) p) hEw ht x) + rw [spaceCurl_sub ((contDiff_waveGradient hρ).neg.differentiable (by simp)) + ((contDiff_dirD hj _).differentiable (by simp)),spaceCurl_neg] at hEc + dsimp only at hEc + rw [spaceCurl_waveGradient hρ,neg_zero,zero_sub] at hEc + unfold magneticResidual + rw [fieldBox_add (contDiff_dirD hB _) (contDiff_spaceCurl hE)] + dsimp only + rw [fieldBox_dirD hB,fieldBox_spaceCurl hE,hBd,hEc,add_neg_cancel] + +lemma electricResidual_initial_deriv {E B j : Field} {ρ : ℝ × Vec → ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hj : ContDiff ℝ ∞ j) (hρ : ContDiff ℝ ∞ ρ) + (hEw : ∀ x, fieldBox E (0,x)= -waveGradient ρ (0,x)-dirD j (1,0) (0,x)) + (hBt : ∀ x, dirD B (1,0) (0,x)= -spaceCurl E (0,x)) + (hdiv : ∀ x, spaceDiv E (0,x)=ρ (0,x)) (x : Vec) : + dirD (electricResidual E B j) (1,0) (0,x)=0 := by + have hBc := spaceCurl_of_slice_eq ((contDiff_dirD hB _).differentiable (by simp)) + ((contDiff_spaceCurl hE).neg.differentiable (by simp)) hBt x + rw [spaceCurl_neg] at hBc + have hgrad : waveGradient (spaceDiv E) (0,x)=waveGradient ρ (0,x) := by + rw [waveGradient_slice ((contDiff_spaceDiv hE).differentiable (by simp)), + waveGradient_slice (hρ.differentiable (by simp)),funext hdiv] + have hw := fieldBox_curl_curl hE (0,x) + rw [hEw,hgrad] at hw + unfold electricResidual + rw [dirD_add (((contDiff_dirD hE _).sub (contDiff_spaceCurl hB)).differentiable (by simp)) + (hj.differentiable (by simp)),dirD_sub ((contDiff_dirD hE _).differentiable (by simp)) + ((contDiff_spaceCurl hB).differentiable (by simp))] + dsimp only + rw [dirD_spaceCurl hB,hBc] + linear_combination (norm := module) hw + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/Sphere.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/Sphere.lean new file mode 100644 index 0000000000000000000000000000000000000000..f729f56b5c88b38bcc52c875e49727bbc264f07f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/Sphere.lean @@ -0,0 +1,164 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.EnergyBump + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set MeasureTheory Metric +open scoped Topology NNReal + +namespace RVM +abbrev Sphere := sphere (0 : Vec) 1 +abbrev sphereMeasure : Measure Sphere := (volume : Measure Vec).toSphere + +lemma integral_radial_measure {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (f : ℝ → W) : + (∫ r : Ioi (0 : ℝ), f r ∂Measure.volumeIoiPow 2) = ∫ r in Ioi (0 : ℝ), r^2 • f r := by + simp only [Measure.volumeIoiPow, ENNReal.ofReal] + rw [integral_withDensity_eq_integral_smul, + integral_subtype_comap measurableSet_Ioi (fun r => Real.toNNReal (r^2) • f r)] + · apply setIntegral_congr_fun measurableSet_Ioi + intro r hr + change (r^2).toNNReal • f r = r^2 • f r + rw [NNReal.smul_def,Real.coe_toNNReal _ (sq_nonneg r)] + · exact (measurable_subtype_coe.pow_const _).real_toNNReal + +lemma integrable_polar {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : Vec → W} (hf : Integrable f) : + Integrable (fun p : Sphere × Ioi (0 : ℝ) => f (p.2.1 • p.1.1)) + (sphereMeasure.prod (Measure.volumeIoiPow 2)) := by + have h := (volume : Measure Vec).measurePreserving_homeomorphUnitSphereProd.integrable_comp_emb + (Homeomorph.measurableEmbedding _) + (g := fun p => f (((homeomorphUnitSphereProd Vec).symm p).1)) + simp only [Function.comp_def,Homeomorph.symm_apply_apply] at h + have hi : Integrable (fun z : ({0}ᶜ : Set Vec) => f z.1) (volume.comap Subtype.val) := by + exact (integrableOn_iff_comap_subtypeVal (measurableSet_singleton _).compl).mp hf.integrableOn + have := h.mp hi + simpa only [homeomorphUnitSphereProd_symm_apply_coe,finrank_euclideanSpace_fin, + Nat.reduceSub] using this + +lemma integral_polar {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : Vec → W} (hf : Integrable f) : + (∫ y : Vec, f y) = ∫ n : Sphere, ∫ r in Ioi (0 : ℝ), r^2 • f (r • n.1) ∂volume ∂sphereMeasure := by + calc + _ = ∫ z : ({0}ᶜ : Set Vec), f z.1 ∂volume.comap Subtype.val := by + rw [integral_subtype_comap (measurableSet_singleton _).compl f,restrict_compl_singleton] + _ = ∫ p : Sphere × Ioi (0 : ℝ), f (p.2.1 • p.1.1) + ∂sphereMeasure.prod (Measure.volumeIoiPow 2) := by + have h := (volume : Measure Vec).measurePreserving_homeomorphUnitSphereProd.integral_comp + (Homeomorph.measurableEmbedding _) + (fun p => f (((homeomorphUnitSphereProd Vec).symm p).1)) + simpa only [Homeomorph.symm_apply_apply,homeomorphUnitSphereProd_symm_apply_coe, + finrank_euclideanSpace_fin,Nat.reduceSub] using h + _ = ∫ n : Sphere, ∫ r : Ioi (0 : ℝ), f (r.1 • n.1) ∂Measure.volumeIoiPow 2 + ∂sphereMeasure := integral_prod _ (integrable_polar hf) + _ = _ := by + apply integral_congr_ae + exact ae_of_all _ (fun n => integral_radial_measure (fun r => f (r • n.1))) +end RVM + +open Set MeasureTheory Metric +open scoped Topology ContDiff + +namespace RVM + +lemma deriv_moving_energy {d : Datum} {s : Solution} (hs : Classical d s) + {U : Set ℝ} (hU : IsOpen U) (hpos : U ⊆ Ioi 0) + {g : ℝ × Vec → ℝ} {K : Set Vec} (hK : IsCompact K) + (hg : ContDiffOn ℝ 1 g (U ×ˢ (univ : Set Vec))) + (hz : ∀ r ∈ U, ∀ x ∉ K, g (r,x)=0) + {t : ℝ} (ht : t ∈ U) : + HasDerivAt (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) + (∫ x : Vec, fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) + + fderiv ℝ g (t,x) (0,totalFlux s (t,x))) t := by + have hE := (classical_total_energy_regular hs).mono (prod_mono_left hpos) + have hF : ContDiffOn ℝ 1 (fun p => g p * totalEnergy s p) + (U ×ˢ (univ : Set Vec)) := hg.mul hE + have hzF : ∀ r ∈ U, ∀ x ∉ K, g (r,x)*totalEnergy s (r,x)=0 := by + intro r hr x hx + rw [hz r hr x hx,zero_mul] + have hd := hasFDerivAt_integral_uniform_support hU hK ht hF hzF + have hi := fderiv_integral_uniform_support_apply hU hK ht hF hzF (1:ℝ) + have hgg : ContDiff ℝ 1 (fun x => g (t,x)) := by + apply ContDiffOn.comp_contDiff hg (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hS : ContDiff ℝ 1 (fun x => totalFlux s (t,x)) := by + apply ContDiffOn.comp_contDiff ((classical_total_flux_regular hs).mono (prod_mono_left hpos)) + (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hEc : Continuous (fun x => totalEnergy s (t,x)) := by + apply hE.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hgD : Continuous (fun x => fderiv ℝ g (t,x)) := by + apply (hg.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) (by simp)).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hDc : HasCompactSupport (fun x => fderiv ℝ g (t,x)) := + compactSupport_param_fderiv hU hK ht hz + have hgC : HasCompactSupport (fun x => g (t,x)) := + compactSupport_of_zero_off hK (hz t ht) + have hgDapply (v : ℝ × Vec) : HasCompactSupport (fun x => fderiv ℝ g (t,x) v) := by + apply compactSupport_of_zero_off hDc + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply] + have hIt : Integrable (fun x => fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x)) := + ((hgD.clm_apply continuous_const).mul hEc).integrable_of_hasCompactSupport + (hgDapply (1,0)).mul_right + have hIa : Integrable (fun x => g (t,x) * divergence (fun y => totalFlux s (t,y)) x) := + (hgg.continuous.mul (continuous_divergence hS)).integrable_of_hasCompactSupport hgC.mul_right + have hIs : Integrable (fun x => fderiv ℝ (fun y => g (t,y)) x (totalFlux s (t,x))) := + ((hgg.continuous_fderiv (by simp)).clm_apply hS.continuous).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hgC.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply])) + have heq : ∀ x : Vec, + fderiv ℝ (fun p => g p * totalEnergy s p) (t,x) (1,0) = + fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) - + g (t,x) * divergence (fun y => totalFlux s (t,y)) x := by + intro x + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hg' := (hg.contDiffAt hn).differentiableAt (by simp) + have hE' := (hE.contDiffAt hn).differentiableAt (by simp) + change fderiv ℝ (g * totalEnergy s) (t,x) (1,0) = _ + rw [fderiv_mul hg' hE',add_apply, + smul_apply,smul_apply, + smul_eq_mul,smul_eq_mul,← deriv_time_slice hE'] + have hl := classical_local_energy_conservation hs (hpos ht) x + rw [show deriv (fun r => totalEnergy s (r,x)) t = + -divergence (fun y => totalFlux s (t,y)) x by linarith] + ring + have hxder (x v : Vec) : fderiv ℝ (fun y => g (t,y)) x v = fderiv ℝ g (t,x) (0,v) := by + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hh := ((hg.contDiffAt hn).differentiableAt (by simp)).hasFDerivAt.comp x + ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x)) + change HasFDerivAt (fun y => g (t,y)) _ x at hh + rw [hh.fderiv] + simp + have hh : deriv (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) t = + ∫ x : Vec, fderiv ℝ g (t,x) (1,0) * totalEnergy s (t,x) + + fderiv ℝ g (t,x) (0,totalFlux s (t,x)) := by + change fderiv ℝ (fun r => ∫ x : Vec, g (r,x) * totalEnergy s (r,x)) t 1 = _ + rw [hi] + simp only [heq] + rw [integral_sub hIt hIa,integral_mul_divergence hS hgg hgC,sub_neg_eq_add] + simp_rw [← hxder] + exact (integral_add hIt hIs).symm + exact hh ▸ hd.differentiableAt.hasDerivAt +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Geometry/UpperTimeCut.lean b/lean/OAI/Analysis/VlasovMaxwell/Geometry/UpperTimeCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..e30a70acd2a5c7b83f650af202a22690f4e8cd44 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Geometry/UpperTimeCut.lean @@ -0,0 +1,218 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.EquationsBefore + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def upperTimeCut (τ H t : ℝ) : ℝ := positiveTimeCut (2*(H-τ)) (H-t) + +lemma contDiff_upperTimeCut (τ H : ℝ) : ContDiff ℝ ∞ (upperTimeCut τ H) := + (contDiff_positiveTimeCut _).comp (contDiff_const.sub contDiff_id) + +lemma upperTimeCut_nonneg (τ H t : ℝ) : 0 ≤ upperTimeCut τ H t := + Real.smoothTransition.nonneg _ + +lemma upperTimeCut_one {τ H t : ℝ} (hτ : τ < H) (ht : t ≤ τ) : + upperTimeCut τ H t = 1 := by + apply positiveTimeCut_one (by linarith) + linarith + +lemma upperTimeCut_zero {τ H t : ℝ} (hτ : τ < H) (ht : (τ+H)/2 ≤ t) : + upperTimeCut τ H t = 0 := by + apply positiveTimeCut_zero (by linarith) + linarith + +section Generic +variable {X W : Type*} [NormedAddCommGroup X] [NormedSpace ℝ X] + [NormedAddCommGroup W] [NormedSpace ℝ W] + +def upperTimeExtend (τ H : ℝ) (F : ℝ × X → W) (p : ℝ × X) : W := + upperTimeCut τ H p.1 • F p + +omit [NormedAddCommGroup X] [NormedSpace ℝ X] in +lemma upperTimeExtend_eq {τ H t : ℝ} (hτ : τ < H) (ht : t ≤ τ) + (F : ℝ × X → W) (x : X) : upperTimeExtend τ H F (t,x)=F (t,x) := by + simp only [upperTimeExtend,upperTimeCut_one hτ ht,one_smul] + +omit [NormedSpace ℝ X] in +lemma upperTimeExtend_eventually_eq {τ H : ℝ} (hτ : τ < H) + (F : ℝ × X → W) {p : ℝ × X} (hp : p.1 < τ) : + upperTimeExtend τ H F =ᶠ[𝓝 p] F := by + filter_upwards [(isOpen_lt continuous_fst continuous_const).mem_nhds hp] with q hq + exact upperTimeExtend_eq hτ hq.le F q.2 + +omit [NormedSpace ℝ X] in +lemma upperTimeExtend_eventually_zero {τ H : ℝ} (hτ : τ < H) + (F : ℝ × X → W) {p : ℝ × X} (hp : (τ+H)/2 < p.1) : + upperTimeExtend τ H F =ᶠ[𝓝 p] (fun _ => 0) := by + filter_upwards [(isOpen_lt continuous_const continuous_fst).mem_nhds hp] with q hq + simp only [upperTimeExtend,upperTimeCut_zero hτ hq.le,zero_smul] + +lemma contDiffOn_upperTimeExtend {τ H : ℝ} (hτ : τ < H) {F : ℝ × X → W} + (hF : ContDiffOn ℝ ∞ F {p | p.1 ∈ Icc 0 H}) : + ContDiffOn ℝ ∞ (upperTimeExtend τ H F) {p | 0 ≤ p.1} := by + intro p hp + by_cases hpt : p.1 < H + · have hlocal : {q : ℝ × X | q.1 ∈ Icc 0 H} ∈ 𝓝[{q | 0 ≤ q.1}] p := by + filter_upwards [mem_nhdsWithin_of_mem_nhds + ((isOpen_lt continuous_fst continuous_const).mem_nhds hpt), + self_mem_nhdsWithin] with q hq hq0 + exact ⟨hq0,hq.le⟩ + exact (((contDiff_upperTimeCut τ H).comp contDiff_fst).contDiffAt.contDiffWithinAt).smul + ((hF p ⟨hp,hpt.le⟩).mono_of_mem_nhdsWithin hlocal) + · exact (contDiffAt_const.congr_of_eventuallyEq + (upperTimeExtend_eventually_zero hτ F (show (τ+H)/2 < p.1 by linarith))).contDiffWithinAt + +omit [NormedAddCommGroup X] [NormedSpace ℝ X] in +lemma derivWithin_upperTimeExtend {τ H t : ℝ} (hτ : τ < H) (ht : t < τ) + (F : ℝ × X → W) (x : X) (S : Set ℝ) : + derivWithin (fun r => upperTimeExtend τ H F (r,x)) S t = + derivWithin (fun r => F (r,x)) S t := by + have he : (fun r => upperTimeExtend τ H F (r,x)) =ᶠ[𝓝 t] (fun r => F (r,x)) := by + filter_upwards [Iio_mem_nhds ht] with r hr + exact upperTimeExtend_eq hτ hr.le F x + exact he.filter_mono nhdsWithin_le_nhds |>.derivWithin_eq (upperTimeExtend_eq hτ ht.le F x) +end Generic + +lemma timeContinuousL2_upperTimeExtend {τ H : ℝ} (hτ : τ < H) (hH : 0 ≤ H) + {F : Field} (hF : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), + ContinuousOn F₂ (Icc 0 H) ∧ ∀ t ∈ Icc 0 H, + (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t,x))) : + TimeContinuousL2 (upperTimeExtend τ H F) := by + obtain ⟨F₂,hc,he⟩ := hF + refine ⟨fun t => upperTimeCut τ H t • F₂ (min t H),?_,?_⟩ + · exact (contDiff_upperTimeCut τ H).continuous.continuousOn.smul + (hc.comp (continuous_id.min continuous_const).continuousOn + (fun t ht => ⟨le_min ht hH,min_le_right _ _⟩)) + · intro t ht + have hl := Lp.coeFn_smul (upperTimeCut τ H t) (F₂ (min t H)) + by_cases htH : t ≤ H + · rw [min_eq_left htH] at hl + filter_upwards [hl,he t ⟨ht,htH⟩] with x hx hx' + simpa only [min_eq_left htH,upperTimeExtend,Pi.smul_apply,hx'] using hx + · have hz := upperTimeCut_zero hτ (show (τ+H)/2 ≤ t by linarith) + filter_upwards [hl] with x hx + simpa only [hz,upperTimeExtend,zero_smul,Pi.zero_apply,Pi.smul_apply] using hx + +structure SmoothClassicalPrefix (d : Datum) (s : Solution) (H : ℝ) : Prop where + f_smooth : ContDiffOn ℝ ∞ s.f (particleSlab H) + E_smooth : ContDiffOn ℝ ∞ s.E (fieldSlab H) + B_smooth : ContDiffOn ℝ ∞ s.B (fieldSlab H) + nonnegative : ∀ t ∈ Icc 0 H, ∀ z, 0 ≤ s.f (t,z) + E_L2 : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 H) ∧ + ∀ t ∈ Icc 0 H, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => s.E (t,x)) + B_L2 : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 H) ∧ + ∀ t ∈ Icc 0 H, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => s.B (t,x)) + compact : ∃ K : Set Phase, IsCompact K ∧ ∀ t ∈ Icc 0 H, tsupport (fun z => s.f (t,z)) ⊆ K + equations : EquationsBefore s H + initial_f : ∀ z, s.f (0,z)=d.f₀ z + initial_E : ∀ x, s.E (0,x)=d.E₀ x + initial_B : ∀ x, s.B (0,x)=d.B₀ x + +def cutoffPrefix (τ H : ℝ) (s : Solution) : Solution := + ⟨upperTimeExtend τ H s.f,upperTimeExtend τ H s.E,upperTimeExtend τ H s.B⟩ + +lemma cutoffPrefix_eq {τ H t : ℝ} (hτH : τ < H) (ht : t ≤ τ) (s : Solution) : + (∀ z, (cutoffPrefix τ H s).f (t,z)=s.f (t,z)) ∧ + (∀ x, (cutoffPrefix τ H s).E (t,x)=s.E (t,x)) ∧ + (∀ x, (cutoffPrefix τ H s).B (t,x)=s.B (t,x)) := + ⟨upperTimeExtend_eq hτH ht s.f,upperTimeExtend_eq hτH ht s.E, + upperTimeExtend_eq hτH ht s.B⟩ + +lemma cutoffPrefix_equations {s : Solution} {τ H : ℝ} (hτH : τ < H) + (hs : EquationsBefore s H) : EquationsBefore (cutoffPrefix τ H s) τ := by + intro t ht htτ + have hh := hs t ht (htτ.trans hτH) + have hf (x v : Vec) := derivWithin_upperTimeExtend hτH htτ s.f (x,v) (Ici 0) + have hE (x : Vec) := derivWithin_upperTimeExtend hτH htτ s.E x (Ici 0) + have hB (x : Vec) := derivWithin_upperTimeExtend hτH htτ s.B x (Ici 0) + change (∀ x v, derivWithin (fun r => upperTimeExtend τ H s.f (r,x,v)) (Ici 0) t + _ + _ = 0) ∧ _ + simp only [cutoffPrefix] + simp only [hf,hE,hB] + simpa only [upperTimeExtend,upperTimeCut_one hτH htτ.le,one_smul] using hh + +lemma SmoothClassicalPrefix.cutoff_smooth {d : Datum} {s : Solution} {τ H : ℝ} + (hs : SmoothClassicalPrefix d s H) (hτH : τ < H) : + SmoothOnFiniteHorizons (cutoffPrefix τ H s) := by + intro T _hT + exact ⟨(contDiffOn_upperTimeExtend hτH hs.f_smooth).mono (fun _ hp => hp.1), + (contDiffOn_upperTimeExtend hτH hs.E_smooth).mono (fun _ hp => hp.1), + (contDiffOn_upperTimeExtend hτH hs.B_smooth).mono (fun _ hp => hp.1)⟩ + +lemma SmoothClassicalPrefix.cutoff_classical_before {d : Datum} {s : Solution} {τ H : ℝ} + (hs : SmoothClassicalPrefix d s H) (hτ : 0 ≤ τ) (hτH : τ < H) : + ClassicalBefore d (cutoffPrefix τ H s) τ := by + have hH : 0 ≤ H := hτ.trans hτH.le + refine ⟨(contDiffOn_upperTimeExtend hτH hs.f_smooth).of_le (by decide), + (contDiffOn_upperTimeExtend hτH hs.E_smooth).of_le (by decide), + (contDiffOn_upperTimeExtend hτH hs.B_smooth).of_le (by decide),?_, + timeContinuousL2_upperTimeExtend hτH hH hs.E_L2, + timeContinuousL2_upperTimeExtend hτH hH hs.B_L2,?_, + cutoffPrefix_equations hτH hs.equations,?_,?_,?_⟩ + · intro t ht z + by_cases htH : t ≤ H + · exact mul_nonneg (upperTimeCut_nonneg τ H t) (hs.nonnegative t ⟨ht,htH⟩ z) + · simp only [cutoffPrefix,upperTimeExtend, + upperTimeCut_zero hτH (show (τ+H)/2 ≤ t by linarith),zero_smul,le_refl] + · obtain ⟨K,hK,hk⟩ := hs.compact + intro T _hT + refine ⟨K,hK,?_⟩ + intro t ht + by_cases htH : t ≤ H + · exact (tsupport_smul_subset_right (fun _ : Phase => upperTimeCut τ H t) + (fun z => s.f (t,z))).trans (hk t ⟨ht.1,htH⟩) + · simp only [cutoffPrefix,upperTimeExtend, + upperTimeCut_zero hτH (show (τ+H)/2 ≤ t by linarith),zero_smul] + change tsupport (0 : Phase → ℝ) ⊆ K + simp only [tsupport_zero,empty_subset] + · intro z + exact (cutoffPrefix_eq hτH hτ s).1 z |>.trans (hs.initial_f z) + · intro x + exact (cutoffPrefix_eq hτH hτ s).2.1 x |>.trans (hs.initial_E x) + · intro x + exact (cutoffPrefix_eq hτH hτ s).2.2 x |>.trans (hs.initial_B x) + +lemma Classical.smoothClassicalPrefix {d : Datum} {s : Solution} (hs : Classical d s) + (hm : SmoothOnFiniteHorizons s) {H : ℝ} (hH : 0 ≤ H) : SmoothClassicalPrefix d s H := by + refine ⟨(hm H hH).1,(hm H hH).2.1,(hm H hH).2.2, + (fun t ht => hs.2.2.2.1 t ht.1),?_,?_,hs.2.2.2.2.2.2.1 H hH, + (fun t ht _ => hs.2.2.2.2.2.2.2.1 t ht), + hs.2.2.2.2.2.2.2.2.1,hs.2.2.2.2.2.2.2.2.2.1,hs.2.2.2.2.2.2.2.2.2.2⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/EquationsBefore.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/EquationsBefore.lean new file mode 100644 index 0000000000000000000000000000000000000000..192d06c3b0999afdb7d3eadfbf6fe89288f18ee7 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/EquationsBefore.lean @@ -0,0 +1,768 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverQCLM + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def EquationsBefore (s : Solution) (H : ℝ) : Prop := ∀ t, 0 ≤ t → t < H → + (∀ x v, + derivWithin (fun t' => s.f (t', x, v)) (Ici 0) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => s.f (t, y, v)) x i) + + (∑ i : Fin 3, (s.E (t, x) + cross (velocity v) (s.B (t, x))) i * + spatialPartial (fun v' => s.f (t, x, v')) v i) = 0) ∧ + (∀ x, derivWithin (fun t' => s.E (t', x)) (Ici 0) t - + curl (fun y => s.B (t, y)) x = -current (fun z => s.f (t, z)) x) ∧ + (∀ x, derivWithin (fun t' => s.B (t', x)) (Ici 0) t + + curl (fun y => s.E (t, y)) x = 0) ∧ + (∀ x, divergence (fun y => s.E (t, y)) x = rho (fun z => s.f (t, z)) x) ∧ + (∀ x, divergence (fun y => s.B (t, y)) x = 0) + +def ClassicalBefore (d : Datum) (s : Solution) (H : ℝ) : Prop := + ContDiffOn ℝ 1 s.f particleHalfSpace ∧ + ContDiffOn ℝ 1 s.E fieldHalfSpace ∧ ContDiffOn ℝ 1 s.B fieldHalfSpace ∧ + (∀ t, 0 ≤ t → ∀ z, 0 ≤ s.f (t, z)) ∧ + TimeContinuousL2 s.E ∧ TimeContinuousL2 s.B ∧ + CompactOnFiniteHorizons s ∧ EquationsBefore s H ∧ + (∀ z, s.f (0, z) = d.f₀ z) ∧ + (∀ x, s.E (0, x) = d.E₀ x) ∧ (∀ x, s.B (0, x) = d.B₀ x) + +lemma particle_spacetime_vlasov_before {s : Solution} {H : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : EquationsBefore s H) + {t : ℝ} (ht : 0 < t) (hth : t < H) (x v : Vec) : + fderiv ℝ (particleBySpacetime s.f) ((t,x),v) + ((1,velocity v),s.E (t,x) + cross (velocity v) (s.B (t,x))) = 0 := by + have hd := particle_differentiableAt_positive hf ht x v + rw [fderiv_particleBySpacetime hd, full_directional_derivative hd] + have he := (heq t (le_of_lt ht) hth).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at he + +lemma classical_retarded_electric_integral_identity_before {s : Solution} {H : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : EquationsBefore s H) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedG x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedG hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hki : Continuous (fun v => physicalElectricKernel (coneRadius x y) (coneDirection x y) + (velocity v) (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hk + have hid := classical_retarded_integral_identity + (L := fun v => ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i-velocity v i)/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + simpa only [fderiv_particleBySpacetime hf'] using particle_spacetime_vlasov_before hf heq ht + ((sub_le_self t (norm_nonneg (x-y))).trans_lt hth) y v + simpa only [retardedDensity,mul_assoc] using retarded_electric_density_identity hf' hxy hv i + +lemma classical_retarded_magnetic_integral_identity_before {s : Solution} {H : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : EquationsBefore s H) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedH x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedH x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedH hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hkc : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))))) := + (contDiff_cross (k:=1)).continuous.comp (continuous_const.prodMk hk) + have hki : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y))))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hkc + have hid := classical_retarded_integral_identity + (L := fun v => -((coneRadius x y)^2)⁻¹*cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) - + cross (coneDirection x y) (velocity v) i/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + simpa only [fderiv_particleBySpacetime hf'] using particle_spacetime_vlasov_before hf heq ht + ((sub_le_self t (norm_nonneg (x-y))).trans_lt hth) y v + simpa only [retardedDensity,mul_assoc] using retarded_magnetic_density_identity hf' hxy hv i + +lemma classical_retarded_electric_moment_identity_before {s : Solution} {H : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : EquationsBefore s H) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y + + (coneDirection x y i/coneRadius x y)* + dirD (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) (1,0) (t-coneRadius x y,y) - + (coneRadius x y)⁻¹* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 i) (1,0) (t-coneRadius x y,y) = + (∫ v : Vec, s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))) i) - + divergence (fun z => ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hvel : ContDiff ℝ 1 (fun v => velocity v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp contDiff_velocity + have hfI : Integrable (fun v : Vec => s.f (t-coneRadius x y,y,v)) := by + simpa only [one_mul] using hr.scalar_moment_integrable (continuous_const (y:=(1:ℝ))) ht.le y + have htI : Integrable (fun v : Vec => fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := by + simpa only [one_mul] using hr.time_moment_integrable (continuous_const (y:=(1:ℝ))) ht y + have hjI := hr.time_moment_integrable hvel.continuous ht y + have hsum : Integrable (fun v : Vec => + ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i/coneRadius x y)*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := + (hfI.const_mul _).add (htI.const_mul _) + rw [dirD_rho hr ht y,dirD_current_component hr ht y i,rho] + rw [← integral_const_mul,← integral_const_mul,← integral_const_mul, + ← integral_add (hfI.const_mul _) (htI.const_mul _), + ← integral_sub hsum (hjI.const_mul _)] + convert classical_retarded_electric_integral_identity_before hf hc heq hxy ht hth i using 1 + congr 1 + funext v + dsimp only + ring + +lemma classical_retarded_magnetic_moment_identity_before {s : Solution} {H : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : EquationsBefore s H) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y) i - + (coneRadius x y)⁻¹*(coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y)) = + retardedMagneticDensity s t x y i - divergence (retardedMagneticFlux s t x i) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hcv : ContDiff ℝ 1 (fun v : Vec => cross (coneDirection x y) (velocity v) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp + (contDiff_cross.comp (contDiff_const.prodMk contDiff_velocity)) + have hi := hr.moment_integrable (contDiff_velocity (k:=1)).continuous ht.le y + have hcross : cross (coneDirection x y) (current (fun z => s.f (t-coneRadius x y,z)) y) i = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) := by + have hi' := (crossCLM (coneDirection x y)).integrable_comp hi + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi' + unfold current + rw [← integral_cross_left hi] + simpa only [crossCLM_apply,PiLp.proj_apply,cross_smul_right,PiLp.smul_apply,smul_eq_mul,mul_comm] using he.symm + have hdt : coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y) = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0) := by + have hInt (k : Fin 3) : Integrable (fun v : Vec => velocity v k*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := hr.time_moment_integrable + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).continuous.comp (contDiff_velocity (k:=1)).continuous) ht y + rw [dirD_current_component hr ht y,dirD_current_component hr ht y, + ← integral_const_mul,← integral_const_mul,← integral_sub ((hInt _).const_mul _) ((hInt _).const_mul _)] + apply integral_congr_ae + filter_upwards [] with v + rw [cross_apply_cyclic] + ring + rw [hcross,hdt,retardedMagneticDensity_component hf hc hxy ht.le i, + ← integral_const_mul,← integral_const_mul, + ← integral_sub ((hr.scalar_moment_integrable hcv.continuous ht.le y).const_mul _) + ((hr.time_moment_integrable hcv.continuous ht y).const_mul _)] + unfold retardedMagneticFlux + convert classical_retarded_magnetic_integral_identity_before hf hc heq hxy ht hth i using 1 + congr 1 + funext v + dsimp only + ring + +lemma classical_positiveTimeShift_maxwell_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a t : ℝ} + (ha : 0 current (fun z => s.f (p.1,z)) p.2) (t,x) ∧ + dirD (positiveTimeShift a s.B) (1,0) (t,x) = + -spaceCurl (positiveTimeShift a s.E) (t,x) ∧ + divergence (fun y => positiveTimeShift a s.E (t,y)) x = + positiveTimeShift a (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) (t,x) ∧ + divergence (fun y => positiveTimeShift a s.B (t,y)) x = 0 := by + have hat : 0 (hm.field_positive hp).1) x + have hcB := spaceCurl_positiveTimeShift ha ht (fun p hp => (hm.field_positive hp).2) x + have hsE : (fun y => positiveTimeShift a s.E (t,y))=(fun y => s.E (a+t,y)) := + funext (positiveTimeShift_eq ha ht s.E) + have hsB : (fun y => positiveTimeShift a s.B (t,y))=(fun y => s.B (a+t,y)) := + funext (positiveTimeShift_eq ha ht s.B) + refine ⟨?_,?_,?_,?_⟩ + · unfold dirD + rw [fderiv_positiveTimeShift ha ht x hE,hcB,positiveTimeShift_eq ha ht] + exact (sub_eq_iff_eq_add.mp he).trans (by abel) + · unfold dirD + rw [fderiv_positiveTimeShift ha ht x hB,hcE] + exact eq_neg_of_add_eq_zero_left hb + · rw [hsE,positiveTimeShift_eq ha ht] + exact heq.2.2.2.1 x + · rw [hsB] + exact heq.2.2.2.2 x + +lemma classical_shifted_electric_potential_representation_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 s.E (a,y) i) (fun y => curl (fun z => s.B (a,z)) y i) (T,x) + + electricPotentialComponent + (positiveTimeShift a (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2)) + (positiveTimeShift a (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2)) i (T,x) := by + have hE := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).1) + have hB := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).2) + have hρ := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).1) + have hj := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2) + have hh := maxwell_electric_potential_representation hE hB hj hρ hT + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1 (by linarith [hr.2]) y).1) + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1.le (by linarith [hr.2]) y).2.1) + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1.le (by linarith [hr.2]) y).2.2.1) x i + rw [positiveTimeShift_eq ha hT] at hh + simpa only [positiveTimeShift_eq ha (le_refl 0),add_zero, + spaceCurl_positiveTimeShift ha (le_refl 0) (fun p hp => (hm.field_positive hp).2)] using hh + +lemma classical_shifted_magnetic_potential_representation_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 s.B (a,y) i) (fun y => -curl (fun z => s.E (a,z)) y i) (T,x) + + magneticPotentialComponent + (positiveTimeShift a (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2)) i (T,x) := by + have hE := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).1) + have hB := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).2) + have hj := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2) + have hh := maxwell_magnetic_potential_representation hE hB hj hT + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1.le (by linarith [hr.2]) y).1) + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1 (by linarith [hr.2]) y).2.1) + (fun r hr y => (classical_positiveTimeShift_maxwell_before hs hm ha hr.1.le (by linarith [hr.2]) y).2.2.2) x i + rw [positiveTimeShift_eq ha hT] at hh + simpa only [positiveTimeShift_eq ha (le_refl 0),add_zero, + spaceCurl_positiveTimeShift ha (le_refl 0) (fun p hp => (hm.field_positive hp).1)] using hh + +lemma contDiff_shifted_moments_before {d : Datum} {s : Solution} {H : ℝ} (hs : ClassicalBefore d s H) + (hm : SmoothOnFiniteHorizons s) {a : ℝ} (ha : 0 (hm.moments_positive hs.2.2.2.2.2.2.1 hp).1), + contDiff_positiveTimeShift ha (fun _p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2)⟩ + +lemma ClassicalBefore.regularParticle {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) : RegularParticle s.f := ⟨hs.1,hs.2.2.2.2.2.2.1⟩ + +lemma electricMomentDensity_actual_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} (ha : 0 current (fun q => s.f (p.1,q)) p.2 i) + (a+(T-‖z‖),x+z) := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp _ hj).differentiableAt (by simp) + have herr : (fun p => shiftedCurrent s a p i)= + positiveTimeShift a (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 i) := by + funext p + simp only [shiftedCurrent,positiveTimeShift,positiveTimeExtend,PiLp.smul_apply,smul_eq_mul] + unfold electricMomentDensity + rw [herr] + have hρeq : shiftedRho s a (T-‖z‖,x+z)=rho (fun q => s.f (a+(T-‖z‖),q)) (x+z) := + positiveTimeShift_eq ha (sub_nonneg.mpr hzt.le) _ _ + rw [hρeq] + unfold dirD shiftedRho + rw [fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ (hρ.differentiableAt (by simp)), + fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ hji] + have he := classical_retarded_electric_moment_identity_before hs.1 hc hs.2.2.2.2.2.2.2.1 hxy ht hH i + rw [← retardedElectricDensity_component hs.1 hc hxy ht.le i] at he + change _ = _ - divergence (retardedElectricFlux s (a+T) x i) (x+z) at he + rw [← he] + simp only [coneRadius_add,coneDirection_add,PiLp.neg_apply,PiLp.smul_apply,smul_eq_mul, + dirD,show a+T-‖z‖=a+(T-‖z‖) by ring] + field_simp [norm_ne_zero_iff.mpr hz] + ring + +lemma integrated_electricMomentDensity_actual_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 ℝ) i).integrable_comp + (integrableOn_retardedElectricDensity hs.1 hs.2.1 hs.2.2.1 hc hT.le + (show T retardedElectricDensity s (a+T) x (x+z) i) (ball (0:Vec) T) at hD + let F : Vec → Vec := fun z => retardedElectricFlux s (a+T) x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) T)] + (fun z => retardedElectricDensity s (a+T) x (x+z) i - + electricMomentDensity (shiftedRho s a) (shiftedCurrent s a) T x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := electricMomentDensity_actual_before hs hm ha hH x i hz0 (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ s.E (a,y) i) (fun y => curl (fun z => s.B (a,z)) y i) (T,x) + + (4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, retardedElectricDensity s (a+T) x (x+z) i) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T^2*dot n.1 + (retardedElectricFlux s (a+T) x i (x+T • n.1)) ∂sphereMeasure) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T*n.1 i*rho (fun z => s.f (a,z)) (x+T • n.1) ∂sphereMeasure) - + waveK (fun y => current (fun z => s.f (a,z)) y i) (T,x) := by + have hρj := contDiff_shifted_moments_before hs hm ha + rw [classical_shifted_electric_potential_representation_before hs hm ha hT.le hH x i] + change _ + electricPotentialComponent (shiftedRho s a) (shiftedCurrent s a) i (T,x)=_ + rw [electricPotentialComponent_ball hρj.1 hρj.2 hT] + change _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, + electricMomentDensity (shiftedRho s a) (shiftedCurrent s a) T x i z) - _ - _)=_ + rw [integrated_electricMomentDensity_actual_before hs hm ha hT hH x i] + have hρ0 : (fun n : Sphere => T*n.1 i*shiftedRho s a (0,x+T • n.1)) = + (fun n : Sphere => T*n.1 i*rho (fun z => s.f (a,z)) (x+T • n.1)) := by + funext n + simp only [shiftedRho,positiveTimeShift_eq ha (le_refl 0),add_zero] + have hj0 : (fun y => shiftedCurrent s a (0,y) i)=(fun y => current (fun z => s.f (a,z)) y i) := by + funext y + simp only [shiftedCurrent,positiveTimeShift_eq ha (le_refl 0),add_zero] + rw [hρ0,hj0] + ring + +lemma magneticMomentDensity_actual_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} (ha : 0 current (fun q => s.f (p.1,q)) p.2 k) (a+(T-‖z‖),x+z) := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).contDiff.contDiffAt.comp _ hj).differentiableAt (by simp) + have herr (k : Fin 3) : (fun p => shiftedCurrent s a p k)= + positiveTimeShift a (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 k) := by + funext p + simp only [shiftedCurrent,positiveTimeShift,positiveTimeExtend,PiLp.smul_apply,smul_eq_mul] + have hjder (k : Fin 3) : dirD (fun p => shiftedCurrent s a p k) (1,0) (T-‖z‖,x+z) = + dirD (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 k) (1,0) (a+(T-‖z‖),x+z) := by + rw [herr] + unfold dirD + rw [fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ (hji k)] + have hjval : shiftedCurrent s a (T-‖z‖,x+z)=current (fun q => s.f (a+(T-‖z‖),q)) (x+z) := + positiveTimeShift_eq ha (sub_nonneg.mpr hzt.le) _ _ + unfold magneticMomentDensity + rw [hjder,hjder,hjval] + have he := classical_retarded_magnetic_moment_identity_before hs.1 hc hs.2.2.2.2.2.2.2.1 hxy ht hH i + rw [← he,cross_apply_cyclic] + simp only [coneRadius_add,coneDirection_add,PiLp.neg_apply,PiLp.smul_apply,smul_eq_mul, + show a+T-‖z‖=a+(T-‖z‖) by ring] + field_simp [norm_ne_zero_iff.mpr hz] + ring + +lemma integrated_magneticMomentDensity_actual_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 retardedMagneticDensity s (a+T) x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedMagneticDensity hs.1 hs.2.1 hs.2.2.1 hc hT.le (show T retardedMagneticFlux s (a+T) x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) T)] + (fun z => retardedMagneticDensity s (a+T) x (x+z) i - + magneticMomentDensity (shiftedCurrent s a) T x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := magneticMomentDensity_actual_before hs hm ha hH x i hz0 (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ s.B (a,y) i) (fun y => -curl (fun z => s.E (a,z)) y i) (T,x) + + (4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, retardedMagneticDensity s (a+T) x (x+z) i) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T^2*dot n.1 + (retardedMagneticFlux s (a+T) x i (x+T • n.1)) ∂sphereMeasure) + + (4*Real.pi)⁻¹ * (∫ n : Sphere, + T*n.1 (curlA i)*current (fun z => s.f (a,z)) (x+T • n.1) (curlB i) - + T*n.1 (curlB i)*current (fun z => s.f (a,z)) (x+T • n.1) (curlA i) ∂sphereMeasure) := by + have hρj := contDiff_shifted_moments_before hs hm ha + rw [classical_shifted_magnetic_potential_representation_before hs hm ha hT.le hH x i] + change _ + magneticPotentialComponent (shiftedCurrent s a) i (T,x)=_ + rw [magneticPotentialComponent_ball hρj.2 hT] + change _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, + magneticMomentDensity (shiftedCurrent s a) T x i z) + _)=_ + rw [integrated_magneticMomentDensity_actual_before hs hm ha hT hH x i] + have hj0 (y : Vec) : shiftedCurrent s a (0,y)=current (fun z => s.f (a,z)) y := by + simp only [shiftedCurrent,positiveTimeShift_eq ha (le_refl 0),add_zero] + simp_rw [hj0] + ring + +lemma continuousOn_electricConeBoundary_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 hp.1) + have hB : ContDiffOn ℝ ∞ s.B (Icc 0 T ×ˢ (univ : Set Vec)) := (hm T hT.le).2.2.mono (fun p hp => hp.1) + have hcurl := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (continuousOn_slab_curl hT (hB.of_le (by decide))) + have hfree := (continuousOn_freeWave_slab hT hE hcurl x i).mono + (show Icc 0 (T/2) ⊆ Icc 0 T from fun a ha => ⟨ha.1,by linarith [ha.2]⟩) + have hflux := continuousOn_electric_flux_boundary hs.1 hc hT x i + have hdot := (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hflux) + have hflux' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).pow 2).mul hdot) + have hrho := continuousOn_cone_boundary_comp hT (hs.regularParticle.rho_continuous_slab hT.le) x + have hni : Continuous (fun p : ℝ × Vec => p.2 i) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp continuous_snd + have hrho' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).mul hni.continuousOn).mul hrho) + have hj := continuousOn_cone_boundary_comp hT (hs.regularParticle.current_continuous_slab hT.le) x + have hji := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn hj + have hj' := continuousOn_integral_sphere hji + exact ((hfree.sub (hflux'.const_mul ((4*Real.pi)⁻¹))).sub + (hrho'.const_mul ((4*Real.pi)⁻¹))).sub + ((((continuousOn_const (c:=T)).sub continuousOn_id).mul hj').const_mul ((4*Real.pi)⁻¹)) + +lemma continuousOn_magneticConeBoundary_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 hp.1) + have hB : ContDiffOn ℝ ∞ s.B (Icc 0 T ×ˢ (univ : Set Vec)) := (hm T hT.le).2.2.mono (fun p hp => hp.1) + have hcurl := ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (continuousOn_slab_curl hT (hE.of_le (by decide)))).neg + have hfree := (continuousOn_freeWave_slab hT hB hcurl x i).mono + (show Icc 0 (T/2) ⊆ Icc 0 T from fun a ha => ⟨ha.1,by linarith [ha.2]⟩) + have hflux := continuousOn_magnetic_flux_boundary hs.1 hc hT x i + have hdot := (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hflux) + have hflux' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).pow 2).mul hdot) + have hj := continuousOn_cone_boundary_comp hT (hs.regularParticle.current_continuous_slab hT.le) x + have hterm (j k : Fin 3) := (((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).mul + (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp continuous_snd).continuousOn)).mul + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).continuous.comp_continuousOn hj) + have hj' := continuousOn_integral_sphere ((hterm (curlA i) (curlB i)).sub (hterm (curlB i) (curlA i))) + exact (hfree.sub (hflux'.const_mul ((4*Real.pi)⁻¹))).add (hj'.const_mul ((4*Real.pi)⁻¹)) + +lemma classical_electric_physical_representation_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 retardedElectricDensity s T x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedElectricDensity_le hs.1 hs.2.1 hs.2.2.1 hc hT.le le_rfl x) + have hlim := (tendsto_right_of_continuousOn_Icc (show 0 electricConeBoundary s T x i a + (4*Real.pi)⁻¹ * + (∫ z in ball (0:Vec) (T-a), retardedElectricDensity s T x (x+z) i)) =ᶠ[𝓝[>] (0:ℝ)] + (fun _ => s.E (T,x) i) := by + filter_upwards [Ioo_mem_nhdsGT hT] with a ha + have he := classical_shifted_electric_physical_representation_before hs hm ha.1 + (show 0.symm + +lemma classical_magnetic_physical_representation_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 retardedMagneticDensity s T x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedMagneticDensity_le hs.1 hs.2.1 hs.2.2.1 hc hT.le le_rfl x) + have hlim := (tendsto_right_of_continuousOn_Icc (show 0 magneticConeBoundary s T x i a + (4*Real.pi)⁻¹ * + (∫ z in ball (0:Vec) (T-a), retardedMagneticDensity s T x (x+z) i)) =ᶠ[𝓝[>] (0:ℝ)] + (fun _ => s.B (T,x) i) := by + filter_upwards [Ioo_mem_nhdsGT hT] with a ha + have he := classical_shifted_magnetic_physical_representation_before hs hm ha.1 + (show 0.symm + +lemma classical_electric_physical_vector_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 ℝ) i).integral_comp_comm hD + exact (classical_electric_physical_representation_before hs hm ht hH x i).trans + (by simpa only [electricBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => electricConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + +lemma classical_magnetic_physical_vector_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 ℝ) i).integral_comp_comm hD + exact (classical_magnetic_physical_representation_before hs hm ht hH x i).trans + (by simpa only [magneticBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => magneticConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + +lemma classical_physical_force_representation_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 cross a (retardedMagneticDensity s t x (x+z))) + (ball (0:Vec) t) := by + simpa only [IntegrableOn,crossCLM_apply] using (crossCLM a).integrable_comp hB + have hc' : (∫ z in ball (0:Vec) t, cross a (retardedMagneticDensity s t x (x+z))) = + cross a (∫ z in ball (0:Vec) t, retardedMagneticDensity s t x (x+z)) := by + simpa only [crossCLM_apply] using hc + rw [classical_electric_physical_vector_before hs hm ht hH x,classical_magnetic_physical_vector_before hs hm ht hH x, + integral_add hE hcross,hc'] + simp only [boundaryLorentzForce,cross_add_right,cross_smul_right] + module + +lemma classical_electricConeBoundary_datum_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) {t : ℝ} (ht : 0 hz.1.1),hs.2.1.mono (fun _ hz => hz.1.1), + hs.2.2.1.mono (fun _ hz => hz.1.1),(fun t ht => hs.2.2.2.1 t ht.1),?_,?_, + hs.2.2.2.2.2.2.1 T hT,?_,?_⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ + · intro t ht x v + have hh := (hs.2.2.2.2.2.2.2.1 t ht.1.le (ht.2.trans_le hH)).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro t ht x + have he := (hs.2.2.2.2.2.2.2.1 t ht.1.le (ht.2.trans_le hH)).2.1 x + have hb := (hs.2.2.2.2.2.2.2.1 t ht.1.le (ht.2.trans_le hH)).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +lemma classical_boundaryLorentzForce_datum_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) {t : ℝ} (ht : 0 retardedForceKernel s t x a p.1 p.2) t x] + rfl + +lemma classical_retarded_force_label_integral_before {d : Datum} {s : Solution} {H : ℝ} + (hs : ClassicalBefore d s H) (hm : SmoothOnFiniteHorizons s) {T t : ℝ} + (F : PhaseFlowOn s.E s.B T) (ht : t∈Icc 0 T) (ht0 : 0 s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) := by + have hd₁ := particle_differentiableAt_positive hs₁.1 ht x v + have hd₂ := particle_differentiableAt_positive hs₂.1 ht x v + have hsp₁ : DifferentiableAt ℝ (particleBySpacetime s₁.f) ((t,x),v) := + (hd₁.comp ((t,x),v) ((contDiff_reassociate (k := 1)).differentiable (by simp) _)) + have hsp₂ : DifferentiableAt ℝ (particleBySpacetime s₂.f) ((t,x),v) := + (hd₂.comp ((t,x),v) ((contDiff_reassociate (k := 1)).differentiable (by simp) _)) + have he₁ := particle_spacetime_vlasov_before hs₁.1 hs₁.2.2.2.2.2.2.2.1 ht hth x v + have he₂ := particle_spacetime_vlasov_before hs₂.1 hs₂.2.2.2.2.2.2.2.1 ht hth x v + change fderiv ℝ (fun z => ((particleBySpacetime s₁.f-particleBySpacetime s₂.f) z)^2/2) + ((t,x),v) _ = _ + rw [fderiv_square_half (hsp₁.sub hsp₂), fderiv_sub hsp₁ hsp₂] + simp only [sub_apply,Pi.sub_apply,he₁,zero_sub] + have hcross : cross (velocity v) (s₁.B (t,x)-s₂.B (t,x)) = + cross (velocity v) (s₁.B (t,x))-cross (velocity v) (s₂.B (t,x)) := by + ext i; fin_cases i <;> simp [cross] <;> ring + rw [hcross] + have hh : (((1:ℝ),velocity v),s₁.E (t,x)+cross (velocity v) (s₁.B (t,x))) = + ((1,velocity v),s₂.E (t,x)+cross (velocity v) (s₂.B (t,x))) + + ((0,0),(s₁.E (t,x)-s₂.E (t,x))+(cross (velocity v) (s₁.B (t,x))-cross (velocity v) (s₂.B (t,x)))) := by + apply Prod.ext + · simp + · dsimp + abel + rw [hh,map_add,he₂,zero_add] + have hv := fderiv_velocity_slice hsp₂ + change ∀ b, fderiv ℝ (fun v => s₂.f (t,x,v)) v b = + fderiv ℝ (particleBySpacetime s₂.f) ((t,x),v) ((0,0),b) at hv + rw [← hv] + simp only [particleBySpacetime] + ring + +lemma squareDifference_regular_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) : + RegularParticle (squareDifference s₁ s₂) := by + refine ⟨((h₁.1.sub h₂.1).pow 2).div_const 2,?_⟩ + intro T hT + obtain ⟨K₁,hK₁,hz₁⟩ := h₁.regularParticle.2 T hT + obtain ⟨K₂,hK₂,hz₂⟩ := h₂.regularParticle.2 T hT + refine ⟨K₁ ∪ K₂,hK₁.union hK₂,?_⟩ + intro t ht + apply closure_minimal ?_ (hK₁.union hK₂).isClosed + intro z hz + by_contra hn + have hf₁ : s₁.f (t,z)=0 := image_eq_zero_of_notMem_tsupport (f := fun z => s₁.f (t,z)) + (fun hh => hn (Or.inl (hz₁ t ht hh))) + have hf₂ : s₂.f (t,z)=0 := image_eq_zero_of_notMem_tsupport (f := fun z => s₂.f (t,z)) + (fun hh => hn (Or.inr (hz₂ t ht hh))) + exact hz (by simp [squareDifference,hf₁,hf₂]) + +lemma particle_difference_local_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 < t) (hth : t < H) (x : Vec) : + deriv (fun r => particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (r,x)) t + + divergence (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = + ∫ v : Vec, -(s₁.f (t,x,v)-s₂.f (t,x,v)) * + fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) := by + have hf := squareDifference_regular_before h₁ h₂ + obtain ⟨U,K,hU,hK,hp,hF,hz⟩ := hf.local_data ht x + have he := particle_number_balance_param (s₁.E (t,x)) (s₁.B (t,x)) hU hK hp hF hz + have he' : (∫ v : Vec, fderiv ℝ (particleBySpacetime (squareDifference s₁ s₂)) ((t,x),v) + ((1,velocity v),s₁.E (t,x)+cross (velocity v) (s₁.B (t,x)))) = _ := + integral_congr_ae (Filter.Eventually.of_forall (particle_difference_direction_before h₁ h₂ ht hth x)) + rw [he'] at he + have hn := (hf.moment_regular (w := fun _ => (1:ℝ)) contDiff_const).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + rw [deriv_time_slice (hn.differentiableAt (by simp))] + apply Eq.trans ?_ he + congr 1 + · congr 2 + ext p + exact particleMoment_one _ p + · apply Finset.sum_congr rfl + intro i _ + have hflux := (hf.moment_regular contDiff_velocity).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hc : DifferentiableAt ℝ (fun p => particleMoment (squareDifference s₁ s₂) velocity p i) (t,x) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (t,x) + (hflux.differentiableAt (by simp)) + rw [spatialPartial_time_slice hc] + have heq : (fun p : ℝ × Vec => particleMoment (squareDifference s₁ s₂) velocity p i) =ᶠ[nhds (t,x)] + (fun p => ∫ v : Vec, velocity v i * particleBySpacetime (squareDifference s₁ s₂) (p,v)) := by + filter_upwards [(isOpen_lt continuous_const continuous_fst).mem_nhds ht] with p hp + exact hf.moment_component (contDiff_velocity (k := 1)).continuous hp.le p.2 i + rw [heq.fderiv_eq (𝕜 := ℝ)] + +lemma difference_maxwell_local_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 < t) (hth : t < H) (x : Vec) : + deriv (fun r => (‖s₁.E (r,x)-s₂.E (r,x)‖^2+‖s₁.B (r,x)-s₂.B (r,x)‖^2)/2) t + + divergence (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y))) x = + -dot (s₁.E (t,x)-s₂.E (t,x)) + (current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x) := by + have hE₁ := field_differentiableAt_positive h₁.2.1 ht x + have hB₁ := field_differentiableAt_positive h₁.2.2.1 ht x + have hE₂ := field_differentiableAt_positive h₂.2.1 ht x + have hB₂ := field_differentiableAt_positive h₂.2.2.1 ht x + have hE₁t : DifferentiableAt ℝ (fun r : ℝ => s₁.E (r,x)) t := hE₁.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hB₁t : DifferentiableAt ℝ (fun r : ℝ => s₁.B (r,x)) t := hB₁.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hE₂t : DifferentiableAt ℝ (fun r : ℝ => s₂.E (r,x)) t := hE₂.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hB₂t : DifferentiableAt ℝ (fun r : ℝ => s₂.B (r,x)) t := hB₂.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hE₁x : DifferentiableAt ℝ (fun y : Vec => s₁.E (t,y)) x := hE₁.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hB₁x : DifferentiableAt ℝ (fun y : Vec => s₁.B (t,y)) x := hB₁.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hE₂x : DifferentiableAt ℝ (fun y : Vec => s₂.E (t,y)) x := hE₂.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hB₂x : DifferentiableAt ℝ (fun y : Vec => s₂.B (t,y)) x := hB₂.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have he₁ := (h₁.2.2.2.2.2.2.2.1 t ht.le hth).2.1 x + have hb₁ := (h₁.2.2.2.2.2.2.2.1 t ht.le hth).2.2.1 x + have he₂ := (h₂.2.2.2.2.2.2.2.1 t ht.le hth).2.1 x + have hb₂ := (h₂.2.2.2.2.2.2.2.1 t ht.le hth).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at he₁ hb₁ he₂ hb₂ + apply maxwell_energy_balance (E := s₁.E-s₂.E) (B := s₁.B-s₂.B) (hE₁.sub hE₂) (hB₁.sub hB₂) + · change deriv ((fun r => s₁.E (r,x))-(fun r => s₂.E (r,x))) t - + curl ((fun y => s₁.B (t,y))-(fun y => s₂.B (t,y))) x = _ + rw [deriv_sub hE₁t hE₂t,curl_sub hB₁x hB₂x] + calc + _ = (deriv (fun r => s₁.E (r,x)) t-curl (fun y => s₁.B (t,y)) x)- + (deriv (fun r => s₂.E (r,x)) t-curl (fun y => s₂.B (t,y)) x) := by abel + _ = _ := by rw [he₁,he₂]; abel + · change deriv ((fun r => s₁.B (r,x))-(fun r => s₂.B (r,x))) t + + curl ((fun y => s₁.E (t,y))-(fun y => s₂.E (t,y))) x = _ + rw [deriv_sub hB₁t hB₂t,curl_sub hE₁x hE₂x] + calc + _ = (deriv (fun r => s₁.B (r,x)) t+curl (fun y => s₁.E (t,y)) x)- + (deriv (fun r => s₂.B (r,x)) t+curl (fun y => s₂.E (t,y)) x) := by abel + _ = _ := by rw [hb₁,hb₂]; simp + +lemma differenceEnergy_regular_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) : + ContDiffOn ℝ 1 (differenceEnergy s₁ s₂) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.sub h₂.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + have hb := (h₁.2.2.1.sub h₂.2.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + exact ((he.norm_sq ℝ).add (hb.norm_sq ℝ)).div_const 2 |>.add + ((squareDifference_regular_before h₁ h₂).moment_regular contDiff_const) + +lemma differenceFlux_regular_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) : + ContDiffOn ℝ 1 (differenceFlux s₁ s₂) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.sub h₂.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + have hb := (h₁.2.2.1.sub h₂.2.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + exact ((contDiff_cross (k := 1)).contDiffOn.comp (he.prodMk hb) + (fun _ _ => mem_univ _)).add + ((squareDifference_regular_before h₁ h₂).moment_regular contDiff_velocity) + +lemma differenceEnergy_continuous_slab_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (differenceEnergy s₁ s₂) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.continuousOn.sub h₂.2.1.continuousOn).mono + (show Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from fun p hp => hp.1.1) + have hb := (h₁.2.2.1.continuousOn.sub h₂.2.2.1.continuousOn).mono + (show Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from fun p hp => hp.1.1) + exact ((he.norm.pow 2).add (hb.norm.pow 2)).div_const 2 |>.add + ((squareDifference_regular_before h₁ h₂).moment_continuous_slab continuous_const hT) + +lemma differenceEnergy_integrable_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 ≤ t) : + Integrable (fun x : Vec => differenceEnergy s₁ s₂ (t,x)) := by + exact (((h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).integrable_norm_sq ht).add + ((h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).integrable_norm_sq ht)).div_const 2 |>.add + ((squareDifference_regular_before h₁ h₂).spatial_moment_integrable continuous_const ht) + +lemma differenceEnergy_integrated_continuous_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun t => ∫ x : Vec, differenceEnergy s₁ s₂ (t,x)) (Icc 0 T) := by + have he := (h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).continuous_integral_norm_sq.mono + (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + have hb := (h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).continuous_integral_norm_sq.mono + (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + have hp := (squareDifference_regular_before h₁ h₂).integrated_moment_continuous + (w := fun _ => (1:ℝ)) continuous_const hT + apply ((he.add hb).div_const 2 |>.add hp).congr + intro t ht + change (∫ x : Vec, (‖(s₁.E-s₂.E) (t,x)‖^2+‖(s₁.B-s₂.B) (t,x)‖^2)/2+ + particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)) = _ + have hiE := (h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).integrable_norm_sq ht.1 + have hiB := (h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).integrable_norm_sq ht.1 + have hiP := (squareDifference_regular_before h₁ h₂).spatial_moment_integrable + (w := fun _ => (1:ℝ)) continuous_const ht.1 + calc + _ = (∫ x : Vec, (‖(s₁.E-s₂.E) (t,x)‖^2+‖(s₁.B-s₂.B) (t,x)‖^2)/2)+ + (∫ x : Vec, particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)) := + integral_add ((hiE.add hiB).div_const 2) hiP + _ = _ := by rw [integral_div,integral_add hiE hiB]; rfl + +lemma differenceFlux_bound_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ‖differenceFlux s₁ s₂ (t,x)‖ ≤ differenceEnergy s₁ s₂ (t,x) := by + apply (norm_add_le _ _).trans + apply add_le_add ?_ ((squareDifference_regular_before h₁ h₂).velocity_flux_bound ht x + (fun v => squareDifference_nonneg _ _ _)) + apply (norm_cross_le _ _).trans + dsimp [differenceFieldEnergy] + nlinarith [sq_nonneg (‖s₁.E (t,x)-s₂.E (t,x)‖-‖s₁.B (t,x)-s₂.B (t,x)‖)] + +lemma differenceEnergy_initial_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) (x : Vec) : + differenceEnergy s₁ s₂ (0,x) = 0 := by + have hf (v : Vec) : squareDifference s₁ s₂ (0,x,v)=0 := by + rw [squareDifference_zero_iff,h₁.2.2.2.2.2.2.2.2.1,h₂.2.2.2.2.2.2.2.2.1] + simp [differenceEnergy,differenceFieldEnergy,particleMoment_one,hf, + h₁.2.2.2.2.2.2.2.2.2.1,h₁.2.2.2.2.2.2.2.2.2.2, + h₂.2.2.2.2.2.2.2.2.2.1,h₂.2.2.2.2.2.2.2.2.2.2] + +lemma differenceEnergy_local_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 < t) (hth : t < H) (x : Vec) : + fderiv ℝ (differenceEnergy s₁ s₂) (t,x) (1,0)+ + divergence (fun y => differenceFlux s₁ s₂ (t,y)) x = + ∫ v : Vec, -(s₁.f (t,x,v)-s₂.f (t,x,v)) * + fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) - + dot (s₁.E (t,x)-s₂.E (t,x)) ((s₁.f (t,x,v)-s₂.f (t,x,v)) • velocity v) := by + have hE := (field_differentiableAt_positive h₁.2.1 ht x).sub + (field_differentiableAt_positive h₂.2.1 ht x) + have hB := (field_differentiableAt_positive h₁.2.2.1 ht x).sub + (field_differentiableAt_positive h₂.2.2.1 ht x) + have hfield : DifferentiableAt ℝ (differenceFieldEnergy s₁ s₂) (t,x) := by + unfold differenceFieldEnergy + convert ((hE.norm_sq (𝕜 := ℝ)).add (hB.norm_sq (𝕜 := ℝ))).mul_const (2 : ℝ)⁻¹ using 1; try rfl + have hpart := ((squareDifference_regular_before h₁ h₂).moment_regular + (w := fun _ => (1:ℝ)) contDiff_const).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hflux := ((squareDifference_regular_before h₁ h₂).moment_regular contDiff_velocity).contDiffAt + (x := (t,x)) ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hcross : DifferentiableAt ℝ (fun p => cross (s₁.E p-s₂.E p) (s₁.B p-s₂.B p)) (t,x) := + (contDiff_cross (k := 1)).differentiable (by simp) _ |>.comp (t,x) (hE.prodMk hB) + have hp := particle_difference_local_before h₁ h₂ ht hth x + have hm := difference_maxwell_local_before h₁ h₂ ht hth x + rw [deriv_time_slice (hpart.differentiableAt (by simp))] at hp + change deriv (fun r => differenceFieldEnergy s₁ s₂ (r,x)) t + _ = _ at hm + rw [deriv_time_slice hfield] at hm + have hs₁ := h₁.regularParticle.slice ht.le x + have hs₂ := h₂.regularParticle.slice ht.le x + let g : Vec → ℝ := fun v => s₁.f (t,x,v)-s₂.f (t,x,v) + have hgc : Continuous g := hs₁.1.continuous.sub hs₂.1.continuous + have hgK : HasCompactSupport g := hs₁.2.sub hs₂.2 + have hdc : Continuous (fun v => fderiv ℝ (fun w => s₂.f (t,x,w)) v) := + hs₂.1.continuous_fderiv (by simp) + have hi : Integrable (fun v => -g v * fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x)))) := + (hgc.neg.mul (hdc.clm_apply (contDiff_lorentz (k := 1) _ _).continuous)).integrable_of_hasCompactSupport + hgK.neg.mul_right + have hjI : Integrable (fun v => g v • velocity v) := + (hgc.smul (contDiff_velocity (k := 1)).continuous).integrable_of_hasCompactSupport hgK.smul_right + have hjdI : Integrable (fun v => dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v)) := by + simp only [dot_eq_inner] + exact hjI.const_inner _ + have hj : (∫ v : Vec, g v • velocity v) = + current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x := by + simp only [g,sub_smul,current] + exact integral_sub + (h₁.regularParticle.moment_integrable (contDiff_velocity (k := 1)).continuous ht.le x) + (h₂.regularParticle.moment_integrable (contDiff_velocity (k := 1)).continuous ht.le x) + have hdot : (∫ v : Vec, dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v)) = + dot (s₁.E (t,x)-s₂.E (t,x)) + (current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x) := by + simp only [dot_eq_inner] + rw [integral_inner hjI,hj] + change (fderiv ℝ (differenceFieldEnergy s₁ s₂+ + particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ))) (t,x)) (1,0) + + divergence ((fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y)))+ + fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = _ + have hxs : DifferentiableAt ℝ (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) + (s₁.B (t,y)-s₂.B (t,y))) x := + hcross.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hvs : DifferentiableAt ℝ (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x := + (hflux.differentiableAt (by simp)).comp x ((differentiableAt_const t).prodMk differentiableAt_id) + rw [fderiv_add hfield (hpart.differentiableAt (by simp)),add_apply] + have hvdiv : divergence ((fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y)))+ + fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = + divergence (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y))) x+ + divergence (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x := by + exact divergence_add hxs hvs + rw [hvdiv] + change _ = ∫ v : Vec, -g v * fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) - + dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v) + rw [integral_sub hi hjdI,hdot] + dsimp [g] at * + linarith + +lemma differenceEnergy_zero_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {t : ℝ} (ht : 0 ≤ t) (x : Vec) + (hz : differenceEnergy s₁ s₂ (t,x)=0) : + s₁.E (t,x)=s₂.E (t,x) ∧ s₁.B (t,x)=s₂.B (t,x) ∧ ∀ v, s₁.f (t,x,v)=s₂.f (t,x,v) := by + have hp : 0 ≤ (∫ v : Vec, squareDifference s₁ s₂ (t,x,v)) := + integral_nonneg (fun v => squareDifference_nonneg _ _ _) + have he := differenceFieldEnergy_nonneg s₁ s₂ (t,x) + change differenceFieldEnergy s₁ s₂ (t,x)+particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)=0 at hz + rw [particleMoment_one] at hz + have hp0 : (∫ v : Vec, squareDifference s₁ s₂ (t,x,v))=0 := by linarith + have he0 : differenceFieldEnergy s₁ s₂ (t,x)=0 := by linarith + have heq : s₁.E (t,x)=s₂.E (t,x) := by + apply sub_eq_zero.mp + apply norm_eq_zero.mp + dsimp [differenceFieldEnergy] at he0 + nlinarith [sq_nonneg ‖s₁.B (t,x)-s₂.B (t,x)‖,norm_nonneg (s₁.E (t,x)-s₂.E (t,x))] + have hbq : s₁.B (t,x)=s₂.B (t,x) := by + apply sub_eq_zero.mp + apply norm_eq_zero.mp + dsimp [differenceFieldEnergy] at he0 + nlinarith [sq_nonneg ‖s₁.E (t,x)-s₂.E (t,x)‖,norm_nonneg (s₁.B (t,x)-s₂.B (t,x))] + refine ⟨heq,hbq,?_⟩ + have hs := (squareDifference_regular_before h₁ h₂).slice ht x + have hi : Integrable (fun v : Vec => squareDifference s₁ s₂ (t,x,v)) := + hs.1.continuous.integrable_of_hasCompactSupport hs.2 + have hae := (integral_eq_zero_iff_of_nonneg (fun v => squareDifference_nonneg s₁ s₂ (t,x,v)) hi).mp hp0 + have hevery := Measure.eq_of_ae_eq (μ := volume) hae hs.1.continuous continuous_const + intro v + exact (squareDifference_zero_iff _ _ _).mp (congrFun hevery v) + +lemma differenceEnergy_differential_bound_before {d : Datum} {H : ℝ} {s₁ s₂ : Solution} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) {T : ℝ} (hT : 0 ≤ T) (hTH : T ≤ H) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ t ∈ Ioo 0 T, ∀ x : Vec, + fderiv ℝ (differenceEnergy s₁ s₂) (t,x) (1,0)+ + divergence (fun y => differenceFlux s₁ s₂ (t,y)) x ≤ + C*differenceEnergy s₁ s₂ (t,x) := by + obtain ⟨K₁,hK₁,hs₁⟩ := h₁.regularParticle.2 T hT + obtain ⟨K₂,hK₂,hs₂⟩ := h₂.regularParticle.2 T hT + let K : Set Vec := Prod.snd '' (K₁ ∪ K₂) + have hK : IsCompact K := (hK₁.union hK₂).image continuous_snd + obtain ⟨L,hL,hLb⟩ := h₂.regularParticle.velocity_derivative_bound hT + refine ⟨(2*L+2)*(1+(volume K).toReal),by positivity,?_⟩ + intro t ht x + rw [differenceEnergy_local_before h₁ h₂ ht.1 (ht.2.trans_le hTH) x] + have hf₁ := h₁.regularParticle.slice ht.1.le x + have hf₂ := h₂.regularParticle.slice ht.1.le x + have hz : ∀ v ∉ K, s₁.f (t,x,v)-s₂.f (t,x,v)=0 := by + intro v hv + have hnot₁ : (x,v) ∉ tsupport (fun z => s₁.f (t,z)) := by + intro hh + exact hv ⟨(x,v),Or.inl (hs₁ t ⟨ht.1.le,ht.2.le⟩ hh),rfl⟩ + have hnot₂ : (x,v) ∉ tsupport (fun z => s₂.f (t,z)) := by + intro hh + exact hv ⟨(x,v),Or.inr (hs₂ t ⟨ht.1.le,ht.2.le⟩ hh),rfl⟩ + rw [image_eq_zero_of_notMem_tsupport hnot₁,image_eq_zero_of_notMem_tsupport hnot₂,sub_self] + have hb := compact_difference_source_bound (s₁.E (t,x)-s₂.E (t,x)) + (s₁.B (t,x)-s₂.B (t,x)) (hf₁.1.continuous.sub hf₂.1.continuous) + (hf₂.1.continuous_fderiv (by simp)) hK hz hL (hLb t ht x) + simpa only [differenceEnergy,differenceFieldEnergy,particleMoment_one,squareDifference,Pi.sub_apply] using hb + +theorem classical_unique_before {d : Datum} {s₁ s₂ : Solution} {H : ℝ} + (h₁ : ClassicalBefore d s₁ H) (h₂ : ClassicalBefore d s₂ H) + {T : ℝ} (hT : 0 ≤ T) (hTH : T ≤ H) : + (∀ z, s₁.f (T,z)=s₂.f (T,z)) ∧ + (∀ x, s₁.E (T,x)=s₂.E (T,x)) ∧ (∀ x, s₁.B (T,x)=s₂.B (T,x)) := by + obtain ⟨C,hC,hbound⟩ := differenceEnergy_differential_bound_before h₁ h₂ hT hTH + have hz := local_energy_inequality_vanishes hC hT + (differenceEnergy_regular_before h₁ h₂) (differenceFlux_regular_before h₁ h₂) + (differenceEnergy_continuous_slab_before h₁ h₂ hT) + (fun _ _ _ => differenceEnergy_nonneg _ _ _) + (fun _ ht => differenceEnergy_integrable_before h₁ h₂ ht.1) + (differenceEnergy_integrated_continuous_before h₁ h₂ hT) + (fun _ ht => differenceFlux_bound_before h₁ h₂ ht.1.le) + hbound (differenceEnergy_initial_before h₁ h₂) + have heq (x : Vec) := differenceEnergy_zero_before h₁ h₂ hT x (hz x) + exact ⟨fun z => (heq z.1).2.2 z.2,fun x => (heq x).1,fun x => (heq x).2.1⟩ + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/GeometryCutoffDeficitLogSum.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/GeometryCutoffDeficitLogSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd435ad67b1311589ba19bd0c2000d7eaef19a51 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/GeometryCutoffDeficitLogSum.lean @@ -0,0 +1,220 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalProjectedRemainderSourceTruncate + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.geometry_cutoff_deficit_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (Q : Set (Fin 4→ℕ)) (a b w P D : ℝ), + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 ≤ D → 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + max 1 T*cappedRepresentative (k 3) ≤ D/P^2} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ENNReal.ofReal (C*D*w*(Real.log (2+P))^2) := by + classical + obtain ⟨C,hC,hsum⟩ := hd₀.central_density_deficit_log_sum + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + refine ⟨c*C,by positivity,?_⟩ + intro s T F hs hT h0 zX Q a b w P D ha hb hab hD hP hL hw hwP hsource hband + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + max 1 T*cappedRepresentative (k 3) ≤ D/P^2} + let f := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband' : ∀t∈Icc a b,w/16 ≤ ‖V t‖ := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht + have hbnd (k : Fin 4→ℕ) (hk : k∈sector) : + (∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) ≤ ENNReal.ofReal c*f k := by + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + have hθ : 0<θ := cappedRepresentative_pos _ + have hφ : 0<φ := cappedRepresentative_pos _ + have hsmall : (representativeClosedBin T w k).dmax ≤ (representativeClosedBin T w k).Dmin := by + change 8*θ^2 ≤ φ^2/2 + have hh : θ ≤ φ/16 := hk.1 + have hh2 := (sq_le_sq₀ hθ.le (by positivity : 0 ≤ φ/16)).mpr hh + nlinarith only [hh2] + have hh := physicalGeometryCutoff_integral_bound (X:=X) hs hα.snd.measurable + (representativeClosedBin T w k) measurableSet_Icc hJ hc hcut hw hθ hφ.le hsmall + (representativeClosedBin_radius_pos T w k) le_rfl le_rfl hband' Q + have he : 78400000*c*φ^2/θ=c*(78400000*φ^2/θ) := by ring + rw [he,ENNReal.ofReal_mul hc,mul_assoc] at hh + exact hh + have hs1 : (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ∑'k : Fin 4→ℕ,ENNReal.ofReal c*sector.indicator f k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈sector + · simpa only [indicator_of_mem hk] using hbnd k hk + · simp only [indicator_of_notMem hk,mul_zero,le_refl] + rw [ENNReal.tsum_mul_left] at hs1 + have hsub : (∑'k : Fin 4→ℕ,sector.indicator f k) ≤ + ∑'k : Fin 4→ℕ,({k | max 1 T*cappedRepresentative (k 3) ≤ D/P^2}:Set (Fin 4→ℕ)).indicator f k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈sector + · rw [indicator_of_mem hk,indicator_of_mem (show k∈({k | max 1 T*cappedRepresentative (k 3) ≤ D/P^2}:Set (Fin 4→ℕ)) from hk.2)] + · rw [indicator_of_notMem hk] + exact bot_le + have hs2 := hsub.trans (hsum s T F hs hT h0 zX a b w P D ha hb hab hw hwP hP hL hD hsource) + apply hs1.trans ((mul_le_mul' le_rfl hs2).trans_eq _) + rw [←ENNReal.ofReal_mul hc] + congr 1 + ring + +lemma Admissible.projected_remainder_deficit_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (a b w P D : ℝ), + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 ≤ D → 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + max 1 T*cappedRepresentative (k 3) ≤ D/P^2 ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3)) ≤ 1} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ENNReal.ofReal (C*D*w*(Real.log (2+P))^2)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + classical + obtain ⟨Cs,hCs,hcentral⟩ := hd₀.central_density_deficit_log_sum + obtain ⟨Cr,hCr,hremainder⟩ := hd₀.projected_remainder_selected_sum + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + let C := Cs+Cr*Cn^2 + have hC : 0 ≤ C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX a b w P D ha hb hab hD hP hL hw hwP hsource hband + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let W := ∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖ + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + max 1 T*cappedRepresentative (k 3) ≤ D/P^2 ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3)) ≤ 1} + let stable : Set (Fin 4→ℕ) := {k | max 1 T*cappedRepresentative (k 3) ≤ D/P^2} + let rfun := fun k : Fin 4→ℕ=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b) + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator rfun=Q.indicator rfun := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,indicator_of_mem (show k∈Q from ⟨hsrc,hk⟩)] + · rw [indicator_of_mem hk,indicator_of_notMem (show k∉Q from fun h=>hsrc h.1)] + exact F.physicalProjectedRemainder_integral_source_truncate hs hsource N hN X V K + hα.snd.measurable measurableSet_Icc hJ w k hsrc + · rw [indicator_of_notMem hk,indicator_of_notMem (show k∉Q from fun h=>hk h.2)] + have hQ : ∀k∈Q,k 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + classical + obtain ⟨C,hC,hsum⟩ := hd₀.central_density_stable_log_sum + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + refine ⟨c*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hsource hband HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w} + let f := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband' : ∀t∈Icc a b,w/16≤‖V t‖ := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht + have hbnd (k : Fin 4→ℕ) (hk : k∈sector) : + (∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))≤ENNReal.ofReal c*f k := by + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + have hθ : 0<θ := cappedRepresentative_pos _ + have hφ : 0<φ := cappedRepresentative_pos _ + have hsmall : (representativeClosedBin T w k).dmax≤(representativeClosedBin T w k).Dmin := by + change 8*θ^2≤φ^2/2 + have hh : θ≤φ/16 := hk.1 + have hh2 := (sq_le_sq₀ hθ.le (by positivity : 0≤φ/16)).mpr hh + nlinarith only [hh2] + have hh := physicalGeometryCutoff_integral_bound (X:=X) hs hα.snd.measurable + (representativeClosedBin T w k) measurableSet_Icc hJ hc hcut hw hθ hφ.le hsmall + (representativeClosedBin_radius_pos T w k) le_rfl le_rfl hband' Q + have he : 78400000*c*φ^2/θ=c*(78400000*φ^2/θ) := by ring + rw [he,ENNReal.ofReal_mul hc,mul_assoc] at hh + exact hh + have hs1 : (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ∑'k : Fin 4→ℕ,ENNReal.ofReal c*sector.indicator f k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈sector + · simpa only [indicator_of_mem hk] using hbnd k hk + · simp only [indicator_of_notMem hk,mul_zero,le_refl] + rw [ENNReal.tsum_mul_left] at hs1 + have hs2 := hsum s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab + hM hA hP hL hw hwP hsource HX HZ + apply hs1.trans ((mul_le_mul' le_rfl hs2).trans_eq _) + rw [←ENNReal.ofReal_mul hc] + congr 1 + ring + +lemma Admissible.projected_remainder_selected_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)), + (∀k∈Q,k 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let W := ∫⁻t in J,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖ + (∑'k : Fin 4→ℕ,Q.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w + (prefixMomentumForce s F.flow T zX) z + ∂physicalBinMeasure V (representativeClosedBin T w k) J) k)≤ + (∑'k : Fin 4→ℕ,Q.indicator (fun k=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) J)) k)+ + W*ENNReal.ofReal (C*Real.sqrt (max 1 T)*(N:ℝ)^2/w) := by + classical + obtain ⟨Cρ,hCρ,hdensity⟩ := hd₀.uniform_physicalBinDensity_constant + let C := 1974272*49152*Cρ + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨32*C,by positivity,?_⟩ + intro s T F hs hT h0 zX J w N Q hQ hJ hJT hw hband + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let W := ∫⁻t in J,ENNReal.ofReal ‖K t‖ + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) J) + let rfun := fun k : Fin 4→ℕ=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) J + let coeff := ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w) + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hK : Measurable (fun t=>ENNReal.ofReal ‖K t‖) := + (F.continuous_prefixMomentumForce hs hT zX).norm.measurable.ennreal_ofReal + have hband' : ∀t∈J,w/16≤‖V t‖ := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (hJT ht)] using hband t ht + have hbnd (k : Fin 4→ℕ) (hk : k∈Q) : + rfun k≤cfun k+W*(coeff*ENNReal.ofReal (directionWeightMajorant N k)) := by + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let B := representativeClosedBin T w k + have hp : 0

F y i) x v = (fderiv ℝ F x v) i := by + exact congrArg (fun L : Vec →L[ℝ] ℝ => L v) + (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp x (hF x).hasFDerivAt).fderiv) + +lemma BoundedSmooth.coordinate_bounds {F : Vec → Vec} (hF : BoundedSmooth F) : + ∃ C : ℝ, 0≤C ∧ ∀ x : Vec, ‖F x‖≤C ∧ + (∀ i v, |fderiv ℝ (fun y => F y i) x v|≤C*‖v‖) ∧ ∀ i, |curl F x i|≤C := by + obtain ⟨A,hA⟩ := hF.2 0 + obtain ⟨D,hD⟩ := hF.2 1 + have hD' : ∀ x, ‖fderiv ℝ F x‖≤ max D 0 := by + intro x + have hh : ‖fderiv ℝ F x‖≤D := by simpa only [norm_iteratedFDeriv_one] using hD x + exact hh.trans (le_max_left _ _) + have hfd (x v : Vec) (i : Fin 3) : |fderiv ℝ (fun y => F y i) x v|≤ max D 0*‖v‖ := by + rw [coordinate_fderiv_apply (hF.1.differentiable (by simp))] + exact (norm_coordinate_le _ i).trans (((fderiv ℝ F x).le_opNorm v).trans + (mul_le_mul_of_nonneg_right (hD' x) (norm_nonneg v))) + refine ⟨max A 0+2*max D 0,by positivity,?_⟩ + intro x + refine ⟨?_,?_,?_⟩ + · have hh : ‖F x‖≤A := by simpa only [norm_iteratedFDeriv_zero] using hA x + linarith [le_max_left A 0,le_max_right D 0] + · intro i v + exact (hfd x v i).trans (mul_le_mul_of_nonneg_right (by + linarith [le_max_right A 0,le_max_right D 0]) (norm_nonneg v)) + · intro i + have he : curl F x i=spatialPartial (fun y => F y (curlB i)) x (curlA i)- + spatialPartial (fun y => F y (curlA i)) x (curlB i) := by + fin_cases i <;> simp [curl,curlA,curlB] + rw [he] + have ha := hfd x (basis (curlA i)) (curlB i) + have hb := hfd x (basis (curlB i)) (curlA i) + simp only [show ∀ j : Fin 3, ‖basis j‖=1 by intro j; simp [basis,PiLp.norm_single],mul_one] at ha hb + exact (abs_sub _ _).trans ((add_le_add ha hb).trans (by linarith [le_max_right A 0])) + +lemma freeWave_bound_global {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) + {C : ℝ} (hC : 0≤C) (hg0 : ∀ x, |g x|≤C) + (hgd : ∀ x n : Vec, ‖n‖=1 → |fderiv ℝ g x n|≤C) + (hh0 : ∀ x, |h x|≤C) {t : ℝ} (ht : t∈Icc (0:ℝ) 1) (x : Vec) : + |freeWave g h (t,x)|≤3*C := by + have h₁ := abs_sphere_integral_le (fun n : Sphere => hg0 (x+t • n.1)) + have h₂ := abs_sphere_integral_le (fun n : Sphere => hgd (x+t • n.1) n.1 + (mem_sphere_zero_iff_norm.mp n.2)) + have h₃ := abs_sphere_integral_le (fun n : Sphere => hh0 (x+t • n.1)) + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + rw [freeWave_sphere hg] + calc + _ ≤ (4*Real.pi)⁻¹*(C*(4*Real.pi)+t*(C*(4*Real.pi)))+ + (4*Real.pi)⁻¹*(t*(C*(4*Real.pi))) := by + apply (abs_add_le _ _).trans + rw [abs_mul,abs_of_nonneg hp,abs_mul,abs_of_nonneg hp] + apply add_le_add + · apply mul_le_mul_of_nonneg_left _ hp + exact (abs_add_le _ _).trans (add_le_add h₁ (by + rw [abs_mul,abs_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left h₂ ht.1)) + · apply mul_le_mul_of_nonneg_left _ hp + rw [abs_mul,abs_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left h₃ ht.1 + _ = C+2*t*C := by field_simp; ring + _ ≤ 3*C := by nlinarith [ht.2] + +lemma BoundedSmooth.freeWave_coordinate_bound {E B : Vec → Vec} + (hE : BoundedSmooth E) (hB : BoundedSmooth B) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, ∀ x : Vec, + |freeWave (fun y => E y i) (fun y => curl B y i) (t,x)|≤C ∧ + |freeWave (fun y => B y i) (fun y => -curl E y i) (t,x)|≤C := by + obtain ⟨A,hA,hAb⟩ := hE.coordinate_bounds + obtain ⟨D,hD,hDb⟩ := hB.coordinate_bounds + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + refine ⟨3*(A+D),by positivity,?_⟩ + intro t ht x + constructor + · apply freeWave_bound_global (hproj.comp hE.1) (add_nonneg hA hD) _ _ _ ht + · intro y + exact (norm_coordinate_le _ i).trans ((hAb y).1.trans (le_add_of_nonneg_right hD)) + · intro y n hn + have hh : |fderiv ℝ (fun u => E u i) y n|≤A := by simpa only [hn,mul_one] using (hAb y).2.1 i n + exact hh.trans (le_add_of_nonneg_right hD) + · intro y + exact (hDb y).2.2 i |>.trans (le_add_of_nonneg_left hA) + · apply freeWave_bound_global (hproj.comp hB.1) (add_nonneg hA hD) _ _ _ ht + · intro y + exact (norm_coordinate_le _ i).trans ((hDb y).1.trans (le_add_of_nonneg_left hA)) + · intro y n hn + have hh : |fderiv ℝ (fun u => B u i) y n|≤D := by simpa only [hn,mul_one] using (hDb y).2.1 i n + exact hh.trans (le_add_of_nonneg_left hA) + · intro y + rw [abs_neg] + exact (hAb y).2.2 i |>.trans (le_add_of_nonneg_right hD) + +lemma electricConeBoundary_datum_bound_global {d : Datum} (hd : Admissible d) + (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, ∀ x : Vec, + |electricConeBoundary (datumBoundarySolution d) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := uniform_datumElectricFlux_bound hd.1.continuous hd.2.1 i + obtain ⟨D,hD,hmom⟩ := datum_moment_bounds hd.1.continuous hd.2.1 + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_bound hd.2.2.2.1 hd.2.2.2.2.1 i + refine ⟨A+(C+2*D),by positivity,?_⟩ + intro t ht x + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_cone_flux i hflux ht.1 x n) + have hrho : |∫ n : Sphere, t*n.1 i*rho d.f₀ (x+t • n.1) ∂sphereMeasure|≤ + (t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + have hn : |n.1 i|≤1 := by + exact (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + (hmom (x+t • n.1)).1 (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = t*D := by ring + have hj : |waveK (fun y => current d.f₀ y i) (t,x)|≤t*D := + waveK_bound_of_bounded (fun y => (norm_coordinate_le (current d.f₀ y) i).trans (hmom y).2) ht.1.le x + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t*n.1 i*rho d.f₀ (x+t • n.1) ∂sphereMeasure)|≤t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hrho hp + _ = t*D := by field_simp + have hf := (hfree t ⟨ht.1.le,ht.2⟩ x).1 + simp only [electricConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_sub _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)) hj)).trans (by + nlinarith [ht.2]) + +lemma magneticConeBoundary_datum_bound_global {d : Datum} (hd : Admissible d) + (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, ∀ x : Vec, + |magneticConeBoundary (datumBoundarySolution d) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := uniform_datumMagneticFlux_bound hd.1.continuous hd.2.1 i + obtain ⟨D,hD,hmom⟩ := datum_moment_bounds hd.1.continuous hd.2.1 + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_bound hd.2.2.2.1 hd.2.2.2.2.1 i + refine ⟨A+(C+2*D),by positivity,?_⟩ + intro t ht x + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_magnetic_cone_flux i hflux ht.1 x n) + have hem (n : Sphere) (j k : Fin 3) : + |t*n.1 j*current d.f₀ (x+t • n.1) k|≤t*D := by + have hn : |n.1 j|≤1 := + (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + have hj : |current d.f₀ (x+t • n.1) k|≤D := + (norm_coordinate_le _ k).trans (hmom _).2 + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + hj (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = _ := by ring + have hj : |∫ n : Sphere, + t*n.1 (curlA i)*current d.f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current d.f₀ (x+t • n.1) (curlA i) ∂sphereMeasure|≤ + (2*t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + exact (abs_sub _ _).trans ((add_le_add (hem n _ _) (hem n _ _)).trans (by ring_nf; rfl)) + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution d) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, + t*n.1 (curlA i)*current d.f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current d.f₀ (x+t • n.1) (curlA i) ∂sphereMeasure)|≤2*t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((2*t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hj hp + _ = 2*t*D := by field_simp + have hf := (hfree t ⟨ht.1.le,ht.2⟩ x).2 + simp only [magneticConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_add_le _ _).trans (add_le_add + ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)).trans (by + nlinarith [ht.2]) + +lemma datum_boundary_global_bound {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ (∀ x, ‖d.E₀ x‖≤C ∧ ‖d.B₀ x‖≤C) ∧ + ∀ t∈Ioc (0:ℝ) 1, ∀ x : Vec, + ‖electricBoundaryField (datumBoundarySolution d) t x‖≤C ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤C := by + choose CE hCE hEe using fun i : Fin 3 => electricConeBoundary_datum_bound_global hd i + choose CB hCB hBb using fun i : Fin 3 => magneticConeBoundary_datum_bound_global hd i + obtain ⟨E₀,hE₀⟩ := hd.2.2.2.1.2 0 + obtain ⟨B₀,hB₀⟩ := hd.2.2.2.2.1.2 0 + let S := (∑ i : Fin 3, CE i)+(∑ i : Fin 3, CB i) + have hS : 0≤S := add_nonneg (Finset.sum_nonneg (fun i _ => hCE i)) + (Finset.sum_nonneg (fun i _ => hCB i)) + let C := 3*S+max E₀ 0+max B₀ 0 + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_,?_⟩ + · intro x + constructor + · have hh : ‖d.E₀ x‖≤E₀ := by simpa only [norm_iteratedFDeriv_zero] using hE₀ x + dsimp [C] + linarith [le_max_left E₀ 0,le_max_right B₀ 0] + · have hh : ‖d.B₀ x‖≤B₀ := by simpa only [norm_iteratedFDeriv_zero] using hB₀ x + dsimp [C] + linarith [le_max_left B₀ 0,le_max_right E₀ 0] + · intro t ht x + have hEe' : ‖electricBoundaryField (datumBoundarySolution d) t x‖≤3*S := by + apply norm_le_three_of_coordinate_bound hS + intro i + exact (hEe i t ht x).trans (by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => hCE j) (Finset.mem_univ i) + have hh' : 0≤∑ j : Fin 3, CB j := Finset.sum_nonneg (fun j _ => hCB j) + dsimp [S] + linarith) + have hBb' : ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤3*S := by + apply norm_le_three_of_coordinate_bound hS + intro i + exact (hBb i t ht x).trans (by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => hCB j) (Finset.mem_univ i) + have hh' : 0≤∑ j : Fin 3, CE j := Finset.sum_nonneg (fun j _ => hCE j) + dsimp [S] + linarith) + have hh : 3*S≤C := by dsimp [C]; linarith [le_max_right E₀ 0,le_max_right B₀ 0] + exact ⟨hEe'.trans hh,hBb'.trans hh⟩ + +lemma smooth_compact_lipschitz {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → W} + (hf : ContDiff ℝ 1 f) (hc : HasCompactSupport f) : + ∃ C : ℝ, 0≤C ∧ ∀ x y, ‖f y-f x‖≤C*‖y-x‖ := by + obtain ⟨D,hD⟩ := (hf.continuous_fderiv (by norm_num)).bounded_above_of_compact_support (hc.fderiv ℝ) + refine ⟨max D 0,le_max_right _ _,?_⟩ + intro x y + exact (convex_univ : Convex ℝ (univ : Set U)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hf.differentiable (by norm_num) z) + (fun z _ => (hD z).trans (le_max_left _ _)) (mem_univ x) (mem_univ y) + +lemma BoundedSmooth.iterated_lipschitz {F : Vec → Vec} (hF : BoundedSmooth F) (n : ℕ) : + ∃ C : ℝ, 0≤C ∧ ∀ x y, + ‖iteratedFDeriv ℝ n F y-iteratedFDeriv ℝ n F x‖≤C*‖y-x‖ := by + obtain ⟨D,hD⟩ := hF.2 (n+1) + refine ⟨max D 0,le_max_right _ _,?_⟩ + intro x y + exact (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => ContDiff.differentiable_iteratedFDeriv (n:=∞) (m:=n) (by exact_mod_cast ENat.natCast_lt_top n) hF.1 z) + (fun z _ => by + rw [norm_fderiv_iteratedFDeriv] + exact (hD z).trans (le_max_left _ _)) + (mem_univ x) (mem_univ y) + +lemma BoundedSmooth.spatial_lipschitz {F : Vec → Vec} (hF : BoundedSmooth F) : + ∃ C : ℝ, 0≤C ∧ ∀ x y : Vec, ‖F y-F x‖≤C*‖y-x‖ ∧ + (∀ i v, |fderiv ℝ (fun z => F z i) y v-fderiv ℝ (fun z => F z i) x v|≤C*‖y-x‖*‖v‖) ∧ + ∀ i, |curl F y i-curl F x i|≤C*‖y-x‖ := by + obtain ⟨D,hD⟩ := hF.2 1 + let A := max D 0 + have hA : 0≤A := le_max_right _ _ + have hval (x y : Vec) : ‖F y-F x‖≤A*‖y-x‖ := by + apply (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hF.1.differentiable (by simp) z) _ (mem_univ x) (mem_univ y) + intro z _ + have hh : ‖fderiv ℝ F z‖≤D := by simpa only [norm_iteratedFDeriv_one] using hD z + exact hh.trans (le_max_left _ _) + obtain ⟨B,hB,hb⟩ := hF.iterated_lipschitz 1 + have hder (x y v : Vec) : ‖fderiv ℝ F y v-fderiv ℝ F x v‖≤B*‖y-x‖*‖v‖ := by + have hh := (iteratedFDeriv ℝ 1 F y-iteratedFDeriv ℝ 1 F x).le_opNorm (fun _ => v) + simp only [sub_apply,iteratedFDeriv_one_apply,Fin.prod_univ_one] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (hb x y) (norm_nonneg v)) + have hder' (x y v : Vec) (i : Fin 3) : + |fderiv ℝ (fun z => F z i) y v-fderiv ℝ (fun z => F z i) x v|≤B*‖y-x‖*‖v‖ := by + rw [coordinate_fderiv_apply (hF.1.differentiable (by simp)),coordinate_fderiv_apply (hF.1.differentiable (by simp))] + exact (norm_coordinate_le (fderiv ℝ F y v-fderiv ℝ F x v) i).trans (hder x y v) + refine ⟨A+2*B,by positivity,?_⟩ + intro x y + refine ⟨(hval x y).trans (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)),?_,?_⟩ + · intro i v + exact (hder' x y v i).trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)) (norm_nonneg _)) + · intro i + have he (z : Vec) : curl F z i=spatialPartial (fun u => F u (curlB i)) z (curlA i)- + spatialPartial (fun u => F u (curlA i)) z (curlB i) := by + fin_cases i <;> simp [curl,curlA,curlB] + rw [he y,he x,show ∀ a b c d : ℝ, (a-b)-(c-d)=(a-c)-(b-d) by intros; ring] + have ha := hder' x y (basis (curlA i)) (curlB i) + have hb' := hder' x y (basis (curlB i)) (curlA i) + simp only [show ∀ j : Fin 3, ‖basis j‖=1 by intro j; simp [basis,PiLp.norm_single],mul_one] at ha hb' + exact (abs_sub _ _).trans ((add_le_add ha hb').trans (by nlinarith [norm_nonneg (y-x)])) + +lemma uniform_datum_velocity_integral_lipschitz {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Phase → ℝ} {H : Vec × Vec → W} (hf : ContDiff ℝ 1 f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ x y n : Vec, ‖n‖=1 → + ‖(∫ v : Vec, f (y,v) • H (n,v))-(∫ v : Vec, f (x,v) • H (n,v))‖≤C*‖y-x‖ := by + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + obtain ⟨A,hA,hfLip⟩ := smooth_compact_lipschitz hf hc + obtain ⟨B,hB⟩ := ((isCompact_sphere (0:Vec) 1).prod hK).exists_bound_of_continuousOn + (hH.mono (by intro p hp; exact ⟨hp.1,mem_univ _⟩)) + let D := max B 0 + have hD : 0≤D := le_max_right _ _ + refine ⟨A*D*(volume K).toReal,by positivity,?_⟩ + intro x y n hn + have hn' : n∈sphere (0:Vec) 1 := mem_sphere_zero_iff_norm.mpr hn + have hint (z : Vec) : Integrable (fun v => f (z,v) • H (n,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hf.continuous.comp (continuous_const.prodMk continuous_id)).smul + (hH.comp_continuous (continuous_const.prodMk continuous_id) (fun v => ⟨hn',mem_univ v⟩)) + · exact HasCompactSupport.intro hK (fun v hv => by rw [hz z v hv,zero_smul]) + rw [← integral_sub (hint y) (hint x)] + have he : (∫ v in K, f (y,v) • H (n,v)-f (x,v) • H (n,v))= + ∫ v, f (y,v) • H (n,v)-f (x,v) • H (n,v) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + simp only [hz _ v hv,zero_smul,sub_self] + rw [← he] + have hb : ∀ v∈K, ‖f (y,v) • H (n,v)-f (x,v) • H (n,v)‖≤ A*‖y-x‖*D := by + intro v hv + rw [← sub_smul,norm_smul] + apply mul_le_mul _ ((hB (n,v) ⟨hn',hv⟩).trans (le_max_left _ _)) (norm_nonneg _) (by positivity) + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,sub_self,norm_zero,max_eq_left (norm_nonneg _)] using + hfLip (x,v) (y,v) + exact (norm_setIntegral_le_of_norm_le_const hK.measure_lt_top hb).trans_eq (by simp only [Measure.real]; ring) + +lemma abs_sphere_integral_sub_le {F G : Sphere → ℝ} {C : ℝ} + (hF : Continuous F) (hG : Continuous G) (h : ∀ n, |F n-G n|≤C) : + |(∫ n, F n ∂sphereMeasure)-(∫ n, G n ∂sphereMeasure)|≤C*(4*Real.pi) := by + rw [← integral_sub (hF.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) (hG.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + exact abs_sphere_integral_le h + +lemma waveK_lipschitz {g : Vec → ℝ} (hg : Continuous g) {C : ℝ} + (h : ∀ x y, |g y-g x|≤C*‖y-x‖) {t : ℝ} (ht : 0≤t) (x y : Vec) : + |waveK g (t,y)-waveK g (t,x)|≤t*C*‖y-x‖ := by + have hc (x : Vec) : Continuous (fun n : Sphere => g (x+t • n.1)) := + hg.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have hh := abs_sphere_integral_sub_le (hc y) (hc x) (C:=C*‖y-x‖) (by + intro n + simpa only [add_sub_add_right_eq_sub] using h (x+t • n.1) (y+t • n.1)) + simp only [waveK,← mul_sub] + rw [abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹),abs_mul,abs_of_nonneg ht] + calc + _ ≤ (4*Real.pi)⁻¹*(t*(C*‖y-x‖*(4*Real.pi))) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hh ht) (by positivity) + _ = t*C*‖y-x‖ := by field_simp + +lemma freeWave_lipschitz {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : Continuous h) + {C : ℝ} (hC : 0≤C) + (hg0 : ∀ x y, |g y-g x|≤C*‖y-x‖) + (hgd : ∀ x y n : Vec, ‖n‖=1 → |fderiv ℝ g y n-fderiv ℝ g x n|≤C*‖y-x‖) + (hh0 : ∀ x y, |h y-h x|≤C*‖y-x‖) + {t : ℝ} (ht : t∈Icc (0:ℝ) 1) (x y : Vec) : + |freeWave g h (t,y)-freeWave g h (t,x)|≤3*C*‖y-x‖ := by + have hc (z : Vec) : Continuous (fun n : Sphere => g (z+t • n.1)) := + hg.continuous.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have hd (z : Vec) : Continuous (fun n : Sphere => fderiv ℝ g (z+t • n.1) n.1) := + ((hg.continuous_fderiv (by simp)).comp + (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))).clm_apply continuous_subtype_val + have hh' (z : Vec) : Continuous (fun n : Sphere => h (z+t • n.1)) := + hh.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have A := abs_sphere_integral_sub_le (hc y) (hc x) (by intro n; simpa only [add_sub_add_right_eq_sub] using hg0 (x+t • n.1) (y+t • n.1)) + have B := abs_sphere_integral_sub_le (hd y) (hd x) (by intro n; simpa only [add_sub_add_right_eq_sub] using hgd (x+t • n.1) (y+t • n.1) n.1 (mem_sphere_zero_iff_norm.mp n.2)) + have D := abs_sphere_integral_sub_le (hh' y) (hh' x) (by intro n; simpa only [add_sub_add_right_eq_sub] using hh0 (x+t • n.1) (y+t • n.1)) + rw [freeWave_sphere hg,freeWave_sphere hg] + have he : ∀ a b c d e f : ℝ, (4*Real.pi)⁻¹*(a+t*b)+(4*Real.pi)⁻¹*(t*c)- + ((4*Real.pi)⁻¹*(d+t*e)+(4*Real.pi)⁻¹*(t*f))= + (4*Real.pi)⁻¹*((a-d)+t*(b-e)+t*(c-f)) := by intros; ring + rw [he,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + calc + _ ≤ (4*Real.pi)⁻¹*(C*‖y-x‖*(4*Real.pi)+t*(C*‖y-x‖*(4*Real.pi))+t*(C*‖y-x‖*(4*Real.pi))) := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + apply (abs_add_le _ _).trans + apply add_le_add + · apply (abs_add_le _ _).trans + apply add_le_add A + simpa only [abs_mul,abs_of_nonneg ht.1] using mul_le_mul_of_nonneg_left B ht.1 + · simpa only [abs_mul,abs_of_nonneg ht.1] using mul_le_mul_of_nonneg_left D ht.1 + _ = (1+2*t)*C*‖y-x‖ := by field_simp; ring + _ ≤ 3*C*‖y-x‖ := by + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + exact mul_le_mul_of_nonneg_right (by linarith [ht.2]) hC + +lemma datum_moment_lipschitz {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ ∀ x y, |rho d.f₀ y-rho d.f₀ x|≤C*‖y-x‖ ∧ + ‖current d.f₀ y-current d.f₀ x‖≤C*‖y-x‖ := by + obtain ⟨A,hA,ha⟩ := uniform_datum_velocity_integral_lipschitz + (hd.1.of_le (by simp)) hd.2.1 (H:=fun _ => (1:ℝ)) continuousOn_const + obtain ⟨B,hB,hb⟩ := uniform_datum_velocity_integral_lipschitz + (hd.1.of_le (by simp)) hd.2.1 + (((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn) + refine ⟨A+B,add_nonneg hA hB,?_⟩ + intro x y + constructor + · have hh := ha x y (basis 0) (by simp [basis,PiLp.norm_single]) + simp only [smul_eq_mul,mul_one,Real.norm_eq_abs] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hB) (norm_nonneg _)) + · exact (hb x y (basis 0) (by simp [basis,PiLp.norm_single])).trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _)) + +lemma BoundedSmooth.freeWave_coordinate_lipschitz {E B : Vec → Vec} + (hE : BoundedSmooth E) (hB : BoundedSmooth B) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, ∀ x y : Vec, + |freeWave (fun z => E z i) (fun z => curl B z i) (t,y)- + freeWave (fun z => E z i) (fun z => curl B z i) (t,x)|≤C*‖y-x‖ ∧ + |freeWave (fun z => B z i) (fun z => -curl E z i) (t,y)- + freeWave (fun z => B z i) (fun z => -curl E z i) (t,x)|≤C*‖y-x‖ := by + obtain ⟨A,hA,hAb⟩ := hE.spatial_lipschitz + obtain ⟨D,hD,hDb⟩ := hB.spatial_lipschitz + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + refine ⟨3*(A+D),by positivity,?_⟩ + intro t ht x y + constructor + · apply freeWave_lipschitz (hproj.comp hE.1) + (hproj.continuous.comp (contDiff_curl hB.1).continuous) (add_nonneg hA hD) _ _ _ ht + · intro z z' + exact (norm_coordinate_le (E z'-E z) i).trans ((hAb z z').1.trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _))) + · intro z z' n hn + have hh : |fderiv ℝ (fun u => E u i) z' n-fderiv ℝ (fun u => E u i) z n|≤A*‖z'-z‖ := by + simpa only [hn,mul_one] using (hAb z z').2.1 i n + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _)) + · intro z z' + exact ((hDb z z').2.2 i).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _)) + · apply freeWave_lipschitz (hproj.comp hB.1) + ((hproj.continuous.comp (contDiff_curl hE.1).continuous).neg) (add_nonneg hA hD) _ _ _ ht + · intro z z' + exact (norm_coordinate_le (B z'-B z) i).trans ((hDb z z').1.trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _))) + · intro z z' n hn + have hh : |fderiv ℝ (fun u => B u i) z' n-fderiv ℝ (fun u => B u i) z n|≤D*‖z'-z‖ := by + simpa only [hn,mul_one] using (hDb z z').2.1 i n + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _)) + · intro z z' + simpa only [Function.comp_apply,Pi.neg_apply,neg_sub_neg,abs_sub_comm] using + ((hAb z z').2.2 i).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _)) + +lemma datum_sphere_flux_lipschitz {f : Phase → ℝ} {H : Vec × Vec → Vec} + (hf : ContDiff ℝ 1 f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, ∀ x y : Vec, + |(4*Real.pi)⁻¹*(∫ n : Sphere, t*dot n.1 (∫ v, f (y+t • n.1,v) • H (-n.1,v)) ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n : Sphere, t*dot n.1 (∫ v, f (x+t • n.1,v) • H (-n.1,v)) ∂sphereMeasure)|≤C*‖y-x‖ := by + obtain ⟨C,hC,hb⟩ := uniform_datum_velocity_integral_lipschitz hf hc hH + refine ⟨C,hC,?_⟩ + intro t ht x y + have hn (n : Sphere) : ‖n.1‖=1 := mem_sphere_zero_iff_norm.mp n.2 + have hc' (z : Vec) : Continuous (fun n : Sphere => + t*dot n.1 (∫ v, f (z+t • n.1,v) • H (-n.1,v))) := by + have hI : Continuous (fun n : Sphere => ∫ v, f (z+t • n.1,v) • H (-n.1,v)) := by + apply (continuousOn_datum_velocity_integral hf.continuous hc hH).comp_continuous + ((continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)).prodMk continuous_subtype_val.neg) + intro n + exact ⟨mem_univ _,by simpa only [mem_sphere_zero_iff_norm,Pi.neg_apply,norm_neg] using hn n⟩ + exact continuous_const.mul ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_subtype_val.prodMk hI)) + have hh := abs_sphere_integral_sub_le (hc' y) (hc' x) (C:=C*‖y-x‖) (by + intro n + rw [← mul_sub,← dot_sub_right,abs_mul,abs_of_nonneg ht.1] + have hbd : ‖(∫ v, f (y+t • n.1,v) • H (-n.1,v))- + (∫ v, f (x+t • n.1,v) • H (-n.1,v))‖≤C*‖y-x‖ := by + simpa only [add_sub_add_right_eq_sub] using hb (x+t • n.1) (y+t • n.1) (-n.1) (by simpa only [norm_neg] using hn n) + exact (mul_le_mul_of_nonneg_left ((abs_dot_le _ _).trans + (by simpa only [hn n,one_mul] using hbd)) ht.1).trans + (mul_le_of_le_one_left (by positivity) ht.2)) + rw [← mul_sub,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by field_simp) + +lemma weighted_sphere_mean_lipschitz {g : Vec → ℝ} (hg : Continuous g) + {C : ℝ} (hC : 0≤C) (h : ∀ x y, |g y-g x|≤C*‖y-x‖) + {w : Sphere → ℝ} (hw : Continuous w) (hwb : ∀ n, |w n|≤1) + {t : ℝ} (ht : t∈Icc (0:ℝ) 1) (x y : Vec) : + |(4*Real.pi)⁻¹*(∫ n : Sphere, t*w n*g (y+t • n.1) ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n : Sphere, t*w n*g (x+t • n.1) ∂sphereMeasure)|≤C*‖y-x‖ := by + have hc (z : Vec) : Continuous (fun n : Sphere => t*w n*g (z+t • n.1)) := + (continuous_const.mul hw).mul (hg.comp (continuous_const.add + ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))) + have hh := abs_sphere_integral_sub_le (hc y) (hc x) (C:=C*‖y-x‖) (by + intro n + rw [← mul_sub,abs_mul,abs_mul,abs_of_nonneg ht.1] + have hh' : |g (y+t • n.1)-g (x+t • n.1)|≤C*‖y-x‖ := by + simpa only [add_sub_add_right_eq_sub] using h (x+t • n.1) (y+t • n.1) + exact (mul_le_mul (mul_le_mul_of_nonneg_left (hwb n) ht.1) hh' (abs_nonneg _) (by simpa only [mul_one] using ht.1)).trans + (by simpa only [mul_one] using mul_le_of_le_one_left (by positivity : 0≤C*‖y-x‖) ht.2)) + rw [← mul_sub,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by field_simp) + +lemma datum_initial_electric_flux_normalised (d : Datum) (i : Fin 3) + {t : ℝ} (ht : 0 by + simpa only [dist_eq_norm,Real.norm_eq_abs] using (hmom y x).1)).continuous + · exact (LipschitzWith.of_dist_le' (K:=D) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj : Continuous (fun v : Vec => v i) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous + refine ⟨A+B+2*D,by positivity,?_⟩ + intro t ht x y + have hrho := weighted_sphere_mean_lipschitz hm.1 hD (fun x y => (hmom x y).1) + (hproj.comp continuous_subtype_val) (fun n => (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2)) + ⟨ht.1.le,ht.2⟩ x y + have hj := waveK_lipschitz (hproj.comp hm.2) + (fun x y => (norm_coordinate_le (current d.f₀ y-current d.f₀ x) i).trans (hmom x y).2) ht.1.le x y + have he : t*D*‖y-x‖≤D*‖y-x‖ := by + exact mul_le_mul_of_nonneg_right (mul_le_of_le_one_left hD ht.2) (norm_nonneg _) + simp only [electricConeBoundary,sub_zero] + simp_rw [datum_initial_electric_flux_normalised d i ht.1] + simp only [datumBoundarySolution] + have halg (a b c e a' b' c' e' : ℝ) : (a-b-c-e)-(a'-b'-c'-e')=(a-a')-(b-b')-(c-c')-(e-e') := by ring + rw [halg] + exact ((abs_sub _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add ((abs_sub _ _).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x y).1 + (hflux t ⟨ht.1.le,ht.2⟩ x y))) hrho)) (hj.trans he))).trans_eq (by ring) + +lemma magneticConeBoundary_datum_lipschitz {d : Datum} (hd : Admissible d) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, ∀ x y : Vec, + |magneticConeBoundary (datumBoundarySolution d) t y i 0- + magneticConeBoundary (datumBoundarySolution d) t x i 0|≤C*‖y-x‖ := by + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_lipschitz hd.2.2.2.1 hd.2.2.2.2.1 i + obtain ⟨B,hB,hflux⟩ := datum_sphere_flux_lipschitz (hd.1.of_le (by simp)) hd.2.1 + (continuousOn_datumMagneticFluxKernel i) + obtain ⟨D,hD,hmom⟩ := datum_moment_lipschitz hd + have hjc : Continuous (current d.f₀) := (LipschitzWith.of_dist_le' (K:=D) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj (j : Fin 3) : Continuous (fun v : Vec => v j) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous + refine ⟨A+B+2*D,by positivity,?_⟩ + intro t ht x y + let F : Vec → Sphere → ℝ := fun z n => t*n.1 (curlA i)*current d.f₀ (z+t • n.1) (curlB i)- + t*n.1 (curlB i)*current d.f₀ (z+t • n.1) (curlA i) + have hfc (z : Vec) : Continuous (F z) := by + have hg (j k : Fin 3) : Continuous (fun n : Sphere => t*n.1 j*current d.f₀ (z+t • n.1) k) := + (continuous_const.mul ((hproj j).comp continuous_subtype_val)).mul + (((hproj k).comp hjc).comp (continuous_const.add + ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))) + exact (hg _ _).sub (hg _ _) + have hh := abs_sphere_integral_sub_le (hfc y) (hfc x) (C:=2*D*‖y-x‖) (by + intro n + have hterm (j k : Fin 3) : |t*n.1 j*current d.f₀ (y+t • n.1) k- + t*n.1 j*current d.f₀ (x+t • n.1) k|≤D*‖y-x‖ := by + rw [← mul_sub,abs_mul,abs_mul,abs_of_pos ht.1] + have hn : |n.1 j|≤1 := (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + have hj : |current d.f₀ (y+t • n.1) k-current d.f₀ (x+t • n.1) k|≤D*‖y-x‖ := by + simpa only [PiLp.sub_apply,add_sub_add_right_eq_sub] using + (norm_coordinate_le (current d.f₀ (y+t • n.1)-current d.f₀ (x+t • n.1)) k).trans + (hmom (x+t • n.1) (y+t • n.1)).2 + exact (mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) hj (abs_nonneg _) (by simpa using ht.1.le)).trans + (by simpa only [mul_one] using mul_le_of_le_one_left (by positivity : 0≤D*‖y-x‖) ht.2) + dsimp [F] + rw [show ∀ a b c e : ℝ, (a-b)-(c-e)=(a-c)-(b-e) by intros; ring] + exact ((abs_sub _ _).trans (add_le_add (hterm _ _) (hterm _ _))).trans_eq (by ring)) + have hj : |(4*Real.pi)⁻¹*(∫ n, F y n ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n, F x n ∂sphereMeasure)|≤2*D*‖y-x‖ := by + rw [← mul_sub,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by field_simp) + simp only [magneticConeBoundary,sub_zero] + simp_rw [datum_initial_magnetic_flux_normalised d i ht.1] + simp only [datumBoundarySolution] + have halg (a b c a' b' c' : ℝ) : (a-b+c)-(a'-b'+c')=(a-a')-(b-b')+(c-c') := by ring + rw [halg] + exact ((abs_add_le _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x y).2 (hflux t ⟨ht.1.le,ht.2⟩ x y))) hj)).trans_eq (by ring) + +lemma datum_boundary_global_lipschitz {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ (∀ x y, ‖d.E₀ y-d.E₀ x‖≤C*‖y-x‖ ∧ ‖d.B₀ y-d.B₀ x‖≤C*‖y-x‖) ∧ + ∀ t∈Ioc (0:ℝ) 1, ∀ x y : Vec, + ‖electricBoundaryField (datumBoundarySolution d) t y-electricBoundaryField (datumBoundarySolution d) t x‖≤C*‖y-x‖ ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t y-magneticBoundaryField (datumBoundarySolution d) t x‖≤C*‖y-x‖ := by + obtain ⟨E,hE,hEb⟩ := hd.2.2.2.1.spatial_lipschitz + obtain ⟨B,hB,hBb⟩ := hd.2.2.2.2.1.spatial_lipschitz + choose CE hCE he using electricConeBoundary_datum_lipschitz hd + choose CB hCB hb using magneticConeBoundary_datum_lipschitz hd + let S := E+B+∑ i : Fin 3, (CE i+CB i) + have hS : 0≤S := by dsimp [S]; exact add_nonneg (add_nonneg hE hB) (Finset.sum_nonneg fun i _ => add_nonneg (hCE i) (hCB i)) + have hEC (i : Fin 3) : CE i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCB i] + have hBC (i : Fin 3) : CB i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCE i] + refine ⟨3*S,by positivity,?_,?_⟩ + · intro x y + have hh : 0≤∑ i : Fin 3, (CE i+CB i) := Finset.sum_nonneg fun i _ => add_nonneg (hCE i) (hCB i) + constructor + · exact ((hEb x y).1).trans (mul_le_mul_of_nonneg_right (by dsimp [S]; linarith) (norm_nonneg _)) + · exact ((hBb x y).1).trans (mul_le_mul_of_nonneg_right (by dsimp [S]; linarith) (norm_nonneg _)) + · intro t ht x y + constructor + · have hh := norm_le_three_of_coordinate_bound (mul_nonneg hS (norm_nonneg (y-x))) + (v:=electricBoundaryField (datumBoundarySolution d) t y-electricBoundaryField (datumBoundarySolution d) t x) + (fun i => (he i t ht x y).trans (mul_le_mul_of_nonneg_right (hEC i) (norm_nonneg _))) + exact hh.trans_eq (by ring) + · have hh := norm_le_three_of_coordinate_bound (mul_nonneg hS (norm_nonneg (y-x))) + (v:=magneticBoundaryField (datumBoundarySolution d) t y-magneticBoundaryField (datumBoundarySolution d) t x) + (fun i => (hb i t ht x y).trans (mul_le_mul_of_nonneg_right (hBC i) (norm_nonneg _))) + exact hh.trans_eq (by ring) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardBounds.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c60f2eb1e7c26ab16eea79e2198dd3b7d4a7bb59 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardBounds.lean @@ -0,0 +1,529 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.BranchIntegral + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_normalised_physical_kernel (P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ E B : Vec, ‖E‖≤L → ‖B‖≤L → + ‖(1-dot n (velocity v)) • normalisedElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C := by + let K : Set (ℝ × Vec × Vec × Vec × Vec) := + Icc 0 1 ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P ×ˢ + closedBall (0:Vec) L ×ˢ closedBall (0:Vec) L + have hK : IsCompact K := isCompact_Icc.prod ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)))) + let r : (ℝ × Vec × Vec × Vec × Vec) → ℝ := Prod.fst + let n : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.1 + let v : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.1 + let E : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.2.1 + let B : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.2.2 + have hr : Continuous r := continuous_fst + have hn : Continuous n := continuous_snd.fst + have hv : Continuous v := continuous_snd.snd.fst + have hE : Continuous E := continuous_snd.snd.snd.fst + have hB : Continuous B := continuous_snd.snd.snd.snd + have hu := (contDiff_velocity (k:=1)).continuous.comp hv + have ha : Continuous (fun p => fderiv ℝ velocity (v p) (E p+cross (velocity (v p)) (B p))) := + (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp hv).clm_apply + (hE.add ((contDiff_cross (k:=1)).continuous.comp (hu.prodMk hB))) + have hd : Continuous (fun p => 1-dot (n p) (velocity (v p))) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hn.prodMk hu)) + have hk := hd.continuousOn.smul (continuousOn_normalisedElectricKernel + hr.continuousOn hn.continuousOn hu.continuousOn ha.continuousOn (S:=K) (by + intro p hp + exact (cone_denom_pos (v p) (n p) (by simpa only [n,mem_sphere,dist_zero_right] using hp.2.1)).ne')) + obtain ⟨C,hC⟩ := (hK.image_of_continuousOn hk).isBounded.exists_norm_le + refine ⟨max 0 C,le_max_left _ _,?_⟩ + intro r hr n hn v hv E B hE hB + apply le_trans (hC _ ⟨(r,n,v,E,B),?_,rfl⟩) (le_max_right _ _) + exact ⟨hr,by simpa only [mem_sphere,dist_zero_right] using hn, + by simpa only [mem_closedBall_zero_iff] using hv, + by simpa only [mem_closedBall_zero_iff] using hE, + by simpa only [mem_closedBall_zero_iff] using hB⟩ + +lemma uniform_physical_kernel (P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ E B : Vec, ‖E‖≤L → ‖B‖≤L → + ‖(1-dot n (velocity v)) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C/r^2 := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_physical_kernel P L + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv E B hE hB + have hh := hb r ⟨hr.1.le,hr.2⟩ n hn v hv E B hE hB + rw [normalisedElectricKernel_eq hr.1.ne',smul_comm (1-dot n (velocity v)), + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] at hh + exact (le_div_iff₀ (sq_pos_of_pos hr.1)).mpr (by simpa only [mul_comm] using hh) + +lemma physical_integral_bound {A P C r : ℝ} {n E B : Vec} {f : Vec → ℝ} + (hA : 0≤A) + (hbound : ∀ v : Vec, ‖v‖≤P → + ‖(1-dot n (velocity v)) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C/r^2) + (hf : ∀ v, |f v|≤A) (hs : ∀ v, P<‖v‖ → f v=0) : + ‖∫ v : Vec, (f v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤ + (A*C*volume.real (closedBall (0:Vec) P))/r^2 := by + let g : Vec → Vec := fun v => (f v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B)) + have he : (∫ v in closedBall (0:Vec) P, g v)=∫ v, g v := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + have hv' : P<‖v‖ := by simpa only [mem_closedBall_zero_iff,not_le] using hv + simp [g,hs v hv'] + change ‖∫ v, g v‖≤_ + rw [← he] + have hb : ∀ v∈closedBall (0:Vec) P, ‖g v‖≤A*(C/r^2) := by + intro v hv + have hv' : ‖v‖≤P := mem_closedBall_zero_iff.mp hv + dsimp [g] + rw [mul_smul,norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf v) (hbound v hv') (norm_nonneg _) hA + have hh := norm_setIntegral_le_of_norm_le_const (μ:=volume) (isCompact_closedBall (0:Vec) P).measure_lt_top hb + exact hh.trans_eq (by ring) + +lemma uniform_retarded_density_bound (A P L : ℝ) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (T : ℝ), T≤1 → + (∀ t∈Icc 0 T, ∀ z, |s.f (t,z)|≤A) → + (∀ t∈Icc 0 T, ∀ (x v : Vec), s.f (t,x,v)≠0 → + ‖v‖≤P ∧ ‖s.E (t,x)‖≤L ∧ ‖s.B (t,x)‖≤L) → + ∀ t∈Icc 0 T, ∀ (x z : Vec), 0<‖z‖ → ‖z‖≤t → + ‖retardedElectricDensity s t x (x+z)‖≤C/‖z‖^2 ∧ + ‖retardedMagneticDensity s t x (x+z)‖≤C/‖z‖^2 := by + obtain ⟨K,hK,hk⟩ := uniform_physical_kernel P L + refine ⟨A*K*volume.real (closedBall (0:Vec) P),by positivity,?_⟩ + intro s T hT hf hs t ht x z hz hzt + have htime : t-‖z‖∈Icc 0 T := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + have hxy : x≠x+z := by + intro he + have hh : z=0 := add_left_cancel (show x+z=x+0 by simpa using he.symm) + exact (norm_pos_iff.mp hz) hh + have he : ‖retardedElectricDensity s t x (x+z)‖≤ + (A*K*volume.real (closedBall (0:Vec) P))/‖z‖^2 := by + by_cases hn : ∃ v : Vec, s.f (t-‖z‖,x+z,v)≠0 + · obtain ⟨v,hv⟩ := hn + have hEB := hs _ htime _ v hv + unfold retardedElectricDensity + rw [coneRadius_add] + apply physical_integral_bound hA + · intro u hu + exact hk ‖z‖ ⟨hz,hzt.trans (ht.2.trans hT)⟩ _ (coneDirection_norm hxy) + u hu _ _ hEB.2.1 hEB.2.2 + · intro u + exact hf _ htime (x+z,u) + · intro u hu + by_contra hnu + exact (not_lt_of_ge (hs _ htime _ u hnu).1) hu + · have hzero : ∀ v : Vec, s.f (t-‖z‖,x+z,v)=0 := by simpa using hn + simp only [retardedElectricDensity,coneRadius_add,hzero,zero_mul,zero_smul,integral_zero,norm_zero] + positivity + refine ⟨he,?_⟩ + exact (norm_cross_le _ _).trans (by simpa only [coneDirection_norm hxy,one_mul] using he) + +lemma kernel_tip_le_on {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {C R : ℝ} (hR : 0≤R) (hF : IntegrableOn F (ball (0:Vec) R)) + (hb : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C/‖z‖^2) : + ‖∫ z in ball (0:Vec) R, F z‖≤4*Real.pi*C*R := by + have hbound : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C*‖z‖^(-(2:ℝ)) := by + simpa only [Real.rpow_neg (norm_nonneg _),Real.rpow_two,div_eq_mul_inv] using hb + have hi := integrableOn_norm_rpow_neg (R:=R) (by norm_num : (2:ℝ)<3) + calc + _ ≤ ∫ z in ball (0:Vec) R, ‖F z‖ := norm_integral_le_integral_norm _ + _ ≤ ∫ z in ball (0:Vec) R, C*‖z‖^(-(2:ℝ)) := integral_mono_ae hF.norm (hi.const_mul C) hbound + _ = 4*Real.pi*C*R := by + rw [integral_const_mul,integral_ball_norm_rpow_neg (by norm_num : (2:ℝ)<3) hR] + norm_num only [show (3:ℝ)-2=1 by norm_num,Real.rpow_one,div_one] + ring + +namespace SmoothLorentzFlow + +lemma spatial_travel_bound {E B : Field} (F : SmoothLorentzFlow E B) (z : Phase) + {T t : ℝ} (ht : t∈Icc 0 T) : ‖(F.forward z t).1-z.1‖≤t := by + have hh := norm_image_sub_le_of_norm_deriv_le_segment' + (f:=fun r => (F.forward z r).1) (f':=fun r => velocity (F.forward z r).2) + (fun r (_ : r∈Icc 0 T) => ((ContinuousLinearMap.fst ℝ Vec Vec).hasFDerivAt.comp_hasDerivAt r (F.ode z r)).hasDerivWithinAt) + (fun r (_ : r∈Ico 0 T) => (norm_velocity_lt_one _).le) t ht + simpa only [F.initial,one_mul,sub_zero] using hh + +lemma momentum_travel_bound {E B : Field} (F : SmoothLorentzFlow E B) (z : Phase) + {T t R L : ℝ} (ht : t∈Icc 0 T) (hz : ‖z.1‖+T≤R) + (_hL : 0≤L) (hE : ∀ r∈Icc 0 T, ∀ x : Vec, ‖x‖≤R → ‖E (r,x)‖≤L) + (hB : ∀ r∈Icc 0 T, ∀ x : Vec, ‖x‖≤R → ‖B (r,x)‖≤L) : + ‖(F.forward z t).2-z.2‖≤(2*L)*t := by + have hspace (r : ℝ) (hr : r∈Icc 0 T) : ‖(F.forward z r).1‖≤R := by + calc + _ ≤ ‖(F.forward z r).1-z.1‖+‖z.1‖ := norm_le_norm_sub_add _ _ + _ ≤ r+‖z.1‖ := add_le_add (F.spatial_travel_bound z hr) le_rfl + _ ≤ R := by linarith [hr.2] + have hb (r : ℝ) (hr : r∈Ico 0 T) : + ‖E (r,(F.forward z r).1)+cross (velocity (F.forward z r).2) (B (r,(F.forward z r).1))‖≤2*L := by + have hh := Ico_subset_Icc_self hr + calc + _ ≤ ‖E (r,(F.forward z r).1)‖+‖cross (velocity (F.forward z r).2) (B (r,(F.forward z r).1))‖ := norm_add_le _ _ + _ ≤ L + 1*L := add_le_add (hE r hh _ (hspace r hh)) + ((norm_cross_le _ _).trans (mul_le_mul (norm_velocity_lt_one _).le + (hB r hh _ (hspace r hh)) (norm_nonneg _) (by norm_num))) + _ = 2*L := by ring + have hh := norm_image_sub_le_of_norm_deriv_le_segment' + (f:=fun r => (F.forward z r).2) + (f':=fun r => E (r,(F.forward z r).1)+cross (velocity (F.forward z r).2) (B (r,(F.forward z r).1))) + (fun r (_ : r∈Icc 0 T) => ((ContinuousLinearMap.snd ℝ Vec Vec).hasFDerivAt.comp_hasDerivAt r (F.ode z r)).hasDerivWithinAt) hb t ht + simpa only [F.initial,sub_zero] using hh + +lemma transport_for {E B : Field} (F : SmoothLorentzFlow E B) {s : Solution} + (hf : ContDiff ℝ ∞ s.f) (hV : TransportFor s E B) (t : ℝ) (z : Phase) : + s.f (t,F.forward z t)=s.f (0,z) := by + have hd (r : ℝ) : HasDerivAt (fun r => s.f (r,F.forward z r)) (0:ℝ) r := by + have hh := (hf.differentiable (by simp) _).hasFDerivAt.comp_hasDerivAt r + ((hasDerivAt_id r).prodMk (F.ode z r)) + change HasDerivAt (fun r => s.f (r,F.forward z r)) + (fderiv ℝ s.f (r,F.forward z r) (1,lorentzField E B (r,F.forward z r))) r at hh + rw [hV] at hh + exact hh + have he := is_const_of_deriv_eq_zero (fun r => (hd r).differentiableAt) + (fun r => (hd r).deriv) t 0 + simpa only [F.initial] using he + +lemma transport_for_inverse {E B : Field} (F : SmoothLorentzFlow E B) {s : Solution} + (hf : ContDiff ℝ ∞ s.f) (hV : TransportFor s E B) (t : ℝ) (z : Phase) : + s.f (t,z)=s.f (0,F.backward (t,z)) := by + simpa only [F.right_inverse] using F.transport_for hf hV t (F.backward (t,z)) + +lemma transported_sup_bound {E B : Field} (F : SmoothLorentzFlow E B) {s : Solution} + (hf : ContDiff ℝ ∞ s.f) (hV : TransportFor s E B) {A : ℝ} + (hA : ∀ z, |s.f (0,z)|≤A) (t : ℝ) (z : Phase) : |s.f (t,z)|≤A := by + rw [F.transport_for_inverse hf hV] + exact hA _ + +lemma transported_phase_bound {E B : Field} (F : SmoothLorentzFlow E B) {s : Solution} + (hf : ContDiff ℝ ∞ s.f) (hV : TransportFor s E B) {R₀ P₀ T L t : ℝ} + (h₀ : ∀ z : Phase, s.f (0,z)≠0 → ‖z.1‖≤R₀ ∧ ‖z.2‖≤P₀) + (hL : 0≤L) (hE : ∀ r∈Icc 0 T, ∀ x : Vec, ‖x‖≤R₀+T → ‖E (r,x)‖≤L) + (hB : ∀ r∈Icc 0 T, ∀ x : Vec, ‖x‖≤R₀+T → ‖B (r,x)‖≤L) + (ht : t∈Icc 0 T) (z : Phase) (hz : s.f (t,z)≠0) : + ‖z.1‖≤R₀+t ∧ ‖z.2‖≤P₀+2*L*t := by + let z₀ := F.backward (t,z) + have he : F.forward z₀ t=z := F.right_inverse t z + have hz₀ : s.f (0,z₀)≠0 := by + rw [← F.transport_for_inverse hf hV] + exact hz + have hb := h₀ z₀ hz₀ + have hx := F.spatial_travel_bound z₀ ht + have hv := F.momentum_travel_bound z₀ ht (by linarith [hb.1]) hL hE hB + rw [he] at hx hv + constructor + · exact (norm_le_norm_sub_add z.1 z₀.1).trans (by linarith [hb.1]) + · exact (norm_le_norm_sub_add z.2 z₀.2).trans (by linarith [hb.2]) + +end SmoothLorentzFlow + +lemma datum_boundary_uniform_bound {d : Datum} (hd : Admissible d) (R : ℝ) : + ∃ C : ℝ, 0≤C ∧ (∀ x, ‖d.E₀ x‖≤C ∧ ‖d.B₀ x‖≤C) ∧ + ∀ t∈Ioc (0:ℝ) 1, ∀ x∈closedBall (0:Vec) R, + ‖electricBoundaryField (datumBoundarySolution d) t x‖≤C ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤C := by + choose CE hCE hEe using fun i : Fin 3 => electricConeBoundary_datum_bound hd 1 R i + choose CB hCB hBb using fun i : Fin 3 => magneticConeBoundary_datum_bound hd 1 R i + obtain ⟨E₀,hE₀⟩ := hd.2.2.2.1.2 0 + obtain ⟨B₀,hB₀⟩ := hd.2.2.2.2.1.2 0 + let S := (∑ i : Fin 3, CE i)+(∑ i : Fin 3, CB i) + have hS : 0≤S := add_nonneg (Finset.sum_nonneg (fun i _ => hCE i)) + (Finset.sum_nonneg (fun i _ => hCB i)) + let C := 3*S+max E₀ 0+max B₀ 0 + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_,?_⟩ + · intro x + constructor + · have hh : ‖d.E₀ x‖≤E₀ := by simpa only [norm_iteratedFDeriv_zero] using hE₀ x + dsimp [C] + linarith [le_max_left E₀ 0,le_max_right B₀ 0] + · have hh : ‖d.B₀ x‖≤B₀ := by simpa only [norm_iteratedFDeriv_zero] using hB₀ x + dsimp [C] + linarith [le_max_left B₀ 0,le_max_right E₀ 0] + · intro t ht x hx + have hEe' : ‖electricBoundaryField (datumBoundarySolution d) t x‖≤3*S := by + apply norm_le_three_of_coordinate_bound hS + intro i + exact (hEe i t ht x hx).trans (by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => hCE j) (Finset.mem_univ i) + have hh' : 0≤∑ j : Fin 3, CB j := Finset.sum_nonneg (fun j _ => hCB j) + dsimp [S] + linarith) + have hBb' : ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤3*S := by + apply norm_le_three_of_coordinate_bound hS + intro i + exact (hBb i t ht x hx).trans (by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => hCB j) (Finset.mem_univ i) + have hh' : 0≤∑ j : Fin 3, CE j := Finset.sum_nonneg (fun j _ => hCE j) + dsimp [S] + linarith) + have hh : 3*S≤C := by dsimp [C]; linarith [le_max_right E₀ 0,le_max_right B₀ 0] + exact ⟨hEe'.trans hh,hBb'.trans hh⟩ + +lemma mixed_physical_vector {s : Solution} {E B : Field} + (hf : ContDiff ℝ ∞ s.f) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hE' : ContDiff ℝ ∞ s.E) (hB' : ContDiff ℝ ∞ s.B) + (hc : CompactOnFiniteHorizons s) (hV : TransportFor s E B) + (hρ : ContDiff ℝ ∞ (fun p : ℝ × Vec => rho (fun q => s.f (p.1,q)) p.2)) + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + (hM : MaxwellFor s) {t : ℝ} (ht : 0 ℝ) i).integral_comp_comm hD + exact (mixed_electric_physical_representation (s:={s with E:=E,B:=B}) + hf1 hE1 hB1 hc hV hE' hB' hρ hj hM ht x i).trans + (by simpa only [electricBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => electricConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + · ext i + have hD := integrableOn_retardedMagneticDensity_le (s:={s with E:=E,B:=B}) hf1 hE1 hB1 hc ht.le le_rfl x + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hD + exact (mixed_magnetic_physical_representation (s:={s with E:=E,B:=B}) + hf1 hE1 hB1 hc hV hE' hB' hj hM ht x i).trans + (by simpa only [magneticBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => magneticConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + +lemma scaled_kernel_tip_le_on {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {C R : ℝ} (hR : 0≤R) (hF : IntegrableOn F (ball (0:Vec) R)) + (hb : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C/‖z‖^2) : + ‖(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) R, F z‖≤C*R := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (by positivity : 0<(4*Real.pi)⁻¹)] + calc + _ ≤ (4*Real.pi)⁻¹*(4*Real.pi*C*R) := + mul_le_mul_of_nonneg_left (kernel_tip_le_on hR hF hb) (by positivity) + _ = C*R := by field_simp + +lemma mixed_fields_bound {s : Solution} {E B : Field} + (hf : ContDiff ℝ ∞ s.f) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hE' : ContDiff ℝ ∞ s.E) (hB' : ContDiff ℝ ∞ s.B) + (hc : CompactOnFiniteHorizons s) (hV : TransportFor s E B) + (hρ : ContDiff ℝ ∞ (fun p : ℝ × Vec => rho (fun q => s.f (p.1,q)) p.2)) + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + (hM : MaxwellFor s) {t C D : ℝ} (ht : 0 rho (fun q => s.f (p.1,q)) p.2) + smooth_current : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2) + +theorem exists_picard_regular {d : Datum} (hd : Admissible d) {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ∃ s : Solution, PicardRegular d s ∧ TransportFor s E B := by + obtain ⟨hf,hc,hn,hE0,hB0,hEL,hBL,hDE,hDB⟩ := hd + obtain ⟨F⟩ := exists_smoothLorentzFlow hE hB + let f := F.particle d.f₀ + let ρ : ℝ × Vec → ℝ := fun p => rho (fun z => f (p.1,z)) p.2 + let j : Field := fun p => current (fun z => f (p.1,z)) p.2 + have hρ : ContDiff ℝ ∞ ρ := F.rho_smooth hf hc + have hj : ContDiff ℝ ∞ j := F.current_smooth hf hc + have hρ0 (x : Vec) : divergence d.E₀ x=ρ (0,x) := by + simpa only [ρ,f,F.particle_initial] using hDE x + let s : Solution := ⟨f,maxwellElectric d.E₀ d.B₀ ρ j,maxwellMagnetic d.E₀ d.B₀ j⟩ + have hsc : ∀ t, 0 F.particle_compact hc 0 T,hLe,hLb,F.particle_initial d.f₀, + maxwellElectric_initial hE0.1,maxwellMagnetic_initial hB0.1, + fun t ht x => constructed_maxwell_equations hE0.1 hB0.1 hρ hj hsc hρ0 hDB ht x, + hρ,hj⟩ + +def LocalFieldBound (T R L : ℝ) (E B : Field) : Prop := + ∀ t∈Icc 0 T, ∀ x : Vec, ‖x‖≤R → ‖E (t,x)‖≤L ∧ ‖B (t,x)‖≤L + +def LocalParticleBound (T A R P : ℝ) (f : Particle) : Prop := + ∀ t∈Icc 0 T, ∀ x v : Vec, |f (t,x,v)|≤A ∧ + (f (t,x,v)≠0 → ‖x‖≤R ∧ ‖v‖≤P) + +lemma datum_particle_bounds {d : Datum} (hd : Admissible d) : + ∃ A R P : ℝ, 0≤A ∧ 0≤R ∧ 0≤P ∧ (∀ z, |d.f₀ z|≤A) ∧ + ∀ z : Phase, d.f₀ z≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P := by + obtain ⟨A,hA⟩ := hd.1.continuous.bounded_above_of_compact_support hd.2.1 + obtain ⟨R,hR⟩ := (hd.2.1.image continuous_fst).isBounded.exists_norm_le + obtain ⟨P,hP⟩ := (hd.2.1.image continuous_snd).isBounded.exists_norm_le + refine ⟨max A 0,max R 0,max P 0,le_max_right _ _,le_max_right _ _,le_max_right _ _, + fun z => (hA z).trans (le_max_left _ _),?_⟩ + intro z hz + exact ⟨(hR _ ⟨z,subset_tsupport _ hz,rfl⟩).trans (le_max_left _ _), + (hP _ ⟨z,subset_tsupport _ hz,rfl⟩).trans (le_max_left _ _)⟩ + +lemma PicardRegular.boundary_eq {d : Datum} {s : Solution} (hs : PicardRegular d s) + {t : ℝ} (ht : 0 d.E₀ p.2) (fun p : ℝ × Vec => d.B₀ p.2) ∧ + ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → LocalFieldBound T R L E B → + ∀ s : Solution, PicardRegular d s → TransportFor s E B → + LocalParticleBound T A R P s.f ∧ LocalFieldBound T R L s.E s.B := by + obtain ⟨A,R₀,P₀,hA,hR₀,hP₀,hf₀,hphase₀⟩ := datum_particle_bounds hd + let R := R₀+1 + let P := P₀+1 + obtain ⟨D,hD,hDEB,hboundary⟩ := datum_boundary_uniform_bound hd R + let L := D+1 + have hL : 0 by rw [hs.initial_f]; exact hf₀ z) t z + have hphase : ∀ t∈Icc 0 T, ∀ z : Phase, s.f (t,z)≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P := by + intro t ht z hz + have hh := F.transported_phase_bound hs.smooth_f hV + (R₀:=R₀) (P₀:=P₀) (T:=T) (L:=L) + (fun z hz => hphase₀ z (by simpa only [hs.initial_f] using hz)) hL.le + (fun r hr x hx => (hEB r hr x (by dsimp [R]; linarith)).1) + (fun r hr x hx => (hEB r hr x (by dsimp [R]; linarith)).2) ht z hz + constructor + · dsimp [R] + linarith [hh.1,ht.2] + · dsimp [P] + have hh' : 2*L*t≤2*L*T := mul_le_mul_of_nonneg_left ht.2 (by positivity) + linarith [hh.2] + refine ⟨fun t ht x v => ⟨hf t ht (x,v),hphase t ht (x,v)⟩,?_⟩ + intro t ht x hx + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + rw [hs.initial_E,hs.initial_B] + exact ⟨(hDEB x).1.trans (by dsimp [L]; linarith), + (hDEB x).2.trans (by dsimp [L]; linarith)⟩ + · have hbd := hboundary t ⟨ht0,ht.2.trans hT1⟩ x (mem_closedBall_zero_iff.mpr hx) + rw [← (hs.boundary_eq ht0 x).1,← (hs.boundary_eq ht0 x).2] at hbd + have hdens := hdensity {s with E:=E,B:=B} T hT1 hf (by + intro r hr y v hv + exact ⟨(hphase r hr (y,v) hv).2,hEB r hr y (hphase r hr (y,v) hv).1⟩) t ht x + have hh := mixed_fields_bound hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell ht0 x hbd hdens + have hh' : C*t≤C*T := mul_le_mul_of_nonneg_left ht.2 hC + have hbound : D+C*t≤L := by dsimp [L]; linarith + exact ⟨hh.1.trans hbound,hh.2.trans hbound⟩ + +theorem exists_uniform_picard_sequence {d : Datum} (hd : Admissible d) : + ∃ T A R P L : ℝ, 0 d.E₀ p.2) ∧ + (S 0).B=(fun p : ℝ × Vec => d.B₀ p.2) ∧ + (∀ n, LocalFieldBound T R L (S n).E (S n).B) ∧ + ∀ n, PicardRegular d (S (n+1)) ∧ TransportFor (S (n+1)) (S n).E (S n).B ∧ + LocalParticleBound T A R P (S (n+1)).f := by + obtain ⟨T,A,R,P,L,hT,hT1,hA,hR,hP,hL,h₀,hstep⟩ := uniform_picard_invariance hd + let Q := {s : Solution // ContDiff ℝ ∞ s.E ∧ ContDiff ℝ ∞ s.B} + have hchoose (q : Q) : ∃ r : Q, PicardRegular d r.1 ∧ TransportFor r.1 q.1.E q.1.B := by + obtain ⟨s,hs,hV⟩ := exists_picard_regular hd q.2.1 q.2.2 + exact ⟨⟨s,hs.smooth_E,hs.smooth_B⟩,hs,hV⟩ + choose step hs using hchoose + let q₀ : Q := ⟨datumBoundarySolution d, + hd.2.2.2.1.1.comp contDiff_snd,hd.2.2.2.2.1.1.comp contDiff_snd⟩ + let q : ℕ → Q := fun n => step^[n] q₀ + have hrec (n : ℕ) : q (n+1)=step (q n) := Function.iterate_succ_apply' step n q₀ + have hbound (n : ℕ) : LocalFieldBound T R L (q n).1.E (q n).1.B := by + induction n with + | zero => exact h₀ + | succ n ih => + rw [hrec] + exact (hstep _ _ (q n).2.1 (q n).2.2 ih _ (hs (q n)).1 (hs (q n)).2).2 + refine ⟨T,A,R,P,L,hT,hT1,hA,hR,hP,hL,fun n => (q n).1,rfl,rfl,hbound,?_⟩ + intro n + change PicardRegular d (q (n+1)).1 ∧ TransportFor (q (n+1)).1 (q n).1.E (q n).1.B ∧ + LocalParticleBound T A R P (q (n+1)).1.f + rw [hrec] + exact ⟨(hs (q n)).1,(hs (q n)).2, + (hstep _ _ (q n).2.1 (q n).2.2 (hbound n) _ (hs (q n)).1 (hs (q n)).2).1⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardContraction.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardContraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ece8cdf51723c20981afa93d5bdf5575174f37d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardContraction.lean @@ -0,0 +1,705 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardBounds +import OAI.Analysis.VlasovMaxwell.Retarded.PicardKernel +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardBoundary + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma velocity_global_lipschitz (v w : Vec) : ‖velocity w-velocity v‖≤‖w-v‖ := by + have hh := (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun x _ => (contDiff_velocity (k:=1)).differentiable (by norm_num) x) + (C:=1) (fun x _ => (norm_fderiv_velocity_le x).trans ((inv_le_one₀ (q_pos x)).mpr (by + have hq := q_sq x + nlinarith [q_pos x,sq_nonneg ‖x‖]))) (mem_univ v) (mem_univ w) + simpa only [one_mul] using hh + +lemma lorentzField_difference_bound {E B E' B' : Field} {t L N D : ℝ} + (hL : 0≤L) (hN : 0≤N) (hD : 0≤D) + (hB : ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + (hEd : ∀ x, ‖E (t,x)-E' (t,x)‖≤D) + (hBd : ∀ x, ‖B (t,x)-B' (t,x)‖≤D) (z z' : Phase) : + ‖lorentzField E B (t,z)-lorentzField E' B' (t,z')‖≤(1+2*N+L)*‖z-z'‖+2*D := by + have hpos : ‖z.1-z'.1‖≤‖z-z'‖ := by simpa only [Prod.fst_sub] using norm_fst_le (z-z') + have hvel : ‖z.2-z'.2‖≤‖z-z'‖ := by simpa only [Prod.snd_sub] using norm_snd_le (z-z') + have hu : ‖velocity z.2‖≤1 := (norm_velocity_lt_one _).le + have hu' : ‖velocity z'.2‖≤1 := (norm_velocity_lt_one _).le + have hUd : ‖velocity z.2-velocity z'.2‖≤‖z-z'‖ := (velocity_global_lipschitz z'.2 z.2).trans hvel + have hF : ‖E (t,z.1)+cross (velocity z.2) (B (t,z.1))- + (E' (t,z'.1)+cross (velocity z'.2) (B' (t,z'.1)))‖≤(2*N+L)*‖z-z'‖+2*D := by + have he : E (t,z.1)+cross (velocity z.2) (B (t,z.1))- + (E' (t,z'.1)+cross (velocity z'.2) (B' (t,z'.1)))= + (E (t,z.1)-E (t,z'.1))+(E (t,z'.1)-E' (t,z'.1))+ + cross (velocity z.2-velocity z'.2) (B (t,z.1))+ + cross (velocity z'.2) (B (t,z.1)-B (t,z'.1))+ + cross (velocity z'.2) (B (t,z'.1)-B' (t,z'.1)) := by + rw [cross_sub_left,cross_sub_right,cross_sub_right] + abel + rw [he] + have h₁ := (hEx z'.1 z.1).trans (mul_le_mul_of_nonneg_left hpos hN) + have h₂ := hEd z'.1 + have h₃ := (norm_cross_le _ _).trans (mul_le_mul hUd (hB z.1) (norm_nonneg _) (norm_nonneg _)) + have h₄ := (norm_cross_le _ _).trans (mul_le_mul hu' ((hBx z'.1 z.1).trans + (mul_le_mul_of_nonneg_left hpos hN)) (norm_nonneg _) zero_le_one) + have h₅ := (norm_cross_le _ _).trans (mul_le_mul hu' (hBd z'.1) (norm_nonneg _) zero_le_one) + have hh := (norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add ((norm_add_le _ _).trans (add_le_add h₁ h₂)) h₃)) h₄)) h₅) + exact hh.trans_eq (by ring) + simp only [lorentzField] + rw [Prod.norm_def] + simp only [Prod.fst_sub,Prod.snd_sub] + apply max_le + · exact hUd.trans (by nlinarith [norm_nonneg (z-z')]) + · exact hF.trans (by nlinarith [norm_nonneg (z-z')]) + +lemma gronwallBound_le_exp_linear {δ K ε t : ℝ} (hK : 0 F.forward (F.backward (t,z)) (t-u) + let β : ℝ → Phase := fun u => G.forward (G.backward (t,z')) (t-u) + let K := 1+2*N+L + have hK : 0 α u-β u) (Icc 0 t) := + (continuous_iff_continuousAt.mpr fun u => (hα u).continuousAt).continuousOn.sub + (continuous_iff_continuousAt.mpr fun u => (hβ u).continuousAt).continuousOn + have h₀ : ‖α 0-β 0‖≤‖z-z'‖ := by simp [α,β,F.right_inverse,G.right_inverse] + have hh := norm_le_gronwallBound_of_norm_deriv_right_le hfc + (fun u _ => ((hα u).sub (hβ u)).hasDerivWithinAt) (K:=K) (ε:=2*D) h₀ + (fun u hu => by + have htime : t-u∈Icc 0 T := ⟨by linarith [hu.2],by linarith [ht.2,hu.1]⟩ + simpa only [neg_sub_neg,norm_sub_rev] using + lorentzField_difference_bound hL hN hD (hB _ htime) (hEx _ htime) (hBx _ htime) + (hEd _ htime) (hBd _ htime) (α u) (β u)) t ⟨ht.1,le_rfl⟩ + simp only [α,β,sub_self,F.initial,G.initial,sub_zero] at hh + exact hh.trans (gronwallBound_le_exp_linear hK (by positivity) ht.1) + +lemma transported_comparison {d : Datum} {s s' : Solution} {E B E' B' : Field} + (hf : ContDiff ℝ ∞ s.f) (hg : ContDiff ℝ ∞ s'.f) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hE' : ContDiff ℝ ∞ E') (hB' : ContDiff ℝ ∞ B') + (hV : TransportFor s E B) (hV' : TransportFor s' E' B') + (h₀ : ∀ z, s.f (0,z)=d.f₀ z) (h₀' : ∀ z, s'.f (0,z)=d.f₀ z) + {T A L N D : ℝ} (hA : 0≤A) (hL : 0≤L) (hN : 0≤N) (hD : 0≤D) + (ha : ∀ z w, |d.f₀ z-d.f₀ w|≤A*‖z-w‖) + (hBb : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ t∈Icc 0 T, ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ t∈Icc 0 T, ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + (hEd : ∀ t∈Icc 0 T, ∀ x, ‖E (t,x)-E' (t,x)‖≤D) + (hBd : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)-B' (t,x)‖≤D) + {t : ℝ} (ht : t∈Icc 0 T) (z z' : Phase) : + |s.f (t,z)-s'.f (t,z')|≤A*(‖z-z'‖+2*D*t)*Real.exp ((1+2*N+L)*t) := by + obtain ⟨F⟩ := exists_smoothLorentzFlow hE hB + obtain ⟨G⟩ := exists_smoothLorentzFlow hE' hB' + rw [F.transport_for_inverse hf hV,G.transport_for_inverse hg hV',h₀,h₀'] + exact (ha _ _).trans ((mul_le_mul_of_nonneg_left + (F.backward_stability G hL hN hD hBb hEx hBx hEd hBd ht z z') hA).trans_eq (by ring)) + +lemma transported_spatial_lipschitz {d : Datum} {s : Solution} {E B : Field} + (hs : PicardRegular d s) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hV : TransportFor s E B) {T A L N : ℝ} (hA : 0≤A) (hL : 0≤L) (hN : 0≤N) + (ha : ∀ z w, |d.f₀ z-d.f₀ w|≤A*‖z-w‖) + (hBb : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ t∈Icc 0 T, ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ t∈Icc 0 T, ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + {t : ℝ} (ht : t∈Icc 0 T) (z z' : Phase) : + |s.f (t,z)-s.f (t,z')|≤(A*Real.exp ((1+2*N+L)*T))*‖z-z'‖ := by + have hh := transported_comparison hs.smooth_f hs.smooth_f hE hB hE hB hV hV + hs.initial_f hs.initial_f hA hL hN (D:=0) le_rfl ha hBb hEx hBx + (by intros; simp) (by intros; simp) ht z z' + simp only [mul_zero,zero_mul,add_zero] at hh + have he := Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 (by linarith : 0≤1+2*N+L)) + exact hh.trans ((mul_le_mul_of_nonneg_left he (mul_nonneg hA (norm_nonneg _))).trans_eq (by ring)) + +lemma norm_boundary_integral_difference {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F G : Vec → W} {a b : W} {t C D : ℝ} (ht : 0≤t) + (hF : IntegrableOn F (ball (0:Vec) t)) (hG : IntegrableOn G (ball (0:Vec) t)) + (hab : ‖a-b‖≤D) + (hFG : ∀ z : Vec, 0<‖z‖ → ‖z‖≤t → ‖F z-G z‖≤C/‖z‖^2) : + ‖(a+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z)- + (b+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, G z)‖≤D+C*t := by + rw [show (a+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z)- + (b+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, G z)= + (a-b)+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, (F z-G z) by + rw [integral_sub hF hG,smul_sub]; abel] + apply (norm_add_le _ _).trans (add_le_add hab ?_) + apply scaled_kernel_tip_le_on ht (hF.sub hG) + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + exact hFG z (norm_pos_iff.mpr hz0) (mem_ball_zero_iff.mp hz).le + +lemma mixed_fields_difference_bound {d : Datum} {s s' : Solution} {E B E' B' : Field} + (hs : PicardRegular d s) (hs' : PicardRegular d s') + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hE' : ContDiff ℝ ∞ E') (hB' : ContDiff ℝ ∞ B') + (hV : TransportFor s E B) (hV' : TransportFor s' E' B') + {t C D : ℝ} (ht : 0 (hden z hz hzt).1) + · rw [he.2,he'.2,hbe.2,hbe'.2] + exact norm_boundary_integral_difference ht.le + (integrableOn_retardedMagneticDensity_le (s:={s with E:=E,B:=B}) hf1 hE1 hB1 hs.compact ht.le le_rfl x) + (integrableOn_retardedMagneticDensity_le (s:={s' with E:=E',B:=B'}) hg1 hE1' hB1' hs'.compact ht.le le_rfl x') + hb.2 (fun z hz hzt => (hden z hz hzt).2) + +def GlobalFieldBound (T L : ℝ) (E B : Field) : Prop := + ∀ t∈Icc 0 T, ∀ x : Vec, ‖E (t,x)‖≤L ∧ ‖B (t,x)‖≤L + +def SpatialFieldLip (T N : ℝ) (E B : Field) : Prop := + ∀ t∈Icc 0 T, ∀ x y : Vec, + ‖E (t,y)-E (t,x)‖≤N*‖y-x‖ ∧ ‖B (t,y)-B (t,x)‖≤N*‖y-x‖ + +theorem uniform_global_picard_invariance {d : Datum} (hd : Admissible d) : + ∃ T A R P L : ℝ, 0 d.E₀ p.2) (fun p : ℝ × Vec => d.B₀ p.2) ∧ + ∀ U : ℝ, 0≤U → U≤T → ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → GlobalFieldBound U L E B → + ∀ s : Solution, PicardRegular d s → TransportFor s E B → + LocalParticleBound U A R P s.f ∧ GlobalFieldBound U L s.E s.B := by + obtain ⟨A,R₀,P₀,hA,hR₀,hP₀,hf₀,hphase₀⟩ := datum_particle_bounds hd + let R := R₀+1 + let P := P₀+1 + obtain ⟨D,hD,hDEB,hboundary⟩ := datum_boundary_global_bound hd + let L := D+1 + have hL : 0 by rw [hs.initial_f]; exact hf₀ z) t z + have hphase : ∀ t∈Icc 0 U, ∀ z : Phase, s.f (t,z)≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P := by + intro t ht z hz + have hh := F.transported_phase_bound hs.smooth_f hV + (R₀:=R₀) (P₀:=P₀) (T:=U) (L:=L) + (fun z hz => hphase₀ z (by simpa only [hs.initial_f] using hz)) hL.le + (fun r hr x hx => (hEB r hr x).1) + (fun r hr x hx => (hEB r hr x).2) ht z hz + constructor + · dsimp [R] + linarith [hh.1,ht.2] + · dsimp [P] + have hh' : 2*L*t≤2*L*U := mul_le_mul_of_nonneg_left ht.2 (by positivity) + linarith [hh.2] + refine ⟨fun t ht x v => ⟨hf t ht (x,v),hphase t ht (x,v)⟩,?_⟩ + intro t ht x + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + rw [hs.initial_E,hs.initial_B] + exact ⟨(hDEB x).1.trans (by dsimp [L]; linarith), + (hDEB x).2.trans (by dsimp [L]; linarith)⟩ + · have hbd := hboundary t ⟨ht0,ht.2.trans hU1⟩ x + rw [← (hs.boundary_eq ht0 x).1,← (hs.boundary_eq ht0 x).2] at hbd + have hdens := hdensity {s with E:=E,B:=B} U hU1 hf (by + intro r hr y v hv + exact ⟨(hphase r hr (y,v) hv).2,hEB r hr y⟩) t ht x + have hh := mixed_fields_bound hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell ht0 x hbd hdens + have hh' : C*t≤C*U := mul_le_mul_of_nonneg_left ht.2 hC + have hbound : D+C*t≤L := by dsimp [L]; linarith + exact ⟨hh.1.trans hbound,hh.2.trans hbound⟩ + +lemma uniform_picard_comparison (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ (d : Datum) (s s' : Solution) (E B E' B' : Field), + PicardRegular d s → PicardRegular d s' → + ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → ContDiff ℝ ∞ E' → ContDiff ℝ ∞ B' → + TransportFor s E B → TransportFor s' E' B' → + ∀ T : ℝ, T≤1 → + (∀ r∈Icc 0 T, ∀ x v, |s.f (r,x,v)|≤A ∧ |s'.f (r,x,v)|≤A) → + (∀ r∈Icc 0 T, ∀ x v, P<‖v‖ → s.f (r,x,v)=0 ∧ s'.f (r,x,v)=0) → + GlobalFieldBound T L E B → GlobalFieldBound T L E' B' → + ∀ t∈Ioc 0 T, ∀ x x' : Vec, ∀ D H J : ℝ, + (‖electricBoundaryField (datumBoundarySolution d) t x- + electricBoundaryField (datumBoundarySolution d) t x'‖≤D ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t x- + magneticBoundaryField (datumBoundarySolution d) t x'‖≤D) → + (∀ r∈Icc 0 T, ∀ z v, |s.f (r,x+z,v)-s'.f (r,x'+z,v)|≤H) → + (∀ r∈Icc 0 T, ∀ z, ‖E (r,x+z)-E' (r,x'+z)‖≤J ∧ + ‖B (r,x+z)-B' (r,x'+z)‖≤J) → + ‖s.E (t,x)-s'.E (t,x')‖≤D+C*(max H J)*t ∧ + ‖s.B (t,x)-s'.B (t,x')‖≤D+C*(max H J)*t := by + obtain ⟨C,hC,hk⟩ := uniform_retarded_density_lipschitz A P L + refine ⟨C,hC,?_⟩ + intro d s s' E B E' B' hs hs' hE hB hE' hB' hV hV' T hT hab hp hEB hEB' t ht x x' D H J hb hf hdiff + apply mixed_fields_difference_bound hs hs' hE hB hE' hB' hV hV' ht.1 x x' hb + intro z hz hzt + have hr : t-‖z‖∈Icc 0 T := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + exact hk {s with E:=E,B:=B} {s' with E:=E',B:=B'} T hT hs.smooth_f hs'.smooth_f + hs.compact hs'.compact hab hp + (fun r hr y => ⟨(hEB r hr y).1,(hEB r hr y).2,(hEB' r hr y).1,(hEB' r hr y).2⟩) + t ⟨ht.1.le,ht.2⟩ x x' z hz hzt (max H J) + (fun v => (hf _ hr z v).trans (le_max_left _ _)) + ((hdiff _ hr z).1.trans (le_max_right _ _)) ((hdiff _ hr z).2.trans (le_max_right _ _)) + +def FieldControl (T L N : ℝ) (E B : Field) : Prop := + GlobalFieldBound T L E B ∧ SpatialFieldLip T N E B + +def PhaseParticleLip (T M : ℝ) (f : Particle) : Prop := + ∀ t∈Icc 0 T, ∀ z z' : Phase, |f (t,z)-f (t,z')|≤M*‖z-z'‖ + +theorem uniform_picard_control {d : Datum} (hd : Admissible d) : + ∃ T A R P L N M : ℝ, 0 d.E₀ p.2) (fun p : ℝ × Vec => d.B₀ p.2) ∧ + (∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → FieldControl T L N E B → + ∀ s : Solution, PicardRegular d s → TransportFor s E B → + LocalParticleBound T A R P s.f ∧ PhaseParticleLip T M s.f ∧ FieldControl T L N s.E s.B) ∧ + (∀ (E B E' B' : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ContDiff ℝ ∞ E' → ContDiff ℝ ∞ B' → FieldControl T L N E B → FieldControl T L N E' B' → + ∀ (s s' : Solution), PicardRegular d s → PicardRegular d s' → + TransportFor s E B → TransportFor s' E' B' → + ∀ D : ℝ, 0≤D → + (∀ t∈Icc 0 T, ∀ x, ‖E (t,x)-E' (t,x)‖≤D ∧ ‖B (t,x)-B' (t,x)‖≤D) → + ∀ t∈Icc 0 T, ∀ x, ‖s.E (t,x)-s'.E (t,x)‖≤D/2 ∧ ‖s.B (t,x)-s'.B (t,x)‖≤D/2) := by + obtain ⟨T₀,A,R,P,L,hT₀,hT₀1,hA,hR,hP,hL,h₀,hstep⟩ := uniform_global_picard_invariance hd + obtain ⟨D₀,hD₀,hDinit,hDb⟩ := datum_boundary_global_lipschitz hd + obtain ⟨A₁,hA₁,hAf⟩ := smooth_compact_lipschitz (hd.1.of_le (by simp)) hd.2.1 + have hAf' (z w : Phase) : |d.f₀ z-d.f₀ w|≤A₁*‖z-w‖ := by + simpa only [Real.norm_eq_abs] using hAf w z + obtain ⟨C,hC,hcomp⟩ := uniform_picard_comparison A P L + let N := D₀+1 + let M := A₁*Real.exp 1 + let K := 1+2*N+L + have hN : 0 (hc.1 r hr x).2) (fun r hr x y => (hc.2 r hr x y).1) + (fun r hr x y => (hc.2 r hr x y).2) ht z z' + exact hh.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (hexp le_rfl) hA₁) (norm_nonneg _)) + refine ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,?_,?_,?_⟩ + · constructor + · exact fun t ht x => h₀ t ⟨ht.1,ht.2.trans hTT⟩ x + · intro t ht x y + exact ⟨(hDinit x y).1.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _)), + (hDinit x y).2.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _))⟩ + · intro E B hE hB hc s hs hV + have hp := (hbase hE hB hc hs hV).1 + have hf := hflip hE hB hc hs hV + refine ⟨hp,hf,(hbase hE hB hc hs hV).2,?_⟩ + intro t ht x y + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + rw [hs.initial_E,hs.initial_E,hs.initial_B,hs.initial_B] + exact ⟨(hDinit x y).1.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _)), + (hDinit x y).2.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _))⟩ + · have hh := hcomp d s s E B E B hs hs hE hB hE hB hV hV T hT1 + (fun r hr z v => ⟨(hp r hr z v).1,(hp r hr z v).1⟩) + (by + intro r hr z v hv + have hz : s.f (r,z,v)=0 := by + by_contra hn + exact (not_lt_of_ge ((hp r hr z v).2 hn).2) hv + exact ⟨hz,hz⟩) + hc.1 hc.1 t ⟨ht0,ht.2⟩ y x (D₀*‖y-x‖) (M*‖y-x‖) (N*‖y-x‖) + (hDb t ⟨ht0,ht.2.trans hT1⟩ x y) + (by + intro r hr z v + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,sub_self,norm_zero, + max_eq_left (norm_nonneg _),add_sub_add_right_eq_sub] using hf r hr (y+z,v) (x+z,v)) + (by + intro r hr z + simpa only [add_sub_add_right_eq_sub] using hc.2 r hr (x+z) (y+z)) + have hm : max (M*‖y-x‖) (N*‖y-x‖)≤(M+N)*‖y-x‖ := by + apply max_le <;> nlinarith [norm_nonneg (y-x)] + have hb : D₀*‖y-x‖+C*max (M*‖y-x‖) (N*‖y-x‖)*t≤N*‖y-x‖ := by + calc + _ ≤ D₀*‖y-x‖+C*((M+N)*‖y-x‖)*T := add_le_add le_rfl + (mul_le_mul (mul_le_mul_of_nonneg_left hm hC) ht.2 ht.1 (by positivity)) + _ = (D₀+C*(M+N)*T)*‖y-x‖ := by ring + _ ≤ N*‖y-x‖ := mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _) + exact ⟨hh.1.trans hb,hh.2.trans hb⟩ + · intro E B E' B' hE hB hE' hB' hc hc' s s' hs hs' hV hV' D hD hdiff t ht x + have hp := (hbase hE hB hc hs hV).1 + have hp' := (hbase hE' hB' hc' hs' hV').1 + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + simp only [hs.initial_E,hs'.initial_E,hs.initial_B,hs'.initial_B,sub_self,norm_zero] + exact ⟨by positivity,by positivity⟩ + · have hfd (r : ℝ) (hr : r∈Icc 0 T) (z : Phase) : |s.f (r,z)-s'.f (r,z)|≤2*M*D := by + have hh := transported_comparison hs.smooth_f hs'.smooth_f hE hB hE' hB' hV hV' + hs.initial_f hs'.initial_f hA₁ hL.le hN.le hD hAf' + (fun u hu w => (hc.1 u hu w).2) (fun u hu w w' => (hc.2 u hu w w').1) + (fun u hu w w' => (hc.2 u hu w w').2) + (fun u hu w => (hdiff u hu w).1) (fun u hu w => (hdiff u hu w).2) hr z z + simp only [sub_self,norm_zero,zero_add] at hh + apply hh.trans + calc + A₁*(2*D*r)*Real.exp ((1+2*N+L)*r) = (2*D*r)*(A₁*Real.exp (K*r)) := by ring + _ ≤ (2*D*r)*M := mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left (hexp hr.2) hA₁) (mul_nonneg (mul_nonneg (by norm_num) hD) hr.1) + _ ≤ (2*D*1)*M := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hr.2.trans hT1) (by positivity)) hM + _ = 2*M*D := by ring + have hh := hcomp d s s' E B E' B' hs hs' hE hB hE' hB' hV hV' T hT1 + (fun r hr z v => ⟨(hp r hr z v).1,(hp' r hr z v).1⟩) + (by + intro r hr z v hv + constructor + · by_contra hn + exact (not_lt_of_ge ((hp r hr z v).2 hn).2) hv + · by_contra hn + exact (not_lt_of_ge ((hp' r hr z v).2 hn).2) hv) + hc.1 hc'.1 t ⟨ht0,ht.2⟩ x x 0 (2*M*D) D (by simp) + (fun r hr z v => hfd r hr (x+z,v)) (fun r hr z => hdiff r hr (x+z)) + have hm : max (2*M*D) D≤(2*M+1)*D := by apply max_le <;> nlinarith + have hb : 0+C*max (2*M*D) D*t≤D/2 := by + calc + _ ≤ C*((2*M+1)*D)*T := by + simpa only [zero_add] using mul_le_mul (mul_le_mul_of_nonneg_left hm hC) ht.2 ht.1 (by positivity) + _ = (2*C*(2*M+1)*T)*(D/2) := by ring + _ ≤ 1*(D/2) := mul_le_mul_of_nonneg_right hTC' (by positivity) + _ = D/2 := one_mul _ + exact ⟨hh.1.trans hb,hh.2.trans hb⟩ + +theorem exists_contractive_picard_sequence {d : Datum} (hd : Admissible d) : + ∃ T A R P L N M : ℝ, 0 step^[n] q₀ + have hrec (n : ℕ) : q (n+1)=step (q n) := Function.iterate_succ_apply' step n q₀ + have hbound (n : ℕ) : FieldControl T L N (q n).1.E (q n).1.B := by + induction n with + | zero => exact h₀ + | succ n ih => + rw [hrec] + exact (hstep _ _ (q n).2.1 (q n).2.2 ih _ (hs (q n)).1 (hs (q n)).2).2.2 + have hreg (n : ℕ) : PicardRegular d (q (n+1)).1 ∧ TransportFor (q (n+1)).1 (q n).1.E (q n).1.B ∧ + LocalParticleBound T A R P (q (n+1)).1.f ∧ PhaseParticleLip T M (q (n+1)).1.f := by + rw [hrec] + exact ⟨(hs (q n)).1,(hs (q n)).2, + (hstep _ _ (q n).2.1 (q n).2.2 (hbound n) _ (hs (q n)).1 (hs (q n)).2).1, + (hstep _ _ (q n).2.1 (q n).2.2 (hbound n) _ (hs (q n)).1 (hs (q n)).2).2.1⟩ + refine ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,fun n => (q n).1,rfl, + fun n => (q n).2,hbound,hreg,?_⟩ + intro n + induction n with + | zero => + intro t ht x + have h0 := (hbound 0).1 t ht x + have h1 := (hbound 1).1 t ht x + simp only [pow_zero,mul_one] + constructor + · exact (norm_sub_le _ _).trans (by linarith [h0.1,h1.1]) + · exact (norm_sub_le _ _).trans (by linarith [h0.2,h1.2]) + | succ n ih => + have hh := hcontract (q (n+1)).1.E (q (n+1)).1.B (q n).1.E (q n).1.B + (q (n+1)).2.1 (q (n+1)).2.2 (q n).2.1 (q n).2.2 (hbound (n+1)) (hbound n) + (q (n+1+1)).1 (q (n+1)).1 (hreg (n+1)).1 (hreg n).1 (hreg (n+1)).2.1 (hreg n).2.1 + (2*L*(1/2:ℝ)^n) (by positivity) ih + intro t ht x + convert hh t ht x using 1 <;> rw [pow_succ] <;> ring_nf + +lemma exists_uniform_limit_geometric {X W : Type*} [NormedAddCommGroup W] [CompleteSpace W] + {F : ℕ → X → W} {S : Set X} {C : ℝ} + (h : ∀ n, ∀ x∈S, ‖F (n+1) x-F n x‖≤C*(1/2:ℝ)^n) : + ∃ f : X → W, TendstoUniformlyOn F f atTop S := by + let g : ℕ → X → W := fun n x => F (n+1) x-F n x + have hu : Summable (fun n => C*(1/2:ℝ)^n) := + (summable_geometric_of_lt_one (by norm_num) (by norm_num : (1/2:ℝ)<1)).mul_left C + have hh := tendstoUniformlyOn_tsum_nat hu (f:=g) h + refine ⟨fun x => F 0 x+∑' n, g n x,?_⟩ + rw [Metric.tendstoUniformlyOn_iff] at hh ⊢ + intro ε hε + filter_upwards [hh ε hε] with n hn x hx + have he : (∑ i∈Finset.range n, g i x)=F n x-F 0 x := Finset.sum_range_sub (fun n => F n x) n + specialize hn x hx + rw [he,dist_eq_norm] at hn + rw [dist_eq_norm] + convert hn using 1 + congr 1 + abel + +theorem exists_picard_field_limit {d : Datum} (hd : Admissible d) : + ∃ T A R P L N M : ℝ, 0 (S n).E) E atTop {p | p.1∈Icc 0 T} ∧ + TendstoUniformlyOn (fun n => (S n).B) B atTop {p | p.1∈Icc 0 T} ∧ + ContinuousOn E {p | p.1∈Icc 0 T} ∧ ContinuousOn B {p | p.1∈Icc 0 T} ∧ + FieldControl T L N E B := by + obtain ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,S,hS0,hsm,hc,hr,hg⟩ := exists_contractive_picard_sequence hd + obtain ⟨E,hE⟩ := exists_uniform_limit_geometric (F:=fun n => (S n).E) (C:=2*L) (fun n (p : ℝ × Vec) (hp : p.1∈Icc 0 T) => (hg n p.1 hp p.2).1) + obtain ⟨B,hB⟩ := exists_uniform_limit_geometric (F:=fun n => (S n).B) (C:=2*L) (fun n (p : ℝ × Vec) (hp : p.1∈Icc 0 T) => (hg n p.1 hp p.2).2) + refine ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,S,E,B,hS0,hsm,hc,hr,hg,hE,hB, + hE.continuousOn (Frequently.of_forall fun n => (hsm n).1.continuous.continuousOn), + hB.continuousOn (Frequently.of_forall fun n => (hsm n).2.continuous.continuousOn),?_,?_⟩ + · intro t ht x + exact ⟨le_of_tendsto (hE.tendsto_at (x:=(t,x)) ht).norm (Eventually.of_forall fun n => (hc n).1 t ht x |>.1), + le_of_tendsto (hB.tendsto_at (x:=(t,x)) ht).norm (Eventually.of_forall fun n => (hc n).1 t ht x |>.2)⟩ + · intro t ht x y + exact ⟨le_of_tendsto ((hE.tendsto_at (x:=(t,y)) ht).sub (hE.tendsto_at (x:=(t,x)) ht)).norm + (Eventually.of_forall fun n => (hc n).2 t ht x y |>.1), + le_of_tendsto ((hB.tendsto_at (x:=(t,y)) ht).sub (hB.tendsto_at (x:=(t,x)) ht)).norm + (Eventually.of_forall fun n => (hc n).2 t ht x y |>.2)⟩ + +lemma geometric_picard_particle_differences {d : Datum} (hd : Admissible d) + {S : ℕ → Solution} {T L N : ℝ} (hT : 0≤T) (hL : 0≤L) (hN : 0≤N) + (hsm : ∀ n, ContDiff ℝ ∞ (S n).E ∧ ContDiff ℝ ∞ (S n).B) + (hc : ∀ n, FieldControl T L N (S n).E (S n).B) + (hr : ∀ n, PicardRegular d (S (n+1)) ∧ TransportFor (S (n+1)) (S n).E (S n).B) + (hg : ∀ n, ∀ t∈Icc 0 T, ∀ x, + ‖(S (n+1)).E (t,x)-(S n).E (t,x)‖≤2*L*(1/2:ℝ)^n ∧ + ‖(S (n+1)).B (t,x)-(S n).B (t,x)‖≤2*L*(1/2:ℝ)^n) : + ∃ C : ℝ, 0≤C ∧ ∀ n, ∀ t∈Icc 0 T, ∀ z : Phase, + |(S (n+1+1)).f (t,z)-(S (n+1)).f (t,z)|≤C*(1/2:ℝ)^n := by + obtain ⟨A,hA,hAf⟩ := smooth_compact_lipschitz (hd.1.of_le (by simp)) hd.2.1 + let K := 1+2*N+L + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨4*A*Real.exp (K*T)*L*T,by positivity,?_⟩ + intro n t ht z + have hh := transported_comparison (hr (n+1)).1.smooth_f (hr n).1.smooth_f + (hsm (n+1)).1 (hsm (n+1)).2 (hsm n).1 (hsm n).2 (hr (n+1)).2 (hr n).2 + (hr (n+1)).1.initial_f (hr n).1.initial_f hA hL hN (D:=2*L*(1/2:ℝ)^n) (by positivity) + (fun z w => by simpa only [Real.norm_eq_abs] using hAf w z) + (fun r hr x => ((hc (n+1)).1 r hr x).2) + (fun r hr x y => ((hc (n+1)).2 r hr x y).1) + (fun r hr x y => ((hc (n+1)).2 r hr x y).2) + (fun r hr x => (hg n r hr x).1) (fun r hr x => (hg n r hr x).2) ht z z + simp only [sub_self,norm_zero,zero_add] at hh + have he := Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 hK) + apply hh.trans + calc + _ ≤ A*(2*(2*L*(1/2:ℝ)^n)*T)*Real.exp (K*T) := + mul_le_mul (mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left ht.2 (by positivity)) hA) he (Real.exp_pos _).le (by positivity) + _ = (4*A*Real.exp (K*T)*L*T)*(1/2:ℝ)^n := by ring + +lemma picard_particle_limit {d : Datum} (hd : Admissible d) + {S : ℕ → Solution} {T A R P L N M : ℝ} (hT : 0≤T) (hL : 0≤L) (hN : 0≤N) + (hsm : ∀ n, ContDiff ℝ ∞ (S n).E ∧ ContDiff ℝ ∞ (S n).B) + (hc : ∀ n, FieldControl T L N (S n).E (S n).B) + (hr : ∀ n, PicardRegular d (S (n+1)) ∧ TransportFor (S (n+1)) (S n).E (S n).B ∧ + LocalParticleBound T A R P (S (n+1)).f ∧ PhaseParticleLip T M (S (n+1)).f) + (hg : ∀ n, ∀ t∈Icc 0 T, ∀ x, + ‖(S (n+1)).E (t,x)-(S n).E (t,x)‖≤2*L*(1/2:ℝ)^n ∧ + ‖(S (n+1)).B (t,x)-(S n).B (t,x)‖≤2*L*(1/2:ℝ)^n) : + ∃ f : Particle, TendstoUniformlyOn (fun n => (S (n+1)).f) f atTop {p | p.1∈Icc 0 T} ∧ + ContinuousOn f {p | p.1∈Icc 0 T} ∧ (∀ t∈Icc 0 T, ∀ z, 0≤f (t,z)) ∧ + (∀ z, f (0,z)=d.f₀ z) ∧ LocalParticleBound T A R P f ∧ PhaseParticleLip T M f := by + obtain ⟨C,hC,hg'⟩ := geometric_picard_particle_differences hd hT hL hN hsm hc + (fun n => ⟨(hr n).1,(hr n).2.1⟩) hg + obtain ⟨f,hf⟩ := exists_uniform_limit_geometric (F:=fun n => (S (n+1)).f) (C:=C) + (fun n (p : ℝ × Phase) (hp : p.1∈Icc 0 T) => by simpa only [Real.norm_eq_abs] using hg' n p.1 hp p.2) + refine ⟨f,hf,hf.continuousOn (Frequently.of_forall fun n => (hr n).1.smooth_f.continuous.continuousOn),?_,?_,?_,?_⟩ + · intro t ht z + exact ge_of_tendsto (hf.tendsto_at (x:=(t,z)) ht) (Eventually.of_forall fun n => (hr n).1.nonneg _) + · intro z + have hh := hf.tendsto_at (x:=(0,z)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT⟩) + simp only [(hr _).1.initial_f] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + · intro t ht x v + have hb : |f (t,x,v)|≤A := le_of_tendsto (hf.tendsto_at (x:=(t,x,v)) ht).abs + (Eventually.of_forall fun n => ((hr n).2.2.1 t ht x v).1) + refine ⟨hb,?_⟩ + intro hn + by_contra hnot + have hz (n : ℕ) : (S (n+1)).f (t,x,v)=0 := by + by_contra hnn + exact hnot (((hr n).2.2.1 t ht x v).2 hnn) + have hh := hf.tendsto_at (x:=(t,x,v)) ht + simp only [hz] at hh + exact hn (tendsto_nhds_unique hh tendsto_const_nhds) + · intro t ht z z' + exact le_of_tendsto ((hf.tendsto_at (x:=(t,z)) ht).sub (hf.tendsto_at (x:=(t,z')) ht)).abs + (Eventually.of_forall fun n => (hr n).2.2.2 t ht z z') + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma picard_field_exterior {d : Datum} {s : Solution} {E B : Field} + (hs : PicardRegular d s) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hV : TransportFor s E B) {T A R P t : ℝ} (hb : LocalParticleBound T A R P s.f) + (ht : t∈Ioc 0 T) (x : Vec) (hx : R+T<‖x‖) : + s.E (t,x)=electricBoundaryField (datumBoundarySolution d) t x ∧ + s.B (t,x)=magneticBoundaryField (datumBoundarySolution d) t x := by + have he := mixed_physical_vector hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell ht.1 x + have hz (z : Vec) (hz : z∈ball (0:Vec) t) : + retardedElectricDensity {s with E:=E,B:=B} t x (x+z)=0 := by + have hnorm : ‖z‖ simp [cross] + have hiE : (∫ z in ball (0:Vec) t,retardedElectricDensity {s with E:=E,B:=B} t x (x+z))=0 := by + apply setIntegral_eq_zero_of_forall_eq_zero + exact hz + have hiB : (∫ z in ball (0:Vec) t,retardedMagneticDensity {s with E:=E,B:=B} t x (x+z))=0 := by + apply setIntegral_eq_zero_of_forall_eq_zero + exact hzB + simp only [hiE,hiB,smul_zero,add_zero] at he + exact ⟨he.1.trans (hs.boundary_eq ht.1 x).1,he.2.trans (hs.boundary_eq ht.1 x).2⟩ + +lemma picard_uniform_limit_exterior {d : Datum} {S : ℕ → Solution} {E B : Field} {T A R P : ℝ} + (hsm : ∀ n, ContDiff ℝ ∞ (S n).E ∧ ContDiff ℝ ∞ (S n).B) + (hr : ∀ n, PicardRegular d (S (n+1))) + (hV : ∀ n, TransportFor (S (n+1)) (S n).E (S n).B) + (hb : ∀ n, LocalParticleBound T A R P (S (n+1)).f) + (hEl : TendstoUniformlyOn (fun n => (S n).E) E atTop {p | p.1∈Icc 0 T}) + (hBl : TendstoUniformlyOn (fun n => (S n).B) B atTop {p | p.1∈Icc 0 T}) : + ∀ t∈Icc 0 T, ∀ x, R+T<‖x‖ → E (t,x)=(S 1).E (t,x) ∧ B (t,x)=(S 1).B (t,x) := by + intro t ht x hx + have hE := (hEl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at (x:=(t,x)) ht + have hB := (hBl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at (x:=(t,x)) ht + have heq (n : ℕ) : (S (n+1)).E (t,x)=(S 1).E (t,x) ∧ (S (n+1)).B (t,x)=(S 1).B (t,x) := by + rcases eq_or_lt_of_le ht.1 with ht0|ht0 + · subst t + exact ⟨(hr n).initial_E x |>.trans ((hr 0).initial_E x).symm, + (hr n).initial_B x |>.trans ((hr 0).initial_B x).symm⟩ + · have hn := picard_field_exterior (hr n) (hsm n).1 (hsm n).2 (hV n) (hb n) ⟨ht0,ht.2⟩ x hx + have hz := picard_field_exterior (hr 0) (hsm 0).1 (hsm 0).2 (hV 0) (hb 0) ⟨ht0,ht.2⟩ x hx + exact ⟨hn.1.trans hz.1.symm,hn.2.trans hz.2.symm⟩ + have he (n : ℕ) := (heq n).1 + have hb' (n : ℕ) := (heq n).2 + simp only [he] at hE + simp only [hb'] at hB + exact ⟨tendsto_nhds_unique hE tendsto_const_nhds,tendsto_nhds_unique hB tendsto_const_nhds⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardCurvature.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardCurvature.lean new file mode 100644 index 0000000000000000000000000000000000000000..b96740209a628388685d417ffc0a2a59cbf1a7ea --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/PicardCurvature.lean @@ -0,0 +1,617 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.MixedJets +import OAI.Analysis.VlasovMaxwell.Retarded.VolterraMajorant +import OAI.Analysis.VlasovMaxwell.Regularity.CurvatureInterpolation +import OAI.Analysis.VlasovMaxwell.Regularity.MomentLimit + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_physical_integrand_curvature (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a : Vec → ℝ, ∀ E B : Vec → Vec, + (∀ x, |a x|≤A ∧ ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + CurvatureBound a Hf → CurvatureBound E H → CurvatureBound B H → + (∀ x y, |a y-a x|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => (a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))) + (C*(Hf+H+2*(M+N)^2)/r^2) := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_integrand_curvature A P L + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL x w + have hh := hb r ⟨hr.1.le,hr.2⟩ n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL x w + simp only [normalisedPhysicalIntegrand_eq hr.1.ne'] at hh + rw [show (2:ℝ) • (r^2 • ((a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))))= + r^2 • ((2:ℝ) • ((a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x))))) by module, + ← smul_add,← smul_sub,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] at hh + rw [div_mul_eq_mul_div] + exact (le_div_iff₀ (sq_pos_of_pos hr.1)).mpr (by simpa only [mul_comm] using hh) + +lemma uniform_physical_integral_curvature (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ f : Vec → Vec → ℝ, (∀ x, Continuous (f x)) → (∀ x, HasCompactSupport (f x)) → + (∀ x v, |f x v|≤A) → (∀ x v, P<‖v‖ → f x v=0) → + ∀ E B : Vec → Vec, (∀ x, ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + (∀ v, CurvatureBound (fun x => f x v) Hf) → CurvatureBound E H → CurvatureBound B H → + (∀ v x y, |f y v-f x v|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => ∫ v : Vec, (f x v*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))) + (C*(Hf+H+2*(M+N)^2)/r^2) := by + obtain ⟨K,hK,hk⟩ := uniform_physical_integrand_curvature A P L + refine ⟨K*volume.real (closedBall (0:Vec) P),by positivity,?_⟩ + intro r hr n hn f hf hc hab hs E B hEB Hf H M N hHf hH hM hN hfc hEc hBc hfL hEBL + let g : Vec → Vec → Vec := fun v x => (f x v*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x))) + have hint (x : Vec) : Integrable (fun v => g v x) := + integrable_physical_integrand (hf x) (hc x) hr.1.ne' hn (E x) (B x) + have he (x : Vec) : (∫ v in closedBall (0:Vec) P, g v x)=∫ v, g v x := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + simp only [g,hs x v (by simpa only [mem_closedBall_zero_iff,not_le] using hv),zero_mul,zero_smul] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := + ⟨by simpa only [Measure.restrict_apply_univ] using (isCompact_closedBall (0:Vec) P).measure_lt_top⟩ + have hbound : ∀ᵐ v ∂volume.restrict (closedBall (0:Vec) P), + CurvatureBound (g v) (K*(Hf+H+2*(M+N)^2)/r^2) := by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + exact hk r hr n hn v (mem_closedBall_zero_iff.mp hv) (fun x => f x v) E B + (fun x => ⟨hab x v,hEB x⟩) Hf H M N hHf hH hM hN (hfc v) hEc hBc (hfL v) hEBL + have hh := CurvatureBound.integral (fun x => (hint x).restrict) hbound + simp only [he,Measure.real,Measure.restrict_apply_univ] at hh + convert hh using 1 + simp only [Measure.real] + ring + +lemma CurvatureBound.cross_const_left {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {f : U → Vec} {H : ℝ} (hc : CurvatureBound f H) (n : Vec) : + CurvatureBound (fun x => cross n (f x)) (‖n‖*H) := by + intro x v + rw [← cross_add_right,← cross_smul_right,← cross_sub_right] + exact (norm_cross_le _ _).trans ((mul_le_mul_of_nonneg_left (hc x v) (norm_nonneg _)).trans_eq (by ring)) + +lemma uniform_retarded_density_curvature (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (T : ℝ), T≤1 → + ContDiff ℝ ∞ s.f → CompactOnFiniteHorizons s → + (∀ t∈Icc 0 T, ∀ x v, |s.f (t,x,v)|≤A) → + (∀ t∈Icc 0 T, ∀ x v, P<‖v‖ → s.f (t,x,v)=0) → + (∀ t∈Icc 0 T, ∀ x, ‖s.E (t,x)‖≤L ∧ ‖s.B (t,x)‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + (∀ t∈Icc 0 T, ∀ v, CurvatureBound (fun x => s.f (t,x,v)) Hf) → + (∀ t∈Icc 0 T, CurvatureBound (fun x => s.E (t,x)) H ∧ CurvatureBound (fun x => s.B (t,x)) H) → + (∀ t∈Icc 0 T, ∀ v x y, |s.f (t,y,v)-s.f (t,x,v)|≤M*‖y-x‖) → + SpatialFieldLip T N s.E s.B → + ∀ t∈Icc 0 T, ∀ z : Vec, 0<‖z‖ → ‖z‖≤t → + CurvatureBound (fun x => retardedElectricDensity s t x (x+z)) (C*(Hf+H+2*(M+N)^2)/‖z‖^2) ∧ + CurvatureBound (fun x => retardedMagneticDensity s t x (x+z)) (C*(Hf+H+2*(M+N)^2)/‖z‖^2) := by + obtain ⟨C,hC,hk⟩ := uniform_physical_integral_curvature A P L + refine ⟨C,hC,?_⟩ + intro s T hT hf hc hab hs hEB Hf H M N hHf hH hM hN hfc hEBc hfL hEBL t ht z hz hzt + have htime : t-‖z‖∈Icc 0 T := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + have hn : ‖-(‖z‖⁻¹ • z)‖=1 := by + simpa only [coneDirection,coneRadius,sub_zero,zero_sub,norm_neg,smul_neg] using coneDirection_norm (x:=(0:Vec)) (y:=z) (norm_pos_iff.mp hz).symm + have hslice (x : Vec) := (show RegularParticle s.f from ⟨(hf.of_le (by simp)).contDiffOn,hc⟩).slice htime.1 x + have he : CurvatureBound (fun x => retardedElectricDensity s t x (x+z)) + (C*(Hf+H+2*(M+N)^2)/‖z‖^2) := by + simp only [retardedElectricDensity,coneRadius_add,coneDirection_add] + exact hk ‖z‖ ⟨hz,hzt.trans (ht.2.trans hT)⟩ _ hn (fun x v => s.f (t-‖z‖,x+z,v)) + (fun x => (hslice (x+z)).1.continuous) (fun x => (hslice (x+z)).2) + (fun x v => hab _ htime (x+z) v) (fun x v hv => hs _ htime (x+z) v hv) + (fun x => s.E (t-‖z‖,x+z)) (fun x => s.B (t-‖z‖,x+z)) (fun x => hEB _ htime (x+z)) + Hf H M N hHf hH hM hN (fun v => (hfc _ htime v).translate z) + ((hEBc _ htime).1.translate z) ((hEBc _ htime).2.translate z) + (fun v x y => by simpa only [add_sub_add_right_eq_sub] using hfL _ htime v (x+z) (y+z)) + (fun x y => by simpa only [add_sub_add_right_eq_sub] using hEBL _ htime (x+z) (y+z)) + refine ⟨he,?_⟩ + simpa only [retardedMagneticDensity,coneDirection_add,hn,one_mul] using he.cross_const_left (-(‖z‖⁻¹ • z)) + +lemma boundary_integral_curvature {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → U → W} {a : U → W} {t C D : ℝ} (ht : 0≤t) + (hF : ∀ x, IntegrableOn (fun z => F z x) (ball (0:Vec) t)) + (ha : CurvatureBound a D) + (hFc : ∀ z : Vec, 0<‖z‖ → ‖z‖≤t → CurvatureBound (F z) (C/‖z‖^2)) : + CurvatureBound (fun x => a x+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z x) (D+C*t) := by + intro x v + have hp : IntegrableOn (fun z => F z (x+v)+F z (x-v)) (ball (0:Vec) t) := (hF (x+v)).add (hF (x-v)) + have hm : IntegrableOn (fun z => (2:ℝ) • F z x) (ball (0:Vec) t) := (hF x).smul (2:ℝ) + have he : (a (x+v)+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z (x+v))+ + (a (x-v)+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z (x-v))- + (2:ℝ) • (a x+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z x)= + (a (x+v)+a (x-v)-(2:ℝ) • a x)+(4*Real.pi)⁻¹ • + ∫ z in ball (0:Vec) t, (F z (x+v)+F z (x-v)-(2:ℝ) • F z x) := by + rw [integral_sub hp hm,integral_add (hF (x+v)) (hF (x-v)),integral_smul] + module + rw [he] + have hb := scaled_kernel_tip_le_on ht (hp.sub hm) (C:=C*‖v‖^2) (by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + exact (hFc z (norm_pos_iff.mpr hz0) (mem_ball_zero_iff.mp hz).le x v).trans_eq (by ring)) + exact ((norm_add_le _ _).trans (add_le_add (ha x v) hb)).trans_eq (by ring) + +lemma mixed_fields_curvature {d : Datum} {s : Solution} {E B : Field} + (hs : PicardRegular d s) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hV : TransportFor s E B) {t C D : ℝ} (ht : 0 electricBoundaryField (datumBoundarySolution d) t x) D ∧ + CurvatureBound (fun x => magneticBoundaryField (datumBoundarySolution d) t x) D) + (hden : ∀ z : Vec, 0<‖z‖ → ‖z‖≤t → + CurvatureBound (fun x => retardedElectricDensity {s with E:=E,B:=B} t x (x+z)) (C/‖z‖^2) ∧ + CurvatureBound (fun x => retardedMagneticDensity {s with E:=E,B:=B} t x (x+z)) (C/‖z‖^2)) : + CurvatureBound (fun x => s.E (t,x)) (D+C*t) ∧ CurvatureBound (fun x => s.B (t,x)) (D+C*t) := by + have he (x : Vec) := mixed_physical_vector hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell ht x + have hf1 := (hs.smooth_f.of_le (by simp : (1:ℕ∞ω)≤∞)).contDiffOn (s:=particleHalfSpace) + have hE1 := (hE.of_le (by simp : (1:ℕ∞ω)≤∞)).contDiffOn (s:=fieldHalfSpace) + have hB1 := (hB.of_le (by simp : (1:ℕ∞ω)≤∞)).contDiffOn (s:=fieldHalfSpace) + have hEq : (fun x => s.E (t,x))=(fun x => electricBoundaryField (datumBoundarySolution d) t x+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, retardedElectricDensity {s with E:=E,B:=B} t x (x+z)) := by + funext x + rw [(he x).1,(hs.boundary_eq ht x).1] + have hBq : (fun x => s.B (t,x))=(fun x => magneticBoundaryField (datumBoundarySolution d) t x+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, retardedMagneticDensity {s with E:=E,B:=B} t x (x+z)) := by + funext x + rw [(he x).2,(hs.boundary_eq ht x).2] + rw [hEq,hBq] + exact ⟨boundary_integral_curvature ht.le (fun x => + integrableOn_retardedElectricDensity_le (s:={s with E:=E,B:=B}) hf1 hE1 hB1 hs.compact ht.le le_rfl x) + hb.1 (fun z hz hzt => (hden z hz hzt).1), + boundary_integral_curvature ht.le (fun x => + integrableOn_retardedMagneticDensity_le (s:={s with E:=E,B:=B}) hf1 hE1 hB1 hs.compact ht.le le_rfl x) + hb.2 (fun z hz hzt => (hden z hz hzt).2)⟩ + +def SpatialFieldCurvature (T H : ℝ) (E B : Field) : Prop := + ∀ t∈Icc 0 T, CurvatureBound (fun x => E (t,x)) H ∧ CurvatureBound (fun x => B (t,x)) H + +def PhaseParticleCurvature (T H : ℝ) (f : Particle) : Prop := + ∀ t∈Icc 0 T, CurvatureBound (fun z => f (t,z)) H + +theorem uniform_picard_sequence_curvature {d : Datum} (hd : Admissible d) + {S : ℕ → Solution} {T₀ A R P L N M : ℝ} (hT₀ : 0 ((hc n).1 r (hsub hr) x).2) + (fun r hr x y => ((hc n).2 r (hsub hr) x y).1) + (fun r hr x y => ((hc n).2 r (hsub hr) x y).2) + (fun r hr => (hh r hr).1) (fun r hr => (hh r hr).2) ht + apply hb.mono + have he : Real.exp ((1+2*N+L)*T)≤Q := Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left hTT hK) + have he2 := pow_le_pow_left₀ (Real.exp_pos _).le he 2 + have he3 := pow_le_pow_left₀ (Real.exp_pos _).le he 3 + have htCf : Cf*t≤1 := (mul_le_mul_of_nonneg_left ht.2 hCf).trans hTCf + have ha := mul_le_mul_of_nonneg_left he2 (show 0≤4*Df by positivity) + have hb' := mul_le_mul_of_nonneg_left he3 (show 0≤Af*(4*(6+6*L+2*H+2*N)*t) from mul_nonneg hAf (mul_nonneg (by positivity) ht.1)) + dsimp [Hf,Cf] at * + nlinarith + have hstep (n : ℕ) (hh : SpatialFieldCurvature T H (S n).E (S n).B) : + SpatialFieldCurvature T H (S (n+1)).E (S (n+1)).B := by + have hp := hpart n hh + intro t ht + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + simpa only [(hr n).1.initial_E,(hr n).1.initial_B] using + And.intro (hDE.mono (by dsimp [H]; linarith)) (hDB.mono (by dsimp [H]; linarith)) + · have hbnd := hboundary t ⟨ht0,ht.2.trans (hTT.trans hT₀1)⟩ + have hden := hdensity {S (n+1) with E:=(S n).E,B:=(S n).B} T (hTT.trans hT₀1) + (hr n).1.smooth_f (hr n).1.compact + (fun r hrt x v => ((hr n).2.2.1 r (hsub hrt) x v).1) + (fun r hrt x v hv => by + by_contra hn + exact (not_le_of_gt hv) (((hr n).2.2.1 r (hsub hrt) x v).2 hn).2) + (fun r hrt x => (hc n).1 r (hsub hrt) x) Hf H M N hHf hH hM hN + (fun r hrt v => (hp r hrt).spatial_slice v) hh + (fun r hrt v x y => by + simpa only [Prod.mk_sub_mk,sub_self,Prod.norm_mk,norm_zero,max_eq_left (norm_nonneg _)] using + (hr n).2.2.2 r (hsub hrt) (y,v) (x,v)) + (fun r hrt x y => (hc n).2 r (hsub hrt) x y) t ht + have hb := mixed_fields_curvature (hr n).1 (hsm n).1 (hsm n).2 (hr n).2.1 ht0 hbnd hden + have hb' : D+CE*t≤H := by + have hct := (mul_le_mul_of_nonneg_left ht.2 hCE).trans hTCE + dsimp [H]; linarith + exact ⟨hb.1.mono hb',hb.2.mono hb'⟩ + have hfields (n : ℕ) : SpatialFieldCurvature T H (S n).E (S n).B := by + induction n with + | zero => + rw [h0] + intro t ht + exact ⟨hDE.mono (by dsimp [H]; linarith),hDB.mono (by dsimp [H]; linarith)⟩ + | succ n ih => exact hstep n ih + exact ⟨T,Hf,H,hT,hTT,hHf,hH,hfields,fun n => hpart n (hfields n)⟩ + +lemma FieldControl.spatialJetBound_one {E B : Field} {T L N : ℝ} + (hc : FieldControl T L N E B) (hN : 0≤N) : + SpatialJetBound 1 T (max L N) E B := by + intro t ht x i hi + rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hi with rfl | rfl + · simpa only [norm_iteratedFDeriv_zero] using + And.intro ((hc.1 t ht x).1.trans (le_max_left _ _)) ((hc.1 t ht x).2.trans (le_max_left _ _)) + · simp only [norm_iteratedFDeriv_one] + have he : ‖fderiv ℝ (fun y => E (t,y)) x‖≤N := by + apply norm_fderiv_le_of_lip' ℝ hN + exact Eventually.of_forall fun y => (hc.2 t ht x y).1 + have hb : ‖fderiv ℝ (fun y => B (t,y)) x‖≤N := by + apply norm_fderiv_le_of_lip' ℝ hN + exact Eventually.of_forall fun y => (hc.2 t ht x y).2 + exact ⟨he.trans (le_max_right _ _),hb.trans (le_max_right _ _)⟩ + +lemma particleJetBound_one {f : Particle} {T A R P M : ℝ} + (hb : LocalParticleBound T A R P f) (hl : PhaseParticleLip T M f) (hM : 0≤M) : + ParticleJetBound 1 T (max A M) f := by + intro t ht i hi z + rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hi with rfl | rfl + · simpa only [norm_iteratedFDeriv_zero,Real.norm_eq_abs] using (hb t ht z.1 z.2).1.trans (le_max_left _ _) + · rw [norm_iteratedFDeriv_one] + apply le_trans _ (le_max_right A M) + apply norm_fderiv_le_of_lip' ℝ hM + exact Eventually.of_forall fun w => by simpa only [Real.norm_eq_abs] using hl t ht w z + +theorem uniform_picard_sequence_jets {d : Datum} (hd : Admissible d) + {S : ℕ → Solution} {T A R P L N M : ℝ} (_ : 0 + let Q := max (max L N) (max (max A M) 1) + have he : max L N≤Q := le_max_left _ _ + have hf : max A M≤Q := (le_max_left _ _).trans (le_max_right _ _) + refine ⟨Q,(le_max_right _ _).trans (le_max_right _ _),?_,?_⟩ + · intro n t ht x i hi + exact ⟨((hc n).spatialJetBound_one hN t ht x i hi).1.trans he, + ((hc n).spatialJetBound_one hN t ht x i hi).2.trans he⟩ + · intro n t ht i hi z + exact (particleJetBound_one (hr n).2.2.1 (hr n).2.2.2 hM t ht i hi z).trans hf + | succ k ih => + obtain ⟨Q,hQ,hfields,hparticles⟩ := ih + obtain ⟨F,hF,htransport⟩ := transported_derivative_tame hd (k+1) (by omega) Q hQ + obtain ⟨D,C,hD,hC,hinit,hstep⟩ := mixed_fields_derivative_tame hd (k+1) (by omega) P Q hQ + obtain ⟨H,hH,hHmon,hH1,hHstep⟩ := exists_tame_volterra_majorant hD hC hF + have hHpos (t : ℝ) (ht : 0≤t) : 0≤H t := zero_le_one.trans (hH1 t ht) + have hH0 : D≤H 0 := by simpa using hHstep 0 le_rfl + let J : ℝ → ℝ := fun u => (F+1)*(1+H u) + have hJ : Continuous J := continuous_const.mul (continuous_const.add hH) + have hHJ (u : ℝ) (hu : 0≤u) : H u≤J u := by + dsimp [J] + nlinarith [mul_nonneg hF (hHpos u hu)] + have hparticle (n : ℕ) + (hold : ∀ t∈Icc (0:ℝ) T, ∀ x, + ‖iteratedFDeriv ℝ (k+1+1) (fun y => (S n).E (t,y)) x‖≤H t ∧ + ‖iteratedFDeriv ℝ (k+1+1) (fun y => (S n).B (t,y)) x‖≤H t) : + ∀ t∈Icc (0:ℝ) T, ∀ z, + ‖iteratedFDeriv ℝ (k+1+1) (fun w => (S (n+1)).f (t,w)) z‖≤F*(1+H t) := by + intro t ht z + exact htransport (S n).E (S n).B (hsm n).1 (hsm n).2 (S (n+1)) (hr n).1 (hr n).2.1 + t ⟨ht.1,ht.2.trans hT1⟩ (fun u hu => hfields n u ⟨hu.1,hu.2.trans ht.2⟩) + (H t) (hHpos t ht.1) (fun u hu x => ⟨(hold u ⟨hu.1,hu.2.trans ht.2⟩ x).1.trans (hHmon hu.2), + (hold u ⟨hu.1,hu.2.trans ht.2⟩ x).2.trans (hHmon hu.2)⟩) t ⟨ht.1,le_rfl⟩ z + have htop : ∀ n, ∀ t∈Icc (0:ℝ) T, ∀ x, + ‖iteratedFDeriv ℝ (k+1+1) (fun y => (S n).E (t,y)) x‖≤H t ∧ + ‖iteratedFDeriv ℝ (k+1+1) (fun y => (S n).B (t,y)) x‖≤H t := by + intro n + induction n with + | zero => + intro t ht x + simpa only [h0,datumBoundarySolution] using + And.intro ((hinit x).1.trans (hH0.trans (hHmon ht.1))) ((hinit x).2.trans (hH0.trans (hHmon ht.1))) + | succ n ihn => + have hf := hparticle n ihn + intro t ht x + have hh := hstep (S (n+1)) (S n).E (S n).B (hr n).1 (hsm n).1 (hsm n).2 (hr n).2.1 T hT1 + (fun u hu y v hv => by + by_contra hn + exact (not_le_of_gt hv) (((hr n).2.2.1 u hu y v).2 hn).2) + (hparticles n) (hfields n) J hJ (fun u hu => (hHpos u hu.1).trans (hHJ u hu.1)) + (fun u hu z => (hf u hu z).trans (by dsimp [J]; nlinarith [hHpos u hu.1])) + (fun u hu y => ⟨(ihn u hu y).1.trans (hHJ u hu.1),(ihn u hu y).2.trans (hHJ u hu.1)⟩) t ht x + exact ⟨hh.1.trans (hHstep t ht.1),hh.2.trans (hHstep t ht.1)⟩ + let B := Q+H 1+F*(1+H 1) + have hHB : H 1≤B := by dsimp [B]; nlinarith [hHpos 1 zero_le_one] + have hQB : Q≤B := by dsimp [B]; nlinarith [hHpos 1 zero_le_one] + have hFB : F*(1+H 1)≤B := by dsimp [B]; linarith [hHpos 1 zero_le_one] + refine ⟨B,hQ.trans hQB,?_,?_⟩ + · intro n t ht x i hi + by_cases hik : i≤k+1 + · exact ⟨(hfields n t ht x i hik).1.trans hQB,(hfields n t ht x i hik).2.trans hQB⟩ + · have he : i=k+1+1 := by omega + subst i + exact ⟨(htop n t ht x).1.trans ((hHmon (ht.2.trans hT1)).trans hHB), + (htop n t ht x).2.trans ((hHmon (ht.2.trans hT1)).trans hHB)⟩ + · intro n t ht i hi z + by_cases hik : i≤k+1 + · exact (hparticles n t ht i hik z).trans hQB + · have he : i=k+1+1 := by omega + subst i + exact (hparticle n (htop n) t ht z).trans + ((mul_le_mul_of_nonneg_left (add_le_add_right (hHmon (ht.2.trans hT1)) 1) hF).trans hFB) + +lemma hasFDerivWithinAt_uniform_limit_convex {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℕ → U → W} {DF : ℕ → U → (U →L[ℝ] W)} + {f : U → W} {D : U → (U →L[ℝ] W)} {S : Set U} + (hS : Convex ℝ S) (hcont : ContinuousOn D S) + (hder : ∀ n, ∀ x∈S, HasFDerivWithinAt (F n) (DF n x) S x) + (hD : TendstoUniformlyOn DF D atTop S) + (hf : ∀ x∈S, Tendsto (fun n => F n x) atTop (𝓝 (f x))) {x : U} (hx : x∈S) : + HasFDerivWithinAt f (D x) S x := by + rw [hasFDerivWithinAt_iff_isLittleO,Asymptotics.isLittleO_iff] + intro ε hε + obtain ⟨δ,hδ,hnear⟩ := Metric.continuousWithinAt_iff.mp (hcont x hx) (ε/2) (by positivity) + have hunif := Metric.tendstoUniformlyOn_iff.mp hD (ε/2) (by positivity) + filter_upwards [mem_nhdsWithin_of_mem_nhds (ball_mem_nhds x hδ),self_mem_nhdsWithin] with y hy hyS + apply le_of_tendsto (((hf y hyS).sub (hf x hx)).sub tendsto_const_nhds).norm + filter_upwards [hunif] with n hn + apply Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le' + (fun z hz => (hder n z hz.2).mono inter_subset_right) _ + ((convex_ball _ _).inter hS) ⟨mem_ball_self hδ,hx⟩ ⟨hy,hyS⟩ + intro z hz + have ha := hn z hz.2 + have hb := hnear hz.2 hz.1 + rw [dist_eq_norm,norm_sub_rev] at ha + rw [dist_eq_norm] at hb + exact (norm_sub_le_norm_sub_add_norm_sub _ (D z) _).trans (by linarith) + +lemma continuous_spatial_fderiv {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × U → W} (hF : ContDiff ℝ ∞ F) : + Continuous (fun p : ℝ × U => fderiv ℝ (fun x => F (p.1,x)) p.2) := by + have he (p : ℝ × U) : fderiv ℝ (fun x => F (p.1,x)) p.2 = + (fderiv ℝ F p).comp (ContinuousLinearMap.inr ℝ ℝ U) := by + exact (((hF.differentiable (by simp)) p).hasFDerivAt.comp p.2 + ((hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id p.2))).fderiv + simp_rw [he] + exact (hF.continuous_fderiv (by simp)).clm_comp continuous_const + +def curlMap : (Vec →L[ℝ] Vec) →L[ℝ] Vec := + ({ toFun := fun A => WithLp.toLp 2 ![A (basis 1) 2-A (basis 2) 1, + A (basis 2) 0-A (basis 0) 2,A (basis 0) 1-A (basis 1) 0] + map_add' := by intro A B; ext i; fin_cases i <;> simp <;> ring + map_smul' := by intro r A; ext i; fin_cases i <;> simp <;> ring } : + (Vec →L[ℝ] Vec) →ₗ[ℝ] Vec).toContinuousLinearMap + +lemma curl_eq_curlMap {g : Vec → Vec} (hg : Differentiable ℝ g) (x : Vec) : + curl g x=curlMap (fderiv ℝ g x) := by + have hi (i j : Fin 3) : spatialPartial (fun y => g y i) x j=(fderiv ℝ g x (basis j)) i := by + have hh := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp x (hg x).hasFDerivAt + change HasFDerivAt (fun y => g y i) _ x at hh + rw [spatialPartial,hh.fderiv] + rfl + ext i + fin_cases i <;> simp [curl,curlMap,hi] + +def divMap : (Vec →L[ℝ] Vec) →L[ℝ] ℝ := + ({ toFun := fun A => ∑ i : Fin 3, A (basis i) i + map_add' := by intro A B; simp [Finset.sum_add_distrib] + map_smul' := by intro r A; simp [Finset.mul_sum] } : + (Vec →L[ℝ] Vec) →ₗ[ℝ] ℝ).toContinuousLinearMap + +lemma divergence_eq_divMap {g : Vec → Vec} (hg : Differentiable ℝ g) (x : Vec) : + divergence g x=divMap (fderiv ℝ g x) := by + change (∑ i : Fin 3, spatialPartial (fun y => g y i) x i)=∑ i : Fin 3, (fderiv ℝ g x) (basis i) i + apply Finset.sum_congr rfl + intro i hi + have hh := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp x (hg x).hasFDerivAt + change HasFDerivAt (fun y => g y i) _ x at hh + rw [spatialPartial,hh.fderiv] + rfl + +lemma fderiv_spatial_slice {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × U → W} (hF : Differentiable ℝ F) (p : ℝ × U) : + fderiv ℝ (fun x => F (p.1,x)) p.2=(fderiv ℝ F p).comp (ContinuousLinearMap.inr ℝ ℝ U) := + ((hF p).hasFDerivAt.comp p.2 ((hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id p.2))).fderiv + +def assembleDerivative {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + (Dt : W) (Dx : U →L[ℝ] W) : (ℝ × U) →L[ℝ] W := + (ContinuousLinearMap.fst ℝ ℝ U).smulRight Dt+Dx.comp (ContinuousLinearMap.snd ℝ ℝ U) + +lemma fderiv_eq_assemble {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × U → W} (hF : Differentiable ℝ F) (p : ℝ × U) : + fderiv ℝ F p=assembleDerivative (fderiv ℝ F p (1,0)) (fderiv ℝ (fun x => F (p.1,x)) p.2) := by + rw [fderiv_spatial_slice hF] + apply ContinuousLinearMap.ext + intro z + change fderiv ℝ F p z=z.1 • fderiv ℝ F p (1,0)+fderiv ℝ F p (0,z.2) + rw [← map_smul,← map_add] + congr 1 + ext <;> simp + +lemma uniform_assembleDerivative {X U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {A : ℕ → X → W} {D : ℕ → X → (U →L[ℝ] W)} + {a : X → W} {d : X → (U →L[ℝ] W)} {S : Set X} + (hA : TendstoUniformlyOn A a atTop S) (hD : TendstoUniformlyOn D d atTop S) : + TendstoUniformlyOn (fun n x => assembleDerivative (A n x) (D n x)) + (fun x => assembleDerivative (a x) (d x)) atTop S := by + have ha := ((ContinuousLinearMap.smulRightL ℝ (ℝ × U) W (ContinuousLinearMap.fst ℝ ℝ U)).uniformContinuous).comp_tendstoUniformlyOn hA + have hd := (((ContinuousLinearMap.compL ℝ (ℝ × U) U W).flip (ContinuousLinearMap.snd ℝ ℝ U)).uniformContinuous).comp_tendstoUniformlyOn hD + exact ha.add hd + +lemma uniform_clm_apply_bounded {X U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {A : ℕ → X → (U →L[ℝ] W)} {U' : ℕ → X → U} + {a : X → (U →L[ℝ] W)} {u : X → U} {S : Set X} {M N : ℝ} + (hM : 0≤M) (hN : 0≤N) + (hA : TendstoUniformlyOn A a atTop S) (hu : TendstoUniformlyOn U' u atTop S) + (hbA : ∀ n, ∀ x∈S, ‖A n x‖≤M) (hbu : ∀ x∈S, ‖u x‖≤N) : + TendstoUniformlyOn (fun n x => A n x (U' n x)) (fun x => a x (u x)) atTop S := by + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + let δ := ε/(2*(M+N+1)) + have hδ : 0<δ := by dsimp [δ]; positivity + filter_upwards [Metric.tendstoUniformlyOn_iff.mp hA δ hδ, + Metric.tendstoUniformlyOn_iff.mp hu δ hδ] with n hnA hnu x hx + rw [dist_comm,dist_eq_norm] + have h1 := hnA x hx + have h2 := hnu x hx + rw [dist_comm,dist_eq_norm] at h1 h2 + have he : A n x (U' n x)-a x (u x)=A n x (U' n x-u x)+(A n x-a x) (u x) := by simp + rw [he] + apply (norm_add_le _ _).trans_lt + have hb1 : ‖A n x (U' n x-u x)‖≤M*δ := (ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul (hbA n x hx) h2.le (norm_nonneg _) hM) + have hb2 : ‖(A n x-a x) (u x)‖≤δ*N := (ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul h1.le (hbu x hx) (norm_nonneg _) hδ.le) + have hd : δ*(2*(M+N+1))=ε := by dsimp [δ]; exact div_mul_cancel₀ _ (by positivity) + nlinarith + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma c1_slab_uniform_derivative {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℕ → ℝ × U → W} {f : ℝ × U → W} {D : ℝ × U → ((ℝ × U) →L[ℝ] W)} {T : ℝ} + (hT : 0 fderiv ℝ (F n) p) D atTop {p | p.1∈Icc 0 T}) : + ContDiffOn ℝ 1 f {p | p.1∈Icc 0 T} ∧ + ∀ p, p.1∈Icc 0 T → HasFDerivWithinAt f (D p) {p | p.1∈Icc 0 T} p := by + have he : {p : ℝ × U | p.1∈Icc 0 T}=Icc 0 T ×ˢ (univ : Set U) := by ext p; simp + have hconv : Convex ℝ {p : ℝ × U | p.1∈Icc 0 T} := by rw [he]; exact (convex_Icc (𝕜:=ℝ) 0 T).prod (convex_univ : Convex ℝ (univ : Set U)) + have hu : UniqueDiffOn ℝ {p : ℝ × U | p.1∈Icc 0 T} := by rw [he]; exact (uniqueDiffOn_Icc hT).prod uniqueDiffOn_univ + have hDc : ContinuousOn D {p | p.1∈Icc 0 T} := hD.continuousOn + (Frequently.of_forall fun n => ((hF n).continuous_fderiv (by simp)).continuousOn) + have hd (p : ℝ × U) (hp : p.1∈Icc 0 T) := hasFDerivWithinAt_uniform_limit_convex hconv hDc + (fun n q hq => (((hF n).differentiable (by simp)) q).hasFDerivAt.hasFDerivWithinAt) + hD (fun q hq => hf.tendsto_at hq) hp + refine ⟨?_,hd⟩ + apply (contDiffOn_succ_iff_hasFDerivWithinAt_of_uniqueDiffOn (n:=0) hu).mpr + exact ⟨by simp, D, contDiffOn_zero.mpr hDc,hd⟩ + +lemma picard_field_full_derivative_limit {d : Datum} {S : ℕ → Solution} + {E B : Field} {f : Particle} {T A R P H : ℝ} (_ : 0 (S (n+1)).f) f atTop {p | p.1∈Icc 0 T}) + (hEl : TendstoUniformlyOn (fun n => (S (n+1)).E) E atTop {p | p.1∈Icc 0 T}) + (hBl : TendstoUniformlyOn (fun n => (S (n+1)).B) B atTop {p | p.1∈Icc 0 T}) : + ∃ XE XB : ℝ × Vec → (Vec →L[ℝ] Vec), + TendstoUniformlyOn (fun n p => fderiv ℝ (fun x => (S (n+1)).E (p.1,x)) p.2) XE atTop {p | p.1∈Icc 0 T} ∧ + TendstoUniformlyOn (fun n p => fderiv ℝ (fun x => (S (n+1)).B (p.1,x)) p.2) XB atTop {p | p.1∈Icc 0 T} ∧ + (∀ t∈Icc 0 T, ∀ x, HasFDerivAt (fun y => E (t,y)) (XE (t,x)) x ∧ + HasFDerivAt (fun y => B (t,y)) (XB (t,x)) x) ∧ + TendstoUniformlyOn (fun n p => fderiv ℝ (S (n+1)).E p) + (fun p => assembleDerivative (curlMap (XB p)-current (fun z => f (p.1,z)) p.2) (XE p)) atTop {p | p.1∈Icc 0 T} ∧ + TendstoUniformlyOn (fun n p => fderiv ℝ (S (n+1)).B p) + (fun p => assembleDerivative (-curlMap (XE p)) (XB p)) atTop {p | p.1∈Icc 0 T} ∧ + (∀ p : ℝ × Vec, p.1∈Icc 0 T → divMap (XE p)=rho (fun z => f (p.1,z)) p.2 ∧ divMap (XB p)=0) := by + have hEslice (n : ℕ) (t : ℝ) : Differentiable ℝ (fun x => (S (n+1)).E (t,x)) := + ((hr n).smooth_E.differentiable (by simp)).comp ((differentiable_const t).prodMk differentiable_id) + have hBslice (n : ℕ) (t : ℝ) : Differentiable ℝ (fun x => (S (n+1)).B (t,x)) := + ((hr n).smooth_B.differentiable (by simp)).comp ((differentiable_const t).prodMk differentiable_id) + obtain ⟨XE,hXE,hdE⟩ := uniform_spatial_derivative_limit hH (fun n t ht => hEslice n t) + (fun n t ht => (hc n t ht).1) hEl + obtain ⟨XB,hXB,hdB⟩ := uniform_spatial_derivative_limit hH (fun n t ht => hBslice n t) + (fun n t ht => (hc n t ht).2) hBl + obtain ⟨hρ,hj⟩ := uniform_source_moments (fun n => (hr n).smooth_f.continuous.continuousOn) hfc hb hbf hfl + have hcurlE := curlMap.uniformContinuous.comp_tendstoUniformlyOn hXE + have hcurlB := curlMap.uniformContinuous.comp_tendstoUniformlyOn hXB + have htE := hcurlB.sub hj + have htB := hcurlE.neg + have hfullE := uniform_assembleDerivative htE hXE + have hfullB := uniform_assembleDerivative htB hXB + have he (n : ℕ) (p : ℝ × Vec) (hp : p.1∈Icc 0 T) : + fderiv ℝ (S (n+1)).E p=assembleDerivative + (curlMap (fderiv ℝ (fun x => (S (n+1)).B (p.1,x)) p.2)-current (fun z => (S (n+1)).f (p.1,z)) p.2) + (fderiv ℝ (fun x => (S (n+1)).E (p.1,x)) p.2) := by + rw [fderiv_eq_assemble ((hr n).smooth_E.differentiable (by simp))] + congr 1 + have hh := ((hr n).maxwell p.1 hp.1 p.2).1 + rw [spaceCurl_slice ((hr n).smooth_B.differentiable (by simp)),curl_eq_curlMap (hBslice n p.1)] at hh + exact hh + have hb' (n : ℕ) (p : ℝ × Vec) (hp : p.1∈Icc 0 T) : + fderiv ℝ (S (n+1)).B p=assembleDerivative + (-curlMap (fderiv ℝ (fun x => (S (n+1)).E (p.1,x)) p.2)) + (fderiv ℝ (fun x => (S (n+1)).B (p.1,x)) p.2) := by + rw [fderiv_eq_assemble ((hr n).smooth_B.differentiable (by simp))] + congr 1 + have hh := ((hr n).maxwell p.1 hp.1 p.2).2.1 + rw [spaceCurl_slice ((hr n).smooth_E.differentiable (by simp)),curl_eq_curlMap (hEslice n p.1)] at hh + exact hh + refine ⟨XE,XB,hXE,hXB,fun t ht x => ⟨hdE t ht x,hdB t ht x⟩, + hfullE.congr (Eventually.of_forall fun n p hp => (he n p hp).symm), + hfullB.congr (Eventually.of_forall fun n p hp => (hb' n p hp).symm),?_⟩ + intro p hp + have hde := (divMap.uniformContinuous.comp_tendstoUniformlyOn hXE).tendsto_at hp + have hdb := (divMap.uniformContinuous.comp_tendstoUniformlyOn hXB).tendsto_at hp + have heq (n : ℕ) : divMap (fderiv ℝ (fun x => (S (n+1)).E (p.1,x)) p.2)=rho (fun z => (S (n+1)).f (p.1,z)) p.2 := by + rw [← divergence_eq_divMap (hEslice n p.1),← spaceDiv_slice ((hr n).smooth_E.differentiable (by simp))] + exact ((hr n).maxwell p.1 hp.1 p.2).2.2.1 + have hbq (n : ℕ) : divMap (fderiv ℝ (fun x => (S (n+1)).B (p.1,x)) p.2)=0 := by + rw [← divergence_eq_divMap (hBslice n p.1),← spaceDiv_slice ((hr n).smooth_B.differentiable (by simp))] + exact ((hr n).maxwell p.1 hp.1 p.2).2.2.2 + change Tendsto (fun n => divMap (fderiv ℝ (fun x => (S (n+1)).E (p.1,x)) p.2)) _ _ at hde + change Tendsto (fun n => divMap (fderiv ℝ (fun x => (S (n+1)).B (p.1,x)) p.2)) _ _ at hdb + simp only [heq,hbq] at hde hdb + exact ⟨tendsto_nhds_unique hde (hρ.tendsto_at hp),tendsto_nhds_unique hdb tendsto_const_nhds⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/RelativeCauchyConstant.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/RelativeCauchyConstant.lean new file mode 100644 index 0000000000000000000000000000000000000000..72b5ade4cd5981a028fa9cb5bb8ce61c5eac0fc5 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/RelativeCauchyConstant.lean @@ -0,0 +1,909 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.ClosedEulerianTimeBudget + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_source_relative_radius_budget {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let O := ENNReal.ofReal (491520*E*(1+φ/σ)*(1+I/len)/(p*r*φ^2)) + let H := ENNReal.ofReal (576*I*r*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (10240*φ/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)*(min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (10240/p)* + ((ENNReal.ofReal (40*(I+2*r)*E))^(1/2:ℝ)*(min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + rw [heG,heB,hmass] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) le_rfl + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hmag (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) le_rfl + +def relativeCauchyConstant (C E Z : ℝ) : ℝ := + 31457280*C*Real.sqrt Z+10240*Real.sqrt Z*Real.sqrt (62914560*C*E) + +lemma relativeCauchyConstant_nonneg {C E Z : ℝ} (hC : 0≤C) : + 0≤relativeCauchyConstant C E Z := by unfold relativeCauchyConstant; positivity + +lemma relative_density_near_sqrt {C I p ν r φ : ℝ} + (hC : 0≤C) (hI : 0≤I) (hp : 0≤p) (_hν : 0≤ν) (hr : 0≤r) (hφ : 0≤φ) : + Real.sqrt ((128*C*p^3*ν^2)^2*(576*I*r*φ^2)) = + 3072*C*p^3*ν^2*Real.sqrt I*Real.sqrt r*φ := by + rw [Real.sqrt_mul (sq_nonneg _),Real.sqrt_sq (by positivity), + show 576*I*r*φ^2=576*((I*r)*φ^2) by ring, + Real.sqrt_mul (by norm_num : (0:ℝ)≤576),Real.sqrt_mul (mul_nonneg hI hr), + Real.sqrt_mul hI,Real.sqrt_sq hφ] + norm_num + ring + +lemma relative_density_far_sqrt {C E p ν R r φ κ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + max 1 T*cappedRepresentative (k 3) ≤ I → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r)+ + Kb*min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + have hn := hsource s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + have hp : 0

min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := dyadic_sqrt_radius_balance ha hb hH + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ = ∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by + apply tsum_congr + intro n + rw [he] + _ ≤ ∑'k : ℤ,ENNReal.ofReal (K*g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (K*g k)) + _ = ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _ ≤ _ := by + apply ENNReal.ofReal_le_ofReal + simpa only [g,mul_assoc] using mul_le_mul_of_nonneg_left hg.2 hK + +lemma Admissible.direct_source_relative_short_radial_sum {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (Kg*D*Real.sqrt + ((I*p^2*ν^2*φ^2/θ^2)*(Real.sqrt I*R*ν*Real.sqrt κ/θ^2))+ + Kb*D*Real.sqrt ((I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt κ/φ))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_short_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*R*ν*Real.sqrt κ/θ^2 + let ab := I*p^2*ν^2*φ + let bb := Real.sqrt I*R*ν*Real.sqrt κ/φ + let D := dyadicBalanceConstant (1/2) (1/2) + have hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w≤P → + sourceRepresentative np≤128*P → + cappedRepresentative nφ≤16*cappedRepresentative nθ → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤(w/P)^2 then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((16*Kg+Kb)*dyadicBalanceConstant (1/2) (1/2)* + Real.sqrt (32768*17*(1+16384*(M+Real.sqrt A))*w^2*Real.sqrt (Real.log (2+P)))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_short_radial_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP hφθ hpσ hwσ HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w σ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let D := dyadicBalanceConstant (1/2) (1/2) + let U := 32768*17*(1+16384*(M+Real.sqrt A))*w^2*Real.sqrt L + have hp : 0

dsimp [I,R,ν,len,lam,U,L] <;> ring + have hb'' : (I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt (1+φ/σ)/φ)≤U := by + convert hb' using 1 + · dsimp [I,R,ν,len,lam] + field_simp [hφ.ne'] + · dsimp [U,L] + ring + have hKg : 0≤Kg := relativeCauchyConstant_nonneg hCg + have hKb : 0≤Kb := relativeCauchyConstant_nonneg hCb + have hD : 0≤D := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hr : Real.sqrt (256*U)=16*Real.sqrt U := by rw [Real.sqrt_mul (by norm_num : (0:ℝ)≤256)]; norm_num + apply hn.trans + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ Kg*D*Real.sqrt (256*U)+Kb*D*Real.sqrt U := + add_le_add (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hg') (mul_nonneg hKg hD)) + (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hb'') (mul_nonneg hKb hD)) + _ = _ := by rw [hr]; dsimp [Kg,Kb,D,U,E,L]; ring + +lemma Admissible.direct_source_large_radius_budget {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + I ≤ max 1 T*cappedRepresentative (k 3) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let Og := ENNReal.ofReal (491520*E/(p*r*φ^2)) + let Ob := ENNReal.ofReal (491520*I*E/(r^2*θ^2)) + let H := ENNReal.ofReal (576*I*r*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (10240*φ/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)*(min (Dg^2*H) (Dg*Og))^(1/2:ℝ))+ + ENNReal.ofReal (10240/p)* + ((ENNReal.ofReal (120*r*E))^(1/2:ℝ)*(min (Db^2*H) (Db*Ob))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + + have hmag' : ENNReal.ofReal (40*(I+2*r)*E)≤ENNReal.ofReal (120*r*E) := by + apply ENNReal.ofReal_le_ofReal + have hIr' : I≤r := hIr + nlinarith only [mul_nonneg (sub_nonneg.mpr hIr') hE] + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + dsimp only at hn + rw [heG,heB] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) (mul_le_mul' le_rfl hgO) + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow (hmag.trans hmag') (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) (mul_le_mul' le_rfl hbO) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma relative_radius_cauchy_near {C E Z I p ν r φ γ : ℝ} + (hC : 0≤C) (hZ : 0≤Z) (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + max 1 T*cappedRepresentative (k 3)≤I → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let ν := min θ σ + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal ((Kg*(I*p^2*ν^2*φ^2/θ^2)+Kb*(I*p^2*ν^2*φ))*Real.sqrt r) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hrI + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + + have hmag' : ENNReal.ofReal (40*(I+2*r)*E)≤ENNReal.ofReal (120*I*E) := by + apply ENNReal.ofReal_le_ofReal + have hrI' : r≤I := hrI + nlinarith only [mul_nonneg (sub_nonneg.mpr hrI') hE] + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + dsimp only at hn + rw [heG,heB] at hn + have hnear := hn.trans (add_le_add + (mul_le_mul' le_rfl (mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + (ENNReal.rpow_le_rpow ((min_le_left _ _).trans (mul_le_mul' le_rfl hvolume)) (by norm_num)))) + (mul_le_mul' le_rfl (mul_le_mul' (ENNReal.rpow_le_rpow (hmag.trans hmag') (by norm_num)) + (ENNReal.rpow_le_rpow ((min_le_left _ _).trans (mul_le_mul' le_rfl hvolume)) (by norm_num))))) + let ν := min θ σ + have hν : 0≤ν := (lt_min hθ hσ).le + have hg := relative_radius_cauchy_near (E:=E) hCg (show 0≤20*E by positivity) + hI hp hν hr.le hφ.le (show 0≤φ/θ^2 by positivity) + have hm := relative_radius_cauchy_near (E:=E) hCb (show 0≤120*E by positivity) + hI hp hν hr.le hφ.le (show 0≤(1:ℝ) by norm_num) + have heγ : 10240*(φ/θ^2)/p=10240*φ/(p*θ^2) := by ring + have hea : I*p^2*ν^2*φ*(φ/θ^2)=I*p^2*ν^2*φ^2/θ^2 := by ring + rw [heγ,hea,show (20*E)*I=20*I*E by ring] at hg + simp only [mul_one] at hm + rw [show (120*E)*I=120*I*E by ring] at hm + have hG0 : 0≤relativeCauchyConstant Cg E (20*E)*(I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r := + mul_nonneg (mul_nonneg (relativeCauchyConstant_nonneg hCg) (by positivity)) (Real.sqrt_nonneg _) + have hB0 : 0≤relativeCauchyConstant Cb E (120*E)*(I*p^2*ν^2*φ)*Real.sqrt r := + mul_nonneg (mul_nonneg (relativeCauchyConstant_nonneg hCb) (by positivity)) (Real.sqrt_nonneg _) + apply hnear.trans + calc + _ ≤ ENNReal.ofReal (relativeCauchyConstant Cg E (20*E)*(I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r)+ + ENNReal.ofReal (relativeCauchyConstant Cb E (120*E)*(I*p^2*ν^2*φ)*Real.sqrt r) := add_le_add hg hm + _ = _ := by rw [←ENNReal.ofReal_add hG0 hB0]; congr 1; ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabEquations.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabEquations.lean new file mode 100644 index 0000000000000000000000000000000000000000..5eea2109853fb9cbc88bfbf3d64cd85bb1c3bb3e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabEquations.lean @@ -0,0 +1,217 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.ParticleC1 +import OAI.Analysis.VlasovMaxwell.Regularity.SlabL2 + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def SlabEquations (s : Solution) (T : ℝ) : Prop := ∀ t∈Icc 0 T, + (∀ x v, + derivWithin (fun t' => s.f (t', x, v)) (Icc 0 T) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => s.f (t, y, v)) x i) + + (∑ i : Fin 3, (s.E (t, x) + cross (velocity v) (s.B (t, x))) i * + spatialPartial (fun v' => s.f (t, x, v')) v i) = 0) ∧ + (∀ x, derivWithin (fun t' => s.E (t', x)) (Icc 0 T) t - + curl (fun y => s.B (t, y)) x = -current (fun z => s.f (t, z)) x) ∧ + (∀ x, derivWithin (fun t' => s.B (t', x)) (Icc 0 T) t + + curl (fun y => s.E (t, y)) x = 0) ∧ + (∀ x, divergence (fun y => s.E (t, y)) x = rho (fun z => s.f (t, z)) x) ∧ + (∀ x, divergence (fun y => s.B (t, y)) x = 0) + +lemma derivWithin_slab_assemble {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × U → W} {a : W} {A : U →L[ℝ] W} {t T : ℝ} {x : U} + (hT : 0 F (r,x)) (Icc 0 T) t=a := by + have hh := hd.comp_hasDerivWithinAt t + (((hasDerivAt_id t).prodMk (hasDerivAt_const t x)).hasDerivWithinAt (s:=Icc 0 T)) + (fun r hr => hr) + have he : assembleDerivative a A (1,0)=a := by simp [assembleDerivative] + simpa only [Function.comp_def,id_eq,he] using hh.derivWithin (uniqueDiffOn_Icc hT t ht) + +lemma slab_equations_of_derivatives {s : Solution} {T : ℝ} (hT : 0 s.f (p.1,z)) p.2) (XE p)) (fieldSlab T) p) + (hB : ∀ p : ℝ × Vec, p.1∈Icc 0 T → HasFDerivWithinAt s.B + (assembleDerivative (-curlMap (XE p)) (XB p)) (fieldSlab T) p) + (hZ : ∀ t∈Icc 0 T, ∀ z, HasFDerivAt (fun w => s.f (t,w)) (Z (t,z)) z) + (hXE : ∀ t∈Icc 0 T, ∀ x, HasFDerivAt (fun y => s.E (t,y)) (XE (t,x)) x) + (hXB : ∀ t∈Icc 0 T, ∀ x, HasFDerivAt (fun y => s.B (t,y)) (XB (t,x)) x) + (hGauss : ∀ p : ℝ × Vec, p.1∈Icc 0 T → divMap (XE p)=rho (fun z => s.f (p.1,z)) p.2 ∧ divMap (XB p)=0) : + SlabEquations s T := by + intro t ht + have hsE : Differentiable ℝ (fun y => s.E (t,y)) := fun x => (hXE t ht x).differentiableAt + have hsB : Differentiable ℝ (fun y => s.B (t,y)) := fun x => (hXB t ht x).differentiableAt + refine ⟨?_,?_,?_,?_,?_⟩ + · intro x v + rw [derivWithin_slab_assemble hT ht (hf (t,x,v) ht)] + simp only [spatialPartial] + rw [← clm_sum_basis,← clm_sum_basis] + rw [add_assoc,fderiv_phase_split (hZ t ht (x,v)).differentiableAt,(hZ t ht (x,v)).fderiv] + exact neg_add_cancel _ + · intro x + rw [derivWithin_slab_assemble hT ht (hE (t,x) ht),curl_eq_curlMap hsB,(hXB t ht x).fderiv] + abel + · intro x + rw [derivWithin_slab_assemble hT ht (hB (t,x) ht),curl_eq_curlMap hsE,(hXE t ht x).fderiv] + exact neg_add_cancel _ + · intro x + rw [divergence_eq_divMap hsE,(hXE t ht x).fderiv] + exact (hGauss (t,x) ht).1 + · intro x + rw [divergence_eq_divMap hsB,(hXB t ht x).fderiv] + exact (hGauss (t,x) ht).2 + +lemma local_c1_limit_of_picard {d : Datum} {S : ℕ → Solution} {s : Solution} + {T A R P H Hf M L : ℝ} (hT : 0 (S (n+1)).f) s.f atTop (particleSlab T)) + (hEl : TendstoUniformlyOn (fun n => (S n).E) s.E atTop (fieldSlab T)) + (hBl : TendstoUniformlyOn (fun n => (S n).B) s.B atTop (fieldSlab T)) : + ContDiffOn ℝ 1 s.f (particleSlab T) ∧ ContDiffOn ℝ 1 s.E (fieldSlab T) ∧ + ContDiffOn ℝ 1 s.B (fieldSlab T) ∧ SlabEquations s T := by + have hEl' := hEl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1) + have hBl' := hBl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1) + obtain ⟨XE,XB,hXE,hXB,hs,hDE,hDB,hGauss⟩ := picard_field_full_derivative_limit hT hH hr + (fun n => hc (n+1)) hb hbf hfc hfl hEl' hBl' + obtain ⟨Z,hZ,hsZ,hDf⟩ := picard_particle_full_derivative_limit hHf hM hL hr htransport hcf hlip hlb hfl hEl hBl + obtain ⟨hfC,hdf⟩ := c1_slab_uniform_derivative hT (fun n => (hr n).smooth_f) hfl hDf + obtain ⟨hEC,hdE⟩ := c1_slab_uniform_derivative hT (fun n => (hr n).smooth_E) hEl' hDE + obtain ⟨hBC,hdB⟩ := c1_slab_uniform_derivative hT (fun n => (hr n).smooth_B) hBl' hDB + exact ⟨hfC,hEC,hBC,slab_equations_of_derivatives hT hdf hdE hdB hsZ + (fun t ht x => (hs t ht x).1) (fun t ht x => (hs t ht x).2) hGauss⟩ + +theorem exists_local_c1_core (d : Datum) (hd : Admissible d) : + ∃ T A R P L N M : ℝ, 0 (S (n+1)).f) s.f atTop (particleSlab T) ∧ + TendstoUniformlyOn (fun n => (S n).E) s.E atTop (fieldSlab T) ∧ + TendstoUniformlyOn (fun n => (S n).B) s.B atTop (fieldSlab T) := by + obtain ⟨T₀,A,R,P,L,N,M,hT₀,hT₀1,hA,hR,hP,hL,hN,hM,S,E,B,hS0,hsm,hc,hr,hg,hEl,hBl,hEc,hBc,hcLim⟩ := + exists_picard_field_limit hd + obtain ⟨T,Hf,H,hT,hTT,hHf,hH,hcurv,hcurvf⟩ := uniform_picard_sequence_curvature hd hT₀ hT₀1 hL.le hN.le hM hS0 hsm hc hr + obtain ⟨f,hfl,hfc,hfn,hfi,hfb,hfLip⟩ := picard_particle_limit hd hT₀.le hL.le hN.le hsm hc hr hg + have hsub : Icc (0:ℝ) T ⊆ Icc 0 T₀ := Icc_subset_Icc_right hTT + have hr' (n : ℕ) : PicardRegular d (S (n+1)) ∧ TransportFor (S (n+1)) (S n).E (S n).B ∧ + LocalParticleBound T A R P (S (n+1)).f ∧ PhaseParticleLip T M (S (n+1)).f := + ⟨(hr n).1,(hr n).2.1,fun t ht => (hr n).2.2.1 t (hsub ht),fun t ht => (hr n).2.2.2 t (hsub ht)⟩ + have hElT : TendstoUniformlyOn (fun n => (S n).E) E atTop (fieldSlab T) := hEl.mono (fun p hp => hsub hp) + have hBlT : TendstoUniformlyOn (fun n => (S n).B) B atTop (fieldSlab T) := hBl.mono (fun p hp => hsub hp) + have hflT : TendstoUniformlyOn (fun n => (S (n+1)).f) f atTop (particleSlab T) := hfl.mono (fun p hp => hsub hp) + have hcT : FieldControl T L N E B := ⟨fun t ht => hcLim.1 t (hsub ht),fun t ht => hcLim.2 t (hsub ht)⟩ + have hfbT : LocalParticleBound T A R P f := fun t ht => hfb t (hsub ht) + obtain ⟨hfC,hEC,hBC,heq⟩ := local_c1_limit_of_picard (s:=⟨f,E,B⟩) hT hH hHf hM hL.le + (fun n => (hr n).1) (fun n => (hr n).2.1) hcurv hcurvf (fun n => (hr' n).2.2.1) + (fun n => (hr' n).2.2.2) hcT.1 hfbT (hfc.mono (fun p hp => hsub hp)) hflT hElT hBlT + refine ⟨T,A,R,P,L,N,M,hT,hTT.trans hT₀1,hA,hR,hP,hL,hN,hM,S,⟨f,E,B⟩,hsm,hr',hfC,hEC,hBC,heq, + (fun t ht => hfn t (hsub ht)),hfbT,hcT,(fun t ht => hfLip t (hsub ht)),hfi,?_,?_,hflT,hElT,hBlT⟩ + · intro x + have hh := (hElT.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_E] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + · intro x + have hh := (hBlT.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_B] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +structure C1ClassicalPrefix (d : Datum) (s : Solution) (T : ℝ) : Prop where + f_c1 : ContDiffOn ℝ 1 s.f (particleSlab T) + E_c1 : ContDiffOn ℝ 1 s.E (fieldSlab T) + B_c1 : ContDiffOn ℝ 1 s.B (fieldSlab T) + nonnegative : ∀ t∈Icc 0 T, ∀ z, 0 ≤ s.f (t,z) + E_L2 : SlabTimeContinuousL2 T s.E + B_L2 : SlabTimeContinuousL2 T s.B + compact : ∃ K : Set Phase, IsCompact K ∧ ∀ t∈Icc 0 T, tsupport (fun z => s.f (t,z)) ⊆ K + equations : EquationsBefore s T + initial_f : ∀ z, s.f (0,z)=d.f₀ z + initial_E : ∀ x, s.E (0,x)=d.E₀ x + initial_B : ∀ x, s.B (0,x)=d.B₀ x + +lemma derivWithin_Ici_eq_Icc_of_lt {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (f : ℝ → W) {t T : ℝ} (ht : t ⟨h,hr.le⟩,fun h => h.1⟩ + +lemma SlabEquations.equationsBefore {s : Solution} {T : ℝ} (h : SlabEquations s T) : + EquationsBefore s T := by + intro t ht htT + simpa only [derivWithin_Ici_eq_Icc_of_lt _ htT] using h t ⟨ht,htT.le⟩ + +lemma LocalParticleBound.compact {T A R P : ℝ} {f : Particle} (h : LocalParticleBound T A R P f) : + ∃ K : Set Phase, IsCompact K ∧ ∀ t∈Icc 0 T, tsupport (fun z => f (t,z)) ⊆ K := by + refine ⟨closedBall (0:Vec) R ×ˢ closedBall (0:Vec) P, + (isCompact_closedBall _ _).prod (isCompact_closedBall _ _),?_⟩ + intro t ht + apply closure_minimal + · intro z hz + exact ⟨by simpa only [mem_closedBall,dist_zero_right] using ((h t ht z.1 z.2).2 hz).1, + by simpa only [mem_closedBall,dist_zero_right] using ((h t ht z.1 z.2).2 hz).2⟩ + · exact isClosed_closedBall.prod isClosed_closedBall + +theorem exists_local_classical_prefix (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 (hr n).1) (fun n => (hr n).2.1) (fun n => (hr n).2.2.1) hEl hBl + exact ⟨T,hT,s,⟨hfC,hEC,hBC,hn,hELBL.1,hELBL.2,hb.compact,heq.equationsBefore,hfi,hEi,hBi⟩,heq⟩ + +lemma C1ClassicalPrefix.energyPrefix {d : Datum} {s : Solution} {H : ℝ} + (hs : C1ClassicalPrefix d s H) : EnergyPrefix s H := by + refine ⟨hs.f_c1.mono (fun _ hp => hp.1),hs.E_c1.mono (fun _ hp => hp.1), + hs.B_c1.mono (fun _ hp => hp.1),hs.nonnegative,hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro t ht x v + have hh := (hs.equations t ht.1.le ht.2).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro t ht x + have he := (hs.equations t ht.1.le ht.2).2.1 x + have hb := (hs.equations t ht.1.le ht.2).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabRHS.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabRHS.lean new file mode 100644 index 0000000000000000000000000000000000000000..71efdb549a883a9be1acbf9886cb5078e683ad7b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SlabRHS.lean @@ -0,0 +1,94 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def crossBilinearCLM : Vec →L[ℝ] Vec →L[ℝ] Vec := + ({ toFun := crossCLM + map_add' := by + intro a b; ext c i; fin_cases i <;> simp [crossCLM,cross] <;> ring + map_smul' := by + intro r a; ext b i; fin_cases i <;> simp [crossCLM,cross] <;> ring } : + Vec →ₗ[ℝ] Vec →L[ℝ] Vec).toContinuousLinearMap + +lemma spatialJetRegular_lorentz {n : ℕ∞} {J : Set ℝ} {E B : Field} + (hE : SpatialJetRegular n J E) (hB : SpatialJetRegular n J B) : + SpatialJetRegular n J (lorentzField E B) := by + have hv : SpatialJetRegular n J (fun p : ℝ × Phase => velocity p.2.2) := + spatialJetRegular_fixed (contDiff_velocity.comp contDiff_snd) + have he := hE.precomp (ContinuousLinearMap.fst ℝ Vec Vec) + have hb := hB.precomp (ContinuousLinearMap.fst ℝ Vec Vec) + exact hv.prodMk (he.add (hv.bilinear hb crossBilinearCLM)) + +def slabParticleRHS (s : Solution) (p : ℝ × Phase) : ℝ := + -(fderiv ℝ (fun z => s.f (p.1,z)) p.2) (lorentzField s.E s.B p) +def slabElectricRHS (s : Solution) (p : ℝ × Vec) : Vec := + curlMap (fderiv ℝ (fun x => s.B (p.1,x)) p.2) - current (fun z => s.f (p.1,z)) p.2 +def slabMagneticRHS (s : Solution) (p : ℝ × Vec) : Vec := + -curlMap (fderiv ℝ (fun x => s.E (p.1,x)) p.2) + +lemma slabParticleRHS_regular {n : ℕ∞} {J : Set ℝ} {s : Solution} + (hf : SpatialJetRegular n J s.f) (hE : SpatialJetRegular n J s.E) (hB : SpatialJetRegular n J s.B) : + SpatialJetRegular n J (slabParticleRHS s) := + (hf.deriv.clm_apply (spatialJetRegular_lorentz hE hB)).neg + +lemma slabMagneticRHS_regular {n : ℕ∞} {J : Set ℝ} {s : Solution} + (hE : SpatialJetRegular n J s.E) : SpatialJetRegular n J (slabMagneticRHS s) := + (hE.deriv.clm curlMap).neg + +lemma compact_particle_velocity_bound {T : ℝ} {s : Solution} + (hc : ∃ K : Set Phase, IsCompact K ∧ ∀ t∈Icc 0 T, tsupport (fun z => s.f (t,z)) ⊆ K) : + ∃ P : ℝ, 0

s.f (t,z)) ⊆ K) : + SpatialJetRegular n (Icc 0 T) (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2) := by + obtain ⟨P,hP,hzero⟩ := compact_particle_velocity_bound hc + let K := closedBall (0:Vec) P + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure K) := ⟨by + rw [Measure.Subtype.volume_univ isClosed_closedBall.measurableSet.nullMeasurableSet] + exact (isCompact_closedBall (0:Vec) P).measure_lt_top⟩ + have hv : SpatialJetRegular n (Icc 0 T) (fun p : ℝ × Phase => velocity p.2.2) := + spatialJetRegular_fixed (contDiff_velocity.comp contDiff_snd) + have hG := hf.bilinear hv (ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] Vec →L[ℝ] Vec) + have hi := hG.integral_compact (μ:=(volume : Measure K)) continuous_subtype_val hT n + apply hi.congr + intro p hp + change current (fun z => s.f (p.1,z)) p.2=∫ a : K, s.f (p.1,p.2,(a:Vec)) • velocity a + rw [integral_subtype (show MeasurableSet K from isClosed_closedBall.measurableSet) + (f:=fun v : Vec => s.f (p.1,p.2,v) • velocity v)] + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + have hv' : P<‖v‖ := by simpa only [K,mem_closedBall,dist_zero_right,not_le] using hv + simp only [hzero p.1 hp p.2 v hv',zero_smul] + +lemma slabElectricRHS_regular {T : ℝ} (hT : 0 s.f (t,z)) ⊆ K) : + SpatialJetRegular n (Icc 0 T) (slabElectricRHS s) := + (hB.deriv.clm curlMap).sub (spatialJetRegular_current hT n hf hc) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SmoothLocalExistence.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SmoothLocalExistence.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ec94c0b90afc63209868629616db9b104b6d7b2 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/SmoothLocalExistence.lean @@ -0,0 +1,29 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SlabEvolutionRegularity + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma C1ClassicalPrefix.toSmooth {d : Datum} {s : Solution} {T : ℝ} + (hs : C1ClassicalPrefix d s T) + (hf : ContDiffOn ℝ ∞ s.f (particleSlab T)) + (hE : ContDiffOn ℝ ∞ s.E (fieldSlab T)) (hB : ContDiffOn ℝ ∞ s.B (fieldSlab T)) : + SmoothClassicalPrefix d s T := + ⟨hf,hE,hB,hs.nonnegative,hs.E_L2,hs.B_L2,hs.compact,hs.equations, + hs.initial_f,hs.initial_E,hs.initial_B⟩ + +theorem exists_local_smooth_prefix (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 F (t,y)) x‖≤C + +lemma boundedSpatiallySmoothSlab_of_uniform_jets {U W : Type} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℕ → ℝ × U → W} {f : ℝ × U → W} {T : ℝ} + (hF : ∀ n, ContDiff ℝ ∞ (F n)) + (hb : ∀ k : ℕ, ∃ C : ℝ, 0≤C ∧ ∀ n t, t∈Icc (0:ℝ) T → ∀ x, + ‖iteratedFDeriv ℝ k (fun y => F n (t,y)) x‖≤C) + (hl : TendstoUniformlyOn F f atTop {p | p.1∈Icc (0:ℝ) T}) : + BoundedSpatiallySmoothSlab T f := by + refine ⟨spatiallySmoothSlab_of_uniform_jets hF hb hl,?_⟩ + intro k + obtain ⟨C,hC,hCb⟩ := hb k + refine ⟨C,hC,?_⟩ + intro t ht x + have hj := (smooth_spatial_limit_nat k hF hb hl).2.2.tendsto_at (x:=(t,x)) ht + exact le_of_tendsto hj.norm (Eventually.of_forall fun n => hCb n t ht x) + +theorem exists_local_spatially_smooth_bounded_classical (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 (hQEB n t ht x 2 le_rfl).1), + curvature_of_second_derivative_bound ((hsm n).2.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (fun x => (hQEB n t ht x 2 le_rfl).2)⟩ + have hcurvf : ∀ n, PhaseParticleCurvature T (2*Q) (S (n+1)).f := by + intro n t ht + exact curvature_of_second_derivative_bound ((hr n).1.smooth_f.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (hQf n t ht 2 le_rfl) + obtain ⟨f,hfl,hfc,hfn,hfi,hfb,hfLip⟩ := picard_particle_limit hd hT.le hL.le hN.le hsm hc hr hg + obtain ⟨hfC,hEC,hBC,heq⟩ := local_c1_limit_of_picard (s:=⟨f,E,B⟩) hT (by positivity) (by positivity) hM hL.le + (fun n => (hr n).1) (fun n => (hr n).2.1) hcurv hcurvf (fun n => (hr n).2.2.1) + (fun n => (hr n).2.2.2) hcLim.1 hfb hfc hfl hEl hBl + have hEi (x : Vec) : E (0,x)=d.E₀ x := by + have hh := (hEl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_E] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hBi (x : Vec) : B (0,x)=d.B₀ x := by + have hh := (hBl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_B] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hL2 := picard_limit_slab_l2 hT.le hEC.continuousOn hBC.continuousOn hsm + (fun n => (hr n).1) (fun n => (hr n).2.1) (fun n => (hr n).2.2.1) hEl hBl + refine ⟨T,hT,⟨f,E,B⟩,⟨hfC,hEC,hBC,hfn,hL2.1,hL2.2,hfb.compact,heq.equationsBefore,hfi,hEi,hBi⟩, + heq,?_,?_,?_⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hr n).1.smooth_f) _ hfl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht z => hQf n t ht k (by omega) z⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).1) _ hEl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).1⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).2) _ hBl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).2⟩ + +theorem exists_local_smooth_bounded_prefix (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 function (value,point)) (Icc 0 T) time := by + exact (hfunction.differentiableOn (by norm_num) (time,point) hwithin).comp time + ((differentiableAt_id.prodMk (differentiableAt_const point)).differentiableWithinAt) + (fun value hvalue => hvalue) + have hparticle (time : ℝ) (hwithin : time∈Icc 0 T) (point : Phase) : + HasDerivWithinAt (fun value => s.f (value,point)) (slabParticleRHS s (time,point)) + (Icc 0 T) time := by + have hequation := (heq time hwithin).1 point.1 point.2 + have hspatial := (hf.1.1 time hwithin).differentiable (by simp) point + simp only [spatialPartial] at hequation + rw [← clm_sum_basis,← clm_sum_basis,add_assoc,fderiv_phase_split hspatial] at hequation + have hderivative := (htime hs.f_c1 hwithin point).hasDerivWithinAt + have hvalue : derivWithin (fun value => s.f (value,point)) (Icc 0 T) time = + slabParticleRHS s (time,point) := by + change derivWithin (fun value => s.f (value,point)) (Icc 0 T) time = + -(fderiv ℝ (fun position => s.f (time,position)) point) (lorentzField s.E s.B (time,point)) + exact eq_neg_of_add_eq_zero_left hequation + rwa [hvalue] at hderivative + have helectric (time : ℝ) (hwithin : time∈Icc 0 T) (point : Vec) : + HasDerivWithinAt (fun value => s.E (value,point)) (slabElectricRHS s (time,point)) + (Icc 0 T) time := by + have hequation := (heq time hwithin).2.1 point + rw [curl_eq_curlMap ((hB.1.1 time hwithin).differentiable (by simp))] at hequation + have hderivative := (htime hs.E_c1 hwithin point).hasDerivWithinAt + have hvalue : derivWithin (fun value => s.E (value,point)) (Icc 0 T) time = + slabElectricRHS s (time,point) := by + change _ = curlMap (fderiv ℝ (fun position => s.B (time,position)) point) - + current (fun position => s.f (time,position)) point + rw [sub_eq_iff_eq_add] at hequation + rw [hequation]; abel + rwa [hvalue] at hderivative + have hmagnetic (time : ℝ) (hwithin : time∈Icc 0 T) (point : Vec) : + HasDerivWithinAt (fun value => s.B (value,point)) (slabMagneticRHS s (time,point)) + (Icc 0 T) time := by + have hequation := (heq time hwithin).2.2.1 point + rw [curl_eq_curlMap ((hE.1.1 time hwithin).differentiable (by simp))] at hequation + have hderivative := (htime hs.B_c1 hwithin point).hasDerivWithinAt + have hvalue : derivWithin (fun value => s.B (value,point)) (Icc 0 T) time = + slabMagneticRHS s (time,point) := eq_neg_of_add_eq_zero_left hequation + rwa [hvalue] at hderivative + have hregular (order : ℕ) : SpatialJetRegular order (Icc 0 T) s.f ∧ + SpatialJetRegular order (Icc 0 T) s.E ∧ SpatialJetRegular order (Icc 0 T) s.B := by + induction order with + | zero => exact ⟨hf.1.spatialJetRegular,hE.1.spatialJetRegular,hB.1.spatialJetRegular⟩ + | succ order hinduction => + exact ⟨spatialJetRegular_succ hT order hinduction.1 + (slabParticleRHS_regular hinduction.1 hinduction.2.1 hinduction.2.2) hparticle, + spatialJetRegular_succ hT order hinduction.2.1 + (slabElectricRHS_regular hT order hinduction.1 hinduction.2.2 hs.compact) helectric, + spatialJetRegular_succ hT order hinduction.2.2 + (slabMagneticRHS_regular hinduction.2.1) hmagnetic⟩ + have hfs : ContDiffOn ℝ ∞ s.f (particleSlab T) := by + rw [contDiffOn_infty] + exact fun order => (hregular order).1.regular + have hEs : ContDiffOn ℝ ∞ s.E (fieldSlab T) := by + rw [contDiffOn_infty] + exact fun order => (hregular order).2.1.regular + have hBs : ContDiffOn ℝ ∞ s.B (fieldSlab T) := by + rw [contDiffOn_infty] + exact fun order => (hregular order).2.2.regular + exact ⟨T,hT,s,⟨hfs,hEs,hBs,hs.nonnegative,hs.E_L2,hs.B_L2,hs.compact, + hs.equations,hs.initial_f,hs.initial_E,hs.initial_B⟩,heq,hf,hE,hB⟩ + +def timeSliceDatum (s : Solution) (t : ℝ) : Datum := + ⟨fun z => s.f (t,z),fun x => s.E (t,x),fun x => s.B (t,x)⟩ + +lemma SmoothClassicalPrefix.slice_admissible {d : Datum} {s : Solution} {T t : ℝ} + (hs : SmoothClassicalPrefix d s T) (heq : SlabEquations s T) + (hE : BoundedSpatiallySmoothSlab T s.E) (hB : BoundedSpatiallySmoothSlab T s.B) + (ht : t∈Icc 0 T) : Admissible (timeSliceDatum s t) := by + have hf : ContDiff ℝ ∞ (fun z => s.f (t,z)) := + hs.f_smooth.comp_contDiff (contDiff_const.prodMk contDiff_id) (fun z => ht) + obtain ⟨K,hK,hk⟩ := hs.compact + have hfc : HasCompactSupport (fun z => s.f (t,z)) := + hK.of_isClosed_subset (isClosed_tsupport _) (hk t ht) + have hEb : BoundedSmooth (fun x => s.E (t,x)) := + ⟨hE.1.1 t ht,fun k => by obtain ⟨C,hC,hCb⟩ := hE.2 k; exact ⟨C,hCb t ht⟩⟩ + have hBb : BoundedSmooth (fun x => s.B (t,x)) := + ⟨hB.1.1 t ht,fun k => by obtain ⟨C,hC,hCb⟩ := hB.2 k; exact ⟨C,hCb t ht⟩⟩ + obtain ⟨EF,hEc,hEe⟩ := hs.E_L2 + obtain ⟨BF,hBc,hBe⟩ := hs.B_L2 + exact ⟨hf,hfc,hs.nonnegative t ht,hEb,hBb, + (Lp.memLp (EF t)).ae_eq (hEe t ht), (Lp.memLp (BF t)).ae_eq (hBe t ht), + (heq t ht).2.2.2.1,(heq t ht).2.2.2.2⟩ + +structure DatumRestartControl (d : Datum) (A R P D D₁ A₁ : ℝ) : Prop where + particle : ∀ z, |d.f₀ z|≤A + support : ∀ z : Phase, d.f₀ z≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P + fields : ∀ x, ‖d.E₀ x‖≤D ∧ ‖d.B₀ x‖≤D + boundary : ∀ t∈Ioc (0:ℝ) 1, ∀ x, + ‖electricBoundaryField (datumBoundarySolution d) t x‖≤D ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t x‖≤D + fields_lip : ∀ x y, ‖d.E₀ y-d.E₀ x‖≤D₁*‖y-x‖ ∧ ‖d.B₀ y-d.B₀ x‖≤D₁*‖y-x‖ + boundary_lip : ∀ t∈Ioc (0:ℝ) 1, ∀ x y, + ‖electricBoundaryField (datumBoundarySolution d) t y-electricBoundaryField (datumBoundarySolution d) t x‖≤D₁*‖y-x‖ ∧ + ‖magneticBoundaryField (datumBoundarySolution d) t y-magneticBoundaryField (datumBoundarySolution d) t x‖≤D₁*‖y-x‖ + particle_lip : ∀ z w : Phase, |d.f₀ z-d.f₀ w|≤A₁*‖z-w‖ + +theorem family_global_picard_invariance {ι : Type*} {d : ι → Datum} (_ : ∀ i, Admissible (d i)) + {A R₀ P₀ D D₀ A₁ : ℝ} (hA : 0≤A) (hR₀ : 0≤R₀) (hP₀ : 0≤P₀) + (hD : 0≤D) (_ : 0≤D₀) (_ : 0≤A₁) + (hcaps : ∀ i, DatumRestartControl (d i) A R₀ P₀ D D₀ A₁) : + ∃ T A R P L : ℝ, 0 (d i).E₀ p.2) (fun p : ℝ × Vec => (d i).B₀ p.2) ∧ + ∀ U : ℝ, 0≤U → U≤T → ∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → GlobalFieldBound U L E B → + ∀ s : Solution, PicardRegular (d i) s → TransportFor s E B → + LocalParticleBound U A R P s.f ∧ GlobalFieldBound U L s.E s.B) := by + let R := R₀+1 + let P := P₀+1 + let L := D+1 + have hL : 0 by rw [hs.initial_f]; exact hf₀ z) t z + have hphase : ∀ t∈Icc 0 U, ∀ z : Phase, s.f (t,z)≠0 → ‖z.1‖≤R ∧ ‖z.2‖≤P := by + intro t ht z hz + have hh := F.transported_phase_bound hs.smooth_f hV + (R₀:=R₀) (P₀:=P₀) (T:=U) (L:=L) + (fun z hz => hphase₀ z (by simpa only [hs.initial_f] using hz)) hL.le + (fun r hr x hx => (hEB r hr x).1) + (fun r hr x hx => (hEB r hr x).2) ht z hz + constructor + · dsimp [R] + linarith [hh.1,ht.2] + · dsimp [P] + have hh' : 2*L*t≤2*L*U := mul_le_mul_of_nonneg_left ht.2 (by positivity) + linarith [hh.2] + refine ⟨fun t ht x v => ⟨hf t ht (x,v),hphase t ht (x,v)⟩,?_⟩ + intro t ht x + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + rw [hs.initial_E,hs.initial_B] + exact ⟨(hDEB x).1.trans (by dsimp [L]; linarith), + (hDEB x).2.trans (by dsimp [L]; linarith)⟩ + · have hbd := hboundary t ⟨ht0,ht.2.trans hU1⟩ x + rw [← (hs.boundary_eq ht0 x).1,← (hs.boundary_eq ht0 x).2] at hbd + have hdens := hdensity {s with E:=E,B:=B} U hU1 hf (by + intro r hr y v hv + exact ⟨(hphase r hr (y,v) hv).2,hEB r hr y⟩) t ht x + have hh := mixed_fields_bound hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell ht0 x hbd hdens + have hh' : C*t≤C*U := mul_le_mul_of_nonneg_left ht.2 hC + have hbound : D+C*t≤L := by dsimp [L]; linarith + exact ⟨hh.1.trans hbound,hh.2.trans hbound⟩ + +theorem family_picard_control {ι : Type*} {d : ι → Datum} (hd : ∀ i, Admissible (d i)) + {A R₀ P₀ D D₀ A₁ : ℝ} (hA : 0≤A) (hR₀ : 0≤R₀) (hP₀ : 0≤P₀) + (hD : 0≤D) (hD₀ : 0≤D₀) (hA₁ : 0≤A₁) + (hcaps : ∀ i, DatumRestartControl (d i) A R₀ P₀ D D₀ A₁) : + ∃ T A R P L N M : ℝ, 0 (d i).E₀ p.2) (fun p : ℝ × Vec => (d i).B₀ p.2) ∧ + (∀ (E B : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → FieldControl T L N E B → + ∀ s : Solution, PicardRegular (d i) s → TransportFor s E B → + LocalParticleBound T A R P s.f ∧ PhaseParticleLip T M s.f ∧ FieldControl T L N s.E s.B) ∧ + (∀ (E B E' B' : Field), ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ContDiff ℝ ∞ E' → ContDiff ℝ ∞ B' → FieldControl T L N E B → FieldControl T L N E' B' → + ∀ (s s' : Solution), PicardRegular (d i) s → PicardRegular (d i) s' → + TransportFor s E B → TransportFor s' E' B' → + ∀ D : ℝ, 0≤D → + (∀ t∈Icc 0 T, ∀ x, ‖E (t,x)-E' (t,x)‖≤D ∧ ‖B (t,x)-B' (t,x)‖≤D) → + ∀ t∈Icc 0 T, ∀ x, ‖s.E (t,x)-s'.E (t,x)‖≤D/2 ∧ ‖s.B (t,x)-s'.B (t,x)‖≤D/2) := by + obtain ⟨T₀,A,R,P,L,hT₀,hT₀1,hA,hR,hP,hL,hfamily⟩ := + family_global_picard_invariance hd hA hR₀ hP₀ hD hD₀ hA₁ hcaps + obtain ⟨C,hC,hcomp⟩ := uniform_picard_comparison A P L + let N := D₀+1 + let M := A₁*Real.exp 1 + let K := 1+2*N+L + have hN : 0 (hc.1 r hr x).2) (fun r hr x y => (hc.2 r hr x y).1) + (fun r hr x y => (hc.2 r hr x y).2) ht z z' + exact hh.trans (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (hexp le_rfl) hA₁) (norm_nonneg _)) + refine ⟨?_,?_,?_⟩ + · constructor + · exact fun t ht x => h₀ t ⟨ht.1,ht.2.trans hTT⟩ x + · intro t ht x y + exact ⟨(hDinit x y).1.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _)), + (hDinit x y).2.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _))⟩ + · intro E B hE hB hc s hs hV + have hp := (hbase hE hB hc hs hV).1 + have hf := hflip hE hB hc hs hV + refine ⟨hp,hf,(hbase hE hB hc hs hV).2,?_⟩ + intro t ht x y + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + rw [hs.initial_E,hs.initial_E,hs.initial_B,hs.initial_B] + exact ⟨(hDinit x y).1.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _)), + (hDinit x y).2.trans (mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _))⟩ + · have hh := hcomp (d i) s s E B E B hs hs hE hB hE hB hV hV T hT1 + (fun r hr z v => ⟨(hp r hr z v).1,(hp r hr z v).1⟩) + (by + intro r hr z v hv + have hz : s.f (r,z,v)=0 := by + by_contra hn + exact (not_lt_of_ge ((hp r hr z v).2 hn).2) hv + exact ⟨hz,hz⟩) + hc.1 hc.1 t ⟨ht0,ht.2⟩ y x (D₀*‖y-x‖) (M*‖y-x‖) (N*‖y-x‖) + (hDb t ⟨ht0,ht.2.trans hT1⟩ x y) + (by + intro r hr z v + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,sub_self,norm_zero, + max_eq_left (norm_nonneg _),add_sub_add_right_eq_sub] using hf r hr (y+z,v) (x+z,v)) + (by + intro r hr z + simpa only [add_sub_add_right_eq_sub] using hc.2 r hr (x+z) (y+z)) + have hm : max (M*‖y-x‖) (N*‖y-x‖)≤(M+N)*‖y-x‖ := by + apply max_le <;> nlinarith [norm_nonneg (y-x)] + have hb : D₀*‖y-x‖+C*max (M*‖y-x‖) (N*‖y-x‖)*t≤N*‖y-x‖ := by + calc + _ ≤ D₀*‖y-x‖+C*((M+N)*‖y-x‖)*T := add_le_add le_rfl + (mul_le_mul (mul_le_mul_of_nonneg_left hm hC) ht.2 ht.1 (by positivity)) + _ = (D₀+C*(M+N)*T)*‖y-x‖ := by ring + _ ≤ N*‖y-x‖ := mul_le_mul_of_nonneg_right (by dsimp [N]; linarith) (norm_nonneg _) + exact ⟨hh.1.trans hb,hh.2.trans hb⟩ + · intro E B E' B' hE hB hE' hB' hc hc' s s' hs hs' hV hV' D hD hdiff t ht x + have hp := (hbase hE hB hc hs hV).1 + have hp' := (hbase hE' hB' hc' hs' hV').1 + rcases eq_or_lt_of_le ht.1 with he|ht0 + · subst t + simp only [hs.initial_E,hs'.initial_E,hs.initial_B,hs'.initial_B,sub_self,norm_zero] + exact ⟨by positivity,by positivity⟩ + · have hfd (r : ℝ) (hr : r∈Icc 0 T) (z : Phase) : |s.f (r,z)-s'.f (r,z)|≤2*M*D := by + have hh := transported_comparison hs.smooth_f hs'.smooth_f hE hB hE' hB' hV hV' + hs.initial_f hs'.initial_f hA₁ hL.le hN.le hD hAf' + (fun u hu w => (hc.1 u hu w).2) (fun u hu w w' => (hc.2 u hu w w').1) + (fun u hu w w' => (hc.2 u hu w w').2) + (fun u hu w => (hdiff u hu w).1) (fun u hu w => (hdiff u hu w).2) hr z z + simp only [sub_self,norm_zero,zero_add] at hh + apply hh.trans + calc + A₁*(2*D*r)*Real.exp ((1+2*N+L)*r) = (2*D*r)*(A₁*Real.exp (K*r)) := by ring + _ ≤ (2*D*r)*M := mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left (hexp hr.2) hA₁) (mul_nonneg (mul_nonneg (by norm_num) hD) hr.1) + _ ≤ (2*D*1)*M := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hr.2.trans hT1) (by positivity)) hM + _ = 2*M*D := by ring + have hh := hcomp (d i) s s' E B E' B' hs hs' hE hB hE' hB' hV hV' T hT1 + (fun r hr z v => ⟨(hp r hr z v).1,(hp' r hr z v).1⟩) + (by + intro r hr z v hv + constructor + · by_contra hn + exact (not_lt_of_ge ((hp r hr z v).2 hn).2) hv + · by_contra hn + exact (not_lt_of_ge ((hp' r hr z v).2 hn).2) hv) + hc.1 hc'.1 t ⟨ht0,ht.2⟩ x x 0 (2*M*D) D (by simp) + (fun r hr z v => hfd r hr (x+z,v)) (fun r hr z => hdiff r hr (x+z)) + have hm : max (2*M*D) D≤(2*M+1)*D := by apply max_le <;> nlinarith + have hb : 0+C*max (2*M*D) D*t≤D/2 := by + calc + _ ≤ C*((2*M+1)*D)*T := by + simpa only [zero_add] using mul_le_mul (mul_le_mul_of_nonneg_left hm hC) ht.2 ht.1 (by positivity) + _ = (2*C*(2*M+1)*T)*(D/2) := by ring + _ ≤ 1*(D/2) := mul_le_mul_of_nonneg_right hTC' (by positivity) + _ = D/2 := one_mul _ + exact ⟨hh.1.trans hb,hh.2.trans hb⟩ + +theorem family_contractive_picard_sequence {ι : Type*} {d : ι → Datum} (hd : ∀ i, Admissible (d i)) + {A R₀ P₀ D D₀ A₁ : ℝ} (hA : 0≤A) (hR₀ : 0≤R₀) (hP₀ : 0≤P₀) + (hD : 0≤D) (hD₀ : 0≤D₀) (hA₁ : 0≤A₁) + (hcaps : ∀ i, DatumRestartControl (d i) A R₀ P₀ D D₀ A₁) : + ∃ T A R P L N M : ℝ, 0 step^[n] q₀ + have hrec (n : ℕ) : q (n+1)=step (q n) := Function.iterate_succ_apply' step n q₀ + have hbound (n : ℕ) : FieldControl T L N (q n).1.E (q n).1.B := by + induction n with + | zero => exact h₀ + | succ n ih => + rw [hrec] + exact (hstep _ _ (q n).2.1 (q n).2.2 ih _ (hs (q n)).1 (hs (q n)).2).2.2 + have hreg (n : ℕ) : PicardRegular (d i) (q (n+1)).1 ∧ TransportFor (q (n+1)).1 (q n).1.E (q n).1.B ∧ + LocalParticleBound T A R P (q (n+1)).1.f ∧ PhaseParticleLip T M (q (n+1)).1.f := by + rw [hrec] + exact ⟨(hs (q n)).1,(hs (q n)).2, + (hstep _ _ (q n).2.1 (q n).2.2 (hbound n) _ (hs (q n)).1 (hs (q n)).2).1, + (hstep _ _ (q n).2.1 (q n).2.2 (hbound n) _ (hs (q n)).1 (hs (q n)).2).2.1⟩ + refine ⟨fun n => (q n).1,rfl, + fun n => (q n).2,hbound,hreg,?_⟩ + intro n + induction n with + | zero => + intro t ht x + have h0 := (hbound 0).1 t ht x + have h1 := (hbound 1).1 t ht x + simp only [pow_zero,mul_one] + constructor + · exact (norm_sub_le _ _).trans (by linarith [h0.1,h1.1]) + · exact (norm_sub_le _ _).trans (by linarith [h0.2,h1.2]) + | succ n ih => + have hh := hcontract (q (n+1)).1.E (q (n+1)).1.B (q n).1.E (q n).1.B + (q (n+1)).2.1 (q (n+1)).2.2 (q n).2.1 (q n).2.2 (hbound (n+1)) (hbound n) + (q (n+1+1)).1 (q (n+1)).1 (hreg (n+1)).1 (hreg n).1 (hreg (n+1)).2.1 (hreg n).2.1 + (2*L*(1/2:ℝ)^n) (by positivity) ih + intro t ht x + convert hh t ht x using 1 <;> rw [pow_succ] <;> ring_nf + +theorem family_picard_field_limit {ι : Type*} {d : ι → Datum} (hd : ∀ i, Admissible (d i)) + {A R₀ P₀ D D₀ A₁ : ℝ} (hA : 0≤A) (hR₀ : 0≤R₀) (hP₀ : 0≤P₀) + (hD : 0≤D) (hD₀ : 0≤D₀) (hA₁ : 0≤A₁) + (hcaps : ∀ i, DatumRestartControl (d i) A R₀ P₀ D D₀ A₁) : + ∃ T A R P L N M : ℝ, 0 (S n).E) E atTop {p | p.1∈Icc 0 T} ∧ + TendstoUniformlyOn (fun n => (S n).B) B atTop {p | p.1∈Icc 0 T} ∧ + ContinuousOn E {p | p.1∈Icc 0 T} ∧ ContinuousOn B {p | p.1∈Icc 0 T} ∧ + FieldControl T L N E B := by + obtain ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,hfamily⟩ := + family_contractive_picard_sequence hd hA hR₀ hP₀ hD hD₀ hA₁ hcaps + refine ⟨T,A,R,P,L,N,M,hT,hT1,hA,hR,hP,hL,hN,hM,?_⟩ + intro i + obtain ⟨S,hS0,hsm,hc,hr,hg⟩ := hfamily i + obtain ⟨E,hE⟩ := exists_uniform_limit_geometric (F:=fun n => (S n).E) (C:=2*L) (fun n (p : ℝ × Vec) (hp : p.1∈Icc 0 T) => (hg n p.1 hp p.2).1) + obtain ⟨B,hB⟩ := exists_uniform_limit_geometric (F:=fun n => (S n).B) (C:=2*L) (fun n (p : ℝ × Vec) (hp : p.1∈Icc 0 T) => (hg n p.1 hp p.2).2) + refine ⟨S,E,B,hS0,hsm,hc,hr,hg,hE,hB, + hE.continuousOn (Frequently.of_forall fun n => (hsm n).1.continuous.continuousOn), + hB.continuousOn (Frequently.of_forall fun n => (hsm n).2.continuous.continuousOn),?_,?_⟩ + · intro t ht x + exact ⟨le_of_tendsto (hE.tendsto_at (x:=(t,x)) ht).norm (Eventually.of_forall fun n => (hc n).1 t ht x |>.1), + le_of_tendsto (hB.tendsto_at (x:=(t,x)) ht).norm (Eventually.of_forall fun n => (hc n).1 t ht x |>.2)⟩ + · intro t ht x y + exact ⟨le_of_tendsto ((hE.tendsto_at (x:=(t,y)) ht).sub (hE.tendsto_at (x:=(t,x)) ht)).norm + (Eventually.of_forall fun n => (hc n).2 t ht x y |>.1), + le_of_tendsto ((hB.tendsto_at (x:=(t,y)) ht).sub (hB.tendsto_at (x:=(t,x)) ht)).norm + (Eventually.of_forall fun n => (hc n).2 t ht x y |>.2)⟩ + +theorem family_local_spatially_smooth_bounded_classical {ι : Type*} {d : ι → Datum} (hd : ∀ i, Admissible (d i)) + {A R₀ P₀ D D₀ A₁ : ℝ} (hA : 0≤A) (hR₀ : 0≤R₀) (hP₀ : 0≤P₀) + (hD : 0≤D) (hD₀ : 0≤D₀) (hA₁ : 0≤A₁) + (hcaps : ∀ i, DatumRestartControl (d i) A R₀ P₀ D D₀ A₁) : + ∃ T : ℝ, 0 (hQEB n t ht x 2 le_rfl).1), + curvature_of_second_derivative_bound ((hsm n).2.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (fun x => (hQEB n t ht x 2 le_rfl).2)⟩ + have hcurvf : ∀ n, PhaseParticleCurvature T (2*Q) (S (n+1)).f := by + intro n t ht + exact curvature_of_second_derivative_bound ((hr n).1.smooth_f.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (hQf n t ht 2 le_rfl) + obtain ⟨f,hfl,hfc,hfn,hfi,hfb,hfLip⟩ := picard_particle_limit (hd i) hT.le hL.le hN.le hsm hc hr hg + obtain ⟨hfC,hEC,hBC,heq⟩ := local_c1_limit_of_picard (s:=⟨f,E,B⟩) hT (by positivity) (by positivity) hM hL.le + (fun n => (hr n).1) (fun n => (hr n).2.1) hcurv hcurvf (fun n => (hr n).2.2.1) + (fun n => (hr n).2.2.2) hcLim.1 hfb hfc hfl hEl hBl + have hEi (x : Vec) : E (0,x)=(d i).E₀ x := by + have hh := (hEl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_E] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hBi (x : Vec) : B (0,x)=(d i).B₀ x := by + have hh := (hBl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_B] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hL2 := picard_limit_slab_l2 hT.le hEC.continuousOn hBC.continuousOn hsm + (fun n => (hr n).1) (fun n => (hr n).2.1) (fun n => (hr n).2.2.1) hEl hBl + refine ⟨⟨f,E,B⟩,⟨hfC,hEC,hBC,hfn,hL2.1,hL2.2,hfb.compact,heq.equationsBefore,hfi,hEi,hBi⟩, + heq,?_,?_,?_⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hr n).1.smooth_f) _ hfl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht z => hQf n t ht k (by omega) z⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).1) _ hEl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).1⟩ + · apply boundedSpatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).2) _ hBl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).2⟩ + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def timePaste {U W : Type*} (T : ℝ) (F G : ℝ × U → W) (p : ℝ × U) : W := + if p.1≤T then F p else G (p.1-T,p.2) + +lemma timePaste_left {U W : Type*} (T : ℝ) (F G : ℝ × U → W) {t : ℝ} (ht : t≤T) : + (fun x => timePaste T F G (t,x))=(fun x => F (t,x)) := by + funext x; simp [timePaste,ht] + +lemma timePaste_right {U W : Type*} (T : ℝ) (F G : ℝ × U → W) + (hjoin : ∀ x, F (T,x)=G (0,x)) {t : ℝ} (ht : T≤t) : + (fun x => timePaste T F G (t,x))=(fun x => G (t-T,x)) := by + funext x + by_cases hh : t≤T + · have he : t=T := le_antisymm hh ht + subst t; simp [timePaste,hjoin] + · simp [timePaste,hh] + +lemma continuousOn_timePaste {U W : Type*} [TopologicalSpace U] [TopologicalSpace W] + {T S : ℝ} (_ : 0≤T) (_ : 0≤S) {F G : ℝ × U → W} + (hF : ContinuousOn F {p | p.1∈Icc 0 T}) (hG : ContinuousOn G {p | p.1∈Icc 0 S}) + (hjoin : ∀ x, F (T,x)=G (0,x)) : + ContinuousOn (timePaste T F G) {p | p.1∈Icc 0 (T+S)} := by + let A : Set (ℝ × U) := {p | p.1≤T} + have hA : IsClosed A := isClosed_le continuous_fst continuous_const + have hF' : ContinuousOn F ({p | p.1∈Icc 0 (T+S)}∩A) := + hF.mono (fun p hp => ⟨hp.1.1,hp.2⟩) + have hG' : ContinuousOn (fun p : ℝ × U => G (p.1-T,p.2)) + ({p | p.1∈Icc 0 (T+S)}∩{p | T≤p.1}) := by + apply hG.comp ((continuous_fst.sub continuous_const).prodMk continuous_snd).continuousOn + intro p hp + change p.1-T∈Icc 0 S + exact ⟨sub_nonneg.mpr hp.2,by linarith [hp.1.2]⟩ + have hleft : IsClosed ({p : ℝ × U | p.1∈Icc 0 (T+S)}∩A) := + ((isClosed_Icc).preimage continuous_fst).inter hA + have hright : IsClosed ({p : ℝ × U | p.1∈Icc 0 (T+S)}∩{p | T≤p.1}) := + ((isClosed_Icc).preimage continuous_fst).inter (isClosed_le continuous_const continuous_fst) + have h1 : ContinuousOn (timePaste T F G) ({p | p.1∈Icc 0 (T+S)}∩A) := + hF'.congr (fun p hp => by change (if p.1≤T then F p else G (p.1-T,p.2))=F p; exact ite_eq_left hp.2) + have h2 : ContinuousOn (timePaste T F G) ({p | p.1∈Icc 0 (T+S)}∩{p | T≤p.1}) := + hG'.congr (fun p hp => congrFun (timePaste_right T F G hjoin hp.2) p.2) + have hu := h1.union_of_isClosed h2 hleft hright + have he : ({p : ℝ × U | p.1∈Icc 0 (T+S)}∩A)∪ + ({p | p.1∈Icc 0 (T+S)}∩{p | T≤p.1})={p | p.1∈Icc 0 (T+S)} := by + ext p + simp only [mem_union,mem_inter_iff,mem_ofPred_eq,A] + exact ⟨fun h => h.elim And.left And.left,fun h => (le_total p.1 T).elim + (fun hh => Or.inl ⟨h,hh⟩) (fun hh => Or.inr ⟨h,hh⟩)⟩ + rwa [he] at hu + +lemma spatiallySmoothSlab_timePaste {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {T S : ℝ} (hT : 0≤T) (hS : 0≤S) + {F G : ℝ × U → W} (hF : SpatiallySmoothSlab T F) (hG : SpatiallySmoothSlab S G) + (hjoin : ∀ x, F (T,x)=G (0,x)) : SpatiallySmoothSlab (T+S) (timePaste T F G) := by + have he (t : ℝ) : (fun x => timePaste T F G (t,x))= + if t≤T then (fun x => F (t,x)) else (fun x => G (t-T,x)) := by + split_ifs <;> funext x <;> simp_all [timePaste] + refine ⟨?_,?_⟩ + · intro t ht + rw [he] + split_ifs with hh + · exact hF.1 t ⟨ht.1,hh⟩ + · exact hG.1 (t-T) ⟨by linarith,by linarith [ht.2]⟩ + · intro k + have hj : ∀ x, iteratedFDeriv ℝ k (fun y => F (T,y)) x= + iteratedFDeriv ℝ k (fun y => G (0,y)) x := by + intro x; rw [show (fun y => F (T,y))=(fun y => G (0,y)) from funext hjoin] + have hh := continuousOn_timePaste hT hS (hF.2 k) (hG.2 k) hj + convert hh using 1 + funext p + rw [he] + simp only [timePaste] + split_ifs <;> rfl + +lemma boundedSpatiallySmoothSlab_timePaste {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {T S : ℝ} (hT : 0≤T) (hS : 0≤S) + {F G : ℝ × U → W} (hF : BoundedSpatiallySmoothSlab T F) (hG : BoundedSpatiallySmoothSlab S G) + (hjoin : ∀ x, F (T,x)=G (0,x)) : BoundedSpatiallySmoothSlab (T+S) (timePaste T F G) := by + refine ⟨spatiallySmoothSlab_timePaste hT hS hF.1 hG.1 hjoin,?_⟩ + intro k + obtain ⟨A,hA,hAb⟩ := hF.2 k + obtain ⟨B,hB,hBb⟩ := hG.2 k + refine ⟨max A B,hA.trans (le_max_left _ _),?_⟩ + intro t ht x + by_cases hh : t≤T + · rw [timePaste_left T F G hh] + exact (hAb t ⟨ht.1,hh⟩ x).trans (le_max_left _ _) + · rw [timePaste_right T F G hjoin (le_of_not_ge hh)] + exact (hBb (t-T) ⟨by linarith,by linarith [ht.2]⟩ x).trans (le_max_right _ _) + +lemma hasDerivWithinAt_timePaste {U W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {T S : ℝ} (hT : 0≤T) (hS : 0≤S) {F G P Q : ℝ × U → W} + (hF : ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt (fun r => F (r,x)) (P (t,x)) (Icc 0 T) t) + (hG : ∀ t∈Icc 0 S, ∀ x, HasDerivWithinAt (fun r => G (r,x)) (Q (t,x)) (Icc 0 S) t) + (hjoin : ∀ x, F (T,x)=G (0,x)) (hDjoin : ∀ x, P (T,x)=Q (0,x)) + {t : ℝ} (ht : t∈Icc 0 (T+S)) (x : U) : + HasDerivWithinAt (fun r => timePaste T F G (r,x)) (timePaste T P Q (t,x)) (Icc 0 (T+S)) t := by + have hleft (u : ℝ) (hu : u∈Icc 0 T) : + HasDerivWithinAt (fun r => timePaste T F G (r,x)) (timePaste T P Q (u,x)) (Icc 0 T) u := by + rw [congrFun (timePaste_left T P Q hu.2) x] + exact (hF u hu x).congr (fun r hr => congrFun (timePaste_left T F G hr.2) x) + (congrFun (timePaste_left T F G hu.2) x) + have hright (u : ℝ) (hu : u∈Icc T (T+S)) : + HasDerivWithinAt (fun r => timePaste T F G (r,x)) (timePaste T P Q (u,x)) (Icc T (T+S)) u := by + have hv : u-T∈Icc 0 S := ⟨sub_nonneg.mpr hu.1,by linarith [hu.2]⟩ + have hh := (hG (u-T) hv x).scomp u ((hasDerivAt_id u).sub_const T).hasDerivWithinAt + (show MapsTo (fun r => r-T) (Icc T (T+S)) (Icc 0 S) from + fun r hr => ⟨sub_nonneg.mpr hr.1,by linarith [hr.2]⟩) + simp only [one_smul] at hh + rw [congrFun (timePaste_right T P Q hDjoin hu.1) x] + exact hh.congr (fun r hr => congrFun (timePaste_right T F G hjoin hr.1) x) + (congrFun (timePaste_right T F G hjoin hu.1) x) + rcases lt_trichotomy t T with hlt|heq|hgt + · apply (hleft t ⟨ht.1,hlt.le⟩).congr_set + filter_upwards [Iio_mem_nhds hlt] with r hr + exact propext ⟨fun h => ⟨h.1,by linarith [h.2]⟩,fun h => ⟨h.1,hr.le⟩⟩ + · subst t + have hh := (hleft T ⟨hT,le_rfl⟩).union (hright T ⟨le_rfl,by linarith⟩) + have he : Icc (0:ℝ) T∪Icc T (T+S)=Icc 0 (T+S) := by + ext r + simp only [mem_union,mem_Icc] + constructor + · rintro (hr|hr) <;> constructor <;> linarith [hr.1,hr.2] + · intro hr + exact (le_total r T).elim (fun h => Or.inl ⟨hr.1,h⟩) (fun h => Or.inr ⟨h,hr.2⟩) + rwa [he] at hh + · apply (hright t ⟨hgt.le,ht.2⟩).congr_set + filter_upwards [Ioi_mem_nhds hgt] with r hr + exact propext ⟨fun h => ⟨by linarith [h.1],h.2⟩,fun h => ⟨hr.le,h.2⟩⟩ + +lemma slabTimeContinuousL2_timePaste {T S : ℝ} (hT : 0≤T) (hS : 0≤S) + {F G : Field} (hF : SlabTimeContinuousL2 T F) (hG : SlabTimeContinuousL2 S G) + (hjoin : ∀ x, F (T,x)=G (0,x)) : SlabTimeContinuousL2 (T+S) (timePaste T F G) := by + obtain ⟨F₂,hFc,hFe⟩ := hF + obtain ⟨G₂,hGc,hGe⟩ := hG + have hj : F₂ T=G₂ 0 := by + apply Lp.ext + filter_upwards [hFe T ⟨hT,le_rfl⟩,hGe 0 ⟨le_rfl,hS⟩] with x hf hg + exact hf.trans ((hjoin x).trans hg.symm) + let U := timePaste T (fun p : ℝ × Unit => F₂ p.1) (fun p => G₂ p.1) + have hc : ContinuousOn U {p | p.1∈Icc 0 (T+S)} := + continuousOn_timePaste hT hS (hFc.comp continuous_fst.continuousOn (fun _ h => h)) + (hGc.comp continuous_fst.continuousOn (fun _ h => h)) (fun _ => hj) + refine ⟨fun t => U (t,()),hc.comp (continuous_id.prodMk continuous_const).continuousOn (fun _ h => h),?_⟩ + intro t ht + by_cases hh : t≤T + · dsimp only [U,timePaste] + simp only [hh,ite_true] + exact hFe t ⟨ht.1,hh⟩ + · dsimp only [U,timePaste] + simp only [hh,ite_false] + exact hGe (t-T) ⟨by linarith,by linarith [ht.2]⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/UniformParticleDensityConstant.lean b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/UniformParticleDensityConstant.lean new file mode 100644 index 0000000000000000000000000000000000000000..7eda4416d21b40eb5bb1643180cde99fb57c0c35 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/LocalPDE/UniformParticleDensityConstant.lean @@ -0,0 +1,244 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.PhysicalBinBasePrefix + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +lemma Admissible.uniform_particle_density_constant {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (T : ℝ) (_F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (t : ℝ), t ∈ Icc 0 T → ∀ (z : Phase), 0 ≤ s.f (t,z) ∧ s.f (t,z) ≤ C := by + obtain ⟨C,hC⟩ := hd.1.continuous.bounded_above_of_compact_support hd.2.1 + refine ⟨max 0 C,le_max_left _ _,?_⟩ + intro s T F hs h0 t ht z + refine ⟨hs.nonnegative t ht z,?_⟩ + rw [F.transport_inverse hs.f_smooth hs.vlasov ht,h0] + exact (le_abs_self _).trans ((hC _).trans (le_max_right _ _)) + +lemma Admissible.uniform_physicalBinDensity_constant {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (T : ℝ) (_F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (X V : ℝ→Vec) (B : ClosedConeBin) (t r : ℝ) (n : Sphere) (P θ σ : ℝ), + r∈Icc 0 T → 0≤P → 0≤θ → 0≤σ → B.qmax≤P → B.dmax≤8*θ^2 → B.emax≤8*σ^2 → + physicalBinDensity s X V B t r n≤ENNReal.ofReal (128*C*P^3*(min θ σ)^2) := by + obtain ⟨C,hC,hb⟩ := Admissible.uniform_particle_density_constant hd + refine ⟨C,hC,?_⟩ + intro s T F hs h0 X V B t r n P θ σ hr hP hθ hσ hq hd he + exact coneBin_density_bound (sphere_norm n).le (norm_velocity_lt_one _).le hP hθ hσ hC + hq hd he (fun v=>(hb s T F hs h0 r hr _).2) + +lemma Admissible.uniform_actual_bin_Cauchy {d : Datum} (hd₀ : Admissible d) : + ∃ C₀ : ℝ, 0≤C₀ ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀ z,s.f (0,z)=d.f₀ z) → ∀ (zX : Phase) (C : ClosedConeBin) (S : Set Phase) + (a b I P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z => s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0 (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let D := ENNReal.ofReal (128*C₀*P^3*(min θ σ)^2) + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T C S a b (max 0 (a-C.rmax)) (min T (b-C.rmin))) / + ENNReal.ofReal (C.rmin^2*C.Dmin) + (∫⁻ z : ConeCoordinate, ENNReal.ofReal (z.1-z.2.1) * + ENNReal.ofReal (prefixConeGood s T X z) * N z ∂physicalBinMeasure V C (Icc a b)) ≤ + (ENNReal.ofReal I * goodFieldBudget s X (fun t => velocity (V t)) k a b I j)^(1/2:ℝ) * + (min (D^2*(volume (Icc a b)*ENNReal.ofReal (C.rmax-C.rmin)*ENNReal.ofReal (384*φ^2))) + (D*M))^(1/2:ℝ) := by + obtain ⟨C₀,hC₀,hbound⟩ := hd₀.uniform_physicalBinDensity_constant + refine ⟨C₀,hC₀,?_⟩ + intro s T F hs hT h0 zX C S a b I P θ φ σ k j hS hS0 hJ hI hP hθ hφ hσ hR hD hq hd hDmax he hangle + dsimp only + let X : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let μ := physicalBinMeasure V C (Icc a b) + have hα : Continuous (fun t => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hN : AEMeasurable N μ := + physicalBinDensity_aemeasurable hs hT hX hV C measurableSet_Icc hJ + have hG := hs.measurable_prefixConeGood hT hX + have hW : AEMeasurable (fun z : ConeCoordinate => ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)) μ := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal.mul hG.ennreal_ofReal).aemeasurable + apply lintegral_product_bound_two μ hW hN + · have hfield := hs.physicalBin_goodField hT hX hV C k j hJ hI hangle + apply le_trans _ hfield + apply le_of_eq + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hg : 0≤prefixConeGood s T X z := add_nonneg (norm_nonneg _) (abs_nonneg _) + dsimp only + rw [mul_pow,← ENNReal.ofReal_pow hr,← ENNReal.ofReal_pow hg,← ENNReal.ofReal_mul (sq_nonneg _)] + · apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + exact hbound s T F hs h0 X V C z.1 z.2.1 z.2.2 P θ σ + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ hP.le hθ hσ hq hd he + · have hmass := F.physicalBin_weighted_occupation hs hT zX C hS hS0 hJ hR.le hD.le + have hμ : physicalBinMeasure (fun t => (F.flow zX t).2) C (Icc a b) = μ := by + unfold μ physicalBinMeasure V + rw [physicalBinBase_prefix zX C hJ] + rw [hμ] at hmass + have hne : ENNReal.ofReal (C.rmin^2*C.Dmin)≠0 := (ENNReal.ofReal_pos.mpr (by positivity)).ne' + apply (ENNReal.le_div_iff_mul_le (Or.inl hne) (Or.inl ENNReal.ofReal_ne_top)).mpr + rw [mul_comm] + convert hmass using 1 + congr 1 + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + simp only [N,X,V,physicalBinDensity,prefixFlow,prefixClamp_eq (hJ hz.1)] + · exact physicalBinMeasure_volume hV C measurableSet_Icc hφ hDmax + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma exists_direction_step {g : ℝ→Vec} {a b δ : ℝ} (hab : a≤b) + (hg : ContinuousOn g (Icc a b)) (hδ : 0<δ) : + ∃c∈Icc a b, (∀t∈Icc a c,‖g t-g a‖≤δ) ∧ + (c=b ∨ ‖g c-g a‖=δ) ∧ (a‖g t-g a‖ + have hf : ContinuousOn f (Icc a b) := (hg.sub continuousOn_const).norm + have hfa : f a=0 := by simp [f] + by_cases hex : ∃t∈Icc a b,f t=δ + · let S : Set ℝ := Icc a b ∩ f ⁻¹' {δ} + have hS : IsCompact S := isCompact_Icc.of_isClosed_subset + (hf.preimage_isClosed_of_isClosed isClosed_Icc isClosed_singleton) inter_subset_left + obtain ⟨c,hc,hmin⟩ := hS.exists_isMinOn (by simpa only [S,Set.Nonempty,mem_inter_iff, + mem_preimage,mem_singleton_iff] using hex) continuousOn_id + have hfc : f c=δ := hc.2 + refine ⟨c,hc.1,?_,Or.inr hfc,?_⟩ + · intro t ht + by_contra h + have hft : δh⟩ + intro t ht + by_contra h + have hft : δ + exists_direction_step x.2.2 (hg.mono (Icc_subset_Icc_left x.2.1)) hδ + let next : S→S := fun x=>⟨(hs x).choose,⟨x.2.1.trans (hs x).choose_spec.1.1, + (hs x).choose_spec.1.2⟩⟩ + let seq : ℕ→S := fun n=>(next^[n]) ⟨a,left_mem_Icc.mpr hab⟩ + let t : ℕ→ℝ := fun n=>(seq n).1 + have ht0 : t 0=a := rfl + have hnext (i : ℕ) : seq (i+1)=next (seq i) := by + exact Function.iterate_succ_apply' next i _ + have htmem (i : ℕ) : t i∈Icc a b := (seq i).2 + have hstep (i : ℕ) : t i≤t (i+1) ∧ + (∀u∈Icc (t i) (t (i+1)),‖g u-g (t i)‖≤δ) ∧ + (t (i+1)=b ∨ ‖g (t (i+1))-g (t i)‖=δ) ∧ + (t i(hstep i).1) + have hsep (i : ℕ) (hi : t (i+1)≠b) : ℓ≤t (i+1)-t i := by + have he : ‖g (t (i+1))-g (t i)‖=δ := (hstep i).2.2.1.resolve_left hi + by_contra hh + have hl : |t (i+1)-t i|<ℓ := by + rw [abs_of_nonneg (sub_nonneg.mpr (hstep i).1)] + exact lt_of_not_ge hh + have hb := hmod (t i) (htmem i) (t (i+1)) (htmem (i+1)) hl + rw [he] at hb + exact lt_irrefl δ hb + have hex : ∃n,t n=b := by + by_contra hn + have hne : ∀n,t n≠b := by simpa only [not_exists] using hn + have hlower : ∀n : ℕ,a+(n:ℝ)*ℓ≤t n := by + intro n + induction n with + | zero => simp only [Nat.cast_zero,zero_mul,add_zero,ht0,le_refl] + | succ n ih => + have hh := hsep n (hne (n+1)) + rw [Nat.cast_add,Nat.cast_one] + nlinarith + obtain ⟨N,hN⟩ := exists_nat_gt ((b-a)/ℓ) + have hh := (div_lt_iff₀ hℓ).mp hN + have hNlo := hlower N + have hNhi := (htmem N).2 + nlinarith + let n := Nat.find hex + have hnb : t n=b := Nat.find_spec hex + have hnot : ∀iNat.find_min hex hi + refine ⟨n,t,ht0,hnb,fun i _=>htmem i,?_⟩ + intro i hi + have hib : t i f (t,x)) + (s := fun _ => closedBall (0 : E) R) (K := K) _ hαc _ _ hβc _ _ h0 + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x y)] + using hK.dist_le_mul (t,x) ⟨Ico_subset_Icc_self ht,hx⟩ + (t,y) ⟨Ico_subset_Icc_self ht,hy⟩ + · intro t ht + exact (hα t (Ico_subset_Icc_self ht)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem ht) + · intro t ht + exact hR (Or.inl ⟨t,Ico_subset_Icc_self ht,rfl⟩) + · intro t ht + exact (hβ t (Ico_subset_Icc_self ht)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem ht) + · intro t ht + exact hR (Or.inr ⟨t,Ico_subset_Icc_self ht,rfl⟩) + +def BoundedFlowRegularity (n : ℕ) : Prop := + ∀ (E Z : Type u) [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + (f : ℝ × E → E) (T L : ℝ) (U : Set Z) (g : Z → E) (α : Z → ℝ → E), + 0 < T → 0 ≤ L → ContDiff ℝ ∞ f → + (∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) → + IsOpen U → ContDiffOn ℝ ∞ g U → + (∀ x ∈ U, α x 0 = g x) → + (∀ x ∈ U, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) → + ContDiffOn ℝ n (fun z : ℝ × Z => α z.2 z.1) (Ioo 0 T ×ˢ U) + +lemma bounded_cutoff_vector_field {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] {f : ℝ × E → E} (hf : ContDiff ℝ ∞ f) (T R : ℝ) : + ∃ g : ℝ × E → E, ∃ L : ℝ, 0 ≤ L ∧ ContDiff ℝ ∞ g ∧ + (∀ t ∈ Icc 0 T, ∀ x, ‖g (t,x)‖ ≤ L) ∧ + ∀ t x, x ∈ closedBall (0 : E) R → g (t,x) = f (t,x) := by + let χ : ContDiffBump (0 : E) := ⟨max 0 R + 1,max 0 R + 2,by positivity,by linarith⟩ + let g : ℝ × E → E := fun z => χ z.2 • f z + have hg : ContDiff ℝ ∞ g := (χ.contDiff.comp contDiff_snd).smul hf + obtain ⟨L,hL⟩ := (isCompact_Icc.prod (isCompact_closedBall (0 : E) χ.rOut)).bddAbove_image + hg.continuous.norm.continuousOn + refine ⟨g,max 0 L,le_max_left _ _,hg,?_,?_⟩ + · intro t ht x + by_cases hx : x ∈ closedBall (0 : E) χ.rOut + · exact (hL ⟨(t,x),⟨ht,hx⟩,rfl⟩).trans (le_max_right _ _) + have hz : χ x = 0 := by + apply Function.notMem_support.mp + rw [χ.support_eq] + exact fun hm => hx (ball_subset_closedBall hm) + simp only [g,hz,zero_smul,norm_zero] + exact le_max_left _ _ + · intro t x hx + have hm : x ∈ closedBall (0 : E) χ.rIn := by + exact closedBall_subset_closedBall (by dsimp [χ]; linarith [le_max_right (0 : ℝ) R]) hx + change χ x • f (t,x) = f (t,x) + rw [χ.one_of_mem_closedBall hm,one_smul] + +lemma contDiffAt_flow_transfer {E Z : Type u} + [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : ℝ × E → E} {T : ℝ} {U : Set Z} {V : Set E} {g : Z → E} + {α : Z → ℝ → E} {β : E → ℝ → E} {n : ℕ} {t : ℝ} {x : Z} + (hf : ContDiff ℝ 1 f) (hU : IsOpen U) (hV : IsOpen V) + (hg : ContDiffOn ℝ n g U) + (hα0 : ∀ x ∈ U, α x 0 = g x) + (hαd : ∀ x ∈ U, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) + (hβ0 : ∀ y ∈ V, β y 0 = y) + (hβd : ∀ y ∈ V, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (β y) (f (t,β y t)) (Icc 0 T) t) + (hβ : ContDiffOn ℝ n (fun z : ℝ × E => β z.2 z.1) (Ioo 0 T ×ˢ V)) + (ht : t ∈ Ioo 0 T) (hx : x ∈ U) (hmem : g x ∈ V) : + ContDiffAt ℝ n (fun z : ℝ × Z => α z.2 z.1) (t,x) := by + have hgc := (hg.contDiffAt (hU.mem_nhds hx)).comp (t,x) contDiffAt_snd + have hh := (hβ.contDiffAt ((isOpen_Ioo.prod hV).mem_nhds ⟨ht,hmem⟩)).comp + (t,x) (contDiffAt_fst.prodMk hgc) + apply hh.congr_of_eventuallyEq + have heU : ∀ᶠ z : ℝ × Z in 𝓝 (t,x), z.2 ∈ U := + continuousAt_snd.eventually (hU.mem_nhds hx) + have heV : ∀ᶠ z : ℝ × Z in 𝓝 (t,x), g z.2 ∈ V := + hgc.continuousAt.eventually (hV.mem_nhds hmem) + have heT : ∀ᶠ z : ℝ × Z in 𝓝 (t,x), z.1 ∈ Ioo 0 T := + continuousAt_fst.eventually (isOpen_Ioo.mem_nhds ht) + filter_upwards [heU,heV,heT] with z hzU hzV hzT + exact smooth_ode_unique hf (hαd z.2 hzU) (hβd (g z.2) hzV) + ((hα0 z.2 hzU).trans (hβ0 (g z.2) hzV).symm) (Ioo_subset_Icc_self hzT) + +lemma boundedFlowRegularity_zero : BoundedFlowRegularity.{u} 0 := by + intro E Z _ _ _ _ _ f T L U g α hT hL hf hb hU hg hα0 hαd z hz + obtain ⟨β,A,K,hsol,hLip⟩ := exists_bounded_within_variational_flow hT hL + (contDiff_infty.mp hf 2).contDiffOn hb (g z.2) + have hβc : ContinuousOn (fun w : ℝ × E => β w.2 w.1) + (Icc 0 T ×ˢ closedBall (g z.2) (1/2 : ℝ)) := + continuousOn_time_label_of_lipschitz + (fun y hy => HasDerivWithinAt.continuousOn (hsol y hy).2.2.1) + (fun t ht => (hLip t ht).1) + have hreg : ContDiffOn ℝ 0 (fun w : ℝ × E => β w.2 w.1) + (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := + contDiffOn_zero.mpr (hβc.mono (prod_mono Ioo_subset_Icc_self ball_subset_closedBall)) + exact (contDiffAt_flow_transfer (hf.of_le (by simp)) hU isOpen_ball (hg.of_le (by simp)) + hα0 hαd (fun y hy => (hsol y (ball_subset_closedBall hy)).1) + (fun y hy => (hsol y (ball_subset_closedBall hy)).2.2.1) + hreg hz.1 hz.2 (by simp)).contDiffWithinAt + +lemma boundedFlowRegularity_succ {n : ℕ} (hn : BoundedFlowRegularity.{u} n) : + BoundedFlowRegularity.{u} (n+1) := by + intro E Z _ _ _ _ _ f T L U g α hT hL hf hb hU hg hα0 hαd z hz + obtain ⟨β,A,K,hsol,hLip⟩ := exists_bounded_within_variational_flow hT hL + (contDiff_infty.mp hf 2).contDiffOn hb (g z.2) + have hβc : ContinuousOn (fun w : ℝ × E => β w.2 w.1) + (Icc 0 T ×ˢ closedBall (g z.2) (1/2 : ℝ)) := + continuousOn_time_label_of_lipschitz + (fun y hy => HasDerivWithinAt.continuousOn (hsol y hy).2.2.1) + (fun t ht => (hLip t ht).1) + have hAc : ContinuousOn (fun w : ℝ × E => A w.2 w.1) + (Icc 0 T ×ˢ closedBall (g z.2) (1/2 : ℝ)) := + continuousOn_time_label_of_lipschitz + (fun y hy => HasDerivWithinAt.continuousOn (hsol y hy).2.2.2.1) + (fun t ht => (hLip t ht).2) + obtain ⟨R,hR⟩ := (isCompact_Icc.prod (isCompact_closedBall (g z.2) (1/2 : ℝ))).bddAbove_image + (hβc.prodMk hAc).norm + let F : ℝ × (E × (E →L[ℝ] E)) → E × (E →L[ℝ] E) := + fun w => (f (w.1,w.2.1),(spaceDerivative f (w.1,w.2.1)).comp w.2.2) + have hp : ContDiff ℝ ∞ (fun w : ℝ × (E × (E →L[ℝ] E)) => (w.1,w.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hF : ContDiff ℝ ∞ F := (hf.comp hp).prodMk + (((contDiff_spaceDerivative hf).comp hp).clm_comp (contDiff_snd.comp contDiff_snd)) + obtain ⟨Fc,Lc,hLc,hFc,hFcb,hFceq⟩ := bounded_cutoff_vector_field hF T R + have heq (x : E) (hx : x ∈ closedBall (g z.2) (1/2 : ℝ)) (t : ℝ) (ht : t ∈ Icc 0 T) : + Fc (t,(β x t,A x t)) = F (t,(β x t,A x t)) := by + apply hFceq + simpa only [mem_closedBall,dist_zero_right] using hR ⟨(t,x),⟨ht,hx⟩,rfl⟩ + have hlift : ContDiffOn ℝ n (fun w : ℝ × E => (β w.2 w.1,A w.2 w.1)) + (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := by + apply hn (E × (E →L[ℝ] E)) E Fc T Lc (ball (g z.2) (1/2 : ℝ)) + (fun x => (x,ContinuousLinearMap.id ℝ E)) (fun x t => (β x t,A x t)) + hT hLc hFc hFcb isOpen_ball (contDiff_id.prodMk contDiff_const).contDiffOn + · intro x hx + exact Prod.ext (hsol x (ball_subset_closedBall hx)).1 + (hsol x (ball_subset_closedBall hx)).2.1 + · intro x hx t ht + rw [heq x (ball_subset_closedBall hx) t ht] + exact ((hsol x (ball_subset_closedBall hx)).2.2.1 t ht).prodMk + ((hsol x (ball_subset_closedBall hx)).2.2.2.1 t ht) + have hβn : ContDiffOn ℝ n (fun w : ℝ × E => β w.2 w.1) + (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := contDiff_fst.comp_contDiffOn hlift + have hAn : ContDiffOn ℝ n (fun w : ℝ × E => A w.2 w.1) + (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := contDiff_snd.comp_contDiffOn hlift + let D : ℝ × E → (ℝ × E →L[ℝ] E) := fun w => + (ContinuousLinearMap.toSpanSingleton ℝ (f (w.1,β w.2 w.1))).coprod (A w.2 w.1) + have hDn : ContDiffOn ℝ n D (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := by + have hfn := (contDiff_infty.mp hf n).comp_contDiffOn + (contDiffOn_fst.prodMk hβn) + have hcol := (ContinuousLinearMap.toSpanSingletonCLE (𝕜 := ℝ) (E := E)).contDiff.comp_contDiffOn hfn + exact (hcol.clm_comp (contDiffOn_const (c := ContinuousLinearMap.fst ℝ ℝ E))).add + (hAn.clm_comp (contDiffOn_const (c := ContinuousLinearMap.snd ℝ ℝ E))) + have hβd (w : ℝ × E) (hw : w ∈ Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) : + HasFDerivAt (fun v : ℝ × E => β v.2 v.1) (D w) w := by + exact (hasStrictFDerivAt_time_flow hf.continuous.continuousOn + (hβc.mono (prod_mono Subset.rfl ball_subset_closedBall)) + (hAc.mono (prod_mono Subset.rfl ball_subset_closedBall)) + (fun x hx => (hsol x (ball_subset_closedBall hx)).2.2.1) + (fun t ht x hx => hasFDerivAt_within_variational_flow hT + (contDiff_infty.mp hf 2).contDiffOn hsol (fun t ht => (hLip t ht).1) hx ht) + hw.1 hw.2).hasFDerivAt + have hreg : ContDiffOn ℝ (n+1) (fun w : ℝ × E => β w.2 w.1) + (Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ)) := by + intro w hw + have hnh := (isOpen_Ioo.prod isOpen_ball).mem_nhds hw + exact (contDiffAt_succ_iff_hasFDerivAt.mpr + ⟨D,⟨Ioo 0 T ×ˢ ball (g z.2) (1/2 : ℝ),hnh,hβd⟩,hDn.contDiffAt hnh⟩).contDiffWithinAt + exact (contDiffAt_flow_transfer (contDiff_infty.mp hf 1) hU isOpen_ball (contDiffOn_infty.mp hg (n+1)) + hα0 hαd (fun y hy => (hsol y (ball_subset_closedBall hy)).1) + (fun y hy => (hsol y (ball_subset_closedBall hy)).2.2.1) + hreg hz.1 hz.2 (by simp)).contDiffWithinAt + +lemma boundedFlowRegularity_all (n : ℕ) : BoundedFlowRegularity.{u} n := by + induction n with + | zero => exact boundedFlowRegularity_zero + | succ n hn => exact boundedFlowRegularity_succ hn + +lemma contDiffOn_bounded_flow {E Z : Type u} + [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : ℝ × E → E} {T L : ℝ} {U : Set Z} {g : Z → E} {α : Z → ℝ → E} + (hT : 0 < T) (hL : 0 ≤ L) (hf : ContDiff ℝ ∞ f) + (hb : ∀ t ∈ Icc 0 T, ∀ x, ‖f (t,x)‖ ≤ L) + (hU : IsOpen U) (hg : ContDiffOn ℝ ∞ g U) + (hα0 : ∀ x ∈ U, α x 0 = g x) + (hαd : ∀ x ∈ U, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) : + ContDiffOn ℝ ∞ (fun z : ℝ × Z => α z.2 z.1) (Ioo 0 T ×ˢ U) := by + rw [contDiffOn_infty] + intro n + exact boundedFlowRegularity_all n E Z f T L U g α hT hL hf hb hU hg hα0 hαd + +lemma PhaseFlowOn.contDiffOn_joint {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0 < T) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ContDiffOn ℝ ∞ (fun w : ℝ × Phase => F.flow w.2 w.1) + (Ioo 0 T ×ˢ (univ : Set Phase)) := by + have hc := F.continuousOn_joint hT.le hE.continuous.continuousOn hB.continuous.continuousOn + have hf := contDiff_lorentzField hE hB + intro z hz + obtain ⟨R,hR⟩ := (isCompact_Icc.prod (isCompact_closedBall z.2 (1 : ℝ))).bddAbove_image + (hc.mono (prod_mono Subset.rfl (subset_univ _))).norm + obtain ⟨f,L,hL,hf,hb,heq⟩ := bounded_cutoff_vector_field hf T R + have hreg : ContDiffOn ℝ ∞ (fun w : ℝ × Phase => F.flow w.2 w.1) + (Ioo 0 T ×ˢ ball z.2 1) := by + apply contDiffOn_bounded_flow hT hL hf hb isOpen_ball contDiffOn_id + (fun x _ => F.initial x) + intro x hx t ht + rw [heq t (F.flow x t) (by + simpa only [mem_closedBall,dist_zero_right] using + hR ⟨(t,x),⟨ht,ball_subset_closedBall hx⟩,rfl⟩)] + exact F.ode x t ht + exact (hreg.contDiffAt ((isOpen_Ioo.prod isOpen_ball).mem_nhds + ⟨hz.1,mem_ball_self zero_lt_one⟩)).contDiffWithinAt + +lemma contDiffAt_inversePhase {Q : Type u} + [NormedAddCommGroup Q] [NormedSpace ℝ Q] [FiniteDimensional ℝ Q] + {α : Q → ℝ → Q} {v x : Q} {A : Q →L[ℝ] Q} {T t : ℝ} + (hbij : ∀ s ∈ Ioo 0 T, Function.Bijective (α · s)) (ht : t ∈ Ioo 0 T) + (hA : A.det = 1) + (hα : HasFDerivAt (fun z : ℝ × Q => α z.2 z.1) + ((ContinuousLinearMap.toSpanSingleton ℝ v).coprod A) (t,x)) + (hreg : ContDiffAt ℝ ∞ (fun z : ℝ × Q => α z.2 z.1) (t,x)) : + ContDiffAt ℝ ∞ (inversePhase α) (t,α x t) := by + obtain ⟨e,D,he,hD,hder⟩ := inverse_timeFlowDerivative hA + let Φ : ℝ × Q → ℝ × Q := fun z => (z.1,α z.2 z.1) + have hΦd : HasFDerivAt Φ (e : (ℝ × Q) →L[ℝ] (ℝ × Q)) (t,x) := by + rw [he] + exact hasFDerivAt_fst.prodMk hα + have hΦc : ContDiffAt ℝ ∞ Φ (t,x) := contDiffAt_fst.prodMk hreg + have hn : (∞ : WithTop ℕ∞) ≠ 0 := by simp + let Z := hΦc.localInverse hΦd hn + have hZ : ContDiffAt ℝ ∞ Z (t,α x t) := hΦc.to_localInverse hΦd hn + have hr := (hΦc.hasStrictFDerivAt' hΦd hn).eventually_right_inverse + have heq : inversePhase α =ᶠ[𝓝 (t,α x t)] (fun z => (Z z).2) := by + have htime : ∀ᶠ z : ℝ × Q in 𝓝 (t,α x t), z.1 ∈ Ioo 0 T := + continuous_fst.continuousAt.eventually (isOpen_Ioo.mem_nhds ht) + filter_upwards [hr,htime] with z hz hzt + have hx : (Z z).1 = z.1 := by + have hh := congrArg Prod.fst hz + exact hh + have hy : α (Z z).2 z.1 = z.2 := by + have hh := congrArg Prod.snd hz + change α (Z z).2 (Z z).1 = z.2 at hh + rwa [hx] at hh + apply (hbij z.1 hzt).1 + exact (Function.invFun_eq ((hbij z.1 hzt).2 z.2)).trans hy.symm + exact hZ.snd.congr_of_eventuallyEq heq + +lemma PhaseFlowOn.contDiffOn_inverse {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0 < T) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ContDiffOn ℝ ∞ (inversePhase F.flow) (Ioo 0 T ×ˢ (univ : Set Phase)) := by + intro z hz + let y := inversePhase F.flow z + have hy : F.flow y z.1 = z.2 := F.flow_inversePhase (Ioo_subset_Icc_self hz.1) z.2 + have hh := contDiffAt_inversePhase + (fun s hs => F.bijective s (Ioo_subset_Icc_self hs)) hz.1 + (F.det_one y z.1 (Ioo_subset_Icc_self hz.1)) + (F.joint y z.1 hz.1).hasFDerivAt + ((F.contDiffOn_joint hT hE hB).contDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds + ⟨hz.1,mem_univ y⟩)) + simpa only [hy] using hh.contDiffWithinAt + +structure SymmetricLorentzFlow (E B : Field) (R : ℝ) where + forward : Phase → ℝ → Phase + backward : ℝ × Phase → Phase + initial : ∀ z, forward z 0 = z + ode : ∀ z t, t ∈ Ioo (-R) R → + HasDerivAt (forward z) (lorentzField E B (t,forward z t)) t + smooth_forward : ContDiffOn ℝ ∞ (fun w : ℝ × Phase => forward w.2 w.1) + (Ioo (-R) R ×ˢ (univ : Set Phase)) + smooth_backward : ContDiffOn ℝ ∞ backward (Ioo (-R) R ×ˢ (univ : Set Phase)) + left_inverse : ∀ t ∈ Ioo (-R) R, ∀ z, backward (t,forward z t) = z + right_inverse : ∀ t ∈ Ioo (-R) R, ∀ z, forward (backward (t,z)) t = z + +lemma exists_symmetricLorentzFlow {E B : Field} {R : ℝ} (hR : 0 < R) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + Nonempty (SymmetricLorentzFlow E B R) := by + let E' : Field := fun z => E (z.1-R,z.2) + let B' : Field := fun z => B (z.1-R,z.2) + have hs : ContDiff ℝ ∞ (fun z : ℝ × Vec => (z.1-R,z.2)) := + (contDiff_fst.sub contDiff_const).prodMk contDiff_snd + have hE' : ContDiff ℝ ∞ E' := hE.comp hs + have hB' : ContDiff ℝ ∞ B' := hB.comp hs + obtain ⟨F⟩ := exists_phaseFlowOn (show 0 < 2*R by positivity) + (contDiff_infty.mp hE' 2).contDiffOn (contDiff_infty.mp hB' 2).contDiffOn + have hmid : R ∈ Ioo 0 (2*R) := ⟨hR,by linarith⟩ + have htime {t : ℝ} (ht : t ∈ Ioo (-R) R) : t+R ∈ Ioo 0 (2*R) := + ⟨by linarith [ht.1],by linarith [ht.2]⟩ + have hfc := F.contDiffOn_joint (by positivity) hE' hB' + have hic := F.contDiffOn_inverse (by positivity) hE' hB' + have hfmid : ContDiff ℝ ∞ (fun z => F.flow z R) := by + rw [contDiff_iff_contDiffAt] + intro z + exact (hfc.contDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds + ⟨hmid,mem_univ z⟩)).comp z (contDiffAt_const.prodMk contDiffAt_id) + have himid : ContDiff ℝ ∞ (fun z => inversePhase F.flow (R,z)) := by + rw [contDiff_iff_contDiffAt] + intro z + exact (hic.contDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds + ⟨hmid,mem_univ z⟩)).comp z (contDiffAt_const.prodMk contDiffAt_id) + let fw : Phase → ℝ → Phase := fun z t => F.flow (inversePhase F.flow (R,z)) (t+R) + let bw : ℝ × Phase → Phase := fun w => F.flow (inversePhase F.flow (w.1+R,w.2)) R + refine ⟨⟨fw,bw,?_,?_,?_,?_,?_,?_⟩⟩ + · intro z + simpa only [fw,zero_add] using F.flow_inversePhase (Ioo_subset_Icc_self hmid) z + · intro z t ht + have hd := (F.ode (inversePhase F.flow (R,z)) (t+R) (Ioo_subset_Icc_self (htime ht))).hasDerivAt + (Icc_mem_nhds (htime ht).1 (htime ht).2) + simpa [fw,E',B',lorentzField,lorentzPhase,Function.comp_def] using + hd.scomp t ((hasDerivAt_id t).add_const R) + · exact hfc.comp ((contDiff_fst.add contDiff_const).prodMk + (himid.comp contDiff_snd)).contDiffOn (fun _ hw => ⟨htime hw.1,mem_univ _⟩) + · exact hfmid.comp_contDiffOn + (hic.comp ((contDiff_fst.add contDiff_const).prodMk contDiff_snd).contDiffOn + (fun _ hw => ⟨htime hw.1,mem_univ _⟩)) + · intro t ht z + change F.flow (inversePhase F.flow + (t+R,F.flow (inversePhase F.flow (R,z)) (t+R))) R = z + rw [F.inversePhase_flow (Ioo_subset_Icc_self (htime ht))] + exact F.flow_inversePhase (Ioo_subset_Icc_self hmid) z + · intro t ht z + change F.flow (inversePhase F.flow + (R,F.flow (inversePhase F.flow (t+R,z)) R)) (t+R) = z + rw [F.inversePhase_flow (Ioo_subset_Icc_self hmid)] + exact F.flow_inversePhase (Ioo_subset_Icc_self (htime ht)) z + +lemma smooth_ode_unique_Icc {Q : Type u} + [NormedAddCommGroup Q] [NormedSpace ℝ Q] [FiniteDimensional ℝ Q] + {f : ℝ × Q → Q} {a b t₀ : ℝ} (hf : ContDiff ℝ 1 f) {α β : ℝ → Q} + (hα : ∀ t ∈ Icc a b, HasDerivAt α (f (t,α t)) t) + (hβ : ∀ t ∈ Icc a b, HasDerivAt β (f (t,β t)) t) + (ht₀ : t₀ ∈ Ioo a b) (h0 : α t₀ = β t₀) : EqOn α β (Icc a b) := by + have hαc : ContinuousOn α (Icc a b) := fun _ ht => (hα _ ht).continuousAt.continuousWithinAt + have hβc : ContinuousOn β (Icc a b) := fun _ ht => (hβ _ ht).continuousAt.continuousWithinAt + obtain ⟨R,hR⟩ := ((isCompact_Icc.image_of_continuousOn hαc).union + (isCompact_Icc.image_of_continuousOn hβc)).isBounded.subset_closedBall (0 : Q) + obtain ⟨K,hK⟩ := hf.contDiffOn.exists_lipschitzOnWith (by norm_num) + ((convex_Icc a b).prod (convex_closedBall (0 : Q) R)) + (isCompact_Icc.prod (isCompact_closedBall (0 : Q) R)) + apply ODE_solution_unique_of_mem_Icc (v := fun t x => f (t,x)) + (s := fun _ => closedBall (0 : Q) R) (K := K) _ ht₀ hαc _ _ hβc _ _ h0 + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + simpa only [Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x y)] + using hK.dist_le_mul (t,x) ⟨Ioo_subset_Icc_self ht,hx⟩ + (t,y) ⟨Ioo_subset_Icc_self ht,hy⟩ + · intro t ht + exact hα t (Ioo_subset_Icc_self ht) + · intro t ht + exact hR (Or.inl ⟨t,Ioo_subset_Icc_self ht,rfl⟩) + · intro t ht + exact hβ t (Ioo_subset_Icc_self ht) + · intro t ht + exact hR (Or.inr ⟨t,Ioo_subset_Icc_self ht,rfl⟩) + +lemma SymmetricLorentzFlow.agree {E B : Field} {R S t : ℝ} + (F : SymmetricLorentzFlow E B R) (G : SymmetricLorentzFlow E B S) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (htR : |t| < R) (htS : |t| < S) (z : Phase) : F.forward z t = G.forward z t := by + let r := (|t|+min R S)/2 + have hr : |t| < r := by dsimp [r]; have := lt_min htR htS; linarith + have hrR : r < R := by dsimp [r]; linarith [min_le_left R S] + have hrS : r < S := by dsimp [r]; linarith [min_le_right R S] + have hr0 : 0 < r := (abs_nonneg t).trans_lt hr + have hsubR : Icc (-r) r ⊆ Ioo (-R) R := by + intro u hu; exact ⟨by linarith [hu.1],by linarith [hu.2]⟩ + have hsubS : Icc (-r) r ⊆ Ioo (-S) S := by + intro u hu; exact ⟨by linarith [hu.1],by linarith [hu.2]⟩ + exact smooth_ode_unique_Icc (contDiff_infty.mp (contDiff_lorentzField hE hB) 1) + (fun u hu => F.ode z u (hsubR hu)) (fun u hu => G.ode z u (hsubS hu)) + ⟨by linarith,hr0⟩ ((F.initial z).trans (G.initial z).symm) + ⟨by linarith [(neg_le_abs t)],by linarith [le_abs_self t]⟩ + +lemma SymmetricLorentzFlow.backward_agree {E B : Field} {R S t : ℝ} + (F : SymmetricLorentzFlow E B R) (G : SymmetricLorentzFlow E B S) + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (htR : |t| < R) (htS : |t| < S) (z : Phase) : F.backward (t,z) = G.backward (t,z) := by + have hR : t ∈ Ioo (-R) R := abs_lt.mp htR + have hS : t ∈ Ioo (-S) S := abs_lt.mp htS + calc + F.backward (t,z) = F.backward (t,G.forward (G.backward (t,z)) t) := by + rw [G.right_inverse t hS z] + _ = F.backward (t,F.forward (G.backward (t,z)) t) := by + rw [F.agree G hE hB htR htS] + _ = G.backward (t,z) := F.left_inverse t hR _ + +structure SmoothLorentzFlow (E B : Field) where + forward : Phase → ℝ → Phase + backward : ℝ × Phase → Phase + initial : ∀ z, forward z 0 = z + ode : ∀ z t, HasDerivAt (forward z) (lorentzField E B (t,forward z t)) t + smooth_forward : ContDiff ℝ ∞ (fun w : ℝ × Phase => forward w.2 w.1) + smooth_backward : ContDiff ℝ ∞ backward + left_inverse : ∀ t z, backward (t,forward z t) = z + right_inverse : ∀ t z, forward (backward (t,z)) t = z + +lemma exists_smoothLorentzFlow {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : Nonempty (SmoothLorentzFlow E B) := by + let F : (R : ℝ) → 0 < R → SymmetricLorentzFlow E B R := + fun R hR => Classical.choice (exists_symmetricLorentzFlow hR hE hB) + let rad : ℝ → ℝ := fun t => |t|+1 + have hrad0 : ∀ t, |t| < rad t := fun t => by dsimp [rad]; linarith + have hrad : ∀ t, |t| < rad t := hrad0 + have hpos : ∀ t, 0 < rad t := fun t => (abs_nonneg t).trans_lt (hrad t) + let fw : Phase → ℝ → Phase := fun z t => (F (rad t) (hpos t)).forward z t + let bw : ℝ × Phase → Phase := fun w => (F (rad w.1) (hpos w.1)).backward w + have hfw {R : ℝ} (hR : 0 < R) {t : ℝ} (ht : |t| < R) (z : Phase) : + fw z t = (F R hR).forward z t := + (F (rad t) (hpos t)).agree (F R hR) hE hB (hrad t) ht z + have hbw {R : ℝ} (hR : 0 < R) {t : ℝ} (ht : |t| < R) (z : Phase) : + bw (t,z) = (F R hR).backward (t,z) := + (F (rad t) (hpos t)).backward_agree (F R hR) hE hB (hrad t) ht z + have hlocal (t : ℝ) : ∀ᶠ u : ℝ in 𝓝 t, |u| < rad t := + continuous_abs.continuousAt.eventually_lt_const (hrad t) + refine ⟨⟨fw,bw,?_,?_,?_,?_,?_,?_⟩⟩ + · intro z + exact (F (rad 0) (hpos 0)).initial z + · intro z t + have heq : fw z =ᶠ[𝓝 t] (F (rad t) (hpos t)).forward z := by + filter_upwards [hlocal t] with u hu + exact hfw (hpos t) hu z + exact ((F (rad t) (hpos t)).ode z t (abs_lt.mp (hrad t))).congr_of_eventuallyEq heq + · rw [contDiff_iff_contDiffAt] + intro w + have heq : (fun w : ℝ × Phase => fw w.2 w.1) =ᶠ[𝓝 w] + (fun v : ℝ × Phase => (F (rad w.1) (hpos w.1)).forward v.2 v.1) := by + filter_upwards [continuous_fst.continuousAt.tendsto.eventually (hlocal w.1)] with v hv + exact hfw (hpos w.1) hv v.2 + exact ((F (rad w.1) (hpos w.1)).smooth_forward.contDiffAt + ((isOpen_Ioo.prod isOpen_univ).mem_nhds ⟨abs_lt.mp (hrad w.1),mem_univ w.2⟩)).congr_of_eventuallyEq heq + · rw [contDiff_iff_contDiffAt] + intro w + have heq : bw =ᶠ[𝓝 w] (F (rad w.1) (hpos w.1)).backward := by + filter_upwards [continuous_fst.continuousAt.tendsto.eventually (hlocal w.1)] with v hv + exact hbw (hpos w.1) hv v.2 + exact ((F (rad w.1) (hpos w.1)).smooth_backward.contDiffAt + ((isOpen_Ioo.prod isOpen_univ).mem_nhds ⟨abs_lt.mp (hrad w.1),mem_univ w.2⟩)).congr_of_eventuallyEq heq + · intro t z + exact (F (rad t) (hpos t)).left_inverse t (abs_lt.mp (hrad t)) z + · intro t z + exact (F (rad t) (hpos t)).right_inverse t (abs_lt.mp (hrad t)) z + +namespace SmoothLorentzFlow + +variable {E B : Field} (F : SmoothLorentzFlow E B) + +def particle (f₀ : Phase → ℝ) : Particle := fun w => f₀ (F.backward w) + +lemma contDiff_particle {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) : + ContDiff ℝ ∞ (F.particle f₀) := hf.comp F.smooth_backward + +lemma particle_along (f₀ : Phase → ℝ) (t : ℝ) (z : Phase) : + F.particle f₀ (t,F.forward z t) = f₀ z := by + simp only [particle,F.left_inverse] + +lemma backward_initial (z : Phase) : F.backward (0,z) = z := by + simpa only [F.initial] using F.left_inverse 0 z + +lemma particle_initial (f₀ : Phase → ℝ) (z : Phase) : F.particle f₀ (0,z) = f₀ z := by + simp only [particle,F.backward_initial] + +lemma particle_nonneg {f₀ : Phase → ℝ} (hf : ∀ z, 0 ≤ f₀ z) (w : ℝ × Phase) : + 0 ≤ F.particle f₀ w := hf _ + +lemma particle_compact {f₀ : Phase → ℝ} (hf : HasCompactSupport f₀) (a b : ℝ) : + ∃ K : Set Phase, IsCompact K ∧ + ∀ t ∈ Icc a b, tsupport (fun z => F.particle f₀ (t,z)) ⊆ K := by + let K := (fun w : ℝ × Phase => F.forward w.2 w.1) '' (Icc a b ×ˢ tsupport f₀) + have hK : IsCompact K := (isCompact_Icc.prod hf).image F.smooth_forward.continuous + refine ⟨K,hK,?_⟩ + intro t ht + apply closure_minimal _ hK.isClosed + intro z hz + exact ⟨(t,F.backward (t,z)),⟨ht,subset_tsupport _ hz⟩,F.right_inverse t z⟩ + +lemma particle_vlasov_direction {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + (t : ℝ) (z : Phase) : + fderiv ℝ (F.particle f₀) (t,z) (1,lorentzField E B (t,z)) = 0 := by + let y := F.backward (t,z) + have hy : F.forward y t = z := F.right_inverse t z + have hd := ((F.contDiff_particle hf).differentiable (by simp) (t,F.forward y t)).hasFDerivAt.comp_hasDerivAt t + ((hasDerivAt_id t).prodMk (F.ode y t)) + have heq : (fun r => F.particle f₀ (r,F.forward y r)) = fun _ => f₀ y := by + funext r + exact F.particle_along f₀ r y + change HasDerivAt (fun r => F.particle f₀ (r,F.forward y r)) _ t at hd + rw [heq] at hd + have hh := hd.unique (hasDerivAt_const t (f₀ y)) + simpa only [hy] using hh + +lemma particle_vlasov {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + (t : ℝ) (x v : Vec) : + deriv (fun r => F.particle f₀ (r,x,v)) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => F.particle f₀ (t,y,v)) x i) + + (∑ i : Fin 3, (E (t,x)+cross (velocity v) (B (t,x))) i * + spatialPartial (fun w => F.particle f₀ (t,x,w)) v i) = 0 := by + have hh := F.particle_vlasov_direction hf t (x,v) + rw [full_directional_derivative ((F.contDiff_particle hf).differentiable (by simp) _)] at hh + exact hh + +lemma particle_vlasov_within {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + {t : ℝ} (ht : 0 ≤ t) (x v : Vec) : + derivWithin (fun r => F.particle f₀ (r,x,v)) (Ici 0) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => F.particle f₀ (t,y,v)) x i) + + (∑ i : Fin 3, (E (t,x)+cross (velocity v) (B (t,x))) i * + spatialPartial (fun w => F.particle f₀ (t,x,w)) v i) = 0 := by + have hd : DifferentiableAt ℝ (fun r => F.particle f₀ (r,x,v)) t := + ((F.contDiff_particle hf).differentiable (by simp) _).comp t + (differentiableAt_id.prodMk (differentiableAt_const (x,v))) + rw [hd.hasDerivAt.hasDerivWithinAt.derivWithin (uniqueDiffOn_Ici 0 t ht)] + exact F.particle_vlasov hf t x v + +lemma particle_local_data {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport f₀) (t : ℝ) (x : Vec) : + ∃ (U : Set (ℝ × Vec)) (K : Set Vec), + IsOpen U ∧ IsCompact K ∧ (t,x) ∈ U ∧ + ContDiffOn ℝ ∞ (particleBySpacetime (F.particle f₀)) (U ×ˢ univ) ∧ + ∀ p ∈ U, ∀ v ∉ K, particleBySpacetime (F.particle f₀) (p,v) = 0 := by + obtain ⟨K,hK,hzero⟩ := F.particle_compact hc (t-1) (t+1) + let U : Set (ℝ × Vec) := {p | p.1 ∈ Ioo (t-1) (t+1)} + refine ⟨U,Prod.snd '' K,isOpen_Ioo.preimage continuous_fst,hK.image continuous_snd, + ⟨by linarith,by linarith⟩,((F.contDiff_particle hf).comp contDiff_reassociate).contDiffOn,?_⟩ + intro p hp v hv + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 (Ioo_subset_Icc_self hp) (subset_tsupport _ hn),rfl⟩ + +lemma moment_smooth {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) (hc : HasCompactSupport f₀) + {w : Vec → W} (hw : ContDiff ℝ ∞ w) : + ContDiff ℝ ∞ (particleMoment (F.particle f₀) w) := by + rw [contDiff_iff_contDiffAt] + intro p + obtain ⟨U,K,hU,hK,hp,hf',hz⟩ := F.particle_local_data hf hc p.1 p.2 + have hs := contDiffOn_integral_uniform_support (n:=⊤) hU hK + (hf'.smul (hw.comp contDiff_snd).contDiffOn) + (fun p hp v hv => by + change particleBySpacetime (F.particle f₀) (p,v) • w v = 0 + rw [hz p hp v hv,zero_smul]) + exact hs.contDiffAt (hU.mem_nhds hp) + +lemma rho_smooth {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) (hc : HasCompactSupport f₀) : + ContDiff ℝ ∞ (fun p : ℝ × Vec => rho (fun z => F.particle f₀ (p.1,z)) p.2) := by + convert F.moment_smooth hf hc (contDiff_const (c:=(1:ℝ))) using 1 + ext p + simp [particleMoment,rho] + +lemma current_smooth {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) (hc : HasCompactSupport f₀) : + ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun z => F.particle f₀ (p.1,z)) p.2) := + F.moment_smooth hf hc contDiff_velocity + +lemma particle_moment_integrable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) (hc : HasCompactSupport f₀) + {w : Vec → W} (hw : Continuous w) (p : ℝ × Vec) : + Integrable (fun v => F.particle f₀ (p.1,p.2,v) • w v) := by + obtain ⟨U,K,hU,hK,hp,hs,hz⟩ := F.particle_local_data hf hc p.1 p.2 + have hcont : Continuous (fun v : Vec => F.particle f₀ (p.1,p.2,v)) := + (F.contDiff_particle hf).continuous.comp + (continuous_const.prodMk (continuous_const.prodMk continuous_id)) + exact (hcont.smul hw).integrable_of_hasCompactSupport + (compactSupport_of_zero_off hK (hz p hp)).smul_right + +lemma current_component {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport f₀) (p : ℝ × Vec) (i : Fin 3) : + current (fun z => F.particle f₀ (p.1,z)) p.2 i = + ∫ v : Vec, velocity v i * F.particle f₀ (p.1,p.2,v) := by + rw [current,integral_vec_apply (F.particle_moment_integrable hf hc + (contDiff_velocity (k:=1)).continuous p)] + simp only [PiLp.smul_apply,smul_eq_mul,mul_comm] + +lemma source_conservation {f₀ : Phase → ℝ} (hf : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport f₀) (t : ℝ) (x : Vec) : + dirD (fun p : ℝ × Vec => rho (fun z => F.particle f₀ (p.1,z)) p.2) (1,0) (t,x) + + divergence (fun y => current (fun z => F.particle f₀ (t,z)) y) x = 0 := by + obtain ⟨U,K,hU,hK,hp,hs,hz⟩ := F.particle_local_data hf hc t x + have he := particle_number_balance_param (E (t,x)) (B (t,x)) hU hK hp + (hs.of_le (by simp)) hz + have hv (v : Vec) : fderiv ℝ (particleBySpacetime (F.particle f₀)) ((t,x),v) + ((1,velocity v),E (t,x)+cross (velocity v) (B (t,x))) = 0 := by + rw [fderiv_particleBySpacetime ((F.contDiff_particle hf).differentiable (by simp) _)] + exact F.particle_vlasov_direction hf t (x,v) + simp only [hv,integral_zero] at he + apply Eq.trans _ he + congr 1 + unfold divergence + apply Finset.sum_congr rfl + intro i _ + have hj : DifferentiableAt ℝ (fun p : ℝ × Vec => + current (fun z => F.particle f₀ (p.1,z)) p.2 i) (t,x) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (t,x) + ((F.current_smooth hf hc).differentiable (by simp) _) + rw [spatialPartial_time_slice hj] + have heq : (fun p : ℝ × Vec => current (fun z => F.particle f₀ (p.1,z)) p.2 i) = + (fun p => ∫ v : Vec, velocity v i * particleBySpacetime (F.particle f₀) (p,v)) := + funext (fun p => F.current_component hf hc p i) + rw [heq] + +end SmoothLorentzFlow + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma waveK_congr_sphere {g h : Vec → ℝ} (t : ℝ) (x : Vec) + (he : ∀ n : Sphere, g (x+t • n.1)=h (x+t • n.1)) : + waveK g (t,x)=waveK h (t,x) := by + simp only [waveK,sphereSum] + congr 2 + exact integral_congr_ae (ae_of_all _ he) + +lemma waveK_zero_of_sphere {g : Vec → ℝ} (t : ℝ) (x : Vec) + (hz : ∀ n : Sphere, g (x+t • n.1)=0) : waveK g (t,x)=0 := by + rw [waveK_congr_sphere (h:=fun _ => 0) t x hz] + simp [waveK,sphereSum] + +lemma norm_sub_radius_le (x : Vec) (r : ℝ) (n : Sphere) : + ‖x‖-|r| ≤ ‖x+r • n.1‖ := by + have hh := norm_sub_le (x+r • n.1) (r • n.1) + rw [add_sub_cancel_right,norm_smul,Real.norm_eq_abs,sphere_norm,mul_one] at hh + linarith + +lemma waveK_zero_outside {g : Vec → ℝ} {R t : ℝ} {x : Vec} + (hz : ∀ y : Vec, R < ‖y‖ → g y=0) (hx : R+|t|<‖x‖) : + waveK g (t,x)=0 := + waveK_zero_of_sphere t x (fun n => hz _ (by linarith [norm_sub_radius_le x t n])) + +lemma sourceWave_zero_outside {ρ : ℝ × Vec → ℝ} {R T t : ℝ} {x : Vec} + (ht : t∈Icc 0 T) (hz : ∀ s∈Icc 0 T, ∀ y : Vec, R<‖y‖ → ρ (s,y)=0) + (hx : R+T<‖x‖) : sourceWave ρ (t,x)=0 := by + unfold sourceWave volterra + rw [intervalIntegral.integral_of_le ht.1] + apply integral_eq_zero_of_ae + filter_upwards [ae_restrict_mem measurableSet_Ioc] with s hs + have hs' : s∈Icc 0 t := ⟨hs.1.le,hs.2⟩ + apply waveK_zero_outside (hz s ⟨hs'.1,hs'.2.trans ht.2⟩) + rw [abs_of_nonneg (sub_nonneg.mpr hs'.2)] + change R+(t-s)<‖x‖ + linarith [ht.2,hs'.1] + +lemma sourceField_zero_outside {J : Field} {R T t : ℝ} {x : Vec} + (ht : t∈Icc 0 T) (hz : ∀ s∈Icc 0 T, ∀ y : Vec, R<‖y‖ → J (s,y)=0) + (hx : R+T<‖x‖) : sourceField J (t,x)=0 := by + ext i + apply sourceWave_zero_outside ht (fun s hs y hy => ?_) hx + simp only [hz s hs y hy,PiLp.zero_apply] + +lemma sourceField_zero (p : ℝ × Vec) : sourceField (0:Field) p=0 := by + ext i + simp [sourceField,sourceWave,volterra,sourceWaveKernel,waveK,sphereSum] + +lemma freeField_velocity_congr {G H H' : Vec → Vec} (t : ℝ) (x : Vec) + (he : ∀ n : Sphere, H (x+t • n.1)=H' (x+t • n.1)) : + freeField G H (t,x)=freeField G H' (t,x) := by + ext i + change freeWave (fun y => G y i) (fun y => H y i) (t,x)= + freeWave (fun y => G y i) (fun y => H' y i) (t,x) + unfold freeWave + rw [waveK_congr_sphere (h:=fun y => H' y i) t x (fun n => congrArg (fun v : Vec => v i) (he n))] + +lemma fderiv_zero_outside_spatial {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × Vec → W} {a b R t : ℝ} {x : Vec} + (hz : ∀ s∈Icc a b, ∀ y : Vec, R<‖y‖ → F (s,y)=0) + (ht : t∈Ioo a b) (hx : R<‖x‖) : fderiv ℝ F (t,x)=0 := by + have he : F =ᶠ[𝓝 (t,x)] fun _ => (0:W) := by + have hu : IsOpen {p : ℝ × Vec | p.1∈Ioo a b ∧ R<‖p.2‖} := + (isOpen_Ioo.preimage continuous_fst).inter (isOpen_lt continuous_const continuous_snd.norm) + filter_upwards [hu.mem_nhds ⟨ht,hx⟩] with p hp + exact hz p.1 (Ioo_subset_Icc_self hp.1) p.2 hp.2 + rw [he.fderiv_eq] + exact fderiv_const_apply (0:W) + +lemma waveGradient_zero_outside {ρ : ℝ × Vec → ℝ} {a b R t : ℝ} {x : Vec} + (hz : ∀ s∈Icc a b, ∀ y : Vec, R<‖y‖ → ρ (s,y)=0) + (ht : t∈Ioo a b) (hx : R<‖x‖) : waveGradient ρ (t,x)=0 := by + ext i + change dirD ρ (0,basis i) (t,x)=0 + simp [dirD,fderiv_zero_outside_spatial hz ht hx] + +lemma spaceCurl_zero_outside {J : Field} {a b R t : ℝ} {x : Vec} + (hz : ∀ s∈Icc a b, ∀ y : Vec, R<‖y‖ → J (s,y)=0) + (ht : t∈Ioo a b) (hx : R<‖x‖) : spaceCurl J (t,x)=0 := by + ext i + simp [spaceCurl,dirD,fderiv_zero_outside_spatial hz ht hx] + +namespace SmoothLorentzFlow + +lemma source_spatial_support {E B : Field} (F : SmoothLorentzFlow E B) + {f₀ : Phase → ℝ} (hc : HasCompactSupport f₀) (a b : ℝ) : + ∃ R : ℝ, 0 ≤ R ∧ ∀ t∈Icc a b, ∀ x : Vec, R<‖x‖ → + rho (fun z => F.particle f₀ (t,z)) x=0 ∧ + current (fun z => F.particle f₀ (t,z)) x=0 := by + obtain ⟨K,hK,hz⟩ := F.particle_compact hc a b + obtain ⟨R,hR⟩ := (hK.image continuous_fst).isBounded.exists_norm_le + refine ⟨max R 0,le_max_right _ _,?_⟩ + intro t ht x hx + have he (v : Vec) : F.particle f₀ (t,x,v)=0 := by + by_contra hn + have hh := hR x ⟨(x,v),hz t ht (subset_tsupport _ hn),rfl⟩ + exact (not_lt_of_ge (hh.trans (le_max_left _ _))) hx + simp [rho,current,he] + +end SmoothLorentzFlow + +lemma maxwell_perturbation_zero_outside {E₀ B₀ : Vec → Vec} + {ρ : ℝ × Vec → ℝ} {j : Field} {R T t : ℝ} {x : Vec} + (hDE : ∀ y, divergence E₀ y=ρ (0,y)) + (hz : ∀ s∈Icc (-1) (T+1), ∀ y : Vec, R<‖y‖ → ρ (s,y)=0 ∧ j (s,y)=0) + (ht : t∈Icc 0 T) (hx : R+T<‖x‖) : + maxwellElectric E₀ B₀ ρ j (t,x)=freeMaxwellElectric E₀ B₀ (t,x) ∧ + maxwellMagnetic E₀ B₀ j (t,x)=freeMaxwellMagnetic E₀ B₀ (t,x) := by + have hT : 0 ≤ T := ht.1.trans ht.2 + have h0 : (0:ℝ)∈Icc (-1) (T+1) := ⟨by norm_num,by linarith⟩ + have hρz := fun s hs y hy => (hz s hs y hy).1 + have hjz := fun s hs y hy => (hz s hs y hy).2 + have hEz : sourceField (fun q => -waveGradient ρ q-dirD j (1,0) q) (t,x)=0 := by + apply sourceField_zero_outside ht _ hx + intro s hs y hy + have hi : s∈Ioo (-1) (T+1) := ⟨by linarith [hs.1],by linarith [hs.2]⟩ + simp only [waveGradient_zero_outside hρz hi hy,neg_zero,dirD, + fderiv_zero_outside_spatial hjz hi hy,zero_apply,sub_self] + have hEz' : sourceField (fun q => + -waveGradient (fun p : ℝ × Vec => divergence E₀ p.2) q-dirD (0:Field) (1,0) q) (t,x)=0 := by + apply sourceField_zero_outside ht _ hx + intro s hs y hy + have hi : s∈Ioo (-1) (T+1) := ⟨by linarith [hs.1],by linarith [hs.2]⟩ + have hstat : ∀ r∈Icc (-1) (T+1), ∀ z : Vec, R<‖z‖ → + (fun p : ℝ × Vec => divergence E₀ p.2) (r,z)=0 := by + intro r hr z hz' + exact (hDE z).trans (hρz 0 h0 z hz') + rw [waveGradient_zero_outside hstat hi hy] + simp [dirD] + have hBz : sourceField (spaceCurl j) (t,x)=0 := by + apply sourceField_zero_outside ht _ hx + intro s hs y hy + exact spaceCurl_zero_outside hjz ⟨by linarith [hs.1],by linarith [hs.2]⟩ hy + have hBz' : sourceField (spaceCurl (0:Field)) (t,x)=0 := by + apply sourceField_zero_outside ht _ hx + intro s hs y hy + exact spaceCurl_zero_outside (a:=(-1)) (b:=T+1) (R:=R) + (fun _ _ _ _ => rfl) ⟨by linarith [hs.1],by linarith [hs.2]⟩ hy + constructor + · simp only [maxwellElectric,freeMaxwellElectric,hEz,hEz',add_zero] + apply freeField_velocity_congr + intro n + have hn : R<‖x+t • n.1‖ := by + have hh := norm_sub_radius_le x t n + rw [abs_of_nonneg ht.1] at hh + linarith [ht.2] + simp only [hjz 0 h0 _ hn,Pi.zero_apply,sub_zero] + · simp only [maxwellMagnetic,freeMaxwellMagnetic,hBz,hBz',add_zero] + +lemma TimeContinuousL2.add {F G : Field} (hF : TimeContinuousL2 F) (hG : TimeContinuousL2 G) : + TimeContinuousL2 (fun p => F p+G p) := by + obtain ⟨F₂,hFc,hFe⟩ := hF + obtain ⟨G₂,hGc,hGe⟩ := hG + refine ⟨fun t => F₂ t+G₂ t,hFc.add hGc,?_⟩ + intro t ht + filter_upwards [Lp.coeFn_add (F₂ t) (G₂ t),hFe t ht,hGe t ht] with x he hf hg + simpa only [Pi.add_apply,hf,hg] using he + +lemma timeContinuousL2_congr {F G : Field} (hF : TimeContinuousL2 F) + (he : ∀ t, 0 ≤ t → ∀ x, F (t,x)=G (t,x)) : TimeContinuousL2 G := by + obtain ⟨F₂,hFc,hFe⟩ := hF + refine ⟨F₂,hFc,fun t ht => (hFe t ht).trans ?_⟩ + exact ae_of_all _ (he t ht) + +lemma timeContinuousL2_compact {F : Field} (hF : Continuous F) + (hK : ∀ T, 0 ≤ T → ∃ K : Set Vec, IsCompact K ∧ + ∀ t∈Icc 0 T, ∀ x∉K, F (t,x)=0) : TimeContinuousL2 F := by + have hLp (t : ℝ) (ht : 0 ≤ t) : MemLp (fun x => F (t,x)) 2 volume := by + obtain ⟨K,hK,hz⟩ := hK t ht + exact (hF.comp (continuous_const.prodMk continuous_id)).memLp_of_hasCompactSupport + (compactSupport_of_zero_off hK (hz t ⟨ht,le_rfl⟩)) + have he : ContinuousOn (fun t => ∫ x : Vec, ‖F (t,x)‖^2) (Ici 0) := by + intro s hs + change 0 ≤ s at hs + obtain ⟨K,hK,hz⟩ := hK (s+1) (by linarith : 0 ≤ s+1) + have hc : ContinuousOn (fun t => ∫ x : Vec, ‖F (t,x)‖^2) (Icc 0 (s+1)) := + continuousOn_integral_uniform_support hK (hF.norm.pow 2).continuousOn + (fun t ht x hx => by change ‖F (t,x)‖^2=0; rw [hz t ht x hx]; simp) + apply (hc s ⟨hs,by linarith⟩).mono_of_mem_nhdsWithin + filter_upwards [self_mem_nhdsWithin, + mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds (lt_add_one s))] with t ht ht' + exact ⟨ht,ht'.le⟩ + have hh := timeContinuousL2_of_continuous_energy (B:=0) hF continuous_const + (fun t ht => ⟨hLp t ht,MemLp.zero⟩) (by simpa using he) + exact hh.1 + +lemma maxwell_timeContinuousL2 {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) + (hE0 : MemLp E₀ 2 volume) (hB0 : MemLp B₀ 2 volume) + (hDE : ∀ x, divergence E₀ x=ρ (0,x)) (hDB : ∀ x, divergence B₀ x=0) + (hK : ∀ T, 0 ≤ T → ∃ R : ℝ, ∀ s∈Icc (-1) (T+1), ∀ y : Vec, + R<‖y‖ → ρ (s,y)=0 ∧ j (s,y)=0) : + TimeContinuousL2 (maxwellElectric E₀ B₀ ρ j) ∧ + TimeContinuousL2 (maxwellMagnetic E₀ B₀ j) := by + have hh := freeMaxwell_evolution hE hB hE0 hB0 hDB + have hEc := contDiff_maxwellElectric hE hB hρ hj + have hBc := contDiff_maxwellMagnetic hE hB hj + have hδEc := hEc.continuous.sub hh.1.continuous + have hδBc := hBc.continuous.sub hh.2.1.continuous + have hδK (T : ℝ) (hT : 0 ≤ T) : ∃ K : Set Vec, IsCompact K ∧ + ∀ t∈Icc 0 T, ∀ x∉K, + (maxwellElectric E₀ B₀ ρ j (t,x)-freeMaxwellElectric E₀ B₀ (t,x)=0) ∧ + (maxwellMagnetic E₀ B₀ j (t,x)-freeMaxwellMagnetic E₀ B₀ (t,x)=0) := by + obtain ⟨R,hR⟩ := hK T hT + refine ⟨closedBall (0:Vec) (R+T),isCompact_closedBall _ _,?_⟩ + intro t ht x hx + have hn : R+T<‖x‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hx + obtain ⟨he,hb⟩ := maxwell_perturbation_zero_outside hDE hR ht hn + exact ⟨sub_eq_zero.mpr he,sub_eq_zero.mpr hb⟩ + have hδE := timeContinuousL2_compact hδEc (fun T hT => by + obtain ⟨K,hK,hz⟩ := hδK T hT + exact ⟨K,hK,fun t ht x hx => (hz t ht x hx).1⟩) + have hδB := timeContinuousL2_compact hδBc (fun T hT => by + obtain ⟨K,hK,hz⟩ := hδK T hT + exact ⟨K,hK,fun t ht x hx => (hz t ht x hx).2⟩) + constructor + · exact timeContinuousL2_congr (hh.2.2.2.1.add hδE) (fun _ _ _ => add_sub_cancel _ _) + · exact timeContinuousL2_congr (hh.2.2.2.2.1.add hδB) (fun _ _ _ => add_sub_cancel _ _) + +def MaxwellFor (s : Solution) : Prop := ∀ t, 0 ≤ t → ∀ x, + dirD s.E (1,0) (t,x)=spaceCurl s.B (t,x)-current (fun z => s.f (t,z)) x ∧ + dirD s.B (1,0) (t,x)= -spaceCurl s.E (t,x) ∧ + spaceDiv s.E (t,x)=rho (fun z => s.f (t,z)) x ∧ spaceDiv s.B (t,x)=0 + +def TransportFor (s : Solution) (E B : Field) : Prop := ∀ t (z : Phase), + fderiv ℝ s.f (t,z) (1,lorentzField E B (t,z))=0 + +theorem exists_picard_step {d : Datum} (hd : Admissible d) {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ∃ s : Solution, + ContDiff ℝ ∞ s.f ∧ ContDiff ℝ ∞ s.E ∧ ContDiff ℝ ∞ s.B ∧ + (∀ p, 0 ≤ s.f p) ∧ CompactOnFiniteHorizons s ∧ + TimeContinuousL2 s.E ∧ TimeContinuousL2 s.B ∧ + (∀ z, s.f (0,z)=d.f₀ z) ∧ (∀ x, s.E (0,x)=d.E₀ x) ∧ + (∀ x, s.B (0,x)=d.B₀ x) ∧ MaxwellFor s ∧ TransportFor s E B := by + obtain ⟨hf,hc,hn,hE0,hB0,hEL,hBL,hDE,hDB⟩ := hd + obtain ⟨F⟩ := exists_smoothLorentzFlow hE hB + let f := F.particle d.f₀ + let ρ : ℝ × Vec → ℝ := fun p => rho (fun z => f (p.1,z)) p.2 + let j : Field := fun p => current (fun z => f (p.1,z)) p.2 + have hρ : ContDiff ℝ ∞ ρ := F.rho_smooth hf hc + have hj : ContDiff ℝ ∞ j := F.current_smooth hf hc + have hρ0 (x : Vec) : divergence d.E₀ x=ρ (0,x) := by + simpa only [ρ,f,F.particle_initial] using hDE x + let s : Solution := ⟨f,maxwellElectric d.E₀ d.B₀ ρ j,maxwellMagnetic d.E₀ d.B₀ j⟩ + have hsc : ∀ t, 0 s.f (r,x,v)) t := + (hf.differentiable (by simp) _).comp t + (differentiableAt_id.prodMk (differentiableAt_const (x,v))) + rw [hd.hasDerivAt.hasDerivWithinAt.derivWithin (uniqueDiffOn_Ici 0 t ht)] + exact hv + · intro x + rw [derivWithin_slice_eq_dirD (hE.differentiable (by simp)) ht, + (hM t ht x).1,spaceCurl_slice (hB.differentiable (by simp))] + module + · intro x + rw [derivWithin_slice_eq_dirD (hB.differentiable (by simp)) ht, + (hM t ht x).2.1,spaceCurl_slice (hE.differentiable (by simp))] + module + · intro x + rw [←spaceDiv_slice (hE.differentiable (by simp))] + exact (hM t ht x).2.2.1 + · intro x + rw [←spaceDiv_slice (hB.differentiable (by simp))] + exact (hM t ht x).2.2.2 + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Main.lean b/lean/OAI/Analysis/VlasovMaxwell/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..27c4af45312b02fffdd8b3014084dc5d398a36a7 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Main.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.GeometryCutoffDeficitLogSum +import OAI.Analysis.VlasovMaxwell.LocalPDE.SmoothLocalExistence +import OAI.Analysis.VlasovMaxwell.Continuation.PrefixUniqueness +import OAI.Analysis.VlasovMaxwell.Continuation.GlobalContinuation +import OAI.Analysis.VlasovMaxwell.Population.MagneticEstimates +import OAI.Analysis.VlasovMaxwell.Population.BulkSpatialUniform +import OAI.Analysis.VlasovMaxwell.Population.BulkReceiverScalar +import OAI.Analysis.VlasovMaxwell.Population.SelectedRemainder +import OAI.Analysis.VlasovMaxwell.Population.BulkWeightCost +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedLargeAngular +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedDeficitUniform +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedAssemble +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedTransportNear +import OAI.Analysis.VlasovMaxwell.Population.BulkReceiverResidual +import OAI.Analysis.VlasovMaxwell.Retarded.DirectMixedCover +import OAI.Analysis.VlasovMaxwell.Population.GoodSharedEstimates +import OAI.Analysis.VlasovMaxwell.Retarded.DirectSmallAbsolute +import OAI.Analysis.VlasovMaxwell.Retarded.DirectLorentzUniform + +namespace OAI + +/-! Global classical solvability and uniqueness for smooth admissible data. -/ + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma Admissible.uniform_physical_population_increment {d : Datum} (hd : Admissible d) + (H : ℝ) : + ∃ M A P₀ : ℝ, 0 < M ∧ 0 < A ∧ + ∀ U : ℝ, 0 < U → U ≤ H → ∀ s : Solution, + BoundedClassicalPrefix d s U → ∀ F : PhaseFlowOn s.E s.B U, + PopulationIncrement (fun z t => (F.flow z t).2) (tsupport d.f₀) U M A P₀ := by + obtain ⟨M, A, P₀, hM, hA, hP₀, hinc⟩ := hd.population_increment H + refine ⟨M, A, P₀, hM, hA, ?_⟩ + intro U hU hUH s hs F + apply hinc s U F.flow hUH + intro τ hτ + exact ⟨hs.classical.restrict hτ.2.le, F.restrict hτ.2.le, rfl⟩ + +theorem global_classical_solution (d : Datum) (hd : Admissible d) : + ∃ s : Solution, Classical d s ∧ SmoothOnFiniteHorizons s ∧ + ∀ s' : Solution, Classical d s' → SameNonnegativeTime s s' := by + exact global_classical_of_uniform_physical_increment hd + (fun H _ => hd.uniform_physical_population_increment H) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/DifferenceFieldEnergy.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/DifferenceFieldEnergy.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1a4a61abaf57706ec356cc78227ec55d613780d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/DifferenceFieldEnergy.lean @@ -0,0 +1,766 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.SourceField + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology ContDiff + +namespace RVM +lemma difference_source_pointwise {g L : ℝ} {D : Vec →L[ℝ] ℝ} {E B : Vec} + (hL : 0 ≤ L) (hD : ‖D‖ ≤ L) (v : Vec) : + -g*D (E+cross (velocity v) B)-dot E (g • velocity v) ≤ + (2*L+2)*(g^2/2+(‖E‖^2+‖B‖^2)/2) := by + have hu := (norm_velocity_lt_one v).le + have hK : ‖E+cross (velocity v) B‖ ≤ ‖E‖+‖B‖ := + (norm_add_le _ _).trans (add_le_add le_rfl + ((norm_cross_le _ _).trans (mul_le_of_le_one_left (norm_nonneg B) hu))) + have hd : |D (E+cross (velocity v) B)| ≤ L*(‖E‖+‖B‖) := + (D.le_opNorm _).trans (mul_le_mul hD hK (norm_nonneg _) hL) + have hdot : |dot E (g • velocity v)| ≤ ‖E‖*|g| := by + rw [dot_eq_inner] + apply (abs_real_inner_le_norm _ _).trans + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (mul_le_of_le_one_right (abs_nonneg g) hu) (norm_nonneg E) + have hab : |g| *(‖E‖+‖B‖) ≤ g^2+(‖E‖^2+‖B‖^2)/2 := by + nlinarith [sq_nonneg (|g|-‖E‖),sq_nonneg (|g|-‖B‖),sq_abs g] + calc + _ ≤ |g| *|D (E+cross (velocity v) B)|+|dot E (g • velocity v)| := by + have hh := neg_le_abs (g*D (E+cross (velocity v) B)) + rw [abs_mul] at hh + linarith [neg_le_abs (dot E (g • velocity v))] + _ ≤ |g| *(L*(‖E‖+‖B‖))+‖E‖*|g| := + add_le_add (mul_le_mul_of_nonneg_left hd (abs_nonneg g)) hdot + _ ≤ (L+1)* (|g| *(‖E‖+‖B‖)) := by + nlinarith [mul_nonneg (abs_nonneg g) (norm_nonneg B)] + _ ≤ (L+1)*(g^2+(‖E‖^2+‖B‖^2)/2) := + mul_le_mul_of_nonneg_left hab (by linarith) + _ ≤ _ := by nlinarith [sq_nonneg ‖E‖,sq_nonneg ‖B‖] + +lemma compact_difference_source_bound + {g : Vec → ℝ} {D : Vec → (Vec →L[ℝ] ℝ)} {K : Set Vec} {L : ℝ} (E B : Vec) + (hg : Continuous g) (hD : Continuous D) (hK : IsCompact K) + (hz : ∀ v ∉ K, g v=0) (hL : 0 ≤ L) (hDb : ∀ v, ‖D v‖ ≤ L) : + (∫ v : Vec, -g v * D v (E+cross (velocity v) B)-dot E (g v • velocity v)) ≤ + ((2*L+2)*(1+(volume K).toReal))* + ((‖E‖^2+‖B‖^2)/2+(∫ v : Vec, (g v)^2/2)) := by + let c : ℝ := (‖E‖^2+‖B‖^2)/2 + have hc : 0 ≤ c := div_nonneg (add_nonneg (sq_nonneg _) (sq_nonneg _)) (by norm_num) + have hgI : Integrable (fun v : Vec => (g v)^2/2) := + ((hg.pow 2).div_const 2).integrable_of_hasCompactSupport (by + apply compactSupport_of_zero_off hK + intro v hv + simp [hz v hv]) + have hsC : Continuous (fun v : Vec => -g v * D v (E+cross (velocity v) B)-dot E (g v • velocity v)) := by + apply Continuous.sub ((hg.neg).mul (hD.clm_apply (contDiff_lorentz (k := 1) E B).continuous)) + simp_rw [dot_eq_inner] + exact continuous_const.inner (hg.smul (contDiff_velocity (k := 1)).continuous) + have hs0 : ∀ v ∉ K, -g v * D v (E+cross (velocity v) B)-dot E (g v • velocity v) = 0 := by + intro v hv + simp [hz v hv,dot] + have hsI : Integrable (fun v : Vec => -g v * D v (E+cross (velocity v) B)-dot E (g v • velocity v)) := hsC.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK hs0) + have hcI : IntegrableOn (fun _ : Vec => c) K volume := + integrableOn_const hK.measure_lt_top.ne + have hm : (∫ v : Vec, (g v)^2/2) ≥ 0 := integral_nonneg (fun v => by positivity) + calc + _ = ∫ v in K, -g v * D v (E+cross (velocity v) B)-dot E (g v • velocity v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero hs0).symm + _ ≤ ∫ v in K, (2*L+2)*((g v)^2/2+c) := by + apply integral_mono hsI.integrableOn ((hgI.integrableOn.add hcI).const_mul _) + intro v + exact difference_source_pointwise hL (hDb v) v + _ = (2*L+2)*((∫ v : Vec, (g v)^2/2)+(volume K).toReal*c) := by + rw [integral_const_mul,integral_add hgI.integrableOn hcI, + setIntegral_eq_integral_of_forall_compl_eq_zero (fun v hv => by simp [hz v hv]), + integral_const] + simp [measureReal_def] + _ ≤ _ := by + have hv := ENNReal.toReal_nonneg (a := volume K) + dsimp [c] at * + nlinarith [mul_nonneg hv hm,mul_nonneg (by linarith : 0 ≤ 2*L+2) + (add_nonneg (mul_nonneg hv hm) hc)] + +lemma squareDifference_regular {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) : + RegularParticle (squareDifference s₁ s₂) := by + refine ⟨((h₁.1.sub h₂.1).pow 2).div_const 2,?_⟩ + intro T hT + obtain ⟨K₁,hK₁,hz₁⟩ := h₁.regularParticle.2 T hT + obtain ⟨K₂,hK₂,hz₂⟩ := h₂.regularParticle.2 T hT + refine ⟨K₁ ∪ K₂,hK₁.union hK₂,?_⟩ + intro t ht + apply closure_minimal ?_ (hK₁.union hK₂).isClosed + intro z hz + by_contra hn + have hf₁ : s₁.f (t,z)=0 := image_eq_zero_of_notMem_tsupport (f := fun z => s₁.f (t,z)) + (fun hh => hn (Or.inl (hz₁ t ht hh))) + have hf₂ : s₂.f (t,z)=0 := image_eq_zero_of_notMem_tsupport (f := fun z => s₂.f (t,z)) + (fun hh => hn (Or.inr (hz₂ t ht hh))) + exact hz (by simp [squareDifference,hf₁,hf₂]) + +lemma particleMoment_one (f : Particle) (p : ℝ × Vec) : + particleMoment f (fun _ => (1:ℝ)) p = ∫ v : Vec, f (p.1,p.2,v) := by + simp [particleMoment] + +lemma RegularParticle.moment_component {f : Particle} (hf : RegularParticle f) + {w : Vec → Vec} (hw : Continuous w) {t : ℝ} (ht : 0 ≤ t) (x : Vec) (i : Fin 3) : + particleMoment f w (t,x) i = ∫ v : Vec, w v i * f (t,x,v) := by + have hi := hf.moment_integrable hw ht x + have he := (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi + simpa [particleMoment,mul_comm] using he.symm + +lemma particle_difference_local {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 < t) (x : Vec) : + deriv (fun r => particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (r,x)) t + + divergence (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = + ∫ v : Vec, -(s₁.f (t,x,v)-s₂.f (t,x,v)) * + fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) := by + have hf := squareDifference_regular h₁ h₂ + obtain ⟨U,K,hU,hK,hp,hF,hz⟩ := hf.local_data ht x + have he := particle_number_balance_param (s₁.E (t,x)) (s₁.B (t,x)) hU hK hp hF hz + have he' : (∫ v : Vec, fderiv ℝ (particleBySpacetime (squareDifference s₁ s₂)) ((t,x),v) + ((1,velocity v),s₁.E (t,x)+cross (velocity v) (s₁.B (t,x)))) = _ := + integral_congr_ae (Filter.Eventually.of_forall (particle_difference_direction h₁ h₂ ht x)) + rw [he'] at he + have hn := (hf.moment_regular (w := fun _ => (1:ℝ)) contDiff_const).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + rw [deriv_time_slice (hn.differentiableAt (by simp))] + apply Eq.trans ?_ he + congr 1 + · congr 2 + ext p + exact particleMoment_one _ p + · apply Finset.sum_congr rfl + intro i _ + have hflux := (hf.moment_regular contDiff_velocity).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hc : DifferentiableAt ℝ (fun p => particleMoment (squareDifference s₁ s₂) velocity p i) (t,x) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (t,x) + (hflux.differentiableAt (by simp)) + rw [spatialPartial_time_slice hc] + have heq : (fun p : ℝ × Vec => particleMoment (squareDifference s₁ s₂) velocity p i) =ᶠ[nhds (t,x)] + (fun p => ∫ v : Vec, velocity v i * particleBySpacetime (squareDifference s₁ s₂) (p,v)) := by + filter_upwards [(isOpen_lt continuous_const continuous_fst).mem_nhds ht] with p hp + exact hf.moment_component (contDiff_velocity (k := 1)).continuous hp.le p.2 i + rw [heq.fderiv_eq (𝕜 := ℝ)] + +lemma curl_sub {F G : Vec → Vec} {x : Vec} + (hF : DifferentiableAt ℝ F x) (hG : DifferentiableAt ℝ G x) : + curl (F-G) x = curl F x - curl G x := by + have h (i : Fin 3) : fderiv ℝ (fun y => F y i-G y i) x = + fderiv ℝ (fun y => F y i) x - fderiv ℝ (fun y => G y i) x := by + exact fderiv_sub + ((PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hF) + ((PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hG) + ext i + fin_cases i <;> simp [curl,spatialPartial,h] <;> ring + +lemma difference_maxwell_local {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 < t) (x : Vec) : + deriv (fun r => (‖s₁.E (r,x)-s₂.E (r,x)‖^2+‖s₁.B (r,x)-s₂.B (r,x)‖^2)/2) t + + divergence (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y))) x = + -dot (s₁.E (t,x)-s₂.E (t,x)) + (current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x) := by + have hE₁ := field_differentiableAt_positive h₁.2.1 ht x + have hB₁ := field_differentiableAt_positive h₁.2.2.1 ht x + have hE₂ := field_differentiableAt_positive h₂.2.1 ht x + have hB₂ := field_differentiableAt_positive h₂.2.2.1 ht x + have hE₁t : DifferentiableAt ℝ (fun r : ℝ => s₁.E (r,x)) t := hE₁.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hB₁t : DifferentiableAt ℝ (fun r : ℝ => s₁.B (r,x)) t := hB₁.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hE₂t : DifferentiableAt ℝ (fun r : ℝ => s₂.E (r,x)) t := hE₂.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hB₂t : DifferentiableAt ℝ (fun r : ℝ => s₂.B (r,x)) t := hB₂.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hE₁x : DifferentiableAt ℝ (fun y : Vec => s₁.E (t,y)) x := hE₁.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hB₁x : DifferentiableAt ℝ (fun y : Vec => s₁.B (t,y)) x := hB₁.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hE₂x : DifferentiableAt ℝ (fun y : Vec => s₂.E (t,y)) x := hE₂.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hB₂x : DifferentiableAt ℝ (fun y : Vec => s₂.B (t,y)) x := hB₂.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have he₁ := (h₁.2.2.2.2.2.2.2.1 t ht.le).2.1 x + have hb₁ := (h₁.2.2.2.2.2.2.2.1 t ht.le).2.2.1 x + have he₂ := (h₂.2.2.2.2.2.2.2.1 t ht.le).2.1 x + have hb₂ := (h₂.2.2.2.2.2.2.2.1 t ht.le).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at he₁ hb₁ he₂ hb₂ + apply maxwell_energy_balance (E := s₁.E-s₂.E) (B := s₁.B-s₂.B) (hE₁.sub hE₂) (hB₁.sub hB₂) + · change deriv ((fun r => s₁.E (r,x))-(fun r => s₂.E (r,x))) t - + curl ((fun y => s₁.B (t,y))-(fun y => s₂.B (t,y))) x = _ + rw [deriv_sub hE₁t hE₂t,curl_sub hB₁x hB₂x] + calc + _ = (deriv (fun r => s₁.E (r,x)) t-curl (fun y => s₁.B (t,y)) x)- + (deriv (fun r => s₂.E (r,x)) t-curl (fun y => s₂.B (t,y)) x) := by abel + _ = _ := by rw [he₁,he₂]; abel + · change deriv ((fun r => s₁.B (r,x))-(fun r => s₂.B (r,x))) t + + curl ((fun y => s₁.E (t,y))-(fun y => s₂.E (t,y))) x = _ + rw [deriv_sub hB₁t hB₂t,curl_sub hE₁x hE₂x] + calc + _ = (deriv (fun r => s₁.B (r,x)) t+curl (fun y => s₁.E (t,y)) x)- + (deriv (fun r => s₂.B (r,x)) t+curl (fun y => s₂.E (t,y)) x) := by abel + _ = _ := by rw [hb₁,hb₂]; simp + +def differenceFieldEnergy (s₁ s₂ : Solution) (p : ℝ × Vec) : ℝ := + (‖s₁.E p-s₂.E p‖^2+‖s₁.B p-s₂.B p‖^2)/2 + +def differenceEnergy (s₁ s₂ : Solution) (p : ℝ × Vec) : ℝ := + differenceFieldEnergy s₁ s₂ p+particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) p + +def differenceFlux (s₁ s₂ : Solution) (p : ℝ × Vec) : Vec := + cross (s₁.E p-s₂.E p) (s₁.B p-s₂.B p)+particleMoment (squareDifference s₁ s₂) velocity p + +lemma differenceFieldEnergy_nonneg (s₁ s₂ : Solution) (p : ℝ × Vec) : + 0 ≤ differenceFieldEnergy s₁ s₂ p := by + exact div_nonneg (add_nonneg (sq_nonneg _) (sq_nonneg _)) (by norm_num) + +lemma differenceEnergy_nonneg (s₁ s₂ : Solution) (p : ℝ × Vec) : + 0 ≤ differenceEnergy s₁ s₂ p := by + apply add_nonneg (differenceFieldEnergy_nonneg _ _ _) + rw [particleMoment_one] + exact integral_nonneg (fun v => squareDifference_nonneg _ _ _) + +lemma differenceEnergy_regular {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) : + ContDiffOn ℝ 1 (differenceEnergy s₁ s₂) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.sub h₂.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + have hb := (h₁.2.2.1.sub h₂.2.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + exact ((he.norm_sq ℝ).add (hb.norm_sq ℝ)).div_const 2 |>.add + ((squareDifference_regular h₁ h₂).moment_regular contDiff_const) + +lemma differenceFlux_regular {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) : + ContDiffOn ℝ 1 (differenceFlux s₁ s₂) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.sub h₂.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + have hb := (h₁.2.2.1.sub h₂.2.2.1).mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun p hp => show 0 ≤ p.1 from hp.1.le) + exact ((contDiff_cross (k := 1)).contDiffOn.comp (he.prodMk hb) + (fun _ _ => mem_univ _)).add + ((squareDifference_regular h₁ h₂).moment_regular contDiff_velocity) + +lemma differenceEnergy_continuous_slab {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (differenceEnergy s₁ s₂) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have he := (h₁.2.1.continuousOn.sub h₂.2.1.continuousOn).mono + (show Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from fun p hp => hp.1.1) + have hb := (h₁.2.2.1.continuousOn.sub h₂.2.2.1.continuousOn).mono + (show Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from fun p hp => hp.1.1) + exact ((he.norm.pow 2).add (hb.norm.pow 2)).div_const 2 |>.add + ((squareDifference_regular h₁ h₂).moment_continuous_slab continuous_const hT) + +lemma differenceEnergy_integrable {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 ≤ t) : + Integrable (fun x : Vec => differenceEnergy s₁ s₂ (t,x)) := by + exact (((h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).integrable_norm_sq ht).add + ((h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).integrable_norm_sq ht)).div_const 2 |>.add + ((squareDifference_regular h₁ h₂).spatial_moment_integrable continuous_const ht) + +lemma differenceEnergy_integrated_continuous {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun t => ∫ x : Vec, differenceEnergy s₁ s₂ (t,x)) (Icc 0 T) := by + have he := (h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).continuous_integral_norm_sq.mono + (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + have hb := (h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).continuous_integral_norm_sq.mono + (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + have hp := (squareDifference_regular h₁ h₂).integrated_moment_continuous + (w := fun _ => (1:ℝ)) continuous_const hT + apply ((he.add hb).div_const 2 |>.add hp).congr + intro t ht + change (∫ x : Vec, (‖(s₁.E-s₂.E) (t,x)‖^2+‖(s₁.B-s₂.B) (t,x)‖^2)/2+ + particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)) = _ + have hiE := (h₁.2.2.2.2.1.sub h₂.2.2.2.2.1).integrable_norm_sq ht.1 + have hiB := (h₁.2.2.2.2.2.1.sub h₂.2.2.2.2.2.1).integrable_norm_sq ht.1 + have hiP := (squareDifference_regular h₁ h₂).spatial_moment_integrable + (w := fun _ => (1:ℝ)) continuous_const ht.1 + calc + _ = (∫ x : Vec, (‖(s₁.E-s₂.E) (t,x)‖^2+‖(s₁.B-s₂.B) (t,x)‖^2)/2)+ + (∫ x : Vec, particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)) := + integral_add ((hiE.add hiB).div_const 2) hiP + _ = _ := by rw [integral_div,integral_add hiE hiB]; rfl + +lemma differenceFlux_bound {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ‖differenceFlux s₁ s₂ (t,x)‖ ≤ differenceEnergy s₁ s₂ (t,x) := by + apply (norm_add_le _ _).trans + apply add_le_add ?_ ((squareDifference_regular h₁ h₂).velocity_flux_bound ht x + (fun v => squareDifference_nonneg _ _ _)) + apply (norm_cross_le _ _).trans + dsimp [differenceFieldEnergy] + nlinarith [sq_nonneg (‖s₁.E (t,x)-s₂.E (t,x)‖-‖s₁.B (t,x)-s₂.B (t,x)‖)] + +lemma differenceEnergy_initial {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) (x : Vec) : + differenceEnergy s₁ s₂ (0,x) = 0 := by + have hf (v : Vec) : squareDifference s₁ s₂ (0,x,v)=0 := by + rw [squareDifference_zero_iff,h₁.2.2.2.2.2.2.2.2.1,h₂.2.2.2.2.2.2.2.2.1] + simp [differenceEnergy,differenceFieldEnergy,particleMoment_one,hf, + h₁.2.2.2.2.2.2.2.2.2.1,h₁.2.2.2.2.2.2.2.2.2.2, + h₂.2.2.2.2.2.2.2.2.2.1,h₂.2.2.2.2.2.2.2.2.2.2] + +lemma differenceEnergy_local {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 < t) (x : Vec) : + fderiv ℝ (differenceEnergy s₁ s₂) (t,x) (1,0)+ + divergence (fun y => differenceFlux s₁ s₂ (t,y)) x = + ∫ v : Vec, -(s₁.f (t,x,v)-s₂.f (t,x,v)) * + fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) - + dot (s₁.E (t,x)-s₂.E (t,x)) ((s₁.f (t,x,v)-s₂.f (t,x,v)) • velocity v) := by + have hE := (field_differentiableAt_positive h₁.2.1 ht x).sub + (field_differentiableAt_positive h₂.2.1 ht x) + have hB := (field_differentiableAt_positive h₁.2.2.1 ht x).sub + (field_differentiableAt_positive h₂.2.2.1 ht x) + have hfield : DifferentiableAt ℝ (differenceFieldEnergy s₁ s₂) (t,x) := by + unfold differenceFieldEnergy + convert ((hE.norm_sq (𝕜 := ℝ)).add (hB.norm_sq (𝕜 := ℝ))).mul_const (2 : ℝ)⁻¹ using 1; try rfl + have hpart := ((squareDifference_regular h₁ h₂).moment_regular + (w := fun _ => (1:ℝ)) contDiff_const).contDiffAt (x := (t,x)) + ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hflux := ((squareDifference_regular h₁ h₂).moment_regular contDiff_velocity).contDiffAt + (x := (t,x)) ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ _⟩) + have hcross : DifferentiableAt ℝ (fun p => cross (s₁.E p-s₂.E p) (s₁.B p-s₂.B p)) (t,x) := + (contDiff_cross (k := 1)).differentiable (by simp) _ |>.comp (t,x) (hE.prodMk hB) + have hp := particle_difference_local h₁ h₂ ht x + have hm := difference_maxwell_local h₁ h₂ ht x + rw [deriv_time_slice (hpart.differentiableAt (by simp))] at hp + change deriv (fun r => differenceFieldEnergy s₁ s₂ (r,x)) t + _ = _ at hm + rw [deriv_time_slice hfield] at hm + have hs₁ := h₁.regularParticle.slice ht.le x + have hs₂ := h₂.regularParticle.slice ht.le x + let g : Vec → ℝ := fun v => s₁.f (t,x,v)-s₂.f (t,x,v) + have hgc : Continuous g := hs₁.1.continuous.sub hs₂.1.continuous + have hgK : HasCompactSupport g := hs₁.2.sub hs₂.2 + have hdc : Continuous (fun v => fderiv ℝ (fun w => s₂.f (t,x,w)) v) := + hs₂.1.continuous_fderiv (by simp) + have hi : Integrable (fun v => -g v * fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x)))) := + (hgc.neg.mul (hdc.clm_apply (contDiff_lorentz (k := 1) _ _).continuous)).integrable_of_hasCompactSupport + hgK.neg.mul_right + have hjI : Integrable (fun v => g v • velocity v) := + (hgc.smul (contDiff_velocity (k := 1)).continuous).integrable_of_hasCompactSupport hgK.smul_right + have hjdI : Integrable (fun v => dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v)) := by + simp only [dot_eq_inner] + exact hjI.const_inner _ + have hj : (∫ v : Vec, g v • velocity v) = + current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x := by + simp only [g,sub_smul,current] + exact integral_sub + (h₁.regularParticle.moment_integrable (contDiff_velocity (k := 1)).continuous ht.le x) + (h₂.regularParticle.moment_integrable (contDiff_velocity (k := 1)).continuous ht.le x) + have hdot : (∫ v : Vec, dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v)) = + dot (s₁.E (t,x)-s₂.E (t,x)) + (current (fun z => s₁.f (t,z)) x-current (fun z => s₂.f (t,z)) x) := by + simp only [dot_eq_inner] + rw [integral_inner hjI,hj] + change (fderiv ℝ (differenceFieldEnergy s₁ s₂+ + particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ))) (t,x)) (1,0) + + divergence ((fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y)))+ + fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = _ + have hxs : DifferentiableAt ℝ (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) + (s₁.B (t,y)-s₂.B (t,y))) x := + hcross.comp x ((differentiableAt_const t).prodMk differentiableAt_id) + have hvs : DifferentiableAt ℝ (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x := + (hflux.differentiableAt (by simp)).comp x ((differentiableAt_const t).prodMk differentiableAt_id) + rw [fderiv_add hfield (hpart.differentiableAt (by simp)),add_apply] + have hvdiv : divergence ((fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y)))+ + fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x = + divergence (fun y => cross (s₁.E (t,y)-s₂.E (t,y)) (s₁.B (t,y)-s₂.B (t,y))) x+ + divergence (fun y => particleMoment (squareDifference s₁ s₂) velocity (t,y)) x := by + exact divergence_add hxs hvs + rw [hvdiv] + change _ = ∫ v : Vec, -g v * fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) - + dot (s₁.E (t,x)-s₂.E (t,x)) (g v • velocity v) + rw [integral_sub hi hjdI,hdot] + dsimp [g] at * + linarith + +lemma differenceEnergy_zero {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {t : ℝ} (ht : 0 ≤ t) (x : Vec) + (hz : differenceEnergy s₁ s₂ (t,x)=0) : + s₁.E (t,x)=s₂.E (t,x) ∧ s₁.B (t,x)=s₂.B (t,x) ∧ ∀ v, s₁.f (t,x,v)=s₂.f (t,x,v) := by + have hp : 0 ≤ (∫ v : Vec, squareDifference s₁ s₂ (t,x,v)) := + integral_nonneg (fun v => squareDifference_nonneg _ _ _) + have he := differenceFieldEnergy_nonneg s₁ s₂ (t,x) + change differenceFieldEnergy s₁ s₂ (t,x)+particleMoment (squareDifference s₁ s₂) (fun _ => (1:ℝ)) (t,x)=0 at hz + rw [particleMoment_one] at hz + have hp0 : (∫ v : Vec, squareDifference s₁ s₂ (t,x,v))=0 := by linarith + have he0 : differenceFieldEnergy s₁ s₂ (t,x)=0 := by linarith + have heq : s₁.E (t,x)=s₂.E (t,x) := by + apply sub_eq_zero.mp + apply norm_eq_zero.mp + dsimp [differenceFieldEnergy] at he0 + nlinarith [sq_nonneg ‖s₁.B (t,x)-s₂.B (t,x)‖,norm_nonneg (s₁.E (t,x)-s₂.E (t,x))] + have hbq : s₁.B (t,x)=s₂.B (t,x) := by + apply sub_eq_zero.mp + apply norm_eq_zero.mp + dsimp [differenceFieldEnergy] at he0 + nlinarith [sq_nonneg ‖s₁.E (t,x)-s₂.E (t,x)‖,norm_nonneg (s₁.B (t,x)-s₂.B (t,x))] + refine ⟨heq,hbq,?_⟩ + have hs := (squareDifference_regular h₁ h₂).slice ht x + have hi : Integrable (fun v : Vec => squareDifference s₁ s₂ (t,x,v)) := + hs.1.continuous.integrable_of_hasCompactSupport hs.2 + have hae := (integral_eq_zero_iff_of_nonneg (fun v => squareDifference_nonneg s₁ s₂ (t,x,v)) hi).mp hp0 + have hevery := Measure.eq_of_ae_eq (μ := volume) hae hs.1.continuous continuous_const + intro v + exact (squareDifference_zero_iff _ _ _).mp (congrFun hevery v) + +lemma differenceEnergy_differential_bound {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) {T : ℝ} (hT : 0 ≤ T) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ t ∈ Ioo 0 T, ∀ x : Vec, + fderiv ℝ (differenceEnergy s₁ s₂) (t,x) (1,0)+ + divergence (fun y => differenceFlux s₁ s₂ (t,y)) x ≤ + C*differenceEnergy s₁ s₂ (t,x) := by + obtain ⟨K₁,hK₁,hs₁⟩ := h₁.regularParticle.2 T hT + obtain ⟨K₂,hK₂,hs₂⟩ := h₂.regularParticle.2 T hT + let K : Set Vec := Prod.snd '' (K₁ ∪ K₂) + have hK : IsCompact K := (hK₁.union hK₂).image continuous_snd + obtain ⟨L,hL,hLb⟩ := h₂.regularParticle.velocity_derivative_bound hT + refine ⟨(2*L+2)*(1+(volume K).toReal),by positivity,?_⟩ + intro t ht x + rw [differenceEnergy_local h₁ h₂ ht.1 x] + have hf₁ := h₁.regularParticle.slice ht.1.le x + have hf₂ := h₂.regularParticle.slice ht.1.le x + have hz : ∀ v ∉ K, s₁.f (t,x,v)-s₂.f (t,x,v)=0 := by + intro v hv + have hnot₁ : (x,v) ∉ tsupport (fun z => s₁.f (t,z)) := by + intro hh + exact hv ⟨(x,v),Or.inl (hs₁ t ⟨ht.1.le,ht.2.le⟩ hh),rfl⟩ + have hnot₂ : (x,v) ∉ tsupport (fun z => s₂.f (t,z)) := by + intro hh + exact hv ⟨(x,v),Or.inr (hs₂ t ⟨ht.1.le,ht.2.le⟩ hh),rfl⟩ + rw [image_eq_zero_of_notMem_tsupport hnot₁,image_eq_zero_of_notMem_tsupport hnot₂,sub_self] + have hb := compact_difference_source_bound (s₁.E (t,x)-s₂.E (t,x)) + (s₁.B (t,x)-s₂.B (t,x)) (hf₁.1.continuous.sub hf₂.1.continuous) + (hf₂.1.continuous_fderiv (by simp)) hK hz hL (hLb t ht x) + simpa only [differenceEnergy,differenceFieldEnergy,particleMoment_one,squareDifference,Pi.sub_apply] using hb + +theorem classical_unique {d : Datum} {s₁ s₂ : Solution} + (h₁ : Classical d s₁) (h₂ : Classical d s₂) : SameNonnegativeTime s₁ s₂ := by + intro T hT + obtain ⟨C,hC,hbound⟩ := differenceEnergy_differential_bound h₁ h₂ hT + have hz := local_energy_inequality_vanishes hC hT + (differenceEnergy_regular h₁ h₂) (differenceFlux_regular h₁ h₂) + (differenceEnergy_continuous_slab h₁ h₂ hT) + (fun _ _ _ => differenceEnergy_nonneg _ _ _) + (fun _ ht => differenceEnergy_integrable h₁ h₂ ht.1) + (differenceEnergy_integrated_continuous h₁ h₂ hT) + (fun _ ht => differenceFlux_bound h₁ h₂ ht.1.le) + hbound (differenceEnergy_initial h₁ h₂) + have heq (x : Vec) := differenceEnergy_zero h₁ h₂ hT x (hz x) + exact ⟨fun z => (heq z.1).2.2 z.2,fun x => (heq x).1,fun x => (heq x).2.1⟩ + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM +lemma vacuum_energy_conservation {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hfirst : ∀ t, 0 ≤ t → ∀ x, dirD E (1,0) (t,x)=spaceCurl B (t,x) ∧ + dirD B (1,0) (t,x)= -spaceCurl E (t,x)) + (hE0 : MemLp (fun x => E (0,x)) 2 volume) (hB0 : MemLp (fun x => B (0,x)) 2 volume) + {t : ℝ} (ht : 0 ≤ t) : + Integrable (fun x => maxwellEnergy E B (t,x)) ∧ + (∫ x : Vec, maxwellEnergy E B (t,x))=∫ x : Vec, maxwellEnergy E B (0,x) := by + apply causal_energy_conserved (contDiff_maxwellEnergy hE hB) (contDiff_maxwellFlux hE hB) ht + (fun _ _ _ => maxwellEnergy_nonneg _ _ _) + (fun _ _ _ => maxwellFlux_le _ _ _) (fun r hr x => ?_) + (((memLp_two_iff_integrable_sq_norm hE0.aestronglyMeasurable).mp hE0).add + ((memLp_two_iff_integrable_sq_norm hB0.aestronglyMeasurable).mp hB0) |>.div_const 2) + have h1 := (hfirst r hr.1.le x).1 + have h2 := (hfirst r hr.1.le x).2 + have hh := maxwell_energy_balance (hE.differentiable (by simp) (r,x)) + (hB.differentiable (by simp) (r,x)) (j:=0) (by + rw [deriv_slice_eq_dirD (hE.differentiable (by simp)), + ← spaceCurl_slice (hB.differentiable (by simp)),h1,sub_self,neg_zero]) (by + rw [deriv_slice_eq_dirD (hB.differentiable (by simp)), + ← spaceCurl_slice (hE.differentiable (by simp)),h2,neg_add_cancel]) + simpa only [maxwellEnergy,maxwellFlux,dot,PiLp.zero_apply,mul_zero,Finset.sum_const_zero,neg_zero] using hh + +lemma vacuum_memLp {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hfirst : ∀ t, 0 ≤ t → ∀ x, dirD E (1,0) (t,x)=spaceCurl B (t,x) ∧ + dirD B (1,0) (t,x)= -spaceCurl E (t,x)) + (hE0 : MemLp (fun x => E (0,x)) 2 volume) (hB0 : MemLp (fun x => B (0,x)) 2 volume) + {t : ℝ} (ht : 0 ≤ t) : MemLp (fun x => E (t,x)) 2 volume ∧ MemLp (fun x => B (t,x)) 2 volume := by + have hI := ((vacuum_energy_conservation hE hB hfirst hE0 hB0 ht).1).const_mul 2 + have hEc : Continuous (fun x : Vec => E (t,x)) := + hE.continuous.comp (continuous_const.prodMk continuous_id) + have hBc : Continuous (fun x : Vec => B (t,x)) := + hB.continuous.comp (continuous_const.prodMk continuous_id) + constructor + · apply (memLp_two_iff_integrable_sq_norm hEc.aestronglyMeasurable).mpr + apply hI.mono_nonneg (hEc.norm.pow 2).aestronglyMeasurable (ae_of_all _ (fun x => sq_nonneg _)) + filter_upwards with x + simp only [Pi.pow_apply] + dsimp only [maxwellEnergy] + nlinarith [sq_nonneg ‖B (t,x)‖] + · apply (memLp_two_iff_integrable_sq_norm hBc.aestronglyMeasurable).mpr + apply hI.mono_nonneg (hBc.norm.pow 2).aestronglyMeasurable (ae_of_all _ (fun x => sq_nonneg _)) + filter_upwards with x + simp only [Pi.pow_apply] + dsimp only [maxwellEnergy] + nlinarith [sq_nonneg ‖E (t,x)‖] + +lemma norm_sub_sq_le_twice (x y : Vec) : + ‖x-y‖^2 ≤ 2*‖x‖^2+2*‖y‖^2 := by + have h := norm_sub_le x y + nlinarith [norm_nonneg (x-y),norm_nonneg x,norm_nonneg y,sq_nonneg (‖x‖-‖y‖)] + +lemma pair_sq_difference_tendsto {E B : Field} + (hE : Continuous E) (hB : Continuous B) + (hLp : ∀ t, 0 ≤ t → MemLp (fun x => E (t,x)) 2 volume ∧ + MemLp (fun x => B (t,x)) 2 volume) + (henergy : ContinuousOn (fun t => ∫ x : Vec, ‖E (t,x)‖^2+‖B (t,x)‖^2) (Ici 0)) + {s : ℝ} (hs : 0 ≤ s) : + Tendsto (fun t => ∫ x : Vec, ‖E (t,x)-E (s,x)‖^2+‖B (t,x)-B (s,x)‖^2) + (𝓝[Ici 0] s) (𝓝 0) := by + let e : ℝ → Vec → ℝ := fun t x => ‖E (t,x)‖^2+‖B (t,x)‖^2 + let D : ℝ → Vec → ℝ := fun t x => ‖E (t,x)-E (s,x)‖^2+‖B (t,x)-B (s,x)‖^2 + let g : ℝ → Vec → ℝ := fun t x => min (4*e s x) (2*e t x+2*e s x-D t x) + have heI (t : ℝ) (ht : 0 ≤ t) : Integrable (e t) := + ((memLp_two_iff_integrable_sq_norm (hLp t ht).1.aestronglyMeasurable).mp (hLp t ht).1).add + ((memLp_two_iff_integrable_sq_norm (hLp t ht).2.aestronglyMeasurable).mp (hLp t ht).2) + have hDI (t : ℝ) (ht : 0 ≤ t) : Integrable (D t) := by + have hEt := (hLp t ht).1.sub (hLp s hs).1 + have hBt := (hLp t ht).2.sub (hLp s hs).2 + exact ((memLp_two_iff_integrable_sq_norm hEt.aestronglyMeasurable).mp hEt).add + ((memLp_two_iff_integrable_sq_norm hBt.aestronglyMeasurable).mp hBt) + have hD0 (t : ℝ) (x : Vec) : 0 ≤ D t x := add_nonneg (sq_nonneg _) (sq_nonneg _) + have he0 (t : ℝ) (x : Vec) : 0 ≤ e t x := add_nonneg (sq_nonneg _) (sq_nonneg _) + have hDle (t : ℝ) (x : Vec) : D t x ≤ 2*e t x+2*e s x := by + have h1 := norm_sub_sq_le_twice (E (t,x)) (E (s,x)) + have h2 := norm_sub_sq_le_twice (B (t,x)) (B (s,x)) + dsimp only [D,e] + linarith + have hg0 (t : ℝ) (x : Vec) : 0 ≤ g t x := + le_min (mul_nonneg (by norm_num) (he0 s x)) (sub_nonneg.mpr (hDle t x)) + have hgI (t : ℝ) (ht : 0 ≤ t) : Integrable (g t) := + ((heI s hs).const_mul 4).inf (((heI t ht).const_mul 2).add ((heI s hs).const_mul 2) |>.sub (hDI t ht)) + have hgc (x : Vec) : Continuous (fun t => g t x) := by + apply continuous_const.min + exact ((((hE.comp (continuous_id.prodMk continuous_const)).norm.pow 2).add + ((hB.comp (continuous_id.prodMk continuous_const)).norm.pow 2)).const_mul 2 |>.add continuous_const |>.sub + ((((hE.comp (continuous_id.prodMk continuous_const)).sub continuous_const).norm.pow 2).add + (((hB.comp (continuous_id.prodMk continuous_const)).sub continuous_const).norm.pow 2))) + have hgs (x : Vec) : g s x=4*e s x := by + dsimp only [g,D] + simp only [sub_self,norm_zero,zero_pow (by norm_num : 2≠0),add_zero,sub_zero] + rw [show 2*e s x+2*e s x=4*e s x by ring,min_self] + have hglim : Tendsto (fun t => ∫ x : Vec, g t x) (𝓝[Ici 0] s) (𝓝 (4*∫ x : Vec, e s x)) := by + rw [← integral_const_mul] + apply tendsto_integral_filter_of_dominated_convergence (fun x => 4*e s x) + · filter_upwards [self_mem_nhdsWithin] with t ht + exact (hgI t ht).aestronglyMeasurable + · exact Eventually.of_forall (fun t => ae_of_all _ (fun x => by + rw [Real.norm_of_nonneg (hg0 t x)] + exact min_le_left _ _)) + · exact (heI s hs).const_mul 4 + · exact ae_of_all _ (fun x => by + simpa only [hgs] using + ((hgc x).continuousAt (x:=s)).continuousWithinAt (s:=Ici 0) |>.tendsto) + have hlim : Tendsto (fun t => 2*(∫ x : Vec, e t x)+2*(∫ x : Vec, e s x)-∫ x : Vec, g t x) + (𝓝[Ici 0] s) (𝓝 0) := by + have hh := (((henergy s hs).tendsto.const_mul 2).add_const (2*∫ x : Vec, e s x)).sub hglim + convert hh using 1 + dsimp only [e] + congr 1 + ring + apply squeeze_zero' (Eventually.of_forall (fun t => integral_nonneg (hD0 t))) ?_ hlim + filter_upwards [self_mem_nhdsWithin] with t ht + have hm : (∫ x : Vec, g t x) ≤ ∫ x : Vec, 2*e t x+2*e s x-D t x := + integral_mono (hgI t ht) (((heI t ht).const_mul 2).add ((heI s hs).const_mul 2) |>.sub (hDI t ht)) + (fun x => min_le_right _ _) + have hsum : Integrable (fun x => 2*e t x+2*e s x) := + ((heI t ht).const_mul 2).add ((heI s hs).const_mul 2) + rw [integral_sub hsum (hDI t ht), + integral_add ((heI t ht).const_mul 2) ((heI s hs).const_mul 2),integral_const_mul,integral_const_mul] at hm + linarith + +lemma L2_norm_sub_sq_eq_integral {u v : Lp Vec 2 (volume : Measure Vec)} + {f g : Vec → Vec} (hu : (u : Vec → Vec) =ᵐ[volume] f) + (hv : (v : Vec → Vec) =ᵐ[volume] g) : + ‖u-v‖^2=∫ x : Vec, ‖f x-g x‖^2 := by + rw [← real_inner_self_eq_norm_sq,L2.inner_def] + apply integral_congr_ae + filter_upwards [Lp.coeFn_sub u v,hu,hv] with x hsub hf hg + rw [hsub] + simp only [Pi.sub_apply,hf,hg,real_inner_self_eq_norm_sq] + +lemma timeContinuousL2_of_continuous_energy {E B : Field} + (hE : Continuous E) (hB : Continuous B) + (hLp : ∀ t, 0 ≤ t → MemLp (fun x => E (t,x)) 2 volume ∧ + MemLp (fun x => B (t,x)) 2 volume) + (henergy : ContinuousOn (fun t => ∫ x : Vec, ‖E (t,x)‖^2+‖B (t,x)‖^2) (Ici 0)) : + TimeContinuousL2 E ∧ TimeContinuousL2 B := by + classical + let E₂ : ℝ → Lp Vec 2 (volume : Measure Vec) := fun t => + if ht : 0 ≤ t then (hLp t ht).1.toLp (fun x => E (t,x)) else 0 + let B₂ : ℝ → Lp Vec 2 (volume : Measure Vec) := fun t => + if ht : 0 ≤ t then (hLp t ht).2.toLp (fun x => B (t,x)) else 0 + have hEe (t : ℝ) (ht : 0 ≤ t) : (E₂ t : Vec → Vec) =ᵐ[volume] (fun x => E (t,x)) := by + dsimp only [E₂]; rw [dite_eq_left ht]; exact MemLp.coeFn_toLp _ + have hBe (t : ℝ) (ht : 0 ≤ t) : (B₂ t : Vec → Vec) =ᵐ[volume] (fun x => B (t,x)) := by + dsimp only [B₂]; rw [dite_eq_left ht]; exact MemLp.coeFn_toLp _ + have hlim (s : ℝ) (hs : 0 ≤ s) : + Tendsto (fun t => ‖E₂ t-E₂ s‖^2+‖B₂ t-B₂ s‖^2) (𝓝[Ici 0] s) (𝓝 0) := by + apply (pair_sq_difference_tendsto hE hB hLp henergy hs).congr' + filter_upwards [self_mem_nhdsWithin] with t ht + rw [L2_norm_sub_sq_eq_integral (hEe t ht) (hEe s hs), + L2_norm_sub_sq_eq_integral (hBe t ht) (hBe s hs)] + have hEt := (hLp t ht).1.sub (hLp s hs).1 + have hBt := (hLp t ht).2.sub (hLp s hs).2 + exact (integral_add + ((memLp_two_iff_integrable_sq_norm hEt.aestronglyMeasurable).mp hEt) + ((memLp_two_iff_integrable_sq_norm hBt.aestronglyMeasurable).mp hBt)) + have hEc : ContinuousOn E₂ (Ici 0) := by + intro s hs + apply tendsto_iff_norm_sub_tendsto_zero.mpr + have hsq := squeeze_zero' (Eventually.of_forall (fun t : ℝ => sq_nonneg ‖E₂ t-E₂ s‖)) + (Eventually.of_forall (fun t : ℝ => le_add_of_nonneg_right (sq_nonneg ‖B₂ t-B₂ s‖))) (hlim s hs) + simpa only [Function.comp_def,Real.sqrt_sq_eq_abs,abs_norm,Real.sqrt_zero] using + (Real.continuous_sqrt.continuousAt.tendsto.comp hsq) + have hBc : ContinuousOn B₂ (Ici 0) := by + intro s hs + apply tendsto_iff_norm_sub_tendsto_zero.mpr + have hsq := squeeze_zero' (Eventually.of_forall (fun t : ℝ => sq_nonneg ‖B₂ t-B₂ s‖)) + (Eventually.of_forall (fun t : ℝ => le_add_of_nonneg_left (sq_nonneg ‖E₂ t-E₂ s‖))) (hlim s hs) + simpa only [Function.comp_def,Real.sqrt_sq_eq_abs,abs_norm,Real.sqrt_zero] using + (Real.continuous_sqrt.continuousAt.tendsto.comp hsq) + exact ⟨⟨E₂,hEc,hEe⟩,⟨B₂,hBc,hBe⟩⟩ + +theorem vacuum_timeContinuousL2 {E B : Field} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hfirst : ∀ t, 0 ≤ t → ∀ x, dirD E (1,0) (t,x)=spaceCurl B (t,x) ∧ + dirD B (1,0) (t,x)= -spaceCurl E (t,x)) + (hE0 : MemLp (fun x => E (0,x)) 2 volume) (hB0 : MemLp (fun x => B (0,x)) 2 volume) : + TimeContinuousL2 E ∧ TimeContinuousL2 B := by + apply timeContinuousL2_of_continuous_energy hE.continuous hB.continuous + (fun t ht => vacuum_memLp hE hB hfirst hE0 hB0 ht) + have heq (t : ℝ) (ht : t∈Ici 0) : + (∫ x : Vec, ‖E (t,x)‖^2+‖B (t,x)‖^2)=2*∫ x : Vec, maxwellEnergy E B (0,x) := by + calc + _ = 2*∫ x : Vec, maxwellEnergy E B (t,x) := by + rw [← integral_const_mul] + apply integral_congr_ae + exact ae_of_all _ (fun x => by dsimp only [maxwellEnergy]; ring) + _ = _ := congrArg (fun y : ℝ => 2*y) (vacuum_energy_conservation hE hB hfirst hE0 hB0 ht).2 + exact continuousOn_const.congr (fun t ht => heq t ht) + +def freeMaxwellElectric (E₀ B₀ : Vec → Vec) : Field := + maxwellElectric E₀ B₀ (fun p => divergence E₀ p.2) 0 + +def freeMaxwellMagnetic (E₀ B₀ : Vec → Vec) : Field := maxwellMagnetic E₀ B₀ 0 + +lemma initialCharge_conserved {E₀ : Vec → Vec} (hE : ContDiff ℝ ∞ E₀) + (p : ℝ × Vec) : + dirD (fun z : ℝ × Vec => divergence E₀ z.2) (1,0) p+spaceDiv (0:Field) p=0 := by + rcases p with ⟨t,x⟩ + have hρ : ContDiff ℝ ∞ (fun z : ℝ × Vec => divergence E₀ z.2) := + (contDiff_divergence hE).comp contDiff_snd + rw [← deriv_slice_eq_dirD (hρ.differentiable (by simp))] + simp [spaceDiv,dirD] + +lemma freeMaxwell_equations {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hDB : ∀ x, divergence B₀ x=0) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + dirD (freeMaxwellElectric E₀ B₀) (1,0) (t,x)=spaceCurl (freeMaxwellMagnetic E₀ B₀) (t,x) ∧ + dirD (freeMaxwellMagnetic E₀ B₀) (1,0) (t,x)= -spaceCurl (freeMaxwellElectric E₀ B₀) (t,x) ∧ + spaceDiv (freeMaxwellElectric E₀ B₀) (t,x)=divergence E₀ x ∧ + spaceDiv (freeMaxwellMagnetic E₀ B₀) (t,x)=0 := by + have hh := constructed_maxwell_equations (j:=0) hE hB + ((contDiff_divergence hE).comp contDiff_snd) (contDiff_const : ContDiff ℝ ∞ (0:Field)) + (fun t _ x => initialCharge_conserved hE (t,x)) (fun _ => rfl) hDB ht x + change dirD (freeMaxwellElectric E₀ B₀) (1,0) (t,x)=spaceCurl (freeMaxwellMagnetic E₀ B₀) (t,x)-(0:Vec) ∧ + dirD (freeMaxwellMagnetic E₀ B₀) (1,0) (t,x)= -spaceCurl (freeMaxwellElectric E₀ B₀) (t,x) ∧ + spaceDiv (freeMaxwellElectric E₀ B₀) (t,x)=divergence E₀ x ∧ + spaceDiv (freeMaxwellMagnetic E₀ B₀) (t,x)=0 at hh + simpa only [sub_zero] using hh + +theorem freeMaxwell_evolution {E₀ B₀ : Vec → Vec} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hE0 : MemLp E₀ 2 volume) (hB0 : MemLp B₀ 2 volume) + (hDB : ∀ x, divergence B₀ x=0) : + let E := freeMaxwellElectric E₀ B₀ + let B := freeMaxwellMagnetic E₀ B₀ + ContDiff ℝ ∞ E ∧ ContDiff ℝ ∞ B ∧ + (∀ x, E (0,x)=E₀ x ∧ B (0,x)=B₀ x) ∧ + TimeContinuousL2 E ∧ TimeContinuousL2 B ∧ + (∀ t, 0 ≤ t → ∀ x, + dirD E (1,0) (t,x)=spaceCurl B (t,x) ∧ + dirD B (1,0) (t,x)= -spaceCurl E (t,x) ∧ + spaceDiv E (t,x)=divergence E₀ x ∧ spaceDiv B (t,x)=0) := by + have hEc : ContDiff ℝ ∞ (freeMaxwellElectric E₀ B₀) := + contDiff_maxwellElectric hE hB ((contDiff_divergence hE).comp contDiff_snd) contDiff_const + have hBc : ContDiff ℝ ∞ (freeMaxwellMagnetic E₀ B₀) := + contDiff_maxwellMagnetic hE hB contDiff_const + have hEi (x : Vec) : freeMaxwellElectric E₀ B₀ (0,x)=E₀ x := maxwellElectric_initial hE x + have hBi (x : Vec) : freeMaxwellMagnetic E₀ B₀ (0,x)=B₀ x := maxwellMagnetic_initial hB x + have hfirst (t : ℝ) (ht : 0 ≤ t) (x : Vec) := freeMaxwell_equations hE hB hDB ht x + have hEI : MemLp (fun x => freeMaxwellElectric E₀ B₀ (0,x)) 2 volume := by + simpa only [hEi] using hE0 + have hBI : MemLp (fun x => freeMaxwellMagnetic E₀ B₀ (0,x)) 2 volume := by + simpa only [hBi] using hB0 + obtain ⟨hEl2,hBl2⟩ := vacuum_timeContinuousL2 hEc hBc + (fun t ht x => ⟨(hfirst t ht x).1,(hfirst t ht x).2.1⟩) hEI hBI + exact ⟨hEc,hBc,(fun x => ⟨hEi x,hBi x⟩),hEl2,hBl2,hfirst⟩ + +lemma derivWithin_slice_eq_dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : ℝ × H → W} + (hF : Differentiable ℝ F) {t : ℝ} (ht : 0 ≤ t) (x : H) : + derivWithin (fun r => F (r,x)) (Ici 0) t = dirD F (1,0) (t,x) := by + exact ((hF (t,x)).hasFDerivAt.comp t + ((hasFDerivAt_id (𝕜:=ℝ) t).prodMk (hasFDerivAt_const (𝕜:=ℝ) x t))).hasDerivAt.hasDerivWithinAt.derivWithin + (uniqueDiffOn_Ici 0 t ht) + +theorem global_classical_solution_of_zero_particles (d : Datum) (hd : Admissible d) + (hf : d.f₀ = 0) : + ∃ s : Solution, Classical d s ∧ SmoothOnFiniteHorizons s ∧ + ∀ s' : Solution, Classical d s' → SameNonnegativeTime s s' := by + obtain ⟨_,_,_,hE,hB,hEL,hBL,hDE,hDB⟩ := hd + obtain ⟨hEs,hBs,hinit,hEL2,hBL2,heq⟩ := + freeMaxwell_evolution hE.1 hB.1 hEL hBL hDB + let s : Solution := ⟨0,freeMaxwellElectric d.E₀ d.B₀,freeMaxwellMagnetic d.E₀ d.B₀⟩ + have hclass : Classical d s := by + refine ⟨contDiffOn_const,hEs.of_le (by simp) |>.contDiffOn, + hBs.of_le (by simp) |>.contDiffOn,?_,hEL2,hBL2,?_,?_,?_,?_,?_⟩ + · intro t ht z; exact le_rfl + · intro T hT + exact ⟨∅,isCompact_empty,fun t ht => by simp [s,tsupport]⟩ + · intro t ht + refine ⟨?_,?_,?_,?_,?_⟩ + · intro x v; simp [s,spatialPartial] + · intro x + change derivWithin (fun r => s.E (r,x)) (Ici 0) t - curl (fun y => s.B (t,y)) x = _ + rw [derivWithin_slice_eq_dirD (hEs.differentiable (by simp)) ht, + (heq t ht x).1,spaceCurl_slice (hBs.differentiable (by simp))] + simp [s,current] + · intro x + rw [derivWithin_slice_eq_dirD (hBs.differentiable (by simp)) ht, + (heq t ht x).2.1,spaceCurl_slice (hEs.differentiable (by simp))] + simp [s] + · intro x + rw [← spaceDiv_slice (hEs.differentiable (by simp)),(heq t ht x).2.2.1,hDE x] + simp [s,rho,hf] + · intro x + rw [← spaceDiv_slice (hBs.differentiable (by simp))] + exact (heq t ht x).2.2.2 + · intro z; simp [s,hf] + · intro x; exact (hinit x).1 + · intro x; exact (hinit x).2 + refine ⟨s,hclass,?_,fun s' hs' => classical_unique hclass hs'⟩ + intro T hT + exact ⟨contDiffOn_const,hEs.contDiffOn,hBs.contDiffOn⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/ElectricBoundaryField.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/ElectricBoundaryField.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1f8167230714eb66de2b0cd5eb8021862e03d88 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/ElectricBoundaryField.lean @@ -0,0 +1,203 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ElectricConeBoundary +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverQ + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma cross_add_right (a b c : Vec) : cross a (b+c)=cross a b+cross a c := + (crossCLM a).map_add b c + +def electricBoundaryField (s : Solution) (t : ℝ) (x : Vec) : Vec := + WithLp.toLp 2 (fun i => electricConeBoundary s t x i 0) + +def magneticBoundaryField (s : Solution) (t : ℝ) (x : Vec) : Vec := + WithLp.toLp 2 (fun i => magneticConeBoundary s t x i 0) + +lemma classical_electric_physical_vector {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 ℝ) i).integral_comp_comm hD + exact (classical_electric_physical_representation hs hm ht x i).trans + (by simpa only [electricBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => electricConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + +lemma classical_magnetic_physical_vector {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 ℝ) i).integral_comp_comm hD + exact (classical_magnetic_physical_representation hs hm ht x i).trans + (by simpa only [magneticBoundaryField,PiLp.add_apply,PiLp.smul_apply,PiLp.toLp_apply, + smul_eq_mul,PiLp.proj_apply] using congrArg (fun r : ℝ => magneticConeBoundary s t x i 0+(4*Real.pi)⁻¹*r) he) + +def boundaryLorentzForce (s : Solution) (t : ℝ) (x a : Vec) : Vec := + electricBoundaryField s t x+cross a (magneticBoundaryField s t x) + +lemma classical_physical_force_representation {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 cross a (retardedMagneticDensity s t x (x+z))) + (ball (0:Vec) t) := by + simpa only [IntegrableOn,crossCLM_apply] using (crossCLM a).integrable_comp hB + have hc' : (∫ z in ball (0:Vec) t, cross a (retardedMagneticDensity s t x (x+z))) = + cross a (∫ z in ball (0:Vec) t, retardedMagneticDensity s t x (x+z)) := by + simpa only [crossCLM_apply] using hc + rw [classical_electric_physical_vector hs hm ht x,classical_magnetic_physical_vector hs hm ht x, + integral_add hE hcross,hc'] + simp only [boundaryLorentzForce,cross_add_right,cross_smul_right] + module + +def datumBoundarySolution (d : Datum) : Solution := + ⟨fun p => d.f₀ p.2,fun p => d.E₀ p.2,fun p => d.B₀ p.2⟩ + +lemma electricConeBoundary_initial_congr {s s' : Solution} + (hf : ∀ z, s.f (0,z)=s'.f (0,z)) (hE : ∀ x, s.E (0,x)=s'.E (0,x)) + (hB : ∀ x, s.B (0,x)=s'.B (0,x)) {t : ℝ} (ht : 0 c/((n : ℝ)+1)) := by + apply summable_of_sum_range_le (fun n => by positivity) (c := T-t 0) + intro n + calc + ∑ i ∈ Finset.range n, c/((i : ℝ)+1) ≤ + ∑ i ∈ Finset.range n, (t (i+1)-t i) := Finset.sum_le_sum (fun i _ => hg i) + _ = t n-t 0 := by + rw [Finset.sum_sub_distrib] + have hh := Finset.sum_range_sub' t n + rw [Finset.sum_sub_distrib] at hh + linarith + _ ≤ T-t 0 := by linarith [ht n] + have hh : Summable (fun n : ℕ => 1/((n : ℝ)+1)) := by + apply (hsum.mul_left c⁻¹).congr + intro n + simp [div_eq_mul_inv,hc.ne'] + apply Real.not_summable_one_div_natCast + exact (summable_nat_add_iff 1).mp (by simpa only [Nat.cast_add,Nat.cast_one] using hh) + +lemma no_bounded_doubling_times {t Δ : ℕ → ℝ} {M A T : ℝ} (N : ℕ) + (hM : 0 < M) (hA : 0 < A) (ht : ∀ n, t n ≤ T) + (hΔ : ∀ n, 0 ≤ Δ n) (hgap : ∀ n, Δ n ≤ t (n+1)-t n) + (hinc : ∀ n, (1 : ℝ)/2 ≤ 1024*M*Real.sqrt (Δ n) + + 1024^2*A*Δ n*Real.log (2+1024*(2 : ℝ)^(N+n))) : False := by + let C := Real.log 1026 + N * Real.log 2 + Real.log 2 + have hC : 0 < C := by + dsimp [C] + have h1 : 0 < Real.log 1026 := Real.log_pos (by norm_num) + have h2 : 0 ≤ Real.log 2 := Real.log_nonneg (by norm_num) + positivity + let c := min ((4*1024*M)^2)⁻¹ (4*1024^2*A*C)⁻¹ + have hc : 0 < c := by dsimp [c]; positivity + apply no_bounded_harmonic_gaps hc ht + intro n + apply (doubling_interval_lower_bound hM hA hC (hΔ n) ?_).trans (hgap n) + apply (hinc n).trans + apply add_le_add le_rfl + exact mul_le_mul_of_nonneg_left (doubling_log_bound N n) + (mul_nonneg (mul_nonneg (by positivity) hA.le) (hΔ n)) + +end RVM + +open Set MeasureTheory Filter +open scoped Topology ContDiff + +namespace RVM +section TimeFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma det_time_triangular (L : (ℝ × E) →ₗ[ℝ] (ℝ × E)) + (hL : (LinearMap.fst ℝ ℝ E).comp L = LinearMap.fst ℝ ℝ E) : + L.det = ((LinearMap.snd ℝ ℝ E).comp (L.comp (LinearMap.inr ℝ ℝ E))).det := by + classical + let b := Module.Basis.singleton Unit ℝ + let c := Module.finBasis ℝ E + let C := (LinearMap.snd ℝ ℝ E).comp (L.comp (LinearMap.inl ℝ ℝ E)) + let D := (LinearMap.snd ℝ ℝ E).comp (L.comp (LinearMap.inr ℝ ℝ E)) + have hf (z : ℝ × E) : (L z).1 = z.1 := LinearMap.congr_fun hL z + have hm : LinearMap.toMatrix (b.prod c) (b.prod c) L = + Matrix.fromBlocks 1 0 (LinearMap.toMatrix b c C) (LinearMap.toMatrix c c D) := by + ext (i | i) (j | j) + · simp [LinearMap.toMatrix, b, hf] + · simp [LinearMap.toMatrix, b, hf] + · simp [LinearMap.toMatrix, C] + · simp [LinearMap.toMatrix, D] + rw [← LinearMap.det_toMatrix (b.prod c), hm, Matrix.det_fromBlocks_zero₁₂, + Matrix.det_one, one_mul, LinearMap.det_toMatrix] + +def extendedField (f : ℝ × E → E) (z : ℝ × E) : ℝ × E := (1, f z) + +lemma trace_extendedField {f : ℝ × E → E} (hf : Differentiable ℝ f) + (hz : ∀ z : ℝ × E, LinearMap.trace ℝ E + (fderiv ℝ (fun x => f (z.1,x)) z.2).toLinearMap = 0) (z : ℝ × E) : + LinearMap.trace ℝ (ℝ × E) (fderiv ℝ (extendedField f) z).toLinearMap = 0 := by + have hd := (hasFDerivAt_const (1 : ℝ) z).prodMk (hf z).hasFDerivAt + have hd' : fderiv ℝ (extendedField f) z = + (0 : (ℝ × E) →L[ℝ] ℝ).prod (fderiv ℝ f z) := hd.fderiv + rw [hd',trace_prod_diagonal] + have hleft : (LinearMap.fst ℝ ℝ E).comp + (((0 : (ℝ × E) →L[ℝ] ℝ).prod (fderiv ℝ f z)).toLinearMap.comp + (LinearMap.inl ℝ ℝ E)) = 0 := by ext; simp + rw [hleft,map_zero,zero_add] + have hx := (hf z).hasFDerivAt.comp (f := fun x : E => (z.1,x)) z.2 + ((hasFDerivAt_const z.1 z.2).prodMk (hasFDerivAt_id z.2)) + have heq : (LinearMap.snd ℝ ℝ E).comp + (((0 : (ℝ × E) →L[ℝ] ℝ).prod (fderiv ℝ f z)).toLinearMap.comp + (LinearMap.inr ℝ ℝ E)) = + (fderiv ℝ (fun x => f (z.1,x)) z.2).toLinearMap := by + have hx' : fderiv ℝ (fun x => f (z.1,x)) z.2 = + (fderiv ℝ f z).comp ((0 : E →L[ℝ] ℝ).prod (ContinuousLinearMap.id ℝ E)) := hx.fderiv + rw [hx'] + rfl + rw [heq] + exact hz z + +omit [FiniteDimensional ℝ E] in + +lemma extended_time_component {f : ℝ × E → E} {α : ℝ → ℝ × E} {T : ℝ} + (hd : ∀ t ∈ Icc 0 T, HasDerivAt α (extendedField f (α t)) t) : + ∀ t ∈ Icc 0 T, (α t).1 = (α 0).1 + t := by + apply eq_of_has_deriv_right_eq (f' := fun _ => (1 : ℝ)) + · intro t ht + simpa [extendedField] using + (hd t ⟨ht.1,ht.2.le⟩).hasFDerivAt.fst.hasDerivAt.hasDerivWithinAt (s := Ici t) + · intro t _ + simpa using ((hasDerivAt_id t).const_add (α 0).1).hasDerivWithinAt + · exact (HasDerivAt.continuousOn hd).fst + · fun_prop + · simp + +lemma exists_local_time_volume_flow {f : ℝ × E → E} (hf : ContDiff ℝ 2 f) + (hdiv : ∀ z : ℝ × E, LinearMap.trace ℝ E + (fderiv ℝ (fun x => f (z.1,x)) z.2).toLinearMap = 0) (t₀ : ℝ) (x₀ : E) : + ∃ η > (0 : ℝ), ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ Metric.ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 η, HasDerivAt (α x) (f (t₀+t,α x t)) t) ∧ + (∀ t ∈ Icc 0 η, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + ∀ t ∈ Icc 0 η, (A x t).det = 1) ∧ + ∀ t ∈ Icc 0 η, Set.InjOn (fun x => α x t) (Metric.ball x₀ (1/2 : ℝ)) := by + have hF : ContDiff ℝ 2 (extendedField f) := contDiff_const.prodMk hf + obtain ⟨η,hη,β,D,hβ,hinj⟩ := exists_local_volume_flow hF + (trace_extendedField (hf.differentiable (by norm_num)) hdiv) (t₀,x₀) + have hmem {x : E} (hx : x ∈ Metric.ball x₀ (1/2 : ℝ)) : + (t₀,x) ∈ Metric.ball (t₀,x₀) (1/2 : ℝ) := by + simpa only [Metric.mem_ball,Prod.dist_eq,dist_self,max_eq_right (dist_nonneg : 0 ≤ dist x x₀)] using hx + have htime {z : ℝ × E} (hz : z ∈ Metric.ball (t₀,x₀) (1/2 : ℝ)) + {t : ℝ} (ht : t ∈ Icc 0 η) : (β z t).1 = z.1+t := by + simpa [(hβ z hz).1] using extended_time_component (hβ z hz).2.1 t ht + have hfst {z : ℝ × E} (hz : z ∈ Metric.ball (t₀,x₀) (1/2 : ℝ)) + {t : ℝ} (ht : t ∈ Icc 0 η) : + (LinearMap.fst ℝ ℝ E).comp (D z t).toLinearMap = LinearMap.fst ℝ ℝ E := by + have hd := ((hβ z hz).2.2.1 t ht).fst + have he : (fun y => (β y t).1) =ᶠ[𝓝 z] (fun y : ℝ × E => y.1+t) := by + filter_upwards [Metric.isOpen_ball.mem_nhds hz] with y hy + exact htime hy ht + have hd' : HasFDerivAt (fun y : ℝ × E => y.1+t) (ContinuousLinearMap.fst ℝ ℝ E) z := + hasFDerivAt_fst.add_const t + exact congrArg ContinuousLinearMap.toLinearMap ((hd.congr_of_eventuallyEq he.symm).unique hd') + let α : E → ℝ → E := fun x t => (β (t₀,x) t).2 + let A : E → ℝ → (E →L[ℝ] E) := fun x t => (ContinuousLinearMap.snd ℝ ℝ E).comp + ((D (t₀,x) t).comp (ContinuousLinearMap.inr ℝ ℝ E)) + refine ⟨η,hη,α,A,?_,?_⟩ + · intro x hx + have hh := hβ _ (hmem hx) + refine ⟨congrArg Prod.snd hh.1,?_,?_,?_⟩ + · intro t ht + have hd := (hh.2.1 t ht).hasFDerivAt.snd.hasDerivAt + have hd' : HasDerivAt (α x) (f (β (t₀,x) t)) t := by + simpa [extendedField,α] using hd + have heq : β (t₀,x) t = (t₀+t,α x t) := Prod.ext (htime (hmem hx) ht) rfl + rwa [heq] at hd' + · intro t ht + have hd := ((hh.2.2.1 t ht).snd).comp (f := fun y : E => (t₀,y)) x + ((hasFDerivAt_const t₀ x).prodMk (hasFDerivAt_id x)) + exact hd + · intro t ht + have heq := det_time_triangular (D (t₀,x) t).toLinearMap (hfst (hmem hx) ht) + exact heq.symm.trans (hh.2.2.2 t ht) + · intro t ht x hx y hy heq + have hxy : β (t₀,x) t = β (t₀,y) t := by + apply Prod.ext + · rw [htime (hmem hx) ht,htime (hmem hy) ht] + · exact heq + exact congrArg Prod.snd (hinj t ht (hmem hx) (hmem hy) hxy) + +end TimeFlow + +def lorentzField (E B : Field) (z : ℝ × Phase) : Phase := + lorentzPhase (fun x => E (z.1,x)) (fun x => B (z.1,x)) z.2 + +lemma contDiff_lorentzField {E B : Field} {k : ℕ∞ω} + (hE : ContDiff ℝ k E) (hB : ContDiff ℝ k B) : ContDiff ℝ k (lorentzField E B) := by + have hx : ContDiff ℝ k (fun z : ℝ × Phase => (z.1,z.2.1)) := + contDiff_fst.prodMk (contDiff_fst.comp contDiff_snd) + have hu : ContDiff ℝ k (fun z : ℝ × Phase => velocity z.2.2) := + contDiff_velocity.comp (contDiff_snd.comp contDiff_snd) + exact hu.prodMk ((hE.comp hx).add (contDiff_cross.comp (hu.prodMk (hB.comp hx)))) + +lemma trace_lorentzField {E B : Field} (hE : Differentiable ℝ E) + (hB : Differentiable ℝ B) (z : ℝ × Phase) : + LinearMap.trace ℝ Phase (fderiv ℝ (fun y => lorentzField E B (z.1,y)) z.2).toLinearMap = 0 := by + exact trace_lorentzPhase (hE.comp ((differentiable_const z.1).prodMk differentiable_id)) + (hB.comp ((differentiable_const z.1).prodMk differentiable_id)) z.2 + +lemma exists_local_lorentz_volume_flow {E B : Field} + (hE : ContDiff ℝ 2 E) (hB : ContDiff ℝ 2 B) (t₀ : ℝ) (z₀ : Phase) : + ∃ η > (0 : ℝ), ∃ α : Phase → ℝ → Phase, ∃ A : Phase → ℝ → (Phase →L[ℝ] Phase), + (∀ z ∈ Metric.ball z₀ (1/2 : ℝ), α z 0 = z ∧ + (∀ t ∈ Icc 0 η, HasDerivAt (α z) (lorentzField E B (t₀+t,α z t)) t) ∧ + (∀ t ∈ Icc 0 η, HasFDerivAt (fun y => α y t) (A z t) z) ∧ + ∀ t ∈ Icc 0 η, (A z t).det = 1) ∧ + ∀ t ∈ Icc 0 η, Set.InjOn (fun z => α z t) (Metric.ball z₀ (1/2 : ℝ)) := by + exact exists_local_time_volume_flow (contDiff_lorentzField hE hB) + (trace_lorentzField (hE.differentiable (by norm_num)) (hB.differentiable (by norm_num))) t₀ z₀ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FieldGradientNorm.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FieldGradientNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..0acbc34ecd648dfd6e61d096056442e5a0a6595e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FieldGradientNorm.lean @@ -0,0 +1,131 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.EquationsBefore +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardBoundary + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma curl_norm_le_gradient {F : Vec → Vec} (hF : Differentiable ℝ F) (x : Vec) : + ‖curl F x‖≤6*‖fderiv ℝ F x‖ := by + have hb : ∀ i : Fin 3, |curl F x i|≤2*‖fderiv ℝ F x‖ := by + intro i + have he : curl F x i=spatialPartial (fun y => F y (curlB i)) x (curlA i)- + spatialPartial (fun y => F y (curlA i)) x (curlB i) := by + fin_cases i <;> simp [curl,curlA,curlB] + have hb (j k : Fin 3) : |spatialPartial (fun y => F y k) x j|≤‖fderiv ℝ F x‖ := by + rw [spatialPartial,coordinate_fderiv_apply hF] + simpa only [show ‖basis j‖=1 by simp [basis,PiLp.norm_single],mul_one] using + (norm_coordinate_le _ k).trans ((fderiv ℝ F x).le_opNorm (basis j)) + rw [he] + exact (abs_sub _ _).trans ((add_le_add (hb _ _) (hb _ _)).trans_eq (by ring)) + exact (norm_le_three_of_coordinate_bound (by positivity) hb).trans_eq (by ring) + +lemma full_field_derivative_bound {F : Field} {t : ℝ} {x : Vec} + (hF : DifferentiableAt ℝ F (t,x)) : + ‖fderiv ℝ F (t,x)‖≤‖deriv (fun r => F (r,x)) t‖+‖fderiv ℝ (fun y => F (t,y)) x‖ := by + let L := fderiv ℝ F (t,x) + have ht := hF.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_id t).prodMk (hasDerivAt_const t x)) + have hx := hF.hasFDerivAt.comp x ((hasFDerivAt_const (c:=t) x).prodMk (hasFDerivAt_id x)) + have hd (v : Vec) : fderiv ℝ (fun y => F (t,y)) x v=L (0,v) := by + exact congrArg (fun K : Vec →L[ℝ] Vec => K v) hx.fderiv + have he : deriv (fun r => F (r,x)) t=L (1,0) := ht.deriv + apply ContinuousLinearMap.opNorm_le_bound _ (add_nonneg (norm_nonneg _) (norm_nonneg _)) + intro p + have hp : p=p.1 • (1,0)+(0,p.2) := by ext <;> simp + have hr : L p=p.1 • deriv (fun r => F (r,x)) t+fderiv ℝ (fun y => F (t,y)) x p.2 := by + rw [he,hd, hp, map_add, map_smul] + simp + change ‖L p‖≤_ + rw [hr] + apply (norm_add_le _ _).trans + rw [norm_smul] + have h₁ : ‖p.1‖≤‖p‖ := norm_fst_le p + have h₂ : ‖p.2‖≤‖p‖ := norm_snd_le p + have ha := (fderiv ℝ (fun y => F (t,y)) x).le_opNorm p.2 + nlinarith [mul_le_mul_of_nonneg_right h₁ (norm_nonneg (deriv (fun r => F (r,x)) t)), + mul_le_mul_of_nonneg_left h₂ (norm_nonneg (fderiv ℝ (fun y => F (t,y)) x))] + +lemma current_norm_bound_of_momentum {f : Phase → ℝ} {P A : ℝ} + (hA : 0≤A) (hfA : ∀ y v,|f (y,v)|≤A) (hP : ∀ y v,P<‖v‖ → f (y,v)=0) (x : Vec) : + ‖current f x‖≤A*(volume (closedBall (0:Vec) P)).toReal := by + rw [current,←setIntegral_eq_integral_of_forall_compl_eq_zero (s:=closedBall (0:Vec) P)] + · exact (norm_setIntegral_le_of_norm_le_const (C:=A) ((isCompact_closedBall (0:Vec) P).measure_lt_top) (by + intro v _ + rw [norm_smul,Real.norm_eq_abs] + simpa only [mul_one] using + mul_le_mul (hfA x v) (norm_velocity_lt_one v).le (norm_nonneg _) hA)).trans_eq (by rfl) + · intro v hv + have hh : P<‖v‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hv + rw [hP x v hh,zero_smul] + +lemma maxwell_full_derivative_bound {s : Solution} {U t P A g : ℝ} + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (heq : EquationsBefore s U) (ht : 0 s.E (t,z)) y‖+‖fderiv ℝ (fun z => s.B (t,z)) y‖≤g) + (x : Vec) : + ‖fderiv ℝ s.E (t,x)‖≤7*g+A*(volume (closedBall (0:Vec) P)).toReal ∧ + ‖fderiv ℝ s.B (t,x)‖≤7*g+A*(volume (closedBall (0:Vec) P)).toReal := by + have he := field_differentiableAt_positive hE ht x + have hm := field_differentiableAt_positive hB ht x + have hes : Differentiable ℝ (fun y => s.E (t,y)) := fun y => + (field_differentiableAt_positive hE ht y).comp y ((differentiableAt_const t).prodMk differentiableAt_id) + have hbs : Differentiable ℝ (fun y => s.B (t,y)) := fun y => + (field_differentiableAt_positive hB ht y).comp y ((differentiableAt_const t).prodMk differentiableAt_id) + have eqE := (heq t ht.le htU).2.1 x + have eqB := (heq t ht.le htU).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at eqE eqB + have hcb := curl_norm_le_gradient hbs x + have hce := curl_norm_le_gradient hes x + have hj := current_norm_bound_of_momentum (f:=fun z => s.f (t,z)) (P:=P) hA hfA hP x + have hj0 : 0≤A*(volume (closedBall (0:Vec) P)).toReal := by positivity + have heb : ‖deriv (fun r => s.E (r,x)) t‖≤6*‖fderiv ℝ (fun z => s.B (t,z)) x‖+A*(volume (closedBall (0:Vec) P)).toReal := by + have hh : deriv (fun r => s.E (r,x)) t=curl (fun z => s.B (t,z)) x-current (fun z => s.f (t,z)) x := by + have hh := sub_eq_iff_eq_add.mp eqE + rw [hh]; abel + rw [hh] + exact (norm_sub_le _ _).trans (add_le_add hcb hj) + have hbb : ‖deriv (fun r => s.B (r,x)) t‖≤6*‖fderiv ℝ (fun z => s.E (t,z)) x‖ := by + have hh : deriv (fun r => s.B (r,x)) t=-curl (fun z => s.E (t,z)) x := eq_neg_of_add_eq_zero_left eqB + simpa only [hh,norm_neg] using hce + have hn := hb x + constructor + · have hh := full_field_derivative_bound he + nlinarith [norm_nonneg (fderiv ℝ (fun z => s.E (t,z)) x),norm_nonneg (fderiv ℝ (fun z => s.B (t,z)) x)] + · have hh := full_field_derivative_bound hm + nlinarith [norm_nonneg (fderiv ℝ (fun z => s.E (t,z)) x),norm_nonneg (fderiv ℝ (fun z => s.B (t,z)) x)] + +lemma spatial_field_lipschitz_of_gradient {F : Vec → Vec} {L : ℝ} + (hF : Differentiable ℝ F) (hL : ∀ x,‖fderiv ℝ F x‖≤L) (x y : Vec) : + ‖F x-F y‖≤L*‖x-y‖ := by + exact (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hF z) (fun z _ => hL z) (mem_univ y) (mem_univ x) + +lemma norm_clm_le_nine_components (L : Vec →L[ℝ] Vec) {C : ℝ} (hC : 0≤C) + (hb : ∀ i j : Fin 3, |L (basis j) i|≤C) : ‖L‖≤9*C := by + have hb' (j : Fin 3) : ‖L (basis j)‖≤3*C := norm_le_three_of_coordinate_bound hC (fun i => hb i j) + apply L.opNorm_le_bound (by positivity) + intro v + have he : L v=∑ j : Fin 3, v j • L (basis j) := by + conv_lhs => rw [←sum_basis v] + simp only [map_sum,map_smul] + rw [he] + calc + _ ≤ ∑ j : Fin 3, ‖v j • L (basis j)‖ := norm_sum_le _ _ + _ ≤ ∑ _j : Fin 3, ‖v‖*(3*C) := by + apply Finset.sum_le_sum + intro j _ + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (norm_coordinate_le v j) (hb' j) (norm_nonneg _) (norm_nonneg v) + _ = 9*C*‖v‖ := by simp; ring + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FiniteFlow.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FiniteFlow.lean new file mode 100644 index 0000000000000000000000000000000000000000..39683b0a6a9099210dc27334a13dd41866ee15cd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/FiniteFlow.lean @@ -0,0 +1,335 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.FlowDerivative + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff NNReal +open Set MeasureTheory +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set MeasureTheory Metric Filter ODE +open scoped Topology NNReal ContDiff + +namespace RVM +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma exists_bounded_picard_flow {f : ℝ × E → E} {T L : ℝ} + (hT : 0 ≤ T) (hL : 0 ≤ L) + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set E))) + (hb : ∀ t ∈ Icc 0 T, ∀ z, ‖f (t,z)‖ ≤ L) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ K : ℝ≥0, + (∀ x ∈ closedBall x₀ (1/2 : ℝ), α x 0 = x ∧ + ∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (t,α x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, LipschitzOnWith K (α · t) (closedBall x₀ (1/2 : ℝ)) := by + let R : ℝ≥0 := ⟨L*T+1/2,by positivity⟩ + have hsub : Icc 0 T ×ˢ closedBall x₀ (R:ℝ) ⊆ Icc 0 T ×ˢ (univ : Set E) := + prod_mono_right (subset_univ _) + obtain ⟨K,hK⟩ := (hf.mono hsub).exists_lipschitzOnWith (by norm_num) + ((convex_Icc 0 T).prod (convex_closedBall x₀ (R:ℝ))) + (isCompact_Icc.prod (isCompact_closedBall x₀ (R:ℝ))) + have hpic : IsPicardLindelof (fun t z => f (t,z)) ⟨0,⟨le_rfl,hT⟩⟩ + x₀ R (1/2) ⟨L,hL⟩ K := by + refine ⟨?_,?_,?_,?_⟩ + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro z hz w hw + simpa using hK.dist_le_mul (t,z) (show (t,z) ∈ Icc 0 T ×ˢ closedBall x₀ (R:ℝ) from ⟨ht,hz⟩) + (t,w) (show (t,w) ∈ Icc 0 T ×ˢ closedBall x₀ (R:ℝ) from ⟨ht,hw⟩) + · intro z _ + exact hf.continuousOn.comp (continuousOn_id.prodMk continuousOn_const) + (fun t ht => ⟨ht,mem_univ z⟩) + · intro t ht z _ + exact hb t ht z + · change L * max (T-0) (0-0) ≤ (R:ℝ)-(1/2:ℝ≥0) + simp only [NNReal.coe_div,NNReal.coe_one,NNReal.coe_ofNat,sub_zero,max_eq_left hT] + change L*T ≤ L*T+1/2-1/2 + linarith + obtain ⟨α,hα,K',hK'⟩ := picard_flow_with_range hpic + refine ⟨α,K',?_,?_⟩ + · intro x hx + exact ⟨(hα x (by simpa using hx)).1,(hα x (by simpa using hx)).2.1⟩ + · simpa using hK' + +def cutVariationalField (f : E → E) (χ : (E →L[ℝ] E) → ℝ) + (z : E × (E →L[ℝ] E)) : E × (E →L[ℝ] E) := + (f z.1,χ z.2 • (fderiv ℝ f z.1).comp z.2) + +omit [FiniteDimensional ℝ E] in +lemma contDiff_cutVariationalField {f : E → E} {χ : (E →L[ℝ] E) → ℝ} + (hf : ContDiff ℝ 2 f) (hχ : ContDiff ℝ 1 χ) : + ContDiff ℝ 1 (cutVariationalField f χ) := by + exact ((hf.of_le (by norm_num)).comp contDiff_fst).prodMk + ((hχ.comp contDiff_snd).smul + (((hf.fderiv_right (by norm_num)).comp contDiff_fst).clm_comp contDiff_snd)) + +lemma cutVariationalField_bounded {f : E → E} {L K : ℝ} + (hL : 0 ≤ L) (hK : 0 ≤ K) (hb : ∀ x, ‖f x‖ ≤ L) + (hd : ∀ x, ‖fderiv ℝ f x‖ ≤ K) (χ : ContDiffBump (0 : E →L[ℝ] E)) (z) : + ‖cutVariationalField f χ z‖ ≤ max L (K*χ.rOut) := by + change max ‖f z.1‖ ‖χ z.2 • (fderiv ℝ f z.1).comp z.2‖ ≤ _ + refine max_le ((hb _).trans (le_max_left _ _)) ?_ + by_cases hz : χ z.2 = 0 + · simp only [hz,zero_smul,norm_zero] + exact hL.trans (le_max_left _ _) + have hnorm : ‖z.2‖ ≤ χ.rOut := by + have hh : z.2 ∈ Metric.ball 0 χ.rOut := by rwa [← χ.support_eq] + exact (show ‖z.2‖ < χ.rOut by simpa only [Metric.mem_ball,dist_zero_right] using hh).le + calc + _ = χ z.2 * ‖(fderiv ℝ f z.1).comp z.2‖ := by rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + _ ≤ ‖(fderiv ℝ f z.1).comp z.2‖ := mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖fderiv ℝ f z.1‖ * ‖z.2‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ K*χ.rOut := mul_le_mul (hd _) hnorm (norm_nonneg _) hK + _ ≤ _ := le_max_right _ _ + +lemma exists_finite_variational_flow {f : E → E} {T L K : ℝ} + (hT : 0 ≤ T) (hL : 0 ≤ L) (hK : 0 ≤ K) + (hf : ContDiff ℝ 2 f) (hb : ∀ x, ‖f x‖ ≤ L) + (hd : ∀ x, ‖fderiv ℝ f x‖ ≤ K) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), ∃ L' : ℝ≥0, + (∀ x ∈ closedBall x₀ (1/2 : ℝ), α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (A x) + ((fderiv ℝ f (α x t)).comp (A x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ (L*T+1/2)) ∧ + ∀ t ∈ Icc 0 T, LipschitzOnWith L' (α · t) (closedBall x₀ (1/2 : ℝ)) := by + let χ : ContDiffBump (0 : E →L[ℝ] E) := + ⟨Real.exp (K*T)+1,Real.exp (K*T)+2,by positivity,by linarith⟩ + let M := max L (K*χ.rOut) + let z₀ : E × (E →L[ℝ] E) := (x₀,ContinuousLinearMap.id ℝ E) + obtain ⟨β,L',hβ,hLip⟩ := exists_bounded_picard_flow hT + (hL.trans (le_max_left L (K*χ.rOut))) + ((contDiff_cutVariationalField hf χ.contDiff).comp contDiff_snd).contDiffOn + (fun _ _ z => cutVariationalField_bounded hL hK hb hd χ z) z₀ + let α : E → ℝ → E := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).1 + let A : E → ℝ → (E →L[ℝ] E) := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).2 + have hmem {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : + (x,ContinuousLinearMap.id ℝ E) ∈ closedBall z₀ (1/2 : ℝ) := by + simpa only [z₀,Metric.mem_closedBall,Prod.dist_eq,dist_self,max_eq_left (dist_nonneg : 0 ≤ dist x x₀)] using hx + have hα₀ {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : α x 0 = x := + congrArg Prod.fst (hβ _ (hmem hx)).1 + have hA₀ {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : A x 0 = ContinuousLinearMap.id ℝ E := + congrArg Prod.snd (hβ _ (hmem hx)).1 + have hαd {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t := + ((hβ _ (hmem hx)).2 t ht).fst + have hAd {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasDerivWithinAt (A x) (χ (A x t) • (fderiv ℝ f (α x t)).comp (A x t)) (Icc 0 T) t := + ((hβ _ (hmem hx)).2 t ht).snd + have hAbound {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + ‖A x t‖ ≤ Real.exp (K*T) := by + have hh := norm_le_gronwallBound_of_norm_deriv_right_le + (HasDerivWithinAt.continuousOn (fun t ht => hAd hx ht)) + (fun t ht => (hAd hx (Ico_subset_Icc_self ht)).mono_of_mem_nhdsWithin (Icc_mem_nhdsGE_of_mem ht)) + (δ := 1) (K := K) (ε := 0) + (by rw [hA₀ hx]; exact ContinuousLinearMap.norm_id_le) + (fun t ht => by + rw [norm_smul,Real.norm_of_nonneg χ.nonneg,add_zero] + calc + _ ≤ ‖(fderiv ℝ f (α x t)).comp (A x t)‖ := mul_le_of_le_one_left (norm_nonneg _) χ.le_one + _ ≤ ‖fderiv ℝ f (α x t)‖ * ‖A x t‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ K*‖A x t‖ := mul_le_mul_of_nonneg_right (hd _) (norm_nonneg _)) t ht + rw [gronwallBound_ε0,one_mul,sub_zero] at hh + exact hh.trans (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 hK)) + have hone {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + χ (A x t) = 1 := by + apply χ.one_of_mem_closedBall + simp only [Metric.mem_closedBall,dist_zero_right] + exact (hAbound hx ht).trans (by dsimp [χ]; linarith) + refine ⟨α,A,L',?_,?_⟩ + · intro x hx + refine ⟨hα₀ hx,hA₀ hx,(fun _ ht => hαd hx ht),?_,?_⟩ + · intro t ht + simpa only [hone hx ht,one_smul] using hAd hx ht + · intro t ht + have hl : LipschitzOnWith ⟨L,hL⟩ (α x) (Icc 0 T) := + (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun s hs => hαd hx hs) (fun s _ => by exact_mod_cast hb (α x s)) + have hh := hl.dist_le_mul t ht 0 (show 0 ∈ Icc 0 T from ⟨le_rfl,hT⟩) + rw [hα₀ hx,Real.dist_eq,sub_zero,abs_of_nonneg ht.1] at hh + change dist (α x t) x₀ ≤ L*T+1/2 + exact (dist_triangle _ x _).trans (add_le_add + (hh.trans (mul_le_mul_of_nonneg_left ht.2 hL)) hx) + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + exact (le_max_left _ _).trans (by + simpa [Prod.dist_eq] using (hLip t ht).dist_le_mul _ (hmem hx) _ (hmem hy)) + +lemma hasFDerivAt_finite_variational_flow {f : E → E} (hf : ContDiff ℝ 2 f) + {x₀ : E} {r R T : ℝ} + {α : E → ℝ → E} {A : E → ℝ → (E →L[ℝ] E)} {L : ℝ≥0} + (hsol : ∀ x ∈ closedBall x₀ r, α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (A x) + ((fderiv ℝ f (α x t)).comp (A x t)) (Icc 0 T) t) ∧ + ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ R) + (hLip : ∀ t ∈ Icc 0 T, LipschitzOnWith L (α · t) (closedBall x₀ r)) + {x : E} (hx : x ∈ ball x₀ r) {t : ℝ} (ht : t ∈ Icc 0 T) : + HasFDerivAt (fun y => α y t) (A x t) x := by + have hx' := ball_subset_closedBall hx + have hdf : ContDiff ℝ 1 (fderiv ℝ f) := hf.fderiv_right (by norm_num) + obtain ⟨LD,hLD⟩ := hdf.contDiffOn.exists_lipschitzOnWith (by norm_num) + (convex_closedBall x₀ R) (isCompact_closedBall x₀ R) + obtain ⟨M,hM⟩ := (isCompact_closedBall x₀ R).bddAbove_image hdf.continuous.norm.continuousOn + let K := max 1 M + have hK : 0 < K := lt_of_lt_of_le zero_lt_one (le_max_left _ _) + let C : ℝ := ((LD : ℝ)*(L : ℝ)^2)/K * (Real.exp (K*t)-1) + have hC : 0 ≤ C := by + dsimp [C] + exact mul_nonneg (div_nonneg (mul_nonneg LD.2 (sq_nonneg _)) hK.le) + (sub_nonneg.mpr (Real.one_le_exp_iff.mpr (mul_nonneg hK.le ht.1))) + apply hasFDerivAt_of_quadratic_bound hC + filter_upwards [closedBall_mem_nhds_of_mem hx] with y hy + have hxs := hsol x hx' + have hys := hsol y hy + have hdα (z : E) (hz : z ∈ closedBall x₀ r) (s : ℝ) (hs : s ∈ Ico 0 T) : + HasDerivWithinAt (α z) (f (α z s)) (Ici s) s := + ((hsol z hz).2.2.1 s (Ico_subset_Icc_self hs)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem hs) + have hdA (s : ℝ) (hs : s ∈ Ico 0 T) : + HasDerivWithinAt (A x) ((fderiv ℝ f (α x s)).comp (A x s)) (Ici s) s := + (hxs.2.2.2.1 s (Ico_subset_Icc_self hs)).mono_of_mem_nhdsWithin + (Icc_mem_nhdsGE_of_mem hs) + have hb := variational_remainder_bound + (HasDerivWithinAt.continuousOn hxs.2.2.1) + (HasDerivWithinAt.continuousOn hys.2.2.1) + (HasDerivWithinAt.continuousOn hxs.2.2.2.1) + (hdα x hx') (hdα y hy) hdA + (v := y-x) (K := K) (ε := (LD : ℝ)*(L : ℝ)^2*‖y-x‖^2) + (by simp [hxs.1,hys.1,hxs.2.1]) + (fun s hs => (hM ⟨α x s,hxs.2.2.2.2 s (Ico_subset_Icc_self hs),rfl⟩).trans (le_max_right _ _)) + (fun s hs => ?_) + · have hb' := hb t ht + apply hb'.trans_eq + rw [gronwallBound_of_K_ne_0 hK.ne'] + dsimp [C] + ring_nf + · have hTaylor := taylor_bound_lipschitz_derivative + (convex_closedBall x₀ R) (fun z _ => (hf.differentiable (by norm_num)) z) + hLD (hxs.2.2.2.2 s (Ico_subset_Icc_self hs)) (hys.2.2.2.2 s (Ico_subset_Icc_self hs)) + apply hTaylor.trans + have hn := (hLip s (Ico_subset_Icc_self hs)).norm_sub_le hy hx' + have hsq : ‖α y s-α x s‖^2 ≤ ((L : ℝ)*‖y-x‖)^2 := + sq_le_sq₀ (norm_nonneg _) (mul_nonneg L.2 (norm_nonneg _)) |>.mpr hn + calc + _ ≤ (LD : ℝ)*((L : ℝ)*‖y-x‖)^2 := mul_le_mul_of_nonneg_left hsq LD.2 + _ = _ := by ring + +lemma flow_injOn_of_finite_ode {f : E → E} (hf : ContDiff ℝ 1 f) + {x₀ : E} {r R T : ℝ} {α : E → ℝ → E} + (hinit : ∀ x ∈ closedBall x₀ r, α x 0 = x) + (hder : ∀ x ∈ closedBall x₀ r, ∀ t ∈ Icc 0 T, + HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t) + (hrange : ∀ x ∈ closedBall x₀ r, ∀ t ∈ Icc 0 T, α x t ∈ closedBall x₀ R) + {t : ℝ} (ht : t ∈ Icc 0 T) : Set.InjOn (fun x => α x t) (closedBall x₀ r) := by + obtain ⟨K,hK⟩ := hf.contDiffOn.exists_lipschitzOnWith (by norm_num) + (convex_closedBall x₀ R) (isCompact_closedBall x₀ R) + have hsub : Icc 0 t ⊆ Icc 0 T := Icc_subset_Icc le_rfl ht.2 + have hd (x : E) (hx : x ∈ closedBall x₀ r) (s : ℝ) (hs : s ∈ Ioc 0 t) : + HasDerivWithinAt (α x) (f (α x s)) (Iic s) s := + ((hder x hx s (hsub (Ioc_subset_Icc_self hs))).mono hsub).mono_of_mem_nhdsWithin + (Icc_mem_nhdsLE_of_mem hs) + intro x hx y hy heq + have hu := ODE_solution_unique_of_mem_Icc_left + (v := fun _ => f) (s := fun _ => closedBall x₀ R) + (fun _ _ => hK) + ((HasDerivWithinAt.continuousOn (hder x hx)).mono hsub) (hd x hx) + (fun s hs => hrange x hx s (hsub (Ioc_subset_Icc_self hs))) + ((HasDerivWithinAt.continuousOn (hder y hy)).mono hsub) (hd y hy) + (fun s hs => hrange y hy s (hsub (Ioc_subset_Icc_self hs))) heq (show 0 ∈ Icc 0 t from ⟨le_rfl,ht.1⟩) + simpa [hinit x hx,hinit y hy] using hu + +lemma exists_finite_volume_flow {f : E → E} {T L K : ℝ} + (hT : 0 ≤ T) (hL : 0 ≤ L) (hK : 0 ≤ K) + (hf : ContDiff ℝ 2 f) (hb : ∀ x, ‖f x‖ ≤ L) + (hd : ∀ x, ‖fderiv ℝ f x‖ ≤ K) + (hdiv : ∀ x, LinearMap.trace ℝ E (fderiv ℝ f x).toLinearMap = 0) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + ∀ t ∈ Icc 0 T, (A x t).det = 1) ∧ + ∀ t ∈ Icc 0 T, Set.InjOn (fun x => α x t) (ball x₀ (1/2 : ℝ)) := by + obtain ⟨α,A,L',hsol,hLip⟩ := exists_finite_variational_flow hT hL hK hf hb hd x₀ + refine ⟨α,A,?_,?_⟩ + · intro x hx + have hh := hsol x (ball_subset_closedBall hx) + refine ⟨hh.1,hh.2.2.1,(fun _ ht => hasFDerivAt_finite_variational_flow hf hsol hLip hx ht),?_⟩ + exact determinant_clm_eq_one_of_trace_zero hT + (HasDerivWithinAt.continuousOn hh.2.2.2.1) hh.2.1 + (fun t ht => (hh.2.2.2.1 t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)) + (fun _ _ => hdiv _) + · intro t ht + exact (flow_injOn_of_finite_ode (hf.of_le (by norm_num)) + (fun x hx => (hsol x hx).1) (fun x hx => (hsol x hx).2.2.1) + (fun x hx => (hsol x hx).2.2.2.2) ht).mono ball_subset_closedBall + +lemma exists_bounded_volume_flow {f : E → E} {T L : ℝ} + (hT : 0 ≤ T) (hL : 0 ≤ L) (hf : ContDiff ℝ 2 f) + (hb : ∀ x, ‖f x‖ ≤ L) + (hdiv : ∀ x, LinearMap.trace ℝ E (fderiv ℝ f x).toLinearMap = 0) (x₀ : E) : + ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), + (∀ x ∈ ball x₀ (1/2 : ℝ), α x 0 = x ∧ + (∀ t ∈ Icc 0 T, HasDerivWithinAt (α x) (f (α x t)) (Icc 0 T) t) ∧ + (∀ t ∈ Icc 0 T, HasFDerivAt (fun y => α y t) (A x t) x) ∧ + ∀ t ∈ Icc 0 T, (A x t).det = 1) ∧ + ∀ t ∈ Icc 0 T, Set.InjOn (fun x => α x t) (ball x₀ (1/2 : ℝ)) := by + let χ : ContDiffBump x₀ := ⟨L*T+1,L*T+2,by positivity,by linarith⟩ + let g : E → E := fun x => χ x • f x + have hg : ContDiff ℝ 2 g := χ.contDiff.smul hf + have hgc : HasCompactSupport g := χ.hasCompactSupport.smul_right + have hgb (x : E) : ‖g x‖ ≤ L := by + change ‖χ x • f x‖ ≤ L + rw [norm_smul,Real.norm_of_nonneg χ.nonneg] + exact (mul_le_of_le_one_left (norm_nonneg _) χ.le_one).trans (hb x) + obtain ⟨K,hK⟩ := (hg.fderiv_right (m := 1) (by norm_num)).continuous.bounded_above_of_compact_support (hgc.fderiv ℝ) + obtain ⟨α,A,L',hsol,hLip⟩ := exists_finite_variational_flow hT hL + (le_max_left 0 K) hg hgb (fun x => (hK x).trans (le_max_right 0 K)) x₀ + have hlocal {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + g =ᶠ[𝓝 (α x t)] f := by + have hm : α x t ∈ ball x₀ χ.rIn := by + have hh := (hsol x hx).2.2.2.2 t ht + change dist (α x t) x₀ < L*T+1 + change dist (α x t) x₀ ≤ L*T+1/2 at hh + linarith + filter_upwards [χ.eventuallyEq_one_of_mem_ball hm] with z hz + change χ z • f z = f z + rw [hz] + exact one_smul ℝ (f z) + have hval {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + g (α x t) = f (α x t) := (hlocal hx ht).eq_of_nhds + have hdval {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) {t : ℝ} (ht : t ∈ Icc 0 T) : + fderiv ℝ g (α x t) = fderiv ℝ f (α x t) := (hlocal hx ht).fderiv_eq + refine ⟨α,A,?_,?_⟩ + · intro x hx + have hx' := ball_subset_closedBall hx + have hh := hsol x hx' + refine ⟨hh.1,?_,(fun _ ht => hasFDerivAt_finite_variational_flow hg hsol hLip hx ht),?_⟩ + · intro t ht + simpa only [hval hx' ht] using hh.2.2.1 t ht + · apply determinant_clm_eq_one_of_trace_zero hT + (HasDerivWithinAt.continuousOn hh.2.2.2.1) hh.2.1 + (fun t ht => (hh.2.2.2.1 t (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)) + intro t ht + rw [hdval hx' (Ioo_subset_Icc_self ht)] + exact hdiv _ + · intro t ht + exact (flow_injOn_of_finite_ode (hg.of_le (by norm_num)) + (fun x hx => (hsol x hx).1) (fun x hx => (hsol x hx).2.2.1) + (fun x hx => (hsol x hx).2.2.2.2) ht).mono ball_subset_closedBall +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/Variational.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/Variational.lean new file mode 100644 index 0000000000000000000000000000000000000000..645bd8ea0d5e0d37c8092d979940688764435d08 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/Variational.lean @@ -0,0 +1,202 @@ +import Mathlib + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory Metric +open scoped Topology Pointwise +open Set MeasureTheory Filter +open scoped Topology NNReal + +namespace RVM +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma taylor_bound_lipschitz_derivative {f : E → E} {s : Set E} {L : ℝ≥0} + (hs : Convex ℝ s) (hf : ∀ x ∈ s, DifferentiableAt ℝ f x) + (hL : LipschitzOnWith L (fderiv ℝ f) s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) : + ‖f y-f x-fderiv ℝ f x (y-x)‖ ≤ L * ‖y-x‖^2 := by + have hsub : segment ℝ x y ⊆ s := hs.segment_subset hx hy + have hseg (z : E) (hz : z ∈ segment ℝ x y) : ‖z-x‖ ≤ ‖y-x‖ := by + simpa only [Metric.mem_closedBall,dist_eq_norm] using ((convex_closedBall x ‖y-x‖).segment_subset (by simp : x ∈ Metric.closedBall x ‖y-x‖) + (by simp [dist_eq_norm] : y ∈ Metric.closedBall x ‖y-x‖)) hz + have h := (convex_segment x y).norm_image_sub_le_of_norm_fderiv_le' + (fun z hz => hf z (hsub hz)) + (fun z hz => (hL.norm_sub_le (hsub hz) hx).trans + (mul_le_mul_of_nonneg_left (hseg z hz) L.2)) + (left_mem_segment ℝ x y) (right_mem_segment ℝ x y) + simpa [pow_two,mul_assoc] using h + +lemma variational_remainder_bound + {f : ℝ → E → E} {x y : ℝ → E} {A D : ℝ → E →L[ℝ] E} + {a b K ε : ℝ} {v : E} + (hx : ContinuousOn x (Icc a b)) (hy : ContinuousOn y (Icc a b)) + (hA : ContinuousOn A (Icc a b)) + (hxd : ∀ t ∈ Ico a b, HasDerivWithinAt x (f t (x t)) (Ici t) t) + (hyd : ∀ t ∈ Ico a b, HasDerivWithinAt y (f t (y t)) (Ici t) t) + (hAd : ∀ t ∈ Ico a b, HasDerivWithinAt A ((D t).comp (A t)) (Ici t) t) + (hinit : y a-x a = A a v) + (hK : ∀ t ∈ Ico a b, ‖D t‖ ≤ K) + (hε : ∀ t ∈ Ico a b, ‖f t (y t)-f t (x t)-D t (y t-x t)‖ ≤ ε) : + ∀ t ∈ Icc a b, ‖y t-x t-A t v‖ ≤ gronwallBound 0 K ε (t-a) := by + have hd : ∀ t ∈ Ico a b, HasDerivWithinAt + (fun s => y s-x s-A s v) + (f t (y t)-f t (x t)-D t (A t v)) (Ici t) t := by + intro t ht + convert! ((hyd t ht).sub (hxd t ht)).sub ((hAd t ht).clm_apply (hasDerivWithinAt_const t (Ici t) v)) using 1; simp + apply norm_le_gronwallBound_of_norm_deriv_right_le (δ := 0) + ((hy.sub hx).sub (hA.clm_apply continuousOn_const)) hd + · change ‖y a-x a-A a v‖ ≤ 0 + rw [hinit,sub_self,norm_zero] + · intro t ht + have heq : f t (y t)-f t (x t)-D t (A t v) = + D t (y t-x t-A t v) + (f t (y t)-f t (x t)-D t (y t-x t)) := by + simp only [map_sub] + abel + rw [heq] + calc + _ ≤ ‖D t (y t-x t-A t v)‖ + ‖f t (y t)-f t (x t)-D t (y t-x t)‖ := norm_add_le _ _ + _ ≤ K*‖y t-x t-A t v‖ + ε := add_le_add + (((D t).le_opNorm _).trans (mul_le_mul_of_nonneg_right (hK t ht) (norm_nonneg _))) + (hε t ht) + +lemma hasFDerivAt_of_quadratic_bound {g : E → E} {x : E} {A : E →L[ℝ] E} + {C : ℝ} (_hC : 0 ≤ C) + (h : ∀ᶠ y in 𝓝 x, ‖g y-g x-A (y-x)‖ ≤ C*‖y-x‖^2) : HasFDerivAt g A x := by + rw [hasFDerivAt_iff_tendsto] + apply squeeze_zero' (g := fun y => C*‖y-x‖) (Eventually.of_forall (fun y => mul_nonneg (inv_nonneg.mpr (norm_nonneg _)) + (norm_nonneg _))) ?_ ?_ + · filter_upwards [h] with y hy + calc + ‖y-x‖⁻¹*‖g y-g x-A (y-x)‖ ≤ ‖y-x‖⁻¹*(C*‖y-x‖^2) := + mul_le_mul_of_nonneg_left hy (inv_nonneg.mpr (norm_nonneg _)) + _ ≤ C*‖y-x‖ := by + by_cases heq : y = x + · simp [heq] + · have hh : ‖y-x‖ ≠ 0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr heq) + exact le_of_eq (by field_simp) + · have ht : Tendsto (fun y : E => C*‖y-x‖) (𝓝 x) (𝓝 (C*‖x-x‖)) := by + exact (continuous_const.mul (continuous_id.sub continuous_const).norm).tendsto x + simpa using ht +end RVM + +open Set MeasureTheory Metric ODE +open scoped Topology NNReal + +namespace RVM + +lemma picard_flow_with_range {E : Type*} [NormedAddCommGroup E] + [NormedSpace ℝ E] [CompleteSpace E] + {f : ℝ → E → E} {tmin tmax : ℝ} {t₀ : Icc tmin tmax} + {x₀ : E} {a r L K : ℝ≥0} + (hf : IsPicardLindelof f t₀ x₀ a r L K) : + ∃ α : E → ℝ → E, + (∀ x ∈ closedBall x₀ r, α x t₀ = x ∧ + (∀ t ∈ Icc tmin tmax, HasDerivWithinAt (α x) (f t (α x t)) (Icc tmin tmax) t) ∧ + ∀ t, α x t ∈ closedBall x₀ a) ∧ + ∃ L' : ℝ≥0, ∀ t ∈ Icc tmin tmax, LipschitzOnWith L' (α · t) (closedBall x₀ r) := by + classical + have (x) (hx : x ∈ closedBall x₀ r) := FunSpace.exists_isFixedPt_next hf hx + choose α hα using this + set α' := fun (x : E) ↦ if hx : x ∈ closedBall x₀ r then + α x hx |>.compProj else 0 with hα' + refine ⟨α', fun x hx ↦ ⟨?_, fun t ht ↦ ?_, fun t => ?_⟩, ?_⟩ + · rw [hα'] + beta_reduce + rw [dite_eq_left hx, FunSpace.compProj_val, ← hα, FunSpace.next_apply₀] + · rw [hα'] + beta_reduce + rw [dite_eq_left hx, FunSpace.compProj_apply] + apply hasDerivWithinAt_picard_Icc t₀.2 hf.continuousOn_uncurry + (α x hx |>.continuous_compProj.continuousOn) + (fun _ ht' ↦ α x hx |>.compProj_mem_closedBall hf.mul_max_le) + x ht |>.congr_of_mem _ ht + intro t' ht' + nth_rw 1 [← hα] + rw [FunSpace.compProj_of_mem ht', FunSpace.next_apply] + · simp only [hα',dite_eq_left hx] + exact (α x hx).compProj_mem_closedBall hf.mul_max_le + · obtain ⟨L', h⟩ := FunSpace.exists_forall_closedBall_funSpace_dist_le_mul hf + refine ⟨L', fun t ht ↦ LipschitzOnWith.of_dist_le_mul fun x hx y hy ↦ ?_⟩ + simp_rw [hα'] + rw [dite_eq_left hx, dite_eq_left hy, FunSpace.compProj_apply, FunSpace.compProj_apply, + ← FunSpace.toContinuousMap_apply_eq_apply, ← FunSpace.toContinuousMap_apply_eq_apply] + have : Nonempty (Icc tmin tmax) := ⟨t₀⟩ + apply ContinuousMap.dist_le_iff_of_nonempty.mp + exact h x y hx hy (α x hx) (α y hy) (hα x hx) (hα y hy) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +def variationalField (f : E → E) (z : E × (E →L[ℝ] E)) : E × (E →L[ℝ] E) := + (f z.1, (fderiv ℝ f z.1).comp z.2) + +omit [FiniteDimensional ℝ E] in +lemma contDiff_variationalField {f : E → E} (hf : ContDiff ℝ 2 f) : + ContDiff ℝ 1 (variationalField f) := by + exact ((hf.of_le (by norm_num)).comp contDiff_fst).prodMk + (((hf.fderiv_right (by norm_num)).comp contDiff_fst).clm_comp contDiff_snd) + +lemma exists_local_variational_flow {f : E → E} (hf : ContDiff ℝ 2 f) (x₀ : E) : + ∃ ε > (0 : ℝ), ∃ α : E → ℝ → E, ∃ A : E → ℝ → (E →L[ℝ] E), ∃ L : ℝ≥0, + (∀ x ∈ closedBall x₀ (1/2 : ℝ), α x 0 = x ∧ A x 0 = ContinuousLinearMap.id ℝ E ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (α x) (f (α x t)) (Icc (-ε) ε) t) ∧ + (∀ t ∈ Icc (-ε) ε, HasDerivWithinAt (A x) + ((fderiv ℝ f (α x t)).comp (A x t)) (Icc (-ε) ε) t) ∧ + ∀ t, α x t ∈ closedBall x₀ 1) ∧ + ∀ t ∈ Icc (-ε) ε, LipschitzOnWith L (α · t) (closedBall x₀ (1/2 : ℝ)) := by + let z₀ : E × (E →L[ℝ] E) := (x₀,ContinuousLinearMap.id ℝ E) + have hF := contDiff_variationalField hf + obtain ⟨K,hK⟩ := hF.contDiffOn.exists_lipschitzOnWith (by norm_num) + (convex_closedBall z₀ 1) (isCompact_closedBall z₀ 1) + obtain ⟨M,hM⟩ := (isCompact_closedBall z₀ 1).bddAbove_image hF.continuous.norm.continuousOn + let B := max 1 M + have hB : 0 < B := lt_of_lt_of_le zero_lt_one (le_max_left _ _) + let ε : ℝ := 1/(2*B) + have hε : 0 < ε := by dsimp [ε]; positivity + have hp : IsPicardLindelof (fun _ => variationalField f) + (tmin := -ε) (tmax := ε) ⟨0,⟨by linarith, hε.le⟩⟩ z₀ 1 (1/2) ⟨B,hB.le⟩ K := by + refine IsPicardLindelof.of_time_independent ?_ hK ?_ + · intro z hz + exact (hM ⟨z,hz,rfl⟩).trans (le_max_right _ _) + · change B * max (ε-0) (0-(-ε)) ≤ (1 : ℝ)-(1/2 : ℝ≥0) + norm_num only [sub_zero,zero_sub,neg_neg,max_self,NNReal.coe_div,NNReal.coe_one, + NNReal.coe_ofNat] + dsimp [ε] + field_simp + norm_num + obtain ⟨β,hβ,L,hL⟩ := picard_flow_with_range hp + let α : E → ℝ → E := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).1 + let A : E → ℝ → (E →L[ℝ] E) := fun x t => (β (x,ContinuousLinearMap.id ℝ E) t).2 + have hmem {x : E} (hx : x ∈ closedBall x₀ (1/2 : ℝ)) : + (x,ContinuousLinearMap.id ℝ E) ∈ closedBall z₀ ((1/2 : ℝ≥0) : ℝ) := by + simpa [z₀,Prod.dist_eq] using hx + refine ⟨ε,hε,α,A,L,?_,?_⟩ + · intro x hx + have hh := hβ _ (hmem hx) + refine ⟨congrArg Prod.fst hh.1,congrArg Prod.snd hh.1,?_,?_,?_⟩ + · intro t ht + simpa [α,variationalField] using (hh.2.1 t ht).hasFDerivWithinAt.fst.hasDerivWithinAt + · intro t ht + simpa [α,A,variationalField] using (hh.2.1 t ht).hasFDerivWithinAt.snd.hasDerivWithinAt + · intro t + have hr := hh.2.2 t + change dist (α x t) x₀ ≤ 1 + change max (dist (α x t) x₀) (dist (A x t) (ContinuousLinearMap.id ℝ E)) ≤ 1 at hr + exact (le_max_left _ _).trans hr + · intro t ht + apply LipschitzOnWith.of_dist_le_mul + intro x hx y hy + exact (le_max_left _ _).trans (by + simpa [Prod.dist_eq] using (hL t ht).dist_le_mul _ (hmem hx) _ (hmem hy)) +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveGradient.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..f93c1d3f78dfe97c14a846cef277bb70648de5e6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveGradient.lean @@ -0,0 +1,831 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.ParamPrimitive + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter MeasureTheory Metric +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma dirD_component {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {F : H → Vec} (hF : Differentiable ℝ F) (p e : H) (i : Fin 3) : + dirD (fun z => F z i) e p = dirD F e p i := by + have h := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp p (hF p).hasFDerivAt + change HasFDerivAt (fun z => F z i) _ p at h + unfold dirD + rw [h.fderiv] + rfl + +lemma divergence_smul {g : Vec → ℝ} {F : Vec → Vec} {x : Vec} + (hg : DifferentiableAt ℝ g x) (hF : DifferentiableAt ℝ F x) : + divergence (fun y => g y • F y) x = + dot (gradient g x) (F x) + g x * divergence F x := by + have hc (i : Fin 3) : DifferentiableAt ℝ (fun y => F y i) x := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hF + have hm (i : Fin 3) : spatialPartial (fun y => g y * F y i) x i = + g x * spatialPartial (fun y => F y i) x i + F x i * spatialPartial g x i := + spatialPartial_mul hg (hc i) i + simp only [divergence,PiLp.smul_apply,smul_eq_mul,hm,dot, + gradient_apply,Finset.sum_add_distrib,Finset.mul_sum] + rw [add_comm] + congr 1 + apply Finset.sum_congr rfl + intro i _ + ring + +def waveGradient (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : Vec := + WithLp.toLp 2 (fun i => dirD u (0,basis i) p) + +lemma waveGradient_apply (u : ℝ × Vec → ℝ) (p : ℝ × Vec) (i : Fin 3) : + waveGradient u p i = dirD u (0,basis i) p := rfl + +lemma contDiff_waveGradient {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) : + ContDiff ℝ ∞ (waveGradient u) := by + apply contDiff_euclidean.mpr + intro i + exact contDiff_dirD hu (0,basis i) + +lemma waveGradient_slice {u : ℝ × Vec → ℝ} (hu : Differentiable ℝ u) (t : ℝ) (x : Vec) : + waveGradient u (t,x) = gradient (fun y => u (t,y)) x := by + ext i + rw [waveGradient_apply,gradient_apply,spatialPartial_time_slice (hu (t,x))] + rfl + +lemma divergence_waveGradient {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) : + divergence (fun y => waveGradient u (t,y)) x = laplace (fun y => u (t,y)) x := by + have he : (fun y => waveGradient u (t,y)) = gradient (fun y => u (t,y)) := + funext (waveGradient_slice (hu.differentiable (by simp)) t) + rw [he] + rfl + +lemma waveGradient_time {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) : + deriv (fun r => waveGradient u (r,x)) t = waveGradient (dirD u (1,0)) (t,x) := by + rw [deriv_slice_eq_dirD ((contDiff_waveGradient hu).differentiable (by simp))] + ext i + rw [← dirD_component ((contDiff_waveGradient hu).differentiable (by simp)),waveGradient_apply] + exact dirD_comm hu (0,basis i) (1,0) (t,x) + +def waveEnergy (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : ℝ := + ((dirD u (1,0) p)^2+‖waveGradient u p‖^2)/2 + +def waveFlux (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : Vec := + -(dirD u (1,0) p) • waveGradient u p + +lemma contDiff_waveEnergy {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) : + ContDiff ℝ ∞ (waveEnergy u) := + (((contDiff_dirD hu (1,0)).pow 2).add ((contDiff_waveGradient hu).norm_sq ℝ)).div_const 2 + +lemma contDiff_waveFlux {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) : + ContDiff ℝ ∞ (waveFlux u) := (contDiff_dirD hu (1,0)).neg.smul (contDiff_waveGradient hu) + +lemma waveEnergy_nonneg (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : 0 ≤ waveEnergy u p := by + dsimp [waveEnergy] + positivity + +lemma waveFlux_bound (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : ‖waveFlux u p‖ ≤ waveEnergy u p := by + rw [waveFlux,norm_smul,Real.norm_eq_abs,abs_neg] + have h := sq_nonneg (|dirD u (1,0) p|-‖waveGradient u p‖) + have hh := sq_abs (dirD u (1,0) p) + dsimp [waveEnergy] + nlinarith + +lemma waveEnergy_deriv {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) : + deriv (fun r => waveEnergy u (r,x)) t = + dirD u (1,0) (t,x)*dirD (dirD u (1,0)) (1,0) (t,x) + + dot (waveGradient u (t,x)) (waveGradient (dirD u (1,0)) (t,x)) := by + have ht : DifferentiableAt ℝ (fun r : ℝ => dirD u (1,0) (r,x)) t := by + exact DifferentiableAt.comp (f:=fun r : ℝ => (r,x)) (g:=dirD u (1,0)) t + ((contDiff_dirD hu (1,0)).differentiable (by simp) (t,x)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hx : DifferentiableAt ℝ (fun r : ℝ => waveGradient u (r,x)) t := by + exact DifferentiableAt.comp (f:=fun r : ℝ => (r,x)) (g:=waveGradient u) t + ((contDiff_waveGradient hu).differentiable (by simp) (t,x)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hd := ((ht.hasDerivAt.pow 2).add hx.hasDerivAt.norm_sq).div_const 2 + change HasDerivAt (fun r => waveEnergy u (r,x)) _ t at hd + rw [hd.deriv,deriv_slice_eq_dirD ((contDiff_dirD hu (1,0)).differentiable (by simp)), + waveGradient_time hu,← dot_eq_inner] + simp only [Nat.cast_ofNat,Nat.reduceSub,pow_one] + ring + +lemma waveFlux_divergence {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) : + divergence (fun y => waveFlux u (t,y)) x = + -dirD u (1,0) (t,x)*laplace (fun y => u (t,y)) x - + dot (waveGradient u (t,x)) (waveGradient (dirD u (1,0)) (t,x)) := by + have ht : DifferentiableAt ℝ (fun y : Vec => dirD u (1,0) (t,y)) x := + ((contDiff_dirD hu (1,0)).differentiable (by simp) (t,x)).comp x + ((differentiableAt_const t).prodMk differentiableAt_id) + have hx : DifferentiableAt ℝ (fun y : Vec => waveGradient u (t,y)) x := + ((contDiff_waveGradient hu).differentiable (by simp) (t,x)).comp x + ((differentiableAt_const t).prodMk differentiableAt_id) + unfold waveFlux + rw [divergence_smul (g:=fun y => -(dirD u (1,0) (t,y))) ht.neg hx, + divergence_waveGradient hu] + have hg : gradient (fun y => -dirD u (1,0) (t,y)) x = -waveGradient (dirD u (1,0)) (t,x) := by + ext i + rw [gradient_apply,PiLp.neg_apply,waveGradient_apply] + unfold spatialPartial + rw [fderiv_fun_neg,neg_apply] + congr 1 + exact spatialPartial_time_slice ((contDiff_dirD hu (1,0)).differentiable (by simp) (t,x)) i + rw [hg] + simp only [dot,PiLp.neg_apply,neg_mul,Finset.sum_neg_distrib] + have hc : (∑ i : Fin 3, waveGradient (dirD u (1,0)) (t,x) i * waveGradient u (t,x) i) = + ∑ i : Fin 3, waveGradient u (t,x) i * waveGradient (dirD u (1,0)) (t,x) i := by + apply Finset.sum_congr rfl + intro i _ + ring + rw [hc] + ring + +lemma wave_local_energy {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) + (hw : deriv (deriv (fun r => u (r,x))) t = laplace (fun y => u (t,y)) x) : + deriv (fun r => waveEnergy u (r,x)) t + divergence (fun y => waveFlux u (t,y)) x = 0 := by + rw [waveEnergy_deriv hu,waveFlux_divergence hu,← deriv_deriv_slice_eq_dirD hu,hw] + ring + +lemma dirD_add {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F G : H → W} + (hF : Differentiable ℝ F) (hG : Differentiable ℝ G) (e : H) : + dirD (fun p => F p+G p) e = fun p => dirD F e p+dirD G e p := by + funext p + simp only [dirD,fderiv_fun_add (hF p) (hG p),add_apply] + +lemma dirD_sub {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F G : H → W} + (hF : Differentiable ℝ F) (hG : Differentiable ℝ G) (e : H) : + dirD (fun p => F p-G p) e = fun p => dirD F e p-dirD G e p := by + funext p + simp only [dirD,fderiv_fun_sub (hF p) (hG p),sub_apply] + +lemma dirD_sum {H W ι : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] (S : Finset ι) {F : ι → H → W} + (hF : ∀ i ∈ S, Differentiable ℝ (F i)) (e : H) : + dirD (fun p => ∑ i ∈ S, F i p) e = fun p => ∑ i ∈ S, dirD (F i) e p := by + funext p + simp only [dirD,fderiv_fun_sum (fun i hi => hF i hi p),sum_apply] + +lemma dirD_third_comm {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : H → W} + (hF : ContDiff ℝ ∞ F) (e a p : H) : + dirD (dirD (dirD F a) a) e p = dirD (dirD (dirD F e) a) a p := by + rw [dirD_comm (contDiff_dirD hF a) a e] + have hh : dirD (dirD F a) e = dirD (dirD F e) a := + funext (dirD_comm hF a e) + rw [hh] + +def waveBox (u : ℝ × Vec → ℝ) (p : ℝ × Vec) : ℝ := + dirD (dirD u (1,0)) (1,0) p - + ∑ i : Fin 3, dirD (dirD u (0,basis i)) (0,basis i) p + +lemma waveBox_eq {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (t : ℝ) (x : Vec) : + waveBox u (t,x) = deriv (deriv (fun r => u (r,x))) t -laplace (fun y => u (t,y)) x := by + rw [deriv_deriv_slice_eq_dirD hu,laplace_slice_eq_dirD hu] + rfl + +lemma contDiff_waveBox {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) : ContDiff ℝ ∞ (waveBox u) := + (contDiff_dirD (contDiff_dirD hu (1,0)) (1,0)).sub + (ContDiff.sum (fun i _ => contDiff_dirD (contDiff_dirD hu (0,basis i)) (0,basis i))) + +lemma waveBox_sub {u v : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) : + waveBox (fun p => u p-v p) = fun p => waveBox u p-waveBox v p := by + have hdd (e a p : ℝ × Vec) : + dirD (dirD (fun p => u p-v p) e) a p = + dirD (dirD u e) a p-dirD (dirD v e) a p := by + rw [dirD_sub (hu.differentiable (by simp)) (hv.differentiable (by simp)), + dirD_sub ((contDiff_dirD hu e).differentiable (by simp)) + ((contDiff_dirD hv e).differentiable (by simp))] + funext p + simp only [waveBox,hdd,Finset.sum_sub_distrib] + ring + +lemma waveBox_add {u v : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) : + waveBox (fun p => u p+v p) = fun p => waveBox u p+waveBox v p := by + have hdd (e a p : ℝ × Vec) : + dirD (dirD (fun p => u p+v p) e) a p = + dirD (dirD u e) a p+dirD (dirD v e) a p := by + rw [dirD_add (hu.differentiable (by simp)) (hv.differentiable (by simp)), + dirD_add ((contDiff_dirD hu e).differentiable (by simp)) + ((contDiff_dirD hv e).differentiable (by simp))] + funext p + simp only [waveBox,hdd,Finset.sum_add_distrib] + ring + +lemma waveBox_dirD {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (e : ℝ × Vec) (p : ℝ × Vec) : + waveBox (dirD u e) p = dirD (waveBox u) e p := by + have hf := (contDiff_dirD (contDiff_dirD hu (1,0)) (1,0)).differentiable (by simp) + have hi (i : Fin 3) := + (contDiff_dirD (contDiff_dirD hu (0,basis i)) (0,basis i)).differentiable (by simp) + have hs : Differentiable ℝ (fun p => ∑ i : Fin 3, dirD (dirD u (0,basis i)) (0,basis i) p) := + Differentiable.fun_sum (fun i _ => hi i) + unfold waveBox + rw [dirD_sub hf hs] + dsimp only + rw [dirD_sum Finset.univ (fun i _ => hi i)] + simp only [dirD_third_comm hu] + +lemma waveBox_timeDerivative_zero {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (hw : ∀ t, 0 waveBox u (r,x)) =ᶠ[𝓝 t] fun _ => (0:ℝ) := by + filter_upwards [lt_mem_nhds ht] with r hr + exact hw r hr x + rw [he.deriv_eq,deriv_const] + +lemma waveK_box {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) {t : ℝ} (ht : 0≤t) (x : Vec) : + waveBox (waveK g) (t,x)=0 := by + rw [waveBox_eq (contDiff_waveK hg),waveK_equation hg x ht,sub_self] + +def freeWave (g h : Vec → ℝ) (p : ℝ × Vec) : ℝ := + dirD (waveK g) (1,0) p + waveK h p + +lemma contDiff_freeWave {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) : + ContDiff ℝ ∞ (freeWave g h) := + (contDiff_dirD (contDiff_waveK hg) (1,0)).add (contDiff_waveK hh) + +lemma freeWave_initial {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) : + freeWave g h (0,x)=g x := by + rw [freeWave,← deriv_slice_eq_dirD ((contDiff_waveK hg).differentiable (by simp)), + waveK_initial_velocity hg,waveK_zero,add_zero] + +lemma freeWave_initial_velocity {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) + (hh : ContDiff ℝ ∞ h) (x : Vec) : + deriv (fun t => freeWave g h (t,x)) 0 = h x := by + rw [deriv_slice_eq_dirD ((contDiff_freeWave hg hh).differentiable (by simp))] + change dirD (fun p => dirD (waveK g) (1,0) p+waveK h p) (1,0) (0,x)=_ + rw [dirD_add ((contDiff_dirD (contDiff_waveK hg) (1,0)).differentiable (by simp)) + ((contDiff_waveK hh).differentiable (by simp))] + dsimp only + rw [← deriv_deriv_slice_eq_dirD (contDiff_waveK hg),waveK_equation hg x (by norm_num), + ← deriv_slice_eq_dirD ((contDiff_waveK hh).differentiable (by simp)),waveK_initial_velocity hh] + simp only [waveK_zero] + simp [laplace,divergence,gradient,spatialPartial] + +lemma freeWave_box {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) + {t : ℝ} (ht : 0 waveK_box hg hr.le y) ht x, + waveK_box hh ht.le,zero_add] + +lemma sourceWave_box {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) {t : ℝ} (ht : 0≤t) (x : Vec) : + waveBox (sourceWave ρ) (t,x)=ρ (t,x) := by + rw [waveBox_eq (contDiff_sourceWave hρ),sourceWave_equation hρ x ht] + ring + +lemma waveGradient_initial_zero {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (h0 : ∀ x, u (0,x)=0) (x : Vec) : waveGradient u (0,x)=0 := by + rw [waveGradient_slice (hu.differentiable (by simp))] + have hh : (fun y => u (0,y)) = fun _ => (0:ℝ) := funext h0 + rw [hh] + ext i + simp + +lemma waveEnergy_initial_zero {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (h0 : ∀ x, u (0,x)=0) (h1 : ∀ x, deriv (fun t => u (t,x)) 0=0) (x : Vec) : + waveEnergy u (0,x)=0 := by + rw [waveEnergy,waveGradient_initial_zero hu h0, + ← deriv_slice_eq_dirD (hu.differentiable (by simp)),h1] + norm_num + +lemma wave_zero_on {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + {T : ℝ} (hT : 0≤T) + (hw : ∀ t ∈ Ioo 0 T, ∀ x, waveBox u (t,x)=0) + (h0 : ∀ x, u (0,x)=0) (h1 : ∀ x, deriv (fun t => u (t,x)) 0=0) + (x : Vec) : u (T,x)=0 := by + have hezero (t : ℝ) (ht : t ∈ Icc 0 T) (y : Vec) : waveEnergy u (t,y)=0 := by + apply causal_local_energy_vanishes ht.1 + ((contDiff_waveEnergy hu).of_le (by simp)).contDiffOn + ((contDiff_waveFlux hu).of_le (by simp)).contDiffOn + (contDiff_waveEnergy hu).continuous.continuousOn + (fun _ _ z => waveEnergy_nonneg u (_,z)) + (fun _ _ z => waveFlux_bound u (_,z)) + _ (waveEnergy_initial_zero hu h0 h1) + intro r hr z + apply wave_local_energy hu + have hh := hw r ⟨hr.1,hr.2.trans_le ht.2⟩ z + rw [waveBox_eq hu] at hh + linarith + have htzero (t : ℝ) (ht : t ∈ Icc 0 T) : deriv (fun r => u (r,x)) t=0 := by + rw [deriv_slice_eq_dirD (hu.differentiable (by simp))] + have he := hezero t ht x + unfold waveEnergy at he + nlinarith [sq_nonneg (dirD u (1,0) (t,x)),sq_nonneg ‖waveGradient u (t,x)‖] + have hdiff (t : ℝ) : DifferentiableAt ℝ (fun r => u (r,x)) t := + DifferentiableAt.comp (f:=fun r : ℝ => (r,x)) (g:=u) t + (hu.differentiable (by simp) (t,x)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hn := (convex_Icc (0:ℝ) T).norm_image_sub_le_of_norm_deriv_le + (fun t (_ht : t ∈ Icc 0 T) => hdiff t) + (C:=0) (fun t ht => by rw [htzero t ht]; simp) ⟨le_rfl,hT⟩ ⟨hT,le_rfl⟩ + simp only [zero_mul,h0,sub_zero] at hn + exact norm_eq_zero.mp (le_antisymm hn (norm_nonneg _)) + +lemma wave_zero {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (hw : ∀ t, 0 u (t,x)) 0=0) + {T : ℝ} (hT : 0≤T) (x : Vec) : u (T,x)=0 := + wave_zero_on hu hT (fun t ht y => hw t ht.1 y) h0 h1 x + +lemma wave_unique {u v : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) + (hw : ∀ t, 0 u (t,x)) 0=deriv (fun t => v (t,x)) 0) + {T : ℝ} (hT : 0≤T) (x : Vec) : u (T,x)=v (T,x) := by + apply sub_eq_zero.mp + apply wave_zero (hu.sub hv) _ _ _ hT x + · intro t ht y + rw [waveBox_sub hu hv] + exact sub_eq_zero.mpr (hw t ht y) + · intro y + exact sub_eq_zero.mpr (h0 y) + · intro y + rw [deriv_slice_eq_dirD ((hu.sub hv).differentiable (by simp)), + dirD_sub (hu.differentiable (by simp)) (hv.differentiable (by simp))] + dsimp only + rw [← deriv_slice_eq_dirD (hu.differentiable (by simp)), + ← deriv_slice_eq_dirD (hv.differentiable (by simp)),h1,sub_self] + +lemma wave_unique_on {u v : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) + {T : ℝ} (hT : 0≤T) + (hw : ∀ t ∈ Ioo 0 T, ∀ x, waveBox u (t,x)=waveBox v (t,x)) + (h0 : ∀ x, u (0,x)=v (0,x)) + (h1 : ∀ x, deriv (fun t => u (t,x)) 0=deriv (fun t => v (t,x)) 0) + (x : Vec) : u (T,x)=v (T,x) := by + apply sub_eq_zero.mp + apply wave_zero_on (hu.sub hv) hT _ _ _ x + · intro t ht y + rw [waveBox_sub hu hv] + exact sub_eq_zero.mpr (hw t ht y) + · intro y + exact sub_eq_zero.mpr (h0 y) + · intro y + rw [deriv_slice_eq_dirD ((hu.sub hv).differentiable (by simp)), + dirD_sub (hu.differentiable (by simp)) (hv.differentiable (by simp))] + dsimp only + rw [← deriv_slice_eq_dirD (hu.differentiable (by simp)), + ← deriv_slice_eq_dirD (hv.differentiable (by simp)),h1,sub_self] + +def retardedWave (g h : Vec → ℝ) (ρ : ℝ × Vec → ℝ) (p : ℝ × Vec) : ℝ := + freeWave g h p + sourceWave ρ p + +lemma contDiff_retardedWave {g h : Vec → ℝ} {ρ : ℝ × Vec → ℝ} + (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) (hρ : ContDiff ℝ ∞ ρ) : + ContDiff ℝ ∞ (retardedWave g h ρ) := + (contDiff_freeWave hg hh).add (contDiff_sourceWave hρ) + +lemma retardedWave_initial {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (ρ : ℝ × Vec → ℝ) (x : Vec) : + retardedWave g h ρ (0,x)=g x := by + rw [retardedWave,freeWave_initial hg,sourceWave_initial_value,add_zero] + +lemma retardedWave_initial_velocity {g h : Vec → ℝ} {ρ : ℝ × Vec → ℝ} + (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) (hρ : ContDiff ℝ ∞ ρ) (x : Vec) : + deriv (fun t => retardedWave g h ρ (t,x)) 0=h x := by + rw [deriv_slice_eq_dirD ((contDiff_retardedWave hg hh hρ).differentiable (by simp))] + unfold retardedWave + rw [dirD_add ((contDiff_freeWave hg hh).differentiable (by simp)) + ((contDiff_sourceWave hρ).differentiable (by simp))] + dsimp only + rw [← deriv_slice_eq_dirD ((contDiff_freeWave hg hh).differentiable (by simp)), + freeWave_initial_velocity hg hh, + ← deriv_slice_eq_dirD ((contDiff_sourceWave hρ).differentiable (by simp)), + sourceWave_initial_velocity hρ,add_zero] + +lemma retardedWave_box {g h : Vec → ℝ} {ρ : ℝ × Vec → ℝ} + (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) (hρ : ContDiff ℝ ∞ ρ) + {t : ℝ} (ht : 0 u (t,x)) 0=h x) + {T : ℝ} (hT : 0≤T) (x : Vec) : u (T,x)=retardedWave g h ρ (T,x) := by + apply wave_unique hu (contDiff_retardedWave hg hh hρ) + (fun t ht y => (hw t ht y).trans (retardedWave_box hg hh hρ ht y).symm) + (fun y => (h0 y).trans (retardedWave_initial hg ρ y).symm) + (fun y => (h1 y).trans (retardedWave_initial_velocity hg hh hρ y).symm) hT + +lemma wave_representation_on {u : ℝ × Vec → ℝ} {g h : Vec → ℝ} {ρ : ℝ × Vec → ℝ} + (hu : ContDiff ℝ ∞ u) (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) + (hρ : ContDiff ℝ ∞ ρ) {T : ℝ} (hT : 0≤T) + (hw : ∀ t ∈ Ioo 0 T, ∀ x, waveBox u (t,x)=ρ (t,x)) + (h0 : ∀ x, u (0,x)=g x) (h1 : ∀ x, deriv (fun t => u (t,x)) 0=h x) + (x : Vec) : u (T,x)=retardedWave g h ρ (T,x) := by + apply wave_unique_on hu (contDiff_retardedWave hg hh hρ) hT + (fun t ht y => (hw t ht y).trans (retardedWave_box hg hh hρ ht.1 y).symm) + (fun y => (h0 y).trans (retardedWave_initial hg ρ y).symm) + (fun y => (h1 y).trans (retardedWave_initial_velocity hg hh hρ y).symm) + +def curlA : Fin 3 → Fin 3 := ![1,2,0] +def curlB : Fin 3 → Fin 3 := ![2,0,1] + +def spaceCurl (F : Field) (p : ℝ × Vec) : Vec := + WithLp.toLp 2 (fun i => dirD F (0,basis (curlA i)) p (curlB i) - + dirD F (0,basis (curlB i)) p (curlA i)) + +lemma spaceCurl_apply (F : Field) (p : ℝ × Vec) (i : Fin 3) : + spaceCurl F p i = dirD F (0,basis (curlA i)) p (curlB i) - + dirD F (0,basis (curlB i)) p (curlA i) := rfl + +lemma contDiff_spaceCurl {F : Field} (hF : ContDiff ℝ ∞ F) : ContDiff ℝ ∞ (spaceCurl F) := by + apply contDiff_euclidean.mpr + intro i + exact (contDiff_component (contDiff_dirD hF _) _).sub + (contDiff_component (contDiff_dirD hF _) _) + +lemma spaceCurl_slice {F : Field} (hF : Differentiable ℝ F) (t : ℝ) (x : Vec) : + spaceCurl F (t,x) = curl (fun y => F (t,y)) x := by + have hc (i : Fin 3) : Differentiable ℝ (fun p => F p i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiable.comp hF + have hh (i j : Fin 3) : spatialPartial (fun y => F (t,y) i) x j = + dirD F (0,basis j) (t,x) i := by + rw [spatialPartial_time_slice (hc i (t,x))] + exact dirD_component hF (t,x) (0,basis j) i + ext i + fin_cases i <;> simp [spaceCurl_apply,curl,curlA,curlB,hh] + +lemma dirD_spaceCurl {F : Field} (hF : ContDiff ℝ ∞ F) (e p : ℝ × Vec) : + dirD (spaceCurl F) e p = spaceCurl (dirD F e) p := by + ext i + rw [← dirD_component ((contDiff_spaceCurl hF).differentiable (by simp))] + change dirD (fun q => dirD F (0,basis (curlA i)) q (curlB i) - + dirD F (0,basis (curlB i)) q (curlA i)) e p = _ + rw [dirD_sub ((contDiff_component (contDiff_dirD hF _) _).differentiable (by simp)) + ((contDiff_component (contDiff_dirD hF _) _).differentiable (by simp))] + dsimp only + rw [dirD_component ((contDiff_dirD hF _).differentiable (by simp)), + dirD_component ((contDiff_dirD hF _).differentiable (by simp)), + dirD_comm hF (0,basis (curlA i)) e,dirD_comm hF (0,basis (curlB i)) e] + rfl + +lemma spaceCurl_sub {F G : Field} (hF : Differentiable ℝ F) (hG : Differentiable ℝ G) : + spaceCurl (fun p => F p-G p) = fun p => spaceCurl F p-spaceCurl G p := by + funext p + ext i + simp only [spaceCurl_apply,dirD_sub hF hG,PiLp.sub_apply] + ring + +lemma spaceCurl_add {F G : Field} (hF : Differentiable ℝ F) (hG : Differentiable ℝ G) : + spaceCurl (fun p => F p+G p) = fun p => spaceCurl F p+spaceCurl G p := by + funext p + ext i + simp only [spaceCurl_apply,dirD_add hF hG,PiLp.add_apply] + ring + +lemma spaceCurl_neg (F : Field) : spaceCurl (fun p => -F p) = fun p => -spaceCurl F p := by + funext p + ext i + simp [spaceCurl_apply,dirD,fderiv_fun_neg,PiLp.neg_apply] + ring + +lemma contDiff_field_slice {F : Field} (hF : ContDiff ℝ ∞ F) (t : ℝ) : + ContDiff ℝ ∞ (fun x => F (t,x)) := hF.comp (contDiff_const.prodMk contDiff_id) + +lemma spaceCurl_spaceCurl_component {F : Field} (hF : ContDiff ℝ ∞ F) + (t : ℝ) (x : Vec) (i : Fin 3) : + spaceCurl (spaceCurl F) (t,x) i = + spatialPartial (divergence (fun y => F (t,y))) x i-laplace (fun y => F (t,y) i) x := by + rw [spaceCurl_slice ((contDiff_spaceCurl hF).differentiable (by simp))] + have he : (fun y => spaceCurl F (t,y)) = curl (fun y => F (t,y)) := + funext (spaceCurl_slice (hF.differentiable (by simp)) t) + rw [he,curl_curl_component (contDiff_field_slice hF t)] + +lemma dirD_eq_of_eventuallyEq {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F G : H → W} {p : H} + (h : F =ᶠ[𝓝 p] G) (e : H) : dirD F e p = dirD G e p := by + unfold dirD + rw [h.fderiv_eq] + +lemma positive_time_eventuallyEq {W : Type*} {F G : ℝ × Vec → W} + (h : ∀ t, 0 F q i) e) v p = dirD (dirD F e) v p i := by + have hh : dirD (fun q => F q i) e = fun q => dirD F e q i := + funext (fun q => dirD_component (hF.differentiable (by simp)) q e i) + rw [hh,dirD_component ((contDiff_dirD hF e).differentiable (by simp))] + +lemma waveBox_component_eq {F : Field} (hF : ContDiff ℝ ∞ F) (t : ℝ) (x : Vec) (i : Fin 3) : + waveBox (fun p => F p i) (t,x) = dirD (dirD F (1,0)) (1,0) (t,x) i - + laplace (fun y => F (t,y) i) x := by + rw [waveBox_eq (contDiff_component hF i), + deriv_deriv_slice_eq_dirD (contDiff_component hF i),dirD_dirD_component hF] + +lemma maxwell_electric_wave {E B j : Field} {ρ : ℝ × Vec → ℝ} {a b t : ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) (hj : ContDiff ℝ ∞ j) + (hEt : ∀ r ∈ Ioo a b, ∀ x, dirD E (1,0) (r,x)=spaceCurl B (r,x)-j (r,x)) + (hBt : ∀ r ∈ Ioo a b, ∀ x, dirD B (1,0) (r,x) = -spaceCurl E (r,x)) + (hDiv : ∀ r ∈ Ioo a b, ∀ x, divergence (fun y => E (r,y)) x=ρ (r,x)) + (ht : t ∈ Ioo a b) (x : Vec) (i : Fin 3) : + waveBox (fun p => E p i) (t,x) = -spatialPartial (fun y => ρ (t,y)) x i- + dirD j (1,0) (t,x) i := by + have hdd := dirD_eq_of_eventuallyEq (interval_time_eventuallyEq (F:=dirD E (1,0)) (G:=fun p => spaceCurl B p-j p) hEt ht x) (1,0) + rw [dirD_sub ((contDiff_spaceCurl hB).differentiable (by simp)) + (hj.differentiable (by simp))] at hdd + dsimp only at hdd + rw [dirD_spaceCurl hB] at hdd + have hc := spaceCurl_eq_of_eventuallyEq (interval_time_eventuallyEq (F:=dirD B (1,0)) (G:=fun p => -spaceCurl E p) hBt ht x) + rw [spaceCurl_neg] at hc + rw [hc] at hdd + rw [waveBox_component_eq hE,hdd,PiLp.sub_apply,PiLp.neg_apply, + spaceCurl_spaceCurl_component hE] + have hd : divergence (fun y => E (t,y)) = fun y => ρ (t,y) := funext (hDiv t ht) + rw [hd] + ring + +lemma maxwell_magnetic_wave {E B j : Field} {a b t : ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) (hj : ContDiff ℝ ∞ j) + (hEt : ∀ r ∈ Ioo a b, ∀ x, dirD E (1,0) (r,x)=spaceCurl B (r,x)-j (r,x)) + (hBt : ∀ r ∈ Ioo a b, ∀ x, dirD B (1,0) (r,x) = -spaceCurl E (r,x)) + (hDiv : ∀ r ∈ Ioo a b, ∀ x, divergence (fun y => B (r,y)) x=0) + (ht : t ∈ Ioo a b) (x : Vec) (i : Fin 3) : + waveBox (fun p => B p i) (t,x) = spaceCurl j (t,x) i := by + have hdd := dirD_eq_of_eventuallyEq (interval_time_eventuallyEq (F:=dirD B (1,0)) (G:=fun p => -spaceCurl E p) hBt ht x) (1,0) + have hn : dirD (fun p => -spaceCurl E p) (1,0) (t,x) = -dirD (spaceCurl E) (1,0) (t,x) := by + simp [dirD,fderiv_fun_neg] + rw [hn,dirD_spaceCurl hE] at hdd + have hc := spaceCurl_eq_of_eventuallyEq (interval_time_eventuallyEq (F:=dirD E (1,0)) (G:=fun p => spaceCurl B p-j p) hEt ht x) + rw [spaceCurl_sub ((contDiff_spaceCurl hB).differentiable (by simp)) + (hj.differentiable (by simp))] at hc + dsimp only at hc + rw [hc] at hdd + rw [waveBox_component_eq hB,hdd,PiLp.neg_apply,PiLp.sub_apply, + spaceCurl_spaceCurl_component hB] + have hd : divergence (fun y => B (t,y)) = fun _ => (0:ℝ) := funext (hDiv t ht) + rw [hd] + simp [spatialPartial] +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter MeasureTheory Metric +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma dirD_spatial_slice {F : ℝ × Vec → ℝ} (hF : Differentiable ℝ F) + (t : ℝ) (x : Vec) (i : Fin 3) : + dirD F (0,basis i) (t,x)=spatialPartial (fun y => F (t,y)) x i := + (spatialPartial_time_slice (hF (t,x)) i).symm + +lemma waveBox_dirD_sourceWave {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + {t : ℝ} (ht : 0 sourceWave_box hρ hr.le y) ht x + +lemma sourceWave_space_initial {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (x : Vec) (i : Fin 3) : dirD (sourceWave ρ) (0,basis i) (0,x)=0 := by + rw [dirD_spatial_slice ((contDiff_sourceWave hρ).differentiable (by simp))] + have hh : (fun y => sourceWave ρ (0,y)) = fun _ => (0:ℝ) := + funext (sourceWave_initial_value ρ) + rw [hh] + simp [spatialPartial] + +lemma sourceWave_time_initial {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (x : Vec) : dirD (sourceWave ρ) (1,0) (0,x)=0 := by + rw [← deriv_slice_eq_dirD ((contDiff_sourceWave hρ).differentiable (by simp)), + sourceWave_initial_velocity hρ] + +lemma sourceWave_time_time_initial {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (x : Vec) : dirD (dirD (sourceWave ρ) (1,0)) (1,0) (0,x)=ρ (0,x) := by + rw [← deriv_deriv_slice_eq_dirD (contDiff_sourceWave hρ), + sourceWave_equation hρ x (le_refl 0)] + have hh : (fun y => sourceWave ρ (0,y)) = fun _ => (0:ℝ) := + funext (sourceWave_initial_value ρ) + rw [hh] + simp [laplace,divergence,spatialPartial] + +lemma sourceWave_space_time_initial {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (x : Vec) (i : Fin 3) : + dirD (dirD (sourceWave ρ) (0,basis i)) (1,0) (0,x)=0 := by + rw [dirD_comm (contDiff_sourceWave hρ), + dirD_spatial_slice ((contDiff_dirD (contDiff_sourceWave hρ) _).differentiable (by simp))] + have hh : (fun y => dirD (sourceWave ρ) (1,0) (0,y)) = fun _ => (0:ℝ) := + funext (sourceWave_time_initial hρ) + rw [hh] + simp [spatialPartial] + +def electricPotentialComponent (ρ : ℝ × Vec → ℝ) (j : Field) (i : Fin 3) : ℝ × Vec → ℝ := + fun p => -dirD (sourceWave ρ) (0,basis i) p - dirD (sourceWave (fun q => j q i)) (1,0) p + +lemma contDiff_electricPotentialComponent {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) (i : Fin 3) : + ContDiff ℝ ∞ (electricPotentialComponent ρ j i) := + (contDiff_dirD (contDiff_sourceWave hρ) _).neg.sub + (contDiff_dirD (contDiff_sourceWave (contDiff_component hj i)) _) + +lemma electricPotentialComponent_initial {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) (x : Vec) (i : Fin 3) : + electricPotentialComponent ρ j i (0,x)=0 := by + simp only [electricPotentialComponent,sourceWave_space_initial hρ, + sourceWave_time_initial (contDiff_component hj i),neg_zero,sub_zero] + +lemma electricPotentialComponent_initial_velocity {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) (x : Vec) (i : Fin 3) : + deriv (fun t => electricPotentialComponent ρ j i (t,x)) 0 = -j (0,x) i := by + rw [deriv_slice_eq_dirD ((contDiff_electricPotentialComponent hρ hj i).differentiable (by simp))] + unfold electricPotentialComponent + rw [dirD_sub ((contDiff_dirD (contDiff_sourceWave hρ) _).neg.differentiable (by simp)) + ((contDiff_dirD (contDiff_sourceWave (contDiff_component hj i)) _).differentiable (by simp))] + dsimp only + simp only [dirD,fderiv_fun_neg,neg_apply] + change -dirD (dirD (sourceWave ρ) (0,basis i)) (1,0) (0,x) - + dirD (dirD (sourceWave (fun p => j p i)) (1,0)) (1,0) (0,x) = _ + rw [sourceWave_space_time_initial hρ,sourceWave_time_time_initial (contDiff_component hj i)] + ring + +lemma waveBox_neg (u : ℝ × Vec → ℝ) : + waveBox (fun p => -u p)=fun p => -waveBox u p := by + have hd (F : ℝ × Vec → ℝ) (e : ℝ × Vec) : + dirD (fun p => -F p) e=fun p => -dirD F e p := by + funext p + simp [dirD,fderiv_fun_neg] + funext p + simp only [waveBox,hd,Finset.sum_neg_distrib] + ring + +lemma electricPotentialComponent_box {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) {t : ℝ} (ht : 0 ρ (t,y)) x i - dirD j (1,0) (t,x) i := by + unfold electricPotentialComponent + rw [waveBox_sub (contDiff_dirD (contDiff_sourceWave hρ) _).neg + (contDiff_dirD (contDiff_sourceWave (contDiff_component hj i)) _), + waveBox_neg] + dsimp only + rw [waveBox_dirD_sourceWave hρ ht,waveBox_dirD_sourceWave (contDiff_component hj i) ht, + dirD_spatial_slice (hρ.differentiable (by simp)),dirD_component (hj.differentiable (by simp))] + +lemma maxwell_electric_potential_representation {E B j : Field} {ρ : ℝ × Vec → ℝ} {T : ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) (hj : ContDiff ℝ ∞ j) + (hρ : ContDiff ℝ ∞ ρ) (hT : 0≤T) + (hEt : ∀ r ∈ Icc 0 T, ∀ x, dirD E (1,0) (r,x)=spaceCurl B (r,x)-j (r,x)) + (hBt : ∀ r ∈ Ioo 0 T, ∀ x, dirD B (1,0) (r,x) = -spaceCurl E (r,x)) + (hDiv : ∀ r ∈ Ioo 0 T, ∀ x, divergence (fun y => E (r,y)) x=ρ (r,x)) + (x : Vec) (i : Fin 3) : + E (T,x) i = freeWave (fun y => E (0,y) i) (fun y => spaceCurl B (0,y) i) (T,x) + + electricPotentialComponent ρ j i (T,x) := by + have hg := contDiff_component (contDiff_field_slice hE 0) i + have hh := contDiff_component (contDiff_field_slice (contDiff_spaceCurl hB) 0) i + have hfree := contDiff_freeWave hg hh + have hpot := contDiff_electricPotentialComponent hρ hj i + apply wave_unique_on (contDiff_component hE i) (hfree.add hpot) hT + · intro r hr y + rw [waveBox_add hfree hpot] + dsimp only + rw [freeWave_box hg hh hr.1,electricPotentialComponent_box hρ hj hr.1,zero_add] + exact maxwell_electric_wave hE hB hj + (fun r hr => hEt r ⟨hr.1.le,hr.2.le⟩) hBt hDiv hr y i + · intro y + rw [freeWave_initial hg,electricPotentialComponent_initial hρ hj,add_zero] + · intro y + have hfdy : DifferentiableAt ℝ (fun t => freeWave (fun z => E (0,z) i) + (fun z => spaceCurl B (0,z) i) (t,y)) 0 := by + exact (((hfree.differentiable (by simp)).comp + (differentiable_id.prodMk (differentiable_const y))) 0) + have hpdy : DifferentiableAt ℝ (fun t => electricPotentialComponent ρ j i (t,y)) 0 := by + exact (((hpot.differentiable (by simp)).comp + (differentiable_id.prodMk (differentiable_const y))) 0) + rw [deriv_fun_add hfdy hpdy, + freeWave_initial_velocity hg hh,electricPotentialComponent_initial_velocity hρ hj, + deriv_slice_eq_dirD ((contDiff_component hE i).differentiable (by simp)), + dirD_component (hE.differentiable (by simp)),hEt 0 ⟨le_rfl,hT⟩] + rfl +def magneticPotentialComponent (j : Field) (i : Fin 3) : ℝ × Vec → ℝ := + fun p => dirD (sourceWave (fun q => j q (curlB i))) (0,basis (curlA i)) p - + dirD (sourceWave (fun q => j q (curlA i))) (0,basis (curlB i)) p + +lemma contDiff_magneticPotentialComponent {j : Field} (hj : ContDiff ℝ ∞ j) (i : Fin 3) : + ContDiff ℝ ∞ (magneticPotentialComponent j i) := + (contDiff_dirD (contDiff_sourceWave (contDiff_component hj _)) _).sub + (contDiff_dirD (contDiff_sourceWave (contDiff_component hj _)) _) + +lemma magneticPotentialComponent_initial {j : Field} (hj : ContDiff ℝ ∞ j) (x : Vec) (i : Fin 3) : + magneticPotentialComponent j i (0,x)=0 := by + simp only [magneticPotentialComponent,sourceWave_space_initial (contDiff_component hj _),sub_self] + +lemma magneticPotentialComponent_initial_velocity {j : Field} (hj : ContDiff ℝ ∞ j) + (x : Vec) (i : Fin 3) : deriv (fun t => magneticPotentialComponent j i (t,x)) 0 = 0 := by + rw [deriv_slice_eq_dirD ((contDiff_magneticPotentialComponent hj i).differentiable (by simp))] + unfold magneticPotentialComponent + rw [dirD_sub ((contDiff_dirD (contDiff_sourceWave (contDiff_component hj _)) _).differentiable (by simp)) + ((contDiff_dirD (contDiff_sourceWave (contDiff_component hj _)) _).differentiable (by simp))] + dsimp only + rw [sourceWave_space_time_initial (contDiff_component hj _), + sourceWave_space_time_initial (contDiff_component hj _),sub_self] + +lemma magneticPotentialComponent_box {j : Field} (hj : ContDiff ℝ ∞ j) + {t : ℝ} (ht : 0 B (r,y)) x=0) + (x : Vec) (i : Fin 3) : + B (T,x) i = freeWave (fun y => B (0,y) i) (fun y => -spaceCurl E (0,y) i) (T,x) + + magneticPotentialComponent j i (T,x) := by + have hg := contDiff_component (contDiff_field_slice hB 0) i + have hh := (contDiff_component (contDiff_field_slice (contDiff_spaceCurl hE) 0) i).neg + have hfree := contDiff_freeWave hg hh + have hpot := contDiff_magneticPotentialComponent hj i + apply wave_unique_on (contDiff_component hB i) (hfree.add hpot) hT + · intro r hr y + rw [waveBox_add hfree hpot] + dsimp only + rw [freeWave_box hg hh hr.1,magneticPotentialComponent_box hj hr.1,zero_add] + exact maxwell_magnetic_wave hE hB hj hEt + (fun r hr => hBt r ⟨hr.1.le,hr.2.le⟩) hDiv hr y i + · intro y + rw [freeWave_initial hg,magneticPotentialComponent_initial hj,add_zero] + · intro y + have hfdy : DifferentiableAt ℝ (fun t => freeWave (fun z => B (0,z) i) + (fun z => -spaceCurl E (0,z) i) (t,y)) 0 := by + exact (((hfree.differentiable (by simp)).comp + (differentiable_id.prodMk (differentiable_const y))) 0) + have hpdy : DifferentiableAt ℝ (fun t => magneticPotentialComponent j i (t,y)) 0 := by + exact (((hpot.differentiable (by simp)).comp + (differentiable_id.prodMk (differentiable_const y))) 0) + rw [deriv_fun_add hfdy hpdy, + freeWave_initial_velocity hg hh,magneticPotentialComponent_initial_velocity hj, + deriv_slice_eq_dirD ((contDiff_component hB i).differentiable (by simp)), + dirD_component (hB.differentiable (by simp)),hBt 0 ⟨le_rfl,hT⟩] + simp +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveK.lean b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveK.lean new file mode 100644 index 0000000000000000000000000000000000000000..eab0a14adcc2c298a54e3b65f3897ccdc38760ea --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Maxwell/WaveK.lean @@ -0,0 +1,283 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.BallCutoff + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma continuous_sphereSum {g : Vec → ℝ} (hg : Continuous g) : Continuous (sphereSum g) := by + apply continuous_integral_sphere (F:=fun p : (ℝ × Vec) × Vec => g (p.1.2+p.1.1 • p.2)) + exact hg.comp ((continuous_snd.comp continuous_fst).add + ((continuous_fst.comp continuous_fst).smul continuous_snd)) + +lemma sphereSum_radial_darboux_zero {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) + {R : ℝ} (hR : 0 sphereSum g (r,0)) R + + R*deriv (deriv (fun r => sphereSum g (r,0))) R = + R*sphereSum (laplace g) (R,0) := by + let F : ℝ → ℝ := fun r => sphereSum g (r,0) + have hF : ContDiff ℝ ∞ F := (contDiff_sphereSum hg).comp (contDiff_id.prodMk contDiff_const) + have hFd : ContDiff ℝ ∞ (deriv F) := (contDiff_infty_iff_deriv.mp hF).2 + let H : ℝ → ℝ := fun r => r^2*sphereSum (laplace g) (r,0) + have hh : Continuous H := (continuous_id.pow 2).mul + ((continuous_sphereSum (continuous_laplace hg)).comp (continuous_id.prodMk continuous_const)) + have he : (fun r => r^2*deriv F r) =ᶠ[𝓝 R] (fun r => ∫ s in 0..r, H s) := by + filter_upwards [Ioi_mem_nhds hR] with r hr + exact sphereSum_flux hg hr + have hl := ((hasDerivAt_id R).pow 2).mul + (hFd.differentiable (by simp) R).hasDerivAt + have hr := intervalIntegral.integral_hasDerivAt_right (hh.intervalIntegrable 0 R) + hh.stronglyMeasurable.stronglyMeasurableAtFilter hh.continuousAt + have h := hl.unique (hr.congr_of_eventuallyEq he) + dsimp only [H] at h + norm_num at h + change 2*deriv F R+R*deriv (deriv F) R=R*sphereSum (laplace g) (R,0) + nlinarith + +lemma sphereSum_radial_wave_zero {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) + {R : ℝ} (hR : 0 r*sphereSum g (r,0))) R = + R*sphereSum (laplace g) (R,0) := by + let F : ℝ → ℝ := fun r => sphereSum g (r,0) + have hF : ContDiff ℝ ∞ F := (contDiff_sphereSum hg).comp (contDiff_id.prodMk contDiff_const) + have hFd : ContDiff ℝ ∞ (deriv F) := (contDiff_infty_iff_deriv.mp hF).2 + have hd : deriv (fun r => r*F r) = fun r => F r+r*deriv F r := by + funext r + change deriv (id * F) r = _ + convert ((hasDerivAt_id r).mul (hF.differentiable (by simp) r).hasDerivAt).deriv using 1; simp + change deriv (deriv (fun r => r*F r)) R = _ + rw [hd] + change deriv (F + id * deriv F) R = _ + rw [((hF.differentiable (by simp) R).hasDerivAt.add + ((hasDerivAt_id R).mul (hFd.differentiable (by simp) R).hasDerivAt)).deriv] + have h := sphereSum_radial_darboux_zero hg hR + change 2*deriv F R+R*deriv (deriv F) R = _ at h + dsimp only [id] + nlinarith + +lemma sphereSum_spatialPartial {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) + (r : ℝ) (x : Vec) (i : Fin 3) : + spatialPartial (fun y => sphereSum g (r,y)) x i = + sphereSum (fun y => spatialPartial g y i) (r,x) := by + let F : Vec × Vec → ℝ := fun p => g (p.1+r • p.2) + have hF : ContDiff ℝ 1 F := hg.comp (contDiff_fst.add (contDiff_snd.const_smul r)) + have hd := (hasFDerivAt_integral_sphere hF x).fderiv + have hDa (n : Sphere) : ((fderiv ℝ F (x,n.1)).comp + (ContinuousLinearMap.inl ℝ Vec Vec)) (basis i) = + fderiv ℝ g (x+r • n.1) (basis i) := by + have hi : HasFDerivAt (fun p : Vec × Vec => p.1+r • p.2) + ((ContinuousLinearMap.fst ℝ Vec Vec)+r • ContinuousLinearMap.snd ℝ Vec Vec) (x,n.1) := + (hasFDerivAt_fst).add ((hasFDerivAt_snd).const_smul r) + have he := ((hg.differentiable (by simp)) (x+r • n.1)).hasFDerivAt.comp (x,n.1) hi + change HasFDerivAt F _ (x,n.1) at he + rw [he.fderiv] + simp + have hc : Continuous (fun n : Sphere => (fderiv ℝ F (x,n.1)).comp + (ContinuousLinearMap.inl ℝ Vec Vec)) := + ((hF.continuous_fderiv (by simp)).comp (continuous_const.prodMk continuous_subtype_val)).clm_comp continuous_const + unfold spatialPartial sphereSum + change (fderiv ℝ (fun y => ∫ n : Sphere, F (y,n.1) ∂sphereMeasure) x) (basis i) = _ + rw [hd,ContinuousLinearMap.integral_apply (hc.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _)) (basis i)] + apply integral_congr_ae + exact ae_of_all _ hDa + +lemma contDiff_spatialPartial {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (i : Fin 3) : + ContDiff ℝ ∞ (fun x => spatialPartial g x i) := + ((contDiff_infty_iff_fderiv.mp hg).2).clm_apply contDiff_const + +lemma gradient_apply (g : Vec → ℝ) (x : Vec) (i : Fin 3) : + gradient g x i = spatialPartial g x i := by + have h := inner_gradient_left (𝕜:=ℝ) (f:=g) (x:=x) (y:=basis i) + rw [← dot_eq_inner] at h + simpa [dot,basis,spatialPartial] using h + +lemma laplace_eq_sum (g : Vec → ℝ) (x : Vec) : + laplace g x = ∑ i : Fin 3, spatialPartial (fun y => spatialPartial g y i) x i := by + simp only [laplace,divergence,gradient_apply] + +lemma sphereSum_sum {ι : Type*} (s : Finset ι) {G : ι → Vec → ℝ} + (hG : ∀ i ∈ s, Continuous (G i)) (p : ℝ × Vec) : + sphereSum (fun x => ∑ i ∈ s, G i x) p = ∑ i ∈ s, sphereSum (G i) p := by + unfold sphereSum + apply integral_finsetSum + intro i hi + have h : Continuous (fun n : Sphere => G i (p.2+p.1 • n.1)) := + (hG i hi).comp (continuous_const.add (continuous_subtype_val.const_smul p.1)) + exact h.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) + +lemma sphereSum_spatial_laplace {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (r : ℝ) (x : Vec) : + laplace (fun y => sphereSum g (r,y)) x = sphereSum (laplace g) (r,x) := by + rw [laplace_eq_sum] + have he : ∀ i, (fun y => spatialPartial (fun z => sphereSum g (r,z)) y i) = + (fun y => sphereSum (fun z => spatialPartial g z i) (r,y)) := by + intro i + funext y + exact sphereSum_spatialPartial (hg.of_le (by simp)) r y i + calc + _ = ∑ i : Fin 3, spatialPartial (fun y => sphereSum (fun z => spatialPartial g z i) (r,y)) x i := by + apply Finset.sum_congr rfl + intro i _ + rw [he i] + _ = ∑ i : Fin 3, sphereSum (fun y => spatialPartial (fun z => spatialPartial g z i) y i) (r,x) := by + apply Finset.sum_congr rfl + intro i _ + exact sphereSum_spatialPartial ((contDiff_spatialPartial hg i).of_le (by simp)) r x i + _ = sphereSum (laplace g) (r,x) := by + rw [← sphereSum_sum Finset.univ (fun i _ => + (contDiff_spatialPartial (contDiff_spatialPartial hg i) i).continuous)] + congr 1 + funext y + exact (laplace_eq_sum g y).symm + +lemma spatialPartial_translate {g : Vec → ℝ} (hg : Differentiable ℝ g) + (c x : Vec) (i : Fin 3) : + spatialPartial (fun y => g (c+y)) x i = spatialPartial g (c+x) i := by + have h := (hg (c+x)).hasFDerivAt.comp x + ((hasFDerivAt_const c x).add (hasFDerivAt_id x)) + change HasFDerivAt (fun y => g (c+y)) _ x at h + unfold spatialPartial + rw [h.fderiv] + simp + +lemma laplace_translate {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (c x : Vec) : + laplace (fun y => g (c+y)) x = laplace g (c+x) := by + rw [laplace_eq_sum,laplace_eq_sum] + apply Finset.sum_congr rfl + intro i _ + have he : (fun y => spatialPartial (fun z => g (c+z)) y i) = + fun y => spatialPartial g (c+y) i := by + funext y + exact spatialPartial_translate (hg.differentiable (by simp)) c y i + rw [he] + exact spatialPartial_translate ((contDiff_spatialPartial hg i).differentiable (by simp)) c x i + +lemma sphereSum_radial_wave {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) + (x : Vec) {R : ℝ} (hR : 0 r*sphereSum g (r,x))) R = + R*sphereSum (laplace g) (R,x) := by + have hs (r : ℝ) : sphereSum (fun y => g (x+y)) (r,0) = sphereSum g (r,x) := by + simp only [sphereSum,zero_add] + have hl (r : ℝ) : sphereSum (laplace (fun y => g (x+y))) (r,0) = + sphereSum (laplace g) (r,x) := by + simp only [sphereSum,laplace_translate hg,zero_add] + have hx : ContDiff ℝ ∞ (fun y => g (x+y)) := hg.comp (contDiff_const.add contDiff_id) + convert sphereSum_radial_wave_zero hx hR using 1 + · congr 2 + funext r + rw [hs] + · rw [hl] + +lemma spatialPartial_const_mul {g : Vec → ℝ} (hg : Differentiable ℝ g) + (c : ℝ) (x : Vec) (i : Fin 3) : + spatialPartial (fun y => c*g y) x i = c*spatialPartial g x i := by + unfold spatialPartial + rw [((hg x).hasFDerivAt.const_mul c).fderiv] + simp + +lemma laplace_const_mul {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (c : ℝ) (x : Vec) : + laplace (fun y => c*g y) x = c*laplace g x := by + simp only [laplace_eq_sum,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + have he : (fun y => spatialPartial (fun z => c*g z) y i) = + fun y => c*spatialPartial g y i := by + funext y + exact spatialPartial_const_mul (hg.differentiable (by simp)) c y i + rw [he,spatialPartial_const_mul ((contDiff_spatialPartial hg i).differentiable (by simp))] + +lemma contDiff_laplace {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) : ContDiff ℝ ∞ (laplace g) := by + have he : laplace g = fun x => ∑ i : Fin 3, spatialPartial (fun y => spatialPartial g y i) x i := + funext (laplace_eq_sum g) + rw [he] + exact ContDiff.sum (fun i _ => contDiff_spatialPartial (contDiff_spatialPartial hg i) i) + +lemma sphere_area : sphereMeasure.real univ = 4*Real.pi := by + rw [sphereMeasure,Measure.toSphere_real_apply_univ] + simp only [Vec,finrank_euclideanSpace,Measure.real,EuclideanSpace.volume_ball_fin_three, + ENNReal.ofReal_one,one_pow,one_mul,ENNReal.toReal_ofReal (by positivity : 0≤Real.pi*4/3)] + norm_num + ring + +def waveK (g : Vec → ℝ) (p : ℝ × Vec) : ℝ := + (4*Real.pi)⁻¹ * (p.1*sphereSum g p) + +lemma contDiff_waveK {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) : ContDiff ℝ ∞ (waveK g) := + contDiff_const.mul (contDiff_fst.mul (contDiff_sphereSum hg)) + +lemma waveK_zero (g : Vec → ℝ) (x : Vec) : waveK g (0,x)=0 := by simp [waveK] + +lemma waveK_initial_velocity {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) : + deriv (fun t => waveK g (t,x)) 0 = g x := by + have hd := ((hasDerivAt_id (0:ℝ)).mul + (sphereSum_radial_deriv (hg.of_le (by simp)) x 0)).const_mul ((4*Real.pi)⁻¹) + change HasDerivAt (fun t => waveK g (t,x)) _ 0 at hd + rw [hd.deriv] + simp only [id_eq,one_mul,zero_mul,add_zero,sphereSum,zero_smul,add_zero,integral_const, + smul_eq_mul,sphere_area] + field_simp + +lemma waveK_equation_pos {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) + {t : ℝ} (ht : 0 waveK g (r,x))) t = laplace (fun y => waveK g (t,y)) x := by + have hF : ContDiff ℝ ∞ (fun r => r*sphereSum g (r,x)) := + contDiff_id.mul ((contDiff_sphereSum hg).comp (contDiff_id.prodMk contDiff_const)) + have he : deriv (fun r => waveK g (r,x)) = + fun r => (4*Real.pi)⁻¹ * deriv (fun r => r*sphereSum g (r,x)) r := by + funext r + exact ((hF.differentiable (by simp) r).hasDerivAt.const_mul _).deriv + rw [he] + rw [(((contDiff_infty_iff_deriv.mp hF).2.differentiable (by simp) t).hasDerivAt.const_mul _).deriv] + rw [sphereSum_radial_wave hg x ht] + have hS : ContDiff ℝ ∞ (fun y => sphereSum g (t,y)) := + (contDiff_sphereSum hg).comp (contDiff_const.prodMk contDiff_id) + change _ = laplace (fun y => (4*Real.pi)⁻¹ * (t*sphereSum g (t,y))) x + rw [laplace_const_mul (contDiff_const.mul hS),laplace_const_mul hS,sphereSum_spatial_laplace hg] + +lemma waveK_equation {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) + {t : ℝ} (ht : 0≤t) : + deriv (deriv (fun r => waveK g (r,x))) t = laplace (fun y => waveK g (t,y)) x := by + have hF : ContDiff ℝ ∞ (fun r => waveK g (r,x)) := + (contDiff_waveK hg).comp (contDiff_id.prodMk contDiff_const) + have hc : Continuous (deriv (deriv (fun r => waveK g (r,x)))) := + (contDiff_infty_iff_deriv.mp (contDiff_infty_iff_deriv.mp hF).2).2.continuous + have hr : Continuous (fun t => laplace (fun y => waveK g (t,y)) x) := by + have he : (fun t => laplace (fun y => waveK g (t,y)) x) = + fun t => (4*Real.pi)⁻¹ * (t*sphereSum (laplace g) (t,x)) := by + funext t + have hS : ContDiff ℝ ∞ (fun y => sphereSum g (t,y)) := + (contDiff_sphereSum hg).comp (contDiff_const.prodMk contDiff_id) + change laplace (fun y => (4*Real.pi)⁻¹ * (t*sphereSum g (t,y))) x = _ + rw [laplace_const_mul (contDiff_const.mul hS),laplace_const_mul hS,sphereSum_spatial_laplace hg] + rw [he] + exact (continuous_id.mul ((continuous_sphereSum (continuous_laplace hg)).comp + (continuous_id.prodMk continuous_const))).const_mul _ + have he : EqOn (deriv (deriv (fun r => waveK g (r,x)))) + (fun t => laplace (fun y => waveK g (t,y)) x) (Ioi 0) := + fun _ ht => waveK_equation_pos hg x ht + exact he.closure hc hr (by simpa only [closure_Ioi,mem_Ici] using ht) +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Model.lean b/lean/OAI/Analysis/VlasovMaxwell/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..6741f725cfa84ef306f4c55f838b3ced1a2a668b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Model.lean @@ -0,0 +1,109 @@ +import Mathlib + +namespace OAI + +/-! The one-species relativistic Vlasov–Maxwell system on three-dimensional Euclidean space. -/ + +noncomputable section +open MeasureTheory Set +open scoped ContDiff + +namespace RVM + +abbrev Vec := EuclideanSpace ℝ (Fin 3) +abbrev Phase := Vec × Vec +abbrev Particle := ℝ × Phase → ℝ +abbrev Field := ℝ × Vec → Vec + +def q (v : Vec) : ℝ := Real.sqrt (1 + ‖v‖ ^ 2) +def velocity (v : Vec) : Vec := (q v)⁻¹ • v + +def basis (i : Fin 3) : Vec := WithLp.toLp 2 (Pi.single i (1 : ℝ)) +def dot (a b : Vec) : ℝ := ∑ i : Fin 3, a i * b i +def cross (a b : Vec) : Vec := WithLp.toLp 2 + ![a 1 * b 2 - a 2 * b 1, a 2 * b 0 - a 0 * b 2, + a 0 * b 1 - a 1 * b 0] + +def spatialPartial (g : Vec → ℝ) (x : Vec) (i : Fin 3) : ℝ := + fderiv ℝ g x (basis i) +def divergence (F : Vec → Vec) (x : Vec) : ℝ := + ∑ i : Fin 3, spatialPartial (fun y => F y i) x i + +def curl (F : Vec → Vec) (x : Vec) : Vec := WithLp.toLp 2 + ![spatialPartial (fun y => F y 2) x 1 - spatialPartial (fun y => F y 1) x 2, + spatialPartial (fun y => F y 0) x 2 - spatialPartial (fun y => F y 2) x 0, + spatialPartial (fun y => F y 1) x 0 - spatialPartial (fun y => F y 0) x 1] + +def rho (g : Phase → ℝ) (x : Vec) : ℝ := ∫ v : Vec, g (x, v) +def current (g : Phase → ℝ) (x : Vec) : Vec := + ∫ v : Vec, g (x, v) • velocity v + +structure Datum where + f₀ : Phase → ℝ + E₀ : Vec → Vec + B₀ : Vec → Vec + +def BoundedSmooth (F : Vec → Vec) : Prop := + ContDiff ℝ ∞ F ∧ ∀ n : ℕ, ∃ C : ℝ, ∀ x : Vec, + ‖iteratedFDeriv ℝ n F x‖ ≤ C + +def Admissible (d : Datum) : Prop := + ContDiff ℝ ∞ d.f₀ ∧ HasCompactSupport d.f₀ ∧ (∀ z, 0 ≤ d.f₀ z) ∧ + BoundedSmooth d.E₀ ∧ BoundedSmooth d.B₀ ∧ + MemLp d.E₀ 2 volume ∧ MemLp d.B₀ 2 volume ∧ + (∀ x, divergence d.E₀ x = rho d.f₀ x) ∧ + (∀ x, divergence d.B₀ x = 0) + +structure Solution where + f : Particle + E : Field + B : Field + +def particleHalfSpace : Set (ℝ × Phase) := {z | 0 ≤ z.1} +def fieldHalfSpace : Set (ℝ × Vec) := {z | 0 ≤ z.1} +def particleSlab (T : ℝ) : Set (ℝ × Phase) := {z | z.1 ∈ Icc 0 T} +def fieldSlab (T : ℝ) : Set (ℝ × Vec) := {z | z.1 ∈ Icc 0 T} + +def TimeContinuousL2 (F : Field) : Prop := + ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), + ContinuousOn F₂ (Ici 0) ∧ + ∀ t, 0 ≤ t → (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t, x)) + +def Equations (s : Solution) : Prop := ∀ t, 0 ≤ t → + (∀ x v, + derivWithin (fun t' => s.f (t', x, v)) (Ici 0) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => s.f (t, y, v)) x i) + + (∑ i : Fin 3, (s.E (t, x) + cross (velocity v) (s.B (t, x))) i * + spatialPartial (fun v' => s.f (t, x, v')) v i) = 0) ∧ + (∀ x, derivWithin (fun t' => s.E (t', x)) (Ici 0) t - + curl (fun y => s.B (t, y)) x = -current (fun z => s.f (t, z)) x) ∧ + (∀ x, derivWithin (fun t' => s.B (t', x)) (Ici 0) t + + curl (fun y => s.E (t, y)) x = 0) ∧ + (∀ x, divergence (fun y => s.E (t, y)) x = rho (fun z => s.f (t, z)) x) ∧ + (∀ x, divergence (fun y => s.B (t, y)) x = 0) + +def CompactOnFiniteHorizons (s : Solution) : Prop := + ∀ T : ℝ, 0 ≤ T → ∃ K : Set Phase, IsCompact K ∧ + ∀ t ∈ Icc 0 T, tsupport (fun z => s.f (t, z)) ⊆ K + +def Classical (d : Datum) (s : Solution) : Prop := + ContDiffOn ℝ 1 s.f particleHalfSpace ∧ + ContDiffOn ℝ 1 s.E fieldHalfSpace ∧ ContDiffOn ℝ 1 s.B fieldHalfSpace ∧ + (∀ t, 0 ≤ t → ∀ z, 0 ≤ s.f (t, z)) ∧ + TimeContinuousL2 s.E ∧ TimeContinuousL2 s.B ∧ + CompactOnFiniteHorizons s ∧ Equations s ∧ + (∀ z, s.f (0, z) = d.f₀ z) ∧ + (∀ x, s.E (0, x) = d.E₀ x) ∧ (∀ x, s.B (0, x) = d.B₀ x) + +def SmoothOnFiniteHorizons (s : Solution) : Prop := ∀ T : ℝ, 0 ≤ T → + ContDiffOn ℝ ∞ s.f (particleSlab T) ∧ + ContDiffOn ℝ ∞ s.E (fieldSlab T) ∧ ContDiffOn ℝ ∞ s.B (fieldSlab T) + +def SameNonnegativeTime (s s' : Solution) : Prop := ∀ t, 0 ≤ t → + (∀ z, s.f (t, z) = s'.f (t, z)) ∧ + (∀ x, s.E (t, x) = s'.E (t, x)) ∧ (∀ x, s.B (t, x) = s'.B (t, x)) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BinHits.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BinHits.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6a913ef05780e582b32c88b0e4ea6eb21d2a2ee --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BinHits.lean @@ -0,0 +1,1192 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ReceiverQ +import OAI.Analysis.VlasovMaxwell.Regularity.RealJointEnergyBudget +import OAI.Analysis.VlasovMaxwell.Continuation.PrefixParticle + +namespace OAI + +noncomputable section + +namespace RVM + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + + +def closedBinHits (α : Phase → ℝ → Phase) (zX : Phase) (B : ClosedConeBin) + (S : Set Phase) (a b c d : ℝ) (z : Phase) : Set ℝ := + {r | z∈S ∧ r∈Icc c d ∧ ∃ t∈Icc a b, InClosedConeBin α zX B t r z} + +lemma PhaseFlowOn.compact_closedBinHits_labels {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b ⊆ Icc 0 T) (hC : Icc c d ⊆ Icc 0 T) : + IsCompact {z | (closedBinHits F.flow zX B S a b c d z).Nonempty} := by + convert F.compact_closed_bin_hit_labels (a:=a) (b:=b) (c:=c) (d:=d) hs hT zX B hS using 1 + ext z + constructor + · rintro ⟨r,hz,hr,t,ht,hbin⟩ + exact ⟨hz,t,hJ ht,r,hC hr,ht,hr,hbin⟩ + · rintro ⟨hz,t,_,r,_,ht,hr,hbin⟩ + exact ⟨r,hz,hr,t,ht,hbin⟩ + +lemma PhaseFlowOn.averaged_cell_occupation_interior {s : Solution} {T a b p D : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (hCT : Icc a b ⊆ Icc (0:ℝ) T) {H : Phase → Set ℝ} + {Z : Set Phase} (hZ : MeasurableSet Z) {G : Set (ℝ × Phase)} + (hD : ∀ z, volume (H z) ≤ ENNReal.ofReal D) + (hz : ∀ z, (H z).Nonempty → z∈Z) + (hmom : ∀ t∈Ioo a b, ∀ z∈Z, p ≤ q (F.flow z t).2) + (hG : ∀ t∈Ioo a b, ∀ z∈Z, (t,F.flow z t)∈G) : + ENNReal.ofReal (b-a) * ENNReal.ofReal p * labelOccupation (fun z => s.f (0,z)) H ≤ + ENNReal.ofReal D * ∫⁻ t in Icc a b, ∫⁻ z : Phase, + G.indicator (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z) := by + have hbnd := lintegral_mono_ae (μ:=volume.restrict (Ioo a b)) + (ae_restrict_of_forall_mem measurableSet_Ioo (fun t ht => + F.restricted_label_mass_bound hs (hCT (Ioo_subset_Icc_self ht)) hZ (hmom t ht) (hG t ht))) + rw [lintegral_const,Measure.restrict_apply_univ,Real.volume_Ioo] at hbnd + rw [Measure.restrict_congr_set (Ioo_ae_eq_Icc (μ:=volume) (a:=a) (b:=b))] at hbnd + have hocc := labelOccupation_le_duration_mass hZ hD hz (f₀:=fun z => s.f (0,z)) + calc + _ ≤ ENNReal.ofReal (b-a)*ENNReal.ofReal p*(ENNReal.ofReal D* + ∫⁻ z in Z, ENNReal.ofReal (s.f (0,z))) := mul_le_mul' le_rfl hocc + _ = ENNReal.ofReal D*((ENNReal.ofReal p * ∫⁻ z in Z, ENNReal.ofReal (s.f (0,z))) * + ENNReal.ofReal (b-a)) := by ac_rfl + _ ≤ _ := by gcongr + +lemma dyadicWindow_momentum_enlarged {Q : ℝ} {n : ℕ} (hQ : 0 < Q) + (hlo : (2:ℝ)^n/4 ≤ Q) (hhi : Q ≤ 4*(2:ℝ)^n) : + DyadicWindow 4 n Q⁻¹ := by + norm_num [DyadicWindow] + rw [← div_eq_mul_inv,le_div_iff₀ hQ,div_le_iff₀ hQ] + constructor <;> nlinarith [pow_pos (show (0:ℝ)<2 by norm_num) n] + +lemma dyadicWindow_angle_enlarged {r : ℝ} {n : ℕ} + (hlo : (2:ℝ)⁻¹^n/4 ≤ r) (hhi : r ≤ 6*(2:ℝ)⁻¹^n) : + DyadicWindow 4 n r := by + have he : (2:ℝ)^n*(2:ℝ)⁻¹^n=1 := by + rw [← mul_pow]; norm_num + have hl := mul_le_mul_of_nonneg_left hlo (show 0 ≤ (2:ℝ)^n by positivity) + have hh := mul_le_mul_of_nonneg_left hhi (show 0 ≤ (2:ℝ)^n by positivity) + norm_num [DyadicWindow] + constructor <;> nlinarith + +lemma small_closed_bin_hit_geometry {α : Phase → ℝ → Phase} {zX z : Phase} + {B : ClosedConeBin} {t r φ : ℝ} (hbin : InClosedConeBin α zX B t r z) + (hr : 0 < B.rmin) (hφ : 0 < φ) + (hd : B.dmax ≤ φ^2/32) (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) + (hw : 4 ≤ φ*B.wmin) : + ∃ n : Vec, ‖n‖=1 ∧ (α zX t).1-(α z r).1=(t-r) • n ∧ + ‖velocity (α zX t).2-n‖ ≤ 4*φ ∧ + φ/2 ≤ ‖velocity (α z r).2-velocity (α zX t).2‖ ∧ + ‖velocity (α z r).2-velocity (α zX t).2‖ ≤ 5*φ := by + have hR : 0 < t-r := hr.trans_le hbin.2.1.1 + have hb := (inClosedConeBin_iff hR).mp hbin + let n : Vec := (t-r)⁻¹ • ((α zX t).1-(α z r).1) + have hn : ‖n‖=1 := by + dsimp only [n] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hR),← hb.1, + inv_mul_cancel₀ hR.ne'] + have hgeom : (α zX t).1-(α z r).1=(t-r) • n := by + dsimp only [n] + rw [smul_smul,mul_inv_cancel₀ hR.ne',one_smul] + have hsrc : ‖n-velocity (α z r).2‖ ≤ φ/4 := by + have hid := cone_angle_identity (α z r).2 n hn + have hbound := hb.2.2.2.2.1.2.trans hd + nlinarith [sq_nonneg ((q (α z r).2)⁻¹),norm_nonneg (n-velocity (α z r).2)] + have hlo : φ^2/2 ≤ 1-dot n (velocity (α zX t).2) := + hDlo.trans hb.2.2.2.2.2.1.1 + have hhi : 1-dot n (velocity (α zX t).2) ≤ 8*φ^2 := + hb.2.2.2.2.2.1.2.trans hDhi + have hinv : (q (α zX t).2)⁻¹ ≤ φ/4 := by + rw [inv_le_iff_one_le_mul₀ (q_pos _)] + have hh := mul_le_mul_of_nonneg_left hb.2.2.2.1.1 hφ.le + nlinarith + have hrec : ‖velocity (α zX t).2-n‖ ≤ 4*φ := by + rw [norm_sub_rev] + have hid := cone_angle_identity (α zX t).2 n hn + nlinarith [sq_nonneg ((q (α zX t).2)⁻¹),norm_nonneg (n-velocity (α zX t).2)] + exact ⟨n,hn,hgeom,hrec,actual_small_sector_velocity hn hφ.le hinv hsrc hlo hhi⟩ + +lemma PhaseFlowOn.small_closed_bin_cell_data {s : Solution} + {T M A P L lo hi a b c d massScale φ C p : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (B : ClosedConeBin) {S : Set Phase} + (hlo0 : 0 ≤ lo) (hhiT : hi ≤ T) + (hJ : Icc a b ⊆ Icc lo hi) (hC : Icc c d ⊆ Icc lo hi) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hlen : hi-lo ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + ∀ z, (closedBinHits F.flow zX B S a b c d z).Nonempty → + volume (closedBinHits F.flow zX B S a b c d z) ≤ ENNReal.ofReal (40*B.rmax) ∧ + ∀ t∈Icc c d, p/256 ≤ q (F.flow z t).2 ∧ q (F.flow z t).2 ≤ p/16 ∧ + φ/4 ≤ ‖velocity (F.flow z t).2-velocity (F.flow zX t).2‖ ∧ + ‖velocity (F.flow z t).2-velocity (F.flow zX t).2‖ ≤ 6*φ := by + let U := Icc lo hi + have hUT : U ⊆ Icc 0 T := Icc_subset_Icc hlo0 hhiT + have hCT : Icc c d ⊆ Icc 0 T := hC.trans hUT + have hstable (z : Phase) (H : IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (r : ℝ) (hr : r∈U) (hqm : massScale ≤ q (F.flow z r).2) := + H.velocity_stability_scale hlo0 hhiT hr ((F.continuousOn_time z).snd.mono hUT) + hM hA hP hL hm hφ hφ1 hconst hqm hlen + intro z hz + obtain ⟨r₀,hzS,hr₀,t₀,ht₀,hbin₀⟩ := hz + have hsource := hstable z (HZ z hzS) r₀ (hC hr₀) (hmq.trans hbin₀.2.2.1.1) + have hreceiver := hstable zX HX t₀ (hJ ht₀) (hmw.trans hbin₀.2.2.2.1.1) + obtain ⟨n₀,_,_,_,hsep₀,hupper₀⟩ := small_closed_bin_hit_geometry hbin₀ hr hφ hd hDlo hDhi hw + have href (t : ℝ) (ht : t∈U) : + ‖velocity (F.flow z t).2-velocity (F.flow zX t).2- + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2)‖ ≤ φ/16 := by + have hh := relative_ref_triangle (hsource t ht).2.1 (hreceiver t ht).2.1 + linarith + constructor + · have hsep (r : ℝ) (hrH : r∈closedBinHits F.flow zX B S a b c d z) : + ‖(F.flow z r).1-(F.flow zX r).1‖ ≤ 5*B.rmax*φ := by + obtain ⟨_,hrC,t,htJ,hbin⟩ := hrH + obtain ⟨n,_,hgeom,hangle,_,_⟩ := small_closed_bin_hit_geometry hbin hr hφ hd hDlo hDhi hw + have hrt : r ≤ t := by linarith [hbin.2.1.1] + have hsub : Icc r t ⊆ U := Icc_subset_Icc (hC hrC).1 (hJ htJ).2 + have hh := retarded_same_time_separation hrt + (fun u hu => ((F.ode zX u (hUT (hsub hu))).mono (hsub.trans hUT)).fst) + (fun u hu => velocity_ref_triangle (hreceiver u (hsub hu)).2.1 + (hreceiver t (hJ htJ)).2.1 hangle) hgeom + have hrad : 0 ≤ B.rmax := (sub_nonneg.mpr hrt).trans hbin.2.1.2 + calc + _ ≤ (4*φ+2*(φ/32))*(t-r) := hh + _ ≤ (5*φ)*B.rmax := mul_le_mul (by linarith) hbin.2.1.2 + (sub_nonneg.mpr hrt) (by positivity) + _ = _ := by ring + have hh := stable_cell_duration (convex_Icc c d) + (show closedBinHits F.flow zX B S a b c d z ⊆ Icc c d from fun _ h => h.2.1) + (half_pos hφ) hsep₀ ((F.continuousOn_time zX).fst.mono hCT) + ((F.continuousOn_time z).fst.mono hCT) + (fun r hr => ((F.ode zX r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst) + (fun r hr => ((F.ode z r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst) + (fun r hr => (href r (hC (interior_subset hr))).trans (by linarith)) hsep + convert hh using 1 + congr 1 + field_simp; ring + · intro t ht + have hq := (hsource t (hC ht)).2.2 + have hqlo := hqmin.trans hbin₀.2.2.1.1 + have hqhi := hbin₀.2.2.1.2.trans hqmax + refine ⟨by linarith,by linarith,?_,?_⟩ + · have hn := norm_sub_norm_le + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2) + (velocity (F.flow z t).2-velocity (F.flow zX t).2) + have hh : ‖(velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2)- + (velocity (F.flow z t).2-velocity (F.flow zX t).2)‖ ≤ φ/16 := by + rw [norm_sub_rev] + exact href t (hC ht) + linarith + · have hn := norm_sub_norm_le + (velocity (F.flow z t).2-velocity (F.flow zX t).2) + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2) + linarith [href t (hC ht)] + +lemma PhaseFlowOn.small_closed_bin_cell_payment {s : Solution} + {T M A P L lo hi a b c d massScale φ C p : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (np nf : ℕ) (hp : p=64*(2:ℝ)^np) (hφeq : φ=(2:ℝ)⁻¹^nf) + (hlo0 : 0 ≤ lo) (hhiT : hi ≤ T) + (hJ : Icc a b ⊆ Icc lo hi) (hC : Icc c d ⊆ Icc lo hi) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hlen : hi-lo ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + ENNReal.ofReal (d-c) * ENNReal.ofReal (p/256) * + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b c d) ≤ + ENNReal.ofReal (40*B.rmax) * ∫⁻ t in Icc c d, ∫⁻ z : Phase, + (sameTimeBudgetSet F.flow zX T 4 (np,nf)).indicator + (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z) := by + have hUT : Icc lo hi ⊆ Icc 0 T := Icc_subset_Icc hlo0 hhiT + have hCT := hC.trans hUT + have hdata := F.small_closed_bin_cell_data zX B hlo0 hhiT hJ hC hM hA hP hL + hm hφ hφ1 hconst hlen hqmin hqmax hmq hmw hr hd hDlo hDhi hw HX HZ + have hlabels := F.compact_closedBinHits_labels hs hT zX B hS (hJ.trans hUT) hCT + apply F.averaged_cell_occupation_interior hs hCT hlabels.measurableSet + · intro z + by_cases hz : (closedBinHits F.flow zX B S a b c d z).Nonempty + · exact (hdata z hz).1 + · simp only [not_nonempty_iff_eq_empty.mp hz,measure_empty,zero_le] + · exact fun _ hz => hz + · exact fun t ht z hz => ((hdata z hz).2 t (Ioo_subset_Icc_self ht)).1 + · intro t ht z hz + obtain ⟨hqlo,hqhi,hvlo,hvhi⟩ := (hdata z hz).2 t (Ioo_subset_Icc_self ht) + refine ⟨⟨?_,?_⟩,dyadicWindow_momentum_enlarged (q_pos _) ?_ ?_, + dyadicWindow_angle_enlarged ?_ ?_⟩ + · have hct : 0 ≤ c := (hCT (left_mem_Icc.mpr (le_of_lt (ht.1.trans ht.2)))).1 + exact hct.trans_lt ht.1 + · have hdt : d ≤ T := (hCT (right_mem_Icc.mpr (le_of_lt (ht.1.trans ht.2)))).2 + exact ht.2.trans_le hdt + · rw [hp] at hqlo + linarith + · rw [hp] at hqhi + linarith + · simpa only [← hφeq] using hvlo + · simpa only [← hφeq] using hvhi + +lemma sameTimeBudget_energy_le_joint {s : Solution} {α : Phase → ℝ → Phase} + {zX : Phase} {T a b I : ℝ} {k : ℕ} {n : ℕ × ℕ} + (hJ : Icc a b ⊆ Icc (0:ℝ) T) (hI : 0 < I) : + (∫⁻ t in Icc a b, ∫⁻ z : Phase, + (sameTimeBudgetSet α zX T k n).indicator + (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z)) ≤ + ENNReal.ofReal I * jointEnergyBudget s α zX T k a b I n := by + rw [jointEnergyBudget_eq k hJ n,← mul_assoc, + ENNReal.mul_inv_cancel (ENNReal.ofReal_ne_zero_iff.mpr hI) ENNReal.ofReal_ne_top,one_mul] + exact lintegral_mono fun t => lintegral_mono fun z => le_add_right le_rfl + +lemma closedBinHits_clip_receiver (α : Phase → ℝ → Phase) (zX : Phase) + (B : ClosedConeBin) (S : Set Phase) (a b c d : ℝ) : + closedBinHits α zX B S a b c d = + closedBinHits α zX B S (max a c) (min b (d+B.rmax)) c d := by + funext z + ext r + constructor + · rintro ⟨hz,hr,t,ht,hbin⟩ + have hrt : r ≤ t := by + have hh := hbin.1 + linarith [norm_nonneg ((α zX t).1-(α z r).1)] + exact ⟨hz,hr,t,⟨max_le ht.1 (hr.1.trans hrt),le_min ht.2 (by + have hh := hbin.2.1.2 + linarith [hr.2])⟩,hbin⟩ + · rintro ⟨hz,hr,t,ht,hbin⟩ + exact ⟨hz,hr,t,⟨(le_max_left a c).trans ht.1,ht.2.trans (min_le_left _ _)⟩,hbin⟩ + +lemma PhaseFlowOn.compact_closedBinHits_joint {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b ⊆ Icc 0 T) (hC : Icc c d ⊆ Icc 0 T) : + IsCompact {p : ℝ × Phase | p.1∈closedBinHits F.flow zX B S a b c d p.2} := by + let K : Set (ℝ × ℝ × Phase) := (Icc a b ×ˢ (Icc c d ×ˢ S)) ∩ + {p | InClosedConeBin (prefixFlow F.flow T) zX B p.1 p.2.1 p.2.2} + have hK : IsCompact K := (isCompact_Icc.prod (isCompact_Icc.prod hS)).inter_right + (isClosed_inClosedConeBin (F.continuous_prefixFlow hs hT) zX B) + convert hK.image continuous_snd using 1 + ext p + constructor + · rintro ⟨hz,hr,t,ht,hbin⟩ + refine ⟨(t,p),⟨⟨ht,hr,hz⟩,?_⟩,rfl⟩ + change InClosedConeBin (prefixFlow F.flow T) zX B t p.1 p.2 + simpa only [InClosedConeBin,prefixFlow,prefixClamp_eq (hJ ht), + prefixClamp_eq (hC hr)] using hbin + · rintro ⟨⟨t,r,z⟩,⟨⟨ht,hr,hz⟩,hbin⟩,rfl⟩ + refine ⟨hz,hr,t,ht,?_⟩ + change InClosedConeBin (prefixFlow F.flow T) zX B t r z at hbin + simpa only [InClosedConeBin,prefixFlow,prefixClamp_eq (hJ ht), + prefixClamp_eq (hC hr)] using hbin + +lemma PhaseFlowOn.measurable_closedBinHits_duration {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b ⊆ Icc 0 T) (hC : Icc c d ⊆ Icc 0 T) : + Measurable fun z => volume (closedBinHits F.flow zX B S a b c d z) := + measurable_measure_prodMk_right (F.compact_closedBinHits_joint hs hT zX B hS hJ hC).measurableSet + +lemma PhaseFlowOn.closedBinHits_occupation_le_sum {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + {ι : Type*} (N : Finset ι) (l u : ι → ℝ) + (hJ : Icc a b ⊆ Icc 0 T) (hC : ∀ i∈N, Icc (l i) (u i) ⊆ Icc 0 T) + (hcover : Icc c d ⊆ ⋃ i∈N, Icc (l i) (u i)) : + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b c d) ≤ + ∑ i∈N, labelOccupation (fun z => s.f (0,z)) + (closedBinHits F.flow zX B S a b (l i) (u i)) := by + have hfm : Measurable (fun z : Phase => ENNReal.ofReal (s.f (0,z))) := + (hs.f_smooth.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + (fun _ => ⟨⟨le_rfl,hT⟩,mem_univ _⟩)).measurable.ennreal_ofReal + have hsub (z : Phase) : closedBinHits F.flow zX B S a b c d z ⊆ + ⋃ i∈N, closedBinHits F.flow zX B S a b (l i) (u i) z := by + rintro r ⟨hz,hr,t,ht,hbin⟩ + obtain ⟨i,hi,hrC⟩ := mem_iUnion₂.mp (hcover hr) + exact mem_iUnion₂.mpr ⟨i,hi,hz,hrC,t,ht,hbin⟩ + unfold labelOccupation + rw [← lintegral_finsetSum (f := fun i z => ENNReal.ofReal (s.f (0,z)) * + volume (closedBinHits F.flow zX B S a b (l i) (u i) z)) N (fun i hi => hfm.mul + (F.measurable_closedBinHits_duration hs hT zX B hS hJ (hC i hi)))] + apply lintegral_mono + intro z + calc + _ ≤ ENNReal.ofReal (s.f (0,z))*∑ i∈N, + volume (closedBinHits F.flow zX B S a b (l i) (u i) z) := + mul_le_mul' le_rfl ((measure_mono (hsub z)).trans (measure_biUnion_finset_le _ _)) + _ = _ := Finset.mul_sum _ _ _ + +lemma PhaseFlowOn.small_closed_bin_cells_payment {s : Solution} + {T M A P L a b massScale φ C p len aStar bStar I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + {ι : Type*} (N : Finset ι) (l u lo hi : ι → ℝ) + (np nf : ℕ) (hp : p=64*(2:ℝ)^np) (hφeq : φ=(2:ℝ)⁻¹^nf) + (hlo0 : ∀ i∈N, 0 ≤ lo i) (hhiT : ∀ i∈N, hi i ≤ T) + (hJ : ∀ i∈N, Icc (max a (l i)) (min b (u i+B.rmax)) ⊆ Icc (lo i) (hi i)) + (hC : ∀ i∈N, Icc (l i) (u i) ⊆ Icc (lo i) (hi i)) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hstable : ∀ i∈N, hi i-lo i ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (hlen : ∀ i∈N, u i-l i=len) + (hdisj : Set.PairwiseDisjoint (↑N) (fun i => Ioc (l i) (u i))) + (hsub : ∀ i∈N, Ioc (l i) (u i)⊆Icc aStar bStar) + (hStar : Icc aStar bStar ⊆ Icc 0 T) (hI : 0 < I) : + ENNReal.ofReal len * ENNReal.ofReal (p/256) * + (∑ i∈N, labelOccupation (fun z => s.f (0,z)) + (closedBinHits F.flow zX B S a b (l i) (u i))) ≤ + ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal I * + jointEnergyBudget s F.flow zX T 4 aStar bStar I (np,nf) := by + let g : ℝ → ℝ≥0∞ := fun t => ∫⁻ z : Phase, + (sameTimeBudgetSet F.flow zX T 4 (np,nf)).indicator + (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z) + calc + _ = ∑ i∈N, ENNReal.ofReal len * ENNReal.ofReal (p/256) * + labelOccupation (fun z => s.f (0,z)) + (closedBinHits F.flow zX B S a b (l i) (u i)) := Finset.mul_sum _ _ _ + _ ≤ ∑ i∈N, ENNReal.ofReal (40*B.rmax) * ∫⁻ t in Icc (l i) (u i), g t := by + apply Finset.sum_le_sum + intro i hiN + rw [closedBinHits_clip_receiver] + exact hlen i hiN ▸ F.small_closed_bin_cell_payment hs hT zX B hS np nf hp hφeq + (hlo0 i hiN) (hhiT i hiN) (hJ i hiN) (hC i hiN) hM hA hP hL hm hφ hφ1 + hconst (hstable i hiN) hqmin hqmax hmq hmw hr hd hDlo hDhi hw HX HZ + _ = ENNReal.ofReal (40*B.rmax) * (∑ i∈N, ∫⁻ t in Icc (l i) (u i), g t) := + (Finset.mul_sum _ _ _).symm + _ ≤ ENNReal.ofReal (40*B.rmax) * ∫⁻ t in Icc aStar bStar, g t := + mul_le_mul' le_rfl (sum_cell_lintegral_le N l u g hdisj hsub) + _ ≤ _ := by + rw [mul_assoc] + exact mul_le_mul' le_rfl (sameTimeBudget_energy_le_joint hStar hI) + +lemma PhaseFlowOn.small_closed_bin_cell_crude {s : Solution} + {T M A P L lo hi a b c d massScale φ C p : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (t₀ : ℝ) (ht₀ : t₀∈Icc c d) (zX : Phase) (B : ClosedConeBin) {S : Set Phase} + (hlo0 : 0 ≤ lo) (hhiT : hi ≤ T) + (hJ : Icc a b ⊆ Icc lo hi) (hC : Icc c d ⊆ Icc lo hi) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hlen : hi-lo ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + ENNReal.ofReal (p/256) * + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b c d) ≤ + ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + have hdata := F.small_closed_bin_cell_data zX B hlo0 hhiT hJ hC hM hA hP hL + hm hφ hφ1 hconst hlen hqmin hqmax hmq hmw hr hd hDlo hDhi hw HX HZ + apply F.label_occupation_cell_bound hs ((hC.trans (Icc_subset_Icc hlo0 hhiT)) ht₀) + · intro z + by_cases hz : (closedBinHits F.flow zX B S a b c d z).Nonempty + · exact (hdata z hz).1 + · simp only [not_nonempty_iff_eq_empty.mp hz,measure_empty,zero_le] + · exact fun z hz => ((hdata z hz).2 t₀ ht₀).1 + + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + + +lemma closedBinHits_clip_source (α : Phase → ℝ → Phase) (zX : Phase) + (B : ClosedConeBin) (S : Set Phase) (a b T : ℝ) : + closedBinHits α zX B S a b 0 T = + closedBinHits α zX B S a b (max 0 (a-B.rmax)) (min T b) := by + funext z + ext r + constructor + · rintro ⟨hz,hr,t,ht,hbin⟩ + have hrt : r ≤ t := by + have hh := hbin.1 + linarith [norm_nonneg ((α zX t).1-(α z r).1)] + refine ⟨hz,⟨max_le hr.1 ?_,le_min hr.2 (hrt.trans ht.2)⟩,t,ht,hbin⟩ + linarith [hbin.2.1.2,ht.1] + · rintro ⟨hz,hr,t,ht,hbin⟩ + exact ⟨hz,⟨(le_max_left _ _).trans hr.1,hr.2.trans (min_le_left _ _)⟩,t,ht,hbin⟩ + +lemma ennreal_sum_le_erase_add {ι : Type*} [DecidableEq ι] (S : Finset ι) (i : ι) (f : ι → ℝ≥0∞) : + ∑ j∈S, f j ≤ (∑ j∈S.erase i, f j)+f i := by + classical + by_cases hi : i∈S + · exact le_of_eq (Finset.sum_erase_add _ _ hi).symm + · rw [Finset.erase_eq_self.mpr hi] + exact le_add_right le_rfl + +lemma PhaseFlowOn.small_closed_bin_refined_stable {s : Solution} + {T M A P L a b massScale φ C p len I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (np nf : ℕ) (hp : p=64*(2:ℝ)^np) (hφeq : φ=(2:ℝ)⁻¹^nf) + (ha : 0 ≤ a) (hb : b ≤ T) (hlen : 0 < len) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hconst : 128 ≤ C) + (hstable : 2*len ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hrmax : 0 ≤ B.rmax) (hrad : B.rmax ≤ len) + (hd : B.dmax ≤ φ^2/32) + (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) (hw : 4 ≤ φ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (hI : 0 < I) : + ENNReal.ofReal len * ENNReal.ofReal (p/256) * + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b 0 T) ≤ + ENNReal.ofReal (40*B.rmax) * + (ENNReal.ofReal len * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) + + ENNReal.ofReal I * jointEnergyBudget s F.flow zX T 4 + (max 0 (a-B.rmax-len)) (min T (b+len)) I (np,nf)) := by + classical + let l := sourceCellLo len + let u := sourceCellHi T len + let w := fun i => min T (u i+B.rmax) + let N := selectedSourceCells T len a b B.rmax + let last := sourceCellLast T len + let full := N.erase last + let O : ℕ → ℝ≥0∞ := fun i => labelOccupation (fun z => s.f (0,z)) + (closedBinHits F.flow zX B S a b (l i) (u i)) + have hgrid (i : ℕ) (hi : i ≤ last) : + 0 ≤ l i ∧ l i ≤ u i ∧ u i ≤ T ∧ u i-l i ≤ len := + sourceCell_mem_prefix hT hlen hi + have hN (i : ℕ) (hi : i∈N) : i ≤ last := by + have hh := Finset.mem_range.mp (Finset.mem_filter.mp hi).1 + omega + have hfullN (i : ℕ) (hi : i∈full) : i∈N := Finset.mem_of_mem_erase hi + have hJC (i : ℕ) : Icc (max a (l i)) (min b (u i+B.rmax)) ⊆ Icc (l i) (w i) := by + intro t ht + exact ⟨(le_max_right _ _).trans ht.1, + le_min ((ht.2.trans (min_le_left _ _)).trans hb) (ht.2.trans (min_le_right _ _))⟩ + have hCC (i : ℕ) (hi : i ≤ last) : Icc (l i) (u i) ⊆ Icc (l i) (w i) := by + intro t ht + exact ⟨ht.1,le_min (ht.2.trans (hgrid i hi).2.2.1) (by linarith [ht.2])⟩ + have hST (i : ℕ) (hi : i ≤ last) : + w i-l i ≤ (C*(P/massScale)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2 := by + have hg := (hgrid i hi).2.2.2 + have hw : w i ≤ u i+B.rmax := min_le_right _ _ + linarith + have hsum : labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b 0 T) ≤ + (∑ i∈full, O i)+O last := by + refine le_trans ?_ (ennreal_sum_le_erase_add N last O) + rw [closedBinHits_clip_source] + apply F.closedBinHits_occupation_le_sum hs hT zX B hS N l u (Icc_subset_Icc ha hb) + · intro i hi + exact Icc_subset_Icc (hgrid i (hN i hi)).1 (hgrid i (hN i hi)).2.2.1 + · exact selectedSourceCells_cover hlen + have hpay : ENNReal.ofReal len * ENNReal.ofReal (p/256) * (∑ i∈full, O i) ≤ + ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal I * jointEnergyBudget s F.flow zX T 4 + (max 0 (a-B.rmax-len)) (min T (b+len)) I (np,nf) := by + apply F.small_closed_bin_cells_payment hs hT zX B hS full l u l w np nf hp hφeq + (fun i hi => (hgrid i (hN i (hfullN i hi))).1) (fun _ _ => min_le_left _ _) + (fun i _ => hJC i) (fun i hi => hCC i (hN i (hfullN i hi))) + hM hA hP hL hm hφ hφ1 hconst (fun i hi => hST i (hN i (hfullN i hi))) + hqmin hqmax hmq hmw hr hd hDlo hDhi hw HX HZ + · intro i hi + apply sourceCell_full hT hlen + have hn := hN i (hfullN i hi) + have hne := (Finset.mem_erase.mp hi).1 + omega + · exact fun i _ j _ hij => sourceCells_pairwise_disjoint hlen hij + · intro i hi + exact Ioc_subset_Icc_self.trans (selectedSourceCells_enlargement hT hlen (hfullN i hi)) + · exact Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + · exact hI + have hclip : ENNReal.ofReal (p/256) * O last ≤ + ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + dsimp only [O] + rw [closedBinHits_clip_receiver] + exact F.small_closed_bin_cell_crude hs (l last) (left_mem_Icc.mpr (hgrid last le_rfl).2.1) + zX B (hgrid last le_rfl).1 (min_le_left _ _) (hJC last) (hCC last le_rfl) + hM hA hP hL hm hφ hφ1 hconst (hST last le_rfl) + hqmin hqmax hmq hmw hr hd hDlo hDhi hw HX HZ + calc + _ ≤ ENNReal.ofReal len * ENNReal.ofReal (p/256) * ((∑ i∈full, O i)+O last) := + mul_le_mul' le_rfl hsum + _ = ENNReal.ofReal len * ENNReal.ofReal (p/256) * (∑ i∈full, O i)+ + ENNReal.ofReal len * (ENNReal.ofReal (p/256)*O last) := by ring + _ ≤ ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal I * jointEnergyBudget s F.flow zX T 4 + (max 0 (a-B.rmax-len)) (min T (b+len)) I (np,nf) + + ENNReal.ofReal len * (ENNReal.ofReal (40*B.rmax) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x))) := + add_le_add hpay (mul_le_mul' le_rfl hclip) + _ = _ := by ring + +lemma jointEnergyBudget_mono_interval (s : Solution) (α : Phase → ℝ → Phase) + (zX : Phase) (T : ℝ) (k : ℕ) {a b c d I : ℝ} (n : ℕ × ℕ) + (hsub : Icc a b ⊆ Icc c d) : + jointEnergyBudget s α zX T k a b I n ≤ jointEnergyBudget s α zX T k c d I n := by + unfold jointEnergyBudget + exact mul_le_mul' le_rfl (lintegral_mono_set hsub) + +lemma stable_source_enlargement {a b T r len I : ℝ} (hr : r ≤ len) (hlen : len ≤ I) : + Icc (max 0 (a-r-len)) (min T (b+len)) ⊆ Icc (max 0 (a-2*I)) (min T (b+I)) := by + apply Icc_subset_Icc + · apply max_le_max le_rfl + linarith + · exact min_le_min le_rfl (by linarith) + +lemma stable_source_enlargement_length {a b T I : ℝ} (hab : b-a ≤ I) : + min T (b+I)-max 0 (a-2*I) ≤ 4*I := by + linarith [min_le_right T (b+I),le_max_right 0 (a-2*I)] + +lemma PhaseFlowOn.stable_small_jointBudget_uniform {s : Solution} {T a b I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (hI : 0 < I) (hab : b-a ≤ I) : + (∑' n : ℕ × ℕ, jointEnergyBudget s F.flow zX T 4 + (max 0 (a-2*I)) (min T (b+I)) I n) ≤ + (3*(4*4+1)^2:ℕ) * ENNReal.ofReal 4 * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + exact F.jointEnergyBudget_uniform hs zX 4 + (Icc_subset_Icc (le_max_left _ _) (min_le_left _ _)) hI (by norm_num) + (stable_source_enlargement_length hab) + +lemma occupation_divide_cell {p len r I O E B : ℝ≥0∞} + (hp : p ≠ 0) (hpfin : p ≠ ⊤) (hl : len ≠ 0) (hlfin : len ≠ ⊤) + (h : len*p*O ≤ r*(len*E+I*B)) : + O ≤ r/p*(E+I/len*B) := by + have hh := mul_le_mul' (le_refl ((len*p)⁻¹)) h + have hprod : len*p ≠ 0 := mul_ne_zero hl hp + have hprodfin : len*p ≠ ⊤ := ENNReal.mul_ne_top hlfin hpfin + rw [← mul_assoc,ENNReal.inv_mul_cancel hprod hprodfin,one_mul] at hh + calc + O ≤ (len*p)⁻¹*(r*(len*E+I*B)) := hh + _ = r/p*(E+I/len*B) := by + rw [ENNReal.mul_inv (Or.inl hl) (Or.inl hlfin),mul_add,div_eq_mul_inv,div_eq_mul_inv,mul_add] + have he : len⁻¹*(p⁻¹*(r*(len*E))) = r*p⁻¹*E := by + calc + _ = r*p⁻¹*(len⁻¹*len)*E := by ac_rfl + _ = _ := by rw [ENNReal.inv_mul_cancel hl hlfin,mul_one] + rw [mul_assoc _ _ (r*(len*E)),he] + ring + + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + + +lemma signedPrimitive_decomposition (a u n : Vec) (hD : 1-dot n a ≠ 0) : + signedPrimitive a u n = (u-n)+ + ((1-dot n a-(1-dot a u))/(1-dot n a)) • n := by + ext i + simp only [signedPrimitive,PiLp.sub_apply,PiLp.add_apply,PiLp.smul_apply,smul_eq_mul] + field_simp + ring + +lemma small_deficit_difference {a u n : Vec} {θ φ : ℝ} + (hn : ‖n‖=1) (hθ : 0 ≤ θ) (hφ : 0 ≤ φ) (hsmall : θ ≤ φ) + (hd0 : 0 ≤ 1-dot n u) (hd : 1-dot n u ≤ 8*θ^2) + (hun : ‖u-n‖ ≤ 4*θ) (han : ‖a-n‖ ≤ 4*φ) : + |(1-dot a u)-(1-dot n a)| ≤ 24*φ*θ := by + have he : (1-dot a u)-(1-dot n a)=(1-dot n u)+dot (a-n) (n-u) := by + simp only [dot_sub_left,dot_sub_right,dot_self,hn,one_pow,dot_comm a n] + ring + rw [he] + calc + _ ≤ |1-dot n u|+|dot (a-n) (n-u)| := abs_add_le _ _ + _ ≤ 8*θ^2+‖a-n‖*‖n-u‖ := by + gcongr + · rwa [abs_of_nonneg hd0] + · rw [dot_eq_inner] + exact abs_real_inner_le_norm _ _ + _ ≤ 8*θ^2+(4*φ)*(4*θ) := by + gcongr + rwa [norm_sub_rev] + _ ≤ _ := by nlinarith [mul_le_mul_of_nonneg_right hsmall hθ] + +lemma small_primitive_norm {a u n : Vec} {θ φ : ℝ} + (hn : ‖n‖=1) (hθ : 0 ≤ θ) (hφ : 0 < φ) (hφ1 : φ ≤ 1) + (hD : φ^2/2 ≤ 1-dot n a) + (hun : ‖u-n‖ ≤ 4*θ) + (he : |(1-dot a u)-(1-dot n a)| ≤ 24*φ*θ) : + ‖signedPrimitive a u n‖ ≤ 52*θ/φ := by + have hDpos : 0 < 1-dot n a := lt_of_lt_of_le (by positivity) hD + have hratio : |(1-dot n a-(1-dot a u))/(1-dot n a)| ≤ 48*θ/φ := by + rw [abs_div,abs_of_pos hDpos,abs_sub_comm] + apply (div_le_iff₀ hDpos).mpr + have hm := mul_le_mul_of_nonneg_left hD (by positivity : 0 ≤ 48*θ/φ) + have hh : 48*θ/φ*(φ^2/2)=24*φ*θ := by field_simp; ring + rw [hh] at hm + exact he.trans hm + rw [signedPrimitive_decomposition a u n hDpos.ne'] + calc + _ ≤ ‖u-n‖+‖((1-dot n a-(1-dot a u))/(1-dot n a)) • n‖ := norm_add_le _ _ + _ ≤ 4*θ+48*θ/φ := by simpa only [norm_smul,Real.norm_eq_abs,hn,mul_one] using add_le_add hun hratio + _ ≤ _ := by + apply (le_div_iff₀ hφ).mpr + have hm := mul_le_mul_of_nonneg_left hφ1 (by positivity : 0 ≤ 4*θ) + field_simp + nlinarith + +lemma transverseProjection_add (w h k : Vec) : + transverseProjection w (h+k)=transverseProjection w h+transverseProjection w k := + velocityProjection_add _ _ _ + +lemma transverseProjection_smul (w h : Vec) (c : ℝ) : + transverseProjection w (c • h)=c • transverseProjection w h := velocityProjection_smul _ _ _ + +lemma transverseProjection_normal_dist (w n : Vec) : + ‖transverseProjection w n‖ ≤ ‖n-velocity w‖ := by + have he : transverseProjection w n=transverseProjection w (n-velocity w) := by + have hh := transverseProjection_add w (n-velocity w) (velocity w) + rw [sub_add_cancel,transverseProjection_velocity,add_zero] at hh + exact hh + rw [he] + exact transverseProjection_norm _ _ + +lemma small_primitive_transverse {w u n : Vec} {θ φ : ℝ} + (hθ : 0 ≤ θ) (hφ : 0 < φ) + (hD : φ^2/2 ≤ 1-dot n (velocity w)) + (hun : ‖u-n‖ ≤ 4*θ) (han : ‖velocity w-n‖ ≤ 4*φ) + (he : |(1-dot (velocity w) u)-(1-dot n (velocity w))| ≤ 24*φ*θ) : + ‖transverseProjection w (signedPrimitive (velocity w) u n)‖ ≤ 196*θ := by + have hDpos : 0 < 1-dot n (velocity w) := lt_of_lt_of_le (by positivity) hD + have hratio : |(1-dot n (velocity w)-(1-dot (velocity w) u))/(1-dot n (velocity w))| ≤ 48*θ/φ := by + rw [abs_div,abs_of_pos hDpos,abs_sub_comm] + apply (div_le_iff₀ hDpos).mpr + have hm := mul_le_mul_of_nonneg_left hD (by positivity : 0 ≤ 48*θ/φ) + have hh : 48*θ/φ*(φ^2/2)=24*φ*θ := by field_simp; ring + rw [hh] at hm + exact he.trans hm + have hpn : ‖transverseProjection w n‖ ≤ 4*φ := + (transverseProjection_normal_dist w n).trans (by rwa [norm_sub_rev]) + rw [signedPrimitive_decomposition _ _ _ hDpos.ne',transverseProjection_add,transverseProjection_smul] + calc + _ ≤ ‖transverseProjection w (u-n)‖+ + ‖((1-dot n (velocity w)-(1-dot (velocity w) u))/(1-dot n (velocity w))) • transverseProjection w n‖ := norm_add_le _ _ + _ ≤ 4*θ+(48*θ/φ)*(4*φ) := by + rw [norm_smul,Real.norm_eq_abs] + exact add_le_add ((transverseProjection_norm _ _).trans hun) (mul_le_mul hratio hpn (norm_nonneg _) (by positivity)) + _ = _ := by field_simp; ring + +lemma small_primitive_acceleration_pairing {a u n b : Vec} {θ φ K : ℝ} + (hθ : 0 ≤ θ) (hφ : 0 < φ) (hK : 0 ≤ K) + (hD : φ^2/2 ≤ 1-dot n a) (hun : ‖u-n‖ ≤ 4*θ) + (he : |(1-dot a u)-(1-dot n a)| ≤ 24*φ*θ) + (hb : ‖b‖ ≤ K) (hbn : |dot b n| ≤ 20*φ*K) : + |dot b (signedPrimitive a u n)| ≤ 964*θ*K := by + have hDpos : 0 < 1-dot n a := lt_of_lt_of_le (by positivity) hD + have hratio : |(1-dot n a-(1-dot a u))/(1-dot n a)| ≤ 48*θ/φ := by + rw [abs_div,abs_of_pos hDpos,abs_sub_comm] + apply (div_le_iff₀ hDpos).mpr + have hm := mul_le_mul_of_nonneg_left hD (by positivity : 0 ≤ 48*θ/φ) + have hh : 48*θ/φ*(φ^2/2)=24*φ*θ := by field_simp; ring + rw [hh] at hm + exact he.trans hm + rw [signedPrimitive_decomposition _ _ _ hDpos.ne',dot_add_right,dot_smul_right] + calc + _ ≤ |dot b (u-n)|+|(1-dot n a-(1-dot a u))/(1-dot n a)*dot b n| := abs_add_le _ _ + _ ≤ ‖b‖*‖u-n‖+|(1-dot n a-(1-dot a u))/(1-dot n a)| *|dot b n| := by + rw [abs_mul] + apply add_le_add _ le_rfl + rw [dot_eq_inner] + exact abs_real_inner_le_norm _ _ + _ ≤ K*(4*θ)+(48*θ/φ)*(20*φ*K) := by gcongr + _ = _ := by field_simp; ring + +lemma receiver_acceleration_bounds (w K n : Vec) {φ : ℝ} + (hn : ‖n‖=1) (hφ : 0 ≤ φ) (hD : 1-dot n (velocity w) ≤ 8*φ^2) : + ‖fderiv ℝ velocity w K‖ ≤ ‖K‖/q w ∧ + |dot (fderiv ℝ velocity w K) n| ≤ 4*φ*(‖K‖/q w) := by + have hp : ‖velocityProjection (velocity w) n‖ ≤ 4*φ := by + apply (norm_velocityProjection_normal _ _ (norm_velocity_lt_one w).le hn).trans + apply (Real.sqrt_le_iff).mpr + exact ⟨by positivity,by nlinarith⟩ + have he : fderiv ℝ velocity w K=(q w)⁻¹ • velocityProjection (velocity w) K := by + rw [fderiv_velocity_apply] + rfl + constructor + · rw [he,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (q_pos w))] + have hh := mul_le_mul_of_nonneg_left + (velocityProjection_norm (velocity w) K (norm_velocity_lt_one w).le) + (inv_pos.mpr (q_pos w)).le + simpa only [div_eq_mul_inv,mul_comm] using hh + · rw [he,dot_smul_left,abs_mul,abs_of_pos (inv_pos.mpr (q_pos w)), + dot_comm (velocityProjection _ _) n,velocityProjection_dot_symm] + calc + _ ≤ (q w)⁻¹*(‖velocityProjection (velocity w) n‖*‖K‖) := by + apply mul_le_mul_of_nonneg_left _ (inv_pos.mpr (q_pos w)).le + rw [dot_eq_inner] + exact abs_real_inner_le_norm _ _ + _ ≤ (q w)⁻¹*((4*φ)*‖K‖) := by + gcongr + exact (inv_pos.mpr (q_pos w)).le + _ = _ := by ring + +lemma receiver_small_primitive_pairing (w K u n : Vec) {θ φ : ℝ} + (hn : ‖n‖=1) (hθ : 0 ≤ θ) (hφ : 0 < φ) + (hD : φ^2/2 ≤ 1-dot n (velocity w)) + (hDu : 1-dot n (velocity w) ≤ 8*φ^2) + (hun : ‖u-n‖ ≤ 4*θ) + (he : |(1-dot (velocity w) u)-(1-dot n (velocity w))| ≤ 24*φ*θ) : + |dot (fderiv ℝ velocity w K) (signedPrimitive (velocity w) u n)| ≤ + 964*θ*(‖K‖/q w) := by + have hb := receiver_acceleration_bounds w K n hn hφ.le hDu + have hK : 0 ≤ ‖K‖/q w := div_nonneg (norm_nonneg _) (q_pos w).le + apply small_primitive_acceleration_pairing hθ hφ hK hD hun he hb.1 + exact hb.2.trans (mul_le_mul_of_nonneg_right (by nlinarith) hK) + +lemma receiver_bulk_vector_bound {w n : Vec} (hn : ‖n‖=1) : + ‖((1-dot (velocity w) (velocity w))/(1-dot n (velocity w))) • n-velocity w‖ ≤ 3 := by + have hD : 0 < 1-dot n (velocity w) := cone_denom_pos w n hn + have hnon : 0 ≤ 1-dot (velocity w) (velocity w) := by + rw [dot_self] + nlinarith [norm_velocity_lt_one w,norm_nonneg (velocity w)] + have hfrac : |(1-dot (velocity w) (velocity w))/(1-dot n (velocity w))| ≤ 2 := by + rw [abs_of_nonneg (div_nonneg hnon hD.le)] + apply (div_le_iff₀ hD).mpr + have hh := sq_nonneg ‖n-velocity w‖ + rw [norm_sub_sq_real,← dot_eq_inner,hn,one_pow] at hh + rw [dot_self] + linarith + calc + _ ≤ ‖((1-dot (velocity w) (velocity w))/(1-dot n (velocity w))) • n‖+ + ‖velocity w‖ := norm_sub_le _ _ + _ ≤ 2+1 := by + rw [norm_smul,Real.norm_eq_abs,hn,mul_one] + exact add_le_add hfrac (norm_velocity_lt_one w).le + _ = _ := by norm_num + +lemma receiver_bulk_transverse_bound {w n : Vec} {φ : ℝ} + (hn : ‖n‖=1) (hφ : 0 ≤ φ) (hD : 1-dot n (velocity w) ≤ 8*φ^2) : + ‖transverseProjection w (((1-dot (velocity w) (velocity w))/(1-dot n (velocity w))) • + n-velocity w)‖ ≤ 8*φ := by + have hDp : 0 < 1-dot n (velocity w) := cone_denom_pos w n hn + have hnon : 0 ≤ 1-dot (velocity w) (velocity w) := by + rw [dot_self] + nlinarith [norm_velocity_lt_one w,norm_nonneg (velocity w)] + have hfrac : |(1-dot (velocity w) (velocity w))/(1-dot n (velocity w))| ≤ 2 := by + rw [abs_of_nonneg (div_nonneg hnon hDp.le)] + apply (div_le_iff₀ hDp).mpr + have hh := sq_nonneg ‖n-velocity w‖ + rw [norm_sub_sq_real,← dot_eq_inner,hn,one_pow] at hh + rw [dot_self] + linarith + have hpn : ‖transverseProjection w n‖ ≤ 4*φ := by + apply (transverseProjection_normal_bound w n hn).trans + apply (Real.sqrt_le_iff).mpr + exact ⟨by positivity,by nlinarith⟩ + have he : transverseProjection w + (((1-dot (velocity w) (velocity w))/(1-dot n (velocity w))) • n-velocity w)= + ((1-dot (velocity w) (velocity w))/(1-dot n (velocity w))) • transverseProjection w n := by + rw [sub_eq_add_neg,transverseProjection_add,show -velocity w=(-1:ℝ) • velocity w by simp, + transverseProjection_smul,transverseProjection_smul,transverseProjection_velocity,smul_zero,add_zero] + rw [he,norm_smul,Real.norm_eq_abs] + exact (mul_le_mul hfrac hpn (norm_nonneg _) (by norm_num)).trans_eq (by ring) + +lemma small_energy_ratio {a u n : Vec} {θ φ : ℝ} + (_hθ : 0 ≤ θ) (hφ : 0 < φ) (hsmall : θ ≤ φ) + (hD : φ^2/2 ≤ 1-dot n a) + (he : |(1-dot a u)-(1-dot n a)| ≤ 24*φ*θ) : + |(1-dot a u)/(1-dot n a)| ≤ 49 := by + have hDp : 0<1-dot n a := lt_of_lt_of_le (by positivity) hD + rw [abs_div,abs_of_pos hDp] + apply (div_le_iff₀ hDp).mpr + have hab : |1-dot a u| ≤ |(1-dot a u)-(1-dot n a)|+|1-dot n a| := + calc + _ = |((1-dot a u)-(1-dot n a))+(1-dot n a)| := by congr 1; ring + _ ≤ _ := abs_add_le _ _ + rw [abs_of_pos hDp] at hab + have hm := mul_le_mul_of_nonneg_left hsmall (by positivity : 0≤24*φ) + nlinarith + +lemma signedRemainder_physical_decomposition {r f : ℝ} {a u n b : Vec} + (hr : r≠0) (hD : 1-dot n a≠0) : + (f*(1-dot n a)) • signedRemainder r a u n b = + (f/r^2*((1-dot a u)/(1-dot n a))) • + (((1-dot a a)/(1-dot n a)) • n-a) + + (f/r*(dot b (signedPrimitive a u n)/(1-dot n a))) • n := by + ext i + simp only [signedRemainder,PiLp.smul_apply,PiLp.add_apply,PiLp.sub_apply,smul_eq_mul] + field_simp + +lemma signedRemainder_small_norm {r f θ φ : ℝ} (w K u n : Vec) + (hr : 0 ENNReal.ofReal (q p.2.2*s.f p) + let G : ℝ → ℝ≥0∞ := fun t => ∫⁻ z : Phase, + (sameTimeBudgetSet F.flow zX T k n).indicator e (t,z)+ + (arrivalBudgetSet F.flow zX T k n).indicator e (t,z) + have hpnt (t : ℝ) (ht : t∈Ioo 0 T) : + ENNReal.ofReal p*(∫⁻ z : Phase,H.indicator (fun z => ENNReal.ofReal (s.f z)) (t,z)) ≤ + (Icc a b).indicator G t := by + by_cases hti : t∈Icc a b + · rw [indicator_of_mem hti,← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro z + dsimp only + by_cases hz : (t,z)∈H + · rw [indicator_of_mem hz,indicator_of_mem (harrival hz),← ENNReal.ofReal_mul hp] + exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right (hmom t z hz) + (hs.nonnegative t (Ioo_subset_Icc_self ht) z))).trans (le_add_left le_rfl) + · rw [indicator_of_notMem hz,mul_zero] + exact bot_le + · rw [indicator_of_notMem hti] + have hz : (∫⁻ z : Phase,H.indicator (fun z => ENNReal.ofReal (s.f z)) (t,z))=0 := by + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro z + exact indicator_of_notMem (fun he => hti (htime t z he)) _ + rw [hz,mul_zero] + calc + _ ≤ ∫⁻ t in Ioo (0:ℝ) T, (Icc a b).indicator G t := + lintegral_mono_ae (ae_restrict_of_forall_mem measurableSet_Ioo hpnt) + _ ≤ ∫⁻ t : ℝ, (Icc a b).indicator G t := + lintegral_mono' Measure.restrict_le_self (fun _ => le_rfl) + _ = _ := lintegral_indicator measurableSet_Icc _ + +def closedBinEulerian (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (B : ClosedConeBin) (S : Set Phase) (a b c d : ℝ) : Set (ℝ × Phase) := + (fun p : ℝ × Phase => (p.1,prefixFlow α T p.2 p.1)) '' + {p : ℝ × Phase | p.1∈closedBinHits α zX B S a b c d p.2} + ∩ spaceConeDomain α zX T + +lemma measurableSet_spaceConeDomain (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) : + MeasurableSet (spaceConeDomain α zX T) := by + exact (measurable_fst measurableSet_Ioo).inter + (measurableSet_lt (measurable_snd.fst.sub measurable_const).norm + (measurable_const.sub measurable_fst)) + +lemma PhaseFlowOn.measurable_closedBinEulerian {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) : + MeasurableSet (closedBinEulerian F.flow zX T B S a b c d) := + ((F.compact_closedBinHits_joint hs hT zX B hS hJ hC).image + (continuous_fst.prodMk (F.continuous_prefixFlow hs hT))).measurableSet.inter + (measurableSet_spaceConeDomain _ _ _) + +lemma PhaseFlowOn.mem_closedBinEulerian_iff {E B : Field} {T a b c d r : ℝ} + (F : PhaseFlowOn E B T) (zX z : Phase) (C : ClosedConeBin) (S : Set Phase) + (hC : Icc c d⊆Icc 0 T) : + (r,F.flow z r)∈closedBinEulerian F.flow zX T C S a b c d ↔ + r∈closedBinHits F.flow zX C S a b c d z ∧ + (r,F.flow z r)∈spaceConeDomain F.flow zX T := by + constructor + · rintro ⟨⟨⟨r',z'⟩,hh,he⟩,hd⟩ + have hr : r'=r := congrArg Prod.fst he + subst r' + have heq : F.flow z' r=F.flow z r := by + have h := congrArg Prod.snd he + simpa only [prefixFlow,prefixClamp_eq (hC hh.2.1)] using h + have hz : z'=z := (F.bijective r (hC hh.2.1)).1 heq + subst z' + exact ⟨hh,hd⟩ + · rintro ⟨hh,hd⟩ + refine ⟨⟨(r,z),hh,?_⟩,hd⟩ + simp only [prefixFlow,prefixClamp_eq (hC hh.2.1)] + +lemma PhaseFlowOn.closedBinEulerian_occupation_le {s : Solution} {T a b c d : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) : + coneOccupation F.flow zX T s.f (closedBinEulerian F.flow zX T B S a b c d) ≤ + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b c d) := by + rw [F.cone_occupation_identity hT zX hs.f_smooth hs.vlasov + (F.measurable_closedBinEulerian hs hT zX B hS hJ hC) inter_subset_right] + unfold labelOccupation + apply lintegral_mono + intro z + apply mul_le_mul' le_rfl + apply measure_mono + intro r hr + exact ((F.mem_closedBinEulerian_iff zX z B S hC).mp hr.2).1 + + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + + +lemma PhaseFlowOn.closedBinEulerian_properties {E B : Field} {T a b c d : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (C : ClosedConeBin) (S : Set Phase) + (hC : Icc c d ⊆ Icc 0 T) : + ∀ p ∈ closedBinEulerian F.flow zX T C S a b c d, + p.1 ∈ Icc c d ∧ C.qmin ≤ q p.2.2 ∧ + ∃ z, p.2 = F.flow z p.1 ∧ ∃ t∈Icc a b, InClosedConeBin F.flow zX C t p.1 z := by + rintro p ⟨⟨⟨r,z⟩,⟨_,hr,t,ht,hbin⟩,he⟩,_⟩ + dsimp only at he + have heq : (r,F.flow z r)=p := by + simpa only [prefixFlow,prefixClamp_eq (hC hr)] using he + clear he + subst p + exact ⟨hr,hbin.2.2.1.1,z,rfl,t,ht,hbin⟩ + +lemma PhaseFlowOn.closedBinEulerian_in_arrivalBudget {E B : Field} {T a b c d : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (C : ClosedConeBin) (S : Set Phase) (i j : ℕ) + (hJ : Icc a b ⊆ Icc 0 T) (hC : Icc c d ⊆ Icc 0 T) (hR : 0 intro h <;> constructor <;> linarith [h.1,h.2] + by_cases hr : r∈Ioo 0 (T-s) + · rw [indicator_of_mem hr,indicator_of_mem (he.mp hr)] + · rw [indicator_of_notMem hr,indicator_of_notMem (mt he.mpr hr)] + _ = _ := lintegral_add_left_eq_self _ _ + +lemma lintegral_retarded_triangle (T : ℝ) {f : ℝ × ℝ → ℝ≥0∞} (hf : Measurable f) : + (∫⁻ s in Ioo (0:ℝ) T, ∫⁻ r in Ioo (0:ℝ) (T-s), f (s+r,s)) = + ∫⁻ t in Ioo (0:ℝ) T, ∫⁻ s in Ioo (0:ℝ) t, f (t,s) := by + let H : Set (ℝ × ℝ) := {p | 0 f (p.2,p.1)) + have hH : MeasurableSet H := + (measurableSet_lt measurable_const measurable_fst).inter + ((measurableSet_lt measurable_fst measurable_snd).inter + (measurableSet_lt measurable_snd measurable_const)) + have hg : Measurable g := (hf.comp (measurable_snd.prodMk measurable_fst)).indicator hH + calc + _ = ∫⁻ s : ℝ, ∫⁻ t : ℝ, g (s,t) := by + rw [← lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro s + by_cases hs : s∈Ioo 0 T + · rw [indicator_of_mem hs,lintegral_add_left_Ioo s T (fun t => f (t,s)),← lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro t + have he : (s,t)∈H ↔ t∈Ioo s T := by simp only [H,mem_ofPred_eq,mem_Ioo,hs.1,true_and] + by_cases ht : t∈Ioo s T + · simp only [g,indicator_of_mem ht,indicator_of_mem (he.mpr ht)] + · simp only [g,indicator_of_notMem ht,indicator_of_notMem (mt he.mp ht)] + · rw [indicator_of_notMem hs] + symm + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro t + exact indicator_of_notMem (fun hh => hs ⟨hh.1,hh.2.1.trans hh.2.2⟩) _ + _ = ∫⁻ t : ℝ, ∫⁻ s : ℝ, g (s,t) := lintegral_lintegral_swap hg.aemeasurable + _ = _ := by + rw [← lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro t + by_cases ht : t∈Ioo 0 T + · rw [indicator_of_mem ht,← lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro s + have he : (s,t)∈H ↔ s∈Ioo 0 t := by simp only [H,mem_ofPred_eq,mem_Ioo,ht.2,and_true] + by_cases hs : s∈Ioo 0 t + · simp only [g,indicator_of_mem hs,indicator_of_mem (he.mpr hs)] + · simp only [g,indicator_of_notMem hs,indicator_of_notMem (mt he.mp hs)] + · rw [indicator_of_notMem ht] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro s + exact indicator_of_notMem (fun hh => ht ⟨hh.1.trans hh.2.1,hh.2.2⟩) _ + +lemma lintegral_retarded_triangle_parameter {Ω : Type*} [MeasurableSpace Ω] + (μ : Measure Ω) [SFinite μ] (T : ℝ) {f : ℝ × ℝ × Ω → ℝ≥0∞} (hf : Measurable f) : + (∫⁻ s in Ioo (0:ℝ) T, ∫⁻ n : Ω, ∫⁻ r in Ioo (0:ℝ) (T-s), f (s+r,s,n) ∂volume ∂μ) = + ∫⁻ t in Ioo (0:ℝ) T, ∫⁻ s in Ioo (0:ℝ) t, ∫⁻ n : Ω, f (t,s,n) ∂μ := by + have hm : Measurable (fun p : (ℝ × ℝ) × Ω => f (p.1.1,p.1.2,p.2)) := + hf.comp ((measurable_fst.comp measurable_fst).prodMk + ((measurable_snd.comp measurable_fst).prodMk measurable_snd)) + calc + _ = ∫⁻ s in Ioo (0:ℝ) T, ∫⁻ r in Ioo (0:ℝ) (T-s), ∫⁻ n : Ω, f (s+r,s,n) ∂μ := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro s _ + have hg : Measurable (fun p : Ω × ℝ => f (s+p.2,s,p.1)) := + hf.comp ((measurable_const.add measurable_snd).prodMk + (measurable_const.prodMk measurable_fst)) + exact lintegral_lintegral_swap hg.aemeasurable + _ = _ := lintegral_retarded_triangle T hm.lintegral_prod_right' + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverResidual.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe9b2219451e3adc22f815a6488b15bb992e9e68 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverResidual.lean @@ -0,0 +1,188 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.UpperTimeCut +import OAI.Analysis.VlasovMaxwell.Continuation.PrefixMomentumForce +import OAI.Analysis.VlasovMaxwell.Population.BulkTestWeight +import OAI.Analysis.VlasovMaxwell.Population.UnselectedCover + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.force_bulk_receiver_residual_uniform {d : Datum} (hd : Admissible d) (T₀ D : ℝ) (hD : 0≤D) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 1≤A → ∀ᶠ P : ℝ in atTop, + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (ψ : ℝ→ℝ) (Lψ : NNReal), LipschitzWith Lψ ψ → (∀t,|ψ t|≤1) → + (∀t∉Icc a b,ψ t=0) → (∀t∈Icc a b,|deriv ψ t|≤D/I) → + (∀t∉Icc a b,deriv ψ t=0) → ψ T=0 → + ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖ ≤ + ENNReal.ofReal ((4*Real.pi)⁻¹) * + (ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w))+ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)) := by + obtain ⟨Cs,hCs,hselected⟩ := hd.selected_force_residual_uniform T₀ D hD + obtain ⟨Cu,hCu,hunselected⟩ := hd.unselected_label_uniform T₀ + refine ⟨Cu+Cs,add_nonneg hCu hCs,?_⟩ + intro M A hM hA + filter_upwards [hselected M A hM (zero_lt_one.trans_le hA),hunselected M A hM hA] with P hsel hun + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + have hc := hsel hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + have hu := hun hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ hψ.continuous.measurable hψ1 hout + apply hc.trans + apply mul_le_mul' le_rfl + apply add_le_add + · apply (add_le_add hu le_rfl).trans_eq + rw [←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + · apply mul_le_mul' _ le_rfl + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hCu) + (Real.rpow_nonneg (zero_le_one.trans hw) _) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.force_bulk_retarded_uniform {d : Datum} (hd : Admissible d) (T₀ D : ℝ) (hD : 0≤D) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 1≤A → ∀ᶠ P : ℝ in atTop, + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (ψ : ℝ→ℝ) (Lψ : NNReal), LipschitzWith Lψ ψ → (∀t,|ψ t|≤1) → + (∀t∉Icc a b,ψ t=0) → (∀t∈Icc a b,|deriv ψ t|≤D/I) → + (∀t∉Icc a b,deriv ψ t=0) → ψ T=0 → + ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖ ≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cr,hCr,hresidual⟩ := hd.force_bulk_receiver_residual_uniform T₀ D hD + obtain ⟨Ca,hCa,habsolute⟩ := hd.direct_lorentz_uniform T₀ + refine ⟨(4*Real.pi)⁻¹*(Cr+Cr*Ca),by positivity,?_⟩ + intro M A hM hA + filter_upwards [hresidual M A hM hA] with P hres + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + have hr := hres hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + have ha' := habsolute M A P hM hA hP hL s T F hs hT hTT zX a b I w + hzX ha hb hab hI hI1 hJI hw hwP hIP hphysical hband HZ + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hw0 : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (ψ : ℝ→ℝ) (Lψ : NNReal), LipschitzWith Lψ ψ → (∀t,|ψ t|≤1) → + (∀t∉Icc a b,ψ t=0) → (∀t∈Icc a b,|deriv ψ t|≤D/I) → + (∀t∉Icc a b,deriv ψ t=0) → ψ T=0 → + ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)))‖ ≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cr,hCr,hretarded⟩ := hd.force_bulk_retarded_uniform T₀ D hD + obtain ⟨Cb,hCb,hdatum⟩ := hd.supported_boundary_force_uniform T₀ + refine ⟨Cr+Cb,add_nonneg hCr hCb,?_⟩ + intro M A hM hA + filter_upwards [hretarded M A hM hA] with P hret + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let K := fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)) + let G := fun t=>boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2) + have hB : 0≤B := by dsimp [B]; positivity + have hIB : I≤B := by + have hi : I≤Real.sqrt I := by nlinarith [Real.sq_sqrt hI.le,Real.sqrt_nonneg I] + exact hi.trans ((le_mul_of_one_le_left (Real.sqrt_nonneg I) hP).trans + (show P*Real.sqrt I≤B from le_add_of_nonneg_right (by positivity))) + have hiK : IntegrableOn (fun t=>ψ t • K t) (Ioo (0:ℝ) T) := by + have hi := ((hψ.continuous.smul (F.continuous_prefixMomentumForce hs.energyPrefix hT zX)).continuousOn.integrableOn_Icc + (μ:=volume) (a:=0) (b:=T)).mono_set Ioo_subset_Icc_self + apply hi.congr + filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht + change ψ t • prefixMomentumForce s F.flow T zX t=ψ t • K t + simp only [K,prefixMomentumForce,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self ht),lorentzField,lorentzPhase] + have hiR : IntegrableOn (fun t=>ψ t • (K t-G t)) (Ioo (0:ℝ) T) := by + let W := fun t=>ψ t • ContinuousLinearMap.id ℝ Vec + have hW : Continuous W := hψ.continuous.smul continuous_const + simpa only [W,smul_apply,ContinuousLinearMap.id_apply] using + hs.multiplier_retarded_force_integrable hT F zX hW.continuousOn + have hiG : IntegrableOn (fun t=>ψ t • G t) (Ioo (0:ℝ) T) := by + apply (hiK.sub hiR).congr + exact ae_of_all _ (fun t=>by simp only [Pi.sub_apply,smul_sub,sub_sub_cancel]) + have hG : ‖∫t in Ioo (0:ℝ) T,ψ t • G t‖≤Cb*B := by + apply le_trans (b:=Cb*(∫t in Ioo (0:ℝ) T,|ψ t|)) + · rw [←integral_const_mul] + apply norm_integral_le_of_norm_le + (((hψ.continuous.norm.const_mul Cb).continuousOn.integrableOn_Icc (a:=0) (b:=T)).mono_set Ioo_subset_Icc_self) + filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht + rw [norm_smul,Real.norm_eq_abs,mul_comm Cb] + exact mul_le_mul_of_nonneg_left (hdatum T hT hTT s.E s.B F zX hzX t ⟨ht.1,ht.2.le⟩) (abs_nonneg _) + · exact mul_le_mul_of_nonneg_left + ((bounded_supported_test_mass hab hψ.continuous hψ1 hout).trans (hJI.trans hIB)) hCb + have he : (∫t in Ioo (0:ℝ) T,ψ t • K t)= + (∫t in Ioo (0:ℝ) T,ψ t • (K t-G t))+(∫t in Ioo (0:ℝ) T,ψ t • G t) := by + simp_rw [smul_sub] + rw [integral_sub hiK hiG,sub_add_cancel] + have hr := hret hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + change ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ t • K t‖≤_ + rw [he] + apply (ENNReal.ofReal_le_ofReal (norm_add_le _ _)).trans + rw [ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + apply (add_le_add hr (ENNReal.ofReal_le_ofReal hG)).trans_eq + rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCb hB)] + congr 1 + change Cr*B+Cb*B=(Cr+Cb)*B + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverScalar.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7ff289b7ca9424d73e26561cf858f00ff2f77bd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkReceiverScalar.lean @@ -0,0 +1,219 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma receiver_bin_ratio {d D θ φ w qW : ℝ} (hθ : 0<θ) (hφ : 0<φ) (hw : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) {v : Vec} + (hv : v∈coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2)) : + ‖partialCutoffTriangle s F.flow zX T Q (coneReceiverCutoffTangent s F.flow zX) W J (z,v)‖≤ + (2080000*C)*(cappedRepresentative (k 1)/(w*(cappedRepresentative (k 2))^2))* + ‖prefixMomentumForce s F.flow T zX z.1‖*(z.1-z.2.1)* + s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have ht := hJT hz.1 + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans ht.2⟩ + have hf := hs.nonnegative _ hσ ((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v) + by_cases hp : (z,v)∈trianglePhaseDomain T + · have heq : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq ht] + have hK : prefixMomentumForce s F.flow T zX z.1= + (lorentzField s.E s.B (z.1,F.flow zX z.1)).2 := by + simp only [prefixMomentumForce,heq,prefixClamp_eq ht] + have hD : 1-dot z.2.2.1 (velocity (F.flow zX z.1).2)∈ + Icc ((cappedRepresentative (k 2))^2/2) (8*(cappedRepresentative (k 2))^2) := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.2 + have hq : w/8≤q (F.flow zX z.1).2 := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.1.1 + rw [heq] at hv ⊢ + rw [hK] + apply (partialCutoffTriangle_norm_le_polar Q (coneReceiverCutoffTangent s F.flow zX) + W hz.1 hp (hW _ hz.1)).trans + simpa only [coneCutoffState,triangleKernelState,coneReceiverCutoffTangent,coneCutoffRate, + cutoffReceiverTangent] using unprojected_receiver_bin_cost (T:=T) hC0 hC (sphere_norm z.2.2) + (sub_pos.mpr hp.2.2) (by simpa only [heq] using hf) hθ hφ hw hsmall hv.2.1 hD hq Q + · rw [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1] + simp only [triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero] + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + positivity + +lemma PhaseFlowOn.bulkReceiver_bin_integral {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (hw : 0(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal (2080000*C)*representativeReceiverCost s F zX w k a b + (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + rw [representativeReceiverCost,←mul_assoc,←ENNReal.ofReal_mul (by positivity : 0≤2080000*C)] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_physicalBinBase hV _ measurableSet_Icc) + intro z hz + unfold physicalBinDensity + rw [←mul_assoc,←lintegral_const_mul' _ _ + (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ENNReal.ofReal_ne_top))] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hn : 0≤(2080000*C)*(cappedRepresentative (k 1)/(w*(cappedRepresentative (k 2))^2)) := by positivity + simp only [←mul_assoc] + rw [←ENNReal.ofReal_mul hn,←ENNReal.ofReal_mul (mul_nonneg hn (norm_nonneg _)), + ←ENNReal.ofReal_mul (mul_nonneg (mul_nonneg hn (norm_nonneg _)) hr)] + exact ENNReal.ofReal_le_ofReal (F.bulkReceiver_pointwise hs zX hw Q (Icc_subset_Icc ha hb) W hW hC0 hC k hsmall hz hv) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.bulkReceiver_selected_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (hw : 0representativeReceiverCost s F zX w k a b (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)) k) := by + let Q := bulkSelection P M A w I + let R := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + let g := fun p=>ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneReceiverCutoffTangent s F.flow zX) W (Icc a b) p‖ + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hg : Measurable g := + (F.partialCutoffTriangle_measurable hs zX Q (F.coneReceiverCutoffTangent_continuousOn hs zX) hW measurableSet_Icc).norm.ennreal_ofReal + have hc : ∀p,g p≠0→∃k∈R,p∈physicalBinPhaseSet + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b) := by + intro p hp + have hpn : partialCutoffTriangle s F.flow zX T Q (coneReceiverCutoffTangent s F.flow zX) W (Icc a b) p≠0 := by + intro h; apply hp; simp only [g,h,norm_zero,ENNReal.ofReal_zero] + obtain ⟨ht,htT,hσ,hbandPrefix,hv,hd⟩ := F.partialCutoffTriangle_physical_nonzero + zX Q _ W (Icc_subset_Icc ha hb) hband hP hpn + have hr : 0(prefixFlow F.flow T zX time).2) + (n:=p.1.2.2) ht ⟨hσ.1,hσ.2.le⟩ hbandPrefix hpositive⟩ + apply (physicalBinPhase_cover_lintegral hV measurableSet_Icc T w R hg hc).trans + rw [←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · rw [indicator_of_mem hk,indicator_of_mem hk] + exact F.bulkReceiver_bin_integral hs hT zX hw Q ha hb W hW1 hC0 hC k hk.1.2.2 + · rw [indicator_of_notMem hk,indicator_of_notMem hk,mul_zero] + +lemma Admissible.bulk_receiver_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,0ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) ha hb hw hwP hI hIP hg + (fun _=>ENNReal.ofReal_ne_top) + apply (F.bulkReceiver_selected_sum hs.energyPrefix hT zX (zero_lt_one.trans_le hw) + ha hb hband hphysical hW hW1 hCd hder).trans + apply (mul_le_mul' le_rfl hbnd).trans + rw [←mul_assoc,←ENNReal.ofReal_mul (by positivity : 0≤2080000*Cd)] + exact le_of_eq (by congr 2; ring) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BulkSpatialUniform.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkSpatialUniform.lean new file mode 100644 index 0000000000000000000000000000000000000000..e370e95d396dd98c97254e27279f47f81f2f303e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkSpatialUniform.lean @@ -0,0 +1,230 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +def bulkSpatialBoundary (P M A w I : ℝ) : Set (Fin 4→ℕ) := + {k | k∈centralIndexSector P ∧ + (cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) ∨ + representativeSpatialTransition P M A w I k)} + +lemma Admissible.bulk_spatial_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'k : Fin 4→ℕ,(bulkSpatialBoundary P M A w I).indicator + (fun k=>representativeSpatialCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hstruct⟩ := hd.spatial_structural_uniform T₀ + obtain ⟨Ct,hCt,htrans⟩ := hd.spatial_transition_uniform T₀ + refine ⟨Cs+Ct,add_nonneg hCs hCt,?_⟩ + intro M A hM hA + filter_upwards [htrans M A hM hA] with P htr + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource HZ + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let fs := fun k=>representativeSpatialCost s F zX w k a b + let Qs := {k | k∈centralIndexSector P ∧ cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)} + let Qt := {k | k∈centralIndexSector P ∧ representativeSpatialTransition P M A w I k} + have hBs : (∑'k,Qs.indicator fs k)≤ENNReal.ofReal (Cs*B) := + hstruct M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + have hBt : (∑'k,Qt.indicator fs k)≤ENNReal.ofReal (Ct*B) := + htr hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource HZ + change (∑'k,(bulkSpatialBoundary P M A w I).indicator fs k)≤ENNReal.ofReal ((Cs+Ct)*B) + calc + _≤∑'k,(Qs.indicator fs k+Qt.indicator fs k) := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈bulkSpatialBoundary P M A w I + · rw [indicator_of_mem hk] + rcases hk.2 with h|h + · have hh : k∈Qs := ⟨hk.1,h⟩ + rw [indicator_of_mem hh] + exact le_add_of_nonneg_right bot_le + · have hh : k∈Qt := ⟨hk.1,h⟩ + rw [indicator_of_mem hh] + exact le_add_of_nonneg_left bot_le + · rw [indicator_of_notMem hk]; exact bot_le + _=(∑'k,Qs.indicator fs k)+(∑'k,Qt.indicator fs k) := ENNReal.tsum_add + _≤ENNReal.ofReal (Cs*B)+ENNReal.ofReal (Ct*B) := add_le_add hBs hBt + _=_ := by + have hB : 0≤B := by dsimp [B]; positivity + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (mul_nonneg hCt hB)] + congr 1; ring + +lemma PhaseFlowOn.bulkGeometry_pointwise {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {J : Set ℝ} (hJT : J⊆Icc 0 T) + (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈J,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (k : Fin 4→ℕ) (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) + {z : ConeCoordinate} (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) {v : Vec} + (hv : v∈coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2)) : + ‖partialCutoffTriangle s F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX) W J (z,v)‖≤ + (650000*C*(cappedRepresentative (k 2)/cappedRepresentative (k 1)))* + s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have ht := hJT hz.1 + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans ht.2⟩ + have hf := hs.nonnegative _ hσ ((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v) + by_cases hp : (z,v)∈trianglePhaseDomain T + · have heq : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq ht] + rw [heq] at hv ⊢ + have he := normalised_partial_kernel_eq (sub_pos.mpr hp.2.2).ne' + (cone_denom_pos v z.2.2.1 (sphere_norm z.2.2)).ne' + (ContinuousLinearMap.id ℝ Vec) + (f:=s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))) + (D:=1-dot z.2.2.1 (velocity (F.flow zX z.1).2)) + (l:=fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffGeometryTangent (z.1-z.2.1) + ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) + (a:=velocity (F.flow zX z.1).2) + have htriangle : triangleConeKernel s F.flow zX T + (normalisedPartialCutoff F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX)) (z,v)= + (z.1-z.2.1)^2 • ((s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))* + (1-dot z.2.2.1 (velocity (F.flow zX z.1).2))/((z.1-z.2.1)*(1-dot z.2.2.1 (velocity v)))* + fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffGeometryTangent (z.1-z.2.1) + ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) • + signedPrimitive (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1) := by + simpa only [triangleConeKernel,indicator_of_mem hp,normalisedPartialCutoff, + coneGeometryCutoffTangent,coneCutoffRate,coneCutoffState,triangleKernelState,cutoffGeometryTangent, + ContinuousLinearMap.id_apply] using he + have hD : 1-dot z.2.2.1 (velocity (F.flow zX z.1).2)∈ + Icc ((cappedRepresentative (k 2))^2/2) (8*(cappedRepresentative (k 2))^2) := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.2 + have hb := unprojected_geometry_bin_cost (T:=T) hC0 hC (sphere_norm z.2.2) + (sub_pos.mpr hp.2.2) (by simpa only [heq] using hf) (cappedRepresentative_pos _) + (cappedRepresentative_pos _) hsmall hv.2.1 hD Q + rw [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1] + calc + _≤‖triangleConeKernel s F.flow zX T + (normalisedPartialCutoff F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX)) (z,v)‖ := by + exact ((W z.1).le_opNorm _).trans (by simpa using mul_le_mul_of_nonneg_right (hW _ hz.1) (norm_nonneg _)) + _≤_ := by rw [htriangle,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)]; exact hb + · rw [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1] + simp only [triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero] + exact mul_nonneg (by positivity) hf + +lemma PhaseFlowOn.bulkGeometry_bin_integral {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {a b : ℝ} (ha : 0≤a) (hb : b≤T) + (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈Icc a b,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (k : Fin 4→ℕ) (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) : + (∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneGeometryCutoffTangent s F.flow zX) W (Icc a b) (z,v)‖ + ∂volume ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal (650000*C)*representativeSpatialCost s F zX w k a b := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + rw [representativeSpatialCost,←mul_assoc,←ENNReal.ofReal_mul (by positivity : 0≤650000*C)] + unfold representativeCentralCost + dsimp only + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_physicalBinBase hV _ measurableSet_Icc) + intro z hz + unfold physicalBinDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + rw [←ENNReal.ofReal_mul (by positivity : 0≤650000*C*(cappedRepresentative (k 2)/cappedRepresentative (k 1)))] + exact ENNReal.ofReal_le_ofReal (F.bulkGeometry_pointwise hs zX Q (Icc_subset_Icc ha hb) W hW hC0 hC k hsmall hz hv) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.bulkGeometry_spatial_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {a b : ℝ} (ha : 0≤a) (hb : b≤T) + (hband : ∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) (hW1 : ∀t∈Icc a b,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) : + (∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T (bulkSelection P M A w I) + (coneGeometryCutoffTangent s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (650000*C)*(∑'k : Fin 4→ℕ,(bulkSpatialBoundary P M A w I).indicator + (fun k=>representativeSpatialCost s F zX w k a b) k) := by + let Q := bulkSelection P M A w I + let R := bulkSpatialBoundary P M A w I + let g := fun p=>ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneGeometryCutoffTangent s F.flow zX) W (Icc a b) p‖ + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hg : Measurable g := + (F.partialCutoffTriangle_measurable hs zX Q (F.coneGeometryCutoffTangent_continuousOn hs zX) hW measurableSet_Icc).norm.ennreal_ofReal + have hc : ∀p,g p≠0→∃k∈R,p∈physicalBinPhaseSet + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b) := by + intro p hp + have hpn : partialCutoffTriangle s F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX) W (Icc a b) p≠0 := by + intro h; apply hp; simp only [g,h,norm_zero,ENNReal.ofReal_zero] + obtain ⟨k,hk,hr,hpk⟩ := F.bulkCutoffTriangle_support zX _ W (Icc_subset_Icc ha hb) hband hP hpn + exact ⟨k,⟨hk,hr⟩,hpk⟩ + apply (physicalBinPhase_cover_lintegral hV measurableSet_Icc T w R hg hc).trans + rw [←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · rw [indicator_of_mem hk,indicator_of_mem hk] + exact F.bulkGeometry_bin_integral hs hT zX Q ha hb W hW1 hC0 hC k hk.1.2.2 + · rw [indicator_of_notMem hk,indicator_of_notMem hk,mul_zero] + +lemma Admissible.bulk_geometry_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ W : ℝ→Vec→L[ℝ]Vec,Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T (bulkSelection P M A w I) + (coneGeometryCutoffTangent s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hspatial⟩ := hd.bulk_spatial_uniform T₀ + obtain ⟨Cd,hCd,hder⟩ := dyadicFactor_log_derivative_bound + refine ⟨650000*Cd*Cs,by positivity,?_⟩ + intro M A hM hA + filter_upwards [hspatial M A hM hA] with P hsp + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource hphysical hband HZ W hW hW1 + apply (F.bulkGeometry_spatial_sum hs.energyPrefix hT zX ha hb hband hphysical hW hW1 hCd hder).trans + apply (mul_le_mul' le_rfl (hsp hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource HZ)).trans + rw [←ENNReal.ofReal_mul (by positivity : 0≤650000*Cd)] + exact le_of_eq (congrArg ENNReal.ofReal (by ring)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BulkTestWeight.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkTestWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..64520a95339a417b79f260edf4efd6edc62718e2 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkTestWeight.lean @@ -0,0 +1,162 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates +import OAI.Analysis.VlasovMaxwell.Population.BulkWeightCost +import OAI.Analysis.VlasovMaxwell.Retarded.DirectLorentzUniform + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma bounded_supported_test_mass {a b T : ℝ} {ψ : ℝ→ℝ} + (hab : a≤b) (hψ : Continuous ψ) (hψ1 : ∀t,|ψ t|≤1) + (hout : ∀t∉Icc a b,ψ t=0) : (∫t in Ioo (0:ℝ) T,|ψ t|)≤b-a := by + have hs : tsupport ψ⊆Icc a b := by + apply closure_minimal _ isClosed_Icc + intro t ht + by_contra hn + exact ht (hout t hn) + have hc : HasCompactSupport ψ := isCompact_Icc.of_isClosed_subset (isClosed_tsupport ψ) hs + have hi : Integrable ψ := hψ.integrable_of_hasCompactSupport hc + have hone : Integrable ((Icc a b).indicator (fun _ : ℝ=>(1:ℝ))) := + (integrableOn_const (measure_Icc_lt_top.ne)).integrable_indicator measurableSet_Icc + calc + _≤∫t : ℝ,|ψ t| := setIntegral_le_integral hi.norm (ae_of_all _ (fun t=>abs_nonneg _)) + _≤∫t : ℝ,(Icc a b).indicator (fun _ : ℝ=>(1:ℝ)) t := by + apply integral_mono hi.norm hone + intro t + by_cases ht : t∈Icc a b + · rw [indicator_of_mem ht]; exact hψ1 t + · simp [indicator_of_notMem ht,hout t ht] + _=b-a := by rw [integral_indicator measurableSet_Icc, integral_const]; simp [hab] + +lemma directionWeight_test {a b ℓ η I T : ℝ} (hη : 0<η) (hI : 0by rw [abs_of_nonneg (directionWeight_bounds hl hlen).1]; exact (directionWeight_bounds hl hlen).2, + fun t ht=>image_eq_zero_of_notMem_tsupport (fun hh=>ht (directionWeight_tsupport hl hlen hh)),?_, + fun t ht=>directionWeight_deriv_outside hl hlen ht,?_⟩ + · intro t ht + have hd := norm_deriv_le_of_lipschitz (x₀:=t) (directionWeight_lipschitz a b ℓ) + simp only [Real.norm_eq_abs,NNReal.coe_add,coe_nnnorm,abs_of_pos (inv_pos.mpr hl)] at hd + calc + _≤ℓ⁻¹+ℓ⁻¹ := hd + _=2/ℓ := by ring + _≤2/(η*I) := div_le_div_of_nonneg_left (by norm_num) (mul_pos hη hI) hℓ + _=(2/η)/I := by ring + · by_cases ht : T=b + · rw [ht]; exact (directionWeight_endpoints hl hlen).2 + · exact image_eq_zero_of_notMem_tsupport (fun hh=>ht (le_antisymm (directionWeight_tsupport hl hlen hh).2 hb)) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma ofReal_norm_three_add (u v w : Vec) : + ENNReal.ofReal ‖u+v+w‖≤ENNReal.ofReal ‖u‖+ENNReal.ofReal ‖v‖+ENNReal.ofReal ‖w‖ := by + rw [←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _), + ←ENNReal.ofReal_add (add_nonneg (norm_nonneg _) (norm_nonneg _)) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal ((norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl)) + +lemma Admissible.selected_force_residual_uniform {d : Datum} (hd : Admissible d) (T₀ D : ℝ) (hD : 0≤D) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (ψ : ℝ→ℝ) (Lψ : NNReal), LipschitzWith Lψ ψ → (∀t,|ψ t|≤1) → + (∀t∉Icc a b,ψ t=0) → (∀t∈Icc a b,|deriv ψ t|≤D/I) → + (∀t∉Icc a b,deriv ψ t=0) → ψ T=0 → + ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖ ≤ + ENNReal.ofReal ((4*Real.pi)⁻¹) * + (ENNReal.ofReal ‖∫p : ℝ×Phase,unselectedLabelSignedForce s F.flow zX T + (bulkSelection P M A w I) ψ p‖+ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w))+ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)) := by + obtain ⟨Cb,hCb,hcost⟩ := hd.bulk_signed_cost_uniform T₀ D hD + obtain ⟨Ci,hCi,hinit⟩ := selectedInitialKernel_integrable_bound hd.1.continuous hd.2.1 hd.2.2.1 + let C := Ci*(max 0 T₀)+Cb + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hcost M A hM hA] with P hco + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ Lψ hψ hψ1 hout hψd hdout hψT + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let K := ∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖ + let Q := bulkSelection P M A w I + let Id : ℝ→Vec→L[ℝ]Vec := fun _=>ContinuousLinearMap.id ℝ Vec + have hB : 0≤B := by dsimp [B]; positivity + have hIB : I≤B := by + have hi : I≤Real.sqrt I := by nlinarith [Real.sq_sqrt hI.le,Real.sqrt_nonneg I] + calc + I≤Real.sqrt I := hi + _≤P*Real.sqrt I := le_mul_of_one_le_left (Real.sqrt_nonneg I) hP + _≤B := le_add_of_nonneg_right (by positivity) + have hc := hco hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ hψ.continuous.measurable hψ1 hout hψd hdout + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + have hi := (hinit s.E s.B T F zX Q ψ Id 1 hT zero_le_one hψ.continuous.continuousOn + continuous_const.continuousOn (fun _ _=>ContinuousLinearMap.norm_id_le)).2 + rw [mul_one] at hi + have hmass := (bounded_supported_test_mass hab hψ.continuous hψ1 hout (T:=T)).trans hJI + have hi' : ‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ Id z‖≤Ci*(max 0 T₀)*B := by + rw [hdata] + apply hi.trans + apply (mul_le_mul_of_nonneg_left hmass (mul_nonneg hCi hT)).trans + apply mul_le_mul + · exact mul_le_mul_of_nonneg_left (hTT.trans (le_max_right _ _)) hCi + · exact hIB + · exact hI.le + · positivity + have he := hs.selected_multiplier_decomposition hT F zX Q hψ (fun t _=>hψ1 t) hψT + (W:=Id) (W':=fun _=>0) continuous_const continuous_const (fun t _=>hasDerivAt_const t _) + simp only [Id,ContinuousLinearMap.id_apply] at he + rw [he,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (mul_pos (by norm_num) Real.pi_pos)), + ENNReal.ofReal_mul (by positivity : 0≤(4*Real.pi)⁻¹)] + apply mul_le_mul' le_rfl + have hn := ofReal_norm_three_add + (∫p : ℝ×Phase,unselectedLabelSignedForce s F.flow zX T Q ψ p) + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ Id z) + (∫p : ℝ×Phase,selectedMultiplierCosts s F.flow zX T Q ψ Id (fun _=>0) p) + apply (hn.trans (add_le_add (add_le_add le_rfl (ENNReal.ofReal_le_ofReal hi')) hc)).trans + have heq : ENNReal.ofReal (Ci*(max 0 T₀)*B)+ENNReal.ofReal (Cb*B)=ENNReal.ofReal (C*B) := by + rw [←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + dsimp [C] + ring + change _≤ENNReal.ofReal ‖∫p : ℝ×Phase,unselectedLabelSignedForce s F.flow zX T Q ψ p‖+ + ENNReal.ofReal (C*B)+ENNReal.ofReal (C*w^(-1/2:ℝ))*K + rw [add_assoc,←add_assoc (ENNReal.ofReal (Ci*(max 0 T₀)*B)),heq,←add_assoc] + apply add_le_add le_rfl + apply mul_le_mul' _ le_rfl + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_right (by dsimp [C]; nlinarith [mul_nonneg hCi (le_max_left (0:ℝ) T₀)]) + (Real.rpow_nonneg (zero_le_one.trans hw) _) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/BulkWeightCost.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkWeightCost.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a13e903a45393d040732269a1b80b45230f2d3d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/BulkWeightCost.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates +import OAI.Analysis.VlasovMaxwell.Population.SelectedRemainder + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma labelConeKernel_const_smul (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T c : ℝ) (A : ConeKernelState→Vec) (p : ℝ×Phase) : + labelConeKernel s α zX T (fun x=>c • A x) p=c • labelConeKernel s α zX T A p := by + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,indicator_of_mem hp] + simp only [smul_smul] + congr 1 + ring + · simp only [labelConeKernel,indicator_of_notMem hp,smul_zero] + +lemma PhaseFlowOn.selected_weight_cost_bound {s : Solution} {T I D a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (Q : Set (Fin 4→ℕ)) (hI : 0ContinuousLinearMap.id ℝ Vec) p)≤ + ENNReal.ofReal D*(∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q + (fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) + (fun _=>ContinuousLinearMap.id ℝ Vec) (Icc a b) p‖ ∂trianglePhaseMeasure) := by + have ht := F.selectedConeTriangle_norm_transfer (J:=Icc a b) + (A:=fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) + hs hT zX Q ((continuousOn_const : ContinuousOn (fun _ : ConeKernelState=>I⁻¹) (coneKernelInterior T)).smul + ((F.normalisedRatePrimitive_continuousOn zX).mono inter_subset_left)) + (W:=fun _=>ContinuousLinearMap.id ℝ Vec) measurable_const measurableSet_Icc + rw [←ht,←lintegral_const_mul' _ _ (ENNReal.ofReal_ne_top)] + apply lintegral_mono + intro p + let τ := labelReceiverTime F.flow zX T p + by_cases hp : τ∈Icc a b + · simp only [selectedMultiplierWeightDensity,ContinuousLinearMap.id_apply, + labelWeight,←smul_smul, norm_smul,Real.norm_eq_abs] + rw [indicator_of_mem hp,ContinuousLinearMap.id_apply,labelConeKernel_const_smul, + ←F.actualLabelRatePrimitive_eq s zX,smul_comm (labelSelectedCutoff F.flow zX T Q p), + norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hI), + ENNReal.ofReal_mul (inv_nonneg.mpr hI.le)] + rw [ENNReal.ofReal_mul (abs_nonneg _)] + apply (mul_le_mul' (ENNReal.ofReal_le_ofReal (hψd τ hp)) le_rfl).trans_eq + rw [div_eq_mul_inv,ENNReal.ofReal_mul hD,mul_assoc,norm_smul,Real.norm_eq_abs] + · have hz := hψout τ hp + change deriv ψ (labelReceiverTime F.flow zX T p)=0 at hz + simp only [selectedMultiplierWeightDensity,labelWeight,hz,zero_mul,zero_smul, + ContinuousLinearMap.id_apply,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma selected_bulk_weight_le (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) {a b : ℝ} {ψ : ℝ→ℝ} + (hψ : ∀t,|ψ t|≤1) (hout : ∀t∉Icc a b,ψ t=0) (p : ℝ×Phase) : + ENNReal.ofReal |ψ (labelReceiverTime α zX T p)| * + selectedMultiplierBulkDensity s α zX T Q (fun _=>ContinuousLinearMap.id ℝ Vec) p ≤ + selectedMultiplierBulkDensity s α zX T Q + ((Icc a b).indicator (fun _=>ContinuousLinearMap.id ℝ Vec)) p := by + by_cases hp : labelReceiverTime α zX T p∈Icc a b + · simp only [selectedMultiplierBulkDensity,indicator_of_mem hp,ContinuousLinearMap.id_apply] + have hb : ENNReal.ofReal |ψ (labelReceiverTime α zX T p)|≤1 := by + simpa only [ENNReal.ofReal_one] using (ENNReal.ofReal_le_ofReal (hψ (labelReceiverTime α zX T p))) + exact (mul_le_mul' hb le_rfl).trans_eq (one_mul _) + · rw [hout _ hp,abs_zero,ENNReal.ofReal_zero,zero_mul] + exact bot_le + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.bulk_signed_cost_uniform {d : Datum} (hd : Admissible d) (T₀ D : ℝ) (hD : 0≤D) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ ψ : ℝ→ℝ, Measurable ψ → (∀t,|ψ t|≤1) → + (∀t∉Icc a b,ψ t=0) → (∀t∈Icc a b,|deriv ψ t|≤D/I) → + (∀t∉Icc a b,deriv ψ t=0) → + ENNReal.ofReal ‖∫p : ℝ×Phase,selectedMultiplierCosts s F.flow zX T + (bulkSelection P M A w I) ψ (fun _=>ContinuousLinearMap.id ℝ Vec) (fun _=>0) p‖ ≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w))+ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := by + obtain ⟨Cb,hCb,hbulk⟩ := hd.bulk_selected_family_uniform T₀ + obtain ⟨Cr,hCr,hrate⟩ := hd.bulk_rate_uniform T₀ + let C := D*Cr+Cb + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hbulk M A hM hA] with P hbu + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ hψ hψ1 hout hψd hdout + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let K := ∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖ + let Q := bulkSelection P M A w I + let Id : ℝ→Vec→L[ℝ]Vec := fun _=>ContinuousLinearMap.id ℝ Vec + have hId : ∀t∈Icc a b,‖Id t‖≤1 := fun _ _=>ContinuousLinearMap.norm_id_le + have hB : 0≤B := by dsimp [B]; positivity + have hbc := hbu hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ Id measurable_const hId + have hrc := hrate M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP HZ hphysical hband Id measurable_const hId + have hwc := (F.selected_weight_cost_bound hs.energyPrefix hT zX Q hI hD hψd hdout).trans + (mul_le_mul' le_rfl hrc) + have hbl := (lintegral_mono (selected_bulk_weight_le s F.flow zX T Q hψ1 hout)).trans hbc + have hc := F.selectedMultiplierCosts_integral_bound hs.energyPrefix zX Q hψ + (W:=Id) (W':=fun _=>0) measurable_const + have hz : (∫⁻p : ℝ×Phase,selectedMultiplierMovingDensity s F.flow zX T Q ψ (fun _=>0) p)=0 := by + simp only [selectedMultiplierMovingDensity,zero_apply,norm_zero,ENNReal.ofReal_zero,lintegral_zero] + rw [hz,add_zero] at hc + apply (hc.trans (add_le_add hwc hbl)).trans + change ENNReal.ofReal D*ENNReal.ofReal (Cr*B)+(ENNReal.ofReal (Cb*B)+ENNReal.ofReal (Cb*w^(-1/2:ℝ))*K)≤_ + rw [←ENNReal.ofReal_mul hD,←add_assoc,←ENNReal.ofReal_add (by positivity) (by positivity)] + have he : D*(Cr*B)+Cb*B=C*B := by dsimp [C]; ring + rw [he] + exact add_le_add le_rfl (mul_le_mul' (ENNReal.ofReal_le_ofReal + (mul_le_mul_of_nonneg_right (by dsimp [C]; nlinarith [mul_nonneg hD hCr]) (Real.rpow_nonneg (zero_le_one.trans hw) _))) le_rfl) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/CappedRepresentativePos.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/CappedRepresentativePos.lean new file mode 100644 index 0000000000000000000000000000000000000000..24c717ddcdf42e9e1861b4561dddc2003111783b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/CappedRepresentativePos.lean @@ -0,0 +1,692 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalDirectTransportDensity + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma cappedRepresentative_pos (n : ℕ) : 0 < cappedRepresentative n := by + dsimp [cappedRepresentative] + positivity + +lemma cappedRepresentative_le_one (n : ℕ) : cappedRepresentative n ≤ 1 := by + exact pow_le_one₀ (by norm_num) (by norm_num) + +lemma Admissible.geometry_cutoff_baseline_bin {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (k : Fin 4→ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 → + 32 ≤ cappedRepresentative (k 2)*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative (k 2)+ + Real.sqrt (A*L/cappedRepresentative (k 2))))⁻¹^2 → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V B T w Q z ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E))* + min (ENNReal.ofReal (I*p^3*θ*φ^4*r)) + (ENNReal.ofReal ((1+I/len)/(p*θ*r))) := by + obtain ⟨Cρ,hCρ,hdensity⟩ := hd₀.uniform_physicalBinDensity_constant + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + let C : ℝ := 10^18*c*(1+Cρ) + refine ⟨C,by dsimp [C]; positivity,?_⟩ + intro s T F hs hT h0 zX S Q k a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable hband HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let B := representativeClosedBin T w k + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hθ : 0 < θ := cappedRepresentative_pos _ + have hφ : 0 < φ := cappedRepresentative_pos _ + have hr : 0 < r := mul_pos (zero_lt_one.trans_le (le_max_left _ _)) (cappedRepresentative_pos _) + have hBmax : B.rmax=2*r := by dsimp [B,representativeClosedBin,r]; ring + have hBmin : B.rmin=r/2 := rfl + have hBDmin : B.Dmin=φ^2/2 := rfl + have hI : 0 < I := hlen.trans_le hlenI + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdsmall : B.dmax ≤ φ^2/32 := by + change 8*θ^2 ≤ φ^2/32 + have hh : θ ≤ φ/16 := hsmall + have hh2 := sq_le_sq₀ hθ.le (by positivity : 0 ≤ φ/16) |>.mpr hh + nlinarith + have hBD : B.dmax ≤ B.Dmin := by change 8*θ^2 ≤ φ^2/2; have hdc : 8*θ^2 ≤ φ^2/32 := hdsmall; nlinarith only [hdc,sq_nonneg φ] + have hden : ∀z∈physicalBinBase V B (Icc a b), + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ≤ ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + intro z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ + have hn := hdensity s T F hs h0 X V B z.1 z.2.1 z.2.2 p θ 1 hzT hp.le hθ.le (by norm_num) + (by change p/32 ≤ p; linarith only [hp]) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ ≤ 1 from cappedRepresentative_le_one (k 1))] using hn + have hnearfar := F.geometry_cutoff_near_far hs hT zX B hS hS0 hJ hc hcut hw hθ hφ.le hBD + (by change 0 < r/2; positivity) (by change 0 < φ^2/2; positivity) le_rfl le_rfl hband Q hden + have hbudget := F.closedEulerian_baseline_budget hs hT zX B hS (k 0) (k 2) + (by rfl : p=64*(2:ℝ)^(k 0)) (by rfl : φ=(2:ℝ)⁻¹^(k 2)) ha hb hlen hlenI hab + hM hA hP hL hm hφ (cappedRepresentative_le_one _) hCs hstable le_rfl le_rfl hmq hmw + (by change 0 < r/2; positivity) (by rw [hBmax]; positivity) hdsmall le_rfl le_rfl + (by change 4 ≤ φ*(w/8); have hh : 32 ≤ φ*w := hwφ; nlinarith only [hh]) HX HZ + have hvol : volume (Icc a b) ≤ ENNReal.ofReal I := by + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hab + let near := I*p^3*θ*φ^4*r + let far := (1+I/len)/(p*θ*r) + have hn0 : 0 ≤ near := by dsimp only [near]; positivity + have hf0 : 0 ≤ far := by dsimp only [far]; positivity + have hn : ENNReal.ofReal (78400000*c*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) ≤ + ENNReal.ofReal (C*(1+E))*ENNReal.ofReal near := by + calc + _ ≤ ENNReal.ofReal (78400000*c*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by gcongr + _ = ENNReal.ofReal (5780275200000*c*Cρ*near) := by + rw [hBmax,hBmin] + rw [←ENNReal.ofReal_mul (by positivity : 0 ≤ I), + ←ENNReal.ofReal_mul (mul_nonneg hI.le (by linarith : 0 ≤ 2*r-r/2)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 78400000*c*φ^2/θ), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ (78400000*c*φ^2/θ)*(128*Cρ*p^3*θ^2))] + congr 1 + change (78400000*c*φ^2/θ)*(128*Cρ*p^3*θ^2)*(I*(2*r-r/2)*(384*φ^2))=_ + dsimp only [near] + field_simp [hθ.ne',hp.ne',hr.ne',hφ.ne',hlen.ne'] + ring + _ ≤ ENNReal.ofReal (C*(1+E)*near) := by + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ hn0 + dsimp [C] + have ha : 5780275200000*c*Cρ ≤ 10^18*c*(1+Cρ) := by + nlinarith only [hc,mul_nonneg hc hCρ] + exact ha.trans (le_mul_of_one_le_right (by positivity) (by linarith only [hE])) + _ = _ := ENNReal.ofReal_mul (by dsimp [C]; positivity) + have hf : ENNReal.ofReal (78400000*c*φ^2/θ)* + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin)) ≤ + ENNReal.ofReal (C*(1+E))*ENNReal.ofReal far := by + calc + _ ≤ ENNReal.ofReal (78400000*c*φ^2/θ)* + ((ENNReal.ofReal (35512320*B.rmax/p*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin)) := by gcongr + _ = ENNReal.ofReal (44546654208000000*c*E*far) := by + rw [hBmax,hBmin,hBDmin] + rw [←ENNReal.ofReal_mul (by positivity : 0 ≤ 35512320*(2*r)/p*(1+I/len)), + ←ENNReal.ofReal_div_of_pos (by positivity : 0 < (r/2)^2*(φ^2/2)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 78400000*c*φ^2/θ)] + congr 1 + dsimp only [far] + field_simp [hθ.ne',hp.ne',hr.ne',hφ.ne',hlen.ne'] + ring + _ ≤ ENNReal.ofReal (C*(1+E)*far) := by + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ hf0 + have hcC : 44546654208000000*c ≤ C := by + dsimp [C] + nlinarith only [hc,mul_nonneg hc hCρ] + calc + _ ≤ C*E := mul_le_mul_of_nonneg_right hcC hE + _ ≤ C*(1+E) := by + have hC : 0 ≤ C := by dsimp [C]; positivity + exact mul_le_mul_of_nonneg_left (le_add_of_nonneg_left (by norm_num : (0:ℝ) ≤ 1)) hC + _ = _ := ENNReal.ofReal_mul (by dsimp [C]; positivity) + apply hnearfar.trans + rw [mul_min] + exact min_le_min hn hf + +lemma geometry_radial_ennreal_sum {I len p θ φ H : ℝ} + (hI : 0min (I*p^3*θ*φ^4*(H*(2:ℝ)^k)) (R^2/(p*θ*(H*(2:ℝ)^k))) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := geometry_radial_balance hI hR hp hθ hφ hH + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ = ∑'n : ℕ,ENNReal.ofReal (g (-(n:ℤ))) := by + apply tsum_congr + intro n + rw [he] + simp only [g,hRsq,ENNReal.ofReal_min] + _ ≤ ∑'k : ℤ,ENNReal.ofReal (g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (g k)) + _ = ENNReal.ofReal (∑'k : ℤ,g k) := (ENNReal.ofReal_tsum_of_nonneg hg0 hg.1).symm + _ ≤ _ := ENNReal.ofReal_le_ofReal hg.2 + +lemma Admissible.geometry_cutoff_baseline_radial_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (np nθ nφ : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + cappedRepresentative nθ ≤ cappedRepresentative nφ/16 → + 32 ≤ cappedRepresentative nφ*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative nφ+ + Real.sqrt (A*L/cappedRepresentative nφ)))⁻¹^2 → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V (B nr) T w Q z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(6*Real.sqrt I*Real.sqrt (1+I/len)*p*φ^2)) := by + obtain ⟨C,hC,hbound⟩ := hd₀.geometry_cutoff_baseline_bin + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S Q np nθ nφ a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable hband HX HZ + dsimp only + have hI : 0 ring_nf + +lemma Admissible.projected_source_baseline_far {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb c : ℝ,0 ≤ Cg ∧ 0 ≤ Cb ∧ 0 ≤ c ∧ + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (k : Fin 4→ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 → + 32 ≤ cappedRepresentative (k 2)*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative (k 2)+ + Real.sqrt (A*L/cappedRepresentative (k 2))))⁻¹^2 → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + let mass := ENNReal.ofReal (568197120*E*(1+I/len)/(p*r*φ^2)) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (128*(3840+94080000*c)*φ^2/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)* + (ENNReal.ofReal (128*Cg*p^3*θ^2)*mass)^(1/2:ℝ))+ + ENNReal.ofReal (128*(3840+94080000*c)*φ/p)* + ((ENNReal.ofReal (40*(I+2*r)*E))^(1/2:ℝ)* + (ENNReal.ofReal (128*Cb*p^3*θ^2)*mass)^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,c,hCg,hCb,hc,hsource⟩ := hd₀.projected_source_two_budget_bound + refine ⟨Cg,Cb,c,hCg,hCb,hc,?_⟩ + intro s T F hs hT h0 zX S Q k a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable hband HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let B := representativeClosedBin T w k + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hθ : 0 < θ := cappedRepresentative_pos _ + have hφ : 0 < φ := cappedRepresentative_pos _ + have hr : 0 < r := mul_pos (zero_lt_one.trans_le (le_max_left _ _)) (cappedRepresentative_pos _) + have hBmax : B.rmax=2*r := by dsimp [B,representativeClosedBin,r]; ring + have hBmin : B.rmin=r/2 := rfl + have hBDmin : B.Dmin=φ^2/2 := rfl + have hI : 0 < I := hlen.trans_le hlenI + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdsmall : B.dmax ≤ φ^2/32 := by + change 8*θ^2 ≤ φ^2/32 + have ht : θ ≤ φ/16 := hsmall + nlinarith only [sq_le_sq₀ hθ.le (by positivity : 0 ≤ φ/16) |>.mpr ht] + have hbudget := F.closedEulerian_baseline_budget hs hT zX B hS (k 0) (k 2) + (by rfl : p=64*(2:ℝ)^(k 0)) (by rfl : φ=(2:ℝ)⁻¹^(k 2)) ha hb hlen hlenI hab + hM hA hP hL hm hφ (cappedRepresentative_le_one _) hCs hstable le_rfl le_rfl hmq hmw + (by change 0 < r/2; positivity) (by rw [hBmax]; positivity) hdsmall le_rfl le_rfl + (by change 4 ≤ φ*(w/8); dsimp [φ] at *; nlinarith only [hwφ]) HX HZ + have hmass : coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin) ≤ + ENNReal.ofReal (568197120*E*(1+I/len)/(p*r*φ^2)) := by + calc + _ ≤ (ENNReal.ofReal (35512320*B.rmax/p*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin) := by gcongr + _ = _ := by + rw [hBmax,hBmin,hBDmin,←ENNReal.ofReal_mul (by positivity : 0 ≤ 35512320*(2*r)/p*(1+I/len)), + ←ENNReal.ofReal_div_of_pos (by positivity : 0 < (r/2)^2*(φ^2/2))] + congr 1 + field_simp [hp.ne',hr.ne',hφ.ne',hlen.ne'] + ring + have hgood : ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hab) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ) ≤ 5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ + ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hab,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0 ≤ 1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ) ≤ 10), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 2*I)] + congr 1 + field_simp [hI.ne'] + ring + have hband' (t : ℝ) (ht : t∈Icc a b) : w/16 ≤ ‖V t‖ := by + simpa only [V,prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht + have hangle (D : ℝ) (hD : D∈Icc B.Dmin B.Dmax) : DyadicWindow 1 (k 2) (Real.sqrt (D/2)) := + dyadicWindow_one_sqrt (k 2) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.1) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.2) + have hn := hsource s T F hs hT h0 zX B S Q a b I w (p/128) p θ φ 1 1 (k 2) + hS hS0 hJ hI hw (by positivity) hp hθ hφ (by norm_num) + (by change 0 < r/2; positivity) (by change 0 < φ^2/2; positivity) + le_rfl (by change p/32 ≤ p; linarith only [hp]) le_rfl le_rfl le_rfl le_rfl + (by norm_num [B,representativeClosedBin]) (hdsmall.trans (by change φ^2/32 ≤ φ^2/2; nlinarith only [sq_nonneg φ])) + hangle hband' + dsimp only at hn + have hθ1 : θ ≤ 1 := cappedRepresentative_le_one _ + simp only [min_eq_left hθ1] at hn + have heqG : (3840+94080000*c)*φ^2/(p/128*θ^2)=128*(3840+94080000*c)*φ^2/(p*θ^2) := by ring + have heqB : (3840+94080000*c)*φ/(p/128)=128*(3840+94080000*c)*φ/p := by ring + rw [heqG,heqB] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact (min_le_right _ _).trans (mul_le_mul' le_rfl hmass) + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hmag (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact (min_le_right _ _).trans (mul_le_mul' le_rfl hmass) + +lemma Admissible.projected_source_baseline_radius_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0≤C ∧ + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (k : Fin 4→ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 → + 32 ≤ cappedRepresentative (k 2)*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative (k 2)+ + Real.sqrt (A*L/cappedRepresentative (k 2))))⁻¹^2 → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (C*E*(Real.sqrt I*Real.sqrt (1+I/len)*φ/(θ*Real.sqrt r)+ + 2*Real.sqrt (1+I/len)*θ)) := by + obtain ⟨Cg,Cb,c,hCg,hCb,hc,hsource⟩ := hd₀.projected_source_baseline_far + let K := 128*(3840+94080000*c) + let C := K*(Real.sqrt (20*(128*568197120*Cg))+Real.sqrt (40*(128*568197120*Cb))) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨C,by dsimp [C]; positivity,?_⟩ + intro s T F hs hT h0 zX S Q k a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable hband HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + max 1 T*cappedRepresentative (k 3)≤I → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let G := goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2) + let Hf := magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I (k 2) + let O := ENNReal.ofReal (491520*E*(1+φ/σ)*(1+I/len)/(p*r*φ^2)) + let H := ENNReal.ofReal (576*I*r*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (10240*φ/(p*θ^2))* + ((ENNReal.ofReal I*G)^(1/2:ℝ)*(min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (10240/p)* + ((ENNReal.ofReal (2*I)*Hf)^(1/2:ℝ)*(min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

representativeJointEnergy_nonneg _ _ _ _ _ _ _)).trans hbudget + rw [hs.initial_energy_eq,hJof] at ho + have hrad := shared_budget_radius_scalar hE hJ0 hJE hI hlam + change E+I/len*J≤(2+3469*E)*R^2 at hrad + rw [←ENNReal.ofReal_mul (by positivity : 0≤I/len), + ←ENNReal.ofReal_add hE (by positivity),←ENNReal.ofReal_mul (by change 0≤10240*(2*H*h)/p; positivity : 0≤10240*B.rmax/p)] at ho + apply ho.trans + apply ENNReal.ofReal_le_ofReal + change 10240*(2*H*h)/p*(E+I/len*J)≤C*h/p*R^2 + calc + _≤10240*(2*H*h)/p*((2+3469*E)*R^2) := mul_le_mul_of_nonneg_left hrad (by positivity) + _=(20480*H*(2+3469*E))*h/p*R^2 := by ring + _≤_ := by dsimp [C]; gcongr + +lemma Admissible.representative_central_large_shared {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeCentralCost s F zX w k a b≤ + ENNReal.ofReal (C*min (I*h*p^3*θ^2*φ^2) (R^2/(p*h*φ^2))) := by + obtain ⟨Cρ,hCρ,hden⟩ := hd.uniform_physicalBinDensity_constant + obtain ⟨Co,hCo,hocc⟩ := hd.representative_large_shared_occupation T₀ + let C := max (73728*Cρ*max 1 T₀) (8*Co) + have hC : 0≤C := (by positivity : 0≤73728*Cρ*max 1 T₀).trans (le_max_left _ _) + refine ⟨C,hC,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall hlarge HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let B := representativeClosedBin T w k + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hdensity (t r : ℝ) (n : Sphere) (hr : r∈Icc 0 T) : + physicalBinDensity s X V B t r n≤ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + have he := hden s T F hs.energyPrefix hs.initial_f X V B t r n p θ 1 hr hp.le hθ.le + (by norm_num : (0:ℝ)≤1) (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ≤1 from cappedRepresentative_le_one (k 1))] using he + have hn := physicalBin_density_near hα.snd.measurable B (J:=Icc a b) measurableSet_Icc hφ.le + (by rfl : B.Dmax≤8*φ^2) (fun z hz=>hdensity z.1 z.2.1 z.2.2 ⟨hz.2.1.1,hz.2.1.2.trans (hz.1.2.trans hb)⟩) + have hS0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + have he : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [he] + have hf := F.physicalBin_density_far hs.energyPrefix hT zX B hd.2.1 hS0 hJ + (representativeClosedBin_radius_pos T w k) (by change 0<φ^2/2; positivity) + have ho := hocc M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hlarge + rw [mul_min_of_nonneg _ _ hC,ENNReal.ofReal_min] + apply le_min + · apply hn.trans + calc + _≤ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + apply mul_le_mul' le_rfl + apply mul_le_mul' _ le_rfl + apply mul_le_mul' _ le_rfl + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hJI + _=ENNReal.ofReal ((73728*Cρ*H)*(I*h*p^3*θ^2*φ^2)) := by + change ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (2*H*h-H*h/2)*ENNReal.ofReal (384*φ^2))=_ + rw [←ENNReal.ofReal_mul hI.le,←ENNReal.ofReal_mul (mul_nonneg hI.le hdiff), + ←ENNReal.ofReal_mul (by positivity : 0≤128*Cρ*p^3*θ^2)] + exact congrArg ENNReal.ofReal central_near_scalar + _≤_ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right + ((mul_le_mul_of_nonneg_left hHH (by positivity)).trans (le_max_left _ _)) (by positivity)) + · apply hf.trans ((ENNReal.div_le_div_right ho _).trans ?_) + change ENNReal.ofReal (Co*h/p*R^2)/ENNReal.ofReal ((H*h/2)^2*(φ^2/2))≤_ + rw [←ENNReal.ofReal_div_of_pos (by positivity)] + apply ENNReal.ofReal_le_ofReal + exact (central_far_scalar hCo hH hh hp hφ).trans + (mul_le_mul_of_nonneg_right (le_max_right _ _) (by positivity)) + +def regularCentralIndex (P M A I w : ℝ) (k : Fin 4→ℕ) : Prop := + 512/min (sourceRepresentative (k 0)) w(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeRegularCentralCost s F zX P M A I w k a b≤ + ENNReal.ofReal (C*min (I*h*p^3*θ^2*φ^2) (R^2/(p*h*φ^2))) := by + classical + obtain ⟨Ca,hCa,ha⟩ := hd.representative_central_shared T₀ + obtain ⟨Cr,hCr,hr⟩ := hd.representative_central_large_shared T₀ + refine ⟨max Ca Cr,hCa.trans (le_max_left _ _),?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha0 hb hI hJI hw hsmall HZ + dsimp only + unfold representativeRegularCentralCost + split_ifs with h + · rcases h with h|h + · apply (ha M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha0 hb hI hJI hw hsmall h HZ).trans + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right (le_max_left _ _) + exact le_min (by dsimp [sourceRepresentative,cappedRepresentative]; positivity) (by dsimp [sourceRepresentative,cappedRepresentative]; positivity) + · apply (hr M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha0 hb hI hJI hw hsmall h HZ).trans + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right (le_max_right _ _) + exact le_min (by dsimp [sourceRepresentative,cappedRepresentative]; positivity) (by dsimp [sourceRepresentative,cappedRepresentative]; positivity) + · exact bot_le + +lemma capped_square_tail_sum {x : ℝ} (hx : 0cappedRepresentative n≤x) + have he : (∑n∈S,ENNReal.ofReal (if cappedRepresentative n≤x then (cappedRepresentative n)^2 else 0))= + ∑n∈U,ENNReal.ofReal ((cappedRepresentative n)^2) := by simp [U,Finset.sum_filter,apply_ite] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun n _=>sq_nonneg _)] + apply ENNReal.ofReal_le_ofReal + have hh := capped_positive_power_sum_unscaled hx (by norm_num : (0:ℝ)<2) U + (fun n hn=>(Finset.mem_filter.mp hn).2) + norm_num at hh + nlinarith [sq_nonneg x] + +lemma capped_fourth_tail_sum {x : ℝ} (hx : 0cappedRepresentative n≤x) + have he : (∑n∈S,ENNReal.ofReal (if cappedRepresentative n≤x then (cappedRepresentative n)^4 else 0))= + ∑n∈U,ENNReal.ofReal ((cappedRepresentative n)^4) := by simp [U,Finset.sum_filter,apply_ite] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun n _=>by positivity)] + apply ENNReal.ofReal_le_ofReal + have hh := capped_positive_power_sum_unscaled hx (by norm_num : (0:ℝ)<4) U + (fun n hn=>(Finset.mem_filter.mp hn).2) + norm_num at hh + nlinarith [sq_nonneg (x^2)] + +lemma small_deficit_stabilityLength {P M A p w φ : ℝ} + (hP : 0cappedRepresentative n≤x) + have he : (∑n∈S,ENNReal.ofReal (if cappedRepresentative n≤x then (cappedRepresentative n)^3 else 0))= + ∑n∈U,ENNReal.ofReal ((cappedRepresentative n)^3) := by simp [U,Finset.sum_filter,apply_ite] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun n _=>pow_nonneg (cappedRepresentative_pos n).le 3)] + apply ENNReal.ofReal_le_ofReal + have hh := capped_positive_power_sum_unscaled hx (by norm_num : (0:ℝ)<3) U + (fun n hn=>(Finset.mem_filter.mp hn).2) + norm_num at hh + nlinarith [pow_nonneg hx.le 3] + +lemma magnetic_low_radial_sum {I p θ φ : ℝ} (hI : 0 simp [←ENNReal.ofReal_mul hC] + congr 1 + ring + _≤ENNReal.ofReal (I*p^2*φ*K*Real.sqrt I)*ENNReal.ofReal (2*φ^2) := + mul_le_mul' le_rfl (capped_square_tail_sum hφ) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma magnetic_low_triple_sum {I p w : ℝ} (hI : 0 simp [←ENNReal.ofReal_mul hC] + _≤ENNReal.ofReal (2*K*I*Real.sqrt I*p^2)*ENNReal.ofReal (2*(512/min p w)^3) := + mul_le_mul' le_rfl (capped_cube_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma magnetic_low_coefficient {P p w : ℝ} (hP : 1≤P) (hp : 1≤p) + (hpP : p≤P) (hw : 1≤w) (hwP : w≤P) : + p^2*(512/min p w)^3≤512^3*P^2/w := by + have hP0 : 0

.mpr hpP) (by positivity) + _=512^3*(P^2/w^3) := by ring + _≤512^3*(P^2/w) := mul_le_mul_of_nonneg_left + (div_le_div_of_nonneg_left (sq_nonneg _) hw0 hww) (by norm_num) + _=_ := by ring + +lemma Admissible.representative_central_near {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hdensity (t r : ℝ) (n : Sphere) (hr : r∈Icc 0 T) : + physicalBinDensity s X V B t r n≤ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + have he := hden s T F hs.energyPrefix hs.initial_f X V B t r n p θ 1 hr hp.le hθ.le + (by norm_num : (0:ℝ)≤1) (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ≤1 from cappedRepresentative_le_one (k 1))] using he + have hn := physicalBin_density_near hα.snd.measurable B (J:=Icc a b) measurableSet_Icc hφ.le + (by rfl : B.Dmax≤8*φ^2) (fun z hz=>hdensity z.1 z.2.1 z.2.2 ⟨hz.2.1.1,hz.2.1.2.trans (hz.1.2.trans hb)⟩) + apply hn.trans + calc + _≤ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + apply mul_le_mul' le_rfl + apply mul_le_mul' _ le_rfl + apply mul_le_mul' _ le_rfl + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hJI + _=ENNReal.ofReal ((73728*Cρ*H)*(I*h*p^3*θ^2*φ^2)) := by + change ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (2*H*h-H*h/2)*ENNReal.ofReal (384*φ^2))=_ + rw [←ENNReal.ofReal_mul hI.le,←ENNReal.ofReal_mul (mul_nonneg hI.le hdiff), + ←ENNReal.ofReal_mul (by positivity : 0≤128*Cρ*p^3*θ^2)] + exact congrArg ENNReal.ofReal central_near_scalar + _≤_ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hHH (by positivity)) (by positivity)) + +lemma Admissible.representative_regular_central_double_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + (∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤φ/16 then + representativeRegularCentralCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt I*R*p*φ) := by + classical + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_central_shared T₀ + refine ⟨12*C,by positivity,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nf a b I w hzX ha hb hI hJI hw HZ + dsimp only + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_regular_central_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P hM hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hJI hw HZ + _=ENNReal.ofReal (Cc*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn hCc + simpa only [mul_assoc] using hh) + +lemma central_exception_radial_sum {P I p θ φ : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC] + congr 1 + ring + simp_rw [he] + rw [ENNReal.tsum_mul_left] + calc + _≤ENNReal.ofReal (I*p^3*θ^2*φ^2)*ENNReal.ofReal (2*(1/P^2)) := + mul_le_mul' le_rfl (capped_linear_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma central_exception_angle_radial_sum {P I p φ : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC] + congr 1 + ring + _≤ENNReal.ofReal (2*I*p^3/P^2*φ^2)*ENNReal.ofReal (2*φ^2) := + mul_le_mul' le_rfl (capped_square_tail_sum hφ) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma central_exception_triple_sum {P I p w : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC] + _≤ENNReal.ofReal (4*I*p^3/P^2)*ENNReal.ofReal (2*(512/min p w)^4) := + mul_le_mul' le_rfl (capped_fourth_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +noncomputable def representativeExceptionCentralCost {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (P M A I w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := by + classical + exact if regularCentralIndex P M A I w k then 0 else representativeCentralCost s F zX w k a b + +lemma central_cost_eq_regular_add_exception {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (P M A I w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : + representativeCentralCost s F zX w k a b= + representativeRegularCentralCost s F zX P M A I w k a b+ + representativeExceptionCentralCost s F zX P M A I w k a b := by + classical + simp only [representativeRegularCentralCost,representativeExceptionCentralCost] + split_ifs <;> simp + +lemma Admissible.representative_exception_central_triple_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0

ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt))) + _=ENNReal.ofReal Cn*(∑'nf : ℕ,if cappedRepresentative nf≤512/min p w then + ∑'nt : ℕ,if cappedRepresentative nt≤cappedRepresentative nf then + ∑'nr : ℕ,if cappedRepresentative nr≤1/P^2 then + ENNReal.ofReal (I*cappedRepresentative nr*p^3*(cappedRepresentative nt)^2*(cappedRepresentative nf)^2) + else 0 else 0 else 0) := by + simp only [ENNReal.tsum_mul_left] + congr 1 + apply tsum_congr + intro nf + split_ifs with hf + · apply tsum_congr + intro nt + split_ifs with ht <;> simp only [tsum_zero] + · simp only [tsum_zero] + _≤ENNReal.ofReal Cn*ENNReal.ofReal (8*I*p^3/P^2*(512/min p w)^4) := + mul_le_mul' le_rfl (central_exception_triple_sum hP hI.le hp hw) + _=_ := by rw [←ENNReal.ofReal_mul hCn]; congr 1; dsimp only [p]; ring + +lemma sourceRepresentative_one_le (n : ℕ) : 1 ≤ sourceRepresentative n := by + have h : (1:ℝ)≤2^n := one_le_pow₀ (by norm_num) + dsimp [sourceRepresentative] + nlinarith only [h] + +lemma Admissible.central_exception_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cn,hCn,hnear⟩ := hd.representative_exception_central_triple_sum T₀ + have hpc := pairCountConstant_pos + refine ⟨2*512^4*Cn*pairCountConstant,by positivity,?_⟩ + intro M A P hM hP hL s T F hs hT hTT zX a b I w ha hb hI hJI hw hwP + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeExceptionCentralCost s F zX P M A I w ![np,nt,nf,nr] a b else 0 + let D := 2*512^4*Cn*I*P^2/w + have hP0 : 0

∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + obtain ⟨N,hN,hidx⟩ := exists_small_pair_count hP hL + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have hsub : U⊆Finset.range N := by + intro np hn + have hpn : 1/sourceRepresentative np≤cappedRepresentative 0 := by + rw [show cappedRepresentative 0=1 by rfl] + exact (div_le_one (zero_lt_one.trans_le (sourceRepresentative_one_le _))).mpr (sourceRepresentative_one_le _) + exact Finset.mem_range.mpr (hidx np 0 (hU np hn) hpn).1 + have hcard : (U.card:ℝ)≤pairCountConstant*Real.log (2+P) := by + have hh : (U.card:ℝ)≤N := by exact_mod_cast (Finset.card_le_card hsub).trans_eq (Finset.card_range N) + exact hh.trans hN + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal D := Finset.sum_le_sum (fun np hn=>hgb np (hU np hn)) + _=ENNReal.ofReal ((U.card:ℝ)*D) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun _ _=>hD)] + simp + _≤ENNReal.ofReal ((pairCountConstant*Real.log (2+P))*D) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hcard hD) + _=_ := by congr 1; dsimp [D]; ring + +lemma Admissible.representative_spatial_near {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeSpatialCost s F zX w k a b≤ + ENNReal.ofReal (C*min (I*h*p^3*θ*φ^3) (R^2/(p*h*θ*φ))) := by + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_central_shared T₀ + refine ⟨C,hC,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall hreg HZ + dsimp only + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hbnd := hbound M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall HZ + dsimp only at hbnd + rw [representativeRegularCentralCost,ite_eq_left hreg] at hbnd + apply (mul_le_mul' le_rfl hbnd).trans + rw [←ENNReal.ofReal_mul (by positivity : 0≤cappedRepresentative (k 2)/cappedRepresentative (k 1))] + apply le_of_eq + congr 1 + rw [show cappedRepresentative (k 2)/cappedRepresentative (k 1)* + (C*min _ _) = C*((cappedRepresentative (k 2)/cappedRepresentative (k 1))*min _ _) by ring, + mul_min_of_nonneg _ _ (by positivity : 0≤cappedRepresentative (k 2)/cappedRepresentative (k 1))] + congr 2 <;> field_simp + +lemma Admissible.representative_spatial_pure_far {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + representativeSpatialCost s F zX w k a b≤ + ENNReal.ofReal (C*pureOccupationEnvelope P 512 16384 M A p w φ h I/(h^2*θ*φ)) := by + let E := datumEnergyNumber d + let K := 1000000000*(max 1 T₀)^2 + have hE : 0≤E := hd.datumEnergyNumber_nonneg + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨8*K*E,by positivity,?_⟩ + intro M A hM hA + filter_upwards [hd.representative_pure_occupation T₀ M A hM hA] with P hoccup + intro s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hsmall hsource HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let B := representativeClosedBin T w k + let μ := pureOccupationEnvelope P 512 16384 M A p w φ h I + have hp : 0

s.f (0,z))⊆tsupport d.f₀ by + have h0 : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [h0]) + (Icc_subset_Icc ha hb) (representativeClosedBin_radius_pos T w k) + (by change 0<φ^2/2; positivity) + have ho := hoccup s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hsmall hsource HZ + change _≤ENNReal.ofReal (K*μ)*ENNReal.ofReal E at ho + have hD : 0<(H*h)^2*φ^2/8 := by positivity + change representativeCentralCost s F zX w k a b≤ + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d.f₀) a b + (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ENNReal.ofReal ((H*h/2)^2*(φ^2/2)) at hf + have he : (H*h/2)^2*(φ^2/2)=(H*h)^2*φ^2/8 := by ring + rw [he] at hf + apply (mul_le_mul' le_rfl (hf.trans (ENNReal.div_le_div_right ho _))).trans + rw [←ENNReal.ofReal_mul (mul_nonneg hK hμ),←ENNReal.ofReal_div_of_pos hD, + ←ENNReal.ofReal_mul (div_nonneg hφ.le hθ.le)] + apply ENNReal.ofReal_le_ofReal + change (φ/θ)*(K*μ*E/((H*h)^2*φ^2/8))≤(8*K*E)*μ/(h^2*θ*φ) + calc + _=((8*K*E)*μ/(h^2*θ*φ))/H^2 := by field_simp + _≤(8*K*E)*μ/(h^2*θ*φ) := div_le_self (by positivity) (by nlinarith [sq_nonneg (H-1)]) + +lemma near_threshold_spatial {I h p θ φ P W : ℝ} + (hI : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + representativeSpatialCost s F zX w k a b≤ + ENNReal.ofReal (C*(P^2*(selectionWeight P θ φ h)^2*θ/(p*φ))) := by + obtain ⟨Cn,hCn,hnear⟩ := hd.representative_spatial_near T₀ + obtain ⟨Cf,hCf,hfar⟩ := hd.representative_spatial_pure_far T₀ + let C := max Cn Cf + have hC : 0≤C := hCn.trans (le_max_left _ _) + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hfar M A hM hA,eventually_gt_atTop (0:ℝ)] with P hf hP + intro s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hsmall hfail hsource HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let μ := pureOccupationEnvelope P 512 16384 M A p w φ h I + let W := selectionWeight P θ φ h + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cr,hCr,hregular⟩ := hd.central_regular_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.central_exception_uniform T₀ + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let Gr := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0 + let Ge := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0 + have he (n : ℕ×ℕ) : Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n= + Q.indicator Gr n+Q.indicator Ge n := by + by_cases hn : n∈Q + · simp only [indicator_of_mem hn,Gr,Ge] + rw [←ENNReal.tsum_add] + apply tsum_congr + intro nt + rw [←ENNReal.tsum_add] + apply tsum_congr + intro nr + split_ifs + · exact central_cost_eq_regular_add_exception .. + · simp + · simp only [indicator_of_notMem hn,zero_add] + change (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤_ + simp_rw [he] + rw [ENNReal.tsum_add] + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let V := I*P^2*Real.log (2+P)/w + have hV : 0≤V := by dsimp [V]; positivity + have hB : 0≤B := by dsimp [B]; positivity + have hVB : V≤B := by + have hroot := Real.sqrt_nonneg A + have hfirst : 0≤P*Real.sqrt I := by positivity + have ht : V≤(M+Real.sqrt A)*V := le_mul_of_one_le_left hV (by linarith) + calc + V≤(M+Real.sqrt A)*V := ht + _≤P*Real.sqrt I+(M+Real.sqrt A)*V := le_add_of_nonneg_left hfirst + _=B := by dsimp [B,V]; ring + have hr := hregular M A P (zero_lt_one.trans_le hM) hA hP hL s T F hs hT hTT + zX a b I w hzX ha hb hI hJI (zero_lt_one.trans_le hw) hwP HZ + have he' := hexception M A P hM hP hL s T F hs hT hTT zX a b I w ha hb hI hJI hw hwP + calc + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*V) := add_le_add hr he' + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hVB hCe)) + _=ENNReal.ofReal ((Cr+Ce)*B) := by rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCe hB)]; congr 1; ring + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma remaining_transport_near_point {θ φ σ : ℝ} (hθ : 0<θ) (hφ : 0≤φ) (hσ : 0≤σ) + (hφθ : φ≤16*θ) : + (min θ σ)^2*φ^2*(θ+φ)/θ^3≤17*σ*φ^2/θ := by + have hν : 0 ≤ min θ σ := le_min hθ.le hσ + have hs : (min θ σ)^2≤θ*σ := by + calc + _=(min θ σ)*(min θ σ) := pow_two _ + _≤θ*σ := mul_le_mul (min_le_left _ _) (min_le_right _ _) hν hθ.le + calc + _≤(θ*σ)*φ^2*(17*θ)/θ^3 := by + apply div_le_div_of_nonneg_right _ (by positivity) + apply mul_le_mul (mul_le_mul_of_nonneg_right hs (sq_nonneg φ)) (by linarith : θ+φ≤17*θ) + (by positivity) (by positivity) + _=_ := by field_simp + +lemma remaining_transport_near_angular : + (∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16*cappedRepresentative nt then + ∑'j : ℕ,ENNReal.ofReal ((min (cappedRepresentative nt) (cappedRepresentative j))^2* + (cappedRepresentative nf)^2*(cappedRepresentative nt+cappedRepresentative nf)/(cappedRepresentative nt)^3) + else 0)≤ENNReal.ofReal 34816 := by + have hrelative (nt nf : ℕ) (hφθ : cappedRepresentative nf≤16*cappedRepresentative nt) : + (∑'j : ℕ,ENNReal.ofReal ((min (cappedRepresentative nt) (cappedRepresentative j))^2* + (cappedRepresentative nf)^2*(cappedRepresentative nt+cappedRepresentative nf)/(cappedRepresentative nt)^3))≤ + ENNReal.ofReal (34*(cappedRepresentative nf)^2/cappedRepresentative nt) := by + calc + _≤∑'j : ℕ,ENNReal.ofReal ((17*(cappedRepresentative nf)^2/cappedRepresentative nt)*cappedRepresentative j) := by + apply ENNReal.tsum_le_tsum + intro j + apply ENNReal.ofReal_le_ofReal + calc + _≤17*cappedRepresentative j*(cappedRepresentative nf)^2/cappedRepresentative nt := + remaining_transport_near_point (cappedRepresentative_pos _) (cappedRepresentative_pos _).le + (cappedRepresentative_pos _).le hφθ + _=_ := by ring + _=_ := by + rw [show (∑'j : ℕ,ENNReal.ofReal ((17*(cappedRepresentative nf)^2/cappedRepresentative nt)*cappedRepresentative j))= + ∑'j : ℕ,ENNReal.ofReal ((17*(cappedRepresentative nf)^2/cappedRepresentative nt)*(1*cappedRepresentative j)) by simp] + rw [capped_linear_radius_sum (div_nonneg (by positivity) (cappedRepresentative_pos _).le) (by norm_num)] + congr 1 + ring + have hreceiver (nt : ℕ) : + (∑'nf : ℕ,if cappedRepresentative nf≤16*cappedRepresentative nt then + ENNReal.ofReal (34*(cappedRepresentative nf)^2/cappedRepresentative nt) else 0)≤ + ENNReal.ofReal (17408*cappedRepresentative nt) := by + let θ := cappedRepresentative nt + have hθ : 0<θ := cappedRepresentative_pos _ + have he (nf : ℕ) : (if cappedRepresentative nf≤16*θ then + ENNReal.ofReal (34*(cappedRepresentative nf)^2/θ) else 0)= + ENNReal.ofReal (34/θ)*ENNReal.ofReal (if cappedRepresentative nf≤16*θ then (cappedRepresentative nf)^2 else 0) := by + split_ifs + · rw [←ENNReal.ofReal_mul (by positivity : 0≤34/θ)] + congr 1 + ring + · simp + change (∑'nf : ℕ,if cappedRepresentative nf≤16*θ then ENNReal.ofReal (34*(cappedRepresentative nf)^2/θ) else 0)≤_ + simp_rw [he] + rw [ENNReal.tsum_mul_left] + calc + _≤ENNReal.ofReal (34/θ)*ENNReal.ofReal (2*(16*θ)^2) := + mul_le_mul' le_rfl (capped_square_tail_sum (by positivity)) + _=_ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤34/θ)] + congr 1 + dsimp [θ] + field_simp + ring + calc + _≤∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16*cappedRepresentative nt then + ENNReal.ofReal (34*(cappedRepresentative nf)^2/cappedRepresentative nt) else 0 := by + apply ENNReal.tsum_le_tsum + intro nt + apply ENNReal.tsum_le_tsum + intro nf + split_ifs with h + · exact hrelative nt nf h + · rfl + _≤∑'nt : ℕ,ENNReal.ofReal (17408*cappedRepresentative nt) := ENNReal.tsum_le_tsum hreceiver + _=ENNReal.ofReal 34816 := by + convert capped_linear_radius_sum (by norm_num : (0:ℝ)≤17408) (by norm_num : (0:ℝ)≤1) using 1 <;> norm_num + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/ContDiffDyadicMultiFactor.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/ContDiffDyadicMultiFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..2ca2e5e50c731132d7f22cfefa52d6dcea66392f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/ContDiffDyadicMultiFactor.lean @@ -0,0 +1,223 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeRadius +import OAI.Analysis.VlasovMaxwell.Regularity.PhysicalCutoffCoordinates + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma contDiffAt_dyadicMultiFactor_curve {ι : Type*} [Fintype ι] {k : ℕ∞ω} + (hk : k≤((⊤ : ℕ∞) : ℕ∞ω)) {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i,ContDiffAt ℝ k (g i) t) (n : ι→ℕ) : + ContDiffAt ℝ k (fun r=>dyadicMultiFactor n (fun i=>g i r)) t := by + classical + exact contDiffAt_prod (fun i _ => ((contDiff_dyadicFactor (n i)).of_le hk).contDiffAt.comp t (hg i)) + +lemma contDiffAt_selectedDyadicCutoff_curve {ι : Type*} [Fintype ι] {k : ℕ∞ω} + (hk : k≤((⊤ : ℕ∞) : ℕ∞ω)) {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i,ContDiffAt ℝ k (g i) t) (hp : ∀ i,0selectedDyadicCutoff S (fun i=>g i r)) t := by + classical + obtain ⟨N,_hN,he⟩ := selectedDyadicCutoff_curve_eventually (fun i=>(hg i).continuousAt) hp S + exact (ContDiffAt.sum (s:=selectedDyadicBox N S) + (fun n _=>contDiffAt_dyadicMultiFactor_curve hk hg n)).congr_of_eventuallyEq he + +lemma contDiffOn_selectedDyadicCutoff_curve {ι : Type*} [Fintype ι] {k : ℕ∞ω} + (hk : k≤((⊤ : ℕ∞) : ℕ∞ω)) {g : ι → ℝ → ℝ} {U : Set ℝ} (hU : IsOpen U) + (hg : ∀ i,ContDiffOn ℝ k (g i) U) (hp : ∀ t∈U,∀ i,0selectedDyadicCutoff S (fun i=>g i r)) U := by + intro t ht + exact (contDiffAt_selectedDyadicCutoff_curve hk + (fun i=>(hg i).contDiffAt (hU.mem_nhds ht)) (hp t ht) S).contDiffWithinAt + +lemma inverseCoordinate_log_deriv {d : ℝ→ℝ} {d' t : ℝ} + (hd : HasDerivAt d d' t) (hp : 01/d s) t / (1/d t) = -d'/d t := by + have hh := ((hasDerivAt_const t (1:ℝ)).div hd hp.ne').deriv + change deriv ((fun _ : ℝ => (1:ℝ))/d) t / (1/d t) = -d'/d t + rw [hh] + field_simp + ring + +lemma source_cutoff_logarithmic_rates {V : ℝ→Vec} {E B n : Vec} {t : ℝ} + (hV : HasDerivAt V (E+cross (velocity (V t)) B) t) (hn : ‖n‖=1) : + let θ := Real.sqrt ((1-dot n (velocity (V t)))/2) + |deriv (fun s=>1/q (V s)) t / (1/q (V t))| + + |deriv (fun s=>Real.sqrt ((1-dot n (velocity (V s)))/2)) t / θ| ≤ + (3/q (V t))*(goodField E B n/θ+θ*‖B‖) := by + let d := 1-dot n (velocity (V t)) + let θ := Real.sqrt (d/2) + let U := fderiv ℝ velocity (V t) (E+cross (velocity (V t)) B) + have hdpos : 0velocity (V s)) U t := + ((contDiff_velocity (k:=1)).differentiable one_ne_zero (V t)).hasFDerivAt.comp_hasDerivAt t hV + have hd : HasDerivAt (fun s=>1-dot n (velocity (V s))) (-dot n U) t := by + have hh := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot (hasDerivAt_const t n) hu) + convert hh using 1 + try rfl + simp only [dot_zero_left_rvm,add_zero,zero_sub] + have hq := inverseCoordinate_log_deriv (hasDerivAt_lorentz_energy hV) (q_pos (V t)) + have ha := angularCoordinate_log_deriv hd hdpos + change |deriv (fun s=>1/q (V s)) t / (1/q (V t))|+ + |deriv (fun s=>Real.sqrt ((1-dot n (velocity (V s)))/2)) t/θ| ≤ _ + rw [hq] + change |-dot (velocity (V t)) E/q (V t)|+ + |deriv (fun s=>Real.sqrt ((1-dot n (velocity (V s)))/2)) t/Real.sqrt ((1-dot n (velocity (V t)))/2)| ≤ _ + rw [ha,abs_div,abs_neg,abs_of_pos (q_pos (V t)),abs_div,abs_neg] + change |dot (velocity (V t)) E|/q (V t)+|dot n U|/|2*d| ≤ _ + rw [abs_of_pos (by positivity : 0<2*d)] + have he : |dot (velocity (V t)) E|≤goodField E B n+2*θ*‖B‖ := by + simpa only [← htwo] using source_energy_rate_bound (V t) E B n hn + have hu' : |dot n U|≤(q (V t))⁻¹*(2*θ)*(goodField E B n+d*‖B‖) := by + simpa only [U,← htwo] using lorentz_source_normal_acceleration_bound (V t) E B n hn + have hG : 0≤goodField E B n := by unfold goodField; positivity + calc + _ ≤ (goodField E B n+2*θ*‖B‖)/q (V t)+ + ((q (V t))⁻¹*(2*θ)*(goodField E B n+d*‖B‖))/(2*d) := + add_le_add (div_le_div_of_nonneg_right he (q_pos _).le) + (div_le_div_of_nonneg_right hu' (by positivity)) + _ = (q (V t))⁻¹*(goodField E B n+goodField E B n/(2*θ)+3*θ*‖B‖) := by + have hdθ : d=2*θ^2 := by linarith + rw [hdθ] + field_simp + ring + _ ≤ (q (V t))⁻¹*(3*(goodField E B n/θ+θ*‖B‖)) := by + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (q_pos _).le) + apply (mul_le_mul_iff_right₀ hθ).mp + field_simp + nlinarith [mul_le_mul_of_nonneg_left hθ1 hG] + _ = _ := by ring + +lemma coneMotion_tangent {a u n : Vec} (hn : ‖n‖=1) (hD : 1-dot n a≠0) : + dot n (coneMotion a u n)=0 := by + simp only [coneMotion,dot_add_right,dot_sub_right,dot_smul_right,dot_self,hn,one_pow] + field_simp + ring + +lemma geometric_cutoff_logarithmic_rates {v w n : Vec} {r : ℝ} + (hn : ‖n‖=1) (hr : 0 ring + have hrad : |(d/D-1)/r|≤1/r := by + rw [abs_div,abs_of_pos hr] + apply div_le_div_of_nonneg_right _ hr.le + apply abs_le.mpr + constructor + · linarith [div_nonneg hd.le hD.le] + · have hh : d/D≤1 := (div_le_one hD).mpr hsmall + linarith + change |(d/D-1)/r|+|dot N (velocity v)/(2*d)|+|dot N (velocity w)/(2*D)|≤5/r + exact (add_le_add (add_le_add hrad hsRate) hrRate).trans_eq (by ring) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DatumElectricFluxKernel.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DatumElectricFluxKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a3a76eb8c0649c941c65301a1bab6f3926a59b3 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DatumElectricFluxKernel.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.ElectricBoundaryField + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma datum_velocity_support {f : Phase → ℝ} (hc : HasCompactSupport f) : + ∃ K : Set Vec, IsCompact K ∧ ∀ y v, v∉K → f (y,v)=0 := by + refine ⟨Prod.snd '' tsupport f,hc.image continuous_snd,?_⟩ + intro y v hv + by_contra h + exact hv ⟨(y,v),subset_tsupport _ h,rfl⟩ + +lemma datum_integrand_continuousOn {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : Phase → ℝ} {H : Vec × Vec → W} (hf : Continuous f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ContinuousOn (fun p : (Vec × Vec) × Vec => f (p.1.1,p.2) • H (p.1.2,p.2)) + ((univ ×ˢ sphere (0:Vec) 1) ×ˢ univ) := by + exact (hf.comp (continuous_fst.fst.prodMk continuous_snd)).continuousOn.smul + (hH.comp (continuous_fst.snd.prodMk continuous_snd).continuousOn + (fun _ h => ⟨h.1.2,mem_univ _⟩)) + +lemma continuousOn_datum_velocity_integral {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Phase → ℝ} {H : Vec × Vec → W} (hf : Continuous f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ContinuousOn (fun p : Vec × Vec => ∫ v : Vec, f (p.1,v) • H (p.2,v)) + (univ ×ˢ sphere (0:Vec) 1) := by + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + apply continuousOn_integral_uniform_support hK (datum_integrand_continuousOn hf hH) + intro p hp v hv + rw [hz p.1 v hv,zero_smul] + +lemma uniform_datum_velocity_integral_bound {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Phase → ℝ} {H : Vec × Vec → W} (hf : Continuous f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ y n : Vec, ‖n‖=1 → ‖∫ v : Vec, f (y,v) • H (n,v)‖≤C := by + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + let Kx : Set Vec := Prod.fst '' tsupport f + have hKx : IsCompact Kx := hc.image continuous_fst + have hF := datum_integrand_continuousOn hf hH + have hP : IsCompact (Kx ×ˢ sphere (0:Vec) 1) := hKx.prod (isCompact_sphere (0:Vec) 1) + obtain ⟨C,hC,hbound⟩ := uniform_integral_bound_compact hP hK + (hF.mono (by intro p hp; exact ⟨⟨mem_univ _,hp.1.2⟩,hp.2⟩)) + (show ∀ p ∈ Kx ×ˢ sphere (0:Vec) 1, ∀ v ∉ K, + f (p.1,v) • H (p.2,v)=0 from by intro p hp v hv; rw [hz p.1 v hv,zero_smul]) + refine ⟨C,hC,?_⟩ + intro y n hn + by_cases hy : y∈Kx + · exact hbound (y,n) ⟨hy,by simpa only [mem_sphere,dist_zero_right] using hn⟩ + · have he (v : Vec) : f (y,v)=0 := by + by_contra h + exact hy ⟨(y,v),subset_tsupport _ h,rfl⟩ + simpa only [he,zero_smul,integral_zero,norm_zero] using hC + +def datumElectricFluxKernel (i : Fin 3) (p : Vec × Vec) : Vec := + ((1-dot p.1 (velocity p.2))⁻¹*(p.1 i-velocity p.2 i)) • velocity p.2 + +def datumMagneticFluxKernel (i : Fin 3) (p : Vec × Vec) : Vec := + ((1-dot p.1 (velocity p.2))⁻¹*cross p.1 (p.1-velocity p.2) i) • velocity p.2 + +lemma continuousOn_datumElectricFluxKernel (i : Fin 3) : + ContinuousOn (datumElectricFluxKernel i) (sphere (0:Vec) 1 ×ˢ univ) := by + have hu : Continuous (fun p : Vec × Vec => velocity p.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hd : Continuous (fun p : Vec × Vec => 1-dot p.1 (velocity p.2)) := continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp + (continuous_fst.prodMk hu)) + have hdi : ContinuousOn (fun p : Vec × Vec => (1-dot p.1 (velocity p.2))⁻¹) + (sphere (0:Vec) 1 ×ˢ univ) := hd.continuousOn.inv₀ (by + intro p hp + exact (cone_denom_pos p.2 p.1 (by simpa only [mem_sphere,dist_zero_right] using hp.1)).ne') + exact (hdi.mul (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp continuous_fst).sub + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hu)).continuousOn).smul hu.continuousOn + +lemma continuousOn_datumMagneticFluxKernel (i : Fin 3) : + ContinuousOn (datumMagneticFluxKernel i) (sphere (0:Vec) 1 ×ˢ univ) := by + have hu : Continuous (fun p : Vec × Vec => velocity p.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hd : Continuous (fun p : Vec × Vec => 1-dot p.1 (velocity p.2)) := continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp + (continuous_fst.prodMk hu)) + have hdi : ContinuousOn (fun p : Vec × Vec => (1-dot p.1 (velocity p.2))⁻¹) + (sphere (0:Vec) 1 ×ˢ univ) := hd.continuousOn.inv₀ (by + intro p hp + exact (cone_denom_pos p.2 p.1 (by simpa only [mem_sphere,dist_zero_right] using hp.1)).ne') + have hc := (contDiff_cross (k:=1)).continuous.comp + (continuous_fst.prodMk (continuous_fst.sub hu)) + exact (hdi.mul ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hc).continuousOn).smul hu.continuousOn + +lemma datumElectricFlux_eq (d : Datum) (t : ℝ) (x y : Vec) (i : Fin 3) : + retardedElectricFlux (datumBoundarySolution d) t x i y = + (coneRadius x y)⁻¹ • ∫ v : Vec, d.f₀ (y,v) • datumElectricFluxKernel i (coneDirection x y,v) := by + unfold retardedElectricFlux + rw [← integral_smul] + apply integral_congr_ae + filter_upwards [] with v + simp only [retardedDensity,datumBoundarySolution,retardedG,eulerianG, + PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul,datumElectricFluxKernel,mul_inv_rev,smul_smul] + congr 1 + ring + +lemma datumMagneticFlux_eq (d : Datum) (t : ℝ) (x y : Vec) (i : Fin 3) : + retardedMagneticFlux (datumBoundarySolution d) t x i y = + (coneRadius x y)⁻¹ • ∫ v : Vec, d.f₀ (y,v) • datumMagneticFluxKernel i (coneDirection x y,v) := by + unfold retardedMagneticFlux + rw [← integral_smul] + apply integral_congr_ae + filter_upwards [] with v + simp only [retardedDensity,datumBoundarySolution,retardedH,retardedG,eulerianG, + cross_smul_right,PiLp.smul_apply,smul_eq_mul,datumMagneticFluxKernel,mul_inv_rev,smul_smul] + congr 1 + ring + +lemma uniform_datumElectricFlux_bound {d : Datum} (hf : Continuous d.f₀) + (hc : HasCompactSupport d.f₀) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (t : ℝ) (x y : Vec), x≠y → + ‖retardedElectricFlux (datumBoundarySolution d) t x i y‖≤C/coneRadius x y := by + obtain ⟨C,hC,hbound⟩ := uniform_datum_velocity_integral_bound hf hc + (continuousOn_datumElectricFluxKernel i) + refine ⟨C,hC,?_⟩ + intro t x y hxy + rw [datumElectricFlux_eq,norm_smul,coneRadius,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (x-y)))] + simpa only [div_eq_mul_inv,mul_comm C,coneRadius] using + mul_le_mul_of_nonneg_left (hbound y (coneDirection x y) (coneDirection_norm hxy)) + (inv_nonneg.mpr (norm_nonneg _)) + +lemma uniform_datumMagneticFlux_bound {d : Datum} (hf : Continuous d.f₀) + (hc : HasCompactSupport d.f₀) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (t : ℝ) (x y : Vec), x≠y → + ‖retardedMagneticFlux (datumBoundarySolution d) t x i y‖≤C/coneRadius x y := by + obtain ⟨C,hC,hbound⟩ := uniform_datum_velocity_integral_bound hf hc + (continuousOn_datumMagneticFluxKernel i) + refine ⟨C,hC,?_⟩ + intro t x y hxy + rw [datumMagneticFlux_eq,norm_smul,coneRadius,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (x-y)))] + simpa only [div_eq_mul_inv,mul_comm C,coneRadius] using + mul_le_mul_of_nonneg_left (hbound y (coneDirection x y) (coneDirection_norm hxy)) + (inv_nonneg.mpr (norm_nonneg _)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedAssemble.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedAssemble.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3c975954265e21a82bb4a700fc0f1ce92fb28d6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedAssemble.lean @@ -0,0 +1,230 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalDirectTransportDensity +import OAI.Analysis.VlasovMaxwell.Population.SharedBudget +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedDeficitUniform +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedLargeAngular + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma ennreal_sum_subset_bound {α : Type*} {s t : Finset α} {f g : α→ℝ≥0∞} + (hst : s⊆t) (hfg : ∀x∈s,f x≤g x) : (∑x∈s,f x)≤∑x∈t,g x := + (Finset.sum_le_sum hfg).trans + (Finset.sum_le_sum_of_subset_of_nonneg hst (fun _ _ _=>bot_le)) + +lemma ennreal_radius_split (f : ℕ→ℝ≥0∞) (r : ℕ→ℝ) (I : ℝ) : + (∑'n,f n)≤(∑'n,if r n≤I then f n else 0)+(∑'n,if I≤r n then f n else 0) := by + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro n + by_cases h : r n≤I + · simp only [ite_eq_left h] + exact le_add_right le_rfl + · simp [h,(not_le.mp h).le] + +lemma Admissible.direct_remaining_source_complete_uniform {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w M A P K : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nf nt j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + let Sp := (Finset.range N).filter (fun np=>sourceRepresentative np≤128*P) + let Sf := (Finset.range N).filter (fun nf=>1/(32*w)≤cappedRepresentative nf) + let St := fun nf=>(Finset.range N).filter (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt) + let Ss := fun nt=>(Finset.range N).filter (fun j=>cappedRepresentative j≤131080*cappedRepresentative nt) + (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,∑'nr : ℕ, + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nf nt j nr) z + ∂physicalBinMeasure V (B np nf nt j nr) (Icc a b))≤ + ENNReal.ofReal (C*(1+K^4)*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Ch,hCh,hhigh⟩ := hd.direct_remaining_source_short_uniform_expanded + obtain ⟨Cl,hCl,hlow⟩ := hd.direct_remaining_source_deficit_short_uniform_expanded + obtain ⟨Cb,hCb,hlarge⟩ := hd.direct_remaining_source_large_uniform_expanded + refine ⟨Ch+Cl+Cb,by positivity,?_⟩ + intro s T F hs hT zX S a b I w M A P K N hS hS0 ha hb hab hI hI1 hJI hM hA hP hL hw hwP hIP hK hN HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nf nt j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + let f := fun np nf nt j nr=>∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nf nt j nr) z + ∂physicalBinMeasure V (B np nf nt j nr) (Icc a b) + let r := fun nr=>max 1 T*cappedRepresentative nr + let D := fun np nf nt j=>∑'nr,if r nr≤I then f np nf nt j nr else 0 + let L := fun np nf nt j=>∑'nr,if I≤r nr then f np nf nt j nr else 0 + let Sp := (Finset.range N).filter (fun np=>sourceRepresentative np≤128*P) + let Sf := (Finset.range N).filter (fun nf=>1/(32*w)≤cappedRepresentative nf) + let St := fun nf=>(Finset.range N).filter (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt) + let Ss := fun nt=>(Finset.range N).filter (fun j=>cappedRepresentative j≤131080*cappedRepresentative nt) + let hi := fun np j=>512≤cappedRepresentative j*sourceRepresentative np ∧ 32≤cappedRepresentative j*w + let lo := fun np j=>cappedRepresentative j*sourceRepresentative np≤512 ∨ cappedRepresentative j*w≤32 + let Sh := fun np nt=>(Ss nt).filter (fun j=>hi np j) + let R := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hR : P*Real.sqrt I≤R := le_add_of_nonneg_right (by positivity) + have hR0 : 0≤R := by dsimp [R]; positivity + have hp (np : ℕ) (hnp : np∈Sp) : sourceRepresentative np≤128*P := (Finset.mem_filter.mp hnp).2 + have hf (nf : ℕ) (hnf : nf∈Sf) : 1/(32*w)≤cappedRepresentative nf := (Finset.mem_filter.mp hnf).2 + have ht (nf nt : ℕ) (hnt : nt∈St nf) : cappedRepresentative nf≤16384*cappedRepresentative nt := (Finset.mem_filter.mp hnt).2 + have hj (nt j : ℕ) (hj : j∈Ss nt) : cappedRepresentative j≤131080*cappedRepresentative nt := (Finset.mem_filter.mp hj).2 + have hhigh' := hhigh s T F hs hT zX S a b I w M A P hS hS0 ha hb hab hI hI1 hJI hM hA hP hL hw hwP HX HZ + Sp Sf (fun _ nf=>St nf) (fun np _ nt=>Sh np nt) hp hf (fun _ _ nf _ nt hnt=>ht nf nt hnt) + (fun np _ _ _ nt _ j hj'=>⟨hj nt j (Finset.mem_filter.mp hj').1,(Finset.mem_filter.mp hj').2⟩) + have hlarge' := hlarge s T F hs hT zX S a b I w P hS hS0 ha hb hJI hI hI1 (by positivity) + Sp Sf (fun _ nf=>St nf) (fun _ _ nt=>Ss nt) hp (fun _ _ nf _ nt hnt=>ht nf nt hnt) + (fun _ _ _ _ nt _ j hj'=>hj nt j hj') + have hlow' := hlow s T F hs hT zX S a b I w P K N hS hS0 ha hb hJI hI hI1 hw hP hIP hK hN + have hlo : (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,if lo np j then D np nf nt j else 0)≤ + ENNReal.ofReal (Cl*K^4*(P*Real.sqrt I)) := by + apply le_trans _ hlow' + apply ennreal_sum_subset_bound (Finset.filter_subset _ _) + intro np hnp + apply ennreal_sum_subset_bound (Finset.filter_subset _ _) + intro nf hnf + apply ennreal_sum_subset_bound (Finset.filter_subset _ _) + intro nt hnt + apply ennreal_sum_subset_bound (Finset.filter_subset _ _) + intro j hj' + simp only [hp np hnp,ht nf nt hnt,true_and] + exact le_rfl + have hpoint (np nf nt j : ℕ) : (∑'nr,f np nf nt j nr)≤ + (if hi np j then D np nf nt j else 0)+(if lo np j then D np nf nt j else 0)+L np nf nt j := by + apply (ennreal_radius_split (f np nf nt j) r I).trans + apply add_le_add _ le_rfl + by_cases hl : lo np j + · simp only [ite_eq_left hl] + exact le_add_left le_rfl + · have hh : hi np j := by + dsimp [lo] at hl + push Not at hl + exact ⟨hl.1.le,hl.2.le⟩ + simp only [ite_eq_left hh,ite_eq_right hl,add_zero] + exact le_rfl + change (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,∑'nr,f np nf nt j nr)≤_ + calc + _≤∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt, + ((if hi np j then D np nf nt j else 0)+(if lo np j then D np nf nt j else 0)+L np nf nt j) := + Finset.sum_le_sum (fun np _=>Finset.sum_le_sum (fun nf _=>Finset.sum_le_sum + (fun nt _=>Finset.sum_le_sum (fun j _=>hpoint np nf nt j)))) + _=(∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Sh np nt,D np nf nt j)+ + (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,if lo np j then D np nf nt j else 0)+ + (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,L np nf nt j) := by + simp only [Sh,Finset.sum_filter,Finset.sum_add_distrib] + _≤ENNReal.ofReal (Ch*R)+ENNReal.ofReal (Cl*K^4*(P*Real.sqrt I))+ENNReal.ofReal (Cb*(P*Real.sqrt I)) := + add_le_add (add_le_add hhigh' hlo) hlarge' + _≤ENNReal.ofReal (Ch*R+Cl*K^4*R+Cb*R) := by + rw [ENNReal.ofReal_add (by positivity : 0≤Ch*R+Cl*K^4*R) (by positivity), + ENNReal.ofReal_add (by positivity : 0≤Ch*R) (by positivity)] + exact add_le_add (add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hR (by positivity)))) + (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hR hCb)) + _≤_ := by + apply ENNReal.ofReal_le_ofReal + have hc : Ch+Cl*K^4+Cb≤(Ch+Cl+Cb)*(1+K^4) := by + nlinarith [mul_nonneg hCh (pow_nonneg hK 4),mul_nonneg hCb (pow_nonneg hK 4)] + calc + _=(Ch+Cl*K^4+Cb)*R := by ring + _≤_ := mul_le_mul_of_nonneg_right hc hR0 + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma ennreal_sum_filter_eq {α : Type*} (s : Finset α) (p : α→Prop) [DecidablePred p] + (f : α→ℝ≥0∞) (hz : ∀x∈s,¬p x→f x=0) : (∑x∈s,f x)=∑x∈s.filter p,f x := by + rw [Finset.sum_filter] + apply Finset.sum_congr rfl + intro x hx + by_cases hp : p x + · simp only [ite_eq_left hp] + · simp only [ite_eq_right hp,hz x hx hp] + +lemma Admissible.direct_remaining_source_unrestricted_uniform {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w M A P K : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nf nt j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + let Sp := (Finset.range N).filter (fun np=>sourceRepresentative np≤128*P) + let Sf := Finset.range N + let St := fun nf=>(Finset.range N).filter (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt) + let Ss := fun _ : ℕ=>Finset.range N + (∑np∈Sp,∑nf∈Sf,∑nt∈St nf,∑j∈Ss nt,∑'nr : ℕ, + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nf nt j nr) z + ∂physicalBinMeasure V (B np nf nt j nr) (Icc a b))≤ + ENNReal.ofReal (C*(1+K^4)*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨C,hC,hcomplete⟩ := hd.direct_remaining_source_complete_uniform + refine ⟨C,hC,?_⟩ + intro s T F hs hT zX S a b I w M A P K N hS hS0 ha hb hab hI hI1 hJI hM hA hP hL hw hwP hIP hK hN HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nf nt j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + let G := fun np nf nt j=>∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nf nt j nr) z + ∂physicalBinMeasure V (B np nf nt j nr) (Icc a b) + let Sp := (Finset.range N).filter (fun np=>sourceRepresentative np≤128*P) + let St := fun nf=>(Finset.range N).filter (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt) + have hV : Measurable V := + ((F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hzero (np nf nt j : ℕ) (hθ : cappedRepresentative nf≤16384*cappedRepresentative nt) + (hbad : ¬(1/(32*w)≤cappedRepresentative nf ∧ cappedRepresentative j≤131080*cappedRepresentative nt)) : + G np nf nt j=0 := by + have hz (nr : ℕ) : (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nf nt j nr) z + ∂physicalBinMeasure V (B np nf nt j nr) (Icc a b))=0 := + physicalDirectSource_integral_expanded_bad_zero s hV measurableSet_Icc hw hθ hbad + simp only [G,hz,tsum_zero] + have hh := hcomplete s T F hs hT zX S a b I w M A P K N hS hS0 ha hb hab hI hI1 hJI + hM hA hP hL hw hwP hIP hK hN HX HZ + apply le_trans _ hh + change (∑np∈Sp,∑nf∈Finset.range N,∑nt∈St nf,∑j∈Finset.range N,G np nf nt j)≤ + ∑np∈Sp,∑nf∈(Finset.range N).filter (fun nf=>1/(32*w)≤cappedRepresentative nf), + ∑nt∈St nf,∑j∈(Finset.range N).filter (fun j=>cappedRepresentative j≤131080*cappedRepresentative nt),G np nf nt j + apply le_of_eq + apply Finset.sum_congr rfl + intro np hnp + calc + _=(∑nf∈(Finset.range N).filter (fun nf=>1/(32*w)≤cappedRepresentative nf), + ∑nt∈St nf,∑j∈Finset.range N,G np nf nt j) := by + apply ennreal_sum_filter_eq + intro nf hnf hbad + apply Finset.sum_eq_zero + intro nt hnt + apply Finset.sum_eq_zero + intro j hj + exact hzero np nf nt j (Finset.mem_filter.mp hnt).2 (fun h=>hbad h.1) + _=_ := by + apply Finset.sum_congr rfl + intro nf hnf + apply Finset.sum_congr rfl + intro nt hnt + apply ennreal_sum_filter_eq + intro j hj hbad + exact hzero np nf nt j (Finset.mem_filter.mp hnt).2 (fun h=>hbad h.2) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedDeficitUniform.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedDeficitUniform.lean new file mode 100644 index 0000000000000000000000000000000000000000..df8e7abd34e47020451a72fe162d3e3ad31abc70 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedDeficitUniform.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.DirectDeficitUniform + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_remaining_source_deficit_short_uniform_expanded {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w P K : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑np∈Finset.range N,∑nf∈Finset.range N,∑nt∈Finset.range N,∑j∈Finset.range N, + if sourceRepresentative np≤128*P ∧ cappedRepresentative nf≤16384*cappedRepresentative nt ∧ + (cappedRepresentative j*sourceRepresentative np≤512 ∨ cappedRepresentative j*w≤32) then + ∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0 else 0)≤ + ENNReal.ofReal (C*K^4*(P*Real.sqrt I)) := by + obtain ⟨Cg,Cb,hCg,hCb,hbin⟩ := hd.direct_source_deficit_short_sum_expanded + let E := datumEnergyNumber d + let D := (268435456*relativeCauchyConstant Cg E (20*E)+relativeCauchyConstant Cb E (120*E))*16777216* + (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ + have hD : 0≤D := mul_nonneg (mul_nonneg (add_nonneg + (mul_nonneg (by norm_num) (relativeCauchyConstant_nonneg hCg)) + (relativeCauchyConstant_nonneg hCb)) (by norm_num)) shortSqrtConstant_pos.le + refine ⟨768*D,by positivity,?_⟩ + intro s T F hs hT zX S a b I w P K N hS hS0 ha hb hJI hI hI1 hw hP hIP hK hN + dsimp only + have hlog : 0≤Real.log (2+P) := Real.log_nonneg (by linarith) + calc + _≤∑np∈Finset.range N,∑nf∈Finset.range N,∑nt∈Finset.range N,∑j∈Finset.range N, + ENNReal.ofReal (D*Real.sqrt I) := by + apply Finset.sum_le_sum + intro np hnp + apply Finset.sum_le_sum + intro nf hnf + apply Finset.sum_le_sum + intro nt hnt + apply Finset.sum_le_sum + intro j hj + split_ifs with hsector + · have hh := hbin s T F hs.energyPrefix hT hs.initial_f zX S np nt nf j a b I w P + hS hS0 ha hb hJI hI hI1 hw (zero_lt_one.trans_le hP) hsector.1 hIP hsector.2.1 hsector.2.2 + dsimp only at hh + rw [hs.initial_energy_eq] at hh + exact hh + · exact bot_le + _=(N:ℝ≥0∞)^4*ENNReal.ofReal (D*Real.sqrt I) := by simp only [Finset.sum_const,Finset.card_range,nsmul_eq_mul]; ring + _≤ENNReal.ofReal (K^4*(Real.log (2+P))^4*(D*Real.sqrt I)) := + ennreal_count_four_bound hK hlog hN (D*Real.sqrt I) + _≤_ := by + apply ENNReal.ofReal_le_ofReal + calc + _≤K^4*(768*P)*(D*Real.sqrt I) := by gcongr; exact log_four_le_linear hP + _=_ := by ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedLargeAngular.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedLargeAngular.lean new file mode 100644 index 0000000000000000000000000000000000000000..bacf127b8d75c650e1037bff21a431ee7bcb4529 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedLargeAngular.lean @@ -0,0 +1,223 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.DirectLargeAngularSharp + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma remaining_large_good_receiver_expanded {φ : ℝ} (hφ : 0<φ) + (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ) + (hθ : ∀i∈Sθ,φ≤16384*cappedRepresentative i) + (hσ : ∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤131080*cappedRepresentative i) : + (∑i∈Sθ,∑j∈Sσ i,(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (φ/(cappedRepresentative i)^2))≤remainingGoodConstant 131080 16384 0*Real.sqrt φ := by + have hh := remaining_good_fixed_receiver_sum hφ (by norm_num : (0:ℝ)<131080) + (by norm_num : (0:ℝ)<16384) (by norm_num : (0:ℝ)≤0) (by norm_num) Sθ Sσ hθ hσ + simp only [Real.rpow_zero,div_one,add_zero,sub_zero,←Real.sqrt_eq_rpow] at hh + simp only [remainingGoodConstant, sub_zero, add_zero, ←Real.sqrt_eq_rpow] + apply le_trans _ hh + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro j hj + have hi0 := (cappedRepresentative_pos i).le + have hj0 := (cappedRepresentative_pos j).le + have hκ : 1≤(1+φ/cappedRepresentative j)^(1/4:ℝ) := + Real.one_le_rpow (by linarith [div_nonneg hφ.le hj0]) (by norm_num) + rw [mul_comm _ (φ/(cappedRepresentative i)^2)] + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact le_mul_of_one_le_right (by positivity) hκ + +lemma remaining_large_good_angles_expanded (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hθ : ∀nf∈Sφ,∀i∈Sθ nf,cappedRepresentative nf≤16384*cappedRepresentative i) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤131080*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i,(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (cappedRepresentative nf/(cappedRepresentative i)^2))≤ + remainingGoodConstant 131080 16384 0*directDyadicPowerConstant (1/2) := by + calc + _≤∑nf∈Sφ,remainingGoodConstant 131080 16384 0*Real.sqrt (cappedRepresentative nf) := + Finset.sum_le_sum (fun nf hnf=>remaining_large_good_receiver_expanded (cappedRepresentative_pos nf) + (Sθ nf) (Sσ nf) (hθ nf hnf) (hσ nf hnf)) + _≤_ := by + rw [←Finset.mul_sum] + apply mul_le_mul_of_nonneg_left _ (remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1/2) Sφ (fun n _=>cappedRepresentative_le_one n) + simpa only [directDyadicPowerConstant,Real.one_rpow,mul_one,←Real.sqrt_eq_rpow,Real.sqrt_one] using hh + +lemma remaining_large_magnetic_receiver_expanded {φ : ℝ} (hφ : 0≤φ) + (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ) + (hσ : ∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤131080*cappedRepresentative i) : + (∑i∈Sθ,∑j∈Sσ i,(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*φ^(1/3:ℝ))≤ + directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*φ^(1/3:ℝ) := by + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<2/3) Sθ (fun n _=>cappedRepresentative_le_one n) + rw [Real.one_rpow,mul_one] at hh + have hC : 0≤directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ) := + mul_nonneg (directDyadicPowerConstant_nonneg (by norm_num)) (by positivity) + calc + _≤∑i∈Sθ,directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*(cappedRepresentative i)^(2/3:ℝ)*φ^(1/3:ℝ) := by + apply Finset.sum_le_sum + intro i hi + simpa only [one_mul,mul_one,directDyadicPowerConstant] using large_radius_magnetic_relative_sum + (by norm_num : (0:ℝ)≤1) (cappedRepresentative_pos i) hφ (by norm_num : (0:ℝ)<131080) (Sσ i) (hσ i hi) + _=(directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ))*(∑i∈Sθ,(cappedRepresentative i)^(2/3:ℝ))*φ^(1/3:ℝ) := by + simp only [Finset.sum_mul,Finset.mul_sum] + _≤_ := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hh hC) (Real.rpow_nonneg hφ _) + +lemma remaining_large_magnetic_angles_expanded (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤131080*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i,(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative nf)^(1/3:ℝ))≤ + directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*directDyadicPowerConstant (1/3) := by + calc + _≤∑nf∈Sφ,directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)* + (cappedRepresentative nf)^(1/3:ℝ) := + Finset.sum_le_sum (fun nf hnf=>remaining_large_magnetic_receiver_expanded (cappedRepresentative_pos nf).le + (Sθ nf) (Sσ nf) (hσ nf hnf)) + _≤_ := by + rw [←Finset.mul_sum] + apply mul_le_mul_of_nonneg_left _ (by + exact mul_nonneg (mul_nonneg (directDyadicPowerConstant_nonneg (by norm_num)) (by positivity)) (directDyadicPowerConstant_nonneg (by norm_num))) + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1/3) Sφ (fun n _=>cappedRepresentative_le_one n) + simpa only [directDyadicPowerConstant,Real.one_rpow,mul_one] using hh + +lemma remaining_large_combined_angles_expanded {g b : ℝ} (hg : 0≤g) (hb : 0≤b) + (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hθ : ∀nf∈Sφ,∀i∈Sθ nf,cappedRepresentative nf≤16384*cappedRepresentative i) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤131080*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i, + (g*(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (cappedRepresentative nf/(cappedRepresentative i)^2)+ + b*(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative nf)^(1/3:ℝ)))≤ + g*(remainingGoodConstant 131080 16384 0*directDyadicPowerConstant (1/2))+ + b*(directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*directDyadicPowerConstant (1/3)) := by + have hg' := remaining_large_good_angles_expanded Sφ Sθ Sσ hθ hσ + have hb' := remaining_large_magnetic_angles_expanded Sφ Sθ Sσ hσ + simp_rw [mul_assoc, Finset.sum_add_distrib, ←Finset.mul_sum] + simpa only [mul_assoc] using add_le_add (mul_le_mul_of_nonneg_left hg' hg) (mul_le_mul_of_nonneg_left hb' hb) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_remaining_source_large_uniform_expanded {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑np∈Sp,∑nf∈Sφ,∑nt∈Sθ np nf,∑j∈Sσ np nf nt,∑'nr : ℕ, + if I ≤ max 1 T*cappedRepresentative nr then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0)≤ + ENNReal.ofReal (C*(P*Real.sqrt I)) := by + obtain ⟨Cg,Cb,hCg,hCb,hbin⟩ := hd.direct_source_large_sharp_sum + let E := datumEnergyNumber d + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let Dg := dyadicBalanceConstant (1/2) (1/2) + let Db := dyadicBalanceConstant 1 (1/2) + let Ag := remainingGoodConstant 131080 16384 0*directDyadicPowerConstant (1/2) + let Ab := directDyadicPowerConstant (4/3)*(131080:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*directDyadicPowerConstant (1/3) + have hKg : 0≤Kg := relativeCauchyConstant_nonneg hCg + have hKb : 0≤Kb := relativeCauchyConstant_nonneg hCb + have hDg : 0≤Dg := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDb : 0≤Db := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hAg : 0≤Ag := mul_nonneg + (remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + (directDyadicPowerConstant_nonneg (by norm_num)) + have hAb : 0≤Ab := by + dsimp [Ab] + exact mul_nonneg (mul_nonneg (mul_nonneg (directDyadicPowerConstant_nonneg (by norm_num)) + (by positivity)) (directDyadicPowerConstant_nonneg (by norm_num))) (directDyadicPowerConstant_nonneg (by norm_num)) + refine ⟨256*(Kg*Dg*Ag+Kb*Db*Ab),by positivity,?_⟩ + intro s T F hs hT zX S a b I w P hS hS0 ha hb hJI hI hI1 hP Sp Sφ Sθ Sσ hp hθ hσ + dsimp only + let g (np : ℕ) := Kg*Dg*(I : ℝ)^(3/4:ℝ)*sourceRepresentative np + let b' (np : ℕ) := Kb*Real.sqrt I*Db*sourceRepresentative np + let f (np nf nt j : ℕ) := + g np*(min (cappedRepresentative nt) (cappedRepresentative j))^(3/2:ℝ)* + (cappedRepresentative nf/(cappedRepresentative nt)^2)+ + b' np*(min (cappedRepresentative nt) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative nt)^(-(2/3:ℝ))*(cappedRepresentative nf)^(1/3:ℝ) + have hgn (np : ℕ) : 0≤g np := by dsimp [g,sourceRepresentative]; positivity + have hbn (np : ℕ) : 0≤b' np := by dsimp [b',sourceRepresentative]; positivity + have hfn (np nf nt j : ℕ) : 0≤f np nf nt j := by + have hnt := (cappedRepresentative_pos nt).le + have hnf := (cappedRepresentative_pos nf).le + have hj := (cappedRepresentative_pos j).le + have hg0 := hgn np + have hb0 := hbn np + dsimp [f] + positivity + calc + _≤∑np∈Sp,∑nf∈Sφ,∑nt∈Sθ np nf,∑j∈Sσ np nf nt,ENNReal.ofReal (f np nf nt j) := by + apply Finset.sum_le_sum + intro np hnp + apply Finset.sum_le_sum + intro nf hnf + apply Finset.sum_le_sum + intro nt hnt + apply Finset.sum_le_sum + intro j hj + have hh := hbin s T F hs.energyPrefix hT hs.initial_f zX S np nt nf j a b I w hS hS0 ha hb hJI hI + dsimp only at hh + rw [hs.initial_energy_eq] at hh + apply hh.trans_eq + congr 1 + dsimp [f,g,b',Kg,Kb,Dg,Db,E] + ring + _=ENNReal.ofReal (∑np∈Sp,∑nf∈Sφ,∑nt∈Sθ np nf,∑j∈Sσ np nf nt,f np nf nt j) := by + simp_rw [←ENNReal.ofReal_sum_of_nonneg (fun j _=>hfn _ _ _ j), + ←ENNReal.ofReal_sum_of_nonneg (fun n _=>Finset.sum_nonneg (fun j _=>hfn _ _ n j)), + ←ENNReal.ofReal_sum_of_nonneg (fun n _=>Finset.sum_nonneg (fun j _=>Finset.sum_nonneg (fun k _=>hfn _ n j k))), + ←ENNReal.ofReal_sum_of_nonneg (fun n _=>Finset.sum_nonneg (fun j _=>Finset.sum_nonneg (fun k _=>Finset.sum_nonneg (fun l _=>hfn n j k l))))] + _≤ENNReal.ofReal (∑np∈Sp,(g np*Ag+b' np*Ab)) := by + apply ENNReal.ofReal_le_ofReal + apply Finset.sum_le_sum + intro np hnp + exact remaining_large_combined_angles_expanded (hgn np) (hbn np) Sφ (Sθ np) (Sσ np) (hθ np hnp) (hσ np hnp) + _≤_ := by + apply ENNReal.ofReal_le_ofReal + have hsump := sourceRepresentative_sum_bound (by positivity : 0≤128*P) Sp hp + have hIpow := rpow_three_quarters_le_sqrt hI hI1 + have hs' : ∑np∈Sp,(g np*Ag+b' np*Ab)≤ + (Kg*Dg*Ag+Kb*Db*Ab)*Real.sqrt I*(∑np∈Sp,sourceRepresentative np) := by + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro np hnp + have hpp : 0 ≤ sourceRepresentative np := by dsimp [sourceRepresentative]; positivity + dsimp [g,b'] + nlinarith [mul_le_mul_of_nonneg_left hIpow (mul_nonneg (mul_nonneg (mul_nonneg hKg hDg) hAg) hpp)] + apply hs'.trans + calc + _≤(Kg*Dg*Ag+Kb*Db*Ab)*Real.sqrt I*(2*(128*P)) := mul_le_mul_of_nonneg_left hsump (by positivity) + _=_ := by ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedTransportNear.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedTransportNear.lean new file mode 100644 index 0000000000000000000000000000000000000000..54974b98791d51bfc559941060ed0caace8b5011 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectExpandedTransportNear.lean @@ -0,0 +1,230 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.CentralOccupation + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma remaining_transport_near_point_expanded {θ φ σ : ℝ} (hθ : 0<θ) (hφ : 0≤φ) (hσ : 0≤σ) + (hφθ : φ≤16384*θ) : + (min θ σ)^2*φ^2*(θ+φ)/θ^3≤16385*σ*φ^2/θ := by + have hν : 0 ≤ min θ σ := le_min hθ.le hσ + have hs : (min θ σ)^2≤θ*σ := by + calc + _=(min θ σ)*(min θ σ) := pow_two _ + _≤θ*σ := mul_le_mul (min_le_left _ _) (min_le_right _ _) hν hθ.le + calc + _≤(θ*σ)*φ^2*(16385*θ)/θ^3 := by + apply div_le_div_of_nonneg_right _ (by positivity) + apply mul_le_mul (mul_le_mul_of_nonneg_right hs (sq_nonneg φ)) (by linarith : θ+φ≤16385*θ) + (by positivity) (by positivity) + _=_ := by field_simp + +lemma remaining_transport_near_angular_expanded : + (∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,ENNReal.ofReal ((min (cappedRepresentative nt) (cappedRepresentative j))^2* + (cappedRepresentative nf)^2*(cappedRepresentative nt+cappedRepresentative nf)/(cappedRepresentative nt)^3) + else 0)≤ENNReal.ofReal 35186519572480 := by + have hrelative (nt nf : ℕ) (hφθ : cappedRepresentative nf≤16384*cappedRepresentative nt) : + (∑'j : ℕ,ENNReal.ofReal ((min (cappedRepresentative nt) (cappedRepresentative j))^2* + (cappedRepresentative nf)^2*(cappedRepresentative nt+cappedRepresentative nf)/(cappedRepresentative nt)^3))≤ + ENNReal.ofReal (32770*(cappedRepresentative nf)^2/cappedRepresentative nt) := by + calc + _≤∑'j : ℕ,ENNReal.ofReal ((16385*(cappedRepresentative nf)^2/cappedRepresentative nt)*cappedRepresentative j) := by + apply ENNReal.tsum_le_tsum + intro j + apply ENNReal.ofReal_le_ofReal + calc + _≤16385*cappedRepresentative j*(cappedRepresentative nf)^2/cappedRepresentative nt := + remaining_transport_near_point_expanded (cappedRepresentative_pos _) (cappedRepresentative_pos _).le + (cappedRepresentative_pos _).le hφθ + _=_ := by ring + _=_ := by + rw [show (∑'j : ℕ,ENNReal.ofReal ((16385*(cappedRepresentative nf)^2/cappedRepresentative nt)*cappedRepresentative j))= + ∑'j : ℕ,ENNReal.ofReal ((16385*(cappedRepresentative nf)^2/cappedRepresentative nt)*(1*cappedRepresentative j)) by simp] + rw [capped_linear_radius_sum (div_nonneg (by positivity) (cappedRepresentative_pos _).le) (by norm_num)] + congr 1 + ring + have hreceiver (nt : ℕ) : + (∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ENNReal.ofReal (32770*(cappedRepresentative nf)^2/cappedRepresentative nt) else 0)≤ + ENNReal.ofReal (17593259786240*cappedRepresentative nt) := by + let θ := cappedRepresentative nt + have hθ : 0<θ := cappedRepresentative_pos _ + have he (nf : ℕ) : (if cappedRepresentative nf≤16384*θ then + ENNReal.ofReal (32770*(cappedRepresentative nf)^2/θ) else 0)= + ENNReal.ofReal (32770/θ)*ENNReal.ofReal (if cappedRepresentative nf≤16384*θ then (cappedRepresentative nf)^2 else 0) := by + split_ifs + · rw [←ENNReal.ofReal_mul (by positivity : 0≤32770/θ)] + congr 1 + ring + · simp + change (∑'nf : ℕ,if cappedRepresentative nf≤16384*θ then ENNReal.ofReal (32770*(cappedRepresentative nf)^2/θ) else 0)≤_ + simp_rw [he] + rw [ENNReal.tsum_mul_left] + calc + _≤ENNReal.ofReal (32770/θ)*ENNReal.ofReal (2*(16384*θ)^2) := + mul_le_mul' le_rfl (capped_square_tail_sum (by positivity)) + _=_ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤32770/θ)] + congr 1 + dsimp [θ] + field_simp + ring + calc + _≤∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ENNReal.ofReal (32770*(cappedRepresentative nf)^2/cappedRepresentative nt) else 0 := by + apply ENNReal.tsum_le_tsum + intro nt + apply ENNReal.tsum_le_tsum + intro nf + split_ifs with h + · exact hrelative nt nf h + · rfl + _≤∑'nt : ℕ,ENNReal.ofReal (17593259786240*cappedRepresentative nt) := ENNReal.tsum_le_tsum hreceiver + _=ENNReal.ofReal 35186519572480 := by + convert capped_linear_radius_sum (by norm_num : (0:ℝ)≤17593259786240) (by norm_num : (0:ℝ)≤1) using 1 <;> norm_num + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_remaining_transport_angular_expanded {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nt nf j nr) z + ∂physicalBinMeasure V (B nt nf j nr) (Icc a b) else 0)≤ + ENNReal.ofReal (C*I*max 1 T*sourceRepresentative np) := by + obtain ⟨Cn,hCn,hnear⟩ := hd.direct_transport_radius_near + refine ⟨70373039144960*Cn,by positivity,?_⟩ + intro s T F hs hT h0 zX S np a b I w hS hS0 ha hb hJI hI + dsimp only + let p := sourceRepresentative np + let H := max 1 T + let k := 2*Cn*I*H*p + let ang (nt nf j : ℕ) := (min (cappedRepresentative nt) (cappedRepresentative j))^2* + (cappedRepresentative nf)^2*(cappedRepresentative nt+cappedRepresentative nf)/(cappedRepresentative nt)^3 + have hp : 0

(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j) (Icc a b))≤ + ENNReal.ofReal k*ENNReal.ofReal (ang nt nf j) := by + calc + _≤∑'nr : ℕ,ENNReal.ofReal ((Cn*I*p*ang nt nf j)*(H*cappedRepresentative nr)) := by + apply ENNReal.tsum_le_tsum + intro nr + have hh := hnear s T F hs hT h0 zX S ![np,nt,nf,nr] j a b I w hS hS0 ha hb hJI hI + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one, + Matrix.cons_val,Fin.reduceFinMk] at hh + apply hh.trans_eq + congr 1 + dsimp [ang,H,p] + ring + _=ENNReal.ofReal (2*(Cn*I*p*ang nt nf j)*H) := capped_linear_radius_sum (mul_nonneg (by positivity) (hanga nt nf j)) hH.le + _=_ := by + rw [←ENNReal.ofReal_mul hk] + congr 1 + dsimp [k] + ring + calc + _≤∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,ENNReal.ofReal k*ENNReal.ofReal (ang nt nf j) else 0 := by + apply ENNReal.tsum_le_tsum + intro nt + apply ENNReal.tsum_le_tsum + intro nf + split_ifs + · exact ENNReal.tsum_le_tsum (hradius nt nf) + · rfl + _=ENNReal.ofReal k*(∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,ENNReal.ofReal (ang nt nf j) else 0) := by + simp_rw [ENNReal.tsum_mul_left] + have he (nt nf : ℕ) : (if cappedRepresentative nf≤16384*cappedRepresentative nt then + ENNReal.ofReal k*(∑'j : ℕ,ENNReal.ofReal (ang nt nf j)) else 0)= + ENNReal.ofReal k*(if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,ENNReal.ofReal (ang nt nf j) else 0) := by split_ifs <;> simp + simp_rw [he,ENNReal.tsum_mul_left] + _≤ENNReal.ofReal k*ENNReal.ofReal 35186519572480 := + mul_le_mul' le_rfl remaining_transport_near_angular_expanded + _=_ := by + rw [←ENNReal.ofReal_mul hk] + congr 1 + dsimp [k,p,H] + ring + +lemma Admissible.direct_remaining_transport_uniform_expanded {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀P : ℝ,0≤P → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑'np : ℕ,if sourceRepresentative np≤128*P then + ∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0 else 0)≤ + ENNReal.ofReal (C*max 1 T*(P*Real.sqrt I)) := by + obtain ⟨Cn,hCn,hangular⟩ := hd.direct_remaining_transport_angular_expanded + refine ⟨256*Cn,by positivity,?_⟩ + intro P hP s T F hs hT h0 zX S a b I w hS hS0 ha hb hJI hI hI1 + dsimp only + apply le_trans (b:=∑'np : ℕ,if sourceRepresentative np≤128*P then ENNReal.ofReal (Cn*I*max 1 T*sourceRepresentative np) else 0) + · apply ENNReal.tsum_le_tsum + intro np + split_ifs + · exact hangular s T F hs hT h0 zX S np a b I w hS hS0 ha hb hJI hI + · rfl + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro U + let V := U.filter (fun np=>sourceRepresentative np≤128*P) + have he : (∑np∈U,if sourceRepresentative np≤128*P then ENNReal.ofReal (Cn*I*max 1 T*sourceRepresentative np) else 0)= + ∑np∈V,ENNReal.ofReal (Cn*I*max 1 T*sourceRepresentative np) := by simp [V,Finset.sum_filter] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun np _=>by dsimp [sourceRepresentative]; positivity)] + apply ENNReal.ofReal_le_ofReal + rw [←Finset.mul_sum] + have hsum := sourceRepresentative_sum_bound (by positivity : 0≤128*P) V + (fun np hnp=>(Finset.mem_filter.mp hnp).2) + have hIsqrt : I≤Real.sqrt I := by + nlinarith [Real.sq_sqrt hI.le,Real.sqrt_nonneg I,sq_nonneg (Real.sqrt I)] + calc + _≤(Cn*I*max 1 T)*(2*(128*P)) := mul_le_mul_of_nonneg_left hsum (by positivity) + _≤(Cn*Real.sqrt I*max 1 T)*(2*(128*P)) := by gcongr + _=_ := by ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCounts.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..f7dcd563186be8c9ba77f1b09f5bcb9c1d4a9451 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCounts.lean @@ -0,0 +1,1098 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SelectedDirection +import OAI.Analysis.VlasovMaxwell.Retarded.ConeForceSplit + +namespace OAI + +noncomputable section + +namespace RVM + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +private lemma SmoothClassicalPrefix.directionCountsEnergyPrefix + {datum : Datum} {solution : Solution} {horizon : ℝ} + (hs : SmoothClassicalPrefix datum solution horizon) : EnergyPrefix solution horizon := by + refine ⟨(hs.f_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro time ht position momentum + have hh := (hs.equations time ht.1.le ht.2).1 position momentum + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro time ht position + have he := (hs.equations time ht.1.le ht.2).2.1 position + have hb := (hs.equations time ht.1.le ht.2).2.2.1 position + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +def directionRemaining : Set (Fin 4→ℕ) := + {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1)} + +lemma direction_unselected_source_sum {T w P : ℝ} (f g h : (Fin 4→ℕ)→ℝ≥0∞) + (hfg : ∀k,f k≤ENNReal.ofReal 64*g k) (hfh : ∀k,f k≤h k) + (hzero : ∀k,¬sourceRepresentative (k 0)≤128*P→h k=0) : + (∑'k,(directionSelection T)ᶜ.indicator f k)≤ + ENNReal.ofReal 64*(∑'k,directionRemaining.indicator g k)+ + (∑'k,(directionSourceFar T w P).indicator h k)+ + (∑'k,(directionSourceLow w).indicator h k) := by + classical + rw [←ENNReal.tsum_mul_left,←ENNReal.tsum_add,←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈(directionSelection T)ᶜ + · rw [Set.indicator_of_mem hk] + by_cases hr : k∈directionRemaining + · rw [Set.indicator_of_mem hr] + exact (hfg k).trans ((le_add_of_nonneg_right bot_le).trans (le_add_of_nonneg_right bot_le)) + · have hθ : cappedRepresentative (k 1)≤(1/1024)*cappedRepresentative (k 2) := by + have hpos := cappedRepresentative_pos (k 1) + have hn : ¬cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) := hr + linarith only [lt_of_not_ge hn,hpos] + have hsmall : cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 := by + have hpos := cappedRepresentative_pos (k 2) + linarith only [hθ,hpos] + have hprod : 1(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let Q := directionSelection T + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T (sourceOnlyConeKernel s F.flow zX) p)‖)≤ + ENNReal.ofReal 64*(∑'k,directionRemaining.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) J) k)+ + (∑'k,(directionSourceFar T w P).indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) J) k)+ + (∑'k,(directionSourceLow w).indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) J) k) := by + classical + dsimp only + have hA : ContinuousOn (sourceOnlyConeKernel s F.flow zX) (coneKernelInterior T) := + (F.sourceOnlyConeKernel_continuousOn hs zX).mono inter_subset_left + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + rw [F.selectedConeTriangle_norm_transfer hs hT zX (directionSelection T)ᶜ hA hW hJ] + apply (F.selectedConeTriangle_physical_sum hs hT zX (directionSelection T)ᶜ hA hW hJ hJT hq).trans + have hα := (F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + apply direction_unselected_source_sum + · intro k + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable (representativeClosedBin T w k) hJ)] with z hz + exact F.selectedSourceTriangle_majorant_le hs hw zX _ hJT hband _ hz + · intro k + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable (representativeClosedBin T w k) hJ)] with z hz + exact F.selectedSourceTriangle_density_le hw zX _ _ hJT hband _ hz + · intro k hk + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + obtain ⟨N,hN,_⟩ := hcount P hP hL + have h1024 : 1024*P≤(2:ℝ)^N := by linarith only [hN,hP] + apply F.physicalProjectedSource_integral_source_truncate hs hsource N h1024 + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (directionSelection T) hα.snd.measurable hJ hJT w k + intro hc + exact hk hc.2.2 + +lemma PhaseFlowOn.selected_transport_label_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (hw : 0(prefixFlow F.flow T zX t).1) T J + (directTransportTriangleKernel (fun t=>(prefixFlow F.flow T zX t).2)) p ∂trianglePhaseMeasure) := by + have hA : ContinuousOn (transportOnlyConeKernel F.flow zX) (coneKernelInterior T) := + (F.transportOnlyConeKernel_continuousOn zX).mono inter_subset_left + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + rw [F.selectedConeTriangle_norm_transfer hs hT zX Q hA hW hJ, + ←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + exact lintegral_mono (F.selectedTransportTriangle_le hw zX Q hJT hband) + +lemma PhaseFlowOn.unselected_force_label_integral_split {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T Q p) • actualLabelSignedForce s F.flow zX T p)‖)≤ + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T (transportOnlyConeKernel F.flow zX) p)‖)+ + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T (sourceOnlyConeKernel s F.flow zX) p)‖) := by + apply (lintegral_mono (F.unselected_force_norm_split zX Q W J)).trans_eq + apply lintegral_add_left + exact ((continuous_fst.clm_apply continuous_snd).measurable.comp + (((hW.indicator hJ).comp (F.labelReceiverTime_measurable zX)).prodMk + ((F.selectedCutoff_measurable zX Qᶜ).smul + (F.measurable_labelConeKernel hs zX (F.transportOnlyConeKernel_continuousOn zX))))).norm.ennreal_ofReal + +lemma Admissible.direction_unselected_label_log_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃Ct Cr Cf Cl : ℝ,0≤Ct ∧ 0≤Cr ∧ 0≤Cf ∧ 0≤Cl ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → T≤T₀ → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (hw : 0s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖(Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T (directionSelection T) p) • actualLabelSignedForce s F.flow zX T p)‖)≤ + ENNReal.ofReal (Ct*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cr*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cf*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2) := by + classical + obtain ⟨Ct,hCt,htransport⟩ := hd₀.direct_transport_sharp_physical_log_bound + obtain ⟨Cr,hCr,hremaining⟩ := hd₀.source_majorant_remaining_log_sum + obtain ⟨Cf,hCf,hfar⟩ := hd₀.projected_source_stable_far_log_sum T₀ + obtain ⟨Cl,hCl,hlow⟩ := hd₀.projected_source_low_receiver_log_sum + refine ⟨64*Ct,64*Cr,Cf,Cl,by positivity,by positivity,hCf,hCl,?_⟩ + intro s T F hs hT hTT h0 zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hW HX HZ + dsimp only + let E := ∫x : Vec,totalEnergy s (0,x) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have ht := (F.selected_transport_label_le hs hT hw zX (directionSelection T)ᶜ measurableSet_Icc hJ hW).trans + (mul_le_mul' le_rfl (htransport s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hJI hM hA hw1 hP hwP hL hsource hq HX HZ)) + have hr := hremaining s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw hwP hsource HX HZ + have hf := hfar s T F hs hT hTT h0 zX S (directionSelection T) a b w M A P hS hS0 ha hb hJI hM hA + (zero_lt_one.trans_le hP) hL hw1 hwP hW HX HZ + have hl := hlow s T F hs hT h0 zX S (directionSelection T) a b w P hS hS0 ha hb hJI hw hwP hPw + (zero_lt_one.trans_le hP) hL hsource hW + have hsour := (F.unselected_source_label_physical_sum hs hT hw zX measurableSet_Icc hJ hq hW hP hL hsource).trans + (add_le_add (add_le_add (mul_le_mul' le_rfl hr) hf) hl) + have hu := (F.unselected_force_label_integral_split hs zX (directionSelection T) + (F.prefixAngular_regular hs hT hw zX).1.measurable measurableSet_Icc).trans (add_le_add ht hsour) + apply hu.trans_eq + rw [←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤64),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤64)] + simp only [mul_assoc,add_assoc] + +lemma Admissible.supported_boundary_force_uniform_bound {d : Datum} (hd : Admissible d) + (T₀ : ℝ) : + ∃ C : ℝ,0 ≤ C ∧ ∀ (T : ℝ), 0≤T → T≤T₀ → ∀ (E B : Field) (F : PhaseFlowOn E B T) (zX : Phase), + zX∈tsupport d.f₀ → ∀t∈Ioc (0:ℝ) T, + ‖boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2)‖ ≤ C := by + obtain ⟨R,hR⟩ := hd.2.1.bddAbove_image + (show ContinuousOn (fun z : Phase=>‖z.1‖) (tsupport d.f₀) from continuous_fst.norm.continuousOn) + obtain ⟨C,hC,hb⟩ := boundaryLorentzForce_datum_bound hd T₀ (R+T₀) + refine ⟨C,hC,?_⟩ + intro T hT hTT E B F zX hz t ht + have hx0 : ‖zX.1‖ ≤ R := hR ⟨zX,hz,rfl⟩ + have hh := (F.position_lipschitz zX).dist_le_mul t ⟨ht.1.le,ht.2⟩ 0 ⟨le_rfl,hT⟩ + simp only [F.initial,NNReal.coe_one,one_mul,Real.dist_eq,sub_zero,abs_of_nonneg ht.1.le] at hh + apply hb t ⟨ht.1,ht.2.trans hTT⟩ (F.flow zX t).1 _ _ (norm_velocity_lt_one _).le + rw [mem_closedBall,dist_zero_right] + calc + ‖(F.flow zX t).1‖=‖((F.flow zX t).1-zX.1)+zX.1‖ := by rw [sub_add_cancel] + _ ≤ ‖(F.flow zX t).1-zX.1‖+‖zX.1‖ := norm_add_le _ _ + _ ≤ t+R := add_le_add (by simpa only [dist_eq_norm] using hh) hx0 + _ ≤ R+T₀ := by linarith only [ht.2,hTT] + +lemma Admissible.direction_family_datum_uniform_bound {d : Datum} (hd : Admissible d) + (T₀ : ℝ) : + ∃ C : ℝ,0 ≤ C ∧ ∀ (T : ℝ), 0≤T → T≤T₀ → ∀ (E B : Field) (F : PhaseFlowOn E B T) (zX : Phase), + zX∈tsupport d.f₀ → ∀(w c e : ℝ),0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j))) → + (∀i∈S,∀t∈Icc (a i) (b i),w/16 ≤ ‖(F.flow zX t).2‖) → + (∑i∈S,‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • + angularMultiplierCLM w (F.flow zX t).2 + (boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2))‖) ≤ C*(e-c) := by + obtain ⟨C,hC,hbound⟩ := hd.supported_boundary_force_uniform_bound T₀ + refine ⟨64*C,by positivity,?_⟩ + intro T hT hTT E B F zX hz w c e hw hce ι S a b ℓ hℓ hlen hcell hdis hband + have hbnd (i : ι) (hi : i∈S) : + ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • + angularMultiplierCLM w (F.flow zX t).2 + (boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2))‖ ≤ + 64*C*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := by + rw [←integral_const_mul] + apply norm_integral_le_of_norm_le ((directionWeight_integrable (hℓ i hi) (hlen i hi)).norm.const_mul _).integrableOn + filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht + by_cases hψ : directionWeight (a i) (b i) (ℓ i) t=0 + · simp only [hψ,zero_smul,norm_zero,mul_zero,le_refl] + · have htc := (directionWeight_ne_zero_interior (hℓ i hi) (hlen i hi) hψ) + have hG := angularMultiplierCLM_norm_le hw + (show w/64 ≤ ‖(F.flow zX t).2‖ by linarith only [hw,hband i hi t (Ioo_subset_Icc_self htc)]) + have hB := hbound T hT hTT E B F zX hz t ⟨ht.1,ht.2.le⟩ + rw [norm_smul,Real.norm_eq_abs] + calc + _ ≤ |directionWeight (a i) (b i) (ℓ i) t| * (64*C) := + mul_le_mul_of_nonneg_left ((ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul hG hB (norm_nonneg _) (by norm_num))) (abs_nonneg _) + _ = _ := by ring + calc + _ ≤ ∑i∈S,64*C*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := Finset.sum_le_sum hbnd + _ = 64*C*(∑i∈S,∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := (Finset.mul_sum ..).symm + _ ≤ _ := mul_le_mul_of_nonneg_left (directionWeight_family_mass S a b ℓ hℓ hlen hdis hce hcell) (by positivity) + +lemma Admissible.direction_lorentz_uniform_log_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃ Cb Ct Cs : ℝ,0≤Cb ∧ 0≤Ct ∧ 0≤Cs ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), 0≤T → T≤T₀ → SmoothClassicalPrefix d s T → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + zX∈tsupport d.f₀ → IsCompact S → tsupport d.f₀⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖) ≤ + ENNReal.ofReal (Cb*(b-a)) + ENNReal.ofReal (4*Real.pi)⁻¹ * + (ENNReal.ofReal (Ct*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5) + + ENNReal.ofReal (Cs*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*(Real.log (2+P))^5)) := by + obtain ⟨Cb,hCb,hdatum⟩ := hd₀.supported_boundary_force_uniform_bound T₀ + obtain ⟨Ct,hCt,htrans⟩ := hd₀.direct_transport_sharp_physical_log_bound + obtain ⟨Cs,hCs,hsource⟩ := hd₀.direct_source_physical_log_bound + refine ⟨Cb,Ct,Cs,hCb,hCt,hCs,?_⟩ + intro s T F hT hTT hs zX S a b w M A P hzX hS hS0 ha hb hab hJI hM hA hP hL hw hwP hPbound hW HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hcon := (F.continuous_prefixFlow hs.directionCountsEnergyPrefix hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcon.fst.measurable + have hV : Measurable V := hcon.snd.measurable + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + have hS0' : tsupport (fun z=>s.f (0,z))⊆S := by rw [hdata]; exact hS0 + have hDb : ∀t∈Ioo 0 T∩Icc a b, + ‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤Cb := by + intro t ht + dsimp only [X,V,prefixFlow] + rw [prefixClamp_eq (hJ ht.2)] + exact hdatum T hT hTT s.E s.B F zX hzX t ⟨ht.1.1,ht.1.2.le⟩ + have hraw : (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [X,V,prefixFlow,prefixClamp_eq (hJ ht)] + rw [hraw] + apply (hs.direct_lorentz_triangle_bound hT X V hX hV measurableSet_Icc hJ Cb hCb hDb).trans + have hD : ENNReal.ofReal Cb*volume (Icc a b)=ENNReal.ofReal (Cb*(b-a)) := by + rw [Real.volume_Icc,ENNReal.ofReal_mul hCb] + rw [hD] + apply add_le_add le_rfl + apply mul_le_mul' le_rfl + exact add_le_add + (htrans s T F hs.directionCountsEnergyPrefix hT hs.initial_f zX S a b w M A P hS hS0' ha hb hJI hM hA hw hP hwP hL hPbound hW HX HZ) + (hsource s T F hs.directionCountsEnergyPrefix hT hs.initial_f zX S a b w M A P hS hS0' ha hb hab hJI hM hA hP hL hw hwP + hPbound hW HX HZ) + +def directionUnionBudget (E T w M A P Ct Cr Cf Cl Cg : ℝ) : ℝ≥0∞ := + ENNReal.ofReal (Ct*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cr*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cf*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2)+ + ENNReal.ofReal (Cg*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) + +lemma Admissible.direction_physical_family_log_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃Ct Cr Cf Cl Cg Ci Ck Cw : ℝ, + 0≤Ct ∧ 0≤Cr ∧ 0≤Cf ∧ 0≤Cl ∧ 0≤Cg ∧ 0≤Ci ∧ 0≤Ck ∧ 0≤Cw ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (_ : 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀(ι : Type) (D : Finset ι) (c e ℓ : ι→ℝ), + (∀i∈D,0<ℓ i) → (∀i∈D,2*ℓ i≤e i-c i) → + (∀i∈D,Icc (c i) (e i)⊆Icc a b) → + (D:Set ι).Pairwise (fun i j=>Disjoint (Ioo (c i) (e i)) (Ioo (c j) (e j))) → + let G := fun t=>angularMultiplierCLM w (F.flow zX t).2 + (∑i∈D,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (c i) (e i) (ℓ i) t • G t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖)≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + (directionUnionBudget (∫x : Vec,totalEnergy s (0,x)) T w M A P Ct Cr Cf Cl Cg+ + ENNReal.ofReal (Ci*T*(b-a))+ + (D.card:ℝ≥0∞)*ENNReal.ofReal (2*Cw*Real.sqrt (max 1 T)*(Real.log (2+P))^2)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (Ck*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w)) := by + classical + obtain ⟨Ct,Cr,Cf,Cl,hCt,hCr,hCf,hCl,hun⟩ := hd₀.direction_unselected_label_log_bound T₀ + obtain ⟨Ce,Cf',Cl',Cg,Ck,hCe,hCf',hCl',hCg,hCk,hbulk⟩ := hd₀.direction_selected_bulk_log_bound T₀ + obtain ⟨Ci,hCi,hinit⟩ := hd₀.direction_family_initial_bound + obtain ⟨Cm,hCm,hmove⟩ := hd₀.direction_family_moving_log_bound + obtain ⟨Cw,hCw,hweight⟩ := hd₀.direction_family_weight_log_bound + refine ⟨Ct,Cr+Ce,Cf+Cf',Cl+Cl',Cg,Ci,Ck+Cm,Cw,hCt,by positivity,by positivity,by positivity,hCg,hCi,by positivity,hCw,?_⟩ + intro s T F hs hT hTT zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hV HX HZ ι D c e ℓ hℓ hlen hcell hdis + dsimp only + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + have hS0' : tsupport (fun z=>s.f (0,z))⊆S := by rw [hdata]; exact hS0 + have hQ (k) (hk : k∈directionSelection T) : + cappedRepresentative (k 1)≤cappedRepresentative (k 2) ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)*Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1 := by + refine ⟨hk.1.trans ?_,hk.2⟩ + have hp := (cappedRepresentative_pos (k 2)).le + linarith + have hu := hun s T F hs.directionCountsEnergyPrefix hT hTT hs.initial_f zX S a b w M A P hw hS hS0' ha hb hab hJI + hM hA hP hL hw1 hwP hPw hsource hq hV HX HZ + have hbu := hbulk s T F hs.directionCountsEnergyPrefix hT hTT hs.initial_f zX S a b w M A P hw hS hS0' ha hb hab hJI + hM hA hP hL hw1 hwP hPw hsource hq hV HX HZ + have hm := hmove s T F hs.directionCountsEnergyPrefix hT hs.initial_f zX (Icc a b) w P (directionSelection T) + (zero_lt_one.trans_le hP) hL hsource hQ measurableSet_Icc hJ hw hq hV ι D c e ℓ hℓ hlen hcell hdis + have hwc := hweight s T F hs.directionCountsEnergyPrefix hT hs.initial_f zX (Icc a b) w P (directionSelection T) + (zero_lt_one.trans_le hP) hL hsource hQ measurableSet_Icc hJ hw hq hV ι D c e ℓ hℓ hlen hcell + have hic := hinit s T F hs.directionCountsEnergyPrefix hT hs.initial_f zX w a b hw hab ι D c e ℓ (fun _=>directionSelection T) + hℓ hlen hcell (fun i hi=>(hcell i hi).trans hJ) hdis (fun i hi t ht=>hV t (hcell i hi ht)) + have hi : (∑i∈D,ENNReal.ofReal ‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) + (directionSelection T) (directionWeight (c i) (e i) (ℓ i)) (fun t=>angularMultiplierCLM w (F.flow zX t).2) z‖)≤ + ENNReal.ofReal (Ci*T*(b-a)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun i _=>norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal hic + have hforce : (∫⁻t in Icc a b,ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq (hJ ht)] + rw [hforce] at hm + let G := fun t=>angularMultiplierCLM w (F.flow zX t).2 + let W := prefixAngularMultiplier s F.flow T w hw zX + have heq (t : ℝ) (ht : t∈Icc a b) : W t=G t := + (prefixAngular_highband hw zX (hJ ht) (hV t ht)).1 + have huEq (p : ℝ×Phase) : + {p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b}.indicator + (fun p=>ENNReal.ofReal ‖G (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T (directionSelection T) p) • actualLabelSignedForce s F.flow zX T p)‖) p= + ENNReal.ofReal ‖(Icc a b).indicator W (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T (directionSelection T) p) • actualLabelSignedForce s F.flow zX T p)‖ := by + by_cases ht : labelReceiverTime F.flow zX T p∈Icc a b + · simp only [indicator_of_mem ht,indicator_of_mem (show p∈{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b} from ht),heq _ ht] + · simp only [indicator_of_notMem ht,indicator_of_notMem (show p∉{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b} from ht),zero_apply,norm_zero,ENNReal.ofReal_zero] + have hbEq (p : ℝ×Phase) : + {p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b}.indicator + (selectedMultiplierBulkDensity s F.flow zX T (directionSelection T) G) p= + selectedMultiplierBulkDensity s F.flow zX T (directionSelection T) ((Icc a b).indicator W) p := by + by_cases ht : labelReceiverTime F.flow zX T p∈Icc a b + · simp only [indicator_of_mem (show p∈{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b} from ht),selectedMultiplierBulkDensity,indicator_of_mem ht,heq _ ht] + · simp only [indicator_of_notMem (show p∉{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈Icc a b} from ht),selectedMultiplierBulkDensity,indicator_of_notMem ht,zero_apply,norm_zero,ENNReal.ofReal_zero,add_zero] + have hf := hs.actual_angular_family_bound hT hw F zX (directionSelection T) D c e ℓ hℓ hlen hdis + (Icc a b) hJ hcell hV + dsimp only at hf + change _≤ENNReal.ofReal (4*Real.pi)⁻¹*(_+_+_+_+_) at hf + rw [lintegral_congr huEq,lintegral_congr hbEq] at hf + apply hf.trans + apply mul_le_mul' le_rfl + apply (add_le_add (add_le_add (add_le_add (add_le_add hu hi) hwc) hbu) hm).trans_eq + have hE : 0≤ ∫x : Vec,totalEnergy s (0,x) := integral_nonneg (hs.directionCountsEnergyPrefix.total_energy_nonneg ⟨le_rfl,hT⟩) + dsimp only [directionUnionBudget] + rw [show (Cr+Ce)*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5= + Cr*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5+ + Ce*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5 by ring, + show (Cf+Cf')*(∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5= + Cf*(∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5+ + Cf'*(∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5 by ring, + show (Cl+Cl')*(1+(∫x : Vec,totalEnergy s (0,x)))*(max 1 T)^2*(Real.log (2+P))^2= + Cl*(1+(∫x : Vec,totalEnergy s (0,x)))*(max 1 T)^2*(Real.log (2+P))^2+ + Cl'*(1+(∫x : Vec,totalEnergy s (0,x)))*(max 1 T)^2*(Real.log (2+P))^2 by ring, + show (Ck+Cm)*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w= + Ck*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w+Cm*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w by ring] + rw [ENNReal.ofReal_add (by positivity) (by positivity),ENNReal.ofReal_add (by positivity) (by positivity), + ENNReal.ofReal_add (by positivity) (by positivity),ENNReal.ofReal_add (by positivity) (by positivity),mul_add] + simp only [mul_add] + ac_rfl + + + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff NNReal + + +structure WeightedDirectionPartition (V K : ℝ → Vec) (a b w δ : ℝ) where + count : ℕ + time : ℕ → ℝ + ramp : ℕ → ℝ + initial : time 0 = a + terminal : time count = b + time_mem : ∀ i ≤ count, time i ∈ Icc a b + strict : StrictMonoOn time (Iic count) + direction_control : ∀ i < count, ∀ t ∈ Icc (time i) (time (i+1)), + ‖momentumDirection (V t) - momentumDirection (V (time i))‖ ≤ δ + exit : ∀ i < count-1, + ‖momentumDirection (V (time (i+1))) - momentumDirection (V (time i))‖ = δ + ramp_pos : ∀ i < count-1, 0 < ramp i + ramp_separation : ∀ i < count-1, 2*ramp i ≤ time (i+1)-time i + signed_exit : ∀ i < count-1, + w*δ/2 ≤ ‖∫ t in time i..time (i+1), + directionWeight (time i) (time (i+1)) (ramp i) t • angularMultiplier w (V t) (K t)‖ + variation : ∀ i < count-1, + (∫ t in time i..time (i+1), |deriv (directionWeight (time i) (time (i+1)) (ramp i)) t|) = 2 + +lemma IncrementBootstrap.weighted_direction_partition {V K : ℝ → Vec} + {T M A P L a b δ : ℝ} (H : IncrementBootstrap V T M A P L) + (k : ℕ) (hk : 16 ≤ (2:ℝ)^k) (hab : a ≤ b) + (hJ : Icc a b ⊆ Icc 0 T) (hV : ContinuousOn V (Icc a b)) + (hK : ContinuousOn K (Icc a b)) + (hd : ∀ t ∈ Ioo a b, HasDerivAt V (K t) t) + (hband : ∀ t ∈ Icc a b, (2:ℝ)^k/8 ≤ q (V t) ∧ q (V t) ≤ 8*(2:ℝ)^k) + (hM : 0 < M) (hA : 0 < A) (hP : 0 < P) (hL : 0 < L) (hδ : 0 < δ) : + Nonempty (WeightedDirectionPartition V K a b ((2:ℝ)^k) δ) := by + classical + obtain ⟨n,t,ht0,htn,htmem,hstep⟩ := + H.finite_direction_stops k hk hab hV hJ hband hM hA hP hL hδ + have hcell (i : ℕ) (hi : i < n) : Icc (t i) (t (i+1)) ⊆ Icc a b := + Icc_subset_Icc (htmem i (by omega)).1 (htmem (i+1) (by omega)).2 + have hwit (i : ℕ) (hi : i < n-1) : + ∃ ℓ : ℝ, 0 < ℓ ∧ 2*ℓ ≤ t (i+1)-t i ∧ + ((2:ℝ)^k*δ/2 ≤ ‖∫ u in t i..t (i+1), + directionWeight (t i) (t (i+1)) ℓ u • angularMultiplier ((2:ℝ)^k) (V u) (K u)‖) ∧ + (∫ u in t i..t (i+1), |deriv (directionWeight (t i) (t (i+1)) ℓ) u|)=2 ∧ + tsupport (directionWeight (t i) (t (i+1)) ℓ) ⊆ Icc (t i) (t (i+1)) := by + have hin : i < n := by omega + apply H.exists_weighted_angular_exit k hk ((hcell i hin).trans hJ) (hstep i hin).1.le + (hV.mono (hcell i hin)) (hK.mono (hcell i hin)) + · intro u hu + exact hd u ⟨(htmem i (by omega)).1.trans_lt hu.1, + hu.2.trans_le (htmem (i+1) (by omega)).2⟩ + · exact fun u hu => hband u (hcell i hin hu) + · exact hM + · exact hA + · exact hP + · exact hL + · exact hδ + · exact ((hstep i hin).2.2 (by omega)).1.ge + let ℓ : ℕ → ℝ := fun i => if hi : i < n-1 then (hwit i hi).choose else 1 + have hℓ (i : ℕ) (hi : i < n-1) : ℓ i = (hwit i hi).choose := dite_eq_left hi + refine ⟨{ + count := n, time := t, ramp := ℓ, initial := ht0, terminal := htn, + time_mem := htmem, + strict := strictMonoOn_Iic_of_lt_succ (fun i hi => (hstep i hi).1), + direction_control := fun i hi => (hstep i hi).2.1, + exit := fun i hi => ((hstep i (by omega)).2.2 (by omega)).1, + ramp_pos := ?_, ramp_separation := ?_, signed_exit := ?_, variation := ?_ }⟩ + · intro i hi + rw [hℓ i hi] + exact (hwit i hi).choose_spec.1 + · intro i hi + rw [hℓ i hi] + exact (hwit i hi).choose_spec.2.1 + · intro i hi + rw [hℓ i hi] + exact (hwit i hi).choose_spec.2.2.1 + · intro i hi + rw [hℓ i hi] + exact (hwit i hi).choose_spec.2.2.2.1 + +namespace WeightedDirectionPartition +variable {V K : ℝ → Vec} {a b w δ : ℝ} + +lemma cell_subset (D : WeightedDirectionPartition V K a b w δ) + {i : ℕ} (hi : i < D.count) : Icc (D.time i) (D.time (i+1)) ⊆ Icc a b := + Icc_subset_Icc (D.time_mem i (by omega)).1 (D.time_mem (i+1) (by omega)).2 + +lemma interiors_disjoint (D : WeightedDirectionPartition V K a b w δ) : + (Finset.range (D.count-1) : Set ℕ).Pairwise + (fun i j => Disjoint (Ioo (D.time i) (D.time (i+1))) + (Ioo (D.time j) (D.time (j+1)))) := by + intro i hi j hj hne + have hi' : i < D.count-1 := Finset.mem_range.mp hi + have hj' : j < D.count-1 := Finset.mem_range.mp hj + apply Ioo_disjoint_Ioo.mpr + rcases lt_or_gt_of_ne hne with hij | hji + · exact (min_le_left _ _).trans ((D.strict.monotoneOn (by simp only [mem_Iic]; omega) + (by simp only [mem_Iic]; omega) (by omega)).trans (le_max_right _ _)) + · exact (min_le_right _ _).trans ((D.strict.monotoneOn (by simp only [mem_Iic]; omega) + (by simp only [mem_Iic]; omega) (by omega)).trans (le_max_left _ _)) + +lemma weight_sum (D : WeightedDirectionPartition V K a b w δ) (t : ℝ) : + (∑ i ∈ Finset.range (D.count-1), + |directionWeight (D.time i) (D.time (i+1)) (D.ramp i) t|) ≤ 1 := by + have hnonneg (i : ℕ) (hi : i ∈ Finset.range (D.count-1)) : + 0 ≤ directionWeight (D.time i) (D.time (i+1)) (D.ramp i) t := + (directionWeight_bounds (D.ramp_pos i (Finset.mem_range.mp hi)) + (D.ramp_separation i (Finset.mem_range.mp hi))).1 + simp_rw [Finset.sum_congr rfl (fun i hi => abs_of_nonneg (hnonneg i hi))] + exact directionWeight_sum_le_one (Finset.range (D.count-1)) D.time + (fun i => D.time (i+1)) D.ramp + (fun i hi => D.ramp_pos i (Finset.mem_range.mp hi)) + (fun i hi => D.ramp_separation i (Finset.mem_range.mp hi)) D.interiors_disjoint t + +lemma complete_force_lower (D : WeightedDirectionPartition V K a b w δ) : + (D.count-1 : ℕ)*w*δ/2 ≤ ∑ i ∈ Finset.range (D.count-1), + ‖∫ t in D.time i..D.time (i+1), + directionWeight (D.time i) (D.time (i+1)) (D.ramp i) t • + angularMultiplier w (V t) (K t)‖ := by + calc + _ = ∑ i ∈ Finset.range (D.count-1), w*δ/2 := by simp; ring + _ ≤ _ := Finset.sum_le_sum (fun i hi => D.signed_exit i (Finset.mem_range.mp hi)) + +lemma total_variation (D : WeightedDirectionPartition V K a b w δ) : + (∑ i ∈ Finset.range (D.count-1), ∫ t in D.time i..D.time (i+1), + |deriv (directionWeight (D.time i) (D.time (i+1)) (D.ramp i)) t|) = + 2*(D.count-1 : ℕ) := by + rw [Finset.sum_congr rfl (fun i hi => D.variation i (Finset.mem_range.mp hi))] + simp [mul_comm] + +end WeightedDirectionPartition + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +private lemma vec_integrable_smul {X : Type*} [MeasurableSpace X] {μ : Measure X} + {f : X→Vec} (h : Integrable f μ) (c : ℝ) : + Integrable (fun x=>c • f x) μ := by + exact ⟨h.1.const_smul c,HasFiniteIntegral.smul c h.2⟩ + +lemma SmoothClassicalPrefix.multiplier_retarded_force_integrable {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (F : PhaseFlowOn s.E s.B T) (zX : Phase) + {W : ℝ→Vec→L[ℝ]Vec} (hW : ContinuousOn W (Icc 0 T)) : + IntegrableOn (fun t=>W t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))) + (Ioo (0:ℝ) T) := by + classical + let A := sourceForceConeKernel s F.flow zX + have hA : ContinuousOn A (coneKernelDomain T) := + F.normalised_source_force_continuousOn hs.directionCountsEnergyPrefix zX + let B : ConeKernelState→Vec := fun q=>W q.1.1 (A q) + have hB : ContinuousOn B (coneKernelDomain T) := + (hW.comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).clm_apply hA + have hg := F.triangleConeKernel_integrable hs.directionCountsEnergyPrefix hT zX hA + have hb := F.triangleConeKernel_integrable hs.directionCountsEnergyPrefix hT zX hB + have hi : Integrable (fun z : ConeCoordinate=>∫v : Vec,triangleConeKernel s F.flow zX T A (z,v)) + (volume.prod (volume.prod sphereMeasure)) := hg.integral_prod_left + have hib : Integrable (fun t : ℝ=>(4*Real.pi)⁻¹ • + ∫p : ℝ×Sphere,∫v : Vec,triangleConeKernel s F.flow zX T B ((t,p),v) + ∂volume ∂volume.prod sphereMeasure) := by + exact vec_integrable_smul hb.integral_prod_left.integral_prod_left _ + apply (integrable_indicator_iff measurableSet_Ioo).mp + apply hib.congr + have hvi := Measure.ae_ae_of_ae_prod hg.prod_right_ae + filter_upwards [hi.prod_right_ae,hvi] with t ht hvt + have he : (∫p : ℝ×Sphere,∫v : Vec,triangleConeKernel s F.flow zX T B ((t,p),v) + ∂volume ∂volume.prod sphereMeasure)= + W t (∫p : ℝ×Sphere,∫v : Vec,triangleConeKernel s F.flow zX T A ((t,p),v) + ∂volume ∂volume.prod sphereMeasure) := by + rw [←(W t).integral_comp_comm ht] + apply integral_congr_ae + filter_upwards [hvt] with p hp + rw [←(W t).integral_comp_comm hp] + apply integral_congr_ae + exact ae_of_all _ (fun v=>triangleConeKernel_receiver_multiplier s F.flow zX T A W ((t,p),v)) + rw [he] + by_cases htT : t∈Ioo 0 T + · rw [indicator_of_mem htT,F.triangleConeKernel_fiber_sphere zX A htT ht, + hs.retarded_force_source_polar htT.1 htT.2 _ _ (norm_velocity_lt_one _),add_sub_cancel_left,map_smul] + rfl + · rw [indicator_of_notMem htT] + have hz : ∀p : ℝ×Sphere,∀v : Vec,triangleConeKernel s F.flow zX T A ((t,p),v)=0 := by + intro p v + have hp : ((t,p),v)∉trianglePhaseDomain T := fun hp=>htT hp.1 + simp only [triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero,map_zero,smul_zero] + +lemma SmoothClassicalPrefix.direction_weighted_force_integrable {d : Datum} {s : Solution} {T w : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) (hw : 0directionWeight a b ℓ t • angularMultiplierCLM w (F.flow zX t).2 + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)))) (Ioo (0:ℝ) T) ∧ + IntegrableOn (fun t=>directionWeight a b ℓ t • angularMultiplierCLM w (F.flow zX t).2 + (boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))) (Ioo (0:ℝ) T) := by + let W := fun t=>directionWeight a b ℓ t • prefixAngularMultiplier s F.flow T w hw zX t + have hW : Continuous W := (directionWeight_lipschitz a b ℓ).continuous.smul + (F.prefixAngular_regular hs.directionCountsEnergyPrefix hT hw zX).1 + have he (t : ℝ) (K : Vec) : + W t K=directionWeight a b ℓ t • angularMultiplierCLM w (F.flow zX t).2 K := by + by_cases ht : t∈tsupport (directionWeight a b ℓ) + · have hc := directionWeight_tsupport hℓ hlen ht + simp only [W,smul_apply,(prefixAngular_highband hw zX (hcell hc) (hband t hc)).1] + · simp only [W,smul_apply,image_eq_zero_of_notMem_tsupport ht,zero_smul] + have hi : IntegrableOn (fun t=>W t (prefixMomentumForce s F.flow T zX t)) (Ioo (0:ℝ) T) := + ((hW.clm_apply (F.continuous_prefixMomentumForce hs.directionCountsEnergyPrefix hT zX)).continuousOn.integrableOn_Icc).mono_set Ioo_subset_Icc_self + have hiK : IntegrableOn (fun t=>directionWeight a b ℓ t • angularMultiplierCLM w (F.flow zX t).2 + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)))) (Ioo (0:ℝ) T) := by + apply hi.congr + filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht + simp only [he,prefixMomentumForce,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self ht),lorentzField,lorentzPhase] + have hiD := hs.multiplier_retarded_force_integrable hT F zX hW.continuousOn + have hiD' : IntegrableOn (fun t=>directionWeight a b ℓ t • angularMultiplierCLM w (F.flow zX t).2 + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))) (Ioo (0:ℝ) T) := by + simpa only [he] using hiD + refine ⟨hiK,?_⟩ + apply (hiK.sub hiD').congr + exact ae_of_all _ (fun t=>by simp only [Pi.sub_apply,map_sub,smul_sub,sub_sub_cancel]) + +lemma directionWeight_interval_eq_global {a b ℓ T : ℝ} (hℓ : 0<ℓ) + (hlen : 2*ℓ≤b-a) (hcell : Icc a b⊆Icc 0 T) (H : ℝ→Vec) : + (∫t in a..b,directionWeight a b ℓ t • H t)= + ∫t in Ioo (0:ℝ) T,directionWeight a b ℓ t • H t := by + have hab : a≤b := by linarith + rw [intervalIntegral.integral_of_le hab,integral_Ioc_eq_integral_Ioo] + symm + apply setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Ioo + · intro t ht + exact ⟨(hcell ⟨le_rfl,hab⟩).1.trans_lt ht.1,ht.2.trans_le (hcell ⟨hab,le_rfl⟩).2⟩ + · intro t ht + have hz : directionWeight a b ℓ t=0 := by + by_contra hn + exact ht.2 (directionWeight_ne_zero_interior hℓ hlen hn) + rw [hz,zero_smul] + +lemma SmoothClassicalPrefix.direction_force_family_triangle {d : Datum} {s : Solution} {T w : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) (hw : 0angularMultiplierCLM w (F.flow zX t).2 + let K := fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)) + let B := fun t=>boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2) + (∑i∈D,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • G t (K t)‖)≤ + (∑i∈D,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • G t (K t-B t)‖)+ + (∑i∈D,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • G t (B t)‖) := by + classical + dsimp only + rw [←Finset.sum_add_distrib] + apply Finset.sum_le_sum + intro i hi + obtain ⟨hiK,hiB⟩ := hs.direction_weighted_force_integrable hT hw F zX (hℓ i hi) (hlen i hi) (hcell i hi) (hband i hi) + simp only [map_sub,smul_sub] + rw [integral_sub hiK hiB,←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal (norm_le_norm_sub_add _ _) + +lemma Admissible.direction_complete_count_cost_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃ Ct Cr Cf Cl Cg Ci Ck Cw Cb : ℝ, + 0≤Ct ∧ 0≤Cr ∧ 0≤Cf ∧ 0≤Cl ∧ 0≤Cg ∧ 0≤Ci ∧ 0≤Ck ∧ 0≤Cw ∧ 0≤Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P δ : ℝ) (_ : 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ D : WeightedDirectionPartition (fun t=>(F.flow zX t).2) + (fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) a b w δ, + ENNReal.ofReal ((D.count-1:ℕ)*w*δ/2)≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + (directionUnionBudget (∫x : Vec,totalEnergy s (0,x)) T w M A P Ct Cr Cf Cl Cg+ + ENNReal.ofReal (Ci*T*(b-a))+ + (D.count-1:ℕ)*ENNReal.ofReal (2*Cw*Real.sqrt (max 1 T)*(Real.log (2+P))^2)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (Ck*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w))+ + ENNReal.ofReal (Cb*(b-a)) := by + classical + obtain ⟨Ct,Cr,Cf,Cl,Cg,Ci,Ck,Cw,hCt,hCr,hCf,hCl,hCg,hCi,hCk,hCw,hfam⟩ := + hd₀.direction_physical_family_log_bound T₀ + obtain ⟨Cb,hCb,hdatum⟩ := hd₀.direction_family_datum_uniform_bound T₀ + refine ⟨Ct,Cr,Cf,Cl,Cg,Ci,Ck,Cw,Cb,hCt,hCr,hCf,hCl,hCg,hCi,hCk,hCw,hCb,?_⟩ + intro s T F hs hT hTT zX S a b w M A P δ hw hzX hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hV HX HZ D + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + let I := Finset.range (D.count-1) + have hℓ i (hi : i∈I) := D.ramp_pos i (Finset.mem_range.mp hi) + have hlen i (hi : i∈I) := D.ramp_separation i (Finset.mem_range.mp hi) + have hcell i (hi : i∈I) : Icc (D.time i) (D.time (i+1))⊆Icc a b := + D.cell_subset (by have := Finset.mem_range.mp hi; omega) + have hf := hfam s T F hs hT hTT zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw + hsource hq hV HX HZ ℕ I D.time (fun i=>D.time (i+1)) D.ramp hℓ hlen hcell D.interiors_disjoint + have hd := hdatum T hT hTT s.E s.B F zX hzX w a b hw hab ℕ I D.time (fun i=>D.time (i+1)) D.ramp + hℓ hlen hcell D.interiors_disjoint (fun i hi t ht=>hV t (hcell i hi ht)) + have htri := hs.direction_force_family_triangle hT hw F zX I D.time (fun i=>D.time (i+1)) D.ramp + hℓ hlen (fun i hi=>(hcell i hi).trans hJ) (fun i hi t ht=>hV t (hcell i hi ht)) + have hlo := ENNReal.ofReal_le_ofReal D.complete_force_lower + rw [ENNReal.ofReal_sum_of_nonneg (fun i _=>norm_nonneg _)] at hlo + have he i (hi : i∈I) := directionWeight_interval_eq_global (hℓ i hi) (hlen i hi) ((hcell i hi).trans hJ) + (fun t=>angularMultiplier w (F.flow zX t).2 + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)))) + have hlo' : ENNReal.ofReal ((D.count-1:ℕ)*w*δ/2)≤ + ∑i∈I,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (D.time i) (D.time (i+1)) (D.ramp i) t • + angularMultiplierCLM w (F.flow zX t).2 + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1)))‖ := by + apply hlo.trans_eq + apply Finset.sum_congr rfl + intro i hi + rw [he i hi] + simp only [angularMultiplierCLM_apply] + have hd' := ENNReal.ofReal_le_ofReal hd + rw [ENNReal.ofReal_sum_of_nonneg (fun i _=>norm_nonneg _)] at hd' + have hh := hlo'.trans (htri.trans (add_le_add hf hd')) + simpa only [I,Finset.card_range] using hh + +def directionUnionConstant (E H M A Ct Cr Cf Cl Cg : ℝ) : ℝ := + Ct*(1+E)*(1+16384*(M+Real.sqrt A))*H+ + Cr*(1+E)*(1+M+Real.sqrt A)+Cf*E*(1+16384*(M+Real.sqrt A))+ + Cl*(1+E)*H^2+Cg*H*(1+E)*(1+16384*(M+Real.sqrt A)) + +lemma directionUnionConstant_nonneg {E H M A Ct Cr Cf Cl Cg : ℝ} + (hE : 0≤E) (hH : 0≤H) (hM : 0≤M) (hCt : 0≤Ct) (hCr : 0≤Cr) + (hCf : 0≤Cf) (hCl : 0≤Cl) (hCg : 0≤Cg) : + 0≤directionUnionConstant E H M A Ct Cr Cf Cl Cg := by + unfold directionUnionConstant + positivity + +lemma directionUnionBudget_scalar_bound {E T H w M A P Ct Cr Cf Cl Cg : ℝ} + (hE : 0≤E) (hH : max 1 T≤H) (hM : 0≤M) (hw : 1≤w) (hL : 1≤Real.log (2+P)) + (hCt : 0≤Ct) (hCr : 0≤Cr) (hCf : 0≤Cf) (hCl : 0≤Cl) (hCg : 0≤Cg) : + directionUnionBudget E T w M A P Ct Cr Cf Cl Cg≤ + ENNReal.ofReal (directionUnionConstant E H M A Ct Cr Cf Cl Cg*w*(Real.log (2+P))^5) := by + have hh : 0≤H := (by positivity : (0:ℝ)≤ max 1 T).trans hH + have hw0 := zero_le_one.trans hw + have hL0 := zero_le_one.trans hL + have h2 : (Real.log (2+P))^2≤w*(Real.log (2+P))^5 := by + exact (pow_le_pow_right₀ hL (by omega : 2≤5)).trans (le_mul_of_one_le_left (by positivity) hw) + have h3 : (Real.log (2+P))^3≤(Real.log (2+P))^5 := pow_le_pow_right₀ hL (by omega) + have ht : Ct*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5≤ + Ct*(1+E)*(1+16384*(M+Real.sqrt A))*H*w*(Real.log (2+P))^5 := by gcongr + have hl : Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2≤ + Cl*(1+E)*H^2*w*(Real.log (2+P))^5 := by + calc + _≤Cl*(1+E)*H^2*(Real.log (2+P))^2 := by gcongr + _≤Cl*(1+E)*H^2*(w*(Real.log (2+P))^5) := mul_le_mul_of_nonneg_left h2 (by positivity) + _=_ := by ring + have hg : Cg*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3≤ + Cg*H*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5 := by gcongr + unfold directionUnionBudget + apply (add_le_add (add_le_add (add_le_add (add_le_add (ENNReal.ofReal_le_ofReal ht) le_rfl) le_rfl) + (ENNReal.ofReal_le_ofReal hl)) (ENNReal.ofReal_le_ofReal hg)).trans_eq + rw [←ENNReal.ofReal_add (by positivity) (by positivity),←ENNReal.ofReal_add (by positivity) (by positivity), + ←ENNReal.ofReal_add (by positivity) (by positivity),←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + unfold directionUnionConstant + ring + +lemma direction_receiver_charge_scalar_bound {F C H w L : ℝ} + (hF : 0≤F) (hC : 0≤C) (hH : 0≤H) (hw : 0 nlinarith + + + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +def datumEnergyNumber (d : Datum) : ℝ := + ∫x : Vec,(‖d.E₀ x‖^2+‖d.B₀ x‖^2)/2+∫v : Vec,q v*d.f₀ (x,v) + +lemma Admissible.datumEnergyNumber_nonneg {d : Datum} (hd : Admissible d) : + 0≤datumEnergyNumber d := by + apply integral_nonneg + intro x + apply add_nonneg (by positivity) + exact integral_nonneg (fun v=>mul_nonneg (q_pos v).le (hd.2.2.1 _)) + +lemma SmoothClassicalPrefix.initial_energy_eq {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) : + (∫x : Vec,totalEnergy s (0,x))=datumEnergyNumber d := by + unfold totalEnergy particleEnergy datumEnergyNumber + simp only [hs.initial_E,hs.initial_B,hs.initial_f] + +lemma Admissible.direction_complete_count_real_bound {d : Datum} (hd : Admissible d) + (T₀ M A : ℝ) (hM : 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ D : WeightedDirectionPartition (fun t=>(F.flow zX t).2) + (fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) a b w δ, + ((D.count-1:ℕ):ℝ)*w*δ/2≤B*w*(Real.log (2+P))^6+ + ((D.count-1:ℕ):ℝ)*C*(Real.log (2+P))^2 := by + classical + obtain ⟨Ct,Cr,Cf,Cl,Cg,Ci,Ck,Cw,Cb,hCt,hCr,hCf,hCl,hCg,hCi,hCk,hCw,hCb,hcost⟩ := + hd.direction_complete_count_cost_bound T₀ + obtain ⟨Fb,Ft,Fs,hFb,hFt,hFs,hforce⟩ := hd.direction_lorentz_uniform_log_bound T₀ + let E := datumEnergyNumber d + let H := max 1 T₀ + let r := (4*Real.pi)⁻¹ + let U := directionUnionConstant E H M A Ct Cr Cf Cl Cg + let R := Fb+r*(Ft*(1+E)*(1+16384*(M+Real.sqrt A))*H+Fs*(1+E)*(1+M+Real.sqrt A)) + let B := r*(U+Ci*H+R*Ck*Real.sqrt H)+Cb + let C := r*2*Cw*Real.sqrt H + have hE : 0≤E := hd.datumEnergyNumber_nonneg + have hH : 0≤H := by dsimp [H]; positivity + have hr : 0≤r := by dsimp [r]; positivity + have hU : 0≤U := directionUnionConstant_nonneg hE hH hM.le hCt hCr hCf hCl hCg + have hR : 0≤R := by dsimp [R]; positivity + have hB : 0≤B := by dsimp [B]; positivity + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨B,C,hB,hC,?_⟩ + intro s T F hs hT hTT zX S a b w P δ hw hzX hS hS0 ha hb hab hJI hP hL hw1 hwP hPw hLs hsource hq hV HX HZ D + have hTH : max 1 T≤H := max_le_max le_rfl hTT + have hI : 0≤b-a := sub_nonneg.mpr hab + have hI1 : b-a≤1 := by + apply hJI.trans + apply (sq_le_one_iff_abs_le_one _).mpr + rw [abs_of_nonneg (div_nonneg hw.le (zero_le_one.trans hP))] + exact (div_le_one (zero_lt_one.trans_le hP)).mpr hwP + have hc := hcost s T F hs hT hTT zX S a b w M A P δ hw hzX hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hV HX HZ D + rw [hs.initial_energy_eq] at hc + have hf := hforce s T F hT hTT hs zX S a b w M A P hzX hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hsource hq HX HZ + dsimp only at hf + rw [hs.initial_energy_eq] at hf + have hf' : (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)≤ + ENNReal.ofReal (R*w*Real.sqrt w*(Real.log (2+P))^5) := by + have he : (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq (Icc_subset_Icc ha hb ht),lorentzField,lorentzPhase] + rw [he] + exact hf.trans (direction_force_budget_scalar_bound hE hTH hM.le hw1 hL hFb hFt hFs hI1) + have hu := directionUnionBudget_scalar_bound (A:=A) hE hTH hM.le hw1 hL hCt hCr hCf hCl hCg + have hnum := direction_count_cost_scalar_bound (N:=D.count-1) hU hR hr hCi hCk hCw hCb hT hTH hI hI1 hw1 hL hLs + have ht : ENNReal.ofReal (((D.count-1:ℕ):ℝ)*w*δ/2)≤ + ENNReal.ofReal (B*w*(Real.log (2+P))^6+((D.count-1:ℕ):ℝ)*C*(Real.log (2+P))^2) := by + apply hc.trans + apply le_trans _ hnum + apply add_le_add _ le_rfl + apply mul_le_mul' le_rfl + exact add_le_add (add_le_add (add_le_add hu le_rfl) le_rfl) (mul_le_mul' hf' le_rfl) + exact (ENNReal.ofReal_le_ofReal_iff (by positivity)).mp ht + +lemma Admissible.direction_count_bound {d : Datum} (hd : Admissible d) + (T₀ M A : ℝ) (hM : 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ D : WeightedDirectionPartition (fun t=>(F.flow zX t).2) + (fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) a b w δ, + (D.count:ℝ)≤C*(Real.log (2+P))^6/δ := by + obtain ⟨B,C,hB,hC,hbound⟩ := hd.direction_complete_count_real_bound T₀ M A hM hA + refine ⟨4*B+1,by positivity,?_⟩ + filter_upwards [eventually_direction_absorption C] with P hP + intro s T F hs hT hTT zX S a b w δ hzX hS hS0 ha hb hab hJI hw hwP hδ hδ1 hsource hq hV HX HZ D + obtain ⟨hw1,hw16,hPw,hLs,habs⟩ := hP.2.2 w δ hw hδ + have hw0 := zero_lt_one.trans_le hw1 + have hδ0 := (Real.rpow_pos_of_pos hw0 (-3/5)).trans_le hδ + have hc := hbound s T F hs hT hTT zX S a b w P δ hw0 hzX hS hS0 ha hb hab hJI hP.1 hP.2.1 hw1 hwP hPw hLs hsource hq hV HX HZ D + have hn := direction_count_absorb hw0 hδ0 hP.2.1 hB hc habs hδ1 + apply le_trans _ hn + exact_mod_cast (show D.count≤D.count-1+1 by omega) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCutoffs.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCutoffs.lean new file mode 100644 index 0000000000000000000000000000000000000000..ba1ac683122197ca0eb494c5269e3ddb2ebb8481 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionCutoffs.lean @@ -0,0 +1,1315 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalProjectedRemainderSourceTruncate +import OAI.Analysis.VlasovMaxwell.Retarded.DirectForce +import OAI.Analysis.VlasovMaxwell.Retarded.SourceMajorantFamily + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.central_density_low_receiver_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (a b w P : ℝ), + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)*w ≤ 32} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) k) ≤ + ENNReal.ofReal (C*max 1 T*w*(Real.log (2+P))^2) := by + classical + obtain ⟨Cρ,hCρ,hnear⟩ := hd₀.central_density_near_bin + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + refine ⟨12*128^3*32^3*Cρ*Cn^2,by positivity,?_⟩ + intro s T F hs hT h0 zX a b w P ha hb hab hw hPw hP hL hsource + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let I := (w/P)^2 + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)*w ≤ 32} + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator cfun=f := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,show f k=cfun k from indicator_of_mem (show k∈source∩sector from ⟨hsrc,hk⟩) cfun] + · rw [indicator_of_mem hk,show f k=0 from indicator_of_notMem (fun h=>hsrc h.1) cfun] + dsimp [cfun] + rw [F.physicalBinDensity_integral_source_truncate hs hsource N hN X V + hα.snd.measurable measurableSet_Icc hJ w k hsrc,mul_zero] + · rw [indicator_of_notMem hk,show f k=0 from indicator_of_notMem (fun h=>hk h.2) cfun] + have hvol : volume (Icc a b) ≤ ENNReal.ofReal I := by + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hab + have hrad (np nt nf : ℕ) : (∑'nr,f ![np,nt,nf,nr]) ≤ + (if nps.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) k)≤ + ENNReal.ofReal (C*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + classical + obtain ⟨Cs,hCs,hstable⟩ := hd₀.central_density_stable_log_sum + obtain ⟨Cl,hCl,hlow⟩ := hd₀.central_density_low_receiver_log_sum + refine ⟨Cs+Cl,add_nonneg hCs hCl,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hPw hsource HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let L := Real.log (2+P) + let B := 1+16384*(M+Real.sqrt A) + let H := max 1 T + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16} + let high : Set (Fin 4→ℕ) := {k | k∈sector ∧ 32≤cappedRepresentative (k 2)*w} + let low : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)*w≤32} + let f := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + have hsumb : (∑'k : Fin 4→ℕ,sector.indicator f k)≤ + (∑'k : Fin 4→ℕ,high.indicator f k)+(∑'k : Fin 4→ℕ,low.indicator f k) := by + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈sector + · rw [indicator_of_mem hk] + by_cases hh : 32≤cappedRepresentative (k 2)*w + · rw [indicator_of_mem (show k∈high from ⟨hk,hh⟩)] + exact le_self_add + · rw [indicator_of_mem (show k∈low from (lt_of_not_ge hh).le)] + exact le_add_self + · rw [indicator_of_notMem hk] + exact bot_le + have hh : (∑'k : Fin 4→ℕ,high.indicator f k)≤ + ENNReal.ofReal (Cs*(1+E)*B*w*L^3) := + hstable s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hsource HX HZ + have hl : (∑'k : Fin 4→ℕ,low.indicator f k)≤ENNReal.ofReal (Cl*H*w*L^2) := + hlow s T F hs hT h0 zX a b w P ha hb hab hw hPw hP hL hsource + have hE : 0≤E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hE1 : 1≤1+E := by linarith only [hE] + have hB1 : 1≤B := by dsimp [B]; linarith only [hM,Real.sqrt_nonneg A] + have hH1 : 1≤H := le_max_left _ _ + have hH0 : 0≤H := zero_le_one.trans hH1 + have hB0 : 0≤B := zero_le_one.trans hB1 + have hL0 : 0≤L := zero_le_one.trans hL + have hL23 : L^2≤L^3 := by nlinarith only [mul_le_mul_of_nonneg_left hL (sq_nonneg L)] + change (∑'k : Fin 4→ℕ,sector.indicator f k)≤_ + apply (hsumb.trans (add_le_add hh hl)).trans + rw [←ENNReal.ofReal_add (by positivity : 0≤Cs*(1+E)*B*w*L^3) (by positivity : 0≤Cl*H*w*L^2)] + apply ENNReal.ofReal_le_ofReal + have hh' : Cs*(1+E)*B*w*L^3≤Cs*H*(1+E)*B*w*L^3 := by + calc + _ = Cs*1*(1+E)*B*w*L^3 := by ring + _ ≤ _ := by gcongr + have hl' : Cl*H*w*L^2≤Cl*H*(1+E)*B*w*L^3 := by + calc + _ = Cl*H*1*1*w*L^2 := by ring + _ ≤ _ := by gcongr + calc + _ ≤ Cs*H*(1+E)*B*w*L^3+Cl*H*(1+E)*B*w*L^3 := add_le_add hh' hl' + _ = _ := by dsimp [H,E,B,L]; ring + +lemma Admissible.geometry_cutoff_small_sector_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + classical + obtain ⟨C,hC,hsum⟩ := hd₀.central_density_small_sector_log_sum + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + refine ⟨c*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hPw hsource hband HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16} + let f := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband' : ∀t∈Icc a b,w/16≤‖V t‖ := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht + have hbnd (k : Fin 4→ℕ) (hk : k∈sector) : + (∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))≤ENNReal.ofReal c*f k := by + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + have hθ : 0<θ := cappedRepresentative_pos _ + have hφ : 0<φ := cappedRepresentative_pos _ + have hsmall : (representativeClosedBin T w k).dmax≤(representativeClosedBin T w k).Dmin := by + change 8*θ^2≤φ^2/2 + have hh : θ≤φ/16 := hk + have hh2 := (sq_le_sq₀ hθ.le (by positivity : 0≤φ/16)).mpr hh + nlinarith only [hh2] + have hh := physicalGeometryCutoff_integral_bound (X:=X) hs hα.snd.measurable + (representativeClosedBin T w k) measurableSet_Icc hJ hc hcut hw hθ hφ.le hsmall + (representativeClosedBin_radius_pos T w k) le_rfl le_rfl hband' Q + have he : 78400000*c*φ^2/θ=c*(78400000*φ^2/θ) := by ring + rw [he,ENNReal.ofReal_mul hc,mul_assoc] at hh + exact hh + have hs1 : (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalGeometryCutoffDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ∑'k : Fin 4→ℕ,ENNReal.ofReal c*sector.indicator f k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈sector + · simpa only [indicator_of_mem hk] using hbnd k hk + · simp only [indicator_of_notMem hk,mul_zero,le_refl] + rw [ENNReal.tsum_mul_left] at hs1 + have hs2 := hsum s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab + hM hA hP hL hw hwP hPw hsource HX HZ + apply hs1.trans ((mul_le_mul' le_rfl hs2).trans_eq _) + rw [←ENNReal.ofReal_mul hc] + congr 1 + ring + +lemma Admissible.projected_remainder_small_sector_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + classical + obtain ⟨Cs,hCs,hcentral⟩ := hd₀.central_density_small_sector_log_sum + obtain ⟨Cr,hCr,hremainder⟩ := hd₀.projected_remainder_selected_sum + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + let C := Cs+Cr*Cn^2 + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hPw hsource hband HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let W := ∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖ + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1} + let stable : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16} + let rfun := fun k : Fin 4→ℕ=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b) + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator rfun=Q.indicator rfun := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,indicator_of_mem (show k∈Q from ⟨hsrc,hk⟩)] + · rw [indicator_of_mem hk,indicator_of_notMem (show k∉Q from fun h=>hsrc h.1)] + exact F.physicalProjectedRemainder_integral_source_truncate hs hsource N hN X V K + hα.snd.measurable measurableSet_Icc hJ w k hsrc + · rw [indicator_of_notMem hk,indicator_of_notMem (show k∉Q from fun h=>hk h.2)] + have hQ : ∀k∈Q,k 0s.f (0,z))⊆S → + 0≤a → b≤T → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z + ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (128*(3840+94080000*c)*φ^2/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)* + ((ENNReal.ofReal (128*Cg*p^3*θ^2))^2*ENNReal.ofReal (768*I*r*φ^2))^(1/2:ℝ))+ + ENNReal.ofReal (128*(3840+94080000*c)*φ/p)* + ((ENNReal.ofReal (40*(I+2*r)*E))^(1/2:ℝ)* + ((ENNReal.ofReal (128*Cb*p^3*θ^2))^2*ENNReal.ofReal (768*I*r*φ^2))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,c,hCg,hCb,hc,hsource⟩ := hd₀.projected_source_two_budget_bound + refine ⟨Cg,Cb,c,hCg,hCb,hc,?_⟩ + intro s T F hs hT h0 zX S Q k a b I w hS hS0 ha hb hI hab hw hsmall hband + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let B := representativeClosedBin T w k + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hθ : 0 < θ := cappedRepresentative_pos _ + have hφ : 0 < φ := cappedRepresentative_pos _ + have hr : 0 < r := mul_pos (zero_lt_one.trans_le (le_max_left _ _)) (cappedRepresentative_pos _) + have hBmax : B.rmax=2*r := by dsimp [B,representativeClosedBin,r]; ring + have hBmin : B.rmin=r/2 := rfl + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdsmall : B.dmax ≤ φ^2/32 := by + change 8*θ^2 ≤ φ^2/32 + have ht : θ ≤ φ/16 := hsmall + nlinarith only [sq_le_sq₀ hθ.le (by positivity : 0 ≤ φ/16) |>.mpr ht] + have hvol : volume (Icc a b)≤ENNReal.ofReal I := by + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hab + have hmeasure : volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)≤ + ENNReal.ofReal (768*I*r*φ^2) := by + calc + _ ≤ ENNReal.ofReal I*ENNReal.ofReal (2*r)*ENNReal.ofReal (384*φ^2) := by + apply mul_le_mul' (mul_le_mul' hvol _) le_rfl + apply ENNReal.ofReal_le_ofReal + rw [hBmax,hBmin] + linarith only [hr] + _ = _ := by + rw [←ENNReal.ofReal_mul hI.le,←ENNReal.ofReal_mul (by positivity : 0≤I*(2*r))] + congr 1 + ring + have hgood : ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hab) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ) ≤ 5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ + ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hab,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0 ≤ 1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ) ≤ 10), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 2*I)] + congr 1 + field_simp [hI.ne'] + ring + have hband' (t : ℝ) (ht : t∈Icc a b) : w/16 ≤ ‖V t‖ := by + simpa only [V,prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht + have hangle (D : ℝ) (hD : D∈Icc B.Dmin B.Dmax) : DyadicWindow 1 (k 2) (Real.sqrt (D/2)) := + dyadicWindow_one_sqrt (k 2) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.1) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.2) + have hn := hsource s T F hs hT h0 zX B S Q a b I w (p/128) p θ φ 1 1 (k 2) + hS hS0 hJ hI hw (by positivity) hp hθ hφ (by norm_num) + (by change 0 < r/2; positivity) (by change 0 < φ^2/2; positivity) + le_rfl (by change p/32 ≤ p; linarith only [hp]) le_rfl le_rfl le_rfl le_rfl + (by norm_num [B,representativeClosedBin]) (hdsmall.trans (by change φ^2/32 ≤ φ^2/2; nlinarith only [sq_nonneg φ])) + hangle hband' + dsimp only at hn + have hθ1 : θ ≤ 1 := cappedRepresentative_le_one _ + simp only [min_eq_left hθ1] at hn + have heqG : (3840+94080000*c)*φ^2/(p/128*θ^2)=128*(3840+94080000*c)*φ^2/(p*θ^2) := by ring + have heqB : (3840+94080000*c)*φ/(p/128)=128*(3840+94080000*c)*φ/p := by ring + rw [heqG,heqB] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact (min_le_left _ _).trans (mul_le_mul' le_rfl hmeasure) + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hmag (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact (min_le_left _ _).trans (mul_le_mul' le_rfl hmeasure) + +lemma sqrt_near_product {a b I E r φ D : ℝ} (ha : 0≤a) (hb : 0≤b) + (hI : 0≤I) (hE : 0≤E) (hr : 0≤r) (hφ : 0≤φ) (hD : 0≤D) : + Real.sqrt (a*E)*Real.sqrt (D^2*(b*I*r*φ^2))= + D*φ*Real.sqrt (a*I)*Real.sqrt (b*E)*Real.sqrt r := by + rw [Real.sqrt_mul (sq_nonneg _),Real.sqrt_sq hD] + calc + _ = D*Real.sqrt ((a*E)*(b*I*r*φ^2)) := by + rw [Real.sqrt_mul (mul_nonneg ha hE)] + ring + _ = D*Real.sqrt ((a*I)*(b*E)*r*φ^2) := by congr 2; ring + _ = _ := by + rw [Real.sqrt_mul (by positivity : 0≤(a*I)*(b*E)*r), + Real.sqrt_sq hφ,Real.sqrt_mul (by positivity : 0≤(a*I)*(b*E)), + Real.sqrt_mul (mul_nonneg ha hI)] + ring + +lemma source_near_good_scalar {K C I E r φ p θ : ℝ} + (hC : 0≤C) (hI : 0≤I) (hE : 0≤E) (hr : 0≤r) (hφ : 0≤φ) + (hp : 0s.f (0,z))⊆S → + 0≤a → b≤T → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z + ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (Cg*Real.sqrt E*I*p^2*φ^3*Real.sqrt r+ + Cb*Real.sqrt E*Real.sqrt I*Real.sqrt (I+2*r)*p^2*θ^2*φ^2*Real.sqrt r) := by + obtain ⟨Cg,Cb,c,hCg,hCb,hc,hnear⟩ := hd₀.projected_source_near_bin + let K := 128*(3840+94080000*c) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨128*K*Cg*Real.sqrt 15360,128*K*Cb*Real.sqrt 30720,by positivity,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q k a b I w hS hS0 ha hb hI hab hw hsmall hband + have hh := hnear s T F hs hT h0 zX S Q k a b I w hS hS0 ha hb hI hab hw hsmall hband + apply hh.trans_eq + apply source_near_ennreal_scalar hK hCg hCb hI.le + (integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩)) + (mul_nonneg (zero_le_one.trans (le_max_left _ _)) (cappedRepresentative_pos _).le) + (cappedRepresentative_pos _).le + (by dsimp [sourceRepresentative]; positivity) (cappedRepresentative_pos _) + +lemma capped_radius_sqrt_sum {H : ℝ} (hH : 1≤H) : + (∑'n : ℕ,ENNReal.ofReal (Real.sqrt (H*cappedRepresentative n)))≤ENNReal.ofReal (4*H) := by + have hH0 : 0≤H := zero_le_one.trans hH + have hs : Real.sqrt H≤H := (Real.sqrt_le_iff.mpr ⟨hH0,by nlinarith only [hH]⟩) + have hhalf : Real.sqrt ((2:ℝ)⁻¹)≤3/4 := (Real.sqrt_le_iff.mpr ⟨by norm_num,by norm_num⟩) + have hpow (n : ℕ) : Real.sqrt (cappedRepresentative n)≤(3/4:ℝ)^n := by + induction n with + | zero => norm_num [cappedRepresentative] + | succ n ih => + rw [cappedRepresentative,pow_succ,Real.sqrt_mul (by positivity)] + rw [pow_succ] + exact mul_le_mul ih hhalf (Real.sqrt_nonneg _) (by positivity) + have hpoint (n : ℕ) : ENNReal.ofReal (Real.sqrt (H*cappedRepresentative n))≤ + ENNReal.ofReal H*ENNReal.ofReal ((3/4:ℝ)^n) := by + rw [←ENNReal.ofReal_mul hH0,Real.sqrt_mul hH0] + exact ENNReal.ofReal_le_ofReal (mul_le_mul hs (hpow n) (Real.sqrt_nonneg _) hH0) + have hge : (∑'n : ℕ,ENNReal.ofReal ((3/4:ℝ)^n))=4 := by + have hsum : Summable (fun n : ℕ=>(3/4:ℝ)^n) := + summable_geometric_of_lt_one (by norm_num) (by norm_num) + rw [←ENNReal.ofReal_tsum_of_nonneg (fun n=>by positivity) hsum, + tsum_geometric_of_lt_one (by norm_num : (0:ℝ)≤3/4) (by norm_num : (3/4:ℝ)<1)] + norm_num + calc + _ ≤ ∑'n : ℕ,ENNReal.ofReal H*ENNReal.ofReal ((3/4:ℝ)^n) := ENNReal.tsum_le_tsum hpoint + _ = _ := by + rw [ENNReal.tsum_mul_left,hge,←ENNReal.ofReal_ofNat (n:=4),←ENNReal.ofReal_mul hH0] + congr 1 + ring + +lemma source_low_receiver_scalar {Cg Cb E H p θ φ r w P : ℝ} + (hCg : 0≤Cg) (hCb : 0≤Cb) (hE : 0≤E) (hH : 1≤H) (hp : 0≤p) + (hθ : 0≤θ) (hφ : 0<φ) (hr : 0≤r) (hw : 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + cappedRepresentative (k 2)*w≤32} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(1+E)*(max 1 T)^2*(Real.log (2+P))^2) := by + classical + obtain ⟨Cg,Cb,hCg,hCb,hnear⟩ := hd₀.projected_source_near_real_bin + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + let B := 128^2*32^2*Cg+2*128^2*32^3*Cb + have hB : 0≤B := by dsimp [B]; positivity + refine ⟨8*B*Cn^2,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q a b w P hS hS0 ha hb hab hw hwP hPw hP hL hsource hband + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let I := (w/P)^2 + let H := max 1 T + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + cappedRepresentative (k 2)*w≤32} + let rfun := fun k : Fin 4→ℕ=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b) + have hE : 0≤E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hH : 1≤H := le_max_left _ _ + have hH0 : 0≤H := zero_le_one.trans hH + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator rfun=f := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,show f k=rfun k from indicator_of_mem (show k∈source∩sector from ⟨hsrc,hk⟩) rfun] + · rw [indicator_of_mem hk,show f k=0 from indicator_of_notMem (fun h=>hsrc h.1) rfun] + exact F.physicalProjectedSource_integral_source_truncate hs hsource N hN X V Q + hα.snd.measurable measurableSet_Icc hJ w k hsrc + · rw [indicator_of_notMem hk,show f k=0 from indicator_of_notMem (fun h=>hk h.2) rfun] + have hrad (np nt nf : ℕ) : (∑'nr,f ![np,nt,nf,nr])≤ + (if nps.f (0,z))⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1)} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.source_majorant_remaining_radial_cover + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + refine ⟨C*Cn^4,by positivity,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw hwP hsource HX HZ + dsimp only + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let U := C*(1+∫x : Vec,totalEnergy s (0,x))*(1+M+Real.sqrt A)*w*Real.log (2+P) + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1)} + let f := sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + have hj : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hα := (F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hzero (k : Fin 4→ℕ) + (hk : ¬(k 0hj) hk + refine ⟨by linarith only [hu.1],?_⟩ + by_cases hs : cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) + · exact Or.inl hs + · right + obtain ⟨j,hjn,hnear⟩ := hk.2 + have hjθ := cappedRepresentative_le_four (hnear 1).2 + have hkφ := cappedRepresentative_le_four (hnear 2).1 + have hjselect : cappedRepresentative (j 1)≤(1/1024)*cappedRepresentative (j 2) := by + linarith only [hjθ,hkφ,lt_of_not_ge hs] + have hjprod : 1< sourceRepresentative (j 0)*cappedRepresentative (j 1)* + Real.sqrt (max 1 T*cappedRepresentative (j 3)) := by + by_contra hh + exact hjn ⟨hjselect,le_of_not_gt hh⟩ + have hp := dyadic_neighbor_product_le (T:=T) hnear + linarith only [hjprod,hp] + +lemma Admissible.projected_source_structural_edge_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤ C ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤ a → b≤ T → a≤ b → b-a≤(w/P)^2 → + 0< M → 0≤ A → 1≤ P → 1≤ Real.log (2+P) → 0< w → w≤ P → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤ P) → + (∀t∈Icc a b,w/16≤‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let edge : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) ∧ + cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16} + (∑'k : Fin 4→ℕ,edge.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.source_majorant_remaining_log_sum + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + let D := 64+5880000*c + have hD : 0≤ D := by dsimp [D]; positivity + refine ⟨D*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw hwP hsource hW HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun k=>representativeClosedBin T w k + let edge : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) ∧ + cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16} + let sector : Set (Fin 4→ℕ) := {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1)} + have hj : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hα := (F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hpoint (k : Fin 4→ℕ) : edge.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (B k) T w Q z ∂physicalBinMeasure V (B k) (Icc a b)) k ≤ + ENNReal.ofReal D*sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (B k) z ∂physicalBinMeasure V (B k) (Icc a b)) k := by + by_cases hk : k∈edge + · rw [Set.indicator_of_mem hk,Set.indicator_of_mem (show k∈sector from hk.1)] + apply physicalProjectedSourceIntegral_le_majorant (X:=X) (V:=V) hs hα.snd.measurable (B k) Q measurableSet_Icc hj hc hcut hw + · intro t ht + simp only [V,prefixFlow,prefixClamp_eq (hj ht)] + exact hW t ht + · change 0< max 1 T*cappedRepresentative (k 3)/2 + exact div_pos (mul_pos (lt_of_lt_of_le zero_lt_one (le_max_left _ _)) + (cappedRepresentative_pos _)) (by norm_num) + · apply representativeClosedBin_small_of_angle + have hφ := cappedRepresentative_pos (k 2) + linarith only [hk.2,hφ] + · rw [Set.indicator_of_notMem hk] + exact bot_le + apply (ENNReal.tsum_le_tsum hpoint).trans + rw [ENNReal.tsum_mul_left] + apply (mul_le_mul' le_rfl (hbound s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hsource HX HZ)).trans_eq + rw [←ENNReal.ofReal_mul hD] + congr 1 + ring + +def directionSourceEdge : Set (Fin 4→ℕ) := + {k | cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) ∧ + cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16} + +def directionSourceLow (w : ℝ) : Set (Fin 4→ℕ) := + {k | cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 ∧ + cappedRepresentative (k 2)*w≤32} + +def directionSourceFar (T w P : ℝ) : Set (Fin 4→ℕ) := + {k | sourceRepresentative (k 0)≤128*P ∧ + cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 ∧ + 32≤ cappedRepresentative (k 2)*w ∧ + 1/32≤ sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))} + +lemma direction_source_cover_sum {T w P : ℝ} (f : (Fin 4→ℕ)→ℝ≥0∞) + (S : Set (Fin 4→ℕ)) + (hS : ∀k∈S,cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 ∧ + (cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) ∨ + 1/32≤ sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3)))) + (hf : ∀k,¬sourceRepresentative (k 0)≤128*P→f k=0) : + (∑'k,S.indicator f k)≤ + (∑'k,directionSourceEdge.indicator f k)+ + (∑'k,(directionSourceFar T w P).indicator f k)+ + (∑'k,(directionSourceLow w).indicator f k) := by + classical + rw [←ENNReal.tsum_add,←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈S + · rw [Set.indicator_of_mem hk] + by_cases hp : sourceRepresentative (k 0)≤128*P + · obtain ⟨hθ,hcase⟩ := hS k hk + by_cases he : cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) + · have hm : k∈directionSourceEdge := ⟨he,hθ⟩ + rw [Set.indicator_of_mem hm] + exact (le_add_of_nonneg_right (bot_le)).trans (le_add_of_nonneg_right (bot_le)) + · by_cases hl : cappedRepresentative (k 2)*w≤32 + · have hm : k∈directionSourceLow w := ⟨hθ,hl⟩ + rw [Set.indicator_of_mem hm] + exact le_add_of_nonneg_left (bot_le) + · have hm : k∈directionSourceFar T w P := ⟨hp,hθ,(lt_of_not_ge hl).le,hcase.resolve_left he⟩ + rw [Set.indicator_of_mem hm] + exact (le_add_of_nonneg_left (bot_le)).trans (le_add_of_nonneg_right (bot_le)) + · rw [hf k hp] + exact bot_le + · rw [Set.indicator_of_notMem hk] + exact bot_le + +lemma Admissible.direction_boundary_source_log_sum {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃Ce Cf Cl : ℝ,0≤ Ce ∧ 0≤ Cf ∧ 0≤ Cl ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤ T → T≤ T₀ → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤ a → b≤ T → a≤ b → b-a≤(w/P)^2 → + 0< M → 0≤ A → 1≤ P → 1≤ Real.log (2+P) → 1≤ w → w≤ P → P≤ w^2 → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤ P) → + (∀t∈Icc a b,w/16≤‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let Q := directionSelection T + (∑'k : Fin 4→ℕ,(dyadicSelectionBoundary Q).indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (Ce*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cf*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2) := by + classical + obtain ⟨Ce,hCe,hedge⟩ := hd₀.projected_source_structural_edge_log_sum + obtain ⟨Cf,hCf,hfar⟩ := hd₀.projected_source_stable_far_log_sum T₀ + obtain ⟨Cl,hCl,hlow⟩ := hd₀.projected_source_low_receiver_log_sum + refine ⟨Ce,Cf,Cl,hCe,hCf,hCl,?_⟩ + intro s T F hs hT hTT h0 zX S a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw hwP hPw hsource hW HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let Q := directionSelection T + let f := fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b) + have hj : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hα := (F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + obtain ⟨N,hN,_⟩ := hcount P hP hL + have h1024 : 1024*P≤(2:ℝ)^N := by linarith only [hN,hP] + have hzero (k : Fin 4→ℕ) (hk : ¬sourceRepresentative (k 0)≤128*P) : f k=0 := by + apply F.physicalProjectedSource_integral_source_truncate hs hsource N h1024 X V Q + hα.snd.measurable measurableSet_Icc hj w k + intro hc + exact hk hc.2.2 + have hroute (k : Fin 4→ℕ) (hk : k∈dyadicSelectionBoundary Q) := + directionSelection_boundary_split hk + have hh := direction_source_cover_sum (T:=T) (w:=w) (P:=P) f (dyadicSelectionBoundary Q) + (fun k hk=>⟨by have hφ := cappedRepresentative_pos (k 2); linarith only [(hroute k hk).1,hφ], + (hroute k hk).2⟩) hzero + apply hh.trans + exact add_le_add (add_le_add + (hedge s T F hs hT h0 zX S Q a b w M A P hS hS0 ha hb hab hJI hM hA hP hL + (zero_lt_one.trans_le hw) hwP hsource hW HX HZ) + (hfar s T F hs hT hTT h0 zX S Q a b w M A P hS hS0 ha hb hJI hM hA + (zero_lt_one.trans_le hP) hL hw hwP hW HX HZ)) + (hlow s T F hs hT h0 zX S Q a b w P hS hS0 ha hb hJI + (zero_lt_one.trans_le hw) hwP hPw (zero_lt_one.trans_le hP) hL hsource hW) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma tsum_set_indicator_mono {ι : Type*} {A B : Set ι} (hAB : A⊆B) + (f : ι→ℝ≥0∞) : (∑'i,A.indicator f i)≤∑'i,B.indicator f i := by + classical + apply ENNReal.tsum_le_tsum + intro i + by_cases hi : i∈A + · rw [Set.indicator_of_mem hi,Set.indicator_of_mem (hAB hi)] + · rw [Set.indicator_of_notMem hi] + exact bot_le + +lemma Admissible.direction_sourceCutoff_label_log_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃Ce Cf Cl : ℝ,0≤ Ce ∧ 0≤ Cf ∧ 0≤ Cl ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤ T → T≤ T₀ → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (hw : 0s.f (0,z))⊆S → + 0≤ a → b≤ T → a≤ b → b-a≤(w/P)^2 → + 0< M → 0≤ A → 1≤ P → 1≤ Real.log (2+P) → 1≤ w → w≤ P → P≤ w^2 → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤ P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + (∀t∈Icc a b,w/16≤‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖(Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T (directionSelection T) + (fun p=>cutoffSourceTangent (lorentzField s.E s.B (p.1,F.flow p.2 p.1)).2) p)‖)≤ + ENNReal.ofReal (Ce*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cf*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2) := by + classical + obtain ⟨Ce,Cf,Cl,hCe,hCf,hCl,hbound⟩ := hd₀.direction_boundary_source_log_sum T₀ + refine ⟨Ce,Cf,Cl,hCe,hCf,hCl,?_⟩ + intro s T F hs hT hTT h0 zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hW HX HZ + dsimp only + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + obtain ⟨N,hN,_⟩ := hcount P (zero_lt_one.trans_le hP) hL + have hEuler (σ : ℝ) (hσ : σ∈Icc 0 T) (z : Phase) (hf : s.f (σ,z)≠0) : + 1024*q z.2≤(2:ℝ)^N := + (mul_le_mul_of_nonneg_left (F.eulerian_supported_momentum hs hsource hσ z.1 z.2 hf) + (by norm_num : (0:ℝ)≤1024)).trans hN + apply (F.actual_sourceCutoff_label_boundary_sum hs hT zX (directionSelection T) hw + measurableSet_Icc (Icc_subset_Icc ha hb) hq hW N hEuler).trans + apply (tsum_set_indicator_mono inter_subset_left _).trans + exact hbound s T F hs hT hTT h0 zX S a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hW HX HZ + +lemma Admissible.direction_geometryCutoff_label_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤ C ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (hw : 0s.f (0,z))⊆S → + 0≤ a → b≤ T → b-a≤(w/P)^2 → + 0< M → 0≤ A → 0< P → 1≤ Real.log (2+P) → w≤ P → P≤ w^2 → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤ P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + (∀t∈Icc a b,w/16≤‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖(Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX) + (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T (directionSelection T) + (fun p=>cutoffGeometryTangent (branchTime F.flow zX p.2 T p.1-p.1) (branchRate F.flow zX p.2 T p.1) + (velocity (F.flow zX (branchTime F.flow zX p.2 T p.1)).2) (velocity (F.flow p.2 p.1).2) + (branchDirection F.flow zX p.2 T p.1)) p)‖)≤ + ENNReal.ofReal (C*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.geometry_cutoff_small_sector_log_sum + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hw hS hS0 ha hb hJI hM hA hP hL hwP hPw hsource hq hW HX HZ + dsimp only + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + obtain ⟨N,hN,_⟩ := hcount P hP hL + have hEuler (σ : ℝ) (hσ : σ∈Icc 0 T) (z : Phase) (hf : s.f (σ,z)≠0) : + 1024*q z.2≤(2:ℝ)^N := + (mul_le_mul_of_nonneg_left (F.eulerian_supported_momentum hs hsource hσ z.1 z.2 hf) + (by norm_num : (0:ℝ)≤1024)).trans hN + apply (F.actual_geometryCutoff_label_boundary_sum hs hT zX (directionSelection T) hw + measurableSet_Icc (Icc_subset_Icc ha hb) hq hW N hEuler).trans + apply (tsum_set_indicator_mono (B:={k : Fin 4→ℕ | cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16}) + (fun k hk=>by + change cappedRepresentative (k 1)≤ cappedRepresentative (k 2)/16 + have hh := (directionSelection_boundary_split hk.1).1 + have hφ := cappedRepresentative_pos (k 2) + linarith only [hh,hφ]) _).trans + exact hbound s T F hs hT h0 zX S (directionSelection T) a b w M A P hS hS0 ha hb hJI hM hA hP hL hw hwP hPw hsource hW HX HZ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionOverlap.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..f39eeff7ac6004436682044d317a800d2bbfa7d6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DirectionOverlap.lean @@ -0,0 +1,640 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.MomentumDirection +import OAI.Analysis.VlasovMaxwell.Geometry.UpperTimeCut + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma SmoothClassicalPrefix.energyPrefix {d : Datum} {s : Solution} {H : ℝ} + (hs : SmoothClassicalPrefix d s H) : EnergyPrefix s H := by + refine ⟨(hs.f_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro t ht x v + have hh := (hs.equations t ht.1.le ht.2).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro t ht x + have he := (hs.equations t ht.1.le ht.2).2.1 x + have hb := (hs.equations t ht.1.le ht.2).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +lemma physicalPhaseForce_cutoff {s : Solution} {τ H t : ℝ} (hτH : τ < H) + (x a : Vec) (p : Phase) (hp : t-coneRadius x p.1 ≤ τ) : + physicalPhaseForce (cutoffPrefix τ H s) t x a p=physicalPhaseForce s t x a p := by + simp only [physicalPhaseForce,cutoffPrefix,upperTimeExtend,upperTimeCut_one hτH hp,one_smul] + +lemma SmoothClassicalPrefix.retarded_force_phase_domain {d : Datum} {s : Solution} {H t : ℝ} + (hs : SmoothClassicalPrefix d s H) (ht : 0 < t) (htH : t < H) (x a : Vec) : + s.E (t,x)+cross a (s.B (t,x))=boundaryLorentzForce (datumBoundarySolution d) t x a+ + (4*Real.pi)⁻¹ • ∫ p in retardedPhaseDomain t x, + s.f (t-‖x-p.1‖,p) • physicalPhaseForce s t x a p := by + let τ := (t+H)/2 + have htτ : t < τ := by dsimp [τ]; linarith + have hτH : τ < H := by dsimp [τ]; linarith + have hτ0 : 0 ≤ τ := ht.le.trans htτ.le + have he := classical_retarded_force_phase_domain_before (hs.cutoff_classical_before hτ0 hτH) + (hs.cutoff_smooth hτH) ht htτ x a + rw [(cutoffPrefix_eq hτH htτ.le s).2.1 x,(cutoffPrefix_eq hτH htτ.le s).2.2 x] at he + refine he.trans ?_ + congr 2 + apply setIntegral_congr_fun (isOpen_retardedPhaseDomain t x).measurableSet + intro p hp + have htime : t-coneRadius x p.1 ≤ τ := (sub_le_self t (norm_nonneg _)).trans htτ.le + change (cutoffPrefix τ H s).f (t-‖x-p.1‖,p) • physicalPhaseForce (cutoffPrefix τ H s) t x a p = _ + rw [physicalPhaseForce_cutoff hτH x a p htime] + change (cutoffPrefix τ H s).f (t-coneRadius x p.1,p) • _ = s.f (t-coneRadius x p.1,p) • _ + rw [(cutoffPrefix_eq hτH htime s).1 p] + +lemma SmoothClassicalPrefix.retarded_force_label_integral {d : Datum} {s : Solution} {H t : ℝ} + (hs : SmoothClassicalPrefix d s H) (F : PhaseFlowOn s.E s.B H) + (ht : 0 < t) (htH : t < H) (x a : Vec) : + s.E (t,x)+cross a (s.B (t,x))=boundaryLorentzForce (datumBoundarySolution d) t x a+ + (4*Real.pi)⁻¹ • ∫ z in initialConeLabels t x, + (1-dot (coneDirection x (F.retardedSource ⟨ht.le,htH.le⟩ x z).1) + (velocity (F.retardedSource ⟨ht.le,htH.le⟩ x z).2))⁻¹ • + (d.f₀ z • physicalPhaseForce s t x a (F.retardedSource ⟨ht.le,htH.le⟩ x z)) := by + rw [hs.retarded_force_phase_domain ht htH x a] + congr 2 + rw [F.retarded_transport_integral hs.energyPrefix.f_smooth hs.energyPrefix.vlasov + ⟨ht.le,htH.le⟩ x] + apply setIntegral_congr_fun (isOpen_lt ((continuous_const.sub continuous_fst).norm) continuous_const).measurableSet + intro z hz + change _ • (s.f (0,z) • _) = _ • (d.f₀ z • _) + rw [hs.initial_f] + rfl + +lemma SmoothClassicalPrefix.exists_phaseFlowOn {d : Datum} {s : Solution} {H : ℝ} + (hs : SmoothClassicalPrefix d s H) (hH : 0 < H) : Nonempty (PhaseFlowOn s.E s.B H) := + RVM.exists_phaseFlowOn hH + ((hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1)) + ((hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1)) +end RVM + +open Set MeasureTheory +open scoped ENNReal + +namespace RVM + +def DirectionOverlap {ι κ : Type*} (l r : ι → ℝ) (l' r' : κ → ℝ) := + {ij : ι × κ // max (l ij.1) (l' ij.2) < min (r ij.1) (r' ij.2)} + +noncomputable instance {ι κ : Type*} [Fintype ι] [Fintype κ] + (l r : ι → ℝ) (l' r' : κ → ℝ) : Fintype (DirectionOverlap l r l' r') := by + unfold DirectionOverlap + exact Fintype.ofFinite _ + +lemma directionOverlap_card_le {ι κ : Type*} [Fintype ι] [Fintype κ] + (l r : ι → ℝ) (l' r' : κ → ℝ) + (hleft : ∀ i j, i ≠ j → Disjoint (Ico (l i) (r i)) (Ico (l j) (r j))) + (hright : ∀ i j, i ≠ j → Disjoint (Ico (l' i) (r' i)) (Ico (l' j) (r' j))) : + Fintype.card (DirectionOverlap l r l' r') ≤ Fintype.card ι + Fintype.card κ := by + classical + let charge : DirectionOverlap l r l' r' → ι ⊕ κ := fun z => + if l z.1.1 ≤ l' z.1.2 then Sum.inr z.1.2 else Sum.inl z.1.1 + have hc : Function.Injective charge := by + intro a b hab + have ha := a.2 + have hb := b.2 + dsimp [charge] at hab + split_ifs at hab with h₁ h₂ h₂ + · have hj : a.1.2 = b.1.2 := Sum.inr.inj hab + have hi : a.1.1 = b.1.1 := by + by_contra hn + have hd := Set.disjoint_left.mp (hleft _ _ hn) + apply hd (a := l' a.1.2) + · exact ⟨h₁, (le_max_right _ _).trans_lt (lt_of_lt_of_le ha (min_le_left _ _))⟩ + · rw [hj] + exact ⟨h₂, (le_max_right _ _).trans_lt (lt_of_lt_of_le hb (min_le_left _ _))⟩ + exact Subtype.ext (Prod.ext hi hj) + · have hi : a.1.1 = b.1.1 := Sum.inl.inj hab + have hj : a.1.2 = b.1.2 := by + by_contra hn + have hd := Set.disjoint_left.mp (hright _ _ hn) + apply hd (a := l a.1.1) + · exact ⟨(lt_of_not_ge h₁).le, + (le_max_left _ _).trans_lt (lt_of_lt_of_le ha (min_le_right _ _))⟩ + · rw [hi] + exact ⟨(lt_of_not_ge h₂).le, + (le_max_left _ _).trans_lt (lt_of_lt_of_le hb (min_le_right _ _))⟩ + exact Subtype.ext (Prod.ext hi hj) + simpa only [Fintype.card_sum] using Fintype.card_le_of_injective charge hc + +lemma refined_direction_hit_duration {ι κ : Type*} [Fintype ι] [Fintype κ] + (l r : ι → ℝ) (l' r' : κ → ℝ) + (hleft : ∀ i j, i ≠ j → Disjoint (Ico (l i) (r i)) (Ico (l j) (r j))) + (hright : ∀ i j, i ≠ j → Disjoint (Ico (l' i) (r' i)) (Ico (l' j) (r' j))) + {X Y a u : ℝ → Vec} {D H : Set ℝ} {c R : ℝ} + (v : DirectionOverlap l r l' r' → Vec) + (hc : 0 < c) + (hD : ∀ i, Ico (l i) (r i) ⊆ D) + (hcover : ∀ t ∈ H, (∃ i, t ∈ Ico (l i) (r i)) ∧ + (∃ j, t ∈ Ico (l' j) (r' j))) + (hXc : ContinuousOn X D) (hYc : ContinuousOn Y D) + (hX : ∀ t ∈ interior D, HasDerivAt X (a t) t) + (hY : ∀ t ∈ interior D, HasDerivAt Y (u t) t) + (hv : ∀ z, c ≤ ‖v z‖) + (hvel : ∀ z t, t ∈ Ioo (max (l z.1.1) (l' z.1.2)) + (min (r z.1.1) (r' z.1.2)) → ‖u t - a t - v z‖ ≤ c/2) + (hsep : ∀ t ∈ H, ‖Y t - X t‖ ≤ R) : + volume H ≤ (Fintype.card ι + Fintype.card κ : ℝ≥0∞) * + ENNReal.ofReal (4*R/c) := by + classical + let C : DirectionOverlap l r l' r' → Set ℝ := + fun z => Ico (max (l z.1.1) (l' z.1.2)) (min (r z.1.1) (r' z.1.2)) + have hCD (z : DirectionOverlap l r l' r') : C z ⊆ D := by + intro t ht + exact hD z.1.1 ⟨(le_max_left _ _).trans ht.1, ht.2.trans_le (min_le_left _ _)⟩ + have hcount := directionOverlap_card_le l r l' r' hleft hright + have hcov : H ⊆ ⋃ z, H ∩ C z := by + intro t ht + obtain ⟨⟨i, hi⟩, ⟨j, hj⟩⟩ := hcover t ht + have hz : max (l i) (l' j) < min (r i) (r' j) := + (max_le hi.1 hj.1).trans_lt (lt_min hi.2 hj.2) + exact mem_iUnion.mpr ⟨⟨(i,j),hz⟩,ht,max_le hi.1 hj.1,lt_min hi.2 hj.2⟩ + have hcell (z : DirectionOverlap l r l' r') : + volume (H ∩ C z) ≤ ENNReal.ofReal (4*R/c) := by + apply stable_cell_duration (convex_Ico _ _) inter_subset_right hc (hv z) + (hXc.mono (hCD z)) (hYc.mono (hCD z)) + · intro t ht + exact hX t (interior_mono (hCD z) ht) + · intro t ht + exact hY t (interior_mono (hCD z) ht) + · intro t ht + apply hvel z t + simpa only [C, interior_Ico] using ht + · intro t ht + exact hsep t ht.1 + calc + volume H ≤ volume (⋃ z, H ∩ C z) := measure_mono hcov + _ ≤ ∑ z, volume (H ∩ C z) := measure_iUnion_fintype_le volume _ + _ ≤ ∑ _z : DirectionOverlap l r l' r', ENNReal.ofReal (4*R/c) := + Finset.sum_le_sum (fun z _ => hcell z) + _ = (Fintype.card (DirectionOverlap l r l' r') : ℝ≥0∞) * + ENNReal.ofReal (4*R/c) := by simp + _ ≤ _ := by + gcongr + exact_mod_cast hcount + +lemma retarded_boundary_hit_duration {H : Set ℝ} (arrival : ℝ → ℝ) + (B : Finset ℝ) {L : ℝ} + (hdelay : ∀ s ∈ H, arrival s - s ≤ L) : + volume {s ∈ H | ∃ b ∈ B, s ≤ b ∧ b ≤ arrival s} ≤ + (B.card : ℝ≥0∞) * ENNReal.ofReal L := by + classical + have hcov : {s ∈ H | ∃ b ∈ B, s ≤ b ∧ b ≤ arrival s} ⊆ + ⋃ b ∈ B, Icc (b-L) b := by + intro s hs + obtain ⟨b, hb, hsb, hba⟩ := hs.2 + exact mem_iUnion.mpr ⟨b, mem_iUnion.mpr ⟨hb, by + have := hdelay s hs.1 + constructor <;> linarith⟩⟩ + calc + _ ≤ volume (⋃ b ∈ B, Icc (b-L) b) := measure_mono hcov + _ ≤ ∑ b ∈ B, volume (Icc (b-L) b) := measure_biUnion_finset_le B _ + _ = (B.card : ℝ≥0∞) * ENNReal.ofReal L := by + simp only [Real.volume_Icc,sub_sub_cancel] + simp + +lemma PhaseFlowOn.refined_direction_occupation {s : Solution} {T t p c R : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (ht : t ∈ Icc 0 T) + (zX : Phase) {H : Phase → Set ℝ} (n : Phase → ℕ) (m N : ℕ) + (l r : ∀ z, Fin (n z) → ℝ) (l' r' : Fin m → ℝ) + (hleft : ∀ z i j, i ≠ j → Disjoint (Ico (l z i) (r z i)) (Ico (l z j) (r z j))) + (hright : ∀ i j, i ≠ j → Disjoint (Ico (l' i) (r' i)) (Ico (l' j) (r' j))) + (hn : ∀ z, n z ≤ N) + (v : ∀ z, DirectionOverlap (l z) (r z) l' r' → Vec) + (hc : 0 < c) + (hD : ∀ z i, Ico (l z i) (r z i) ⊆ Icc 0 T) + (hcover : ∀ z τ, τ ∈ H z → (∃ i, τ ∈ Ico (l z i) (r z i)) ∧ + (∃ j, τ ∈ Ico (l' j) (r' j))) + (hv : ∀ z k, c ≤ ‖v z k‖) + (hvel : ∀ z k τ, τ ∈ Ioo (max (l z k.1.1) (l' k.1.2)) + (min (r z k.1.1) (r' k.1.2)) → + ‖velocity (F.flow z τ).2 - velocity (F.flow zX τ).2 - v z k‖ ≤ c/2) + (hsep : ∀ z τ, τ ∈ H z → ‖(F.flow z τ).1 - (F.flow zX τ).1‖ ≤ R) + (hmom : ∀ z, (H z).Nonempty → p ≤ q (F.flow z t).2) : + ENNReal.ofReal p * labelOccupation (fun z => s.f (0,z)) H ≤ + ENNReal.ofReal (((N:ℝ) + m) * (4*R/c)) * + ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + apply F.label_occupation_cell_bound hs ht _ hmom + intro z + have hh := refined_direction_hit_duration (l z) (r z) l' r' (hleft z) hright + (v z) hc (hD z) (hcover z) (F.continuousOn_time zX).fst + (F.continuousOn_time z).fst + (fun τ hτ => (F.ode zX τ (interior_subset hτ)).hasDerivAt + (mem_interior_iff_mem_nhds.mp hτ) |>.fst) + (fun τ hτ => (F.ode z τ (interior_subset hτ)).hasDerivAt + (mem_interior_iff_mem_nhds.mp hτ) |>.fst) + (hv z) (hvel z) (hsep z) + simp only [Fintype.card_fin] at hh + calc + volume (H z) ≤ (n z + m : ℝ≥0∞) * ENNReal.ofReal (4*R/c) := hh + _ ≤ (N + m : ℝ≥0∞) * ENNReal.ofReal (4*R/c) := by + gcongr + exact_mod_cast hn z + _ = _ := by + rw [ENNReal.ofReal_mul (by positivity)] + rw [ENNReal.ofReal_add (by positivity) (by positivity)] + simp + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma velocity_direction_deficit {v : Vec} (hv : v ≠ 0) : + ‖velocity v - momentumDirection v‖ ≤ (q v)⁻¹^2 := by + have hn : 0 < ‖v‖ := norm_pos_iff.mpr hv + have hq := q_pos v + have hnq := norm_lt_q v + have hsq := q_sq v + have he : velocity v = (‖v‖ / q v) • momentumDirection v := by + rw [velocity,momentumDirection,smul_smul] + congr 1 + field_simp + rw [he] + conv_lhs => arg 1; rhs; rw [← one_smul ℝ (momentumDirection v)] + rw [← sub_smul,norm_smul, + momentumDirection_norm hv,mul_one,Real.norm_eq_abs,abs_of_nonpos] + · have hr : 0 < q v * (q v + ‖v‖) := mul_pos hq (by positivity) + have hid : 1 - ‖v‖/q v = (q v * (q v + ‖v‖))⁻¹ := by + field_simp + nlinarith + rw [neg_sub,hid] + rw [inv_pow] + exact (inv_le_inv₀ hr (sq_pos_of_pos hq)).mpr (by nlinarith) + · exact sub_nonpos.mpr ((div_le_one hq).mpr hnq.le) + +lemma velocity_change_of_direction {v w : Vec} {δ ε : ℝ} + (hv : v ≠ 0) (hw : w ≠ 0) + (hdir : ‖momentumDirection v - momentumDirection w‖ ≤ δ) + (hvq : (q v)⁻¹^2 ≤ ε) (hwq : (q w)⁻¹^2 ≤ ε) : + ‖velocity v - velocity w‖ ≤ δ + 2*ε := by + calc + _ = ‖(velocity v-momentumDirection v) + + (momentumDirection v-momentumDirection w) + (momentumDirection w-velocity w)‖ := by + congr 1; abel + _ ≤ ‖velocity v-momentumDirection v‖ + ‖momentumDirection v-momentumDirection w‖ + + ‖momentumDirection w-velocity w‖ := (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ ε + δ + ε := by + gcongr + · exact (velocity_direction_deficit hv).trans hvq + · rw [norm_sub_rev]; exact (velocity_direction_deficit hw).trans hwq + _ = _ := by ring + +lemma refined_direction_hit_duration_of_hits {ι κ : Type*} [Fintype ι] [Fintype κ] + (l r : ι → ℝ) (l' r' : κ → ℝ) + (hleft : ∀ i j, i ≠ j → Disjoint (Ico (l i) (r i)) (Ico (l j) (r j))) + (hright : ∀ i j, i ≠ j → Disjoint (Ico (l' i) (r' i)) (Ico (l' j) (r' j))) + {X Y a u : ℝ → Vec} {D H : Set ℝ} {c R : ℝ} + (hc : 0 < c) + (hD : ∀ i, Ico (l i) (r i) ⊆ D) + (hcover : ∀ t ∈ H, (∃ i, t ∈ Ico (l i) (r i)) ∧ + (∃ j, t ∈ Ico (l' j) (r' j))) + (hXc : ContinuousOn X D) (hYc : ContinuousOn Y D) + (hX : ∀ t ∈ interior D, HasDerivAt X (a t) t) + (hY : ∀ t ∈ interior D, HasDerivAt Y (u t) t) + (hstable : ∀ z : DirectionOverlap l r l' r', + (H ∩ Ico (max (l z.1.1) (l' z.1.2)) (min (r z.1.1) (r' z.1.2))).Nonempty → + ∃ v : Vec, c ≤ ‖v‖ ∧ ∀ t ∈ Ioo (max (l z.1.1) (l' z.1.2)) + (min (r z.1.1) (r' z.1.2)), ‖u t-a t-v‖ ≤ c/2) + (hsep : ∀ t ∈ H, ‖Y t - X t‖ ≤ R) : + volume H ≤ (Fintype.card ι + Fintype.card κ : ℝ≥0∞) * ENNReal.ofReal (4*R/c) := by + classical + let C : DirectionOverlap l r l' r' → Set ℝ := + fun z => Ico (max (l z.1.1) (l' z.1.2)) (min (r z.1.1) (r' z.1.2)) + have hcov : H ⊆ ⋃ z, H ∩ C z := by + intro t ht + obtain ⟨⟨i,hi⟩,⟨j,hj⟩⟩ := hcover t ht + have he : max (l i) (l' j) ≤ t := max_le hi.1 hj.1 + have hf : t < min (r i) (r' j) := lt_min hi.2 hj.2 + exact mem_iUnion.mpr ⟨⟨(i,j),he.trans_lt hf⟩,ht,he,hf⟩ + have hCD (z : DirectionOverlap l r l' r') : C z ⊆ D := fun _ ht => + hD z.1.1 ⟨(le_max_left _ _).trans ht.1,ht.2.trans_le (min_le_left _ _)⟩ + have hcell (z : DirectionOverlap l r l' r') : volume (H ∩ C z) ≤ ENNReal.ofReal (4*R/c) := by + by_cases hh : (H ∩ C z).Nonempty + · obtain ⟨v,hv,hvel⟩ := hstable z hh + apply stable_cell_duration (convex_Ico _ _) inter_subset_right hc hv + (hXc.mono (hCD z)) (hYc.mono (hCD z)) + · intro t ht + exact hX t (interior_mono (hCD z) ht) + · intro t ht + exact hY t (interior_mono (hCD z) ht) + · intro t ht + apply hvel t + simpa only [C,interior_Ico] using ht + · intro t ht + exact hsep t ht.1 + · rw [not_nonempty_iff_eq_empty.mp hh,measure_empty] + exact bot_le + calc + volume H ≤ volume (⋃ z, H ∩ C z) := measure_mono hcov + _ ≤ ∑ z, volume (H ∩ C z) := measure_iUnion_fintype_le volume _ + _ ≤ ∑ _z : DirectionOverlap l r l' r', ENNReal.ofReal (4*R/c) := + Finset.sum_le_sum (fun z _ => hcell z) + _ = (Fintype.card (DirectionOverlap l r l' r') : ℝ≥0∞) * ENNReal.ofReal (4*R/c) := by simp + _ ≤ _ := by + gcongr + exact_mod_cast directionOverlap_card_le l r l' r' hleft hright + +lemma relative_velocity_direction_cell {V W : ℝ → Vec} {t s₀ t₀ : ℝ} {c δ ε : ℝ} + (hVt : V t ≠ 0) (hVs : V s₀ ≠ 0) (hWt : W t ≠ 0) (hWs : W s₀ ≠ 0) + (hWt₀ : W t₀ ≠ 0) + (hVdir : ‖momentumDirection (V t)-momentumDirection (V s₀)‖ ≤ δ) + (hWdir : ‖momentumDirection (W t)-momentumDirection (W s₀)‖ ≤ δ) + (hWcross : ‖momentumDirection (W s₀)-momentumDirection (W t₀)‖ ≤ δ) + (hVqt : (q (V t))⁻¹^2 ≤ ε) (hVqs : (q (V s₀))⁻¹^2 ≤ ε) + (hWqt : (q (W t))⁻¹^2 ≤ ε) (hWqs : (q (W s₀))⁻¹^2 ≤ ε) + (hWqt₀ : (q (W t₀))⁻¹^2 ≤ ε) + (hhit : 2*c ≤ ‖velocity (V s₀)-velocity (W t₀)‖) + (hsmall : δ+2*ε ≤ c/4) : + c ≤ ‖velocity (V s₀)-velocity (W s₀)‖ ∧ + ‖velocity (V t)-velocity (W t)-(velocity (V s₀)-velocity (W s₀))‖ ≤ c/2 := by + have hcross := velocity_change_of_direction hWs hWt₀ hWcross hWqs hWqt₀ + constructor + · have hn := norm_sub_le (velocity (V s₀)-velocity (W s₀)) + (velocity (W t₀)-velocity (W s₀)) + have he : velocity (V s₀)-velocity (W s₀)-(velocity (W t₀)-velocity (W s₀)) = + velocity (V s₀)-velocity (W t₀) := by abel + rw [he,norm_sub_rev (velocity (W t₀))] at hn + have hnn := norm_nonneg (velocity (W s₀)-velocity (W t₀)) + linarith + · have hvs := velocity_change_of_direction hVt hVs hVdir hVqt hVqs + have hws := velocity_change_of_direction hWt hWs hWdir hWqt hWqs + have he : velocity (V t)-velocity (W t)-(velocity (V s₀)-velocity (W s₀)) = + (velocity (V t)-velocity (V s₀))-(velocity (W t)-velocity (W s₀)) := by abel + rw [he] + exact (norm_sub_le _ _).trans (by linarith) + +lemma direction_good_hit_separation {X : ℝ → Vec} {Y n : Vec} {V : ℝ → Vec} + {s t δ ε b : ℝ} (hst : s ≤ t) + (hX : ∀ r ∈ Icc s t, HasDerivWithinAt X (velocity (V r)) (Icc s t) r) + (hnz : ∀ r ∈ Icc s t, V r ≠ 0) + (hq : ∀ r ∈ Icc s t, (q (V r))⁻¹^2 ≤ ε) + (hdir : ∀ r ∈ Icc s t, ‖momentumDirection (V r)-momentumDirection (V t)‖ ≤ δ) + (hcone : X t-Y=(t-s) • n) (hbin : ‖velocity (V t)-n‖ ≤ b) : + ‖Y-X s‖ ≤ (δ+2*ε+b)*(t-s) := by + have ht : t ∈ Icc s t := right_mem_Icc.mpr hst + have hd (r : ℝ) (hr : r ∈ Icc s t) : + HasDerivWithinAt (fun v => X v-v • n) (velocity (V r)-n) (Icc s t) r := by + have hh := (hX r hr).sub ((hasDerivWithinAt_id r _).smul_const n) + change HasDerivWithinAt (fun v => X v-v • n) (velocity (V r)-1 • n) (Icc s t) r at hh + simpa only [one_smul] using hh + have hb (r : ℝ) (hr : r ∈ Icc s t) : ‖velocity (V r)-n‖ ≤ δ+2*ε+b := by + have hc := velocity_change_of_direction (hnz r hr) (hnz t ht) (hdir r hr) (hq r hr) (hq t ht) + calc + _ = ‖(velocity (V r)-velocity (V t))+(velocity (V t)-n)‖ := by congr 1; abel + _ ≤ _ := (norm_add_le _ _).trans (add_le_add hc hbin) + have hh := (convex_Icc s t).norm_image_sub_le_of_norm_hasDerivWithin_le hd hb + (left_mem_Icc.mpr hst) ht + have he : X t-t • n-(X s-s • n)=Y-X s := by + calc + _ = (X t-Y-(t-s) • n)+(Y-X s) := by rw [sub_smul]; abel + _ = _ := by rw [hcone,sub_self,zero_add] + rw [he,Real.norm_eq_abs,abs_of_nonneg (sub_nonneg.mpr hst)] at hh + exact hh + +lemma PhaseFlowOn.direction_closed_bin_hit_separation {s : Solution} {T φ δ ε t τ l r : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX zY : Phase) (B : ClosedConeBin) + (hcellT : Ico l r ⊆ Icc 0 T) (ht : t ∈ Ico l r) (hτ : τ ∈ Ico l r) + (hnz : ∀ u ∈ Ico l r, (F.flow zX u).2 ≠ 0) + (hq : ∀ u ∈ Ico l r, (q (F.flow zX u).2)⁻¹^2 ≤ ε) + (hdir : ∀ a ∈ Ico l r, ∀ b ∈ Ico l r, + ‖momentumDirection (F.flow zX a).2-momentumDirection (F.flow zX b).2‖ ≤ δ) + (hbin : InClosedConeBin F.flow zX B τ t zY) + (hr : 0 < B.rmin) (hφ : 0 < φ) + (hd : B.dmax ≤ φ^2/32) (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) + (hw : 4 ≤ φ*B.wmin) (hsmall : δ+2*ε ≤ φ/16) : + ‖(F.flow zY t).1-(F.flow zX t).1‖ ≤ 5*B.rmax*φ := by + obtain ⟨n,_,hcone,hbound,_,_⟩ := small_closed_bin_hit_geometry hbin hr hφ hd hDlo hDhi hw + have hdelay := hbin.2.1 + have hta : t ≤ τ := by linarith [hdelay.1] + have hinside : Icc t τ ⊆ Ico l r := fun u hu => ⟨ht.1.trans hu.1,hu.2.trans_lt hτ.2⟩ + have hST := hinside.trans hcellT + have hder (u : ℝ) (hu : u ∈ Icc t τ) : HasDerivWithinAt + (fun v => (F.flow zX v).1) (velocity (F.flow zX u).2) (Icc t τ) u := by + have hh : HasDerivWithinAt (fun v => (F.flow zX v).1) + (velocity (F.flow zX u).2) (Icc 0 T) u := (F.ode zX u (hST hu)).fst + exact hh.mono hST + have hh := direction_good_hit_separation hta hder + (fun u hu => hnz u (hinside hu)) (fun u hu => hq u (hinside hu)) + (fun u hu => hdir u (hinside hu) τ hτ) hcone hbound + calc + _ ≤ (δ+2*ε+4*φ)*(τ-t) := hh + _ ≤ (5*φ)*(τ-t) := mul_le_mul_of_nonneg_right (by linarith) (sub_nonneg.mpr hta) + _ ≤ (5*φ)*B.rmax := mul_le_mul_of_nonneg_left hdelay.2 (by positivity) + _ = _ := by ring + +lemma PhaseFlowOn.direction_good_hit_duration {s : Solution} {T φ δ ε : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX zY : Phase) (B : ClosedConeBin) + {ι κ : Type*} [Fintype ι] [Fintype κ] + (l r : ι → ℝ) (l' r' : κ → ℝ) + (hleft : ∀ i j, i ≠ j → Disjoint (Ico (l i) (r i)) (Ico (l j) (r j))) + (hright : ∀ i j, i ≠ j → Disjoint (Ico (l' i) (r' i)) (Ico (l' j) (r' j))) + (hsrcT : ∀ i, Ico (l i) (r i) ⊆ Icc 0 T) + (hrecT : ∀ j, Ico (l' j) (r' j) ⊆ Icc 0 T) + (hsrcnz : ∀ i t, t ∈ Ico (l i) (r i) → (F.flow zY t).2 ≠ 0) + (hrecnz : ∀ j t, t ∈ Ico (l' j) (r' j) → (F.flow zX t).2 ≠ 0) + (hsrcq : ∀ i t, t ∈ Ico (l i) (r i) → (q (F.flow zY t).2)⁻¹^2 ≤ ε) + (hrecq : ∀ j t, t ∈ Ico (l' j) (r' j) → (q (F.flow zX t).2)⁻¹^2 ≤ ε) + (hsrcdir : ∀ i, ∀ a ∈ Ico (l i) (r i), ∀ b ∈ Ico (l i) (r i), + ‖momentumDirection (F.flow zY a).2-momentumDirection (F.flow zY b).2‖ ≤ δ) + (hrecdir : ∀ j, ∀ a ∈ Ico (l' j) (r' j), ∀ b ∈ Ico (l' j) (r' j), + ‖momentumDirection (F.flow zX a).2-momentumDirection (F.flow zX b).2‖ ≤ δ) + {H : Set ℝ} (arrival : ℝ → ℝ) + (hcover : ∀ t ∈ H, ∃ i, t ∈ Ico (l i) (r i)) + (hgood : ∀ t ∈ H, ∃ j, t ∈ Ico (l' j) (r' j) ∧ arrival t ∈ Ico (l' j) (r' j)) + (hbin : ∀ t ∈ H, InClosedConeBin F.flow zX B (arrival t) t zY) + (hr : 0 < B.rmin) (hφ : 0 < φ) + (hd : B.dmax ≤ φ^2/32) (hDlo : φ^2/2 ≤ B.Dmin) (hDhi : B.Dmax ≤ 8*φ^2) + (hw : 4 ≤ φ*B.wmin) (hsmall : δ+2*ε ≤ φ/16) : + volume H ≤ (Fintype.card ι + Fintype.card κ : ℝ≥0∞) * ENNReal.ofReal (80*B.rmax) := by + have hcov : ∀ t ∈ H, (∃ i, t ∈ Ico (l i) (r i)) ∧ + (∃ j, t ∈ Ico (l' j) (r' j)) := by + intro t ht + obtain ⟨j,hj,_⟩ := hgood t ht + exact ⟨hcover t ht,j,hj⟩ + have hsep (t : ℝ) (ht : t ∈ H) : ‖(F.flow zY t).1-(F.flow zX t).1‖ ≤ 5*B.rmax*φ := by + obtain ⟨j,hj,hja⟩ := hgood t ht + exact F.direction_closed_bin_hit_separation zX zY B (hrecT j) hj hja + (hrecnz j) (hrecq j) (hrecdir j) (hbin t ht) hr hφ hd hDlo hDhi hw hsmall + have hstab (z : DirectionOverlap l r l' r') + (hh : (H ∩ Ico (max (l z.1.1) (l' z.1.2)) (min (r z.1.1) (r' z.1.2))).Nonempty) : + ∃ v : Vec, φ/4 ≤ ‖v‖ ∧ ∀ t ∈ Ioo (max (l z.1.1) (l' z.1.2)) + (min (r z.1.1) (r' z.1.2)), + ‖velocity (F.flow zY t).2-velocity (F.flow zX t).2-v‖ ≤ (φ/4)/2 := by + obtain ⟨u,hu,huc⟩ := hh + have hui : u ∈ Ico (l z.1.1) (r z.1.1) := + ⟨(le_max_left _ _).trans huc.1,huc.2.trans_le (min_le_left _ _)⟩ + have huj : u ∈ Ico (l' z.1.2) (r' z.1.2) := + ⟨(le_max_right _ _).trans huc.1,huc.2.trans_le (min_le_right _ _)⟩ + obtain ⟨j,hj,hja⟩ := hgood u hu + have hjz : j=z.1.2 := by + by_contra hne + exact Set.disjoint_left.mp (hright j z.1.2 hne) hj huj + subst j + obtain ⟨_,_,_,_,hlo,_⟩ := small_closed_bin_hit_geometry (hbin u hu) hr hφ hd hDlo hDhi hw + have hsmall' : δ+2*ε ≤ (φ/4)/4 := by linarith + have hh (t : ℝ) (hti : t ∈ Ico (l z.1.1) (r z.1.1)) + (htj : t ∈ Ico (l' z.1.2) (r' z.1.2)) := + relative_velocity_direction_cell (V:=fun t => (F.flow zY t).2) + (W:=fun t => (F.flow zX t).2) (t:=t) (s₀:=u) (t₀:=arrival u) + (c:=φ/4) (δ:=δ) (ε:=ε) + (hsrcnz _ t hti) (hsrcnz _ u hui) (hrecnz _ t htj) (hrecnz _ u huj) (hrecnz _ _ hja) + (hsrcdir _ t hti u hui) (hrecdir _ t htj u huj) (hrecdir _ u huj _ hja) + (hsrcq _ t hti) (hsrcq _ u hui) (hrecq _ t htj) (hrecq _ u huj) (hrecq _ _ hja) + (show 2*(φ/4) ≤ ‖velocity (F.flow zY u).2-velocity (F.flow zX (arrival u)).2‖ by linarith) + hsmall' + refine ⟨velocity (F.flow zY u).2-velocity (F.flow zX u).2,(hh u hui huj).1,?_⟩ + intro t ht + exact (hh t ⟨(le_max_left _ _).trans ht.1.le,ht.2.trans_le (min_le_left _ _)⟩ + ⟨(le_max_right _ _).trans ht.1.le,ht.2.trans_le (min_le_right _ _)⟩).2 + have hbound := refined_direction_hit_duration_of_hits l r l' r' hleft hright + (X:=fun t => (F.flow zX t).1) (Y:=fun t => (F.flow zY t).1) + (a:=fun t => velocity (F.flow zX t).2) (u:=fun t => velocity (F.flow zY t).2) + (D:=Icc 0 T) (H:=H) (R:=5*B.rmax*φ) + (by positivity : 0 < φ/4) hsrcT hcov + ((F.continuousOn_time zX).fst) ((F.continuousOn_time zY).fst) + (fun t ht => ((F.ode zX t (interior_subset ht)).hasDerivAt (mem_interior_iff_mem_nhds.mp ht)).fst) + (fun t ht => ((F.ode zY t (interior_subset ht)).hasDerivAt (mem_interior_iff_mem_nhds.mp ht)).fst) + hstab hsep + have he : 4*(5*B.rmax*φ)/(φ/4)=80*B.rmax := by field_simp [hφ.ne']; ring + simpa only [he] using hbound + +lemma receiver_cells_good_or_bad {κ : Type*} [Fintype κ] + (l r : κ→ℝ) {s t : ℝ} (hst : s≤t) (hc : ∃j,s∈Ico (l j) (r j)) : + (∃j,s∈Ico (l j) (r j) ∧ t∈Ico (l j) (r j)) ∨ + ∃b∈Finset.univ.image r,s≤b ∧ b≤t := by + classical + obtain ⟨j,hj⟩ := hc + by_cases ht : thsrc t ht.1) hgood (fun t ht=>hbin t ht.1) + hr hφ hd hDlo hDhi hw hsmall + have hb : volume Bad≤(Fintype.card κ : ℝ≥0∞)*ENNReal.ofReal B.rmax := by + have he : ends.card≤Fintype.card κ := (Finset.card_image_le).trans (by simp) + have h := retarded_boundary_hit_duration (H:=H) arrival ends + (fun t ht=>(hbin t ht).2.1.2) + apply h.trans + gcongr + have hc : H⊆Good∪Bad := by + intro t ht + by_cases htb : t∈Bad + · exact Or.inr htb + · exact Or.inl ⟨ht,htb⟩ + calc + volume H≤volume Good+volume Bad := (measure_mono hc).trans (measure_union_le _ _) + _ ≤ (Fintype.card ι+Fintype.card κ : ℝ≥0∞)*ENNReal.ofReal (80*B.rmax)+ + (Fintype.card κ : ℝ≥0∞)*ENNReal.ofReal B.rmax := add_le_add hg hb + _ ≤ (Fintype.card ι+Fintype.card κ : ℝ≥0∞)*ENNReal.ofReal (80*B.rmax)+ + (Fintype.card ι+Fintype.card κ : ℝ≥0∞)*ENNReal.ofReal B.rmax := by gcongr; exact le_add_left le_rfl + _ = _ := by + rw [←mul_add,←ENNReal.ofReal_add (by positivity) hrmax] + congr 2 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicBalanceConstant.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicBalanceConstant.lean new file mode 100644 index 0000000000000000000000000000000000000000..2117a0262ba8c98d24fdd73caea1468462a4d025 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicBalanceConstant.lean @@ -0,0 +1,200 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Model +import OAI.Analysis.VlasovMaxwell.Geometry.DensitySecondMoment + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def dyadicBalanceConstant (α β : ℝ) : ℝ := + (1-((2:ℝ)^α)⁻¹)⁻¹+2^β/(1-((2:ℝ)^β)⁻¹) + +lemma dyadicBalanceConstant_pos {α β : ℝ} (hα : 0<α) (hβ : 0<β) : + 0 min (a*((2:ℝ)^k)^α) (b*((2:ℝ)^k)^(-β))) := by + have hh := (geometric_min_summable_bound ha hb + (Real.one_lt_rpow (by norm_num : (1:ℝ)<2) hα) + (Real.one_lt_rpow (by norm_num : (1:ℝ)<2) hβ)).1 + convert hh using 1 + funext k + rw [Real.rpow_zpow_comm (by norm_num : (0:ℝ)≤2), + Real.rpow_zpow_comm (by norm_num : (0:ℝ)≤2),zpow_neg, + Real.inv_rpow (zpow_pos (by norm_num : (0:ℝ)<2) k).le, + Real.rpow_neg (zpow_pos (by norm_num : (0:ℝ)<2) k).le] + +lemma truncated_dyadic_crossing {n f α : ℝ} (hn : 0 min (n*((2:ℝ)^j)^α) (f*((2:ℝ)^j)^(-1:ℝ))) ∧ + (∑' j : ℕ, min (n*((2:ℝ)^j)^α) (f*((2:ℝ)^j)^(-1:ℝ))) ≤ + min (2*f) (dyadicBalanceConstant α 1 * (n^(1/(α+1))*f^(α/(α+1)))) := by + let g : ℤ→ℝ := fun k=>min (n*((2:ℝ)^k)^α) (f*((2:ℝ)^k)^(-1:ℝ)) + have hg : Summable g := dyadic_power_min_summable hn.le hf.le hα (by norm_num) + have h0 (k : ℤ) : 0≤g k := le_min + (mul_nonneg hn.le (Real.rpow_nonneg (zpow_pos (by norm_num : (0:ℝ)<2) k).le _)) + (mul_nonneg hf.le (Real.rpow_nonneg (zpow_pos (by norm_num : (0:ℝ)<2) k).le _)) + have hs : Summable (fun j : ℕ=>g j) := hg.comp_injective Int.ofNat_injective + have he (j : ℕ) : g j=min (n*((2:ℝ)^j)^α) (f*((2:ℝ)^j)^(-1:ℝ)) := by + simp only [g,zpow_natCast] + simp_rw [he] at hs + refine ⟨hs,le_min ?_ ?_⟩ + · have hb (j : ℕ) : min (n*((2:ℝ)^j)^α) (f*((2:ℝ)^j)^(-1:ℝ)) ≤ f*((2:ℝ)⁻¹)^j := by + rw [inv_pow] + exact (min_le_right _ _).trans_eq (by rw [Real.rpow_neg_one]) + have hfs : Summable (fun j : ℕ=>f*((2:ℝ)⁻¹)^j) := + (summable_geometric_of_abs_lt_one (by norm_num : |(2:ℝ)⁻¹|<1)).mul_left f + have ht := hs.tsum_le_tsum hb hfs + rw [tsum_mul_left,tsum_geometric_of_abs_lt_one (by norm_num : |(2:ℝ)⁻¹|<1)] at ht + norm_num at ht + linarith + · have ht : (∑' j : ℕ,g j)≤∑' k : ℤ,g k := + Summable.tsum_le_tsum_of_inj Int.ofNat Int.ofNat_injective (fun k _=>h0 k) (fun _=>le_rfl) + (hg.comp_injective Int.ofNat_injective) hg + simp_rw [he] at ht + exact ht.trans (dyadic_balance hn hf hα (by norm_num)) + +lemma crossing_normalisation {n D α : ℝ} (hn : 0min ((x*((2:ℝ)^k)^γ)^q) ((x*((2:ℝ)^k)^γ)^(-1:ℝ))) ∧ + (∑' k : ℤ,min ((x*((2:ℝ)^k)^γ)^q) ((x*((2:ℝ)^k)^γ)^(-1:ℝ))) ≤ + dyadicBalanceConstant (γ*q) γ := by + have hgq : 0<γ*q := mul_pos hγ hq + have he (k : ℤ) : min ((x*((2:ℝ)^k)^γ)^q) ((x*((2:ℝ)^k)^γ)^(-1:ℝ))= + min (x^q*((2:ℝ)^k)^(γ*q)) (x^(-1:ℝ)*((2:ℝ)^k)^(-γ)) := by + rw [Real.mul_rpow hx.le (Real.rpow_nonneg (zpow_pos (by norm_num : (0:ℝ)<2) k).le γ), + Real.mul_rpow hx.le (Real.rpow_nonneg (zpow_pos (by norm_num : (0:ℝ)<2) k).le γ), + ←Real.rpow_mul (zpow_pos (by norm_num : (0:ℝ)<2) k).le, + ←Real.rpow_mul (zpow_pos (by norm_num : (0:ℝ)<2) k).le] + simp only [mul_neg_one] + simp_rw [he] + refine ⟨dyadic_power_min_summable (Real.rpow_pos_of_pos hx _).le + (Real.rpow_pos_of_pos hx _).le hgq hγ,?_⟩ + have hh := dyadic_balance (Real.rpow_pos_of_pos hx q) (Real.rpow_pos_of_pos hx (-1)) hgq hγ + have heq : (x^q)^(γ/(γ*q+γ))*(x^(-1:ℝ))^((γ*q)/(γ*q+γ))=1 := by + rw [←Real.rpow_mul hx.le,←Real.rpow_mul hx.le,←Real.rpow_add hx] + rw [show q*(γ/(γ*q+γ))+(-1)*((γ*q)/(γ*q+γ))=0 by ring,Real.rpow_zero] + simpa only [heq,mul_one,dyadicBalanceConstant] using hh + +lemma two_level_crossing_sum {n D α γ : ℝ} (hn : 0∑' j : ℕ, + min ((n*((2:ℝ)^k)^γ)*((2:ℝ)^j)^α) + ((D^2/(n*((2:ℝ)^k)^γ))*((2:ℝ)^j)^(-1:ℝ))) ∧ + (∑' k : ℤ,∑' j : ℕ, + min ((n*((2:ℝ)^k)^γ)*((2:ℝ)^j)^α) + ((D^2/(n*((2:ℝ)^k)^γ))*((2:ℝ)^j)^(-1:ℝ))) ≤ + (2+dyadicBalanceConstant α 1)*D* + dyadicBalanceConstant (γ*((1-α)/(1+α))) γ := by + let q : ℝ := (1-α)/(1+α) + have hq : 0∑' j : ℕ, + min ((n*((2:ℝ)^k)^γ)*((2:ℝ)^j)^α) + ((D^2/(n*((2:ℝ)^k)^γ))*((2:ℝ)^j)^(-1:ℝ)) + let f : ℤ→ℝ := fun k=>min (((n/D)*((2:ℝ)^k)^γ)^q) + (((n/D)*((2:ℝ)^k)^γ)^(-1:ℝ)) + have ha := angular_crossing_sum (div_pos hn hD) hγ hq + have hg0 (k : ℤ) : 0≤g k := by + apply tsum_nonneg + intro j + apply le_min <;> positivity + have hbound (k : ℤ) : g k≤(2+dyadicBalanceConstant α 1)*D*f k := by + have hh := truncated_crossing_normalised + (mul_pos hn (Real.rpow_pos_of_pos (zpow_pos (by norm_num : (0:ℝ)<2) k) γ)) hD hα + have heq : n*((2:ℝ)^k)^γ/D=(n/D)*((2:ℝ)^k)^γ := by ring + simpa only [g,f,q,heq] using hh + have hfs : Summable (fun k=>(2+dyadicBalanceConstant α 1)*D*f k) := + ha.1.mul_left ((2+dyadicBalanceConstant α 1)*D) + have hgs : Summable g := Summable.of_nonneg_of_le hg0 hbound hfs + refine ⟨hgs,?_⟩ + change (∑' k,g k)≤_ + calc + _ ≤ ∑' k,(2+dyadicBalanceConstant α 1)*D*f k := hgs.tsum_le_tsum hbound hfs + _ = (2+dyadicBalanceConstant α 1)*D*(∑' k,f k) := tsum_mul_left + _ ≤ _ := mul_le_mul_of_nonneg_left ha.2 hC.le + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicCut.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..22ae79631d9d6edd4549f0a86c00f99c2c41248b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/DyadicCut.lean @@ -0,0 +1,353 @@ +import Mathlib + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def dyadicCut (x : ℝ) : ℝ := 1-Real.smoothTransition (x-1) +def dyadicBump (x : ℝ) : ℝ := dyadicCut x-dyadicCut (2*x) +def dyadicFactor (n : ℕ) (x : ℝ) : ℝ := dyadicBump ((2:ℝ)^n*x) + +lemma contDiff_dyadicCut : ContDiff ℝ ∞ dyadicCut := + contDiff_const.sub (Real.smoothTransition.contDiff.comp (contDiff_id.sub contDiff_const)) +lemma contDiff_dyadicBump : ContDiff ℝ ∞ dyadicBump := + contDiff_dyadicCut.sub (contDiff_dyadicCut.comp (contDiff_const.mul contDiff_id)) +lemma contDiff_dyadicFactor (n : ℕ) : ContDiff ℝ ∞ (dyadicFactor n) := + contDiff_dyadicBump.comp (contDiff_const.mul contDiff_id) + +lemma dyadicCut_one {x : ℝ} (hx : x≤1) : dyadicCut x=1 := by + simp only [dyadicCut,Real.smoothTransition.zero_of_nonpos (sub_nonpos.mpr hx),sub_zero] +lemma dyadicCut_zero {x : ℝ} (hx : 2≤x) : dyadicCut x=0 := by + rw [dyadicCut,Real.smoothTransition.one_of_one_le (by linarith),sub_self] +lemma dyadicCut_antitone : Antitone dyadicCut := by + intro x y hxy + exact sub_le_sub_left (Real.smoothTransition.monotone (sub_le_sub_right hxy 1)) 1 +lemma dyadicCut_nonneg (x : ℝ) : 0≤dyadicCut x := sub_nonneg.mpr (Real.smoothTransition.le_one _) +lemma dyadicCut_le_one (x : ℝ) : dyadicCut x≤1 := sub_le_self _ (Real.smoothTransition.nonneg _) +lemma dyadicBump_zero_left {x : ℝ} (hx : x≤1/2) : dyadicBump x=0 := by + rw [dyadicBump,dyadicCut_one (by linarith),dyadicCut_one (by linarith),sub_self] +lemma dyadicBump_zero_right {x : ℝ} (hx : 2≤x) : dyadicBump x=0 := by + rw [dyadicBump,dyadicCut_zero hx,dyadicCut_zero (by linarith),sub_self] +lemma dyadicBump_nonneg (x : ℝ) : 0≤dyadicBump x := by + by_cases hx : x≤1/2 + · rw [dyadicBump_zero_left hx] + · exact sub_nonneg.mpr (dyadicCut_antitone (by linarith : x≤2*x)) +lemma dyadicBump_le_one (x : ℝ) : dyadicBump x≤1 := + (sub_le_self _ (dyadicCut_nonneg _)).trans (dyadicCut_le_one _) +lemma dyadicBump_support : tsupport dyadicBump ⊆ Icc (1/2) 2 := by + apply closure_minimal _ isClosed_Icc + intro x hx + constructor + · by_contra hn + exact hx (dyadicBump_zero_left (le_of_lt (lt_of_not_ge hn))) + · by_contra hn + exact hx (dyadicBump_zero_right (le_of_lt (lt_of_not_ge hn))) +lemma compactSupport_dyadicBump : HasCompactSupport dyadicBump := + isCompact_Icc.of_isClosed_subset (isClosed_tsupport _) dyadicBump_support +lemma dyadicFactor_nonneg (n : ℕ) (x : ℝ) : 0≤dyadicFactor n x := dyadicBump_nonneg _ +lemma dyadicFactor_le_one (n : ℕ) (x : ℝ) : dyadicFactor n x≤1 := dyadicBump_le_one _ + +lemma dyadicFactor_eq (n : ℕ) (x : ℝ) : + dyadicFactor n x=dyadicCut ((2:ℝ)^n*x)-dyadicCut ((2:ℝ)^(n+1)*x) := by + simp only [dyadicFactor,dyadicBump,pow_succ] + congr 2 + ring +lemma sum_dyadicFactor (N : ℕ) (x : ℝ) : + ∑ n ∈ Finset.range N, dyadicFactor n x=dyadicCut x-dyadicCut ((2:ℝ)^N*x) := by + induction N with + | zero => simp + | succ N ih => rw [Finset.sum_range_succ,ih,dyadicFactor_eq]; ring + +lemma dyadicFactor_zero_large {x : ℝ} {n : ℕ} (hn : 2≤(2:ℝ)^n*x) : + dyadicFactor n x=0 := dyadicBump_zero_right hn + +lemma dyadicFactor_eventually_zero {x : ℝ} (hx : 0 dyadicFactor_zero_large ?_⟩ + have hpow := pow_le_pow_right₀ (by norm_num : (1:ℝ)≤2) hn + have hN' : 4<(2:ℝ)^N*x := (div_lt_iff₀ hx).mp hN + have hp : 0<(2:ℝ)^n := by positivity + nlinarith [mul_le_mul_of_nonneg_right hpow hx.le] + +lemma dyadicFactor_locally_finite {x : ℝ} (hx : 0 dyadicBump ((2:ℝ)^n*y)) _ x + simpa only [Function.comp_def,id_eq,mul_one,one_mul,mul_comm] using hh + +lemma dyadicFactor_log_derivative_bound : ∃ C : ℝ, 0≤C ∧ + ∀ n : ℕ, ∀ x : ℝ, |x*deriv (dyadicFactor n) x|≤C := by + have hd : Continuous (deriv dyadicBump) := contDiff_dyadicBump.continuous_deriv (by simp) + have hcon : Continuous (fun x : ℝ => x*deriv dyadicBump x) := continuous_id.mul hd + obtain ⟨C,hC⟩ := (isCompact_Icc.image hcon).isBounded.exists_norm_le + refine ⟨max 0 C,le_max_left _ _,fun n x => ?_⟩ + rw [(hasDerivAt_dyadicFactor n x).deriv] + have he : x*((2:ℝ)^n*deriv dyadicBump ((2:ℝ)^n*x)) = + ((2:ℝ)^n*x)*deriv dyadicBump ((2:ℝ)^n*x) := by ring + rw [he] + by_cases hx : (2:ℝ)^n*x ∈ Icc (1/2:ℝ) 2 + · exact (hC _ ⟨(2:ℝ)^n*x,hx,rfl⟩).trans (le_max_right _ _) + · rw [deriv_of_notMem_tsupport (fun h => hx (dyadicBump_support h)),mul_zero,abs_zero] + exact le_max_left _ _ + +def DyadicBand (n : ℕ) (x : ℝ) : Prop := 1/2≤(2:ℝ)^n*x ∧ (2:ℝ)^n*x≤2 + +lemma dyadicFactor_tsupport {n : ℕ} {x : ℝ} (hx : x ∈ tsupport (dyadicFactor n)) : + DyadicBand n x := by + have hcl : IsClosed {x : ℝ | DyadicBand n x} := + (isClosed_le continuous_const (continuous_const.mul continuous_id)).inter + (isClosed_le (continuous_const.mul continuous_id) continuous_const) + apply (closure_minimal (s:=(Function.support (dyadicFactor n))) ?_ hcl) hx + intro y hy + constructor + · by_contra hn + exact hy (dyadicBump_zero_left (le_of_lt (lt_of_not_ge hn))) + · by_contra hn + exact hy (dyadicBump_zero_right (le_of_lt (lt_of_not_ge hn))) + +lemma dyadicBand_index_le {n m : ℕ} {x : ℝ} (hn : DyadicBand n x) (hm : DyadicBand m x) : + m≤n+2 := by + by_contra hmn + have hnm : n+3 ≤ m := by omega + have hx : 0≤x := by + have hp : 0<(2:ℝ)^n := by positivity + by_contra hh + have he := mul_neg_of_pos_of_neg hp (lt_of_not_ge hh) + linarith [hn.1] + have he := mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num : (1:ℝ)≤2) hnm) hx + rw [pow_add] at he + norm_num at he + nlinarith [hn.1,hm.2] + +lemma dyadicBand_card_le (S : Finset ℕ) {x : ℝ} (hS : ∀ n ∈ S, DyadicBand n x) : + S.card≤5 := by + classical + by_cases hs : S.Nonempty + · obtain ⟨n,hn⟩ := hs + have hsub : S ⊆ Finset.Icc (n-2) (n+2) := by + intro m hm + have hlo := dyadicBand_index_le (hS m hm) (hS n hn) + have hhi := dyadicBand_index_le (hS n hn) (hS m hm) + exact Finset.mem_Icc.mpr ⟨by omega,hhi⟩ + have hcard := Finset.card_le_card hsub + rw [Nat.card_Icc] at hcard + omega + · rw [Finset.not_nonempty_iff_eq_empty.mp hs] + simp + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma hasDerivAt_dyadicCut_zero_left {x : ℝ} (hx : x≤1) : HasDerivAt dyadicCut 0 x := by + have hm : IsLocalMax dyadicCut x := Filter.Eventually.of_forall (fun y => by + rw [dyadicCut_one hx] + exact dyadicCut_le_one y) + rw [← hm.deriv_eq_zero] + exact (contDiff_dyadicCut.differentiable (by simp) x).hasDerivAt + +lemma hasDerivAt_dyadicCut_zero_right {x : ℝ} (hx : 2≤x) : HasDerivAt dyadicCut 0 x := by + have hm : IsLocalMin dyadicCut x := Filter.Eventually.of_forall (fun y => by + rw [dyadicCut_zero hx] + exact dyadicCut_nonneg y) + rw [← hm.deriv_eq_zero] + exact (contDiff_dyadicCut.differentiable (by simp) x).hasDerivAt + +lemma hasDerivAt_sum_dyadicFactor_zero {x : ℝ} (N : ℕ) (hx : x≤1) + (hN : 2≤(2:ℝ)^N*x) : + HasDerivAt (fun y => ∑ n∈Finset.range N, dyadicFactor n y) 0 x := by + have h := (hasDerivAt_dyadicCut_zero_left hx).sub + ((hasDerivAt_dyadicCut_zero_right hN).comp x ((hasDerivAt_id x).const_mul ((2:ℝ)^N))) + convert h using 1 <;> first | rfl | (simp [sum_dyadicFactor] <;> rfl) + +def dyadicMultiFactor {ι : Type*} [Fintype ι] (n : ι → ℕ) (x : ι → ℝ) : ℝ := + ∏ i, dyadicFactor (n i) (x i) + +def dyadicBox (ι : Type*) [Fintype ι] (N : ℕ) : Finset (ι → ℕ) := + by classical exact Fintype.piFinset (fun _ : ι => Finset.range N) + +lemma dyadicMultiFactor_nonneg {ι : Type*} [Fintype ι] (n : ι→ℕ) (x : ι→ℝ) : + 0≤dyadicMultiFactor n x := Finset.prod_nonneg (fun _i _ => dyadicFactor_nonneg _ _) + +lemma sum_dyadicMultiFactor {ι : Type*} [Fintype ι] (N : ℕ) (x : ι→ℝ) : + ∑ n∈dyadicBox ι N, dyadicMultiFactor n x = + ∏ i, (dyadicCut (x i)-dyadicCut ((2:ℝ)^N*x i)) := by + classical + unfold dyadicBox dyadicMultiFactor + convert Finset.sum_prod_piFinset (Finset.range N) (fun i n => dyadicFactor n (x i)) using 1 + simp only [sum_dyadicFactor] + +lemma sum_dyadicMultiFactor_eq_one {ι : Type*} [Fintype ι] (N : ℕ) (x : ι→ℝ) + (hx : ∀ i, x i≤1) (hN : ∀ i, 2≤(2:ℝ)^N*x i) : + ∑ n∈dyadicBox ι N, dyadicMultiFactor n x=1 := by + rw [sum_dyadicMultiFactor] + simp only [dyadicCut_one (hx _),dyadicCut_zero (hN _),sub_zero,Finset.prod_const_one] + +lemma differentiableAt_dyadicMultiFactor_curve {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, DifferentiableAt ℝ (g i) t) (n : ι→ℕ) : + DifferentiableAt ℝ (fun r => dyadicMultiFactor n (fun i => g i r)) t := by + classical + exact DifferentiableAt.fun_finsetProd (fun i _ => + (contDiff_dyadicFactor (n i)).differentiable (by simp) (g i t) |>.comp t (hg i)) + +lemma hasDerivAt_sum_dyadicMultiFactor_zero {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, DifferentiableAt ℝ (g i) t) + (N : ℕ) (hx : ∀ i, g i t≤1) (hN : ∀ i, 2≤(2:ℝ)^N*g i t) : + HasDerivAt (fun r => ∑ n∈dyadicBox ι N, dyadicMultiFactor n (fun i => g i r)) 0 t := by + classical + have hd (i : ι) : HasDerivAt (fun r => ∑ n∈Finset.range N,dyadicFactor n (g i r)) 0 t := by + simpa only [Function.comp_def,zero_mul] using + (hasDerivAt_sum_dyadicFactor_zero N (hx i) (hN i)).comp t (hg i).hasDerivAt + have H := HasDerivAt.fun_finsetProd (u:=Finset.univ) (fun i _ => hd i) + simpa only [smul_zero,Finset.sum_const_zero,sum_dyadicFactor,← sum_dyadicMultiFactor] using H + +lemma selected_dyadic_derivative_cancel {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, DifferentiableAt ℝ (g i) t) + (N : ℕ) (hx : ∀ i, g i t≤1) (hN : ∀ i, 2≤(2:ℝ)^N*g i t) + (S : Finset (ι→ℕ)) (hS : S⊆dyadicBox ι N) : + deriv (fun r => ∑ n∈S,dyadicMultiFactor n (fun i => g i r)) t = + -(∑ n∈dyadicBox ι N \ S,deriv (fun r => dyadicMultiFactor n (fun i => g i r)) t) := by + classical + have hd := differentiableAt_dyadicMultiFactor_curve hg + rw [deriv_fun_sum (fun n _ => hd n)] + have hall := (hasDerivAt_sum_dyadicMultiFactor_zero hg N hx hN).deriv + rw [deriv_fun_sum (fun n _ => hd n)] at hall + have he := Finset.sum_sdiff (f:=fun n => deriv (fun r => dyadicMultiFactor n (fun i => g i r)) t) hS + rw [hall] at he + linarith + +lemma selected_dyadic_derivative_boundary {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, DifferentiableAt ℝ (g i) t) + (N : ℕ) (hx : ∀ i, g i t≤1) (hN : ∀ i, 2≤(2:ℝ)^N*g i t) + (S : Finset (ι→ℕ)) (hS : S⊆dyadicBox ι N) + (hne : deriv (fun r => ∑ n∈S,dyadicMultiFactor n (fun i => g i r)) t ≠ 0) : + (∃ n∈S, 0 g i t)) ∧ + (∃ n∈dyadicBox ι N \ S, 0 g i t)) := by + classical + have pos_of_ne (U : Finset (ι→ℕ)) + (hu : deriv (fun r => ∑ n∈U,dyadicMultiFactor n (fun i => g i r)) t≠0) : + ∃ n∈U,0 g i t) := by + by_contra hh + push Not at hh + have he : ∑ n∈U,dyadicMultiFactor n (fun i => g i t)=0 := + Finset.sum_eq_zero (fun n hn => le_antisymm (hh n hn) (dyadicMultiFactor_nonneg _ _)) + apply hu + apply IsLocalMin.deriv_eq_zero + exact Filter.Eventually.of_forall (fun r => by + dsimp only + rw [he] + exact Finset.sum_nonneg (fun n _ => dyadicMultiFactor_nonneg _ _)) + refine ⟨pos_of_ne S hne,pos_of_ne (dyadicBox ι N \ S) ?_⟩ + intro he + apply hne + rw [selected_dyadic_derivative_cancel hg N hx hN S hS, + ← deriv_fun_sum (fun n _ => differentiableAt_dyadicMultiFactor_curve hg n),he,neg_zero] + +lemma dyadicMultiFactor_positive_bands {ι : Type*} [Fintype ι] + {n : ι→ℕ} {x : ι→ℝ} (h : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let N : ConeCoordinate→ℝ≥0∞ := fun z=>physicalBinDensity s X V B z.1 z.2.1 z.2.2 + let μ := physicalBinMeasure V B (Icc a b) + have hp : 0

velocity (V t)) 1 a b I (k 2)≤ + ENNReal.ofReal (20*I*datumEnergyNumber d) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.energyPrefix.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hab) + rw [hs.initial_energy_eq] at hh + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*datumEnergyNumber d)) := mul_le_mul' le_rfl hh + _ = _ := by + norm_num only [Nat.reduceMul,Nat.reduceAdd,Nat.cast_ofNat] + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hangle (D : ℝ) (hD : D∈Icc B.Dmin B.Dmax) : DyadicWindow 1 (k 2) (Real.sqrt (D/2)) := + dyadicWindow_one_sqrt (k 2) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.1) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.2) + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hN : AEMeasurable N μ := + physicalBinDensity_aemeasurable hs.energyPrefix hT hX hV B measurableSet_Icc hJ + have hG := hs.energyPrefix.measurable_prefixConeGood hT hX + let W : ConeCoordinate→ℝ≥0∞ := fun z=>ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z) + have hW : AEMeasurable W μ := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal.mul hG.ennreal_ofReal).aemeasurable + have hfield : (∫⁻z, W z^2 ∂μ)≤ENNReal.ofReal (20*I*datumEnergyNumber d) := by + apply le_trans _ ((hs.energyPrefix.physicalBin_goodField hT hX hV B 1 (k 2) hJ hI hangle).trans hgood) + apply le_of_eq + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B measurableSet_Icc) + intro z hz + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hg : 0≤prefixConeGood s T X z := add_nonneg (norm_nonneg _) (abs_nonneg _) + dsimp [W] + rw [mul_pow,←ENNReal.ofReal_pow hr,←ENNReal.ofReal_pow hg,←ENNReal.ofReal_mul (sq_nonneg _)] + have hD : ∀ᵐz ∂μ,N z≤ENNReal.ofReal (128*C*p^3*θ^2) := by + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B measurableSet_Icc) + intro z hz + have hh := hbound s T F hs.energyPrefix hs.initial_f X V B z.1 z.2.1 z.2.2 p θ 1 + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ hp.le hθ.le (by norm_num) + (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + have hθ1 : θ≤1 := cappedRepresentative_le_one (k 1) + simpa only [min_eq_left hθ1] using hh + change ENNReal.ofReal (φ/(p*θ^2))*(∫⁻z,W z*N z ∂μ)≤_ + apply mul_le_mul' le_rfl + have hh := lintegral_product_bound_two μ hW hN hfield hD + (le_rfl : (∫⁻z,N z ∂μ)≤∫⁻z,N z ∂μ) (le_rfl : μ univ≤μ univ) + apply hh.trans + apply mul_le_mul' le_rfl + exact ENNReal.rpow_le_rpow (min_le_right _ _) (by norm_num) + +lemma capped_sqrt_min_sum {a b q : ℝ} (ha : 0min (a*((2:ℝ)^k)^((1:ℝ)/2)) (b*((2:ℝ)^k)^(-((1:ℝ)/2))) + have hg := dyadic_power_min_summable ha.le hb.le (by norm_num : (0:ℝ)<1/2) (by norm_num : (0:ℝ)<1/2) + have ht := dyadic_balance_at ha.le hb.le (by norm_num : (0:ℝ)<1/2) (by norm_num : (0:ℝ)<1/2) hr + have hn : a*Real.sqrt r≤q := by + have hs := Real.sq_sqrt hr.le + have he : a^2*r=a*b := by dsimp [r]; field_simp + nlinarith [mul_nonneg ha.le (Real.sqrt_nonneg r)] + have hf : b/Real.sqrt r≤q := by + have he : b/Real.sqrt r=a*Real.sqrt r := by + apply (div_eq_iff (Real.sqrt_pos.mpr hr).ne').mpr + have hs := Real.sq_sqrt hr.le + have he : a*r=b := by dsimp [r]; field_simp + nlinarith + rwa [he] + have hd : 0<1-((2:ℝ)^((1:ℝ)/2))⁻¹ := sub_pos.mpr + (inv_lt_one_of_one_lt₀ (Real.one_lt_rpow (by norm_num) (by norm_num : (0:ℝ)<1/2))) + have ht' : (∑'k : ℤ,g k)≤dyadicBalanceConstant (1/2) (1/2)*q := by + apply ht.trans + rw [Real.rpow_neg hr.le,←Real.sqrt_eq_rpow] + have hn' := div_le_div_of_nonneg_right hn hd.le + have hf' := mul_le_mul_of_nonneg_left (div_le_div_of_nonneg_right hf hd.le) + (Real.rpow_nonneg (by norm_num : (0:ℝ)≤2) ((1:ℝ)/2)) + dsimp [dyadicBalanceConstant] + simp only [div_eq_mul_inv] at hn' hf' ⊢ + nlinarith only [hn',hf'] + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have he' (n : ℕ) : min (a*Real.sqrt (cappedRepresentative n)) + (b/Real.sqrt (cappedRepresentative n))=g (-(n:ℤ)) := by + dsimp [g] + rw [Real.rpow_neg (zpow_pos (by norm_num : (0:ℝ)<2) _).le,←Real.sqrt_eq_rpow,he] + rfl + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro x y hxy + exact_mod_cast neg_injective hxy + simp_rw [he'] + apply (ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (g k))).trans + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>by positivity) hg] + exact ENNReal.ofReal_le_ofReal ht' + +lemma magnetic_shared_radial_sum {I R p θ φ : ℝ} + (hI : 0 ring + · congr 1 + ring + +lemma good_central_near_scalar {C E D I h p θ φ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hD : 0≤D) (hI : 0≤I) (hh : 0≤h) + (hp : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeRegularGoodCost s F zX P M A I w k a b≤ + ENNReal.ofReal (C*min (I*Real.sqrt h*p^2*φ^2) (Real.sqrt I*R/(Real.sqrt h*θ))) := by + classical + obtain ⟨Cd,hCd,hmag⟩ := hd.representative_good_central + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_regular_central_shared T₀ + let E := datumEnergyNumber d + have hE : 0≤E := hd.datumEnergyNumber_nonneg + let C := Real.sqrt (2560*Cd*E*Cc) + refine ⟨C,Real.sqrt_nonneg _,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hab hw hsmall HZ + dsimp only + unfold representativeRegularGoodCost + split_ifs with hk + · have hcen := hcentral M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hab hw hsmall HZ + unfold representativeRegularCentralCost at hcen + rw [ite_eq_left hk] at hcen + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + have hp : 0

j₀-j) S := by + intro i hi j hj hij + have hi' := hjmax i hi + have hj' := hjmax j hj + change j₀-i=j₀-j at hij + omega + calc + _≤∑j∈S,(((2:ℝ)⁻¹)^α)^(j₀-j) := Finset.sum_le_sum hpoint + _=∑m∈S.image (fun j=>j₀-j),(((2:ℝ)⁻¹)^α)^m := (Finset.sum_image hinj).symm + _≤∑'m : ℕ,(((2:ℝ)⁻¹)^α)^m := + (summable_geometric_of_norm_lt_one hnorm).sum_le_tsum _ (fun _ _=>by positivity) + _=_ := tsum_geometric_of_norm_lt_one hnorm + · rw [Finset.not_nonempty_iff_eq_empty.mp hne,Finset.sum_empty] + exact inv_nonneg.mpr (sub_nonneg.mpr hbase1.le) + +lemma capped_inverse_head_sum {x : ℝ} (hx : 0x≤cappedRepresentative j) + have he : (∑j∈S,if x≤cappedRepresentative j then ENNReal.ofReal (x/cappedRepresentative j) else 0)= + ∑j∈U,ENNReal.ofReal (x/cappedRepresentative j) := by simp [U,Finset.sum_filter] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun j _=>div_nonneg hx.le (cappedRepresentative_pos j).le)] + have hb := capped_negative_power_sum hx (by norm_num : (0:ℝ)<1) U + (fun j hj=>(Finset.mem_filter.mp hj).2) + norm_num at hb + exact (ENNReal.ofReal_le_ofReal hb).trans_eq (by norm_num) + +lemma capped_balance_sum {a b α β : ℝ} (ha : 0min (a*((2:ℝ)^k)^α) (b*((2:ℝ)^k)^(-β)) + have hg : Summable g := dyadic_power_min_summable ha.le hb.le hα hβ + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have he (j : ℕ) : cappedRepresentative j=(2:ℝ)^(-(j:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hi : Function.Injective (fun j : ℕ=>-(j:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + simp_rw [he] + calc + _≤∑'k : ℤ,ENNReal.ofReal (g k) := ENNReal.tsum_comp_le_tsum_of_injective hi _ + _=ENNReal.ofReal (∑'k : ℤ,g k) := (ENNReal.ofReal_tsum_of_nonneg hg0 hg).symm + _≤_ := ENNReal.ofReal_le_ofReal (dyadic_balance ha hb hα hβ) + +lemma scaled_capped_crossing_sum {n f x α : ℝ} (hn : 0 simp + _≤ENNReal.ofReal f*2 := mul_le_mul' le_rfl (capped_inverse_head_sum hx) + _=ENNReal.ofReal (2*f) := by rw [mul_comm,ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2)]; norm_num + · have hnorm : (n/x^α)^(1/(α+1))*(f*x)^(α/(α+1))= + n^(1/(α+1))*f^(α/(α+1)) := by + rw [Real.div_rpow hn.le (Real.rpow_nonneg hx.le _),Real.mul_rpow hf.le hx.le, + ←Real.rpow_mul hx.le] + have he : α*(1/(α+1))=α/(α+1) := by ring + rw [he] + have hz := (Real.rpow_pos_of_pos hx (α/(α+1))).ne' + field_simp + have he (j : ℕ) : min (n*(cappedRepresentative j/x)^α) + (f*(cappedRepresentative j/x)^(-1:ℝ))= + min ((n/x^α)*(cappedRepresentative j)^α) ((f*x)*(cappedRepresentative j)^(-1:ℝ)) := by + rw [Real.div_rpow (cappedRepresentative_pos j).le hx.le,Real.rpow_neg_one, + Real.rpow_neg_one,inv_div] + congr 1 <;> ring + calc + _≤∑'j : ℕ,ENNReal.ofReal (min ((n/x^α)*(cappedRepresentative j)^α) + ((f*x)*(cappedRepresentative j)^(-1:ℝ))) := by + apply ENNReal.tsum_le_tsum + intro j + split_ifs + · exact le_of_eq (congrArg ENNReal.ofReal (he j)) + · exact bot_le + _≤ENNReal.ofReal (dyadicBalanceConstant α 1* + ((n/x^α)^(1/(α+1))*(f*x)^(α/(α+1)))) := + capped_balance_sum (div_pos hn (Real.rpow_pos_of_pos hx _)) (mul_pos hf hx) hα (by norm_num) + _=_ := by rw [hnorm] + +lemma good_structural_radial_sum {I R p θ φ : ℝ} + (hI : 0 ring + · congr 1 + dsimp [X,Y] + ring + +lemma structural_angle_tsum_le {φ B : ℝ} (hφ : 0<φ) (hB : 0≤B) + (f : ℕ→ℝ≥0∞) + (hf : ∀n,φ/16384≤cappedRepresentative n → cappedRepresentative n≤φ/16 → + f n≤ENNReal.ofReal B) : + (∑'n : ℕ,if φ/16384≤cappedRepresentative n ∧ cappedRepresentative n≤φ/16 then f n else 0)≤ + ENNReal.ofReal (32768*B) := by + classical + have hpoint (n : ℕ) : + (if φ/16384≤cappedRepresentative n ∧ cappedRepresentative n≤φ/16 then f n else 0)≤ + ENNReal.ofReal (16384*B)*(if φ/16384≤cappedRepresentative n then + ENNReal.ofReal ((φ/16384)/cappedRepresentative n) else 0) := by + by_cases hn : φ/16384≤cappedRepresentative n ∧ cappedRepresentative n≤φ/16 + · rw [ite_eq_left hn,ite_eq_left hn.1,←ENNReal.ofReal_mul (by positivity : 0≤16384*B)] + apply (hf n hn.1 hn.2).trans + apply ENNReal.ofReal_le_ofReal + have hθ : cappedRepresentative n≤φ := hn.2.trans (by linarith) + have hh := mul_le_mul_of_nonneg_left ((one_le_div (cappedRepresentative_pos n)).mpr hθ) hB + calc + B=B*1 := (mul_one _).symm + _≤B*(φ/cappedRepresentative n) := hh + _=_ := by ring + · rw [ite_eq_right hn] + exact bot_le + apply (ENNReal.tsum_le_tsum hpoint).trans + rw [ENNReal.tsum_mul_left] + apply (mul_le_mul' le_rfl (capped_inverse_head_sum (by positivity : 0<φ/16384))).trans_eq + rw [←ENNReal.ofReal_ofNat (n:=2),←ENNReal.ofReal_mul (by positivity : 0≤16384*B)] + congr 1 + ring + +lemma Admissible.representative_regular_good_structural_double_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + (∑'nt : ℕ,∑'nr : ℕ,if φ/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤φ/16 then + representativeRegularGoodCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*(Real.sqrt I*R*p*φ+I*p)) := by + classical + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_good T₀ + let K := dyadicBalanceConstant (1/2) (1/2) + have hK : 0 simp + change (∑'nt : ℕ,∑'nr : ℕ,if φ/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤φ/16 then + representativeRegularGoodCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤_ + simp_rw [he] + apply (structural_angle_tsum_le hφ (by positivity) _ hr).trans_eq + congr 1 + ring + +lemma small_pair_source_sum {P : ℝ} (hP : 1≤P) (hL : 1≤Real.log (2+P)) + (S : Finset (ℕ×ℕ)) (hS : ∀n∈S,sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2) : + (∑n∈S,sourceRepresentative n.1)≤2*pairCountConstant*P*Real.log (2+P) := by + classical + let U := S.image Prod.fst + let V := S.image Prod.snd + have hU (n) (hn : n∈U) : sourceRepresentative n≤P := by + obtain ⟨k,hk,rfl⟩ := Finset.mem_image.mp hn + exact (hS k hk).1 + have hsub : S⊆U.product V := by + intro n hn + exact Finset.mem_product.mpr ⟨Finset.mem_image.mpr ⟨n,hn,rfl⟩,Finset.mem_image.mpr ⟨n,hn,rfl⟩⟩ + have hc := (small_pair_cardinals hP hL S hS).2 + have hp : 0≤P := zero_le_one.trans hP + calc + _≤∑n∈U.product V,sourceRepresentative n.1 := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun n _ _=>by dsimp [sourceRepresentative]; positivity) + _=(∑n∈U,sourceRepresentative n)*(V.card:ℝ) := by + simp only [Finset.product_eq_sprod,Finset.sum_product,Finset.sum_const,nsmul_eq_mul] + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro n hn + ring + _≤(2*P)*(pairCountConstant*Real.log (2+P)) := + mul_le_mul (sourceRepresentative_sum_bound hp U hU) hc (Nat.cast_nonneg _) (by positivity) + _=_ := by ring + +lemma small_pair_I_source_sum {P M A I w : ℝ} (hP : 1≤P) (hL : 1≤Real.log (2+P)) + (hM : 1≤M) (hI : 0≤I) (hw : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_regular_good_structural_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*(K+2*pairCountConstant),mul_nonneg hCc (add_nonneg hK (mul_nonneg (by norm_num) pairCountConstant_pos.le)),?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL (zero_le_one.trans hM) hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hn2 := small_pair_I_source_sum (A:=A) hP hL hM hI.le hw hwP U + (fun n hn=>hpair n (hU n hn)) + have hsum : (∑n∈U,(Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2+ + I*sourceRepresentative n.1))≤(K+2*pairCountConstant)*B := by + rw [Finset.sum_add_distrib] + calc + _≤K*B+(2*pairCountConstant)*B := add_le_add hn hn2 + _=_ := by ring + calc + _≤∑n∈U,ENNReal.ofReal (Cc*(Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2+ + I*sourceRepresentative n.1)) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P (zero_lt_one.trans_le hM) hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hJI hw HZ + _=ENNReal.ofReal (Cc*(∑n∈U,(Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2+ + I*sourceRepresentative n.1))) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg hCc (add_nonneg + (mul_nonneg (mul_nonneg (mul_nonneg (Real.sqrt_nonneg I) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le) + (mul_nonneg hI.le (hp _).le)))] + congr 1 + exact (Finset.mul_sum ..).symm + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hsum hCc + simpa only [B, mul_assoc] using hh) + +lemma Admissible.representative_good_near {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → ∀(zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0.trans + · apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ (by positivity) + exact mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt (max_le_max le_rfl hTT)) (by positivity) + · apply mul_le_mul' le_rfl + apply mul_le_mul' le_rfl + exact ENNReal.rpow_le_rpow (min_le_left _ _) (by norm_num) + +noncomputable def representativeLowShortGoodCost {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (I w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := by + classical + exact if cappedRepresentative (k 2)≤512/min (sourceRepresentative (k 0)) w ∧ + cappedRepresentative (k 3)≤I then representativeGoodCost s F zX w k a b else 0 + +lemma good_low_coefficient {P p w : ℝ} (hP : 1≤P) (hp : 1≤p) + (hpP : p≤P) (hw : 1≤w) (hwP : w≤P) : + p^2*(512/min p w)^2≤512^2*P^2/w := by + have hP0 : 0

.mpr hpP) (by positivity) + _=512^2*(P^2/w^2) := by ring + _≤512^2*(P^2/w) := mul_le_mul_of_nonneg_left + (div_le_div_of_nonneg_left (sq_nonneg _) hw0 hww) (by norm_num) + _=_ := by ring + +lemma Admissible.representative_low_good_structural_triple_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (np : ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nr : ℕ,representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b + have hr (nf nt : ℕ) : G nf nt≤ENNReal.ofReal + (Cn*(I*p^2*(cappedRepresentative nf)^2)*K*Real.sqrt I) := by + have he (nr : ℕ) : representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b≤ + if cappedRepresentative nr≤I then + ENNReal.ofReal ((Cn*I*p^2*(cappedRepresentative nf)^2)*Real.sqrt (cappedRepresentative nr)) else 0 := by + unfold representativeLowShortGoodCost + change (if cappedRepresentative nf≤512/min p w ∧ cappedRepresentative nr≤I then _ else 0)≤_ + by_cases hh : cappedRepresentative nr≤I + · rw [ite_eq_left hh] + split_ifs with hl + · apply (hnear s T F hs hT hTT zX ![np,nt,nf,nr] a b I w ha hb hI hJI).trans_eq + congr 1 + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_succ,Matrix.head_cons] + dsimp [p] + ring + · exact bot_le + · rw [ite_eq_right hh,ite_eq_right (fun hc=>hh hc.2)] + apply (ENNReal.tsum_le_tsum he).trans + have hh := majorant_capped_short_sqrt_radius_sum (by norm_num : (0:ℝ)<1) hI + (K:=Cn*I*p^2*(cappedRepresentative nf)^2) (by positivity) + simp only [one_mul] at hh + apply hh.trans_eq + congr 1 + dsimp [K] + ring + have hf (nf : ℕ) : + (∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nf/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b else 0)≤ + if cappedRepresentative nf≤512/min p w then + ENNReal.ofReal (32768*Cn*K*I*Real.sqrt I*p^2*(cappedRepresentative nf)^2) else 0 := by + by_cases hl : cappedRepresentative nf≤512/min p w + · rw [ite_eq_left hl] + have he (nt : ℕ) : (∑'nr : ℕ,if cappedRepresentative nf/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b else 0)= + if cappedRepresentative nf/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then G nf nt else 0 := by + split_ifs <;> simp [G] + simp_rw [he] + apply (structural_angle_tsum_le (cappedRepresentative_pos nf) (by positivity) (G nf) (fun nt _ _=>hr nf nt)).trans_eq + congr 1 + ring + · rw [ite_eq_right hl] + have hz (nt nr : ℕ) : representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b=0 := by + change (if cappedRepresentative nf≤512/min p w ∧ cappedRepresentative nr≤I then _ else 0)=0 + exact ite_eq_right (fun hh=>hl hh.1) + simp only [hz,ite_self,tsum_zero,le_refl] + apply (ENNReal.tsum_le_tsum hf).trans + have hC : 0≤32768*Cn*K*I*Real.sqrt I*p^2 := by positivity + calc + _=ENNReal.ofReal (32768*Cn*K*I*Real.sqrt I*p^2)* + (∑'nf : ℕ,ENNReal.ofReal (if cappedRepresentative nf≤512/min p w then (cappedRepresentative nf)^2 else 0)) := by + rw [←ENNReal.tsum_mul_left] + apply tsum_congr + intro nf + split_ifs <;> simp [←ENNReal.ofReal_mul hC] + _≤ENNReal.ofReal (32768*Cn*K*I*Real.sqrt I*p^2)*ENNReal.ofReal (2*(512/min p w)^2) := + mul_le_mul' le_rfl (capped_square_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma Admissible.good_low_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ P : ℝ,1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortGoodCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cn,hCn,hnear⟩ := hd.representative_low_good_structural_triple_sum T₀ + have hpc := pairCountConstant_pos + refine ⟨512^2*Cn*pairCountConstant,by positivity,?_⟩ + intro P hP hL s T F hs hT hTT zX a b I w ha hb hI hI1 hJI hw hwP + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nf/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeLowShortGoodCost s F zX I w ![np,nt,nf,nr] a b else 0 + let D := 512^2*Cn*I*P^2/w + have hP0 : 0

∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortGoodCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + obtain ⟨N,hN,hidx⟩ := exists_small_pair_count hP hL + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have hsub : U⊆Finset.range N := by + intro np hn + have hpn : 1/sourceRepresentative np≤cappedRepresentative 0 := by + rw [show cappedRepresentative 0=1 by rfl] + exact (div_le_one (zero_lt_one.trans_le (sourceRepresentative_one_le _))).mpr (sourceRepresentative_one_le _) + exact Finset.mem_range.mpr (hidx np 0 (hU np hn) hpn).1 + have hcard : (U.card:ℝ)≤pairCountConstant*Real.log (2+P) := by + have hh : (U.card:ℝ)≤N := by exact_mod_cast (Finset.card_le_card hsub).trans_eq (Finset.card_range N) + exact hh.trans hN + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal D := Finset.sum_le_sum (fun np hn=>hgb np (hU np hn)) + _=ENNReal.ofReal ((U.card:ℝ)*D) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun _ _=>hD)] + simp + _≤ENNReal.ofReal ((pairCountConstant*Real.log (2+P))*D) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hcard hD) + _=_ := by congr 1; dsimp [D]; ring + +lemma Admissible.good_structural_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeGoodCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cr,hCr,hregular⟩ := hd.good_regular_structural_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.good_low_uniform T₀ + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let Gr := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0 + let Ge := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortGoodCost s F zX I w ![n.1,nt,n.2,nr] a b else 0 + have he (n : ℕ×ℕ) : Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeGoodCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n≤ + Q.indicator Gr n+Q.indicator Ge n := by + by_cases hn : n∈Q + · simp only [indicator_of_mem hn,Gr,Ge] + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro nt + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro nr + by_cases ht : cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 + · simp only [ite_eq_left ht] + by_cases hreg : regularCentralIndex P M A I w ![n.1,nt,n.2,nr] + · have he : representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b= + representativeGoodCost s F zX w ![n.1,nt,n.2,nr] a b := ite_eq_left hreg + rw [he] + exact le_add_right le_rfl + · have hh : ¬(512/min (sourceRepresentative n.1) w∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeGoodCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤_ + apply (ENNReal.tsum_le_tsum he).trans + rw [ENNReal.tsum_add] + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let V := I*P^2*Real.log (2+P)/w + have hV : 0≤V := by dsimp [V]; positivity + have hB : 0≤B := by dsimp [B]; positivity + have hVB : V≤B := by + have hroot := Real.sqrt_nonneg A + have hfirst : 0≤P*Real.sqrt I := by positivity + have ht : V≤(M+Real.sqrt A)*V := le_mul_of_one_le_left hV (by linarith) + calc + V≤(M+Real.sqrt A)*V := ht + _≤P*Real.sqrt I+(M+Real.sqrt A)*V := le_add_of_nonneg_left hfirst + _=B := by dsimp [B,V]; ring + have hr := hregular M A P hM hA hP hL s T F hs hT hTT + zX a b I w hzX ha hb hI hJI (zero_lt_one.trans_le hw) hwP HZ + have he' := hexception P hP hL s T F hs hT hTT zX a b I w ha hb hI hI1 hJI hw hwP + calc + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*V) := add_le_add hr he' + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hVB hCe)) + _=ENNReal.ofReal ((Cr+Ce)*B) := by rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCe hB)]; congr 1; ring + +lemma crossing_bound_normalised {n D α : ℝ} (hn : 0min (((N/D)*((2:ℝ)^k)^γ)^q) (((N/D)*((2:ℝ)^k)^γ)^(-1:ℝ)) + have hg := angular_crossing_sum (div_pos hN hD) hγ hq + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have he (j : ℕ) : cappedRepresentative j=(2:ℝ)^(-(j:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hi : Function.Injective (fun j : ℕ=>-(j:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _≤∑'nt : ℕ,ENNReal.ofReal K*ENNReal.ofReal (g (-(nt:ℤ))) := by + apply ENNReal.tsum_le_tsum + intro nt + have hb := scaled_capped_crossing_normalised + (mul_pos hN (Real.rpow_pos_of_pos (cappedRepresentative_pos nt) γ)) hD (hx nt) hα + apply hb.trans_eq + rw [←ENNReal.ofReal_mul hK] + congr 1 + dsimp [K,g,q] + rw [he] + congr 2 <;> congr 1 <;> ring + _=ENNReal.ofReal K*(∑'nt : ℕ,ENNReal.ofReal (g (-(nt:ℤ)))) := ENNReal.tsum_mul_left + _≤ENNReal.ofReal K*(∑'k : ℤ,ENNReal.ofReal (g k)) := + mul_le_mul' le_rfl (ENNReal.tsum_comp_le_tsum_of_injective hi (fun index => ENNReal.ofReal (g index))) + _=ENNReal.ofReal K*ENNReal.ofReal (∑'k : ℤ,g k) := by + rw [ENNReal.ofReal_tsum_of_nonneg hg0 hg.1] + _≤ENNReal.ofReal K*ENNReal.ofReal (dyadicBalanceConstant (γ*q) γ) := + mul_le_mul' le_rfl (ENNReal.ofReal_le_ofReal hg.2) + _=_ := by rw [←ENNReal.ofReal_mul hK] + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma spatial_crossing_scale {b α θ : ℝ} (hb : 0H*(cappedRepresentative nt)^(-α/(1-α)) + let N := a*H/b + let D := Real.sqrt (a*c/b) + let γ := (1-2*α)/(1-α) + have hH : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeRegularGoodCost s F zX P M A I w k a b≤ + ENNReal.ofReal (C*min (I*Real.sqrt h*p^2*φ^2) (Real.sqrt I*R/(θ*Real.sqrt h))) := by + simpa only [mul_comm] using hd.representative_regular_good T₀ + +def goodInverseHalfConstant : ℝ := (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ +lemma goodInverseHalfConstant_pos : 01/p≤cappedRepresentative nt) + have he : (∑nt∈S,ENNReal.ofReal (if 1/p≤cappedRepresentative nt then + 1/Real.sqrt (cappedRepresentative nt) else 0))= + ∑nt∈U,ENNReal.ofReal (1/Real.sqrt (cappedRepresentative nt)) := by + simp only [U,Finset.sum_filter,apply_ite,ENNReal.ofReal_zero] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun nt _=>by positivity)] + exact ENNReal.ofReal_le_ofReal (capped_inverse_half_floor_sum hp U + (fun nt hnt=>(Finset.mem_filter.mp hnt).2)) + +lemma good_shared_sqrt_balance {I p φ R θ : ℝ} (hI : 0≤I) (hp : 0≤p) + (hφ : 0≤φ) (hR : 0≤R) (_ : 0<θ) : + Real.sqrt ((I*p^2*φ^2)*(Real.sqrt I*R/θ))= + Real.sqrt (I*Real.sqrt I)*Real.sqrt R*p*φ/Real.sqrt θ := by + rw [show (I*p^2*φ^2)*(Real.sqrt I*R/θ)=((I*Real.sqrt I)*R*(p*φ)^2)/θ by ring] + rw [Real.sqrt_div (by positivity),Real.sqrt_mul (by positivity : 0≤(I*Real.sqrt I)*R), + Real.sqrt_sq (mul_nonneg hp hφ),Real.sqrt_mul (by positivity : 0≤I*Real.sqrt I)] + ring + +lemma good_shared_time_comparison {I p P w R : ℝ} (hI : 0≤I) (_ : 0≤p) + (hpP : p≤P) (hP : 0cappedRepresentative n≤x) + have he : (∑n∈S,ENNReal.ofReal (if cappedRepresentative n≤x then Real.sqrt (cappedRepresentative n) else 0))= + ∑n∈U,ENNReal.ofReal (Real.sqrt (cappedRepresentative n)) := by simp [U,Finset.sum_filter,apply_ite] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun n _=>Real.sqrt_nonneg _)] + apply ENNReal.ofReal_le_ofReal + have hh := capped_positive_power_sum_unscaled hx (by norm_num : (0:ℝ)<1/2) U + (fun n hn=>(Finset.mem_filter.mp hn).2) + simpa only [goodInverseHalfConstant,←Real.sqrt_eq_rpow] using hh + +lemma capped_floor_count_half {p : ℝ} (hp : 0 simp + +lemma Admissible.good_exception_triple_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0

ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt))) + _=ENNReal.ofReal Cn*(∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if 1/p≤cappedRepresentative nt then if cappedRepresentative nr≤1/P^2 then + ENNReal.ofReal (I*Real.sqrt (cappedRepresentative nr)*p^2*(cappedRepresentative nf)^2) else 0 else 0) := by + simp only [ENNReal.tsum_mul_left] + _≤ENNReal.ofReal Cn*ENNReal.ofReal (2*goodInverseHalfConstant^2*I*p^2*Real.sqrt p/P) := + mul_le_mul' le_rfl (good_exception_model_sum hP hI.le hp) + _=_ := by rw [←ENNReal.ofReal_mul hCn]; congr 1; dsimp only [p]; ring + +lemma Admissible.good_regular_radial {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'nr : ℕ,representativeRegularGoodCost s F zX P M A I w ![np,nt,nf,nr] a b)≤ + ENNReal.ofReal (C*Real.sqrt (I*Real.sqrt I)* + Real.sqrt (representativeSharedRadius s F zX P M A w a b I (np,nf))* + sourceRepresentative np*cappedRepresentative nf/Real.sqrt (cappedRepresentative nt)) := by + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_good_shared T₀ + have hD : 0≤dyadicBalanceConstant (1/2) (1/2) := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + refine ⟨C*dyadicBalanceConstant (1/2) (1/2),mul_nonneg hC hD,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nt nf a b I w hzX ha hb hI hJI hw hsmall HZ + let p := sourceRepresentative np + let θ := cappedRepresentative nt + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + have hp : 0

ring + calc + _≤∑'nr : ℕ,ENNReal.ofReal (C*min (I*Real.sqrt (cappedRepresentative nr)*p^2*φ^2) + (Real.sqrt I*R/(θ*Real.sqrt (cappedRepresentative nr)))) := by + apply ENNReal.tsum_le_tsum + intro nr + exact hbound M A P hM hA hP s T F hs hT hTT zX ![np,nt,nf,nr] a b I w + hzX ha hb hI hJI hw hsmall HZ + _≤ENNReal.ofReal (C*dyadicBalanceConstant (1/2) (1/2)* + Real.sqrt ((I*p^2*φ^2)*(Real.sqrt I*R/θ))) := by + simp_rw [he] + exact capped_sqrt_radius_ennreal_sum (by positivity) (by positivity) (by norm_num) hC + _=_ := by + rw [good_shared_sqrt_balance hI.le hp.le hf.le hR ht] + congr 1 + ring + +lemma Admissible.good_regular_double_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'nt : ℕ,∑'nr : ℕ,if 1/sourceRepresentative np≤cappedRepresentative nt ∧ + cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeRegularGoodCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt w*Real.sqrt I*representativeSharedRadius s F zX P M A w a b I (np,nf)* + sourceRepresentative np*cappedRepresentative nf) := by + obtain ⟨C,hC,hbound⟩ := hd.good_regular_radial T₀ + have hD := goodInverseHalfConstant_pos.le + refine ⟨C*goodInverseHalfConstant,mul_nonneg hC hD,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nf a b I w hzX ha hb hI hJI hw hpP hIP HZ + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*Real.sqrt w*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.good_regular_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP hIP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt w*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P hM hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hJI hw (hU n hn).1 hIP HZ + _=ENNReal.ofReal ((Cc*Real.sqrt w)*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg w)) (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn (mul_nonneg hCc (Real.sqrt_nonneg w)) + simpa only [mul_assoc, mul_left_comm, mul_comm] using hh) + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma sourceRepresentative_twohalf_sum {P : ℝ} (hP : 0≤P) (S : Finset ℕ) + (hS : ∀np∈S,sourceRepresentative np≤P) : + (∑np∈S,(sourceRepresentative np)^2*Real.sqrt (sourceRepresentative np))≤2*P^2*Real.sqrt P := by + have hp (np : ℕ) : 0 ≤ sourceRepresentative np := by unfold sourceRepresentative; positivity + calc + _≤∑np∈S,(P*Real.sqrt P)*sourceRepresentative np := by + apply Finset.sum_le_sum + intro np hn + have hh := mul_le_mul (hS np hn) (Real.sqrt_le_sqrt (hS np hn)) (Real.sqrt_nonneg _) hP + have hh' := mul_le_mul_of_nonneg_right hh (hp np) + nlinarith only [hh'] + _=(P*Real.sqrt P)*(∑np∈S,sourceRepresentative np) := (Finset.mul_sum ..).symm + _≤(P*Real.sqrt P)*(2*P) := mul_le_mul_of_nonneg_left (sourceRepresentative_sum_bound hP S hS) (by positivity) + _=2*P^2*Real.sqrt P := by ring + +lemma Admissible.good_exception_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0

∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*I*P*Real.sqrt P) := by + obtain ⟨Cn,hCn,hnear⟩ := hd.good_exception_triple_sum T₀ + refine ⟨2*Cn,by positivity,?_⟩ + intro M A P hM hP s T F hs hT hTT zX a b I w ha hb hI hJI hw + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative np≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeExceptionGoodCost s F zX P M A I w ![np,nt,nf,nr] a b else 0 + have hc : 0≤Cn*I/P := by positivity + have hdom : (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionGoodCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal (Cn*I*((sourceRepresentative np)^2*Real.sqrt (sourceRepresentative np))/P) := by + apply Finset.sum_le_sum + intro np hn + simpa only [g,mul_assoc] using hnear M A P hM hP s T F hs hT hTT zX np a b I w ha hb hI hJI hw + _=ENNReal.ofReal ((Cn*I/P)*(∑np∈U,(sourceRepresentative np)^2*Real.sqrt (sourceRepresentative np))) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun np _=>by unfold sourceRepresentative; positivity)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro np hn + ring + _≤ENNReal.ofReal ((Cn*I/P)*(2*P^2*Real.sqrt P)) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left (sourceRepresentative_twohalf_sum hP.le U hU) hc) + _=_ := by congr 1; field_simp + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma good_exception_time_comparison {P I w : ℝ} (hP : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'k : Fin 4→ℕ,(representativeSmallSector P).indicator + (fun k=>representativeGoodCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*Real.sqrt w*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cr,hCr,hregular⟩ := hd.good_regular_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.good_exception_uniform T₀ + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP hIP HZ + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + let R := representativeSmallSector P + let g := fun k=>representativeRegularGoodCost s F zX P M A I w k a b + let e := fun k=>representativeExceptionGoodCost s F zX P M A I w k a b + have hsplit : (∑'k : Fin 4→ℕ,R.indicator (fun k=>representativeGoodCost s F zX w k a b) k)= + (∑'k,R.indicator g k)+(∑'k,R.indicator e k) := by + rw [←ENNReal.tsum_add] + apply tsum_congr + intro k + by_cases hk : k∈R + · simp only [indicator_of_mem hk] + exact good_cost_eq_regular_add_exception s F zX P M A I w k a b + · simp only [indicator_of_notMem hk,add_zero] + have hr : (∑'k,R.indicator g k)≤ENNReal.ofReal (Cr*Real.sqrt w*B) := by + rw [show R=representativeSmallSector P from rfl,tsum_representativeSmallSector] + exact hregular M A P (zero_lt_one.trans_le hM) hA hP hL s T F hs hT hTT zX a b I w + hzX ha hb hI hJI hw hwP hIP HZ + have he : (∑'k,R.indicator e k)≤ENNReal.ofReal (Ce*Real.sqrt w*B) := by + rw [show R=representativeSmallSector P from rfl,tsum_representativeSmallSector] + apply (hexception M A P hM (zero_lt_one.trans_le hP) s T F hs hT hTT zX a b I w ha hb hI hJI hw).trans + apply ENNReal.ofReal_le_ofReal + have hi := good_exception_time_comparison (zero_lt_one.trans_le hP) hI.le hI1 hw.le hIP + have hib : I*P*Real.sqrt P≤Real.sqrt w*B := by + calc + _=P*(I*Real.sqrt P) := by ring + _≤P*(Real.sqrt w*Real.sqrt I) := mul_le_mul_of_nonneg_left hi (zero_le_one.trans hP) + _≤Real.sqrt w*B := by + have hh := mul_le_mul_of_nonneg_left (show P*Real.sqrt I≤B from le_add_of_nonneg_right (by positivity)) (Real.sqrt_nonneg w) + simpa only [mul_assoc,mul_left_comm,mul_comm] using hh + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hib hCe + rw [hsplit] + apply (add_le_add hr he).trans_eq + rw [←ENNReal.ofReal_add (by positivity : 0≤Cr*Real.sqrt w*B) (by positivity : 0≤Ce*Real.sqrt w*B)] + congr 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/HomogeneousCancellation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/HomogeneousCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..89eee232604f461f393f563b7a055f8aa65d7303 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/HomogeneousCancellation.lean @@ -0,0 +1,216 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeRadius + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma integral_annulus_polar {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : Vec→W} {ε R : ℝ} (hε : 0<ε) + (hg : IntegrableOn g (ball (0:Vec) R \ ball (0:Vec) ε)) : + (∫z in ball (0:Vec) R \ ball (0:Vec) ε,g z)= + ∫n : Sphere,∫r in Ico ε R,r^2 • g (r • n.1) ∂volume ∂sphereMeasure := by + classical + let H := (ball (0:Vec) R \ ball (0:Vec) ε).indicator g + have hm : MeasurableSet (ball (0:Vec) R \ ball (0:Vec) ε) := measurableSet_ball.diff measurableSet_ball + have hi : Integrable H := (integrable_indicator_iff hm).mpr hg + rw [←integral_indicator hm] + change (∫z,H z)=_ + rw [integral_polar hi] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + have he : ∀r∈Ioi (0:ℝ),r^2 • H (r • n.1)= + (Ico ε R).indicator (fun r=>r^2 • g (r • n.1)) r := by + intro r hr + have hnorm : ‖r • n.1‖=r := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hr,sphere_norm,mul_one] + have hmem : r • n.1∈ball (0:Vec) R \ ball (0:Vec) ε ↔ r∈Ico ε R := by + simp only [Set.mem_sdiff,mem_ball_zero_iff,hnorm,mem_Ico,not_lt] + exact and_comm + by_cases h : r∈Ico ε R + · rw [show H (r • n.1)=g (r • n.1) from indicator_of_mem (hmem.mpr h) g, + indicator_of_mem h] + · rw [show H (r • n.1)=0 from indicator_of_notMem (fun hh => h (hmem.mp hh)) g, + smul_zero,indicator_of_notMem h] + rw [setIntegral_congr_fun measurableSet_Ioi he,setIntegral_indicator measurableSet_Ico] + have hset : Ioi (0:ℝ) ∩ Ico ε R=Ico ε R := by + ext r + simp only [mem_inter_iff,mem_Ioi,mem_Ico] + exact ⟨fun h => h.2,fun h => ⟨hε.trans_le h.1,h⟩⟩ + rw [hset]) + +lemma fderiv_degree_neg_two {F : Vec → Vec} + (hh : ∀ r : ℝ, 0 r • y) (r • ContinuousLinearMap.id ℝ Vec) z := + (hasFDerivAt_id z).const_smul r + have h₁ := hrz.hasFDerivAt.comp z hm + have h₂ := hz.hasFDerivAt.const_smul ((r^2)⁻¹) + have heq : (fun y : Vec => F (r • y))=(fun y : Vec => (r^2)⁻¹ • F y) := funext (hh r hr) + change HasFDerivAt (fun y : Vec => F (r • y)) _ _ at h₁ + rw [heq] at h₁ + have hv := congrArg (fun L : Vec →L[ℝ] Vec => L e) (h₁.unique h₂) + change fderiv ℝ F (r • z) (r • e)=(r^2)⁻¹ • fderiv ℝ F z e at hv + rw [map_smul] at hv + have hv' := congrArg (fun a : Vec => r⁻¹ • a) hv + simpa only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul, + show r⁻¹*(r^2)⁻¹=(r^3)⁻¹ by field_simp] using hv' + +lemma divergence_degree_neg_two {F : Vec → Vec} + (hh : ∀ r : ℝ, 0 F x i) y = (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).comp (fderiv ℝ F y) := by + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp y (hF y hy).hasFDerivAt).fderiv + unfold divergence spatialPartial + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [hc _ hrz i,hc _ hz i] + change (fderiv ℝ F (r • z) (basis i)) i = (r^3)⁻¹*(fderiv ℝ F z (basis i)) i + rw [fderiv_degree_neg_two hh hr (hF _ hz) (hF _ hrz)] + rfl + +lemma angular_mean_divergence_degree_neg_two {F : Vec → Vec} + (hh : ∀ r : ℝ, 0 (hF z hz).differentiableAt (by simp) + have hz (n : Sphere) : n.1≠0 := by + intro h + have := sphere_norm n + rw [h,norm_zero] at this + norm_num at this + have hG := contDiff_holeCutoff_smul (F:=F) (by norm_num : (0:ℝ)<1) hF + have hc := continuous_divergence hG + have hi : IntegrableOn (divergence F) (ball (0:Vec) 2 \ ball (0:Vec) 1) := by + apply ((hc.continuousOn.integrableOn_compact (isCompact_closedBall (0:Vec) 2)).mono_set + (s:=ball (0:Vec) 2 \ ball (0:Vec) 1) (fun z hz => ball_subset_closedBall hz.1)).congr_fun + · intro z hz + apply divergence_holeCutoff (by norm_num : (0:ℝ)<1) + have hn : 1≤‖z‖ := by simpa only [mem_ball_zero_iff,not_lt] using hz.2 + linarith + · exact measurableSet_ball.diff measurableSet_ball + have ha := divergence_annulus (F:=F) (by norm_num : (0:ℝ)<1) (by norm_num : (1:ℝ)≤2) hF + have hflux (n : Sphere) : (2:ℝ)^2*dot n.1 (F ((2:ℝ) • n.1))= + (1:ℝ)^2*dot n.1 (F ((1:ℝ) • n.1)) := by + rw [hh 2 (by norm_num),one_smul,dot_smul_right] + ring + have ha0 : (∫z in ball (0:Vec) 2 \ ball (0:Vec) 1,divergence F z)=0 := by + rw [ha,show (∫n : Sphere,(2:ℝ)^2*dot n.1 (F ((2:ℝ) • n.1)) ∂sphereMeasure)= + (∫n : Sphere,(1:ℝ)^2*dot n.1 (F ((1:ℝ) • n.1)) ∂sphereMeasure) from integral_congr_ae (ae_of_all _ hflux),sub_self] + rw [integral_annulus_polar (by norm_num : (0:ℝ)<1) hi] at ha0 + have hir (n : Sphere) : (∫r in Ico (1:ℝ) 2,r^2 • divergence F (r • n.1))= + Real.log 2*divergence F n.1 := by + rw [setIntegral_congr_fun measurableSet_Ico (g:=fun r => r⁻¹*divergence F n.1)] + · rw [integral_mul_const,integral_Ico_eq_integral_Ioc,←intervalIntegral.integral_of_le (by norm_num : (1:ℝ)≤2), + integral_inv_of_pos (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<2)] + simp + · intro r hr + have hr0 : 0 transportAngularCore (n w) (u w)) z := by + have hdu := contDiff_dot_pair.contDiffAt.comp z (hu.prodMk hu) + have hdn := contDiff_dot_pair.contDiffAt.comp z (hn.prodMk hu) + exact ((contDiffAt_const.sub hdu).div ((contDiffAt_const.sub hdn).pow 2) + (pow_ne_zero 2 hd)).smul (hn.sub hu) + +lemma contDiffAt_coneSpatialLift {k : ℕ∞ω} {x y v e : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (fun z : Vec => coneSpatialLift x z v e) y := by + have hn := contDiffAt_coneDirection (k:=k) hxy + have hde := contDiff_dot_pair.contDiffAt.comp y (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp y (hn.prodMk (contDiffAt_const (c:=velocity v))) + have hc : ContDiffAt ℝ k (fun z : Vec => coneSpatialCoefficient x z v e) y := + hde.div (contDiffAt_const.sub hdu) (cone_denom_pos v _ (coneDirection_norm hxy)).ne' + exact contDiffAt_const.add (hc.smul contDiffAt_const) + +def transportSpatialFlux (v e : Vec) (i : Fin 3) (z : Vec) : Vec := + (((coneRadius 0 z)^2)⁻¹*transportAngularCore (coneDirection 0 z) (velocity v) i) • + coneSpatialLift 0 z v e + +lemma transportSpatialFlux_contDiffAt (v e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (transportSpatialFlux v e i) z := by + have h0z : (0:Vec)≠z := Ne.symm hz + have hr := contDiffAt_coneRadius (k:=1) h0z + have hn := contDiffAt_coneDirection (k:=1) h0z + have hu : ContDiffAt ℝ 1 (fun _ : Vec => velocity v) z := contDiffAt_const + have hc := contDiffAt_transportAngularCore hn hu + (cone_denom_pos v _ (coneDirection_norm h0z)).ne' + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp z hc + exact (((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr h0z)))).mul hi).smul + (contDiffAt_coneSpatialLift (v:=v) (e:=e) h0z) + +lemma transportSpatialFlux_homogeneous (v e : Vec) (i : Fin 3) {r : ℝ} (hr : 0 transportSpatialFlux_homogeneous v e i hr z) + (fun z hz => transportSpatialFlux_contDiffAt v e i hz) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/InitialSignedBoundaryDensity.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/InitialSignedBoundaryDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..17568447e55f3bca6c8060977eb2d3ef6e60846a --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/InitialSignedBoundaryDensity.lean @@ -0,0 +1,228 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.BranchIntegral + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.retarded_radius_separated {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX zY : Phase) + (hne : ∀ t∈Icc 0 T,(F.flow zX t).1≠(F.flow zY t).1) : + ∃ δ : ℝ,0<δ ∧ ∀ σ∈branchDomain F.flow zX zY T, + δ≤branchTime F.flow zX zY T σ-σ := by + have hc : ContinuousOn (fun t=>‖(F.flow zX t).1-(F.flow zY t).1‖) (Icc 0 T) := + ((F.continuousOn_time zX).fst.sub (F.continuousOn_time zY).fst).norm + obtain ⟨t₀,ht₀,hmin⟩ := isCompact_Icc.exists_isMinOn (nonempty_Icc.mpr hT) hc + have hpos : 0<‖(F.flow zX t₀).1-(F.flow zY t₀).1‖ := + norm_pos_iff.mpr (sub_ne_zero.mpr (hne t₀ ht₀)) + obtain ⟨c,hc1,hLip⟩ := F.timelike hT zY + refine ⟨‖(F.flow zX t₀).1-(F.flow zY t₀).1‖/2,by positivity,?_⟩ + intro σ hσ + let τ := branchTime F.flow zX zY T σ + have ht := (F.branch_spec zX zY hσ).1 + have ht0 : τ∈Icc 0 T := ⟨hσ.1.1.le.trans ht.1,ht.2⟩ + have hr : 0≤τ-σ := sub_nonneg.mpr ht.1 + have hdist := hLip.dist_le_mul τ ht0 σ (Ioo_subset_Icc_self hσ.1) + rw [dist_eq_norm,Real.dist_eq,abs_of_nonneg hr] at hdist + have hbound : ‖(F.flow zY τ).1-(F.flow zY σ).1‖≤τ-σ := + hdist.trans (mul_le_of_le_one_left hr hc1.le) + have hcone := (F.branch_spec zX zY hσ).2 + have htriangle : ‖(F.flow zX τ).1-(F.flow zY τ).1‖ ≤ + ‖(F.flow zX τ).1-(F.flow zY σ).1‖+‖(F.flow zY σ).1-(F.flow zY τ).1‖ := by + calc + _ = ‖((F.flow zX τ).1-(F.flow zY σ).1)+((F.flow zY σ).1-(F.flow zY τ).1)‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + rw [norm_sub_rev (F.flow zY σ).1 (F.flow zY τ).1] at htriangle + have hm := hmin ht0 + change ‖(F.flow zX t₀).1-(F.flow zY t₀).1‖≤‖(F.flow zX τ).1-(F.flow zY τ).1‖ at hm + change τ-σ=‖(F.flow zX τ).1-(F.flow zY σ).1‖ at hcone + change _≤τ-σ + linarith + +lemma PhaseFlowOn.ae_retarded_radius_separated {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) : + ∀ᵐ zY ∂(volume : Measure Phase), ∃ δ : ℝ,0<δ ∧ + ∀ σ∈branchDomain F.flow zX zY T,δ≤branchTime F.flow zX zY T σ-σ := by + have hh : ∀ᵐ zY ∂(volume : Measure Phase), + zY∉{y : Phase | ∃ t∈Icc 0 T,(F.flow y t).1=(F.flow zX t).1} := + ae_iff.mpr (by simpa only [Set.mem_ofPred_eq,not_not] using F.closed_collision_null hT zX) + filter_upwards [hh] with zY hzY + apply F.retarded_radius_separated hT zX zY + intro t ht he + exact hzY ⟨t,ht,he.symm⟩ + +lemma signedPrimitive_scaled (a u n : Vec) (hD : 1-dot n a≠0) : + (1-dot n a) • signedPrimitive a u n = + (1-dot n a) • u-(1-dot a u) • n := by + rw [signedPrimitive,smul_sub,smul_smul,mul_div_cancel₀ _ hD] + +lemma signedPrimitive_scaled_norm (w v n : Vec) (hn : ‖n‖=1) : + ‖(1-dot n (velocity w)) • signedPrimitive (velocity w) (velocity v) n‖≤4 := by + rw [signedPrimitive_scaled _ _ _ (cone_denom_pos w n hn).ne'] + have he : |1-dot (velocity w) (velocity v)|≤2 := + (abs_sub _ _).trans (by + have hh := abs_dot_le (velocity w) (velocity v) + have hu := norm_velocity_lt_one w + have hv := norm_velocity_lt_one v + have hprod : ‖velocity w‖*‖velocity v‖≤1 := + (mul_le_of_le_one_left (norm_nonneg _) hu.le).trans hv.le + norm_num only [abs_one] + linarith) + calc + _ ≤ ‖(1-dot n (velocity w)) • velocity v‖+‖(1-dot (velocity w) (velocity v)) • n‖ := norm_sub_le _ _ + _ = (1-dot n (velocity w))*‖velocity v‖+|1-dot (velocity w) (velocity v)| := by + rw [norm_smul,norm_smul,Real.norm_eq_abs,Real.norm_eq_abs,hn,mul_one, + abs_of_pos (cone_denom_pos w n hn)] + _ ≤ 2*1+2 := by + gcongr + · exact cone_denom_le_two w n hn + · exact (norm_velocity_lt_one v).le + _ = 4 := by norm_num + +def initialSignedBoundaryDensity (f : Phase→ℝ) (x w : Vec) (t ψ χ : ℝ) + (P : Vec→L[ℝ]Vec) (n v : Vec) : Vec := + (t^2*(1-dot n (velocity w))*f (x-t • n,v)*ψ*χ) • + P (retardedPrimitive t (velocity w) (velocity v) n) + +lemma initialSignedBoundaryDensity_eq (f : Phase→ℝ) (x w : Vec) (t ψ χ : ℝ) + (P : Vec→L[ℝ]Vec) (n v : Vec) : + initialSignedBoundaryDensity f x w t ψ χ P n v = + (t*ψ*χ*f (x-t • n,v)/(1-dot n (velocity v))) • + P ((1-dot n (velocity w)) • signedPrimitive (velocity w) (velocity v) n) := by + simp only [initialSignedBoundaryDensity,retardedPrimitive,map_smul,smul_smul] + congr 1 + by_cases ht : t=0 + · simp [ht] + · by_cases hd : 1-dot n (velocity v)=0 + · simp [hd] + · field_simp + +lemma initialSignedBoundaryDensity_norm (f : Phase→ℝ) (hf : ∀ z,0≤f z) + (x w : Vec) {t χ M : ℝ} (ht : 0≤t) (hχ : χ∈Icc (0:ℝ) 1) + (ψ : ℝ) (P : Vec→L[ℝ]Vec) (hP : ‖P‖≤M) (n v : Vec) (hn : ‖n‖=1) : + ‖initialSignedBoundaryDensity f x w t ψ χ P n v‖≤ + (4*t*|ψ| *M)*(f (x-t • n,v)/(1-dot n (velocity v))) := by + have hM : 0≤M := (norm_nonneg P).trans hP + have hd := cone_denom_pos v n hn + have hfv := hf (x-t • n,v) + have hχ0 := hχ.1 + rw [initialSignedBoundaryDensity_eq f x w t ψ χ P n v, + norm_smul,Real.norm_eq_abs,abs_div,abs_mul,abs_mul,abs_mul, + abs_of_nonneg ht,abs_of_nonneg hχ.1,abs_of_nonneg (hf _),abs_of_pos hd] + calc + _ ≤ (t*|ψ| *χ*f (x-t • n,v)/(1-dot n (velocity v)))*(M*4) := by + apply mul_le_mul_of_nonneg_left + ((ContinuousLinearMap.le_opNorm P _).trans + (mul_le_mul hP (signedPrimitive_scaled_norm w v n hn) (norm_nonneg _) hM)) + positivity + _ ≤ (t*|ψ| *1*f (x-t • n,v)/(1-dot n (velocity v)))*(M*4) := by + gcongr + exact hχ.2 + _ = _ := by ring + +lemma datum_reciprocal_cone_bound {f : Phase→ℝ} (hf : Continuous f) (hc : HasCompactSupport f) + : + ∃ C : ℝ,0≤C ∧ ∀ y n : Vec,‖n‖=1 → + Integrable (fun v : Vec=>f (y,v)/(1-dot n (velocity v))) ∧ + (∫ v : Vec,f (y,v)/(1-dot n (velocity v)))≤C := by + have hu : Continuous (fun p : Vec×Vec=>velocity p.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hd : Continuous (fun p : Vec×Vec=>1-dot p.1 (velocity p.2)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_fst.prodMk hu)) + have hi : ContinuousOn (fun p : Vec×Vec=>(1-dot p.1 (velocity p.2))⁻¹) + (sphere (0:Vec) 1 ×ˢ univ) := hd.continuousOn.inv₀ (by + intro p hp + exact (cone_denom_pos p.2 p.1 (mem_sphere_zero_iff_norm.mp hp.1)).ne') + obtain ⟨C,hC,hbound⟩ := uniform_datum_velocity_integral_bound hf hc hi + refine ⟨C,hC,?_⟩ + intro y n hn + have hdv : Continuous (fun v : Vec=>1-dot n (velocity v)) := + hd.comp (continuous_const.prodMk continuous_id) + have hh : Continuous (fun v : Vec=>f (y,v)/(1-dot n (velocity v))) := + (hf.comp (continuous_const.prodMk continuous_id)).div hdv (fun v=>(cone_denom_pos v n hn).ne') + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + refine ⟨hh.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK ?_),?_⟩ + · intro v hv + rw [hz y v hv,zero_div] + · have hh := hbound y n hn + simp only [smul_eq_mul,← div_eq_mul_inv,Real.norm_eq_abs] at hh + exact (le_abs_self _).trans hh + +lemma initialSignedBoundary_velocity_bound {f : Phase→ℝ} (hf : Continuous f) + (hc : HasCompactSupport f) (hpos : ∀ z,0≤f z) : + ∃ C : ℝ,0≤C ∧ ∀ (x w : Vec) (t ψ M : ℝ) (χ : Vec→ℝ) (P : Vec→L[ℝ]Vec) + (n : Vec), 0≤t → (∀ v,χ v∈Icc (0:ℝ) 1) → ‖P‖≤M → ‖n‖=1 → + ‖∫ v : Vec,initialSignedBoundaryDensity f x w t ψ (χ v) P n v‖≤ + C*t*|ψ| *M := by + obtain ⟨C,hC,hbound⟩ := datum_reciprocal_cone_bound hf hc + refine ⟨4*C,by positivity,?_⟩ + intro x w t ψ M χ P n ht hχ hP hn + have hM : 0≤M := (norm_nonneg P).trans hP + obtain ⟨hgi,hgb⟩ := hbound (x-t • n) n hn + have hb := norm_integral_le_of_norm_le (hgi.const_mul (4*t*|ψ| *M)) + (ae_of_all _ (fun v=>initialSignedBoundaryDensity_norm f hpos x w ht (hχ v) ψ P hP n v hn)) + rw [integral_const_mul] at hb + exact hb.trans (by nlinarith [mul_le_mul_of_nonneg_left hgb (show 0≤4*t*|ψ| *M by positivity)]) + +lemma initialSignedBoundary_bound {f : Phase→ℝ} (hf : Continuous f) + (hc : HasCompactSupport f) (hpos : ∀ z,0≤f z) : + ∃ C : ℝ,0≤C ∧ ∀ (T M : ℝ) (J : Set ℝ) (X V : ℝ→Vec) + (ψ : ℝ→ℝ) (χ : ℝ→Sphere→Vec→ℝ) (P : ℝ→Vec→L[ℝ]Vec), + 0≤T → 0≤M → MeasurableSet J → J⊆Icc 0 T → IntegrableOn ψ J → + (∀ t∈J,∀ n v,χ t n v∈Icc (0:ℝ) 1) → (∀ t∈J,‖P t‖≤M) → + ‖∫ t in J,∫ n : Sphere,∫ v : Vec, + initialSignedBoundaryDensity f (X t) (V t) t (ψ t) (χ t n v) (P t) n.1 v + ∂volume ∂sphereMeasure‖ ≤ C*T*M*(∫ t in J,|ψ t|) := by + obtain ⟨C,hC,hb⟩ := initialSignedBoundary_velocity_bound hf hc hpos + refine ⟨C*(4*Real.pi),by positivity,?_⟩ + intro T M J X V ψ χ P hT hM hJ hJT hψ hχ hP + have hpoint : ∀ t∈J, + ‖∫ n : Sphere,∫ v : Vec, + initialSignedBoundaryDensity f (X t) (V t) t (ψ t) (χ t n v) (P t) n.1 v + ∂volume ∂sphereMeasure‖ ≤ (C*(4*Real.pi)*T*M)*|ψ t| := by + intro t ht + have hh := norm_sphere_integral_le (fun n : Sphere => + hb (X t) (V t) t (ψ t) M (χ t n) (P t) n.1 (hJT ht).1 + (hχ t ht n) (hP t ht) (sphere_norm n)) + exact hh.trans (by + have hh' := mul_le_mul_of_nonneg_right (hJT ht).2 + (show 0≤C*|ψ t| *M*(4*Real.pi) by positivity) + nlinarith) + have hi := hψ.abs.const_mul (C*(4*Real.pi)*T*M) + have hh := norm_integral_le_of_norm_le hi (ae_restrict_of_forall_mem hJ hpoint) + rw [integral_const_mul] at hh + exact hh + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c1134417b0b52ac7a6fde8dcb76b55f9bb0ea4e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupation.lean @@ -0,0 +1,200 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.Sphere +import OAI.Analysis.VlasovMaxwell.Geometry.CollisionLabels + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.receiver_integrable {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + {g : Vec → G} (hg : IntegrableOn g (ball (F.flow z T).1 (T-s))) : + IntegrableOn (fun w => (1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2)) • + g (receiverRadial F.flow z s w)) (receiverRadialDomain s T) := by + have hd : ∀ w ∈ receiverRadialDomain s T, + HasFDerivWithinAt (receiverRadial F.flow z s) + (fderiv ℝ (receiverRadial F.flow z s) w) (receiverRadialDomain s T) w := by + intro w hw + exact (F.receiver_differential hs.1 z hw).differentiableAt.hasFDerivAt.hasFDerivWithinAt + have hi : IntegrableOn g (receiverRadial F.flow z s '' receiverRadialDomain s T) := by + rw [F.receiver_image hs z] + exact hg.congr_set_ae (sdiff_null_ae_eq_self (measure_singleton (F.flow z s).1)) + have hh := (integrableOn_image_iff_integrableOn_abs_det_fderiv_smul volume + (isOpen_receiverRadialDomain s T).measurableSet hd (F.receiver_injective hs z) g).mp hi + apply hh.congr_fun _ (isOpen_receiverRadialDomain s T).measurableSet + intro w hw + dsimp only + rw [F.receiver_jacobian hs.1 z hw] + +lemma PhaseFlowOn.receiver_polar_integral {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + {g : Vec → G} (hg : IntegrableOn g (ball (F.flow z T).1 (T-s))) : + ∫ y in ball (F.flow z T).1 (T-s), g y = + ∫ n : Sphere, ∫ r in Ioo (0 : ℝ) (T-s), + (r^2*(1-dot n.1 (velocity (F.flow z (s+r)).2))) • + g ((F.flow z (s+r)).1-r • n.1) ∂volume ∂sphereMeasure := by + let H : Vec → G := (receiverRadialDomain s T).indicator + (fun w => (1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2)) • g (receiverRadial F.flow z s w)) + have hH : Integrable H := (integrable_indicator_iff (isOpen_receiverRadialDomain s T).measurableSet).mpr + (F.receiver_integrable hs z hg) + rw [F.receiver_integral hs z g,← integral_indicator (isOpen_receiverRadialDomain s T).measurableSet] + change (∫ w, H w) = _ + rw [integral_polar hH] + apply integral_congr_ae + apply ae_of_all + intro n + let k : ℝ → G := fun r => (r^2*(1-dot n.1 (velocity (F.flow z (s+r)).2))) • g ((F.flow z (s+r)).1-r • n.1) + have hn : ‖n.1‖=1 := (mem_sphere_zero_iff_norm.mp n.2) + have he : ∀ r ∈ Ioi (0 : ℝ), r^2 • H (r • n.1) = (Iio (T-s)).indicator k r := by + intro r hr + have hnorm : ‖r • n.1‖=r := by rw [norm_smul,Real.norm_eq_abs,abs_of_pos hr,hn,mul_one] + have hd : r • n.1 ∈ receiverRadialDomain s T ↔ r < T-s := by + change 0 < ‖r • n.1‖ ∧ s+‖r • n.1‖ < T ↔ _ + rw [hnorm] + constructor + · intro h; linarith [h.2] + · intro h; exact ⟨hr,by linarith⟩ + by_cases h : r < T-s + · rw [show H (r • n.1) = _ from Set.indicator_of_mem (hd.mpr h) _,Set.indicator_of_mem (show r ∈ Iio (T-s) from h)] + dsimp only [k,receiverRadial] + have hnsmul : r⁻¹ • (r • n.1)=n.1 := by + rw [smul_smul,inv_mul_cancel₀ (ne_of_gt (show 0 h (hd.mp hh)) _,smul_zero, + Set.indicator_of_notMem (show r ∉ Iio (T-s) from h)] + calc + _ = ∫ r in Ioi (0 : ℝ), (Iio (T-s)).indicator k r := setIntegral_congr_fun measurableSet_Ioi he + _ = ∫ r in Ioi (0 : ℝ) ∩ Iio (T-s), k r := setIntegral_indicator measurableSet_Iio + _ = _ := by rfl + +def labelOccupation (f₀ : Phase → ℝ) (H : Phase → Set ℝ) : ENNReal := + ∫⁻ z, ENNReal.ofReal (f₀ z) * volume (H z) + +lemma PhaseFlowOn.label_occupation_rate_bound {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX : Phase) (f₀ : Phase → ℝ) {H : Phase → Set ℝ} {c a b : ℝ} + (hH : ∀ z, MeasurableSet (H z)) + (hsub : ∀ z, H z ⊆ branchDomain F.flow zX z T) + (hder : ∀ z s, s ∈ H z → c ≤ branchRate F.flow zX z T s) + (himage : ∀ z, branchTime F.flow zX z T '' H z ⊆ Icc a b) : + ENNReal.ofReal c * labelOccupation f₀ H ≤ + ENNReal.ofReal (b-a) * ∫⁻ z, ENNReal.ofReal (f₀ z) := by + have hnc : ∀ᵐ z ∂(volume : Measure Phase), z ∉ collisionLabels F.flow zX T := + (ae_iff.mpr (by simpa using F.collision_null zX)) + calc + _ = ∫⁻ z, ENNReal.ofReal c * (ENNReal.ofReal (f₀ z) * volume (H z)) := by + rw [lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + rfl + _ ≤ ∫⁻ z, ENNReal.ofReal (b-a) * ENNReal.ofReal (f₀ z) := by + apply lintegral_mono_ae + filter_upwards [hnc] with z hz + have hne : ∀ s ∈ H z, (F.flow zX s).1 ≠ (F.flow z s).1 := by + intro s hs he + exact hz ⟨s,(hsub z hs).1,he.symm⟩ + have hb := F.branch_duration_bound zX z (hH z) (hsub z) hne (hder z) (himage z) + calc + _ = ENNReal.ofReal (f₀ z) * (ENNReal.ofReal c * volume (H z)) := by ac_rfl + _ ≤ ENNReal.ofReal (f₀ z) * ENNReal.ofReal (b-a) := by gcongr + _ = _ := mul_comm _ _ + _ = _ := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + +def branchDirection (α : Phase → ℝ → Phase) (zX zY : Phase) (T s : ℝ) : Vec := + let t := branchTime α zX zY T s + (t-s)⁻¹ • ((α zX t).1-(α zY s).1) + +lemma PhaseFlowOn.branchDirection_norm {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1 ≠ (F.flow zY s).1) : + ‖branchDirection F.flow zX zY T s‖ = 1 := by + have ht := (F.branch_time_mem zX zY hs hne).1 + have hr := (F.branch_spec zX zY hs).2 + dsimp only [branchDirection] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (sub_pos.mpr ht)),← hr] + exact inv_mul_cancel₀ (sub_ne_zero.mpr (ne_of_gt ht)) + +lemma PhaseFlowOn.branchRate_pos {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1 ≠ (F.flow zY s).1) : 0 < branchRate F.flow zX zY T s := by + have hn := F.branchDirection_norm zX zY hs hne + have hpos (v : Vec) : 0 < 1-dot (branchDirection F.flow zX zY T s) (velocity v) := by + have hd := dot_le_norm (branchDirection F.flow zX zY T s) (velocity v) + rw [hn,one_mul] at hd + linarith [norm_velocity_lt_one v] + exact div_pos (hpos _) (hpos _) + +lemma PhaseFlowOn.branchRate_lower_bound {E B : Field} {T s δ Δ : ℝ} (F : PhaseFlowOn E B T) + (zX zY : Phase) (hs : s ∈ branchDomain F.flow zX zY T) + (hne : (F.flow zX s).1 ≠ (F.flow zY s).1) (hδ : 0 ≤ δ) (hΔ : 0 < Δ) + (hsource : δ ≤ 1-dot (branchDirection F.flow zX zY T s) (velocity (F.flow zY s).2)) + (hreceiver : 1-dot (branchDirection F.flow zX zY T s) + (velocity (F.flow zX (branchTime F.flow zX zY T s)).2) ≤ Δ) : + δ/Δ ≤ branchRate F.flow zX zY T s := by + have hn := F.branchDirection_norm zX zY hs hne + have hD : 0 < 1-dot (branchDirection F.flow zX zY T s) + (velocity (F.flow zX (branchTime F.flow zX zY T s)).2) := by + have hd := dot_le_norm (branchDirection F.flow zX zY T s) + (velocity (F.flow zX (branchTime F.flow zX zY T s)).2) + rw [hn,one_mul] at hd + linarith [norm_velocity_lt_one (F.flow zX (branchTime F.flow zX zY T s)).2] + apply (div_le_div_iff₀ hΔ hD).mpr + change δ * (1-dot (branchDirection F.flow zX zY T s) + (velocity (F.flow zX (branchTime F.flow zX zY T s)).2)) ≤ + (1-dot (branchDirection F.flow zX zY T s) (velocity (F.flow zY s).2))*Δ + nlinarith + +lemma PhaseFlowOn.label_occupation_angular_bound {E B : Field} {T δ Δ a b : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (f₀ : Phase → ℝ) {H : Phase → Set ℝ} + (hδ : 0 ≤ δ) (hΔ : 0 < Δ) (hH : ∀ z, MeasurableSet (H z)) + (hsub : ∀ z, H z ⊆ branchDomain F.flow zX z T) + (hsource : ∀ z s, s ∈ H z → δ ≤ 1-dot (branchDirection F.flow zX z T s) (velocity (F.flow z s).2)) + (hreceiver : ∀ z s, s ∈ H z → 1-dot (branchDirection F.flow zX z T s) + (velocity (F.flow zX (branchTime F.flow zX z T s)).2) ≤ Δ) + (himage : ∀ z, branchTime F.flow zX z T '' H z ⊆ Icc a b) : + ENNReal.ofReal (δ/Δ) * labelOccupation f₀ H ≤ + ENNReal.ofReal (b-a) * ∫⁻ z, ENNReal.ofReal (f₀ z) := by + have hnc : ∀ᵐ z ∂(volume : Measure Phase), z ∉ collisionLabels F.flow zX T := + (ae_iff.mpr (by simpa using F.collision_null zX)) + calc + _ = ∫⁻ z, ENNReal.ofReal (δ/Δ) * (ENNReal.ofReal (f₀ z) * volume (H z)) := by + rw [lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + rfl + _ ≤ ∫⁻ z, ENNReal.ofReal (b-a) * ENNReal.ofReal (f₀ z) := by + apply lintegral_mono_ae + filter_upwards [hnc] with z hz + have hne : ∀ s ∈ H z, (F.flow zX s).1 ≠ (F.flow z s).1 := by + intro s hs he + exact hz ⟨s,(hsub z hs).1,he.symm⟩ + have hb := F.branch_duration_bound zX z (hH z) (hsub z) hne + (fun s hs => F.branchRate_lower_bound zX z (hsub z hs) (hne s hs) hδ hΔ + (hsource z s hs) (hreceiver z s hs)) (himage z) + calc + _ = ENNReal.ofReal (f₀ z) * (ENNReal.ofReal (δ/Δ) * volume (H z)) := by ac_rfl + _ ≤ ENNReal.ofReal (f₀ z) * ENNReal.ofReal (b-a) := by gcongr + _ = _ := mul_comm _ _ + _ = _ := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupationDurationMass.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupationDurationMass.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8ea3e574a1a7ee4780e4c49bdad981c7413fe7f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelOccupationDurationMass.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.PhaseHits + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal RealInnerProductSpace + +namespace RVM + +lemma labelOccupation_le_duration_mass {f₀ : Phase → ℝ} {H : Phase → Set ℝ} + {Z : Set Phase} (hZ : MeasurableSet Z) {D : ℝ} + (hD : ∀ z, volume (H z)≤ENNReal.ofReal D) + (hz : ∀ z, (H z).Nonempty → z∈Z) : + labelOccupation f₀ H ≤ ENNReal.ofReal D * ∫⁻ z in Z, ENNReal.ofReal (f₀ z) := by + rw [← lintegral_indicator hZ,← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro z + dsimp only + by_cases he : (H z).Nonempty + · rw [indicator_of_mem (hz z he)] + calc + _ ≤ ENNReal.ofReal (f₀ z)*ENNReal.ofReal D := by gcongr; exact hD z + _ = _ := mul_comm _ _ + · simp only [not_nonempty_iff_eq_empty.mp he,measure_empty,mul_zero,zero_le] + +lemma PhaseFlowOn.restricted_label_mass_bound {s : Solution} {T t p : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) + {Z : Set Phase} (hZ : MeasurableSet Z) {G : Set (ℝ × Phase)} + (hmom : ∀ z∈Z, p≤q (F.flow z t).2) + (hG : ∀ z∈Z, (t,F.flow z t)∈G) : + ENNReal.ofReal p * (∫⁻ z in Z, ENNReal.ofReal (s.f (0,z))) ≤ + ∫⁻ z : Phase, G.indicator (fun p => ENNReal.ofReal (q p.2.2 * s.f p)) (t,z) := by + rw [← lintegral_indicator hZ,← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + ← F.lintegral_comp ht (fun z => G.indicator (fun p => ENNReal.ofReal (q p.2.2 * s.f p)) (t,z))] + apply lintegral_mono + intro z + dsimp only + by_cases hz : z∈Z + · rw [indicator_of_mem hz,indicator_of_mem (hG z hz),F.transport hs.f_smooth hs.vlasov ht, + ENNReal.ofReal_mul (q_pos _).le] + exact mul_le_mul' (ENNReal.ofReal_le_ofReal (hmom z hz)) le_rfl + · rw [indicator_of_notMem hz,mul_zero] + exact zero_le + +lemma PhaseFlowOn.averaged_cell_occupation {s : Solution} {T a b p D : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (hCT : Icc a b⊆Icc (0:ℝ) T) {H : Phase → Set ℝ} + {Z : Set Phase} (hZ : MeasurableSet Z) {G : Set (ℝ × Phase)} + (hD : ∀ z, volume (H z)≤ENNReal.ofReal D) + (hz : ∀ z, (H z).Nonempty → z∈Z) + (hmom : ∀ t∈Icc a b, ∀ z∈Z, p≤q (F.flow z t).2) + (hG : ∀ t∈Icc a b, ∀ z∈Z, (t,F.flow z t)∈G) : + ENNReal.ofReal (b-a) * ENNReal.ofReal p * labelOccupation (fun z => s.f (0,z)) H ≤ + ENNReal.ofReal D * ∫⁻ t in Icc a b, ∫⁻ z : Phase, + G.indicator (fun p => ENNReal.ofReal (q p.2.2 * s.f p)) (t,z) := by + have hbnd := lintegral_mono_ae (μ:=volume.restrict (Icc a b)) + (ae_restrict_of_forall_mem measurableSet_Icc (fun t ht => + F.restricted_label_mass_bound hs (hCT ht) hZ (hmom t ht) (hG t ht))) + rw [lintegral_const,Measure.restrict_apply_univ,Real.volume_Icc] at hbnd + have hocc := labelOccupation_le_duration_mass hZ hD hz (f₀:=fun z => s.f (0,z)) + calc + _ ≤ ENNReal.ofReal (b-a)*ENNReal.ofReal p*(ENNReal.ofReal D* + ∫⁻ z in Z, ENNReal.ofReal (s.f (0,z))) := mul_le_mul' le_rfl hocc + _ = ENNReal.ofReal D*((ENNReal.ofReal p * ∫⁻ z in Z, ENNReal.ofReal (s.f (0,z))) * + ENNReal.ofReal (b-a)) := by ac_rfl + _ ≤ _ := by gcongr + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.position_lipschitz {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (z : Phase) : + LipschitzOnWith 1 (fun t => (F.flow z t).1) (Icc 0 T) := by + apply (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le + (fun t ht => (F.ode z t ht).fst) + intro t _ + exact_mod_cast (norm_velocity_lt_one (F.flow z t).2).le + +lemma PhaseFlowOn.continuousOn_joint {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) + (hE : ContinuousOn E (Icc 0 T ×ˢ (univ : Set Vec))) + (hB : ContinuousOn B (Icc 0 T ×ˢ (univ : Set Vec))) : + ContinuousOn (fun p : ℝ × Phase => F.flow p.2 p.1) + (Icc 0 T ×ˢ (univ : Set Phase)) := by + intro p hp + obtain ⟨M,hM⟩ := (isCompact_Icc.prod (isCompact_closedBall p.2.1 (T+1))).bddAbove_image + ((hE.norm.add hB.norm).mono (prod_mono Subset.rfl (subset_univ _))) + let L : ℝ≥0 := ⟨max 1 M, zero_le_one.trans (le_max_left _ _)⟩ + have hpos (z : Phase) (hz : z ∈ ball p.2 (1/2:ℝ)) (t : ℝ) (ht : t ∈ Icc 0 T) : + (F.flow z t).1 ∈ closedBall p.2.1 (T+1) := by + have hh := (F.position_lipschitz z).dist_le_mul t ht 0 ⟨le_rfl,hT⟩ + simp only [F.initial,NNReal.coe_one,one_mul,Real.dist_eq,sub_zero,abs_of_nonneg ht.1] at hh + have hz' : dist z.1 p.2.1 < (1/2:ℝ) := (le_max_left _ _).trans_lt hz + exact (dist_triangle _ z.1 _).trans (add_le_add hh hz'.le) |>.trans (by linarith [ht.2]) + have hLip (z : Phase) (hz : z ∈ ball p.2 (1/2:ℝ)) : + LipschitzOnWith L (F.flow z) (Icc 0 T) := by + apply (convex_Icc 0 T).lipschitzOnWith_of_nnnorm_hasDerivWithin_le (F.ode z) + intro t ht + apply NNReal.coe_le_coe.mp + change ‖lorentzField E B (t,F.flow z t)‖ ≤ max 1 M + rw [lorentzField,lorentzPhase,Prod.norm_def] + apply max_le + · exact (norm_velocity_lt_one _).le.trans (le_max_left _ _) + · calc + _ ≤ ‖E (t,(F.flow z t).1)‖+‖B (t,(F.flow z t).1)‖ := by + exact (norm_add_le _ _).trans (add_le_add le_rfl + ((norm_cross_le _ _).trans + (mul_le_of_le_one_left (norm_nonneg _) (norm_velocity_lt_one _).le))) + _ ≤ M := hM ⟨(t,(F.flow z t).1),⟨ht,hpos z hz t ht⟩,rfl⟩ + _ ≤ _ := le_max_right _ _ + have hc : ContinuousAt (fun z => F.flow z p.1) p.2 := (F.label p.2 p.1 hp.1).continuousAt + rw [Metric.continuousWithinAt_iff] + intro ε hε + obtain ⟨δ,hδ,hlabel⟩ := Metric.continuousAt_iff.mp hc (ε/2) (by positivity) + refine ⟨min (1/2:ℝ) (min δ (ε/(2*((L:ℝ)+1)))),by positivity,?_⟩ + intro q hq hdist + have hd₁ : dist q.1 p.1 < ε/(2*((L:ℝ)+1)) := + (le_max_left _ _).trans_lt (hdist.trans_le ((min_le_right _ _).trans (min_le_right _ _))) + have hd₂ : dist q.2 p.2 < δ := + (le_max_right _ _).trans_lt (hdist.trans_le ((min_le_right _ _).trans (min_le_left _ _))) + have hqball : q.2 ∈ ball p.2 (1/2:ℝ) := + (le_max_right _ _).trans_lt (hdist.trans_le (min_le_left _ _)) + have hh : (L:ℝ)*dist q.1 p.1 < ε/2 := by + have hh := (lt_div_iff₀ (show 0<2*((L:ℝ)+1) by positivity)).mp hd₁ + nlinarith [dist_nonneg (x := q.1) (y := p.1)] + exact (dist_triangle _ (F.flow q.2 p.1) _).trans_lt + (add_lt_add_of_le_of_lt ((hLip q.2 hqball).dist_le_mul q.1 hq.1 p.1 hp.1) + (hlabel hd₂) |>.trans_le (by linarith)) + +lemma compact_hit_labels {A : Type*} [TopologicalSpace A] [T2Space A] + {S : Set A} {T : ℝ} (hS : IsCompact S) {H : Set (ℝ × ℝ × A)} + (hH : IsClosed H) : + IsCompact {a | a ∈ S ∧ ∃ t ∈ Icc 0 T, ∃ s ∈ Icc 0 T, (t,s,a) ∈ H} := by + have hc : IsCompact ((Icc 0 T ×ˢ (Icc 0 T ×ˢ S)) ∩ H) := + (isCompact_Icc.prod (isCompact_Icc.prod hS)).inter_right hH + have heq : (fun p : ℝ × ℝ × A => p.2.2) '' ((Icc 0 T ×ˢ (Icc 0 T ×ˢ S)) ∩ H) = + {a | a ∈ S ∧ ∃ t ∈ Icc 0 T, ∃ s ∈ Icc 0 T, (t,s,a) ∈ H} := by + ext a + constructor + · rintro ⟨⟨t,s,b⟩,⟨⟨ht,hs,hb⟩,hh⟩,rfl⟩ + exact ⟨hb,t,ht,s,hs,hh⟩ + · rintro ⟨ha,t,ht,s,hs,hh⟩ + exact ⟨(t,s,a),⟨⟨ht,hs,ha⟩,hh⟩,rfl⟩ + rw [← heq] + exact hc.image (continuous_snd.comp continuous_snd) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/LabelWeight.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4d3973e2f797171db311a79dfb1e6385571fde6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/LabelWeight.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ActualLabelCutoffCost + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def labelWeight (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (p : ℝ×Phase) : ℝ := + ψ (labelReceiverTime α zX T p)*labelSelectedCutoff α zX T Q p + +def selectedLabelSignedForce (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (p : ℝ×Phase) : Vec := + labelWeight α zX T Q ψ p • actualLabelSignedForce s α zX T p + +def selectedLabelCosts (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (p : ℝ×Phase) : Vec := + labelWeight α zX T Q (deriv ψ) p • actualLabelRatePrimitive s α zX T p + + ψ (labelReceiverTime α zX T p) • actualLabelCutoffCost s α zX T Q p + + labelWeight α zX T Q ψ p • actualLabelRemainder s α zX T p + +lemma PhaseFlowOn.labelWeight_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {ψ : ℝ→ℝ} (hψ : Measurable ψ) : + Measurable (labelWeight F.flow zX T Q ψ) := + (hψ.comp (F.labelReceiverTime_measurable zX)).mul (F.selectedCutoff_measurable zX Q) + +lemma PhaseFlowOn.labelWeight_bound {E B : Field} {T C : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {ψ : ℝ→ℝ} (hψ : ∀t∈Icc 0 T,|ψ t|≤C) (p : ℝ×Phase) : + |labelWeight F.flow zX T Q ψ p|≤C := by + rw [labelWeight,abs_mul] + exact (mul_le_mul_of_nonneg_left (F.labelSelectedCutoff_bound zX Q p) (abs_nonneg _)).trans + (by simpa only [mul_one] using hψ _ (F.labelReceiverTime_mem hT zX p)) + +lemma PhaseFlowOn.selectedLabelSignedForce_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} (hψ : Measurable ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) : + Integrable (selectedLabelSignedForce s F.flow zX T Q ψ) := by + apply (F.actualLabelSignedForce_integrable hs zX).bdd_smul 1 + (F.labelWeight_measurable zX Q hψ).aestronglyMeasurable + exact Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs] using F.labelWeight_bound hT zX Q hψb p) + +lemma PhaseFlowOn.selectedLabelCosts_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) : + Integrable (selectedLabelCosts s F.flow zX T Q ψ) := by + have hd : ∀t∈Icc 0 T,|deriv ψ t|≤(L:ℝ) := fun t _=>by + simpa only [Real.norm_eq_abs] using + norm_deriv_le_of_lipschitzOn (x₀:=t) (s:=univ) Filter.univ_mem hψ.lipschitzOnWith + have hi₁ := (F.actualLabelRatePrimitive_integrable hs zX).bdd_smul (L:ℝ) + (F.labelWeight_measurable zX Q (measurable_deriv ψ)).aestronglyMeasurable + (Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs] using F.labelWeight_bound hT zX Q hd p)) + have hi₂ := (F.actualLabelCutoffCost_integrable hs zX Q).bdd_smul 1 + (hψ.continuous.measurable.comp (F.labelReceiverTime_measurable zX)).aestronglyMeasurable + (Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs,Function.comp_apply] using hψb _ (F.labelReceiverTime_mem hT zX p))) + have hi₃ := (F.actualLabelRemainder_integrable hs zX).bdd_smul 1 + (F.labelWeight_measurable zX Q hψ.continuous.measurable).aestronglyMeasurable + (Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs] using F.labelWeight_bound hT zX Q hψb p)) + exact (hi₁.add hi₂).add hi₃ + +lemma initialSignedBoundary_velocity_lintegral_bound {f : Phase→ℝ} + (hf : Continuous f) (hc : HasCompactSupport f) (hpos : ∀ z,0≤f z) : + ∃ C : ℝ,0≤C ∧ ∀ (x w : Vec) (t ψ M : ℝ) (χ : Vec→ℝ) + (P : Vec→L[ℝ]Vec) (n : Vec), 0≤t → (∀ v,χ v∈Icc (0:ℝ) 1) → + ‖P‖≤M → ‖n‖=1 → + (∫⁻ v : Vec, ENNReal.ofReal ‖initialSignedBoundaryDensity f x w t ψ (χ v) P n v‖) + ≤ ENNReal.ofReal (C*t*|ψ| *M) := by + obtain ⟨C,hC,hbound⟩ := datum_reciprocal_cone_bound hf hc + refine ⟨4*C,by positivity,?_⟩ + intro x w t ψ M χ P n ht hχ hP hn + have hM : 0≤M := (norm_nonneg P).trans hP + obtain ⟨hgi,hgb⟩ := hbound (x-t • n) n hn + have hgn (v : Vec) : 0≤f (x-t • n,v)/(1-dot n (velocity v)) := + div_nonneg (hpos _) (cone_denom_pos v n hn).le + calc + _ ≤ ∫⁻ v : Vec, ENNReal.ofReal + ((4*t*|ψ| *M)*(f (x-t • n,v)/(1-dot n (velocity v)))) := by + apply lintegral_mono + intro v + exact ENNReal.ofReal_le_ofReal (initialSignedBoundaryDensity_norm f hpos x w ht (hχ v) ψ P hP n v hn) + _ = ENNReal.ofReal (∫ v : Vec, + (4*t*|ψ| *M)*(f (x-t • n,v)/(1-dot n (velocity v)))) := + (ofReal_integral_eq_lintegral_ofReal (hgi.const_mul _) + (ae_of_all _ (fun v=>mul_nonneg (by positivity) (hgn v)))).symm + _ ≤ ENNReal.ofReal ((4*C)*t*|ψ| *M) := by + apply ENNReal.ofReal_le_ofReal + rw [integral_const_mul] + nlinarith [mul_le_mul_of_nonneg_left hgb (show 0≤4*t*|ψ| *M by positivity)] + +lemma initialSignedBoundary_lintegral_bound {f : Phase→ℝ} + (hf : Continuous f) (hc : HasCompactSupport f) (hpos : ∀ z,0≤f z) : + ∃ C : ℝ,0≤C ∧ ∀ (T M : ℝ) (J : Set ℝ) (X V : ℝ→Vec) + (ψ : ℝ→ℝ) (χ : ℝ→Sphere→Vec→ℝ) (P : ℝ→Vec→L[ℝ]Vec), + 0≤T → 0≤M → MeasurableSet J → J⊆Icc 0 T → IntegrableOn ψ J → + (∀ t∈J,∀ n v,χ t n v∈Icc (0:ℝ) 1) → (∀ t∈J,‖P t‖≤M) → + (∫⁻ t in J,∫⁻ n : Sphere,∫⁻ v : Vec, + ENNReal.ofReal ‖initialSignedBoundaryDensity f (X t) (V t) t (ψ t) + (χ t n v) (P t) n.1 v‖ ∂volume ∂sphereMeasure) + ≤ ENNReal.ofReal (C*T*M*(∫ t in J,|ψ t|)) := by + obtain ⟨C,hC,hb⟩ := initialSignedBoundary_velocity_lintegral_bound hf hc hpos + refine ⟨C*(4*Real.pi),by positivity,?_⟩ + intro T M J X V ψ χ P hT hM hJ hJT hψ hχ hP + calc + _ ≤ ∫⁻ t in J, ∫⁻ _n : Sphere, ENNReal.ofReal (C*t*|ψ t| *M) ∂sphereMeasure := by + apply setLIntegral_mono' hJ + intro t ht + apply lintegral_mono + intro n + exact hb (X t) (V t) t (ψ t) M (χ t n) (P t) n.1 (hJT ht).1 (hχ t ht n) (hP t ht) (sphere_norm n) + _ = ∫⁻ t in J, ENNReal.ofReal (C*t*|ψ t| *M*(4*Real.pi)) := by + apply setLIntegral_congr_fun hJ + intro t ht + have ht0 := (hJT ht).1 + dsimp only + rw [lintegral_const, ← ofReal_measureReal, sphere_area, ← ENNReal.ofReal_mul (by positivity)] + _ ≤ ∫⁻ t in J, ENNReal.ofReal ((C*(4*Real.pi)*T*M)*|ψ t|) := by + apply setLIntegral_mono' hJ + intro t ht + apply ENNReal.ofReal_le_ofReal + nlinarith [mul_le_mul_of_nonneg_right (hJT ht).2 + (show 0≤C*|ψ t| *M*(4*Real.pi) by positivity)] + _ = ENNReal.ofReal ((C*(4*Real.pi))*T*M*(∫ t in J,|ψ t|)) := by + rw [← ofReal_integral_eq_lintegral_ofReal (hψ.abs.const_mul _) + (ae_of_all _ (fun t=>by positivity)), integral_const_mul] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/MagneticEstimates.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/MagneticEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..909eaf0e590c404aad42534099844dd732e14979 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/MagneticEstimates.lean @@ -0,0 +1,1323 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma direct_magnetic_near_ennreal {C I E H h φ p θ : ℝ} + (hC : 0≤C) (hI : 0≤I) (hE : 0≤E) (hH : 0≤H) (hh : 0≤h) + (hφ : 0<φ) (hp : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

s.f (0,z))⊆tsupport d.f₀ := by + have he : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [he] + have hbnd := hbound s T F hs.energyPrefix hT hs.initial_f zX B (tsupport d.f₀) + a b I p θ φ 1 1 (k 2) hd.2.1 hS0 hJ hI hp hθ.le hφ.le (by norm_num) + (by change 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let N : ConeCoordinate→ℝ≥0∞ := fun z=>physicalBinDensity s X V B z.1 z.2.1 z.2.2 + let μ := physicalBinMeasure V B (Icc a b) + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hN : AEMeasurable N μ := + physicalBinDensity_aemeasurable hs.energyPrefix hT hX hV B measurableSet_Icc hJ + have hG := hs.energyPrefix.measurable_prefixConeMagnetic hT hX + let W : ConeCoordinate→ℝ≥0∞ := fun z=>ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z) + have hW : AEMeasurable W μ := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal.mul_const (ENNReal.ofReal φ) |>.mul hG.ennreal_ofReal).aemeasurable + have hfield : (∫⁻z, W z^2 ∂μ)≤ENNReal.ofReal (20*I*((2+4*max 1 T₀)*datumEnergyNumber d)) := by + apply le_trans _ ((F.physicalBin_magneticField hs.energyPrefix hT zX B 1 (k 2) hJ hI le_rfl hangle).trans hmag) + apply le_of_eq + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B measurableSet_Icc) + intro z hz + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hg : 0≤prefixConeMagnetic s T X z := norm_nonneg _ + dsimp [W] + rw [mul_pow,mul_pow,←ENNReal.ofReal_pow hr,←ENNReal.ofReal_pow hφ.le, + ←ENNReal.ofReal_pow hg,←ENNReal.ofReal_mul (sq_nonneg _), + ←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg _) (sq_nonneg _))] + have hD : ∀ᵐz ∂μ,N z≤ENNReal.ofReal (128*C*p^3*θ^2) := by + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B measurableSet_Icc) + intro z hz + have hh := hbound s T F hs.energyPrefix hs.initial_f X V B z.1 z.2.1 z.2.2 p θ 1 + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ hp.le hθ.le (by norm_num) + (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + have hθ1 : θ≤1 := cappedRepresentative_le_one (k 1) + simpa only [min_eq_left hθ1] using hh + have heq : representativeMagneticCost s F zX w k a b= + ENNReal.ofReal (1/p)*(∫⁻z : ConeCoordinate,ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B (Icc a b)) := by + unfold representativeMagneticCost + dsimp only + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top,←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro z + change ENNReal.ofReal (φ/p) * (ENNReal.ofReal (z.1-z.2.1) * + ENNReal.ofReal (prefixConeMagnetic s T X z) * physicalBinDensity s X V B z.1 z.2.1 z.2.2) = _ + simp only [ENNReal.ofReal_div_of_pos hp,ENNReal.ofReal_one] + simp only [div_eq_mul_inv] + ring + rw [heq] + apply mul_le_mul' le_rfl + have hh := lintegral_product_bound_two μ hW hN hfield hD + (le_rfl : (∫⁻z,N z ∂μ)≤∫⁻z,N z ∂μ) (le_rfl : μ univ≤μ univ) + apply hh.trans + apply mul_le_mul' le_rfl + exact ENNReal.rpow_le_rpow (min_le_right _ _) (by norm_num) + +lemma magnetic_central_near_scalar {C E D I h p θ φ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hD : 0≤D) (hI : 0≤I) (hh : 0≤h) + (hp : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeRegularShortMagneticCost s F zX P M A I w k a b≤ + ENNReal.ofReal (C*min (I*Real.sqrt h*p^2*θ^2*φ) (Real.sqrt I*R*θ/(Real.sqrt h*φ))) := by + classical + obtain ⟨Cd,hCd,hmag⟩ := hd.representative_magnetic_short_central T₀ + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_regular_central_shared T₀ + let E := (2+4*max 1 T₀)*datumEnergyNumber d + have hE : 0≤E := mul_nonneg (by positivity) hd.datumEnergyNumber_nonneg + let C := Real.sqrt (2560*Cd*E*Cc) + refine ⟨C,Real.sqrt_nonneg _,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hab hw hsmall HZ + dsimp only + unfold representativeRegularShortMagneticCost + split_ifs with hk + · have hcen := hcentral M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hab hw hsmall HZ + unfold representativeRegularCentralCost at hcen + rw [ite_eq_left hk.1] at hcen + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + (∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤φ/16 then + representativeRegularShortMagneticCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt I*R*p*φ) := by + classical + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_short_magnetic T₀ + let K := dyadicBalanceConstant (1/2) (1/2) + have hK : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularShortMagneticCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_regular_short_magnetic_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularShortMagneticCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularShortMagneticCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P hM hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hI1 hJI hw HZ + _=ENNReal.ofReal (Cc*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn hCc + simpa only [mul_assoc] using hh) + +lemma Admissible.representative_magnetic_short_near {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → ∀(zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0.trans + · apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ (by positivity) + exact mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt (max_le_max le_rfl hTT)) (by positivity) + · apply mul_le_mul' le_rfl + apply mul_le_mul' le_rfl + exact ENNReal.rpow_le_rpow (min_le_left _ _) (by norm_num) + +noncomputable def representativeLowShortMagneticCost (s : Solution) {T : ℝ} (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (I w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := by + classical + exact if cappedRepresentative (k 2)≤512/min (sourceRepresentative (k 0)) w ∧ + cappedRepresentative (k 3)≤I then representativeMagneticCost s F zX w k a b else 0 + +lemma Admissible.representative_low_magnetic_triple_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (np : ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt))) + _=ENNReal.ofReal Cn*(∑'nf : ℕ,if cappedRepresentative nf≤512/min p w then + ∑'nt : ℕ,if cappedRepresentative nt≤cappedRepresentative nf then + ∑'nr : ℕ,if cappedRepresentative nr≤I then + ENNReal.ofReal (I*Real.sqrt (cappedRepresentative nr)*p^2*(cappedRepresentative nt)^2*cappedRepresentative nf) + else 0 else 0 else 0) := by + simp only [ENNReal.tsum_mul_left] + congr 1 + apply tsum_congr + intro nf + split_ifs with hf + · apply tsum_congr + intro nt + split_ifs with ht <;> simp only [tsum_zero] + · simp only [tsum_zero] + _≤ENNReal.ofReal Cn*ENNReal.ofReal (4*K*I*Real.sqrt I*p^2*(512/min p w)^3) := + mul_le_mul' le_rfl (magnetic_low_triple_sum hI hp hw) + _=_ := by rw [←ENNReal.ofReal_mul hCn]; congr 1; dsimp only [p]; ring + +lemma Admissible.magnetic_low_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ P : ℝ,1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cn,hCn,hnear⟩ := hd.representative_low_magnetic_triple_sum T₀ + have hpc := pairCountConstant_pos + refine ⟨512^3*Cn*pairCountConstant,by positivity,?_⟩ + intro P hP hL s T F hs hT hTT zX a b I w ha hb hI hI1 hJI hw hwP + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeLowShortMagneticCost s F zX I w ![np,nt,nf,nr] a b else 0 + let D := 512^3*Cn*I*P^2/w + have hP0 : 0

∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + obtain ⟨N,hN,hidx⟩ := exists_small_pair_count hP hL + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have hsub : U⊆Finset.range N := by + intro np hn + have hpn : 1/sourceRepresentative np≤cappedRepresentative 0 := by + rw [show cappedRepresentative 0=1 by rfl] + exact (div_le_one (zero_lt_one.trans_le (sourceRepresentative_one_le _))).mpr (sourceRepresentative_one_le _) + exact Finset.mem_range.mpr (hidx np 0 (hU np hn) hpn).1 + have hcard : (U.card:ℝ)≤pairCountConstant*Real.log (2+P) := by + have hh : (U.card:ℝ)≤N := by exact_mod_cast (Finset.card_le_card hsub).trans_eq (Finset.card_range N) + exact hh.trans hN + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal D := Finset.sum_le_sum (fun np hn=>hgb np (hU np hn)) + _=ENNReal.ofReal ((U.card:ℝ)*D) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun _ _=>hD)] + simp + _≤ENNReal.ofReal ((pairCountConstant*Real.log (2+P))*D) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hcard hD) + _=_ := by congr 1; dsimp [D]; ring + +lemma Admissible.magnetic_small_short_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + (if cappedRepresentative nr≤I then representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cr,hCr,hregular⟩ := hd.magnetic_regular_short_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.magnetic_low_uniform T₀ + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let Gr := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeRegularShortMagneticCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0 + let Ge := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLowShortMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0 + have he (n : ℕ×ℕ) : Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + (if cappedRepresentative nr≤I then representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) else 0) n≤ + Q.indicator Gr n+Q.indicator Ge n := by + by_cases hn : n∈Q + · simp only [indicator_of_mem hn,Gr,Ge] + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro nt + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro nr + by_cases ht : cappedRepresentative nt≤cappedRepresentative n.2/16 + · simp only [ite_eq_left ht] + by_cases hr : cappedRepresentative nr≤I + · rw [ite_eq_left hr] + by_cases hreg : regularCentralIndex P M A I w ![n.1,nt,n.2,nr] + · have he : representativeRegularShortMagneticCost s F zX P M A I w ![n.1,nt,n.2,nr] a b= + representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b := by + exact ite_eq_left ⟨hreg,hr⟩ + rw [he] + exact le_add_right le_rfl + · have hlow : cappedRepresentative n.2≤512/min (sourceRepresentative n.1) w := by + have hh : ¬(512/min (sourceRepresentative n.1) w∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + (if cappedRepresentative nr≤I then representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) else 0) n)≤_ + apply (ENNReal.tsum_le_tsum he).trans + rw [ENNReal.tsum_add] + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let V := I*P^2*Real.log (2+P)/w + have hV : 0≤V := by dsimp [V]; positivity + have hB : 0≤B := by dsimp [B]; positivity + have hVB : V≤B := by + have hroot := Real.sqrt_nonneg A + have hfirst : 0≤P*Real.sqrt I := by positivity + have ht : V≤(M+Real.sqrt A)*V := le_mul_of_one_le_left hV (by linarith) + calc + V≤(M+Real.sqrt A)*V := ht + _≤P*Real.sqrt I+(M+Real.sqrt A)*V := le_add_of_nonneg_left hfirst + _=B := by dsimp [B,V]; ring + have hr := hregular M A P (zero_lt_one.trans_le hM) hA hP hL s T F hs hT hTT + zX a b I w hzX ha hb hI hI1 hJI (zero_lt_one.trans_le hw) hwP HZ + have he' := hexception P hP hL s T F hs hT hTT zX a b I w ha hb hI hI1 hJI hw hwP + calc + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*V) := add_le_add hr he' + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hVB hCe)) + _=ENNReal.ofReal ((Cr+Ce)*B) := by rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCe hB)]; congr 1; ring + +lemma Admissible.representative_magnetic_large_Cauchy {d : Datum} (hd : Admissible d) : + ∃ C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → ∀(zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

s.f (0,z))⊆tsupport d.f₀ := by + have he : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [he] + have hbnd := hbound s T F hs.energyPrefix hT hs.initial_f zX B (tsupport d.f₀) + a b I p θ φ 1 1 (k 2) hd.2.1 hS0 hJ hI hp hθ.le hφ.le (by norm_num) + (by change 0min (H*(2:ℝ)^k*p^2*θ^2*φ) (Real.sqrt p/Real.sqrt (H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := large_radius_magnetic_balance hH hp hθ hφ hθ + simp only [min_self] at hg + have heq (k : ℤ) : Real.sqrt p*θ/(θ*Real.sqrt (H*(2:ℝ)^k))=Real.sqrt p/Real.sqrt (H*(2:ℝ)^k) := by + field_simp [hθ.ne'] + simp_rw [heq] at hg + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + have hθeq : θ^(4/3:ℝ)*θ^(-(2/3:ℝ))=θ^(2/3:ℝ) := by + rw [←Real.rpow_add hθ] + congr 1 + norm_num + calc + _ = ∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by simp only [g,he] + _ ≤ ∑'k : ℤ,ENNReal.ofReal (K*g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (K*g k)) + _ = ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _ ≤ _ := by + apply ENNReal.ofReal_le_ofReal + have hh := mul_le_mul_of_nonneg_left hg.2 hK + calc + _ ≤ K*(dyadicBalanceConstant 1 (1/2)*(p*θ^(4/3:ℝ)*θ^(-(2/3:ℝ))*φ^(1/3:ℝ))) := hh + _ = (K*dyadicBalanceConstant 1 (1/2)*p)*(θ^(4/3:ℝ)*θ^(-(2/3:ℝ)))*φ^(1/3:ℝ) := by ring + _ = _ := by rw [hθeq] + +lemma capped_rpow_ennreal_sum {α : ℝ} (hα : 0<α) : + (∑'n : ℕ, ENNReal.ofReal ((cappedRepresentative n)^α))≤ + ENNReal.ofReal ((1-((2:ℝ)⁻¹)^α)⁻¹) := by + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>Real.rpow_nonneg (cappedRepresentative_pos n).le _)] + apply ENNReal.ofReal_le_ofReal + simpa using capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) hα S + (fun n _=>cappedRepresentative_le_one n) + +lemma capped_rpow_sum_constant_pos {α : ℝ} (hα : 0<α) : 0<(1-((2:ℝ)⁻¹)^α)⁻¹ := by + apply inv_pos.mpr + exact sub_pos.mpr (Real.rpow_lt_one (by norm_num) (by norm_num) hα) + +lemma large_magnetic_triple_sum {H p K : ℝ} (hH : 0ENNReal.tsum_le_tsum (fun nt=> + capped_large_magnetic_weighted_sum hH hp (cappedRepresentative_pos _) (cappedRepresentative_pos _) hK)) + _=ENNReal.ofReal (K*D*p)*(∑'nt : ℕ,ENNReal.ofReal ((cappedRepresentative nt)^(2/3:ℝ)))* + (∑'nf : ℕ,ENNReal.ofReal ((cappedRepresentative nf)^(1/3:ℝ))) := by + have he (nf nt : ℕ) : ENNReal.ofReal (K*D*p*(cappedRepresentative nt)^(2/3:ℝ)*(cappedRepresentative nf)^(1/3:ℝ))= + ENNReal.ofReal (K*D*p)*ENNReal.ofReal ((cappedRepresentative nt)^(2/3:ℝ))*ENNReal.ofReal ((cappedRepresentative nf)^(1/3:ℝ)) := by + rw [ENNReal.ofReal_mul (mul_nonneg (by positivity : 0≤K*D*p) + (Real.rpow_nonneg (cappedRepresentative_pos nt).le _)),ENNReal.ofReal_mul (by positivity : 0≤K*D*p)] + simp only [he,ENNReal.tsum_mul_right,ENNReal.tsum_mul_left] + _≤ENNReal.ofReal (K*D*p)*ENNReal.ofReal A*ENNReal.ofReal B := mul_le_mul' + (mul_le_mul' le_rfl (capped_rpow_ennreal_sum (by norm_num))) + (capped_rpow_ennreal_sum (by norm_num)) + _=_ := by rw [←ENNReal.ofReal_mul (by positivity : 0≤K*D*p), + ←ENNReal.ofReal_mul (by positivity : 0≤K*D*p*A)] + +lemma Admissible.representative_large_magnetic_triple_sum {d : Datum} (hd : Admissible d) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (np : ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt)))).trans + apply (large_magnetic_triple_sum hH hp (mul_nonneg hCb (Real.sqrt_nonneg I))).trans + apply le_of_eq + congr 1 + dsimp only [p,D,A,B] + ring + +lemma Admissible.magnetic_large_uniform {d : Datum} (hd : Admissible d) : + ∃ C : ℝ,0≤C ∧ ∀ P : ℝ,0≤P → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLargeMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I)) := by + classical + obtain ⟨Cn,hCn,hlarge⟩ := hd.representative_large_magnetic_triple_sum + refine ⟨2*Cn,by positivity,?_⟩ + intro P hP s T F hs hT zX a b I w ha hb hI hJI + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + representativeLargeMagneticCost s F zX I w ![np,nt,nf,nr] a b + have hdom : (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLargeMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + apply (indicator_le_self _ _ (np,nf)).trans + apply ENNReal.tsum_le_tsum + intro nt + apply ENNReal.tsum_le_tsum + intro nr + split_ifs + · rfl + · exact bot_le + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal (Cn*Real.sqrt I*sourceRepresentative np) := Finset.sum_le_sum + (fun np _=>hlarge s T F hs hT zX np a b I w ha hb hI hJI) + _=ENNReal.ofReal (Cn*Real.sqrt I*(∑np∈U,sourceRepresentative np)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun np _=>by + exact mul_nonneg (mul_nonneg hCn (Real.sqrt_nonneg I)) (by dsimp [sourceRepresentative]; positivity))] + congr 1 + rw [Finset.mul_sum] + _≤ENNReal.ofReal (Cn*Real.sqrt I*(2*P)) := ENNReal.ofReal_le_ofReal + (mul_le_mul_of_nonneg_left (sourceRepresentative_sum_bound hP U hU) (by positivity)) + _=_ := by congr 1; ring + +lemma Admissible.magnetic_small_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cr,hCr,hregular⟩ := hd.magnetic_small_short_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.magnetic_large_uniform + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let Gr := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + (if cappedRepresentative nr≤I then representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) else 0 + let Ge := fun n : ℕ×ℕ=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeLargeMagneticCost s F zX I w ![n.1,nt,n.2,nr] a b else 0 + have he (n : ℕ×ℕ) : Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n= + Q.indicator Gr n+Q.indicator Ge n := by + by_cases hn : n∈Q + · simp only [indicator_of_mem hn,Gr,Ge] + rw [←ENNReal.tsum_add] + apply tsum_congr + intro nt + rw [←ENNReal.tsum_add] + apply tsum_congr + intro nr + by_cases ht : cappedRepresentative nt≤cappedRepresentative n.2/16 + · simp only [ite_eq_left ht] + change representativeMagneticCost _ _ _ _ _ _ _= + (if cappedRepresentative nr≤I then _ else 0)+ + (if I∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeMagneticCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤_ + simp_rw [he] + rw [ENNReal.tsum_add] + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let V := P*Real.sqrt I + have hV : 0≤V := by dsimp [V]; positivity + have hB : 0≤B := by dsimp [B]; positivity + have hVB : V≤B := le_add_of_nonneg_right (by positivity) + have hr := hregular M A P hM hA hP hL s T F hs hT hTT + zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + have he' := hexception P (zero_le_one.trans hP) s T F hs hT zX a b I w ha hb hI hJI + calc + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*V) := add_le_add hr he' + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hVB hCe)) + _=ENNReal.ofReal ((Cr+Ce)*B) := by rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCe hB)]; congr 1; ring + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.bulkSource_cost_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {a b : ℝ} (ha : 0≤a) (hb : b≤T) + (hband : ∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) (hW1 : ∀t∈Icc a b,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) : + (∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T (bulkSelection P M A w I) + (coneSourceCutoffTangent s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (99840000*C)*(∑'k : Fin 4→ℕ,(bulkSourceBoundary P M A w I).indicator + (fun k=>representativeGoodCost s F zX w k a b+representativeMagneticCost s F zX w k a b) k) := by + let Q := bulkSelection P M A w I + let R := bulkSourceBoundary P M A w I + let g := fun p=>ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneSourceCutoffTangent s F.flow zX) W (Icc a b) p‖ + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hg : Measurable g := + (F.partialCutoffTriangle_measurable hs zX Q (F.coneSourceCutoffTangent_continuousOn hs zX) hW measurableSet_Icc).norm.ennreal_ofReal + have hc : ∀p,g p≠0→∃k∈R,p∈physicalBinPhaseSet + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b) := by + intro p hp + have hpn : partialCutoffTriangle s F.flow zX T Q (coneSourceCutoffTangent s F.flow zX) W (Icc a b) p≠0 := by + intro h; apply hp; simp only [g,h,norm_zero,ENNReal.ofReal_zero] + obtain ⟨k,hk,hr,hpk⟩ := F.bulkCutoffTriangle_small_support zX _ W (Icc_subset_Icc ha hb) hband hP hpn + exact ⟨k,⟨hk,hr⟩,hpk⟩ + apply (physicalBinPhase_cover_lintegral hV measurableSet_Icc T w R hg hc).trans + rw [←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · rw [indicator_of_mem hk,indicator_of_mem hk] + exact F.bulkSource_bin_integral hs hT zX Q ha hb W hW1 hC0 hC k hk.1.2.2 + · rw [indicator_of_notMem hk,indicator_of_notMem hk,mul_zero] + +lemma Admissible.bulk_source_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ W : ℝ→Vec→L[ℝ]Vec,Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T (bulkSelection P M A w I) + (coneSourceCutoffTangent s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hgood⟩ := hd.bulk_source_good_uniform T₀ + obtain ⟨Cm,hCm,hmag⟩ := hd.magnetic_small_uniform T₀ + obtain ⟨Cd,hCd,hder⟩ := dyadicFactor_log_derivative_bound + refine ⟨99840000*Cd*(Cs+Cm),by positivity,?_⟩ + intro M A hM hA + filter_upwards [hgood M A hM hA] with P hg + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsource hphysical hband HZ W hW hW1 + let R := bulkSourceBoundary P M A w I + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hmg : (∑'k : Fin 4→ℕ,R.indicator (fun k=>representativeMagneticCost s F zX w k a b) k)≤ + ENNReal.ofReal (Cm*B) := by + calc + _≤∑'k : Fin 4→ℕ,(centralIndexSector P).indicator (fun k=>representativeMagneticCost s F zX w k a b) k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · rw [indicator_of_mem hk,indicator_of_mem (representativeSmallSector_subset_centralIndexSector P hk.1)] + · rw [indicator_of_notMem hk]; exact bot_le + _≤_ := by + rw [tsum_centralIndexSector] + exact hmag M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + have hgd := hg hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsource HZ + have hsum : (∑'k : Fin 4→ℕ,R.indicator + (fun k=>representativeGoodCost s F zX w k a b+representativeMagneticCost s F zX w k a b) k)≤ + ENNReal.ofReal ((Cs+Cm)*B) := by + rw [show R.indicator (fun k=>representativeGoodCost s F zX w k a b+representativeMagneticCost s F zX w k a b)= + (fun k=>R.indicator (fun k=>representativeGoodCost s F zX w k a b) k+ + R.indicator (fun k=>representativeMagneticCost s F zX w k a b) k) by + funext k; simp only [indicator_add],ENNReal.tsum_add] + apply (add_le_add hgd hmg).trans_eq + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (mul_nonneg hCm hB)] + congr 1; ring + apply (F.bulkSource_cost_sum hs.energyPrefix hT zX ha hb hband hphysical hW hW1 hCd hder).trans + apply (mul_le_mul' le_rfl hsum).trans_eq + rw [←ENNReal.ofReal_mul (by positivity : 0≤99840000*Cd)] + congr 1; ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/MajorantRelativeDensityTimeFar.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/MajorantRelativeDensityTimeFar.lean new file mode 100644 index 0000000000000000000000000000000000000000..73b4a10f51d0a9a1cde108463f5588a300d58004 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/MajorantRelativeDensityTimeFar.lean @@ -0,0 +1,673 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RadialSummation +import OAI.Analysis.VlasovMaxwell.Retarded.SourceMajorant + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma majorant_relative_density_time_far_sqrt {C E I p ν r θ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hI : 0≤I) (hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + I ≤ max 1 T*cappedRepresentative (k 3) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let ν := min θ σ + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*ν/θ^2)/Real.sqrt r)+ + Kb*Real.sqrt I*min (r*p^2*ν^2*φ) (Real.sqrt p*ν/(θ*Real.sqrt r))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_large_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + have hn := hsource s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

min (H*(2:ℝ)^k*p^2) (Real.sqrt p/Real.sqrt (H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := large_radius_magnetic_balance hH hp (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1) + simp only [min_self,one_pow,mul_one,one_mul,Real.one_rpow] at hg + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ ≤ ∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by + apply ENNReal.tsum_le_tsum + intro n + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_left _ hK + dsimp only [g] + rw [←he] + have hcn := (cappedRepresentative_pos n).le + apply min_le_min + · have hνsq : ν^2≤1 := by nlinarith only [hν,hν1] + have hprod : ν^2*φ≤1 := calc + _ ≤ 1*φ := mul_le_mul_of_nonneg_right hνsq hφ + _ ≤ 1 := by simpa only [one_mul] using hφ1 + calc + _ = (H*cappedRepresentative n*p^2)*(ν^2*φ) := by ring + _ ≤ (H*cappedRepresentative n*p^2)*1 := + mul_le_mul_of_nonneg_left hprod (by positivity) + _ = _ := mul_one _ + · have hr : 0ENNReal.ofReal (K*g k)) + _ = ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _ ≤ _ := by + apply ENNReal.ofReal_le_ofReal + simpa only [g,mul_assoc] using mul_le_mul_of_nonneg_left hg.2 hK + +lemma majorant_remaining_good_coarse_balance {I p ν θ φ : ℝ} + (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → + cappedRepresentative nφ≤16384*cappedRepresentative nθ → + let p := sourceRepresentative np + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if I ≤ max 1 T*cappedRepresentative nr then + ∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((16384*Kg*dyadicBalanceConstant (1/2) (1/2)+ + Kb*dyadicBalanceConstant 1 (1/2))*Real.sqrt I*p) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_large_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI hI1 hsector + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*ν/θ^2 + let G := fun n=>ENNReal.ofReal (Kg*min (ag*Real.sqrt (max 1 T*cappedRepresentative n)) + (bg/Real.sqrt (max 1 T*cappedRepresentative n))) + let Bm := fun n=>ENNReal.ofReal (Kb*Real.sqrt I*min + (max 1 T*cappedRepresentative n*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (max 1 T*cappedRepresentative n)))) + have hp : 0

H*cappedRepresentative n≤R) + have hS : ∀n∈S,cappedRepresentative n≤R/H := by + intro n hn + exact (le_div_iff₀ hH).mpr (by simpa only [mul_comm] using (Finset.mem_filter.mp hn).2) + have hh := capped_positive_power_sum_unscaled (div_pos hR hH) (by norm_num : (0:ℝ)<1/2) S hS + have he (n : ℕ) : Real.sqrt (H*cappedRepresentative n)= + Real.sqrt H*(cappedRepresentative n)^(1/2:ℝ) := by + rw [Real.sqrt_mul hH.le,Real.sqrt_eq_rpow (cappedRepresentative n)] + calc + _ = ∑n∈S,ENNReal.ofReal (K*Real.sqrt (H*cappedRepresentative n)) := by + simp only [S,Finset.sum_filter] + _ = ENNReal.ofReal (K*Real.sqrt H*(∑n∈S,(cappedRepresentative n)^(1/2:ℝ))) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n hn=>mul_nonneg hK (Real.sqrt_nonneg _))] + simp only [he,←mul_assoc,Finset.mul_sum] + _ ≤ ENNReal.ofReal (K*Real.sqrt H*((1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*(R/H)^(1/2:ℝ))) := by + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_left hh (mul_nonneg hK (Real.sqrt_nonneg _)) + _ = _ := by + rw [←Real.sqrt_eq_rpow (R/H),Real.sqrt_div hR.le] + congr 1 + field_simp [(Real.sqrt_pos.mpr hH).ne'] + +lemma Admissible.source_majorant_short_near_sum {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((Kg*(I*p^2*ν^2*φ^2/θ^2)+Kb*(I*p^2*ν^2*φ))* + (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_short_near + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + dsimp only + have hKg := majorant_relativeCauchyConstant_nonneg (E:=∫x : Vec,totalEnergy s (0,x)) (Z:=20*(∫x : Vec,totalEnergy s (0,x))) hCg + have hKb := majorant_relativeCauchyConstant_nonneg (E:=∫x : Vec,totalEnergy s (0,x)) (Z:=120*(∫x : Vec,totalEnergy s (0,x))) hCb + have hφ := (cappedRepresentative_pos nφ).le + have hK0 : 0≤ majorant_relativeCauchyConstant Cg (∫x : Vec,totalEnergy s (0,x)) (20*(∫x : Vec,totalEnergy s (0,x)))* + (I*(sourceRepresentative np)^2*(min (cappedRepresentative nθ) (cappedRepresentative j))^2*(cappedRepresentative nφ)^2/(cappedRepresentative nθ)^2)+ + majorant_relativeCauchyConstant Cb (∫x : Vec,totalEnergy s (0,x)) (120*(∫x : Vec,totalEnergy s (0,x)))* + (I*(sourceRepresentative np)^2*(min (cappedRepresentative nθ) (cappedRepresentative j))^2*cappedRepresentative nφ) := by positivity + apply le_trans (ENNReal.tsum_le_tsum (fun n=>?_)) (majorant_capped_short_sqrt_radius_sum + (show 0 < max 1 T from zero_lt_one.trans_le (le_max_left _ _)) hI hK0) + split_ifs with hrI + · have hh := hsource s T F hs hT h0 zX S ![np,nθ,nφ,n] j a b I w hS hS0 ha hb hJI hI hrI + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one,Matrix.cons_val,Fin.reduceFinMk] at hh + exact hh + · exact le_rfl + +lemma majorant_deficit_short_source_coefficient {I P p w θ φ σ Kg Kb : ℝ} + (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((268435456*Kg+Kb)*16777216*(1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_short_near_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hI1 hw hP hpP hIP hsector hdeficit + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + have hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 1 ≤ P → 1 ≤ Real.log (2+P) → 0 < w → w≤P → + sourceRepresentative np≤128*P → + cappedRepresentative nφ≤16384*cappedRepresentative nθ → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.log (2+P)) := by + obtain ⟨Cgs,Cbs,hCgs,hCbs,hshort⟩ := hd₀.source_majorant_remaining_short_sum + obtain ⟨Cgd,Cbd,hCgd,hCbd,hdef⟩ := hd₀.source_majorant_deficit_short_sum + obtain ⟨Cgl,Cbl,hCgl,hCbl,hlong⟩ := hd₀.source_majorant_remaining_large_sum + let Ds := dyadicBalanceConstant (1/2) (1/2) + let Dm := dyadicBalanceConstant 1 (1/2) + let Dn := (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ + let gs := majorant_relativeCauchyConstant Cgs 1 20 + let bs := majorant_relativeCauchyConstant Cbs 1 120 + let gd := majorant_relativeCauchyConstant Cgd 1 20 + let bd := majorant_relativeCauchyConstant Cbd 1 120 + let gl := majorant_relativeCauchyConstant Cgl 1 20 + let bl := majorant_relativeCauchyConstant Cbl 1 120 + let Cs := (16384*gs+bs)*Ds*(32768*16385*16384) + let Cd := (268435456*gd+bd)*16777216*Dn + let Cl := (16384*gl*Ds+bl*Dm)*128 + have hDs : 0≤Ds := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDm : 0≤Dm := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDn : 0≤Dn := majorant_shortSqrtConstant_pos.le + have hgs : 0≤gs := majorant_relativeCauchyConstant_nonneg hCgs + have hbs : 0≤bs := majorant_relativeCauchyConstant_nonneg hCbs + have hgd : 0≤gd := majorant_relativeCauchyConstant_nonneg hCgd + have hbd : 0≤bd := majorant_relativeCauchyConstant_nonneg hCbd + have hgl : 0≤gl := majorant_relativeCauchyConstant_nonneg hCgl + have hbl : 0≤bl := majorant_relativeCauchyConstant_nonneg hCbl + have hCs : 0≤Cs := by dsimp only [Cs]; positivity + have hCd : 0≤Cd := by dsimp only [Cd]; positivity + have hCl : 0≤Cl := by dsimp only [Cl]; positivity + refine ⟨Cs+Cd+Cl,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP1 hL hw hwP hpP hsector HX HZ + dsimp only + let I := (w/P)^2 + let L := Real.log (2+P) + let E := ∫x : Vec,totalEnergy s (0,x) + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let J : ℕ→ℝ≥0∞ := fun nr=>∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (B nr) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (B nr) (Icc a b) + let Jshort : ℕ→ℝ≥0∞ := fun nr=>if max 1 T*cappedRepresentative nr≤I then J nr else 0 + let Jlong : ℕ→ℝ≥0∞ := fun nr=>if I ≤ max 1 T*cappedRepresentative nr then J nr else 0 + let U := (1+E)*(1+M+Real.sqrt A)*w*L + have hP : 0

dyadicFactor n (g r)) t|≤C*|deriv g t/g t| := by + change |deriv (dyadicFactor n ∘ g) t| ≤ _ + rw [deriv_comp t ((contDiff_dyadicFactor n).differentiable (by simp) (g t)) hg] + calc + _ = |(g t*deriv (dyadicFactor n) (g t))*(deriv g t/g t)| := by + congr 1 + field_simp [hx.ne'] + _ = |g t*deriv (dyadicFactor n) (g t)| * |deriv g t/g t| := abs_mul _ _ + _ ≤ _ := mul_le_mul_of_nonneg_right (hC n (g t)) (abs_nonneg _) + +lemma dyadicMultiFactor_curve_zero_derivative {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (n : ι→ℕ) + (hz : dyadicMultiFactor n (fun i => g i t)=0) : + deriv (fun r => dyadicMultiFactor n (fun i => g i r)) t=0 := by + apply IsLocalMin.deriv_eq_zero + exact Filter.Eventually.of_forall (fun r => by + dsimp only + rw [hz] + exact dyadicMultiFactor_nonneg _ _) + +lemma dyadicMultiFactor_curve_log_bound {C : ℝ} + (hC : ∀ n : ℕ, ∀ x : ℝ, |x*deriv (dyadicFactor n) x|≤C) + {ι : Type*} [Fintype ι] {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i, DifferentiableAt ℝ (g i) t) (hx : ∀ i, 0 dyadicMultiFactor n (fun i => g i r)) t| ≤ + C * ∑ i, |deriv (g i) t/g i t| := by + classical + have hd (i : ι) : DifferentiableAt ℝ (fun r => dyadicFactor (n i) (g i r)) t := + ((contDiff_dyadicFactor (n i)).differentiable (by simp) (g i t)).comp t (hg i) + unfold dyadicMultiFactor + dsimp only + rw [deriv_fun_finsetProd (u:=Finset.univ) (fun i _ => hd i)] + simp only [smul_eq_mul] + apply le_trans (Finset.abs_sum_le_sum_abs _ _) + rw [Finset.mul_sum] + apply Finset.sum_le_sum + intro i _ + have hp0 : 0≤∏ j∈Finset.univ.erase i,dyadicFactor (n j) (g j t) := + Finset.prod_nonneg (fun j _ => dyadicFactor_nonneg _ _) + have hp1 : (∏ j∈Finset.univ.erase i,dyadicFactor (n j) (g j t))≤1 := + Finset.prod_le_one₀ (fun j _ => dyadicFactor_nonneg _ _) (fun j _ => dyadicFactor_le_one _ _) + rw [abs_mul,abs_of_nonneg hp0] + exact (mul_le_of_le_one_left (abs_nonneg _) hp1).trans + (dyadicFactor_curve_log_bound hC (hg i) (hx i) (n i)) + +lemma dyadicMultiFactor_curve_indicator_bound {C : ℝ} + (hC : ∀ n : ℕ, ∀ x : ℝ, |x*deriv (dyadicFactor n) x|≤C) + {ι : Type*} [Fintype ι] {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i, DifferentiableAt ℝ (g i) t) (hx : ∀ i, 0 dyadicMultiFactor n (fun i => g i r)) t| ≤ + {r | ∀ i,DyadicBand (n i) (g i r)}.indicator + (fun _ => C * ∑ i, |deriv (g i) t/g i t|) t := by + classical + by_cases hb : ∀ i,DyadicBand (n i) (g i t) + · change t∈{r | ∀ i,DyadicBand (n i) (g i r)} at hb + rw [indicator_of_mem hb] + exact dyadicMultiFactor_curve_log_bound hC hg hx n + · change t∉{r | ∀ i,DyadicBand (n i) (g i r)} at hb + rw [indicator_of_notMem hb] + have hz : dyadicMultiFactor n (fun i => g i t)=0 := by + by_contra hn + exact hb (dyadicMultiFactor_positive_bands (lt_of_le_of_ne (dyadicMultiFactor_nonneg _ _) (Ne.symm hn))) + rw [dyadicMultiFactor_curve_zero_derivative n hz,abs_zero] + +lemma selected_dyadic_derivative_indicator_bound {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i,DifferentiableAt ℝ (g i) t) + (hx : ∀ i,0 ∑ n∈S,dyadicMultiFactor n (fun i => g i r)) t| ≤ + ∑ n∈dyadicBox ι N \ S,{r | ∀ i,DyadicBand (n i) (g i r)}.indicator + (fun _ => C * ∑ i,|deriv (g i) t/g i t|) t := by + classical + obtain ⟨C,hC,hbound⟩ := dyadicFactor_log_derivative_bound + refine ⟨C,hC,?_⟩ + rw [selected_dyadic_derivative_cancel hg N h1 hN S hS,abs_neg] + exact (Finset.abs_sum_le_sum_abs _ _).trans + (Finset.sum_le_sum (fun n _ => dyadicMultiFactor_curve_indicator_bound hbound hg hx n)) + +def momentumDirection (v : Vec) : Vec := ‖v‖⁻¹ • v + +lemma momentumDirection_norm {v : Vec} (hv : v ≠ 0) : ‖momentumDirection v‖=1 := by + simp [momentumDirection,norm_smul,norm_ne_zero_iff.mpr hv] + +lemma hasDerivAt_momentumDirection {V : ℝ → Vec} {K : Vec} {t : ℝ} + (hV : HasDerivAt V K t) (hv : V t ≠ 0) : + HasDerivAt (momentumDirection ∘ V) + (‖V t‖⁻¹ • transverseProjection (V t) K) t := by + have hn := hasDerivAt_norm_nonzero hV hv + have hh := (hn.inv (norm_ne_zero_iff.mpr hv)).smul hV + convert hh using 1 <;> try rfl + ext i + simp only [Pi.inv_apply,transverseProjection,velocityProjection,dot_smul_left, + PiLp.smul_apply,PiLp.add_apply,PiLp.sub_apply,smul_eq_mul] + field_simp + ring + +def angularMultiplier (w : ℝ) (v h : Vec) : Vec := + (w/‖v‖) • transverseProjection v h + +lemma hasDerivAt_angularMultiplier {V : ℝ → Vec} {K : Vec} {t : ℝ} + (hV : HasDerivAt V K t) (hv : V t ≠ 0) (w : ℝ) (h : Vec) : + HasDerivAt (fun r => angularMultiplier w (V r) h) + ((-w/‖V t‖^2) • + (dot (momentumDirection (V t)) K • transverseProjection (V t) h + + dot (momentumDirection (V t)) h • transverseProjection (V t) K + + dot (transverseProjection (V t) K) h • momentumDirection (V t))) t := by + have hn := hasDerivAt_norm_nonzero hV hv + have hξ := hasDerivAt_momentumDirection hV hv + have hP := (hasDerivAt_const t h).sub + ((hasDerivAt_dot hξ (hasDerivAt_const t h)).smul hξ) + have hh := ((hasDerivAt_const t w).div hn (norm_ne_zero_iff.mpr hv)).smul hP + convert hh using 1 <;> try rfl + ext i + simp only [Pi.div_apply,Pi.sub_apply,Pi.smul_apply',momentumDirection,transverseProjection,velocityProjection,dot_smul_left, + dot_sub_left,dot_zero_right_rvm,Function.comp_apply,zero_add,zero_sub, + PiLp.smul_apply,PiLp.add_apply,PiLp.sub_apply,PiLp.neg_apply,smul_eq_mul, + zero_mul] + field_simp + ring + +lemma angularMultiplier_derivative_bound (w : ℝ) (v K h : Vec) (hv : v ≠ 0) : + ‖(-w/‖v‖^2) • + (dot (momentumDirection v) K • transverseProjection v h + + dot (momentumDirection v) h • transverseProjection v K + + dot (transverseProjection v K) h • momentumDirection v)‖ ≤ + 3*|w|/‖v‖^2*‖K‖*‖h‖ := by + have hξ := momentumDirection_norm hv + have ha : |dot (momentumDirection v) K| ≤ ‖K‖ := by simpa only [hξ,one_mul] using abs_dot_le (momentumDirection v) K + have hb : |dot (momentumDirection v) h| ≤ ‖h‖ := by simpa only [hξ,one_mul] using abs_dot_le (momentumDirection v) h + have hc : |dot (transverseProjection v K) h| ≤ ‖K‖*‖h‖ := + (abs_dot_le _ _).trans (mul_le_mul_of_nonneg_right (transverseProjection_norm _ _) (norm_nonneg _)) + have hsum : ‖dot (momentumDirection v) K • transverseProjection v h + + dot (momentumDirection v) h • transverseProjection v K + + dot (transverseProjection v K) h • momentumDirection v‖ ≤ 3*‖K‖*‖h‖ := by + calc + _ ≤ ‖dot (momentumDirection v) K • transverseProjection v h‖ + + ‖dot (momentumDirection v) h • transverseProjection v K‖ + + ‖dot (transverseProjection v K) h • momentumDirection v‖ := norm_add₃_le + _ ≤ ‖K‖*‖h‖+‖h‖*‖K‖+‖K‖*‖h‖ := by + simp only [norm_smul,Real.norm_eq_abs,hξ,mul_one] + exact add_le_add (add_le_add (mul_le_mul ha (transverseProjection_norm _ _) (norm_nonneg _) (norm_nonneg _)) + (mul_le_mul hb (transverseProjection_norm _ _) (norm_nonneg _) (norm_nonneg _))) hc + _ = _ := by ring + rw [norm_smul,Real.norm_eq_abs,abs_div,abs_neg,abs_sq] + exact (mul_le_mul_of_nonneg_left hsum (by positivity)).trans_eq (by ring) + +lemma dyadicBand_multi_card_le {ι : Type*} [Fintype ι] (S : Finset (ι→ℕ)) {x : ι→ℝ} + (hS : ∀ n∈S,∀ i,DyadicBand (n i) (x i)) : S.card≤5^Fintype.card ι := by + classical + let A : ι→Finset ℕ := fun i=>S.image (fun n=>n i) + have hA : ∀ i,(A i).card≤5 := by + intro i + apply dyadicBand_card_le + intro n hn + obtain ⟨m,hm,rfl⟩ := Finset.mem_image.mp hn + exact hS m hm i + calc + S.card ≤ (Fintype.piFinset A).card := Finset.card_le_card (by + intro n hn + exact Fintype.mem_piFinset.mpr (fun i=>Finset.mem_image.mpr ⟨n,hn,rfl⟩)) + _ = ∏ i,(A i).card := Fintype.card_piFinset A + _ ≤ ∏ _i : ι,5 := Finset.prod_le_prod (fun i _=>hA i) + _ = _ := by simp + +lemma selectedDyadicCutoff_uniform_log_bound {C : ℝ} + (hC0 : 0≤C) (hC : ∀ n : ℕ,∀ x : ℝ,|x*deriv (dyadicFactor n) x|≤C) + {ι : Type*} [Fintype ι] {g : ι→ℝ→ℝ} {t : ℝ} + (hg : ∀ i,DifferentiableAt ℝ (g i) t) (hp : ∀ i,0selectedDyadicCutoff S (fun i=>g i r)) t| ≤ + (5:ℝ)^Fintype.card ι*C*∑ i,|deriv (g i) t/g i t| := by + classical + obtain ⟨N,_hN,he⟩ := selectedDyadicCutoff_curve_eventually (fun i=>(hg i).continuousAt) hp S + rw [he.deriv_eq,deriv_fun_sum (fun n _=>differentiableAt_dyadicMultiFactor_curve hg n)] + let A := (selectedDyadicBox N S).filter (fun n=>∀ i,DyadicBand (n i) (g i t)) + have hac : A.card≤5^Fintype.card ι := dyadicBand_multi_card_le A + (fun n hn=>(Finset.mem_filter.mp hn).2) + have hz (n : ι→ℕ) (hnb : ¬∀ i,DyadicBand (n i) (g i t)) : + deriv (fun r=>dyadicMultiFactor n (fun i=>g i r)) t=0 := by + apply dyadicMultiFactor_curve_zero_derivative + by_contra h + exact hnb (dyadicMultiFactor_positive_bands + (lt_of_le_of_ne (dyadicMultiFactor_nonneg _ _) (Ne.symm h))) + have heq : (∑ n∈selectedDyadicBox N S,deriv (fun r=>dyadicMultiFactor n (fun i=>g i r)) t)= + ∑ n∈A,deriv (fun r=>dyadicMultiFactor n (fun i=>g i r)) t := by + symm + apply Finset.sum_subset (Finset.filter_subset _ _) + intro n hn hna + exact hz n (by simpa only [A,Finset.mem_filter,hn,true_and] using hna) + rw [heq] + calc + _ ≤ ∑ n∈A,|deriv (fun r=>dyadicMultiFactor n (fun i=>g i r)) t| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ _n∈A,C*∑ i,|deriv (g i) t/g i t| := + Finset.sum_le_sum (fun n _=>dyadicMultiFactor_curve_log_bound hC hg hp n) + _ = (A.card:ℝ)*(C*∑ i,|deriv (g i) t/g i t|) := by simp + _ ≤ (5:ℝ)^Fintype.card ι*(C*∑ i,|deriv (g i) t/g i t|) := by + apply mul_le_mul_of_nonneg_right _ (by positivity) + exact_mod_cast hac + _ = _ := by ring + +lemma selectedDyadicCutoff_mem_unit {ι : Type*} [Fintype ι] {x : ι→ℝ} + (hp : ∀ i,0x i) (fun _=>continuousAt_const) hp S + have hh := he.eq_of_nhds + change selectedDyadicCutoff S x = ∑ n∈selectedDyadicBox N S,dyadicMultiFactor n x at hh + rw [hh] + refine ⟨Finset.sum_nonneg (fun n _=>dyadicMultiFactor_nonneg n x),?_⟩ + calc + _ ≤ ∑ n∈dyadicBox ι N,dyadicMultiFactor n x := Finset.sum_le_sum_of_subset_of_nonneg + (Finset.filter_subset _ _) (fun n _ _=>dyadicMultiFactor_nonneg n x) + _ = 1 := sum_dyadicMultiFactor_eq_one N x h1 hN + +lemma physical_cutoff_logarithmic_rates {T t : ℝ} {V W N : ℝ→Vec} {R : ℝ→ℝ} + {E B K : Vec} (hn : ‖N t‖=1) (hr : 0physicalCutoffCoordinates T (R s) (N s) (V s) (W s) i) t / + physicalCutoffCoordinates T (R t) (N t) (V t) (W t) i| ≤ + (3/q (V t))*(goodField E B (N t)/θ+θ*‖B‖)+5/R t+θ^2*‖K‖/(q (W t)*φ^3) := by + let d := 1-dot (N t) (velocity (V t)) + let D := 1-dot (N t) (velocity (W t)) + let U := fderiv ℝ velocity (V t) (E+cross (velocity (V t)) B) + let A := fderiv ℝ velocity (W t) K + let M := (R t)⁻¹ • coneMotion (velocity (W t)) (velocity (V t)) (N t) + have hdpos : 0velocity (V s)) U t := + ((contDiff_velocity (k:=1)).differentiable one_ne_zero (V t)).hasFDerivAt.comp_hasDerivAt t hV + have ha : HasDerivAt (fun s=>velocity (W s)) ((d/D) • A) t := by + convert ((contDiff_velocity (k:=1)).differentiable one_ne_zero (W t)).hasFDerivAt.comp_hasDerivAt t hW using 1 <;> try rfl + simp only [map_smul] + rfl + have hd : HasDerivAt (fun s=>1-dot (N s) (velocity (V s))) + (-(dot M (velocity (V t))+dot (N t) U)) t := by + have hh := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot hN hu) + convert hh using 1 + try rfl + simp only [zero_sub] + exact congrArg Neg.neg (add_comm _ _) + have hD : HasDerivAt (fun s=>1-dot (N s) (velocity (W s))) + (-(dot M (velocity (W t))+(d/D)*dot (N t) A)) t := by + have hh := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot hN ha) + convert hh using 1 + try rfl + simp only [zero_sub,dot_smul_right] + exact congrArg Neg.neg (add_comm _ _) + have hdf : HasDerivAt (fun s=>1-dot (N t) (velocity (V s))) (-dot (N t) U) t := by + have hh := (hasDerivAt_const t (1:ℝ)).sub (hasDerivAt_dot (hasDerivAt_const t (N t)) hu) + convert hh using 1 + try rfl + simp only [zero_sub,dot_zero_left_rvm,add_zero] + have hed := angularCoordinate_log_deriv hd hdpos + have heD := angularCoordinate_log_deriv hD hDpos + have hef := angularCoordinate_log_deriv hdf hdpos + have heq := inverseCoordinate_log_deriv (hasDerivAt_lorentz_energy hV) (q_pos (V t)) + have her : deriv (fun s=>R s/max 1 T) t/(R t/max 1 T)=(d/D-1)/R t := by + rw [(hR.div_const (max 1 T)).deriv] + have hm : max 1 T≠0 := (lt_of_lt_of_le (by norm_num : (0:ℝ)<1) (le_max_left _ _)).ne' + change ((d/D-1)/max 1 T)/(R t/max 1 T)=(d/D-1)/R t + field_simp + have hsrc := source_cutoff_logarithmic_rates hV hn + dsimp only at hsrc + rw [heq,hef] at hsrc + have hgeo := geometric_cutoff_logarithmic_rates hn hr hsmall + have hrec := receiver_cutoff_logarithmic_rate (V t) (W t) K (N t) hn + have hsplitd : |-(dot M (velocity (V t))+dot (N t) U)/(2*d)| ≤ + |dot M (velocity (V t))/(2*d)|+|-dot (N t) U/(2*d)| := by + have he : -(dot M (velocity (V t))+dot (N t) U)/(2*d)= + -(dot M (velocity (V t))/(2*d))+(-dot (N t) U/(2*d)) := by ring + rw [he] + exact (abs_add_le _ _).trans_eq (by rw [abs_neg]) + have hsplitD : |-(dot M (velocity (W t))+(d/D)*dot (N t) A)/(2*D)| ≤ + |dot M (velocity (W t))/(2*D)|+|dot (N t) A*(d/D)/(2*D)| := by + rw [neg_div,abs_neg,add_div] + exact (abs_add_le _ _).trans_eq (by rw [mul_comm (d/D)]) + dsimp only at hsrc hgeo hrec ⊢ + simp only [Fin.sum_univ_succ,Fin.isValue,physicalCutoffCoordinates, + Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.sum_univ_zero,add_zero] + rw [heq,hed,heD,her] + change |-dot (velocity (V t)) E/q (V t)|+ + (|-(dot M (velocity (V t))+dot (N t) U)/(2*d)|+ + (|-(dot M (velocity (W t))+(d/D)*dot (N t) A)/(2*D)|+|(d/D-1)/R t|)) ≤ _ + dsimp only [d,D,U,A,M] at hsplitd hsplitD + linarith + +def sourceRepresentative (n : ℕ) : ℝ := 64*(2:ℝ)^n + +def cappedRepresentative (n : ℕ) : ℝ := (2:ℝ)⁻¹^n + +lemma dyadicBand_capped_range {n : ℕ} {x : ℝ} (h : DyadicBand n x) : + cappedRepresentative n/2≤x ∧ x≤2*cappedRepresentative n := by + have hp : 0<(2:ℝ)^n := by positivity + have he : cappedRepresentative n = ((2:ℝ)^n)⁻¹ := by simp [cappedRepresentative,inv_pow] + rw [he] + constructor + · rw [inv_eq_one_div,div_div] + exact (div_le_iff₀ (mul_pos hp (by norm_num))).mpr (by nlinarith [h.1]) + · rw [inv_eq_one_div,mul_one_div] + exact (le_div_iff₀ hp).mpr (by nlinarith [h.2]) + +lemma dyadicBand_source_range {n : ℕ} {v : Vec} (h : DyadicBand n (1/q v)) : + sourceRepresentative n/128≤q v ∧ q v≤ sourceRepresentative n/32 := by + have hlo := h.1 + have hhi := h.2 + rw [mul_one_div] at hlo hhi + have ha := (le_div_iff₀ (q_pos v)).mp hlo + have hb := (div_le_iff₀ (q_pos v)).mp hhi + dsimp [sourceRepresentative] + constructor <;> linarith + +lemma sourceRepresentative_mem_range {n : ℕ} {v : Vec} {P : ℝ} + (h : DyadicBand n (1/q v)) (hP : 1024*q v≤P) : + sourceRepresentative n∈Icc (64:ℝ) P := by + have hh := dyadicBand_source_range h + have hp : (1:ℝ)≤(2:ℝ)^n := one_le_pow₀ (by norm_num) + constructor + · dsimp [sourceRepresentative]; linarith + · nlinarith [q_pos v] + +lemma dyadicBand_angular_range {n : ℕ} {d : ℝ} (hd : 0≤d) + (h : DyadicBand n (Real.sqrt (d/2))) : + (cappedRepresentative n)^2/2≤d ∧ d≤8*(cappedRepresentative n)^2 := by + have hh := dyadicBand_capped_range h + have hp : 0 nlinarith + +lemma dyadicBand_radius_range {n : ℕ} {T r : ℝ} + (h : DyadicBand n (r/max 1 T)) : + max 1 T*cappedRepresentative n/2≤r ∧ r≤2*max 1 T*cappedRepresentative n := by + have hm : 0 < max (1:ℝ) T := lt_of_lt_of_le (by norm_num) (le_max_left _ _) + have hh := dyadicBand_capped_range h + have ha := (le_div_iff₀ hm).mp hh.1 + have hb := (div_le_iff₀ hm).mp hh.2 + constructor <;> nlinarith + +lemma PhaseFlowOn.retardedMomentum_hasDerivAt {E B : Field} {T σ : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) : + let τ := branchTime F.flow zX zY T + let n := branchDirection F.flow zX zY T σ + let d := 1-dot n (velocity (F.flow zY σ).2) + let D := 1-dot n (velocity (F.flow zX (τ σ)).2) + HasDerivAt (fun r=>(F.flow zX (τ r)).2) + ((d/D) • (lorentzField E B (τ σ,F.flow zX (τ σ))).2) σ := by + have ht := F.branch_time_mem zX zY hσ hne + have hti : branchTime F.flow zX zY T σ∈Ioo 0 T := ⟨hσ.1.1.trans ht.1,ht.2⟩ + have hW : HasDerivAt (fun r=>(F.flow zX r).2) + (lorentzField E B (branchTime F.flow zX zY T σ,F.flow zX (branchTime F.flow zX zY T σ))).2 + (branchTime F.flow zX zY T σ) := + ((F.ode zX _ (Ioo_subset_Icc_self hti)).hasDerivAt (Icc_mem_nhds hti.1 hti.2)).snd + exact hW.scomp σ (F.branch_differential zX zY hσ hne).2 + +lemma PhaseFlowOn.actual_cutoff_logarithmic_rates {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) + (hsmall : 1-dot (branchDirection F.flow zX zY T σ) (velocity (F.flow zY σ).2)≤ + 1-dot (branchDirection F.flow zX zY T σ) (velocity (F.flow zX (branchTime F.flow zX zY T σ)).2)) : + let τ := branchTime F.flow zX zY T σ + let n := branchDirection F.flow zX zY T σ + let θ := Real.sqrt ((1-dot n (velocity (F.flow zY σ).2))/2) + let φ := Real.sqrt ((1-dot n (velocity (F.flow zX τ).2))/2) + let E := s.E (σ,(F.flow zY σ).1) + let B := s.B (σ,(F.flow zY σ).1) + let K := (lorentzField s.E s.B (τ,F.flow zX τ)).2 + ∑ i : Fin 4,|deriv (fun r=>actualCutoffCoordinates F.flow T zX zY r i) σ / + actualCutoffCoordinates F.flow T zX zY σ i| ≤ + (3/q (F.flow zY σ).2)*(goodField E B n/θ+θ*‖B‖)+5/(τ-σ)+ + θ^2*‖K‖/(q (F.flow zX τ).2*φ^3) := by + have ht := F.branch_time_mem zX zY hσ hne + have hV := ((F.ode zY σ (Ioo_subset_Icc_self hσ.1)).hasDerivAt (Icc_mem_nhds hσ.1.1 hσ.1.2)).snd + exact physical_cutoff_logarithmic_rates (F.branchDirection_norm zX zY hσ hne) + (sub_pos.mpr ht.1) hsmall hV (F.retardedMomentum_hasDerivAt zX zY hσ hne) + (F.branchDirection_hasDerivAt zX zY hσ hne) + ((F.branch_differential zX zY hσ hne).2.sub (hasDerivAt_id σ)) + +def transverseCLM (v : Vec) : Vec→L[ℝ]Vec := + ContinuousLinearMap.id ℝ Vec - + ((InnerProductSpace.toDual ℝ Vec) (momentumDirection v)).smulRight (momentumDirection v) + +lemma transverseCLM_apply (v h : Vec) : transverseCLM v h=transverseProjection v h := by + simp only [transverseCLM,sub_apply,ContinuousLinearMap.id_apply, + ContinuousLinearMap.smulRight_apply,InnerProductSpace.toDual_apply_apply,← dot_eq_inner] + rfl + +def angularMultiplierCLM (w : ℝ) (v : Vec) : Vec→L[ℝ]Vec := (w/‖v‖) • transverseCLM v + +lemma angularMultiplierCLM_apply (w : ℝ) (v h : Vec) : + angularMultiplierCLM w v h=angularMultiplier w v h := by + simp only [angularMultiplierCLM,smul_apply,transverseCLM_apply,angularMultiplier] + +lemma contDiffAt_transverseCLM {v : Vec} (hv : v≠0) {k : ℕ∞ω} + (hk : k≤((⊤ : ℕ∞) : ℕ∞ω)) : ContDiffAt ℝ k transverseCLM v := by + have hξ : ContDiffAt ℝ k momentumDirection v := + ((contDiffAt_id.norm ℝ hv).inv (norm_ne_zero_iff.mpr hv)).smul contDiffAt_id + exact contDiffAt_const.sub (((InnerProductSpace.toDual ℝ Vec).contDiff.of_le hk).contDiffAt.comp v hξ |>.smulRight hξ) + +lemma contDiffAt_angularMultiplierCLM (w : ℝ) {v : Vec} (hv : v≠0) {k : ℕ∞ω} + (hk : k≤((⊤ : ℕ∞) : ℕ∞ω)) : ContDiffAt ℝ k (angularMultiplierCLM w) v := by + exact (contDiffAt_const.div (contDiffAt_id.norm ℝ hv) (norm_ne_zero_iff.mpr hv)).smul + (contDiffAt_transverseCLM hv hk) + +def angularDerivativeCLM (w : ℝ) (v K : Vec) : Vec→L[ℝ] Vec := + (-w/‖v‖^2) • + (dot (momentumDirection v) K • transverseCLM v + + ((InnerProductSpace.toDual ℝ Vec) (momentumDirection v)).smulRight (transverseProjection v K) + + ((InnerProductSpace.toDual ℝ Vec) (transverseProjection v K)).smulRight (momentumDirection v)) + +lemma angularDerivativeCLM_apply (w : ℝ) (v K h : Vec) : + angularDerivativeCLM w v K h = (-w/‖v‖^2) • + (dot (momentumDirection v) K • transverseProjection v h + + dot (momentumDirection v) h • transverseProjection v K + + dot (transverseProjection v K) h • momentumDirection v) := by + simp only [angularDerivativeCLM,smul_apply,add_apply, + transverseCLM_apply,ContinuousLinearMap.smulRight_apply,InnerProductSpace.toDual_apply_apply,← dot_eq_inner] + +lemma hasDerivAt_angularMultiplierCLM {V : ℝ→Vec} {K : Vec} {t : ℝ} + (hV : HasDerivAt V K t) (hv : V t≠0) (w : ℝ) : + HasDerivAt (fun r=>angularMultiplierCLM w (V r)) (angularDerivativeCLM w (V t) K) t := by + have hd := ((contDiffAt_angularMultiplierCLM w hv (k:=1) (by simp)).differentiableAt one_ne_zero).comp t hV.differentiableAt + have he : deriv (fun r=>angularMultiplierCLM w (V r)) t=angularDerivativeCLM w (V t) K := by + apply ContinuousLinearMap.ext + intro h + have hh := hd.hasDerivAt.clm_apply (hasDerivAt_const t h) + simp only [ContinuousLinearMap.map_zero,add_zero,Function.comp_apply,angularMultiplierCLM_apply] at hh + exact hh.unique (by simpa only [angularDerivativeCLM_apply] using hasDerivAt_angularMultiplier hV hv w h) + rw [←he] + exact hd.hasDerivAt + +lemma angularDerivativeCLM_norm_le (w : ℝ) (v K : Vec) (hv : v≠0) : + ‖angularDerivativeCLM w v K‖≤3*|w|/‖v‖^2*‖K‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro h + rw [angularDerivativeCLM_apply] + exact angularMultiplier_derivative_bound w v K h hv + +lemma continuousOn_momentumDirection {S : Set ℝ} {V : ℝ→Vec} + (hV : ContinuousOn V S) (hne : ∀ t∈S,V t≠0) : + ContinuousOn (fun t=>momentumDirection (V t)) S := + (hV.norm.inv₀ (fun t ht=>norm_ne_zero_iff.mpr (hne t ht))).smul hV + +lemma continuousOn_transverseCLM {S : Set ℝ} {V : ℝ→Vec} + (hV : ContinuousOn V S) (hne : ∀ t∈S,V t≠0) : + ContinuousOn (fun t=>transverseCLM (V t)) S := by + intro t ht + exact ((contDiffAt_transverseCLM (hne t ht) (k:=0) (by simp)).continuousAt).comp_continuousWithinAt (hV t ht) + +lemma continuousOn_transverseProjection {S : Set ℝ} {V K : ℝ→Vec} + (hV : ContinuousOn V S) (hK : ContinuousOn K S) (hne : ∀ t∈S,V t≠0) : + ContinuousOn (fun t=>transverseProjection (V t) (K t)) S := by + simpa only [transverseCLM_apply] using (continuousOn_transverseCLM hV hne).clm_apply hK + +lemma continuousOn_realTensor {S : Set ℝ} {V K : ℝ→Vec} + (hV : ContinuousOn V S) (hK : ContinuousOn K S) : + ContinuousOn (fun t=>((InnerProductSpace.toDual ℝ Vec) (V t)).smulRight (K t)) S := by + have hd : ContinuousOn (fun t=>(InnerProductSpace.toDual ℝ Vec) (V t)) S := + (InnerProductSpace.toDual ℝ Vec).continuous.comp_continuousOn hV + have hl : ContinuousOn (fun t=>ContinuousLinearMap.smulRightL ℝ Vec Vec ((InnerProductSpace.toDual ℝ Vec) (V t))) S := + (ContinuousLinearMap.smulRightL ℝ Vec Vec).continuous.comp_continuousOn hd + exact hl.clm_apply hK + +lemma continuousOn_angularDerivativeCLM {S : Set ℝ} {V K : ℝ→Vec} + (hV : ContinuousOn V S) (hK : ContinuousOn K S) (hne : ∀ t∈S,V t≠0) (w : ℝ) : + ContinuousOn (fun t=>angularDerivativeCLM w (V t) (K t)) S := by + have hξ := continuousOn_momentumDirection hV hne + have hP := continuousOn_transverseCLM hV hne + have hPK := continuousOn_transverseProjection hV hK hne + have hdot : ContinuousOn (fun t=>dot (momentumDirection (V t)) (K t)) S := + (contDiff_dot_pair (k:=0)).continuous.comp_continuousOn (hξ.prodMk hK) + have ha := continuousOn_realTensor hξ hPK + have hb := continuousOn_realTensor hPK hξ + have hc : ContinuousOn (fun t=>(-w)/‖V t‖^2) S := + continuousOn_const.div (hV.norm.pow 2) (fun t ht=>pow_ne_zero 2 (norm_ne_zero_iff.mpr (hne t ht))) + exact hc.smul (((hdot.smul hP).add ha).add hb) + + + +open MeasureTheory Set + +open Filter Set +open scoped Topology + +open scoped Topology Pointwise + +open Set MeasureTheory Metric ODE +open scoped Topology NNReal + +open scoped ContDiff + +open Set MeasureTheory Metric + +open Set MeasureTheory Metric Filter ODE + +open Set MeasureTheory Filter Metric ODE + +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff + +open Set MeasureTheory Filter + +open scoped Topology ContDiff RealInnerProductSpace NNReal + +open Set Filter MeasureTheory Metric + +open scoped Topology ContDiff NNReal RealInnerProductSpace + +open scoped Topology ContDiff NNReal ENNReal + +open Set MeasureTheory +open scoped ENNReal + +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +open scoped Topology ContDiff ENNReal + +open scoped Topology ContDiff NNReal + +open scoped Topology ContDiff + +open Set + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma sourceRepresentative_sum_bound {x : ℝ} (hx : 0≤x) (S : Finset ℕ) + (hS : ∀n∈S,sourceRepresentative n≤x) : ∑n∈S,sourceRepresentative n≤2*x := by + classical + have hgeom (N : ℕ) : ∑n∈Finset.range (N+1),sourceRepresentative n≤2*sourceRepresentative N := by + induction N with + | zero => norm_num [sourceRepresentative] + | succ N ih => + rw [Finset.sum_range_succ] + have he : sourceRepresentative (N+1)=2*sourceRepresentative N := by + dsimp only [sourceRepresentative] + rw [pow_succ] + ring + rw [he] + linarith + by_cases hne : S.Nonempty + · let N := S.max' hne + have hsub : S⊆Finset.range (N+1) := by + intro n hn + apply Finset.mem_range.mpr + have hh := S.le_max' n hn + change n≤N at hh + omega + have hs : (∑n∈S,sourceRepresentative n)≤∑n∈Finset.range (N+1),sourceRepresentative n := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun _ _ _=>by dsimp only [sourceRepresentative]; positivity) + exact hs.trans ((hgeom N).trans (mul_le_mul_of_nonneg_left (hS N (S.max'_mem hne)) (by norm_num))) + · rw [Finset.not_nonempty_iff_eq_empty.mp hne,Finset.sum_empty] + positivity + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/NullConeFlux.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/NullConeFlux.lean new file mode 100644 index 0000000000000000000000000000000000000000..20e6d8b104ff82f909e729670dd32af11abbf15f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/NullConeFlux.lean @@ -0,0 +1,449 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeArgument + +namespace OAI + +noncomputable section +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology NNReal +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory Metric +open scoped Topology Pointwise + +namespace RVM + +lemma sphere_neg_preserving : MeasurePreserving (Neg.neg : Sphere → Sphere) + sphereMeasure sphereMeasure := by + refine ⟨continuous_neg.measurable, ?_⟩ + ext A hA + rw [Measure.map_apply continuous_neg.measurable hA, + Measure.toSphere_apply' _ (continuous_neg.measurable hA), + Measure.toSphere_apply' _ hA] + have he : (Subtype.val '' ((Neg.neg : Sphere → Sphere) ⁻¹' A) : Set Vec) = + -(Subtype.val '' A) := by + ext x + constructor + · rintro ⟨n,hn,rfl⟩ + exact ⟨-n,hn,rfl⟩ + · rintro ⟨n,hn,hnx⟩ + exact ⟨-n,by simpa using hn,by simpa using congrArg Neg.neg hnx⟩ + rw [he,Set.smul_neg,Measure.measure_neg] + +lemma integral_sphere_neg {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (f : Sphere → W) : + (∫ n : Sphere, f (-n) ∂sphereMeasure) = ∫ n : Sphere, f n ∂sphereMeasure := + sphere_neg_preserving.integral_comp (MeasurableEquiv.neg Sphere).measurableEmbedding f + +def nullConeFlux (s : Solution) (T : ℝ) (x₀ : Vec) (t : ℝ) (n : Sphere) : ℝ := + (T-t)^2 * (totalEnergy s (t,x₀-(T-t) • n.1) - + dot n.1 (totalFlux s (t,x₀-(T-t) • n.1))) + +lemma nullConeFlux_spherical_eq (s : Solution) (T t : ℝ) (x₀ : Vec) : + (∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) = + ∫ n : Sphere, radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure := by + rw [← integral_sphere_neg (fun n => nullConeFlux s T x₀ t n)] + apply integral_congr_ae + apply ae_of_all + intro n + simp only [nullConeFlux,radialConeProfile,coe_neg_sphere,smul_neg,sub_neg_eq_add, + dot_eq_inner,inner_neg_left] + ring + +lemma classical_null_cone_flux {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + IntegrableOn (fun t => ∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) (Ioo 0 T) ∧ + (∫ t in 0..T, ∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + simp_rw [nullConeFlux_spherical_eq] + exact classical_light_cone_flux hs hT x₀ + +lemma classical_particle_cone_identity {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (x n : Vec) : + (∫ v : Vec, q v * (1-dot n (velocity v)) * s.f (t,x,v)) = + particleEnergy s (t,x) - dot n (particleFlux s (t,x)) := by + obtain ⟨hf,hc⟩ := classical_velocity_slice hs ht x + have hi : Integrable (fun v : Vec => s.f (t,x,v) • v) := + (hf.continuous.smul continuous_id).integrable_of_hasCompactSupport hc.smul_right + have hqi : Integrable (fun v : Vec => q v * s.f (t,x,v)) := + ((contDiff_q (k := 1)).continuous.mul hf.continuous).integrable_of_hasCompactSupport hc.mul_left + have hni := (innerSL ℝ n).integrable_comp hi + have hh := (innerSL ℝ n).integral_comp_comm hi + simp only [innerSL_apply_apply] at hh hni + simp only [particleEnergy,particleFlux,dot_eq_inner] + rw [← hh,← integral_sub hqi hni] + apply integral_congr_ae + apply ae_of_all + intro v + simp only [inner_smul_right,← dot_eq_inner] + have hq : q v * dot n (velocity v) = dot n v := by + simp only [dot,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [mul_left_comm,q_mul_velocity] + rw [← hq] + ring + +lemma classical_particle_cone_nonneg {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) {n : Vec} (hn : ‖n‖ = 1) : + 0 ≤ particleEnergy s (t,x) - dot n (particleFlux s (t,x)) := by + have hh := dot_le_norm n (particleFlux s (t,x)) + rw [hn,one_mul] at hh + linarith [classical_particle_flux_bound hs ht x] + +def goodConeDensity (s : Solution) (p : ℝ × Vec) (n : Vec) : ℝ := + (‖s.E p + cross n (s.B p)‖ + |dot n (s.B p)|)^2 + + (particleEnergy s p - dot n (particleFlux s p)) + +lemma goodConeDensity_bounds {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) {n : Vec} (hn : ‖n‖=1) : + 0 ≤ goodConeDensity s (t,x) n ∧ + goodConeDensity s (t,x) n ≤ 4*(totalEnergy s (t,x)-dot n (totalFlux s (t,x))) := by + have hG := good_field_square_le_flux (s.E (t,x)) (s.B (t,x)) n hn + have hP := classical_particle_cone_nonneg hs ht x hn + dsimp [goodConeDensity,totalEnergy,totalFlux] + rw [dot_add_right] + constructor + · positivity + · linarith + +lemma goodConeDensity_continuousOn {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun p : (ℝ × Vec) × Vec => goodConeDensity s p.1 p.2) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := by + have hE : ContinuousOn (fun p : (ℝ × Vec) × Vec => s.E p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + hs.2.1.continuousOn.comp continuous_fst.continuousOn (by + intro p hp; exact hp.1.1.1) + have hB : ContinuousOn (fun p : (ℝ × Vec) × Vec => s.B p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + hs.2.2.1.continuousOn.comp continuous_fst.continuousOn (by + intro p hp; exact hp.1.1.1) + have hF : ContinuousOn (fun p : (ℝ × Vec) × Vec => particleFlux s p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + (classical_particle_flux_continuous_slab hs hT).comp + continuous_fst.continuousOn (fun _ h => h.1) + have hP : ContinuousOn (fun p : (ℝ × Vec) × Vec => particleEnergy s p.1) + ((Icc 0 T ×ˢ (univ : Set Vec)) ×ˢ univ) := + (classical_particle_energy_continuous_slab hs hT).comp + continuous_fst.continuousOn (fun _ h => h.1) + have hc := (contDiff_cross (k := 1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hB) + simp only [goodConeDensity,dot_eq_inner] + exact (((hE.add hc).norm.add (continuous_snd.continuousOn.inner hB).abs).pow 2).add + (hP.sub (continuous_snd.continuousOn.inner hF)) + +lemma goodConeDensity_cone_continuous {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + ContinuousOn (fun p : ℝ × Sphere => + (T-p.1)^2 * goodConeDensity s (p.1,x₀-(T-p.1) • p.2.1) p.2.1) (Icc 0 T ×ˢ univ) := by + have hn : Continuous (fun p : ℝ × Sphere => p.2.1) := continuous_subtype_val.comp continuous_snd + have hx : Continuous (fun p : ℝ × Sphere => x₀-(T-p.1) • p.2.1) := + continuous_const.sub ((continuous_const.sub continuous_fst).smul hn) + have hmap : Continuous (fun p : ℝ × Sphere => ((p.1,x₀-(T-p.1) • p.2.1),p.2.1)) := + (continuous_fst.prodMk hx).prodMk hn + have hg : ContinuousOn (fun p : ℝ × Sphere => + goodConeDensity s (p.1,x₀-(T-p.1) • p.2.1) p.2.1) (Icc 0 T ×ˢ univ) := by + apply (goodConeDensity_continuousOn hs hT).comp hmap.continuousOn + intro p hp + exact ⟨⟨hp.1,mem_univ _⟩,mem_univ _⟩ + have hw : Continuous (fun p : ℝ × Sphere => (T-p.1)^2) := + (continuous_const.sub continuous_fst).pow 2 + convert! hw.continuousOn.mul hg using 1 + +lemma nullConeFlux_sphere_continuous {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (T : ℝ) (x₀ : Vec) : + Continuous (fun n : Sphere => nullConeFlux s T x₀ t n) := by + have hc : Continuous (fun n : Sphere => radialConeProfile s t (T-t) x₀ (T-t) n) := + (continuous_radialConeProfile hs ht (T-t) x₀).comp + (continuous_const.prodMk continuous_id) + convert! hc.comp continuous_neg using 1 + funext n + simp only [Function.comp_apply,nullConeFlux,radialConeProfile,coe_neg_sphere,smul_neg, + ← sub_eq_add_neg,dot_eq_inner,inner_neg_left] + ring + +lemma goodConeDensity_sphere_integral_bound {d : Datum} {s : Solution} (hs : Classical d s) + {T t : ℝ} (ht : t ∈ Icc 0 T) (x₀ : Vec) : + (∫ n : Sphere, (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure) ≤ + 4*(∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) := by + rw [← integral_const_mul] + apply integral_mono + · have hc := (goodConeDensity_cone_continuous hs (ht.1.trans ht.2) x₀).comp_continuous + (continuous_const.prodMk continuous_id) (fun n => ⟨ht,mem_univ n⟩) + exact integrableOn_univ.mp (hc.continuousOn.integrableOn_compact isCompact_univ) + · exact integrableOn_univ.mp (((nullConeFlux_sphere_continuous hs ht.1 T x₀).const_mul 4).continuousOn.integrableOn_compact isCompact_univ) + · intro n + have hn := (goodConeDensity_bounds hs ht.1 (x₀-(T-t) • n.1) (sphere_norm n)).2 + dsimp [nullConeFlux] + nlinarith [mul_le_mul_of_nonneg_left hn (sq_nonneg (T-t))] + +lemma goodConeDensity_time_integral_bound {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + (∫ t in 0..T, ∫ n : Sphere, + (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure) ≤ + 4*(∫ x : Vec, totalEnergy s (0,x)) := by + let F : ℝ → ℝ := fun t => ∫ n : Sphere, + (T-t)^2 * goodConeDensity s (t,x₀-(T-t) • n.1) n.1 ∂sphereMeasure + have hFi : ContinuousOn F (Icc 0 T) := by + apply continuousOn_integral_of_compact_support (k := univ) isCompact_univ + (goodConeDensity_cone_continuous hs hT x₀) + intro t n _ hn + exact (hn (mem_univ n)).elim + have hNi := (classical_null_cone_flux hs hT x₀).1 + have hFint : IntegrableOn F (Ioo 0 T) := + (hFi.integrableOn_compact isCompact_Icc).mono_set Ioo_subset_Icc_self + have hle : (∫ t in Ioo 0 T, F t) ≤ + ∫ t in Ioo 0 T, 4*(∫ n : Sphere, nullConeFlux s T x₀ t n ∂sphereMeasure) := by + apply integral_mono_ae hFint (hNi.const_mul 4) + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + exact goodConeDensity_sphere_integral_bound hs ⟨ht.1.le,ht.2.le⟩ x₀ + rw [integral_const_mul] at hle + simp only [restrict_Ioo_eq_restrict_Ioc, + ← intervalIntegral.integral_of_le hT] at hle + have hbound := (classical_null_cone_flux hs hT x₀).2 + exact le_trans hle (by linarith) + +theorem classical_good_cone_energy {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + (∫ t in 0..T, ∫ n : Sphere, (T-t)^2 * + ((‖s.E (t,x₀-(T-t) • n.1)+cross n.1 (s.B (t,x₀-(T-t) • n.1))‖+ + |dot n.1 (s.B (t,x₀-(T-t) • n.1))|)^2 + + ∫ v : Vec, q v*(1-dot n.1 (velocity v))*s.f (t,x₀-(T-t) • n.1,v)) + ∂sphereMeasure) ≤ 4*(∫ x : Vec, totalEnergy s (0,x)) := by + convert! goodConeDensity_time_integral_bound hs hT x₀ using 1 + apply intervalIntegral.integral_congr + intro t ht + rw [uIcc_of_le hT] at ht + apply integral_congr_ae + apply ae_of_all + intro n + dsimp only + rw [classical_particle_cone_identity hs ht.1] + rfl + +def velocityProjection (u b : Vec) : Vec := b - dot u b • u + +def goodField (E B n : Vec) : ℝ := ‖E+cross n B‖+|dot n B| + +lemma velocityProjection_add (u b c : Vec) : + velocityProjection u (b+c) = velocityProjection u b + velocityProjection u c := by + simp only [velocityProjection,dot_add_right,add_smul] + module + +lemma velocityProjection_norm (u b : Vec) (hu : ‖u‖ ≤ 1) : + ‖velocityProjection u b‖ ≤ ‖b‖ := by + have hsq : ‖u‖^2 ≤ 1 := by nlinarith [norm_nonneg u] + have he : ‖velocityProjection u b‖^2 = + ‖b‖^2 - 2*(dot u b)^2+(dot u b)^2*‖u‖^2 := by + rw [velocityProjection,norm_sub_sq_real,norm_smul,Real.norm_eq_abs, + mul_pow,sq_abs,inner_smul_right,← dot_eq_inner,dot_comm b u] + ring + have hh := mul_le_mul_of_nonneg_left hsq (sq_nonneg (dot u b)) + nlinarith [norm_nonneg (velocityProjection u b), norm_nonneg b] + +lemma velocityProjection_dot_symm (u b n : Vec) : + dot n (velocityProjection u b) = dot (velocityProjection u n) b := by + simp only [velocityProjection,dot_sub_right,dot_sub_left,dot_smul_left,dot_smul_right] + rw [dot_comm n u] + ring + +lemma norm_velocityProjection_normal (u n : Vec) (hu : ‖u‖ ≤ 1) (hn : ‖n‖=1) : + ‖velocityProjection u n‖ ≤ Real.sqrt (2*(1-dot n u)) := by + have hs : ‖u‖^2 ≤ 1 := by nlinarith [norm_nonneg u] + have hdot := dot_le_norm n u + rw [hn,one_mul] at hdot + have hd : 0 ≤ 2*(1-dot n u) := by linarith + have he : ‖velocityProjection u n‖^2 = + 1-2*(dot n u)^2+(dot n u)^2*‖u‖^2 := by + rw [velocityProjection,norm_sub_sq_real,norm_smul,Real.norm_eq_abs, + mul_pow,sq_abs,inner_smul_right,← dot_eq_inner,dot_comm u n,hn] + ring + have hh := mul_le_mul_of_nonneg_left hs (sq_nonneg (dot n u)) + have hsq := Real.sq_sqrt hd + nlinarith [Real.sqrt_nonneg (2*(1-dot n u)),sq_nonneg (1-dot n u)] + +lemma cross_sub_left (a b c : Vec) : cross (a-b) c = cross a c-cross b c := by + ext i + fin_cases i <;> simp [cross] <;> ring + +lemma cross_sub_right (a b c : Vec) : cross a (b-c) = cross a b-cross a c := by + ext i + fin_cases i <;> simp [cross] <;> ring + +lemma cross_self (a : Vec) : cross a a=0 := by + ext i + fin_cases i <;> simp [cross] <;> ring + +lemma cross_normal_decomposition (u n B : Vec) : + dot n n • cross u B = dot n u • cross n B + + dot n (cross u B) • n + dot n B • cross u n := by + ext i + fin_cases i <;> simp [cross,dot,Fin.sum_univ_succ] <;> ring + +lemma magnetic_projection_identity (u n B : Vec) (hn : ‖n‖=1) : + velocityProjection u (cross (u-n) B) = + -(1-dot n u) • cross n B - dot n (cross (u-n) B) • (u-n) + + dot n B • cross u n := by + have hn' : dot n n=1 := by rw [dot_self,hn]; norm_num + have hd := cross_normal_decomposition u n B + rw [hn',one_smul] at hd + have hc : dot u (cross (u-n) B) = dot n (cross (u-n) B) := by + have hh := dot_cross_self_left (u-n) B + rw [dot_sub_left] at hh + linarith + unfold velocityProjection + rw [hc,cross_sub_left] + have he : dot n (cross u B-cross n B) = dot n (cross u B) := by + rw [dot_sub_right,dot_cross_self_left,sub_zero] + rw [he] + ext i + have hi := congrArg (fun w : Vec => w i) hd + simp only [PiLp.sub_apply,PiLp.add_apply,PiLp.smul_apply,smul_eq_mul] at hi ⊢ + linear_combination hi + +lemma magnetic_projection_normal_identity (u n B : Vec) : + dot n (velocityProjection u (cross (u-n) B)) = + (1-dot n u)*dot n (cross (u-n) B) := by + have hc : dot u (cross (u-n) B) = dot n (cross (u-n) B) := by + have hh := dot_cross_self_left (u-n) B + rw [dot_sub_left] at hh + linarith + simp only [velocityProjection,dot_sub_right,dot_smul_right,hc] + ring + +lemma abs_dot_le (a b : Vec) : |dot a b| ≤ ‖a‖*‖b‖ := by + rw [dot_eq_inner] + exact abs_real_inner_le_norm a b + +lemma velocity_normal_distance_bound (v n : Vec) (hn : ‖n‖=1) : + ‖velocity v-n‖ ≤ Real.sqrt (2*(1-dot n (velocity v))) := by + have hi := cone_angle_identity v n hn + rw [norm_sub_rev] at hi + have hd := (cone_denom_pos v n hn).le + have hh := Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ) ≤ 2) hd) + nlinarith [sq_nonneg ((q v)⁻¹), Real.sqrt_nonneg (2*(1-dot n (velocity v))), + norm_nonneg (velocity v-n)] + +lemma source_energy_rate_bound (v E B n : Vec) (hn : ‖n‖=1) : + |dot (velocity v) E| ≤ goodField E B n + + Real.sqrt (2*(1-dot n (velocity v)))*‖B‖ := by + let u := velocity v + have he : dot u E = dot u (E+cross n B)-dot (u-n) (cross n B) := by + rw [dot_add_right,dot_sub_left,dot_cross_self_left] + ring + have hh := (abs_sub _ _).trans (add_le_add (abs_dot_le u (E+cross n B)) + (abs_dot_le (u-n) (cross n B))) + rw [← he] at hh + have hu : ‖u‖ ≤ 1 := (norm_velocity_lt_one v).le + have hcross : ‖cross n B‖ ≤ ‖B‖ := by simpa only [hn,one_mul] using norm_cross_le n B + have hb := mul_le_mul (velocity_normal_distance_bound v n hn) hcross + (norm_nonneg _) (Real.sqrt_nonneg _) + have hg := mul_le_mul_of_nonneg_right hu (norm_nonneg (E+cross n B)) + dsimp [goodField] + dsimp only [u] at hh hg + linarith [abs_nonneg (dot n B)] + +lemma magnetic_projection_bound (v n B : Vec) (hn : ‖n‖=1) : + ‖velocityProjection (velocity v) (cross (velocity v-n) B)‖ ≤ + 3*(1-dot n (velocity v))*‖B‖+|dot n B| := by + let u := velocity v + let d := 1-dot n u + let θ := Real.sqrt (2*d) + have hd : 0 ≤ d := (cone_denom_pos v n hn).le + have ht : 0 ≤ θ := Real.sqrt_nonneg _ + have ht2 : θ^2=2*d := Real.sq_sqrt (by positivity) + have hk : ‖u-n‖ ≤ θ := velocity_normal_distance_bound v n hn + have hb : ‖cross n B‖ ≤ ‖B‖ := by simpa only [hn,one_mul] using norm_cross_le n B + have hcn : ‖cross u n‖ ≤ 1 := by + have hh := norm_cross_le u n + rw [hn,mul_one] at hh + exact hh.trans (norm_velocity_lt_one v).le + have hc : |dot n (cross (u-n) B)| ≤ θ*‖B‖ := by + have hh := abs_dot_le n (cross (u-n) B) + rw [hn,one_mul] at hh + exact hh.trans ((norm_cross_le (u-n) B).trans + (mul_le_mul_of_nonneg_right hk (norm_nonneg B))) + have hmul := mul_le_mul hc hk (norm_nonneg _) (mul_nonneg ht (norm_nonneg B)) + have hmul' : |dot n (cross (u-n) B)| *‖u-n‖ ≤ 2*d*‖B‖ := by + calc + _ ≤ θ*‖B‖*θ := hmul + _ = θ^2*‖B‖ := by ring + _ = 2*d*‖B‖ := by rw [ht2] + have htri := norm_add_le (-(1-dot n u) • cross n B - + dot n (cross (u-n) B) • (u-n)) (dot n B • cross u n) + rw [magnetic_projection_identity _ _ _ hn] + have hsub := norm_sub_le (-(1-dot n u) • cross n B) + (dot n (cross (u-n) B) • (u-n)) + simp only [norm_smul,Real.norm_eq_abs,abs_neg] at htri hsub + rw [abs_of_nonneg hd] at hsub + have hh₁ := mul_le_mul_of_nonneg_left hb hd + have hh₂ := mul_le_mul_of_nonneg_left hcn (abs_nonneg (dot n B)) + dsimp only [u,d] at * + linarith + +lemma lorentz_source_acceleration_bound (v E B n : Vec) (hn : ‖n‖=1) : + ‖fderiv ℝ velocity v (E+cross (velocity v) B)‖ ≤ + (q v)⁻¹*(goodField E B n+3*(1-dot n (velocity v))*‖B‖) := by + rw [fderiv_velocity_apply,norm_smul,Real.norm_eq_abs, + abs_of_pos (inv_pos.mpr (q_pos v))] + apply mul_le_mul_of_nonneg_left _ (inv_nonneg.mpr (q_pos v).le) + have he : E+cross (velocity v) B = + (E+cross n B)+cross (velocity v-n) B := by + rw [cross_sub_left] + module + change ‖velocityProjection (velocity v) (E+cross (velocity v) B)‖ ≤ _ + rw [he,velocityProjection_add] + have ht := norm_add_le (velocityProjection (velocity v) (E+cross n B)) + (velocityProjection (velocity v) (cross (velocity v-n) B)) + have hg := velocityProjection_norm (velocity v) (E+cross n B) (norm_velocity_lt_one v).le + have hb := magnetic_projection_bound v n B hn + dsimp only [goodField] + linarith + +lemma lorentz_source_normal_acceleration_bound (v E B n : Vec) (hn : ‖n‖=1) : + |dot n (fderiv ℝ velocity v (E+cross (velocity v) B))| ≤ + (q v)⁻¹*Real.sqrt (2*(1-dot n (velocity v)))* + (goodField E B n+(1-dot n (velocity v))*‖B‖) := by + let u := velocity v + let d := 1-dot n u + let θ := Real.sqrt (2*d) + have hd : 0 ≤ d := (cone_denom_pos v n hn).le + have ht : 0 ≤ θ := Real.sqrt_nonneg _ + have he : E+cross u B = (E+cross n B)+cross (u-n) B := by + rw [cross_sub_left] + module + have hg : |dot n (velocityProjection u (E+cross n B))| ≤ θ*‖E+cross n B‖ := by + rw [velocityProjection_dot_symm] + exact (abs_dot_le _ _).trans (mul_le_mul_of_nonneg_right + (norm_velocityProjection_normal u n (norm_velocity_lt_one v).le hn) (norm_nonneg _)) + have hb : |dot n (velocityProjection u (cross (u-n) B))| ≤ d*θ*‖B‖ := by + rw [magnetic_projection_normal_identity,abs_mul,abs_of_nonneg hd] + have hc : |dot n (cross (u-n) B)| ≤ θ*‖B‖ := by + have hh := abs_dot_le n (cross (u-n) B) + rw [hn,one_mul] at hh + exact hh.trans ((norm_cross_le _ _).trans (mul_le_mul_of_nonneg_right + (velocity_normal_distance_bound v n hn) (norm_nonneg _))) + nlinarith [mul_le_mul_of_nonneg_left hc hd] + have hsum : |dot n (velocityProjection u (E+cross u B))| ≤ + θ*(goodField E B n+d*‖B‖) := by + rw [he,velocityProjection_add,dot_add_right] + have hh := abs_add_le (dot n (velocityProjection u (E+cross n B))) + (dot n (velocityProjection u (cross (u-n) B))) + dsimp only [goodField] + nlinarith [mul_nonneg ht (abs_nonneg (dot n B))] + rw [fderiv_velocity_apply,dot_smul_right,abs_mul, + abs_of_pos (inv_pos.mpr (q_pos v))] + have h := mul_le_mul_of_nonneg_left hsum (inv_nonneg.mpr (q_pos v).le) + convert! h using 1; ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/PartitionOccupation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/PartitionOccupation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e2c4fb565d7359a4bd416926aeb0f4cbe66019d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/PartitionOccupation.lean @@ -0,0 +1,917 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.DirectionOverlap +import OAI.Analysis.VlasovMaxwell.Population.DirectionCounts + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma pureOccupation_crude_scalar {I h H p : ℝ} + (hI : 0≤I) (hh : 0≤h) (hH : 1≤H) (hp : 0 + simp only [mul_min_of_nonneg _ _ hK,ENNReal.ofReal_min,min_mul] + · exact le_min (le_min h₀ (h₁ ha)) (le_min h₀ (h₂ hi)) + · exact le_min (le_min h₀ (h₁ ha)) h₀ + · exact le_min h₀ (le_min h₀ (h₂ hi)) + · exact le_min h₀ h₀ + +namespace WeightedDirectionPartition +variable {V K : ℝ→Vec} {a b w δ : ℝ} + +lemma halfopen_disjoint (D : WeightedDirectionPartition V K a b w δ) + (i j : Fin D.count) (hne : i≠j) : + Disjoint (Ico (D.time i) (D.time (i+1))) (Ico (D.time j) (D.time (j+1))) := by + apply Ico_disjoint_Ico.mpr + have hn : (i:ℕ)≠j := fun h=>hne (Fin.ext h) + rcases lt_or_gt_of_ne hn with hij|hji + · exact (min_le_left _ _).trans ((D.strict.monotoneOn (a := (i:ℕ)+1) (b := (j:ℕ)) (by simp only [mem_Iic]; omega) + (by simp only [mem_Iic]; omega) (by omega)).trans (le_max_right _ _)) + · exact (min_le_right _ _).trans ((D.strict.monotoneOn (a := (j:ℕ)+1) (b := (i:ℕ)) (by simp only [mem_Iic]; omega) + (by simp only [mem_Iic]; omega) (by omega)).trans (le_max_left _ _)) + +lemma halfopen_cover (D : WeightedDirectionPartition V K a b w δ) {t : ℝ} + (ht : t∈Ico a b) : ∃i : Fin D.count,t∈Ico (D.time i) (D.time (i+1)) := by + have ht' : t∈Ico (D.time 0) (D.time D.count) := by rwa [D.initial,D.terminal] + obtain ⟨i,hi,hit⟩ := mem_iUnion₂.mp (Ico_subset_biUnion_Ico D.count D.time ht') + exact ⟨⟨i,Finset.mem_range.mp hi⟩,hit⟩ + +lemma cell_direction_oscillation (D : WeightedDirectionPartition V K a b w δ) + (i : Fin D.count) {s t : ℝ} + (hs : s∈Icc (D.time i) (D.time (i+1))) (ht : t∈Icc (D.time i) (D.time (i+1))) : + ‖momentumDirection (V t)-momentumDirection (V s)‖≤2*δ := by + calc + _≤‖momentumDirection (V t)-momentumDirection (V (D.time i))‖+ + ‖momentumDirection (V (D.time i))-momentumDirection (V s)‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _≤δ+δ := add_le_add (D.direction_control i i.isLt t ht) + (by rw [norm_sub_rev]; exact D.direction_control i i.isLt s hs) + _=_ := by ring + +end WeightedDirectionPartition + +lemma Admissible.exists_bounded_direction_partition {d : Datum} (hd : Admissible d) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∃ D : WeightedDirectionPartition (fun t=>(F.flow zX t).2) + (fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) a b ((2:ℝ)^k) δ, + (D.count:ℝ)≤C*(Real.log (2+P))^6/δ := by + obtain ⟨C,hC,hcount⟩ := hd.direction_count_bound T₀ M A hM hA.le + refine ⟨C,hC,?_⟩ + filter_upwards [hcount,eventually_direction_absorption 0] with P hcount hP + intro s T F hs hT hTT zX a b δ k hz ha hb hab hlen hw hwP hδ hδ1 hsource hq HZ + have hm := hP.2.2 ((2:ℝ)^k) δ hw hδ + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hV := (F.continuousOn_time zX).snd.mono hJ + have hK : ContinuousOn (fun t=>s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) (Icc a b) := by + apply ((F.continuous_prefixMomentumForce hs.energyPrefix hT zX).continuousOn).congr + intro t ht + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq (hJ ht),lorentzField,lorentzPhase] + have hder (t : ℝ) (ht : t∈Ioo a b) : + HasDerivAt (fun t=>(F.flow zX t).2) + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) t := by + have hti : t∈Ioo (0:ℝ) T := ⟨ha.trans_lt ht.1,ht.2.trans_le hb⟩ + exact ((F.ode zX t (Ioo_subset_Icc_self hti)).hasDerivAt (Icc_mem_nhds hti.1 hti.2)).snd + obtain ⟨D⟩ := (HZ zX hz).weighted_direction_partition k hm.2.1 hab hJ hV hK hder hq + hM hA (zero_lt_one.trans_le hP.1) (zero_lt_one.trans_le hP.2.1) + ((Real.rpow_pos_of_pos (by positivity) (-3/5)).trans_le hδ) + refine ⟨D,?_⟩ + exact hcount s T F hs hT hTT zX (tsupport d.f₀) a b ((2:ℝ)^k) δ hz hd.2.1 subset_rfl ha hb hab hlen hw hwP hδ hδ1 + hsource hq (fun t ht=>norm_momentum_of_high_band hm.2.1 (hq t ht).1) (HZ zX hz) HZ D + +lemma PhaseFlowOn.momentum_le_on_initial_tsupport {d : Datum} {s : Solution} {T P : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (hP : ∀ z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤P) + {z : Phase} (hz : z∈tsupport d.f₀) {r : ℝ} (hr : r∈Icc 0 T) : + q (F.flow z r).2≤P := by + have hc : Continuous (fun z=>q (prefixFlow F.flow T z r).2) := + (contDiff_q (k:=1)).continuous.comp + (((F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_const.prodMk continuous_id)).snd) + have hsub : Function.support d.f₀⊆{z | q (prefixFlow F.flow T z r).2≤P} := by + intro z hz + simpa only [mem_ofPred_eq,prefixFlow,prefixClamp_eq hr] using hP z (by simpa only [hs.initial_f,Function.mem_support] using hz) r hr + have hh := closure_minimal hsub (isClosed_le hc continuous_const) hz + simpa only [mem_ofPred_eq,prefixFlow,prefixClamp_eq hr] using hh + +lemma momentum_ne_zero_of_band {v : Vec} {w : ℝ} (hw : 16≤w) (hq : w/8≤q v) : v≠0 := by + intro he + have hh := norm_momentum_of_high_band hw hq + rw [he,norm_zero] at hh + linarith + +lemma inv_q_sq_le_of_lower {v : Vec} {m : ℝ} (hm : 0 < m) (h : m ≤ q v) : + (q v)⁻¹ ^ 2 ≤ m⁻¹ ^ 2 := by + gcongr + exact inv_nonneg.mpr (q_pos v).le + +lemma PhaseFlowOn.direction_partition_closed_duration {s : Solution} {T c d e w p δ ε φ : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX zY : Phase) (B : ClosedConeBin) + (DY : WeightedDirectionPartition (fun t=>(F.flow zY t).2) + (fun t=>s.E (t,(F.flow zY t).1)+cross (velocity (F.flow zY t).2) (s.B (t,(F.flow zY t).1))) c d p δ) + (DX : WeightedDirectionPartition (fun t=>(F.flow zX t).2) + (fun t=>s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))) c e w δ) + (hc : 0≤c) (hdT : d≤T) (heT : e≤T) (hde : d≤e) + (hsnz : ∀t∈Icc c d,(F.flow zY t).2≠0) + (hrnz : ∀t∈Icc c e,(F.flow zX t).2≠0) + (hsq : ∀t∈Icc c d,(q (F.flow zY t).2)⁻¹^2≤ε) + (hrq : ∀t∈Icc c e,(q (F.flow zX t).2)⁻¹^2≤ε) + {H : Set ℝ} (hH : H⊆Icc c d) + (hbin : ∀r∈H,∃t,InClosedConeBin F.flow zX B t r zY) + (hr : 0if h:r∈H then arrival r h else 0 + have hsubY (i : Fin DY.count) : Ico (DY.time i) (DY.time (i+1))⊆Icc c d := + Ico_subset_Icc_self.trans (DY.cell_subset i.isLt) + have hsubX (i : Fin DX.count) : Ico (DX.time i) (DX.time (i+1))⊆Icc c e := + Ico_subset_Icc_self.trans (DX.cell_subset i.isLt) + have hb := F.direction_total_hit_duration zX zY B + (fun i : Fin DY.count=>DY.time i) (fun i=>DY.time (i+1)) + (fun i : Fin DX.count=>DX.time i) (fun i=>DX.time (i+1)) + DY.halfopen_disjoint DX.halfopen_disjoint + (fun i=>(hsubY i).trans (Icc_subset_Icc hc hdT)) + (fun i=>(hsubX i).trans (Icc_subset_Icc hc heT)) + (fun i t ht=>hsnz t (hsubY i ht)) (fun i t ht=>hrnz t (hsubX i ht)) + (fun i t ht=>hsq t (hsubY i ht)) (fun i t ht=>hrq t (hsubX i ht)) + (fun i a ha b hb=>DY.cell_direction_oscillation i (Ico_subset_Icc_self hb) (Ico_subset_Icc_self ha)) + (fun i a ha b hb=>DX.cell_direction_oscillation i (Ico_subset_Icc_self hb) (Ico_subset_Icc_self ha)) + (H:=H\{d}) ar + (fun r hr=>DY.halfopen_cover ⟨(hH hr.1).1,lt_of_le_of_ne (hH hr.1).2 (by simpa using hr.2)⟩) + (fun r hr=>DX.halfopen_cover ⟨(hH hr.1).1,(lt_of_le_of_ne (hH hr.1).2 (by simpa using hr.2)).trans_le hde⟩) + (fun r hr=>by simpa only [ar,dite_eq_left hr.1] using harr r hr.1) + hr hrmax hφ hd hDlo hDhi hw hsmall + rw [measure_sdiff_null (measure_singleton d)] at hb + simpa only [Fintype.card_fin,ENNReal.ofReal_mul (by positivity : 0≤(DY.count:ℝ)+DX.count), + ENNReal.ofReal_add (by positivity : 0≤(DY.count:ℝ)) (by positivity : 0≤(DX.count:ℝ)), + ENNReal.ofReal_natCast] using hb + +lemma Admissible.exists_stable_direction_partition {d : Datum} (hd : Admissible d) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∃ k : ℕ, ∃ D : WeightedDirectionPartition (fun t=>(F.flow z t).2) + (fun t=>s.E (t,(F.flow z t).1)+cross (velocity (F.flow z t).2) (s.B (t,(F.flow z t).1))) a b ((2:ℝ)^k) δ, + (D.count:ℝ)≤C*(Real.log (2+P))^6/δ ∧ 16≤(2:ℝ)^k ∧ + (∀t∈Icc a b,m/2≤q (F.flow z t).2 ∧ (F.flow z t).2≠0) := by + obtain ⟨C,hC,hcount⟩ := hd.exists_bounded_direction_partition T₀ M A hM hA + refine ⟨C,hC,?_⟩ + filter_upwards [hcount,eventually_direction_absorption 0] with P hcount hlarge + intro s T F hs hT hTT z a b r m δ hz ha hb hr hm hmq hlen hlen' hhigh hδ hδ1 hsource HZ + have hp : 0

nlinarith [pow_pos (show (0:ℝ)<2 by norm_num) k] + have hm16 := (hlarge.2.2 ((2:ℝ)^k) δ (hhigh.trans hmk) hkδ).2.1 + obtain ⟨D,hD⟩ := hcount s T F hs hT hTT z a b δ k hz ha hb (hr.1.trans hr.2) + (hlen'.trans (by gcongr)) (hhigh.trans hmk) hkP hkδ hδ1 hsource hband HZ + refine ⟨k,D,hD,hm16,?_⟩ + intro t ht + exact ⟨by linarith [(hstable t ht).2.2.1],momentum_ne_zero_of_band hm16 (hband t ht).1⟩ + +lemma Admissible.direction_stable_closed_cell_bound {d₀ : Datum} (hd₀ : Admissible d₀) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ENNReal.ofReal (B.qmin/2)*labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B (tsupport d₀.f₀) a b c d)≤ + ENNReal.ofReal (C*B.rmax*(Real.log (2+P))^6/δ)*ENNReal.ofReal (datumEnergyNumber d₀) := by + obtain ⟨C,hC,hpart⟩ := hd₀.exists_stable_direction_partition T₀ M A hM hA + refine ⟨162*C,by positivity,?_⟩ + filter_upwards [hpart,eventually_direction_absorption 0] with P hpart hlarge + intro s T F hs hT hTT zX B a b c d e m δ φ hzX hc hcd hde he hJ hm hmq hmw hstable hlen hhigh hδ hδ1 + hr hrmax hφ hd hDlo hDhi hw hsmall hsource HZ + have hp : 0

(hqY r hr).2) (fun r hr=>(hqX r hr).2) + (fun r hr=>inv_q_sq_le_of_lower (half_pos hm) (hqY r hr).1) + (fun r hr=>inv_q_sq_le_of_lower (half_pos hm) (hqX r hr).1) + (H:=closedBinHits F.flow zX B (tsupport d₀.f₀) a b c d z) + (fun _ hh=>hh.2.1) (fun r hh=>by obtain ⟨_,_,t,_,ht⟩:=hh; exact ⟨t,ht⟩) + hr hrmax hφ hd hDlo hDhi hw hsmall + refine hbound.trans (ENNReal.ofReal_le_ofReal ?_) + calc + _≤(C*(Real.log (2+P))^6/δ+C*(Real.log (2+P))^6/δ)*(81*B.rmax) := + mul_le_mul_of_nonneg_right (add_le_add hDY hDX) (by positivity) + _=_ := by ring + · have hh := (HZ z hzS).velocity_stability_scale hc (hde.trans he) hrC + ((F.continuousOn_time z).snd.mono hCtime) hM hA.le hp hL hm + (by norm_num : (0:ℝ)<1) le_rfl (by norm_num : (128:ℝ)≤128) hqm + (by simpa only [div_one] using ((by linarith : d-c≤e-c).trans hstable)) c (left_mem_Icc.mpr hcd) + linarith [hh.2.2.1,hbin.2.2.1.1] + rw [←hs.initial_energy_eq] + apply F.label_occupation_cell_bound hs.energyPrefix (hCtime (left_mem_Icc.mpr hcd)) + · intro z + by_cases hz : (closedBinHits F.flow zX B (tsupport d₀.f₀) a b c d z).Nonempty + · exact (hdata z hz).1 + · simp only [not_nonempty_iff_eq_empty.mp hz,measure_empty,zero_le] + · exact fun z hz=>(hdata z hz).2 + +lemma Admissible.direction_closed_bin_grid {d₀ : Datum} (hd₀ : Admissible d₀) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ENNReal.ofReal (B.qmin/2)*labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B (tsupport d₀.f₀) a b 0 T)≤ + ENNReal.ofReal (C*B.rmax*(Real.log (2+P))^6/δ)* + ENNReal.ofReal ((2+(b-a+B.rmax)/len)*datumEnergyNumber d₀) := by + obtain ⟨C,hC,hcell⟩ := hd₀.direction_stable_closed_cell_bound T₀ M A hM hA + refine ⟨C,hC,?_⟩ + filter_upwards [hcell] with P hcell + intro s T F hs hT hTT zX B a b m δ φ len hzX ha hb hab hlen hm hmq hmw hstable hlen' hhigh hδ hδ1 + hr hrmax hrad hφ hd hDlo hDhi hw hsmall hsource HZ + classical + let l := sourceCellLo len + let u := sourceCellHi T len + let e := fun i=>min T (u i+B.rmax) + let N := selectedSourceCells T len a b B.rmax + let D := C*B.rmax*(Real.log (2+P))^6/δ + let O := fun i=>labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B (tsupport d₀.f₀) a b (l i) (u i)) + have hgrid (i : ℕ) (hi : i∈N) : + 0≤l i ∧ l i≤u i ∧ u i≤T ∧ u i-l i≤len := + selectedSourceCells_subset_prefix hT hlen hi + have hJC (i : ℕ) : Icc (max a (l i)) (min b (u i+B.rmax))⊆Icc (l i) (e i) := by + intro t ht + exact ⟨(le_max_right _ _).trans ht.1, + le_min ((ht.2.trans (min_le_left _ _)).trans hb) (ht.2.trans (min_le_right _ _))⟩ + have hue (i : ℕ) (hi : i∈N) : u i≤e i := + le_min (hgrid i hi).2.2.1 (by linarith) + have hST (i : ℕ) (hi : i∈N) : e i-l i≤2*len := by + have hg := (hgrid i hi).2.2.2 + have hw' : e i≤u i+B.rmax := min_le_right _ _ + linarith + have hsum : labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B (tsupport d₀.f₀) a b 0 T)≤∑i∈N,O i := by + rw [closedBinHits_clip_source] + apply F.closedBinHits_occupation_le_sum hs.energyPrefix hT zX B hd₀.2.1 N l u (Icc_subset_Icc ha hb) + · intro i hi + exact Icc_subset_Icc (hgrid i hi).1 (hgrid i hi).2.2.1 + · exact selectedSourceCells_cover hlen + have hpay (i : ℕ) (hi : i∈N) : ENNReal.ofReal (B.qmin/2)*O i≤ + ENNReal.ofReal D*ENNReal.ofReal (datumEnergyNumber d₀) := by + dsimp only [O] + rw [closedBinHits_clip_receiver] + exact hcell s T F hs hT hTT zX B (max a (l i)) (min b (u i+B.rmax)) (l i) (u i) (e i) + m δ φ hzX (hgrid i hi).1 (hgrid i hi).2.1 (hue i hi) (min_le_left _ _) (hJC i) + hm hmq hmw ((hST i hi).trans hstable) ((hST i hi).trans hlen') hhigh hδ hδ1 + hr hrmax hφ hd hDlo hDhi hw hsmall hsource HZ + have hcount : (N.card:ℝ≥0∞)≤ENNReal.ofReal (2+(b-a+B.rmax)/len) := by + rw [←ENNReal.ofReal_natCast] + exact ENNReal.ofReal_le_ofReal (selectedSourceCells_card hlen hab hrmax) + calc + _ ≤ ENNReal.ofReal (B.qmin/2)*(∑i∈N,O i) := mul_le_mul' le_rfl hsum + _ = ∑i∈N,ENNReal.ofReal (B.qmin/2)*O i := Finset.mul_sum _ _ _ + _ ≤ ∑i∈N,ENNReal.ofReal D*ENNReal.ofReal (datumEnergyNumber d₀) := Finset.sum_le_sum hpay + _ = (N.card:ℝ≥0∞)*(ENNReal.ofReal D*ENNReal.ofReal (datumEnergyNumber d₀)) := by simp + _ ≤ ENNReal.ofReal (2+(b-a+B.rmax)/len)*(ENNReal.ofReal D*ENNReal.ofReal (datumEnergyNumber d₀)) := + mul_le_mul' hcount le_rfl + _ = _ := by + rw [ENNReal.ofReal_mul (by positivity : 0≤2+(b-a+B.rmax)/len)] + dsimp only [D] + ac_rfl + +lemma Admissible.direction_closedEulerian_grid {d₀ : Datum} (hd₀ : Admissible d₀) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d₀.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (2*C*B.rmax/B.qmin*(Real.log (2+P))^6/δ*(2+(b-a+B.rmax)/len))* + ENNReal.ofReal (datumEnergyNumber d₀) := by + obtain ⟨C,hC,hgrid⟩ := hd₀.direction_closed_bin_grid T₀ M A hM hA + refine ⟨C,hC,?_⟩ + filter_upwards [hgrid] with P hgrid + intro s T F hs hT hTT zX B a b m δ φ len hzX ha hb hab hlen hm hmq hmw hstable hlen' hhigh hδ hδ1 + hr hrmax hrad hφ hd hDlo hDhi hw hsmall hsource HZ + have hq0 : 0s.f (0,z)) + (closedBinHits F.flow zX B (tsupport d₀.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) ≤ + labelOccupation (fun z=>s.f (0,z)) (closedBinHits F.flow zX B (tsupport d₀.f₀) a b 0 T) from ?_).trans ?_) + · unfold labelOccupation + apply lintegral_mono + intro z + apply mul_le_mul' le_rfl + apply measure_mono + rintro u ⟨hz,hu,t,ht,hbin⟩ + exact ⟨hz,⟨(le_max_left _ _).trans hu.1,hu.2.trans (min_le_left _ _)⟩,t,ht,hbin⟩ + · apply hbnd.trans_eq + rw [ENNReal.ofReal_mul (by positivity : 0≤2+(b-a+B.rmax)/len)] + rw [←ENNReal.ofReal_inv_of_pos (half_pos hq0)] + rw [←mul_assoc,←mul_assoc,←ENNReal.ofReal_mul (by positivity),←ENNReal.ofReal_mul (by positivity)] + congr 2 + field_simp + +lemma eventually_log_power_le_positive_rpow (k : ℕ) (ε D : ℝ) (hε : 0<ε) : + ∀ᶠ P : ℝ in atTop, D*(Real.log (2+P))^k≤P^ε := by + have ho := (isLittleO_log_rpow_rpow_atTop (k:ℝ) hε).const_mul_left (D*2^k) + filter_upwards [ho.bound (by norm_num : (0:ℝ)<1),eventually_ge_atTop (2:ℝ)] with P hp hP + have hp0 : 0

.trans_eq (mul_comm _ _) + have hrQ : r≤I₀*R := by + have hh : r/I₀≤R := (le_max_right _ _).trans (le_max_right _ _) + exact (div_le_iff₀ hI₀).mp hh |>.trans_eq (mul_comm _ _) + have hQ0 : 0.trans_eq (mul_comm _ _) + have hIr : I≤r*Q*R := hIR.trans (mul_le_mul_of_nonneg_right hI₀r (zero_le_one.trans hR)) + have hrR : r≤r*Q*R := by + exact (le_mul_of_one_le_right hr0.le hQ).trans (le_mul_of_one_le_right (by positivity) hR) + calc + (I+r)/q≤(2*r*Q*R)/q := div_le_div_of_nonneg_right (by linarith) hq.le + _≤(2*r*φ^(-29/25:ℝ)*R)/q := by gcongr + _=_ := by ring + +lemma Admissible.direction_closedEulerian_improved {d₀ : Datum} (hd₀ : Admissible d₀) + (T₀ M A : ℝ) (hM : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d₀.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (2*B.rmax/B.qmin*φ^(-29/25:ℝ)* + max 1 (max (I/(m/P)^2) (B.rmax/(m/P)^2)))*ENNReal.ofReal (datumEnergyNumber d₀) := by + obtain ⟨C,hC,hgrid⟩ := hd₀.direction_closedEulerian_grid T₀ M A hM hA + let Cq := directionGridConstant M A + have hCq : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let B := representativeClosedBin T w k + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d₀.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal ((1000000000*(max 1 T₀)^2)*pureOccupationEnvelope P 512 16384 M A + (sourceRepresentative (k 0)) w (cappedRepresentative (k 2)) (cappedRepresentative (k 3)) I)* + ENNReal.ofReal (datumEnergyNumber d₀) := by + filter_upwards [hd₀.direction_closedEulerian_improved T₀ M A hM hA,eventually_direction_window] + with P himproved hwindow + intro s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hsmall hsource HZ + dsimp only + let p := sourceRepresentative (k 0) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let H₀ := max 1 T₀ + let B := representativeClosedBin T w k + let E := ENNReal.ofReal (datumEnergyNumber d₀) + let O := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d₀.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) + have hp : 0

.mpr hsmall + change 8*(cappedRepresentative (k 1))^2≤φ^2/32 + nlinarith + have hcrude : O≤ENNReal.ofReal ((1000000000*H₀^2)*(max I h/p))*E := by + have ho := F.closedEulerian_crude_budget hs.energyPrefix hT zX B hd₀.2.1 + (Icc_subset_Icc ha hb) hJI hr.le hq + rw [hs.initial_energy_eq] at ho + apply ho.trans + apply mul_le_mul' _ le_rfl + rw [←ENNReal.ofReal_div_of_pos hq] + apply ENNReal.ofReal_le_ofReal + exact (pureOccupation_crude_scalar hI.le hh.le hH hp).trans + (mul_le_mul_of_nonneg_right hKH (by positivity)) + apply pureOccupation_of_three (by positivity : 0≤1000000000*H₀^2) hcrude + · intro hactual + let m := min p w/128 + let lam := stabilityLength P 16384 M A p w φ + let len := min I (lam/2) + have hm : 0 < m := div_pos (lt_min hp hw) (by norm_num) + have hlam : 0p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hv : Measurable (fun p : ConeCoordinate×Vec=>velocity p.2) := + (contDiff_velocity (k:=0)).continuous.measurable.comp measurable_snd + have ha : Measurable (fun p : ConeCoordinate×Vec=>velocity (V p.1.1)) := + (contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst.fst) + exact (measurableSet_Icc.preimage ((contDiff_q (k:=0)).continuous.measurable.comp measurable_snd)).inter + ((measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hv)))).inter + (measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (ha.prodMk hv))))) + +def physicalBinPhaseSet (V : ℝ→Vec) (B : ClosedConeBin) (J : Set ℝ) : Set TrianglePhase := + {p | p.1∈physicalBinBase V B J ∧ p.2∈coneBinMomentumSet B p.1.2.2.1 (velocity (V p.1.1))} + +lemma measurableSet_physicalBinPhaseSet {V : ℝ→Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) : + MeasurableSet (physicalBinPhaseSet V B J) := + ((measurableSet_physicalBinBase hV B hJ).preimage measurable_fst).inter + (measurableSet_coneMomentumFiber hV B) + +lemma physicalBinPhase_integral {V : ℝ→Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) + {g : TrianglePhase→ℝ≥0∞} (hg : Measurable g) : + (∫⁻p in physicalBinPhaseSet V B J,g p ∂trianglePhaseMeasure)= + ∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + g (z,v) ∂volume ∂physicalBinMeasure V B J := by + classical + rw [←lintegral_indicator (measurableSet_physicalBinPhaseSet hV B hJ)] + rw [trianglePhaseMeasure,lintegral_prod _ (hg.indicator (measurableSet_physicalBinPhaseSet hV B hJ)).aemeasurable] + rw [physicalBinMeasure,←lintegral_indicator (measurableSet_physicalBinBase hV B hJ)] + apply lintegral_congr + intro z + by_cases hz : z∈physicalBinBase V B J + · rw [indicator_of_mem hz,←lintegral_indicator (measurableSet_coneBinMomentumSet B _ _)] + apply lintegral_congr + intro v + by_cases hv : v∈coneBinMomentumSet B z.2.2.1 (velocity (V z.1)) + · rw [indicator_of_mem (show (z,v)∈physicalBinPhaseSet V B J from ⟨hz,hv⟩),indicator_of_mem hv] + · rw [indicator_of_notMem (show (z,v)∉physicalBinPhaseSet V B J from fun h=>hv h.2),indicator_of_notMem hv] + · rw [indicator_of_notMem hz] + apply lintegral_eq_zero_of_ae_eq_zero + exact ae_of_all _ (fun v=>indicator_of_notMem (show (z,v)∉physicalBinPhaseSet V B J from fun h=>hz h.1) _) + +lemma stateCutoff_derivative_physical_cover {T w t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (htT : t≤T) (hσ : σ∈Ico 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) {n : Sphere} {v : Vec} {N : ℕ} + (hP : 1024*q v≤(2:ℝ)^N) (Q : Set (Fin 4→ℕ)) (H : CutoffState) + (hd : fderiv ℝ (stateCutoff T Q) (t-σ,n.1,v,V t) H≠0) : + ∃k∈dyadicSelectionBoundary Q∩{k | k 0⟨Nat.le_add_right (j i) 2,Nat.le_add_right (j i) 2⟩⟩,⟨k,hk,fun i=>hnear i⟩⟩ + exact ⟨j,⟨hjb,physicalCutoff_positive_source_indices (sphere_norm n) hP hjp⟩, + physicalCutoff_positive_closedBin ht ⟨hσ.1,hσ.2.le⟩ hband hjp⟩ + +lemma physicalBinPhase_cover_lintegral {V : ℝ→Vec} (hV : Measurable V) + {J : Set ℝ} (hJ : MeasurableSet J) (T w : ℝ) (R : Set (Fin 4→ℕ)) + {g : TrianglePhase→ℝ≥0∞} (hg : Measurable g) + (hcover : ∀p,g p≠0→∃k∈R,p∈physicalBinPhaseSet V (representativeClosedBin T w k) J) : + (∫⁻p,g p ∂trianglePhaseMeasure)≤ + ∑'k : Fin 4→ℕ,R.indicator (fun k=> + ∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) + z.2.2.1 (velocity (V z.1)),g (z,v) ∂volume + ∂physicalBinMeasure V (representativeClosedBin T w k) J) k := by + classical + let f : (Fin 4→ℕ)→TrianglePhase→ℝ≥0∞ := fun k=> + if k∈R then (physicalBinPhaseSet V (representativeClosedBin T w k) J).indicator g else 0 + have hm (k : Fin 4→ℕ) : Measurable (f k) := by + dsimp only [f] + split_ifs + · exact hg.indicator (measurableSet_physicalBinPhaseSet hV _ hJ) + · exact measurable_const + calc + _ ≤ ∫⁻p,∑'k : Fin 4→ℕ,f k p ∂trianglePhaseMeasure := by + apply lintegral_mono + intro p + by_cases hp : g p=0 + · rw [hp]; exact bot_le + · obtain ⟨k,hk,hpk⟩ := hcover p hp + calc + _ = f k p := by simp only [f,ite_eq_left hk,indicator_of_mem hpk] + _ ≤ _ := ENNReal.le_tsum (f := fun index => f index p) k + _ = ∑'k : Fin 4→ℕ,∫⁻p,f k p ∂trianglePhaseMeasure := lintegral_tsum (fun k=>(hm k).aemeasurable) + _ = _ := by + apply tsum_congr + intro k + by_cases hk : k∈R + · simp only [f,ite_eq_left hk,indicator_of_mem hk] + rw [lintegral_indicator (measurableSet_physicalBinPhaseSet hV _ hJ),physicalBinPhase_integral hV _ hJ hg] + · simp only [f,ite_eq_right hk,Pi.zero_apply,lintegral_zero,indicator_of_notMem hk] + +lemma PhaseFlowOn.triangleConeKernel_measurable_interior {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelInterior T)) : + Measurable (triangleConeKernel s F.flow zX T A) := by + classical + have hS := F.triangleKernelState_continuousOn zX + have hSA := hA.comp hS (fun _ hp=>⟨triangleKernelState_mem _ _ hp,hp.2.2⟩) + have hSf := hs.f_smooth.continuousOn.comp (hS.fst.snd.prodMk hS.snd.snd) + (fun _ hp=>⟨(triangleKernelState_mem F.flow zX hp).1.2,mem_univ _⟩) + have hV : ContinuousOn (fun p : TrianglePhase=>(F.flow zX p.1.1).2) (trianglePhaseDomain T) := + ((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn + (fun _ hp=>Ioo_subset_Icc_self hp.1)).snd + have hD : ContinuousOn (fun p : TrianglePhase=>1-dot p.1.2.2.1 (velocity (F.flow zX p.1.1).2)) + (trianglePhaseDomain T) := by + simp only [dot_eq_inner] + exact continuousOn_const.sub (continuous_fst.snd.snd.subtype_val.continuousOn.inner + ((contDiff_velocity (k:=1)).continuous.comp_continuousOn hV)) + exact (hD.smul (hSf.smul hSA)).measurable_piecewise continuousOn_const + (measurableSet_trianglePhaseDomain T) + +def partialCutoffTriangle (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (H : ConeKernelState→CutoffState) + (W : ℝ→Vec→L[ℝ]Vec) (J : Set ℝ) : TrianglePhase→Vec := + {p : TrianglePhase | p.1.1∈J}.indicator (fun p=>W p.1.1 + (triangleConeKernel s α zX T (normalisedPartialCutoff α zX T Q H) p)) + +lemma partialCutoffTriangle_of_mem {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + {Q : Set (Fin 4→ℕ)} {H : ConeKernelState→CutoffState} {W : ℝ→Vec→L[ℝ]Vec} + {J : Set ℝ} {p : TrianglePhase} (ht : p.1.1∈J) : + partialCutoffTriangle s α zX T Q H W J p = + W p.1.1 (triangleConeKernel s α zX T (normalisedPartialCutoff α zX T Q H) p) := + indicator_of_mem (show p∈{p : TrianglePhase | p.1.1∈J} from ht) _ + +lemma partialCutoffTriangle_of_notMem {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + {Q : Set (Fin 4→ℕ)} {H : ConeKernelState→CutoffState} {W : ℝ→Vec→L[ℝ]Vec} + {J : Set ℝ} {p : TrianglePhase} (ht : p.1.1∉J) : + partialCutoffTriangle s α zX T Q H W J p = 0 := + indicator_of_notMem (show p∉{p : TrianglePhase | p.1.1∈J} from ht) _ + +lemma PhaseFlowOn.partialCutoffTriangle_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {H : ConeKernelState→CutoffState} + (hH : ContinuousOn H (coneKernelInterior T)) {W : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) : + Measurable (partialCutoffTriangle s F.flow zX T Q H W J) := by + apply Measurable.indicator _ (hJ.preimage measurable_fst.fst) + exact (continuous_fst.clm_apply continuous_snd).measurable.comp + ((hW.comp measurable_fst.fst).prodMk (F.triangleConeKernel_measurable_interior hs zX + (F.normalisedPartialCutoff_continuousOn zX Q hH))) + +lemma PhaseFlowOn.partialCutoffTriangle_support {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (H : ConeKernelState→CutoffState) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (N : ℕ) (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤(2:ℝ)^N) + {p : TrianglePhase} (hp : partialCutoffTriangle s F.flow zX T Q H W J p≠0) : + ∃k∈dyadicSelectionBoundary Q∩{k | k 0(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J := by + classical + have ht : p.1.1∈J := by + by_contra hc + exact hp (partialCutoffTriangle_of_notMem hc) + have hc : p∈trianglePhaseDomain T := by + by_contra hh + apply hp + simp only [partialCutoffTriangle_of_mem ht,triangleConeKernel,indicator_of_notMem hh,map_zero] + have hf : s.f ((triangleKernelState F.flow zX p).1.2,(triangleKernelState F.flow zX p).2.2)≠0 := by + intro hh + apply hp + simp only [partialCutoffTriangle_of_mem ht,triangleConeKernel,indicator_of_mem hc,hh, + zero_smul,smul_zero,map_zero] + have hd : fderiv ℝ (stateCutoff T Q) (coneCutoffState F.flow zX (triangleKernelState F.flow zX p)) + (H (triangleKernelState F.flow zX p))≠0 := by + intro hh + apply hp + simp only [partialCutoffTriangle_of_mem ht,triangleConeKernel,indicator_of_mem hc, + normalisedPartialCutoff,hh,zero_smul,smul_zero,map_zero] + have he : (prefixFlow F.flow T zX p.1.1).2=(F.flow zX p.1.1).2 := by + simp only [prefixFlow,prefixClamp_eq (hJT ht)] + have hdp : fderiv ℝ (stateCutoff T Q) + (p.1.1-p.1.2.1,p.1.2.2.1,p.2,(prefixFlow F.flow T zX p.1.1).2) + (H (triangleKernelState F.flow zX p))≠0 := by + rw [he] + exact hd + exact stateCutoff_derivative_physical_cover ht (hJT ht).2 ⟨hc.2.1.le,hc.2.2⟩ + (by rw [he]; exact hband _ ht) + (hP _ ⟨hc.2.1.le,hc.2.2.le.trans hc.1.2.le⟩ _ hf) Q _ hdp + +lemma PhaseFlowOn.partialCutoffTriangle_boundary_sum {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {H : ConeKernelState→CutoffState} + (hH : ContinuousOn H (coneKernelInterior T)) {W : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (N : ℕ) (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤(2:ℝ)^N) : + (∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q H W J p‖ ∂trianglePhaseMeasure)≤ + ∑'k : Fin 4→ℕ,(dyadicSelectionBoundary Q∩{k | k 0 + ∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) + z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q H W J (z,v)‖ ∂volume + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + apply physicalBinPhase_cover_lintegral hV hJ T w _ + (F.partialCutoffTriangle_measurable hs zX Q hH hW hJ).norm.ennreal_ofReal + intro p hp + apply F.partialCutoffTriangle_support zX Q H W hJT hband N hP + intro hh + exact hp (by rw [hh,norm_zero,ENNReal.ofReal_zero]) + +lemma normalised_partial_kernel_eq {r f D l : ℝ} {a u n : Vec} + (hr : r≠0) (hd : 1-dot n u≠0) (W : Vec→L[ℝ]Vec) : + W (D • (f • (l • normalisedPrimitive r a u n)))= + r^2 • ((f*D/(r*(1-dot n u))*l) • W (signedPrimitive a u n)) := by + simp only [normalisedPrimitive,map_smul,smul_smul] + congr 1 + field_simp + +def coneReceiverCutoffTangent (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (p : ConeKernelState) : CutoffState := + (0,0,0,(coneCutoffRate s α zX p).2.2.2) + +lemma PhaseFlowOn.coneReceiverCutoffTangent_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (coneReceiverCutoffTangent s F.flow zX) (coneKernelInterior T) := + continuousOn_const.prodMk (continuousOn_const.prodMk (continuousOn_const.prodMk + (F.coneCutoffRate_continuousOn hs zX).snd.snd.snd)) + +lemma PhaseFlowOn.partialCutoffTriangle_receiver_density_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hw : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q (coneReceiverCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + physicalReceiverCutoffDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B T w Q (prefixMomentumForce s F.flow T zX) z := by + classical + unfold physicalReceiverCutoffDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + dsimp only + by_cases hp : (z,v)∈trianglePhaseDomain T + · have htime := hJT hz.1 + have hprefix : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq htime] + have hK : prefixMomentumForce s F.flow T zX z.1= + (lorentzField s.E s.B (z.1,F.flow zX z.1)).2 := by + simp only [prefixMomentumForce,hprefix,prefixClamp_eq htime] + have he := normalised_partial_kernel_eq (sub_pos.mpr hp.2.2).ne' + (cone_denom_pos v z.2.2.1 (sphere_norm z.2.2)).ne' + (angularMultiplierCLM w (F.flow zX z.1).2) + (f:=s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))) + (D:=1-dot z.2.2.1 (velocity (F.flow zX z.1).2)) + (l:=fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffReceiverTangent ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (lorentzField s.E s.B (z.1,F.flow zX z.1)).2)) + (a:=velocity (F.flow zX z.1).2) + have htriangle : partialCutoffTriangle s F.flow zX T Q (coneReceiverCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)= + (z.1-z.2.1)^2 • ((s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))* + (1-dot z.2.2.1 (velocity (F.flow zX z.1).2))/((z.1-z.2.1)*(1-dot z.2.2.1 (velocity v)))* + fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffReceiverTangent ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (lorentzField s.E s.B (z.1,F.flow zX z.1)).2)) • + angularMultiplierCLM w (F.flow zX z.1).2 (signedPrimitive (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) := by + simpa only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_mem hp, + (prefixAngular_highband hw zX htime (hband _ hz.1)).1,normalisedPartialCutoff, + coneReceiverCutoffTangent,coneCutoffRate,coneCutoffState,triangleKernelState,cutoffReceiverTangent] using he + rw [htriangle,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _),ENNReal.ofReal_mul (sq_nonneg _),hprefix,hK] + · simp only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_notMem hp,map_zero, + norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma Admissible.actual_receiverCutoff_triangle_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → 0≤T → + ∀(zX : Phase) (J : Set ℝ) (w κ : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)) (hw : 0(prefixFlow F.flow T zX t).1 + let V : ℝ→Vec := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + have hα : Continuous (prefixFlow F.flow T zX) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hV : Measurable V := hα.snd.measurable + have hK : Measurable K := (F.continuous_prefixMomentumForce hs hT zX).measurable + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + have hmain := F.partialCutoffTriangle_boundary_sum hs hT zX Q + (F.coneReceiverCutoffTangent_continuousOn hs zX) hW hJ hJT hq N hP + apply hmain.trans + apply le_trans _ (hbound s T F hs h0 X V K J w κ N Q hV hK hJ hJT hw hκ hκsmall hQ (fun t ht=>by + simpa only [V,prefixFlow,prefixClamp_eq (hJT ht)] using hband t ht)) + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈dyadicSelectionBoundary Q∩{k | k 0ENNReal.ofReal ‖triangleConeKernel s F.flow zX T A p‖ + have hg : Measurable g := hK.norm.ennreal_ofReal + have hm : Measurable (fun z : ConeCoordinate=>∫⁻v : Vec,g (z,v)) := hg.lintegral_prod_right' + have he : (∫⁻p,g p ∂trianglePhaseMeasure)= + ∫⁻t : ℝ,∫⁻σ : ℝ,∫⁻n : Sphere,∫⁻v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure := by + rw [trianglePhaseMeasure,lintegral_prod _ hg.aemeasurable,lintegral_prod _ hm.aemeasurable] + apply lintegral_congr + intro t + exact lintegral_prod _ ((hm.comp (measurable_const.prodMk measurable_id)).aemeasurable) + rw [he] + rw [←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro t + by_cases ht : t∈Ioo 0 T + · rw [indicator_of_mem ht,←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro σ + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ] + apply lintegral_congr + intro n + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + have hp : ((t,σ,n),v)∈trianglePhaseDomain T := ⟨ht,hσ⟩ + simp only [g,triangleConeKernel,indicator_of_mem hp,triangleKernelState, + norm_smul,Real.norm_eq_abs,abs_of_pos (cone_denom_pos _ _ (sphere_norm n)), + ENNReal.ofReal_mul (cone_denom_pos _ _ (sphere_norm n)).le] + · rw [indicator_of_notMem hσ] + have hz : ∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>hσ hp.2 + simp only [g,triangleConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + simp only [hz,lintegral_zero] + · rw [indicator_of_notMem ht] + have hz : ∀σ : ℝ,∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro σ n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>ht hp.1 + simp only [g,triangleConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + simp only [hz,lintegral_zero] + +lemma partialCutoffTriangle_eq_kernel (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (Q : Set (Fin 4→ℕ)) (H : ConeKernelState→CutoffState) + (W : ℝ→Vec→L[ℝ]Vec) (J : Set ℝ) : + partialCutoffTriangle s α zX T Q H W J = + triangleConeKernel s α zX T (fun p=>J.indicator W p.1.1 (normalisedPartialCutoff α zX T Q H p)) := by + classical + funext p + rw [triangleConeKernel_receiver_multiplier] + by_cases ht : p.1.1∈J + · rw [partialCutoffTriangle_of_mem ht,indicator_of_mem ht] + · rw [partialCutoffTriangle_of_notMem ht,indicator_of_notMem ht] + rfl + +lemma PhaseFlowOn.partialCutoffLabelCost_triangle {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {H : ConeKernelState→CutoffState} + (hH : ContinuousOn H (coneKernelInterior T)) {W : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T Q (H ∘ labelKernelState F.flow zX T) p)‖)= + ∫⁻p,ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q H W J p‖ ∂trianglePhaseMeasure := by + have hm := F.partialCutoffTriangle_measurable hs zX Q hH hW hJ + rw [partialCutoffTriangle_eq_kernel] at hm ⊢ + rw [F.triangleConeKernel_lintegral_norm_measurable zX hm, + F.partialCutoffLabelCost_multiplier_polar hs hT zX Q hH (hW.indicator hJ)] + simp only [map_smul] + +lemma coneReceiverCutoffTangent_pullback (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) : + coneReceiverCutoffTangent s α zX ∘ labelKernelState α zX T = + fun p=>cutoffReceiverTangent (branchRate α zX p.2 T p.1) + (lorentzField s.E s.B (branchTime α zX p.2 T p.1,α zX (branchTime α zX p.2 T p.1))).2 := by + rfl + +lemma Admissible.actual_receiverCutoff_label_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → 0≤T → + ∀(zX : Phase) (J : Set ℝ) (w κ : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)) (hw : 0cutoffReceiverTangent (branchRate F.flow zX p.2 T p.1) + (lorentzField s.E s.B (branchTime F.flow zX p.2 T p.1,F.flow zX (branchTime F.flow zX p.2 T p.1))).2) p)‖)≤ + (∫⁻t in J,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(N:ℝ)^2/w) := by + obtain ⟨C,hC,hbound⟩ := hd₀.actual_receiverCutoff_triangle_bound + refine ⟨C,hC,?_⟩ + intro s T F hs h0 hT zX J w κ N Q hw hJ hJT hκ hκsmall hQ hq hband hP + have he := F.partialCutoffLabelCost_triangle hs hT zX Q + (F.coneReceiverCutoffTangent_continuousOn hs zX) + (F.prefixAngular_regular hs hT hw zX).1.measurable hJ + rw [coneReceiverCutoffTangent_pullback] at he + rw [he] + exact hbound s T F hs h0 hT zX J w κ N Q hw hJ hJT hκ hκsmall hQ hq hband hP + +def coneSourceCutoffTangent (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (p : ConeKernelState) : CutoffState := + (0,0,(coneCutoffRate s α zX p).2.2.1,0) + +def coneGeometryCutoffTangent (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (p : ConeKernelState) : CutoffState := + ((coneCutoffRate s α zX p).1,(coneCutoffRate s α zX p).2.1,0,0) + +lemma PhaseFlowOn.coneSourceCutoffTangent_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (coneSourceCutoffTangent s F.flow zX) (coneKernelInterior T) := + continuousOn_const.prodMk (continuousOn_const.prodMk + ((F.coneCutoffRate_continuousOn hs zX).snd.snd.fst.prodMk continuousOn_const)) + +lemma PhaseFlowOn.coneGeometryCutoffTangent_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (coneGeometryCutoffTangent s F.flow zX) (coneKernelInterior T) := + (F.coneCutoffRate_continuousOn hs zX).fst.prodMk + ((F.coneCutoffRate_continuousOn hs zX).snd.fst.prodMk + (continuousOn_const.prodMk continuousOn_const)) + +lemma coneSourceCutoffTangent_pullback (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) : + coneSourceCutoffTangent s α zX ∘ labelKernelState α zX T = + fun p=>cutoffSourceTangent (lorentzField s.E s.B (p.1,α p.2 p.1)).2 := rfl + +lemma coneGeometryCutoffTangent_pullback (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) : + coneGeometryCutoffTangent s α zX ∘ labelKernelState α zX T = + fun p=>cutoffGeometryTangent (branchTime α zX p.2 T p.1-p.1) (branchRate α zX p.2 T p.1) + (velocity (α zX (branchTime α zX p.2 T p.1)).2) (velocity (α p.2 p.1).2) + (branchDirection α zX p.2 T p.1) := rfl + +lemma PhaseFlowOn.partialCutoffTriangle_source_density_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hw : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q (coneSourceCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + physicalProjectedSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B T w Q z := by + classical + unfold physicalProjectedSourceDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + dsimp only + by_cases hp : (z,v)∈trianglePhaseDomain T + · have htime := hJT hz.1 + have hprefix : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq htime] + have he := normalised_partial_kernel_eq (sub_pos.mpr hp.2.2).ne' + (cone_denom_pos v z.2.2.1 (sphere_norm z.2.2)).ne' + (angularMultiplierCLM w (F.flow zX z.1).2) + (f:=s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))) + (D:=1-dot z.2.2.1 (velocity (F.flow zX z.1).2)) + (l:=fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffSourceTangent + (s.E (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1)+ + cross (velocity v) (s.B (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1))))) + (a:=velocity (F.flow zX z.1).2) + have htriangle : partialCutoffTriangle s F.flow zX T Q (coneSourceCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)= + (z.1-z.2.1)^2 • ((s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))* + (1-dot z.2.2.1 (velocity (F.flow zX z.1).2))/((z.1-z.2.1)*(1-dot z.2.2.1 (velocity v)))* + fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffSourceTangent + (s.E (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1)+ + cross (velocity v) (s.B (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1))))) • + angularMultiplierCLM w (F.flow zX z.1).2 (signedPrimitive (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) := by + simpa only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_mem hp, + (prefixAngular_highband hw zX htime (hband _ hz.1)).1,normalisedPartialCutoff, + coneSourceCutoffTangent,coneCutoffRate,coneCutoffState,triangleKernelState,cutoffSourceTangent,lorentzField,lorentzPhase] using he + rw [htriangle,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _),ENNReal.ofReal_mul (sq_nonneg _),hprefix] + apply mul_le_mul' le_rfl + exact ENNReal.ofReal_le_ofReal (le_add_of_nonneg_left (norm_nonneg _)) + · simp only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_notMem hp,map_zero, + norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.partialCutoffTriangle_geometry_density_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hw : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + physicalGeometryCutoffDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B T w Q z := by + classical + unfold physicalGeometryCutoffDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + dsimp only + by_cases hp : (z,v)∈trianglePhaseDomain T + · have htime := hJT hz.1 + have hprefix : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq htime] + have he := normalised_partial_kernel_eq (sub_pos.mpr hp.2.2).ne' + (cone_denom_pos v z.2.2.1 (sphere_norm z.2.2)).ne' + (angularMultiplierCLM w (F.flow zX z.1).2) + (f:=s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))) + (D:=1-dot z.2.2.1 (velocity (F.flow zX z.1).2)) + (l:=fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffGeometryTangent (z.1-z.2.1) + ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) + (a:=velocity (F.flow zX z.1).2) + have htriangle : partialCutoffTriangle s F.flow zX T Q (coneGeometryCutoffTangent s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)= + (z.1-z.2.1)^2 • ((s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))* + (1-dot z.2.2.1 (velocity (F.flow zX z.1).2))/((z.1-z.2.1)*(1-dot z.2.2.1 (velocity v)))* + fderiv ℝ (stateCutoff T Q) (z.1-z.2.1,z.2.2.1,v,(F.flow zX z.1).2) + (cutoffGeometryTangent (z.1-z.2.1) + ((1-dot z.2.2.1 (velocity v))/(1-dot z.2.2.1 (velocity (F.flow zX z.1).2))) + (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) • + angularMultiplierCLM w (F.flow zX z.1).2 (signedPrimitive (velocity (F.flow zX z.1).2) (velocity v) z.2.2.1)) := by + simpa only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_mem hp, + (prefixAngular_highband hw zX htime (hband _ hz.1)).1,normalisedPartialCutoff, + coneGeometryCutoffTangent,coneCutoffRate,coneCutoffState,triangleKernelState,cutoffGeometryTangent] using he + rw [htriangle,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _),ENNReal.ofReal_mul (sq_nonneg _),hprefix] + · simp only [partialCutoffTriangle_of_mem (p:=(z,v)) hz.1,triangleConeKernel,indicator_of_notMem hp,map_zero, + norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.actual_sourceCutoff_label_boundary_sum {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (Q : Set (Fin 4→ℕ)) (hw : 0cutoffSourceTangent (lorentzField s.E s.B (p.1,F.flow p.2 p.1)).2) p)‖)≤ + ∑'k : Fin 4→ℕ,(dyadicSelectionBoundary Q∩{k | k 0 + ∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + classical + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + have hH := F.coneSourceCutoffTangent_continuousOn hs zX + have he := F.partialCutoffLabelCost_triangle hs hT zX Q hH hW hJ + rw [coneSourceCutoffTangent_pullback] at he + rw [he] + apply (F.partialCutoffTriangle_boundary_sum hs hT zX Q hH hW hJ hJT hq N hP).trans + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈dyadicSelectionBoundary Q∩{k | k 0(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV (representativeClosedBin T w k) hJ)] with z hz + exact F.partialCutoffTriangle_source_density_le hw zX Q hJT hband _ hz + · simp only [indicator_of_notMem hk] + exact le_rfl + +lemma PhaseFlowOn.actual_geometryCutoff_label_boundary_sum {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (Q : Set (Fin 4→ℕ)) (hw : 0cutoffGeometryTangent (branchTime F.flow zX p.2 T p.1-p.1) (branchRate F.flow zX p.2 T p.1) + (velocity (F.flow zX (branchTime F.flow zX p.2 T p.1)).2) (velocity (F.flow p.2 p.1).2) + (branchDirection F.flow zX p.2 T p.1)) p)‖)≤ + ∑'k : Fin 4→ℕ,(dyadicSelectionBoundary Q∩{k | k 0 + ∫⁻z : ConeCoordinate,physicalGeometryCutoffDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + classical + have hW := (F.prefixAngular_regular hs hT hw zX).1.measurable + have hH := F.coneGeometryCutoffTangent_continuousOn hs zX + have he := F.partialCutoffLabelCost_triangle hs hT zX Q hH hW hJ + rw [coneGeometryCutoffTangent_pullback] at he + rw [he] + apply (F.partialCutoffTriangle_boundary_sum hs hT zX Q hH hW hJ hJT hq N hP).trans + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈dyadicSelectionBoundary Q∩{k | k 0(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV (representativeClosedBin T w k) hJ)] with z hz + exact F.partialCutoffTriangle_geometry_density_le hw zX Q hJT hband _ hz + · simp only [indicator_of_notMem hk] + exact le_rfl + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/RadialSummation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/RadialSummation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7068dc11ce669337c9cdf64b7dfb0705cd737b90 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/RadialSummation.lean @@ -0,0 +1,966 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.RelativeCauchyConstant + +namespace OAI + +noncomputable section + +namespace RVM + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma capped_positive_power_sum_unscaled {x α : ℝ} (hx : 0cappedRepresentative_le_one _) + have hφsum := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1/3) Sφ (fun _ _=>cappedRepresentative_le_one _) + rw [Real.one_rpow,mul_one] at hθsum hφsum + have hφ0 : 0≤∑k∈Sφ,(cappedRepresentative k)^(1/3:ℝ) := + Finset.sum_nonneg (fun _ _=>Real.rpow_nonneg (cappedRepresentative_pos _).le _) + have hden : 0≤(1-((2:ℝ)⁻¹)^(2/3:ℝ))⁻¹ := + inv_nonneg.mpr (sub_nonneg.mpr (Real.rpow_le_one (by norm_num) (by norm_num) (by norm_num))) + calc + _ ≤ ∑i∈Sθ,∑k∈Sφ,C*p*(cappedRepresentative i)^(2/3:ℝ)*(cappedRepresentative k)^(1/3:ℝ) := by + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro k hk + exact large_radius_magnetic_relative_sum hp (cappedRepresentative_pos i) + (cappedRepresentative_pos k).le hK (Sσ i k) (hS i hi k hk) + _ = C*p*(∑i∈Sθ,(cappedRepresentative i)^(2/3:ℝ))*(∑k∈Sφ,(cappedRepresentative k)^(1/3:ℝ)) := by + simp_rw [←Finset.mul_sum] + simp only [Finset.sum_mul,Finset.mul_sum] + rw [Finset.sum_comm] + _ ≤ C*p*((1-((2:ℝ)⁻¹)^(2/3:ℝ))⁻¹)*((1-((2:ℝ)⁻¹)^(1/3:ℝ))⁻¹) := by + gcongr + _ = _ := by dsimp only [C]; ring + +lemma physical_relative_remaining_upper {T w t r κ : ℝ} {V : ℝ→Vec} {J : Set ℝ} + {k : Fin 4→ℕ} {j : ℕ} {n : Sphere} {v : Vec} + (hκ : 0≤κ) (hsector : cappedRepresentative (k 2)≤κ*cappedRepresentative (k 1)) + (hb : (t,r,n)∈physicalBinBase V (relativeRepresentativeClosedBin T w k j) J) + (hv : v∈coneBinMomentumSet (relativeRepresentativeClosedBin T w k j) n.1 (velocity (V t))) : + cappedRepresentative j≤8*(1+κ)*cappedRepresentative (k 1) := by + exact cone_relative_bin_upper (v:=v) (w:=V t) (n:=n.1) (sphere_norm n) + (cappedRepresentative_pos (k 1)).le (cappedRepresentative_pos (k 2)).le + (cappedRepresentative_pos j).le hκ hsector hv.2.1.1 hv.2.1.2 + hb.2.2.2.2.1 hb.2.2.2.2.2 hv.2.2.1 hv.2.2.2 + +lemma large_radius_magnetic_full_sum {p K H : ℝ} (hp : 0?_)) hb + have hk0 := (cappedRepresentative_pos k).le + exact le_min (by positivity) + (div_nonneg (mul_nonneg (Real.sqrt_nonneg _) + (le_min (cappedRepresentative_pos i).le (cappedRepresentative_pos j).le)) + (mul_nonneg (cappedRepresentative_pos i).le (Real.sqrt_nonneg _))) + have hsum := large_radius_magnetic_angular_sum hp.le hK Sθ Sφ Sσ hS + calc + _ ≤ ∑i∈Sθ,∑k∈Sφ,∑j∈Sσ i k,dyadicBalanceConstant 1 (1/2)* + (p*(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative k)^(1/3:ℝ)) := + Finset.sum_le_sum (fun i _=>Finset.sum_le_sum (fun k _=>Finset.sum_le_sum (fun j _=>hpoint i k j))) + _ = dyadicBalanceConstant 1 (1/2)*(∑i∈Sθ,∑k∈Sφ,∑j∈Sσ i k, + p*(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative k)^(1/3:ℝ)) := by + simp_rw [Finset.mul_sum] + _ ≤ _ := mul_le_mul_of_nonneg_left hsum + (dyadicBalanceConstant_pos (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1/2)).le + + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma relative_density_time_far_sqrt {C E I p ν r θ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hI : 0≤I) (hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + I ≤ max 1 T*cappedRepresentative (k 3) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let ν := min θ σ + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*ν/θ^2)/Real.sqrt r)+ + Kb*Real.sqrt I*min (r*p^2*ν^2*φ) (Real.sqrt p*ν/(θ*Real.sqrt r))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_large_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + have hn := hsource s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

min (H*(2:ℝ)^k*p^2) (Real.sqrt p/Real.sqrt (H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := large_radius_magnetic_balance hH hp (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1) (by norm_num : (0:ℝ)<1) + simp only [min_self,one_pow,mul_one,one_mul,Real.one_rpow] at hg + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ ≤ ∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by + apply ENNReal.tsum_le_tsum + intro n + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_left _ hK + dsimp only [g] + rw [←he] + have hcn := (cappedRepresentative_pos n).le + apply min_le_min + · have hνsq : ν^2≤1 := by nlinarith only [hν,hν1] + have hprod : ν^2*φ≤1 := + (mul_le_mul_of_nonneg_right hνsq hφ).trans (by simpa using hφ1) + calc + _ = (H*cappedRepresentative n*p^2)*(ν^2*φ) := by ring + _ ≤ (H*cappedRepresentative n*p^2)*1 := + mul_le_mul_of_nonneg_left hprod (by positivity) + _ = _ := mul_one _ + · have hr : 0ENNReal.ofReal (K*g k)) + _ = ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _ ≤ _ := by + apply ENNReal.ofReal_le_ofReal + simpa only [g,mul_assoc] using mul_le_mul_of_nonneg_left hg.2 hK + +lemma remaining_good_coarse_balance {I p ν θ φ : ℝ} + (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → + cappedRepresentative nφ≤16*cappedRepresentative nθ → + let p := sourceRepresentative np + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if I ≤ max 1 T*cappedRepresentative nr then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((16*Kg*dyadicBalanceConstant (1/2) (1/2)+ + Kb*dyadicBalanceConstant 1 (1/2))*Real.sqrt I*p) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_large_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI hI1 hsector + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*ν/θ^2 + let G := fun n=>ENNReal.ofReal (Kg*min (ag*Real.sqrt (max 1 T*cappedRepresentative n)) + (bg/Real.sqrt (max 1 T*cappedRepresentative n))) + let Bm := fun n=>ENNReal.ofReal (Kb*Real.sqrt I*min + (max 1 T*cappedRepresentative n*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (max 1 T*cappedRepresentative n)))) + have hp : 0

H*cappedRepresentative n≤R) + have hS : ∀n∈S,cappedRepresentative n≤R/H := by + intro n hn + exact (le_div_iff₀ hH).mpr (by simpa only [mul_comm] using (Finset.mem_filter.mp hn).2) + have hh := capped_positive_power_sum_unscaled (div_pos hR hH) (by norm_num : (0:ℝ)<1/2) S hS + have he (n : ℕ) : Real.sqrt (H*cappedRepresentative n)= + Real.sqrt H*(cappedRepresentative n)^(1/2:ℝ) := by + rw [Real.sqrt_mul hH.le,Real.sqrt_eq_rpow (cappedRepresentative n)] + calc + _ = ∑n∈S,ENNReal.ofReal (K*Real.sqrt (H*cappedRepresentative n)) := by + simp only [S,Finset.sum_filter] + _ = ENNReal.ofReal (K*Real.sqrt H*(∑n∈S,(cappedRepresentative n)^(1/2:ℝ))) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n hn=>mul_nonneg hK (Real.sqrt_nonneg _))] + simp only [he,←mul_assoc,Finset.mul_sum] + _ ≤ ENNReal.ofReal (K*Real.sqrt H*((1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*(R/H)^(1/2:ℝ))) := by + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_left hh (mul_nonneg hK (Real.sqrt_nonneg _)) + _ = _ := by + rw [←Real.sqrt_eq_rpow (R/H),Real.sqrt_div hR.le] + congr 1 + field_simp [(Real.sqrt_pos.mpr hH).ne'] + +lemma Admissible.direct_source_short_near_sum {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((Kg*(I*p^2*ν^2*φ^2/θ^2)+Kb*(I*p^2*ν^2*φ))* + (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_short_near + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + dsimp only + have hKg := relativeCauchyConstant_nonneg (E:=∫x : Vec,totalEnergy s (0,x)) (Z:=20*(∫x : Vec,totalEnergy s (0,x))) hCg + have hKb := relativeCauchyConstant_nonneg (E:=∫x : Vec,totalEnergy s (0,x)) (Z:=120*(∫x : Vec,totalEnergy s (0,x))) hCb + have hφ := (cappedRepresentative_pos nφ).le + have hK0 : 0≤relativeCauchyConstant Cg (∫x : Vec,totalEnergy s (0,x)) (20*(∫x : Vec,totalEnergy s (0,x)))* + (I*(sourceRepresentative np)^2*(min (cappedRepresentative nθ) (cappedRepresentative j))^2*(cappedRepresentative nφ)^2/(cappedRepresentative nθ)^2)+ + relativeCauchyConstant Cb (∫x : Vec,totalEnergy s (0,x)) (120*(∫x : Vec,totalEnergy s (0,x)))* + (I*(sourceRepresentative np)^2*(min (cappedRepresentative nθ) (cappedRepresentative j))^2*cappedRepresentative nφ) := by positivity + apply le_trans (ENNReal.tsum_le_tsum (fun n=>?_)) (capped_short_sqrt_radius_sum + (show 0 < max 1 T from zero_lt_one.trans_le (le_max_left _ _)) hI hK0) + split_ifs with hrI + · have hh := hsource s T F hs hT h0 zX S ![np,nθ,nφ,n] j a b I w hS hS0 ha hb hJI hI hrI + dsimp only [Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one,Matrix.cons_val,Fin.reduceFinMk] at hh + exact hh + · exact le_rfl + +lemma deficit_short_source_coefficient {I P p w θ φ σ Kg Kb : ℝ} + (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((256*Kg+Kb)*16777216*(1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_short_near_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hI1 hw hP hpP hIP hsector hdeficit + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + have hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 1 ≤ P → 1 ≤ Real.log (2+P) → 0 < w → w≤P → + sourceRepresentative np≤128*P → + cappedRepresentative nφ≤16*cappedRepresentative nθ → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.log (2+P)) := by + obtain ⟨Cgs,Cbs,hCgs,hCbs,hshort⟩ := hd₀.direct_source_remaining_short_sum + obtain ⟨Cgd,Cbd,hCgd,hCbd,hdef⟩ := hd₀.direct_source_deficit_short_sum + obtain ⟨Cgl,Cbl,hCgl,hCbl,hlong⟩ := hd₀.direct_source_remaining_large_sum + let Ds := dyadicBalanceConstant (1/2) (1/2) + let Dm := dyadicBalanceConstant 1 (1/2) + let Dn := (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ + let gs := relativeCauchyConstant Cgs 1 20 + let bs := relativeCauchyConstant Cbs 1 120 + let gd := relativeCauchyConstant Cgd 1 20 + let bd := relativeCauchyConstant Cbd 1 120 + let gl := relativeCauchyConstant Cgl 1 20 + let bl := relativeCauchyConstant Cbl 1 120 + let Cs := (16*gs+bs)*Ds*(32768*17*16384) + let Cd := (256*gd+bd)*16777216*Dn + let Cl := (16*gl*Ds+bl*Dm)*128 + have hDs : 0≤Ds := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDm : 0≤Dm := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDn : 0≤Dn := shortSqrtConstant_pos.le + have hgs : 0≤gs := relativeCauchyConstant_nonneg hCgs + have hbs : 0≤bs := relativeCauchyConstant_nonneg hCbs + have hgd : 0≤gd := relativeCauchyConstant_nonneg hCgd + have hbd : 0≤bd := relativeCauchyConstant_nonneg hCbd + have hgl : 0≤gl := relativeCauchyConstant_nonneg hCgl + have hbl : 0≤bl := relativeCauchyConstant_nonneg hCbl + have hCs : 0≤Cs := by dsimp only [Cs]; positivity + have hCd : 0≤Cd := by dsimp only [Cd]; positivity + have hCl : 0≤Cl := by dsimp only [Cl]; positivity + refine ⟨Cs+Cd+Cl,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP1 hL hw hwP hpP hsector HX HZ + dsimp only + let I := (w/P)^2 + let L := Real.log (2+P) + let E := ∫x : Vec,totalEnergy s (0,x) + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let J : ℕ→ℝ≥0∞ := fun nr=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (B nr) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (B nr) (Icc a b) + let Jshort : ℕ→ℝ≥0∞ := fun nr=>if max 1 T*cappedRepresentative nr≤I then J nr else 0 + let Jlong : ℕ→ℝ≥0∞ := fun nr=>if I ≤ max 1 T*cappedRepresentative nr then J nr else 0 + let U := (1+E)*(1+M+Real.sqrt A)*w*L + have hP : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((268435456*Kg+Kb)*16777216*(1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_short_near_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hI1 hw hP hpP hIP hsector hdeficit + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + have hp : 0∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative n.2/16 + then f ![n.1,nt,n.2,nr] else 0) n := by + classical + rw [tsum_quad_pair_index] + apply tsum_congr + intro n + by_cases hn : sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2 + · have hn' : n∈{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} := hn + rw [indicator_of_mem hn'] + apply tsum_congr + intro nt + apply tsum_congr + intro nr + have hi : (![n.1,nt,n.2,nr]∈centralIndexSector P) ↔ + cappedRepresentative nt≤cappedRepresentative n.2/16 := by + change (sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2 ∧ + cappedRepresentative nt≤cappedRepresentative n.2/16) ↔_ + simp only [hn.1,hn.2,true_and] + simp only [indicator_apply,hi] + · have hn' : n∉{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} := hn + rw [indicator_of_notMem hn'] + apply ENNReal.tsum_eq_zero.mpr + intro nt + apply ENNReal.tsum_eq_zero.mpr + intro nr + apply indicator_of_notMem + change ¬(sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2 ∧ + cappedRepresentative nt≤cappedRepresentative n.2/16) + exact fun h=>hn ⟨h.1,h.2.1⟩ + +lemma representativeSmallSector_subset_centralIndexSector (P : ℝ) : + representativeSmallSector P⊆centralIndexSector P := by + intro k hk + refine ⟨hk.1,hk.2.1.trans (hk.2.2.trans ?_),hk.2.2⟩ + have hφ := (cappedRepresentative_pos (k 2)).le + linarith + + + +section +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma representativeSpatialCost_le_central_structural {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) + (hangle : cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)) : + representativeSpatialCost s F zX w k a b≤ + ENNReal.ofReal 16384*representativeCentralCost s F zX w k a b := by + unfold representativeSpatialCost + apply mul_le_mul' _ le_rfl + apply ENNReal.ofReal_le_ofReal + apply (div_le_iff₀ (cappedRepresentative_pos _)).mpr + linarith + +lemma Admissible.spatial_structural_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {k | k∈centralIndexSector P ∧ + cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)} + (∑'k : Fin 4→ℕ,Q.indicator (fun k=>representativeSpatialCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cc,hCc,hcentral⟩ := hd.central_uniform T₀ + refine ⟨16384*Cc,by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {k | k∈centralIndexSector P ∧ + cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)} + let fc := fun k=>representativeCentralCost s F zX w k a b + let fs := fun k=>representativeSpatialCost s F zX w k a b + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hpoint (k : Fin 4→ℕ) : Q.indicator fs k≤ + ENNReal.ofReal 16384*(centralIndexSector P).indicator fc k := by + by_cases hk : k∈Q + · rw [indicator_of_mem hk,indicator_of_mem hk.1] + exact representativeSpatialCost_le_central_structural F zX w k a b hk.2 + · rw [indicator_of_notMem hk] + exact bot_le + have hc := hcentral M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only at hc + rw [←tsum_centralIndexSector P (fun k=>representativeCentralCost s F zX w k a b)] at hc + change (∑'k,Q.indicator fs k)≤ENNReal.ofReal ((16384*Cc)*B) + calc + _≤∑'k,ENNReal.ofReal 16384*(centralIndexSector P).indicator fc k := ENNReal.tsum_le_tsum hpoint + _=ENNReal.ofReal 16384*(∑'k,(centralIndexSector P).indicator fc k) := ENNReal.tsum_mul_left + _≤ENNReal.ofReal 16384*ENNReal.ofReal (Cc*B) := mul_le_mul' le_rfl hc + _=_ := by rw [←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤16384)]; congr 1; ring + + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma EnergyPrefix.particleCone_lintegral {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) (n : Sphere) : + (∫⁻v : Vec,ENNReal.ofReal (q v*(1-dot n.1 (velocity v))*s.f (t,(x,v))))= + ENNReal.ofReal (particleEnergy s (t,x)-dot n.1 (particleFlux s (t,x))) := by + obtain ⟨hf,hc⟩ := hs.velocity_slice ht x + have hi : Integrable (fun v : Vec=>q v*(1-dot n.1 (velocity v))*s.f (t,(x,v))) := + (((contDiff_q (k:=0)).continuous.mul (continuous_const.sub + (continuous_dot.comp (continuous_const.prodMk (contDiff_velocity (k:=0)).continuous)))).mul + hf.continuous).integrable_of_hasCompactSupport hc.mul_left + rw [←ofReal_integral_eq_lintegral_ofReal hi (ae_of_all _ (fun v=> + mul_nonneg (mul_nonneg (q_pos v).le (cone_denom_pos v n.1 (sphere_norm n)).le) + (hs.nonnegative t ht (x,v)))),hs.particle_cone_identity ht x n.1] + +lemma EnergyPrefix.physicalBinDensity_particle_flux {s : Solution} {T t σ : ℝ} + (hs : EnergyPrefix s T) (hσ : σ∈Icc 0 T) (X V : ℝ→Vec) (C : ClosedConeBin) + (hq : 0≤C.qmin) (hd : 0≤C.dmin) (n : Sphere) : + ENNReal.ofReal (C.qmin*C.dmin)*physicalBinDensity s X V C t σ n≤ + ENNReal.ofReal (particleEnergy s (σ,X t-(t-σ) • n.1)- + dot n.1 (particleFlux s (σ,X t-(t-σ) • n.1))) := by + rw [←hs.particleCone_lintegral hσ _ n] + unfold physicalBinDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply le_trans _ (setLIntegral_le_lintegral (coneBinMomentumSet C n.1 (velocity (V t))) _) + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + rw [←ENNReal.ofReal_mul (mul_nonneg hq hd)] + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ (hs.nonnegative σ hσ _) + exact mul_le_mul hv.1.1 hv.2.1.1 hd (q_pos v).le + +lemma physicalBin_integral_le_cone {V : ℝ→Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) + {g : ConeCoordinate→ℝ≥0∞} (hg : Measurable g) : + (∫⁻z,g z ∂physicalBinMeasure V B J)≤ + ∫⁻t in J,∫⁻σ in Icc 0 t,∫⁻n : Sphere,g (t,σ,n) ∂sphereMeasure := by + have hbase := measurableSet_physicalBinBase hV B hJ + unfold physicalBinMeasure + rw [←lintegral_indicator hbase,lintegral_prod _ (hg.indicator hbase).aemeasurable] + rw [←lintegral_indicator hJ] + apply lintegral_mono + intro t + by_cases ht : t∈J + · rw [indicator_of_mem ht] + have hm : Measurable (fun p : ℝ×Sphere=>(physicalBinBase V B J).indicator g (t,p)) := + (hg.indicator hbase).comp (measurable_const.prodMk measurable_id) + dsimp only + rw [lintegral_prod _ hm.aemeasurable,←lintegral_indicator measurableSet_Icc] + apply lintegral_mono + intro σ + by_cases hσ : σ∈Icc 0 t + · rw [indicator_of_mem hσ] + exact lintegral_mono (fun n=>indicator_le_self _ _ (t,σ,n)) + · rw [indicator_of_notMem hσ] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + exact ae_of_all _ (fun n=>indicator_of_notMem (fun hz=>hσ hz.2.1) _) + · rw [indicator_of_notMem ht] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + exact ae_of_all _ (fun p=>indicator_of_notMem (fun hz=>ht hz.1) _) + +def prefixConeDensity (s : Solution) (T : ℝ) (X : ℝ→Vec) (z : ConeCoordinate) : ℝ := + goodConeDensity s (prefixClamp T z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1) z.2.2.1 + +lemma EnergyPrefix.continuous_clamped_goodConeDensity {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) : + Continuous (fun p : (ℝ×Vec)×Vec=>goodConeDensity s (prefixClamp T p.1.1,p.1.2) p.2) := by + have hc : Continuous (prefixClamp T) := continuous_const.max (continuous_const.min continuous_id) + have hmap : Continuous (fun p : (ℝ×Vec)×Vec=>((prefixClamp T p.1.1,p.1.2),p.2)) := + ((hc.comp continuous_fst.fst).prodMk continuous_fst.snd).prodMk continuous_snd + have hh := (hs.goodConeDensity_continuousOn hT).comp_continuous hmap (fun p=> + ⟨⟨prefixClamp_mem hT p.1.1,mem_univ _⟩,mem_univ _⟩) + exact hh + +lemma EnergyPrefix.measurable_prefixConeDensity {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X : ℝ→Vec} (hX : Measurable X) : + Measurable (prefixConeDensity s T X) := by + have hn : Measurable (fun z : ConeCoordinate=>z.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp measurable_snd) + have hy : Measurable (fun z : ConeCoordinate=>((z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1),z.2.2.1)) := + ((measurable_fst.comp measurable_snd).prodMk + ((hX.comp measurable_fst).sub ((measurable_fst.sub (measurable_fst.comp measurable_snd)).smul hn))).prodMk hn + change Measurable ((fun p : (ℝ×Vec)×Vec=>goodConeDensity s (prefixClamp T p.1.1,p.1.2) p.2) ∘ + (fun z : ConeCoordinate=>((z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1),z.2.2.1))) + exact (hs.continuous_clamped_goodConeDensity hT).measurable.comp hy + +lemma EnergyPrefix.physicalBin_radial_density_flux {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + (hq : 0ENNReal.ofReal c⁻¹*g z.1* + ENNReal.ofReal ((z.1-z.2.1)^2*prefixConeDensity s T X z) + have hG : Measurable G := + (measurable_const.mul (hg.comp measurable_fst)).mul + (((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).mul + (hs.measurable_prefixConeDensity hT hX)).ennreal_ofReal + have hb : (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B J)≤ + ∫⁻z,G z ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + have hrz : 0hs.total_energy_nonneg ⟨le_rfl,hT⟩ y) + calc + _ ≤ ∫⁻t in J,ENNReal.ofReal c⁻¹*g t*ENNReal.ofReal (4*(∫y : Vec,totalEnergy s (0,y))) := by + apply setLIntegral_mono' hJ + intro t ht + have htt := hJT ht + have he : (∫⁻σ in Icc 0 t,∫⁻n : Sphere,G (t,σ,n) ∂sphereMeasure)= + ENNReal.ofReal c⁻¹*g t*(∫⁻σ in Icc 0 t,∫⁻n : Sphere, + ENNReal.ofReal (goodConeIntegrand s t (X t) σ n) ∂sphereMeasure) := by + simp_rw [←lintegral_const_mul' _ _ (ENNReal.mul_ne_top ENNReal.ofReal_ne_top (hgf t))] + apply setLIntegral_congr_fun measurableSet_Icc + intro σ hσ + apply lintegral_congr + intro n + dsimp [G,prefixConeDensity,goodConeIntegrand] + rw [prefixClamp_eq (show σ∈Icc 0 T from ⟨hσ.1,hσ.2.trans htt.2⟩)] + rw [he,hs.goodConeIntegrand_lintegral_eq htt (X t)] + apply mul_le_mul' le_rfl + apply ENNReal.ofReal_le_ofReal + have hh := EnergyPrefix.goodConeDensity_time_integral_bound (hs.mono htt.2) htt.1 (X t) + simpa only [intervalIntegral.integral_of_le htt.1,integral_Icc_eq_integral_Ioc,goodConeIntegrand] using hh + _ = _ := by + rw [lintegral_mul_const' _ _ ENNReal.ofReal_ne_top,lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + calc + _ = (∫⁻t in J,g t)*(ENNReal.ofReal c⁻¹*ENNReal.ofReal (4*(∫y : Vec,totalEnergy s (0,y)))) := by ac_rfl + _ = _ := by + rw [←ENNReal.ofReal_mul (inv_pos.mpr hc).le] + congr 2 + dsimp [c] + ring + +def representativeReceiverCost (s : Solution) {T : ℝ} (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) (g : ℝ→ℝ≥0∞) : ℝ≥0∞ := + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + ENNReal.ofReal (θ/(w*φ^2)) * + (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B (Icc a b)) + +lemma receiver_near_scalar {C H h p θ φ w : ℝ} (hw : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let N := w⁻¹*(h^2*(p*θ)^3) + let R := w⁻¹*((p*θ*h*φ^2)⁻¹) + let L := ∫⁻t in Icc a b,g t + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdensity : ∀z∈physicalBinBase V B (Icc a b), + physicalBinDensity s X V B z.1 z.2.1 z.2.2≤ENNReal.ofReal (128*C₀*p^3*θ^2) := by + intro z hz + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ + have hh := hden s T F hs.energyPrefix hs.initial_f X V B z.1 z.2.1 z.2.2 + p θ 1 hσ hp.le hθ.le (by norm_num) (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left hθ1] using hh + have hn := physicalBin_radial_density_near hV B measurableSet_Icc hC₀ hp.le hθ.le hφ.le + (by change 0≤2*H*h; positivity) le_rfl hdensity hg + have hf := hs.energyPrefix.physicalBin_radial_density_flux hT hX hV B measurableSet_Icc hJ + (by change 0

representativeReceiverCost s F zX w k a b g) k)≤ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,g t) := by + obtain ⟨C,hC,hbound⟩ := hd.representative_receiver_envelope T₀ + refine ⟨C*((1-selectionDecay)⁻¹)^4,by positivity,?_⟩ + intro M A hM hA + filter_upwards [receiverCoefficient_on_selected_bins 512 16384 M A (by norm_num) hM.le hA.le, + eventually_ge_atTop (1:ℝ)] with P hsafe hP + intro s T F hs hT hTT zX a b I w g ha hb hw hwP hI hIP hg hgf + dsimp only + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + let L := ∫⁻t in Icc a b,g t + have hw0 : 0hk.1.1) (fun _ hk=>hk.1.2.1) + (fun k=>ENNReal.ofReal ((C*w^(-1/2:ℝ))*selectionWeight P (cappedRepresentative (k 1)) + (cappedRepresentative (k 2)) (cappedRepresentative (k 3)))) (fun _ _=>le_rfl) + classical + calc + _ ≤ ∑'k : Fin 4→ℕ,Q.indicator (fun k=>ENNReal.ofReal ((C*w^(-1/2:ℝ))* + selectionWeight P (cappedRepresentative (k 1)) (cappedRepresentative (k 2)) + (cappedRepresentative (k 3)))*L) k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · change Q.indicator _ k≤_ + simpa only [indicator_of_mem hk] using hpt k hk + · change Q.indicator _ k≤_ + simp only [indicator_of_notMem hk,le_refl] + _ = (∑'k : Fin 4→ℕ,Q.indicator (fun k=>ENNReal.ofReal ((C*w^(-1/2:ℝ))* + selectionWeight P (cappedRepresentative (k 1)) (cappedRepresentative (k 2)) + (cappedRepresentative (k 3)))) k)*L := by + simp_rw [indicator_mul_left] + exact ENNReal.tsum_mul_right + _ ≤ ENNReal.ofReal ((C*w^(-1/2:ℝ))*((1-selectionDecay)⁻¹)^4)*L := mul_le_mul' hwgt le_rfl + _ = _ := by congr 2; ring + +def representativeTimeWeightCost (s : Solution) {T : ℝ} (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (w I : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + ENNReal.ofReal (θ/(I*φ)) * + (∫⁻z : ConeCoordinate,ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B (Icc a b)) + +lemma representativeTimeWeightCost_eq (s : Solution) {T : ℝ} (F : PhaseFlowOn s.E s.B T) + (zX : Phase) {w I : ℝ} (hw : 01) := by + have hφ := cappedRepresentative_pos (k 2) + unfold representativeTimeWeightCost representativeReceiverCost + dsimp only + simp only [one_mul] + rw [←mul_assoc,←ENNReal.ofReal_mul (by positivity)] + congr 2 + field_simp + +lemma Admissible.time_weight_bin_near {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → a≤b → 01) ha hb hw measurable_const (by simp) + dsimp only at he + rw [lintegral_const,one_mul,Measure.restrict_apply_univ,Real.volume_Icc] at he + rw [representativeTimeWeightCost_eq s F zX hw hI] + apply (mul_le_mul' le_rfl he).trans + calc + _≤ENNReal.ofReal (w*φ/I)*(ENNReal.ofReal (C*(w⁻¹*(h^2*(p*θ)^3)))*ENNReal.ofReal I) := by + apply mul_le_mul' le_rfl + exact mul_le_mul' (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_left (min_le_left _ _) (inv_nonneg.mpr hw.le)) hC)) + (ENNReal.ofReal_le_ofReal hJI) + _=ENNReal.ofReal (C*h^2*p^3*θ^3*φ) := by + rw [←ENNReal.ofReal_mul (by positivity),←ENNReal.ofReal_mul (by positivity)] + congr 1 + field_simp + +lemma Admissible.selected_long_time_weight_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,0

representativeTimeWeightCost s F zX w I k a b) k)≤ + ENNReal.ofReal (C*P*Real.sqrt I) := by + obtain ⟨C,hC,hbound⟩ := hd.time_weight_bin_near T₀ + refine ⟨C*((1-selectionDecay)⁻¹)^4,by positivity,?_⟩ + intro M A P hP s T F hs hT hTT zX a b I w ha hb hab hI hJI hw + dsimp only + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k ∧ + Ihk.1.1) (fun _ hk=>hk.1.2.1) + (fun k=>representativeTimeWeightCost s F zX w I k a b) hbnd + convert hh using 1 + congr 1 + ring + +lemma representativeTimeWeightCost_le_central {s : Solution} {T a b w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (k : Fin 4→ℕ) (hI : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hφ : 0<φ := cappedRepresentative_pos _ + have hθ : 0<θ := cappedRepresentative_pos _ + have hpos : 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hc : (θ/(I*φ))*B.rmax≤2*max 1 T := by + change (θ/(I*φ))*(2*max 1 T*h)≤_ + have ht : θ/φ≤1 := (div_le_one hφ).mpr hθφ + have hr : h/I≤1 := (div_le_one hI).mpr hh + have hprod : (θ/φ)*(h/I)≤1 := calc + _≤1*(h/I) := mul_le_mul_of_nonneg_right ht (by positivity) + _≤1 := by simpa only [one_mul] using hr + calc + _=(2*max 1 T)*((θ/φ)*(h/I)) := by ring + _≤(2*max 1 T)*1 := mul_le_mul_of_nonneg_left + hprod (by positivity) + _=_ := mul_one _ + unfold representativeTimeWeightCost representativeCentralCost + dsimp only + change ENNReal.ofReal (θ/(I*φ))*(∫⁻z : ConeCoordinate,ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B (Icc a b))≤_ + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + ←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable B measurableSet_Icc)] with z hz + apply (mul_le_mul' le_rfl (mul_le_mul' (ENNReal.ofReal_le_ofReal hz.2.2.1.2) le_rfl)).trans + rw [←mul_assoc,←ENNReal.ofReal_mul (by positivity : 0≤θ/(I*φ))] + exact mul_le_mul' (ENNReal.ofReal_le_ofReal hc) le_rfl + +lemma Admissible.selected_time_weight_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + (∑'k : Fin 4→ℕ,Q.indicator (fun k=>representativeTimeWeightCost s F zX w I k a b) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.central_uniform T₀ + obtain ⟨Cl,hCl,hlong⟩ := hd.selected_long_time_weight_uniform T₀ + let K := 2*max 1 T₀ + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨K*Cc+Cl,by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP HZ + dsimp only + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + let Ql := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k ∧ + IrepresentativeCentralCost s F zX w k a b + let ft := fun k=>representativeTimeWeightCost s F zX w I k a b + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hfirst : P*Real.sqrt I≤B := by + exact le_add_of_nonneg_right (by positivity) + have hpoint (k : Fin 4→ℕ) : Q.indicator ft k≤ + ENNReal.ofReal K*(centralIndexSector P).indicator fc k+Ql.indicator ft k := by + by_cases hk : k∈Q + · rw [indicator_of_mem hk] + by_cases hh : IrepresentativeCentralCost s F zX w k a b)] at hc + have hl := hlong M A P (zero_lt_one.trans_le hP) s T F hs hT hTT zX a b I w ha hb hab hI hJI + (zero_lt_one.trans_le hw) + change (∑'k,Q.indicator ft k)≤_ + calc + _≤∑'k,(ENNReal.ofReal K*(centralIndexSector P).indicator fc k+Ql.indicator ft k) := + ENNReal.tsum_le_tsum hpoint + _=ENNReal.ofReal K*(∑'k,(centralIndexSector P).indicator fc k)+(∑'k,Ql.indicator ft k) := by + rw [ENNReal.tsum_add,ENNReal.tsum_mul_left] + _≤ENNReal.ofReal K*ENNReal.ofReal (Cc*B)+ENNReal.ofReal (Cl*(P*Real.sqrt I)) := by + exact add_le_add (mul_le_mul' le_rfl hc) (by simpa only [mul_assoc] using hl) + _≤ENNReal.ofReal K*ENNReal.ofReal (Cc*B)+ENNReal.ofReal (Cl*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hfirst hCl)) + _=ENNReal.ofReal ((K*Cc+Cl)*B) := by + rw [←ENNReal.ofReal_mul hK,←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma PhaseFlowOn.bulkRemainder_density {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (hw : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) : + (∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (remainderConeKernel s F.flow zX) W J (z,v)‖)≤ + ENNReal.ofReal 147*physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2+ + ENNReal.ofReal (15424*(cappedRepresentative (k 1)/(w*(cappedRepresentative (k 2))^2)))* + (ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX z.1‖*ENNReal.ofReal (z.1-z.2.1)* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + let c := 15424*(cappedRepresentative (k 1)/(w*(cappedRepresentative (k 2))^2)) + have hc : 0≤c := by dsimp [c]; positivity + have hcoeff : 0≤147+c*‖prefixMomentumForce s F.flow T zX z.1‖*(z.1-z.2.1) := by positivity + have hb : (∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (remainderConeKernel s F.flow zX) W J (z,v)‖)≤ + ENNReal.ofReal (147+c*‖prefixMomentumForce s F.flow T zX z.1‖*(z.1-z.2.1))* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2 := by + unfold physicalBinDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + rw [←ENNReal.ofReal_mul hcoeff] + apply ENNReal.ofReal_le_ofReal + have hcost {radius density theta phi speed : ℝ} {normal momentum receiver force : Vec} + (hnormal : ‖normal‖=1) (hradius : 0(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal 147*representativeCentralCost s F zX w k a b+ + ENNReal.ofReal 15424*representativeReceiverCost s F zX w k a b + (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hX : Measurable (fun t=>(prefixFlow F.flow T zX t).1) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).fst.measurable + have hN := physicalBinDensity_aemeasurable hs hT hX hV (representativeClosedBin T w k) + measurableSet_Icc (Icc_subset_Icc ha hb) + have hcost := fun z hz=>F.bulkRemainder_density hs zX hw Q (Icc_subset_Icc ha hb) W hW k hsmall (z:=z) hz + have hbnd := setLIntegral_mono' (μ:=volume.prod (volume.prod sphereMeasure)) (measurableSet_physicalBinBase hV (representativeClosedBin T w k) measurableSet_Icc) hcost + apply hbnd.trans_eq + unfold physicalBinMeasure at hN + rw [lintegral_add_left' (hN.const_mul _),lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + unfold representativeCentralCost representativeReceiverCost + dsimp only + rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤15424),mul_assoc] + rfl + +lemma PhaseFlowOn.bulkRate_bin_integral {s : Solution} {T w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (hI : 0I⁻¹ • normalisedRatePrimitive F.flow zX p) W (Icc a b) (z,v)‖ + ∂volume ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal 52*representativeTimeWeightCost s F zX w I k a b := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + rw [representativeTimeWeightCost,←mul_assoc,←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤52)] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_physicalBinBase hV _ measurableSet_Icc) + intro z hz + unfold physicalBinDensity + rw [←mul_assoc,←lintegral_const_mul' _ _ (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ENNReal.ofReal_ne_top)] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hn : 0≤52*(cappedRepresentative (k 1)/(I*cappedRepresentative (k 2))) := by positivity + rw [←ENNReal.ofReal_mul hn,←ENNReal.ofReal_mul (mul_nonneg hn hr)] + apply ENNReal.ofReal_le_ofReal + have hcost {radius density theta phi duration : ℝ} {normal momentum receiver : Vec} + (hnormal : ‖normal‖=1) (hradius : 0I⁻¹ • normalisedRatePrimitive F.flow zX state) W (Icc a b) (z,v)).trans + rw [indicator_of_mem hz.1] + apply ((W z.1).le_opNorm _).trans + apply (mul_le_mul_of_nonneg_right (hW _ hz.1) (norm_nonneg _)).trans + rw [one_mul,triangleConeKernel,indicator_of_mem hphase,smul_smul,mul_comm] + simpa only [triangleKernelState,normalisedRatePrimitive] using + hcost (sphere_norm z.2.2) (sub_pos.mpr hphase.2.2) + (by simpa only [hflow] using hdensity) hθ hφ (cappedRepresentative_le_one _) + hI hsmall hv.2.1 hdeficit + · simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem hphase,map_zero,norm_zero] + positivity + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/RelativeClosedBinHitGeometry.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/RelativeClosedBinHitGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..56fe09481c80170c9455d28f39e981802d486fb9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/RelativeClosedBinHitGeometry.lean @@ -0,0 +1,408 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.ClosedEulerianCrudeBudget + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma relative_closed_bin_hit_geometry {α : Phase → ℝ → Phase} {zX z : Phase} + {B : ClosedConeBin} {t r φ σ : ℝ} (hbin : InClosedConeBin α zX B t r z) + (hr : 0 < B.rmin) (hφ : 0 < φ) (hσ : 0 < σ) + (hDhi : B.Dmax ≤ 8*φ^2) (helo : σ^2/2 ≤ B.emin) (hehi : B.emax ≤ 8*σ^2) + (hq : 4 ≤ σ*B.qmin) (hw : 4 ≤ σ*B.wmin) : + ∃ n : Vec, ‖n‖=1 ∧ (α zX t).1-(α z r).1=(t-r) • n ∧ + ‖velocity (α zX t).2-n‖ ≤ 4*φ ∧ + σ/2 ≤ ‖velocity (α z r).2-velocity (α zX t).2‖ ∧ + ‖velocity (α z r).2-velocity (α zX t).2‖ ≤ 4*σ := by + have hR : 0 < t-r := hr.trans_le hbin.2.1.1 + have hb := (inClosedConeBin_iff hR).mp hbin + let n : Vec := (t-r)⁻¹ • ((α zX t).1-(α z r).1) + have hn : ‖n‖=1 := by + dsimp only [n] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hR),← hb.1, + inv_mul_cancel₀ hR.ne'] + have hgeom : (α zX t).1-(α z r).1=(t-r) • n := by + dsimp only [n] + rw [smul_smul,mul_inv_cancel₀ hR.ne',one_smul] + have hhi : 1-dot n (velocity (α zX t).2) ≤ 8*φ^2 := + hb.2.2.2.2.2.1.2.trans hDhi + have hinv (z' : Phase) (qlo : ℝ) (hlo : qlo ≤ q z'.2) + (hsmall : 4 ≤ σ*qlo) : (q z'.2)⁻¹ ≤ σ/4 := by + rw [inv_le_iff_one_le_mul₀ (q_pos _)] + have hh := mul_le_mul_of_nonneg_left hlo hσ.le + nlinarith + have hsource := hinv (α z r) B.qmin hb.2.2.1.1 hq + have hreceiver := hinv (α zX t) B.wmin hb.2.2.2.1.1 hw + have hlower := actual_relative_separation hσ.le hsource hreceiver + (helo.trans hb.2.2.2.2.2.2.1) + have hupper : ‖velocity (α z r).2-velocity (α zX t).2‖ ≤ 4*σ := by + have hid := relative_angle_identity (α z r).2 (α zX t).2 + have hh := hb.2.2.2.2.2.2.2.trans hehi + nlinarith [sq_nonneg ((q (α z r).2)⁻¹),sq_nonneg ((q (α zX t).2)⁻¹), + norm_nonneg (velocity (α z r).2-velocity (α zX t).2)] + have hrec : ‖velocity (α zX t).2-n‖ ≤ 4*φ := by + rw [norm_sub_rev] + have hid := cone_angle_identity (α zX t).2 n hn + nlinarith [sq_nonneg ((q (α zX t).2)⁻¹),norm_nonneg (n-velocity (α zX t).2)] + exact ⟨n,hn,hgeom,hrec,hlower,hupper⟩ + +lemma PhaseFlowOn.relative_closed_bin_cell_data {s : Solution} + {T M A P L lo hi a b c d massScale φ σ C p : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (B : ClosedConeBin) {S : Set Phase} + (hlo0 : 0 ≤ lo) (hhiT : hi ≤ T) + (hJ : Icc a b ⊆ Icc lo hi) (hC : Icc c d ⊆ Icc lo hi) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hσ : 0 < σ) (hσ1 : σ ≤ 1) (hconst : 128 ≤ C) + (hlen : hi-lo ≤ (C*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hDhi : B.Dmax ≤ 8*φ^2) + (helo : σ^2/2 ≤ B.emin) (hehi : B.emax ≤ 8*σ^2) + (hq : 4 ≤ σ*B.qmin) (hw : 4 ≤ σ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + ∀ z, (closedBinHits F.flow zX B S a b c d z).Nonempty → + volume (closedBinHits F.flow zX B S a b c d z) ≤ ENNReal.ofReal (40*B.rmax*(1+φ/σ)) ∧ + ∀ t∈Icc c d, p/256 ≤ q (F.flow z t).2 ∧ q (F.flow z t).2 ≤ p/16 ∧ + σ/4 ≤ ‖velocity (F.flow z t).2-velocity (F.flow zX t).2‖ ∧ + ‖velocity (F.flow z t).2-velocity (F.flow zX t).2‖ ≤ 5*σ := by + let U := Icc lo hi + have hUT : U ⊆ Icc 0 T := Icc_subset_Icc hlo0 hhiT + have hCT : Icc c d ⊆ Icc 0 T := hC.trans hUT + have hstable (z : Phase) (H : IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (r : ℝ) (hr : r∈U) (hqm : massScale ≤ q (F.flow z r).2) := + H.velocity_stability_scale hlo0 hhiT hr ((F.continuousOn_time z).snd.mono hUT) + hM hA hP hL hm hσ hσ1 hconst hqm hlen + intro z hz + obtain ⟨r₀,hzS,hr₀,t₀,ht₀,hbin₀⟩ := hz + have hsource := hstable z (HZ z hzS) r₀ (hC hr₀) (hmq.trans hbin₀.2.2.1.1) + have hreceiver := hstable zX HX t₀ (hJ ht₀) (hmw.trans hbin₀.2.2.2.1.1) + obtain ⟨n₀,_,_,_,hsep₀,hupper₀⟩ := relative_closed_bin_hit_geometry hbin₀ hr hφ hσ hDhi helo hehi hq hw + have href (t : ℝ) (ht : t∈U) : + ‖velocity (F.flow z t).2-velocity (F.flow zX t).2- + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2)‖ ≤ σ/16 := by + have hh := relative_ref_triangle (hsource t ht).2.1 (hreceiver t ht).2.1 + linarith + constructor + · have hsep (r : ℝ) (hrH : r∈closedBinHits F.flow zX B S a b c d z) : + ‖(F.flow z r).1-(F.flow zX r).1‖ ≤ 5*B.rmax*(φ+σ) := by + obtain ⟨_,hrC,t,htJ,hbin⟩ := hrH + obtain ⟨n,_,hgeom,hangle,_,_⟩ := relative_closed_bin_hit_geometry hbin hr hφ hσ hDhi helo hehi hq hw + have hrt : r ≤ t := by linarith [hbin.2.1.1] + have hsub : Icc r t ⊆ U := Icc_subset_Icc (hC hrC).1 (hJ htJ).2 + have hh := retarded_same_time_separation hrt + (fun u hu => ((F.ode zX u (hUT (hsub hu))).mono (hsub.trans hUT)).fst) + (fun u hu => velocity_ref_triangle (hreceiver u (hsub hu)).2.1 + (hreceiver t (hJ htJ)).2.1 hangle) hgeom + have hrad : 0 ≤ B.rmax := (sub_nonneg.mpr hrt).trans hbin.2.1.2 + calc + _ ≤ (4*φ+2*(σ/32))*(t-r) := hh + _ ≤ (5*(φ+σ))*B.rmax := mul_le_mul (by linarith) hbin.2.1.2 + (sub_nonneg.mpr hrt) (by positivity) + _ = _ := by ring + have hh := stable_cell_duration (convex_Icc c d) + (show closedBinHits F.flow zX B S a b c d z ⊆ Icc c d from fun _ h => h.2.1) + (half_pos hσ) hsep₀ ((F.continuousOn_time zX).fst.mono hCT) + ((F.continuousOn_time z).fst.mono hCT) + (fun r hr => ((F.ode zX r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst) + (fun r hr => ((F.ode z r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst) + (fun r hr => (href r (hC (interior_subset hr))).trans (by linarith)) hsep + convert hh using 1 + congr 1 + field_simp; ring + · intro t ht + have hq := (hsource t (hC ht)).2.2 + have hqlo := hqmin.trans hbin₀.2.2.1.1 + have hqhi := hbin₀.2.2.1.2.trans hqmax + refine ⟨by linarith,by linarith,?_,?_⟩ + · have hn := norm_sub_norm_le + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2) + (velocity (F.flow z t).2-velocity (F.flow zX t).2) + have hh : ‖(velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2)- + (velocity (F.flow z t).2-velocity (F.flow zX t).2)‖ ≤ σ/16 := by + rw [norm_sub_rev] + exact href t (hC ht) + linarith + · have hn := norm_sub_norm_le + (velocity (F.flow z t).2-velocity (F.flow zX t).2) + (velocity (F.flow z r₀).2-velocity (F.flow zX t₀).2) + linarith [href t (hC ht)] + +lemma PhaseFlowOn.relative_closed_bin_cell_crude {s : Solution} + {T M A P L lo hi a b c d massScale φ σ C p : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (t₀ : ℝ) (ht₀ : t₀∈Icc c d) (zX : Phase) (B : ClosedConeBin) {S : Set Phase} + (hlo0 : 0 ≤ lo) (hhiT : hi ≤ T) + (hJ : Icc a b ⊆ Icc lo hi) (hC : Icc c d ⊆ Icc lo hi) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hφ : 0 < φ) (hσ : 0 < σ) (hσ1 : σ ≤ 1) (hconst : 128 ≤ C) + (hlen : hi-lo ≤ (C*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2) + (hqmin : p/128 ≤ B.qmin) (hqmax : B.qmax ≤ p/32) + (hmq : massScale ≤ B.qmin) (hmw : massScale ≤ B.wmin) + (hr : 0 < B.rmin) (hDhi : B.Dmax ≤ 8*φ^2) + (helo : σ^2/2 ≤ B.emin) (hehi : B.emax ≤ 8*σ^2) + (hq : 4 ≤ σ*B.qmin) (hw : 4 ≤ σ*B.wmin) + (HX : IncrementBootstrap (fun t => (F.flow zX t).2) T M A P L) + (HZ : ∀ z∈S, IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) : + ENNReal.ofReal (p/256) * + labelOccupation (fun z => s.f (0,z)) (closedBinHits F.flow zX B S a b c d) ≤ + ENNReal.ofReal (40*B.rmax*(1+φ/σ)) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + have hdata := F.relative_closed_bin_cell_data zX B hlo0 hhiT hJ hC hM hA hP hL + hm hφ hσ hσ1 hconst hlen hqmin hqmax hmq hmw hr hDhi helo hehi hq hw HX HZ + apply F.label_occupation_cell_bound hs ((hC.trans (Icc_subset_Icc hlo0 hhiT)) ht₀) + · intro z + by_cases hz : (closedBinHits F.flow zX B S a b c d z).Nonempty + · exact (hdata z hz).1 + · simp only [not_nonempty_iff_eq_empty.mp hz,measure_empty,zero_le] + · exact fun z hz => ((hdata z hz).2 t₀ ht₀).1 + +lemma selectedSourceCells_card {T len a b r : ℝ} (hlen : 0(F.flow zX t).2) T M A P L) + (HZ : ∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) : + ENNReal.ofReal (p/256)*labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B S a b 0 T)≤ + ENNReal.ofReal (40*B.rmax*(1+φ/σ))* + ENNReal.ofReal ((2+(b-a+B.rmax)/len)*(∫x : Vec,totalEnergy s (0,x))) := by + classical + let l := sourceCellLo len + let u := sourceCellHi T len + let w := fun i=>min T (u i+B.rmax) + let N := selectedSourceCells T len a b B.rmax + let E := ∫x : Vec,totalEnergy s (0,x) + let D := 40*B.rmax*(1+φ/σ) + let O := fun i=>labelOccupation (fun z=>s.f (0,z)) + (closedBinHits F.flow zX B S a b (l i) (u i)) + have hE : 0≤E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hD : 0≤D := by dsimp [D]; positivity + have hgrid (i : ℕ) (hi : i∈N) : + 0≤l i ∧ l i≤u i ∧ u i≤T ∧ u i-l i≤len := + selectedSourceCells_subset_prefix hT hlen hi + have hJC (i : ℕ) : Icc (max a (l i)) (min b (u i+B.rmax))⊆Icc (l i) (w i) := by + intro t ht + exact ⟨(le_max_right _ _).trans ht.1, + le_min ((ht.2.trans (min_le_left _ _)).trans hb) (ht.2.trans (min_le_right _ _))⟩ + have hCC (i : ℕ) (hi : i∈N) : Icc (l i) (u i)⊆Icc (l i) (w i) := by + intro t ht + exact ⟨ht.1,le_min (ht.2.trans (hgrid i hi).2.2.1) (by linarith [ht.2])⟩ + have hST (i : ℕ) (hi : i∈N) : + w i-l i≤(C*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2 := by + have hg := (hgrid i hi).2.2.2 + have hw' : w i≤u i+B.rmax := min_le_right _ _ + linarith + have hsum : labelOccupation (fun z=>s.f (0,z)) (closedBinHits F.flow zX B S a b 0 T)≤ + ∑i∈N,O i := by + rw [closedBinHits_clip_source] + apply F.closedBinHits_occupation_le_sum hs hT zX B hS N l u (Icc_subset_Icc ha hb) + · intro i hi + exact Icc_subset_Icc (hgrid i hi).1 (hgrid i hi).2.2.1 + · exact selectedSourceCells_cover hlen + have hpay (i : ℕ) (hi : i∈N) : ENNReal.ofReal (p/256)*O i≤ENNReal.ofReal D*ENNReal.ofReal E := by + dsimp only [O] + rw [closedBinHits_clip_receiver] + exact F.relative_closed_bin_cell_crude hs (l i) (left_mem_Icc.mpr (hgrid i hi).2.1) + zX B (hgrid i hi).1 (min_le_left _ _) (hJC i) (hCC i hi) + hM hA hP hL hm hφ hσ hσ1 hconst (hST i hi) + hqmin hqmax hmq hmw hr hDhi helo hehi hq hw HX HZ + have hcount : (N.card:ℝ≥0∞)≤ENNReal.ofReal (2+(b-a+B.rmax)/len) := by + rw [←ENNReal.ofReal_natCast] + exact ENNReal.ofReal_le_ofReal (selectedSourceCells_card hlen hab hrmax) + calc + _ ≤ ENNReal.ofReal (p/256)*(∑i∈N,O i) := mul_le_mul' le_rfl hsum + _ = ∑i∈N,ENNReal.ofReal (p/256)*O i := Finset.mul_sum _ _ _ + _ ≤ ∑i∈N,ENNReal.ofReal D*ENNReal.ofReal E := Finset.sum_le_sum hpay + _ = (N.card:ℝ≥0∞)*(ENNReal.ofReal D*ENNReal.ofReal E) := by simp + _ ≤ ENNReal.ofReal (2+(b-a+B.rmax)/len)*(ENNReal.ofReal D*ENNReal.ofReal E) := + mul_le_mul' hcount le_rfl + _ = _ := by + rw [ENNReal.ofReal_mul (by positivity : 0≤2+(b-a+B.rmax)/len)] + dsimp only [D,E] + ac_rfl + +lemma PhaseFlowOn.relative_closedEulerian_stable {s : Solution} + {T M A P L a b massScale φ σ C p len : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (ha : 0≤a) (hb : b≤T) (hab : a≤b) (hp : 0(F.flow zX t).2) T M A P L) + (HZ : ∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) : + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (40*B.rmax*(1+φ/σ))/ENNReal.ofReal (p/256)* + ENNReal.ofReal ((2+(b-a+B.rmax)/len)*(∫x : Vec,totalEnergy s (0,x))) := by + have ho := F.relative_closed_bin_stable hs hT zX B hS ha hb hab hlen hM hA hP hL + hm hφ hσ hσ1 hconst hstable hqmin hqmax hmq hmw hr hrmax hrad hDhi helo hehi hq hw HX HZ + have hbnd := mul_le_mul' (le_refl ((ENNReal.ofReal (p/256))⁻¹)) ho + rw [←mul_assoc,ENNReal.inv_mul_cancel (ENNReal.ofReal_pos.mpr (by positivity : 0

s.f (0,z)) + (closedBinHits F.flow zX B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) ≤ + labelOccupation (fun z=>s.f (0,z)) (closedBinHits F.flow zX B S a b 0 T) from ?_).trans ?_) + · unfold labelOccupation + apply lintegral_mono + intro z + apply mul_le_mul' le_rfl + apply measure_mono + rintro u ⟨hz,hu,t,ht,hbin⟩ + exact ⟨hz,⟨(le_max_left _ _).trans hu.1,hu.2.trans (min_le_left _ _)⟩,t,ht,hbin⟩ + · exact hbnd.trans_eq (by simp only [div_eq_mul_inv]; ac_rfl) + +lemma PhaseFlowOn.relative_closedEulerian_baseline {s : Solution} + {T M A P L a b massScale φ σ C p len I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (ha : 0≤a) (hb : b≤T) (hab : a≤b) (hp : 0(F.flow zX t).2) T M A P L) + (HZ : ∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) : + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (30720*B.rmax/p*(1+φ/σ)*(1+I/len))* + ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x)) := by + have hI : 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) k)≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + classical + obtain ⟨Cs,hCs,hsum⟩ := hd₀.central_density_stable_sum + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + refine ⟨Cs*Cn^2,by positivity,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hsource HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w} + let f := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator f=(source∩sector).indicator f := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,indicator_of_mem (show k∈source∩sector from ⟨hsrc,hk⟩)] + · rw [indicator_of_mem hk,indicator_of_notMem (show k∉source∩sector from fun h=>hsrc h.1)] + dsimp [f] + rw [F.physicalBinDensity_integral_source_truncate hs hsource N hN X V hα.snd.measurable + measurableSet_Icc (Icc_subset_Icc ha hb) w k hsrc,mul_zero] + · rw [indicator_of_notMem hk,indicator_of_notMem (show k∉source∩sector from fun h=>hk h.2)] + have hset : source∩sector={k : Fin 4→ℕ | k 0⟨h.1.1,h.1.2.1,h.1.2.2,h.2⟩,fun h=>⟨⟨h.1,h.2.1,h.2.2.1⟩,h.2.2.2⟩⟩ + change (∑'k,sector.indicator f k)≤_ + rw [heq,hset] + have hbnd := hsum s T F hs hT h0 zX S N a b w M A P hS hS0 ha hb hab + hM hA hP hL hw hwP HX HZ + apply hbnd.trans + have hE : 0≤E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hL0 : 0≤Real.log (2+P) := zero_le_one.trans hL + have hscalar : Real.sqrt (Real.log (2+P))*(N:ℝ)^2≤Cn^2*(Real.log (2+P))^3 := by + calc + _ ≤ Real.log (2+P)*(Cn*Real.log (2+P))^2 := + mul_le_mul (Real.sqrt_le_self_iff.mpr (Or.inr hL)) + (pow_le_pow_left₀ (Nat.cast_nonneg N) hNc _) (by positivity) hL0 + _ = _ := by ring + apply ENNReal.ofReal_le_ofReal + calc + _ = (Cs*(1+E)*(1+16384*(M+Real.sqrt A))*w)* + (Real.sqrt (Real.log (2+P))*(N:ℝ)^2) := by ring + _ ≤ (Cs*(1+E)*(1+16384*(M+Real.sqrt A))*w)*(Cn^2*(Real.log (2+P))^3) := + mul_le_mul_of_nonneg_left hscalar (by positivity) + _ = _ := by dsimp [E]; ring + +lemma capped_radius_tail {H R : ℝ} (hH : 0min (H*(2:ℝ)^k) (R^2/(H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0 ≤ g k := by dsimp [g]; positivity + have hg : Summable g ∧ (∑'k : ℤ,g k) ≤ 6*R := by + simpa only [one_pow,one_mul,mul_one,Real.sqrt_one] using + (geometry_radial_balance (I:=1) (p:=1) (θ:=1) (φ:=1) (by norm_num) hR + (by norm_num) (by norm_num) (by norm_num) hH) + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ ≤ ∑'n : ℕ,ENNReal.ofReal (g (-(n:ℤ))) := by + apply ENNReal.tsum_le_tsum + intro n + by_cases hn : H*cappedRepresentative n ≤ R + · rw [ite_eq_left hn] + apply ENNReal.ofReal_le_ofReal + dsimp [g] + rw [←he] + apply le_min le_rfl + apply (le_div_iff₀ (mul_pos hH (cappedRepresentative_pos n))).mpr + nlinarith [sq_le_sq₀ (mul_pos hH (cappedRepresentative_pos n)).le hR.le |>.mpr hn] + · rw [ite_eq_right hn] + exact bot_le + _ ≤ ∑'k : ℤ,ENNReal.ofReal (g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun index => ENNReal.ofReal (g index)) + _ = ENNReal.ofReal (∑'k : ℤ,g k) := (ENNReal.ofReal_tsum_of_nonneg hg0 hg.1).symm + _ ≤ _ := ENNReal.ofReal_le_ofReal hg.2 + +lemma Admissible.central_density_near_bin {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (k : Fin 4→ℕ) (J : Set ℝ) (I w : ℝ), + MeasurableSet J → J⊆Icc 0 T → 0 ≤ I → volume J ≤ ENNReal.ofReal I → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + ENNReal.ofReal (78400000*φ^2/θ)* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) J) ≤ + ENNReal.ofReal (C*I*p^3*θ*φ^4*r) := by + obtain ⟨Cρ,hCρ,hdensity⟩ := hd₀.uniform_physicalBinDensity_constant + refine ⟨5780275200000*Cρ,by positivity,?_⟩ + intro s T F hs hT h0 zX k J I w hJ hJT hI hvol + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hden : ∀z∈physicalBinBase V B J, + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ≤ ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + intro z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + have hn := hdensity s T F hs h0 X V B z.1 z.2.1 z.2.2 p θ 1 hzT hp.le hθ.le (by norm_num) + (by change p/32 ≤ p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ ≤ 1 from cappedRepresentative_le_one _)] using hn + have hnear := physicalBin_density_near hα.snd.measurable B hJ hφ.le le_rfl hden + calc + _ ≤ ENNReal.ofReal (78400000*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (volume J*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + simpa only [mul_assoc] using mul_le_mul' le_rfl hnear + _ ≤ ENNReal.ofReal (78400000*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by gcongr + _ = _ := by + rw [hBmax,hBmin] + rw [←ENNReal.ofReal_mul hI, + ←ENNReal.ofReal_mul (mul_nonneg hI (by linarith : 0 ≤ 2*r-r/2)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 78400000*φ^2/θ), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ (78400000*φ^2/θ)*(128*Cρ*p^3*θ^2))] + congr 1 + change (78400000*φ^2/θ)*(128*Cρ*p^3*θ^2)*(I*(2*r-r/2)*(384*φ^2))= + 5780275200000*Cρ*I*p^3*θ*φ^4*r + field_simp [hθ.ne'] + ring + +lemma Admissible.central_density_deficit_log_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (a b w P D : ℝ), + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | max 1 T*cappedRepresentative (k 3) ≤ D/P^2} + (∑'k : Fin 4→ℕ,sector.indicator (fun k=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) k) ≤ + ENNReal.ofReal (C*D*w*(Real.log (2+P))^2) := by + classical + obtain ⟨Cρ,hCρ,hnear⟩ := hd₀.central_density_near_bin + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + refine ⟨12*128^3*Cρ*Cn^2,by positivity,?_⟩ + intro s T F hs hT h0 zX a b w P D ha hb hab hw hwP hP hL hD hsource + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let I := (w/P)^2 + let sector : Set (Fin 4→ℕ) := {k | max 1 T*cappedRepresentative (k 3) ≤ D/P^2} + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator cfun=f := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,show f k=cfun k from indicator_of_mem (show k∈source∩sector from ⟨hsrc,hk⟩) cfun] + · rw [indicator_of_mem hk,show f k=0 from indicator_of_notMem (fun h=>hsrc h.1) cfun] + dsimp [cfun] + rw [F.physicalBinDensity_integral_source_truncate hs hsource N hN X V + hα.snd.measurable measurableSet_Icc hJ w k hsrc,mul_zero] + · rw [indicator_of_notMem hk,show f k=0 from indicator_of_notMem (fun h=>hk h.2) cfun] + have hvol : volume (Icc a b) ≤ ENNReal.ofReal I := by + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hab + have hrad (np nt nf : ℕ) : (∑'nr,f ![np,nt,nf,nr]) ≤ + (if npDisjoint (Ioo (a i) (b i)) (Ioo (a j) (b j))) → + (∑i∈S,selectedAngularMovingCost s F.flow zX T w Q (directionWeight (a i) (b i) (ℓ i)))≤ + (∫⁻t in J,ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + obtain ⟨Cb,hCb,hb⟩ := hd.direction_family_moving_bound + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + refine ⟨Cb*Cn^2,by positivity,?_⟩ + intro s T F hs hT h0 zX J w P Q hP hL hsource hQ hJ hJT hw hband hv ι S a b ℓ hℓ hlen hcell hdis + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + have hsourceN : ∀z,s.f (0,z)≠0→∀σ∈Icc 0 T,1024*q (F.flow z σ).2≤(2:ℝ)^N := by + intro z hz σ hσ + exact (mul_le_mul_of_nonneg_left (hsource z hz σ hσ) (by norm_num)).trans hN + have hh := hb s T F hs hT h0 zX J w N Q hsourceN hQ hJ hJT hw hband hv ι S a b ℓ hℓ hlen hcell hdis + apply hh.trans + apply mul_le_mul' le_rfl + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ Cb*Real.sqrt (max 1 T)*(Cn*Real.log (2+P))^2/w := by gcongr + _ = _ := by ring + +lemma Admissible.direction_family_weight_log_bound {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w P : ℝ) (Q : Set (Fin 4→ℕ)), + 0

G (labelReceiverTime α zX T p) (unselectedLabelSignedForce s α zX T Q ψ p))= + fun p=>H (labelReceiverTime α zX T p) (unselectedLabelSignedForce s α zX T Q ψ p) := by + funext p + by_cases ht : labelReceiverTime α zX T p∈tsupport ψ + · rw [hG ht] + · have hz := image_eq_zero_of_notMem_tsupport ht + simp only [unselectedLabelSignedForce,hz,zero_smul,smul_zero,map_zero] + +lemma SmoothClassicalPrefix.actual_angular_decomposition {d : Datum} {s : Solution} {T w : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0 ≤ T) (hw : 0angularMultiplierCLM w (F.flow zX t).2 + let G' := fun t=>angularDerivativeCLM w (F.flow zX t).2 + (lorentzField s.E s.B (t,F.flow zX t)).2 + (∫t in Ioo (0:ℝ) T,ψ t • G t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ((∫p,G (labelReceiverTime F.flow zX T p) + (unselectedLabelSignedForce s F.flow zX T Q ψ p))+ + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ G z)+ + ∫p,selectedMultiplierCosts s F.flow zX T Q ψ G G' p) := by + dsimp only + have henergy : EnergyPrefix s T := by + refine ⟨(hs.f_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro time ht position momentum + have hh := (hs.equations time ht.1.le ht.2).1 position momentum + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro time ht position + have he := (hs.equations time ht.1.le ht.2).2.1 position + have hb := (hs.equations time ht.1.le ht.2).2.2.1 position + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + obtain ⟨hW,hW',hd⟩ := F.prefixAngular_regular henergy hT hw zX + have he := hs.selected_multiplier_decomposition hT F zX Q hψ hψb hψT hW hW' hd + have hG : EqOn (prefixAngularMultiplier s F.flow T w hw zX) + (fun t=>angularMultiplierCLM w (F.flow zX t).2) (tsupport ψ) := + fun t ht=>(prefixAngular_highband hw zX (hS ht) (hband t ht)).1 + have hG' : EqOn (prefixAngularRate s F.flow T w hw zX) + (fun t=>angularDerivativeCLM w (F.flow zX t).2 + (lorentzField s.E s.B (t,F.flow zX t)).2) (tsupport ψ) := + fun t ht=>(prefixAngular_highband hw zX (hS ht) (hband t ht)).2 + obtain ⟨_eF,eC⟩ := selected_multiplier_support_congr s F.flow zX T Q ψ hG hG' + rw [eC,selected_initial_support_congr F.flow zX T (fun z=>s.f (0,z)) Q ψ hG, + unselected_multiplier_support_congr s F.flow zX T Q ψ hG] at he + rw [←he] + apply setIntegral_congr_fun measurableSet_Ioo + intro t _ht + dsimp only + by_cases ht : t∈tsupport ψ + · rw [hG ht] + · rw [image_eq_zero_of_notMem_tsupport ht,zero_smul,zero_smul] + +lemma angularMultiplierCLM_norm_le {w : ℝ} (hw : 0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + {c d T : ℝ} (hcd : c ≤ d) (hcell : ∀i∈S,Icc (a i) (b i)⊆Icc c d) : + (∑i∈S,∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) ≤ d-c := by + have hi (i : ι) (hi : i∈S) : Integrable (directionWeight (a i) (b i) (ℓ i)) := + directionWeight_integrable (hℓ i hi) (hlen i hi) + have hn (i : ι) (hi : i∈S) (t : ℝ) : 0 ≤ directionWeight (a i) (b i) (ℓ i) t := + (directionWeight_bounds (hℓ i hi) (hlen i hi)).1 + have hsumint : Integrable (fun t=>∑i∈S,directionWeight (a i) (b i) (ℓ i) t) := + integrable_finsetSum S hi + calc + _ = ∫t in Ioo (0:ℝ) T,∑i∈S,directionWeight (a i) (b i) (ℓ i) t := by + rw [integral_finsetSum S (fun i hiS=>(hi i hiS).integrableOn)] + apply Finset.sum_congr rfl + intro i hiS + simp_rw [abs_of_nonneg (hn i hiS _)] + _ ≤ ∫t,∑i∈S,directionWeight (a i) (b i) (ℓ i) t := + integral_mono_measure Measure.restrict_le_self + (ae_of_all _ (fun t=>Finset.sum_nonneg (fun i hiS=>hn i hiS t))) hsumint + _ = ∫t in Icc c d,∑i∈S,directionWeight (a i) (b i) (ℓ i) t := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro t ht + apply Finset.sum_eq_zero + intro i hiS + exact image_eq_zero_of_notMem_tsupport + (fun hit=>ht (hcell i hiS (directionWeight_tsupport (hℓ i hiS) (hlen i hiS) hit))) + _ ≤ ∫_t in Icc c d,(1:ℝ) := by + apply integral_mono_ae hsumint.integrableOn (integrableOn_const measure_Icc_lt_top.ne) + exact ae_of_all _ (fun t=>directionWeight_sum_le_one S a b ℓ hℓ hlen hdis t) + _ = d-c := by + simp only [integral_const,Measure.real,Measure.restrict_apply_univ,Real.volume_Icc,ENNReal.toReal_ofReal (sub_nonneg.mpr hcd),smul_eq_mul,mul_one] + +lemma Admissible.direction_family_initial_bound {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (w c e : ℝ),0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j))) → + (∀i∈S,∀t∈Icc (a i) (b i),w/16 ≤ ‖(F.flow zX t).2‖) → + (∑i∈S,‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) (Q i) + (directionWeight (a i) (b i) (ℓ i)) (fun t=>angularMultiplierCLM w (F.flow zX t).2) z‖) ≤ + C*T*(e-c) := by + obtain ⟨C,hC,hbound⟩ := selectedInitialKernel_integrable_bound hd.1.continuous hd.2.1 hd.2.2.1 + refine ⟨64*C,by positivity,?_⟩ + intro s T F hs hT h0 zX w c e hw hce ι S a b ℓ Q hℓ hlen hcell hcellT hdis hband + let W := prefixAngularMultiplier s F.flow T w hw zX + have hW : Continuous W := (F.prefixAngular_regular hs hT hw zX).1 + have hWM (t : ℝ) : ‖W t‖ ≤ 64 := extendedAngularCLM_norm_le w hw _ + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext h0 + have hbnd (i : ι) (hi : i∈S) : + ‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) (Q i) + (directionWeight (a i) (b i) (ℓ i)) (fun t=>angularMultiplierCLM w (F.flow zX t).2) z‖ ≤ + 64*C*T*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := by + have hG : EqOn W (fun t=>angularMultiplierCLM w (F.flow zX t).2) + (tsupport (directionWeight (a i) (b i) (ℓ i))) := by + intro t ht + have htc := directionWeight_tsupport (hℓ i hi) (hlen i hi) ht + exact (prefixAngular_highband hw zX (hcellT i hi htc) (hband i hi t htc)).1 + rw [←selected_initial_support_congr F.flow zX T (fun z=>s.f (0,z)) (Q i) + (directionWeight (a i) (b i) (ℓ i)) hG,hdata] + have hh := (hbound s.E s.B T F zX (Q i) (directionWeight (a i) (b i) (ℓ i)) W 64 hT + (by norm_num) (directionWeight_lipschitz _ _ _).continuous.continuousOn hW.continuousOn + (fun t _=>hWM t)).2 + convert hh using 1 + ring + calc + _ ≤ ∑i∈S,64*C*T*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := Finset.sum_le_sum hbnd + _ = 64*C*T*(∑i∈S,∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := (Finset.mul_sum ..).symm + _ ≤ _ := mul_le_mul_of_nonneg_left (directionWeight_family_mass S a b ℓ hℓ hlen hdis hce hcell) (by positivity) + +lemma Admissible.supported_boundary_force_bound {d : Datum} (hd : Admissible d) + (T : ℝ) (hT : 0 ≤ T) : + ∃ C : ℝ,0 ≤ C ∧ ∀ (E B : Field) (F : PhaseFlowOn E B T) (zX : Phase), + zX∈tsupport d.f₀ → ∀t∈Ioc (0:ℝ) T, + ‖boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2)‖ ≤ C := by + obtain ⟨R,hR⟩ := hd.2.1.bddAbove_image + (show ContinuousOn (fun z : Phase=>‖z.1‖) (tsupport d.f₀) from continuous_fst.norm.continuousOn) + obtain ⟨C,hC,hb⟩ := boundaryLorentzForce_datum_bound hd T (R+T) + refine ⟨C,hC,?_⟩ + intro E B F zX hz t ht + have hx0 : ‖zX.1‖ ≤ R := hR ⟨zX,hz,rfl⟩ + have hh := (F.position_lipschitz zX).dist_le_mul t ⟨ht.1.le,ht.2⟩ 0 ⟨le_rfl,hT⟩ + simp only [F.initial,NNReal.coe_one,one_mul,Real.dist_eq,sub_zero,abs_of_nonneg ht.1.le] at hh + apply hb t ht (F.flow zX t).1 _ _ (norm_velocity_lt_one _).le + rw [mem_closedBall,dist_zero_right] + calc + ‖(F.flow zX t).1‖=‖((F.flow zX t).1-zX.1)+zX.1‖ := by rw [sub_add_cancel] + _ ≤ ‖(F.flow zX t).1-zX.1‖+‖zX.1‖ := norm_add_le _ _ + _ ≤ t+R := add_le_add (by simpa only [dist_eq_norm] using hh) hx0 + _ ≤ R+T := by linarith only [ht.2] + +lemma Admissible.direction_family_datum_bound {d : Datum} (hd : Admissible d) + (T : ℝ) (hT : 0 ≤ T) : + ∃ C : ℝ,0 ≤ C ∧ ∀ (E B : Field) (F : PhaseFlowOn E B T) (zX : Phase), + zX∈tsupport d.f₀ → ∀(w c e : ℝ),0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j))) → + (∀i∈S,∀t∈Icc (a i) (b i),w/16 ≤ ‖(F.flow zX t).2‖) → + (∑i∈S,‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • + angularMultiplierCLM w (F.flow zX t).2 + (boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2))‖) ≤ C*(e-c) := by + obtain ⟨C,hC,hbound⟩ := hd.supported_boundary_force_bound T hT + refine ⟨64*C,by positivity,?_⟩ + intro E B F zX hz w c e hw hce ι S a b ℓ hℓ hlen hcell hdis hband + have hbnd (i : ι) (hi : i∈S) : + ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • + angularMultiplierCLM w (F.flow zX t).2 + (boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 + (velocity (F.flow zX t).2))‖ ≤ + 64*C*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := by + rw [←integral_const_mul] + apply norm_integral_le_of_norm_le ((directionWeight_integrable (hℓ i hi) (hlen i hi)).norm.const_mul _).integrableOn + filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht + by_cases hψ : directionWeight (a i) (b i) (ℓ i) t=0 + · simp only [hψ,zero_smul,norm_zero,mul_zero,le_refl] + · have htc := (directionWeight_ne_zero_interior (hℓ i hi) (hlen i hi) hψ) + have hG := angularMultiplierCLM_norm_le hw + (show w/64 ≤ ‖(F.flow zX t).2‖ by linarith only [hw,hband i hi t (Ioo_subset_Icc_self htc)]) + have hB := hbound E B F zX hz t ⟨ht.1,ht.2.le⟩ + rw [norm_smul,Real.norm_eq_abs] + calc + _ ≤ |directionWeight (a i) (b i) (ℓ i) t| * (64*C) := + mul_le_mul_of_nonneg_left ((ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul hG hB (norm_nonneg _) (by norm_num))) (abs_nonneg _) + _ = _ := by ring + calc + _ ≤ ∑i∈S,64*C*(∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := Finset.sum_le_sum hbnd + _ = 64*C*(∑i∈S,∫t in Ioo (0:ℝ) T,|directionWeight (a i) (b i) (ℓ i) t|) := (Finset.mul_sum ..).symm + _ ≤ _ := mul_le_mul_of_nonneg_left (directionWeight_family_mass S a b ℓ hℓ hlen hdis hce hcell) (by positivity) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/RepresentativeCosts.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/RepresentativeCosts.lean new file mode 100644 index 0000000000000000000000000000000000000000..4cbb996660edc26f6220dfb2153dd5e003ed8686 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/RepresentativeCosts.lean @@ -0,0 +1,1180 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ArrivalConeKernelPolarNorm +import OAI.Analysis.VlasovMaxwell.Retarded.CutoffSourceTangent + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def representativeClosedBin (T w : ℝ) (k : Fin 4→ℕ) : ClosedConeBin where + rmin := max 1 T*cappedRepresentative (k 3)/2 + rmax := 2*max 1 T*cappedRepresentative (k 3) + qmin := sourceRepresentative (k 0)/128 + qmax := sourceRepresentative (k 0)/32 + wmin := w/8 + wmax := 8*w + dmin := cappedRepresentative (k 1)^2/2 + dmax := 8*cappedRepresentative (k 1)^2 + Dmin := cappedRepresentative (k 2)^2/2 + Dmax := 8*cappedRepresentative (k 2)^2 + emin := 0 + emax := 2 + +lemma representativeClosedBin_radius_pos (T w : ℝ) (k : Fin 4→ℕ) : + 0<(representativeClosedBin T w k).rmin := by + have h : 0 < max (1:ℝ) T := zero_lt_one.trans_le (le_max_left _ _) + dsimp [representativeClosedBin,cappedRepresentative] + positivity + +lemma velocity_deficit_mem_unit2 (v w : Vec) : + 1-dot (velocity w) (velocity v)∈Icc (0:ℝ) 2 := by + have hd := abs_real_inner_le_norm (velocity w) (velocity v) + rw [←dot_eq_inner] at hd + have hn : ‖velocity w‖*‖velocity v‖≤1 := + (mul_le_of_le_one_left (norm_nonneg _) (norm_velocity_lt_one w).le).trans + (norm_velocity_lt_one v).le + have ha := (abs_le.mp (hd.trans hn)) + constructor <;> linarith + +lemma physicalCutoff_positive_closedBin {T w t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (hσ : σ∈Icc 0 t) (hband : q (V t)∈Icc (w/8) (8*w)) + {k : Fin 4→ℕ} {n : Sphere} {v : Vec} + (hk : 0dyadicFactor_nonneg (k i) (x i)) + (fun i _=>dyadicFactor_le_one (k i) (x i)) + +def coneDyadicFactor (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) (k : Fin 4→ℕ) + (p : ConeKernelState) : ℝ := + dyadicMultiFactor k (physicalCutoffCoordinates T (p.1.1-p.1.2) p.2.1 p.2.2.2 (α zX p.1.1).2) + +lemma PhaseFlowOn.coneDyadicFactor_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (k : Fin 4→ℕ) : + ContinuousOn (coneDyadicFactor F.flow zX T k) (coneKernelDomain T) := by + have hV : ContinuousOn (fun p : ConeKernelState=>(F.flow zX p.1.1).2) (coneKernelDomain T) := + ((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd + have hv : Continuous (fun p : ConeKernelState=>p.2.2.2) := continuous_snd.snd.snd + have hn : Continuous (fun p : ConeKernelState=>p.2.1) := continuous_snd.fst + have hu := (contDiff_velocity (k:=1)).continuous.comp hv + have ha := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hV + have hq := (contDiff_q (k:=1)).continuous.comp hv + have hc : ∀i,ContinuousOn (fun p : ConeKernelState=>physicalCutoffCoordinates T (p.1.1-p.1.2) + p.2.1 p.2.2.2 (F.flow zX p.1.1).2 i) (coneKernelDomain T) := by + intro i + fin_cases i + · exact continuousOn_const.div hq.continuousOn (fun p _=>(q_pos p.2.2.2).ne') + · exact ((continuousOn_const.sub (continuous_dot.comp_continuousOn + (hn.continuousOn.prodMk hu.continuousOn))).div_const 2).sqrt + · exact ((continuousOn_const.sub (continuous_dot.comp_continuousOn + (hn.continuousOn.prodMk ha))).div_const 2).sqrt + · exact (continuous_fst.fst.sub continuous_fst.snd).continuousOn.div_const _ + exact continuousOn_finsetProd Finset.univ (fun i _=> + (contDiff_dyadicFactor (k i)).continuous.comp_continuousOn (hc i)) + +def projectedDyadicRateKernel (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (k : Fin 4→ℕ) (G : ℝ→Vec→L[ℝ]Vec) (p : ConeKernelState) : Vec := + coneDyadicFactor α zX T k p • G p.1.1 (normalisedRatePrimitive α zX p) + +lemma PhaseFlowOn.projectedDyadicRateKernel_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (k : Fin 4→ℕ) + {G : ℝ→Vec→L[ℝ]Vec} (hG : Continuous G) : + ContinuousOn (projectedDyadicRateKernel F.flow zX T k G) (coneKernelDomain T) := + (F.coneDyadicFactor_continuousOn zX k).smul + ((hG.comp continuous_fst.fst).continuousOn.clm_apply (F.normalisedRatePrimitive_continuousOn zX)) + +lemma normalisedRatePrimitive_flux_norm (α : Phase→ℝ→Phase) (zX : Phase) + {t σ c : ℝ} {n : Sphere} {v : Vec} (hσ : σdyadicMultiFactor k (physicalCutoffCoordinates T (t-σ) n.1 v (V t)) + let H : Vec→ℝ := fun v=>‖s.f (σ,(X t-(t-σ) • n.1,v)) • + angularMultiplierCLM w (V t) (signedPrimitive (velocity (V t)) (velocity v) n.1)‖ + have hp : ∀v, ENNReal.ofReal (χ v*(t-σ)*H v) ≤ + (coneBinMomentumSet B n.1 (velocity (V t))).indicator + (fun v=>ENNReal.ofReal ((t-σ)*H v)) v := by + intro v + by_cases hχ : 0<χ v + · have hv := (physicalCutoff_positive_closedBin ht hσ hband hχ).2 + rw [indicator_of_mem hv] + apply ENNReal.ofReal_le_ofReal + have hm := dyadicMultiFactor_le_one k (physicalCutoffCoordinates T (t-σ) n.1 v (V t)) + have hrH : 0≤(t-σ)*H v := mul_nonneg (sub_nonneg.mpr hσt.le) (norm_nonneg _) + have hm' := mul_le_mul_of_nonneg_right hm hrH + dsimp [χ] at * + nlinarith + · have hz : χ v=0 := le_antisymm (le_of_not_gt hχ) (dyadicMultiFactor_nonneg _ _) + simp only [hz,zero_mul,ENNReal.ofReal_zero] + exact bot_le + by_cases hbase : (t,σ,n)∈physicalBinBase V B J + · rw [indicator_of_mem hbase] + calc + _ ≤ ∫⁻v, (coneBinMomentumSet B n.1 (velocity (V t))).indicator + (fun v=>ENNReal.ofReal ((t-σ)*H v)) v := lintegral_mono hp + _ = ∫⁻v in coneBinMomentumSet B n.1 (velocity (V t)), ENNReal.ofReal ((t-σ)*H v) := + lintegral_indicator (measurableSet_coneBinMomentumSet _ _ _) _ + _ = _ := by + simp only [H,physicalPrimitive_radius_norm (sub_pos.mpr hσt)] + simp_rw [ENNReal.ofReal_mul (sq_nonneg (t-σ))] + exact lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + · rw [indicator_of_notMem hbase] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hχ : χ v=0 := by + apply le_antisymm _ (dyadicMultiFactor_nonneg _ _) + exact le_of_not_gt (fun h=>hbase (physicalCutoff_positive_closedBin ht hσ hband h).1) + change ENNReal.ofReal (χ v*(t-σ)*H v)=0 + simp only [hχ,zero_mul,ENNReal.ofReal_zero] + +lemma projectedDyadicRateKernel_polar_density (α : Phase→ℝ→Phase) (zX : Phase) + (s : Solution) (T w : ℝ) (k : Fin 4→ℕ) {G : ℝ→Vec→L[ℝ]Vec} {t σ : ℝ} + (hσt : σ(α zX t).1) (fun t=>(α zX t).2) T w k (t,σ,n) := by + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + rw [←ENNReal.ofReal_mul (cone_denom_pos _ _ (sphere_norm n)).le, + projectedDyadicRateKernel_flux_norm α zX T k G hσt,hG] + rfl + +def positiveCoordinate (i : Fin 3) (v : Vec) : Vec := max (v i) 0 • basis 0 + +lemma positiveCoordinate_continuous (i : Fin 3) : Continuous (positiveCoordinate i) := by + exact (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3=>ℝ) i).continuous).max continuous_const).smul continuous_const + +lemma positiveCoordinate_norm (i : Fin 3) (v : Vec) : + ‖positiveCoordinate i v‖=max (v i) 0 := by + simp only [positiveCoordinate,norm_smul,Real.norm_eq_abs,abs_of_nonneg (le_max_right (v i) (0:ℝ))] + simp [basis,PiLp.norm_single] + +lemma positiveCoordinate_zero (i : Fin 3) : positiveCoordinate i 0=0 := by + simp [positiveCoordinate] + +lemma positiveCoordinate_smul (i : Fin 3) {c : ℝ} (hc : 0≤c) (v : Vec) : + positiveCoordinate i (c • v)=c • positiveCoordinate i v := by + simp only [positiveCoordinate,PiLp.smul_apply,smul_eq_mul,smul_smul] + rw [mul_max_of_nonneg (v i) 0 hc, mul_zero] + +lemma integral_eq_of_positiveCoordinate {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] + {μ : Measure α} {ν : Measure β} {f : α→Vec} {g : β→Vec} + (hf : Integrable f μ) (hg : Integrable g ν) + (hp : ∀i, (∫⁻x,ENNReal.ofReal ‖positiveCoordinate i (f x)‖ ∂μ)= + ∫⁻y,ENNReal.ofReal ‖positiveCoordinate i (g y)‖ ∂ν) + (hn : ∀i, (∫⁻x,ENNReal.ofReal ‖positiveCoordinate i (-f x)‖ ∂μ)= + ∫⁻y,ENNReal.ofReal ‖positiveCoordinate i (-g y)‖ ∂ν) : + ∫x,f x ∂μ=∫y,g y ∂ν := by + ext i + let C := PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3=>ℝ) i + change C (∫x,f x ∂μ)=C (∫y,g y ∂ν) + rw [←C.integral_comp_comm hf,←C.integral_comp_comm hg] + rw [integral_eq_lintegral_pos_part_sub_lintegral_neg_part (C.integrable_comp hf), + integral_eq_lintegral_pos_part_sub_lintegral_neg_part (C.integrable_comp hg)] + have hp' := hp i + have hn' := hn i + have hmax (x : ℝ) : max (ENNReal.ofReal x) 0=ENNReal.ofReal x := max_eq_left (by positivity) + simp only [positiveCoordinate_norm,ENNReal.ofReal_max,ENNReal.ofReal_zero,hmax,PiLp.neg_apply] at hp' hn' + simp only [C,PiLp.proj_apply,hp',hn'] + +abbrev TrianglePhase := ConeCoordinate×Vec + +def trianglePhaseDomain (T : ℝ) : Set TrianglePhase := + {p | p.1.1∈Ioo 0 T ∧ p.1.2.1∈Ioo 0 p.1.1} + +def trianglePhaseMeasure : Measure TrianglePhase := + ((volume : Measure ℝ).prod ((volume : Measure ℝ).prod sphereMeasure)).prod volume + +def triangleKernelState (α : Phase→ℝ→Phase) (zX : Phase) (p : TrianglePhase) : ConeKernelState := + ((p.1.1,p.1.2.1),(p.1.2.2.1,((α zX p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) + +def triangleConeKernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A : ConeKernelState→Vec) : TrianglePhase→Vec := + (trianglePhaseDomain T).indicator (fun p=> + (1-dot p.1.2.2.1 (velocity (α zX p.1.1).2)) • + (s.f ((triangleKernelState α zX p).1.2,(triangleKernelState α zX p).2.2) • + A (triangleKernelState α zX p))) + +lemma measurableSet_trianglePhaseDomain (T : ℝ) : MeasurableSet (trianglePhaseDomain T) := + ((measurable_fst.fst measurableSet_Ioo).inter + ((measurableSet_lt measurable_const measurable_fst.snd.fst).inter + (measurableSet_lt measurable_fst.snd.fst measurable_fst.fst))) + +lemma PhaseFlowOn.triangleKernelState_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + ContinuousOn (triangleKernelState F.flow zX) (trianglePhaseDomain T) := by + have hX : ContinuousOn (fun p : TrianglePhase=>F.flow zX p.1.1) (trianglePhaseDomain T) := + (F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>Ioo_subset_Icc_self hp.1) + exact (continuous_fst.fst.prodMk continuous_fst.snd.fst).continuousOn.prodMk + (continuous_fst.snd.snd.subtype_val.continuousOn.prodMk + ((hX.fst.sub ((continuous_fst.fst.sub continuous_fst.snd.fst).continuousOn.smul + continuous_fst.snd.snd.subtype_val.continuousOn)).prodMk continuous_snd.continuousOn)) + +lemma triangleKernelState_mem (α : Phase→ℝ→Phase) (zX : Phase) {T : ℝ} {p : TrianglePhase} + (hp : p∈trianglePhaseDomain T) : triangleKernelState α zX p∈coneKernelDomain T := by + exact ⟨⟨Ioo_subset_Icc_self hp.1,⟨hp.2.1.le,hp.2.2.le.trans hp.1.2.le⟩⟩, + ⟨p.1.2.2.2,mem_univ _⟩⟩ + +lemma PhaseFlowOn.triangleConeKernel_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Measurable (triangleConeKernel s F.flow zX T A) := by + classical + have hS := F.triangleKernelState_continuousOn zX + have hSA := hA.comp hS (fun _ hp=>triangleKernelState_mem _ _ hp) + have hSf := hs.f_smooth.continuousOn.comp (hS.fst.snd.prodMk hS.snd.snd) + (fun _ hp=>⟨(triangleKernelState_mem F.flow zX hp).1.2,mem_univ _⟩) + have hV : ContinuousOn (fun p : TrianglePhase=>(F.flow zX p.1.1).2) (trianglePhaseDomain T) := + ((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn + (fun _ hp=>Ioo_subset_Icc_self hp.1)).snd + have hD : ContinuousOn (fun p : TrianglePhase=>1-dot p.1.2.2.1 (velocity (F.flow zX p.1.1).2)) + (trianglePhaseDomain T) := by + simp only [dot_eq_inner] + exact continuousOn_const.sub (continuous_fst.snd.snd.subtype_val.continuousOn.inner + ((contDiff_velocity (k:=1)).continuous.comp_continuousOn hV)) + exact (hD.smul (hSf.smul hSA)).measurable_piecewise continuousOn_const + (measurableSet_trianglePhaseDomain T) + +lemma PhaseFlowOn.triangleConeKernel_lintegral_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫⁻p,ENNReal.ofReal ‖triangleConeKernel s F.flow zX T A p‖ ∂trianglePhaseMeasure)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + classical + let g : TrianglePhase→ℝ≥0∞ := fun p=>ENNReal.ofReal ‖triangleConeKernel s F.flow zX T A p‖ + have hg : Measurable g := (F.triangleConeKernel_measurable hs zX hA).norm.ennreal_ofReal + have hm : Measurable (fun z : ConeCoordinate=>∫⁻v : Vec,g (z,v)) := hg.lintegral_prod_right' + have he : (∫⁻p,g p ∂trianglePhaseMeasure)= + ∫⁻t : ℝ,∫⁻σ : ℝ,∫⁻n : Sphere,∫⁻v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure := by + rw [trianglePhaseMeasure,lintegral_prod _ hg.aemeasurable,lintegral_prod _ hm.aemeasurable] + apply lintegral_congr + intro t + exact lintegral_prod _ ((hm.comp (measurable_const.prodMk measurable_id)).aemeasurable) + rw [he] + rw [←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro t + by_cases ht : t∈Ioo 0 T + · rw [indicator_of_mem ht,←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro σ + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ] + apply lintegral_congr + intro n + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + have hp : ((t,σ,n),v)∈trianglePhaseDomain T := ⟨ht,hσ⟩ + simp only [g,triangleConeKernel,indicator_of_mem hp,triangleKernelState, + norm_smul,Real.norm_eq_abs,abs_of_pos (cone_denom_pos _ _ (sphere_norm n)), + ENNReal.ofReal_mul (cone_denom_pos _ _ (sphere_norm n)).le] + · rw [indicator_of_notMem hσ] + have hz : ∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>hσ hp.2 + simp only [g,triangleConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + simp only [hz,lintegral_zero] + · rw [indicator_of_notMem ht] + have hz : ∀σ : ℝ,∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro σ n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>ht hp.1 + simp only [g,triangleConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + simp only [hz,lintegral_zero] + +lemma PhaseFlowOn.triangleConeKernel_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Integrable (triangleConeKernel s F.flow zX T A) trianglePhaseMeasure := by + refine ⟨(F.triangleConeKernel_measurable hs zX hA).aestronglyMeasurable,?_⟩ + rw [hasFiniteIntegral_iff_norm] + rw [F.triangleConeKernel_lintegral_norm hs zX hA,←F.labelConeKernel_triangle_norm hs hT zX hA] + exact ((hasFiniteIntegral_iff_norm _).mp (F.labelConeKernel_integrable hs zX hA).2) + +lemma labelConeKernel_positiveCoordinate {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) (α : Phase→ℝ→Phase) (zX : Phase) + (A : ConeKernelState→Vec) (i : Fin 3) (p : ℝ×Phase) : + labelConeKernel s α zX T (fun q=>positiveCoordinate i (A q)) p= + positiveCoordinate i (labelConeKernel s α zX T A p) := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,indicator_of_mem hp, + positiveCoordinate_smul i (sq_nonneg _),positiveCoordinate_smul i (hs.nonnegative 0 ⟨le_rfl,hT⟩ p.2)] + · simp only [labelConeKernel,indicator_of_notMem hp,positiveCoordinate_zero] + +lemma triangleConeKernel_positiveCoordinate {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (α : Phase→ℝ→Phase) (zX : Phase) + (A : ConeKernelState→Vec) (i : Fin 3) (p : TrianglePhase) : + triangleConeKernel s α zX T (fun q=>positiveCoordinate i (A q)) p= + positiveCoordinate i (triangleConeKernel s α zX T A p) := by + classical + by_cases hp : p∈trianglePhaseDomain T + · have hσ := (triangleKernelState_mem α zX hp).1.2 + simp only [triangleConeKernel,indicator_of_mem hp, + positiveCoordinate_smul i (cone_denom_pos _ _ (sphere_norm p.1.2.2)).le, + positiveCoordinate_smul i (hs.nonnegative _ hσ _)] + · simp only [triangleConeKernel,indicator_of_notMem hp,positiveCoordinate_zero] + +lemma labelConeKernel_neg (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A : ConeKernelState→Vec) (p : ℝ×Phase) : + labelConeKernel s α zX T (fun q=>-A q) p=-labelConeKernel s α zX T A p := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,indicator_of_mem hp,smul_neg] + · simp only [labelConeKernel,indicator_of_notMem hp,neg_zero] + +lemma triangleConeKernel_neg (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A : ConeKernelState→Vec) (p : TrianglePhase) : + triangleConeKernel s α zX T (fun q=>-A q) p=-triangleConeKernel s α zX T A p := by + classical + by_cases hp : p∈trianglePhaseDomain T + · simp only [triangleConeKernel,indicator_of_mem hp,smul_neg] + · simp only [triangleConeKernel,indicator_of_notMem hp,neg_zero] + +lemma PhaseFlowOn.labelConeKernel_triangle_positiveCoordinate {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) (i : Fin 3) : + (∫⁻p,ENNReal.ofReal ‖positiveCoordinate i (labelConeKernel s F.flow zX T A p)‖)= + ∫⁻p,ENNReal.ofReal ‖positiveCoordinate i (triangleConeKernel s F.flow zX T A p)‖ ∂trianglePhaseMeasure := by + have hAP := (positiveCoordinate_continuous i).comp_continuousOn hA + calc + _ = ∫⁻p,ENNReal.ofReal ‖labelConeKernel s F.flow zX T (fun q=>positiveCoordinate i (A q)) p‖ := by + simp only [labelConeKernel_positiveCoordinate hs hT] + _ = ∫⁻p,ENNReal.ofReal ‖triangleConeKernel s F.flow zX T (fun q=>positiveCoordinate i (A q)) p‖ ∂trianglePhaseMeasure := + (F.labelConeKernel_triangle_norm hs hT zX hAP).trans (F.triangleConeKernel_lintegral_norm hs zX hAP).symm + _ = _ := by simp only [triangleConeKernel_positiveCoordinate hs] + +lemma PhaseFlowOn.labelConeKernel_triangle_integral {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫p,labelConeKernel s F.flow zX T A p)= + ∫p,triangleConeKernel s F.flow zX T A p ∂trianglePhaseMeasure := by + apply integral_eq_of_positiveCoordinate (F.labelConeKernel_integrable hs zX hA) + (F.triangleConeKernel_integrable hs hT zX hA) + · exact F.labelConeKernel_triangle_positiveCoordinate hs hT zX hA + · intro i + simpa only [labelConeKernel_neg,triangleConeKernel_neg] using + F.labelConeKernel_triangle_positiveCoordinate hs hT zX (A:=fun p=>-A p) hA.neg i + +lemma PhaseFlowOn.triangleConeKernel_integral {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫p,triangleConeKernel s F.flow zX T A p ∂trianglePhaseMeasure)= + ∫t in Ioo (0:ℝ) T,∫σ in Ioo (0:ℝ) t,∫n : Sphere, + (1-dot n.1 (velocity (F.flow zX t).2)) • + ∫v : Vec,s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v))) ∂volume ∂sphereMeasure := by + classical + let g := triangleConeKernel s F.flow zX T A + have hg := F.triangleConeKernel_integrable hs hT zX hA + have hi : Integrable (fun z : ConeCoordinate=>∫v : Vec,g (z,v)) + (volume.prod (volume.prod sphereMeasure)) := hg.integral_prod_left + have he : (∫p,g p ∂trianglePhaseMeasure)= + ∫t : ℝ,∫σ : ℝ,∫n : Sphere,∫v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure := by + rw [trianglePhaseMeasure,integral_prod _ hg,integral_prod _ hi] + apply integral_congr_ae + filter_upwards [hi.prod_right_ae] with t ht + exact integral_prod _ ht + rw [he,←integral_indicator measurableSet_Ioo] + apply integral_congr_ae + exact ae_of_all _ (fun t=>by + by_cases ht : t∈Ioo 0 T + · rw [indicator_of_mem ht,←integral_indicator measurableSet_Ioo] + apply integral_congr_ae + exact ae_of_all _ (fun σ=>by + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + rw [←integral_smul] + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + have hp : ((t,σ,n),v)∈trianglePhaseDomain T := ⟨ht,hσ⟩ + simp only [g,triangleConeKernel,indicator_of_mem hp,triangleKernelState])) + · rw [indicator_of_notMem hσ] + have hz : ∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>hσ hp.2 + simp only [g,triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero]) + · rw [indicator_of_notMem ht] + have hz : ∀σ : ℝ,∀n : Sphere,∀v : Vec,g ((t,σ,n),v)=0 := by + intro σ n v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>ht hp.1 + simp only [g,triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero]) + +lemma PhaseFlowOn.triangleConeKernel_integral_sphere {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫p,triangleConeKernel s F.flow zX T A p ∂trianglePhaseMeasure)= + ∫t in Ioo (0:ℝ) T,∫n : Sphere,∫σ in Ioo (0:ℝ) t, + (1-dot n.1 (velocity (F.flow zX t).2)) • + ∫v : Vec,s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v))) ∂volume ∂volume ∂sphereMeasure := by + classical + let g := triangleConeKernel s F.flow zX T A + have hg := F.triangleConeKernel_integrable hs hT zX hA + have hi : Integrable (fun z : ConeCoordinate=>∫v : Vec,g (z,v)) + (volume.prod (volume.prod sphereMeasure)) := hg.integral_prod_left + have he : (∫p,g p ∂trianglePhaseMeasure)= + ∫t : ℝ,∫n : Sphere,∫σ : ℝ,∫v : Vec,g ((t,σ,n),v) ∂volume ∂volume ∂sphereMeasure := by + rw [trianglePhaseMeasure,integral_prod _ hg,integral_prod _ hi] + apply integral_congr_ae + filter_upwards [hi.prod_right_ae] with t ht + exact integral_prod_symm _ ht + rw [he,←integral_indicator measurableSet_Ioo] + apply integral_congr_ae + exact ae_of_all _ (fun t=>by + by_cases ht : t∈Ioo 0 T + · rw [indicator_of_mem ht] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + rw [←integral_indicator measurableSet_Ioo] + apply integral_congr_ae + exact ae_of_all _ (fun σ=>by + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ] + dsimp only + rw [←integral_smul] + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + have hp : ((t,σ,n),v)∈trianglePhaseDomain T := ⟨ht,hσ⟩ + simp only [g,triangleConeKernel,indicator_of_mem hp,triangleKernelState]) + · rw [indicator_of_notMem hσ] + have hz : ∀v : Vec,g ((t,σ,n),v)=0 := by + intro v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>hσ hp.2 + simp only [g,triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero])) + · rw [indicator_of_notMem ht] + have hz : ∀n : Sphere,∀σ : ℝ,∀v : Vec,g ((t,σ,n),v)=0 := by + intro n σ v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>ht hp.1 + simp only [g,triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero]) + +lemma physicalDyadicPrimitiveDensity_near_pointwise {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {X V : ℝ→Vec} {J : Set ℝ} (hJT : J⊆Icc 0 T) + {w C p θ φ t σ : ℝ} {k : Fin 4→ℕ} + (hw : 0ENNReal.ofReal (401408*C*(p*θ)^3*(representativeClosedBin T w k).rmax)) (t,σ,n) := by + classical + let B := representativeClosedBin T w k + have h := physicalDyadicPrimitiveDensity_le ht hσ hσt hband n (s:=s) (X:=X) (k:=k) (T:=T) + by_cases hz : (t,σ,n)∈physicalBinBase V B J + · rw [indicator_of_mem hz] at h ⊢ + have hk := physicalProjectedPrimitiveDensity_bound (s:=s) (X:=X) (z:=(t,σ,n)) + hw hv (sub_pos.mpr hσt) hθ hφ hsmall hd (hDlo.trans hz.2.2.2.2.1) + (hz.2.2.2.2.2.trans hDhi) + (fun v=>hs.nonnegative σ ⟨hσ.1,hσ.2.trans (hJT ht).2⟩ _) + have hn : 0≤B.rmax := (representativeClosedBin_radius_pos T w k).le.trans + (hz.2.2.1.1.trans hz.2.2.1.2) + have hden := hdensity (t,σ,n) hz + have hrad : ENNReal.ofReal (t-σ)≤ENNReal.ofReal B.rmax := + ENNReal.ofReal_le_ofReal hz.2.2.1.2 + have hmul : ENNReal.ofReal (3136*θ)*ENNReal.ofReal (t-σ)≤ + ENNReal.ofReal (3136*θ)*ENNReal.ofReal B.rmax := mul_le_mul' (a:=ENNReal.ofReal (3136*θ)) (b:=ENNReal.ofReal (3136*θ)) le_rfl hrad + calc + _ ≤ ENNReal.ofReal (3136*θ)*ENNReal.ofReal (t-σ)* + physicalBinDensity s X V B t σ n := h.trans hk + _ ≤ ENNReal.ofReal (3136*θ)*ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2) := + mul_le_mul' hmul hden + _ = _ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤3136*θ), + ←ENNReal.ofReal_mul (mul_nonneg (by positivity) hn)] + congr 1 + dsimp [B] + ring + · exact (h.trans (by rw [indicator_of_notMem hz,indicator_of_notMem hz])) + +lemma physicalBin_triangle_weight_le {V : ℝ→Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (T : ℝ) + {g : ℝ→ℝ≥0∞} (hg : Measurable g) : + (∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + (physicalBinBase V B J).indicator (fun z : ConeCoordinate=>g z.1) (t,σ,n) + ∂sphereMeasure)≤∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J := by + let H : ConeCoordinate→ℝ≥0∞ := (physicalBinBase V B J).indicator (fun z=>g z.1) + have hm : Measurable H := (hg.comp measurable_fst).indicator (measurableSet_physicalBinBase hV B hJ) + calc + _ ≤ ∫⁻t : ℝ,∫⁻σ : ℝ,∫⁻n : Sphere,H (t,σ,n) ∂sphereMeasure := by + calc + _ ≤ ∫⁻t in Ioo (0:ℝ) T,∫⁻σ : ℝ,∫⁻n : Sphere,H (t,σ,n) ∂sphereMeasure := by + apply lintegral_mono + intro t + exact lintegral_mono' (Measure.restrict_le_self (μ:=volume) (s:=Ioo (0:ℝ) t)) (fun _=>le_rfl) + _ ≤ _ := lintegral_mono' (Measure.restrict_le_self (μ:=volume) (s:=Ioo (0:ℝ) T)) (fun _=>le_rfl) + _ = ∫⁻z : ConeCoordinate,H z ∂volume.prod (volume.prod sphereMeasure) := by + rw [lintegral_prod _ hm.aemeasurable] + apply lintegral_congr + intro t + exact (lintegral_prod _ (hm.comp (measurable_const.prodMk measurable_id)).aemeasurable).symm + _ = _ := lintegral_indicator (measurableSet_physicalBinBase hV B hJ) _ + +lemma physicalDyadicPrimitive_triangle_near {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {X V : ℝ→Vec} (hV : Measurable V) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {w C p θ φ : ℝ} {k : Fin 4→ℕ} + (hw : 0g t*ENNReal.ofReal c) := hg.mul measurable_const + calc + _ ≤ ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + (physicalBinBase V B J).indicator (fun z : ConeCoordinate=>g z.1*ENNReal.ofReal c) (t,σ,n) + ∂sphereMeasure := by + apply setLIntegral_mono' measurableSet_Ioo + intro t _ + apply setLIntegral_mono' measurableSet_Ioo + intro σ hσ + apply lintegral_mono + intro n + by_cases ht : t∈J + · have hpw := mul_le_mul' (a:=g t) (b:=g t) le_rfl + (physicalDyadicPrimitiveDensity_near_pointwise hs hJT hw hC hp hθ hφ hsmall + hDlo hDhi hd ht (Ioo_subset_Icc_self hσ) hσ.2 (hband t ht) (hv t ht) hdensity n) + by_cases hz : (t,σ,n)∈physicalBinBase V B J + · dsimp [B] at hz + simpa only [B,c,indicator_of_mem hz] using hpw + · dsimp [B] at hz + simpa only [B,c,indicator_of_notMem hz,mul_zero] using hpw + · simp only [hgJ t ht,zero_mul] + exact bot_le + _ ≤ ∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal c ∂physicalBinMeasure V B J := + physicalBin_triangle_weight_le hV B hJ T hm + _ = (∫⁻z : ConeCoordinate,g z.1 ∂physicalBinMeasure V B J)*ENNReal.ofReal c := + lintegral_mul_const _ (hg.comp measurable_fst) + _ ≤ ((∫⁻t in J,g t)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))*ENNReal.ofReal c := + mul_le_mul' (physicalBinMeasure_receiver_weight hV B hJ hφ.le hDhi hg) le_rfl + _ = _ := by + have hr : B.rmin≤B.rmax := by + dsimp [B,representativeClosedBin] + have hh : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J, + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2≤ + ENNReal.ofReal (128*C*p^3*θ^2)) + {b : ℝ→ℝ} (hb : Measurable b) (hbJ : ∀t∉J,b t=0) : + (∫⁻z : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T z))* + ENNReal.ofReal ‖labelConeKernel s F.flow zX T + (projectedDyadicRateKernel F.flow zX T k (fun t=>angularMultiplierCLM w (F.flow zX t).2)) z‖)≤ + (∫⁻t in J,ENNReal.ofReal (b t))*ENNReal.ofReal (154140672*C*(p*θ)^3*φ^2* + (representativeClosedBin T w k).rmax*((representativeClosedBin T w k).rmax- + (representativeClosedBin T w k).rmin)) := by + let X : ℝ→Vec := fun t=>(prefixFlow F.flow T zX t).1 + let V : ℝ→Vec := fun t=>(prefixFlow F.flow T zX t).2 + let G := prefixAngularMultiplier s F.flow T w hw zX + have hV : Measurable V := + (((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd).measurable + have hG : ∀t∈J,G t=angularMultiplierCLM w (F.flow zX t).2 := + fun t ht=>(prefixAngular_highband (s:=s) hw zX (hJT ht) (hv t ht)).1 + have he : ∀t∈Icc 0 T,X t=(F.flow zX t).1 ∧ V t=(F.flow zX t).2 := by + intro t ht + simp only [X,V,prefixFlow,prefixClamp_eq ht,and_self] + calc + _ = ∫⁻z : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T z))* + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) z‖ := by + apply lintegral_congr + intro z + exact weighted_labelProjected_congr s F.flow zX T k (fun t ht=>(hG t ht).symm) hbJ z + _ = ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (b t)*physicalDyadicPrimitiveDensity s X V T w k (t,σ,n) ∂sphereMeasure := by + rw [F.labelConeKernel_triangle_weighted_norm hs hT zX + (F.projectedDyadicRateKernel_continuousOn zX k (F.prefixAngular_regular hs hT hw zX).1) hb] + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + by_cases htJ : t∈J + · rw [mul_assoc,projectedDyadicRateKernel_polar_density F.flow zX s T w k hσ.2 (hG t htJ) n] + unfold physicalDyadicPrimitiveDensity + rw [(he t (Ioo_subset_Icc_self ht)).1,(he t (Ioo_subset_Icc_self ht)).2] + · simp only [hbJ t htJ,ENNReal.ofReal_zero,zero_mul] + _ ≤ _ := physicalDyadicPrimitive_triangle_near hs hV hJ hJT hw hC hp hθ hφ hsmall + hDlo hDhi hd (fun t ht=>by rw [(he t (hJT ht)).2]; exact hband t ht) + (fun t ht=>by rw [(he t (hJT ht)).2]; exact hv t ht) hdensity hb.ennreal_ofReal + (fun t ht=>by rw [hbJ t ht,ENNReal.ofReal_zero]) + +lemma Admissible.label_projected_primitive_near_constant {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w p θ φ : ℝ) (k : Fin 4→ℕ), + MeasurableSet J → J⊆Icc 0 T → 0angularMultiplierCLM w (F.flow zX t).2)) z‖)≤ + (∫⁻t in J,ENNReal.ofReal (b t))*ENNReal.ofReal (C*(p*θ)^3*φ^2* + (representativeClosedBin T w k).rmax*((representativeClosedBin T w k).rmax- + (representativeClosedBin T w k).rmin)) := by + obtain ⟨C,hC,hb⟩ := hd₀.uniform_particle_density_constant + refine ⟨154140672*C,by positivity,?_⟩ + intro s T F hs hT h0 zX J w p θ φ k hJ hJT hw hp hθ hφ hsmall hDlo hDhi hd hq hband hv b hbm hbJ + apply F.label_projected_primitive_near hs hT zX hJ hJT hw hC hp hθ hφ hsmall hDlo hDhi hd hband hv _ hbm hbJ + intro z hz + exact coneBin_density_small_bound (sphere_norm z.2.2).le hp hθ hC hq hd + (fun v=>(hb s T F hs h0 z.2.1 ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _).2) + +lemma finset_subset_dyadicBox {ι : Type*} [Fintype ι] (S : Finset (ι→ℕ)) : + ∃M : ℕ,S⊆dyadicBox ι M := by + classical + obtain ⟨M,hM⟩ := (S.biUnion (fun k=>Finset.univ.image k)).exists_nat_subset_range + refine ⟨M,?_⟩ + intro k hk + simp only [dyadicBox,Fintype.mem_piFinset] + intro i + apply hM + exact Finset.mem_biUnion.mpr ⟨k,hk,Finset.mem_image.mpr ⟨i,Finset.mem_univ i,rfl⟩⟩ + +def directionWeightMajorant (N : ℕ) (k : Fin 4→ℕ) : ℝ := + (if k 0iif iif i(1/2:ℝ)^i,fun i=>Real.sqrt ((1/2:ℝ)^i)] + have he : ∑k∈dyadicBox (Fin 4) M,directionWeightMajorant N k= + ∏j,∑i∈Finset.range M,g j i := by + have heq : (instDecidableEqFin 4 : DecidableEq (Fin 4))= + (fun a b=>Classical.propDecidable (a=b)) := Subsingleton.elim _ _ + have hh := Finset.sum_prod_piFinset (Finset.range M) g + rw [heq] at hh + simpa [dyadicBox,Fin.prod_univ_four,directionWeightMajorant,g] using hh + rw [he,Fin.prod_univ_four] + change (∑i∈Finset.range M,if iby positivity) + have ha : 0≤∑i∈Finset.range M,(1/2:ℝ)^i := Finset.sum_nonneg (fun i _=>by positivity) + have hs : 0≤∑i∈Finset.range M,Real.sqrt ((1/2:ℝ)^i) := Finset.sum_nonneg (fun i _=>by positivity) + have h := mul_le_mul + (mul_le_mul (mul_le_mul (sum_range_indicator_lt M N) (sum_range_indicator_lt M N) hN (by positivity)) + (sum_angular_half_decay M) ha (by positivity)) + (sum_radial_half_decay M) hs (by positivity) + exact h.trans_eq (by ring) + +lemma sum_directionWeightMajorant (S : Finset (Fin 4→ℕ)) (N : ℕ) : + ∑k∈S,directionWeightMajorant N k≤8*(N:ℝ)^2 := by + obtain ⟨M,hM⟩ := finset_subset_dyadicBox S + exact (Finset.sum_le_sum_of_subset_of_nonneg hM + (fun k _ _=>directionWeightMajorant_nonneg N k)).trans (sum_directionWeightMajorant_box M N) + +lemma tsum_directionWeightMajorant (N : ℕ) : + (∑'k : Fin 4→ℕ,ENNReal.ofReal (directionWeightMajorant N k))≤ENNReal.ofReal (8*(N:ℝ)^2) := by + have hs : Summable (directionWeightMajorant N) := + summable_of_sum_le (directionWeightMajorant_nonneg N) (fun S=>sum_directionWeightMajorant S N) + rw [←ENNReal.ofReal_tsum_of_nonneg (directionWeightMajorant_nonneg N) hs] + exact ENNReal.ofReal_le_ofReal (hs.tsum_le_of_sum_le (fun S=>sum_directionWeightMajorant S N)) + +lemma selected_representative_weight_bound {T C : ℝ} {k : Fin 4→ℕ} {N : ℕ} + (hC : 0≤C) (h0 : k 0ENNReal.ofReal (dyadicMultiFactor k x)) k := by + classical + obtain ⟨N,_hN,he⟩ := dyadicMultiFactor_curve_locally_finite + (t:=(0:ℝ)) (g:=fun i (_ : ℝ)=>x i) (fun _=>continuousAt_const) hx + have hz : ∀k,k∉dyadicBox ι N→dyadicMultiFactor k x=0 := he.self_of_nhds + have hs : Summable (Q.indicator (fun k=>dyadicMultiFactor k x)) := by + apply summable_of_hasFiniteSupport + apply (Finset.finite_toSet (dyadicBox ι N)).subset + intro k hk + by_contra hkn + apply hk + by_cases hQ : k∈Q + · rw [indicator_of_mem hQ,hz k hkn] + · exact indicator_of_notMem hQ _ + rw [selectedDyadicCutoff,ENNReal.ofReal_tsum_of_nonneg (fun k=>by + by_cases hk : k∈Q + · rw [indicator_of_mem hk]; exact dyadicMultiFactor_nonneg k x + · rw [indicator_of_notMem hk]) hs] + apply tsum_congr + intro k + by_cases hk : k∈Q + · simp only [indicator_of_mem hk] + · simp only [indicator_of_notMem hk,ENNReal.ofReal_zero] + +lemma PhaseFlowOn.label_projected_dyadic_eq {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (s : Solution) (zX : Phase) + (k : Fin 4→ℕ) (G : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : + labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p= + dyadicMultiFactor k (actualCutoffCoordinates F.flow T zX p.2 p.1) • + G (labelReceiverTime F.flow zX T p) (actualLabelRatePrimitive s F.flow zX T p) := by + classical + rw [F.actualLabelRatePrimitive_eq s zX] + by_cases hp : p∈labelBranchDomain F.flow zX T + · simp only [labelConeKernel,indicator_of_mem hp,projectedDyadicRateKernel, + coneDyadicFactor,labelKernelState,actualCutoffCoordinates,labelReceiverTime, + map_smul,smul_smul] + congr 1 + ring + · simp only [labelConeKernel,indicator_of_notMem hp,map_zero,smul_zero] + +lemma PhaseFlowOn.selected_receiver_rate_norm_sum {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (s : Solution) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (b : ℝ→ℝ) (G : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : + ENNReal.ofReal ‖G (labelReceiverTime F.flow zX T p) + (labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p)‖= + ∑'k : Fin 4→ℕ,Q.indicator (fun k=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) k := by + classical + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hj : p∈jointBranchDomain F.flow zX T := hp + have hx : ∀i,0 X r-r • n) (a r-n) (Icc s t) r := by + have hn : HasDerivWithinAt (fun r : ℝ => r • n) n (Icc s t) r := by + convert ((hasDerivAt_id r).smul_const n).hasDerivWithinAt using 1 <;> try rfl + exact (one_smul ℝ n).symm + exact (hX r hr).sub hn + have hh := (convex_Icc s t).norm_image_sub_le_of_norm_hasDerivWithin_le + hd hvel (left_mem_Icc.mpr hst) (right_mem_Icc.mpr hst) + have hid : X t-t • n-(X s-s • n)=y-X s := by + have he : X t=y+(t-s) • n := by rw [← hgeom]; abel + rw [he,sub_smul] + module + simpa only [hid,Real.norm_eq_abs,abs_of_nonneg (sub_nonneg.mpr hst)] using hh + +lemma velocity_ref_triangle {v a A n : Vec} {η φ : ℝ} + (hv : ‖v-A‖≤η) (ha : ‖a-A‖≤η) (han : ‖a-n‖≤φ) : + ‖v-n‖≤φ+2*η := by + have he : v-n=(v-A)-(a-A)+(a-n) := by abel + rw [he] + have hh := (norm_add_le ((v-A)-(a-A)) (a-n)).trans + (add_le_add ((norm_sub_le _ _).trans (add_le_add hv ha)) han) + linarith + +lemma relative_ref_triangle {u a U A : Vec} {η : ℝ} + (hu : ‖u-U‖≤η) (ha : ‖a-A‖≤η) : ‖u-a-(U-A)‖≤2*η := by + have he : u-a-(U-A)=(u-U)-(a-A) := by abel + rw [he] + exact (norm_sub_le _ _).trans (by linarith) + +lemma PhaseFlowOn.retarded_stable_cell_occupation + {s : Solution} {T M A P L a b t₀ p c φ h : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (ha : 0≤a) (hb : b≤T) (ht₀ : t₀ ∈ Icc a b) + (hM : 0≤M) (hA : 0≤A) (hP : 0≤P) (hL : 0≤L) + (hc : 0 (F.flow zX t).2) T M A P L) + {H : Phase → Set ℝ} (hHC : ∀ z, H z ⊆ Icc a b) + (hret : ∀ z r, r ∈ H z → ∃ t ∈ Icc r b, ∃ n : Vec, + t-r≤h ∧ (F.flow zX t).1-(F.flow z r).1=(t-r) • n ∧ + ‖velocity (F.flow zX t).2-n‖≤φ) + (href : ∀ z, (H z).Nonempty → + IncrementBootstrap (fun t => (F.flow z t).2) T M A P L ∧ + ∃ r ∈ Icc a b, ∃ t ∈ Icc a b, + p≤q (F.flow z r).2 ∧ + c≤‖velocity (F.flow z r).2-velocity (F.flow zX t).2‖ ∧ + M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (F.flow z r).2 ≤ + c*q (F.flow z r).2/16 ∧ + M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (F.flow zX t).2 ≤ + c*q (F.flow zX t).2/16) : + ENNReal.ofReal (p/2) * labelOccupation (fun z => s.f (0,z)) H ≤ + ENNReal.ofReal (8*h*φ/c) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + have hCT : Icc a b ⊆ Icc (0:ℝ) T := Icc_subset_Icc ha hb + have hmem (z : Phase) : + ContinuousOn (fun t => (F.flow z t).2) (Icc a b) := + (F.continuousOn_time z).snd.mono hCT + have hstable (z : Phase) (HZ : IncrementBootstrap (fun t => (F.flow z t).2) T M A P L) + (r : ℝ) (hr : r ∈ Icc a b) + (hst : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (F.flow z r).2 ≤ + c*q (F.flow z r).2/16) : + ∀ t ∈ Icc a b, ‖velocity (F.flow z t).2-velocity (F.flow z r).2‖≤c/8 ∧ + q (F.flow z r).2/2≤q (F.flow z t).2 := by + have hq := q_pos (F.flow z r).2 + have hε : c*q (F.flow z r).2/16 ((F.ode zX w (hCT (hsub hw))).mono + (hsub.trans hCT)).fst) + (fun w hw => velocity_ref_triangle (hX w (hsub hw)).1 (hX v hvC).1 hangle) + hgeom + have hφ : 0≤φ := hc.le.trans hcφ + calc + _ ≤ (φ+2*(c/8))*(v-u) := hbnd + _ ≤ (2*φ)*h := mul_le_mul (by linarith) hvh (sub_nonneg.mpr hv.1) (by positivity) + _ = 2*h*φ := by ring + have hvel (u : ℝ) (hu : u ∈ interior (Icc a b)) : + ‖velocity (F.flow z u).2-velocity (F.flow zX u).2- + (velocity (F.flow z r).2-velocity (F.flow zX t).2)‖≤c/2 := by + exact (relative_ref_triangle (hZ u (interior_subset hu)).1 + (hX u (interior_subset hu)).1).trans (by linarith) + have hdur := stable_cell_duration (convex_Icc a b) (hHC z) hc hsep + ((F.continuousOn_time zX).fst.mono hCT) + ((F.continuousOn_time z).fst.mono hCT) + (fun u hu => (F.ode zX u (hCT (interior_subset hu))).hasDerivAt + (Icc_mem_nhds (by rw [interior_Icc] at hu; linarith [hu.1]) + (by rw [interior_Icc] at hu; linarith [hu.2])) |>.fst) + (fun u hu => (F.ode z u (hCT (interior_subset hu))).hasDerivAt + (Icc_mem_nhds (by rw [interior_Icc] at hu; linarith [hu.1]) + (by rw [interior_Icc] at hu; linarith [hu.2])) |>.fst) + hvel hseparation + convert hdur using 1 + congr 1 + ring + apply F.label_occupation_cell_bound hs (hCT ht₀) _ (fun z hz => (hdata z hz).2) + intro z + by_cases hz : (H z).Nonempty + · exact (hdata z hz).1 + · simp only [not_nonempty_iff_eq_empty.mp hz,measure_empty,zero_le] + +lemma exists_axis_basis (a : Vec) : ∃ b : OrthonormalBasis (Fin 3) ℝ Vec, + ∀ i, i≠0 → dot (b i) a=0 := by + classical + by_cases ha : a=0 + · exact ⟨EuclideanSpace.basisFun (Fin 3) ℝ,fun i _ => by simp [ha,dot]⟩ + have hpos : 0<‖a‖ := norm_pos_iff.mpr ha + let n : Vec := ‖a‖⁻¹ • a + have hn : ‖n‖=1 := by simp [n,norm_smul,hpos.ne'] + have horth : Orthonormal ℝ (({0} : Set (Fin 3)).domRestrict (fun _ => n)) := by + rw [orthonormal_subsingleton_iff] + exact fun _ => hn + obtain ⟨b,hb⟩ := horth.exists_orthonormalBasis_extension_of_card_eq + (show Module.finrank ℝ Vec=Fintype.card (Fin 3) by simp) + refine ⟨b,fun i hi => ?_⟩ + have hzero := b.orthonormal.inner_eq_zero hi + rw [hb 0 (mem_singleton _)] at hzero + have he : a=‖a‖ • n := by simp [n,smul_smul,hpos.ne'] + rw [dot_eq_inner,he,inner_smul_right,hzero,mul_zero] + +lemma volume_axis_box (b : OrthonormalBasis (Fin 3) ℝ Vec) {R S : ℝ} + (hR : 0≤R) (hS : 0≤S) : + volume {v : Vec | |dot (b 0) v|≤R ∧ |dot (b 1) v|≤S ∧ |dot (b 2) v|≤S} = + ENNReal.ofReal (8*R*S^2) := by + let F : Vec → Fin 3 → ℝ := fun v => WithLp.ofLp (b.repr v) + have hp : MeasurePreserving F volume volume := + (PiLp.volume_preserving_ofLp (Fin 3)).comp b.measurePreserving_repr + let A : Set (Fin 3 → ℝ) := Icc ![-R,-S,-S] ![R,S,S] + have he : {v : Vec | |dot (b 0) v|≤R ∧ |dot (b 1) v|≤S ∧ |dot (b 2) v|≤S}=F ⁻¹' A := by + ext v + simp only [mem_ofPred_eq,mem_preimage,A,mem_Icc,Pi.le_def,F,OrthonormalBasis.repr_apply_apply, + ← dot_eq_inner,Fin.forall_fin_succ,Matrix.cons_val_zero, + Matrix.cons_val_succ,Fin.forall_fin_zero,and_true] + simp only [abs_le] + tauto + rw [he,hp.measure_preimage measurableSet_Icc.nullMeasurableSet,Real.volume_Icc_pi] + simp only [Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.prod_univ_succ,Fin.prod_univ_zero, + mul_one,sub_neg_eq_add] + rw [← ENNReal.ofReal_mul (by positivity),← ENNReal.ofReal_mul (by positivity)] + congr 1 + ring + +lemma volume_velocity_cap {P δ : ℝ} (hP : 0≤P) (hδ : 0≤δ) (a : Vec) : + volume {v : Vec | q v≤P ∧ ‖velocity v-a‖≤δ} ≤ ENNReal.ofReal (8*P^3*δ^2) := by + obtain ⟨b,hb⟩ := exists_axis_basis a + have hsub : {v : Vec | q v≤P ∧ ‖velocity v-a‖≤δ} ⊆ + {v : Vec | |dot (b 0) v|≤P ∧ |dot (b 1) v|≤P*δ ∧ |dot (b 2) v|≤P*δ} := by + intro v hv + have hn : ‖v‖≤P := (norm_lt_q v).le.trans hv.1 + have hall (i : Fin 3) : |dot (b i) v|≤P := by + rw [dot_eq_inner] + exact (abs_real_inner_le_norm _ _).trans (by simpa only [b.orthonormal.norm_eq_one,one_mul] using hn) + have hsmall (i : Fin 3) (hi : i≠0) : |dot (b i) v|≤P*δ := by + have hd : |dot (b i) (velocity v-a)|≤δ := by + rw [dot_eq_inner] + exact (abs_real_inner_le_norm _ _).trans (by simpa only [b.orthonormal.norm_eq_one,one_mul] using hv.2) + rw [dot_sub_right,hb i hi,sub_zero,velocity,dot_smul_right,abs_mul, + abs_of_pos (inv_pos.mpr (q_pos v))] at hd + have hh := (mul_le_mul_of_nonneg_left hd (q_pos v).le) + rw [← mul_assoc,mul_inv_cancel₀ (q_pos v).ne',one_mul] at hh + exact hh.trans (mul_le_mul_of_nonneg_right hv.1 hδ) + exact ⟨hall 0,hsmall 1 (by decide),hsmall 2 (by decide)⟩ + have hh := (measure_mono hsub).trans_eq (volume_axis_box b hP (mul_nonneg hP hδ)) + convert hh using 1 + congr 1 + ring + +lemma lintegral_velocity_cap_density {P δ C : ℝ} (hP : 0≤P) (hδ : 0≤δ) + (hC : 0≤C) (a : Vec) {g : Vec → ℝ} (hg : ∀ v, g v≤C) + {H : Set Vec} (hH : H⊆{v : Vec | q v≤P ∧ ‖velocity v-a‖≤δ}) : + (∫⁻ v in H, ENNReal.ofReal (g v))≤ENNReal.ofReal (8*C*P^3*δ^2) := by + calc + _ ≤ ∫⁻ _v in H, ENNReal.ofReal C := lintegral_mono (fun v => ENNReal.ofReal_le_ofReal (hg v)) + _ = ENNReal.ofReal C * volume H := by rw [lintegral_const,Measure.restrict_apply_univ] + _ ≤ ENNReal.ofReal C * ENNReal.ofReal (8*P^3*δ^2) := by + gcongr + exact (measure_mono hH).trans (volume_velocity_cap hP hδ a) + _ = _ := by rw [← ENNReal.ofReal_mul hC]; congr 1; ring + +lemma sphere_cap_area {δ : ℝ} (hδ : 0≤δ) (a : Vec) : + sphereMeasure {n : Sphere | ‖n.1-a‖≤δ}≤ENNReal.ofReal (24*δ^2) := by + classical + let A : Set Sphere := {n | ‖n.1-a‖≤δ} + have hA : MeasurableSet A := isClosed_le + ((continuous_subtype_val.sub continuous_const).norm) continuous_const |>.measurableSet + obtain ⟨b,hb⟩ := exists_axis_basis a + let B : Set Vec := {v | |dot (b 0) v|≤1 ∧ |dot (b 1) v|≤δ ∧ |dot (b 2) v|≤δ} + have hsub : Set.image2 (fun (r : ℝ) (n : Vec) => r • n) (Ioo 0 1) (Subtype.val '' A)⊆B := by + rintro v ⟨r,hr,n,⟨N,hN,rfl⟩,rfl⟩ + have hh (i : Fin 3) : |dot (b i) N.1|≤1 := by + rw [dot_eq_inner] + exact (abs_real_inner_le_norm _ _).trans_eq (by rw [b.orthonormal.norm_eq_one,sphere_norm,one_mul]) + have ht (i : Fin 3) (hi : i≠0) : |dot (b i) N.1|≤δ := by + have hd := abs_real_inner_le_norm (b i) (N.1-a) + rw [← dot_eq_inner,dot_sub_right,hb i hi,sub_zero,b.orthonormal.norm_eq_one,one_mul] at hd + exact hd.trans hN + have hm (i : Fin 3) (D : ℝ) (hD : 0≤D) (hi : |dot (b i) N.1|≤D) : + |dot (b i) (r • N.1)|≤D := by + rw [dot_smul_right,abs_mul,abs_of_pos hr.1] + exact (mul_le_mul_of_nonneg_left hi hr.1.le).trans (by nlinarith [hr.2]) + exact ⟨hm 0 1 zero_le_one (hh 0),hm 1 δ hδ (ht 1 (by decide)),hm 2 δ hδ (ht 2 (by decide))⟩ + rw [show {n : Sphere | ‖n.1-a‖≤δ}=A from rfl,(volume : Measure Vec).toSphere_apply' hA] + have hdim : Module.finrank ℝ Vec=3 := by simp + rw [hdim] + change (3 : ENNReal) * volume (Set.image2 (fun (r : ℝ) (n : Vec) => r • n) (Ioo 0 1) (Subtype.val '' A))≤_ + calc + _ ≤ 3*volume B := by gcongr + _ = 3*ENNReal.ofReal (8*1*δ^2) := by rw [volume_axis_box b zero_le_one hδ] + _ = _ := by rw [show (3:ENNReal)=ENNReal.ofReal 3 by norm_num,← ENNReal.ofReal_mul (by norm_num)]; congr 1; ring + +lemma norm_sub_le_of_deficit {u a : Vec} {δ : ℝ} (hu : ‖u‖≤1) (ha : ‖a‖≤1) + (hδ : 0≤δ) (hd : 1-dot u a≤δ^2/2) : ‖u-a‖≤δ := by + have he : ‖u-a‖^2=‖u‖^2+‖a‖^2-2*dot u a := by rw [norm_sub_sq_real,dot_eq_inner]; ring + have hu2 : ‖u‖^2≤1 := by nlinarith [norm_nonneg u] + have ha2 : ‖a‖^2≤1 := by nlinarith [norm_nonneg a] + nlinarith [norm_nonneg (u-a)] + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +def coneBinMomentumSet (B : ClosedConeBin) (n a : Vec) : Set Vec := + {v | q v ∈ Icc B.qmin B.qmax ∧ 1-dot n (velocity v) ∈ Icc B.dmin B.dmax ∧ + 1-dot a (velocity v) ∈ Icc B.emin B.emax} + +lemma measurableSet_coneBinMomentumSet (B : ClosedConeBin) (n a : Vec) : + MeasurableSet (coneBinMomentumSet B n a) := by + exact ((measurableSet_Icc.preimage (contDiff_q (k:=0)).continuous.measurable).inter + ((measurableSet_Icc.preimage (continuous_const.sub (continuous_dot.comp + (continuous_const.prodMk (contDiff_velocity (k:=0)).continuous))).measurable).inter + (measurableSet_Icc.preimage (continuous_const.sub (continuous_dot.comp + (continuous_const.prodMk (contDiff_velocity (k:=0)).continuous))).measurable))) + +lemma coneBinMomentumSet_subset_cap {B : ClosedConeBin} {n a : Vec} {P θ σ : ℝ} + (hn : ‖n‖ ≤ 1) (ha : ‖a‖ ≤ 1) (hθ : 0 ≤ θ) (hσ : 0 ≤ σ) + (hq : B.qmax ≤ P) (hd : B.dmax ≤ 8*θ^2) (he : B.emax ≤ 8*σ^2) : + (coneBinMomentumSet B n a⊆{v | q v ≤ P ∧ ‖velocity v-n‖ ≤ 4*θ}) ∧ + (coneBinMomentumSet B n a⊆{v | q v ≤ P ∧ ‖velocity v-a‖ ≤ 4*σ}) := by + have hcap (v b : Vec) (hb : ‖b‖ ≤ 1) (δ : ℝ) (hδ : 0 ≤ δ) + (hv : 1-dot b (velocity v) ≤ 8*δ^2) : ‖velocity v-b‖ ≤ 4*δ := by + apply norm_sub_le_of_deficit (norm_velocity_lt_one v).le hb (by positivity) + rw [dot_comm] + nlinarith + constructor + · intro v hv + exact ⟨hv.1.2.trans hq,hcap v n hn θ hθ (hv.2.1.2.trans hd)⟩ + · intro v hv + exact ⟨hv.1.2.trans hq,hcap v a ha σ hσ (hv.2.2.2.trans he)⟩ + +lemma coneBin_density_bound {B : ClosedConeBin} {n a : Vec} {P θ σ C : ℝ} + (hn : ‖n‖ ≤ 1) (ha : ‖a‖ ≤ 1) (hP : 0 ≤ P) (hθ : 0 ≤ θ) (hσ : 0 ≤ σ) (hC : 0 ≤ C) + (hq : B.qmax ≤ P) (hd : B.dmax ≤ 8*θ^2) (he : B.emax ≤ 8*σ^2) + {g : Vec → ℝ} (hg : ∀ v, g v ≤ C) : + (∫⁻ v in coneBinMomentumSet B n a, ENNReal.ofReal (g v)) ≤ + ENNReal.ofReal (128*C*P^3*(min θ σ)^2) := by + have hh := coneBinMomentumSet_subset_cap hn ha hθ hσ hq hd he + rcases le_total θ σ with h|h + · rw [min_eq_left h] + convert lintegral_velocity_cap_density hP (by positivity : 0 ≤ 4*θ) hC n hg hh.1 using 1 + congr 1 + ring + · rw [min_eq_right h] + convert lintegral_velocity_cap_density hP (by positivity : 0 ≤ 4*σ) hC a hg hh.2 using 1 + congr 1 + ring + +lemma coneBin_density_small_bound {B : ClosedConeBin} {n a : Vec} {P θ C : ℝ} + (hn : ‖n‖ ≤ 1) (hP : 0 ≤ P) (hθ : 0 ≤ θ) (hC : 0 ≤ C) + (hq : B.qmax ≤ P) (hd : B.dmax ≤ 8*θ^2) + {g : Vec → ℝ} (hg : ∀ v, g v ≤ C) : + (∫⁻ v in coneBinMomentumSet B n a, ENNReal.ofReal (g v)) ≤ + ENNReal.ofReal (128*C*P^3*θ^2) := by + have hsub : coneBinMomentumSet B n a⊆{v | q v ≤ P ∧ ‖velocity v-n‖ ≤ 4*θ} := by + intro v hv + refine ⟨hv.1.2.trans hq,?_⟩ + apply norm_sub_le_of_deficit (norm_velocity_lt_one v).le hn (by positivity) + rw [dot_comm] + nlinarith [hv.2.1.2] + convert lintegral_velocity_cap_density hP (by positivity : 0 ≤ 4*θ) hC n hg hsub using 1 + congr 1 + ring + +lemma receiver_bin_area {B : ClosedConeBin} {a : Vec} {φ : ℝ} + (ha : ‖a‖ ≤ 1) (hφ : 0 ≤ φ) (hD : B.Dmax ≤ 8*φ^2) : + sphereMeasure {n : Sphere | 1-dot n.1 a ∈ Icc B.Dmin B.Dmax} ≤ + ENNReal.ofReal (384*φ^2) := by + have hsub : {n : Sphere | 1-dot n.1 a ∈ Icc B.Dmin B.Dmax}⊆ + {n : Sphere | ‖n.1-a‖ ≤ 4*φ} := by + intro n hn + apply norm_sub_le_of_deficit (sphere_norm n).le ha (by positivity) + nlinarith [hn.2] + convert (measure_mono hsub).trans (sphere_cap_area (by positivity : 0 ≤ 4*φ) a) using 1 + congr 1 + ring + +lemma PhaseFlowOn.particle_uniform_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ t ∈ Icc 0 T, ∀ z, 0 ≤ s.f (t,z) ∧ s.f (t,z) ≤ C := by + have hc : Continuous (fun z => s.f (0,z)) := hs.f_smooth.continuousOn.comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨⟨le_rfl,hT⟩,mem_univ _⟩) + obtain ⟨K,hK,hsub⟩ := hs.compact + have hk : HasCompactSupport (fun z => s.f (0,z)) := + HasCompactSupport.intro hK (fun z hz => by + by_contra hf + exact hz (hsub 0 ⟨le_rfl,hT⟩ (subset_tsupport _ hf))) + obtain ⟨C,hC⟩ := hc.bounded_above_of_compact_support hk + refine ⟨max 0 C,le_max_left _ _,?_⟩ + intro t ht z + refine ⟨hs.nonnegative t ht z,?_⟩ + rw [F.transport_inverse hs.f_smooth hs.vlasov ht] + exact (le_abs_self _).trans ((hC _).trans (le_max_right _ _)) + +def physicalBinDensity (s : Solution) (X V : ℝ → Vec) (B : ClosedConeBin) + (t r : ℝ) (n : Sphere) : ℝ≥0∞ := + ∫⁻ v in coneBinMomentumSet B n.1 (velocity (V t)), + ENNReal.ofReal (s.f (r,(X t-(t-r) • n.1,v))) + +lemma PhaseFlowOn.physicalBinDensity_bounds {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0 ≤ T) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (X V : ℝ → Vec) (B : ClosedConeBin) (t r : ℝ) (n : Sphere) + (P θ σ : ℝ), r ∈ Icc 0 T → 0 ≤ P → 0 ≤ θ → 0 ≤ σ → + B.qmax ≤ P → B.dmax ≤ 8*θ^2 → B.emax ≤ 8*σ^2 → + physicalBinDensity s X V B t r n ≤ ENNReal.ofReal (128*C*P^3*(min θ σ)^2) := by + obtain ⟨C,hC,hbound⟩ := F.particle_uniform_bound hs hT + refine ⟨C,hC,?_⟩ + intro X V B t r n P θ σ hr hP hθ hσ hq hd he + exact coneBin_density_bound (sphere_norm n).le (norm_velocity_lt_one _).le hP hθ hσ hC + hq hd he (fun v => (hbound r hr _).2) + +abbrev ConeCoordinate := ℝ × ℝ × Sphere + +def physicalBinBase (V : ℝ → Vec) (B : ClosedConeBin) (J : Set ℝ) : Set ConeCoordinate := + {z | z.1 ∈ J ∧ z.2.1 ∈ Icc 0 z.1 ∧ z.1-z.2.1 ∈ Icc B.rmin B.rmax ∧ + q (V z.1) ∈ Icc B.wmin B.wmax ∧ + 1-dot z.2.2.1 (velocity (V z.1)) ∈ Icc B.Dmin B.Dmax} + +def physicalBinMeasure (V : ℝ → Vec) (B : ClosedConeBin) (J : Set ℝ) : Measure ConeCoordinate := + (volume.prod (volume.prod sphereMeasure)).restrict (physicalBinBase V B J) + +lemma measurableSet_physicalBinBase {V : ℝ → Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) : + MeasurableSet (physicalBinBase V B J) := by + have htime : MeasurableSet {z : ConeCoordinate | z.2.1 ∈ Icc 0 z.1} := + (measurableSet_le measurable_const (measurable_fst.comp measurable_snd)).inter + (measurableSet_le (measurable_fst.comp measurable_snd) measurable_fst) + exact (hJ.preimage measurable_fst).inter (htime.inter + ((measurableSet_Icc.preimage (measurable_fst.sub (measurable_fst.comp measurable_snd))).inter + ((measurableSet_Icc.preimage ((contDiff_q (k:=0)).continuous.measurable.comp + (hV.comp measurable_fst))).inter + (measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp + ((measurable_subtype_coe.comp (measurable_snd.comp measurable_snd)).prodMk + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst))))))))) + +lemma physicalBinMeasure_volume {V : ℝ → Vec} (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) {φ : ℝ} + (hφ : 0 ≤ φ) (hD : B.Dmax ≤ 8*φ^2) : + physicalBinMeasure V B J univ ≤ + volume J * ENNReal.ofReal (B.rmax-B.rmin) * ENNReal.ofReal (384*φ^2) := by + let A : Set ConeCoordinate := {z | z.1 ∈ J ∧ + z.2.1 ∈ Icc (z.1-B.rmax) (z.1-B.rmin) ∧ + ‖z.2.2.1-velocity (V z.1)‖ ≤ 4*φ} + have hA : MeasurableSet A := by + exact (hJ.preimage measurable_fst).inter + (((measurableSet_le (measurable_fst.sub_const _) (measurable_fst.comp measurable_snd)).inter + (measurableSet_le (measurable_fst.comp measurable_snd) (measurable_fst.sub_const _))).inter + (measurableSet_le (((measurable_subtype_coe.comp (measurable_snd.comp measurable_snd)).sub + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst))).norm) measurable_const)) + have hsub : physicalBinBase V B J ⊆ A := by + intro z hz + refine ⟨hz.1,⟨by linarith [hz.2.2.1.2],by linarith [hz.2.2.1.1]⟩,?_⟩ + apply norm_sub_le_of_deficit (sphere_norm z.2.2).le (norm_velocity_lt_one _).le (by positivity) + nlinarith [hz.2.2.2.2.2] + have hmass : (volume.prod (volume.prod sphereMeasure)) A = ∫⁻ t in J, + ENNReal.ofReal (B.rmax-B.rmin) * sphereMeasure {n : Sphere | ‖n.1-velocity (V t)‖ ≤ 4*φ} := by + rw [← lintegral_indicator_one hA,lintegral_prod _ (measurable_one.indicator hA).aemeasurable] + rw [← lintegral_indicator hJ] + apply lintegral_congr + intro t + by_cases ht : t ∈ J + · rw [indicator_of_mem ht] + have he : (fun p : ℝ × Sphere => A.indicator (fun _ => (1:ℝ≥0∞)) (t,p)) = + ((Icc (t-B.rmax) (t-B.rmin)) ×ˢ {n : Sphere | ‖n.1-velocity (V t)‖ ≤ 4*φ}).indicator (fun _ => 1) := by + funext p + simp [A,ht,indicator] + change (∫⁻ p : ℝ × Sphere, A.indicator (fun _ => (1:ℝ≥0∞)) (t,p) ∂(volume.prod sphereMeasure)) = _ + rw [he] + have hS : MeasurableSet ((Icc (t-B.rmax) (t-B.rmin)) ×ˢ + {n : Sphere | ‖n.1-velocity (V t)‖ ≤ 4*φ}) := + measurableSet_Icc.prod (measurableSet_le + ((continuous_subtype_val.sub continuous_const).norm.measurable) measurable_const) + have hsi := lintegral_indicator_one (μ := volume.prod sphereMeasure) hS + calc + _ = (volume.prod sphereMeasure) ((Icc (t-B.rmax) (t-B.rmin)) ×ˢ + {n : Sphere | ‖n.1-velocity (V t)‖ ≤ 4*φ}) := hsi + _ = _ := by + rw [Measure.prod_prod,Real.volume_Icc] + congr 2 + ring + · rw [indicator_of_notMem ht] + have he : (fun p : ℝ × Sphere => A.indicator (fun _ => (1:ℝ≥0∞)) (t,p))=0 := by + funext p + simp [A,ht,indicator] + change (∫⁻ p : ℝ × Sphere, A.indicator (fun _ => (1:ℝ≥0∞)) (t,p) ∂(volume.prod sphereMeasure)) = _ + rw [he] + change (∫⁻ _ : ℝ × Sphere, (0:ℝ≥0∞) ∂(volume.prod sphereMeasure)) = 0 + exact lintegral_zero + unfold physicalBinMeasure + rw [Measure.restrict_apply_univ] + calc + _ ≤ (volume.prod (volume.prod sphereMeasure)) A := measure_mono hsub + _ = _ := hmass + _ ≤ ∫⁻ _t in J, ENNReal.ofReal (B.rmax-B.rmin) * ENNReal.ofReal (384*φ^2) := by + apply lintegral_mono + intro t + apply mul_le_mul' le_rfl + convert sphere_cap_area (by positivity : 0 ≤ 4*φ) (velocity (V t)) using 1 + congr 1 + ring + _ = _ := by rw [lintegral_const,Measure.restrict_apply_univ]; ac_rfl + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/RetardedWeightedIntegralBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/RetardedWeightedIntegralBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..25374158aabe17ede5ac1e2d32b35ac9a83dc5b9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/RetardedWeightedIntegralBound.lean @@ -0,0 +1,192 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.MagneticMomentDensity + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma retarded_weighted_integral_bound_le {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {s : Solution} (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R≤t) (x : Vec) + {A : (Vec × Vec) × Vec → W} + (hA : ContinuousOn A ((closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ z : Vec, ‖z‖≤R → ∀ n : Vec, ‖n‖=1 → + ‖∫ v : Vec, s.f (t-‖z‖,x+z,v) • A ((z,n),v)‖≤C := by + have ht : 0≤t := le_trans hR hRt + obtain ⟨K,hK,hz⟩ := hc t ht + let P : Set (Vec × Vec) := closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1 + have hP : IsCompact P := (isCompact_closedBall (0:Vec) R).prod (isCompact_sphere (0:Vec) 1) + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1,p.2)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk + ((continuous_const.add continuous_fst.fst).prodMk continuous_snd) + have htime (z : Vec) (hz' : z ∈ closedBall (0:Vec) R) : t-‖z‖ ∈ Icc 0 t := by + have hn : ‖z‖≤R := by simpa only [mem_closedBall_zero_iff] using hz' + exact ⟨by linarith,sub_le_self _ (norm_nonneg _)⟩ + have hcf : ContinuousOn (fun p : (Vec × Vec) × Vec => s.f (t-‖p.1.1‖,x+p.1.1,p.2)) (P ×ˢ univ) := + hf.continuousOn.comp harg.continuousOn (fun p hp => (htime p.1.1 hp.1.1).1) + have hzero : ∀ p ∈ P, ∀ v ∉ Prod.snd '' K, s.f (t-‖p.1‖,x+p.1,v) • A (p,v)=0 := by + intro p hp v hv + have hsf : s.f (t-‖p.1‖,x+p.1,v)=0 := by + by_contra hne + exact hv ⟨(x+p.1,v),hz _ (htime p.1 hp.1) (subset_tsupport _ hne),rfl⟩ + rw [hsf,zero_smul] + obtain ⟨C,hC,hb⟩ := uniform_integral_bound_compact hP (hK.image continuous_snd) (hcf.smul hA) hzero + refine ⟨C,hC,?_⟩ + intro z hz n hn + exact hb (z,n) ⟨by simpa only [mem_closedBall_zero_iff] using hz, + by simpa only [mem_sphere,dist_zero_right] using hn⟩ + +lemma retarded_electric_kernel_norm_bound_le {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContinuousOn s.E fieldHalfSpace) (hB : ContinuousOn s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R≤t) (x : Vec) : + ∃ C : ℝ, 0≤C ∧ ∀ z : Vec, 0<‖z‖ → ‖z‖≤R → + ‖∫ v : Vec, (s.f (t-coneRadius x (x+z),x+z,v)* + (1-dot (coneDirection x (x+z)) (velocity v))) • + physicalElectricKernel (coneRadius x (x+z)) (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x (x+z),x+z)+ + cross (velocity v) (s.B (t-coneRadius x (x+z),x+z))))‖≤C/‖z‖^2 := by + let S : Set ((Vec × Vec) × Vec) := (closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ + let u : (Vec × Vec) × Vec → Vec := fun p => velocity p.2 + let n : (Vec × Vec) × Vec → Vec := fun p => p.1.2 + let b : (Vec × Vec) × Vec → Vec := fun p => fderiv ℝ velocity p.2 + (s.E (t-‖p.1.1‖,x+p.1.1)+cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) + have hu : Continuous u := (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hn : Continuous n := continuous_fst.snd + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk (continuous_const.add continuous_fst.fst) + have hmap : MapsTo (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) S fieldHalfSpace := by + intro p hp + have hnz : ‖p.1.1‖≤R := by simpa only [mem_closedBall_zero_iff] using hp.1.1 + change 0≤t-‖p.1.1‖ + linarith + have he := hE.comp harg.continuousOn hmap + have hm := hB.comp harg.continuousOn hmap + have hcross : ContinuousOn (fun p : (Vec × Vec) × Vec => + cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) S := + (contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.continuousOn.prodMk hm) + have hb : ContinuousOn b S := + (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp continuous_snd).continuousOn.clm_apply (he.add hcross) + have hD : Continuous (fun p : (Vec × Vec) × Vec => 1-dot (n p) (u p)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hn.prodMk hu)) + have hD0 (p : (Vec × Vec) × Vec) (hp : p ∈ S) : 1-dot (n p) (u p)≠0 := by + apply (cone_denom_pos _ _ ?_).ne' + simpa only [n,mem_sphere,dist_zero_right] using hp.1.2 + have hN := continuousOn_normalisedElectricKernel (S:=S) + continuous_fst.fst.norm.continuousOn hn.continuousOn hu.continuousOn hb hD0 + obtain ⟨C,hC,hbound⟩ := retarded_weighted_integral_bound_le hf hc hR hRt x (hD.continuousOn.smul hN) + refine ⟨C,hC,?_⟩ + intro z hz0 hzR + have hxy : x≠x+z := by + intro h + apply (norm_pos_iff.mp hz0) + exact add_left_cancel (show x+z=x+0 by simpa using h.symm) + have hh := hbound z hzR (coneDirection x (x+z)) (coneDirection_norm hxy) + have heq : (∫ v : Vec, s.f (t-‖z‖,x+z,v) • + ((1-dot (coneDirection x (x+z)) (velocity v)) • + normalisedElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))))) = + ‖z‖^2 • ∫ v : Vec, (s.f (t-‖z‖,x+z,v)*(1-dot (coneDirection x (x+z)) (velocity v))) • + physicalElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))) := by + rw [← integral_smul] + apply integral_congr_ae + filter_upwards [] with v + rw [normalisedElectricKernel_eq hz0.ne'] + simp only [smul_smul] + congr 1 + ring + change ‖∫ v : Vec, s.f (t-‖z‖,x+z,v) • + ((1-dot (coneDirection x (x+z)) (velocity v)) • + normalisedElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))))‖≤C at hh + rw [heq,norm_smul,Real.norm_of_nonneg (sq_nonneg _)] at hh + simp only [coneRadius_add] + apply (le_div_iff₀ (sq_pos_of_pos hz0)).mpr + simpa only [mul_comm] using hh + +lemma integrableOn_retardedElectricDensity_le {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R≤t) (x : Vec) : + IntegrableOn (fun z => retardedElectricDensity s t x (x+z)) (ball (0:Vec) R) := by + have ht : 0≤t := le_trans hR hRt + have hcont := (contDiffOn_retardedElectricDensity hf hE hB hc ht x).continuousOn + have hm : MapsTo (fun z : Vec => x+z) (ball (0:Vec) R \ {0}) (retardedSpaceDomain t x) := by + intro z hz + have hn : ‖z‖ retardedMagneticDensity s t x (x+z)) (ball (0:Vec) R) := by + have ht : 0≤t := le_trans hR hRt + have hm : MapsTo (fun z : Vec => x+z) (ball (0:Vec) R \ {0}) (retardedSpaceDomain t x) := by + intro z hz + have hn : ‖z‖ hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro time ht position momentum + have hh := (hs.equations time ht.1.le ht.2).1 position momentum + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro time ht position + have he := (hs.equations time ht.1.le ht.2).2.1 position + have hb := (hs.equations time ht.1.le ht.2).2.2.1 position + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +lemma sum_lintegral_le_lintegral_sum {Ω ι : Type*} [MeasurableSpace Ω] + (μ : Measure Ω) (S : Finset ι) (f : ι → Ω → ℝ≥0∞) : + (∑i∈S,∫⁻x,f i x ∂μ) ≤ ∫⁻x,∑i∈S,f i x ∂μ := by + classical + induction S using Finset.induction_on with + | empty => simp + | @insert i S hi ih => + simp only [Finset.sum_insert hi] + exact (add_le_add le_rfl ih).trans (le_lintegral_add _ _) + +lemma directionWeight_family_label_kernel {Ω ι : Type*} [MeasurableSpace Ω] + (μ : Measure Ω) (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + (J : Set ℝ) (hcell : ∀i∈S,Icc (a i) (b i)⊆J) + (τ : Ω→ℝ) (f : Ω→ℝ≥0∞) : + (∑i∈S,∫⁻p,ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) (τ p)| * f p ∂μ) ≤ + ∫⁻p,{p : Ω | τ p∈J}.indicator f p ∂μ := by + classical + apply (sum_lintegral_le_lintegral_sum μ S _).trans + apply lintegral_mono + intro p + dsimp only + by_cases hp : τ p∈J + · rw [indicator_of_mem (show p ∈ {p : Ω | τ p∈J} from hp), ←Finset.sum_mul] + exact (mul_le_mul' (directionWeight_sum_ofReal_le_one S a b ℓ hℓ hlen hdis (τ p)) + le_rfl).trans_eq (one_mul _) + · rw [indicator_of_notMem (show p ∉ {p : Ω | τ p∈J} from hp)] + apply le_of_eq + apply Finset.sum_eq_zero + intro i hi + have hz : directionWeight (a i) (b i) (ℓ i) (τ p)=0 := + image_eq_zero_of_notMem_tsupport (fun ht=>hp (hcell i hi + (directionWeight_tsupport (hℓ i hi) (hlen i hi) ht))) + rw [hz,abs_zero,ENNReal.ofReal_zero,zero_mul] + +def selectedMultiplierBulkDensity (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (W : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : ℝ≥0∞ := + ENNReal.ofReal ‖W (labelReceiverTime α zX T p) (actualLabelCutoffCost s α zX T Q p)‖ + + ENNReal.ofReal ‖W (labelReceiverTime α zX T p) + (labelSelectedCutoff α zX T Q p • actualLabelRemainder s α zX T p)‖ + +def selectedMultiplierWeightDensity (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (W : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : ℝ≥0∞ := + ENNReal.ofReal ‖W (labelReceiverTime α zX T p) + (labelWeight α zX T Q (deriv ψ) p • actualLabelRatePrimitive s α zX T p)‖ + +def selectedMultiplierMovingDensity (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (W' : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : ℝ≥0∞ := + ENNReal.ofReal ‖W' (labelReceiverTime α zX T p) + (labelWeight α zX T Q ψ p • actualLabelRatePrimitive s α zX T p)‖ + +lemma selectedMultiplierCosts_norm_le (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (W W' : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : + ENNReal.ofReal ‖selectedMultiplierCosts s α zX T Q ψ W W' p‖ ≤ + selectedMultiplierWeightDensity s α zX T Q ψ W p + + ENNReal.ofReal |ψ (labelReceiverTime α zX T p)| * + selectedMultiplierBulkDensity s α zX T Q W p + + selectedMultiplierMovingDensity s α zX T Q ψ W' p := by + let τ := labelReceiverTime α zX T p + have he : selectedMultiplierCosts s α zX T Q ψ W W' p = + W τ (labelWeight α zX T Q (deriv ψ) p • actualLabelRatePrimitive s α zX T p) + + (ψ τ • W τ (actualLabelCutoffCost s α zX T Q p) + + ψ τ • W τ (labelSelectedCutoff α zX T Q p • actualLabelRemainder s α zX T p)) + + W' τ (labelWeight α zX T Q ψ p • actualLabelRatePrimitive s α zX T p) := by + simp only [selectedMultiplierCosts,selectedLabelCosts,map_add,map_smul, + labelWeight,mul_smul,add_assoc,τ] + rw [he] + have hn (x y : Vec) : ENNReal.ofReal ‖x+y‖ ≤ ENNReal.ofReal ‖x‖+ENNReal.ofReal ‖y‖ := by + rw [←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal (norm_add_le _ _) + dsimp only [selectedMultiplierWeightDensity,selectedMultiplierMovingDensity] + apply (hn _ _).trans + apply add_le_add _ le_rfl + apply (hn _ _).trans + apply add_le_add le_rfl + apply (hn _ _).trans + simp only [norm_smul,Real.norm_eq_abs,ENNReal.ofReal_mul (abs_nonneg _), + selectedMultiplierBulkDensity,mul_add,τ,le_refl] + +lemma measurable_vec_clm_apply {Ω : Type*} [MeasurableSpace Ω] + {W : Ω→Vec→L[ℝ]Vec} {f : Ω→Vec} (hW : Measurable W) (hf : Measurable f) : + Measurable (fun p=>W p (f p)) := + (continuous_fst.clm_apply continuous_snd).measurable.comp (hW.prodMk hf) + +lemma PhaseFlowOn.selectedMultiplierBulkDensity_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {W : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable (fun p : ℝ×Phase=>W (labelReceiverTime F.flow zX T p))) : + Measurable (selectedMultiplierBulkDensity s F.flow zX T Q W) := by + have hWt := hW + exact ((measurable_vec_clm_apply hWt (F.actualLabelCutoffCost_measurable hs zX Q)).norm.ennreal_ofReal).add + ((measurable_vec_clm_apply hWt ((F.selectedCutoff_measurable zX Q).smul + (F.actualLabelRemainder_measurable hs zX))).norm.ennreal_ofReal) + +lemma PhaseFlowOn.selectedMultiplierWeightDensity_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) {W : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable (fun p : ℝ×Phase=>W (labelReceiverTime F.flow zX T p))) : + Measurable (selectedMultiplierWeightDensity s F.flow zX T Q ψ W) := by + exact ((measurable_vec_clm_apply hW + ((F.labelWeight_measurable zX Q (measurable_deriv ψ)).smul + (F.actualLabelRatePrimitive_measurable hs zX))).norm.ennreal_ofReal) + +lemma PhaseFlowOn.selectedMultiplierMovingDensity_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} (hψ : Measurable ψ) + {W' : ℝ→Vec→L[ℝ]Vec} (hW' : Measurable W') : + Measurable (selectedMultiplierMovingDensity s F.flow zX T Q ψ W') := by + exact ((measurable_vec_clm_apply (hW'.comp (F.labelReceiverTime_measurable zX)) + ((F.labelWeight_measurable zX Q hψ).smul + (F.actualLabelRatePrimitive_measurable hs zX))).norm.ennreal_ofReal) + +lemma PhaseFlowOn.selectedMultiplierCosts_integral_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} (hψ : Measurable ψ) + {W W' : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable (fun p : ℝ×Phase=>W (labelReceiverTime F.flow zX T p))) : + ENNReal.ofReal ‖∫p,selectedMultiplierCosts s F.flow zX T Q ψ W W' p‖ ≤ + (∫⁻p,selectedMultiplierWeightDensity s F.flow zX T Q ψ W p) + + (∫⁻p,ENNReal.ofReal |ψ (labelReceiverTime F.flow zX T p)| * + selectedMultiplierBulkDensity s F.flow zX T Q W p) + + ∫⁻p,selectedMultiplierMovingDensity s F.flow zX T Q ψ W' p := by + have hm₁ := F.selectedMultiplierWeightDensity_measurable hs zX Q ψ hW + have hm₂ : Measurable (fun p : ℝ×Phase => + ENNReal.ofReal |ψ (labelReceiverTime F.flow zX T p)| * + selectedMultiplierBulkDensity s F.flow zX T Q W p) := by + convert ((hψ.comp (F.labelReceiverTime_measurable zX)).norm.ennreal_ofReal).mul + (F.selectedMultiplierBulkDensity_measurable hs zX Q hW) using 1 + funext p + simp only [Pi.mul_apply,Function.comp_apply,Real.norm_eq_abs] + have hm₁₂ : Measurable (fun p : ℝ×Phase => + selectedMultiplierWeightDensity s F.flow zX T Q ψ W p + + ENNReal.ofReal |ψ (labelReceiverTime F.flow zX T p)| * + selectedMultiplierBulkDensity s F.flow zX T Q W p) := hm₁.add hm₂ + calc + _ ≤ ∫⁻p,ENNReal.ofReal ‖selectedMultiplierCosts s F.flow zX T Q ψ W W' p‖ := by + simpa only [ofReal_norm] using enorm_integral_le_lintegral_enorm + (selectedMultiplierCosts s F.flow zX T Q ψ W W') + _ ≤ ∫⁻p,selectedMultiplierWeightDensity s F.flow zX T Q ψ W p + + ENNReal.ofReal |ψ (labelReceiverTime F.flow zX T p)| * + selectedMultiplierBulkDensity s F.flow zX T Q W p + + selectedMultiplierMovingDensity s F.flow zX T Q ψ W' p := + lintegral_mono (selectedMultiplierCosts_norm_le s F.flow zX T Q ψ W W') + _ = _ := by rw [lintegral_add_left hm₁₂,lintegral_add_left hm₁] + +lemma PhaseFlowOn.selectedMultiplierCosts_family_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {W W' : ℝ→Vec→L[ℝ]Vec} + (hW : Measurable (fun p : ℝ×Phase=>W (labelReceiverTime F.flow zX T p))) + {ι : Type*} (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + (J : Set ℝ) (hcell : ∀i∈S,Icc (a i) (b i)⊆J) : + (∑i∈S,ENNReal.ofReal ‖∫p,selectedMultiplierCosts s F.flow zX T Q + (directionWeight (a i) (b i) (ℓ i)) W W' p‖) ≤ + (∑i∈S,∫⁻p,selectedMultiplierWeightDensity s F.flow zX T Q + (directionWeight (a i) (b i) (ℓ i)) W p) + + (∫⁻p,{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈J}.indicator + (selectedMultiplierBulkDensity s F.flow zX T Q W) p) + + ∑i∈S,∫⁻p,selectedMultiplierMovingDensity s F.flow zX T Q + (directionWeight (a i) (b i) (ℓ i)) W' p := by + classical + have hi := Finset.sum_le_sum (fun i (_hi : i∈S) => + F.selectedMultiplierCosts_integral_bound hs zX Q + (directionWeight_lipschitz (a i) (b i) (ℓ i)).continuous.measurable (W':=W') hW) + simp only [Finset.sum_add_distrib] at hi + exact hi.trans (add_le_add (add_le_add le_rfl + (directionWeight_family_label_kernel volume S a b ℓ hℓ hlen hdis J hcell + (labelReceiverTime F.flow zX T) + (selectedMultiplierBulkDensity s F.flow zX T Q W))) le_rfl) + +lemma unselected_multiplier_family_bound (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (Q : Set (Fin 4→ℕ)) (W : ℝ→Vec→L[ℝ]Vec) + {ι : Type*} (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + (J : Set ℝ) (hcell : ∀i∈S,Icc (a i) (b i)⊆J) : + (∑i∈S,ENNReal.ofReal ‖∫p,W (labelReceiverTime α zX T p) + (unselectedLabelSignedForce s α zX T Q (directionWeight (a i) (b i) (ℓ i)) p)‖) ≤ + ∫⁻p,{p : ℝ×Phase | labelReceiverTime α zX T p∈J}.indicator + (fun p=>ENNReal.ofReal ‖W (labelReceiverTime α zX T p) + ((1-labelSelectedCutoff α zX T Q p) • actualLabelSignedForce s α zX T p)‖) p := by + apply (Finset.sum_le_sum (fun i (_hi : i∈S) => by + simpa only [ofReal_norm] using enorm_integral_le_lintegral_enorm + (fun p=>W (labelReceiverTime α zX T p) + (unselectedLabelSignedForce s α zX T Q (directionWeight (a i) (b i) (ℓ i)) p)))).trans + have he (i : ι) (p : ℝ×Phase) : + ENNReal.ofReal ‖W (labelReceiverTime α zX T p) + (unselectedLabelSignedForce s α zX T Q (directionWeight (a i) (b i) (ℓ i)) p)‖ = + ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) (labelReceiverTime α zX T p)| * + ENNReal.ofReal ‖W (labelReceiverTime α zX T p) + ((1-labelSelectedCutoff α zX T Q p) • actualLabelSignedForce s α zX T p)‖ := by + rw [unselectedLabelSignedForce,smul_comm,map_smul,norm_smul,Real.norm_eq_abs, + ENNReal.ofReal_mul (abs_nonneg _)] + simp_rw [←ofReal_norm,he] + exact directionWeight_family_label_kernel volume S a b ℓ hℓ hlen hdis J hcell + (labelReceiverTime α zX T) _ + +lemma measurable_angularMultiplierCLM (w : ℝ) : Measurable (angularMultiplierCLM w) := by + apply measurable_of_continuousOn_compl_singleton (0:Vec) + intro v hv + exact (contDiffAt_angularMultiplierCLM w (by simpa using hv) (k:=1) (by simp)).continuousAt.continuousWithinAt + +lemma PhaseFlowOn.measurable_labelAngularMultiplier {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (w : ℝ) : + Measurable (fun p : ℝ×Phase=>angularMultiplierCLM w + (F.flow zX (labelReceiverTime F.flow zX T p)).2) := by + have hV : Continuous (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd + have hm := (measurable_angularMultiplierCLM w).comp + (hV.measurable.comp (F.labelReceiverTime_measurable zX)) + convert hm using 1 + funext p + simp only [Function.comp_apply,prefixFlow,prefixClamp_eq (F.labelReceiverTime_mem hT zX p)] + +lemma SmoothClassicalPrefix.actual_angular_family_bound {d : Datum} {s : Solution} {T w : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) (hw : 0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + (J : Set ℝ) (hJ : J⊆Icc 0 T) (hcell : ∀i∈S,Icc (a i) (b i)⊆J) + (hband : ∀t∈J,w/16≤‖(F.flow zX t).2‖) : + let G := fun t=>angularMultiplierCLM w (F.flow zX t).2 + (∑i∈S,ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,directionWeight (a i) (b i) (ℓ i) t • G t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖) ≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + ((∫⁻p,{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈J}.indicator + (fun p=>ENNReal.ofReal ‖G (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T Q p) • actualLabelSignedForce s F.flow zX T p)‖) p) + + (∑i∈S,ENNReal.ofReal ‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) + Q (directionWeight (a i) (b i) (ℓ i)) G z‖) + + (∑i∈S,selectedAngularWeightCost s F.flow zX T w Q (directionWeight (a i) (b i) (ℓ i))) + + (∫⁻p,{p : ℝ×Phase | labelReceiverTime F.flow zX T p∈J}.indicator + (selectedMultiplierBulkDensity s F.flow zX T Q G) p) + + ∑i∈S,selectedAngularMovingCost s F.flow zX T w Q (directionWeight (a i) (b i) (ℓ i))) := by + classical + dsimp only + let G := fun t=>angularMultiplierCLM w (F.flow zX t).2 + let G' := fun t=>angularDerivativeCLM w (F.flow zX t).2 + (lorentzField s.E s.B (t,F.flow zX t)).2 + let ψ := fun i=>directionWeight (a i) (b i) (ℓ i) + have hsupport i (hi : i∈S) : tsupport (ψ i)⊆J := + (directionWeight_tsupport (hℓ i hi) (hlen i hi)).trans (hcell i hi) + have hψT i (hi : i∈S) : ψ i T=0 := by + by_contra hn + have hin := directionWeight_ne_zero_interior (hℓ i hi) (hlen i hi) hn + have hab : a i≤b i := by linarith only [hℓ i hi,hlen i hi] + exact (not_lt_of_ge (hJ (hcell i hi ⟨hab,le_rfl⟩)).2) hin.2 + have hn (x y : Vec) : ENNReal.ofReal ‖x+y‖ ≤ ENNReal.ofReal ‖x‖+ENNReal.ofReal ‖y‖ := by + rw [←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal (norm_add_le _ _) + have hpoint i (hi : i∈S) : + ENNReal.ofReal ‖∫t in Ioo (0:ℝ) T,ψ i t • G t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2))‖ ≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + (ENNReal.ofReal ‖∫p,G (labelReceiverTime F.flow zX T p) + (unselectedLabelSignedForce s F.flow zX T Q (ψ i) p)‖ + + ENNReal.ofReal ‖∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q (ψ i) G z‖ + + ENNReal.ofReal ‖∫p,selectedMultiplierCosts s F.flow zX T Q (ψ i) G G' p‖) := by + rw [hs.actual_angular_decomposition hT hw F zX Q (directionWeight_lipschitz _ _ _) + (fun t _=>by rw [abs_of_nonneg (directionWeight_bounds (hℓ i hi) (hlen i hi)).1]; + exact (directionWeight_bounds (hℓ i hi) (hlen i hi)).2) + (hψT i hi) ((hsupport i hi).trans hJ) (fun t ht=>hband t (hsupport i hi ht))] + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (by positivity : 0<(4*Real.pi)⁻¹), + ENNReal.ofReal_mul (by positivity : 0≤(4*Real.pi)⁻¹)] + apply mul_le_mul' le_rfl + exact (hn _ _).trans (add_le_add (hn _ _) le_rfl) + have hi := Finset.sum_le_sum hpoint + rw [←Finset.mul_sum] at hi + simp only [Finset.sum_add_distrib] at hi + have hu := unselected_multiplier_family_bound s F.flow zX T Q G S a b ℓ hℓ hlen hdis J hcell + have hc := F.selectedMultiplierCosts_family_bound hs.selectedDirectionEnergyPrefix zX Q + (W:=G) (W':=G') (F.measurable_labelAngularMultiplier hs.selectedDirectionEnergyPrefix hT zX w) + S a b ℓ hℓ hlen hdis J hcell + apply hi.trans + apply mul_le_mul' le_rfl + have hh := add_le_add (add_le_add hu (le_refl (∑i∈S,ENNReal.ofReal ‖∫z : Phase, + selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q (ψ i) G z‖))) hc + simpa only [selectedAngularWeightCost,selectedAngularMovingCost, + selectedMultiplierWeightDensity,selectedMultiplierMovingDensity,add_assoc,G,G',ψ] using hh + +end RVM + +end + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.measurable_labelConeKernel_localBorel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable ((coneKernelInterior T).indicator A)) : + Measurable (labelConeKernel s F.flow zX T A) := by + rw [←F.labelConeKernel_interior_indicator zX A,F.labelConeKernel_eq_pullback hs zX] + exact F.measurable_phaseTimePullback (F.measurable_arrivalConeKernel_borel hs zX hA) + +lemma PhaseFlowOn.partialCutoffLabelCost_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {H : ConeKernelState→CutoffState} + (hH : ContinuousOn H (coneKernelInterior T)) : + Measurable (partialCutoffLabelCost s F.flow zX T Q (H ∘ labelKernelState F.flow zX T)) := by + classical + rw [F.partialCutoffLabelCost_eq_normalised zX Q H] + exact F.measurable_labelConeKernel_localBorel hs zX + ((F.normalisedPartialCutoff_continuousOn zX Q hH).measurable_piecewise + continuousOn_const (measurableSet_coneKernelInterior T)) + +lemma PhaseFlowOn.cutoff_label_integral_split {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖W (labelReceiverTime F.flow zX T p) + (actualLabelCutoffCost s F.flow zX T Q p)‖)≤ + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖W (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T Q + (fun p=>cutoffSourceTangent (lorentzField s.E s.B (p.1,F.flow p.2 p.1)).2) p)‖)+ + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖W (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T Q + (fun p=>cutoffGeometryTangent (branchTime F.flow zX p.2 T p.1-p.1) (branchRate F.flow zX p.2 T p.1) + (velocity (F.flow zX (branchTime F.flow zX p.2 T p.1)).2) (velocity (F.flow p.2 p.1).2) + (branchDirection F.flow zX p.2 T p.1)) p)‖)+ + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖W (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T Q + (fun p=>cutoffReceiverTangent (branchRate F.flow zX p.2 T p.1) + (lorentzField s.E s.B (branchTime F.flow zX p.2 T p.1,F.flow zX (branchTime F.flow zX p.2 T p.1))).2) p)‖) := by + have hWt := hW.comp (F.labelReceiverTime_measurable zX) + have hm (H : ConeKernelState→CutoffState) (hH : ContinuousOn H (coneKernelInterior T)) := + (measurable_vec_clm_apply hWt (F.partialCutoffLabelCost_measurable hs zX Q hH)).norm.ennreal_ofReal + have hs' := hm _ (F.coneSourceCutoffTangent_continuousOn hs zX) + have hg' := hm _ (F.coneGeometryCutoffTangent_continuousOn hs zX) + have hr' := hm _ (F.coneReceiverCutoffTangent_continuousOn hs zX) + rw [coneSourceCutoffTangent_pullback] at hs' + rw [coneGeometryCutoffTangent_pullback] at hg' + rw [coneReceiverCutoffTangent_pullback] at hr' + simp only [Function.comp_apply] at hs' hg' hr' + rw [←lintegral_add_left hs' _,←lintegral_add_right _ hr'] + apply lintegral_mono + intro p + dsimp only + rw [actualLabelCutoffCost_split,map_add,map_add] + have hn (x y : Vec) : ENNReal.ofReal ‖x+y‖≤ENNReal.ofReal ‖x‖+ENNReal.ofReal ‖y‖ := by + rw [←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal (norm_add_le _ _) + exact (hn _ _).trans (add_le_add (hn _ _) le_rfl) + +lemma Admissible.direction_receiverCutoff_label_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → 0≤T → + ∀(zX : Phase) (J : Set ℝ) (w P : ℝ) (hw : 0cutoffReceiverTangent (branchRate F.flow zX p.2 T p.1) + (lorentzField s.E s.B (branchTime F.flow zX p.2 T p.1,F.flow zX (branchTime F.flow zX p.2 T p.1))).2) p)‖)≤ + (∫⁻t in J,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + obtain ⟨C,hC,hbound⟩ := hd₀.actual_receiverCutoff_label_bound + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + refine ⟨C*Cn^2,by positivity,?_⟩ + intro s T F hs h0 hT zX J w P hw hJ hJT hP hL hq hW hsource + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + have hEuler (σ : ℝ) (hσ : σ∈Icc 0 T) (z : Phase) (hf : s.f (σ,z)≠0) : + 1024*q z.2≤(2:ℝ)^N := + (mul_le_mul_of_nonneg_left (F.eulerian_supported_momentum hs hsource hσ z.1 z.2 hf) + (by norm_num : (0:ℝ)≤1024)).trans hN + apply (hbound s T F hs h0 hT zX J w (1/1024) N (directionSelection T) hw hJ hJT + (by norm_num) (by norm_num) (fun k hk=>hk) hq hW hEuler).trans + apply mul_le_mul' le_rfl + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ C*Real.sqrt (max 1 T)*(Cn*Real.log (2+P))^2/w := by gcongr + _ = _ := by ring + +lemma Admissible.direction_selected_bulk_log_bound {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃Ce Cf Cl Cg Ck : ℝ,0≤Ce ∧ 0≤Cf ∧ 0≤Cl ∧ 0≤Cg ∧ 0≤Ck ∧ + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → T≤T₀ → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (hw : 0s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p : ℝ×Phase,selectedMultiplierBulkDensity s F.flow zX T (directionSelection T) + ((Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX)) p)≤ + ENNReal.ofReal (Ce*(1+E)*(1+M+Real.sqrt A)*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cf*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5)+ + ENNReal.ofReal (Cl*(1+E)*(max 1 T)^2*(Real.log (2+P))^2)+ + ENNReal.ofReal (Cg*max 1 T*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (Ck*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + classical + obtain ⟨Ce,Cf,Cl,hCe,hCf,hCl,hsourcecost⟩ := hd₀.direction_sourceCutoff_label_log_bound T₀ + obtain ⟨Cg,hCg,hgeom⟩ := hd₀.direction_geometryCutoff_label_log_bound + obtain ⟨Cr,hCr,hrem⟩ := hd₀.direction_remainder_label_log_bound + obtain ⟨Ck,hCk,hrec⟩ := hd₀.direction_receiverCutoff_label_log_bound + refine ⟨Ce,Cf,Cl,Cg+Cr,Ck+Cr,hCe,hCf,hCl,by positivity,by positivity,?_⟩ + intro s T F hs hT hTT h0 zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hW HX HZ + dsimp only + have hwc : Measurable ((Icc a b).indicator (prefixAngularMultiplier s F.flow T w hw zX)) := + (F.prefixAngular_regular hs hT hw zX).1.measurable.indicator measurableSet_Icc + have hsc := hsourcecost s T F hs hT hTT h0 zX S a b w M A P hw hS hS0 ha hb hab hJI hM hA hP hL hw1 hwP hPw hsource hq hW HX HZ + have hgc := hgeom s T F hs hT h0 zX S a b w M A P hw hS hS0 ha hb hJI hM hA (zero_lt_one.trans_le hP) hL hwP hPw hsource hq hW HX HZ + have hrc := hrec s T F hs h0 hT zX (Icc a b) w P hw measurableSet_Icc (Icc_subset_Icc ha hb) (zero_lt_one.trans_le hP) hL hq hW hsource + have hrm := hrem s T F hs hT h0 zX S a b w M A P hw hS hS0 ha hb hJI hM hA (zero_lt_one.trans_le hP) hL hwP hPw hsource hq hW HX HZ + have hcut := (F.cutoff_label_integral_split hs zX (directionSelection T) hwc).trans + (add_le_add (add_le_add hsc hgc) hrc) + have hmeas : Measurable (fun p : ℝ×Phase=>ENNReal.ofReal ‖((Icc a b).indicator + (prefixAngularMultiplier s F.flow T w hw zX) (labelReceiverTime F.flow zX T p)) + (actualLabelCutoffCost s F.flow zX T (directionSelection T) p)‖) := + (measurable_vec_clm_apply (hwc.comp (F.labelReceiverTime_measurable zX)) + (F.actualLabelCutoffCost_measurable hs zX (directionSelection T))).norm.ennreal_ofReal + simp only [selectedMultiplierBulkDensity] + rw [lintegral_add_left hmeas] + apply (add_le_add hcut hrm).trans_eq + have hE : 0≤ ∫x : Vec,totalEnergy s (0,x) := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hG : ENNReal.ofReal ((Cg+Cr)*max 1 T*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)= + ENNReal.ofReal (Cg*max 1 T*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)+ + ENNReal.ofReal (Cr*max 1 T*(1+(∫x : Vec,totalEnergy s (0,x)))*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3) := by + rw [←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + have hK : ENNReal.ofReal ((Ck+Cr)*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w)= + ENNReal.ofReal (Ck*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w)+ + ENNReal.ofReal (Cr*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + rw [←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + rw [hG,hK,mul_add] + ring_nf + +lemma relativeRepresentative_momentum_subset (T w : ℝ) (k : Fin 4→ℕ) (j : ℕ) + (n W : Vec) : coneBinMomentumSet (relativeRepresentativeClosedBin T w k j) n (velocity W) ⊆ + coneBinMomentumSet (representativeClosedBin T w k) n (velocity W) := by + intro v hv + exact ⟨hv.1,hv.2.1,velocity_deficit_mem_unit2 v W⟩ + +lemma relativeRepresentative_density_le (s : Solution) (X V : ℝ→Vec) (T w : ℝ) + (k : Fin 4→ℕ) (j : ℕ) (z : ConeCoordinate) : + physicalBinDensity s X V (relativeRepresentativeClosedBin T w k j) z.1 z.2.1 z.2.2 ≤ + physicalBinDensity s X V (representativeClosedBin T w k) z.1 z.2.1 z.2.2 := by + exact lintegral_mono' (Measure.restrict_mono + (relativeRepresentative_momentum_subset T w k j z.2.2.1 (V z.1)) le_rfl) (fun _ => le_rfl) + +lemma transport_small_central_coefficient {p θ φ : ℝ} (hp : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (cappedRepresentative (k 2))⁻¹ * + (ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) := by + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + have hp : 0

hs.nonnegative _ ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ _) + apply hn.trans + exact mul_le_mul' + (ENNReal.ofReal_le_ofReal (transport_small_central_coefficient hp hθ hφ hsmall hpθ)) + (relativeRepresentative_density_le s X V T w k j z) + +lemma Admissible.direct_transport_small_stable_radii {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P))) := by + obtain ⟨C,hC,hbound⟩ := hd₀.central_density_stable_radial_bound + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hpP hsmall hwφ hpθ HX HZ + dsimp only + have hφ : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*max 1 T*w) := by + obtain ⟨C,hC,hnear⟩ := hd₀.direct_transport_radius_near + refine ⟨1048832*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hw hP hwP hIw hpP hpθ hwφ + dsimp only + have hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.sqrt (Real.log (2+P))) := by + obtain ⟨C₁,hC₁,h₁⟩ := hd₀.direct_transport_remaining_all_radii + obtain ⟨C₂,hC₂,h₂⟩ := hd₀.direct_transport_low_receiver_radii + obtain ⟨C₃,hC₃,h₃⟩ := hd₀.direct_transport_small_stable_radii + refine ⟨C₁+C₂+C₃,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hpP HX HZ + dsimp only + have he : 0 ≤ ∫x : Vec,totalEnergy s (0,x) := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hMa : 1 ≤ 1+16384*(M+Real.sqrt A) := by linarith only [hM,Real.sqrt_nonneg A] + have he1 : 1 ≤ 1+∫x : Vec,totalEnergy s (0,x) := by linarith only [he] + have hL1 : 1 ≤ Real.sqrt (Real.log (2+P)) := Real.one_le_sqrt.mpr hL + have hH : 1 ≤ max 1 T := le_max_left _ _ + have hI : 0<(w/P)^2 := sq_pos_of_pos (div_pos hw hP) + have absorb (C : ℝ) (hC : 0 ≤ C) (hCc : C ≤ C₁+C₂+C₃) : + C*max 1 T*w ≤ (C₁+C₂+C₃)*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.sqrt (Real.log (2+P)) := by + calc + _ = C*1*1*max 1 T*w*1 := by ring + _ ≤ _ := by gcongr + by_cases hpθ : 1 ≤ sourceRepresentative np*cappedRepresentative nθ + · by_cases hsmall : cappedRepresentative nθ ≤ cappedRepresentative nφ/16 + · by_cases hstable : 32 ≤ cappedRepresentative nφ*w + · apply (h₃ s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hpP hsmall hstable hpθ HX HZ).trans + apply ENNReal.ofReal_le_ofReal + calc + _ = C₃*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*1*w*Real.sqrt (Real.log (2+P)) := by ring + _ ≤ _ := by gcongr; linarith only [hC₁,hC₂] + · apply (h₂ s T F hs hT h0 zX S np nθ nφ j a b ((w/P)^2) w P hS hS0 ha hb hab hI hw hP hwP le_rfl hpP hpθ (lt_of_not_ge hstable).le).trans + exact ENNReal.ofReal_le_ofReal (absorb C₂ hC₂ (by linarith only [hC₁,hC₃])) + · apply (h₁ s T F hs hT h0 zX S np nθ nφ j a b ((w/P)^2) w P hS hS0 ha hb hab hI hw hP hwP le_rfl hpP (by linarith only [hsmall])).trans + exact ENNReal.ofReal_le_ofReal (absorb C₁ hC₁ (by linarith only [hC₂,hC₃])) + · have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hz (nr : ℕ) : (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) (Icc a b))=0 := by + exact physicalDirectTransport_integral_geometry_zero s hV measurableSet_Icc hpθ + simp_rw [hz,tsum_zero] + exact bot_le + +lemma Admissible.direct_transport_sharp_physical_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,directTriangleDensity s X T (Icc a b) (directTransportTriangleKernel V) p + ∂trianglePhaseMeasure) ≤ (N:ℝ≥0∞)^4*ENNReal.ofReal (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.sqrt (Real.log (2+P))) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_transport_sharp_all_radii + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P N hS hS0 ha hb hJI hM hA hL hw hP hwP hN hPbound hW HX HZ + dsimp only + have hα : Continuous (fun t : ℝ => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJT : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband : ∀t∈Icc a b,q (prefixFlow F.flow T zX t).2∈Icc (w/8) (8*w) := by + intro t ht + simpa only [prefixFlow,prefixClamp_eq (hJT ht)] using hW t ht + apply F.directTriangle_family_estimate hs hT hP.le hwP N hN hPbound + (fun t => (prefixFlow F.flow T zX t).1) (fun t => (prefixFlow F.flow T zX t).2) + hα.fst.measurable hα.snd.measurable (Icc a b) measurableSet_Icc hband + (directTransportTriangleKernel (fun t => (prefixFlow F.flow T zX t).2)) + (measurable_directTransportTriangleKernel hα.snd.measurable) + (physicalDirectTransportDensity s (fun t => (prefixFlow F.flow T zX t).1) + (fun t => (prefixFlow F.flow T zX t).2)) (ENNReal.ofReal (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.sqrt (Real.log (2+P)))) + (fun B z hz=>directTransportTriangle_bin_bound (s:=s) + (X:=fun t=>(prefixFlow F.flow T zX t).1) (V:=fun t=>(prefixFlow F.flow T zX t).2) + (T:=T) hJT B hz) + intro i hi + exact hbound s T F hs hT h0 zX S (i 0).val (i 1).val (i 2).val (i 3).val a b w M A P + hS hS0 ha hb hJI hM hA hP hL (zero_lt_one.trans_le hw) hwP hi HX HZ + +lemma Admissible.direct_transport_sharp_physical_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,directTriangleDensity s X T (Icc a b) (directTransportTriangleKernel V) p + ∂trianglePhaseMeasure) ≤ ENNReal.ofReal (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_transport_sharp_physical_bound + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + refine ⟨C*Cn^4,by positivity,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hJI hM hA hw hP hwP hL hPbound hW HX HZ + dsimp only + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + apply (hbound s T F hs hT h0 zX S a b w M A P N hS hS0 ha hb hJI hM hA hL hw + (zero_lt_one.trans_le hP) hwP hN hPbound hW HX HZ).trans + apply (ennreal_count_four_bound hCn (zero_le_one.trans hL) hNc + (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.sqrt (Real.log (2+P)))).trans + apply ENNReal.ofReal_le_ofReal + have he : 0≤∫x : Vec,totalEnergy s (0,x) := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hsqrt : Real.sqrt (Real.log (2+P))≤Real.log (2+P) := (Real.sqrt_le_iff).mpr ⟨by linarith, by nlinarith only [hL]⟩ + calc + _ ≤ Cn^4*(Real.log (2+P))^4*(C*(1+∫x : Vec,totalEnergy s (0,x))*(1+16384*(M+Real.sqrt A))*max 1 T*w*Real.log (2+P)) := by gcongr + _ = _ := by ring + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direction_lorentz_log_bound {d : Datum} (hd₀ : Admissible d) + (T : ℝ) (hT : 0≤T) : + ∃ Cb Ct Cs : ℝ,0≤Cb ∧ 0≤Ct ∧ 0≤Cs ∧ + ∀ (s : Solution) (F : PhaseFlowOn s.E s.B T), SmoothClassicalPrefix d s T → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + zX∈tsupport d.f₀ → IsCompact S → tsupport d.f₀⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖) ≤ + ENNReal.ofReal (Cb*(b-a)) + ENNReal.ofReal (4*Real.pi)⁻¹ * + (ENNReal.ofReal (Ct*(1+E)*(1+16384*(M+Real.sqrt A))*max 1 T*w*(Real.log (2+P))^5) + + ENNReal.ofReal (Cs*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*(Real.log (2+P))^5)) := by + obtain ⟨Cb,hCb,hdatum⟩ := hd₀.supported_boundary_force_bound T hT + obtain ⟨Ct,hCt,htrans⟩ := hd₀.direct_transport_sharp_physical_log_bound + obtain ⟨Cs,hCs,hsource⟩ := hd₀.direct_source_physical_log_bound + refine ⟨Cb,Ct,Cs,hCb,hCt,hCs,?_⟩ + intro s F hs zX S a b w M A P hzX hS hS0 ha hb hab hJI hM hA hP hL hw hwP hPbound hW HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hcon := (F.continuous_prefixFlow hs.selectedDirectionEnergyPrefix hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcon.fst.measurable + have hV : Measurable V := hcon.snd.measurable + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + have hS0' : tsupport (fun z=>s.f (0,z))⊆S := by rw [hdata]; exact hS0 + have hDb : ∀t∈Ioo 0 T∩Icc a b, + ‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤Cb := by + intro t ht + dsimp only [X,V,prefixFlow] + rw [prefixClamp_eq (hJ ht.2)] + exact hdatum s.E s.B F zX hzX t ⟨ht.1.1,ht.1.2.le⟩ + have hraw : (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [X,V,prefixFlow,prefixClamp_eq (hJ ht)] + rw [hraw] + apply (hs.direct_lorentz_triangle_bound hT X V hX hV measurableSet_Icc hJ Cb hCb hDb).trans + have hD : ENNReal.ofReal Cb*volume (Icc a b)=ENNReal.ofReal (Cb*(b-a)) := by + rw [Real.volume_Icc,ENNReal.ofReal_mul hCb] + rw [hD] + apply add_le_add le_rfl + apply mul_le_mul' le_rfl + exact add_le_add + (htrans s T F hs.selectedDirectionEnergyPrefix hT hs.initial_f zX S a b w M A P hS hS0' ha hb hJI hM hA hw hP hwP hL hPbound hW HX HZ) + (hsource s T F hs.selectedDirectionEnergyPrefix hT hs.initial_f zX S a b w M A P hS hS0' ha hb hab hJI hM hA hP hL hw hwP + hPbound hW HX HZ) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedReceiverWeightBoundFinite.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedReceiverWeightBoundFinite.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef1c99f1f9577644966a7bd1f590f46caf98e066 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedReceiverWeightBoundFinite.lean @@ -0,0 +1,885 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RepresentativeCosts + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.selected_receiver_weight_bound_finite_sources {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)), + (∀k∈Q,k 0(prefixAngular_highband (s:=s) hw zX (hJT ht) (hv t ht)).1 + have h0abs : ∀t∉J,|b t|=0 := fun t ht=>by rw [hbJ t ht,abs_zero] + have hbnorm (k : Fin 4→ℕ) : Measurable (fun p : ℝ×Phase=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) := + ((hb.comp (F.labelReceiverTime_measurable zX)).norm.ennreal_ofReal).mul + ((F.measurable_labelConeKernel hs zX (F.projectedDyadicRateKernel_continuousOn zX k hG)).norm.ennreal_ofReal) + have hbound (k : Fin 4→ℕ) (hk : k∈Q) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖)≤ + W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T))*ENNReal.ofReal (directionWeightMajorant N k)) := by + have hc (i : Fin 4) : 0angularMultiplierCLM w (F.flow zX t).2)) p‖ := by + apply lintegral_congr + intro p + exact weighted_labelProjected_congr s F.flow zX T k (fun t ht=>hGe t ht) h0abs p + rw [he] + have hn := hnear s T F hs hT h0 zX J w (sourceRepresentative (k 0)) + (cappedRepresentative (k 1)) (cappedRepresentative (k 2)) k hJ hJT hw hp.le (hc 1).le (hc 2) + (hQ k hk).2.2.1 le_rfl le_rfl le_rfl (by + change sourceRepresentative (k 0)/32 ≤ sourceRepresentative (k 0) + linarith) hband hv (fun t=>|b t|) hb.norm h0abs + refine hn.trans (mul_le_mul' (a:=W) (b:=W) le_rfl ?_) + rw [←ENNReal.ofReal_mul (by positivity : 0≤4*C*Real.sqrt (max 1 T))] + exact ENNReal.ofReal_le_ofReal + (selected_representative_weight_bound hC (hQ k hk).1 (hQ k hk).2.1 (hQ k hk).2.2.2 w) + calc + _ = ∫⁻p : ℝ×Phase,ENNReal.ofReal ‖G (labelReceiverTime F.flow zX T p) + (labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p)‖ := by + apply lintegral_congr + intro p + by_cases ht : labelReceiverTime F.flow zX T p∈J + · rw [hGe _ ht] + · simp only [labelWeight,hbJ _ ht,zero_mul,zero_smul,map_zero] + _ = ∫⁻p : ℝ×Phase,∑'k : Fin 4→ℕ,Q.indicator (fun k=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) k := by + apply lintegral_congr + intro p + exact F.selected_receiver_rate_norm_sum s zX Q b G p + _ = ∑'k : Fin 4→ℕ,∫⁻p : ℝ×Phase,Q.indicator (fun k=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) k := by + apply lintegral_tsum + intro k + by_cases hk : k∈Q + · simpa only [indicator_of_mem hk] using (hbnorm k).aemeasurable + · simp only [indicator_of_notMem hk] + exact aemeasurable_const + _ ≤ ∑'k : Fin 4→ℕ,W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T))* + ENNReal.ofReal (directionWeightMajorant N k)) := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · simpa only [indicator_of_mem hk] using hbound k hk + · simp only [indicator_of_notMem hk,lintegral_zero] + exact bot_le + _ = W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T))* + ∑'k : Fin 4→ℕ,ENNReal.ofReal (directionWeightMajorant N k)) := by + rw [ENNReal.tsum_mul_left,ENNReal.tsum_mul_left] + _ ≤ W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T))*ENNReal.ofReal (8*(N:ℝ)^2)) := + mul_le_mul' (a:=W) (b:=W) le_rfl (mul_le_mul' (a:=ENNReal.ofReal (4*C*Real.sqrt (max 1 T))) + (b:=ENNReal.ofReal (4*C*Real.sqrt (max 1 T))) le_rfl (tsum_directionWeightMajorant N)) + _ = _ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤4*C*Real.sqrt (max 1 T))] + congr 2 + ring + +lemma source_angle_coordinate_lower (v n : Vec) (hn : ‖n‖=1) : + 1/2≤q v*Real.sqrt ((1-dot n (velocity v))/2) := by + have hq := q_pos v + have hv := norm_velocity_lt_one v + have hdot := dot_le_norm n (velocity v) + rw [hn,one_mul] at hdot + have hs := velocity_self v + rw [dot_self] at hs + have hinv : (q v)^2*((q v)⁻¹)^2=1 := by field_simp + have hd : ((q v)⁻¹)^2≤2*(1-dot n (velocity v)) := by + nlinarith [sq_nonneg (1-‖velocity v‖)] + have hdq := mul_le_mul_of_nonneg_left hd (sq_nonneg (q v)) + rw [hinv] at hdq + have hroot := Real.sq_sqrt (div_nonneg (cone_denom_pos v n hn).le (by norm_num : (0:ℝ)≤2)) + have hp : 0≤q v*Real.sqrt ((1-dot n (velocity v))/2) := by positivity + have hsq : 1≤4*(q v*Real.sqrt ((1-dot n (velocity v))/2))^2 := by + nlinarith [sq_nonneg (q v)] + nlinarith + +lemma source_energy_index_lt {n N : ℕ} {v : Vec} + (h : DyadicBand n (1/q v)) (hP : 1024*q v≤(2:ℝ)^N) : nhQ h.1)] + · have hz : dyadicMultiFactor k x=0 := by by_contra hc; exact hk (hR k hc) + by_cases hQ : k∈Q + · simp only [indicator_of_mem hQ,indicator_of_notMem (show k∉Q∩R from fun h=>hk h.2),hz] + · simp only [indicator_of_notMem hQ,indicator_of_notMem (show k∉Q∩R from fun h=>hQ h.1)] + +lemma PhaseFlowOn.labelWeight_rate_source_truncate {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (s : Solution) (zX : Phase) (N : ℕ) + (hP : ∀z,s.f (0,z)≠0→∀σ∈Icc 0 T,1024*q (F.flow z σ).2≤(2:ℝ)^N) + (Q : Set (Fin 4→ℕ)) (b : ℝ→ℝ) (p : ℝ×Phase) : + labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p= + labelWeight F.flow zX T (Q∩{k | k 0labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p)= + fun p : ℝ×Phase=>labelWeight F.flow zX T (Q∩{k | k 0⟨hk.2.1,hk.2.2,hQ k hk.1⟩) + hJ hJT hw hband hv b hbm hbJ + +def physicalDyadicMovingDensity (s : Solution) (X V K : ℝ→Vec) (T w : ℝ) + (k : Fin 4→ℕ) (z : ConeCoordinate) : ℝ≥0∞ := + ∫⁻v : Vec, ENNReal.ofReal (dyadicMultiFactor k + (physicalCutoffCoordinates T (z.1-z.2.1) z.2.2.1 v (V z.1))*(z.1-z.2.1)* + ‖s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)) • + angularDerivativeCLM w (V z.1) (K z.1) (signedPrimitive (velocity (V z.1)) (velocity v) z.2.2.1)‖) + +lemma physicalDyadicMovingDensity_le {s : Solution} {X V K : ℝ→Vec} {T w t σ : ℝ} + {k : Fin 4→ℕ} {J : Set ℝ} (ht : t∈J) (hσ : σ∈Icc 0 t) (hσt : σdyadicMultiFactor k (physicalCutoffCoordinates T (t-σ) n.1 v (V t)) + let H : Vec→ℝ := fun v=>‖s.f (σ,(X t-(t-σ) • n.1,v)) • + angularDerivativeCLM w (V t) (K t) (signedPrimitive (velocity (V t)) (velocity v) n.1)‖ + have hp : ∀v, ENNReal.ofReal (χ v*(t-σ)*H v) ≤ + (coneBinMomentumSet B n.1 (velocity (V t))).indicator + (fun v=>ENNReal.ofReal ((t-σ)*H v)) v := by + intro v + by_cases hχ : 0<χ v + · have hv := (physicalCutoff_positive_closedBin ht hσ hband hχ).2 + rw [indicator_of_mem hv] + apply ENNReal.ofReal_le_ofReal + have hm := dyadicMultiFactor_le_one k (physicalCutoffCoordinates T (t-σ) n.1 v (V t)) + have hrH : 0≤(t-σ)*H v := mul_nonneg (sub_nonneg.mpr hσt.le) (norm_nonneg _) + have hm' := mul_le_mul_of_nonneg_right hm hrH + dsimp [χ] at * + nlinarith + · have hz : χ v=0 := le_antisymm (le_of_not_gt hχ) (dyadicMultiFactor_nonneg _ _) + simp only [hz,zero_mul,ENNReal.ofReal_zero] + exact bot_le + by_cases hbase : (t,σ,n)∈physicalBinBase V B J + · rw [indicator_of_mem hbase] + calc + _ ≤ ∫⁻v, (coneBinMomentumSet B n.1 (velocity (V t))).indicator + (fun v=>ENNReal.ofReal ((t-σ)*H v)) v := lintegral_mono hp + _ = ∫⁻v in coneBinMomentumSet B n.1 (velocity (V t)), ENNReal.ofReal ((t-σ)*H v) := + lintegral_indicator (measurableSet_coneBinMomentumSet _ _ _) _ + _ = _ := by + simp only [H,physicalPrimitive_radius_norm (sub_pos.mpr hσt)] + simp_rw [ENNReal.ofReal_mul (sq_nonneg (t-σ))] + exact lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + · rw [indicator_of_notMem hbase] + apply le_of_eq + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hχ : χ v=0 := by + apply le_antisymm _ (dyadicMultiFactor_nonneg _ _) + exact le_of_not_gt (fun h=>hbase (physicalCutoff_positive_closedBin ht hσ hband h).1) + change ENNReal.ofReal (χ v*(t-σ)*H v)=0 + simp only [hχ,zero_mul,ENNReal.ofReal_zero] + +lemma physicalDyadicMovingDensity_near_pointwise {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {X V K : ℝ→Vec} {J : Set ℝ} (hJT : J⊆Icc 0 T) + {w C p θ φ t σ : ℝ} {k : Fin 4→ℕ} + (hw : 0ENNReal.ofReal ‖K z.1‖*ENNReal.ofReal (5111808*C*(p*θ)^3* + (representativeClosedBin T w k).rmax/(w*φ))) (t,σ,n) := by + classical + let B := representativeClosedBin T w k + have h := physicalDyadicMovingDensity_le ht hσ hσt hband n (s:=s) (X:=X) (K:=K) (k:=k) (T:=T) + by_cases hz : (t,σ,n)∈physicalBinBase V B J + · rw [indicator_of_mem hz] at h ⊢ + have hk := physicalMovingProjectorDensity_bound (s:=s) (X:=X) (z:=(t,σ,n)) (K:=K) + hw hv (sub_pos.mpr hσt) hθ hφ hφ1 hsmall hd (hDlo.trans hz.2.2.2.2.1) + (hz.2.2.2.2.2.trans hDhi) + (fun v=>hs.nonnegative σ ⟨hσ.1,hσ.2.trans (hJT ht).2⟩ _) + have hn : 0≤B.rmax := (representativeClosedBin_radius_pos T w k).le.trans + (hz.2.2.1.1.trans hz.2.2.1.2) + have hden := hdensity (t,σ,n) hz + have hrad : ENNReal.ofReal (t-σ)≤ENNReal.ofReal B.rmax := + ENNReal.ofReal_le_ofReal hz.2.2.1.2 + calc + _ ≤ ENNReal.ofReal (39936*θ/(w*φ)*‖K t‖)*ENNReal.ofReal (t-σ)* + physicalBinDensity s X V B t σ n := h.trans hk + _ ≤ ENNReal.ofReal (39936*θ/(w*φ)*‖K t‖)*ENNReal.ofReal B.rmax*ENNReal.ofReal (128*C*p^3*θ^2) := + mul_le_mul' (mul_le_mul' le_rfl hrad) hden + _ = _ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤39936*θ/(w*φ)*‖K t‖), + ←ENNReal.ofReal_mul (mul_nonneg (by positivity) hn), + ←ENNReal.ofReal_mul (norm_nonneg _)] + congr 1 + dsimp [B] + ring + · exact (h.trans (by rw [indicator_of_notMem hz,indicator_of_notMem hz])) + +lemma physicalDyadicMoving_triangle_near {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {X V K : ℝ→Vec} (hV : Measurable V) (hK : Measurable K) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {w C p θ φ : ℝ} {k : Fin 4→ℕ} + (hw : 0g t*ENNReal.ofReal ‖K t‖) := hg.mul hK.norm.ennreal_ofReal + have hm : Measurable (fun t=>(g t*ENNReal.ofReal ‖K t‖)*ENNReal.ofReal c) := hgK.mul measurable_const + calc + _ ≤ ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + (physicalBinBase V B J).indicator (fun z : ConeCoordinate=>(g z.1*ENNReal.ofReal ‖K z.1‖)*ENNReal.ofReal c) (t,σ,n) + ∂sphereMeasure := by + apply setLIntegral_mono' measurableSet_Ioo + intro t _ + apply setLIntegral_mono' measurableSet_Ioo + intro σ hσ + apply lintegral_mono + intro n + by_cases ht : t∈J + · have hpw := mul_le_mul' (a:=g t) (b:=g t) le_rfl + (physicalDyadicMovingDensity_near_pointwise hs hJT hw hC hp hθ hφ hφ1 hsmall + hDlo hDhi hd ht (Ioo_subset_Icc_self hσ) hσ.2 (hband t ht) (hv t ht) hdensity n (K:=K)) + by_cases hz : (t,σ,n)∈physicalBinBase V B J + · dsimp [B] at hz + simpa only [B,c,indicator_of_mem hz,mul_assoc] using hpw + · dsimp [B] at hz + simpa only [B,c,indicator_of_notMem hz,mul_zero] using hpw + · simp only [hgJ t ht,zero_mul] + exact bot_le + _ ≤ ∫⁻z : ConeCoordinate,(g z.1*ENNReal.ofReal ‖K z.1‖)*ENNReal.ofReal c ∂physicalBinMeasure V B J := + physicalBin_triangle_weight_le hV B hJ T hm + _ = (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal ‖K z.1‖ ∂physicalBinMeasure V B J)*ENNReal.ofReal c := + lintegral_mul_const _ (hgK.comp measurable_fst) + _ ≤ ((∫⁻t in J,g t*ENNReal.ofReal ‖K t‖)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))*ENNReal.ofReal c := + mul_le_mul' (physicalBinMeasure_receiver_weight hV B hJ hφ.le hDhi hgK) le_rfl + _ = _ := by + have hr : B.rmin≤B.rmax := by + dsimp [B,representativeClosedBin] + have hh : 0(α zX t).1) (fun t=>(α zX t).2) K T w k (t,σ,n) := by + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + rw [←ENNReal.ofReal_mul (cone_denom_pos _ _ (sphere_norm n)).le, + projectedDyadicRateKernel_flux_norm α zX T k G hσt,hG] + rfl + +lemma PhaseFlowOn.label_moving_primitive_near {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {w C p θ φ : ℝ} {k : Fin 4→ℕ} + (hw : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J, + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2≤ + ENNReal.ofReal (128*C*p^3*θ^2)) + {b : ℝ→ℝ} (hb : Measurable b) (hbJ : ∀t∉J,b t=0) : + (∫⁻z : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T z))* + ENNReal.ofReal ‖labelConeKernel s F.flow zX T + (projectedDyadicRateKernel F.flow zX T k + (fun t=>angularDerivativeCLM w (F.flow zX t).2 (lorentzField s.E s.B (t,F.flow zX t)).2)) z‖)≤ + (∫⁻t in J,ENNReal.ofReal (b t)*ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (1962934272*C*(p*θ)^3*φ/w* + (representativeClosedBin T w k).rmax*((representativeClosedBin T w k).rmax- + (representativeClosedBin T w k).rmin)) := by + let X : ℝ→Vec := fun t=>(prefixFlow F.flow T zX t).1 + let V : ℝ→Vec := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let G := prefixAngularRate s F.flow T w hw zX + have hV : Measurable V := + (((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd).measurable + have hK : Measurable K := (F.continuous_prefixMomentumForce hs hT zX).measurable + have hKe : ∀t∈Icc 0 T,K t=(lorentzField s.E s.B (t,F.flow zX t)).2 := by + intro t ht + simp only [K,prefixMomentumForce,prefixFlow,prefixClamp_eq ht] + have hG : ∀t∈J,G t=angularDerivativeCLM w (F.flow zX t).2 (K t) := by + intro t ht + rw [hKe t (hJT ht)] + exact (prefixAngular_highband (s:=s) hw zX (hJT ht) (hv t ht)).2 + have he : ∀t∈Icc 0 T,X t=(F.flow zX t).1 ∧ V t=(F.flow zX t).2 := by + intro t ht + simp only [X,V,prefixFlow,prefixClamp_eq ht,and_self] + calc + _ = ∫⁻z : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T z))* + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) z‖ := by + apply lintegral_congr + intro z + apply weighted_labelProjected_congr s F.flow zX T k _ hbJ z + intro t ht + rw [hG t ht,hKe t (hJT ht)] + _ = ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (b t)*physicalDyadicMovingDensity s X V K T w k (t,σ,n) ∂sphereMeasure := by + rw [F.labelConeKernel_triangle_weighted_norm hs hT zX + (F.projectedDyadicRateKernel_continuousOn zX k (F.prefixAngular_regular hs hT hw zX).2.1) hb] + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + by_cases htJ : t∈J + · rw [mul_assoc,projectedDyadicRateKernel_polar_moving_density F.flow zX s T w k K hσ.2 (hG t htJ) n] + unfold physicalDyadicMovingDensity + rw [(he t (Ioo_subset_Icc_self ht)).1,(he t (Ioo_subset_Icc_self ht)).2] + · simp only [hbJ t htJ,ENNReal.ofReal_zero,zero_mul] + _ ≤ (∫⁻t in J,ENNReal.ofReal (b t)*ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (1962934272*C*(p*θ)^3*φ/w* + (representativeClosedBin T w k).rmax*((representativeClosedBin T w k).rmax- + (representativeClosedBin T w k).rmin)) := + physicalDyadicMoving_triangle_near hs hV hK hJ hJT hw hC hp hθ hφ hφ1 hsmall + hDlo hDhi hd (fun t ht=>by rw [(he t (hJT ht)).2]; exact hband t ht) + (fun t ht=>by rw [(he t (hJT ht)).2]; exact hv t ht) hdensity hb.ennreal_ofReal + (fun t ht=>by rw [hbJ t ht,ENNReal.ofReal_zero]) + _ = _ := by + congr 1 + apply setLIntegral_congr_fun hJ + intro t ht + dsimp only + rw [hKe t (hJT ht)] + +lemma Admissible.label_moving_primitive_near_constant {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w p θ φ : ℝ) (k : Fin 4→ℕ), + MeasurableSet J → J⊆Icc 0 T → 0angularDerivativeCLM w (F.flow zX t).2 (lorentzField s.E s.B (t,F.flow zX t)).2)) z‖)≤ + (∫⁻t in J,ENNReal.ofReal (b t)*ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (C*(p*θ)^3*φ/w* + (representativeClosedBin T w k).rmax*((representativeClosedBin T w k).rmax- + (representativeClosedBin T w k).rmin)) := by + obtain ⟨C,hC,hb⟩ := hd₀.uniform_particle_density_constant + refine ⟨1962934272*C,by positivity,?_⟩ + intro s T F hs hT h0 zX J w p θ φ k hJ hJT hw hp hθ hφ hφ1 hsmall hDlo hDhi hd hq hband hv b hbm hbJ + apply F.label_moving_primitive_near hs hT zX hJ hJT hw hC hp hθ hφ hφ1 hsmall hDlo hDhi hd hband hv _ hbm hbJ + intro z hz + exact coneBin_density_small_bound (sphere_norm z.2.2).le hp hθ hC hq hd + (fun v=>(hb s T F hs h0 z.2.1 ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _).2) + +lemma selected_representative_moving_bound {T C w : ℝ} {k : Fin 4→ℕ} {N : ℕ} + (hC : 0≤C) (hw : 0≤w) (h0 : k 0(prefixAngular_highband (s:=s) hw zX (hJT ht) (hv t ht)).2 + have h0abs : ∀t∉J,|b t|=0 := fun t ht=>by rw [hbJ t ht,abs_zero] + have hbnorm (k : Fin 4→ℕ) : Measurable (fun p : ℝ×Phase=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) := + ((hb.comp (F.labelReceiverTime_measurable zX)).norm.ennreal_ofReal).mul + ((F.measurable_labelConeKernel hs zX (F.projectedDyadicRateKernel_continuousOn zX k hG)).norm.ennreal_ofReal) + have hbound (k : Fin 4→ℕ) (hk : k∈Q) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖)≤ + W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)*ENNReal.ofReal (directionWeightMajorant N k)) := by + have hc (i : Fin 4) : 0angularDerivativeCLM w (F.flow zX t).2 (lorentzField s.E s.B (t,F.flow zX t)).2)) p‖ := by + apply lintegral_congr + intro p + exact weighted_labelProjected_congr s F.flow zX T k (fun t ht=>hGe t ht) h0abs p + rw [he] + have hn := hnear s T F hs hT h0 zX J w (sourceRepresentative (k 0)) + (cappedRepresentative (k 1)) (cappedRepresentative (k 2)) k hJ hJT hw hp.le (hc 1).le (hc 2) + (by dsimp [cappedRepresentative]; exact pow_le_one₀ (by norm_num) (by norm_num)) + (hQ k hk).2.2.1 le_rfl le_rfl le_rfl (by + change sourceRepresentative (k 0)/32 ≤ sourceRepresentative (k 0) + linarith) hband hv (fun t=>|b t|) hb.norm h0abs + refine hn.trans (mul_le_mul' (a:=W) (b:=W) le_rfl ?_) + rw [←ENNReal.ofReal_mul (by positivity : 0≤4*C*Real.sqrt (max 1 T)/w)] + exact ENNReal.ofReal_le_ofReal + (selected_representative_moving_bound hC hw.le (hQ k hk).1 (hQ k hk).2.1 (hQ k hk).2.2.2) + calc + _ = ∫⁻p : ℝ×Phase,ENNReal.ofReal ‖G (labelReceiverTime F.flow zX T p) + (labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p)‖ := by + apply lintegral_congr + intro p + by_cases ht : labelReceiverTime F.flow zX T p∈J + · rw [hGe _ ht] + · simp only [labelWeight,hbJ _ ht,zero_mul,zero_smul,map_zero] + _ = ∫⁻p : ℝ×Phase,∑'k : Fin 4→ℕ,Q.indicator (fun k=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) k := by + apply lintegral_congr + intro p + exact F.selected_receiver_rate_norm_sum s zX Q b G p + _ = ∑'k : Fin 4→ℕ,∫⁻p : ℝ×Phase,Q.indicator (fun k=> + ENNReal.ofReal |b (labelReceiverTime F.flow zX T p)| * + ENNReal.ofReal ‖labelConeKernel s F.flow zX T (projectedDyadicRateKernel F.flow zX T k G) p‖) k := by + apply lintegral_tsum + intro k + by_cases hk : k∈Q + · simpa only [indicator_of_mem hk] using (hbnorm k).aemeasurable + · simp only [indicator_of_notMem hk] + exact aemeasurable_const + _ ≤ ∑'k : Fin 4→ℕ,W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)* + ENNReal.ofReal (directionWeightMajorant N k)) := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · simpa only [indicator_of_mem hk] using hbound k hk + · simp only [indicator_of_notMem hk,lintegral_zero] + exact bot_le + _ = W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)* + ∑'k : Fin 4→ℕ,ENNReal.ofReal (directionWeightMajorant N k)) := by + rw [ENNReal.tsum_mul_left,ENNReal.tsum_mul_left] + _ ≤ W*(ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)*ENNReal.ofReal (8*(N:ℝ)^2)) := + mul_le_mul' (a:=W) (b:=W) le_rfl (mul_le_mul' (a:=ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)) + (b:=ENNReal.ofReal (4*C*Real.sqrt (max 1 T)/w)) le_rfl (tsum_directionWeightMajorant N)) + _ = _ := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤4*C*Real.sqrt (max 1 T)/w)] + congr 2 + ring + +lemma Admissible.selected_moving_bound {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)), + (∀z,s.f (0,z)≠0→∀σ∈Icc 0 T,1024*q (F.flow z σ).2≤(2:ℝ)^N) → + (∀k∈Q,cappedRepresentative (k 1)≤cappedRepresentative (k 2) ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1) → + MeasurableSet J → J⊆Icc 0 T → 0labelWeight F.flow zX T Q b p • actualLabelRatePrimitive s F.flow zX T p)= + fun p : ℝ×Phase=>labelWeight F.flow zX T (Q∩{k | k 0⟨hk.2.1,hk.2.2,hQ k hk.1⟩) + hJ hJT hw hband hv b hbm hbJ + +lemma directionWeight_deriv_outside {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : t∉Icc a b) : deriv (directionWeight a b ℓ) t=0 := + deriv_of_notMem_tsupport (fun h=>ht (directionWeight_tsupport hℓ hab h)) + +lemma directionWeight_lvariation {a b ℓ : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + {J : Set ℝ} (hJ : Icc a b⊆J) : + (∫⁻t in J,ENNReal.ofReal |deriv (directionWeight a b ℓ) t|)=2 := by + have hs : Function.support (fun t=>ENNReal.ofReal |deriv (directionWeight a b ℓ) t|)⊆Icc a b := by + intro t ht + by_contra hn + exact ht (by dsimp only; rw [directionWeight_deriv_outside hℓ hab hn,abs_zero,ENNReal.ofReal_zero]) + rw [setLIntegral_eq_of_support_subset (hs.trans hJ),←setLIntegral_eq_of_support_subset hs] + have hi : IntervalIntegrable (fun t=>|deriv (directionWeight a b ℓ) t|) volume a b := + ((directionWeight_lipschitz a b ℓ).lipschitzOnWith (s:=uIcc a b)).absolutelyContinuousOnInterval.intervalIntegrable_deriv.norm + rw [←ofReal_integral_eq_lintegral_ofReal + ((intervalIntegrable_iff_integrableOn_Icc_of_le (show a≤b by linarith)).mp hi) + (ae_of_all _ (fun t=>abs_nonneg _)),integral_Icc_eq_integral_Ioc, + ←intervalIntegral.integral_of_le (show a≤b by linarith),directionWeight_total_variation hℓ hab] + norm_num + +lemma directionWeight_ne_zero_interior {a b ℓ t : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) + (ht : directionWeight a b ℓ t≠0) : t∈Ioo a b := by + have hc : t∈Icc a b := directionWeight_tsupport hℓ hab (subset_closure ht) + refine ⟨lt_of_le_of_ne hc.1 ?_,lt_of_le_of_ne hc.2 ?_⟩ + · intro he + subst t + exact ht (directionWeight_endpoints hℓ hab).1 + · intro he + subst t + exact ht (directionWeight_endpoints hℓ hab).2 + +lemma directionWeight_sum_le_one {ι : Type*} (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) (t : ℝ) : + ∑i∈S,directionWeight (a i) (b i) (ℓ i) t≤1 := by + classical + by_cases hz : ∀i∈S,directionWeight (a i) (b i) (ℓ i) t=0 + · simp only [Finset.sum_eq_zero hz,zero_le_one] + · push Not at hz + obtain ⟨i,hi,hit⟩ := hz + rw [Finset.sum_eq_single i] + · exact (directionWeight_bounds (hℓ i hi) (hlen i hi)).2 + · intro j hj hji + by_contra hn + exact Set.disjoint_left.mp (hdis hi hj (Ne.symm hji)) + (directionWeight_ne_zero_interior (hℓ i hi) (hlen i hi) hit) + (directionWeight_ne_zero_interior (hℓ j hj) (hlen j hj) hn) + · exact fun hn=>(hn hi).elim + +lemma directionWeight_sum_ofReal_le_one {ι : Type*} (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) (t : ℝ) : + ∑i∈S,ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t|≤1 := by + have hn : ∀i∈S,0≤directionWeight (a i) (b i) (ℓ i) t := + fun i hi=>(directionWeight_bounds (hℓ i hi) (hlen i hi)).1 + simp_rw [Finset.sum_congr rfl (fun i hi=>congrArg ENNReal.ofReal (abs_of_nonneg (hn i hi)))] + rw [←ENNReal.ofReal_sum_of_nonneg hn] + exact (ENNReal.ofReal_le_ofReal (directionWeight_sum_le_one S a b ℓ hℓ hlen hdis t)).trans_eq (by norm_num) + +lemma directionWeight_sum_kernel {ι : Type*} (S : Finset ι) (a b ℓ : ι→ℝ) + (hℓ : ∀i∈S,0<ℓ i) (hlen : ∀i∈S,2*ℓ i≤b i-a i) + (hdis : (S:Set ι).Pairwise (fun i j=>Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j)))) + {J : Set ℝ} {g : ℝ→ℝ≥0∞} (hg : AEMeasurable g (volume.restrict J)) : + (∑i∈S,∫⁻t in J,ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t| * g t)≤∫⁻t in J,g t := by + have hm (i : ι) : AEMeasurable (fun t=>ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t| * g t) (volume.restrict J) := by + apply AEMeasurable.mul + · have hc : Continuous (fun t=>ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t|) := + ENNReal.continuous_ofReal.comp ((directionWeight_lipschitz (a i) (b i) (ℓ i)).continuous.abs) + exact hc.measurable.aemeasurable + · exact hg + rw [←lintegral_finsetSum' S (fun i _=>hm i)] + apply lintegral_mono + intro t + dsimp only + rw [←Finset.sum_mul] + exact (mul_le_mul' (directionWeight_sum_ofReal_le_one S a b ℓ hℓ hlen hdis t) le_rfl).trans_eq (one_mul _) + +def selectedAngularMovingCost (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T w : ℝ) (Q : Set (Fin 4→ℕ)) (b : ℝ→ℝ) : ℝ≥0∞ := + ∫⁻p : ℝ×Phase,ENNReal.ofReal ‖angularDerivativeCLM w (α zX (labelReceiverTime α zX T p)).2 + (lorentzField s.E s.B (labelReceiverTime α zX T p,α zX (labelReceiverTime α zX T p))).2 + (labelWeight α zX T Q b p • actualLabelRatePrimitive s α zX T p)‖ + +def selectedAngularWeightCost (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T w : ℝ) (Q : Set (Fin 4→ℕ)) (b : ℝ→ℝ) : ℝ≥0∞ := + ∫⁻p : ℝ×Phase,ENNReal.ofReal ‖angularMultiplierCLM w (α zX (labelReceiverTime α zX T p)).2 + (labelWeight α zX T Q (deriv b) p • actualLabelRatePrimitive s α zX T p)‖ + +lemma PhaseFlowOn.aemeasurable_receiver_force {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) : + AEMeasurable (fun t=>ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖) (volume.restrict J) := by + have hc : Continuous (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := + ENNReal.continuous_ofReal.comp ((F.continuous_prefixMomentumForce hs hT zX).norm) + apply hc.measurable.aemeasurable.congr + filter_upwards [ae_restrict_mem hJ] with t ht + simp only [prefixMomentumForce,prefixFlow,prefixClamp_eq (hJT ht)] + +lemma Admissible.direction_family_moving_bound {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)), + (∀z,s.f (0,z)≠0→∀σ∈Icc 0 T,1024*q (F.flow z σ).2≤(2:ℝ)^N) → + (∀k∈Q,cappedRepresentative (k 1)≤cappedRepresentative (k 2) ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1) → + MeasurableSet J → J⊆Icc 0 T → 0Disjoint (Ioo (a i) (b i)) (Ioo (a j) (b j))) → + (∑i∈S,selectedAngularMovingCost s F.flow zX T w Q (directionWeight (a i) (b i) (ℓ i)))≤ + (∫⁻t in J,ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(N:ℝ)^2/w) := by + obtain ⟨C,hC,hb⟩ := hd.selected_moving_bound + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX J w N Q hP hQ hJ hJT hw hband hv ι S a b ℓ hℓ hlen hcell hdis + have hi (i : ι) (hi : i∈S) := hb s T F hs hT h0 zX J w N Q hP hQ hJ hJT hw hband hv + (directionWeight (a i) (b i) (ℓ i)) (directionWeight_lipschitz _ _ _).continuous.measurable + (fun t ht=>image_eq_zero_of_notMem_tsupport (f:=directionWeight _ _ _) + (fun hn=>ht (hcell i hi (directionWeight_tsupport (hℓ i hi) (hlen i hi) hn)))) + calc + _ ≤ ∑i∈S,(∫⁻t in J,ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t| * + ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(N:ℝ)^2/w) := Finset.sum_le_sum hi + _ = (∑i∈S,∫⁻t in J,ENNReal.ofReal |directionWeight (a i) (b i) (ℓ i) t| * + ENNReal.ofReal ‖(lorentzField s.E s.B (t,F.flow zX t)).2‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(N:ℝ)^2/w) := (Finset.sum_mul ..).symm + _ ≤ _ := mul_le_mul' (directionWeight_sum_kernel S a b ℓ hℓ hlen hdis + (F.aemeasurable_receiver_force hs hT zX hJ hJT)) le_rfl + +lemma Admissible.direction_family_weight_bound {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (J : Set ℝ) (w : ℝ) (N : ℕ) (Q : Set (Fin 4→ℕ)), + (∀z,s.f (0,z)≠0→∀σ∈Icc 0 T,1024*q (F.flow z σ).2≤(2:ℝ)^N) → + (∀k∈Q,cappedRepresentative (k 1)≤cappedRepresentative (k 2) ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1) → + MeasurableSet J → J⊆Icc 0 T → 0directionWeight_deriv_outside (hℓ i hi) (hlen i hi) (fun hn=>ht (hcell i hi hn))) + rw [directionWeight_lvariation (hℓ i hi) (hlen i hi) (hcell i hi)] at hk + apply hk.trans_eq + rw [show (2:ℝ≥0∞)=ENNReal.ofReal (2:ℝ) by norm_num,←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2)] + congr 1 + ring + simpa only [Finset.sum_const, nsmul_eq_mul] using Finset.sum_le_sum hi + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedRemainder.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..d558dcd3f26d7af00a41a1538c77246284a662ab --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectedRemainder.lean @@ -0,0 +1,371 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates +import OAI.Analysis.VlasovMaxwell.Population.MagneticEstimates +import OAI.Analysis.VlasovMaxwell.Population.BulkSpatialUniform +import OAI.Analysis.VlasovMaxwell.Population.BulkReceiverScalar + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma bulkSelection_derivative_selected_cover {T P M A w I t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (htT : t≤T) (hσ : σ∈Ico 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) {n : Sphere} {v : Vec} + (hP : 1024*q v≤P) (H : CutoffState) + (hd : fderiv ℝ (stateCutoff T (bulkSelection P M A w I)) (t-σ,n.1,v,V t) H≠0) : + ∃k∈representativeSmallSector P,representativeSelected P M A w I k ∧ + ((t,σ,n),v)∈physicalBinPhaseSet V (representativeClosedBin T w k) J := by + have hr : 0(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J := by + obtain ⟨ht,htT,hσ,hb,hv,hd⟩ := F.partialCutoffTriangle_physical_nonzero zX + (bulkSelection P M A w I) H W hJT hband hP hp + exact bulkSelection_derivative_selected_cover (P:=P) (M:=M) (A:=A) (w:=w) (I:=I) + (V:=fun t=>(prefixFlow F.flow T zX t).2) (n:=p.1.2.2) ht htT hσ hb hv _ hd + +lemma selectedConeTriangle_nonzero_data {s : Solution} {α : Phase→ℝ→Phase} + {zX : Phase} {T : ℝ} {Q : Set (Fin 4→ℕ)} {A : ConeKernelState→Vec} + {W : ℝ→Vec→L[ℝ]Vec} {J : Set ℝ} {p : TrianglePhase} + (hp : selectedConeTriangle s α zX T Q A W J p≠0) : + p.1.1∈J ∧ p∈trianglePhaseDomain T ∧ + s.f ((triangleKernelState α zX p).1.2,(triangleKernelState α zX p).2.2)≠0 ∧ + stateCutoff T Q (coneCutoffState α zX (triangleKernelState α zX p))≠0 := by + have ht : p.1.1∈J := by + by_contra hh + exact hp (by simp only [selectedConeTriangle,indicator_of_notMem hh,zero_apply]) + have hc : p∈trianglePhaseDomain T := by + by_contra hh + exact hp (by simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem hh,map_zero]) + refine ⟨ht,hc,?_,?_⟩ + · intro hh + apply hp + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hc,hh,zero_smul,smul_zero,map_zero] + · intro hh + apply hp + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hc,selectedConeKernel,hh, + zero_smul,smul_zero,map_zero] + +lemma bulkSelection_cutoff_physical_cover {T P M A w I t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (hσ : σ∈Icc 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) {n : Sphere} {v : Vec} + (hP : 1024*q v≤P) + (hc : stateCutoff T (bulkSelection P M A w I) (t-σ,n.1,v,V t)≠0) : + ∃k∈representativeSmallSector P,representativeSelected P M A w I k ∧ + ((t,σ,n),v)∈physicalBinPhaseSet V (representativeClosedBin T w k) J := by + obtain ⟨k,hk,hpos⟩ := selectedDyadicCutoff_active hc + exact ⟨k,bulkSelection_positive_smallSector (sphere_norm n) hP hk hpos,hk.2, + physicalCutoff_positive_closedBin ht hσ hband hpos⟩ + +lemma PhaseFlowOn.selectedConeTriangle_physical_nonzero {s : Solution} {T P w : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (K : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {p : TrianglePhase} (hp : selectedConeTriangle s F.flow zX T Q K W J p≠0) : + p.1.1∈J ∧ p.1.2.1∈Icc 0 p.1.1 ∧ + q (prefixFlow F.flow T zX p.1.1).2∈Icc (w/8) (8*w) ∧ 1024*q p.2≤P ∧ + stateCutoff T Q (p.1.1-p.1.2.1,p.1.2.2.1,p.2,(prefixFlow F.flow T zX p.1.1).2)≠0 := by + obtain ⟨ht,hc,hf,hcut⟩ := selectedConeTriangle_nonzero_data hp + have he : (prefixFlow F.flow T zX p.1.1).2=(F.flow zX p.1.1).2 := by + simp only [prefixFlow,prefixClamp_eq (hJT ht)] + refine ⟨ht,⟨hc.2.1.le,hc.2.2.le⟩,?_,?_,?_⟩ + · rw [he]; exact hband _ ht + · exact hP p.1.2.1 ⟨hc.2.1.le,hc.2.2.le.trans hc.1.2.le⟩ + ((triangleKernelState F.flow zX p).2.2) hf + · rw [he]; exact hcut + +lemma PhaseFlowOn.bulkSelectedCone_support {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (K : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {p : TrianglePhase} (hp : selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) K W J p≠0) : + ∃k∈representativeSmallSector P,representativeSelected P M A w I k ∧ + p∈physicalBinPhaseSet (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J := by + obtain ⟨ht,hσ,hb,hv,hc⟩ := F.selectedConeTriangle_physical_nonzero zX + (bulkSelection P M A w I) K W hJT hband hP hp + exact bulkSelection_cutoff_physical_cover (P:=P) (M:=M) (A:=A) (w:=w) (I:=I) + (V:=fun t=>(prefixFlow F.flow T zX t).2) (n:=p.1.2.2) ht hσ hb hv hc + +lemma selectedConeTriangle_contract_norm_le {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} {p : TrianglePhase} (ht : p.1.1∈J) (hp : p∈trianglePhaseDomain T) + (hW : ‖W p.1.1‖≤1) : + ‖selectedConeTriangle s α zX T Q A W J p‖≤ + ‖(s.f ((triangleKernelState α zX p).1.2,(triangleKernelState α zX p).2.2)* + (1-dot p.1.2.2.1 (velocity (α zX p.1.1).2))) • A (triangleKernelState α zX p)‖ := by + apply (selectedConeTriangle_norm_le Q A W J p).trans + rw [indicator_of_mem ht] + apply ((W p.1.1).le_opNorm _).trans + apply (mul_le_mul_of_nonneg_right hW (norm_nonneg _)).trans + rw [one_mul,triangleConeKernel,indicator_of_mem hp,smul_smul,mul_comm] + +lemma PhaseFlowOn.bulkSelectedCone_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {K : ConeKernelState→Vec} (hK : ContinuousOn K (coneKernelInterior T)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) : + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) K W J p‖ ∂trianglePhaseMeasure)≤ + ∑'k : Fin 4→ℕ,({k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k}).indicator + (fun k=>∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) K W J (z,v)‖ + ∂volume ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + apply physicalBinPhase_cover_lintegral hV hJ T w Q + (F.selectedConeTriangle_measurable hs zX (bulkSelection P M A w I) hK hW hJ).norm.ennreal_ofReal + intro p hp + have hpn : selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) K W J p≠0 := by + intro hh + exact hp (by rw [hh,norm_zero,ENNReal.ofReal_zero]) + obtain ⟨k,hk,hr,hpk⟩ := F.bulkSelectedCone_support zX K W hJT hband hP hpn + exact ⟨k,⟨hk,hr⟩,hpk⟩ + +lemma velocity_bin_normal_bound {v n : Vec} {θ : ℝ} (hn : ‖n‖=1) + (hθ : 0≤θ) (hd : 1-dot n (velocity v)≤8*θ^2) : ‖velocity v-n‖≤4*θ := by + apply norm_sub_le_of_deficit (norm_velocity_lt_one v).le hn.le (by positivity) + rw [dot_comm] + nlinarith + +lemma unprojected_remainder_bin_cost {r f θ φ w : ℝ} {n v W K : Vec} + (hn : ‖n‖=1) (hr : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) {v : Vec} + (hv : v∈coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2)) : + ‖selectedConeTriangle s F.flow zX T Q (remainderConeKernel s F.flow zX) W J (z,v)‖≤ + 147*s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))+ + 15424*(cappedRepresentative (k 1)/(w*(cappedRepresentative (k 2))^2))* + ‖prefixMomentumForce s F.flow T zX z.1‖*(z.1-z.2.1)* + s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have ht := hJT hz.1 + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans ht.2⟩ + have hf := hs.nonnegative _ hσ ((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v) + by_cases hp : (z,v)∈trianglePhaseDomain T + · have heq : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq ht] + have hK : prefixMomentumForce s F.flow T zX z.1= + (lorentzField s.E s.B (z.1,F.flow zX z.1)).2 := by + simp only [prefixMomentumForce,heq,prefixClamp_eq ht] + have hD : 1-dot z.2.2.1 (velocity (F.flow zX z.1).2)∈ + Icc ((cappedRepresentative (k 2))^2/2) (8*(cappedRepresentative (k 2))^2) := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.2 + have hq : w/8≤q (F.flow zX z.1).2 := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.1.1 + rw [heq] at hv ⊢ + rw [hK] + apply (selectedConeTriangle_contract_norm_le Q (remainderConeKernel s F.flow zX) W hz.1 hp (hW _ hz.1)).trans + simpa only [triangleKernelState,remainderConeKernel,phaseAcceleration,lorentzField,lorentzPhase] using + unprojected_remainder_bin_cost (sphere_norm z.2.2) (sub_pos.mpr hp.2.2) + (by simpa only [heq] using hf) hθ hφ hw hsmall hv.2.1 hD hq + · simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero] + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + positivity + +lemma PhaseFlowOn.bulkRate_pointwise {s : Solution} {T w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (hI : 0(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) {v : Vec} + (hv : v∈coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2)) : + ‖selectedConeTriangle s F.flow zX T Q (fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) W J (z,v)‖≤ + 52*(cappedRepresentative (k 1)/(I*cappedRepresentative (k 2)))*(z.1-z.2.1)* + s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have ht := hJT hz.1 + have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans ht.2⟩ + have hf := hs.nonnegative _ hσ ((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v) + by_cases hp : (z,v)∈trianglePhaseDomain T + · have heq : prefixFlow F.flow T zX z.1=F.flow zX z.1 := by + simp only [prefixFlow,prefixClamp_eq ht] + have hD : 1-dot z.2.2.1 (velocity (F.flow zX z.1).2)∈ + Icc ((cappedRepresentative (k 2))^2/2) (8*(cappedRepresentative (k 2))^2) := by + simpa only [heq,representativeClosedBin] using hz.2.2.2.2 + rw [heq] at hv ⊢ + apply (selectedConeTriangle_contract_norm_le Q (fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) W hz.1 hp (hW _ hz.1)).trans + simpa only [triangleKernelState,normalisedRatePrimitive] using + unprojected_rate_bin_cost (sphere_norm z.2.2) (sub_pos.mpr hp.2.2) + (by simpa only [heq] using hf) hθ hφ (cappedRepresentative_le_one _) hI hsmall hv.2.1 hD + · simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero] + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + positivity + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.bulk_selected_family_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ W : ℝ→Vec→L[ℝ]Vec,Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p : ℝ×Phase,selectedMultiplierBulkDensity s F.flow zX T (bulkSelection P M A w I) + ((Icc a b).indicator W) p)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w))+ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := by + obtain ⟨Cs,hCs,hsource⟩ := hd.bulk_source_uniform T₀ + obtain ⟨Cg,hCg,hgeometry⟩ := hd.bulk_geometry_uniform T₀ + obtain ⟨Cr,hCr,hreceiver⟩ := hd.bulk_receiver_uniform T₀ + obtain ⟨Cb,hCb,hremainder⟩ := hd.bulk_remainder_uniform T₀ + let C := Cs+Cg+Cr+Cb + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hsource M A hM hA,hgeometry M A hM hA, + hreceiver M A (zero_lt_one.trans_le hM) hA,hremainder M A hM hA] with P hso hge hre hrm + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ W hW hW1 + let Q := bulkSelection P M A w I + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let K := ∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖ + let V := (Icc a b).indicator W + have hV : Measurable V := hW.indicator measurableSet_Icc + have hB : 0≤B := by dsimp [B]; positivity + have hsc := hso hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsrc hphysical hband HZ W hW hW1 + have hgc := hge hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsrc hphysical hband HZ W hW hW1 + have hrc := hre s T F hs hT hTT zX a b I w ha hb hw hwP hI hIP hphysical hband W hW hW1 + have hbc := hrm s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP hIP HZ hphysical hband W hW hW1 + have htr (H : ConeKernelState→CutoffState) (hH : ContinuousOn H (coneKernelInterior T)) := + F.partialCutoffLabelCost_triangle (J:=Icc a b) hs.energyPrefix hT zX Q hH hW measurableSet_Icc + have hts := htr _ (F.coneSourceCutoffTangent_continuousOn hs.energyPrefix zX) + have htg := htr _ (F.coneGeometryCutoffTangent_continuousOn hs.energyPrefix zX) + have htrc := htr _ (F.coneReceiverCutoffTangent_continuousOn hs.energyPrefix zX) + rw [coneSourceCutoffTangent_pullback] at hts + rw [coneGeometryCutoffTangent_pullback] at htg + rw [coneReceiverCutoffTangent_pullback] at htrc + have hcut := F.cutoff_label_integral_split hs.energyPrefix zX Q hV + dsimp only [V] at hcut + rw [hts,htg,htrc] at hcut + have hcut' := hcut.trans (add_le_add (add_le_add hsc hgc) hrc) + have hrem : (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖V (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Q p • actualLabelRemainder s F.flow zX T p)‖)≤ + ENNReal.ofReal (Cb*B)+ENNReal.ofReal (Cb*w^(-1/2:ℝ))*K := by + rw [F.actualLabelRemainder_eq_normalised zX] + change (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖(Icc a b).indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Q p • labelConeKernel s F.flow zX T (remainderConeKernel s F.flow zX) p)‖)≤_ + have ht := F.selectedConeTriangle_norm_transfer (J:=Icc a b) (A:=remainderConeKernel s F.flow zX) + hs.energyPrefix hT zX Q + ((F.normalised_remainder_continuousOn hs.energyPrefix zX).mono inter_subset_left) hW measurableSet_Icc + exact ht.le.trans hbc + have hmeas := (measurable_vec_clm_apply (hV.comp (F.labelReceiverTime_measurable zX)) + (F.actualLabelCutoffCost_measurable hs.energyPrefix zX Q)).norm.ennreal_ofReal + change Measurable (fun x=>ENNReal.ofReal ‖V (labelReceiverTime F.flow zX T x) + (actualLabelCutoffCost s F.flow zX T Q x)‖) at hmeas + change (∫⁻p : ℝ×Phase,selectedMultiplierBulkDensity s F.flow zX T Q V p)≤_ + simp only [selectedMultiplierBulkDensity] + rw [lintegral_add_left hmeas] + apply (add_le_add hcut' hrem).trans + have heq : (ENNReal.ofReal (Cs*B)+ENNReal.ofReal (Cg*B)+ENNReal.ofReal (Cr*w^(-1/2:ℝ))*K)+ + (ENNReal.ofReal (Cb*B)+ENNReal.ofReal (Cb*w^(-1/2:ℝ))*K)= + ENNReal.ofReal ((Cs+Cg+Cb)*B)+ENNReal.ofReal ((Cr+Cb)*w^(-1/2:ℝ))*K := by + rw [add_mul,add_mul,add_mul,ENNReal.ofReal_add (add_nonneg (mul_nonneg hCs hB) (mul_nonneg hCg hB)) (mul_nonneg hCb hB), + ENNReal.ofReal_add (mul_nonneg hCs hB) (mul_nonneg hCg hB), + ENNReal.ofReal_add (by positivity : 0≤Cr*w^(-1/2:ℝ)) (by positivity : 0≤Cb*w^(-1/2:ℝ)),add_mul] + ring + change (ENNReal.ofReal (Cs*B)+ENNReal.ofReal (Cg*B)+ENNReal.ofReal (Cr*w^(-1/2:ℝ))*K)+ + (ENNReal.ofReal (Cb*B)+ENNReal.ofReal (Cb*w^(-1/2:ℝ))*K)≤_ + rw [heq] + apply add_le_add + · apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_right (by dsimp [C]; linarith) hB + · apply mul_le_mul' _ le_rfl + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul_of_nonneg_right (by dsimp [C]; linarith) (Real.rpow_nonneg (zero_le_one.trans hw) _) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SelectionCounts.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectionCounts.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce795bff51a2739d668fc61fbe350de478e2fc41 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SelectionCounts.lean @@ -0,0 +1,907 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.PartitionOccupation + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def representativeGoodCost {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + ENNReal.ofReal (φ/(p*θ^2)) * + (∫⁻z : ConeCoordinate, ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B (Icc a b)) + +lemma Admissible.representative_good_Cauchy {d : Datum} (hd : Admissible d) : + ∃ C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → ∀(zX : Phase) (k : Fin 4→ℕ) (a b I w : ℝ), + 0≤a → b≤T → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

velocity (V t)) 1 a b I (k 2)≤ + ENNReal.ofReal (20*I*datumEnergyNumber d) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.energyPrefix.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hab) + rw [hs.initial_energy_eq] at hh + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*datumEnergyNumber d)) := mul_le_mul' le_rfl hh + _ = _ := by + norm_num only [Nat.reduceMul,Nat.reduceAdd,Nat.cast_ofNat] + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hangle (D : ℝ) (hD : D∈Icc B.Dmin B.Dmax) : DyadicWindow 1 (k 2) (Real.sqrt (D/2)) := + dyadicWindow_one_sqrt (k 2) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.1) + (by simpa only [B,representativeClosedBin,cappedRepresentative,inv_pow] using hD.2) + have hS0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + have he : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [he] + have hbnd := hbound s T F hs.energyPrefix hT hs.initial_f zX B (tsupport d.f₀) + a b I p θ φ 1 1 (k 2) hd.2.1 hS0 hJ hI hp hθ.le hφ.le (by norm_num) + (by change 0pow_nonneg selectionDecay_pos.le _)).trans_eq (tsum_geometric_of_abs_lt_one hr) + +lemma sum_selectionDecay_box (N : ℕ) : + ∑k∈dyadicBox (Fin 4) N,∏i,selectionDecay^(k i)≤((1-selectionDecay)⁻¹)^4 := by + classical + have heq : (instDecidableEqFin 4 : DecidableEq (Fin 4))= + (fun a b=>Classical.propDecidable (a=b)) := Subsingleton.elim _ _ + have hh := Finset.sum_prod_piFinset (Finset.range N) (fun (_i : Fin 4) (n : ℕ)=>selectionDecay^n) + rw [heq] at hh + have hsum : (∑k∈dyadicBox (Fin 4) N,∏i,selectionDecay^(k i))= + (∑n∈Finset.range N,selectionDecay^n)^4 := by + simpa [dyadicBox,Fin.prod_univ_four,pow_succ] using hh + rw [hsum] + exact pow_le_pow_left₀ (Finset.sum_nonneg (fun _ _=>pow_nonneg selectionDecay_pos.le _)) + (sum_selectionDecay N) 4 + +lemma sum_selectionDecay_finset (S : Finset (Fin 4→ℕ)) : + ∑k∈S,∏i,selectionDecay^(k i)≤((1-selectionDecay)⁻¹)^4 := by + obtain ⟨N,hN⟩ := finset_subset_dyadicBox S + exact (Finset.sum_le_sum_of_subset_of_nonneg hN (fun _ _ _=>Finset.prod_nonneg (fun _ _=>pow_nonneg selectionDecay_pos.le _))).trans + (sum_selectionDecay_box N) + +lemma sum_selectionWeight (S : Finset (Fin 4→ℕ)) {P : ℝ} + (hP : ∀k∈S,sourceRepresentative (k 0)≤P) + (hθ : ∀k∈S,1/sourceRepresentative (k 0)≤cappedRepresentative (k 1)) : + ∑k∈S,selectionWeight P (cappedRepresentative (k 1)) (cappedRepresentative (k 2)) + (cappedRepresentative (k 3))≤((1-selectionDecay)⁻¹)^4 := by + classical + by_cases hS : S.Nonempty + · let N := S.sup (fun k=>k 0) + have hN (k) (hk : k∈S) : k 0≤N := Finset.le_sup (f:=fun k : Fin 4→ℕ=>k 0) hk + have hNP : sourceRepresentative N≤P := by + obtain ⟨k,hk,he⟩ := Finset.exists_mem_eq_sup S hS (fun k=>k 0) + change sourceRepresentative (S.sup (fun k : Fin 4→ℕ=>k 0))≤P + rw [he] + exact hP k hk + let g : (Fin 4→ℕ)→(Fin 4→ℕ) := fun k=>![N-k 0,k 0+6-k 1,k 2,k 3] + have hg : Set.InjOn g ↑S := by + intro k hk l hl hkl + have hk1 := selection_angle_index (hθ k hk) + have hl1 := selection_angle_index (hθ l hl) + have h00 := congrFun hkl 0 + have h11 := congrFun hkl 1 + have h22 := congrFun hkl 2 + have h33 := congrFun hkl 3 + change N-k 0=N-l 0 at h00 + change k 0+6-k 1=l 0+6-l 1 at h11 + change k 2=l 2 at h22 + change k 3=l 3 at h33 + have hk0 := hN k hk + have hl0 := hN l hl + have h0e : k 0=l 0 := by omega + have h1e : k 1=l 1 := by omega + apply funext + intro i + fin_cases i + · exact h0e + · exact h1e + · exact h22 + · exact h33 + calc + _≤∑k∈S,∏i,selectionDecay^(g k i) := Finset.sum_le_sum (fun k hk=>by + simpa [g,Fin.prod_univ_four] using selectionWeight_gap_bound hNP (hN k hk) (selection_angle_index (hθ k hk))) + _=∑k∈S.image g,∏i,selectionDecay^(k i) := (Finset.sum_image (f:=fun k : Fin 4→ℕ=>∏i,selectionDecay^(k i)) (fun k hk l hl he=>hg hk hl he)).symm + _≤_ := sum_selectionDecay_finset _ + · rw [Finset.not_nonempty_iff_eq_empty.mp hS,Finset.sum_empty] + positivity + +lemma source_ratio_sq_le {p w : ℝ} (hp : 0source_ratio_sq_le (hp n) hw) + _=(S.card:ℝ)+(∑n∈S,(sourceRepresentative n)^2)/w^2 := by + simp_rw [Finset.sum_add_distrib,div_pow,←Finset.sum_div] + simp + _≤(S.card:ℝ)+(2*P^2)/w^2 := by + gcongr + calc + _≤∑n∈S,P*sourceRepresentative n := Finset.sum_le_sum (fun n hn=>by + nlinarith [mul_le_mul_of_nonneg_right (hS n hn) (hp n).le]) + _=P*(∑n∈S,sourceRepresentative n) := (Finset.mul_sum ..).symm + _≤P*(2*P) := mul_le_mul_of_nonneg_left (sourceRepresentative_sum_bound hP S hS) hP + _=2*P^2 := by ring + _=_ := by ring + +lemma pair_source_ratio_sq_sum {P w N : ℝ} (hP : 0≤P) (hw : 0cappedRepresentative_le_one n) + norm_num at hh + exact hh + constructor + · calc + _≤∑n∈U.product V,(sourceRepresentative n.1/min (sourceRepresentative n.1) w)^2 := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun _ _ _=>sq_nonneg _) + _=(∑n∈U,(sourceRepresentative n/min (sourceRepresentative n) w)^2)*(V.card:ℝ) := by + simp only [Finset.product_eq_sprod,Finset.sum_product,Finset.sum_const,nsmul_eq_mul] + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro n hn + ring + _≤(N+2*(P/w)^2)*N := mul_le_mul hu hfN (Nat.cast_nonneg _) (by positivity) + _=_ := by ring + · calc + _≤∑n∈U.product V,(sourceRepresentative n.1/min (sourceRepresentative n.1) w)^2*cappedRepresentative n.2 := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun _ _ _=>mul_nonneg (sq_nonneg _) (cappedRepresentative_pos _).le) + _=(∑n∈U,(sourceRepresentative n/min (sourceRepresentative n) w)^2)*(∑n∈V,cappedRepresentative n) := by + rw [Finset.product_eq_sprod,Finset.sum_product] + rw [Finset.sum_mul] + apply Finset.sum_congr rfl + intro n hn + rw [Finset.mul_sum] + _≤(N+2*(P/w)^2)*2 := mul_le_mul hu hv (Finset.sum_nonneg (fun n _=>(cappedRepresentative_pos n).le)) (by positivity) + _=_ := by ring + +lemma joint_budget_Cauchy {E N x : ℝ} (hE : 0≤E) (hN : 0≤N) (hx : 0≤x) + {ι : Type*} (S : Finset ι) (J W : ι→ℝ) (hJ : ∀i∈S,0≤J i) + (hbudget : ∑i∈S,J i≤E) (hW : ∑i∈S,(W i)^2≤N*(N+2*x^2)) : + ∑i∈S,W i*Real.sqrt (J i)≤Real.sqrt E*(N+2*Real.sqrt N*x) := by + have hc := Finset.sum_mul_sq_le_sq_mul_sq S W (fun i=>Real.sqrt (J i)) + have he : (∑i∈S,(Real.sqrt (J i))^2)=∑i∈S,J i := + Finset.sum_congr rfl (fun i hi=>Real.sq_sqrt (hJ i hi)) + rw [he] at hc + have hu := mul_le_mul hW hbudget (Finset.sum_nonneg hJ) (by positivity : 0≤N*(N+2*x^2)) + have hs := Real.sq_sqrt hE + have hn := Real.sq_sqrt hN + have hb : 0≤Real.sqrt E*(N+2*Real.sqrt N*x) := by positivity + have hsq : N*(N+2*x^2)*E≤(Real.sqrt E*(N+2*Real.sqrt N*x))^2 := by + rw [mul_pow,hs] + have he : (N+2*Real.sqrt N*x)^2=N^2+4*N*Real.sqrt N*x+4*N*x^2 := by + ring_nf + rw [hn] + ring + rw [he] + nlinarith [mul_nonneg hE (mul_nonneg hN (mul_nonneg (Real.sqrt_nonneg N) hx)), + mul_nonneg hE (mul_nonneg hN (sq_nonneg x))] + exact le_of_sq_le_sq (hc.trans (hu.trans hsq)) hb + +lemma joint_budget_weighted_Cauchy {E N x : ℝ} (hE : 0≤E) (hN : 0≤N) (hx : 0≤x) + {ι : Type*} (S : Finset ι) (J W : ι→ℝ) (hJ : ∀i∈S,0≤J i) + (hbudget : ∑i∈S,J i≤E) (hW : ∑i∈S,(W i)^2≤2*(N+2*x^2)) : + ∑i∈S,W i*Real.sqrt (J i)≤Real.sqrt E*(2*Real.sqrt N+2*x) := by + have hc := Finset.sum_mul_sq_le_sq_mul_sq S W (fun i=>Real.sqrt (J i)) + have he : (∑i∈S,(Real.sqrt (J i))^2)=∑i∈S,J i := + Finset.sum_congr rfl (fun i hi=>Real.sq_sqrt (hJ i hi)) + rw [he] at hc + have hu := mul_le_mul hW hbudget (Finset.sum_nonneg hJ) (by positivity : 0≤2*(N+2*x^2)) + have hs := Real.sq_sqrt hE + have hn := Real.sq_sqrt hN + have hb : 0≤Real.sqrt E*(2*Real.sqrt N+2*x) := by positivity + have hsq : 2*(N+2*x^2)*E≤(Real.sqrt E*(2*Real.sqrt N+2*x))^2 := by + rw [mul_pow,hs] + have he : (2*Real.sqrt N+2*x)^2=4*N+8*Real.sqrt N*x+4*x^2 := by + ring_nf + rw [hn] + ring + rw [he] + nlinarith [mul_nonneg hE (mul_nonneg (Real.sqrt_nonneg N) hx),mul_nonneg hE hN] + exact le_of_sq_le_sq (hc.trans (hu.trans hsq)) hb + +lemma shared_weighted_pair_Cauchy {P w N E : ℝ} (hP : 0≤P) (hw : 0(sourceRepresentative n.1/min (sourceRepresentative n.1) w)*Real.sqrt (cappedRepresentative n.2)) hJ hbudget + simpa only [mul_pow,Real.sq_sqrt (cappedRepresentative_pos _).le] using h2 + +def pairCountConstant : ℝ := 2+1/Real.log 2 +lemma pairCountConstant_pos : 0cappedRepresentative_le_one n) + norm_num at hh + exact hh + calc + _≤∑n∈U.product V,sourceRepresentative n.1*cappedRepresentative n.2 := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun n _ _=>by + have hp : 0(cappedRepresentative_pos _).le)) (by positivity) + _=_ := by ring + +lemma paired_count_Cauchy_factors {C L X : ℝ} (hC : 0≤C) (hL : 1≤L) (hX : 1≤X) : + C*L+2*Real.sqrt (C*L)*X≤(C+2*Real.sqrt C)*L*X ∧ + 2*Real.sqrt (C*L)+2*X≤(2*Real.sqrt C+2)*Real.sqrt L*X := by + have hL0 : 0≤L := zero_le_one.trans hL + have hX0 : 0≤X := zero_le_one.trans hX + have hroot : 1≤Real.sqrt L := by simpa using Real.sqrt_le_sqrt hL + have hrL : Real.sqrt L≤L := by nlinarith [Real.sq_sqrt hL0] + rw [Real.sqrt_mul hC] + constructor + · have h1 : C*L≤C*L*X := le_mul_of_one_le_right (mul_nonneg hC hL0) hX + have h2 : 2*(Real.sqrt C*Real.sqrt L)*X≤2*(Real.sqrt C*L)*X := by gcongr + nlinarith + · have h1 : 2*(Real.sqrt C*Real.sqrt L)≤2*(Real.sqrt C*Real.sqrt L)*X := + le_mul_of_one_le_right (by positivity) hX + have h2 : 2*X≤2*Real.sqrt L*X := by nlinarith + nlinarith + +lemma shared_radius_pair_sum {P M A I w E : ℝ} + (hP : 1≤P) (hL : 1≤Real.log (2+P)) (hM : 0≤M) (hA : 0≤A) + (hI : 0≤I) (hw : 0(hS n hn).1 + obtain ⟨hc1,hc2⟩ := small_pair_cardinals hP hL S hS + obtain ⟨hb1,hb2⟩ := shared_weighted_pair_Cauchy hP0.le hw hE S J hJ hbudget hS' hc1 hc2 + obtain ⟨hf1,hf2⟩ := paired_count_Cauchy_factors hC hL ((one_le_div hw).mpr hwP) + have hD1 : C+2*Real.sqrt C≤D := by dsimp [D]; linarith [Real.sqrt_nonneg C] + have hD2 : 2*Real.sqrt C+2≤D := by dsimp [D]; linarith [Real.sqrt_nonneg C] + have hu : (∑n∈S,(sourceRepresentative n.1/min (sourceRepresentative n.1) w)*Real.sqrt (J n))≤ + Real.sqrt E*(D*L*(P/w)) := by + apply hb1.trans + apply mul_le_mul_of_nonneg_left _ (Real.sqrt_nonneg E) + exact hf1.trans (by gcongr) + have hv : (∑n∈S,(sourceRepresentative n.1/min (sourceRepresentative n.1) w)*Real.sqrt (cappedRepresentative n.2)*Real.sqrt (J n))≤ + Real.sqrt E*(D*Real.sqrt L*(P/w)) := by + apply hb2.trans + apply mul_le_mul_of_nonneg_left _ (Real.sqrt_nonneg E) + exact hf2.trans (by gcongr) + have hsum := source_receiver_pair_sum hP0.le S hS' + have hex (n : ℕ×ℕ) (hn : n∈S) := shared_radius_expansion (J:=J n) hP0 hM hA hI + (show 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + representativeGoodCost s F zX w k a b≤ + ENNReal.ofReal (C*min (I*Real.sqrt h*p^2*φ^2) + (Real.sqrt I*Real.sqrt (p*pureOccupationEnvelope P 512 16384 M A p w φ h I)/(θ*h))) := by + obtain ⟨Cg,hCg,hcauchy⟩ := hd.representative_good_Cauchy + let E := datumEnergyNumber d + let H₀ := max 1 T₀ + let K := 1000000000*H₀^2 + let Cn := 128*Cg*Real.sqrt 15360*Real.sqrt E*Real.sqrt H₀ + let Cf := Real.sqrt (20480*Cg*K)*E + let C := max Cn Cf + have hE : 0≤E := hd.datumEnergyNumber_nonneg + have hK : 0≤K := by dsimp [K]; positivity + have hCn : 0≤Cn := by dsimp [Cn]; positivity + have hCf : 0≤Cf := by dsimp [Cf]; positivity + have hC : 0≤C := hCn.trans (le_max_left _ _) + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hd.representative_pure_occupation T₀ M A hM hA] with P hoccup + intro s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hsmall hsource HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let B := representativeClosedBin T w k + let O := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d.f₀) a b + (max 0 (a-B.rmax)) (min T (b-B.rmin))) + let U := pureOccupationEnvelope P 512 16384 M A p w φ h I + let D := ENNReal.ofReal (128*Cg*p^3*θ^2) + let N := I*Real.sqrt h*p^2*φ^2 + let R := Real.sqrt I*Real.sqrt (p*U)/(θ*h) + have hp : 0

k∈Q) + have hU (k) (hk : k∈U) : k∈Q := (Finset.mem_filter.mp hk).2 + have hsum : (∑k∈S,Q.indicator f k)=∑k∈U,f k := by simp [U,Finset.sum_filter,indicator_apply] + rw [hsum] + calc + _ ≤ ∑k∈U,ENNReal.ofReal (c*selectionWeight P (cappedRepresentative (k 1)) + (cappedRepresentative (k 2)) (cappedRepresentative (k 3))) := Finset.sum_le_sum (fun k hk=>hf k (hU k hk)) + _ = ENNReal.ofReal (c*(∑k∈U,selectionWeight P (cappedRepresentative (k 1)) + (cappedRepresentative (k 2)) (cappedRepresentative (k 3)))) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun k _=>mul_nonneg hc + (selectionWeight_nonneg hP0 (cappedRepresentative_pos _).le + (cappedRepresentative_pos _).le (cappedRepresentative_pos _).le)),Finset.mul_sum] + _ ≤ _ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left + (sum_selectionWeight U (fun k hk=>hP k (hU k hk)) (fun k hk=>hθ k (hU k hk))) hc) + +lemma Admissible.unselected_good_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + (∑'k : Fin 4→ℕ,Q.indicator (fun k=>representativeGoodCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*P*Real.sqrt I) := by + obtain ⟨C,hC,hbound⟩ := hd.representative_good_envelope T₀ + refine ⟨C*((1-selectionDecay)⁻¹)^4,by positivity,?_⟩ + intro M A hM hA + filter_upwards [hbound M A hM hA,eventually_ge_atTop (1:ℝ)] with P hbnd hP + intro s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hsource HZ + dsimp only + let Q := {k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + have hh := selection_weighted_tsum (zero_le_one.trans hP) (by positivity : 0≤C*P*Real.sqrt I) + Q (fun _ hk=>hk.1.1) (fun _ hk=>hk.1.2.1) + (fun k=>representativeGoodCost s F zX w k a b) (fun k hk=>by + have he := hbnd s T F hs hT hTT zX k a b I w hzX ha hb hab hI hJI hw hk.1.2.2 hsource HZ + have hnot := le_of_not_gt hk.2 + exact he.trans (ENNReal.ofReal_le_ofReal (by + have hmul := mul_le_mul_of_nonneg_left hnot hC + simpa only [mul_assoc] using hmul))) + convert hh using 1 + congr 1 + ring + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma small_power_four {x y e : ℝ} (hx : 0≤x) (hy : 0≤y) + (he : 0≤e) (he1 : e≤1) (hxy : x≤4*y) : x^e≤4*y^e := by + calc + x^e≤(4*y)^e := Real.rpow_le_rpow hx hxy he + _=(4:ℝ)^e*y^e := Real.mul_rpow (by norm_num) hy + _≤4*y^e := mul_le_mul_of_nonneg_right (by + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_le (by norm_num : (1:ℝ)≤4) he1) + (Real.rpow_nonneg hy _) + +lemma small_negative_power_four {x y e : ℝ} (hx : 0 C₁*M) =o[atTop] + (fun P : ℝ => P^(66/100000 : ℝ)) := + (Asymptotics.isLittleO_const_id_atTop _).comp_tendsto (tendsto_rpow_atTop he) + have hsqrt := (isLittleO_log_rpow_rpow_atTop (1/2 : ℝ) he).const_mul_left + (C₁*Real.sqrt (2*A)) + have hsum := hconst.add hsqrt + filter_upwards [hsum.bound (by norm_num : (0 : ℝ) < 1), + (tendsto_rpow_atTop (by norm_num : (0 : ℝ) < 3/10)).eventually_ge_atTop C₀, + eventually_ge_atTop (2 : ℝ)] with P hsum hC₀ hP + have hP0 : 0 < P := by linarith + refine ⟨by linarith,hC₀,?_⟩ + have hlog : Real.log (2+P) ≤ 2*Real.log P := by + calc + _ ≤ Real.log (P^2) := Real.log_le_log (by positivity) (by nlinarith) + _ = _ := by rw [Real.log_pow]; norm_num + have hs : Real.sqrt (A*Real.log (2+P)) ≤ + Real.sqrt (2*A)*Real.sqrt (Real.log P) := by + rw [← Real.sqrt_mul (by positivity : 0 ≤ 2*A)] + apply Real.sqrt_le_sqrt + nlinarith + have hb : C₁*M+(C₁*Real.sqrt (2*A))*Real.log P^(1/2 : ℝ) ≤ P^(66/100000 : ℝ) := by + have := (le_abs_self (C₁*M+(C₁*Real.sqrt (2*A))*Real.log P^(1/2 : ℝ))).trans hsum + simpa only [Real.norm_eq_abs, one_mul, abs_of_pos (Real.rpow_pos_of_pos hP0 _)] using this + rw [← Real.sqrt_eq_rpow] at hb + nlinarith + +def selectionWeight (P θ φ h : ℝ) : ℝ := + (P*θ)^(-1/100000 : ℝ)*φ^(1/100000 : ℝ)*h^(1/100000 : ℝ) + +def receiverCoefficient (w p θ φ h : ℝ) : ℝ := + w⁻¹ * min (h^2*(p*θ)^3) ((p*θ*h*φ^2)⁻¹) + +def stabilityRate (P C₁ M A p w φ : ℝ) : ℝ := + C₁*(P/min p w)*(M/φ+Real.sqrt (A*Real.log (2+P)/φ)) + +def stabilityLength (P C₁ M A p w φ : ℝ) : ℝ := + (stabilityRate P C₁ M A p w φ)⁻¹ ^ 2 + +lemma div_stabilityLength (P C₁ M A p w φ t : ℝ) : + t/stabilityLength P C₁ M A p w φ = + t*(stabilityRate P C₁ M A p w φ)^2 := by + simp [stabilityLength, div_eq_mul_inv, inv_pow] + +lemma sqrt_div_le_small_denominator {a x : ℝ} (ha : 0 ≤ a) + (hx : 0 < x) (hx₁ : x ≤ 1) : Real.sqrt (a/x) ≤ Real.sqrt a/x := by + rw [Real.sqrt_div ha] + exact div_le_div_of_nonneg_left (Real.sqrt_nonneg a) hx + (Real.le_sqrt_self_iff.mpr hx₁) + +lemma rpow_min_exponent {P a b : ℝ} (hP : 1 < P) : + min (P^a) (P^b) = P^(min a b) := by + rcases le_total a b with h | h + · rw [min_eq_left h, min_eq_left ((Real.rpow_le_rpow_left_iff hP).mpr h)] + · rw [min_eq_right h, min_eq_right ((Real.rpow_le_rpow_left_iff hP).mpr h)] + +lemma sqrt_rpow_base {P : ℝ} (hP : 0 ≤ P) (a : ℝ) : + Real.sqrt (P^a) = P^(a/2) := by + rw [Real.sqrt_eq_rpow, ← Real.rpow_mul hP] + congr 1 + ring + +lemma stabilityRate_power_bound {P C₁ M A p w φ α z c y : ℝ} + (hP : 1 < P) (hC₁ : 0 ≤ C₁) (hA : 0 ≤ A) + (hp : p=P^(1-α)) (hw : w=P^z) (hφ : φ=P^(-y)) + (hφ₁ : φ ≤ 1) (hzc : z+c=1) (hz : (66/100 : ℝ) < z) + (hconst : C₁*(M+Real.sqrt (A*Real.log (2+P))) ≤ P^(66/100000 : ℝ)) : + stabilityRate P C₁ M A p w φ ≤ P^(max α c+y+z/1000) := by + have hP0 : 0 < P := zero_lt_one.trans hP + have hφ0 : 0 < φ := hφ ▸ Real.rpow_pos_of_pos hP0 _ + have hm : min p w = P^(1-max α c) := by + rw [hp,hw,rpow_min_exponent hP] + congr 1 + rcases le_total α c with hh | hh + · rw [max_eq_right hh,min_eq_right (by linarith)]; linarith + · rw [max_eq_left hh,min_eq_left (by linarith)] + have hm0 : 0 < min p w := hm ▸ Real.rpow_pos_of_pos hP0 _ + have hAL : 0 ≤ A*Real.log (2+P) := mul_nonneg hA (Real.log_nonneg (by linarith)) + have hs := sqrt_div_le_small_denominator hAL hφ0 hφ₁ + have hfactor : P/min p w/φ = P^(max α c+y) := by + rw [hm,hφ] + nth_rw 1 [← Real.rpow_one P] + rw [← Real.rpow_sub hP0,← Real.rpow_sub hP0] + congr 1 + ring + calc + _ ≤ C₁*(P/min p w)*(M/φ+Real.sqrt (A*Real.log (2+P))/φ) := by + unfold stabilityRate + gcongr + _ = (C₁*(M+Real.sqrt (A*Real.log (2+P)))) * P^(max α c+y) := by + rw [← hfactor] + ring + _ ≤ P^(66/100000 : ℝ) * P^(max α c+y) := by gcongr + _ = P^((66/100000 : ℝ)+(max α c+y)) := (Real.rpow_add hP0 _ _).symm + _ ≤ _ := (Real.rpow_le_rpow_left_iff hP).mpr (by linarith) + +lemma nat_pow_rpow_base {P : ℝ} (hP : 0 ≤ P) (a : ℝ) (n : ℕ) : + (P^a)^n = P^(a*n) := (Real.rpow_mul_natCast hP a n).symm + +lemma selectionWeight_power {P p θ φ h α b y H : ℝ} (hP : 0 < P) + (hp : p=P^(1-α)) (hpθ : p*θ=P^b) (hφ : φ=P^(-y)) (hh : h=P^(-H)) : + selectionWeight P θ φ h = P^(-(α+b+y+H)/100000) := by + have hp0 : p ≠ 0 := hp ▸ (Real.rpow_pos_of_pos hP _).ne' + have hPθ : P*θ = P^(α+b) := by + calc + _ = (P*(p*θ))/p := by field_simp + _ = (P*P^b)/P^(1-α) := by rw [hpθ,hp] + _ = P^(1+b)/P^(1-α) := by rw [Real.rpow_add hP,Real.rpow_one] + _ = P^((1+b)-(1-α)) := (Real.rpow_sub hP _ _).symm + _ = _ := by congr 1; ring + unfold selectionWeight + rw [hPθ,hφ,hh,← Real.rpow_mul hP.le,← Real.rpow_mul hP.le, + ← Real.rpow_mul hP.le,← Real.rpow_add hP,← Real.rpow_add hP] + congr 1 + ring + +lemma receiverCoefficient_power {P w p θ φ h z b y H : ℝ} (hP : 0 < P) + (hw : w=P^z) (hpθ : p*θ=P^b) (hφ : φ=P^(-y)) (hh : h=P^(-H)) : + receiverCoefficient w p θ φ h = + min (P^(-z-2*H+3*b)) (P^(-z-b+H+2*y)) := by + unfold receiverCoefficient + rw [hw,hpθ,hφ,hh,mul_min_of_nonneg _ _ (inv_nonneg.mpr (Real.rpow_nonneg hP.le _)), + ← Real.rpow_neg hP.le, nat_pow_rpow_base hP.le, nat_pow_rpow_base hP.le, + nat_pow_rpow_base hP.le] + norm_num only [Nat.cast_ofNat] + simp only [← Real.rpow_add hP,← Real.rpow_neg hP.le] + congr 2 <;> ring + +lemma selected_near_far_powers + {P p w θ φ h I μ α z c b y H Δ : ℝ} (hP : 1 < P) + (hp : p=P^(1-α)) (hw : w=P^z) (hpθ : p*θ=P^b) + (hφ : φ=P^(-y)) (hh : h=P^(-H)) + (hzc : z+c=1) (hΔ : Δ=(α+b+y+H)/100000) + (hI0 : 0 < I) (hI : I ≤ (w/P)^2) + (hselected : P*Real.sqrt I*selectionWeight P θ φ h < + min (I*Real.sqrt h*p^2*φ^2) (Real.sqrt I*Real.sqrt (p*μ)/(θ*h))) : + 2*α+H/2+2*y < z+Δ ∧ P^(α+b-H-Δ) < Real.sqrt (p*μ) := by + have hP0 : 0 < P := zero_lt_one.trans hP + have hp0 : 0 < p := hp ▸ Real.rpow_pos_of_pos hP0 _ + have hθ0 : 0 < θ := (mul_pos_iff.mp (hpθ ▸ Real.rpow_pos_of_pos hP0 _)).resolve_right + (by rintro ⟨hh,_⟩; linarith) |>.2 + have hh0 : 0 < h := hh ▸ Real.rpow_pos_of_pos hP0 _ + have hWI : selectionWeight P θ φ h = P^(-Δ) := by + rw [selectionWeight_power hP0 hp hpθ hφ hh,hΔ,neg_div] + have hI' : I ≤ P^(-2*c) := by + calc + I ≤ (w/P)^2 := hI + _ = (P^(z-1))^2 := by rw [Real.rpow_sub hP0,Real.rpow_one,hw] + _ = P^(-2*c) := by rw [nat_pow_rpow_base hP0.le]; congr 1; norm_num; linarith + have hsI : 0 < Real.sqrt I := Real.sqrt_pos.mpr hI0 + have hsI' : Real.sqrt I ≤ P^(-c) := by + calc + _ ≤ Real.sqrt (P^(-2*c)) := Real.sqrt_le_sqrt hI' + _ = _ := by rw [sqrt_rpow_base hP0.le]; congr 1; ring + have hθeq : θ=P^(α+b-1) := by + calc + θ = (p*θ)/p := by field_simp + _ = P^b/P^(1-α) := by rw [hpθ,hp] + _ = P^(b-(1-α)) := (Real.rpow_sub hP0 _ _).symm + _ = _ := by congr 1; ring + have hn := hselected.trans_le (min_le_left _ _) + have hf := hselected.trans_le (min_le_right _ _) + have hn' : P*selectionWeight P θ φ h < Real.sqrt I*Real.sqrt h*p^2*φ^2 := by + apply (mul_lt_mul_iff_right₀ hsI).mp + calc + _ = P*Real.sqrt I*selectionWeight P θ φ h := by ring + _ < _ := hn + _ = (Real.sqrt I)^2*Real.sqrt h*p^2*φ^2 := by rw [Real.sq_sqrt hI0.le] + _ = _ := by ring + have hnb : P^(1-Δ) < P^(-c-H/2+2*(1-α)-2*y) := by + calc + _ = P*selectionWeight P θ φ h := by + rw [hWI,Real.rpow_sub hP0,Real.rpow_one,Real.rpow_neg hP0.le,div_eq_mul_inv] + _ < _ := hn' + _ ≤ P^(-c)*Real.sqrt h*p^2*φ^2 := by gcongr + _ = _ := by + rw [hh,hp,hφ,sqrt_rpow_base hP0.le,nat_pow_rpow_base hP0.le,nat_pow_rpow_base hP0.le] + norm_num only [Nat.cast_ofNat] + simp only [← Real.rpow_add hP0] + congr 1 + ring + have hne := (Real.rpow_lt_rpow_left_iff hP).mp hnb + have hf' : P*selectionWeight P θ φ h*(θ*h) < Real.sqrt (p*μ) := by + have ht := (lt_div_iff₀ (mul_pos hθ0 hh0)).mp hf + apply (mul_lt_mul_iff_right₀ hsI).mp + convert ht using 1; ring + have hfb : P*selectionWeight P θ φ h*(θ*h) = P^(α+b-H-Δ) := by + rw [hWI,hθeq,hh] + have ee : P*P^(-Δ)=P^(1-Δ) := by + rw [Real.rpow_sub hP0,Real.rpow_one,Real.rpow_neg hP0.le,div_eq_mul_inv] + rw [ee,← Real.rpow_add hP0,← Real.rpow_add hP0] + congr 1 + ring + exact ⟨by linarith, hfb ▸ hf'⟩ + +def ImprovedWindow (P p w φ : ℝ) : Prop := + P^(7/10 : ℝ) ≤ p ∧ P^(7/10 : ℝ) ≤ w ∧ + p^(-49/100 : ℝ) ≤ φ ∧ φ ≤ p^(-16/100 : ℝ) ∧ + w^(-49/100 : ℝ) ≤ φ ∧ φ ≤ w^(-16/100 : ℝ) + +def PureOccupationBounds (P C₀ C₁ M A p w φ h I μ : ℝ) : Prop := + μ ≤ max I h/p ∧ + (C₀/min p w < φ → μ ≤ (h/p)*max 1 + (max (I/stabilityLength P C₁ M A p w φ) (h/stabilityLength P C₁ M A p w φ))) ∧ + (ImprovedWindow P p w φ → μ ≤ (h/p)*φ^(-29/25 : ℝ)* + max 1 (max (I/(min p w/P)^2) (h/(min p w/P)^2))) + +lemma improvedWindow_of_powers {P p w φ α z y : ℝ} (hP : 1 < P) + (hp : p=P^(1-α)) (hw : w=P^z) (hφ : φ=P^(-y)) + (hp' : (7/10 : ℝ) ≤ 1-α) (hw' : (7/10 : ℝ) ≤ z) + (hyl : (16/100 : ℝ)*max z (1-α) ≤ y) + (hyu : y ≤ (49/100 : ℝ)*min z (1-α)) : ImprovedWindow P p w φ := by + have hP0 : 0 < P := zero_lt_one.trans hP + have hzlo := le_max_left z (1-α) + have hplo := le_max_right z (1-α) + have hzup := min_le_left z (1-α) + have hpup := min_le_right z (1-α) + unfold ImprovedWindow + rw [hp,hw,hφ] + refine ⟨(Real.rpow_le_rpow_left_iff hP).mpr hp', + (Real.rpow_le_rpow_left_iff hP).mpr hw',?_,?_,?_,?_⟩ <;> + rw [← Real.rpow_mul hP0.le] <;> + apply (Real.rpow_le_rpow_left_iff hP).mpr <;> linarith + +lemma pureOccupationBounds_power_table + {P C₀ C₁ M A p w φ h I μ α z c y H : ℝ} (hP : 1 < P) + (hp : p=P^(1-α)) (hw : w=P^z) (hφ : φ=P^(-y)) (hh : h=P^(-H)) + (hzc : z+c=1) (hμ : 0 ≤ μ) (hI : I ≤ (w/P)^2) + (hbounds : PureOccupationBounds P C₀ C₁ M A p w φ h I μ) : + (Real.sqrt (p*μ))^2 ≤ P^(-min (2*c) H) ∧ + (C₀ < P^(min z (1-α)-y) → + (Real.sqrt (p*μ))^2 ≤ P^(-H)*max 1 + (max (P^(-2*c)*(stabilityRate P C₁ M A p w φ)^2) + (P^(-H)*(stabilityRate P C₁ M A p w φ)^2))) ∧ + ((7/10 : ℝ) ≤ z → (7/10 : ℝ) ≤ 1-α → + (16/100 : ℝ)*max z (1-α) ≤ y → y ≤ (49/100 : ℝ)*min z (1-α) → + (Real.sqrt (p*μ))^2 ≤ P^(-H+(29/25 : ℝ)*y)* + max 1 (max (P^(-2*c)*P^(2*max α c)) (P^(-H)*P^(2*max α c)))) := by + have hP0 : 0 < P := zero_lt_one.trans hP + have hp0 : 0 < p := hp ▸ Real.rpow_pos_of_pos hP0 _ + have hw0 : 0 < w := hw ▸ Real.rpow_pos_of_pos hP0 _ + have hm0 : 0 < min p w := lt_min hp0 hw0 + have hh0 : 0 < h := hh ▸ Real.rpow_pos_of_pos hP0 _ + have hI' : I ≤ P^(-2*c) := by + calc + I ≤ (w/P)^2 := hI + _ = (P^(z-1))^2 := by rw [Real.rpow_sub hP0,Real.rpow_one,hw] + _ = P^(-2*c) := by rw [nat_pow_rpow_base hP0.le]; congr 1; norm_num; linarith + have hm : min p w = P^(1-max α c) := by + rw [hp,hw,rpow_min_exponent hP] + congr 1 + rcases le_total α c with hh | hh + · rw [max_eq_right hh,min_eq_right (by linarith)]; linarith + · rw [max_eq_left hh,min_eq_left (by linarith)] + have hIm : (min p w/P)^2 = P^(-2*max α c) := by + calc + _ = (P^((1-max α c)-1))^2 := by rw [Real.rpow_sub hP0,Real.rpow_one,hm] + _ = _ := by rw [nat_pow_rpow_base hP0.le]; congr 1; norm_num; ring + have hmp : min p w*φ = P^(min z (1-α)-y) := by + rw [hp,hw,hφ,rpow_min_exponent hP,← Real.rpow_add hP0,min_comm] + congr 1 + rw [Real.sq_sqrt (mul_nonneg hp0.le hμ)] + rcases hbounds with ⟨he,ha,hi⟩ + refine ⟨?_,?_,?_⟩ + · calc + p*μ ≤ p*(max I h/p) := mul_le_mul_of_nonneg_left he hp0.le + _ = max I h := by field_simp + _ ≤ P^(-min (2*c) H) := by + apply max_le + · exact hI'.trans ((Real.rpow_le_rpow_left_iff hP).mpr (by have := min_le_left (2*c) H; linarith)) + · rw [hh]; exact (Real.rpow_le_rpow_left_iff hP).mpr (by have := min_le_right (2*c) H; linarith) + · intro hC + have hC' : C₀/min p w < φ := (div_lt_iff₀ hm0).mpr (by rw [mul_comm,hmp]; exact hC) + calc + p*μ ≤ p*((h/p)*max 1 (max (I/stabilityLength P C₁ M A p w φ) + (h/stabilityLength P C₁ M A p w φ))) := mul_le_mul_of_nonneg_left (ha hC') hp0.le + _ = h*max 1 (max (I*(stabilityRate P C₁ M A p w φ)^2) + (h*(stabilityRate P C₁ M A p w φ)^2)) := by + rw [div_stabilityLength,div_stabilityLength] + field_simp + _ ≤ _ := by rw [hh]; gcongr + · intro hz' hp' hyl hyu + have hi' := hi (improvedWindow_of_powers hP hp hw hφ hp' hz' hyl hyu) + calc + p*μ ≤ p*((h/p)*φ^(-29/25 : ℝ)*max 1 (max (I/(min p w/P)^2) (h/(min p w/P)^2))) := + mul_le_mul_of_nonneg_left hi' hp0.le + _ = (h*φ^(-29/25 : ℝ))*max 1 (max (I*P^(2*max α c)) (h*P^(2*max α c))) := by + rw [hIm,show -2*max α c = -(2*max α c) by ring,Real.rpow_neg hP0.le] + simp only [div_inv_eq_mul] + field_simp + _ ≤ (h*φ^(-29/25 : ℝ))*max 1 (max (P^(-2*c)*P^(2*max α c)) (h*P^(2*max α c))) := by + gcongr + exact mul_nonneg hh0.le (Real.rpow_nonneg (hφ ▸ Real.rpow_nonneg hP0.le _) _) + _ = _ := by + rw [hh,hφ,← Real.rpow_mul hP0.le,← Real.rpow_add hP0] + congr 2 + ring + +lemma selected_receiverCoefficient_of_powers + {P C₀ C₁ M A p w θ φ h I μ α z c b y H : ℝ} + (hP : 1 < P) (hC₁ : 0 ≤ C₁) (hM : 0 ≤ M) (hA : 0 ≤ A) + (hp : p=P^(1-α)) (hw : w=P^z) (hpθ : p*θ=P^b) + (hφ : φ=P^(-y)) (hh : h=P^(-H)) (hφ₁ : φ ≤ 1) + (hα : 0 ≤ α) (hz : 0 ≤ z) (hc : 0 ≤ c) (hy : 0 ≤ y) (hH : 0 ≤ H) + (hzc : z+c=1) (hμ : 0 ≤ μ) (hI0 : 0 < I) (hI : I ≤ (w/P)^2) + (hC₀ : C₀ ≤ P^(3/10 : ℝ)) + (hconst : C₁*(M+Real.sqrt (A*Real.log (2+P))) ≤ P^(66/100000 : ℝ)) + (hbounds : PureOccupationBounds P C₀ C₁ M A p w φ h I μ) + (hselected : P*Real.sqrt I*selectionWeight P θ φ h < + min (I*Real.sqrt h*p^2*φ^2) (Real.sqrt I*Real.sqrt (p*μ)/(θ*h))) : + receiverCoefficient w p θ φ h ≤ w^(-1/2 : ℝ)*selectionWeight P θ φ h := by + have hP0 : 0 < P := zero_lt_one.trans hP + let Δ := (α+b+y+H)/100000 + obtain ⟨hn,hf⟩ := selected_near_far_powers hP hp hw hpθ hφ hh hzc (show Δ=_ from rfl) + hI0 hI hselected + obtain ⟨he,ha,hi⟩ := pureOccupationBounds_power_table hP hp hw hφ hh hzc hμ hI hbounds + have hr0 : 0 ≤ stabilityRate P C₁ M A p w φ := by + have hp0 : 0 < p := hp ▸ Real.rpow_pos_of_pos hP0 _ + have hw0 : 0 < w := hw ▸ Real.rpow_pos_of_pos hP0 _ + have hm0 : 0 < min p w := lt_min hp0 hw0 + have hφ0 : 0 < φ := hφ ▸ Real.rpow_pos_of_pos hP0 _ + unfold stabilityRate + positivity + have hr : (66/100 : ℝ) < z → (stabilityRate P C₁ M A p w φ)^2 ≤ + P^(2*max α c+2*y+2*z/1000) := by + intro hz' + have hrate := stabilityRate_power_bound hP hC₁ hA hp hw hφ hφ₁ hzc hz' hconst + calc + _ ≤ (P^(max α c+y+z/1000))^2 := (sq_le_sq₀ hr0 (Real.rpow_nonneg hP0.le _)).mpr hrate + _ = _ := by rw [nat_pow_rpow_base hP0.le]; congr 1; norm_num; ring + have hb := selected_coefficient_power_table hP hα hz hc hy hH hzc (show Δ=_ from rfl) + hn (Real.sqrt_nonneg _) hf he hC₀ hr ha hi + rw [receiverCoefficient_power hP0 hw hpθ hφ hh, + selectionWeight_power hP0 hp hpθ hφ hh,hw,← Real.rpow_mul hP0.le,← Real.rpow_add hP0] + convert hb using 1 + dsimp [Δ] + congr 1 + ring + +lemma selected_receiverCoefficient + {P C₀ C₁ M A p w θ φ h I μ : ℝ} + (hP : 1 < P) (hC₁ : 0 ≤ C₁) (hM : 0 ≤ M) (hA : 0 ≤ A) + (hp0 : 0 < p) (hpP : p ≤ P) (hw1 : 1 ≤ w) (hwP : w ≤ P) + (hθ : 0 < θ) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hh : 0 < h) (hh1 : h ≤ 1) + (hμ : 0 ≤ μ) (hI0 : 0 < I) (hI : I ≤ (w/P)^2) + (hC₀ : C₀ ≤ P^(3/10 : ℝ)) + (hconst : C₁*(M+Real.sqrt (A*Real.log (2+P))) ≤ P^(66/100000 : ℝ)) + (hbounds : PureOccupationBounds P C₀ C₁ M A p w φ h I μ) + (hselected : P*Real.sqrt I*selectionWeight P θ φ h < + min (I*Real.sqrt h*p^2*φ^2) (Real.sqrt I*Real.sqrt (p*μ)/(θ*h))) : + receiverCoefficient w p θ φ h ≤ w^(-1/2 : ℝ)*selectionWeight P θ φ h := by + have hP0 : 0 < P := zero_lt_one.trans hP + have hp' : p=P^(1-(1-Real.logb P p)) := by + rw [sub_sub_cancel,Real.rpow_logb hP0 hP.ne' hp0] + have hw' : w=P^(Real.logb P w) := (Real.rpow_logb hP0 hP.ne' (zero_lt_one.trans_le hw1)).symm + have hpθ' : p*θ=P^(Real.logb P (p*θ)) := (Real.rpow_logb hP0 hP.ne' (mul_pos hp0 hθ)).symm + have hφ' : φ=P^(-(-Real.logb P φ)) := by rw [neg_neg,Real.rpow_logb hP0 hP.ne' hφ] + have hh' : h=P^(-(-Real.logb P h)) := by rw [neg_neg,Real.rpow_logb hP0 hP.ne' hh] + have hα : 0 ≤ 1-Real.logb P p := sub_nonneg.mpr + ((Real.logb_le_iff_le_rpow hP hp0).mpr (by simpa using hpP)) + have hc : 0 ≤ 1-Real.logb P w := sub_nonneg.mpr + ((Real.logb_le_iff_le_rpow hP (zero_lt_one.trans_le hw1)).mpr (by simpa using hwP)) + have hy : 0 ≤ -Real.logb P φ := neg_nonneg.mpr + ((Real.logb_le_iff_le_rpow hP hφ).mpr (by simpa using hφ1)) + have hH : 0 ≤ -Real.logb P h := neg_nonneg.mpr + ((Real.logb_le_iff_le_rpow hP hh).mpr (by simpa using hh1)) + exact selected_receiverCoefficient_of_powers hP hC₁ hM hA hp' hw' hpθ' hφ' hh' hφ1 + hα (Real.logb_nonneg hP hw1) hc hy hH (by ring) hμ hI0 hI hC₀ hconst hbounds hselected + +def pureOccupationEnvelope (P C₀ C₁ M A p w φ h I : ℝ) : ℝ := by + classical + exact let e := max I h/p + let a := (h/p)*max 1 + (max (I/stabilityLength P C₁ M A p w φ) (h/stabilityLength P C₁ M A p w φ)) + let b := (h/p)*φ^(-29/25 : ℝ)* + max 1 (max (I/(min p w/P)^2) (h/(min p w/P)^2)) + min (if C₀/min p w < φ then min e a else e) + (if ImprovedWindow P p w φ then min e b else e) + +lemma pureOccupationEnvelope_bounds (P C₀ C₁ M A p w φ h I : ℝ) : + PureOccupationBounds P C₀ C₁ M A p w φ h I + (pureOccupationEnvelope P C₀ C₁ M A p w φ h I) := by + classical + unfold PureOccupationBounds pureOccupationEnvelope + dsimp only + refine ⟨?_,?_,?_⟩ + · exact (min_le_left _ _).trans (by split_ifs <;> simp only [min_le_left,le_refl]) + · intro ha + rw [ite_eq_left ha] + exact (min_le_left _ _).trans (min_le_right _ _) + · intro hb + rw [ite_eq_left hb] + exact (min_le_right _ _).trans (min_le_right _ _) + +lemma pureOccupationEnvelope_nonneg + {P C₀ C₁ M A p w φ h I : ℝ} (hp : 0 ≤ p) (hφ : 0 ≤ φ) + (hh : 0 ≤ h) (hI : 0 ≤ I) : + 0 ≤ pureOccupationEnvelope P C₀ C₁ M A p w φ h I := by + classical + unfold pureOccupationEnvelope + dsimp only + split_ifs <;> positivity + +theorem receiverCoefficient_on_selected_bins + (C₀ C₁ M A : ℝ) (hC₁ : 0 ≤ C₁) (hM : 0 ≤ M) (hA : 0 ≤ A) : + ∀ᶠ P in atTop, ∀ p w θ φ h I : ℝ, + 0 < p → p ≤ P → 1 ≤ w → w ≤ P → 0 < θ → + 0 < φ → φ ≤ 1 → 0 < h → h ≤ 1 → 0 < I → I ≤ (w/P)^2 → + P*Real.sqrt I*selectionWeight P θ φ h < + min (I*Real.sqrt h*p^2*φ^2) + (Real.sqrt I*Real.sqrt (p*pureOccupationEnvelope P C₀ C₁ M A p w φ h I)/(θ*h)) → + receiverCoefficient w p θ φ h ≤ w^(-1/2 : ℝ)*selectionWeight P θ φ h := by + filter_upwards [eventually_selection_constants C₀ C₁ M A hC₁ hA] with P hP + intro p w θ φ h I hp hpP hw hwP hθ hφ hφ1 hh hh1 hI0 hI hselected + exact selected_receiverCoefficient hP.1 hC₁ hM hA hp hpP hw hwP hθ hφ hφ1 hh hh1 + (pureOccupationEnvelope_nonneg hp.le hφ.le hh.le hI0.le) hI0 hI hP.2.1 hP.2.2 + (pureOccupationEnvelope_bounds ..) hselected + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SharedBudget.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SharedBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..3fbac45421981de3276b4ab058737a15b4460cc2 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SharedBudget.lean @@ -0,0 +1,1183 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.TransportRemainder + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_source_shared_short_radius {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + max 1 T*cappedRepresentative (k 3) ≤ I → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let G := (goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2)).toReal + let Hf := (magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I (k 2)).toReal + let Kg := relativeCauchyConstant Cg E G + let Kb := relativeCauchyConstant Cb E (2*Hf) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r)+ + Kb*min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + have hn := hsource s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + have hp : 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let G := goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2) + let Hf := magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I (k 2) + have hG : G≠⊤ := ne_top_of_le_ne_top + (hs.goodFieldBudget_finite X (fun t=>velocity (V t)) 1 (Icc_subset_Icc ha hb) hI) + (ENNReal.le_tsum (f := fun index=>goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I index) (k 2)) + have hF : Hf≠⊤ := by + apply ne_top_of_le_ne_top _ ((ENNReal.le_tsum (k 2)).trans + (hs.shared_magneticFieldBudget F.flow zX 1 hI (by norm_num : (0:ℝ)≤2) hJI)) + finiteness + have hGe : ENNReal.ofReal (G.toReal*I)=ENNReal.ofReal I*G := by + rw [ENNReal.ofReal_mul ENNReal.toReal_nonneg,ENNReal.ofReal_toReal hG,mul_comm] + have hFe : ENNReal.ofReal ((2*Hf.toReal)*I)=ENNReal.ofReal (2*I)*Hf := by + rw [show (2*Hf.toReal)*I=(2*I)*Hf.toReal by ring, + ENNReal.ofReal_mul (by positivity),ENNReal.ofReal_toReal hF] + have hg := relative_radius_cauchy_scalar hCg hE ENNReal.toReal_nonneg hI hp hν hR hr hφ hκ + (show 0≤φ/θ^2 by positivity) (Z:=G.toReal) + dsimp only at hg + have heγ : 10240*(φ/θ^2)/p=10240*φ/(p*θ^2) := by ring + have hea : I*p^2*ν^2*φ*(φ/θ^2)=I*p^2*ν^2*φ^2/θ^2 := by ring + have heb : Real.sqrt I*R*ν*Real.sqrt κ*(φ/θ^2)/φ=Real.sqrt I*R*ν*Real.sqrt κ/θ^2 := by + field_simp [hφ.ne'] + rw [heγ,hea,heb,hGe,hRsq] at hg + have hbnd := relative_radius_cauchy_scalar hCb hE (show 0≤2*Hf.toReal by positivity) hI hp hν hR hr hφ hκ + (show 0≤(1:ℝ) by norm_num) + dsimp only at hbnd + simp only [mul_one] at hbnd + rw [hFe,hRsq] at hbnd + apply hn.trans + calc + _ ≤ ENNReal.ofReal (relativeCauchyConstant Cg E G.toReal* + min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r))+ + ENNReal.ofReal (relativeCauchyConstant Cb E (2*Hf.toReal)* + min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + exact add_le_add hg hbnd + _ = _ := by + rw [←ENNReal.ofReal_add + (mul_nonneg (relativeCauchyConstant_nonneg hCg) (by positivity)) + (mul_nonneg (relativeCauchyConstant_nonneg hCb) (by positivity))] + +lemma Admissible.direct_source_shared_short_radial_sum {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (Kg*D*Real.sqrt + ((I*p^2*ν^2*φ^2/θ^2)*(Real.sqrt I*R*ν*Real.sqrt κ/θ^2))+ + Kb*D*Real.sqrt ((I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt κ/φ))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_short_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*R*ν*Real.sqrt κ/θ^2 + let ab := I*p^2*ν^2*φ + let bb := Real.sqrt I*R*ν*Real.sqrt κ/φ + let D := dyadicBalanceConstant (1/2) (1/2) + have hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let _ν := min θ σ + let _κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p*Real.sqrt R* + relativeSourceAngle θ φ σ*(Kg*(φ/θ^2)+Kb)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_short_radial_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only at hn + have hp : 0 ≤ sourceRepresentative np := by dsimp [sourceRepresentative]; positivity + have hθ := cappedRepresentative_pos nθ + have hφ := cappedRepresentative_pos nφ + have hσ := cappedRepresentative_pos j + have hκ : 0≤1+cappedRepresentative nφ/cappedRepresentative j := by positivity + have hb := relative_source_balance_factor (hlen.trans_le hlenI) hp (le_min hθ.le hσ.le) + (Real.sqrt_nonneg (1+I/len)) hκ hφ (by norm_num : (0:ℝ)≤1) + simp only [mul_one] at hb + rw [relative_source_good_balance_factor (hlen.trans_le hlenI) hp (le_min hθ.le hσ.le) + (Real.sqrt_nonneg _) hκ hφ hθ,hb] at hn + convert hn using 1 + congr 1 + dsimp [relativeSourceAngle] + ring + +lemma Admissible.direct_source_shared_short_clipped {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 < w → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/min I (stabilityLength P 16384 M A p w σ/2)) + let _ν := min θ σ + let _κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p*Real.sqrt R* + relativeSourceAngle θ φ σ*(Kg*(φ/θ^2)+Kb)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_short_radial_factored + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w M A P hS hS0 ha hb hab hI hJI + hM hA hP hw hpσ hwσ HX HZ + dsimp only + let p := sourceRepresentative np + let σ := cappedRepresentative j + let L := Real.log (2+P) + let lam := stabilityLength P 16384 M A p w σ + let len := min I (lam/2) + let m := min p w/128 + have hp : 0

(prefixFlow F.flow T zX t).1) + (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + +def directReceiverMagneticBudget {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (a b I : ℝ) (nφ : ℕ) : ℝ := + 2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal + +lemma SmoothClassicalPrefix.directReceiverGoodBudget_sum {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hd : Admissible d) (F : PhaseFlowOn s.E s.B T) (zX : Phase) + {a b I : ℝ} (ha : 0≤a) (hb : b≤T) (hI : 0⟨ha.trans ht.1,ht.2.trans hb⟩ + have hh := hs.energyPrefix.goodFieldBudget_uniform (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 hJ hI hJI + rw [hs.initial_energy_eq] at hh + norm_num only [Nat.reduceMul,Nat.reduceAdd,Nat.cast_ofNat] at hh + have he : (5:ℝ≥0∞)*ENNReal.ofReal (4*datumEnergyNumber d)=ENNReal.ofReal (20*datumEnergyNumber d) := by + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5)] + congr 1 + ring + rw [he] at hh + have hf := ne_of_lt (lt_of_le_of_lt hh ENNReal.ofReal_lt_top) + have hn := ENNReal.ne_top_of_tsum_ne_top hf + refine ⟨ENNReal.summable_toReal hf,?_⟩ + dsimp only [directReceiverGoodBudget] + rw [←ENNReal.tsum_toReal_eq hn] + have h := ENNReal.toReal_mono ENNReal.ofReal_ne_top hh + rwa [ENNReal.toReal_ofReal (mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg)] at h + +lemma SmoothClassicalPrefix.directReceiverMagneticBudget_sum {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hd : Admissible d) (F : PhaseFlowOn s.E s.B T) (zX : Phase) + {a b I : ℝ} (hI : 0⟨(le_max_left _ _).trans ht.1,ht.2.trans (min_le_left _ _)⟩ + have hlen : min T b-max 0 (a-2*I)≤3*I := by + have h1 := min_le_right T b + have h2 := le_max_right 0 (a-2*I) + linarith + have hh := hs.energyPrefix.magneticFieldBudget_uniform F.flow zX 1 hJ hI + (by norm_num : (0:ℝ)≤3) hlen + rw [hs.initial_energy_eq] at hh + norm_num only [Nat.reduceMul,Nat.reduceAdd,Nat.cast_ofNat] at hh + have he : (10:ℝ≥0∞)*ENNReal.ofReal 3*ENNReal.ofReal (2*datumEnergyNumber d)= + ENNReal.ofReal (60*datumEnergyNumber d) := by + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10*3)] + congr 1 + ring + rw [he] at hh + have hf := ne_of_lt (lt_of_le_of_lt hh ENNReal.ofReal_lt_top) + have hn := ENNReal.ne_top_of_tsum_ne_top hf + have hsum := ENNReal.summable_toReal hf + refine ⟨hsum.mul_left 2,?_⟩ + dsimp only [directReceiverMagneticBudget] + rw [tsum_mul_left,←ENNReal.tsum_toReal_eq hn] + have h := ENNReal.toReal_mono ENNReal.ofReal_ne_top hh + rw [ENNReal.toReal_ofReal (mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg)] at h + linarith + +lemma budget_sqrt_weight_sum {ι : Type*} (S : Finset ι) (G W : ι→ℝ) {E N : ℝ} + (hG : ∀i∈S,0≤G i) (hW : ∀i∈S,0≤W i) (hE : 0≤E) (hN : 0≤N) + (hbudget : ∑i∈S,G i≤E) (hweight : ∑i∈S,W i≤N) : + ∑i∈S,Real.sqrt (G i)*Real.sqrt (W i)≤Real.sqrt E*Real.sqrt N := by + have hc := Finset.sum_mul_sq_le_sq_mul_sq S (fun i=>Real.sqrt (G i)) (fun i=>Real.sqrt (W i)) + have he : (∑i∈S,(Real.sqrt (G i))^2)=∑i∈S,G i := Finset.sum_congr rfl (fun i hi=>Real.sq_sqrt (hG i hi)) + have hn : (∑i∈S,(Real.sqrt (W i))^2)=∑i∈S,W i := Finset.sum_congr rfl (fun i hi=>Real.sq_sqrt (hW i hi)) + rw [he,hn] at hc + have hu := mul_le_mul hbudget hweight (Finset.sum_nonneg hW) hE + have hp : 0≤Real.sqrt E*Real.sqrt N := by positivity + have hs : (Real.sqrt E*Real.sqrt N)^2=E*N := by rw [mul_pow,Real.sq_sqrt hE,Real.sq_sqrt hN] + nlinarith + +lemma budget_sqrt_sum {ι : Type*} (S : Finset ι) (G : ι→ℝ) {E N : ℝ} + (hG : ∀i∈S,0≤G i) (hE : 0≤E) (hN : 0≤N) + (hbudget : ∑i∈S,G i≤E) (hcard : (S.card:ℝ)≤N) : + ∑i∈S,Real.sqrt (G i)≤Real.sqrt E*Real.sqrt N := by + have hh := budget_sqrt_weight_sum S G (fun _=>1) hG (by intros; norm_num) hE hN hbudget + (by simpa using hcard) + simpa only [Real.sqrt_one,mul_one] using hh + +lemma source_sqrt_sum_bound {x : ℝ} (_hx : 0≤x) (S : Finset ℕ) + (hS : ∀n∈S,sourceRepresentative n≤x) : ∑n∈S,Real.sqrt (sourceRepresentative n)≤4*Real.sqrt x := by + have hp (n : ℕ) : 0 ≤ sourceRepresentative n := by dsimp [sourceRepresentative]; positivity + have hgeom (N : ℕ) : ∑n∈Finset.range (N+1),Real.sqrt (sourceRepresentative n)≤4*Real.sqrt (sourceRepresentative N) := by + induction N with + | zero => norm_num [sourceRepresentative,Finset.sum_range_succ] + | succ N ih => + rw [Finset.sum_range_succ] + have he : sourceRepresentative (N+1)=2*sourceRepresentative N := by + dsimp only [sourceRepresentative] + rw [pow_succ] + ring + rw [he,Real.sqrt_mul (by norm_num : (0:ℝ)≤2)] + have hs : (4:ℝ)≤3*Real.sqrt 2 := by nlinarith [Real.sq_sqrt (by norm_num : (0:ℝ)≤2),Real.sqrt_nonneg 2] + nlinarith [mul_le_mul_of_nonneg_right hs (Real.sqrt_nonneg (sourceRepresentative N))] + by_cases hne : S.Nonempty + · let N := S.max' hne + have hsub : S⊆Finset.range (N+1) := by + intro n hn + apply Finset.mem_range.mpr + have hh := S.le_max' n hn + change n≤N at hh + omega + have hs : (∑n∈S,Real.sqrt (sourceRepresentative n))≤∑n∈Finset.range (N+1),Real.sqrt (sourceRepresentative n) := + Finset.sum_le_sum_of_subset_of_nonneg hsub (fun _ _ _=>Real.sqrt_nonneg _) + exact hs.trans ((hgeom N).trans (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt (hS N (S.max'_mem hne))) (by norm_num))) + · rw [Finset.not_nonempty_iff_eq_empty.mp hne,Finset.sum_empty] + positivity + +lemma source_stability_sqrt_sum {P w : ℝ} (hP : 0.trans_eq (one_mul w) + exact hh'.trans hwP + have hc : (S.card:ℝ)≤(N:ℝ) := by + exact_mod_cast (Finset.card_le_card hsub).trans_eq (Finset.card_range N) + apply hc.trans (hcard.trans _) + have hd := div_le_div_of_nonneg_right + (Real.log_le_log (zero_lt_one.trans_le hP) (by linarith : P≤2+P)) + (Real.log_pos (by norm_num : (1:ℝ)<2)).le + unfold pairCountConstant + simp only [div_eq_mul_inv,one_mul] at hd ⊢ + nlinarith + +lemma receiver_good_sqrt_sum (S : Finset ℕ) (G : ℕ→ℝ) {E : ℝ} + (hG : ∀n∈S,0≤G n) (hE : 0≤E) (hbudget : ∑n∈S,G n≤E) : + ∑n∈S,Real.sqrt (G n)*Real.sqrt (cappedRepresentative n)≤Real.sqrt E*Real.sqrt 2 := by + apply budget_sqrt_weight_sum S G cappedRepresentative hG + (fun n _=>(cappedRepresentative_pos n).le) hE (by norm_num) hbudget + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1) S (fun n _=>cappedRepresentative_le_one n) + norm_num at hh + exact hh + +lemma momentum_affine_stability_sum {P w a b : ℝ} (hP : 0hinner np) + _=(I : ℝ)^(3/4:ℝ)*(∑np∈Sp,sourceRepresentative np* + (a+b'*Real.sqrt L+((I : ℝ)^(1/4:ℝ)*U*c*Real.sqrt L)*Real.sqrt (P/min (sourceRepresentative np) w))) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro np hnp + ring + _≤(I : ℝ)^(3/4:ℝ)*(2*(128*P)*(a+b'*Real.sqrt L)+ + 4*(128*P)*Real.sqrt (P/w)*((I : ℝ)^(1/4:ℝ)*U*c*Real.sqrt L)) := + mul_le_mul_of_nonneg_left (momentum_affine_stability_sum_upper hP (by positivity) hw + (by linarith : w≤128*P) (by positivity) (by positivity) Sp hp) (by positivity) + _=128*(2*P*(I : ℝ)^(3/4:ℝ)*(a+b'*Real.sqrt L)+4*I*P*Real.sqrt (P/w)*U*c*Real.sqrt L) := by + calc + _=128*(2*P*(I : ℝ)^(3/4:ℝ)*(a+b'*Real.sqrt L)+ + 4*((I : ℝ)^(3/4:ℝ)*(I : ℝ)^(1/4:ℝ))*P*Real.sqrt (P/w)*U*c*Real.sqrt L) := by ring + _=_ := by rw [hquarter] + _≤_ := by + have hh := mul_le_mul_of_nonneg_left + (remaining_source_uniform_numerics hI hI1 hP hw hwP hM hA hL ha hb' hc) + (by norm_num : (0:ℝ)≤128) + simpa only [U,a,b',c,mul_assoc] using hh + +lemma receiver_scale_card_enlarged {P w : ℝ} (hP : 1≤P) (hw : 0s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ), + (∀i∈Sθ,cappedRepresentative nφ≤16*cappedRepresentative i) → + (∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤136*cappedRepresentative i ∧ + 512≤cappedRepresentative j*sourceRepresentative np ∧ 32≤cappedRepresentative j*w) → + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun i j nr=>relativeRepresentativeClosedBin T w ![np,i,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + let R₁ := 2*Real.sqrt 16384*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min p w)* + (Real.sqrt M+Real.sqrt (Real.sqrt (A*Real.log (2+P)))) + (∑i∈Sθ,∑j∈Sσ i,∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B i j nr) z + ∂physicalBinMeasure V (B i j nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p* + (Kg*(2*remainingGoodConstant 136 16 0*Real.sqrt φ+R₁*remainingGoodConstant 136 16 (1/2))+ + Kb*(2*remainingMagneticConstant 136 16 0+R₁*remainingMagneticConstant 136 16 (1/2)))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_short_clipped + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nφ a b I w M A P hS hS0 ha hb hab hI hJI hM hA hP hw HX HZ + Sθ Sσ hθ hσ + dsimp only + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + let R (j : ℕ) := Real.sqrt (Real.sqrt (1+I/min I (stabilityLength P 16384 M A p w (cappedRepresentative j)/2))) + let U (i j : ℕ) := R j*relativeSourceAngle (cappedRepresentative i) φ (cappedRepresentative j)* + (Kg*(φ/(cappedRepresentative i)^2)+Kb) + have hp : 0

(hσ i hi j hj).1) + calc + _≤∑i∈Sθ,∑j∈Sσ i,ENNReal.ofReal ((D*(I : ℝ)^(3/4:ℝ)*p)*U i j) := by + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro j hj + have hh := hsource s T F hs hT h0 zX S np i nφ j a b I w M A P hS hS0 ha hb hab + hI hJI hM hA hP hw (hσ i hi j hj).2.1 (hσ i hi j hj).2.2 HX HZ + dsimp only at hh + simpa only [U,R,D,Kg,Kb,p,φ,E,mul_assoc] using hh + _=ENNReal.ofReal ((D*(I : ℝ)^(3/4:ℝ)*p)*(∑i∈Sθ,∑j∈Sσ i,U i j)) := by + rw [Finset.mul_sum] + rw [ENNReal.ofReal_sum_of_nonneg] + · apply Finset.sum_congr rfl + intro i hi + rw [Finset.mul_sum,ENNReal.ofReal_sum_of_nonneg] + exact fun j _=>mul_nonneg (by positivity) (hU i j) + · intro i hi + exact mul_nonneg (by positivity) (Finset.sum_nonneg (fun j _=>hU i j)) + _≤_ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hn (by positivity)) + +lemma remainingGoodConstant_nonneg {K κ β : ℝ} (hK : 0≤K) (hκ : 0≤κ) + (hβ : 0≤β) (hβ1 : β≤1/2) : 0≤remainingGoodConstant K κ β := by + unfold remainingGoodConstant + exact mul_nonneg (mul_nonneg (relativeAngularConstant_nonneg hK hκ (by linarith)) + (inv_nonneg.mpr (sub_nonneg.mpr (Real.rpow_le_one (by norm_num) (by norm_num) (by linarith))))) + (Real.rpow_nonneg hκ _) + +lemma remainingMagneticConstant_nonneg {K κ β : ℝ} (hK : 0≤K) (hκ : 0≤κ) + (_hβ : 0≤β) (hβ1 : β≤1/2) : 0≤remainingMagneticConstant K κ β := by + unfold remainingMagneticConstant + exact mul_nonneg (relativeAngularConstant_nonneg hK hκ (by linarith)) + (inv_nonneg.mpr (sub_nonneg.mpr (Real.rpow_le_one (by norm_num) (by norm_num) (by linarith)))) + +lemma Admissible.direct_remaining_source_short_uniform {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (Sp Sφ : Finset ℕ) (Sθ : ℕ→ℕ→Finset ℕ) (Sσ : ℕ→ℕ→ℕ→Finset ℕ), + (∀np∈Sp,sourceRepresentative np≤128*P) → + (∀nf∈Sφ,1/(32*w)≤cappedRepresentative nf) → + (∀np∈Sp,∀nf∈Sφ,∀nt∈Sθ np nf,cappedRepresentative nf≤16*cappedRepresentative nt) → + (∀np∈Sp,∀nf∈Sφ,∀nt∈Sθ np nf,∀j∈Sσ np nf nt, + cappedRepresentative j≤136*cappedRepresentative nt ∧ + 512≤cappedRepresentative j*sourceRepresentative np ∧ 32≤cappedRepresentative j*w) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑np∈Sp,∑nf∈Sφ,∑nt∈Sθ np nf,∑j∈Sσ np nf nt,∑'nr : ℕ, + if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cg,Cb,hCg,hCb,hbin⟩ := hd.direct_source_shared_short_angles + let E := datumEnergyNumber d + let Eg := 20*E + let Eb := 120*E + let N := (1+Real.log 32)*pairCountConstant + let g := relativeCauchyConstant Cg E 1 + let b' := relativeCauchyConstant Cb E 1 + let g₀ := 2*remainingGoodConstant 136 16 0 + let g₁ := remainingGoodConstant 136 16 (1/2) + let b₀ := 2*remainingMagneticConstant 136 16 0 + let b₁ := remainingMagneticConstant 136 16 (1/2) + let H := 2*Real.sqrt 16384 + let D := dyadicBalanceConstant (1/2) (1/2) + let aa := g*g₀*Real.sqrt Eg*Real.sqrt 2 + let bb := b'*b₀*Real.sqrt Eb*Real.sqrt N + let cc := H*(g*g₁*Real.sqrt Eg+b'*b₁*Real.sqrt Eb)*Real.sqrt N + have hE : 0≤E := hd.datumEnergyNumber_nonneg + have hEg : 0≤Eg := by dsimp [Eg]; positivity + have hEb : 0≤Eb := by dsimp [Eb]; positivity + have hN : 0≤N := by dsimp [N,pairCountConstant]; positivity + have hg : 0≤g := relativeCauchyConstant_nonneg hCg + have hb' : 0≤b' := relativeCauchyConstant_nonneg hCb + have hg₀ : 0≤g₀ := mul_nonneg (by norm_num) (remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hg₁ : 0≤g₁ := remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num) + have hb₀ : 0≤b₀ := mul_nonneg (by norm_num) (remainingMagneticConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hb₁ : 0≤b₁ := remainingMagneticConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num) + have hH : 0≤H := by dsimp [H]; positivity + have hD : 0≤D := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have haa : 0≤aa := by dsimp [aa]; positivity + have hbb : 0≤bb := by dsimp [bb]; positivity + have hcc : 0≤cc := by dsimp [cc]; positivity + refine ⟨D*(128*(2*aa+2*bb+4*cc)),by positivity,?_⟩ + intro s T F hs hT zX S a b I w M A P hS hS0 ha hb hab hI hI1 hJI hM hA hP hL hw hwP HX HZ + Sp Sφ Sθ Sσ hp hφ hθ hσ + dsimp only + let G := directReceiverGoodBudget s F zX a b I + let B := directReceiverMagneticBudget s F zX a b I + let U := Real.sqrt M+Real.sqrt (Real.sqrt (A*Real.log (2+P))) + let f (np nf : ℕ) := (I : ℝ)^(3/4:ℝ)*sourceRepresentative np* + (g*Real.sqrt (G nf)*(g₀*Real.sqrt (cappedRepresentative nf)+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*g₁)+ + b'*Real.sqrt (B nf)*(b₀+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*b₁)) + have hG (nf : ℕ) : 0≤G nf := ENNReal.toReal_nonneg + have hB (nf : ℕ) : 0≤B nf := by dsimp [B,directReceiverMagneticBudget]; positivity + have hf (np nf : ℕ) : 0≤f np nf := by dsimp [f,U,sourceRepresentative]; positivity + obtain ⟨hGs,hGt⟩ := hs.directReceiverGoodBudget_sum hd F zX ha hb hI hJI + obtain ⟨hBs,hBt⟩ := hs.directReceiverMagneticBudget_sum hd F zX hI hJI + have hGb : ∑nf∈Sφ,G nf≤Eg := (hGs.sum_le_tsum Sφ (fun n _=>hG n)).trans hGt + have hBb : ∑nf∈Sφ,B nf≤Eb := (hBs.sum_le_tsum Sφ (fun n _=>hB n)).trans hBt + have hi (np : ℕ) (hnp : np∈Sp) (nf : ℕ) (hnf : nf∈Sφ) := + hbin s T F hs.energyPrefix hT hs.initial_f zX S np nf a b I w M A P + hS hS0 ha hb hab hI hJI (zero_lt_one.trans_le hM) (zero_le_one.trans hA) + (zero_lt_one.trans_le hP) hw HX HZ (Sθ np nf) (Sσ np nf) (hθ np hnp nf hnf) (hσ np hnp nf hnf) + have he (np nf : ℕ) : + D*(I : ℝ)^(3/4:ℝ)*sourceRepresentative np* + (relativeCauchyConstant Cg (∫x : Vec,totalEnergy s (0,x)) (G nf)* + (2*remainingGoodConstant 136 16 0*Real.sqrt (cappedRepresentative nf)+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*remainingGoodConstant 136 16 (1/2))+ + relativeCauchyConstant Cb (∫x : Vec,totalEnergy s (0,x)) (B nf)* + (2*remainingMagneticConstant 136 16 0+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*remainingMagneticConstant 136 16 (1/2)))= + D*f np nf := by + rw [hs.initial_energy_eq,relativeCauchyConstant_factor Cg,relativeCauchyConstant_factor Cb] + dsimp [f,g,b',E,g₀,g₁,b₀,b₁] + ring + calc + _≤∑np∈Sp,∑nf∈Sφ,ENNReal.ofReal (D*f np nf) := by + apply Finset.sum_le_sum + intro np hnp + apply Finset.sum_le_sum + intro nf hnf + have hh := hi np hnp nf hnf + dsimp only at hh + change _≤ENNReal.ofReal _ at hh + rw [←he np nf] + exact hh + _=ENNReal.ofReal (D*(∑np∈Sp,∑nf∈Sφ,f np nf)) := by + simp_rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>mul_nonneg hD (hf _ n)), + ←ENNReal.ofReal_sum_of_nonneg (fun n _=>Finset.sum_nonneg (fun i _=>mul_nonneg hD (hf n i))), + ←Finset.mul_sum] + _≤_ := by + apply ENNReal.ofReal_le_ofReal + rw [mul_assoc] + apply mul_le_mul_of_nonneg_left _ hD + exact remaining_source_budget_total Sp Sφ G B hI hI1 (zero_lt_one.trans_le hP) hw hwP hM hA hL + (fun n _=>hG n) (fun n _=>hB n) hEg hEb hN hg hb' hg₀ hg₁ hb₀ hb₁ hH hGb hBb + (receiver_scale_card_enlarged hP hw hwP hL Sφ hφ) hp + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_remaining_source_short_uniform_expanded {d : Datum} (hd : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → + ∀ (zX : Phase) (S : Set Phase) (a b I w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (Sp Sφ : Finset ℕ) (Sθ : ℕ→ℕ→Finset ℕ) (Sσ : ℕ→ℕ→ℕ→Finset ℕ), + (∀np∈Sp,sourceRepresentative np≤128*P) → + (∀nf∈Sφ,1/(32*w)≤cappedRepresentative nf) → + (∀np∈Sp,∀nf∈Sφ,∀nt∈Sθ np nf,cappedRepresentative nf≤16384*cappedRepresentative nt) → + (∀np∈Sp,∀nf∈Sφ,∀nt∈Sθ np nf,∀j∈Sσ np nf nt, + cappedRepresentative j≤131080*cappedRepresentative nt ∧ + 512≤cappedRepresentative j*sourceRepresentative np ∧ 32≤cappedRepresentative j*w) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑np∈Sp,∑nf∈Sφ,∑nt∈Sθ np nf,∑j∈Sσ np nf nt,∑'nr : ℕ, + if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cg,Cb,hCg,hCb,hbin⟩ := hd.direct_source_shared_short_angles_expanded + let E := datumEnergyNumber d + let Eg := 20*E + let Eb := 120*E + let N := (1+Real.log 32)*pairCountConstant + let g := relativeCauchyConstant Cg E 1 + let b' := relativeCauchyConstant Cb E 1 + let g₀ := 2*remainingGoodConstant 131080 16384 0 + let g₁ := remainingGoodConstant 131080 16384 (1/2) + let b₀ := 2*remainingMagneticConstant 131080 16384 0 + let b₁ := remainingMagneticConstant 131080 16384 (1/2) + let H := 2*Real.sqrt 16384 + let D := dyadicBalanceConstant (1/2) (1/2) + let aa := g*g₀*Real.sqrt Eg*Real.sqrt 2 + let bb := b'*b₀*Real.sqrt Eb*Real.sqrt N + let cc := H*(g*g₁*Real.sqrt Eg+b'*b₁*Real.sqrt Eb)*Real.sqrt N + have hE : 0≤E := hd.datumEnergyNumber_nonneg + have hEg : 0≤Eg := by dsimp [Eg]; positivity + have hEb : 0≤Eb := by dsimp [Eb]; positivity + have hN : 0≤N := by dsimp [N,pairCountConstant]; positivity + have hg : 0≤g := relativeCauchyConstant_nonneg hCg + have hb' : 0≤b' := relativeCauchyConstant_nonneg hCb + have hg₀ : 0≤g₀ := mul_nonneg (by norm_num) (remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hg₁ : 0≤g₁ := remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num) + have hb₀ : 0≤b₀ := mul_nonneg (by norm_num) (remainingMagneticConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hb₁ : 0≤b₁ := remainingMagneticConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num) + have hH : 0≤H := by dsimp [H]; positivity + have hD : 0≤D := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have haa : 0≤aa := by dsimp [aa]; positivity + have hbb : 0≤bb := by dsimp [bb]; positivity + have hcc : 0≤cc := by dsimp [cc]; positivity + refine ⟨D*(128*(2*aa+2*bb+4*cc)),by positivity,?_⟩ + intro s T F hs hT zX S a b I w M A P hS hS0 ha hb hab hI hI1 hJI hM hA hP hL hw hwP HX HZ + Sp Sφ Sθ Sσ hp hφ hθ hσ + dsimp only + let G := directReceiverGoodBudget s F zX a b I + let B := directReceiverMagneticBudget s F zX a b I + let U := Real.sqrt M+Real.sqrt (Real.sqrt (A*Real.log (2+P))) + let f (np nf : ℕ) := (I : ℝ)^(3/4:ℝ)*sourceRepresentative np* + (g*Real.sqrt (G nf)*(g₀*Real.sqrt (cappedRepresentative nf)+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*g₁)+ + b'*Real.sqrt (B nf)*(b₀+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*b₁)) + have hG (nf : ℕ) : 0≤G nf := ENNReal.toReal_nonneg + have hB (nf : ℕ) : 0≤B nf := by dsimp [B,directReceiverMagneticBudget]; positivity + have hf (np nf : ℕ) : 0≤f np nf := by dsimp [f,U,sourceRepresentative]; positivity + obtain ⟨hGs,hGt⟩ := hs.directReceiverGoodBudget_sum hd F zX ha hb hI hJI + obtain ⟨hBs,hBt⟩ := hs.directReceiverMagneticBudget_sum hd F zX hI hJI + have hGb : ∑nf∈Sφ,G nf≤Eg := (hGs.sum_le_tsum Sφ (fun n _=>hG n)).trans hGt + have hBb : ∑nf∈Sφ,B nf≤Eb := (hBs.sum_le_tsum Sφ (fun n _=>hB n)).trans hBt + have hi (np : ℕ) (hnp : np∈Sp) (nf : ℕ) (hnf : nf∈Sφ) := + hbin s T F hs.energyPrefix hT hs.initial_f zX S np nf a b I w M A P + hS hS0 ha hb hab hI hJI (zero_lt_one.trans_le hM) (zero_le_one.trans hA) + (zero_lt_one.trans_le hP) hw HX HZ (Sθ np nf) (Sσ np nf) (hθ np hnp nf hnf) (hσ np hnp nf hnf) + have he (np nf : ℕ) : + D*(I : ℝ)^(3/4:ℝ)*sourceRepresentative np* + (relativeCauchyConstant Cg (∫x : Vec,totalEnergy s (0,x)) (G nf)* + (2*remainingGoodConstant 131080 16384 0*Real.sqrt (cappedRepresentative nf)+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*remainingGoodConstant 131080 16384 (1/2))+ + relativeCauchyConstant Cb (∫x : Vec,totalEnergy s (0,x)) (B nf)* + (2*remainingMagneticConstant 131080 16384 0+ + H*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min (sourceRepresentative np) w)*U*remainingMagneticConstant 131080 16384 (1/2)))= + D*f np nf := by + rw [hs.initial_energy_eq,relativeCauchyConstant_factor Cg,relativeCauchyConstant_factor Cb] + dsimp [f,g,b',E,g₀,g₁,b₀,b₁] + ring + calc + _≤∑np∈Sp,∑nf∈Sφ,ENNReal.ofReal (D*f np nf) := by + apply Finset.sum_le_sum + intro np hnp + apply Finset.sum_le_sum + intro nf hnf + have hh := hi np hnp nf hnf + dsimp only at hh + change _≤ENNReal.ofReal _ at hh + rw [←he np nf] + exact hh + _=ENNReal.ofReal (D*(∑np∈Sp,∑nf∈Sφ,f np nf)) := by + simp_rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>mul_nonneg hD (hf _ n)), + ←ENNReal.ofReal_sum_of_nonneg (fun n _=>Finset.sum_nonneg (fun i _=>mul_nonneg hD (hf n i))), + ←Finset.mul_sum] + _≤_ := by + apply ENNReal.ofReal_le_ofReal + rw [mul_assoc] + apply mul_le_mul_of_nonneg_left _ hD + exact remaining_source_budget_total Sp Sφ G B hI hI1 (zero_lt_one.trans_le hP) hw hwP hM hA hL + (fun n _=>hG n) (fun n _=>hB n) hEg hEb hN hg hb' hg₀ hg₁ hb₀ hb₁ hH hGb hBb + (receiver_scale_card_enlarged hP hw hwP hL Sφ hφ) hp + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SharedOccupation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SharedOccupation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e7f13d24d89994a0c2c55d54f72de0648013740 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SharedOccupation.lean @@ -0,0 +1,578 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SelectionCounts + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma DyadicWindow.mono_width {i k n : ℕ} {x : ℝ} (h : DyadicWindow i n x) (hik : i≤k) : + DyadicWindow k n x := by + have hp : (2:ℝ)^i≤(2:ℝ)^k := pow_le_pow_right₀ (by norm_num) hik + exact ⟨(one_div_le_one_div_of_le (by positivity) hp).trans h.1,h.2.trans hp⟩ + +lemma jointEnergyBudget_mono_width (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T a b I : ℝ) (n : ℕ×ℕ) {i k : ℕ} (hik : i≤k) : + jointEnergyBudget s α zX T i a b I n≤jointEnergyBudget s α zX T k a b I n := by + have hs : sameTimeBudgetSet α zX T i n⊆sameTimeBudgetSet α zX T k n := by + rintro p ⟨hp,hq,hv⟩ + exact ⟨hp,hq.mono_width hik,hv.mono_width hik⟩ + have ha : arrivalBudgetSet α zX T i n⊆arrivalBudgetSet α zX T k n := by + rintro p ⟨hq,(⟨hp,hv⟩|⟨hp,hv⟩)⟩ + · exact ⟨hq.mono_width hik,Or.inl ⟨hp,hv.mono_width hik⟩⟩ + · exact ⟨hq.mono_width hik,Or.inr ⟨hp,hv.mono_width hik⟩⟩ + unfold jointEnergyBudget + apply mul_le_mul' le_rfl + apply lintegral_mono + intro t + apply lintegral_mono + intro z + exact add_le_add (indicator_le_indicator_of_subset hs (by intro; positivity) _) + (indicator_le_indicator_of_subset ha (by intro; positivity) _) + +lemma PhaseFlowOn.closedEulerian_shared_budget {s : Solution} + {T M A P L a b massScale φ C p len I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (np nf : ℕ) (hp : p=64*(2:ℝ)^np) (hφeq : φ=(2:ℝ)⁻¹^nf) + (ha : 0≤a) (hb : b≤T) (hlen : 0(F.flow zX t).2) T M A P L) + (HZ : ∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) : + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (10240*B.rmax/p)* + (ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x))+ + ENNReal.ofReal (I/len)*jointEnergyBudget s F.flow zX T 4 + (max 0 (a-2*I)) (min T (b+I)) I (np,nf)) := by + have hp0 : 0

(ENNReal.ofReal_toReal (hn n)).symm⟩ + change (∑'n,(jointEnergyBudget s F.flow zX T 4 (max 0 (a-2*I)) (min T (b+I)) I n).toReal)≤_ + rw [←ENNReal.tsum_toReal_eq hn] + have hh := ENNReal.toReal_mono ENNReal.ofReal_ne_top h + rwa [ENNReal.toReal_ofReal (mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg)] at hh + +lemma shared_budget_radius_scalar {E J I lam : ℝ} (hE : 0≤E) (hJ : 0≤J) + (hJE : J≤3468*E) (hI : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let B := representativeClosedBin T w k + coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B (tsupport d.f₀) a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))≤ + ENNReal.ofReal (C*cappedRepresentative (k 3)/sourceRepresentative (k 0)* + (representativeSharedRadius s F zX P M A w a b I (k 0,k 2))^2) := by + let E := datumEnergyNumber d + let C := 20480*(max 1 T₀)*(2+3469*E) + have hE : 0≤E := hd.datumEnergyNumber_nonneg + refine ⟨C,by dsimp [C]; positivity,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall hactual HZ + dsimp only + let p := sourceRepresentative (k 0) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let B := representativeClosedBin T w k + let m := min p w/128 + let lam := stabilityLength P 16384 M A p w φ + let len := min I (lam/2) + let J := representativeJointEnergy s F zX a b I (k 0,k 2) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + have hp : 0

.mpr hsmall + change 8*(cappedRepresentative (k 1))^2≤φ^2/32 + nlinarith + have ho := F.closedEulerian_shared_budget hs.energyPrefix hT zX B hd.2.1 (k 0) (k 2) + (by rfl : p=64*(2:ℝ)^(k 0)) (by rfl : φ=(2:ℝ)⁻¹^(k 2)) ha hb hlen (min_le_left _ _) hJI + hM hA hP hL hm hφ (cappedRepresentative_le_one _) (by norm_num : (128:ℝ)≤128) + hstable le_rfl le_rfl hmq hmw (representativeClosedBin_radius_pos T w k) + (by change 0≤2*H*h; positivity) hdsmall le_rfl le_rfl hwφ (HZ zX hzX) HZ + obtain ⟨hsum,hbudget,hJof⟩ := hs.representativeJointEnergy_sum hd F zX hI hJI + have hJ0 : 0≤J := representativeJointEnergy_nonneg _ _ _ _ _ _ _ + have hJE : J≤3468*E := (hsum.le_tsum (k 0,k 2) (fun _ _=>representativeJointEnergy_nonneg _ _ _ _ _ _ _)).trans hbudget + rw [hs.initial_energy_eq,hJof] at ho + have hrad := shared_budget_radius_scalar hE hJ0 hJE hI hlam + change E+I/len*J≤(2+3469*E)*R^2 at hrad + rw [←ENNReal.ofReal_mul (by positivity : 0≤I/len), + ←ENNReal.ofReal_add hE (by positivity),←ENNReal.ofReal_mul (by change 0≤10240*(2*H*h)/p; positivity : 0≤10240*B.rmax/p)] at ho + apply ho.trans + apply ENNReal.ofReal_le_ofReal + change 10240*(2*H*h)/p*(E+I/len*J)≤C*h/p*R^2 + calc + _≤10240*(2*H*h)/p*((2+3469*E)*R^2) := mul_le_mul_of_nonneg_left hrad (by positivity) + _=(20480*H*(2+3469*E))*h/p*R^2 := by ring + _≤_ := by dsimp [C]; gcongr + +def representativeCentralCost {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + ∫⁻z : ConeCoordinate,physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B (Icc a b) + +def representativeSpatialCost {T : ℝ} (s : Solution) (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := + ENNReal.ofReal (cappedRepresentative (k 2)/cappedRepresentative (k 1))* + representativeCentralCost s F zX w k a b + +lemma central_near_scalar {C I H h p θ φ : ℝ} : + (128*C*p^3*θ^2)*(I*(2*H*h-H*h/2)*(384*φ^2))= + (73728*C*H)*(I*h*p^3*θ^2*φ^2) := by ring + +lemma central_far_scalar {C H h p φ R : ℝ} (hC : 0≤C) (hH : 1≤H) + (hh : 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + representativeCentralCost s F zX w k a b≤ + ENNReal.ofReal (C*min (I*h*p^3*θ^2*φ^2) (R^2/(p*h*φ^2))) := by + obtain ⟨Cρ,hCρ,hden⟩ := hd.uniform_physicalBinDensity_constant + obtain ⟨Co,hCo,hocc⟩ := hd.representative_shared_occupation T₀ + let C := max (73728*Cρ*max 1 T₀) (8*Co) + have hC : 0≤C := (by positivity : 0≤73728*Cρ*max 1 T₀).trans (le_max_left _ _) + refine ⟨C,hC,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall hactual HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let h := cappedRepresentative (k 3) + let H := max 1 T + let B := representativeClosedBin T w k + let R := representativeSharedRadius s F zX P M A w a b I (k 0,k 2) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const) + have hdensity (t r : ℝ) (n : Sphere) (hr : r∈Icc 0 T) : + physicalBinDensity s X V B t r n≤ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + have he := hden s T F hs.energyPrefix hs.initial_f X V B t r n p θ 1 hr hp.le hθ.le + (by norm_num : (0:ℝ)≤1) (by change p/32≤p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ≤1 from cappedRepresentative_le_one (k 1))] using he + have hn := physicalBin_density_near hα.snd.measurable B (J:=Icc a b) measurableSet_Icc hφ.le + (by rfl : B.Dmax≤8*φ^2) (fun z hz=>hdensity z.1 z.2.1 z.2.2 ⟨hz.2.1.1,hz.2.1.2.trans (hz.1.2.trans hb)⟩) + have hS0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + have he : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + rw [he] + have hf := F.physicalBin_density_far hs.energyPrefix hT zX B hd.2.1 hS0 hJ + (representativeClosedBin_radius_pos T w k) (by change 0<φ^2/2; positivity) + have ho := hocc M A P hM hA hP s T F hs hT hTT zX k a b I w hzX ha hb hI hJI hw hsmall hactual HZ + rw [mul_min_of_nonneg _ _ hC,ENNReal.ofReal_min] + apply le_min + · apply hn.trans + calc + _≤ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by + apply mul_le_mul' le_rfl + apply mul_le_mul' _ le_rfl + apply mul_le_mul' _ le_rfl + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hJI + _=ENNReal.ofReal ((73728*Cρ*H)*(I*h*p^3*θ^2*φ^2)) := by + change ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (2*H*h-H*h/2)*ENNReal.ofReal (384*φ^2))=_ + rw [←ENNReal.ofReal_mul hI.le,←ENNReal.ofReal_mul (mul_nonneg hI.le hdiff), + ←ENNReal.ofReal_mul (by positivity : 0≤128*Cρ*p^3*θ^2)] + exact congrArg ENNReal.ofReal central_near_scalar + _≤_ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right + ((mul_le_mul_of_nonneg_left hHH (by positivity)).trans (le_max_left _ _)) (by positivity)) + · apply hf.trans ((ENNReal.div_le_div_right ho _).trans ?_) + change ENNReal.ofReal (Co*h/p*R^2)/ENNReal.ofReal ((H*h/2)^2*(φ^2/2))≤_ + rw [←ENNReal.ofReal_div_of_pos (by positivity)] + apply ENNReal.ofReal_le_ofReal + exact (central_far_scalar hCo hH hh hp hφ).trans + (mul_le_mul_of_nonneg_right (le_max_right _ _) (by positivity)) + +lemma central_shared_radial_sum {I R p θ φ : ℝ} + (hI : 0min (I*p^3*θ*φ^4*((2:ℝ)^k)) (R^2/(p*θ*((2:ℝ)^k))) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := geometry_radial_balance hI hR hp hθ hφ (by norm_num : (0:ℝ)<1) + simp only [one_mul] at hg + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + have hscale (h : ℝ) (hh : 0 field_simp + simp_rw [hscale _ (cappedRepresentative_pos _),ENNReal.ofReal_mul (by positivity : 0≤θ/φ^2),he] + rw [ENNReal.tsum_mul_left] + calc + _≤ENNReal.ofReal (θ/φ^2)*(∑'k : ℤ,ENNReal.ofReal (g k)) := + mul_le_mul' le_rfl (ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (g k))) + _=ENNReal.ofReal (θ/φ^2)*ENNReal.ofReal (∑'k : ℤ,g k) := by + rw [ENNReal.ofReal_tsum_of_nonneg hg0 hg.1] + _≤ENNReal.ofReal (θ/φ^2)*ENNReal.ofReal (6*Real.sqrt I*R*p*φ^2) := + mul_le_mul' le_rfl (ENNReal.ofReal_le_ofReal hg.2) + _=ENNReal.ofReal (6*Real.sqrt I*R*p*θ) := by + rw [←ENNReal.ofReal_mul (by positivity : 0≤θ/φ^2)] + congr 1 + field_simp + +lemma capped_linear_tail_sum {φ : ℝ} (hφ : 0<φ) : + (∑'n : ℕ,ENNReal.ofReal (if cappedRepresentative n≤φ then cappedRepresentative n else 0))≤ + ENNReal.ofReal (2*φ) := by + classical + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun n=>cappedRepresentative n≤φ) + have he : (∑n∈S,ENNReal.ofReal (if cappedRepresentative n≤φ then cappedRepresentative n else 0))= + ∑n∈U,ENNReal.ofReal (cappedRepresentative n) := by simp [U,Finset.sum_filter,apply_ite] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun n _=>(cappedRepresentative_pos n).le)] + apply ENNReal.ofReal_le_ofReal + have hh := capped_positive_power_sum_unscaled hφ (by norm_num : (0:ℝ)<1) U + (fun n hn=>(Finset.mem_filter.mp hn).2) + norm_num only [Real.rpow_one] at hh + exact hh + +lemma Admissible.representative_central_double_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + (∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤φ/16 then + representativeCentralCost s F zX w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt I*R*p*φ) := by + classical + obtain ⟨C,hC,hbound⟩ := hd.representative_central_shared T₀ + refine ⟨12*C,by positivity,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nf a b I w hzX ha hb hI hJI hw hactual HZ + dsimp only + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 512/min (sourceRepresentative n.1) w∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.representative_central_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 512/min (sourceRepresentative n.1) wn∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeCentralCost s F zX w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P hM hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hJI hw (hU n hn).2 HZ + _=ENNReal.ofReal (Cc*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn hCc + simpa only [mul_assoc] using hh) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SignedRemainder.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SignedRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa6f7655ed7d990b7193194c4f1107a01c64e4a3 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SignedRemainder.lean @@ -0,0 +1,203 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeMotion + +namespace OAI + +noncomputable section +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology ContDiff + +namespace RVM + +lemma intervalIntegral_vec_apply {g : ℝ → Vec} {a b : ℝ} + (hg : IntervalIntegrable g volume a b) (i : Fin 3) : + (∫ t in a..b, g t) i = ∫ t in a..b, g t i := by + exact ((PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).intervalIntegral_comp_comm hg).symm + +lemma ac_weighted_vector_ibp {ψ : ℝ → ℝ} {g g' : ℝ → Vec} {a b : ℝ} + (hψ : AbsolutelyContinuousOnInterval ψ a b) + (hg : ContDiffOn ℝ 1 g (uIcc a b)) + (hg' : ContinuousOn g' (uIcc a b)) + (hd : ∀ t ∈ uIoo a b, HasDerivAt g (g' t) t) : + ∫ t in a..b, ψ t • g' t = + ψ b • g b - ψ a • g a - ∫ t in a..b, deriv ψ t • g t := by + have h₁ : IntervalIntegrable (fun t => ψ t • g' t) volume a b := + (hψ.continuousOn.smul hg').intervalIntegrable + have h₂ : IntervalIntegrable (fun t => deriv ψ t • g t) volume a b := + hψ.intervalIntegrable_deriv.smul_continuousOn hg.continuousOn + ext i + rw [intervalIntegral_vec_apply h₁,PiLp.sub_apply,PiLp.sub_apply, + PiLp.smul_apply,PiLp.smul_apply,intervalIntegral_vec_apply h₂] + simp only [PiLp.smul_apply,smul_eq_mul] + have hgi : ContDiffOn ℝ 1 (fun t => g t i) (uIcc a b) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp_contDiffOn hg + have he : (∫ t in a..b, ψ t * g' t i) = + ∫ t in a..b, ψ t * deriv (fun s => g s i) t := by + apply intervalIntegral.integral_congr_uIoo + intro t ht + have hi := (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp_hasDerivAt t (hd t ht) + change HasDerivAt (fun s => g s i) (g' t i) t at hi + exact congrArg (fun x => ψ t*x) hi.deriv.symm + rw [he] + exact hψ.integral_mul_deriv_eq_deriv_mul hgi.absolutelyContinuousOnInterval + +lemma ac_weighted_signed_ibp {ψ : ℝ → ℝ} {P K R : ℝ → Vec} + {W W' : ℝ → Vec →L[ℝ] Vec} {a b : ℝ} + (hψ : AbsolutelyContinuousOnInterval ψ a b) + (hP : ContDiffOn ℝ 1 P (uIcc a b)) + (hW : ContDiffOn ℝ 1 W (uIcc a b)) + (hW' : ContinuousOn W' (uIcc a b)) + (hK : ContinuousOn K (uIcc a b)) (hR : ContinuousOn R (uIcc a b)) + (hPd : ∀ t ∈ uIoo a b, HasDerivAt P (-K t+R t) t) + (hWd : ∀ t ∈ uIoo a b, HasDerivAt W (W' t) t) : + ∫ t in a..b, ψ t • W t (K t) = + ψ a • W a (P a) - ψ b • W b (P b) + + ∫ t in a..b, + deriv ψ t • W t (P t) + ψ t • (W' t (P t)+W t (R t)) := by + have hg : ContDiffOn ℝ 1 (fun t => W t (P t)) (uIcc a b) := hW.clm_apply hP + have hg' : ContinuousOn (fun t => W' t (P t)+W t (-K t+R t)) (uIcc a b) := + (hW'.clm_apply hP.continuousOn).add (hW.continuousOn.clm_apply (hK.neg.add hR)) + have h := ac_weighted_vector_ibp hψ hg hg' + (fun t ht => (hWd t ht).clm_apply (hPd t ht)) + have hI₁ : IntervalIntegrable (fun t => ψ t • W t (K t)) volume a b := + (hψ.continuousOn.smul (hW.continuousOn.clm_apply hK)).intervalIntegrable + have hI₂ : IntervalIntegrable (fun t => ψ t • (W' t (P t)+W t (R t))) volume a b := + (hψ.continuousOn.smul ((hW'.clm_apply hP.continuousOn).add + (hW.continuousOn.clm_apply hR))).intervalIntegrable + have hI₃ : IntervalIntegrable (fun t => deriv ψ t • W t (P t)) volume a b := + hψ.intervalIntegrable_deriv.smul_continuousOn hg.continuousOn + have he : (fun t => ψ t • (W' t (P t)+W t (-K t+R t))) = + (fun t => ψ t • (W' t (P t)+W t (R t)) - ψ t • W t (K t)) := by + funext t + simp only [map_add,map_neg,smul_add,smul_neg] + abel + rw [he,intervalIntegral.integral_sub hI₂ hI₁] at h + rw [intervalIntegral.integral_add hI₃ hI₂] + have hh := congrArg (fun v => (∫ t in a..b, ψ t • (W' t (P t)+W t (R t))) - v) h + convert hh using 1 <;> abel + +def signedRemainder (r : ℝ) (a u n aₜ : Vec) : Vec := + ((1-dot a u)/(r^2*(1-dot n a)^2)) • + (((1-dot a a)/(1-dot n a)) • n-a) + + (dot aₜ (signedPrimitive a u n)/(r*(1-dot n a)^2)) • n + +lemma contDiffOn_retardedPrimitive {r : ℝ → ℝ} {a u n : ℝ → Vec} {S : Set ℝ} + (hr : ContDiffOn ℝ 1 r S) (ha : ContDiffOn ℝ 1 a S) + (hu : ContDiffOn ℝ 1 u S) (hn : ContDiffOn ℝ 1 n S) + (hr0 : ∀ s ∈ S, r s ≠ 0) (hd : ∀ s ∈ S, 1-dot (n s) (u s) ≠ 0) + (hD : ∀ s ∈ S, 1-dot (n s) (a s) ≠ 0) : + ContDiffOn ℝ 1 (fun s => retardedPrimitive (r s) (a s) (u s) (n s)) S := by + have hdu : ContDiffOn ℝ 1 (fun s => 1-dot (n s) (u s)) S := by + simpa only [dot_eq_inner,Pi.sub_apply] using contDiffOn_const.sub (hn.inner ℝ hu) + have hDa : ContDiffOn ℝ 1 (fun s => 1-dot (n s) (a s)) S := by + simpa only [dot_eq_inner,Pi.sub_apply] using contDiffOn_const.sub (hn.inner ℝ ha) + have hea : ContDiffOn ℝ 1 (fun s => 1-dot (a s) (u s)) S := by + simpa only [dot_eq_inner,Pi.sub_apply] using contDiffOn_const.sub (ha.inner ℝ hu) + exact ((hr.mul hdu).inv (fun s hs => mul_ne_zero (hr0 s hs) (hd s hs))).smul + (hu.sub ((hea.div hDa hD).smul hn)) + +lemma continuousOn_signedRemainder {r : ℝ → ℝ} {a u n aₜ : ℝ → Vec} {S : Set ℝ} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) + (hu : ContinuousOn u S) (hn : ContinuousOn n S) (haₜ : ContinuousOn aₜ S) + (hr0 : ∀ s ∈ S, r s ≠ 0) (hD : ∀ s ∈ S, 1-dot (n s) (a s) ≠ 0) : + ContinuousOn (fun s => signedRemainder (r s) (a s) (u s) (n s) (aₜ s)) S := by + have hDa : ContinuousOn (fun s => 1-dot (n s) (a s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hn.inner ha) + have hea : ContinuousOn (fun s => 1-dot (a s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (ha.inner hu) + have haa : ContinuousOn (fun s => 1-dot (a s) (a s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (ha.inner ha) + have hp : ContinuousOn (fun s => signedPrimitive (a s) (u s) (n s)) S := + hu.sub ((hea.div hDa hD).smul hn) + have hatp : ContinuousOn (fun s => dot (aₜ s) (signedPrimitive (a s) (u s) (n s))) S := by + simpa only [dot_eq_inner] using haₜ.inner hp + exact ((hea.div ((hr.pow 2).mul (hDa.pow 2)) + (fun s hs => mul_ne_zero (pow_ne_zero _ (hr0 s hs)) (pow_ne_zero _ (hD s hs)))).smul + (((haa.div hDa hD).smul hn).sub ha)).add + ((hatp.div (hr.mul (hDa.pow 2)) + (fun s hs => mul_ne_zero (hr0 s hs) (pow_ne_zero _ (hD s hs)))).smul hn) + +lemma continuousOn_signedForceKernel {r : ℝ → ℝ} {a u n u' : ℝ → Vec} {S : Set ℝ} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) + (hu : ContinuousOn u S) (hn : ContinuousOn n S) (hu' : ContinuousOn u' S) + (hr0 : ∀ s ∈ S, r s ≠ 0) (hd : ∀ s ∈ S, 1-dot (n s) (u s) ≠ 0) + (hD : ∀ s ∈ S, 1-dot (n s) (a s) ≠ 0) : + ContinuousOn (fun s => signedForceKernel (r s) (a s) (u s) (n s) (u' s)) S := by + have hdu : ContinuousOn (fun s => 1-dot (n s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hn.inner hu) + have hDa : ContinuousOn (fun s => 1-dot (n s) (a s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hn.inner ha) + have huu : ContinuousOn (fun s => 1-dot (u s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : ℝ => (1 : ℝ)) S).sub (hu.inner hu) + have hnu' : ContinuousOn (fun s => dot (n s) (u' s)) S := by + simpa only [dot_eq_inner] using hn.inner hu' + have hv : ContinuousOn (fun s => sourceVelocityRate (u s) (n s) (u' s)) S := + ((hdu.inv₀ hd).smul hu').add + ((hnu'.div (hdu.pow 2) (fun s hs => pow_ne_zero _ (hd s hs))).smul (hu.sub hn)) + have hc {w : ℝ → Vec} (hw : ContinuousOn w S) : + ContinuousOn (fun s => coneTransform (a s) (n s) (w s)) S := by + have haw : ContinuousOn (fun s => dot (a s) (w s)) S := by + simpa only [dot_eq_inner] using ha.inner hw + exact hw.add ((haw.div hDa hD).smul hn) + exact (((hr.inv₀ hr0).smul (hc hv)).neg).sub + ((huu.div ((hr.pow 2).mul hdu) + (fun s hs => mul_ne_zero (pow_ne_zero _ (hr0 s hs)) (hd s hs))).smul + (hc ((hdu.inv₀ hd).smul (hu.sub hn)))) + +lemma weighted_signed_identity_on_branch + {r : ℝ → ℝ} {a u n u' aₜ : ℝ → Vec} + {ψ : ℝ → ℝ} {W W' : ℝ → Vec →L[ℝ] Vec} {b c : ℝ} + (hψ : AbsolutelyContinuousOnInterval ψ b c) + (hr : ContDiffOn ℝ 1 r (uIcc b c)) (ha : ContDiffOn ℝ 1 a (uIcc b c)) + (hu : ContDiffOn ℝ 1 u (uIcc b c)) (hn : ContDiffOn ℝ 1 n (uIcc b c)) + (hW : ContDiffOn ℝ 1 W (uIcc b c)) (hW' : ContinuousOn W' (uIcc b c)) + (hu' : ContinuousOn u' (uIcc b c)) (haₜ : ContinuousOn aₜ (uIcc b c)) + (hr0 : ∀ s ∈ uIcc b c, r s ≠ 0) + (hd : ∀ s ∈ uIcc b c, 1-dot (n s) (u s) ≠ 0) + (hD : ∀ s ∈ uIcc b c, 1-dot (n s) (a s) ≠ 0) + (hrd : ∀ s ∈ uIoo b c, HasDerivAt r + ((1-dot (n s) (u s))/(1-dot (n s) (a s))-1) s) + (had : ∀ s ∈ uIoo b c, HasDerivAt a + (((1-dot (n s) (u s))/(1-dot (n s) (a s))) • aₜ s) s) + (hud : ∀ s ∈ uIoo b c, HasDerivAt u (u' s) s) + (hnd : ∀ s ∈ uIoo b c, HasDerivAt n ((r s)⁻¹ • coneMotion (a s) (u s) (n s)) s) + (hWd : ∀ s ∈ uIoo b c, HasDerivAt W (W' s) s) : + ∫ s in b..c, ψ s • W s (signedForceKernel (r s) (a s) (u s) (n s) (u' s)) = + ψ b • W b (retardedPrimitive (r b) (a b) (u b) (n b)) - + ψ c • W c (retardedPrimitive (r c) (a c) (u c) (n c)) + + ∫ s in b..c, + deriv ψ s • W s (retardedPrimitive (r s) (a s) (u s) (n s)) + + ψ s • (W' s (retardedPrimitive (r s) (a s) (u s) (n s)) + + W s (signedRemainder (r s) (a s) (u s) (n s) (aₜ s))) := by + apply ac_weighted_signed_ibp hψ + (contDiffOn_retardedPrimitive hr ha hu hn hr0 hd hD) hW hW' + (continuousOn_signedForceKernel hr.continuousOn ha.continuousOn hu.continuousOn + hn.continuousOn hu' hr0 hd hD) + (continuousOn_signedRemainder hr.continuousOn ha.continuousOn hu.continuousOn + hn.continuousOn haₜ hr0 hD) _ hWd + intro s hs + have hs' : s ∈ uIcc b c := Ioo_subset_Icc_self hs + have hder := hasDerivAt_retardedPrimitive (hrd s hs) (had s hs) (hud s hs) (hnd s hs) + (hr0 s hs') (hd s hs') (hD s hs') + convert hder using 1 + have he := signed_force_identity (r s) (a s) (u s) (n s) (u' s) (aₜ s) + (hr0 s hs') (hd s hs') (hD s hs') + rw [he] + unfold signedRemainder + abel + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SourceJointFlux.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SourceJointFlux.lean new file mode 100644 index 0000000000000000000000000000000000000000..40b7c424b33c77458389a6c8d503845324f46e92 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SourceJointFlux.lean @@ -0,0 +1,147 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.SourceKernels + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +def sourceJointFlux (e : Vec) (i : Fin 3) (p : Phase × Phase) : Vec := + sourceFixedFlux p.1.2 p.2.1 p.2.2 e i p.1.1 + +lemma sourceJointFlux_contDiffAt (e : Vec) (i : Fin 3) {p : Phase × Phase} + (hp : p.1.1≠0) : ContDiffAt ℝ 1 (sourceJointFlux e i) p := by + have hr := (contDiffAt_coneRadius (k:=1) hp.symm).comp p contDiffAt_fst.fst + have hn := (contDiffAt_coneDirection (k:=1) hp.symm).comp p contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : Phase × Phase => velocity z.1.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_fst.snd + have he := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hd := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hne := (cone_denom_pos p.1.2 _ (coneDirection_norm hp.symm)).ne' + have hW : ContDiffAt ℝ 1 (fun z : Phase × Phase => coneSpatialLift 0 z.1.1 z.1.2 e) p := + contDiffAt_const.add ((he.div (contDiffAt_const.sub hd) hne).smul hu) + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 p.1.1,p.2.1,p.2.2),p.1.2)) hne).comp p + ((hn.prodMk (contDiffAt_snd.fst.prodMk contDiffAt_snd.snd)).prodMk contDiffAt_fst.snd) + exact ((hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hp.symm))).mul hc).smul hW + +lemma sourceJointFlux_derivative_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖fderiv ℝ (sourceJointFlux e i) ((n.1,v),(E,B))‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P) ×ˢ + (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M) + have hK : IsCompact K := ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : ContinuousOn (fderiv ℝ (sourceJointFlux e i)) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + have hz : p.1.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact ((sourceJointFlux_contDiffAt e i hz).continuousAt_fderiv (by simp)).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,v),(E,B)) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_closedBall,dist_zero_right] using hv⟩, + by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩ + +lemma sourceFixedFlux_spatial_derivative (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (a : Vec) : + fderiv ℝ (sourceFixedFlux v E B e i) z a= + fderiv ℝ (sourceJointFlux e i) ((z,v),(E,B)) ((a,0),(0,0)) := by + have hm := ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk (hasFDerivAt_const v z)).prodMk + (hasFDerivAt_const (E,B) z) + have hh := ((sourceJointFlux_contDiffAt e i (p:=((z,v),(E,B))) hz).differentiableAt (by simp)).hasFDerivAt.comp z hm + exact congrArg (fun L : Vec →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_field_derivative (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (a : Phase) : + fderiv ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) (E,B) a= + fderiv ℝ (sourceJointFlux e i) ((z,v),(E,B)) ((0,0),a) := by + have hm := (hasFDerivAt_const (z,v) (E,B)).prodMk (hasFDerivAt_id (𝕜:=ℝ) (E,B)) + have hh := ((sourceJointFlux_contDiffAt e i (p:=((z,v),(E,B))) hz).differentiableAt (by simp)).hasFDerivAt.comp (E,B) hm + exact congrArg (fun L : Phase →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_field_differentiable (v e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (w : Phase) : + DifferentiableAt ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) w := + ((sourceJointFlux_contDiffAt e i (p:=((z,v),w)) hz).differentiableAt (by simp)).comp w + ((differentiableAt_const (z,v)).prodMk differentiableAt_id) + +lemma sourceFixedFlux_field_rescale (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) + {r : ℝ} (hr : 0 sourceFixedFlux v w.1 w.2 e i (r • z)) (E,B) a= + r⁻¹ • fderiv ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) (E,B) a := by + have heq : (fun w : Phase => sourceFixedFlux v w.1 w.2 e i (r • z))= + fun w : Phase => r⁻¹ • sourceFixedFlux v w.1 w.2 e i z := + funext (fun w => sourceFixedFlux_homogeneous v w.1 w.2 e i hr z) + rw [heq] + have hh := (sourceFixedFlux_field_differentiable v e i hz (E,B)).hasFDerivAt.const_smul r⁻¹ + change HasFDerivAt (fun w : Phase => r⁻¹ • sourceFixedFlux v w.1 w.2 e i z) _ _ at hh + exact congrArg (fun L : Phase →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_bounds (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec) (r : ℝ), + ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → 0 sourceFixedFlux v w.1 w.2 e i (r • n.1)) (E,B) a‖≤C/r*‖a‖ := by + obtain ⟨C,hC,hb⟩ := sourceJointFlux_derivative_bound P M e i + refine ⟨C,hC,?_⟩ + intro n v E B r hv hE hB hr + have hn : n.1≠(0:Vec) := by intro hh; have hn := sphere_norm n; rw [hh,norm_zero] at hn; norm_num at hn + have hder := hb n v E B hv hE hB + have hF (z : Vec) (hz : z≠0) := (sourceFixedFlux_contDiffAt v E B e i hz).differentiableAt (by simp) + constructor + · rw [divergence_degree_neg_one (fun r hr z => sourceFixedFlux_homogeneous v E B e i hr z) hF hr hn, + abs_mul,abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + have hb0 : |divergence (sourceFixedFlux v E B e i) n.1|≤3*C := by + unfold divergence spatialPartial + calc + |∑ j : Fin 3,fderiv ℝ (fun z => sourceFixedFlux v E B e i z j) n.1 (basis j)| + ≤ ∑ j : Fin 3,|fderiv ℝ (fun z => sourceFixedFlux v E B e i z j) n.1 (basis j)| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j : Fin 3,C := by + apply Finset.sum_le_sum + intro j hj + rw [fderiv_vec_component_at (hF n.1 hn) j] + change |(fderiv ℝ (sourceFixedFlux v E B e i) n.1 (basis j)) j|≤C + apply (norm_coordinate_le _ j).trans + rw [sourceFixedFlux_spatial_derivative v E B e i hn] + have ht := (ContinuousLinearMap.le_opNorm _ ((basis j,0),(0,0))).trans + (mul_le_mul_of_nonneg_right hder (norm_nonneg _)) + simpa [Prod.norm_mk,basis,PiLp.norm_single] using ht + _ = 3*C := by simp + exact (mul_le_mul_of_nonneg_left hb0 (inv_nonneg.mpr (sq_nonneg _))).trans_eq (by ring) + · intro a + rw [sourceFixedFlux_field_rescale v E B e i hn hr a,norm_smul,Real.norm_eq_abs, + abs_inv,abs_of_pos hr,sourceFixedFlux_field_derivative v E B e i hn] + have ht := (ContinuousLinearMap.le_opNorm _ ((0,0),a)).trans + (mul_le_mul_of_nonneg_right hder (norm_nonneg _)) + have ht' : ‖fderiv ℝ (sourceJointFlux e i) ((n.1,v),(E,B)) ((0,0),a)‖≤C*‖a‖ := by + simpa only [Prod.norm_mk,norm_zero,max_self,max_eq_right (norm_nonneg a)] using ht + exact (mul_le_mul_of_nonneg_left ht' (inv_nonneg.mpr hr.le)).trans_eq (by ring) + +lemma divergence_parameter_chain {F : Vec × Phase → Vec} {g : Vec → Phase} {z : Vec} + (hF : DifferentiableAt ℝ F (z,g z)) (hg : DifferentiableAt ℝ g z) : + divergence (fun y => F (y,g y)) z= + divergence (fun y => F (y,g z)) z+ + ∑ j : Fin 3,(fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j := by + have hd := hF.hasFDerivAt.comp z ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk hg.hasFDerivAt) + have hs := hF.hasFDerivAt.comp z ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk (hasFDerivAt_const (g z) z)) + have hp := hF.hasFDerivAt.comp (g z) ((hasFDerivAt_const z (g z)).prodMk (hasFDerivAt_id (𝕜:=ℝ) (g z))) + change HasFDerivAt (fun y => F (y,g y)) _ z at hd + change HasFDerivAt (fun y => F (y,g z)) _ z at hs + change HasFDerivAt (fun w : Phase => F (z,w)) _ (g z) at hp + unfold divergence spatialPartial + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro j hj + rw [fderiv_vec_component_at hd.differentiableAt j,fderiv_vec_component_at hs.differentiableAt j, + hd.fderiv,hs.fderiv,hp.fderiv] + change (fderiv ℝ F (z,g z) (basis j,fderiv ℝ g z (basis j))) j= + (fderiv ℝ F (z,g z) (basis j,0)) j+(fderiv ℝ F (z,g z) (0,fderiv ℝ g z (basis j))) j + rw [show (basis j,fderiv ℝ g z (basis j))=(basis j,0)+(0,fderiv ℝ g z (basis j)) by simp,map_add] + rfl + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SourceWeightedPacket.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SourceWeightedPacket.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c8bde7973b910857d635c1ea3f30e766ab7be8e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SourceWeightedPacket.lean @@ -0,0 +1,276 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.VolterraKernels + +namespace OAI + +noncomputable section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +def sourceWeightedPacket (s : Solution) (t : ℝ) (i : Fin 3) (p : Vec × Phase) : ℝ := + sourceReceiverKernel s t i p*s.f (t-coneRadius 0 p.2.1,p.1+p.2.1,p.2.2) + +lemma sourceWeightedPacket_contDiffAt {s : Solution} {t : ℝ} (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {p : Vec × Phase} (hz : p.2.1≠0) (ht : 0 (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) p := + (contDiffAt_const.sub hr).prodMk ((contDiffAt_fst.add contDiffAt_snd.fst).prodMk contDiffAt_snd.snd) + exact (sourceReceiverKernel_contDiffAt i hE hB hz ht).mul + ((particle_contDiffAt_positive hf ht (p.1+p.2.1) p.2.2).comp p hm) + +lemma sourceWeightedPacket_fderiv {s : Solution} {t : ℝ} (x z v e : Vec) (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hz : z≠0) (ht : 0 sourceWeightedPacket s t i (y,z,v)) _ x at hh + change HasFDerivAt (fun y => sourceReceiverKernel s t i (y,z,v)) _ x at hkp + rw [hh.fderiv,hkp.fderiv] + simp only [add_apply,smul_apply, + ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply,ContinuousLinearMap.id_apply, + zero_apply,smul_eq_mul,Function.comp_apply,id_eq,sourceReceiverKernel] + ring + +lemma source_packet_estimates (P A M N Q : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hN : 0≤N) (hQ : 0≤Q) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (s : Solution) (U t : ℝ), t≤U → + ContDiffOn ℝ 1 s.f particleHalfSpace → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => s.f (u,z,v)) y‖≤N) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hc := hkb s t x z v hz hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd := hlb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤L/‖z‖*Q*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + have hfd : |fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤N*‖e‖ := by + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hu.1 _ _) e] + exact (ContinuousLinearMap.le_opNorm _ e).trans + (mul_le_mul_of_nonneg_right (hfN _ ⟨hu.1.le,hu.2⟩ _ v) (norm_nonneg e)) + constructor + · change |sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)|≤_ + rw [abs_mul] + exact (mul_le_mul hc (hfA _ ⟨hu.1.le,hu.2⟩ _ v) (abs_nonneg _) (by positivity)).trans_eq (by ring) + · rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz hu.1] + apply (abs_add_le _ _).trans + rw [abs_mul,abs_mul] + exact (add_le_add (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ v) (abs_nonneg _) (by positivity)) + (mul_le_mul hc hfd (abs_nonneg _) (by positivity))).trans_eq (by ring) + +lemma hasDerivAt_magnetic_source_integral {s : Solution} {U t P A M N Q : ℝ} + (x e : Vec) (i : Fin 3) (a : ℝ) (htU : t≤U) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hA : 0≤A) (hN : 0≤N) (hQ : 0≤Q) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) + (hEB : ∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) + (hDF : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) + (hfN : ∀ u∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => s.f (u,z,v)) y‖≤N) : + HasDerivAt (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) + (∫ z in ball (0:Vec) t,∫ v,fderiv ℝ (sourceWeightedPacket s t i) (x+a • e,z,v) (e,0,0)) a := by + obtain ⟨C,D,hC,hD,hb⟩ := source_packet_estimates P A M N Q e i hA hN hQ + have hbc := hb s U t htU hf hE hB hfA hEB hDF hfN + apply hasDerivAt_retarded_packet_integral (F:=sourceWeightedPacket s t i) (P:=P) (C:=C) (D:=D) ?_ ?_ + (fun x z v hz hzt hv => (hbc x z v hz hzt hv).1) x e a (fun x z v hz hzt hv => (hbc x z v hz hzt hv).2) + · intro p hp ht + apply sourceWeightedPacket_contDiffAt i hf hE hB hp + simpa only [coneRadius,zero_sub,norm_neg] using sub_pos.mpr ht + · intro x z v hz hzt hv + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + simp only [coneRadius,zero_sub,norm_neg,mem_Icc] + constructor <;> linarith [norm_nonneg z] + simp only [sourceWeightedPacket,hP _ hu _ v hv,mul_zero] + +lemma retarded_packet_inner_integrable {F : Vec × Phase → ℝ} {t P : ℝ} + (hc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ F (x,z,v)) := by + have hcont : Continuous (fun v => F (x,z,v)) := continuous_iff_continuousAt.mpr (fun v => + (hc (x,z,v) hz0 hzt).comp (f:=fun w : Vec => (x,z,w)) (continuousAt_const.prodMk (continuousAt_const.prodMk continuousAt_id))) + exact hcont.integrable_of_hasCompactSupport (HasCompactSupport.intro (isCompact_closedBall (0:Vec) P) + (fun v hv => hz x z v hz0 hzt (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv))) + +lemma norm_integral_ball_inverse_le {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {t C : ℝ} (ht : 0≤t) + (hb : ∀ z : Vec,z≠0 → ‖z‖ (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) p := (continuousAt_const.sub ((contDiffAt_coneRadius (k:=1) hz.symm).continuousAt.comp (f:=fun q : Vec × Phase => q.2.1) continuousAt_snd.fst)).prodMk + ((continuousAt_fst.add continuousAt_snd.fst).prodMk continuousAt_snd.snd) + exact (((sourceReceiverKernel_contDiffAt i hE hB hz hu).continuousAt_fderiv (by simp)).clm_apply continuousAt_const).mul + ((particle_contDiffAt_positive hf hu (p.1+p.2.1) p.2.2).continuousAt.comp (f:=fun q : Vec × Phase => (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) hm) + +lemma source_receiver_packet_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t Q : ℝ),t≤U → 0≤Q → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hd := hkb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤K/‖z‖*Q*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + exact (by + dsimp [sourceReceiverParticlePacket] + rw [abs_mul] + exact (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ _) (abs_nonneg _) (by positivity)).trans_eq (by ring)) + +lemma magnetic_source_receiver_integral_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t Q : ℝ) (x : Vec),0≤t → t≤U → 0≤Q → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + |∫ z in ball (0:Vec) t,∫ v,sourceReceiverParticlePacket s t e i (x,z,v)|≤C*Q*t^2 := by + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨2*Real.pi*volume.real (closedBall (0:Vec) P)*K,by positivity,?_⟩ + intro s U t Q x ht htU hQ hE hB hfA hP hEB hDF + rw [←Real.norm_eq_abs] + apply (norm_integral_ball_inverse_le ht (C:=volume.real (closedBall (0:Vec) P)*K*Q) ?_).trans_eq (by ring) + intro z hz hzt + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + simp only [coneRadius,zero_sub,norm_neg,mem_Icc] + constructor <;> linarith [norm_nonneg z] + have hh := norm_velocity_integral_bound (P:=P) (g:=fun v => sourceReceiverParticlePacket s t e i (x,z,v)) + (fun v hv => by simp only [sourceReceiverParticlePacket,hP _ hu _ v hv,mul_zero]) + (hkb s U t Q htU hQ hE hB hfA hEB hDF x z · hz hzt) + exact hh.trans_eq (by ring) + +lemma magnetic_source_deriv_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H Q N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + C*(H+H^2*(1+Q)) := by + obtain ⟨C₁,hC₁,hb₁⟩ := magnetic_source_particle_gradient_bound P A M e i hA + obtain ⟨C₂,hC₂,hb₂⟩ := magnetic_source_receiver_integral_bound P A M e i hA + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨C₁+C₂,by positivity,?_⟩ + intro s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN + have hH : 0≤H := ht.le.trans (htU.trans hUH) + have hprop (z : Vec) (hz : ‖z‖ linarith [norm_nonneg z] + let R := sourceReceiverParticlePacket s t e i + let F := fun p : Vec × Phase => fderiv ℝ (sourceWeightedPacket s t i) p (e,0,0) + have hRc : ∀ p : Vec × Phase,p.2.1≠0 → ‖p.2.1‖ sourceReceiverParticlePacket_continuousAt e i hf hE hB hp hpt + have hRz : ∀ x z v : Vec,z≠0 → ‖z‖ sourceWeightedPacket_contDiffAt i hf hE hB hp (hprop p.2.1 hpt).1 + have hWz : ∀ x z v : Vec,z≠0 → ‖z‖ retarded_packet_derivative_zero hweighted hWz x z v e hz hzt hv + have hRi := retarded_packet_integrable x hRc hRz (hkb s U t Q htU hQ hE hB hfA hEB hDF) + have hPi := source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN + have hsplit : (∫ z in ball (0:Vec) t,∫ v,F (x,z,v))= + (∫ z in ball (0:Vec) t,∫ v,R (x,z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) := by + rw [←integral_add hRi hPi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hzt : ‖z‖ by + dsimp [F,R,sourceReceiverParticlePacket] + rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz0 (hprop z hzt).1] + ring) + linarith + rw [(hasDerivAt_magnetic_source_integral x e i 0 htU hf hE hB hA hN hQ hP hfA hEB hDF hfN).deriv] + simp only [zero_smul,add_zero] + change |∫ z in ball (0:Vec) t,∫ v,F (x,z,v)|≤_ + rw [hsplit] + apply (abs_add_le _ _).trans + apply (add_le_add (hb₂ s U t Q x ht.le htU hQ hE hB hfA hP hEB hDF) + (hb₁ s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN)).trans + have htH : t^2≤H^2 := by nlinarith [htU.trans hUH] + have hh : C₂*Q*t^2≤C₂*(H+H^2*(1+Q)) := by + calc + _ ≤ C₂*Q*H^2 := mul_le_mul_of_nonneg_left htH (mul_nonneg hC₂ hQ) + _ ≤ _ := by nlinarith [mul_nonneg hC₂ hH,mul_nonneg hC₂ (sq_nonneg H)] + nlinarith + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SpatialEstimates.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SpatialEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..b62b9b9f28199dccbb2d570c8143f0d9b81977bd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SpatialEstimates.lean @@ -0,0 +1,1292 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.GoodCrossings +import OAI.Analysis.VlasovMaxwell.Population.ReceiverWeights + +namespace OAI + +noncomputable section + +namespace RVM + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma deficit_sqrt_representative_bounds {d θ : ℝ} (hθ : 0<θ) + (hd : d∈Icc (θ^2/2) (8*θ^2)) : + θ/2≤Real.sqrt (d/2) ∧ Real.sqrt (d/2)≤2*θ := by + have hd0 : 0≤d := by nlinarith [sq_nonneg θ,hd.1] + constructor + · apply (Real.le_sqrt (by positivity) (by positivity)).mpr + nlinarith [hd.1] + · apply (Real.sqrt_le_iff).mpr + exact ⟨by positivity,by nlinarith [hd.2]⟩ + +lemma small_bin_deficit_order {d D θ φ : ℝ} (hθ : 0<θ) (hφ : 0<φ) + (hsmall : θ≤φ/16) (hd : d∈Icc (θ^2/2) (8*θ^2)) + (hD : D∈Icc (φ^2/2) (8*φ^2)) : d≤D := by + have hh := (sq_le_sq₀ hθ.le (by positivity : 0≤φ/16)).mpr hsmall + nlinarith [hd.2,hD.1] + +lemma unprojected_geometry_bin_cost {C T r f θ φ : ℝ} {n v W : Vec} + (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (hn : ‖n‖=1) (hr : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + ENNReal.ofReal (φ/p) * + (∫⁻z : ConeCoordinate, ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeMagnetic s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B (Icc a b)) + +lemma PhaseFlowOn.bulkSource_pointwise {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {J : Set ℝ} (hJT : J⊆Icc 0 T) + (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈J,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (k : Fin 4→ℕ) (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) + {z : ConeCoordinate} (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) {v : Vec} + (hv : v∈coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2)) : + ‖partialCutoffTriangle s F.flow zX T Q (coneSourceCutoffTangent s F.flow zX) W J (z,v)‖≤ + (99840000*C)*(z.1-z.2.1)* + (cappedRepresentative (k 2)/(sourceRepresentative (k 0)*(cappedRepresentative (k 1))^2)* + prefixConeGood s T (fun t=>(prefixFlow F.flow T zX t).1) z+ + cappedRepresentative (k 2)/sourceRepresentative (k 0)* + prefixConeMagnetic s T (fun t=>(prefixFlow F.flow T zX t).1) z)* + s.f (z.2.1,((prefixFlow F.flow T zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hp0 : 0(prefixFlow F.flow T zX t).1) z := + add_nonneg (norm_nonneg _) (abs_nonneg _) + have hb : 0≤prefixConeMagnetic s T (fun t=>(prefixFlow F.flow T zX t).1) z := norm_nonneg _ + positivity + +def representativeSpatialTransition (P M A w I : ℝ) (k : Fin 4→ℕ) : Prop := + ¬ representativeSelected P M A w I k ∧ + ∃j : Fin 4→ℕ,representativeSelected P M A w I j ∧ + ∀i,j i≤k i+2 ∧ k i≤j i+2 + +lemma Admissible.regular_spatial_transition_pair_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative nf/16 ∧ + regularCentralIndex P M A I w ![np,nt,nf,nr] ∧ + representativeSpatialTransition P M A w I ![np,nt,nf,nr] then + representativeSpatialCost s F zX w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt I* + representativeSharedRadius s F zX P M A w a b I (np,nf)* + sourceRepresentative np*cappedRepresentative nf) := by + classical + obtain ⟨Cu,hCu,hunselected⟩ := hd.unselected_spatial_polynomial_cap T₀ + obtain ⟨Cr,hCr,hregular⟩ := hd.representative_spatial_regular_shared T₀ + let C₀ := max Cu Cr + have hC₀ : 0≤C₀ := hCu.trans (le_max_left _ _) + let α : ℝ := 1/50000 + let γ : ℝ := (1-2*α)/(1-α) + let K := (2+dyadicBalanceConstant α 1)*dyadicBalanceConstant (γ*((1-α)/(1+α))) γ + have hα : 0<α := by norm_num [α] + have hα2 : α<1/2 := by norm_num [α] + have hγ : 0<γ := by norm_num [γ,α] + have hK : 0ENNReal.tsum_le_tsum (hpoint nt)) + _=ENNReal.ofReal C₀*(∑'nt : ℕ,∑'nr : ℕ, + if bb*(cappedRepresentative nt)^(-α)≤(cappedRepresentative nr)^(1-α) then + ENNReal.ofReal (min (aa*(cappedRepresentative nt)^(1-α)*(cappedRepresentative nr)^α) + (cc/(cappedRepresentative nt*cappedRepresentative nr))) else 0) := by + simp only [ENNReal.tsum_mul_left] + _≤ENNReal.ofReal C₀*ENNReal.ofReal (K*Real.sqrt (aa*cc/bb)) := by + apply mul_le_mul' le_rfl + convert spatial_transition_double_sum haa hbb hcc hα hα2 using 1 + congr 1 + dsimp only [K,γ] + ring + _= _ := by + rw [←ENNReal.ofReal_mul hC₀] + have he := spatial_crossing_datum_scale hP hI hp hφ hR.le + change Real.sqrt (aa*cc/bb)=32768*Real.sqrt I*R*p*φ at he + rw [he] + congr 1 + dsimp only [R,p,φ] + ring + +def bulkSelection (P M A w I : ℝ) : Set (Fin 4→ℕ) := + {k | cappedRepresentative (k 1)≤cappedRepresentative (k 2)/1024 ∧ + representativeSelected P M A w I k} + +lemma physicalCutoff_positive_source_floor {T r : ℝ} {v W n : Vec} {k : Fin 4→ℕ} + (hn : ‖n‖=1) + (hk : 0(hc i).symm + have hangle := bulkSelection_neighbor_aperture hj hnear + have hfloor := physicalCutoff_positive_source_floor (sphere_norm n) hkp + have hsource := (sourceRepresentative_mem_range (dyadicMultiFactor_positive_bands hkp 0) hP).2 + have hφ := cappedRepresentative_pos (k 2) + have hsector : k∈centralIndexSector P := ⟨hsource,by linarith,by linarith⟩ + refine ⟨k,hsector,?_,physicalCutoff_positive_closedBin ht ⟨hσ.1,hσ.2.le⟩ hband hkp⟩ + by_cases hs : cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) + · exact Or.inl hs + · right + refine ⟨?_,j,hj.2,hnear⟩ + intro hsel + apply hk + exact ⟨by linarith [lt_of_not_ge hs],hsel⟩ + +lemma bulkSelection_positive_smallSector {T P M A w I r : ℝ} {v W n : Vec} {k : Fin 4→ℕ} + (hn : ‖n‖=1) (hP : 1024*q v≤P) (hsel : k∈bulkSelection P M A w I) + (hk : 0(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J := by + obtain ⟨ht,htT,hσ,hb,hv,hd⟩ := F.partialCutoffTriangle_physical_nonzero zX + (bulkSelection P M A w I) H W hJT hband hP hp + exact bulkSelection_derivative_physical_cover (P:=P) (M:=M) (A:=A) (w:=w) (I:=I) + (V:=fun t=>(prefixFlow F.flow T zX t).2) (n:=p.1.2.2) ht htT hσ hb hv _ hd + +lemma bulkSelection_derivative_small_cover {T P M A w I t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (htT : t≤T) (hσ : σ∈Ico 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) {n : Sphere} {v : Vec} + (hP : 1024*q v≤P) (H : CutoffState) + (hd : fderiv ℝ (stateCutoff T (bulkSelection P M A w I)) (t-σ,n.1,v,V t) H≠0) : + ∃k∈representativeSmallSector P, + (cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) ∨ + representativeSpatialTransition P M A w I k) ∧ + ((t,σ,n),v)∈physicalBinPhaseSet V (representativeClosedBin T w k) J := by + have hr : 0(hc i).symm + have hangle := bulkSelection_neighbor_aperture hj hnear + have hfloor := physicalCutoff_positive_source_floor (sphere_norm n) hkp + have hsource := (sourceRepresentative_mem_range (dyadicMultiFactor_positive_bands hkp 0) hP).2 + have hφ := cappedRepresentative_pos (k 2) + have hsector : k∈representativeSmallSector P := ⟨hsource,hfloor,by linarith⟩ + refine ⟨k,hsector,?_,physicalCutoff_positive_closedBin ht ⟨hσ.1,hσ.2.le⟩ hband hkp⟩ + by_cases hs : cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) + · exact Or.inl hs + · right + refine ⟨?_,j,hj.2,hnear⟩ + intro hsel + apply hk + exact ⟨by linarith [lt_of_not_ge hs],hsel⟩ + +lemma PhaseFlowOn.bulkCutoffTriangle_small_support {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) + (H : ConeKernelState→CutoffState) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {p : TrianglePhase} (hp : partialCutoffTriangle s F.flow zX T (bulkSelection P M A w I) H W J p≠0) : + ∃k∈representativeSmallSector P, + (cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) ∨ + representativeSpatialTransition P M A w I k) ∧ + p∈physicalBinPhaseSet (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J := by + obtain ⟨ht,htT,hσ,hb,hv,hd⟩ := F.partialCutoffTriangle_physical_nonzero zX + (bulkSelection P M A w I) H W hJT hband hP hp + exact bulkSelection_derivative_small_cover (P:=P) (M:=M) (A:=A) (w:=w) (I:=I) + (V:=fun t=>(prefixFlow F.flow T zX t).2) (n:=p.1.2.2) ht htT hσ hb hv _ hd + +def bulkSourceBoundary (P M A w I : ℝ) : Set (Fin 4→ℕ) := + {k | k∈representativeSmallSector P ∧ + (cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) ∨ + representativeSpatialTransition P M A w I k)} + +lemma tsum_structuralCentralSector (P : ℝ) (f : (Fin 4→ℕ)→ℝ≥0∞) : + (∑'k,({k | k∈centralIndexSector P ∧ + cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)}).indicator f k)= + ∑'n : ℕ×ℕ,({n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2}).indicator + (fun n=>∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative n.2/16384≤cappedRepresentative nt ∧ + cappedRepresentative nt≤cappedRepresentative n.2/16 then f ![n.1,nt,n.2,nr] else 0) n := by + have he : ({k | k∈centralIndexSector P ∧ + cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)}).indicator f= + (centralIndexSector P).indicator (fun k=>if cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1) then f k else 0) := by + funext k + simp only [indicator_apply,mem_ofPred_eq] + split_ifs <;> simp_all + rw [he,tsum_centralIndexSector] + apply tsum_congr + intro n + by_cases hn : sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2 + · have hn' : n∈{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2} := hn + rw [indicator_of_mem hn',indicator_of_mem hn'] + apply tsum_congr + intro nt + apply tsum_congr + intro nr + split_ifs <;> simp_all + · have hn' : n∉{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2} := hn + rw [indicator_of_notMem hn',indicator_of_notMem hn'] + +lemma Admissible.bulk_source_good_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'k : Fin 4→ℕ,(bulkSourceBoundary P M A w I).indicator + (fun k=>representativeGoodCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hstruct⟩ := hd.good_structural_uniform T₀ + obtain ⟨Cu,hCu,hunsel⟩ := hd.unselected_good_uniform T₀ + refine ⟨Cs+Cu,add_nonneg hCs hCu,?_⟩ + intro M A hM hA + filter_upwards [hunsel M A (zero_lt_one.trans_le hM) hA] with P hu + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsource HZ + let f := fun k=>representativeGoodCost s F zX w k a b + let S := {k | k∈centralIndexSector P ∧ cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)} + let U := {k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hPB : P*Real.sqrt I≤B := le_add_of_nonneg_right (by positivity) + have hbnd : (∑'k,(bulkSourceBoundary P M A w I).indicator f k)≤ + (∑'k,S.indicator f k)+(∑'k,U.indicator f k) := by + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈bulkSourceBoundary P M A w I + · rw [indicator_of_mem hk] + rcases hk.2 with hstr|htr + · have hks : k∈S := ⟨representativeSmallSector_subset_centralIndexSector P hk.1,hstr⟩ + rw [indicator_of_mem hks] + exact le_add_right le_rfl + · have hku : k∈U := ⟨hk.1,htr.1⟩ + rw [indicator_of_mem hku] + exact le_add_left le_rfl + · rw [indicator_of_notMem hk] + exact bot_le + have hst : (∑'k,S.indicator f k)≤ENNReal.ofReal (Cs*B) := by + rw [show S={k | k∈centralIndexSector P ∧ cappedRepresentative (k 2)/16384≤cappedRepresentative (k 1)} by rfl, + tsum_structuralCentralSector] + exact hstruct M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + have hun : (∑'k,U.indicator f k)≤ENNReal.ofReal (Cu*(P*Real.sqrt I)) := by + simpa only [mul_assoc] using hu s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI + (zero_lt_one.trans_le hw) hsource HZ + apply hbnd.trans + calc + _≤ENNReal.ofReal (Cs*B)+ENNReal.ofReal (Cu*(P*Real.sqrt I)) := add_le_add hst hun + _≤ENNReal.ofReal (Cs*B)+ENNReal.ofReal (Cu*B) := add_le_add le_rfl + (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hPB hCu)) + _=ENNReal.ofReal ((Cs+Cu)*B) := by + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (mul_nonneg hCu hB)]; congr 1; ring + +lemma PhaseFlowOn.bulkSource_density {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {J : Set ℝ} (hJT : J⊆Icc 0 T) + (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈J,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (k : Fin 4→ℕ) (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) + {z : ConeCoordinate} (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J) : + (∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneSourceCutoffTangent s F.flow zX) W J (z,v)‖)≤ + ENNReal.ofReal ((99840000*C)*(cappedRepresentative (k 2)/(sourceRepresentative (k 0)*(cappedRepresentative (k 1))^2)))* + (ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal (prefixConeGood s T (fun t=>(prefixFlow F.flow T zX t).1) z)* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2)+ + ENNReal.ofReal ((99840000*C)*(cappedRepresentative (k 2)/sourceRepresentative (k 0)))* + (ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal (prefixConeMagnetic s T (fun t=>(prefixFlow F.flow T zX t).1) z)* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2) := by + have hθ := cappedRepresentative_pos (k 1) + have hφ := cappedRepresentative_pos (k 2) + have hp : 0(prefixFlow F.flow T zX t).1) z + let m := prefixConeMagnetic s T (fun t=>(prefixFlow F.flow T zX t).1) z + have hu : 0≤u := by dsimp [u]; positivity + have hv : 0≤v := by dsimp [v]; positivity + have hg : 0≤g := add_nonneg (norm_nonneg _) (abs_nonneg _) + have hm : 0 ≤ m := norm_nonneg _ + have hc : 0≤99840000*C := by positivity + have hcoeff : 0≤(99840000*C)*(z.1-z.2.1)*(u*g+v*m) := by positivity + have hb : (∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q (coneSourceCutoffTangent s F.flow zX) W J (z,v)‖)≤ + ENNReal.ofReal ((99840000*C)*(z.1-z.2.1)*(u*g+v*m))* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2 := by + unfold physicalBinDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro vv hvv + rw [←ENNReal.ofReal_mul hcoeff] + exact ENNReal.ofReal_le_ofReal (F.bulkSource_pointwise hs zX Q hJT W hW hC0 hC k hsmall hz hvv) + apply hb.trans_eq + change ENNReal.ofReal ((99840000*C)*(z.1-z.2.1)*(u*g+v*m))*_ = + ENNReal.ofReal ((99840000*C)*u)*(ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal g*_)+ + ENNReal.ofReal ((99840000*C)*v)*(ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal m*_) + rw [ENNReal.ofReal_mul (mul_nonneg hc hr),ENNReal.ofReal_add (mul_nonneg hu hg) (mul_nonneg hv hm), + ENNReal.ofReal_mul hu,ENNReal.ofReal_mul hv,ENNReal.ofReal_mul hc, + ENNReal.ofReal_mul hc,ENNReal.ofReal_mul hc] + ring + +lemma PhaseFlowOn.bulkSource_bin_integral {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {a b : ℝ} (ha : 0≤a) (hb : b≤T) + (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈Icc a b,‖W t‖≤1) + {C : ℝ} (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (k : Fin 4→ℕ) (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) : + (∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖partialCutoffTriangle s F.flow zX T Q + (coneSourceCutoffTangent s F.flow zX) W (Icc a b) (z,v)‖ + ∂volume ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal (99840000*C)*(representativeGoodCost s F zX w k a b+ + representativeMagneticCost s F zX w k a b) := by + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hX : Measurable (fun t=>(prefixFlow F.flow T zX t).1) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).fst.measurable + have hN := physicalBinDensity_aemeasurable hs hT hX hV (representativeClosedBin T w k) + measurableSet_Icc (Icc_subset_Icc ha hb) + have hG := hs.measurable_prefixConeGood hT hX + have hr : Measurable (fun z : ConeCoordinate=>ENNReal.ofReal (z.1-z.2.1)) := + (measurable_fst.sub measurable_snd.fst).ennreal_ofReal + have hcost := fun z hz=>F.bulkSource_density (w:=w) hs zX Q (Icc_subset_Icc ha hb) W hW hC0 hC k hsmall (z:=z) hz + have hbnd := setLIntegral_mono' (μ:=volume.prod (volume.prod sphereMeasure)) + (measurableSet_physicalBinBase hV (representativeClosedBin T w k) measurableSet_Icc) hcost + apply hbnd.trans_eq + unfold physicalBinMeasure at hN + have hGN : AEMeasurable (fun z : ConeCoordinate=> + ENNReal.ofReal ((99840000*C)*(cappedRepresentative (k 2)/(sourceRepresentative (k 0)*(cappedRepresentative (k 1))^2)))* + (ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal (prefixConeGood s T (fun t=>(prefixFlow F.flow T zX t).1) z)* + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2)) + ((volume.prod (volume.prod sphereMeasure)).restrict + (physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))) := by + exact (((hr.mul hG.ennreal_ofReal).aemeasurable.mul hN).const_mul _) + rw [lintegral_add_left' hGN, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top,lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + unfold representativeGoodCost representativeMagneticCost + dsimp only + rw [ENNReal.ofReal_mul (by positivity : 0≤99840000*C),ENNReal.ofReal_mul (by positivity : 0≤99840000*C),mul_add] + simp only [mul_assoc,physicalBinMeasure] + +lemma Admissible.spatial_transition_regular_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 ∧ + regularCentralIndex P M A I w ![n.1,nt,n.2,nr] ∧ + representativeSpatialTransition P M A w I ![n.1,nt,n.2,nr] then + representativeSpatialCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.regular_spatial_transition_pair_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A hM hA + filter_upwards [hcentral M A hM hA] with P hc + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 ∧ + regularCentralIndex P M A I w ![n.1,nt,n.2,nr] ∧ + representativeSpatialTransition P M A w I ![n.1,nt,n.2,nr] then + representativeSpatialCost s F zX w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if cappedRepresentative nt≤cappedRepresentative n.2/16 ∧ + regularCentralIndex P M A I w ![n.1,nt,n.2,nr] ∧ + representativeSpatialTransition P M A w I ![n.1,nt,n.2,nr] then + representativeSpatialCost s F zX w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA.le hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hc s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hab hI hJI hw hsource HZ + _=ENNReal.ofReal (Cc*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn hCc + simpa only [mul_assoc] using hh) + + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +lemma spatial_exception_radial_sum {P I p θ φ : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC]; congr 1; ring + simp_rw [he] + rw [ENNReal.tsum_mul_left] + calc + _≤ENNReal.ofReal (I*p^3*θ*φ^3)*ENNReal.ofReal (2*(1/P^2)) := + mul_le_mul' le_rfl (capped_linear_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma spatial_exception_angle_radial_sum {P I p φ : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC]; congr 1; ring + _≤ENNReal.ofReal (2*I*p^3/P^2*φ^3)*ENNReal.ofReal (2*φ) := + mul_le_mul' le_rfl (capped_linear_tail_sum hφ) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +lemma spatial_exception_triple_sum {P I p w : ℝ} (hP : 0 simp [←ENNReal.ofReal_mul hC] + _≤ENNReal.ofReal (4*I*p^3/P^2)*ENNReal.ofReal (2*(512/min p w)^4) := + mul_le_mul' le_rfl (capped_fourth_tail_sum (by positivity)) + _=_ := by rw [←ENNReal.ofReal_mul hC]; congr 1; ring + +noncomputable def representativeExceptionSpatialCost (s : Solution) {T : ℝ} (F : PhaseFlowOn s.E s.B T) + (zX : Phase) (P M A I w : ℝ) (k : Fin 4→ℕ) (a b : ℝ) : ℝ≥0∞ := by + classical + exact if regularCentralIndex P M A I w k then 0 else representativeSpatialCost s F zX w k a b + +lemma Admissible.representative_exception_spatial_triple_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0

ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt))) + _=ENNReal.ofReal Cn*(∑'nf : ℕ,if cappedRepresentative nf≤512/min p w then + ∑'nt : ℕ,if cappedRepresentative nt≤cappedRepresentative nf then + ∑'nr : ℕ,if cappedRepresentative nr≤1/P^2 then + ENNReal.ofReal (I*cappedRepresentative nr*p^3*cappedRepresentative nt*(cappedRepresentative nf)^3) + else 0 else 0 else 0) := by + simp only [ENNReal.tsum_mul_left] + congr 1 + apply tsum_congr + intro nf + split_ifs with hf + · apply tsum_congr + intro nt + split_ifs with ht <;> simp only [tsum_zero] + · simp only [tsum_zero] + _≤ENNReal.ofReal Cn*ENNReal.ofReal (8*I*p^3/P^2*(512/min p w)^4) := + mul_le_mul' le_rfl (spatial_exception_triple_sum hP hI.le hp hw) + _=_ := by rw [←ENNReal.ofReal_mul hCn]; congr 1; dsimp only [p]; ring + +lemma Admissible.spatial_exception_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + 0≤a → b≤T → 0∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionSpatialCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cn,hCn,hnear⟩ := hd.representative_exception_spatial_triple_sum T₀ + have hpc := pairCountConstant_pos + refine ⟨2*512^4*Cn*pairCountConstant,by positivity,?_⟩ + intro M A P hM hP hL s T F hs hT hTT zX a b I w ha hb hI hJI hw hwP + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative nf/16 then + representativeExceptionSpatialCost s F zX P M A I w ![np,nt,nf,nr] a b else 0 + let D := 2*512^4*Cn*I*P^2/w + have hP0 : 0

∑'nt : ℕ,∑'nr : ℕ, + if cappedRepresentative nt≤cappedRepresentative n.2/16 then + representativeExceptionSpatialCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + obtain ⟨N,hN,hidx⟩ := exists_small_pair_count hP hL + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have hsub : U⊆Finset.range N := by + intro np hn + have hpn : 1/sourceRepresentative np≤cappedRepresentative 0 := by + rw [show cappedRepresentative 0=1 by rfl] + exact (div_le_one (zero_lt_one.trans_le (sourceRepresentative_one_le _))).mpr (sourceRepresentative_one_le _) + exact Finset.mem_range.mpr (hidx np 0 (hU np hn) hpn).1 + have hcard : (U.card:ℝ)≤pairCountConstant*Real.log (2+P) := by + have hh : (U.card:ℝ)≤N := by exact_mod_cast (Finset.card_le_card hsub).trans_eq (Finset.card_range N) + exact hh.trans hN + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal D := Finset.sum_le_sum (fun np hn=>hgb np (hU np hn)) + _=ENNReal.ofReal ((U.card:ℝ)*D) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun _ _=>hD)] + simp + _≤ENNReal.ofReal ((pairCountConstant*Real.log (2+P))*D) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hcard hD) + _=_ := by congr 1; dsimp [D]; ring + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma Admissible.spatial_transition_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {k | k∈centralIndexSector P ∧ representativeSpatialTransition P M A w I k} + (∑'k : Fin 4→ℕ,Q.indicator (fun k=>representativeSpatialCost s F zX w k a b) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cr,hCr,hregular⟩ := hd.spatial_transition_regular_uniform T₀ + obtain ⟨Ce,hCe,hexcept⟩ := hd.spatial_exception_uniform T₀ + refine ⟨Cr+Ce,by positivity,?_⟩ + intro M A hM hA + filter_upwards [hregular M A (zero_lt_one.trans_le hM) hA] with P hr + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP hsource HZ + dsimp only + let Q := {k | k∈centralIndexSector P ∧ representativeSpatialTransition P M A w I k} + let fs := fun k=>representativeSpatialCost s F zX w k a b + let fr := fun k=>if regularCentralIndex P M A I w k ∧ representativeSpatialTransition P M A w I k then fs k else 0 + let fe := fun k=>representativeExceptionSpatialCost s F zX P M A I w k a b + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let V := I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hV : 0≤V := by dsimp [V]; positivity + have hVB : V≤B := by + have hroot := Real.sqrt_nonneg A + have ht : V≤(M+Real.sqrt A)*V := le_mul_of_one_le_left hV (by linarith) + calc + V≤(M+Real.sqrt A)*V := ht + _≤P*Real.sqrt I+(M+Real.sqrt A)*V := le_add_of_nonneg_left (by positivity) + _=B := by dsimp [B,V]; ring + have hpoint (k : Fin 4→ℕ) : Q.indicator fs k≤ + (centralIndexSector P).indicator fr k+(centralIndexSector P).indicator fe k := by + by_cases hk : k∈Q + · rw [indicator_of_mem hk,indicator_of_mem hk.1,indicator_of_mem hk.1] + by_cases hreg : regularCentralIndex P M A I w k + · have hh : regularCentralIndex P M A I w k ∧ representativeSpatialTransition P M A w I k := ⟨hreg,hk.2⟩ + change fs k ≤ (if regularCentralIndex P M A I w k ∧ representativeSpatialTransition P M A w I k then fs k else 0)+fe k + rw [ite_eq_left hh] + exact le_add_of_nonneg_right bot_le + · have he : fe k=fs k := by simp [fe,fs,representativeExceptionSpatialCost,hreg] + rw [he] + exact le_add_of_nonneg_left bot_le + · rw [indicator_of_notMem hk] + exact bot_le + have hreg : (∑'k,(centralIndexSector P).indicator fr k)≤ENNReal.ofReal (Cr*B) := by + rw [tsum_centralIndexSector] + have hh := hr hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI + (zero_lt_one.trans_le hw) hwP hsource HZ + apply le_of_eq_of_le _ hh + apply tsum_congr + intro n + by_cases hn : n∈{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2} + · rw [indicator_of_mem hn,indicator_of_mem hn] + apply tsum_congr + intro nt + apply tsum_congr + intro nr + simp only [fr,fs,ite_and] + · rw [indicator_of_notMem hn,indicator_of_notMem hn] + have he : (∑'k,(centralIndexSector P).indicator fe k)≤ENNReal.ofReal (Ce*V) := by + rw [tsum_centralIndexSector] + exact hexcept M A P hM hP hL s T F hs hT hTT zX a b I w ha hb hI hJI hw hwP + change (∑'k,Q.indicator fs k)≤ENNReal.ofReal ((Cr+Ce)*B) + calc + _≤∑'k,((centralIndexSector P).indicator fr k+(centralIndexSector P).indicator fe k) := + ENNReal.tsum_le_tsum hpoint + _=(∑'k,(centralIndexSector P).indicator fr k)+(∑'k,(centralIndexSector P).indicator fe k) := ENNReal.tsum_add + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*V) := add_le_add hreg he + _≤ENNReal.ofReal (Cr*B)+ENNReal.ofReal (Ce*B) := + add_le_add le_rfl (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hVB hCe)) + _=_ := by rw [←ENNReal.ofReal_add (by positivity) (by positivity)]; congr 1; ring + +lemma PhaseFlowOn.bulkRemainder_selected_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (hw : 0representativeCentralCost s F zX w k a b) k)+ + ENNReal.ofReal 15424*(∑'k : Fin 4→ℕ,({k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k}).indicator + (fun k=>representativeReceiverCost s F zX w k a b (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)) k) := by + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + have hV : Measurable (fun time=>(prefixFlow F.flow T zX time).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hcover : ∀point,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T + (bulkSelection P M A w I) (remainderConeKernel s F.flow zX) W (Icc a b) point‖≠0→ + ∃index∈Q,point∈physicalBinPhaseSet (fun time=>(prefixFlow F.flow T zX time).2) + (representativeClosedBin T w index) (Icc a b) := by + intro point hnonzero + have htriangle : selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) + (remainderConeKernel s F.flow zX) W (Icc a b) point≠0 := by + intro hzero + exact hnonzero (by rw [hzero,norm_zero,ENNReal.ofReal_zero]) + have htime : point.1.1∈Icc a b := by + by_contra houtside + exact htriangle (by simp only [selectedConeTriangle,indicator_of_notMem houtside,zero_apply]) + have hdomain : point∈trianglePhaseDomain T := by + by_contra houtside + exact htriangle (by simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem houtside,map_zero]) + have hdensity : s.f ((triangleKernelState F.flow zX point).1.2, + (triangleKernelState F.flow zX point).2.2)≠0 := by + intro hzero + apply htriangle + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hdomain,hzero, + zero_smul,smul_zero,map_zero] + have hcutoff : stateCutoff T (bulkSelection P M A w I) + (coneCutoffState F.flow zX (triangleKernelState F.flow zX point))≠0 := by + intro hzero + apply htriangle + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hdomain,selectedConeKernel, + hzero,zero_smul,smul_zero,map_zero] + have hprefix : (prefixFlow F.flow T zX point.1.1).2=(F.flow zX point.1.1).2 := by + simp only [prefixFlow,prefixClamp_eq (Icc_subset_Icc ha hb htime)] + change stateCutoff T (bulkSelection P M A w I) + (point.1.1-point.1.2.1,point.1.2.2.1,point.2,(F.flow zX point.1.1).2)≠0 at hcutoff + rw [←hprefix] at hcutoff + obtain ⟨index,hindex,hpositive⟩ := selectedDyadicCutoff_active hcutoff + have hmomentum : 1024*q point.2≤P := hP point.1.2.1 + ⟨hdomain.2.1.le,hdomain.2.2.le.trans hdomain.1.2.le⟩ + ((triangleKernelState F.flow zX point).2.2) hdensity + refine ⟨index,⟨bulkSelection_positive_smallSector (sphere_norm point.1.2.2) + hmomentum hindex hpositive,hindex.2⟩,?_⟩ + exact physicalCutoff_positive_closedBin htime ⟨hdomain.2.1.le,hdomain.2.2.le⟩ + (by rw [hprefix]; exact hband _ htime) hpositive + apply (physicalBinPhase_cover_lintegral hV measurableSet_Icc T w Q + (F.selectedConeTriangle_measurable hs zX (bulkSelection P M A w I) + ((F.normalised_remainder_continuousOn hs zX).mono inter_subset_left) + hW measurableSet_Icc).norm.ennreal_ofReal hcover).trans + rw [←ENNReal.tsum_mul_left,←ENNReal.tsum_mul_left,←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · rw [indicator_of_mem hk,indicator_of_mem hk, + indicator_of_mem (representativeSmallSector_subset_centralIndexSector P hk.1)] + exact F.bulkRemainder_bin_integral hs hT zX hw _ ha hb W hW1 k hk.1.2.2 + · rw [indicator_of_notMem hk] + exact bot_le + +lemma Admissible.bulk_remainder_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + ∀ W : ℝ→Vec→L[ℝ]Vec,Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) + (remainderConeKernel s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w))+ + ENNReal.ofReal (C*w^(-1/2:ℝ))*(∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := by + obtain ⟨Cc,hCc,hcentral⟩ := hd.central_uniform T₀ + obtain ⟨Cr,hCr,hreceiver⟩ := hd.selected_receiver_uniform T₀ + let C := 147*Cc+15424*Cr + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro M A hM hA + filter_upwards [hreceiver M A (zero_lt_one.trans_le hM) hA, + eventually_ge_atTop (1:ℝ),eventually_ge_atTop (Real.exp 1)] with P hr hP he + have hL : 1≤Real.log (2+P) := by + calc + 1=Real.log (Real.exp 1) := (Real.log_exp 1).symm + _≤Real.log (2+P) := Real.log_le_log (Real.exp_pos 1) (by linarith) + intro s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP hIP HZ hphysical hband W hW hW1 + have hc := hcentral M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only at hc + rw [←tsum_centralIndexSector P (fun k=>representativeCentralCost s F zX w k a b)] at hc + have hg := (F.continuous_prefixMomentumForce hs.energyPrefix hT zX).norm.measurable.ennreal_ofReal + have hr' := hr s T F hs hT hTT zX a b I w + (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) ha hb hw hwP hI hIP hg + (fun _=>ENNReal.ofReal_ne_top) + apply (F.bulkRemainder_selected_sum hs.energyPrefix hT zX (zero_lt_one.trans_le hw) + ha hb hband hphysical hW hW1).trans + apply (add_le_add (mul_le_mul' le_rfl hc) (mul_le_mul' le_rfl hr')).trans + rw [←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤147)] + apply add_le_add + · apply ENNReal.ofReal_le_ofReal + have hB : 0≤P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w := by positivity + dsimp [C] + nlinarith [mul_nonneg (by positivity : 0≤15424*Cr) hB] + · rw [←mul_assoc,←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤15424)] + apply mul_le_mul' _ le_rfl + apply ENNReal.ofReal_le_ofReal + have hn := Real.rpow_nonneg (zero_le_one.trans hw) (-1/2:ℝ) + dsimp [C] + nlinarith [mul_nonneg (by positivity : 0≤147*Cc) hn] + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma PhaseFlowOn.bulkRate_selected_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (hI : 0I⁻¹ • normalisedRatePrimitive F.flow zX p) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal 52*(∑'k : Fin 4→ℕ,({k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k}).indicator + (fun k=>representativeTimeWeightCost s F zX w I k a b) k) := by + let Q := {k | k∈representativeSmallSector P ∧ representativeSelected P M A w I k} + have hK : ContinuousOn (fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) (coneKernelInterior T) := + (continuousOn_const : ContinuousOn (fun _ : ConeKernelState=>I⁻¹) (coneKernelInterior T)).smul + ((F.normalisedRatePrimitive_continuousOn zX).mono inter_subset_left) + have hV : Measurable (fun time=>(prefixFlow F.flow T zX time).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hcover : ∀point,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T + (bulkSelection P M A w I) (fun state=>I⁻¹ • normalisedRatePrimitive F.flow zX state) + W (Icc a b) point‖≠0→ + ∃index∈Q,point∈physicalBinPhaseSet (fun time=>(prefixFlow F.flow T zX time).2) + (representativeClosedBin T w index) (Icc a b) := by + intro point hnonzero + have htriangle : selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) + (fun state=>I⁻¹ • normalisedRatePrimitive F.flow zX state) W (Icc a b) point≠0 := by + intro hzero + exact hnonzero (by rw [hzero,norm_zero,ENNReal.ofReal_zero]) + have htime : point.1.1∈Icc a b := by + by_contra houtside + exact htriangle (by simp only [selectedConeTriangle,indicator_of_notMem houtside,zero_apply]) + have hdomain : point∈trianglePhaseDomain T := by + by_contra houtside + exact htriangle (by simp only [selectedConeTriangle,triangleConeKernel,indicator_of_notMem houtside,map_zero]) + have hdensity : s.f ((triangleKernelState F.flow zX point).1.2, + (triangleKernelState F.flow zX point).2.2)≠0 := by + intro hzero + apply htriangle + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hdomain,hzero, + zero_smul,smul_zero,map_zero] + have hcutoff : stateCutoff T (bulkSelection P M A w I) + (coneCutoffState F.flow zX (triangleKernelState F.flow zX point))≠0 := by + intro hzero + apply htriangle + simp only [selectedConeTriangle,triangleConeKernel,indicator_of_mem hdomain,selectedConeKernel, + hzero,zero_smul,smul_zero,map_zero] + have hprefix : (prefixFlow F.flow T zX point.1.1).2=(F.flow zX point.1.1).2 := by + simp only [prefixFlow,prefixClamp_eq (Icc_subset_Icc ha hb htime)] + change stateCutoff T (bulkSelection P M A w I) + (point.1.1-point.1.2.1,point.1.2.2.1,point.2,(F.flow zX point.1.1).2)≠0 at hcutoff + rw [←hprefix] at hcutoff + obtain ⟨index,hindex,hpositive⟩ := selectedDyadicCutoff_active hcutoff + have hmomentum : 1024*q point.2≤P := hP point.1.2.1 + ⟨hdomain.2.1.le,hdomain.2.2.le.trans hdomain.1.2.le⟩ + ((triangleKernelState F.flow zX point).2.2) hdensity + refine ⟨index,⟨bulkSelection_positive_smallSector (sphere_norm point.1.2.2) + hmomentum hindex hpositive,hindex.2⟩,?_⟩ + exact physicalCutoff_positive_closedBin htime ⟨hdomain.2.1.le,hdomain.2.2.le⟩ + (by rw [hprefix]; exact hband _ htime) hpositive + apply (physicalBinPhase_cover_lintegral hV measurableSet_Icc T w Q + (F.selectedConeTriangle_measurable hs zX (bulkSelection P M A w I) + hK hW measurableSet_Icc).norm.ennreal_ofReal hcover).trans + rw [←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈Q + · rw [indicator_of_mem hk,indicator_of_mem hk] + exact F.bulkRate_bin_integral hs hT zX hI _ ha hb W hW1 k hk.1.2.2 + · rw [indicator_of_notMem hk,indicator_of_notMem hk,mul_zero] + +lemma Admissible.bulk_rate_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃ C : ℝ,0≤C ∧ ∀ M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + ∀ W : ℝ→Vec→L[ℝ]Vec,Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I) + (fun p=>I⁻¹ • normalisedRatePrimitive F.flow zX p) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Ct,hCt,htime⟩ := hd.selected_time_weight_uniform T₀ + refine ⟨52*Ct,by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP HZ hphysical hband W hW hW1 + apply (F.bulkRate_selected_sum hs.energyPrefix hT zX hI ha hb hband hphysical hW hW1).trans + apply (mul_le_mul' le_rfl (htime M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI hw hwP HZ)).trans + rw [←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤52)] + exact le_of_eq (congrArg ENNReal.ofReal (by ring)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SphericalFluxNorm.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SphericalFluxNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b044aee1653995a0ad33dbe4be5e4fec88f5be2 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SphericalFluxNorm.lean @@ -0,0 +1,227 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeRadius + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma spherical_flux_norm_le {F : Vec → Vec} {ε C : ℝ} (hε : 0<ε) + (hF : ∀ z : Vec, ‖z‖=ε → ‖F z‖≤C/ε) : + ‖∫ n : Sphere, ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure‖ ≤ C*ε*(4*Real.pi) := by + have hb (n : Sphere) : ‖ε^2*dot n.1 (F (ε • n.1))‖≤C*ε := by + have hn : ‖ε • n.1‖=ε := by rw [norm_smul,Real.norm_of_nonneg hε.le,sphere_norm,mul_one] + have hd : ‖dot n.1 (F (ε • n.1))‖≤C/ε := by + calc + _ ≤ ‖n.1‖*‖F (ε • n.1)‖ := by + simpa only [dot_eq_inner,Real.norm_eq_abs] using abs_real_inner_le_norm (n.1 : Vec) (F (ε • n.1)) + _ ≤ C/ε := by rw [sphere_norm,one_mul]; exact hF _ hn + rw [norm_mul,Real.norm_of_nonneg (sq_nonneg ε)] + calc + ε^2*‖dot n.1 (F (ε • n.1))‖≤ε^2*(C/ε) := mul_le_mul_of_nonneg_left hd (sq_nonneg ε) + _ = C*ε := by field_simp [hε.ne'] + simpa only [sphere_area] using (norm_integral_le_of_norm_le_const (μ := sphereMeasure) (ae_of_all _ hb)) + +lemma spherical_flux_tendsto_zero {F : Vec → Vec} {R C : ℝ} (hR : 0 ∫ n : Sphere, ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure) + (𝓝[>] (0:ℝ)) (𝓝 0) := by + apply squeeze_zero_norm' (a:=fun ε => C*ε*(4*Real.pi)) + · filter_upwards [Ioo_mem_nhdsGT hR] with ε hε + apply spherical_flux_norm_le hε.1 + intro z hz + simpa only [hz] using hF z (by rw [hz]; exact hε.1) (by rw [hz]; exact hε.2) + · simpa using ((tendsto_const_nhds.mul (tendsto_id.mono_left nhdsWithin_le_nhds)).mul_const (4*Real.pi) : + Tendsto (fun ε : ℝ => C*ε*(4*Real.pi)) (𝓝[>] (0:ℝ)) (𝓝 (C*0*(4*Real.pi)))) + +lemma fderiv_norm_apply_rvm {z : Vec} (hz : z≠0) (w : Vec) : + fderiv ℝ (fun y : Vec => ‖y‖) z w=dot z w/‖z‖ := by + have hc : HasDerivAt (fun r : ℝ => z+r • w) w 0 := by + have hh := (hasDerivAt_const (0:ℝ) z).add ((hasDerivAt_id (0:ℝ)).smul_const w) + change HasDerivAt (fun r : ℝ => z+r • w) (0+(1:ℝ) • w) 0 at hh + simpa only [zero_add,one_smul] using hh + have hd : HasFDerivAt (fun y : Vec => ‖y‖) (fderiv ℝ (fun y : Vec => ‖y‖) z) (z+(0:ℝ) • w) := by + simpa using (differentiableAt_id.norm ℝ hz).hasFDerivAt + have hn := hd.comp_hasDerivAt (0:ℝ) hc + have hm := hasDerivAt_norm_nonzero hc (by simpa using hz) + simpa using hn.unique hm + +lemma fderiv_conePotential_apply {ρ : ℝ × Vec → ℝ} {t : ℝ} {x z : Vec} + (hρ : DifferentiableAt ℝ ρ (t-‖z‖,x+z)) (hz : z≠0) (w : Vec) : + fderiv ℝ (fun y : Vec => ρ (t-‖y‖,x+y)/‖y‖) z w = + fderiv ℝ ρ (t-‖z‖,x+z) (0,w)/‖z‖ - + dot z w/‖z‖^2 * dirD ρ (1,0) (t-‖z‖,x+z) - + dot z w/‖z‖^3 * ρ (t-‖z‖,x+z) := by + have hn : DifferentiableAt ℝ (fun y : Vec => ‖y‖) z := differentiableAt_id.norm ℝ hz + have hi := ((hasFDerivAt_const t z).sub hn.hasFDerivAt).prodMk + ((hasFDerivAt_const x z).add (hasFDerivAt_id z)) + have hp := hρ.hasFDerivAt.comp z hi + have hh := hp.mul ((hasFDerivAt_inv (norm_ne_zero_iff.mpr hz)).comp z hn.hasFDerivAt) + change HasFDerivAt (fun y : Vec => ρ (t-‖y‖,x+y)*‖y‖⁻¹) _ z at hh + simp_rw [div_eq_mul_inv] at ⊢ + rw [hh.fderiv] + simp only [smul_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply, + add_apply,ContinuousLinearMap.id_apply, + smul_eq_mul,zero_sub,zero_add,neg_apply,fderiv_norm_apply_rvm hz,ContinuousLinearMap.toSpanSingleton_apply] + have he : (- (dot z w/‖z‖),w) = ((0:ℝ),w)-(dot z w/‖z‖) • ((1:ℝ),(0:Vec)) := by ext <;> simp + rw [he,map_sub,map_smul] + unfold dirD + simp only [smul_eq_mul,Function.comp_apply,Pi.add_apply,Pi.sub_apply,id_eq] + field_simp [norm_ne_zero_iff.mpr hz] + ring + +lemma divergence_conePotential {ρ : ℝ × Vec → ℝ} {t : ℝ} {x z : Vec} + (hρ : DifferentiableAt ℝ ρ (t-‖z‖,x+z)) (hz : z≠0) (i : Fin 3) : + divergence (fun y : Vec => (ρ (t-‖y‖,x+y)/‖y‖) • basis i) z = + dirD ρ (0,basis i) (t-‖z‖,x+z)/‖z‖ - + z i/‖z‖^2 * dirD ρ (1,0) (t-‖z‖,x+z) - + z i/‖z‖^3 * ρ (t-‖z‖,x+z) := by + have hn : DifferentiableAt ℝ (fun y : Vec => ‖y‖) z := differentiableAt_id.norm ℝ hz + have harg : DifferentiableAt ℝ (fun y : Vec => (t-‖y‖,x+y)) z := + ((differentiableAt_const t).sub hn).prodMk ((differentiableAt_const x).add differentiableAt_id) + have hg : DifferentiableAt ℝ (fun y : Vec => ρ (t-‖y‖,x+y)/‖y‖) z := + by + have hp : DifferentiableAt ℝ (fun y : Vec => ρ (t-‖y‖,x+y)) z := hρ.comp z harg + exact (hp.hasFDerivAt.mul ((hasFDerivAt_inv (norm_ne_zero_iff.mpr hz)).comp z hn.hasFDerivAt)).differentiableAt + rw [divergence_smul hg (differentiableAt_const _),divergence_const_rvm,mul_zero,add_zero, + dot_gradient_direction,fderiv_conePotential_apply hρ hz] + simp [dot,basis,dirD] + +lemma integrableOn_ball_div_norm_pow {g : Vec → ℝ} (hg : Continuous g) + (k : ℕ) (hk : k<3) (R : ℝ) : + IntegrableOn (fun z : Vec => g z/‖z‖^k) (ball (0:Vec) R) := by + obtain ⟨C,hC⟩ := ((isCompact_closedBall (0:Vec) R).image hg).isBounded.exists_norm_le + apply integrableOn_ball_of_norm_le_rpow (by simp) (α:=(k:ℝ)) (C:=C) (by simpa using hk) + · apply ae_restrict_of_forall_mem measurableSet_ball + intro z hz + have hh := hC _ ⟨z,ball_subset_closedBall hz,rfl⟩ + rw [norm_div,norm_pow,norm_norm,Real.rpow_neg (norm_nonneg z),Real.rpow_natCast,div_eq_mul_inv] + exact mul_le_mul_of_nonneg_right hh (inv_nonneg.mpr (pow_nonneg (norm_nonneg z) k)) + · exact (hg.measurable.div (continuous_norm.pow k).measurable).aestronglyMeasurable + +lemma norm_direction_coord_le (z : Vec) (i : Fin 3) : ‖z i/‖z‖‖≤1 := by + by_cases hz : z=0 + · simp [hz] + rw [norm_div,norm_norm,div_le_one (norm_pos_iff.mpr hz)] + exact PiLp.norm_apply_le z i + +lemma integrableOn_ball_direction_div_norm_pow {g : Vec → ℝ} (hg : Continuous g) + (k : ℕ) (hk : k<3) (R : ℝ) (i : Fin 3) : + IntegrableOn (fun z : Vec => z i/‖z‖^(k+1)*g z) (ball (0:Vec) R) := by + have hm : Measurable (fun z : Vec => z i/‖z‖) := (PiLp.continuous_apply 2 _ i).measurable.div continuous_norm.measurable + have hi := (integrableOn_ball_div_norm_pow hg k hk R).bdd_mul + hm.aestronglyMeasurable (ae_of_all _ (fun z => norm_direction_coord_le z i)) + apply hi.congr + filter_upwards [] with z + simp only [pow_succ,div_eq_mul_inv,mul_inv_rev] + ring + +lemma contDiffAt_conePotential {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (t : ℝ) (x : Vec) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ ∞ (fun y : Vec => ρ (t-‖y‖,x+y)/‖y‖) z := by + have hn : ContDiffAt ℝ ∞ (fun y : Vec => ‖y‖) z := contDiffAt_id.norm ℝ hz + have hp : ContDiffAt ℝ ∞ (fun y : Vec => ρ (t-‖y‖,x+y)) z := + hρ.contDiffAt.comp z ((contDiffAt_const.sub hn).prodMk (contDiffAt_const.add contDiffAt_id)) + exact hp.div hn (norm_ne_zero_iff.mpr hz) + +lemma integrable_conePotential_divergence {ρ : ℝ × Vec → ℝ} + (hρ : ContDiff ℝ ∞ ρ) (t : ℝ) (x : Vec) (i : Fin 3) : + IntegrableOn (divergence (fun y : Vec => (ρ (t-‖y‖,x+y)/‖y‖) • basis i)) + (ball (0:Vec) t) := by + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + have hi₁ := integrableOn_ball_div_norm_pow ((contDiff_dirD hρ (0,basis i)).continuous.comp harg) + 1 (by norm_num) t + have hi₂ := integrableOn_ball_direction_div_norm_pow ((contDiff_dirD hρ (1,0)).continuous.comp harg) + 1 (by norm_num) t i + have hi₃ := integrableOn_ball_direction_div_norm_pow (hρ.continuous.comp harg) 2 (by norm_num) t i + apply ((hi₁.sub hi₂).sub hi₃).congr + filter_upwards [ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz + simpa only [pow_one,Function.comp_apply,Pi.sub_apply] using + (divergence_conePotential (hρ.differentiable (by simp) _) hz i).symm + +lemma conePotential_tip_flux {ρ : ℝ × Vec → ℝ} (hρ : Continuous ρ) + {t : ℝ} (ht : 0 ∫ n : Sphere, ε^2*dot n.1 + ((ρ (t-‖ε • n.1‖,x+ε • n.1)/‖ε • n.1‖) • basis i) ∂sphereMeasure) + (𝓝[>] (0:ℝ)) (𝓝 0) := by + have hc : Continuous (fun z : Vec => ρ (t-‖z‖,x+z)) := + hρ.comp ((continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id)) + obtain ⟨C,hC⟩ := ((isCompact_closedBall (0:Vec) t).image hc).isBounded.exists_norm_le + apply spherical_flux_tendsto_zero (F:=fun z : Vec => (ρ (t-‖z‖,x+z)/‖z‖) • basis i) + (C:=C*‖basis i‖) ht + intro z hz hzt + have hh := hC _ ⟨z,(by simpa only [mem_closedBall_zero_iff] using hzt.le),rfl⟩ + rw [norm_smul,norm_div,norm_norm] + calc + ‖ρ (t-‖z‖,x+z)‖/‖z‖*‖basis i‖ ≤ C/‖z‖*‖basis i‖ := + mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_right hh hz.le) (norm_nonneg _) + _ = C*‖basis i‖/‖z‖ := by ring + +lemma conePotential_spatial_ibp {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + {t : ℝ} (ht : 0 (ρ (t-‖z‖,x+z)/‖z‖) • basis i) + (fun z hz _ => ((contDiffAt_conePotential hρ t x (norm_ne_zero_iff.mp hz.ne')).of_le (by simp)).smul contDiffAt_const) + (integrable_conePotential_divergence hρ t x i) (conePotential_tip_flux hρ.continuous ht x i) + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + have hi₁ := integrableOn_ball_div_norm_pow ((contDiff_dirD hρ (0,basis i)).continuous.comp harg) + 1 (by norm_num) t + have hi₂ := integrableOn_ball_direction_div_norm_pow ((contDiff_dirD hρ (1,0)).continuous.comp harg) + 1 (by norm_num) t i + have hi₃ := integrableOn_ball_direction_div_norm_pow (hρ.continuous.comp harg) 2 (by norm_num) t i + have he : (∫ z in ball (0:Vec) t, divergence (fun y : Vec => (ρ (t-‖y‖,x+y)/‖y‖) • basis i) z) = + (∫ z in ball (0:Vec) t, dirD ρ (0,basis i) (t-‖z‖,x+z)/‖z‖) - + (∫ z in ball (0:Vec) t, z i/‖z‖^2*dirD ρ (1,0) (t-‖z‖,x+z)) - + (∫ z in ball (0:Vec) t, z i/‖z‖^3*ρ (t-‖z‖,x+z)) := by + rw [← integral_sub (by simpa [IntegrableOn] using hi₁) (by simpa [IntegrableOn] using hi₂), + ← integral_sub (by simpa [IntegrableOn] using Integrable.sub' hi₁ hi₂) (by simpa [IntegrableOn] using hi₃)] + apply integral_congr_ae + filter_upwards [ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz + exact divergence_conePotential (hρ.differentiable (by simp) _) hz i + have hb : (∫ n : Sphere, t^2*dot n.1 ((ρ (t-‖t • n.1‖,x+t • n.1)/‖t • n.1‖) • basis i) ∂sphereMeasure) = + ∫ n : Sphere, t*n.1 i*ρ (0,x+t • n.1) ∂sphereMeasure := by + apply integral_congr_ae + filter_upwards [] with n + have hn : ‖t • n.1‖=t := by rw [norm_smul,Real.norm_of_nonneg ht.le,sphere_norm,mul_one] + rw [hn,sub_self,dot_smul_right] + have hd : dot n.1 (basis i)=n.1 i := by simp [dot,basis] + rw [hd] + field_simp + rw [he,hb] at hg + rw [integral_add (by simpa [IntegrableOn] using hi₂) (by simpa [IntegrableOn] using hi₃)] + linarith +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/SqrtBaselineClippedLength.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/SqrtBaselineClippedLength.lean new file mode 100644 index 0000000000000000000000000000000000000000..d64e94272463e8d0b35aa0d5105cafeb197ebd29 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/SqrtBaselineClippedLength.lean @@ -0,0 +1,454 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.NormalisedPartialCutoff + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma sqrt_baseline_clipped_length {I lam : ℝ} (hI : 0 < I) (hlam : 0 < lam) : + Real.sqrt (1+I/min I (lam/2)) ≤ 2*(1+Real.sqrt (I/lam)) := by + have hlen : 0 < min I (lam/2) := lt_min hI (by positivity) + have hq : 0 ≤ I/lam := by positivity + have hR : 0 ≤ Real.sqrt (I/lam) := Real.sqrt_nonneg _ + have hRsq := Real.sq_sqrt hq + have hdiv : I/min I (lam/2) ≤ 1+2*(I/lam) := by + rcases le_total I (lam/2) with h|h + · rw [min_eq_left h,div_self hI.ne'] + linarith + · rw [min_eq_right h] + have he : I/(lam/2)=2*(I/lam) := by ring + rw [he] + linarith + apply Real.sqrt_le_iff.mpr + refine ⟨by positivity,?_⟩ + nlinarith + +lemma stabilityLength_pos {P C M A p w φ : ℝ} (hP : 0 < P) (hC : 0 < C) + (hM : 0 < M) (hp : 0 < p) (hw : 0 < w) (hφ : 0 < φ) : + 0 < stabilityLength P C M A p w φ := by + unfold stabilityLength stabilityRate + have hm : 0 < min p w := lt_min hp hw + have hr : 0 < M/φ+Real.sqrt (A*Real.log (2+P)/φ) := + add_pos_of_pos_of_nonneg (div_pos hM hφ) (Real.sqrt_nonneg _) + positivity + +lemma direction_clipped_baseline_R_log_bound {P C M A p w φ : ℝ} + (hP : 0 < P) (hL : 1 ≤ Real.log (2+P)) (hC : 0 < C) (hM : 0 < M) (hA : 0 ≤ A) + (hp : 0 < p) (hw : 0 < w) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hpP : p ≤ P) (hwP : w ≤ P) : + let I := (w/P)^2 + let lam := stabilityLength P C M A p w φ + Real.sqrt I*Real.sqrt (1+I/min I (lam/2))*p*φ ≤ + 2*(1+C*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P)) := by + dsimp only + have hI : 0 < (w/P)^2 := sq_pos_of_pos (div_pos hw hP) + have hlam := stabilityLength_pos hP hC hM hp hw hφ (A:=A) + have hroot := sqrt_baseline_clipped_length hI hlam + have hbound := direction_baseline_R_log_bound hP hL hC.le hM.le hA hp hw hφ hφ1 hpP hwP + calc + _ ≤ Real.sqrt ((w/P)^2)*(2*(1+Real.sqrt (((w/P)^2)/stabilityLength P C M A p w φ)))*p*φ := by gcongr + _ = 2*(Real.sqrt ((w/P)^2)*(1+Real.sqrt (((w/P)^2)/stabilityLength P C M A p w φ))*p*φ) := by ring + _ ≤ 2*((1+C*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P))) := by gcongr + _ = _ := by ring + +lemma stability_massScale_identity (P C M A p w φ : ℝ) : + (C*(P/(min p w/128))*(M/φ+Real.sqrt (A*Real.log (2+P)/φ)))⁻¹^2 = + stabilityLength P (128*C) M A p w φ := by + unfold stabilityLength stabilityRate + congr 2 + ring + +lemma direction_baseline_R_bound128 {P C M A p w φ : ℝ} + (hP : 0j₀-j) S := by + intro i hi j hj hij + have hi' := hjmax i hi + have hj' := hjmax j hj + change j₀-i=j₀-j at hij + omega + calc + _ ≤ ∑j∈S,(((2:ℝ)⁻¹)^α)^(j₀-j) := Finset.sum_le_sum hpoint + _ = ∑m∈S.image (fun j=>j₀-j),(((2:ℝ)⁻¹)^α)^m := (Finset.sum_image hinj).symm + _ ≤ ∑'m : ℕ,(((2:ℝ)⁻¹)^α)^m := + (summable_geometric_of_norm_lt_one hnorm).sum_le_tsum _ (fun _ _=>by positivity) + _ = _ := tsum_geometric_of_norm_lt_one hnorm + · have he : S=∅ := Finset.not_nonempty_iff_eq_empty.mp hne + rw [he,Finset.sum_empty] + exact inv_nonneg.mpr (sub_nonneg.mpr hbase1.le) + +lemma relative_occupation_angular_sum {θ φ K κ e : ℝ} (hθ : 0<θ) (hφ : 0≤φ) + (hK : 0hpoint j) + _ = (∑j∈S,(cappedRepresentative j)^e)+φ^(1/4:ℝ)*(∑j∈S,(cappedRepresentative j)^(e-1/4)) := by + rw [Finset.sum_add_distrib,Finset.mul_sum] + _ ≤ ((1-((2:ℝ)⁻¹)^e)⁻¹)*(K*θ)^e+ + (κ*θ)^(1/4:ℝ)*(((1-((2:ℝ)⁻¹)^(e-1/4))⁻¹)*(K*θ)^(e-1/4)) := by + apply add_le_add hsum + apply mul_le_mul hφpow hsum' (Finset.sum_nonneg (fun j _=>Real.rpow_nonneg (cappedRepresentative_pos j).le _)) + exact Real.rpow_nonneg (mul_nonneg hκ hθ.le) _ + _ = _ := by + rw [Real.mul_rpow hK.le hθ.le,Real.mul_rpow hκ hθ.le,Real.mul_rpow hK.le hθ.le] + calc + _ = (((1-((2:ℝ)⁻¹)^e)⁻¹)*K^e)*θ^e+ + (((1-((2:ℝ)⁻¹)^(e-1/4))⁻¹)*K^(e-1/4)*κ^(1/4:ℝ))*(θ^(e-1/4)*θ^(1/4:ℝ)) := by ring + _ = _ := by rw [heq]; ring + +def relativeSourceAngle (θ φ σ : ℝ) : ℝ := + (min θ σ)^(3/2:ℝ)*(1+φ/σ)^(1/4:ℝ) + +def relativeAngularConstant (K κ e : ℝ) : ℝ := + (((1-((2:ℝ)⁻¹)^e)⁻¹)*K^e+ + ((1-((2:ℝ)⁻¹)^(e-1/4))⁻¹)*K^(e-1/4)*κ^(1/4:ℝ)) + +lemma relativeAngularConstant_nonneg {K κ e : ℝ} (hK : 0≤K) (hκ : 0≤κ) (he : 1/4(div_le_iff₀ hκ).mpr (by nlinarith only [hS i hi])) + have he (i : ℕ) : φ*(cappedRepresentative i)^(-α)= + (κ^α*φ^(1-α))*((φ/κ)/cappedRepresentative i)^α := by + have hσ := cappedRepresentative_pos i + rw [Real.rpow_neg hσ.le,Real.rpow_sub hφ,Real.rpow_one, + Real.div_rpow (div_nonneg hφ.le hκ.le) hσ.le,Real.div_rpow hφ.le hκ.le] + field_simp [(Real.rpow_pos_of_pos hκ α).ne',(Real.rpow_pos_of_pos hφ α).ne', + (Real.rpow_pos_of_pos hσ α).ne'] + calc + _ = (κ^α*φ^(1-α))*(∑i∈S,((φ/κ)/cappedRepresentative i)^α) := by simp_rw [he]; rw [Finset.mul_sum] + _ ≤ (κ^α*φ^(1-α))*(1-((2:ℝ)⁻¹)^α)⁻¹ := + mul_le_mul_of_nonneg_left hsum (by positivity) + _ = _ := by ring + +lemma remaining_good_fixed_receiver_sum {φ K κ β : ℝ} (hφ : 0<φ) + (hK : 0cappedRepresentative_le_one _) + rw [Real.one_rpow,mul_one] at hs + calc + _ ≤ ∑i∈Sθ,C*(cappedRepresentative i)^(3/2-β) := by + apply Finset.sum_le_sum + intro i hi + exact relative_source_angle_sum (cappedRepresentative_pos i) hφ hK hκ hβ hβ1 (hθ i hi) (Sσ i) (hσ i hi) + _ = C*(∑i∈Sθ,(cappedRepresentative i)^(3/2-β)) := (Finset.mul_sum ..).symm + _ ≤ _ := mul_le_mul_of_nonneg_left hs hC + +lemma square_root_clipped_stability {I P C M A p w σ : ℝ} + (hI : 0s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ), + (∀i∈Sθ,cappedRepresentative nφ≤16384*cappedRepresentative i) → + (∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤131080*cappedRepresentative i ∧ + 512≤cappedRepresentative j*sourceRepresentative np ∧ 32≤cappedRepresentative j*w) → + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun i j nr=>relativeRepresentativeClosedBin T w ![np,i,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + let R₁ := 2*Real.sqrt 16384*(I : ℝ)^(1/4:ℝ)*Real.sqrt (P/min p w)* + (Real.sqrt M+Real.sqrt (Real.sqrt (A*Real.log (2+P)))) + (∑i∈Sθ,∑j∈Sσ i,∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B i j nr) z + ∂physicalBinMeasure V (B i j nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p* + (Kg*(2*remainingGoodConstant 131080 16384 0*Real.sqrt φ+R₁*remainingGoodConstant 131080 16384 (1/2))+ + Kb*(2*remainingMagneticConstant 131080 16384 0+R₁*remainingMagneticConstant 131080 16384 (1/2)))) := by + have hshortRadius : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + max 1 T*cappedRepresentative (k 3) ≤ I → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let G := (goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2)).toReal + let Hf := (magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I (k 2)).toReal + let Kg := relativeCauchyConstant Cg E G + let Kb := relativeCauchyConstant Cb E (2*Hf) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r)+ + Kb*min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_shared_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + have hn := hsource s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + have hp : 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let G := goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I (k 2) + let Hf := magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I (k 2) + have hG : G≠⊤ := ne_top_of_le_ne_top + (hs.goodFieldBudget_finite X (fun t=>velocity (V t)) 1 (Icc_subset_Icc ha hb) hI) + (ENNReal.le_tsum (f := fun index=>goodFieldBudget s X (fun t=>velocity (V t)) 1 a b I index) (k 2)) + have hF : Hf≠⊤ := by + apply ne_top_of_le_ne_top _ ((ENNReal.le_tsum (k 2)).trans + (hs.shared_magneticFieldBudget F.flow zX 1 hI (by norm_num : (0:ℝ)≤2) hJI)) + finiteness + have hGe : ENNReal.ofReal (G.toReal*I)=ENNReal.ofReal I*G := by + rw [ENNReal.ofReal_mul ENNReal.toReal_nonneg,ENNReal.ofReal_toReal hG,mul_comm] + have hFe : ENNReal.ofReal ((2*Hf.toReal)*I)=ENNReal.ofReal (2*I)*Hf := by + rw [show (2*Hf.toReal)*I=(2*I)*Hf.toReal by ring, + ENNReal.ofReal_mul (by positivity),ENNReal.ofReal_toReal hF] + have hg := relative_radius_cauchy_scalar hCg hE ENNReal.toReal_nonneg hI hp hν hR hr hφ hκ + (show 0≤φ/θ^2 by positivity) (Z:=G.toReal) + dsimp only at hg + have heγ : 10240*(φ/θ^2)/p=10240*φ/(p*θ^2) := by ring + have hea : I*p^2*ν^2*φ*(φ/θ^2)=I*p^2*ν^2*φ^2/θ^2 := by ring + have heb : Real.sqrt I*R*ν*Real.sqrt κ*(φ/θ^2)/φ=Real.sqrt I*R*ν*Real.sqrt κ/θ^2 := by + field_simp [hφ.ne'] + rw [heγ,hea,heb,hGe,hRsq] at hg + have hbnd := relative_radius_cauchy_scalar hCb hE (show 0≤2*Hf.toReal by positivity) hI hp hν hR hr hφ hκ + (show 0≤(1:ℝ) by norm_num) + dsimp only at hbnd + simp only [mul_one] at hbnd + rw [hFe,hRsq] at hbnd + apply hn.trans + calc + _ ≤ ENNReal.ofReal (relativeCauchyConstant Cg E G.toReal* + min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r))+ + ENNReal.ofReal (relativeCauchyConstant Cb E (2*Hf.toReal)* + min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + exact add_le_add hg hbnd + _ = _ := by + rw [←ENNReal.ofReal_add + (mul_nonneg (relativeCauchyConstant_nonneg hCg) (by positivity)) + (mul_nonneg (relativeCauchyConstant_nonneg hCb) (by positivity))] + + have hshortRadialSum : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (Kg*D*Real.sqrt + ((I*p^2*ν^2*φ^2/θ^2)*(Real.sqrt I*R*ν*Real.sqrt κ/θ^2))+ + Kb*D*Real.sqrt ((I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt κ/φ))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hshortRadius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*R*ν*Real.sqrt κ/θ^2 + let ab := I*p^2*ν^2*φ + let bb := Real.sqrt I*R*ν*Real.sqrt κ/φ + let D := dyadicBalanceConstant (1/2) (1/2) + have hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p*Real.sqrt R* + relativeSourceAngle θ φ σ*(Kg*(φ/θ^2)+Kb)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hshortRadialSum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only at hn + have hp : 0 ≤ sourceRepresentative np := by dsimp [sourceRepresentative]; positivity + have hθ := cappedRepresentative_pos nθ + have hφ := cappedRepresentative_pos nφ + have hσ := cappedRepresentative_pos j + have hκ : 0≤1+cappedRepresentative nφ/cappedRepresentative j := by positivity + have hb := hbalanceFactor (hlen.trans_le hlenI) hp (le_min hθ.le hσ.le) + (Real.sqrt_nonneg (1+I/len)) hκ hφ (by norm_num : (0:ℝ)≤1) + simp only [mul_one] at hb + rw [hgoodBalanceFactor (hlen.trans_le hlenI) hp (le_min hθ.le hσ.le) + (Real.sqrt_nonneg _) hκ hφ hθ,hb] at hn + convert hn using 1 + congr 1 + dsimp [relativeSourceAngle] + ring + + have hshortClipped : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 < w → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/min I (stabilityLength P 16384 M A p w σ/2)) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := relativeCauchyConstant Cg E + (goodFieldBudget s (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (D*(I : ℝ)^(3/4:ℝ)*p*Real.sqrt R* + relativeSourceAngle θ φ σ*(Kg*(φ/θ^2)+Kb)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hshortFactored + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w M A P hS hS0 ha hb hab hI hJI + hM hA hP hw hpσ hwσ HX HZ + dsimp only + let p := sourceRepresentative np + let σ := cappedRepresentative j + let L := Real.log (2+P) + let lam := stabilityLength P 16384 M A p w σ + let len := min I (lam/2) + let m := min p w/128 + have hp : 0

(prefixFlow F.flow T zX t).1) + (fun t=>velocity (prefixFlow F.flow T zX t).2) 1 a b I nφ).toReal + let Kb := relativeCauchyConstant Cb E + (2*(magneticFieldBudget s F.flow zX T 1 (max 0 (a-2*I)) (min T b) I nφ).toReal) + let D := dyadicBalanceConstant (1/2) (1/2) + let R (j : ℕ) := Real.sqrt (Real.sqrt (1+I/min I (stabilityLength P 16384 M A p w (cappedRepresentative j)/2))) + let U (i j : ℕ) := R j*relativeSourceAngle (cappedRepresentative i) φ (cappedRepresentative j)* + (Kg*(φ/(cappedRepresentative i)^2)+Kb) + have hp : 0

(hσ i hi j hj).1) + calc + _≤∑i∈Sθ,∑j∈Sσ i,ENNReal.ofReal ((D*(I : ℝ)^(3/4:ℝ)*p)*U i j) := by + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro j hj + have hh := hsource s T F hs hT h0 zX S np i nφ j a b I w M A P hS hS0 ha hb hab + hI hJI hM hA hP hw (hσ i hi j hj).2.1 (hσ i hi j hj).2.2 HX HZ + dsimp only at hh + simpa only [U,R,D,Kg,Kb,p,φ,E,mul_assoc] using hh + _=ENNReal.ofReal ((D*(I : ℝ)^(3/4:ℝ)*p)*(∑i∈Sθ,∑j∈Sσ i,U i j)) := by + rw [Finset.mul_sum] + rw [ENNReal.ofReal_sum_of_nonneg] + · apply Finset.sum_congr rfl + intro i hi + rw [Finset.mul_sum,ENNReal.ofReal_sum_of_nonneg] + exact fun j _=>mul_nonneg (by positivity) (hU i j) + · intro i hi + exact mul_nonneg (by positivity) (Finset.sum_nonneg (fun j _=>hU i j)) + _≤_ := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hn (by positivity)) + +lemma capped_inverse_square_floor_sum {p : ℝ} (hp : 01/p≤cappedRepresentative nt) + have he : (∑nt∈S,ENNReal.ofReal (if 1/p≤cappedRepresentative nt then + 1/(p*(cappedRepresentative nt)^2) else 0))= + ∑nt∈U,ENNReal.ofReal (1/(p*(cappedRepresentative nt)^2)) := by + simp only [U,Finset.sum_filter,apply_ite,ENNReal.ofReal_zero] + rw [he,←ENNReal.ofReal_sum_of_nonneg (fun nt _=>by positivity)] + exact ENNReal.ofReal_le_ofReal (capped_inverse_square_floor_sum hp U + (fun nt hnt=>(Finset.mem_filter.mp hnt).2)) + +lemma small_transport_coefficient {p θ φ : ℝ} (hp : 0hs.nonnegative _ ⟨hz.2.1.1,hz.2.1.2.trans ((Icc_subset_Icc ha hb) hz.1).2⟩ _) + exact hh.trans (mul_le_mul' (ENNReal.ofReal_le_ofReal (small_transport_coefficient hp ht hf hsmall)) le_rfl) + +lemma PhaseFlowOn.directTransport_representative_small {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (k : Fin 4→ℕ) {a b : ℝ} (ha : 0≤a) (hb : b≤T) + (hsmall : cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16) : + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal (smallTransportCoefficient k)*representativeCentralCost s F zX w k a b := by + have hV := ((F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX)))).snd.measurable + unfold representativeCentralCost + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV (representativeClosedBin T w k) measurableSet_Icc)] with z hz + exact physicalDirectTransportDensity_representative_small hs ha hb k hsmall z hz + +lemma Admissible.small_transport_regular_radial {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'nr : ℕ,ENNReal.ofReal (smallTransportCoefficient ![np,nt,nf,nr])* + representativeRegularCentralCost s F zX P M A I w ![np,nt,nf,nr] a b)≤ + ENNReal.ofReal (C*Real.sqrt I*representativeSharedRadius s F zX P M A w a b I (np,nf)* + cappedRepresentative nf/(sourceRepresentative np*(cappedRepresentative nt)^2)) := by + obtain ⟨C,hC,hbound⟩ := hd.representative_regular_central_shared T₀ + refine ⟨25165824*C,by positivity,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nt nf a b I w hzX ha hb hI hJI hw hsmall HZ + let p := sourceRepresentative np + let θ := cappedRepresentative nt + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + let c := 4194304*φ/(p^2*θ^3) + have hp : 0

ENNReal.tsum_le_tsum (fun nt=>ENNReal.tsum_le_tsum (hpoint nf nt))) + _=ENNReal.ofReal Cn*(∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if 1/p≤cappedRepresentative nt then if cappedRepresentative nr≤1/P^2 then + ENNReal.ofReal ((4194304*I*cappedRepresentative nr*p^2*(cappedRepresentative nf)^2)* + (1/(p*(cappedRepresentative nt)^2))) else 0 else 0) := by + simp only [ENNReal.tsum_mul_left] + _≤ENNReal.ofReal Cn*ENNReal.ofReal (33554432*I*p^3/P^2) := + mul_le_mul' le_rfl (small_transport_exception_model_sum hP hI.le hp) + _=_ := by rw [←ENNReal.ofReal_mul hCn]; congr 1; dsimp only [p]; ring + +lemma Admissible.small_transport_regular_double_sum {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∑'nt : ℕ,∑'nr : ℕ,if 1/sourceRepresentative np≤cappedRepresentative nt ∧ + cappedRepresentative nt≤cappedRepresentative nf/16 then + ENNReal.ofReal (smallTransportCoefficient ![np,nt,nf,nr])* + representativeRegularCentralCost s F zX P M A I w ![np,nt,nf,nr] a b else 0)≤ + ENNReal.ofReal (C*Real.sqrt I*representativeSharedRadius s F zX P M A w a b I (np,nf)* + sourceRepresentative np*cappedRepresentative nf) := by + obtain ⟨C,hC,hbound⟩ := hd.small_transport_regular_radial T₀ + refine ⟨2*C,by positivity,?_⟩ + intro M A P hM hA hP s T F hs hT hTT zX np nf a b I w hzX ha hb hI hJI hw HZ + let p := sourceRepresentative np + let φ := cappedRepresentative nf + let R := representativeSharedRadius s F zX P M A w a b I (np,nf) + have hp : 0

(F.flow z t).2) T M A P (Real.log (2+P))) → + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + ENNReal.ofReal (smallTransportCoefficient ![n.1,nt,n.2,nr])* + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + classical + obtain ⟨Cc,hCc,hcentral⟩ := hd.small_transport_regular_double_sum T₀ + let E := 3468*datumEnergyNumber d + let D := pairCountConstant+4*Real.sqrt pairCountConstant+2 + let K := 4+16384*Real.sqrt E*D + have hE : 0≤E := mul_nonneg (by norm_num) hd.datumEnergyNumber_nonneg + have hD : 0≤D := by dsimp [D]; exact add_nonneg (add_nonneg pairCountConstant_pos.le (by positivity)) (by norm_num) + have hK : 0≤K := by dsimp [K]; positivity + refine ⟨Cc*K,mul_nonneg hCc hK,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hJI hw hwP HZ + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let J := representativeJointEnergy s F zX a b I + let R := representativeSharedRadius s F zX P M A w a b I + have hP0 : 0

n∈Q) + have hU (n) (hn : n∈U) : n∈Q := (Finset.mem_filter.mp hn).2 + have he : (∑n∈S,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + ENNReal.ofReal (smallTransportCoefficient ![n.1,nt,n.2,nr])* + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)= + ∑n∈U,(∑'nt : ℕ,∑'nr : ℕ,if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + ENNReal.ofReal (smallTransportCoefficient ![n.1,nt,n.2,nr])* + representativeRegularCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) := by + simp [U,Finset.sum_filter,indicator_apply] + rw [he] + have hJn (n : ℕ×ℕ) : 0≤J n := representativeJointEnergy_nonneg .. + have hbudget : ∑n∈U,J n≤E := (hJs.sum_le_tsum U (fun n _=>hJn n)).trans hJsum + have hn := shared_radius_pair_sum hP hL hM.le hA hI.le hw hwP hE U J + (fun n _=>hJn n) hbudget (fun n hn=>hpair n (hU n hn)) + change (∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)≤ + K*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w) at hn + calc + _≤∑n∈U,ENNReal.ofReal (Cc*Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2) := by + apply Finset.sum_le_sum + intro n hn + exact hcentral M A P hM hA hP0 s T F hs hT hTT zX n.1 n.2 a b I w + hzX ha hb hI hJI hw HZ + _=ENNReal.ofReal (Cc*(∑n∈U,Real.sqrt I*R n*sourceRepresentative n.1*cappedRepresentative n.2)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun n _=>by + exact mul_nonneg (mul_nonneg (mul_nonneg (mul_nonneg hCc (Real.sqrt_nonneg I)) (hR n).le) (hp _).le) (cappedRepresentative_pos _).le)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro n hn + ring + _≤_ := ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_left hn hCc + simpa only [mul_assoc] using hh) + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma sourceRepresentative_cube_sum {P : ℝ} (hP : 0≤P) (S : Finset ℕ) + (hS : ∀np∈S,sourceRepresentative np≤P) : + (∑np∈S,(sourceRepresentative np)^3)≤2*P^3 := by + have hp (np : ℕ) : 0 ≤ sourceRepresentative np := by unfold sourceRepresentative; positivity + calc + _≤∑np∈S,P^2*sourceRepresentative np := by + apply Finset.sum_le_sum + intro np hn + have hh := mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (hp np) (hS np hn) 2) (hp np) + nlinarith only [hh] + _=P^2*(∑np∈S,sourceRepresentative np) := (Finset.mul_sum ..).symm + _≤P^2*(2*P) := mul_le_mul_of_nonneg_left (sourceRepresentative_sum_bound hP S hS) (sq_nonneg P) + _=2*P^3 := by ring + +lemma Admissible.small_transport_exception_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0

∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + ENNReal.ofReal (smallTransportCoefficient ![n.1,nt,n.2,nr])* + representativeExceptionCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ENNReal.ofReal (C*I*P) := by + obtain ⟨Cn,hCn,hnear⟩ := hd.small_transport_exception_triple_sum T₀ + refine ⟨2*Cn,by positivity,?_⟩ + intro M A P hM hP s T F hs hT hTT zX a b I w ha hb hI hJI hw + dsimp only + let Q := {n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} + let g := fun np=>∑'nf : ℕ,∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative np≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative nf/16 then + ENNReal.ofReal (smallTransportCoefficient ![np,nt,nf,nr])* + representativeExceptionCentralCost s F zX P M A I w ![np,nt,nf,nr] a b else 0 + have hc : 0≤Cn*I/P^2 := by positivity + have hdom : (∑'n : ℕ×ℕ,Q.indicator (fun n=>∑'nt : ℕ,∑'nr : ℕ, + if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 then + ENNReal.ofReal (smallTransportCoefficient ![n.1,nt,n.2,nr])* + representativeExceptionCentralCost s F zX P M A I w ![n.1,nt,n.2,nr] a b else 0) n)≤ + ∑'np : ℕ,if sourceRepresentative np≤P then g np else 0 := by + rw [ENNReal.tsum_prod'] + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hn + · apply ENNReal.tsum_le_tsum + intro nf + exact (indicator_le_self _ _) (np,nf) + · have hz (nf : ℕ) : (np,nf)∉Q := fun hh=>hn hh.1 + simp only [indicator_of_notMem (hz _),tsum_zero,le_refl] + apply hdom.trans + rw [ENNReal.tsum_eq_iSup_sum] + apply iSup_le + intro S + let U := S.filter (fun np=>sourceRepresentative np≤P) + have hU (np) (hn : np∈U) : sourceRepresentative np≤P := (Finset.mem_filter.mp hn).2 + have he : (∑np∈S,if sourceRepresentative np≤P then g np else 0)=∑np∈U,g np := by + simp [U,Finset.sum_filter] + rw [he] + calc + _≤∑np∈U,ENNReal.ofReal (Cn*I*(sourceRepresentative np)^3/P^2) := by + apply Finset.sum_le_sum + intro np hn + exact hnear M A P hM hP s T F hs hT hTT zX np a b I w ha hb hI hJI hw + _=ENNReal.ofReal ((Cn*I/P^2)*(∑np∈U,(sourceRepresentative np)^3)) := by + rw [←ENNReal.ofReal_sum_of_nonneg (fun np _=>by unfold sourceRepresentative; positivity)] + congr 1 + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro np hn + ring + _≤ENNReal.ofReal ((Cn*I/P^2)*(2*P^3)) := + ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left (sourceRepresentative_cube_sum hP.le U hU) hc) + _=_ := by congr 1; field_simp + + + +open Set Filter Metric MeasureTheory _root_.Classical +open scoped ENNReal Topology ContDiff + + +lemma tsum_representativeSmallSector (P : ℝ) (f : (Fin 4→ℕ)→ℝ≥0∞) : + (∑'k,(representativeSmallSector P).indicator f k)= + ∑'n : ℕ×ℕ,({n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2}).indicator + (fun n=>∑'nt : ℕ,∑'nr : ℕ,if 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ + cappedRepresentative nt≤cappedRepresentative n.2/16 then f ![n.1,nt,n.2,nr] else 0) n := by + rw [tsum_quad_pair_index] + apply tsum_congr + intro n + by_cases hn : sourceRepresentative n.1≤P ∧ 1/sourceRepresentative n.1≤cappedRepresentative n.2 + · rw [indicator_of_mem (show n∈{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} from hn)] + apply tsum_congr + intro nt + apply tsum_congr + intro nr + have hi : (![n.1,nt,n.2,nr]∈representativeSmallSector P) ↔ + 1/sourceRepresentative n.1≤cappedRepresentative nt ∧ cappedRepresentative nt≤cappedRepresentative n.2/16 := by + change (sourceRepresentative n.1≤P ∧ _ ∧ _) ↔ _ + simp only [hn.1,true_and,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val] + simp only [indicator_apply,hi] + · rw [indicator_of_notMem (show n∉{n : ℕ×ℕ | sourceRepresentative n.1≤P ∧ + 1/sourceRepresentative n.1≤cappedRepresentative n.2} from hn)] + apply ENNReal.tsum_eq_zero.mpr + intro nt + apply ENNReal.tsum_eq_zero.mpr + intro nr + apply indicator_of_notMem + intro hk + have hc := representativeSmallSector_subset_centralIndexSector P hk + exact hn ⟨hc.1,hc.2.1⟩ + +lemma Admissible.small_transport_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∑'k : Fin 4→ℕ,(representativeSmallSector P).indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectTransportDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cr,hCr,hregular⟩ := hd.small_transport_regular_uniform T₀ + obtain ⟨Ce,hCe,hexception⟩ := hd.small_transport_exception_uniform T₀ + refine ⟨Cr+Ce,add_nonneg hCr hCe,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + dsimp only + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + let R := representativeSmallSector P + let c := fun k=>ENNReal.ofReal (smallTransportCoefficient k) + let g := fun k=>c k*representativeRegularCentralCost s F zX P M A I w k a b + let e := fun k=>c k*representativeExceptionCentralCost s F zX P M A I w k a b + have hdom : (∑'k : Fin 4→ℕ,R.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectTransportDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b)) k)≤ + (∑'k,R.indicator g k)+(∑'k,R.indicator e k) := by + rw [←ENNReal.tsum_add] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · simp only [indicator_of_mem hk] + apply (F.directTransport_representative_small hs.energyPrefix hT zX k ha hb hk.2.2).trans_eq + rw [central_cost_eq_regular_add_exception (P:=P) (M:=M) (A:=A) (I:=I),mul_add] + · simp only [indicator_of_notMem hk,add_zero,le_refl] + have hr : (∑'k,R.indicator g k)≤ENNReal.ofReal (Cr*B) := by + rw [show R=representativeSmallSector P from rfl,tsum_representativeSmallSector] + exact hregular M A P (zero_lt_one.trans_le hM) hA hP hL s T F hs hT hTT zX a b I w + hzX ha hb hI hJI hw hwP HZ + have he : (∑'k,R.indicator e k)≤ENNReal.ofReal (Ce*B) := by + rw [show R=representativeSmallSector P from rfl,tsum_representativeSmallSector] + apply (hexception M A P hM (zero_lt_one.trans_le hP) s T F hs hT hTT zX a b I w ha hb hI hJI hw).trans + apply ENNReal.ofReal_le_ofReal + have hi : I≤Real.sqrt I := by nlinarith [Real.sq_sqrt hI.le,Real.sqrt_nonneg I] + have hip : I*P≤P*Real.sqrt I := by + simpa only [mul_comm] using mul_le_mul_of_nonneg_left hi (zero_le_one.trans hP) + have hh : I*P≤B := hip.trans (le_add_of_nonneg_right (by positivity)) + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hh hCe + apply (hdom.trans (add_le_add hr he)).trans_eq + rw [←ENNReal.ofReal_add (mul_nonneg hCr hB) (mul_nonneg hCe hB)] + congr 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/TransportSingularBulk.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/TransportSingularBulk.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb9ac6454380f779e0849ba88aa8443852270812 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/TransportSingularBulk.lean @@ -0,0 +1,597 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.SourceVelocityProfile + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +section +attribute [local instance] Measure.Subtype.measureSpace +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma singular_radial_log_bound_norm {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : ℝ → W} {t H A N : ℝ} (ht : 0 by simpa only [Real.norm_of_nonneg (norm_nonneg _)] using hn r hr) + (fun r hr => by simpa only [Real.norm_of_nonneg (norm_nonneg _)] using ha r hr) + exact ⟨(singular_radial_log_bound ht htH hA hN hg hn ha).1, + (le_abs_self _).trans hh.2⟩ + +lemma integral_annulus_polar_radial {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : Vec → W} {ε R : ℝ} (hε : 0<ε) + (hg : ContinuousOn g {z | ε≤‖z‖ ∧ ‖z‖≤R}) : + (∫z in ball (0:Vec) R \ ball (0:Vec) ε,g z)= + ∫r in Ico ε R, ∫n : Sphere,r^2 • g (r • n.1) ∂sphereMeasure := by + have hclosed : {z : Vec | ε≤‖z‖ ∧ ‖z‖≤R}=closedBall (0:Vec) R \ ball (0:Vec) ε := by + ext z + simp only [mem_ofPred_eq,Set.mem_sdiff,mem_closedBall,mem_ball,dist_zero_right,not_lt] + exact and_comm + have hgi : IntegrableOn g (ball (0:Vec) R \ ball (0:Vec) ε) := by + have hcomp : IsCompact {z : Vec | ε≤‖z‖ ∧ ‖z‖≤R} := by + rw [hclosed] + exact (isCompact_closedBall _ _).diff isOpen_ball + exact (hg.integrableOn_compact hcomp).mono_set (by + intro z hz + simp only [Set.mem_sdiff,mem_ball,dist_zero_right,not_lt] at hz + exact ⟨hz.2,hz.1.le⟩) + have hfun : ContinuousOn (fun p : ℝ × Sphere => p.1^2 • g (p.1 • p.2.1)) (Icc ε R ×ˢ univ) := by + apply (continuous_fst.pow 2).continuousOn.smul + apply hg.comp (continuous_fst.smul (continuous_subtype_val.comp continuous_snd)).continuousOn + intro p hp + have hr : 0≤p.1 := hε.le.trans hp.1.1 + change ε≤‖p.1 • p.2.1‖ ∧ ‖p.1 • p.2.1‖≤R + simpa only [mem_Icc,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] using hp.1 + have hi : Integrable (fun p : ℝ × Sphere => p.1^2 • g (p.1 • p.2.1)) + ((volume.restrict (Ico ε R)).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [←Measure.restrict_univ (μ:=sphereMeasure),Measure.prod_restrict] + exact (hfun.integrableOn_compact (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono Ico_subset_Icc_self Subset.rfl) + rw [integral_annulus_polar hε hgi] + exact (integral_integral_swap hi).symm + +def transportSingularBulk (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) (z : Vec) : ℝ := + ∫ v in closedBall (0:Vec) P, divergence (transportSpatialFlux v e i) z * f (t-coneRadius 0 z,x+z,v) + +lemma transportSingularBulk_continuousOn {P t U ε R : ℝ} {f : Particle} + (x e : Vec) (i : Fin 3) (hε : 0<ε) (hRt : R≤t) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + ContinuousOn (transportSingularBulk P f t x e i) {z | ε≤‖z‖ ∧ ‖z‖≤R} := by + let K := closedBall (0:Vec) P + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure K) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let G : Vec × K → ℝ := fun p => divergence (transportSpatialFlux p.2.1 e i) p.1 * + f (t-coneRadius 0 p.1,x+p.1,p.2.1) + have hdiv : ContinuousOn (fun p : Vec × K => divergence (transportSpatialFlux p.2.1 e i) p.1) + ({z | ε≤‖z‖ ∧ ‖z‖≤R} ×ˢ univ) := by + apply (continuousOn_transportSpatialDivergence e i).comp + (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)).continuousOn + intro p hp + change p.1≠0 + exact norm_pos_iff.mp (hε.trans_le hp.1.1) + have hm : Continuous (fun p : Vec × K => (t-coneRadius 0 p.1,x+p.1,p.2.1)) := by + unfold coneRadius + fun_prop + have hG : ContinuousOn G ({z | ε≤‖z‖ ∧ ‖z‖≤R} ×ˢ univ) := by + apply hdiv.mul (hf.comp hm.continuousOn ?_) + intro p hp + change t-coneRadius 0 p.1∈Icc (0:ℝ) U + simp only [coneRadius,zero_sub,norm_neg] + exact ⟨by linarith [hp.1.2],by linarith [norm_nonneg p.1]⟩ + have hh : ContinuousOn (fun z => ∫ v : K, G (z,v)) {z | ε≤‖z‖ ∧ ‖z‖≤R} := by + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hG + intro z v _ hv + exact (hv (mem_univ v)).elim + apply hh.congr + intro z hz + exact (integral_subtype measurableSet_closedBall + (fun v : Vec => divergence (transportSpatialFlux v e i) z * f (t-coneRadius 0 z,x+z,v))).symm + +lemma transportSingularBulk_shell {P t U r : ℝ} {f : Particle} (x e : Vec) (i : Fin 3) + (hr : 0 transportSpatialFlux_homogeneous v e i ha z) + (fun z hz => (transportSpatialFlux_contDiffAt v e i hz).differentiableAt (by simp)) hr hn + have hrad : coneRadius 0 (r • n.1)=r := by + simp only [coneRadius,zero_sub,norm_neg,norm_smul,Real.norm_of_nonneg hr.le,sphere_norm,mul_one] + simp only [transportSingularBulk,hd,hrad,smul_eq_mul,mul_assoc,integral_const_mul] + rw [←mul_assoc] + congr 1 + field_simp + simp_rw [he] + rw [integral_const_mul] + congr 1 + have hfun : ContinuousOn (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1 * + f (t-r,x+r • p.1.1,p.2)) (univ ×ˢ K) := by + have hc : ContinuousOn (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1) + (univ ×ˢ K) := by + apply (continuousOn_transportSpatialDivergence e i).comp + ((continuous_subtype_val.comp continuous_fst).prodMk continuous_snd).continuousOn + intro p hp + change (p.1:Vec)≠0 + intro hh + have := sphere_norm p.1 + rw [hh,norm_zero] at this + norm_num at this + apply hc.mul + apply hf.comp (by fun_prop : Continuous (fun p : Sphere × Vec => (t-r,x+r • p.1.1,p.2))).continuousOn + intro p hp + exact ⟨by linarith,by linarith⟩ + have hi : Integrable (fun p : Sphere × Vec => divergence (transportSpatialFlux p.2 e i) p.1.1 * + f (t-r,x+r • p.1.1,p.2)) (sphereMeasure.prod (volume.restrict K)) := by + rw [←Measure.restrict_univ (μ:=sphereMeasure),Measure.prod_restrict] + exact hfun.integrableOn_compact (isCompact_univ.prod (isCompact_closedBall _ _)) + exact integral_integral_swap hi + +lemma transportSingularBulk_annulus {P t U ε R : ℝ} {f : Particle} + (x e : Vec) (i : Fin 3) (hε : 0<ε) (hRt : R≤t) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P f t x e i z)= + ∫ r in Ico ε R,transportSingularShell P f t x e i r := by + rw [integral_annulus_polar_radial hε (transportSingularBulk_continuousOn x e i hε hRt htU hf)] + apply setIntegral_congr_fun measurableSet_Ico + intro r hr + exact transportSingularBulk_shell x e i (hε.trans_le hr.1) (hr.2.le.trans hRt) htU hf + +lemma physical_transport_annulus_log_bound (P H A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (U t N ε R : ℝ) (f : Particle), + 0 f (s,y,v))) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) → + ∀ x, |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P f t x e i z|≤ + 1+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨K,hK,hkb⟩ := transportSpatialDivergence_uniform_bound P e i + let C := volume.real (closedBall (0:Vec) P)*(4*Real.pi)*K + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,C*A,hC,mul_nonneg hC hA,?_⟩ + intro U t N ε R f ht htU hUH hN hε hRt hfc hfd hfA hfN x + have htt : t∈Icc (0:ℝ) U := ⟨ht.le,htU⟩ + have hh := singular_radial_log_bound_norm ht (htU.trans hUH) (mul_nonneg hC hA) (mul_nonneg hC hN) + (transportSingularShell_continuousOn x e i hfc htt) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).1) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).2) + rw [transportSingularBulk_annulus x e i hε hRt htU hfc] + rw [←Real.norm_eq_abs] + apply (norm_integral_le_integral_norm _).trans + apply le_trans _ hh.2 + exact integral_mono_measure (Measure.restrict_mono_set volume (by + intro r hr + exact ⟨hε.trans_le hr.1,hr.2.le.trans hRt⟩)) + (Filter.Eventually.of_forall (fun r => norm_nonneg _)) hh.1.norm + +end + +lemma norm_integral_annulus_inverse_sq_le {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] {F : Vec → W} {ε R C : ℝ} (hε : 0<ε) (hεR : ε≤R) + (hC : 0≤C) (hF : ∀ z∈ball (0:Vec) R \ ball (0:Vec) ε, ‖F z‖≤C/‖z‖^2) : + ‖∫ z in ball (0:Vec) R \ ball (0:Vec) ε,F z‖≤4*Real.pi*C*R := by + have hR : 0≤R := hε.le.trans hεR + by_cases hi : IntegrableOn F (ball (0:Vec) R \ ball (0:Vec) ε) + · rw [integral_annulus_polar hε hi] + have hn (n : Sphere) : ‖∫ r in Ico ε R,r^2 • F (r • n.1)‖≤C*R := by + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (Ico ε R)) + (f:=fun r => r^2 • F (r • n.1)) (C:=C) (by + filter_upwards [ae_restrict_mem measurableSet_Ico] with r hr + have hr0 : 0 transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v + +lemma transport_velocity_annulus_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t ε R : ℝ) (x : Vec), + 0<ε → ε≤R → R≤t → t≤U → U≤H → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z|≤C := by + obtain ⟨K,hK,hkb⟩ := physical_transport_velocity_bound P M e i + let D := volume.real (closedBall (0:Vec) P)*A*K + have hD : 0≤D := by dsimp [D]; positivity + refine ⟨4*Real.pi*D*H,by positivity,?_⟩ + intro s U t ε R x hε hεR hRt htU hUH hf hEB + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hb (z : Vec) (hz : z∈ball (0:Vec) R \ ball (0:Vec) ε) : + ‖transportVelocityBulk P s t x e i z‖≤D/‖z‖^2 := by + have hzr : ‖z‖ s.f (t-coneRadius 0 z,x+z,v)* + divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) + (C:=A*(K/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hh := hkb s t x z v hzn hvP (hEB _ hu _).1 (hEB _ hu _).2 + rw [hrad] at hh + rw [Real.norm_eq_abs,abs_mul] + exact mul_le_mul (hf _ hu _ v) hh (abs_nonneg _) hA) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,D]; ring) + rw [←Real.norm_eq_abs] + exact (norm_integral_annulus_inverse_sq_le hε hεR hD hb).trans + (mul_le_mul_of_nonneg_left (hRt.trans (htU.trans hUH)) (by positivity)) + +lemma transport_velocity_divergence_continuousOn {s : Solution} {t : ℝ} (x e : Vec) (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) : + ContinuousOn (fun p : Phase => divergence (fun w => transportConeCoefficient i (p.1,w) • + (coneSpatialCoefficient 0 p.1 w e • coneLorentz s t x (p.1,w))) p.2) + (retardedSpaceDomain t 0 ×ˢ univ) := by + have hk : ContDiffOn ℝ 1 (transportConeCoefficient i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (transportConeCoefficient_contDiffAt i hp.1.1.symm).contDiffWithinAt + have hco : ContDiffOn ℝ 1 (fun z : Phase => coneSpatialCoefficient 0 z.1 z.2 e) + (retardedSpaceDomain t 0 ×ˢ univ) := fun p hp => + (contDiffAt_coneSpatialCoefficient_phase hp.1.1).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + exact (continuousOn_phase_divergences (isOpen_retardedSpaceDomain t 0) (hk.smul (hco.smul hK))).2 + +lemma shifted_particle_continuousOn {f : Particle} {t U : ℝ} (x : Vec) (htU : t≤U) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) : + ContinuousOn (fun p : Phase => f (t-coneRadius 0 p.1,x+p.1,p.2)) + (retardedSpaceDomain t 0 ×ˢ univ) := by + apply hf.comp (by unfold coneRadius; fun_prop : Continuous + (fun p : Phase => (t-coneRadius 0 p.1,x+p.1,p.2))).continuousOn + intro p hp + exact ⟨hp.1.2.le,by dsimp [coneRadius]; linarith [norm_nonneg ((0:Vec)-p.1)]⟩ + +lemma transport_bulk_split {s : Solution} {t U P ε R : ℝ} (x e : Vec) (i : Fin 3) + (htU : t≤U) (hε : 0<ε) (hRt : R transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) = + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P s.f t x e i z)+ + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z) := by + let A := ball (0:Vec) R \ ball (0:Vec) ε + let C := closedBall (0:Vec) R \ ball (0:Vec) ε + let U₀ := retardedSpaceDomain t 0 + let F : Phase → ℝ := fun p => s.f (t-coneRadius 0 p.1,x+p.1,p.2) + let D : Phase → ℝ := fun p => divergence (transportSpatialFlux p.2 e i) p.1 + let V : Phase → ℝ := fun p => divergence (fun w => transportConeCoefficient i (p.1,w) • + (coneSpatialCoefficient 0 p.1 w e • coneLorentz s t x (p.1,w))) p.2 + have hfC : ContinuousOn F (U₀ ×ˢ univ) := shifted_particle_continuousOn x htU hf + have hDC : ContinuousOn D (U₀ ×ˢ univ) := (continuousOn_transportSpatialDivergence e i).mono + (by intro p hp; exact hp.1.1.symm) + have hVC : ContinuousOn V (U₀ ×ˢ univ) := transport_velocity_divergence_continuousOn x e i hE hB + have hzero (z : Vec) (hz : z∈U₀) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + apply hP _ ⟨hz.2.le,?_⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + dsimp [coneRadius] + linarith [norm_nonneg ((0:Vec)-z)] + have hAU : A⊆C := fun z hz => ⟨ball_subset_closedBall hz.1,hz.2⟩ + have hCU : C⊆U₀ := by + intro z hz + have hrz : ‖z‖≤R ∧ ε≤‖z‖ := by simpa only [C,Set.mem_sdiff,mem_closedBall,mem_ball,dist_zero_right,not_lt] using hz + exact ⟨(norm_pos_iff.mp (hε.trans_le hrz.2)).symm,by simpa [coneRadius] using sub_pos.mpr (hrz.1.trans_lt hRt)⟩ + have hcompact : IsCompact C := (isCompact_closedBall _ _).diff isOpen_ball + have hdI : IntegrableOn (fun z => ∫ v, F (z,v)*D (z,v)) A := + ((continuousOn_integral_uniform_support (isCompact_closedBall (0:Vec) P) (hfC.mul hDC) + (by intro z hz v hv; dsimp only [Pi.mul_apply]; rw [hzero z hz v hv,zero_mul])).mono hCU).integrableOn_compact hcompact |>.mono_set hAU + have hvI : IntegrableOn (fun z => ∫ v, F (z,v)*V (z,v)) A := + ((continuousOn_integral_uniform_support (isCompact_closedBall (0:Vec) P) (hfC.mul hVC) + (by intro z hz v hv; dsimp only [Pi.mul_apply]; rw [hzero z hz v hv,zero_mul])).mono hCU).integrableOn_compact hcompact |>.mono_set hAU + have hdi (z : Vec) (hz : z∈U₀) : Integrable (fun v => F (z,v)*D (z,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hfC.mul hDC).comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hz,mem_univ _⟩) + · exact compactSupport_of_zero_off (isCompact_closedBall (0:Vec) P) (fun v hv => by rw [hzero z hz v hv,zero_mul]) + have hvi (z : Vec) (hz : z∈U₀) : Integrable (fun v => F (z,v)*V (z,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hfC.mul hVC).comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hz,mem_univ _⟩) + · exact compactSupport_of_zero_off (isCompact_closedBall (0:Vec) P) (fun v hv => by rw [hzero z hz v hv,zero_mul]) + calc + _ = ∫ z in A, (∫ v,F (z,v)*D (z,v))+(∫ v,F (z,v)*V (z,v)) := by + apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + simp only [mul_add] + exact integral_add (hdi z (hCU (hAU hz))) (hvi z (hCU (hAU hz))) + _ = (∫ z in A,∫ v,F (z,v)*D (z,v))+(∫ z in A,∫ v,F (z,v)*V (z,v)) := integral_add hdI hvI + _ = _ := by + congr 1 + · apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + rw [transportSingularBulk] + simpa only [F,D,mul_comm] using + (setIntegral_eq_integral_of_forall_compl_eq_zero (μ:=volume) (f:=fun v => F (z,v)*D (z,v)) (fun v hv => by + change F (z,v)*D (z,v)=0 + rw [hzero z (hCU (hAU hz)) v hv,zero_mul])).symm + · apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + exact (setIntegral_eq_integral_of_forall_compl_eq_zero (fun v hv => by + change F (z,v)*V (z,v)=0 + rw [hzero z (hCU (hAU hz)) v hv,zero_mul])).symm + +lemma transport_sphere_support {s : Solution} {t U P r : ℝ} (x e : Vec) (i : Fin 3) + (hr : 0≤r) (hrt : r≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ n : Sphere,r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • + transportSpatialFlux v e i (r • n.1)) ∂sphereMeasure) = + (∫ n : Sphere,r^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • + transportSpatialFlux v e i (r • n.1)) ∂sphereMeasure) := by + apply integral_congr_ae + exact ae_of_all _ (fun n => by + dsimp only + congr 2 + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ ⟨by linarith,by linarith⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_smul]) + +lemma abs_sub_sub_add_le (a b c d : ℝ) : + |a-b-(c+d)|≤|a|+|b|+|c|+|d| := by + linarith [abs_sub a b,abs_sub (a-b) (c+d),abs_add_le c d] + +lemma magnetic_transport_annulus_gradient_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N ε R : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε, ∫ v, + transportConeCoefficient i (z,v)*fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨Cb,hCb,hcb⟩ := transport_sphere_boundary_bound P A e i hA + obtain ⟨Cv,hCv,hcv⟩ := transport_velocity_annulus_bound P A M H e i hA hH + obtain ⟨C,D,hC,hD,hcd⟩ := physical_transport_annulus_log_bound P H A e i hA + refine ⟨2*Cb+Cv+1,C,D,by positivity,hC,hD,?_⟩ + intro s U t N ε R x ht htU hUH hN hε hεR hRt hf hE hB hc heq hfA hP hEB hfN + have hfc : ContinuousOn s.f {p | p.1∈Icc (0:ℝ) U} := hf.continuousOn.mono (fun p hp => hp.1) + have hfd (u : ℝ) (hu : u∈Icc (0:ℝ) U) (v : Vec) : Differentiable ℝ (fun y => s.f (u,y,v)) := by + have hh : ContDiff ℝ 1 (fun y => s.f (u,y,v)) := by + apply contDiffOn_univ.mp + exact hf.comp ((contDiff_const.prodMk (contDiff_id.prodMk contDiff_const)).contDiffOn) + (fun _ _ => hu.1) + exact hh.differentiable (by simp) + have hbR := hcb s.f t U R x (hε.trans_le hεR) hRt.le htU hfA + have hbε := hcb s.f t U ε x hε (hεR.trans hRt.le) htU hfA + have hbv := hcv s U t ε R x hε hεR hRt.le htU hUH hfA hEB + have hbs := hcd U t N ε R s.f ht htU hUH hN hε hRt.le hfc hfd hfA hfN x + rw [magnetic_transport_division_annulus hf hE hB hc heq htU hε hεR hRt x e i, + transport_sphere_support x e i (hε.le.trans hεR) hRt.le htU hP, + transport_sphere_support x e i hε.le (hεR.trans hRt.le) htU hP, + transport_bulk_split x e i htU hε hRt hfc hE hB hP] + calc + _ ≤ |∫ n : Sphere,R^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-R,x+R • n.1,v) • + transportSpatialFlux v e i (R • n.1)) ∂sphereMeasure|+ + |∫ n : Sphere,ε^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-ε,x+ε • n.1,v) • + transportSpatialFlux v e i (ε • n.1)) ∂sphereMeasure|+ + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportSingularBulk P s.f t x e i z|+ + |∫ z in ball (0:Vec) R \ ball (0:Vec) ε,transportVelocityBulk P s t x e i z| := by + exact abs_sub_sub_add_le _ _ _ _ + _ ≤ _ := by linarith + +end RVM.Magnetic + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +lemma sourceFixedFlux_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖sourceFixedFlux v E B e i n.1‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P) ×ˢ + (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M) + have hK : IsCompact K := ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : ContinuousOn (sourceJointFlux e i) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + have hz : p.1.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact (sourceJointFlux_contDiffAt e i hz).continuousAt.continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,v),(E,B)) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_closedBall,dist_zero_right] using hv⟩, + by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩ + +lemma source_sphere_rescale (P : ℝ) (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {r : ℝ} (hr : 0 by + dsimp only + rw [sourceFixedFlux_homogeneous v _ _ e i hr] + simp only [smul_smul,mul_comm]) + rw [he,dot_smul_right] + field_simp + +lemma source_sphere_boundary_bound (P M A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t U r : ℝ) (x : Vec), + 0 s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i n.1) (C:=A*K) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf _ hs _ v) + (hkb n v _ _ (by simpa only [mem_closedBall,dist_zero_right] using hv) + (hEB _ hs _).1 (hEB _ hs _).2) (norm_nonneg _) hA) + have hd := abs_real_inner_le_norm n.1 + (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i n.1) + rw [sphere_norm,one_mul] at hd + rw [norm_mul,Real.norm_of_nonneg hr.le,dot_eq_inner,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (hd.trans (by + simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,C,mul_assoc,mul_comm,mul_left_comm] using hh)) hr.le + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_comm,mul_assoc,mul_left_comm] using hh + +def sourceDivisionBulk (P : ℝ) (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) (z : Vec) : ℝ := + ∫ v in closedBall (0:Vec) P,s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) + +lemma inverse_source_majorant {a b Q r H : ℝ} (ha : 0≤a) (hb : 0≤b) (hQ : 0≤Q) + (hr : 0 sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z|≤ + 3*Ks/‖z‖^2+(3*Ks/‖z‖)*Q := by + have hh := hks s t ‖z‖ x v n hE hB hzpos (hzr.1.trans hRt) hv + rw [hn] at hh + apply (hh (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2).trans + exact add_le_add le_rfl (mul_le_mul_of_nonneg_left + (max_le (hDF _ hu _).1 (hDF _ hu _).2) (by positivity)) + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) + (C:=A*((3*Ks+(3*Ks*Q+Kv)*H)/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hvb := hkv s t x z v hzn hvP (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + rw [hrad] at hvb + rw [Real.norm_eq_abs,abs_mul] + apply mul_le_mul (hf _ ⟨hu.1.le,hu.2⟩ _ v) _ (abs_nonneg _) hA + exact ((abs_add_le _ _).trans (add_le_add (hs v hvP) hvb)).trans + (inverse_source_majorant (by positivity) hKv hQ hzpos (hzr.1.le.trans (hRt.le.trans (htU.trans hUH))))) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,L,V]; ring) + have hh := norm_integral_annulus_inverse_sq_le hε hεR hL hb + rw [Real.norm_eq_abs] at hh + apply hh.trans + calc + 4*Real.pi*L*R ≤ 4*Real.pi*L*H := by gcongr; exact hRt.le.trans (htU.trans hUH) + _ ≤ C*(H+H^2*(1+Q)) := by + dsimp [L,C] + have hcoef : 3*Ks+(3*Ks*Q+Kv)*H≤(3*Ks+Kv)*(1+H*(1+Q)) := by + nlinarith [mul_nonneg hKs hH,mul_nonneg (mul_nonneg hKv hH) hQ] + have hh' := mul_le_mul_of_nonneg_left hcoef (show 0≤4*Real.pi*V*H by positivity) + nlinarith + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/UniformPopulation.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/UniformPopulation.lean new file mode 100644 index 0000000000000000000000000000000000000000..98d40a6c9c72c94c6c65554b93cdb84853fa1c3a --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/UniformPopulation.lean @@ -0,0 +1,300 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.Bootstrap + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +theorem uniform_population_bounded_of_increment {ι α : Type*} + {V : ι → α → ℝ → Vec} {K : ι → Set α} {Q : ι → ℝ → ℝ} + {T : ι → ℝ} {H M A P₀ Q₀ : ℝ} + (hT : ∀ i, T i ≤ H) (hQ₀ : ∀ i, Q i 0 ≤ Q₀) + (hQ : ∀ i, ContinuousOn (Q i) (Ico 0 (T i))) + (hV : ∀ i z, z∈K i → ContinuousOn (V i z) (Ico 0 (T i))) + (hmax : ∀ i t, t∈Ico 0 (T i) → ∀ z∈K i, q (V i z t) ≤ Q i t) + (hattain : ∀ i t, t∈Ico 0 (T i) → ∃ z∈K i, Q i t=q (V i z t)) + (hM : 0 < M) (hA : 0 < A) + (hincrement : ∀ i, PopulationIncrement (V i) (K i) (T i) M A P₀) : + ∃ C : ℝ, ∀ i t, t∈Ico 0 (T i) → ∀ z∈K i, q (V i z t) ≤ C := by + classical + by_contra hnb + push Not at hnb + have hunbdd : ∀ R : ℝ, ∃ i t, t∈Ico 0 (T i) ∧ R ≤ Q i t := by + intro R + obtain ⟨i,t,ht,z,hz,he⟩ := hnb R + exact ⟨i,t,ht,he.le.trans (hmax i t ht z hz)⟩ + obtain ⟨N,hN⟩ := pow_unbounded_of_one_lt (max Q₀ P₀) (by norm_num : (1:ℝ)<2) + let R : ℕ → ℝ := fun n=>(2:ℝ)^(N+n) + have hRpos (n : ℕ) : 0{t | ∃ i, t∈Ioo 0 (T i) ∧ Q i t=R n ∧ + ∀ u∈Ico 0 t,Q i usInf (S n) + have htinf (n : ℕ) : tinf n ≤ H := by + obtain ⟨t,ht⟩ := hne n + have hh := csInf_le (hbdd n) ht + rcases ht with ⟨i,hi,he,hfirst⟩ + exact hh.trans (hi.2.le.trans (hT i)) + let L := Real.log 1026+(N+1)*Real.log 2+Real.log 2 + have hL : 0 < L := by + have h1 : 0 < Real.log 1026 := Real.log_pos (by norm_num) + have h2 : 0 ≤ Real.log 2 := Real.log_nonneg (by norm_num) + dsimp only [L] + positivity + let c := min ((4*1024*M)^2)⁻¹ (4*1024^2*A*L)⁻¹ + have hc : 0 < c := by dsimp only [c]; positivity + apply no_bounded_harmonic_gaps hc htinf + intro n + have hh : tinf n+c/(n+1) ≤ tinf (n+1) := by + apply le_csInf (hne (n+1)) + rintro τ ⟨i,hτ,hbig,hfirst⟩ + have hτ' : τ∈Ico 0 (T i) := ⟨hτ.1.le,hτ.2⟩ + have hbounded {u : ℝ} (hu : u∈Icc 0 τ) : Q i u≤R (n+1) := + first_level_bound hbig hfirst u hu + obtain ⟨tl,htl,htle,hfirstl⟩ := first_level_time (hQ i) (hR0 i n) + ⟨τ,hτ',by rw [hbig,hdouble]; linarith only [hRpos n]⟩ + have hinf : tinf n≤tl := csInf_le (hbdd n) ⟨i,htl,htle,hfirstl⟩ + obtain ⟨z,hz,hze⟩ := hattain i τ hτ' + have hzenergy : q (V i z τ)=R (n+1) := hze.symm.trans hbig + have hzero : 0⟨hu.1,hu.2.trans_lt hτ.2⟩)) + ((hmax i 0 ⟨le_rfl,hzero⟩ z hz).trans_lt (hR0 i n)) + (show R n linarith only [hlo,hup,hRpos n] + have hi := hH (N+(n+1)) s τ hs.1 hs.2.le le_rfl hband + rw [hp] at hi + have hlow : R (n+1)/2 ≤ ‖V i z τ-V i z s‖ := by + have hh := q_lipschitz (V i z s) (V i z τ) + rw [hzenergy,hse] at hh + have heq : R (n+1)-R n=R (n+1)/2 := by rw [hdouble]; ring + rw [heq,abs_of_pos (half_pos (hRpos (n+1)))] at hh + exact hh + have heq : M*(1024*R (n+1))*Real.sqrt Δ+ + A*Δ*((1024*R (n+1))^2*Real.log (2+1024*R (n+1))/R (n+1)) = + R (n+1)*(1024*M*Real.sqrt Δ+1024^2*A*Δ*Real.log (2+1024*R (n+1))) := by + field_simp + change ‖V i z τ-V i z s‖ ≤ M*(1024*R (n+1))*Real.sqrt Δ+ + A*Δ*((1024*R (n+1))^2*Real.log (2+1024*R (n+1))/R (n+1)) at hi + rw [heq] at hi + have hres : (1:ℝ)/2≤1024*M*Real.sqrt Δ+1024^2*A*Δ*Real.log (2+1024*R (n+1)) := by + have hh := hlow.trans hi + have hpR := hRpos (n+1) + nlinarith only [hh,hpR] + have hlog : Real.log (2+1024*R (n+1))≤L*(n+1) := by + simpa only [R,L,Nat.add_assoc,Nat.add_comm,Nat.add_left_comm,Nat.cast_add,Nat.cast_one] + using doubling_log_bound (N+1) n + have hdelay : c/(n+1)≤Δ := by + apply doubling_interval_lower_bound hM hA hL hΔ + exact hres.trans (add_le_add le_rfl + (mul_le_mul_of_nonneg_left hlog (mul_nonneg (mul_nonneg (by positivity) hA.le) hΔ))) + dsimp only [Δ] at hdelay + linarith only [hdelay,hst,hinf] + linarith only [hh] + +theorem uniform_closed_population_bounded_of_increment {ι α : Type*} + {V : ι → α → ℝ → Vec} {K : ι → Set α} {Q : ι → ℝ → ℝ} + {T : ι → ℝ} {H M A P₀ Q₀ : ℝ} + (hpos : ∀ i, 0 < T i) (hT : ∀ i, T i ≤ H) (hQ₀ : ∀ i, Q i 0 ≤ Q₀) + (hQ : ∀ i, ContinuousOn (Q i) (Ico 0 (T i))) + (hV : ∀ i z, z ∈ K i → ContinuousOn (V i z) (Icc 0 (T i))) + (hmax : ∀ i t, t ∈ Ico 0 (T i) → ∀ z ∈ K i, q (V i z t) ≤ Q i t) + (hattain : ∀ i t, t ∈ Ico 0 (T i) → ∃ z ∈ K i, Q i t = q (V i z t)) + (hM : 0 < M) (hA : 0 < A) + (hincrement : ∀ i, PopulationIncrement (V i) (K i) (T i) M A P₀) : + ∃ C : ℝ, ∀ i t, t ∈ Icc 0 (T i) → ∀ z ∈ K i, q (V i z t) ≤ C := by + obtain ⟨C,hC⟩ := uniform_population_bounded_of_increment hT hQ₀ hQ + (fun i z hz => (hV i z hz).mono Ico_subset_Icc_self) hmax hattain hM hA hincrement + refine ⟨C,?_⟩ + intro i t ht z hz + have he : closure (Ico (0:ℝ) (T i)) = Icc 0 (T i) := closure_Ico (ne_of_lt (hpos i)) + apply le_on_closure (fun t ht => hC i t ht z hz) + · rw [he] + exact ((contDiff_q (k:=1)).continuous.comp_continuousOn (hV i z hz)) + · exact continuousOn_const + · rwa [he] + +theorem compact_nonempty_uniform_population_bounded_of_increment + {ι α : Type*} [TopologicalSpace α] + {V : ι → α → ℝ → Vec} {K : ι → Set α} {T : ι → ℝ} + {H M A P₀ Q₀ : ℝ} + (hK : ∀ i, IsCompact (K i)) (hne : ∀ i, (K i).Nonempty) + (hV : ∀ i, Continuous (fun p : ℝ × α => V i p.2 p.1)) + (hpos : ∀ i, 0 < T i) (hT : ∀ i, T i ≤ H) + (hinit : ∀ i z, z ∈ K i → q (V i z 0) ≤ Q₀) + (hM : 0 < M) (hA : 0 < A) + (hincrement : ∀ i, PopulationIncrement (V i) (K i) (T i) M A P₀) : + ∃ C : ℝ, ∀ i t, t ∈ Icc 0 (T i) → ∀ z ∈ K i, q (V i z t) ≤ C := by + let Q : ι → ℝ → ℝ := fun i t => sSup ((fun z => q (V i z t)) '' K i) + have hc (i : ι) : Continuous (fun p : ℝ × α => q (V i p.2 p.1)) := + (contDiff_q (k:=1)).continuous.comp (hV i) + have hlabel (i : ι) (t : ℝ) : Continuous (fun z => q (V i z t)) := by + have ht : Continuous (fun z : α => V i z t) := + (hV i).comp (Continuous.prodMk_right t) + exact (contDiff_q (k:=1)).continuous.comp ht + apply uniform_closed_population_bounded_of_increment (Q:=Q) hpos hT + · intro i + exact csSup_le ((hne i).image _) (fun y hy => by + obtain ⟨z,hz,he⟩ := hy + rw [←he] + exact hinit i z hz) + · intro i + exact ((hK i).continuous_sSup (f:=fun t z => q (V i z t)) (hc i)).continuousOn + · intro i z hz + exact ((hV i).comp (Continuous.prodMk_left z)).continuousOn + · intro i t ht z hz + exact le_csSup ((hK i).image (hlabel i t)).bddAbove ⟨z,hz,rfl⟩ + · intro i t ht + exact (hK i).exists_sSup_image_eq (hne i) (hlabel i t).continuousOn + · exact hM + · exact hA + · exact hincrement + +theorem compact_uniform_population_bounded_of_increment + {ι α : Type*} [TopologicalSpace α] + {V : ι → α → ℝ → Vec} {K : ι → Set α} {T : ι → ℝ} + {H M A P₀ Q₀ : ℝ} + (hK : ∀ i, IsCompact (K i)) + (hV : ∀ i, Continuous (fun p : ℝ × α => V i p.2 p.1)) + (hpos : ∀ i, 0 < T i) (hT : ∀ i, T i ≤ H) + (hinit : ∀ i z, z ∈ K i → q (V i z 0) ≤ Q₀) + (hM : 0 < M) (hA : 0 < A) + (hincrement : ∀ i, PopulationIncrement (V i) (K i) (T i) M A P₀) : + ∃ C : ℝ, ∀ i t, t ∈ Icc 0 (T i) → ∀ z ∈ K i, q (V i z t) ≤ C := by + let J := {i : ι // (K i).Nonempty} + obtain ⟨C,hC⟩ := compact_nonempty_uniform_population_bounded_of_increment + (ι:=J) (V:=fun i=>V i.val) (K:=fun i=>K i.val) + (fun i => hK i.val) (fun i => i.property) (fun i => hV i.val) + (fun i => hpos i.val) (fun i => hT i.val) (fun i => hinit i.val) + hM hA (fun i => hincrement i.val) + refine ⟨C,?_⟩ + intro i t ht z hz + exact hC ⟨i,⟨z,hz⟩⟩ t ht z hz + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma PopulationIncrement.congr_on_prefix {α : Type*} + {V W : α → ℝ → Vec} {K : Set α} {T M A P₀ : ℝ} + (h : PopulationIncrement V K T M A P₀) + (heq : ∀ z ∈ K, ∀ t ∈ Icc 0 T, V z t = W z t) : + PopulationIncrement W K T M A P₀ := by + intro τ hτ k hk hp z hz n a b ha hab hb hband + have hsub : Icc (0:ℝ) τ ⊆ Icc 0 T := Icc_subset_Icc le_rfl hτ.2.le + have hpre : ∀ t ∈ Icc 0 τ, ∀ y ∈ K, 1024*q (V y t) ≤ (2:ℝ)^k := by + intro t ht y hy + rw [heq y hy t (hsub ht)] + exact hp t ht y hy + have hh := h τ hτ k hk hpre z hz n a b ha hab hb + (fun t ht => by + rw [heq z hz t ⟨ha.trans ht.1,ht.2.trans (hb.trans hτ.2.le)⟩] + exact hband t ht) + rwa [heq z hz b ⟨ha.trans hab,hb.trans hτ.2.le⟩, + heq z hz a ⟨ha,hab.trans (hb.trans hτ.2.le)⟩] at hh + +theorem Admissible.uniform_physical_support_of_increment + {ι : Type*} {d : Datum} (hd : Admissible d) + {s : ι → Solution} {T : ι → ℝ} {H M A P₀ : ℝ} + (hpos : ∀ i, 0 < T i) (hT : ∀ i, T i ≤ H) + (F : ∀ i, PhaseFlowOn (s i).E (s i).B (T i)) + (hs : ∀ i, EnergyPrefix (s i) (T i)) + (h0 : ∀ i z, (s i).f (0,z) = d.f₀ z) + (hM : 0 < M) (hA : 0 < A) + (hincrement : ∀ i, PopulationIncrement (fun z t => ((F i).flow z t).2) + (tsupport d.f₀) (T i) M A P₀) : + ∃ P : ℝ, ∀ i t, t ∈ Icc 0 (T i) → ∀ x v, P < ‖v‖ → (s i).f (t,x,v) = 0 := by + have hK : IsCompact (tsupport d.f₀) := hd.2.1 + have hcq : Continuous (fun z : Phase => q z.2) := + (contDiff_q (k:=1)).continuous.comp continuous_snd + obtain ⟨Q₀,hQ₀⟩ := (hK.image hcq).bddAbove + let V : ι → Phase → ℝ → Vec := fun i z t => (prefixFlow (F i).flow (T i) z t).2 + have heq (i : ι) (z : Phase) (t : ℝ) (ht : t ∈ Icc 0 (T i)) : + ((F i).flow z t).2 = V i z t := by + simp only [V,prefixFlow,prefixClamp_eq ht] + have hinc (i : ι) : PopulationIncrement (V i) (tsupport d.f₀) (T i) M A P₀ := + (hincrement i).congr_on_prefix (fun z hz t ht => heq i z t ht) + obtain ⟨P,hP⟩ := compact_uniform_population_bounded_of_increment + (K:=fun _ : ι => tsupport d.f₀) (V:=V) (Q₀:=Q₀) + (fun _ => hK) (fun i => ((F i).continuous_prefixFlow (hs i) (hpos i).le).snd) + hpos hT + (fun i z hz => by + rw [←heq i z 0 ⟨le_rfl,(hpos i).le⟩,(F i).initial] + exact hQ₀ ⟨z,hz,rfl⟩) + hM hA hinc + refine ⟨P,?_⟩ + intro i t ht x v hv + by_contra hn + have hflow : ∀ z, (s i).f (0,z) ≠ 0 → ∀ r ∈ Icc 0 (T i), q ((F i).flow z r).2 ≤ P := by + intro z hz r hr + have hz' : z ∈ tsupport d.f₀ := subset_tsupport _ (by change d.f₀ z ≠ 0; rwa [←h0 i z]) + rw [heq i z r hr] + exact hP i r hr z hz' + have hb := (F i).eulerian_supported_momentum (hs i) hflow ht x v hn + exact (not_lt_of_ge hb) (hv.trans (norm_lt_q v)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Population/UnselectedCover.lean b/lean/OAI/Analysis/VlasovMaxwell/Population/UnselectedCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..32f17ed534e90d9f762ea8e315c7db9c0daba91f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Population/UnselectedCover.lean @@ -0,0 +1,592 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates +import OAI.Analysis.VlasovMaxwell.Population.SelectedRemainder +import OAI.Analysis.VlasovMaxwell.Population.MagneticEstimates +import OAI.Analysis.VlasovMaxwell.Population.TransportRemainder +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedTransportNear +import OAI.Analysis.VlasovMaxwell.Population.DirectExpandedAssemble + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.direct_source_representative_cost {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (k : Fin 4→ℕ) {a b : ℝ} (ha : 0≤a) (hb : b≤T) : + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b))≤ + ENNReal.ofReal 10240*(representativeGoodCost s F zX w k a b+ + representativeMagneticCost s F zX w k a b) := by + have hc := (F.continuous_prefixFlow hs hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hp : 0(prefixFlow F.flow T zX t).1) T J + (directSourceTriangleKernel s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) T) p := by + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J p)).trans + by_cases ht : p.1.1∈J + · rw [indicator_of_mem ht] + by_cases hp : p∈trianglePhaseDomain T + · have htime := hJT ht + have hσ : p.1.2.1∈Icc 0 T := ⟨hp.2.1.le,hp.2.2.le.trans htime.2⟩ + have hn := ((W p.1.1).le_opNorm (triangleConeKernel s F.flow zX T + (sourceOnlyConeKernel s F.flow zX) p)).trans + (mul_le_mul_of_nonneg_right (hW _ ht) (norm_nonneg _)) + rw [one_mul] at hn + apply (ENNReal.ofReal_le_ofReal hn).trans_eq + rw [triangleConeKernel_source hp] + simp only [directTriangleDensity,indicator_of_mem (show p∈directTriangleDomain T J from ⟨hp,ht⟩), + prefixParticle,prefixFlow,prefixClamp_eq htime,prefixClamp_eq hσ,directSourceTriangleKernel, + prefixField,sourceAcceleration,norm_smul,Real.norm_eq_abs, + abs_of_nonneg (sq_nonneg (p.1.1-p.1.2.1)),ENNReal.ofReal_mul (sq_nonneg _)] + · simp only [triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + · simp only [indicator_of_notMem ht,zero_apply,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +abbrev UnselectedCoverIndex (N : ℕ) := (Fin 4→ℕ) ⊕ (DirectOuterIndex N×ℕ) + +def unselectedCoverBin (T w : ℝ) {N : ℕ} : UnselectedCoverIndex N→ClosedConeBin := + Sum.elim (representativeClosedBin T w) (fun i=>directOuterBin T w i.1 i.2) + +def unselectedCoverSector (P M A w I : ℝ) (N : ℕ) : Set (UnselectedCoverIndex N) := + {i | match i with + | .inl k => k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k + | .inr i => sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val} + +lemma physical_remaining_active_finite_cover {T P w t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} {N : ℕ} {k : Fin 4→ℕ} (hP : 0≤P) (hwP : w≤P) + (hN : 8192*P≤(2:ℝ)^N) (ht : t∈J) (hσ : σ∈Icc 0 t) + (hb : q (V t)∈Icc (w/8) (8*w)) (n : Sphere) (v : Vec) + (hv : 1024*q v≤P) (hsource : sourceRepresentative (k 0)≤P) + (hpos : 0 rfl + refine ⟨(i,k 3),⟨?_,hrem⟩,?_⟩ + · change sourceRepresentative (k 0)≤128*P + linarith only [hsource,hP] + · have hm := relativePhysicalFactor_positive_closedBin ht hσ hb hrel + simpa only [physicalBinPhaseSet,mem_ofPred_eq,directOuterBin,he,show (i 3).val=j from rfl] using hm + +lemma physical_unselected_active_cover {T P M A w I t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} {N : ℕ} (hP : 0≤P) (hwP : w≤P) (hN : 8192*P≤(2:ℝ)^N) + (ht : t∈J) (hσ : σ∈Icc 0 t) (hb : q (V t)∈Icc (w/8) (8*w)) + (n : Sphere) (v : Vec) (hv : 1024*q v≤P) + (hc : selectedDyadicCutoff (bulkSelection P M A w I)ᶜ + (physicalCutoffCoordinates T (t-σ) n.1 v (V t))≠0) : + ∃i∈unselectedCoverSector P M A w I N, + ((t,σ,n),v)∈physicalBinPhaseSet V (unselectedCoverBin T w i) J := by + obtain ⟨k,hk,hpos⟩ := selectedDyadicCutoff_active hc + have hsource : sourceRepresentative (k 0)≤P := + (sourceRepresentative_mem_range (dyadicMultiFactor_positive_bands hpos 0) hv).2 + have hfloor := physicalCutoff_positive_source_floor (sphere_norm n) hpos + by_cases hrem : cappedRepresentative (k 2)≤16384*cappedRepresentative (k 1) + · obtain ⟨i,hi,hmem⟩ := physical_remaining_active_finite_cover + (T:=T) (P:=P) (w:=w) (V:=V) + (J:=J) (N:=N) (k:=k) hP hwP hN ht hσ hb n v hv hsource hpos hrem + exact ⟨.inr i,hi,hmem⟩ + · have hφ := cappedRepresentative_pos (k 2) + have hn := lt_of_not_ge hrem + have hs : k∈representativeSmallSector P := ⟨hsource,hfloor,by linarith⟩ + have hnot : ¬representativeSelected P M A w I k := by + intro hsel + exact hk ⟨by linarith,hsel⟩ + refine ⟨.inl k,⟨hs,hnot⟩,?_⟩ + exact physicalCutoff_positive_closedBin ht hσ hb hpos + +lemma PhaseFlowOn.bulkUnselectedCone_support {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (K : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hP : 0≤P) (hwP : w≤P) (N : ℕ) (hN : 8192*P≤(2:ℝ)^N) + (hphysical : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) + {p : TrianglePhase} (hp : selectedConeTriangle s F.flow zX T + (bulkSelection P M A w I)ᶜ K W J p≠0) : + ∃i∈unselectedCoverSector P M A w I N, + p∈physicalBinPhaseSet (fun t=>(prefixFlow F.flow T zX t).2) (unselectedCoverBin T w i) J := by + obtain ⟨ht,hσ,hb,hv,hc⟩ := F.selectedConeTriangle_physical_nonzero zX + (bulkSelection P M A w I)ᶜ K W hJT hband hphysical hp + exact physical_unselected_active_cover (T:=T) (P:=P) (M:=M) (A:=A) (w:=w) (I:=I) + (V:=fun t=>(prefixFlow F.flow T zX t).2) (J:=J) (N:=N) + hP hwP hN ht hσ hb p.1.2.2 p.2 hv hc + +lemma Admissible.unselected_small_source_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A : ℝ,1≤M → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let R := {k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + (∑'k : Fin 4→ℕ,R.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cg,hCg,hgood⟩ := hd.unselected_good_uniform T₀ + obtain ⟨Cm,hCm,hmag⟩ := hd.magnetic_small_uniform T₀ + refine ⟨10240*(Cg+Cm),by positivity,?_⟩ + intro M A hM hA + filter_upwards [hgood M A (zero_lt_one.trans_le hM) hA] with P hg + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsource HZ + dsimp only + let R := {k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + let G := fun k=>representativeGoodCost s F zX w k a b + let H := fun k=>representativeMagneticCost s F zX w k a b + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hPB : P*Real.sqrt I≤B := le_add_of_nonneg_right (by positivity) + have hsum : (∑'k : Fin 4→ℕ,R.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal 10240*((∑'k,R.indicator G k)+(∑'k,R.indicator H k)) := by + rw [←ENNReal.tsum_add,←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · simp only [indicator_of_mem hk] + exact F.direct_source_representative_cost hs.energyPrefix hT zX k ha hb + · simp only [indicator_of_notMem hk,zero_add,mul_zero,le_refl] + have hg' : (∑'k,R.indicator G k)≤ENNReal.ofReal (Cg*B) := by + apply (hg s T F hs hT hTT zX a b I w hzX ha hb hab hI hJI + (zero_lt_one.trans_le hw) hsource HZ).trans + apply ENNReal.ofReal_le_ofReal + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hPB hCg + have hm : (∑'k,R.indicator H k)≤ENNReal.ofReal (Cm*B) := by + calc + _≤∑'k,(centralIndexSector P).indicator H k := by + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · rw [indicator_of_mem hk,indicator_of_mem (representativeSmallSector_subset_centralIndexSector P hk.1)] + · rw [indicator_of_notMem hk]; exact bot_le + _≤_ := by + rw [tsum_centralIndexSector] + exact hmag M A P hM hA.le hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + apply hsum.trans + apply (mul_le_mul' le_rfl (add_le_add hg' hm)).trans_eq + rw [←ENNReal.ofReal_add (mul_nonneg hCg hB) (mul_nonneg hCm hB), + ←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10240)] + congr 1 + ring + +lemma unselectedCover_tsum {N : ℕ} (T P M A w I : ℝ) (f : ClosedConeBin→ℝ≥0∞) : + (∑'i : UnselectedCoverIndex N,(unselectedCoverSector P M A w I N).indicator + (fun i=>f (unselectedCoverBin T w i)) i)= + (∑'k : Fin 4→ℕ,({k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k}).indicator + (fun k=>f (representativeClosedBin T w k)) k)+ + (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>f (directOuterBin T w i.1 i.2)) i) := by + rw [Summable.tsum_sum ENNReal.summable ENNReal.summable] + rfl + +lemma PhaseFlowOn.selectedSourceTriangle_v_integral_le {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {W : ℝ→Vec→L[ℝ]Vec} {J : Set ℝ} (hJT : J⊆Icc 0 T) + (hcontract : ∀t∈J,‖W t‖≤1) (B : ClosedConeBin) (z : ConeCoordinate) + (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (sourceOnlyConeKernel s F.flow zX) W J (z,v)‖)≤ + physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z := by + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hh : (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (sourceOnlyConeKernel s F.flow zX) W J (z,v)‖)≤ + ∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + directTriangleDensity s X T J (directSourceTriangleKernel s X V T) (z,v) := by + exact lintegral_mono (fun v=>F.selectedSourceTriangle_direct_le zX Q hJT W hcontract (z,v)) + exact hh.trans (directSourceTriangle_bin_bound hJT B hz) + +lemma PhaseFlowOn.selectedSourceTriangle_bin_integral_le {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {W : ℝ→Vec→L[ℝ]Vec} {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) (hcontract : ∀t∈J,‖W t‖≤1) (B : ClosedConeBin) : + (∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet B z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (sourceOnlyConeKernel s F.flow zX) W J (z,v)‖ ∂volume + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B J)≤ + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B J := by + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact F.selectedSourceTriangle_v_integral_le zX Q hJT hcontract B z hz + +lemma PhaseFlowOn.unselectedSourceTriangle_physical_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hcontract : ∀t∈J,‖W t‖≤1) (hP : 0≤P) (hwP : w≤P) + (N : ℕ) (hN : 8192*P≤(2:ℝ)^N) + (hphysical : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) : + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I)ᶜ + (sourceOnlyConeKernel s F.flow zX) W J p‖ ∂trianglePhaseMeasure)≤ + ∑'i : UnselectedCoverIndex N,(unselectedCoverSector P M A w I N).indicator + (fun i=>∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (unselectedCoverBin T w i) z + ∂physicalBinMeasure V (unselectedCoverBin T w i) J) i := by + dsimp only + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hA : ContinuousOn (sourceOnlyConeKernel s F.flow zX) (coneKernelInterior T) := + (F.sourceOnlyConeKernel_continuousOn hs zX).mono inter_subset_left + have hg := (F.selectedConeTriangle_measurable hs zX (bulkSelection P M A w I)ᶜ hA hW hJ).norm.ennreal_ofReal + have hcover := physicalBinFamily_cover_lintegral hV hJ (unselectedCoverBin T w) + (unselectedCoverSector P M A w I N) hg + refine (hcover (by + intro p hp + apply F.bulkUnselectedCone_support zX _ W hJT hband hP hwP N hN hphysical + intro he + exact hp (by rw [he,norm_zero,ENNReal.ofReal_zero]))).trans ?_ + apply ENNReal.tsum_le_tsum + intro i + by_cases hi : i∈unselectedCoverSector P M A w I N + · simp only [indicator_of_mem hi] + exact F.selectedSourceTriangle_bin_integral_le hs hT zX _ hJ hJT hcontract _ + · simp only [indicator_of_notMem hi,le_refl] + +lemma PhaseFlowOn.selectedTransportTriangle_direct_le {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (W : ℝ→Vec→L[ℝ]Vec) (hW : ∀t∈J,‖W t‖≤1) + (p : TrianglePhase) : + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (transportOnlyConeKernel F.flow zX) W J p‖≤ + directTriangleDensity s (fun t=>(prefixFlow F.flow T zX t).1) T J + (directTransportTriangleKernel (fun t=>(prefixFlow F.flow T zX t).2)) p := by + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J p)).trans + by_cases ht : p.1.1∈J + · rw [indicator_of_mem ht] + by_cases hp : p∈trianglePhaseDomain T + · have htime := hJT ht + have hσ : p.1.2.1∈Icc 0 T := ⟨hp.2.1.le,hp.2.2.le.trans htime.2⟩ + have hn := ((W p.1.1).le_opNorm (triangleConeKernel s F.flow zX T + (transportOnlyConeKernel F.flow zX) p)).trans + (mul_le_mul_of_nonneg_right (hW _ ht) (norm_nonneg _)) + rw [one_mul] at hn + apply (ENNReal.ofReal_le_ofReal hn).trans_eq + rw [triangleConeKernel_transport hp] + simp only [directTriangleDensity,indicator_of_mem (show p∈directTriangleDomain T J from ⟨hp,ht⟩), + prefixParticle,prefixFlow,prefixClamp_eq htime,prefixClamp_eq hσ,directTransportTriangleKernel, + norm_smul,Real.norm_eq_abs, + abs_of_nonneg (sq_nonneg (p.1.1-p.1.2.1)),ENNReal.ofReal_mul (sq_nonneg _)] + · simp only [triangleConeKernel,indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + · simp only [indicator_of_notMem ht,zero_apply,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.selectedTransportTriangle_v_integral_le {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {W : ℝ→Vec→L[ℝ]Vec} {J : Set ℝ} (hJT : J⊆Icc 0 T) + (hcontract : ∀t∈J,‖W t‖≤1) (B : ClosedConeBin) (z : ConeCoordinate) + (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (transportOnlyConeKernel F.flow zX) W J (z,v)‖)≤ + physicalDirectTransportDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z := by + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hh : (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (transportOnlyConeKernel F.flow zX) W J (z,v)‖)≤ + ∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + directTriangleDensity s X T J (directTransportTriangleKernel V) (z,v) := by + exact lintegral_mono (fun v=>F.selectedTransportTriangle_direct_le zX Q hJT W hcontract (z,v)) + exact hh.trans (directTransportTriangle_bin_bound hJT B hz) + +lemma PhaseFlowOn.selectedTransportTriangle_bin_integral_le {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {W : ℝ→Vec→L[ℝ]Vec} {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) (hcontract : ∀t∈J,‖W t‖≤1) (B : ClosedConeBin) : + (∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet B z.2.2.1 + (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (transportOnlyConeKernel F.flow zX) W J (z,v)‖ ∂volume + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B J)≤ + ∫⁻z : ConeCoordinate,physicalDirectTransportDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B J := by + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact F.selectedTransportTriangle_v_integral_le zX Q hJT hcontract B z hz + +lemma PhaseFlowOn.unselectedTransportTriangle_physical_sum {s : Solution} {T P M A w I : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (hcontract : ∀t∈J,‖W t‖≤1) (hP : 0≤P) (hwP : w≤P) + (N : ℕ) (hN : 8192*P≤(2:ℝ)^N) + (hphysical : ∀σ∈Icc 0 T,∀z : Phase,s.f (σ,z)≠0→1024*q z.2≤P) : + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I)ᶜ + (transportOnlyConeKernel F.flow zX) W J p‖ ∂trianglePhaseMeasure)≤ + ∑'i : UnselectedCoverIndex N,(unselectedCoverSector P M A w I N).indicator + (fun i=>∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (unselectedCoverBin T w i) z + ∂physicalBinMeasure V (unselectedCoverBin T w i) J) i := by + dsimp only + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hA : ContinuousOn (transportOnlyConeKernel F.flow zX) (coneKernelInterior T) := + (F.transportOnlyConeKernel_continuousOn zX).mono inter_subset_left + have hg := (F.selectedConeTriangle_measurable hs zX (bulkSelection P M A w I)ᶜ hA hW hJ).norm.ennreal_ofReal + have hcover := physicalBinFamily_cover_lintegral hV hJ (unselectedCoverBin T w) + (unselectedCoverSector P M A w I N) hg + refine (hcover (by + intro p hp + apply F.bulkUnselectedCone_support zX _ W hJT hband hP hwP N hN hphysical + intro he + exact hp (by rw [he,norm_zero,ENNReal.ofReal_zero]))).trans ?_ + apply ENNReal.tsum_le_tsum + intro i + by_cases hi : i∈unselectedCoverSector P M A w I N + · simp only [indicator_of_mem hi] + exact F.selectedTransportTriangle_bin_integral_le hs hT zX _ hJ hJT hcontract _ + · simp only [indicator_of_notMem hi,le_refl] + +lemma Admissible.unselected_transport_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (W : ℝ→Vec→L[ℝ]Vec),Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I)ᶜ + (transportOnlyConeKernel F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hsmall⟩ := hd.small_transport_uniform T₀ + obtain ⟨Cr,hCr,hremaining⟩ := hd.direct_remaining_transport_uniform_expanded + obtain ⟨K,hK,hcount⟩ := exists_direct_dyadic_count + refine ⟨Cs+Cr*max 1 T₀,by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP hphysical hband HZ W hW hcontract + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let cost := fun B : ClosedConeBin=>∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z + ∂physicalBinMeasure V B (Icc a b) + have hB : 0≤B := by dsimp [B]; positivity + have hf0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + rw [show (fun z=>s.f (0,z))=d.f₀ from funext hs.initial_f] + have hh := F.unselectedTransportTriangle_physical_sum (M:=M) (A:=A) (I:=I) hs.energyPrefix hT zX hW measurableSet_Icc + (Icc_subset_Icc ha hb) hband hcontract (zero_le_one.trans hP) hwP N hN hphysical + change _≤∑'i : UnselectedCoverIndex N,(unselectedCoverSector P M A w I N).indicator + (fun i=>cost (unselectedCoverBin T w i)) i at hh + rw [unselectedCover_tsum] at hh + have hsm : (∑'k : Fin 4→ℕ,({k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k}).indicator + (fun k=>cost (representativeClosedBin T w k)) k)≤ENNReal.ofReal (Cs*B) := by + apply le_trans (b:=∑'k : Fin 4→ℕ,(representativeSmallSector P).indicator + (fun k=>cost (representativeClosedBin T w k)) k) + · apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈{k | k∈representativeSmallSector P ∧ ¬representativeSelected P M A w I k} + · simp only [indicator_of_mem hk,indicator_of_mem hk.1,le_refl] + · rw [indicator_of_notMem hk]; exact bot_le + · exact hsmall M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + have hrem := hremaining P (zero_le_one.trans hP) s T F hs.energyPrefix hT hs.initial_f zX + (tsupport d.f₀) a b I w hd.2.1 hf0 ha hb hJI hI hI1 + have hright : (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (directOuterBin T w i.1 i.2)) i)≤ENNReal.ofReal ((Cr*max 1 T₀)*B) := by + apply (directOuter_remaining_le_tsum P + (fun np nf nt j nr=>cost (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j))).trans + apply hrem.trans + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul (mul_le_mul_of_nonneg_left (max_le_max le_rfl hTT) hCr) + (le_add_of_nonneg_right (by positivity)) (by positivity) (by positivity) + apply hh.trans ((add_le_add hsm hright).trans_eq ?_) + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (by positivity)] + congr 1 + ring + +lemma Admissible.unselected_source_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A : ℝ,1≤M → 1≤A → ∀ᶠ P : ℝ in atTop, + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (W : ℝ→Vec→L[ℝ]Vec),Measurable W → (∀t∈Icc a b,‖W t‖≤1) → + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T (bulkSelection P M A w I)ᶜ + (sourceOnlyConeKernel s F.flow zX) W (Icc a b) p‖ ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hsmall⟩ := hd.unselected_small_source_uniform T₀ + obtain ⟨Cr,hCr,hremaining⟩ := hd.direct_remaining_source_unrestricted_uniform + obtain ⟨K,hK,hcount⟩ := exists_direct_dyadic_count + refine ⟨Cs+Cr*(1+K^4),by positivity,?_⟩ + intro M A hM hA + filter_upwards [hsmall M A hM (zero_lt_one.trans_le hA)] with P hsmallP + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsource hphysical hband HZ W hW hcontract + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let cost := fun B : ClosedConeBin=>∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b) + have hB : 0≤B := by dsimp [B]; positivity + have hf0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + rw [show (fun z=>s.f (0,z))=d.f₀ from funext hs.initial_f] + have hh := F.unselectedSourceTriangle_physical_sum (M:=M) (A:=A) (I:=I) hs.energyPrefix hT zX hW measurableSet_Icc + (Icc_subset_Icc ha hb) hband hcontract (zero_le_one.trans hP) hwP N hN hphysical + change _≤∑'i : UnselectedCoverIndex N,(unselectedCoverSector P M A w I N).indicator + (fun i=>cost (unselectedCoverBin T w i)) i at hh + rw [unselectedCover_tsum] at hh + have hsm := hsmallP hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hsource HZ + have hrem := hremaining s T F hs hT zX (tsupport d.f₀) a b I w M A P K N hd.2.1 hf0 + ha hb hab hI hI1 hJI hM hA hP hL (zero_lt_one.trans_le hw) hwP hIP hK hNc (HZ zX hzX) HZ + have hright : (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (directOuterBin T w i.1 i.2)) i)≤ENNReal.ofReal (Cr*(1+K^4)*B) := by + change (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (relativeRepresentativeClosedBin T w + ![(i.1 0).val,(i.1 1).val,(i.1 2).val,i.2] (i.1 3).val)) i)≤_ + rw [directOuter_remaining_sum P (fun np nf nt j nr=>cost (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j))] + exact hrem + apply hh.trans ((add_le_add hsm hright).trans_eq ?_) + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (by positivity)] + congr 1 + ring + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.unselected_label_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A : ℝ,1≤M → 1≤A → ∀ᶠ P : ℝ in atTop, + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + ∀ (ψ : ℝ→ℝ),Measurable ψ → (∀t,|ψ t|≤1) → (∀t∉Icc a b,ψ t=0) → + ENNReal.ofReal ‖∫p : ℝ×Phase,unselectedLabelSignedForce s F.flow zX T + (bulkSelection P M A w I) ψ p‖ ≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Ct,hCt,htransport⟩ := hd.unselected_transport_uniform T₀ + obtain ⟨Cs,hCs,hsource⟩ := hd.unselected_source_uniform T₀ + refine ⟨Ct+Cs,add_nonneg hCt hCs,?_⟩ + intro M A hM hA + filter_upwards [hsource M A hM hA] with P hso + intro hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ ψ hψ hψ1 hout + let Q := bulkSelection P M A w I + let W : ℝ→Vec→L[ℝ]Vec := fun t=>ψ t • ContinuousLinearMap.id ℝ Vec + have hW : Measurable W := hψ.smul measurable_const + have hW1 (t : ℝ) (_ht : t∈Icc a b) : ‖W t‖≤1 := by + dsimp [W] + rw [norm_smul,Real.norm_eq_abs] + exact (mul_le_mul_of_nonneg_left ContinuousLinearMap.norm_id_le (abs_nonneg _)).trans (by simpa using hψ1 t) + have ht := htransport M A P hM (zero_le_one.trans hA) hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI + (zero_lt_one.trans_le hw) hwP hphysical hband HZ W hW hW1 + have hs' := hso hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hsrc hphysical hband HZ W hW hW1 + have he (p : ℝ×Phase) : unselectedLabelSignedForce s F.flow zX T Q ψ p= + (Icc a b).indicator W (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T Q p) • actualLabelSignedForce s F.flow zX T p) := by + by_cases hp : labelReceiverTime F.flow zX T p∈Icc a b + · rw [indicator_of_mem hp] + simp only [unselectedLabelSignedForce,W,smul_apply,ContinuousLinearMap.id_apply] + exact smul_comm _ _ _ + · rw [indicator_of_notMem hp] + simp [unselectedLabelSignedForce,hout _ hp] + have hsplit := F.unselected_force_label_integral_split hs.energyPrefix zX Q (J:=Icc a b) hW measurableSet_Icc + rw [F.selectedConeTriangle_norm_transfer hs.energyPrefix hT zX Qᶜ + ((F.transportOnlyConeKernel_continuousOn zX).mono inter_subset_left) hW measurableSet_Icc, + F.selectedConeTriangle_norm_transfer hs.energyPrefix hT zX Qᶜ + ((F.sourceOnlyConeKernel_continuousOn hs.energyPrefix zX).mono inter_subset_left) hW measurableSet_Icc] at hsplit + have hn : ENNReal.ofReal ‖∫p,unselectedLabelSignedForce s F.flow zX T Q ψ p‖≤ + ∫⁻p,ENNReal.ofReal ‖unselectedLabelSignedForce s F.flow zX T Q ψ p‖ := by + simpa only [ofReal_norm] using (enorm_integral_le_lintegral_enorm + (f:=unselectedLabelSignedForce s F.flow zX T Q ψ)) + apply hn.trans + simp_rw [he] + apply (hsplit.trans (add_le_add ht hs')).trans_eq + rw [←ENNReal.ofReal_add (by positivity) (by positivity)] + congr 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/AbsolutelyContinuousIntervalContinuousDerivative.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/AbsolutelyContinuousIntervalContinuousDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdc46257ea8d866cc945d7df2c232007efc8d35d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/AbsolutelyContinuousIntervalContinuousDerivative.lean @@ -0,0 +1,211 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ClosedBranchDomain + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma absolutelyContinuousOnInterval_of_continuous_derivative + {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + {g g' : ℝ → V} {a b : ℝ} (hab : a(hd t ht).differentiableAt) _ (convex_Ioo a b) + intro t ht + rw [(hd t ht).deriv] + exact_mod_cast (hC t (Ioo_subset_Icc_self ht)).trans (le_max_left C 0) + have hc : ContinuousOn g (closure (Ioo a b)) := by simpa only [closure_Ioo hab.ne] using hg + have hLc := LipschitzOnWith.closure hc hLip + rw [closure_Ioo hab.ne,← uIcc_of_le hab.le] at hLc + exact hLc.absolutelyContinuousOnInterval + +lemma ac_weighted_vector_ibp_closed {ψ : ℝ → ℝ} {g g' : ℝ → Vec} {a b : ℝ} + (hab : a≤b) (hψ : AbsolutelyContinuousOnInterval ψ a b) + (hg : ContinuousOn g (Icc a b)) (hg' : ContinuousOn g' (Icc a b)) + (hd : ∀ t∈Ioo a b,HasDerivAt g (g' t) t) : + ∫ t in a..b, ψ t • g' t = + ψ b • g b - ψ a • g a - ∫ t in a..b, deriv ψ t • g t := by + rcases hab.eq_or_lt with rfl|hab + · simp + have hgu : ContinuousOn g (uIcc a b) := by simpa only [uIcc_of_le hab.le] using hg + have hg'u : ContinuousOn g' (uIcc a b) := by simpa only [uIcc_of_le hab.le] using hg' + have h₁ : IntervalIntegrable (fun t=>ψ t • g' t) volume a b := + (hψ.continuousOn.smul hg'u).intervalIntegrable + have h₂ : IntervalIntegrable (fun t=>deriv ψ t • g t) volume a b := + hψ.intervalIntegrable_deriv.smul_continuousOn hgu + ext i + rw [intervalIntegral_vec_apply h₁,PiLp.sub_apply,PiLp.sub_apply, + PiLp.smul_apply,PiLp.smul_apply,intervalIntegral_vec_apply h₂] + simp only [PiLp.smul_apply,smul_eq_mul] + have hdi : ∀ t∈Ioo a b,HasDerivAt (fun r=>g r i) (g' t i) t := fun t ht=> + (PiLp.proj 2 (𝕜:=ℝ) (fun _:Fin 3=>ℝ) i).hasFDerivAt.comp_hasDerivAt t (hd t ht) + have hgi : AbsolutelyContinuousOnInterval (fun t=>g t i) a b := + absolutelyContinuousOnInterval_of_continuous_derivative hab + ((PiLp.proj 2 (𝕜:=ℝ) (fun _:Fin 3=>ℝ) i).continuous.comp_continuousOn hg) + ((PiLp.proj 2 (𝕜:=ℝ) (fun _:Fin 3=>ℝ) i).continuous.comp_continuousOn hg') hdi + have he : (∫ t in a..b,ψ t*g' t i)=∫ t in a..b,ψ t*deriv (fun r=>g r i) t := by + apply intervalIntegral.integral_congr_uIoo + intro t ht + have hti : t∈Ioo a b := by simpa only [uIoo_of_le hab.le] using ht + exact congrArg (fun x=>ψ t*x) (hdi t hti).deriv.symm + rw [he] + exact hψ.integral_mul_deriv_eq_deriv_mul hgi + +lemma ac_weighted_signed_ibp_closed {ψ : ℝ → ℝ} {P K R : ℝ → Vec} + {W W' : ℝ → Vec →L[ℝ] Vec} {a b : ℝ} (hab : a≤b) + (hψ : AbsolutelyContinuousOnInterval ψ a b) + (hP : ContinuousOn P (Icc a b)) (hW : ContinuousOn W (Icc a b)) + (hW' : ContinuousOn W' (Icc a b)) + (hK : ContinuousOn K (Icc a b)) (hR : ContinuousOn R (Icc a b)) + (hPd : ∀ t∈Ioo a b,HasDerivAt P (-K t+R t) t) + (hWd : ∀ t∈Ioo a b,HasDerivAt W (W' t) t) : + ∫ t in a..b,ψ t • W t (K t) = + ψ a • W a (P a)-ψ b • W b (P b)+ + ∫ t in a..b,deriv ψ t • W t (P t)+ψ t • (W' t (P t)+W t (R t)) := by + have hg : ContinuousOn (fun t=>W t (P t)) (Icc a b) := hW.clm_apply hP + have hg' : ContinuousOn (fun t=>W' t (P t)+W t (-K t+R t)) (Icc a b) := + (hW'.clm_apply hP).add (hW.clm_apply (hK.neg.add hR)) + have h := ac_weighted_vector_ibp_closed hab hψ hg hg' + (fun t ht=>(hWd t ht).clm_apply (hPd t ht)) + have hI₁ : IntervalIntegrable (fun t=>ψ t • W t (K t)) volume a b := + (hψ.continuousOn.smul (by simpa only [uIcc_of_le hab] using hW.clm_apply hK)).intervalIntegrable + have hI₂ : IntervalIntegrable (fun t=>ψ t • (W' t (P t)+W t (R t))) volume a b := + (hψ.continuousOn.smul (by simpa only [uIcc_of_le hab] using (show ContinuousOn (fun t=>W' t (P t)+W t (R t)) (Icc a b) from (hW'.clm_apply hP).add (hW.clm_apply hR)))).intervalIntegrable + have hI₃ : IntervalIntegrable (fun t=>deriv ψ t • W t (P t)) volume a b := + hψ.intervalIntegrable_deriv.smul_continuousOn (by simpa only [uIcc_of_le hab] using hg) + have he : (fun t=>ψ t • (W' t (P t)+W t (-K t+R t))) = + (fun t=>ψ t • (W' t (P t)+W t (R t))-ψ t • W t (K t)) := by + funext t + simp only [map_add,map_neg,smul_add,smul_neg] + abel + rw [he,intervalIntegral.integral_sub hI₂ hI₁] at h + rw [intervalIntegral.integral_add hI₃ hI₂] + have hh := congrArg (fun v=>(∫ t in a..b,ψ t • (W' t (P t)+W t (R t)))-v) h + convert hh using 1 <;> abel + +lemma PhaseFlowOn.actual_weighted_signed_identity_closed {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) + {ψ : ℝ→ℝ} {W W' : ℝ→Vec→L[ℝ]Vec} + (hψ : AbsolutelyContinuousOnInterval ψ 0 b) + (hW : ContinuousOn W (Icc 0 b)) (hW' : ContinuousOn W' (Icc 0 b)) + (hWd : ∀ σ∈Ioo 0 b,HasDerivAt W (W' σ) σ) : + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in 0..b,ψ σ • W σ + (signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ)) = + ψ 0 • W 0 (retardedPrimitive (r 0) (a 0) (u 0) (n 0))- + ψ b • W b (retardedPrimitive (r b) (a b) (u b) (n b))+ + ∫ σ in 0..b,deriv ψ σ • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + ψ σ • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + let P := fun σ=>retardedPrimitive (r σ) (a σ) (u σ) (n σ) + let K := fun σ=>signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ) + let R := fun σ=>signedRemainder (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zX (τ σ)) + have hT : 0≤T := hb.1.trans hb.2 + have hsub : Icc 0 b⊆Icc 0 T := fun _ hx=>⟨hx.1,hx.2.trans hb.2⟩ + have hclosed := F.closedBranchDomain_eq hT zX zY hb he + have hopen := F.branchDomain_eq hT zX zY hb he + have hmem : ∀ σ∈Icc 0 b,σ∈closedBranchDomain F.flow zX zY T := by + intro σ hσ + rwa [hclosed] + have htmem : ∀ σ∈Icc 0 b,τ σ∈Icc 0 T := fun σ hσ=> + ⟨hσ.1.trans (F.branch_spec_closed zX zY (hmem σ hσ)).1.1, + (F.branch_spec_closed zX zY (hmem σ hσ)).1.2⟩ + have hτ : ContinuousOn τ (Icc 0 b) := by + obtain ⟨C,hC⟩ := F.branch_lipschitzOn_closed hT zX zY + simpa only [hclosed] using hC.continuousOn + have hr : ContinuousOn r (Icc 0 b) := hτ.sub continuousOn_id + have hX := (F.continuousOn_time zX).comp hτ htmem + have hY := (F.continuousOn_time zY).mono hsub + have ha : ContinuousOn a (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hX.snd + have hu : ContinuousOn u (Icc 0 b) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hY.snd + have hr0 : ∀ σ∈Icc 0 b,r σ≠0 := fun σ hσ=> + (F.branch_radius_pos_closed zX zY (hmem σ hσ) (hne σ (hsub hσ))).ne' + have hn : ContinuousOn n (Icc 0 b) := (hr.inv₀ hr0).smul (hX.fst.sub hY.fst) + have hnorm : ∀ σ∈Icc 0 b,‖n σ‖=1 := fun σ hσ=> + F.branchDirection_norm_closed zX zY (hmem σ hσ) (hne σ (hsub hσ)) + have hd : ∀ σ∈Icc 0 b,1-dot (n σ) (u σ)≠0 := fun σ hσ=> + (cone_denom_pos (F.flow zY σ).2 _ (hnorm σ hσ)).ne' + have hD : ∀ σ∈Icc 0 b,1-dot (n σ) (a σ)≠0 := fun σ hσ=> + (cone_denom_pos (F.flow zX (τ σ)).2 _ (hnorm σ hσ)).ne' + have hP : ContinuousOn P (Icc 0 b) := continuousOn_retardedPrimitive hr ha hu hn hr0 hd hD + have hK : ContinuousOn K (Icc 0 b) := continuousOn_signedForceKernel hr ha hu hn + ((F.acceleration_continuousOn_closed hs zY).mono hsub) hr0 hd hD + have hR : ContinuousOn R (Icc 0 b) := continuousOn_signedRemainder hr ha hu hn + ((F.acceleration_continuousOn_closed hs zX).comp hτ htmem) hr0 hD + have hder : ∀ σ∈Ioo 0 b,HasDerivAt P (R σ-K σ) σ := by + intro σ hσ + have hσ' : σ∈branchDomain F.flow zX zY T := by rwa [hopen] + have hneσ := hne σ (hsub (Ioo_subset_Icc_self hσ)) + have ht := F.branch_time_mem zX zY hσ' hneσ + have hτ' := (F.branch_differential zX zY hσ' hneσ).2 + have hr' : HasDerivAt r ((1-dot (n σ) (u σ))/(1-dot (n σ) (a σ))-1) σ := + hτ'.sub (hasDerivAt_id σ) + have ha' : HasDerivAt a + (((1-dot (n σ) (u σ))/(1-dot (n σ) (a σ))) • phaseAcceleration s.E s.B F.flow zX (τ σ)) σ := + (F.velocity_hasDerivAt zX ⟨hσ'.1.1.trans ht.1,ht.2⟩).scomp σ hτ' + have hσc := Ioo_subset_Icc_self hσ + have hp := hasDerivAt_retardedPrimitive hr' ha' (F.velocity_hasDerivAt zY hσ'.1) + (F.branchDirection_hasDerivAt zX zY hσ' hneσ) (hr0 σ hσc) (hd σ hσc) (hD σ hσc) + convert hp using 1 + have hh := signed_force_identity (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zY σ) (phaseAcceleration s.E s.B F.flow zX (τ σ)) + (hr0 σ hσc) (hd σ hσc) (hD σ hσc) + dsimp only [R,K] + rw [hh] + unfold signedRemainder + abel + apply ac_weighted_signed_ibp_closed hb.1 hψ hP hW hW' hK hR _ hWd + intro σ hσ + simpa only [sub_eq_neg_add] using hder σ hσ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/BoundaryJets.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/BoundaryJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..abc57c1693e49a48f433deb2e428d8dddcabca65 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/BoundaryJets.lean @@ -0,0 +1,411 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleTame + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +section +universe u v + +lemma SmoothCompactFamily.const_smul {α : Type v} {E W : Type u} [TopologicalSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : α → E → W} (hF : SmoothCompactFamily F) {c : α → ℝ} (hc : Continuous c) : + SmoothCompactFamily (fun a x => c a • F a x) := by + refine ⟨fun a => (hF.1 a).const_smul _,fun n => ?_⟩ + have he (p : E × α) : iteratedFDeriv ℝ n (fun x => c p.2 • F p.2 x) p.1 = + c p.2 • iteratedFDeriv ℝ n (F p.2) p.1 := + iteratedFDeriv_const_smul_apply' ((hF.1 p.2).of_le (by exact_mod_cast le_top)).contDiffAt + simp_rw [he] + exact (hc.comp continuous_snd).smul (hF.2 n) + +lemma norm_iteratedFDeriv_add_le {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f g : U → W} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (n : ℕ) (x : U) : + ‖iteratedFDeriv ℝ n (fun y => f y+g y) x‖ ≤ + ‖iteratedFDeriv ℝ n f x‖+‖iteratedFDeriv ℝ n g x‖ := by + change ‖iteratedFDeriv ℝ n (f+g) x‖ ≤ _ + rw [iteratedFDeriv_add_apply (i:=n) (x:=x) ((hf.of_le (by exact_mod_cast le_top)).contDiffAt) + ((hg.of_le (by exact_mod_cast le_top)).contDiffAt)] + exact norm_add_le _ _ + +lemma norm_iteratedFDeriv_sub_le {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f g : U → W} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (n : ℕ) (x : U) : + ‖iteratedFDeriv ℝ n (fun y => f y-g y) x‖ ≤ + ‖iteratedFDeriv ℝ n f x‖+‖iteratedFDeriv ℝ n g x‖ := by + change ‖iteratedFDeriv ℝ n (f-g) x‖ ≤ _ + rw [iteratedFDeriv_sub_apply (i:=n) (x:=x) ((hf.of_le (by exact_mod_cast le_top)).contDiffAt) + ((hg.of_le (by exact_mod_cast le_top)).contDiffAt)] + exact norm_sub_le _ _ + +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma sphere_average_derivative_bound {W : Type} [NormedAddCommGroup W] [NormedSpace ℝ W] + [CompleteSpace W] {F : Sphere → Vec → W} (hF : SmoothCompactFamily F) (n : ℕ) {C : ℝ} + (hC : ∀ a x, ‖iteratedFDeriv ℝ n (F a) x‖≤C) (x : Vec) : + ‖iteratedFDeriv ℝ n (fun y => (4*Real.pi)⁻¹ • ∫ a, F a y ∂sphereMeasure) x‖ ≤ C := by + have hI := contDiff_integral_smoothFamily sphereMeasure hF + rw [iteratedFDeriv_const_smul_apply' ((hI.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + have hi := norm_iteratedFDeriv_integral_le sphereMeasure n hF x + have hint : Integrable (fun a => ‖iteratedFDeriv ℝ n (F a) x‖) sphereMeasure := + ((hF.2 n).comp (continuous_const.prodMk continuous_id)).norm.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hb := integral_mono hint (integrable_const C) (fun a => hC a x) + simp only [integral_const,smul_eq_mul,sphere_area] at hb + exact (mul_le_mul_of_nonneg_left (hi.trans hb) (by positivity)).trans_eq (by field_simp) + +lemma freeWave_derivative_bound {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : ContDiff ℝ ∞ h) + (n : ℕ) {C : ℝ} (hC : 0≤C) + (hg0 : ∀ x, ‖iteratedFDeriv ℝ n g x‖≤C) + (hg1 : ∀ x, ‖iteratedFDeriv ℝ (n+1) g x‖≤C) + (hh0 : ∀ x, ‖iteratedFDeriv ℝ n h x‖≤C) + {t : ℝ} (ht : t∈Icc (0:ℝ) 1) (x : Vec) : + ‖iteratedFDeriv ℝ n (fun y => freeWave g h (t,y)) x‖≤3*C := by + let A : Sphere → Vec → ℝ := fun a y => g (y+t • a.1) + let B : Sphere → Vec → ℝ := fun a y => fderiv ℝ g (y+t • a.1) a.1 + let D : Sphere → Vec → ℝ := fun a y => h (y+t • a.1) + have hA : SmoothCompactFamily A := SmoothCompactFamily.ofJoint + (hg.comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))) continuous_subtype_val + have hB : SmoothCompactFamily B := SmoothCompactFamily.ofJoint + (((hg.fderiv_right (m:=∞) (by simp)).comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))).clm_apply + contDiff_fst) continuous_subtype_val + have hD : SmoothCompactFamily D := SmoothCompactFamily.ofJoint + (hh.comp (contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst))) continuous_subtype_val + have ha := sphere_average_derivative_bound hA n (fun a y => by + dsimp only [A]; rw [iteratedFDeriv_comp_add_right]; exact hg0 _) x + have hd := sphere_average_derivative_bound hD n (fun a y => by + dsimp only [D]; rw [iteratedFDeriv_comp_add_right]; exact hh0 _) x + have hb := sphere_average_derivative_bound hB n (fun a y => by + change ‖iteratedFDeriv ℝ n (fun z => (fun w => fderiv ℝ g w a.1) (z+t • a.1)) y‖≤C + rw [iteratedFDeriv_comp_add_right (f:=fun w => fderiv ℝ g w a.1) n (t • a.1) y] + have hh' := norm_iteratedFDeriv_clm_apply_const (x:=y+t • a.1) + (hg.fderiv_right (m:=∞) (by simp)).contDiffAt (by exact_mod_cast le_top : (n:ℕ∞ω)≤∞) + (c:=a.1) + rw [sphere_norm a,one_mul,norm_iteratedFDeriv_fderiv] at hh' + exact hh'.trans (hg1 _)) x + let a : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, A u y ∂sphereMeasure + let b : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, B u y ∂sphereMeasure + let c : Vec → ℝ := fun y => (4*Real.pi)⁻¹ • ∫ u, D u y ∂sphereMeasure + have has : ContDiff ℝ ∞ a := (contDiff_integral_smoothFamily sphereMeasure hA).const_smul _ + have hbs : ContDiff ℝ ∞ b := (contDiff_integral_smoothFamily sphereMeasure hB).const_smul _ + have hcs : ContDiff ℝ ∞ c := (contDiff_integral_smoothFamily sphereMeasure hD).const_smul _ + have he : (fun y => freeWave g h (t,y))=(fun y => a y+t • b y+t • c y) := by + funext y + rw [freeWave_sphere hg] + simp only [a,b,c,A,B,D,smul_eq_mul] + ring + rw [he] + have hb' : ‖iteratedFDeriv ℝ n (fun y => t • b y) x‖≤t*C := by + rw [iteratedFDeriv_const_smul_apply' ((hbs.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left hb ht.1 + have hc' : ‖iteratedFDeriv ℝ n (fun y => t • c y) x‖≤t*C := by + rw [iteratedFDeriv_const_smul_apply' ((hcs.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_of_nonneg ht.1] + exact mul_le_mul_of_nonneg_left hd ht.1 + exact (norm_iteratedFDeriv_add_le (has.add (hbs.const_smul t)) (hcs.const_smul t) n x).trans + ((add_le_add ((norm_iteratedFDeriv_add_le has (hbs.const_smul t) n x).trans + (add_le_add ha hb')) hc').trans (by nlinarith [ht.2])) + +end + +section +attribute [local instance] Measure.Subtype.measureSpace + +def datumWeightedSphere (f : Phase → ℝ) (H : Vec × Vec → ℝ) (p : ℝ × Vec) : ℝ := + (4*Real.pi)⁻¹*(∫ a : Sphere, p.1*(∫ v : Vec, f (p.2+p.1 • a.1,v)*H (a.1,v)) ∂sphereMeasure) + +lemma datumWeightedSphere_smooth_bound {f : Phase → ℝ} (hf : ContDiff ℝ ∞ f) + (hc : HasCompactSupport f) {H : Vec × Vec → ℝ} + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) (n : ℕ) : + ContDiff ℝ ∞ (datumWeightedSphere f H) ∧ ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, ∀ x, + ‖iteratedFDeriv ℝ n (fun y => datumWeightedSphere f H (t,y)) x‖≤C := by + obtain ⟨P,hP⟩ := (hc.image continuous_snd).isBounded.exists_norm_le + have hzero (x v : Vec) (hv : v∉closedBall (0:Vec) P) : f (x,v)=0 := by + by_contra hne + exact hv (mem_closedBall_zero_iff.mpr (hP v ⟨(x,v),subset_tsupport _ hne,rfl⟩)) + let : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + let : CompactSpace (closedBall (0:Vec) P) := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure (closedBall (0:Vec) P)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let α := Sphere × closedBall (0:Vec) P + let μ : Measure α := sphereMeasure.prod volume + let c : α → ℝ := fun a => H (a.1.1,a.2.1) + let F : α → (ℝ × Vec) → ℝ := fun a p => f (p.2+p.1 • a.1.1,a.2.1) + have hcc : Continuous c := hH.comp_continuous + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + (fun a => ⟨a.1.2,mem_univ _⟩) + have hF : SmoothCompactFamily F := SmoothCompactFamily.ofJoint + (hf.comp ((contDiff_snd.snd.add (contDiff_snd.fst.smul contDiff_fst.fst)).prodMk contDiff_fst.snd)) + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + have hG := hF.const_smul hcc + have he : datumWeightedSphere f H=(fun p : ℝ × Vec => (4*Real.pi)⁻¹*p.1*(∫ a, c a*F a p ∂μ)) := by + funext p + have hint : Integrable (fun a : α => c a*F a p) μ := + (hcc.mul (hF.continuous.comp (continuous_const.prodMk continuous_id))).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hi : (∫ a : α, c a*F a p ∂μ)= + ∫ a : Sphere, ∫ v : Vec, f (p.2+p.1 • a.1,v)*H (a.1,v) ∂volume ∂sphereMeasure := by + rw [show μ=sphereMeasure.prod volume from rfl,integral_prod _ hint] + apply integral_congr_ae + exact ae_of_all _ (fun a => by + dsimp only [c,F] + rw [integral_subtype measurableSet_closedBall (fun v => H (a.1,v)*f (p.2+p.1 • a.1,v))] + have hz : (∫ v in closedBall (0:Vec) P, H (a.1,v)*f (p.2+p.1 • a.1,v))= + ∫ v : Vec, H (a.1,v)*f (p.2+p.1 • a.1,v) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hzero _ _ hv,mul_zero] + rw [hz] + apply integral_congr_ae + exact ae_of_all _ (fun v => mul_comm _ _)) + rw [hi] + simp only [datumWeightedSphere,integral_const_mul] + ring + have hs : ContDiff ℝ ∞ (datumWeightedSphere f H) := by + rw [he] + exact (contDiff_const.mul contDiff_fst).mul (contDiff_integral_smoothFamily μ hG) + refine ⟨hs,?_⟩ + obtain ⟨D,hD,hd⟩ := smooth_compact_jets_bound hf hc n + obtain ⟨L,hL⟩ := hcc.bounded_above_of_compact_support (HasCompactSupport.of_compactSpace _) + let C := max L 0 + have hC : 0≤C := le_max_right _ _ + have hcB (a : α) : |c a|≤C := (hL a).trans (le_max_left _ _) + refine ⟨(4*Real.pi)⁻¹*(μ.real univ*(C*D)),by positivity,?_⟩ + intro t ht x + have hFt : SmoothCompactFamily (fun a : α => fun y : Vec => f (y+t • a.1.1,a.2.1)) := + SmoothCompactFamily.ofJoint + (hf.comp ((contDiff_snd.add ((contDiff_const (c:=t)).smul contDiff_fst.fst)).prodMk contDiff_fst.snd)) + ((continuous_subtype_val.comp continuous_fst).prodMk (continuous_subtype_val.comp continuous_snd)) + have hGt := hFt.const_smul hcc + have hj := norm_iteratedFDeriv_integral_le μ n hGt x + have hb (a : α) : ‖iteratedFDeriv ℝ n (fun y => c a*f (y+t • a.1.1,a.2.1)) x‖≤C*D := by + rw [show (fun y => c a*f (y+t • a.1.1,a.2.1))=(fun y => c a • (fun z => f (z,a.2.1)) (y+t • a.1.1)) from rfl, + iteratedFDeriv_const_smul_apply' (((hFt.1 a).of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul, + Real.norm_eq_abs,iteratedFDeriv_comp_add_right (f:=fun z => f (z,a.2.1)) n (t • a.1.1) x] + exact mul_le_mul (hcB a) ((norm_iteratedFDeriv_phase_slice hf n _ _).trans (hd n le_rfl _)) + (norm_nonneg _) hC + have hint : Integrable (fun a => ‖iteratedFDeriv ℝ n (fun y => c a • f (y+t • a.1.1,a.2.1)) x‖) μ := + ((hGt.2 n).comp (continuous_const.prodMk continuous_id)).norm.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hij := hj.trans (integral_mono hint (integrable_const (C*D)) hb) + simp only [integral_const,smul_eq_mul] at hij + have hej : (fun y => datumWeightedSphere f H (t,y))= + (fun y => ((4*Real.pi)⁻¹*t) • (∫ a, c a • f (y+t • a.1.1,a.2.1) ∂μ)) := by + funext y + rw [he] + rfl + rw [hej,iteratedFDeriv_const_smul_apply' (((contDiff_integral_smoothFamily μ hGt).of_le + (by exact_mod_cast le_top)).contDiffAt),norm_smul,Real.norm_of_nonneg (mul_nonneg (by positivity) ht.1 : 0≤(4*Real.pi)⁻¹*t)] + exact (mul_le_mul_of_nonneg_left hij (mul_nonneg (by positivity) ht.1)).trans (by + have hn : 0≤μ.real univ*(C*D) := by positivity + calc + _ = (4*Real.pi)⁻¹*(t*(μ.real univ*(C*D))) := by ring + _ ≤ (4*Real.pi)⁻¹*(μ.real univ*(C*D)) := + mul_le_mul_of_nonneg_left (mul_le_of_le_one_left hn ht.2) (by positivity)) + +end + +lemma norm_iteratedFDeriv_coordinate {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {F : U → Vec} (hF : ContDiff ℝ ∞ F) (n : ℕ) (x : U) (i : Fin 3) : + ‖iteratedFDeriv ℝ n (fun y => F y i) x‖≤‖iteratedFDeriv ℝ n F x‖ := by + let L := PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i + have hL : ‖L‖≤1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro v + simpa only [L,PiLp.proj_apply,one_mul,Real.norm_eq_abs] using norm_coordinate_le v i + have hh := L.norm_iteratedFDeriv_comp_left (x:=x) hF.contDiffAt (by exact_mod_cast le_top : (n:ℕ∞ω)≤∞) + exact hh.trans ((mul_le_mul_of_nonneg_right hL (norm_nonneg _)).trans_eq (one_mul _)) + +lemma norm_iteratedFDeriv_curl_coordinate {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) + (n : ℕ) (x : Vec) (i : Fin 3) : + ‖iteratedFDeriv ℝ n (fun y => curl F y i) x‖≤2*‖iteratedFDeriv ℝ (n+1) F x‖ := by + have he : (fun y => curl F y i)=(fun y => (fderiv ℝ F y (basis (curlA i))) (curlB i)- + (fderiv ℝ F y (basis (curlB i))) (curlA i)) := by + funext y + fin_cases i <;> simp [curl,curlA,curlB,spatialPartial,coordinate_fderiv_apply (hF.differentiable (by simp))] + have hd := hF.fderiv_right (m:=∞) (by simp) + have ha (a b : Fin 3) : ‖iteratedFDeriv ℝ n (fun y => fderiv ℝ F y (basis a) b) x‖≤ + ‖iteratedFDeriv ℝ (n+1) F x‖ := by + have hb := norm_iteratedFDeriv_clm_apply_const hd.contDiffAt + (by exact_mod_cast le_top : (n:ℕ∞ω)≤∞) (x:=x) (c:=basis a) + have hba : ‖basis a‖=1 := by + change ‖(PiLp.single 2 a (1:ℝ) : Vec)‖=1 + simp + rw [hba,one_mul,norm_iteratedFDeriv_fderiv] at hb + exact (norm_iteratedFDeriv_coordinate (hd.clm_apply contDiff_const) n x b).trans hb + rw [he] + have haS := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) (curlB i)).contDiff.comp (hd.clm_apply (contDiff_const (c:=basis (curlA i)))) + have hbS := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) (curlA i)).contDiff.comp (hd.clm_apply (contDiff_const (c:=basis (curlB i)))) + exact (norm_iteratedFDeriv_sub_le haS hbS n x).trans ((add_le_add (ha _ _) (ha _ _)).trans_eq (by ring)) + +lemma BoundedSmooth.freeWave_coordinate_jets {E B : Vec → Vec} + (hE : BoundedSmooth E) (hB : BoundedSmooth B) (n : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, ∀ x, + ‖iteratedFDeriv ℝ n (fun y => freeWave (fun z => E z i) (fun z => curl B z i) (t,y)) x‖≤C ∧ + ‖iteratedFDeriv ℝ n (fun y => freeWave (fun z => B z i) (fun z => -curl E z i) (t,y)) x‖≤C := by + obtain ⟨A,hA⟩ := hE.2 n + obtain ⟨D,hD⟩ := hE.2 (n+1) + obtain ⟨K,hK⟩ := hB.2 n + obtain ⟨L,hL⟩ := hB.2 (n+1) + let C := max A 0+2*max D 0+max K 0+2*max L 0 + have hC : 0≤C := by dsimp [C]; positivity + have hAC : A≤C := by dsimp [C]; linarith [le_max_left A 0,le_max_right D 0,le_max_right K 0,le_max_right L 0] + have hDC : 2*D≤C := by dsimp [C]; linarith [le_max_left D 0,le_max_right A 0,le_max_right K 0,le_max_right L 0] + have hKC : K≤C := by dsimp [C]; linarith [le_max_left K 0,le_max_right D 0,le_max_right A 0,le_max_right L 0] + have hLC : 2*L≤C := by dsimp [C]; linarith [le_max_left L 0,le_max_right D 0,le_max_right K 0,le_max_right A 0] + have hD0 : 0≤D := (norm_nonneg _).trans (hD 0) + have hL0 : 0≤L := (norm_nonneg _).trans (hL 0) + have hp : ContDiff ℝ ∞ (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + refine ⟨3*C,by positivity,?_⟩ + intro t ht x + constructor + · apply freeWave_derivative_bound (hp.comp hE.1) (hp.comp (contDiff_curl hB.1)) n hC + (fun y => (norm_iteratedFDeriv_coordinate hE.1 n y i).trans ((hA y).trans hAC)) + (fun y => (norm_iteratedFDeriv_coordinate hE.1 (n+1) y i).trans ((hD y).trans (by linarith))) + (fun y => (norm_iteratedFDeriv_curl_coordinate hB.1 n y i).trans + ((mul_le_mul_of_nonneg_left (hL y) (by norm_num)).trans hLC)) ht x + · apply freeWave_derivative_bound (hp.comp hB.1) (hp.comp (contDiff_curl hE.1) |>.neg) n hC + (fun y => (norm_iteratedFDeriv_coordinate hB.1 n y i).trans ((hK y).trans hKC)) + (fun y => (norm_iteratedFDeriv_coordinate hB.1 (n+1) y i).trans ((hL y).trans (by linarith))) _ ht x + intro y + change ‖iteratedFDeriv ℝ n (-(fun z => curl E z i)) y‖≤C + rw [iteratedFDeriv_neg_apply,norm_neg] + exact (norm_iteratedFDeriv_curl_coordinate hE.1 n y i).trans + ((mul_le_mul_of_nonneg_left (hD y) (by norm_num)).trans hDC) + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +lemma datum_velocity_integrable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [CompleteSpace W] {f : Phase → ℝ} (hf : Continuous f) (hc : HasCompactSupport f) + {H : Vec × Vec → W} (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) + (x n : Vec) (hn : ‖n‖=1) : Integrable (fun v => f (x,v) • H (n,v)) := by + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + apply Continuous.integrable_of_hasCompactSupport + · exact (hf.comp (continuous_const.prodMk continuous_id)).smul + (hH.comp_continuous (continuous_const.prodMk continuous_id) + (fun v => ⟨mem_sphere_zero_iff_norm.mpr hn,mem_univ v⟩)) + · exact HasCompactSupport.intro hK (fun v hv => by rw [hz x v hv,zero_smul]) + +lemma datumWeightedSphere_flux {f : Phase → ℝ} (hf : Continuous f) (hc : HasCompactSupport f) + {H : Vec × Vec → Vec} (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) (t : ℝ) (x : Vec) : + datumWeightedSphere f (fun p => dot p.1 (H (-p.1,p.2))) (t,x)= + (4*Real.pi)⁻¹*(∫ a : Sphere, t*dot a.1 (∫ v, f (x+t • a.1,v) • H (-a.1,v)) ∂sphereMeasure) := by + unfold datumWeightedSphere + congr 1 + apply integral_congr_ae + filter_upwards [] with a + have hi := datum_velocity_integrable hf hc hH (x+t • a.1) (-a.1) (by rw [norm_neg,sphere_norm a]) + have he := (innerSL ℝ a.1).integral_comp_comm hi + simp only [innerSL_apply_apply,←dot_eq_inner,dot_smul_right] at he + rw [←he] + +lemma continuousOn_fluxWeight {H : Vec × Vec → Vec} + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ContinuousOn (fun p : Vec × Vec => dot p.1 (H (-p.1,p.2))) (sphere (0:Vec) 1 ×ˢ univ) := by + exact (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_fst.continuousOn.prodMk (hH.comp + (continuous_fst.neg.prodMk continuous_snd).continuousOn (by + intro p hp + exact ⟨by simpa only [mem_sphere_zero_iff_norm,Pi.neg_apply,norm_neg] using hp.1,mem_univ _⟩))) + +lemma datum_current_eq_integral {d : Datum} (hd : Admissible d) (x : Vec) (j : Fin 3) : + current d.f₀ x j=∫ v, d.f₀ (x,v)*velocity v j := by + have hi := datum_velocity_integrable hd.1.continuous hd.2.1 + (((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn) + x (basis 0) (by change ‖(PiLp.single 2 0 (1:ℝ) : Vec)‖=1; simp) + exact integral_vec_apply hi j + +lemma datumWeightedSphere_rho (d : Datum) (t : ℝ) (x : Vec) (i : Fin 3) : + datumWeightedSphere d.f₀ (fun p => p.1 i) (t,x)= + (4*Real.pi)⁻¹*(∫ a : Sphere, t*a.1 i*rho d.f₀ (x+t • a.1) ∂sphereMeasure) := by + unfold datumWeightedSphere rho + congr 1 + apply integral_congr_ae + filter_upwards [] with a + rw [integral_mul_const] + ring + +lemma datumWeightedSphere_current {d : Datum} (hd : Admissible d) (t : ℝ) (x : Vec) + (i j : Fin 3) : + datumWeightedSphere d.f₀ (fun p => p.1 i*velocity p.2 j) (t,x)= + (4*Real.pi)⁻¹*(∫ a : Sphere, t*a.1 i*current d.f₀ (x+t • a.1) j ∂sphereMeasure) := by + unfold datumWeightedSphere + congr 1 + apply integral_congr_ae + filter_upwards [] with a + rw [datum_current_eq_integral hd] + simp_rw [show ∀ v : Vec, d.f₀ (x+t • a.1,v)*(a.1 i*velocity v j)= + a.1 i*(d.f₀ (x+t • a.1,v)*velocity v j) by intro v; ring] + rw [integral_const_mul] + ring + +lemma datumWeightedSphere_waveCurrent {d : Datum} (hd : Admissible d) (t : ℝ) (x : Vec) (i : Fin 3) : + datumWeightedSphere d.f₀ (fun p => velocity p.2 i) (t,x)= + waveK (fun y => current d.f₀ y i) (t,x) := by + simp only [datumWeightedSphere,waveK,sphereSum,integral_const_mul,datum_current_eq_integral hd] + +lemma electricConeBoundary_datum_jets {d : Datum} (hd : Admissible d) (k : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, + ContDiff ℝ ∞ (fun x => electricConeBoundary (datumBoundarySolution d) t x i 0) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (fun y => electricConeBoundary (datumBoundarySolution d) t y i 0) x‖≤C := by + have hp (j : Fin 3) : ContDiff ℝ ∞ (fun v : Vec => v j) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).contDiff + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_jets hd.2.2.2.1 hd.2.2.2.2.1 k i + obtain ⟨hFs,B,hB,hflux⟩ := datumWeightedSphere_smooth_bound hd.1 hd.2.1 + (continuousOn_fluxWeight (continuousOn_datumElectricFluxKernel i)) k + obtain ⟨hRs,D,hD,hrho⟩ := datumWeightedSphere_smooth_bound hd.1 hd.2.1 + (((hp i).continuous.comp continuous_fst).continuousOn) k + obtain ⟨hJs,L,hL,hcurrent⟩ := datumWeightedSphere_smooth_bound hd.1 hd.2.1 + (((hp i).continuous.comp ((contDiff_velocity (k:=1)).continuous.comp continuous_snd)).continuousOn) k + let a := freeWave (fun y => d.E₀ y i) (fun y => curl d.B₀ y i) + let b := datumWeightedSphere d.f₀ (fun p => dot p.1 (datumElectricFluxKernel i (-p.1,p.2))) + let c := datumWeightedSphere d.f₀ (fun p => p.1 i) + let e := datumWeightedSphere d.f₀ (fun p => velocity p.2 i) + have has : ContDiff ℝ ∞ a := contDiff_freeWave ((hp i).comp hd.2.2.2.1.1) + ((hp i).comp (contDiff_curl hd.2.2.2.2.1.1)) + refine ⟨A+B+D+L,by positivity,?_⟩ + intro t ht + have heq : (fun x => electricConeBoundary (datumBoundarySolution d) t x i 0)= + (fun x => a (t,x)-b (t,x)-c (t,x)-e (t,x)) := by + funext x + simp only [electricConeBoundary,sub_zero] + simp_rw [datum_initial_electric_flux_normalised d i ht.1] + rw [←datumWeightedSphere_flux hd.1.continuous hd.2.1 (continuousOn_datumElectricFluxKernel i)] + simp only [datumBoundarySolution] + rw [←datumWeightedSphere_rho,←datumWeightedSphere_waveCurrent hd] + rw [heq] + have ha := has.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hb := hFs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hc := hRs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hd' := hJs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + refine ⟨((ha.sub hb).sub hc).sub hd',?_⟩ + intro x + exact (norm_iteratedFDeriv_sub_le ((ha.sub hb).sub hc) hd' k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le (ha.sub hb) hc k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le ha hb k x).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x).1 + (hflux t ⟨ht.1.le,ht.2⟩ x))) (hrho t ⟨ht.1.le,ht.2⟩ x))) + (hcurrent t ⟨ht.1.le,ht.2⟩ x)) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/ContinuousIntegralSphere.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/ContinuousIntegralSphere.lean new file mode 100644 index 0000000000000000000000000000000000000000..482549c8c4d748ac69e95e77d9cbc707994f2bd9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/ContinuousIntegralSphere.lean @@ -0,0 +1,231 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.CrossCLM + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma continuousOn_integral_sphere {H W : Type*} [TopologicalSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {S : Set H} {F : H × Vec → W} + (hF : ContinuousOn F (S ×ˢ sphere (0:Vec) 1)) : + ContinuousOn (fun p => ∫ n : Sphere, F (p,n.1) ∂sphereMeasure) S := by + have hc : ContinuousOn (fun p : H × Sphere => F (p.1,p.2.1)) (S ×ˢ univ) := + hF.comp (continuous_fst.prodMk (continuous_subtype_val.comp continuous_snd)).continuousOn + (fun p hp => ⟨hp.1,p.2.2⟩) + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hc + intro p n _ hn + exact (hn (mem_univ n)).elim + +lemma integral_ball_radius_tendsto {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {t : ℝ} (ht : 0 ∫ z in ball (0:Vec) (t-a), F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t, F z)) := by + have hh : Tendsto (fun a : ℝ => ∫ z in ball (0:Vec) t, + (ball (0:Vec) (t-a)).indicator F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t, F z)) := by + apply tendsto_integral_filter_of_dominated_convergence (fun z => ‖F z‖) + · exact Eventually.of_forall (fun a => hF.aestronglyMeasurable.indicator measurableSet_ball) + · exact Eventually.of_forall (fun a => ae_of_all _ (fun z => norm_indicator_le_norm_self _ _)) + · exact hF.norm + · filter_upwards [ae_restrict_mem measurableSet_ball] with z hz + have hn : ‖z‖ waveK g (t,x)) _ r at hd + rw [hd.deriv] + simp only [id_eq,one_mul,waveK,sphereSum] + +lemma contDiff_slab_slice {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × Vec → W} {k : ℕ∞ω} {T a : ℝ} + (hF : ContDiffOn ℝ k F (Icc 0 T ×ˢ (univ : Set Vec))) (ha : a ∈ Icc 0 T) : + ContDiff ℝ k (fun y => F (a,y)) := by + apply contDiffOn_univ.mp + exact hF.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun y _ => ⟨ha,mem_univ y⟩) + +lemma spatialPartial_spaceDerivative {F : Field} {T a : ℝ} + (hF : ContDiffOn ℝ 1 F (Icc 0 T ×ˢ (univ : Set Vec))) (ha : a ∈ Icc 0 T) + (y : Vec) (i j : Fin 3) : + spatialPartial (fun z => F (a,z) i) y j = spaceDerivative F (a,y) (basis j) i := by + have h := hasFDerivAt_time_slice hF ha y + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp y h + change HasFDerivAt (fun z => F (a,z) i) _ y at hi + rw [spatialPartial,hi.fderiv,spaceDerivative,h.fderiv] + rfl + +lemma continuousOn_slab_curl {F : Field} {T : ℝ} (hT : 0 curl (fun y => F (p.1,y)) p.2) + (Icc 0 T ×ˢ (univ : Set Vec)) := by + have hc := (contDiffOn_spaceDerivative hT hF).continuousOn + have hh (i j : Fin 3) : ContinuousOn + (fun p : ℝ × Vec => spatialPartial (fun y => F (p.1,y) i) p.2 j) + (Icc 0 T ×ˢ (univ : Set Vec)) := by + have ht := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (hc.clm_apply (continuousOn_const (c:=basis j))) + apply ht.congr + intro p hp + exact spatialPartial_spaceDerivative (hF.of_le (by decide)) hp.1 p.2 i j + apply (PiLp.continuous_toLp 2 _).comp_continuousOn + apply continuousOn_pi.mpr + intro i + fin_cases i <;> exact (hh _ _).sub (hh _ _) + +lemma continuousOn_freeWave_slab {F : Field} {H : ℝ × Vec → ℝ} {T : ℝ} (hT : 0 freeWave (fun y => F (a,y) i) (fun y => H (a,y)) (T-a,x)) + (Icc 0 T) := by + let S : Set (ℝ × Vec) := Icc 0 T ×ˢ sphere (0:Vec) 1 + let A : ℝ × Vec → ℝ × Vec := fun p => (p.1,x+(T-p.1) • p.2) + have hA : Continuous A := continuous_fst.prodMk + (continuous_const.add ((continuous_const.sub continuous_fst).smul continuous_snd)) + have hmap : MapsTo A S (Icc 0 T ×ˢ (univ : Set Vec)) := fun p hp => ⟨hp.1,mem_univ _⟩ + have hval : ContinuousOn (fun p : ℝ × Vec => F (p.1,x+(T-p.1) • p.2) i) S := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (hF.continuousOn.comp hA.continuousOn hmap) + have hder : ContinuousOn (fun p : ℝ × Vec => spaceDerivative F (p.1,x+(T-p.1) • p.2) p.2 i) S := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (((contDiffOn_spaceDerivative hT (hF.of_le (by decide))).continuousOn.comp hA.continuousOn hmap).clm_apply + continuous_snd.continuousOn) + have hH' := hH.comp hA.continuousOn hmap + have hv := continuousOn_integral_sphere hval + have hd := continuousOn_integral_sphere hder + have hh := continuousOn_integral_sphere hH' + have he := (hv.add (((continuousOn_const (c:=T)).sub continuousOn_id).mul hd)).const_mul ((4*Real.pi)⁻¹) + have he' := he.add ((((continuousOn_const (c:=T)).sub continuousOn_id).mul hh).const_mul ((4*Real.pi)⁻¹)) + apply he'.congr + intro a ha + have hf := contDiff_component (contDiff_slab_slice hF ha) i + dsimp only [A,Pi.add_apply,Pi.mul_apply,Pi.sub_apply,id_eq,Function.comp_apply] + rw [freeWave_sphere hf] + congr 2 + congr 1 + congr 1 + apply integral_congr_ae + filter_upwards [] with n + have h := hasFDerivAt_time_slice (hF.of_le (by decide)) ha (x+(T-a) • n.1) + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp _ h + change HasFDerivAt (fun y => F (a,y) i) _ (x+(T-a) • n.1) at hi + rw [hi.fderiv,spaceDerivative,h.fderiv] + rfl + +lemma coneBoundary_radius {T a : ℝ} (hT : 0 ∫ v : Vec, s.f (p.1,x+(T-p.1) • p.2,v) • + w (x+(T-p.1) • p.2,v)) (Icc 0 (T/2) ×ˢ sphere (0:Vec) 1) := by + obtain ⟨K,hK,hz⟩ := hc T hT.le + let S : Set (ℝ × Vec) := Icc 0 (T/2) ×ˢ sphere (0:Vec) 1 + have harg : Continuous (fun p : (ℝ × Vec) × Vec => (p.1.1,x+(T-p.1.1) • p.1.2,p.2)) := + continuous_fst.fst.prodMk ((continuous_const.add + ((continuous_const.sub continuous_fst.fst).smul continuous_fst.snd)).prodMk continuous_snd) + have hcf := hf.continuousOn.comp harg.continuousOn (show MapsTo _ (S ×ˢ univ) particleHalfSpace from + fun p hp => hp.1.1.1) + have hwc : ContinuousOn (fun p : (ℝ × Vec) × Vec => w (x+(T-p.1.1) • p.1.2,p.2)) (S ×ˢ univ) := by + intro p hp + exact ((hw _ (coneBoundary_ne hT hp.1.1 hp.1.2 x)).comp + (harg.snd.continuousAt)).continuousWithinAt + apply continuousOn_integral_uniform_support (hK.image continuous_snd) (hcf.smul hwc) + intro p hp v hv + have ht : p.1 ∈ Icc 0 T := ⟨hp.1.1,by linarith [hp.1.2]⟩ + have hfz : s.f (p.1,x+(T-p.1) • p.2,v)=0 := by + by_contra hne + exact hv ⟨(x+(T-p.1) • p.2,v),hz _ ht (subset_tsupport _ hne),rfl⟩ + change s.f (p.1,x+(T-p.1) • p.2,v) • w (x+(T-p.1) • p.2,v)=0 + rw [hfz,zero_smul] + +lemma continuousOn_electric_flux_boundary {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {T : ℝ} (hT : 0 retardedElectricFlux s T x i (x+(T-p.1) • p.2)) + (Icc 0 (T/2) ×ˢ sphere (0:Vec) 1) := by + have hw (z : Phase) (hz : x≠z.1) : ContinuousAt (fun z : Phase => retardedG x z i • velocity z.2) z := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.continuousAt.comp + (contDiffAt_retardedG (k:=1) hz).continuousAt).smul + ((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousAt + apply (continuousOn_weighted_cone_boundary hf hc hT x hw).congr + intro p hp + unfold retardedElectricFlux retardedDensity + dsimp only + rw [coneBoundary_radius hT hp.1 hp.2 x,sub_sub_cancel] + congr 1 + funext v + simp only [smul_smul] + +lemma continuousOn_magnetic_flux_boundary {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {T : ℝ} (hT : 0 retardedMagneticFlux s T x i (x+(T-p.1) • p.2)) + (Icc 0 (T/2) ×ˢ sphere (0:Vec) 1) := by + have hw (z : Phase) (hz : x≠z.1) : ContinuousAt (fun z : Phase => retardedH x z i • velocity z.2) z := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.continuousAt.comp + (contDiffAt_retardedH (k:=1) hz).continuousAt).smul + ((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousAt + apply (continuousOn_weighted_cone_boundary hf hc hT x hw).congr + intro p hp + unfold retardedMagneticFlux retardedDensity + dsimp only + rw [coneBoundary_radius hT hp.1 hp.2 x,sub_sub_cancel] + congr 1 + funext v + simp only [smul_smul] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureBounds.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..99f55911492a0ae544cbd3b79fe7ae50569628de --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureBounds.lean @@ -0,0 +1,1348 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.EquationsBefore +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardContraction + +namespace OAI + +noncomputable section + +namespace RVM + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +def CurvatureBound {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] (f : U → W) (C : ℝ) : Prop := + ∀ x h, ‖f (x+h)+f (x-h)-(2:ℝ) • f x‖≤C*‖h‖^2 + +lemma taylor_remainder_of_fderiv_lipschitz {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} (hf : Differentiable ℝ f) {H : ℝ} (hH : 0≤H) + (hD : ∀ x y, ‖fderiv ℝ f y-fderiv ℝ f x‖≤H*‖y-x‖) (x y : U) : + ‖f y-f x-fderiv ℝ f x (y-x)‖≤H*‖y-x‖^2 := by + have h := (convex_closedBall x ‖y-x‖).norm_image_sub_le_of_norm_fderiv_le' + (f:=f) (φ:=fderiv ℝ f x) (C:=H*‖y-x‖) (fun z _ => hf z) + (fun z hz => (hD x z).trans (mul_le_mul_of_nonneg_left + (by simpa only [mem_closedBall,dist_eq_norm] using hz) hH)) + (show x∈closedBall x ‖y-x‖ by simp) + (show y∈closedBall x ‖y-x‖ by simp only [mem_closedBall,dist_eq_norm,le_refl]) + exact h.trans_eq (by ring) + +lemma curvature_of_fderiv_lipschitz {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} (hf : Differentiable ℝ f) {H : ℝ} (hH : 0≤H) + (hD : ∀ x y, ‖fderiv ℝ f y-fderiv ℝ f x‖≤H*‖y-x‖) : CurvatureBound f (2*H) := by + intro x v + have hp := taylor_remainder_of_fderiv_lipschitz hf hH hD x (x+v) + have hm := taylor_remainder_of_fderiv_lipschitz hf hH hD x (x-v) + simp only [add_sub_cancel_left,sub_sub_cancel_left,norm_neg,map_neg] at hp hm + have he : f (x+v)+f (x-v)-(2:ℝ) • f x = + (f (x+v)-f x-fderiv ℝ f x v)+(f (x-v)-f x+fderiv ℝ f x v) := by module + rw [he] + exact ((norm_add_le _ _).trans (add_le_add hp (by simpa only [sub_neg_eq_add] using hm))).trans_eq (by ring) + +lemma smooth_compact_curvature {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → W} + (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) : + ∃ H : ℝ, 0≤H ∧ CurvatureBound f H := by + obtain ⟨H,hH,hD⟩ := smooth_compact_lipschitz + (hf.fderiv_right (by decide)) (hc.fderiv ℝ) + exact ⟨2*H,by positivity,curvature_of_fderiv_lipschitz (hf.differentiable (by simp)) hH hD⟩ + +lemma CurvatureBound.triple {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H L : ℝ} (hc : CurvatureBound f H) (hH : 0≤H) (_hL : 0≤L) + (hl : ∀ x y, ‖f y-f x‖≤L*‖y-x‖) (a b c : U) : + ‖f a+f b-(2:ℝ) • f c‖≤H*‖a-b‖^2+L*‖a+b-(2:ℝ) • c‖ := by + let m := (1/2:ℝ) • (a+b) + let v := (1/2:ℝ) • (a-b) + have hp : m+v=a := by dsimp [m,v]; module + have hm : m-v=b := by dsimp [m,v]; module + have hb := hc m v + rw [hp,hm] at hb + have hv : ‖v‖≤‖a-b‖ := by dsimp [v]; rw [norm_smul,Real.norm_eq_abs]; norm_num; nlinarith [norm_nonneg (a-b)] + have hmd : (2:ℝ) • (m-c)=a+b-(2:ℝ) • c := by dsimp [m]; module + have hde : f a+f b-(2:ℝ) • f c = + (f a+f b-(2:ℝ) • f m)+(2:ℝ) • (f m-f c) := by module + rw [hde] + have hh := hl c m + have hh' := mul_le_mul_of_nonneg_left hh (by norm_num : (0:ℝ)≤2) + have hscale : 2*‖m-c‖=‖a+b-(2:ℝ) • c‖ := by rw [← hmd,norm_smul,Real.norm_eq_abs]; norm_num + have hscale' := congrArg (fun r : ℝ => L*r) hscale + have hnorm : ‖(2:ℝ) • (f m-f c)‖≤L*‖a+b-(2:ℝ) • c‖ := by + rw [norm_smul,Real.norm_eq_abs]; norm_num + nlinarith [hh',hscale'] + exact (norm_add_le _ _).trans (add_le_add (hb.trans + (mul_le_mul_of_nonneg_left (sq_le_sq₀ (norm_nonneg _) (norm_nonneg _) |>.mpr hv) hH)) hnorm) + +lemma CurvatureBound.comp {U V W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : V → W} {g : U → V} + {H L M K : ℝ} (hf : CurvatureBound f H) (hg : CurvatureBound g K) + (hH : 0≤H) (hL : 0≤L) (hM : 0≤M) + (hfl : ∀ x y, ‖f y-f x‖≤L*‖y-x‖) + (hgl : ∀ x y, ‖g y-g x‖≤M*‖y-x‖) : + CurvatureBound (f ∘ g) (4*H*M^2+L*K) := by + intro x v + have ht := hf.triple hH hL hfl (g (x+v)) (g (x-v)) (g x) + have hdist : ‖g (x+v)-g (x-v)‖≤2*M*‖v‖ := by + have hh := hgl (x-v) (x+v) + rw [show x+v-(x-v)=(2:ℝ) • v by module,norm_smul,Real.norm_eq_abs] at hh + norm_num at hh + nlinarith [hh] + apply ht.trans + have hd := mul_le_mul_of_nonneg_left + ((sq_le_sq₀ (norm_nonneg _) (by positivity : 0≤2*M*‖v‖)).mpr hdist) hH + have hh := mul_le_mul_of_nonneg_left (hg x v) hL + nlinarith [hd,hh] + +lemma inverse_q_lipschitz (v w : Vec) : |(q w)⁻¹-(q v)⁻¹|≤‖w-v‖ := by + have hv : 1≤q v := by nlinarith [q_sq v,q_pos v,sq_nonneg ‖v‖] + have hw : 1≤q w := by nlinarith [q_sq w,q_pos w,sq_nonneg ‖w‖] + have he : (q w)⁻¹-(q v)⁻¹=(q v-q w)/(q w*q v) := by field_simp + rw [he,abs_div,abs_of_pos (mul_pos (q_pos w) (q_pos v)),abs_sub_comm] + exact (div_le_self (abs_nonneg _) (by nlinarith : 1≤q w*q v)).trans (q_lipschitz v w) + +lemma velocityProjection_parameter_lipschitz {u v : Vec} (hu : ‖u‖≤1) (hv : ‖v‖≤1) (h : Vec) : + ‖velocityProjection u h-velocityProjection v h‖≤2*‖u-v‖*‖h‖ := by + have he : velocityProjection u h-velocityProjection v h= + -(dot (u-v) h • u+dot v h • (u-v)) := by + simp only [velocityProjection,dot_sub_left,sub_smul,smul_sub] + module + rw [he,norm_neg] + have h₁ : ‖dot (u-v) h • u‖≤‖u-v‖*‖h‖ := by + rw [norm_smul,Real.norm_eq_abs] + exact (mul_le_mul (abs_dot_le _ _) hu (norm_nonneg _) (by positivity)).trans_eq (by ring) + have h₂ : ‖dot v h • (u-v)‖≤‖u-v‖*‖h‖ := by + rw [norm_smul,Real.norm_eq_abs] + have hh := mul_le_mul_of_nonneg_right ((abs_dot_le v h).trans + (mul_le_mul_of_nonneg_right hv (norm_nonneg h))) (norm_nonneg (u-v)) + exact hh.trans_eq (by ring) + exact ((norm_add_le _ _).trans (add_le_add h₁ h₂)).trans_eq (by ring) + +lemma fderiv_velocity_lipschitz (v w : Vec) : + ‖fderiv ℝ velocity w-fderiv ℝ velocity v‖≤3*‖w-v‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro h + have hu := (norm_velocity_lt_one w).le + have hv := (norm_velocity_lt_one v).le + have hh : (1:ℝ)≤q v := by nlinarith [q_sq v,q_pos v,sq_nonneg ‖v‖] + have hq : 0≤(q v)⁻¹ := inv_nonneg.mpr (q_pos v).le + have hq1 : (q v)⁻¹≤1 := (inv_le_one₀ (q_pos v)).mpr hh + have he : (fderiv ℝ velocity w-fderiv ℝ velocity v) h = + ((q w)⁻¹-(q v)⁻¹) • velocityProjection (velocity w) h+ + (q v)⁻¹ • (velocityProjection (velocity w) h-velocityProjection (velocity v) h) := by + simp only [sub_apply,fderiv_velocity_apply,velocityProjection,sub_smul,smul_sub] + module + rw [he] + have h₁ : ‖((q w)⁻¹-(q v)⁻¹) • velocityProjection (velocity w) h‖≤‖w-v‖*‖h‖ := by + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (inverse_q_lipschitz v w) (velocityProjection_norm _ _ hu) + (norm_nonneg _) (norm_nonneg _) + have h₂ : ‖(q v)⁻¹ • (velocityProjection (velocity w) h-velocityProjection (velocity v) h)‖≤ + 2*‖w-v‖*‖h‖ := by + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hq] + have hp := (velocityProjection_parameter_lipschitz hu hv h).trans + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left (velocity_global_lipschitz v w) + (by norm_num)) (norm_nonneg h)) + exact (mul_le_mul hq1 hp (norm_nonneg _) zero_le_one).trans_eq (by ring) + exact ((norm_add_le _ _).trans (add_le_add h₁ h₂)).trans_eq (by ring) + +lemma velocity_curvature : CurvatureBound velocity 6 := by + convert curvature_of_fderiv_lipschitz + (contDiff_velocity.differentiable (by simp : (∞:ℕ∞ω)≠0)) (by norm_num : (0:ℝ)≤3) + fderiv_velocity_lipschitz using 1 + norm_num + +lemma CurvatureBound.precomp_linear {U V W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : V → W} {H : ℝ} + (hf : CurvatureBound f H) (hH : 0≤H) (A : U →L[ℝ] V) (hA : ∀ v, ‖A v‖≤‖v‖) : + CurvatureBound (f ∘ A) H := by + intro x v + simp only [Function.comp_def,map_add,map_sub] + exact (hf (A x) (A v)).trans (mul_le_mul_of_nonneg_left + ((sq_le_sq₀ (norm_nonneg _) (norm_nonneg _)).mpr (hA v)) hH) + +lemma CurvatureBound.add {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f g : U → W} {H K : ℝ} (hf : CurvatureBound f H) (hg : CurvatureBound g K) : + CurvatureBound (fun x => f x+g x) (H+K) := by + intro x v + have he : f (x+v)+g (x+v)+(f (x-v)+g (x-v))-(2:ℝ) • (f x+g x)= + (f (x+v)+f (x-v)-(2:ℝ) • f x)+(g (x+v)+g (x-v)-(2:ℝ) • g x) := by module + rw [he] + exact ((norm_add_le _ _).trans (add_le_add (hf x v) (hg x v))).trans_eq (by ring) + +lemma CurvatureBound.cross_product {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {f g : U → Vec} {A B L N H K : ℝ} (hf : CurvatureBound f H) (hg : CurvatureBound g K) + (hA : 0≤A) (_hB : 0≤B) (hL : 0≤L) (_hN : 0≤N) (hH : 0≤H) (_hK : 0≤K) + (hfb : ∀ x, ‖f x‖≤A) (hgb : ∀ x, ‖g x‖≤B) + (hfl : ∀ x y, ‖f y-f x‖≤L*‖y-x‖) (hgl : ∀ x y, ‖g y-g x‖≤N*‖y-x‖) : + CurvatureBound (fun x => cross (f x) (g x)) (H*B+A*K+2*L*N) := by + intro x v + have he : cross (f (x+v)) (g (x+v))+cross (f (x-v)) (g (x-v))- + (2:ℝ) • cross (f x) (g x)= + cross (f (x+v)+f (x-v)-(2:ℝ) • f x) (g x)+ + cross (f x) (g (x+v)+g (x-v)-(2:ℝ) • g x)+ + cross (f (x+v)-f x) (g (x+v)-g x)+cross (f (x-v)-f x) (g (x-v)-g x) := by + ext i + fin_cases i <;> simp [cross] <;> ring + have h₁ := (norm_cross_le _ _).trans (mul_le_mul (hf x v) (hgb x) (norm_nonneg _) (by positivity)) + have h₂ := (norm_cross_le _ _).trans (mul_le_mul (hfb x) (hg x v) (norm_nonneg _) hA) + have h₃ : ‖cross (f (x+v)-f x) (g (x+v)-g x)‖≤(L*‖v‖)*(N*‖v‖) := by + have hp := hfl x (x+v) + have hq := hgl x (x+v) + simp only [add_sub_cancel_left] at hp hq + exact (norm_cross_le _ _).trans (mul_le_mul hp hq (norm_nonneg _) (by positivity)) + have h₄ : ‖cross (f (x-v)-f x) (g (x-v)-g x)‖≤(L*‖v‖)*(N*‖v‖) := by + have hp := hfl x (x-v) + have hq := hgl x (x-v) + simp only [sub_sub_cancel_left,norm_neg] at hp hq + exact (norm_cross_le _ _).trans (mul_le_mul hp hq (norm_nonneg _) (by positivity)) + rw [he] + exact ((norm_add_le _ _).trans (add_le_add ((norm_add_le _ _).trans + (add_le_add ((norm_add_le _ _).trans (add_le_add h₁ h₂)) h₃)) h₄)).trans_eq (by ring) + +lemma lorentzField_curvature {E B : Field} {t L N H : ℝ} + (hL : 0≤L) (hN : 0≤N) (hH : 0≤H) + (hBb : ∀ x, ‖B (t,x)‖≤L) + (hBx : ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + (hEc : CurvatureBound (fun x => E (t,x)) H) + (hBc : CurvatureBound (fun x => B (t,x)) H) : + CurvatureBound (fun z => lorentzField E B (t,z)) (6+6*L+2*H+2*N) := by + let u : Phase → Vec := fun z => velocity z.2 + let g : Phase → Vec := fun z => B (t,z.1) + have hu : CurvatureBound u 6 := velocity_curvature.precomp_linear (by norm_num) + (ContinuousLinearMap.snd ℝ Vec Vec) (fun z => norm_snd_le z) + have hg : CurvatureBound g H := hBc.precomp_linear hH + (ContinuousLinearMap.fst ℝ Vec Vec) (fun z => norm_fst_le z) + have he : CurvatureBound (fun z : Phase => E (t,z.1)) H := hEc.precomp_linear hH + (ContinuousLinearMap.fst ℝ Vec Vec) (fun z => norm_fst_le z) + have hul (z w : Phase) : ‖u w-u z‖≤1*‖w-z‖ := by + change ‖velocity w.2-velocity z.2‖≤1*‖w-z‖ + rw [one_mul] + exact (velocity_global_lipschitz z.2 w.2).trans (norm_snd_le (w-z)) + have hgl (z w : Phase) : ‖g w-g z‖≤N*‖w-z‖ := + (hBx z.1 w.1).trans (mul_le_mul_of_nonneg_left (norm_fst_le (w-z)) hN) + have hc := hu.cross_product hg (by norm_num) hL (by norm_num) hN (by norm_num) hH + (fun z => (norm_velocity_lt_one z.2).le) (fun z => hBb z.1) hul hgl + have hforce := he.add hc + intro z v + change ‖(u (z+v),E (t,(z+v).1)+cross (u (z+v)) (g (z+v)))+ + (u (z-v),E (t,(z-v).1)+cross (u (z-v)) (g (z-v)))- + (2:ℝ) • (u z,E (t,z.1)+cross (u z) (g z))‖≤_ + rw [Prod.norm_def,max_le_iff] + constructor + · have hh := hu z v + simp only [Prod.fst_sub,Prod.fst_add,Prod.smul_fst] + nlinarith [hh,sq_nonneg ‖v‖,mul_nonneg hL (sq_nonneg ‖v‖), + mul_nonneg hH (sq_nonneg ‖v‖),mul_nonneg hN (sq_nonneg ‖v‖)] + · have hh := hforce z v + simp only [Prod.snd_sub,Prod.snd_add,Prod.smul_snd] + nlinarith [hh,sq_nonneg ‖v‖] + +def SmoothLorentzFlow.reversePath {E B : Field} (F : SmoothLorentzFlow E B) + (t : ℝ) (z : Phase) (u : ℝ) : Phase := F.forward (F.backward (t,z)) (t-u) + +lemma SmoothLorentzFlow.reversePath_deriv {E B : Field} (F : SmoothLorentzFlow E B) + (t u : ℝ) (z : Phase) : + HasDerivAt (F.reversePath t z) (-lorentzField E B (t-u,F.reversePath t z u)) u := by + change HasDerivAt (fun r => F.forward (F.backward (t,z)) (t-r)) + (-lorentzField E B (t-u,F.forward (F.backward (t,z)) (t-u))) u + have hh := (F.ode (F.backward (t,z)) (t-u)).scomp u ((hasDerivAt_id u).const_sub t) + simpa only [Function.comp_def,one_smul,neg_smul] using hh + +@[simp] lemma SmoothLorentzFlow.reversePath_zero {E B : Field} (F : SmoothLorentzFlow E B) + (t : ℝ) (z : Phase) : F.reversePath t z 0=z := by + simp [SmoothLorentzFlow.reversePath,F.right_inverse] + +@[simp] lemma SmoothLorentzFlow.reversePath_end {E B : Field} (F : SmoothLorentzFlow E B) + (t : ℝ) (z : Phase) : F.reversePath t z t=F.backward (t,z) := by + simp [SmoothLorentzFlow.reversePath,F.initial] + +lemma SmoothLorentzFlow.reversePath_lipschitz {E B : Field} (F : SmoothLorentzFlow E B) + {T L N : ℝ} (hL : 0≤L) (hN : 0≤N) + (hB : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ t∈Icc 0 T, ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ t∈Icc 0 T, ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + {t u : ℝ} (ht : t∈Icc 0 T) (hu : u∈Icc 0 t) (z z' : Phase) : + ‖F.reversePath t z u-F.reversePath t z' u‖≤‖z-z'‖*Real.exp ((1+2*N+L)*u) := by + let K := 1+2*N+L + have hK : 0 F.reversePath t z u-F.reversePath t z' u) (Icc 0 t) := + (continuous_iff_continuousAt.mpr fun u => (F.reversePath_deriv t u z).continuousAt).continuousOn.sub + (continuous_iff_continuousAt.mpr fun u => (F.reversePath_deriv t u z').continuousAt).continuousOn + have hh := norm_le_gronwallBound_of_norm_deriv_right_le hfc + (fun u _ => ((F.reversePath_deriv t u z).sub (F.reversePath_deriv t u z')).hasDerivWithinAt) + (K:=K) (ε:=0) (δ:=‖z-z'‖) (by simp) + (fun v hv => by + have htime : t-v∈Icc 0 T := ⟨by linarith [hv.2],by linarith [ht.2,hv.1]⟩ + have h := lorentzField_difference_bound (E':=E) (B':=B) hL hN (D:=0) le_rfl (hB _ htime) (hEx _ htime) (hBx _ htime) + (by intros; simp) (by intros; simp) (F.reversePath t z v) (F.reversePath t z' v) + simpa only [neg_sub_neg,norm_sub_rev,mul_zero,add_zero] using h) u hu + exact hh.trans (by simpa only [zero_mul,add_zero,sub_zero] using + gronwallBound_le_exp_linear hK (ε:=0) le_rfl hu.1 (δ:=‖z-z'‖)) + +lemma SmoothLorentzFlow.backward_curvature {E B : Field} (F : SmoothLorentzFlow E B) + {T L N H : ℝ} (hL : 0≤L) (hN : 0≤N) (hH : 0≤H) + (hB : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ t∈Icc 0 T, ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ t∈Icc 0 T, ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + (hEc : ∀ t∈Icc 0 T, CurvatureBound (fun x => E (t,x)) H) + (hBc : ∀ t∈Icc 0 T, CurvatureBound (fun x => B (t,x)) H) + {t : ℝ} (ht : t∈Icc 0 T) : + CurvatureBound (fun z => F.backward (t,z)) + (4*(6+6*L+2*H+2*N)*t*(Real.exp ((1+2*N+L)*T))^3) := by + intro z v + let K := 1+2*N+L + let C := 6+6*L+2*H+2*N + let Q := Real.exp (K*T) + have hK : 0 F.reversePath t (z+v) u+F.reversePath t (z-v) u- + (2:ℝ) • F.reversePath t z u + let d' : ℝ → Phase := fun u => -lorentzField E B (t-u,F.reversePath t (z+v) u)- + lorentzField E B (t-u,F.reversePath t (z-v) u)+(2:ℝ) • lorentzField E B (t-u,F.reversePath t z u) + have hd (u : ℝ) : HasDerivAt d (d' u) u := by + have hh := ((F.reversePath_deriv t u (z+v)).add (F.reversePath_deriv t u (z-v))).sub + ((F.reversePath_deriv t u z).const_smul (2:ℝ)) + have he : d' u = -lorentzField E B (t-u,F.reversePath t (z+v) u)+ + -lorentzField E B (t-u,F.reversePath t (z-v) u)- + (2:ℝ) • -lorentzField E B (t-u,F.reversePath t z u) := by dsimp [d']; module + rw [he] + exact hh + have hdc : ContinuousOn d (Icc 0 t) := + (continuous_iff_continuousAt.mpr fun u => (hd u).continuousAt).continuousOn + have hzero : ‖d 0‖≤0 := by + have he : d 0=0 := by dsimp [d]; rw [F.reversePath_zero,F.reversePath_zero,F.reversePath_zero]; module + rw [he,norm_zero] + have hbound (u : ℝ) (hu : u∈Ico 0 t) : ‖d' u‖≤K*‖d u‖+4*C*Q^2*‖v‖^2 := by + have htime : t-u∈Icc 0 T := ⟨by linarith [hu.2],by linarith [ht.2,hu.1]⟩ + have hforce := lorentzField_curvature hL hN hH (hB _ htime) (hBx _ htime) (hEc _ htime) (hBc _ htime) + have hforceL (a b : Phase) : ‖lorentzField E B (t-u,b)-lorentzField E B (t-u,a)‖≤K*‖b-a‖ := by + simpa only [mul_zero,add_zero] using lorentzField_difference_bound (E':=E) (B':=B) hL hN (D:=0) le_rfl + (hB _ htime) (hEx _ htime) (hBx _ htime) (by intros; simp) (by intros; simp) b a + have htr := hforce.triple hC hK.le hforceL + (F.reversePath t (z+v) u) (F.reversePath t (z-v) u) (F.reversePath t z u) + have hdist : ‖F.reversePath t (z+v) u-F.reversePath t (z-v) u‖≤2*‖v‖*Q := by + have hh := F.reversePath_lipschitz hL hN hB hEx hBx ht (Ico_subset_Icc_self hu) (z+v) (z-v) + rw [show z+v-(z-v)=(2:ℝ) • v by module,norm_smul,Real.norm_eq_abs] at hh + norm_num at hh + exact hh.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr + (mul_le_mul_of_nonneg_left (le_trans hu.2.le ht.2) hK.le)) (by positivity)) + have hdist2 := mul_le_mul_of_nonneg_left + ((sq_le_sq₀ (norm_nonneg _) (by positivity : 0≤2*‖v‖*Q)).mpr hdist) hC + have he : d' u=-(lorentzField E B (t-u,F.reversePath t (z+v) u)+ + lorentzField E B (t-u,F.reversePath t (z-v) u)-(2:ℝ) • lorentzField E B (t-u,F.reversePath t z u)) := by + dsimp [d']; module + rw [he,norm_neg] + dsimp only [d] + nlinarith [htr,hdist2] + have hh := norm_le_gronwallBound_of_norm_deriv_right_le hdc + (fun u _ => (hd u).hasDerivWithinAt) (K:=K) (ε:=4*C*Q^2*‖v‖^2) hzero hbound t ⟨ht.1,le_rfl⟩ + simp only [sub_zero] at hh + have hε : 0≤4*C*Q^2*‖v‖^2 := by positivity + have hfull := hh.trans (gronwallBound_le_exp_linear hK hε ht.1) + simp only [d,F.reversePath_end,zero_add] at hfull + have h_exp : Real.exp (K*t)≤Q := Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left ht.2 hK.le) + have hfinal := hfull.trans (mul_le_mul_of_nonneg_left h_exp (mul_nonneg hε ht.1)) + exact hfinal.trans_eq (by dsimp [C,Q,K]; ring) + +lemma CurvatureBound.mono {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H K : ℝ} (hf : CurvatureBound f H) (h : H≤K) : CurvatureBound f K := + fun x v => (hf x v).trans (mul_le_mul_of_nonneg_right h (sq_nonneg _)) + +lemma CurvatureBound.prodMk {U V W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → V} {g : U → W} {H : ℝ} + (hf : CurvatureBound f H) (hg : CurvatureBound g H) : + CurvatureBound (fun x => (f x,g x)) H := by + intro x v + exact max_le (hf x v) (hg x v) + +lemma CurvatureBound.translate {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hf : CurvatureBound f H) (a : U) : + CurvatureBound (fun x => f (x+a)) H := by + intro x v + convert hf (x+a) v using 1 + congr 2 + abel_nf + +lemma transported_curvature {d : Datum} {s : Solution} {E B : Field} + (hs : PicardRegular d s) (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hV : TransportFor s E B) {T A D L N H : ℝ} + (hA : 0≤A) (hD : 0≤D) (hL : 0≤L) (hN : 0≤N) (hH : 0≤H) + (ha : ∀ z w, ‖d.f₀ w-d.f₀ z‖≤A*‖w-z‖) (hdc : CurvatureBound d.f₀ D) + (hBb : ∀ t∈Icc 0 T, ∀ x, ‖B (t,x)‖≤L) + (hEx : ∀ t∈Icc 0 T, ∀ x y, ‖E (t,y)-E (t,x)‖≤N*‖y-x‖) + (hBx : ∀ t∈Icc 0 T, ∀ x y, ‖B (t,y)-B (t,x)‖≤N*‖y-x‖) + (hEc : ∀ t∈Icc 0 T, CurvatureBound (fun x => E (t,x)) H) + (hBc : ∀ t∈Icc 0 T, CurvatureBound (fun x => B (t,x)) H) + {t : ℝ} (ht : t∈Icc 0 T) : + CurvatureBound (fun z => s.f (t,z)) + (4*D*(Real.exp ((1+2*N+L)*T))^2+ + A*(4*(6+6*L+2*H+2*N)*t*(Real.exp ((1+2*N+L)*T))^3)) := by + obtain ⟨F⟩ := exists_smoothLorentzFlow hE hB + have hrep : (fun z => s.f (t,z))=d.f₀ ∘ (fun z => F.backward (t,z)) := by + funext z + rw [F.transport_for_inverse hs.smooth_f hV,hs.initial_f] + rfl + rw [hrep] + apply hdc.comp (F.backward_curvature hL hN hH hBb hEx hBx hEc hBc ht) hD hA (Real.exp_pos _).le ha + intro z w + have hh := F.reversePath_lipschitz hL hN hBb hEx hBx ht (show t∈Icc 0 t from ⟨ht.1,le_rfl⟩) w z + simp only [F.reversePath_end] at hh + exact hh.trans ((mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr + (mul_le_mul_of_nonneg_left ht.2 (by linarith : 0≤1+2*N+L))) (norm_nonneg _)).trans_eq (by ring)) + +lemma CurvatureBound.neg {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hf : CurvatureBound f H) : CurvatureBound (fun x => -f x) H := by + intro x v + simpa only [← neg_add,smul_neg,neg_sub_neg,norm_sub_rev] using hf x v + +lemma CurvatureBound.sub {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f g : U → W} {H K : ℝ} (hf : CurvatureBound f H) (hg : CurvatureBound g K) : + CurvatureBound (fun x => f x-g x) (H+K) := by + simpa only [sub_eq_add_neg] using hf.add hg.neg + +lemma CurvatureBound.const_smul {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hf : CurvatureBound f H) (a : ℝ) : + CurvatureBound (fun x => a • f x) (|a| * H) := by + intro x v + rw [show a • f (x+v)+a • f (x-v)-(2:ℝ) • (a • f x)= + a • (f (x+v)+f (x-v)-(2:ℝ) • f x) by module,norm_smul,Real.norm_eq_abs] + exact (mul_le_mul_of_nonneg_left (hf x v) (abs_nonneg a)).trans_eq (by ring) + +lemma CurvatureBound.post_linear {U V W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → V} {H : ℝ} + (hf : CurvatureBound f H) (A : V →L[ℝ] W) : + CurvatureBound (fun x => A (f x)) (‖A‖*H) := by + intro x v + rw [← map_add,← map_smul,← map_sub] + exact (A.le_opNorm _).trans ((mul_le_mul_of_nonneg_left (hf x v) (norm_nonneg _)).trans_eq (by ring)) + +lemma CurvatureBound.coordinate {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {f : U → Vec} {H : ℝ} (hf : CurvatureBound f H) (i : Fin 3) : + CurvatureBound (fun x => f x i) H := by + intro x v + exact (norm_coordinate_le (f (x+v)+f (x-v)-(2:ℝ) • f x) i).trans (hf x v) + +lemma CurvatureBound.spatial_slice {f : Phase → ℝ} {H : ℝ} + (hf : CurvatureBound f H) (v : Vec) : CurvatureBound (fun x => f (x,v)) H := by + intro x h + simpa only [Prod.mk_add_mk,Prod.mk_sub_mk,add_zero,sub_zero,Prod.norm_mk,norm_zero, + max_eq_left (norm_nonneg _)] using hf (x,v) (h,0) + +lemma CurvatureBound.clm_apply_const {U V W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → (V →L[ℝ] W)} {H : ℝ} + (hf : CurvatureBound f H) (a : V) : + CurvatureBound (fun x => f x a) (H*‖a‖) := by + intro x v + have hh := (f (x+v)+f (x-v)-(2:ℝ) • f x).le_opNorm a + exact hh.trans ((mul_le_mul_of_nonneg_right (hf x v) (norm_nonneg _)).trans_eq (by ring)) + +lemma CurvatureBound.integral {α U W : Type*} [MeasurableSpace α] + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {μ : Measure α} [IsFiniteMeasure μ] {f : α → U → W} {H : ℝ} + (hint : ∀ x, Integrable (fun a => f a x) μ) + (hf : ∀ᵐ a ∂μ, CurvatureBound (f a) H) : + CurvatureBound (fun x => ∫ a, f a x ∂μ) (H*μ.real univ) := by + intro x v + have hadd : Integrable (fun a => f a (x+v)+f a (x-v)) μ := (hint (x+v)).add (hint (x-v)) + have hsmul : Integrable (fun a => (2:ℝ) • f a x) μ := (hint x).smul (2:ℝ) + rw [← integral_add (hint (x+v)) (hint (x-v)),← integral_smul,← integral_sub hadd hsmul] + exact (norm_integral_le_of_norm_le_const (hf.mono fun a ha => ha x v)).trans_eq (by ring) + +lemma curvature_of_second_derivative_bound {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} (hf : ContDiff ℝ ∞ f) {H : ℝ} (hH : 0≤H) + (hb : ∀ x, ‖iteratedFDeriv ℝ 2 f x‖≤H) : CurvatureBound f (2*H) := by + apply curvature_of_fderiv_lipschitz (hf.differentiable (by simp)) hH + intro x y + apply (convex_univ : Convex ℝ (univ : Set U)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => (hf.fderiv_right (by decide : (1:ℕ∞ω)+1≤∞)).differentiable (by norm_num) z) _ (mem_univ _) (mem_univ _) + intro z _ + simpa only [← norm_iteratedFDeriv_one,norm_iteratedFDeriv_fderiv] using hb z + +lemma BoundedSmooth.spatial_curvature {F : Vec → Vec} (hF : BoundedSmooth F) : + ∃ H : ℝ, 0≤H ∧ CurvatureBound F H ∧ CurvatureBound (fderiv ℝ F) H := by + obtain ⟨A,hA⟩ := hF.2 2 + obtain ⟨B,hB⟩ := hF.2 3 + let H := max A 0+max B 0 + have hH : 0≤H := by dsimp [H]; positivity + refine ⟨2*H,by positivity,curvature_of_second_derivative_bound hF.1 hH ?_, + curvature_of_second_derivative_bound (hF.1.fderiv_right (by simp)) hH ?_⟩ + · intro x + exact (hA x).trans (by dsimp [H]; linarith [le_max_left A 0,le_max_right B 0]) + · intro x + rw [norm_iteratedFDeriv_fderiv] + exact (hB x).trans (by dsimp [H]; linarith [le_max_left B 0,le_max_right A 0]) + +lemma CurvatureBound.smul_const {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → ℝ} {H : ℝ} (hf : CurvatureBound f H) (a : W) : + CurvatureBound (fun x => f x • a) (H*‖a‖) := by + intro x v + rw [show f (x+v) • a+f (x-v) • a-(2:ℝ) • (f x • a)= + (f (x+v)+f (x-v)-(2:ℝ) • f x) • a by simp only [add_smul,sub_smul,smul_smul,smul_eq_mul],norm_smul] + exact (mul_le_mul_of_nonneg_right (hf x v) (norm_nonneg a)).trans_eq (by ring) + +lemma sphere_average_curvature {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Sphere → U → W} {H : ℝ} (hc : ∀ x, Continuous (fun n => f n x)) + (hf : ∀ n, CurvatureBound (f n) H) : + CurvatureBound (fun x => (4*Real.pi)⁻¹ • ∫ n, f n x ∂sphereMeasure) H := by + have hh := (CurvatureBound.integral + (fun x => (hc x).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + (ae_of_all sphereMeasure hf)).const_smul (4*Real.pi)⁻¹ + simpa only [sphere_area,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹), + mul_left_comm _ H,inv_mul_cancel₀ (by positivity : 4*Real.pi≠0),mul_one] using hh + +lemma uniform_datum_velocity_integral_curvature {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Phase → ℝ} {H : Vec × Vec → W} (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ n : Vec, ‖n‖=1 → + CurvatureBound (fun x => ∫ v : Vec, f (x,v) • H (n,v)) C := by + obtain ⟨K,hK,hz⟩ := datum_velocity_support hc + obtain ⟨A,hA,hfa⟩ := smooth_compact_curvature hf hc + obtain ⟨B,hB⟩ := ((isCompact_sphere (0:Vec) 1).prod hK).exists_bound_of_continuousOn + (hH.mono (by intro p hp; exact ⟨hp.1,mem_univ _⟩)) + let D := max B 0 + have hD : 0≤D := le_max_right _ _ + refine ⟨(A*D)*(volume K).toReal,by positivity,?_⟩ + intro n hn + have hn' : n∈sphere (0:Vec) 1 := mem_sphere_zero_iff_norm.mpr hn + have hint (z : Vec) : Integrable (fun v => f (z,v) • H (n,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hf.continuous.comp (continuous_const.prodMk continuous_id)).smul + (hH.comp_continuous (continuous_const.prodMk continuous_id) (fun v => ⟨hn',mem_univ v⟩)) + · exact HasCompactSupport.intro hK (fun v hv => by rw [hz z v hv,zero_smul]) + have he (x : Vec) : (∫ v in K, f (x,v) • H (n,v))=∫ v, f (x,v) • H (n,v) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hz x v hv,zero_smul] + let : IsFiniteMeasure (volume.restrict K) := ⟨by simpa only [Measure.restrict_apply_univ] using hK.measure_lt_top⟩ + have hbound : ∀ᵐ v ∂volume.restrict K, CurvatureBound (fun x => f (x,v) • H (n,v)) (A*D) := by + filter_upwards [ae_restrict_mem hK.measurableSet] with v hv + exact ((hfa.spatial_slice v).smul_const (H (n,v))).mono + (mul_le_mul_of_nonneg_left ((hB (n,v) ⟨hn',hv⟩).trans (le_max_left _ _)) hA) + have hh := CurvatureBound.integral (fun x => (hint x).restrict) hbound + simpa only [he,Measure.real,Measure.restrict_apply_univ] using hh + +lemma freeWave_curvature {g h : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (hh : Continuous h) + {C : ℝ} (hC : 0≤C) (hgc : CurvatureBound g C) + (hgd : ∀ n : Vec, ‖n‖=1 → CurvatureBound (fun x => fderiv ℝ g x n) C) + (hhc : CurvatureBound h C) {t : ℝ} (ht : t∈Icc (0:ℝ) 1) : + CurvatureBound (fun x => freeWave g h (t,x)) (3*C) := by + have hc (z : Vec) : Continuous (fun n : Sphere => g (z+t • n.1)) := + hg.continuous.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have hd (z : Vec) : Continuous (fun n : Sphere => fderiv ℝ g (z+t • n.1) n.1) := + ((hg.continuous_fderiv (by simp)).comp + (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))).clm_apply continuous_subtype_val + have hhc' (z : Vec) : Continuous (fun n : Sphere => h (z+t • n.1)) := + hh.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have A := sphere_average_curvature hc (fun n => hgc.translate (t • n.1)) + have B := (sphere_average_curvature hd (fun n => (hgd n.1 (mem_sphere_zero_iff_norm.mp n.2)).translate (t • n.1))).const_smul t + have D := (sphere_average_curvature hhc' (fun n => hhc.translate (t • n.1))).const_smul t + have he : (fun x => freeWave g h (t,x))=(fun x => + (4*Real.pi)⁻¹ • (∫ n : Sphere, g (x+t • n.1) ∂sphereMeasure)+ + t • ((4*Real.pi)⁻¹ • (∫ n : Sphere, fderiv ℝ g (x+t • n.1) n.1 ∂sphereMeasure))+ + t • ((4*Real.pi)⁻¹ • (∫ n : Sphere, h (x+t • n.1) ∂sphereMeasure))) := by + funext x + rw [freeWave_sphere hg] + simp only [smul_eq_mul] + ring + rw [he] + exact ((A.add B).add D).mono (by rw [abs_of_nonneg ht.1]; nlinarith [ht.2]) + +lemma waveK_curvature {g : Vec → ℝ} (hg : Continuous g) {C : ℝ} (hC : 0≤C) + (hgc : CurvatureBound g C) {t : ℝ} (ht : t∈Icc (0:ℝ) 1) : + CurvatureBound (fun x => waveK g (t,x)) C := by + have hc (z : Vec) : Continuous (fun n : Sphere => g (z+t • n.1)) := + hg.comp (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)) + have hh := (sphere_average_curvature hc (fun n => hgc.translate (t • n.1))).const_smul t + have he : (fun x => waveK g (t,x))=(fun x => t • ((4*Real.pi)⁻¹ • ∫ n : Sphere, g (x+t • n.1) ∂sphereMeasure)) := by + funext x + simp only [waveK,sphereSum,smul_eq_mul] + ring + rw [he] + exact hh.mono (by rw [abs_of_nonneg ht.1]; exact mul_le_of_le_one_left hC ht.2) + +lemma CurvatureBound.curl_coordinate {F : Vec → Vec} {H : ℝ} + (hF : Differentiable ℝ F) (hc : CurvatureBound (fderiv ℝ F) H) (i : Fin 3) : + CurvatureBound (fun x => curl F x i) (2*H) := by + have ha (j : Fin 3) : CurvatureBound (fun x => fderiv ℝ F x (basis j)) H := by + simpa [basis,PiLp.norm_single] using hc.clm_apply_const (basis j) + have he : (fun x => curl F x i)=(fun x => (fderiv ℝ F x (basis (curlA i))) (curlB i)- + (fderiv ℝ F x (basis (curlB i))) (curlA i)) := by + funext x + fin_cases i <;> simp [curl,curlA,curlB,spatialPartial,coordinate_fderiv_apply hF] + rw [he] + convert ((ha (curlA i)).coordinate (curlB i)).sub ((ha (curlB i)).coordinate (curlA i)) using 1 + ring + +lemma BoundedSmooth.freeWave_coordinate_curvature {E B : Vec → Vec} + (hE : BoundedSmooth E) (hB : BoundedSmooth B) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, + CurvatureBound (fun x => freeWave (fun z => E z i) (fun z => curl B z i) (t,x)) C ∧ + CurvatureBound (fun x => freeWave (fun z => B z i) (fun z => -curl E z i) (t,x)) C := by + obtain ⟨A,hA,hEc,hEdc⟩ := hE.spatial_curvature + obtain ⟨D,hD,hBc,hBdc⟩ := hB.spatial_curvature + let C := 2*(A+D) + have hC : 0≤C := by dsimp [C]; positivity + have hAC : A≤C := by dsimp [C]; linarith + have hDC : D≤C := by dsimp [C]; linarith + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + refine ⟨3*C,by positivity,?_⟩ + intro t ht + constructor + · apply freeWave_curvature (hproj.comp hE.1) + (hproj.continuous.comp (contDiff_curl hB.1).continuous) hC ((hEc.coordinate i).mono hAC) _ + ((hBdc.curl_coordinate (hB.1.differentiable (by simp)) i).mono (by dsimp [C]; linarith)) ht + intro n hn + have hh := ((hEdc.clm_apply_const n).coordinate i).mono (show A*‖n‖≤C by rw [hn,mul_one]; exact hAC) + simpa only [Function.comp_def,coordinate_fderiv_apply (hE.1.differentiable (by simp))] using hh + · apply freeWave_curvature (hproj.comp hB.1) + (hproj.continuous.comp (contDiff_curl hE.1).continuous).neg hC ((hBc.coordinate i).mono hDC) _ + (((hEdc.curl_coordinate (hE.1.differentiable (by simp)) i).mono (by dsimp [C]; linarith)).neg) ht + intro n hn + have hh := ((hBdc.clm_apply_const n).coordinate i).mono (show D*‖n‖≤C by rw [hn,mul_one]; exact hDC) + simpa only [Function.comp_def,coordinate_fderiv_apply (hB.1.differentiable (by simp))] using hh + +lemma CurvatureBound.dot_const {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {f : U → Vec} {H : ℝ} (hf : CurvatureBound f H) (n : Vec) : + CurvatureBound (fun x => dot n (f x)) (‖n‖*H) := by + intro x v + change |dot n (f (x+v))+dot n (f (x-v))-2*dot n (f x)|≤_ + rw [← dot_add_right,← dot_smul_right,← dot_sub_right] + exact (abs_dot_le _ _).trans ((mul_le_mul_of_nonneg_left (hf x v) (norm_nonneg _)).trans_eq (by ring)) + +lemma datum_moment_curvature {d : Datum} (hd : Admissible d) : + ∃ H : ℝ, 0≤H ∧ CurvatureBound (rho d.f₀) H ∧ CurvatureBound (current d.f₀) H := by + obtain ⟨A,hA,ha⟩ := uniform_datum_velocity_integral_curvature + hd.1 hd.2.1 (H:=fun _ => (1:ℝ)) continuousOn_const + obtain ⟨B,hB,hb⟩ := uniform_datum_velocity_integral_curvature + hd.1 hd.2.1 (((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn) + refine ⟨A+B,add_nonneg hA hB,?_,?_⟩ + · have hh := (ha (basis 0) (by simp [basis,PiLp.norm_single])).mono (le_add_of_nonneg_right hB) + change CurvatureBound (fun x => ∫ v : Vec, d.f₀ (x,v)) (A+B) + simpa only [smul_eq_mul,mul_one] using hh + · exact (hb (basis 0) (by simp [basis,PiLp.norm_single])).mono (le_add_of_nonneg_left hA) + +lemma datum_sphere_flux_curvature {f : Phase → ℝ} {H : Vec × Vec → Vec} + (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc (0:ℝ) 1, + CurvatureBound (fun x => (4*Real.pi)⁻¹*(∫ n : Sphere, + t*dot n.1 (∫ v, f (x+t • n.1,v) • H (-n.1,v)) ∂sphereMeasure)) C := by + obtain ⟨C,hC,hb⟩ := uniform_datum_velocity_integral_curvature hf hc hH + refine ⟨C,hC,?_⟩ + intro t ht + have hn (n : Sphere) : ‖n.1‖=1 := mem_sphere_zero_iff_norm.mp n.2 + have hc' (z : Vec) : Continuous (fun n : Sphere => + t*dot n.1 (∫ v, f (z+t • n.1,v) • H (-n.1,v))) := by + have hI : Continuous (fun n : Sphere => ∫ v, f (z+t • n.1,v) • H (-n.1,v)) := by + apply (continuousOn_datum_velocity_integral hf.continuous hc hH).comp_continuous + ((continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)).prodMk continuous_subtype_val.neg) + intro n + exact ⟨mem_univ _,by simpa only [mem_sphere_zero_iff_norm,Pi.neg_apply,norm_neg] using hn n⟩ + exact continuous_const.mul ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_subtype_val.prodMk hI)) + apply sphere_average_curvature hc' + intro n + have hh := (((hb (-n.1) (by rw [norm_neg,hn n])).translate (t • n.1)).dot_const n.1).const_smul t + apply hh.mono + rw [hn n,one_mul,abs_of_nonneg ht.1] + exact mul_le_of_le_one_left hC ht.2 + +lemma weighted_sphere_mean_curvature {g : Vec → ℝ} (hg : Continuous g) + {C : ℝ} (hC : 0≤C) (h : CurvatureBound g C) + {w : Sphere → ℝ} (hw : Continuous w) (hwb : ∀ n, |w n|≤1) + {t : ℝ} (ht : t∈Icc (0:ℝ) 1) : + CurvatureBound (fun x => (4*Real.pi)⁻¹*(∫ n : Sphere, t*w n*g (x+t • n.1) ∂sphereMeasure)) C := by + have hc (z : Vec) : Continuous (fun n : Sphere => t*w n*g (z+t • n.1)) := + (continuous_const.mul hw).mul (hg.comp (continuous_const.add + ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))) + apply sphere_average_curvature hc + intro n + apply ((h.translate (t • n.1)).const_smul (t*w n)).mono + rw [abs_mul,abs_of_nonneg ht.1] + exact mul_le_of_le_one_left hC ((mul_le_mul_of_nonneg_left (hwb n) ht.1).trans (by simpa only [mul_one] using ht.2)) + +lemma electricConeBoundary_datum_curvature {d : Datum} (hd : Admissible d) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, + CurvatureBound (fun x => electricConeBoundary (datumBoundarySolution d) t x i 0) C := by + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_curvature hd.2.2.2.1 hd.2.2.2.2.1 i + obtain ⟨B,hB,hflux⟩ := datum_sphere_flux_curvature hd.1 hd.2.1 (continuousOn_datumElectricFluxKernel i) + obtain ⟨D,hD,hrc,hjc⟩ := datum_moment_curvature hd + obtain ⟨M,hM,hmom⟩ := datum_moment_lipschitz hd + have hm : Continuous (rho d.f₀) ∧ Continuous (current d.f₀) := by + constructor + · exact (LipschitzWith.of_dist_le' (K:=M) (fun x y => by + simpa only [dist_eq_norm,Real.norm_eq_abs] using (hmom y x).1)).continuous + · exact (LipschitzWith.of_dist_le' (K:=M) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj : Continuous (fun v : Vec => v i) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous + refine ⟨A+B+2*D,by positivity,?_⟩ + intro t ht + have hrho := weighted_sphere_mean_curvature hm.1 hD hrc + (hproj.comp continuous_subtype_val) (fun n => (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2)) + ⟨ht.1.le,ht.2⟩ + have hj := waveK_curvature (hproj.comp hm.2) hD (hjc.coordinate i) ⟨ht.1.le,ht.2⟩ + have hh := ((((hfree t ⟨ht.1.le,ht.2⟩).1).sub (hflux t ⟨ht.1.le,ht.2⟩)).sub hrho).sub hj + have he : A+B+D+D=A+B+2*D := by ring + rw [he] at hh + simp only [electricConeBoundary,sub_zero] + simp_rw [datum_initial_electric_flux_normalised d i ht.1] + simpa only [datumBoundarySolution,Function.comp_def] using hh + +lemma magneticConeBoundary_datum_curvature {d : Datum} (hd : Admissible d) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, + CurvatureBound (fun x => magneticConeBoundary (datumBoundarySolution d) t x i 0) C := by + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_curvature hd.2.2.2.1 hd.2.2.2.2.1 i + obtain ⟨B,hB,hflux⟩ := datum_sphere_flux_curvature hd.1 hd.2.1 (continuousOn_datumMagneticFluxKernel i) + obtain ⟨D,hD,hrc,hjc⟩ := datum_moment_curvature hd + obtain ⟨M,hM,hmom⟩ := datum_moment_lipschitz hd + have hm : Continuous (current d.f₀) := (LipschitzWith.of_dist_le' (K:=M) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj (j : Fin 3) : Continuous (fun v : Vec => v j) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous + refine ⟨A+B+2*D,by positivity,?_⟩ + intro t ht + let F : Fin 3 → Fin 3 → Vec → Sphere → ℝ := fun j k x n => t*n.1 j*current d.f₀ (x+t • n.1) k + have hfc (j k : Fin 3) (x : Vec) : Continuous (F j k x) := + (continuous_const.mul ((hproj j).comp continuous_subtype_val)).mul + (((hproj k).comp hm).comp (continuous_const.add + ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))) + have hc (j k : Fin 3) : CurvatureBound (fun x => (4*Real.pi)⁻¹*(∫ n : Sphere, F j k x n ∂sphereMeasure)) D := + weighted_sphere_mean_curvature ((hproj k).comp hm) hD (hjc.coordinate k) + ((hproj j).comp continuous_subtype_val) (fun n => (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2)) + ⟨ht.1.le,ht.2⟩ + have hj := (hc (curlA i) (curlB i)).sub (hc (curlB i) (curlA i)) + have hje : (fun x => (4*Real.pi)⁻¹*(∫ n : Sphere, F (curlA i) (curlB i) x n ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n : Sphere, F (curlB i) (curlA i) x n ∂sphereMeasure))= + (fun x => (4*Real.pi)⁻¹*(∫ n : Sphere, + F (curlA i) (curlB i) x n-F (curlB i) (curlA i) x n ∂sphereMeasure)) := by + funext x + rw [integral_sub ((hfc _ _ x).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + ((hfc _ _ x).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)),mul_sub] + rw [hje] at hj + have hh := (((hfree t ⟨ht.1.le,ht.2⟩).2).sub (hflux t ⟨ht.1.le,ht.2⟩)).add hj + rw [show (A+B)+(D+D)=A+B+2*D by ring] at hh + simp only [magneticConeBoundary,sub_zero] + simp_rw [datum_initial_magnetic_flux_normalised d i ht.1] + simpa only [datumBoundarySolution,F,Function.comp_def] using hh + +lemma datum_boundary_global_curvature {d : Datum} (hd : Admissible d) : + ∃ C : ℝ, 0≤C ∧ CurvatureBound d.E₀ C ∧ CurvatureBound d.B₀ C ∧ + ∀ t∈Ioc (0:ℝ) 1, + CurvatureBound (fun x => electricBoundaryField (datumBoundarySolution d) t x) C ∧ + CurvatureBound (fun x => magneticBoundaryField (datumBoundarySolution d) t x) C := by + obtain ⟨E,hE,hEc,_⟩ := hd.2.2.2.1.spatial_curvature + obtain ⟨B,hB,hBc,_⟩ := hd.2.2.2.2.1.spatial_curvature + choose CE hCE he using electricConeBoundary_datum_curvature hd + choose CB hCB hb using magneticConeBoundary_datum_curvature hd + let S := E+B+∑ i : Fin 3, (CE i+CB i) + have hS : 0≤S := by dsimp [S]; exact add_nonneg (add_nonneg hE hB) (Finset.sum_nonneg fun i _ => add_nonneg (hCE i) (hCB i)) + have hsum : 0≤∑ i : Fin 3, (CE i+CB i) := Finset.sum_nonneg fun i _ => add_nonneg (hCE i) (hCB i) + have hEC (i : Fin 3) : CE i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCB i] + have hBC (i : Fin 3) : CB i≤S := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [S]; linarith [hCE i] + refine ⟨3*S,by positivity,hEc.mono (by dsimp [S]; linarith),hBc.mono (by dsimp [S]; linarith),?_⟩ + intro t ht + constructor + · intro x v + have hh := norm_le_three_of_coordinate_bound (mul_nonneg hS (sq_nonneg ‖v‖)) + (v:=electricBoundaryField (datumBoundarySolution d) t (x+v)+ + electricBoundaryField (datumBoundarySolution d) t (x-v)- + (2:ℝ) • electricBoundaryField (datumBoundarySolution d) t x) + (fun i => (he i t ht x v).trans (mul_le_mul_of_nonneg_right (hEC i) (sq_nonneg _))) + exact hh.trans_eq (by ring) + · intro x v + have hh := norm_le_three_of_coordinate_bound (mul_nonneg hS (sq_nonneg ‖v‖)) + (v:=magneticBoundaryField (datumBoundarySolution d) t (x+v)+ + magneticBoundaryField (datumBoundarySolution d) t (x-v)- + (2:ℝ) • magneticBoundaryField (datumBoundarySolution d) t x) + (fun i => (hb i t ht x v).trans (mul_le_mul_of_nonneg_right (hBC i) (sq_nonneg _))) + exact hh.trans_eq (by ring) + +end + +section + +open Set Filter MeasureTheory +open scoped Topology + +lemma variable_integral_gronwall_bound {f b : ℝ → ℝ} (hf : Continuous f) + (hb : Continuous b) {a T : ℝ} (hb0 : ∀ t∈Icc (0:ℝ) T,0≤b t) + (hbound : ∀ t∈Icc (0:ℝ) T,f t≤a+∫ r in 0..t,b r*f r) : + ∀ t∈Icc (0:ℝ) T,f t≤a*Real.exp (∫ r in 0..t,b r) := by + let G : ℝ → ℝ := fun t => a+∫ r in 0..t,b r*f r + let B : ℝ → ℝ := fun t => ∫ r in 0..t,b r + have hG : Continuous G := continuous_const.add + (intervalIntegral.continuous_primitive (hb.mul hf).intervalIntegrable 0) + have hB : Continuous B := intervalIntegral.continuous_primitive hb.intervalIntegrable 0 + have hdG (t : ℝ) : HasDerivAt G (b t*f t) t := by + exact (intervalIntegral.integral_hasDerivAt_right ((hb.mul hf).intervalIntegrable 0 t) + (hb.mul hf).stronglyMeasurable.stronglyMeasurableAtFilter (hb.mul hf).continuousAt).const_add a + have hdB (t : ℝ) : HasDerivAt B (b t) t := + intervalIntegral.integral_hasDerivAt_right (hb.intervalIntegrable 0 t) + hb.stronglyMeasurable.stronglyMeasurableAtFilter hb.continuousAt + let H : ℝ → ℝ := fun t => Real.exp (-B t)*G t + have hdH (t : ℝ) : HasDerivAt H + (Real.exp (-B t)*(b t*f t-b t*G t)) t := by + have hd := ((hdB t).neg.exp.mul (hdG t)) + change HasDerivAt H ((Real.exp (-B t))*(-b t)*G t+Real.exp (-B t)*(b t*f t)) t at hd + convert hd using 1 + ring + have hmono : AntitoneOn H (Icc (0:ℝ) T) := by + apply antitoneOn_of_deriv_nonpos (convex_Icc _ _) + (((Real.continuous_exp.comp hB.neg).mul hG).continuousOn) (fun t ht => (hdH t).differentiableAt.differentiableWithinAt) + intro t ht + change deriv H t ≤ 0 + rw [(hdH t).deriv] + have ht' : t∈Icc (0:ℝ) T := interior_subset ht + apply mul_nonpos_of_nonneg_of_nonpos (Real.exp_pos _).le + exact sub_nonpos.mpr (mul_le_mul_of_nonneg_left (hbound t ht') (hb0 t ht')) + intro t ht + have hh := hmono (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,ht.1.trans ht.2⟩) ht ht.1 + have hh' : Real.exp (-B t)*G t≤a := by + simpa only [H,G,B,intervalIntegral.integral_same,add_zero,neg_zero,Real.exp_zero,one_mul] using hh + have hs := mul_le_mul_of_nonneg_left hh' (Real.exp_pos (B t)).le + have he : Real.exp (B t)*(Real.exp (-B t)*G t)=G t := by + rw [←mul_assoc,←Real.exp_add,add_neg_cancel,Real.exp_zero,one_mul] + rw [he] at hs + exact (hbound t ht).trans (by simpa only [G,B,mul_comm] using hs) + +lemma variable_integral_gronwall_bound_on {f b : ℝ → ℝ} {a T : ℝ} (hT : 0≤T) + (hf : ContinuousOn f (Icc (0:ℝ) T)) (hb : ContinuousOn b (Icc (0:ℝ) T)) + (hb0 : ∀ t∈Icc (0:ℝ) T,0≤b t) + (hbound : ∀ t∈Icc (0:ℝ) T,f t≤a+∫ r in 0..t,b r*f r) : + ∀ t∈Icc (0:ℝ) T,f t≤a*Real.exp (∫ r in 0..t,b r) := by + let p : ℝ → ℝ := fun r => max 0 (min T r) + have hp : ∀ r, p r∈Icc (0:ℝ) T := fun r => + ⟨le_max_left _ _,max_le hT (min_le_left _ _)⟩ + have he (r : ℝ) (hr : r∈Icc (0:ℝ) T) : p r=r := by + dsimp [p]; rw [min_eq_right hr.2,max_eq_right hr.1] + have hcp : Continuous p := by fun_prop + have hh := variable_integral_gronwall_bound + (hf.comp_continuous hcp hp) (hb.comp_continuous hcp hp) + (fun r hr => hb0 (p r) (hp r)) (a:=a) (T:=T) (fun r hr => by + simpa only [Function.comp_apply,he r hr] using (hbound r hr).trans_eq + (congrArg (a+·) (intervalIntegral.integral_congr (fun u hu => by + have hu' : u∈Icc (0:ℝ) T := ⟨(uIcc_of_le hr.1 ▸ hu).1,(uIcc_of_le hr.1 ▸ hu).2.trans hr.2⟩ + simp only [he u hu'])))) + intro t ht + have hi : (∫ r in 0..t,(b ∘ p) r)=∫ r in 0..t,b r := + intervalIntegral.integral_congr (fun r hr => by + have hr' : r∈Icc (0:ℝ) T := ⟨(uIcc_of_le ht.1 ▸ hr).1,(uIcc_of_le ht.1 ▸ hr).2.trans ht.2⟩ + simp only [Function.comp_apply,he r hr']) + have hout := hh t ht + rw [hi] at hout + simpa only [Function.comp_apply,he t ht] using hout + +universe u +variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +lemma norm_ode_volterra_bound {z dz : ℝ → E} {b : ℝ → ℝ} {T : ℝ} (hT : 0≤T) + (hz : ContinuousOn z (Icc (0:ℝ) T)) (hdz : ContinuousOn dz (Icc (0:ℝ) T)) + (hb : ContinuousOn b (Icc (0:ℝ) T)) (hb0 : ∀ r∈Icc (0:ℝ) T,0≤b r) + (hder : ∀ r∈Ioo (0:ℝ) T,HasDerivAt z (dz r) r) + (hbound : ∀ r∈Icc (0:ℝ) T,‖dz r‖≤b r*‖z r‖) : + ∀ t∈Icc (0:ℝ) T,‖z t‖≤‖z 0‖*Real.exp (∫ r in 0..t,b r) := by + apply variable_integral_gronwall_bound_on hT hz.norm hb hb0 + intro t ht + have hsub : Icc (0:ℝ) t ⊆ Icc (0:ℝ) T := fun r hr => ⟨hr.1,hr.2.trans ht.2⟩ + have hi : IntervalIntegrable dz volume 0 t := (hdz.mono hsub).intervalIntegrable_of_Icc ht.1 + have he : ∫ r in 0..t,dz r=z t-z 0 := + intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le ht.1 (hz.mono hsub) + (fun r hr => hder r ⟨hr.1,hr.2.trans_le ht.2⟩) hi + calc + ‖z t‖ = ‖z 0+∫ r in 0..t,dz r‖ := by rw [he]; congr 1; abel + _ ≤ ‖z 0‖+∫ r in 0..t,‖dz r‖ := + (norm_add_le _ _).trans (add_le_add le_rfl (intervalIntegral.norm_integral_le_integral_norm ht.1)) + _ ≤ ‖z 0‖+∫ r in 0..t,b r*‖z r‖ := by + apply add_le_add le_rfl + apply intervalIntegral.integral_mono_on ht.1 hi.norm + (((hb.mul hz.norm).mono hsub).intervalIntegrable_of_Icc ht.1) + exact fun r hr => hbound r (hsub hr) + +lemma backward_norm_ode_volterra_bound {z dz : ℝ → E} {b : ℝ → ℝ} {T : ℝ} (hT : 0≤T) + (hz : ContinuousOn z (Icc (0:ℝ) T)) (hdz : ContinuousOn dz (Icc (0:ℝ) T)) + (hb : ContinuousOn b (Icc (0:ℝ) T)) (hb0 : ∀ r∈Icc (0:ℝ) T,0≤b r) + (hder : ∀ r∈Ioo (0:ℝ) T,HasDerivAt z (dz r) r) + (hbound : ∀ r∈Icc (0:ℝ) T,‖dz r‖≤b r*‖z r‖) : + ‖z 0‖≤‖z T‖*Real.exp (∫ r in 0..T,b r) := by + have hm : MapsTo (fun r:ℝ => T-r) (Icc (0:ℝ) T) (Icc (0:ℝ) T) := + fun r hr => ⟨sub_nonneg.mpr hr.2,sub_le_self _ hr.1⟩ + have hc : Continuous (fun r:ℝ => T-r) := continuous_const.sub continuous_id + have he (r : ℝ) (hr : r∈Ioo (0:ℝ) T) : + HasDerivAt (fun u => z (T-u)) (-dz (T-r)) r := by + have hd := (hder (T-r) ⟨by linarith [hr.2],by linarith [hr.1]⟩).scomp r + ((hasDerivAt_id r).const_sub T) + simpa only [one_smul,neg_smul,Function.comp_def] using hd + have hh := norm_ode_volterra_bound hT (hz.comp hc.continuousOn hm) + (hdz.neg.comp hc.continuousOn hm) (hb.comp hc.continuousOn hm) + (fun r hr => hb0 (T-r) (hm hr)) he (fun r hr => by + simpa only [Function.comp_apply,Pi.neg_apply,norm_neg] using hbound (T-r) (hm hr)) T ⟨hT,le_rfl⟩ + simpa only [Function.comp_apply,sub_self, sub_zero, intervalIntegral.integral_comp_sub_left] using hh + +end + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +section + +lemma transport_on_characteristic_before {s : Solution} {X V : ℝ → Vec} {T U : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : EquationsBefore s U) + (hT : 0≤T) (hTU : T≤U) + (hXc : ContinuousOn X (Icc 0 T)) (hVc : ContinuousOn V (Icc 0 T)) + (hX : ∀ t∈Ioo 0 T,HasDerivAt X (velocity (V t)) t) + (hV : ∀ t∈Ioo 0 T,HasDerivAt V (s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))) t) : + s.f (T,X T,V T)=s.f (0,X 0,V 0) := by + rcases hT.eq_or_lt with h|h + · simp [←h] + have hc : ContinuousOn (fun t => s.f (t,X t,V t)) (Icc 0 T) := + hf.continuousOn.comp (continuousOn_id.prodMk (hXc.prodMk hVc)) (fun t ht => ht.1) + have hd : ∀ t∈Ioo 0 T,HasDerivAt (fun r => s.f (r,X r,V r)) (0:ℝ) t := by + intro t ht + have hder := hasDerivAt_particle_along_curve + (particle_differentiableAt_positive hf ht.1 (X t) (V t)) (hX t ht) (hV t ht) + have hpde := (heq t ht.1.le (ht.2.trans_le hTU)).1 (X t) (V t) + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hpde + exact hpde ▸ hder + obtain ⟨r,hr,he⟩ := exists_hasDerivAt_eq_slope (fun r => s.f (r,X r,V r)) (fun _ => 0) h hc hd + exact sub_eq_zero.mp ((div_eq_zero_iff.mp he.symm).resolve_right (sub_ne_zero.mpr (ne_of_gt h))) + +lemma continuousOn_lorentz_along {E B : Field} {α : ℝ → Phase} {T : ℝ} + (hE : ContDiffOn ℝ 1 E fieldHalfSpace) (hB : ContDiffOn ℝ 1 B fieldHalfSpace) + (hα : ContinuousOn α (Icc (0:ℝ) T)) : + ContinuousOn (fun r => lorentzField E B (r,α r)) (Icc (0:ℝ) T) := by + have hx : ContinuousOn (fun r => (r,(α r).1)) (Icc (0:ℝ) T) := continuousOn_id.prodMk hα.fst + have hm : MapsTo (fun r => (r,(α r).1)) (Icc (0:ℝ) T) fieldHalfSpace := fun r hr => hr.1 + have hu : ContinuousOn (fun r => velocity (α r).2) (Icc (0:ℝ) T) := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn hα.snd + exact hu.prodMk ((hE.continuousOn.comp hx hm).add + ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk (hB.continuousOn.comp hx hm)))) + +lemma characteristic_separation_volterra {E B : Field} {α γ : ℝ → Phase} {T L : ℝ} + {g : ℝ → ℝ} (hT : 0≤T) (hL : 0≤L) + (hE : ContDiffOn ℝ 1 E fieldHalfSpace) (hB : ContDiffOn ℝ 1 B fieldHalfSpace) + (hα : ContinuousOn α (Icc (0:ℝ) T)) (hγ : ContinuousOn γ (Icc (0:ℝ) T)) + (hdα : ∀ r∈Ioo (0:ℝ) T,HasDerivAt α (lorentzField E B (r,α r)) r) + (hdγ : ∀ r∈Ioo (0:ℝ) T,HasDerivAt γ (lorentzField E B (r,γ r)) r) + (hg : ContinuousOn g (Icc (0:ℝ) T)) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖E (r,y)-E (r,x)‖≤g r*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖B (r,y)-B (r,x)‖≤g r*‖y-x‖) : + ‖α 0-γ 0‖≤‖α T-γ T‖*Real.exp (∫ r in 0..T,1+2*g r+L) := by + apply backward_norm_ode_volterra_bound hT (hα.sub hγ) + ((continuousOn_lorentz_along hE hB hα).sub (continuousOn_lorentz_along hE hB hγ)) + ((continuousOn_const.add (continuousOn_const.mul hg)).add continuousOn_const) + (fun r hr => by change 0≤1+2*g r+L; linarith [hg0 r hr]) (fun r hr => (hdα r hr).sub (hdγ r hr)) + intro r hr + change ‖lorentzField E B (r,α r)-lorentzField E B (r,γ r)‖≤(1+2*g r+L)*‖α r-γ r‖ + simpa only [mul_zero,add_zero] using lorentzField_difference_bound hL (hg0 r hr) + (D:=0) le_rfl (hBb r hr) (hEx r hr) (hBx r hr) (by intros; simp) (by intros; simp) (α r) (γ r) + +lemma particle_lipschitz_volterra_before {d : Datum} {s : Solution} {T U A L : ℝ} + {g : ℝ → ℝ} (hs : ClassicalBefore d s U) (hT : 0≤T) (hTU : T≤U) + (hA : 0≤A) (hL : 0≤L) + (h₀ : ∀ z w,|d.f₀ z-d.f₀ w|≤A*‖z-w‖) + (hg : ContinuousOn g (Icc (0:ℝ) T)) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖s.B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.E (r,y)-s.E (r,x)‖≤g r*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.B (r,y)-s.B (r,x)‖≤g r*‖y-x‖) + (z w : Phase) : + |s.f (T,z)-s.f (T,w)|≤(A*Real.exp (∫ r in 0..T,1+2*g r+L))*‖z-w‖ := by + obtain ⟨X,V,hXT,hVT,hX,hV,_⟩ := exists_characteristic_on_slab hT ⟨hT,le_rfl⟩ hs.2.1 hs.2.2.1 z.1 z.2 + obtain ⟨Y,W,hYT,hWT,hY,hW,_⟩ := exists_characteristic_on_slab hT ⟨hT,le_rfl⟩ hs.2.1 hs.2.2.1 w.1 w.2 + have hXc : ContinuousOn X (Icc 0 T) := fun r hr => (hX r hr).continuousWithinAt + have hVc : ContinuousOn V (Icc 0 T) := fun r hr => (hV r hr).continuousWithinAt + have hYc : ContinuousOn Y (Icc 0 T) := fun r hr => (hY r hr).continuousWithinAt + have hWc : ContinuousOn W (Icc 0 T) := fun r hr => (hW r hr).continuousWithinAt + have hdX := fun r hr => (hX r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hdV := fun r hr => (hV r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hdY := fun r hr => (hY r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hdW := fun r hr => (hW r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hf := transport_on_characteristic_before hs.1 hs.2.2.2.2.2.2.2.1 hT hTU hXc hVc hdX hdV + have hf' := transport_on_characteristic_before hs.1 hs.2.2.2.2.2.2.2.1 hT hTU hYc hWc hdY hdW + rw [hXT,hVT,hs.2.2.2.2.2.2.2.2.1] at hf + rw [hYT,hWT,hs.2.2.2.2.2.2.2.2.1] at hf' + have hsep := characteristic_separation_volterra hT hL hs.2.1 hs.2.2.1 (hXc.prodMk hVc) (hYc.prodMk hWc) + (fun r hr => (hdX r hr).prodMk (hdV r hr)) (fun r hr => (hdY r hr).prodMk (hdW r hr)) hg hg0 hBb hEx hBx + simp only [hXT,hVT,hYT,hWT,Prod.mk.eta] at hsep + change |s.f (T,z.1,z.2)-s.f (T,w.1,w.2)|≤_ + rw [hf,hf'] + exact (h₀ (X 0,V 0) (Y 0,W 0)).trans ((mul_le_mul_of_nonneg_left hsep hA).trans_eq (by ring)) + +lemma admissible_particle_lipschitz {d : Datum} (hd : Admissible d) : + ∃ A : ℝ, 0≤A ∧ ∀ z w, |d.f₀ z-d.f₀ w|≤A*‖z-w‖ := by + obtain ⟨A,hA⟩ := (hd.1.continuous_fderiv (by simp)).bounded_above_of_compact_support + (hd.2.1.fderiv ℝ) + refine ⟨max A 0,le_max_right _ _,?_⟩ + intro z w + have hh := (convex_univ : Convex ℝ (univ : Set Phase)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hd.1.differentiable (by simp) z) (C:=max A 0) + (fun z _ => (hA z).trans (le_max_left A 0)) (mem_univ w) (mem_univ z) + simpa only [Real.norm_eq_abs] using hh + +lemma particle_gradient_volterra_before {d : Datum} {s : Solution} {T U A L : ℝ} + {g : ℝ → ℝ} (hs : ClassicalBefore d s U) (hT : 0≤T) (hTU : T≤U) + (hA : 0≤A) (hL : 0≤L) + (h₀ : ∀ z w,|d.f₀ z-d.f₀ w|≤A*‖z-w‖) + (hg : ContinuousOn g (Icc (0:ℝ) T)) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖s.B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.E (r,y)-s.E (r,x)‖≤g r*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.B (r,y)-s.B (r,x)‖≤g r*‖y-x‖) : + ∀ t∈Icc (0:ℝ) T,∀ y v, + ‖fderiv ℝ (fun z => s.f (t,z,v)) y‖≤A*Real.exp (∫ r in 0..T,1+2*g r+L) := by + intro t ht y v + have hsub : Icc (0:ℝ) t ⊆ Icc (0:ℝ) T := fun r hr => ⟨hr.1,hr.2.trans ht.2⟩ + have hβ : ContinuousOn (fun r => 1+2*g r+L) (Icc (0:ℝ) T) := by fun_prop + have hI : (∫ r in 0..t,1+2*g r+L)≤∫ r in 0..T,1+2*g r+L := by + apply intervalIntegral.integral_mono_interval (μ:=volume) le_rfl ht.1 ht.2 _ (hβ.intervalIntegrable_of_Icc hT) + filter_upwards [ae_restrict_mem measurableSet_Ioc] with r hr + change 0≤1+2*g r+L + linarith [hg0 r ⟨hr.1.le,hr.2⟩] + let N := A*Real.exp (∫ r in 0..T,1+2*g r+L) + have hN : 0≤N := mul_nonneg hA (Real.exp_pos _).le + have hLip : LipschitzWith ⟨N,hN⟩ (fun z => s.f (t,z,v)) := by + apply LipschitzWith.of_dist_le_mul + intro a b + have hh := particle_lipschitz_volterra_before hs ht.1 (ht.2.trans hTU) hA hL h₀ + (hg.mono hsub) (fun r hr => hg0 r (hsub hr)) + (fun r hr => hBb r (hsub hr)) (fun r hr => hEx r (hsub hr)) (fun r hr => hBx r (hsub hr)) (a,v) (b,v) + have hnorm : ‖(a,v)-(b,v)‖=‖a-b‖ := by simp [Prod.norm_def] + rw [hnorm] at hh + change ‖s.f (t,a,v)-s.f (t,b,v)‖≤N*‖a-b‖ + exact hh.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hI) hA) (norm_nonneg _)) + exact norm_fderiv_le_of_lipschitz ℝ hLip + +universe u +variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +lemma norm_ode_inhomogeneous_bound {z dz : ℝ → E} {c : ℝ → ℝ} {T K : ℝ} + (hT : 0≤T) (hK : 0≤K) + (hz : ContinuousOn z (Icc (0:ℝ) T)) (hdz : ContinuousOn dz (Icc (0:ℝ) T)) + (hc : ContinuousOn c (Icc (0:ℝ) T)) (hc0 : ∀ r∈Icc (0:ℝ) T,0≤c r) + (hder : ∀ r∈Ioo (0:ℝ) T,HasDerivAt z (dz r) r) + (hbound : ∀ r∈Icc (0:ℝ) T,‖dz r‖≤K*‖z r‖+c r) : + ∀ t∈Icc (0:ℝ) T,‖z t‖≤(‖z 0‖+∫ r in 0..T,c r)*Real.exp (K*t) := by + have hb : ∀ t∈Icc (0:ℝ) T,‖z t‖≤(‖z 0‖+∫ r in 0..T,c r)+∫ r in 0..t,K*‖z r‖ := by + intro t ht + have hsub : Icc (0:ℝ) t ⊆ Icc (0:ℝ) T := fun r hr => ⟨hr.1,hr.2.trans ht.2⟩ + have hi : IntervalIntegrable dz volume 0 t := (hdz.mono hsub).intervalIntegrable_of_Icc ht.1 + have he : ∫ r in 0..t,dz r=z t-z 0 := + intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le ht.1 (hz.mono hsub) + (fun r hr => hder r ⟨hr.1,hr.2.trans_le ht.2⟩) hi + have hci : IntervalIntegrable c volume 0 t := (hc.mono hsub).intervalIntegrable_of_Icc ht.1 + have hki : IntervalIntegrable (fun r => K*‖z r‖) volume 0 t := ((continuousOn_const.mul hz.norm).mono hsub).intervalIntegrable_of_Icc ht.1 + have hcle : (∫ r in 0..t,c r)≤∫ r in 0..T,c r := by + apply intervalIntegral.integral_mono_interval (μ:=volume) le_rfl ht.1 ht.2 _ + (hc.intervalIntegrable_of_Icc hT) + filter_upwards [ae_restrict_mem measurableSet_Ioc] with r hr + exact hc0 r ⟨hr.1.le,hr.2⟩ + calc + ‖z t‖ = ‖z 0+∫ r in 0..t,dz r‖ := by rw [he]; congr 1; abel + _ ≤ ‖z 0‖+∫ r in 0..t,‖dz r‖ := + (norm_add_le _ _).trans (add_le_add le_rfl (intervalIntegral.norm_integral_le_integral_norm ht.1)) + _ ≤ ‖z 0‖+∫ r in 0..t,K*‖z r‖+c r := by + apply add_le_add le_rfl + exact intervalIntegral.integral_mono_on ht.1 hi.norm (hki.add hci) (fun r hr => hbound r (hsub hr)) + _ ≤ _ := by rw [intervalIntegral.integral_add hki hci]; linarith + have hh := variable_integral_gronwall_bound_on hT hz.norm continuousOn_const (fun _ _ => hK) hb + intro t ht + simpa only [intervalIntegral.integral_const,sub_zero,smul_eq_mul,mul_comm t K] using hh t ht + +lemma backward_norm_ode_uniform_bound {z dz : ℝ → E} {T K : ℝ} + (hT : 0≤T) (hK : 0≤K) + (hz : ContinuousOn z (Icc (0:ℝ) T)) (hdz : ContinuousOn dz (Icc (0:ℝ) T)) + (hder : ∀ r∈Ioo (0:ℝ) T,HasDerivAt z (dz r) r) + (hbound : ∀ r∈Icc (0:ℝ) T,‖dz r‖≤K*‖z r‖) : + ∀ t∈Icc (0:ℝ) T,‖z t‖≤‖z T‖*Real.exp (K*T) := by + have hm : MapsTo (fun r:ℝ => T-r) (Icc (0:ℝ) T) (Icc (0:ℝ) T) := + fun r hr => ⟨sub_nonneg.mpr hr.2,sub_le_self _ hr.1⟩ + have hc : Continuous (fun r:ℝ => T-r) := continuous_const.sub continuous_id + have he (r : ℝ) (hr : r∈Ioo (0:ℝ) T) : + HasDerivAt (fun u => z (T-u)) (-dz (T-r)) r := by + have hd := (hder (T-r) ⟨by linarith [hr.2],by linarith [hr.1]⟩).scomp r + ((hasDerivAt_id r).const_sub T) + simpa only [one_smul,neg_smul,Function.comp_def] using hd + have hh := norm_ode_volterra_bound hT (hz.comp hc.continuousOn hm) + (hdz.neg.comp hc.continuousOn hm) continuousOn_const (fun _ _ => hK) he (fun r hr => by + simpa only [Function.comp_apply,Pi.neg_apply,norm_neg] using hbound (T-r) (hm hr)) + intro t ht + have h := hh (T-t) (hm ht) + simp only [Function.comp_apply,sub_zero,sub_sub_cancel,intervalIntegral.integral_const,smul_eq_mul] at h + exact h.trans (mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by nlinarith [ht.1])) (norm_nonneg _)) + +lemma backward_norm_ode_inhomogeneous_bound {z dz : ℝ → E} {c : ℝ → ℝ} {T K : ℝ} + (hT : 0≤T) (hK : 0≤K) + (hz : ContinuousOn z (Icc (0:ℝ) T)) (hdz : ContinuousOn dz (Icc (0:ℝ) T)) + (hc : ContinuousOn c (Icc (0:ℝ) T)) (hc0 : ∀ r∈Icc (0:ℝ) T,0≤c r) + (hder : ∀ r∈Ioo (0:ℝ) T,HasDerivAt z (dz r) r) + (hbound : ∀ r∈Icc (0:ℝ) T,‖dz r‖≤K*‖z r‖+c r) : + ‖z 0‖≤(‖z T‖+∫ r in 0..T,c r)*Real.exp (K*T) := by + have hm : MapsTo (fun r:ℝ => T-r) (Icc (0:ℝ) T) (Icc (0:ℝ) T) := + fun r hr => ⟨sub_nonneg.mpr hr.2,sub_le_self _ hr.1⟩ + have hc' : Continuous (fun r:ℝ => T-r) := continuous_const.sub continuous_id + have he (r : ℝ) (hr : r∈Ioo (0:ℝ) T) : + HasDerivAt (fun u => z (T-u)) (-dz (T-r)) r := by + have hd := (hder (T-r) ⟨by linarith [hr.2],by linarith [hr.1]⟩).scomp r + ((hasDerivAt_id r).const_sub T) + simpa only [one_smul,neg_smul,Function.comp_def] using hd + have hh := norm_ode_inhomogeneous_bound hT hK (hz.comp hc'.continuousOn hm) + (hdz.neg.comp hc'.continuousOn hm) (hc.comp hc'.continuousOn hm) + (fun r hr => hc0 (T-r) (hm hr)) he (fun r hr => by + simpa only [Function.comp_apply,Pi.neg_apply,norm_neg] using hbound (T-r) (hm hr)) T ⟨hT,le_rfl⟩ + simpa only [Function.comp_apply,sub_self,sub_zero,intervalIntegral.integral_comp_sub_left] using hh + +end + +lemma exists_phase_characteristic_before {d : Datum} {s : Solution} {T U : ℝ} + (hs : ClassicalBefore d s U) (hT : 0≤T) (hTU : T≤U) (z : Phase) : + ∃ α : ℝ → Phase, α T=z ∧ ContinuousOn α (Icc (0:ℝ) T) ∧ + (∀ r∈Ioo (0:ℝ) T,HasDerivAt α (lorentzField s.E s.B (r,α r)) r) ∧ + s.f (T,z)=d.f₀ (α 0) := by + obtain ⟨X,V,hXT,hVT,hX,hV,_⟩ := exists_characteristic_on_slab hT ⟨hT,le_rfl⟩ hs.2.1 hs.2.2.1 z.1 z.2 + have hXc : ContinuousOn X (Icc 0 T) := fun r hr => (hX r hr).continuousWithinAt + have hVc : ContinuousOn V (Icc 0 T) := fun r hr => (hV r hr).continuousWithinAt + have hdX := fun r hr => (hX r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hdV := fun r hr => (hV r (Ioo_subset_Icc_self hr)).hasDerivAt (Icc_mem_nhds hr.1 hr.2) + have hf := transport_on_characteristic_before hs.1 hs.2.2.2.2.2.2.2.1 hT hTU hXc hVc hdX hdV + rw [hXT,hVT,hs.2.2.2.2.2.2.2.2.1] at hf + exact ⟨fun r => (X r,V r),by simp [hXT,hVT],hXc.prodMk hVc, + fun r hr => (hdX r hr).prodMk (hdV r hr),hf⟩ + +lemma characteristic_separation_uniform {E B : Field} {α γ : ℝ → Phase} {T L N : ℝ} + (hT : 0≤T) (hL : 0≤L) (hN : 0≤N) + (hE : ContDiffOn ℝ 1 E fieldHalfSpace) (hB : ContDiffOn ℝ 1 B fieldHalfSpace) + (hα : ContinuousOn α (Icc (0:ℝ) T)) (hγ : ContinuousOn γ (Icc (0:ℝ) T)) + (hdα : ∀ r∈Ioo (0:ℝ) T,HasDerivAt α (lorentzField E B (r,α r)) r) + (hdγ : ∀ r∈Ioo (0:ℝ) T,HasDerivAt γ (lorentzField E B (r,γ r)) r) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖E (r,y)-E (r,x)‖≤N*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖B (r,y)-B (r,x)‖≤N*‖y-x‖) : + ∀ r∈Icc (0:ℝ) T,‖α r-γ r‖≤‖α T-γ T‖*Real.exp ((1+2*N+L)*T) := by + apply backward_norm_ode_uniform_bound hT (by positivity : 0≤1+2*N+L) (hα.sub hγ) + ((continuousOn_lorentz_along hE hB hα).sub (continuousOn_lorentz_along hE hB hγ)) + (fun r hr => (hdα r hr).sub (hdγ r hr)) + intro r hr + exact (lorentzField_difference_bound hL hN (D:=0) le_rfl (hBb r hr) (hEx r hr) (hBx r hr) + (by intros; simp) (by intros; simp) (α r) (γ r)).trans_eq (by simp) + +lemma characteristic_curvature_volterra {E B : Field} {α β γ : ℝ → Phase} + {T L N : ℝ} {g : ℝ → ℝ} {z v : Phase} + (hT : 0≤T) (hL : 0≤L) (hN : 0≤N) + (hE : ContDiffOn ℝ 1 E fieldHalfSpace) (hB : ContDiffOn ℝ 1 B fieldHalfSpace) + (hα : ContinuousOn α (Icc (0:ℝ) T)) (hβ : ContinuousOn β (Icc (0:ℝ) T)) + (hγ : ContinuousOn γ (Icc (0:ℝ) T)) + (hdα : ∀ r∈Ioo (0:ℝ) T,HasDerivAt α (lorentzField E B (r,α r)) r) + (hdβ : ∀ r∈Ioo (0:ℝ) T,HasDerivAt β (lorentzField E B (r,β r)) r) + (hdγ : ∀ r∈Ioo (0:ℝ) T,HasDerivAt γ (lorentzField E B (r,γ r)) r) + (hαT : α T=z+v) (hβT : β T=z-v) (hγT : γ T=z) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖E (r,y)-E (r,x)‖≤N*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖B (r,y)-B (r,x)‖≤N*‖y-x‖) + (hg : ContinuousOn g (Icc (0:ℝ) T)) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) + (hEc : ∀ r∈Icc (0:ℝ) T,CurvatureBound (fun x => E (r,x)) (g r)) + (hBc : ∀ r∈Icc (0:ℝ) T,CurvatureBound (fun x => B (r,x)) (g r)) : + ‖α 0+β 0-(2:ℝ) • γ 0‖≤ + (4*(Real.exp ((1+2*N+L)*T))^3*(∫ r in 0..T,6+6*L+2*g r+2*N))*‖v‖^2 := by + let K := 1+2*N+L + let Q := Real.exp (K*T) + let C := fun r => 6+6*L+2*g r+2*N + let δ := fun r => α r+β r-(2:ℝ) • γ r + let dδ := fun r => lorentzField E B (r,α r)+lorentzField E B (r,β r)- + (2:ℝ) • lorentzField E B (r,γ r) + have hK : 0≤K := by dsimp [K]; positivity + have hQ : 0 ((hdα r hr).add (hdβ r hr)).sub ((hdγ r hr).const_smul (2:ℝ)) + have hsep := characteristic_separation_uniform hT hL hN hE hB hα hβ hdα hdβ hBb hEx hBx + have hdT : δ T=0 := by dsimp [δ]; rw [hαT,hβT,hγT]; module + have hb : ∀ r∈Icc (0:ℝ) T,‖dδ r‖≤K*‖δ r‖+(4*Q^2*‖v‖^2)*C r := by + intro r hr + have hf := lorentzField_curvature hL hN (hg0 r hr) (hBb r hr) (hBx r hr) (hEc r hr) (hBc r hr) + have hfl (a b : Phase) : ‖lorentzField E B (r,b)-lorentzField E B (r,a)‖≤K*‖b-a‖ := by + simpa only [mul_zero,add_zero] using lorentzField_difference_bound hL hN (D:=0) le_rfl + (hBb r hr) (hEx r hr) (hBx r hr) (by intros; simp) (by intros; simp) b a + have htr := hf.triple (hC r hr) hK hfl (α r) (β r) (γ r) + have hs := hsep r hr + rw [hαT,hβT,show z+v-(z-v)=(2:ℝ) • v by module,norm_smul,Real.norm_eq_abs] at hs + norm_num at hs + have hsq := (sq_le_sq₀ (norm_nonneg _) (by positivity : 0≤2*‖v‖*Q)).mpr hs + have hh := mul_le_mul_of_nonneg_left hsq (hC r hr) + change ‖_‖≤K*‖α r+β r-(2:ℝ) • γ r‖+_ + nlinarith [htr,hh] + have hc : ContinuousOn (fun r => (4*Q^2*‖v‖^2)*C r) (Icc (0:ℝ) T) := by dsimp [C]; fun_prop + have hh := backward_norm_ode_inhomogeneous_bound hT hK hdc hddc hc + (fun r hr => mul_nonneg (by positivity) (hC r hr)) hder hb + rw [hdT,norm_zero,zero_add,intervalIntegral.integral_const_mul] at hh + exact hh.trans_eq (by dsimp [δ,Q,K,C]; ring) + +lemma particle_curvature_volterra_before {d : Datum} {s : Solution} {T U A D L N : ℝ} + {g : ℝ → ℝ} (hs : ClassicalBefore d s U) (hT : 0≤T) (hTU : T≤U) + (hA : 0≤A) (hD : 0≤D) (hL : 0≤L) (hN : 0≤N) + (h₀ : ∀ z w,|d.f₀ z-d.f₀ w|≤A*‖z-w‖) (hc₀ : CurvatureBound d.f₀ D) + (hg : ContinuousOn g (Icc (0:ℝ) T)) (hg0 : ∀ r∈Icc (0:ℝ) T,0≤g r) + (hBb : ∀ r∈Icc (0:ℝ) T,∀ x,‖s.B (r,x)‖≤L) + (hEx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.E (r,y)-s.E (r,x)‖≤N*‖y-x‖) + (hBx : ∀ r∈Icc (0:ℝ) T,∀ x y,‖s.B (r,y)-s.B (r,x)‖≤N*‖y-x‖) + (hEc : ∀ r∈Icc (0:ℝ) T,CurvatureBound (fun x => s.E (r,x)) (g r)) + (hBc : ∀ r∈Icc (0:ℝ) T,CurvatureBound (fun x => s.B (r,x)) (g r)) : + CurvatureBound (fun z => s.f (T,z)) + (4*D*(Real.exp ((1+2*N+L)*T))^2+ + A*4*(Real.exp ((1+2*N+L)*T))^3*(∫ r in 0..T,6+6*L+2*g r+2*N)) := by + intro z v + obtain ⟨α,hαT,hα,hdα,hfα⟩ := exists_phase_characteristic_before hs hT hTU (z+v) + obtain ⟨β,hβT,hβ,hdβ,hfβ⟩ := exists_phase_characteristic_before hs hT hTU (z-v) + obtain ⟨γ,hγT,hγ,hdγ,hfγ⟩ := exists_phase_characteristic_before hs hT hTU z + have hfL (a b : Phase) : ‖d.f₀ b-d.f₀ a‖≤A*‖b-a‖ := h₀ b a + have ht := hc₀.triple hD hA hfL (α 0) (β 0) (γ 0) + have hc := characteristic_curvature_volterra hT hL hN hs.2.1 hs.2.2.1 hα hβ hγ + hdα hdβ hdγ hαT hβT hγT hBb hEx hBx hg hg0 hEc hBc + have hsep := characteristic_separation_uniform hT hL hN hs.2.1 hs.2.2.1 hα hβ + hdα hdβ hBb hEx hBx 0 ⟨le_rfl,hT⟩ + rw [hαT,hβT,show z+v-(z-v)=(2:ℝ) • v by module,norm_smul,Real.norm_eq_abs] at hsep + norm_num at hsep + have hp := (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr hsep + have hd := mul_le_mul_of_nonneg_left hp hD + have ha := mul_le_mul_of_nonneg_left hc hA + simp only [hfα,hfβ,hfγ] + nlinarith [ht,hd,ha] + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +lemma CurvatureBound.fderiv_lipschitz {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hc : CurvatureBound f H) (hH : 0≤H) + (hf : Differentiable ℝ f) : + ∀ x y, ‖fderiv ℝ f y-fderiv ℝ f x‖≤6*H*‖y-x‖ := by + have htaylor (basePoint increment : U) : + ‖f (basePoint+increment)-f basePoint-fderiv ℝ f basePoint increment‖≤H*‖increment‖^2 := by + let dyadicSequence : ℕ → W := fun index => + (2:ℝ)^index • (f (basePoint+(1/2:ℝ)^index • increment)-f basePoint) + have hderivative : HasDerivAt (fun time : ℝ => f (basePoint+time • increment)) + (fderiv ℝ f basePoint increment) 0 := by + have hcomposition := (hf (basePoint+(0:ℝ) • increment)).hasFDerivAt.comp_hasDerivAt (0:ℝ) + ((hasDerivAt_const (0:ℝ) basePoint).add ((hasDerivAt_id (0:ℝ)).smul_const increment)) + simpa only [zero_smul,add_zero,one_smul,zero_add,Function.comp_def,Pi.add_apply,id_eq] using hcomposition + have hpowers : Tendsto (fun index : ℕ => (1/2:ℝ)^index) atTop (𝓝[>] (0:ℝ)) := by + apply tendsto_nhdsWithin_iff.mpr + exact ⟨tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num), + Eventually.of_forall (fun index => by simp only [mem_Ioi]; positivity)⟩ + have hlimit : Tendsto dyadicSequence atTop (𝓝 (fderiv ℝ f basePoint increment)) := by + simpa [Function.comp_def,dyadicSequence,← inv_pow] using hderivative.tendsto_slope_zero_right.comp hpowers + have hstep (index : ℕ) : dist (dyadicSequence index) (dyadicSequence (index+1))≤ + (H*‖increment‖^2/2)*(1/2:ℝ)^index := by + let scale : ℝ := (1/2:ℝ)^index + have hscale : 0 ≤ scale := by dsimp [scale]; positivity + have hpower : 0≤(2:ℝ)^index := by positivity + have hinverse : (2:ℝ)^index*scale=1 := by dsimp [scale]; rw [← mul_pow]; norm_num + have hcenter := hc (basePoint+(scale/2) • increment) ((scale/2) • increment) + rw [show (basePoint+(scale/2) • increment)+(scale/2) • increment=basePoint+scale • increment by module, + show (basePoint+(scale/2) • increment)-(scale/2) • increment=basePoint by module, + norm_smul,Real.norm_eq_abs,abs_of_nonneg (by positivity : 0 ≤ scale/2)] at hcenter + have hdifference : dyadicSequence index-dyadicSequence (index+1)= + (2:ℝ)^index • (f (basePoint+scale • increment)+f basePoint- + (2:ℝ) • f (basePoint+(scale/2) • increment)) := by + dsimp only [dyadicSequence] + rw [pow_succ,pow_succ] + change (2:ℝ)^index • (f (basePoint+scale • increment)-f basePoint)- + ((2:ℝ)^index*2) • (f (basePoint+(scale*(1/2)) • increment)-f basePoint)=_ + rw [show scale*(1/2)=scale/2 by ring] + module + rw [dist_eq_norm,hdifference,norm_smul,Real.norm_eq_abs,abs_of_nonneg hpower] + apply (mul_le_mul_of_nonneg_left hcenter hpower).trans + have hequality : (2:ℝ)^index*(H*(scale/2*‖increment‖)^2)=(H*‖increment‖^2/4)*scale := by + calc + _ = (H*‖increment‖^2/4)*((2:ℝ)^index*scale)*scale := by ring + _ = _ := by rw [hinverse]; ring + rw [hequality] + change (H*‖increment‖^2/4)*scale≤(H*‖increment‖^2/2)*scale + gcongr + nlinarith [mul_nonneg hH (sq_nonneg ‖increment‖)] + have hgeometric := dist_le_of_le_geometric_of_tendsto₀ + (r:=(1/2:ℝ)) (C:=H*‖increment‖^2/2) (by norm_num) hstep hlimit + simpa only [dyadicSequence,pow_zero,one_smul,dist_eq_norm, + show (H*‖increment‖^2/2)/(1-(1/2:ℝ))=H*‖increment‖^2 by ring] using hgeometric + intro x y + by_cases he : y=x + · subst y; simp + have hr : 0<‖y-x‖ := norm_pos_iff.mpr (sub_ne_zero.mpr he) + let r := ‖y-x‖ + apply ContinuousLinearMap.opNorm_le_of_unit_norm (by positivity) + intro v hv + let w := r • v + have hw : ‖w‖=r := by dsimp [w]; rw [norm_smul,Real.norm_eq_abs,abs_of_pos hr,hv,mul_one] + have h1 := htaylor x (y+w-x) + have h2 := htaylor x (y-x) + have h3 := htaylor y w + rw [show x+(y+w-x)=y+w by abel] at h1 + rw [show x+(y-x)=y by abel] at h2 + let R1 := f (y+w)-f x-fderiv ℝ f x (y+w-x) + let R2 := f y-f x-fderiv ℝ f x (y-x) + let R3 := f (y+w)-f y-fderiv ℝ f y w + have hid : (fderiv ℝ f y-fderiv ℝ f x) w=R1-R2-R3 := by + dsimp [R1,R2,R3] + simp only [sub_apply,map_sub,map_add] + abel + have hnorm : ‖y+w-x‖≤2*r := by + rw [show y+w-x=(y-x)+w by abel] + exact (norm_add_le _ _).trans (by rw [hw]; change r+r≤2*r; linarith) + have hsq := (sq_le_sq₀ (norm_nonneg _) (by positivity : 0≤2*r)).mpr hnorm + have hb : ‖(fderiv ℝ f y-fderiv ℝ f x) w‖≤6*H*r^2 := by + rw [hid] + have h := (norm_sub_le (R1-R2) R3).trans (add_le_add (norm_sub_le R1 R2) (le_refl ‖R3‖)) + rw [hw] at h3 + have hp := mul_le_mul_of_nonneg_left hsq hH + nlinarith [h,h1,h2,h3,hp] + rw [show (fderiv ℝ f y-fderiv ℝ f x) w=r • ((fderiv ℝ f y-fderiv ℝ f x) v) by + exact map_smul _ _ _,norm_smul,Real.norm_eq_abs,abs_of_pos hr] at hb + change ‖(fderiv ℝ f y-fderiv ℝ f x) v‖≤6*H*r + nlinarith + +lemma CurvatureBound.second_derivative_bound {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hc : CurvatureBound f H) (hH : 0≤H) + (hf : Differentiable ℝ f) (x : U) : ‖iteratedFDeriv ℝ 2 f x‖≤6*H := by + have hL : LipschitzWith ⟨6*H,by positivity⟩ (fderiv ℝ f) := by + apply LipschitzWith.of_dist_le_mul + intro y z + change dist (fderiv ℝ f y) (fderiv ℝ f z)≤(6*H)*dist y z + simpa only [dist_eq_norm] using hc.fderiv_lipschitz hH hf z y + have hh := norm_fderiv_le_of_lipschitz ℝ hL (x₀:=x) + change ‖fderiv ℝ (fderiv ℝ f) x‖≤6*H at hh + simpa only [← norm_iteratedFDeriv_one,norm_iteratedFDeriv_fderiv] using hh + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureInterpolation.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureInterpolation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0fcc899a27afb73029af7dfc95baa2d36a903c80 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/CurvatureInterpolation.lean @@ -0,0 +1,210 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.CurvatureBounds + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma CurvatureBound.taylor {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H : ℝ} (hc : CurvatureBound f H) (hH : 0≤H) + (hf : Differentiable ℝ f) (x v : U) : + ‖f (x+v)-f x-fderiv ℝ f x v‖≤H*‖v‖^2 := by + let q : ℕ → W := fun n => (2:ℝ)^n • (f (x+(1/2:ℝ)^n • v)-f x) + have hD : HasDerivAt (fun t : ℝ => f (x+t • v)) (fderiv ℝ f x v) 0 := by + have hd := (hf (x+(0:ℝ) • v)).hasFDerivAt.comp_hasDerivAt (0:ℝ) + ((hasDerivAt_const (0:ℝ) x).add ((hasDerivAt_id (0:ℝ)).smul_const v)) + simpa only [zero_smul,add_zero,one_smul,zero_add,Function.comp_def,Pi.add_apply,id_eq] using hd + have hp : Tendsto (fun n : ℕ => (1/2:ℝ)^n) atTop (𝓝[>] (0:ℝ)) := by + apply tendsto_nhdsWithin_iff.mpr + exact ⟨tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num) (by norm_num), + Eventually.of_forall (fun n => by simp only [mem_Ioi]; positivity)⟩ + have hq : Tendsto q atTop (𝓝 (fderiv ℝ f x v)) := by + simpa [Function.comp_def,q,← inv_pow] using hD.tendsto_slope_zero_right.comp hp + have hb (n : ℕ) : dist (q n) (q (n+1))≤(H*‖v‖^2/2)*(1/2:ℝ)^n := by + let r : ℝ := (1/2:ℝ)^n + have hr : 0≤r := by dsimp [r]; positivity + have hn : 0≤(2:ℝ)^n := by positivity + have hinv : (2:ℝ)^n*r=1 := by dsimp [r]; rw [← mul_pow]; norm_num + have hcent := hc (x+(r/2) • v) ((r/2) • v) + rw [show (x+(r/2) • v)+(r/2) • v=x+r • v by module, + show (x+(r/2) • v)-(r/2) • v=x by module,norm_smul,Real.norm_eq_abs, + abs_of_nonneg (by positivity : 0≤r/2)] at hcent + have he : q n-q (n+1)=(2:ℝ)^n • (f (x+r • v)+f x-(2:ℝ) • f (x+(r/2) • v)) := by + dsimp only [q] + rw [pow_succ,pow_succ] + change (2:ℝ)^n • (f (x+r • v)-f x)-((2:ℝ)^n*2) • (f (x+(r*(1/2)) • v)-f x)=_ + rw [show r*(1/2)=r/2 by ring] + module + rw [dist_eq_norm,he,norm_smul,Real.norm_eq_abs,abs_of_nonneg hn] + apply (mul_le_mul_of_nonneg_left hcent hn).trans + have heq : (2:ℝ)^n*(H*(r/2*‖v‖)^2)=(H*‖v‖^2/4)*r := by + calc + _ = (H*‖v‖^2/4)*((2:ℝ)^n*r)*r := by ring + _ = _ := by rw [hinv]; ring + rw [heq] + change (H*‖v‖^2/4)*r≤(H*‖v‖^2/2)*r + gcongr + nlinarith [mul_nonneg hH (sq_nonneg ‖v‖)] + have hh := dist_le_of_le_geometric_of_tendsto₀ (r:=(1/2:ℝ)) (C:=H*‖v‖^2/2) (by norm_num) hb hq + simpa only [q,pow_zero,one_smul,dist_eq_norm,show (H*‖v‖^2/2)/(1-(1/2:ℝ))=H*‖v‖^2 by ring] using hh + +lemma fderiv_bound_of_curvature {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {H ε δ : ℝ} (hc : CurvatureBound f H) (hH : 0≤H) + (hf : Differentiable ℝ f) (hb : ∀ x, ‖f x‖≤ε) (hε : 0≤ε) (hδ : 0<δ) (x : U) : + ‖fderiv ℝ f x‖≤2*ε/δ+H*δ := by + apply ContinuousLinearMap.opNorm_le_of_unit_norm (by positivity) + intro v hv + have hv' : ‖v‖≤1 := hv.le + have ht := hc.taylor hH hf x (δ • v) + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hδ,map_smul] at ht + have hb' : ‖f (x+δ • v)-f x‖≤2*ε := (norm_sub_le _ _).trans (by linarith [hb (x+δ • v),hb x]) + have hD : δ*‖fderiv ℝ f x v‖≤2*ε+H*δ^2 := by + have hh := norm_sub_le (f (x+δ • v)-f x) (f (x+δ • v)-f x-δ • fderiv ℝ f x v) + rw [sub_sub_cancel,norm_smul,Real.norm_eq_abs,abs_of_pos hδ] at hh + have hv2 : ‖v‖^2≤1 := by nlinarith [norm_nonneg v] + nlinarith [mul_le_mul_of_nonneg_left hv2 (show 0≤H*δ^2 by positivity)] + have hD' : ‖fderiv ℝ f x v‖≤2*ε/δ+H*δ := by + have hD' : ‖fderiv ℝ f x v‖≤(2*ε+H*δ^2)/δ := + (le_div_iff₀ hδ).mpr (by nlinarith [hD]) + convert hD' using 1 + field_simp + simpa only [div_one] using hD' + +lemma fderiv_difference_bound_of_curvature {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {f g : U → W} {H ε δ : ℝ} (hf : Differentiable ℝ f) (hg : Differentiable ℝ g) + (hfc : CurvatureBound f H) (hgc : CurvatureBound g H) (hH : 0≤H) + (hfg : ∀ x, ‖f x-g x‖≤ε) (hε : 0≤ε) (hδ : 0<δ) (x : U) : + ‖fderiv ℝ f x-fderiv ℝ g x‖≤2*ε/δ+2*H*δ := by + have hb := fderiv_bound_of_curvature (hfc.sub hgc) (add_nonneg hH hH) (hf.sub hg) hfg hε hδ x + change ‖fderiv ℝ (f-g) x‖≤_ at hb + rwa [fderiv_sub (hf x) (hg x),← two_mul H] at hb + +lemma uniform_spatial_derivative_limit {X U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℕ → X × U → W} {f : X × U → W} {S : Set X} {H : ℝ} (hH : 0≤H) + (hF : ∀ n, ∀ t∈S, Differentiable ℝ (fun x => F n (t,x))) + (hc : ∀ n, ∀ t∈S, CurvatureBound (fun x => F n (t,x)) H) + (hlim : TendstoUniformlyOn F f atTop {p | p.1∈S}) : + ∃ D : X × U → (U →L[ℝ] W), + TendstoUniformlyOn (fun n p => fderiv ℝ (fun x => F n (p.1,x)) p.2) D atTop {p | p.1∈S} ∧ + ∀ t∈S, ∀ x, HasFDerivAt (fun x => f (t,x)) (D (t,x)) x := by + let DF : ℕ → X × U → (U →L[ℝ] W) := fun n p => fderiv ℝ (fun x => F n (p.1,x)) p.2 + have huc : UniformCauchySeqOn DF atTop {p | p.1∈S} := by + rw [Metric.uniformCauchySeqOn_iff] + intro ε hε + let δ := ε/(8*(H+1)) + let η := ε*δ/8 + have hδ : 0<δ := by dsimp [δ]; positivity + have hη : 0<η := by dsimp [η]; positivity + obtain ⟨K,hK⟩ := Metric.uniformCauchySeqOn_iff.mp hlim.uniformCauchySeqOn η hη + refine ⟨K,?_⟩ + intro m hm n hn p hp + have hh := fderiv_difference_bound_of_curvature (hF m p.1 hp) (hF n p.1 hp) + (hc m p.1 hp) (hc n p.1 hp) hH + (fun x => (show ‖F m (p.1,x)-F n (p.1,x)‖<η by simpa only [dist_eq_norm] using hK m hm n hn (p.1,x) hp).le) + hη.le hδ p.2 + rw [dist_eq_norm] + apply hh.trans_lt + have hd : δ*(8*(H+1))=ε := by dsimp [δ]; exact div_mul_cancel₀ _ (by positivity) + have he : 2*η/δ=ε/4 := by dsimp [η]; field_simp; ring + rw [he] + nlinarith [mul_nonneg hH hδ.le] + have hpoint (p : X × U) : ∃ a : U →L[ℝ] W, p.1∈S → Tendsto (fun n => DF n p) atTop (𝓝 a) := by + by_cases hp : p.1∈S + · obtain ⟨a,ha⟩ := cauchySeq_tendsto_of_complete (huc.cauchySeq hp) + exact ⟨a,fun _ => ha⟩ + · exact ⟨0,fun h => (hp h).elim⟩ + choose D hD using hpoint + have hdlim := huc.tendstoUniformlyOn_of_tendsto (fun p hp => hD p hp) + refine ⟨D,hdlim,?_⟩ + intro t ht x + have hds : TendstoUniformly (fun n x => DF n (t,x)) (fun x => D (t,x)) atTop := by + simpa only [Function.comp_def,preimage_ofPred_eq,ht,ofPred_true,tendstoUniformlyOn_univ] using hdlim.comp (fun x : U => (t,x)) + exact hasFDerivAt_of_tendstoUniformly hds (fun n x => (hF n t ht x).hasFDerivAt) + (fun x => hlim.tendsto_at (x:=(t,x)) ht) x + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM +universe u v + +lemma contDiff_fderiv_slice {A U W : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : A × U → W} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fun p : A × U => fderiv ℝ (fun x => F (p.1,x)) p.2) := by + have he (p : A × U) : fderiv ℝ (fun x => F (p.1,x)) p.2 = + (fderiv ℝ F p).comp (ContinuousLinearMap.inr ℝ A U) := by + have hin : HasFDerivAt (fun x : U => (p.1,x)) (ContinuousLinearMap.inr ℝ A U) p.2 := by + convert (hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id p.2) using 1 <;> rfl + exact ((hF.differentiable (by simp) p).hasFDerivAt.comp p.2 hin).fderiv + simp_rw [he] + exact (hF.fderiv_right (m:=∞) (by simp)).clm_comp contDiff_const + +lemma smooth_spatial_limit_nat {A U : Type u} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup U] [NormedSpace ℝ U] (k : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℕ → A × U → W} {f : A × U → W} {S : Set A}, + (∀ n, ContDiff ℝ ∞ (F n)) → + (∀ j : ℕ, ∃ C : ℝ, 0≤C ∧ ∀ n t, t∈S → ∀ x, + ‖iteratedFDeriv ℝ j (fun y => F n (t,y)) x‖≤C) → + TendstoUniformlyOn F f atTop {p | p.1∈S} → + (∀ t∈S, ContDiff ℝ k (fun x => f (t,x))) ∧ + ContinuousOn (fun p : A × U => iteratedFDeriv ℝ k (fun x => f (p.1,x)) p.2) {p | p.1∈S} ∧ + TendstoUniformlyOn (fun n (p : A × U) => iteratedFDeriv ℝ k (fun x => F n (p.1,x)) p.2) + (fun p : A × U => iteratedFDeriv ℝ k (fun x => f (p.1,x)) p.2) atTop {p | p.1∈S} := by + induction k with + | zero => + intro W _ _ _ F f S hF hb hl + have hc : ContinuousOn f {p | p.1∈S} := hl.continuousOn + (Frequently.of_forall fun n => (hF n).continuous.continuousOn) + refine ⟨fun t ht => contDiff_zero.mpr (hc.comp_continuous + (continuous_const.prodMk continuous_id) (fun x => ht)),?_,?_⟩ + · simpa only [iteratedFDeriv_zero_eq_comp,Function.comp_def,Prod.mk.eta] using + (continuousMultilinearCurryFin0 ℝ U W).symm.continuous.comp_continuousOn hc + · simpa only [iteratedFDeriv_zero_eq_comp,Function.comp_def,Prod.mk.eta] using + (continuousMultilinearCurryFin0 ℝ U W).symm.isometry.uniformContinuous.comp_tendstoUniformlyOn hl + | succ k ih => + intro W _ _ _ F f S hF hb hl + obtain ⟨C,hC,hCb⟩ := hb 2 + obtain ⟨D,hD,hd⟩ := uniform_spatial_derivative_limit (by positivity : 0≤2*C) + (fun n t ht => ((hF n).comp (contDiff_const.prodMk contDiff_id)).differentiable (by simp)) + (fun n t ht => curvature_of_second_derivative_bound + ((hF n).comp (contDiff_const.prodMk contDiff_id)) hC (hCb n t ht)) hl + let DF : ℕ → A × U → (U →L[ℝ] W) := fun n p => fderiv ℝ (fun x => F n (p.1,x)) p.2 + let df : A × U → (U →L[ℝ] W) := fun p => fderiv ℝ (fun x => f (p.1,x)) p.2 + have hdl : TendstoUniformlyOn DF df atTop {p | p.1∈S} := + hD.congr_right (fun p hp => (hd p.1 hp p.2).fderiv.symm) + have hdb : ∀ j : ℕ, ∃ C : ℝ, 0≤C ∧ ∀ n t, t∈S → ∀ x, + ‖iteratedFDeriv ℝ j (fun y => DF n (t,y)) x‖≤C := by + intro j + obtain ⟨C,hC,hCb⟩ := hb (j+1) + exact ⟨C,hC,fun n t ht x => by simpa only [DF,norm_iteratedFDeriv_fderiv] using hCb n t ht x⟩ + obtain ⟨hsc,hjc,hjl⟩ := ih (fun n => contDiff_fderiv_slice (hF n)) hdb hdl + refine ⟨?_,?_,?_⟩ + · intro t ht + rw [show (↑(k+1) : ℕ∞ω)=↑k+1 by simp,contDiff_succ_iff_fderiv] + exact ⟨fun x => (hd t ht x).differentiableAt,by simp,hsc t ht⟩ + · simpa only [df,iteratedFDeriv_succ_eq_comp_right,Function.comp_def,Prod.mk.eta] using + (continuousMultilinearCurryRightEquiv' ℝ k U W).symm.continuous.comp_continuousOn hjc + · simpa only [DF,df,iteratedFDeriv_succ_eq_comp_right,Function.comp_def,Prod.mk.eta] using + (continuousMultilinearCurryRightEquiv' ℝ k U W).symm.isometry.uniformContinuous.comp_tendstoUniformlyOn hjl + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/EnergyBump.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/EnergyBump.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1460e1b2bdd397a114131e9ed98c6def2d9d665 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/EnergyBump.lean @@ -0,0 +1,1006 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleBySpacetime + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open scoped ContDiff + +namespace RVM +open scoped Topology + +lemma deriv_time_slice {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {G : ℝ × Vec → W} {t : ℝ} {x : Vec} (hG : DifferentiableAt ℝ G (t,x)) : + deriv (fun r => G (r,x)) t = fderiv ℝ G (t,x) (1,0) := + (hG.hasFDerivAt.comp_hasDerivAt t + ((hasDerivAt_id t).prodMk (hasDerivAt_const t x))).deriv + +lemma spatialPartial_time_slice {G : ℝ × Vec → ℝ} {t : ℝ} {x : Vec} + (hG : DifferentiableAt ℝ G (t,x)) (i : Fin 3) : + spatialPartial (fun y => G (t,y)) x i = fderiv ℝ G (t,x) (0,basis i) := by + exact congrArg (fun L : Vec →L[ℝ] ℝ => L (basis i)) + (hG.hasFDerivAt.comp x ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x))).fderiv + +lemma classical_particleFlux_component {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 < t) (x : Vec) (i : Fin 3) : + particleFlux s (t,x) i = ∫ v : Vec, v i * s.f (t,x,v) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + particle_spacetime_local_data x hs.1 hs.2.2.2.2.2.2.1 ht + exact param_moment_component hK hp hF.continuousOn hzero i + +lemma classical_particle_energy_local {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 < t) (x : Vec) : + deriv (fun r => particleEnergy s (r,x)) t + + divergence (fun y => particleFlux s (t,y)) x = + dot (s.E (t,x)) (current (fun z => s.f (t,z)) x) := by + obtain ⟨henergy,hflux⟩ := classical_particle_energy_flux_regular hs ht x + rw [deriv_time_slice (henergy.differentiableAt (by simp))] + apply Eq.trans _ (classical_particle_energy_balance hs ht x) + congr 1 + apply Finset.sum_congr rfl + intro i _ + have hcomp : DifferentiableAt ℝ (fun p => particleFlux s p i) (t,x) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (t,x) + (hflux.differentiableAt (by simp)) + rw [spatialPartial_time_slice hcomp] + have he : (fun p : ℝ × Vec => particleFlux s p i) =ᶠ[𝓝 (t,x)] + (fun p => ∫ v : Vec, v i * s.f (p.1,p.2,v)) := by + filter_upwards [(isOpen_lt continuous_const continuous_fst).mem_nhds ht] with p hp + exact classical_particleFlux_component hs hp p.2 i + rw [he.fderiv_eq (𝕜 := ℝ)] + +lemma field_differentiableAt_positive {F : Field} + (hF : ContDiffOn ℝ 1 F fieldHalfSpace) {t : ℝ} (ht : 0 < t) (x : Vec) : + DifferentiableAt ℝ F (t,x) := by + apply (hF.contDiffAt _).differentiableAt (by simp) + apply Filter.mem_of_superset + ((isOpen_lt continuous_const continuous_fst).mem_nhds ht) + intro z hz + change 0 ≤ z.1 + exact le_of_lt hz + +lemma divergence_add {F G : Vec → Vec} {x : Vec} + (hF : DifferentiableAt ℝ F x) (hG : DifferentiableAt ℝ G x) : + divergence (fun y => F y+G y) x = divergence F x + divergence G x := by + have hf (i : Fin 3) : DifferentiableAt ℝ (fun y => F y i) x := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hF + have hg (i : Fin 3) : DifferentiableAt ℝ (fun y => G y i) x := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp x hG + have ha (i : Fin 3) := congrArg (fun L : Vec →L[ℝ] ℝ => L (basis i)) + (fderiv_add (hf i) (hg i)) + change ∀ i : Fin 3, fderiv ℝ (fun y => F y i + G y i) x (basis i) = + fderiv ℝ (fun y => F y i) x (basis i) + fderiv ℝ (fun y => G y i) x (basis i) at ha + simp only [divergence, PiLp.add_apply, spatialPartial, ha, Finset.sum_add_distrib] + +lemma classical_local_energy_conservation {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 < t) (x : Vec) : + deriv (fun r => totalEnergy s (r,x)) t + + divergence (fun y => totalFlux s (t,y)) x = 0 := by + have hE := field_differentiableAt_positive hs.2.1 ht x + have hB := field_differentiableAt_positive hs.2.2.1 ht x + obtain ⟨henergy,hflux⟩ := classical_particle_energy_flux_regular hs ht x + have heq := hs.2.2.2.2.2.2.2.1 t ht.le + have he := heq.2.1 x + have hb := heq.2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht)] at he hb + have hm := maxwell_energy_balance hE hB he hb + have hp := classical_particle_energy_local hs ht x + have heT : DifferentiableAt ℝ (fun r => s.E (r,x)) t := + hE.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hbT : DifferentiableAt ℝ (fun r => s.B (r,x)) t := + hB.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hfluxX : DifferentiableAt ℝ (fun y => particleFlux s (t,y)) x := + (hflux.differentiableAt (by simp)).comp x + ((differentiableAt_const t).prodMk differentiableAt_id) + have hcrossX : DifferentiableAt ℝ (fun y => cross (s.E (t,y)) (s.B (t,y))) x := + (contDiff_cross (k := 1)).differentiable (by simp) _ |>.comp x + ((hE.comp x ((differentiableAt_const t).prodMk differentiableAt_id)).prodMk + (hB.comp x ((differentiableAt_const t).prodMk differentiableAt_id))) + change deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2 + particleEnergy s (r,x)) t + + divergence (fun y => cross (s.E (t,y)) (s.B (t,y)) + particleFlux s (t,y)) x = 0 + have hpT : DifferentiableAt ℝ (fun r => particleEnergy s (r,x)) t := + DifferentiableAt.comp t (f := fun r : ℝ => (r,x)) (g := particleEnergy s) + (henergy.differentiableAt (by simp)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hfT : DifferentiableAt ℝ (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2) t := + ((heT.norm_sq (𝕜 := ℝ)).add (hbT.norm_sq (𝕜 := ℝ))).div_const 2 + have hd := deriv_add hfT hpT + change deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2 + particleEnergy s (r,x)) t = + deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2) t + + deriv (fun r => particleEnergy s (r,x)) t at hd + rw [hd, divergence_add hcrossX hfluxX] + linarith + +lemma classical_velocity_slice {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ContDiff ℝ 1 (fun v : Vec => s.f (t,x,v)) ∧ + HasCompactSupport (fun v : Vec => s.f (t,x,v)) := by + constructor + · apply contDiffOn_univ.mp + exact hs.1.comp (contDiff_const.prodMk (contDiff_const.prodMk contDiff_id)).contDiffOn + (fun _ _ => ht) + · obtain ⟨K,hK,hzero⟩ := hs.2.2.2.2.2.2.1 t ht + apply compactSupport_of_zero_off (hK.image continuous_snd) + intro v hv + by_contra hn + exact hv ⟨(x,v),hzero t ⟨ht,le_rfl⟩ (subset_tsupport _ hn),rfl⟩ + +lemma classical_particle_energy_nonneg {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + 0 ≤ particleEnergy s (t,x) := by + apply integral_nonneg + intro v + exact mul_nonneg (q_pos v).le (hs.2.2.2.1 t ht (x,v)) + +lemma classical_particle_flux_bound {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ‖particleFlux s (t,x)‖ ≤ particleEnergy s (t,x) := by + obtain ⟨hf,hc⟩ := classical_velocity_slice hs ht x + have hi : Integrable (fun v : Vec => s.f (t,x,v) • v) := + (hf.continuous.smul continuous_id).integrable_of_hasCompactSupport hc.smul_right + have hqi : Integrable (fun v : Vec => q v * s.f (t,x,v)) := + ((contDiff_q (k := 1)).continuous.mul hf.continuous).integrable_of_hasCompactSupport hc.mul_left + calc + _ ≤ ∫ v : Vec, ‖s.f (t,x,v) • v‖ := norm_integral_le_integral_norm _ + _ ≤ _ := by + apply integral_mono hi.norm hqi + intro v + have hp := hs.2.2.2.1 t ht (x,v) + simp only [norm_smul, Real.norm_eq_abs, abs_of_nonneg hp] + nlinarith [norm_lt_q v] + +lemma classical_total_energy_nonneg {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + 0 ≤ totalEnergy s (t,x) := by + dsimp [totalEnergy] + have hp := classical_particle_energy_nonneg hs ht x + positivity + +lemma classical_total_flux_bound {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ‖totalFlux s (t,x)‖ ≤ totalEnergy s (t,x) := by + exact (norm_add_le _ _).trans + (add_le_add (poynting_norm_le_energy (s.E (t,x)) (s.B (t,x))) + (classical_particle_flux_bound hs ht x)) + +lemma continuousOn_integral_uniform_support + {H W : Type*} [TopologicalSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {U : Set H} {K : Set Vec} {F : H × Vec → W} + (hK : IsCompact K) (hF : ContinuousOn F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + ContinuousOn (fun x => ∫ v : Vec, F (x,v)) U := by + have h := continuousOn_convolution_right_with_param_comp + (μ := (volume : Measure Vec)) (ContinuousLinearMap.lsmul ℝ ℝ : ℝ →L[ℝ] W →L[ℝ] W) + (v := fun _ : H => (0 : Vec)) continuousOn_const (g := fun x v => F (x,v)) + hK (fun x v hx hv => hzero x hx v hv) (locallyIntegrable_const (1 : ℝ)) hF + have hn (x : H) : convolution (fun _ : Vec => (1 : ℝ)) (fun v => F (x,v)) + (ContinuousLinearMap.lsmul ℝ ℝ) volume 0 = ∫ v : Vec, F (x,v) := by + simp only [convolution_def, zero_sub, ContinuousLinearMap.lsmul_apply, one_smul] + exact integral_neg_eq_self (fun v : Vec => F (x,v)) volume + simpa only [hn] using h + +lemma TimeContinuousL2.memLp {F : Field} (hF : TimeContinuousL2 F) + {t : ℝ} (ht : 0 ≤ t) : MemLp (fun x => F (t,x)) 2 volume := by + obtain ⟨F₂,hc,heq⟩ := hF + exact (Lp.memLp (F₂ t)).ae_eq (heq t ht) + +lemma TimeContinuousL2.integrable_norm_sq {F : Field} (hF : TimeContinuousL2 F) + {t : ℝ} (ht : 0 ≤ t) : Integrable (fun x => ‖F (t,x)‖^2) := by + have hm := hF.memLp ht + exact (memLp_two_iff_integrable_sq_norm hm.aestronglyMeasurable).mp hm + +lemma TimeContinuousL2.continuous_integral_norm_sq {F : Field} (hF : TimeContinuousL2 F) : + ContinuousOn (fun t => ∫ x : Vec, ‖F (t,x)‖^2) (Ici 0) := by + obtain ⟨F₂,hc,heq⟩ := hF + have hh : ∀ t ∈ Ici (0:ℝ), (∫ x : Vec, ‖F (t,x)‖^2) = ‖F₂ t‖^2 := by + intro t ht + rw [← real_inner_self_eq_norm_sq, L2.inner_def] + apply integral_congr_ae + filter_upwards [heq t ht] with x hx + rw [hx, real_inner_self_eq_norm_sq] + exact (hc.norm.pow 2).congr (fun t ht => hh t ht) + +lemma classical_particle_energy_continuous_slab {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (particleEnergy s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + obtain ⟨K,hK,hzero⟩ := hs.2.2.2.2.2.2.1 T hT + change ContinuousOn (fun p : ℝ × Vec => ∫ v : Vec, q v * s.f (p.1,p.2,v)) _ + apply continuousOn_integral_uniform_support (F := fun z : (ℝ × Vec) × Vec => q z.2 * s.f (z.1.1,z.1.2,z.2)) (hK.image continuous_snd) + · apply ((contDiff_q (k := 1)).continuous.comp continuous_snd).continuousOn.mul + apply hs.1.continuousOn.comp (contDiff_reassociate (k := 1)).continuous.continuousOn + intro z hz + exact hz.1.1.1 + · intro p hp v hv + have hf : s.f (p.1,p.2,v) = 0 := by + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 hp.1 (subset_tsupport _ hn),rfl⟩ + simp only [hf,mul_zero] + +lemma classical_particle_energy_compact {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ∃ K : Set Vec, IsCompact K ∧ ∀ t ∈ Icc 0 T, ∀ x ∉ K, particleEnergy s (t,x) = 0 := by + obtain ⟨K,hK,hzero⟩ := hs.2.2.2.2.2.2.1 T hT + refine ⟨Prod.fst '' K,hK.image continuous_fst,?_⟩ + intro t ht x hx + apply integral_eq_zero_of_ae + filter_upwards [] with v + have hf : s.f (t,x,v) = 0 := by + by_contra hn + exact hx ⟨(x,v),hzero t ht (subset_tsupport _ hn),rfl⟩ + simp only [hf,mul_zero, Pi.zero_apply] + +lemma classical_particle_energy_integrable {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) : + Integrable (fun x : Vec => particleEnergy s (t,x)) := by + obtain ⟨K,hK,hz⟩ := classical_particle_energy_compact hs ht + have hc := (classical_particle_energy_continuous_slab hs ht).comp_continuous + (continuous_const.prodMk continuous_id) + (fun x : Vec => show (t,x) ∈ Icc 0 t ×ˢ (univ : Set Vec) from ⟨⟨ht,le_rfl⟩,mem_univ _⟩) + exact hc.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK (hz t ⟨ht,le_rfl⟩)) + +lemma classical_total_energy_integrable {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 ≤ t) : + Integrable (fun x : Vec => totalEnergy s (t,x)) := by + exact ((hs.2.2.2.2.1.integrable_norm_sq ht).add + (hs.2.2.2.2.2.1.integrable_norm_sq ht)).div_const 2 |>.add + (classical_particle_energy_integrable hs ht) + +lemma classical_integrated_energy_continuous {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun t => ∫ x : Vec, totalEnergy s (t,x)) (Icc 0 T) := by + obtain ⟨K,hK,hz⟩ := classical_particle_energy_compact hs hT + have hp : ContinuousOn (fun t => ∫ x : Vec, particleEnergy s (t,x)) (Icc 0 T) := + continuousOn_integral_uniform_support hK + (classical_particle_energy_continuous_slab hs hT) hz + have he := hs.2.2.2.2.1.continuous_integral_norm_sq.mono (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + have hb := hs.2.2.2.2.2.1.continuous_integral_norm_sq.mono (Icc_subset_Ici_self : Icc 0 T ⊆ Ici (0:ℝ)) + apply ((he.add hb).div_const 2 |>.add hp).congr + intro t ht + change (∫ x : Vec, (‖s.E (t,x)‖^2+‖s.B (t,x)‖^2)/2+particleEnergy s (t,x)) = + ((∫ x : Vec, ‖s.E (t,x)‖^2)+(∫ x : Vec, ‖s.B (t,x)‖^2))/2+ + (∫ x : Vec, particleEnergy s (t,x)) + calc + _ = (∫ x : Vec, (‖s.E (t,x)‖^2+‖s.B (t,x)‖^2)/2)+ + (∫ x : Vec, particleEnergy s (t,x)) := + integral_add (((hs.2.2.2.2.1.integrable_norm_sq ht.1).add + (hs.2.2.2.2.2.1.integrable_norm_sq ht.1)).div_const 2) + (classical_particle_energy_integrable hs ht.1) + _ = _ := by + rw [integral_div, integral_add (hs.2.2.2.2.1.integrable_norm_sq ht.1) + (hs.2.2.2.2.2.1.integrable_norm_sq ht.1)] + +lemma classical_total_energy_regular {d : Datum} {s : Solution} + (hs : Classical d s) : ContDiffOn ℝ 1 (totalEnergy s) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have hE := hs.2.1.mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun z hz => show 0 ≤ z.1 from le_of_lt hz.1) + have hB := hs.2.2.1.mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun z hz => show 0 ≤ z.1 from le_of_lt hz.1) + have hp : ContDiffOn ℝ 1 (particleEnergy s) (Ioi 0 ×ˢ (univ : Set Vec)) := by + intro p hp + exact (classical_particle_energy_flux_regular hs hp.1 p.2).1.contDiffWithinAt + exact ((hE.norm_sq ℝ).add (hB.norm_sq ℝ)).div_const 2 |>.add hp + +lemma classical_total_flux_regular {d : Datum} {s : Solution} + (hs : Classical d s) : ContDiffOn ℝ 1 (totalFlux s) (Ioi 0 ×ˢ (univ : Set Vec)) := by + have hE := hs.2.1.mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun z hz => show 0 ≤ z.1 from le_of_lt hz.1) + have hB := hs.2.2.1.mono (show Ioi 0 ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace from + fun z hz => show 0 ≤ z.1 from le_of_lt hz.1) + have hp : ContDiffOn ℝ 1 (particleFlux s) (Ioi 0 ×ˢ (univ : Set Vec)) := by + intro p hp + exact (classical_particle_energy_flux_regular hs hp.1 p.2).2.contDiffWithinAt + exact ((contDiff_cross (k := 1)).contDiffOn.comp (hE.prodMk hB) + (fun _ _ => mem_univ _)).add hp + +lemma integral_mul_divergence {F : Vec → Vec} {g : Vec → ℝ} + (hF : ContDiff ℝ 1 F) (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) : + (∫ x, g x * divergence F x) = -(∫ x, fderiv ℝ g x (F x)) := by + have hFi (i : Fin 3) : ContDiff ℝ 1 (fun x => F x i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp hF + have hI (i : Fin 3) : Integrable (fun x => g x * spatialPartial (fun y => F y i) x i) := + (hg.continuous.mul (((hFi i).continuous_fderiv (by simp)).clm_apply continuous_const)).integrable_of_hasCompactSupport hc.mul_right + have hJ (i : Fin 3) : Integrable (fun x => F x i * spatialPartial g x i) := + ((hFi i).continuous.mul ((hg.continuous_fderiv (by simp)).clm_apply continuous_const)).integrable_of_hasCompactSupport + (hc.fderiv_apply ℝ (basis i)).mul_left + simp only [divergence, Finset.mul_sum] + conv_rhs => enter [1,2,x]; rw [clm_sum_basis] + change (∫ x, ∑ i : Fin 3, g x * spatialPartial (fun y => F y i) x i) = + -(∫ x, ∑ i : Fin 3, F x i * spatialPartial g x i) + rw [integral_finsetSum _ (fun i _ => hI i), integral_finsetSum _ (fun i _ => hJ i)] + simp_rw [mul_comm (g _) (spatialPartial _ _ _)] + have he (i : Fin 3) : (∫ x, spatialPartial (fun y => F y i) x i * g x) = + -(∫ x, F x i * spatialPartial g x i) := by + have hh := integral_mul_spatialPartial (hFi i) hg hc i + linarith + simp only [he, Finset.sum_neg_distrib] + +lemma deriv_weighted_energy {d : Datum} {s : Solution} + (hs : Classical d s) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {t : ℝ} (ht : 0 < t) : + HasDerivAt (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) + (∫ x : Vec, fderiv ℝ g x (totalFlux s (t,x))) t := by + have hE := classical_total_energy_regular hs + have hF : ContDiffOn ℝ 1 (fun p : ℝ × Vec => g p.2 * totalEnergy s p) + (Ioi 0 ×ˢ (univ : Set Vec)) := (hg.comp contDiff_snd).contDiffOn.mul hE + have hz : ∀ r ∈ Ioi (0:ℝ), ∀ x ∉ tsupport g, g x * totalEnergy s (r,x) = 0 := by + intro r _ x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + have hd := hasFDerivAt_integral_uniform_support isOpen_Ioi hc ht hF hz + have hi := fderiv_integral_uniform_support_apply isOpen_Ioi hc ht hF hz (1:ℝ) + have heq : ∀ x : Vec, + fderiv ℝ (fun p : ℝ × Vec => g p.2 * totalEnergy s p) (t,x) (1,0) = + -g x * divergence (fun y => totalFlux s (t,y)) x := by + intro x + have he := hE.contDiffAt (x := (t,x)) (IsOpen.mem_nhds (isOpen_Ioi.prod isOpen_univ) ⟨ht,mem_univ x⟩) + have heT : DifferentiableAt ℝ (fun r => totalEnergy s (r,x)) t := + DifferentiableAt.comp t (f := fun r : ℝ => (r,x)) (g := totalEnergy s) + (he.differentiableAt (by simp)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hgT : HasDerivAt (fun r => g x * totalEnergy s (r,x)) + (g x * deriv (fun r => totalEnergy s (r,x)) t) t := + heT.hasDerivAt.const_mul (g x) + have hf := hF.contDiffAt (x := (t,x)) (IsOpen.mem_nhds (isOpen_Ioi.prod isOpen_univ) ⟨ht,mem_univ x⟩) + rw [← deriv_time_slice (hf.differentiableAt (by simp)), hgT.deriv] + have hl := classical_local_energy_conservation hs ht x + rw [show deriv (fun r => totalEnergy s (r,x)) t = + -divergence (fun y => totalFlux s (t,y)) x by linarith] + ring + have hS : ContDiff ℝ 1 (fun x => totalFlux s (t,x)) := by + apply contDiffOn_univ.mp + exact (classical_total_flux_regular hs).comp + (contDiff_const.prodMk contDiff_id).contDiffOn + (fun x _ => ⟨ht,mem_univ x⟩) + have hh : deriv (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t = + ∫ x : Vec, fderiv ℝ g x (totalFlux s (t,x)) := by + change fderiv ℝ (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t 1 = _ + rw [hi] + simp only [heq, neg_mul, integral_neg] + rw [integral_mul_divergence hS hg hc, neg_neg] + exact hh ▸ hd.differentiableAt.hasDerivAt + +lemma classical_total_energy_continuous_slab {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (totalEnergy s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have hsub : Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace := fun z hz => hz.1.1 + exact (((hs.2.1.continuousOn.mono hsub).norm.pow 2).add + ((hs.2.2.1.continuousOn.mono hsub).norm.pow 2)).div_const 2 |>.add + (classical_particle_energy_continuous_slab hs hT) + +lemma classical_weighted_energy_continuous {d : Datum} {s : Solution} + (hs : Classical d s) {g : Vec → ℝ} (hg : Continuous g) (hc : HasCompactSupport g) + {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun t => ∫ x : Vec, g x * totalEnergy s (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support hc + ((hg.comp continuous_snd).continuousOn.mul (classical_total_energy_continuous_slab hs hT)) + intro t _ x hx + change g x * totalEnergy s (t,x) = 0 + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + +lemma weighted_energy_deriv_bound {d : Datum} {s : Solution} + (hs : Classical d s) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {C : ℝ} (hC : 0 ≤ C) (hb : ∀ x, ‖fderiv ℝ g x‖ ≤ C) + {t : ℝ} (ht : 0 < t) : + ‖deriv (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t‖ ≤ + C * (∫ x : Vec, totalEnergy s (t,x)) := by + rw [(deriv_weighted_energy hs hg hc ht).deriv] + have hS : Continuous (fun x : Vec => totalFlux s (t,x)) := by + apply ContinuousOn.comp_continuous (classical_total_flux_regular hs).continuousOn + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hi : Integrable (fun x => fderiv ℝ g x (totalFlux s (t,x))) := + ((hg.continuous_fderiv (by simp)).clm_apply hS).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hc.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx, zero_apply])) + calc + _ ≤ ∫ x : Vec, ‖fderiv ℝ g x (totalFlux s (t,x))‖ := norm_integral_le_integral_norm _ + _ ≤ ∫ x : Vec, C * totalEnergy s (t,x) := by + apply integral_mono hi.norm ((classical_total_energy_integrable hs ht.le).const_mul C) + intro x + exact (ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul (hb x) (classical_total_flux_bound hs ht.le x) (norm_nonneg _) hC) + _ = _ := integral_const_mul _ _ + +lemma weighted_energy_increment_bound {d : Datum} {s : Solution} + (hs : Classical d s) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {C B T : ℝ} (hC : 0 ≤ C) (hb : ∀ x, ‖fderiv ℝ g x‖ ≤ C) + (hT : 0 ≤ T) (hB : ∀ t ∈ Icc 0 T, (∫ x : Vec, totalEnergy s (t,x)) ≤ B) : + ‖(∫ x : Vec, g x * totalEnergy s (T,x)) - (∫ x : Vec, g x * totalEnergy s (0,x))‖ ≤ C * B * T := by + rcases eq_or_lt_of_le hT with he | ht + · subst T; simp + let F : ℝ → ℝ := fun t => ∫ x : Vec, g x * totalEnergy s (t,x) + have hcont : ContinuousOn F (Icc 0 T) := classical_weighted_energy_continuous hs hg.continuous hc hT + have hdiff : DifferentiableOn ℝ F (Ioo 0 T) := fun t ht => + (deriv_weighted_energy hs hg hc ht.1).differentiableAt.differentiableWithinAt + obtain ⟨c,hcT,heq⟩ := exists_deriv_eq_slope F ht hcont hdiff + have hder : ‖deriv F c‖ ≤ C * B := + (weighted_energy_deriv_bound hs hg hc hC hb hcT.1).trans + (mul_le_mul_of_nonneg_left (hB c ⟨hcT.1.le,hcT.2.le⟩) hC) + rw [heq, sub_zero, norm_div, Real.norm_of_nonneg hT] at hder + exact (div_le_iff₀ ht).mp hder + +def energyBump : ContDiffBump (0 : Vec) := ⟨1,2,by norm_num,by norm_num⟩ +def energyCutoff (n : ℕ) (x : Vec) : ℝ := energyBump (((n:ℝ)+1)⁻¹ • x) + +lemma energyCutoff_smooth (n : ℕ) : ContDiff ℝ 1 (energyCutoff n) := + energyBump.contDiff.comp ((contDiff_const : ContDiff ℝ 1 (fun _ : Vec => ((n:ℝ)+1)⁻¹)).smul + (contDiff_id : ContDiff ℝ 1 (fun x : Vec => x))) + +lemma energyCutoff_compact (n : ℕ) : HasCompactSupport (energyCutoff n) := by + apply compactSupport_of_zero_off (isCompact_closedBall (0:Vec) (2*((n:ℝ)+1))) + intro x hx + have hn : 0 < (n:ℝ)+1 := by positivity + have hnX : 2 * ((n:ℝ)+1) < ‖x‖ := by simpa only [Metric.mem_closedBall,dist_zero_right,not_le] using hx + have hnx : (((n:ℝ)+1)⁻¹ • x) ∉ Function.support energyBump := by + rw [energyBump.support_eq] + simp only [Metric.mem_ball, dist_zero_right, norm_smul, Real.norm_eq_abs, + abs_of_pos (inv_pos.mpr hn), energyBump] + have hh : 2 < ((n:ℝ)+1)⁻¹ * ‖x‖ := by + rw [← div_eq_inv_mul, lt_div_iff₀ hn] + exact hnX + exact not_lt.mpr hh.le + exact Function.notMem_support.mp hnx + +lemma energyCutoff_bounds (n : ℕ) (x : Vec) : 0 ≤ energyCutoff n x ∧ energyCutoff n x ≤ 1 := + ⟨energyBump.nonneg,energyBump.le_one⟩ + +lemma energyCutoff_deriv_bound : ∃ C : ℝ, 0 ≤ C ∧ + ∀ n : ℕ, ∀ x : Vec, ‖fderiv ℝ (energyCutoff n) x‖ ≤ C / ((n:ℝ)+1) := by + have hd : ContDiff ℝ 1 (energyBump : Vec → ℝ) := energyBump.contDiff + obtain ⟨C,hC⟩ := (hd.continuous_fderiv (by simp)).bounded_above_of_compact_support + (energyBump.hasCompactSupport.fderiv ℝ) + have hCp : 0 ≤ C := (norm_nonneg _).trans (hC 0) + refine ⟨C,hCp,?_⟩ + intro n x + have hn : 0 < (n:ℝ)+1 := by positivity + have hh := (hd.differentiable (by simp) (((n:ℝ)+1)⁻¹ • x)).hasFDerivAt.comp x + ((hasFDerivAt_id (𝕜 := ℝ) x).const_smul (((n:ℝ)+1)⁻¹)) + have heq := hh.fderiv + change fderiv ℝ (energyCutoff n) x = _ at heq + rw [heq] + calc + _ ≤ ‖fderiv ℝ (energyBump : Vec → ℝ) (((n:ℝ)+1)⁻¹ • x)‖ * + ‖((n:ℝ)+1)⁻¹ • ContinuousLinearMap.id ℝ Vec‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ = ‖fderiv ℝ (energyBump : Vec → ℝ) (((n:ℝ)+1)⁻¹ • x)‖ * ((n:ℝ)+1)⁻¹ := by + simp [norm_smul, abs_of_pos hn] + _ ≤ C * ((n:ℝ)+1)⁻¹ := mul_le_mul_of_nonneg_right (hC _) (inv_pos.mpr hn).le + _ = _ := div_eq_mul_inv _ _ |>.symm + +lemma energyCutoff_tendsto (x : Vec) : Filter.Tendsto (fun n => energyCutoff n x) Filter.atTop (𝓝 1) := by + have hi : Filter.Tendsto (fun n : ℕ => ((n:ℝ)+1)⁻¹) Filter.atTop (𝓝 0) := by + exact tendsto_inv_atTop_zero.comp (Filter.tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) + have hzero : energyBump (0:Vec) = 1 := energyBump.one_of_mem_closedBall (by simp [energyBump]) + simpa only [energyCutoff, zero_smul,hzero,Function.comp_def] using! energyBump.continuous.continuousAt.tendsto.comp (hi.smul_const x) + +lemma energyCutoff_integral_tendsto {F : Vec → ℝ} (hF : Integrable F) : + Filter.Tendsto (fun n => ∫ x : Vec, energyCutoff n x * F x) Filter.atTop (𝓝 (∫ x : Vec, F x)) := by + apply tendsto_integral_of_dominated_convergence (fun x => ‖F x‖) + · intro n + exact (energyCutoff_smooth n).continuous.aestronglyMeasurable.mul hF.aestronglyMeasurable + · exact hF.norm + · intro n + filter_upwards [] with x + rw [norm_mul, Real.norm_of_nonneg (energyCutoff_bounds n x).1] + exact mul_le_of_le_one_left (norm_nonneg _) (energyCutoff_bounds n x).2 + · filter_upwards [] with x + simpa only [one_mul] using (energyCutoff_tendsto x).mul_const (F x) + + theorem classical_energy_conservation {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + (∫ x : Vec, totalEnergy s (T,x)) = ∫ x : Vec, totalEnergy s (0,x) := by + obtain ⟨C,hC,hb⟩ := energyCutoff_deriv_bound + obtain ⟨B,hB⟩ := (isCompact_Icc : IsCompact (Icc (0:ℝ) T)).bddAbove_image + (classical_integrated_energy_continuous hs hT) + have hB' : ∀ t ∈ Icc 0 T, (∫ x : Vec, totalEnergy s (t,x)) ≤ B := + fun t ht => hB ⟨t,ht,rfl⟩ + have hinc (n : ℕ) : + ‖(∫ x : Vec, energyCutoff n x * totalEnergy s (T,x)) - + (∫ x : Vec, energyCutoff n x * totalEnergy s (0,x))‖ ≤ + (C / ((n:ℝ)+1)) * B * T := + weighted_energy_increment_bound hs (energyCutoff_smooth n) (energyCutoff_compact n) + (div_nonneg hC (by positivity)) (hb n) hT hB' + have hl := ((energyCutoff_integral_tendsto (classical_total_energy_integrable hs hT)).sub + (energyCutoff_integral_tendsto (classical_total_energy_integrable hs (show (0:ℝ) ≤ 0 from le_rfl)))).norm + have hr : Filter.Tendsto (fun n : ℕ => (C / ((n:ℝ)+1)) * B * T) Filter.atTop (𝓝 0) := by + have hi : Filter.Tendsto (fun n : ℕ => ((n:ℝ)+1)⁻¹) Filter.atTop (𝓝 0) := + tendsto_inv_atTop_zero.comp (Filter.tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) + simpa only [div_eq_mul_inv,mul_zero,zero_mul] using ((hi.const_mul C).mul_const B).mul_const T + have he := le_of_tendsto_of_tendsto' hl hr hinc + exact sub_eq_zero.mp (norm_eq_zero.mp (le_antisymm he (norm_nonneg _))) + +end RVM + +end + +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology ContDiff + +namespace RVM + +lemma scalar_gronwall_interior {f : ℝ → ℝ} {K ε T : ℝ} + (hK : 0 ≤ K) (hε : 0 ≤ ε) (hT : 0 ≤ T) + (hc : ContinuousOn f (Icc 0 T)) (h0 : f 0 = 0) + (hd : ∀ t ∈ Ioo 0 T, DifferentiableAt ℝ f t) + (hb : ∀ t ∈ Ioo 0 T, deriv f t ≤ K*f t+ε) : + f T ≤ ε*T*Real.exp (K*T) := by + rcases eq_or_lt_of_le hT with he | ht + · subst T; simp [h0] + let g : ℝ → ℝ := fun t => f t * Real.exp (-K*t) + have hgc : ContinuousOn g (Icc 0 T) := hc.mul (by fun_prop) + have hgd (t : ℝ) (htt : t ∈ Ioo 0 T) : + HasDerivAt g ((deriv f t-K*f t)*Real.exp (-K*t)) t := by + convert (hd t htt).hasDerivAt.mul (((hasDerivAt_id t).const_mul (-K)).exp) using 1 <;> try rfl + simp only [id_eq] + ring + obtain ⟨c,hc',heq⟩ := exists_deriv_eq_slope g ht hgc + (fun t ht => (hgd t ht).differentiableAt.differentiableWithinAt) + have he' : Real.exp (-K*c) ≤ 1 := Real.exp_le_one_iff.mpr (by nlinarith [hc'.1]) + have hg' : deriv g c ≤ ε := by + rw [(hgd c hc').deriv] + calc + _ ≤ ε*Real.exp (-K*c) := mul_le_mul_of_nonneg_right (by linarith [hb c hc']) (Real.exp_pos _).le + _ ≤ ε := mul_le_of_le_one_right hε he' + rw [heq,sub_zero,show g 0=0 by simp [g,h0],sub_zero] at hg' + have hlast := (div_le_iff₀ ht).mp hg' + have hx := mul_le_mul_of_nonneg_right hlast (Real.exp_pos (K*T)).le + simpa only [g,mul_assoc,← Real.exp_add,neg_mul,neg_add_cancel,Real.exp_zero,mul_one] using hx + +lemma weighted_density_hasDerivAt + {e : ℝ × Vec → ℝ} {g : Vec → ℝ} {t : ℝ} + (he : ContDiffOn ℝ 1 e (Ioi 0 ×ˢ (univ : Set Vec))) + (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) (ht : 0 < t) : + HasDerivAt (fun r => ∫ x : Vec, g x*e (r,x)) + (∫ x : Vec, g x*fderiv ℝ e (t,x) (1,0)) t := by + have hF : ContDiffOn ℝ 1 (fun p : ℝ × Vec => g p.2*e p) + (Ioi 0 ×ˢ (univ : Set Vec)) := (hg.comp contDiff_snd).contDiffOn.mul he + have hz : ∀ r ∈ Ioi (0:ℝ), ∀ x ∉ tsupport g, g x*e (r,x)=0 := by + intro r _ x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + have hi := fderiv_integral_uniform_support_apply isOpen_Ioi hc ht hF hz (1:ℝ) + have hd := hasFDerivAt_integral_uniform_support isOpen_Ioi hc ht hF hz + have heq (x : Vec) : fderiv ℝ (fun p : ℝ × Vec => g p.2*e p) (t,x) (1,0) = + g x*fderiv ℝ e (t,x) (1,0) := by + have he' := he.contDiffAt (x := (t,x)) ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩) + have heT : DifferentiableAt ℝ (fun r => e (r,x)) t := + DifferentiableAt.comp t (f := fun r : ℝ => (r,x)) (g := e) + (he'.differentiableAt (by simp)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hgT := heT.hasDerivAt.const_mul (g x) + have hf := hF.contDiffAt (x := (t,x)) ((isOpen_Ioi.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩) + rw [← deriv_time_slice (hf.differentiableAt (by simp)), hgT.deriv, + deriv_time_slice (he'.differentiableAt (by simp))] + have hid : deriv (fun r => ∫ x : Vec, g x*e (r,x)) t = + ∫ x : Vec, g x*fderiv ℝ e (t,x) (1,0) := by + change fderiv ℝ (fun r => ∫ x : Vec, g x*e (r,x)) t 1 = _ + rw [hi] + simp only [heq] + exact hid ▸ hd.differentiableAt.hasDerivAt + +lemma continuous_divergence {F : Vec → Vec} (hF : ContDiff ℝ 1 F) : + Continuous (divergence F) := by + unfold divergence spatialPartial + apply continuous_finsetSum + intro i _ + have hi : ContDiff ℝ 1 (fun x => F x i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp hF + exact (hi.continuous_fderiv (by simp)).clm_apply continuous_const + +lemma weighted_density_deriv_le + {e : ℝ × Vec → ℝ} {F : ℝ × Vec → Vec} {g : Vec → ℝ} {t K C : ℝ} + (he : ContDiffOn ℝ 1 e (Ioi 0 ×ˢ (univ : Set Vec))) + (hF : ContDiffOn ℝ 1 F (Ioi 0 ×ˢ (univ : Set Vec))) + (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) (ht : 0 < t) + (hg0 : ∀ x, 0 ≤ g x) (hC : 0 ≤ C) (hgb : ∀ x, ‖fderiv ℝ g x‖ ≤ C) + (heI : Integrable (fun x : Vec => e (t,x))) + (hflux : ∀ x : Vec, ‖F (t,x)‖ ≤ e (t,x)) + (hineq : ∀ x : Vec, fderiv ℝ e (t,x) (1,0) + divergence (fun y => F (t,y)) x ≤ K*e (t,x)) : + deriv (fun r => ∫ x : Vec, g x*e (r,x)) t ≤ + K*(∫ x : Vec, g x*e (t,x))+C*(∫ x : Vec, e (t,x)) := by + have hes : Continuous (fun x : Vec => e (t,x)) := he.continuousOn.comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨ht,mem_univ _⟩) + have hfs : ContDiff ℝ 1 (fun x : Vec => F (t,x)) := by + apply contDiffOn_univ.mp + exact hF.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun _ _ => ⟨ht,mem_univ _⟩) + have hedc : Continuous (fun x : Vec => fderiv ℝ e (t,x) (1,0)) := + ((he.continuousOn_fderiv_of_isOpen (isOpen_Ioi.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨ht,mem_univ _⟩)).clm_apply continuous_const + have hi₁ : Integrable (fun x : Vec => g x*fderiv ℝ e (t,x) (1,0)) := + (hg.continuous.mul hedc).integrable_of_hasCompactSupport hc.mul_right + have hi₂ : Integrable (fun x : Vec => g x*e (t,x)) := + (hg.continuous.mul hes).integrable_of_hasCompactSupport hc.mul_right + have hi₃ : Integrable (fun x : Vec => g x*divergence (fun y => F (t,y)) x) := + (hg.continuous.mul (continuous_divergence hfs)).integrable_of_hasCompactSupport hc.mul_right + have hi₄ : Integrable (fun x : Vec => fderiv ℝ g x (F (t,x))) := + ((hg.continuous_fderiv (by simp)).clm_apply hfs.continuous).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hc.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx, zero_apply])) + rw [(weighted_density_hasDerivAt he hg hc ht).deriv] + calc + _ ≤ ∫ x : Vec, K*(g x*e (t,x))-g x*divergence (fun y => F (t,y)) x := by + apply integral_mono hi₁ ((hi₂.const_mul K).sub hi₃) + intro x + change g x * fderiv ℝ e (t,x) (1,0) ≤ K*(g x*e (t,x))-g x*divergence (fun y => F (t,y)) x + nlinarith [mul_le_mul_of_nonneg_left (hineq x) (hg0 x)] + _ = K*(∫ x : Vec, g x*e (t,x))+(∫ x : Vec, fderiv ℝ g x (F (t,x))) := by + rw [integral_sub (hi₂.const_mul K) hi₃, integral_const_mul, integral_mul_divergence hfs hg hc] + ring + _ ≤ _ := by + apply add_le_add_right + calc + _ ≤ ∫ x : Vec, C*e (t,x) := by + apply integral_mono hi₄ (heI.const_mul C) + intro x + exact (le_abs_self _).trans ((ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul (hgb x) (hflux x) (norm_nonneg _) hC)) + _ = _ := integral_const_mul _ _ + +theorem local_energy_inequality_vanishes + {e : ℝ × Vec → ℝ} {F : ℝ × Vec → Vec} {K T : ℝ} + (hK : 0 ≤ K) (hT : 0 ≤ T) + (he : ContDiffOn ℝ 1 e (Ioi 0 ×ˢ (univ : Set Vec))) + (hF : ContDiffOn ℝ 1 F (Ioi 0 ×ˢ (univ : Set Vec))) + (hec : ContinuousOn e (Icc 0 T ×ˢ (univ : Set Vec))) + (he0 : ∀ t ∈ Icc 0 T, ∀ x : Vec, 0 ≤ e (t,x)) + (heI : ∀ t ∈ Icc 0 T, Integrable (fun x : Vec => e (t,x))) + (hcont : ContinuousOn (fun t => ∫ x : Vec, e (t,x)) (Icc 0 T)) + (hflux : ∀ t ∈ Ioo 0 T, ∀ x : Vec, ‖F (t,x)‖ ≤ e (t,x)) + (hineq : ∀ t ∈ Ioo 0 T, ∀ x : Vec, + fderiv ℝ e (t,x) (1,0)+divergence (fun y => F (t,y)) x ≤ K*e (t,x)) + (hinit : ∀ x : Vec, e (0,x)=0) : + ∀ x : Vec, e (T,x)=0 := by + obtain ⟨C,hC,hCb⟩ := energyCutoff_deriv_bound + obtain ⟨B,hB⟩ := (isCompact_Icc : IsCompact (Icc (0:ℝ) T)).bddAbove_image hcont + have hB' : ∀ t ∈ Icc 0 T, (∫ x : Vec, e (t,x)) ≤ B := fun t ht => hB ⟨t,ht,rfl⟩ + have hBn : 0 ≤ B := by + have ht0 : (0:ℝ) ∈ Icc 0 T := ⟨le_rfl,hT⟩ + exact (integral_nonneg (he0 0 ht0)).trans (hB' 0 ht0) + have hbound (n : ℕ) : (∫ x : Vec, energyCutoff n x*e (T,x)) ≤ + ((C/((n:ℝ)+1))*B)*T*Real.exp (K*T) := by + let f : ℝ → ℝ := fun t => ∫ x : Vec, energyCutoff n x*e (t,x) + have hfc : ContinuousOn f (Icc 0 T) := by + apply continuousOn_integral_uniform_support (energyCutoff_compact n) + (((energyCutoff_smooth n).continuous.comp continuous_snd).continuousOn.mul hec) + intro t _ x hx + change energyCutoff n x * e (t,x) = 0 + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + apply scalar_gronwall_interior hK (mul_nonneg (div_nonneg hC (by positivity)) hBn) hT hfc + · simp only [f,hinit,mul_zero,integral_zero] + · intro t ht + exact (weighted_density_hasDerivAt he (energyCutoff_smooth n) (energyCutoff_compact n) ht.1).differentiableAt + · intro t ht + have hder := weighted_density_deriv_le he hF (energyCutoff_smooth n) + (energyCutoff_compact n) ht.1 (fun x => (energyCutoff_bounds n x).1) + (div_nonneg hC (by positivity)) (hCb n) (heI t ⟨ht.1.le,ht.2.le⟩) + (hflux t ht) (hineq t ht) + exact hder.trans (add_le_add_right + (mul_le_mul_of_nonneg_left (hB' t ⟨ht.1.le,ht.2.le⟩) (div_nonneg hC (by positivity))) _) + have hl := energyCutoff_integral_tendsto (heI T ⟨hT,le_rfl⟩) + have hr : Tendsto (fun n : ℕ => ((C/((n:ℝ)+1))*B)*T*Real.exp (K*T)) atTop (nhds 0) := by + have hi : Tendsto (fun n : ℕ => ((n:ℝ)+1)⁻¹) atTop (nhds 0) := + tendsto_inv_atTop_zero.comp (tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) + simpa only [div_eq_mul_inv,mul_zero,zero_mul] using (((hi.const_mul C).mul_const B).mul_const T).mul_const (Real.exp (K*T)) + have hz : (∫ x : Vec, e (T,x))=0 := le_antisymm + (le_of_tendsto_of_tendsto' hl hr hbound) (integral_nonneg (he0 T ⟨hT,le_rfl⟩)) + have hae := (integral_eq_zero_iff_of_nonneg (he0 T ⟨hT,le_rfl⟩) (heI T ⟨hT,le_rfl⟩)).mp hz + have hes : Continuous (fun x : Vec => e (T,x)) := hec.comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨⟨hT,le_rfl⟩,mem_univ _⟩) + exact fun x => congrFun (Measure.eq_of_ae_eq (μ := volume) hae hes continuous_const) x + +def RegularParticle (f : Particle) : Prop := + ContDiffOn ℝ 1 f particleHalfSpace ∧ + CompactOnFiniteHorizons ⟨f,0,0⟩ + +lemma Classical.regularParticle {d : Datum} {s : Solution} (hs : Classical d s) : + RegularParticle s.f := ⟨hs.1,hs.2.2.2.2.2.2.1⟩ + +lemma RegularParticle.local_data {f : Particle} (hf : RegularParticle f) + {t : ℝ} (ht : 0 < t) (x : Vec) : + ∃ (U : Set (ℝ × Vec)) (K : Set Vec), + IsOpen U ∧ IsCompact K ∧ (t,x) ∈ U ∧ + ContDiffOn ℝ 1 (particleBySpacetime f) (U ×ˢ univ) ∧ + ∀ p ∈ U, ∀ v ∉ K, particleBySpacetime f (p,v) = 0 := + particle_spacetime_local_data (s := ⟨f,0,0⟩) x hf.1 hf.2 ht + +lemma RegularParticle.slice {f : Particle} (hf : RegularParticle f) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + ContDiff ℝ 1 (fun v : Vec => f (t,x,v)) ∧ HasCompactSupport (fun v : Vec => f (t,x,v)) := by + constructor + · apply contDiffOn_univ.mp + exact hf.1.comp (contDiff_const.prodMk (contDiff_const.prodMk contDiff_id)).contDiffOn + (fun _ _ => ht) + · obtain ⟨K,hK,hz⟩ := hf.2 t ht + apply compactSupport_of_zero_off (hK.image continuous_snd) + intro v hv + by_contra hn + exact hv ⟨(x,v),hz t ⟨ht,le_rfl⟩ (subset_tsupport _ hn),rfl⟩ + +def particleMoment {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (f : Particle) (w : Vec → W) (p : ℝ × Vec) : W := + ∫ v : Vec, f (p.1,p.2,v) • w v + +lemma RegularParticle.moment_integrable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : Particle} (hf : RegularParticle f) {w : Vec → W} (hw : Continuous w) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + Integrable (fun v : Vec => f (t,x,v) • w v) := by + obtain ⟨hs,hc⟩ := hf.slice ht x + exact (hs.continuous.smul hw).integrable_of_hasCompactSupport hc.smul_right + +lemma RegularParticle.moment_regular {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [CompleteSpace W] {f : Particle} (hf : RegularParticle f) + {w : Vec → W} (hw : ContDiff ℝ 1 w) : + ContDiffOn ℝ 1 (particleMoment f w) (Ioi 0 ×ˢ (univ : Set Vec)) := by + intro p hp + obtain ⟨U,K,hU,hK,hp',hF,hzero⟩ := hf.local_data hp.1 p.2 + have hs := contDiffOn_integral_uniform_support (n := 1) hU hK + (hF.smul (hw.comp contDiff_snd).contDiffOn) + (fun p hp v hv => by + change particleBySpacetime f (p,v) • w v = 0 + rw [hzero p hp v hv,zero_smul]) + exact (hs.contDiffAt (hU.mem_nhds hp')).contDiffWithinAt + +lemma RegularParticle.moment_continuous_slab {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Particle} (hf : RegularParticle f) {w : Vec → W} (hw : Continuous w) + {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (particleMoment f w) (Icc 0 T ×ˢ (univ : Set Vec)) := by + obtain ⟨K,hK,hzero⟩ := hf.2 T hT + change ContinuousOn (fun p : ℝ × Vec => ∫ v : Vec, f (p.1,p.2,v) • w v) _ + apply continuousOn_integral_uniform_support + (F := fun z : (ℝ × Vec) × Vec => f (z.1.1,z.1.2,z.2) • w z.2) (hK.image continuous_snd) + · apply ContinuousOn.smul ?_ (hw.comp continuous_snd).continuousOn + exact hf.1.continuousOn.comp (contDiff_reassociate (k := 1)).continuous.continuousOn + (fun z hz => hz.1.1.1) + · intro p hp v hv + have hz : f (p.1,p.2,v) = 0 := by + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 hp.1 (subset_tsupport _ hn),rfl⟩ + simp only [hz,zero_smul] + +lemma RegularParticle.moment_compact {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : Particle} (hf : RegularParticle f) (w : Vec → W) {T : ℝ} (hT : 0 ≤ T) : + ∃ K : Set Vec, IsCompact K ∧ ∀ t ∈ Icc 0 T, ∀ x ∉ K, particleMoment f w (t,x) = 0 := by + obtain ⟨K,hK,hzero⟩ := hf.2 T hT + refine ⟨Prod.fst '' K,hK.image continuous_fst,?_⟩ + intro t ht x hx + apply integral_eq_zero_of_ae + filter_upwards [] with v + have hz : f (t,x,v) = 0 := by + by_contra hn + exact hx ⟨(x,v),hzero t ht (subset_tsupport _ hn),rfl⟩ + simp only [hz,zero_smul,Pi.zero_apply] + +lemma RegularParticle.spatial_moment_integrable {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Particle} (hf : RegularParticle f) {w : Vec → W} (hw : Continuous w) + {t : ℝ} (ht : 0 ≤ t) : Integrable (fun x : Vec => particleMoment f w (t,x)) := by + obtain ⟨K,hK,hz⟩ := hf.moment_compact w ht + have hc := (hf.moment_continuous_slab hw ht).comp_continuous + (continuous_const.prodMk continuous_id) + (fun x : Vec => show (t,x) ∈ Icc 0 t ×ˢ (univ : Set Vec) from ⟨⟨ht,le_rfl⟩,mem_univ _⟩) + exact hc.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK (hz t ⟨ht,le_rfl⟩)) + +lemma RegularParticle.integrated_moment_continuous {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {f : Particle} (hf : RegularParticle f) {w : Vec → W} (hw : Continuous w) + {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (fun t => ∫ x : Vec, particleMoment f w (t,x)) (Icc 0 T) := by + obtain ⟨K,hK,hz⟩ := hf.moment_compact w hT + exact continuousOn_integral_uniform_support hK (hf.moment_continuous_slab hw hT) hz + +lemma RegularParticle.velocity_flux_bound {f : Particle} (hf : RegularParticle f) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) (hpos : ∀ v, 0 ≤ f (t,x,v)) : + ‖particleMoment f velocity (t,x)‖ ≤ particleMoment f (fun _ => (1:ℝ)) (t,x) := by + dsimp [particleMoment] + simp only [mul_one] + calc + _ ≤ ∫ v : Vec, ‖f (t,x,v) • velocity v‖ := norm_integral_le_integral_norm _ + _ ≤ ∫ v : Vec, f (t,x,v) := by + have hi := hf.moment_integrable (contDiff_velocity (k := 1)).continuous ht x + have hfI : Integrable (fun v : Vec => f (t,x,v)) := + (hf.slice ht x).1.continuous.integrable_of_hasCompactSupport (hf.slice ht x).2 + apply integral_mono hi.norm hfI + intro v + change ‖f (t,x,v) • velocity v‖ ≤ f (t,x,v) + rw [norm_smul,Real.norm_of_nonneg (hpos v)] + exact mul_le_of_le_one_right (hpos v) (norm_velocity_lt_one v).le + +lemma TimeContinuousL2.sub {E F : Field} (hE : TimeContinuousL2 E) (hF : TimeContinuousL2 F) : + TimeContinuousL2 (E-F) := by + obtain ⟨E₂,hEc,hEe⟩ := hE + obtain ⟨F₂,hFc,hFe⟩ := hF + refine ⟨E₂-F₂,hEc.sub hFc,?_⟩ + intro t ht + filter_upwards [Lp.coeFn_sub (E₂ t) (F₂ t),hEe t ht,hFe t ht] with x hsub he hf + exact hsub.trans (by simp only [he,hf,Pi.sub_apply]) + +lemma uniqueDiffOn_particleHalfSpace : UniqueDiffOn ℝ particleHalfSpace := by + have he : particleHalfSpace = Ici (0:ℝ) ×ˢ (univ : Set Phase) := by + ext p; simp [particleHalfSpace] + rw [he] + exact (uniqueDiffOn_Ici 0).prod uniqueDiffOn_univ + +lemma RegularParticle.velocity_derivative_bound {f : Particle} (hf : RegularParticle f) + {T : ℝ} (hT : 0 ≤ T) : + ∃ L : ℝ, 0 ≤ L ∧ ∀ t ∈ Ioo 0 T, ∀ x v : Vec, + ‖fderiv ℝ (fun w => f (t,x,w)) v‖ ≤ L := by + obtain ⟨K,hK,hz⟩ := hf.2 T hT + have hfullc := (hf.1.continuousOn_fderivWithin uniqueDiffOn_particleHalfSpace le_rfl).norm + have hsub : Icc 0 T ×ˢ K ⊆ particleHalfSpace := fun p hp => hp.1.1 + obtain ⟨B,hB⟩ := ((isCompact_Icc : IsCompact (Icc (0:ℝ) T)).prod hK).bddAbove_image + (hfullc.mono hsub) + refine ⟨max 0 B,le_max_left _ _,?_⟩ + intro t ht x v + by_cases hmem : (x,v) ∈ K + · have hd := particle_differentiableAt_positive (s := ⟨f,0,0⟩) hf.1 ht.1 x v + have hnhds : particleHalfSpace ∈ nhds (t,x,v) := + mem_of_superset ((isOpen_Ioi.preimage (continuous_fst : Continuous (Prod.fst : ℝ × Phase → ℝ))).mem_nhds ht.1) + (fun p hp => show p.1 ≥ 0 from le_of_lt hp) + have hb : ‖fderiv ℝ f (t,x,v)‖ ≤ max 0 B := by + rw [← fderivWithin_of_mem_nhds hnhds] + exact (hB ⟨(t,x,v),⟨⟨ht.1.le,ht.2.le⟩,hmem⟩,rfl⟩).trans (le_max_right _ _) + have hinj : HasFDerivAt (fun w : Vec => (t,x,w)) + ((0 : Vec →L[ℝ] ℝ).prod ((0 : Vec →L[ℝ] Vec).prod (ContinuousLinearMap.id ℝ Vec))) v := by + fun_prop + have hs := hd.hasFDerivAt.comp v hinj + apply ContinuousLinearMap.opNorm_le_bound _ (le_max_left 0 B) + intro w + have he : fderiv ℝ (fun w => f (t,x,w)) v w = fderiv ℝ f (t,x,v) (0,0,w) := by + exact congrArg (fun A : Vec →L[ℝ] ℝ => A w) hs.fderiv + rw [he] + calc + _ ≤ ‖fderiv ℝ f (t,x,v)‖ * ‖((0,0,w) : ℝ × Phase)‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ _ := by simpa using mul_le_mul_of_nonneg_right hb (norm_nonneg w) + · have hzero : (fun w : Vec => f (t,x,w)) =ᶠ[nhds v] (fun _ => 0) := by + have hn := (hK.isClosed.isOpen_compl.preimage (continuous_const.prodMk continuous_id)).mem_nhds hmem + filter_upwards [hn] with w hw + by_contra hne + exact hw (hz t ⟨ht.1.le,ht.2.le⟩ (subset_tsupport _ hne)) + rw [hzero.fderiv_eq (𝕜 := ℝ)] + simp + +lemma integral_lorentz_derivative_zero {g : Vec → ℝ} + (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) (E B : Vec) : + (∫ v : Vec, fderiv ℝ g v (E + cross (velocity v) B)) = 0 := by + have h := integral_mul_divergence (contDiff_lorentz E B) hg hc + simp only [divergence_lorentz,mul_zero,integral_zero] at h + linarith + +lemma particle_number_balance_param + {U : Set (ℝ × Vec)} {K : Set Vec} {F : (ℝ × Vec) × Vec → ℝ} + {p : ℝ × Vec} (E B : Vec) + (hU : IsOpen U) (hK : IsCompact K) (hp : p ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hzero : ∀ x ∈ U, ∀ v ∉ K, F (x,v) = 0) : + fderiv ℝ (fun y => ∫ v : Vec, F (y,v)) p (1,0) + + ∑ i : Fin 3, fderiv ℝ (fun y => ∫ v : Vec, velocity v i * F (y,v)) p (0,basis i) = + ∫ v : Vec, fderiv ℝ F (p,v) ((1,velocity v), E + cross (velocity v) B) := by + have hdiff (v : Vec) : DifferentiableAt ℝ F (p,v) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hp, mem_univ _⟩)).differentiableAt (by simp) + have hs : ContDiff ℝ 1 (fun v : Vec => F (p,v)) := by + apply contDiffOn_univ.mp + exact hF.comp ((contDiff_const.prodMk contDiff_id).contDiffOn) + (fun v _ => ⟨hp,mem_univ v⟩) + have hc : HasCompactSupport (fun v : Vec => F (p,v)) := + compactSupport_of_zero_off hK (hzero p hp) + have hvel (i : Fin 3) : ContDiff ℝ 1 (fun v => velocity v i) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp contDiff_velocity + have hint : Integrable (fun v : Vec => fderiv ℝ F (p,v) ((1,0),0)) := by + simpa only [one_mul] using integrable_param_fderiv_apply_weight hU hK hp hF + (continuous_const (y := (1:ℝ))) hzero (((1:ℝ),(0:Vec)),(0:Vec)) + have hint' (i : Fin 3) := integrable_param_fderiv_apply_weight hU hK hp hF + (hvel i).continuous hzero (((0:ℝ),basis i),(0:Vec)) + have hintK : Integrable (fun v : Vec => fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B)) := by + have hd : Continuous (fun v : Vec => fderiv ℝ F (p,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hp,mem_univ _⟩) + apply (hd.clm_apply (continuous_const.prodMk (contDiff_lorentz (k := 1) E B).continuous)).integrable_of_hasCompactSupport + apply compactSupport_of_zero_off (compactSupport_param_fderiv hU hK hp hzero) + intro v hv + rw [image_eq_zero_of_notMem_tsupport hv,zero_apply] + have hK0 : (∫ v : Vec, fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B)) = 0 := by + simpa only [fderiv_velocity_slice (hdiff _)] using integral_lorentz_derivative_zero hs hc E B + have he (v : Vec) : fderiv ℝ F (p,v) ((1,velocity v),E + cross (velocity v) B) = + fderiv ℝ F (p,v) ((1,0),0) + + (∑ i : Fin 3, velocity v i * fderiv ℝ F (p,v) ((0,basis i),0)) + + fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B) := by + rw [clm_spacetime_velocity_split] + congr 1 + symm + have h := clm_spacetime_velocity_split (fderiv ℝ F (p,v)) (0:Vec) (E + cross (velocity v) B) + have h' : fderiv ℝ F (p,v) ((1,0),E + cross (velocity v) B) = + fderiv ℝ F (p,v) ((1,0),0) + fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B) := by + rw [← map_add]; congr 1; ext <;> simp + simp only [PiLp.zero_apply,zero_mul,Finset.sum_const_zero,add_zero] at h + linarith + rw [fderiv_integral_uniform_support_apply hU hK hp hF hzero] + simp_rw [fderiv_weighted_integral_uniform_support_apply hU hK hp hF (hvel _) hzero] + rw [← integral_finsetSum _ (fun i _ => hint' i), ← integral_add hint + (integrable_finsetSum Finset.univ (fun i _ => hint' i))] + calc + _ = (∫ v : Vec, fderiv ℝ F (p,v) ((1,0),0) + + ∑ i : Fin 3, velocity v i * fderiv ℝ F (p,v) ((0,basis i),0)) + + (∫ v : Vec, fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B)) := by rw [hK0,add_zero] + _ = _ := by + calc + _ = ∫ v : Vec, (fderiv ℝ F (p,v) ((1,0),0) + + ∑ i : Fin 3, velocity v i * fderiv ℝ F (p,v) ((0,basis i),0)) + + fderiv ℝ F (p,v) ((0,0),E + cross (velocity v) B) := + (integral_add (hint.add (integrable_finsetSum Finset.univ (fun i _ => hint' i))) hintK).symm + _ = _ := by + apply integral_congr_ae + filter_upwards [] with v + exact (he v).symm + +lemma fderiv_square_half {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {g : H → ℝ} {p b : H} (hg : DifferentiableAt ℝ g p) : + fderiv ℝ (fun z => (g z)^2/2) p b = g p * fderiv ℝ g p b := by + have h := (hg.hasFDerivAt.pow 2).mul_const (2:ℝ)⁻¹ + simp only [div_eq_mul_inv] + rw [h.fderiv] + simp only [smul_apply,smul_eq_mul] + norm_num + ring + +def squareDifference (s₁ s₂ : Solution) : Particle := + fun z => (s₁.f z-s₂.f z)^2/2 + +lemma squareDifference_nonneg (s₁ s₂ : Solution) (z : ℝ × Phase) : + 0 ≤ squareDifference s₁ s₂ z := div_nonneg (sq_nonneg _) (by norm_num) + +lemma squareDifference_zero_iff (s₁ s₂ : Solution) (z : ℝ × Phase) : + squareDifference s₁ s₂ z = 0 ↔ s₁.f z=s₂.f z := by + simp [squareDifference,sub_eq_zero] + +lemma particle_difference_direction {d : Datum} {s₁ s₂ : Solution} + (hs₁ : Classical d s₁) (hs₂ : Classical d s₂) {t : ℝ} (ht : 0 < t) (x v : Vec) : + fderiv ℝ (particleBySpacetime (squareDifference s₁ s₂)) ((t,x),v) + ((1,velocity v),s₁.E (t,x)+cross (velocity v) (s₁.B (t,x))) = + -(s₁.f (t,x,v)-s₂.f (t,x,v)) * + fderiv ℝ (fun w => s₂.f (t,x,w)) v + ((s₁.E (t,x)-s₂.E (t,x))+cross (velocity v) (s₁.B (t,x)-s₂.B (t,x))) := by + have hd₁ := particle_differentiableAt_positive hs₁.1 ht x v + have hd₂ := particle_differentiableAt_positive hs₂.1 ht x v + have hsp₁ : DifferentiableAt ℝ (particleBySpacetime s₁.f) ((t,x),v) := + (hd₁.comp ((t,x),v) ((contDiff_reassociate (k := 1)).differentiable (by simp) _)) + have hsp₂ : DifferentiableAt ℝ (particleBySpacetime s₂.f) ((t,x),v) := + (hd₂.comp ((t,x),v) ((contDiff_reassociate (k := 1)).differentiable (by simp) _)) + have he₁ := particle_spacetime_vlasov hs₁.1 hs₁.2.2.2.2.2.2.2.1 ht x v + have he₂ := particle_spacetime_vlasov hs₂.1 hs₂.2.2.2.2.2.2.2.1 ht x v + change fderiv ℝ (fun z => ((particleBySpacetime s₁.f-particleBySpacetime s₂.f) z)^2/2) + ((t,x),v) _ = _ + rw [fderiv_square_half (hsp₁.sub hsp₂), fderiv_sub hsp₁ hsp₂] + simp only [sub_apply,Pi.sub_apply,he₁,zero_sub] + have hcross : cross (velocity v) (s₁.B (t,x)-s₂.B (t,x)) = + cross (velocity v) (s₁.B (t,x))-cross (velocity v) (s₂.B (t,x)) := by + ext i; fin_cases i <;> simp [cross] <;> ring + rw [hcross] + have hh : (((1:ℝ),velocity v),s₁.E (t,x)+cross (velocity v) (s₁.B (t,x))) = + ((1,velocity v),s₂.E (t,x)+cross (velocity v) (s₂.B (t,x))) + + ((0,0),(s₁.E (t,x)-s₂.E (t,x))+(cross (velocity v) (s₁.B (t,x))-cross (velocity v) (s₂.B (t,x)))) := by + apply Prod.ext + · simp + · dsimp + abel + rw [hh,map_add,he₂,zero_add] + have hv := fderiv_velocity_slice hsp₂ + change ∀ b, fderiv ℝ (fun v => s₂.f (t,x,v)) v b = + fderiv ℝ (particleBySpacetime s₂.f) ((t,x),v) ((0,0),b) at hv + rw [← hv] + simp only [particleBySpacetime] + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/IntegralBallPolarFlip.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/IntegralBallPolarFlip.lean new file mode 100644 index 0000000000000000000000000000000000000000..893ef4e17d985a08370a55a0d5b0eb1825f9bd52 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/IntegralBallPolarFlip.lean @@ -0,0 +1,189 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.UpperTimeCut + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma integral_ball_polar_flip {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : Vec→W} {R : ℝ} (hg : IntegrableOn g (ball (0:Vec) R)) : + (∫z in ball (0:Vec) R,g z)= + ∫n : Sphere,∫r in Ioo (0:ℝ) R,r^2 • g (-(r • n.1)) ∂volume ∂sphereMeasure := by + classical + let H := (ball (0:Vec) R).indicator g + have hi : Integrable H := (integrable_indicator_iff measurableSet_ball).mpr hg + rw [←integral_indicator measurableSet_ball] + change (∫z,H z)=_ + rw [←integral_neg_eq_self H volume,integral_polar hi.comp_neg] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + have he : ∀r∈Ioi (0:ℝ),r^2 • H (-(r • n.1))= + (Iio R).indicator (fun r=>r^2 • g (-(r • n.1))) r := by + intro r hr + have hnorm : ‖-(r • n.1)‖=r := by + rw [norm_neg,norm_smul,Real.norm_eq_abs,abs_of_pos hr,sphere_norm,mul_one] + by_cases h : rby + dsimp only + apply setIntegral_congr_fun measurableSet_Ioo + intro r hr + dsimp only + rw [←integral_smul,←integral_smul] + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + rw [←sub_eq_add_neg] + exact retardedForceKernel_polar_normalised s t x a v n hr.1 + (by + have hh := dot_le_norm n.1 a + rw [sphere_norm,one_mul] at hh + linarith))) + +lemma sourceAcceleration_cutoff {s : Solution} {τ H σ : ℝ} (hτH : τby + apply setIntegral_congr_fun measurableSet_Ioo + intro r hr + have hσ : t-r≤τ := by linarith [hr.1] + dsimp only + congr 1 + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + dsimp only + rw [(cutoffPrefix_eq hτH hσ s).1,sourceAcceleration_cutoff hτH hσ])) + +lemma integral_Ioo_reflect {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (g : ℝ→W) {t : ℝ} (ht : 0≤t) : + (∫σ in Ioo (0:ℝ) t,g (t-σ))=∫r in Ioo (0:ℝ) t,g r := by + have he := intervalIntegral.integral_comp_sub_left (a:=0) (b:=t) g t + simpa only [sub_self,sub_zero,intervalIntegral.integral_of_le ht, + integral_Ioc_eq_integral_Ioo] using he + +lemma SmoothClassicalPrefix.retarded_force_source_polar {d : Datum} {s : Solution} {H t : ℝ} + (hs : SmoothClassicalPrefix d s H) (ht : 0by + dsimp only + rw [←integral_Ioo_reflect (fun r=> (1-dot n.1 a) • ∫v : Vec, + s.f (t-r,(x-r • n.1,v)) • normalisedSignedForce r a (velocity v) n.1 + (sourceAcceleration s (t-r,(x-r • n.1,v)))) ht.le] + simp only [sub_sub_cancel]) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/LogSingularBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/LogSingularBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..97e6475bc62330a0517fad30fed1c03a109c4fff --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/LogSingularBound.lean @@ -0,0 +1,83 @@ +import Mathlib + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma singular_radial_split_bound {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : ℝ → W} {t θ A N : ℝ} (hθ : 0<θ) (hθt : θ≤t) + (hg : ContinuousOn g (Ioc (0:ℝ) t)) + (hn : ∀ r∈Ioc (0:ℝ) t, ‖g r‖≤N) + (ha : ∀ r∈Ioc (0:ℝ) t, ‖g r‖≤A/r) : + IntegrableOn g (Ioc (0:ℝ) t) ∧ + ‖∫r in Ioc (0:ℝ) t,g r‖≤N*θ+A*Real.log (t/θ) := by + have ht : 0 A/r) volume θ t := by + apply ContinuousOn.intervalIntegrable + rw [uIcc_of_le hθt] + exact continuousOn_const.div continuousOn_id (fun r hr => (hθ.trans_le hr.1).ne') + have h₂ : ‖∫r in θ..t,g r‖≤A*Real.log (t/θ) := by + have hh := intervalIntegral.norm_integral_le_of_norm_le (f:=g) hθt (by + filter_upwards [] with r hr + exact ha r ⟨hθ.trans hr.1,hr.2⟩) hci + apply hh.trans_eq + simp_rw [div_eq_mul_inv] + rw [intervalIntegral.integral_const_mul,integral_inv_of_pos hθ ht] + simp only [div_eq_mul_inv] + refine ⟨hi,?_⟩ + rw [←intervalIntegral.integral_of_le ht.le,←intervalIntegral.integral_add_adjacent_intervals hi₁ hi₂] + exact (norm_add_le _ _).trans (add_le_add h₁ h₂) + +lemma singular_radial_log_bound {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {g : ℝ → W} {t H A N : ℝ} (ht : 0 F y i) x v|≤(3*C)*‖v‖) ∧ ∀ i, |curl F x i|≤3*C := by + have hA := hjets 0 (by norm_num) + have hD := hjets 1 (by norm_num) + have hD' : ∀ x, ‖fderiv ℝ F x‖≤ C := by + intro x + have hh : ‖fderiv ℝ F x‖≤C := by simpa only [norm_iteratedFDeriv_one] using hD x + exact hh.trans le_rfl + have hfd (x v : Vec) (i : Fin 3) : |fderiv ℝ (fun y => F y i) x v|≤ C*‖v‖ := by + rw [coordinate_fderiv_apply (hF.differentiable (by simp))] + exact (norm_coordinate_le _ i).trans (((fderiv ℝ F x).le_opNorm v).trans + (mul_le_mul_of_nonneg_right (hD' x) (norm_nonneg v))) + intro x + refine ⟨?_,?_,?_⟩ + · have hh : ‖F x‖≤C := by simpa only [norm_iteratedFDeriv_zero] using hA x + linarith [hC] + · intro i v + exact (hfd x v i).trans (mul_le_mul_of_nonneg_right (by + linarith [hC]) (norm_nonneg v)) + · intro i + have he : curl F x i=spatialPartial (fun y => F y (curlB i)) x (curlA i)- + spatialPartial (fun y => F y (curlA i)) x (curlB i) := by + fin_cases i <;> simp [curl,curlA,curlB] + rw [he] + have ha := hfd x (basis (curlA i)) (curlB i) + have hb := hfd x (basis (curlB i)) (curlA i) + simp only [show ∀ j : Fin 3, ‖basis j‖=1 by intro j; simp [basis,PiLp.norm_single],mul_one] at ha hb + exact (abs_sub _ _).trans ((add_le_add ha hb).trans (by linarith [hC])) + +lemma iterated_lipschitz_of_bound {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) + (n : ℕ) {C : ℝ} (hb : ∀ x, ‖iteratedFDeriv ℝ (n+1) F x‖≤C) (x y : Vec) : + ‖iteratedFDeriv ℝ n F y-iteratedFDeriv ℝ n F x‖≤C*‖y-x‖ := by + exact (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => ContDiff.differentiable_iteratedFDeriv (n:=∞) (m:=n) (by exact_mod_cast ENat.natCast_lt_top n) hF z) + (fun z _ => by rw [norm_fderiv_iteratedFDeriv]; exact hb z) (mem_univ x) (mem_univ y) + +lemma spatial_lipschitz_of_low_jets {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) + {C : ℝ} (hC : 0≤C) (hjets : ∀ k≤2, ∀ x, ‖iteratedFDeriv ℝ k F x‖≤C) : + ∀ x y : Vec, ‖F y-F x‖≤(3*C)*‖y-x‖ ∧ + (∀ i v, |fderiv ℝ (fun z => F z i) y v-fderiv ℝ (fun z => F z i) x v|≤(3*C)*‖y-x‖*‖v‖) ∧ + ∀ i, |curl F y i-curl F x i|≤(3*C)*‖y-x‖ := by + have hD := hjets 1 (by norm_num) + let A := C + have hA : 0≤A := hC + have hval (x y : Vec) : ‖F y-F x‖≤A*‖y-x‖ := by + apply (convex_univ : Convex ℝ (univ : Set Vec)).norm_image_sub_le_of_norm_fderiv_le + (fun z _ => hF.differentiable (by simp) z) _ (mem_univ x) (mem_univ y) + intro z _ + have hh : ‖fderiv ℝ F z‖≤C := by simpa only [norm_iteratedFDeriv_one] using hD z + exact hh.trans le_rfl + let B := C + have hB : 0≤B := hC + have hb := iterated_lipschitz_of_bound hF 1 (hjets 2 le_rfl) + have hder (x y v : Vec) : ‖fderiv ℝ F y v-fderiv ℝ F x v‖≤B*‖y-x‖*‖v‖ := by + have hh := (iteratedFDeriv ℝ 1 F y-iteratedFDeriv ℝ 1 F x).le_opNorm (fun _ => v) + simp only [sub_apply,iteratedFDeriv_one_apply,Fin.prod_univ_one] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (hb x y) (norm_nonneg v)) + have hder' (x y v : Vec) (i : Fin 3) : + |fderiv ℝ (fun z => F z i) y v-fderiv ℝ (fun z => F z i) x v|≤B*‖y-x‖*‖v‖ := by + rw [coordinate_fderiv_apply (hF.differentiable (by simp)),coordinate_fderiv_apply (hF.differentiable (by simp))] + exact (norm_coordinate_le (fderiv ℝ F y v-fderiv ℝ F x v) i).trans (hder x y v) + suffices hh : ∀ x y : Vec, ‖F y-F x‖≤(A+2*B)*‖y-x‖ ∧ + (∀ i v, |fderiv ℝ (fun z => F z i) y v-fderiv ℝ (fun z => F z i) x v|≤(A+2*B)*‖y-x‖*‖v‖) ∧ + ∀ i, |curl F y i-curl F x i|≤(A+2*B)*‖y-x‖ by + convert hh using 1 + dsimp [A,B] + ring_nf + intro x y + refine ⟨(hval x y).trans (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)),?_,?_⟩ + · intro i v + exact (hder' x y v i).trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)) (norm_nonneg _)) + · intro i + have he (z : Vec) : curl F z i=spatialPartial (fun u => F u (curlB i)) z (curlA i)- + spatialPartial (fun u => F u (curlA i)) z (curlB i) := by + fin_cases i <;> simp [curl,curlA,curlB] + rw [he y,he x,show ∀ a b c d : ℝ, (a-b)-(c-d)=(a-c)-(b-d) by intros; ring] + have ha := hder' x y (basis (curlA i)) (curlB i) + have hb' := hder' x y (basis (curlB i)) (curlA i) + simp only [show ∀ j : Fin 3, ‖basis j‖=1 by intro j; simp [basis,PiLp.norm_single],mul_one] at ha hb' + exact (abs_sub _ _).trans ((add_le_add ha hb').trans (by nlinarith [norm_nonneg (y-x)])) + +lemma freeWave_coordinate_bound_of_low_jets {E B : Vec → Vec} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + {C : ℝ} (hC : 0≤C) + (hEj : ∀ k≤2, ∀ x, ‖iteratedFDeriv ℝ k E x‖≤C) + (hBj : ∀ k≤2, ∀ x, ‖iteratedFDeriv ℝ k B x‖≤C) (i : Fin 3) : + ∀ t∈Icc (0:ℝ) 1, ∀ x : Vec, + |freeWave (fun y => E y i) (fun y => curl B y i) (t,x)|≤18*C ∧ + |freeWave (fun y => B y i) (fun y => -curl E y i) (t,x)|≤18*C := by + let A := 3*C + let D := 3*C + have hA : 0≤A := by positivity + have hD : 0≤D := by positivity + have hAb := coordinate_bounds_of_low_jets hE hC hEj + have hDb := coordinate_bounds_of_low_jets hB hC hBj + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + have he : 18*C=3*(A+D) := by dsimp [A,D]; ring + rw [he] + intro t ht x + constructor + · apply freeWave_bound_global (hproj.comp hE) (add_nonneg hA hD) _ _ _ ht + · intro y + exact (norm_coordinate_le _ i).trans ((hAb y).1.trans (le_add_of_nonneg_right hD)) + · intro y n hn + have hh : |fderiv ℝ (fun u => E u i) y n|≤A := by simpa only [hn,mul_one] using (hAb y).2.1 i n + exact hh.trans (le_add_of_nonneg_right hD) + · intro y + exact (hDb y).2.2 i |>.trans (le_add_of_nonneg_left hA) + · apply freeWave_bound_global (hproj.comp hB) (add_nonneg hA hD) _ _ _ ht + · intro y + exact (norm_coordinate_le _ i).trans ((hDb y).1.trans (le_add_of_nonneg_left hA)) + · intro y n hn + have hh : |fderiv ℝ (fun u => B u i) y n|≤D := by simpa only [hn,mul_one] using (hDb y).2.1 i n + exact hh.trans (le_add_of_nonneg_left hA) + · intro y + rw [abs_neg] + exact (hAb y).2.2 i |>.trans (le_add_of_nonneg_right hD) + +lemma freeWave_coordinate_lipschitz_of_low_jets {E B : Vec → Vec} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + {C : ℝ} (hC : 0≤C) + (hEj : ∀ k≤2, ∀ x, ‖iteratedFDeriv ℝ k E x‖≤C) + (hBj : ∀ k≤2, ∀ x, ‖iteratedFDeriv ℝ k B x‖≤C) (i : Fin 3) : + ∀ t∈Icc (0:ℝ) 1, ∀ x y : Vec, + |freeWave (fun z => E z i) (fun z => curl B z i) (t,y)- + freeWave (fun z => E z i) (fun z => curl B z i) (t,x)|≤18*C*‖y-x‖ ∧ + |freeWave (fun z => B z i) (fun z => -curl E z i) (t,y)- + freeWave (fun z => B z i) (fun z => -curl E z i) (t,x)|≤18*C*‖y-x‖ := by + let A := 3*C + let D := 3*C + have hA : 0≤A := by positivity + have hD : 0≤D := by positivity + have hAb := spatial_lipschitz_of_low_jets hE hC hEj + have hDb := spatial_lipschitz_of_low_jets hB hC hBj + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + have he : 18*C=3*(A+D) := by dsimp [A,D]; ring + rw [he] + intro t ht x y + constructor + · apply freeWave_lipschitz (hproj.comp hE) + (hproj.continuous.comp (contDiff_curl hB).continuous) (add_nonneg hA hD) _ _ _ ht + · intro z z' + exact (norm_coordinate_le (E z'-E z) i).trans ((hAb z z').1.trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _))) + · intro z z' n hn + have hh : |fderiv ℝ (fun u => E u i) z' n-fderiv ℝ (fun u => E u i) z n|≤A*‖z'-z‖ := by + simpa only [hn,mul_one] using (hAb z z').2.1 i n + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _)) + · intro z z' + exact ((hDb z z').2.2 i).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _)) + · apply freeWave_lipschitz (hproj.comp hB) + ((hproj.continuous.comp (contDiff_curl hE).continuous).neg) (add_nonneg hA hD) _ _ _ ht + · intro z z' + exact (norm_coordinate_le (B z'-B z) i).trans ((hDb z z').1.trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _))) + · intro z z' n hn + have hh : |fderiv ℝ (fun u => B u i) z' n-fderiv ℝ (fun u => B u i) z n|≤D*‖z'-z‖ := by + simpa only [hn,mul_one] using (hDb z z').2.1 i n + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hA) (norm_nonneg _)) + · intro z z' + simpa only [Function.comp_apply,Pi.neg_apply,neg_sub_neg,abs_sub_comm] using + ((hAb z z').2.2 i).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hD) (norm_nonneg _)) + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +variable {ι : Type*} {d : ι → Datum} +variable (hd : ∀ j, Admissible (d j)) +variable {A P L J : ℝ} (hA : 0≤A) (hL : 0≤L) (hJ : 0≤J) +variable (hf : ∀ j z, |(d j).f₀ z|≤A) +variable (hp : ∀ j x v, P<‖v‖ → (d j).f₀ (x,v)=0) +variable (hl : ∀ j x y v, |(d j).f₀ (y,v)-(d j).f₀ (x,v)|≤L*‖y-x‖) +variable (hEj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).E₀ x‖≤J) +variable (hBj : ∀ j k, k≤2 → ∀ x, ‖iteratedFDeriv ℝ k (d j).B₀ x‖≤J) + +include hA hf hp in +lemma family_datum_moment_bounds : + ∃ C : ℝ, 0≤C ∧ ∀ j x, |rho (d j).f₀ x|≤C ∧ ‖current (d j).f₀ x‖≤C := by + obtain ⟨B,hB,hb⟩ := uniform_velocity_integral_bound_from_caps (H:=fun _ => (1:ℝ)) continuousOn_const A P hA + obtain ⟨C,hC,hc⟩ := uniform_velocity_integral_bound_from_caps + (((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn) A P hA + refine ⟨B+C,add_nonneg hB hC,?_⟩ + intro j x + constructor + · have hh := hb (d j).f₀ (hf j) (hp j) x (basis 0) (by simp [basis,PiLp.norm_single]) + simp only [smul_eq_mul,mul_one,Real.norm_eq_abs] at hh + exact hh.trans (le_add_of_nonneg_right hC) + · exact (hc (d j).f₀ (hf j) (hp j) x (basis 0) (by simp [basis,PiLp.norm_single])).trans (le_add_of_nonneg_left hB) + +include hd hL hp hl in +lemma family_datum_moment_lipschitz : + ∃ C : ℝ, 0≤C ∧ ∀ j x y, |rho (d j).f₀ y-rho (d j).f₀ x|≤C*‖y-x‖ ∧ + ‖current (d j).f₀ y-current (d j).f₀ x‖≤C*‖y-x‖ := by + obtain ⟨B,hB,hb⟩ := uniform_velocity_integral_lipschitz_from_caps (H:=fun _ => (1:ℝ)) continuousOn_const L P hL + obtain ⟨C,hC,hc⟩ := uniform_velocity_integral_lipschitz_from_caps + (((contDiff_velocity (k:=1)).continuous.comp continuous_snd).continuousOn) L P hL + refine ⟨B+C,add_nonneg hB hC,?_⟩ + intro j x y + constructor + · have hh := hb (d j).f₀ (hd j).1.continuous (hl j) (hp j) x y (basis 0) (by simp [basis,PiLp.norm_single]) + simp only [smul_eq_mul,mul_one,Real.norm_eq_abs] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hC) (norm_nonneg _)) + · exact (hc (d j).f₀ (hd j).1.continuous (hl j) (hp j) x y (basis 0) (by simp [basis,PiLp.norm_single])).trans + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hB) (norm_nonneg _)) + +include hA hf hp in +lemma family_datumElectricFlux_bound (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j (t : ℝ) (x y : Vec), x≠y → + ‖retardedElectricFlux (datumBoundarySolution (d j)) t x i y‖≤C/coneRadius x y := by + obtain ⟨C,hC,hbound⟩ := uniform_velocity_integral_bound_from_caps (continuousOn_datumElectricFluxKernel i) A P hA + refine ⟨C,hC,?_⟩ + intro j t x y hxy + rw [datumElectricFlux_eq,norm_smul,coneRadius,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (x-y)))] + simpa only [div_eq_mul_inv,mul_comm C,coneRadius] using + mul_le_mul_of_nonneg_left (hbound (d j).f₀ (hf j) (hp j) y (coneDirection x y) (coneDirection_norm hxy)) + (inv_nonneg.mpr (norm_nonneg _)) + +include hA hf hp in +lemma family_datumMagneticFlux_bound (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j (t : ℝ) (x y : Vec), x≠y → + ‖retardedMagneticFlux (datumBoundarySolution (d j)) t x i y‖≤C/coneRadius x y := by + obtain ⟨C,hC,hbound⟩ := uniform_velocity_integral_bound_from_caps (continuousOn_datumMagneticFluxKernel i) A P hA + refine ⟨C,hC,?_⟩ + intro j t x y hxy + rw [datumMagneticFlux_eq,norm_smul,coneRadius,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (x-y)))] + simpa only [div_eq_mul_inv,mul_comm C,coneRadius] using + mul_le_mul_of_nonneg_left (hbound (d j).f₀ (hf j) (hp j) y (coneDirection x y) (coneDirection_norm hxy)) + (inv_nonneg.mpr (norm_nonneg _)) + +include hd hL hp hl in +lemma family_datum_sphere_flux_lipschitz {H : Vec × Vec → Vec} + (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) : + ∃ C : ℝ, 0≤C ∧ ∀ j, ∀ t∈Icc (0:ℝ) 1, ∀ x y : Vec, + |(4*Real.pi)⁻¹*(∫ n : Sphere, t*dot n.1 (∫ v, (d j).f₀ (y+t • n.1,v) • H (-n.1,v)) ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n : Sphere, t*dot n.1 (∫ v, (d j).f₀ (x+t • n.1,v) • H (-n.1,v)) ∂sphereMeasure)|≤C*‖y-x‖ := by + obtain ⟨C,hC,hb⟩ := uniform_velocity_integral_lipschitz_from_caps hH L P hL + refine ⟨C,hC,?_⟩ + intro q t ht x y + have hhf := (hd q).1.continuous + have hhc := (hd q).2.1 + have hb := hb (d q).f₀ hhf (hl q) (hp q) + have hn (n : Sphere) : ‖n.1‖=1 := mem_sphere_zero_iff_norm.mp n.2 + have hc' (z : Vec) : Continuous (fun n : Sphere => + t*dot n.1 (∫ v, (d q).f₀ (z+t • n.1,v) • H (-n.1,v))) := by + have hI : Continuous (fun n : Sphere => ∫ v, (d q).f₀ (z+t • n.1,v) • H (-n.1,v)) := by + apply (continuousOn_datum_velocity_integral hhf hhc hH).comp_continuous + ((continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val)).prodMk continuous_subtype_val.neg) + intro n + exact ⟨mem_univ _,by simpa only [mem_sphere_zero_iff_norm,Pi.neg_apply,norm_neg] using hn n⟩ + exact continuous_const.mul ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_subtype_val.prodMk hI)) + have hh := abs_sphere_integral_sub_le (hc' y) (hc' x) (C:=C*‖y-x‖) (by + intro n + rw [← mul_sub,← dot_sub_right,abs_mul,abs_of_nonneg ht.1] + have hbd : ‖(∫ v, (d q).f₀ (y+t • n.1,v) • H (-n.1,v))- + (∫ v, (d q).f₀ (x+t • n.1,v) • H (-n.1,v))‖≤C*‖y-x‖ := by + simpa only [add_sub_add_right_eq_sub] using hb (x+t • n.1) (y+t • n.1) (-n.1) (by simpa only [norm_neg] using hn n) + exact (mul_le_mul_of_nonneg_left ((abs_dot_le _ _).trans + (by simpa only [hn n,one_mul] using hbd)) ht.1).trans + (mul_le_of_le_one_left (by positivity) ht.2)) + rw [← mul_sub,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by field_simp) + +include hd hA hJ hf hp hEj hBj in +lemma family_electricConeBoundary_datum_bound_global + (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j, ∀ t∈Ioc (0:ℝ) 1, ∀ x : Vec, + |electricConeBoundary (datumBoundarySolution (d j)) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := family_datumElectricFlux_bound hA hf hp i + obtain ⟨D,hD,hmom⟩ := family_datum_moment_bounds hA hf hp + let A := 18*J + have hA : 0≤A := by positivity + have hfree (j : ι) := freeWave_coordinate_bound_of_low_jets (hd j).2.2.2.1.1 (hd j).2.2.2.2.1.1 hJ (hEj j) (hBj j) i + refine ⟨A+(C+2*D),by positivity,?_⟩ + intro q t ht x + have hfree := hfree q + have hflux := hflux q + have hmom := hmom q + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution (d q)) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_cone_flux i hflux ht.1 x n) + have hrho : |∫ n : Sphere, t*n.1 i*rho (d q).f₀ (x+t • n.1) ∂sphereMeasure|≤ + (t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + have hn : |n.1 i|≤1 := by + exact (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + (hmom (x+t • n.1)).1 (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = t*D := by ring + have hj : |waveK (fun y => current (d q).f₀ y i) (t,x)|≤t*D := + waveK_bound_of_bounded (fun y => (norm_coordinate_le (current (d q).f₀ y) i).trans (hmom y).2) ht.1.le x + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedElectricFlux (datumBoundarySolution (d q)) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t*n.1 i*rho (d q).f₀ (x+t • n.1) ∂sphereMeasure)|≤t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hrho hp + _ = t*D := by field_simp + have hf := (hfree t ⟨ht.1.le,ht.2⟩ x).1 + simp only [electricConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_sub _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)) hj)).trans (by + nlinarith [ht.2]) + +include hd hL hJ hp hl hEj hBj in +lemma family_electricConeBoundary_datum_lipschitz (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j, ∀ t∈Ioc (0:ℝ) 1, ∀ x y : Vec, + |electricConeBoundary (datumBoundarySolution (d j)) t y i 0- + electricConeBoundary (datumBoundarySolution (d j)) t x i 0|≤C*‖y-x‖ := by + let A := 18*J + have hA : 0≤A := by positivity + have hfree (j : ι) := freeWave_coordinate_lipschitz_of_low_jets (hd j).2.2.2.1.1 (hd j).2.2.2.2.1.1 hJ (hEj j) (hBj j) i + obtain ⟨B,hB,hflux⟩ := family_datum_sphere_flux_lipschitz hd hL hp hl + (continuousOn_datumElectricFluxKernel i) + obtain ⟨D,hD,hmom⟩ := family_datum_moment_lipschitz hd hL hp hl + refine ⟨A+B+2*D,by positivity,?_⟩ + intro q t ht x y + have hfree := hfree q + have hflux := hflux q + have hmom := hmom q + have hm : Continuous (rho (d q).f₀) ∧ Continuous (current (d q).f₀) := by + constructor + · exact (LipschitzWith.of_dist_le' (K:=D) (fun x y => by + simpa only [dist_eq_norm,Real.norm_eq_abs] using (hmom y x).1)).continuous + · exact (LipschitzWith.of_dist_le' (K:=D) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj : Continuous (fun v : Vec => v i) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous + + have hrho := weighted_sphere_mean_lipschitz hm.1 hD (fun x y => (hmom x y).1) + (hproj.comp continuous_subtype_val) (fun n => (norm_coordinate_le n.1 i).trans_eq (mem_sphere_zero_iff_norm.mp n.2)) + ⟨ht.1.le,ht.2⟩ x y + have hj := waveK_lipschitz (hproj.comp hm.2) + (fun x y => (norm_coordinate_le (current (d q).f₀ y-current (d q).f₀ x) i).trans (hmom x y).2) ht.1.le x y + have he : t*D*‖y-x‖≤D*‖y-x‖ := by + exact mul_le_mul_of_nonneg_right (mul_le_of_le_one_left hD ht.2) (norm_nonneg _) + simp only [electricConeBoundary,sub_zero] + simp_rw [datum_initial_electric_flux_normalised (d q) i ht.1] + simp only [datumBoundarySolution] + have halg (a b c e a' b' c' e' : ℝ) : (a-b-c-e)-(a'-b'-c'-e')=(a-a')-(b-b')-(c-c')-(e-e') := by ring + rw [halg] + exact ((abs_sub _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add ((abs_sub _ _).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x y).1 + (hflux t ⟨ht.1.le,ht.2⟩ x y))) hrho)) (hj.trans he))).trans_eq (by ring) + +include hd hA hJ hf hp hEj hBj in +lemma family_magneticConeBoundary_datum_bound_global + (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j, ∀ t∈Ioc (0:ℝ) 1, ∀ x : Vec, + |magneticConeBoundary (datumBoundarySolution (d j)) t x i 0|≤C := by + have hproj : ContDiff ℝ ∞ (fun v : Vec => v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff + obtain ⟨C,hC,hflux⟩ := family_datumMagneticFlux_bound hA hf hp i + obtain ⟨D,hD,hmom⟩ := family_datum_moment_bounds hA hf hp + let A := 18*J + have hA : 0≤A := by positivity + have hfree (j : ι) := freeWave_coordinate_bound_of_low_jets (hd j).2.2.2.1.1 (hd j).2.2.2.2.1.1 hJ (hEj j) (hBj j) i + refine ⟨A+(C+2*D),by positivity,?_⟩ + intro q t ht x + have hfree := hfree q + have hflux := hflux q + have hmom := hmom q + have hflux' : |∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution (d q)) t x i (x+t • n.1)) ∂sphereMeasure|≤ + (C*t)*(4*Real.pi) := by + exact abs_sphere_integral_le (fun n => norm_initial_magnetic_cone_flux i hflux ht.1 x n) + have hem (n : Sphere) (j k : Fin 3) : + |t*n.1 j*current (d q).f₀ (x+t • n.1) k|≤t*D := by + have hn : |n.1 j|≤1 := + (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + have hj : |current (d q).f₀ (x+t • n.1) k|≤D := + (norm_coordinate_le _ k).trans (hmom _).2 + rw [abs_mul,abs_mul,abs_of_pos ht.1] + calc + _ ≤ t*1*D := mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) + hj (abs_nonneg _) (mul_nonneg ht.1.le zero_le_one) + _ = _ := by ring + have hj : |∫ n : Sphere, + t*n.1 (curlA i)*current (d q).f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current (d q).f₀ (x+t • n.1) (curlA i) ∂sphereMeasure|≤ + (2*t*D)*(4*Real.pi) := by + apply abs_sphere_integral_le + intro n + exact (abs_sub _ _).trans ((add_le_add (hem n _ _) (hem n _ _)).trans (by ring_nf; rfl)) + have hp : 0≤(4*Real.pi)⁻¹ := by positivity + have hn1 : |(4*Real.pi)⁻¹*(∫ n : Sphere, t^2*dot n.1 + (retardedMagneticFlux (datumBoundarySolution (d q)) t x i (x+t • n.1)) ∂sphereMeasure)|≤C*t := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((C*t)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hflux' hp + _ = C*t := by field_simp + have hn2 : |(4*Real.pi)⁻¹*(∫ n : Sphere, + t*n.1 (curlA i)*current (d q).f₀ (x+t • n.1) (curlB i)- + t*n.1 (curlB i)*current (d q).f₀ (x+t • n.1) (curlA i) ∂sphereMeasure)|≤2*t*D := by + rw [abs_mul,abs_of_nonneg hp] + calc + _ ≤ (4*Real.pi)⁻¹*((2*t*D)*(4*Real.pi)) := mul_le_mul_of_nonneg_left hj hp + _ = 2*t*D := by field_simp + have hf := (hfree t ⟨ht.1.le,ht.2⟩ x).2 + simp only [magneticConeBoundary,datumBoundarySolution,sub_zero] + exact ((abs_add_le _ _).trans (add_le_add + ((abs_sub _ _).trans (add_le_add hf hn1)) hn2)).trans (by + nlinarith [ht.2]) + +include hd hL hJ hp hl hEj hBj in +lemma family_magneticConeBoundary_datum_lipschitz (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ j, ∀ t∈Ioc (0:ℝ) 1, ∀ x y : Vec, + |magneticConeBoundary (datumBoundarySolution (d j)) t y i 0- + magneticConeBoundary (datumBoundarySolution (d j)) t x i 0|≤C*‖y-x‖ := by + let A := 18*J + have hA : 0≤A := by positivity + have hfree (j : ι) := freeWave_coordinate_lipschitz_of_low_jets (hd j).2.2.2.1.1 (hd j).2.2.2.2.1.1 hJ (hEj j) (hBj j) i + obtain ⟨B,hB,hflux⟩ := family_datum_sphere_flux_lipschitz hd hL hp hl + (continuousOn_datumMagneticFluxKernel i) + obtain ⟨D,hD,hmom⟩ := family_datum_moment_lipschitz hd hL hp hl + refine ⟨A+B+2*D,by positivity,?_⟩ + intro q t ht x y + have hfree := hfree q + have hflux := hflux q + have hmom := hmom q + have hjc : Continuous (current (d q).f₀) := (LipschitzWith.of_dist_le' (K:=D) (fun x y => by + simpa only [dist_eq_norm] using (hmom y x).2)).continuous + have hproj (j : Fin 3) : Continuous (fun v : Vec => v j) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous + + let F : Vec → Sphere → ℝ := fun z n => t*n.1 (curlA i)*current (d q).f₀ (z+t • n.1) (curlB i)- + t*n.1 (curlB i)*current (d q).f₀ (z+t • n.1) (curlA i) + have hfc (z : Vec) : Continuous (F z) := by + have hg (j k : Fin 3) : Continuous (fun n : Sphere => t*n.1 j*current (d q).f₀ (z+t • n.1) k) := + (continuous_const.mul ((hproj j).comp continuous_subtype_val)).mul + (((hproj k).comp hjc).comp (continuous_const.add + ((continuous_const : Continuous (fun _ : Sphere => t)).smul continuous_subtype_val))) + exact (hg _ _).sub (hg _ _) + have hh := abs_sphere_integral_sub_le (hfc y) (hfc x) (C:=2*D*‖y-x‖) (by + intro n + have hterm (j k : Fin 3) : |t*n.1 j*current (d q).f₀ (y+t • n.1) k- + t*n.1 j*current (d q).f₀ (x+t • n.1) k|≤D*‖y-x‖ := by + rw [← mul_sub,abs_mul,abs_mul,abs_of_pos ht.1] + have hn : |n.1 j|≤1 := (norm_coordinate_le n.1 j).trans_eq (mem_sphere_zero_iff_norm.mp n.2) + have hj : |current (d q).f₀ (y+t • n.1) k-current (d q).f₀ (x+t • n.1) k|≤D*‖y-x‖ := by + simpa only [PiLp.sub_apply,add_sub_add_right_eq_sub] using + (norm_coordinate_le (current (d q).f₀ (y+t • n.1)-current (d q).f₀ (x+t • n.1)) k).trans + (hmom (x+t • n.1) (y+t • n.1)).2 + exact (mul_le_mul (mul_le_mul_of_nonneg_left hn ht.1.le) hj (abs_nonneg _) (by simpa using ht.1.le)).trans + (by simpa only [mul_one] using mul_le_of_le_one_left (by positivity : 0≤D*‖y-x‖) ht.2) + dsimp [F] + rw [show ∀ a b c e : ℝ, (a-b)-(c-e)=(a-c)-(b-e) by intros; ring] + exact ((abs_sub _ _).trans (add_le_add (hterm _ _) (hterm _ _))).trans_eq (by ring)) + have hj : |(4*Real.pi)⁻¹*(∫ n, F y n ∂sphereMeasure)- + (4*Real.pi)⁻¹*(∫ n, F x n ∂sphereMeasure)|≤2*D*‖y-x‖ := by + rw [← mul_sub,abs_mul,abs_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hh (by positivity)).trans_eq (by field_simp) + simp only [magneticConeBoundary,sub_zero] + simp_rw [datum_initial_magnetic_flux_normalised (d q) i ht.1] + simp only [datumBoundarySolution] + have halg (a b c a' b' c' : ℝ) : (a-b+c)-(a'-b'+c')=(a-a')-(b-b')+(c-c') := by ring + rw [halg] + exact ((abs_add_le _ _).trans (add_le_add ((abs_sub _ _).trans + (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x y).2 (hflux t ⟨ht.1.le,ht.2⟩ x y))) hj)).trans_eq (by ring) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/MixedJets.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/MixedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f254d5b128932cf42ed33679f7d543b6bd7b478 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/MixedJets.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.ConeRegularity +import OAI.Analysis.VlasovMaxwell.Retarded.MagneticBoundaryJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma retarded_density_spatial_smooth {s : Solution} (hf : ContDiff ℝ ∞ s.f) + (hE : ContDiff ℝ ∞ s.E) (hB : ContDiff ℝ ∞ s.B) (hc : CompactOnFiniteHorizons s) + {t P : ℝ} (ht : 0≤t) + (hsupport : ∀ u∈Icc (0:ℝ) t, ∀ y v, P<‖v‖ → s.f (u,(y,v))=0) : + ContDiff ℝ ∞ (fun x => ∫ z in ball (0:Vec) t, retardedElectricDensity s t x (x+z)) ∧ + ContDiff ℝ ∞ (fun x => ∫ z in ball (0:Vec) t, retardedMagneticDensity s t x (x+z)) := by + obtain ⟨δ,hδ,hden⟩ := uniform_cone_denominator P + have hG := normalisedRetardedExtension_smooth hδ hf hE hB t + rw [retardedElectricDensity_polar_compact hf hE hB hc ht hδ hden hsupport, + retardedMagneticDensity_polar_compact hf hE hB hc ht hδ hden hsupport] + exact ⟨compactPolarIntegral_smooth t P _ hG,compactPolarIntegral_smooth t P _ + (contDiff_cross.comp (contDiff_fst.snd.fst.prodMk hG))⟩ + +lemma norm_iteratedFDeriv_const_smul {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {f : U → W} + (hf : ContDiff ℝ ∞ f) (n : ℕ) (c : ℝ) (x : U) : + ‖iteratedFDeriv ℝ n (fun y => c • f y) x‖=‖c‖*‖iteratedFDeriv ℝ n f x‖ := by + rw [iteratedFDeriv_const_smul_apply' ((hf.of_le (by exact_mod_cast le_top)).contDiffAt),norm_smul] + +lemma mixed_fields_derivative_tame {d : Datum} (hd : Admissible d) + (k : ℕ) (hk : 1≤k) (P A : ℝ) (hA : 1≤A) : + ∃ D C : ℝ, 0≤D ∧ 0≤C ∧ + (∀ x, ‖iteratedFDeriv ℝ (k+1) d.E₀ x‖≤D ∧ ‖iteratedFDeriv ℝ (k+1) d.B₀ x‖≤D) ∧ + ∀ (s : Solution) (E B : Field), PicardRegular d s → + ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → TransportFor s E B → + ∀ T : ℝ, T≤1 → + (∀ u∈Icc (0:ℝ) T, ∀ y v, P<‖v‖ → s.f (u,(y,v))=0) → + ParticleJetBound k T A s.f → SpatialJetBound k T A E B → + ∀ H : ℝ → ℝ, Continuous H → (∀ u∈Icc (0:ℝ) T, 0≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ z, ‖iteratedFDeriv ℝ (k+1) (fun w => s.f (u,w)) z‖≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ x, ‖iteratedFDeriv ℝ (k+1) (fun y => E (u,y)) x‖≤H u ∧ + ‖iteratedFDeriv ℝ (k+1) (fun y => B (u,y)) x‖≤H u) → + ∀ t∈Icc (0:ℝ) T, ∀ x, + ‖iteratedFDeriv ℝ (k+1) (fun y => s.E (t,y)) x‖≤D+C*(∫ u in Icc (0:ℝ) t, 1+H u) ∧ + ‖iteratedFDeriv ℝ (k+1) (fun y => s.B (t,y)) x‖≤D+C*(∫ u in Icc (0:ℝ) t, 1+H u) := by + obtain ⟨D,hD,hinit,hbd⟩ := datum_boundary_global_jets hd (k+1) + obtain ⟨K,hK,hcone⟩ := physical_cone_derivative_tame k hk P A hA + refine ⟨D,(4*Real.pi)⁻¹*K,hD,by positivity,hinit,?_⟩ + intro s E B hs hE hB hV T hT hsupport hfj hEBj H hH hHpos hft hEBt t ht x + by_cases ht0 : t=0 + · subst t + have hEs : (fun y => s.E (0,y))=d.E₀ := funext hs.initial_E + have hBs : (fun y => s.B (0,y))=d.B₀ := funext hs.initial_B + simpa [hEs,hBs] using hinit x + have htpos : 0 hsupport u ⟨hu.1,hu.2.trans ht.2⟩) + have hboundary := hbd t ⟨htpos,ht.2.trans hT⟩ + have he (y : Vec) := mixed_physical_vector hs.smooth_f hE hB hs.smooth_E hs.smooth_B hs.compact hV + hs.smooth_rho hs.smooth_current hs.maxwell htpos y + have heq : (fun y => s.E (t,y))=(fun y => electricBoundaryField (datumBoundarySolution d) t y+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, retardedElectricDensity q t y (y+z)) := by + funext y; rw [(he y).1,(hs.boundary_eq htpos y).1] + have hbq : (fun y => s.B (t,y))=(fun y => magneticBoundaryField (datumBoundarySolution d) t y+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, retardedMagneticDensity q t y (y+z)) := by + funext y; rw [(he y).2,(hs.boundary_eq htpos y).2] + rw [heq,hbq] + constructor + · apply (norm_iteratedFDeriv_add_le hboundary.1.1 (hsmooth.1.const_smul _) (k+1) x).trans + rw [norm_iteratedFDeriv_const_smul hsmooth.1,Real.norm_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (add_le_add (hboundary.2 x).1 (mul_le_mul_of_nonneg_left hbound.1 (by positivity))).trans_eq (by ring) + · apply (norm_iteratedFDeriv_add_le hboundary.1.2 (hsmooth.2.const_smul _) (k+1) x).trans + rw [norm_iteratedFDeriv_const_smul hsmooth.2,Real.norm_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (add_le_add (hboundary.2 x).2 (mul_le_mul_of_nonneg_left hbound.2 (by positivity))).trans_eq (by ring) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/MomentLimit.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/MomentLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6e1206488033a1d48092a0ab8a06f87d1462a73 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/MomentLimit.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardBounds + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_compact_moment {X W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℕ → X → Vec → ℝ} {f : X → Vec → ℝ} {S : Set X} {P : ℝ} + (hF : ∀ n, ∀ p∈S, Continuous (F n p)) (hf : ∀ p∈S, Continuous (f p)) + (hSF : ∀ n, ∀ p∈S, ∀ v : Vec, P<‖v‖ → F n p v=0) + (hSf : ∀ p∈S, ∀ v : Vec, P<‖v‖ → f p v=0) + (hlim : TendstoUniformlyOn (fun n (p : X × Vec) => F n p.1 p.2) + (fun p => f p.1 p.2) atTop {p | p.1∈S}) + {ψ : Vec → W} (hψ : Continuous ψ) (hbψ : ∀ v, ‖ψ v‖≤1) : + TendstoUniformlyOn (fun n p => ∫ v, F n p v • ψ v) (fun p => ∫ v, f p v • ψ v) atTop S := by + let K := closedBall (0:Vec) P + have hK : IsCompact K := isCompact_closedBall _ _ + have hkiF (n : ℕ) (p : X) (hp : p∈S) : HasCompactSupport (F n p) := + compactSupport_of_zero_off hK (fun v hv => hSF n p hp v (by simpa only [K,mem_closedBall_zero_iff,not_le] using hv)) + have hkif (p : X) (hp : p∈S) : HasCompactSupport (f p) := + compactSupport_of_zero_off hK (fun v hv => hSf p hp v (by simpa only [K,mem_closedBall_zero_iff,not_le] using hv)) + have hiF (n : ℕ) (p : X) (hp : p∈S) : Integrable (fun v => F n p v • ψ v) := + ((hF n p hp).smul hψ).integrable_of_hasCompactSupport (hkiF n p hp).smul_right + have hif (p : X) (hp : p∈S) : Integrable (fun v => f p v • ψ v) := + ((hf p hp).smul hψ).integrable_of_hasCompactSupport (hkif p hp).smul_right + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + let δ := ε/(volume.real K+1) + have hδ : 0<δ := by dsimp [δ]; positivity + filter_upwards [Metric.tendstoUniformlyOn_iff.mp hlim δ hδ] with n hn p hp + rw [dist_eq_norm,← integral_sub (hif p hp) (hiF n p hp)] + have he : (∫ v in K, f p v • ψ v-F n p v • ψ v)=∫ v, f p v • ψ v-F n p v • ψ v := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + have hv' : P<‖v‖ := by simpa only [K,mem_closedBall_zero_iff,not_le] using hv + simp [hSf p hp v hv',hSF n p hp v hv'] + rw [← he] + have hb : ∀ v∈K, ‖f p v • ψ v-F n p v • ψ v‖≤δ := by + intro v hv + have hh := hn (p,v) hp + rw [dist_eq_norm,Real.norm_eq_abs] at hh + rw [← sub_smul,norm_smul,Real.norm_eq_abs] + exact (mul_le_mul hh.le (hbψ v) (norm_nonneg _) hδ.le).trans_eq (mul_one δ) + apply (norm_setIntegral_le_of_norm_le_const hK.measure_lt_top hb).trans_lt + have hd : δ*(volume.real K+1)=ε := by dsimp [δ]; exact div_mul_cancel₀ _ (by positivity) + nlinarith + +lemma continuous_velocity_slice {f : Particle} {T t : ℝ} + (hf : ContinuousOn f {p | p.1∈Icc 0 T}) (ht : t∈Icc 0 T) (x : Vec) : + Continuous (fun v => f (t,x,v)) := by + apply continuousOn_univ.mp + apply hf.comp ((continuous_const.prodMk (continuous_const.prodMk continuous_id)).continuousOn) + exact fun _ _ => ht + +lemma uniform_source_moments {f : ℕ → Particle} {g : Particle} {T A R P : ℝ} + (hf : ∀ n, ContinuousOn (f n) {p | p.1∈Icc 0 T}) + (hg : ContinuousOn g {p | p.1∈Icc 0 T}) + (hbF : ∀ n, LocalParticleBound T A R P (f n)) (hbG : LocalParticleBound T A R P g) + (hl : TendstoUniformlyOn f g atTop {p | p.1∈Icc 0 T}) : + TendstoUniformlyOn (fun n (p : ℝ × Vec) => rho (fun z => f n (p.1,z)) p.2) + (fun p => rho (fun z => g (p.1,z)) p.2) atTop {p | p.1∈Icc 0 T} ∧ + TendstoUniformlyOn (fun n (p : ℝ × Vec) => current (fun z => f n (p.1,z)) p.2) + (fun p => current (fun z => g (p.1,z)) p.2) atTop {p | p.1∈Icc 0 T} := by + have hcF (n : ℕ) (p : ℝ × Vec) (hp : p.1∈Icc 0 T) : Continuous (fun v => f n (p.1,p.2,v)) := + continuous_velocity_slice (hf n) hp p.2 + have hcG (p : ℝ × Vec) (hp : p.1∈Icc 0 T) : Continuous (fun v => g (p.1,p.2,v)) := + continuous_velocity_slice hg hp p.2 + have hsF (n : ℕ) (p : ℝ × Vec) (hp : p.1∈Icc 0 T) (v : Vec) (hv : P<‖v‖) : f n (p.1,p.2,v)=0 := by + by_contra hn + exact (not_le_of_gt hv) ((hbF n p.1 hp p.2 v).2 hn).2 + have hsG (p : ℝ × Vec) (hp : p.1∈Icc 0 T) (v : Vec) (hv : P<‖v‖) : g (p.1,p.2,v)=0 := by + by_contra hn + exact (not_le_of_gt hv) ((hbG p.1 hp p.2 v).2 hn).2 + have hl' := hl.comp (fun p : (ℝ × Vec) × Vec => (p.1.1,p.1.2,p.2)) + have hr := uniform_compact_moment hcF hcG hsF hsG hl' (continuous_const (y:=(1:ℝ))) (fun v => by norm_num) + have hj := uniform_compact_moment hcF hcG hsF hsG hl' (contDiff_velocity (k:=1)).continuous + (fun v => (norm_velocity_lt_one v).le) + constructor + · convert hr using 1; simp only [smul_eq_mul,mul_one,rho]; rfl + · exact hj + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/NormalisedPartialCutoff.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/NormalisedPartialCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..24803a41e6cbaa8f32bd063dfa9c8a435c4d4102 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/NormalisedPartialCutoff.lean @@ -0,0 +1,208 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SelectionWeight +import OAI.Analysis.VlasovMaxwell.Retarded.SourceForceConeKernel +import OAI.Analysis.VlasovMaxwell.Retarded.ConeKernelInterior + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.labelConeKernel_triangle_norm_localBorel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hm : Measurable ((coneKernelInterior T).indicator A)) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + classical + rw [←F.labelConeKernel_interior_indicator zX A, + F.labelConeKernel_triangle_norm_borel hs hT zX hm] + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + congr 1 + apply lintegral_congr + intro v + have hp : ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))∈coneKernelInterior T := + ⟨⟨⟨Ioo_subset_Icc_self ht,⟨hσ.1.le,(hσ.2.trans ht.2).le⟩⟩, + ⟨n.2,mem_univ _⟩⟩,hσ.2⟩ + rw [indicator_of_mem hp] + +def normalisedPartialCutoff (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (H : ConeKernelState→CutoffState) (p : ConeKernelState) : Vec := + fderiv ℝ (stateCutoff T Q) (coneCutoffState α zX p) (H p) • + normalisedPrimitive (p.1.1-p.1.2) (velocity (α zX p.1.1).2) (velocity p.2.2.2) p.2.1 + +lemma PhaseFlowOn.normalisedPartialCutoff_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {H : ConeKernelState→CutoffState} (hH : ContinuousOn H (coneKernelInterior T)) : + ContinuousOn (normalisedPartialCutoff F.flow zX T Q H) (coneKernelInterior T) := by + have hz := F.coneCutoffState_continuousOn zX + have hder : ContinuousOn (fun p=>fderiv ℝ (stateCutoff T Q) (coneCutoffState F.flow zX p)) + (coneKernelInterior T) := by + intro p hp + exact ((contDiffAt_stateCutoff T Q (z:=coneCutoffState F.flow zX p) + (sub_pos.mpr hp.2) (by simpa only [coneCutoffState,mem_sphere,dist_zero_right] using hp.1.2.1)).continuousAt_fderiv + (by simp)).comp_continuousWithinAt (hz p hp) + exact (hder.clm_apply hH).smul ((F.normalised_primitive_continuousOn zX).mono inter_subset_left) + +lemma PhaseFlowOn.partialCutoffLabelCost_eq_normalised {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (H : ConeKernelState→CutoffState) : + partialCutoffLabelCost s F.flow zX T Q (H ∘ labelKernelState F.flow zX T)= + labelConeKernel s F.flow zX T (normalisedPartialCutoff F.flow zX T Q H) := by + classical + funext p + rw [partialCutoffLabelCost,F.actualLabelPrimitive_eq_normalised zX] + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hj : p∈jointBranchDomain F.flow zX T := hp + rw [indicator_of_mem hj] + simp only [labelConeKernel,indicator_of_mem hp] + simp only [normalisedPartialCutoff,coneCutoffState,labelKernelState, + branchCutoffState,Function.comp_apply] + module + · have hj : p∉jointBranchDomain F.flow zX T := hp + simp only [indicator_of_notMem hj,labelConeKernel,indicator_of_notMem hp,zero_smul] + +lemma localBorel_clm_apply {T : ℝ} {A : ConeKernelState→Vec} + (hA : Measurable ((coneKernelInterior T).indicator A)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) : + Measurable ((coneKernelInterior T).indicator (fun p=>W p.1.1 (A p))) := by + classical + have he : (coneKernelInterior T).indicator (fun p=>W p.1.1 (A p))= + fun p=>W p.1.1 ((coneKernelInterior T).indicator A p) := by + funext p + by_cases hp : p∈coneKernelInterior T + · rw [indicator_of_mem hp,indicator_of_mem hp] + · rw [indicator_of_notMem hp,indicator_of_notMem hp,map_zero] + rw [he] + exact (continuous_fst.clm_apply continuous_snd).measurable.comp ((hW.comp measurable_fst.fst).prodMk hA) + +lemma PhaseFlowOn.partialCutoffLabelCost_multiplier_polar {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {H : ConeKernelState→CutoffState} + (hH : ContinuousOn H (coneKernelInterior T)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖W (labelReceiverTime F.flow zX T p) + (partialCutoffLabelCost s F.flow zX T Q (H ∘ labelKernelState F.flow zX T) p)‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖W t (s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + normalisedPartialCutoff F.flow zX T Q H + ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v))))‖ ∂volume ∂sphereMeasure := by + classical + have hh := F.normalisedPartialCutoff_continuousOn zX Q hH + have hm : Measurable ((coneKernelInterior T).indicator + (normalisedPartialCutoff F.flow zX T Q H)) := + hh.measurable_piecewise continuousOn_const (measurableSet_coneKernelInterior T) + have he := F.labelConeKernel_triangle_norm_localBorel hs hT zX (localBorel_clm_apply hm hW) + simpa only [labelConeKernel_receiver_multiplier,F.partialCutoffLabelCost_eq_normalised zX Q H,map_smul] using he + +lemma product_le_min_scale {P p w : ℝ} (hp : 0≤p) (hw : 0≤w) + (hpP : p≤P) (hwP : w≤P) : w*p≤P*min p w := by + rcases le_total p w with h|h + · rw [min_eq_left h] + exact mul_le_mul_of_nonneg_right hwP hp + · rw [min_eq_right h] + calc w*p≤w*P := mul_le_mul_of_nonneg_left hpP hw + _ = P*w := by ring + +lemma sqrt_div_stabilityLength {P C M A p w φ I : ℝ} + (hP : 0≤P) (hC : 0≤C) (hM : 0≤M) (hp : 0≤p) (hw : 0≤w) + (hφ : 0≤φ) (hI : 0≤I) : + Real.sqrt (I/stabilityLength P C M A p w φ)= + Real.sqrt I*stabilityRate P C M A p w φ := by + rw [div_stabilityLength,Real.sqrt_mul hI,Real.sqrt_sq] + unfold stabilityRate + positivity + +lemma direction_baseline_R_bound {P C M A p w φ : ℝ} + (hP : 0 ∫ s in a..b, F (x,s)) + (∫ s in a..b, (fderiv ℝ F (p,s)).comp (ContinuousLinearMap.inl ℝ H ℝ)) p := by + let D : H × ℝ → H →L[ℝ] W := fun z => + (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ H ℝ) + have hD : Continuous D := (hF.continuous_fderiv (by simp)).clm_comp continuous_const + obtain ⟨C,hC⟩ := ((isCompact_closedBall p 1).prod isCompact_uIcc).image hD |>.isBounded |>.exists_norm_le + apply hasFDerivAt_integral_of_dominated_of_fderiv_le'' + (s:=closedBall p 1) (bound:=fun _ => C) (F':=fun x s => D (x,s)) + (closedBall_mem_nhds p (by norm_num)) + · exact Eventually.of_forall (fun x => (hF.continuous.comp + (continuous_const.prodMk continuous_id)).aestronglyMeasurable) + · exact (hF.continuous.comp (continuous_const.prodMk continuous_id)).intervalIntegrable a b + · exact (hD.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable + · filter_upwards [ae_restrict_mem measurableSet_uIoc] with s hs + intro x hx + exact hC _ ⟨(x,s),⟨hx,uIoc_subset_uIcc hs⟩,rfl⟩ + · exact intervalIntegrable_const + · exact ae_of_all _ (fun s x _ => (hF.differentiable (by simp) (x,s)).hasFDerivAt.comp x + (by convert (hasFDerivAt_id x).prodMk (hasFDerivAt_const s x) using 1 <;> rfl)) + +lemma contDiff_intervalIntegral_nat + {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + (k : ℕ) : ∀ {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × ℝ → W}, ContDiff ℝ ∞ F → ∀ a b, + ContDiff ℝ k (fun x => ∫ s in a..b, F (x,s)) := by + induction k with + | zero => + intro W _ _ _ F hF a b + have hd : Differentiable ℝ (fun x => ∫ s in a..b, F (x,s)) := + fun x => (hasFDerivAt_intervalIntegral (hF.of_le (by simp)) a b x).differentiableAt + exact contDiff_zero.mpr hd.continuous + | succ k ih => + intro W _ _ _ F hF a b + let D : H × ℝ → H →L[ℝ] W := fun z => + (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ H ℝ) + have hD : ContDiff ℝ ∞ D := + (contDiff_infty_iff_fderiv.mp hF).2.clm_comp contDiff_const + have he : fderiv ℝ (fun x => ∫ s in a..b, F (x,s)) = + (fun x => ∫ s in a..b, D (x,s)) := by + funext x + exact (hasFDerivAt_intervalIntegral (hF.of_le (by simp)) a b x).fderiv + rw [show (↑(k+1) : ℕ∞ω) = ↑k+1 by simp,contDiff_succ_iff_fderiv] + refine ⟨fun x => (hasFDerivAt_intervalIntegral (hF.of_le (by simp)) a b x).differentiableAt,?_,?_⟩ + · simp + · rw [he] + exact ih hD a b + +lemma contDiff_intervalIntegral + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × ℝ → W} (hF : ContDiff ℝ ∞ F) (a b : ℝ) : + ContDiff ℝ ∞ (fun x => ∫ s in a..b, F (x,s)) := by + rw [contDiff_infty] + intro k + exact contDiff_intervalIntegral_nat k hF a b + +def paramPrimitive {H W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (F : H × ℝ → W) (p : ℝ × H) : W := ∫ s in 0..p.1, F (p.2,s) + +lemma paramPrimitive_scale {H W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + (F : H × ℝ → W) (p : ℝ × H) : + paramPrimitive F p = p.1 • ∫ u in (0:ℝ)..1, F (p.2,p.1*u) := by + simpa [paramPrimitive] using (intervalIntegral.smul_integral_comp_mul_left (fun s => F (p.2,s)) p.1 + (a:=0) (b:=1)).symm + +lemma contDiff_paramPrimitive + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × ℝ → W} (hF : ContDiff ℝ ∞ F) : ContDiff ℝ ∞ (paramPrimitive F) := by + have he : paramPrimitive F = fun p => p.1 • ∫ u in (0:ℝ)..1, F (p.2,p.1*u) := + funext (paramPrimitive_scale F) + rw [he] + apply contDiff_fst.smul + apply contDiff_intervalIntegral (F:=fun z : (ℝ × H) × ℝ => F (z.1.2,z.1.1*z.2)) + exact hF.comp ((contDiff_snd.comp contDiff_fst).prodMk + ((contDiff_fst.comp contDiff_fst).mul contDiff_snd)) + +lemma paramPrimitive_fderiv_apply + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × ℝ → W} (hF : ContDiff ℝ ∞ F) (t : ℝ) (p : H) (dt : ℝ) (dp : H) : + fderiv ℝ (paramPrimitive F) (t,p) (dt,dp) = + dt • F (p,t) + (∫ s in 0..t, (fderiv ℝ F (p,s)).comp + (ContinuousLinearMap.inl ℝ H ℝ)) dp := by + have hJ : Differentiable ℝ (paramPrimitive F) := (contDiff_paramPrimitive hF).differentiable (by simp) + have htime := (hJ (t,p)).hasFDerivAt.comp t + ((hasFDerivAt_id (𝕜:=ℝ) t).prodMk (hasFDerivAt_const (𝕜:=ℝ) p t)) + have hc : Continuous (fun s => F (p,s)) := hF.continuous.comp (continuous_const.prodMk continuous_id) + have hFTC := intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 t) + hc.stronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt + have ht : fderiv ℝ (paramPrimitive F) (t,p) (1,0) = F (p,t) := by + exact htime.hasDerivAt.unique hFTC + have hparam := (hJ (t,p)).hasFDerivAt.comp p + ((hasFDerivAt_const (𝕜:=ℝ) t p).prodMk (hasFDerivAt_id (𝕜:=ℝ) p)) + have hp := hparam.unique (hasFDerivAt_intervalIntegral (hF.of_le (by simp)) 0 t p) + have hp' := congrArg (fun L : H →L[ℝ] W => L dp) hp + change fderiv ℝ (paramPrimitive F) (t,p) (0,dp) = _ at hp' + rw [show (dt,dp) = dt • (1,0) + (0,dp) by simp,map_add,map_smul,ht,hp'] + +def dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] (F : H → W) (e x : H) : W := + fderiv ℝ F x e + +lemma contDiff_dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : H → W} + (hF : ContDiff ℝ ∞ F) (e : H) : ContDiff ℝ ∞ (dirD F e) := + (contDiff_infty_iff_fderiv.mp hF).2.clm_apply contDiff_const + +lemma dirD_dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : H → W} + (hF : ContDiff ℝ ∞ F) (e v x : H) : + dirD (dirD F e) v x = fderiv ℝ (fderiv ℝ F) x v e := by + unfold dirD + rw [fderiv_clm_apply ((contDiff_infty_iff_fderiv.mp hF).2.differentiable (by simp) x) + (differentiableAt_const e)] + simp + +lemma dirD_comm {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : H → W} + (hF : ContDiff ℝ ∞ F) (e v x : H) : + dirD (dirD F e) v x = dirD (dirD F v) e x := by + rw [dirD_dirD hF,dirD_dirD hF] + exact (hF.contDiffAt.isSymmSndFDerivAt (by simp)).eq v e + +lemma dirD_clm_comp {G H W : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + [NormedAddCommGroup H] [NormedSpace ℝ H] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : H → W} (hF : Differentiable ℝ F) (L : G →L[ℝ] H) (e x : G) : + dirD (fun y => F (L y)) e x = dirD F (L e) (L x) := by + unfold dirD + have h := (hF (L x)).hasFDerivAt.comp x L.hasFDerivAt + change HasFDerivAt (fun y => F (L y)) _ x at h + rw [h.fderiv] + rfl + +lemma deriv_slice_eq_dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : ℝ × H → W} + (hF : Differentiable ℝ F) (t : ℝ) (x : H) : + deriv (fun r => F (r,x)) t = dirD F (1,0) (t,x) := by + exact ((hF (t,x)).hasFDerivAt.comp t + ((hasFDerivAt_id (𝕜:=ℝ) t).prodMk (hasFDerivAt_const (𝕜:=ℝ) x t))).hasDerivAt.deriv + +lemma deriv_deriv_slice_eq_dirD {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : ℝ × H → W} + (hF : ContDiff ℝ ∞ F) (t : ℝ) (x : H) : + deriv (deriv (fun r => F (r,x))) t = dirD (dirD F (1,0)) (1,0) (t,x) := by + have he : deriv (fun r => F (r,x)) = fun r => dirD F (1,0) (r,x) := by + funext r + exact deriv_slice_eq_dirD (hF.differentiable (by simp)) r x + rw [he] + exact deriv_slice_eq_dirD ((contDiff_dirD hF (1,0)).differentiable (by simp)) t x + +lemma dirD_prod_left {H G W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup G] [NormedSpace ℝ G] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : H × G → W} (hF : Differentiable ℝ F) (e x : H) (y : G) : + dirD (fun z => F (z,y)) e x = dirD F (e,0) (x,y) := by + have h := (hF (x,y)).hasFDerivAt.comp x + ((hasFDerivAt_id (𝕜:=ℝ) x).prodMk (hasFDerivAt_const (𝕜:=ℝ) y x)) + change HasFDerivAt (fun z => F (z,y)) _ x at h + unfold dirD + rw [h.fderiv] + simp + +def volterra {H : Type*} (F : (ℝ × H) × ℝ → ℝ) (p : ℝ × H) : ℝ := + ∫ s in 0..p.1, F (p,s) + +lemma contDiff_volterra {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + {F : (ℝ × H) × ℝ → ℝ} (hF : ContDiff ℝ ∞ F) : ContDiff ℝ ∞ (volterra F) := + (contDiff_paramPrimitive hF).comp (contDiff_fst.prodMk contDiff_id) + +lemma dirD_volterra {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + {F : (ℝ × H) × ℝ → ℝ} (hF : ContDiff ℝ ∞ F) (e p : ℝ × H) : + dirD (volterra F) e p = e.1*F (p,p.1) + volterra (dirD F (e,0)) p := by + have h := ((contDiff_paramPrimitive hF).differentiable (by simp) (p.1,p)).hasFDerivAt.comp (f:=fun z : ℝ × H => (z.1,z)) p + (((hasFDerivAt_id (𝕜:=ℝ) p).fst).prodMk (hasFDerivAt_id (𝕜:=ℝ) p)) + change HasFDerivAt (volterra F) _ p at h + unfold dirD + rw [h.fderiv] + change fderiv ℝ (paramPrimitive F) (p.1,p) (e.1,e) = _ + rw [paramPrimitive_fderiv_apply hF] + congr 1 + have hc : Continuous (fun s => (fderiv ℝ F (p,s)).comp + (ContinuousLinearMap.inl ℝ (ℝ × H) ℝ)) := + ((hF.continuous_fderiv (by simp)).comp (continuous_const.prodMk continuous_id)).clm_comp continuous_const + rw [ContinuousLinearMap.intervalIntegral_apply (hc.intervalIntegrable 0 p.1)] + rfl + +lemma spatialPartial_eq_dirD (g : Vec → ℝ) (x : Vec) (i : Fin 3) : + spatialPartial g x i = dirD g (basis i) x := rfl + +lemma laplace_slice_eq_dirD {F : ℝ × Vec → ℝ} (hF : ContDiff ℝ ∞ F) (t : ℝ) (x : Vec) : + laplace (fun y => F (t,y)) x = + ∑ i : Fin 3, dirD (dirD F (0,basis i)) (0,basis i) (t,x) := by + rw [laplace_eq_sum] + apply Finset.sum_congr rfl + intro i _ + have he : (fun y => spatialPartial (fun z => F (t,z)) y i) = + fun y => dirD F (0,basis i) (t,y) := by + funext y + exact spatialPartial_time_slice (hF.differentiable (by simp) (t,y)) i + rw [he] + exact spatialPartial_time_slice ((contDiff_dirD hF (0,basis i)).differentiable (by simp) (t,x)) i + +lemma laplace_volterra {F : (ℝ × Vec) × ℝ → ℝ} (hF : ContDiff ℝ ∞ F) (t : ℝ) (x : Vec) : + laplace (fun y => volterra F (t,y)) x = + ∫ s in 0..t, laplace (fun y => F ((t,y),s)) x := by + rw [laplace_slice_eq_dirD (contDiff_volterra hF)] + have he (i : Fin 3) : dirD (volterra F) (0,basis i) = + volterra (dirD F ((0,basis i),0)) := by + funext p + simpa only [zero_mul,zero_add] using dirD_volterra hF (0,basis i) p + simp_rw [he] + have he' (i : Fin 3) : dirD (volterra (dirD F ((0,basis i),0))) (0,basis i) (t,x) = + volterra (dirD (dirD F ((0,basis i),0)) ((0,basis i),0)) (t,x) := by + simpa only [zero_mul,zero_add] using + dirD_volterra (contDiff_dirD hF ((0,basis i),0)) (0,basis i) (t,x) + simp_rw [he'] + have hc (i : Fin 3) : Continuous (fun s => dirD (dirD F ((0,basis i),0)) + ((0,basis i),0) ((t,x),s)) := + (contDiff_dirD (contDiff_dirD hF _) _).continuous.comp (continuous_const.prodMk continuous_id) + rw [show (∑ i : Fin 3, volterra (dirD (dirD F ((0,basis i),0)) ((0,basis i),0)) (t,x)) = + ∫ s in 0..t, ∑ i : Fin 3, dirD (dirD F ((0,basis i),0)) ((0,basis i),0) ((t,x),s) by + exact (intervalIntegral.integral_finsetSum (fun i _ => (hc i).intervalIntegrable 0 t)).symm] + apply intervalIntegral.integral_congr + intro s _ + have hFs : ContDiff ℝ ∞ (fun p => F (p,s)) := hF.comp (contDiff_id.prodMk contDiff_const) + change _ = laplace (fun y => F ((t,y),s)) x + rw [laplace_slice_eq_dirD hFs] + apply Finset.sum_congr rfl + intro i _ + have hf := hF.differentiable (by simp) + have hdir : dirD (fun z => F (z,s)) (0,basis i) = + fun p => dirD F ((0,basis i),0) (p,s) := by + funext p + exact dirD_prod_left hf _ p s + rw [hdir,dirD_prod_left ((contDiff_dirD hF _).differentiable (by simp))] + +def sourceWaveKernel (ρ : ℝ × Vec → ℝ) (z : (ℝ × Vec) × ℝ) : ℝ := + waveK (fun y => ρ (z.2,y)) (z.1.1-z.2,z.1.2) + +def sourceWave (ρ : ℝ × Vec → ℝ) : ℝ × Vec → ℝ := volterra (sourceWaveKernel ρ) + +lemma contDiff_sourceWaveKernel {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) : + ContDiff ℝ ∞ (sourceWaveKernel ρ) := by + have hF : ContDiff ℝ ∞ (fun z : ((ℝ × Vec) × ℝ) × Vec => + ρ (z.1.2,z.1.1.2+(z.1.1.1-z.1.2) • z.2)) := by + apply hρ.comp + apply (contDiff_snd.comp contDiff_fst).prodMk + apply (contDiff_snd.comp (contDiff_fst.comp contDiff_fst)).add + exact ((contDiff_fst.comp (contDiff_fst.comp contDiff_fst)).sub + (contDiff_snd.comp contDiff_fst)).smul contDiff_snd + exact contDiff_const.mul (((contDiff_fst.comp contDiff_fst).sub contDiff_snd).mul + (contDiff_integral_sphere hF)) + +lemma contDiff_sourceWave {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) : + ContDiff ℝ ∞ (sourceWave ρ) := contDiff_volterra (contDiff_sourceWaveKernel hρ) + +lemma sourceWaveKernel_boundary (ρ : ℝ × Vec → ℝ) (p : ℝ × Vec) : + sourceWaveKernel ρ (p,p.1) = 0 := by + simp [sourceWaveKernel,waveK] + +lemma sourceWave_timeDerivative {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) : + dirD (sourceWave ρ) (1,0) = volterra (dirD (sourceWaveKernel ρ) ((1,0),0)) := by + funext p + simpa only [sourceWave,one_mul,sourceWaveKernel_boundary,zero_add] using + dirD_volterra (contDiff_sourceWaveKernel hρ) (1,0) p + +lemma sourceWaveKernel_timeDerivative {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (t s : ℝ) (x : Vec) : + dirD (sourceWaveKernel ρ) ((1,0),0) ((t,x),s) = + deriv (fun r => waveK (fun y => ρ (s,y)) (r,x)) (t-s) := by + have hK := contDiff_sourceWaveKernel hρ + rw [← dirD_prod_left (hK.differentiable (by simp)) (1,0) (t,x) s] + have hs : ContDiff ℝ ∞ (fun p => sourceWaveKernel ρ (p,s)) := + hK.comp (contDiff_id.prodMk contDiff_const) + rw [← deriv_slice_eq_dirD (hs.differentiable (by simp))] + change deriv (fun r => waveK (fun y => ρ (s,y)) (r-s,x)) t = _ + exact deriv_comp_sub_const (fun r => waveK (fun y => ρ (s,y)) (r,x)) s t + +lemma sourceWaveKernel_secondTime {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (t s : ℝ) (x : Vec) : + dirD (dirD (sourceWaveKernel ρ) ((1,0),0)) ((1,0),0) ((t,x),s) = + deriv (deriv (fun r => waveK (fun y => ρ (s,y)) (r,x))) (t-s) := by + have hK := contDiff_dirD (contDiff_sourceWaveKernel hρ) ((1,0),0) + rw [← dirD_prod_left (hK.differentiable (by simp)) (1,0) (t,x) s] + have hs : ContDiff ℝ ∞ (fun p => dirD (sourceWaveKernel ρ) ((1,0),0) (p,s)) := + hK.comp (contDiff_id.prodMk contDiff_const) + rw [← deriv_slice_eq_dirD (hs.differentiable (by simp))] + have he : (fun r => dirD (sourceWaveKernel ρ) ((1,0),0) ((r,x),s)) = + fun r => deriv (fun u => waveK (fun y => ρ (s,y)) (u,x)) (r-s) := by + funext r + exact sourceWaveKernel_timeDerivative hρ r s x + rw [he,deriv_comp_sub_const] + +lemma sourceWave_initial_value (ρ : ℝ × Vec → ℝ) (x : Vec) : + sourceWave ρ (0,x) = 0 := by simp [sourceWave,volterra] + +lemma sourceWave_initial_velocity {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) (x : Vec) : + deriv (fun t => sourceWave ρ (t,x)) 0 = 0 := by + rw [deriv_slice_eq_dirD ((contDiff_sourceWave hρ).differentiable (by simp)),sourceWave_timeDerivative hρ] + simp [volterra] + +lemma sourceWave_equation {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) (x : Vec) + {t : ℝ} (ht : 0≤t) : + deriv (deriv (fun r => sourceWave ρ (r,x))) t = + laplace (fun y => sourceWave ρ (t,y)) x + ρ (t,x) := by + rw [deriv_deriv_slice_eq_dirD (contDiff_sourceWave hρ),sourceWave_timeDerivative hρ, + dirD_volterra (contDiff_dirD (contDiff_sourceWaveKernel hρ) ((1,0),0)),one_mul, + sourceWaveKernel_timeDerivative hρ t t x,sub_self] + have hρt : ContDiff ℝ ∞ (fun y => ρ (t,y)) := hρ.comp (contDiff_const.prodMk contDiff_id) + rw [waveK_initial_velocity hρt] + change _ = laplace (fun y => volterra (sourceWaveKernel ρ) (t,y)) x + _ + rw [laplace_volterra (contDiff_sourceWaveKernel hρ),add_comm] + congr 1 + apply intervalIntegral.integral_congr + intro s hs + have hst : s≤t := (by simpa only [uIcc_of_le ht] using hs : s ∈ Icc 0 t).2 + dsimp only + rw [sourceWaveKernel_secondTime hρ] + have hρs : ContDiff ℝ ∞ (fun y => ρ (s,y)) := hρ.comp (contDiff_const.prodMk contDiff_id) + exact waveK_equation hρs x (sub_nonneg.mpr hst) + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + + +lemma contDiff_component {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {F : H → Vec} (hF : ContDiff ℝ ∞ F) (i : Fin 3) : ContDiff ℝ ∞ (fun x => F x i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp hF + +lemma contDiff_divergence {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (divergence F) := by + exact ContDiff.sum (fun i _ => contDiff_spatialPartial (contDiff_component hF i) i) + +lemma contDiff_curl {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) : ContDiff ℝ ∞ (curl F) := by + apply contDiff_euclidean.mpr + intro i + fin_cases i <;> exact (contDiff_spatialPartial (contDiff_component hF _) _).sub + (contDiff_spatialPartial (contDiff_component hF _) _) + +lemma spatialPartial_sum {ι : Type*} (s : Finset ι) {f : ι → Vec → ℝ} + (hf : ∀ i ∈ s, Differentiable ℝ (f i)) (x : Vec) (j : Fin 3) : + spatialPartial (fun y => ∑ i ∈ s, f i y) x j = ∑ i ∈ s, spatialPartial (f i) x j := by + unfold spatialPartial + rw [fderiv_fun_sum (fun i hi => hf i hi x)] + simp + +lemma spatialPartial_comm {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) (i j : Fin 3) : + spatialPartial (fun y => spatialPartial g y i) x j = + spatialPartial (fun y => spatialPartial g y j) x i := + dirD_comm hg (basis i) (basis j) x + +lemma divergence_curl {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) (x : Vec) : + divergence (curl F) x = 0 := by + have hc (i j : Fin 3) : DifferentiableAt ℝ (fun y => spatialPartial (fun z => F z i) y j) x := + (contDiff_spatialPartial (contDiff_component hF i) j).differentiable (by simp) x + simp only [divergence,Fin.sum_univ_succ] + change spatialPartial (fun y => spatialPartial (fun z => F z 2) y 1-spatialPartial (fun z => F z 1) y 2) x 0 + + (spatialPartial (fun y => spatialPartial (fun z => F z 0) y 2-spatialPartial (fun z => F z 2) y 0) x 1 + + (spatialPartial (fun y => spatialPartial (fun z => F z 1) y 0-spatialPartial (fun z => F z 0) y 1) x 2+0)) = _ + simp only [spatialPartial_sub (hc _ _) (hc _ _)] + rw [spatialPartial_comm (contDiff_component hF 2) x 1 0, + spatialPartial_comm (contDiff_component hF 1) x 2 0, + spatialPartial_comm (contDiff_component hF 0) x 2 1] + ring + +lemma curl_gradient {g : Vec → ℝ} (hg : ContDiff ℝ ∞ g) (x : Vec) : + curl (gradient g) x = 0 := by + ext i + fin_cases i <;> simp [curl, gradient_apply] + · exact sub_eq_zero.mpr (spatialPartial_comm hg x 2 1) + · exact sub_eq_zero.mpr (spatialPartial_comm hg x 0 2) + · exact sub_eq_zero.mpr (spatialPartial_comm hg x 1 0) + +lemma curl_curl_component {F : Vec → Vec} (hF : ContDiff ℝ ∞ F) (x : Vec) (i : Fin 3) : + curl (curl F) x i = spatialPartial (divergence F) x i-laplace (fun y => F y i) x := by + have hc (i j : Fin 3) : DifferentiableAt ℝ (fun y => spatialPartial (fun z => F z i) y j) x := + (contDiff_spatialPartial (contDiff_component hF i) j).differentiable (by simp) x + have hsum : spatialPartial (divergence F) x i = + ∑ j : Fin 3, spatialPartial (fun y => spatialPartial (fun z => F z j) y j) x i := by + apply spatialPartial_sum + intro j _ + exact (contDiff_spatialPartial (contDiff_component hF j) j).differentiable (by simp) + rw [hsum,laplace_eq_sum] + fin_cases i <;> simp [curl, Fin.sum_univ_succ] + all_goals simp only [spatialPartial_sub (hc _ _) (hc _ _)] + · rw [spatialPartial_comm (contDiff_component hF 1) x 0 1, + spatialPartial_comm (contDiff_component hF 2) x 0 2] + ring + · rw [spatialPartial_comm (contDiff_component hF 2) x 1 2, + spatialPartial_comm (contDiff_component hF 0) x 1 0] + ring + · rw [spatialPartial_comm (contDiff_component hF 0) x 2 0, + spatialPartial_comm (contDiff_component hF 1) x 2 1] + ring +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace + + +lemma deriv_moving_local_energy {e : ℝ × Vec → ℝ} {S : ℝ × Vec → Vec} + {U : Set ℝ} (hU : IsOpen U) + (he : ContDiffOn ℝ 1 e (U ×ˢ (univ : Set Vec))) + (hSg : ContDiffOn ℝ 1 S (U ×ˢ (univ : Set Vec))) + (hcons : ∀ t ∈ U, ∀ x, deriv (fun r => e (r,x)) t + divergence (fun y => S (t,y)) x = 0) + {g : ℝ × Vec → ℝ} {K : Set Vec} (hK : IsCompact K) + (hg : ContDiffOn ℝ 1 g (U ×ˢ (univ : Set Vec))) + (hz : ∀ r ∈ U, ∀ x ∉ K, g (r,x)=0) + {t : ℝ} (ht : t ∈ U) : + HasDerivAt (fun r => ∫ x : Vec, g (r,x) * e (r,x)) + (∫ x : Vec, fderiv ℝ g (t,x) (1,0) * e (t,x) + + fderiv ℝ g (t,x) (0,S (t,x))) t := by + have hE := he + have hF : ContDiffOn ℝ 1 (fun p => g p * e p) + (U ×ˢ (univ : Set Vec)) := hg.mul hE + have hzF : ∀ r ∈ U, ∀ x ∉ K, g (r,x)*e (r,x)=0 := by + intro r hr x hx + rw [hz r hr x hx,zero_mul] + have hd := hasFDerivAt_integral_uniform_support hU hK ht hF hzF + have hi := fderiv_integral_uniform_support_apply hU hK ht hF hzF (1:ℝ) + have hgg : ContDiff ℝ 1 (fun x => g (t,x)) := by + apply ContDiffOn.comp_contDiff hg (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hS : ContDiff ℝ 1 (fun x => S (t,x)) := by + apply ContDiffOn.comp_contDiff hSg + (contDiff_const.prodMk contDiff_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hEc : Continuous (fun x => e (t,x)) := by + apply hE.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hgD : Continuous (fun x => fderiv ℝ g (t,x)) := by + apply (hg.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) (by simp)).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hDc : HasCompactSupport (fun x => fderiv ℝ g (t,x)) := + compactSupport_param_fderiv hU hK ht hz + have hgC : HasCompactSupport (fun x => g (t,x)) := + compactSupport_of_zero_off hK (hz t ht) + have hgDapply (v : ℝ × Vec) : HasCompactSupport (fun x => fderiv ℝ g (t,x) v) := by + apply compactSupport_of_zero_off hDc + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply] + have hIt : Integrable (fun x => fderiv ℝ g (t,x) (1,0) * e (t,x)) := + ((hgD.clm_apply continuous_const).mul hEc).integrable_of_hasCompactSupport + (hgDapply (1,0)).mul_right + have hIa : Integrable (fun x => g (t,x) * divergence (fun y => S (t,y)) x) := + (hgg.continuous.mul (continuous_divergence hS)).integrable_of_hasCompactSupport hgC.mul_right + have hIs : Integrable (fun x => fderiv ℝ (fun y => g (t,y)) x (S (t,x))) := + ((hgg.continuous_fderiv (by simp)).clm_apply hS.continuous).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hgC.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_apply])) + have heq : ∀ x : Vec, + fderiv ℝ (fun p => g p * e p) (t,x) (1,0) = + fderiv ℝ g (t,x) (1,0) * e (t,x) - + g (t,x) * divergence (fun y => S (t,y)) x := by + intro x + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hg' := (hg.contDiffAt hn).differentiableAt (by simp) + have hE' := (hE.contDiffAt hn).differentiableAt (by simp) + change fderiv ℝ (g * e) (t,x) (1,0) = _ + rw [fderiv_mul hg' hE',add_apply, + smul_apply,smul_apply, + smul_eq_mul,smul_eq_mul,← deriv_time_slice hE'] + have hl := hcons t ht x + rw [show deriv (fun r => e (r,x)) t = + -divergence (fun y => S (t,y)) x by linarith] + ring + have hxder (x v : Vec) : fderiv ℝ (fun y => g (t,y)) x v = fderiv ℝ g (t,x) (0,v) := by + have hn : U ×ˢ (univ : Set Vec) ∈ 𝓝 (t,x) := + (hU.prod isOpen_univ).mem_nhds ⟨ht,mem_univ x⟩ + have hh := ((hg.contDiffAt hn).differentiableAt (by simp)).hasFDerivAt.comp x + ((hasFDerivAt_const t x).prodMk (hasFDerivAt_id x)) + change HasFDerivAt (fun y => g (t,y)) _ x at hh + rw [hh.fderiv] + simp + have hh : deriv (fun r => ∫ x : Vec, g (r,x) * e (r,x)) t = + ∫ x : Vec, fderiv ℝ g (t,x) (1,0) * e (t,x) + + fderiv ℝ g (t,x) (0,S (t,x)) := by + change fderiv ℝ (fun r => ∫ x : Vec, g (r,x) * e (r,x)) t 1 = _ + rw [hi] + simp only [heq] + rw [integral_sub hIt hIa,integral_mul_divergence hS hgg hgC,sub_neg_eq_add] + simp_rw [← hxder] + exact (integral_add hIt hIs).symm + exact hh ▸ hd.differentiableAt.hasDerivAt +lemma cone_energy_integrand_nonpos {R ε t : ℝ} {e : ℝ} {S : Vec} + (hε : 0 < ε) (ht : t ≤ R) (he : 0 ≤ e) (hS : ‖S‖ ≤ e) (x x₀ : Vec) : + fderiv ℝ (coneCutoff R ε x₀) (t,x) (1,0) * e + + fderiv ℝ (coneCutoff R ε x₀) (t,x) (0,S) ≤ 0 := by + rw [coneCutoff_fderiv,coneCutoff_fderiv] + simp only [inner_zero_right,mul_zero,mul_one,sub_zero,zero_sub] + have heq : deriv Real.smoothTransition (coneArgument R ε x₀ (t,x)) * + ((-2*(R-t))/ε) * e + deriv Real.smoothTransition (coneArgument R ε x₀ (t,x)) * + (-(2*⟪x-x₀,S⟫)/ε) = + -((2/ε)*deriv Real.smoothTransition (coneArgument R ε x₀ (t,x)) * + ((R-t)*e+⟪x-x₀,S⟫)) := by ring + rw [heq] + apply neg_nonpos.mpr + by_cases hr : ‖x-x₀‖ ≤ R-t + · apply mul_nonneg (mul_nonneg (by positivity) (deriv_transition_nonneg _)) + have hc := real_inner_le_norm (-(x-x₀)) S + simp only [inner_neg_left,norm_neg] at hc + nlinarith [mul_le_mul_of_nonneg_left hS (norm_nonneg (x-x₀)), + mul_le_mul_of_nonneg_right hr he] + · have hn : coneArgument R ε x₀ (t,x) < 0 := by + dsimp [coneArgument] + apply div_neg_of_neg_of_pos _ hε + have hR : 0 ≤ R-t := sub_nonneg.mpr ht + push Not at hr + nlinarith [sq_lt_sq₀ hR (norm_nonneg (x-x₀)) |>.mpr hr] + simp [deriv_transition_zero_neg hn] + +lemma causal_local_energy_vanishes {e : ℝ × Vec → ℝ} {S : ℝ × Vec → Vec} {T : ℝ} + (hT : 0 ≤ T) + (he : ContDiffOn ℝ 1 e (Ioi 0 ×ˢ (univ : Set Vec))) + (hS : ContDiffOn ℝ 1 S (Ioi 0 ×ˢ (univ : Set Vec))) + (hec : ContinuousOn e (Icc 0 T ×ˢ (univ : Set Vec))) + (he0 : ∀ t ∈ Icc 0 T, ∀ x, 0 ≤ e (t,x)) + (hflux : ∀ t ∈ Ioo 0 T, ∀ x, ‖S (t,x)‖ ≤ e (t,x)) + (hcons : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => e (r,x)) t + divergence (fun y => S (t,y)) x = 0) + (hinit : ∀ x, e (0,x)=0) (x₀ : Vec) : e (T,x₀)=0 := by + let R := T+1 + let g := coneCutoff R 1 x₀ + let G : ℝ → ℝ := fun t => ∫ x : Vec, g (t,x)*e (t,x) + have hsub : Icc (0:ℝ) T ⊆ Icc 0 R := by intro t ht; exact ⟨ht.1,by dsimp [R]; linarith [ht.2]⟩ + have hgc : ContDiff ℝ 1 g := contDiff_coneCutoff R 1 x₀ + have hgz : ∀ t ∈ Icc 0 T, ∀ x ∉ closedBall x₀ R, g (t,x)=0 := by + intro t ht x hx + exact coneCutoff_zero_outside (by norm_num) (hsub ht) hx + have hGc : ContinuousOn G (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ R) + (hgc.continuous.continuousOn.mul hec) + intro t ht x hx + change g (t,x)*e (t,x)=0 + rw [hgz t ht x hx,zero_mul] + have hder (t : ℝ) (ht : t ∈ Ioo 0 T) := + deriv_moving_local_energy isOpen_Ioo + (he.mono (by intro p hp; exact ⟨hp.1.1,hp.2⟩)) + (hS.mono (by intro p hp; exact ⟨hp.1.1,hp.2⟩)) hcons + (isCompact_closedBall x₀ R) hgc.contDiffOn + (fun r hr x hx => hgz r ⟨hr.1.le,hr.2.le⟩ x hx) ht + have hanti : AntitoneOn G (Icc 0 T) := by + apply antitoneOn_of_deriv_nonpos (convex_Icc 0 T) hGc + · intro t ht + rw [interior_Icc] at ht + exact (hder t ht).differentiableAt.differentiableWithinAt + · intro t ht + rw [interior_Icc] at ht + rw [(hder t ht).deriv] + apply integral_nonpos + intro x + exact cone_energy_integrand_nonpos (by norm_num) (hsub ⟨ht.1.le,ht.2.le⟩).2 + (he0 t ⟨ht.1.le,ht.2.le⟩ x) (hflux t ht x) x x₀ + have hG0 : G 0 = 0 := by simp [G,hinit] + have hGn : ∀ x, 0 ≤ g (T,x)*e (T,x) := fun x => + mul_nonneg (Real.smoothTransition.nonneg _) (he0 T ⟨hT,le_rfl⟩ x) + have hGT : G T = 0 := le_antisymm + (by simpa only [hG0] using hanti ⟨le_rfl,hT⟩ ⟨hT,le_rfl⟩ hT) + (integral_nonneg hGn) + have hTc : Continuous (fun x => g (T,x)*e (T,x)) := + (hgc.continuous.comp (continuous_const.prodMk continuous_id)).mul + (hec.comp_continuous (continuous_const.prodMk continuous_id) + (fun x => ⟨⟨hT,le_rfl⟩,mem_univ x⟩)) + have hI : Integrable (fun x => g (T,x)*e (T,x)) := + hTc.integrable_of_hasCompactSupport ((compactSupport_of_zero_off (isCompact_closedBall x₀ R) + (hgz T ⟨hT,le_rfl⟩)).mul_right) + have hae := (integral_eq_zero_iff_of_nonneg hGn hI).mp hGT + have hpoint := congrFun (Measure.eq_of_ae_eq (μ:=volume) hae hTc continuous_const) x₀ + have hval : g (T,x₀)=1 := by simp [g,coneCutoff,coneArgument,R] + simpa only [hval,one_mul,Pi.zero_apply] using hpoint + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +section CompactParameter +variable {α : Type*} [TopologicalSpace α] [MeasurableSpace α] [BorelSpace α] + [CompactSpace α] [SecondCountableTopology α] (μ : Measure α) [IsFiniteMeasure μ] + {ι : α → Vec} (hι : Continuous ι) +include hι + +lemma hasFDerivAt_integral_compactParam + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} (hF : ContDiff ℝ 1 F) (p : H) : + HasFDerivAt (fun x => ∫ n : α, F (x,ι n) ∂μ) + (∫ n : α, (fderiv ℝ F (p,ι n)).comp (ContinuousLinearMap.inl ℝ H Vec) + ∂μ) p := by + let D : H × α → H →L[ℝ] W := fun z => + (fderiv ℝ F (z.1,ι z.2)).comp (ContinuousLinearMap.inl ℝ H Vec) + have hD : Continuous D := by + exact ((hF.continuous_fderiv (by simp)).comp + (continuous_fst.prodMk (hι.comp continuous_snd))).clm_comp continuous_const + obtain ⟨C,hC⟩ := ((isCompact_closedBall p 1).prod isCompact_univ).image hD |>.isBounded |>.exists_norm_le + apply hasFDerivAt_integral_of_dominated_of_fderiv_le + (s:=closedBall p 1) (bound:=fun _ => C) (F':=fun x n => D (x,n)) + (closedBall_mem_nhds p (by norm_num)) + · exact Eventually.of_forall (fun x => (hF.continuous.comp + (continuous_const.prodMk hι)).aestronglyMeasurable) + · exact (hF.continuous.comp (continuous_const.prodMk hι)).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + · exact (hD.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable + · exact ae_of_all _ (fun n x hx => hC _ ⟨(x,n),⟨hx,mem_univ n⟩,rfl⟩) + · exact integrable_const _ + · exact ae_of_all _ (fun n x _ => (hF.differentiable (by simp) (x,ι n)).hasFDerivAt.comp x + (by convert (hasFDerivAt_id x).prodMk (hasFDerivAt_const (ι n) x) using 1 <;> rfl)) + +omit [SecondCountableTopology α] in +lemma continuous_integral_compactParam + {H : Type} {W : Type*} [TopologicalSpace H] [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : H × Vec → W} (hF : Continuous F) : + Continuous (fun x => ∫ n : α, F (x,ι n) ∂μ) := by + have hc : Continuous (fun p : H × α => F (p.1,ι p.2)) := + hF.comp (continuous_fst.prodMk (hι.comp continuous_snd)) + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hc.continuousOn + intro x n _ hn + exact (hn (mem_univ n)).elim + +lemma contDiff_integral_compactParam_nat + {H : Type} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + (k : ℕ) : ∀ {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W}, ContDiff ℝ k F → + ContDiff ℝ k (fun x => ∫ n : α, F (x,ι n) ∂μ) := by + induction k with + | zero => + intro W _ _ _ F hF + exact contDiff_zero.mpr (continuous_integral_compactParam μ hι hF.continuous) + | succ k ih => + intro W _ _ _ F hF + have hF1 : ContDiff ℝ 1 F := hF.of_le (by exact_mod_cast Nat.succ_pos k) + let D : H × Vec → H →L[ℝ] W := fun z => + (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ H Vec) + have hD : ContDiff ℝ k D := + ((contDiff_succ_iff_fderiv.mp hF).2.2).clm_comp contDiff_const + have he : fderiv ℝ (fun x => ∫ n : α, F (x,ι n) ∂μ) = + (fun x => ∫ n : α, D (x,ι n) ∂μ) := by + funext x + exact (hasFDerivAt_integral_compactParam μ hι hF1 x).fderiv + rw [show (↑(k+1) : ℕ∞ω) = ↑k+1 by simp,contDiff_succ_iff_fderiv] + refine ⟨fun x => (hasFDerivAt_integral_compactParam μ hι hF1 x).differentiableAt,?_,?_⟩ + · simp + · rw [he] + exact ih hD + +lemma contDiff_integral_compactParam + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fun x => ∫ n : α, F (x,ι n) ∂μ) := by + rw [contDiff_infty] + intro k + exact contDiff_integral_compactParam_nat μ hι k (contDiff_infty.mp hF k) + +end CompactParameter + +lemma contDiff_integral_compactSet + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} {K : Set Vec} (hF : ContDiff ℝ ∞ F) (hK : IsCompact K) : + ContDiff ℝ ∞ (fun x => ∫ v in K, F (x,v)) := by + let : CompactSpace K := isCompact_iff_compactSpace.mp hK + let : IsFiniteMeasureOnCompacts (volume.comap (Subtype.val : K → Vec)) := + IsFiniteMeasureOnCompacts.comap' volume continuous_subtype_val + (MeasurableEmbedding.subtype_coe hK.measurableSet) + have hh := contDiff_integral_compactParam (volume.comap (Subtype.val : K → Vec)) + (ι:=Subtype.val) continuous_subtype_val hF + convert hh using 1 + funext x + exact (integral_subtype_comap hK.measurableSet (fun v => F (x,v))).symm + +lemma contDiff_integral_uniform_compact + {H : Type} {W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} {K : Set Vec} (hF : ContDiff ℝ ∞ F) (hK : IsCompact K) + (hzero : ∀ x v, v ∉ K → F (x,v)=0) : + ContDiff ℝ ∞ (fun x => ∫ v, F (x,v)) := by + convert contDiff_integral_compactSet hF hK using 1 + funext x + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + exact hzero x + +lemma contDiff_rho_uniform_compact {f : Particle} {K : Set Vec} + (hf : ContDiff ℝ ∞ f) (hK : IsCompact K) + (hzero : ∀ t x v, v ∉ K → f (t,x,v)=0) : + ContDiff ℝ ∞ (fun p : ℝ × Vec => rho (fun z => f (p.1,z)) p.2) := by + exact contDiff_integral_uniform_compact + (F:=fun z : (ℝ × Vec) × Vec => f (z.1.1,z.1.2,z.2)) + (hf.comp contDiff_reassociate) hK (fun p v hv => hzero p.1 p.2 v hv) + +lemma contDiff_current_uniform_compact {f : Particle} {K : Set Vec} + (hf : ContDiff ℝ ∞ f) (hK : IsCompact K) + (hzero : ∀ t x v, v ∉ K → f (t,x,v)=0) : + ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun z => f (p.1,z)) p.2) := by + apply contDiff_integral_uniform_compact + (F:=fun z : (ℝ × Vec) × Vec => f (z.1.1,z.1.2,z.2) • velocity z.2) + ((hf.comp contDiff_reassociate).smul (contDiff_velocity.comp contDiff_snd)) hK + intro p v hv + simp only [hzero p.1 p.2 v hv,zero_smul] + +lemma integrable_conePotential {ρ : ℝ × Vec → ℝ} (hρ : Continuous ρ) + {t : ℝ} (_ht : 0≤t) (x : Vec) : + IntegrableOn (fun z : Vec => ρ (t-‖z‖,x+z)/‖z‖) (ball 0 t) := by + have hc : Continuous (fun z : Vec => ρ (t-‖z‖,x+z)) := + hρ.comp ((continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id)) + obtain ⟨C,hC⟩ := ((isCompact_closedBall (0:Vec) t).image hc).isBounded.exists_norm_le + apply integrableOn_ball_of_norm_le_rpow (by simp) + (α:=1) (C:=C) (by simp) + · apply ae_restrict_of_forall_mem measurableSet_ball + intro z hz + have hh := hC _ ⟨z,ball_subset_closedBall hz,rfl⟩ + rw [norm_div,norm_norm,Real.rpow_neg_one,div_eq_mul_inv] + exact mul_le_mul_of_nonneg_right hh (inv_nonneg.mpr (norm_nonneg z)) + · exact (hc.measurable.div continuous_norm.measurable).aestronglyMeasurable + +lemma sourceWave_ball {ρ : ℝ × Vec → ℝ} (hρ : Continuous ρ) + {t : ℝ} (ht : 0≤t) (x : Vec) : + sourceWave ρ (t,x) = (4*Real.pi)⁻¹ * + ∫ z in ball (0:Vec) t, ρ (t-‖z‖,x+z)/‖z‖ := by + have hi := (integrable_conePotential hρ ht x).integrable_indicator measurableSet_ball + rw [← integral_indicator measurableSet_ball,integral_polar hi] + have he (n : Sphere) : + (∫ r in Ioi (0:ℝ), r^2 • (ball (0:Vec) t).indicator + (fun z => ρ (t-‖z‖,x+z)/‖z‖) (r • n.1)) = + ∫ r in 0..t, r*ρ (t-r,x+r • n.1) := by + have hf : ∀ r ∈ Ioi (0:ℝ), r^2 • (ball (0:Vec) t).indicator + (fun z => ρ (t-‖z‖,x+z)/‖z‖) (r • n.1) = + (Ioo (0:ℝ) t).indicator (fun r => r*ρ (t-r,x+r • n.1)) r := by + intro r hr + change 0 hh h.2),smul_zero] + rw [setIntegral_congr_fun measurableSet_Ioi hf,setIntegral_indicator measurableSet_Ioo, + inter_eq_right.mpr Ioo_subset_Ioi_self,← integral_Ioc_eq_integral_Ioo, + intervalIntegral.integral_of_le ht] + simp_rw [he] + have hc : Continuous (fun p : ℝ × Sphere => p.1*ρ (t-p.1,x+p.1 • p.2.1)) := + continuous_fst.mul (hρ.comp ((continuous_const.sub continuous_fst).prodMk + (continuous_const.add (continuous_fst.smul (continuous_subtype_val.comp continuous_snd))))) + have hi2 : Integrable (fun p : ℝ × Sphere => p.1*ρ (t-p.1,x+p.1 • p.2.1)) + ((volume.restrict (uIoc 0 t)).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [uIoc_of_le ht,Measure.restrict_prod_eq_prod_univ] + exact (hc.continuousOn.integrableOn_compact + (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ioc_subset_Icc_self) + rw [← intervalIntegral_integral_swap hi2] + have hs : sourceWave ρ (t,x) = (4*Real.pi)⁻¹ * + ∫ s in 0..t, (t-s)*(∫ n : Sphere, ρ (s,x+(t-s) • n.1) ∂sphereMeasure) := by + simp only [sourceWave,volterra,sourceWaveKernel,waveK,sphereSum] + exact intervalIntegral.integral_const_mul _ _ + rw [hs] + congr 1 + calc + _ = ∫ r in 0..t, r*(∫ n : Sphere, ρ (t-r,x+r • n.1) ∂sphereMeasure) := by + have hh := intervalIntegral.integral_comp_sub_left + (fun r => r*(∫ n : Sphere, ρ (t-r,x+r • n.1) ∂sphereMeasure)) (a:=0) (b:=t) t + simpa only [sub_self,sub_zero,sub_sub_cancel] using hh + _ = _ := intervalIntegral.integral_congr (fun r _ => (integral_const_mul _ _).symm) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/ParticleC1.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/ParticleC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2d26f933c8928e90ac1cfd2deeb69179a0b3463 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/ParticleC1.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardCurvature + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma lorentzField_same_point_bound (E B E' B' : Field) (p : ℝ × Phase) : + ‖lorentzField E B p-lorentzField E' B' p‖≤ + ‖E (p.1,p.2.1)-E' (p.1,p.2.1)‖+‖B (p.1,p.2.1)-B' (p.1,p.2.1)‖ := by + have he : E (p.1,p.2.1)+cross (velocity p.2.2) (B (p.1,p.2.1))- + (E' (p.1,p.2.1)+cross (velocity p.2.2) (B' (p.1,p.2.1)))= + E (p.1,p.2.1)-E' (p.1,p.2.1)+cross (velocity p.2.2) (B (p.1,p.2.1)-B' (p.1,p.2.1)) := by + rw [cross_sub_right]; abel + have hb := (norm_cross_le (velocity p.2.2) (B (p.1,p.2.1)-B' (p.1,p.2.1))).trans + (mul_le_mul_of_nonneg_right (norm_velocity_lt_one p.2.2).le (norm_nonneg _)) + change max ‖velocity p.2.2-velocity p.2.2‖ + ‖E (p.1,p.2.1)+cross (velocity p.2.2) (B (p.1,p.2.1))- + (E' (p.1,p.2.1)+cross (velocity p.2.2) (B' (p.1,p.2.1)))‖≤_ + rw [sub_self,norm_zero,he] + exact max_le (by positivity) ((norm_add_le _ _).trans (add_le_add le_rfl (by simpa only [one_mul] using hb))) + +lemma uniform_lorentzField {E B : ℕ → Field} {e b : Field} {T : ℝ} + (hE : TendstoUniformlyOn E e atTop {p | p.1∈Icc 0 T}) + (hB : TendstoUniformlyOn B b atTop {p | p.1∈Icc 0 T}) : + TendstoUniformlyOn (fun n => lorentzField (E n) (B n)) (lorentzField e b) atTop {p | p.1∈Icc 0 T} := by + rw [Metric.tendstoUniformlyOn_iff] + intro ε hε + filter_upwards [Metric.tendstoUniformlyOn_iff.mp hE (ε/2) (by positivity), + Metric.tendstoUniformlyOn_iff.mp hB (ε/2) (by positivity)] with n hnE hnB p hp + have he := hnE (p.1,p.2.1) hp + have hb := hnB (p.1,p.2.1) hp + rw [dist_comm,dist_eq_norm] at he hb ⊢ + exact (lorentzField_same_point_bound _ _ _ _ p).trans_lt (by linarith) + +lemma lorentzField_norm_bound {E B : Field} {T L : ℝ} + (hL : 0≤L) (hb : GlobalFieldBound T L E B) (p : ℝ × Phase) (hp : p.1∈Icc 0 T) : + ‖lorentzField E B p‖≤1+2*L := by + have hh := hb p.1 hp p.2.1 + have hc := (norm_cross_le (velocity p.2.2) (B (p.1,p.2.1))).trans + (mul_le_mul (norm_velocity_lt_one p.2.2).le hh.2 (norm_nonneg _) zero_le_one) + change max ‖velocity p.2.2‖ ‖E (p.1,p.2.1)+cross (velocity p.2.2) (B (p.1,p.2.1))‖≤_ + exact max_le ((norm_velocity_lt_one p.2.2).le.trans (by linarith)) + ((norm_add_le _ _).trans (by linarith)) + +lemma picard_particle_full_derivative_limit {d : Datum} {S : ℕ → Solution} + {E B : Field} {f : Particle} {T H M L : ℝ} (hH : 0≤H) (hM : 0≤M) (hL : 0≤L) + (hr : ∀ n, PicardRegular d (S (n+1))) + (htransport : ∀ n, TransportFor (S (n+1)) (S n).E (S n).B) + (hc : ∀ n, PhaseParticleCurvature T H (S (n+1)).f) + (hlip : ∀ n, PhaseParticleLip T M (S (n+1)).f) + (hlb : GlobalFieldBound T L E B) + (hfl : TendstoUniformlyOn (fun n => (S (n+1)).f) f atTop {p | p.1∈Icc 0 T}) + (hEl : TendstoUniformlyOn (fun n => (S n).E) E atTop {p | p.1∈Icc 0 T}) + (hBl : TendstoUniformlyOn (fun n => (S n).B) B atTop {p | p.1∈Icc 0 T}) : + ∃ Z : ℝ × Phase → (Phase →L[ℝ] ℝ), + TendstoUniformlyOn (fun n p => fderiv ℝ (fun z => (S (n+1)).f (p.1,z)) p.2) Z atTop {p | p.1∈Icc 0 T} ∧ + (∀ t∈Icc 0 T, ∀ z, HasFDerivAt (fun w => f (t,w)) (Z (t,z)) z) ∧ + TendstoUniformlyOn (fun n p => fderiv ℝ (S (n+1)).f p) + (fun p => assembleDerivative (-Z p (lorentzField E B p)) (Z p)) atTop {p | p.1∈Icc 0 T} := by + have hs (n : ℕ) (t : ℝ) : Differentiable ℝ (fun z => (S (n+1)).f (t,z)) := + ((hr n).smooth_f.differentiable (by simp)).comp ((differentiable_const t).prodMk differentiable_id) + obtain ⟨Z,hZ,hdZ⟩ := uniform_spatial_derivative_limit hH (fun n t ht => hs n t) hc hfl + have hbZ (n : ℕ) (p : ℝ × Phase) (hp : p.1∈Icc 0 T) : + ‖fderiv ℝ (fun z => (S (n+1)).f (p.1,z)) p.2‖≤M := by + apply norm_fderiv_le_of_lip' ℝ hM + exact Eventually.of_forall fun z => by simpa only [Real.norm_eq_abs] using hlip n p.1 hp z p.2 + have heval := uniform_clm_apply_bounded hM (show 0≤1+2*L by positivity) + hZ (uniform_lorentzField hEl hBl) hbZ (lorentzField_norm_bound hL hlb) + have hh := uniform_assembleDerivative heval.neg hZ + refine ⟨Z,hZ,hdZ,hh.congr (Eventually.of_forall fun n p hp => ?_)⟩ + symm + change fderiv ℝ (S (n+1)).f p=assembleDerivative + (-fderiv ℝ (fun z => (S (n+1)).f (p.1,z)) p.2 (lorentzField (S n).E (S n).B p)) + (fderiv ℝ (fun z => (S (n+1)).f (p.1,z)) p.2) + rw [fderiv_eq_assemble ((hr n).smooth_f.differentiable (by simp))] + congr 1 + have ht := htransport n p.1 p.2 + change fderiv ℝ (S (n+1)).f p (1,lorentzField (S n).E (S n).B p)=0 at ht + have he : ((1 : ℝ),lorentzField (S n).E (S n).B p)=(1,0)+(0,lorentzField (S n).E (S n).B p) := by simp + rw [he,map_add] at ht + rw [fderiv_spatial_slice ((hr n).smooth_f.differentiable (by simp))] + exact eq_neg_of_add_eq_zero_left ht + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalC0.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalC0.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3795532615ceebd80411bc6af90dbc9ccbf9cc7 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalC0.lean @@ -0,0 +1,127 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.AffineRetardedBound + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_physical_kernel_affine (P H : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) H, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ E B : Vec, + ‖(1-dot n (velocity v)) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C*(1+‖E‖+‖B‖)/r^2 := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_physical_kernel_affine P H + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv E B + have hh := hb r ⟨hr.1.le,hr.2⟩ n hn v hv E B + rw [normalisedElectricKernel_eq hr.1.ne',smul_comm (1-dot n (velocity v)), + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] at hh + exact (le_div_iff₀ (sq_pos_of_pos hr.1)).mpr (by simpa only [mul_comm] using hh) + +lemma uniform_retarded_density_affine (A P H : ℝ) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U : ℝ), U≤H → + (∀ t∈Icc 0 U, ∀ z, |s.f (t,z)|≤A) → + (∀ t∈Icc 0 U, ∀ x v, P<‖v‖ → s.f (t,x,v)=0) → + ∀ t∈Icc 0 U, ∀ (x z : Vec), 0<‖z‖ → ‖z‖≤t → + ‖retardedElectricDensity s t x (x+z)‖≤ + C*(1+‖s.E (t-‖z‖,x+z)‖+‖s.B (t-‖z‖,x+z)‖)/‖z‖^2 ∧ + ‖retardedMagneticDensity s t x (x+z)‖≤ + C*(1+‖s.E (t-‖z‖,x+z)‖+‖s.B (t-‖z‖,x+z)‖)/‖z‖^2 := by + obtain ⟨K,hK,hk⟩ := uniform_physical_kernel_affine P H + refine ⟨A*K*volume.real (closedBall (0:Vec) P),by positivity,?_⟩ + intro s U hUH hf hs t ht x z hz hzt + have htime : t-‖z‖∈Icc 0 U := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + have hxy : x≠x+z := by + intro he + have hh : z=0 := add_left_cancel (show x+z=x+0 by simpa using he.symm) + exact (norm_pos_iff.mp hz) hh + have he : ‖retardedElectricDensity s t x (x+z)‖≤ + (A*K*volume.real (closedBall (0:Vec) P))*(1+‖s.E (t-‖z‖,x+z)‖+‖s.B (t-‖z‖,x+z)‖)/‖z‖^2 := by + unfold retardedElectricDensity + rw [coneRadius_add] + exact (physical_integral_bound hA + (fun u hu => hk ‖z‖ ⟨hz,hzt.trans (ht.2.trans hUH)⟩ _ (coneDirection_norm hxy) u hu _ _) + (fun u => hf _ htime _) (fun u hu => hs _ htime _ u hu)).trans_eq (by ring) + refine ⟨he,?_⟩ + exact (norm_cross_le _ _).trans (by simpa only [coneDirection_norm hxy,one_mul] using he) + +lemma kernel_volterra_norm {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [CompleteSpace W] {F : Vec → W} {t C : ℝ} (ht : 0≤t) (_ : 0≤C) + (hF : IntegrableOn F (ball (0:Vec) t)) {g : ℝ → ℝ} (hg : Continuous g) + (hb : ∀ z, 0<‖z‖ → ‖z‖≤t → ‖F z‖≤C*g (t-‖z‖)/‖z‖^2) : + ‖∫ z in ball (0:Vec) t, F z‖≤(4*Real.pi)*C*(∫ u in Icc (0:ℝ) t, g u) := by + rw [integral_ball_polar_flip hF] + have hr : IntegrableOn (fun r => C*g (t-r)) (Ioo (0:ℝ) t) := + ((continuous_const.mul (hg.comp (continuous_const.sub continuous_id))).continuousOn.integrableOn_compact + isCompact_Icc).mono_set Ioo_subset_Icc_self + have hin (a : Sphere) : ‖∫ r in Ioo (0:ℝ) t, r^2 • F (-(r • a.1))‖ ≤ + C*(∫ u in Icc (0:ℝ) t, g u) := by + have hh := norm_integral_le_of_norm_le hr (f:=fun r => r^2 • F (-(r • a.1))) (by + filter_upwards [ae_restrict_mem measurableSet_Ioo] with r hr + have he : ‖-(r • a.1)‖=r := by + rw [norm_neg,norm_smul,Real.norm_eq_abs,abs_of_pos hr.1,sphere_norm,mul_one] + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] + have hh := hb (-(r • a.1)) (by simpa only [he] using hr.1) (by simpa only [he] using hr.2.le) + rw [he] at hh + exact (mul_le_mul_of_nonneg_left hh (sq_nonneg r)).trans_eq (by field_simp [ne_of_gt hr.1])) + apply hh.trans_eq + rw [←integral_Icc_eq_integral_Ioo,integral_const_mul,integral_Icc_sub g ht] + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (Filter.Eventually.of_forall hin) + simpa only [sphere_area,smul_eq_mul,mul_assoc,mul_comm,mul_left_comm] using hh + +lemma SmoothClassicalPrefix.physical_vectors {d : Datum} {s : Solution} {H t : ℝ} + (hs : SmoothClassicalPrefix d s H) (ht : 0 retardedElectricDensity s t x (x+z)) (ball (0:Vec) t) ∧ + IntegrableOn (fun z => retardedMagneticDensity s t x (x+z)) (ball (0:Vec) t) := by + let τ := (t+H)/2 + have htτ : t<τ := by dsimp [τ]; linarith + have hτH : τ retardedElectricDensity a t x (x+z)) _ at hie + change IntegrableOn (fun z => retardedMagneticDensity a t x (x+z)) _ at hib + simp_rw [heq] at hie + simp_rw [hbq] at hib + exact ⟨hE,hB,hie,hib⟩ + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalCutoffCoordinates.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalCutoffCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..998828c0831001d24546b2b808913dd8c671ffd4 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalCutoffCoordinates.lean @@ -0,0 +1,204 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.NullConeFlux +import OAI.Analysis.VlasovMaxwell.Population.DyadicCut + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def physicalCutoffCoordinates (T r : ℝ) (n v w : Vec) : Fin 4 → ℝ := + ![1/q v,Real.sqrt ((1-dot n (velocity v))/2), + Real.sqrt ((1-dot n (velocity w))/2),r/max 1 T] + +lemma physicalCutoffCoordinates_pos {T r : ℝ} {n v w : Vec} + (hn : ‖n‖=1) (hr : 0 simp only [physicalCutoffCoordinates] + · exact one_div_pos.mpr (q_pos v) + · exact Real.sqrt_pos.mpr (div_pos (cone_denom_pos v n hn) (by norm_num)) + · exact Real.sqrt_pos.mpr (div_pos (cone_denom_pos w n hn) (by norm_num)) + · exact div_pos hr (lt_of_lt_of_le (by norm_num) (le_max_left _ _)) + +lemma real_deficit_le_two {n : Vec} (hn : ‖n‖=1) (v : Vec) : 1-dot n (velocity v) ≤ 2 := by + have h := (abs_dot_le n (velocity v)).trans (by simpa only [hn,one_mul] using (norm_velocity_lt_one v).le) + linarith [neg_abs_le (dot n (velocity v))] + +lemma physicalCutoffCoordinates_le_one {T r : ℝ} {n v w : Vec} + (hn : ‖n‖=1) (hr : r ≤ max 1 T) : ∀ i,physicalCutoffCoordinates T r n v w i≤1 := by + intro i + fin_cases i <;> simp only [physicalCutoffCoordinates] + · apply (div_le_one (q_pos v)).mpr + have hs := q_sq v + nlinarith [q_pos v,sq_nonneg ‖v‖] + · apply (Real.sqrt_le_iff).mpr + constructor + · norm_num + · nlinarith [real_deficit_le_two hn v] + · apply (Real.sqrt_le_iff).mpr + constructor + · norm_num + · nlinarith [real_deficit_le_two hn w] + · exact (div_le_one (lt_of_lt_of_le (by norm_num) (le_max_left _ _))).mpr hr + +lemma angularCoordinate_log_deriv {d : ℝ→ℝ} {d' t : ℝ} + (hd : HasDerivAt d d' t) (hp : 0 Real.sqrt (d s/2)) t / Real.sqrt (d t/2) = d'/(2*d t) := by + have hhalf : 0 g i r)=0 := by + classical + have hp (i : ι) := pow_unbounded_of_one_lt (4/g i t) (by norm_num : (1:ℝ)<2) + choose Ns hNs using hp + let N := ∑ i,Ns i + have hN (i : ι) : 4<(2:ℝ)^N*g i t := by + have hNi : Ns i≤N := Finset.single_le_sum (fun j _ => Nat.zero_le _) (Finset.mem_univ i) + exact ((div_lt_iff₀ (hx i)).mp (hNs i)).trans_le + (mul_le_mul_of_nonneg_right (pow_le_pow_right₀ (by norm_num) hNi) (hx i).le) + refine ⟨N,fun i => by linarith [hN i],?_⟩ + have he : ∀ᶠ r in 𝓝 t, ∀ i,g i t/2 n∈S) + +def selectedDyadicCutoff {ι : Type*} [Fintype ι] (S : Set (ι→ℕ)) (x : ι→ℝ) : ℝ := + ∑' n : ι→ℕ, S.indicator (fun n => dyadicMultiFactor n x) n + +lemma selectedDyadicCutoff_curve_eventually {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, ContinuousAt (g i) t) (hx : ∀ i,0 selectedDyadicCutoff S (fun i => g i r)) =ᶠ[𝓝 t] + (fun r => ∑ n∈selectedDyadicBox N S,dyadicMultiFactor n (fun i => g i r)) := by + classical + obtain ⟨N,hN,he⟩ := dyadicMultiFactor_curve_locally_finite hg hx + refine ⟨N,hN,?_⟩ + filter_upwards [he] with r hr + unfold selectedDyadicCutoff + rw [tsum_eq_sum (s:=dyadicBox ι N) (fun n hn => ?_)] + · simpa only [selectedDyadicBox,id_eq] using (Finset.sum_indicator_eq_sum_filter (dyadicBox ι N) (fun _ n => dyadicMultiFactor n (fun i => g i r)) (fun _ => S) id) + · by_cases hs : n∈S + · rw [indicator_of_mem hs,hr n hn] + · exact indicator_of_notMem hs _ + +lemma differentiableAt_selectedDyadicCutoff_curve {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} (hg : ∀ i, DifferentiableAt ℝ (g i) t) (hx : ∀ i,0 selectedDyadicCutoff S (fun i => g i r)) t := by + classical + obtain ⟨N,_hN,he⟩ := selectedDyadicCutoff_curve_eventually (fun i => (hg i).continuousAt) hx S + exact (DifferentiableAt.fun_sum (u:=selectedDyadicBox N S) (fun n _ => differentiableAt_dyadicMultiFactor_curve hg n)).congr_of_eventuallyEq he + +lemma selectedDyadicCutoff_local_box {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} {N : ℕ} + (he : ∀ᶠ r in 𝓝 t,∀ n : ι→ℕ,n∉dyadicBox ι N → dyadicMultiFactor n (fun i=>g i r)=0) + (S : Set (ι→ℕ)) : + (fun r => selectedDyadicCutoff S (fun i => g i r)) =ᶠ[𝓝 t] + (fun r => ∑ n∈selectedDyadicBox N S,dyadicMultiFactor n (fun i=>g i r)) := by + classical + filter_upwards [he] with r hr + unfold selectedDyadicCutoff + rw [tsum_eq_sum (s:=dyadicBox ι N) (fun n hn => ?_)] + · simpa only [selectedDyadicBox,id_eq] using (Finset.sum_indicator_eq_sum_filter + (dyadicBox ι N) (fun _ n => dyadicMultiFactor n (fun i=>g i r)) (fun _=>S) id) + · by_cases hs : n∈S + · rw [indicator_of_mem hs,hr n hn] + · exact indicator_of_notMem hs _ + +lemma selectedDyadicBox_compl {ι : Type*} [Fintype ι] (N : ℕ) (S : Set (ι→ℕ)) : + selectedDyadicBox N Sᶜ=dyadicBox ι N \ selectedDyadicBox N S := by + classical + simp only [selectedDyadicBox,mem_compl_iff,Finset.filter_not] + +lemma selectedDyadicCutoff_derivative_cancel {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i,DifferentiableAt ℝ (g i) t) (hp : ∀ i,0selectedDyadicCutoff S (fun i=>g i r)) t = + -deriv (fun r=>selectedDyadicCutoff Sᶜ (fun i=>g i r)) t := by + classical + obtain ⟨N,hN,he⟩ := dyadicMultiFactor_curve_locally_finite (fun i=>(hg i).continuousAt) hp + rw [(selectedDyadicCutoff_local_box he S).deriv_eq, + (selectedDyadicCutoff_local_box he Sᶜ).deriv_eq, + selectedDyadicBox_compl] + simpa only [deriv_fun_sum (fun n _=>differentiableAt_dyadicMultiFactor_curve hg n)] using + selected_dyadic_derivative_cancel hg N h1 hN (selectedDyadicBox N S) (Finset.filter_subset _ _) + +lemma selectedDyadicCutoff_derivative_boundary {ι : Type*} [Fintype ι] + {g : ι → ℝ → ℝ} {t : ℝ} + (hg : ∀ i,DifferentiableAt ℝ (g i) t) (hp : ∀ i,0selectedDyadicCutoff S (fun i=>g i r)) t≠0) : + ∃ n∈S,∃ m∉S,0g i t) ∧ + 0g i t) ∧ ∀ i,m i ≤ n i+2 ∧ n i ≤ m i+2 := by + classical + obtain ⟨N,hN,he⟩ := dyadicMultiFactor_curve_locally_finite (fun i=>(hg i).continuousAt) hp + rw [(selectedDyadicCutoff_local_box he S).deriv_eq] at hne + obtain ⟨⟨n,hn,hnpos⟩,⟨m,hm,hmpos⟩⟩ := selected_dyadic_derivative_boundary hg N h1 hN + (selectedDyadicBox N S) (Finset.filter_subset _ _) hne + have hnS : n∈S := (Finset.mem_filter.mp hn).2 + have hmS : m∉S := by + intro hmS + exact (Finset.mem_sdiff.mp hm).2 (Finset.mem_filter.mpr ⟨(Finset.mem_sdiff.mp hm).1,hmS⟩) + exact ⟨n,hnS,m,hmS,hnpos,hmpos,dyadicMultiFactor_positive_index_comparison hnpos hmpos⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalGradient.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalGradient.lean new file mode 100644 index 0000000000000000000000000000000000000000..b64d3f7b34ceb481174f31f935bbebca1f1abf97 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PhysicalGradient.lean @@ -0,0 +1,454 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.MagneticVolterra + +namespace OAI + +noncomputable section + +namespace RVM + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +lemma source_density_integrable {s : Solution} {U t P A M : ℝ} (x : Vec) (i : Fin 3) + (htU : t≤U) (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (_hA : 0≤A) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) + (hEB : ∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) : + IntegrableOn (fun z => ∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) + (ball (0:Vec) t) := by + obtain ⟨K,hK,hkb⟩ := sourceConeCoefficient_uniform_bound P M i + have hu {z : Vec} (hzt : ‖z‖ linarith [norm_nonneg z] + apply retarded_packet_integrable (F:=sourceWeightedPacket s t i) (P:=P) (C:=K*A) x + · intro p hp hpt + exact (sourceWeightedPacket_contDiffAt i hf hE hB hp (by + simpa only [coneRadius,zero_sub,norm_neg] using sub_pos.mpr hpt)).continuousAt + · intro x z v hz hzt hv + simp only [sourceWeightedPacket,hP _ (hu hzt) _ v hv,mul_zero] + · intro x z v hz hzt hv + change |sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)|≤_ + rw [abs_mul] + exact (mul_le_mul (hkb s t x z v hz hv (hEB _ (hu hzt) _).1 (hEB _ (hu hzt) _).2) + (hfA _ (hu hzt) _ v) (abs_nonneg _) (by positivity)).trans_eq (by ring) + +lemma retardedElectricDensity_split {s : Solution} {t : ℝ} (x z : Vec) (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hz : z≠0) (ht : 0≤t-coneRadius 0 z) : + retardedElectricDensity s t x (x+z) i = + (∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v))+ + (∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) := by + have hxy : x≠x+z := by intro he; exact hz (add_left_cancel (show x+z=x+0 by simpa using he.symm)) + have hr : coneRadius x (x+z)=coneRadius 0 z := by simp [coneRadius] + have hn : coneDirection x (x+z)=coneDirection 0 z := by simp [coneDirection,coneRadius] + obtain ⟨hreg,hcomp⟩ := (show RegularParticle s.f from ⟨hf,hc⟩).slice ht (x+z) + have htc : Continuous (fun v => transportConeCoefficient i (z,v)) := (transport_kernel_velocity_contDiff i hz).continuous + have hsc : Continuous (fun v => sourceConeCoefficient s t x i (z,v)) := by + apply continuous_iff_continuousAt.mpr + intro v + exact (contDiffAt_const.mul ((sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').comp v + (contDiffAt_const.prodMk contDiffAt_id))).continuousAt + have hti := (htc.mul hreg.continuous).integrable_of_hasCompactSupport (μ:=volume) hcomp.mul_left + have hsi := (hsc.mul hreg.continuous).integrable_of_hasCompactSupport (μ:=volume) hcomp.mul_left + change Integrable (fun v => transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) at hti + change Integrable (fun v => sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) at hsi + have hi := integrable_retardedElectricDensity_integrand hf hc hxy (by simpa only [hr] using ht) + have hp := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi + simp only [PiLp.proj_apply] at hp + rw [retardedElectricDensity,←hp,←integral_add hti hsi] + apply integral_congr_ae + exact ae_of_all _ (fun v => by + have hh := congrArg (fun a : Vec => a i) (physicalElectricKernel_eulerian_split + (fderiv ℝ velocity v (s.E (t-coneRadius 0 z,x+z)+cross (velocity v) (s.B (t-coneRadius 0 z,x+z)))) + (show coneRadius 0 z≠0 by simpa [coneRadius] using hz) (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne') + simp only [PiLp.smul_apply,smul_eq_mul,PiLp.add_apply] at hh + simp only [PiLp.smul_apply,smul_eq_mul,hr,hn, + transportConeCoefficient,sourceConeCoefficient,sourceFixedCoefficient,sourceAngularProfile] + linear_combination s.f (t-coneRadius 0 z,x+z,v)*hh) + + +namespace Magnetic + +lemma source_density_integrable {s : Solution} {U t P A M : ℝ} (x : Vec) (i : Fin 3) + (htU : t≤U) (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (_hA : 0≤A) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) + (hEB : ∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) : + IntegrableOn (fun z => ∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) + (ball (0:Vec) t) := by + obtain ⟨K,hK,hkb⟩ := sourceConeCoefficient_uniform_bound P M i + have hu {z : Vec} (hzt : ‖z‖ linarith [norm_nonneg z] + apply retarded_packet_integrable (F:=sourceWeightedPacket s t i) (P:=P) (C:=K*A) x + · intro p hp hpt + exact (sourceWeightedPacket_contDiffAt i hf hE hB hp (by + simpa only [coneRadius,zero_sub,norm_neg] using sub_pos.mpr hpt)).continuousAt + · intro x z v hz hzt hv + simp only [sourceWeightedPacket,hP _ (hu hzt) _ v hv,mul_zero] + · intro x z v hz hzt hv + change |sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)|≤_ + rw [abs_mul] + exact (mul_le_mul (hkb s t x z v hz hv (hEB _ (hu hzt) _).1 (hEB _ (hu hzt) _).2) + (hfA _ (hu hzt) _ v) (abs_nonneg _) (by positivity)).trans_eq (by ring) + +lemma retardedMagneticDensity_split {s : Solution} {t : ℝ} (x z : Vec) (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hz : z≠0) (ht : 0≤t-coneRadius 0 z) : + retardedMagneticDensity s t x (x+z) i = + (∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v))+ + (∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) := by + have hxy : x≠x+z := by intro he; exact hz (add_left_cancel (show x+z=x+0 by simpa using he.symm)) + have hr : coneRadius x (x+z)=coneRadius 0 z := by simp [coneRadius] + have hn : coneDirection x (x+z)=coneDirection 0 z := by simp [coneDirection,coneRadius] + obtain ⟨hreg,hcomp⟩ := (show RegularParticle s.f from ⟨hf,hc⟩).slice ht (x+z) + have htc : Continuous (fun v => transportConeCoefficient i (z,v)) := (transport_kernel_velocity_contDiff i hz).continuous + have hsc : Continuous (fun v => sourceConeCoefficient s t x i (z,v)) := by + apply continuous_iff_continuousAt.mpr + intro v + exact (contDiffAt_const.mul ((sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').comp v + (contDiffAt_const.prodMk contDiffAt_id))).continuousAt + have hti := (htc.mul hreg.continuous).integrable_of_hasCompactSupport (μ:=volume) hcomp.mul_left + have hsi := (hsc.mul hreg.continuous).integrable_of_hasCompactSupport (μ:=volume) hcomp.mul_left + change Integrable (fun v => transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) at hti + change Integrable (fun v => sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) at hsi + rw [retardedMagneticDensity_component hf hc hxy (by simpa only [hr] using ht) i,←integral_add hti hsi] + apply integral_congr_ae + exact ae_of_all _ (fun v => by + have hh := congrArg (fun a : Vec => a i) (physicalMagneticKernel_eulerian_split + (fderiv ℝ velocity v (s.E (t-coneRadius 0 z,x+z)+cross (velocity v) (s.B (t-coneRadius 0 z,x+z)))) + (show coneRadius 0 z≠0 by simpa [coneRadius] using hz) (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne') + simp only [PiLp.smul_apply,smul_eq_mul,PiLp.add_apply] at hh + simp only [hr,hn, + transportConeCoefficient,sourceConeCoefficient,sourceFixedCoefficient,sourceAngularProfile] + linear_combination s.f (t-coneRadius 0 z,x+z,v)*hh) + +end Magnetic + + +lemma classical_electric_transport_source_before {d : Datum} {s : Solution} {U t P A M : ℝ} + (hs : ClassicalBefore d s U) (hm : SmoothOnFiniteHorizons s) (x : Vec) (i : Fin 3) + (ht : 0 ℝ) i).integral_comp_comm hdens + simp only [PiLp.proj_apply] at hp + have hsplit : (∫ z in ball (0:Vec) t,retardedElectricDensity s t x (x+z) i)= + (∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) := by + rw [←integral_add hti hsi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + exact retardedElectricDensity_split x z i hs.1 hs.2.2.2.2.2.2.1 hz0 (by + simpa only [coneRadius,zero_sub,norm_neg] using (sub_nonneg.mpr (show ‖z‖≤t from + (show ‖z‖ a i) (classical_electric_physical_vector_before hs hm ht htU x) + simp only [PiLp.add_apply,PiLp.smul_apply,smul_eq_mul] at hh + have hbd : electricBoundaryField s t x i=electricBoundaryField (datumBoundarySolution d) t x i := + classical_electricConeBoundary_datum_before hs ht x i + rw [hbd,←hp,hsplit] at hh + exact hh + + +namespace Magnetic + +lemma classical_magnetic_transport_source_before {d : Datum} {s : Solution} {U t P A M : ℝ} + (hs : ClassicalBefore d s U) (hm : SmoothOnFiniteHorizons s) (x : Vec) (i : Fin 3) + (ht : 0 ℝ) i).integral_comp_comm hdens + simp only [PiLp.proj_apply] at hp + have hsplit : (∫ z in ball (0:Vec) t,retardedMagneticDensity s t x (x+z) i)= + (∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) := by + rw [←integral_add hti hsi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + exact retardedMagneticDensity_split x z i hs.1 hs.2.2.2.2.2.2.1 hz0 (by + simpa only [coneRadius,zero_sub,norm_neg] using (sub_nonneg.mpr (show ‖z‖≤t from + (show ‖z‖ a i) (classical_magnetic_physical_vector_before hs hm ht htU x) + simp only [PiLp.add_apply,PiLp.smul_apply,smul_eq_mul] at hh + have hbd : magneticBoundaryField s t x i=magneticBoundaryField (datumBoundarySolution d) t x i := + classical_magneticConeBoundary_datum_before hs ht x i + rw [hbd,←hp,hsplit] at hh + exact hh + +end Magnetic + + +lemma hasDerivAt_vec_component_line {g : Vec → Vec} {x e : Vec} (i : Fin 3) + (hg : DifferentiableAt ℝ g x) : + HasDerivAt (fun q : ℝ => g (x+q • e) i) ((fderiv ℝ g x e) i) 0 := by + have hl : HasDerivAt (fun q : ℝ => x+q • e) e 0 := by + convert ((hasDerivAt_id (0:ℝ)).smul_const e).const_add x using 1 <;> first | rfl | simp + have hg' : HasFDerivAt g (fderiv ℝ g x) (x+(0:ℝ) • e) := by simpa only [zero_smul,add_zero] using hg.hasFDerivAt + have hh := hg'.comp_hasDerivAt (0:ℝ) hl + have hp := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp_hasDerivAt (0:ℝ) hh + simpa only [Function.comp_def,PiLp.proj_apply] using hp + +lemma classical_electric_gradient_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hH : 0≤H) : + ∃ B C D K : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ 0≤K ∧ + ∀ (s : Solution) (U t N Q : ℝ) (x : Vec), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => s.E (t,x+q • e) i) 0|≤B+D*Real.log (1+C*N)+K*H^2*Q := by + obtain ⟨B,C,D,hB,hC,hD,hT⟩ := electric_transport_deriv_bound P A M H e i hA hH + obtain ⟨K,hK,hS⟩ := electric_source_deriv_bound P A M e i hA + obtain ⟨J,hJ,hJi,hJb⟩ := datum_boundary_global_jets_horizon hd H hH 1 + let c := (4*Real.pi)⁻¹ + have hc : 0≤c := by dsimp [c]; positivity + refine ⟨J*‖e‖+c*(B+D*Real.log (max 1 H)+K*(H+H^2)),C,c*D,c*K, + ?_,hC,by positivity,by positivity,?_⟩ + · have hl : 0≤Real.log (max 1 H) := Real.log_nonneg (le_max_left _ _) + positivity + intro s U t N Q x hs hm ht htU hUH hN hQ hfA hP hEB hDF hfN + have hboundary := (hJb t ⟨ht,htU.le.trans hUH⟩).1.1 + let g := electricBoundaryField (datumBoundarySolution d) t + have hbd := hasDerivAt_vec_component_line (x:=x) (e:=e) i (hboundary.differentiable (by simp)).differentiableAt + have hbd_bound : |fderiv ℝ g x e i|≤J*‖e‖ := by + apply (norm_coordinate_le _ i).trans + apply (ContinuousLinearMap.le_opNorm _ e).trans + apply mul_le_mul_of_nonneg_right _ (norm_nonneg e) + simpa only [norm_iteratedFDeriv_one] using (hJb t ⟨ht,htU.le.trans hUH⟩).2 x |>.1 + have htd := hasDerivAt_electric_transport_integral x e i 0 ht htU.le hs.1 hA hN hP hfA hfN + have hsd := hasDerivAt_electric_source_integral x e i 0 htU.le hs.1 hs.2.1 hs.2.2.1 hA hN hQ hP hfA hEB hDF hfN + have htotal := hbd.add ((htd.add hsd).const_mul c) + have heq : (fun q : ℝ => s.E (t,x+q • e) i)=fun q : ℝ => + g (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))) := by + funext q + exact classical_electric_transport_source_before hs hm (x+q • e) i ht htU hA hP hfA hEB + change HasDerivAt (fun q : ℝ => + g (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)))) _ 0 at htotal + rw [heq,htotal.deriv] + have htbound := hT s U t N x ht htU.le hUH hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hfN + have hsbound := hS s U t H Q N x ht htU.le hUH hQ hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hDF hfN + rw [htd.deriv] at htbound + rw [hsd.deriv] at hsbound + apply (abs_add_le _ _).trans + rw [abs_mul,abs_of_nonneg hc] + apply (add_le_add hbd_bound (mul_le_mul_of_nonneg_left ((abs_add_le _ _).trans (add_le_add htbound hsbound)) hc)).trans_eq + ring + + +namespace Magnetic + +lemma classical_magnetic_gradient_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hH : 0≤H) : + ∃ B C D K : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ 0≤K ∧ + ∀ (s : Solution) (U t N Q : ℝ) (x : Vec), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => s.B (t,x+q • e) i) 0|≤B+D*Real.log (1+C*N)+K*H^2*Q := by + obtain ⟨B,C,D,hB,hC,hD,hT⟩ := magnetic_transport_deriv_bound P A M H e i hA hH + obtain ⟨K,hK,hS⟩ := magnetic_source_deriv_bound P A M e i hA + obtain ⟨J,hJ,hJi,hJb⟩ := datum_boundary_global_jets_horizon hd H hH 1 + let c := (4*Real.pi)⁻¹ + have hc : 0≤c := by dsimp [c]; positivity + refine ⟨J*‖e‖+c*(B+D*Real.log (max 1 H)+K*(H+H^2)),C,c*D,c*K, + ?_,hC,by positivity,by positivity,?_⟩ + · have hl : 0≤Real.log (max 1 H) := Real.log_nonneg (le_max_left _ _) + positivity + intro s U t N Q x hs hm ht htU hUH hN hQ hfA hP hEB hDF hfN + have hboundary := (hJb t ⟨ht,htU.le.trans hUH⟩).1.2 + let g := magneticBoundaryField (datumBoundarySolution d) t + have hbd := hasDerivAt_vec_component_line (x:=x) (e:=e) i (hboundary.differentiable (by simp)).differentiableAt + have hbd_bound : |fderiv ℝ g x e i|≤J*‖e‖ := by + apply (norm_coordinate_le _ i).trans + apply (ContinuousLinearMap.le_opNorm _ e).trans + apply mul_le_mul_of_nonneg_right _ (norm_nonneg e) + simpa only [norm_iteratedFDeriv_one] using (hJb t ⟨ht,htU.le.trans hUH⟩).2 x |>.2 + have htd := hasDerivAt_magnetic_transport_integral x e i 0 ht htU.le hs.1 hA hN hP hfA hfN + have hsd := hasDerivAt_magnetic_source_integral x e i 0 htU.le hs.1 hs.2.1 hs.2.2.1 hA hN hQ hP hfA hEB hDF hfN + have htotal := hbd.add ((htd.add hsd).const_mul c) + have heq : (fun q : ℝ => s.B (t,x+q • e) i)=fun q : ℝ => + g (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))) := by + funext q + exact classical_magnetic_transport_source_before hs hm (x+q • e) i ht htU hA hP hfA hEB + change HasDerivAt (fun q : ℝ => + g (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)))) _ 0 at htotal + rw [heq,htotal.deriv] + have htbound := hT s U t N x ht htU.le hUH hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hfN + have hsbound := hS s U t H Q N x ht htU.le hUH hQ hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hDF hfN + rw [htd.deriv] at htbound + rw [hsd.deriv] at hsbound + apply (abs_add_le _ _).trans + rw [abs_mul,abs_of_nonneg hc] + apply (add_le_add hbd_bound (mul_le_mul_of_nonneg_left ((abs_add_le _ _).trans (add_le_add htbound hsbound)) hc)).trans_eq + ring + +end Magnetic + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +lemma classical_electric_gradient_volterra_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hH : 0≤H) : + ∃ B C D K : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ 0≤K ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => s.E (t,x+q • e) i) 0|≤B+D*Real.log (1+C*N)+K*(∫ u in Icc (0:ℝ) t,1+g u) := by + obtain ⟨B,C,D,hB,hC,hD,hT⟩ := electric_transport_deriv_bound P A M H e i hA hH + obtain ⟨K,hK,hS⟩ := electric_source_deriv_volterra_bound P A M e i hA + obtain ⟨J,hJ,hJi,hJb⟩ := datum_boundary_global_jets_horizon hd H hH 1 + let c := (4*Real.pi)⁻¹ + have hc : 0≤c := by dsimp [c]; positivity + refine ⟨J*‖e‖+c*(B+D*Real.log (max 1 H)+K*H),C,c*D,c*K*(1+H), + ?_,hC,by positivity,by positivity,?_⟩ + · have hl : 0≤Real.log (max 1 H) := Real.log_nonneg (le_max_left _ _) + positivity + intro s U t N x g hs hm ht htU hUH hN hg hg0 hfA hP hEB hDF hfN + obtain ⟨Q₀,hQ₀⟩ := isCompact_Icc.exists_bound_of_continuousOn (f:=g) hg.continuousOn + let Q := max Q₀ 0 + have hQ : 0≤Q := le_max_right _ _ + have hDFconst : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q := by + intro u hu y + have hh : g u≤Q := (le_abs_self _).trans ((hQ₀ u ⟨hu.1.le,hu.2⟩).trans (le_max_left _ _)) + exact ⟨(hDF u hu y).1.trans hh,(hDF u hu y).2.trans hh⟩ + have hboundary := (hJb t ⟨ht,htU.le.trans hUH⟩).1.1 + let b := electricBoundaryField (datumBoundarySolution d) t + have hbd := hasDerivAt_vec_component_line (x:=x) (e:=e) i (hboundary.differentiable (by simp)).differentiableAt + have hbd_bound : |fderiv ℝ b x e i|≤J*‖e‖ := by + apply (norm_coordinate_le _ i).trans + apply (ContinuousLinearMap.le_opNorm _ e).trans + apply mul_le_mul_of_nonneg_right _ (norm_nonneg e) + simpa only [norm_iteratedFDeriv_one] using (hJb t ⟨ht,htU.le.trans hUH⟩).2 x |>.1 + have htd := hasDerivAt_electric_transport_integral x e i 0 ht htU.le hs.1 hA hN hP hfA hfN + have hsd := hasDerivAt_electric_source_integral x e i 0 htU.le hs.1 hs.2.1 hs.2.2.1 hA hN hQ hP hfA hEB hDFconst hfN + have htotal := hbd.add ((htd.add hsd).const_mul c) + have heq : (fun q : ℝ => s.E (t,x+q • e) i)=fun q : ℝ => + b (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))) := by + funext q + exact classical_electric_transport_source_before hs hm (x+q • e) i ht htU hA hP hfA hEB + change HasDerivAt (fun q : ℝ => + b (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)))) _ 0 at htotal + rw [heq,htotal.deriv] + have htbound := hT s U t N x ht htU.le hUH hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hfN + have hsbound := hS s U t H N x g ht htU.le hUH hg hg0 hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hDF hfN + rw [htd.deriv] at htbound + rw [hsd.deriv] at hsbound + apply (abs_add_le _ _).trans + rw [abs_mul,abs_of_nonneg hc] + apply (add_le_add hbd_bound (mul_le_mul_of_nonneg_left ((abs_add_le _ _).trans (add_le_add htbound hsbound)) hc)).trans_eq + ring + + +namespace Magnetic + +lemma classical_magnetic_gradient_volterra_bound {d : Datum} (hd : Admissible d) + (P A M H : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) (hH : 0≤H) : + ∃ B C D K : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ 0≤K ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => s.B (t,x+q • e) i) 0|≤B+D*Real.log (1+C*N)+K*(∫ u in Icc (0:ℝ) t,1+g u) := by + obtain ⟨B,C,D,hB,hC,hD,hT⟩ := magnetic_transport_deriv_bound P A M H e i hA hH + obtain ⟨K,hK,hS⟩ := magnetic_source_deriv_volterra_bound P A M e i hA + obtain ⟨J,hJ,hJi,hJb⟩ := datum_boundary_global_jets_horizon hd H hH 1 + let c := (4*Real.pi)⁻¹ + have hc : 0≤c := by dsimp [c]; positivity + refine ⟨J*‖e‖+c*(B+D*Real.log (max 1 H)+K*H),C,c*D,c*K*(1+H), + ?_,hC,by positivity,by positivity,?_⟩ + · have hl : 0≤Real.log (max 1 H) := Real.log_nonneg (le_max_left _ _) + positivity + intro s U t N x g hs hm ht htU hUH hN hg hg0 hfA hP hEB hDF hfN + obtain ⟨Q₀,hQ₀⟩ := isCompact_Icc.exists_bound_of_continuousOn (f:=g) hg.continuousOn + let Q := max Q₀ 0 + have hQ : 0≤Q := le_max_right _ _ + have hDFconst : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q := by + intro u hu y + have hh : g u≤Q := (le_abs_self _).trans ((hQ₀ u ⟨hu.1.le,hu.2⟩).trans (le_max_left _ _)) + exact ⟨(hDF u hu y).1.trans hh,(hDF u hu y).2.trans hh⟩ + have hboundary := (hJb t ⟨ht,htU.le.trans hUH⟩).1.2 + let b := magneticBoundaryField (datumBoundarySolution d) t + have hbd := hasDerivAt_vec_component_line (x:=x) (e:=e) i (hboundary.differentiable (by simp)).differentiableAt + have hbd_bound : |fderiv ℝ b x e i|≤J*‖e‖ := by + apply (norm_coordinate_le _ i).trans + apply (ContinuousLinearMap.le_opNorm _ e).trans + apply mul_le_mul_of_nonneg_right _ (norm_nonneg e) + simpa only [norm_iteratedFDeriv_one] using (hJb t ⟨ht,htU.le.trans hUH⟩).2 x |>.2 + have htd := hasDerivAt_magnetic_transport_integral x e i 0 ht htU.le hs.1 hA hN hP hfA hfN + have hsd := hasDerivAt_magnetic_source_integral x e i 0 htU.le hs.1 hs.2.1 hs.2.2.1 hA hN hQ hP hfA hEB hDFconst hfN + have htotal := hbd.add ((htd.add hsd).const_mul c) + have heq : (fun q : ℝ => s.B (t,x+q • e) i)=fun q : ℝ => + b (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))) := by + funext q + exact classical_magnetic_transport_source_before hs hm (x+q • e) i ht htU hA hP hfA hEB + change HasDerivAt (fun q : ℝ => + b (x+q • e) i+c*((∫ z in ball (0:Vec) t,∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)))) _ 0 at htotal + rw [heq,htotal.deriv] + have htbound := hT s U t N x ht htU.le hUH hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hfN + have hsbound := hS s U t H N x g ht htU.le hUH hg hg0 hN hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 hs.2.2.2.2.2.2.2.1 hfA hP hEB hDF hfN + rw [htd.deriv] at htbound + rw [hsd.deriv] at hsbound + apply (abs_add_le _ _).trans + rw [abs_mul,abs_of_nonneg hc] + apply (add_le_add hbd_bound (mul_le_mul_of_nonneg_left ((abs_add_le _ _).trans (add_le_add htbound hsbound)) hc)).trans_eq + ring + +end Magnetic + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/PositiveExtension.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PositiveExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..28266ec23063a536671934d6b2a71be2d1999892 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/PositiveExtension.lean @@ -0,0 +1,226 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.WaveGradient + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +section PositiveExtension +variable {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup W] [NormedSpace ℝ W] + +def positiveTimeCut (a t : ℝ) : ℝ := Real.smoothTransition ((t-a/4)/(a/4)) +def positiveTimeExtend (a : ℝ) (F : ℝ × H → W) (p : ℝ × H) : W := + positiveTimeCut a p.1 • F p + +def positiveTimeShift (a : ℝ) (F : ℝ × H → W) (p : ℝ × H) : W := + positiveTimeExtend a F (a+p.1,p.2) + +lemma contDiff_positiveTimeCut (a : ℝ) : ContDiff ℝ ∞ (positiveTimeCut a) := + Real.smoothTransition.contDiff.comp ((contDiff_id.sub contDiff_const).div_const (a/4)) +lemma positiveTimeCut_zero {a t : ℝ} (ha : 0 0) := by + have hnh : {q : ℝ × H | q.1 (a+p.1,p.2)) (ContinuousLinearMap.id ℝ (ℝ × H)) (t,x) := by + simpa only [Prod.add_def,zero_add,id_eq] using + (hasFDerivAt_id (𝕜:=ℝ) (t,x)).const_add (a,0) + have hP : DifferentiableAt ℝ (positiveTimeExtend a F) (a+t,x) := hF.congr_of_eventuallyEq he + have h := hP.hasFDerivAt.comp (t,x) hD + change HasFDerivAt (positiveTimeShift a F) _ (t,x) at h + rw [h.fderiv,he.fderiv_eq] + simp + +end PositiveExtension + +lemma SmoothOnFiniteHorizons.field_positive {s : Solution} (hs : SmoothOnFiniteHorizons s) + {p : ℝ × Vec} (hp : 0 ⟨hq.1.le,hq.2.le⟩) + exact ⟨(hs _ hT).2.1.contDiffAt hn,(hs _ hT).2.2.contDiffAt hn⟩ + +lemma SmoothOnFiniteHorizons.particle_positive {s : Solution} (hs : SmoothOnFiniteHorizons s) + {p : ℝ × Phase} (hp : 0 ⟨hq.1.le,hq.2.le⟩) + +lemma SmoothOnFiniteHorizons.moments_positive {s : Solution} (hs : SmoothOnFiniteHorizons s) + (hc : CompactOnFiniteHorizons s) {p : ℝ × Vec} (hp : 0 rho (fun z => s.f (q.1,z)) q.2) p ∧ + ContDiffAt ℝ ∞ (fun q : ℝ × Vec => current (fun z => s.f (q.1,z)) q.2) p := by + let U : Set (ℝ × Vec) := {q | q.1 ∈ Ioo 0 (p.1+1)} + have hU : IsOpen U := isOpen_Ioo.preimage continuous_fst + have hpU : p ∈ U := ⟨hp,by linarith⟩ + have hT : 0≤p.1+1 := by linarith + obtain ⟨K,hK,hz⟩ := hc _ hT + have hF : ContDiffOn ℝ ∞ (particleBySpacetime s.f) (U ×ˢ (univ : Set Vec)) := by + intro z hz' + apply (hs.particle_positive hz'.1.1).comp (f:=fun w : (ℝ × Vec) × Vec => (w.1.1,w.1.2,w.2)) z + ((contDiff_reassociate).contDiffAt) |>.contDiffWithinAt + have hzero : ∀ q ∈ U, ∀ v ∉ Prod.snd '' K, particleBySpacetime s.f (q,v)=0 := by + intro q hq v hv + by_contra hne + exact hv ⟨(q.2,v),hz q.1 ⟨hq.1.le,hq.2.le⟩ (subset_tsupport _ hne),rfl⟩ + have hr := contDiffOn_integral_uniform_support hU (hK.image continuous_snd) hF hzero + have hJ : ContDiffOn ℝ ∞ (fun z : (ℝ × Vec) × Vec => particleBySpacetime s.f z • velocity z.2) + (U ×ˢ univ) := hF.smul ((contDiff_velocity.comp contDiff_snd).contDiffOn) + have hzeroJ : ∀ q ∈ U, ∀ v ∉ Prod.snd '' K, particleBySpacetime s.f (q,v) • velocity v=0 := by + intro q hq v hv + rw [hzero q hq v hv,zero_smul] + have hj := contDiffOn_integral_uniform_support hU (hK.image continuous_snd) hJ hzeroJ + exact ⟨hr.contDiffAt (hU.mem_nhds hpU),hj.contDiffAt (hU.mem_nhds hpU)⟩ + +lemma spaceCurl_positiveTimeShift {a t : ℝ} (ha : 0 F (a+t,y)) x := by + rw [spaceCurl_slice ((contDiff_positiveTimeShift ha hF).differentiable (by simp))] + congr 1 + funext y + exact positiveTimeShift_eq ha ht F y + +lemma classical_positiveTimeShift_maxwell {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a t : ℝ} + (ha : 0 current (fun z => s.f (p.1,z)) p.2) (t,x) ∧ + dirD (positiveTimeShift a s.B) (1,0) (t,x) = + -spaceCurl (positiveTimeShift a s.E) (t,x) ∧ + divergence (fun y => positiveTimeShift a s.E (t,y)) x = + positiveTimeShift a (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) (t,x) ∧ + divergence (fun y => positiveTimeShift a s.B (t,y)) x = 0 := by + have hat : 0 (hm.field_positive hp).1) x + have hcB := spaceCurl_positiveTimeShift ha ht (fun p hp => (hm.field_positive hp).2) x + have hsE : (fun y => positiveTimeShift a s.E (t,y))=(fun y => s.E (a+t,y)) := + funext (positiveTimeShift_eq ha ht s.E) + have hsB : (fun y => positiveTimeShift a s.B (t,y))=(fun y => s.B (a+t,y)) := + funext (positiveTimeShift_eq ha ht s.B) + refine ⟨?_,?_,?_,?_⟩ + · unfold dirD + rw [fderiv_positiveTimeShift ha ht x hE,hcB,positiveTimeShift_eq ha ht] + exact (sub_eq_iff_eq_add.mp he).trans (by abel) + · unfold dirD + rw [fderiv_positiveTimeShift ha ht x hB,hcE] + exact eq_neg_of_add_eq_zero_left hb + · rw [hsE,positiveTimeShift_eq ha ht] + exact heq.2.2.2.1 x + · rw [hsB] + exact heq.2.2.2.2 x + +lemma classical_shifted_electric_potential_representation {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 s.E (a,y) i) (fun y => curl (fun z => s.B (a,z)) y i) (T,x) + + electricPotentialComponent + (positiveTimeShift a (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2)) + (positiveTimeShift a (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2)) i (T,x) := by + have hE := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).1) + have hB := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).2) + have hρ := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).1) + have hj := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2) + have hh := maxwell_electric_potential_representation hE hB hj hρ hT + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1 y).1) + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1.le y).2.1) + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1.le y).2.2.1) x i + rw [positiveTimeShift_eq ha hT] at hh + simpa only [positiveTimeShift_eq ha (le_refl 0),add_zero, + spaceCurl_positiveTimeShift ha (le_refl 0) (fun p hp => (hm.field_positive hp).2)] using hh + +lemma classical_shifted_magnetic_potential_representation {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 s.B (a,y) i) (fun y => -curl (fun z => s.E (a,z)) y i) (T,x) + + magneticPotentialComponent + (positiveTimeShift a (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2)) i (T,x) := by + have hE := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).1) + have hB := contDiff_positiveTimeShift ha (fun p hp => (hm.field_positive hp).2) + have hj := contDiff_positiveTimeShift ha (fun p hp => (hm.moments_positive hs.2.2.2.2.2.2.1 hp).2) + have hh := maxwell_magnetic_potential_representation hE hB hj hT + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1.le y).1) + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1 y).2.1) + (fun r hr y => (classical_positiveTimeShift_maxwell hs hm ha hr.1.le y).2.2.2) x i + rw [positiveTimeShift_eq ha hT] at hh + simpa only [positiveTimeShift_eq ha (le_refl 0),add_zero, + spaceCurl_positiveTimeShift ha (le_refl 0) (fun p hp => (hm.field_positive hp).1)] using hh + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/RealJointEnergyBudget.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/RealJointEnergyBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..88332efbfc7f8967f163d1c6876c18d7f773e683 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/RealJointEnergyBudget.lean @@ -0,0 +1,237 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalElectricKernel +import OAI.Analysis.VlasovMaxwell.Population.LabelOccupationDurationMass +import OAI.Analysis.VlasovMaxwell.Flow.PhaseAcceleration + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +def realJointEnergyBudget (s : Solution) (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (a b I : ℝ) (n : ℕ × ℕ) : ℝ := + (jointEnergyBudget s α zX T k a b I n).toReal + +lemma PhaseFlowOn.realJointEnergyBudget_summable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + (k : ℕ) {a b I : ℝ} (hJ : Icc a b⊆Icc (0:ℝ) T) (hI : 0 Ioc (a i) (b i))) + (hsub : ∀ i∈S, Ioc (a i) (b i)⊆J) : + (∑ i∈S, ∫⁻ t in Icc (a i) (b i), g t)≤∫⁻ t in J, g t := by + have he (i : ι) : (∫⁻ t in Icc (a i) (b i), g t)=(∫⁻ t in Ioc (a i) (b i), g t) := by + rw [Measure.restrict_congr_set (Ioc_ae_eq_Icc (μ:=volume) (a:=a i) (b:=b i))] + simp_rw [he] + rw [← lintegral_biUnion_finset hdisj (fun _ _ => measurableSet_Ioc)] + exact lintegral_mono_set (iUnion₂_subset fun i hi => hsub i hi) + +lemma PhaseFlowOn.averaged_cells_occupation {s : Solution} {T len p D : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + {ι : Type*} (S : Finset ι) (a b : ι → ℝ) + {H : ι → Phase → Set ℝ} {Z : ι → Set Phase} {G : Set (ℝ × Phase)} {J : Set ℝ} + (hCT : ∀ i∈S, Icc (a i) (b i)⊆Icc (0:ℝ) T) + (hlen : ∀ i∈S, b i-a i=len) + (hdisj : Set.PairwiseDisjoint (↑S) (fun i => Ioc (a i) (b i))) + (hsub : ∀ i∈S, Ioc (a i) (b i)⊆J) + (hZ : ∀ i∈S, MeasurableSet (Z i)) + (hD : ∀ i∈S, ∀ z, volume (H i z)≤ENNReal.ofReal D) + (hz : ∀ i∈S, ∀ z, (H i z).Nonempty → z∈Z i) + (hmom : ∀ i∈S, ∀ t∈Icc (a i) (b i), ∀ z∈Z i, p≤q (F.flow z t).2) + (hG : ∀ i∈S, ∀ t∈Icc (a i) (b i), ∀ z∈Z i, (t,F.flow z t)∈G) : + ENNReal.ofReal len * ENNReal.ofReal p * + (∑ i∈S, labelOccupation (fun z => s.f (0,z)) (H i)) ≤ + ENNReal.ofReal D * ∫⁻ t in J, ∫⁻ z : Phase, + G.indicator (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z) := by + calc + _ = ∑ i∈S, ENNReal.ofReal len * ENNReal.ofReal p * + labelOccupation (fun z => s.f (0,z)) (H i) := Finset.mul_sum _ _ _ + _ ≤ ∑ i∈S, ENNReal.ofReal D * ∫⁻ t in Icc (a i) (b i), ∫⁻ z : Phase, + G.indicator (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z) := by + apply Finset.sum_le_sum + intro i hi + simpa only [hlen i hi] using F.averaged_cell_occupation hs (hCT i hi) + (hZ i hi) (hD i hi) (hz i hi) (hmom i hi) (hG i hi) + _ = ENNReal.ofReal D * (∑ i∈S, ∫⁻ t in Icc (a i) (b i), ∫⁻ z : Phase, + G.indicator (fun q => ENNReal.ofReal (RVM.q q.2.2*s.f q)) (t,z)) := + (Finset.mul_sum _ _ _).symm + _ ≤ _ := mul_le_mul' le_rfl (sum_cell_lintegral_le S a b _ hdisj hsub) + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma relative_angle_identity (v w : Vec) : + 2*(1-dot (velocity w) (velocity v)) = + ‖velocity v-velocity w‖^2+(q v)⁻¹^2+(q w)⁻¹^2 := by + rw [norm_sub_sq_real,← dot_eq_inner,← dot_self (velocity v), + ← dot_self (velocity w),velocity_self,velocity_self,dot_comm (velocity v)] + ring + +lemma actual_relative_separation {v w : Vec} {ang : ℝ} + (_hom : 0 ≤ ang) (hv : (q v)⁻¹ ≤ ang/4) (hw : (q w)⁻¹ ≤ ang/4) + (he : ang^2/2 ≤ 1-dot (velocity w) (velocity v)) : + ang/2 ≤ ‖velocity v-velocity w‖ := by + have hid := relative_angle_identity v w + have hv0 : 0 ≤ (q v)⁻¹ := inv_nonneg.mpr (q_pos v).le + have hw0 : 0 ≤ (q w)⁻¹ := inv_nonneg.mpr (q_pos w).le + have hv2 := mul_self_le_mul_self hv0 hv + have hw2 := mul_self_le_mul_self hw0 hw + nlinarith [norm_nonneg (velocity v-velocity w)] + +lemma actual_small_sector_velocity {v w n : Vec} {φ : ℝ} + (hn : ‖n‖ = 1) (hφ : 0 ≤ φ) (hw : (q w)⁻¹ ≤ φ/4) + (hsource : ‖n-velocity v‖ ≤ φ/4) + (hlo : φ^2/2 ≤ 1-dot n (velocity w)) + (hhi : 1-dot n (velocity w) ≤ 8*φ^2) : + φ/2 ≤ ‖velocity v-velocity w‖ ∧ ‖velocity v-velocity w‖ ≤ 5*φ := by + have hid := cone_angle_identity w n hn + have hi0 : 0 ≤ (q w)⁻¹ := inv_nonneg.mpr (q_pos w).le + have hi2 := mul_self_le_mul_self hi0 hw + have hna0 := norm_nonneg (n-velocity w) + have hnalow : 3*φ/4 ≤ ‖n-velocity w‖ := by nlinarith + have hnahi : ‖n-velocity w‖ ≤ 4*φ := by nlinarith [sq_nonneg ((q w)⁻¹)] + have hlo' : ‖n-velocity w‖ ≤ ‖n-velocity v‖+‖velocity v-velocity w‖ := by + calc + _ = ‖(n-velocity v)+(velocity v-velocity w)‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + have hhi' : ‖velocity v-velocity w‖ ≤ ‖n-velocity v‖+‖n-velocity w‖ := by + calc + _ = ‖(velocity v-n)+(n-velocity w)‖ := by congr 1; abel + _ ≤ ‖velocity v-n‖+‖n-velocity w‖ := norm_add_le _ _ + _ = _ := by rw [norm_sub_rev (velocity v) n] + exact ⟨by linarith,by linarith⟩ + +lemma stopping_modulus_on_stability_scale {M A P L massScale ang C ℓ Q : ℝ} + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hom : 0 < ang) (hC : 0 < C) (hℓ : 0 ≤ ℓ) (hQ : 0 < Q) + (hlen : ℓ ≤ (C*(P/massScale)*(M/ang+Real.sqrt (A*L/ang)))⁻¹^2) : + M*P*Real.sqrt ℓ+2*A*ℓ*P^2*L/Q ≤ + massScale*ang/C+2*massScale^2*ang/(C^2*Q) := by + let R := C*(P/massScale)*(M/ang+Real.sqrt (A*L/ang)) + have hR : 0 < R := mul_pos (mul_pos hC (div_pos hP hm)) + (add_pos_of_pos_of_nonneg (div_pos hM hom) (Real.sqrt_nonneg _)) + have hsqrt : Real.sqrt ℓ ≤ R⁻¹ := by + calc + _ ≤ Real.sqrt (R⁻¹^2) := Real.sqrt_le_sqrt hlen + _ = _ := Real.sqrt_sq (inv_nonneg.mpr hR.le) + have hfirst : M*P*R⁻¹ ≤ massScale*ang/C := by + rw [← div_eq_mul_inv,div_le_div_iff₀ hR hC] + have he : massScale*ang*R = M*P*C+massScale*ang*(C*(P/massScale))*Real.sqrt (A*L/ang) := by + dsimp [R] + field_simp + rw [he] + exact le_add_of_nonneg_right (by positivity) + have hs0 : 0 ≤ A*L/ang := by positivity + have hs : C*(P/massScale)*Real.sqrt (A*L/ang) ≤ R := by + dsimp [R] + exact mul_le_mul_of_nonneg_left (le_add_of_nonneg_left (div_nonneg hM.le hom.le)) (by positivity) + have hs2 := (sq_le_sq₀ (by positivity : 0 ≤ C*(P/massScale)*Real.sqrt (A*L/ang)) hR.le).mpr hs + rw [mul_pow,Real.sq_sqrt hs0] at hs2 + have hlen' : ℓ*R^2 ≤ 1 := by + change ℓ ≤ R⁻¹^2 at hlen + have hh := mul_le_mul_of_nonneg_right hlen (sq_nonneg R) + simpa only [← mul_pow,inv_mul_cancel₀ hR.ne',one_pow] using hh + have hproduct : ℓ*(C*(P/massScale))^2*(A*L/ang) ≤ 1 := by + calc + _ = ℓ*((C*(P/massScale))^2*(A*L/ang)) := by ring + _ ≤ ℓ*R^2 := mul_le_mul_of_nonneg_left hs2 hℓ + _ ≤ 1 := hlen' + have hbase : A*ℓ*P^2*L ≤ massScale^2*ang/C^2 := by + rw [le_div_iff₀ (sq_pos_of_pos hC)] + have hh := mul_le_mul_of_nonneg_right hproduct (by positivity : 0 ≤ massScale^2*ang) + have he : (ℓ*(C*(P/massScale))^2*(A*L/ang))*(massScale^2*ang) = (A*ℓ*P^2*L)*C^2 := by + field_simp + simpa only [he,one_mul] using hh + apply add_le_add ((mul_le_mul_of_nonneg_left hsqrt (mul_nonneg hM.le hP.le)).trans hfirst) + have hh := mul_le_mul_of_nonneg_left hbase (show 0 ≤ 2/Q by positivity) + convert hh using 1 <;> ring + +lemma IncrementBootstrap.velocity_stability_scale {V : ℝ → Vec} + {T M A P L a b r massScale ang C : ℝ} + (H : IncrementBootstrap V T M A P L) (ha : 0 ≤ a) (hb : b ≤ T) + (hr : r∈Icc a b) (hV : ContinuousOn V (Icc a b)) + (hM : 0 < M) (hA : 0 ≤ A) (hP : 0 < P) (hL : 0 ≤ L) + (hm : 0 < massScale) (hom : 0 < ang) (hom1 : ang ≤ 1) (hC : 128 ≤ C) + (hmq : massScale ≤ q (V r)) + (hlen : b-a ≤ (C*(P/massScale)*(M/ang+Real.sqrt (A*L/ang)))⁻¹^2) : + ∀ t∈Icc a b, ‖V t-V r‖ ≤ massScale*ang/64 ∧ + ‖velocity (V t)-velocity (V r)‖ ≤ ang/32 ∧ + q (V r)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V r) := by + have hC0 : 0 < C := by linarith + have hε : massScale*ang/64 < q (V r)/2 := by + have hh := mul_le_mul_of_nonneg_left hom1 hm.le + nlinarith [q_pos (V r)] + have hst := stopping_modulus_on_stability_scale hM hA hP hL hm hom hC0 + (sub_nonneg.mpr (hr.1.trans hr.2)) (q_pos (V r)) hlen + have he₁ : massScale*ang/C ≤ massScale*ang/128 := div_le_div_of_nonneg_left (by positivity) (by norm_num) hC + have he₂ : 2*massScale^2*ang/(C^2*q (V r)) ≤ massScale*ang/128 := by + rw [div_le_div_iff₀ (mul_pos (sq_pos_of_pos hC0) (q_pos _)) (by norm_num : (0:ℝ) < 128)] + have hC2 : (256:ℝ) ≤ C^2 := by nlinarith + have hh := mul_le_mul_of_nonneg_left hmq (sq_nonneg C) + have hh' : 256*massScale ≤ C^2*q (V r) := + (mul_le_mul_of_nonneg_right hC2 hm.le).trans hh + have hfinal := mul_le_mul_of_nonneg_left hh' (by positivity : 0 ≤ massScale*ang) + nlinarith + have hstep : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (V r) ≤ massScale*ang/64 := by + linarith + intro t ht + obtain ⟨hg,hu,hq⟩ := H.velocity_stopped_about ha hb hr hV hM.le hA hP.le hL hε hstep t ht + refine ⟨hg,hu.trans ?_,hq⟩ + rw [div_le_iff₀ (q_pos _)] + have hh := mul_le_mul_of_nonneg_right hmq (show 0 ≤ ang/32 by positivity) + nlinarith + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/SlabEvolutionRegularity.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SlabEvolutionRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..1af9669478e358ef9b7886fa47a21715237f3295 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SlabEvolutionRegularity.lean @@ -0,0 +1,300 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.SlabSmoothBootstrap +import OAI.Analysis.VlasovMaxwell.LocalPDE.SlabRHS +import OAI.Analysis.VlasovMaxwell.LocalPDE.StrongLocalExistence + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma differentiableWithinAt_slab_time {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] {F : ℝ × U → W} {T t : ℝ} + (hF : ContDiffOn ℝ 1 F {p | p.1∈Icc 0 T}) (ht : t∈Icc 0 T) (x : U) : + DifferentiableWithinAt ℝ (fun r => F (r,x)) (Icc 0 T) t := by + exact (hF.differentiableOn (by norm_num) (t,x) ht).comp t + ((differentiableAt_id.prodMk (differentiableAt_const x)).differentiableWithinAt) + (fun r hr => hr) + +lemma C1ClassicalPrefix.hasDerivWithinAt_particle {d : Datum} {s : Solution} {T : ℝ} + (hs : C1ClassicalPrefix d s T) (heq : SlabEquations s T) + (hf : SpatiallySmoothSlab T s.f) {t : ℝ} (ht : t∈Icc 0 T) (z : Phase) : + HasDerivWithinAt (fun r => s.f (r,z)) (slabParticleRHS s (t,z)) (Icc 0 T) t := by + have he := (heq t ht).1 z.1 z.2 + have hdiff := (hf.1 t ht).differentiable (by simp) z + simp only [spatialPartial] at he + rw [← clm_sum_basis,← clm_sum_basis,add_assoc,fderiv_phase_split hdiff] at he + have hderiv := (differentiableWithinAt_slab_time hs.f_c1 ht z).hasDerivWithinAt + have hv : derivWithin (fun r => s.f (r,z)) (Icc 0 T) t=slabParticleRHS s (t,z) := by + change derivWithin (fun r => s.f (r,z)) (Icc 0 T) t = + -(fderiv ℝ (fun w => s.f (t,w)) z) (lorentzField s.E s.B (t,z)) + exact eq_neg_of_add_eq_zero_left he + rwa [hv] at hderiv + +lemma C1ClassicalPrefix.hasDerivWithinAt_electric {d : Datum} {s : Solution} {T : ℝ} + (hs : C1ClassicalPrefix d s T) (heq : SlabEquations s T) + (hB : SpatiallySmoothSlab T s.B) {t : ℝ} (ht : t∈Icc 0 T) (x : Vec) : + HasDerivWithinAt (fun r => s.E (r,x)) (slabElectricRHS s (t,x)) (Icc 0 T) t := by + have he := (heq t ht).2.1 x + rw [curl_eq_curlMap ((hB.1 t ht).differentiable (by simp))] at he + have hderiv := (differentiableWithinAt_slab_time hs.E_c1 ht x).hasDerivWithinAt + have hv : derivWithin (fun r => s.E (r,x)) (Icc 0 T) t=slabElectricRHS s (t,x) := by + change _=curlMap (fderiv ℝ (fun y => s.B (t,y)) x)-current (fun z => s.f (t,z)) x + rw [sub_eq_iff_eq_add] at he + rw [he]; abel + rwa [hv] at hderiv + +lemma C1ClassicalPrefix.hasDerivWithinAt_magnetic {d : Datum} {s : Solution} {T : ℝ} + (hs : C1ClassicalPrefix d s T) (heq : SlabEquations s T) + (hE : SpatiallySmoothSlab T s.E) {t : ℝ} (ht : t∈Icc 0 T) (x : Vec) : + HasDerivWithinAt (fun r => s.B (r,x)) (slabMagneticRHS s (t,x)) (Icc 0 T) t := by + have he := (heq t ht).2.2.1 x + rw [curl_eq_curlMap ((hE.1 t ht).differentiable (by simp))] at he + have hderiv := (differentiableWithinAt_slab_time hs.B_c1 ht x).hasDerivWithinAt + have hv : derivWithin (fun r => s.B (r,x)) (Icc 0 T) t=slabMagneticRHS s (t,x) := + eq_neg_of_add_eq_zero_left he + rwa [hv] at hderiv + +lemma C1ClassicalPrefix.spatialJetRegular_all {d : Datum} {s : Solution} {T : ℝ} + (hT : 0 exact ⟨hf.spatialJetRegular,hE.spatialJetRegular,hB.spatialJetRegular⟩ + | succ n ih => + refine ⟨spatialJetRegular_succ hT n ih.1 (slabParticleRHS_regular ih.1 ih.2.1 ih.2.2) ?_, + spatialJetRegular_succ hT n ih.2.1 (slabElectricRHS_regular hT n ih.1 ih.2.2 hs.compact) ?_, + spatialJetRegular_succ hT n ih.2.2 (slabMagneticRHS_regular ih.2.1) ?_⟩ + · exact fun t ht z => hs.hasDerivWithinAt_particle heq hf ht z + · exact fun t ht x => hs.hasDerivWithinAt_electric heq hB ht x + · exact fun t ht x => hs.hasDerivWithinAt_magnetic heq hE ht x + +lemma C1ClassicalPrefix.smooth {d : Datum} {s : Solution} {T : ℝ} + (hT : 0 rw [contDiffOn_infty] + · exact fun n => (hs.spatialJetRegular_all hT heq hf hE hB n).1.regular + · exact fun n => (hs.spatialJetRegular_all hT heq hf hE hB n).2.1.regular + · exact fun n => (hs.spatialJetRegular_all hT heq hf hE hB n).2.2.regular + +theorem exists_local_smooth_classical_prefix (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 s.f (t,z))=(fun z => a.f (r,z))) + (hE : (fun x => s.E (t,x))=(fun x => a.E (r,x))) + (hB : (fun x => s.B (t,x))=(fun x => a.B (r,x))) : + (∀ z, slabParticleRHS s (t,z)=slabParticleRHS a (r,z)) ∧ + (∀ x, slabElectricRHS s (t,x)=slabElectricRHS a (r,x)) ∧ + (∀ x, slabMagneticRHS s (t,x)=slabMagneticRHS a (r,x)) := by + have hEv := congrFun hE + have hBv := congrFun hB + refine ⟨?_,?_,?_⟩ + · intro z + simp only [slabParticleRHS,lorentzField,hf,hEv,hBv] + · intro x + simp only [slabElectricRHS,hf,hB] + · intro x + simp only [slabMagneticRHS,hE] + +lemma pasteSolution_rhs (T : ℝ) (s a : Solution) : + slabParticleRHS (pasteSolution T s a)=timePaste T (slabParticleRHS s) (slabParticleRHS a) ∧ + slabElectricRHS (pasteSolution T s a)=timePaste T (slabElectricRHS s) (slabElectricRHS a) ∧ + slabMagneticRHS (pasteSolution T s a)=timePaste T (slabMagneticRHS s) (slabMagneticRHS a) := by + have hh (t : ℝ) : + (∀ z, slabParticleRHS (pasteSolution T s a) (t,z)=timePaste T (slabParticleRHS s) (slabParticleRHS a) (t,z)) ∧ + (∀ x, slabElectricRHS (pasteSolution T s a) (t,x)=timePaste T (slabElectricRHS s) (slabElectricRHS a) (t,x)) ∧ + (∀ x, slabMagneticRHS (pasteSolution T s a) (t,x)=timePaste T (slabMagneticRHS s) (slabMagneticRHS a) (t,x)) := by + by_cases ht : t≤T + · have he := slabRHS_congr (s:=pasteSolution T s a) (a:=s) + (timePaste_left T s.f a.f ht) (timePaste_left T s.E a.E ht) (timePaste_left T s.B a.B ht) + simpa only [timePaste,ht,ite_true] using he + · have hf : (fun z => (pasteSolution T s a).f (t,z))=(fun z => a.f (t-T,z)) := by + funext z; simp [pasteSolution,timePaste,ht] + have hE : (fun x => (pasteSolution T s a).E (t,x))=(fun x => a.E (t-T,x)) := by + funext x; simp [pasteSolution,timePaste,ht] + have hB : (fun x => (pasteSolution T s a).B (t,x))=(fun x => a.B (t-T,x)) := by + funext x; simp [pasteSolution,timePaste,ht] + simpa only [timePaste,ht,ite_false] using slabRHS_congr hf hE hB + exact ⟨funext fun p => (hh p.1).1 p.2,funext fun p => (hh p.1).2.1 p.2, + funext fun p => (hh p.1).2.2 p.2⟩ + +lemma spatiallySmooth_time_derivatives_smooth {s : Solution} {T : ℝ} (hT : 0 s.f (t,z)) ⊆ K) + (hft : ∀ t∈Icc 0 T, ∀ z, HasDerivWithinAt (fun r => s.f (r,z)) (slabParticleRHS s (t,z)) (Icc 0 T) t) + (hEt : ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt (fun r => s.E (r,x)) (slabElectricRHS s (t,x)) (Icc 0 T) t) + (hBt : ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt (fun r => s.B (r,x)) (slabMagneticRHS s (t,x)) (Icc 0 T) t) : + ContDiffOn ℝ ∞ s.f (particleSlab T) ∧ ContDiffOn ℝ ∞ s.E (fieldSlab T) ∧ + ContDiffOn ℝ ∞ s.B (fieldSlab T) := by + have hh (n : ℕ) : SpatialJetRegular n (Icc 0 T) s.f ∧ + SpatialJetRegular n (Icc 0 T) s.E ∧ SpatialJetRegular n (Icc 0 T) s.B := by + induction n with + | zero => exact ⟨hf.spatialJetRegular,hE.spatialJetRegular,hB.spatialJetRegular⟩ + | succ n ih => + exact ⟨spatialJetRegular_succ hT n ih.1 (slabParticleRHS_regular ih.1 ih.2.1 ih.2.2) hft, + spatialJetRegular_succ hT n ih.2.1 (slabElectricRHS_regular hT n ih.1 ih.2.2 hc) hEt, + spatialJetRegular_succ hT n ih.2.2 (slabMagneticRHS_regular ih.2.1) hBt⟩ + refine ⟨?_,?_,?_⟩ <;> rw [contDiffOn_infty] + · exact fun n => (hh n).1.regular + · exact fun n => (hh n).2.1.regular + · exact fun n => (hh n).2.2.regular + +lemma slabEquations_of_time_derivatives {s : Solution} {T : ℝ} (hT : 0 s.f (r,z)) (slabParticleRHS s (t,z)) (Icc 0 T) t) + (hEt : ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt (fun r => s.E (r,x)) (slabElectricRHS s (t,x)) (Icc 0 T) t) + (hBt : ∀ t∈Icc 0 T, ∀ x, HasDerivWithinAt (fun r => s.B (r,x)) (slabMagneticRHS s (t,x)) (Icc 0 T) t) + (hgauss : ∀ t∈Icc 0 T, (∀ x, divergence (fun y => s.E (t,y)) x=rho (fun z => s.f (t,z)) x) ∧ + (∀ x, divergence (fun y => s.B (t,y)) x=0)) : SlabEquations s T := by + intro t ht + refine ⟨?_,?_,?_,(hgauss t ht).1,(hgauss t ht).2⟩ + · intro x v + rw [(hft t ht (x,v)).derivWithin (uniqueDiffOn_Icc hT t ht)] + simp only [spatialPartial] + rw [←clm_sum_basis,←clm_sum_basis,add_assoc,fderiv_phase_split ((hf.1 t ht).differentiable (by simp) (x,v))] + exact neg_add_cancel _ + · intro x + rw [(hEt t ht x).derivWithin (uniqueDiffOn_Icc hT t ht), + curl_eq_curlMap ((hB.1 t ht).differentiable (by simp))] + dsimp only [slabElectricRHS]; abel + · intro x + rw [(hBt t ht x).derivWithin (uniqueDiffOn_Icc hT t ht), + curl_eq_curlMap ((hE.1 t ht).differentiable (by simp))] + exact neg_add_cancel _ + +lemma BoundedClassicalPrefix.paste {d : Datum} {s a : Solution} {T S : ℝ} + (hT : 0 (pasteSolution T s a).f (r,z)) + (slabParticleRHS (pasteSolution T s a) (t,z)) (Icc 0 (T+S)) t := by + rw [hR.1] + exact hasDerivWithinAt_timePaste hT.le hS.le + (fun u hu w => hs.classical.toC1.hasDerivWithinAt_particle hs.closed_equations hs.f_jets.1 hu w) + (fun u hu w => ha.classical.toC1.hasDerivWithinAt_particle ha.closed_equations ha.f_jets.1 hu w) + hjf hjR.1 ht z + have hEt (t : ℝ) (ht : t∈Icc 0 (T+S)) (x : Vec) : + HasDerivWithinAt (fun r => (pasteSolution T s a).E (r,x)) + (slabElectricRHS (pasteSolution T s a) (t,x)) (Icc 0 (T+S)) t := by + rw [hR.2.1] + exact hasDerivWithinAt_timePaste hT.le hS.le + (fun u hu y => hs.classical.toC1.hasDerivWithinAt_electric hs.closed_equations hs.B_jets.1 hu y) + (fun u hu y => ha.classical.toC1.hasDerivWithinAt_electric ha.closed_equations ha.B_jets.1 hu y) + hjE hjR.2.1 ht x + have hBt (t : ℝ) (ht : t∈Icc 0 (T+S)) (x : Vec) : + HasDerivWithinAt (fun r => (pasteSolution T s a).B (r,x)) + (slabMagneticRHS (pasteSolution T s a) (t,x)) (Icc 0 (T+S)) t := by + rw [hR.2.2] + exact hasDerivWithinAt_timePaste hT.le hS.le + (fun u hu y => hs.classical.toC1.hasDerivWithinAt_magnetic hs.closed_equations hs.E_jets.1 hu y) + (fun u hu y => ha.classical.toC1.hasDerivWithinAt_magnetic ha.closed_equations ha.E_jets.1 hu y) + hjB hjR.2.2 ht x + have hc : ∃ K : Set Phase, IsCompact K ∧ ∀ t∈Icc 0 (T+S), + tsupport (fun z => (pasteSolution T s a).f (t,z)) ⊆ K := by + obtain ⟨K,hK,hKb⟩ := hs.classical.compact + obtain ⟨L,hL,hLb⟩ := ha.classical.compact + refine ⟨K∪L,hK.union hL,?_⟩ + intro t ht + change tsupport (fun z => timePaste T s.f a.f (t,z)) ⊆ K∪L + by_cases hh : t≤T + · rw [timePaste_left T s.f a.f hh] + exact (hKb t ⟨ht.1,hh⟩).trans subset_union_left + · rw [timePaste_right T s.f a.f hjf (le_of_not_ge hh)] + exact (hLb (t-T) ⟨by linarith,by linarith [ht.2]⟩).trans subset_union_right + have heq : SlabEquations (pasteSolution T s a) (T+S) := by + apply slabEquations_of_time_derivatives (add_pos hT hS) hf.1 hE.1 hB.1 hft hEt hBt + intro t ht + change (∀ x, divergence (fun y => timePaste T s.E a.E (t,y)) x= + rho (fun z => timePaste T s.f a.f (t,z)) x) ∧ + (∀ x, divergence (fun y => timePaste T s.B a.B (t,y)) x=0) + by_cases hh : t≤T + · rw [timePaste_left T s.E a.E hh,timePaste_left T s.f a.f hh,timePaste_left T s.B a.B hh] + exact ⟨(hs.closed_equations t ⟨ht.1,hh⟩).2.2.2.1,(hs.closed_equations t ⟨ht.1,hh⟩).2.2.2.2⟩ + · rw [timePaste_right T s.E a.E hjE (le_of_not_ge hh),timePaste_right T s.f a.f hjf (le_of_not_ge hh), + timePaste_right T s.B a.B hjB (le_of_not_ge hh)] + have hu : t-T∈Icc 0 S := ⟨by linarith,by linarith [ht.2]⟩ + exact ⟨(ha.closed_equations (t-T) hu).2.2.2.1,(ha.closed_equations (t-T) hu).2.2.2.2⟩ + obtain ⟨hfs,hEs,hBs⟩ := spatiallySmooth_time_derivatives_smooth (add_pos hT hS) + hf.1 hE.1 hB.1 hc hft hEt hBt + refine ⟨⟨hfs,hEs,hBs,?_,slabTimeContinuousL2_timePaste hT.le hS.le hs.classical.E_L2 ha.classical.E_L2 hjE, + slabTimeContinuousL2_timePaste hT.le hS.le hs.classical.B_L2 ha.classical.B_L2 hjB,hc,heq.equationsBefore,?_,?_,?_⟩, + heq,hf,hE,hB⟩ + · intro t ht z + change 0≤timePaste T s.f a.f (t,z) + by_cases hh : t≤T + · rw [congrFun (timePaste_left T s.f a.f hh) z] + exact hs.classical.nonnegative t ⟨ht.1,hh⟩ z + · rw [congrFun (timePaste_right T s.f a.f hjf (le_of_not_ge hh)) z] + exact ha.classical.nonnegative (t-T) ⟨by linarith,by linarith [ht.2]⟩ z + · intro z; exact (congrFun (timePaste_left T s.f a.f hT.le) z).trans (hs.classical.initial_f z) + · intro x; exact (congrFun (timePaste_left T s.E a.E hT.le) x).trans (hs.classical.initial_E x) + · intro x; exact (congrFun (timePaste_left T s.B a.B hT.le) x).trans (hs.classical.initial_B x) + +theorem BoundedClassicalPrefix.extend {d : Datum} {s : Solution} {T : ℝ} + (hT : 0 F (t,x)) + +lemma slabTimeContinuousL2_compact {F : Field} {T : ℝ} (hT : 0≤T) + (hF : ContinuousOn F (fieldSlab T)) {K : Set Vec} (hK : IsCompact K) + (hz : ∀ t∈Icc 0 T, ∀ x∉K, F (t,x)=0) : SlabTimeContinuousL2 T F := by + let c : ℝ → ℝ := fun t => max 0 (min T t) + have hc : Continuous c := continuous_const.max (continuous_const.min continuous_id) + have hcm (t : ℝ) : c t∈Icc 0 T := ⟨le_max_left _ _,max_le hT (min_le_left _ _)⟩ + have hce (t : ℝ) (ht : t∈Icc 0 T) : c t=t := by + dsimp [c]; rw [min_eq_right ht.2,max_eq_right ht.1] + let G : Field := fun p => F (c p.1,p.2) + have hG : Continuous G := by + apply continuousOn_univ.mp + exact hF.comp (((hc.comp continuous_fst).prodMk continuous_snd).continuousOn) (fun p hp => hcm p.1) + have hL := timeContinuousL2_compact hG (fun U hU => ⟨K,hK,fun t ht x hx => hz _ (hcm t) x hx⟩) + obtain ⟨G₂,hGc,hGe⟩ := hL + refine ⟨G₂,hGc.mono (fun t ht => ht.1),fun t ht => ?_⟩ + simpa only [G,hce t ht] using hGe t ht.1 + +lemma slabTimeContinuousL2_of_exterior {F G : Field} {T : ℝ} (hT : 0≤T) + (hF : ContinuousOn F (fieldSlab T)) (hG : Continuous G) (hGL : TimeContinuousL2 G) + {K : Set Vec} (hK : IsCompact K) (hz : ∀ t∈Icc 0 T, ∀ x∉K, F (t,x)=G (t,x)) : + SlabTimeContinuousL2 T F := by + have hL := slabTimeContinuousL2_compact hT (hF.sub hG.continuousOn) hK + (fun t ht x hx => sub_eq_zero.mpr (hz t ht x hx)) + obtain ⟨D₂,hDc,hDe⟩ := hL + obtain ⟨G₂,hGc,hGe⟩ := hGL + refine ⟨fun t => G₂ t+D₂ t,(hGc.mono (fun t ht => ht.1)).add hDc,?_⟩ + intro t ht + filter_upwards [Lp.coeFn_add (G₂ t) (D₂ t),hGe t ht.1,hDe t ht] with x ha hg hd + rw [ha] + change (G₂ t : Vec → Vec) x+(D₂ t : Vec → Vec) x=F (t,x) + rw [hg,hd] + exact add_sub_cancel _ _ + +lemma picard_limit_slab_l2 {d : Datum} {S : ℕ → Solution} {E B : Field} {T A R P : ℝ} + (hT : 0≤T) (hEc : ContinuousOn E (fieldSlab T)) (hBc : ContinuousOn B (fieldSlab T)) + (hsm : ∀ n, ContDiff ℝ ∞ (S n).E ∧ ContDiff ℝ ∞ (S n).B) + (hr : ∀ n, PicardRegular d (S (n+1))) + (hV : ∀ n, TransportFor (S (n+1)) (S n).E (S n).B) + (hb : ∀ n, LocalParticleBound T A R P (S (n+1)).f) + (hEl : TendstoUniformlyOn (fun n => (S n).E) E atTop (fieldSlab T)) + (hBl : TendstoUniformlyOn (fun n => (S n).B) B atTop (fieldSlab T)) : + SlabTimeContinuousL2 T E ∧ SlabTimeContinuousL2 T B := by + have he := picard_uniform_limit_exterior hsm hr hV hb hEl hBl + have hn (x : Vec) (hx : x∉closedBall (0:Vec) (R+T)) : R+T<‖x‖ := by + simpa only [mem_closedBall,dist_zero_right,not_le] using hx + exact ⟨slabTimeContinuousL2_of_exterior hT hEc (hr 0).smooth_E.continuous (hr 0).l2E + (isCompact_closedBall (0:Vec) (R+T)) (fun t ht x hx => (he t ht x (hn x hx)).1), + slabTimeContinuousL2_of_exterior hT hBc (hr 0).smooth_B.continuous (hr 0).l2B + (isCompact_closedBall (0:Vec) (R+T)) (fun t ht x hx => (he t ht x (hn x hx)).2)⟩ + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/SmoothIntegral.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SmoothIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce728ce2d792379588654f746e8e78651b2aa41a --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SmoothIntegral.lean @@ -0,0 +1,202 @@ +import Mathlib + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM +universe u v + +section SpatialDerivatives +variable {A E W : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup W] [NormedSpace ℝ W] + +lemma contDiff_iteratedFDeriv_slice {F : A × E → W} (hF : ContDiff ℝ ∞ F) (n : ℕ) : + ContDiff ℝ ∞ (fun p : A × E => iteratedFDeriv ℝ n (fun x => F (p.1,x)) p.2) := by + induction n with + | zero => + exact (continuousMultilinearCurryFin0 ℝ E W).symm.contDiff.comp hF + | succ n ih => + let G : A × E → (E [×n]→L[ℝ] W) := fun p => iteratedFDeriv ℝ n (fun x => F (p.1,x)) p.2 + change ContDiff ℝ ∞ G at ih + have he (p : A × E) : fderiv ℝ (fun x => G (p.1,x)) p.2 = + (fderiv ℝ G p).comp (ContinuousLinearMap.inr ℝ A E) := by + have hin : HasFDerivAt (fun x : E => (p.1,x)) (ContinuousLinearMap.inr ℝ A E) p.2 := by + convert (hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id p.2) using 1 <;> rfl + exact ((ih.differentiable (by simp) p).hasFDerivAt.comp p.2 hin).fderiv + simp only [iteratedFDeriv_succ_eq_comp_left,Function.comp_apply] + change ContDiff ℝ ∞ (fun p : A × E => + (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n+1) => E) W).symm (fderiv ℝ (fun x => G (p.1,x)) p.2)) + simp_rw [he] + exact (continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (n+1) => E) W).symm.contDiff.comp + ((ih.fderiv_right (m:=∞) (by simp)).clm_comp contDiff_const) + +end SpatialDerivatives + +section CompactFamily +variable {α : Type v} {E : Type u} [TopologicalSpace α] + [NormedAddCommGroup E] [NormedSpace ℝ E] +variable {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] + +def SmoothCompactFamily (F : α → E → W) : Prop := + (∀ a, ContDiff ℝ ∞ (F a)) ∧ ∀ n : ℕ, + Continuous (fun p : E × α => iteratedFDeriv ℝ n (F p.2) p.1) + +lemma SmoothCompactFamily.ofJoint {A : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + {G : A × E → W} (hG : ContDiff ℝ ∞ G) {ι : α → A} (hι : Continuous ι) : + SmoothCompactFamily (fun a x => G (ι a,x)) := by + refine ⟨fun a => hG.comp (contDiff_const.prodMk contDiff_id),fun n => ?_⟩ + exact (contDiff_iteratedFDeriv_slice hG n).continuous.comp + ((hι.comp continuous_snd).prodMk continuous_fst) + +lemma SmoothCompactFamily.continuous {F : α → E → W} (hF : SmoothCompactFamily F) : + Continuous (fun p : E × α => F p.2 p.1) := by + have h := (continuousMultilinearCurryFin0 ℝ E W).continuous.comp (hF.2 0) + simpa only [iteratedFDeriv_zero_eq_comp,Function.comp_def,LinearIsometryEquiv.apply_symm_apply] using h + +lemma SmoothCompactFamily.derivFamily {F : α → E → W} (hF : SmoothCompactFamily F) : + SmoothCompactFamily (fun a => fderiv ℝ (F a)) := by + refine ⟨fun a => (hF.1 a).fderiv_right (m:=∞) (by simp),fun n => ?_⟩ + have he (p : E × α) : iteratedFDeriv ℝ n (fderiv ℝ (F p.2)) p.1 = + continuousMultilinearCurryRightEquiv' ℝ n E W (iteratedFDeriv ℝ (n+1) (F p.2) p.1) := by + rw [iteratedFDeriv_succ_eq_comp_right,Function.comp_apply,LinearIsometryEquiv.apply_symm_apply] + simp_rw [he] + exact (continuousMultilinearCurryRightEquiv' ℝ n E W).continuous.comp (hF.2 (n+1)) + +variable [MeasurableSpace α] [BorelSpace α] [CompactSpace α] [SecondCountableTopology α] + [ProperSpace E] [CompleteSpace W] + +omit [CompleteSpace W] in +lemma hasFDerivAt_integral_smoothFamily (μ : Measure α) [IsFiniteMeasure μ] + {F : α → E → W} (hF : SmoothCompactFamily F) (x : E) : + HasFDerivAt (fun y => ∫ a, F a y ∂μ) (∫ a, fderiv ℝ (F a) x ∂μ) x := by + have hD := hF.derivFamily.continuous + obtain ⟨C,hC⟩ := ((isCompact_closedBall x 1).prod isCompact_univ).image hD |>.isBounded |>.exists_norm_le + apply hasFDerivAt_integral_of_dominated_of_fderiv_le + (s:=closedBall x 1) (bound:=fun _ => C) (F':=fun y a => fderiv ℝ (F a) y) + (closedBall_mem_nhds x (by norm_num)) + · exact Eventually.of_forall (fun y => (hF.continuous.comp + (continuous_const.prodMk continuous_id)).aestronglyMeasurable) + · exact (hF.continuous.comp (continuous_const.prodMk continuous_id)).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + · exact (hD.comp (continuous_const.prodMk continuous_id)).aestronglyMeasurable + · exact ae_of_all _ (fun a y hy => hC _ ⟨(y,a),⟨hy,mem_univ a⟩,rfl⟩) + · exact integrable_const _ + · exact ae_of_all _ (fun a y _ => ((hF.1 a).differentiable (by simp) y).hasFDerivAt) + +lemma contDiff_integral_smoothFamily_nat (μ : Measure α) [IsFiniteMeasure μ] (n : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : α → E → W}, SmoothCompactFamily F → ContDiff ℝ n (fun x => ∫ a, F a x ∂μ) := by + induction n with + | zero => + intro W _ _ _ F hF + apply contDiff_zero.mpr + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hF.continuous.continuousOn + intro x a _ ha + exact (ha (mem_univ a)).elim + | succ n ih => + intro W _ _ _ F hF + rw [show (↑(n+1) : ℕ∞ω) = ↑n+1 by simp,contDiff_succ_iff_fderiv] + refine ⟨fun x => (hasFDerivAt_integral_smoothFamily μ hF x).differentiableAt,by simp,?_⟩ + have he : fderiv ℝ (fun x => ∫ a, F a x ∂μ) = (fun x => ∫ a, fderiv ℝ (F a) x ∂μ) := by + funext x + exact (hasFDerivAt_integral_smoothFamily μ hF x).fderiv + rw [he] + exact ih hF.derivFamily + +lemma contDiff_integral_smoothFamily (μ : Measure α) [IsFiniteMeasure μ] + {F : α → E → W} (hF : SmoothCompactFamily F) : ContDiff ℝ ∞ (fun x => ∫ a, F a x ∂μ) := by + rw [contDiff_infty] + exact fun n => contDiff_integral_smoothFamily_nat μ n hF + +lemma norm_iteratedFDeriv_integral_le (μ : Measure α) [IsFiniteMeasure μ] (n : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : α → E → W}, SmoothCompactFamily F → ∀ x, + ‖iteratedFDeriv ℝ n (fun y => ∫ a, F a y ∂μ) x‖ ≤ + ∫ a, ‖iteratedFDeriv ℝ n (F a) x‖ ∂μ := by + induction n with + | zero => + intro W _ _ _ F hF x + simpa only [norm_iteratedFDeriv_zero] using norm_integral_le_integral_norm (fun a => F a x) + | succ n ih => + intro W _ _ _ F hF x + rw [← norm_iteratedFDeriv_fderiv] + have he : fderiv ℝ (fun y => ∫ a, F a y ∂μ) = (fun y => ∫ a, fderiv ℝ (F a) y ∂μ) := by + funext y + exact (hasFDerivAt_integral_smoothFamily μ hF y).fderiv + rw [he] + simpa only [norm_iteratedFDeriv_fderiv] using ih hF.derivFamily x + +end CompactFamily + +variable {E W : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] [ProperSpace E] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + +attribute [local instance] Measure.Subtype.measureSpace in +lemma norm_iteratedFDeriv_intervalIntegral_le {F : ℝ × E → W} (hF : ContDiff ℝ ∞ F) + (n : ℕ) {a b : ℝ} (hab : a≤b) (x : E) : + ‖iteratedFDeriv ℝ n (fun y => ∫ r in a..b, F (r,y)) x‖ ≤ + ∫ r in a..b, ‖iteratedFDeriv ℝ n (fun y => F (r,y)) x‖ := by + let : CompactSpace (Icc a b) := isCompact_iff_compactSpace.mp isCompact_Icc + let : IsFiniteMeasure (volume : Measure (Icc a b)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_Icc.nullMeasurableSet] + exact isCompact_Icc.measure_lt_top⟩ + have hh := norm_iteratedFDeriv_integral_le + (E:=E) (W:=W) (volume : Measure (Icc a b)) n + (SmoothCompactFamily.ofJoint (α:=Icc a b) hF continuous_subtype_val) x + have he (y : E) : (∫ r : Icc a b, F ((r:ℝ),y)) = ∫ r in a..b, F (r,y) := by + rw [integral_subtype measurableSet_Icc (fun r => F (r,y)),integral_Icc_eq_integral_Ioc, + intervalIntegral.integral_of_le hab] + have he' : (∫ r : Icc a b, ‖iteratedFDeriv ℝ n (fun y => F ((r:ℝ),y)) x‖) = + ∫ r in a..b, ‖iteratedFDeriv ℝ n (fun y => F (r,y)) x‖ := by + rw [integral_subtype measurableSet_Icc (fun r => ‖iteratedFDeriv ℝ n (fun y => F (r,y)) x‖), + integral_Icc_eq_integral_Ioc,intervalIntegral.integral_of_le hab] + simp_rw [he] at hh + rwa [he'] at hh + +attribute [local instance] Measure.Subtype.measureSpace in +lemma contDiff_spatial_intervalIntegral {F : ℝ × E → W} (hF : ContDiff ℝ ∞ F) + {a b : ℝ} (hab : a≤b) : ContDiff ℝ ∞ (fun y => ∫ r in a..b, F (r,y)) := by + let : CompactSpace (Icc a b) := isCompact_iff_compactSpace.mp isCompact_Icc + let : IsFiniteMeasure (volume : Measure (Icc a b)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_Icc.nullMeasurableSet] + exact isCompact_Icc.measure_lt_top⟩ + have hh := contDiff_integral_smoothFamily (volume : Measure (Icc a b)) + (SmoothCompactFamily.ofJoint (α:=Icc a b) hF continuous_subtype_val) + have he (y : E) : (∫ r : Icc a b, F ((r:ℝ),y)) = ∫ r in a..b, F (r,y) := by + rw [integral_subtype measurableSet_Icc (fun r => F (r,y)),integral_Icc_eq_integral_Ioc, + intervalIntegral.integral_of_le hab] + simpa only [he] using hh + +lemma integral_gronwall_bound {f : ℝ → ℝ} (hf : Continuous f) {a b T : ℝ} + (ha : 0≤a) (hb : 0≤b) (hn : ∀ t∈Icc 0 T, 0≤f t) + (hbound : ∀ t∈Icc 0 T, f t≤a+b*∫ r in 0..t, f r) : + ∀ t∈Icc 0 T, f t≤a*Real.exp (b*t) := by + let g := fun t => a+b*∫ r in 0..t, f r + have hg : Continuous g := continuous_const.add + (continuous_const.mul (intervalIntegral.continuous_primitive hf.intervalIntegrable 0)) + have hnG (t : ℝ) (ht : t∈Icc 0 T) : 0≤g t := by + exact le_trans (hn t ht) (hbound t ht) + have hd (t : ℝ) : HasDerivAt g (b*f t) t := by + convert ((intervalIntegral.integral_hasDerivAt_right (hf.intervalIntegrable 0 t) + hf.stronglyMeasurable.stronglyMeasurableAtFilter hf.continuousAt).const_mul b).const_add a using 1 + have hh := norm_le_gronwallBound_of_norm_deriv_right_le hg.continuousOn + (fun t _ => (hd t).hasDerivWithinAt) (a:=0) (b:=T) (δ:=a) (K:=b) (ε:=0) + (by simp only [g,intervalIntegral.integral_same,mul_zero,add_zero,Real.norm_eq_abs,abs_of_nonneg ha]; exact le_rfl) + + (by + intro t ht + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg hb (hn t ⟨ht.1,ht.2.le⟩)), + Real.norm_eq_abs,abs_of_nonneg (hnG t ⟨ht.1,ht.2.le⟩),add_zero] + exact mul_le_mul_of_nonneg_left (hbound t ⟨ht.1,ht.2.le⟩) hb) + intro t ht + exact (hbound t ht).trans ((le_abs_self (g t)).trans (by + simpa only [Real.norm_eq_abs,gronwallBound_ε0,sub_zero] using hh t ht)) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/SpatialJets.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SpatialJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..0fb5733facf88efa8b5ff67f895ca5ec7307dbb6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/SpatialJets.lean @@ -0,0 +1,641 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.SlabEquations + +namespace OAI + +noncomputable section + +namespace RVM + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +section + +def SpatiallySmoothSlab {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] (T : ℝ) (F : ℝ × U → W) : Prop := + (∀ t∈Icc (0:ℝ) T, ContDiff ℝ ∞ (fun x => F (t,x))) ∧ + ∀ k : ℕ, ContinuousOn (fun p : ℝ × U => iteratedFDeriv ℝ k (fun x => F (p.1,x)) p.2) + {p | p.1∈Icc (0:ℝ) T} + +lemma spatiallySmoothSlab_of_uniform_jets {U W : Type} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℕ → ℝ × U → W} {f : ℝ × U → W} {T : ℝ} + (hF : ∀ n, ContDiff ℝ ∞ (F n)) + (hb : ∀ k : ℕ, ∃ C : ℝ, 0≤C ∧ ∀ n t, t∈Icc (0:ℝ) T → ∀ x, + ‖iteratedFDeriv ℝ k (fun y => F n (t,y)) x‖≤C) + (hl : TendstoUniformlyOn F f atTop {p | p.1∈Icc (0:ℝ) T}) : + SpatiallySmoothSlab T f := by + refine ⟨?_,?_⟩ + · intro t ht + rw [contDiff_infty] + exact fun n => (smooth_spatial_limit_nat n hF hb hl).1 t ht + · exact fun n => (smooth_spatial_limit_nat n hF hb hl).2.1 + +theorem exists_local_spatially_smooth_classical (d : Datum) (hd : Admissible d) : + ∃ T : ℝ, 0 (hQEB n t ht x 2 le_rfl).1), + curvature_of_second_derivative_bound ((hsm n).2.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (fun x => (hQEB n t ht x 2 le_rfl).2)⟩ + have hcurvf : ∀ n, PhaseParticleCurvature T (2*Q) (S (n+1)).f := by + intro n t ht + exact curvature_of_second_derivative_bound ((hr n).1.smooth_f.comp (contDiff_const.prodMk contDiff_id)) hQ0 + (hQf n t ht 2 le_rfl) + obtain ⟨f,hfl,hfc,hfn,hfi,hfb,hfLip⟩ := picard_particle_limit hd hT.le hL.le hN.le hsm hc hr hg + obtain ⟨hfC,hEC,hBC,heq⟩ := local_c1_limit_of_picard (s:=⟨f,E,B⟩) hT (by positivity) (by positivity) hM hL.le + (fun n => (hr n).1) (fun n => (hr n).2.1) hcurv hcurvf (fun n => (hr n).2.2.1) + (fun n => (hr n).2.2.2) hcLim.1 hfb hfc hfl hEl hBl + have hEi (x : Vec) : E (0,x)=d.E₀ x := by + have hh := (hEl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_E] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hBi (x : Vec) : B (0,x)=d.B₀ x := by + have hh := (hBl.seq_tendstoUniformlyOn (fun n => n+1) (tendsto_add_atTop_nat 1)).tendsto_at + (x:=(0,x)) (show (0:ℝ)∈Icc 0 T from ⟨le_rfl,hT.le⟩) + simp only [(hr _).1.initial_B] at hh + exact tendsto_nhds_unique hh tendsto_const_nhds + have hL2 := picard_limit_slab_l2 hT.le hEC.continuousOn hBC.continuousOn hsm + (fun n => (hr n).1) (fun n => (hr n).2.1) (fun n => (hr n).2.2.1) hEl hBl + refine ⟨T,hT,⟨f,E,B⟩,⟨hfC,hEC,hBC,hfn,hL2.1,hL2.2,hfb.compact,heq.equationsBefore,hfi,hEi,hBi⟩, + heq,?_,?_,?_⟩ + · apply spatiallySmoothSlab_of_uniform_jets (fun n => (hr n).1.smooth_f) _ hfl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht z => hQf n t ht k (by omega) z⟩ + · apply spatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).1) _ hEl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).1⟩ + · apply spatiallySmoothSlab_of_uniform_jets (fun n => (hsm n).2) _ hBl + intro k + obtain ⟨Q,hQ,hQE,hQf⟩ := hjets k + exact ⟨Q,zero_le_one.trans hQ,fun n t ht x => (hQE n t ht x k (by omega)).2⟩ + +universe u + +def SpatialJetRegular {U W : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] (n : ℕ∞) (J : Set ℝ) (F : ℝ × U → W) : Prop := + (∀ t∈J, ContDiff ℝ ∞ (fun x => F (t,x))) ∧ + ∀ j : ℕ, ContDiffOn ℝ n (fun p : ℝ × U => iteratedFDeriv ℝ j (fun x => F (p.1,x)) p.2) {p | p.1∈J} + +variable {U V W Z : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup W] [NormedSpace ℝ W] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] {n : ℕ∞} {J : Set ℝ} + +lemma SpatiallySmoothSlab.spatialJetRegular {F : ℝ × U → W} {T : ℝ} + (hF : SpatiallySmoothSlab T F) : SpatialJetRegular 0 (Icc 0 T) F := + ⟨hF.1,fun j => contDiffOn_zero.mpr (hF.2 j)⟩ + +lemma SpatialJetRegular.regular {F : ℝ × U → W} (hF : SpatialJetRegular n J F) : + ContDiffOn ℝ n F {p | p.1∈J} := by + have h := (continuousMultilinearCurryFin0 ℝ U W).contDiff.comp_contDiffOn (hF.2 0) + simpa only [iteratedFDeriv_zero_eq_comp,Function.comp_def,LinearIsometryEquiv.apply_symm_apply,Prod.mk.eta] using h + +lemma SpatialJetRegular.deriv {F : ℝ × U → W} (hF : SpatialJetRegular n J F) : + SpatialJetRegular n J (fun p : ℝ × U => fderiv ℝ (fun x => F (p.1,x)) p.2) := by + refine ⟨fun t ht => (hF.1 t ht).fderiv_right (m:=∞) (by simp),fun j => ?_⟩ + let A : (U [×(j+1)]→L[ℝ] W) →L[ℝ] (U [×j]→L[ℝ] U →L[ℝ] W) := + (continuousMultilinearCurryRightEquiv' ℝ j U W).toContinuousLinearEquiv.toContinuousLinearMap + have he := ContinuousLinearMap.contDiff (𝕜:=ℝ) (E:=U [×(j+1)]→L[ℝ] W) + (F:=U [×j]→L[ℝ] U →L[ℝ] W) (n:=(n:ℕ∞ω)) A + have h := he.comp_contDiffOn (hF.2 (j+1)) + simpa [A,iteratedFDeriv_succ_eq_comp_right,Function.comp_def] using h + +lemma SpatialJetRegular.clm {F : ℝ × U → V} (hF : SpatialJetRegular n J F) (L : V →L[ℝ] W) : + SpatialJetRegular n J (fun p => L (F p)) := by + refine ⟨fun t ht => L.contDiff.comp (hF.1 t ht),fun j => ?_⟩ + let A := (ContinuousLinearMap.compContinuousMultilinearMapL ℝ (fun _ : Fin j => U) V W) L + have h := A.contDiff.comp_contDiffOn (hF.2 j) + apply h.congr + intro p hp + exact L.iteratedFDeriv_comp_left (hF.1 p.1 hp).contDiffAt (by exact_mod_cast (le_top : (j:ℕ∞)≤⊤)) + +lemma SpatialJetRegular.add {F G : ℝ × U → W} (hF : SpatialJetRegular n J F) + (hG : SpatialJetRegular n J G) : SpatialJetRegular n J (fun p => F p+G p) := by + refine ⟨fun t ht => (hF.1 t ht).add (hG.1 t ht),fun j => ?_⟩ + apply ((hF.2 j).add (hG.2 j)).congr + intro p hp + exact congrFun (iteratedFDeriv_add + ((hF.1 p.1 hp).of_le (show (j:ℕ∞ω)≤∞ by exact_mod_cast (le_top : (j:ℕ∞)≤⊤))) ((hG.1 p.1 hp).of_le (by exact_mod_cast (le_top : (j:ℕ∞)≤⊤)))) p.2 + +lemma SpatialJetRegular.congr {F G : ℝ × U → W} (hF : SpatialJetRegular n J F) + (he : ∀ p : ℝ × U, p.1∈J → G p=F p) : SpatialJetRegular n J G := by + have hs (t : ℝ) (ht : t∈J) : (fun x => G (t,x))=(fun x => F (t,x)) := funext fun x => he (t,x) ht + refine ⟨fun t ht => by rw [hs t ht]; exact hF.1 t ht,fun j => ?_⟩ + apply (hF.2 j).congr + intro p hp + rw [hs p.1 hp] + +lemma spatialJetRegular_bilinear_jet (j : ℕ) : + ∀ {V W Z : Type u} [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] [NormedAddCommGroup Z] [NormedSpace ℝ Z] + (B : V →L[ℝ] W →L[ℝ] Z) {F : ℝ × U → V} {G : ℝ × U → W}, + SpatialJetRegular n J F → SpatialJetRegular n J G → + ContDiffOn ℝ n (fun p : ℝ × U => iteratedFDeriv ℝ j (fun x => B (F (p.1,x)) (G (p.1,x))) p.2) + {p | p.1∈J} := by + induction j with + | zero => + intro V W Z _ _ _ _ _ _ B F G hF hG + have h := ((B.contDiff.comp_contDiffOn hF.regular).clm_apply hG.regular) + simpa only [iteratedFDeriv_zero_eq_comp,Function.comp_def,Prod.mk.eta] using + (continuousMultilinearCurryFin0 ℝ U Z).symm.contDiff.comp_contDiffOn h + | succ j ih => + intro V W Z _ _ _ _ _ _ B F G hF hG + let DF := fun p : ℝ × U => fderiv ℝ (fun x => F (p.1,x)) p.2 + let DG := fun p : ℝ × U => fderiv ℝ (fun x => G (p.1,x)) p.2 + have h1 := ih (B.precompR U) hF hG.deriv + have h2 := ih (B.precompL U) hF.deriv hG + have h := (continuousMultilinearCurryRightEquiv' ℝ j U Z).symm.contDiff.comp_contDiffOn (h1.add h2) + apply h.congr + intro p hp + rw [iteratedFDeriv_succ_eq_comp_right,Function.comp_apply] + congr 1 + have he : fderiv ℝ (fun x => B (F (p.1,x)) (G (p.1,x))) = + fun x => B.precompR U (F (p.1,x)) (DG (p.1,x)) + B.precompL U (DF (p.1,x)) (G (p.1,x)) := by + funext x + exact B.fderiv_of_bilinear ((hF.1 p.1 hp).differentiable (by simp) x) + ((hG.1 p.1 hp).differentiable (by simp) x) + rw [he] + have hR : ContDiff ℝ ∞ (fun x => B.precompR U (F (p.1,x)) (DG (p.1,x))) := + by + have hB : ContDiff ℝ ∞ (B.precompR U) := ContinuousLinearMap.contDiff _ + exact (hB.comp (hF.1 p.1 hp)).clm_apply (hG.deriv.1 p.1 hp) + have hL : ContDiff ℝ ∞ (fun x => B.precompL U (DF (p.1,x)) (G (p.1,x))) := + by + have hB : ContDiff ℝ ∞ (B.precompL U) := ContinuousLinearMap.contDiff _ + exact (hB.comp (hF.deriv.1 p.1 hp)).clm_apply (hG.1 p.1 hp) + have hj : (j:ℕ∞ω)≤∞ := by exact_mod_cast (le_top : (j:ℕ∞)≤⊤) + exact congrFun (iteratedFDeriv_add (hR.of_le hj) (hL.of_le hj)) p.2 + +lemma SpatialJetRegular.bilinear {F : ℝ × U → V} {G : ℝ × U → W} + (hF : SpatialJetRegular n J F) (hG : SpatialJetRegular n J G) (B : V →L[ℝ] W →L[ℝ] Z) : + SpatialJetRegular n J (fun p => B (F p) (G p)) := by + exact ⟨fun t ht => (B.contDiff.comp (hF.1 t ht)).clm_apply (hG.1 t ht), + fun j => spatialJetRegular_bilinear_jet j B hF hG⟩ + +end + +section +universe u +variable {U : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] {n : ℕ∞} {J : Set ℝ} + +lemma spatialJetRegular_iterated (j : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] {F : ℝ × U → W}, + SpatialJetRegular n J F → SpatialJetRegular n J + (fun p : ℝ × U => iteratedFDeriv ℝ j (fun x => F (p.1,x)) p.2) := by + induction j with + | zero => + intro W _ _ F hF + let A : W →L[ℝ] (U [×0]→L[ℝ] W) := + (continuousMultilinearCurryFin0 ℝ U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + simpa [A,iteratedFDeriv_zero_eq_comp,Function.comp_def,Prod.mk.eta] using hF.clm A + | succ j ih => + intro W _ _ F hF + let A : (U [×j]→L[ℝ] U →L[ℝ] W) →L[ℝ] (U [×(j+1)]→L[ℝ] W) := + (continuousMultilinearCurryRightEquiv' ℝ j U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + simpa [A,iteratedFDeriv_succ_eq_comp_right,Function.comp_def,Prod.mk.eta] using (ih hF.deriv).clm A + +lemma SpatialJetRegular.mono_order {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : ℝ × U → W} {m : ℕ∞} (hF : SpatialJetRegular n J F) (h : m≤n) : SpatialJetRegular m J F := + ⟨hF.1,fun j => (hF.2 j).of_le (by exact_mod_cast h)⟩ + +end + +universe u +variable {U V W Z : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup W] [NormedSpace ℝ W] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] {n : ℕ∞} {J : Set ℝ} + +lemma SpatialJetRegular.precomp {F : ℝ × V → W} (hF : SpatialJetRegular n J F) (L : U →L[ℝ] V) : + SpatialJetRegular n J (fun p : ℝ × U => F (p.1,L p.2)) := by + refine ⟨fun t ht => (hF.1 t ht).comp L.contDiff,fun j => ?_⟩ + let A : (V [×j]→L[ℝ] W) →L[ℝ] (U [×j]→L[ℝ] W) := + ContinuousMultilinearMap.compContinuousLinearMapL (fun _ : Fin j => L) + have h := A.contDiff.comp_contDiffOn ((hF.2 j).comp + (contDiffOn_fst.prodMk (L.contDiff.comp_contDiffOn contDiffOn_snd)) (fun p hp => hp)) + apply h.congr + intro p hp + exact L.iteratedFDeriv_comp_right (hF.1 p.1 hp) p.2 + (by exact_mod_cast (le_top : (j:ℕ∞)≤⊤)) + +lemma spatialJetRegular_fixed {F : U → W} (hF : ContDiff ℝ ∞ F) : + SpatialJetRegular n J (fun p : ℝ × U => F p.2) := by + refine ⟨fun _ _ => hF,fun j => ?_⟩ + exact ((hF.iteratedFDeriv_right (m:=∞) (i:=j) (by exact_mod_cast (le_top : (⊤:ℕ∞)+(j:ℕ∞)≤⊤))).of_le + (by exact_mod_cast (le_top : n≤⊤))).comp_contDiffOn contDiffOn_snd + +lemma SpatialJetRegular.neg {F : ℝ × U → W} (hF : SpatialJetRegular n J F) : + SpatialJetRegular n J (fun p => -F p) := by + simpa using hF.clm (-(ContinuousLinearMap.id ℝ W)) + +lemma SpatialJetRegular.sub {F G : ℝ × U → W} (hF : SpatialJetRegular n J F) + (hG : SpatialJetRegular n J G) : SpatialJetRegular n J (fun p => F p-G p) := by + simpa only [sub_eq_add_neg] using hF.add hG.neg + +lemma SpatialJetRegular.prodMk {F : ℝ × U → V} {G : ℝ × U → W} + (hF : SpatialJetRegular n J F) (hG : SpatialJetRegular n J G) : + SpatialJetRegular n J (fun p => (F p,G p)) := by + convert (hF.clm (ContinuousLinearMap.inl ℝ V W)).add + (hG.clm (ContinuousLinearMap.inr ℝ V W)) using 1 + simp + +lemma SpatialJetRegular.clm_comp_const {F : ℝ × U → (V →L[ℝ] W)} + (hF : SpatialJetRegular n J F) (L : Z →L[ℝ] V) : + SpatialJetRegular n J (fun p => (F p).comp L) := by + exact hF.clm ((ContinuousLinearMap.compL ℝ Z V W).flip L) + +lemma SpatialJetRegular.clm_apply {F : ℝ × U → (V →L[ℝ] W)} {G : ℝ × U → V} + (hF : SpatialJetRegular n J F) (hG : SpatialJetRegular n J G) : + SpatialJetRegular n J (fun p => F p (G p)) := + hF.bilinear hG (ContinuousLinearMap.id ℝ (V →L[ℝ] W)) + +end + + +open Set Filter Metric MeasureTheory +open scoped Topology + +lemma hasFDerivWithinAt_integral_dominated + {A H E : Type*} [MeasurableSpace A] {μ : Measure A} + [NormedAddCommGroup H] [NormedSpace ℝ H] + [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + {F : H → A → E} {F' : A → H →L[ℝ] E} {s : Set H} {x₀ : H} {b : A → ℝ} + (hF : ∀ᶠ x in 𝓝[s] x₀, Integrable (F x) μ) (hF₀ : Integrable (F x₀) μ) + (hF' : Integrable F' μ) (hb : Integrable b μ) (hbn : ∀ a, 0 ≤ b a) + (hlip : ∀ᶠ x in 𝓝[s] x₀, ∀ᵐ a ∂μ, ‖F x a-F x₀ a‖ ≤ b a*‖x-x₀‖) + (hd : ∀ᵐ a ∂μ, HasFDerivWithinAt (F · a) (F' a) s x₀) : + HasFDerivWithinAt (fun x => ∫ a, F x a ∂μ) (∫ a, F' a ∂μ) s x₀ := by + have hn (x : H) : 0 ≤ ‖x-x₀‖⁻¹ := inv_nonneg.mpr (norm_nonneg _) + have he : ∀ᶠ x in 𝓝[s] x₀, + ‖x-x₀‖⁻¹ * ‖((∫ a, F x a ∂μ)-(∫ a, F x₀ a ∂μ))-(∫ a, F' a ∂μ) (x-x₀)‖ = + ‖∫ a, ‖x-x₀‖⁻¹ • (F x a-F x₀ a-F' a (x-x₀)) ∂μ‖ := by + filter_upwards [hF] with x hx + rw [← norm_smul_of_nonneg (hn _), integral_smul, integral_sub, + integral_sub, ← ContinuousLinearMap.integral_apply hF'] + exacts [hx, hF₀, hx.sub hF₀, hF'.apply_continuousLinearMap _] + rw [hasFDerivWithinAt_iff_tendsto, tendsto_congr' he, + ← tendsto_zero_iff_norm_tendsto_zero, + ← show (∫ a : A, ‖x₀-x₀‖⁻¹ • (F x₀ a-F x₀ a-F' a (x₀-x₀)) ∂μ)=0 by simp] + apply tendsto_integral_filter_of_dominated_convergence (bound := fun a => b a+‖F' a‖) + · filter_upwards [hF] with x hx + exact ((hx.aestronglyMeasurable.sub hF₀.aestronglyMeasurable).sub + (hF'.aestronglyMeasurable.apply_continuousLinearMap _)).const_smul _ + · filter_upwards [hlip] with x hx + filter_upwards [hx] with a ha + calc + ‖‖x-x₀‖⁻¹ • (F x a-F x₀ a-F' a (x-x₀))‖ + ≤ ‖x-x₀‖⁻¹ * (‖F x a-F x₀ a‖+‖F' a (x-x₀)‖) := by + rw [norm_smul_of_nonneg (hn _)]; gcongr; exact norm_sub_le _ _ + _ ≤ ‖x-x₀‖⁻¹ * (b a*‖x-x₀‖+‖F' a‖*‖x-x₀‖) := by + gcongr; exact (F' a).le_opNorm _ + _ ≤ b a+‖F' a‖ := by + rw [← add_mul, ← div_eq_inv_mul] + have hab := hbn a + apply div_le_of_le_mul₀ <;> first | rfl | positivity + · exact hb.add hF'.norm + · filter_upwards [hd] with a ha + suffices Tendsto (fun x => ‖x-x₀‖⁻¹ • (F x a-F x₀ a-F' a (x-x₀))) + (𝓝[s] x₀) (𝓝 0) by simpa + rw [tendsto_zero_iff_norm_tendsto_zero] + have heq : (fun x => ‖x-x₀‖⁻¹ * ‖F x a-F x₀ a-F' a (x-x₀)‖) = + (fun x => ‖‖x-x₀‖⁻¹ • (F x a-F x₀ a-F' a (x-x₀))‖) := by + funext x; rw [norm_smul_of_nonneg (hn x)] + rwa [hasFDerivWithinAt_iff_tendsto,heq] at ha + + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +section +universe u +section Differentiation +variable {H A W : Type u} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [TopologicalSpace A] [CompactSpace A] [MeasurableSpace A] [BorelSpace A] + {μ : Measure A} [IsFiniteMeasure μ] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {S : Set H} {F : H → A → W} {D : H → A → H →L[ℝ] W} + +lemma hasFDerivWithinAt_integral_compactFamily (hSc : IsClosed S) (hSv : Convex ℝ S) + (hF : ContinuousOn F.uncurry (S ×ˢ univ)) (hD : ContinuousOn D.uncurry (S ×ˢ univ)) + (hd : ∀ x∈S, ∀ a, HasFDerivWithinAt (fun y => F y a) (D x a) S x) + {x : H} (hx : x∈S) : + HasFDerivWithinAt (fun y => ∫ a, F y a ∂μ) (∫ a, D x a ∂μ) S x := by + have hc {Z : Type u} [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {G : H → A → Z} (hG : ContinuousOn G.uncurry (S ×ˢ univ)) {y : H} (hy : y∈S) : + Continuous (G y) := by + apply continuousOn_univ.mp + exact hG.comp ((continuous_const.prodMk continuous_id).continuousOn) (fun a _ => ⟨hy,mem_univ a⟩) + have hi (y : H) (hy : y∈S) : Integrable (F y) μ := + (hc hF hy).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) + have hiD : Integrable (D x) μ := + (hc hD hx).integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _) + let K := S ∩ closedBall x 1 + have hK : IsCompact K := (isCompact_closedBall x 1).inter_left hSc + obtain ⟨C,hC⟩ := ((hK.prod isCompact_univ).image_of_continuousOn + (hD.mono (fun p hp => ⟨hp.1.1,hp.2⟩))).isBounded.exists_norm_le + let B := max C 0 + have hB : 0≤B := le_max_right _ _ + have hb (y : H) (hy : y∈K) (a : A) : ‖D y a‖≤B := + (hC _ ⟨(y,a),⟨hy,mem_univ a⟩,rfl⟩).trans (le_max_left _ _) + have hxl : x∈K := ⟨hx,mem_closedBall_self (by norm_num)⟩ + have hnear : ∀ᶠ y in 𝓝[S] x, y∈K := + Filter.inter_mem self_mem_nhdsWithin (mem_nhdsWithin_of_mem_nhds (closedBall_mem_nhds x (by norm_num))) + apply hasFDerivWithinAt_integral_dominated + (hF:=Filter.Eventually.mono (self_mem_nhdsWithin : ∀ᶠ y in 𝓝[S] x, y∈S) (fun y hy => hi y hy)) (hF₀:=hi x hx) + (hF':=hiD) (b:=fun _ => B) (hb:=integrable_const _) (hbn:=fun _ => hB) + · filter_upwards [hnear] with y hy + exact ae_of_all _ fun a => Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le + (fun z hz => (hd z hz.1 a).mono inter_subset_left) (fun z hz => hb z hz a) + (hSv.inter (convex_closedBall x 1)) hxl hy + · exact ae_of_all _ (hd x hx) +end Differentiation + +variable {H V A : Type u} [NormedAddCommGroup H] [NormedSpace ℝ H] [ProperSpace H] + [NormedAddCommGroup V] [NormedSpace ℝ V] + [TopologicalSpace A] [CompactSpace A] [MeasurableSpace A] [BorelSpace A] + {μ : Measure A} [IsFiniteMeasure μ] {v : A → V} (hv : Continuous v) + {S : Set H} (hSc : IsClosed S) (hSv : Convex ℝ S) (hSu : UniqueDiffOn ℝ S) + +include hv hSc hSv hSu in + +lemma contDiffOn_integral_compact_parameter_nat (n : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × V → W}, ContDiffOn ℝ n F (S ×ˢ univ) → + ContDiffOn ℝ n (fun x => ∫ a, F (x,v a) ∂μ) S := by + induction n with + | zero => + intro W _ _ _ F hF + apply contDiffOn_zero.mpr + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ + · exact hF.continuousOn.comp + ((continuous_fst.prodMk (hv.comp continuous_snd)).continuousOn) (fun p hp => ⟨hp.1,mem_univ _⟩) + · intro x a _ ha; exact (ha (mem_univ a)).elim + | succ n ih => + intro W _ _ _ F hF + have hu := hSu.prod (uniqueDiffOn_univ (𝕜:=ℝ) (E:=V)) + have hn : (↑(n+1) : ℕ∞ω)=(n:ℕ∞ω)+1 := by simp + rw [hn] at hF ⊢ + let D := fderivWithin ℝ F (S ×ˢ univ) + have hD : ContDiffOn ℝ n D (S ×ˢ univ) := hF.fderivWithin hu le_rfl + let L : H →L[ℝ] H × V := ContinuousLinearMap.inl ℝ H V + have hd (x : H) (hx : x∈S) : HasFDerivWithinAt + (fun y => ∫ a, F (y,v a) ∂μ) (∫ a, (D (x,v a)).comp L ∂μ) S x := by + refine hasFDerivWithinAt_integral_compactFamily (μ:=μ) + (F:=fun y a => F (y,v a)) (D:=fun y a => (D (y,v a)).comp L) hSc hSv ?_ ?_ ?_ hx + · exact hF.continuousOn.comp + ((continuous_fst.prodMk (hv.comp continuous_snd)).continuousOn) (fun p hp => ⟨hp.1,mem_univ _⟩) + · exact (hD.continuousOn.comp + ((continuous_fst.prodMk (hv.comp continuous_snd)).continuousOn) + (fun p hp => ⟨hp.1,mem_univ _⟩)).clm_comp continuousOn_const + · intro y hy a + have hi : HasFDerivWithinAt (fun z : H => (z,v a)) L S y := by + convert ((hasFDerivAt_id y).prodMk (hasFDerivAt_const (v a) y)).hasFDerivWithinAt (s:=S) using 1 <;> rfl + have ho : HasFDerivWithinAt F (D (y,v a)) (S ×ˢ univ) (y,v a) := + (hF.differentiableOn (by simp) (y,v a) ⟨hy,mem_univ _⟩).hasFDerivWithinAt + exact ho.comp y hi (show MapsTo (fun z : H => (z,v a)) S (S ×ˢ (univ : Set V)) from fun z hz => ⟨hz,mem_univ _⟩) + rw [contDiffOn_succ_iff_fderivWithin hSu] + refine ⟨fun x hx => (hd x hx).differentiableWithinAt,by simp,?_⟩ + have he (x : H) (hx : x∈S) : fderivWithin ℝ (fun y => ∫ a, F (y,v a) ∂μ) S x = + ∫ a, (D (x,v a)).comp L ∂μ := (hd x hx).fderivWithin (hSu x hx) + exact (ih (hD.clm_comp contDiffOn_const)).congr he + +end + +universe u +variable {U V A : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] [ProperSpace U] + [NormedAddCommGroup V] [NormedSpace ℝ V] + [TopologicalSpace A] [CompactSpace A] [SecondCountableTopology A] [MeasurableSpace A] [BorelSpace A] + {μ : Measure A} [IsFiniteMeasure μ] {v : A → V} (hv : Continuous v) + {T : ℝ} (hT : 0 ∫ a, F (p.1,p.2,v a) ∂μ) {p | p.1∈Icc 0 T} := by + have hs : {p : ℝ × U | p.1∈Icc 0 T}=Icc 0 T ×ˢ (univ : Set U) := by ext p; simp + apply contDiffOn_integral_compact_parameter_nat (μ:=μ) + (F:=fun p : (ℝ × U) × V => F (p.1.1,p.1.2,p.2)) hv + (isClosed_Icc.preimage continuous_fst) + (by simpa only [Set.preimage,hs] using (convex_Icc (𝕜:=ℝ) 0 T).prod (convex_univ (𝕜:=ℝ) (E:=U))) + (by simpa only [Set.preimage,hs] using (uniqueDiffOn_Icc hT).prod (uniqueDiffOn_univ (𝕜:=ℝ) (E:=U))) n + exact hF.regular.comp + (contDiffOn_fst.fst.prodMk (contDiffOn_fst.snd.prodMk contDiffOn_snd)) (fun p hp => hp.1) + +omit [ProperSpace U] [CompactSpace A] [SecondCountableTopology A] [MeasurableSpace A] [BorelSpace A] in +include hv in +lemma spatialJet_compactFamily + {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℝ × (U × V) → W} (hF : SpatialJetRegular n (Icc 0 T) F) + {t : ℝ} (ht : t∈Icc 0 T) : + SmoothCompactFamily (fun a x => F (t,x,v a)) := by + apply SmoothCompactFamily.ofJoint (G:=fun p : V × U => F (t,p.2,p.1)) + · exact (hF.1 t ht).comp (contDiff_snd.prodMk contDiff_fst) + · exact hv + +include hv in +lemma fderiv_integral_spatialJet + {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℝ × (U × V) → W} (hF : SpatialJetRegular n (Icc 0 T) F) + {t : ℝ} (ht : t∈Icc 0 T) (x : U) : + fderiv ℝ (fun y => ∫ a, F (t,y,v a) ∂μ) x = + ∫ a, (fderiv ℝ (fun z => F (t,z)) (x,v a)).comp (ContinuousLinearMap.inl ℝ U V) ∂μ := by + rw [(hasFDerivAt_integral_smoothFamily μ (spatialJet_compactFamily hv n hF ht) x).fderiv] + apply integral_congr_ae + apply ae_of_all + intro a + have hi : HasFDerivAt (fun y : U => (y,v a)) (ContinuousLinearMap.inl ℝ U V) x := by + convert ((hasFDerivAt_id (𝕜:=ℝ) x).prodMk (hasFDerivAt_const (v a) x)) using 1 <;> rfl + exact (((hF.1 t ht).differentiable (by simp) (x,v a)).hasFDerivAt.comp x hi).fderiv + +include hv hT in +lemma spatialJetRegular_integral_jet (j : ℕ) : + ∀ {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℝ × (U × V) → W}, SpatialJetRegular n (Icc 0 T) F → + ContDiffOn ℝ n (fun p : ℝ × U => + iteratedFDeriv ℝ j (fun x => ∫ a, F (p.1,x,v a) ∂μ) p.2) {p | p.1∈Icc 0 T} := by + induction j with + | zero => + intro W _ _ _ F hF + let C : W →L[ℝ] (U [×0]→L[ℝ] W) := + (continuousMultilinearCurryFin0 ℝ U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + simpa [C,iteratedFDeriv_zero_eq_comp,Function.comp_def] using + C.contDiff.comp_contDiffOn (contDiffOn_integral_spatialJet hv hT n hF) + | succ j ih => + intro W _ _ _ F hF + let G := fun p : ℝ × (U × V) => + (fderiv ℝ (fun z => F (p.1,z)) p.2).comp (ContinuousLinearMap.inl ℝ U V) + have hG : SpatialJetRegular n (Icc 0 T) G := hF.deriv.clm_comp_const _ + let C : (U [×j]→L[ℝ] U →L[ℝ] W) →L[ℝ] (U [×(j+1)]→L[ℝ] W) := + (continuousMultilinearCurryRightEquiv' ℝ j U W).symm.toContinuousLinearEquiv.toContinuousLinearMap + have hh := C.contDiff.comp_contDiffOn (ih hG) + apply hh.congr + intro p hp + rw [iteratedFDeriv_succ_eq_comp_right,Function.comp_apply] + change _=C _ + have he : fderiv ℝ (fun x => ∫ a, F (p.1,x,v a) ∂μ) = + (fun x => ∫ a, G (p.1,x,v a) ∂μ) := by + funext x; exact fderiv_integral_spatialJet hv n hF hp x + rw [he] + rfl + +include hv hT in +lemma SpatialJetRegular.integral_compact + {W : Type u} [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : ℝ × (U × V) → W} (hF : SpatialJetRegular n (Icc 0 T) F) : + SpatialJetRegular n (Icc 0 T) (fun p : ℝ × U => ∫ a, F (p.1,p.2,v a) ∂μ) := by + refine ⟨fun t ht => contDiff_integral_smoothFamily μ (spatialJet_compactFamily hv n hF ht),?_⟩ + exact fun j => spatialJetRegular_integral_jet hv hT n j hF + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +universe u +variable {U W : Type u} [NormedAddCommGroup U] [NormedSpace ℝ U] [ProperSpace U] + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {J : Set ℝ} {F G : ℝ × U → W} + +omit [ProperSpace U] [CompleteSpace W] in +lemma SpatialJetRegular.compactTimeFamily (hF : SpatialJetRegular 0 J F) + {a b : ℝ} (hsub : Icc a b ⊆ J) : + SmoothCompactFamily (fun t : Icc a b => fun x => F (t,x)) := by + let : CompactSpace (Icc a b) := isCompact_iff_compactSpace.mp isCompact_Icc + refine ⟨fun t => hF.1 t (hsub t.property),fun j => ?_⟩ + exact (hF.2 j).continuousOn.comp_continuous + ((continuous_subtype_val.comp continuous_snd).prodMk continuous_fst) + (fun p => hsub p.2.property) + +omit [CompleteSpace W] in +attribute [local instance] Measure.Subtype.measureSpace in +lemma SpatialJetRegular.hasFDerivAt_timeIntegral (hF : SpatialJetRegular 0 J F) + {a b : ℝ} (hab : a≤b) (hsub : Icc a b ⊆ J) (x : U) : + HasFDerivAt (fun y => ∫ r in a..b, F (r,y)) + (∫ r in a..b, fderiv ℝ (fun y => F (r,y)) x) x := by + let : CompactSpace (Icc a b) := isCompact_iff_compactSpace.mp isCompact_Icc + let : IsFiniteMeasure (volume : Measure (Icc a b)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_Icc.nullMeasurableSet] + exact isCompact_Icc.measure_lt_top⟩ + have hh := hasFDerivAt_integral_smoothFamily (volume : Measure (Icc a b)) + (hF.compactTimeFamily hsub) x + have he (y : U) : (∫ r : Icc a b, F ((r:ℝ),y)) = ∫ r in a..b, F (r,y) := by + rw [integral_subtype measurableSet_Icc (fun r => F (r,y)),integral_Icc_eq_integral_Ioc, + intervalIntegral.integral_of_le hab] + have he' : (∫ r : Icc a b, fderiv ℝ (fun y => F ((r:ℝ),y)) x) = + ∫ r in a..b, fderiv ℝ (fun y => F (r,y)) x := by + rw [integral_subtype measurableSet_Icc (fun r => fderiv ℝ (fun y => F (r,y)) x), + integral_Icc_eq_integral_Ioc,intervalIntegral.integral_of_le hab] + simpa only [he,he'] using hh + +lemma space_time_derivative_interval (hF : SpatialJetRegular 0 J F) (hG : SpatialJetRegular 0 J G) + (htime : ∀ t∈J, ∀ x, HasDerivAt (fun r => F (r,x)) (G (t,x)) t) + {a b t : ℝ} (hsub : Icc a b ⊆ J) (ht : t∈Ioo a b) (x : U) : + HasDerivAt (fun r => fderiv ℝ (fun y => F (r,y)) x) + (fderiv ℝ (fun y => G (t,y)) x) t := by + let DF := fun r => fderiv ℝ (fun y => F (r,y)) x + let DG := fun r => fderiv ℝ (fun y => G (r,y)) x + have hcG (y : U) : ContinuousOn (fun r => G (r,y)) (Icc a b) := + hG.regular.continuousOn.comp ((continuous_id.prodMk continuous_const).continuousOn) (fun r hr => hsub hr) + have hcDG : ContinuousOn DG (Icc a b) := + hG.deriv.regular.continuousOn.comp ((continuous_id.prodMk continuous_const).continuousOn) (fun r hr => hsub hr) + have he (r : ℝ) (hr : r∈Ioo a b) : DF r = DF a+∫ u in a..r, DG u := by + have hsub' : Icc a r ⊆ J := fun u hu => hsub ⟨hu.1,hu.2.trans hr.2.le⟩ + have hgi (y : U) : IntervalIntegrable (fun u => G (u,y)) volume a r := + ContinuousOn.intervalIntegrable_of_Icc hr.1.le (hcG y |>.mono (Icc_subset_Icc_right hr.2.le)) + have heq : (fun y => ∫ u in a..r, G (u,y)) = (fun y => F (r,y)-F (a,y)) := by + funext y + apply intervalIntegral.integral_eq_sub_of_hasDerivAt + · intro u hu + rw [uIcc_of_le hr.1.le] at hu + exact htime u (hsub' hu) y + · exact hgi y + have hd := hG.hasFDerivAt_timeIntegral hr.1.le hsub' x + rw [heq] at hd + have hdf := (((hF.1 r (hsub ⟨hr.1.le,hr.2.le⟩)).differentiable (by simp) x).hasFDerivAt.sub + (((hF.1 a (hsub ⟨le_rfl,hr.1.le.trans hr.2.le⟩)).differentiable (by simp) x).hasFDerivAt)) + have hh := hd.unique hdf + change (∫ u in a..r, DG u)=DF r-DF a at hh + rw [hh] + abel + have hgi : IntervalIntegrable DG volume a t := + ContinuousOn.intervalIntegrable_of_Icc ht.1.le (hcDG.mono (Icc_subset_Icc_right ht.2.le)) + have hgopen : ContinuousOn DG (Ioo a b) := hcDG.mono Ioo_subset_Icc_self + have hd := intervalIntegral.integral_hasDerivAt_right hgi + (ContinuousOn.stronglyMeasurableAtFilter isOpen_Ioo hgopen t ht) + (hgopen.continuousAt (Ioo_mem_nhds ht.1 ht.2)) + exact (hd.const_add (DF a)).congr_of_eventuallyEq + (Filter.eventually_of_mem (Ioo_mem_nhds ht.1 ht.2) fun r hr => he r hr) + +lemma space_time_derivative_open (hJ : IsOpen J) (hF : SpatialJetRegular 0 J F) + (hG : SpatialJetRegular 0 J G) + (htime : ∀ t∈J, ∀ x, HasDerivAt (fun r => F (r,x)) (G (t,x)) t) + {t : ℝ} (ht : t∈J) (x : U) : + HasDerivAt (fun r => fderiv ℝ (fun y => F (r,y)) x) + (fderiv ℝ (fun y => G (t,y)) x) t := by + obtain ⟨ε,hε,hεJ⟩ := Metric.mem_nhds_iff.mp (hJ.mem_nhds ht) + apply space_time_derivative_interval hF hG htime (a:=t-ε/2) (b:=t+ε/2) _ ⟨by linarith,by linarith⟩ x + intro r hr + apply hεJ + rw [mem_ball,Real.dist_eq,abs_lt] + constructor <;> linarith [hr.1,hr.2] + +lemma space_time_derivative_slab {T : ℝ} (hT : 0 F (r,x)) (G (t,x)) (Icc 0 T) t) + {t : ℝ} (ht : t∈Icc 0 T) (x : U) : + HasDerivWithinAt (fun r => fderiv ℝ (fun y => F (r,y)) x) + (fderiv ℝ (fun y => G (t,y)) x) (Icc 0 T) t := by + let DF := fun r => fderiv ℝ (fun y => F (r,y)) x + let DG := fun r => fderiv ℝ (fun y => G (r,y)) x + have hcG (y : U) : ContinuousOn (fun r => G (r,y)) (Icc 0 T) := + hG.regular.continuousOn.comp ((continuous_id.prodMk continuous_const).continuousOn) (fun _ hr => hr) + have hcF (y : U) : ContinuousOn (fun r => F (r,y)) (Icc 0 T) := + hF.regular.continuousOn.comp ((continuous_id.prodMk continuous_const).continuousOn) (fun _ hr => hr) + have hcDG : ContinuousOn DG (Icc 0 T) := + hG.deriv.regular.continuousOn.comp ((continuous_id.prodMk continuous_const).continuousOn) (fun _ hr => hr) + have he (r : ℝ) (hr : r∈Icc 0 T) : DF r = DF 0+∫ u in 0..r, DG u := by + have hsub : Icc 0 r ⊆ Icc 0 T := Icc_subset_Icc_right hr.2 + have hgi (y : U) : IntervalIntegrable (fun u => G (u,y)) volume 0 r := + ContinuousOn.intervalIntegrable_of_Icc hr.1 ((hcG y).mono hsub) + have heq : (fun y => ∫ u in 0..r, G (u,y)) = (fun y => F (r,y)-F (0,y)) := by + funext y + apply intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hr.1 ((hcF y).mono hsub) _ (hgi y) + intro u hu + exact (htime u ⟨hu.1.le,hu.2.le.trans hr.2⟩ y).hasDerivAt + (Icc_mem_nhds hu.1 (hu.2.trans_le hr.2)) + have hd := hG.hasFDerivAt_timeIntegral hr.1 hsub x + rw [heq] at hd + have hdf := (((hF.1 r hr).differentiable (by simp) x).hasFDerivAt.sub + (((hF.1 0 ⟨le_rfl,hT.le⟩).differentiable (by simp) x).hasFDerivAt)) + have hh := hd.unique hdf + change (∫ u in 0..r, DG u)=DF r-DF 0 at hh + rw [hh] + abel + have hgi : IntervalIntegrable DG volume 0 t := + ContinuousOn.intervalIntegrable_of_Icc ht.1 (hcDG.mono (Icc_subset_Icc_right ht.2)) + let : Fact (t∈Icc (0:ℝ) T) := ⟨ht⟩ + have hd := intervalIntegral.integral_hasDerivWithinAt_right (s:=Icc 0 T) (t:=Icc 0 T) hgi + (hcDG.stronglyMeasurableAtFilter_nhdsWithin measurableSet_Icc t) (hcDG t ht) + exact (hd.const_add (DF 0)).congr he (he t ht) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/TameDerivative.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/TameDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..de33438fa9be52c03c16864c0f1d6c844451463c --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/TameDerivative.lean @@ -0,0 +1,167 @@ +import Mathlib + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [NormedAddCommGroup G] [NormedSpace ℝ G] + +lemma tame_iteratedFDeriv_comp (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (g : F → G) (f : E → F), ContDiff ℝ ∞ g → ContDiff ℝ ∞ f → + ∀ x, (∀ i : ℕ, 1 ≤ i → i ≤ n → ‖iteratedFDeriv ℝ i g (f x)‖ ≤ A) → + (∀ i : ℕ, 1 ≤ i → i ≤ n → ‖iteratedFDeriv ℝ i f x‖ ≤ A) → + ‖iteratedFDeriv ℝ (n+1) (g ∘ f) x‖ ≤ + C*(1+‖iteratedFDeriv ℝ (n+1) g (f x)‖+‖iteratedFDeriv ℝ (n+1) f x‖) := by + let c : ℕ → ℝ := fun i => (n.choose i : ℝ)*i.factorial*A^(i+1) + let S := ∑ i∈Finset.range (n+1), c i + refine ⟨A+S*(A+1),by dsimp [S,c]; positivity,?_⟩ + intro g f hg hf x hgl hfl + let Mg := ‖iteratedFDeriv ℝ (n+1) g (f x)‖ + let Mf := ‖iteratedFDeriv ℝ (n+1) f x‖ + have hMg : 0 ≤ Mg := norm_nonneg _ + have hMf : 0 ≤ Mf := norm_nonneg _ + have hA0 : 0 ≤ A := zero_le_one.trans hA + have hcn (i : ℕ) : 0 ≤ c i := by dsimp [c]; positivity + have hS : 0 ≤ S := Finset.sum_nonneg (fun i _ => hcn i) + have hfg : fderiv ℝ (g ∘ f) = + (fun y => ContinuousLinearMap.compL ℝ E F G (fderiv ℝ g (f y)) (fderiv ℝ f y)) := by + funext y + exact fderiv_comp y (hg.differentiable (by simp) (f y)) (hf.differentiable (by simp) y) + have hcomp (i : ℕ) (hi : i ≤ n) : + ‖iteratedFDeriv ℝ i (fderiv ℝ g ∘ f) x‖ ≤ i.factorial*(A+Mg)*A^i := by + apply norm_iteratedFDeriv_comp_le (n:=i) (hg.fderiv_right (m:=∞) (by simp)) hf (by exact_mod_cast le_top) x + · intro j hj + rw [norm_iteratedFDeriv_fderiv] + by_cases hjn : j+1 ≤ n + · exact (hgl (j+1) (by omega) hjn).trans (le_add_of_nonneg_right hMg) + · have he : j+1=n+1 := by omega + rw [he] + exact le_add_of_nonneg_left hA0 + · intro j hj hj' + exact (hfl j hj (hj'.trans hi)).trans (le_self_pow₀ hA (by omega)) + have hh := (ContinuousLinearMap.compL ℝ E F G).norm_iteratedFDeriv_le_of_bilinear_of_le_one + ((hg.fderiv_right (m:=∞) (by simp)).comp hf) (hf.fderiv_right (m:=∞) (by simp)) x (n:=n) (by exact_mod_cast le_top) + (ContinuousLinearMap.norm_compL_le ℝ E F G) + have hterm (i : ℕ) (hi : i∈Finset.range (n+1)) : + (n.choose i : ℝ)*‖iteratedFDeriv ℝ i (fderiv ℝ g ∘ f) x‖* + ‖iteratedFDeriv ℝ (n-i) (fderiv ℝ f) x‖ ≤ + c i*(A+Mg)+(if i=0 then A*Mf else 0) := by + have hi' : i ≤ n := Finset.mem_range_succ_iff.mp hi + rw [norm_iteratedFDeriv_fderiv] + by_cases hi0 : i=0 + · subst i + simp only [Nat.choose_zero_right,Nat.cast_one,one_mul,norm_iteratedFDeriv_zero,Function.comp_apply, + Nat.sub_zero,ite_true] + have hg1 : ‖fderiv ℝ g (f x)‖ ≤ A := by simpa only [norm_iteratedFDeriv_one] using hgl 1 le_rfl hn + exact (mul_le_mul_of_nonneg_right hg1 hMf).trans (le_add_of_nonneg_left (mul_nonneg (hcn 0) (add_nonneg hA0 hMg))) + · rw [ite_eq_right hi0,add_zero] + have hlow := hfl (n-i+1) (by omega) (by omega) + calc + _ ≤ (n.choose i : ℝ)*(i.factorial*(A+Mg)*A^i)*A := by + gcongr + exact hcomp i hi' + _ = c i*(A+Mg) := by dsimp [c]; rw [pow_succ]; ring + rw [← norm_iteratedFDeriv_fderiv,hfg] + refine hh.trans ((Finset.sum_le_sum hterm).trans ?_) + rw [Finset.sum_add_distrib,← Finset.sum_mul] + simp only [Finset.sum_ite_eq',Finset.mem_range,show 0 (f z,g z)) x‖ ≤ C := by + rw [iteratedFDeriv_prodMk hf.contDiffAt hg.contDiffAt (by exact_mod_cast le_top)] + apply ContinuousMultilinearMap.opNorm_le_bound ((norm_nonneg _).trans hb) + intro m + rw [ContinuousMultilinearMap.prod_apply,Prod.norm_mk] + exact max_le ((ContinuousMultilinearMap.le_opNorm _ m).trans + (mul_le_mul_of_nonneg_right hb (Finset.prod_nonneg fun _ _ => norm_nonneg _))) + ((ContinuousMultilinearMap.le_opNorm _ m).trans + (mul_le_mul_of_nonneg_right hc (Finset.prod_nonneg fun _ _ => norm_nonneg _))) + +lemma bounded_derivatives_comp_on_compact {g : V → W} (hg : ContDiff ℝ ∞ g) {K : Set V} + (hK : IsCompact K) (n : ℕ) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (f : U → V), ContDiff ℝ ∞ f → ∀ x, f x∈K → + (∀ i : ℕ, 1 ≤ i → i ≤ n → ‖iteratedFDeriv ℝ i f x‖ ≤ A) → + ∀ i : ℕ, i ≤ n → ‖iteratedFDeriv ℝ i (g ∘ f) x‖ ≤ C := by + have hb (i : Fin (n+1)) : ∃ C : ℝ, 0 ≤ C ∧ ∀ x∈K, ‖iteratedFDeriv ℝ i g x‖ ≤ C := by + obtain ⟨C,hC⟩ := (hK.image (hg.continuous_iteratedFDeriv (by exact_mod_cast le_top))).isBounded.exists_norm_le + exact ⟨max C 0,le_max_right _ _,fun x hx => (hC _ ⟨x,hx,rfl⟩).trans (le_max_left _ _)⟩ + choose B hB hbound using hb + let D := ∑ i, B i + have hD : 0 ≤ D := Finset.sum_nonneg (fun i _ => hB i) + have hiD (i : Fin (n+1)) : B i ≤ D := Finset.single_le_sum (fun j _ => hB j) (Finset.mem_univ i) + let c : Fin (n+1) → ℝ := fun i => i.val.factorial*D*A^i.val + have hc (i : Fin (n+1)) : 0 ≤ c i := by dsimp [c]; positivity + refine ⟨∑ i, c i,Finset.sum_nonneg (fun i _ => hc i),?_⟩ + intro f hf x hx hlow i hi + have hcomp : ‖iteratedFDeriv ℝ i (g ∘ f) x‖ ≤ i.factorial*D*A^i := by + apply norm_iteratedFDeriv_comp_le hg hf (by exact_mod_cast le_top) + · intro j hj + exact (hbound ⟨j,by omega⟩ _ hx).trans (hiD _) + · intro j hj hj' + exact (hlow j hj (hj'.trans hi)).trans (le_self_pow₀ hA (by omega)) + exact hcomp.trans (Finset.single_le_sum (fun j _ => hc j) (Finset.mem_univ (⟨i,by omega⟩ : Fin (n+1)))) + +lemma tame_comp_on_compact {g : V → W} (hg : ContDiff ℝ ∞ g) {K : Set V} + (hK : IsCompact K) (n : ℕ) (hn : 1 ≤ n) (A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (f : U → V), ContDiff ℝ ∞ f → ∀ x, f x∈K → + (∀ i : ℕ, 1 ≤ i → i ≤ n → ‖iteratedFDeriv ℝ i f x‖ ≤ A) → + ‖iteratedFDeriv ℝ (n+1) (g ∘ f) x‖ ≤ C*(1+‖iteratedFDeriv ℝ (n+1) f x‖) := by + have hb (i : Fin (n+2)) : ∃ C : ℝ, 0 ≤ C ∧ ∀ x∈K, ‖iteratedFDeriv ℝ i g x‖ ≤ C := by + obtain ⟨C,hC⟩ := (hK.image (hg.continuous_iteratedFDeriv (by exact_mod_cast le_top))).isBounded.exists_norm_le + exact ⟨max C 0,le_max_right _ _,fun x hx => (hC _ ⟨x,hx,rfl⟩).trans (le_max_left _ _)⟩ + choose B hB hbound using hb + let D : ℝ := A+∑ i, B i + have hAD : A ≤ D := le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => hB i)) + have hD : 1 ≤ D := hA.trans hAD + have hBD (i : Fin (n+2)) : B i ≤ D := + (Finset.single_le_sum (fun j _ => hB j) (Finset.mem_univ i)).trans + (le_add_of_nonneg_left (zero_le_one.trans hA)) + obtain ⟨C,hC,hcomp⟩ := tame_iteratedFDeriv_comp (E:=U) (F:=V) (G:=W) n hn D hD + refine ⟨C*(1+D),mul_nonneg hC (by linarith),?_⟩ + intro f hf x hx hlow + have hh := hcomp g f hg hf x + (fun i hi hi' => (hbound ⟨i,by omega⟩ _ hx).trans (hBD _)) + (fun i hi hi' => (hlow i hi hi').trans hAD) + have ht := (hbound ⟨n+1,by omega⟩ _ hx).trans (hBD _) + refine hh.trans (mul_le_mul_of_nonneg_left (by gcongr) hC |>.trans ?_) + have hd := mul_nonneg (show 0 ≤ D by linarith) (norm_nonneg (iteratedFDeriv ℝ (n+1) f x)) + nlinarith + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/VelocityDerivatives.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/VelocityDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b4fd3e529437288dfc95c48a15d2a94c7232e7d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/VelocityDerivatives.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleBySpacetime + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma bounded_iteratedFDeriv_of_factor + {U W : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] + {f : U → W} {g : W → (U →L[ℝ] W)} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + {K : Set W} (hK : IsCompact K) (himage : ∀ x, f x ∈ K) (he : fderiv ℝ f=g ∘ f) : + ∀ n : ℕ, ∃ C : ℝ, 0 ≤ C ∧ ∀ x, ‖iteratedFDeriv ℝ n f x‖ ≤ C := by + intro n + induction n using Nat.strong_induction_on with + | h n ih => + cases n with + | zero => + obtain ⟨C,hC⟩ := hK.isBounded.exists_norm_le + exact ⟨max C 0,le_max_right _ _,fun x => by + simpa only [norm_iteratedFDeriv_zero] using (hC (f x) (himage x)).trans (le_max_left _ _)⟩ + | succ n => + have hb (i : Fin (n+1)) : ∃ C : ℝ, 0 ≤ C ∧ ∀ x, ‖iteratedFDeriv ℝ i f x‖ ≤ C := + ih i (by omega) + choose B hB hbound using hb + have hc (i : Fin (n+1)) : ∃ C : ℝ, 0 ≤ C ∧ ∀ x∈K, ‖iteratedFDeriv ℝ i g x‖ ≤ C := by + obtain ⟨C,hC⟩ := (hK.image ((hg.continuous_iteratedFDeriv (by exact_mod_cast le_top)))).isBounded.exists_norm_le + exact ⟨max C 0,le_max_right _ _,fun x hx => (hC _ ⟨x,hx,rfl⟩).trans (le_max_left _ _)⟩ + choose G hG hgbound using hc + let D : ℝ := 1+∑ i, B i + let C : ℝ := 1+∑ i, G i + have hD : 1 ≤ D := le_add_of_nonneg_right (Finset.sum_nonneg (fun i _ => hB i)) + have hC : 0 ≤ C := add_nonneg zero_le_one (Finset.sum_nonneg (fun i _ => hG i)) + have hBD (i : Fin (n+1)) : B i ≤ D := + (Finset.single_le_sum (fun j _ => hB j) (Finset.mem_univ i)).trans (le_add_of_nonneg_left zero_le_one) + have hGC (i : Fin (n+1)) : G i ≤ C := + (Finset.single_le_sum (fun j _ => hG j) (Finset.mem_univ i)).trans (le_add_of_nonneg_left zero_le_one) + refine ⟨n.factorial*C*D^n,by positivity,fun x => ?_⟩ + rw [← norm_iteratedFDeriv_fderiv,he] + apply norm_iteratedFDeriv_comp_le (n:=n) hg hf (by exact_mod_cast le_top) x + · intro i hi + exact (hgbound ⟨i,by omega⟩ (f x) (himage x)).trans (hGC _) + · intro i hi hi' + exact (hbound ⟨i,by omega⟩ x).trans ((hBD _).trans (le_self_pow₀ hD (by omega))) + +private def velocityAugment (v : Vec) : ℝ × Vec := ((q v)⁻¹,velocity v) + +private def velocityJet (w : ℝ × Vec) : Vec →L[ℝ] (ℝ × Vec) := + ((-w.1^2) • innerSL ℝ w.2).prod + (w.1 • (ContinuousLinearMap.id ℝ Vec-(innerSL ℝ w.2).smulRight w.2)) + +private lemma velocityAugment_smooth : ContDiff ℝ ∞ velocityAugment := + (contDiff_q.inv (fun v => (q_pos v).ne')).prodMk contDiff_velocity + +private lemma velocityJet_smooth : ContDiff ℝ ∞ velocityJet := by + have hinner : ContDiff ℝ ∞ (fun w : ℝ × Vec => innerSL ℝ w.2) := + (innerSL ℝ (E:=Vec)).contDiff.comp contDiff_snd + exact (ContinuousLinearMap.prodₗᵢ ℝ (E:=Vec) (F:=ℝ) (G:=Vec)).contDiff.comp + (((contDiff_fst.pow 2).neg.smul hinner).prodMk + (contDiff_fst.smul (contDiff_const.sub (hinner.smulRight contDiff_snd)))) + +private lemma velocityAugment_deriv : fderiv ℝ velocityAugment=velocityJet ∘ velocityAugment := by + funext v + have hq := (hasFDerivAt_inv (q_pos v).ne').comp v + ((contDiff_q.differentiable (by simp : (∞:ℕ∞ω)≠0) v).hasFDerivAt) + have hu := (contDiff_velocity.differentiable (by simp : (∞:ℕ∞ω)≠0) v).hasFDerivAt + have hh := (hq.prodMk hu).fderiv + change fderiv ℝ velocityAugment v=_ at hh + rw [hh] + ext h + · simp only [ContinuousLinearMap.prod_apply,ContinuousLinearMap.coe_comp,Function.comp_apply, + ContinuousLinearMap.toSpanSingleton_apply,smul_eq_mul,velocityJet,velocityAugment, + smul_apply,innerSL_apply_apply,← dot_eq_inner,fderiv_q_apply] + ring + · simp only [ContinuousLinearMap.prod_apply,Function.comp_apply,velocityJet,velocityAugment, + smul_apply,sub_apply,ContinuousLinearMap.id_apply, + ContinuousLinearMap.smulRight_apply,innerSL_apply_apply,← dot_eq_inner,fderiv_velocity_apply] + +theorem velocity_derivatives_bounded (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ v, ‖iteratedFDeriv ℝ n velocity v‖ ≤ C := by + have himage (v : Vec) : velocityAugment v∈closedBall (0:ℝ × Vec) 1 := by + rw [mem_closedBall_zero_iff,Prod.norm_mk] + refine max_le ?_ (norm_velocity_lt_one v).le + change ‖(q v)⁻¹‖ ≤ 1 + rw [Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr (q_pos v).le)] + apply (inv_le_one₀ (q_pos v)).mpr + nlinarith [q_sq v,q_pos v,sq_nonneg ‖v‖] + obtain ⟨C,hC,hb⟩ := bounded_iteratedFDeriv_of_factor velocityAugment_smooth velocityJet_smooth + (isCompact_closedBall (0:ℝ × Vec) 1) himage velocityAugment_deriv n + refine ⟨C,hC,fun v => ?_⟩ + have hh := (ContinuousLinearMap.snd ℝ ℝ Vec).norm_iteratedFDeriv_comp_left + velocityAugment_smooth.contDiffAt (x:=v) (n:=n) (by exact_mod_cast le_top) + change ‖iteratedFDeriv ℝ n velocity v‖ ≤ _ at hh + exact hh.trans ((mul_le_mul_of_nonneg_right (ContinuousLinearMap.norm_snd_le ℝ ℝ Vec) + (norm_nonneg _)).trans ((by simpa only [one_mul] using hb v))) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/VolterraSup.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/VolterraSup.lean new file mode 100644 index 0000000000000000000000000000000000000000..69d1279d08269f975af0df30dff4f532bc31bfed --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/VolterraSup.lean @@ -0,0 +1,72 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.VolterraMajorant + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma integral_Icc_factorial_tail (C : ℝ) (n : ℕ) {t : ℝ} (ht : 0≤t) : + C*(∫ u in Icc (0:ℝ) t, (C*u)^n/(n.factorial:ℝ))= + (C*t)^(n+1)/((n+1).factorial:ℝ) := by + have he : (fun u : ℝ => (C*u)^n/(n.factorial:ℝ))= + (fun u => (C^n/(n.factorial:ℝ))*u^n) := by funext u; simp only [mul_pow]; ring + rw [he,integral_const_mul,integral_Icc_eq_integral_Ioc, + ←intervalIntegral.integral_of_le ht,integral_pow] + simp only [Nat.factorial_succ,Nat.cast_mul,Nat.cast_add,Nat.cast_one,zero_pow (Nat.succ_ne_zero n),sub_zero,mul_pow] + field_simp + ring + +lemma volterra_uniform_bound {α : Type*} (D C H : ℝ) (hD : 0≤D) (hC : 0≤C) : + ∃ Z : ℝ, 0≤Z ∧ ∀ (U : ℝ), U≤H → ∀ (u : ℝ → α → ℝ), + (∃ L : ℝ, 0≤L ∧ ∀ t∈Icc (0:ℝ) U, ∀ x, u t x≤L) → + (∀ g : ℝ → ℝ, Continuous g → + (∀ t∈Icc (0:ℝ) U, ∀ x, u t x≤g t) → + ∀ t∈Icc (0:ℝ) U, ∀ x, u t x≤D+C*(∫ r in Icc (0:ℝ) t, 1+g r)) → + ∀ t∈Icc (0:ℝ) U, ∀ x, u t x≤Z := by + obtain ⟨z,hz,hm,hz1,hzv⟩ := exists_tame_volterra_majorant hD hC (show (0:ℝ)≤0 by rfl) + refine ⟨z (max H 0),le_trans (by norm_num) (hz1 _ (le_max_right _ _)),?_⟩ + intro U hUH u hbound hv + obtain ⟨L,hL,hb⟩ := hbound + let g : ℕ → ℝ → ℝ := fun n t => z t+L*((C*t)^n/(n.factorial:ℝ)) + have hg (n : ℕ) : Continuous (g n) := by dsimp [g]; fun_prop + have hind (n : ℕ) : ∀ t∈Icc (0:ℝ) U, ∀ x, u t x≤g n t := by + induction n with + | zero => + intro t ht x + have hh := hz1 t ht.1 + simpa only [g,pow_zero,Nat.factorial_zero,Nat.cast_one,div_one,mul_one] using + (hb t ht x).trans (show L≤z t+L by linarith) + | succ n ih => + intro t ht x + have hh := hv (g n) (hg n) ih t ht x + have he : (∫ r in Icc (0:ℝ) t, 1+g n r)= + (∫ r in Icc (0:ℝ) t, 1+z r)+L*(∫ r in Icc (0:ℝ) t, (C*r)^n/(n.factorial:ℝ)) := by + have hfun : (fun r => 1+g n r)=(fun r => (1+z r)+L*((C*r)^n/(n.factorial:ℝ))) := by + funext r; dsimp [g]; ring + rw [hfun,integral_add,integral_const_mul] + all_goals apply ContinuousOn.integrableOn_compact isCompact_Icc; fun_prop + have hlow : D+C*(∫ r in Icc (0:ℝ) t, 1+z r)≤z t := by + apply le_trans _ (hzv t ht.1) + simp only [zero_add,one_mul] + apply add_le_add_right (mul_le_mul_of_nonneg_left ?_ hC) + apply setIntegral_mono_on _ _ measurableSet_Icc (fun r _ => by linarith) + all_goals apply ContinuousOn.integrableOn_compact isCompact_Icc; fun_prop + rw [he] at hh + have hit := integral_Icc_factorial_tail C n ht.1 + dsimp [g] + nlinarith + intro t ht x + have hlim : Tendsto (fun n => g n t) atTop (𝓝 (z t)) := by + have hh := (Real.summable_pow_div_factorial (C*t)).tendsto_atTop_zero + simpa only [g,mul_zero,add_zero] using tendsto_const_nhds.add (hh.const_mul L) + exact (ge_of_tendsto hlim (Filter.Eventually.of_forall (fun n => hind n t ht x))).trans + (hm (ht.2.trans (hUH.trans (le_max_left _ _)))) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Regularity/WithinPartial.lean b/lean/OAI/Analysis/VlasovMaxwell/Regularity/WithinPartial.lean new file mode 100644 index 0000000000000000000000000000000000000000..e03b241312579009bf8456753c3c8fa41cb8ad4b --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Regularity/WithinPartial.lean @@ -0,0 +1,77 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.PicardCurvature + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory Asymptotics +open scoped Topology ContDiff Convex + +namespace RVM + +lemma time_space_isLittleO_sub_sub_fderiv + {α 𝕜 E F : Type*} [NontriviallyNormedField 𝕜] [IsRCLikeNormedField 𝕜] [NormedAddCommGroup E] + [NormedSpace ℝ E] [NormedSpace 𝕜 E] [NormedAddCommGroup F] [NormedSpace 𝕜 F] + {u : E} {v w : α → E} {l : Filter α} (hv : Tendsto v l (𝓝 u)) (hw : Tendsto w l (𝓝 u)) + (s : Set E := Set.univ) (seg : ∀ᶠ χ in l, [w χ -[ℝ] v χ] ⊆ s := by simp) + {f : α → E → F} {f' : α → E → E →L[𝕜] F} + (df' : ∀ᶠ p in l ×ˢ 𝓝[s] u, HasFDerivWithinAt (f p.1) (f' p.1 p.2) s p.2) + {φ : E →L[𝕜] F} (cf' : Tendsto ↿f' (l ×ˢ 𝓝[s] u) (𝓝 φ)) : + (fun χ => f χ (v χ) - f χ (w χ) - φ (v χ - w χ)) =o[l] (fun χ => v χ - w χ) := by + rw [isLittleO_iff] + intro ε hε + replace df' : ∀ᶠ χ in l, ∀ z ∈ [w χ -[ℝ] v χ], HasFDerivWithinAt (f χ) (f' χ z) s z := + df'.segment_of_prod_nhdsWithin hw hv seg + replace cf' : ∀ᶠ χ in l, ∀ z ∈ [w χ -[ℝ] v χ], ‖f' χ z - φ‖ < ε := by + simp_rw [Metric.tendsto_nhds, dist_eq_norm_sub] at cf' + exact (cf' ε hε).segment_of_prod_nhdsWithin hw hv seg + filter_upwards [seg, df', cf'] with χ seg df' cf' + exact Convex.norm_image_sub_le_of_norm_hasFDerivWithin_le' + (fun z hz => (df' z hz).mono seg) (fun z hz => (cf' z hz).le) + (convex_segment ..) (left_mem_segment ..) (right_mem_segment ..) + +lemma hasFDerivWithinAt_of_time_space {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] + {J : Set ℝ} {F : ℝ × U → W} {D : ℝ × U → (U →L[ℝ] W)} {t : ℝ} {x : U} {g : W} + (ht : t∈J) (hD : ∀ r∈J, ∀ y, HasFDerivAt (fun z => F (r,z)) (D (r,y)) y) + (hcD : ContinuousOn D {p | p.1∈J}) + (hT : HasDerivWithinAt (fun r => F (r,x)) g J t) : + HasFDerivWithinAt F (assembleDerivative g (D (t,x))) {p | p.1∈J} (t,x) := by + let S : Set (ℝ × U) := {p | p.1∈J} + let l := 𝓝[S] (t,x) + have hq : Tendsto (fun p : ℝ × U => p) l (𝓝 (t,x)) := nhdsWithin_le_nhds + have hqt : Tendsto (fun p : ℝ × U => p.1) l (𝓝 t) := continuous_fst.continuousAt.tendsto.comp hq + have hqx : Tendsto (fun p : ℝ × U => p.2) l (𝓝 x) := continuous_snd.continuousAt.tendsto.comp hq + have hqtJ : Tendsto (fun p : ℝ × U => p.1) l (𝓝[J] t) := + tendsto_nhdsWithin_iff.mpr ⟨hqt,by exact eventually_mem_nhdsWithin⟩ + have hp : Tendsto (fun q : (ℝ × U) × U => (q.1.1,q.2)) (l ×ˢ 𝓝 x) (𝓝[S] (t,x)) := by + apply tendsto_nhdsWithin_iff.mpr + refine ⟨(hqt.comp tendsto_fst).prodMk_nhds tendsto_snd,?_⟩ + exact (eventually_mem_nhdsWithin : ∀ᶠ p in l, p∈S).prod_mk (Eventually.of_forall fun _ => True.intro) |>.mono (fun q h => h.1) + have heS : (fun q : ℝ × U => F (q.1,q.2)-F (q.1,x)-(D (t,x)) (q.2-x)) =o[l] (fun q => q.2-x) := by + apply time_space_isLittleO_sub_sub_fderiv (f:=fun q : ℝ × U => fun y => F (q.1,y)) + (f':=fun q : ℝ × U => fun y => D (q.1,y)) hqx tendsto_const_nhds + · exact ((eventually_mem_nhdsWithin : ∀ᶠ p in l, p∈S).prod_mk (Eventually.of_forall fun _ => True.intro)).mono + (fun q h => (hD q.1.1 h.1 q.2).hasFDerivWithinAt) + · exact (hcD (t,x) ht).tendsto.comp (by simpa only [nhdsWithin_univ] using hp) + have hbS : (fun q : ℝ × U => q.2-x) =O[l] (fun q => q-(t,x)) := by + apply isBigO_of_le l + intro q + exact norm_snd_le (q-(t,x)) + have heT := hT.hasFDerivWithinAt.isLittleO.comp_tendsto hqtJ + have hbT : (fun q : ℝ × U => q.1-t) =O[l] (fun q => q-(t,x)) := by + apply isBigO_of_le l + intro q + exact norm_fst_le (q-(t,x)) + rw [hasFDerivWithinAt_iff_isLittleO] + convert (heS.trans_isBigO hbS).add (heT.trans_isBigO hbT) using 1 + ext q + change F q-F (t,x)-((q.1-t) • g+(D (t,x)) (q.2-x)) = + (F (q.1,q.2)-F (q.1,x)-(D (t,x)) (q.2-x)) + + (F (q.1,x)-F (t,x)-(q.1-t) • g) + abel + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/AffineRetardedBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/AffineRetardedBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..134ed40b857987634208921af23d24ed15fa5498 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/AffineRetardedBound.lean @@ -0,0 +1,102 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_normalised_physical_kernel_horizon (P L H : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) H, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ E B : Vec, ‖E‖≤L → ‖B‖≤L → + ‖(1-dot n (velocity v)) • normalisedElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C := by + let K : Set (ℝ × Vec × Vec × Vec × Vec) := + Icc 0 H ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P ×ˢ + closedBall (0:Vec) L ×ˢ closedBall (0:Vec) L + have hK : IsCompact K := isCompact_Icc.prod ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)))) + let r : (ℝ × Vec × Vec × Vec × Vec) → ℝ := Prod.fst + let n : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.1 + let v : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.1 + let E : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.2.1 + let B : (ℝ × Vec × Vec × Vec × Vec) → Vec := fun p => p.2.2.2.2 + have hr : Continuous r := continuous_fst + have hn : Continuous n := continuous_snd.fst + have hv : Continuous v := continuous_snd.snd.fst + have hE : Continuous E := continuous_snd.snd.snd.fst + have hB : Continuous B := continuous_snd.snd.snd.snd + have hu := (contDiff_velocity (k:=1)).continuous.comp hv + have ha : Continuous (fun p => fderiv ℝ velocity (v p) (E p+cross (velocity (v p)) (B p))) := + (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp hv).clm_apply + (hE.add ((contDiff_cross (k:=1)).continuous.comp (hu.prodMk hB))) + have hd : Continuous (fun p => 1-dot (n p) (velocity (v p))) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hn.prodMk hu)) + have hk := hd.continuousOn.smul (continuousOn_normalisedElectricKernel + hr.continuousOn hn.continuousOn hu.continuousOn ha.continuousOn (S:=K) (by + intro p hp + exact (cone_denom_pos (v p) (n p) (by simpa only [n,mem_sphere,dist_zero_right] using hp.2.1)).ne')) + obtain ⟨C,hC⟩ := (hK.image_of_continuousOn hk).isBounded.exists_norm_le + refine ⟨max 0 C,le_max_left _ _,?_⟩ + intro r hr n hn v hv E B hE hB + apply le_trans (hC _ ⟨(r,n,v,E,B),?_,rfl⟩) (le_max_right _ _) + exact ⟨hr,by simpa only [mem_sphere,dist_zero_right] using hn, + by simpa only [mem_closedBall_zero_iff] using hv, + by simpa only [mem_closedBall_zero_iff] using hE, + by simpa only [mem_closedBall_zero_iff] using hB⟩ + +lemma normalisedElectricKernel_affine_acceleration (r : ℝ) (n u b : Vec) (a : ℝ) : + normalisedElectricKernel r n u (a • b)= + (1-a) • normalisedElectricKernel r n u 0 + a • normalisedElectricKernel r n u b := by + ext i + simp only [normalisedElectricKernel,dot_smul_right,dot_zero_right_rvm,zero_smul, + smul_zero,sub_zero,add_zero,PiLp.add_apply,PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul] + ring + +lemma uniform_normalised_physical_kernel_affine (P H : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) H, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ E B : Vec, + ‖(1-dot n (velocity v)) • normalisedElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))‖≤C*(1+‖E‖+‖B‖) := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_physical_kernel_horizon P 1 H + refine ⟨2*C,by positivity,?_⟩ + intro r hr n hn v hv E B + let L : ℝ := 1+‖E‖+‖B‖ + have hL : 1≤L := by dsimp [L]; linarith [norm_nonneg E,norm_nonneg B] + have hL0 : 0hband r ⟨hs.1.trans hr.1,hr.2.trans ht.2⟩) + · rw [norm_sub_rev,abs_of_nonpos (sub_nonpos.mpr hts),neg_sub] + exact H k t s (hJ ht).1 hts (hJ hs).2 (fun r hr=>hband r ⟨ht.1.trans hr.1,hr.2.trans hs.2⟩) + calc + _ ≤ 2*‖V t-V s‖/‖V t‖ := momentumDirection_increment (hn0 t ht) (hn0 s hs) + _ ≤ 2*‖V t-V s‖/((2:ℝ)^k/16) := div_le_div_of_nonneg_left (by positivity) + (div_pos hw (by norm_num)) (hn t ht) + _ = (32/(2:ℝ)^k)*‖V t-V s‖ := by field_simp; ring + _ ≤ _ := mul_le_mul_of_nonneg_left hnorm (by positivity) + +lemma sqrt_linear_small {B C δ u : ℝ} (hB : 0by + apply norm_pos_iff.mp + exact (div_pos (pow_pos (by norm_num : (0:ℝ)<2) k) (by norm_num : (0:ℝ)<16)).trans_le + (norm_momentum_of_high_band hk (hband t ht).1))) hδ (by positivity) + intro s hs t ht hst + apply (H.direction_increment k hk hJ hband hs ht).trans_lt + convert sqrt_linear_small hB hC hδ (abs_nonneg (t-s)) hst using 1 + first | rfl | ring + +def angularZeroBump (w : ℝ) (hw : 0extendedAngularCLM w hw (V r)) + (fderiv ℝ (extendedAngularCLM w hw) (V t) K) t := + ((extendedAngularCLM_contDiff w hw).differentiable (by simp)).differentiableAt.hasFDerivAt.comp_hasDerivAt t hV + +lemma extendedAngularCLM_fderiv (w : ℝ) (hw : 0v+r • K) K 0 := by + convert (hasDerivAt_const (0:ℝ) v).add ((hasDerivAt_id (0:ℝ)).smul_const K) using 1 <;> first | rfl | simp only [one_smul,zero_add] + have ht : Tendsto (fun r : ℝ=>v+r • K) (𝓝 0) (𝓝 v) := by + have hc : Tendsto (fun r : ℝ=>v+r • K) (𝓝 0) (𝓝 (v+(0:ℝ) • K)) := hcurve.continuousAt + simpa only [zero_smul,add_zero] using hc + have he := (extendedAngularCLM_eventuallyEq w hw hv).comp_tendsto ht + have ha := (hasDerivAt_angularMultiplierCLM hcurve (by simpa using hv0) w).congr_of_eventuallyEq he + have hb := hasDerivAt_extendedAngularCLM hcurve w hw + simpa only [zero_smul,add_zero] using hb.unique ha + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ArrivalConeKernelPolarNorm.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ArrivalConeKernelPolarNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..715b6a322196d237fa9a9e1f42f839b1099b20cd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ArrivalConeKernelPolarNorm.lean @@ -0,0 +1,400 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ActualLabelCutoffCost + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.arrivalConeKernel_polar_norm {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + (hσ : σ∈Ioo 0 T) : + (∫⁻z : Phase,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖)= + ∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + classical + let g : Vec→ENNReal := fun y=>∫⁻v : Vec,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,(y,v))‖ + have hm : Measurable (fun z : Phase=>ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖) := + (((F.measurable_arrivalConeKernel hs zX hA).comp (measurable_const.prodMk measurable_id)).norm).ennreal_ofReal + have hg : Measurable g := hm.lintegral_prod_right' + calc + _ = ∫⁻y : Vec,g y := lintegral_prod _ hm.aemeasurable + _ = ∫⁻y in ball (F.flow zX T).1 (T-σ),g y := by + rw [←lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y∈ball (F.flow zX T).1 (T-σ) + · rw [indicator_of_mem hy] + · rw [indicator_of_notMem hy] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hp : (σ,(y,v))∉arrivalPhaseDomain F.flow zX T := by + intro hp + apply hy + rw [mem_ball,dist_eq_norm,norm_sub_rev] + linarith [hp.2.1] + simp only [arrivalConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero,Pi.zero_apply] + _ = _ := by + rw [F.receiver_polar_lintegral (Ioo_subset_Icc_self hσ) zX hg] + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + have hd : 0≤1-dot n.1 (velocity (F.flow zX (σ+r)).2) := (cone_denom_pos _ _ (sphere_norm n)).le + have he : r^2*(1-dot n.1 (velocity (F.flow zX (σ+r)).2))*r⁻¹^2= + 1-dot n.1 (velocity (F.flow zX (σ+r)).2) := by + field_simp [hr.1.ne'] + dsimp only [g] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + ←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + have hp : (σ,((F.flow zX (σ+r)).1-r • n.1,v))∈arrivalPhaseDomain F.flow zX T := + F.arrival_polar_mem zX hσ hr n + rw [arrivalConeKernel,indicator_of_mem hp,F.arrival_polar_radius zX hσ hr n] + simp only [arrivalKernelState,F.arrival_polar_time zX hσ hr n,F.arrival_polar_direction zX hσ hr n, + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (r⁻¹))] + rw [ENNReal.ofReal_mul (sq_nonneg (r⁻¹)),←mul_assoc, + ←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg r) hd),he] + +lemma PhaseFlowOn.lintegral_norm_labelConeKernel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻z : Phase,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖ := by + classical + have hm := (F.measurable_arrivalConeKernel hs zX hA).norm.ennreal_ofReal + rw [F.labelConeKernel_eq_pullback hs zX] + have he : (fun p : ℝ×Phase=>ENNReal.ofReal ‖phaseTimePullback F.flow T (arrivalConeKernel s F.flow zX T A) p‖)= + phaseTimePullback F.flow T (fun p=>ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A p‖) := by + funext p + by_cases hp : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · simp only [phaseTimePullback,indicator_of_mem hp] + · simp only [phaseTimePullback,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + rw [he,F.lintegral_phaseTimePullback hm] + change (∫⁻ p,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A p‖ + ∂((volume : Measure ℝ).prod (volume : Measure Phase)).restrict (Ioo 0 T ×ˢ univ)) = _ + rw [←Measure.restrict_prod_eq_prod_univ] + exact lintegral_prod _ hm.aemeasurable + +lemma PhaseFlowOn.labelConeKernel_polar_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + rw [F.lintegral_norm_labelConeKernel hs zX hA] + exact setLIntegral_congr_fun measurableSet_Ioo (fun σ hσ=>F.arrivalConeKernel_polar_norm hs zX hA hσ) + +lemma PhaseFlowOn.labelConeKernel_triangle_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + let X := prefixFlow F.flow T zX + have hc : Continuous (prefixClamp T) := continuous_const.max (continuous_const.min continuous_id) + have hX : Continuous X := (F.continuousOn_time zX).comp_continuous hc (prefixClamp_mem hT) + let S : (ℝ×ℝ×Sphere)×Vec → ConeKernelState := fun p=> + ((prefixClamp T p.1.1,prefixClamp T p.1.2.1), + (p.1.2.2.1,((X p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) + have hS : Continuous S := by dsimp [S]; fun_prop + have hSA : Continuous (fun p=>A (S p)) := hA.comp_continuous hS (fun p=> + ⟨⟨prefixClamp_mem hT _,prefixClamp_mem hT _⟩,⟨p.1.2.2.2,mem_univ _⟩⟩) + have hSf : Continuous (fun p=>s.f ((S p).1.2,(S p).2.2)) := + hs.f_smooth.continuousOn.comp_continuous (hS.fst.snd.prodMk hS.snd.snd) + (fun p=>⟨prefixClamp_mem hT _,mem_univ _⟩) + let f : ℝ×ℝ×Sphere → ENNReal := fun p=> + ENNReal.ofReal (1-dot p.2.2.1 (velocity (X p.1).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f ((S (p,v)).1.2,(S (p,v)).2.2) • A (S (p,v))‖ + have hD : Continuous (fun p : ℝ×ℝ×Sphere=>1-dot p.2.2.1 (velocity (X p.1).2)) := by + simp only [dot_eq_inner] + exact continuous_const.sub ((continuous_subtype_val.comp continuous_snd.snd).inner + ((contDiff_velocity (k:=1)).continuous.comp (hX.comp continuous_fst).snd)) + have hf : Measurable f := hD.measurable.ennreal_ofReal.mul + ((hSf.smul hSA).norm.measurable.ennreal_ofReal.lintegral_prod_right') + have he : ∀t∈Icc 0 T,∀σ∈Icc 0 T,∀n : Sphere, + f (t,σ,n)=ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ := by + intro t ht σ hσ n + simp only [f,S,X,prefixFlow,prefixClamp_eq ht,prefixClamp_eq hσ] + rw [F.labelConeKernel_polar_norm hs zX hA] + calc + _ = ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ),f (σ+r,σ,n) ∂volume ∂sphereMeasure := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + dsimp only + rw [he _ ⟨by linarith [hσ.1,hr.1],by linarith [hr.2]⟩ _ (Ioo_subset_Icc_self hσ)] + simp only [add_sub_cancel_left] + _ = ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere,f (t,σ,n) ∂sphereMeasure := + lintegral_retarded_triangle_parameter sphereMeasure T hf + _ = _ := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + exact lintegral_congr (fun n=>he _ (Ioo_subset_Icc_self ht) _ ⟨hσ.1.le,hσ.2.le.trans ht.2.le⟩ n) + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def arrivalReceiverTime (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) (p : ℝ×Phase) : ℝ := + (arrivalDomain α zX T).indicator (arrivalTime α zX T) (p.1,p.2.1) + +lemma PhaseFlowOn.arrivalReceiverTime_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + Measurable (arrivalReceiverTime F.flow zX T) := + (F.measurable_arrival_zero zX).comp (measurable_fst.prodMk measurable_snd.fst) + +lemma PhaseFlowOn.arrivalReceiverTime_polar {E B : Field} {T σ r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (hσ : σ∈Ioo 0 T) + (hr : r∈Ioo 0 (T-σ)) (n : Sphere) (v : Vec) : + arrivalReceiverTime F.flow zX T (σ,((F.flow zX (σ+r)).1-r • n.1,v))=σ+r := by + classical + rw [arrivalReceiverTime,indicator_of_mem (F.arrival_polar_mem zX hσ hr n : + (σ,((F.flow zX (σ+r)).1-r • n.1,v))∈arrivalPhaseDomain F.flow zX T), + F.arrival_polar_time zX hσ hr n] + +lemma PhaseFlowOn.lintegral_weighted_labelConeKernel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + {b : ℝ→ℝ} (hb : Measurable b) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T p))*ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻z : Phase, + ENNReal.ofReal (b (arrivalReceiverTime F.flow zX T (σ,z)))*ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖ := by + classical + let g : ℝ×Phase→ENNReal := fun p=>ENNReal.ofReal (b (arrivalReceiverTime F.flow zX T p))*ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A p‖ + have hg : Measurable g := (hb.comp (F.arrivalReceiverTime_measurable zX)).ennreal_ofReal.mul + (F.measurable_arrivalConeKernel hs zX hA).norm.ennreal_ofReal + have he : (fun p=>ENNReal.ofReal (b (labelReceiverTime F.flow zX T p))*ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + phaseTimePullback F.flow T g := by + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have ha := (labelBranchDomain_iff _ _ _ _).mp hp + have ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) := ⟨hp.1.1,mem_univ _⟩ + have ha' : (p.1,(F.flow p.2 p.1).1)∈arrivalDomain F.flow zX T := ha + rw [F.labelConeKernel_eq_pullback hs zX] + simp only [phaseTimePullback,indicator_of_mem ht,g,labelReceiverTime,indicator_of_mem hp, + arrivalReceiverTime,indicator_of_mem ha',F.arrivalTime_flow_eq_branchTime zX p.2 hp] + · have ha := mt (labelBranchDomain_iff _ _ _ _).mpr hp + rw [labelConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero,mul_zero] + by_cases ht : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · simp only [phaseTimePullback,indicator_of_mem ht,g,arrivalConeKernel,indicator_of_notMem ha, + norm_zero,ENNReal.ofReal_zero,mul_zero] + · simp only [phaseTimePullback,indicator_of_notMem ht] + rw [he,F.lintegral_phaseTimePullback hg] + change (∫⁻p,g p ∂((volume : Measure ℝ).prod (volume : Measure Phase)).restrict (Ioo 0 T ×ˢ univ))=_ + rw [←Measure.restrict_prod_eq_prod_univ] + exact lintegral_prod _ hg.aemeasurable + +lemma PhaseFlowOn.arrivalConeKernel_polar_weighted_norm {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + (hσ : σ∈Ioo 0 T) {b : ℝ→ℝ} (hb : Measurable b) : + (∫⁻z : Phase,ENNReal.ofReal (b (arrivalReceiverTime F.flow zX T (σ,z)))*ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖)= + ∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (b (σ+r))*ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + classical + let g : Vec→ENNReal := fun y=>∫⁻v : Vec,ENNReal.ofReal (b (arrivalReceiverTime F.flow zX T (σ,(y,v))))*ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,(y,v))‖ + have hm : Measurable (fun z : Phase=>ENNReal.ofReal (b (arrivalReceiverTime F.flow zX T (σ,z)))*ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖) := + (hb.comp ((F.arrivalReceiverTime_measurable zX).comp (measurable_const.prodMk measurable_id))).ennreal_ofReal.mul + (((F.measurable_arrivalConeKernel hs zX hA).comp (measurable_const.prodMk measurable_id)).norm).ennreal_ofReal + have hg : Measurable g := hm.lintegral_prod_right' + calc + _ = ∫⁻y : Vec,g y := lintegral_prod _ hm.aemeasurable + _ = ∫⁻y in ball (F.flow zX T).1 (T-σ),g y := by + rw [←lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y∈ball (F.flow zX T).1 (T-σ) + · rw [indicator_of_mem hy] + · rw [indicator_of_notMem hy] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hp : (σ,(y,v))∉arrivalPhaseDomain F.flow zX T := by + intro hp + apply hy + rw [mem_ball,dist_eq_norm,norm_sub_rev] + linarith [hp.2.1] + simp only [arrivalConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero,Pi.zero_apply,mul_zero] + _ = _ := by + rw [F.receiver_polar_lintegral (Ioo_subset_Icc_self hσ) zX hg] + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + have hd : 0≤1-dot n.1 (velocity (F.flow zX (σ+r)).2) := (cone_denom_pos _ _ (sphere_norm n)).le + have he : r^2*(1-dot n.1 (velocity (F.flow zX (σ+r)).2))*r⁻¹^2= + 1-dot n.1 (velocity (F.flow zX (σ+r)).2) := by + field_simp [hr.1.ne'] + dsimp only [g] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + ←lintegral_const_mul' _ _ (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ENNReal.ofReal_ne_top)] + apply lintegral_congr + intro v + have hp : (σ,((F.flow zX (σ+r)).1-r • n.1,v))∈arrivalPhaseDomain F.flow zX T := + F.arrival_polar_mem zX hσ hr n + rw [F.arrivalReceiverTime_polar zX hσ hr n v,arrivalConeKernel,indicator_of_mem hp,F.arrival_polar_radius zX hσ hr n] + simp only [arrivalKernelState,F.arrival_polar_time zX hσ hr n,F.arrival_polar_direction zX hσ hr n, + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (r⁻¹))] + rw [ENNReal.ofReal_mul (sq_nonneg (r⁻¹))] + calc + _ = ENNReal.ofReal (b (σ+r))*((ENNReal.ofReal (r^2*(1-dot n.1 (velocity (F.flow zX (σ+r)).2)))*ENNReal.ofReal (r⁻¹^2))* + ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖) := by simp only [norm_smul,Real.norm_eq_abs]; ac_rfl + _ = _ := by + rw [←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg r) hd),he] + simp only [norm_smul,Real.norm_eq_abs] + ac_rfl + +lemma PhaseFlowOn.labelConeKernel_polar_weighted_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + {b : ℝ→ℝ} (hb : Measurable b) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T p))*ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (b (σ+r))*ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + rw [F.lintegral_weighted_labelConeKernel hs zX hA hb] + exact setLIntegral_congr_fun measurableSet_Ioo (fun σ hσ=>F.arrivalConeKernel_polar_weighted_norm hs zX hA hσ hb) + +lemma PhaseFlowOn.labelConeKernel_triangle_weighted_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + {b : ℝ→ℝ} (hb : Measurable b) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal (b (labelReceiverTime F.flow zX T p))*ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (b t)*ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + let X := prefixFlow F.flow T zX + have hc : Continuous (prefixClamp T) := continuous_const.max (continuous_const.min continuous_id) + have hX : Continuous X := (F.continuousOn_time zX).comp_continuous hc (prefixClamp_mem hT) + let S : (ℝ×ℝ×Sphere)×Vec → ConeKernelState := fun p=> + ((prefixClamp T p.1.1,prefixClamp T p.1.2.1), + (p.1.2.2.1,((X p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) + have hS : Continuous S := by dsimp [S]; fun_prop + have hSA : Continuous (fun p=>A (S p)) := hA.comp_continuous hS (fun p=> + ⟨⟨prefixClamp_mem hT _,prefixClamp_mem hT _⟩,⟨p.1.2.2.2,mem_univ _⟩⟩) + have hSf : Continuous (fun p=>s.f ((S p).1.2,(S p).2.2)) := + hs.f_smooth.continuousOn.comp_continuous (hS.fst.snd.prodMk hS.snd.snd) + (fun p=>⟨prefixClamp_mem hT _,mem_univ _⟩) + let f : ℝ×ℝ×Sphere → ENNReal := fun p=> + ENNReal.ofReal (b p.1)*ENNReal.ofReal (1-dot p.2.2.1 (velocity (X p.1).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f ((S (p,v)).1.2,(S (p,v)).2.2) • A (S (p,v))‖ + have hD : Continuous (fun p : ℝ×ℝ×Sphere=>1-dot p.2.2.1 (velocity (X p.1).2)) := by + simp only [dot_eq_inner] + exact continuous_const.sub ((continuous_subtype_val.comp continuous_snd.snd).inner + ((contDiff_velocity (k:=1)).continuous.comp (hX.comp continuous_fst).snd)) + have hf : Measurable f := ((hb.comp measurable_fst).ennreal_ofReal.mul hD.measurable.ennreal_ofReal).mul + ((hSf.smul hSA).norm.measurable.ennreal_ofReal.lintegral_prod_right') + have he : ∀t∈Icc 0 T,∀σ∈Icc 0 T,∀n : Sphere, + f (t,σ,n)=ENNReal.ofReal (b t)*ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ := by + intro t ht σ hσ n + simp only [f,S,X,prefixFlow,prefixClamp_eq ht,prefixClamp_eq hσ] + rw [F.labelConeKernel_polar_weighted_norm hs zX hA hb] + calc + _ = ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ),f (σ+r,σ,n) ∂volume ∂sphereMeasure := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + dsimp only + rw [he _ ⟨by linarith [hσ.1,hr.1],by linarith [hr.2]⟩ _ (Ioo_subset_Icc_self hσ)] + simp only [add_sub_cancel_left] + _ = ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere,f (t,σ,n) ∂sphereMeasure := + lintegral_retarded_triangle_parameter sphereMeasure T hf + _ = _ := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + exact lintegral_congr (fun n=>he _ (Ioo_subset_Icc_self ht) _ ⟨hσ.1.le,hσ.2.le.trans ht.2.le⟩ n) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeArgument.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeArgument.lean new file mode 100644 index 0000000000000000000000000000000000000000..deccee9bdd5be99f0b9e458baae2174fbec5c330 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeArgument.lean @@ -0,0 +1,497 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.Sphere + +namespace OAI + +noncomputable section +open MeasureTheory Set +open scoped ContDiff +open Filter Set +open scoped Topology +open Set MeasureTheory Filter +open scoped Topology NNReal +open scoped Topology ContDiff +open Set MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def coneArgument (T ε : ℝ) (x₀ : Vec) (p : ℝ × Vec) : ℝ := + ((T-p.1)^2 - ‖p.2-x₀‖^2)/ε + +def coneCutoff (T ε : ℝ) (x₀ : Vec) (p : ℝ × Vec) : ℝ := + Real.smoothTransition (coneArgument T ε x₀ p) + +lemma contDiff_coneArgument (T ε : ℝ) (x₀ : Vec) {k : ℕ∞} : + ContDiff ℝ k (coneArgument T ε x₀) := + ((contDiff_const.sub contDiff_fst).pow 2 |>.sub + ((contDiff_snd.sub contDiff_const).norm_sq ℝ)).div_const ε + +lemma contDiff_coneCutoff (T ε : ℝ) (x₀ : Vec) {k : ℕ∞} : + ContDiff ℝ k (coneCutoff T ε x₀) := + Real.smoothTransition.contDiff.comp (contDiff_coneArgument T ε x₀) + +lemma deriv_transition_nonneg (u : ℝ) : 0 ≤ deriv Real.smoothTransition u := + Real.smoothTransition.monotone.deriv_nonneg + +lemma deriv_transition_zero_neg {u : ℝ} (hu : u < 0) : + deriv Real.smoothTransition u = 0 := by + have he : Real.smoothTransition =ᶠ[𝓝 u] fun _ => (0 : ℝ) := by + filter_upwards [gt_mem_nhds hu] with v hv + exact Real.smoothTransition.zero_of_nonpos hv.le + rw [he.deriv_eq,deriv_const] + +lemma coneArgument_fderiv (T ε : ℝ) (x₀ : Vec) (p v : ℝ × Vec) : + fderiv ℝ (coneArgument T ε x₀) p v = + (-2*(T-p.1)*v.1 - 2*⟪p.2-x₀,v.2⟫)/ε := by + have hd := (((hasFDerivAt_const T p).sub (hasFDerivAt_fst (𝕜 := ℝ) (p := p))).pow 2).sub + (((hasFDerivAt_snd (𝕜 := ℝ) (p := p)).sub (hasFDerivAt_const x₀ p)).norm_sq) + have hh := hd.const_smul ε⁻¹ + have he : (fun y => ε⁻¹ • (((T-y.1)^2)-‖y.2-x₀‖^2)) = coneArgument T ε x₀ := by + ext y + simp [coneArgument,div_eq_mul_inv,mul_comm] + change HasFDerivAt (fun y => ε⁻¹ • ((T-y.1)^2-‖y.2-x₀‖^2)) _ p at hh + rw [he] at hh + rw [hh.fderiv] + simp [smul_eq_mul, div_eq_mul_inv, inner_sub_left] + ring + +lemma coneCutoff_fderiv (T ε : ℝ) (x₀ : Vec) (p v : ℝ × Vec) : + fderiv ℝ (coneCutoff T ε x₀) p v = + deriv Real.smoothTransition (coneArgument T ε x₀ p) * + ((-2*(T-p.1)*v.1-2*⟪p.2-x₀,v.2⟫)/ε) := by + have hθ := (Real.smoothTransition.contDiff (n := 1)).differentiable (by simp) + have hg := (contDiff_coneArgument T ε x₀ (k := 1)).differentiable (by simp) + have hh := (hθ (coneArgument T ε x₀ p)).hasDerivAt.comp_hasFDerivAt p (hg p).hasFDerivAt + change HasFDerivAt (coneCutoff T ε x₀) _ p at hh + rw [hh.fderiv] + simpa [smul_eq_mul] using congrArg + (fun c : ℝ => deriv Real.smoothTransition (coneArgument T ε x₀ p) * c) + (coneArgument_fderiv T ε x₀ p v) + +lemma coneArgument_neg_outside {T ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Icc 0 T) + {x x₀ : Vec} (hx : x ∉ closedBall x₀ T) : coneArgument T ε x₀ (t,x) < 0 := by + have hr : T < ‖x-x₀‖ := by simpa [mem_closedBall,dist_eq_norm] using hx + dsimp [coneArgument] + apply div_neg_of_neg_of_pos _ hε + have hR : 0 ≤ T-t := sub_nonneg.mpr ht.2 + have he : T-t < ‖x-x₀‖ := lt_of_le_of_lt (sub_le_self _ ht.1) hr + nlinarith [sq_lt_sq₀ hR (norm_nonneg (x-x₀)) |>.mpr he] + +lemma coneCutoff_zero_outside {T ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Icc 0 T) + {x x₀ : Vec} (hx : x ∉ closedBall x₀ T) : coneCutoff T ε x₀ (t,x) = 0 := + Real.smoothTransition.zero_of_nonpos (coneArgument_neg_outside hε ht hx).le + +def coneShellFlux (s : Solution) (T ε : ℝ) (x₀ : Vec) (p : ℝ × Vec) : ℝ := + (2/ε)*deriv Real.smoothTransition (coneArgument T ε x₀ p) * + ((T-p.1)*totalEnergy s p + ⟪p.2-x₀,totalFlux s p⟫) + +lemma coneShellFlux_zero_outside (s : Solution) {T ε t : ℝ} (hε : 0 < ε) + (ht : t ∈ Icc 0 T) {x x₀ : Vec} (hx : x ∉ closedBall x₀ T) : + coneShellFlux s T ε x₀ (t,x) = 0 := by + simp [coneShellFlux,deriv_transition_zero_neg (coneArgument_neg_outside hε ht hx)] + +lemma coneShellFlux_nonneg {d : Datum} {s : Solution} (hs : Classical d s) + {T ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Icc 0 T) (x x₀ : Vec) : + 0 ≤ coneShellFlux s T ε x₀ (t,x) := by + by_cases hr : ‖x-x₀‖ ≤ T-t + · apply mul_nonneg (mul_nonneg (by positivity) (deriv_transition_nonneg _)) + have hb := classical_total_flux_bound hs ht.1 x + have he := classical_total_energy_nonneg hs ht.1 x + have hc := real_inner_le_norm (-(x-x₀)) (totalFlux s (t,x)) + simp only [inner_neg_left,norm_neg] at hc + nlinarith [mul_le_mul_of_nonneg_left hb (norm_nonneg (x-x₀)), + mul_le_mul_of_nonneg_right hr he] + · have hn : coneArgument T ε x₀ (t,x) < 0 := by + dsimp [coneArgument] + apply div_neg_of_neg_of_pos _ hε + have := norm_nonneg (x-x₀) + push Not at hr + have hR : 0 ≤ T-t := sub_nonneg.mpr ht.2 + nlinarith [sq_lt_sq₀ hR (norm_nonneg (x-x₀)) |>.mpr hr] + simp [coneShellFlux,deriv_transition_zero_neg hn] + +lemma deriv_cone_energy {d : Datum} {s : Solution} (hs : Classical d s) + {T ε t : ℝ} (hε : 0 < ε) (ht : t ∈ Ioo 0 T) (x₀ : Vec) : + HasDerivAt (fun r => ∫ x : Vec, coneCutoff T ε x₀ (r,x)*totalEnergy s (r,x)) + (-(∫ x : Vec, coneShellFlux s T ε x₀ (t,x))) t := by + have hh := deriv_moving_energy hs isOpen_Ioo (fun _ h => h.1) + (isCompact_closedBall x₀ T) (contDiff_coneCutoff T ε x₀ (k := 1)).contDiffOn + (fun r hr x hx => coneCutoff_zero_outside hε ⟨hr.1.le,hr.2.le⟩ hx) ht + convert hh using 1 + rw [← integral_neg] + apply integral_congr_ae + apply ae_of_all + intro x + dsimp only + rw [coneCutoff_fderiv,coneCutoff_fderiv] + simp only [inner_zero_right,mul_zero,mul_one,sub_zero,zero_sub] + dsimp [coneShellFlux] + ring + +lemma classical_particle_flux_continuous_slab {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (particleFlux s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + obtain ⟨K,hK,hzero⟩ := hs.2.2.2.2.2.2.1 T hT + change ContinuousOn (fun p : ℝ × Vec => ∫ v : Vec, s.f (p.1,p.2,v) • v) _ + apply continuousOn_integral_uniform_support + (F := fun z : (ℝ × Vec) × Vec => s.f (z.1.1,z.1.2,z.2) • z.2) (hK.image continuous_snd) + · have hf : ContinuousOn (fun z : (ℝ × Vec) × Vec => s.f (z.1.1,z.1.2,z.2)) + ((Icc 0 T ×ˢ univ) ×ˢ univ) := by + apply hs.1.continuousOn.comp (contDiff_reassociate (k := 1)).continuous.continuousOn + intro z hz + exact hz.1.1.1 + exact hf.smul continuous_snd.continuousOn + · intro p hp v hv + have hf : s.f (p.1,p.2,v) = 0 := by + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 hp.1 (subset_tsupport _ hn),rfl⟩ + simp only [hf,zero_smul] + +lemma classical_total_flux_continuous_slab {d : Datum} {s : Solution} + (hs : Classical d s) {T : ℝ} (hT : 0 ≤ T) : + ContinuousOn (totalFlux s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have hsub : Icc 0 T ×ˢ (univ : Set Vec) ⊆ fieldHalfSpace := fun z hz => hz.1.1 + exact ((contDiff_cross (k := 1)).continuous.comp_continuousOn + ((hs.2.1.continuousOn.mono hsub).prodMk (hs.2.2.1.continuousOn.mono hsub))).add + (classical_particle_flux_continuous_slab hs hT) + +lemma coneShellFlux_continuous_slab {d : Datum} {s : Solution} + (hs : Classical d s) {T ε : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + ContinuousOn (coneShellFlux s T ε x₀) (Icc 0 T ×ˢ (univ : Set Vec)) := by + have hθ : Continuous (deriv Real.smoothTransition) := + (Real.smoothTransition.contDiff (n := 2)).continuous_deriv (by simp) + exact ((continuous_const.mul (hθ.comp (contDiff_coneArgument T ε x₀ (k := 1)).continuous)).continuousOn).mul + (((continuous_const.sub continuous_fst).continuousOn.mul + (classical_total_energy_continuous_slab hs hT)).add + ((continuous_snd.sub continuous_const).continuousOn.inner + (classical_total_flux_continuous_slab hs hT))) + +lemma coneShellFlux_integral_continuous {d : Datum} {s : Solution} + (hs : Classical d s) {T ε : ℝ} (hT : 0 ≤ T) (hε : 0 < ε) (x₀ : Vec) : + ContinuousOn (fun t => ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ T) + (coneShellFlux_continuous_slab hs hT x₀) + intro t ht x hx + exact coneShellFlux_zero_outside s hε ht hx + +lemma cone_energy_continuous {d : Datum} {s : Solution} + (hs : Classical d s) {T ε : ℝ} (hT : 0 ≤ T) (hε : 0 < ε) (x₀ : Vec) : + ContinuousOn (fun t => ∫ x : Vec, coneCutoff T ε x₀ (t,x)*totalEnergy s (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ T) + ((contDiff_coneCutoff T ε x₀ (k := 1)).continuous.continuousOn.mul + (classical_total_energy_continuous_slab hs hT)) + intro t ht x hx + change coneCutoff T ε x₀ (t,x)*totalEnergy s (t,x)=0 + simp only [coneCutoff_zero_outside hε ht hx,zero_mul] + +lemma coneShellFlux_bound {d : Datum} {s : Solution} (hs : Classical d s) + {T ε b : ℝ} (hb : 0 ≤ b) (hbT : b ≤ T) (hε : 0 < ε) (x₀ : Vec) : + (∫ t in 0..b, ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + have hT := hb.trans hbT + have hsub : Icc (0:ℝ) b ⊆ Icc 0 T := Icc_subset_Icc_right hbT + have hc := (cone_energy_continuous hs hT hε x₀).mono hsub + have hi := ((coneShellFlux_integral_continuous hs hT hε x₀).mono hsub).intervalIntegrable_of_Icc (μ := volume) hb + have hf := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hb hc + (fun t ht => deriv_cone_energy hs hε ⟨ht.1,ht.2.trans_le hbT⟩ x₀) hi.neg + rw [intervalIntegral.integral_neg] at hf + have hbpos : 0 ≤ ∫ x : Vec, coneCutoff T ε x₀ (b,x)*totalEnergy s (b,x) := by + apply integral_nonneg + intro x + exact mul_nonneg (Real.smoothTransition.nonneg _) (classical_total_energy_nonneg hs hb x) + have hzero : (∫ x : Vec, coneCutoff T ε x₀ (0,x)*totalEnergy s (0,x)) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + refine integral_mono ?_ (classical_total_energy_integrable hs le_rfl) ?_ + · apply Continuous.integrable_of_hasCompactSupport + · apply Continuous.mul ((contDiff_coneCutoff T ε x₀ (k := 1)).continuous.comp + (continuous_const.prodMk continuous_id)) + apply (classical_total_energy_continuous_slab hs hT).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨⟨le_rfl,hT⟩,mem_univ x⟩ + · apply HasCompactSupport.mul_right + apply compactSupport_of_zero_off (isCompact_closedBall x₀ T) + exact fun x hx => coneCutoff_zero_outside hε ⟨le_rfl,hT⟩ hx + · intro x + exact mul_le_of_le_one_left (classical_total_energy_nonneg hs le_rfl x) + (Real.smoothTransition.le_one _) + linarith + +lemma deriv_transition_zero_gt_one {u : ℝ} (hu : 1 < u) : + deriv Real.smoothTransition u = 0 := by + have he : Real.smoothTransition =ᶠ[𝓝 u] fun _ => (1 : ℝ) := by + filter_upwards [lt_mem_nhds hu] with v hv + exact Real.smoothTransition.one_of_one_le hv.le + rw [he.deriv_eq,deriv_const] + +def radialConeWeight (R ε r : ℝ) : ℝ := + (2*r/ε)*deriv Real.smoothTransition ((R^2-r^2)/ε) + +lemma continuous_radialConeWeight (R ε : ℝ) : Continuous (radialConeWeight R ε) := by + have hθ := (Real.smoothTransition.contDiff (n := 2)).continuous_deriv (by simp) + exact ((continuous_const.mul continuous_id).div_const ε).mul + (hθ.comp ((continuous_const.sub (continuous_id.pow 2)).div_const ε)) + +lemma radialConeWeight_nonneg {ε r : ℝ} (hε : 0 < ε) (hr : 0 ≤ r) (R : ℝ) : + 0 ≤ radialConeWeight R ε r := + mul_nonneg (by positivity) (deriv_transition_nonneg _) + +lemma deriv_radial_cone (R ε r : ℝ) : + HasDerivAt (fun z => Real.smoothTransition ((R^2-z^2)/ε)) + (-radialConeWeight R ε r) r := by + have hθ := (Real.smoothTransition.contDiff (n := 1)).differentiable (by simp) + have hh := (hθ _).hasDerivAt.comp r + (((hasDerivAt_const r (R^2)).sub ((hasDerivAt_id r).pow 2)).div_const ε) + convert! hh using 1 + simp only [radialConeWeight,Pi.sub_apply,id_eq,Pi.pow_apply, + Nat.cast_ofNat,Nat.reduceSub,pow_one,mul_one,zero_sub] + ring + +lemma radialConeWeight_mass {R : ℝ} (hR : 0 ≤ R) (ε : ℝ) : + (∫ r in 0..R, radialConeWeight R ε r) = Real.smoothTransition (R^2/ε) := by + have hf := intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hR + (Real.smoothTransition.continuous.comp ((continuous_const.sub (continuous_id.pow 2)).div_const ε)).continuousOn + (fun r _ => deriv_radial_cone R ε r) + ((continuous_radialConeWeight R ε).neg.intervalIntegrable 0 R) + rw [intervalIntegral.integral_neg] at hf + simp only [Function.comp_def,Pi.sub_apply,Pi.pow_apply,id_eq,sub_self,zero_div,Real.smoothTransition.zero,zero_sub,zero_pow (by norm_num : 2 ≠ 0),sub_zero] at hf + linarith + +lemma radialConeWeight_local {R ε δ r : ℝ} (hR : 0 < R) (hε : 0 < ε) + (hεδ : ε < R*δ) (hr : r ∈ Icc 0 R) (hfar : δ ≤ R-r) : + radialConeWeight R ε r = 0 := by + have ha : 1 < (R^2-r^2)/ε := by + apply (lt_div_iff₀ hε).mpr + have hh : ε < R*(R-r) := hεδ.trans_le (mul_le_mul_of_nonneg_left hfar hR.le) + nlinarith [mul_nonneg hr.1 (sub_nonneg.mpr hr.2)] + simp [radialConeWeight,deriv_transition_zero_gt_one ha] + +lemma radialConeWeight_tendsto {R : ℝ} (hR : 0 < R) {F : ℝ → ℝ} + (hF : ContinuousOn F (Icc 0 R)) : + Filter.Tendsto (fun ε => ∫ r in 0..R, radialConeWeight R ε r * F r) + (𝓝[>] (0 : ℝ)) (𝓝 (F R)) := by + rw [Metric.tendsto_nhds] + intro η hη + obtain ⟨δ,hδ,hclose⟩ := (Metric.continuousWithinAt_iff.mp (hF R ⟨hR.le,le_rfl⟩)) + (η/2) (by positivity) + have hev : ∀ᶠ ε : ℝ in 𝓝[>] (0 : ℝ), 0 < ε ∧ ε < min (R^2) (R*δ) := by + apply Filter.eventually_of_mem (Ioo_mem_nhdsGT (by positivity : 0 < min (R^2) (R*δ))) + intro ε hε + exact hε + filter_upwards [hev] with ε hε + have hw : ContinuousOn (radialConeWeight R ε) (Icc 0 R) := (continuous_radialConeWeight R ε).continuousOn + have hwI := (continuous_radialConeWeight R ε).intervalIntegrable (μ := volume) 0 R + have hFI : IntervalIntegrable (fun r => radialConeWeight R ε r * F r) volume 0 R := + (hw.mul hF).intervalIntegrable_of_Icc (μ := volume) hR.le + have hm : (∫ r in 0..R, radialConeWeight R ε r) = 1 := by + rw [radialConeWeight_mass hR.le] + apply Real.smoothTransition.one_of_one_le + exact (le_div_iff₀ hε.1).mpr (by simpa using (lt_of_lt_of_le hε.2 (min_le_left _ _)).le) + have heq : (∫ r in 0..R, radialConeWeight R ε r * F r) - F R = + ∫ r in 0..R, radialConeWeight R ε r * (F r-F R) := by + simp_rw [mul_sub] + rw [intervalIntegral.integral_sub hFI (hwI.mul_const _),intervalIntegral.integral_mul_const,hm,one_mul] + have hb : ‖∫ r in 0..R, radialConeWeight R ε r * (F r-F R)‖ ≤ η/2 := by + have hh := intervalIntegral.norm_integral_le_of_norm_le hR.le + (g := fun r => radialConeWeight R ε r * (η/2)) (μ := volume) + (ae_of_all _ (fun r hr => show ‖radialConeWeight R ε r * (F r-F R)‖ ≤ + radialConeWeight R ε r * (η/2) from by + have hr' : r ∈ Icc 0 R := ⟨hr.1.le,hr.2⟩ + have hp := radialConeWeight_nonneg hε.1 hr'.1 R + by_cases hd : δ ≤ R-r + · rw [radialConeWeight_local hR hε.1 (lt_of_lt_of_le hε.2 (min_le_right _ _)) hr' hd] + simp + · have hd' : dist r R < δ := by + rw [Real.dist_eq,abs_of_nonpos (sub_nonpos.mpr hr.2)] + linarith + have hc := hclose hr' hd' + rw [Real.dist_eq] at hc + simp only [norm_mul,Real.norm_eq_abs,abs_of_nonneg hp] + exact mul_le_mul_of_nonneg_left hc.le hp)) (hwI.mul_const _) + simpa only [intervalIntegral.integral_mul_const,hm,one_mul] using hh + rw [dist_eq_norm,heq] + exact hb.trans_lt (by linarith) + +lemma sphere_norm (n : Sphere) : ‖n.1‖ = 1 := by + simpa only [mem_sphere,dist_zero_right] using n.2 + +def radialConeProfile (s : Solution) (t R : ℝ) (x₀ : Vec) (r : ℝ) (n : Sphere) : ℝ := + r * (R*totalEnergy s (t,x₀+r • n.1) + r*⟪n.1,totalFlux s (t,x₀+r • n.1)⟫) + +lemma continuous_radialConeProfile {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (R : ℝ) (x₀ : Vec) : + Continuous (fun p : ℝ × Sphere => radialConeProfile s t R x₀ p.1 p.2) := by + have hU : Continuous (fun x => totalEnergy s (t,x)) := by + apply (classical_total_energy_continuous_slab hs ht).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨⟨ht,le_rfl⟩,mem_univ x⟩ + have hS : Continuous (fun x => totalFlux s (t,x)) := by + apply (classical_total_flux_continuous_slab hs ht).comp_continuous + (continuous_const.prodMk continuous_id) + intro x + exact ⟨⟨ht,le_rfl⟩,mem_univ x⟩ + have hx : Continuous (fun p : ℝ × Sphere => x₀ + p.1 • p.2.1) := by fun_prop + exact continuous_fst.mul ((continuous_const.mul (hU.comp hx)).add + (continuous_fst.mul ((continuous_subtype_val.comp continuous_snd).inner (hS.comp hx)))) + +lemma continuous_spherical_radialConeProfile {d : Datum} {s : Solution} (hs : Classical d s) + {t : ℝ} (ht : 0 ≤ t) (R : ℝ) (x₀ : Vec) : + Continuous (fun r => ∫ n : Sphere, radialConeProfile s t R x₀ r n ∂sphereMeasure) := by + apply continuousOn_univ.mp + apply continuousOn_integral_of_compact_support (k := univ) isCompact_univ + (continuous_radialConeProfile hs ht R x₀).continuousOn + intro r n _ hn + exact (hn (mem_univ n)).elim + +lemma coneShellFlux_polar_kernel (s : Solution) (T ε t r : ℝ) (x₀ : Vec) (n : Sphere) : + r^2 • coneShellFlux s T ε x₀ (t,x₀+r • n.1) = + radialConeWeight (T-t) ε r * radialConeProfile s t (T-t) x₀ r n := by + have hn : ‖r • n.1‖^2 = r^2 := by simp [norm_smul,Real.norm_eq_abs,sq_abs] + simp only [coneShellFlux,coneArgument,radialConeWeight,radialConeProfile, + add_sub_cancel_left,hn,inner_smul_left,smul_eq_mul,starRingEnd_apply,star_trivial] + ring + +lemma radialConeWeight_zero_above {R ε r : ℝ} (hR : 0 ≤ R) (hε : 0 < ε) (hr : R < r) : + radialConeWeight R ε r = 0 := by + have ha : (R^2-r^2)/ε < 0 := by + apply div_neg_of_neg_of_pos _ hε + nlinarith [sq_lt_sq₀ hR (hR.trans hr.le) |>.mpr hr] + simp [radialConeWeight,deriv_transition_zero_neg ha] + +lemma radialConeWeight_integral_Ioi {R ε : ℝ} (hR : 0 ≤ R) (hε : 0 < ε) + (F : ℝ → ℝ) : + (∫ r in Ioi 0, radialConeWeight R ε r * F r) = + ∫ r in 0..R, radialConeWeight R ε r * F r := by + rw [intervalIntegral.integral_of_le hR] + apply setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Ioi Ioc_subset_Ioi_self + intro r hr + have hrr : R < r := by + by_contra hn + exact hr.2 ⟨hr.1,not_lt.mp hn⟩ + rw [radialConeWeight_zero_above hR hε hrr,zero_mul] + +lemma coneShellFlux_polar {d : Datum} {s : Solution} (hs : Classical d s) + {T ε t : ℝ} (ht : t ∈ Icc 0 T) (hε : 0 < ε) (x₀ : Vec) : + (∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) = + ∫ r in 0..(T-t), radialConeWeight (T-t) ε r * + (∫ n : Sphere, radialConeProfile s t (T-t) x₀ r n ∂sphereMeasure) := by + have hR : 0 ≤ T-t := sub_nonneg.mpr ht.2 + have hC : Continuous (fun x => coneShellFlux s T ε x₀ (t,x₀+x)) := by + apply (coneShellFlux_continuous_slab hs (ht.1.trans ht.2) x₀).comp_continuous + (continuous_const.prodMk (continuous_const.add continuous_id)) + intro x + exact ⟨ht,mem_univ _⟩ + have hK : HasCompactSupport (fun x => coneShellFlux s T ε x₀ (t,x₀+x)) := by + apply compactSupport_of_zero_off (isCompact_closedBall (0:Vec) T) + intro x hx + apply coneShellFlux_zero_outside s hε ht + simpa only [mem_closedBall,dist_eq_norm,add_sub_cancel_left,sub_zero] using hx + have htrans := integral_add_left_eq_self (μ := (volume : Measure Vec)) + (fun x => coneShellFlux s T ε x₀ (t,x)) x₀ + rw [← htrans,integral_polar (hC.integrable_of_hasCompactSupport hK)] + simp_rw [coneShellFlux_polar_kernel,radialConeWeight_integral_Ioi hR hε] + have hcont : Continuous (fun p : ℝ × Sphere => + radialConeWeight (T-t) ε p.1 * radialConeProfile s t (T-t) x₀ p.1 p.2) := + ((continuous_radialConeWeight (T-t) ε).comp continuous_fst).mul + (continuous_radialConeProfile hs ht.1 (T-t) x₀) + have hi : Integrable (fun p : ℝ × Sphere => radialConeWeight (T-t) ε p.1 * + radialConeProfile s t (T-t) x₀ p.1 p.2) + ((volume.restrict (uIoc 0 (T-t))).prod sphereMeasure) := by + let : IsFiniteMeasure sphereMeasure := inferInstance + let : IsFiniteMeasureOnCompacts ((volume : Measure ℝ).prod sphereMeasure) := + Measure.prod.instIsFiniteMeasureOnCompacts _ _ + rw [uIoc_of_le hR,Measure.restrict_prod_eq_prod_univ] + exact (hcont.continuousOn.integrableOn_compact + (μ := (volume : Measure ℝ).prod sphereMeasure) + (isCompact_Icc.prod isCompact_univ)).mono_set + (prod_mono_left Ioc_subset_Icc_self) + rw [← intervalIntegral_integral_swap hi] + apply intervalIntegral.integral_congr + intro r _ + exact integral_const_mul _ _ + +lemma coneShellFlux_tendsto {d : Datum} {s : Solution} (hs : Classical d s) + {T t : ℝ} (ht : 0 ≤ t) (htT : t < T) (x₀ : Vec) : + Filter.Tendsto (fun ε => ∫ x : Vec, coneShellFlux s T ε x₀ (t,x)) + (𝓝[>] (0 : ℝ)) + (𝓝 (∫ n : Sphere, radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure)) := by + have hh := radialConeWeight_tendsto (sub_pos.mpr htT) + (continuous_spherical_radialConeProfile hs ht (T-t) x₀).continuousOn + apply hh.congr' + filter_upwards [self_mem_nhdsWithin] with ε hε + exact (coneShellFlux_polar hs ⟨ht,htT.le⟩ hε x₀).symm + +lemma integral_limit_nonneg_le {μ : Measure ℝ} {G : ℕ → ℝ → ℝ} {F : ℝ → ℝ} + {C : ℝ} (hC : 0 ≤ C) (hGi : ∀ n, Integrable (G n) μ) + (hGn : ∀ n, ∀ᵐ t ∂μ, 0 ≤ G n t) + (hconv : ∀ᵐ t ∂μ, Filter.Tendsto (fun n => G n t) Filter.atTop (𝓝 (F t))) + (hbound : ∀ n, (∫ t, G n t ∂μ) ≤ C) : + Integrable F μ ∧ (∫ t, F t ∂μ) ≤ C := by + have hFn : ∀ᵐ t ∂μ, 0 ≤ F t := by + filter_upwards [hconv, ae_all_iff.mpr hGn] with t ht hp + exact ge_of_tendsto' ht hp + have hnormG (n : ℕ) : (∫ t, ‖G n t‖ ∂μ) = ∫ t, G n t ∂μ := by + apply integral_congr_ae + filter_upwards [hGn n] with t ht + exact Real.norm_of_nonneg ht + have hb : Filter.liminf (fun n => ∫⁻ t, ‖G n t‖ₑ ∂μ) Filter.atTop ≤ ENNReal.ofReal C := by + apply Filter.liminf_le_of_frequently_le' + apply Filter.Frequently.of_forall + intro n + rw [← ofReal_integral_norm_eq_lintegral_enorm (hGi n),hnormG] + exact ENNReal.ofReal_le_ofReal (hbound n) + have hi := integrable_of_tendsto hconv (fun n => (hGi n).aestronglyMeasurable) + (lt_of_le_of_lt hb ENNReal.ofReal_lt_top).ne + refine ⟨hi, ?_⟩ + have hh := (lintegral_enorm_le_liminf_of_tendsto hconv + (fun n => (hGi n).aestronglyMeasurable.aemeasurable.enorm)).trans hb + rw [← ofReal_integral_norm_eq_lintegral_enorm hi, + ENNReal.ofReal_le_ofReal_iff hC] at hh + convert! hh using 1 + apply integral_congr_ae + filter_upwards [hFn] with t ht + exact (Real.norm_of_nonneg ht).symm + +lemma classical_light_cone_flux {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) (x₀ : Vec) : + IntegrableOn (fun t => ∫ n : Sphere, + radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure) (Ioo 0 T) ∧ + (∫ t in 0..T, ∫ n : Sphere, + radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure) ≤ + ∫ x : Vec, totalEnergy s (0,x) := by + let ε : ℕ → ℝ := fun n => 1 / ((n:ℝ)+1) + have hε (n : ℕ) : 0 < ε n := by dsimp [ε]; positivity + have heps : Filter.Tendsto ε Filter.atTop (𝓝[>] (0:ℝ)) := by + apply tendsto_nhdsWithin_iff.mpr + exact ⟨tendsto_one_div_add_atTop_nhds_zero_nat, Filter.Eventually.of_forall hε⟩ + let G : ℕ → ℝ → ℝ := fun n t => ∫ x : Vec, coneShellFlux s T (ε n) x₀ (t,x) + have hGi (n : ℕ) : Integrable (G n) (volume.restrict (Ioo 0 T)) := by + exact ((coneShellFlux_integral_continuous hs hT (hε n) x₀).integrableOn_compact + isCompact_Icc).mono_set Ioo_subset_Icc_self + have hGn (n : ℕ) : ∀ᵐ t ∂volume.restrict (Ioo 0 T), 0 ≤ G n t := by + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + apply integral_nonneg + intro x + exact coneShellFlux_nonneg hs (hε n) ⟨ht.1.le,ht.2.le⟩ x x₀ + have hconv : ∀ᵐ t ∂volume.restrict (Ioo 0 T), + Filter.Tendsto (fun n => G n t) Filter.atTop + (𝓝 (∫ n : Sphere, radialConeProfile s t (T-t) x₀ (T-t) n ∂sphereMeasure)) := by + apply ae_restrict_of_forall_mem measurableSet_Ioo + intro t ht + exact (coneShellFlux_tendsto hs ht.1.le ht.2 x₀).comp heps + have hb (n : ℕ) : (∫ t in Ioo 0 T, G n t) ≤ ∫ x : Vec, totalEnergy s (0,x) := by + rw [restrict_Ioo_eq_restrict_Ioc,← intervalIntegral.integral_of_le hT] + exact coneShellFlux_bound hs hT le_rfl (hε n) x₀ + obtain ⟨hi,hb⟩ := integral_limit_nonneg_le + (integral_nonneg (classical_total_energy_nonneg hs le_rfl)) hGi hGn hconv hb + refine ⟨hi, ?_⟩ + rwa [restrict_Ioo_eq_restrict_Ioc,← intervalIntegral.integral_of_le hT] at hb + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeEulerianIntegrand.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeEulerianIntegrand.lean new file mode 100644 index 0000000000000000000000000000000000000000..3aa567984e02ea427ab21bb63e1665551f3ac7cd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeEulerianIntegrand.lean @@ -0,0 +1,187 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.BinHits + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +lemma physicalBin_integral_eq_triangle {V : ℝ → Vec} (hV : Measurable V) + (C : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) {T : ℝ} (hJT : J⊆Icc 0 T) + {g : ConeCoordinate → ℝ≥0∞} (hg : Measurable g) : + (∫⁻ z,g z ∂physicalBinMeasure V C J) = + ∫⁻ t in Ioo (0:ℝ) T, ∫⁻ r in Ioo (0:ℝ) t, ∫⁻ n : Sphere, + (physicalBinBase V C J).indicator g (t,r,n) ∂sphereMeasure := by + have hbase := measurableSet_physicalBinBase hV C hJ + unfold physicalBinMeasure + rw [← lintegral_indicator hbase,lintegral_prod _ (hg.indicator hbase).aemeasurable] + simp_rw [restrict_Ioo_eq_restrict_Icc] + rw [← lintegral_indicator measurableSet_Icc] + apply lintegral_congr + intro t + have hm : Measurable (fun p : ℝ × Sphere => (physicalBinBase V C J).indicator g (t,p)) := + (hg.indicator hbase).comp (measurable_const.prodMk measurable_id) + by_cases ht : t∈Icc 0 T + · rw [indicator_of_mem ht,lintegral_prod _ hm.aemeasurable,← lintegral_indicator measurableSet_Icc] + apply lintegral_congr + intro r + by_cases hr : r∈Icc 0 t + · rw [indicator_of_mem hr] + · rw [indicator_of_notMem hr] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro n + exact indicator_of_notMem (fun hz => hr hz.2.1) _ + · rw [indicator_of_notMem ht] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro p + exact indicator_of_notMem (fun hz => ht (hJT hz.1)) _ + +def coneEulerianIntegrand (s : Solution) (T : ℝ) (X V : ℝ → Vec) + (H : Set (ℝ × Phase)) (z : ConeCoordinate) : ℝ≥0∞ := + ENNReal.ofReal ((z.1-z.2.1)^2*(1-dot z.2.2.1 (velocity (V z.1)))) * + ∫⁻ v : Vec, H.indicator (fun p => ENNReal.ofReal (prefixParticle s T p)) + (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)) + +lemma measurable_coneEulerianIntegrand {s : Solution} {T : ℝ} (hs : EnergyPrefix s T) + (hT : 0≤T) {X V : ℝ → Vec} (hX : Measurable X) (hV : Measurable V) + {H : Set (ℝ × Phase)} (hH : MeasurableSet H) : + Measurable (coneEulerianIntegrand s T X V H) := by + have hn : Measurable (fun z : ConeCoordinate => z.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp measurable_snd) + have hW : Measurable (fun z : ConeCoordinate => + ENNReal.ofReal ((z.1-z.2.1)^2*(1-dot z.2.2.1 (velocity (V z.1))))) := + (((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).mul + (measurable_const.sub (continuous_dot.measurable.comp + (hn.prodMk ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst)))))).ennreal_ofReal + have hk : Measurable (fun p : ConeCoordinate × Vec => + H.indicator (fun p => ENNReal.ofReal (prefixParticle s T p)) + (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) := by + apply ((hs.continuous_prefixParticle hT).measurable.ennreal_ofReal.indicator hH).comp + exact (measurable_fst.comp (measurable_snd.comp measurable_fst)).prodMk + (((hX.comp (measurable_fst.comp measurable_fst)).sub + (((measurable_fst.comp measurable_fst).sub + (measurable_fst.comp (measurable_snd.comp measurable_fst))).smul (hn.comp measurable_fst))).prodMk measurable_snd) + exact hW.mul hk.lintegral_prod_right' + +lemma PhaseFlowOn.cone_occupation_eq_receiver_coordinates {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) {H : Set (ℝ × Phase)} (hH : MeasurableSet H) : + coneOccupation F.flow zX T s.f H = + ∫⁻ t in Ioo (0:ℝ) T, ∫⁻ r in Ioo (0:ℝ) t, ∫⁻ n : Sphere, + coneEulerianIntegrand s T (fun t => (prefixFlow F.flow T zX t).1) + (fun t => (prefixFlow F.flow T zX t).2) H (t,r,n) ∂sphereMeasure := by + have hα : Continuous (fun t => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hg := measurable_coneEulerianIntegrand hs hT hα.fst.measurable hα.snd.measurable hH + rw [← lintegral_retarded_triangle_parameter sphereMeasure T hg] + unfold coneOccupation + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro R hR + have ht : r+R∈Icc 0 T := ⟨by linarith [hr.1,hR.1],by linarith [hR.2]⟩ + simp only [coneEulerianIntegrand,prefixFlow,prefixClamp_eq ht,add_sub_cancel_left] + congr 1 + apply lintegral_congr + intro v + by_cases hp : (r,((F.flow zX (r+R)).1-R • n.1,v))∈H + · rw [indicator_of_mem hp,indicator_of_mem hp,prefixParticle,prefixClamp_eq (Ioo_subset_Icc_self hr)] + · rw [indicator_of_notMem hp,indicator_of_notMem hp] + +lemma PhaseFlowOn.physical_bin_point_mem {E B : Field} {T a b c d t r : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (C : ClosedConeBin) (S : Set Phase) + (n : Sphere) (v : Vec) (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) + (hr : r∈Ioo 0 T) (hrC : r∈Icc c d) (hrt : r (F.flow zX t).2) C (Icc a b)) + (hv : v∈coneBinMomentumSet C n.1 (velocity (F.flow zX t).2)) + (hz : inversePhase F.flow (r,((F.flow zX t).1-(t-r) • n.1,v))∈S) : + (r,((F.flow zX t).1-(t-r) • n.1,v))∈closedBinEulerian F.flow zX T C S a b c d := by + let z := inversePhase F.flow (r,((F.flow zX t).1-(t-r) • n.1,v)) + have hflow : F.flow z r=((F.flow zX t).1-(t-r) • n.1,v) := + F.flow_inversePhase (Ioo_subset_Icc_self hr) _ + have hR : 0 s.f (0,z))⊆S) (n : Sphere) + (hJ : Icc a b⊆Icc 0 T) (hC : Icc c d⊆Icc 0 T) + (hr : r∈Ioo 0 T) (hrC : r∈Icc c d) (hrt : r (F.flow zX t).2) C (Icc a b)) : + physicalBinDensity s (fun t => (F.flow zX t).1) (fun t => (F.flow zX t).2) C t r n ≤ + ∫⁻ v : Vec, (closedBinEulerian F.flow zX T C S a b c d).indicator + (fun p => ENNReal.ofReal (s.f p)) (r,((F.flow zX t).1-(t-r) • n.1,v)) := by + unfold physicalBinDensity + rw [← lintegral_indicator (measurableSet_coneBinMomentumSet C _ _)] + apply lintegral_mono + intro v + dsimp only + by_cases hv : v∈coneBinMomentumSet C n.1 (velocity (F.flow zX t).2) + · rw [indicator_of_mem hv] + by_cases hf : s.f (r,((F.flow zX t).1-(t-r) • n.1,v))=0 + · rw [hf,ENNReal.ofReal_zero] + exact bot_le + · have hf0 : s.f (0,inversePhase F.flow (r,((F.flow zX t).1-(t-r) • n.1,v)))≠0 := by + rwa [← F.transport_inverse hs.f_smooth hs.vlasov (Ioo_subset_Icc_self hr)] + have hz := hS (subset_tsupport _ hf0) + rw [indicator_of_mem (F.physical_bin_point_mem zX C S n v hJ hC hr hrC hrt htT hb hv hz)] + · rw [indicator_of_notMem hv] + exact bot_le + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeForceSplit.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeForceSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc75f548235f286767f41badedbe4085dc1c24b6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeForceSplit.lean @@ -0,0 +1,262 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.SelectedRemainderPhysical + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma selectedDyadicCutoff_compl {ι : Type*} [Fintype ι] {x : ι→ℝ} + (hp : ∀i,0x i) (t:=0) (fun _=>continuousAt_const) hp + have hQ := (selectedDyadicCutoff_local_box he Q).eq_of_nhds + have hQc := (selectedDyadicCutoff_local_box he Qᶜ).eq_of_nhds + change selectedDyadicCutoff Q x=∑k∈selectedDyadicBox N Q,dyadicMultiFactor k x at hQ + change selectedDyadicCutoff Qᶜ x=∑k∈selectedDyadicBox N Qᶜ,dyadicMultiFactor k x at hQc + rw [hQ,hQc,selectedDyadicBox_compl] + apply eq_sub_iff_add_eq.mpr + have hs : selectedDyadicBox N Q ⊆ dyadicBox ι N := Finset.filter_subset _ _ + rw [Finset.sum_sdiff hs] + exact sum_dyadicMultiFactor_eq_one N x h1 hN + +lemma PhaseFlowOn.labelCutoff_compl_smul {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (A : ConeKernelState→Vec) (p : ℝ×Phase) : + labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T A p= + (1-labelSelectedCutoff F.flow zX T Q p) • labelConeKernel s F.flow zX T A p := by + classical + by_cases hp : p∈labelBranchDomain F.flow zX T + · have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hr : 0velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + refine continuousOn_normalisedSignedForce (continuous_fst.fst.sub continuous_fst.snd).continuousOn + ha hu.continuousOn continuous_snd.fst.continuousOn continuousOn_const ?_ ?_ + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + +lemma PhaseFlowOn.sourceOnlyConeKernel_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (sourceOnlyConeKernel s F.flow zX) (coneKernelDomain T) := + (F.normalised_source_force_continuousOn hs zX).sub (F.transportOnlyConeKernel_continuousOn zX) + +lemma triangleConeKernel_add (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A B : ConeKernelState→Vec) (p : TrianglePhase) : + triangleConeKernel s α zX T (fun q=>A q+B q) p= + triangleConeKernel s α zX T A p+triangleConeKernel s α zX T B p := by + classical + by_cases hp : p∈trianglePhaseDomain T + · simp only [triangleConeKernel,Set.indicator_of_mem hp,smul_add] + · simp only [triangleConeKernel,Set.indicator_of_notMem hp,add_zero] + +lemma labelConeKernel_add (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A B : ConeKernelState→Vec) (p : ℝ×Phase) : + labelConeKernel s α zX T (fun q=>A q+B q) p= + labelConeKernel s α zX T A p+labelConeKernel s α zX T B p := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,Set.indicator_of_mem hp,smul_add] + · simp only [labelConeKernel,Set.indicator_of_notMem hp,add_zero] + +lemma triangleConeKernel_transport {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + {p : TrianglePhase} (hp : p∈trianglePhaseDomain T) : + triangleConeKernel s α zX T (transportOnlyConeKernel α zX) p= + (p.1.1-p.1.2.1)^2 • (s.f (p.1.2.1,((α zX p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)) • + forceTransportKernel (p.1.1-p.1.2.1) p.1.2.2.1 (velocity (α zX p.1.1).2) p.2) := by + simp only [triangleConeKernel,Set.indicator_of_mem hp,transportOnlyConeKernel,triangleKernelState] + rw [smul_comm,normalised_transport_flux _ _ _ (sub_pos.mpr hp.2.2).ne' (sphere_norm _),smul_comm] + +lemma triangleConeKernel_source {s : Solution} {α : Phase→ℝ→Phase} {zX : Phase} {T : ℝ} + {p : TrianglePhase} (hp : p∈trianglePhaseDomain T) : + triangleConeKernel s α zX T (sourceOnlyConeKernel s α zX) p= + (p.1.1-p.1.2.1)^2 • (s.f (p.1.2.1,((α zX p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)) • + forceSourceKernel (p.1.1-p.1.2.1) p.1.2.2.1 (velocity (α zX p.1.1).2) p.2 + (sourceAcceleration s (p.1.2.1,((α zX p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)))) := by + simp only [triangleConeKernel,Set.indicator_of_mem hp,sourceOnlyConeKernel,sourceForceConeKernel, + transportOnlyConeKernel,triangleKernelState] + rw [smul_comm,normalised_source_flux _ _ _ _ (sub_pos.mpr hp.2.2).ne' (sphere_norm _),smul_comm] + +lemma PhaseFlowOn.unselected_force_norm_split {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (W : ℝ→Vec→L[ℝ]Vec) (J : Set ℝ) (p : ℝ×Phase) : + ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + ((1-labelSelectedCutoff F.flow zX T Q p) • actualLabelSignedForce s F.flow zX T p)‖≤ + ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T (transportOnlyConeKernel F.flow zX) p)‖+ + ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Qᶜ p • labelConeKernel s F.flow zX T (sourceOnlyConeKernel s F.flow zX) p)‖ := by + rw [F.actualLabelSignedForce_eq_normalised zX,←F.labelCutoff_compl_smul zX Q] + have he : sourceForceConeKernel s F.flow zX= + fun q=>transportOnlyConeKernel F.flow zX q+sourceOnlyConeKernel s F.flow zX q := by + funext q + dsimp only [sourceOnlyConeKernel] + abel + rw [he,labelConeKernel_add,smul_add,map_add,←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact ENNReal.ofReal_le_ofReal (norm_add_le _ _) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.selectedTransportTriangle_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hw : 0(prefixFlow F.flow T zX t).1) T J + (directTransportTriangleKernel (fun t=>(prefixFlow F.flow T zX t).2)) p := by + classical + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J p)).trans + by_cases ht : p.1.1∈J + · rw [Set.indicator_of_mem ht] + by_cases hp : p∈trianglePhaseDomain T + · have htime := hJT ht + have hσ : p.1.2.1∈Icc 0 T := ⟨hp.2.1.le, hp.2.2.le.trans htime.2⟩ + rw [(prefixAngular_highband hw zX htime (hband _ ht)).1,triangleConeKernel_transport hp] + have hbound : ‖angularMultiplierCLM w (F.flow zX p.1.1).2‖≤64 := + angularMultiplierCLM_norm_le hw (by linarith only [hband _ ht,hw]) + have hnorm := (angularMultiplierCLM w (F.flow zX p.1.1).2).le_opNorm + ((p.1.1-p.1.2.1)^2 • (s.f (p.1.2.1,((F.flow zX p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)) • + forceTransportKernel (p.1.1-p.1.2.1) p.1.2.2.1 (velocity (F.flow zX p.1.1).2) p.2)) + have hn := hnorm.trans (mul_le_mul_of_nonneg_right hbound (norm_nonneg _)) + apply (ENNReal.ofReal_le_ofReal hn).trans_eq + simp only [directTriangleDensity,Set.indicator_of_mem (show p∈directTriangleDomain T J from ⟨hp,ht⟩), + prefixParticle,prefixFlow,prefixClamp_eq htime,prefixClamp_eq hσ,directTransportTriangleKernel, + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (p.1.1-p.1.2.1))] + rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤64),ENNReal.ofReal_mul (sq_nonneg _)] + · simp only [triangleConeKernel,Set.indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + · simp only [Set.indicator_of_notMem ht,zero_apply,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.selectedSourceTriangle_density_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hw : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (sourceOnlyConeKernel s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + physicalProjectedSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B T w R z := by + classical + unfold physicalProjectedSourceDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J (z,v))).trans + rw [Set.indicator_of_mem hz.1] + by_cases hp : (z,v)∈trianglePhaseDomain T + · have ht := hJT hz.1 + rw [(prefixAngular_highband hw zX ht (hband _ hz.1)).1,triangleConeKernel_source hp,map_smul] + simp only [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (z.1-z.2.1)), + ENNReal.ofReal_mul (sq_nonneg (z.1-z.2.1))] + apply mul_le_mul' le_rfl + apply ENNReal.ofReal_le_ofReal + simp only [prefixFlow,prefixClamp_eq ht,sourceAcceleration,map_smul,norm_smul,Real.norm_eq_abs] + exact le_add_of_nonneg_right (by positivity) + · simp only [triangleConeKernel,Set.indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +lemma PhaseFlowOn.selectedSourceTriangle_majorant_le {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hw : 0(prefixFlow F.flow T zX t).2) B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q (sourceOnlyConeKernel s F.flow zX) + (prefixAngularMultiplier s F.flow T w hw zX) J (z,v)‖)≤ + ENNReal.ofReal 64*physicalSourceMajorantDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z := by + classical + unfold physicalSourceMajorantDensity + rw [←mul_assoc,←lintegral_const_mul' _ _ (ENNReal.mul_ne_top ENNReal.ofReal_ne_top ENNReal.ofReal_ne_top)] + apply lintegral_mono + intro v + apply (ENNReal.ofReal_le_ofReal (selectedConeTriangle_norm_le Q _ _ J (z,v))).trans + rw [Set.indicator_of_mem hz.1] + by_cases hp : (z,v)∈trianglePhaseDomain T + · have ht := hJT hz.1 + have hσ : z.2.1∈Icc 0 T := ⟨hp.2.1.le,hp.2.2.le.trans ht.2⟩ + have hf := hs.nonnegative z.2.1 hσ ((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v) + rw [(prefixAngular_highband hw zX ht (hband _ hz.1)).1,triangleConeKernel_source hp] + have hbound : ‖angularMultiplierCLM w (F.flow zX z.1).2‖≤64 := + angularMultiplierCLM_norm_le hw (by linarith only [hband _ hz.1,hw]) + have hn := (angularMultiplierCLM w (F.flow zX z.1).2).le_opNorm + ((z.1-z.2.1)^2 • (s.f (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v)) • + forceSourceKernel (z.1-z.2.1) z.2.2.1 (velocity (F.flow zX z.1).2) v + (sourceAcceleration s (z.2.1,((F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1,v))))) + apply (ENNReal.ofReal_le_ofReal (hn.trans (mul_le_mul_of_nonneg_right hbound (norm_nonneg _)))).trans + simp only [prefixFlow,prefixClamp_eq ht] + rw [←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤64),←ENNReal.ofReal_mul (by positivity : (0:ℝ)≤64*(z.1-z.2.1)^2)] + apply ENNReal.ofReal_le_ofReal + simp only [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (z.1-z.2.1)),abs_of_nonneg hf] + have hh := forceSourceKernel_le_majorant z.2.2.1 (F.flow zX z.1).2 v + (s.E (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1)) + (s.B (z.2.1,(F.flow zX z.1).1-(z.1-z.2.1) • z.2.2.1)) (sub_pos.mpr hp.2.2) (sphere_norm _) + dsimp only [sourceAcceleration,lorentzField,lorentzPhase] at ⊢ + nlinarith only [mul_le_mul_of_nonneg_left hh (mul_nonneg (sq_nonneg (z.1-z.2.1)) hf)] + · simp only [triangleConeKernel,Set.indicator_of_notMem hp,map_zero,norm_zero,ENNReal.ofReal_zero] + exact bot_le + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeKernelInterior.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeKernelInterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..845f1754036ad80012547f90680e94fca343321f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeKernelInterior.lean @@ -0,0 +1,365 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ActualLabelCutoffCost + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.measurable_arrivalConeKernel_borel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable A) : + Measurable (arrivalConeKernel s F.flow zX T A) := by + classical + let D := arrivalPhaseDomain F.flow zX T + have hD : MeasurableSet D := (F.isOpen_arrivalPhaseDomain zX).measurableSet + have hr : ContinuousOn (fun p : ℝ×Phase=>(arrivalRadius F.flow zX T (p.1,p.2.1))⁻¹^2) D := by + apply ContinuousOn.pow + apply ContinuousOn.inv₀ + · intro p hp + exact ((F.arrivalRadius_continuousAt zX hp).comp (f := fun p : ℝ×Phase=>(p.1,p.2.1)) + (continuousAt_fst.prodMk continuousAt_snd.fst)).continuousWithinAt + · intro p hp + exact (sub_pos.mpr (F.arrival_time_spec zX hp).1.1).ne' + have hf : ContinuousOn s.f D := + hs.f_smooth.continuousOn.mono (fun _ hp=>⟨Ioo_subset_Icc_self hp.1,mem_univ _⟩) + have hR : Measurable (D.indicator (fun p : ℝ×Phase=>(arrivalRadius F.flow zX T (p.1,p.2.1))⁻¹^2)) := + hr.measurable_piecewise continuousOn_const hD + have hF : Measurable (D.indicator s.f) := hf.measurable_piecewise continuousOn_const hD + have hS : Measurable (D.indicator (arrivalKernelState F.flow zX T)) := + (F.arrivalKernelState_continuousOn zX).measurable_piecewise continuousOn_const hD + convert hR.smul (hF.smul (hA.comp hS)) using 1 + funext p + change D.indicator (fun p=>(arrivalRadius F.flow zX T (p.1,p.2.1))⁻¹^2 • + (s.f p • A (arrivalKernelState F.flow zX T p))) p= + (D.indicator (fun p : ℝ×Phase=>(arrivalRadius F.flow zX T (p.1,p.2.1))⁻¹^2) p) • + ((D.indicator s.f p) • A (D.indicator (arrivalKernelState F.flow zX T) p)) + by_cases hp : p∈D + · simp only [indicator_of_mem hp] + · simp only [indicator_of_notMem hp,zero_smul] + +lemma PhaseFlowOn.arrivalConeKernel_polar_norm_borel {s : Solution} {T σ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable A) + (hσ : σ∈Ioo 0 T) : + (∫⁻z : Phase,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖)= + ∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + classical + let g : Vec→ENNReal := fun y=>∫⁻v : Vec,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,(y,v))‖ + have hm : Measurable (fun z : Phase=>ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖) := + (((F.measurable_arrivalConeKernel_borel hs zX hA).comp (measurable_const.prodMk measurable_id)).norm).ennreal_ofReal + have hg : Measurable g := hm.lintegral_prod_right' + calc + _ = ∫⁻y : Vec,g y := lintegral_prod _ hm.aemeasurable + _ = ∫⁻y in ball (F.flow zX T).1 (T-σ),g y := by + rw [←lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y∈ball (F.flow zX T).1 (T-σ) + · rw [indicator_of_mem hy] + · rw [indicator_of_notMem hy] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hp : (σ,(y,v))∉arrivalPhaseDomain F.flow zX T := by + intro hp + apply hy + rw [mem_ball,dist_eq_norm,norm_sub_rev] + linarith [hp.2.1] + simp only [arrivalConeKernel,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero,Pi.zero_apply] + _ = _ := by + rw [F.receiver_polar_lintegral (Ioo_subset_Icc_self hσ) zX hg] + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + have hd : 0≤1-dot n.1 (velocity (F.flow zX (σ+r)).2) := (cone_denom_pos _ _ (sphere_norm n)).le + have he : r^2*(1-dot n.1 (velocity (F.flow zX (σ+r)).2))*r⁻¹^2= + 1-dot n.1 (velocity (F.flow zX (σ+r)).2) := by + field_simp [hr.1.ne'] + dsimp only [g] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + ←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_congr + intro v + have hp : (σ,((F.flow zX (σ+r)).1-r • n.1,v))∈arrivalPhaseDomain F.flow zX T := + F.arrival_polar_mem zX hσ hr n + rw [arrivalConeKernel,indicator_of_mem hp,F.arrival_polar_radius zX hσ hr n] + simp only [arrivalKernelState,F.arrival_polar_time zX hσ hr n,F.arrival_polar_direction zX hσ hr n, + norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (r⁻¹))] + rw [ENNReal.ofReal_mul (sq_nonneg (r⁻¹)),←mul_assoc, + ←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg r) hd),he] + +lemma PhaseFlowOn.lintegral_norm_labelConeKernel_borel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable A) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻z : Phase,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A (σ,z)‖ := by + classical + have hm := (F.measurable_arrivalConeKernel_borel hs zX hA).norm.ennreal_ofReal + rw [F.labelConeKernel_eq_pullback hs zX] + have he : (fun p : ℝ×Phase=>ENNReal.ofReal ‖phaseTimePullback F.flow T (arrivalConeKernel s F.flow zX T A) p‖)= + phaseTimePullback F.flow T (fun p=>ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A p‖) := by + funext p + by_cases hp : p∈Ioo (0:ℝ) T ×ˢ (univ : Set Phase) + · simp only [phaseTimePullback,indicator_of_mem hp] + · simp only [phaseTimePullback,indicator_of_notMem hp,norm_zero,ENNReal.ofReal_zero] + rw [he,F.lintegral_phaseTimePullback hm] + change (∫⁻ p,ENNReal.ofReal ‖arrivalConeKernel s F.flow zX T A p‖ + ∂((volume : Measure ℝ).prod (volume : Measure Phase)).restrict (Ioo 0 T ×ˢ univ)) = _ + rw [←Measure.restrict_prod_eq_prod_univ] + exact lintegral_prod _ hm.aemeasurable + +lemma PhaseFlowOn.labelConeKernel_polar_norm_borel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable A) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX (σ+r)).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX (σ+r)).1-r • n.1,v)) • + A ((σ+r,σ),(n.1,((F.flow zX (σ+r)).1-r • n.1,v)))‖ ∂volume ∂volume ∂sphereMeasure := by + rw [F.lintegral_norm_labelConeKernel_borel hs zX hA] + exact setLIntegral_congr_fun measurableSet_Ioo (fun σ hσ=>F.arrivalConeKernel_polar_norm_borel hs zX hA hσ) + +lemma PhaseFlowOn.labelConeKernel_triangle_norm_borel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : Measurable A) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖labelConeKernel s F.flow zX T A p‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + let X := prefixFlow F.flow T zX + have hc : Continuous (prefixClamp T) := continuous_const.max (continuous_const.min continuous_id) + have hX : Continuous X := (F.continuousOn_time zX).comp_continuous hc (prefixClamp_mem hT) + let S : (ℝ×ℝ×Sphere)×Vec → ConeKernelState := fun p=> + ((prefixClamp T p.1.1,prefixClamp T p.1.2.1), + (p.1.2.2.1,((X p.1.1).1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) + have hS : Continuous S := by dsimp [S]; fun_prop + have hSA : Measurable (fun p=>A (S p)) := hA.comp hS.measurable + have hSf : Continuous (fun p=>s.f ((S p).1.2,(S p).2.2)) := + hs.f_smooth.continuousOn.comp_continuous (hS.fst.snd.prodMk hS.snd.snd) + (fun p=>⟨prefixClamp_mem hT _,mem_univ _⟩) + let f : ℝ×ℝ×Sphere → ENNReal := fun p=> + ENNReal.ofReal (1-dot p.2.2.1 (velocity (X p.1).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f ((S (p,v)).1.2,(S (p,v)).2.2) • A (S (p,v))‖ + have hD : Continuous (fun p : ℝ×ℝ×Sphere=>1-dot p.2.2.1 (velocity (X p.1).2)) := by + simp only [dot_eq_inner] + exact continuous_const.sub ((continuous_subtype_val.comp continuous_snd.snd).inner + ((contDiff_velocity (k:=1)).continuous.comp (hX.comp continuous_fst).snd)) + have hf : Measurable f := hD.measurable.ennreal_ofReal.mul + ((hSf.measurable.smul hSA).norm.ennreal_ofReal.lintegral_prod_right') + have he : ∀t∈Icc 0 T,∀σ∈Icc 0 T,∀n : Sphere, + f (t,σ,n)=ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ := by + intro t ht σ hσ n + simp only [f,S,X,prefixFlow,prefixClamp_eq ht,prefixClamp_eq hσ] + rw [F.labelConeKernel_polar_norm_borel hs zX hA] + calc + _ = ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ),f (σ+r,σ,n) ∂volume ∂sphereMeasure := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro r hr + dsimp only + rw [he _ ⟨by linarith [hσ.1,hr.1],by linarith [hr.2]⟩ _ (Ioo_subset_Icc_self hσ)] + simp only [add_sub_cancel_left] + _ = ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere,f (t,σ,n) ∂sphereMeasure := + lintegral_retarded_triangle_parameter sphereMeasure T hf + _ = _ := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + exact lintegral_congr (fun n=>he _ (Ioo_subset_Icc_self ht) _ ⟨hσ.1.le,hσ.2.le.trans ht.2.le⟩ n) + +def coneKernelInterior (T : ℝ) : Set ConeKernelState := + coneKernelDomain T ∩ {p | p.1.2hp.1.1.1)).snd))) + +lemma PhaseFlowOn.coneCutoffRate_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (coneCutoffRate s F.flow zX) (coneKernelInterior T) := by + let S := coneKernelInterior T + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) S := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1.1)).snd) + have hu : ContinuousOn (fun p : ConeKernelState=>velocity p.2.2.2) S := + ((contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd).continuousOn + have hn : ContinuousOn (fun p : ConeKernelState=>p.2.1) S := continuous_snd.fst.continuousOn + have hD : ∀p∈S,1-dot p.2.1 (velocity (F.flow zX p.1.1).2)≠0 := fun p hp=> + (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.1.2.1)).ne' + have hρ : ContinuousOn (fun p : ConeKernelState=> + (1-dot p.2.1 (velocity p.2.2.2))/(1-dot p.2.1 (velocity (F.flow zX p.1.1).2))) S := by + simp only [dot_eq_inner] at hD ⊢ + exact (continuousOn_const.sub (hn.inner hu)).div (continuousOn_const.sub (hn.inner ha)) hD + have hN := (hρ.smul (ha.sub hn)).add hn |>.sub hu + have hr := (continuous_fst.fst.sub continuous_fst.snd).continuousOn.inv₀ + (show ∀p∈S,p.1.1-p.1.2≠0 from fun _ hp=>(sub_pos.mpr hp.2).ne') + have hKY : ContinuousOn (fun p : ConeKernelState=>(lorentzField s.E s.B (p.1.2,p.2.2)).2) S := + hs.continuousOn_momentumForce.comp (continuous_fst.snd.prodMk continuous_snd.snd).continuousOn + (fun _ hp=>⟨hp.1.1.2,mem_univ _⟩) + have hKX : ContinuousOn (fun p : ConeKernelState=>(lorentzField s.E s.B (p.1.1,F.flow zX p.1.1)).2) S := + (F.momentumForce_continuousOn_closed hs zX).comp continuous_fst.fst.continuousOn + (fun _ hp=>hp.1.1.1) + exact (hρ.sub continuousOn_const).prodMk ((hr.smul hN).prodMk (hKY.prodMk (hρ.smul hKX))) + +lemma PhaseFlowOn.normalisedSelectedCutoff_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + ContinuousOn (normalisedSelectedCutoff s F.flow zX T Q) (coneKernelInterior T) := by + have hz := F.coneCutoffState_continuousOn zX + have hder : ContinuousOn (fun p=>fderiv ℝ (stateCutoff T Q) (coneCutoffState F.flow zX p)) + (coneKernelInterior T) := by + intro p hp + exact ((contDiffAt_stateCutoff T Q (z:=coneCutoffState F.flow zX p) + (sub_pos.mpr hp.2) (by simpa only [coneCutoffState,mem_sphere,dist_zero_right] using hp.1.2.1)).continuousAt_fderiv + (by simp)).comp_continuousWithinAt (hz p hp) + exact (hder.clm_apply (F.coneCutoffRate_continuousOn hs zX)).smul + ((F.normalised_primitive_continuousOn zX).mono inter_subset_left) + +lemma PhaseFlowOn.actualLabelCutoffCost_eq_normalised {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + actualLabelCutoffCost s F.flow zX T Q= + labelConeKernel s F.flow zX T (normalisedSelectedCutoff s F.flow zX T Q) := by + classical + funext p + rw [actualLabelCutoffCost,F.actualLabelPrimitive_eq_normalised zX] + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hj : p∈jointBranchDomain F.flow zX T := hp + rw [indicator_of_mem hj] + simp only [labelConeKernel,indicator_of_mem hp] + change _= (branchTime F.flow zX p.2 T p.1-p.1)⁻¹^2 • + (s.f (0,p.2) • normalisedSelectedCutoff s F.flow zX T Q (labelKernelState F.flow zX T p)) + simp only [normalisedSelectedCutoff,coneCutoffState,coneCutoffRate,labelKernelState, + branchSelectedRate,branchCutoffState,branchCutoffStateRate,branchRate,branchDirection] + module + · have hj : p∉jointBranchDomain F.flow zX T := hp + simp only [indicator_of_notMem hj,labelConeKernel,indicator_of_notMem hp,zero_smul] + +lemma PhaseFlowOn.actualLabelCutoffCost_polar_norm {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖actualLabelCutoffCost s F.flow zX T Q p‖)= + ∫⁻t in Ioo (0:ℝ) T,∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere, + ENNReal.ofReal (1-dot n.1 (velocity (F.flow zX t).2))* + ∫⁻v : Vec,ENNReal.ofReal ‖s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + normalisedSelectedCutoff s F.flow zX T Q + ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v)))‖ ∂volume ∂sphereMeasure := by + rw [F.actualLabelCutoffCost_eq_normalised zX Q] + exact F.labelConeKernel_triangle_norm_interior hs hT zX + (F.normalisedSelectedCutoff_continuousOn hs zX Q) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeMotion.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeMotion.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc3c1276d28e8fecc9b744a7953b53c7c3911294 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeMotion.lean @@ -0,0 +1,444 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Model + +namespace OAI + +/-! Elementary relativistic geometry needed by the retarded-force identity. -/ + +noncomputable section +open MeasureTheory Set +open scoped ContDiff + +namespace RVM + +lemma q_pos (v : Vec) : 0 < q v := by + exact Real.sqrt_pos.2 (by positivity) + +lemma q_sq (v : Vec) : q v ^ 2 = 1 + ‖v‖ ^ 2 := by + exact Real.sq_sqrt (by positivity) + +lemma norm_lt_q (v : Vec) : ‖v‖ < q v := by + have hp := q_pos v + have hs := q_sq v + nlinarith [sq_nonneg ‖v‖, norm_nonneg v] + +lemma norm_velocity_lt_one (v : Vec) : ‖velocity v‖ < 1 := by + rw [velocity, norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.2 (q_pos v))] + rw [← div_eq_inv_mul] + exact (div_lt_one (q_pos v)).2 (norm_lt_q v) + +lemma dot_comm (a b : Vec) : dot a b = dot b a := by + simp only [dot, mul_comm] + +lemma dot_add_left (a b c : Vec) : dot (a + b) c = dot a c + dot b c := by + simp [dot, add_mul, Finset.sum_add_distrib] + +lemma dot_sub_left (a b c : Vec) : dot (a - b) c = dot a c - dot b c := by + simp [dot, sub_mul, Finset.sum_sub_distrib] + +lemma dot_smul_left (r : ℝ) (a b : Vec) : dot (r • a) b = r * dot a b := by + simp [dot, mul_assoc, Finset.mul_sum] + +lemma dot_add_right (a b c : Vec) : dot a (b + c) = dot a b + dot a c := by + rw [dot_comm, dot_add_left, dot_comm b a, dot_comm c a] + +lemma dot_sub_right (a b c : Vec) : dot a (b - c) = dot a b - dot a c := by + rw [dot_comm, dot_sub_left, dot_comm b a, dot_comm c a] + +lemma dot_smul_right (r : ℝ) (a b : Vec) : dot a (r • b) = r * dot a b := by + rw [dot_comm, dot_smul_left, dot_comm b a] + +lemma dot_eq_inner (a b : Vec) : dot a b = inner ℝ a b := by + simp [dot, EuclideanSpace.inner_eq_star_dotProduct, dotProduct, mul_comm] + +lemma dot_self (a : Vec) : dot a a = ‖a‖ ^ 2 := by + rw [dot_eq_inner, real_inner_self_eq_norm_sq] + +lemma dot_le_norm (a b : Vec) : dot a b ≤ ‖a‖ * ‖b‖ := by + rw [dot_eq_inner] + exact real_inner_le_norm a b + +lemma cone_denom_pos (v n : Vec) (hn : ‖n‖ = 1) : + 0 < 1 - dot n (velocity v) := by + have h := dot_le_norm n (velocity v) + rw [hn, one_mul] at h + linarith [norm_velocity_lt_one v] + +lemma velocity_self (v : Vec) : dot (velocity v) (velocity v) = 1 - (q v)⁻¹ ^ 2 := by + rw [velocity, dot_smul_left, dot_smul_right, dot_self] + have hq := q_sq v + have hn := ne_of_gt (q_pos v) + field_simp + nlinarith + +lemma cone_angle_identity (v n : Vec) (hn : ‖n‖ = 1) : + 2 * (1 - dot n (velocity v)) = ‖n - velocity v‖ ^ 2 + (q v)⁻¹ ^ 2 := by + rw [norm_sub_sq_real, ← dot_eq_inner, hn, ← dot_self (velocity v), velocity_self] + ring + +lemma hasDerivAt_dot {f g : ℝ → Vec} {f' g' : Vec} {s : ℝ} + (hf : HasDerivAt f f' s) (hg : HasDerivAt g g' s) : + HasDerivAt (fun t => dot (f t) (g t)) + (dot (f s) g' + dot f' (g s)) s := by + simpa only [dot_eq_inner] using hf.inner ℝ hg + +def coneMotion (a u n : Vec) : Vec := + ((1 - dot n u) / (1 - dot n a)) • (a - n) + n - u + +def signedPrimitive (a u n : Vec) : Vec := + u - ((1 - dot a u) / (1 - dot n a)) • n + +lemma coneMotion_dot_source (a u n : Vec) (hD : 1 - dot n a ≠ 0) : + dot (coneMotion a u n) u - + (1 - dot n u) * ((1 - dot n u) / (1 - dot n a) - 1) - + (1 - dot u u) = -(1 - dot a u) * (1 - dot n u) / (1 - dot n a) := by + simp only [coneMotion, dot_sub_left, dot_add_left, dot_smul_left] + field_simp + ring + +lemma coneMotion_receiver_identity (a u n : Vec) (hD : 1 - dot n a ≠ 0) : + coneMotion a u n + + (dot (coneMotion a u n) a / (1 - dot n a)) • n + signedPrimitive a u n = + ((1 - dot n u) / (1 - dot n a)) • + (a - ((1 - dot a a) / (1 - dot n a)) • n) := by + ext i + simp only [coneMotion, signedPrimitive, dot_sub_left, dot_add_left, + dot_smul_left, dot_comm u a] + simp only [PiLp.add_apply, PiLp.sub_apply, PiLp.smul_apply, smul_eq_mul] + field_simp + ring + +def signedPrimitiveRate (a u n a' u' n' : Vec) : Vec := + u' - (((1 - dot a u) / (1 - dot n a)) • n' + + ((-(dot a u' + dot a' u) * (1 - dot n a) + + (1 - dot a u) * (dot n a' + dot n' a)) / (1 - dot n a) ^ 2) • n) + +lemma hasDerivAt_signedPrimitive {a u n : ℝ → Vec} {a' u' n' : Vec} {s : ℝ} + (ha : HasDerivAt a a' s) (hu : HasDerivAt u u' s) (hn : HasDerivAt n n' s) + (hD : 1 - dot (n s) (a s) ≠ 0) : + HasDerivAt (fun t => signedPrimitive (a t) (u t) (n t)) + (signedPrimitiveRate (a s) (u s) (n s) a' u' n') s := by + have he := (hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_dot ha hu) + have hden := (hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_dot hn ha) + have h := hu.sub ((he.div hden hD).smul hn) + convert h using 1 <;> try rfl + · dsimp [signedPrimitiveRate] + congr 3 + ring + +def retardedPrimitive (r : ℝ) (a u n : Vec) : Vec := + (r * (1 - dot n u))⁻¹ • signedPrimitive a u n + +def retardedPrimitiveRate (r : ℝ) (a u n : Vec) (r' : ℝ) (a' u' n' : Vec) : Vec := + (r * (1 - dot n u))⁻¹ • signedPrimitiveRate a u n a' u' n' + + (-(r' * (1 - dot n u) - r * (dot n u' + dot n' u)) / + (r * (1 - dot n u)) ^ 2) • signedPrimitive a u n + +lemma hasDerivAt_retardedPrimitive {r : ℝ → ℝ} {a u n : ℝ → Vec} + {r' : ℝ} {a' u' n' : Vec} {s : ℝ} + (hr : HasDerivAt r r' s) (ha : HasDerivAt a a' s) + (hu : HasDerivAt u u' s) (hn : HasDerivAt n n' s) + (hr0 : r s ≠ 0) (hd : 1 - dot (n s) (u s) ≠ 0) + (hD : 1 - dot (n s) (a s) ≠ 0) : + HasDerivAt (fun t => retardedPrimitive (r t) (a t) (u t) (n t)) + (retardedPrimitiveRate (r s) (a s) (u s) (n s) r' a' u' n') s := by + have hden := (hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_dot hn hu) + have hinv := (hr.mul hden).inv (mul_ne_zero hr0 hd) + have h := hinv.smul (hasDerivAt_signedPrimitive ha hu hn hD) + convert h using 1 <;> try rfl + · dsimp [retardedPrimitiveRate] + congr 3 + ring + +def coneTransform (a n b : Vec) : Vec := b + (dot a b / (1 - dot n a)) • n + +lemma coneTransform_source (a u n : Vec) + (hd : 1 - dot n u ≠ 0) (hD : 1 - dot n a ≠ 0) : + coneTransform a n (((1 - dot n u)⁻¹) • (u - n)) = + ((1 - dot n u)⁻¹) • signedPrimitive a u n := by + ext i + simp only [coneTransform, signedPrimitive, dot_smul_right, dot_sub_right, + dot_comm a n, PiLp.add_apply, PiLp.sub_apply, PiLp.smul_apply, smul_eq_mul] + field_simp + ring + +def sourceVelocityRate (u n u' : Vec) : Vec := + (1 - dot n u)⁻¹ • u' + (dot n u' / (1 - dot n u)^2) • (u - n) + +def signedForceKernel (r : ℝ) (a u n u' : Vec) : Vec := + -(r⁻¹ • coneTransform a n (sourceVelocityRate u n u')) - + ((1 - dot u u) / (r^2 * (1 - dot n u))) • + coneTransform a n ((1 - dot n u)⁻¹ • (u - n)) + +lemma signed_force_identity (r : ℝ) (a u n u' aₜ : Vec) + (hr : r ≠ 0) (hd : 1 - dot n u ≠ 0) (hD : 1 - dot n a ≠ 0) : + signedForceKernel r a u n u' = + -retardedPrimitiveRate r a u n + ((1 - dot n u) / (1 - dot n a) - 1) + (((1 - dot n u) / (1 - dot n a)) • aₜ) u' (r⁻¹ • coneMotion a u n) + + ((1 - dot a u) / (r^2 * (1 - dot n a)^2)) • + (((1 - dot a a) / (1 - dot n a)) • n - a) + + (dot aₜ (signedPrimitive a u n) / (r * (1 - dot n a)^2)) • n := by + ext i + simp only [signedForceKernel, retardedPrimitiveRate, signedPrimitiveRate, + sourceVelocityRate, coneTransform, signedPrimitive, coneMotion, + dot_add_left, dot_sub_left, dot_smul_left, dot_add_right, dot_sub_right, + dot_smul_right, dot_comm a n, dot_comm u a, dot_comm aₜ n, dot_comm aₜ u, + PiLp.add_apply, PiLp.sub_apply, PiLp.smul_apply, PiLp.neg_apply, smul_eq_mul] + field_simp + ring + +lemma signed_force_identity_along_branch {r : ℝ → ℝ} {a u n : ℝ → Vec} + {u' aₜ : Vec} {s : ℝ} + (hr : HasDerivAt r ((1 - dot (n s) (u s)) / (1 - dot (n s) (a s)) - 1) s) + (ha : HasDerivAt a (((1 - dot (n s) (u s)) / (1 - dot (n s) (a s))) • aₜ) s) + (hu : HasDerivAt u u' s) + (hn : HasDerivAt n ((r s)⁻¹ • coneMotion (a s) (u s) (n s)) s) + (hr0 : r s ≠ 0) (hd : 1 - dot (n s) (u s) ≠ 0) + (hD : 1 - dot (n s) (a s) ≠ 0) : + signedForceKernel (r s) (a s) (u s) (n s) u' = + -deriv (fun t => retardedPrimitive (r t) (a t) (u t) (n t)) s + + ((1 - dot (a s) (u s)) / ((r s)^2 * (1 - dot (n s) (a s))^2)) • + (((1 - dot (a s) (a s)) / (1 - dot (n s) (a s))) • n s - a s) + + (dot aₜ (signedPrimitive (a s) (u s) (n s)) / + ((r s) * (1 - dot (n s) (a s))^2)) • n s := by + rw [(hasDerivAt_retardedPrimitive hr ha hu hn hr0 hd hD).deriv] + exact signed_force_identity (r s) (a s) (u s) (n s) u' aₜ hr0 hd hD + +lemma unsafe_selected_actual_margins + {α z c b y H Δ : ℝ} + (hα : 0 ≤ α) (hz : 0 ≤ z) (hc : 0 ≤ c) (hy : 0 ≤ y) (hH : 0 ≤ H) + (hzc : z + c = 1) (hΔ : Δ = (α + b + y + H) / 100000) + (hnear : 2*α + H/2 + 2*y < z + Δ) + (hfar₁ : H ≤ 2*c → b < H/2 - α + Δ) + (hfar₂ : 2*c < H → b < H - c - α + Δ) + (hu₁ : 2*H/3 + z/6 - Δ/3 < b) : + 0 < z ∧ Δ < z/1000 ∧ 2*c < H ∧ + (496/1000 : ℝ)*z + 3*(α+c) < H ∧ + (35/10 : ℝ)*α + (15/10 : ℝ)*c + 2*y < (753/1000 : ℝ)*z ∧ + (500/751 : ℝ) < z ∧ + y < (377/1000 : ℝ)*z - (175/100 : ℝ)*α - (75/100 : ℝ)*c ∧ + (623/1000 : ℝ) < z-y ∧ (623/1000 : ℝ) < 1-α-y := by + have hb : b < H - α + Δ := by + by_cases hh : H ≤ 2*c + · have h := hfar₁ hh + linarith + · have h := hfar₂ (lt_of_not_ge hh) + linarith + have hdsmall : 99995*Δ < 4*z := by linarith + have hzpos : 0 < z := by + by_contra hh + have hz0 : z = 0 := le_antisymm (le_of_not_gt hh) hz + subst z + have hdneg : Δ < 0 := by linarith + linarith + have hd : Δ < z/1000 := by linarith + have hh : 2*c < H := by + by_contra hh + have hf := hfar₁ (le_of_not_gt hh) + linarith + have hf := hfar₂ hh + have hlow : (496/1000 : ℝ)*z + 3*(α+c) < H := by linarith + have hm : (35/10 : ℝ)*α + (15/10 : ℝ)*c + 2*y < (753/1000 : ℝ)*z := by + linarith + refine ⟨hzpos, hd, hh, hlow, hm, ?_, ?_, ?_, ?_⟩ <;> linarith + +lemma unsafe_selected_improved_window + {α z c b y H Δ : ℝ} + (hα : 0 ≤ α) (hz : 0 ≤ z) (hc : 0 ≤ c) (hy : 0 ≤ y) (hH : 0 ≤ H) + (hzc : z + c = 1) (hΔ : Δ = (α + b + y + H) / 100000) + (hnear : 2*α + H/2 + 2*y < z + Δ) + (hfar₁ : H ≤ 2*c → b < H/2 - α + Δ) + (hfar₂ : 2*c < H → b < H - c - α + Δ) + (hu₁ : 2*H/3 + z/6 - Δ/3 < b) + (hu₂ : b < H + 2*y - z/2 + Δ) + (hactual : b < H/2 - min α c + y + (2/1000 : ℝ)*z) : + (9/10 : ℝ) < z ∧ (895/1000 : ℝ) < 1-α ∧ + (16/100 : ℝ)*max z (1-α) < y ∧ y < (49/100 : ℝ)*min z (1-α) := by + obtain ⟨hzpos, hd, _, hlow, hm, _, hym, _, _⟩ := + unsafe_selected_actual_margins hα hz hc hy hH hzc hΔ hnear hfar₁ hfar₂ hu₁ + have hm0 : 0 ≤ min α c := le_min hα hc + have hHup : H < (81/100 : ℝ)*z := by linarith + have hac : α+c < (105/1000 : ℝ)*z := by linarith + have hz9 : (9/10 : ℝ) < z := by linarith + have hp : (895/1000 : ℝ) < 1-α := by linarith + have hy19 : (19/100 : ℝ)*z < y := by linarith + refine ⟨hz9, hp, ?_, ?_⟩ + · rw [mul_max_of_nonneg _ _ (by norm_num : (0 : ℝ) ≤ 16/100), max_lt_iff] + constructor <;> linarith + · rw [mul_min_of_nonneg _ _ (by norm_num : (0 : ℝ) ≤ 49/100), lt_min_iff] + constructor <;> linarith + +lemma unsafe_selected_improved_contradiction + {α z c b y H Δ : ℝ} + (hα : 0 ≤ α) (hz : 0 < z) (hc : 0 ≤ c) + (hsmall : Δ < z/1000) + (hlow : (496/1000 : ℝ)*z + 3*(α+c) < H) + (hnear : 2*α + H/2 + 2*y < z + Δ) + (hu : 2*H/3 + z/6 - Δ/3 < b) + (himproved : b < H/2 - min α c + (29/50 : ℝ)*y + Δ) : False := by + have hm : 0 ≤ min α c := le_min hα hc + linarith + +lemma norm_velocity_le_margin (v : Vec) {Q : ℝ} (hQ : q v ≤ Q) : + ‖velocity v‖ ≤ 1 - 1 / (2 * Q^2) := by + have hq := q_pos v + have hQ0 : 0 < Q := lt_of_lt_of_le hq hQ + have hn := norm_velocity_lt_one v + have hs : ‖velocity v‖^2 = 1 - (q v)⁻¹^2 := by + rw [← dot_self, velocity_self] + have hm : (q v)⁻¹^2 / 2 ≤ 1 - ‖velocity v‖ := by + nlinarith [sq_nonneg (1 - ‖velocity v‖)] + have hsq : 2 * (q v)^2 ≤ 2 * Q^2 := by nlinarith + have hi := one_div_le_one_div_of_le (by positivity : 0 < 2 * (q v)^2) hsq + have he : (q v)⁻¹^2 / 2 = 1 / (2 * (q v)^2) := by ring + rw [he] at hm + linarith + +def receiverConeFunction (X : ℝ → Vec) (s : ℝ) (y : Vec) (t : ℝ) : ℝ := + t - s - ‖X t - y‖ + +lemma receiverCone_growth {X : ℝ → Vec} {D : Set ℝ} {c : ℝ} + (hX : ∀ t₁ ∈ D, ∀ t₂ ∈ D, ‖X t₂ - X t₁‖ ≤ c * |t₂-t₁|) + (s : ℝ) (y : Vec) {t₁ t₂ : ℝ} (h₁ : t₁ ∈ D) (h₂ : t₂ ∈ D) + (ht : t₁ ≤ t₂) : + (1-c)*(t₂-t₁) ≤ receiverConeFunction X s y t₂ - receiverConeFunction X s y t₁ := by + have hdist := norm_sub_le (X t₂ - y) (X t₁ - y) + have hnorm : ‖X t₂-y‖ ≤ ‖X t₂-X t₁‖ + ‖X t₁-y‖ := by + calc + ‖X t₂-y‖ = ‖(X t₂-X t₁)+(X t₁-y)‖ := by congr 1; abel + _ ≤ ‖X t₂-X t₁‖ + ‖X t₁-y‖ := norm_add_le _ _ + have h := hX t₁ h₁ t₂ h₂ + rw [abs_of_nonneg (sub_nonneg.2 ht)] at h + dsimp [receiverConeFunction] + nlinarith + +lemma receiverCone_strictMonoOn {X : ℝ → Vec} {D : Set ℝ} {c : ℝ} + (hc : c < 1) + (hX : ∀ t₁ ∈ D, ∀ t₂ ∈ D, ‖X t₂-X t₁‖ ≤ c * |t₂-t₁|) + (s : ℝ) (y : Vec) : StrictMonoOn (receiverConeFunction X s y) D := by + intro t₁ h₁ t₂ h₂ ht + have hg := receiverCone_growth hX s y h₁ h₂ ht.le + have hp : 0 < (1-c)*(t₂-t₁) := mul_pos (sub_pos.2 hc) (sub_pos.2 ht) + linarith + +lemma exists_unique_receiver_time {X : ℝ → Vec} {s T c : ℝ} {y : Vec} + (hsT : s ≤ T) (hc : c < 1) (hcont : ContinuousOn X (Icc s T)) + (hX : ∀ t₁ ∈ Icc s T, ∀ t₂ ∈ Icc s T, ‖X t₂-X t₁‖ ≤ c * |t₂-t₁|) + (hcone : ‖X T-y‖ ≤ T-s) : + ∃! t : ℝ, t ∈ Icc s T ∧ t-s = ‖X t-y‖ := by + have hfun : ContinuousOn (receiverConeFunction X s y) (Icc s T) := by + exact (continuousOn_id.sub continuousOn_const).sub + ((hcont.sub continuousOn_const).norm) + have hleft : receiverConeFunction X s y s ≤ 0 := by + simp only [receiverConeFunction, sub_self, zero_sub, neg_nonpos] + exact norm_nonneg _ + have hright : 0 ≤ receiverConeFunction X s y T := sub_nonneg.2 hcone + obtain ⟨t, ht, hzero⟩ := intermediate_value_Icc hsT hfun ⟨hleft, hright⟩ + refine ⟨t, ⟨ht, ?_⟩, ?_⟩ + · dsimp [receiverConeFunction] at hzero + linarith + · intro t' ht' + apply (receiverCone_strictMonoOn hc hX s y).injOn ht'.1 ht + rw [hzero] + dsimp [receiverConeFunction] + linarith [ht'.2] + +lemma hit_duration_bound {F : Set ℝ} {g : ℝ → ℝ} {c R : ℝ} + (hc : 0 < c) + (hgrowth : ∀ x ∈ F, ∀ y ∈ F, x ≤ y → c*(y-x) ≤ g y-g x) + (hrange : ∀ x ∈ F, |g x| ≤ R) : + volume F ≤ ENNReal.ofReal (2*R/c) := by + apply (Real.volume_le_diam F).trans + apply Metric.ediam_le_of_forall_dist_le + intro x hx y hy + have hxg := abs_le.mp (hrange x hx) + have hyg := abs_le.mp (hrange y hy) + rcases le_total x y with hxy | hyx + · rw [Real.dist_eq, abs_of_nonpos (sub_nonpos.2 hxy)] + have h := hgrowth x hx y hy hxy + apply (le_div_iff₀ hc).2 + nlinarith + · rw [Real.dist_eq, abs_of_nonneg (sub_nonneg.2 hyx)] + have h := hgrowth y hy x hx hyx + apply (le_div_iff₀ hc).2 + nlinarith + +lemma projected_hit_duration {X Y : ℝ → Vec} {a u : ℝ → Vec} + {D F : Set ℝ} {e : Vec} {c R : ℝ} + (hD : Convex ℝ D) (hFD : F ⊆ D) (hc : 0 < c) + (hXc : ContinuousOn X D) (hYc : ContinuousOn Y D) + (hX : ∀ s ∈ interior D, HasDerivAt X (a s) s) + (hY : ∀ s ∈ interior D, HasDerivAt Y (u s) s) + (hvel : ∀ s ∈ interior D, c ≤ dot e (u s-a s)) + (hsep : ∀ s ∈ F, |dot e (Y s-X s)| ≤ R) : + volume F ≤ ENNReal.ofReal (2*R/c) := by + apply hit_duration_bound hc _ hsep + have hd : ∀ s ∈ interior D, HasDerivAt (fun t => dot e (Y t-X t)) + (dot e (u s-a s)) s := by + intro s hs + simpa [dot] using hasDerivAt_dot (hasDerivAt_const s e) ((hY s hs).sub (hX s hs)) + have hcont : ContinuousOn (fun t => dot e (Y t-X t)) D := by + simp only [dot_eq_inner] + exact continuousOn_const.inner (hYc.sub hXc) + intro x hx y hy hxy + apply hD.mul_sub_le_image_sub_of_le_deriv hcont + (fun s hs => (hd s hs).differentiableAt.differentiableWithinAt) + (fun s hs => by rw [(hd s hs).deriv]; exact hvel s hs) x (hFD hx) y (hFD hy) hxy + +lemma scalar_clm_invertible (L : ℝ →L[ℝ] ℝ) (h : L 1 ≠ 0) : L.IsInvertible := by + let K : ℝ →L[ℝ] ℝ := (L 1)⁻¹ • ContinuousLinearMap.id ℝ ℝ + apply ContinuousLinearMap.IsInvertible.of_inverse (g := K) + · apply ContinuousLinearMap.ext + intro x + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, + K, smul_apply, smul_eq_mul] + rw [← smul_eq_mul, L.map_smul] + have hx : L x = x * L 1 := by simpa using L.map_smul x (1 : ℝ) + rw [smul_eq_mul, hx] + field_simp + · apply ContinuousLinearMap.ext + intro x + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, + K, smul_apply, smul_eq_mul] + have hx : L x = x * L 1 := by simpa using L.map_smul x (1 : ℝ) + rw [hx] + field_simp + +def squaredCone (X Y : ℝ → Vec) (z : ℝ × ℝ) : ℝ := + (z.2-z.1)^2 - ‖X z.2 - Y z.1‖^2 + +lemma contDiffAt_squaredCone {X Y : ℝ → Vec} {s t : ℝ} + (hX : ContDiffAt ℝ 1 X t) (hY : ContDiffAt ℝ 1 Y s) : + ContDiffAt ℝ 1 (squaredCone X Y) (s,t) := by + exact (contDiffAt_snd.sub contDiffAt_fst).pow 2 |>.sub + (((hX.comp (s,t) contDiffAt_snd).sub + (hY.comp (s,t) contDiffAt_fst)).norm_sq ℝ) + +lemma hasDerivAt_squaredCone_receiver {X Y : ℝ → Vec} {a : Vec} {s t : ℝ} + (hX : HasDerivAt X a t) : + HasDerivAt (fun t' => squaredCone X Y (s,t')) + (2*(t-s) - 2*dot (X t-Y s) a) t := by + have h := ((hasDerivAt_id t).sub_const s).pow 2 |>.sub + ((hX.sub_const (Y s)).norm_sq) + convert h using 1 <;> try rfl + simp [dot_eq_inner] + +lemma receiver_partial_squaredCone {X Y : ℝ → Vec} {a : Vec} {s t : ℝ} + (hX : ContDiffAt ℝ 1 X t) (hY : ContDiffAt ℝ 1 Y s) + (hXd : HasDerivAt X a t) : + (fderiv ℝ (squaredCone X Y) (s,t) ∘L + ContinuousLinearMap.inr ℝ ℝ ℝ) 1 = 2*(t-s) - 2*dot (X t-Y s) a := by + have hF := (contDiffAt_squaredCone hX hY).differentiableAt one_ne_zero + have hpair : HasFDerivAt (fun t' : ℝ => (s,t')) + (ContinuousLinearMap.inr ℝ ℝ ℝ) t := by + convert (hasFDerivAt_const s t).prodMk (hasFDerivAt_id t) using 1 <;> try rfl + exact ((hF.hasFDerivAt.comp t hpair).hasDerivAt.unique + (hasDerivAt_squaredCone_receiver hXd)) + +open scoped Topology + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRadius.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRadius.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2646ba8ea560fb4422be57410ec26b5a1b7da90 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRadius.lean @@ -0,0 +1,1441 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.WaveGradient +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalElectricKernel + +namespace OAI + +noncomputable section + +namespace RVM + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff +open Set + + +lemma selection_unsafe_actual + {α z c b y H Δ : ℝ} + (hα : 0 ≤ α) (hz : 0 ≤ z) (hc : 0 ≤ c) (hb : 0 ≤ b) + (hy : 0 ≤ y) (hH : 0 ≤ H) (hzc : z+c=1) + (hΔ : Δ=(α+b+y+H)/100000) + (hnear : 2*α+H/2+2*y < z+Δ) + (hfar : if H ≤ 2*c then b linarith + have hd : Δ<4/99995*z := by linarith + have hz0 : 0 linarith + +lemma selection_unsafe_window + {α z c b y H Δ : ℝ} + (hα : 0 ≤ α) (hz : 0 ≤ z) (hc : 0 ≤ c) (hb : 0 ≤ b) + (hy : 0 ≤ y) (hH : 0 ≤ H) (hzc : z+c=1) + (hΔ : Δ=(α+b+y+H)/100000) + (hnear : 2*α+H/2+2*y < z+Δ) + (hfar : if H ≤ 2*c then b ‖z‖ ^ (-α)) (ball (0:Vec) R) := by + apply integrableOn_ball_of_norm_le_rpow (by simp) (C:=1) (α:=α) (by simpa using hα) + · exact ae_of_all _ (fun z => by rw [Real.norm_eq_abs,abs_of_nonneg (Real.rpow_nonneg (norm_nonneg z) _)]; simp) + · exact (continuous_norm.measurable.pow measurable_const).aestronglyMeasurable + +lemma integral_ball_norm_rpow_neg {α R : ℝ} (hα : α<3) (hR : 0≤R) : + (∫ z in ball (0:Vec) R, ‖z‖ ^ (-α)) = + (4*Real.pi) * R^(3-α)/(3-α) := by + rw [← integral_indicator measurableSet_ball, + integral_polar ((integrableOn_norm_rpow_neg hα).integrable_indicator measurableSet_ball)] + have he (n : Sphere) : + (∫ r in Ioi (0:ℝ), r^2 • (ball (0:Vec) R).indicator + (fun z => ‖z‖^(-α)) (r • n.1)) = R^(3-α)/(3-α) := by + have heq : ∀ r ∈ Ioi (0:ℝ), r^2 • (ball (0:Vec) R).indicator + (fun z => ‖z‖^(-α)) (r • n.1) = + (Ioo (0:ℝ) R).indicator (fun r => r^(2-α)) r := by + intro r hr + change 0 h hh.2),smul_zero] + rw [setIntegral_congr_fun measurableSet_Ioi heq,setIntegral_indicator measurableSet_Ioo, + inter_eq_right.mpr Ioo_subset_Ioi_self,← integral_Ioc_eq_integral_Ioo, + ← intervalIntegral.integral_of_le hR,integral_rpow (Or.inl (by linarith : -1<2-α))] + have hne : 2-α+1≠0 := by linarith + rw [Real.zero_rpow hne,sub_zero] + rw [show 2-α+1=3-α by ring] + simp_rw [he] + rw [integral_const,smul_eq_mul,sphere_area] + ring + +lemma norm_integral_tip_le {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {C α R : ℝ} (hα : α<3) (hR : 0≤R) + (hF : AEStronglyMeasurable F) + (hbound : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C*‖z‖^(-α)) : + ‖∫ z in ball (0:Vec) R, F z‖ ≤ C*(4*Real.pi)*R^(3-α)/(3-α) := by + have hi := integrableOn_norm_rpow_neg (R:=R) hα + calc + _ ≤ ∫ z in ball (0:Vec) R, ‖F z‖ := norm_integral_le_integral_norm _ + _ ≤ ∫ z in ball (0:Vec) R, C*‖z‖^(-α) := by + apply integral_mono_ae + ((integrableOn_ball_of_norm_le_rpow (by simp) (by simpa using hα) hbound hF).norm) + (hi.const_mul C) hbound + _ = _ := by rw [integral_const_mul,integral_ball_norm_rpow_neg hα hR]; ring + +lemma potential_tip_le {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {C R : ℝ} (hR : 0≤R) (hF : AEStronglyMeasurable F) + (hbound : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C/‖z‖) : + ‖∫ z in ball (0:Vec) R, F z‖ ≤ 2*Real.pi*C*R^2 := by + have hb : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C*‖z‖^(-(1:ℝ)) := by + simpa only [Real.rpow_neg_one,div_eq_mul_inv] using hbound + have hh := norm_integral_tip_le (by norm_num : (1:ℝ)<3) hR hF hb + norm_num only [show (3:ℝ)-1=2 by norm_num,Real.rpow_two] at hh + convert hh using 1; ring + +lemma kernel_tip_le {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {C R : ℝ} (hR : 0≤R) (hF : AEStronglyMeasurable F) + (hbound : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C/‖z‖^2) : + ‖∫ z in ball (0:Vec) R, F z‖ ≤ 4*Real.pi*C*R := by + have hb : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), ‖F z‖≤C*‖z‖^(-(2:ℝ)) := by + simpa only [Real.rpow_neg (norm_nonneg _),Real.rpow_two,div_eq_mul_inv] using hbound + have hh := norm_integral_tip_le (by norm_num : (2:ℝ)<3) hR hF hb + norm_num only [show (3:ℝ)-2=1 by norm_num,Real.rpow_one,div_one] at hh + convert hh using 1; ring + +lemma dot_zero_right_rvm (a : Vec) : dot a 0=0 := by simp [dot] +lemma dot_zero_left_rvm (a : Vec) : dot 0 a=0 := by simp [dot] + +lemma hasDerivAt_norm_nonzero {Y : ℝ → Vec} {u : Vec} {s : ℝ} + (hY : HasDerivAt Y u s) (h0 : Y s≠0) : + HasDerivAt (fun t => ‖Y t‖) (dot (Y s) u / ‖Y s‖) s := by + have hn := (hY.differentiableAt.norm ℝ h0).hasDerivAt + have he := (hn.pow 2).unique hY.norm_sq + simp only [Nat.cast_ofNat,Nat.reduceSub,pow_one,← dot_eq_inner] at he + have hr : ‖Y s‖≠0 := norm_ne_zero_iff.mpr h0 + have he' : deriv (fun t => ‖Y t‖) s = dot (Y s) u / ‖Y s‖ := by + apply (eq_div_iff hr).mpr + linarith + rwa [he'] at hn + +def coneRadius (x y : Vec) : ℝ := ‖x-y‖ +def coneDirection (x y : Vec) : Vec := (coneRadius x y)⁻¹ • (x-y) + +lemma coneDirection_norm {x y : Vec} (h : x≠y) : ‖coneDirection x y‖=1 := by + have hr : 0<‖x-y‖ := norm_pos_iff.mpr (sub_ne_zero.mpr h) + simp [coneDirection,coneRadius,norm_smul,hr.ne'] + +lemma hasDerivAt_coneRadius {Y : ℝ → Vec} {u x : Vec} {s : ℝ} + (hY : HasDerivAt Y u s) (h : x≠Y s) : + HasDerivAt (coneRadius x ∘ Y) (-dot (coneDirection x (Y s)) u) s := by + have hh := hasDerivAt_norm_nonzero ((hasDerivAt_const s x).sub hY) + (sub_ne_zero.mpr h) + convert hh using 1 + · rfl + · simp only [coneDirection,coneRadius,dot_smul_left,zero_sub,Pi.sub_apply] + simp only [dot,PiLp.neg_apply,mul_neg,Finset.sum_neg_distrib] + ring + +lemma hasDerivAt_eulerian_direction {Y : ℝ → Vec} {u x : Vec} {s : ℝ} + (hY : HasDerivAt Y u s) (h : x≠Y s) : + HasDerivAt (coneDirection x ∘ Y) + ((coneRadius x (Y s))⁻¹ • + (dot (coneDirection x (Y s)) u • coneDirection x (Y s)-u)) s := by + have hr := hasDerivAt_coneRadius hY h + have hr0 : coneRadius x (Y s)≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr h) + have hh := (hr.inv hr0).smul ((hasDerivAt_const s x).sub hY) + convert hh using 1 <;> try rfl + ext i + simp only [coneDirection,coneRadius,Function.comp_apply,Pi.inv_apply,Pi.sub_apply,PiLp.neg_apply,PiLp.add_apply, + PiLp.sub_apply,PiLp.smul_apply,smul_eq_mul,zero_sub,dot_smul_left] + ring + +def eulerianG (r : ℝ) (n u : Vec) : Vec := (r*(1-dot n u))⁻¹ • (n-u) + +lemma hasDerivAt_eulerianG_space {r : ℝ → ℝ} {n : ℝ → Vec} {u : Vec} {s : ℝ} + (hr : HasDerivAt r (-dot (n s) u) s) + (hn : HasDerivAt n ((r s)⁻¹ • (dot (n s) u • n s-u)) s) + (hr0 : r s≠0) (hd : 1-dot (n s) u≠0) : + HasDerivAt (fun t => eulerianG (r t) (n t) u) + (((1-dot u u)/((r s)^2*(1-dot (n s) u)^2)) • (n s-u) - + ((r s)^2)⁻¹ • n s) s := by + have hd' := (hasDerivAt_const s (1:ℝ)).sub (hasDerivAt_dot hn (hasDerivAt_const s u)) + have hh := ((hr.mul hd').inv (mul_ne_zero hr0 hd)).smul + (hn.sub (hasDerivAt_const s u)) + convert hh using 1 <;> try rfl + ext i + simp only [Pi.inv_apply,Pi.mul_apply,Pi.sub_apply,PiLp.add_apply,PiLp.sub_apply, + PiLp.smul_apply,smul_eq_mul,dot_smul_left,dot_sub_left, + dot_zero_right_rvm,zero_add,sub_zero,zero_sub] + field_simp + ring + +lemma hasDerivAt_eulerianG_velocity {u : ℝ → Vec} {b n : Vec} {r s : ℝ} + (hu : HasDerivAt u b s) (hr : r≠0) (hd : 1-dot n (u s)≠0) : + HasDerivAt (fun t => eulerianG r n (u t)) + ((r*(1-dot n (u s))^2)⁻¹ • + ((dot n b) • (n-u s)-(1-dot n (u s)) • b)) s := by + have hd' := (hasDerivAt_const s (1:ℝ)).sub (hasDerivAt_dot (hasDerivAt_const s n) hu) + have hh := (((hasDerivAt_const s r).mul hd').inv (mul_ne_zero hr hd)).smul + ((hasDerivAt_const s n).sub hu) + convert hh using 1 <;> try rfl + ext i + simp only [Pi.inv_apply,Pi.mul_apply,Pi.sub_apply,PiLp.neg_apply,PiLp.add_apply,PiLp.sub_apply, + PiLp.smul_apply,smul_eq_mul,dot_zero_left_rvm,zero_add,zero_mul,zero_sub] + field_simp + ring + +lemma eulerian_kernel_decomposition (r : ℝ) (n u b : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) : + (r^2)⁻¹ • n + + (((1-dot u u)/(r^2*(1-dot n u)^2)) • (n-u)-(r^2)⁻¹ • n) + + (r*(1-dot n u)^2)⁻¹ • ((dot n b) • (n-u)-(1-dot n u) • b) = + (1-dot n u) • physicalElectricKernel r n u b := by + ext i + simp only [physicalElectricKernel,PiLp.add_apply,PiLp.sub_apply,PiLp.smul_apply,smul_eq_mul] + field_simp + ring + +lemma retarded_transport_chain {f : Particle} {x y v u K : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) : + fderiv ℝ (fun z : Phase => f (t-coneRadius x z.1,z)) (y,v) (u,K) = + fderiv ℝ f (t-coneRadius x y,y,v) (dot (coneDirection x y) u,u,K) := by + let Y : ℝ → Vec := fun s => y+s • u + let V : ℝ → Vec := fun s => v+s • K + have hY : HasDerivAt Y u 0 := by + have hh := (hasDerivAt_const (0:ℝ) y).add ((hasDerivAt_id (0:ℝ)).smul_const u) + change HasDerivAt Y (0+(1:ℝ) • u) 0 at hh + simpa only [zero_add,one_smul] using hh + have hV : HasDerivAt V K 0 := by + have hh := (hasDerivAt_const (0:ℝ) v).add ((hasDerivAt_id (0:ℝ)).smul_const K) + change HasDerivAt V (0+(1:ℝ) • K) 0 at hh + simpa only [zero_add,one_smul] using hh + have hr := hasDerivAt_coneRadius hY (by simpa [Y] using hxy) + have hc := ((hasDerivAt_const (0:ℝ) t).sub hr).prodMk (hY.prodMk hV) + have hf' : HasFDerivAt f (fderiv ℝ f (t-coneRadius x y,y,v)) + (t-coneRadius x (Y 0),Y 0,V 0) := by simpa only [Y,V,zero_smul,add_zero] using hf.hasFDerivAt + have hh := hf'.comp_hasDerivAt (0:ℝ) hc + have hinner : DifferentiableAt ℝ (fun z : Phase => (t-coneRadius x z.1,z)) (y,v) := by + refine ((differentiableAt_const t).sub ?_).prodMk differentiableAt_id + exact ((differentiableAt_const x).sub differentiableAt_fst).norm ℝ (sub_ne_zero.mpr hxy) + have houter := hf.comp (f := fun z : Phase => (t-coneRadius x z.1,z)) (y,v) hinner + have ho' : HasFDerivAt (fun z : Phase => f (t-coneRadius x z.1,z)) + (fderiv ℝ (fun z : Phase => f (t-coneRadius x z.1,z)) (y,v)) (Y 0,V 0) := by + convert houter.hasFDerivAt using 1 <;> try rfl + simp only [Y,V,zero_smul,add_zero] + have hh' := ho'.comp_hasDerivAt (0:ℝ) (hY.prodMk hV) + have he := hh'.unique hh + simpa only [Y,V,zero_smul,add_zero,zero_sub,neg_neg] using he + +lemma retarded_transport_identity {f : Particle} {x y v u K : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) + (heq : fderiv ℝ f (t-coneRadius x y,y,v) (1,u,K)=0) : + fderiv ℝ (fun z : Phase => f (t-coneRadius x z.1,z)) (y,v) (u,K) = + -(1-dot (coneDirection x y) u)*fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0) := by + rw [retarded_transport_chain hf hxy] + have hv : (dot (coneDirection x y) u,u,K) = + (1,u,K)-(1-dot (coneDirection x y) u) • ((1:ℝ),(0:Vec),(0:Vec)) := by + ext <;> simp + rw [hv,map_sub,map_smul,heq] + simp only [smul_eq_mul,zero_sub,neg_mul] + +lemma classical_retarded_transport {s : Solution} {t : ℝ} {x y v : Vec} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : Equations s) + (ht : 0 s.f (t-coneRadius x z.1,z)) (y,v) + (velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y))) = + -(1-dot (coneDirection x y) (velocity v))* + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0) := by + have hd := particle_differentiableAt_positive hf ht y v + apply retarded_transport_identity hd hxy + simpa only [fderiv_particleBySpacetime hd] using particle_spacetime_vlasov hf heq ht y v + +lemma dot_gradient_direction (g : Vec → ℝ) (y w : Vec) : + dot (gradient g y) w=fderiv ℝ g y w := by + rw [dot_comm,clm_sum_basis] + simp only [dot,gradient_apply,spatialPartial] + +lemma divergence_const_rvm (w y : Vec) : divergence (fun _ : Vec => w) y=0 := by + simp [divergence,spatialPartial] + +lemma fderiv_phase_split {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {g : Phase → H} {y v u K : Vec} (hg : DifferentiableAt ℝ g (y,v)) : + fderiv ℝ (fun z => g (z,v)) y u+fderiv ℝ (fun w => g (y,w)) v K = + fderiv ℝ g (y,v) (u,K) := by + have hiy : HasFDerivAt (fun z : Vec => (z,v)) + ((ContinuousLinearMap.id ℝ Vec).prod (0 : Vec →L[ℝ] Vec)) y := + (hasFDerivAt_id y).prodMk (hasFDerivAt_const v y) + have hiv : HasFDerivAt (fun w : Vec => (y,w)) + ((0 : Vec →L[ℝ] Vec).prod (ContinuousLinearMap.id ℝ Vec)) v := + (hasFDerivAt_const y v).prodMk (hasFDerivAt_id v) + have hy := hg.hasFDerivAt.comp y hiy + have hv := hg.hasFDerivAt.comp v hiv + have hy' : fderiv ℝ (fun z => g (z,v)) y u=fderiv ℝ g (y,v) (u,0) := by + convert congrArg (fun L : Vec →L[ℝ] H => L u) hy.fderiv using 1 <;> rfl + have hv' : fderiv ℝ (fun w => g (y,w)) v K=fderiv ℝ g (y,v) (0,K) := by + convert congrArg (fun L : Vec →L[ℝ] H => L K) hv.fderiv using 1 <;> rfl + rw [hy',hv'] + rw [← map_add] + congr 1 + ext <;> simp + +lemma phase_divergence_transport {g : Phase → ℝ} {K : Vec → Vec} {y v u : Vec} + (hg : DifferentiableAt ℝ g (y,v)) (hK : DifferentiableAt ℝ K v) : + divergence (fun z => g (z,v) • u) y+divergence (fun w => g (y,w) • K w) v = + fderiv ℝ g (y,v) (u,K v)+g (y,v)*divergence K v := by + have hy : DifferentiableAt ℝ (fun z => g (z,v)) y := + hg.comp (f := fun z => (z,v)) y (differentiableAt_id.prodMk (differentiableAt_const v)) + have hv : DifferentiableAt ℝ (fun w => g (y,w)) v := + hg.comp (f := fun w => (y,w)) v ((differentiableAt_const y).prodMk differentiableAt_id) + rw [divergence_smul hy (differentiableAt_const u),divergence_smul hv hK, + divergence_const_rvm,mul_zero,add_zero,dot_gradient_direction,dot_gradient_direction, + ← add_assoc,fderiv_phase_split hg] + +lemma hasDerivAt_line_rvm (y u : Vec) : + HasDerivAt (fun s : ℝ => y+s • u) u 0 := by + have hh := (hasDerivAt_const (0:ℝ) y).add ((hasDerivAt_id (0:ℝ)).smul_const u) + change HasDerivAt (fun s : ℝ => y+s • u) (0+(1:ℝ) • u) 0 at hh + simpa only [zero_add,one_smul] using hh + +lemma fderiv_of_line_rvm {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {g : Vec → H} {y u : Vec} {w : H} (hg : DifferentiableAt ℝ g y) + (hc : HasDerivAt (fun s : ℝ => g (y+s • u)) w 0) : fderiv ℝ g y u=w := by + have h : HasFDerivAt g (fderiv ℝ g y) (y+(0:ℝ) • u) := by + simpa only [zero_smul,add_zero] using hg.hasFDerivAt + exact (h.comp_hasDerivAt 0 (hasDerivAt_line_rvm y u)).unique hc + +lemma differentiableAt_coneRadius {x y : Vec} (h : x≠y) : + DifferentiableAt ℝ (coneRadius x) y := + ((differentiableAt_const x).sub differentiableAt_id).norm ℝ (sub_ne_zero.mpr h) + +lemma differentiableAt_coneDirection {x y : Vec} (h : x≠y) : + DifferentiableAt ℝ (coneDirection x) y := + ((differentiableAt_coneRadius h).inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr h))).smul + ((differentiableAt_const x).sub differentiableAt_id) + +lemma differentiableAt_eulerianG {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {r : H → ℝ} {n u : H → Vec} {s : H} + (hr : DifferentiableAt ℝ r s) (hn : DifferentiableAt ℝ n s) + (hu : DifferentiableAt ℝ u s) (hr0 : r s≠0) (hd : 1-dot (n s) (u s)≠0) : + DifferentiableAt ℝ (fun z => eulerianG (r z) (n z) (u z)) s := by + have hdot : DifferentiableAt ℝ (fun z => dot (n z) (u z)) s := by + simpa only [dot_eq_inner] using hn.inner ℝ hu + exact ((hr.mul ((differentiableAt_const (1:ℝ)).sub hdot)).inv + (mul_ne_zero hr0 hd)).smul (hn.sub hu) + +lemma fderiv_eulerianG_space {x y u : Vec} (hxy : x≠y) + (hd : 1-dot (coneDirection x y) u≠0) : + fderiv ℝ (fun z => eulerianG (coneRadius x z) (coneDirection x z) u) y u = + ((1-dot u u)/((coneRadius x y)^2*(1-dot (coneDirection x y) u)^2)) • + (coneDirection x y-u) - ((coneRadius x y)^2)⁻¹ • coneDirection x y := by + have hr0 : coneRadius x y≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + have hg := differentiableAt_eulerianG (differentiableAt_coneRadius hxy) + (differentiableAt_coneDirection hxy) (differentiableAt_const u) hr0 hd + apply fderiv_of_line_rvm hg + have hc := hasDerivAt_line_rvm y u + have hxy' : x≠y+(0:ℝ) • u := by simpa only [zero_smul,add_zero] using hxy + have hh := hasDerivAt_eulerianG_space + (r := fun s => coneRadius x (y+s • u)) (n := fun s => coneDirection x (y+s • u)) + (u := u) (s := 0) (hasDerivAt_coneRadius hc hxy') + (hasDerivAt_eulerian_direction hc hxy') + (by simpa only [zero_smul,add_zero] using hr0) + (by simpa only [zero_smul,add_zero] using hd) + simpa only [Function.comp_apply,zero_smul,add_zero] using hh + +lemma fderiv_eulerianG_velocity {r : ℝ} {n v K : Vec} (hr : r≠0) + (hd : 1-dot n (velocity v)≠0) : + fderiv ℝ (fun w => eulerianG r n (velocity w)) v K = + (r*(1-dot n (velocity v))^2)⁻¹ • + ((dot n (fderiv ℝ velocity v K)) • (n-velocity v)- + (1-dot n (velocity v)) • (fderiv ℝ velocity v K)) := by + have hv := (contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω)≠0)) v + apply fderiv_of_line_rvm (differentiableAt_eulerianG + (differentiableAt_const r) (differentiableAt_const n) hv hr hd) + have hvel := hasDerivAt_particle_velocity (hasDerivAt_line_rvm v K) + have hh := hasDerivAt_eulerianG_velocity hvel hr + (by simpa only [zero_smul,add_zero] using hd) + simpa only [zero_smul,add_zero,fderiv_velocity_apply] using hh + +def retardedG (x : Vec) (z : Phase) : Vec := + eulerianG (coneRadius x z.1) (coneDirection x z.1) (velocity z.2) + +lemma differentiableAt_retardedG {x y v : Vec} (hxy : x≠y) : + DifferentiableAt ℝ (retardedG x) (y,v) := by + apply differentiableAt_eulerianG (r := fun z : Phase => coneRadius x z.1) + (n := fun z : Phase => coneDirection x z.1) (u := fun z : Phase => velocity z.2) + · exact (differentiableAt_coneRadius hxy).comp (f:=Prod.fst) (y,v) differentiableAt_fst + · exact (differentiableAt_coneDirection hxy).comp (f:=Prod.fst) (y,v) differentiableAt_fst + · exact ((contDiff_velocity.differentiable (by simp : (1 : ℕ∞ω)≠0)) v).comp + (f:=Prod.snd) (y,v) differentiableAt_snd + · exact norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + · exact (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + +lemma fderiv_retardedG {x y v K : Vec} (hxy : x≠y) : + fderiv ℝ (retardedG x) (y,v) (velocity v,K) = + (1-dot (coneDirection x y) (velocity v)) • + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v K) - ((coneRadius x y)^2)⁻¹ • coneDirection x y := by + have hd := (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + have hr : coneRadius x y≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + rw [← fderiv_phase_split (differentiableAt_retardedG hxy)] + change fderiv ℝ (fun z => eulerianG (coneRadius x z) (coneDirection x z) (velocity v)) y + (velocity v)+fderiv ℝ (fun w => eulerianG (coneRadius x y) (coneDirection x y) (velocity w)) v K = _ + rw [fderiv_eulerianG_space hxy hd,fderiv_eulerianG_velocity hr hd] + have he := eulerian_kernel_decomposition (coneRadius x y) (coneDirection x y) + (velocity v) (fderiv ℝ velocity v K) hr hd + exact eq_sub_of_add_eq (by simpa only [add_assoc,add_left_comm,add_comm] using he) + +def retardedDensity (f : Particle) (t : ℝ) (x : Vec) (z : Phase) : ℝ := + f (t-coneRadius x z.1,z) + +lemma differentiableAt_retardedDensity {f : Particle} {x y v : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) : + DifferentiableAt ℝ (retardedDensity f t x) (y,v) := by + have hi : DifferentiableAt ℝ (fun z : Phase => (t-coneRadius x z.1,z)) (y,v) := + ((differentiableAt_const t).sub ((differentiableAt_coneRadius hxy).comp + (f:=Prod.fst) (y,v) differentiableAt_fst)).prodMk differentiableAt_id + exact hf.comp (f := fun z : Phase => (t-coneRadius x z.1,z)) (y,v) hi + +lemma fderiv_vec_component_at {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {g : H → Vec} {z e : H} (hg : DifferentiableAt ℝ g z) (i : Fin 3) : + fderiv ℝ (fun w => g w i) z e=(fderiv ℝ g z e) i := by + have h := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp z hg.hasFDerivAt + convert congrArg (fun L : H →L[ℝ] ℝ => L e) h.fderiv using 1 <;> rfl + +lemma retardedG_deficit_component {x y v : Vec} (hxy : x≠y) (i : Fin 3) : + (1-dot (coneDirection x y) (velocity v))*retardedG x (y,v) i = + (coneDirection x y i-velocity v i)/coneRadius x y := by + have hr : coneRadius x y≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + have hd := (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + simp only [retardedG,eulerianG,PiLp.smul_apply,PiLp.sub_apply,smul_eq_mul] + field_simp + +lemma retarded_electric_density_identity {f : Particle} {x y v E B : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) + (heq : fderiv ℝ f (t-coneRadius x y,y,v) + (1,velocity v,E+cross (velocity v) B)=0) (i : Fin 3) : + ((coneRadius x y)^2)⁻¹*coneDirection x y i*f (t-coneRadius x y,y,v) + + (coneDirection x y i-velocity v i)/coneRadius x y * + fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0) = + f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B)) i - + divergence (fun z => (retardedDensity f t x (z,v)*retardedG x (z,v) i) • velocity v) y - + divergence (fun w => (retardedDensity f t x (y,w)*retardedG x (y,w) i) • + (E+cross (velocity w) B)) v := by + have hR := differentiableAt_retardedDensity hf hxy + have hG := differentiableAt_retardedG (v:=v) hxy + have hGi : DifferentiableAt ℝ (fun z : Phase => retardedG x z i) (y,v) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (y,v) hG + have hK := (contDiff_lorentz (k:=1) E B).differentiable (by simp) v + have hdiv := phase_divergence_transport (u:=velocity v) (hR.mul hGi) hK + rw [divergence_lorentz,mul_zero,add_zero,fderiv_mul hR hGi] at hdiv + simp only [add_apply,smul_apply,smul_eq_mul] at hdiv + rw [fderiv_vec_component_at hG i,fderiv_retardedG hxy] at hdiv + have htr : fderiv ℝ (retardedDensity f t x) (y,v) (velocity v,E+cross (velocity v) B) = + -(1-dot (coneDirection x y) (velocity v))*fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0) := + retarded_transport_identity hf hxy heq + rw [htr] at hdiv + simp only [retardedDensity,PiLp.sub_apply,PiLp.smul_apply,smul_eq_mul] at hdiv + have hgd := retardedG_deficit_component (v:=v) hxy i + linear_combination hdiv - (fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0))*hgd + +lemma fderiv_cross_apply {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {F G : H → Vec} {z e : H} (hF : DifferentiableAt ℝ F z) + (hG : DifferentiableAt ℝ G z) : + fderiv ℝ (fun w => cross (F w) (G w)) z e = + cross (fderiv ℝ F z e) (G z)+cross (F z) (fderiv ℝ G z e) := by + have hi (A : H → Vec) (hA : DifferentiableAt ℝ A z) (i : Fin 3) : + DifferentiableAt ℝ (fun w => A w i) z := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp z hA + have hcross : DifferentiableAt ℝ (fun w => cross (F w) (G w)) z := + (contDiff_cross (k:=1)).differentiable (by simp) _ |>.comp z (hF.prodMk hG) + have hmul (i j : Fin 3) : DifferentiableAt ℝ (fun w => F w i*G w j) z := + (hi F hF i).mul (hi G hG j) + have hp (i j : Fin 3) : fderiv ℝ (fun w => F w i*G w j-F w j*G w i) z e = + (fderiv ℝ F z e) i*G z j-(fderiv ℝ F z e) j*G z i + + (F z i*(fderiv ℝ G z e) j-F z j*(fderiv ℝ G z e) i) := by + rw [fderiv_fun_sub (hmul i j) (hmul j i), + fderiv_fun_mul (hi F hF i) (hi G hG j),fderiv_fun_mul (hi F hF j) (hi G hG i)] + simp only [sub_apply,add_apply,smul_apply,smul_eq_mul,fderiv_vec_component_at hF, + fderiv_vec_component_at hG] + ring + ext i + rw [← fderiv_vec_component_at hcross i] + fin_cases i + · exact hp 1 2 + · exact hp 2 0 + · exact hp 0 1 + +lemma fderiv_coneDirection_apply {x y u : Vec} (hxy : x≠y) : + fderiv ℝ (coneDirection x) y u = (coneRadius x y)⁻¹ • + (dot (coneDirection x y) u • coneDirection x y-u) := by + apply fderiv_of_line_rvm (differentiableAt_coneDirection hxy) + have hh := hasDerivAt_eulerian_direction (hasDerivAt_line_rvm y u) + (by simpa only [zero_smul,add_zero] using hxy) + convert hh using 1 <;> first | rfl | simp only [zero_smul,add_zero] + +lemma eulerian_cross_direction {r : ℝ} {n u : Vec} (hr : r≠0) + (hd : 1-dot n u≠0) : + cross (r⁻¹ • (dot n u • n-u)) (eulerianG r n u) = (r^2)⁻¹ • cross n u := by + ext i + fin_cases i <;> dsimp [cross,eulerianG] <;> field_simp <;> ring + +def retardedH (x : Vec) (z : Phase) : Vec := cross (coneDirection x z.1) (retardedG x z) + +lemma differentiableAt_retardedH {x y v : Vec} (hxy : x≠y) : + DifferentiableAt ℝ (retardedH x) (y,v) := by + exact (contDiff_cross (k:=1)).differentiable (by simp) _ |>.comp + (f:=fun z : Phase => (coneDirection x z.1,retardedG x z)) (y,v) + (((differentiableAt_coneDirection hxy).comp (f:=Prod.fst) (y,v) + differentiableAt_fst).prodMk (differentiableAt_retardedG hxy)) + +lemma fderiv_retardedH {x y v K : Vec} (hxy : x≠y) : + fderiv ℝ (retardedH x) (y,v) (velocity v,K) = + (1-dot (coneDirection x y) (velocity v)) • cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v K)) + + ((coneRadius x y)^2)⁻¹ • cross (coneDirection x y) (velocity v) := by + have hn : DifferentiableAt ℝ (fun z : Phase => coneDirection x z.1) (y,v) := + (differentiableAt_coneDirection hxy).comp (f:=Prod.fst) (y,v) differentiableAt_fst + have he : fderiv ℝ (fun z : Phase => coneDirection x z.1) (y,v) (velocity v,K) = + (coneRadius x y)⁻¹ • (dot (coneDirection x y) (velocity v) • coneDirection x y-velocity v) := by + have hfst : HasFDerivAt (Prod.fst : Phase → Vec) (ContinuousLinearMap.fst ℝ Vec Vec) (y,v) := + hasFDerivAt_fst + have hd := (differentiableAt_coneDirection hxy).hasFDerivAt.comp (y,v) hfst + have hh : fderiv ℝ (fun z : Phase => coneDirection x z.1) (y,v) (velocity v,K) = + fderiv ℝ (coneDirection x) y (velocity v) := by + convert congrArg (fun L : Phase →L[ℝ] Vec => L (velocity v,K)) hd.fderiv using 1 <;> rfl + rw [hh,fderiv_coneDirection_apply hxy] + change fderiv ℝ (fun z : Phase => cross (coneDirection x z.1) (retardedG x z)) (y,v) _ = _ + rw [fderiv_cross_apply hn (differentiableAt_retardedG hxy),he, + fderiv_retardedG hxy] + have hc := eulerian_cross_direction + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) + (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + change cross _ (eulerianG _ _ _)+_=_ + change cross _ (eulerianG (coneRadius x y) (coneDirection x y) (velocity v))+_=_ + change cross ((coneRadius x y)⁻¹ • _) (eulerianG (coneRadius x y) _ _) = _ at hc + rw [hc] + ext i + fin_cases i <;> dsimp [cross,coneRadius] <;> ring + +lemma retardedH_deficit_component {x y v : Vec} (hxy : x≠y) (i : Fin 3) : + (1-dot (coneDirection x y) (velocity v))*retardedH x (y,v) i = + -(cross (coneDirection x y) (velocity v)) i/coneRadius x y := by + have hr : coneRadius x y≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + have hd := (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + fin_cases i <;> dsimp [retardedH,retardedG,eulerianG,cross] <;> field_simp <;> ring + +lemma retarded_magnetic_density_identity {f : Particle} {x y v E B : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) + (heq : fderiv ℝ f (t-coneRadius x y,y,v) + (1,velocity v,E+cross (velocity v) B)=0) (i : Fin 3) : + -((coneRadius x y)^2)⁻¹*cross (coneDirection x y) (velocity v) i*f (t-coneRadius x y,y,v) - + cross (coneDirection x y) (velocity v) i/coneRadius x y * + fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0) = + f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))) i - + divergence (fun z => (retardedDensity f t x (z,v)*retardedH x (z,v) i) • velocity v) y - + divergence (fun w => (retardedDensity f t x (y,w)*retardedH x (y,w) i) • + (E+cross (velocity w) B)) v := by + have hR := differentiableAt_retardedDensity hf hxy + have hH := differentiableAt_retardedH (v:=v) hxy + have hHi : DifferentiableAt ℝ (fun z : Phase => retardedH x z i) (y,v) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (y,v) hH + have hK := (contDiff_lorentz (k:=1) E B).differentiable (by simp) v + have hdiv := phase_divergence_transport (u:=velocity v) (hR.mul hHi) hK + rw [divergence_lorentz,mul_zero,add_zero,fderiv_mul hR hHi] at hdiv + simp only [add_apply,smul_apply,smul_eq_mul] at hdiv + rw [fderiv_vec_component_at hH i,fderiv_retardedH hxy] at hdiv + have htr : fderiv ℝ (retardedDensity f t x) (y,v) (velocity v,E+cross (velocity v) B) = + -(1-dot (coneDirection x y) (velocity v))*fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0) := + retarded_transport_identity hf hxy heq + rw [htr] at hdiv + simp only [retardedDensity,PiLp.add_apply,PiLp.smul_apply,smul_eq_mul] at hdiv + have hhd := retardedH_deficit_component (v:=v) hxy i + linear_combination hdiv - (fderiv ℝ f (t-coneRadius x y,y,v) (1,0,0))*hhd + +def holeCutoff (ε : ℝ) (x : Vec) : ℝ := 1-ballCutoff (ε/2) (ε^2/8) x + +lemma contDiff_holeCutoff (ε : ℝ) {k : ℕ∞} : ContDiff ℝ k (holeCutoff ε) := + contDiff_const.sub (contDiff_ballCutoff _ _) + +lemma holeCutoff_zero {ε : ℝ} (hε : 0<ε) {x : Vec} (hx : ‖x‖<ε/4) : + holeCutoff ε x=0 := by + rw [holeCutoff,ballCutoff,Real.smoothTransition.one_of_one_le,sub_self] + apply (le_div_iff₀ (by positivity : 0<ε^2/8)).mpr + nlinarith [sq_nonneg (ε/4-‖x‖),norm_nonneg x] + +lemma holeCutoff_one {ε : ℝ} (hε : 0<ε) {x : Vec} (hx : ε/2≤‖x‖) : + holeCutoff ε x=1 := by + rw [holeCutoff,ballCutoff,Real.smoothTransition.zero_of_nonpos,sub_zero] + apply div_nonpos_of_nonpos_of_nonneg _ (by positivity) + nlinarith [sq_nonneg (‖x‖-ε/2)] + +lemma holeCutoff_eventually_one {ε : ℝ} (hε : 0<ε) {x : Vec} (hx : ε/2<‖x‖) : + holeCutoff ε =ᶠ[𝓝 x] (fun _ => 1) := by + have hn : {y : Vec | ε/2<‖y‖} ∈ 𝓝 x := + (isOpen_lt continuous_const continuous_norm).mem_nhds hx + filter_upwards [hn] with y hy + exact holeCutoff_one hε hy.le + +lemma contDiff_holeCutoff_smul {ε : ℝ} {F : Vec → Vec} (hε : 0<ε) + (hF : ∀ x≠0, ContDiffAt ℝ 1 F x) : + ContDiff ℝ 1 (fun x => holeCutoff ε x • F x) := by + apply contDiff_iff_contDiffAt.mpr + intro x + by_cases hx : x=0 + · subst x + have he : (fun x => holeCutoff ε x • F x) =ᶠ[𝓝 (0:Vec)] (fun _ => 0) := by + filter_upwards [ball_mem_nhds (0:Vec) (by positivity : 0<ε/4)] with y hy + rw [holeCutoff_zero hε (by simpa only [mem_ball_zero_iff] using hy),zero_smul] + exact contDiffAt_const.congr_of_eventuallyEq he + · exact (contDiff_holeCutoff ε).contDiffAt.smul (hF x hx) + +lemma divergence_congr_eventually {F G : Vec → Vec} {x : Vec} (h : F =ᶠ[𝓝 x] G) : + divergence F x=divergence G x := by + apply Finset.sum_congr rfl + intro i _ + exact congrArg (fun L : Vec →L[ℝ] ℝ => L (basis i)) + ((h.fun_comp (fun w : Vec => w i)).fderiv_eq (𝕜:=ℝ)) + +lemma divergence_holeCutoff {ε : ℝ} {F : Vec → Vec} {x : Vec} (hε : 0<ε) + (hx : ε/2<‖x‖) : + divergence (fun z => holeCutoff ε z • F z) x = divergence F x := by + apply divergence_congr_eventually + filter_upwards [holeCutoff_eventually_one hε hx] with y hy + rw [hy,one_smul] + +lemma divergence_annulus {ε R : ℝ} (hε : 0<ε) (hεR : ε≤R) {F : Vec → Vec} + (hF : ∀ x≠0, ContDiffAt ℝ 1 F x) : + (∫ x in ball (0:Vec) R \ ball (0:Vec) ε, divergence F x) = + (∫ n : Sphere, R^2*dot n.1 (F (R • n.1)) ∂sphereMeasure) - + (∫ n : Sphere, ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure) := by + let G : Vec → Vec := fun x => holeCutoff ε x • F x + have hG := contDiff_holeCutoff_smul hε hF + have hD : Continuous (divergence G) := continuous_divergence hG + have hi : IntegrableOn (divergence G) (ball (0:Vec) R) := + (hD.continuousOn.integrableOn_compact (isCompact_closedBall (0:Vec) R)).mono_set ball_subset_closedBall + have hd : (∫ x in ball (0:Vec) R \ ball (0:Vec) ε, divergence F x) = + (∫ x in ball (0:Vec) R, divergence G x) - (∫ x in ball (0:Vec) ε, divergence G x) := by + rw [← setIntegral_sdiff measurableSet_ball hi (ball_subset_ball hεR)] + apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro x hx + apply (divergence_holeCutoff hε _).symm + have hh : ε≤‖x‖ := by simpa only [mem_ball_zero_iff,not_lt] using hx.2 + linarith + rw [hd,divergence_ball (hε.trans_le hεR) hG,divergence_ball hε hG] + have hval (c : ℝ) (hc : ε≤c) (n : Sphere) : G (c • n.1)=F (c • n.1) := by + dsimp [G] + rw [holeCutoff_one hε,one_smul] + have hn : ‖n.1‖=1 := sphere_norm n + rw [norm_smul,Real.norm_of_nonneg (hε.le.trans hc),hn,mul_one] + linarith + congr 1 <;> apply integral_congr_ae <;> filter_upwards [] with n + · change R^2*dot n.1 (G (R • n.1)) = _ + rw [hval R hεR] + · change ε^2*dot n.1 (G (ε • n.1)) = _ + rw [hval ε le_rfl] + + + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +lemma contDiff_dot_pair {k : ℕ∞ω} : + ContDiff ℝ k (fun z : Vec × Vec => dot z.1 z.2) := by + unfold dot + fun_prop + +lemma contDiff_eulerianG_velocity {k : ℕ∞ω} {r : ℝ} {n : Vec} + (hr : r≠0) (hn : ‖n‖=1) : + ContDiff ℝ k (fun v => eulerianG r n (velocity v)) := by + have hd : ContDiff ℝ k (fun v => 1-dot n (velocity v)) := + contDiff_const.sub (contDiff_dot_pair.comp (contDiff_const.prodMk contDiff_velocity)) + exact ((contDiff_const.mul hd).inv (fun v => mul_ne_zero hr (cone_denom_pos v n hn).ne')).smul + (contDiff_const.sub contDiff_velocity) + +lemma contDiff_retardedG_velocity {k : ℕ∞ω} {x y : Vec} (hxy : x≠y) : + ContDiff ℝ k (fun v => retardedG x (y,v)) := by + change ContDiff ℝ k (fun v => eulerianG (coneRadius x y) (coneDirection x y) (velocity v)) + have hr : coneRadius x y≠0 := norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy) + exact contDiff_eulerianG_velocity hr (coneDirection_norm hxy) + +lemma contDiff_retardedH_velocity {k : ℕ∞ω} {x y : Vec} (hxy : x≠y) : + ContDiff ℝ k (fun v => retardedH x (y,v)) := by + change ContDiff ℝ k (fun v => cross (coneDirection x y) (retardedG x (y,v))) + exact contDiff_cross.comp ((contDiff_const (c:=coneDirection x y)).prodMk + (contDiff_retardedG_velocity (k:=k) hxy)) + +lemma contDiff_particle_velocity_profile {s : Solution} {t : ℝ} (ht : 0≤t) (x : Vec) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) : + ContDiff ℝ 1 (fun v => s.f (t,x,v)) := by + apply contDiffOn_univ.mp + exact hf.comp (contDiff_const.prodMk (contDiff_const.prodMk contDiff_id)).contDiffOn + (fun _ _ => ht) + +lemma compactSupport_particle_velocity_profile {s : Solution} {t : ℝ} (ht : 0≤t) (x : Vec) + (hc : CompactOnFiniteHorizons s) : + HasCompactSupport (fun v => s.f (t,x,v)) := by + obtain ⟨K,hK,hz⟩ := hc t ht + apply compactSupport_of_zero_off (hK.image continuous_snd) + intro v hv + by_contra hne + exact hv ⟨(x,v),hz t ⟨ht,le_rfl⟩ (subset_tsupport _ hne),rfl⟩ + +lemma integral_retarded_velocity_divergence_zero {f : Vec → ℝ} {G : Vec → ℝ} + (hf : ContDiff ℝ 1 f) (hc : HasCompactSupport f) (hG : ContDiff ℝ 1 G) + (E B : Vec) : + (∫ v : Vec, divergence (fun w => (f w*G w) • (E+cross (velocity w) B)) v)=0 := by + apply integral_divergence_zero ((hf.mul hG).smul (contDiff_lorentz E B)) + exact (hc.mul_right).smul_right + +lemma classical_retarded_electric_velocity_divergence {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + (∫ v : Vec, divergence (fun w => + (retardedDensity s.f t x (y,w)*retardedG x (y,w) i) • + (s.E (t-coneRadius x y,y)+cross (velocity w) (s.B (t-coneRadius x y,y)))) v)=0 := by + apply integral_retarded_velocity_divergence_zero + (contDiff_particle_velocity_profile ht y hf) + (compactSupport_particle_velocity_profile ht y hc) + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp + (contDiff_retardedG_velocity hxy) + +lemma classical_retarded_magnetic_velocity_divergence {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (i : Fin 3) : + (∫ v : Vec, divergence (fun w => + (retardedDensity s.f t x (y,w)*retardedH x (y,w) i) • + (s.E (t-coneRadius x y,y)+cross (velocity w) (s.B (t-coneRadius x y,y)))) v)=0 := by + apply integral_retarded_velocity_divergence_zero + (contDiff_particle_velocity_profile ht y hf) + (compactSupport_particle_velocity_profile ht y hc) + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp + (contDiff_retardedH_velocity hxy) + +lemma integrable_divergence_compact {F : Vec → Vec} + (hF : ContDiff ℝ 1 F) (hc : HasCompactSupport F) : Integrable (divergence F) := by + apply (continuous_divergence hF).integrable_of_hasCompactSupport + change HasCompactSupport (∑ i : Fin 3, fun x => spatialPartial (fun y => F y i) x i) + apply HasCompactSupport.finset_sum + intro i _ + exact (hc.comp_left (g:=fun v : Vec => v i) (by simp)).fderiv_apply ℝ (basis i) + +lemma divergence_integral_uniform_support + {U : Set Vec} {K : Set Vec} {F : Phase → Vec} {y : Vec} + (hU : IsOpen U) (hK : IsCompact K) (hy : y ∈ U) + (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) + (hz : ∀ x ∈ U, ∀ v ∉ K, F (x,v)=0) : + divergence (fun z => ∫ v : Vec, F (z,v)) y = + ∫ v : Vec, divergence (fun z => F (z,v)) y := by + have hdiff (v : Vec) : DifferentiableAt ℝ F (y,v) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).differentiableAt (by simp) + have hi := (hasFDerivAt_integral_uniform_support hU hK hy hF hz).differentiableAt + have hc : Continuous (fun v : Vec => fderiv ℝ F (y,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hy,mem_univ _⟩) + have hcs := compactSupport_param_fderiv hU hK hy hz + have hint (i : Fin 3) : Integrable (fun v : Vec => fderiv ℝ F (y,v) (basis i,0)) := + (hc.clm_apply continuous_const).integrable_of_hasCompactSupport + (hcs.comp_left (g:=fun L : Phase →L[ℝ] Vec => L (basis i,0)) (by simp)) + have hinti (i : Fin 3) : Integrable (fun v : Vec => (fderiv ℝ F (y,v) (basis i,0)) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp (hint i) + have hslice (v e : Vec) : fderiv ℝ (fun z => F (z,v)) y e = fderiv ℝ F (y,v) (e,0) := by + have hm : HasFDerivAt (fun z : Vec => (z,v)) + ((ContinuousLinearMap.id ℝ Vec).prod 0) y := + (hasFDerivAt_id y).prodMk (hasFDerivAt_const v y) + have hh := (hdiff v).hasFDerivAt.comp (f:=fun z : Vec => (z,v)) y hm + convert congrArg (fun L : Vec →L[ℝ] Vec => L e) hh.fderiv using 1 <;> rfl + unfold divergence spatialPartial + simp_rw [fderiv_vec_component_at hi] + simp_rw [fderiv_integral_uniform_support_apply hU hK hy hF hz, + integral_vec_apply (hint _)] + rw [← integral_finsetSum _ (fun i _ => hinti i)] + apply integral_congr_ae + filter_upwards [] with v + apply Finset.sum_congr rfl + intro i _ + have hsliceD : DifferentiableAt ℝ (fun z => F (z,v)) y := + (hdiff v).comp y (differentiableAt_id.prodMk (differentiableAt_const v)) + rw [fderiv_vec_component_at hsliceD,hslice] + +lemma contDiffAt_coneRadius {k : ℕ∞ω} {x y : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (coneRadius x) y := + (contDiffAt_const.sub contDiffAt_id).norm ℝ (sub_ne_zero.mpr hxy) + +lemma contDiffAt_coneDirection {k : ℕ∞ω} {x y : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (coneDirection x) y := + ((contDiffAt_coneRadius hxy).inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy))).smul + (contDiffAt_const.sub contDiffAt_id) + +lemma contDiffAt_retardedG {k : ℕ∞ω} {x y v : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (retardedG x) (y,v) := by + have hr : ContDiffAt ℝ k (fun z : Phase => coneRadius x z.1) (y,v) := + (contDiffAt_coneRadius (k:=k) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst + have hn : ContDiffAt ℝ k (fun z : Phase => coneDirection x z.1) (y,v) := + (contDiffAt_coneDirection (k:=k) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst + have hu : ContDiffAt ℝ k (fun z : Phase => velocity z.2) (y,v) := + contDiff_velocity.contDiffAt.comp (y,v) contDiffAt_snd + have hd : ContDiffAt ℝ k (fun z : Phase => 1-dot (coneDirection x z.1) (velocity z.2)) (y,v) := + contDiffAt_const.sub (contDiff_dot_pair.contDiffAt.comp (y,v) (hn.prodMk hu)) + exact ((hr.mul hd).inv (mul_ne_zero (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) + (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne')).smul (hn.sub hu) + +lemma contDiffAt_retardedH {k : ℕ∞ω} {x y v : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (retardedH x) (y,v) := + contDiff_cross.contDiffAt.comp (y,v) + (((contDiffAt_coneDirection (k:=k) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst).prodMk + (contDiffAt_retardedG hxy)) + +lemma contDiffAt_retardedDensity {k : ℕ∞ω} {f : Particle} {x y v : Vec} {t : ℝ} + (hf : ContDiffAt ℝ k f (t-coneRadius x y,y,v)) (hxy : x≠y) : + ContDiffAt ℝ k (retardedDensity f t x) (y,v) := by + have hr : ContDiffAt ℝ k (fun z : Phase => coneRadius x z.1) (y,v) := + (contDiffAt_coneRadius (k:=k) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst + have hm : ContDiffAt ℝ k (fun z : Phase => (t-coneRadius x z.1,z)) (y,v) := + ((contDiffAt_const (c:=t)).sub hr).prodMk contDiffAt_id + exact hf.comp (f:=fun z : Phase => (t-coneRadius x z.1,z)) (y,v) hm + +lemma particle_contDiffAt_positive {k : ℕ∞ω} {f : Particle} + (hf : ContDiffOn ℝ k f particleHalfSpace) {t : ℝ} (ht : 0 show 0≤z.1 from hz.le) + exact (hf _ ht.le).contDiffAt hn + +def retardedSpaceDomain (t : ℝ) (x : Vec) : Set Vec := + {y | x≠y ∧ 0 divergence (fun z => F (z,v)) y) := by + have hc : Continuous (fun v : Vec => fderiv ℝ F (y,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hy,mem_univ _⟩) + have hcs := compactSupport_param_fderiv hU hK hy hz + have hint (i : Fin 3) : Integrable (fun v : Vec => (fderiv ℝ F (y,v) (basis i,0)) i) := by + apply (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + exact (hc.clm_apply continuous_const).integrable_of_hasCompactSupport + (hcs.comp_left (g:=fun L : Phase →L[ℝ] Vec => L (basis i,0)) (by simp)) + apply (integrable_finsetSum Finset.univ (fun i _ => hint i)).congr + filter_upwards [] with v + unfold divergence spatialPartial + apply Finset.sum_congr rfl + intro i _ + have hd : DifferentiableAt ℝ F (y,v) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).differentiableAt (by simp) + have hm : HasFDerivAt (fun z : Vec => (z,v)) ((ContinuousLinearMap.id ℝ Vec).prod 0) y := + (hasFDerivAt_id y).prodMk (hasFDerivAt_const v y) + have hh := hd.hasFDerivAt.comp (f:=fun z : Vec => (z,v)) y hm + have hslice : DifferentiableAt ℝ (fun z => F (z,v)) y := hh.differentiableAt + rw [fderiv_vec_component_at hslice i] + change (fderiv ℝ F (y,v) (basis i,0)) i = _ + rw [show fderiv ℝ (fun z => F (z,v)) y = + (fderiv ℝ F (y,v)).comp ((ContinuousLinearMap.id ℝ Vec).prod 0) from hh.fderiv] + rfl + +lemma classical_retarded_flux_calculus {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0 divergence + (fun z => (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v) y) ∧ + divergence (fun z => ∫ v : Vec, (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v) y = + ∫ v : Vec, divergence (fun z => (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v) y := by + have ht0 : 0≤t := by have hr := norm_nonneg (x-y); change 0 (hG z.1 hz.1 z.2).contDiffWithinAt + have hcF : ContDiffOn ℝ 1 + (fun z : Phase => (retardedDensity s.f t x z*G z) • velocity z.2) + (retardedSpaceDomain t x ×ˢ univ) := + (hF.mul hG').smul ((contDiff_velocity.comp contDiff_snd).contDiffOn) + have hzero : ∀ z ∈ retardedSpaceDomain t x, ∀ v ∉ K, + (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v=0 := by + intro z hz' v hv + rw [hz z hz' v hv,zero_mul,zero_smul] + have hU := isOpen_retardedSpaceDomain t x + have hy : y ∈ retardedSpaceDomain t x := ⟨hxy,ht⟩ + have hi := integrable_spatial_divergence_uniform_support + (F := fun z : Phase => (retardedDensity s.f t x z*G z) • velocity z.2) + hU hK hy hcF hzero + have he := divergence_integral_uniform_support + (F := fun z : Phase => (retardedDensity s.f t x z*G z) • velocity z.2) + hU hK hy hcF hzero + exact ⟨hi,he⟩ + +lemma continuous_physicalElectricKernel_velocity {r : ℝ} {n : Vec} + (hr : r≠0) (hn : ‖n‖=1) (E B : Vec) : + Continuous (fun v => physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))) := by + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hb : Continuous (fun v => fderiv ℝ velocity v (E+cross (velocity v) B)) := + ((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).clm_apply + (contDiff_lorentz (k:=1) E B).continuous + have hd : Continuous (fun v => 1-dot n (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hd0 (v : Vec) : 1-dot n (velocity v)≠0 := (cone_denom_pos v n hn).ne' + have hnum : Continuous (fun v => 1-dot (velocity v) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hu.prodMk hu)) + have hnb : Continuous (fun v => dot n (fderiv ℝ velocity v (E+cross (velocity v) B))) := + (contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hb) + exact ((hnum.div (continuous_const.mul (hd.pow 3)) (fun v => mul_ne_zero (pow_ne_zero 2 hr) + (pow_ne_zero 3 (hd0 v)))).smul (continuous_const.sub hu)).add + (((continuous_const.mul (hd.pow 3)).inv₀ (fun v => mul_ne_zero hr (pow_ne_zero 3 (hd0 v)))).smul + ((hnb.smul (continuous_const.sub hu)).sub (hd.smul hb))) + +lemma classical_retarded_integral_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y : Vec} {t : ℝ} (hxy : x≠y) (ht : 0 (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v) y - + divergence (fun w => (retardedDensity s.f t x (y,w)*G (y,w)) • + (s.E (t-coneRadius x y,y)+cross (velocity w) (s.B (t-coneRadius x y,y)))) v) : + (∫ v : Vec, L v) = (∫ v : Vec, retardedDensity s.f t x (y,v)*C v) - + divergence (fun z => ∫ v : Vec, (retardedDensity s.f t x (z,v)*G (z,v)) • velocity v) y := by + have hfp := contDiff_particle_velocity_profile ht.le y hf + have hfcp := compactSupport_particle_velocity_profile ht.le y hc + have hGp : ContDiff ℝ 1 (fun v => G (y,v)) := by + rw [contDiff_iff_contDiffAt] + intro v + exact (hG y ⟨hxy,ht⟩ v).comp (f:=fun w : Vec => (y,w)) v + (contDiffAt_const.prodMk contDiffAt_id) + have hcv : Integrable (fun v : Vec => retardedDensity s.f t x (y,v)*C v) := + (hfp.continuous.mul hC).integrable_of_hasCompactSupport hfcp.mul_right + obtain ⟨hsi,hse⟩ := classical_retarded_flux_calculus hf hc hxy ht hG + have hvg : ContDiff ℝ 1 (fun w => (retardedDensity s.f t x (y,w)*G (y,w)) • + (s.E (t-coneRadius x y,y)+cross (velocity w) (s.B (t-coneRadius x y,y)))) := + (hfp.mul hGp).smul (contDiff_lorentz _ _) + have hvcp : HasCompactSupport (fun w => (retardedDensity s.f t x (y,w)*G (y,w)) • + (s.E (t-coneRadius x y,y)+cross (velocity w) (s.B (t-coneRadius x y,y)))) := + hfcp.mul_right.smul_right + have hsub := integral_sub (hcv.sub hsi) (integrable_divergence_compact hvg hvcp) + have hsub' := integral_sub hcv hsi + simp only [Pi.sub_apply] at hsub hsub' + simp_rw [heq] + rw [hsub,hsub',integral_divergence_zero hvg hvcp,sub_zero,hse] + +lemma classical_retarded_electric_integral_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : Equations s) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedG x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedG hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hki : Continuous (fun v => physicalElectricKernel (coneRadius x y) (coneDirection x y) + (velocity v) (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hk + have hid := classical_retarded_integral_identity + (L := fun v => ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i-velocity v i)/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + simpa only [fderiv_particleBySpacetime hf'] using particle_spacetime_vlasov hf heq ht y v + simpa only [retardedDensity,mul_assoc] using retarded_electric_density_identity hf' hxy hv i + +lemma classical_retarded_magnetic_integral_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : Equations s) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedH x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedH x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedH hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hkc : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))))) := + (contDiff_cross (k:=1)).continuous.comp (continuous_const.prodMk hk) + have hki : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y))))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hkc + have hid := classical_retarded_integral_identity + (L := fun v => -((coneRadius x y)^2)⁻¹*cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) - + cross (coneDirection x y) (velocity v) i/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + simpa only [fderiv_particleBySpacetime hf'] using particle_spacetime_vlasov hf heq ht y v + simpa only [retardedDensity,mul_assoc] using retarded_magnetic_density_identity hf' hxy hv i + +lemma dirD_integral_sphere {H W : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + [ProperSpace H] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : H × Vec → W} (hF : ContDiff ℝ 1 F) (e p : H) : + dirD (fun x => ∫ n : Sphere, F (x,n.1) ∂sphereMeasure) e p = + ∫ n : Sphere, dirD F (e,0) (p,n.1) ∂sphereMeasure := by + have hc : Continuous (fun n : Sphere => (fderiv ℝ F (p,n.1)).comp + (ContinuousLinearMap.inl ℝ H Vec)) := + ((hF.continuous_fderiv (by simp)).comp + (continuous_const.prodMk continuous_subtype_val)).clm_comp continuous_const + unfold dirD + rw [(hasFDerivAt_integral_sphere hF p).fderiv, + ContinuousLinearMap.integral_apply (hc.integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _)) e] + rfl + +def radiusWaveKernel (ρ : ℝ × Vec → ℝ) (z : (ℝ × Vec) × ℝ) : ℝ := + (4*Real.pi)⁻¹*z.2*(∫ n : Sphere, ρ (z.1.1-z.2,z.1.2+z.2 • n.1) ∂sphereMeasure) + +lemma sourceWave_eq_radius (ρ : ℝ × Vec → ℝ) : sourceWave ρ=volterra (radiusWaveKernel ρ) := by + funext p + have hh := intervalIntegral.integral_comp_sub_left (fun r => radiusWaveKernel ρ (p,r)) + (a:=0) (b:=p.1) p.1 + simpa only [sourceWave,volterra,sourceWaveKernel,waveK,sphereSum,radiusWaveKernel, + sub_self,sub_zero,sub_sub_cancel,mul_assoc] using hh + +lemma contDiff_radiusWaveKernel {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) : + ContDiff ℝ ∞ (radiusWaveKernel ρ) := by + have hi : ContDiff ℝ ∞ (fun z : ((ℝ × Vec) × ℝ) × Vec => + ρ (z.1.1.1-z.1.2,z.1.1.2+z.1.2 • z.2)) := by + apply hρ.comp + exact ((contDiff_fst.comp (contDiff_fst.comp contDiff_fst)).sub + (contDiff_snd.comp contDiff_fst)).prodMk + ((contDiff_snd.comp (contDiff_fst.comp contDiff_fst)).add + ((contDiff_snd.comp contDiff_fst).smul contDiff_snd)) + exact (contDiff_const.mul contDiff_snd).mul (contDiff_integral_sphere hi) + +lemma dirD_radius_average {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (e p : ℝ × Vec) (r : ℝ) : + dirD (fun z : ℝ × Vec => ∫ n : Sphere, ρ (z.1-r,z.2+r • n.1) ∂sphereMeasure) e p = + ∫ n : Sphere, dirD ρ e (p.1-r,p.2+r • n.1) ∂sphereMeasure := by + let F : (ℝ × Vec) × Vec → ℝ := fun z => ρ (z.1.1-r,z.1.2+r • z.2) + have hF : ContDiff ℝ 1 F := hρ.of_le (by simp) |>.comp + (((contDiff_fst.comp contDiff_fst).sub contDiff_const).prodMk + ((contDiff_snd.comp contDiff_fst).add (contDiff_snd.const_smul r))) + rw [show (fun z : ℝ × Vec => ∫ n : Sphere, ρ (z.1-r,z.2+r • n.1) ∂sphereMeasure)= + (fun z => ∫ n : Sphere, F (z,n.1) ∂sphereMeasure) from rfl,dirD_integral_sphere hF] + apply integral_congr_ae + apply ae_of_all + intro n + have hi := ((hasFDerivAt_fst (𝕜:=ℝ) (p:=(p,n.1))).fst.sub_const r).prodMk + (((hasFDerivAt_fst (𝕜:=ℝ) (p:=(p,n.1))).snd).add + ((hasFDerivAt_snd (𝕜:=ℝ) (p:=(p,n.1))).const_smul r)) + have hd := (hρ.differentiable (by simp) (p.1-r,p.2+r • n.1)).hasFDerivAt.comp (p,n.1) hi + change HasFDerivAt F _ (p,n.1) at hd + change (fderiv ℝ F (p,n.1)) (e,0) = (fderiv ℝ ρ (p.1-r,p.2+r • n.1)) e + rw [hd.fderiv] + simp + +lemma dirD_radiusWaveKernel {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + (e p : ℝ × Vec) (r : ℝ) : + dirD (radiusWaveKernel ρ) (e,0) (p,r)=radiusWaveKernel (dirD ρ e) (p,r) := by + rw [← dirD_prod_left ((contDiff_radiusWaveKernel hρ).differentiable (by simp))] + have hA : ContDiff ℝ ∞ (fun z : ℝ × Vec => ∫ n : Sphere, + ρ (z.1-r,z.2+r • n.1) ∂sphereMeasure) := + contDiff_integral_sphere (hρ.comp + (((contDiff_fst.comp contDiff_fst).sub contDiff_const).prodMk + ((contDiff_snd.comp contDiff_fst).add (contDiff_snd.const_smul r)))) + change dirD (fun z : ℝ × Vec => ((4*Real.pi)⁻¹*r)* + (∫ n : Sphere, ρ (z.1-r,z.2+r • n.1) ∂sphereMeasure)) e p = _ + unfold dirD + rw [fderiv_const_mul (hA.differentiable (by simp) p)] + change ((4*Real.pi)⁻¹*r)*dirD (fun z : ℝ × Vec => + ∫ n : Sphere, ρ (z.1-r,z.2+r • n.1) ∂sphereMeasure) e p = _ + rw [dirD_radius_average hρ] + rfl + +lemma dirD_sourceWave {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) (e p : ℝ × Vec) : + dirD (sourceWave ρ) e p = e.1*waveK (fun y => ρ (0,y)) p + sourceWave (dirD ρ e) p := by + rw [sourceWave_eq_radius ρ,dirD_volterra (contDiff_radiusWaveKernel hρ)] + have he : dirD (radiusWaveKernel ρ) (e,0)=radiusWaveKernel (dirD ρ e) := by + funext z + exact dirD_radiusWaveKernel hρ e z.1 z.2 + rw [he,← sourceWave_eq_radius] + simp only [radiusWaveKernel,waveK,sphereSum,sub_self,mul_assoc] + +lemma electricPotentialComponent_source {ρ : ℝ × Vec → ℝ} {j : Field} + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) (i : Fin 3) (p : ℝ × Vec) : + electricPotentialComponent ρ j i p = + -sourceWave (dirD ρ (0,basis i)) p - + (waveK (fun y => j (0,y) i) p + sourceWave (dirD (fun z => j z i) (1,0)) p) := by + unfold electricPotentialComponent + rw [dirD_sourceWave hρ,dirD_sourceWave (contDiff_component hj i)] + simp + +lemma magneticPotentialComponent_source {j : Field} (hj : ContDiff ℝ ∞ j) + (i : Fin 3) (p : ℝ × Vec) : + magneticPotentialComponent j i p = + sourceWave (dirD (fun z => j z (curlB i)) (0,basis (curlA i))) p - + sourceWave (dirD (fun z => j z (curlA i)) (0,basis (curlB i))) p := by + unfold magneticPotentialComponent + rw [dirD_sourceWave (contDiff_component hj _),dirD_sourceWave (contDiff_component hj _)] + simp + +lemma ballCutoff_one {R ε : ℝ} (hε : 0<ε) {x : Vec} + (hx : ε≤R^2-‖x‖^2) : ballCutoff R ε x=1 := by + apply Real.smoothTransition.one_of_one_le + exact (le_div_iff₀ hε).mpr (by simpa using hx) + +lemma ballCutoff_eventually_one {R ε : ℝ} (hε : 0<ε) {x : Vec} + (hx : ε 1) := by + filter_upwards [(isOpen_lt continuous_const (continuous_const.sub (continuous_norm.pow 2))).mem_nhds hx] + with y hy + exact ballCutoff_one hε hy.le + +lemma divergence_annulus_local {ε R T : ℝ} (hε : 0<ε) (hεR : ε≤R) (hRT : R ballCutoff C δ x • F x + have hG : ∀ x≠0, ContDiffAt ℝ 1 G x := by + intro x hx + by_cases hxt : ‖x‖ 0) := by + filter_upwards [(isOpen_lt continuous_const continuous_norm).mem_nhds hcx] with y hy + dsimp [G] + rw [ballCutoff_zero hC.le hδ (by simpa only [mem_closedBall_zero_iff,not_le] using hy),zero_smul] + exact contDiffAt_const.congr_of_eventuallyEq he + have hD : ∀ x ∈ ball (0:Vec) R, divergence G x=divergence F x := by + intro x hx + have hxR : ‖x‖ (hD x hx.1).symm),divergence_annulus hε hεR hG] + congr 1 <;> apply integral_congr_ae <;> filter_upwards [] with n + · rw [hV R hR.le le_rfl] + · rw [hV ε hε.le hεR] + +lemma integral_annulus_tendsto {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {R : ℝ} (hF : IntegrableOn F (ball (0:Vec) R)) : + Tendsto (fun ε : ℝ => ∫ x in ball (0:Vec) R \ ball (0:Vec) ε, F x) + (𝓝[>] (0:ℝ)) (𝓝 (∫ x in ball (0:Vec) R, F x)) := by + have ht : Tendsto (fun ε : ℝ => ∫ x in ball (0:Vec) R, + (ball (0:Vec) ε)ᶜ.indicator F x) (𝓝[>] (0:ℝ)) + (𝓝 (∫ x in ball (0:Vec) R, F x)) := by + apply tendsto_integral_filter_of_dominated_convergence (fun x => ‖F x‖) + · exact Eventually.of_forall (fun ε => hF.aestronglyMeasurable.indicator measurableSet_ball.compl) + · exact Eventually.of_forall (fun ε => ae_of_all _ (fun x => norm_indicator_le_norm_self _ _)) + · exact hF.norm + · filter_upwards [ae_restrict_of_ae (volume.ae_ne (0:Vec))] with x hx + apply tendsto_const_nhds.congr' + filter_upwards [Ioo_mem_nhdsGT (norm_pos_iff.mpr hx)] with ε hε + symm + exact indicator_of_mem (show x ∈ (ball (0:Vec) ε)ᶜ by + simp only [mem_compl_iff,mem_ball_zero_iff]; exact not_lt_of_ge hε.2.le) F + simpa only [setIntegral_indicator measurableSet_ball.compl,sdiff_eq_compl_inter,inter_comm] using ht + +lemma divergence_ball_singular {R T : ℝ} (hR : 0 ∫ n : Sphere, + ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure) (𝓝[>] (0:ℝ)) (𝓝 0)) : + (∫ x in ball (0:Vec) R, divergence F x) = + ∫ n : Sphere, R^2*dot n.1 (F (R • n.1)) ∂sphereMeasure := by + have he : (fun ε : ℝ => ∫ x in ball (0:Vec) R \ ball (0:Vec) ε, divergence F x) =ᶠ[𝓝[>] 0] + (fun ε => (∫ n : Sphere, R^2*dot n.1 (F (R • n.1)) ∂sphereMeasure) - + (∫ n : Sphere, ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure)) := by + filter_upwards [Ioo_mem_nhdsGT hR] with ε hε + exact divergence_annulus_local hε.1 hε.2.le hRT hF + apply tendsto_nhds_unique (integral_annulus_tendsto hi) + simpa only [sub_zero] using (tendsto_const_nhds.sub hzero).congr' he.symm + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + + +def coneSpatialCoefficient (x y v e : Vec) : ℝ := + dot (coneDirection x y) e/(1-dot (coneDirection x y) (velocity v)) + +def coneSpatialLift (x y v e : Vec) : Vec := + e+coneSpatialCoefficient x y v e • velocity v + +lemma coneSpatialCoefficient_identity {x y : Vec} (hxy : x≠y) (v e : Vec) : + dot (coneDirection x y) (coneSpatialLift x y v e)=coneSpatialCoefficient x y v e := by + have hd := (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne' + simp only [coneSpatialLift,dot_add_right,dot_smul_right,coneSpatialCoefficient] + field_simp + ring + +lemma retarded_spatial_division {f : Particle} {x y v K e : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) + (heq : fderiv ℝ f (t-coneRadius x y,y,v) (1,velocity v,K)=0) : + fderiv ℝ (fun z : Phase => f (t-coneRadius x z.1,z)) (y,v) + (coneSpatialLift x y v e,coneSpatialCoefficient x y v e • K)= + fderiv ℝ f (t-coneRadius x y,y,v) (0,e,0) := by + rw [retarded_transport_chain hf hxy,coneSpatialCoefficient_identity hxy] + have hv : (coneSpatialCoefficient x y v e,coneSpatialLift x y v e, + coneSpatialCoefficient x y v e • K) = + ((0:ℝ),e,(0:Vec))+coneSpatialCoefficient x y v e • ((1:ℝ),velocity v,K) := by + ext <;> simp [coneSpatialLift] + rw [hv,map_add,map_smul,heq,smul_zero,add_zero] + +lemma phase_divergence_split {g : Phase → ℝ} {W V : Phase → Vec} {y v : Vec} + (hg : DifferentiableAt ℝ g (y,v)) + (hW : DifferentiableAt ℝ W (y,v)) (hV : DifferentiableAt ℝ V (y,v)) : + divergence (fun z => g (z,v) • W (z,v)) y+ + divergence (fun w => g (y,w) • V (y,w)) v = + fderiv ℝ g (y,v) (W (y,v),V (y,v))+ + g (y,v)*(divergence (fun z => W (z,v)) y+divergence (fun w => V (y,w)) v) := by + have hy : DifferentiableAt ℝ (fun z : Vec => (z,v)) y := + differentiableAt_id.prodMk (differentiableAt_const v) + have hv : DifferentiableAt ℝ (fun w : Vec => (y,w)) v := + (differentiableAt_const y).prodMk differentiableAt_id + have hgy : DifferentiableAt ℝ (fun z => g (z,v)) y := hg.comp y hy + have hWy : DifferentiableAt ℝ (fun z => W (z,v)) y := hW.comp y hy + have hgv : DifferentiableAt ℝ (fun w => g (y,w)) v := hg.comp v hv + have hVv : DifferentiableAt ℝ (fun w => V (y,w)) v := hV.comp v hv + rw [divergence_smul hgy hWy, + divergence_smul hgv hVv, + dot_gradient_direction,dot_gradient_direction] + rw [←fderiv_phase_split hg] + ring + +lemma differentiableAt_coneSpatialCoefficient {x y v e : Vec} (hxy : x≠y) : + DifferentiableAt ℝ (fun z : Phase => coneSpatialCoefficient x z.1 z.2 e) (y,v) := by + have hn : DifferentiableAt ℝ (fun z : Phase => coneDirection x z.1) (y,v) := + (differentiableAt_coneDirection hxy).comp (f:=fun z : Phase => z.1) (y,v) differentiableAt_fst + have hu : DifferentiableAt ℝ (fun z : Phase => velocity z.2) (y,v) := + (contDiff_velocity.differentiable (by simp : (∞:ℕ∞ω)≠0) v).comp + (f:=fun z : Phase => z.2) (y,v) differentiableAt_snd + have he : DifferentiableAt ℝ (fun z : Phase => dot (coneDirection x z.1) e) (y,v) := by + simpa only [dot_eq_inner] using hn.inner ℝ (differentiableAt_const e) + have hd : DifferentiableAt ℝ (fun z : Phase => 1-dot (coneDirection x z.1) (velocity z.2)) (y,v) := by + exact (differentiableAt_const (1:ℝ)).sub (by simpa only [dot_eq_inner] using hn.inner ℝ hu) + change DifferentiableAt ℝ (fun z : Phase => dot (coneDirection x z.1) e / + (1-dot (coneDirection x z.1) (velocity z.2))) (y,v) + convert he.mul (hd.inv (cone_denom_pos v (coneDirection x y) (coneDirection_norm hxy)).ne') using 1 + rfl + +lemma retarded_spatial_divergence {f : Particle} {K : Phase → Vec} {k : Phase → ℝ} + {x y v e : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius x y,y,v)) (hxy : x≠y) + (hK : DifferentiableAt ℝ K (y,v)) (hk : DifferentiableAt ℝ k (y,v)) + (heq : fderiv ℝ f (t-coneRadius x y,y,v) (1,velocity v,K (y,v))=0) : + k (y,v)*fderiv ℝ f (t-coneRadius x y,y,v) (0,e,0)= + divergence (fun z => (f (t-coneRadius x z,z,v)*k (z,v)) • coneSpatialLift x z v e) y+ + divergence (fun w => (f (t-coneRadius x y,y,w)*k (y,w)) • + (coneSpatialCoefficient x y w e • K (y,w))) v- + f (t-coneRadius x y,y,v)* + (divergence (fun z => k (z,v) • coneSpatialLift x z v e) y+ + divergence (fun w => k (y,w) • (coneSpatialCoefficient x y w e • K (y,w))) v) := by + have hi : DifferentiableAt ℝ (fun z : Phase => (t-coneRadius x z.1,z)) (y,v) := + ((differentiableAt_const t).sub + ((differentiableAt_coneRadius hxy).comp (f:=fun z : Phase => z.1) (y,v) differentiableAt_fst)).prodMk differentiableAt_id + have hg : DifferentiableAt ℝ (fun z : Phase => f (t-coneRadius x z.1,z)) (y,v) := + hf.comp (f:=fun z : Phase => (t-coneRadius x z.1,z)) (y,v) hi + have hc := differentiableAt_coneSpatialCoefficient (v:=v) (e:=e) hxy + have hu : DifferentiableAt ℝ (fun z : Phase => velocity z.2) (y,v) := + (contDiff_velocity.differentiable (by simp : (∞:ℕ∞ω)≠0) v).comp + (f:=fun z : Phase => z.2) (y,v) differentiableAt_snd + have hW : DifferentiableAt ℝ (fun z : Phase => k z • coneSpatialLift x z.1 z.2 e) (y,v) := + hk.smul ((differentiableAt_const e).add (hc.smul hu)) + have hV : DifferentiableAt ℝ (fun z : Phase => k z • + (coneSpatialCoefficient x z.1 z.2 e • K z)) (y,v) := hk.smul (hc.smul hK) + have hh := phase_divergence_split hg hW hV + dsimp only at hh + have hp : (k (y,v) • coneSpatialLift x y v e, + k (y,v) • (coneSpatialCoefficient x y v e • K (y,v))) = + k (y,v) • (coneSpatialLift x y v e,coneSpatialCoefficient x y v e • K (y,v)) := rfl + rw [hp,map_smul,retarded_spatial_division hf hxy heq] at hh + simp only [smul_eq_mul] at hh + simpa only [←smul_smul,smul_eq_mul] using (eq_sub_iff_add_eq.mpr hh.symm) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRegularity.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7644af99d65bb09d20cbdd46646f07474bd9bc6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ConeRegularity.lean @@ -0,0 +1,557 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.IntegralBallPolarFlip +import OAI.Analysis.VlasovMaxwell.Geometry.ParticleTame + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +section + +def smoothReciprocal (δ x : ℝ) : ℝ := Real.smoothTransition (2*x/δ-1)/x + +lemma smoothReciprocal_smooth {δ : ℝ} (hδ : 0 < δ) : ContDiff ℝ ∞ (smoothReciprocal δ) := by + apply contDiff_iff_contDiffAt.mpr + intro x + by_cases hx : x=0 + · subst x + apply contDiffAt_const.congr_of_eventuallyEq (f:=fun _ : ℝ => (0:ℝ)) + have hne : ∀ᶠ y : ℝ in 𝓝 0, y<δ/2 := Iio_mem_nhds (by positivity) + filter_upwards [hne] with y hy + dsimp only [smoothReciprocal] + rw [Real.smoothTransition.zero_of_nonpos,zero_div] + apply sub_nonpos.mpr + exact (div_le_iff₀ hδ).2 (by linarith) + · exact (Real.smoothTransition.contDiff.contDiffAt.comp x + ((contDiffAt_const.mul contDiffAt_id).div_const δ |>.sub contDiffAt_const)).div contDiffAt_id hx + +lemma smoothReciprocal_eq {δ x : ℝ} (hδ : 0 < δ) (hx : δ ≤ x) : + smoothReciprocal δ x=x⁻¹ := by + unfold smoothReciprocal + rw [Real.smoothTransition.one_of_one_le,one_div] + apply le_sub_iff_add_le.mpr + exact (le_div_iff₀ hδ).2 (by linarith) + +lemma uniform_cone_denominator (P : ℝ) : ∃ δ : ℝ, 0 < δ ∧ ∀ n v : Vec, + ‖n‖=1 → ‖v‖ ≤ P → δ ≤ 1-dot n (velocity v) := by + let K : Set (Vec × Vec) := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + let D : Vec × Vec → ℝ := fun p => 1-dot p.1 (velocity p.2) + have hD : Continuous D := continuous_const.sub + ((contDiff_dot_pair (k:=∞)).continuous.comp (continuous_fst.prodMk ((contDiff_velocity (k:=∞)).continuous.comp continuous_snd))) + have hp (p : Vec × Vec) (hp : p∈K) : 0 (D p)⁻¹) K := hD.continuousOn.inv₀ (fun p hp' => (hp p hp').ne') + obtain ⟨C,hC⟩ := (hK.image_of_continuousOn hi).isBounded.exists_norm_le + refine ⟨(1+max C 0)⁻¹,by positivity,?_⟩ + intro n v hn hv + have hm : (n,v)∈K := ⟨by simpa only [mem_sphere,dist_zero_right] using hn, + by simpa only [mem_closedBall_zero_iff] using hv⟩ + have hpos := hp (n,v) hm + have hb := hC _ ⟨(n,v),hm,rfl⟩ + rw [Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hpos)] at hb + exact (inv_le_comm₀ (by positivity) hpos).2 (hb.trans (by linarith [le_max_left C 0])) + +def smoothNormalisedPhysical (δ : ℝ) (p : (ℝ × Vec × Vec) × (ℝ × Vec × Vec)) : Vec := + let r := p.1.1 + let n := p.1.2.1 + let u := velocity p.1.2.2 + let b := fderiv ℝ velocity p.1.2.2 (p.2.2.1+cross u p.2.2.2) + let D := 1-dot n u + let R := (smoothReciprocal δ D)^3 + (p.2.1*D) • (((1-dot u u)*R) • (n-u)+(r*R) • ((dot n b) • (n-u)-D • b)) + +lemma smoothNormalisedPhysical_smooth {δ : ℝ} (hδ : 0 < δ) : + ContDiff ℝ ∞ (smoothNormalisedPhysical δ) := by + let v : ((ℝ × Vec × Vec) × (ℝ × Vec × Vec)) → Vec := fun p => p.1.2.2 + have hv : ContDiff ℝ ∞ v := contDiff_fst.snd.snd + have hu : ContDiff ℝ ∞ (fun p => velocity (v p)) := contDiff_velocity.comp hv + have hn : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × (ℝ × Vec × Vec) => p.1.2.1) := contDiff_fst.snd.fst + have hb : ContDiff ℝ ∞ (fun p => fderiv ℝ velocity (v p) + (p.2.2.1+cross (velocity (v p)) p.2.2.2)) := + (((contDiff_velocity (k:=∞)).fderiv_right (by simp)).comp hv).clm_apply + (contDiff_snd.snd.fst.add (contDiff_cross.comp (hu.prodMk contDiff_snd.snd.snd))) + have hD : ContDiff ℝ ∞ (fun p => 1-dot p.1.2.1 (velocity (v p))) := + contDiff_const.sub (contDiff_dot_pair.comp (hn.prodMk hu)) + have hR := ((smoothReciprocal_smooth hδ).comp hD).pow 3 + exact (contDiff_snd.fst.mul hD).smul + ((((contDiff_const.sub (contDiff_dot_pair.comp (hu.prodMk hu))).mul hR).smul (hn.sub hu)).add + ((contDiff_fst.fst.mul hR).smul + (((contDiff_dot_pair.comp (hn.prodMk hb)).smul (hn.sub hu)).sub (hD.smul hb)))) + +lemma smoothNormalisedPhysical_eq {δ : ℝ} (hδ : 0 < δ) + (p : (ℝ × Vec × Vec) × (ℝ × Vec × Vec)) (hp : δ ≤ 1-dot p.1.2.1 (velocity p.1.2.2)) : + smoothNormalisedPhysical δ p=normalisedPhysicalIntegrand p := by + simp only [smoothNormalisedPhysical,smoothReciprocal_eq hδ hp,normalisedPhysicalIntegrand, + normalisedElectricKernel,div_eq_mul_inv,inv_pow] + +lemma uniform_normalised_integrand_tame (k : ℕ) (hk : 1 ≤ k) (P A : ℝ) (hA : 1 ≤ A) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ r∈Icc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → ∀ v : Vec, ‖v‖ ≤ P → + ∀ (f : Vec → ℝ) (E B : Vec → Vec), ContDiff ℝ ∞ f → ContDiff ℝ ∞ E → ContDiff ℝ ∞ B → + ∀ x, (∀ i : ℕ, i ≤ k → ‖iteratedFDeriv ℝ i f x‖ ≤ A ∧ + ‖iteratedFDeriv ℝ i E x‖ ≤ A ∧ ‖iteratedFDeriv ℝ i B x‖ ≤ A) → + ∀ H : ℝ, 0 ≤ H → ‖iteratedFDeriv ℝ (k+1) f x‖ ≤ H → + ‖iteratedFDeriv ℝ (k+1) E x‖ ≤ H → ‖iteratedFDeriv ℝ (k+1) B x‖ ≤ H → + ‖iteratedFDeriv ℝ (k+1) (fun y => normalisedPhysicalIntegrand ((r,n,v),(f y,E y,B y))) x‖ ≤ C*(1+H) := by + obtain ⟨δ,hδ,hden⟩ := uniform_cone_denominator P + let K : Set ((ℝ × Vec × Vec) × (ℝ × Vec × Vec)) := + (Icc (0:ℝ) 1 ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P) ×ˢ closedBall 0 A + have hK : IsCompact K := (isCompact_Icc.prod ((isCompact_sphere _ _).prod + (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + obtain ⟨C,hC,hcomp⟩ := tame_comp_on_compact (U:=Vec) (smoothNormalisedPhysical_smooth hδ) hK k hk A hA + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv f E B hf hE hB x hlow H hH hft hEt hBt + let a : Vec → (ℝ × Vec × Vec) × (ℝ × Vec × Vec) := fun y => ((r,n,v),(f y,E y,B y)) + have ha : ContDiff ℝ ∞ a := contDiff_const.prodMk (hf.prodMk (hE.prodMk hB)) + have harg (i : ℕ) (hi : 1 ≤ i) {D : ℝ} (hD : 0 ≤ D) + (hfD : ‖iteratedFDeriv ℝ i f x‖ ≤ D) (hED : ‖iteratedFDeriv ℝ i E x‖ ≤ D) + (hBD : ‖iteratedFDeriv ℝ i B x‖ ≤ D) : ‖iteratedFDeriv ℝ i a x‖ ≤ D := by + apply norm_iteratedFDeriv_pair_le contDiff_const (hf.prodMk (hE.prodMk hB)) + · simpa only [iteratedFDeriv_const_of_ne (by omega : i≠0),Pi.zero_apply,norm_zero] using hD + · exact norm_iteratedFDeriv_pair_le hf (hE.prodMk hB) i x hfD + (norm_iteratedFDeriv_pair_le hE hB i x hED hBD) + have hx : a x∈K := by + refine ⟨⟨hr,by simpa only [mem_sphere,dist_zero_right] using hn, + by simpa only [mem_closedBall_zero_iff] using hv⟩,?_⟩ + rw [mem_closedBall_zero_iff] + exact max_le (by simpa only [norm_iteratedFDeriv_zero] using (hlow 0 (Nat.zero_le _)).1) + (max_le (by simpa only [norm_iteratedFDeriv_zero] using (hlow 0 (Nat.zero_le _)).2.1) + (by simpa only [norm_iteratedFDeriv_zero] using (hlow 0 (Nat.zero_le _)).2.2)) + have hh := hcomp a ha x hx (fun i hi hi' => + harg i hi (zero_le_one.trans hA) (hlow i hi').1 (hlow i hi').2.1 (hlow i hi').2.2) + have he : smoothNormalisedPhysical δ ∘ a = + (fun y => normalisedPhysicalIntegrand ((r,n,v),(f y,E y,B y))) := by + funext y + exact smoothNormalisedPhysical_eq hδ (a y) (hden n v hn hv) + rw [he] at hh + exact hh.trans (mul_le_mul_of_nonneg_left (by linarith [harg (k+1) (by omega) hH hft hEt hBt]) hC) + +lemma compact_parameter_taylor + {U W Z : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] + [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {K : Set U} {S : Set W} {g : U × W → Z} + (hK : IsCompact K) (hS : IsCompact S) (hconv : Convex ℝ S) + (hg : ∀ q∈K ×ˢ S, ContDiffAt ℝ ∞ g q) : + ∃ C : ℝ, 0≤C ∧ ∀ p∈K, ∀ x∈S, + ‖fderiv ℝ (fun z => g (p,z)) x‖≤C ∧ ∀ y∈S, + ‖g (p,y)-g (p,x)-fderiv ℝ (fun z => g (p,z)) x (y-x)‖≤C*‖y-x‖^2 := by + obtain ⟨H,hH,hDl⟩ := compact_parameter_lipschitz hK hS hconv + (g:=fderiv ℝ g) (fun q hq => (hg q hq).fderiv_right (by decide)) + have hd : ContinuousOn (fderiv ℝ g) (K ×ˢ S) := + fun q hq => ((hg q hq).continuousAt_fderiv (by simp)).continuousWithinAt + obtain ⟨M,hM⟩ := ((hK.prod hS).image_of_continuousOn hd).isBounded.exists_norm_le + let C := max H (max M 0) + have hC : 0≤C := le_trans (le_max_right _ _) (le_max_right _ _) + refine ⟨C,hC,?_⟩ + intro p hp x hx + have hder (z : W) (hz : z∈S) : HasFDerivAt (fun z => g (p,z)) + ((fderiv ℝ g (p,z)).comp (ContinuousLinearMap.inr ℝ U W)) z := by + exact ((hg (p,z) ⟨hp,hz⟩).differentiableAt (by simp)).hasFDerivAt.comp z + ((hasFDerivAt_const p z).prodMk (hasFDerivAt_id z)) + have hds (a b : W) (ha : a∈S) (hb : b∈S) : + ‖fderiv ℝ (fun z => g (p,z)) b-fderiv ℝ (fun z => g (p,z)) a‖≤H*‖b-a‖ := by + rw [(hder b hb).fderiv,(hder a ha).fderiv] + apply ContinuousLinearMap.opNorm_le_bound _ (mul_nonneg hH (norm_nonneg _)) + intro v + change ‖(fderiv ℝ g (p,b)-fderiv ℝ g (p,a)) (0,v)‖≤(H*‖b-a‖)*‖v‖ + have hh := (fderiv ℝ g (p,b)-fderiv ℝ g (p,a)).le_opNorm (0,v) + simp only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg v)] at hh + exact hh.trans (mul_le_mul_of_nonneg_right (hDl p hp a ha b hb) (norm_nonneg v)) + constructor + · rw [(hder x hx).fderiv] + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro v + change ‖fderiv ℝ g (p,x) (0,v)‖≤C*‖v‖ + have hh := (fderiv ℝ g (p,x)).le_opNorm (0,v) + simp only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg v)] at hh + exact hh.trans (mul_le_mul_of_nonneg_right + ((hM _ ⟨(p,x),⟨hp,hx⟩,rfl⟩).trans (le_trans (le_max_left _ _) (le_max_right _ _))) (norm_nonneg v)) + · intro y hy + have ht := (hconv.inter (convex_closedBall x ‖y-x‖)).norm_image_sub_le_of_norm_fderiv_le' + (f:=fun z => g (p,z)) (φ:=fderiv ℝ (fun z => g (p,z)) x) (C:=H*‖y-x‖) + (fun z hz => (hder z hz.1).differentiableAt) + (fun z hz => (hds x z hx hz.1).trans (mul_le_mul_of_nonneg_left + (by simpa only [mem_closedBall,dist_eq_norm] using hz.2) hH)) + (show x∈S ∩ closedBall x ‖y-x‖ by simp [hx]) + (show y∈S ∩ closedBall x ‖y-x‖ by simpa only [mem_inter_iff,mem_closedBall,dist_eq_norm,le_refl,and_true] using hy) + exact ht.trans ((mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right + (le_max_left H (max M 0)) (norm_nonneg _)) (norm_nonneg _)).trans_eq (by ring)) + +lemma compact_parameter_curvature + {U W Z X : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + [NormedAddCommGroup W] [NormedSpace ℝ W] [NormedAddCommGroup Z] [NormedSpace ℝ Z] + [NormedAddCommGroup X] [NormedSpace ℝ X] + {K : Set U} {S : Set W} {g : U × W → Z} + (hK : IsCompact K) (hS : IsCompact S) (hconv : Convex ℝ S) + (hg : ∀ q∈K ×ˢ S, ContDiffAt ℝ ∞ g q) : + ∃ C : ℝ, 0≤C ∧ ∀ p∈K, ∀ f : X → W, (∀ x, f x∈S) → + ∀ H M : ℝ, 0≤M → CurvatureBound f H → + (∀ x y, ‖f y-f x‖≤M*‖y-x‖) → + CurvatureBound (fun x => g (p,f x)) (C*(H+2*M^2)) := by + obtain ⟨C,hC,hb⟩ := compact_parameter_taylor hK hS hconv hg + refine ⟨C,hC,?_⟩ + intro p hp f hf H M hM hc hl x v + let D := fderiv ℝ (fun z => g (p,z)) (f x) + have h₁ := (hb p hp (f x) (hf x)).2 (f (x+v)) (hf _) + have h₂ := (hb p hp (f x) (hf x)).2 (f (x-v)) (hf _) + have hpdist : ‖f (x+v)-f x‖≤M*‖v‖ := by simpa only [add_sub_cancel_left] using hl x (x+v) + have hmdist : ‖f (x-v)-f x‖≤M*‖v‖ := by simpa only [sub_sub_cancel_left,norm_neg] using hl x (x-v) + have h₁' := h₁.trans (mul_le_mul_of_nonneg_left + ((sq_le_sq₀ (norm_nonneg _) (mul_nonneg hM (norm_nonneg _))).mpr hpdist) hC) + have h₂' := h₂.trans (mul_le_mul_of_nonneg_left + ((sq_le_sq₀ (norm_nonneg _) (mul_nonneg hM (norm_nonneg _))).mpr hmdist) hC) + have hlin : ‖D (f (x+v)+f (x-v)-(2:ℝ) • f x)‖≤C*(H*‖v‖^2) := + (D.le_opNorm _).trans ((mul_le_mul_of_nonneg_right (hb p hp (f x) (hf x)).1 (norm_nonneg _)).trans + (mul_le_mul_of_nonneg_left (hc x v) hC)) + have he : g (p,f (x+v))+g (p,f (x-v))-(2:ℝ) • g (p,f x) = + (g (p,f (x+v))-g (p,f x)-D (f (x+v)-f x))+ + (g (p,f (x-v))-g (p,f x)-D (f (x-v)-f x))+ + D (f (x+v)+f (x-v)-(2:ℝ) • f x) := by + simp only [map_add,map_sub,map_smul]; module + rw [he] + exact ((norm_add_le _ _).trans (add_le_add ((norm_add_le _ _).trans (add_le_add h₁' h₂')) hlin)).trans_eq (by ring) + +lemma uniform_normalised_integrand_curvature (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a : Vec → ℝ, ∀ E B : Vec → Vec, + (∀ x, |a x|≤A ∧ ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + CurvatureBound a Hf → CurvatureBound E H → CurvatureBound B H → + (∀ x y, |a y-a x|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => normalisedPhysicalIntegrand ((r,n,v),(a x,E x,B x))) + (C*(Hf+H+2*(M+N)^2)) := by + let K : Set (ℝ × Vec × Vec) := Icc (0:ℝ) 1 ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + let S : Set (ℝ × Vec × Vec) := closedBall (0:ℝ) A ×ˢ closedBall (0:Vec) L ×ˢ closedBall (0:Vec) L + have hK : IsCompact K := isCompact_Icc.prod ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)) + have hS : IsCompact S := (isCompact_closedBall _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : Convex ℝ S := (convex_closedBall _ _).prod ((convex_closedBall _ _).prod (convex_closedBall _ _)) + obtain ⟨C,hC,hb⟩ := compact_parameter_curvature (X:=Vec) hK hS hc + (g:=normalisedPhysicalIntegrand) (fun q hq => normalisedPhysicalIntegrand_smoothAt + ((cone_denom_pos q.1.2.2 q.1.2.1 (mem_sphere_zero_iff_norm.mp hq.1.2.1)).ne')) + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL + apply hb (r,n,v) ⟨hr,mem_sphere_zero_iff_norm.mpr hn,mem_closedBall_zero_iff.mpr hv⟩ + (fun x => (a x,E x,B x)) + (fun x => ⟨by simpa only [mem_closedBall_zero_iff,Real.norm_eq_abs] using (hbnd x).1, + mem_closedBall_zero_iff.mpr (hbnd x).2.1,mem_closedBall_zero_iff.mpr (hbnd x).2.2⟩) + (Hf+H) (M+N) (add_nonneg hM hN) + · exact (ha.mono (le_add_of_nonneg_right hH)).prodMk + ((hE.mono (le_add_of_nonneg_left hHf)).prodMk (hB.mono (le_add_of_nonneg_left hHf))) + · intro x y + apply max_le + · exact (haL x y).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hN) (norm_nonneg _)) + · exact max_le (((hEBL x y).1).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hM) (norm_nonneg _))) + ((hEBL x y).2.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hM) (norm_nonneg _))) + +attribute [local instance] Measure.Subtype.measureSpace + +variable (t P : ℝ) +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) +local instance : CompactSpace (Icc (0:ℝ) t) := isCompact_iff_compactSpace.mp isCompact_Icc +local instance : CompactSpace (closedBall (0:Vec) P) := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) +local instance : IsFiniteMeasure (volume : Measure (Icc (0:ℝ) t)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_Icc.nullMeasurableSet] + exact isCompact_Icc.measure_lt_top⟩ +local instance : IsFiniteMeasure (volume : Measure (closedBall (0:Vec) P)) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + +abbrev ConeParameters := Sphere × Icc (0:ℝ) t × closedBall (0:Vec) P +abbrev coneParameterMeasure : Measure (ConeParameters t P) := sphereMeasure.prod (volume.prod volume) + +def compactPolarIntegral (G : (ℝ × Vec × Vec) × Vec → Vec) (x : Vec) : Vec := + ∫ p : ConeParameters t P, G (((p.2.1:ℝ),(p.1:Vec),(p.2.2:Vec)),x) ∂coneParameterMeasure t P + +lemma compactPolarIntegral_eq (G : (ℝ × Vec × Vec) × Vec → Vec) + (hG : Continuous G) (x : Vec) : + compactPolarIntegral t P G x = ∫ n : Sphere, ∫ r in Icc (0:ℝ) t, + ∫ v in closedBall (0:Vec) P, G ((r,n.1,v),x) ∂volume ∂volume ∂sphereMeasure := by + have hcont : Continuous (fun p : ConeParameters t P => G (((p.2.1:ℝ),(p.1:Vec),(p.2.2:Vec)),x)) := + hG.comp (((continuous_subtype_val.comp (continuous_fst.comp continuous_snd)).prodMk + ((continuous_subtype_val.comp continuous_fst).prodMk + (continuous_subtype_val.comp (continuous_snd.comp continuous_snd)))).prodMk continuous_const) + unfold compactPolarIntegral coneParameterMeasure + rw [integral_prod _ (hcont.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + apply integral_congr_ae + exact ae_of_all _ (fun n => by + have hc : Continuous (fun p : Icc (0:ℝ) t × closedBall (0:Vec) P => G (((p.1:ℝ),n.1,(p.2:Vec)),x)) := + hG.comp (((continuous_subtype_val.comp continuous_fst).prodMk + (continuous_const.prodMk (continuous_subtype_val.comp continuous_snd))).prodMk continuous_const) + try dsimp only at * + rw [integral_prod _ (μ:=volume) (ν:=volume) (hc.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + dsimp only + have hv (r : ℝ) : (∫ v : closedBall (0:Vec) P, G ((r,n.1,(v:Vec)),x)) = + ∫ v in closedBall (0:Vec) P, G ((r,n.1,v),x) := + integral_subtype measurableSet_closedBall (fun v => G ((r,n.1,v),x)) + simp_rw [hv] + exact integral_subtype measurableSet_Icc (fun r => ∫ v in closedBall (0:Vec) P, G ((r,n.1,v),x))) + +lemma compactPolarIntegral_smooth (G : (ℝ × Vec × Vec) × Vec → Vec) + (hG : ContDiff ℝ ∞ G) : ContDiff ℝ ∞ (compactPolarIntegral t P G) := by + apply contDiff_integral_smoothFamily + exact SmoothCompactFamily.ofJoint hG + ((continuous_subtype_val.comp (continuous_fst.comp continuous_snd)).prodMk + ((continuous_subtype_val.comp continuous_fst).prodMk + (continuous_subtype_val.comp (continuous_snd.comp continuous_snd)))) + +lemma compactPolarIntegral_derivative_bound (G : (ℝ × Vec × Vec) × Vec → Vec) + (hG : ContDiff ℝ ∞ G) (n : ℕ) (H : ℝ → ℝ) (hH : Continuous H) + (hb : ∀ r∈Icc (0:ℝ) t, ∀ a : Vec, ‖a‖=1 → ∀ v : Vec, ‖v‖≤P → + ∀ x, ‖iteratedFDeriv ℝ n (fun y => G ((r,a,v),y)) x‖ ≤ H r) (x : Vec) : + ‖iteratedFDeriv ℝ n (compactPolarIntegral t P G) x‖ ≤ + (4*Real.pi)*volume.real (closedBall (0:Vec) P)*(∫ r in Icc (0:ℝ) t, H r) := by + have hfamily : SmoothCompactFamily (fun p : ConeParameters t P => fun x => + G (((p.2.1:ℝ),(p.1:Vec),(p.2.2:Vec)),x)) := + SmoothCompactFamily.ofJoint hG + ((continuous_subtype_val.comp (continuous_fst.comp continuous_snd)).prodMk + ((continuous_subtype_val.comp continuous_fst).prodMk + (continuous_subtype_val.comp (continuous_snd.comp continuous_snd)))) + have hj := norm_iteratedFDeriv_integral_le (coneParameterMeasure t P) n hfamily x + have hD : Continuous (fun p : ConeParameters t P => + ‖iteratedFDeriv ℝ n (fun y => G (((p.2.1:ℝ),(p.1:Vec),(p.2.2:Vec)),y)) x‖) := + ((hfamily.2 n).comp (continuous_const.prodMk continuous_id)).norm + have hhc : Continuous (fun p : ConeParameters t P => H (p.2.1:ℝ)) := + hH.comp (continuous_subtype_val.comp (continuous_fst.comp continuous_snd)) + refine hj.trans ((integral_mono (hD.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) + (hhc.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _)) (fun p => + hb _ p.2.1.2 _ (sphere_norm p.1) _ (mem_closedBall_zero_iff.mp p.2.2.2) x)).trans_eq ?_) + unfold coneParameterMeasure + rw [integral_prod _ (hhc.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + have he : (∫ p : Icc (0:ℝ) t × closedBall (0:Vec) P, H (p.1:ℝ) ∂volume.prod volume) = + volume.real (closedBall (0:Vec) P)*(∫ r in Icc (0:ℝ) t, H r) := by + have hc : Continuous (fun p : Icc (0:ℝ) t × closedBall (0:Vec) P => H (p.1:ℝ)) := + hH.comp (continuous_subtype_val.comp continuous_fst) + try dsimp only at * + rw [integral_prod _ (μ:=volume) (ν:=volume) (hc.integrable_of_hasCompactSupport (HasCompactSupport.of_compactSpace _))] + dsimp only + simp_rw [integral_const,smul_eq_mul] + rw [integral_const_mul,integral_subtype measurableSet_Icc H] + congr 1 + exact congrArg ENNReal.toReal (Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet) + dsimp only + simp_rw [he,integral_const,smul_eq_mul,sphere_area] + ring + +end + +def normalisedRetardedExtension (δ : ℝ) (s : Solution) (t : ℝ) + (p : (ℝ × Vec × Vec) × Vec) : Vec := + smoothNormalisedPhysical δ (p.1, + (s.f (t-p.1.1,(p.2-p.1.1 • p.1.2.1,p.1.2.2)), + s.E (t-p.1.1,p.2-p.1.1 • p.1.2.1),s.B (t-p.1.1,p.2-p.1.1 • p.1.2.1))) + +lemma normalisedRetardedExtension_smooth {δ : ℝ} (hδ : 0<δ) {s : Solution} + (hf : ContDiff ℝ ∞ s.f) (hE : ContDiff ℝ ∞ s.E) (hB : ContDiff ℝ ∞ s.B) (t : ℝ) : + ContDiff ℝ ∞ (normalisedRetardedExtension δ s t) := by + have hr : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × Vec => p.1.1) := contDiff_fst.fst + have hn : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × Vec => p.1.2.1) := contDiff_fst.snd.fst + have hv : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × Vec => p.1.2.2) := contDiff_fst.snd.snd + have hx := contDiff_snd.sub (hr.smul hn) + have htime := (contDiff_const (c:=t)).sub hr + exact (smoothNormalisedPhysical_smooth hδ).comp (contDiff_fst.prodMk + ((hf.comp (htime.prodMk (hx.prodMk hv))).prodMk + ((hE.comp (htime.prodMk hx)).prodMk (hB.comp (htime.prodMk hx))))) + +lemma retardedElectricDensity_polar_integral {s : Solution} {t P δ r : ℝ} + (hδ : 0<δ) (hr : 0 ∫ z in ball (0:Vec) t, retardedElectricDensity s t x (x+z)) = + compactPolarIntegral t P (normalisedRetardedExtension δ s t) := by + funext x + rw [integral_ball_polar_flip (integrableOn_retardedElectricDensity_le + (hf.of_le (by simp)).contDiffOn (hE.of_le (by simp)).contDiffOn + (hB.of_le (by simp)).contDiffOn hc ht le_rfl x), + compactPolarIntegral_eq t P _ (normalisedRetardedExtension_smooth hδ hf hE hB t).continuous] + apply integral_congr_ae + exact ae_of_all _ (fun n => by + dsimp only + rw [integral_Icc_eq_integral_Ioo] + apply setIntegral_congr_fun measurableSet_Ioo + intro r hr + have he : x+-(r • n.1)=x-r • n.1 := by module + dsimp only + rw [he] + exact retardedElectricDensity_polar_integral hδ hr.1 hr.2.le hden hsupport x n) + +lemma crossCLM_norm_le (a : Vec) : ‖crossCLM a‖≤‖a‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg a) + exact norm_cross_le a + +lemma retardedMagneticDensity_polar_compact {s : Solution} (hf : ContDiff ℝ ∞ s.f) + (hE : ContDiff ℝ ∞ s.E) (hB : ContDiff ℝ ∞ s.B) (hc : CompactOnFiniteHorizons s) + {t P δ : ℝ} (ht : 0≤t) (hδ : 0<δ) + (hden : ∀ a v : Vec, ‖a‖=1 → ‖v‖≤P → δ≤1-dot a (velocity v)) + (hsupport : ∀ r∈Icc (0:ℝ) t, ∀ x v, P<‖v‖ → s.f (r,(x,v))=0) : + (fun x => ∫ z in ball (0:Vec) t, retardedMagneticDensity s t x (x+z)) = + compactPolarIntegral t P (fun p => cross p.1.2.1 (normalisedRetardedExtension δ s t p)) := by + have hG := normalisedRetardedExtension_smooth hδ hf hE hB t + have hGB : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × Vec => + cross p.1.2.1 (normalisedRetardedExtension δ s t p)) := contDiff_cross.comp (contDiff_fst.snd.fst.prodMk hG) + funext x + rw [integral_ball_polar_flip (integrableOn_retardedMagneticDensity_le + (hf.of_le (by simp)).contDiffOn (hE.of_le (by simp)).contDiffOn + (hB.of_le (by simp)).contDiffOn hc ht le_rfl x),compactPolarIntegral_eq t P _ hGB.continuous] + apply integral_congr_ae + exact ae_of_all _ (fun n => by + dsimp only + rw [integral_Icc_eq_integral_Ioo] + apply setIntegral_congr_fun measurableSet_Ioo + intro r hr + have he : x+-(r • n.1)=x-r • n.1 := by module + dsimp only + rw [he,retardedMagneticDensity,coneDirection_sub_smul x n hr.1,←cross_smul_right, + retardedElectricDensity_polar_integral hδ hr.1 hr.2.le hden hsupport x n] + have hint : IntegrableOn (fun v : Vec => normalisedRetardedExtension δ s t ((r,n.1,v),x)) + (closedBall (0:Vec) P) := + (hG.continuous.comp ((continuous_const.prodMk (continuous_const.prodMk continuous_id)).prodMk + continuous_const)).continuousOn.integrableOn_compact (isCompact_closedBall _ _) + exact ((crossCLM n.1).integral_comp_comm hint).symm) + +def ParticleJetBound (n : ℕ) (T A : ℝ) (f : Particle) : Prop := + ∀ t∈Icc (0:ℝ) T, ∀ i : ℕ, i≤n → ∀ z, ‖iteratedFDeriv ℝ i (fun w => f (t,w)) z‖≤A + +lemma uniform_retarded_extension_tame (k : ℕ) (hk : 1≤k) (P A : ℝ) (hA : 1≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution), ContDiff ℝ ∞ s.f → ContDiff ℝ ∞ s.E → ContDiff ℝ ∞ s.B → + ∀ δ : ℝ, 0<δ → (∀ a v : Vec, ‖a‖=1 → ‖v‖≤P → δ≤1-dot a (velocity v)) → + ∀ T : ℝ, T≤1 → ParticleJetBound k T A s.f → SpatialJetBound k T A s.E s.B → + ∀ H : ℝ → ℝ, (∀ u∈Icc (0:ℝ) T, 0≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ z, ‖iteratedFDeriv ℝ (k+1) (fun w => s.f (u,w)) z‖≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ x, ‖iteratedFDeriv ℝ (k+1) (fun y => s.E (u,y)) x‖≤H u ∧ + ‖iteratedFDeriv ℝ (k+1) (fun y => s.B (u,y)) x‖≤H u) → + ∀ t∈Icc (0:ℝ) T, ∀ r∈Icc (0:ℝ) t, ∀ a : Vec, ‖a‖=1 → ∀ v : Vec, ‖v‖≤P → + ∀ x, ‖iteratedFDeriv ℝ (k+1) (fun y => normalisedRetardedExtension δ s t ((r,a,v),y)) x‖ ≤ + C*(1+H (t-r)) := by + obtain ⟨C,hC,hkernel⟩ := uniform_normalised_integrand_tame k hk P A hA + refine ⟨C,hC,?_⟩ + intro s hf hE hB δ hδ hden T hT hfj hEBj H hH hft hEBt t ht r hr a ha v hv x + have htr : t-r∈Icc (0:ℝ) T := ⟨by linarith [hr.2],by linarith [ht.2,hr.1]⟩ + have hfs : ContDiff ℝ ∞ (fun y => s.f (t-r,(y,v))) := + hf.comp (contDiff_const.prodMk (contDiff_id.prodMk contDiff_const)) + have hEs := hE.comp ((contDiff_const (c:=t-r)).prodMk contDiff_id) + have hBs := hB.comp ((contDiff_const (c:=t-r)).prodMk contDiff_id) + have he : (fun y => normalisedRetardedExtension δ s t ((r,a,v),y)) = + (fun y => normalisedPhysicalIntegrand ((r,a,v),(s.f (t-r,(y-r • a,v)), + s.E (t-r,y-r • a),s.B (t-r,y-r • a)))) := by + funext y + exact smoothNormalisedPhysical_eq hδ _ (hden a v ha hv) + rw [he] + change ‖iteratedFDeriv ℝ (k+1) (fun y => (fun z => normalisedPhysicalIntegrand + ((r,a,v),(s.f (t-r,(z,v)),s.E (t-r,z),s.B (t-r,z)))) (y-r • a)) x‖ ≤ _ + rw [iteratedFDeriv_comp_sub (f:=fun z => normalisedPhysicalIntegrand + ((r,a,v),(s.f (t-r,(z,v)),s.E (t-r,z),s.B (t-r,z)))) (k+1) (r • a) x] + apply hkernel r ⟨hr.1,hr.2.trans (ht.2.trans hT)⟩ a ha v hv _ _ _ hfs hEs hBs (x-r • a) + · intro i hi + refine ⟨(norm_iteratedFDeriv_phase_slice (hf.comp (contDiff_const.prodMk contDiff_id)) i _ v).trans + (hfj _ htr i hi _),(hEBj _ htr _ i hi).1,(hEBj _ htr _ i hi).2⟩ + · exact hH _ htr + · exact (norm_iteratedFDeriv_phase_slice (hf.comp (contDiff_const.prodMk contDiff_id)) (k+1) _ v).trans + (hft _ htr _) + · exact (hEBt _ htr _).1 + · exact (hEBt _ htr _).2 + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma integral_Icc_sub (H : ℝ → ℝ) {t : ℝ} (ht : 0≤t) : + (∫ r in Icc (0:ℝ) t, H (t-r))=∫ r in Icc (0:ℝ) t, H r := by + rw [integral_Icc_eq_integral_Ioc,integral_Icc_eq_integral_Ioc, + ← intervalIntegral.integral_of_le ht,← intervalIntegral.integral_of_le ht, + intervalIntegral.integral_comp_sub_left] + simp only [sub_self,sub_zero] + +lemma physical_cone_derivative_tame (k : ℕ) (hk : 1≤k) (P A : ℝ) (hA : 1≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution), ContDiff ℝ ∞ s.f → ContDiff ℝ ∞ s.E → ContDiff ℝ ∞ s.B → + CompactOnFiniteHorizons s → ∀ T : ℝ, T≤1 → + (∀ u∈Icc (0:ℝ) T, ∀ y v, P<‖v‖ → s.f (u,(y,v))=0) → + ParticleJetBound k T A s.f → SpatialJetBound k T A s.E s.B → + ∀ H : ℝ → ℝ, Continuous H → (∀ u∈Icc (0:ℝ) T, 0≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ z, ‖iteratedFDeriv ℝ (k+1) (fun w => s.f (u,w)) z‖≤H u) → + (∀ u∈Icc (0:ℝ) T, ∀ x, ‖iteratedFDeriv ℝ (k+1) (fun y => s.E (u,y)) x‖≤H u ∧ + ‖iteratedFDeriv ℝ (k+1) (fun y => s.B (u,y)) x‖≤H u) → + ∀ t∈Icc (0:ℝ) T, ∀ x, + ‖iteratedFDeriv ℝ (k+1) (fun y => ∫ z in ball (0:Vec) t, + retardedElectricDensity s t y (y+z)) x‖ ≤ C*(∫ u in Icc (0:ℝ) t, 1+H u) ∧ + ‖iteratedFDeriv ℝ (k+1) (fun y => ∫ z in ball (0:Vec) t, + retardedMagneticDensity s t y (y+z)) x‖ ≤ C*(∫ u in Icc (0:ℝ) t, 1+H u) := by + obtain ⟨K,hK,hkernel⟩ := uniform_retarded_extension_tame k hk P A hA + obtain ⟨δ,hδ,hden⟩ := uniform_cone_denominator P + refine ⟨(4*Real.pi)*volume.real (closedBall (0:Vec) P)*K,by positivity,?_⟩ + intro s hf hE hB hc T hT hsupport hfj hEBj H hH hHpos hft hEBt t ht x + let G := normalisedRetardedExtension δ s t + have hG : ContDiff ℝ ∞ G := normalisedRetardedExtension_smooth hδ hf hE hB t + have hsupport' : ∀ u∈Icc (0:ℝ) t, ∀ y v, P<‖v‖ → s.f (u,(y,v))=0 := + fun u hu => hsupport u ⟨hu.1,hu.2.trans ht.2⟩ + have hGb : ∀ r∈Icc (0:ℝ) t, ∀ a : Vec, ‖a‖=1 → ∀ v : Vec, ‖v‖≤P → + ∀ y, ‖iteratedFDeriv ℝ (k+1) (fun w => G ((r,a,v),w)) y‖≤K*(1+H (t-r)) := + hkernel s hf hE hB δ hδ hden T hT hfj hEBj H hHpos hft hEBt t ht + have hHc : Continuous (fun r => K*(1+H (t-r))) := + continuous_const.mul (continuous_const.add (hH.comp (continuous_const.sub continuous_id))) + have hint : (4*Real.pi)*volume.real (closedBall (0:Vec) P)* + (∫ r in Icc (0:ℝ) t, K*(1+H (t-r))) = + (4*Real.pi)*volume.real (closedBall (0:Vec) P)*K*(∫ u in Icc (0:ℝ) t, 1+H u) := by + rw [integral_const_mul,integral_Icc_sub (fun r => 1+H r) ht.1] + ring + constructor + · rw [retardedElectricDensity_polar_compact hf hE hB hc ht.1 hδ hden hsupport'] + exact (compactPolarIntegral_derivative_bound t P G hG (k+1) _ hHc hGb x).trans_eq hint + · rw [retardedMagneticDensity_polar_compact hf hE hB hc ht.1 hδ hden hsupport'] + have hGB : ContDiff ℝ ∞ (fun p : (ℝ × Vec × Vec) × Vec => cross p.1.2.1 (G p)) := + contDiff_cross.comp (contDiff_fst.snd.fst.prodMk hG) + apply (compactPolarIntegral_derivative_bound t P _ hGB (k+1) _ hHc ?_ x).trans_eq hint + intro r hr a ha v hv y + have hs : ContDiff ℝ ∞ (fun w => G ((r,a,v),w)) := hG.comp (contDiff_const.prodMk contDiff_id) + have hb := (crossCLM a).norm_iteratedFDeriv_comp_left (x:=y) hs.contDiffAt (by exact_mod_cast le_top : ((k+1:ℕ):ℕ∞ω)≤∞) + change ‖iteratedFDeriv ℝ (k+1) ((crossCLM a) ∘ (fun w => G ((r,a,v),w))) y‖ ≤ _ + refine hb.trans ((mul_le_mul_of_nonneg_right (crossCLM_norm_le a) (norm_nonneg _)).trans ?_) + rw [ha,one_mul] + exact hGb r hr a ha v hv y + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffRateMajorant.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffRateMajorant.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8f601466e2e428a033f8964a66cb393dc952836 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffRateMajorant.lean @@ -0,0 +1,175 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.BranchCutoffStateContinuous + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def cutoffRateMajorant (r : ℝ) (a u n vy vx : Vec) : ℝ := + let ρ := (1-dot n u)/(1-dot n a) + |r| *‖vy‖+(‖coneMotion a u n‖+|r| *‖vy‖)/(2*(1-dot n u))+ + (‖coneMotion a u n‖+|r| *‖ρ • vx‖)/(2*(1-dot n a))+|ρ-1| + +lemma cutoffRateMajorant_eq {r : ℝ} (hr : 0selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY r)) σ= + branchSelectedRate s.E s.B F.flow T zX zY Q σ := hχ.deriv + have hb := selectedDyadicCutoff_uniform_log_bound hC0 hC + (fun i=>(F.actualCutoffCoordinates_contDiffAt hs zX zY hσ hne i).differentiableAt one_ne_zero) + (F.actualCutoffCoordinates_pos zX zY hσ hne) Q + rw [hχeq] at hb + have hY := ((F.ode zY σ (Ioo_subset_Icc_self hσ.1)).hasDerivAt + (Icc_mem_nhds hσ.1.1 hσ.1.2)).snd + have hX := F.retardedMomentum_hasDerivAt zX zY hσ hne + have hN := F.branchDirection_hasDerivAt zX zY hσ hne + have hR := (F.branch_differential zX zY hσ hne).2.sub (hasDerivAt_id σ) + have hsumb := physical_cutoff_coarse_rates (T:=T) + (R:=fun t=>branchTime F.flow zX zY T t-t) hn hr hY hX hN hR + change ∑ i : Fin 4,|deriv (fun r=>actualCutoffCoordinates F.flow T zX zY r i) σ / + actualCutoffCoordinates F.flow T zX zY σ i| ≤ _ at hsumb + rw [cutoffRateMajorant_eq hr] + simp only [Fintype.card_fin] at hb + have hm := mul_le_mul_of_nonneg_left (hb.trans + (mul_le_mul_of_nonneg_left hsumb (by positivity))) hr.le + rw [mul_left_comm (5^4*C)] + exact hm + +lemma retardedPrimitive_eq_inverse_smul (r : ℝ) (a u n : Vec) : + retardedPrimitive r a u n=r⁻¹ • normalisedPrimitive 1 a u n := by + simp only [retardedPrimitive,normalisedPrimitive,smul_smul,one_div,mul_inv] + +lemma cutoff_primitive_norm_bound {r c B : ℝ} (hr : 0cutoffRateMajorant (r p) (a p) (u p) (n p) (vy p) (vx p)) S := by + have hdot {f g : Q→Vec} (hf : ContinuousOn f S) (hg : ContinuousOn g S) : + ContinuousOn (fun p=>dot (f p) (g p)) S := by + simpa only [dot_eq_inner] using hf.inner hg + have hdc := (continuousOn_const (c:=(1:ℝ))).sub (hdot hn hu) + have hDc := (continuousOn_const (c:=(1:ℝ))).sub (hdot hn ha) + have hρ := hdc.div hDc hD + have hm : ContinuousOn (fun p=>coneMotion (a p) (u p) (n p)) S := + ((hρ.smul (ha.sub hn)).add hn).sub hu + exact (((hr.abs.mul hvy.norm).add + ((hm.norm.add (hr.abs.mul hvy.norm)).div (continuousOn_const.mul hdc) + (fun p hp=>mul_ne_zero (by norm_num) (hd p hp)))).add + ((hm.norm.add (hr.abs.mul (hρ.smul hvx).norm)).div (continuousOn_const.mul hDc) + (fun p hp=>mul_ne_zero (by norm_num) (hD p hp)))).add + (hρ.sub continuousOn_const).abs + +lemma EnergyPrefix.continuousOn_momentumForce {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) : + ContinuousOn (fun p : ℝ×Phase=>(lorentzField s.E s.B p).2) + (Icc 0 T ×ˢ (univ : Set Phase)) := by + have hp : Continuous (fun p : ℝ×Phase=>(p.1,p.2.1)) := continuous_fst.prodMk continuous_snd.fst + have hE : ContinuousOn (fun p : ℝ×Phase=>s.E (p.1,p.2.1)) (Icc 0 T ×ˢ (univ : Set Phase)) := + hs.E_smooth.continuousOn.comp hp.continuousOn (fun _ hp=>⟨hp.1,mem_univ _⟩) + have hB : ContinuousOn (fun p : ℝ×Phase=>s.B (p.1,p.2.1)) (Icc 0 T ×ˢ (univ : Set Phase)) := + hs.B_smooth.continuousOn.comp hp.continuousOn (fun _ hp=>⟨hp.1,mem_univ _⟩) + have hu := (contDiff_velocity (k:=1)).continuous.comp (continuous_snd.snd : Continuous (fun p : ℝ×Phase=>p.2.2)) + exact hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.continuousOn.prodMk hB)) + +def normalisedCutoffPrimitive (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (K : ℝ) (p : ConeKernelState) : Vec := + (K*cutoffRateMajorant (p.1.1-p.1.2) (velocity (α zX p.1.1).2) (velocity p.2.2.2) p.2.1 + (lorentzField s.E s.B (p.1.2,p.2.2)).2 (lorentzField s.E s.B (p.1.1,α zX p.1.1)).2) • + normalisedPrimitive 1 (velocity (α zX p.1.1).2) (velocity p.2.2.2) p.2.1 + +lemma PhaseFlowOn.normalisedCutoffPrimitive_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (K : ℝ) : + ContinuousOn (normalisedCutoffPrimitive s F.flow zX K) (coneKernelDomain T) := by + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + have hn : Continuous (fun p : ConeKernelState=>p.2.1) := continuous_snd.fst + have hvy : ContinuousOn (fun p : ConeKernelState=>(lorentzField s.E s.B (p.1.2,p.2.2)).2) + (coneKernelDomain T) := hs.continuousOn_momentumForce.comp + (continuous_fst.snd.prodMk continuous_snd.snd).continuousOn (fun _ hp=>⟨hp.1.2,mem_univ _⟩) + have hvx : ContinuousOn (fun p : ConeKernelState=>(lorentzField s.E s.B (p.1.1,F.flow zX p.1.1)).2) + (coneKernelDomain T) := (F.momentumForce_continuousOn_closed hs zX).comp + continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1) + have hd : ∀p∈coneKernelDomain T,1-dot p.2.1 (velocity p.2.2.2)≠0 := fun p hp=> + (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + have hD : ∀p∈coneKernelDomain T,1-dot p.2.1 (velocity (F.flow zX p.1.1).2)≠0 := fun p hp=> + (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + exact (continuousOn_const.mul (continuousOn_cutoffRateMajorant + (continuous_fst.fst.sub continuous_fst.snd).continuousOn ha hu.continuousOn hn.continuousOn hvy hvx hd hD)).smul + (continuousOn_normalisedPrimitive continuousOn_const ha hu.continuousOn hn.continuousOn hd hD) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffSourceTangent.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffSourceTangent.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7cd34dfadbcbd0a5545bb018a2736f016f1010f --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/CutoffSourceTangent.lean @@ -0,0 +1,825 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.RetardedMomentumForce + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped ENNReal Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma contDiffAt_physicalCutoffCoordinates {T : ℝ} {z : CutoffState} + (_hr : 0 + physicalCutoffCoordinates T z.1 z.2.1 z.2.2.1 z.2.2.2) z := by + apply contDiffAt_pi.mpr + intro i + have hv : ContDiffAt ℝ ∞ (fun z : CutoffState=>velocity z.2.2.1) z := + (contDiff_velocity (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.fst + have hw : ContDiffAt ℝ ∞ (fun z : CutoffState=>velocity z.2.2.2) z := + (contDiff_velocity (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.snd + have hd := (contDiffAt_const (c:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=∞)).contDiffAt.comp z (contDiffAt_id.snd.fst.prodMk hv)) + have hD := (contDiffAt_const (c:=(1:ℝ))).sub + ((contDiff_dot_pair (k:=∞)).contDiffAt.comp z (contDiffAt_id.snd.fst.prodMk hw)) + fin_cases i <;> simp only [physicalCutoffCoordinates] + · exact contDiffAt_const.div ((contDiff_q (k:=∞)).contDiffAt.comp z contDiffAt_id.snd.snd.fst) (q_pos _).ne' + · exact (hd.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hn) (by norm_num)).ne' + · exact (hD.div_const 2).sqrt (div_pos (cone_denom_pos _ _ hn) (by norm_num)).ne' + · exact contDiffAt_id.fst.div_const _ + +lemma hasDerivAt_cutoffRay (z h : CutoffState) : + HasDerivAt (fun s : ℝ => z+s • h) h 0 := by + have hh := (hasDerivAt_const (0:ℝ) z).add ((hasDerivAt_id (0:ℝ)).smul_const h) + change HasDerivAt (fun s : ℝ=>z+s • h) (0+(1:ℝ) • h) 0 at hh + simpa only [zero_add,one_smul] using hh + +lemma stateCutoff_ray_deriv {T : ℝ} {z : CutoffState} (Q : Set (Fin 4→ℕ)) + (hr : 0stateCutoff T Q (z+s • h)) 0 = + fderiv ℝ (stateCutoff T Q) z h := by + have hd := ((contDiffAt_stateCutoff T Q hr hn).differentiableAt (by simp)).hasFDerivAt + have hd' : HasFDerivAt (stateCutoff T Q) (fderiv ℝ (stateCutoff T Q) z) (z+(0:ℝ) • h) := by + simpa only [zero_smul,add_zero] using hd + exact (hd'.comp_hasDerivAt 0 (hasDerivAt_cutoffRay z h)).deriv + +lemma stateCutoff_partial_cancel {T : ℝ} {z : CutoffState} (Q : Set (Fin 4→ℕ)) + (hr : 0 + physicalCutoffCoordinates T (z+s • h).1 (z+s • h).2.1 (z+s • h).2.2.1 (z+s • h).2.2.2 i + have hg : ∀i,DifferentiableAt ℝ (g i) 0 := by + intro i + have hc := (contDiffAt_physicalCutoffCoordinates (T:=T) hr hn).differentiableAt (by simp) + have hc' : DifferentiableAt ℝ (fun z : CutoffState=> + physicalCutoffCoordinates T z.1 z.2.1 z.2.2.1 z.2.2.2) (z+(0:ℝ) • h) := by + simpa only [zero_smul,add_zero] using hc + exact differentiableAt_pi.mp (hc'.comp (f:=fun s : ℝ=>z+s • h) 0 (hasDerivAt_cutoffRay z h).differentiableAt) i + have hp : ∀i,0stateCutoff T Q (z+s • h)) 0 = -deriv (fun s=>stateCutoff T Qᶜ (z+s • h)) 0 at hh + simpa only [stateCutoff_ray_deriv Q hr hn h,stateCutoff_ray_deriv Qᶜ hr hn h] using hh + +lemma stateCutoff_partial_boundary {T : ℝ} {z : CutoffState} (Q : Set (Fin 4→ℕ)) + (hr : 0 + physicalCutoffCoordinates T (z+s • h).1 (z+s • h).2.1 (z+s • h).2.2.1 (z+s • h).2.2.2 i + have hg : ∀i,DifferentiableAt ℝ (g i) 0 := by + intro i + have hc := (contDiffAt_physicalCutoffCoordinates (T:=T) hr hn).differentiableAt (by simp) + have hc' : DifferentiableAt ℝ (fun z : CutoffState=> + physicalCutoffCoordinates T z.1 z.2.1 z.2.2.1 z.2.2.2) (z+(0:ℝ) • h) := by + simpa only [zero_smul,add_zero] using hc + exact differentiableAt_pi.mp (hc'.comp (f:=fun s : ℝ=>z+s • h) 0 (hasDerivAt_cutoffRay z h).differentiableAt) i + have hp : ∀i,0selectedDyadicCutoff Q (fun i=>g i s)) 0≠0 := by + change deriv (fun s=>stateCutoff T Q (z+s • h)) 0≠0 + rwa [stateCutoff_ray_deriv Q hr hn h] + simpa only [g,zero_smul,add_zero] using selectedDyadicCutoff_derivative_boundary hg hp h1 Q hd + +def cutoffSourceTangent (K : Vec) : CutoffState := (0,0,K,0) +def cutoffGeometryTangent (r ρ : ℝ) (a u n : Vec) : CutoffState := + (ρ-1,r⁻¹ • coneMotion a u n,0,0) +def cutoffReceiverTangent (ρ : ℝ) (K : Vec) : CutoffState := (0,0,0,ρ • K) + +lemma branchCutoffStateRate_split (E B : Field) (α : Phase→ℝ→Phase) + (T : ℝ) (zX zY : Phase) (σ : ℝ) : + branchCutoffStateRate E B α T zX zY σ = + cutoffSourceTangent (lorentzField E B (σ,α zY σ)).2 + + cutoffGeometryTangent (branchTime α zX zY T σ-σ) (branchRate α zX zY T σ) + (velocity (α zX (branchTime α zX zY T σ)).2) (velocity (α zY σ).2) + (branchDirection α zX zY T σ) + + cutoffReceiverTangent (branchRate α zX zY T σ) + (lorentzField E B (branchTime α zX zY T σ,α zX (branchTime α zX zY T σ))).2 := by + simp only [branchCutoffStateRate,cutoffSourceTangent,cutoffGeometryTangent, + cutoffReceiverTangent,Prod.mk_add_mk,zero_add,add_zero] + +lemma branchSelectedRate_split (E B : Field) (α : Phase→ℝ→Phase) + (T : ℝ) (zX zY : Phase) (σ : ℝ) (Q : Set (Fin 4→ℕ)) : + branchSelectedRate E B α T zX zY Q σ = + fderiv ℝ (stateCutoff T Q) (branchCutoffState α T zX zY σ) + (cutoffSourceTangent (lorentzField E B (σ,α zY σ)).2) + + fderiv ℝ (stateCutoff T Q) (branchCutoffState α T zX zY σ) + (cutoffGeometryTangent (branchTime α zX zY T σ-σ) (branchRate α zX zY T σ) + (velocity (α zX (branchTime α zX zY T σ)).2) (velocity (α zY σ).2) + (branchDirection α zX zY T σ)) + + fderiv ℝ (stateCutoff T Q) (branchCutoffState α T zX zY σ) + (cutoffReceiverTangent (branchRate α zX zY T σ) + (lorentzField E B (branchTime α zX zY T σ,α zX (branchTime α zX zY T σ))).2) := by + rw [branchSelectedRate,branchCutoffStateRate_split,map_add,map_add] + +lemma stateCutoff_partial_cancel_smul {T : ℝ} {z : CutoffState} (Q : Set (Fin 4→ℕ)) + (hr : 0physicalCutoffCoordinates T + (z s).1 (z s).2.1 (z s).2.2.1 (z s).2.2.2 i) t / + physicalCutoffCoordinates T (z t).1 (z t).2.1 (z t).2.2.1 (z t).2.2.2 i| := by + have hd := ((contDiffAt_stateCutoff T Q hr hn).differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t hz + rw [←hd.deriv] + change |deriv (fun s=>selectedDyadicCutoff Q (physicalCutoffCoordinates T + (z s).1 (z s).2.1 (z s).2.2.1 (z s).2.2.2)) t| ≤ _ + have hc := (contDiffAt_physicalCutoffCoordinates (T:=T) hr hn).differentiableAt (by simp) + have hh := selectedDyadicCutoff_uniform_log_bound hC0 hC + (fun i=>differentiableAt_pi.mp (hc.comp t hz.differentiableAt) i) + (physicalCutoffCoordinates_pos (T:=T) hn hr) Q + simpa only [stateCutoff,Function.comp_apply,Fintype.card_fin,show (5:ℝ)^4=625 by norm_num] using hh + +lemma stateCutoff_source_bound {C T r : ℝ} {n v w E B : Vec} + (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (hr : 0v+t • (E+cross (velocity v) B) + have hV : HasDerivAt V (E+cross (velocity v) B) 0 := hasDerivAt_line_rvm v _ + have hv0 : V 0=v := by simp [V] + have hz : HasDerivAt (fun t : ℝ=>(r,n,V t,w)) + (cutoffSourceTangent (E+cross (velocity v) B)) 0 := + (hasDerivAt_const 0 r).prodMk ((hasDerivAt_const 0 n).prodMk (hV.prodMk (hasDerivAt_const 0 w))) + have hb := stateCutoff_curve_log_bound (T:=T) hC0 hC hz hr hn Q + have hs := source_cutoff_logarithmic_rates (hV.congr_deriv (by rw [hv0])) hn + simp only [hv0] at hb hs + apply hb.trans + apply mul_le_mul_of_nonneg_left _ (by positivity) + simpa only [Fin.sum_univ_succ,Fin.isValue,physicalCutoffCoordinates, + Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.sum_univ_zero,add_zero, + deriv_const,zero_div,abs_zero] using hs + +lemma stateCutoff_geometry_bound {C T r : ℝ} {n v w : Vec} + (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (hr : 0n+s • M + let R : ℝ→ℝ := fun s=>r+s*(d/D-1) + have hN : HasDerivAt N M 0 := hasDerivAt_line_rvm n M + have hR : HasDerivAt R (d/D-1) 0 := by + convert (hasDerivAt_const (0:ℝ) r).add ((hasDerivAt_id (0:ℝ)).mul_const (d/D-1)) using 1 <;> + first | rfl | simp only [zero_add,one_mul] + have hn0 : N 0=n := by simp [N] + have hr0 : R 0=r := by simp [R] + have hz : HasDerivAt (fun s : ℝ=>(R s,N s,v,w)) + (cutoffGeometryTangent r (d/D) (velocity w) (velocity v) n) 0 := + hR.prodMk (hN.prodMk ((hasDerivAt_const 0 v).prodMk (hasDerivAt_const 0 w))) + have hb := stateCutoff_curve_log_bound (T:=T) hC0 hC hz (by rwa [hr0]) (by rwa [hn0]) Q + simp only [hr0,hn0] at hb + apply hb.trans + apply mul_le_mul_of_nonneg_left _ (by positivity) + have hd : HasDerivAt (fun s=>1-dot (N s) (velocity v)) (-dot M (velocity v)) 0 := by + have hh := (hasDerivAt_const (0:ℝ) (1:ℝ)).sub (hasDerivAt_dot hN (hasDerivAt_const 0 (velocity v))) + convert hh using 1; first | rfl | simp only [dot_zero_right_rvm,zero_add,zero_sub] + have hD : HasDerivAt (fun s=>1-dot (N s) (velocity w)) (-dot M (velocity w)) 0 := by + have hh := (hasDerivAt_const (0:ℝ) (1:ℝ)).sub (hasDerivAt_dot hN (hasDerivAt_const 0 (velocity w))) + convert hh using 1; first | rfl | simp only [dot_zero_right_rvm,zero_add,zero_sub] + have hed := angularCoordinate_log_deriv hd (by rw [hn0]; exact cone_denom_pos _ _ hn) + have heD := angularCoordinate_log_deriv hD (by rw [hn0]; exact cone_denom_pos _ _ hn) + have her : deriv (fun s=>R s/max 1 T) 0/(r/max 1 T)=(d/D-1)/r := by + rw [(hR.div_const (max 1 T)).deriv] + have hm : max 1 T≠0 := (lt_of_lt_of_le (by norm_num : (0:ℝ)<1) (le_max_left _ _)).ne' + field_simp + simp only [hn0] at hed heD + simp only [Fin.sum_univ_succ,Fin.isValue,physicalCutoffCoordinates, + Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.sum_univ_zero,add_zero, + deriv_const,zero_div,abs_zero,zero_add] + rw [hed,heD,her] + simp only [neg_div,abs_neg] + have hh := geometric_cutoff_logarithmic_rates (v:=v) (w:=w) hn hr hsmall + dsimp only at hh + dsimp only [d,D,M] + linarith + +lemma stateCutoff_receiver_bound {C T r : ℝ} {n v w K : Vec} + (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (hr : 0w+s • ((d/D) • K) + have hW : HasDerivAt W ((d/D) • K) 0 := hasDerivAt_line_rvm w _ + have hw0 : W 0=w := by simp [W] + have hz : HasDerivAt (fun s : ℝ=>(r,n,v,W s)) (cutoffReceiverTangent (d/D) K) 0 := + (hasDerivAt_const 0 r).prodMk ((hasDerivAt_const 0 n).prodMk ((hasDerivAt_const 0 v).prodMk hW)) + have hb := stateCutoff_curve_log_bound (T:=T) hC0 hC hz hr hn Q + simp only [hw0] at hb + apply hb.trans + apply mul_le_mul_of_nonneg_left _ (by positivity) + have ha : HasDerivAt (fun s=>velocity (W s)) ((d/D) • fderiv ℝ velocity w K) 0 := by + have hv : HasFDerivAt velocity (fderiv ℝ velocity w) (W 0) := by + rw [hw0] + exact ((contDiff_velocity (k:=1)).differentiable one_ne_zero w).hasFDerivAt + convert hv.comp_hasDerivAt 0 hW using 1 <;> first | rfl | simp only [map_smul] + have hD : HasDerivAt (fun s=>1-dot n (velocity (W s))) + (-(d/D)*dot n (fderiv ℝ velocity w K)) 0 := by + have hh := (hasDerivAt_const (0:ℝ) (1:ℝ)).sub (hasDerivAt_dot (hasDerivAt_const 0 n) ha) + convert hh using 1; first | rfl | simp only [dot_zero_left_rvm,add_zero,dot_smul_right,zero_sub,neg_mul] + have heD := angularCoordinate_log_deriv hD (by rw [hw0]; exact cone_denom_pos _ _ hn) + simp only [hw0] at heD + simp only [Fin.sum_univ_succ,Fin.isValue,physicalCutoffCoordinates, + Matrix.cons_val_zero,Matrix.cons_val_succ,Fin.sum_univ_zero,add_zero, + deriv_const,zero_div,abs_zero,zero_add] + rw [heD] + simpa only [neg_mul,neg_div,abs_neg,mul_comm] using receiver_cutoff_logarithmic_rate v w K n hn + +def partialCutoffLabelCost (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (H : ℝ×Phase→CutoffState) (p : ℝ×Phase) : Vec := + (jointBranchDomain α zX T).indicator + (fun p=>fderiv ℝ (stateCutoff T Q) (branchCutoffState α T zX p.2 p.1) (H p)) p • + actualLabelPrimitive s α zX T p + +lemma actualLabelCutoffCost_split (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (Q : Set (Fin 4→ℕ)) (p : ℝ×Phase) : + actualLabelCutoffCost s α zX T Q p = + partialCutoffLabelCost s α zX T Q + (fun p=>cutoffSourceTangent (lorentzField s.E s.B (p.1,α p.2 p.1)).2) p + + partialCutoffLabelCost s α zX T Q + (fun p=>cutoffGeometryTangent (branchTime α zX p.2 T p.1-p.1) (branchRate α zX p.2 T p.1) + (velocity (α zX (branchTime α zX p.2 T p.1)).2) (velocity (α p.2 p.1).2) + (branchDirection α zX p.2 T p.1)) p + + partialCutoffLabelCost s α zX T Q + (fun p=>cutoffReceiverTangent (branchRate α zX p.2 T p.1) + (lorentzField s.E s.B (branchTime α zX p.2 T p.1,α zX (branchTime α zX p.2 T p.1))).2) p := by + classical + by_cases hp : p∈jointBranchDomain α zX T + · simp only [actualLabelCutoffCost,partialCutoffLabelCost,indicator_of_mem hp, + branchSelectedRate_split,add_smul] + · simp only [actualLabelCutoffCost,partialCutoffLabelCost,indicator_of_notMem hp,zero_smul,add_zero] + +lemma PhaseFlowOn.partialCutoffLabelCost_compl {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (H : ℝ×Phase→CutoffState) (p : ℝ×Phase) : + partialCutoffLabelCost s F.flow zX T Q H p = + -partialCutoffLabelCost s F.flow zX T Qᶜ H p := by + classical + by_cases hp : p∈jointBranchDomain F.flow zX T + · have ht := F.branch_time_mem zX p.2 hp.1 hp.2 + have hr : 0<(branchCutoffState F.flow T zX p.2 p.1).1 := sub_pos.mpr ht.1 + have hrT : (branchCutoffState F.flow T zX p.2 p.1).1≤ max 1 T := by + change branchTime F.flow zX p.2 T p.1-p.1≤ max 1 T + linarith [ht.2.le,hp.1.1.1,le_max_right (1:ℝ) T] + have hn : ‖(branchCutoffState F.flow T zX p.2 p.1).2.1‖=1 := F.branchDirection_norm zX p.2 hp.1 hp.2 + simp only [partialCutoffLabelCost,indicator_of_mem hp] + rw [stateCutoff_partial_cancel Q hr hrT hn (H p),neg_smul] + · simp only [partialCutoffLabelCost,indicator_of_notMem hp,zero_smul,neg_zero] + +lemma PhaseFlowOn.partialCutoffLabelCost_boundary {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (H : ℝ×Phase→CutoffState) {p : ℝ×Phase} + (hne : partialCutoffLabelCost s F.flow zX T Q H p≠0) : + ∃j∈Q,∃k∉Q,0x i) (fun _=>continuousAt_const) hp Q + have hh := he.eq_of_nhds + change selectedDyadicCutoff Q x=∑k∈selectedDyadicBox N Q,dyadicMultiFactor k x at hh + rw [hh] + calc + _ = ∑k∈dyadicBox ι N,dyadicMultiFactor k x := by + apply Finset.sum_subset (Finset.filter_subset _ _) + intro k hk hkn + apply le_antisymm _ (dyadicMultiFactor_nonneg _ _) + by_contra hh + exact hkn (Finset.mem_filter.mpr ⟨hk,hQ k (lt_of_not_ge hh)⟩) + _ = 1 := sum_dyadicMultiFactor_eq_one N x h1 hN + +lemma stateCutoff_partial_boundary_localization {T : ℝ} {z : CutoffState} + (Q : Set (Fin 4→ℕ)) (hr : 0 rw [he] + · simp only [partialCutoffLabelCost,indicator_of_notMem hp,zero_smul,smul_zero] + +end RVM + +end + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma projected_receiver_cutoff_bin_cost {A T r f w θ φ : ℝ} {n v W K : Vec} + (hA0 : 0 ≤ A) (hA : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x| ≤ A) + (hn : ‖n‖=1) (hw : 0hs.nonnegative _ hzT _) Q + rw [ENNReal.ofReal_mul (by positivity : 0 ≤ 125440000*A*θ/(w*φ))] at hk + convert hk using 1; ac_rfl + _ = ENNReal.ofReal (125440000*A*θ/(w*φ))* + (∫⁻z : ConeCoordinate,ENNReal.ofReal ‖K z.1‖*ENNReal.ofReal (z.1-z.2.1)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B J) := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + _ ≤ ENNReal.ofReal (125440000*A*θ/(w*φ))*((∫⁻t in J,ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin))) := mul_le_mul' le_rfl hb + _ = _ := by + have he : (125440000*49152)*A*C*(p*θ)^3*φ/w*B.rmax*(B.rmax-B.rmin)= + (125440000*A*θ/(w*φ))*(49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin)) := by + field_simp + rw [he,ENNReal.ofReal_mul (by positivity : 0 ≤ 125440000*A*θ/(w*φ))] + ac_rfl + · have he : physicalBinBase V B J=∅ := by + apply eq_empty_iff_forall_notMem.mpr + intro z hz + exact hwidth (hz.2.2.1.1.trans hz.2.2.1.2) + simp only [physicalBinMeasure,he,Measure.restrict_empty,lintegral_zero_measure] + exact bot_le + +lemma Admissible.receiver_cutoff_near_constant {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (_F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(X V K : ℝ→Vec) (B : ClosedConeBin) (J : Set ℝ) (w p θ φ : ℝ) + (Q : Set (Fin 4→ℕ)), + Measurable V → Measurable K → MeasurableSet J → J⊆Icc 0 T → + 0(hb s T F hs h0 z.2.1 ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _).2) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma unprojected_physical_small_primitive {v W n : Vec} + (hn : ‖n‖=1) (hsmall : 1-dot n (velocity v)≤1-dot n (velocity W)) : + ‖signedPrimitive (velocity W) (velocity v) n‖ ≤ + 52*Real.sqrt ((1-dot n (velocity v))/2)/Real.sqrt ((1-dot n (velocity W))/2) := by + let θ := Real.sqrt ((1-dot n (velocity v))/2) + let φ := Real.sqrt ((1-dot n (velocity W))/2) + have hd := cone_denom_pos v n hn + have hD := cone_denom_pos W n hn + have hθ : 0<θ := Real.sqrt_pos.mpr (by positivity) + have hφ : 0<φ := Real.sqrt_pos.mpr (by positivity) + have hθsq : θ^2=(1-dot n (velocity v))/2 := Real.sq_sqrt (by positivity) + have hφsq : φ^2=(1-dot n (velocity W))/2 := Real.sq_sqrt (by positivity) + have hφ1 : φ≤1 := (Real.sqrt_le_iff).mpr ⟨by norm_num,by nlinarith [cone_denom_le_two W n hn]⟩ + have hθφ : θ≤φ := Real.sqrt_le_sqrt (by linarith) + have hun : ‖velocity v-n‖≤4*θ := by + apply norm_sub_le_of_deficit (norm_velocity_lt_one _).le hn.le (by positivity) + rw [dot_comm] + nlinarith + have han : ‖velocity W-n‖≤4*φ := by + apply norm_sub_le_of_deficit (norm_velocity_lt_one _).le hn.le (by positivity) + rw [dot_comm] + nlinarith + have he := small_deficit_difference hn hθ.le hφ.le hθφ hd.le (by nlinarith) hun han + exact small_primitive_norm hn hθ.le hφ hφ1 (by nlinarith) hun he + +lemma unprojected_physical_cutoff_cost {v W n : Vec} {r f c L : ℝ} + (hn : ‖n‖=1) (hr : 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun np nt nf j nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + (∑np∈Finset.range N,∑nf∈Finset.range N,∑nt∈Finset.range N,∑j∈Finset.range N, + if sourceRepresentative np≤128*P ∧ cappedRepresentative nf≤16*cappedRepresentative nt ∧ + (cappedRepresentative j*sourceRepresentative np≤512 ∨ cappedRepresentative j*w≤32) then + ∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B np nt nf j nr) z + ∂physicalBinMeasure V (B np nt nf j nr) (Icc a b) else 0 else 0)≤ + ENNReal.ofReal (C*K^4*(P*Real.sqrt I)) := by + obtain ⟨Cg,Cb,hCg,hCb,hbin⟩ := hd.direct_source_deficit_short_sum + let E := datumEnergyNumber d + let D := (256*relativeCauchyConstant Cg E (20*E)+relativeCauchyConstant Cb E (120*E))*16777216* + (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ + have hD : 0≤D := mul_nonneg (mul_nonneg (add_nonneg + (mul_nonneg (by norm_num) (relativeCauchyConstant_nonneg hCg)) + (relativeCauchyConstant_nonneg hCb)) (by norm_num)) shortSqrtConstant_pos.le + refine ⟨768*D,by positivity,?_⟩ + intro s T F hs hT zX S a b I w P K N hS hS0 ha hb hJI hI hI1 hw hP hIP hK hN + dsimp only + have hlog : 0≤Real.log (2+P) := Real.log_nonneg (by linarith) + calc + _≤∑np∈Finset.range N,∑nf∈Finset.range N,∑nt∈Finset.range N,∑j∈Finset.range N, + ENNReal.ofReal (D*Real.sqrt I) := by + apply Finset.sum_le_sum + intro np hnp + apply Finset.sum_le_sum + intro nf hnf + apply Finset.sum_le_sum + intro nt hnt + apply Finset.sum_le_sum + intro j hj + split_ifs with hsector + · have hh := hbin s T F hs.energyPrefix hT hs.initial_f zX S np nt nf j a b I w P + hS hS0 ha hb hJI hI hI1 hw (zero_lt_one.trans_le hP) hsector.1 hIP hsector.2.1 hsector.2.2 + dsimp only at hh + rw [hs.initial_energy_eq] at hh + exact hh + · exact bot_le + _=(N:ℝ≥0∞)^4*ENNReal.ofReal (D*Real.sqrt I) := by simp only [Finset.sum_const,Finset.card_range,nsmul_eq_mul]; ring + _≤ENNReal.ofReal (K^4*(Real.log (2+P))^4*(D*Real.sqrt I)) := + ennreal_count_four_bound hK hlog hN (D*Real.sqrt I) + _≤_ := by + apply ENNReal.ofReal_le_ofReal + calc + _≤K^4*(768*P)*(D*Real.sqrt I) := by gcongr; exact log_four_le_linear hP + _=_ := by ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectForce.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectForce.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9700726449a8021023ee198a4e2ea1fab120401 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectForce.lean @@ -0,0 +1,1008 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.PhysicalBinPhaseSet +import OAI.Analysis.VlasovMaxwell.Population.RepresentativeClosedBinSourceIndices +import OAI.Analysis.VlasovMaxwell.Retarded.GeneralDirectRadial + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_transport_radius_near {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (C*I*r*p*(min θ σ)^2*φ^2*(θ+φ)/θ^3) := by + obtain ⟨Cρ,hCρ,hρ⟩ := hd₀.uniform_physicalBinDensity_constant + refine ⟨154618822656*Cρ,by positivity,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hp : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*max 1 T*w) := by + obtain ⟨C,hC,hnear⟩ := hd₀.direct_transport_radius_near + refine ⟨4352*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hw hP hwP hIw hpP hφθ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + have hp : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → 1≤w → 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*max 1 T*w^2) := by + obtain ⟨C,hC,hnear⟩ := hd₀.direct_transport_radius_near + refine ⟨33024*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hw hP hwP hIw hpP hpθ + dsimp only + have hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → 1≤w → 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*max 1 T*w^2) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_transport_all_radii_consistent + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hw hP hwP hIw hpP + dsimp only + by_cases hgeometry : 1≤ sourceRepresentative np*cappedRepresentative nθ + · exact hbound s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hw hP hwP hIw hpP hgeometry + · have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hz (nr : ℕ) : (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) (Icc a b))=0 := by + exact physicalDirectTransport_integral_geometry_zero s hV measurableSet_Icc hgeometry + simp_rw [hz,tsum_zero] + exact bot_le + +lemma exists_dyadicFactor_positive {x : ℝ} (hx : 0exists_dyadicFactor_positive (hx i) (hx1 i) + exact ⟨k,Finset.prod_pos (fun i _=>hk i)⟩ + +abbrev DirectOuterIndex (N : ℕ) := Fin 4→Fin N + +def directOuterBin {N : ℕ} (T w : ℝ) (i : DirectOuterIndex N) (nr : ℕ) : ClosedConeBin := + relativeRepresentativeClosedBin T w ![(i 0).val,(i 1).val,(i 2).val,nr] (i 3).val + +lemma physical_direct_finite_cover {T w P t σ : ℝ} {V : ℝ→Vec} {J : Set ℝ} + {N : ℕ} (hP : 0≤P) (hwP : w≤P) (hN : 8192*P≤(2:ℝ)^N) + (ht : t∈J) (htT : t≤T) (hσ : σ∈Ico 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) (n : Sphere) (v : Vec) (hq : q v≤P) : + ∃i : DirectOuterIndex N, ∃nr : ℕ, + sourceRepresentative (i 0).val≤128*P ∧ + (t,σ,n)∈physicalBinBase V (directOuterBin T w i nr) J ∧ + v∈coneBinMomentumSet (directOuterBin T w i nr) n.1 (velocity (V t)) := by + have hr : 0 rfl + have hmem := relativePhysicalFactor_positive_closedBin ht ⟨hσ.1,hσ.2.le⟩ hband hrel + refine ⟨i,k 3,?_,?_,?_⟩ + · have hlo : sourceRepresentative (k 0)/128≤q v := hmem.2.1.1 + change sourceRepresentative (k 0)≤128*P + linarith only [hlo,hq] + · simpa only [directOuterBin,he,show (i 3).val=j from rfl] using hmem.1 + · simpa only [directOuterBin,he,show (i 3).val=j from rfl] using hmem.2 + +lemma physicalBinFamily_cover_lintegral {ι : Type*} [Countable ι] + {V : ℝ→Vec} (hV : Measurable V) {J : Set ℝ} (hJ : MeasurableSet J) + (B : ι→ClosedConeBin) (R : Set ι) {g : TrianglePhase→ℝ≥0∞} (hg : Measurable g) + (hcover : ∀p,g p≠0→∃i∈R,p∈physicalBinPhaseSet V (B i) J) : + (∫⁻p,g p ∂trianglePhaseMeasure)≤ + ∑'i : ι,R.indicator (fun i=> + ∫⁻z : ConeCoordinate,∫⁻v in coneBinMomentumSet (B i) z.2.2.1 (velocity (V z.1)), + g (z,v) ∂volume ∂physicalBinMeasure V (B i) J) i := by + classical + let f : ι→TrianglePhase→ℝ≥0∞ := fun i=> + if i∈R then (physicalBinPhaseSet V (B i) J).indicator g else 0 + have hm (i : ι) : Measurable (f i) := by + dsimp only [f] + split_ifs + · exact hg.indicator (measurableSet_physicalBinPhaseSet hV _ hJ) + · exact measurable_const + calc + _ ≤ ∫⁻p,∑'i : ι,f i p ∂trianglePhaseMeasure := by + apply lintegral_mono + intro p + by_cases hp : g p=0 + · rw [hp]; exact bot_le + · obtain ⟨i,hi,hpi⟩ := hcover p hp + calc + _ = f i p := by simp only [f,ite_eq_left hi,indicator_of_mem hpi] + _ ≤ _ := ENNReal.le_tsum (f := fun index => f index p) i + _ = ∑'i : ι,∫⁻p,f i p ∂trianglePhaseMeasure := lintegral_tsum (fun i=>(hm i).aemeasurable) + _ = _ := by + apply tsum_congr + intro i + by_cases hi : i∈R + · simp only [f,ite_eq_left hi,indicator_of_mem hi] + rw [lintegral_indicator (measurableSet_physicalBinPhaseSet hV _ hJ),physicalBinPhase_integral hV _ hJ hg] + · simp only [f,ite_eq_right hi,Pi.zero_apply,lintegral_zero,indicator_of_notMem hi] + +lemma directOuter_card (N : ℕ) : Fintype.card (DirectOuterIndex N)=N^4 := by + simp [DirectOuterIndex, Fintype.card_pi] + +lemma directOuter_family_sum_bound {N : ℕ} {P : ℝ} + (f : DirectOuterIndex N→ℕ→ℝ≥0∞) (C : ℝ≥0∞) + (hf : ∀i,sourceRepresentative (i 0).val≤128*P→(∑'nr,f i nr)≤C) : + (∑'i : DirectOuterIndex N×ℕ, + {i : DirectOuterIndex N×ℕ | sourceRepresentative (i.1 0).val≤128*P}.indicator + (fun i=>f i.1 i.2) i) ≤ (N:ℝ≥0∞)^4*C := by + classical + rw [ENNReal.tsum_prod'] + calc + _ ≤ ∑'i : DirectOuterIndex N,C := by + apply ENNReal.tsum_le_tsum + intro i + change (∑'nr,if sourceRepresentative (i 0).val≤128*P then f i nr else 0)≤C + by_cases hi : sourceRepresentative (i 0).val≤128*P + · simpa only [ite_eq_left hi] using hf i hi + · simp only [ite_eq_right hi,tsum_zero] + exact bot_le + _ = _ := by simp [tsum_fintype,nsmul_eq_mul] + +def directTriangleDomain (T : ℝ) (J : Set ℝ) : Set TrianglePhase := + trianglePhaseDomain T ∩ {p | p.1.1∈J} + +lemma measurableSet_directTriangleDomain (T : ℝ) {J : Set ℝ} (hJ : MeasurableSet J) : + MeasurableSet (directTriangleDomain T J) := + (measurableSet_trianglePhaseDomain T).inter (hJ.preimage measurable_fst.fst) + +def directTriangleDensity (s : Solution) (X : ℝ→Vec) (T : ℝ) (J : Set ℝ) + (K : TrianglePhase→Vec) (p : TrianglePhase) : ℝ≥0∞ := + (directTriangleDomain T J).indicator (fun p=> + ENNReal.ofReal ((p.1.1-p.1.2.1)^2)* + ENNReal.ofReal ‖prefixParticle s T + (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)) • K p‖) p + +def directTransportTriangleKernel (V : ℝ→Vec) (p : TrianglePhase) : Vec := + forceTransportKernel (p.1.1-p.1.2.1) p.1.2.2.1 (velocity (V p.1.1)) p.2 + +def directSourceTriangleKernel (s : Solution) (X V : ℝ→Vec) (T : ℝ) (p : TrianglePhase) : Vec := + let y := X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1 + forceSourceKernel (p.1.1-p.1.2.1) p.1.2.2.1 (velocity (V p.1.1)) p.2 + (fderiv ℝ velocity p.2 (prefixField s.E T (p.1.2.1,y)+ + cross (velocity p.2) (prefixField s.B T (p.1.2.1,y)))) + +lemma measurable_directTriangleDensity {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X : ℝ→Vec} (hX : Measurable X) + {J : Set ℝ} (hJ : MeasurableSet J) {K : TrianglePhase→Vec} (hK : Measurable K) : + Measurable (directTriangleDensity s X T J K) := by + have ht : Measurable (fun p : TrianglePhase=>p.1.1) := measurable_fst.fst + have hσ : Measurable (fun p : TrianglePhase=>p.1.2.1) := measurable_fst.snd.fst + have hn : Measurable (fun p : TrianglePhase=>p.1.2.2.1) := + measurable_subtype_coe.comp measurable_fst.snd.snd + have hy := hσ.prodMk (((hX.comp ht).sub ((ht.sub hσ).smul hn)).prodMk measurable_snd) + have hf := (hs.continuous_prefixParticle hT).measurable.comp hy + exact (((ht.sub hσ).pow_const 2).ennreal_ofReal.mul + (hf.smul hK).norm.ennreal_ofReal).indicator (measurableSet_directTriangleDomain T hJ) + +lemma measurable_directTransportTriangleKernel {V : ℝ→Vec} (hV : Measurable V) : + Measurable (directTransportTriangleKernel V) := by + exact measurable_forceTransportFamily (measurable_fst.fst.sub measurable_fst.snd.fst) + (measurable_subtype_coe.comp measurable_fst.snd.snd) + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst.fst)) measurable_snd + +lemma measurable_directSourceTriangleKernel {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) : + Measurable (directSourceTriangleKernel s X V T) := by + have ht : Measurable (fun p : TrianglePhase=>p.1.1) := measurable_fst.fst + have hσ : Measurable (fun p : TrianglePhase=>p.1.2.1) := measurable_fst.snd.fst + have hn : Measurable (fun p : TrianglePhase=>p.1.2.2.1) := + measurable_subtype_coe.comp measurable_fst.snd.snd + have hy := hσ.prodMk ((hX.comp ht).sub ((ht.sub hσ).smul hn)) + exact measurable_forceSourceFamily (ht.sub hσ) hn + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp ht)) measurable_snd + (measurable_lorentz_acceleration measurable_snd + ((continuous_prefixField hs.E_smooth.continuousOn hT).measurable.comp hy) + ((continuous_prefixField hs.B_smooth.continuousOn hT).measurable.comp hy)) + +lemma directTriangleDensity_nonzero {s : Solution} {X : ℝ→Vec} {T : ℝ} {J : Set ℝ} + {K : TrianglePhase→Vec} {p : TrianglePhase} (hp : directTriangleDensity s X T J K p≠0) : + p∈directTriangleDomain T J ∧ + s.f (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))≠0 := by + have hmem : p∈directTriangleDomain T J := by + by_contra hc + exact hp (indicator_of_notMem hc _) + refine ⟨hmem,?_⟩ + intro hz + apply hp + have hσ : p.1.2.1∈Icc 0 T := ⟨hmem.1.2.1.le,hmem.1.2.2.le.trans hmem.1.1.2.le⟩ + simp only [directTriangleDensity,indicator_of_mem hmem,prefixParticle,prefixClamp_eq hσ, + hz,zero_smul,norm_zero,ENNReal.ofReal_zero,mul_zero] + +lemma directTransportTriangle_bin_bound {s : Solution} {X V : ℝ→Vec} {T : ℝ} + {J : Set ℝ} (hJT : J⊆Icc 0 T) (B : ClosedConeBin) {z : ConeCoordinate} + (hz : z∈physicalBinBase V B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + directTriangleDensity s X T J (directTransportTriangleKernel V) (z,v))≤ + physicalDirectTransportDensity s X V B z := by + unfold physicalDirectTransportDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + by_cases hp : (z,v)∈directTriangleDomain T J + · have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + simp only [directTriangleDensity,indicator_of_mem hp,directTransportTriangleKernel, + prefixParticle,prefixClamp_eq hσ] + exact le_rfl + · simp only [directTriangleDensity,indicator_of_notMem hp] + exact bot_le + +lemma directSourceTriangle_bin_bound {s : Solution} {X V : ℝ→Vec} {T : ℝ} + {J : Set ℝ} (hJT : J⊆Icc 0 T) (B : ClosedConeBin) {z : ConeCoordinate} + (hz : z∈physicalBinBase V B J) : + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + directTriangleDensity s X T J (directSourceTriangleKernel s X V T) (z,v))≤ + physicalDirectSourceDensity s X V B z := by + unfold physicalDirectSourceDensity + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono + intro v + by_cases hp : (z,v)∈directTriangleDomain T J + · have hσ : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + simp only [directTriangleDensity,indicator_of_mem hp,directSourceTriangleKernel, + prefixParticle,prefixField,prefixClamp_eq hσ] + exact le_rfl + · simp only [directTriangleDensity,indicator_of_notMem hp] + exact bot_le + +lemma PhaseFlowOn.directTriangleDensity_finite_cover {s : Solution} {T P w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (hP : 0≤P) (hwP : w≤P) (N : ℕ) (hN : 8192*P≤(2:ℝ)^N) + (hbound : ∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤P) + (X V : ℝ→Vec) {J : Set ℝ} (hband : ∀t∈J,q (V t)∈Icc (w/8) (8*w)) + (K : TrianglePhase→Vec) (p : TrianglePhase) + (hp : directTriangleDensity s X T J K p≠0) : + ∃i : DirectOuterIndex N×ℕ, + i∈{i : DirectOuterIndex N×ℕ | sourceRepresentative (i.1 0).val≤128*P} ∧ + p∈physicalBinPhaseSet V (directOuterBin T w i.1 i.2) J := by + have hh := directTriangleDensity_nonzero hp + have hσ : p.1.2.1∈Icc 0 T := ⟨hh.1.1.2.1.le,hh.1.1.2.2.le.trans hh.1.1.1.2.le⟩ + have hq := F.eulerian_supported_momentum hs hbound hσ _ p.2 hh.2 + obtain ⟨i,nr,hcap,hbase,hv⟩ := physical_direct_finite_cover hP hwP hN hh.1.2 + hh.1.1.1.2.le ⟨hh.1.1.2.1.le,hh.1.1.2.2⟩ (hband _ hh.1.2) p.1.2.2 p.2 hq + exact ⟨(i,nr),hcap,hbase,hv⟩ + +lemma PhaseFlowOn.directTriangle_family_estimate {s : Solution} {T P w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (hP : 0≤P) (hwP : w≤P) (N : ℕ) (hN : 8192*P≤(2:ℝ)^N) + (hbound : ∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤P) + (X V : ℝ→Vec) (hX : Measurable X) (hV : Measurable V) + (J : Set ℝ) (hJ : MeasurableSet J) (hband : ∀t∈J,q (V t)∈Icc (w/8) (8*w)) + (K : TrianglePhase→Vec) (hK : Measurable K) (f : ClosedConeBin → ConeCoordinate → ℝ≥0∞) + (C : ℝ≥0∞) + (hbin : ∀B z,z∈physicalBinBase V B J→ + (∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + directTriangleDensity s X T J K (z,v))≤f B z) + (hfamily : ∀i : DirectOuterIndex N,sourceRepresentative (i 0).val≤128*P→ + (∑'nr,∫⁻z,f (directOuterBin T w i nr) z ∂physicalBinMeasure V (directOuterBin T w i nr) J)≤C) : + (∫⁻p,directTriangleDensity s X T J K p ∂trianglePhaseMeasure)≤(N:ℝ≥0∞)^4*C := by + let R := {i : DirectOuterIndex N×ℕ | sourceRepresentative (i.1 0).val≤128*P} + have hc := physicalBinFamily_cover_lintegral hV hJ + (fun i : DirectOuterIndex N×ℕ=>directOuterBin T w i.1 i.2) R + (measurable_directTriangleDensity hs hT hX hJ hK) + (F.directTriangleDensity_finite_cover hs hP hwP N hN hbound X V hband K) + apply hc.trans + apply (ENNReal.tsum_le_tsum (fun i=>?_)).trans + · exact directOuter_family_sum_bound + (fun i nr=>∫⁻z,f (directOuterBin T w i nr) z ∂physicalBinMeasure V (directOuterBin T w i nr) J) C hfamily + · apply indicator_le_indicator + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV _ hJ)] with z hz + exact hbin _ z hz + +lemma Admissible.direct_transport_physical_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w P : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 1≤w → 0

(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,directTriangleDensity s X T (Icc a b) (directTransportTriangleKernel V) p + ∂trianglePhaseMeasure) ≤ (N:ℝ≥0∞)^4*ENNReal.ofReal (C*max 1 T*w^2) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_transport_all_radii + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w P N hS hS0 ha hb hJI hw hP hwP hN hPbound hW + dsimp only + have hα : Continuous (fun t : ℝ => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJT : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband : ∀t∈Icc a b,q (prefixFlow F.flow T zX t).2∈Icc (w/8) (8*w) := by + intro t ht + simpa only [prefixFlow,prefixClamp_eq (hJT ht)] using hW t ht + apply F.directTriangle_family_estimate hs hT hP.le hwP N hN hPbound + (fun t => (prefixFlow F.flow T zX t).1) (fun t => (prefixFlow F.flow T zX t).2) + hα.fst.measurable hα.snd.measurable (Icc a b) measurableSet_Icc hband + (directTransportTriangleKernel (fun t => (prefixFlow F.flow T zX t).2)) + (measurable_directTransportTriangleKernel hα.snd.measurable) + (physicalDirectTransportDensity s (fun t => (prefixFlow F.flow T zX t).1) + (fun t => (prefixFlow F.flow T zX t).2)) (ENNReal.ofReal (C*max 1 T*w^2)) + (fun B z hz=>directTransportTriangle_bin_bound (s:=s) + (X:=fun t=>(prefixFlow F.flow T zX t).1) (V:=fun t=>(prefixFlow F.flow T zX t).2) + (T:=T) hJT B hz) + intro i hi + exact hbound s T F hs hT h0 zX S (i 0).val (i 1).val (i 2).val (i 3).val a b ((w/P)^2) w P + hS hS0 ha hb hJI (sq_pos_of_pos (div_pos (zero_lt_one.trans_le hw) hP)) hw hP hwP le_rfl hi + +lemma Admissible.direct_source_physical_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a≤b → b-a ≤ (w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p,directTriangleDensity s X T (Icc a b) (directSourceTriangleKernel s X V T) p + ∂trianglePhaseMeasure) ≤ + (N:ℝ≥0∞)^4*ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*Real.log (2+P)) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_source_all_radii + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P N hS hS0 ha hb hab hJI hM hA hP hL hw hwP hN hPbound hW HX HZ + dsimp only + have hα : Continuous (fun t : ℝ => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hJT : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hband : ∀t∈Icc a b,q (prefixFlow F.flow T zX t).2∈Icc (w/8) (8*w) := by + intro t ht + simpa only [prefixFlow,prefixClamp_eq (hJT ht)] using hW t ht + apply F.directTriangle_family_estimate hs hT (zero_le_one.trans hP) hwP N hN hPbound + (fun t => (prefixFlow F.flow T zX t).1) (fun t => (prefixFlow F.flow T zX t).2) + hα.fst.measurable hα.snd.measurable (Icc a b) measurableSet_Icc hband + (directSourceTriangleKernel s (fun t => (prefixFlow F.flow T zX t).1) + (fun t => (prefixFlow F.flow T zX t).2) T) + (measurable_directSourceTriangleKernel hs hT hα.fst.measurable hα.snd.measurable) + (physicalDirectSourceDensity s (fun t => (prefixFlow F.flow T zX t).1) + (fun t => (prefixFlow F.flow T zX t).2)) + (ENNReal.ofReal (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+M+Real.sqrt A)*w*Real.sqrt w*Real.log (2+P))) + (fun B z hz=>directSourceTriangle_bin_bound (s:=s) + (X:=fun t=>(prefixFlow F.flow T zX t).1) (V:=fun t=>(prefixFlow F.flow T zX t).2) + (T:=T) hJT B hz) + intro i hi + exact hbound s T F hs hT h0 zX S (i 0).val (i 1).val (i 2).val (i 3).val a b w M A P + hS hS0 ha hb hab hJI hM hA hP hL hw hwP hi HX HZ + +lemma exists_direct_dyadic_count : ∃C : ℝ,0≤C ∧ ∀P : ℝ, + 1≤P → 1≤Real.log (2+P) → ∃N : ℕ,8192*P≤(2:ℝ)^N ∧ (N:ℝ)≤C*Real.log (2+P) := by + obtain ⟨C,hC,hcount⟩ := exists_far_dyadic_count 0 + refine ⟨C,hC,?_⟩ + intro P hP hL + obtain ⟨N,_,_,hN,hNc⟩ := hcount P (zero_lt_one.trans_le hP) hL + refine ⟨N,?_,hNc⟩ + norm_num at hN + have hh : P≤P^2 := by nlinarith only [hP,sq_nonneg (P-1)] + nlinarith only [hN,hP,hh] + +lemma ennreal_count_four_bound {N : ℕ} {C L : ℝ} (hC : 0≤C) (hL : 0≤L) + (hN : (N:ℝ)≤C*L) (B : ℝ) : + (N:ℝ≥0∞)^4*ENNReal.ofReal B ≤ ENNReal.ofReal (C^4*L^4*B) := by + have hNc : (N:ℝ≥0∞)≤ENNReal.ofReal (C*L) := by + simpa only [ENNReal.ofReal_natCast] using ENNReal.ofReal_le_ofReal hN + calc + _ ≤ (ENNReal.ofReal (C*L))^4*ENNReal.ofReal B := mul_le_mul' (pow_le_pow_left' hNc 4) le_rfl + _ = _ := by + rw [←ENNReal.ofReal_pow (mul_nonneg hC hL),←ENNReal.ofReal_mul (pow_nonneg (mul_nonneg hC hL) 4)] + congr 1 + ring + +lemma Admissible.direct_transport_physical_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → 1≤w → 1≤P → w≤P → 1≤Real.log (2+P) → + (∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤P) → + (∀t∈Icc a b,q (F.flow zX t).2∈Icc (w/8) (8*w)) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻p,directTriangleDensity s X T (Icc a b) (directTransportTriangleKernel V) p + ∂trianglePhaseMeasure) ≤ ENNReal.ofReal (C*max 1 T*w^2*(Real.log (2+P))^4) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_transport_physical_bound + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + refine ⟨C*Cn^4,by positivity,?_⟩ + intro s T F hs hT h0 zX S a b w P hS hS0 ha hb hJI hw hP hwP hL hPbound hW + dsimp only + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + apply (hbound s T F hs hT h0 zX S a b w P N hS hS0 ha hb hJI hw + (zero_lt_one.trans_le hP) hwP hN hPbound hW).trans + convert ennreal_count_four_bound hCn (zero_le_one.trans hL) hNc (C*max 1 T*w^2) using 1 + congr 1 + ring + +lemma Admissible.direct_source_physical_log_bound {d : Datum} (hd₀ : Admissible d) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a≤b → b-a ≤ (w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻p,directTriangleDensity s X T (Icc a b) (directSourceTriangleKernel s X V T) p + ∂trianglePhaseMeasure) ≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*(Real.log (2+P))^5) := by + obtain ⟨C,hC,hbound⟩ := hd₀.direct_source_physical_bound + obtain ⟨Cn,hCn,hcount⟩ := exists_direct_dyadic_count + refine ⟨C*Cn^4,by positivity,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hJI hM hA hP hL hw hwP hPbound hW HX HZ + dsimp only + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + apply (hbound s T F hs hT h0 zX S a b w M A P N hS hS0 ha hb hab hJI hM hA hP hL hw hwP + hN hPbound hW HX HZ).trans + convert ennreal_count_four_bound hCn (zero_le_one.trans hL) hNc + (C*(1+∫x : Vec,totalEnergy s (0,x))*(1+M+Real.sqrt A)*w*Real.sqrt w*Real.log (2+P)) using 1 + congr 1 + ring + +lemma directTriangle_lintegral_polar {T : ℝ} {J : Set ℝ} + (hJ : MeasurableSet J) {g : TrianglePhase → ℝ≥0∞} (hg : Measurable g) + (hsupp : ∀p,p∉directTriangleDomain T J → g p=0) : + (∫⁻p,g p ∂trianglePhaseMeasure)= + ∫⁻t in Ioo (0:ℝ) T∩J,∫⁻n : Sphere,∫⁻σ in Ioo (0:ℝ) t,∫⁻v : Vec, + g ((t,σ,n),v) ∂volume ∂volume ∂sphereMeasure := by + have hm : Measurable (fun z : ConeCoordinate=>∫⁻v : Vec,g (z,v)) := hg.lintegral_prod_right' + have he : (∫⁻p,g p ∂trianglePhaseMeasure)= + ∫⁻t : ℝ,∫⁻σ : ℝ,∫⁻n : Sphere,∫⁻v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure := by + rw [trianglePhaseMeasure,lintegral_prod _ hg.aemeasurable,lintegral_prod _ hm.aemeasurable] + apply lintegral_congr + intro t + exact lintegral_prod _ (hm.comp (measurable_const.prodMk measurable_id)).aemeasurable + rw [he,←lintegral_indicator (measurableSet_Ioo.inter hJ)] + apply lintegral_congr + intro t + by_cases ht : t∈Ioo 0 T∩J + · rw [indicator_of_mem ht] + have hh : (∫⁻σ : ℝ,∫⁻n : Sphere,∫⁻v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure)= + ∫⁻σ in Ioo (0:ℝ) t,∫⁻n : Sphere,∫⁻v : Vec,g ((t,σ,n),v) ∂volume ∂sphereMeasure := by + rw [←lintegral_indicator measurableSet_Ioo] + apply lintegral_congr + intro σ + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ] + · rw [indicator_of_notMem hσ] + have hz (n : Sphere) (v : Vec) : g ((t,σ,n),v)=0 := + hsupp _ (fun hp=>hσ hp.1.2) + simp only [hz,lintegral_zero] + rw [hh] + exact lintegral_lintegral_swap + ((hm.comp (measurable_const.prodMk measurable_id)).aemeasurable) + · rw [indicator_of_notMem ht] + have hz (σ : ℝ) (n : Sphere) (v : Vec) : g ((t,σ,n),v)=0 := + hsupp _ (fun hp=>ht ⟨hp.1.1,hp.2⟩) + simp only [hz,lintegral_zero] + +lemma directTriangleDensity_outside (s : Solution) (X : ℝ→Vec) (T : ℝ) + (J : Set ℝ) (K : TrianglePhase→Vec) (p : TrianglePhase) + (hp : p∉directTriangleDomain T J) : directTriangleDensity s X T J K p=0 := + indicator_of_notMem hp _ + +lemma normalised_direct_kernel_identity (s : Solution) (X V : ℝ→Vec) {T t σ : ℝ} + (ht : t≤T) (hσ : σ∈Ioo 0 t) (n : Sphere) (v : Vec) : + (1-dot n.1 (velocity (V t))) • + (s.f (σ,(X t-(t-σ) • n.1,v)) • + normalisedSignedForce (t-σ) (velocity (V t)) (velocity v) n.1 + (sourceAcceleration s (σ,(X t-(t-σ) • n.1,v))))= + (t-σ)^2 • (prefixParticle s T (σ,(X t-(t-σ) • n.1,v)) • + (directTransportTriangleKernel V ((t,σ,n),v)+ + directSourceTriangleKernel s X V T ((t,σ,n),v))) := by + have hσT : σ∈Icc 0 T := ⟨hσ.1.le,hσ.2.le.trans ht⟩ + rw [smul_comm,normalisedSignedForce_flux n.1 (velocity (V t)) v _ + (sub_pos.mpr hσ.2).ne' (sphere_norm n) (cone_denom_pos (V t) n.1 (sphere_norm n)).ne',smul_comm] + simp only [directTransportTriangleKernel,directSourceTriangleKernel,prefixParticle,prefixField, + prefixClamp_eq hσT,sourceAcceleration] + +lemma normalised_direct_density_bound (s : Solution) (X V : ℝ→Vec) {T t σ : ℝ} + {J : Set ℝ} (ht : t∈Ioo 0 T∩J) (hσ : σ∈Ioo 0 t) (n : Sphere) (v : Vec) : + ENNReal.ofReal ‖(1-dot n.1 (velocity (V t))) • + (s.f (σ,(X t-(t-σ) • n.1,v)) • + normalisedSignedForce (t-σ) (velocity (V t)) (velocity v) n.1 + (sourceAcceleration s (σ,(X t-(t-σ) • n.1,v))))‖≤ + directTriangleDensity s X T J (directTransportTriangleKernel V) ((t,σ,n),v)+ + directTriangleDensity s X T J (directSourceTriangleKernel s X V T) ((t,σ,n),v) := by + rw [normalised_direct_kernel_identity s X V ht.1.2.le hσ n v] + have hp : ((t,σ,n),v)∈directTriangleDomain T J := ⟨⟨ht.1,hσ⟩,ht.2⟩ + simp only [directTriangleDensity,indicator_of_mem hp] + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (t-σ)), + ENNReal.ofReal_mul (sq_nonneg _),smul_add,←mul_add, + ←ENNReal.ofReal_add (norm_nonneg _) (norm_nonneg _)] + exact mul_le_mul' le_rfl (ENNReal.ofReal_le_ofReal (norm_add_le _ _)) + +lemma norm_integral_ENN_bound {Ω : Type*} [MeasurableSpace Ω] + {μ : Measure Ω} (g : Ω → Vec) : + ENNReal.ofReal ‖∫p,g p ∂μ‖ ≤ ∫⁻p,ENNReal.ofReal ‖g p‖ ∂μ := by + simpa only [ofReal_norm] using enorm_integral_le_lintegral_enorm g + +lemma SmoothClassicalPrefix.direct_force_fiber_bound {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (X V : ℝ→Vec) {J : Set ℝ} {t : ℝ} + (ht : t∈Ioo 0 T∩J) : + ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))- + boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + (∫⁻n : Sphere,∫⁻σ in Ioo (0:ℝ) t,∫⁻v : Vec, + (directTriangleDensity s X T J (directTransportTriangleKernel V) ((t,σ,n),v)+ + directTriangleDensity s X T J (directSourceTriangleKernel s X V T) ((t,σ,n),v)) + ∂volume ∂volume ∂sphereMeasure) := by + rw [hs.retarded_force_source_polar ht.1.1 ht.1.2 (X t) (velocity (V t)) + (norm_velocity_lt_one _),add_sub_cancel_left,norm_smul,Real.norm_eq_abs, + abs_of_pos (by positivity : 0<(4*Real.pi)⁻¹),ENNReal.ofReal_mul (by positivity : 0≤(4*Real.pi)⁻¹)] + apply mul_le_mul' le_rfl + apply (norm_integral_ENN_bound _).trans + apply lintegral_mono + intro n + apply (norm_integral_ENN_bound _).trans + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem measurableSet_Ioo] with σ hσ + rw [←integral_smul] + apply (norm_integral_ENN_bound _).trans + exact lintegral_mono (normalised_direct_density_bound s X V ht hσ n) + +lemma restrict_inside_finite_prefix {T : ℝ} {J : Set ℝ} (hJT : J⊆Icc 0 T) : + (volume : Measure ℝ).restrict J=volume.restrict (Ioo 0 T∩J) := by + apply Measure.restrict_congr_set + filter_upwards [Ioo_ae_eq_Icc (μ:=(volume : Measure ℝ)) (a:=0) (b:=T)] with t ht + apply propext + constructor + · intro hj + exact ⟨ht.mpr (hJT hj),hj⟩ + · exact fun h=>h.2 + +private lemma SmoothClassicalPrefix.directForceEnergyPrefix + {datum : Datum} {solution : Solution} {horizon : ℝ} + (hs : SmoothClassicalPrefix datum solution horizon) : EnergyPrefix solution horizon := by + refine ⟨(hs.f_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro time ht position momentum + have hh := (hs.equations time ht.1.le ht.2).1 position momentum + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro time ht position + have he := (hs.equations time ht.1.le ht.2).2.1 position + have hb := (hs.equations time ht.1.le ht.2).2.2.1 position + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +lemma SmoothClassicalPrefix.direct_force_triangle_bound {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) (X V : ℝ→Vec) + (hX : Measurable X) (hV : Measurable V) {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) : + (∫⁻t in J,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))- + boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖)≤ + ENNReal.ofReal (4*Real.pi)⁻¹ * + ((∫⁻p,directTriangleDensity s X T J (directTransportTriangleKernel V) p ∂trianglePhaseMeasure)+ + (∫⁻p,directTriangleDensity s X T J (directSourceTriangleKernel s X V T) p ∂trianglePhaseMeasure)) := by + let g₁ := directTriangleDensity s X T J (directTransportTriangleKernel V) + let g₂ := directTriangleDensity s X T J (directSourceTriangleKernel s X V T) + have hm₁ : Measurable g₁ := measurable_directTriangleDensity hs.directForceEnergyPrefix hT hX hJ + (measurable_directTransportTriangleKernel hV) + have hm₂ : Measurable g₂ := measurable_directTriangleDensity hs.directForceEnergyPrefix hT hX hJ + (measurable_directSourceTriangleKernel hs.directForceEnergyPrefix hT hX hV) + have hsum : (∫⁻p,g₁ p+g₂ p ∂trianglePhaseMeasure)= + (∫⁻p,g₁ p ∂trianglePhaseMeasure)+(∫⁻p,g₂ p ∂trianglePhaseMeasure) := + lintegral_add_left hm₁ _ + change _≤ENNReal.ofReal (4*Real.pi)⁻¹ * + ((∫⁻p,g₁ p ∂trianglePhaseMeasure)+(∫⁻p,g₂ p ∂trianglePhaseMeasure)) + rw [←hsum,directTriangle_lintegral_polar (g:=fun p=>g₁ p+g₂ p) hJ (hm₁.add hm₂) + (fun p hp=>by dsimp only [g₁,g₂]; rw [directTriangleDensity_outside s X T J _ p hp, + directTriangleDensity_outside s X T J _ p hp]; exact add_zero 0)] + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top,restrict_inside_finite_prefix hJT] + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_Ioo.inter hJ)] with t ht + exact hs.direct_force_fiber_bound X V ht + +lemma SmoothClassicalPrefix.direct_lorentz_triangle_bound {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) (X V : ℝ→Vec) + (hX : Measurable X) (hV : Measurable V) {J : Set ℝ} (hJ : MeasurableSet J) + (hJT : J⊆Icc 0 T) (C : ℝ) (hC : 0≤C) + (hdatum : ∀t∈Ioo 0 T∩J,‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤C) : + (∫⁻t in J,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖)≤ + ENNReal.ofReal C*volume J + ENNReal.ofReal (4*Real.pi)⁻¹ * + ((∫⁻p,directTriangleDensity s X T J (directTransportTriangleKernel V) p ∂trianglePhaseMeasure)+ + (∫⁻p,directTriangleDensity s X T J (directSourceTriangleKernel s X V T) p ∂trianglePhaseMeasure)) := by + have hpt : ∀ᵐt∂volume.restrict J, + ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖≤ + ENNReal.ofReal C+ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))- + boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖ := by + rw [restrict_inside_finite_prefix hJT] + filter_upwards [ae_restrict_mem (measurableSet_Ioo.inter hJ)] with t ht + rw [←ENNReal.ofReal_add hC (norm_nonneg _)] + apply ENNReal.ofReal_le_ofReal + calc + _=‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))+ + (s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))- + boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t)))‖ := by + congr 1; abel + _≤_ := (norm_add_le _ _).trans (add_le_add (hdatum t ht) le_rfl) + apply (lintegral_mono_ae hpt).trans + rw [lintegral_add_left measurable_const,lintegral_const,Measure.restrict_apply_univ] + exact add_le_add le_rfl (hs.direct_force_triangle_bound hT X V hX hV hJ hJT) + +lemma Admissible.direct_lorentz_log_bound {d : Datum} (hd₀ : Admissible d) + (T : ℝ) (hT : 0≤T) : + ∃ Cb Ct Cs : ℝ,0≤Cb ∧ 0≤Ct ∧ 0≤Cs ∧ + ∀ (s : Solution) (F : PhaseFlowOn s.E s.B T), SmoothClassicalPrefix d s T → + ∀ (zX : Phase) (S : Set Phase) (a b w M A P : ℝ), + zX∈tsupport d.f₀ → IsCompact S → tsupport d.f₀⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖) ≤ + ENNReal.ofReal (Cb*(b-a)) + ENNReal.ofReal (4*Real.pi)⁻¹ * + (ENNReal.ofReal (Ct*max 1 T*w^2*(Real.log (2+P))^4) + + ENNReal.ofReal (Cs*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*(Real.log (2+P))^5)) := by + obtain ⟨Cb,hCb,hdatum⟩ := hd₀.supported_boundary_force_bound T hT + obtain ⟨Ct,hCt,htrans⟩ := hd₀.direct_transport_physical_log_bound + obtain ⟨Cs,hCs,hsource⟩ := hd₀.direct_source_physical_log_bound + refine ⟨Cb,Ct,Cs,hCb,hCt,hCs,?_⟩ + intro s F hs zX S a b w M A P hzX hS hS0 ha hb hab hJI hM hA hP hL hw hwP hPbound hW HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + have hcon := (F.continuous_prefixFlow hs.directForceEnergyPrefix hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcon.fst.measurable + have hV : Measurable V := hcon.snd.measurable + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdata : (fun z=>s.f (0,z))=d.f₀ := funext hs.initial_f + have hS0' : tsupport (fun z=>s.f (0,z))⊆S := by rw [hdata]; exact hS0 + have hDb : ∀t∈Ioo 0 T∩Icc a b, + ‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤Cb := by + intro t ht + dsimp only [X,V,prefixFlow] + rw [prefixClamp_eq (hJ ht.2)] + exact hdatum s.E s.B F zX hzX t ⟨ht.1.1,ht.1.2.le⟩ + have hraw : (∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,(F.flow zX t).1)+ + cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [X,V,prefixFlow,prefixClamp_eq (hJ ht)] + rw [hraw] + apply (hs.direct_lorentz_triangle_bound hT X V hX hV measurableSet_Icc hJ Cb hCb hDb).trans + have hD : ENNReal.ofReal Cb*volume (Icc a b)=ENNReal.ofReal (Cb*(b-a)) := by + rw [Real.volume_Icc,ENNReal.ofReal_mul hCb] + rw [hD] + apply add_le_add le_rfl + apply mul_le_mul' le_rfl + exact add_le_add + (htrans s T F hs.directForceEnergyPrefix hT hs.initial_f zX S a b w P hS hS0' ha hb hJI hw hP hwP hL hPbound hW) + (hsource s T F hs.directForceEnergyPrefix hT hs.initial_f zX S a b w M A P hS hS0' ha hb hab hJI hM hA hP hL hw hwP + hPbound hW HX HZ) + +end RVM + +end + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +def directOuterIndexEquiv (N : ℕ) : DirectOuterIndex N ≃ Fin N×Fin N×Fin N×Fin N where + toFun k := (k 0,k 2,k 1,k 3) + invFun k := ![k.1,k.2.2.1,k.2.1,k.2.2.2] + left_inv k := by funext i; fin_cases i <;> rfl + right_inv k := by rcases k with ⟨a,b,c,d⟩; rfl + +lemma directOuter_remaining_sum {N : ℕ} (P : ℝ) (f : ℕ→ℕ→ℕ→ℕ→ℕ→ℝ≥0∞) : + (∑'i : DirectOuterIndex N×ℕ, + ({i : DirectOuterIndex N×ℕ | sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>f (i.1 0).val (i.1 2).val (i.1 1).val (i.1 3).val i.2) i)= + ∑np∈(Finset.range N).filter (fun np=>sourceRepresentative np≤128*P), + ∑nf∈Finset.range N,∑nt∈(Finset.range N).filter + (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt), + ∑j∈Finset.range N,∑'nr : ℕ,f np nf nt j nr := by + rw [ENNReal.tsum_prod',←(directOuterIndexEquiv N).symm.tsum_eq] + simp only [ENNReal.tsum_prod',directOuterIndexEquiv,Equiv.coe_fn_symm_mk] + simp only [Set.indicator_apply,mem_ofPred_eq] + change (∑'np : Fin N,∑'nf : Fin N,∑'nt : Fin N,∑'j : Fin N,∑'nr : ℕ, + if sourceRepresentative np.val≤128*P ∧ cappedRepresentative nf.val≤16384*cappedRepresentative nt.val + then f np.val nf.val nt.val j.val nr else 0)=_ + simp only [tsum_fintype,Finset.sum_filter] + simp_rw [Finset.sum_range] + apply Finset.sum_congr rfl + intro np hnp + by_cases hp : sourceRepresentative np.val≤128*P + · simp only [hp,true_and,ite_true] + apply Finset.sum_congr rfl + intro nf hnf + apply Finset.sum_congr rfl + intro nt hnt + by_cases ht : cappedRepresentative nf.val≤16384*cappedRepresentative nt.val + · simp only [ht,ite_true] + · simp only [ht,ite_false,tsum_zero,Finset.sum_const_zero] + · simp only [hp,false_and,ite_false,tsum_zero,Finset.sum_const_zero] + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma ennreal_filter_sum_le_tsum (S : Finset ℕ) (p : ℕ→Prop) (f : ℕ→ℝ≥0∞) : + (∑n∈S.filter p,f n)≤∑'n : ℕ,if p n then f n else 0 := by + rw [Finset.sum_filter] + exact ENNReal.sum_le_tsum _ + +lemma directOuter_remaining_le_tsum {N : ℕ} (P : ℝ) (f : ℕ→ℕ→ℕ→ℕ→ℕ→ℝ≥0∞) : + (∑'i : DirectOuterIndex N×ℕ, + ({i : DirectOuterIndex N×ℕ | sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>f (i.1 0).val (i.1 2).val (i.1 1).val (i.1 3).val i.2) i)≤ + ∑'np : ℕ,if sourceRepresentative np≤128*P then + ∑'nt : ℕ,∑'nf : ℕ,if cappedRepresentative nf≤16384*cappedRepresentative nt then + ∑'j : ℕ,∑'nr : ℕ,f np nf nt j nr else 0 else 0 := by + rw [directOuter_remaining_sum] + apply le_trans (ennreal_filter_sum_le_tsum (Finset.range N) (fun np=>sourceRepresentative np≤128*P) _) + apply ENNReal.tsum_le_tsum + intro np + split_ifs with hp + · rw [ENNReal.tsum_comm] + apply le_trans (ENNReal.sum_le_tsum _) + apply ENNReal.tsum_le_tsum + intro nf + apply le_trans (ennreal_filter_sum_le_tsum (Finset.range N) (fun nt=>cappedRepresentative nf≤16384*cappedRepresentative nt) _) + apply ENNReal.tsum_le_tsum + intro nt + split_ifs with ht + · exact ENNReal.sum_le_tsum _ + · rfl + · rfl + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectLargeAngularSharp.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectLargeAngularSharp.lean new file mode 100644 index 0000000000000000000000000000000000000000..50948356f8a06851c8b077671e890ce4ebd25d79 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectLargeAngularSharp.lean @@ -0,0 +1,244 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SharedBudget + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +def directDyadicPowerConstant (α : ℝ) : ℝ := (1-((2:ℝ)⁻¹)^α)⁻¹ + +lemma directDyadicPowerConstant_nonneg {α : ℝ} (hα : 0≤α) : 0≤directDyadicPowerConstant α := by + exact inv_nonneg.mpr (sub_nonneg.mpr (Real.rpow_le_one (by norm_num) (by norm_num) hα)) + +lemma remaining_large_good_receiver {φ : ℝ} (hφ : 0<φ) + (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ) + (hθ : ∀i∈Sθ,φ≤16*cappedRepresentative i) + (hσ : ∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤136*cappedRepresentative i) : + (∑i∈Sθ,∑j∈Sσ i,(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (φ/(cappedRepresentative i)^2))≤remainingGoodConstant 136 16 0*Real.sqrt φ := by + have hh := remaining_good_fixed_receiver_sum hφ (by norm_num : (0:ℝ)<136) + (by norm_num : (0:ℝ)<16) (by norm_num : (0:ℝ)≤0) (by norm_num) Sθ Sσ hθ hσ + simp only [Real.rpow_zero,div_one,add_zero,sub_zero,←Real.sqrt_eq_rpow] at hh + simp only [remainingGoodConstant, sub_zero, add_zero, ←Real.sqrt_eq_rpow] + apply le_trans _ hh + apply Finset.sum_le_sum + intro i hi + apply Finset.sum_le_sum + intro j hj + have hi0 := (cappedRepresentative_pos i).le + have hj0 := (cappedRepresentative_pos j).le + have hκ : 1≤(1+φ/cappedRepresentative j)^(1/4:ℝ) := + Real.one_le_rpow (by linarith [div_nonneg hφ.le hj0]) (by norm_num) + rw [mul_comm _ (φ/(cappedRepresentative i)^2)] + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact le_mul_of_one_le_right (by positivity) hκ + +lemma remaining_large_good_angles (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hθ : ∀nf∈Sφ,∀i∈Sθ nf,cappedRepresentative nf≤16*cappedRepresentative i) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤136*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i,(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (cappedRepresentative nf/(cappedRepresentative i)^2))≤ + remainingGoodConstant 136 16 0*directDyadicPowerConstant (1/2) := by + calc + _≤∑nf∈Sφ,remainingGoodConstant 136 16 0*Real.sqrt (cappedRepresentative nf) := + Finset.sum_le_sum (fun nf hnf=>remaining_large_good_receiver (cappedRepresentative_pos nf) + (Sθ nf) (Sσ nf) (hθ nf hnf) (hσ nf hnf)) + _≤_ := by + rw [←Finset.mul_sum] + apply mul_le_mul_of_nonneg_left _ (remainingGoodConstant_nonneg (by norm_num) (by norm_num) (by norm_num) (by norm_num)) + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1/2) Sφ (fun n _=>cappedRepresentative_le_one n) + simpa only [directDyadicPowerConstant,Real.one_rpow,mul_one,←Real.sqrt_eq_rpow,Real.sqrt_one] using hh + +lemma remaining_large_magnetic_receiver {φ : ℝ} (hφ : 0≤φ) + (Sθ : Finset ℕ) (Sσ : ℕ→Finset ℕ) + (hσ : ∀i∈Sθ,∀j∈Sσ i,cappedRepresentative j≤136*cappedRepresentative i) : + (∑i∈Sθ,∑j∈Sσ i,(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*φ^(1/3:ℝ))≤ + directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*φ^(1/3:ℝ) := by + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<2/3) Sθ (fun n _=>cappedRepresentative_le_one n) + rw [Real.one_rpow,mul_one] at hh + have hC : 0≤directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ) := + mul_nonneg (directDyadicPowerConstant_nonneg (by norm_num)) (by positivity) + calc + _≤∑i∈Sθ,directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ)*(cappedRepresentative i)^(2/3:ℝ)*φ^(1/3:ℝ) := by + apply Finset.sum_le_sum + intro i hi + simpa only [one_mul,mul_one,directDyadicPowerConstant] using large_radius_magnetic_relative_sum + (by norm_num : (0:ℝ)≤1) (cappedRepresentative_pos i) hφ (by norm_num : (0:ℝ)<136) (Sσ i) (hσ i hi) + _=(directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ))*(∑i∈Sθ,(cappedRepresentative i)^(2/3:ℝ))*φ^(1/3:ℝ) := by + simp only [Finset.sum_mul,Finset.mul_sum] + _≤_ := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hh hC) (Real.rpow_nonneg hφ _) + +lemma remaining_large_magnetic_angles (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤136*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i,(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative nf)^(1/3:ℝ))≤ + directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*directDyadicPowerConstant (1/3) := by + calc + _≤∑nf∈Sφ,directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)* + (cappedRepresentative nf)^(1/3:ℝ) := + Finset.sum_le_sum (fun nf hnf=>remaining_large_magnetic_receiver (cappedRepresentative_pos nf).le + (Sθ nf) (Sσ nf) (hσ nf hnf)) + _≤_ := by + rw [←Finset.mul_sum] + apply mul_le_mul_of_nonneg_left _ (by + exact mul_nonneg (mul_nonneg (directDyadicPowerConstant_nonneg (by norm_num)) (by positivity)) (directDyadicPowerConstant_nonneg (by norm_num))) + have hh := capped_positive_power_sum_unscaled (by norm_num : (0:ℝ)<1) + (by norm_num : (0:ℝ)<1/3) Sφ (fun n _=>cappedRepresentative_le_one n) + simpa only [directDyadicPowerConstant,Real.one_rpow,mul_one] using hh + +lemma remaining_large_combined_angles {g b : ℝ} (hg : 0≤g) (hb : 0≤b) + (Sφ : Finset ℕ) (Sθ : ℕ→Finset ℕ) (Sσ : ℕ→ℕ→Finset ℕ) + (hθ : ∀nf∈Sφ,∀i∈Sθ nf,cappedRepresentative nf≤16*cappedRepresentative i) + (hσ : ∀nf∈Sφ,∀i∈Sθ nf,∀j∈Sσ nf i,cappedRepresentative j≤136*cappedRepresentative i) : + (∑nf∈Sφ,∑i∈Sθ nf,∑j∈Sσ nf i, + (g*(min (cappedRepresentative i) (cappedRepresentative j))^(3/2:ℝ)* + (cappedRepresentative nf/(cappedRepresentative i)^2)+ + b*(min (cappedRepresentative i) (cappedRepresentative j))^(4/3:ℝ)* + (cappedRepresentative i)^(-(2/3:ℝ))*(cappedRepresentative nf)^(1/3:ℝ)))≤ + g*(remainingGoodConstant 136 16 0*directDyadicPowerConstant (1/2))+ + b*(directDyadicPowerConstant (4/3)*(136:ℝ)^(4/3:ℝ)*directDyadicPowerConstant (2/3)*directDyadicPowerConstant (1/3)) := by + have hg' := remaining_large_good_angles Sφ Sθ Sσ hθ hσ + have hb' := remaining_large_magnetic_angles Sφ Sθ Sσ hσ + simp_rw [mul_assoc, Finset.sum_add_distrib, ←Finset.mul_sum] + simpa only [mul_assoc] using add_le_add (mul_le_mul_of_nonneg_left hg' hg) (mul_le_mul_of_nonneg_left hb' hb) + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma capped_large_magnetic_sharp_ennreal_sum {H p θ φ σ K : ℝ} + (hH : 0min (H*(2:ℝ)^k*p^2*(min θ σ)^2*φ) + (Real.sqrt p*(min θ σ)/(θ*Real.sqrt (H*(2:ℝ)^k))) + have hν : 0 < min θ σ := lt_min hθ hσ + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := large_radius_magnetic_balance hH hp hθ hφ hσ + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _=∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by simp_rw [he]; rfl + _≤∑'k : ℤ,ENNReal.ofReal (K*g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (K*g k)) + _=ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _≤_ := by + apply ENNReal.ofReal_le_ofReal + simpa only [g,mul_assoc] using mul_le_mul_of_nonneg_left hg.2 hK + +lemma direct_large_good_balance {I p θ φ σ : ℝ} + (hI : 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤I → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if I ≤ max 1 T*cappedRepresentative nr then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0)≤ + ENNReal.ofReal (Kg*dyadicBalanceConstant (1/2) (1/2)* + ((I : ℝ)^(3/4:ℝ)*p*ν^(3/2:ℝ)*(φ/θ^2))+ + Kb*Real.sqrt I*dyadicBalanceConstant 1 (1/2)* + (p*ν^(4/3:ℝ)*θ^(-(2/3:ℝ))*φ^(1/3:ℝ))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd.direct_source_large_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nt nf j a b I w hS hS0 ha hb hJI hI + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nt + let φ := cappedRepresentative nf + let σ := cappedRepresentative j + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*ν/θ^2 + let G := fun n=>ENNReal.ofReal (Kg*min (ag*Real.sqrt (max 1 T*cappedRepresentative n)) + (bg/Real.sqrt (max 1 T*cappedRepresentative n))) + let Bm := fun n=>ENNReal.ofReal (Kb*Real.sqrt I*min + (max 1 T*cappedRepresentative n*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (max 1 T*cappedRepresentative n)))) + have hp : 0

‖z.1‖) (tsupport d.f₀) from continuous_fst.norm.continuousOn) + obtain ⟨C,hC,hb⟩ := boundaryLorentzForce_datum_bound hd (max 1 T₀) (R+max 1 T₀) + refine ⟨C,hC,?_⟩ + intro T hT hTT E B F zX hz t ht + have hx0 : ‖zX.1‖≤R := hR ⟨zX,hz,rfl⟩ + have hh := (F.position_lipschitz zX).dist_le_mul t ⟨ht.1.le,ht.2⟩ 0 ⟨le_rfl,hT⟩ + simp only [F.initial,NNReal.coe_one,one_mul,Real.dist_eq,sub_zero,abs_of_nonneg ht.1.le] at hh + apply hb t ⟨ht.1,ht.2.trans (hTT.trans (le_max_right _ _))⟩ (F.flow zX t).1 _ _ (norm_velocity_lt_one _).le + rw [mem_closedBall,dist_zero_right] + calc + ‖(F.flow zX t).1‖=‖((F.flow zX t).1-zX.1)+zX.1‖ := by rw [sub_add_cancel] + _≤‖(F.flow zX t).1-zX.1‖+‖zX.1‖ := norm_add_le _ _ + _≤t+R := add_le_add (by simpa only [dist_eq_norm] using hh) hx0 + _≤R+max 1 T₀ := by linarith only [ht.2,hTT,le_max_right (1:ℝ) T₀] + +lemma Admissible.direct_lorentz_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 1≤A → 1≤P → 1≤Real.log (2+P) → + ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀(zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)≤ + ENNReal.ofReal (C*Real.sqrt w*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cb,hCb,hdatum⟩ := hd.supported_boundary_force_uniform T₀ + obtain ⟨Ct,hCt,htrans⟩ := hd.direct_transport_uniform T₀ + obtain ⟨Cs,hCs,hsource⟩ := hd.direct_source_absolute_uniform T₀ + refine ⟨Cb+(4*Real.pi)⁻¹*(Ct+Cs),by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hphysical hband HZ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hsw : 1≤Real.sqrt w := by simpa using Real.sqrt_le_sqrt hw + have hIB : I≤B := by + have hIs : I≤Real.sqrt I := by nlinarith [Real.sq_sqrt hI.le,Real.sqrt_nonneg I] + exact hIs.trans ((le_mul_of_one_le_left (Real.sqrt_nonneg I) hP).trans + (show P*Real.sqrt I≤B from le_add_of_nonneg_right (by positivity))) + have hJB : b-a≤Real.sqrt w*B := hJI.trans (hIB.trans (by nlinarith)) + have hcon := (F.continuous_prefixFlow hs.energyPrefix hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcon.fst.measurable + have hV : Measurable V := hcon.snd.measurable + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hDb : ∀t∈Ioo 0 T∩Icc a b, + ‖boundaryLorentzForce (datumBoundarySolution d) t (X t) (velocity (V t))‖≤Cb := by + intro t ht + dsimp only [X,V,prefixFlow] + rw [prefixClamp_eq (hJ ht.2)] + exact hdatum T hT hTT s.E s.B F zX hzX t ⟨ht.1.1,ht.1.2.le⟩ + have hraw : (∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)= + ∫⁻t in Icc a b,ENNReal.ofReal ‖s.E (t,X t)+cross (velocity (V t)) (s.B (t,X t))‖ := by + apply lintegral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht + simp only [prefixMomentumForce,lorentzField,lorentzPhase,X,V,prefixFlow,prefixClamp_eq (hJ ht)] + rw [hraw] + apply (hs.direct_lorentz_triangle_bound hT X V hX hV measurableSet_Icc hJ Cb hCb hDb).trans + have hD : ENNReal.ofReal Cb*volume (Icc a b)≤ENNReal.ofReal (Cb*Real.sqrt w*B) := by + rw [Real.volume_Icc,←ENNReal.ofReal_mul hCb] + apply ENNReal.ofReal_le_ofReal + simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hJB hCb + have ht := htrans M A P hM (zero_le_one.trans hA) hP hL s T F hs hT hTT zX a b I w + hzX ha hb hI hI1 hJI (zero_lt_one.trans_le hw) hwP hphysical hband HZ + have hs' := hsource M A P hM hA hP hL s T F hs hT hTT zX a b I w + hzX ha hb hab hI hI1 hJI hw hwP hIP hphysical hband HZ + have ht' := ht.trans (show ENNReal.ofReal (Ct*B)≤ENNReal.ofReal (Ct*Real.sqrt w*B) from + ENNReal.ofReal_le_ofReal (by + have hh := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hsw hCt) hB + simpa only [mul_one] using hh)) + apply (add_le_add hD (mul_le_mul' le_rfl (add_le_add ht' hs'))).trans_eq + rw [←ENNReal.ofReal_add (by positivity : 0≤Ct*Real.sqrt w*B) (by positivity : 0≤Cs*Real.sqrt w*B), + ←ENNReal.ofReal_mul (by positivity : 0≤(4*Real.pi)⁻¹), + ←ENNReal.ofReal_add (by positivity : 0≤Cb*Real.sqrt w*B) (by positivity)] + congr 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectMixedCover.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectMixedCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ddfbe1547acc0485bf6f43c46b38709349794cc --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectMixedCover.lean @@ -0,0 +1,233 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.UnselectedCover +import OAI.Analysis.VlasovMaxwell.Retarded.DirectSmallAbsolute + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +def directMixedSector (P : ℝ) (N : ℕ) : Set (UnselectedCoverIndex N) := + {i | match i with + | .inl k => k∈representativeSmallSector P + | .inr i => sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val} + +lemma directMixed_tsum {N : ℕ} (T P w : ℝ) (f : ClosedConeBin→ℝ≥0∞) : + (∑'i : UnselectedCoverIndex N,(directMixedSector P N).indicator + (fun i=>f (unselectedCoverBin T w i)) i)= + (∑'k : Fin 4→ℕ,(representativeSmallSector P).indicator (fun k=>f (representativeClosedBin T w k)) k)+ + (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>f (directOuterBin T w i.1 i.2)) i) := by + rw [Summable.tsum_sum ENNReal.summable ENNReal.summable] + rfl + +lemma physical_direct_mixed_cover {T P w t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} {N : ℕ} (hP : 0≤P) (hwP : w≤P) (hN : 8192*P≤(2:ℝ)^N) + (ht : t∈J) (htT : t≤T) (hσ : σ∈Ico 0 t) (hb : q (V t)∈Icc (w/8) (8*w)) + (n : Sphere) (v : Vec) (hv : 1024*q v≤P) : + ∃i∈directMixedSector P N, + ((t,σ,n),v)∈physicalBinPhaseSet V (unselectedCoverBin T w i) J := by + have hr : 0∫⁻z,f (unselectedCoverBin T w i) z ∂physicalBinMeasure V (unselectedCoverBin T w i) J) i := by + have hc := physicalBinFamily_cover_lintegral hV hJ (unselectedCoverBin T w) (directMixedSector P N) + (measurable_directTriangleDensity hs hT hX hJ hK) + (directTriangleDensity_mixed_cover hP hwP N hN hphysical X V hband K) + apply hc.trans + apply ENNReal.tsum_le_tsum + intro i + apply indicator_le_indicator + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV _ hJ)] with z hz + exact hbin _ z hz + +lemma Admissible.direct_source_absolute_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 1≤A → + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∫⁻p,directTriangleDensity s (fun t=>(prefixFlow F.flow T zX t).1) T (Icc a b) + (directSourceTriangleKernel s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) T) p ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*Real.sqrt w*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hsmall⟩ := hd.small_source_absolute_uniform T₀ + obtain ⟨Cr,hCr,hremaining⟩ := hd.direct_remaining_source_unrestricted_uniform + obtain ⟨K,hK,hcount⟩ := exists_direct_dyadic_count + refine ⟨Cs+Cr*(1+K^4),by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP hphysical hband HZ + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let cost := fun B : ClosedConeBin=>∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z + ∂physicalBinMeasure V B (Icc a b) + have hB : 0≤B := by dsimp [B]; positivity + have hf0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + rw [show (fun z=>s.f (0,z))=d.f₀ from funext hs.initial_f] + have hcont := (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcont.fst.measurable + have hV : Measurable V := hcont.snd.measurable + have hband' : ∀t∈Icc a b,q (V t)∈Icc (w/8) (8*w) := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (Icc_subset_Icc ha hb ht)] using hband t ht + have hh := directTriangle_mixed_family_estimate hs.energyPrefix hT (zero_le_one.trans hP) hwP N hN + hphysical X V hX hV (Icc a b) measurableSet_Icc hband' + (directSourceTriangleKernel s X V T) (measurable_directSourceTriangleKernel hs.energyPrefix hT hX hV) + (physicalDirectSourceDensity s X V) (fun B _ hz=>directSourceTriangle_bin_bound (Icc_subset_Icc ha hb) B hz) + change _≤∑'i : UnselectedCoverIndex N,(directMixedSector P N).indicator + (fun i=>cost (unselectedCoverBin T w i)) i at hh + rw [directMixed_tsum] at hh + have hsm := hsmall M A P hM (zero_le_one.trans hA) hP hL s T F hs hT hTT zX a b I w + hzX ha hb hab hI hI1 hJI hw hwP hIP HZ + have hrem := hremaining s T F hs hT zX (tsupport d.f₀) a b I w M A P K N hd.2.1 hf0 + ha hb hab hI hI1 hJI hM hA hP hL (zero_lt_one.trans_le hw) hwP hIP hK hNc (HZ zX hzX) HZ + have hright : (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (directOuterBin T w i.1 i.2)) i)≤ENNReal.ofReal (Cr*(1+K^4)*B) := by + change (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (relativeRepresentativeClosedBin T w + ![(i.1 0).val,(i.1 1).val,(i.1 2).val,i.2] (i.1 3).val)) i)≤_ + rw [directOuter_remaining_sum P (fun np nf nt j nr=>cost (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j))] + exact hrem + have hright' : (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (directOuterBin T w i.1 i.2)) i)≤ENNReal.ofReal (Cr*(1+K^4)*Real.sqrt w*B) := by + apply hright.trans + apply ENNReal.ofReal_le_ofReal + have hsw : 1≤Real.sqrt w := by simpa using Real.sqrt_le_sqrt hw + have hh := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hsw (by positivity : 0≤Cr*(1+K^4))) hB + simpa only [mul_one] using hh + apply hh.trans ((add_le_add hsm hright').trans_eq ?_) + rw [←ENNReal.ofReal_add (by positivity : 0≤Cs*Real.sqrt w*B) (by positivity : 0≤Cr*(1+K^4)*Real.sqrt w*B)] + congr 1 + ring + +end RVM + +end + +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.direct_transport_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0≤A → 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + (∫⁻p,directTriangleDensity s (fun t=>(prefixFlow F.flow T zX t).1) T (Icc a b) + (directTransportTriangleKernel (fun t=>(prefixFlow F.flow T zX t).2)) p ∂trianglePhaseMeasure)≤ + ENNReal.ofReal (C*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cs,hCs,hsmall⟩ := hd.small_transport_uniform T₀ + obtain ⟨Cr,hCr,hremaining⟩ := hd.direct_remaining_transport_uniform_expanded + obtain ⟨K,hK,hcount⟩ := exists_direct_dyadic_count + refine ⟨Cs+Cr*max 1 T₀,by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP hphysical hband HZ + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + let cost := fun B : ClosedConeBin=>∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z + ∂physicalBinMeasure V B (Icc a b) + have hB : 0≤B := by dsimp [B]; positivity + have hf0 : tsupport (fun z=>s.f (0,z))⊆tsupport d.f₀ := by + rw [show (fun z=>s.f (0,z))=d.f₀ from funext hs.initial_f] + have hcont := (F.continuous_prefixFlow hs.energyPrefix hT).comp (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hX : Measurable X := hcont.fst.measurable + have hV : Measurable V := hcont.snd.measurable + have hband' : ∀t∈Icc a b,q (V t)∈Icc (w/8) (8*w) := by + intro t ht + simpa only [V,prefixFlow,prefixClamp_eq (Icc_subset_Icc ha hb ht)] using hband t ht + have hh := directTriangle_mixed_family_estimate hs.energyPrefix hT (zero_le_one.trans hP) hwP N hN + hphysical X V hX hV (Icc a b) measurableSet_Icc hband' + (directTransportTriangleKernel V) (measurable_directTransportTriangleKernel hV) + (physicalDirectTransportDensity s X V) (fun B _ hz=>directTransportTriangle_bin_bound (Icc_subset_Icc ha hb) B hz) + change _≤∑'i : UnselectedCoverIndex N,(directMixedSector P N).indicator + (fun i=>cost (unselectedCoverBin T w i)) i at hh + rw [directMixed_tsum] at hh + have hsm := hsmall M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hI hI1 hJI hw hwP HZ + have hrem := hremaining P (zero_le_one.trans hP) s T F hs.energyPrefix hT hs.initial_f zX + (tsupport d.f₀) a b I w hd.2.1 hf0 ha hb hJI hI hI1 + have hright : (∑'i : DirectOuterIndex N×ℕ,({i : DirectOuterIndex N×ℕ | + sourceRepresentative (i.1 0).val≤128*P ∧ + cappedRepresentative (i.1 2).val≤16384*cappedRepresentative (i.1 1).val}).indicator + (fun i=>cost (directOuterBin T w i.1 i.2)) i)≤ENNReal.ofReal ((Cr*max 1 T₀)*B) := by + apply (directOuter_remaining_le_tsum P + (fun np nf nt j nr=>cost (relativeRepresentativeClosedBin T w ![np,nt,nf,nr] j))).trans + apply hrem.trans + apply ENNReal.ofReal_le_ofReal + exact mul_le_mul (mul_le_mul_of_nonneg_left (max_le_max le_rfl hTT) hCr) + (le_add_of_nonneg_right (by positivity)) (by positivity) (by positivity) + apply hh.trans ((add_le_add hsm hright).trans_eq ?_) + rw [←ENNReal.ofReal_add (mul_nonneg hCs hB) (by positivity)] + congr 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectSmallAbsolute.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectSmallAbsolute.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e1b08d1493437d6830d1340d1ee8359056f2c1e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/DirectSmallAbsolute.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SpatialEstimates +import OAI.Analysis.VlasovMaxwell.Population.GoodSharedEstimates +import OAI.Analysis.VlasovMaxwell.Population.MagneticEstimates + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory Classical +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.small_source_absolute_uniform {d : Datum} (hd : Admissible d) (T₀ : ℝ) : + ∃C : ℝ,0≤C ∧ ∀M A P : ℝ,1≤M → 0≤A → + 1≤P → 1≤Real.log (2+P) → + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + SmoothClassicalPrefix d s T → 0≤T → T≤T₀ → + ∀ (zX : Phase) (a b I w : ℝ), + zX∈tsupport d.f₀ → 0≤a → b≤T → a≤b → 0(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let R := representativeSmallSector P + (∑'k : Fin 4→ℕ,R.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s X V (representativeClosedBin T w k) z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*Real.sqrt w*(P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w)) := by + obtain ⟨Cg,hCg,hgood⟩ := hd.small_good_uniform T₀ + obtain ⟨Cm,hCm,hmag⟩ := hd.magnetic_small_uniform T₀ + refine ⟨10240*(Cg+Cm),by positivity,?_⟩ + intro M A P hM hA hP hL s T F hs hT hTT zX a b I w hzX ha hb hab hI hI1 hJI hw hwP hIP HZ + dsimp only + let R := representativeSmallSector P + let G := fun k=>representativeGoodCost s F zX w k a b + let H := fun k=>representativeMagneticCost s F zX w k a b + let B := P*Real.sqrt I+(M+Real.sqrt A)*I*P^2*Real.log (2+P)/w + have hB : 0≤B := by dsimp [B]; positivity + have hPB : P*Real.sqrt I≤B := le_add_of_nonneg_right (by positivity) + have hsum : (∑'k : Fin 4→ℕ,R.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal 10240*((∑'k,R.indicator G k)+(∑'k,R.indicator H k)) := by + rw [←ENNReal.tsum_add,←ENNReal.tsum_mul_left] + apply ENNReal.tsum_le_tsum + intro k + by_cases hk : k∈R + · simp only [indicator_of_mem hk] + have hc := (F.continuous_prefixFlow hs.energyPrefix hT).comp + (continuous_id.prodMk continuous_const : Continuous (fun time : ℝ=>(time,zX))) + have hp : 0] (0:ℝ)) (𝓝 (F 0)) := by + apply (hF 0 ⟨le_rfl,hR.le⟩).mono_left + apply le_inf nhdsWithin_le_nhds + apply Filter.le_principal_iff.mpr + filter_upwards [Ioo_mem_nhdsGT hR] with a ha + exact ⟨ha.1.le,ha.2.le⟩ + +lemma RegularParticle.rho_continuous_slab {f : Particle} (hf : RegularParticle f) + {T : ℝ} (hT : 0≤T) : ContinuousOn (fun p : ℝ × Vec => rho (fun z => f (p.1,z)) p.2) + (Icc 0 T ×ˢ (univ : Set Vec)) := by + have h := hf.moment_continuous_slab (w:=fun _ => (1:ℝ)) continuous_const hT + change ContinuousOn (fun p : ℝ × Vec => ∫ v, f (p.1,p.2,v) • (1:ℝ)) _ at h + simpa only [rho,smul_eq_mul,mul_one] using h + +lemma RegularParticle.current_continuous_slab {f : Particle} (hf : RegularParticle f) + {T : ℝ} (hT : 0≤T) : ContinuousOn (fun p : ℝ × Vec => current (fun z => f (p.1,z)) p.2) + (Icc 0 T ×ˢ (univ : Set Vec)) := + hf.moment_continuous_slab (contDiff_velocity (k:=1)).continuous hT + +lemma continuousOn_cone_boundary_comp {W : Type*} [TopologicalSpace W] {H : ℝ × Vec → W} + {T : ℝ} (hT : 0 H (p.1,x+(T-p.1) • p.2)) + (Icc 0 (T/2) ×ˢ sphere (0:Vec) 1) := by + apply hH.comp (continuous_fst.prodMk + (continuous_const.add ((continuous_const.sub continuous_fst).smul continuous_snd))).continuousOn + intro p hp + exact ⟨⟨hp.1.1,by linarith [hp.1.2]⟩,mem_univ _⟩ + +def electricConeBoundary (s : Solution) (T : ℝ) (x : Vec) (i : Fin 3) (a : ℝ) : ℝ := + freeWave (fun y => s.E (a,y) i) (fun y => curl (fun z => s.B (a,z)) y i) (T-a,x) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, (T-a)^2*dot n.1 + (retardedElectricFlux s T x i (x+(T-a) • n.1)) ∂sphereMeasure) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, (T-a)*n.1 i* + rho (fun z => s.f (a,z)) (x+(T-a) • n.1) ∂sphereMeasure) - + waveK (fun y => current (fun z => s.f (a,z)) y i) (T-a,x) + +def magneticConeBoundary (s : Solution) (T : ℝ) (x : Vec) (i : Fin 3) (a : ℝ) : ℝ := + freeWave (fun y => s.B (a,y) i) (fun y => -curl (fun z => s.E (a,z)) y i) (T-a,x) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, (T-a)^2*dot n.1 + (retardedMagneticFlux s T x i (x+(T-a) • n.1)) ∂sphereMeasure) + + (4*Real.pi)⁻¹ * (∫ n : Sphere, + (T-a)*n.1 (curlA i)*current (fun z => s.f (a,z)) (x+(T-a) • n.1) (curlB i) - + (T-a)*n.1 (curlB i)*current (fun z => s.f (a,z)) (x+(T-a) • n.1) (curlA i) ∂sphereMeasure) + +lemma continuousOn_electricConeBoundary {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 hp.1) + have hB : ContDiffOn ℝ ∞ s.B (Icc 0 T ×ˢ (univ : Set Vec)) := (hm T hT.le).2.2.mono (fun p hp => hp.1) + have hcurl := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (continuousOn_slab_curl hT (hB.of_le (by decide))) + have hfree := (continuousOn_freeWave_slab hT hE hcurl x i).mono + (show Icc 0 (T/2) ⊆ Icc 0 T from fun a ha => ⟨ha.1,by linarith [ha.2]⟩) + have hflux := continuousOn_electric_flux_boundary hs.1 hc hT x i + have hdot := (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hflux) + have hflux' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).pow 2).mul hdot) + have hrho := continuousOn_cone_boundary_comp hT (hs.regularParticle.rho_continuous_slab hT.le) x + have hni : Continuous (fun p : ℝ × Vec => p.2 i) := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp continuous_snd + have hrho' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).mul hni.continuousOn).mul hrho) + have hj := continuousOn_cone_boundary_comp hT (hs.regularParticle.current_continuous_slab hT.le) x + have hji := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn hj + have hj' := continuousOn_integral_sphere hji + exact ((hfree.sub (hflux'.const_mul ((4*Real.pi)⁻¹))).sub + (hrho'.const_mul ((4*Real.pi)⁻¹))).sub + ((((continuousOn_const (c:=T)).sub continuousOn_id).mul hj').const_mul ((4*Real.pi)⁻¹)) + +lemma continuousOn_magneticConeBoundary {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 hp.1) + have hB : ContDiffOn ℝ ∞ s.B (Icc 0 T ×ˢ (univ : Set Vec)) := (hm T hT.le).2.2.mono (fun p hp => hp.1) + have hcurl := ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp_continuousOn + (continuousOn_slab_curl hT (hE.of_le (by decide)))).neg + have hfree := (continuousOn_freeWave_slab hT hB hcurl x i).mono + (show Icc 0 (T/2) ⊆ Icc 0 T from fun a ha => ⟨ha.1,by linarith [ha.2]⟩) + have hflux := continuousOn_magnetic_flux_boundary hs.1 hc hT x i + have hdot := (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hflux) + have hflux' := continuousOn_integral_sphere + ((((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).pow 2).mul hdot) + have hj := continuousOn_cone_boundary_comp hT (hs.regularParticle.current_continuous_slab hT.le) x + have hterm (j k : Fin 3) := (((continuousOn_const (c:=T)).sub continuous_fst.continuousOn).mul + (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp continuous_snd).continuousOn)).mul + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).continuous.comp_continuousOn hj) + have hj' := continuousOn_integral_sphere ((hterm (curlA i) (curlB i)).sub (hterm (curlB i) (curlA i))) + exact (hfree.sub (hflux'.const_mul ((4*Real.pi)⁻¹))).add (hj'.const_mul ((4*Real.pi)⁻¹)) + +lemma classical_electric_physical_representation {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 retardedElectricDensity s T x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedElectricDensity_le hs.1 hs.2.1 hs.2.2.1 hc hT.le le_rfl x) + have hlim := (tendsto_right_of_continuousOn_Icc (show 0 electricConeBoundary s T x i a + (4*Real.pi)⁻¹ * + (∫ z in ball (0:Vec) (T-a), retardedElectricDensity s T x (x+z) i)) =ᶠ[𝓝[>] (0:ℝ)] + (fun _ => s.E (T,x) i) := by + filter_upwards [Ioo_mem_nhdsGT hT] with a ha + have he := classical_shifted_electric_physical_representation hs hm ha.1 + (show 0.symm + +lemma classical_magnetic_physical_representation {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {T : ℝ} (hT : 0 retardedMagneticDensity s T x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedMagneticDensity_le hs.1 hs.2.1 hs.2.2.1 hc hT.le le_rfl x) + have hlim := (tendsto_right_of_continuousOn_Icc (show 0 magneticConeBoundary s T x i a + (4*Real.pi)⁻¹ * + (∫ z in ball (0:Vec) (T-a), retardedMagneticDensity s T x (x+z) i)) =ᶠ[𝓝[>] (0:ℝ)] + (fun _ => s.B (T,x) i) := by + filter_upwards [Ioo_mem_nhdsGT hT] with a ha + have he := classical_shifted_magnetic_physical_representation hs hm ha.1 + (show 0.symm + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma transport_retarded_electric_integral_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hV : TransportFor s s.E s.B) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedG x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedG hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hki : Continuous (fun v => physicalElectricKernel (coneRadius x y) (coneDirection x y) + (velocity v) (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hk + have hid := classical_retarded_integral_identity + (L := fun v => ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i-velocity v i)/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + exact hV (t-coneRadius x y) (y,v) + simpa only [retardedDensity,mul_assoc] using retarded_electric_density_identity hf' hxy hv i + +lemma transport_retarded_magnetic_integral_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hV : TransportFor s s.E s.B) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedH x (z,v) i) • velocity v) y := by + have hG : ∀ z ∈ retardedSpaceDomain t x, ∀ v, + ContDiffAt ℝ 1 (fun z => retardedH x z i) (z,v) := by + intro z hz v + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp (z,v) + (contDiffAt_retardedH hz.1) + have hu : Continuous velocity := (contDiff_velocity (k:=1)).continuous + have hd : Continuous (fun v => 1-dot (coneDirection x y) (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_const.prodMk hu)) + have hk := continuous_physicalElectricKernel_velocity + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) (coneDirection_norm hxy) + (s.E (t-coneRadius x y,y)) (s.B (t-coneRadius x y,y)) + have hkc : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y)))))) := + (contDiff_cross (k:=1)).continuous.comp (continuous_const.prodMk hk) + have hki : Continuous (fun v => cross (coneDirection x y) + (physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+ + cross (velocity v) (s.B (t-coneRadius x y,y))))) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.comp hkc + have hid := classical_retarded_integral_identity + (L := fun v => -((coneRadius x y)^2)⁻¹*cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) - + cross (coneDirection x y) (velocity v) i/coneRadius x y * + fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) hf hc hxy ht hG (hd.mul hki) + simp only [retardedDensity,mul_assoc,Pi.mul_apply] at hid ⊢ + apply hid + intro v + have hf' := particle_differentiableAt_positive hf ht y v + have hv : fderiv ℝ s.f (t-coneRadius x y,y,v) + (1,velocity v,s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))=0 := by + exact hV (t-coneRadius x y) (y,v) + simpa only [retardedDensity,mul_assoc] using retarded_magnetic_density_identity hf' hxy hv i + +lemma transport_retarded_electric_moment_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hV : TransportFor s s.E s.B) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y + + (coneDirection x y i/coneRadius x y)* + dirD (fun p : ℝ × Vec => rho (fun z => s.f (p.1,z)) p.2) (1,0) (t-coneRadius x y,y) - + (coneRadius x y)⁻¹* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 i) (1,0) (t-coneRadius x y,y) = + (∫ v : Vec, s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))* + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))) i) - + divergence (fun z => ∫ v : Vec, + (retardedDensity s.f t x (z,v)*retardedG x (z,v) i) • velocity v) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hvel : ContDiff ℝ 1 (fun v => velocity v i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp contDiff_velocity + have hfI : Integrable (fun v : Vec => s.f (t-coneRadius x y,y,v)) := by + simpa only [one_mul] using hr.scalar_moment_integrable (continuous_const (y:=(1:ℝ))) ht.le y + have htI : Integrable (fun v : Vec => fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := by + simpa only [one_mul] using hr.time_moment_integrable (continuous_const (y:=(1:ℝ))) ht y + have hjI := hr.time_moment_integrable hvel.continuous ht y + have hsum : Integrable (fun v : Vec => + ((coneRadius x y)^2)⁻¹*coneDirection x y i*s.f (t-coneRadius x y,y,v) + + (coneDirection x y i/coneRadius x y)*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := + (hfI.const_mul _).add (htI.const_mul _) + rw [dirD_rho hr ht y,dirD_current_component hr ht y i,rho] + rw [← integral_const_mul,← integral_const_mul,← integral_const_mul, + ← integral_add (hfI.const_mul _) (htI.const_mul _), + ← integral_sub hsum (hjI.const_mul _)] + convert transport_retarded_electric_integral_identity hf hc hV hxy ht i using 1 + congr 1 + funext v + dsimp only + ring + +lemma transport_retarded_magnetic_moment_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hV : TransportFor s s.E s.B) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y) i - + (coneRadius x y)⁻¹*(coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y)) = + retardedMagneticDensity s t x y i - divergence (retardedMagneticFlux s t x i) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hcv : ContDiff ℝ 1 (fun v : Vec => cross (coneDirection x y) (velocity v) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp + (contDiff_cross.comp (contDiff_const.prodMk contDiff_velocity)) + have hi := hr.moment_integrable (contDiff_velocity (k:=1)).continuous ht.le y + have hcross : cross (coneDirection x y) (current (fun z => s.f (t-coneRadius x y,z)) y) i = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) := by + have hi' := (crossCLM (coneDirection x y)).integrable_comp hi + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi' + unfold current + rw [← integral_cross_left hi] + simpa only [crossCLM_apply,PiLp.proj_apply,cross_smul_right,PiLp.smul_apply,smul_eq_mul,mul_comm] using he.symm + have hdt : coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y) = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0) := by + have hInt (k : Fin 3) : Integrable (fun v : Vec => velocity v k*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := hr.time_moment_integrable + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).continuous.comp (contDiff_velocity (k:=1)).continuous) ht y + rw [dirD_current_component hr ht y,dirD_current_component hr ht y, + ← integral_const_mul,← integral_const_mul,← integral_sub ((hInt _).const_mul _) ((hInt _).const_mul _)] + apply integral_congr_ae + filter_upwards [] with v + rw [cross_apply_cyclic] + ring + rw [hcross,hdt,retardedMagneticDensity_component hf hc hxy ht.le i, + ← integral_const_mul,← integral_const_mul, + ← integral_sub ((hr.scalar_moment_integrable hcv.continuous ht.le y).const_mul _) + ((hr.time_moment_integrable hcv.continuous ht y).const_mul _)] + unfold retardedMagneticFlux + convert transport_retarded_magnetic_integral_identity hf hc hV hxy ht i using 1 + congr 1 + funext v + dsimp only + ring + +lemma electricMomentDensity_transport {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (hV : TransportFor s s.E s.B) {t : ℝ} (x : Vec) (i : Fin 3) + {z : Vec} (hz : z≠0) (hzt : ‖z‖ rho (fun q => s.f (p.1,q)) p.2) + (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z = + retardedElectricDensity s t x (x+z) i - + divergence (retardedElectricFlux s t x i) (x+z) := by + have hxy : x≠x+z := by + intro h + apply hz + exact add_left_cancel (show x+z=x+0 by simpa using h.symm) + have ht : 0 current (fun q => s.f (p.1,q)) p.2) t x i z = + retardedMagneticDensity s t x (x+z) i - + divergence (retardedMagneticFlux s t x i) (x+z) := by + have hxy : x≠x+z := by + intro h + apply hz + exact add_left_cancel (show x+z=x+0 by simpa using h.symm) + have ht : 0 ∫ n : Sphere, + ε^2*dot n.1 (F (ε • n.1)) ∂sphereMeasure) (𝓝[>] (0:ℝ)) (𝓝 0)) + (hb : ContinuousOn (fun p : ℝ × Vec => F ((t-p.1) • p.2)) + (Icc 0 (t/2) ×ˢ sphere (0:Vec) 1)) : + (∫ z in ball (0:Vec) t, divergence F z) = + ∫ n : Sphere, t^2*dot n.1 (F (t • n.1)) ∂sphereMeasure := by + have hG : ContinuousOn (fun a : ℝ => ∫ n : Sphere, + (t-a)^2*dot n.1 (F ((t-a) • n.1)) ∂sphereMeasure) (Icc 0 (t/2)) := by + apply continuousOn_integral_sphere (F:=fun p : ℝ × Vec => + (t-p.1)^2*dot p.2 (F ((t-p.1) • p.2))) + exact ((continuous_const.sub continuous_fst).pow 2).continuousOn.mul + ((contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (continuous_snd.continuousOn.prodMk hb)) + have hlim := tendsto_right_of_continuousOn_Icc (show 0 ∫ z in ball (0:Vec) (t-a), divergence F z) =ᶠ[𝓝[>] (0:ℝ)] + (fun a => ∫ n : Sphere, (t-a)^2*dot n.1 (F ((t-a) • n.1)) ∂sphereMeasure) := by + filter_upwards [Ioo_mem_nhdsGT ht] with a ha + exact divergence_ball_singular (show 0 rho (fun q => s.f (p.1,q)) p.2)) + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + {t : ℝ} (ht : 0 rho (fun q => s.f (p.1,q)) p.2) + (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) = + (∫ z in ball (0:Vec) t, retardedElectricDensity s t x (x+z) i) - + ∫ n : Sphere, t^2*dot n.1 (retardedElectricFlux s t x i (x+t • n.1)) ∂sphereMeasure := by + have hM := integrableOn_electricMomentDensity hρ hj ht.le x i + have hD := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedElectricDensity_le hf hE hB hc ht.le le_rfl x) + change IntegrableOn (fun z : Vec => retardedElectricDensity s t x (x+z) i) (ball (0:Vec) t) at hD + let F : Vec → Vec := fun z => retardedElectricFlux s t x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) t)] + (fun z => retardedElectricDensity s t x (x+z) i - electricMomentDensity (fun p => rho (fun q => s.f (p.1,q)) p.2) + (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := electricMomentDensity_transport hf hc hV x i hz0 + (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ rho (fun q => s.f (p.1,q)) p.2) + (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) := by + rw [integral_congr_ae he,integral_sub hD hM] + change _ = ∫ n : Sphere, t^2*dot n.1 (retardedElectricFlux s t x i (x+t • n.1)) ∂sphereMeasure at hg + linarith + +lemma integrated_magneticMomentDensity_transport {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) (hV : TransportFor s s.E s.B) + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + {t : ℝ} (ht : 0 current (fun q => s.f (p.1,q)) p.2) t x i z) = + (∫ z in ball (0:Vec) t, retardedMagneticDensity s t x (x+z) i) - + ∫ n : Sphere, t^2*dot n.1 (retardedMagneticFlux s t x i (x+t • n.1)) ∂sphereMeasure := by + have hM := integrableOn_magneticMomentDensity hj t x i + have hD := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedMagneticDensity_le hf hE hB hc ht.le le_rfl x) + change IntegrableOn (fun z : Vec => retardedMagneticDensity s t x (x+z) i) (ball (0:Vec) t) at hD + let F : Vec → Vec := fun z => retardedMagneticFlux s t x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) t)] + (fun z => retardedMagneticDensity s t x (x+z) i - magneticMomentDensity (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := magneticMomentDensity_transport hf hc hV x i hz0 + (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ current (fun q => s.f (p.1,q)) p.2) t x i z) := by + rw [integral_congr_ae he,integral_sub hD hM] + change _ = ∫ n : Sphere, t^2*dot n.1 (retardedMagneticFlux s t x i (x+t • n.1)) ∂sphereMeasure at hg + linarith + +lemma mixed_electric_physical_representation {s : Solution} {E' B' : Field} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) (hV : TransportFor s s.E s.B) + (hE' : ContDiff ℝ ∞ E') (hB' : ContDiff ℝ ∞ B') + (hρ : ContDiff ℝ ∞ (fun p : ℝ × Vec => rho (fun q => s.f (p.1,q)) p.2)) + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + (hM : MaxwellFor {s with E:=E',B:=B'}) {t : ℝ} (ht : 0 (hM r hr.1 y).1) + (fun r hr y => (hM r hr.1.le y).2.1) + (fun r hr y => by + rw [← spaceDiv_slice (hE'.differentiable (by simp))] + exact (hM r hr.1.le y).2.2.1) x i + rw [electricPotentialComponent_ball hρ hj ht] at he + change E' (t,x) i = _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) t, + electricMomentDensity (fun p => rho (fun q => s.f (p.1,q)) p.2) + (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) - _ - _) at he + rw [integrated_electricMomentDensity_transport hf hE hB hc hV hρ hj ht] at he + simp_rw [spaceCurl_slice (hB'.differentiable (by simp))] at he + simp only [electricConeBoundary,sub_zero,retardedElectricFlux] at he ⊢ + linarith + +lemma mixed_magnetic_physical_representation {s : Solution} {E' B' : Field} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) (hV : TransportFor s s.E s.B) + (hE' : ContDiff ℝ ∞ E') (hB' : ContDiff ℝ ∞ B') + (hj : ContDiff ℝ ∞ (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2)) + (hM : MaxwellFor {s with E:=E',B:=B'}) {t : ℝ} (ht : 0 (hM r hr.1.le y).1) + (fun r hr y => (hM r hr.1 y).2.1) + (fun r hr y => by + rw [← spaceDiv_slice (hB'.differentiable (by simp))] + exact (hM r hr.1.le y).2.2.2) x i + rw [magneticPotentialComponent_ball hj ht] at he + change B' (t,x) i = _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) t, + magneticMomentDensity (fun p => current (fun q => s.f (p.1,q)) p.2) t x i z) + _) at he + rw [integrated_magneticMomentDensity_transport hf hE hB hc hV hj ht] at he + simp_rw [spaceCurl_slice (hE'.differentiable (by simp))] at he + simp only [magneticConeBoundary,sub_zero,retardedMagneticFlux] at he ⊢ + linarith + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/GeneralDirectRadial.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/GeneralDirectRadial.lean new file mode 100644 index 0000000000000000000000000000000000000000..3282b5d670a61b37a7f9e595c21d693a2bc046b7 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/GeneralDirectRadial.lean @@ -0,0 +1,710 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RadialSummation + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma relativeRepresentative_source_angle {T w : ℝ} {k : Fin 4→ℕ} {j : ℕ} + {v n a : Vec} (hn : ‖n‖=1) + (hv : v∈coneBinMomentumSet (relativeRepresentativeClosedBin T w k j) n a) : + 1 ≤ sourceRepresentative (k 0)*cappedRepresentative (k 1) := by + have he := source_angle_coordinate_lower v n hn + have hθ := cappedRepresentative_pos (k 1) + have hq := q_pos v + have hhi : 1-dot n (velocity v)≤8*(cappedRepresentative (k 1))^2 := hv.2.1.2 + have hroot : Real.sqrt ((1-dot n (velocity v))/2)≤2*cappedRepresentative (k 1) := by + apply Real.sqrt_le_iff.mpr + refine ⟨by positivity,?_⟩ + linarith only [hhi] + have hqθ : 1/2≤2*q v*cappedRepresentative (k 1) := + he.trans (by nlinarith only [mul_le_mul_of_nonneg_left hroot hq.le]) + have hp : q v ≤ sourceRepresentative (k 0)/32 := hv.1.2 + nlinarith only [mul_le_mul_of_nonneg_right hp hθ.le,hqθ] + +lemma cone_relative_bin_small {v w n : Vec} {θ φ σ : ℝ} + (hn : ‖n‖=1) (hθ : 0≤θ) (hφ : 0≤φ) (hσ : 0≤σ) (hsep : 16*θ≤φ) + (hdlo : θ^2/2≤1-dot n (velocity v)) (hdhi : 1-dot n (velocity v)≤8*θ^2) + (hDlo : φ^2/2≤1-dot n (velocity w)) (hDhi : 1-dot n (velocity w)≤8*φ^2) + (helo : σ^2/2≤1-dot (velocity w) (velocity v)) + (hehi : 1-dot (velocity w) (velocity v)≤8*σ^2) : φ/8≤σ ∧ σ≤8*φ := by + obtain ⟨he,_,hD⟩ := cone_relative_bin_triangle hn hdlo hdhi hDlo hDhi helo hehi + have hsq := mul_self_le_mul_self (show 0≤16*θ by positivity) hsep + constructor <;> nlinarith + +lemma small_good_balance_scalar {I p θ φ σ R B : ℝ} + (hI : 0≤I) (hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + 1 ≤ sourceRepresentative np*cappedRepresentative nθ → + let p := sourceRepresentative np + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if I ≤ max 1 T*cappedRepresentative nr then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (Kg*dyadicBalanceConstant (1/2) (1/2)*(Real.sqrt I*p)*Real.sqrt (Real.sqrt I*p)+ + Kb*dyadicBalanceConstant 1 (1/2)*Real.sqrt I*p) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_large_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI hpθ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*ν/θ^2 + let G := fun n=>ENNReal.ofReal (Kg*min (ag*Real.sqrt (max 1 T*cappedRepresentative n)) + (bg/Real.sqrt (max 1 T*cappedRepresentative n))) + let Bm := fun n=>ENNReal.ofReal (Kb*Real.sqrt I*min + (max 1 T*cappedRepresentative n*p^2*ν^2*φ) + (Real.sqrt p*ν/(θ*Real.sqrt (max 1 T*cappedRepresentative n)))) + have hp : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w≤P → + sourceRepresentative np≤128*P → 1≤w → + cappedRepresentative nθ≤cappedRepresentative nφ → + cappedRepresentative nφ≤8*cappedRepresentative j → + 1 ≤ sourceRepresentative np*cappedRepresentative nθ → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤(w/P)^2 then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((Kg+Kb)*dyadicBalanceConstant (1/2) (1/2)* + Real.sqrt (24*256*16384*(1+16384*(M+Real.sqrt A))*w^3*Real.sqrt (Real.log (2+P)))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_relative_short_radial_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP hw1 hθφ hφσ hpθ hpσ hwσ HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w σ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + let D := dyadicBalanceConstant (1/2) (1/2) + let U := 24*256*16384*(1+16384*(M+Real.sqrt A))*w^3*Real.sqrt L + have hp : 0

s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → I≤1 → 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := relativeCauchyConstant Cg E (20*E) + let Kb := relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((64*Kg+Kb)*16777216*(1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹*Real.sqrt I) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.direct_source_short_near_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I w P hS hS0 ha hb hJI hI hI1 hw hP hpP hIP hsector hdeficit + dsimp only + have hn := hsource s T F hs hT h0 zX S np nθ nφ j a b I w hS hS0 ha hb hJI hI + have hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 1 ≤ P → 1 ≤ Real.log (2+P) → 1 ≤ w → w≤P → + sourceRepresentative np≤128*P → + cappedRepresentative nθ≤cappedRepresentative nφ → + cappedRepresentative nφ≤8*cappedRepresentative j → + 1 ≤ sourceRepresentative np*cappedRepresentative nθ → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*Real.log (2+P)) := by + obtain ⟨Cgs,Cbs,hCgs,hCbs,hshort⟩ := hd₀.direct_source_small_short_sum + obtain ⟨Cgd,Cbd,hCgd,hCbd,hdef⟩ := hd₀.direct_source_small_deficit_short_sum + obtain ⟨Cgl,Cbl,hCgl,hCbl,hlong⟩ := hd₀.direct_source_general_large_sum + let Ds := dyadicBalanceConstant (1/2) (1/2) + let Dm := dyadicBalanceConstant 1 (1/2) + let Dn := (1-((2:ℝ)⁻¹)^(1/2:ℝ))⁻¹ + let gs := relativeCauchyConstant Cgs 1 20 + let bs := relativeCauchyConstant Cbs 1 120 + let gd := relativeCauchyConstant Cgd 1 20 + let bd := relativeCauchyConstant Cbd 1 120 + let gl := relativeCauchyConstant Cgl 1 20 + let bl := relativeCauchyConstant Cbl 1 120 + let Cs := (gs+bs)*Ds*(24*256*16384*16384) + let Cd := (64*gd+bd)*16777216*Dn + let Cl := (gl*Ds*Real.sqrt 128+bl*Dm)*128 + have hDs : 0≤Ds := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDm : 0≤Dm := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hDn : 0≤Dn := shortSqrtConstant_pos.le + have hgs : 0≤gs := relativeCauchyConstant_nonneg hCgs + have hbs : 0≤bs := relativeCauchyConstant_nonneg hCbs + have hgd : 0≤gd := relativeCauchyConstant_nonneg hCgd + have hbd : 0≤bd := relativeCauchyConstant_nonneg hCbd + have hgl : 0≤gl := relativeCauchyConstant_nonneg hCgl + have hbl : 0≤bl := relativeCauchyConstant_nonneg hCbl + have hCs : 0≤Cs := by dsimp only [Cs]; positivity + have hCd : 0≤Cd := by dsimp only [Cd]; positivity + have hCl : 0≤Cl := by dsimp only [Cl]; positivity + refine ⟨Cs+Cd+Cl,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP1 hL hw1 hwP hpP hθφ hφσ hpθ HX HZ + dsimp only + let I := (w/P)^2 + let L := Real.log (2+P) + let E := ∫x : Vec,totalEnergy s (0,x) + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let J : ℕ→ℝ≥0∞ := fun nr=>∫⁻z : ConeCoordinate, + physicalDirectSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (B nr) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (B nr) (Icc a b) + let Jshort : ℕ→ℝ≥0∞ := fun nr=>if max 1 T*cappedRepresentative nr≤I then J nr else 0 + let Jlong : ℕ→ℝ≥0∞ := fun nr=>if I ≤ max 1 T*cappedRepresentative nr then J nr else 0 + let U := (1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*L + have hw : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 1≤P → 1 ≤ Real.log (2+P) → 1≤w → w≤P → + sourceRepresentative np≤128*P → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.sqrt w*Real.log (2+P)) := by + obtain ⟨Cr,hCr,hr⟩ := hd₀.direct_source_remaining_all_radii + obtain ⟨Cs,hCs,hs'⟩ := hd₀.direct_source_small_all_radii + refine ⟨Cr+Cs,add_nonneg hCr hCs,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP HX HZ + dsimp only + have hE : 0≤∫x : Vec,totalEnergy s (0,x) := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hw0 : 0(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + have hz (nr : ℕ) : (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j) (Icc a b))=0 := by + apply physicalDirectSource_integral_geometry_zero s hV measurableSet_Icc + intro h + exact hgeometry ⟨h.1,h.2 hsep⟩ + simp_rw [hz,tsum_zero] + exact bot_le + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/InitialPuncturedCone.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/InitialPuncturedCone.lean new file mode 100644 index 0000000000000000000000000000000000000000..eff24e92dddde2dfa5d2df57b73dbecaec47f006 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/InitialPuncturedCone.lean @@ -0,0 +1,726 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.LabelWeight + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.initial_label_lintegral {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) + {g : Phase→ENNReal} (hg : Measurable g) : + (∫⁻ z in initialConeLabels T (F.flow zX T).1, g z) = + ∫⁻ t in Ioo (0:ℝ) T, ∫⁻ n : Sphere,∫⁻ v : Vec, + ENNReal.ofReal (t^2*(1-dot n.1 (velocity (F.flow zX t).2))) * + g ((F.flow zX t).1-t • n.1,v) ∂volume ∂sphereMeasure := by + classical + let A := initialConeLabels T (F.flow zX T).1 + have hA : MeasurableSet A := + (isOpen_lt ((continuous_const.sub continuous_fst).norm) continuous_const).measurableSet + have hX : Continuous (prefixFlow F.flow T zX) := by + exact (F.continuousOn_time zX).comp_continuous + (continuous_const.max (continuous_const.min continuous_id)) (prefixClamp_mem hT) + let k : Sphere→ℝ→ENNReal := fun n t=> + ENNReal.ofReal (t^2*(1-dot n.1 (velocity (prefixFlow F.flow T zX t).2))) * + ∫⁻ v : Vec,g ((prefixFlow F.flow T zX t).1-t • n.1,v) + have hk : Measurable (Function.uncurry k) := by + have hn : Measurable (fun p : Sphere×ℝ => (p.1:Vec)) := + measurable_subtype_coe.comp measurable_fst + have hx := hX.measurable.comp (measurable_snd : Measurable (Prod.snd : Sphere×ℝ→ℝ)) + have hv := (contDiff_velocity (k:=1)).continuous.measurable.comp hx.snd + have hr : Measurable (fun p : Sphere×ℝ => + p.2^2*(1-dot (p.1:Vec) (velocity (prefixFlow F.flow T zX p.2).2))) := by + simp only [dot_eq_inner] + exact (measurable_snd.pow_const 2).mul + ((measurable_const (a:=(1:ℝ))).sub (hn.inner hv)) + have hg' : Measurable (fun p : (Sphere×ℝ)×Vec => + g ((prefixFlow F.flow T zX p.1.2).1-p.1.2 • (p.1.1:Vec),p.2)) := by + exact hg.comp (((hx.fst.sub (measurable_snd.smul hn)).comp measurable_fst).prodMk measurable_snd) + exact hr.ennreal_ofReal.mul hg'.lintegral_prod_right' + calc + _ = ∫⁻ y : Vec, ∫⁻ v : Vec, A.indicator g (y,v) := by + rw [← lintegral_indicator hA] + exact lintegral_prod _ (hg.indicator hA).aemeasurable + _ = ∫⁻ y in ball (F.flow zX T).1 T, ∫⁻ v : Vec,g (y,v) := by + rw [← lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y∈ball (F.flow zX T).1 T + · rw [indicator_of_mem hy] + apply lintegral_congr + intro v + apply indicator_of_mem + simpa only [A,initialConeLabels,mem_ofPred_eq,mem_ball,dist_eq_norm,norm_sub_rev] using hy + · rw [indicator_of_notMem hy] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + apply indicator_of_notMem + intro hz + apply hy + simpa only [A,initialConeLabels,mem_ofPred_eq,mem_ball,dist_eq_norm,norm_sub_rev] using hz + _ = ∫⁻ n : Sphere,∫⁻ t in Ioo (0:ℝ) T,k n t ∂volume ∂sphereMeasure := by + have hh := F.receiver_polar_lintegral (s:=0) ⟨le_rfl,hT⟩ zX (hg.lintegral_prod_right' (ν:=volume)) + simp only [sub_zero,zero_add] at hh + rw [hh] + apply lintegral_congr + intro n + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + simp only [k,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self ht)] + _ = ∫⁻ t in Ioo (0:ℝ) T,∫⁻ n : Sphere,k n t ∂sphereMeasure := + lintegral_lintegral_swap hk.aemeasurable + _ = _ := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply lintegral_congr + intro n + simp only [k,prefixFlow,prefixClamp_eq (Ioo_subset_Icc_self ht)] + exact (lintegral_const_mul' _ _ ENNReal.ofReal_ne_top).symm + +def initialPuncturedCone (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : Set Phase := + initialConeLabels T (α zX T).1 ∩ {z : Phase | z.1≠zX.1} + +lemma isOpen_initialPuncturedCone (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : + IsOpen (initialPuncturedCone α zX T) := + (isOpen_lt ((continuous_const.sub continuous_fst).norm) continuous_const).inter + (isClosed_eq continuous_fst continuous_const).isOpen_compl + +lemma initialPuncturedCone_sub (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : + initialPuncturedCone α zX T ⊆ initialClosedCone α zX T ∩ {z : Phase | z.1≠zX.1} := + by + intro z hz + refine ⟨?_,hz.2⟩ + change ‖(α zX T).1-z.1‖≤T + exact le_of_lt hz.1 + +lemma PhaseFlowOn.initial_spherical_label_mem {E B : Field} {T t : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (ht : t∈Ioo 0 T) (n : Sphere) (v : Vec) : + ((F.flow zX t).1-t • n.1,v)∈initialPuncturedCone F.flow zX T := by + have hT : 0≤T := ht.1.le.trans ht.2.le + have hn : ‖t • n.1‖=t := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos ht.1,sphere_norm n,mul_one] + have hm : t • n.1 ∈ receiverRadialDomain 0 T := by + change 0<‖t • n.1‖ ∧ 0+‖t • n.1‖branchTime F.flow zX z T 0 + have hm : ∀ z∈A,0∈closedBranchDomain F.flow zX z T := fun z hz=> + F.initial_closed_branch_mem hT zX z ((initialPuncturedCone_sub F.flow zX T hz).1) + have htm : MapsTo τ A (Icc 0 T) := fun z hz=>(F.branch_spec_closed zX z (hm z hz)).1 + have hne : ∀ z∈A,(F.flow zX 0).1≠(F.flow z 0).1 := by + intro z hz + simpa only [F.initial] using Ne.symm hz.2 + have hpos : ∀ z∈A,0<τ z := by + intro z hz + simpa only [sub_zero] using F.branch_radius_pos_closed zX z (hm z hz) (hne z hz) + have ht : ContinuousOn τ A := by + obtain ⟨C,hC⟩ := F.initial_branch_lipschitz hT zX + exact hC.continuousOn.mono (fun z hz=>(initialPuncturedCone_sub F.flow zX T hz).1) + have hX := (F.continuousOn_time zX).comp ht htm + have hn : ContinuousOn (fun z=>branchDirection F.flow zX z T 0) A := by + convert (ht.inv₀ (fun z hz=>(hpos z hz).ne')).smul + (hX.fst.sub continuous_fst.continuousOn) using 1 + funext z + simp only [branchDirection,sub_zero,F.initial,τ,Function.comp_apply] + rfl + refine ⟨ht.prodMk (hn.prodMk (continuous_snd.continuousOn.prodMk hX.snd)),?_⟩ + intro z hz + exact ⟨hpos z hz,(htm hz).2,F.branchDirection_norm_closed zX z (hm z hz) (hne z hz)⟩ + +lemma PhaseFlowOn.initial_selected_cutoff {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) (Q : Set (Fin 4→ℕ)) : + ContinuousOn (fun z=>stateCutoff T Q (initialConeState F.flow zX T z)) + (initialPuncturedCone F.flow zX T) ∧ + ∀ z∈initialPuncturedCone F.flow zX T, + stateCutoff T Q (initialConeState F.flow zX T z)∈Icc (0:ℝ) 1 := by + obtain ⟨hc,hb⟩ := F.initial_state_regular hT zX + constructor + · intro z hz + exact ((contDiffAt_stateCutoff T Q (hb z hz).1 (hb z hz).2.2).continuousAt).comp_continuousWithinAt (hc z hz) + · intro z hz + apply selectedDyadicCutoff_mem_unit + · exact physicalCutoffCoordinates_pos (hb z hz).2.2 (hb z hz).1 + · exact physicalCutoffCoordinates_le_one (hb z hz).2.2 ((hb z hz).2.1.trans (le_max_right _ _)) + +def selectedInitialKernel (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (f : Phase→ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (W : ℝ→Vec→L[ℝ]Vec) : Phase→Vec := + (initialPuncturedCone α zX T).indicator (fun z=> + let t := branchTime α zX z T 0 + (f z*ψ t*stateCutoff T Q (initialConeState α zX T z)) • + W t (retardedPrimitive t (velocity (α zX t).2) (velocity z.2) + (branchDirection α zX z T 0))) + +lemma PhaseFlowOn.selected_initial_kernel_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) {f : Phase→ℝ} + (hf : Continuous f) (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} + (hψ : ContinuousOn ψ (Icc 0 T)) {W : ℝ→Vec→L[ℝ]Vec} + (hW : ContinuousOn W (Icc 0 T)) : + Measurable (selectedInitialKernel F.flow zX T f Q ψ W) := by + classical + let A := initialPuncturedCone F.flow zX T + let τ := fun z=>branchTime F.flow zX z T 0 + have htm : MapsTo τ A (Icc 0 T) := fun z hz=> + (F.branch_spec_closed zX z (F.initial_closed_branch_mem hT zX z + ((initialPuncturedCone_sub F.flow zX T hz).1))).1 + have ht : ContinuousOn τ A := (F.initial_state_regular hT zX).1.fst + have hχ := (F.initial_selected_cutoff hT zX Q).1 + have hp := (F.initial_primitive_continuousOn hT zX).mono (initialPuncturedCone_sub F.flow zX T) + have hc := ((hf.continuousOn.mul (hψ.comp ht htm)).mul hχ).smul + ((hW.comp ht htm).clm_apply hp) + have h := hc.measurable_piecewise (continuousOn_const (c:=(0:Vec))) + (isOpen_initialPuncturedCone F.flow zX T).measurableSet + convert h using 1 + funext z + rfl + +lemma PhaseFlowOn.selected_initial_kernel_pullback {E B : Field} {T t : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (ht : t∈Ioo 0 T) + (f : Phase→ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (W : ℝ→Vec→L[ℝ]Vec) + (n : Sphere) (v : Vec) : + (t^2*(1-dot n.1 (velocity (F.flow zX t).2))) • + selectedInitialKernel F.flow zX T f Q ψ W ((F.flow zX t).1-t • n.1,v) = + initialSignedBoundaryDensity f (F.flow zX t).1 (F.flow zX t).2 t (ψ t) + (stateCutoff T Q (t,n.1,v,(F.flow zX t).2)) (W t) n.1 v := by + rw [selectedInitialKernel,indicator_of_mem (F.initial_spherical_label_mem zX ht n v)] + obtain ⟨hτ,hn⟩ := F.initial_branch_pullback zX ht n v + simp only [initialConeState,hτ,hn] + simp only [initialSignedBoundaryDensity,smul_smul] + congr 1 + ring + +lemma selectedInitialKernel_integrable_bound {f : Phase→ℝ} + (hf : Continuous f) (hc : HasCompactSupport f) (hpos : ∀ z,0≤f z) : + ∃ C : ℝ,0≤C ∧ ∀ (E B : Field) (T : ℝ) (F : PhaseFlowOn E B T) + (zX : Phase) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) + (W : ℝ→Vec→L[ℝ]Vec) (M : ℝ), + 0≤T → 0≤M → ContinuousOn ψ (Icc 0 T) → ContinuousOn W (Icc 0 T) → + (∀ t∈Icc 0 T,‖W t‖≤M) → + Integrable (selectedInitialKernel F.flow zX T f Q ψ W) ∧ + ‖∫ z : Phase,selectedInitialKernel F.flow zX T f Q ψ W z‖ ≤ + C*T*M*(∫ t in Ioo (0:ℝ) T,|ψ t|) := by + obtain ⟨C,hC,hb⟩ := initialSignedBoundary_lintegral_bound hf hc hpos + refine ⟨C,hC,?_⟩ + intro E B T F zX Q ψ W M hT hM hψ hW hWM + let G := selectedInitialKernel F.flow zX T f Q ψ W + have hG : Measurable G := F.selected_initial_kernel_measurable hT zX hf Q hψ hW + have hψi : IntegrableOn ψ (Ioo 0 T) := + (hψ.integrableOn_compact isCompact_Icc).mono_set Ioo_subset_Icc_self + let χ := fun t (n : Sphere) v=>stateCutoff T Q (t,n.1,v,(F.flow zX t).2) + have hχ : ∀ t∈Ioo (0:ℝ) T,∀ n v,χ t n v∈Icc (0:ℝ) 1 := by + intro t ht n v + apply selectedDyadicCutoff_mem_unit + · exact physicalCutoffCoordinates_pos (sphere_norm n) ht.1 + · exact physicalCutoffCoordinates_le_one (sphere_norm n) (ht.2.le.trans (le_max_right _ _)) + have heq : (∫⁻ z : Phase,ENNReal.ofReal ‖G z‖) = + ∫⁻ t in Ioo (0:ℝ) T,∫⁻ n : Sphere,∫⁻ v : Vec, + ENNReal.ofReal ‖initialSignedBoundaryDensity f (F.flow zX t).1 (F.flow zX t).2 t + (ψ t) (χ t n v) (W t) n.1 v‖ ∂volume ∂sphereMeasure := by + calc + _ = ∫⁻ z in initialConeLabels T (F.flow zX T).1,ENNReal.ofReal ‖G z‖ := by + have hA : MeasurableSet (initialConeLabels T (F.flow zX T).1) := + (isOpen_lt ((continuous_const.sub continuous_fst).norm) continuous_const).measurableSet + rw [← lintegral_indicator hA] + apply lintegral_congr + intro z + by_cases hz : z∈initialConeLabels T (F.flow zX T).1 + · rw [indicator_of_mem hz] + · rw [indicator_of_notMem hz] + have hz' : z∉initialPuncturedCone F.flow zX T := fun hh=>hz hh.1 + simp only [G,selectedInitialKernel,indicator_of_notMem hz',norm_zero,ENNReal.ofReal_zero] + _ = _ := by + rw [F.initial_label_lintegral hT zX hG.norm.ennreal_ofReal] + apply setLIntegral_congr_fun measurableSet_Ioo + intro t ht + apply lintegral_congr + intro n + apply lintegral_congr + intro v + have hr : 0≤t^2*(1-dot n.1 (velocity (F.flow zX t).2)) := + mul_nonneg (sq_nonneg _) (cone_denom_pos _ _ (sphere_norm n)).le + have hp := congrArg (fun x : Vec=>ENNReal.ofReal ‖x‖) + (F.selected_initial_kernel_pullback zX ht f Q ψ W n v) + simpa only [norm_smul,Real.norm_eq_abs,abs_of_nonneg hr,ENNReal.ofReal_mul hr] using hp + have hbound : (∫⁻ z : Phase,ENNReal.ofReal ‖G z‖) ≤ + ENNReal.ofReal (C*T*M*(∫ t in Ioo (0:ℝ) T,|ψ t|)) := by + rw [heq] + exact hb T M (Ioo 0 T) (fun t=>(F.flow zX t).1) (fun t=>(F.flow zX t).2) + ψ χ W hT hM measurableSet_Ioo Ioo_subset_Icc_self hψi hχ + (fun t ht=>hWM t (Ioo_subset_Icc_self ht)) + have hfinite : (∫⁻ z : Phase,ENNReal.ofReal ‖G z‖)<⊤ := + hbound.trans_lt ENNReal.ofReal_lt_top + refine ⟨⟨hG.aestronglyMeasurable,(hasFiniteIntegral_iff_norm G).mpr hfinite⟩,?_⟩ + apply (norm_integral_le_lintegral_norm G).trans + exact (ENNReal.toReal_mono ENNReal.ofReal_ne_top hbound).trans + (le_of_eq (ENNReal.toReal_ofReal (by positivity))) + +lemma PhaseFlowOn.selected_label_branch_formula {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX z : Phase) + (hb : b∈Icc 0 T) (he : b+‖(F.flow zX T).1-(F.flow z b).1‖=T) + (hne : ∀σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow z σ).1) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} + (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) : + (∫σ : ℝ,selectedLabelSignedForce s F.flow zX T Q ψ (σ,z)) = + (s.f (0,z)*ψ (branchTime F.flow zX z T 0)* + selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX z 0)) • + retardedPrimitive (branchTime F.flow zX z T 0) (velocity (F.flow zX (branchTime F.flow zX z T 0)).2) + (velocity z.2) (branchDirection F.flow zX z T 0)+ + ∫σ : ℝ,selectedLabelCosts s F.flow zX T Q ψ (σ,z) := by + classical + have hT : 0≤T := hb.1.trans hb.2 + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX z σ) + let τ := branchTime F.flow zX z T + let P := fun σ=>retardedPrimitive (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + let K := fun σ=>signedForceKernel (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + (phaseAcceleration s.E s.B F.flow z σ) + let R := fun σ=>signedRemainder (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)) + let G := fun σ=>(ψ (τ σ)*χ σ) • K σ + let H := fun σ=>(deriv ψ (τ σ)*branchRate F.flow zX z T σ*χ σ+ + ψ (τ σ)*branchSelectedRate s.E s.B F.flow T zX z Q σ) • P σ + + (ψ (τ σ)*χ σ) • R σ + have hd : ∀σ,(σ,z)∈labelBranchDomain F.flow zX T ↔ σ∈Ioo 0 b := by + intro σ + change (σ∈branchDomain F.flow zX z T ∧ _) ↔ _ + rw [F.branchDomain_eq hT zX z hb he] + constructor + · exact And.left + · intro hσ + exact ⟨hσ,hne σ ⟨hσ.1.le,hσ.2.le.trans hb.2⟩⟩ + have hK : (fun σ=>selectedLabelSignedForce s F.flow zX T Q ψ (σ,z))= + (Ioo (0:ℝ) b).indicator (fun σ=>s.f (0,z) • G σ) := by + funext σ + by_cases hσ : σ∈Ioo (0:ℝ) b + · have hp := (hd σ).mpr hσ + have hp' : (σ,z)∈jointBranchDomain F.flow zX T := hp + simp only [selectedLabelSignedForce,labelWeight,labelReceiverTime,labelSelectedCutoff, + actualLabelSignedForce,indicator_of_mem hp,indicator_of_mem hp',indicator_of_mem hσ, + G,K,τ,χ,sourceAcceleration,phaseAcceleration,smul_smul] + congr 1 + ring + · have hp := mt (hd σ).mp hσ + simp only [selectedLabelSignedForce,actualLabelSignedForce,indicator_of_notMem hp, + indicator_of_notMem hσ,smul_zero] + have hH : (fun σ=>selectedLabelCosts s F.flow zX T Q ψ (σ,z))= + (Ioo (0:ℝ) b).indicator (fun σ=>s.f (0,z) • H σ) := by + funext σ + by_cases hσ : σ∈Ioo (0:ℝ) b + · have hp := (hd σ).mpr hσ + have hp' : (σ,z)∈jointBranchDomain F.flow zX T := hp + simp only [selectedLabelCosts,labelWeight,labelReceiverTime,labelSelectedCutoff, + actualLabelRatePrimitive,actualLabelCutoffCost,actualLabelPrimitive,actualLabelRemainder, + indicator_of_mem hp,indicator_of_mem hp',indicator_of_mem hσ,H,P,R,τ,χ, + smul_smul,smul_add,add_smul] + module + · have hp := mt (hd σ).mp hσ + simp only [selectedLabelCosts,actualLabelRatePrimitive,actualLabelCutoffCost, + actualLabelPrimitive,actualLabelRemainder,indicator_of_notMem hp, + indicator_of_notMem hσ,smul_zero,add_zero] + have hI : (∫σ in 0..b,G σ)=(ψ (τ 0)*χ 0) • P 0+∫σ in 0..b,H σ := by + simpa only [G,H,K,P,R,τ,χ,ContinuousLinearMap.id_apply,zero_apply,zero_add] + using F.actual_selected_temporal_signed_formula hs zX z hb he hne Q hψ hψT + (W:=fun _=>ContinuousLinearMap.id ℝ Vec) (W':=fun _=>0) continuousOn_const continuousOn_const + (fun σ _=>hasDerivAt_const σ (ContinuousLinearMap.id ℝ Vec)) + rw [hK,hH,integral_indicator measurableSet_Ioo,integral_indicator measurableSet_Ioo, + integral_smul,integral_smul,restrict_Ioo_eq_restrict_Ioc, + ←intervalIntegral.integral_of_le hb.1,←intervalIntegral.integral_of_le hb.1,hI,smul_add] + congr 1 + simp only [P,τ,χ,sub_zero,F.initial,smul_smul] + congr 1 + ring + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.branchDomain_empty_of_not_initial {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX z : Phase) + (hz : z∉initialConeLabels T (F.flow zX T).1) : + branchDomain F.flow zX z T=∅ := by + apply eq_empty_iff_forall_notMem.mpr + intro σ hσ + have ht : T≤‖(F.flow zX T).1-z.1‖ := le_of_not_gt hz + have hh := F.emission_strictMono hT z (F.flow zX T).1 ⟨le_rfl,hT⟩ + (Ioo_subset_Icc_self hσ.1) hσ.1.1 + simp only [F.initial,zero_add] at hh + linarith [hσ.2] + +lemma PhaseFlowOn.ae_selected_label_formula {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} + (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) : + ∀ᵐ z : Phase,(∫σ : ℝ,selectedLabelSignedForce s F.flow zX T Q ψ (σ,z)) = + selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ (fun _=>ContinuousLinearMap.id ℝ Vec) z+ + ∫σ : ℝ,selectedLabelCosts s F.flow zX T Q ψ (σ,z) := by + classical + have hn : ∀ᵐ z ∂(volume : Measure Phase), + z∉{y : Phase | ∃t∈Icc 0 T,(F.flow y t).1=(F.flow zX t).1} := + ae_iff.mpr (by simpa only [mem_ofPred_eq,not_not] using F.closed_collision_null hT zX) + filter_upwards [hn] with z hz + have hne : ∀t∈Icc 0 T,(F.flow zX t).1≠(F.flow z t).1 := fun t ht he=>hz ⟨t,ht,he.symm⟩ + by_cases hy : z∈initialConeLabels T (F.flow zX T).1 + · obtain ⟨b,⟨hb,he⟩,_⟩ := F.exists_emission ⟨hT,le_rfl⟩ (F.flow zX T).1 hy + have hp : z∈initialPuncturedCone F.flow zX T := ⟨hy,by + have hn0 := hne 0 ⟨le_rfl,hT⟩ + change (F.flow zX 0).1 ≠ (F.flow z 0).1 at hn0 + simpa only [F.initial,mem_ofPred_eq,ne_eq,eq_comm] using hn0⟩ + rw [F.selected_label_branch_formula hs zX z hb he hne Q hψ hψT] + congr 1 + simp only [selectedInitialKernel,indicator_of_mem hp,ContinuousLinearMap.id_apply, + actualCutoffCoordinates,sub_zero,F.initial,stateCutoff,initialConeState] + · have hd := F.branchDomain_empty_of_not_initial hT zX z hy + have hp : z∉initialPuncturedCone F.flow zX T := fun hz=>hy hz.1 + have he : ∀σ,(σ,z)∉labelBranchDomain F.flow zX T := fun σ hh=>by + have hh' := hh.1 + rw [hd] at hh' + exact hh' + have hK : (fun σ=>selectedLabelSignedForce s F.flow zX T Q ψ (σ,z))=0 := by + funext σ + simp only [selectedLabelSignedForce,actualLabelSignedForce,indicator_of_notMem (he σ), + smul_zero,Pi.zero_apply] + have hC : (fun σ=>selectedLabelCosts s F.flow zX T Q ψ (σ,z))=0 := by + funext σ + simp only [selectedLabelCosts,actualLabelCutoffCost,actualLabelRatePrimitive, + actualLabelPrimitive,actualLabelRemainder,indicator_of_notMem (he σ), + smul_zero,add_zero,Pi.zero_apply] + simp only [hK,hC,selectedInitialKernel,indicator_of_notMem hp] + simp + +lemma PhaseFlowOn.selected_signed_fubini {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) : + (∫σ : ℝ,∫z : Phase,selectedLabelSignedForce s F.flow zX T Q ψ (σ,z)) = + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ + (fun _=>ContinuousLinearMap.id ℝ Vec) z)+ + ∫σ : ℝ,∫z : Phase,selectedLabelCosts s F.flow zX T Q ψ (σ,z) := by + have hiK := F.selectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb + have hiC := F.selectedLabelCosts_integrable hs hT zX Q hψ hψb + have hfc : Continuous (fun z=>s.f (0,z)) := hs.f_smooth.continuousOn.comp_continuous + (continuous_const.prodMk continuous_id) (fun _=>⟨⟨le_rfl,hT⟩,mem_univ _⟩) + obtain ⟨K,hK,hcompact⟩ := hs.compact + have hfs : HasCompactSupport (fun z=>s.f (0,z)) := hK.of_isClosed_subset (isClosed_tsupport _) + (hcompact 0 ⟨le_rfl,hT⟩) + obtain ⟨C,_,hb⟩ := selectedInitialKernel_integrable_bound hfc hfs (hs.nonnegative 0 ⟨le_rfl,hT⟩) + have hiB := (hb s.E s.B T F zX Q ψ (fun _=>ContinuousLinearMap.id ℝ Vec) 1 hT zero_le_one + hψ.continuous.continuousOn continuousOn_const (fun _ _=>by simp)).1 + have hKi : Integrable (Function.uncurry (fun σ z=>selectedLabelSignedForce s F.flow zX T Q ψ (σ,z))) + (volume.prod volume) := hiK + have hCi : Integrable (Function.uncurry (fun σ z=>selectedLabelCosts s F.flow zX T Q ψ (σ,z))) + (volume.prod volume) := hiC + rw [integral_integral_swap hKi] + rw [integral_congr_ae (F.ae_selected_label_formula hs hT zX Q hψ.lipschitzOnWith hψT), + integral_add hiB hiC.integral_prod_right,←integral_integral_swap hCi] + +lemma integrable_bounded_clm_apply {α : Type*} [MeasurableSpace α] {μ : Measure α} + {G : α→Vec→L[ℝ]Vec} {f : α→Vec} {C : ℝ} + (hf : Integrable f μ) (hG : AEStronglyMeasurable G μ) + (hb : ∀ᵐ x∂μ,‖G x‖≤C) : Integrable (fun x=>G x (f x)) μ := by + apply (hf.norm.const_mul C).mono' + ((continuous_fst.clm_apply continuous_snd).comp_aestronglyMeasurable + (hG.prodMk hf.aestronglyMeasurable)) + filter_upwards [hb] with x hx + exact (G x).le_opNorm (f x) |>.trans (mul_le_mul_of_nonneg_right hx (norm_nonneg _)) + +lemma PhaseFlowOn.integrable_receiver_multiplier {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) + {G : ℝ→Vec→L[ℝ]Vec} (hG : Continuous G) {f : ℝ×Phase→Vec} (hf : Integrable f) : + Integrable (fun p=>G (labelReceiverTime F.flow zX T p) (f p)) := by + obtain ⟨C,hC⟩ := isCompact_Icc.exists_bound_of_continuousOn hG.continuousOn + exact integrable_bounded_clm_apply hf + (hG.measurable.comp (F.labelReceiverTime_measurable zX)).aestronglyMeasurable + (Filter.Eventually.of_forall (fun p=>hC _ (F.labelReceiverTime_mem hT zX p))) + +def selectedMultiplierForce (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (G : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : Vec := + G (labelReceiverTime α zX T p) (selectedLabelSignedForce s α zX T Q ψ p) + +def selectedMultiplierCosts (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (G G' : ℝ→Vec→L[ℝ]Vec) (p : ℝ×Phase) : Vec := + G (labelReceiverTime α zX T p) (selectedLabelCosts s α zX T Q ψ p)+ + G' (labelReceiverTime α zX T p) + (labelWeight α zX T Q ψ p • actualLabelRatePrimitive s α zX T p) + +lemma PhaseFlowOn.selectedMultiplier_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) {G G' : ℝ→Vec→L[ℝ]Vec} + (hG : Continuous G) (hG' : Continuous G') : + Integrable (selectedMultiplierForce s F.flow zX T Q ψ G) ∧ + Integrable (selectedMultiplierCosts s F.flow zX T Q ψ G G') := by + have hf := F.selectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb + have hc := F.selectedLabelCosts_integrable hs hT zX Q hψ hψb + have hp := (F.actualLabelRatePrimitive_integrable hs zX).bdd_smul 1 + (F.labelWeight_measurable zX Q hψ.continuous.measurable).aestronglyMeasurable + (Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs] using F.labelWeight_bound hT zX Q hψb p)) + exact ⟨F.integrable_receiver_multiplier hT zX hG hf, + (F.integrable_receiver_multiplier hT zX hG hc).add + (F.integrable_receiver_multiplier hT zX hG' hp)⟩ + +lemma PhaseFlowOn.receiver_multiplier_closed_regularity {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX z : Phase) + (hb : b∈Icc 0 T) (he : b+‖(F.flow zX T).1-(F.flow z b).1‖=T) + (hne : ∀σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow z σ).1) + {G G' : ℝ→Vec→L[ℝ]Vec} (hG : ContinuousOn G (Icc 0 T)) + (hG' : ContinuousOn G' (Icc 0 T)) (hGd : ∀t∈Ioo 0 T,HasDerivAt G (G' t) t) : + let τ := branchTime F.flow zX z T + ContinuousOn (fun σ=>G (τ σ)) (Icc 0 b) ∧ + ContinuousOn (fun σ=>branchRate F.flow zX z T σ • G' (τ σ)) (Icc 0 b) ∧ + ∀σ∈Ioo 0 b,HasDerivAt (fun σ=>G (τ σ)) + (branchRate F.flow zX z T σ • G' (τ σ)) σ := by + dsimp only + have hT : 0≤T := hb.1.trans hb.2 + have hclosed := F.closedBranchDomain_eq hT zX z hb he + have hmem : ∀σ∈Icc 0 b,σ∈closedBranchDomain F.flow zX z T := fun σ hσ=>by + rwa [hclosed] + have ht : ∀σ∈Icc 0 b,branchTime F.flow zX z T σ∈Icc 0 T := fun σ hσ=> + ⟨hσ.1.trans (F.branch_spec_closed zX z (hmem σ hσ)).1.1, + (F.branch_spec_closed zX z (hmem σ hσ)).1.2⟩ + obtain ⟨C,hC⟩ := F.branch_lipschitzOn_closed hT zX z + have hτ : ContinuousOn (branchTime F.flow zX z T) (Icc 0 b) := by + simpa only [hclosed] using hC.continuousOn + have hr := (F.branchCutoffState_closed_regularity hs zX z hb he hne).2.1.fst.add (continuousOn_const (c:=(1:ℝ))) + have hrate : ContinuousOn (branchRate F.flow zX z T) (Icc 0 b) := by + convert hr using 1 + ext σ + simp only [Pi.add_apply,branchCutoffStateRate,sub_add_cancel] + refine ⟨hG.comp hτ ht,hrate.smul (hG'.comp hτ ht),?_⟩ + intro σ hσ + have hdom : σ∈branchDomain F.flow zX z T := by rwa [F.branchDomain_eq hT zX z hb he] + have hsT : σ∈Icc 0 T := ⟨hσ.1.le,hσ.2.le.trans hb.2⟩ + have hti := F.branch_time_mem zX z hdom (hne σ hsT) + exact (hGd _ ⟨hσ.1.trans hti.1,hti.2⟩).scomp σ (F.branch_differential zX z hdom (hne σ hsT)).2 + +lemma PhaseFlowOn.selected_multiplier_branch_formula {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX z : Phase) + (hb : b∈Icc 0 T) (he : b+‖(F.flow zX T).1-(F.flow z b).1‖=T) + (hne : ∀σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow z σ).1) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} + (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} (hW : ContinuousOn W (Icc 0 T)) + (hW' : ContinuousOn W' (Icc 0 T)) (hWd : ∀t∈Ioo 0 T,HasDerivAt W (W' t) t) : + (∫σ : ℝ,selectedMultiplierForce s F.flow zX T Q ψ W (σ,z)) = + (s.f (0,z)*ψ (branchTime F.flow zX z T 0)* + selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX z 0)) • + W (branchTime F.flow zX z T 0) (retardedPrimitive (branchTime F.flow zX z T 0) (velocity (F.flow zX (branchTime F.flow zX z T 0)).2) + (velocity z.2) (branchDirection F.flow zX z T 0))+ + ∫σ : ℝ,selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z) := by + classical + have hT : 0≤T := hb.1.trans hb.2 + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX z σ) + let τ := branchTime F.flow zX z T + let P := fun σ=>retardedPrimitive (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + let K := fun σ=>signedForceKernel (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + (phaseAcceleration s.E s.B F.flow z σ) + let R := fun σ=>signedRemainder (τ σ-σ) (velocity (F.flow zX (τ σ)).2) + (velocity (F.flow z σ).2) (branchDirection F.flow zX z T σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)) + let G := fun σ=>(ψ (τ σ)*χ σ) • W (τ σ) (K σ) + let H := fun σ=>(deriv ψ (τ σ)*branchRate F.flow zX z T σ*χ σ+ + ψ (τ σ)*branchSelectedRate s.E s.B F.flow T zX z Q σ) • W (τ σ) (P σ) + + (ψ (τ σ)*χ σ) • ((branchRate F.flow zX z T σ • W' (τ σ)) (P σ)+W (τ σ) (R σ)) + have hd : ∀σ,(σ,z)∈labelBranchDomain F.flow zX T ↔ σ∈Ioo 0 b := by + intro σ + change (σ∈branchDomain F.flow zX z T ∧ _) ↔ _ + rw [F.branchDomain_eq hT zX z hb he] + constructor + · exact And.left + · intro hσ + exact ⟨hσ,hne σ ⟨hσ.1.le,hσ.2.le.trans hb.2⟩⟩ + have hK : (fun σ=>selectedMultiplierForce s F.flow zX T Q ψ W (σ,z))= + (Ioo (0:ℝ) b).indicator (fun σ=>s.f (0,z) • G σ) := by + funext σ + by_cases hσ : σ∈Ioo (0:ℝ) b + · have hp := (hd σ).mpr hσ + have hp' : (σ,z)∈jointBranchDomain F.flow zX T := hp + simp only [selectedMultiplierForce,selectedLabelSignedForce,labelWeight,labelReceiverTime,labelSelectedCutoff, + actualLabelSignedForce,indicator_of_mem hp,indicator_of_mem hp',indicator_of_mem hσ, + G,K,τ,χ,sourceAcceleration,phaseAcceleration,smul_smul,map_smul] + congr 1 + ring + · have hp := mt (hd σ).mp hσ + simp only [selectedMultiplierForce,selectedLabelSignedForce,actualLabelSignedForce,indicator_of_notMem hp, + indicator_of_notMem hσ,smul_zero,map_zero] + have hH : (fun σ=>selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z))= + (Ioo (0:ℝ) b).indicator (fun σ=>s.f (0,z) • H σ) := by + funext σ + by_cases hσ : σ∈Ioo (0:ℝ) b + · have hp := (hd σ).mpr hσ + have hp' : (σ,z)∈jointBranchDomain F.flow zX T := hp + simp only [selectedMultiplierCosts,selectedLabelCosts,labelWeight,labelReceiverTime,labelSelectedCutoff, + actualLabelRatePrimitive,actualLabelCutoffCost,actualLabelPrimitive,actualLabelRemainder, + indicator_of_mem hp,indicator_of_mem hp',indicator_of_mem hσ,H,P,R,τ,χ, + smul_smul,smul_add,add_smul,map_smul,map_add,smul_apply] + module + · have hp := mt (hd σ).mp hσ + simp only [selectedMultiplierCosts,selectedLabelCosts,actualLabelRatePrimitive,actualLabelCutoffCost, + actualLabelPrimitive,actualLabelRemainder,indicator_of_notMem hp, + indicator_of_notMem hσ,smul_zero,add_zero,map_zero] + have hI : (∫σ in 0..b,G σ)=(ψ (τ 0)*χ 0) • W (τ 0) (P 0)+∫σ in 0..b,H σ := by + obtain ⟨hA,hA',hAd⟩ := F.receiver_multiplier_closed_regularity hs zX z hb he hne hW hW' hWd + exact F.actual_selected_temporal_signed_formula hs zX z hb he hne Q hψ hψT hA hA' hAd + rw [hK,hH,integral_indicator measurableSet_Ioo,integral_indicator measurableSet_Ioo, + integral_smul,integral_smul,restrict_Ioo_eq_restrict_Ioc, + ←intervalIntegral.integral_of_le hb.1,←intervalIntegral.integral_of_le hb.1,hI,smul_add] + congr 1 + simp only [P,τ,χ,sub_zero,F.initial,smul_smul] + congr 1 + ring + +lemma PhaseFlowOn.ae_selected_multiplier_formula {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} + (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} (hW : ContinuousOn W (Icc 0 T)) + (hW' : ContinuousOn W' (Icc 0 T)) (hWd : ∀t∈Ioo 0 T,HasDerivAt W (W' t) t) : + ∀ᵐ z : Phase,(∫σ : ℝ,selectedMultiplierForce s F.flow zX T Q ψ W (σ,z)) = + selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ W z+ + ∫σ : ℝ,selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z) := by + classical + have hn : ∀ᵐ z ∂(volume : Measure Phase), + z∉{y : Phase | ∃t∈Icc 0 T,(F.flow y t).1=(F.flow zX t).1} := + ae_iff.mpr (by simpa only [mem_ofPred_eq,not_not] using F.closed_collision_null hT zX) + filter_upwards [hn] with z hz + have hne : ∀t∈Icc 0 T,(F.flow zX t).1≠(F.flow z t).1 := fun t ht he=>hz ⟨t,ht,he.symm⟩ + by_cases hy : z∈initialConeLabels T (F.flow zX T).1 + · obtain ⟨b,⟨hb,he⟩,_⟩ := F.exists_emission ⟨hT,le_rfl⟩ (F.flow zX T).1 hy + have hp : z∈initialPuncturedCone F.flow zX T := ⟨hy,by + have hn0 := hne 0 ⟨le_rfl,hT⟩ + change (F.flow zX 0).1 ≠ (F.flow z 0).1 at hn0 + simpa only [F.initial,mem_ofPred_eq,ne_eq,eq_comm] using hn0⟩ + rw [F.selected_multiplier_branch_formula hs zX z hb he hne Q hψ hψT hW hW' hWd] + congr 1 + simp only [selectedInitialKernel,indicator_of_mem hp, + actualCutoffCoordinates,sub_zero,F.initial,stateCutoff,initialConeState] + · have hd := F.branchDomain_empty_of_not_initial hT zX z hy + have hp : z∉initialPuncturedCone F.flow zX T := fun hz=>hy hz.1 + have he : ∀σ,(σ,z)∉labelBranchDomain F.flow zX T := fun σ hh=>by + have hh' := hh.1 + rw [hd] at hh' + exact hh' + have hK : (fun σ=>selectedMultiplierForce s F.flow zX T Q ψ W (σ,z))=0 := by + funext σ + simp only [selectedMultiplierForce,selectedLabelSignedForce,actualLabelSignedForce,indicator_of_notMem (he σ), + smul_zero,Pi.zero_apply,map_zero] + have hC : (fun σ=>selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z))=0 := by + funext σ + simp only [selectedMultiplierCosts,selectedLabelCosts,actualLabelCutoffCost,actualLabelRatePrimitive, + actualLabelPrimitive,actualLabelRemainder,indicator_of_notMem (he σ), + smul_zero,add_zero,Pi.zero_apply,map_zero] + simp only [hK,hC,selectedInitialKernel,indicator_of_notMem hp] + simp + +lemma PhaseFlowOn.selected_multiplier_fubini {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} (hW : Continuous W) (hW' : Continuous W') + (hWd : ∀t∈Ioo 0 T,HasDerivAt W (W' t) t) : + (∫σ : ℝ,∫z : Phase,selectedMultiplierForce s F.flow zX T Q ψ W (σ,z)) = + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ W z)+ + ∫σ : ℝ,∫z : Phase,selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z) := by + obtain ⟨hiK,hiC⟩ := F.selectedMultiplier_integrable hs hT zX Q hψ hψb hW hW' + have hfc : Continuous (fun z=>s.f (0,z)) := hs.f_smooth.continuousOn.comp_continuous + (continuous_const.prodMk continuous_id) (fun _=>⟨⟨le_rfl,hT⟩,mem_univ _⟩) + obtain ⟨K,hK,hcompact⟩ := hs.compact + have hfs : HasCompactSupport (fun z=>s.f (0,z)) := hK.of_isClosed_subset (isClosed_tsupport _) + (hcompact 0 ⟨le_rfl,hT⟩) + obtain ⟨C,_,hb⟩ := selectedInitialKernel_integrable_bound hfc hfs (hs.nonnegative 0 ⟨le_rfl,hT⟩) + obtain ⟨M,hM⟩ := isCompact_Icc.exists_bound_of_continuousOn hW.continuousOn + have hiB := (hb s.E s.B T F zX Q ψ W (max M 0) hT (le_max_right _ _) + hψ.continuous.continuousOn hW.continuousOn (fun t ht=>(hM t ht).trans (le_max_left _ _))).1 + have hKi : Integrable (Function.uncurry (fun σ z=>selectedMultiplierForce s F.flow zX T Q ψ W (σ,z))) + (volume.prod volume) := hiK + have hCi : Integrable (Function.uncurry (fun σ z=>selectedMultiplierCosts s F.flow zX T Q ψ W W' (σ,z))) + (volume.prod volume) := hiC + rw [integral_integral_swap hKi] + rw [integral_congr_ae (F.ae_selected_multiplier_formula hs hT zX Q hψ.lipschitzOnWith hψT + hW.continuousOn hW'.continuousOn hWd), + integral_add hiB hiC.integral_prod_right,←integral_integral_swap hCi] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticBoundaryJets.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticBoundaryJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a9d3990a07f6a9e003155d3a59747a287d208a9 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticBoundaryJets.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.BoundaryJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma continuous_datumMagneticMoment (i : Fin 3) : + Continuous (fun p : Vec × Vec => p.1 (curlA i)*velocity p.2 (curlB i)- + p.1 (curlB i)*velocity p.2 (curlA i)) := by + have hp (j : Fin 3) : Continuous (fun v : Vec => v j) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous + exact ((hp _).comp continuous_fst |>.mul ((hp _).comp ((contDiff_velocity (k:=1)).continuous.comp continuous_snd))).sub + ((hp _).comp continuous_fst |>.mul ((hp _).comp ((contDiff_velocity (k:=1)).continuous.comp continuous_snd))) + +lemma datumWeightedSphere_magneticMoment {d : Datum} (hd : Admissible d) (t : ℝ) (x : Vec) (i : Fin 3) : + datumWeightedSphere d.f₀ (fun p => p.1 (curlA i)*velocity p.2 (curlB i)- + p.1 (curlB i)*velocity p.2 (curlA i)) (t,x)= + (4*Real.pi)⁻¹*(∫ a : Sphere, + t*a.1 (curlA i)*current d.f₀ (x+t • a.1) (curlB i)- + t*a.1 (curlB i)*current d.f₀ (x+t • a.1) (curlA i) ∂sphereMeasure) := by + unfold datumWeightedSphere + congr 1 + apply integral_congr_ae + filter_upwards [] with a + have hi (j : Fin 3) : Integrable (fun v => d.f₀ (x+t • a.1,v)*velocity v j) := by + exact datum_velocity_integrable hd.1.continuous hd.2.1 + (((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp + ((contDiff_velocity (k:=1)).continuous.comp continuous_snd)).continuousOn) + (x+t • a.1) a.1 (sphere_norm a) + simp_rw [mul_sub,show ∀ j k : Fin 3, ∀ v : Vec, d.f₀ (x+t • a.1,v)*(a.1 j*velocity v k)= + a.1 j*(d.f₀ (x+t • a.1,v)*velocity v k) by intros; ring] + rw [integral_sub ((hi _).const_mul _) ((hi _).const_mul _),integral_const_mul,integral_const_mul, + datum_current_eq_integral hd,datum_current_eq_integral hd] + ring + +lemma magneticConeBoundary_datum_jets {d : Datum} (hd : Admissible d) (k : ℕ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Ioc (0:ℝ) 1, + ContDiff ℝ ∞ (fun x => magneticConeBoundary (datumBoundarySolution d) t x i 0) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (fun y => magneticConeBoundary (datumBoundarySolution d) t y i 0) x‖≤C := by + have hp (j : Fin 3) : ContDiff ℝ ∞ (fun v : Vec => v j) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).contDiff + obtain ⟨A,hA,hfree⟩ := BoundedSmooth.freeWave_coordinate_jets hd.2.2.2.1 hd.2.2.2.2.1 k i + obtain ⟨hFs,B,hB,hflux⟩ := datumWeightedSphere_smooth_bound hd.1 hd.2.1 + (continuousOn_fluxWeight (continuousOn_datumMagneticFluxKernel i)) k + obtain ⟨hRs,D,hD,hmoment⟩ := datumWeightedSphere_smooth_bound hd.1 hd.2.1 + ((continuous_datumMagneticMoment i).continuousOn) k + let a := freeWave (fun y => d.B₀ y i) (fun y => -curl d.E₀ y i) + let b := datumWeightedSphere d.f₀ (fun p => dot p.1 (datumMagneticFluxKernel i (-p.1,p.2))) + let c := datumWeightedSphere d.f₀ (fun p => p.1 (curlA i)*velocity p.2 (curlB i)- + p.1 (curlB i)*velocity p.2 (curlA i)) + have has : ContDiff ℝ ∞ a := contDiff_freeWave ((hp i).comp hd.2.2.2.2.1.1) + (((hp i).comp (contDiff_curl hd.2.2.2.1.1)).neg) + refine ⟨A+B+D,by positivity,?_⟩ + intro t ht + have heq : (fun x => magneticConeBoundary (datumBoundarySolution d) t x i 0)= + (fun x => a (t,x)-b (t,x)+c (t,x)) := by + funext x + simp only [magneticConeBoundary,sub_zero] + simp_rw [datum_initial_magnetic_flux_normalised d i ht.1] + rw [←datumWeightedSphere_flux hd.1.continuous hd.2.1 (continuousOn_datumMagneticFluxKernel i)] + simp only [datumBoundarySolution] + rw [←datumWeightedSphere_magneticMoment hd] + rw [heq] + have ha := has.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hb := hFs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + have hc := hRs.comp ((contDiff_const (c:=t)).prodMk contDiff_id) + refine ⟨(ha.sub hb).add hc,?_⟩ + intro x + exact (norm_iteratedFDeriv_add_le (ha.sub hb) hc k x).trans (add_le_add + ((norm_iteratedFDeriv_sub_le ha hb k x).trans (add_le_add (hfree t ⟨ht.1.le,ht.2⟩ x).2 + (hflux t ⟨ht.1.le,ht.2⟩ x))) (hmoment t ⟨ht.1.le,ht.2⟩ x)) + +lemma norm_iteratedFDeriv_vec_le {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {F : U → Vec} (hF : ContDiff ℝ ∞ F) (n : ℕ) {C : ℝ} (hC : 0≤C) + (h : ∀ i : Fin 3, ∀ x, ‖iteratedFDeriv ℝ n (fun y => F y i) x‖≤C) (x : U) : + ‖iteratedFDeriv ℝ n F x‖≤3*C := by + apply ContinuousMultilinearMap.opNorm_le_bound (by positivity) + intro v + have hb (i : Fin 3) : |(iteratedFDeriv ℝ n F x v) i|≤C*(∏ j, ‖v j‖) := by + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).iteratedFDeriv_comp_left (x:=x) + hF.contDiffAt (by exact_mod_cast le_top : (n:ℕ∞ω)≤∞) + have ha := ((iteratedFDeriv ℝ n (fun y => F y i) x).le_opNorm v).trans + (mul_le_mul_of_nonneg_right (h i x) (Finset.prod_nonneg (fun _ _ => norm_nonneg _))) + change ‖iteratedFDeriv ℝ n ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i) ∘ F) x v‖≤_ at ha + rw [he] at ha + exact ha + exact (norm_le_three_of_coordinate_bound (mul_nonneg hC (Finset.prod_nonneg (fun _ _ => norm_nonneg _))) hb).trans_eq (by ring) + +lemma datum_boundary_global_jets {d : Datum} (hd : Admissible d) (k : ℕ) : + ∃ C : ℝ, 0≤C ∧ + (∀ x, ‖iteratedFDeriv ℝ k d.E₀ x‖≤C ∧ ‖iteratedFDeriv ℝ k d.B₀ x‖≤C) ∧ + ∀ t∈Ioc (0:ℝ) 1, + (ContDiff ℝ ∞ (electricBoundaryField (datumBoundarySolution d) t) ∧ + ContDiff ℝ ∞ (magneticBoundaryField (datumBoundarySolution d) t)) ∧ + ∀ x, ‖iteratedFDeriv ℝ k (electricBoundaryField (datumBoundarySolution d) t) x‖≤C ∧ + ‖iteratedFDeriv ℝ k (magneticBoundaryField (datumBoundarySolution d) t) x‖≤C := by + choose CE hCE he using electricConeBoundary_datum_jets hd k + choose CB hCB hb using magneticConeBoundary_datum_jets hd k + obtain ⟨D,hD⟩ := hd.2.2.2.1.2 k + obtain ⟨L,hL⟩ := hd.2.2.2.2.1.2 k + let C := max D 0+max L 0+∑ i, (CE i+CB i) + have hC : 0≤C := add_nonneg (add_nonneg (le_max_right _ _) (le_max_right _ _)) + (Finset.sum_nonneg (fun i _ => add_nonneg (hCE i) (hCB i))) + have hEC (i) : CE i≤C := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [C]; linarith [le_max_right D 0,le_max_right L 0,hCB i] + have hBC (i) : CB i≤C := by + have hh := Finset.single_le_sum (fun j (_ : j∈Finset.univ) => add_nonneg (hCE j) (hCB j)) (Finset.mem_univ i) + dsimp [C]; linarith [le_max_right D 0,le_max_right L 0,hCE i] + refine ⟨3*C,by positivity,?_,?_⟩ + · intro x + have hS : 0≤∑ i, (CE i+CB i) := Finset.sum_nonneg (fun i _ => add_nonneg (hCE i) (hCB i)) + constructor + · exact (hD x).trans (by dsimp [C]; linarith [le_max_left D 0,le_max_right L 0]) + · exact (hL x).trans (by dsimp [C]; linarith [le_max_left L 0,le_max_right D 0]) + · intro t ht + have hes : ContDiff ℝ ∞ (electricBoundaryField (datumBoundarySolution d) t) := + contDiff_euclidean.mpr (fun i => (he i t ht).1) + have hbs : ContDiff ℝ ∞ (magneticBoundaryField (datumBoundarySolution d) t) := + contDiff_euclidean.mpr (fun i => (hb i t ht).1) + refine ⟨⟨hes,hbs⟩,fun x => ⟨?_,?_⟩⟩ + · exact norm_iteratedFDeriv_vec_le hes k hC (fun i y => ((he i t ht).2 y).trans (hEC i)) x + · exact norm_iteratedFDeriv_vec_le hbs k hC (fun i y => ((hb i t ht).2 y).trans (hBC i)) x + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticMomentDensity.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticMomentDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca926c15338891a5c5b96538a03d92d408f6b486 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticMomentDensity.lean @@ -0,0 +1,243 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ShiftedRho +import OAI.Analysis.VlasovMaxwell.Geometry.CrossCLM + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma contDiffOn_retardedMagneticDensity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t : ℝ} (ht : 0≤t) (x : Vec) : + ContDiffOn ℝ 1 (retardedMagneticDensity s t x) (retardedSpaceDomain t x) := by + intro y hy + have hn : ContDiffAt ℝ 1 (coneDirection x) y := contDiffAt_coneDirection hy.1 + exact (contDiff_cross.contDiffAt.comp y (hn.prodMk + ((contDiffOn_retardedElectricDensity hf hE hB hc ht x).contDiffAt + ((isOpen_retardedSpaceDomain t x).mem_nhds hy)))).contDiffWithinAt + +lemma integrableOn_retardedMagneticDensity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R retardedMagneticDensity s t x (x+z)) (ball (0:Vec) R) := by + have ht : 0≤t := le_trans hR hRt.le + have hm : MapsTo (fun z : Vec => x+z) (ball (0:Vec) R \ {0}) (retardedSpaceDomain t x) := by + intro z hz + have hn : ‖z‖ j p (curlB i)) (1,0) (t-‖z‖,x+z) + + z (curlA i)/‖z‖^3*j (t-‖z‖,x+z) (curlB i) - + (z (curlB i)/‖z‖^2*dirD (fun p => j p (curlA i)) (1,0) (t-‖z‖,x+z) + + z (curlB i)/‖z‖^3*j (t-‖z‖,x+z) (curlA i)) + +lemma integrableOn_magneticMomentDensity {j : Field} (hj : ContDiff ℝ ∞ j) + (t : ℝ) (x : Vec) (i : Fin 3) : + IntegrableOn (magneticMomentDensity j t x i) (ball (0:Vec) t) := by + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + have hi (a b : Fin 3) : IntegrableOn (fun z : Vec => + z a/‖z‖^2*dirD (fun p => j p b) (1,0) (t-‖z‖,x+z) + + z a/‖z‖^3*j (t-‖z‖,x+z) b) (ball (0:Vec) t) := + Integrable.add (integrableOn_ball_direction_div_norm_pow + ((contDiff_dirD (contDiff_component hj b) _).continuous.comp harg) 1 (by norm_num) t a) + (integrableOn_ball_direction_div_norm_pow + ((contDiff_component hj b).continuous.comp harg) 2 (by norm_num) t a) + exact (hi _ _).sub (hi _ _) + +lemma classical_retarded_magnetic_moment_identity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + (heq : Equations s) {x y : Vec} {t : ℝ} + (hxy : x≠y) (ht : 0 s.f (t-coneRadius x y,z)) y) i - + (coneRadius x y)⁻¹*(coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y)) = + retardedMagneticDensity s t x y i - divergence (retardedMagneticFlux s t x i) y := by + have hr : RegularParticle s.f := ⟨hf,hc⟩ + have hcv : ContDiff ℝ 1 (fun v : Vec => cross (coneDirection x y) (velocity v) i) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.comp + (contDiff_cross.comp (contDiff_const.prodMk contDiff_velocity)) + have hi := hr.moment_integrable (contDiff_velocity (k:=1)).continuous ht.le y + have hcross : cross (coneDirection x y) (current (fun z => s.f (t-coneRadius x y,z)) y) i = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*s.f (t-coneRadius x y,y,v) := by + have hi' := (crossCLM (coneDirection x y)).integrable_comp hi + have he := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integral_comp_comm hi' + unfold current + rw [← integral_cross_left hi] + simpa only [crossCLM_apply,PiLp.proj_apply,cross_smul_right,PiLp.smul_apply,smul_eq_mul,mul_comm] using he.symm + have hdt : coneDirection x y (curlA i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlB i)) (1,0) (t-coneRadius x y,y) - + coneDirection x y (curlB i)* + dirD (fun p : ℝ × Vec => current (fun z => s.f (p.1,z)) p.2 (curlA i)) (1,0) (t-coneRadius x y,y) = + ∫ v : Vec, cross (coneDirection x y) (velocity v) i*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0) := by + have hInt (k : Fin 3) : Integrable (fun v : Vec => velocity v k*fderiv ℝ s.f (t-coneRadius x y,y,v) (1,0,0)) := hr.time_moment_integrable + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).continuous.comp (contDiff_velocity (k:=1)).continuous) ht y + rw [dirD_current_component hr ht y,dirD_current_component hr ht y, + ← integral_const_mul,← integral_const_mul,← integral_sub ((hInt _).const_mul _) ((hInt _).const_mul _)] + apply integral_congr_ae + filter_upwards [] with v + rw [cross_apply_cyclic] + ring + rw [hcross,hdt,retardedMagneticDensity_component hf hc hxy ht.le i, + ← integral_const_mul,← integral_const_mul, + ← integral_sub ((hr.scalar_moment_integrable hcv.continuous ht.le y).const_mul _) + ((hr.time_moment_integrable hcv.continuous ht y).const_mul _)] + unfold retardedMagneticFlux + convert classical_retarded_magnetic_integral_identity hf hc heq hxy ht i using 1 + congr 1 + funext v + dsimp only + ring + +lemma magneticMomentDensity_actual {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} (ha : 0 current (fun q => s.f (p.1,q)) p.2 k) (a+(T-‖z‖),x+z) := + ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) k).contDiff.contDiffAt.comp _ hj).differentiableAt (by simp) + have herr (k : Fin 3) : (fun p => shiftedCurrent s a p k)= + positiveTimeShift a (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 k) := by + funext p + simp only [shiftedCurrent,positiveTimeShift,positiveTimeExtend,PiLp.smul_apply,smul_eq_mul] + have hjder (k : Fin 3) : dirD (fun p => shiftedCurrent s a p k) (1,0) (T-‖z‖,x+z) = + dirD (fun p : ℝ × Vec => current (fun q => s.f (p.1,q)) p.2 k) (1,0) (a+(T-‖z‖),x+z) := by + rw [herr] + unfold dirD + rw [fderiv_positiveTimeShift ha (sub_nonneg.mpr hzt.le) _ (hji k)] + have hjval : shiftedCurrent s a (T-‖z‖,x+z)=current (fun q => s.f (a+(T-‖z‖),q)) (x+z) := + positiveTimeShift_eq ha (sub_nonneg.mpr hzt.le) _ _ + unfold magneticMomentDensity + rw [hjder,hjder,hjval] + have he := classical_retarded_magnetic_moment_identity hs.1 hc hs.2.2.2.2.2.2.2.1 hxy ht i + rw [← he,cross_apply_cyclic] + simp only [coneRadius_add,coneDirection_add,PiLp.neg_apply,PiLp.smul_apply,smul_eq_mul, + show a+T-‖z‖=a+(T-‖z‖) by ring] + field_simp [norm_ne_zero_iff.mpr hz] + ring + +lemma integrated_magneticMomentDensity_actual {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {a T : ℝ} + (ha : 0 retardedMagneticDensity s (a+T) x (x+z) i) (ball (0:Vec) T) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).integrable_comp + (integrableOn_retardedMagneticDensity hs.1 hs.2.1 hs.2.2.1 hc hT.le (show T retardedMagneticFlux s (a+T) x i (x+z) + have he : (fun z => divergence F z) =ᵐ[volume.restrict (ball (0:Vec) T)] + (fun z => retardedMagneticDensity s (a+T) x (x+z) i - + magneticMomentDensity (shiftedCurrent s a) T x i z) := by + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hh := magneticMomentDensity_actual hs hm ha x i hz0 (by simpa only [mem_ball_zero_iff] using hz) + dsimp only [F] + rw [divergence_add_right] + linarith + have hF : ∀ z : Vec, 0<‖z‖ → ‖z‖ s.B (a,y) i) (fun y => -curl (fun z => s.E (a,z)) y i) (T,x) + + (4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, retardedMagneticDensity s (a+T) x (x+z) i) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, T^2*dot n.1 + (retardedMagneticFlux s (a+T) x i (x+T • n.1)) ∂sphereMeasure) + + (4*Real.pi)⁻¹ * (∫ n : Sphere, + T*n.1 (curlA i)*current (fun z => s.f (a,z)) (x+T • n.1) (curlB i) - + T*n.1 (curlB i)*current (fun z => s.f (a,z)) (x+T • n.1) (curlA i) ∂sphereMeasure) := by + have hρj := contDiff_shifted_moments hs hm ha + rw [classical_shifted_magnetic_potential_representation hs hm ha hT.le x i] + change _ + magneticPotentialComponent (shiftedCurrent s a) i (T,x)=_ + rw [magneticPotentialComponent_ball hρj.2 hT] + change _ + ((4*Real.pi)⁻¹ * (∫ z in ball (0:Vec) T, + magneticMomentDensity (shiftedCurrent s a) T x i z) + _)=_ + rw [integrated_magneticMomentDensity_actual hs hm ha hT x i] + have hj0 (y : Vec) : shiftedCurrent s a (0,y)=current (fun z => s.f (a,z)) y := by + simp only [shiftedCurrent,positiveTimeShift_eq ha (le_refl 0),add_zero] + simp_rw [hj0] + ring +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticVolterra.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticVolterra.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b4bea97e86364da72e3c73aa011b5db543ecdf6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/MagneticVolterra.lean @@ -0,0 +1,301 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SourceWeightedPacket + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +lemma source_volterra_factor {a b q H : ℝ} (ha : 0≤a) (hb : 0≤b) (hq : 0≤q) (hH : 0≤H) : + a+(a*q+b)*H≤(a+b)*(1+H)*(1+q) := by + have hh : a*q+b≤(a+b)*(1+q) := by nlinarith [mul_nonneg hb hq] + have hh' := mul_le_mul_of_nonneg_right hh hH + nlinarith [mul_nonneg (add_nonneg ha hb) hq] + +lemma source_division_bulk_annulus_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H ε R : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → 0<ε → ε≤R → R sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z|≤ + 3*Ks/‖z‖^2+(3*Ks/‖z‖)*g (t-‖z‖) := by + have hh := hks s t ‖z‖ x v n hE hB hzpos (hzr.1.trans hRt) hv + rw [hn] at hh + apply (hh (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2).trans + exact add_le_add le_rfl (mul_le_mul_of_nonneg_left + (by simpa only [hrad] using max_le (hDF _ hu _).1 (hDF _ hu _).2) (by positivity)) + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) + (C:=A*(((3*Ks+Kv)*(1+H)*(1+g (t-‖z‖)))/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hvb := hkv s t x z v hzn hvP (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + rw [hrad] at hvb + rw [Real.norm_eq_abs,abs_mul] + apply mul_le_mul (hf _ ⟨hu.1.le,hu.2⟩ _ v) _ (abs_nonneg _) hA + exact ((abs_add_le _ _).trans (add_le_add (hs v hvP) hvb)).trans + ((inverse_source_majorant (by positivity) hKv hgpos hzpos (hzr.1.le.trans (hRt.le.trans (htU.trans hUH)))).trans + (div_le_div_of_nonneg_right (source_volterra_factor (by positivity) hKv hgpos hH) (sq_nonneg _)))) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,L,V]; ring) + have hh := kernel_volterra_norm_subset (hε.le.trans (hεR.trans hRt.le)) hL + (measurableSet_ball.diff measurableSet_ball) + (show ball (0:Vec) R \ ball (0:Vec) ε ⊆ ball (0:Vec) t from fun z hz => ball_subset_ball hRt.le hz.1) + (g:=fun u => 1+g u) (continuous_const.add hg) + (fun u hu => by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity) + (fun z hz _ => hb z hz) + rw [Real.norm_eq_abs] at hh + exact hh.trans_eq (by dsimp [C,L]; ring) + +lemma magnetic_source_annulus_gradient_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H ε R : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → 0<ε → ε≤R → R by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity)) + have hBR : B*R≤B*H := mul_le_mul_of_nonneg_left hRH hB + have hBe : B*ε≤B*H := mul_le_mul_of_nonneg_left heH hB + have hBW : 0≤B*((1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := mul_nonneg hB hW + have hCH := mul_nonneg hC hH + nlinarith + +lemma magnetic_source_particle_gradient_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H N : ℝ) (x : Vec) (g : ℝ → ℝ), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤C*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + obtain ⟨C,hC,hb⟩ := magnetic_source_annulus_gradient_volterra_bound P A M e i hA + refine ⟨C,hC,?_⟩ + intro s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN + apply norm_integral_ball_of_annulus_bound ht + (source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN) + intro ε R hε hεR hRt + exact hb s U t H ε R x g (ht.le.trans (htU.trans hUH)) hg hg0 hε hεR hRt htU hUH + hf hE hB hc heq hfA hP hEB hDF + +lemma source_receiver_packet_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t : ℝ) (g : ℝ → ℝ),t≤U → (∀ u∈Icc (0:ℝ) U,0≤g u) → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤g u ∧ ‖fderiv ℝ s.B (u,y)‖≤g u) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hQ : 0≤g (t-coneRadius 0 z) := hg0 _ ⟨hu.1.le,hu.2⟩ + have hd := hkb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤K/‖z‖*g (t-coneRadius 0 z)*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + exact (by + dsimp [sourceReceiverParticlePacket] + rw [abs_mul] + exact (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ _) (abs_nonneg _) (by positivity)).trans_eq (by simp only [coneRadius,zero_sub,norm_neg]; ring)) + +lemma magnetic_source_receiver_integral_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤t → t≤U → U≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤g u ∧ ‖fderiv ℝ s.B (u,y)‖≤g u) → + |∫ z in ball (0:Vec) t,∫ v,sourceReceiverParticlePacket s t e i (x,z,v)|≤ + C*H*(∫ u in Icc (0:ℝ) t,g u) := by + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_volterra_bound P A M e i hA + let V := volume.real (closedBall (0:Vec) P) + have hV : 0≤V := by dsimp [V]; positivity + refine ⟨4*Real.pi*V*K,by positivity,?_⟩ + intro s U t H x g ht htU hUH hg hg0 hE hB hfA hP hEB hDF + have hH : 0≤H := ht.trans (htU.trans hUH) + rw [←Real.norm_eq_abs] + apply (kernel_volterra_norm_subset ht (C:=V*K*H) (by positivity) measurableSet_ball + (Subset.rfl) hg (fun u hu => hg0 u ⟨hu.1,hu.2.trans htU⟩) ?_).trans_eq (by ring) + intro z hz hz0 + have hzt : ‖z‖ linarith [norm_nonneg z] + have hgu : 0≤g (t-‖z‖) := by simpa only [coneRadius,zero_sub,norm_neg] using hg0 _ hu + have hh := norm_velocity_integral_bound (P:=P) (g:=fun v => sourceReceiverParticlePacket s t e i (x,z,v)) + (fun v hv => by simp only [sourceReceiverParticlePacket,hP _ hu _ v hv,mul_zero]) + (hkb s U t g htU hg0 hE hB hfA hEB hDF x z · hz0 hzt) + apply hh.trans + change V*(K*g (t-‖z‖)/‖z‖)≤_ + have hn : ‖z‖≠0 := norm_ne_zero_iff.mpr hz0 + calc + _ = (V*K*g (t-‖z‖)*‖z‖)/‖z‖^2 := by field_simp + _ ≤ (V*K*g (t-‖z‖)*H)/‖z‖^2 := by gcongr; exact hzt.le.trans (htU.trans hUH) + _ = _ := by ring + +lemma magnetic_source_deriv_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H N : ℝ) (x : Vec) (g : ℝ → ℝ), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + C*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + obtain ⟨C₁,hC₁,hb₁⟩ := magnetic_source_particle_gradient_volterra_bound P A M e i hA + obtain ⟨C₂,hC₂,hb₂⟩ := magnetic_source_receiver_integral_volterra_bound P A M e i hA + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨C₁+C₂,by positivity,?_⟩ + intro s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN + obtain ⟨Q₀,hQ₀⟩ := isCompact_Icc.exists_bound_of_continuousOn (f:=g) hg.continuousOn + let Q := max Q₀ 0 + have hQ : 0≤Q := le_max_right _ _ + have hDFconst : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q := by + intro u hu y + have hh : g u≤Q := (le_abs_self _).trans ((hQ₀ u ⟨hu.1.le,hu.2⟩).trans (le_max_left _ _)) + exact ⟨(hDF u hu y).1.trans hh,(hDF u hu y).2.trans hh⟩ + have hH : 0≤H := ht.le.trans (htU.trans hUH) + have hprop (z : Vec) (hz : ‖z‖ linarith [norm_nonneg z] + let R := sourceReceiverParticlePacket s t e i + let F := fun p : Vec × Phase => fderiv ℝ (sourceWeightedPacket s t i) p (e,0,0) + have hRc : ∀ p : Vec × Phase,p.2.1≠0 → ‖p.2.1‖ sourceReceiverParticlePacket_continuousAt e i hf hE hB hp hpt + have hRz : ∀ x z v : Vec,z≠0 → ‖z‖ sourceWeightedPacket_contDiffAt i hf hE hB hp (hprop p.2.1 hpt).1 + have hWz : ∀ x z v : Vec,z≠0 → ‖z‖ retarded_packet_derivative_zero hweighted hWz x z v e hz hzt hv + have hRi := retarded_packet_integrable x hRc hRz (hkb s U t Q htU hQ hE hB hfA hEB hDFconst) + have hPi := source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN + have hsplit : (∫ z in ball (0:Vec) t,∫ v,F (x,z,v))= + (∫ z in ball (0:Vec) t,∫ v,R (x,z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) := by + rw [←integral_add hRi hPi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hzt : ‖z‖ by + dsimp [F,R,sourceReceiverParticlePacket] + rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz0 (hprop z hzt).1] + ring) + linarith + rw [(hasDerivAt_magnetic_source_integral x e i 0 htU hf hE hB hA hN hQ hP hfA hEB hDFconst hfN).deriv] + simp only [zero_smul,add_zero] + change |∫ z in ball (0:Vec) t,∫ v,F (x,z,v)|≤_ + rw [hsplit] + apply (abs_add_le _ _).trans + apply (add_le_add (hb₂ s U t H x g ht.le htU hUH hg hg0 hE hB hfA hP hEB hDF) + (hb₁ s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN)).trans + have hJ : 0≤∫ u in Icc (0:ℝ) t,1+g u := setIntegral_nonneg measurableSet_Icc + (fun u hu => by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity) + have hG : 0≤∫ u in Icc (0:ℝ) t,g u := setIntegral_nonneg measurableSet_Icc + (fun u hu => hg0 u ⟨hu.1,hu.2.trans htU⟩) + have hGJ : (∫ u in Icc (0:ℝ) t,g u)≤∫ u in Icc (0:ℝ) t,1+g u := + integral_mono hg.integrableOn_Icc (continuous_const.add hg).integrableOn_Icc (fun u => by linarith) + have hh : C₂*H*(∫ u in Icc (0:ℝ) t,g u)≤C₂*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + have hmul : H*(∫ u in Icc (0:ℝ) t,g u)≤(1+H)*(∫ u in Icc (0:ℝ) t,1+g u) := by + gcongr; linarith + have hh' := mul_le_mul_of_nonneg_left (hmul.trans (le_add_of_nonneg_left hH)) hC₂ + nlinarith + nlinarith + +end RVM.Magnetic +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ObservationCone.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ObservationCone.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5f529fea0a7e7b193369537f3f7b3468c45c2fd --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ObservationCone.lean @@ -0,0 +1,215 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.ArrivalDomain + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal RealInnerProductSpace + +namespace RVM + +lemma stable_positive_projection {v w : Vec} {c : ℝ} (hc : 0 ENNReal.ofReal (q z.2 * s.f (t,z))) + _ ≤ _ := hs.phase_energy_bound ht + +lemma PhaseFlowOn.label_occupation_cell_bound {s : Solution} {T t p D : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (ht : t ∈ Icc 0 T) + {H : Phase → Set ℝ} + (hduration : ∀ z, volume (H z) ≤ ENNReal.ofReal D) + (hmom : ∀ z, (H z).Nonempty → p≤q (F.flow z t).2) : + ENNReal.ofReal p * labelOccupation (fun z => s.f (0,z)) H ≤ + ENNReal.ofReal D * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + unfold labelOccupation + rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + calc + _ ≤ ∫⁻ z : Phase, ENNReal.ofReal D * + (ENNReal.ofReal (q (F.flow z t).2) * ENNReal.ofReal (s.f (0,z))) := by + apply lintegral_mono + intro z + by_cases hh : (H z).Nonempty + · have hd := mul_le_mul' (ENNReal.ofReal_le_ofReal (hmom z hh)) (hduration z) + have hh := mul_le_mul_right hd (ENNReal.ofReal (s.f (0,z))) + simpa only [mul_assoc,mul_left_comm,mul_comm] using hh + · have hz : H z=∅ := not_nonempty_iff_eq_empty.mp hh + simp only [hz,measure_empty,mul_zero,zero_le] + _ = ENNReal.ofReal D * ∫⁻ z : Phase, + ENNReal.ofReal (q (F.flow z t).2) * ENNReal.ofReal (s.f (0,z)) := + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + _ ≤ _ := mul_le_mul_right (F.label_energy_bound hs ht) _ + +lemma stable_cell_duration {X Y a u : ℝ → Vec} {C H : Set ℝ} {v : Vec} {c R : ℝ} + (hC : Convex ℝ C) (hHC : H ⊆ C) (hc : 0 stable_positive_projection hc hv (hvel r hr)) + (fun r hr => by + rw [dot_eq_inner] + exact (abs_real_inner_le_norm (‖v‖⁻¹ • v) (Y r-X r)).trans (by + simpa only [he,one_mul] using hsep r hr)) + have hid : 2*R/(c/2)=4*R/c := by ring + simpa only [hid] using hh + +lemma PhaseFlowOn.stable_cell_occupation {s : Solution} {T t p c R : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (ht : t ∈ Icc 0 T) + (zX : Phase) {C : Set ℝ} {H : Phase → Set ℝ} {v : Phase → Vec} + (hC : Convex ℝ C) (hCT : C ⊆ Icc 0 T) (hc : 0 s.f (0,z)) H ≤ + ENNReal.ofReal (4*R/c) * ENNReal.ofReal (∫ x : Vec, totalEnergy s (0,x)) := by + apply F.label_occupation_cell_bound hs ht _ hmom + intro z + apply stable_cell_duration hC (hHC z) hc (hv z) + ((F.continuousOn_time zX).fst.mono hCT) ((F.continuousOn_time z).fst.mono hCT) + _ _ (hvel z) (hsep z) + · intro r hr + exact ((F.ode zX r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst + · intro r hr + exact ((F.ode z r (hCT (interior_subset hr))).mono hCT).hasDerivAt + (mem_interior_iff_mem_nhds.mp hr) |>.fst + +def observationCone (Y : ℝ → Vec) (z : (ℝ × Vec) × ℝ) : ℝ := + (z.1.1-z.2)^2-‖z.1.2-Y z.2‖^2 + +lemma contDiffAt_observationCone {Y : ℝ → Vec} {p : ℝ × Vec} {s : ℝ} + (hY : ContDiffAt ℝ 1 Y s) : ContDiffAt ℝ 1 (observationCone Y) (p,s) := by + exact ((contDiffAt_fst.fst.sub contDiffAt_snd).pow 2).sub + ((contDiffAt_fst.snd.sub (hY.comp (p,s) contDiffAt_snd)).norm_sq ℝ) + +lemma hasDerivAt_observationCone_source {Y : ℝ → Vec} {p : ℝ × Vec} {s : ℝ} {u : Vec} + (hY : HasDerivAt Y u s) : + HasDerivAt (fun r => observationCone Y (p,r)) + (-2*(p.1-s)+2*dot (p.2-Y s) u) s := by + have hh := (((hasDerivAt_const s p.1).sub (hasDerivAt_id s)).pow 2).sub + (((hasDerivAt_const s p.2).sub hY).norm_sq) + convert hh using 1 <;> try rfl + simp [dot_eq_inner] + +lemma observationCone_source_partial {Y : ℝ → Vec} {p : ℝ × Vec} {s : ℝ} {u : Vec} + (hY : ContDiffAt ℝ 1 Y s) (hYd : HasDerivAt Y u s) : + ((fderiv ℝ (observationCone Y) (p,s)).comp + (ContinuousLinearMap.inr ℝ (ℝ × Vec) ℝ)) 1 = + -2*(p.1-s)+2*dot (p.2-Y s) u := by + have hi : HasFDerivAt (fun r : ℝ => (p,r)) + (ContinuousLinearMap.inr ℝ (ℝ × Vec) ℝ) s := by + convert (hasFDerivAt_const p s).prodMk (hasFDerivAt_id s) using 1 <;> rfl + exact (((contDiffAt_observationCone hY).differentiableAt one_ne_zero).hasFDerivAt.comp s hi).hasDerivAt.unique + (hasDerivAt_observationCone_source hYd) + +lemma exists_local_emission_branch {Y : ℝ → Vec} {p : ℝ × Vec} {s : ℝ} {u : Vec} + (hst : s z.1) + (ContinuousLinearMap.fst ℝ ℝ Vec) p := hasFDerivAt_fst + have hs : HasFDerivAt (fun z : ℝ × Vec => z.2) + (ContinuousLinearMap.snd ℝ ℝ Vec) p := hasFDerivAt_snd + have hh := ((hf.sub hτd.hasFDerivAt).pow 2).sub ((hs.sub hy).norm_sq) + have he0 : (fun z : ℝ × Vec => (z.1-τ z)^2-‖z.2-Y (τ z)‖^2) =ᶠ[𝓝 p] fun _ => (0:ℝ) := by + filter_upwards [he] with z hz + rw [hz,sub_self] + have hz := (hasFDerivAt_const (𝕜:=ℝ) (0:ℝ) p).congr_of_eventuallyEq he0 + have hid := congrArg (fun L : (ℝ × Vec) →L[ℝ] ℝ => L e) (hh.unique hz) + have hid' : 2*(p.1-s)*(e.1-fderiv ℝ τ p e) - + 2*((p.1-s)*dot n e.2-(fderiv ℝ τ p e)*((p.1-s)*dot n u))=0 := by + simpa [hτ,hgeom,dot_eq_inner,mul_left_comm,mul_assoc] using hid + have hr : p.1-s≠0 := (sub_pos.mpr hst).ne' + apply (eq_div_iff hd).mpr + have hh : (p.1-s)*((fderiv ℝ τ p e)*(1-dot n u)-(e.1-dot n e.2))=0 := by + nlinarith [hid'] + exact sub_eq_zero.mp ((mul_eq_zero.mp hh).resolve_left hr) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalAngularBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalAngularBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8e101421b25b5a6dee4e9a0f6ae9cf105b2bd7e --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalAngularBound.lean @@ -0,0 +1,419 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets +import OAI.Analysis.VlasovMaxwell.Population.HomogeneousCancellation + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma transportSpatialFlux_joint_contDiffAt (e : Vec) (i : Fin 3) {p : Phase} + (hp : p.1 ≠ 0) : + ContDiffAt ℝ 1 (fun z : Phase => transportSpatialFlux z.2 e i z.1) p := by + have hz : (0:Vec) ≠ p.1 := hp.symm + have hr := (contDiffAt_coneRadius (k:=1) hz).comp p contDiffAt_fst + have hn := (contDiffAt_coneDirection (k:=1) hz).comp p contDiffAt_fst + have hu : ContDiffAt ℝ 1 (fun z : Phase => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have he := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hd := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hne := (cone_denom_pos p.2 _ (coneDirection_norm hz)).ne' + have hc := he.div (contDiffAt_const.sub hd) hne + have hW : ContDiffAt ℝ 1 (fun z : Phase => coneSpatialLift 0 z.1 z.2 e) p := + contDiffAt_const.add (hc.smul hu) + have hA := contDiffAt_transportAngularCore hn hu hne + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p hA + exact (((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz)))).mul hi).smul hW + +lemma divergence_phase_first {F : Phase → Vec} {p : Phase} + (hF : DifferentiableAt ℝ F p) : + divergence (fun z => F (z,p.2)) p.1 = + ∑ j : Fin 3, (fderiv ℝ F p (basis j,0)) j := by + have hP := (hasFDerivAt_id (𝕜:=ℝ) p.1).prodMk (hasFDerivAt_const p.2 p.1) + have hh := hF.hasFDerivAt.comp p.1 hP + change HasFDerivAt (fun z : Vec => F (z,p.2)) _ p.1 at hh + unfold divergence spatialPartial + congr 1 + funext j + rw [fderiv_vec_component_at hh.differentiableAt j,hh.fderiv] + rfl + +lemma continuousOn_transportSpatialDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : Phase => divergence (transportSpatialFlux p.2 e i) p.1) + {p | p.1≠0} := by + have he (p : Phase) (hp : p.1≠0) := + divergence_phase_first ((transportSpatialFlux_joint_contDiffAt e i hp).differentiableAt (by simp)) + apply ContinuousOn.congr (f:=fun p : Phase => ∑ j : Fin 3, + (fderiv ℝ (fun z : Phase => transportSpatialFlux z.2 e i z.1) p (basis j,0)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((transportSpatialFlux_joint_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact he p hp + +lemma transportSpatialDivergence_uniform_bound (P : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + |divergence (transportSpatialFlux v e i) n.1|≤C := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => divergence (transportSpatialFlux p.2 e i) p.1) K := + (continuousOn_transportSpatialDivergence e i).mono (by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + intro hz + simp only [hz,norm_zero] at hn + norm_num at hn) + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro v hv n + exact (hC (n.1,v) ⟨n.2,hv⟩).trans (le_max_left _ _) + +lemma divergence_phase_second {F : Phase → Vec} {p : Phase} + (hF : DifferentiableAt ℝ F p) : + divergence (fun z => F (p.1,z)) p.2 = + ∑ j : Fin 3, (fderiv ℝ F p (0,basis j)) j := by + have hP := (hasFDerivAt_const p.1 p.2).prodMk (hasFDerivAt_id (𝕜:=ℝ) p.2) + have hh := hF.hasFDerivAt.comp p.2 hP + change HasFDerivAt (fun z : Vec => F (p.1,z)) _ p.2 at hh + unfold divergence spatialPartial + congr 1 + funext j + rw [fderiv_vec_component_at hh.differentiableAt j,hh.fderiv] + rfl + +lemma continuous_divergence_phase_slices {U : Set Vec} {F : Phase → Vec} {y : Vec} + (hU : IsOpen U) (hy : y∈U) (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) : + Continuous (fun v => divergence (fun z => F (z,v)) y) ∧ + Continuous (fun v => divergence (fun z => F (y,z)) v) := by + have hc : Continuous (fun v : Vec => fderiv ℝ F (y,v)) := + (hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl).comp_continuous + (continuous_const.prodMk continuous_id) (fun _ => ⟨hy,mem_univ _⟩) + have hd (v : Vec) : DifferentiableAt ℝ F (y,v) := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).differentiableAt (by simp) + constructor + · simp_rw [divergence_phase_first (hd _)] + exact continuous_finsetSum _ (fun j _ => + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp (hc.clm_apply continuous_const)) + · simp_rw [divergence_phase_second (hd _)] + exact continuous_finsetSum _ (fun j _ => + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp (hc.clm_apply continuous_const)) + +lemma phase_division_integral {U K : Set Vec} {g : Phase → ℝ} {W V : Phase → Vec} + {y : Vec} {L : Vec → ℝ} + (hU : IsOpen U) (hK : IsCompact K) (hy : y∈U) + (hg : ContDiffOn ℝ 1 g (U ×ˢ univ)) + (hW : ContDiffOn ℝ 1 W (U ×ˢ univ)) + (hV : ContDiffOn ℝ 1 V (U ×ˢ univ)) + (hz : ∀ z∈U, ∀ v∉K, g (z,v)=0) + (heq : ∀ v, L v = divergence (fun z => g (z,v) • W (z,v)) y+ + divergence (fun w => g (y,w) • V (y,w)) v- + g (y,v)*(divergence (fun z => W (z,v)) y+divergence (fun w => V (y,w)) v)) : + Integrable L ∧ (∫ v, L v) = + divergence (fun z => ∫ v, g (z,v) • W (z,v)) y- + ∫ v, g (y,v)*(divergence (fun z => W (z,v)) y+divergence (fun w => V (y,w)) v) := by + have hgw := hg.smul hW + have hgV := hg.smul hV + have hzw : ∀ z∈U, ∀ v∉K, (g (z,v) • W (z,v))=0 := by + intro z hu v hv + rw [hz z hu v hv,zero_smul] + have hsi := integrable_spatial_divergence_uniform_support hU hK hy hgw hzw + have hse := divergence_integral_uniform_support hU hK hy hgw hzw + change Integrable (fun v => divergence (fun z => g (z,v) • W (z,v)) y) at hsi + change divergence (fun z => ∫ v, g (z,v) • W (z,v)) y = + ∫ v, divergence (fun z => g (z,v) • W (z,v)) y at hse + have hvc : ContDiff ℝ 1 (fun w => g (y,w) • V (y,w)) := by + rw [contDiff_iff_contDiffAt] + intro v + exact (hgV.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).comp v + (contDiffAt_const.prodMk contDiffAt_id) + have hgs : HasCompactSupport (fun v => g (y,v)) := + compactSupport_of_zero_off hK (hz y hy) + have hvcp : HasCompactSupport (fun w => g (y,w) • V (y,w)) := hgs.smul_right + have hvi := integrable_divergence_compact hvc hvcp + have hgc : Continuous (fun v => g (y,v)) := + hg.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hy,mem_univ _⟩) + have hci : Integrable (fun v => g (y,v)*(divergence (fun z => W (z,v)) y+ + divergence (fun w => V (y,w)) v)) := + (hgc.mul ((continuous_divergence_phase_slices hU hy hW).1.add + (continuous_divergence_phase_slices hU hy hV).2)).integrable_of_hasCompactSupport hgs.mul_right + have he : L = fun v => divergence (fun z => g (z,v) • W (z,v)) y+ + divergence (fun w => g (y,w) • V (y,w)) v- + g (y,v)*(divergence (fun z => W (z,v)) y+divergence (fun w => V (y,w)) v) := funext heq + rw [he] + refine ⟨(hsi.add hvi).sub hci,?_⟩ + have hsub := integral_sub (hsi.add hvi) hci + have hadd := integral_add hsi hvi + simp only [Pi.add_apply] at hsub hadd hse + rw [hsub,hadd,integral_divergence_zero hvc hvcp,add_zero,←hse] + +lemma contDiffAt_coneSpatialCoefficient_phase {k : ℕ∞ω} {x y v e : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (fun z : Phase => coneSpatialCoefficient x z.1 z.2 e) (y,v) := by + have hn := (contDiffAt_coneDirection (k:=k) hxy).comp (y,v) contDiffAt_fst + have hu : ContDiffAt ℝ k (fun z : Phase => velocity z.2) (y,v) := + contDiff_velocity.contDiffAt.comp (y,v) contDiffAt_snd + have hde := contDiff_dot_pair.contDiffAt.comp (y,v) (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp (y,v) (hn.prodMk hu) + exact hde.div (contDiffAt_const.sub hdu) (cone_denom_pos v _ (coneDirection_norm hxy)).ne' + +lemma retarded_spatial_integral_division {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x y e : Vec} {t : ℝ} (hxy : x≠y) (ht : 0 ∫ v, (s.f (t-coneRadius x z,z,v)*k (z,v)) • coneSpatialLift x z v e) y- + ∫ v, s.f (t-coneRadius x y,y,v)* + (divergence (fun z => k (z,v) • coneSpatialLift x z v e) y+ + divergence (fun w => k (y,w) • (coneSpatialCoefficient x y w e • K (y,w))) v) := by + have ht0 : 0≤t := by have hr := norm_nonneg (x-y); change 0 coneSpatialCoefficient x z.1 z.2 e) + (retardedSpaceDomain t x ×ˢ univ) := fun z hz => + (contDiffAt_coneSpatialCoefficient_phase hz.1.1).contDiffWithinAt + have hu : ContDiffOn ℝ 1 (fun z : Phase => velocity z.2) (retardedSpaceDomain t x ×ˢ univ) := + (contDiff_velocity.comp contDiff_snd).contDiffOn + have hW : ContDiffOn ℝ 1 (fun z : Phase => k z • coneSpatialLift x z.1 z.2 e) + (retardedSpaceDomain t x ×ˢ univ) := + hk.smul ((contDiffOn_const (c:=e)).add (hco.smul hu)) + have hV : ContDiffOn ℝ 1 (fun z : Phase => k z • (coneSpatialCoefficient x z.1 z.2 e • K z)) + (retardedSpaceDomain t x ×ˢ univ) := hk.smul (hco.smul hK) + have hh := phase_division_integral + (L:=fun v => k (y,v)*fderiv ℝ s.f (t-coneRadius x y,y,v) (0,e,0)) + hU hS hy hg hW hV hz (by + intro v + have hp := retarded_spatial_divergence (e:=e) (particle_differentiableAt_positive hf ht y v) hxy + ((hK.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).differentiableAt (by simp)) + ((hk.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hy,mem_univ _⟩)).differentiableAt (by simp)) (heq v) + simpa only [retardedDensity,smul_smul,smul_eq_mul,mul_assoc] using hp) + simpa only [retardedDensity,smul_smul,smul_eq_mul,mul_assoc] using hh.2 + +lemma continuousOn_phase_divergences {U : Set Vec} {F : Phase → Vec} + (hU : IsOpen U) (hF : ContDiffOn ℝ 1 F (U ×ˢ univ)) : + ContinuousOn (fun p : Phase => divergence (fun z => F (z,p.2)) p.1) (U ×ˢ univ) ∧ + ContinuousOn (fun p : Phase => divergence (fun z => F (p.1,z)) p.2) (U ×ˢ univ) := by + have hc := hF.continuousOn_fderiv_of_isOpen (hU.prod isOpen_univ) le_rfl + have hd (p : Phase) (hp : p∈U ×ˢ univ) : DifferentiableAt ℝ F p := + (hF.contDiffAt ((hU.prod isOpen_univ).mem_nhds hp)).differentiableAt (by simp) + have hb (e : Phase) (j : Fin 3) : + ContinuousOn (fun p => (fderiv ℝ F p e) j) (U ×ˢ univ) := + (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp_continuousOn + (hc.clm_apply continuousOn_const) + constructor + · apply ContinuousOn.congr (continuousOn_finsetSum _ (fun j _ => hb (basis j,0) j)) + intro p hp + exact divergence_phase_first (hd p hp) + · apply ContinuousOn.congr (continuousOn_finsetSum _ (fun j _ => hb (0,basis j) j)) + intro p hp + exact divergence_phase_second (hd p hp) + +lemma continuousOn_divergence_of_isOpen {U : Set Vec} {F : Vec → Vec} + (hU : IsOpen U) (hF : ContDiffOn ℝ 1 F U) : ContinuousOn (divergence F) U := by + have hc := hF.continuousOn_fderiv_of_isOpen hU le_rfl + have hd (p : Vec) (hp : p∈U) : DifferentiableAt ℝ F p := + (hF.contDiffAt (hU.mem_nhds hp)).differentiableAt (by simp) + apply ContinuousOn.congr (f:=fun p => ∑ j : Fin 3, (fderiv ℝ F p (basis j)) j) + · apply continuousOn_finsetSum + intro j _ + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.comp_continuousOn + (hc.clm_apply continuousOn_const) + · intro p hp + unfold divergence spatialPartial + simp_rw [fderiv_vec_component_at (hd p hp)] + +lemma phase_division_annulus {U K : Set Vec} {g : Phase → ℝ} {W V : Phase → Vec} + {L : Phase → ℝ} {ε R T : ℝ} + (hU : IsOpen U) (hK : IsCompact K) (hε : 0<ε) (hεR : ε≤R) (hRT : R g (y,v) • W (y,v)) z+ + divergence (fun w => g (z,w) • V (z,w)) v- + g (z,v)*(divergence (fun y => W (y,v)) z+divergence (fun w => V (z,w)) v)) : + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε, ∫ v, L (z,v)) = + (∫ n : Sphere, R^2*dot n.1 (∫ v, g (R • n.1,v) • W (R • n.1,v)) ∂sphereMeasure)- + (∫ n : Sphere, ε^2*dot n.1 (∫ v, g (ε • n.1,v) • W (ε • n.1,v)) ∂sphereMeasure)- + ∫ z in ball (0:Vec) R \ ball (0:Vec) ε, ∫ v, + g (z,v)*(divergence (fun y => W (y,v)) z+divergence (fun w => V (z,w)) v) := by + let F : Vec → Vec := fun z => ∫ v, g (z,v) • W (z,v) + have hF : ContDiffOn ℝ 1 F U := + contDiffOn_integral_uniform_support hU hK (hg.smul hW) (by + intro z hu v hv + change g (z,v) • W (z,v)=0 + rw [hz z hu v hv,zero_smul]) + let A := ball (0:Vec) R \ ball (0:Vec) ε + let C := closedBall (0:Vec) R \ ball (0:Vec) ε + have hC : IsCompact C := (isCompact_closedBall _ _).diff isOpen_ball + have hAU : A⊆C := fun z hz => ⟨ball_subset_closedBall hz.1,hz.2⟩ + have hCU : C⊆U := by + intro z hz + have hzr : ‖z‖≤R := by simpa only [mem_closedBall_zero_iff] using hz.1 + have hze : ε≤‖z‖ := by simpa only [mem_ball_zero_iff,not_lt] using hz.2 + exact hdom z (hε.trans_le hze) (hzr.trans_lt hRT) + have hDz : IntegrableOn (divergence F) A := + (((continuousOn_divergence_of_isOpen hU hF).mono hCU).integrableOn_compact hC).mono_set hAU + let B : Phase → ℝ := fun p => + g p*(divergence (fun y => W (y,p.2)) p.1+divergence (fun w => V (p.1,w)) p.2) + have hB : ContinuousOn B (U ×ˢ univ) := hg.continuousOn.mul + ((continuousOn_phase_divergences hU hW).1.add (continuousOn_phase_divergences hU hV).2) + have hBi : ContinuousOn (fun z => ∫ v, B (z,v)) U := by + apply continuousOn_integral_of_compact_support (k:=K) hK hB + intro z v hu hv + dsimp [B] + rw [hz z hu v hv,zero_mul] + have hBint : IntegrableOn (fun z => ∫ v, B (z,v)) A := + (hBi.mono hCU).integrableOn_compact hC |>.mono_set hAU + have hD := divergence_annulus_local hε hεR hRT (F:=F) (by + intro z hz ht + exact hF.contDiffAt (hU.mem_nhds (hdom z hz ht))) + have he (z : Vec) (hzA : z∈A) : (∫ v, L (z,v))=divergence F z-∫ v, B (z,v) := + (phase_division_integral hU hK (hCU (hAU hzA)) hg hW hV hz (heq z (hCU (hAU hzA)))).2 + rw [setIntegral_congr_fun (g:=fun z => divergence F z-∫v,B (z,v)) + (measurableSet_ball.diff measurableSet_ball) he,integral_sub hDz hBint,hD] + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +def spatialTranslateParticle (x : Vec) (f : Particle) : Particle := + fun p => f (p.1,x+p.2.1,p.2.2) + +lemma spatialTranslateParticle_add (x : Vec) (f : Particle) : + spatialTranslateParticle x f = fun p => f ((0,x,0)+p) := by + funext p + change f (p.1,x+p.2.1,p.2.2) = f (0+p.1,x+p.2.1,0+p.2.2) + rw [zero_add,zero_add] + +lemma fderiv_spatialTranslateParticle (x : Vec) (f : Particle) (p : ℝ × Phase) : + fderiv ℝ (spatialTranslateParticle x f) p = fderiv ℝ f (p.1,x+p.2.1,p.2.2) := by + rw [spatialTranslateParticle_add,fderiv_comp_add_left] + change fderiv ℝ f (0+p.1,x+p.2.1,0+p.2.2)=_ + rw [zero_add,zero_add] + +lemma shifted_retarded_local_data {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t : ℝ} (ht : 0≤t) (x : Vec) : + ∃ K : Set Vec, IsCompact K ∧ + ContDiffOn ℝ 1 (retardedDensity (spatialTranslateParticle x s.f) t 0) + (retardedSpaceDomain t 0 ×ˢ univ) ∧ + ∀ z∈retardedSpaceDomain t 0, ∀ v∉K, + retardedDensity (spatialTranslateParticle x s.f) t 0 (z,v)=0 := by + obtain ⟨K,hK,hg,hz⟩ := retarded_local_data hf hc ht x + have hmap (z : Vec) (hz : z∈retardedSpaceDomain t 0) : x+z∈retardedSpaceDomain t x := by + refine ⟨?_,?_⟩ + · intro he + have hh : z=0 := add_left_cancel (show x+z=x+0 by simpa only [add_zero] using he.symm) + exact hz.1 hh.symm + · rw [coneRadius_add] + simpa only [coneRadius,zero_sub,norm_neg] using hz.2 + refine ⟨K,hK,?_,?_⟩ + · have hshift : ContDiff ℝ 1 (fun p : Phase => (x+p.1,p.2)) := + ((contDiff_const (c:=x)).add contDiff_fst).prodMk contDiff_snd + have hm : MapsTo (fun p : Phase => (x+p.1,p.2)) + (retardedSpaceDomain t 0 ×ˢ univ) (retardedSpaceDomain t x ×ˢ univ) := + fun p hp => ⟨hmap p.1 hp.1,hp.2⟩ + have hh := hg.comp hshift.contDiffOn hm + convert hh using 1 + funext p + simp [retardedDensity,spatialTranslateParticle,coneRadius] + · intro z hzu v hv + have hh := hz (x+z) (hmap z hzu) v hv + simpa [retardedDensity,spatialTranslateParticle,coneRadius] using hh + +lemma shifted_retarded_spatial_divergence {f : Particle} {K : Phase → Vec} {k : Phase → ℝ} + {x z v e : Vec} {t : ℝ} + (hf : DifferentiableAt ℝ f (t-coneRadius 0 z,x+z,v)) (hz : (0:Vec)≠z) + (hK : DifferentiableAt ℝ K (z,v)) (hk : DifferentiableAt ℝ k (z,v)) + (heq : fderiv ℝ f (t-coneRadius 0 z,x+z,v) (1,velocity v,K (z,v))=0) : + k (z,v)*fderiv ℝ f (t-coneRadius 0 z,x+z,v) (0,e,0)= + divergence (fun y => (f (t-coneRadius 0 y,x+y,v)*k (y,v)) • coneSpatialLift 0 y v e) z+ + divergence (fun w => (f (t-coneRadius 0 z,x+z,w)*k (z,w)) • + (coneSpatialCoefficient 0 z w e • K (z,w))) v- + f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => k (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => k (z,w) • (coneSpatialCoefficient 0 z w e • K (z,w))) v) := by + have hf' : DifferentiableAt ℝ (spatialTranslateParticle x f) (t-coneRadius 0 z,z,v) := by + rw [spatialTranslateParticle_add] + apply DifferentiableAt.comp (f:=fun p : ℝ × Phase => (0,x,0)+p) _ ?_ + ((differentiableAt_const _).add differentiableAt_id) + change DifferentiableAt ℝ f (0+(t-coneRadius 0 z),x+z,0+v) + simpa only [zero_add] using hf + have heq' : fderiv ℝ (spatialTranslateParticle x f) (t-coneRadius 0 z,z,v) + (1,velocity v,K (z,v))=0 := by + rw [fderiv_spatialTranslateParticle] + exact heq + have hh := retarded_spatial_divergence (e:=e) hf' hz hK hk heq' + simpa only [fderiv_spatialTranslateParticle,spatialTranslateParticle] using hh + +lemma retarded_spatial_annulus {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {x e : Vec} {t ε R : ℝ} (hε : 0<ε) (hεR : ε≤R) (hRt : R k (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => k (z,w) • (coneSpatialCoefficient 0 z w e • K (z,w))) v) := by + have ht : 0 coneSpatialCoefficient 0 z.1 z.2 e) + (retardedSpaceDomain t 0 ×ˢ univ) := fun p hp => + (contDiffAt_coneSpatialCoefficient_phase hp.1.1).contDiffWithinAt + have hu : ContDiffOn ℝ 1 (fun z : Phase => velocity z.2) (retardedSpaceDomain t 0 ×ˢ univ) := + (contDiff_velocity.comp contDiff_snd).contDiffOn + have hW : ContDiffOn ℝ 1 (fun z : Phase => k z • coneSpatialLift 0 z.1 z.2 e) + (retardedSpaceDomain t 0 ×ˢ univ) := + hk.smul ((contDiffOn_const (c:=e)).add (hco.smul hu)) + have hV : ContDiffOn ℝ 1 (fun z : Phase => k z • (coneSpatialCoefficient 0 z.1 z.2 e • K z)) + (retardedSpaceDomain t 0 ×ˢ univ) := hk.smul (hco.smul hK) + have hh := phase_division_annulus + (L:=fun p => k p*fderiv ℝ s.f (t-coneRadius 0 p.1,x+p.1,p.2) (0,e,0)) + hU hS hε hεR hRt (by + intro z hz hzt + refine ⟨(norm_pos_iff.mp hz).symm,?_⟩ + simpa only [coneRadius,zero_sub,norm_neg] using sub_pos.mpr hzt) + hg hW hV hzero (by + intro z hzu v + have hp := shifted_retarded_spatial_divergence (e:=e) + (particle_differentiableAt_positive hf hzu.2 (x+z) v) hzu.1 + ((hK.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hzu,mem_univ _⟩)).differentiableAt (by simp)) + ((hk.contDiffAt ((hU.prod isOpen_univ).mem_nhds ⟨hzu,mem_univ _⟩)).differentiableAt (by simp)) + (heq z hzu v) + simpa only [retardedDensity,spatialTranslateParticle,smul_smul,smul_eq_mul,mul_assoc] using hp) + have hrad (a : ℝ) (ha : 0≤a) (n : Sphere) : coneRadius 0 (a • n.1)=a := by + simp only [coneRadius,zero_sub,norm_neg,norm_smul,Real.norm_of_nonneg ha,sphere_norm,mul_one] + simpa only [retardedDensity,spatialTranslateParticle,smul_smul,smul_eq_mul,mul_assoc, + hrad R (hε.le.trans hεR),hrad ε hε.le] using hh + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalDirectTransportDensity.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalDirectTransportDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..efc2903e9972394c4455d08187f0db2a7ad05bd8 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalDirectTransportDensity.lean @@ -0,0 +1,887 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.PhysicalProjectedRemainderDensity +import OAI.Analysis.VlasovMaxwell.Population.SqrtBaselineClippedLength +import OAI.Analysis.VlasovMaxwell.Population.RelativeClosedBinHitGeometry +import OAI.Analysis.VlasovMaxwell.Geometry.RelativeAngleCoordinate + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma dyadic_sqrt_radius_balance {a b H : ℝ} (ha : 0≤a) (hb : 0≤b) (hH : 0min (a*Real.sqrt (H*(2:ℝ)^k)) + (b/Real.sqrt (H*(2:ℝ)^k))) ∧ + (∑'k : ℤ,min (a*Real.sqrt (H*(2:ℝ)^k)) + (b/Real.sqrt (H*(2:ℝ)^k)))≤dyadicBalanceConstant (1/2) (1/2)*Real.sqrt (a*b) := by + let a' := a*Real.sqrt H + let b' := b/Real.sqrt H + have hHroot : 0 ring + have hs := dyadic_power_min_summable (mul_nonneg ha hHroot.le) + (div_nonneg hb hHroot.le) (by norm_num : (0:ℝ)<1/2) (by norm_num : (0:ℝ)<1/2) + change Summable (fun k : ℤ=>min (a'*((2:ℝ)^k)^(1/2:ℝ)) (b'*((2:ℝ)^k)^(-(1/2:ℝ)))) at hs + simp_rw [he] at hs + refine ⟨hs,?_⟩ + rcases eq_or_lt_of_le ha with rfl|ha' + · have he0 (k : ℤ) : min (0*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k))=0 := by + rw [zero_mul,min_eq_left (by positivity)] + rw [tsum_congr he0] + simp + rcases eq_or_lt_of_le hb with rfl|hb' + · have he0 (k : ℤ) : min (a*Real.sqrt (H*(2:ℝ)^k)) (0/Real.sqrt (H*(2:ℝ)^k))=0 := by + rw [zero_div,min_eq_right (by positivity)] + rw [tsum_congr he0] + simp + have ht := dyadic_balance (mul_pos ha' hHroot) (div_pos hb' hHroot) + (by norm_num : (0:ℝ)<1/2) (by norm_num : (0:ℝ)<1/2) + change (∑'k : ℤ,min (a'*((2:ℝ)^k)^(1/2:ℝ)) (b'*((2:ℝ)^k)^(-(1/2:ℝ))))≤_ at ht + simp_rw [he] at ht + norm_num only [show (1/2:ℝ)+(1/2)=1 by norm_num,div_one] at ht + change (∑'k : ℤ,min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k)))≤ + dyadicBalanceConstant (1/2) (1/2)*(a'^(1/2:ℝ)*b'^(1/2:ℝ)) at ht + rw [←Real.sqrt_eq_rpow a',←Real.sqrt_eq_rpow b',←Real.sqrt_mul (by positivity : 0≤a')] at ht + have hab : a'*b'=a*b := by dsimp [a',b']; field_simp + rw [hab] at ht + exact ht + +lemma remaining_good_radial_sum {P C M A p w θ φ σ κ H : ℝ} + (hP : 0min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k))) ∧ + (∑'k : ℤ,min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k)))≤ + dyadicBalanceConstant (1/2) (1/2)*Real.sqrt + (32768*κ^2*(1+κ)*(1+C*(M+Real.sqrt A))*w^2*Real.sqrt (Real.log (2+P))) := by + dsimp only + have hν : 0 ≤ min θ σ := le_min hθ.le hσ.le + have ht := dyadic_sqrt_radius_balance (a:=((w/P)^2*p^2*(min θ σ)^2*φ^2/θ^2)) + (b:=Real.sqrt ((w/P)^2)*Real.sqrt (1+(w/P)^2/min ((w/P)^2) + (stabilityLength P C M A p w σ/2))*(min θ σ)*Real.sqrt (1+φ/σ)/θ^2) + (by positivity) (by positivity) hH + refine ⟨ht.1,ht.2.trans ?_⟩ + apply mul_le_mul_of_nonneg_left _ (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + apply Real.sqrt_le_sqrt + convert remaining_good_balance_coefficient hP hL hC hM hA hp hw hθ hφ.le hσ hσ1 hκ hφθ hpP hwP using 1 + ring + +lemma remaining_magnetic_radial_sum {P C M A p w θ φ σ κ H : ℝ} + (hP : 0min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k))) ∧ + (∑'k : ℤ,min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k)))≤ + dyadicBalanceConstant (1/2) (1/2)*Real.sqrt + (32768*(1+κ)*(1+C*(M+Real.sqrt A))*w^2*Real.sqrt (Real.log (2+P))) := by + dsimp only + have hν : 0 ≤ min θ σ := le_min hθ hσ.le + have ht := dyadic_sqrt_radius_balance (a:=((w/P)^2*p^2*(min θ σ)^2*φ)) + (b:=Real.sqrt ((w/P)^2)*Real.sqrt (1+(w/P)^2/min ((w/P)^2) + (stabilityLength P C M A p w σ/2))*(min θ σ)*Real.sqrt (1+φ/σ)/φ) + (by positivity) (by positivity) hH + refine ⟨ht.1,ht.2.trans ?_⟩ + apply mul_le_mul_of_nonneg_left _ (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + apply Real.sqrt_le_sqrt + convert remaining_magnetic_balance_coefficient hP hL hC hM hA hp hw hθ hθ1 hφ.le hσ hσ1 hκ hφθ hpP hwP using 1 + field_simp [hφ.ne'] + +lemma direct_transport_bin_bound {r p θ φ : ℝ} (n W v : Vec) + (hr : 0s.f (0,z))⊆S) + (hJ : Icc a b⊆Icc 0 T) (hp : 0(prefixFlow F.flow T zX t).2) B (Icc a b), + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2≤ENNReal.ofReal (C*qUpper^3*(min θ σ)^2)) : + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) B z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b))≤ + ENNReal.ofReal (128*(θ+φ)/(p^2*θ^3))*min + (ENNReal.ofReal (C*qUpper^3*(min θ σ)^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))) + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin)) := by + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have he : (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) B z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b))≤ + ENNReal.ofReal (128*(θ+φ)/(p^2*θ^3))* + (∫⁻z : ConeCoordinate,physicalBinDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b)) := by + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable B measurableSet_Icc)] with z hz + exact physicalDirectTransportDensity_bound (hr.trans_le hz.2.2.1.1) hp hθ hφ hq hdlo hdhi + (hz.2.2.2.2.2.trans hDhi) (fun v=>hs.nonnegative _ ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ _) + have hscale : 128*(C/128)=C := by ring + have hnear := physicalBin_density_near (C:=C/128) (p:=qUpper) (θ:=min θ σ) + hα.snd.measurable B measurableSet_Icc hφ hDhi (by simpa only [hscale] using hdensity) + simp only [hscale] at hnear + have hfar := F.physicalBin_density_far hs hT zX B hS hS0 hJ hr hD + exact he.trans (mul_le_mul' le_rfl (le_min hnear hfar)) + +lemma Admissible.direct_transport_relative_budget {d : Datum} (hd₀ : Admissible d) : + ∃Cρ : ℝ,0 ≤ Cρ ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (M A P L a b massScale φ θ σ Cs p len I : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < p → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → + 0 < φ → 0 < θ → 0 < σ → σ ≤ 1 → 128 ≤ Cs → + 2*len ≤ (Cs*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2 → + p/128 ≤ B.qmin → B.qmax ≤ p/32 → massScale ≤ B.qmin → massScale ≤ B.wmin → + 0 < B.rmin → 0 ≤ B.rmax → 0 < B.Dmin → + θ^2/2 ≤ B.dmin → B.dmax ≤ 8*θ^2 → B.Dmax ≤ 8*φ^2 → + σ^2/2 ≤ B.emin → B.emax ≤ 8*σ^2 → 4 ≤ σ*B.qmin → 4 ≤ σ*B.wmin → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (128*(θ+φ)/((p/128)^2*θ^3))*min + (ENNReal.ofReal (Cρ*p^3*(min θ σ)^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))) + ((ENNReal.ofReal (30720*B.rmax/p*(1+φ/σ)*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin)) := by + obtain ⟨Cρ,hCρ,hρ⟩ := hd₀.uniform_physicalBinDensity_constant + refine ⟨128*Cρ,by positivity,?_⟩ + intro s T F hs hT h0 zX B S M A P L a b massScale φ θ σ Cs p len I + hS hS0 ha hb hab hp hlen hlenI hJI hM hA hP hL hm hφ hθ hσ hσ1 hCs hstable + hqmin hqmax hmq hmw hr hrmax hD hdlo hdhi hDhi helo hehi hq hw HX HZ + dsimp only + have hpq : B.qmax ≤ p := hqmax.trans (by linarith) + have hdensity (z : ConeCoordinate) + (hz : z∈physicalBinBase (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b)) : + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2≤ + ENNReal.ofReal ((128*Cρ)*p^3*(min θ σ)^2) := by + exact hρ s T F hs h0 _ _ B _ _ _ p θ σ ⟨hz.2.1.1,hz.2.1.2.trans (hz.1.2.trans hb)⟩ + hp.le hθ.le hσ.le hpq hdhi hehi + have hn := F.direct_transport_near_far hs hT zX B hS hS0 (Icc_subset_Icc ha hb) + (by positivity : 0

ENNReal.ofReal (z.1-z.2.1)) := + (measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal + have hb : (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate, + ENNReal.ofReal (80*φ/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)+ + ENNReal.ofReal (80/p)*(ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2) + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + have hrz : 0hs.nonnegative _ hzT _) + apply hb.trans_eq + let G := prefixConeGood s T X z + let b := prefixConeMagnetic s T X z + have hG0 : 0≤G := add_nonneg (norm_nonneg _) (abs_nonneg _) + have hb0 : 0≤b := norm_nonneg _ + have heG : goodField (s.E (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) + (s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) z.2.2.1=G := by + simp [G,prefixConeGood,prefixField,prefixClamp_eq hzT] + have heb : ‖s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)‖=b := by + simp [b,prefixConeMagnetic,coneFoot,prefixField,prefixClamp_eq hzT] + rw [heG,heb] + have he : (80*φ/p)*(z.1-z.2.1)*(G/θ^2+b)= + (80*φ/(p*θ^2))*((z.1-z.2.1)*G)+ + (80/p)*((z.1-z.2.1)*φ*b) := by ring + rw [he,ENNReal.ofReal_add (by positivity) (by positivity),add_mul] + simp only [ENNReal.ofReal_mul (by positivity : 0≤80*φ/(p*θ^2)), + ENNReal.ofReal_mul (by positivity : 0≤80/p), + ENNReal.ofReal_mul (mul_nonneg hrz.le hφ.le),ENNReal.ofReal_mul hrz.le] + dsimp only [G,b] + ac_rfl + refine hb.trans_eq ?_ + have hMG : AEMeasurable (fun z : ConeCoordinate=> + ENNReal.ofReal (80*φ/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)) + (physicalBinMeasure V B J) := by + simpa only [Pi.mul_apply] using (((hR.mul hG.ennreal_ofReal).aemeasurable.mul hN).const_mul + (ENNReal.ofReal (80*φ/(p*θ^2)))) + rw [lintegral_add_left' hMG,lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + +lemma Admissible.direct_source_two_budget_bound {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0≤Cg ∧ 0≤Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (a b I p P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z=>s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*P^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*P^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/(p*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*M))^(1/2:ℝ))+ + ENNReal.ofReal (80/p)* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*M))^(1/2:ℝ)) := by + obtain ⟨Cg,hCg,hgood⟩ := hd₀.uniform_actual_bin_Cauchy + obtain ⟨Cb,hCb,hmag⟩ := hd₀.uniform_actual_magnetic_Cauchy + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ hI hp hP hθ hφ hσ + hR hD hqlo hqhi hdlo hdhi hDlo hDhi he hangle + dsimp only + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hb := physicalDirectSource_integral_bound hs hT hα.fst.measurable hα.snd.measurable B + measurableSet_Icc hJ hp hθ hφ hR hqlo hdlo hDhi + exact hb.trans (add_le_add + (mul_le_mul' le_rfl (hgood s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hqhi hdhi hDhi he hangle)) + (mul_le_mul' le_rfl (hmag s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hDlo hqhi hdhi hDhi he hangle))) + +lemma Admissible.direct_source_relative_budget {d : Datum} (hd₀ : Admissible d) : + ∃Cg Cb : ℝ,0 ≤ Cg ∧ 0 ≤ Cb ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (M A P L a b massScale φ θ σ Cs p len I : ℝ) (k j : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < p → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → + 0 < φ → 0 < θ → 0 < σ → σ ≤ 1 → 128 ≤ Cs → + 2*len ≤ (Cs*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2 → + p/128 ≤ B.qmin → B.qmax ≤ p/32 → massScale ≤ B.qmin → massScale ≤ B.wmin → + 0 < B.rmin → 0 ≤ B.rmax → 0 < B.Dmin → + θ^2/2 ≤ B.dmin → B.dmax ≤ 8*θ^2 → φ^2/2 ≤ B.Dmin → B.Dmax ≤ 8*φ^2 → + σ^2/2 ≤ B.emin → B.emax ≤ 8*σ^2 → 4 ≤ σ*B.qmin → 4 ≤ σ*B.wmin → + (∀D∈Icc B.Dmin B.Dmax,DyadicWindow k j (Real.sqrt (D/2))) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let O := (ENNReal.ofReal (30720*B.rmax/p*(1+φ/σ)*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/((p/128)*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (80/(p/128))* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hforce⟩ := hd₀.direct_source_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S M A P L a b massScale φ θ σ Cs p len I k j + hS hS0 ha hb hab hp hlen hlenI hJI hM hA hP hL hm hφ hθ hσ hσ1 hCs hstable + hqmin hqmax hmq hmw hr hrmax hD hdlo hdhi hDlo hDhi helo hehi hq hw hangle HX HZ + dsimp only + have hI : 0s.f (0,z))⊆S) + (hJ : Icc a b⊆Icc 0 T) (hp : 0(prefixFlow F.flow T zX t).2) B (Icc a b), + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2≤ENNReal.ofReal (C*qUpper^3*(min θ σ)^2)) : + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) B z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b))≤ + ENNReal.ofReal (128/(p^2*θ^2))* + (ENNReal.ofReal (C*qUpper^3*(min θ σ)^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)))+ + ENNReal.ofReal (128*φ/(p^2*θ^3))*min + (ENNReal.ofReal (C*qUpper^3*(min θ σ)^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))) + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin)) := by + have hb := F.direct_transport_near_far hs hT zX B hS hS0 hJ hp hθ hφ hq hdlo hdhi hDhi hr hD hdensity + have he : 128*(θ+φ)/(p^2*θ^3)=128/(p^2*θ^2)+128*φ/(p^2*θ^3) := by field_simp + rw [he,ENNReal.ofReal_add (by positivity) (by positivity),add_mul] at hb + exact hb.trans (add_le_add (mul_le_mul' le_rfl (min_le_left _ _)) le_rfl) + +lemma Admissible.direct_transport_split_relative_budget {d : Datum} (hd₀ : Admissible d) : + ∃Cρ : ℝ,0 ≤ Cρ ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (M A P L a b massScale φ θ σ Cs p len I : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < p → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → + 0 < φ → 0 < θ → 0 < σ → σ ≤ 1 → 128 ≤ Cs → + 2*len ≤ (Cs*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2 → + p/128 ≤ B.qmin → B.qmax ≤ p/32 → massScale ≤ B.qmin → massScale ≤ B.wmin → + 0 < B.rmin → 0 ≤ B.rmax → 0 < B.Dmin → + θ^2/2 ≤ B.dmin → B.dmax ≤ 8*θ^2 → B.Dmax ≤ 8*φ^2 → + σ^2/2 ≤ B.emin → B.emax ≤ 8*σ^2 → 4 ≤ σ*B.qmin → 4 ≤ σ*B.wmin → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let H := ENNReal.ofReal (Cρ*p^3*(min θ σ)^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) + let O := (ENNReal.ofReal (30720*B.rmax/p*(1+φ/σ)*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin) + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (128/((p/128)^2*θ^2))*H+ + ENNReal.ofReal (128*φ/((p/128)^2*θ^3))*min H O := by + obtain ⟨Cρ,hCρ,hforce⟩ := hd₀.direct_transport_relative_budget + refine ⟨Cρ,hCρ,?_⟩ + intro s T F hs hT h0 zX B S M A P L a b massScale φ θ σ Cs p len I + hS hS0 ha hb hab hp hlen hlenI hJI hM hA hP hL hm hφ hθ hσ hσ1 hCs hstable + hqmin hqmax hmq hmw hr hrmax hD hdlo hdhi hDhi helo hehi hq hw HX HZ + have hh := hforce s T F hs hT h0 zX B S M A P L a b massScale φ θ σ Cs p len I + hS hS0 ha hb hab hp hlen hlenI hJI hM hA hP hL hm hφ hθ hσ hσ1 hCs hstable + hqmin hqmax hmq hmw hr hrmax hD hdlo hdhi hDhi helo hehi hq hw HX HZ + dsimp only at hh ⊢ + have he : 128*(θ+φ)/((p/128)^2*θ^3)=128/((p/128)^2*θ^2)+128*φ/((p/128)^2*θ^3) := by + field_simp + rw [he,ENNReal.ofReal_add (by positivity) (by positivity),add_mul] at hh + exact hh.trans (add_le_add (mul_le_mul' le_rfl (min_le_left _ _)) le_rfl) + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma measurable_forceTransportKernel (r : ℝ) (n a : Vec) : + Measurable (fun v : Vec=>forceTransportKernel r n a v) := by + have hu : Measurable velocity := (contDiff_velocity (k:=0)).continuous.measurable + have hq : Measurable q := (contDiff_q (k:=0)).continuous.measurable + have hd : Measurable (fun v : Vec=>1-dot n (velocity v)) := + measurable_const.sub (continuous_dot.measurable.comp (measurable_const.prodMk hu)) + have hQ : Measurable (fun v : Vec=>receiverQCLM a n (n-velocity v)) := + (receiverQCLM a n).continuous.measurable.comp (measurable_const.sub hu) + have hm := (((measurable_const (a:=r^2)).mul (hq.pow_const 2)).mul (hd.pow_const 2)).inv.smul hQ + convert hm using 1 + funext v + simp only [forceTransportKernel,Pi.smul_apply',Pi.inv_apply,Pi.mul_apply,receiverQCLM_apply] + +lemma measurable_forceSourceKernel_lorentz (r : ℝ) (n a E B : Vec) : + Measurable (fun v : Vec=>forceSourceKernel r n a v + (fderiv ℝ velocity v (E+cross (velocity v) B))) := by + have hu : Measurable velocity := (contDiff_velocity (k:=0)).continuous.measurable + have hq : Measurable q := (contDiff_q (k:=0)).continuous.measurable + have hK : Measurable (fun v : Vec=>E+cross (velocity v) B) := + measurable_const.add ((contDiff_cross (k:=0)).continuous.measurable.comp (hu.prodMk measurable_const)) + have hb := hq.inv.smul (hK.sub ((continuous_dot.measurable.comp (hu.prodMk hK)).smul hu)) + have hd : Measurable (fun v : Vec=>1-dot n (velocity v)) := + measurable_const.sub (continuous_dot.measurable.comp (measurable_const.prodMk hu)) + have hNum : Measurable (fun v : Vec=> + dot n ((q v)⁻¹ • ((E+cross (velocity v) B)-dot (velocity v) (E+cross (velocity v) B) • velocity v)) • + (n-velocity v)-(1-dot n (velocity v)) • + ((q v)⁻¹ • ((E+cross (velocity v) B)-dot (velocity v) (E+cross (velocity v) B) • velocity v))) := + ((continuous_dot.measurable.comp (measurable_const.prodMk hb)).smul + (measurable_const.sub hu)).sub (hd.smul hb) + have hQ := (receiverQCLM a n).continuous.measurable.comp hNum + have hm := ((measurable_const (a:=r)).mul (hd.pow_const 2)).inv.smul hQ + convert hm using 1 + funext v + simp only [forceSourceKernel,sourceNumerator,fderiv_velocity_apply, + Pi.smul_apply',Pi.inv_apply,Pi.mul_apply,Function.comp_apply,receiverQCLM_apply] + +lemma physicalDirectTransportDensity_relative_cover {s : Solution} {X V : ℝ→Vec} + (B : ClosedConeBin) (z : ConeCoordinate) {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) + (hf : Measurable (fun v : Vec=>s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)))) : + physicalDirectTransportDensity s X V B z≤ + ∑j∈Finset.range N,physicalDirectTransportDensity s X V (relativeBinRefinement B j) z := by + let g := fun v : Vec=>ENNReal.ofReal ‖s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)) • + forceTransportKernel (z.1-z.2.1) z.2.2.1 (velocity (V z.1)) v‖ + have hg : Measurable g := (hf.smul (measurable_forceTransportKernel _ _ _)).norm.ennreal_ofReal + have hc := lintegral_coneBin_relative_cover B z.2.2.1 (V z.1) hN hg + unfold physicalDirectTransportDensity + dsimp only + change ENNReal.ofReal ((z.1-z.2.1)^2)*(∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)),g v)≤_ + apply (mul_le_mul' le_rfl hc).trans_eq + exact Finset.mul_sum _ _ _ + +lemma physicalDirectSourceDensity_relative_cover {s : Solution} {X V : ℝ→Vec} + (B : ClosedConeBin) (z : ConeCoordinate) {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) + (hf : Measurable (fun v : Vec=>s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)))) : + physicalDirectSourceDensity s X V B z≤ + ∑j∈Finset.range N,physicalDirectSourceDensity s X V (relativeBinRefinement B j) z := by + let y := X z.1-(z.1-z.2.1) • z.2.2.1 + let g := fun v : Vec=>ENNReal.ofReal ‖s.f (z.2.1,(y,v)) • + forceSourceKernel (z.1-z.2.1) z.2.2.1 (velocity (V z.1)) v + (fderiv ℝ velocity v (s.E (z.2.1,y)+cross (velocity v) (s.B (z.2.1,y))))‖ + have hg : Measurable g := (hf.smul (measurable_forceSourceKernel_lorentz _ _ _ _ _)).norm.ennreal_ofReal + have hc := lintegral_coneBin_relative_cover B z.2.2.1 (V z.1) hN hg + unfold physicalDirectSourceDensity + dsimp only + change ENNReal.ofReal ((z.1-z.2.1)^2)*(∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)),g v)≤_ + apply (mul_le_mul' le_rfl hc).trans_eq + exact Finset.mul_sum _ _ _ + +lemma measurable_forceTransportFamily {α : Type*} [MeasurableSpace α] + {r : α→ℝ} {n a v : α→Vec} (hr : Measurable r) (hn : Measurable n) + (ha : Measurable a) (hv : Measurable v) : + Measurable (fun x=>forceTransportKernel (r x) (n x) (a x) (v x)) := by + have hu := (contDiff_velocity (k:=0)).continuous.measurable.comp hv + have hq := (contDiff_q (k:=0)).continuous.measurable.comp hv + have hd : Measurable (fun x=>1-dot (n x) (velocity (v x))) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hu)) + have hD : Measurable (fun x=>1-dot (n x) (a x)) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk ha)) + unfold forceTransportKernel receiverQ + exact (((hr.pow_const 2).mul (hq.pow_const 2)).mul (hd.pow_const 2)).inv.smul + ((hD.smul (hn.sub hu)).add ((continuous_dot.measurable.comp (ha.prodMk (hn.sub hu))).smul hn)) + +lemma measurable_forceSourceFamily {α : Type*} [MeasurableSpace α] + {r : α→ℝ} {n a v b : α→Vec} (hr : Measurable r) (hn : Measurable n) + (ha : Measurable a) (hv : Measurable v) (hb : Measurable b) : + Measurable (fun x=>forceSourceKernel (r x) (n x) (a x) (v x) (b x)) := by + have hu := (contDiff_velocity (k:=0)).continuous.measurable.comp hv + have hd : Measurable (fun x=>1-dot (n x) (velocity (v x))) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hu)) + have hD : Measurable (fun x=>1-dot (n x) (a x)) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk ha)) + have hN : Measurable (fun x=>sourceNumerator (n x) (velocity (v x)) (b x)) := + ((continuous_dot.measurable.comp (hn.prodMk hb)).smul (hn.sub hu)).sub (hd.smul hb) + unfold forceSourceKernel receiverQ + exact ((hr.mul (hd.pow_const 2)).inv.smul + ((hD.smul hN).add ((continuous_dot.measurable.comp (ha.prodMk hN)).smul hn))) + +lemma measurable_lorentz_acceleration {α : Type*} [MeasurableSpace α] + {v E B : α→Vec} (hv : Measurable v) (hE : Measurable E) (hB : Measurable B) : + Measurable (fun x=>fderiv ℝ velocity (v x) (E x+cross (velocity (v x)) (B x))) := by + have hu := (contDiff_velocity (k:=0)).continuous.measurable.comp hv + have hq := (contDiff_q (k:=0)).continuous.measurable.comp hv + have hK := hE.add ((contDiff_cross (k:=0)).continuous.measurable.comp (hu.prodMk hB)) + simp_rw [fderiv_velocity_apply] + exact hq.inv.smul (hK.sub ((continuous_dot.measurable.comp (hu.prodMk hK)).smul hu)) + +lemma measurable_coneBin_kernelDensity {g : Particle} (hg : Measurable g) + {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) (B : ClosedConeBin) + {K : ConeCoordinate×Vec→Vec} (hK : Measurable K) : + Measurable (fun z : ConeCoordinate=>∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal ‖g (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)) • K (z,v)‖) := by + let H : Set (ConeCoordinate×Vec) := + {p | p.2∈coneBinMomentumSet B p.1.2.2.1 (velocity (V p.1.1))} + have hn : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hv : Measurable (fun p : ConeCoordinate×Vec=>velocity p.2) := + (contDiff_velocity (k:=0)).continuous.measurable.comp measurable_snd + have ha : Measurable (fun p : ConeCoordinate×Vec=>velocity (V p.1.1)) := + (contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp (measurable_fst.comp measurable_fst)) + have hH : MeasurableSet H := by + exact (measurableSet_Icc.preimage ((contDiff_q (k:=0)).continuous.measurable.comp measurable_snd)).inter + ((measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hv)))).inter + (measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (ha.prodMk hv))))) + have hf : Measurable (fun p : ConeCoordinate×Vec=> + g (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) := by + exact hg.comp ((measurable_fst.comp (measurable_snd.comp measurable_fst)).prodMk + (((hX.comp (measurable_fst.comp measurable_fst)).sub + (((measurable_fst.comp measurable_fst).sub (measurable_fst.comp (measurable_snd.comp measurable_fst))).smul hn)).prodMk measurable_snd)) + have hm : Measurable (fun z : ConeCoordinate=>∫⁻v : Vec,H.indicator + (fun p=>ENNReal.ofReal ‖g (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2)) • K p‖) (z,v)) := + (((hf.smul hK).norm.ennreal_ofReal).indicator hH).lintegral_prod_right' + convert hm using 1 + ext z + rw [←lintegral_indicator (measurableSet_coneBinMomentumSet B _ _)] + apply lintegral_congr + intro v + rfl + +lemma physicalDirectTransportDensity_aemeasurable {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) : + AEMeasurable (physicalDirectTransportDensity s X V B) (physicalBinMeasure V B J) := by + have ht : Measurable (fun p : ConeCoordinate×Vec=>p.1.1) := measurable_fst.comp measurable_fst + have hσ : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.1) := + measurable_fst.comp (measurable_snd.comp measurable_fst) + have hn : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hK := measurable_forceTransportFamily (ht.sub hσ) hn + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp ht)) measurable_snd + have hm := measurable_coneBin_kernelDensity (hs.continuous_prefixParticle hT).measurable hX hV B hK + have hR : Measurable (fun z : ConeCoordinate=>ENNReal.ofReal ((z.1-z.2.1)^2)) := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).ennreal_ofReal + apply (hR.mul hm).aemeasurable.congr + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B hJ) + intro z hz + unfold physicalDirectTransportDensity + dsimp only [Pi.mul_apply] + congr 1 + apply lintegral_congr + intro v + rw [prefixParticle,prefixClamp_eq (show z.2.1∈Icc 0 T from ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩)] + rfl + +lemma physicalDirectSourceDensity_aemeasurable {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) : + AEMeasurable (physicalDirectSourceDensity s X V B) (physicalBinMeasure V B J) := by + have ht : Measurable (fun p : ConeCoordinate×Vec=>p.1.1) := measurable_fst.comp measurable_fst + have hσ : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.1) := + measurable_fst.comp (measurable_snd.comp measurable_fst) + have hn : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hy := hσ.prodMk ((hX.comp ht).sub ((ht.sub hσ).smul hn)) + have hb := measurable_lorentz_acceleration measurable_snd + ((continuous_prefixField hs.E_smooth.continuousOn hT).measurable.comp hy) + ((continuous_prefixField hs.B_smooth.continuousOn hT).measurable.comp hy) + have hK := measurable_forceSourceFamily (ht.sub hσ) hn + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp ht)) measurable_snd hb + have hm := measurable_coneBin_kernelDensity (hs.continuous_prefixParticle hT).measurable hX hV B hK + have hR : Measurable (fun z : ConeCoordinate=>ENNReal.ofReal ((z.1-z.2.1)^2)) := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).ennreal_ofReal + apply (hR.mul hm).aemeasurable.congr + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B hJ) + intro z hz + unfold physicalDirectSourceDensity + dsimp only [Pi.mul_apply] + congr 1 + apply lintegral_congr + intro v + dsimp only [Pi.sub_apply,Pi.smul_apply',Function.comp_apply] + simp only [prefixParticle,prefixField,prefixClamp_eq + (show z.2.1∈Icc 0 T from ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩)] + +lemma EnergyPrefix.measurable_velocity_slice {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) {σ : ℝ} (hσ : σ∈Icc 0 T) (y : Vec) : + Measurable (fun v : Vec=>s.f (σ,(y,v))) := by + exact (hs.f_smooth.continuousOn.comp_continuous + (continuous_const.prodMk (continuous_const.prodMk continuous_id)) + (fun _=>⟨hσ,mem_univ _⟩)).measurable + +lemma physicalDirectTransport_integral_relative_cover {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) : + (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∑j∈Finset.range N,∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V (relativeBinRefinement B j) J := by + have hp : (∫⁻z : ConeCoordinate,physicalDirectTransportDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate,∑j∈Finset.range N,physicalDirectTransportDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact physicalDirectTransportDensity_relative_cover B z hN + (hs.measurable_velocity_slice ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _) + apply hp.trans_eq + exact lintegral_finsetSum' _ (fun j _=> + physicalDirectTransportDensity_aemeasurable hs hT hX hV (relativeBinRefinement B j) hJ hJT) + +lemma physicalDirectSource_integral_relative_cover {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) : + (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∑j∈Finset.range N,∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V (relativeBinRefinement B j) J := by + have hp : (∫⁻z : ConeCoordinate,physicalDirectSourceDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate,∑j∈Finset.range N,physicalDirectSourceDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact physicalDirectSourceDensity_relative_cover B z hN + (hs.measurable_velocity_slice ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _) + apply hp.trans_eq + exact lintegral_finsetSum' _ (fun j _=> + physicalDirectSourceDensity_aemeasurable hs hT hX hV (relativeBinRefinement B j) hJ hJT) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalElectricKernel.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalElectricKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f9f19a15fa543fed88281f3533bf71d21c6caa8 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalElectricKernel.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.IncrementBootstrap + +namespace OAI + +noncomputable section + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open scoped Topology ContDiff NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal RealInnerProductSpace + +namespace RVM + +def physicalElectricKernel (r : ℝ) (n u b : Vec) : Vec := + ((1-dot u u)/(r^2*(1-dot n u)^3)) • (n-u) + + (r*(1-dot n u)^3)⁻¹ • ((dot n b) • (n-u)-(1-dot n u) • b) + +def potentialSourceRate (r : ℝ) (n u b : Vec) : ℝ := + ((1-dot u u)-(1-dot n u))/(r^2*(1-dot n u)^2) + + dot n b/(r*(1-dot n u)^2) + +def potentialSpaceRate (r : ℝ) (n u b e : Vec) : ℝ := + -dot (n-u) e/(r^2*(1-dot n u)^2) - + dot n e/(1-dot n u)*potentialSourceRate r n u b + +def potentialVectorTimeRate (r : ℝ) (n u b : Vec) : Vec := + (r*(1-dot n u)^2)⁻¹ • b + + (potentialSourceRate r n u b/(1-dot n u)) • u + +lemma potential_kernel_component (r : ℝ) (n u b e : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) : + -potentialSpaceRate r n u b e - dot (potentialVectorTimeRate r n u b) e = + dot (physicalElectricKernel r n u b) e := by + simp only [potentialSpaceRate,potentialVectorTimeRate,physicalElectricKernel, + potentialSourceRate,dot_add_left,dot_smul_left,dot_sub_left] + field_simp + ring + +lemma physical_kernel_signed_transform (r : ℝ) (n u b a : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) (hD : 1-dot n a≠0) : + ((1-dot n u)/(1-dot n a)) • + ((1-dot n a) • physicalElectricKernel r n u b + + (dot a (physicalElectricKernel r n u b)) • n) = + signedForceKernel r a u n b := by + ext i + simp only [physicalElectricKernel,signedForceKernel,coneTransform,sourceVelocityRate, + dot_add_right,dot_sub_right,dot_smul_right,PiLp.add_apply,PiLp.sub_apply, + PiLp.smul_apply,PiLp.neg_apply,smul_eq_mul] + field_simp + ring + +lemma hasDerivAt_potential_source {r : ℝ → ℝ} {n u : ℝ → Vec} {s : ℝ} {b : Vec} + (hr : HasDerivAt r (-dot (n s) (u s)) s) + (hn : HasDerivAt n ((r s)⁻¹ • (dot (n s) (u s) • n s-u s)) s) + (hu : HasDerivAt u b s) (hr0 : r s≠0) (hd : 1-dot (n s) (u s)≠0) : + HasDerivAt (fun t => (r t*(1-dot (n t) (u t)))⁻¹) + (potentialSourceRate (r s) (n s) (u s) b) s := by + have hh := (hr.mul ((hasDerivAt_const s (1:ℝ)).sub (hasDerivAt_dot hn hu))).inv + (mul_ne_zero hr0 hd) + convert hh using 1 + simp only [potentialSourceRate,dot_smul_left,dot_sub_left,Pi.mul_apply,Pi.sub_apply] + field_simp + ring + +lemma hasDerivAt_label_scalar_potential {r : ℝ → ℝ} {n u : ℝ → Vec} + {s : ℝ} {b e : Vec} {z : ℝ} + (hr : HasDerivAt r (dot (n s) e-z*dot (n s) (u s)) s) + (hn : HasDerivAt n ((r s)⁻¹ • (e-z • u s- + (dot (n s) e-z*dot (n s) (u s)) • n s)) s) + (hu : HasDerivAt u (z • b) s) (hr0 : r s≠0) (hd : 1-dot (n s) (u s)≠0) : + HasDerivAt (fun t => (r t*(1-dot (n t) (u t)))⁻¹) + (-dot (n s-u s) e/((r s)^2*(1-dot (n s) (u s))^2)+ + z*potentialSourceRate (r s) (n s) (u s) b) s := by + have hh := (hr.mul ((hasDerivAt_const s (1:ℝ)).sub (hasDerivAt_dot hn hu))).inv + (mul_ne_zero hr0 hd) + convert hh using 1 + simp only [potentialSourceRate,dot_smul_left,dot_sub_left,dot_smul_right, + Pi.mul_apply,Pi.sub_apply,dot_comm (u s) e] + field_simp + ring + +def potentialSpatialGradient (r : ℝ) (n u b : Vec) : Vec := + -(r^2*(1-dot n u)^2)⁻¹ • (n-u) - + (potentialSourceRate r n u b/(1-dot n u)) • n + +lemma dot_potentialSpatialGradient (r : ℝ) (n u b e : Vec) : + dot (potentialSpatialGradient r n u b) e = potentialSpaceRate r n u b e := by + simp only [potentialSpatialGradient,potentialSpaceRate,dot_sub_left,dot_smul_left] + ring + +lemma potential_magnetic_kernel (r : ℝ) (n u b : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) : + cross (potentialSpatialGradient r n u b) u - + (r*(1-dot n u)^2)⁻¹ • cross n b = + cross n (physicalElectricKernel r n u b) := by + ext i + fin_cases i <;> + simp [potentialSpatialGradient,physicalElectricKernel,potentialSourceRate,cross, + PiLp.sub_apply,PiLp.smul_apply] <;> + field_simp <;> ring + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma IncrementBootstrap.reflect {V : ℝ → Vec} {T M A P L : ℝ} + (H : IncrementBootstrap V T M A P L) : + IncrementBootstrap (fun t => V (T-t)) T M A P L := by + intro n a b ha hab hb hband + have h := H n (T-b) (T-a) (by linarith) (by linarith) (by linarith) + (by + intro t ht + have hh := hband (T-t) ⟨by linarith [ht.2],by linarith [ht.1]⟩ + simpa only [sub_sub_cancel] using hh) + have he : T-(T-a)=a := by ring + have he' : T-(T-b)=b := by ring + have hd : (T-a)-(T-b)=b-a := by ring + simpa only [he,he',hd,norm_sub_rev] using h + +lemma IncrementBootstrap.velocity_stopped_backward {V : ℝ → Vec} {T M A P L a b ε : ℝ} + (H : IncrementBootstrap V T M A P L) (ha : 0 ≤ a) (hab : a ≤ b) (hb : b ≤ T) + (hV : ContinuousOn V (Icc a b)) (hM : 0 ≤ M) (hA : 0 ≤ A) (hP : 0 ≤ P) + (hL : 0 ≤ L) (hε : ε < q (V b)/2) + (hstep : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (V b) ≤ ε) : + ∀ t ∈ Icc a b, ‖V t-V b‖ ≤ ε ∧ + ‖velocity (V t)-velocity (V b)‖ ≤ 2*ε/q (V b) ∧ + q (V b)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V b) := by + have he : T-(T-b)=b := by ring + have hd : (T-a)-(T-b)=b-a := by ring + have hcont : ContinuousOn (fun t => V (T-t)) (Icc (T-b) (T-a)) := + hV.comp (continuous_const.sub continuous_id).continuousOn + (fun t ht => ⟨by linarith [ht.2],by linarith [ht.1]⟩) + have hh := H.reflect.velocity_stopped_forward (a:=T-b) (b:=T-a) + (by linarith) (by linarith) (by linarith) hcont hM hA hP hL + (by simpa only [he] using hε) (by simpa only [he,hd] using hstep) + intro t ht + have hht := hh (T-t) ⟨by linarith [ht.2],by linarith [ht.1]⟩ + have het : T-(T-t)=t := by ring + simpa only [he,het] using hht + +lemma stopping_modulus_mono {M A P L q l l' : ℝ} + (hM : 0≤M) (hA : 0≤A) (hP : 0≤P) (hL : 0≤L) (hq : 0≤q) (hll : l≤l') : + M*P*Real.sqrt l+2*A*l*P^2*L/q ≤ + M*P*Real.sqrt l'+2*A*l'*P^2*L/q := by + apply add_le_add + · exact mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hll) (mul_nonneg hM hP) + · apply div_le_div_of_nonneg_right _ hq + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hll (by positivity)) + (sq_nonneg P)) hL + +lemma IncrementBootstrap.velocity_stopped_about {V : ℝ → Vec} {T M A P L a b r ε : ℝ} + (H : IncrementBootstrap V T M A P L) (ha : 0 ≤ a) (hb : b ≤ T) + (hr : r ∈ Icc a b) (hV : ContinuousOn V (Icc a b)) + (hM : 0 ≤ M) (hA : 0 ≤ A) (hP : 0 ≤ P) (hL : 0 ≤ L) + (hε : ε < q (V r)/2) + (hstep : M*P*Real.sqrt (b-a)+2*A*(b-a)*P^2*L/q (V r) ≤ ε) : + ∀ t ∈ Icc a b, ‖V t-V r‖ ≤ ε ∧ + ‖velocity (V t)-velocity (V r)‖ ≤ 2*ε/q (V r) ∧ + q (V r)/2 ≤ q (V t) ∧ q (V t) ≤ 2*q (V r) := by + intro t ht + by_cases htr : r≤t + · apply H.velocity_stopped_forward (ha.trans hr.1) hr.2 hb + (hV.mono (Icc_subset_Icc hr.1 le_rfl)) hM hA hP hL hε + ((stopping_modulus_mono hM hA hP hL (q_pos (V r)).le (by linarith [hr.1])).trans hstep) + t ⟨htr,ht.2⟩ + · apply H.velocity_stopped_backward ha hr.1 (hr.2.trans hb) + (hV.mono (Icc_subset_Icc le_rfl hr.2)) hM hA hP hL hε + ((stopping_modulus_mono hM hA hP hL (q_pos (V r)).le (by linarith [hr.2])).trans hstep) + t ⟨ht.1,le_of_not_ge htr⟩ + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderDensity.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c89f78affb7242ed2e50d5fb81ab6049b21e89d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderDensity.lean @@ -0,0 +1,805 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.PhysicalGeometryCutoffDensity + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma angularMultiplierCLM_highband_transverse {w : ℝ} {W x : Vec} + (hw : 0hs.nonnegative _ hzT _) + rw [ENNReal.ofReal_mul (by positivity : 0≤1974272*θ/(w*φ))] at hb + convert hb using 1 + ac_rfl + refine hb.trans_eq ?_ + rw [lintegral_add_left' (hN.const_mul _),lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + +lemma PhaseFlowOn.projected_remainder_near_far {s : Solution} {T a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (B : ClosedConeBin) {S : Set Phase} (hS : IsCompact S) + (hS0 : tsupport (fun z=>s.f (0,z))⊆S) (hJ : Icc a b⊆Icc 0 T) + {C w p θ φ : ℝ} (hC : 0≤C) (hp : 0≤p) + (hw : 0(prefixFlow F.flow T zX t).2) B (Icc a b), + physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) B z.1 z.2.1 z.2.2≤ENNReal.ofReal (128*C*p^3*θ^2)) : + (∫⁻z : ConeCoordinate,physicalProjectedRemainderDensity s + (fun t=>(prefixFlow F.flow T zX t).1) (fun t=>(prefixFlow F.flow T zX t).2) + B w (prefixMomentumForce s F.flow T zX) z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) B (Icc a b))≤ + ENNReal.ofReal (6272*φ)*min + (ENNReal.ofReal (128*C*p^3*θ^2)*(volume (Icc a b)* + ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2))) + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin))+ + ENNReal.ofReal (1974272*θ/(w*φ))* + ((∫⁻t in Icc a b,ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖)* + ENNReal.ofReal (49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin))) := by + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hb := physicalProjectedRemainder_integral_bound (X:=fun t=>(prefixFlow F.flow T zX t).1) + hs hT hα.fst.measurable hα.snd.measurable B measurableSet_Icc hJ hw hθ hφ hsmall + hr hd hDlo hDhi (fun t ht=>by simpa only [prefixFlow,prefixClamp_eq (hJ ht)] using hband t ht) + (K:=prefixMomentumForce s F.flow T zX) + have hnear := physicalBin_density_near hα.snd.measurable B measurableSet_Icc hφ.le hDhi hdensity + have hfar := F.physicalBin_density_far hs hT zX B hS hS0 hJ hr hD + have hK : Measurable (fun t=>ENNReal.ofReal ‖prefixMomentumForce s F.flow T zX t‖) := + (F.continuous_prefixMomentumForce hs hT zX).norm.measurable.ennreal_ofReal + have hac := physicalBin_radial_density_near hα.snd.measurable B measurableSet_Icc + hC hp hθ hφ.le hrmax hDhi hdensity hK + exact hb.trans (add_le_add (mul_le_mul' le_rfl (le_min hnear hfar)) (mul_le_mul' le_rfl hac)) + +def coneReceiverJacobian (V : ℝ→Vec) (z : ConeCoordinate) : ℝ := + (z.1-z.2.1)^2*(1-dot z.2.2.1 (velocity (V z.1))) + +def coneFoot (X : ℝ→Vec) (z : ConeCoordinate) : ℝ×Vec := + (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1) + +lemma measurable_coneFoot {X : ℝ→Vec} (hX : Measurable X) : Measurable (coneFoot X) := by + exact (measurable_fst.comp measurable_snd).prodMk + ((hX.comp measurable_fst).sub ((measurable_fst.sub (measurable_fst.comp measurable_snd)).smul + (measurable_subtype_coe.comp (measurable_snd.comp measurable_snd)))) + +lemma measurable_coneReceiverJacobian {V : ℝ→Vec} (hV : Measurable V) : + Measurable (coneReceiverJacobian V) := by + exact ((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).mul + (measurable_const.sub (continuous_dot.measurable.comp + ((measurable_subtype_coe.comp (measurable_snd.comp measurable_snd)).prodMk + ((contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp measurable_fst))))) + +lemma PhaseFlowOn.physicalBin_spatial_budget {s : Solution} {T a b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (C : ClosedConeBin) (k j : ℕ) (hJ : Icc a b⊆Icc 0 T) + (hangle : ∀D∈Icc C.Dmin C.Dmax,DyadicWindow k j (Real.sqrt (D/2))) + {g : ℝ×Vec→ℝ≥0∞} (hg : Measurable g) : + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻ z : ConeCoordinate,ENNReal.ofReal (coneReceiverJacobian V z)*g (coneFoot X z) + ∂physicalBinMeasure V C (Icc a b)) ≤ + ∫⁻ σ in Icc (max 0 (a-C.rmax)) (min T (b-C.rmin)),∫⁻ y : Vec, + (arrivalAngularSet F.flow zX T k j).indicator g (σ,y) := by + classical + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let J' := Icc (max 0 (a-C.rmax)) (min T (b-C.rmin)) + let U := arrivalAngularSet F.flow zX T k j + let H : Set (ℝ×Vec) := {p | p.1∈J'} ∩ U + let G := H.indicator g + have hU : MeasurableSet U := F.measurable_arrivalAngularSet zX k j + have hH : MeasurableSet H := (measurableSet_Icc.preimage measurable_fst).inter hU + have hG : Measurable G := hg.indicator hH + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + let K : ConeCoordinate→ℝ≥0∞ := fun z=>ENNReal.ofReal (coneReceiverJacobian V z)*g (coneFoot X z) + have hK : Measurable K := (measurable_coneReceiverJacobian hV).ennreal_ofReal.mul + (hg.comp (measurable_coneFoot hX)) + change (∫⁻z,K z ∂physicalBinMeasure V C (Icc a b))≤_ + rw [physicalBin_integral_eq_triangle hV C measurableSet_Icc hJ hK, + ←lintegral_retarded_triangle_parameter sphereMeasure T + (hK.indicator (measurableSet_physicalBinBase hV C measurableSet_Icc))] + calc + _ ≤ ∫⁻σ in Ioo (0:ℝ) T,∫⁻n : Sphere,∫⁻r in Ioo (0:ℝ) (T-σ), + ENNReal.ofReal (r^2*(1-dot n.1 (velocity (F.flow zX (σ+r)).2)))* + G (σ,(F.flow zX (σ+r)).1-r • n.1) ∂volume ∂sphereMeasure := by + apply setLIntegral_mono' measurableSet_Ioo + intro σ hσ + apply lintegral_mono + intro n + apply setLIntegral_mono' measurableSet_Ioo + intro r hr + have ht : σ+r∈Icc 0 T := ⟨by linarith [hσ.1,hr.1],by linarith [hr.2]⟩ + by_cases hz : (σ+r,σ,n)∈physicalBinBase V C (Icc a b) + · rw [indicator_of_mem hz] + have hσJ : σ∈J' := by + refine ⟨max_le hσ.1.le ?_,le_min hσ.2.le ?_⟩ + · linarith [hz.1.1,hz.2.2.1.2] + · linarith [hz.1.2,hz.2.2.1.1] + have hdom := F.arrival_polar_mem zX hσ hr n + have htime := F.arrival_polar_time zX hσ hr n + have hdir := F.arrival_polar_direction zX hσ hr n + have hmem : (σ,(F.flow zX (σ+r)).1-r • n.1)∈U := by + apply Or.inl + refine ⟨hdom,?_⟩ + rw [hdir,arrivalVelocity,htime] + apply hangle + simpa only [V,prefixFlow,prefixClamp_eq ht] using hz.2.2.2.2 + rw [show G (σ,(F.flow zX (σ+r)).1-r • n.1)= + g (σ,(F.flow zX (σ+r)).1-r • n.1) from indicator_of_mem (show (σ,(F.flow zX (σ+r)).1-r • n.1)∈H from ⟨hσJ,hmem⟩) g] + exact le_of_eq (by simp only [K,coneReceiverJacobian,coneFoot,X,V,prefixFlow, + prefixClamp_eq ht,add_sub_cancel_left]) + · rw [indicator_of_notMem hz] + exact zero_le + _ = ∫⁻σ in Ioo (0:ℝ) T,∫⁻y in ball (F.flow zX T).1 (T-σ),G (σ,y) := by + apply setLIntegral_congr_fun measurableSet_Ioo + intro σ hσ + exact (F.receiver_polar_lintegral (Ioo_subset_Icc_self hσ) zX + (hG.comp (measurable_const.prodMk measurable_id))).symm + _ ≤ ∫⁻σ in Ioo (0:ℝ) T,∫⁻y : Vec,G (σ,y) := by + apply lintegral_mono + intro σ + exact setLIntegral_le_lintegral _ _ + _ ≤ ∫⁻σ : ℝ,∫⁻y : Vec,G (σ,y) := setLIntegral_le_lintegral _ _ + _ = _ := by + rw [←lintegral_indicator measurableSet_Icc] + apply lintegral_congr + intro σ + by_cases hσ : σ∈J' + · rw [indicator_of_mem hσ] + apply lintegral_congr + intro y + change G (σ,y)=U.indicator g (σ,y) + by_cases hy : (σ,y)∈U + · simp only [G,indicator_of_mem (show (σ,y)∈H from ⟨hσ,hy⟩),indicator_of_mem hy] + · simp only [G,indicator_of_notMem (show (σ,y)∉H from fun h=>hy h.2),indicator_of_notMem hy] + · rw [indicator_of_notMem hσ] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro y + exact indicator_of_notMem (show (σ,y)∉H from fun h=>hσ h.1) g + +def prefixConeMagnetic (s : Solution) (T : ℝ) (X : ℝ→Vec) (z : ConeCoordinate) : ℝ := + ‖prefixField s.B T (coneFoot X z)‖ + +lemma EnergyPrefix.measurable_prefixConeMagnetic {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X : ℝ→Vec} (hX : Measurable X) : + Measurable (prefixConeMagnetic s T X) := + ((continuous_prefixField hs.B_smooth.continuousOn hT).measurable.comp + (measurable_coneFoot hX)).norm + +lemma PhaseFlowOn.physicalBin_magneticField {s : Solution} {T a b I φ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (C : ClosedConeBin) (k j : ℕ) (hJ : Icc a b⊆Icc 0 T) + (hI : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻z : ConeCoordinate,ENNReal.ofReal ((z.1-z.2.1)^2*φ^2*prefixConeMagnetic s T X z^2) + ∂physicalBinMeasure V C (Icc a b)) ≤ + ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-C.rmax)) (min T (b-C.rmin)) I j := by + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let J' := Icc (max 0 (a-C.rmax)) (min T (b-C.rmin)) + have hclip : J'⊆Icc 0 T := fun _ h=>⟨(le_max_left _ _).trans h.1,h.2.trans (min_le_left _ _)⟩ + let g : ℝ×Vec→ℝ≥0∞ := fun p=>ENNReal.ofReal (‖prefixField s.B T p‖^2) + have hg : Measurable g := ((continuous_prefixField hs.B_smooth.continuousOn hT).measurable.norm.pow_const 2).ennreal_ofReal + have ho := F.physicalBin_spatial_budget hs hT zX C k j hJ hangle hg + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hsp : (∫⁻σ in J',∫⁻y : Vec,(arrivalAngularSet F.flow zX T k j).indicator g (σ,y))= + ENNReal.ofReal I*magneticFieldBudget s F.flow zX T k + (max 0 (a-C.rmax)) (min T (b-C.rmin)) I j := by + rw [magneticFieldBudget,←mul_assoc,ENNReal.mul_inv_cancel (ENNReal.ofReal_pos.mpr hI).ne' + ENNReal.ofReal_ne_top,one_mul] + apply setLIntegral_congr_fun measurableSet_Icc + intro σ hσ + apply lintegral_congr + intro y + by_cases hy : (σ,y)∈arrivalAngularSet F.flow zX T k j + · simp only [indicator_of_mem hy,g,prefixField,prefixClamp_eq (hclip hσ)] + · simp only [indicator_of_notMem hy] + change (∫⁻z : ConeCoordinate,ENNReal.ofReal ((z.1-z.2.1)^2*φ^2*prefixConeMagnetic s T X z^2) + ∂physicalBinMeasure V C (Icc a b))≤_ + calc + _ ≤ ∫⁻z : ConeCoordinate,(2:ℝ≥0∞)*(ENNReal.ofReal (coneReceiverJacobian V z)*g (coneFoot X z)) + ∂physicalBinMeasure V C (Icc a b) := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hα.snd.measurable C measurableSet_Icc)] with z hz + have hDz : φ^2≤2*(1-dot z.2.2.1 (velocity (V z.1))) := by + linarith [hD.trans hz.2.2.2.2.1] + have hpos : 0≤coneReceiverJacobian V z := + mul_nonneg (sq_nonneg _) (cone_denom_pos _ _ (sphere_norm _)).le + rw [←ENNReal.ofReal_mul hpos] + calc + _ ≤ ENNReal.ofReal (2*(coneReceiverJacobian V z*‖prefixField s.B T (coneFoot X z)‖^2)) := by + apply ENNReal.ofReal_le_ofReal + change (z.1-z.2.1)^2*φ^2*prefixConeMagnetic s T X z^2≤ + 2*((z.1-z.2.1)^2*(1-dot z.2.2.1 (velocity (V z.1)))*prefixConeMagnetic s T X z^2) + nlinarith [mul_le_mul_of_nonneg_left hDz (mul_nonneg (sq_nonneg (z.1-z.2.1)) + (sq_nonneg (prefixConeMagnetic s T X z)))] + _ = _ := by rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2)]; norm_num + _ = (2:ℝ≥0∞)*(∫⁻z : ConeCoordinate,ENNReal.ofReal (coneReceiverJacobian V z)*g (coneFoot X z) + ∂physicalBinMeasure V C (Icc a b)) := lintegral_const_mul' _ _ (by norm_num) + _ ≤ (2:ℝ≥0∞)*(ENNReal.ofReal I*magneticFieldBudget s F.flow zX T k + (max 0 (a-C.rmax)) (min T (b-C.rmin)) I j) := + mul_le_mul' le_rfl (ho.trans_eq hsp) + _ = _ := by rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2)]; norm_num; ring + +lemma Admissible.uniform_actual_magnetic_Cauchy {d : Datum} (hd₀ : Admissible d) : + ∃ C₀ : ℝ, 0≤C₀ ∧ ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀ z,s.f (0,z)=d.f₀ z) → ∀ (zX : Phase) (C : ClosedConeBin) (S : Set Phase) + (a b I P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z => s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0 (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let D := ENNReal.ofReal (128*C₀*P^3*(min θ σ)^2) + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T C S a b (max 0 (a-C.rmax)) (min T (b-C.rmin))) / + ENNReal.ofReal (C.rmin^2*C.Dmin) + (∫⁻ z : ConeCoordinate, ENNReal.ofReal (z.1-z.2.1) * ENNReal.ofReal φ * + ENNReal.ofReal (prefixConeMagnetic s T X z) * N z ∂physicalBinMeasure V C (Icc a b)) ≤ + (ENNReal.ofReal (2*I) * magneticFieldBudget s F.flow zX T k + (max 0 (a-C.rmax)) (min T (b-C.rmin)) I j)^(1/2:ℝ) * + (min (D^2*(volume (Icc a b)*ENNReal.ofReal (C.rmax-C.rmin)*ENNReal.ofReal (384*φ^2))) + (D*M))^(1/2:ℝ) := by + obtain ⟨C₀,hC₀,hbound⟩ := hd₀.uniform_physicalBinDensity_constant + refine ⟨C₀,hC₀,?_⟩ + intro s T F hs hT h0 zX C S a b I P θ φ σ k j hS hS0 hJ hI hP hθ hφ hσ hR hD hDlow hq hd hDmax he hangle + dsimp only + let X : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).1 + let V : ℝ → Vec := fun t => (prefixFlow F.flow T zX t).2 + let N : ConeCoordinate → ℝ≥0∞ := fun z => physicalBinDensity s X V C z.1 z.2.1 z.2.2 + let μ := physicalBinMeasure V C (Icc a b) + have hα : Continuous (fun t => prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hX : Measurable X := hα.fst.measurable + have hV : Measurable V := hα.snd.measurable + have hN : AEMeasurable N μ := + physicalBinDensity_aemeasurable hs hT hX hV C measurableSet_Icc hJ + have hG := hs.measurable_prefixConeMagnetic hT hX + have hW : AEMeasurable (fun z : ConeCoordinate => ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z)) μ := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal.mul_const (ENNReal.ofReal φ) |>.mul hG.ennreal_ofReal).aemeasurable + apply lintegral_product_bound_two μ hW hN + · have hfield := F.physicalBin_magneticField hs hT zX C k j hJ hI hDlow hangle + apply le_trans _ hfield + apply le_of_eq + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + have hr : 0≤z.1-z.2.1 := sub_nonneg.mpr hz.2.1.2 + have hg : 0≤prefixConeMagnetic s T X z := norm_nonneg _ + dsimp only + rw [mul_pow,mul_pow,←ENNReal.ofReal_pow hr,←ENNReal.ofReal_pow hφ, + ←ENNReal.ofReal_pow hg,←ENNReal.ofReal_mul (sq_nonneg _), + ←ENNReal.ofReal_mul (mul_nonneg (sq_nonneg _) (sq_nonneg _))] + · apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + exact hbound s T F hs h0 X V C z.1 z.2.1 z.2.2 P θ σ + ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ hP.le hθ hσ hq hd he + · have hmass := F.physicalBin_weighted_occupation hs hT zX C hS hS0 hJ hR.le hD.le + have hμ : physicalBinMeasure (fun t => (F.flow zX t).2) C (Icc a b) = μ := by + unfold μ physicalBinMeasure V + rw [physicalBinBase_prefix zX C hJ] + rw [hμ] at hmass + have hne : ENNReal.ofReal (C.rmin^2*C.Dmin)≠0 := (ENNReal.ofReal_pos.mpr (by positivity)).ne' + apply (ENNReal.le_div_iff_mul_le (Or.inl hne) (Or.inl ENNReal.ofReal_ne_top)).mpr + rw [mul_comm] + convert hmass using 1 + congr 1 + apply lintegral_congr_ae + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV C measurableSet_Icc) + intro z hz + simp only [N,X,V,physicalBinDensity,prefixFlow,prefixClamp_eq (hJ hz.1)] + · exact physicalBinMeasure_volume hV C measurableSet_Icc hφ hDmax + +lemma magneticFieldBudget_mono (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (k j : ℕ) (I : ℝ) {a b lo hi : ℝ} (hsub : Icc a b⊆Icc lo hi) : + magneticFieldBudget s α zX T k a b I j ≤ magneticFieldBudget s α zX T k lo hi I j := by + exact mul_le_mul' le_rfl (lintegral_mono_set hsub) + +lemma PhaseFlowOn.physicalBin_magneticField_common {s : Solution} {T a b lo hi I φ : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (C : ClosedConeBin) (k j : ℕ) (hJ : Icc a b⊆Icc 0 T) + (hI : 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + (∫⁻z : ConeCoordinate,ENNReal.ofReal ((z.1-z.2.1)^2*φ^2*prefixConeMagnetic s T X z^2) + ∂physicalBinMeasure V C (Icc a b))≤ + ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k lo hi I j := by + exact (F.physicalBin_magneticField hs hT zX C k j hJ hI hD hangle).trans + (mul_le_mul' le_rfl (magneticFieldBudget_mono s F.flow zX T k j I hsub)) + +lemma radial_source_interval_common {T a b R : ℝ} {C : ClosedConeBin} + (hmin : 0≤C.rmin) (hmax : C.rmax≤R) : + Icc (max 0 (a-C.rmax)) (min T (b-C.rmin))⊆Icc (max 0 (a-R)) (min T b) := by + intro σ hσ + constructor + · exact (max_le_max le_rfl (sub_le_sub_left hmax a)).trans hσ.1 + · exact hσ.2.trans (min_le_min le_rfl (by linarith)) + +lemma EnergyPrefix.shared_magneticFieldBudget {s : Solution} {T a b I c : ℝ} + (hs : EnergyPrefix s T) (α : Phase→ℝ→Phase) (zX : Phase) (k : ℕ) + (hI : 0⟨(le_max_left _ _).trans h.1,h.2.trans (min_le_left _ _)⟩) + hI (by positivity) + have hhi : min T b≤b := min_le_right _ _ + have hlo : a-c*I ≤ max 0 (a-c*I) := le_max_right _ _ + nlinarith + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma projected_source_direct_bin_bound {r w p θ φ : ℝ} (n W v E B : Vec) + (hr : 0ENNReal.ofReal (z.1-z.2.1)) := + (measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal + have hb : (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate, + ENNReal.ofReal ((3840+94080000*c)*φ^2/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)+ + ENNReal.ofReal ((3840+94080000*c)*φ/p)*(ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2) + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + have hrz : 0hs.nonnegative _ hzT _) + apply hb.trans_eq + let G := prefixConeGood s T X z + let b := prefixConeMagnetic s T X z + have hG0 : 0≤G := add_nonneg (norm_nonneg _) (abs_nonneg _) + have hb0 : 0≤b := norm_nonneg _ + have heG : goodField (s.E (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) + (s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) z.2.2.1=G := by + simp [G,prefixConeGood,prefixField,prefixClamp_eq hzT] + have heb : ‖s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)‖=b := by + simp [b,prefixConeMagnetic,coneFoot,prefixField,prefixClamp_eq hzT] + rw [heG,heb] + have he : ((3840+94080000*c)*φ^2/p)*(z.1-z.2.1)*(G/θ^2+b)= + ((3840+94080000*c)*φ^2/(p*θ^2))*((z.1-z.2.1)*G)+ + ((3840+94080000*c)*φ/p)*((z.1-z.2.1)*φ*b) := by ring + rw [he,ENNReal.ofReal_add (by positivity) (by positivity),add_mul] + simp only [ENNReal.ofReal_mul (by positivity : 0≤(3840+94080000*c)*φ^2/(p*θ^2)), + ENNReal.ofReal_mul (by positivity : 0≤(3840+94080000*c)*φ/p), + ENNReal.ofReal_mul (mul_nonneg hrz.le hφ.le),ENNReal.ofReal_mul hrz.le] + dsimp only [G,b] + ac_rfl + refine hb.trans_eq ?_ + have hMG : AEMeasurable (fun z : ConeCoordinate=> + ENNReal.ofReal ((3840+94080000*c)*φ^2/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)) + (physicalBinMeasure V B J) := by + simpa only [Pi.mul_apply] using (((hR.mul hG.ennreal_ofReal).aemeasurable.mul hN).const_mul + (ENNReal.ofReal ((3840+94080000*c)*φ^2/(p*θ^2)))) + rw [lintegral_add_left' hMG,lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + +lemma Admissible.projected_source_two_budget_bound {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb c : ℝ, 0≤Cg ∧ 0≤Cb ∧ 0≤c ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (B : ClosedConeBin) (S : Set Phase) (Q : Set (Fin 4→ℕ)) + (a b I w p P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z=>s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*P^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*P^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal ((3840+94080000*c)*φ^2/(p*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*M))^(1/2:ℝ))+ + ENNReal.ofReal ((3840+94080000*c)*φ/p)* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*M))^(1/2:ℝ)) := by + obtain ⟨Cg,hCg,hgood⟩ := hd₀.uniform_actual_bin_Cauchy + obtain ⟨Cb,hCb,hmag⟩ := hd₀.uniform_actual_magnetic_Cauchy + obtain ⟨c,hc,hcut⟩ := dyadicFactor_log_derivative_bound + refine ⟨Cg,Cb,c,hCg,hCb,hc,?_⟩ + intro s T F hs hT h0 zX B S Q a b I w p P θ φ σ k j hS hS0 hJ hI hw hp hP hθ hφ hσ + hR hD hqlo hqhi hdlo hdhi hDlo hDhi he hsmall hangle hband + dsimp only + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hb := physicalProjectedSource_integral_bound hs hT hα.fst.measurable hα.snd.measurable B + measurableSet_Icc hJ Q hc hcut hw hp hθ hφ hR hqlo hdlo hDhi hsmall hband + exact hb.trans (add_le_add + (mul_le_mul' le_rfl (hgood s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hqhi hdhi hDhi he hangle)) + (mul_le_mul' le_rfl (hmag s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hDlo hqhi hdhi hDhi he hangle))) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderSourceTruncate.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderSourceTruncate.lean new file mode 100644 index 0000000000000000000000000000000000000000..3723ee0f7075c12bd16cf27abdfaca6b1d194756 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/PhysicalProjectedRemainderSourceTruncate.lean @@ -0,0 +1,189 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.LocalPDE.GeometryCutoffStableLogSum + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma PhaseFlowOn.physicalProjectedRemainder_source_truncate {s : Solution} {T P : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (hP : ∀z,s.f (0,z)≠0→∀r∈Icc 0 T,q (F.flow z r).2≤P) + (N : ℕ) (hN : 1024*P≤(2:ℝ)^N) (X V K : ℝ→Vec) + {z : ConeCoordinate} {w : ℝ} (hr : z.2.1∈Icc 0 T) (k : Fin 4→ℕ) + (hk : ¬(k 0s.f (0,z))⊆S → + 0≤a → b≤T → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k)≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^3)+ + (∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (C*Real.sqrt (max 1 T)*(Real.log (2+P))^2/w) := by + classical + obtain ⟨Cs,hCs,hcentral⟩ := hd₀.central_density_stable_log_sum + obtain ⟨Cr,hCr,hremainder⟩ := hd₀.projected_remainder_selected_sum + obtain ⟨Cn,hCn,hcount⟩ := exists_source_dyadic_count + let C := Cs+Cr*Cn^2 + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hsource hband HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let K := prefixMomentumForce s F.flow T zX + let W := ∫⁻t in Icc a b,ENNReal.ofReal ‖K t‖ + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w ∧ + sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))≤1} + let stable : Set (Fin 4→ℕ) := {k | + cappedRepresentative (k 1)≤cappedRepresentative (k 2)/16 ∧ + 32≤cappedRepresentative (k 2)*w} + let rfun := fun k : Fin 4→ℕ=>∫⁻z : ConeCoordinate, + physicalProjectedRemainderDensity s X V (representativeClosedBin T w k) w K z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b) + let cfun := fun k : Fin 4→ℕ=> + ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) + z.1 z.2.1 z.2.2 ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) + obtain ⟨N,hN,hNc⟩ := hcount P hP hL + let source : Set (Fin 4→ℕ) := {k | k 0prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have heq : sector.indicator rfun=Q.indicator rfun := by + funext k + by_cases hk : k∈sector + · by_cases hsrc : k∈source + · rw [indicator_of_mem hk,indicator_of_mem (show k∈Q from ⟨hsrc,hk⟩)] + · rw [indicator_of_mem hk,indicator_of_notMem (show k∉Q from fun h=>hsrc h.1)] + exact F.physicalProjectedRemainder_integral_source_truncate hs hsource N hN X V K + hα.snd.measurable measurableSet_Icc hJ w k hsrc + · rw [indicator_of_notMem hk,indicator_of_notMem (show k∉Q from fun h=>hk h.2)] + have hQ : ∀k∈Q,k 0 ((hg q hq).continuousAt_fderiv (by norm_num)).continuousWithinAt + obtain ⟨D,hD⟩ := ((hK.prod hS).image_of_continuousOn hd).isBounded.exists_norm_le + refine ⟨max D 0,le_max_right _ _,?_⟩ + intro p hp x hx y hy + apply hconv.norm_image_sub_le_of_norm_fderiv_le + (fun z hz => ((hg (p,z) ⟨hp,hz⟩).differentiableAt (by norm_num)).comp z + ((hasFDerivAt_const p z).prodMk (hasFDerivAt_id z)).differentiableAt) _ hx hy + intro z hz + have hf := ((hg (p,z) ⟨hp,hz⟩).differentiableAt (by norm_num)).hasFDerivAt.comp z + ((hasFDerivAt_const p z).prodMk (hasFDerivAt_id z)) + rw [hf.fderiv] + apply ContinuousLinearMap.opNorm_le_bound _ (le_max_right _ _) + intro v + change ‖fderiv ℝ g (p,z) (0,v)‖≤ max D 0*‖v‖ + have hh := (fderiv ℝ g (p,z)).le_opNorm (0,v) + simp only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg v)] at hh + exact hh.trans (mul_le_mul_of_nonneg_right + ((hD _ ⟨(p,z),⟨hp,hz⟩,rfl⟩).trans (le_max_left _ _)) (norm_nonneg v)) + +lemma contDiffAt_normalisedElectricKernel {H : Type*} + [NormedAddCommGroup H] [NormedSpace ℝ H] {k : ℕ∞ω} + {r : H → ℝ} {n u b : H → Vec} {z : H} + (hr : ContDiffAt ℝ k r z) (hn : ContDiffAt ℝ k n z) (hu : ContDiffAt ℝ k u z) + (hb : ContDiffAt ℝ k b z) (hd : 1-dot (n z) (u z)≠0) : + ContDiffAt ℝ k (fun p => normalisedElectricKernel (r p) (n p) (u p) (b p)) z := by + have hdot (f g : H → Vec) (hf : ContDiffAt ℝ k f z) (hg : ContDiffAt ℝ k g z) : + ContDiffAt ℝ k (fun p => dot (f p) (g p)) z := + contDiff_dot_pair.contDiffAt.comp z (hf.prodMk hg) + have hD : ContDiffAt ℝ k (fun p => 1-dot (n p) (u p)) z := + contDiffAt_const.sub (hdot n u hn hu) + exact (((contDiffAt_const.sub (hdot u u hu hu)).div (hD.pow 3) (pow_ne_zero 3 hd)).smul + (hn.sub hu)).add ((hr.div (hD.pow 3) (pow_ne_zero 3 hd)).smul + (((hdot n b hn hb).smul (hn.sub hu)).sub (hD.smul hb))) + +def normalisedPhysicalIntegrand (p : (ℝ × Vec × Vec) × (ℝ × Vec × Vec)) : Vec := + (p.2.1*(1-dot p.1.2.1 (velocity p.1.2.2))) • + normalisedElectricKernel p.1.1 p.1.2.1 (velocity p.1.2.2) + (fderiv ℝ velocity p.1.2.2 (p.2.2.1+cross (velocity p.1.2.2) p.2.2.2)) + +lemma normalisedPhysicalIntegrand_smoothAt {p : (ℝ × Vec × Vec) × (ℝ × Vec × Vec)} + (hd : 1-dot p.1.2.1 (velocity p.1.2.2)≠0) : + ContDiffAt ℝ ∞ normalisedPhysicalIntegrand p := by + let v : ((ℝ × Vec × Vec) × (ℝ × Vec × Vec)) → Vec := fun p => p.1.2.2 + have hv : ContDiff ℝ ∞ v := contDiff_fst.snd.snd + have hu : ContDiff ℝ ∞ (fun p => velocity (v p)) := contDiff_velocity.comp hv + have hb : ContDiff ℝ ∞ (fun p => fderiv ℝ velocity (v p) + (p.2.2.1+cross (velocity (v p)) p.2.2.2)) := + (((contDiff_velocity (k:=∞)).fderiv_right (by simp)).comp hv).clm_apply + (contDiff_snd.snd.fst.add (contDiff_cross.comp (hu.prodMk contDiff_snd.snd.snd))) + have hD : ContDiff ℝ ∞ (fun p => 1-dot p.1.2.1 (velocity (v p))) := + contDiff_const.sub (contDiff_dot_pair.comp (contDiff_fst.snd.fst.prodMk hu)) + exact (contDiffAt_snd.fst.mul hD.contDiffAt).smul + (contDiffAt_normalisedElectricKernel contDiffAt_fst.fst contDiffAt_fst.snd.fst + hu.contDiffAt hb.contDiffAt hd) + +lemma uniform_normalised_integrand_lipschitz (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a b : ℝ, |a|≤A → |b|≤A → + ∀ E B E' B' : Vec, ‖E‖≤L → ‖B‖≤L → ‖E'‖≤L → ‖B'‖≤L → + ‖normalisedPhysicalIntegrand ((r,n,v),(a,E,B))- + normalisedPhysicalIntegrand ((r,n,v),(b,E',B'))‖≤ + C*max |a-b| (max ‖E-E'‖ ‖B-B'‖) := by + let K : Set (ℝ × Vec × Vec) := Icc (0:ℝ) 1 ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + let S : Set (ℝ × Vec × Vec) := closedBall (0:ℝ) A ×ˢ closedBall (0:Vec) L ×ˢ closedBall (0:Vec) L + have hK : IsCompact K := isCompact_Icc.prod ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)) + have hS : IsCompact S := (isCompact_closedBall _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : Convex ℝ S := (convex_closedBall _ _).prod ((convex_closedBall _ _).prod (convex_closedBall _ _)) + obtain ⟨C,hC,hb⟩ := compact_parameter_lipschitz hK hS hc (g:=normalisedPhysicalIntegrand) (by + intro p hp + apply (normalisedPhysicalIntegrand_smoothAt ?_).of_le (by simp) + exact (cone_denom_pos p.1.2.2 p.1.2.1 + (by simpa only [mem_sphere,dist_zero_right] using hp.1.2.1)).ne') + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a b ha hb' E B E' B' hE hB hE' hB' + have hh := hb (r,n,v) ⟨hr,by simpa only [mem_sphere,dist_zero_right] using hn, + by simpa only [mem_closedBall_zero_iff] using hv⟩ + (b,E',B') ⟨by simpa only [mem_closedBall_zero_iff,Real.norm_eq_abs] using hb', + by simpa only [mem_closedBall_zero_iff] using hE',by simpa only [mem_closedBall_zero_iff] using hB'⟩ + (a,E,B) ⟨by simpa only [mem_closedBall_zero_iff,Real.norm_eq_abs] using ha, + by simpa only [mem_closedBall_zero_iff] using hE,by simpa only [mem_closedBall_zero_iff] using hB⟩ + simpa only [Prod.norm_def,Prod.fst_sub,Prod.snd_sub,Real.norm_eq_abs] using hh + +lemma normalisedPhysicalIntegrand_eq {r : ℝ} (hr : r≠0) (n v : Vec) (a : ℝ) (E B : Vec) : + normalisedPhysicalIntegrand ((r,n,v),(a,E,B)) = r^2 • + ((a*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))) := by + simp only [normalisedPhysicalIntegrand,normalisedElectricKernel_eq hr] + exact smul_comm _ _ _ + +lemma uniform_physical_integrand_lipschitz (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a b : ℝ, |a|≤A → |b|≤A → + ∀ E B E' B' : Vec, ‖E‖≤L → ‖B‖≤L → ‖E'‖≤L → ‖B'‖≤L → + ‖(a*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))- + (b*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E'+cross (velocity v) B'))‖≤ + (C/r^2)*max |a-b| (max ‖E-E'‖ ‖B-B'‖) := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_integrand_lipschitz A P L + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a b ha hb' E B E' B' hE hB hE' hB' + have hh := hb r ⟨hr.1.le,hr.2⟩ n hn v hv a b ha hb' E B E' B' hE hB hE' hB' + rw [normalisedPhysicalIntegrand_eq hr.1.ne',normalisedPhysicalIntegrand_eq hr.1.ne', + ← smul_sub,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] at hh + rw [div_mul_eq_mul_div] + exact (le_div_iff₀ (sq_pos_of_pos hr.1)).mpr (by simpa only [mul_comm] using hh) + +lemma integrable_physical_integrand {f : Vec → ℝ} (hf : Continuous f) + (hc : HasCompactSupport f) {r : ℝ} (hr : r≠0) {n : Vec} (hn : ‖n‖=1) (E B : Vec) : + Integrable (fun v : Vec => (f v*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E+cross (velocity v) B))) := by + have hd : Continuous (fun v => 1-dot n (velocity v)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp + (continuous_const.prodMk (contDiff_velocity (k:=1)).continuous)) + exact ((hf.mul hd).smul (continuous_physicalElectricKernel_velocity hr hn E B)).integrable_of_hasCompactSupport + (hc.mul_right.smul_right) + +lemma uniform_physical_integral_lipschitz (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) 1, ∀ n : Vec, ‖n‖=1 → + ∀ f g : Vec → ℝ, Continuous f → Continuous g → HasCompactSupport f → HasCompactSupport g → + (∀ v, |f v|≤A ∧ |g v|≤A) → (∀ v, P<‖v‖ → f v=0 ∧ g v=0) → + ∀ E B E' B' : Vec, ‖E‖≤L → ‖B‖≤L → ‖E'‖≤L → ‖B'‖≤L → + ∀ D : ℝ, (∀ v, |f v-g v|≤D) → ‖E-E'‖≤D → ‖B-B'‖≤D → + ‖(∫ v : Vec, (f v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B)))- + (∫ v : Vec, (g v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E'+cross (velocity v) B')))‖≤ C*D/r^2 := by + obtain ⟨K,hK,hk⟩ := uniform_physical_integrand_lipschitz A P L + refine ⟨K*volume.real (closedBall (0:Vec) P),by positivity,?_⟩ + intro r hr n hn f g hf hg hfc hgc hab hs E B E' B' hE hB hE' hB' D hD hEd hBd + rw [← integral_sub (integrable_physical_integrand hf hfc hr.1.ne' hn E B) + (integrable_physical_integrand hg hgc hr.1.ne' hn E' B')] + let H : Vec → Vec := fun v => + (f v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E+cross (velocity v) B))- + (g v*(1-dot n (velocity v))) • physicalElectricKernel r n (velocity v) + (fderiv ℝ velocity v (E'+cross (velocity v) B')) + change ‖∫ v, H v‖≤_ + have he : (∫ v in closedBall (0:Vec) P, H v)=∫ v, H v := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + obtain ⟨hvf,hvg⟩ := hs v (by simpa only [mem_closedBall_zero_iff,not_le] using hv) + simp only [H,hvf,hvg,zero_mul,zero_smul,sub_self] + rw [← he] + have hh := norm_setIntegral_le_of_norm_le_const (μ:=volume) + (isCompact_closedBall (0:Vec) P).measure_lt_top (C:=(K/r^2)*D) (f:=H) (by + intro v hv + exact (hk r hr n hn v (mem_closedBall_zero_iff.mp hv) (f v) (g v) (hab v).1 (hab v).2 + E B E' B' hE hB hE' hB').trans + (mul_le_mul_of_nonneg_left (max_le (hD v) (max_le hEd hBd)) (by positivity))) + exact hh.trans_eq (by ring) + +lemma uniform_retarded_density_lipschitz (A P L : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ (s s' : Solution) (T : ℝ), T≤1 → + ContDiff ℝ ∞ s.f → ContDiff ℝ ∞ s'.f → + CompactOnFiniteHorizons s → CompactOnFiniteHorizons s' → + (∀ t∈Icc 0 T, ∀ x v, |s.f (t,x,v)|≤A ∧ |s'.f (t,x,v)|≤A) → + (∀ t∈Icc 0 T, ∀ x v, P<‖v‖ → s.f (t,x,v)=0 ∧ s'.f (t,x,v)=0) → + (∀ t∈Icc 0 T, ∀ x, ‖s.E (t,x)‖≤L ∧ ‖s.B (t,x)‖≤L ∧ + ‖s'.E (t,x)‖≤L ∧ ‖s'.B (t,x)‖≤L) → + ∀ t∈Icc 0 T, ∀ x x' z : Vec, 0<‖z‖ → ‖z‖≤t → ∀ D : ℝ, + (∀ v, |s.f (t-‖z‖,x+z,v)-s'.f (t-‖z‖,x'+z,v)|≤D) → + ‖s.E (t-‖z‖,x+z)-s'.E (t-‖z‖,x'+z)‖≤D → + ‖s.B (t-‖z‖,x+z)-s'.B (t-‖z‖,x'+z)‖≤D → + ‖retardedElectricDensity s t x (x+z)-retardedElectricDensity s' t x' (x'+z)‖≤C*D/‖z‖^2 ∧ + ‖retardedMagneticDensity s t x (x+z)-retardedMagneticDensity s' t x' (x'+z)‖≤C*D/‖z‖^2 := by + obtain ⟨C,hC,hk⟩ := uniform_physical_integral_lipschitz A P L + refine ⟨C,hC,?_⟩ + intro s s' T hT hf hf' hc hc' hab hs hEB t ht x x' z hz hzt D hD hEd hBd + have htime : t-‖z‖∈Icc 0 T := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + have hxy : x≠x+z := by + intro he + have hh : z=0 := add_left_cancel (show x+z=x+0 by simpa using he.symm) + exact (norm_pos_iff.mp hz) hh + have hn : ‖-(‖z‖⁻¹ • z)‖=1 := by simpa only [coneDirection_add] using coneDirection_norm hxy + obtain ⟨hfc,hcomp⟩ := (show RegularParticle s.f from ⟨(hf.of_le (by simp)).contDiffOn,hc⟩).slice htime.1 (x+z) + obtain ⟨hgc,hcomp'⟩ := (show RegularParticle s'.f from ⟨(hf'.of_le (by simp)).contDiffOn,hc'⟩).slice htime.1 (x'+z) + have he : ‖retardedElectricDensity s t x (x+z)-retardedElectricDensity s' t x' (x'+z)‖≤C*D/‖z‖^2 := by + simp only [retardedElectricDensity,coneRadius_add,coneDirection_add] + exact hk ‖z‖ ⟨hz,hzt.trans (ht.2.trans hT)⟩ _ hn _ _ hfc.continuous hgc.continuous hcomp hcomp' + (fun v => ⟨(hab _ htime (x+z) v).1,(hab _ htime (x'+z) v).2⟩) + (fun v hv => ⟨(hs _ htime (x+z) v hv).1,(hs _ htime (x'+z) v hv).2⟩) + _ _ _ _ (hEB _ htime (x+z)).1 (hEB _ htime (x+z)).2.1 + (hEB _ htime (x'+z)).2.2.1 (hEB _ htime (x'+z)).2.2.2 D hD hEd hBd + refine ⟨he,?_⟩ + simp only [retardedMagneticDensity,coneDirection_add,← cross_sub_right] + exact (norm_cross_le _ _).trans (by simpa only [hn,one_mul] using he) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ProjectedSourceStableFarBound.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ProjectedSourceStableFarBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..555806bfe697b02b0d6efa6b1dbfba076f989fca --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ProjectedSourceStableFarBound.lean @@ -0,0 +1,654 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Geometry.QuadIndexEquiv +import OAI.Analysis.VlasovMaxwell.Geometry.IndexTwoPow + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.projected_source_stable_far_bound {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (k : Fin 4→ℕ) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 1 ≤ w → w ≤ P → + sourceRepresentative (k 0) ≤ 128*P → + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 → + 32 ≤ cappedRepresentative (k 2)*w → + 1/32 ≤ sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3)) → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + (∫⁻z : ConeCoordinate,physicalProjectedSourceDensity s X V B T w Q z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (C*E*(1+16384*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P))) := by + obtain ⟨C,hC,hbound⟩ := hd₀.projected_source_baseline_radius_bound + refine ⟨8196*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S Q k a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hpP hsmall hwφ hfar hband HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w φ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp1 : 1 ≤ p := by + have hh : (1:ℝ) ≤ 2^(k 0) := one_le_pow₀ (by norm_num) + dsimp [p,sourceRepresentative] + linarith only [hh] + have hp : 0 < p := zero_lt_one.trans_le hp1 + have hw0 : 0 < w := zero_lt_one.trans_le hw + have hθ : 0 < θ := cappedRepresentative_pos _ + have hφ : 0 < φ := cappedRepresentative_pos _ + have hr : 0 < r := mul_pos (zero_lt_one.trans_le (le_max_left _ _)) (cappedRepresentative_pos _) + have hθφ : θ ≤ φ := by change θ≤φ/16 at hsmall; linarith only [hsmall,hφ] + have hI : 0 < I := sq_pos_of_pos (div_pos hw0 hP) + have hlam : 0 < lam := stabilityLength_pos hP (by norm_num) hM hp hw0 hφ + have hlen : 0 < len := lt_min hI (by positivity) + have hlenI : len ≤ I := min_le_left _ _ + have hlenlam : 2*len ≤ lam := by + have hh : len ≤ lam/2 := min_le_right _ _ + linarith only [hh] + have hm : 0 < m := div_pos (lt_min hp hw0) (by norm_num) + have hmq : m ≤ p/128 := div_le_div_of_nonneg_right (min_le_left _ _) (by norm_num) + have hmw : m ≤ w/8 := by + have hh : min p w ≤ w := min_le_right _ _ + dsimp [m] + linarith only [hh,hw0] + have hstable : 2*len ≤ (128*(P/m)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2 := by + dsimp only [m,L] + rw [stability_massScale_identity] + convert hlenlam using 1; norm_num [lam] + have hbnd := hbound s T F hs hT h0 zX S Q k a b I len w M A P L m 128 + hS hS0 ha hb hlen hlenI hab hM hA hP (by dsimp [L]; linarith only [hL]) hm hw0 (by norm_num) + hmq hmw hsmall hwφ hstable hband HX HZ + have hscale := direction_source_far_scale hP hL (show (0:ℝ) < 16384 by norm_num) + hM hA hp1 hw hθ hr hφ (cappedRepresentative_le_one _) hθφ hpP hwP hfar + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + apply hbnd.trans + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ C*E*(8196*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L) := + mul_le_mul_of_nonneg_left hscale (mul_nonneg hC hE) + _ = _ := by dsimp [E,L]; ring + +lemma tsum_quad_cutoff_bound (f : (Fin 4→ℕ)→ℝ≥0∞) (N : ℕ) (c : ℝ≥0∞) + (h : ∀k,f k ≤ if ∀i,k i simp [hf] + · simp [ht] + · simp [hp] + _ = c*(N:ℝ≥0∞)^4 := by simp only [ennreal_tsum_indicator_lt]; ring + +lemma Admissible.projected_source_stable_far_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) (N : ℕ) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 1 ≤ w → w ≤ P → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | (∀i,k i∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ENNReal.ofReal (C*E*(1+16384*(M+Real.sqrt A))*w* + Real.sqrt (Real.log (2+P))*(N:ℝ)^4) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.projected_source_stable_far_bound + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S Q N a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP hband HX HZ + dsimp only + let E := ∫x : Vec,totalEnergy s (0,x) + let c := C*E*(1+16384*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P)) + let sector : Set (Fin 4→ℕ) := {k | (∀i,k i∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) (Icc a b)) + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hc : 0 ≤ c := by dsimp [c]; positivity + have hbin (k : Fin 4→ℕ) : f k ≤ if ∀i,k i(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) (Icc a b) := indicator_of_mem hk _ + rw [he,ite_eq_left hk.1] + exact hbound s T F hs hT h0 zX S Q k a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hk.2.1 hk.2.2.1 hk.2.2.2.1 hk.2.2.2.2 hband HX HZ + · have he : f k=0 := indicator_of_notMem hk _ + rw [he] + exact bot_le + have hsum := tsum_quad_cutoff_bound f N (ENNReal.ofReal c) hbin + apply hsum.trans_eq + rw [show (N:ℝ≥0∞)^4=ENNReal.ofReal ((N:ℝ)^4) by + rw [ENNReal.ofReal_pow (Nat.cast_nonneg N),ENNReal.ofReal_natCast],←ENNReal.ofReal_mul hc] + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma Admissible.projected_source_stable_far_log_sum {d : Datum} (hd₀ : Admissible d) + (T₀ : ℝ) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → T ≤ T₀ → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (Q : Set (Fin 4→ℕ)) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 1 ≤ w → w ≤ P → + (∀t∈Icc a b,w/16 ≤ ‖(F.flow zX t).2‖) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | sourceRepresentative (k 0) ≤ 128*P ∧ + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + 32 ≤ cappedRepresentative (k 2)*w ∧ + 1/32 ≤ sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))} + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'k : Fin 4→ℕ,sector.indicator (fun k=>∫⁻z : ConeCoordinate, + physicalProjectedSourceDensity s X V (representativeClosedBin T w k) T w Q z + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b)) k) ≤ + ENNReal.ofReal (C*E*(1+16384*(M+Real.sqrt A))*w*(Real.log (2+P))^5) := by + classical + obtain ⟨Cs,hCs,hsum⟩ := hd₀.projected_source_stable_far_sum + obtain ⟨Cn,hCn,hcount⟩ := exists_far_dyadic_count T₀ + refine ⟨Cs*Cn^4,by positivity,?_⟩ + intro s T F hs hT hTT h0 zX S Q a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hband HX HZ + dsimp only + let E := ∫x : Vec,totalEnergy s (0,x) + let sector : Set (Fin 4→ℕ) := {k | sourceRepresentative (k 0) ≤ 128*P ∧ + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 ∧ + 32 ≤ cappedRepresentative (k 2)*w ∧ + 1/32 ≤ sourceRepresentative (k 0)*cappedRepresentative (k 1)* + Real.sqrt (max 1 T*cappedRepresentative (k 3))} + obtain ⟨N,hN0,hN1,hN3,hNc⟩ := hcount P hP hL + have hH : max (1:ℝ) T ≤ max 1 T₀ := max_le_max_left 1 hTT + have hN1' : 4096*P*Real.sqrt (max 1 T) < (2:ℝ)^N := + (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hH) (by positivity)).trans_lt hN1 + have hN3' : (4096*P)^2*max 1 T < (2:ℝ)^N := + (mul_le_mul_of_nonneg_left hH (sq_nonneg _)).trans_lt hN3 + have hidx (k : Fin 4→ℕ) (hk : k∈sector) : ∀i,k ihk.2,fun hk=>⟨hidx k hk,hk⟩⟩ + have hbnd := hsum s T F hs hT h0 zX S Q N a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hband HX HZ + dsimp only at hbnd + rw [heq] at hbnd + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hL0 : 0 ≤ Real.log (2+P) := zero_le_one.trans hL + have hroot : Real.sqrt (Real.log (2+P)) ≤ Real.log (2+P) := Real.sqrt_le_self_iff.mpr (Or.inr hL) + have hpower : (N:ℝ)^4 ≤ (Cn*Real.log (2+P))^4 := pow_le_pow_left₀ (Nat.cast_nonneg N) hNc _ + have hscalar : Real.sqrt (Real.log (2+P))*(N:ℝ)^4 ≤ Cn^4*(Real.log (2+P))^5 := by + calc + _ ≤ Real.log (2+P)*(Cn*Real.log (2+P))^4 := mul_le_mul hroot hpower (by positivity) hL0 + _ = _ := by ring + apply hbnd.trans + apply ENNReal.ofReal_le_ofReal + calc + _ = (Cs*E*(1+16384*(M+Real.sqrt A))*w)*(Real.sqrt (Real.log (2+P))*(N:ℝ)^4) := by ring + _ ≤ (Cs*E*(1+16384*(M+Real.sqrt A))*w)*(Cn^4*(Real.log (2+P))^5) := + mul_le_mul_of_nonneg_left hscalar (by positivity) + _ = _ := by dsimp [E]; ring + +lemma Admissible.central_density_baseline_bin {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + cappedRepresentative (k 1) ≤ cappedRepresentative (k 2)/16 → + 32 ≤ cappedRepresentative (k 2)*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative (k 2)+ + Real.sqrt (A*L/cappedRepresentative (k 2))))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := representativeClosedBin T w k + let E := ∫x : Vec,totalEnergy s (0,x) + ENNReal.ofReal (78400000*φ^2/θ)*(∫⁻z : ConeCoordinate,physicalBinDensity s X V B z.1 z.2.1 z.2.2 ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (C*(1+E))* + min (ENNReal.ofReal (I*p^3*θ*φ^4*r)) + (ENNReal.ofReal ((1+I/len)/(p*θ*r))) := by + obtain ⟨Cρ,hCρ,hdensity⟩ := hd₀.uniform_physicalBinDensity_constant + let c : ℝ := 1 + have hc : 0 ≤ c := by norm_num [c] + let C : ℝ := 10^18*c*(1+Cρ) + refine ⟨C,by dsimp [C]; positivity,?_⟩ + intro s T F hs hT h0 zX S k a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let r := max 1 T*cappedRepresentative (k 3) + let B := representativeClosedBin T w k + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hθ : 0 < θ := cappedRepresentative_pos _ + have hφ : 0 < φ := cappedRepresentative_pos _ + have hr : 0 < r := mul_pos (zero_lt_one.trans_le (le_max_left _ _)) (cappedRepresentative_pos _) + have hBmax : B.rmax=2*r := by dsimp [B,representativeClosedBin,r]; ring + have hBmin : B.rmin=r/2 := rfl + have hBDmin : B.Dmin=φ^2/2 := rfl + have hI : 0 < I := hlen.trans_le hlenI + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hJ : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + have hdsmall : B.dmax ≤ φ^2/32 := by + change 8*θ^2 ≤ φ^2/32 + have hh : θ ≤ φ/16 := hsmall + have hh2 := sq_le_sq₀ hθ.le (by positivity : 0 ≤ φ/16) |>.mpr hh + nlinarith + have hden : ∀z∈physicalBinBase V B (Icc a b), + physicalBinDensity s X V B z.1 z.2.1 z.2.2 ≤ ENNReal.ofReal (128*Cρ*p^3*θ^2) := by + intro z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJ hz.1).2⟩ + have hn := hdensity s T F hs h0 X V B z.1 z.2.1 z.2.2 p θ 1 hzT hp.le hθ.le (by norm_num) + (by change p/32 ≤ p; linarith) le_rfl (by norm_num [B,representativeClosedBin]) + simpa only [min_eq_left (show θ ≤ 1 from cappedRepresentative_le_one (k 1))] using hn + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hnear := physicalBin_density_near hα.snd.measurable B measurableSet_Icc hφ.le le_rfl hden + have hfar := F.physicalBin_density_far hs hT zX B hS hS0 hJ + (by change 0 < r/2; positivity) (by change 0 < φ^2/2; positivity) + have hnearfar := mul_le_mul' (le_refl (ENNReal.ofReal (78400000*c*φ^2/θ))) (le_min hnear hfar) + have hbudget := F.closedEulerian_baseline_budget hs hT zX B hS (k 0) (k 2) + (by rfl : p=64*(2:ℝ)^(k 0)) (by rfl : φ=(2:ℝ)⁻¹^(k 2)) ha hb hlen hlenI hab + hM hA hP hL hm hφ (cappedRepresentative_le_one _) hCs hstable le_rfl le_rfl hmq hmw + (by change 0 < r/2; positivity) (by rw [hBmax]; positivity) hdsmall le_rfl le_rfl + (by change 4 ≤ φ*(w/8); dsimp [φ] at *; nlinarith) HX HZ + have hvol : volume (Icc a b) ≤ ENNReal.ofReal I := by + rw [Real.volume_Icc] + exact ENNReal.ofReal_le_ofReal hab + let near := I*p^3*θ*φ^4*r + let far := (1+I/len)/(p*θ*r) + have hn0 : 0 ≤ near := by dsimp [near]; positivity + have hf0 : 0 ≤ far := by dsimp [far]; positivity + have hn : ENNReal.ofReal (78400000*c*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) ≤ + ENNReal.ofReal (C*(1+E))*ENNReal.ofReal near := by + calc + _ ≤ ENNReal.ofReal (78400000*c*φ^2/θ)*ENNReal.ofReal (128*Cρ*p^3*θ^2)* + (ENNReal.ofReal I*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2)) := by gcongr + _ = ENNReal.ofReal (5780275200000*c*Cρ*near) := by + rw [hBmax,hBmin] + rw [←ENNReal.ofReal_mul (by positivity : 0 ≤ I), + ←ENNReal.ofReal_mul (mul_nonneg hI.le (by linarith : 0 ≤ 2*r-r/2)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 78400000*c*φ^2/θ), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ (78400000*c*φ^2/θ)*(128*Cρ*p^3*θ^2))] + congr 1 + change (78400000*c*φ^2/θ)*(128*Cρ*p^3*θ^2)*(I*(2*r-r/2)*(384*φ^2))=_ + dsimp [near] + field_simp [hθ.ne',hp.ne',hr.ne',hφ.ne',hlen.ne'] + ring + _ ≤ ENNReal.ofReal (C*(1+E)*near) := by + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ hn0 + dsimp [C] + have ha : 5780275200000*c*Cρ ≤ 10^18*c*(1+Cρ) := by + nlinarith only [hc,mul_nonneg hc hCρ] + exact ha.trans (le_mul_of_one_le_right (by positivity) (by linarith only [hE])) + _ = _ := ENNReal.ofReal_mul (by dsimp [C]; positivity) + have hf : ENNReal.ofReal (78400000*c*φ^2/θ)* + (coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin)) ≤ + ENNReal.ofReal (C*(1+E))*ENNReal.ofReal far := by + calc + _ ≤ ENNReal.ofReal (78400000*c*φ^2/θ)* + ((ENNReal.ofReal (35512320*B.rmax/p*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin)) := by gcongr + _ = ENNReal.ofReal (44546654208000000*c*E*far) := by + rw [hBmax,hBmin,hBDmin] + rw [←ENNReal.ofReal_mul (by positivity : 0 ≤ 35512320*(2*r)/p*(1+I/len)), + ←ENNReal.ofReal_div_of_pos (by positivity : 0 < (r/2)^2*(φ^2/2)), + ←ENNReal.ofReal_mul (by positivity : 0 ≤ 78400000*c*φ^2/θ)] + congr 1 + dsimp [far] + field_simp [hθ.ne',hp.ne',hr.ne',hφ.ne',hlen.ne'] + ring + _ ≤ ENNReal.ofReal (C*(1+E)*far) := by + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_right _ hf0 + have hcC : 44546654208000000*c ≤ C := by + dsimp [C] + nlinarith only [hc,mul_nonneg hc hCρ] + calc + _ ≤ C*E := mul_le_mul_of_nonneg_right hcC hE + _ ≤ C*(1+E) := by + have hC : 0 ≤ C := by dsimp [C]; positivity + nlinarith + _ = _ := ENNReal.ofReal_mul (by dsimp [C]; positivity) + have he : (78400000:ℝ)*c*φ^2/θ=78400000*φ^2/θ := by dsimp [c]; ring + rw [he] at hnearfar hn hf + apply hnearfar.trans + simpa only [near,far,E,p,θ,φ,r,mul_min,mul_assoc] using min_le_min hn hf + +lemma Admissible.central_density_baseline_radial_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (np nθ nφ : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + cappedRepresentative nθ ≤ cappedRepresentative nφ/16 → + 32 ≤ cappedRepresentative nφ*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative nφ+ + Real.sqrt (A*L/cappedRepresentative nφ)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,ENNReal.ofReal (78400000*(cappedRepresentative nφ)^2/cappedRepresentative nθ)* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (B nr) z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V (B nr) (Icc a b))) ≤ + ENNReal.ofReal (C*(1+E)*(6*Real.sqrt I*Real.sqrt (1+I/len)*p*φ^2)) := by + obtain ⟨C,hC,hbound⟩ := hd₀.central_density_baseline_bin + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ a b I len w M A P L massScale Cs hS hS0 ha hb hlen hlenI hab + hM hA hP hL hm hw hCs hmq hmw hsmall hwφ hstable HX HZ + dsimp only + have hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w ≤ P → + sourceRepresentative np ≤ 128*P → + cappedRepresentative nθ ≤ cappedRepresentative nφ/16 → + 32 ≤ cappedRepresentative nφ*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,ENNReal.ofReal (78400000*(cappedRepresentative nφ)^2/cappedRepresentative nθ)* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (B nr) z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V (B nr) (Icc a b))) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w* + Real.sqrt (Real.log (2+P))*cappedRepresentative nφ) := by + obtain ⟨C,hC,hbound⟩ := hd₀.central_density_baseline_radial_sum + refine ⟨1536*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP + hpP hsmall hwφ HX HZ + dsimp only + let p := sourceRepresentative np + let φ := cappedRepresentative nφ + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w φ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0 < p := by dsimp [p,sourceRepresentative]; positivity + have hφ : 0 < φ := cappedRepresentative_pos _ + have hI : 0 < I := sq_pos_of_pos (div_pos hw hP) + have hlam : 0 < lam := stabilityLength_pos hP (by norm_num) hM hp hw hφ + have hlen : 0 < len := lt_min hI (by positivity) + have hlenI : len ≤ I := min_le_left _ _ + have hlenlam : 2*len ≤ lam := by + have hh : len ≤ lam/2 := min_le_right _ _ + linarith + have hm : 0 < m := div_pos (lt_min hp hw) (by norm_num) + have hmq : m ≤ p/128 := div_le_div_of_nonneg_right (min_le_left _ _) (by norm_num) + have hmw : m ≤ w/8 := by + have hh : min p w ≤ w := min_le_right _ _ + dsimp [m] + linarith + have hstable : 2*len ≤ (128*(P/m)*(M/φ+Real.sqrt (A*L/φ)))⁻¹^2 := by + dsimp only [m,L] + rw [stability_massScale_identity] + convert hlenlam using 1; norm_num [lam] + have hbnd := hbound s T F hs hT h0 zX S np nθ nφ a b I len w M A P L m 128 + hS hS0 ha hb hlen hlenI hab hM hA hP (by dsimp [L]; linarith) hm hw (by norm_num) + hmq hmw hsmall hwφ hstable HX HZ + have hR := direction_clipped_baseline_R_log_bound128 hP hL (show (0:ℝ) < 16384 by norm_num) + hM hA hp hw hφ (cappedRepresentative_le_one _) hpP hwP + have hR' : Real.sqrt I*Real.sqrt (1+I/len)*p*φ ≤ + 256*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L := hR + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hgeom : 6*Real.sqrt I*Real.sqrt (1+I/len)*p*φ^2 ≤ + 1536*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L*φ := by + calc + _ = 6*(Real.sqrt I*Real.sqrt (1+I/len)*p*φ)*φ := by ring + _ ≤ 6*(256*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L)*φ := by gcongr + _ = _ := by ring + apply hbnd.trans + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ C*(1+E)*(1536*(1+16384*(M+Real.sqrt A))*w*Real.sqrt L*φ) := + mul_le_mul_of_nonneg_left hgeom (by positivity) + _ = _ := by dsimp [E,L,φ]; ring + +lemma Admissible.central_density_stable_sum {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ, 0 ≤ C ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (S : Set Phase) (N : ℕ) + (a b w M A P : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w ≤ P → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let sector : Set (Fin 4→ℕ) := {k | k 0ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s X V (representativeClosedBin T w k) z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V (representativeClosedBin T w k) (Icc a b))) k) ≤ + ENNReal.ofReal (C*(1+E)*(1+16384*(M+Real.sqrt A))*w* + Real.sqrt (Real.log (2+P))*(N:ℝ)^2) := by + classical + obtain ⟨C,hC,hbound⟩ := hd₀.central_density_stable_radial_bound + refine ⟨2*C,by positivity,?_⟩ + intro s T F hs hT h0 zX S N a b w M A P hS hS0 ha hb hab hM hA hP hL hw hwP HX HZ + dsimp only + let E := ∫x : Vec,totalEnergy s (0,x) + let c := C*(1+E)*(1+16384*(M+Real.sqrt A))*w*Real.sqrt (Real.log (2+P)) + let sector : Set (Fin 4→ℕ) := {k | k 0ENNReal.ofReal (78400000*(cappedRepresentative (k 2))^2/cappedRepresentative (k 1))* + (∫⁻z : ConeCoordinate,physicalBinDensity s (fun t=>(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) z.1 z.2.1 z.2.2 + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) (Icc a b))) + have hE : 0 ≤ E := integral_nonneg (hs.total_energy_nonneg ⟨le_rfl,hT⟩) + have hc : 0 ≤ c := by dsimp [c]; positivity + have he (np nt nf nr : ℕ) : ![np,nt,nf,nr]∈sector ↔ + np(prefixFlow F.flow T zX t).1) + (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w ![np,nt,nf,nr]) z.1 z.2.1 z.2.2 + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w ![np,nt,nf,nr]) (Icc a b)) := + indicator_of_mem ((he np nt nf nr).mpr hbin) _ + simp_rw [hf] + rw [ite_eq_left ⟨hbin.1,hbin.2.1⟩,←ENNReal.ofReal_mul hc] + exact hbound s T F hs hT h0 zX S np nt nf a b w M A P hS hS0 ha hb hab + hM hA hP hL hw hwP hbin.2.2.1 hbin.2.2.2.1 hbin.2.2.2.2 HX HZ + · have hf (nr : ℕ) : f ![np,nt,nf,nr]=0 := indicator_of_notMem (fun hk=>hbin ((he np nt nf nr).mp hk)) _ + simp only [hf,tsum_zero] + exact bot_le + have hsum := tsum_quad_of_radial_bound f N (ENNReal.ofReal c) hrad + apply hsum.trans_eq + have heq : (2:ℝ≥0∞)*(N:ℝ≥0∞)^2=ENNReal.ofReal (2*(N:ℝ)^2) := by + rw [ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤2), + ENNReal.ofReal_pow (Nat.cast_nonneg N),ENNReal.ofReal_natCast,ENNReal.ofReal_ofNat] + rw [heq,←ENNReal.ofReal_mul hc] + congr 1 + dsimp [c,E] + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQ.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQ.lean new file mode 100644 index 0000000000000000000000000000000000000000..09919cc8ac65f45aff594ad3ab97620ab7e3cdb6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQ.lean @@ -0,0 +1,215 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.NullConeFlux + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def receiverQ (a n h : Vec) : Vec := (1-dot n a) • h + dot a h • n + +lemma receiverQ_force (a n h : Vec) : receiverQ a n h=h+cross a (cross n h) := by + ext i + fin_cases i <;> simp [receiverQ,cross,dot,Fin.sum_univ_succ] <;> ring + +lemma receiverQ_add (a n h k : Vec) : receiverQ a n (h+k)=receiverQ a n h+receiverQ a n k := by + simp only [receiverQ,dot_add_right,smul_add,add_smul] + module + +lemma receiverQ_smul (a n h : Vec) (c : ℝ) : receiverQ a n (c • h)=c • receiverQ a n h := by + simp only [receiverQ,dot_smul_right,smul_add,smul_smul] + module + +lemma receiverQ_normal (a n : Vec) : receiverQ a n n=n := by + rw [receiverQ,dot_comm a n,← add_smul] + simp + +lemma cone_denom_le_two (v n : Vec) (hn : ‖n‖=1) : 1-dot n (velocity v)≤2 := by + have h := abs_dot_le n (velocity v) + rw [hn,one_mul] at h + have h' := (neg_le_abs (dot n (velocity v))).trans h + linarith [norm_velocity_lt_one v] + +lemma receiverQ_tangent_bound (w n h : Vec) (hn : ‖n‖=1) (hh : dot n h=0) : + ‖receiverQ (velocity w) n h‖≤2*Real.sqrt (2*(1-dot n (velocity w)))*‖h‖ := by + let D := 1-dot n (velocity w) + have hD : 0≤D := (cone_denom_pos w n hn).le + have hD2 : D≤2 := cone_denom_le_two w n hn + have hDs : D≤Real.sqrt (2*D) := by + nlinarith [Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ)≤2) hD),Real.sqrt_nonneg (2*D)] + have ha : |dot (velocity w) h|≤Real.sqrt (2*D)*‖h‖ := by + rw [show dot (velocity w) h=dot (velocity w-n) h by rw [dot_sub_left,hh,sub_zero]] + exact (abs_dot_le _ _).trans (mul_le_mul_of_nonneg_right + (velocity_normal_distance_bound w n hn) (norm_nonneg h)) + calc + _ ≤ ‖D • h‖+‖dot (velocity w) h • n‖ := norm_add_le _ _ + _ = D*‖h‖+|dot (velocity w) h| := by rw [norm_smul,norm_smul,Real.norm_eq_abs, + Real.norm_eq_abs,abs_of_nonneg hD,hn,mul_one] + _ ≤ 2*Real.sqrt (2*D)*‖h‖ := by nlinarith [mul_le_mul_of_nonneg_right hDs (norm_nonneg h)] + +lemma velocity_tangent_norm (v n : Vec) (hn : ‖n‖=1) : + ‖(n-velocity v)-(1-dot n (velocity v)) • n‖≤Real.sqrt (2*(1-dot n (velocity v))) := by + have he : (n-velocity v)-(1-dot n (velocity v)) • n = + -(velocityProjection n (velocity v-n)) := by + simp only [velocityProjection,dot_sub_right,dot_self,hn,one_pow] + module + rw [he,norm_neg] + exact (velocityProjection_norm _ _ hn.le).trans (velocity_normal_distance_bound v n hn) + +lemma receiverQ_transport_bound (w v n : Vec) (hn : ‖n‖=1) : + ‖receiverQ (velocity w) n (n-velocity v)‖ ≤ (1-dot n (velocity v))+ + 2*Real.sqrt (2*(1-dot n (velocity w)))*Real.sqrt (2*(1-dot n (velocity v))) := by + let d := 1-dot n (velocity v) + let h := (n-velocity v)-d • n + have hh : dot n h=0 := by + dsimp only [h,d] + simp only [dot_sub_right,dot_smul_right,dot_self,hn,one_pow,mul_one] + ring + have he : n-velocity v=d • n+h := by dsimp [h]; module + rw [he,receiverQ_add,receiverQ_smul,receiverQ_normal] + calc + _ ≤ ‖d • n‖+‖receiverQ (velocity w) n h‖ := norm_add_le _ _ + _ ≤ d+2*Real.sqrt (2*(1-dot n (velocity w)))*Real.sqrt (2*d) := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos (cone_denom_pos v n hn),hn,mul_one] + exact add_le_add le_rfl ((receiverQ_tangent_bound w n h hn hh).trans + (mul_le_mul_of_nonneg_left (velocity_tangent_norm v n hn) (by positivity))) + +def sourceNumerator (n u b : Vec) : Vec := (dot n b) • (n-u)-(1-dot n u) • b + +lemma sourceNumerator_tangent (n u b : Vec) (hn : ‖n‖=1) : + dot n (sourceNumerator n u b)=0 := by + simp only [sourceNumerator,dot_sub_right,dot_smul_right,dot_self,hn,one_pow] + ring + +lemma sourceNumerator_bound (v E B n : Vec) (hn : ‖n‖=1) : + ‖sourceNumerator n (velocity v) (fderiv ℝ velocity v (E+cross (velocity v) B))‖ ≤ + 5*(1-dot n (velocity v))*(q v)⁻¹*(goodField E B n+(1-dot n (velocity v))*‖B‖) := by + let d := 1-dot n (velocity v) + let b := fderiv ℝ velocity v (E+cross (velocity v) B) + have hd : 0≤d := (cone_denom_pos v n hn).le + have hq : 0≤(q v)⁻¹ := (inv_pos.mpr (q_pos v)).le + have hG : 0≤goodField E B n := add_nonneg (norm_nonneg _) (abs_nonneg _) + have hb := lorentz_source_acceleration_bound v E B n hn + have hnb := lorentz_source_normal_acceleration_bound v E B n hn + have hnu : ‖n-velocity v‖≤Real.sqrt (2*d) := by + rw [norm_sub_rev] + exact velocity_normal_distance_bound v n hn + have hprod : |dot n b| *‖n-velocity v‖ ≤ + (q v)⁻¹*(2*d)*(goodField E B n+d*‖B‖) := by + calc + _ ≤ ((q v)⁻¹*Real.sqrt (2*d)*(goodField E B n+d*‖B‖))*Real.sqrt (2*d) := + mul_le_mul hnb hnu (norm_nonneg _) (by positivity) + _ = (q v)⁻¹*(Real.sqrt (2*d))^2*(goodField E B n+d*‖B‖) := by ring + _ = _ := by rw [Real.sq_sqrt (mul_nonneg (by norm_num : (0:ℝ)≤2) hd)] + have hdb := mul_le_mul_of_nonneg_left hb hd + calc + _ ≤ |dot n b| *‖n-velocity v‖+d*‖b‖ := by + exact (norm_sub_le _ _).trans (by rw [norm_smul,norm_smul,Real.norm_eq_abs, + Real.norm_eq_abs,abs_of_nonneg hd]) + _ ≤ _ := by nlinarith [mul_nonneg (mul_nonneg hd hq) hG] + +lemma receiverQ_source_bound (w v E B n : Vec) (hn : ‖n‖=1) : + ‖receiverQ (velocity w) n + (sourceNumerator n (velocity v) (fderiv ℝ velocity v (E+cross (velocity v) B)))‖ ≤ + 10*Real.sqrt (2*(1-dot n (velocity w)))*(1-dot n (velocity v))*(q v)⁻¹* + (goodField E B n+(1-dot n (velocity v))*‖B‖) := by + exact (receiverQ_tangent_bound _ _ _ hn (sourceNumerator_tangent _ _ _ hn)).trans + (by convert mul_le_mul_of_nonneg_left (sourceNumerator_bound v E B n hn) + (show 0≤2*Real.sqrt (2*(1-dot n (velocity w))) by positivity) using 1; ring) + +def transverseProjection (w h : Vec) : Vec := velocityProjection (‖w‖⁻¹ • w) h + +lemma transverseProjection_norm (w h : Vec) : ‖transverseProjection w h‖≤‖h‖ := by + apply velocityProjection_norm + by_cases hw : w=0 + · simp [hw] + · rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr (norm_nonneg w)), + inv_mul_cancel₀ (norm_ne_zero_iff.mpr hw)] + +lemma velocityProjection_smul (u h : Vec) (c : ℝ) : + velocityProjection u (c • h)=c • velocityProjection u h := by + simp only [velocityProjection,dot_smul_right,smul_sub,smul_smul] + +lemma transverseProjection_velocity (w : Vec) : transverseProjection w (velocity w)=0 := by + by_cases hw : w=0 + · simp [hw,transverseProjection,velocityProjection,velocity,dot] + · have hn := norm_ne_zero_iff.mpr hw + ext i + simp only [transverseProjection,velocityProjection,velocity,dot_smul_left,dot_smul_right, + dot_self,PiLp.sub_apply,PiLp.smul_apply,PiLp.zero_apply,smul_eq_mul] + field_simp + ring + +lemma transverseProjection_normal_bound (w n : Vec) (hn : ‖n‖=1) : + ‖transverseProjection w n‖≤Real.sqrt (2*(1-dot n (velocity w))) := by + have he : transverseProjection w n=transverseProjection w (n-velocity w) := by + have h := velocityProjection_add (‖w‖⁻¹ • w) (n-velocity w) (velocity w) + rw [sub_add_cancel] at h + change transverseProjection w n=transverseProjection w (n-velocity w)+transverseProjection w (velocity w) at h + rwa [transverseProjection_velocity,add_zero] at h + rw [he] + exact (transverseProjection_norm _ _).trans (by simpa only [norm_sub_rev] using velocity_normal_distance_bound w n hn) + +lemma transverse_receiverQ_tangent_bound (w n h : Vec) (hn : ‖n‖=1) (hh : dot n h=0) : + ‖transverseProjection w (receiverQ (velocity w) n h)‖≤3*(1-dot n (velocity w))*‖h‖ := by + let D := 1-dot n (velocity w) + have hD : 0≤D := (cone_denom_pos w n hn).le + have ha : |dot (velocity w) h|≤Real.sqrt (2*D)*‖h‖ := by + rw [show dot (velocity w) h=dot (velocity w-n) h by rw [dot_sub_left,hh,sub_zero]] + exact (abs_dot_le _ _).trans (mul_le_mul_of_nonneg_right + (velocity_normal_distance_bound w n hn) (norm_nonneg h)) + have hp := transverseProjection_normal_bound w n hn + have he : transverseProjection w (receiverQ (velocity w) n h)= + D • transverseProjection w h+dot (velocity w) h • transverseProjection w n := by + exact (velocityProjection_add _ _ _).trans + (congrArg₂ (·+·) (velocityProjection_smul _ _ _) (velocityProjection_smul _ _ _)) + rw [he] + calc + _ ≤ ‖D • transverseProjection w h‖+‖dot (velocity w) h • transverseProjection w n‖ := norm_add_le _ _ + _ = D*‖transverseProjection w h‖+|dot (velocity w) h| *‖transverseProjection w n‖ := by + rw [norm_smul,norm_smul,Real.norm_eq_abs,Real.norm_eq_abs,abs_of_nonneg hD] + _ ≤ D*‖h‖+(Real.sqrt (2*D)*‖h‖)*Real.sqrt (2*D) := + add_le_add (mul_le_mul_of_nonneg_left (transverseProjection_norm _ _) hD) + (mul_le_mul ha hp (norm_nonneg _) (by positivity)) + _ = D*‖h‖+(Real.sqrt (2*D))^2*‖h‖ := by ring + _ = _ := by rw [Real.sq_sqrt (by positivity : 0≤2*D)]; ring + +lemma transverse_receiverQ_source_bound (w v E B n : Vec) (hn : ‖n‖=1) : + ‖transverseProjection w (receiverQ (velocity w) n + (sourceNumerator n (velocity v) (fderiv ℝ velocity v (E+cross (velocity v) B))))‖ ≤ + 15*(1-dot n (velocity w))*(1-dot n (velocity v))*(q v)⁻¹* + (goodField E B n+(1-dot n (velocity v))*‖B‖) := by + apply (transverse_receiverQ_tangent_bound _ _ _ hn (sourceNumerator_tangent _ _ _ hn)).trans + convert mul_le_mul_of_nonneg_left (sourceNumerator_bound v E B n hn) + (show 0≤3*(1-dot n (velocity w)) by positivity [cone_denom_pos w n hn]) using 1 + ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQCLM.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQCLM.lean new file mode 100644 index 0000000000000000000000000000000000000000..b37166b17900b11178270f59d7ffd201e2288df6 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverQCLM.lean @@ -0,0 +1,729 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Maxwell.ElectricBoundaryField +import OAI.Analysis.VlasovMaxwell.Flow.PhaseTimePullback + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace + +namespace RVM + +def receiverQCLM (a n : Vec) : Vec →L[ℝ] Vec := + ContinuousLinearMap.id ℝ Vec+(crossCLM a).comp (crossCLM n) + +lemma receiverQCLM_apply (a n h : Vec) : receiverQCLM a n h=receiverQ a n h := by + simp only [receiverQCLM,add_apply,ContinuousLinearMap.id_apply, + ContinuousLinearMap.comp_apply,crossCLM_apply,receiverQ_force] + +lemma integral_receiverQ {H : Vec → Vec} (hH : Integrable H) (a n : Vec) : + (∫ v : Vec, receiverQ a n (H v))=receiverQ a n (∫ v : Vec, H v) := by + simpa only [receiverQCLM_apply] using (receiverQCLM a n).integral_comp_comm hH + +def retardedForceKernel (s : Solution) (t : ℝ) (x a : Vec) (y v : Vec) : Vec := + s.f (t-coneRadius x y,y,v) • + (forceTransportKernel (coneRadius x y) (coneDirection x y) a v+ + forceSourceKernel (coneRadius x y) (coneDirection x y) a v + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y))))) + +lemma physical_lorentz_density {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t : ℝ} {x y : Vec} (hxy : x≠y) (ht : 0≤t-coneRadius x y) (a : Vec) : + retardedElectricDensity s t x y+cross a (retardedMagneticDensity s t x y)= + ∫ v : Vec, retardedForceKernel s t x a y v := by + change receiverQCLM a (coneDirection x y) (retardedElectricDensity s t x y)=_ + rw [receiverQCLM_apply,retardedElectricDensity,← integral_receiverQ + (integrable_retardedElectricDensity_integrand hf hc hxy ht)] + apply integral_congr_ae + filter_upwards [] with v + rw [receiverQ_smul,mul_smul,physical_force_kernel _ _ _ _ _ + (show coneRadius x y≠0 by exact (norm_pos_iff.mpr (sub_ne_zero.mpr hxy)).ne') + (coneDirection_norm hxy)] + rfl + +lemma classical_boundaryLorentzForce_datum {d : Datum} {s : Solution} + (hs : Classical d s) {t : ℝ} (ht : 0 F (z,v)) := + hF.comp_continuous (continuous_const.prodMk continuous_id) (fun _ => ⟨hz',mem_univ _⟩) + exact hc.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK (hz z hz')) + · apply integrableOn_ball_of_punctured_bound hα + (continuousOn_integral_uniform_support hK hF.norm (by + intro z hz' v hv + simp only [hz z hz' v hv,norm_zero])) + intro z hz0 hzR + rw [Real.norm_of_nonneg (integral_nonneg (fun _ => norm_nonneg _))] + exact hb z hz0 hzR + +lemma coneDirection_translate (x z : Vec) : coneDirection x (x+z)=coneDirection 0 z := by + simp only [coneDirection,coneRadius,show x-(x+z) = -z by abel,zero_sub] + +lemma continuousOn_coneDirection_zero {R : ℝ} : + ContinuousOn (coneDirection (0:Vec)) (ball (0:Vec) R \ {0}) := by + intro z hz + have h0z : (0:Vec)≠z := by simpa only [mem_singleton_iff,ne_comm] using hz.2 + exact (contDiffAt_coneDirection (k:=1) h0z).continuousAt.continuousWithinAt + +lemma integrable_radial_lift {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {R : ℝ} {K : Set Vec} {F : (Vec × Vec) × Vec → W} + (hK : IsCompact K) + (hF : ContinuousOn F ((closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ)) + (hz : ∀ z ∈ closedBall (0:Vec) R, ∀ n ∈ sphere (0:Vec) 1, ∀ v ∉ K, F ((z,n),v)=0) : + Integrable (fun p : Vec × Vec => (‖p.1‖^2)⁻¹ • F ((p.1,coneDirection 0 p.1),p.2)) + ((volume.restrict (ball (0:Vec) R)).prod volume) := by + let P : Set (Vec × Vec) := closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1 + let S : Set Vec := ball (0:Vec) R \ {0} + have hP : IsCompact P := (isCompact_closedBall (0:Vec) R).prod (isCompact_sphere (0:Vec) 1) + have hN : ContinuousOn (fun z : Vec => (‖z‖^2)⁻¹) S := + (continuous_norm.pow 2).continuousOn.inv₀ (by + intro z hz' + exact pow_ne_zero 2 (norm_ne_zero_iff.mpr hz'.2)) + have harg : ContinuousOn (fun p : Vec × Vec => ((p.1,coneDirection 0 p.1),p.2)) (S ×ˢ univ) := + (continuous_fst.continuousOn.prodMk + (continuousOn_coneDirection_zero.comp continuous_fst.continuousOn (fun _ h => h.1))).prodMk + continuous_snd.continuousOn + have hmap : MapsTo (fun p : Vec × Vec => ((p.1,coneDirection 0 p.1),p.2)) (S ×ˢ univ) (P ×ˢ univ) := by + intro p hp + refine ⟨⟨ball_subset_closedBall hp.1.1,?_⟩,mem_univ _⟩ + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm (Ne.symm hp.1.2) + have hcont : ContinuousOn (fun p : Vec × Vec => (‖p.1‖^2)⁻¹ • F ((p.1,coneDirection 0 p.1),p.2)) + (S ×ˢ univ) := + (hN.comp continuous_fst.continuousOn (fun _ h => h.1)).smul (hF.comp harg hmap) + obtain ⟨C,hC,hbound⟩ := uniform_integral_bound_compact hP hK hF.norm + (by intro p hp v hv; simp only [hz p.1 hp.1 p.2 hp.2 v hv,norm_zero]) + apply integrable_joint_of_punctured_norm_bound (C:=C) (α:=2) (by norm_num) hK hcont + · intro z hzs v hv + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm (Ne.symm hzs.2) + rw [hz z (ball_subset_closedBall hzs.1) _ hn v hv,smul_zero] + · intro z hz0 hzR + have hz' : z∈closedBall (0:Vec) R := mem_closedBall_zero_iff.mpr hzR.le + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm (Ne.symm (norm_pos_iff.mp hz0)) + have hb := hbound (z,coneDirection 0 z) ⟨hz',hn⟩ + rw [Real.norm_of_nonneg (integral_nonneg (fun _ => norm_nonneg _))] at hb + simp only [norm_smul,Real.norm_of_nonneg (show 0≤(‖z‖^2)⁻¹ by positivity),integral_const_mul] + rw [Real.rpow_neg (norm_nonneg z),Real.rpow_two,mul_comm C] + exact mul_le_mul_of_nonneg_left hb (by positivity) + +lemma integrable_retarded_weighted_radial {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {s : Solution} (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R≤t) (x : Vec) + {A : (Vec × Vec) × Vec → W} + (hA : ContinuousOn A ((closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ)) : + Integrable (fun p : Vec × Vec => (‖p.1‖^2)⁻¹ • + (s.f (t-‖p.1‖,x+p.1,p.2) • A ((p.1,coneDirection 0 p.1),p.2))) + ((volume.restrict (ball (0:Vec) R)).prod volume) := by + have ht : 0≤t := le_trans hR hRt + obtain ⟨K,hK,hz⟩ := hc t ht + let P : Set (Vec × Vec) := closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1 + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1,p.2)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk + ((continuous_const.add continuous_fst.fst).prodMk continuous_snd) + have htime (z : Vec) (hz' : z ∈ closedBall (0:Vec) R) : t-‖z‖ ∈ Icc 0 t := by + have hn : ‖z‖≤R := by simpa only [mem_closedBall_zero_iff] using hz' + exact ⟨by linarith,sub_le_self _ (norm_nonneg _)⟩ + have hcf : ContinuousOn (fun p : (Vec × Vec) × Vec => s.f (t-‖p.1.1‖,x+p.1.1,p.2)) (P ×ˢ univ) := + hf.continuousOn.comp harg.continuousOn (fun p hp => (htime p.1.1 hp.1.1).1) + apply integrable_radial_lift (hK.image continuous_snd) (hcf.smul hA) + intro z hz' n hn v hv + have hsf : s.f (t-‖z‖,x+z,v)=0 := by + by_contra hne + exact hv ⟨(x+z,v),hz _ (htime z hz') (subset_tsupport _ hne),rfl⟩ + change s.f (t-‖z‖,x+z,v) • A ((z,n),v)=0 + rw [hsf,zero_smul] + +lemma continuousOn_receiverQ {H : Type*} [TopologicalSpace H] {S : Set H} + {a n h : H → Vec} (ha : ContinuousOn a S) (hn : ContinuousOn n S) (hh : ContinuousOn h S) : + ContinuousOn (fun p => receiverQ (a p) (n p) (h p)) S := by + exact ((continuousOn_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp_continuousOn + (hn.prodMk ha))).smul hh).add + (((contDiff_dot_pair (k:=1)).continuous.comp_continuousOn (ha.prodMk hh)).smul hn) + +def retardedNormalisedForce (s : Solution) (t : ℝ) (x a : Vec) (p : (Vec × Vec) × Vec) : Vec := + (1-dot p.1.2 (velocity p.2)) • receiverQ a p.1.2 + (normalisedElectricKernel ‖p.1.1‖ p.1.2 (velocity p.2) + (fderiv ℝ velocity p.2 (s.E (t-‖p.1.1‖,x+p.1.1)+ + cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))))) + +lemma continuousOn_retardedNormalisedForce {s : Solution} + (hE : ContinuousOn s.E fieldHalfSpace) (hB : ContinuousOn s.B fieldHalfSpace) + {t R : ℝ} (hRt : R≤t) (x a : Vec) : + ContinuousOn (retardedNormalisedForce s t x a) + ((closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ) := by + let S : Set ((Vec × Vec) × Vec) := (closedBall (0:Vec) R ×ˢ sphere (0:Vec) 1) ×ˢ univ + let u : (Vec × Vec) × Vec → Vec := fun p => velocity p.2 + let n : (Vec × Vec) × Vec → Vec := fun p => p.1.2 + let b : (Vec × Vec) × Vec → Vec := fun p => fderiv ℝ velocity p.2 + (s.E (t-‖p.1.1‖,x+p.1.1)+cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) + have hu : Continuous u := (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hn : Continuous n := continuous_fst.snd + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk (continuous_const.add continuous_fst.fst) + have hmap : MapsTo (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) S fieldHalfSpace := by + intro p hp + have hnz : ‖p.1.1‖≤R := by simpa only [mem_closedBall_zero_iff] using hp.1.1 + change 0≤t-‖p.1.1‖ + linarith + have he := hE.comp harg.continuousOn hmap + have hm := hB.comp harg.continuousOn hmap + have hcross : ContinuousOn (fun p : (Vec × Vec) × Vec => + cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) S := + (contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.continuousOn.prodMk hm) + have hb : ContinuousOn b S := + (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp continuous_snd).continuousOn.clm_apply (he.add hcross) + have hD : Continuous (fun p : (Vec × Vec) × Vec => 1-dot (n p) (u p)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hn.prodMk hu)) + have hD0 (p : (Vec × Vec) × Vec) (hp : p ∈ S) : 1-dot (n p) (u p)≠0 := by + apply (cone_denom_pos _ _ ?_).ne' + simpa only [n,mem_sphere,dist_zero_right] using hp.1.2 + have hN := continuousOn_normalisedElectricKernel (S:=S) + continuous_fst.fst.norm.continuousOn hn.continuousOn hu.continuousOn hb hD0 + exact hD.continuousOn.smul (continuousOn_receiverQ continuousOn_const hn.continuousOn hN) + +lemma radial_retardedNormalisedForce_eq (s : Solution) (t : ℝ) (x a z v : Vec) (hz : z≠0) : + (‖z‖^2)⁻¹ • (s.f (t-‖z‖,x+z,v) • retardedNormalisedForce s t x a ((z,coneDirection 0 z),v)) = + retardedForceKernel s t x a (x+z) v := by + simp only [retardedNormalisedForce,retardedForceKernel,coneRadius_add,coneDirection_translate] + rw [normalisedElectricKernel_eq (norm_ne_zero_iff.mpr hz),receiverQ_smul] + rw [← physical_force_kernel _ _ _ _ _ (norm_ne_zero_iff.mpr hz) + (coneDirection_norm (Ne.symm hz))] + simp only [smul_smul] + congr 1 + field_simp + +lemma integrable_joint_retardedForceKernel {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContinuousOn s.E fieldHalfSpace) (hB : ContinuousOn s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R≤t) (x a : Vec) : + Integrable (fun p : Vec × Vec => retardedForceKernel s t x a (x+p.1) p.2) + ((volume.restrict (ball (0:Vec) R)).prod volume) := by + have hi := integrable_retarded_weighted_radial hf hc hR hRt x + (continuousOn_retardedNormalisedForce hE hB hRt x a) + apply hi.congr + have hne : ∀ᵐ z ∂volume.restrict (ball (0:Vec) R), z≠0 := + ae_restrict_of_ae (volume.ae_ne (0:Vec)) + filter_upwards [MeasureTheory.Measure.quasiMeasurePreserving_fst.tendsto_ae.eventually hne] with p hp + exact radial_retardedNormalisedForce_eq s t x a p.1 p.2 hp + +lemma classical_retarded_force_phase_integral {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 simp + · rw [indicator_of_notMem (show p∉ball (0:Vec) t ×ˢ (univ : Set Vec) from by + intro h; exact hb (mem_ball_zero_iff.mp h.1)), + indicator_of_notMem (show (x,(0:Vec))+p∉retardedPhaseDomain t x from by + intro h + apply hb + simpa only [retardedPhaseDomain,mem_ofPred_eq,Prod.fst_add, + show x-(x+p.1) = -p.1 by abel,norm_neg] using h.2)] + +lemma retarded_phase_translate_integrable_iff {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] (f : Phase → W) (t : ℝ) (x : Vec) : + Integrable (fun p : Phase => f (x+p.1,p.2)) ((volume.restrict (ball (0:Vec) t)).prod volume) ↔ + IntegrableOn f (retardedPhaseDomain t x) := by + have hm : ((volume.restrict (ball (0:Vec) t)).prod volume : Measure Phase)= + volume.restrict (ball (0:Vec) t ×ˢ (univ : Set Vec)) := by + simpa only [Measure.restrict_univ,← Measure.volume_eq_prod] using + (Measure.prod_restrict (μ:=(volume:Measure Vec)) (ν:=(volume:Measure Vec)) + (ball (0:Vec) t) univ) + have heq : (ball (0:Vec) t ×ˢ (univ : Set Vec)).indicator (fun p : Phase => f (x+p.1,p.2)) =ᵐ[volume] + (fun p : Phase => (retardedPhaseDomain t x).indicator f ((x,(0:Vec))+p)) := by + have hne : ∀ᵐ p : Phase ∂volume, p.1≠0 := + Measure.quasiMeasurePreserving_fst.tendsto_ae.eventually (volume.ae_ne (0:Vec)) + filter_upwards [hne] with p hp + by_cases hb : ‖p.1‖ simp + · rw [indicator_of_notMem (show p∉ball (0:Vec) t ×ˢ (univ : Set Vec) from by + intro h; exact hb (mem_ball_zero_iff.mp h.1)), + indicator_of_notMem (show (x,(0:Vec))+p∉retardedPhaseDomain t x from by + intro h + apply hb + simpa only [retardedPhaseDomain,mem_ofPred_eq,Prod.fst_add, + show x-(x+p.1) = -p.1 by abel,norm_neg] using h.2)] + rw [hm] + change IntegrableOn (fun p : Phase => f (x+p.1,p.2)) (ball (0:Vec) t ×ˢ (univ : Set Vec)) volume ↔ _ + rw [← integrable_indicator_iff (μ:=volume) (measurableSet_ball.prod MeasurableSet.univ), + ← integrable_indicator_iff (μ:=volume) (isOpen_retardedPhaseDomain t x).measurableSet] + constructor + · intro hi + have hcomp : Integrable (fun p : Phase => (retardedPhaseDomain t x).indicator f ((x,(0:Vec))+p)) volume := hi.congr heq + have hh := hcomp.comp_add_left (-(x,(0:Vec))) + simpa only [add_neg_cancel_left] using hh + · intro hi + exact (hi.comp_add_left (x,(0:Vec))).congr heq.symm + +def physicalPhaseForce (s : Solution) (t : ℝ) (x a : Vec) (p : Phase) : Vec := + forceTransportKernel (coneRadius x p.1) (coneDirection x p.1) a p.2+ + forceSourceKernel (coneRadius x p.1) (coneDirection x p.1) a p.2 + (fderiv ℝ velocity p.2 (s.E (t-coneRadius x p.1,p.1)+ + cross (velocity p.2) (s.B (t-coneRadius x p.1,p.1)))) + +lemma retardedForceKernel_phase (s : Solution) (t : ℝ) (x a : Vec) (p : Phase) : + retardedForceKernel s t x a p.1 p.2= + s.f (t-‖x-p.1‖,p) • physicalPhaseForce s t x a p := rfl + +lemma integrableOn_physical_force_phase {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContinuousOn s.E fieldHalfSpace) (hB : ContinuousOn s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t : ℝ} (ht : 0≤t) (x a : Vec) : + IntegrableOn (fun p : Phase => s.f (t-‖x-p.1‖,p) • physicalPhaseForce s t x a p) + (retardedPhaseDomain t x) := by + apply (retarded_phase_translate_integrable_iff _ t x).mp + exact integrable_joint_retardedForceKernel hf hE hB hc ht le_rfl x a + +lemma classical_retarded_force_phase_domain {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {t : ℝ} (ht : 0 retardedForceKernel s t x a p.1 p.2) t x] + rfl + +lemma classical_retarded_force_label_integral {d : Datum} {s : Solution} + (hs : Classical d s) (hm : SmoothOnFiniteHorizons s) {T t : ℝ} + (F : PhaseFlowOn s.E s.B T) (ht : t∈Icc 0 T) (ht0 : 0⟨hp.1,hp.2.1,mem_univ _⟩ + have hf : ContinuousOn (fun p : ConeKernelState=>s.f (p.1.2,p.2.2)) S := + hs.f_smooth.continuousOn.comp + (continuous_fst.snd.prodMk continuous_snd.snd).continuousOn + (fun _ hp=>⟨hp.1.2,mem_univ _⟩) + obtain ⟨C,hC⟩ := hS.exists_bound_of_continuousOn (hf.smul (hA.mono hsub)) + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro t ht σ hσ n hn z + by_cases hz : z∈K + · exact (hC ((t,σ),(n,z)) ⟨⟨ht,hσ⟩,⟨by simpa only [mem_sphere,dist_zero_right] using hn,hz⟩⟩).trans (le_max_left _ _) + · have hf0 : s.f (σ,z)=0 := by + by_contra hne + exact hz (hzero σ hσ (subset_tsupport _ hne)) + simp only [hf0,zero_smul,norm_zero] + exact le_max_right _ _ + +def normalisedSignedForce (r : ℝ) (a u n b : Vec) : Vec := + ((1-dot n u)/(1-dot n a)) • receiverQ a n (normalisedElectricKernel r n u b) + +lemma normalisedSignedForce_eq {r : ℝ} (a u n b : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) (hD : 1-dot n a≠0) : + normalisedSignedForce r a u n b=r^2 • signedForceKernel r a u n b := by + rw [normalisedSignedForce,normalisedElectricKernel_eq hr,receiverQ_smul,smul_comm] + congr 1 + exact physical_kernel_signed_transform _ _ _ _ _ hr hd hD + +lemma continuousOn_normalisedSignedForce {Q : Type*} [TopologicalSpace Q] + {r : Q→ℝ} {a u n b : Q→Vec} {S : Set Q} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) (hu : ContinuousOn u S) + (hn : ContinuousOn n S) (hb : ContinuousOn b S) + (hd : ∀p∈S,1-dot (n p) (u p)≠0) (hD : ∀p∈S,1-dot (n p) (a p)≠0) : + ContinuousOn (fun p=>normalisedSignedForce (r p) (a p) (u p) (n p) (b p)) S := by + have hdot {f g : Q→Vec} (hf : ContinuousOn f S) (hg : ContinuousOn g S) : + ContinuousOn (fun p=>dot (f p) (g p)) S := by + simpa only [dot_eq_inner] using hf.inner hg + exact ((continuousOn_const.sub (hdot hn hu)).div + (continuousOn_const.sub (hdot hn ha)) hD).smul + (continuousOn_receiverQ ha hn (continuousOn_normalisedElectricKernel hr hn hu hb hd)) + +def sourceAcceleration (s : Solution) (p : ℝ×Phase) : Vec := + fderiv ℝ velocity p.2.2 (s.E (p.1,p.2.1)+cross (velocity p.2.2) (s.B (p.1,p.2.1))) + +lemma EnergyPrefix.continuousOn_sourceAcceleration {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) : + ContinuousOn (sourceAcceleration s) (Icc 0 T ×ˢ (univ : Set Phase)) := by + have hp : Continuous (fun p : ℝ×Phase=>(p.1,p.2.1)) := continuous_fst.prodMk continuous_snd.fst + have hE : ContinuousOn (fun p : ℝ×Phase=>s.E (p.1,p.2.1)) (Icc 0 T ×ˢ (univ : Set Phase)) := + hs.E_smooth.continuousOn.comp hp.continuousOn (fun _ hp=>⟨hp.1,mem_univ _⟩) + have hB : ContinuousOn (fun p : ℝ×Phase=>s.B (p.1,p.2.1)) (Icc 0 T ×ˢ (univ : Set Phase)) := + hs.B_smooth.continuousOn.comp hp.continuousOn (fun _ hp=>⟨hp.1,mem_univ _⟩) + have hu := (contDiff_velocity (k:=1)).continuous.comp (continuous_snd.snd : Continuous (fun p : ℝ×Phase=>p.2.2)) + exact (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp_continuousOn + continuous_snd.snd.continuousOn).clm_apply + (hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.continuousOn.prodMk hB))) + +lemma PhaseFlowOn.normalised_source_force_continuousOn {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ContinuousOn (fun p : ConeKernelState=>normalisedSignedForce (p.1.1-p.1.2) + (velocity (F.flow zX p.1.1).2) (velocity p.2.2.2) p.2.1 + (sourceAcceleration s (p.1.2,p.2.2))) (coneKernelDomain T) := by + have ha : ContinuousOn (fun p : ConeKernelState=>velocity (F.flow zX p.1.1).2) + (coneKernelDomain T) := (contDiff_velocity (k:=1)).continuous.comp_continuousOn + (((F.continuousOn_time zX).comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).snd) + have hu : Continuous (fun p : ConeKernelState=>velocity p.2.2.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd.snd.snd + have hb : ContinuousOn (fun p : ConeKernelState=>sourceAcceleration s (p.1.2,p.2.2)) (coneKernelDomain T) := + (hs.continuousOn_sourceAcceleration).comp + (continuous_fst.snd.prodMk continuous_snd.snd).continuousOn (fun _ hp=>⟨hp.1.2,mem_univ _⟩) + refine continuousOn_normalisedSignedForce (continuous_fst.fst.sub continuous_fst.snd).continuousOn + ha hu.continuousOn continuous_snd.fst.continuousOn hb ?_ ?_ + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + · intro p hp + exact (cone_denom_pos _ _ (by simpa only [mem_sphere,dist_zero_right] using hp.2.1)).ne' + +lemma PhaseFlowOn.source_force_inverse_square_bound {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + ∃ C : ℝ, 0≤C ∧ ∀ t∈Icc 0 T, ∀ σ∈Icc 0 T, σ(p.1,p.2.1)) ⁻¹' arrivalDomain α zX T + +def arrivalKernelState (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (p : ℝ×Phase) : ConeKernelState := + ((arrivalTime α zX T (p.1,p.2.1),p.1),(arrivalDirection α zX T (p.1,p.2.1),p.2)) + +lemma PhaseFlowOn.isOpen_arrivalPhaseDomain {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : IsOpen (arrivalPhaseDomain F.flow zX T) := + (F.isOpen_arrivalDomain zX).preimage (continuous_fst.prodMk continuous_snd.fst) + +lemma PhaseFlowOn.arrivalKernelState_mem {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) {p : ℝ×Phase} + (hp : p∈arrivalPhaseDomain F.flow zX T) : + arrivalKernelState F.flow zX T p∈coneKernelDomain T := by + have ht := F.arrival_time_spec zX hp + exact ⟨⟨⟨(hp.1.1.trans ht.1.1).le,ht.1.2.le⟩,Ioo_subset_Icc_self hp.1⟩, + ⟨by simpa only [arrivalKernelState,mem_sphere,dist_zero_right] using F.norm_arrivalDirection zX hp,mem_univ _⟩⟩ + +lemma PhaseFlowOn.arrivalKernelState_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) : + ContinuousOn (arrivalKernelState F.flow zX T) (arrivalPhaseDomain F.flow zX T) := by + intro p hp + have hc : ContinuousAt (fun p : ℝ×Phase=>(p.1,p.2.1)) p := + continuousAt_fst.prodMk continuousAt_snd.fst + exact (((F.arrivalTime_continuousAt zX hp).comp (f := fun p : ℝ×Phase=>(p.1,p.2.1)) hc).prodMk continuousAt_fst).prodMk + (((F.arrivalDirection_continuousAt zX hp).comp (f := fun p : ℝ×Phase=>(p.1,p.2.1)) hc).prodMk continuousAt_snd) |>.continuousWithinAt + +def arrivalConeKernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (A : ConeKernelState→Vec) : ℝ×Phase→Vec := + (arrivalPhaseDomain α zX T).indicator (fun p=> + (arrivalRadius α zX T (p.1,p.2.1))⁻¹^2 • (s.f p • A (arrivalKernelState α zX T p))) + +lemma PhaseFlowOn.measurable_arrivalConeKernel {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Measurable (arrivalConeKernel s F.flow zX T A) := by + classical + have hr : ContinuousOn (fun p : ℝ×Phase=>arrivalRadius F.flow zX T (p.1,p.2.1)) + (arrivalPhaseDomain F.flow zX T) := by + intro p hp + exact ((F.arrivalRadius_continuousAt zX hp).comp (f := fun p : ℝ×Phase=>(p.1,p.2.1)) + (continuousAt_fst.prodMk continuousAt_snd.fst)).continuousWithinAt + have hr0 : ∀p∈arrivalPhaseDomain F.flow zX T, + arrivalRadius F.flow zX T (p.1,p.2.1)≠0 := fun p hp=> + (sub_pos.mpr (F.arrival_time_spec zX hp).1.1).ne' + have hf : ContinuousOn s.f (arrivalPhaseDomain F.flow zX T) := + hs.f_smooth.continuousOn.mono (fun _ hp=>⟨Ioo_subset_Icc_self hp.1,mem_univ _⟩) + have hc := ((hr.inv₀ hr0).pow 2).smul (hf.smul + (hA.comp (F.arrivalKernelState_continuousOn zX) (fun _ hp=>F.arrivalKernelState_mem zX hp))) + exact hc.measurable_piecewise continuousOn_const (F.isOpen_arrivalPhaseDomain zX).measurableSet + +lemma PhaseFlowOn.arrivalConeKernel_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) : + Integrable (arrivalConeKernel s F.flow zX T A) := by + classical + obtain ⟨K,hK,hzero⟩ := hs.compact + obtain ⟨C,hC,hb⟩ := hs.uniform_cone_kernel_bound hA + apply F.source_cone_integrable_of_bound zX (hK.image continuous_snd) + (F.measurable_arrivalConeKernel hs zX hA).aestronglyMeasurable + apply Filter.Eventually.of_forall + intro p + by_cases hp : p∈arrivalPhaseDomain F.flow zX T + · have hspec := F.arrival_time_spec zX hp + have ht : arrivalTime F.flow zX T (p.1,p.2.1)∈Icc 0 T := + ⟨(hp.1.1.trans hspec.1.1).le,hspec.1.2.le⟩ + have he : (p.1,p.2.1)∈arrivalDomain F.flow zX T := hp + rw [arrivalConeKernel,indicator_of_mem hp,phaseArrivalMajorant,arrivalInverseSquare, + indicator_of_mem he] + by_cases hv : p.2.2∈Prod.snd '' K + · rw [indicator_of_mem hv,mul_one,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)] + have hh := hb _ ht _ (Ioo_subset_Icc_self hp.1) _ (F.norm_arrivalDirection zX hp) p.2 + exact (mul_le_mul_of_nonneg_left hh (sq_nonneg _)).trans_eq (mul_comm _ _) + · have hf0 : s.f p=0 := by + by_contra hne + exact hv ⟨p.2,hzero _ (Ioo_subset_Icc_self hp.1) (subset_tsupport _ hne),rfl⟩ + simp only [hf0,zero_smul,smul_zero,norm_zero,indicator_of_notMem hv,mul_zero,le_refl] + · have he : (p.1,p.2.1)∉arrivalDomain F.flow zX T := hp + simp only [arrivalConeKernel,indicator_of_notMem hp,norm_zero,phaseArrivalMajorant, + arrivalInverseSquare,indicator_of_notMem he,zero_mul,mul_zero,le_refl] + +def actualArrivalSignedForce (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : ℝ×Phase→Vec := + (arrivalPhaseDomain α zX T).indicator (fun p=>s.f p • + signedForceKernel (arrivalRadius α zX T (p.1,p.2.1)) + (velocity (α zX (arrivalTime α zX T (p.1,p.2.1))).2) + (velocity p.2.2) (arrivalDirection α zX T (p.1,p.2.1)) (sourceAcceleration s p)) + +lemma PhaseFlowOn.actualArrivalSignedForce_eq {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) : + actualArrivalSignedForce s F.flow zX T=arrivalConeKernel s F.flow zX T + (fun p=>normalisedSignedForce (p.1.1-p.1.2) + (velocity (F.flow zX p.1.1).2) (velocity p.2.2.2) p.2.1 + (sourceAcceleration s (p.1.2,p.2.2))) := by + classical + funext p + by_cases hp : p∈arrivalPhaseDomain F.flow zX T + · have hr : arrivalRadius F.flow zX T (p.1,p.2.1)≠0 := + (sub_pos.mpr (F.arrival_time_spec zX hp).1.1).ne' + have hn := F.norm_arrivalDirection zX hp + have hd := (cone_denom_pos p.2.2 _ hn).ne' + have hD := (cone_denom_pos (F.flow zX (arrivalTime F.flow zX T (p.1,p.2.1))).2 _ hn).ne' + simp only [actualArrivalSignedForce,arrivalConeKernel,indicator_of_mem hp,arrivalKernelState] + change _=(arrivalRadius F.flow zX T (p.1,p.2.1))⁻¹^2 • + (s.f p • normalisedSignedForce (arrivalRadius F.flow zX T (p.1,p.2.1)) _ _ _ _) + rw [normalisedSignedForce_eq _ _ _ _ hr hd hD,smul_comm (s.f p),smul_smul, + ←mul_pow,inv_mul_cancel₀ hr,one_pow,one_smul] + · simp only [actualArrivalSignedForce,arrivalConeKernel,indicator_of_notMem hp] + +lemma PhaseFlowOn.actualArrivalSignedForce_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Measurable (actualArrivalSignedForce s F.flow zX T) := by + rw [F.actualArrivalSignedForce_eq zX] + exact F.measurable_arrivalConeKernel hs zX (F.normalised_source_force_continuousOn hs zX) + +lemma PhaseFlowOn.actualArrivalSignedForce_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) : + Integrable (actualArrivalSignedForce s F.flow zX T) := by + rw [F.actualArrivalSignedForce_eq zX] + exact F.arrivalConeKernel_integrable hs zX (F.normalised_source_force_continuousOn hs zX) + +lemma PhaseFlowOn.actualArrivalSignedForce_integrable_weight {s : Solution} {T C : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) + {ψ : ℝ×Phase→ℝ} (hψ : Measurable ψ) (hb : ∀p, |ψ p|≤C) : + Integrable (fun p=>ψ p • actualArrivalSignedForce s F.flow zX T p) := by + apply (F.actualArrivalSignedForce_integrable hs zX).bdd_smul C hψ.aestronglyMeasurable + exact Filter.Eventually.of_forall (fun p=>by simpa only [Real.norm_eq_abs] using hb p) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverRadialDomain.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverRadialDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..d192249cb612e0957452cd71335bacdb31d22d58 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/ReceiverRadialDomain.lean @@ -0,0 +1,212 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.WithinFlow + +namespace OAI + +noncomputable section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.arrival_strictMono {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (z : Phase) (y : Vec) : + StrictMonoOn (fun t => t-‖(F.flow z t).1-y‖) (Icc 0 T) := by + obtain ⟨c,hc,hLip⟩ := F.timelike hT z + intro a ha b hb hab + have hbound := hLip.dist_le_mul a ha b hb + rw [dist_eq_norm,Real.dist_eq,abs_of_neg (sub_neg.mpr hab)] at hbound + have hn : ‖(F.flow z b).1-y‖ ≤ ‖(F.flow z a).1-(F.flow z b).1‖ + ‖(F.flow z a).1-y‖ := by + calc + _ = ‖((F.flow z b).1-(F.flow z a).1)+((F.flow z a).1-y)‖ := by congr 1; abel + _ ≤ ‖(F.flow z b).1-(F.flow z a).1‖ + ‖(F.flow z a).1-y‖ := norm_add_le _ _ + _ = _ := by rw [norm_sub_rev] + have hp := mul_pos (sub_pos.mpr hc) (sub_pos.mpr hab) + nlinarith + +def receiverRadialDomain (s T : ℝ) : Set Vec := {w | 0 < ‖w‖ ∧ s+‖w‖ < T} + +def receiverRadial (α : Phase → ℝ → Phase) (z : Phase) (s : ℝ) (w : Vec) : Vec := + (α z (s+‖w‖)).1-w + +lemma isOpen_receiverRadialDomain (s T : ℝ) : IsOpen (receiverRadialDomain s T) := + (isOpen_lt continuous_const continuous_norm).inter + (isOpen_lt (continuous_const.add continuous_norm) continuous_const) + +lemma receiver_time_mem {s T : ℝ} (hs : 0 ≤ s) {w : Vec} + (hw : w ∈ receiverRadialDomain s T) : s+‖w‖ ∈ Ioo 0 T := by + constructor <;> linarith [hw.1,hw.2] + +lemma PhaseFlowOn.receiver_injective {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) : + InjOn (receiverRadial F.flow z s) (receiverRadialDomain s T) := by + intro a ha b hb hab + have hta := Ioo_subset_Icc_self (receiver_time_mem hs.1 ha) + have htb := Ioo_subset_Icc_self (receiver_time_mem hs.1 hb) + let y := receiverRadial F.flow z s a + have hya : (F.flow z (s+‖a‖)).1-y=a := by dsimp [y,receiverRadial]; abel + have hyb : (F.flow z (s+‖b‖)).1-y=b := by + change (F.flow z (s+‖b‖)).1-receiverRadial F.flow z s a=b + rw [hab] + unfold receiverRadial + abel + have he : s+‖a‖=s+‖b‖ := by + apply (F.arrival_strictMono (hs.1.trans hs.2) z y).injOn hta htb + dsimp only + rw [hya,hyb] + ring + rw [← hya,← hyb,he] + +lemma PhaseFlowOn.exists_arrival {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) {y : Vec} + (hy : ‖(F.flow z T).1-y‖ < T-s) : + ∃! t : ℝ, t ∈ Icc s T ∧ t-‖(F.flow z t).1-y‖=s := by + have hsub : Icc s T ⊆ Icc 0 T := fun _ ht => ⟨hs.1.trans ht.1,ht.2⟩ + have hc : ContinuousOn (fun t => t-‖(F.flow z t).1-y‖) (Icc s T) := + continuousOn_id.sub ((((F.continuousOn_time z).mono hsub).fst.sub continuousOn_const).norm) + have hstart : s-‖(F.flow z s).1-y‖ ≤ s := sub_le_self _ (norm_nonneg _) + have hend : s ≤ T-‖(F.flow z T).1-y‖ := by linarith + obtain ⟨t,ht,he⟩ := intermediate_value_Icc hs.2 hc ⟨hstart,hend⟩ + refine ⟨t,⟨ht,he⟩,?_⟩ + intro r hr + apply (F.arrival_strictMono (hs.1.trans hs.2) z y).injOn (hsub hr.1) (hsub ht) + exact hr.2.trans he.symm + +lemma PhaseFlowOn.receiver_image {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) : + receiverRadial F.flow z s '' receiverRadialDomain s T = + ball (F.flow z T).1 (T-s) \ {(F.flow z s).1} := by + ext y + constructor + · rintro ⟨w,hw,rfl⟩ + let t := s+‖w‖ + let y := receiverRadial F.flow z s w + have ht : t ∈ Ioo 0 T := receiver_time_mem hs.1 hw + have hst : s < t := by dsimp [t]; linarith [hw.1] + have he : t-‖(F.flow z t).1-y‖=s := by + have hh : (F.flow z t).1-y=w := by dsimp [y,receiverRadial,t]; abel + rw [hh] + dsimp [t] + ring + have hm := F.arrival_strictMono (hs.1.trans hs.2) z y + constructor + · have hh := hm (Ioo_subset_Icc_self ht) ⟨hs.1.trans hs.2,le_rfl⟩ ht.2 + dsimp only at hh + rw [he] at hh + rw [mem_ball,dist_eq_norm,norm_sub_rev] + linarith + · intro hh + change y=(F.flow z s).1 at hh + have hh' := hm hs (Ioo_subset_Icc_self ht) hst + dsimp only at hh' + rw [he,hh,sub_self,norm_zero,sub_zero] at hh' + exact (lt_irrefl s) hh' + · rintro ⟨hy,hn⟩ + have hy' : ‖(F.flow z T).1-y‖ < T-s := by + simpa only [mem_ball,dist_eq_norm,norm_sub_rev] using hy + obtain ⟨t,⟨ht,he⟩,_⟩ := F.exists_arrival hs z hy' + have hst : s < t := by + by_contra h + have ht' : t=s := le_antisymm (le_of_not_gt h) ht.1 + rw [ht'] at he + have hh : ‖(F.flow z s).1-y‖=0 := by linarith + exact hn (sub_eq_zero.mp (norm_eq_zero.mp hh)).symm + have htT : t < T := by + by_contra h + have ht' : t=T := le_antisymm ht.2 (le_of_not_gt h) + rw [ht'] at he + linarith + let w := (F.flow z t).1-y + have hw : s+‖w‖=t := by dsimp [w]; linarith + refine ⟨w,⟨?_,?_⟩,?_⟩ + · dsimp [w]; linarith + · rw [hw]; exact htT + · unfold receiverRadial + rw [hw] + dsimp [w] + abel + +lemma PhaseFlowOn.receiver_differential {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : 0 ≤ s) (z : Phase) {w : Vec} (hw : w ∈ receiverRadialDomain s T) : + HasFDerivAt (receiverRadial F.flow z s) + ((ContinuousLinearMap.toSpanSingleton ℝ (velocity (F.flow z (s+‖w‖)).2)).comp + (innerSL ℝ (‖w‖⁻¹ • w)) - ContinuousLinearMap.id ℝ Vec) w := by + have ht := receiver_time_mem hs hw + have hX := ((F.ode z _ (Ioo_subset_Icc_self ht)).hasDerivAt (Icc_mem_nhds ht.1 ht.2)).fst + change HasDerivAt (fun t => (F.flow z t).1) (velocity (F.flow z (s+‖w‖)).2) (s+‖w‖) at hX + have hn := (hasStrictFDerivAt_norm_nonzero (norm_ne_zero_iff.mp (ne_of_gt hw.1))).hasFDerivAt + convert! (hX.hasFDerivAt.comp w (hn.const_add s)).sub (hasFDerivAt_id w) using 1 + +lemma PhaseFlowOn.receiver_jacobian {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : 0 ≤ s) (z : Phase) {w : Vec} (hw : w ∈ receiverRadialDomain s T) : + |(fderiv ℝ (receiverRadial F.flow z s) w).det| = + 1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2) := by + rw [(F.receiver_differential hs z hw).fderiv] + let v := velocity (F.flow z (s+‖w‖)).2 + let ℓ := innerSL ℝ (‖w‖⁻¹ • w) + have hd := determinant_retarded_graph + (D := ContinuousLinearMap.id ℝ Vec) (by exact LinearMap.det_id) v ℓ + simp only [ContinuousLinearMap.id_comp] at hd + have he : (ContinuousLinearMap.toSpanSingleton ℝ v).comp ℓ - ContinuousLinearMap.id ℝ Vec = + -((ContinuousLinearMap.id ℝ Vec) - (ContinuousLinearMap.toSpanSingleton ℝ v).comp ℓ) := by abel + have hneg (A : Vec →L[ℝ] Vec) : |(-A).det|=|A.det| := by + change |LinearMap.det (-A.toLinearMap)|=|LinearMap.det A.toLinearMap| + rw [← neg_one_smul ℝ A.toLinearMap,LinearMap.det_smul,abs_mul,abs_pow] + norm_num + change |((ContinuousLinearMap.toSpanSingleton ℝ v).comp ℓ - ContinuousLinearMap.id ℝ Vec).det| = _ + rw [he,hneg,hd] + change |1 - inner ℝ (‖w‖⁻¹ • w) v| = _ + rw [← dot_eq_inner,abs_of_pos] + apply cone_denom_pos + simpa only [sub_zero] using norm_coneDirection (x := w) (y := 0) + (norm_ne_zero_iff.mp (ne_of_gt hw.1)) + +lemma PhaseFlowOn.receiver_integral {E B : Field} {T s : ℝ} (F : PhaseFlowOn E B T) + (hs : s ∈ Icc 0 T) (z : Phase) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + (g : Vec → G) : + ∫ y in ball (F.flow z T).1 (T-s), g y = + ∫ w in receiverRadialDomain s T, + (1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2)) • + g (receiverRadial F.flow z s w) := by + have hd : ∀ w ∈ receiverRadialDomain s T, + HasFDerivWithinAt (receiverRadial F.flow z s) + (fderiv ℝ (receiverRadial F.flow z s) w) (receiverRadialDomain s T) w := by + intro w hw + exact (F.receiver_differential hs.1 z hw).differentiableAt.hasFDerivAt.hasFDerivWithinAt + calc + _ = ∫ y in receiverRadial F.flow z s '' receiverRadialDomain s T, g y := by + apply setIntegral_congr_set + rw [F.receiver_image hs z] + exact (sdiff_null_ae_eq_self (measure_singleton (F.flow z s).1)).symm + _ = ∫ w in receiverRadialDomain s T, + |(fderiv ℝ (receiverRadial F.flow z s) w).det| • g (receiverRadial F.flow z s w) := + integral_image_eq_integral_abs_det_fderiv_smul volume (isOpen_receiverRadialDomain s T).measurableSet + hd (F.receiver_injective hs z) g + _ = _ := by + apply setIntegral_congr_fun (isOpen_receiverRadialDomain s T).measurableSet + intro w hw + dsimp only + rw [F.receiver_jacobian hs.1 z hw] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedDifferentiation.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedDifferentiation.lean new file mode 100644 index 0000000000000000000000000000000000000000..160b3596ad9b0a1d7a84fe9deb8271ff1e383c2d --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedDifferentiation.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma norm_velocity_integral_bound {P C : ℝ} {g : Vec → ℝ} + (hzero : ∀ v, P<‖v‖ → g v=0) (hb : ∀ v, ‖v‖≤P → |g v|≤C) : + ‖∫ v,g v‖≤volume.real (closedBall (0:Vec) P)*C := by + rw [←setIntegral_eq_integral_of_forall_compl_eq_zero (s:=closedBall (0:Vec) P) + (f:=g) (fun v hv => hzero v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv))] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ]; exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) (f:=g) (C:=C) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + simpa only [Real.norm_eq_abs] using hb v (by simpa only [mem_closedBall,dist_zero_right] using hv)) + simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,mul_comm] using hh + +lemma retarded_packet_integrable {F : Vec × Phase → ℝ} {t P C : ℝ} (x : Vec) + (hc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ v,F (x,z,v)) (ball (0:Vec) t) := by + let A := ball (0:Vec) t \ ({0}:Set Vec) + have hC : ContinuousOn (fun p : Phase => F (x,p)) (A ×ˢ univ) := by + intro p hp + exact ((hc (x,p) hp.1.2 (by simpa only [mem_ball,dist_zero_right] using hp.1.1)).comp + (continuousAt_const.prodMk continuousAt_id)).continuousWithinAt + have hzero (z : Vec) (hza : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (x,z,v)=0 := + hz x z v hza.2 (by simpa only [mem_ball,dist_zero_right] using hza.1) + (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + apply integrableOn_ball_of_punctured_bound (α:=1) (C:=volume.real (closedBall (0:Vec) P)*C) + (by norm_num) (continuousOn_integral_uniform_support (isCompact_closedBall _ _) hC hzero) + intro z hz0 hzt + have hzn := norm_pos_iff.mp hz0 + have hh := norm_velocity_integral_bound (hz x z · hzn hzt) (hb x z · hzn hzt) + simpa only [Real.rpow_neg (norm_nonneg z),Real.rpow_one,div_eq_mul_inv,mul_assoc] using hh + +lemma retarded_packet_spatial_fderiv {F : Vec × Phase → ℝ} {x z v : Vec} + (hF : DifferentiableAt ℝ F (x,z,v)) (e : Vec) : + fderiv ℝ (fun y => F (y,z,v)) x e=fderiv ℝ F (x,z,v) (e,0,0) := by + have hh := hF.hasFDerivAt.comp x ((hasFDerivAt_id (𝕜:=ℝ) x).prodMk (hasFDerivAt_const (z,v) x)) + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma retarded_packet_derivative_zero {F : Vec × Phase → ℝ} {P t : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ F (y,z,v))=fun _ => (0:ℝ) := funext (fun y => hz y z v hz0 hzt hv) + rw [he] + simp + +lemma hasDerivAt_retarded_packet_line {F : Vec × Phase → ℝ} {t P : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ v,F (x+q • e,z,v)) + (∫ v,fderiv ℝ F (x+a • e,z,v) (e,0,0)) a := by + let G : ℝ × Vec → ℝ := fun p => F (x+p.1 • e,z,p.2) + have hG : ContDiff ℝ 1 G := by + apply contDiff_iff_contDiffAt.mpr + intro p + exact (hF (x+p.1 • e,z,p.2) hz0 hzt).comp p + ((contDiffAt_const.add (contDiffAt_fst.smul contDiffAt_const)).prodMk + (contDiffAt_const.prodMk contDiffAt_snd)) + have hzero (q : ℝ) (_ : q∈(univ : Set ℝ)) (v : Vec) (hv : v∉closedBall (0:Vec) P) : G (q,v)=0 := + hz _ z v hz0 hzt (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + have hd := (hasFDerivAt_integral_uniform_support isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG.contDiffOn hzero).differentiableAt.hasDerivAt + rw [show deriv (fun q => ∫ v,G (q,v)) a = fderiv ℝ (fun q => ∫ v,G (q,v)) a 1 from rfl, + fderiv_integral_uniform_support_apply isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG.contDiffOn hzero] at hd + apply hd.congr_deriv + apply integral_congr_ae + apply ae_of_all + intro v + have hm := ((hasFDerivAt_const x (a,v)).add ((hasFDerivAt_fst (𝕜:=ℝ)).smul_const e)).prodMk + ((hasFDerivAt_const z (a,v)).prodMk (hasFDerivAt_snd (𝕜:=ℝ))) + have hh := ((hF (x+a • e,z,v) hz0 hzt).differentiableAt (by simp)).hasFDerivAt.comp (a,v) hm + change HasFDerivAt G _ (a,v) at hh + simpa using congrArg (fun L : (ℝ × Vec) →L[ℝ] ℝ => L (1,0)) hh.fderiv + +lemma hasDerivAt_retarded_packet_integral {F : Vec × Phase → ℝ} {t P C D : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ z in ball (0:Vec) t,∫ v,F (x+q • e,z,v)) + (∫ z in ball (0:Vec) t,∫ v,fderiv ℝ F (x+a • e,z,v) (e,0,0)) a := by + let V := volume.real (closedBall (0:Vec) P) + have hfc := fun p hp ht => (hF p hp ht).continuousAt + have hdc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ fderiv ℝ F p (e,0,0)) p := by + intro p hp ht + exact ((hF p hp ht).continuousAt_fderiv (by simp)).clm_apply continuousAt_const + have hdz := fun x z v hz0 hzt hv => retarded_packet_derivative_zero hF hz x z v e hz0 hzt hv + apply (hasDerivAt_integral_of_dominated_loc_of_deriv_le (s:=univ) + (bound:=fun z : Vec => V*D*‖z‖^(-(1:ℝ))) (by simp) + (Eventually.of_forall (fun q => (retarded_packet_integrable (x+q • e) hfc hz hb).aestronglyMeasurable)) + (retarded_packet_integrable (x+a • e) hfc hz hb) + (retarded_packet_integrable (x+a • e) hdc hdz hD).aestronglyMeasurable + ?_ ((integrableOn_norm_rpow_neg (R:=t) (show (1:ℝ)<3 by norm_num)).const_mul (V*D)) ?_).2 + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hzball hz0 + intro q _ + have hzt : ‖z‖(lorentzField s.E s.B (t,F.flow z t)).2) (Ioo 0 T) := by + have hf : ContinuousOn (F.flow z) (Ioo 0 T) := + (F.continuousOn_time z).mono Ioo_subset_Icc_self + have hp : ContinuousOn (fun t=>(t,(F.flow z t).1)) (Ioo 0 T) := + continuousOn_id.prodMk hf.fst + have hE := hs.E_smooth.continuousOn.comp hp + (fun t ht=> ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hB := hs.B_smooth.continuousOn.comp hp + (fun t ht=> ⟨Ioo_subset_Icc_self ht,mem_univ _⟩) + have hu := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hf.snd + exact hE.add ((contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.prodMk hB)) + +lemma PhaseFlowOn.retardedMomentum_regular {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c,(F.flow zX r).1≠(F.flow zY r).1) : + ContDiffOn ℝ 1 (fun r=>(F.flow zX (branchTime F.flow zX zY T r)).2) (uIcc b c) ∧ + ContinuousOn (retardedMomentumForce s F.flow T zX zY) (uIcc b c) := by + let τ := branchTime F.flow zX zY T + have ht : ∀ r∈uIcc b c,τ r∈Ioo 0 T := by + intro r hr + have hh := F.branch_time_mem zX zY (hS hr) (hne r hr) + exact ⟨(hS hr).1.1.trans hh.1,hh.2⟩ + have hτ : ContDiffOn ℝ 1 τ (uIcc b c) := fun r hr=> + (F.branch_differential zX zY (hS hr) (hne r hr)).1.contDiffWithinAt + have hX := (F.flow_contDiffOn hs zX).comp hτ ht + obtain ⟨_,ha,hu,hn,_,_⟩ := F.actual_branch_regular hs zX zY hS hne + have hd : ContinuousOn (fun r=>1-dot (branchDirection F.flow zX zY T r) + (velocity (F.flow zY r).2)) (uIcc b c) := + continuousOn_const.sub ((contDiff_dot_pair (k:=0)).continuous.comp_continuousOn + (hn.continuousOn.prodMk hu.continuousOn)) + have hD : ContinuousOn (fun r=>1-dot (branchDirection F.flow zX zY T r) + (velocity (F.flow zX (τ r)).2)) (uIcc b c) := + continuousOn_const.sub ((contDiff_dot_pair (k:=0)).continuous.comp_continuousOn + (hn.continuousOn.prodMk ha.continuousOn)) + refine ⟨hX.snd,?_⟩ + exact (hd.div hD (fun r hr=>(cone_denom_pos _ _ + (F.branchDirection_norm zX zY (hS hr) (hne r hr))).ne')).smul + ((F.momentumForce_continuousOn hs zX).comp hτ.continuousOn ht) + +lemma PhaseFlowOn.actual_projector_regular {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c,(F.flow zX r).1≠(F.flow zY r).1) + (hv : ∀ r∈uIcc b c,(F.flow zX (branchTime F.flow zX zY T r)).2≠0) (w : ℝ) : + let V := fun r=>(F.flow zX (branchTime F.flow zX zY T r)).2 + let W := fun r=>angularMultiplierCLM w (V r) + let W' := fun r=>angularDerivativeCLM w (V r) (retardedMomentumForce s F.flow T zX zY r) + ContDiffOn ℝ 1 W (uIcc b c) ∧ ContinuousOn W' (uIcc b c) ∧ + ∀ r∈uIoo b c,HasDerivAt W (W' r) r := by + obtain ⟨hV,hK⟩ := F.retardedMomentum_regular hs zX zY hS hne + refine ⟨?_,continuousOn_angularDerivativeCLM hV.continuousOn hK hv w,?_⟩ + · intro r hr + exact (contDiffAt_angularMultiplierCLM w (hv r hr) (k:=1) (by simp)).comp_contDiffWithinAt r (hV r hr) + · intro r hr + have hh := Ioo_subset_Icc_self hr + exact hasDerivAt_angularMultiplierCLM + (F.retardedMomentum_hasDerivAt zX zY (hS hh) (hne r hh)) (hv r hh) w + +lemma PhaseFlowOn.actual_selected_projected_identity {s : Solution} {T b c : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX zY : Phase) + (hS : uIcc b c⊆branchDomain F.flow zX zY T) + (hne : ∀ r∈uIcc b c,(F.flow zX r).1≠(F.flow zY r).1) + (hv : ∀ r∈uIcc b c,(F.flow zX (branchTime F.flow zX zY T r)).2≠0) + (w : ℝ) (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} + (hψ : AbsolutelyContinuousOnInterval ψ b c) : + let χ := fun σ=>selectedDyadicCutoff Q (actualCutoffCoordinates F.flow T zX zY σ) + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + let W := fun σ=>angularMultiplierCLM w (F.flow zX (τ σ)).2 + let W' := fun σ=>angularDerivativeCLM w (F.flow zX (τ σ)).2 + (retardedMomentumForce s F.flow T zX zY σ) + ∫ σ in b..c,(ψ σ*χ σ) • W σ (signedForceKernel (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zY σ)) = + (ψ b*χ b) • W b (retardedPrimitive (r b) (a b) (u b) (n b)) - + (ψ c*χ c) • W c (retardedPrimitive (r c) (a c) (u c) (n c)) + + ∫ σ in b..c,deriv (fun ξ=>ψ ξ*χ ξ) σ • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + (ψ σ*χ σ) • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ)) + + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + obtain ⟨hW,hW',hWd⟩ := F.actual_projector_regular hs zX zY hS hne hv w + exact F.actual_selected_weighted_identity hs zX zY hS hne Q hψ hW hW' hWd + +lemma angularDerivativeCLM_smul_force (w c : ℝ) (v K : Vec) : + angularDerivativeCLM w v (c • K)=c • angularDerivativeCLM w v K := by + apply ContinuousLinearMap.ext + intro h + simp only [smul_apply,angularDerivativeCLM_apply,dot_smul_right, + transverseProjection_smul,dot_smul_left] + module + +lemma moving_projector_measure_identity (w f r : ℝ) (v u n K : Vec) + (hd : 1-dot n u≠0) (hD : 1-dot n (velocity v)≠0) : + (f*(1-dot n (velocity v))) • + angularDerivativeCLM w v (((1-dot n u)/(1-dot n (velocity v))) • K) + (retardedPrimitive r (velocity v) u n) = + (f/r) • angularDerivativeCLM w v K (signedPrimitive (velocity v) u n) := by + rw [angularDerivativeCLM_smul_force,smul_apply,retardedPrimitive,map_smul] + simp only [smul_smul] + congr 1 + field_simp + +lemma time_weight_measure_identity (f r c : ℝ) (a u n : Vec) + (hd : 1-dot n u≠0) (hD : 1-dot n a≠0) : + (f*(1-dot n a)) • ((c*((1-dot n u)/(1-dot n a))) • retardedPrimitive r a u n) = + (f*c/r) • signedPrimitive a u n := by + simp only [retardedPrimitive,smul_smul] + congr 1 + field_simp + +lemma moving_projector_small_kernel {w f r θ φ : ℝ} {v u n K : Vec} + (hf : 0≤f) (hr : 0hs.nonnegative _ hzT _) + convert mul_le_mul' (a:=g z.1) (b:=g z.1) le_rfl hk using 1; ac_rfl + _ = ENNReal.ofReal (3136*θ)* + (∫⁻z : ConeCoordinate,g z.1*ENNReal.ofReal (z.1-z.2.1)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B J) := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + _ ≤ ENNReal.ofReal (3136*θ)*((∫⁻t in J,g t)* + ENNReal.ofReal (49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin))) := mul_le_mul' le_rfl hb + _ = _ := by + have he : 154140672*C*(p*θ)^3*φ^2*B.rmax*(B.rmax-B.rmin)= + (3136*θ)*(49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin)) := by ring + rw [he,ENNReal.ofReal_mul (by positivity : 0≤3136*θ)] + ac_rfl + · have he : physicalBinBase V B J=∅ := by + apply eq_empty_iff_forall_notMem.mpr + intro z hz + exact hwidth (hz.2.2.1.1.trans hz.2.2.1.2) + simp only [physicalBinMeasure,he,Measure.restrict_empty,lintegral_zero_measure] + exact bot_le + +lemma Admissible.projected_primitive_near_constant {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (_F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(X V : ℝ→Vec) (B : ClosedConeBin) (J : Set ℝ) (w p θ φ : ℝ), + Measurable V → MeasurableSet J → J⊆Icc 0 T → + 0(hb s T F hs h0 z.2.1 ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _).2) + + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + + +lemma selected_multiplier_support_congr (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) + {G H G' H' : ℝ→Vec→L[ℝ]Vec} (hG : EqOn G H (tsupport ψ)) + (hG' : EqOn G' H' (tsupport ψ)) : + selectedMultiplierForce s α zX T Q ψ G=selectedMultiplierForce s α zX T Q ψ H ∧ + selectedMultiplierCosts s α zX T Q ψ G G'=selectedMultiplierCosts s α zX T Q ψ H H' := by + constructor <;> funext p + · by_cases ht : labelReceiverTime α zX T p∈tsupport ψ + · simp only [selectedMultiplierForce,hG ht] + · have hz := image_eq_zero_of_notMem_tsupport ht + simp only [selectedMultiplierForce,selectedLabelSignedForce,labelWeight,hz,zero_mul,zero_smul,map_zero] + · by_cases ht : labelReceiverTime α zX T p∈tsupport ψ + · simp only [selectedMultiplierCosts,hG ht,hG' ht] + · have hz := image_eq_zero_of_notMem_tsupport ht + have hdz : deriv ψ (labelReceiverTime α zX T p)=0 := by + by_contra hn + exact ht (support_deriv_subset hn) + simp only [selectedMultiplierCosts,selectedLabelCosts,labelWeight,hz,hdz,zero_mul,zero_smul,map_zero,add_zero] + +lemma selected_initial_support_congr (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (f : Phase→ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) + {G H : ℝ→Vec→L[ℝ]Vec} (hG : EqOn G H (tsupport ψ)) : + selectedInitialKernel α zX T f Q ψ G=selectedInitialKernel α zX T f Q ψ H := by + funext z + by_cases hz : z∈initialPuncturedCone α zX T + · simp only [selectedInitialKernel,indicator_of_mem hz] + by_cases ht : branchTime α zX z T 0∈tsupport ψ + · rw [hG ht] + · simp only [image_eq_zero_of_notMem_tsupport ht,mul_zero,zero_mul,zero_smul] + · simp only [selectedInitialKernel,indicator_of_notMem hz] + +lemma PhaseFlowOn.selected_angular_fubini {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (hw : 0angularMultiplierCLM w (F.flow zX t).2 + let G' := fun t=>angularDerivativeCLM w (F.flow zX t).2 + (lorentzField s.E s.B (t,F.flow zX t)).2 + (∫σ : ℝ,∫z : Phase,selectedMultiplierForce s F.flow zX T Q ψ G (σ,z)) = + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ G z)+ + ∫σ : ℝ,∫z : Phase,selectedMultiplierCosts s F.flow zX T Q ψ G G' (σ,z) := by + dsimp only + obtain ⟨hW,hW',hd⟩ := F.prefixAngular_regular hs hT hw zX + have he := F.selected_multiplier_fubini hs hT zX Q hψ hψb hψT hW hW' hd + have hG : EqOn (prefixAngularMultiplier s F.flow T w hw zX) + (fun t=>angularMultiplierCLM w (F.flow zX t).2) (tsupport ψ) := + fun t ht=>(prefixAngular_highband hw zX (hS ht) (hband t ht)).1 + have hG' : EqOn (prefixAngularRate s F.flow T w hw zX) + (fun t=>angularDerivativeCLM w (F.flow zX t).2 + (lorentzField s.E s.B (t,F.flow zX t)).2) (tsupport ψ) := + fun t ht=>(prefixAngular_highband hw zX (hS ht) (hband t ht)).2 + obtain ⟨eF,eC⟩ := selected_multiplier_support_congr s F.flow zX T Q ψ hG hG' + rw [eF,eC,selected_initial_support_congr F.flow zX T (fun z=>s.f (0,z)) Q ψ hG] at he + exact he + +lemma directionWeight_tsupport {a b ℓ : ℝ} (hℓ : 0<ℓ) (hab : 2*ℓ≤b-a) : + tsupport (directionWeight a b ℓ)⊆Icc a b := by + apply closure_minimal _ isClosed_Icc + intro t ht + by_contra hn + have he : directionWeight a b ℓ t=0 := by + rcases not_and_or.mp hn with ht|ht + all_goals rw [not_le] at ht + · rw [directionWeight,clippedRamp_of_le hℓ ht.le,clippedRamp_of_le hℓ (by linarith),sub_self] + · rw [directionWeight,clippedRamp_of_ge hℓ (by linarith),clippedRamp_of_ge hℓ (by linarith),sub_self] + exact ht he + +lemma continuousOn_angular_force {S : Set ℝ} {V K : ℝ→Vec} + (hV : ContinuousOn V S) (hK : ContinuousOn K S) (hv : ∀t∈S,V t≠0) (w : ℝ) : + ContinuousOn (fun t=>angularMultiplier w (V t) (K t)) S := by + have hG : ContinuousOn (fun t=>angularMultiplierCLM w (V t)) S := by + intro t ht + exact (contDiffAt_angularMultiplierCLM w (hv t ht) (k:=1) (by simp)).continuousAt.comp_continuousWithinAt (hV t ht) + simpa only [angularMultiplierCLM_apply] using hG.clm_apply hK + +lemma exists_weighted_exit_of_modulus {g g' : ℝ→Vec} {a b δ ε : ℝ} + (hab : a≤b) (hδ : 0<δ) (hε : 0<ε) + (hg : ContinuousOn g (Icc a b)) (hg' : ContinuousOn g' (Icc a b)) + (hd : ∀t∈Ioo a b,HasDerivAt g (g' t) t) + (hsmall : ∀s∈Icc a b,∀t∈Icc a b,|t-s|<ε→‖g t-g s‖<δ/4) + (hex : δ≤‖g b-g a‖) : + ∃ℓ : ℝ,0<ℓ ∧ 2*ℓ≤b-a ∧ + (δ/2≤‖∫t in a..b,directionWeight a b ℓ t • g' t‖) ∧ + (∫t in a..b,|deriv (directionWeight a b ℓ) t|)=2 ∧ + tsupport (directionWeight a b ℓ)⊆Icc a b := by + have hlen : ε≤b-a := by + by_contra hn + have hh := hsmall a (left_mem_Icc.mpr hab) b (right_mem_Icc.mpr hab) + (show |b-a|<ε by rw [abs_of_nonneg (sub_nonneg.mpr hab)]; exact lt_of_not_ge hn) + linarith + let ℓ := ε/2 + have hℓ : 0<ℓ := by dsimp [ℓ]; positivity + have hsep : 2*ℓ≤b-a := by dsimp [ℓ]; linarith + have hleft : ∀t∈Icc a (a+ℓ),‖g t-g a‖≤δ/4 := by + intro t ht + exact (hsmall a (left_mem_Icc.mpr hab) t + ⟨ht.1,by dsimp [ℓ] at ht; linarith [ht.2]⟩ + (by rw [abs_of_nonneg (sub_nonneg.mpr ht.1)]; dsimp [ℓ] at ht; linarith [ht.2])).le + have hright : ∀t∈Icc (b-ℓ) b,‖g t-g b‖≤δ/4 := by + intro t ht + exact (hsmall b (right_mem_Icc.mpr hab) t + ⟨by dsimp [ℓ] at ht; linarith [ht.1],ht.2⟩ + (by rw [abs_of_nonpos (sub_nonpos.mpr ht.2)]; dsimp [ℓ] at ht; linarith [ht.1])).le + exact ⟨ℓ,hℓ,hsep,directionWeight_signed_exit hℓ hsep hg hg' hd hleft hright hex, + directionWeight_total_variation hℓ hsep,directionWeight_tsupport hℓ hsep⟩ + +lemma IncrementBootstrap.direction_modulus {V : ℝ→Vec} {T M A P L a b δ : ℝ} + (H : IncrementBootstrap V T M A P L) (k : ℕ) (hk : 16≤(2:ℝ)^k) + (hJ : Icc a b⊆Icc 0 T) + (hband : ∀t∈Icc a b,(2:ℝ)^k/8≤q (V t) ∧ q (V t)≤8*(2:ℝ)^k) + (hM : 0((2:ℝ)^k) • momentumDirection (V t)) hab + (mul_pos hw hδ) hε ((continuousOn_momentumDirection hV hv).const_smul ((2:ℝ)^k)) + (continuousOn_angular_force hV hK hv _) + · intro t ht + convert (hasDerivAt_momentumDirection (hd t ht) (hv t (Ioo_subset_Icc_self ht))).const_smul ((2:ℝ)^k) using 1 <;> + first | rfl | simp only [angularMultiplier,smul_smul,div_eq_mul_inv] + · intro s hs t ht hst + rw [←smul_sub,norm_smul,Real.norm_eq_abs,abs_of_pos hw] + convert mul_lt_mul_of_pos_left (hsmall s hs t ht hst) hw using 1; first | rfl | ring + · rw [←smul_sub,norm_smul,Real.norm_eq_abs,abs_of_pos hw] + exact mul_le_mul_of_nonneg_left hexit hw.le + + + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + + +def physicalMovingProjectorDensity (s : Solution) (X V : ℝ→Vec) + (B : ClosedConeBin) (w : ℝ) (K : ℝ→Vec) (z : ConeCoordinate) : ℝ≥0∞ := + ENNReal.ofReal ((z.1-z.2.1)^2) * + ∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal ‖(s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v))/(z.1-z.2.1)) • + angularDerivativeCLM w (V z.1) (K z.1) (signedPrimitive (velocity (V z.1)) (velocity v) z.2.2.1)‖ + +lemma physicalMovingProjectorDensity_bound {s : Solution} {X V K : ℝ→Vec} + {B : ClosedConeBin} {w θ φ : ℝ} {z : ConeCoordinate} + (hw : 0hs.nonnegative _ hzT _) + rw [ENNReal.ofReal_mul (by positivity : 0≤39936*θ/(w*φ))] at hk + convert hk using 1; ac_rfl + _ = ENNReal.ofReal (39936*θ/(w*φ))* + (∫⁻z : ConeCoordinate,ENNReal.ofReal ‖K z.1‖*ENNReal.ofReal (z.1-z.2.1)*physicalBinDensity s X V B z.1 z.2.1 z.2.2 + ∂physicalBinMeasure V B J) := lintegral_const_mul' _ _ ENNReal.ofReal_ne_top + _ ≤ ENNReal.ofReal (39936*θ/(w*φ))*((∫⁻t in J,ENNReal.ofReal ‖K t‖)* + ENNReal.ofReal (49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin))) := mul_le_mul' le_rfl hb + _ = _ := by + have he : 1962934272*C*(p*θ)^3*φ/w*B.rmax*(B.rmax-B.rmin)= + (39936*θ/(w*φ))*(49152*C*p^3*θ^2*φ^2*B.rmax*(B.rmax-B.rmin)) := by + field_simp; ring + rw [he,ENNReal.ofReal_mul (by positivity : 0≤39936*θ/(w*φ))] + ac_rfl + · have he : physicalBinBase V B J=∅ := by + apply eq_empty_iff_forall_notMem.mpr + intro z hz + exact hwidth (hz.2.2.1.1.trans hz.2.2.1.2) + simp only [physicalBinMeasure,he,Measure.restrict_empty,lintegral_zero_measure] + exact bot_le + +lemma Admissible.moving_projector_near_constant {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ ∀(s : Solution) (T : ℝ) (_F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(X V K : ℝ→Vec) (B : ClosedConeBin) (J : Set ℝ) (w p θ φ : ℝ), + Measurable V → Measurable K → MeasurableSet J → J⊆Icc 0 T → + 0(hb s T F hs h0 z.2.1 ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _).2) + +lemma selected_radial_factor {x h : ℝ} (hx : 0≤x) (hh : 0≤h) + (hsel : x*Real.sqrt h≤1) : x^3*h^2≤Real.sqrt h := by + have hs : 0≤Real.sqrt h := Real.sqrt_nonneg h + have hsq := Real.sq_sqrt hh + calc + x^3*h^2 = (x*Real.sqrt h)^3*Real.sqrt h := by + nth_rw 1 [←hsq] + ring + _ ≤ 1^3*Real.sqrt h := mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (mul_nonneg hx hs) hsel 3) hs + _ = _ := by norm_num + +lemma selected_radial_width {x h r R : ℝ} (hx : 0≤x) (hh : 0≤h) + (hsel : x*Real.sqrt h≤1) (_hR : 0≤R) (hwidth : r≤R) + (hhi : R≤2*h) (hw : R-r≤2*h) : + x^3*R*(R-r)≤4*Real.sqrt h := by + calc + _ = x^3*(R*(R-r)) := by ring + _ ≤ x^3*((2*h)*(2*h)) := mul_le_mul_of_nonneg_left + (mul_le_mul hhi hw (sub_nonneg.mpr hwidth) (by positivity)) (by positivity) + _ = 4*(x^3*h^2) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (selected_radial_factor hx hh hsel) (by norm_num) + +lemma selected_projected_coefficient {C p θ φ h r R : ℝ} + (hC : 0≤C) (hp : 0≤p) (hθ : 0≤θ) (hh : 0≤h) + (hsel : p*θ*Real.sqrt h≤1) (hR : 0≤R) (hwidth : r≤R) + (hhi : R≤2*h) (hw : R-r≤2*h) : + C*(p*θ)^3*φ^2*R*(R-r)≤4*C*Real.sqrt h*φ^2 := by + have h := mul_le_mul_of_nonneg_left (selected_radial_width (mul_nonneg hp hθ) hh hsel hR hwidth hhi hw) + (mul_nonneg hC (sq_nonneg φ)) + convert h using 1 <;> first | rfl | ring + +lemma selected_moving_coefficient {C p θ φ w h r R : ℝ} + (hC : 0≤C) (hp : 0≤p) (hθ : 0≤θ) (hφ : 0≤φ) (hw₀ : 0≤w) (hh : 0≤h) + (hsel : p*θ*Real.sqrt h≤1) (hR : 0≤R) (hwidth : r≤R) + (hhi : R≤2*h) (hw : R-r≤2*h) : + C*(p*θ)^3*φ/w*R*(R-r)≤4*C*Real.sqrt h*φ/w := by + have h := mul_le_mul_of_nonneg_left (selected_radial_width (mul_nonneg hp hθ) hh hsel hR hwidth hhi hw) + (div_nonneg (mul_nonneg hC hφ) hw₀) + convert h using 1 <;> first | rfl | ring + +lemma radial_half_decay (n : ℕ) : Real.sqrt ((1/2:ℝ)^n)≤(3/4:ℝ)^n := by + have hs : Real.sqrt (1/2:ℝ)≤3/4 := (Real.sqrt_le_iff).mpr (by norm_num) + induction n with + | zero => norm_num + | succ n ih => + rw [pow_succ,Real.sqrt_mul (by positivity),pow_succ] + exact mul_le_mul ih hs (Real.sqrt_nonneg _) (by positivity) + +lemma sum_radial_half_decay (N : ℕ) : ∑n∈Finset.range N,Real.sqrt ((1/2:ℝ)^n)≤4 := by + calc + _ ≤ ∑n∈Finset.range N,(3/4:ℝ)^n := Finset.sum_le_sum (fun n _=>radial_half_decay n) + _ ≤ ∑'n : ℕ,(3/4:ℝ)^n := (summable_geometric_of_norm_lt_one (by norm_num : ‖(3/4:ℝ)‖<1)).sum_le_tsum + (Finset.range N) (fun n _=>by positivity) + _ = 4 := by rw [tsum_geometric_of_norm_lt_one (by norm_num : ‖(3/4:ℝ)‖<1)]; norm_num + +lemma sum_angular_half_decay (N : ℕ) : ∑n∈Finset.range N,(1/2:ℝ)^n≤2 := by + calc + _ ≤ ∑'n : ℕ,(1/2:ℝ)^n := (summable_geometric_of_norm_lt_one (by norm_num : ‖(1/2:ℝ)‖<1)).sum_le_tsum + (Finset.range N) (fun n _=>by positivity) + _ = 2 := by rw [tsum_geometric_of_norm_lt_one (by norm_num : ‖(1/2:ℝ)‖<1)]; norm_num + +lemma sum_selected_radial_angular (Nr Nφ : ℕ) : + ∑i∈Finset.range Nr,∑j∈Finset.range Nφ, + Real.sqrt ((1/2:ℝ)^i)*(1/2:ℝ)^j≤8 := by + simp_rw [←Finset.mul_sum] + rw [←Finset.sum_mul] + exact (mul_le_mul (sum_radial_half_decay Nr) (sum_angular_half_decay Nφ) + (Finset.sum_nonneg (fun i _=>by positivity)) (by norm_num)).trans_eq (by norm_num) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedPhaseDomain.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedPhaseDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..814bb1d5166d0dc21514a9b3a2064173b0f26f51 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedPhaseDomain.lean @@ -0,0 +1,710 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Regularity.EnergyBump +import OAI.Analysis.VlasovMaxwell.Flow.WithinFlow + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +def retardedPhaseDomain (t : ℝ) (x : Vec) : Set Phase := + {z | 0 < ‖x-z.1‖ ∧ ‖x-z.1‖ < t} + +def initialConeLabels (t : ℝ) (x : Vec) : Set Phase := {z | ‖x-z.1‖ < t} + +lemma isOpen_retardedPhaseDomain (t : ℝ) (x : Vec) : IsOpen (retardedPhaseDomain t x) := + (isOpen_lt continuous_const ((continuous_const.sub continuous_fst).norm)).inter + (isOpen_lt ((continuous_const.sub continuous_fst).norm) continuous_const) + +lemma retarded_emission_mem {T t : ℝ} {x : Vec} {z : Phase} (ht : t ≤ T) + (hz : z ∈ retardedPhaseDomain t x) : t-‖x-z.1‖ ∈ Ioo 0 T := by + constructor <;> linarith [hz.1,hz.2] + +lemma PhaseFlowOn.retarded_injective {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (ht : t ≤ T) (x : Vec) : + InjOn (retardedLabel F.flow t x) (retardedPhaseDomain t x) := by + intro a ha b hb hab + have hsa := (retarded_emission_mem ht ha) + have hsb := (retarded_emission_mem ht hb) + let z := retardedLabel F.flow t x a + have hfa : F.flow z (t-‖x-a.1‖) = a := F.flow_inversePhase (Ioo_subset_Icc_self hsa) a + have hfb : F.flow z (t-‖x-b.1‖) = b := by + change F.flow (retardedLabel F.flow t x a) (t-‖x-b.1‖)=b + rw [hab] + exact F.flow_inversePhase (Ioo_subset_Icc_self hsb) b + have he : t-‖x-a.1‖=t-‖x-b.1‖ := by + apply (F.emission_strictMono hT z x).injOn (Ioo_subset_Icc_self hsa) (Ioo_subset_Icc_self hsb) + dsimp only + rw [hfa,hfb] + ring + rw [← hfa,← hfb,he] + +lemma PhaseFlowOn.exists_emission {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) {z : Phase} (hz : z ∈ initialConeLabels t x) : + ∃! s : ℝ, s ∈ Icc 0 t ∧ s+‖x-(F.flow z s).1‖=t := by + have hsub : Icc 0 t ⊆ Icc 0 T := fun _ hs => ⟨hs.1,hs.2.trans ht.2⟩ + have hc : ContinuousOn (fun s => s+‖x-(F.flow z s).1‖) (Icc 0 t) := + continuousOn_id.add ((continuousOn_const.sub ((F.continuousOn_time z).mono hsub).fst).norm) + have hzero : 0+‖x-(F.flow z 0).1‖ < t := by simpa only [F.initial,zero_add,initialConeLabels,mem_ofPred_eq] using hz + have hend : t ≤ t+‖x-(F.flow z t).1‖ := le_add_of_nonneg_right (norm_nonneg _) + obtain ⟨s,hs,he⟩ := intermediate_value_Icc ht.1 hc ⟨hzero.le,hend⟩ + refine ⟨s,⟨hs,he⟩,?_⟩ + intro r hr + apply (F.emission_strictMono (ht.1.trans ht.2) z x).injOn (hsub hr.1) (hsub hs) + exact hr.2.trans he.symm + +lemma PhaseFlowOn.retarded_image {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) : + retardedLabel F.flow t x '' retardedPhaseDomain t x = + initialConeLabels t x \ {z : Phase | (F.flow z t).1=x} := by + ext z + constructor + · rintro ⟨a,ha,rfl⟩ + let z := retardedLabel F.flow t x a + let s := t-‖x-a.1‖ + have hs : s ∈ Ioo 0 T := retarded_emission_mem ht.2 ha + have hst : s < t := by dsimp [s]; linarith [ha.1] + have hf : F.flow z s=a := F.flow_inversePhase (Ioo_subset_Icc_self hs) a + have he : s+‖x-(F.flow z s).1‖=t := by rw [hf]; dsimp [s]; ring + have hm := F.emission_strictMono (ht.1.trans ht.2) z x + constructor + · have hh := hm ⟨le_rfl,ht.1.trans ht.2⟩ (Ioo_subset_Icc_self hs) hs.1 + dsimp only at hh + rw [F.initial,zero_add,he] at hh + exact hh + · intro htip + have hh := hm (Ioo_subset_Icc_self hs) ht hst + dsimp only at hh + change (F.flow z t).1=x at htip + rw [he,htip,sub_self,norm_zero,add_zero] at hh + exact (lt_irrefl t) hh + · rintro ⟨hz,hnot⟩ + obtain ⟨s,⟨hs,he⟩,_⟩ := F.exists_emission ht x hz + have hs₀ : 0 < s := by + by_contra h + have hs' : s=0 := le_antisymm (le_of_not_gt h) hs.1 + rw [hs',F.initial,zero_add] at he + exact (ne_of_lt hz) he + have hst : s < t := by + by_contra h + have hs' : s=t := le_antisymm hs.2 (le_of_not_gt h) + have hn : ‖x-(F.flow z t).1‖=0 := by rw [hs'] at he; linarith + exact hnot (sub_eq_zero.mp (norm_eq_zero.mp hn)).symm + have hsT : s ∈ Icc 0 T := ⟨hs.1,hs.2.trans ht.2⟩ + have htime : t-‖x-(F.flow z s).1‖=s := by linarith + refine ⟨F.flow z s,⟨?_,?_⟩,?_⟩ + · linarith + · linarith + · change inversePhase F.flow (t-‖x-(F.flow z s).1‖,F.flow z s)=z + rw [htime] + exact F.inversePhase_flow hsT z + +def VlasovOn (f : Particle) (E B : Field) (T : ℝ) : Prop := + ∀ t ∈ Ioo 0 T, ∀ x v, + deriv (fun r => f (r,x,v)) t + + (∑ i : Fin 3, velocity v i * spatialPartial (fun y => f (t,y,v)) x i) + + (∑ i : Fin 3, (E (t,x)+cross (velocity v) (B (t,x))) i * + spatialPartial (fun w => f (t,x,w)) v i) = 0 + +lemma PhaseFlowOn.transport {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) {t : ℝ} (ht : t ∈ Icc 0 T) (z : Phase) : + f (t,F.flow z t) = f (0,z) := by + rcases ht.1.eq_or_lt with h | h + · simp only [← h,F.initial] + have hsub : Icc 0 t ⊆ Icc 0 T := fun _ hs => ⟨hs.1,hs.2.trans ht.2⟩ + have hc : ContinuousOn (fun s => f (s,F.flow z s)) (Icc 0 t) := + hf.continuousOn.comp (continuousOn_id.prodMk ((F.continuousOn_time z).mono hsub)) + (fun _ hs => ⟨hsub hs,mem_univ _⟩) + have hd : ∀ s ∈ Ioo 0 t, HasDerivAt (fun r => f (r,F.flow z r)) (0 : ℝ) s := by + intro s hs + have hsT : s ∈ Ioo 0 T := ⟨hs.1,hs.2.trans_le ht.2⟩ + have hdiff : DifferentiableAt ℝ f (s,F.flow z s) := + ((hf (s,F.flow z s) ⟨Ioo_subset_Icc_self hsT,mem_univ _⟩).contDiffAt + (prod_mem_nhds (Icc_mem_nhds hsT.1 hsT.2) univ_mem)).differentiableAt (by simp) + have hode := (F.ode z s (Ioo_subset_Icc_self hsT)).hasDerivAt (Icc_mem_nhds hsT.1 hsT.2) + have hh := hasDerivAt_particle_along_curve (X := fun r => (F.flow z r).1) + (V := fun r => (F.flow z r).2) hdiff hode.fst hode.snd + simpa only [lorentzField,lorentzPhase,heq s hsT] using hh + obtain ⟨r,_,he⟩ := exists_hasDerivAt_eq_slope (fun s => f (s,F.flow z s)) (fun _ => 0) h hc hd + have hnum : f (t,F.flow z t)-f (0,F.flow z 0)=0 := + (div_eq_zero_iff.mp he.symm).resolve_right (sub_ne_zero.mpr (ne_of_gt h)) + simpa only [F.initial] using sub_eq_zero.mp hnum + +lemma PhaseFlowOn.transport_inverse {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) {t : ℝ} (ht : t ∈ Icc 0 T) (z : Phase) : + f (t,z) = f (0,inversePhase F.flow (t,z)) := by + have hh := F.transport hf heq ht (inversePhase F.flow (t,z)) + simpa only [F.flow_inversePhase ht] using hh + +lemma PhaseFlowOn.transport_nonneg {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) (hzero : ∀ z, 0 ≤ f (0,z)) + {t : ℝ} (ht : t ∈ Icc 0 T) (z : Phase) : 0 ≤ f (t,z) := by + rw [F.transport_inverse hf heq ht z] + exact hzero _ + +lemma PhaseFlowOn.transport_integral {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) {t : ℝ} (ht : t ∈ Icc 0 T) : + ∫ z, f (t,z) = ∫ z, f (0,z) := by + rw [← F.integral_comp ht (fun z => f (t,z))] + exact integral_congr_ae (Filter.Eventually.of_forall (F.transport hf heq ht)) +end RVM +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.retarded_integral {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + (g : Phase → G) : + ∫ z in initialConeLabels t x, g z = + ∫ a in retardedPhaseDomain t x, + (1-dot (‖x-a.1‖⁻¹ • (x-a.1)) (velocity a.2)) • g (retardedLabel F.flow t x a) := by + have hx (a : Phase) (ha : a ∈ retardedPhaseDomain t x) : x ≠ a.1 := + sub_ne_zero.mp (norm_ne_zero_iff.mp (ne_of_gt ha.1)) + have hd : ∀ a ∈ retardedPhaseDomain t x, + HasFDerivWithinAt (retardedLabel F.flow t x) + (fderiv ℝ (retardedLabel F.flow t x) a) (retardedPhaseDomain t x) a := by + intro a ha + obtain ⟨D,_,hD⟩ := F.retarded_differential x a (retarded_emission_mem ht.2 ha) (hx a ha) + exact hD.hasFDerivAt.differentiableAt.hasFDerivAt.hasFDerivWithinAt + calc + _ = ∫ z in retardedLabel F.flow t x '' retardedPhaseDomain t x, g z := by + apply setIntegral_congr_set + rw [F.retarded_image ht x] + exact (sdiff_null_ae_eq_self (F.tip_null ht x)).symm + _ = ∫ a in retardedPhaseDomain t x, + |(fderiv ℝ (retardedLabel F.flow t x) a).det| • g (retardedLabel F.flow t x a) := + integral_image_eq_integral_abs_det_fderiv_smul volume (isOpen_retardedPhaseDomain t x).measurableSet + hd (F.retarded_injective (ht.1.trans ht.2) ht.2 x) g + _ = _ := by + apply setIntegral_congr_fun (isOpen_retardedPhaseDomain t x).measurableSet + intro a ha + dsimp only + rw [F.retarded_jacobian x a (retarded_emission_mem ht.2 ha) (hx a ha), + abs_of_pos (cone_deficit_positive (hx a ha) a.2)] + +def PhaseFlowOn.retardedSource {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) (z : Phase) : Phase := by + classical + exact if hz : z ∈ initialConeLabels t x then F.flow z (F.exists_emission ht x hz).choose else z + +lemma PhaseFlowOn.retardedSource_label {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) {a : Phase} (ha : a ∈ retardedPhaseDomain t x) : + F.retardedSource ht x (retardedLabel F.flow t x a)=a := by + classical + let z := retardedLabel F.flow t x a + have hz : z ∈ initialConeLabels t x := by + have hi := F.retarded_image ht x + have hh : z ∈ retardedLabel F.flow t x '' retardedPhaseDomain t x := ⟨a,ha,rfl⟩ + rw [hi] at hh + exact hh.1 + have hs : t-‖x-a.1‖ ∈ Icc 0 t := ⟨by linarith [ha.2],by linarith [norm_nonneg (x-a.1)]⟩ + have hf : F.flow z (t-‖x-a.1‖)=a := + F.flow_inversePhase ⟨hs.1,hs.2.trans ht.2⟩ a + have he := (F.exists_emission ht x hz).choose_spec.2 (t-‖x-a.1‖) ⟨hs,by rw [hf]; ring⟩ + change F.retardedSource ht x z=a + rw [PhaseFlowOn.retardedSource,dite_eq_left hz,← he,hf] + +lemma PhaseFlowOn.retarded_integral_inverse {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + (ht : t ∈ Icc 0 T) (x : Vec) {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] + (g : Phase → G) : + ∫ a in retardedPhaseDomain t x, g a = + ∫ z in initialConeLabels t x, + (1-dot (‖x-(F.retardedSource ht x z).1‖⁻¹ • (x-(F.retardedSource ht x z).1)) + (velocity (F.retardedSource ht x z).2))⁻¹ • g (F.retardedSource ht x z) := by + rw [F.retarded_integral ht x] + apply setIntegral_congr_fun (isOpen_retardedPhaseDomain t x).measurableSet + intro a ha + dsimp only + rw [F.retardedSource_label ht x ha,smul_smul,mul_inv_cancel₀,one_smul] + exact ne_of_gt (cone_deficit_positive (sub_ne_zero.mp (norm_ne_zero_iff.mp (ne_of_gt ha.1))) a.2) + +lemma PhaseFlowOn.retarded_transport_integral {E B : Field} {T t : ℝ} (F : PhaseFlowOn E B T) + {f : Particle} (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) + (heq : VlasovOn f E B T) (ht : t ∈ Icc 0 T) (x : Vec) + {G : Type*} [NormedAddCommGroup G] [NormedSpace ℝ G] (K : Phase → G) : + ∫ a in retardedPhaseDomain t x, f (t-‖x-a.1‖,a) • K a = + ∫ z in initialConeLabels t x, + (1-dot (‖x-(F.retardedSource ht x z).1‖⁻¹ • (x-(F.retardedSource ht x z).1)) + (velocity (F.retardedSource ht x z).2))⁻¹ • (f (0,z) • K (F.retardedSource ht x z)) := by + rw [F.retarded_integral ht x] + apply setIntegral_congr_fun (isOpen_retardedPhaseDomain t x).measurableSet + intro a ha + dsimp only + rw [F.retardedSource_label ht x ha,← mul_smul,mul_inv_cancel₀,one_smul] + · congr 1 + exact F.transport_inverse hf heq (Ioo_subset_Icc_self (retarded_emission_mem ht.2 ha)) a + · exact ne_of_gt (cone_deficit_positive (sub_ne_zero.mp (norm_ne_zero_iff.mp (ne_of_gt ha.1))) a.2) + +structure EnergyPrefix (s : Solution) (T : ℝ) : Prop where + f_smooth : ContDiffOn ℝ 1 s.f (Icc 0 T ×ˢ (univ : Set Phase)) + E_smooth : ContDiffOn ℝ 1 s.E (Icc 0 T ×ˢ (univ : Set Vec)) + B_smooth : ContDiffOn ℝ 1 s.B (Icc 0 T ×ˢ (univ : Set Vec)) + nonnegative : ∀ t ∈ Icc 0 T, ∀ z, 0 ≤ s.f (t,z) + E_L2 : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 T) ∧ + ∀ t ∈ Icc 0 T, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => s.E (t,x)) + B_L2 : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 T) ∧ + ∀ t ∈ Icc 0 T, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => s.B (t,x)) + compact : ∃ K : Set Phase, IsCompact K ∧ ∀ t ∈ Icc 0 T, tsupport (fun z => s.f (t,z)) ⊆ K + vlasov : VlasovOn s.f s.E s.B T + maxwell : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => s.E (r,x)) t - curl (fun y => s.B (t,y)) x = -current (fun z => s.f (t,z)) x ∧ + deriv (fun r => s.B (r,x)) t + curl (fun y => s.E (t,y)) x = 0 + +namespace EnergyPrefix +variable {s : Solution} {T : ℝ} + +lemma differentiable_particle (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (z : Phase) : + DifferentiableAt ℝ s.f (t,z) := + (hs.f_smooth.contDiffAt (prod_mem_nhds (Icc_mem_nhds ht.1 ht.2) univ_mem)).differentiableAt (by simp) + +lemma differentiable_field {F : Field} (hF : ContDiffOn ℝ 1 F (Icc 0 T ×ˢ (univ : Set Vec))) + {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : DifferentiableAt ℝ F (t,x) := + (hF.contDiffAt (prod_mem_nhds (Icc_mem_nhds ht.1 ht.2) univ_mem)).differentiableAt (by simp) + +lemma local_data (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : + ∃ (U : Set (ℝ × Vec)) (K : Set Vec), IsOpen U ∧ IsCompact K ∧ (t,x) ∈ U ∧ + ContDiffOn ℝ 1 (particleBySpacetime s.f) (U ×ˢ univ) ∧ + ∀ p ∈ U, ∀ v ∉ K, particleBySpacetime s.f (p,v)=0 := by + obtain ⟨K,hK,hzero⟩ := hs.compact + let U : Set (ℝ × Vec) := {p | p.1 ∈ Ioo 0 T} + refine ⟨U,Prod.snd '' K,isOpen_Ioo.preimage continuous_fst,hK.image continuous_snd,ht,?_,?_⟩ + · exact hs.f_smooth.comp contDiff_reassociate.contDiffOn + (fun p hp => ⟨Ioo_subset_Icc_self hp.1,mem_univ _⟩) + · intro p hp v hv + by_contra hn + have hh : (p.2,v) ∈ tsupport (fun z => s.f (p.1,z)) := subset_tsupport _ hn + exact hv ⟨(p.2,v),hzero p.1 (Ioo_subset_Icc_self hp) hh,rfl⟩ + +lemma spacetime_vlasov (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x v : Vec) : + fderiv ℝ (particleBySpacetime s.f) ((t,x),v) + ((1,velocity v),s.E (t,x)+cross (velocity v) (s.B (t,x)))=0 := by + rw [fderiv_particleBySpacetime (hs.differentiable_particle ht (x,v)), + full_directional_derivative (hs.differentiable_particle ht (x,v))] + exact hs.vlasov t ht x v + +lemma particle_energy_balance (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : + fderiv ℝ (fun p : ℝ × Vec => ∫ v : Vec, q v * s.f (p.1,p.2,v)) (t,x) (1,0) + + ∑ i : Fin 3, fderiv ℝ (fun p : ℝ × Vec => ∫ v : Vec, v i * s.f (p.1,p.2,v)) + (t,x) (0,basis i) = dot (s.E (t,x)) (current (fun z => s.f (t,z)) x) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + hs.local_data ht x + exact particle_energy_balance_param (s.E (t,x)) (s.B (t,x)) hU hK hp hF hzero + (hs.spacetime_vlasov ht x) + +lemma particle_energy_flux_regular (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : + ContDiffAt ℝ 1 (particleEnergy s) (t,x) ∧ ContDiffAt ℝ 1 (particleFlux s) (t,x) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + hs.local_data ht x + constructor + · apply (contDiffOn_integral_uniform_support (n := 1) hU hK + ((contDiff_q.comp contDiff_snd).contDiffOn.mul hF) + (fun p hp v hv => by simp only [hzero p hp v hv, mul_zero])).contDiffAt (hU.mem_nhds hp) + · apply (contDiffOn_integral_uniform_support (n := 1) hU hK + (hF.smul contDiff_snd.contDiffOn) + (fun p hp v hv => by + change particleBySpacetime s.f (p,v) • v = 0 + rw [hzero p hp v hv, zero_smul])).contDiffAt (hU.mem_nhds hp) + +lemma particleFlux_component (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) (i : Fin 3) : + particleFlux s (t,x) i = ∫ v : Vec, v i * s.f (t,x,v) := by + obtain ⟨U,K,hU,hK,hp,hF,hzero⟩ := + hs.local_data ht x + exact param_moment_component hK hp hF.continuousOn hzero i + +lemma particle_energy_local (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : + deriv (fun r => particleEnergy s (r,x)) t + + divergence (fun y => particleFlux s (t,y)) x = + dot (s.E (t,x)) (current (fun z => s.f (t,z)) x) := by + obtain ⟨henergy,hflux⟩ := particle_energy_flux_regular hs ht x + rw [deriv_time_slice (henergy.differentiableAt (by simp))] + apply Eq.trans _ (particle_energy_balance hs ht x) + congr 1 + apply Finset.sum_congr rfl + intro i _ + have hcomp : DifferentiableAt ℝ (fun p => particleFlux s p i) (t,x) := + (PiLp.proj 2 (𝕜 := ℝ) (fun _ : Fin 3 => ℝ) i).differentiableAt.comp (t,x) + (hflux.differentiableAt (by simp)) + rw [spatialPartial_time_slice hcomp] + have he : (fun p : ℝ × Vec => particleFlux s p i) =ᶠ[𝓝 (t,x)] + (fun p => ∫ v : Vec, v i * s.f (p.1,p.2,v)) := by + filter_upwards [(isOpen_Ioo.preimage continuous_fst).mem_nhds ht] with p hp + exact particleFlux_component hs hp p.2 i + rw [he.fderiv_eq (𝕜 := ℝ)] + +lemma local_energy_conservation (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Ioo 0 T) (x : Vec) : + deriv (fun r => totalEnergy s (r,x)) t + + divergence (fun y => totalFlux s (t,y)) x = 0 := by + have hE := differentiable_field hs.E_smooth ht x + have hB := differentiable_field hs.B_smooth ht x + obtain ⟨henergy,hflux⟩ := particle_energy_flux_regular hs ht x + obtain ⟨he,hb⟩ := hs.maxwell t ht x + have hm := maxwell_energy_balance hE hB he hb + have hp := particle_energy_local hs ht x + have heT : DifferentiableAt ℝ (fun r => s.E (r,x)) t := + hE.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hbT : DifferentiableAt ℝ (fun r => s.B (r,x)) t := + hB.comp t (differentiableAt_id.prodMk (differentiableAt_const x)) + have hfluxX : DifferentiableAt ℝ (fun y => particleFlux s (t,y)) x := + (hflux.differentiableAt (by simp)).comp x + ((differentiableAt_const t).prodMk differentiableAt_id) + have hcrossX : DifferentiableAt ℝ (fun y => cross (s.E (t,y)) (s.B (t,y))) x := + (contDiff_cross (k := 1)).differentiable (by simp) _ |>.comp x + ((hE.comp x ((differentiableAt_const t).prodMk differentiableAt_id)).prodMk + (hB.comp x ((differentiableAt_const t).prodMk differentiableAt_id))) + change deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2 + particleEnergy s (r,x)) t + + divergence (fun y => cross (s.E (t,y)) (s.B (t,y)) + particleFlux s (t,y)) x = 0 + have hpT : DifferentiableAt ℝ (fun r => particleEnergy s (r,x)) t := + DifferentiableAt.comp t (f := fun r : ℝ => (r,x)) (g := particleEnergy s) + (henergy.differentiableAt (by simp)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hfT : DifferentiableAt ℝ (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2) t := + ((heT.norm_sq (𝕜 := ℝ)).add (hbT.norm_sq (𝕜 := ℝ))).div_const 2 + have hd := deriv_add hfT hpT + change deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2 + particleEnergy s (r,x)) t = + deriv (fun r => (‖s.E (r,x)‖^2 + ‖s.B (r,x)‖^2)/2) t + + deriv (fun r => particleEnergy s (r,x)) t at hd + rw [hd, divergence_add hcrossX hfluxX] + linarith + +lemma velocity_slice (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) : + ContDiff ℝ 1 (fun v : Vec => s.f (t,x,v)) ∧ + HasCompactSupport (fun v : Vec => s.f (t,x,v)) := by + constructor + · apply contDiffOn_univ.mp + exact hs.f_smooth.comp (contDiff_const.prodMk (contDiff_const.prodMk contDiff_id)).contDiffOn + (fun _ _ => ⟨ht,mem_univ _⟩) + · obtain ⟨K,hK,hzero⟩ := hs.compact + apply compactSupport_of_zero_off (hK.image continuous_snd) + intro v hv + by_contra hn + exact hv ⟨(x,v),hzero t ht (subset_tsupport _ hn),rfl⟩ + +lemma particle_energy_nonneg (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) : + 0 ≤ particleEnergy s (t,x) := by + apply integral_nonneg + intro v + exact mul_nonneg (q_pos v).le (hs.nonnegative t ht (x,v)) + +lemma particle_flux_bound (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) : + ‖particleFlux s (t,x)‖ ≤ particleEnergy s (t,x) := by + obtain ⟨hf,hc⟩ := velocity_slice hs ht x + have hi : Integrable (fun v : Vec => s.f (t,x,v) • v) := + (hf.continuous.smul continuous_id).integrable_of_hasCompactSupport hc.smul_right + have hqi : Integrable (fun v : Vec => q v * s.f (t,x,v)) := + ((contDiff_q (k := 1)).continuous.mul hf.continuous).integrable_of_hasCompactSupport hc.mul_left + calc + _ ≤ ∫ v : Vec, ‖s.f (t,x,v) • v‖ := norm_integral_le_integral_norm _ + _ ≤ _ := by + apply integral_mono hi.norm hqi + intro v + have hp := hs.nonnegative t ht (x,v) + simp only [norm_smul, Real.norm_eq_abs, abs_of_nonneg hp] + nlinarith [norm_lt_q v] + +lemma total_energy_nonneg (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) : + 0 ≤ totalEnergy s (t,x) := by + dsimp [totalEnergy] + have hp := particle_energy_nonneg hs ht x + positivity + +lemma total_flux_bound (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) (x : Vec) : + ‖totalFlux s (t,x)‖ ≤ totalEnergy s (t,x) := by + exact (norm_add_le _ _).trans + (add_le_add (poynting_norm_le_energy (s.E (t,x)) (s.B (t,x))) + (particle_flux_bound hs ht x)) + +lemma prefix_memLp {F : Field} (hF : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 T) ∧ + ∀ t ∈ Icc 0 T, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t,x))) + {t : ℝ} (ht : t ∈ Icc 0 T) : MemLp (fun x => F (t,x)) 2 volume := by + obtain ⟨F₂,hc,heq⟩ := hF + exact (Lp.memLp (F₂ t)).ae_eq (heq t ht) + +lemma prefix_integrable_norm_sq {F : Field} (hF : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 T) ∧ + ∀ t ∈ Icc 0 T, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t,x))) + {t : ℝ} (ht : t ∈ Icc 0 T) : Integrable (fun x => ‖F (t,x)‖^2) := by + have hm := prefix_memLp hF ht + exact (memLp_two_iff_integrable_sq_norm hm.aestronglyMeasurable).mp hm + +lemma prefix_continuous_integral_norm_sq {F : Field} (hF : ∃ F₂ : ℝ → Lp Vec 2 (volume : Measure Vec), ContinuousOn F₂ (Icc 0 T) ∧ + ∀ t ∈ Icc 0 T, (F₂ t : Vec → Vec) =ᵐ[volume] (fun x => F (t,x))) : + ContinuousOn (fun t => ∫ x : Vec, ‖F (t,x)‖^2) (Icc 0 T) := by + obtain ⟨F₂,hc,heq⟩ := hF + have hh : ∀ t ∈ Icc (0:ℝ) T, (∫ x : Vec, ‖F (t,x)‖^2) = ‖F₂ t‖^2 := by + intro t ht + rw [← real_inner_self_eq_norm_sq, L2.inner_def] + apply integral_congr_ae + filter_upwards [heq t ht] with x hx + rw [hx, real_inner_self_eq_norm_sq] + exact (hc.norm.pow 2).congr (fun t ht => hh t ht) + +lemma particle_energy_continuous_slab (hs : EnergyPrefix s T) : + ContinuousOn (particleEnergy s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + obtain ⟨K,hK,hzero⟩ := hs.compact + change ContinuousOn (fun p : ℝ × Vec => ∫ v : Vec, q v * s.f (p.1,p.2,v)) _ + apply continuousOn_integral_uniform_support (F := fun z : (ℝ × Vec) × Vec => q z.2 * s.f (z.1.1,z.1.2,z.2)) (hK.image continuous_snd) + · apply ((contDiff_q (k := 1)).continuous.comp continuous_snd).continuousOn.mul + apply hs.f_smooth.continuousOn.comp (contDiff_reassociate (k := 1)).continuous.continuousOn + intro z hz + exact ⟨hz.1.1,mem_univ _⟩ + · intro p hp v hv + have hf : s.f (p.1,p.2,v) = 0 := by + by_contra hn + exact hv ⟨(p.2,v),hzero p.1 hp.1 (subset_tsupport _ hn),rfl⟩ + simp only [hf,mul_zero] + +lemma particle_energy_compact (hs : EnergyPrefix s T) : + ∃ K : Set Vec, IsCompact K ∧ ∀ t ∈ Icc 0 T, ∀ x ∉ K, particleEnergy s (t,x) = 0 := by + obtain ⟨K,hK,hzero⟩ := hs.compact + refine ⟨Prod.fst '' K,hK.image continuous_fst,?_⟩ + intro t ht x hx + apply integral_eq_zero_of_ae + filter_upwards [] with v + have hf : s.f (t,x,v) = 0 := by + by_contra hn + exact hx ⟨(x,v),hzero t ht (subset_tsupport _ hn),rfl⟩ + simp only [hf,mul_zero, Pi.zero_apply] + +lemma particle_energy_integrable (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) : + Integrable (fun x : Vec => particleEnergy s (t,x)) := by + obtain ⟨K,hK,hz⟩ := particle_energy_compact hs + have hc := (particle_energy_continuous_slab hs).comp_continuous + (continuous_const.prodMk continuous_id) + (fun x : Vec => show (t,x) ∈ Icc 0 T ×ˢ (univ : Set Vec) from ⟨ht,mem_univ _⟩) + exact hc.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK (hz t ht)) + +lemma total_energy_integrable (hs : EnergyPrefix s T) {t : ℝ} (ht : t ∈ Icc 0 T) : + Integrable (fun x : Vec => totalEnergy s (t,x)) := by + exact ((prefix_integrable_norm_sq hs.E_L2 ht).add + (prefix_integrable_norm_sq hs.B_L2 ht)).div_const 2 |>.add + (particle_energy_integrable hs ht) + +lemma integrated_energy_continuous (hs : EnergyPrefix s T) : + ContinuousOn (fun t => ∫ x : Vec, totalEnergy s (t,x)) (Icc 0 T) := by + obtain ⟨K,hK,hz⟩ := particle_energy_compact hs + have hp : ContinuousOn (fun t => ∫ x : Vec, particleEnergy s (t,x)) (Icc 0 T) := + continuousOn_integral_uniform_support hK + (particle_energy_continuous_slab hs) hz + have he := prefix_continuous_integral_norm_sq hs.E_L2 + have hb := prefix_continuous_integral_norm_sq hs.B_L2 + apply ((he.add hb).div_const 2 |>.add hp).congr + intro t ht + change (∫ x : Vec, (‖s.E (t,x)‖^2+‖s.B (t,x)‖^2)/2+particleEnergy s (t,x)) = + ((∫ x : Vec, ‖s.E (t,x)‖^2)+(∫ x : Vec, ‖s.B (t,x)‖^2))/2+ + (∫ x : Vec, particleEnergy s (t,x)) + calc + _ = (∫ x : Vec, (‖s.E (t,x)‖^2+‖s.B (t,x)‖^2)/2)+ + (∫ x : Vec, particleEnergy s (t,x)) := + integral_add (((prefix_integrable_norm_sq hs.E_L2 ht).add + (prefix_integrable_norm_sq hs.B_L2 ht)).div_const 2) + (particle_energy_integrable hs ht) + _ = _ := by + rw [integral_div, integral_add (prefix_integrable_norm_sq hs.E_L2 ht) + (prefix_integrable_norm_sq hs.B_L2 ht)] + +lemma total_energy_regular (hs : EnergyPrefix s T) : ContDiffOn ℝ 1 (totalEnergy s) (Ioo 0 T ×ˢ (univ : Set Vec)) := by + have hE := hs.E_smooth.mono (Set.prod_mono Ioo_subset_Icc_self Subset.rfl) + have hB := hs.B_smooth.mono (Set.prod_mono Ioo_subset_Icc_self Subset.rfl) + have hp : ContDiffOn ℝ 1 (particleEnergy s) (Ioo 0 T ×ˢ (univ : Set Vec)) := by + intro p hp + exact (particle_energy_flux_regular hs hp.1 p.2).1.contDiffWithinAt + exact ((hE.norm_sq ℝ).add (hB.norm_sq ℝ)).div_const 2 |>.add hp + +lemma total_flux_regular (hs : EnergyPrefix s T) : ContDiffOn ℝ 1 (totalFlux s) (Ioo 0 T ×ˢ (univ : Set Vec)) := by + have hE := hs.E_smooth.mono (Set.prod_mono Ioo_subset_Icc_self Subset.rfl) + have hB := hs.B_smooth.mono (Set.prod_mono Ioo_subset_Icc_self Subset.rfl) + have hp : ContDiffOn ℝ 1 (particleFlux s) (Ioo 0 T ×ˢ (univ : Set Vec)) := by + intro p hp + exact (particle_energy_flux_regular hs hp.1 p.2).2.contDiffWithinAt + exact ((contDiff_cross (k := 1)).contDiffOn.comp (hE.prodMk hB) + (fun _ _ => mem_univ _)).add hp + +lemma deriv_weighted_energy (hs : EnergyPrefix s T) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {t : ℝ} (ht : t ∈ Ioo 0 T) : + HasDerivAt (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) + (∫ x : Vec, fderiv ℝ g x (totalFlux s (t,x))) t := by + have hE := total_energy_regular hs + have hF : ContDiffOn ℝ 1 (fun p : ℝ × Vec => g p.2 * totalEnergy s p) + (Ioo 0 T ×ˢ (univ : Set Vec)) := (hg.comp contDiff_snd).contDiffOn.mul hE + have hz : ∀ r ∈ Ioo (0:ℝ) T, ∀ x ∉ tsupport g, g x * totalEnergy s (r,x) = 0 := by + intro r _ x hx + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + have hd := hasFDerivAt_integral_uniform_support isOpen_Ioo hc ht hF hz + have hi := fderiv_integral_uniform_support_apply isOpen_Ioo hc ht hF hz (1:ℝ) + have heq : ∀ x : Vec, + fderiv ℝ (fun p : ℝ × Vec => g p.2 * totalEnergy s p) (t,x) (1,0) = + -g x * divergence (fun y => totalFlux s (t,y)) x := by + intro x + have he := hE.contDiffAt (x := (t,x)) (IsOpen.mem_nhds (isOpen_Ioo.prod isOpen_univ) ⟨ht,mem_univ x⟩) + have heT : DifferentiableAt ℝ (fun r => totalEnergy s (r,x)) t := + DifferentiableAt.comp t (f := fun r : ℝ => (r,x)) (g := totalEnergy s) + (he.differentiableAt (by simp)) + (differentiableAt_id.prodMk (differentiableAt_const x)) + have hgT : HasDerivAt (fun r => g x * totalEnergy s (r,x)) + (g x * deriv (fun r => totalEnergy s (r,x)) t) t := + heT.hasDerivAt.const_mul (g x) + have hf := hF.contDiffAt (x := (t,x)) (IsOpen.mem_nhds (isOpen_Ioo.prod isOpen_univ) ⟨ht,mem_univ x⟩) + rw [← deriv_time_slice (hf.differentiableAt (by simp)), hgT.deriv] + have hl := local_energy_conservation hs ht x + rw [show deriv (fun r => totalEnergy s (r,x)) t = + -divergence (fun y => totalFlux s (t,y)) x by linarith] + ring + have hS : ContDiff ℝ 1 (fun x => totalFlux s (t,x)) := by + apply contDiffOn_univ.mp + exact (total_flux_regular hs).comp + (contDiff_const.prodMk contDiff_id).contDiffOn + (fun x _ => ⟨ht,mem_univ x⟩) + have hh : deriv (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t = + ∫ x : Vec, fderiv ℝ g x (totalFlux s (t,x)) := by + change fderiv ℝ (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t 1 = _ + rw [hi] + simp only [heq, neg_mul, integral_neg] + rw [integral_mul_divergence hS hg hc, neg_neg] + exact hh ▸ hd.differentiableAt.hasDerivAt + +lemma total_energy_continuous_slab (hs : EnergyPrefix s T) : + ContinuousOn (totalEnergy s) (Icc 0 T ×ˢ (univ : Set Vec)) := by + exact ((hs.E_smooth.continuousOn.norm.pow 2).add + (hs.B_smooth.continuousOn.norm.pow 2)).div_const 2 |>.add + (particle_energy_continuous_slab hs) + +lemma weighted_energy_continuous (hs : EnergyPrefix s T) {g : Vec → ℝ} (hg : Continuous g) (hc : HasCompactSupport g) + : + ContinuousOn (fun t => ∫ x : Vec, g x * totalEnergy s (t,x)) (Icc 0 T) := by + apply continuousOn_integral_uniform_support hc + ((hg.comp continuous_snd).continuousOn.mul (total_energy_continuous_slab hs)) + intro t _ x hx + change g x * totalEnergy s (t,x) = 0 + rw [image_eq_zero_of_notMem_tsupport hx,zero_mul] + +lemma weighted_energy_deriv_bound (hs : EnergyPrefix s T) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {C : ℝ} (hC : 0 ≤ C) (hb : ∀ x, ‖fderiv ℝ g x‖ ≤ C) + {t : ℝ} (ht : t ∈ Ioo 0 T) : + ‖deriv (fun r => ∫ x : Vec, g x * totalEnergy s (r,x)) t‖ ≤ + C * (∫ x : Vec, totalEnergy s (t,x)) := by + rw [(deriv_weighted_energy hs hg hc ht).deriv] + have hS : Continuous (fun x : Vec => totalFlux s (t,x)) := by + apply ContinuousOn.comp_continuous (total_flux_regular hs).continuousOn + (continuous_const.prodMk continuous_id) + intro x + exact ⟨ht,mem_univ x⟩ + have hi : Integrable (fun x => fderiv ℝ g x (totalFlux s (t,x))) := + ((hg.continuous_fderiv (by simp)).clm_apply hS).integrable_of_hasCompactSupport + (compactSupport_of_zero_off (hc.fderiv ℝ) (by + intro x hx + rw [image_eq_zero_of_notMem_tsupport hx, zero_apply])) + calc + _ ≤ ∫ x : Vec, ‖fderiv ℝ g x (totalFlux s (t,x))‖ := norm_integral_le_integral_norm _ + _ ≤ ∫ x : Vec, C * totalEnergy s (t,x) := by + apply integral_mono hi.norm ((total_energy_integrable hs (Ioo_subset_Icc_self ht)).const_mul C) + intro x + exact (ContinuousLinearMap.le_opNorm _ _).trans + (mul_le_mul (hb x) (total_flux_bound hs (Ioo_subset_Icc_self ht) x) (norm_nonneg _) hC) + _ = _ := integral_const_mul _ _ + +lemma weighted_energy_increment_bound (hs : EnergyPrefix s T) {g : Vec → ℝ} (hg : ContDiff ℝ 1 g) (hc : HasCompactSupport g) + {C B : ℝ} (hC : 0 ≤ C) (hb : ∀ x, ‖fderiv ℝ g x‖ ≤ C) + (hT : 0 ≤ T) (hB : ∀ t ∈ Icc 0 T, (∫ x : Vec, totalEnergy s (t,x)) ≤ B) : + ‖(∫ x : Vec, g x * totalEnergy s (T,x)) - (∫ x : Vec, g x * totalEnergy s (0,x))‖ ≤ C * B * T := by + rcases eq_or_lt_of_le hT with he | ht + · subst T; simp + let F : ℝ → ℝ := fun t => ∫ x : Vec, g x * totalEnergy s (t,x) + have hcont : ContinuousOn F (Icc 0 T) := weighted_energy_continuous hs hg.continuous hc + have hdiff : DifferentiableOn ℝ F (Ioo 0 T) := fun t ht => + (deriv_weighted_energy hs hg hc ht).differentiableAt.differentiableWithinAt + obtain ⟨c,hcT,heq⟩ := exists_deriv_eq_slope F ht hcont hdiff + have hder : ‖deriv F c‖ ≤ C * B := + (weighted_energy_deriv_bound hs hg hc hC hb hcT).trans + (mul_le_mul_of_nonneg_left (hB c ⟨hcT.1.le,hcT.2.le⟩) hC) + rw [heq, sub_zero, norm_div, Real.norm_of_nonneg hT] at hder + exact (div_le_iff₀ ht).mp hder + +theorem energy_conservation (hs : EnergyPrefix s T) (hT : 0 ≤ T) : + (∫ x : Vec, totalEnergy s (T,x)) = ∫ x : Vec, totalEnergy s (0,x) := by + obtain ⟨C,hC,hb⟩ := energyCutoff_deriv_bound + obtain ⟨B,hB⟩ := (isCompact_Icc : IsCompact (Icc (0:ℝ) T)).bddAbove_image + (integrated_energy_continuous hs) + have hB' : ∀ t ∈ Icc 0 T, (∫ x : Vec, totalEnergy s (t,x)) ≤ B := + fun t ht => hB ⟨t,ht,rfl⟩ + have hinc (n : ℕ) : + ‖(∫ x : Vec, energyCutoff n x * totalEnergy s (T,x)) - + (∫ x : Vec, energyCutoff n x * totalEnergy s (0,x))‖ ≤ + (C / ((n:ℝ)+1)) * B * T := + weighted_energy_increment_bound hs (energyCutoff_smooth n) (energyCutoff_compact n) + (div_nonneg hC (by positivity)) (hb n) hT hB' + have hl := ((energyCutoff_integral_tendsto (total_energy_integrable hs ⟨hT,le_rfl⟩)).sub + (energyCutoff_integral_tendsto (total_energy_integrable hs ⟨le_rfl,hT⟩))).norm + have hr : Filter.Tendsto (fun n : ℕ => (C / ((n:ℝ)+1)) * B * T) Filter.atTop (𝓝 0) := by + have hi : Filter.Tendsto (fun n : ℕ => ((n:ℝ)+1)⁻¹) Filter.atTop (𝓝 0) := + tendsto_inv_atTop_zero.comp (Filter.tendsto_atTop_add_const_right _ _ tendsto_natCast_atTop_atTop) + simpa only [div_eq_mul_inv,mul_zero,zero_mul] using ((hi.const_mul C).mul_const B).mul_const T + have he := le_of_tendsto_of_tendsto' hl hr hinc + exact sub_eq_zero.mp (norm_eq_zero.mp (le_antisymm he (norm_nonneg _))) + +end EnergyPrefix + +lemma Classical.energyPrefix {d : Datum} {s : Solution} (hs : Classical d s) + {T : ℝ} (hT : 0 ≤ T) : EnergyPrefix s T := by + refine ⟨hs.1.mono (fun _ hz => hz.1.1),hs.2.1.mono (fun _ hz => hz.1.1), + hs.2.2.1.mono (fun _ hz => hz.1.1),(fun t ht => hs.2.2.2.1 t ht.1),?_,?_, + hs.2.2.2.2.2.2.1 T hT,?_,?_⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ + · obtain ⟨F,hc,he⟩ := hs.2.2.2.2.2.1 + exact ⟨F,hc.mono Icc_subset_Ici_self,fun t ht => he t ht.1⟩ + · intro t ht x v + have hh := (hs.2.2.2.2.2.2.2.1 t ht.1.le).1 x v + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro t ht x + have he := (hs.2.2.2.2.2.2.2.1 t ht.1.le).2.1 x + have hb := (hs.2.2.2.2.2.2.2.1 t ht.1.le).2.2.1 x + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedRadiusSeparatedClosed.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedRadiusSeparatedClosed.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa7961297a559787b60970f7e9fed1281492cecb --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/RetardedRadiusSeparatedClosed.lean @@ -0,0 +1,406 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.InitialSignedBoundaryDensity +import OAI.Analysis.VlasovMaxwell.Regularity.AbsolutelyContinuousIntervalContinuousDerivative + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma PhaseFlowOn.retarded_radius_separated_closed {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX zY : Phase) + (hne : ∀ t∈Icc 0 T,(F.flow zX t).1≠(F.flow zY t).1) : + ∃ δ : ℝ,0<δ ∧ ∀ σ∈closedBranchDomain F.flow zX zY T, + δ≤branchTime F.flow zX zY T σ-σ := by + have hc : ContinuousOn (fun t=>‖(F.flow zX t).1-(F.flow zY t).1‖) (Icc 0 T) := + ((F.continuousOn_time zX).fst.sub (F.continuousOn_time zY).fst).norm + obtain ⟨t₀,ht₀,hmin⟩ := isCompact_Icc.exists_isMinOn (nonempty_Icc.mpr hT) hc + have hpos : 0<‖(F.flow zX t₀).1-(F.flow zY t₀).1‖ := + norm_pos_iff.mpr (sub_ne_zero.mpr (hne t₀ ht₀)) + obtain ⟨c,hc1,hLip⟩ := F.timelike hT zY + refine ⟨‖(F.flow zX t₀).1-(F.flow zY t₀).1‖/2,by positivity,?_⟩ + intro σ hσ + let τ := branchTime F.flow zX zY T σ + have ht := (F.branch_spec_closed zX zY hσ).1 + have ht0 : τ∈Icc 0 T := ⟨hσ.1.1.trans ht.1,ht.2⟩ + have hr : 0≤τ-σ := sub_nonneg.mpr ht.1 + have hdist := hLip.dist_le_mul τ ht0 σ hσ.1 + rw [dist_eq_norm,Real.dist_eq,abs_of_nonneg hr] at hdist + have hbound : ‖(F.flow zY τ).1-(F.flow zY σ).1‖≤τ-σ := + hdist.trans (mul_le_of_le_one_left hr hc1.le) + have hcone := (F.branch_spec_closed zX zY hσ).2 + have htriangle : ‖(F.flow zX τ).1-(F.flow zY τ).1‖ ≤ + ‖(F.flow zX τ).1-(F.flow zY σ).1‖+‖(F.flow zY σ).1-(F.flow zY τ).1‖ := by + calc + _ = ‖((F.flow zX τ).1-(F.flow zY σ).1)+((F.flow zY σ).1-(F.flow zY τ).1)‖ := by congr 1; abel + _ ≤ _ := norm_add_le _ _ + rw [norm_sub_rev (F.flow zY σ).1 (F.flow zY τ).1] at htriangle + have hm := hmin ht0 + change ‖(F.flow zX t₀).1-(F.flow zY t₀).1‖≤‖(F.flow zX τ).1-(F.flow zY τ).1‖ at hm + change τ-σ=‖(F.flow zX τ).1-(F.flow zY σ).1‖ at hcone + change _≤τ-σ + linarith + +lemma PhaseFlowOn.ae_full_retarded_branch {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) : + ∀ᵐ zY ∂(volume : Measure Phase), zY∈initialConeLabels T (F.flow zX T).1 → + ∃ b∈Ioo 0 T,closedBranchDomain F.flow zX zY T=Icc 0 b ∧ + branchTime F.flow zX zY T b=T ∧ + ∃ δ : ℝ,0<δ ∧ ∀ σ∈Icc 0 b,δ≤branchTime F.flow zX zY T σ-σ := by + have hh : ∀ᵐ zY ∂(volume : Measure Phase), + zY∉{y : Phase | ∃ t∈Icc 0 T,(F.flow y t).1=(F.flow zX t).1} := + ae_iff.mpr (by simpa only [Set.mem_ofPred_eq,not_not] using F.closed_collision_null hT zX) + filter_upwards [hh] with zY hzY + intro hy + have hne : ∀ t∈Icc 0 T,(F.flow zX t).1≠(F.flow zY t).1 := fun t ht he=>hzY ⟨t,ht,he.symm⟩ + obtain ⟨b,⟨hb,he⟩,_⟩ := F.exists_emission ⟨hT,le_rfl⟩ (F.flow zX T).1 hy + have hb0 : 0ψ (branchTime F.flow zX zY T σ)) 0 b := by + have hT : 0≤T := hb.1.trans hb.2 + have hclosed := F.closedBranchDomain_eq hT zX zY hb he + obtain ⟨C,hC⟩ := F.branch_lipschitzOn_closed hT zX zY + have hm : MapsTo (branchTime F.flow zX zY T) (closedBranchDomain F.flow zX zY T) (Icc 0 T) := by + intro σ hσ + have ht := (F.branch_spec_closed zX zY hσ).1 + exact ⟨hσ.1.1.trans ht.1,ht.2⟩ + have h := hψ.comp hC hm + rw [hclosed,← uIcc_of_le hb.1] at h + exact h.absolutelyContinuousOnInterval + +lemma PhaseFlowOn.actual_temporal_signed_identity_closed {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) + {ψ : ℝ→ℝ} {L : ℝ≥0} (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} + (hW : ContinuousOn W (Icc 0 b)) (hW' : ContinuousOn W' (Icc 0 b)) + (hWd : ∀ σ∈Ioo 0 b,HasDerivAt W (W' σ) σ) : + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in 0..b,ψ (τ σ) • W σ + (signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ)) = + ψ (τ 0) • W 0 (retardedPrimitive (r 0) (a 0) (u 0) (n 0))+ + ∫ σ in 0..b,deriv (fun σ=>ψ (τ σ)) σ • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + ψ (τ σ) • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + have h := F.actual_weighted_signed_identity_closed hs zX zY hb he hne + (F.branch_weight_ac zX zY hb he hψ) hW hW' hWd + dsimp only at h ⊢ + simpa only [F.branch_final_endpoint zX zY hb he,hψT,zero_smul,sub_zero] using h +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open scoped Topology ContDiff RealInnerProductSpace +open Set MeasureTheory +open scoped ENNReal +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff NNReal + +namespace RVM + +lemma deriv_comp_of_nonzero_strict {f ψ : ℝ→ℝ} {x c : ℝ} + (hf : HasStrictDerivAt f c x) (hc : c≠0) : + deriv (fun r=>ψ (f r)) x=deriv ψ (f x)*c := by + by_cases hψ : DifferentiableAt ℝ ψ (f x) + · exact (hψ.hasDerivAt.comp x hf.hasDerivAt).deriv + · have hnot : ¬DifferentiableAt ℝ (ψ ∘ f) x := by + intro h + let g := hf.localInverse f c x hc + have hg : HasStrictDerivAt g c⁻¹ (f x) := hf.to_localInverse hc + have hleft : g (f x)=x := (hf.eventually_left_inverse hc).self_of_nhds + have hh : DifferentiableAt ℝ (ψ ∘ f) (g (f x)) := hleft.symm ▸ h + have hi := hh.comp (f x) hg.hasDerivAt.differentiableAt + apply hψ + apply hi.congr_of_eventuallyEq + filter_upwards [hf.eventually_right_inverse hc] with y hy + exact congrArg ψ hy.symm + rw [show (fun r=>ψ (f r))=ψ ∘ f from rfl,deriv_zero_of_not_differentiableAt hnot, + deriv_zero_of_not_differentiableAt hψ,zero_mul] + +lemma PhaseFlowOn.branch_weight_deriv {E B : Field} {T σ : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) + (hσ : σ∈branchDomain F.flow zX zY T) + (hne : (F.flow zX σ).1≠(F.flow zY σ).1) (ψ : ℝ→ℝ) : + deriv (fun r=>ψ (branchTime F.flow zX zY T r)) σ= + deriv ψ (branchTime F.flow zX zY T σ)*branchRate F.flow zX zY T σ := by + obtain ⟨hc,hd⟩ := F.branch_differential zX zY hσ hne + have hs : HasStrictDerivAt (branchTime F.flow zX zY T) + (branchRate F.flow zX zY T σ) σ := hc.hasStrictDerivAt' hd (by norm_num) + exact deriv_comp_of_nonzero_strict hs (F.branchRate_pos zX zY hσ hne).ne' + +lemma PhaseFlowOn.branch_weight_deriv_integral {E B : Field} {T b : ℝ} + (F : PhaseFlowOn E B T) (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) + (ψ : ℝ→ℝ) (G H : ℝ→Vec) : + (∫ σ in 0..b,deriv (fun r=>ψ (branchTime F.flow zX zY T r)) σ • G σ+H σ)= + ∫ σ in 0..b,(deriv ψ (branchTime F.flow zX zY T σ)*branchRate F.flow zX zY T σ) • G σ+H σ := by + apply intervalIntegral.integral_congr_uIoo + intro σ hσ + have hσo : σ∈Ioo 0 b := by simpa only [uIoo_of_le hb.1] using hσ + have hdom : σ∈branchDomain F.flow zX zY T := by + rwa [F.branchDomain_eq (hb.1.trans hb.2) zX zY hb he] + dsimp only + rw [F.branch_weight_deriv zX zY hdom (hne σ ⟨hσo.1.le,hσo.2.le.trans hb.2⟩) ψ] + +lemma PhaseFlowOn.actual_temporal_signed_formula {s : Solution} {T b : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) + (zX zY : Phase) (hb : b∈Icc 0 T) + (he : b+‖(F.flow zX T).1-(F.flow zY b).1‖=T) + (hne : ∀ σ∈Icc 0 T,(F.flow zX σ).1≠(F.flow zY σ).1) + {ψ : ℝ→ℝ} {L : ℝ≥0} (hψ : LipschitzOnWith L ψ (Icc 0 T)) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} + (hW : ContinuousOn W (Icc 0 b)) (hW' : ContinuousOn W' (Icc 0 b)) + (hWd : ∀ σ∈Ioo 0 b,HasDerivAt W (W' σ) σ) : + let τ := branchTime F.flow zX zY T + let r := fun σ=>τ σ-σ + let a := fun σ=>velocity (F.flow zX (τ σ)).2 + let u := fun σ=>velocity (F.flow zY σ).2 + let n := branchDirection F.flow zX zY T + ∫ σ in 0..b,ψ (τ σ) • W σ + (signedForceKernel (r σ) (a σ) (u σ) (n σ) (phaseAcceleration s.E s.B F.flow zY σ)) = + ψ (τ 0) • W 0 (retardedPrimitive (r 0) (a 0) (u 0) (n 0))+ + ∫ σ in 0..b,(deriv ψ (τ σ)*branchRate F.flow zX zY T σ) • W σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + ψ (τ σ) • (W' σ (retardedPrimitive (r σ) (a σ) (u σ) (n σ))+ + W σ (signedRemainder (r σ) (a σ) (u σ) (n σ) + (phaseAcceleration s.E s.B F.flow zX (τ σ)))) := by + have h := F.actual_temporal_signed_identity_closed hs zX zY hb he hne hψ hψT hW hW' hWd + dsimp only at h ⊢ + rw [F.branch_weight_deriv_integral zX zY hb he hne ψ] at h + exact h + +lemma continuousOn_retardedPrimitive_space {Q : Type*} [TopologicalSpace Q] {r : Q → ℝ} {a u n : Q → Vec} {S : Set Q} + (hr : ContinuousOn r S) (ha : ContinuousOn a S) + (hu : ContinuousOn u S) (hn : ContinuousOn n S) + (hr0 : ∀ s ∈ S, r s ≠ 0) (hd : ∀ s ∈ S, 1-dot (n s) (u s) ≠ 0) + (hD : ∀ s ∈ S, 1-dot (n s) (a s) ≠ 0) : + ContinuousOn (fun s => retardedPrimitive (r s) (a s) (u s) (n s)) S := by + have hdu : ContinuousOn (fun s => 1-dot (n s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : Q => (1 : ℝ)) S).sub (hn.inner hu) + have hDa : ContinuousOn (fun s => 1-dot (n s) (a s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : Q => (1 : ℝ)) S).sub (hn.inner ha) + have hea : ContinuousOn (fun s => 1-dot (a s) (u s)) S := by + simp only [dot_eq_inner] + exact (continuousOn_const : ContinuousOn (fun _ : Q => (1 : ℝ)) S).sub (ha.inner hu) + exact ((hr.mul hdu).inv₀ (fun s hs => mul_ne_zero (hr0 s hs) (hd s hs))).smul + (hu.sub ((hea.div hDa hD).smul hn)) + +def initialClosedCone (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) : Set Phase := + {z | ‖(α zX T).1-z.1‖≤T} + +lemma PhaseFlowOn.initial_closed_branch_mem {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX zY : Phase) + (hy : zY∈initialClosedCone F.flow zX T) : + 0∈closedBranchDomain F.flow zX zY T := by + refine ⟨⟨le_rfl,hT⟩,?_⟩ + simpa only [initialClosedCone,Set.mem_ofPred,F.initial,zero_add] using hy + +lemma PhaseFlowOn.initial_branch_lipschitz {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) : + ∃ C : ℝ≥0,LipschitzOnWith C (fun z=>branchTime F.flow zX z T 0) + (initialClosedCone F.flow zX T) := by + obtain ⟨c,hc,hX⟩ := F.timelike hT zX + let C : ℝ≥0 := ⟨1/(1-(c:ℝ)),by positivity⟩ + refine ⟨C,LipschitzOnWith.of_dist_le_mul ?_⟩ + intro z hz w hw + obtain ⟨ht,het⟩ := F.branch_spec_closed zX z (F.initial_closed_branch_mem hT zX z hz) + obtain ⟨hu,heu⟩ := F.branch_spec_closed zX w (F.initial_closed_branch_mem hT zX w hw) + let t := branchTime F.flow zX z T 0 + let u := branchTime F.flow zX w T 0 + have htu := hX.dist_le_mul t ht u hu + have he : t-u=‖(F.flow zX t).1-z.1‖-‖(F.flow zX u).1-w.1‖ := by + rw [F.initial,sub_zero] at het heu + exact congrArg₂ (fun a b : ℝ=>a-b) het heu + have hdist : dist t u≤(c:ℝ)*dist t u+dist z w := by + have hn := abs_norm_sub_norm_le ((F.flow zX t).1-z.1) ((F.flow zX u).1-w.1) + have hh : ‖((F.flow zX t).1-z.1)-((F.flow zX u).1-w.1)‖≤ + dist (F.flow zX t).1 (F.flow zX u).1+dist z.1 w.1 := by + rw [dist_eq_norm,dist_eq_norm] + calc + _ = ‖((F.flow zX t).1-(F.flow zX u).1)-(z.1-w.1)‖ := by congr 1; abel + _ ≤ _ := norm_sub_le _ _ + rw [← he,← Real.dist_eq] at hn + exact (hn.trans hh).trans (add_le_add htu (show dist z.1 w.1≤dist z w from le_max_left _ _)) + change dist t u≤(1/(1-(c:ℝ)))*dist z w + rw [div_mul_eq_mul_div,one_mul] + apply (le_div_iff₀ (sub_pos.mpr hc)).mpr + nlinarith + +lemma PhaseFlowOn.initial_primitive_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) : + ContinuousOn (fun z : Phase=> + retardedPrimitive (branchTime F.flow zX z T 0) + (velocity (F.flow zX (branchTime F.flow zX z T 0)).2) + (velocity z.2) (branchDirection F.flow zX z T 0)) + (initialClosedCone F.flow zX T ∩ {z : Phase | z.1≠zX.1}) := by + let A := initialClosedCone F.flow zX T ∩ {z : Phase | z.1≠zX.1} + let τ := fun z=>branchTime F.flow zX z T 0 + have hm : ∀ z∈A,0∈closedBranchDomain F.flow zX z T := fun z hz=> + F.initial_closed_branch_mem hT zX z hz.1 + have htm : MapsTo τ A (Icc 0 T) := fun z hz=>(F.branch_spec_closed zX z (hm z hz)).1 + have hne : ∀ z∈A,(F.flow zX 0).1≠(F.flow z 0).1 := by + intro z hz + simpa only [F.initial] using Ne.symm hz.2 + have hpos : ∀ z∈A,τ z≠0 := by + intro z hz + have hh := F.branch_radius_pos_closed zX z (hm z hz) (hne z hz) + simpa only [sub_zero] using hh.ne' + have ht : ContinuousOn τ A := by + obtain ⟨C,hC⟩ := F.initial_branch_lipschitz hT zX + exact hC.continuousOn.mono inter_subset_left + have hX := (F.continuousOn_time zX).comp ht htm + have hn : ContinuousOn (fun z=>branchDirection F.flow zX z T 0) A := by + convert (ht.inv₀ hpos).smul (hX.fst.sub continuous_fst.continuousOn) using 1 + funext z + simp only [branchDirection,sub_zero,F.initial,τ,Function.comp_apply] + rfl + have ha := (contDiff_velocity (k:=1)).continuous.comp_continuousOn hX.snd + have hu : ContinuousOn (fun z : Phase=>velocity z.2) A := + (contDiff_velocity (k:=1)).continuous.comp_continuousOn continuous_snd.continuousOn + have hn1 : ∀ z∈A,‖branchDirection F.flow zX z T 0‖=1 := fun z hz=> + F.branchDirection_norm_closed zX z (hm z hz) (hne z hz) + exact continuousOn_retardedPrimitive_space ht ha hu hn hpos + (fun z hz=>(cone_denom_pos z.2 _ (hn1 z hz)).ne') + (fun z hz=>(cone_denom_pos (F.flow zX (τ z)).2 _ (hn1 z hz)).ne') + +lemma PhaseFlowOn.initial_primitive_measurable {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (hT : 0≤T) (zX : Phase) : + Measurable ((initialClosedCone F.flow zX T ∩ {z : Phase | z.1≠zX.1}).indicator + (fun z : Phase=>retardedPrimitive (branchTime F.flow zX z T 0) + (velocity (F.flow zX (branchTime F.flow zX z T 0)).2) + (velocity z.2) (branchDirection F.flow zX z T 0))) := by + classical + let A := initialClosedCone F.flow zX T ∩ {z : Phase | z.1≠zX.1} + have h₁ : IsClosed (initialClosedCone F.flow zX T) := + isClosed_le ((continuous_const.sub continuous_fst).norm) continuous_const + have h₂ : IsOpen {z : Phase | z.1≠zX.1} := (isClosed_eq continuous_fst continuous_const).isOpen_compl + have hA : MeasurableSet A := h₁.measurableSet.inter h₂.measurableSet + have h := (F.initial_primitive_continuousOn hT zX).measurable_piecewise + (continuousOn_const (c:=(0:Vec))) hA + convert h using 1 + funext z + by_cases hz : z∈A <;> simp [A,Set.piecewise,Set.indicator] at hz ⊢ +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SelectedConeTransfer.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SelectedConeTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f8deeb3ce5d9d97c8d667dc91ff3c49f6461b3c --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SelectedConeTransfer.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.PhysicalBinPhaseSet +import OAI.Analysis.VlasovMaxwell.Regularity.SpatialJets + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma selectedDyadicCutoff_active {ι : Type*} [Fintype ι] {Q : Set (ι→ℕ)} {x : ι→ℝ} + (h : selectedDyadicCutoff Q x≠0) : ∃k∈Q,0dyadicMultiFactor k x) k=0 by + simp only [selectedDyadicCutoff,hz,tsum_zero] + intro k + by_cases hk : k∈Q + · rw [Set.indicator_of_mem hk] + exact le_antisymm (hh k hk) (dyadicMultiFactor_nonneg _ _) + · exact Set.indicator_of_notMem hk _ + +lemma stateCutoff_physical_cover {T w t σ : ℝ} {V : ℝ→Vec} + {J : Set ℝ} (ht : t∈J) (hσ : σ∈Icc 0 t) + (hband : q (V t)∈Icc (w/8) (8*w)) {n : Sphere} {v : Vec} + (Q : Set (Fin 4→ℕ)) (hd : stateCutoff T Q (t-σ,n.1,v,V t)≠0) : + ∃k∈Q,((t,σ,n),v)∈physicalBinPhaseSet V (representativeClosedBin T w k) J := by + obtain ⟨k,hk,hpos⟩ := selectedDyadicCutoff_active hd + exact ⟨k,hk,physicalCutoff_positive_closedBin ht hσ hband hpos⟩ + +def selectedConeKernel (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (p : ConeKernelState) : Vec := + stateCutoff T Q (coneCutoffState α zX p) • A p + +def selectedConeTriangle (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + (J : Set ℝ) (p : TrianglePhase) : Vec := + J.indicator W p.1.1 (triangleConeKernel s α zX T (selectedConeKernel α zX T Q A) p) + +lemma PhaseFlowOn.selectedConeKernel_continuousOn {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelInterior T)) : + ContinuousOn (selectedConeKernel F.flow zX T Q A) (coneKernelInterior T) := by + have hcut : ContinuousOn (fun p=>stateCutoff T Q (coneCutoffState F.flow zX p)) + (coneKernelInterior T) := by + intro p hp + exact ((contDiffAt_stateCutoff T Q (sub_pos.mpr hp.2) + (by simpa only [coneCutoffState,mem_sphere,dist_zero_right] using hp.1.2.1)).continuousAt).comp_continuousWithinAt + (F.coneCutoffState_continuousOn zX p hp) + exact hcut.smul hA + +lemma labelConeKernel_selected (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (p : ℝ×Phase) : + labelConeKernel s α zX T (selectedConeKernel α zX T Q A) p= + labelSelectedCutoff α zX T Q p • labelConeKernel s α zX T A p := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · have hj : p∈jointBranchDomain α zX T := hp + simp only [labelConeKernel,Set.indicator_of_mem hp,labelSelectedCutoff,Set.indicator_of_mem hj, + selectedConeKernel,stateCutoff,coneCutoffState,labelKernelState,actualCutoffCoordinates] + module + · simp only [labelConeKernel,Set.indicator_of_notMem hp,smul_zero] + +lemma selectedConeTriangle_eq_kernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) (T : ℝ) + (Q : Set (Fin 4→ℕ)) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) (J : Set ℝ) : + selectedConeTriangle s α zX T Q A W J= + triangleConeKernel s α zX T (fun p=>J.indicator W p.1.1 (selectedConeKernel α zX T Q A p)) := by + funext p + exact (triangleConeKernel_receiver_multiplier s α zX T _ (J.indicator W) p).symm + +lemma PhaseFlowOn.selectedConeTriangle_measurable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelInterior T)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) : + Measurable (selectedConeTriangle s F.flow zX T Q A W J) := + (continuous_fst.clm_apply continuous_snd).measurable.comp + (((hW.indicator hJ).comp measurable_fst.fst).prodMk + (F.triangleConeKernel_measurable_interior hs zX (F.selectedConeKernel_continuousOn zX Q hA))) + +lemma PhaseFlowOn.selectedConeTriangle_norm_transfer {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelInterior T)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) {J : Set ℝ} (hJ : MeasurableSet J) : + (∫⁻p : ℝ×Phase,ENNReal.ofReal ‖J.indicator W (labelReceiverTime F.flow zX T p) + (labelSelectedCutoff F.flow zX T Q p • labelConeKernel s F.flow zX T A p)‖)= + ∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q A W J p‖ ∂trianglePhaseMeasure := by + classical + have hm := F.selectedConeTriangle_measurable hs zX Q hA hW hJ + rw [selectedConeTriangle_eq_kernel] at hm ⊢ + rw [F.triangleConeKernel_lintegral_norm_measurable zX hm] + have ha := F.selectedConeKernel_continuousOn zX Q hA + have hmA : Measurable ((coneKernelInterior T).indicator (selectedConeKernel F.flow zX T Q A)) := + ha.measurable_piecewise continuousOn_const (measurableSet_coneKernelInterior T) + have he := F.labelConeKernel_triangle_norm_localBorel hs hT zX + (localBorel_clm_apply hmA (hW.indicator hJ)) + simpa only [labelConeKernel_receiver_multiplier,labelConeKernel_selected] using he + +lemma PhaseFlowOn.selectedConeTriangle_support {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + {J : Set ℝ} (hJT : J⊆Icc 0 T) (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) + (p : TrianglePhase) (hp : selectedConeTriangle s F.flow zX T Q A W J p≠0) : + ∃k∈Q,p∈physicalBinPhaseSet (fun t=>(prefixFlow F.flow T zX t).2) + (representativeClosedBin T w k) J := by + classical + have ht : p.1.1∈J := by + by_contra hh + exact hp (by simp only [selectedConeTriangle,Set.indicator_of_notMem hh,zero_apply]) + have hd : p∈trianglePhaseDomain T := by + by_contra hh + exact hp (by simp only [selectedConeTriangle,triangleConeKernel,Set.indicator_of_notMem hh,map_zero]) + have hc : stateCutoff T Q (p.1.1-p.1.2.1,p.1.2.2.1,p.2,(F.flow zX p.1.1).2)≠0 := by + intro hh + apply hp + simp only [selectedConeTriangle,triangleConeKernel,Set.indicator_of_mem hd,selectedConeKernel, + coneCutoffState,triangleKernelState,hh,zero_smul,smul_zero,map_zero] + have hpre : (prefixFlow F.flow T zX p.1.1).2=(F.flow zX p.1.1).2 := by + simp only [prefixFlow,prefixClamp_eq (hJT ht)] + apply stateCutoff_physical_cover ht ⟨hd.2.1.le,hd.2.2.le⟩ + (V:=fun t=>(prefixFlow F.flow T zX t).2) (by rw [hpre]; exact hband _ ht) Q + simpa only [hpre] using hc + +lemma PhaseFlowOn.selectedConeTriangle_physical_sum {s : Solution} {T w : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) + (zX : Phase) (Q : Set (Fin 4→ℕ)) {A : ConeKernelState→Vec} + (hA : ContinuousOn A (coneKernelInterior T)) {W : ℝ→Vec→L[ℝ]Vec} (hW : Measurable W) + {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + (hband : ∀t∈J,q (F.flow zX t).2∈Icc (w/8) (8*w)) : + (∫⁻p,ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q A W J p‖ ∂trianglePhaseMeasure)≤ + ∑'k : Fin 4→ℕ,Q.indicator (fun k=>∫⁻z : ConeCoordinate, + ∫⁻v in coneBinMomentumSet (representativeClosedBin T w k) z.2.2.1 (velocity (prefixFlow F.flow T zX z.1).2), + ENNReal.ofReal ‖selectedConeTriangle s F.flow zX T Q A W J (z,v)‖ ∂volume + ∂physicalBinMeasure (fun t=>(prefixFlow F.flow T zX t).2) (representativeClosedBin T w k) J) k := by + have hV : Measurable (fun t=>(prefixFlow F.flow T zX t).2) := + ((F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const)).snd.measurable + apply physicalBinPhase_cover_lintegral hV hJ T w Q + (F.selectedConeTriangle_measurable hs zX Q hA hW hJ).norm.ennreal_ofReal + intro p hp + apply F.selectedConeTriangle_support zX Q A W hJT hband p + intro hh + exact hp (by rw [hh,norm_zero,ENNReal.ofReal_zero]) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceCellLast.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceCellLast.lean new file mode 100644 index 0000000000000000000000000000000000000000..328ed9ed572852b498d4ecc135a398ac0bfe1700 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceCellLast.lean @@ -0,0 +1,510 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.DerivMovingEnergy +import OAI.Analysis.VlasovMaxwell.Flow.PhaseAcceleration + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal +open Set + +namespace RVM + +def sourceCellLast (T len : ℝ) : ℕ := ⌊T/len⌋₊ +def sourceCellLo (len : ℝ) (i : ℕ) : ℝ := i*len +def sourceCellHi (T len : ℝ) (i : ℕ) : ℝ := min T ((i+1:ℕ)*len) + +def selectedSourceCells (T len a b r : ℝ) : Finset ℕ := by + classical + exact (Finset.range (sourceCellLast T len+1)).filter fun i => + sourceCellLo len i ≤ b ∧ a-r ≤ sourceCellHi T len i + +lemma sourceCellLast_le {T len : ℝ} (hT : 0 ≤ T) (hlen : 0 < len) : + (sourceCellLast T len:ℝ)*len ≤ T := by + exact (le_div_iff₀ hlen).mp (Nat.floor_le (div_nonneg hT hlen.le)) + +lemma sourceCell_mem_prefix {T len : ℝ} (hT : 0 ≤ T) (hlen : 0 < len) + {i : ℕ} (hi : i ≤ sourceCellLast T len) : + 0 ≤ sourceCellLo len i ∧ sourceCellLo len i ≤ sourceCellHi T len i ∧ + sourceCellHi T len i ≤ T ∧ sourceCellHi T len i-sourceCellLo len i ≤ len := by + have hil : (i:ℝ)*len ≤ T := (mul_le_mul_of_nonneg_right (by exact_mod_cast hi) hlen.le).trans + (sourceCellLast_le hT hlen) + have his : (i:ℝ) ≤ (i+1:ℕ) := by exact_mod_cast Nat.le_succ i + have hull : (i:ℝ)*len ≤ (i+1:ℕ)*len := mul_le_mul_of_nonneg_right his hlen.le + refine ⟨by dsimp [sourceCellLo]; positivity,le_min hil hull,min_le_left _ _,?_⟩ + have hh : sourceCellHi T len i ≤ (i:ℝ)*len+len := by + unfold sourceCellHi + simpa only [Nat.cast_add,Nat.cast_one,add_mul,one_mul] using (min_le_right T ((i+1:ℕ)*len)) + dsimp [sourceCellLo] + linarith + +lemma sourceCell_full {T len : ℝ} (hT : 0 ≤ T) (hlen : 0 < len) + {i : ℕ} (hi : i < sourceCellLast T len) : + sourceCellHi T len i-sourceCellLo len i=len := by + have hh : ((i+1:ℕ):ℝ)*len ≤ T := + (mul_le_mul_of_nonneg_right (by exact_mod_cast Nat.succ_le_of_lt hi) hlen.le).trans + (sourceCellLast_le hT hlen) + unfold sourceCellHi sourceCellLo + rw [min_eq_right hh] + push_cast + ring + +lemma sourceCell_cover {T len t : ℝ} (hlen : 0 < len) (ht : t ∈ Icc 0 T) : + ∃ i ≤ sourceCellLast T len, t ∈ Icc (sourceCellLo len i) (sourceCellHi T len i) := by + let i := ⌊t/len⌋₊ + have hi : i ≤ sourceCellLast T len := Nat.floor_mono ((div_le_div_iff_of_pos_right hlen).mpr ht.2) + refine ⟨i,hi,?_,le_min ht.2 ?_⟩ + · exact (le_div_iff₀ hlen).mp (Nat.floor_le (div_nonneg ht.1 hlen.le)) + · have hh := Nat.lt_floor_add_one (t/len) + apply le_of_lt + have hf := (div_lt_iff₀ hlen).mp hh + simpa only [Nat.cast_add,Nat.cast_one] using hf + +lemma selectedSourceCells_cover {T len a b r : ℝ} (hlen : 0 < len) : + Icc (max 0 (a-r)) (min T b) ⊆ + ⋃ i ∈ selectedSourceCells T len a b r, Icc (sourceCellLo len i) (sourceCellHi T len i) := by + intro t ht + obtain ⟨i,hi,htC⟩ := sourceCell_cover hlen ⟨(le_max_left _ _).trans ht.1,ht.2.trans (min_le_left _ _)⟩ + refine mem_iUnion₂.mpr ⟨i,?_,htC⟩ + classical + exact Finset.mem_filter.mpr ⟨Finset.mem_range.mpr (by omega), + htC.1.trans (ht.2.trans (min_le_right _ _)), + (le_max_right _ _).trans (ht.1.trans htC.2)⟩ + +lemma selectedSourceCells_subset_prefix {T len a b r : ℝ} (hT : 0 ≤ T) (hlen : 0 < len) + {i : ℕ} (hi : i ∈ selectedSourceCells T len a b r) : + 0 ≤ sourceCellLo len i ∧ sourceCellLo len i ≤ sourceCellHi T len i ∧ + sourceCellHi T len i ≤ T ∧ sourceCellHi T len i-sourceCellLo len i ≤ len := by + classical + exact sourceCell_mem_prefix hT hlen (by + have hh := Finset.mem_range.mp (Finset.mem_filter.mp hi).1 + omega) + +lemma selectedSourceCells_enlargement {T len a b r : ℝ} (hT : 0 ≤ T) (hlen : 0 < len) + {i : ℕ} (hi : i ∈ selectedSourceCells T len a b r) : + Icc (sourceCellLo len i) (sourceCellHi T len i) ⊆ + Icc (max 0 (a-r-len)) (min T (b+len)) := by + have hc := selectedSourceCells_subset_prefix hT hlen hi + have hh := (Finset.mem_filter.mp hi).2 + intro t ht + refine ⟨max_le (hc.1.trans ht.1) ?_,le_min (ht.2.trans hc.2.2.1) ?_⟩ <;> linarith [hc.2.2.2,hh.1,hh.2,ht.1,ht.2] + +lemma sourceCells_pairwise_disjoint {T len : ℝ} (hlen : 0 < len) : + Pairwise fun i j : ℕ => Disjoint + (Ioc (sourceCellLo len i) (sourceCellHi T len i)) + (Ioc (sourceCellLo len j) (sourceCellHi T len j)) := by + intro i j hij + apply Set.disjoint_left.mpr + intro t hi hj + have hd (k : ℕ) : sourceCellHi T len k ≤ ((k+1:ℕ):ℝ)*len := min_le_right _ _ + rcases lt_or_gt_of_ne hij with hh | hh + · have hle : ((i+1:ℕ):ℝ)*len ≤ (j:ℝ)*len := + mul_le_mul_of_nonneg_right (by exact_mod_cast Nat.succ_le_of_lt hh) hlen.le + exact (not_lt_of_ge ((hi.2.trans (hd i)).trans hle)) hj.1 + · have hle : ((j+1:ℕ):ℝ)*len ≤ (i:ℝ)*len := + mul_le_mul_of_nonneg_right (by exact_mod_cast Nat.succ_le_of_lt hh) hlen.le + exact (not_lt_of_ge ((hj.2.trans (hd j)).trans hle)) hi.1 + +end RVM + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff ENNReal + +namespace RVM + +def goodFieldConeMass (s : Solution) (t : ℝ) (x : Vec) : ℝ≥0∞ := + ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, + ENNReal.ofReal ((t-r)^2 * goodField (s.E (r,x-(t-r) • n.1)) + (s.B (r,x-(t-r) • n.1)) n.1^2) ∂sphereMeasure + +def goodConeIntegrand (s : Solution) (t : ℝ) (x : Vec) (r : ℝ) (n : Sphere) : ℝ := + (t-r)^2 * goodConeDensity s (r,x-(t-r) • n.1) n.1 + +lemma EnergyPrefix.goodConeIntegrand_continuous {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) : + ContinuousOn (Function.uncurry (goodConeIntegrand s t x)) (Icc 0 t ×ˢ univ) := + EnergyPrefix.goodConeDensity_cone_continuous (hs.mono ht.2) ht.1 x + +lemma EnergyPrefix.goodConeIntegrand_nonneg {s : Solution} {T t r : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (hr : r∈Icc 0 t) (x : Vec) (n : Sphere) : + 0≤goodConeIntegrand s t x r n := + mul_nonneg (sq_nonneg _) (EnergyPrefix.goodConeDensity_bounds (hs.mono ht.2) hr _ (sphere_norm n)).1 + +lemma EnergyPrefix.goodConeIntegrand_sphere_continuous {s : Solution} {T t r : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (hr : r∈Icc 0 t) (x : Vec) : + Continuous (goodConeIntegrand s t x r) := + (hs.goodConeIntegrand_continuous ht x).comp_continuous + (continuous_const.prodMk continuous_id) (fun n => ⟨hr,mem_univ n⟩) + +lemma EnergyPrefix.goodConeIntegrand_sphere_integral_continuous {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) : + ContinuousOn (fun r => ∫ n : Sphere, goodConeIntegrand s t x r n ∂sphereMeasure) (Icc 0 t) := by + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ + (hs.goodConeIntegrand_continuous ht x) + exact fun r n _ hn => (hn (mem_univ n)).elim + +lemma EnergyPrefix.goodConeIntegrand_lintegral_eq {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) : + (∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, ENNReal.ofReal (goodConeIntegrand s t x r n) ∂sphereMeasure) = + ENNReal.ofReal (∫ r in Icc 0 t, ∫ n : Sphere, goodConeIntegrand s t x r n ∂sphereMeasure) := by + calc + _ = ∫⁻ r in Icc 0 t, ENNReal.ofReal (∫ n : Sphere, goodConeIntegrand s t x r n ∂sphereMeasure) := by + apply setLIntegral_congr_fun measurableSet_Icc + intro r hr + exact (ofReal_integral_eq_lintegral_ofReal + (integrableOn_univ.mp + ((hs.goodConeIntegrand_sphere_continuous ht hr x).continuousOn.integrableOn_compact isCompact_univ)) + (ae_of_all _ (hs.goodConeIntegrand_nonneg ht hr x))).symm + _ = _ := (ofReal_integral_eq_lintegral_ofReal + ((hs.goodConeIntegrand_sphere_integral_continuous ht x).integrableOn_compact isCompact_Icc) + (ae_restrict_of_forall_mem measurableSet_Icc + (fun r hr => integral_nonneg (hs.goodConeIntegrand_nonneg ht hr x)))).symm + +lemma EnergyPrefix.goodFieldConeMass_le_density {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) : + goodFieldConeMass s t x ≤ + ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, ENNReal.ofReal (goodConeIntegrand s t x r n) ∂sphereMeasure := by + apply setLIntegral_mono' measurableSet_Icc + intro r hr + apply lintegral_mono + intro n + apply ENNReal.ofReal_le_ofReal + apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) + have hp := EnergyPrefix.particle_cone_nonneg (hs.mono ht.2) hr (x-(t-r) • n.1) (sphere_norm n) + dsimp [goodConeDensity,goodField] + linarith + +lemma EnergyPrefix.goodFieldConeMass_bound {s : Solution} {T t : ℝ} + (hs : EnergyPrefix s T) (ht : t∈Icc 0 T) (x : Vec) : + goodFieldConeMass s t x ≤ ENNReal.ofReal (4*(∫ y : Vec, totalEnergy s (0,y))) := by + refine (hs.goodFieldConeMass_le_density ht x).trans ?_ + rw [hs.goodConeIntegrand_lintegral_eq ht x] + apply ENNReal.ofReal_le_ofReal + have hh := EnergyPrefix.goodConeDensity_time_integral_bound (hs.mono ht.2) ht.1 x + simpa only [intervalIntegral.integral_of_le ht.1,integral_Icc_eq_integral_Ioc,goodConeIntegrand] using hh + +lemma dyadicWindow_single_sum_indicator {α : Type*} (k : ℕ) (S : Finset ℕ) + (G : ℕ → Set α) (p : α) (e : ℝ≥0∞) {x : ℝ} + (hG : ∀ n∈S, p∈G n → DyadicWindow k n x) : + (∑ n∈S, (G n).indicator (fun _ => e) p) ≤ (4*k+1 : ℕ)*e := by + classical + have hc : (S.filter (fun n => p∈G n)).card≤4*k+1 := by + apply dyadicWindow_card_le + intro n hn + exact hG n (Finset.mem_filter.mp hn).1 (Finset.mem_filter.mp hn).2 + have heq : (∑ n∈S, (G n).indicator (fun _ => e) p)= + (S.filter (fun n => p∈G n)).card*e := by + simp only [Set.indicator] + rw [← Finset.sum_filter] + simp only [Finset.sum_const,nsmul_eq_mul] + rw [heq] + exact mul_le_mul' (by exact_mod_cast hc) le_rfl + +lemma finset_sum_lintegral_le {α ι : Type*} [MeasurableSpace α] (μ : Measure α) + (S : Finset ι) (f : ι → α → ℝ≥0∞) : + (∑ i∈S, ∫⁻ x, f i x ∂μ) ≤ ∫⁻ x, ∑ i∈S, f i x ∂μ := by + classical + induction S using Finset.induction_on with + | empty => simp + | @insert i S hi ih => + simp only [Finset.sum_insert hi] + exact (add_le_add le_rfl ih).trans (le_lintegral_add _ _) + +def receiverAngularSet (a : ℝ → Vec) (k j : ℕ) (t : ℝ) : Set Sphere := + {n | DyadicWindow k j (Real.sqrt ((1-dot n.1 (a t))/2))} + +def goodFieldBinConeMass (s : Solution) (X a : ℝ → Vec) (k j : ℕ) (t : ℝ) : ℝ≥0∞ := + ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, + (receiverAngularSet a k j t).indicator (fun n => + ENNReal.ofReal ((t-r)^2 * goodField (s.E (r,X t-(t-r) • n.1)) + (s.B (r,X t-(t-r) • n.1)) n.1^2)) n ∂sphereMeasure + +def goodFieldBudget (s : Solution) (X a : ℝ → Vec) (k : ℕ) (lo hi I : ℝ) (j : ℕ) : ℝ≥0∞ := + (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc lo hi, goodFieldBinConeMass s X a k j t + +lemma goodFieldBinConeMass_sum_le (s : Solution) (X a : ℝ → Vec) + (k : ℕ) (S : Finset ℕ) (t : ℝ) : + (∑ j∈S, goodFieldBinConeMass s X a k j t) ≤ + (4*k+1:ℕ)*goodFieldConeMass s t (X t) := by + unfold goodFieldBinConeMass + calc + _ ≤ ∫⁻ r in Icc 0 t, ∑ j∈S, ∫⁻ n : Sphere, + (receiverAngularSet a k j t).indicator (fun n => + ENNReal.ofReal ((t-r)^2 * goodField (s.E (r,X t-(t-r) • n.1)) + (s.B (r,X t-(t-r) • n.1)) n.1^2)) n ∂sphereMeasure := + finset_sum_lintegral_le _ _ _ + _ ≤ ∫⁻ r in Icc 0 t, ∫⁻ n : Sphere, + (4*k+1:ℕ)*ENNReal.ofReal ((t-r)^2 * goodField (s.E (r,X t-(t-r) • n.1)) + (s.B (r,X t-(t-r) • n.1)) n.1^2) ∂sphereMeasure := by + apply lintegral_mono + intro r + refine (finset_sum_lintegral_le _ _ _).trans (lintegral_mono (fun n => ?_)) + exact dyadicWindow_single_sum_indicator k S (receiverAngularSet a k · t) n _ + (fun j _ hj => hj) + _ = _ := by + simp only [goodFieldConeMass,lintegral_const_mul' _ _ (by finiteness : ((4*k+1:ℕ):ℝ≥0∞)≠⊤)] + +lemma EnergyPrefix.goodFieldBudget_sum_bound {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (X a : ℝ → Vec) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) (S : Finset ℕ) : + (∑ j∈S, goodFieldBudget s X a k lo hi I j) ≤ + (ENNReal.ofReal I)⁻¹ * (4*k+1:ℕ) * ENNReal.ofReal (hi-lo) * + ENNReal.ofReal (4*(∫ y : Vec, totalEnergy s (0,y))) := by + unfold goodFieldBudget + rw [← Finset.mul_sum] + calc + _ ≤ (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc lo hi, + (4*k+1:ℕ)*ENNReal.ofReal (4*(∫ y : Vec, totalEnergy s (0,y))) := by + apply mul_le_mul' le_rfl + refine (finset_sum_lintegral_le _ _ _).trans ?_ + apply setLIntegral_mono' measurableSet_Icc + intro t ht + exact (goodFieldBinConeMass_sum_le s X a k S t).trans + (mul_le_mul' le_rfl (hs.goodFieldConeMass_bound (hJ ht) (X t))) + _ = _ := by + rw [lintegral_const,Measure.restrict_apply_univ,Real.volume_Icc] + ac_rfl + +lemma EnergyPrefix.goodFieldBudget_tsum_bound {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (X a : ℝ → Vec) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) : + (∑' j : ℕ, goodFieldBudget s X a k lo hi I j) ≤ + (ENNReal.ofReal I)⁻¹ * (4*k+1:ℕ) * ENNReal.ofReal (hi-lo) * + ENNReal.ofReal (4*(∫ y : Vec, totalEnergy s (0,y))) := by + rw [ENNReal.tsum_eq_iSup_sum] + exact iSup_le (hs.goodFieldBudget_sum_bound X a k hJ) + +lemma EnergyPrefix.goodFieldBudget_uniform {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (X a : ℝ → Vec) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) (hI : 0 sq_nonneg ‖s.B (t,x)‖))] + apply ENNReal.ofReal_le_ofReal + rw [← (hs.mono ht.2).energy_conservation ht.1,← integral_const_mul] + apply integral_mono (EnergyPrefix.prefix_integrable_norm_sq hs.B_L2 ht) + ((hs.total_energy_integrable ht).const_mul 2) + intro x + dsimp only [totalEnergy] + nlinarith [hs.particle_energy_nonneg ht x,sq_nonneg ‖s.E (t,x)‖] + +def arrivalAngularSet (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k j : ℕ) : Set (ℝ × Vec) := + {p | (p∈arrivalDomain α zX T ∧ + DyadicWindow k j (Real.sqrt ((1-dot (arrivalDirection α zX T p) + (arrivalVelocity α zX T p))/2))) ∨ + (p∈arrivalFinalDomain α zX T ∧ + DyadicWindow k j (Real.sqrt ((1-dot ((T-p.1)⁻¹ • ((α zX T).1-p.2)) + (velocity (α zX T).2))/2)))} + +lemma PhaseFlowOn.measurable_arrivalAngularSet {E B : Field} {T : ℝ} + (F : PhaseFlowOn E B T) (zX : Phase) (k j : ℕ) : + MeasurableSet (arrivalAngularSet F.flow zX T k j) := by + classical + let U := arrivalDomain F.flow zX T + let b : ℝ × Vec → ℝ := fun p => Real.sqrt ((1-dot + (arrivalDirection F.flow zX T p) (arrivalVelocity F.flow zX T p))/2) + have hb : ContinuousOn b U := by + intro p hp + exact (((continuousAt_const.sub (continuous_dot.continuousAt.comp ((F.arrivalDirection_continuousAt zX hp).prodMk + (F.arrivalVelocity_continuousAt zX hp)))).div_const 2).sqrt).continuousWithinAt + have hm : Measurable (U.indicator b) := hb.measurable_piecewise continuousOn_const + (F.isOpen_arrivalDomain zX).measurableSet + have hopen : MeasurableSet {p | p∈U ∧ DyadicWindow k j (b p)} := by + convert (F.isOpen_arrivalDomain zX).measurableSet.inter + ((measurableSet_dyadicWindow k j).preimage hm) using 1 + ext p + change (p∈U ∧ DyadicWindow k j (b p)) ↔ + (p∈U ∧ DyadicWindow k j (U.indicator b p)) + by_cases hp : p∈U <;> simp [hp] + have hfinal : MeasurableSet (arrivalFinalDomain F.flow zX T) := + (measurable_fst (measurableSet_Ioo)).inter + (measurableSet_eq_fun (measurable_fst.add (measurable_const.sub measurable_snd).norm) measurable_const) + have hbfinal : Measurable (fun p : ℝ × Vec => Real.sqrt ((1-dot + ((T-p.1)⁻¹ • ((F.flow zX T).1-p.2)) (velocity (F.flow zX T).2))/2)) := by + unfold dot + fun_prop + exact hopen.union (hfinal.inter ((measurableSet_dyadicWindow k j).preimage hbfinal)) + +lemma arrivalAngularSet_sum_indicator (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (k : ℕ) (S : Finset ℕ) (p : ℝ × Vec) (e : ℝ≥0∞) : + (∑ j∈S, (arrivalAngularSet α zX T k j).indicator (fun _ => e) p) ≤ + (2*(4*k+1):ℕ)*e := by + classical + let G₁ : ℕ → Set (ℝ × Vec) := fun j => + {r | r∈arrivalDomain α zX T ∧ DyadicWindow k j (Real.sqrt ((1-dot + (arrivalDirection α zX T r) (arrivalVelocity α zX T r))/2))} + let G₂ : ℕ → Set (ℝ × Vec) := fun j => + {r | r∈arrivalFinalDomain α zX T ∧ DyadicWindow k j (Real.sqrt ((1-dot + ((T-r.1)⁻¹ • ((α zX T).1-r.2)) (velocity (α zX T).2))/2))} + have h₁ := dyadicWindow_single_sum_indicator k S G₁ p e (fun _ _ h => h.2) + have h₂ := dyadicWindow_single_sum_indicator k S G₂ p e (fun _ _ h => h.2) + have hpart (j : ℕ) : (arrivalAngularSet α zX T k j).indicator (fun _ => e) p ≤ + (G₁ j).indicator (fun _ => e) p+(G₂ j).indicator (fun _ => e) p := by + by_cases hp : p∈arrivalAngularSet α zX T k j + · rw [indicator_of_mem hp] + rcases hp with h|h + · rw [indicator_of_mem (show p∈G₁ j from h)] + exact le_add_right le_rfl + · rw [indicator_of_mem (show p∈G₂ j from h)] + exact le_add_left le_rfl + · rw [indicator_of_notMem hp]; exact zero_le + calc + _ ≤ ∑ j∈S, ((G₁ j).indicator (fun _ => e) p+(G₂ j).indicator (fun _ => e) p) := + Finset.sum_le_sum (fun j _ => hpart j) + _ ≤ (4*k+1:ℕ)*e+(4*k+1:ℕ)*e := by + rw [Finset.sum_add_distrib] + exact add_le_add h₁ h₂ + _ = _ := by push_cast; ring + +def magneticFieldBudget (s : Solution) (α : Phase → ℝ → Phase) (zX : Phase) + (T : ℝ) (k : ℕ) (lo hi I : ℝ) (j : ℕ) : ℝ≥0∞ := + (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc lo hi, ∫⁻ x : Vec, + (arrivalAngularSet α zX T k j).indicator (fun p => ENNReal.ofReal (‖s.B p‖^2)) (t,x) + +lemma EnergyPrefix.magneticFieldBudget_sum_bound {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (α : Phase → ℝ → Phase) (zX : Phase) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) (S : Finset ℕ) : + (∑ j∈S, magneticFieldBudget s α zX T k lo hi I j) ≤ + (ENNReal.ofReal I)⁻¹*(2*(4*k+1):ℕ)*ENNReal.ofReal (hi-lo)* + ENNReal.ofReal (2*(∫ x : Vec, totalEnergy s (0,x))) := by + unfold magneticFieldBudget + rw [← Finset.mul_sum] + calc + _ ≤ (ENNReal.ofReal I)⁻¹ * ∫⁻ t in Icc lo hi, ∫⁻ x : Vec, + (2*(4*k+1):ℕ)*ENNReal.ofReal (‖s.B (t,x)‖^2) := by + apply mul_le_mul' le_rfl + refine (finset_sum_lintegral_le _ _ _).trans ?_ + apply lintegral_mono + intro t + exact (finset_sum_lintegral_le _ _ _).trans + (lintegral_mono (fun x => arrivalAngularSet_sum_indicator α zX T k S (t,x) _)) + _ ≤ (ENNReal.ofReal I)⁻¹ * ∫⁻ _t in Icc lo hi, + (2*(4*k+1):ℕ)*ENNReal.ofReal (2*(∫ x : Vec, totalEnergy s (0,x))) := by + apply mul_le_mul' le_rfl + apply setLIntegral_mono' measurableSet_Icc + intro t ht + rw [lintegral_const_mul' _ _ (by finiteness : ((2*(4*k+1):ℕ):ℝ≥0∞)≠⊤)] + exact mul_le_mul' le_rfl (hs.magnetic_lintegral_bound (hJ ht)) + _ = _ := by + rw [lintegral_const,Measure.restrict_apply_univ,Real.volume_Icc] + ac_rfl + +lemma EnergyPrefix.magneticFieldBudget_tsum_bound {s : Solution} {T lo hi I : ℝ} + (hs : EnergyPrefix s T) (α : Phase → ℝ → Phase) (zX : Phase) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) : + (∑' j : ℕ, magneticFieldBudget s α zX T k lo hi I j) ≤ + (ENNReal.ofReal I)⁻¹*(2*(4*k+1):ℕ)*ENNReal.ofReal (hi-lo)* + ENNReal.ofReal (2*(∫ x : Vec, totalEnergy s (0,x))) := by + rw [ENNReal.tsum_eq_iSup_sum] + exact iSup_le (hs.magneticFieldBudget_sum_bound α zX k hJ) + +lemma EnergyPrefix.magneticFieldBudget_uniform {s : Solution} {T lo hi I C : ℝ} + (hs : EnergyPrefix s T) (α : Phase → ℝ → Phase) (zX : Phase) (k : ℕ) + (hJ : Icc lo hi⊆Icc (0:ℝ) T) (hI : 0 electricResidual_box hE hB hj hρ + (fun r hr => hEw r hr.le) (fun r hr => hBw r hr.le) hcont hr) _ + (electricResidual_initial_deriv hE hB hj hρ (hEw 0 le_rfl) hBt hDE) ht x + intro y + simp only [electricResidual,hEt] + module + have hS : magneticResidual E B (t,x)=0 := by + apply field_wave_zero (contDiff_magneticResidual hE hB) + (fun r hr => magneticResidual_box hE hB hj hρ + (fun r hr => hEw r hr.le) (fun r hr => hBw r hr.le) hr) _ + (magneticResidual_initial_deriv hE hB hj (hBw 0 le_rfl) hEt hDB) ht x + intro y + simp only [magneticResidual,hBt,neg_add_cancel] + unfold electricResidual at hR + unfold magneticResidual at hS + constructor + · linear_combination (norm := module) hR + · linear_combination (norm := module) hS + +def sourceField (J : Field) (p : ℝ × Vec) : Vec := + WithLp.toLp 2 (fun i => sourceWave (fun q => J q i) p) + +lemma sourceField_apply (J : Field) (p : ℝ × Vec) (i : Fin 3) : + sourceField J p i = sourceWave (fun q => J q i) p := rfl + +lemma contDiff_sourceField {J : Field} (hJ : ContDiff ℝ ∞ J) : + ContDiff ℝ ∞ (sourceField J) := by + apply contDiff_euclidean.mpr + intro i + exact contDiff_sourceWave (contDiff_component hJ i) + +lemma sourceField_initial (J : Field) (x : Vec) : sourceField J (0,x)=0 := by + ext i + exact sourceWave_initial_value (fun p => J p i) x + +lemma sourceField_initial_deriv {J : Field} (hJ : ContDiff ℝ ∞ J) (x : Vec) : + dirD (sourceField J) (1,0) (0,x)=0 := by + ext i + rw [← dirD_component ((contDiff_sourceField hJ).differentiable (by simp))] + exact sourceWave_time_initial (contDiff_component hJ i) x + +lemma sourceField_box {J : Field} (hJ : ContDiff ℝ ∞ J) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : fieldBox (sourceField J) (t,x)=J (t,x) := by + ext i + exact sourceWave_box (contDiff_component hJ i) ht x + +lemma freeField_fieldBox {G H : Vec → Vec} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {t : ℝ} (ht : 0 ≤ t) (x : Vec) : fieldBox (freeField G H) (t,x)=0 := by + ext i + exact freeField_box hG hH ht x i + +def maxwellElectric (E₀ B₀ : Vec → Vec) (ρ : ℝ × Vec → ℝ) (j : Field) : Field := + fun p => freeField E₀ (fun x => curl B₀ x-j (0,x)) p + + sourceField (fun q => -waveGradient ρ q-dirD j (1,0) q) p + +def maxwellMagnetic (E₀ B₀ : Vec → Vec) (j : Field) : Field := + fun p => freeField B₀ (fun x => -curl E₀ x) p+sourceField (spaceCurl j) p + +lemma contDiff_maxwellElectric {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) : + ContDiff ℝ ∞ (maxwellElectric E₀ B₀ ρ j) := + (contDiff_freeField hE ((contDiff_curl hB).sub (contDiff_field_slice hj 0))).add + (contDiff_sourceField ((contDiff_waveGradient hρ).neg.sub (contDiff_dirD hj _))) + +lemma contDiff_maxwellMagnetic {E₀ B₀ : Vec → Vec} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) (hj : ContDiff ℝ ∞ j) : + ContDiff ℝ ∞ (maxwellMagnetic E₀ B₀ j) := + (contDiff_freeField hB (contDiff_curl hE).neg).add + (contDiff_sourceField (contDiff_spaceCurl hj)) + +lemma maxwellElectric_initial {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (x : Vec) : maxwellElectric E₀ B₀ ρ j (0,x)=E₀ x := by + simp only [maxwellElectric,freeField_initial hE,sourceField_initial,add_zero] + +lemma maxwellMagnetic_initial {E₀ B₀ : Vec → Vec} {j : Field} + (hB : ContDiff ℝ ∞ B₀) (x : Vec) : maxwellMagnetic E₀ B₀ j (0,x)=B₀ x := by + simp only [maxwellMagnetic,freeField_initial hB,sourceField_initial,add_zero] + +lemma maxwellElectric_initial_deriv {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) (x : Vec) : + dirD (maxwellElectric E₀ B₀ ρ j) (1,0) (0,x)=curl B₀ x-j (0,x) := by + unfold maxwellElectric + rw [dirD_add ((contDiff_freeField hE ((contDiff_curl hB).sub + (contDiff_field_slice hj 0))).differentiable (by simp)) + ((contDiff_sourceField ((contDiff_waveGradient hρ).neg.sub + (contDiff_dirD hj _))).differentiable (by simp))] + dsimp only + rw [freeField_initial_deriv hE ((contDiff_curl hB).sub (contDiff_field_slice hj 0)), + sourceField_initial_deriv ((contDiff_waveGradient hρ).neg.sub (contDiff_dirD hj _)),add_zero] + +lemma maxwellMagnetic_initial_deriv {E₀ B₀ : Vec → Vec} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hj : ContDiff ℝ ∞ j) (x : Vec) : + dirD (maxwellMagnetic E₀ B₀ j) (1,0) (0,x)= -curl E₀ x := by + unfold maxwellMagnetic + rw [dirD_add ((contDiff_freeField hB (contDiff_curl hE).neg).differentiable (by simp)) + ((contDiff_sourceField (contDiff_spaceCurl hj)).differentiable (by simp))] + dsimp only + rw [freeField_initial_deriv hB (contDiff_curl hE).neg, + sourceField_initial_deriv (contDiff_spaceCurl hj),add_zero] + +lemma maxwellElectric_box {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + fieldBox (maxwellElectric E₀ B₀ ρ j) (t,x)= -waveGradient ρ (t,x)-dirD j (1,0) (t,x) := by + unfold maxwellElectric + rw [fieldBox_add (contDiff_freeField hE ((contDiff_curl hB).sub (contDiff_field_slice hj 0))) + (contDiff_sourceField ((contDiff_waveGradient hρ).neg.sub (contDiff_dirD hj _)))] + dsimp only + rw [freeField_fieldBox hE ((contDiff_curl hB).sub (contDiff_field_slice hj 0)) ht, + sourceField_box ((contDiff_waveGradient hρ).neg.sub (contDiff_dirD hj _)) ht,zero_add] + +lemma maxwellMagnetic_box {E₀ B₀ : Vec → Vec} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hj : ContDiff ℝ ∞ j) {t : ℝ} (ht : 0 ≤ t) (x : Vec) : + fieldBox (maxwellMagnetic E₀ B₀ j) (t,x)=spaceCurl j (t,x) := by + unfold maxwellMagnetic + rw [fieldBox_add (contDiff_freeField hB (contDiff_curl hE).neg) + (contDiff_sourceField (contDiff_spaceCurl hj))] + dsimp only + rw [freeField_fieldBox hB (contDiff_curl hE).neg ht,sourceField_box (contDiff_spaceCurl hj) ht,zero_add] + +lemma spaceDiv_of_slice_eq {F G : Field} (hF : Differentiable ℝ F) + (hG : Differentiable ℝ G) {t : ℝ} (he : ∀ x, F (t,x)=G (t,x)) (x : Vec) : + spaceDiv F (t,x)=spaceDiv G (t,x) := by + rw [spaceDiv_slice hF,spaceDiv_slice hG,show (fun y => F (t,y)) = + (fun y => G (t,y)) from funext he] + +lemma maxwell_first_order {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) + (hcont : ∀ t, 0 maxwellElectric_box hE hB hρ hj hr) + (fun r hr => maxwellMagnetic_box hE hB hj hr) hcont + (fun y => ?_) (fun y => ?_) (fun y => ?_) (fun y => ?_) ht x + · rw [maxwellElectric_initial_deriv hE hB hρ hj, + spaceCurl_slice (hBc.differentiable (by simp))] + simp only [maxwellMagnetic_initial hB] + · rw [maxwellMagnetic_initial_deriv hE hB hj, + spaceCurl_slice (hEc.differentiable (by simp))] + simp only [maxwellElectric_initial hE] + · rw [spaceDiv_slice (hEc.differentiable (by simp))] + simpa only [maxwellElectric_initial hE] using hDE y + · rw [spaceDiv_slice (hBc.differentiable (by simp))] + simpa only [maxwellMagnetic_initial hB] using hDB y + +lemma spaceDiv_add {F G : Field} (hF : Differentiable ℝ F) + (hG : Differentiable ℝ G) (p : ℝ × Vec) : + spaceDiv (fun q => F q+G q) p=spaceDiv F p+spaceDiv G p := by + simp only [spaceDiv,dirD_add hF hG,PiLp.add_apply,Finset.sum_add_distrib] + +lemma spaceDiv_sub {F G : Field} (hF : Differentiable ℝ F) + (hG : Differentiable ℝ G) (p : ℝ × Vec) : + spaceDiv (fun q => F q-G q) p=spaceDiv F p-spaceDiv G p := by + simp only [spaceDiv,dirD_sub hF hG,PiLp.sub_apply,Finset.sum_sub_distrib] + +lemma spaceDiv_neg (F : Field) (p : ℝ × Vec) : + spaceDiv (fun q => -F q) p= -spaceDiv F p := by + simp only [spaceDiv,dirD_neg_field,PiLp.neg_apply,Finset.sum_neg_distrib] + +lemma scalar_time_constant {u : ℝ × Vec → ℝ} (hu : ContDiff ℝ ∞ u) + (hdu : ∀ t, 0 dirD u (1,0) (r,x)) := + (contDiff_dirD hu _).continuous.comp (continuous_id.prodMk continuous_const) + have he : EqOn (fun r : ℝ => dirD u (1,0) (r,x)) (fun _ => (0:ℝ)) (Ioi 0) := + fun r hr => hdu r hr x + have hder (r : ℝ) (hr : 0 ≤ r) : deriv (fun s : ℝ => u (s,x)) r=0 := by + rw [deriv_slice_eq_dirD (hu.differentiable (by simp))] + exact he.closure hc continuous_const (by simpa only [closure_Ioi,mem_Ici] using hr) + have hdiff : Differentiable ℝ (fun r : ℝ => u (r,x)) := + (hu.differentiable (by simp)).comp (differentiable_id.prodMk (differentiable_const x)) + have hn := (convex_Icc (0:ℝ) t).norm_image_sub_le_of_norm_deriv_le + (fun r _hr => hdiff r) (C:=0) (fun r hr => by rw [hder r hr.1]; simp) + ⟨le_rfl,ht⟩ ⟨ht,le_rfl⟩ + have hz : u (t,x)-u (0,x)=0 := norm_eq_zero.mp (le_antisymm (by simpa using hn) (norm_nonneg _)) + exact sub_eq_zero.mp hz + +lemma maxwell_gauss_propagation {E B j : Field} {ρ : ℝ × Vec → ℝ} + (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) + (hj : ContDiff ℝ ∞ j) (hρ : ContDiff ℝ ∞ ρ) + (hfirst : ∀ t, 0 ≤ t → ∀ x, + dirD E (1,0) (t,x)=spaceCurl B (t,x)-j (t,x) ∧ + dirD B (1,0) (t,x)= -spaceCurl E (t,x)) + (hcont : ∀ t, 0 spaceDiv E p-ρ p) (1,0) (r,y)=0 := by + intro r hr y + rw [dirD_sub ((contDiff_spaceDiv hE).differentiable (by simp)) + (hρ.differentiable (by simp))] + dsimp only + rw [dirD_spaceDiv hE,spaceDiv_of_slice_eq + ((contDiff_dirD hE _).differentiable (by simp)) + (((contDiff_spaceCurl hB).sub hj).differentiable (by simp)) + (fun z => (hfirst r hr.le z).1), + spaceDiv_sub ((contDiff_spaceCurl hB).differentiable (by simp)) + (hj.differentiable (by simp)),spaceDiv_spaceCurl hB] + linarith [hcont r hr y] + have hdv : ∀ r, 0 (hfirst r hr.le z).2),spaceDiv_neg,spaceDiv_spaceCurl hE,neg_zero] + constructor + · have he := scalar_time_constant ((contDiff_spaceDiv hE).sub hρ) hdu ht x + rw [hDE,sub_self] at he + exact sub_eq_zero.mp he + · rw [scalar_time_constant (contDiff_spaceDiv hB) hdv ht,hDB] + +theorem constructed_maxwell_equations {E₀ B₀ : Vec → Vec} {ρ : ℝ × Vec → ℝ} {j : Field} + (hE : ContDiff ℝ ∞ E₀) (hB : ContDiff ℝ ∞ B₀) + (hρ : ContDiff ℝ ∞ ρ) (hj : ContDiff ℝ ∞ j) + (hcont : ∀ t, 0 ?_) (fun y => ?_) ht x + · rw [spaceDiv_slice (hEc.differentiable (by simp))] + simpa only [maxwellElectric_initial hE] using hDE y + · rw [spaceDiv_slice (hBc.differentiable (by simp))] + simpa only [maxwellMagnetic_initial hB] using hDB y + +lemma causal_local_energy_bound {e : ℝ × Vec → ℝ} {S : Field} {T R ε : ℝ} + (he : ContDiff ℝ ∞ e) (hS : ContDiff ℝ ∞ S) + (hT : 0 ≤ T) (hR : T ≤ R) (hε : 0<ε) + (he0 : ∀ t ∈ Icc 0 T, ∀ x, 0 ≤ e (t,x)) + (hflux : ∀ t ∈ Ioo 0 T, ∀ x, ‖S (t,x)‖ ≤ e (t,x)) + (hcons : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => e (r,x)) t+divergence (fun y => S (t,y)) x=0) + (x₀ : Vec) : + (∫ x : Vec, coneCutoff R ε x₀ (T,x)*e (T,x)) ≤ + ∫ x : Vec, coneCutoff R ε x₀ (0,x)*e (0,x) := by + let g := coneCutoff R ε x₀ + let G : ℝ → ℝ := fun t => ∫ x : Vec, g (t,x)*e (t,x) + have hsub : Icc (0:ℝ) T ⊆ Icc 0 R := fun t ht => ⟨ht.1,ht.2.trans hR⟩ + have hgc : ContDiff ℝ 1 g := contDiff_coneCutoff R ε x₀ + have hgz : ∀ t ∈ Icc 0 T, ∀ x ∉ closedBall x₀ R, g (t,x)=0 := by + intro t ht x hx + exact coneCutoff_zero_outside hε (hsub ht) hx + have hGc : ContinuousOn G (Icc 0 T) := by + apply continuousOn_integral_uniform_support (isCompact_closedBall x₀ R) + (hgc.continuous.continuousOn.mul he.continuous.continuousOn) + intro t ht x hx + change g (t,x)*e (t,x)=0 + rw [hgz t ht x hx,zero_mul] + have hder (t : ℝ) (ht : t ∈ Ioo 0 T) := + deriv_moving_local_energy isOpen_Ioo (he.of_le (by simp)).contDiffOn + (hS.of_le (by simp)).contDiffOn hcons (isCompact_closedBall x₀ R) hgc.contDiffOn + (fun r hr x hx => hgz r ⟨hr.1.le,hr.2.le⟩ x hx) ht + have hanti : AntitoneOn G (Icc 0 T) := by + apply antitoneOn_of_deriv_nonpos (convex_Icc 0 T) hGc + · intro t ht + rw [interior_Icc] at ht + exact (hder t ht).differentiableAt.differentiableWithinAt + · intro t ht + rw [interior_Icc] at ht + rw [(hder t ht).deriv] + apply integral_nonpos + intro x + exact cone_energy_integrand_nonpos hε (hsub ⟨ht.1.le,ht.2.le⟩).2 + (he0 t ⟨ht.1.le,ht.2.le⟩ x) (hflux t ht x) x x₀ + exact hanti ⟨le_rfl,hT⟩ ⟨hT,le_rfl⟩ hT + +lemma coneCutoff_one_on_ball {T r : ℝ} (hr : 0 ≤ r) {x : Vec} + (hx : x ∈ closedBall (0:Vec) r) : coneCutoff (T+r+1) 1 0 (T,x)=1 := by + apply Real.smoothTransition.one_of_one_le + have hn : ‖x‖ ≤ r := by simpa only [mem_closedBall,dist_zero_right] using hx + dsimp [coneArgument] + simp only [sub_zero,div_one] + nlinarith [sq_le_sq₀ (norm_nonneg x) hr |>.mpr hn] + +lemma causal_energy_integrable {e : ℝ × Vec → ℝ} {S : Field} {T : ℝ} + (he : ContDiff ℝ ∞ e) (hS : ContDiff ℝ ∞ S) (hT : 0 ≤ T) + (he0 : ∀ t ∈ Icc 0 T, ∀ x, 0 ≤ e (t,x)) + (hflux : ∀ t ∈ Ioo 0 T, ∀ x, ‖S (t,x)‖ ≤ e (t,x)) + (hcons : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => e (r,x)) t+divergence (fun y => S (t,y)) x=0) + (hinit : Integrable (fun x => e (0,x))) : + Integrable (fun x => e (T,x)) ∧ (∫ x : Vec, e (T,x)) ≤ ∫ x : Vec, e (0,x) := by + have hball (n : ℕ) : (∫ x in closedBall (0:Vec) (n:ℝ), e (T,x)) ≤ ∫ x : Vec, e (0,x) := by + let R : ℝ := T+(n:ℝ)+1 + let g := coneCutoff R 1 (0:Vec) + have hR : T ≤ R := by dsimp [R]; linarith [Nat.cast_nonneg (α:=ℝ) n] + have hgC (t : ℝ) (ht : t∈Icc 0 T) : HasCompactSupport (fun x => g (t,x)) := + compactSupport_of_zero_off (isCompact_closedBall (0:Vec) R) + (fun x hx => coneCutoff_zero_outside (by norm_num) ⟨ht.1,ht.2.trans hR⟩ hx) + have hgc (t : ℝ) : Continuous (fun x => g (t,x)) := + (contDiff_coneCutoff R 1 (0:Vec) (k:=1)).continuous.comp (continuous_const.prodMk continuous_id) + have hI (t : ℝ) (ht : t∈Icc 0 T) : Integrable (fun x => g (t,x)*e (t,x)) := + ((hgc t).mul (he.continuous.comp (continuous_const.prodMk continuous_id))).integrable_of_hasCompactSupport + (hgC t ht).mul_right + calc + _ = ∫ x in closedBall (0:Vec) (n:ℝ), g (T,x)*e (T,x) := by + apply setIntegral_congr_fun isClosed_closedBall.measurableSet + intro x hx + change e (T,x)=g (T,x)*e (T,x) + rw [show g (T,x)=1 from coneCutoff_one_on_ball (Nat.cast_nonneg n) hx,one_mul] + _ ≤ ∫ x : Vec, g (T,x)*e (T,x) := + setIntegral_le_integral (hI T ⟨hT,le_rfl⟩) (ae_of_all _ (fun x => + mul_nonneg (Real.smoothTransition.nonneg _) (he0 T ⟨hT,le_rfl⟩ x))) + _ ≤ ∫ x : Vec, g (0,x)*e (0,x) := + causal_local_energy_bound he hS hT hR (by norm_num) he0 hflux hcons 0 + _ ≤ ∫ x : Vec, e (0,x) := by + apply integral_mono (hI 0 ⟨le_rfl,hT⟩) hinit + intro x + exact mul_le_of_le_one_left (he0 0 ⟨le_rfl,hT⟩ x) (Real.smoothTransition.le_one _) + have hcov : AECover (volume : Measure Vec) atTop (fun n : ℕ => closedBall (0:Vec) (n:ℝ)) := + aecover_closedBall tendsto_natCast_atTop_atTop + have hIt : Integrable (fun x => e (T,x)) := + hcov.integrable_of_integral_bounded_of_nonneg_ae (∫ x : Vec, e (0,x)) + (fun _ => (he.continuous.comp (continuous_const.prodMk continuous_id)).continuousOn.integrableOn_compact + (isCompact_closedBall _ _)) (ae_of_all _ (he0 T ⟨hT,le_rfl⟩)) (Eventually.of_forall hball) + exact ⟨hIt,le_of_tendsto (hcov.integral_tendsto_of_countably_generated hIt) (Eventually.of_forall hball)⟩ + +lemma divergence_neg (F : Vec → Vec) (x : Vec) : + divergence (fun y => -F y) x= -divergence F x := by + simp only [divergence,PiLp.neg_apply,spatialPartial,fderiv_fun_neg,neg_apply, + Finset.sum_neg_distrib] + +lemma causal_energy_conserved {e : ℝ × Vec → ℝ} {S : Field} {T : ℝ} + (he : ContDiff ℝ ∞ e) (hS : ContDiff ℝ ∞ S) (hT : 0 ≤ T) + (he0 : ∀ t ∈ Icc 0 T, ∀ x, 0 ≤ e (t,x)) + (hflux : ∀ t ∈ Ioo 0 T, ∀ x, ‖S (t,x)‖ ≤ e (t,x)) + (hcons : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => e (r,x)) t+divergence (fun y => S (t,y)) x=0) + (hinit : Integrable (fun x => e (0,x))) : + Integrable (fun x => e (T,x)) ∧ (∫ x : Vec, e (T,x))=∫ x : Vec, e (0,x) := by + obtain ⟨hIt,hle⟩ := causal_energy_integrable he hS hT he0 hflux hcons hinit + let R : ℝ × Vec → ℝ × Vec := fun p => (T-p.1,p.2) + have hR : ContDiff ℝ ∞ R := (contDiff_const.sub contDiff_fst).prodMk contDiff_snd + have hrev : ∀ t ∈ Ioo 0 T, ∀ x, + deriv (fun r => e (T-r,x)) t+divergence (fun y => -S (T-t,y)) x=0 := by + intro t ht x + have hdt := ((he.differentiable (by simp)).comp + (differentiable_id.prodMk (differentiable_const x)) (T-t)).hasDerivAt + have hh := hdt.comp t ((hasDerivAt_id t).const_sub T) + change HasDerivAt (fun r => e (T-r,x)) (deriv (fun r => e (r,x)) (T-t) * (-1)) t at hh + rw [hh.deriv,divergence_neg] + have hhcons := hcons (T-t) ⟨by linarith [ht.2],by linarith [ht.1]⟩ x + dsimp only [Function.comp_def] at * + linarith + have hrevi : Integrable (fun x => e (T-(0:ℝ),x)) := by simpa using hIt + have hy := causal_energy_integrable (he.comp hR) (hS.comp hR).neg hT + (fun t ht x => he0 (T-t) ⟨by linarith [ht.2],by linarith [ht.1]⟩ x) + (fun t ht x => by + simpa only [Function.comp_def,R,norm_neg] using + (hflux (T-t) ⟨by linarith [ht.2],by linarith [ht.1]⟩ x)) + hrev hrevi + refine ⟨hIt,le_antisymm hle ?_⟩ + simpa only [Function.comp_def,R,sub_self,sub_zero] using hy.2 + +def maxwellEnergy (E B : Field) (p : ℝ × Vec) : ℝ := (‖E p‖^2+‖B p‖^2)/2 + +def maxwellFlux (E B : Field) (p : ℝ × Vec) : Vec := cross (E p) (B p) + +lemma contDiff_maxwellEnergy {E B : Field} (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ContDiff ℝ ∞ (maxwellEnergy E B) := ((hE.norm_sq ℝ).add (hB.norm_sq ℝ)).div_const 2 + +lemma contDiff_maxwellFlux {E B : Field} (hE : ContDiff ℝ ∞ E) (hB : ContDiff ℝ ∞ B) : + ContDiff ℝ ∞ (maxwellFlux E B) := contDiff_cross.comp (hE.prodMk hB) + +lemma maxwellEnergy_nonneg (E B : Field) (p : ℝ × Vec) : 0 ≤ maxwellEnergy E B p := by + unfold maxwellEnergy; positivity + +lemma maxwellFlux_le (E B : Field) (p : ℝ × Vec) : ‖maxwellFlux E B p‖ ≤ maxwellEnergy E B p := + poynting_norm_le_energy (E p) (B p) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceForceConeKernel.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceForceConeKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..993a6c95fd5af96843188c96a9730d6f3f24eca7 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceForceConeKernel.lean @@ -0,0 +1,407 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RepresentativeCosts +import OAI.Analysis.VlasovMaxwell.Regularity.IntegralBallPolarFlip + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +private lemma SmoothClassicalPrefix.sourceForceEnergyPrefix + {datum : Datum} {solution : Solution} {horizon : ℝ} + (hs : SmoothClassicalPrefix datum solution horizon) : EnergyPrefix solution horizon := by + refine ⟨(hs.f_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.E_smooth.of_le (by decide)).mono (fun _ hp => hp.1), + (hs.B_smooth.of_le (by decide)).mono (fun _ hp => hp.1),hs.nonnegative, + hs.E_L2,hs.B_L2,hs.compact,?_,?_⟩ + · intro time ht position momentum + have hh := (hs.equations time ht.1.le ht.2).1 position momentum + rwa [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at hh + · intro time ht position + have he := (hs.equations time ht.1.le ht.2).2.1 position + have hb := (hs.equations time ht.1.le ht.2).2.2.1 position + rw [derivWithin_of_mem_nhds (Ici_mem_nhds ht.1)] at he hb + exact ⟨he,hb⟩ + +def sourceForceConeKernel (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (p : ConeKernelState) : Vec := + normalisedSignedForce (p.1.1-p.1.2) (velocity (α zX p.1.1).2) + (velocity p.2.2.2) p.2.1 (sourceAcceleration s (p.1.2,p.2.2)) + +lemma PhaseFlowOn.actualLabelSignedForce_eq_normalised {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) : + actualLabelSignedForce s F.flow zX T= + labelConeKernel s F.flow zX T (sourceForceConeKernel s F.flow zX) := by + classical + funext p + by_cases hp : p∈labelBranchDomain F.flow zX T + · have hr : branchTime F.flow zX p.2 T p.1-p.1≠0 := + (sub_pos.mpr (F.branch_time_mem zX p.2 hp.1 hp.2).1).ne' + have hn := F.branchDirection_norm zX p.2 hp.1 hp.2 + simp only [actualLabelSignedForce,labelConeKernel,indicator_of_mem hp, + sourceForceConeKernel,labelKernelState,normalisedSignedForce_eq _ _ _ _ hr + (cone_denom_pos _ _ hn).ne' (cone_denom_pos _ _ hn).ne'] + rw [smul_comm (s.f (0,p.2)),smul_smul,←mul_pow,inv_mul_cancel₀ hr,one_pow,one_smul] + · simp only [actualLabelSignedForce,labelConeKernel,indicator_of_notMem hp] + +lemma labelConeKernel_receiver_weight (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (A : ConeKernelState→Vec) (ψ : ℝ→ℝ) (p : ℝ×Phase) : + labelConeKernel s α zX T (fun q=>ψ q.1.1 • A q) p= + ψ (labelReceiverTime α zX T p) • labelConeKernel s α zX T A p := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,labelReceiverTime,indicator_of_mem hp,labelKernelState] + rw [smul_comm (s.f (0,p.2)),smul_comm ((branchTime α zX p.2 T p.1-p.1)⁻¹^2)] + · simp only [labelConeKernel,indicator_of_notMem hp,smul_zero] + +lemma SmoothClassicalPrefix.weighted_retarded_force_label {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (F : PhaseFlowOn s.E s.B T) (zX : Phase) {ψ : ℝ→ℝ} + (hψ : ContinuousOn ψ (Icc 0 T)) : + (∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ∫p,ψ (labelReceiverTime F.flow zX T p) • + actualLabelSignedForce s F.flow zX T p := by + let A : ConeKernelState→Vec := fun p=>ψ p.1.1 • sourceForceConeKernel s F.flow zX p + have hA : ContinuousOn A (coneKernelDomain T) := + (hψ.comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).smul + (F.normalised_source_force_continuousOn hs.sourceForceEnergyPrefix zX) + have hlabel : (fun p=>ψ (labelReceiverTime F.flow zX T p) • actualLabelSignedForce s F.flow zX T p)= + labelConeKernel s F.flow zX T A := by + funext p + rw [F.actualLabelSignedForce_eq_normalised zX] + exact (labelConeKernel_receiver_weight s F.flow zX T _ ψ p).symm + rw [hlabel,F.labelConeKernel_triangle_integral hs.sourceForceEnergyPrefix hT zX hA, + F.triangleConeKernel_integral_sphere hs.sourceForceEnergyPrefix hT zX hA,←integral_smul] + apply setIntegral_congr_fun measurableSet_Ioo + intro t ht + dsimp only + rw [hs.retarded_force_source_polar ht.1 ht.2 _ _ (norm_velocity_lt_one _),add_sub_cancel_left] + rw [smul_comm] + congr 1 + rw [←integral_smul] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + rw [←integral_smul] + apply setIntegral_congr_fun measurableSet_Ioo + intro σ hσ + dsimp only + rw [smul_comm,←integral_smul] + congr 1 + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + dsimp only [A,sourceForceConeKernel] + exact smul_comm _ _ _)) + +def unselectedLabelSignedForce (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (p : ℝ×Phase) : Vec := + (1-labelSelectedCutoff α zX T Q p) • + (ψ (labelReceiverTime α zX T p) • actualLabelSignedForce s α zX T p) + +lemma split_label_force (s : Solution) (α : Phase→ℝ→Phase) (zX : Phase) + (T : ℝ) (Q : Set (Fin 4→ℕ)) (ψ : ℝ→ℝ) (p : ℝ×Phase) : + ψ (labelReceiverTime α zX T p) • actualLabelSignedForce s α zX T p= + unselectedLabelSignedForce s α zX T Q ψ p+selectedLabelSignedForce s α zX T Q ψ p := by + rw [unselectedLabelSignedForce,selectedLabelSignedForce,labelWeight,mul_smul, + smul_comm (ψ (labelReceiverTime α zX T p)),←add_smul] + simp + +lemma PhaseFlowOn.weightedLabelSignedForce_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {ψ : ℝ→ℝ} (hψ : Measurable ψ) (hψb : ∀t∈Icc 0 T,|ψ t|≤1) : + Integrable (fun p=>ψ (labelReceiverTime F.flow zX T p) • actualLabelSignedForce s F.flow zX T p) := by + apply (F.actualLabelSignedForce_integrable hs zX).bdd_smul 1 + (hψ.comp (F.labelReceiverTime_measurable zX)).aestronglyMeasurable + exact Filter.Eventually.of_forall (fun p=>by + simpa only [Real.norm_eq_abs,Function.comp_apply] using hψb _ (F.labelReceiverTime_mem hT zX p)) + +lemma PhaseFlowOn.unselectedLabelSignedForce_integrable {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} (hψ : Measurable ψ) (hψb : ∀t∈Icc 0 T,|ψ t|≤1) : + Integrable (unselectedLabelSignedForce s F.flow zX T Q ψ) := by + have he : unselectedLabelSignedForce s F.flow zX T Q ψ= + (fun p=>ψ (labelReceiverTime F.flow zX T p) • actualLabelSignedForce s F.flow zX T p)- + selectedLabelSignedForce s F.flow zX T Q ψ := by + funext p + exact (eq_sub_iff_add_eq.mpr (split_label_force s F.flow zX T Q ψ p).symm) + rw [he] + exact (F.weightedLabelSignedForce_integrable hs hT zX hψ hψb).sub + (F.selectedLabelSignedForce_integrable hs hT zX Q hψ hψb) + +lemma PhaseFlowOn.split_label_force_integral {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) : + (∫p,ψ (labelReceiverTime F.flow zX T p) • actualLabelSignedForce s F.flow zX T p)= + (∫p,unselectedLabelSignedForce s F.flow zX T Q ψ p)+ + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ + (fun _=>ContinuousLinearMap.id ℝ Vec) z)+ + ∫p,selectedLabelCosts s F.flow zX T Q ψ p := by + simp_rw [split_label_force s F.flow zX T Q ψ] + rw [integral_add (F.unselectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb) + (F.selectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb)] + rw [show (∫p,selectedLabelSignedForce s F.flow zX T Q ψ p)= + ∫σ : ℝ,∫z : Phase,selectedLabelSignedForce s F.flow zX T Q ψ (σ,z) from + integral_prod _ (F.selectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb), + F.selected_signed_fubini hs hT zX Q hψ hψb hψT, + ←integral_prod _ (F.selectedLabelCosts_integrable hs hT zX Q hψ hψb),add_assoc] + rw [←Measure.volume_eq_prod] + +lemma SmoothClassicalPrefix.selected_force_decomposition {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) : + (∫t in Ioo (0:ℝ) T,ψ t • + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ((∫p,unselectedLabelSignedForce s F.flow zX T Q ψ p)+ + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ + (fun _=>ContinuousLinearMap.id ℝ Vec) z)+∫p,selectedLabelCosts s F.flow zX T Q ψ p) := by + rw [hs.weighted_retarded_force_label hT F zX hψ.continuous.continuousOn, + F.split_label_force_integral hs.sourceForceEnergyPrefix hT zX Q hψ hψb hψT] + +end RVM + +end + +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal ENNReal +open Set +open Set MeasureTheory +open scoped ENNReal +open Set Filter MeasureTheory +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff ENNReal +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma triangleConeKernel_receiver_multiplier (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + (p : ConeCoordinate×Vec) : + triangleConeKernel s α zX T (fun q=>W q.1.1 (A q)) p= + W p.1.1 (triangleConeKernel s α zX T A p) := by + classical + by_cases hp : p∈trianglePhaseDomain T + · simp only [triangleConeKernel,indicator_of_mem hp,triangleKernelState,map_smul] + · simp only [triangleConeKernel,indicator_of_notMem hp,map_zero] + +lemma labelConeKernel_receiver_multiplier (s : Solution) (α : Phase→ℝ→Phase) + (zX : Phase) (T : ℝ) (A : ConeKernelState→Vec) (W : ℝ→Vec→L[ℝ]Vec) + (p : ℝ×Phase) : + labelConeKernel s α zX T (fun q=>W q.1.1 (A q)) p= + W (labelReceiverTime α zX T p) (labelConeKernel s α zX T A p) := by + classical + by_cases hp : p∈labelBranchDomain α zX T + · simp only [labelConeKernel,labelReceiverTime,indicator_of_mem hp,labelKernelState,map_smul] + · simp only [labelConeKernel,indicator_of_notMem hp,map_zero] + +lemma PhaseFlowOn.triangleConeKernel_multiplier_fiber {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + {A : ConeKernelState→Vec} (hA : ContinuousOn A (coneKernelDomain T)) + {W : ℝ→Vec→L[ℝ]Vec} (hW : ContinuousOn W (Icc 0 T)) : + (∫p,triangleConeKernel s F.flow zX T (fun q=>W q.1.1 (A q)) p ∂trianglePhaseMeasure)= + ∫t : ℝ,W t (∫p : ℝ×Sphere,∫v : Vec, + triangleConeKernel s F.flow zX T A ((t,p),v) ∂volume ∂volume.prod sphereMeasure) := by + let g := triangleConeKernel s F.flow zX T A + let B : ConeKernelState→Vec := fun q=>W q.1.1 (A q) + have hB : ContinuousOn B (coneKernelDomain T) := + (hW.comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).clm_apply hA + have hg := F.triangleConeKernel_integrable hs hT zX hA + have hb := F.triangleConeKernel_integrable hs hT zX hB + have hi : Integrable (fun z : ConeCoordinate=>∫v : Vec,g (z,v)) + (volume.prod (volume.prod sphereMeasure)) := hg.integral_prod_left + rw [trianglePhaseMeasure,integral_prod _ hb,integral_prod _ hb.integral_prod_left] + apply integral_congr_ae + have hvi := Measure.ae_ae_of_ae_prod hg.prod_right_ae + filter_upwards [hi.prod_right_ae,hvi] with t ht hvt + rw [←(W t).integral_comp_comm ht] + apply integral_congr_ae + filter_upwards [hvt] with p hp + rw [←(W t).integral_comp_comm hp] + apply integral_congr_ae + exact ae_of_all _ (fun v=>triangleConeKernel_receiver_multiplier s F.flow zX T A W ((t,p),v)) + +lemma PhaseFlowOn.triangleConeKernel_fiber_sphere {s : Solution} {T t : ℝ} + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (A : ConeKernelState→Vec) + (ht : t∈Ioo 0 T) + (hi : Integrable (fun p : ℝ×Sphere=>∫v : Vec, + triangleConeKernel s F.flow zX T A ((t,p),v)) (volume.prod sphereMeasure)) : + (∫p : ℝ×Sphere,∫v : Vec,triangleConeKernel s F.flow zX T A ((t,p),v) + ∂volume ∂volume.prod sphereMeasure)= + ∫n : Sphere,∫σ in Ioo (0:ℝ) t, + (1-dot n.1 (velocity (F.flow zX t).2)) • + ∫v : Vec,s.f (σ,((F.flow zX t).1-(t-σ) • n.1,v)) • + A ((t,σ),(n.1,((F.flow zX t).1-(t-σ) • n.1,v))) ∂volume ∂volume ∂sphereMeasure := by + classical + rw [integral_prod_symm _ hi] + apply integral_congr_ae + exact ae_of_all _ (fun n=>by + dsimp only + rw [←integral_indicator measurableSet_Ioo] + apply integral_congr_ae + exact ae_of_all _ (fun σ=>by + dsimp only + by_cases hσ : σ∈Ioo 0 t + · rw [indicator_of_mem hσ,←integral_smul] + apply integral_congr_ae + exact ae_of_all _ (fun v=>by + have hp : ((t,σ,n),v)∈trianglePhaseDomain T := ⟨ht,hσ⟩ + simp only [triangleConeKernel,indicator_of_mem hp,triangleKernelState]) + · rw [indicator_of_notMem hσ] + have hz : ∀v : Vec,triangleConeKernel s F.flow zX T A ((t,σ,n),v)=0 := by + intro v + have hp : ((t,σ,n),v)∉trianglePhaseDomain T := fun hp=>hσ hp.2 + simp only [triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero])) + +lemma SmoothClassicalPrefix.multiplier_retarded_force_label {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (F : PhaseFlowOn s.E s.B T) (zX : Phase) + {W : ℝ→Vec→L[ℝ]Vec} (hW : ContinuousOn W (Icc 0 T)) : + (∫t in Ioo (0:ℝ) T,W t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ∫p,W (labelReceiverTime F.flow zX T p) + (actualLabelSignedForce s F.flow zX T p) := by + classical + let A := sourceForceConeKernel s F.flow zX + have hA : ContinuousOn A (coneKernelDomain T) := + F.normalised_source_force_continuousOn hs.sourceForceEnergyPrefix zX + let B : ConeKernelState→Vec := fun q=>W q.1.1 (A q) + have hB : ContinuousOn B (coneKernelDomain T) := + (hW.comp continuous_fst.fst.continuousOn (fun _ hp=>hp.1.1)).clm_apply hA + have hlabel : (fun p=>W (labelReceiverTime F.flow zX T p) + (actualLabelSignedForce s F.flow zX T p))=labelConeKernel s F.flow zX T B := by + funext p + rw [F.actualLabelSignedForce_eq_normalised zX] + exact (labelConeKernel_receiver_multiplier s F.flow zX T A W p).symm + rw [hlabel,F.labelConeKernel_triangle_integral hs.sourceForceEnergyPrefix hT zX hB] + dsimp only [B] + rw [F.triangleConeKernel_multiplier_fiber hs.sourceForceEnergyPrefix hT zX hA hW, + ←integral_smul,←integral_indicator measurableSet_Ioo] + have hg := F.triangleConeKernel_integrable hs.sourceForceEnergyPrefix hT zX hA + have hi : Integrable (fun z : ConeCoordinate=>∫v : Vec,triangleConeKernel s F.flow zX T A (z,v)) + (volume.prod (volume.prod sphereMeasure)) := hg.integral_prod_left + apply integral_congr_ae + filter_upwards [hi.prod_right_ae] with t ht + by_cases htT : t∈Ioo 0 T + · rw [indicator_of_mem htT,F.triangleConeKernel_fiber_sphere zX A htT ht, + hs.retarded_force_source_polar htT.1 htT.2 _ _ (norm_velocity_lt_one _),add_sub_cancel_left, + map_smul] + rfl + · rw [indicator_of_notMem htT] + have hz : ∀p : ℝ×Sphere,∀v : Vec,triangleConeKernel s F.flow zX T A ((t,p),v)=0 := by + intro p v + have hp : ((t,p),v)∉trianglePhaseDomain T := fun hp=>htT hp.1 + simp only [triangleConeKernel,indicator_of_notMem hp] + simp only [hz,integral_zero,map_zero,smul_zero] + +lemma PhaseFlowOn.split_multiplier_force_integral {s : Solution} {T : ℝ} + (F : PhaseFlowOn s.E s.B T) (hs : EnergyPrefix s T) (hT : 0≤T) (zX : Phase) + (Q : Set (Fin 4→ℕ)) {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} (hW : Continuous W) (hW' : Continuous W') + (hWd : ∀t∈Ioo 0 T,HasDerivAt W (W' t) t) : + (∫p,W (labelReceiverTime F.flow zX T p) + (ψ (labelReceiverTime F.flow zX T p) • actualLabelSignedForce s F.flow zX T p))= + (∫p,W (labelReceiverTime F.flow zX T p) (unselectedLabelSignedForce s F.flow zX T Q ψ p))+ + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ W z)+ + ∫p,selectedMultiplierCosts s F.flow zX T Q ψ W W' p := by + have hiU := F.integrable_receiver_multiplier hT zX hW + (F.unselectedLabelSignedForce_integrable hs hT zX Q hψ.continuous.measurable hψb) + obtain ⟨hiK,hiC⟩ := F.selectedMultiplier_integrable hs hT zX Q hψ hψb hW hW' + simp_rw [split_label_force s F.flow zX T Q ψ,map_add] + change Integrable (fun p=>W (labelReceiverTime F.flow zX T p) + (selectedLabelSignedForce s F.flow zX T Q ψ p)) at hiK + rw [integral_add hiU hiK] + change _+(∫p,selectedMultiplierForce s F.flow zX T Q ψ W p)=_ + rw [show (∫p,selectedMultiplierForce s F.flow zX T Q ψ W p)= + ∫σ : ℝ,∫z : Phase,selectedMultiplierForce s F.flow zX T Q ψ W (σ,z) from + integral_prod _ hiK, + F.selected_multiplier_fubini hs hT zX Q hψ hψb hψT hW hW' hWd, + ←integral_prod _ hiC,add_assoc] + rw [←Measure.volume_eq_prod] + +lemma SmoothClassicalPrefix.selected_multiplier_decomposition {d : Datum} {s : Solution} {T : ℝ} + (hs : SmoothClassicalPrefix d s T) (hT : 0≤T) + (F : PhaseFlowOn s.E s.B T) (zX : Phase) (Q : Set (Fin 4→ℕ)) + {ψ : ℝ→ℝ} {L : NNReal} (hψ : LipschitzWith L ψ) + (hψb : ∀t∈Icc 0 T,|ψ t|≤1) (hψT : ψ T=0) + {W W' : ℝ→Vec→L[ℝ]Vec} (hW : Continuous W) (hW' : Continuous W') + (hWd : ∀t∈Ioo 0 T,HasDerivAt W (W' t) t) : + (∫t in Ioo (0:ℝ) T,ψ t • W t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ((∫p,W (labelReceiverTime F.flow zX T p) + (unselectedLabelSignedForce s F.flow zX T Q ψ p))+ + (∫z : Phase,selectedInitialKernel F.flow zX T (fun z=>s.f (0,z)) Q ψ W z)+ + ∫p,selectedMultiplierCosts s F.flow zX T Q ψ W W' p) := by + have he := hs.multiplier_retarded_force_label hT F zX + (W:=fun t=>ψ t • W t) (hψ.continuous.smul hW).continuousOn + change (∫t in Ioo (0:ℝ) T,ψ t • W t + (s.E (t,(F.flow zX t).1)+cross (velocity (F.flow zX t).2) (s.B (t,(F.flow zX t).1))- + boundaryLorentzForce (datumBoundarySolution d) t (F.flow zX t).1 (velocity (F.flow zX t).2)))= + (4*Real.pi)⁻¹ • ∫p,ψ (labelReceiverTime F.flow zX T p) • + W (labelReceiverTime F.flow zX T p) (actualLabelSignedForce s F.flow zX T p) at he + rw [he] + congr 1 + simp_rw [←map_smul] + exact F.split_multiplier_force_integral hs.sourceForceEnergyPrefix hT zX Q hψ hψb hψT hW hW' hWd + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceKernels.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceKernels.lean new file mode 100644 index 0000000000000000000000000000000000000000..96a8f4d06b11d0727c30fce79ea85340a9e8dc99 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceKernels.lean @@ -0,0 +1,1295 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Retarded.RetardedDifferentiation +import OAI.Analysis.VlasovMaxwell.Retarded.TransportAngularCore + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma contDiffAt_sourceAngularCore {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {n u b : U → Vec} {z : U} {k : ℕ∞ω} + (hn : ContDiffAt ℝ k n z) (hu : ContDiffAt ℝ k u z) (hb : ContDiffAt ℝ k b z) + (hd : 1-dot (n z) (u z)≠0) : + ContDiffAt ℝ k (fun w => sourceAngularCore (n w) (u w) (b w)) z := by + have hnb := contDiff_dot_pair.contDiffAt.comp z (hn.prodMk hb) + have hnu := contDiff_dot_pair.contDiffAt.comp z (hn.prodMk hu) + exact (((contDiffAt_const.sub hnu).pow 2).inv (pow_ne_zero 2 hd)).smul + ((hnb.smul (hn.sub hu)).sub ((contDiffAt_const.sub hnu).smul hb)) + +def sourceAngularProfile (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : ℝ := + sourceAngularCore p.1.1 (velocity p.2) + (fderiv ℝ velocity p.2 (p.1.2.1+cross (velocity p.2) p.1.2.2)) i + +lemma sourceAngularProfile_contDiffAt (i : Fin 3) {p : (Vec × Vec × Vec) × Vec} + (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (sourceAngularProfile i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + have hdv : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => fderiv ℝ velocity z.2) p := + ((contDiff_velocity (k:=2)).fderiv_right (by norm_num)).contDiffAt.comp p contDiffAt_snd + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p + (contDiffAt_sourceAngularCore hn hu (hdv.clm_apply hforce) hd) + +def sourceFixedCoefficient (v E B : Vec) (i : Fin 3) (z : Vec) : ℝ := + (coneRadius 0 z)⁻¹*sourceAngularProfile i ((coneDirection 0 z,E,B),v) + +def sourceFixedFlux (v E B e : Vec) (i : Fin 3) (z : Vec) : Vec := + sourceFixedCoefficient v E B i z • coneSpatialLift 0 z v e + +lemma sourceFixedCoefficient_contDiffAt (v E B : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (sourceFixedCoefficient v E B i) z := by + have hn := contDiffAt_coneDirection (k:=1) hz.symm + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 z,E,B),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').comp z + ((hn.prodMk (contDiffAt_const.prodMk contDiffAt_const)).prodMk contDiffAt_const) + exact ((contDiffAt_coneRadius hz.symm).inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz.symm))).mul hc + +lemma sourceFixedFlux_contDiffAt (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (sourceFixedFlux v E B e i) z := + (sourceFixedCoefficient_contDiffAt v E B i hz).smul (contDiffAt_coneSpatialLift hz.symm) + +lemma sourceFixedFlux_homogeneous (v E B e : Vec) (i : Fin 3) {r : ℝ} (hr : 0 r • y) (r • ContinuousLinearMap.id ℝ Vec) z := + (hasFDerivAt_id z).const_smul r + have h₁ := hrz.hasFDerivAt.comp z hm + have h₂ := hz.hasFDerivAt.const_smul r⁻¹ + have heq : (fun y : Vec => F (r • y))=(fun y : Vec => r⁻¹ • F y) := funext (hh r hr) + change HasFDerivAt (fun y : Vec => F (r • y)) _ _ at h₁ + rw [heq] at h₁ + have hv := congrArg (fun L : Vec →L[ℝ] Vec => L e) (h₁.unique h₂) + change fderiv ℝ F (r • z) (r • e)=r⁻¹ • fderiv ℝ F z e at hv + rw [map_smul] at hv + have hv' := congrArg (fun a : Vec => r⁻¹ • a) hv + simpa only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul, + show r⁻¹*r⁻¹=(r^2)⁻¹ by ring] using hv' + +lemma divergence_degree_neg_one {F : Vec → Vec} + (hh : ∀ r : ℝ, 0 F x i) y = (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).comp (fderiv ℝ F y) := by + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp y (hF y hy).hasFDerivAt).fderiv + unfold divergence spatialPartial + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [hc _ hrz i,hc _ hz i] + change (fderiv ℝ F (r • z) (basis i)) i = (r^2)⁻¹*(fderiv ℝ F z (basis i)) i + rw [fderiv_degree_neg_one hh hr (hF _ hz) (hF _ hrz)] + rfl + +def sourceConeCoefficient (s : Solution) (t : ℝ) (x : Vec) (i : Fin 3) (p : Phase) : ℝ := + sourceFixedCoefficient p.2 (s.E (t-coneRadius 0 p.1,x+p.1)) + (s.B (t-coneRadius 0 p.1,x+p.1)) i p.1 + +lemma sourceConeCoefficient_contDiffAt {s : Solution} + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {t : ℝ} (x : Vec) (i : Fin 3) {p : Phase} (hp : p.1≠0) (ht : 0 (t-coneRadius 0 z.1,x+z.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_const.add contDiffAt_fst) + have he := (field_contDiffAt_positive hE ht (x+p.1)).comp p ha + have hb := (field_contDiffAt_positive hB ht (x+p.1)).comp p ha + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 p.1, + s.E (t-coneRadius 0 p.1,x+p.1),s.B (t-coneRadius 0 p.1,x+p.1)),p.2)) + (cone_denom_pos p.2 _ (coneDirection_norm hp.symm)).ne').comp p + ((hn.prodMk (he.prodMk hb)).prodMk contDiffAt_snd) + exact (hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hp.symm))).mul hc + +lemma electric_source_division_annulus {s : Solution} {H t ε R : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) (heq : EquationsBefore s H) + (htH : t≤H) (hε : 0<ε) (hεR : ε≤R) (hRt : R sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) := by + have hk : ContDiffOn ℝ 1 (sourceConeCoefficient s t x i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (sourceConeCoefficient_contDiffAt hE hB x i hp.1.1.symm hp.1.2).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + simpa only [smul_smul] using retarded_spatial_annulus (e:=e) hf hc hε hεR hRt hk hK + (fun z hz v => coneLorentz_vlasov_before hf heq htH x hz v) + +def sourceJointFlux (e : Vec) (i : Fin 3) (p : Phase × Phase) : Vec := + sourceFixedFlux p.1.2 p.2.1 p.2.2 e i p.1.1 + +lemma sourceJointFlux_contDiffAt (e : Vec) (i : Fin 3) {p : Phase × Phase} + (hp : p.1.1≠0) : ContDiffAt ℝ 1 (sourceJointFlux e i) p := by + have hr := (contDiffAt_coneRadius (k:=1) hp.symm).comp p contDiffAt_fst.fst + have hn := (contDiffAt_coneDirection (k:=1) hp.symm).comp p contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : Phase × Phase => velocity z.1.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_fst.snd + have he := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hd := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hne := (cone_denom_pos p.1.2 _ (coneDirection_norm hp.symm)).ne' + have hW : ContDiffAt ℝ 1 (fun z : Phase × Phase => coneSpatialLift 0 z.1.1 z.1.2 e) p := + contDiffAt_const.add ((he.div (contDiffAt_const.sub hd) hne).smul hu) + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 p.1.1,p.2.1,p.2.2),p.1.2)) hne).comp p + ((hn.prodMk (contDiffAt_snd.fst.prodMk contDiffAt_snd.snd)).prodMk contDiffAt_fst.snd) + exact ((hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hp.symm))).mul hc).smul hW + +lemma sourceJointFlux_derivative_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖fderiv ℝ (sourceJointFlux e i) ((n.1,v),(E,B))‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P) ×ˢ + (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M) + have hK : IsCompact K := ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : ContinuousOn (fderiv ℝ (sourceJointFlux e i)) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + have hz : p.1.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact ((sourceJointFlux_contDiffAt e i hz).continuousAt_fderiv (by simp)).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,v),(E,B)) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_closedBall,dist_zero_right] using hv⟩, + by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩ + +lemma sourceFixedFlux_spatial_derivative (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (a : Vec) : + fderiv ℝ (sourceFixedFlux v E B e i) z a= + fderiv ℝ (sourceJointFlux e i) ((z,v),(E,B)) ((a,0),(0,0)) := by + have hm := ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk (hasFDerivAt_const v z)).prodMk + (hasFDerivAt_const (E,B) z) + have hh := ((sourceJointFlux_contDiffAt e i (p:=((z,v),(E,B))) hz).differentiableAt (by simp)).hasFDerivAt.comp z hm + exact congrArg (fun L : Vec →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_field_derivative (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (a : Phase) : + fderiv ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) (E,B) a= + fderiv ℝ (sourceJointFlux e i) ((z,v),(E,B)) ((0,0),a) := by + have hm := (hasFDerivAt_const (z,v) (E,B)).prodMk (hasFDerivAt_id (𝕜:=ℝ) (E,B)) + have hh := ((sourceJointFlux_contDiffAt e i (p:=((z,v),(E,B))) hz).differentiableAt (by simp)).hasFDerivAt.comp (E,B) hm + exact congrArg (fun L : Phase →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_field_differentiable (v e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) (w : Phase) : + DifferentiableAt ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) w := + ((sourceJointFlux_contDiffAt e i (p:=((z,v),w)) hz).differentiableAt (by simp)).comp w + ((differentiableAt_const (z,v)).prodMk differentiableAt_id) + +lemma sourceFixedFlux_field_rescale (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) + {r : ℝ} (hr : 0 sourceFixedFlux v w.1 w.2 e i (r • z)) (E,B) a= + r⁻¹ • fderiv ℝ (fun w : Phase => sourceFixedFlux v w.1 w.2 e i z) (E,B) a := by + have heq : (fun w : Phase => sourceFixedFlux v w.1 w.2 e i (r • z))= + fun w : Phase => r⁻¹ • sourceFixedFlux v w.1 w.2 e i z := + funext (fun w => sourceFixedFlux_homogeneous v w.1 w.2 e i hr z) + rw [heq] + have hh := (sourceFixedFlux_field_differentiable v e i hz (E,B)).hasFDerivAt.const_smul r⁻¹ + change HasFDerivAt (fun w : Phase => r⁻¹ • sourceFixedFlux v w.1 w.2 e i z) _ _ at hh + exact congrArg (fun L : Phase →L[ℝ] Vec => L a) hh.fderiv + +lemma sourceFixedFlux_bounds (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec) (r : ℝ), + ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → 0 sourceFixedFlux v w.1 w.2 e i (r • n.1)) (E,B) a‖≤C/r*‖a‖ := by + obtain ⟨C,hC,hb⟩ := sourceJointFlux_derivative_bound P M e i + refine ⟨C,hC,?_⟩ + intro n v E B r hv hE hB hr + have hn : n.1≠(0:Vec) := by intro hh; have hn := sphere_norm n; rw [hh,norm_zero] at hn; norm_num at hn + have hder := hb n v E B hv hE hB + have hF (z : Vec) (hz : z≠0) := (sourceFixedFlux_contDiffAt v E B e i hz).differentiableAt (by simp) + constructor + · rw [divergence_degree_neg_one (fun r hr z => sourceFixedFlux_homogeneous v E B e i hr z) hF hr hn, + abs_mul,abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + have hb0 : |divergence (sourceFixedFlux v E B e i) n.1|≤3*C := by + unfold divergence spatialPartial + calc + |∑ j : Fin 3,fderiv ℝ (fun z => sourceFixedFlux v E B e i z j) n.1 (basis j)| + ≤ ∑ j : Fin 3,|fderiv ℝ (fun z => sourceFixedFlux v E B e i z j) n.1 (basis j)| := Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j : Fin 3,C := by + apply Finset.sum_le_sum + intro j hj + rw [fderiv_vec_component_at (hF n.1 hn) j] + change |(fderiv ℝ (sourceFixedFlux v E B e i) n.1 (basis j)) j|≤C + apply (norm_coordinate_le _ j).trans + rw [sourceFixedFlux_spatial_derivative v E B e i hn] + have ht := (ContinuousLinearMap.le_opNorm _ ((basis j,0),(0,0))).trans + (mul_le_mul_of_nonneg_right hder (norm_nonneg _)) + simpa [Prod.norm_mk,basis,PiLp.norm_single] using ht + _ = 3*C := by simp + exact (mul_le_mul_of_nonneg_left hb0 (inv_nonneg.mpr (sq_nonneg _))).trans_eq (by ring) + · intro a + rw [sourceFixedFlux_field_rescale v E B e i hn hr a,norm_smul,Real.norm_eq_abs, + abs_inv,abs_of_pos hr,sourceFixedFlux_field_derivative v E B e i hn] + have ht := (ContinuousLinearMap.le_opNorm _ ((0,0),a)).trans + (mul_le_mul_of_nonneg_right hder (norm_nonneg _)) + have ht' : ‖fderiv ℝ (sourceJointFlux e i) ((n.1,v),(E,B)) ((0,0),a)‖≤C*‖a‖ := by + simpa only [Prod.norm_mk,norm_zero,max_self,max_eq_right (norm_nonneg a)] using ht + exact (mul_le_mul_of_nonneg_left ht' (inv_nonneg.mpr hr.le)).trans_eq (by ring) + +lemma divergence_parameter_chain {F : Vec × Phase → Vec} {g : Vec → Phase} {z : Vec} + (hF : DifferentiableAt ℝ F (z,g z)) (hg : DifferentiableAt ℝ g z) : + divergence (fun y => F (y,g y)) z= + divergence (fun y => F (y,g z)) z+ + ∑ j : Fin 3,(fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j := by + have hd := hF.hasFDerivAt.comp z ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk hg.hasFDerivAt) + have hs := hF.hasFDerivAt.comp z ((hasFDerivAt_id (𝕜:=ℝ) z).prodMk (hasFDerivAt_const (g z) z)) + have hp := hF.hasFDerivAt.comp (g z) ((hasFDerivAt_const z (g z)).prodMk (hasFDerivAt_id (𝕜:=ℝ) (g z))) + change HasFDerivAt (fun y => F (y,g y)) _ z at hd + change HasFDerivAt (fun y => F (y,g z)) _ z at hs + change HasFDerivAt (fun w : Phase => F (z,w)) _ (g z) at hp + unfold divergence spatialPartial + rw [←Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro j hj + rw [fderiv_vec_component_at hd.differentiableAt j,fderiv_vec_component_at hs.differentiableAt j, + hd.fderiv,hs.fderiv,hp.fderiv] + change (fderiv ℝ F (z,g z) (basis j,fderiv ℝ g z (basis j))) j= + (fderiv ℝ F (z,g z) (basis j,0)) j+(fderiv ℝ F (z,g z) (0,fderiv ℝ g z (basis j))) j + rw [show (basis j,fderiv ℝ g z (basis j))=(basis j,0)+(0,fderiv ℝ g z (basis j)) by simp,map_add] + rfl + +lemma source_dynamic_spatial_divergence_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (g : Vec → Phase) (n : Sphere) (v : Vec) (r : ℝ), + ‖v‖≤P → ‖(g (r • n.1)).1‖≤M → ‖(g (r • n.1)).2‖≤M → 0 sourceFixedFlux v (g z).1 (g z).2 e i z) (r • n.1)|≤ + 3*C/r^2+(3*C/r)*‖fderiv ℝ g (r • n.1)‖ := by + obtain ⟨C,hC,hb⟩ := sourceFixedFlux_bounds P M e i + refine ⟨C,hC,?_⟩ + intro g n v r hv hE hB hr hg + have hn : n.1≠(0:Vec) := by intro hh; have hh' := sphere_norm n; rw [hh,norm_zero] at hh'; norm_num at hh' + have hrn : r • (n.1 : Vec)≠0 := smul_ne_zero hr.ne' hn + let z := r • (n.1 : Vec) + let F : Vec × Phase → Vec := fun p => sourceFixedFlux v p.2.1 p.2.2 e i p.1 + have hF : DifferentiableAt ℝ F (z,g z) := + ((sourceJointFlux_contDiffAt e i (p:=((z,v),g z)) hrn).differentiableAt (by simp)).comp (f:=fun p : Vec × Phase => ((p.1,v),p.2)) (z,g z) + ((differentiableAt_fst.prodMk (differentiableAt_const v)).prodMk differentiableAt_snd) + have hchain := divergence_parameter_chain hF hg + change divergence (fun y => F (y,g y)) z=_ at hchain + change |divergence (fun y => F (y,g y)) z|≤_ + rw [hchain] + obtain ⟨hsp,hparam⟩ := hb n v (g z).1 (g z).2 r hv hE hB hr + have hcor : |∑ j : Fin 3, (fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j|≤ + (3*C/r)*‖fderiv ℝ g z‖ := by + calc + _ ≤ ∑ j : Fin 3,|(fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j : Fin 3,(C/r)*‖fderiv ℝ g z‖ := by + apply Finset.sum_le_sum + intro j hj + apply (norm_coordinate_le _ j).trans + refine (hparam (fderiv ℝ g z (basis j))).trans ?_ + apply mul_le_mul_of_nonneg_left _ (div_nonneg hC hr.le) + simpa only [show ‖basis j‖=1 by simp [basis,PiLp.norm_single],mul_one] using + ContinuousLinearMap.le_opNorm (fderiv ℝ g z) (basis j) + _ = _ := by simp; ring + exact (abs_add_le _ _).trans (add_le_add hsp hcor) + +lemma retarded_spacetime_lipschitz (t : ℝ) (x : Vec) : + LipschitzWith 1 (fun z : Vec => (t-coneRadius 0 z,x+z)) := by + apply LipschitzWith.of_dist_le_mul + intro y z + simp only [NNReal.coe_one,one_mul,Prod.dist_eq,coneRadius,zero_sub,norm_neg] + apply max_le + · rw [Real.dist_eq,show (t-‖y‖)-(t-‖z‖)=‖z‖-‖y‖ by ring,abs_sub_comm,dist_eq_norm] + exact abs_norm_sub_norm_le y z + · rw [dist_add_left] + +lemma norm_fderiv_retarded_fields {s : Solution} {t : ℝ} (x : Vec) {z : Vec} + (hz : z≠0) (ht : 0 (s.E (t-coneRadius 0 y,x+y),s.B (t-coneRadius 0 y,x+y))) z‖≤ + max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖ := by + let a : Vec → (ℝ × Vec) := fun y => (t-coneRadius 0 y,x+y) + have ha : DifferentiableAt ℝ a z := + ((differentiableAt_const t).sub (differentiableAt_coneRadius hz.symm)).prodMk + ((differentiableAt_const x).add differentiableAt_id) + have he := (field_contDiffAt_positive hE ht (x+z)).differentiableAt (by simp) + have hb := (field_contDiffAt_positive hB ht (x+z)).differentiableAt (by simp) + have hh := (he.hasFDerivAt.prodMk hb.hasFDerivAt).comp z ha.hasFDerivAt + change HasFDerivAt (fun y : Vec => (s.E (a y),s.B (a y))) _ z at hh + rw [hh.fderiv] + have hn : ‖fderiv ℝ a z‖≤1 := norm_fderiv_le_of_lipschitz ℝ (retarded_spacetime_lipschitz t x) + apply (ContinuousLinearMap.opNorm_comp_le _ _).trans + apply (mul_le_mul_of_nonneg_left hn (norm_nonneg _)).trans_eq + simp only [mul_one,ContinuousLinearMap.opNorm_prod,Prod.norm_mk] + +lemma physical_source_spatial_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t r : ℝ) (x v : Vec) (n : Sphere), + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + 0 sourceConeCoefficient s t x i (z,v) • coneSpatialLift 0 z v e) (r • n.1)|≤ + 3*C/r^2+(3*C/r)*max + ‖fderiv ℝ s.E (t-coneRadius 0 (r • n.1),x+r • n.1)‖ + ‖fderiv ℝ s.B (t-coneRadius 0 (r • n.1),x+r • n.1)‖ := by + obtain ⟨C,hC,hb⟩ := source_dynamic_spatial_divergence_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t r x v n hE hB hr hrt hv he hb' + have hn : n.1≠(0:Vec) := by intro hh; have hn := sphere_norm n; rw [hh,norm_zero] at hn; norm_num at hn + have hz : r • (n.1 : Vec)≠0 := smul_ne_zero hr.ne' hn + have ht : 0 (s.E (t-coneRadius 0 y,x+y),s.B (t-coneRadius 0 y,x+y)) + have ha : DifferentiableAt ℝ (fun y : Vec => (t-coneRadius 0 y,x+y)) (r • n.1) := + ((differentiableAt_const t).sub (differentiableAt_coneRadius hz.symm)).prodMk + ((differentiableAt_const x).add differentiableAt_id) + have hg : DifferentiableAt ℝ g (r • n.1) := + (((field_contDiffAt_positive hE ht (x+r • n.1)).differentiableAt (by simp)).comp (r • n.1) ha).prodMk + (((field_contDiffAt_positive hB ht (x+r • n.1)).differentiableAt (by simp)).comp (r • n.1) ha) + exact (hb g n v r hv he hb' hr hg).trans (add_le_add le_rfl + (mul_le_mul_of_nonneg_left (norm_fderiv_retarded_fields x hz ht hE hB) + (div_nonneg (mul_nonneg (by norm_num : (0:ℝ)≤3) hC) hr.le))) + +def sourceVelocityProfile (e : Vec) (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : Vec := + (sourceAngularProfile i p * + (dot p.1.1 e/(1-dot p.1.1 (velocity p.2)))) • + (p.1.2.1+cross (velocity p.2) p.1.2.2) + +lemma sourceVelocityProfile_contDiffAt (e : Vec) (i : Fin 3) + {p : (Vec × Vec × Vec) × Vec} (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (sourceVelocityProfile e i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hi := sourceAngularProfile_contDiffAt i hd + have hm := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + exact (hi.mul (hm.div (contDiffAt_const.sub hdu) hd)).smul hforce + +lemma continuousOn_sourceVelocityDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => sourceVelocityProfile e i (p.1,w)) p.2) + {p | 1-dot p.1.1 (velocity p.2)≠0} := by + apply ContinuousOn.congr (f:=fun p : (Vec × Vec × Vec) × Vec => + ∑ j : Fin 3,(fderiv ℝ (sourceVelocityProfile e i) p (0,basis j)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((sourceVelocityProfile_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact divergence_parameter_slice ((sourceVelocityProfile_contDiffAt e i hp).differentiableAt (by simp)) + +lemma sourceVelocityDivergence_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (E B v : Vec), ‖E‖≤M → ‖B‖≤M → ‖v‖≤P → + |divergence (fun w => sourceVelocityProfile e i ((n.1,E,B),w)) v|≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => sourceVelocityProfile e i (p.1,w)) p.2) K := + (continuousOn_sourceVelocityDivergence e i).mono (by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact (cone_denom_pos p.2 p.1.1 hn).ne') + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n E B v hE hB hv + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +lemma source_velocity_divergence_rescale (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {z : Vec} (hz : z≠0) (v : Vec) : + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v = + (coneRadius 0 z)⁻¹* + divergence (fun w => sourceVelocityProfile e i + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),w)) v := by + let a := (coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)) + have ha : DifferentiableAt ℝ (fun w => sourceVelocityProfile e i (a,w)) v := + ((sourceVelocityProfile_contDiffAt e i (p:=(a,v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).comp v + ((differentiableAt_const a).prodMk differentiableAt_id) + have he : (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) = + fun w => (coneRadius 0 z)⁻¹ • sourceVelocityProfile e i (a,w) := by + funext w + simp only [sourceConeCoefficient,sourceFixedCoefficient,coneSpatialCoefficient,coneLorentz,sourceVelocityProfile,a,smul_smul,mul_assoc] + rw [he,divergence_real_const_smul ha] + +lemma physical_source_velocity_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v : Vec), z≠0 → ‖v‖≤P → + ‖s.E (t-coneRadius 0 z,x+z)‖≤M → ‖s.B (t-coneRadius 0 z,x+z)‖≤M → + |divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v|≤C/(coneRadius 0 z) := by + obtain ⟨C,hC,hb⟩ := sourceVelocityDivergence_uniform_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t x z v hz hv hE hB + rw [source_velocity_divergence_rescale s t x e i hz v,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (show 0 ≤ coneRadius 0 z from norm_nonneg _))] + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + exact (mul_le_mul_of_nonneg_left + (hb ⟨coneDirection 0 z,hn⟩ _ _ v hE hB hv) (inv_nonneg.mpr (show 0 ≤ coneRadius 0 z from norm_nonneg _))).trans_eq (by ring) + +lemma sourceFixedFlux_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖sourceFixedFlux v E B e i n.1‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P) ×ˢ + (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M) + have hK : IsCompact K := ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : ContinuousOn (sourceJointFlux e i) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + have hz : p.1.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact (sourceJointFlux_contDiffAt e i hz).continuousAt.continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,v),(E,B)) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_closedBall,dist_zero_right] using hv⟩, + by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩ + +lemma source_sphere_rescale (P : ℝ) (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {r : ℝ} (hr : 0 by + dsimp only + rw [sourceFixedFlux_homogeneous v _ _ e i hr] + simp only [smul_smul,mul_comm]) + rw [he,dot_smul_right] + field_simp + +lemma source_sphere_boundary_bound (P M A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t U r : ℝ) (x : Vec), + 0 s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i n.1) (C:=A*K) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf _ hs _ v) + (hkb n v _ _ (by simpa only [mem_closedBall,dist_zero_right] using hv) + (hEB _ hs _).1 (hEB _ hs _).2) (norm_nonneg _) hA) + have hd := abs_real_inner_le_norm n.1 + (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i n.1) + rw [sphere_norm,one_mul] at hd + rw [norm_mul,Real.norm_of_nonneg hr.le,dot_eq_inner,Real.norm_eq_abs] + exact mul_le_mul_of_nonneg_left (hd.trans (by + simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,C,mul_assoc,mul_comm,mul_left_comm] using hh)) hr.le + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_comm,mul_assoc,mul_left_comm] using hh + +def sourceDivisionBulk (P : ℝ) (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) (z : Vec) : ℝ := + ∫ v in closedBall (0:Vec) P,s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) + +lemma inverse_source_majorant {a b Q r H : ℝ} (ha : 0≤a) (hb : 0≤b) (hQ : 0≤Q) + (hr : 0 sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z|≤ + 3*Ks/‖z‖^2+(3*Ks/‖z‖)*Q := by + have hh := hks s t ‖z‖ x v n hE hB hzpos (hzr.1.trans hRt) hv + rw [hn] at hh + apply (hh (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2).trans + exact add_le_add le_rfl (mul_le_mul_of_nonneg_left + (max_le (hDF _ hu _).1 (hDF _ hu _).2) (by positivity)) + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) + (C:=A*((3*Ks+(3*Ks*Q+Kv)*H)/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hvb := hkv s t x z v hzn hvP (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + rw [hrad] at hvb + rw [Real.norm_eq_abs,abs_mul] + apply mul_le_mul (hf _ ⟨hu.1.le,hu.2⟩ _ v) _ (abs_nonneg _) hA + exact ((abs_add_le _ _).trans (add_le_add (hs v hvP) hvb)).trans + (inverse_source_majorant (by positivity) hKv hQ hzpos (hzr.1.le.trans (hRt.le.trans (htU.trans hUH))))) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,L,V]; ring) + have hh := norm_integral_annulus_inverse_sq_le hε hεR hL hb + rw [Real.norm_eq_abs] at hh + apply hh.trans + calc + 4*Real.pi*L*R ≤ 4*Real.pi*L*H := by gcongr; exact hRt.le.trans (htU.trans hUH) + _ ≤ C*(H+H^2*(1+Q)) := by + dsimp [L,C] + have hcoef : 3*Ks+(3*Ks*Q+Kv)*H≤(3*Ks+Kv)*(1+H*(1+Q)) := by + nlinarith [mul_nonneg hKs hH,mul_nonneg (mul_nonneg hKv hH) hQ] + have hh' := mul_le_mul_of_nonneg_left hcoef (show 0≤4*Real.pi*V*H by positivity) + nlinarith + +lemma source_sphere_support {s : Solution} {t U P r : ℝ} (x e : Vec) (i : Fin 3) + (hr : 0≤r) (hrt : r≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ n : Sphere,r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • + (sourceConeCoefficient s t x i (r • n.1,v) • coneSpatialLift 0 (r • n.1) v e)) ∂sphereMeasure) = + (∫ n : Sphere,r^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • + sourceFixedFlux v (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i (r • n.1)) ∂sphereMeasure) := by + apply integral_congr_ae + apply ae_of_all + intro n + have hrad : coneRadius 0 (r • n.1)=r := by + simp only [coneRadius,zero_sub,norm_neg,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] + simp only [sourceConeCoefficient,hrad] + change r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i (r • n.1))=_ + congr 2 + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ ⟨by linarith,by linarith⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_smul] + +lemma source_bulk_support {s : Solution} {t U P ε R : ℝ} (x e : Vec) (i : Fin 3) + (hRt : R≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,∫ v,s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) = + ∫ z in ball (0:Vec) R \ ball (0:Vec) ε,sourceDivisionBulk P s t x e i z := by + apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + have hzR : ‖z‖ linarith [norm_nonneg z] + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ hu _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_mul] + +lemma electric_source_annulus_gradient_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H Q ε R : ℝ) (x : Vec), + 0≤H → 0≤Q → 0<ε → ε≤R → R s.f (u,z,v)) y‖≤N) : + IntegrableOn (fun z => ∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => sourceConeCoefficient s t x i p* + fderiv ℝ s.f (t-coneRadius 0 p.1,x+p.1,p.2) (0,e,0) + let A := ball (0:Vec) t \ ({0} : Set Vec) + have hzprop {z : Vec} (hz : z∈A) : z≠0 ∧ 0 (t-coneRadius 0 p.1,x+p.1,p.2)) p := + ((contDiffAt_const.sub hr).prodMk ((contDiffAt_const.add contDiffAt_fst).prodMk contDiffAt_snd)).continuousAt + have hdf : ContinuousAt (fun q : Phase => fderiv ℝ s.f (t-coneRadius 0 q.1,x+q.1,q.2)) p := + ((particle_contDiffAt_positive hf hh.2.1 (x+p.1) p.2).continuousAt_fderiv (by simp)).comp (f:=fun q : Phase => (t-coneRadius 0 q.1,x+q.1,q.2)) hm + exact ((sourceConeCoefficient_contDiffAt hE hB x i hh.1 hh.2.1).continuousAt.mul + (hdf.clm_apply continuousAt_const)).continuousWithinAt + have hzero (z : Vec) (hz : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + have hh := hzprop hz + have hvP : P<‖v‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hv + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨hh.2.1.le,hh.2.2⟩ y v hvP) + dsimp [F] + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e,he] + simp + obtain ⟨C,hC,hcb⟩ := sourceConeCoefficient_uniform_bound P M i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have hK : IsCompact (closedBall (0:Vec) P) := isCompact_closedBall _ _ + apply integrableOn_ball_of_punctured_bound (α:=1) (C:=D) (by norm_num) + (continuousOn_integral_uniform_support hK hfc hzero) + intro z hz hzt + have hza : z∈A := ⟨by simpa only [mem_ball,dist_zero_right] using hzt,norm_pos_iff.mp hz⟩ + have hh := hzprop hza + have heq : (∫ v,F (z,v))=∫ v in closedBall (0:Vec) P,F (z,v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero (hzero z hza)).symm + change ‖∫ v,F (z,v)‖≤_ + rw [heq,Real.rpow_neg (norm_nonneg z),Real.rpow_one] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact hK.measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => F (z,v)) (C:=(C/‖z‖)*(N*‖e‖)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + dsimp [F] + rw [abs_mul,←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e] + apply mul_le_mul (hcb s t x z v hh.1 (by simpa only [mem_closedBall,dist_zero_right] using hv) + (hEB _ ⟨hh.2.1.le,hh.2.2⟩ _).1 (hEB _ ⟨hh.2.1.le,hh.2.2⟩ _).2) + · simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans (mul_le_mul_of_nonneg_right (hfN _ ⟨hh.2.1.le,hh.2.2⟩ _ v) (norm_nonneg e)) + · exact abs_nonneg _ + · positivity) + exact hb.trans_eq (by simp only [D,Measure.real,Measure.restrict_apply_univ]; ring) + +lemma electric_source_particle_gradient_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H Q N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤C*(H+H^2*(1+Q)) := by + obtain ⟨C,hC,hb⟩ := electric_source_annulus_gradient_bound P A M e i hA + refine ⟨C,hC,?_⟩ + intro s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN + apply norm_integral_ball_of_annulus_bound ht + (source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN) + intro ε R hε hεR hRt + exact hb s U t H Q ε R x (ht.le.trans (htU.trans hUH)) hQ hε hεR hRt htU hUH + hf hE hB hc heq hfA hP hEB hDF + +lemma sourceAngularProfile_derivative_bound (P M : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖fderiv ℝ (sourceAngularProfile i) ((n.1,E,B),v)‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fderiv ℝ (sourceAngularProfile i)) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact ((sourceAngularProfile_contDiffAt i (cone_denom_pos p.2 p.1.1 hn).ne').continuousAt_fderiv (by simp)).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +def sourceReceiverKernel (s : Solution) (t : ℝ) (i : Fin 3) (p : Vec × Phase) : ℝ := + sourceConeCoefficient s t p.1 i p.2 + +lemma sourceReceiverKernel_contDiffAt {s : Solution} {t : ℝ} (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {p : Vec × Phase} (hz : p.2.1≠0) (ht : 0 (t-coneRadius 0 q.2.1,q.1+q.2.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_fst.add contDiffAt_snd.fst) + have he := (field_contDiffAt_positive hE ht (p.1+p.2.1)).comp p hm + have hb := (field_contDiffAt_positive hB ht (p.1+p.2.1)).comp p hm + have hprof := (sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 p.2.1,s.E (t-coneRadius 0 p.2.1,p.1+p.2.1),s.B (t-coneRadius 0 p.2.1,p.1+p.2.1)),p.2.2)) + (cone_denom_pos p.2.2 _ (coneDirection_norm hz.symm)).ne').comp p + ((hn.prodMk (he.prodMk hb)).prodMk contDiffAt_snd.snd) + exact (hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz.symm))).mul hprof + +lemma source_receiver_fderiv_formula {s : Solution} {t : ℝ} (x z v e : Vec) (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hz : z≠0) (ht : 0 sourceConeCoefficient s t y i (z,v)) x e = + (coneRadius 0 z)⁻¹*fderiv ℝ (sourceAngularProfile i) + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v) + ((0,fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e),fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)),0) := by + have hm := (hasFDerivAt_const (t-coneRadius 0 z) x).prodMk ((hasFDerivAt_id (𝕜:=ℝ) x).add_const z) + have he := ((field_contDiffAt_positive hE ht (x+z)).differentiableAt (by simp)).hasFDerivAt.comp x hm + have hb := ((field_contDiffAt_positive hB ht (x+z)).differentiableAt (by simp)).hasFDerivAt.comp x hm + have hp := ((sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).hasFDerivAt.comp x + (((hasFDerivAt_const (coneDirection 0 z) x).prodMk (he.prodMk hb)).prodMk (hasFDerivAt_const v x)) + have hh := hp.const_mul ((coneRadius 0 z)⁻¹) + change HasFDerivAt (fun y => sourceConeCoefficient s t y i (z,v)) _ x at hh + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma physical_source_receiver_bound (P M : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v e : Vec), + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + z≠0 → 0 sourceConeCoefficient s t y i (z,v)) x e|≤ + C/‖z‖*max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ + ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖*‖e‖ := by + obtain ⟨C,hC,hcb⟩ := sourceAngularProfile_derivative_bound P M i + refine ⟨C,hC,?_⟩ + intro s t x z v e hE hB hz ht hv he hb + rw [source_receiver_fderiv_formula x z v e i hE hB hz ht,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (show 0≤coneRadius 0 z from norm_nonneg _))] + let Q := max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖ + have hQ : 0≤Q := (norm_nonneg _).trans (le_max_left _ _) + have he' : ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e)‖≤Q*‖e‖ := by + exact (ContinuousLinearMap.le_opNorm _ (0,e)).trans (by + simpa only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg e)] using mul_le_mul_of_nonneg_right + (le_max_left ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ _) (norm_nonneg ((0:ℝ),e))) + have hb' : ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)‖≤Q*‖e‖ := by + exact (ContinuousLinearMap.le_opNorm _ (0,e)).trans (by + simpa only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg e)] using mul_le_mul_of_nonneg_right + (le_max_right _ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖) (norm_nonneg ((0:ℝ),e))) + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + have hd := hcb ⟨coneDirection 0 z,hn⟩ v _ _ hv he hb + have harg : ‖(((0:Vec),fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e), + fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)),(0:Vec))‖≤Q*‖e‖ := by + simp only [Prod.norm_mk,norm_zero] + exact max_le (max_le (by positivity) (max_le he' hb')) (by positivity) + have hh := (ContinuousLinearMap.le_opNorm _ _).trans (mul_le_mul hd harg (norm_nonneg _) hC) + apply (mul_le_mul_of_nonneg_left hh (inv_nonneg.mpr (show 0≤coneRadius 0 z from norm_nonneg _))).trans_eq + simp only [coneRadius,zero_sub,norm_neg,Q] + ring + +def sourceWeightedPacket (s : Solution) (t : ℝ) (i : Fin 3) (p : Vec × Phase) : ℝ := + sourceReceiverKernel s t i p*s.f (t-coneRadius 0 p.2.1,p.1+p.2.1,p.2.2) + +lemma sourceWeightedPacket_contDiffAt {s : Solution} {t : ℝ} (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {p : Vec × Phase} (hz : p.2.1≠0) (ht : 0 (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) p := + (contDiffAt_const.sub hr).prodMk ((contDiffAt_fst.add contDiffAt_snd.fst).prodMk contDiffAt_snd.snd) + exact (sourceReceiverKernel_contDiffAt i hE hB hz ht).mul + ((particle_contDiffAt_positive hf ht (p.1+p.2.1) p.2.2).comp p hm) + +lemma sourceWeightedPacket_fderiv {s : Solution} {t : ℝ} (x z v e : Vec) (i : Fin 3) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hz : z≠0) (ht : 0 sourceWeightedPacket s t i (y,z,v)) _ x at hh + change HasFDerivAt (fun y => sourceReceiverKernel s t i (y,z,v)) _ x at hkp + rw [hh.fderiv,hkp.fderiv] + simp only [add_apply,smul_apply, + ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply,ContinuousLinearMap.id_apply, + zero_apply,smul_eq_mul,Function.comp_apply,id_eq,sourceReceiverKernel] + ring + +lemma source_packet_estimates (P A M N Q : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hN : 0≤N) (hQ : 0≤Q) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (s : Solution) (U t : ℝ), t≤U → + ContDiffOn ℝ 1 s.f particleHalfSpace → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => s.f (u,z,v)) y‖≤N) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hc := hkb s t x z v hz hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd := hlb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤L/‖z‖*Q*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + have hfd : |fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤N*‖e‖ := by + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hu.1 _ _) e] + exact (ContinuousLinearMap.le_opNorm _ e).trans + (mul_le_mul_of_nonneg_right (hfN _ ⟨hu.1.le,hu.2⟩ _ v) (norm_nonneg e)) + constructor + · change |sourceConeCoefficient s t x i (z,v)*s.f (t-coneRadius 0 z,x+z,v)|≤_ + rw [abs_mul] + exact (mul_le_mul hc (hfA _ ⟨hu.1.le,hu.2⟩ _ v) (abs_nonneg _) (by positivity)).trans_eq (by ring) + · rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz hu.1] + apply (abs_add_le _ _).trans + rw [abs_mul,abs_mul] + exact (add_le_add (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ v) (abs_nonneg _) (by positivity)) + (mul_le_mul hc hfd (abs_nonneg _) (by positivity))).trans_eq (by ring) + +lemma hasDerivAt_electric_source_integral {s : Solution} {U t P A M N Q : ℝ} + (x e : Vec) (i : Fin 3) (a : ℝ) (htU : t≤U) + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hA : 0≤A) (hN : 0≤N) (hQ : 0≤Q) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) + (hEB : ∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) + (hDF : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) + (hfN : ∀ u∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => s.f (u,z,v)) y‖≤N) : + HasDerivAt (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) + (∫ z in ball (0:Vec) t,∫ v,fderiv ℝ (sourceWeightedPacket s t i) (x+a • e,z,v) (e,0,0)) a := by + obtain ⟨C,D,hC,hD,hb⟩ := source_packet_estimates P A M N Q e i hA hN hQ + have hbc := hb s U t htU hf hE hB hfA hEB hDF hfN + apply hasDerivAt_retarded_packet_integral (F:=sourceWeightedPacket s t i) (P:=P) (C:=C) (D:=D) ?_ ?_ + (fun x z v hz hzt hv => (hbc x z v hz hzt hv).1) x e a (fun x z v hz hzt hv => (hbc x z v hz hzt hv).2) + · intro p hp ht + apply sourceWeightedPacket_contDiffAt i hf hE hB hp + simpa only [coneRadius,zero_sub,norm_neg] using sub_pos.mpr ht + · intro x z v hz hzt hv + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + simp only [coneRadius,zero_sub,norm_neg,mem_Icc] + constructor <;> linarith [norm_nonneg z] + simp only [sourceWeightedPacket,hP _ hu _ v hv,mul_zero] + +lemma retarded_packet_inner_integrable {F : Vec × Phase → ℝ} {t P : ℝ} + (hc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ F (x,z,v)) := by + have hcont : Continuous (fun v => F (x,z,v)) := continuous_iff_continuousAt.mpr (fun v => + (hc (x,z,v) hz0 hzt).comp (f:=fun w : Vec => (x,z,w)) (continuousAt_const.prodMk (continuousAt_const.prodMk continuousAt_id))) + exact hcont.integrable_of_hasCompactSupport (HasCompactSupport.intro (isCompact_closedBall (0:Vec) P) + (fun v hv => hz x z v hz0 hzt (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv))) + +lemma norm_integral_ball_inverse_le {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {t C : ℝ} (ht : 0≤t) + (hb : ∀ z : Vec,z≠0 → ‖z‖ (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) p := (continuousAt_const.sub ((contDiffAt_coneRadius (k:=1) hz.symm).continuousAt.comp (f:=fun q : Vec × Phase => q.2.1) continuousAt_snd.fst)).prodMk + ((continuousAt_fst.add continuousAt_snd.fst).prodMk continuousAt_snd.snd) + exact (((sourceReceiverKernel_contDiffAt i hE hB hz hu).continuousAt_fderiv (by simp)).clm_apply continuousAt_const).mul + ((particle_contDiffAt_positive hf hu (p.1+p.2.1) p.2.2).continuousAt.comp (f:=fun q : Vec × Phase => (t-coneRadius 0 q.2.1,q.1+q.2.1,q.2.2)) hm) + +lemma source_receiver_packet_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t Q : ℝ),t≤U → 0≤Q → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hd := hkb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤K/‖z‖*Q*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + exact (by + dsimp [sourceReceiverParticlePacket] + rw [abs_mul] + exact (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ _) (abs_nonneg _) (by positivity)).trans_eq (by ring)) + +lemma electric_source_receiver_integral_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t Q : ℝ) (x : Vec),0≤t → t≤U → 0≤Q → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q) → + |∫ z in ball (0:Vec) t,∫ v,sourceReceiverParticlePacket s t e i (x,z,v)|≤C*Q*t^2 := by + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨2*Real.pi*volume.real (closedBall (0:Vec) P)*K,by positivity,?_⟩ + intro s U t Q x ht htU hQ hE hB hfA hP hEB hDF + rw [←Real.norm_eq_abs] + apply (norm_integral_ball_inverse_le ht (C:=volume.real (closedBall (0:Vec) P)*K*Q) ?_).trans_eq (by ring) + intro z hz hzt + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + simp only [coneRadius,zero_sub,norm_neg,mem_Icc] + constructor <;> linarith [norm_nonneg z] + have hh := norm_velocity_integral_bound (P:=P) (g:=fun v => sourceReceiverParticlePacket s t e i (x,z,v)) + (fun v hv => by simp only [sourceReceiverParticlePacket,hP _ hu _ v hv,mul_zero]) + (hkb s U t Q htU hQ hE hB hfA hEB hDF x z · hz hzt) + exact hh.trans_eq (by ring) + +lemma electric_source_deriv_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H Q N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + C*(H+H^2*(1+Q)) := by + obtain ⟨C₁,hC₁,hb₁⟩ := electric_source_particle_gradient_bound P A M e i hA + obtain ⟨C₂,hC₂,hb₂⟩ := electric_source_receiver_integral_bound P A M e i hA + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨C₁+C₂,by positivity,?_⟩ + intro s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN + have hH : 0≤H := ht.le.trans (htU.trans hUH) + have hprop (z : Vec) (hz : ‖z‖ linarith [norm_nonneg z] + let R := sourceReceiverParticlePacket s t e i + let F := fun p : Vec × Phase => fderiv ℝ (sourceWeightedPacket s t i) p (e,0,0) + have hRc : ∀ p : Vec × Phase,p.2.1≠0 → ‖p.2.1‖ sourceReceiverParticlePacket_continuousAt e i hf hE hB hp hpt + have hRz : ∀ x z v : Vec,z≠0 → ‖z‖ sourceWeightedPacket_contDiffAt i hf hE hB hp (hprop p.2.1 hpt).1 + have hWz : ∀ x z v : Vec,z≠0 → ‖z‖ retarded_packet_derivative_zero hweighted hWz x z v e hz hzt hv + have hRi := retarded_packet_integrable x hRc hRz (hkb s U t Q htU hQ hE hB hfA hEB hDF) + have hPi := source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN + have hsplit : (∫ z in ball (0:Vec) t,∫ v,F (x,z,v))= + (∫ z in ball (0:Vec) t,∫ v,R (x,z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) := by + rw [←integral_add hRi hPi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hzt : ‖z‖ by + dsimp [F,R,sourceReceiverParticlePacket] + rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz0 (hprop z hzt).1] + ring) + linarith + rw [(hasDerivAt_electric_source_integral x e i 0 htU hf hE hB hA hN hQ hP hfA hEB hDF hfN).deriv] + simp only [zero_smul,add_zero] + change |∫ z in ball (0:Vec) t,∫ v,F (x,z,v)|≤_ + rw [hsplit] + apply (abs_add_le _ _).trans + apply (add_le_add (hb₂ s U t Q x ht.le htU hQ hE hB hfA hP hEB hDF) + (hb₁ s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN)).trans + have htH : t^2≤H^2 := by nlinarith [htU.trans hUH] + have hh : C₂*Q*t^2≤C₂*(H+H^2*(1+Q)) := by + calc + _ ≤ C₂*Q*H^2 := mul_le_mul_of_nonneg_left htH (mul_nonneg hC₂ hQ) + _ ≤ _ := by nlinarith [mul_nonneg hC₂ hH,mul_nonneg hC₂ (sq_nonneg H)] + nlinarith + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +lemma contDiffAt_sourceAngularCore {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {n u b : U → Vec} {z : U} {k : ℕ∞ω} + (hn : ContDiffAt ℝ k n z) (hu : ContDiffAt ℝ k u z) (hb : ContDiffAt ℝ k b z) + (hd : 1-dot (n z) (u z)≠0) : + ContDiffAt ℝ k (fun w => sourceAngularCore (n w) (u w) (b w)) z := by + exact contDiff_cross.contDiffAt.comp z (hn.prodMk (RVM.contDiffAt_sourceAngularCore hn hu hb hd)) + +def sourceAngularProfile (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : ℝ := + sourceAngularCore p.1.1 (velocity p.2) + (fderiv ℝ velocity p.2 (p.1.2.1+cross (velocity p.2) p.1.2.2)) i + +lemma sourceAngularProfile_contDiffAt (i : Fin 3) {p : (Vec × Vec × Vec) × Vec} + (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (sourceAngularProfile i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + have hdv : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => fderiv ℝ velocity z.2) p := + ((contDiff_velocity (k:=2)).fderiv_right (by norm_num)).contDiffAt.comp p contDiffAt_snd + exact (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p + (contDiffAt_sourceAngularCore hn hu (hdv.clm_apply hforce) hd) + +def sourceFixedCoefficient (v E B : Vec) (i : Fin 3) (z : Vec) : ℝ := + (coneRadius 0 z)⁻¹*sourceAngularProfile i ((coneDirection 0 z,E,B),v) + +def sourceFixedFlux (v E B e : Vec) (i : Fin 3) (z : Vec) : Vec := + sourceFixedCoefficient v E B i z • coneSpatialLift 0 z v e + +lemma sourceFixedCoefficient_contDiffAt (v E B : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (sourceFixedCoefficient v E B i) z := by + have hn := contDiffAt_coneDirection (k:=1) hz.symm + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 z,E,B),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').comp z + ((hn.prodMk (contDiffAt_const.prodMk contDiffAt_const)).prodMk contDiffAt_const) + exact ((contDiffAt_coneRadius hz.symm).inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz.symm))).mul hc + +lemma sourceFixedFlux_contDiffAt (v E B e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (sourceFixedFlux v E B e i) z := + (sourceFixedCoefficient_contDiffAt v E B i hz).smul (contDiffAt_coneSpatialLift hz.symm) + +lemma sourceFixedFlux_homogeneous (v E B e : Vec) (i : Fin 3) {r : ℝ} (hr : 0 r • y) (r • ContinuousLinearMap.id ℝ Vec) z := + (hasFDerivAt_id z).const_smul r + have h₁ := hrz.hasFDerivAt.comp z hm + have h₂ := hz.hasFDerivAt.const_smul r⁻¹ + have heq : (fun y : Vec => F (r • y))=(fun y : Vec => r⁻¹ • F y) := funext (hh r hr) + change HasFDerivAt (fun y : Vec => F (r • y)) _ _ at h₁ + rw [heq] at h₁ + have hv := congrArg (fun L : Vec →L[ℝ] Vec => L e) (h₁.unique h₂) + change fderiv ℝ F (r • z) (r • e)=r⁻¹ • fderiv ℝ F z e at hv + rw [map_smul] at hv + have hv' := congrArg (fun a : Vec => r⁻¹ • a) hv + simpa only [smul_smul,inv_mul_cancel₀ hr.ne',one_smul, + show r⁻¹*r⁻¹=(r^2)⁻¹ by ring] using hv' + +lemma divergence_degree_neg_one {F : Vec → Vec} + (hh : ∀ r : ℝ, 0 F x i) y = (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).comp (fderiv ℝ F y) := by + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).hasFDerivAt.comp y (hF y hy).hasFDerivAt).fderiv + unfold divergence spatialPartial + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + rw [hc _ hrz i,hc _ hz i] + change (fderiv ℝ F (r • z) (basis i)) i = (r^2)⁻¹*(fderiv ℝ F z (basis i)) i + rw [fderiv_degree_neg_one hh hr (hF _ hz) (hF _ hrz)] + rfl + +def sourceConeCoefficient (s : Solution) (t : ℝ) (x : Vec) (i : Fin 3) (p : Phase) : ℝ := + sourceFixedCoefficient p.2 (s.E (t-coneRadius 0 p.1,x+p.1)) + (s.B (t-coneRadius 0 p.1,x+p.1)) i p.1 + +lemma sourceConeCoefficient_contDiffAt {s : Solution} + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {t : ℝ} (x : Vec) (i : Fin 3) {p : Phase} (hp : p.1≠0) (ht : 0 (t-coneRadius 0 z.1,x+z.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_const.add contDiffAt_fst) + have he := (field_contDiffAt_positive hE ht (x+p.1)).comp p ha + have hb := (field_contDiffAt_positive hB ht (x+p.1)).comp p ha + have hc := (sourceAngularProfile_contDiffAt i (p:=((coneDirection 0 p.1, + s.E (t-coneRadius 0 p.1,x+p.1),s.B (t-coneRadius 0 p.1,x+p.1)),p.2)) + (cone_denom_pos p.2 _ (coneDirection_norm hp.symm)).ne').comp p + ((hn.prodMk (he.prodMk hb)).prodMk contDiffAt_snd) + exact (hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hp.symm))).mul hc + +lemma magnetic_source_division_annulus {s : Solution} {H t ε R : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) (heq : EquationsBefore s H) + (htH : t≤H) (hε : 0<ε) (hεR : ε≤R) (hRt : R sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) := by + have hk : ContDiffOn ℝ 1 (sourceConeCoefficient s t x i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (sourceConeCoefficient_contDiffAt hE hB x i hp.1.1.symm hp.1.2).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + simpa only [smul_smul] using retarded_spatial_annulus (e:=e) hf hc hε hεR hRt hk hK + (fun z hz v => coneLorentz_vlasov_before hf heq htH x hz v) + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorant.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorant.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a10a3f84ebd6a874c1fdd2f11a4b0a1a7927e23 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorant.lean @@ -0,0 +1,1315 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.RepresentativeClosedBinSourceIndices +import OAI.Analysis.VlasovMaxwell.Flow.ClosedEulerianTimeBudget + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +def sourceMajorantKernel (r : ℝ) (n W v E B : Vec) : ℝ := + (10*Real.sqrt (2*(1-dot n (velocity W)))/(r*q v))* + (goodField E B n/(1-dot n (velocity v))+‖B‖) + +lemma sourceMajorantKernel_nonneg {r : ℝ} {n W v E B : Vec} + (hr : 0ENNReal.ofReal (z.1-z.2.1)) := + (measurable_fst.sub (measurable_fst.comp measurable_snd)).ennreal_ofReal + have hb : (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate, + ENNReal.ofReal (80*φ/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)+ + ENNReal.ofReal (80/p)*(ENNReal.ofReal (z.1-z.2.1)*ENNReal.ofReal φ* + ENNReal.ofReal (prefixConeMagnetic s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2) + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + have hzT : z.2.1∈Icc 0 T := ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ + have hrz : 0hs.nonnegative _ hzT _) + apply hb.trans_eq + let G := prefixConeGood s T X z + let b := prefixConeMagnetic s T X z + have hG0 : 0≤G := add_nonneg (norm_nonneg _) (abs_nonneg _) + have hb0 : 0≤b := norm_nonneg _ + have heG : goodField (s.E (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) + (s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)) z.2.2.1=G := by + simp [G,prefixConeGood,prefixField,prefixClamp_eq hzT] + have heb : ‖s.B (z.2.1,X z.1-(z.1-z.2.1) • z.2.2.1)‖=b := by + simp [b,prefixConeMagnetic,coneFoot,prefixField,prefixClamp_eq hzT] + rw [heG,heb] + have he : (80*φ/p)*(z.1-z.2.1)*(G/θ^2+b)= + (80*φ/(p*θ^2))*((z.1-z.2.1)*G)+ + (80/p)*((z.1-z.2.1)*φ*b) := by ring + rw [he,ENNReal.ofReal_add (by positivity) (by positivity),add_mul] + simp only [ENNReal.ofReal_mul (by positivity : 0≤80*φ/(p*θ^2)), + ENNReal.ofReal_mul (by positivity : 0≤80/p), + ENNReal.ofReal_mul (mul_nonneg hrz.le hφ.le),ENNReal.ofReal_mul hrz.le] + dsimp only [G,b] + ac_rfl + refine hb.trans_eq ?_ + have hMG : AEMeasurable (fun z : ConeCoordinate=> + ENNReal.ofReal (80*φ/(p*θ^2))*(ENNReal.ofReal (z.1-z.2.1)* + ENNReal.ofReal (prefixConeGood s T X z)*physicalBinDensity s X V B z.1 z.2.1 z.2.2)) + (physicalBinMeasure V B J) := by + simpa only [Pi.mul_apply] using (((hR.mul hG.ennreal_ofReal).aemeasurable.mul hN).const_mul + (ENNReal.ofReal (80*φ/(p*θ^2)))) + rw [lintegral_add_left' hMG,lintegral_const_mul' _ _ ENNReal.ofReal_ne_top, + lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + +lemma Admissible.source_majorant_two_budget_bound {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0≤Cg ∧ 0≤Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (a b I p P θ φ σ : ℝ) (k j : ℕ), IsCompact S → + tsupport (fun z=>s.f (0,z))⊆S → Icc a b⊆Icc 0 T → + 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let M := coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin))) / + ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*P^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*P^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/(p*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*M))^(1/2:ℝ))+ + ENNReal.ofReal (80/p)* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*M))^(1/2:ℝ)) := by + obtain ⟨Cg,hCg,hgood⟩ := hd₀.uniform_actual_bin_Cauchy + obtain ⟨Cb,hCb,hmag⟩ := hd₀.uniform_actual_magnetic_Cauchy + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ hI hp hP hθ hφ hσ + hR hD hqlo hqhi hdlo hdhi hDlo hDhi he hangle + dsimp only + have hα : Continuous (fun t=>prefixFlow F.flow T zX t) := + (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const) + have hb := physicalSourceMajorant_integral_bound hs hT hα.fst.measurable hα.snd.measurable B + measurableSet_Icc hJ hp hθ hφ hR hqlo hdlo hDhi + exact hb.trans (add_le_add + (mul_le_mul' le_rfl (hgood s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hqhi hdhi hDhi he hangle)) + (mul_le_mul' le_rfl (hmag s T F hs hT h0 zX B S a b I P θ φ σ k j hS hS0 hJ + hI hP hθ.le hφ.le hσ hR hD hDlo hqhi hdhi hDhi he hangle))) + +lemma Admissible.source_majorant_relative_budget {d : Datum} (hd₀ : Admissible d) : + ∃Cg Cb : ℝ,0 ≤ Cg ∧ 0 ≤ Cb ∧ ∀(s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀z,s.f (0,z)=d.f₀ z) → + ∀(zX : Phase) (B : ClosedConeBin) (S : Set Phase) + (M A P L a b massScale φ θ σ Cs p len I : ℝ) (k j : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < p → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → + 0 < φ → 0 < θ → 0 < σ → σ ≤ 1 → 128 ≤ Cs → + 2*len ≤ (Cs*(P/massScale)*(M/σ+Real.sqrt (A*L/σ)))⁻¹^2 → + p/128 ≤ B.qmin → B.qmax ≤ p/32 → massScale ≤ B.qmin → massScale ≤ B.wmin → + 0 < B.rmin → 0 ≤ B.rmax → 0 < B.Dmin → + θ^2/2 ≤ B.dmin → B.dmax ≤ 8*θ^2 → φ^2/2 ≤ B.Dmin → B.Dmax ≤ 8*φ^2 → + σ^2/2 ≤ B.emin → B.emax ≤ 8*σ^2 → 4 ≤ σ*B.qmin → 4 ≤ σ*B.wmin → + (∀D∈Icc B.Dmin B.Dmax,DyadicWindow k j (Real.sqrt (D/2))) → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + let O := (ENNReal.ofReal (30720*B.rmax/p*(1+φ/σ)*(1+I/len))*ENNReal.ofReal E)/ + ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/((p/128)*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (80/(p/128))* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hforce⟩ := hd₀.source_majorant_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S M A P L a b massScale φ θ σ Cs p len I k j + hS hS0 ha hb hab hp hlen hlenI hJI hM hA hP hL hm hφ hθ hσ hσ1 hCs hstable + hqmin hqmax hmq hmw hr hrmax hD hdlo hdhi hDlo hDhi helo hehi hq hw hangle HX HZ + dsimp only + have hI : 0s.f (0,z))⊆S → Icc a b⊆Icc 0 T → b-a≤I → + 0(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let O := (ENNReal.ofReal (16*I*φ^2/θ^2)* + ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x))) / ENNReal.ofReal (B.rmin^2*B.Dmin) + let H := volume (Icc a b)*ENNReal.ofReal (B.rmax-B.rmin)*ENNReal.ofReal (384*φ^2) + let Dg := ENNReal.ofReal (128*Cg*P^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*P^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B (Icc a b))≤ + ENNReal.ofReal (80*φ/(p*θ^2))* + ((ENNReal.ofReal I*goodFieldBudget s X (fun t=>velocity (V t)) k a b I j)^(1/2:ℝ)* + (min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (80/p)* + ((ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T k + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I j)^(1/2:ℝ)* + (min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hforce⟩ := hd₀.source_majorant_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ hJI hI hp hP hθ hφ hσ + hR hD hDmax hqlo hqhi hdlo hdhi hDlo hDhi he hangle + dsimp only + have hforceBound := hforce s T F hs hT h0 zX B S a b I p P θ φ σ k j hS hS0 hJ + hI hp hP hθ hφ hσ hR hD hqlo hqhi hdlo hdhi hDlo hDhi he hangle + have hC : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := by + intro r hr + exact ⟨(le_max_left _ _).trans hr.1,hr.2.trans (min_le_left _ _)⟩ + have ho := F.closedEulerian_angular_time_budget hs hT zX B hS hJ hC hR hθ hφ hI.le hJI hdlo hDmax hDhi + have hod : coneOccupation F.flow zX T s.f + (closedBinEulerian F.flow zX T B S a b (max 0 (a-B.rmax)) (min T (b-B.rmin)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin) ≤ + (ENNReal.ofReal (16*I*φ^2/θ^2)*ENNReal.ofReal (∫x : Vec,totalEnergy s (0,x)))/ + ENNReal.ofReal (B.rmin^2*B.Dmin) := by + simpa only [div_eq_mul_inv] using mul_le_mul' ho (le_refl ((ENNReal.ofReal (B.rmin^2*B.Dmin))⁻¹)) + apply hforceBound.trans + gcongr + +lemma projected_source_combined_le_majorant {C T r f w : ℝ} {n v W E B : Vec} + (hC0 : 0≤C) (hC : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤C) + (hn : ‖n‖=1) (hw : 0 rw [mul_left_comm] + apply mul_le_mul' le_rfl + rw [←lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] + apply setLIntegral_mono' (measurableSet_coneBinMomentumSet _ _ _) + intro v hv + rw [←ENNReal.ofReal_mul (by positivity : 0≤64+5880000*c)] + apply ENNReal.ofReal_le_ofReal + exact projected_source_combined_le_majorant hc hcut (sphere_norm _) hw hW hr (hf v) + (hv.2.1.2.trans hsmall) Q + +lemma physicalProjectedSourceIntegral_le_majorant {s : Solution} {T w c : ℝ} + (hs : EnergyPrefix s T) {X V : ℝ→Vec} (hV : Measurable V) + (C : ClosedConeBin) (Q : Set (Fin 4→ℕ)) {J : Set ℝ} + (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + (hc : 0≤c) (hcut : ∀k : ℕ,∀x : ℝ,|x*deriv (dyadicFactor k) x|≤c) + (hw : 0hs.nonnegative _ ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _) + +lemma Admissible.source_majorant_relative_radius_budget {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let O := ENNReal.ofReal (491520*E*(1+φ/σ)*(1+I/len)/(p*r*φ^2)) + let H := ENNReal.ofReal (576*I*r*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (10240*φ/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)*(min (Dg^2*H) (Dg*O))^(1/2:ℝ))+ + ENNReal.ofReal (10240/p)* + ((ENNReal.ofReal (40*(I+2*r)*E))^(1/2:ℝ)*(min (Db^2*H) (Db*O))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_relative_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + rw [heG,heB,hmass] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) le_rfl + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hmag (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) le_rfl + +def majorant_relativeCauchyConstant (C E Z : ℝ) : ℝ := + 31457280*C*Real.sqrt Z+10240*Real.sqrt Z*Real.sqrt (62914560*C*E) + +lemma majorant_relativeCauchyConstant_nonneg {C E Z : ℝ} (hC : 0≤C) : + 0≤ majorant_relativeCauchyConstant C E Z := by unfold majorant_relativeCauchyConstant; positivity + +lemma majorant_relative_density_near_sqrt {C I p ν r φ : ℝ} + (hC : 0≤C) (hI : 0≤I) (hp : 0≤p) (_hν : 0≤ν) (hr : 0≤r) (hφ : 0≤φ) : + Real.sqrt ((128*C*p^3*ν^2)^2*(576*I*r*φ^2)) = + 3072*C*p^3*ν^2*Real.sqrt I*Real.sqrt r*φ := by + rw [Real.sqrt_mul (sq_nonneg _),Real.sqrt_sq (by positivity), + show 576*I*r*φ^2=576*((I*r)*φ^2) by ring, + Real.sqrt_mul (by norm_num : (0:ℝ)≤576),Real.sqrt_mul (mul_nonneg hI hr), + Real.sqrt_mul hI,Real.sqrt_sq hφ] + norm_num + ring + +lemma majorant_relative_density_far_sqrt {C E p ν R r φ κ : ℝ} + (hC : 0≤C) (hE : 0≤E) (hp : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative (k 0)/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative (k 0) → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + max 1 T*cappedRepresentative (k 3) ≤ I → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (Kg*min ((I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/θ^2)/Real.sqrt r)+ + Kb*min ((I*p^2*ν^2*φ)*Real.sqrt r) + ((Real.sqrt I*R*ν*Real.sqrt κ/φ)/Real.sqrt r)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_relative_radius_budget + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable hrI HX HZ + have hn := hsource s T F hs hT h0 zX S k j a b I len w M A P L massScale Cs + hS hS0 ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only at hn ⊢ + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + have hp : 0

min (a*Real.sqrt (H*(2:ℝ)^k)) (b/Real.sqrt (H*(2:ℝ)^k)) + have hg0 (k : ℤ) : 0≤g k := by dsimp [g]; positivity + have hg := dyadic_sqrt_radius_balance ha hb hH + have he (n : ℕ) : cappedRepresentative n=(2:ℝ)^(-(n:ℤ)) := by + simp only [cappedRepresentative,zpow_neg,zpow_natCast,inv_pow] + have hinj : Function.Injective (fun n : ℕ=>-(n:ℤ)) := by + intro a b hab + exact_mod_cast neg_injective hab + calc + _ = ∑'n : ℕ,ENNReal.ofReal (K*g (-(n:ℤ))) := by + apply tsum_congr + intro n + rw [he] + _ ≤ ∑'k : ℤ,ENNReal.ofReal (K*g k) := + ENNReal.tsum_comp_le_tsum_of_injective hinj (fun k=>ENNReal.ofReal (K*g k)) + _ = ENNReal.ofReal (K*∑'k : ℤ,g k) := by + rw [←ENNReal.ofReal_tsum_of_nonneg (fun k=>mul_nonneg hK (hg0 k)) (hg.1.mul_left K),tsum_mul_left] + _ ≤ _ := by + apply ENNReal.ofReal_le_ofReal + simpa only [g,mul_assoc] using mul_le_mul_of_nonneg_left hg.2 hK + +lemma Admissible.source_majorant_relative_short_radial_sum {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ j : ℕ) + (a b I len w M A P L massScale Cs : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → 0 < len → len ≤ I → b-a ≤ I → + 0 < M → 0 ≤ A → 0 < P → 0 ≤ L → 0 < massScale → 0 < w → 128 ≤ Cs → + massScale ≤ sourceRepresentative np/128 → massScale ≤ w/8 → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + 2*len ≤ (Cs*(P/massScale)*(M/cappedRepresentative j+ + Real.sqrt (A*L/cappedRepresentative j)))⁻¹^2 → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P L → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P L) → + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let κ := 1+φ/σ + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + let D := dyadicBalanceConstant (1/2) (1/2) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤I then + ∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal (Kg*D*Real.sqrt + ((I*p^2*ν^2*φ^2/θ^2)*(Real.sqrt I*R*ν*Real.sqrt κ/θ^2))+ + Kb*D*Real.sqrt ((I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt κ/φ))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_relative_short_radius + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b I len w M A P L massScale Cs hS hS0 + ha hb hab hlen hlenI hJI hM hA hP hL hm hw hCs hmq hmw hqσ hwσ hstable HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let ν := min θ σ + let κ := 1+φ/σ + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + let ag := I*p^2*ν^2*φ^2/θ^2 + let bg := Real.sqrt I*R*ν*Real.sqrt κ/θ^2 + let ab := I*p^2*ν^2*φ + let bb := Real.sqrt I*R*ν*Real.sqrt κ/φ + let D := dyadicBalanceConstant (1/2) (1/2) + have hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → a ≤ b → b-a ≤ (w/P)^2 → + 0 < M → 0 ≤ A → 0 < P → 1 ≤ Real.log (2+P) → 0 < w → w≤P → + sourceRepresentative np≤128*P → + cappedRepresentative nφ≤16384*cappedRepresentative nθ → + 512 ≤ cappedRepresentative j*sourceRepresentative np → + 32 ≤ cappedRepresentative j*w → + IncrementBootstrap (fun t=>(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>relativeRepresentativeClosedBin T w ![np,nθ,nφ,nr] j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∑'nr : ℕ,if max 1 T*cappedRepresentative nr≤(w/P)^2 then + ∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b) else 0) ≤ + ENNReal.ofReal ((16384*Kg+Kb)*dyadicBalanceConstant (1/2) (1/2)* + Real.sqrt (32768*16385*(1+16384*(M+Real.sqrt A))*w^2*Real.sqrt (Real.log (2+P)))) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_relative_short_radial_sum + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP hφθ hpσ hwσ HX HZ + dsimp only + let p := sourceRepresentative np + let θ := cappedRepresentative nθ + let φ := cappedRepresentative nφ + let σ := cappedRepresentative j + let L := Real.log (2+P) + let I := (w/P)^2 + let lam := stabilityLength P 16384 M A p w σ + let len := min I (lam/2) + let m := min p w/128 + let E := ∫x : Vec,totalEnergy s (0,x) + let R := Real.sqrt (1+I/len) + let ν := min θ σ + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + let D := dyadicBalanceConstant (1/2) (1/2) + let U := 32768*16385*(1+16384*(M+Real.sqrt A))*w^2*Real.sqrt L + have hp : 0

dsimp [I,R,ν,len,lam,U,L] <;> ring + have hb'' : (I*p^2*ν^2*φ)*(Real.sqrt I*R*ν*Real.sqrt (1+φ/σ)/φ)≤U := by + convert hb' using 1 + · dsimp [I,R,ν,len,lam] + field_simp [hφ.ne'] + · dsimp [U,L] + ring + have hKg : 0≤Kg := majorant_relativeCauchyConstant_nonneg hCg + have hKb : 0≤Kb := majorant_relativeCauchyConstant_nonneg hCb + have hD : 0≤D := (dyadicBalanceConstant_pos (by norm_num) (by norm_num)).le + have hr : Real.sqrt (268435456*U)=16384*Real.sqrt U := by rw [Real.sqrt_mul (by norm_num : (0:ℝ)≤268435456)]; norm_num + apply hn.trans + apply ENNReal.ofReal_le_ofReal + calc + _ ≤ Kg*D*Real.sqrt (268435456*U)+Kb*D*Real.sqrt U := + add_le_add (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hg') (mul_nonneg hKg hD)) + (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hb'') (mul_nonneg hKb hD)) + _ = _ := by rw [hr]; dsimp [Kg,Kb,D,U,E,L]; ring + +lemma Admissible.source_majorant_large_radius_budget {d : Datum} (hd₀ : Admissible d) : + ∃ Cg Cb : ℝ, 0 ≤ Cg ∧ 0 ≤ Cb ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0 ≤ T → (∀ z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (k : Fin 4→ℕ) (j : ℕ) (a b I w : ℝ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + I ≤ max 1 T*cappedRepresentative (k 3) → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let Og := ENNReal.ofReal (491520*E/(p*r*φ^2)) + let Ob := ENNReal.ofReal (491520*I*E/(r^2*θ^2)) + let H := ENNReal.ofReal (576*I*r*φ^2) + let Dg := ENNReal.ofReal (128*Cg*p^3*(min θ σ)^2) + let Db := ENNReal.ofReal (128*Cb*p^3*(min θ σ)^2) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal (10240*φ/(p*θ^2))* + ((ENNReal.ofReal (20*I*E))^(1/2:ℝ)*(min (Dg^2*H) (Dg*Og))^(1/2:ℝ))+ + ENNReal.ofReal (10240/p)* + ((ENNReal.ofReal (120*r*E))^(1/2:ℝ)*(min (Db^2*H) (Db*Ob))^(1/2:ℝ)) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hIr + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + + have hmag' : ENNReal.ofReal (40*(I+2*r)*E)≤ENNReal.ofReal (120*r*E) := by + apply ENNReal.ofReal_le_ofReal + have hIr' : I≤r := hIr + nlinarith only [mul_nonneg (sub_nonneg.mpr hIr') hE] + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + dsimp only at hn + rw [heG,heB] at hn + apply hn.trans + apply add_le_add + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) (mul_le_mul' le_rfl hgO) + · apply mul_le_mul' le_rfl + apply mul_le_mul' (ENNReal.rpow_le_rpow (hmag.trans hmag') (by norm_num)) + apply ENNReal.rpow_le_rpow _ (by norm_num) + exact min_le_min (mul_le_mul' le_rfl hvolume) (mul_le_mul' le_rfl hbO) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma majorant_relative_radius_cauchy_near {C E Z I p ν r φ γ : ℝ} + (hC : 0≤C) (hZ : 0≤Z) (hI : 0s.f (0,z))⊆S → + 0 ≤ a → b ≤ T → b-a ≤ I → 0 < I → + max 1 T*cappedRepresentative (k 3)≤I → + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let ν := min θ σ + let r := max 1 T*cappedRepresentative (k 3) + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := relativeRepresentativeClosedBin T w k j + let E := ∫x : Vec,totalEnergy s (0,x) + let Kg := majorant_relativeCauchyConstant Cg E (20*E) + let Kb := majorant_relativeCauchyConstant Cb E (120*E) + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z + ∂physicalBinMeasure V B (Icc a b)) ≤ + ENNReal.ofReal ((Kg*(I*p^2*ν^2*φ^2/θ^2)+Kb*(I*p^2*ν^2*φ))*Real.sqrt r) := by + obtain ⟨Cg,Cb,hCg,hCb,hsource⟩ := hd₀.source_majorant_two_budget_bound + refine ⟨Cg,Cb,hCg,hCb,?_⟩ + intro s T F hs hT h0 zX S k j a b I w hS hS0 ha hb hJI hI hrI + dsimp only + let p := sourceRepresentative (k 0) + let θ := cappedRepresentative (k 1) + let φ := cappedRepresentative (k 2) + let σ := cappedRepresentative j + let r := max 1 T*cappedRepresentative (k 3) + let B := relativeRepresentativeClosedBin T w k j + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let E := ∫x : Vec,totalEnergy s (0,x) + have hp : 0

velocity (V t)) 1 a b I (k 2) ≤ + ENNReal.ofReal (20*I*E) := by + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.goodFieldBudget_uniform X (fun t=>velocity (V t)) 1 hJ hI hJI) + calc + _ ≤ ENNReal.ofReal I*((4*1+1:ℕ)*ENNReal.ofReal (4*E)) := mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal I*(5*ENNReal.ofReal (4*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=5),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤5), + ←ENNReal.ofReal_mul hI.le] + congr 1 + ring + have hmag : ENNReal.ofReal (2*I)*magneticFieldBudget s F.flow zX T 1 + (max 0 (a-B.rmax)) (min T (b-B.rmin)) I (k 2) ≤ ENNReal.ofReal (40*(I+2*r)*E) := by + have hsub : Icc (max 0 (a-B.rmax)) (min T (b-B.rmin))⊆Icc 0 T := + Icc_subset_Icc (le_max_left _ _) (min_le_left _ _) + have hh : min T (b-B.rmin)-max 0 (a-B.rmax) ≤ (1+2*r/I)*I := by + have hb' := min_le_right T (b-B.rmin) + have ha' := le_max_right 0 (a-B.rmax) + rw [hBmax] at ha' + rw [hBmin] at hb' + have he : (1+2*r/I)*I=I+2*r := by field_simp + rw [hBmin,hBmax,he] + linarith only [hJI,hb',ha',hr] + have hh := (ENNReal.le_tsum (k 2)).trans + (hs.magneticFieldBudget_uniform F.flow zX 1 hsub hI (by positivity : 0≤1+2*r/I) hh) + calc + _ ≤ ENNReal.ofReal (2*I)*((2*(4*1+1):ℕ)*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E)) := + mul_le_mul' le_rfl hh + _ = _ := by + change ENNReal.ofReal (2*I)*(10*ENNReal.ofReal (1+2*r/I)*ENNReal.ofReal (2*E))=_ + rw [←ENNReal.ofReal_ofNat (n:=10),←ENNReal.ofReal_mul (by norm_num : (0:ℝ)≤10), + ←ENNReal.ofReal_mul (by positivity : 0≤10*(1+2*r/I)), + ←ENNReal.ofReal_mul (by positivity : 0≤2*I)] + congr 1 + field_simp [hI.ne'] + ring + + have hmag' : ENNReal.ofReal (40*(I+2*r)*E)≤ENNReal.ofReal (120*I*E) := by + apply ENNReal.ofReal_le_ofReal + have hrI' : r≤I := hrI + nlinarith only [mul_nonneg (sub_nonneg.mpr hrI') hE] + have heG : 80*φ/(p/128*θ^2)=10240*φ/(p*θ^2) := by ring + have heB : 80/(p/128)=10240/p := by ring + dsimp only at hn + rw [heG,heB] at hn + have hnear := hn.trans (add_le_add + (mul_le_mul' le_rfl (mul_le_mul' (ENNReal.rpow_le_rpow hgood (by norm_num)) + (ENNReal.rpow_le_rpow ((min_le_left _ _).trans (mul_le_mul' le_rfl hvolume)) (by norm_num)))) + (mul_le_mul' le_rfl (mul_le_mul' (ENNReal.rpow_le_rpow (hmag.trans hmag') (by norm_num)) + (ENNReal.rpow_le_rpow ((min_le_left _ _).trans (mul_le_mul' le_rfl hvolume)) (by norm_num))))) + let ν := min θ σ + have hν : 0≤ν := (lt_min hθ hσ).le + have hg := majorant_relative_radius_cauchy_near (E:=E) hCg (show 0≤20*E by positivity) + hI hp hν hr.le hφ.le (show 0≤φ/θ^2 by positivity) + have hm := majorant_relative_radius_cauchy_near (E:=E) hCb (show 0≤120*E by positivity) + hI hp hν hr.le hφ.le (show 0≤(1:ℝ) by norm_num) + have heγ : 10240*(φ/θ^2)/p=10240*φ/(p*θ^2) := by ring + have hea : I*p^2*ν^2*φ*(φ/θ^2)=I*p^2*ν^2*φ^2/θ^2 := by ring + rw [heγ,hea,show (20*E)*I=20*I*E by ring] at hg + simp only [mul_one] at hm + rw [show (120*E)*I=120*I*E by ring] at hm + have hG0 : 0≤ majorant_relativeCauchyConstant Cg E (20*E)*(I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r := + mul_nonneg (mul_nonneg (majorant_relativeCauchyConstant_nonneg hCg) (by positivity)) (Real.sqrt_nonneg _) + have hB0 : 0≤ majorant_relativeCauchyConstant Cb E (120*E)*(I*p^2*ν^2*φ)*Real.sqrt r := + mul_nonneg (mul_nonneg (majorant_relativeCauchyConstant_nonneg hCb) (by positivity)) (Real.sqrt_nonneg _) + apply hnear.trans + calc + _ ≤ ENNReal.ofReal (majorant_relativeCauchyConstant Cg E (20*E)*(I*p^2*ν^2*φ^2/θ^2)*Real.sqrt r)+ + ENNReal.ofReal (majorant_relativeCauchyConstant Cb E (120*E)*(I*p^2*ν^2*φ)*Real.sqrt r) := add_le_add hg hm + _ = _ := by rw [←ENNReal.ofReal_add hG0 hB0]; congr 1; ring + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorantFamily.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorantFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c244dcdf18f0dd30c205ac364dea5249cc7af24 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceMajorantFamily.lean @@ -0,0 +1,269 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.MajorantRelativeDensityTimeFar + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma measurable_sourceMajorantFamily {α : Type*} [MeasurableSpace α] + {r : α→ℝ} {n W v E B : α→Vec} (hr : Measurable r) (hn : Measurable n) + (hW : Measurable W) (hv : Measurable v) (hE : Measurable E) (hB : Measurable B) : + Measurable (fun x=>sourceMajorantKernel (r x) (n x) (W x) (v x) (E x) (B x)) := by + have hu := (contDiff_velocity (k:=0)).continuous.measurable.comp hv + have ha := (contDiff_velocity (k:=0)).continuous.measurable.comp hW + have hq := (contDiff_q (k:=0)).continuous.measurable.comp hv + have hd : Measurable (fun x=>1-dot (n x) (velocity (v x))) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hu)) + have hD : Measurable (fun x=>1-dot (n x) (velocity (W x))) := + measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk ha)) + have hG : Measurable (fun x=>goodField (E x) (B x) (n x)) := by + unfold goodField + exact ((hE.add ((contDiff_cross (k:=0)).continuous.measurable.comp (hn.prodMk hB))).norm.add + (continuous_dot.measurable.comp (hn.prodMk hB)).abs) + unfold sourceMajorantKernel + exact ((measurable_const.mul (Real.continuous_sqrt.measurable.comp + (measurable_const.mul hD))).div (hr.mul hq)).mul ((hG.div hd).add hB.norm) + +lemma measurable_coneBin_scalarDensity {g : Particle} (hg : Measurable g) + {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) (B : ClosedConeBin) + {K : ConeCoordinate×Vec→ℝ} (hK : Measurable K) : + Measurable (fun z : ConeCoordinate=>∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)), + ENNReal.ofReal (g (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v))*K (z,v))) := by + let H : Set (ConeCoordinate×Vec) := {p | p.2∈coneBinMomentumSet B p.1.2.2.1 (velocity (V p.1.1))} + have hn : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hv : Measurable (fun p : ConeCoordinate×Vec=>velocity p.2) := + (contDiff_velocity (k:=0)).continuous.measurable.comp measurable_snd + have ha : Measurable (fun p : ConeCoordinate×Vec=>velocity (V p.1.1)) := + (contDiff_velocity (k:=0)).continuous.measurable.comp (hV.comp (measurable_fst.comp measurable_fst)) + have hH : MeasurableSet H := by + exact (measurableSet_Icc.preimage ((contDiff_q (k:=0)).continuous.measurable.comp measurable_snd)).inter + ((measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (hn.prodMk hv)))).inter + (measurableSet_Icc.preimage (measurable_const.sub (continuous_dot.measurable.comp (ha.prodMk hv))))) + have hf : Measurable (fun p : ConeCoordinate×Vec=> + g (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))) := by + exact hg.comp ((measurable_fst.comp (measurable_snd.comp measurable_fst)).prodMk + (((hX.comp (measurable_fst.comp measurable_fst)).sub + (((measurable_fst.comp measurable_fst).sub (measurable_fst.comp (measurable_snd.comp measurable_fst))).smul hn)).prodMk measurable_snd)) + have hm : Measurable (fun z : ConeCoordinate=>∫⁻v : Vec,H.indicator + (fun p=>ENNReal.ofReal (g (p.1.2.1,(X p.1.1-(p.1.1-p.1.2.1) • p.1.2.2.1,p.2))*K p)) (z,v)) := + (((hf.mul hK).ennreal_ofReal).indicator hH).lintegral_prod_right' + convert hm using 1 + ext z + rw [←lintegral_indicator (measurableSet_coneBinMomentumSet B _ _)] + apply lintegral_congr + intro v + rfl + +lemma physicalSourceMajorantDensity_aemeasurable {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) : + AEMeasurable (physicalSourceMajorantDensity s X V B) (physicalBinMeasure V B J) := by + have ht : Measurable (fun p : ConeCoordinate×Vec=>p.1.1) := measurable_fst.comp measurable_fst + have hσ : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.1) := + measurable_fst.comp (measurable_snd.comp measurable_fst) + have hn : Measurable (fun p : ConeCoordinate×Vec=>p.1.2.2.1) := + measurable_subtype_coe.comp (measurable_snd.comp (measurable_snd.comp measurable_fst)) + have hy := hσ.prodMk ((hX.comp ht).sub ((ht.sub hσ).smul hn)) + have hK := measurable_sourceMajorantFamily (ht.sub hσ) hn (hV.comp ht) measurable_snd + ((continuous_prefixField hs.E_smooth.continuousOn hT).measurable.comp hy) + ((continuous_prefixField hs.B_smooth.continuousOn hT).measurable.comp hy) + have hm := measurable_coneBin_scalarDensity (hs.continuous_prefixParticle hT).measurable hX hV B hK + have hR : Measurable (fun z : ConeCoordinate=>ENNReal.ofReal ((z.1-z.2.1)^2)) := + ((measurable_fst.sub (measurable_fst.comp measurable_snd)).pow_const 2).ennreal_ofReal + apply (hR.mul hm).aemeasurable.congr + apply ae_restrict_of_forall_mem (measurableSet_physicalBinBase hV B hJ) + intro z hz + unfold physicalSourceMajorantDensity + dsimp only [Pi.mul_apply] + congr 1 + apply lintegral_congr + intro v + dsimp only [Pi.sub_apply,Pi.smul_apply',Function.comp_apply] + simp only [prefixParticle,prefixField,prefixClamp_eq + (show z.2.1∈Icc 0 T from ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩)] + +lemma physicalSourceMajorantDensity_relative_cover {s : Solution} {X V : ℝ→Vec} + (B : ClosedConeBin) (z : ConeCoordinate) {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) + (hf : Measurable (fun v : Vec=>s.f (z.2.1,(X z.1-(z.1-z.2.1) • z.2.2.1,v)))) : + physicalSourceMajorantDensity s X V B z≤ + ∑j∈Finset.range N,physicalSourceMajorantDensity s X V (relativeBinRefinement B j) z := by + let y := X z.1-(z.1-z.2.1) • z.2.2.1 + let g := fun v : Vec=>ENNReal.ofReal (s.f (z.2.1,(y,v))* + sourceMajorantKernel (z.1-z.2.1) z.2.2.1 (V z.1) v (s.E (z.2.1,y)) (s.B (z.2.1,y))) + have hg : Measurable g := (hf.mul (measurable_sourceMajorantFamily measurable_const measurable_const + measurable_const measurable_id measurable_const measurable_const)).ennreal_ofReal + have hc := lintegral_coneBin_relative_cover B z.2.2.1 (V z.1) hN hg + unfold physicalSourceMajorantDensity + dsimp only + change ENNReal.ofReal ((z.1-z.2.1)^2)*(∫⁻v in coneBinMomentumSet B z.2.2.1 (velocity (V z.1)),g v)≤_ + apply (mul_le_mul' le_rfl hc).trans_eq + exact Finset.mul_sum _ _ _ + +lemma physicalSourceMajorant_integral_relative_cover {s : Solution} {T : ℝ} + (hs : EnergyPrefix s T) (hT : 0≤T) {X V : ℝ→Vec} (hX : Measurable X) (hV : Measurable V) + (B : ClosedConeBin) {J : Set ℝ} (hJ : MeasurableSet J) (hJT : J⊆Icc 0 T) + {N : ℕ} (hN : 1024*B.qmax≤(2:ℝ)^N) : + (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∑j∈Finset.range N,∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V (relativeBinRefinement B j) J := by + have hp : (∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V B z ∂physicalBinMeasure V B J)≤ + ∫⁻z : ConeCoordinate,∑j∈Finset.range N,physicalSourceMajorantDensity s X V (relativeBinRefinement B j) z + ∂physicalBinMeasure V B J := by + apply lintegral_mono_ae + filter_upwards [ae_restrict_mem (measurableSet_physicalBinBase hV B hJ)] with z hz + exact physicalSourceMajorantDensity_relative_cover B z hN + (hs.measurable_velocity_slice ⟨hz.2.1.1,hz.2.1.2.trans (hJT hz.1).2⟩ _) + apply hp.trans_eq + exact lintegral_finsetSum' _ (fun j _=> + physicalSourceMajorantDensity_aemeasurable hs hT hX hV (relativeBinRefinement B j) hJ hJT) + +end RVM + +end + +open Set Filter Metric MeasureTheory +open scoped ENNReal Topology ContDiff + +namespace RVM + +lemma closed_deficit_index_lt {n v : Vec} {k N : ℕ} (hn : ‖n‖=1) + (hd : 1-dot n (velocity v)≤8*(cappedRepresentative k)^2) + (hP : 1024*q v≤(2:ℝ)^N) : k simp [ht] + · simp [hp] + _ = _ := by simp only [ennreal_tsum_indicator_lt]; ring + +lemma Admissible.source_majorant_remaining_radial_cover {d : Datum} (hd₀ : Admissible d) : + ∃C : ℝ,0≤C ∧ + ∀ (s : Solution) (T : ℝ) (F : PhaseFlowOn s.E s.B T), + EnergyPrefix s T → 0≤T → (∀z,s.f (0,z)=d.f₀ z) → + ∀ (zX : Phase) (S : Set Phase) (np nθ nφ : ℕ) (a b w M A P : ℝ) (N : ℕ), + IsCompact S → tsupport (fun z=>s.f (0,z))⊆S → + 0≤a → b≤T → a≤b → b-a≤(w/P)^2 → + 0(F.flow zX t).2) T M A P (Real.log (2+P)) → + (∀z∈S,IncrementBootstrap (fun t=>(F.flow z t).2) T M A P (Real.log (2+P))) → + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let E := ∫x : Vec,totalEnergy s (0,x) + (∑'nr : ℕ,∫⁻z : ConeCoordinate,physicalSourceMajorantDensity s X V (B nr) z + ∂physicalBinMeasure V (B nr) (Icc a b))≤ + (N:ℝ≥0∞)*ENNReal.ofReal (C*(1+E)*(1+M+Real.sqrt A)*w*Real.log (2+P)) := by + classical + obtain ⟨C,hC,hbnd⟩ := hd₀.source_majorant_remaining_all_radii + refine ⟨C,hC,?_⟩ + intro s T F hs hT h0 zX S np nθ nφ a b w M A P N hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP hN hsector HX HZ + dsimp only + let X := fun t=>(prefixFlow F.flow T zX t).1 + let V := fun t=>(prefixFlow F.flow T zX t).2 + let B := fun nr=>representativeClosedBin T w ![np,nθ,nφ,nr] + let U := C*(1+∫x : Vec,totalEnergy s (0,x))*(1+M+Real.sqrt A)*w*Real.log (2+P) + have hα := (F.continuous_prefixFlow hs hT).comp (continuous_id.prodMk continuous_const : Continuous (fun t : ℝ=>(t,zX))) + have hj : Icc a b⊆Icc 0 T := Icc_subset_Icc ha hb + calc + _ ≤ ∑'nr : ℕ,∑j∈Finset.range N,∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (relativeBinRefinement (B nr) j) z + ∂physicalBinMeasure V (relativeBinRefinement (B nr) j) (Icc a b) := by + apply ENNReal.tsum_le_tsum + intro nr + have hq : 1024*(B nr).qmax≤(2:ℝ)^N := by + change 1024*(sourceRepresentative np/32)≤(2:ℝ)^N + nlinarith only [hpP,hN,zero_lt_one.trans_le hP] + exact physicalSourceMajorant_integral_relative_cover hs hT hα.fst.measurable hα.snd.measurable + (B nr) measurableSet_Icc hj hq + _ = ∑j∈Finset.range N,∑'nr : ℕ,∫⁻z : ConeCoordinate, + physicalSourceMajorantDensity s X V (relativeBinRefinement (B nr) j) z + ∂physicalBinMeasure V (relativeBinRefinement (B nr) j) (Icc a b) := by + exact Summable.tsum_finsetSum (fun j hj=>ENNReal.summable) + _ ≤ ∑j∈Finset.range N,ENNReal.ofReal U := by + apply Finset.sum_le_sum + intro j _ + exact hbnd s T F hs hT h0 zX S np nθ nφ j a b w M A P hS hS0 ha hb hab hJI + hM hA hP hL hw hwP hpP hsector HX HZ + _ = _ := by simp [U,nsmul_eq_mul] + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceVelocityProfile.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceVelocityProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..75adf15c756ce2ed448eca941f2f2cda188ea99c --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceVelocityProfile.lean @@ -0,0 +1,198 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SourceJointFlux + +namespace OAI + +noncomputable section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +lemma source_dynamic_spatial_divergence_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (g : Vec → Phase) (n : Sphere) (v : Vec) (r : ℝ), + ‖v‖≤P → ‖(g (r • n.1)).1‖≤M → ‖(g (r • n.1)).2‖≤M → 0 sourceFixedFlux v (g z).1 (g z).2 e i z) (r • n.1)|≤ + 3*C/r^2+(3*C/r)*‖fderiv ℝ g (r • n.1)‖ := by + obtain ⟨C,hC,hb⟩ := sourceFixedFlux_bounds P M e i + refine ⟨C,hC,?_⟩ + intro g n v r hv hE hB hr hg + have hn : n.1≠(0:Vec) := by intro hh; have hh' := sphere_norm n; rw [hh,norm_zero] at hh'; norm_num at hh' + have hrn : r • (n.1 : Vec)≠0 := smul_ne_zero hr.ne' hn + let z := r • (n.1 : Vec) + let F : Vec × Phase → Vec := fun p => sourceFixedFlux v p.2.1 p.2.2 e i p.1 + have hF : DifferentiableAt ℝ F (z,g z) := + ((sourceJointFlux_contDiffAt e i (p:=((z,v),g z)) hrn).differentiableAt (by simp)).comp (f:=fun p : Vec × Phase => ((p.1,v),p.2)) (z,g z) + ((differentiableAt_fst.prodMk (differentiableAt_const v)).prodMk differentiableAt_snd) + have hchain := divergence_parameter_chain hF hg + change divergence (fun y => F (y,g y)) z=_ at hchain + change |divergence (fun y => F (y,g y)) z|≤_ + rw [hchain] + obtain ⟨hsp,hparam⟩ := hb n v (g z).1 (g z).2 r hv hE hB hr + have hcor : |∑ j : Fin 3, (fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j|≤ + (3*C/r)*‖fderiv ℝ g z‖ := by + calc + _ ≤ ∑ j : Fin 3,|(fderiv ℝ (fun w : Phase => F (z,w)) (g z) (fderiv ℝ g z (basis j))) j| := + Finset.abs_sum_le_sum_abs _ _ + _ ≤ ∑ j : Fin 3,(C/r)*‖fderiv ℝ g z‖ := by + apply Finset.sum_le_sum + intro j hj + apply (norm_coordinate_le _ j).trans + refine (hparam (fderiv ℝ g z (basis j))).trans ?_ + apply mul_le_mul_of_nonneg_left _ (div_nonneg hC hr.le) + simpa only [show ‖basis j‖=1 by simp [basis,PiLp.norm_single],mul_one] using + ContinuousLinearMap.le_opNorm (fderiv ℝ g z) (basis j) + _ = _ := by simp; ring + exact (abs_add_le _ _).trans (add_le_add hsp hcor) + +lemma retarded_spacetime_lipschitz (t : ℝ) (x : Vec) : + LipschitzWith 1 (fun z : Vec => (t-coneRadius 0 z,x+z)) := by + apply LipschitzWith.of_dist_le_mul + intro y z + simp only [NNReal.coe_one,one_mul,Prod.dist_eq,coneRadius,zero_sub,norm_neg] + apply max_le + · rw [Real.dist_eq,show (t-‖y‖)-(t-‖z‖)=‖z‖-‖y‖ by ring,abs_sub_comm,dist_eq_norm] + exact abs_norm_sub_norm_le y z + · rw [dist_add_left] + +lemma norm_fderiv_retarded_fields {s : Solution} {t : ℝ} (x : Vec) {z : Vec} + (hz : z≠0) (ht : 0 (s.E (t-coneRadius 0 y,x+y),s.B (t-coneRadius 0 y,x+y))) z‖≤ + max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖ := by + let a : Vec → (ℝ × Vec) := fun y => (t-coneRadius 0 y,x+y) + have ha : DifferentiableAt ℝ a z := + ((differentiableAt_const t).sub (differentiableAt_coneRadius hz.symm)).prodMk + ((differentiableAt_const x).add differentiableAt_id) + have he := (field_contDiffAt_positive hE ht (x+z)).differentiableAt (by simp) + have hb := (field_contDiffAt_positive hB ht (x+z)).differentiableAt (by simp) + have hh := (he.hasFDerivAt.prodMk hb.hasFDerivAt).comp z ha.hasFDerivAt + change HasFDerivAt (fun y : Vec => (s.E (a y),s.B (a y))) _ z at hh + rw [hh.fderiv] + have hn : ‖fderiv ℝ a z‖≤1 := norm_fderiv_le_of_lipschitz ℝ (retarded_spacetime_lipschitz t x) + apply (ContinuousLinearMap.opNorm_comp_le _ _).trans + apply (mul_le_mul_of_nonneg_left hn (norm_nonneg _)).trans_eq + simp only [mul_one,ContinuousLinearMap.opNorm_prod,Prod.norm_mk] + +lemma physical_source_spatial_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t r : ℝ) (x v : Vec) (n : Sphere), + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + 0 sourceConeCoefficient s t x i (z,v) • coneSpatialLift 0 z v e) (r • n.1)|≤ + 3*C/r^2+(3*C/r)*max + ‖fderiv ℝ s.E (t-coneRadius 0 (r • n.1),x+r • n.1)‖ + ‖fderiv ℝ s.B (t-coneRadius 0 (r • n.1),x+r • n.1)‖ := by + obtain ⟨C,hC,hb⟩ := source_dynamic_spatial_divergence_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t r x v n hE hB hr hrt hv he hb' + have hn : n.1≠(0:Vec) := by intro hh; have hn := sphere_norm n; rw [hh,norm_zero] at hn; norm_num at hn + have hz : r • (n.1 : Vec)≠0 := smul_ne_zero hr.ne' hn + have ht : 0 (s.E (t-coneRadius 0 y,x+y),s.B (t-coneRadius 0 y,x+y)) + have ha : DifferentiableAt ℝ (fun y : Vec => (t-coneRadius 0 y,x+y)) (r • n.1) := + ((differentiableAt_const t).sub (differentiableAt_coneRadius hz.symm)).prodMk + ((differentiableAt_const x).add differentiableAt_id) + have hg : DifferentiableAt ℝ g (r • n.1) := + (((field_contDiffAt_positive hE ht (x+r • n.1)).differentiableAt (by simp)).comp (r • n.1) ha).prodMk + (((field_contDiffAt_positive hB ht (x+r • n.1)).differentiableAt (by simp)).comp (r • n.1) ha) + exact (hb g n v r hv he hb' hr hg).trans (add_le_add le_rfl + (mul_le_mul_of_nonneg_left (norm_fderiv_retarded_fields x hz ht hE hB) + (div_nonneg (mul_nonneg (by norm_num : (0:ℝ)≤3) hC) hr.le))) + +def sourceVelocityProfile (e : Vec) (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : Vec := + (sourceAngularProfile i p * + (dot p.1.1 e/(1-dot p.1.1 (velocity p.2)))) • + (p.1.2.1+cross (velocity p.2) p.1.2.2) + +lemma sourceVelocityProfile_contDiffAt (e : Vec) (i : Fin 3) + {p : (Vec × Vec × Vec) × Vec} (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (sourceVelocityProfile e i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hi := sourceAngularProfile_contDiffAt i hd + have hm := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + exact (hi.mul (hm.div (contDiffAt_const.sub hdu) hd)).smul hforce + +lemma continuousOn_sourceVelocityDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => sourceVelocityProfile e i (p.1,w)) p.2) + {p | 1-dot p.1.1 (velocity p.2)≠0} := by + apply ContinuousOn.congr (f:=fun p : (Vec × Vec × Vec) × Vec => + ∑ j : Fin 3,(fderiv ℝ (sourceVelocityProfile e i) p (0,basis j)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((sourceVelocityProfile_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact divergence_parameter_slice ((sourceVelocityProfile_contDiffAt e i hp).differentiableAt (by simp)) + +lemma sourceVelocityDivergence_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (E B v : Vec), ‖E‖≤M → ‖B‖≤M → ‖v‖≤P → + |divergence (fun w => sourceVelocityProfile e i ((n.1,E,B),w)) v|≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => sourceVelocityProfile e i (p.1,w)) p.2) K := + (continuousOn_sourceVelocityDivergence e i).mono (by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact (cone_denom_pos p.2 p.1.1 hn).ne') + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n E B v hE hB hv + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +lemma source_velocity_divergence_rescale (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {z : Vec} (hz : z≠0) (v : Vec) : + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v = + (coneRadius 0 z)⁻¹* + divergence (fun w => sourceVelocityProfile e i + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),w)) v := by + let a := (coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)) + have ha : DifferentiableAt ℝ (fun w => sourceVelocityProfile e i (a,w)) v := + ((sourceVelocityProfile_contDiffAt e i (p:=(a,v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).comp v + ((differentiableAt_const a).prodMk differentiableAt_id) + have he : (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) = + fun w => (coneRadius 0 z)⁻¹ • sourceVelocityProfile e i (a,w) := by + funext w + simp only [sourceConeCoefficient,sourceFixedCoefficient,coneSpatialCoefficient,coneLorentz,sourceVelocityProfile,a,smul_smul,mul_assoc] + rw [he,divergence_real_const_smul ha] + +lemma physical_source_velocity_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v : Vec), z≠0 → ‖v‖≤P → + ‖s.E (t-coneRadius 0 z,x+z)‖≤M → ‖s.B (t-coneRadius 0 z,x+z)‖≤M → + |divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v|≤C/(coneRadius 0 z) := by + obtain ⟨C,hC,hb⟩ := sourceVelocityDivergence_uniform_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t x z v hz hv hE hB + rw [source_velocity_divergence_rescale s t x e i hz v,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (show 0 ≤ coneRadius 0 z from norm_nonneg _))] + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + exact (mul_le_mul_of_nonneg_left + (hb ⟨coneDirection 0 z,hn⟩ _ _ v hE hB hv) (inv_nonneg.mpr (show 0 ≤ coneRadius 0 z from norm_nonneg _))).trans_eq (by ring) + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceWaveSpatialIbp.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceWaveSpatialIbp.lean new file mode 100644 index 0000000000000000000000000000000000000000..92596e77e97628ead75a04483a22dba032bd8610 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/SourceWaveSpatialIbp.lean @@ -0,0 +1,519 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Population.SphericalFluxNorm + +namespace OAI + +noncomputable section + +section +open MeasureTheory Set +open Filter Set +open scoped Topology +open scoped Topology Pointwise +open Set MeasureTheory Metric ODE +open scoped Topology NNReal +open scoped ContDiff +open Set MeasureTheory Metric +open Set MeasureTheory +open Set MeasureTheory Metric Filter ODE +open Set MeasureTheory Filter Metric ODE +open Set MeasureTheory Filter Metric +open scoped Topology NNReal ContDiff +open Set MeasureTheory Filter +open scoped Topology ContDiff RealInnerProductSpace NNReal +open Set Filter MeasureTheory Metric +open scoped Topology ContDiff RealInnerProductSpace +open scoped Topology ContDiff NNReal RealInnerProductSpace +open scoped Topology ContDiff NNReal +open scoped Topology ContDiff ENNReal +open Set +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma sourceWave_spatial_ibp {ρ : ℝ × Vec → ℝ} (hρ : ContDiff ℝ ∞ ρ) + {t : ℝ} (ht : 0 j p i) (1,0) (t-‖z‖,x+z)/‖z‖) - + (4*Real.pi)⁻¹ * (∫ n : Sphere, t*n.1 i*ρ (0,x+t • n.1) ∂sphereMeasure) - + waveK (fun y => j (0,y) i) (t,x) := by + rw [electricPotentialComponent_source hρ hj,sourceWave_spatial_ibp hρ ht, + sourceWave_ball (contDiff_dirD (contDiff_component hj i) _).continuous ht.le x] + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + have h₁ : IntegrableOn (fun z : Vec => z i/‖z‖^3*ρ (t-‖z‖,x+z)) (ball (0:Vec) t) := + integrableOn_ball_direction_div_norm_pow (hρ.continuous.comp harg) 2 (by norm_num) t i + have h₂ : IntegrableOn (fun z : Vec => z i/‖z‖^2*dirD ρ (1,0) (t-‖z‖,x+z)) (ball (0:Vec) t) := + integrableOn_ball_direction_div_norm_pow ((contDiff_dirD hρ _).continuous.comp harg) 1 (by norm_num) t i + have h₃ := integrable_conePotential (contDiff_dirD (contDiff_component hj i) (1,0)).continuous ht.le x + have hneg : IntegrableOn (fun z : Vec => -(z i/‖z‖^3*ρ (t-‖z‖,x+z))) (ball (0:Vec) t) := h₁.neg + rw [integral_add h₂ h₁,integral_sub (Integrable.sub' hneg h₂) h₃, + integral_sub hneg h₂,integral_neg] + ring + +lemma magneticPotentialComponent_ball {j : Field} (hj : ContDiff ℝ ∞ j) + {t : ℝ} (ht : 0 j p (curlB i)) (1,0) (t-‖z‖,x+z) + + z (curlA i)/‖z‖^3*j (t-‖z‖,x+z) (curlB i) - + (z (curlB i)/‖z‖^2*dirD (fun p => j p (curlA i)) (1,0) (t-‖z‖,x+z) + + z (curlB i)/‖z‖^3*j (t-‖z‖,x+z) (curlA i))) + + (4*Real.pi)⁻¹ * (∫ n : Sphere, + t*n.1 (curlA i)*j (0,x+t • n.1) (curlB i) - + t*n.1 (curlB i)*j (0,x+t • n.1) (curlA i) ∂sphereMeasure) := by + rw [magneticPotentialComponent_source hj, + sourceWave_spatial_ibp (contDiff_component hj _) ht, + sourceWave_spatial_ibp (contDiff_component hj _) ht] + have harg : Continuous (fun z : Vec => (t-‖z‖,x+z)) := + (continuous_const.sub continuous_norm).prodMk (continuous_const.add continuous_id) + have hi (a b : Fin 3) : IntegrableOn (fun z : Vec => + z a/‖z‖^2*dirD (fun p => j p b) (1,0) (t-‖z‖,x+z) + + z a/‖z‖^3*j (t-‖z‖,x+z) b) (ball (0:Vec) t) := + Integrable.add (integrableOn_ball_direction_div_norm_pow + ((contDiff_dirD (contDiff_component hj b) _).continuous.comp harg) 1 (by norm_num) t a) + (integrableOn_ball_direction_div_norm_pow + ((contDiff_component hj b).continuous.comp harg) 2 (by norm_num) t a) + have hb (a b : Fin 3) : Integrable (fun n : Sphere => t*n.1 a*j (0,x+t • n.1) b) sphereMeasure := by + apply Continuous.integrable_of_hasCompactSupport + · exact (continuous_const.mul ((PiLp.continuous_apply 2 _ a).comp continuous_subtype_val)).mul + ((contDiff_component hj b).continuous.comp + ((continuous_const : Continuous (fun _ : Sphere => (0:ℝ))).prodMk + (continuous_const.add ((continuous_const : Continuous (fun _ : Sphere => t)).smul + (continuous_subtype_val : Continuous (fun n : Sphere => (n.1 : Vec))))))) + · exact HasCompactSupport.of_compactSpace _ + rw [integral_sub (hi _ _) (hi _ _),integral_sub (hb _ _) (hb _ _)] + ring + +lemma uniform_integral_bound_compact {H W : Type*} + [TopologicalSpace H] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {P : Set H} {K : Set Vec} {F : H × Vec → W} + (hP : IsCompact P) (hK : IsCompact K) + (hF : ContinuousOn F (P ×ˢ univ)) (hz : ∀ p ∈ P, ∀ v ∉ K, F (p,v)=0) : + ∃ C : ℝ, 0≤C ∧ ∀ p ∈ P, ‖∫ v : Vec, F (p,v)‖≤C := by + obtain ⟨C,hC⟩ := ((hP.prod hK).image_of_continuousOn (hF.mono (by intro z hz; exact ⟨hz.1,mem_univ _⟩))).isBounded.exists_norm_le + refine ⟨max C 0*volume.real K,mul_nonneg (le_max_right _ _) (measureReal_nonneg),?_⟩ + intro p hp + have hc : Continuous (fun v : Vec => F (p,v)) := + hF.comp_continuous (continuous_const.prodMk continuous_id) (fun v => ⟨hp,mem_univ _⟩) + have hi : Integrable (fun v : Vec => F (p,v)) := + hc.integrable_of_hasCompactSupport (compactSupport_of_zero_off hK (hz p hp)) + have hfi : (∫ v : Vec, F (p,v))=∫ v in K, F (p,v) := by + symm + exact setIntegral_eq_integral_of_forall_compl_eq_zero (hz p hp) + rw [hfi] + apply le_trans (norm_integral_le_integral_norm _) + calc + (∫ v in K, ‖F (p,v)‖) ≤ ∫ v in K, max C 0 := by + apply integral_mono_ae hi.norm.integrableOn + (integrableOn_const (hK.measure_lt_top.ne)) + filter_upwards [ae_restrict_mem hK.measurableSet] with v hv + exact le_trans (hC _ ⟨(p,v),⟨hp,hv⟩,rfl⟩) (le_max_left _ _) + _ = max C 0*volume.real K := by simp [mul_comm] + +lemma contDiffOn_retarded_flux {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t : ℝ} (ht : 0≤t) (x : Vec) (i : Fin 3) : + ContDiffOn ℝ 1 (fun y => ∫ v : Vec, + (retardedDensity s.f t x (y,v)*retardedG x (y,v) i) • velocity v) + (retardedSpaceDomain t x) := by + obtain ⟨K,hK,hF,hz⟩ := retarded_local_data hf hc ht x + have hG : ContDiffOn ℝ 1 (fun z => retardedG x z i) (retardedSpaceDomain t x ×ˢ univ) := by + intro z hz + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp z + (contDiffAt_retardedG hz.1.1)).contDiffWithinAt + apply contDiffOn_integral_uniform_support (isOpen_retardedSpaceDomain t x) hK + ((hF.mul hG).smul (contDiff_velocity.comp contDiff_snd).contDiffOn) + intro y hy v hv + change (retardedDensity s.f t x (y,v)*retardedG x (y,v) i) • velocity v=0 + rw [hz y hy v hv,zero_mul,zero_smul] + +lemma divergence_add_right {F : Vec → Vec} (x z : Vec) : + divergence (fun y => F (x+y)) z=divergence F (x+z) := by + unfold divergence spatialPartial + congr 1 + funext i + exact congrArg (fun L : Vec →L[ℝ] ℝ => L (basis i)) (fderiv_comp_add_left (f:=fun y => F y i) (x:=z) x) + +lemma coneRadius_add (x z : Vec) : coneRadius x (x+z)=‖z‖ := by + unfold coneRadius + rw [show x-(x+z) = -z by abel,norm_neg] + +lemma retarded_flux_norm_bound {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t R : ℝ} (hR : 0≤R) (hRt : R + (s.f (t-‖p.1.1‖,x+p.1.1,p.2)*(1-dot p.1.2 (velocity p.2))⁻¹* + (p.1.2 i-velocity p.2 i)) • velocity p.2 + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1,p.2)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk + ((continuous_const.add continuous_fst.fst).prodMk continuous_snd) + have htime (z : Vec) (hz' : z ∈ closedBall (0:Vec) R) : t-‖z‖ ∈ Icc 0 t := by + have hn : ‖z‖≤R := by simpa only [mem_closedBall_zero_iff] using hz' + exact ⟨by linarith,sub_le_self _ (norm_nonneg _)⟩ + have hcf : ContinuousOn (fun p : (Vec × Vec) × Vec => s.f (t-‖p.1.1‖,x+p.1.1,p.2)) (P ×ˢ univ) := + hf.continuousOn.comp harg.continuousOn (fun p hp => (htime p.1.1 hp.1.1).1) + have hu : Continuous (fun p : (Vec × Vec) × Vec => velocity p.2) := + (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hd : Continuous (fun p : (Vec × Vec) × Vec => 1-dot p.1.2 (velocity p.2)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (continuous_fst.snd.prodMk hu)) + have hd0 (p : (Vec × Vec) × Vec) (hp : p ∈ P ×ˢ univ) : 1-dot p.1.2 (velocity p.2)≠0 := by + apply (cone_denom_pos _ _ ?_).ne' + simpa only [mem_sphere,dist_zero_right] using hp.1.2 + have hcn : Continuous (fun p : (Vec × Vec) × Vec => p.1.2 i-velocity p.2 i) := + ((PiLp.continuous_apply 2 _ i).comp continuous_fst.snd).sub + ((PiLp.continuous_apply 2 _ i).comp hu) + have hF : ContinuousOn F (P ×ˢ univ) := + ((hcf.mul (hd.continuousOn.inv₀ hd0)).mul hcn.continuousOn).smul hu.continuousOn + have hzero : ∀ p ∈ P, ∀ v ∉ K', F (p,v)=0 := by + intro p hp v hv + have hsf : s.f (t-‖p.1‖,x+p.1,v)=0 := by + by_contra hne + exact hv ⟨(x+p.1,v),hz _ (htime p.1 hp.1) (subset_tsupport _ hne),rfl⟩ + simp only [F,hsf,zero_mul,zero_smul] + obtain ⟨C,hC,hbound⟩ := uniform_integral_bound_compact hP hK' hF hzero + refine ⟨C,hC,?_⟩ + intro z hz0 hzR + have hxy : x≠x+z := by + intro h + apply (norm_pos_iff.mp hz0) + exact add_left_cancel (show x+z=x+0 by simpa using h.symm) + let n := coneDirection x (x+z) + have hn : ‖n‖=1 := coneDirection_norm hxy + have hp : (z,n) ∈ P := ⟨by simpa only [mem_closedBall_zero_iff] using hzR, + by simpa only [mem_sphere,dist_zero_right] using hn⟩ + have he : (∫ v : Vec, (retardedDensity s.f t x (x+z,v)*retardedG x (x+z,v) i) • velocity v) = + ‖z‖⁻¹ • ∫ v : Vec, F ((z,n),v) := by + rw [← integral_smul] + apply integral_congr_ae + filter_upwards [] with v + simp only [retardedDensity,retardedG,eulerianG,coneRadius_add,PiLp.smul_apply,smul_eq_mul, + mul_inv_rev,PiLp.sub_apply,F,smul_smul] + congr 1 + ring + rw [he,norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr hz0.le)] + calc + ‖z‖⁻¹*‖∫ v : Vec, F ((z,n),v)‖ ≤ ‖z‖⁻¹*C := + mul_le_mul_of_nonneg_left (hbound (z,n) hp) (inv_nonneg.mpr hz0.le) + _ = C/‖z‖ := by ring + +lemma retarded_flux_tip {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hc : CompactOnFiniteHorizons s) + {t : ℝ} (ht : 0 ∫ n : Sphere, ε^2*dot n.1 + (∫ v : Vec, (retardedDensity s.f t x (x+ε • n.1,v)* + retardedG x (x+ε • n.1,v) i) • velocity v) ∂sphereMeasure) + (𝓝[>] (0:ℝ)) (𝓝 0) := by + obtain ⟨C,_,hbound⟩ := retarded_flux_norm_bound hf hc (show 0≤t/2 by linarith) + (show t/2 ∫ v : Vec, (retardedDensity s.f t x (x+z,v)*retardedG x (x+z,v) i) • velocity v) + (show 0 (t-‖p.1.1‖,x+p.1.1,p.2)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk + ((continuous_const.add continuous_fst.fst).prodMk continuous_snd) + have htime (z : Vec) (hz' : z ∈ closedBall (0:Vec) R) : t-‖z‖ ∈ Icc 0 t := by + have hn : ‖z‖≤R := by simpa only [mem_closedBall_zero_iff] using hz' + exact ⟨by linarith,sub_le_self _ (norm_nonneg _)⟩ + have hcf : ContinuousOn (fun p : (Vec × Vec) × Vec => s.f (t-‖p.1.1‖,x+p.1.1,p.2)) (P ×ˢ univ) := + hf.continuousOn.comp harg.continuousOn (fun p hp => (htime p.1.1 hp.1.1).1) + have hzero : ∀ p ∈ P, ∀ v ∉ Prod.snd '' K, s.f (t-‖p.1‖,x+p.1,v) • A (p,v)=0 := by + intro p hp v hv + have hsf : s.f (t-‖p.1‖,x+p.1,v)=0 := by + by_contra hne + exact hv ⟨(x+p.1,v),hz _ (htime p.1 hp.1) (subset_tsupport _ hne),rfl⟩ + rw [hsf,zero_smul] + obtain ⟨C,hC,hb⟩ := uniform_integral_bound_compact hP (hK.image continuous_snd) (hcf.smul hA) hzero + refine ⟨C,hC,?_⟩ + intro z hz n hn + exact hb (z,n) ⟨by simpa only [mem_closedBall_zero_iff] using hz, + by simpa only [mem_sphere,dist_zero_right] using hn⟩ + +def normalisedElectricKernel (r : ℝ) (n u b : Vec) : Vec := + ((1-dot u u)/(1-dot n u)^3) • (n-u) + + (r/(1-dot n u)^3) • ((dot n b) • (n-u)-(1-dot n u) • b) + +lemma normalisedElectricKernel_eq {r : ℝ} (hr : r≠0) (n u b : Vec) : + normalisedElectricKernel r n u b=r^2 • physicalElectricKernel r n u b := by + ext i + simp only [normalisedElectricKernel,physicalElectricKernel,PiLp.add_apply,PiLp.smul_apply, + PiLp.sub_apply,smul_eq_mul] + field_simp + +lemma continuousOn_normalisedElectricKernel {H : Type*} [TopologicalSpace H] + {r : H → ℝ} {n u b : H → Vec} {S : Set H} + (hr : ContinuousOn r S) (hn : ContinuousOn n S) (hu : ContinuousOn u S) + (hb : ContinuousOn b S) (hd : ∀ z ∈ S, 1-dot (n z) (u z)≠0) : + ContinuousOn (fun z => normalisedElectricKernel (r z) (n z) (u z) (b z)) S := by + have hdot (f g : H → Vec) (hf : ContinuousOn f S) (hg : ContinuousOn g S) : + ContinuousOn (fun z => dot (f z) (g z)) S := + (contDiff_dot_pair (k:=1)).continuous.comp_continuousOn (hf.prodMk hg) + have hD : ContinuousOn (fun z => 1-dot (n z) (u z)) S := + continuousOn_const.sub (hdot n u hn hu) + have hp : ∀ z ∈ S, (1-dot (n z) (u z))^3≠0 := fun z hz => pow_ne_zero 3 (hd z hz) + exact (((continuousOn_const.sub (hdot u u hu hu)).div (hD.pow 3) hp).smul (hn.sub hu)).add + ((hr.div (hD.pow 3) hp).smul (((hdot n b hn hb).smul (hn.sub hu)).sub (hD.smul hb))) + +lemma retarded_electric_kernel_norm_bound {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContinuousOn s.E fieldHalfSpace) (hB : ContinuousOn s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t R : ℝ} (hR : 0≤R) (hRt : R velocity p.2 + let n : (Vec × Vec) × Vec → Vec := fun p => p.1.2 + let b : (Vec × Vec) × Vec → Vec := fun p => fderiv ℝ velocity p.2 + (s.E (t-‖p.1.1‖,x+p.1.1)+cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) + have hu : Continuous u := (contDiff_velocity (k:=1)).continuous.comp continuous_snd + have hn : Continuous n := continuous_fst.snd + have harg : Continuous (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) := + (continuous_const.sub (continuous_fst.fst.norm)).prodMk (continuous_const.add continuous_fst.fst) + have hmap : MapsTo (fun p : (Vec × Vec) × Vec => (t-‖p.1.1‖,x+p.1.1)) S fieldHalfSpace := by + intro p hp + have hnz : ‖p.1.1‖≤R := by simpa only [mem_closedBall_zero_iff] using hp.1.1 + change 0≤t-‖p.1.1‖ + linarith + have he := hE.comp harg.continuousOn hmap + have hm := hB.comp harg.continuousOn hmap + have hcross : ContinuousOn (fun p : (Vec × Vec) × Vec => + cross (velocity p.2) (s.B (t-‖p.1.1‖,x+p.1.1))) S := + (contDiff_cross (k:=1)).continuous.comp_continuousOn (hu.continuousOn.prodMk hm) + have hb : ContinuousOn b S := + (((contDiff_velocity (k:=1)).continuous_fderiv (by simp)).comp continuous_snd).continuousOn.clm_apply (he.add hcross) + have hD : Continuous (fun p : (Vec × Vec) × Vec => 1-dot (n p) (u p)) := + continuous_const.sub ((contDiff_dot_pair (k:=1)).continuous.comp (hn.prodMk hu)) + have hD0 (p : (Vec × Vec) × Vec) (hp : p ∈ S) : 1-dot (n p) (u p)≠0 := by + apply (cone_denom_pos _ _ ?_).ne' + simpa only [n,mem_sphere,dist_zero_right] using hp.1.2 + have hN := continuousOn_normalisedElectricKernel (S:=S) + continuous_fst.fst.norm.continuousOn hn.continuousOn hu.continuousOn hb hD0 + obtain ⟨C,hC,hbound⟩ := retarded_weighted_integral_bound hf hc hR hRt x (hD.continuousOn.smul hN) + refine ⟨C,hC,?_⟩ + intro z hz0 hzR + have hxy : x≠x+z := by + intro h + apply (norm_pos_iff.mp hz0) + exact add_left_cancel (show x+z=x+0 by simpa using h.symm) + have hh := hbound z hzR (coneDirection x (x+z)) (coneDirection_norm hxy) + have heq : (∫ v : Vec, s.f (t-‖z‖,x+z,v) • + ((1-dot (coneDirection x (x+z)) (velocity v)) • + normalisedElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))))) = + ‖z‖^2 • ∫ v : Vec, (s.f (t-‖z‖,x+z,v)*(1-dot (coneDirection x (x+z)) (velocity v))) • + physicalElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))) := by + rw [← integral_smul] + apply integral_congr_ae + filter_upwards [] with v + rw [normalisedElectricKernel_eq hz0.ne'] + simp only [smul_smul] + congr 1 + ring + change ‖∫ v : Vec, s.f (t-‖z‖,x+z,v) • + ((1-dot (coneDirection x (x+z)) (velocity v)) • + normalisedElectricKernel ‖z‖ (coneDirection x (x+z)) (velocity v) + (fderiv ℝ velocity v (s.E (t-‖z‖,x+z)+cross (velocity v) (s.B (t-‖z‖,x+z)))))‖≤C at hh + rw [heq,norm_smul,Real.norm_of_nonneg (sq_nonneg _)] at hh + simp only [coneRadius_add] + apply (le_div_iff₀ (sq_pos_of_pos hz0)).mpr + simpa only [mul_comm] using hh + +def retardedElectricDensity (s : Solution) (t : ℝ) (x y : Vec) : Vec := + ∫ v : Vec, (s.f (t-coneRadius x y,y,v)*(1-dot (coneDirection x y) (velocity v))) • + physicalElectricKernel (coneRadius x y) (coneDirection x y) (velocity v) + (fderiv ℝ velocity v (s.E (t-coneRadius x y,y)+cross (velocity v) (s.B (t-coneRadius x y,y)))) + +def retardedElectricFlux (s : Solution) (t : ℝ) (x : Vec) (i : Fin 3) (y : Vec) : Vec := + ∫ v : Vec, (retardedDensity s.f t x (y,v)*retardedG x (y,v) i) • velocity v + +lemma field_contDiffAt_positive {k : ℕ∞ω} {F : Field} + (hF : ContDiffOn ℝ k F fieldHalfSpace) {t : ℝ} (ht : 0 show 0≤p.1 from hp.le) + exact (hF _ ht.le).contDiffAt hn + +lemma contDiffAt_physicalElectricKernel {H : Type*} [NormedAddCommGroup H] [NormedSpace ℝ H] + {k : ℕ∞ω} {r : H → ℝ} {n u b : H → Vec} {z : H} + (hr : ContDiffAt ℝ k r z) (hn : ContDiffAt ℝ k n z) (hu : ContDiffAt ℝ k u z) + (hb : ContDiffAt ℝ k b z) (hr0 : r z≠0) (hd0 : 1-dot (n z) (u z)≠0) : + ContDiffAt ℝ k (fun p => physicalElectricKernel (r p) (n p) (u p) (b p)) z := by + have hdot (f g : H → Vec) (hf : ContDiffAt ℝ k f z) (hg : ContDiffAt ℝ k g z) : + ContDiffAt ℝ k (fun p => dot (f p) (g p)) z := + contDiff_dot_pair.contDiffAt.comp z (hf.prodMk hg) + have hD : ContDiffAt ℝ k (fun p => 1-dot (n p) (u p)) z := + contDiffAt_const.sub (hdot n u hn hu) + exact (((contDiffAt_const.sub (hdot u u hu hu)).div ((hr.pow 2).mul (hD.pow 3)) + (mul_ne_zero (pow_ne_zero 2 hr0) (pow_ne_zero 3 hd0))).smul (hn.sub hu)).add + (((hr.mul (hD.pow 3)).inv (mul_ne_zero hr0 (pow_ne_zero 3 hd0))).smul + (((hdot n b hn hb).smul (hn.sub hu)).sub (hD.smul hb))) + +lemma contDiffAt_retardedElectricIntegrand {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {t : ℝ} {x y v : Vec} (hxy : x≠y) (ht : 0 + (s.f (t-coneRadius x z.1,z.1,z.2)*(1-dot (coneDirection x z.1) (velocity z.2))) • + physicalElectricKernel (coneRadius x z.1) (coneDirection x z.1) (velocity z.2) + (fderiv ℝ velocity z.2 (s.E (t-coneRadius x z.1,z.1)+ + cross (velocity z.2) (s.B (t-coneRadius x z.1,z.1))))) (y,v) := by + have hr : ContDiffAt ℝ 1 (fun z : Phase => coneRadius x z.1) (y,v) := + (contDiffAt_coneRadius (k:=1) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst + have hn : ContDiffAt ℝ 1 (fun z : Phase => coneDirection x z.1) (y,v) := + (contDiffAt_coneDirection (k:=1) hxy).comp (f:=Prod.fst) (y,v) contDiffAt_fst + have hu : ContDiffAt ℝ 1 (fun z : Phase => velocity z.2) (y,v) := + contDiff_velocity.contDiffAt.comp (y,v) contDiffAt_snd + have harg : ContDiffAt ℝ 1 (fun z : Phase => (t-coneRadius x z.1,z.1)) (y,v) := + (contDiffAt_const.sub hr).prodMk contDiffAt_fst + have he := (field_contDiffAt_positive hE ht y).comp (y,v) harg + have hm := (field_contDiffAt_positive hB ht y).comp (y,v) harg + have hcross : ContDiffAt ℝ 1 (fun z : Phase => + cross (velocity z.2) (s.B (t-coneRadius x z.1,z.1))) (y,v) := + contDiff_cross.contDiffAt.comp (y,v) (hu.prodMk hm) + have hdf : ContDiff ℝ 1 (fderiv ℝ velocity) := + (contDiff_velocity (k:=2)).fderiv_right (by norm_num) + have hb : ContDiffAt ℝ 1 (fun z : Phase => fderiv ℝ velocity z.2 + (s.E (t-coneRadius x z.1,z.1)+cross (velocity z.2) (s.B (t-coneRadius x z.1,z.1)))) (y,v) := + (hdf.contDiffAt.comp (y,v) contDiffAt_snd).clm_apply (he.add hcross) + have hd0 : 1-dot (coneDirection x y) (velocity v)≠0 := + (cone_denom_pos v _ (coneDirection_norm hxy)).ne' + have hk := contDiffAt_physicalElectricKernel hr hn hu hb + (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hxy)) hd0 + exact ((contDiffAt_retardedDensity (particle_contDiffAt_positive hf ht y v) hxy).mul + (contDiffAt_const.sub (contDiff_dot_pair.contDiffAt.comp (y,v) (hn.prodMk hu)))).smul hk + +lemma contDiffOn_retardedElectricDensity {s : Solution} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hc : CompactOnFiniteHorizons s) {t : ℝ} (ht : 0≤t) (x : Vec) : + ContDiffOn ℝ 1 (retardedElectricDensity s t x) (retardedSpaceDomain t x) := by + obtain ⟨K,hK,_,hz⟩ := retarded_local_data hf hc ht x + unfold retardedElectricDensity + apply contDiffOn_integral_uniform_support (n:=1) + (F:=fun z : Phase => (s.f (t-coneRadius x z.1,z.1,z.2)*(1-dot (coneDirection x z.1) (velocity z.2))) • + physicalElectricKernel (coneRadius x z.1) (coneDirection x z.1) (velocity z.2) + (fderiv ℝ velocity z.2 (s.E (t-coneRadius x z.1,z.1)+cross (velocity z.2) (s.B (t-coneRadius x z.1,z.1))))) + (isOpen_retardedSpaceDomain t x) hK + · intro z hz + exact (contDiffAt_retardedElectricIntegrand hf hE hB hz.1.1 hz.1.2).contDiffWithinAt + · intro y hy v hv + change (retardedDensity s.f t x (y,v)*_) • _=0 + rw [hz y hy v hv,zero_mul,zero_smul] + +lemma integrableOn_ball_of_punctured_bound {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {R C α : ℝ} (hα : α<3) + (hF : ContinuousOn F (ball (0:Vec) R \ {0})) + (hb : ∀ z : Vec, 0<‖z‖ → ‖z‖ retardedElectricDensity s t x (x+z)) (ball (0:Vec) R) := by + have ht : 0≤t := le_trans hR hRt.le + have hcont := (contDiffOn_retardedElectricDensity hf hE hB hc ht x).continuousOn + have hm : MapsTo (fun z : Vec => x+z) (ball (0:Vec) R \ {0}) (retardedSpaceDomain t x) := by + intro z hz + have hn : ‖z‖ F.flow z (s+‖w‖)) + have hcΨ : ContinuousOn (fun w : Vec => F.flow z (s+‖w‖)) S := by + intro w hw + have ht : s+‖w‖ ∈ Ioo 0 T := ⟨by linarith [hw.1,hs.1],hw.2⟩ + have hc : ContinuousAt (fun v : Vec => (s+‖v‖,z)) w := + (continuousAt_const.add continuousAt_id.norm).prodMk continuousAt_const + have hh := (F.joint z (s+‖w‖) ht).continuousAt.comp (f := fun v : Vec => (s+‖v‖,z)) hc + exact hh.continuousWithinAt + have hmΨ : Measurable Ψ := by + have h := hcΨ.measurable_piecewise (continuousOn_const (c := (0 : Phase))) hS + convert h using 1 + funext w + by_cases hw : w ∈ S <;> simp [Ψ,Set.piecewise,hw] + let R : Vec → Vec := S.indicator (receiverRadial F.flow z s) + have hcR : ContinuousOn (receiverRadial F.flow z s) S := + fun w hw => (F.receiver_differential hs.1 z hw).continuousAt.continuousWithinAt + have hmR : Measurable R := by + have h := hcR.measurable_piecewise (continuousOn_const (c := (0 : Vec))) hS + convert h using 1 + funext w + by_cases hw : w ∈ S <;> simp [R,Set.piecewise,hw] + have hmK : Measurable (fun w : Vec => ENNReal.ofReal + (1-dot (‖w‖⁻¹ • w) (velocity (Ψ w).2)) * g (R w)) := by + simp only [dot_eq_inner] + exact ((measurable_const.sub + ((measurable_id.norm.inv.smul measurable_id).inner + ((contDiff_velocity (k := 1)).continuous.measurable.comp hmΨ.snd))).ennreal_ofReal).mul (hg.comp hmR) + let H : Vec → ENNReal := S.indicator + (fun w => ENNReal.ofReal (1-dot (‖w‖⁻¹ • w) (velocity (F.flow z (s+‖w‖)).2)) * + g (receiverRadial F.flow z s w)) + have hH : Measurable H := by + convert hmK.indicator hS using 1 + funext w + by_cases hw : w ∈ S <;> simp [H,Ψ,R,Set.indicator,hw] + rw [F.receiver_lintegral hs z g,← lintegral_indicator hS] + change (∫⁻ w, H w) = _ + rw [lintegral_polar hH] + apply lintegral_congr + intro n + let k : ℝ → ENNReal := fun r => ENNReal.ofReal + (r^2*(1-dot n.1 (velocity (F.flow z (s+r)).2))) * g ((F.flow z (s+r)).1-r • n.1) + have hn : ‖n.1‖=1 := mem_sphere_zero_iff_norm.mp n.2 + have he : ∀ r ∈ Ioi (0 : ℝ), ENNReal.ofReal (r^2) * H (r • n.1) = + (Iio (T-s)).indicator k r := by + intro r hr + have hnorm : ‖r • n.1‖=r := by rw [norm_smul,Real.norm_eq_abs,abs_of_pos hr,hn,mul_one] + have hd : r • n.1 ∈ S ↔ r < T-s := by + change 0 < ‖r • n.1‖ ∧ s+‖r • n.1‖ < T ↔ _ + rw [hnorm] + constructor + · intro h; linarith [h.2] + · intro h; exact ⟨hr,by linarith⟩ + by_cases h : r < T-s + · rw [show H (r • n.1) = _ from Set.indicator_of_mem (hd.mpr h) _, + Set.indicator_of_mem (show r ∈ Iio (T-s) from h)] + dsimp only [k,receiverRadial] + have hnsmul : r⁻¹ • (r • n.1)=n.1 := by + rw [smul_smul,inv_mul_cancel₀ (ne_of_gt (show 0 h (hd.mp hh)) _,mul_zero, + Set.indicator_of_notMem (show r ∉ Iio (T-s) from h)] + calc + _ = ∫⁻ r in Ioi (0 : ℝ), (Iio (T-s)).indicator k r := + setLIntegral_congr_fun measurableSet_Ioi he + _ = ∫⁻ r in Ioi (0 : ℝ) ∩ Iio (T-s), k r := by + simpa only [inter_comm] using (setLIntegral_indicator (μ := (volume : Measure ℝ)) + (t := Ioi (0 : ℝ)) measurableSet_Iio k) + _ = _ := rfl + +def spaceConeDomain (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) : Set (ℝ × Phase) := + {p | p.1 ∈ Ioo 0 T ∧ p.2.1 ∈ ball (α zX T).1 (T-p.1)} + +def coneOccupation (α : Phase → ℝ → Phase) (zX : Phase) (T : ℝ) + (f : Particle) (H : Set (ℝ × Phase)) : ENNReal := + ∫⁻ s in Ioo (0 : ℝ) T, ∫⁻ n : Sphere, ∫⁻ r in Ioo (0 : ℝ) (T-s), + ENNReal.ofReal (r^2*(1-dot n.1 (velocity (α zX (s+r)).2))) * + ∫⁻ v : Vec, H.indicator (fun p => ENNReal.ofReal (f p)) + (s,((α zX (s+r)).1-r • n.1,v)) ∂volume ∂volume ∂sphereMeasure + +lemma PhaseFlowOn.cone_occupation_identity {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (hT : 0 ≤ T) (zX : Phase) {f : Particle} + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) (heq : VlasovOn f E B T) + {H : Set (ℝ × Phase)} (hH : MeasurableSet H) + (hsub : H ⊆ spaceConeDomain F.flow zX T) : + coneOccupation F.flow zX T f H = + labelOccupation (fun z => f (0,z)) (fun z => {t | (t,z) ∈ phaseHits F.flow T H}) := by + rw [← F.phase_occupation_identity hT hf heq hH] + unfold coneOccupation + symm + apply setLIntegral_congr_fun measurableSet_Ioo + intro s hs + have hfs : Continuous (fun z : Phase => f (s,z)) := + hf.continuousOn.comp_continuous (continuous_const.prodMk continuous_id) + (fun _ => ⟨Ioo_subset_Icc_self hs,mem_univ _⟩) + have hm : Measurable (fun z : Phase => H.indicator (fun p => ENNReal.ofReal (f p)) (s,z)) := by + exact hfs.measurable.ennreal_ofReal.indicator + (hH.preimage (measurable_const.prodMk measurable_id)) + let g : Vec → ENNReal := fun y => ∫⁻ v : Vec, + H.indicator (fun p => ENNReal.ofReal (f p)) (s,(y,v)) + have hgm : Measurable g := hm.lintegral_prod_right' + calc + _ = ∫⁻ y : Vec, g y := lintegral_prod _ hm.aemeasurable + _ = ∫⁻ y in ball (F.flow zX T).1 (T-s), g y := by + rw [← lintegral_indicator measurableSet_ball] + apply lintegral_congr + intro y + by_cases hy : y ∈ ball (F.flow zX T).1 (T-s) + · exact (Set.indicator_of_mem hy g).symm + · rw [Set.indicator_of_notMem hy] + apply lintegral_eq_zero_of_ae_eq_zero + apply ae_of_all + intro v + have hp : (s,(y,v)) ∉ H := fun hp => hy (hsub hp).2 + exact Set.indicator_of_notMem hp (fun p => ENNReal.ofReal (f p)) + _ = _ := F.receiver_polar_lintegral (Ioo_subset_Icc_self hs) zX hgm + +lemma PhaseFlowOn.phaseHits_in_branch {E B : Field} {T : ℝ} (F : PhaseFlowOn E B T) + (zX z : Phase) {H : Set (ℝ × Phase)} (hsub : H ⊆ spaceConeDomain F.flow zX T) : + {s | (s,z) ∈ phaseHits F.flow T H} ⊆ branchDomain F.flow zX z T := by + intro s hs + have hh := (hsub hs.2).2 + rw [mem_ball,dist_eq_norm, norm_sub_rev] at hh + exact ⟨hs.1,by linarith⟩ + +lemma PhaseFlowOn.cone_occupation_angular_bound {E B : Field} {T δ Δ a b : ℝ} + (F : PhaseFlowOn E B T) (hT : 0 ≤ T) (zX : Phase) {f : Particle} + (hf : ContDiffOn ℝ 1 f (Icc 0 T ×ˢ (univ : Set Phase))) (heq : VlasovOn f E B T) + {H : Set (ℝ × Phase)} (hH : MeasurableSet H) + (hsub : H ⊆ spaceConeDomain F.flow zX T) (hδ : 0 ≤ δ) (hΔ : 0 < Δ) + (hsource : ∀ z s, (s,z) ∈ phaseHits F.flow T H → + δ ≤ 1-dot (branchDirection F.flow zX z T s) (velocity (F.flow z s).2)) + (hreceiver : ∀ z s, (s,z) ∈ phaseHits F.flow T H → + 1-dot (branchDirection F.flow zX z T s) + (velocity (F.flow zX (branchTime F.flow zX z T s)).2) ≤ Δ) + (himage : ∀ z, branchTime F.flow zX z T '' {s | (s,z) ∈ phaseHits F.flow T H} ⊆ Icc a b) : + ENNReal.ofReal (δ/Δ) * coneOccupation F.flow zX T f H ≤ + ENNReal.ofReal (b-a) * ∫⁻ z, ENNReal.ofReal (f (0,z)) := by + rw [F.cone_occupation_identity hT zX hf heq hH hsub] + apply F.label_occupation_angular_bound zX _ hδ hΔ + (fun z => (F.measurable_phaseHits hH).preimage (measurable_id.prodMk measurable_const)) + (fun z => F.phaseHits_in_branch zX z hsub) hsource hreceiver himage + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/TransportAngularCore.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/TransportAngularCore.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a71adcc49fdf72dd063f4b162483bfe46214497 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/TransportAngularCore.lean @@ -0,0 +1,558 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Flow.TransportDifferentiation + +namespace OAI + +noncomputable section + +section + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +def transportAngularCore (n u : Vec) : Vec := + cross n (RVM.transportAngularCore n u) + +def sourceAngularCore (n u b : Vec) : Vec := + cross n (RVM.sourceAngularCore n u b) + +lemma physicalMagneticKernel_eulerian_split {r : ℝ} {n u : Vec} (b : Vec) + (hr : r≠0) (hd : 1-dot n u≠0) : + (1-dot n u) • cross n (physicalElectricKernel r n u b) = + (r^2)⁻¹ • transportAngularCore n u+r⁻¹ • sourceAngularCore n u b := by + have hh := congrArg (cross n) (RVM.physicalElectricKernel_eulerian_split b hr hd) + simpa only [cross_smul_right,cross_add_right,transportAngularCore,sourceAngularCore] using hh + +lemma coneRadius_zero_smul {r : ℝ} (hr : 0 transportAngularCore (n w) (u w)) z := by + exact contDiff_cross.contDiffAt.comp z (hn.prodMk (RVM.contDiffAt_transportAngularCore hn hu hd)) + +lemma contDiffAt_coneSpatialLift {k : ℕ∞ω} {x y v e : Vec} (hxy : x≠y) : + ContDiffAt ℝ k (fun z : Vec => coneSpatialLift x z v e) y := by + have hn := contDiffAt_coneDirection (k:=k) hxy + have hde := contDiff_dot_pair.contDiffAt.comp y (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp y (hn.prodMk (contDiffAt_const (c:=velocity v))) + have hc : ContDiffAt ℝ k (fun z : Vec => coneSpatialCoefficient x z v e) y := + hde.div (contDiffAt_const.sub hdu) (cone_denom_pos v _ (coneDirection_norm hxy)).ne' + exact contDiffAt_const.add (hc.smul contDiffAt_const) + +def transportSpatialFlux (v e : Vec) (i : Fin 3) (z : Vec) : Vec := + (((coneRadius 0 z)^2)⁻¹*transportAngularCore (coneDirection 0 z) (velocity v) i) • + coneSpatialLift 0 z v e + +lemma transportSpatialFlux_contDiffAt (v e : Vec) (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiffAt ℝ 1 (transportSpatialFlux v e i) z := by + have h0z : (0:Vec)≠z := Ne.symm hz + have hr := contDiffAt_coneRadius (k:=1) h0z + have hn := contDiffAt_coneDirection (k:=1) h0z + have hu : ContDiffAt ℝ 1 (fun _ : Vec => velocity v) z := contDiffAt_const + have hc := contDiffAt_transportAngularCore hn hu + (cone_denom_pos v _ (coneDirection_norm h0z)).ne' + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp z hc + exact (((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr h0z)))).mul hi).smul + (contDiffAt_coneSpatialLift (v:=v) (e:=e) h0z) + +lemma transportSpatialFlux_homogeneous (v e : Vec) (i : Fin 3) {r : ℝ} (hr : 0 transportSpatialFlux_homogeneous v e i hr z) + (fun z hz => transportSpatialFlux_contDiffAt v e i hz) + +lemma transportSpatialFlux_joint_contDiffAt (e : Vec) (i : Fin 3) {p : Phase} + (hp : p.1 ≠ 0) : + ContDiffAt ℝ 1 (fun z : Phase => transportSpatialFlux z.2 e i z.1) p := by + have hz : (0:Vec) ≠ p.1 := hp.symm + have hr := (contDiffAt_coneRadius (k:=1) hz).comp p contDiffAt_fst + have hn := (contDiffAt_coneDirection (k:=1) hz).comp p contDiffAt_fst + have hu : ContDiffAt ℝ 1 (fun z : Phase => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have he := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hd := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hne := (cone_denom_pos p.2 _ (coneDirection_norm hz)).ne' + have hc := he.div (contDiffAt_const.sub hd) hne + have hW : ContDiffAt ℝ 1 (fun z : Phase => coneSpatialLift 0 z.1 z.2 e) p := + contDiffAt_const.add (hc.smul hu) + have hA := contDiffAt_transportAngularCore hn hu hne + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p hA + exact (((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz)))).mul hi).smul hW + +lemma divergence_phase_first {F : Phase → Vec} {p : Phase} + (hF : DifferentiableAt ℝ F p) : + divergence (fun z => F (z,p.2)) p.1 = + ∑ j : Fin 3, (fderiv ℝ F p (basis j,0)) j := by + have hP := (hasFDerivAt_id (𝕜:=ℝ) p.1).prodMk (hasFDerivAt_const p.2 p.1) + have hh := hF.hasFDerivAt.comp p.1 hP + change HasFDerivAt (fun z : Vec => F (z,p.2)) _ p.1 at hh + unfold divergence spatialPartial + congr 1 + funext j + rw [fderiv_vec_component_at hh.differentiableAt j,hh.fderiv] + rfl + +lemma continuousOn_transportSpatialDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : Phase => divergence (transportSpatialFlux p.2 e i) p.1) + {p | p.1≠0} := by + have he (p : Phase) (hp : p.1≠0) := + divergence_phase_first ((transportSpatialFlux_joint_contDiffAt e i hp).differentiableAt (by simp)) + apply ContinuousOn.congr (f:=fun p : Phase => ∑ j : Fin 3, + (fderiv ℝ (fun z : Phase => transportSpatialFlux z.2 e i z.1) p (basis j,0)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((transportSpatialFlux_joint_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact he p hp + +lemma transportSpatialDivergence_uniform_bound (P : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + |divergence (transportSpatialFlux v e i) n.1|≤C := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => divergence (transportSpatialFlux p.2 e i) p.1) K := + (continuousOn_transportSpatialDivergence e i).mono (by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + intro hz + simp only [hz,norm_zero] at hn + norm_num at hn) + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro v hv n + exact (hC (n.1,v) ⟨n.2,hv⟩).trans (le_max_left _ _) + +def transportConeCoefficient (i : Fin 3) (p : Phase) : ℝ := + ((coneRadius 0 p.1)^2)⁻¹*transportAngularCore (coneDirection 0 p.1) (velocity p.2) i + +def coneLorentz (s : Solution) (t : ℝ) (x : Vec) (p : Phase) : Vec := + s.E (t-coneRadius 0 p.1,x+p.1)+cross (velocity p.2) (s.B (t-coneRadius 0 p.1,x+p.1)) + +lemma transportConeCoefficient_contDiffAt (i : Fin 3) {p : Phase} (hp : p.1≠0) : + ContDiffAt ℝ 1 (transportConeCoefficient i) p := by + have hz : (0:Vec)≠p.1 := hp.symm + have hr := (contDiffAt_coneRadius (k:=1) hz).comp p contDiffAt_fst + have hn := (contDiffAt_coneDirection (k:=1) hz).comp p contDiffAt_fst + have hu : ContDiffAt ℝ 1 (fun z : Phase => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have hA := contDiffAt_transportAngularCore hn hu (cone_denom_pos p.2 _ (coneDirection_norm hz)).ne' + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p hA + exact ((hr.pow 2).inv (pow_ne_zero 2 (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz)))).mul hi + +lemma coneLorentz_contDiffAt {s : Solution} + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {t : ℝ} (x : Vec) {p : Phase} (hp : p.1≠0) (ht : 0 velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have ha : ContDiffAt ℝ 1 (fun z : Phase => (t-coneRadius 0 z.1,x+z.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_const.add contDiffAt_fst) + have he := (field_contDiffAt_positive hE ht (x+p.1)).comp p ha + have hb := (field_contDiffAt_positive hB ht (x+p.1)).comp p ha + exact he.add (contDiff_cross.contDiffAt.comp p (hu.prodMk hb)) + +lemma coneLorentz_vlasov_before {s : Solution} {H t : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (heq : EquationsBefore s H) + (htH : t≤H) (x : Vec) {z : Vec} (hz : z∈retardedSpaceDomain t 0) (v : Vec) : + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (1,velocity v,coneLorentz s t x (z,v))=0 := by + have hr : 0 transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v) := by + have hk : ContDiffOn ℝ 1 (transportConeCoefficient i) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (transportConeCoefficient_contDiffAt i hp.1.1.symm).contDiffWithinAt + have hK : ContDiffOn ℝ 1 (coneLorentz s t x) (retardedSpaceDomain t 0 ×ˢ univ) := + fun p hp => (coneLorentz_contDiffAt hE hB x hp.1.1.symm hp.1.2).contDiffWithinAt + have hh := retarded_spatial_annulus (e:=e) hf hc hε hεR hRt hk hK + (fun z hz v => coneLorentz_vlasov_before hf heq htH x hz v) + unfold transportSpatialFlux transportConeCoefficient at * + simpa only [smul_smul,smul_eq_mul,mul_assoc] using hh + +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma sphere_mean_zero_lipschitz_bound {a : Sphere → ℝ} {F : Vec → ℝ} {x : Vec} + {r C N : ℝ} (ha : Continuous a) (hF : Continuous F) + (hmean : (∫n : Sphere,a n ∂sphereMeasure)=0) + (hC : 0≤C) (hab : ∀ n, |a n|≤C) (hr : 0≤r) + (_hN : 0≤N) (hLip : ∀ y, |F y-F x|≤N*‖y-x‖) : + |∫ n : Sphere, a n*F (x+r • n.1) ∂sphereMeasure|≤(4*Real.pi)*C*N*r := by + have hc : Continuous (fun n : Sphere => a n*F (x+r • n.1)) := + by fun_prop + have hi := hc.integrable_of_hasCompactSupport (μ:=sphereMeasure) (HasCompactSupport.of_compactSpace _) + have hai := ha.integrable_of_hasCompactSupport (μ:=sphereMeasure) (HasCompactSupport.of_compactSpace _) + have he : (∫ n : Sphere,a n*(F (x+r • n.1)-F x) ∂sphereMeasure)= + ∫ n : Sphere,a n*F (x+r • n.1) ∂sphereMeasure := by + simp_rw [mul_sub] + rw [integral_sub hi (hai.mul_const _),integral_mul_const,hmean,zero_mul,sub_zero] + rw [←he] + have hb : ∀ n : Sphere, ‖a n*(F (x+r • n.1)-F x)‖≤C*N*r := by + intro n + rw [norm_mul,Real.norm_eq_abs,Real.norm_eq_abs] + have hh := hLip (x+r • n.1) + simp only [add_sub_cancel_left,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] at hh + exact (mul_le_mul (hab n) hh (abs_nonneg _) hC).trans_eq (by ring) + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_assoc,mul_comm,mul_left_comm] using hh + +def transportSingularShell (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) (r : ℝ) : ℝ := + r⁻¹ * ∫ v in closedBall (0:Vec) P, ∫ n : Sphere, + divergence (transportSpatialFlux v e i) n.1 * f (t-r,x+r • n.1,v) ∂sphereMeasure + +lemma transport_divergence_sphere_continuous (v e : Vec) (i : Fin 3) : + Continuous (fun n : Sphere => divergence (transportSpatialFlux v e i) n.1) := by + apply (continuousOn_transportSpatialDivergence e i).comp_continuous + (continuous_subtype_val.prodMk continuous_const) + intro n + have hn := sphere_norm n + intro hz + change (n : Vec)=0 at hz + rw [hz,norm_zero] at hn + norm_num at hn + +lemma transportSingularShell_near_far {P t U A N : ℝ} {f : Particle} {x e : Vec} {i : Fin 3} + (_hA : 0≤A) (hN : 0≤N) + (hf : ∀ s∈Icc (0:ℝ) U, ∀ v, Differentiable ℝ (fun y => f (s,y,v))) + (hfA : ∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) + (hfN : ∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) + {C : ℝ} (hC : 0≤C) + (hc : ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + |divergence (transportSpatialFlux v e i) n.1|≤C) + (ht : t∈Icc (0:ℝ) U) {r : ℝ} (hr : 0 hf _ hs v z) + (fun z _ => hfN _ hs z v) convex_univ (mem_univ x) (mem_univ y) + have hfar (v : Vec) (hv : v∈closedBall (0:Vec) P) : + ‖∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure‖≤(4*Real.pi)*C*A := by + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (f:=fun n : Sphere => + divergence (transportSpatialFlux v e i) n.1 * f (t-r,x+r • n.1,v)) (C:=C*A) (ae_of_all _ (fun n : Sphere => by + rw [norm_mul,Real.norm_eq_abs,Real.norm_eq_abs] + exact mul_le_mul (hc v hv n) (hfA _ hs _ v) (abs_nonneg _) hC)) + simpa only [sphere_area,smul_eq_mul,mul_assoc,mul_comm,mul_left_comm] using hh + have hnear' := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (by filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv; exact hnear v hv) + have hfar' := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (by filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv; exact hfar v hv) + simp only [Measure.restrict_apply_univ,measureReal_def,Real.norm_eq_abs] at hnear' hfar' + unfold transportSingularShell + rw [abs_mul,abs_of_pos (inv_pos.mpr hr)] + constructor + · exact (mul_le_mul_of_nonneg_left hnear' (inv_nonneg.mpr hr.le)).trans_eq (by simp only [measureReal_def]; field_simp) + · exact (mul_le_mul_of_nonneg_left hfar' (inv_nonneg.mpr hr.le)).trans_eq (by simp only [measureReal_def]; ring) + +attribute [local instance] Measure.Subtype.measureSpace + +lemma transportSingularShell_continuousOn {P t U : ℝ} {f : Particle} (x e : Vec) (i : Fin 3) + (hf : ContinuousOn f {p | p.1∈Icc (0:ℝ) U}) (ht : t∈Icc (0:ℝ) U) : + ContinuousOn (transportSingularShell P f t x e i) (Ioc (0:ℝ) t) := by + let K := closedBall (0:Vec) P + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall _ _) + let : IsFiniteMeasure (volume : Measure K) := ⟨by + rw [Measure.Subtype.volume_univ measurableSet_closedBall.nullMeasurableSet] + exact (isCompact_closedBall _ _).measure_lt_top⟩ + let α := K × Sphere + let μ : Measure α := volume.prod sphereMeasure + let G : ℝ × α → ℝ := fun q => divergence (transportSpatialFlux q.2.1.1 e i) q.2.2.1 * + f (t-q.1,x+q.1 • q.2.2.1,q.2.1.1) + have hc : Continuous (fun a : α => divergence (transportSpatialFlux a.1.1 e i) a.2.1) := by + apply (continuousOn_transportSpatialDivergence e i).comp_continuous + ((continuous_subtype_val.comp continuous_snd).prodMk (continuous_subtype_val.comp continuous_fst)) + intro a hz + change (a.2 : Vec)=0 at hz + have hh := sphere_norm a.2 + rw [hz,norm_zero] at hh + norm_num at hh + have hn : Continuous (fun q : ℝ × α => (q.2.2:Vec)) := continuous_subtype_val.comp continuous_snd.snd + have hv : Continuous (fun q : ℝ × α => (q.2.1:Vec)) := continuous_subtype_val.comp continuous_snd.fst + have hmap : Continuous (fun q : ℝ × α => (t-q.1,x+q.1 • (q.2.2:Vec),(q.2.1:Vec))) := + (continuous_const.sub continuous_fst).prodMk ((continuous_const.add (continuous_fst.smul hn)).prodMk hv) + have hG : ContinuousOn G (Ioc (0:ℝ) t ×ˢ univ) := by + exact (hc.comp continuous_snd).continuousOn.mul (hf.comp hmap.continuousOn (by + intro q hq + exact ⟨by linarith [hq.1.2],by linarith [ht.2,hq.1.1]⟩)) + have hi (r : ℝ) (hr : r∈Ioc (0:ℝ) t) : Integrable (fun a : α => G (r,a)) μ := + (hG.comp_continuous (continuous_const.prodMk continuous_id) (fun a => ⟨hr,mem_univ a⟩)).integrable_of_hasCompactSupport + (HasCompactSupport.of_compactSpace _) + have hg : ContinuousOn (fun r => ∫ a, G (r,a) ∂μ) (Ioc (0:ℝ) t) := by + apply continuousOn_integral_of_compact_support (k:=univ) isCompact_univ hG + intro r a _ ha + exact (ha (mem_univ a)).elim + have he (r : ℝ) (hr : r∈Ioc (0:ℝ) t) : + (∫ a, G (r,a) ∂μ)=∫ v in K,∫ n : Sphere, + divergence (transportSpatialFlux v e i) n.1*f (t-r,x+r • n.1,v) ∂sphereMeasure := by + rw [show μ=(volume : Measure K).prod sphereMeasure from rfl,integral_prod _ (hi r hr)] + exact integral_subtype measurableSet_closedBall + (fun v : Vec => ∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure) + apply ContinuousOn.congr (f:=fun r : ℝ => r⁻¹*(∫ a, G (r,a) ∂μ)) + · exact (continuousOn_id.inv₀ (fun r hr => hr.1.ne')).mul hg + · intro r hr + change r⁻¹*(∫ v in K,∫ n : Sphere,divergence (transportSpatialFlux v e i) n.1 * + f (t-r,x+r • n.1,v) ∂sphereMeasure) = r⁻¹*(∫ a, G (r,a) ∂μ) + rw [he r hr] + +lemma physical_transport_log_bound (P H A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C D : ℝ, 0≤C ∧ 0≤D ∧ ∀ (U t N : ℝ) (f : Particle), + 0 f (s,y,v))) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, |f (s,y,v)|≤A) → + (∀ s∈Icc (0:ℝ) U, ∀ y v, ‖fderiv ℝ (fun z => f (s,z,v)) y‖≤N) → + ∀ x, IntegrableOn (transportSingularShell P f t x e i) (Ioc (0:ℝ) t) ∧ + |∫ r in Ioc (0:ℝ) t,transportSingularShell P f t x e i r|≤ + 1+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨K,hK,hkb⟩ := transportSpatialDivergence_uniform_bound P e i + let C := volume.real (closedBall (0:Vec) P)*(4*Real.pi)*K + have hC : 0≤C := by dsimp [C]; positivity + refine ⟨C,C*A,hC,mul_nonneg hC hA,?_⟩ + intro U t N f ht htU hUH hN hfc hfd hfA hfN x + have htt : t∈Icc (0:ℝ) U := ⟨ht.le,htU⟩ + have hh := singular_radial_log_bound ht (htU.trans hUH) (mul_nonneg hC hA) (mul_nonneg hC hN) + (transportSingularShell_continuousOn x e i hfc htt) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).1) + (fun r hr => (transportSingularShell_near_far hA hN hfd hfA hfN hK hkb htt hr.1 hr.2).2) + exact hh + +end RVM.Magnetic + +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +section +local instance : CompactSpace Sphere := isCompact_iff_compactSpace.mp (isCompact_sphere _ _) + +lemma transportSpatialFlux_uniform_bound (P : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ v∈closedBall (0:Vec) P, ∀ n : Sphere, + ‖transportSpatialFlux v e i n.1‖≤C := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => transportSpatialFlux p.2 e i p.1) K := by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + have hz : p.1≠0 := by intro hh; simp only [hh,norm_zero] at hn; norm_num at hn + exact (transportSpatialFlux_joint_contDiffAt e i hz).continuousAt.continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro v hv n + exact (hC (n.1,v) ⟨n.2,hv⟩).trans (le_max_left _ _) + +lemma transport_sphere_rescale (P : ℝ) (f : Particle) (t : ℝ) (x e : Vec) (i : Fin 3) + {r : ℝ} (hr : 0 by + dsimp only + rw [transportSpatialFlux_homogeneous v e i hr] + simp only [smul_smul,mul_comm]) + rw [he,dot_smul_right,←mul_assoc,mul_inv_cancel₀ (pow_ne_zero 2 hr.ne'),one_mul] + +lemma transport_sphere_boundary_bound (P A : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (f : Particle) (t U r : ℝ) (x : Vec), + 0 f (t-r,x+r • n.1,v) • transportSpatialFlux v e i n.1) (C:=A*K) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf _ hs _ v) (hkb v hv n) (norm_nonneg _) hA) + have hd := abs_real_inner_le_norm n.1 + (∫ v in closedBall (0:Vec) P,f (t-r,x+r • n.1,v) • transportSpatialFlux v e i n.1) + rw [sphere_norm,one_mul] at hd + rw [dot_eq_inner,Real.norm_eq_abs] + exact hd.trans (by simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,C,mul_assoc,mul_comm,mul_left_comm] using hh) + have hh := norm_integral_le_of_norm_le_const (μ:=sphereMeasure) (ae_of_all _ hb) + simpa only [Real.norm_eq_abs,sphere_area,smul_eq_mul,mul_comm] using hh + +end + +def transportVelocityProfile (e : Vec) (i : Fin 3) (p : (Vec × Vec × Vec) × Vec) : Vec := + (transportAngularCore p.1.1 (velocity p.2) i * + (dot p.1.1 e/(1-dot p.1.1 (velocity p.2)))) • + (p.1.2.1+cross (velocity p.2) p.1.2.2) + +lemma transportVelocityProfile_contDiffAt (e : Vec) (i : Fin 3) + {p : (Vec × Vec × Vec) × Vec} (hd : 1-dot p.1.1 (velocity p.2)≠0) : + ContDiffAt ℝ 1 (transportVelocityProfile e i) p := by + have hn : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => z.1.1) p := contDiffAt_fst.fst + have hu : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => velocity z.2) p := + contDiff_velocity.contDiffAt.comp p contDiffAt_snd + have ha := contDiffAt_transportAngularCore hn hu hd + have hi := (PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).contDiff.contDiffAt.comp p ha + have hm := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk (contDiffAt_const (c:=e))) + have hdu := contDiff_dot_pair.contDiffAt.comp p (hn.prodMk hu) + have hforce : ContDiffAt ℝ 1 (fun z : (Vec × Vec × Vec) × Vec => + z.1.2.1+cross (velocity z.2) z.1.2.2) p := + contDiffAt_fst.snd.fst.add + (contDiff_cross.contDiffAt.comp p (hu.prodMk contDiffAt_fst.snd.snd)) + exact (hi.mul (hm.div (contDiffAt_const.sub hdu) hd)).smul hforce + +lemma divergence_parameter_slice {U : Type*} [NormedAddCommGroup U] [NormedSpace ℝ U] + {F : U × Vec → Vec} {a : U} {v : Vec} (hF : DifferentiableAt ℝ F (a,v)) : + divergence (fun w => F (a,w)) v=∑ j : Fin 3,(fderiv ℝ F (a,v) (0,basis j)) j := by + have hP := (hasFDerivAt_const a v).prodMk (hasFDerivAt_id (𝕜:=ℝ) v) + have hh := hF.hasFDerivAt.comp v hP + change HasFDerivAt (fun w : Vec => F (a,w)) _ v at hh + unfold divergence spatialPartial + congr 1 + funext j + rw [fderiv_vec_component_at hh.differentiableAt j,hh.fderiv] + rfl + +lemma continuousOn_transportVelocityDivergence (e : Vec) (i : Fin 3) : + ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => transportVelocityProfile e i (p.1,w)) p.2) + {p | 1-dot p.1.1 (velocity p.2)≠0} := by + apply ContinuousOn.congr (f:=fun p : (Vec × Vec × Vec) × Vec => + ∑ j : Fin 3,(fderiv ℝ (transportVelocityProfile e i) p (0,basis j)) j) + · apply continuousOn_finsetSum + intro j _ p hp + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) j).continuous.continuousAt.comp + (((transportVelocityProfile_contDiffAt e i hp).continuousAt_fderiv (by simp)).clm_apply + continuousAt_const)).continuousWithinAt + · intro p hp + exact divergence_parameter_slice ((transportVelocityProfile_contDiffAt e i hp).differentiableAt (by simp)) + +lemma transportVelocityDivergence_uniform_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (E B v : Vec), ‖E‖≤M → ‖B‖≤M → ‖v‖≤P → + |divergence (fun w => transportVelocityProfile e i ((n.1,E,B),w)) v|≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : (Vec × Vec × Vec) × Vec => + divergence (fun w => transportVelocityProfile e i (p.1,w)) p.2) K := + (continuousOn_transportVelocityDivergence e i).mono (by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact (cone_denom_pos p.2 p.1.1 hn).ne') + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n E B v hE hB hv + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +lemma divergence_real_const_smul {F : Vec → Vec} {v : Vec} (hF : DifferentiableAt ℝ F v) (a : ℝ) : + divergence (fun w => a • F w) v=a*divergence F v := by + rw [divergence_smul (differentiableAt_const a) hF] + have hg : gradient (fun _ : Vec => a) v=0 := by + ext j + simp + rw [hg] + simp [dot] + +lemma transport_velocity_divergence_rescale (s : Solution) (t : ℝ) (x e : Vec) (i : Fin 3) + {z : Vec} (hz : z≠0) (v : Vec) : + divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v = + ((coneRadius 0 z)^2)⁻¹* + divergence (fun w => transportVelocityProfile e i + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),w)) v := by + let a := (coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)) + have ha : DifferentiableAt ℝ (fun w => transportVelocityProfile e i (a,w)) v := + ((transportVelocityProfile_contDiffAt e i (p:=(a,v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).comp v + ((differentiableAt_const a).prodMk differentiableAt_id) + have he : (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) = + fun w => ((coneRadius 0 z)^2)⁻¹ • transportVelocityProfile e i (a,w) := by + funext w + simp only [transportConeCoefficient,coneSpatialCoefficient,coneLorentz,transportVelocityProfile,a,smul_smul,mul_assoc] + rw [he,divergence_real_const_smul ha] + +lemma physical_transport_velocity_bound (P M : ℝ) (e : Vec) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v : Vec), z≠0 → ‖v‖≤P → + ‖s.E (t-coneRadius 0 z,x+z)‖≤M → ‖s.B (t-coneRadius 0 z,x+z)‖≤M → + |divergence (fun w => transportConeCoefficient i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v|≤C/(coneRadius 0 z)^2 := by + obtain ⟨C,hC,hb⟩ := transportVelocityDivergence_uniform_bound P M e i + refine ⟨C,hC,?_⟩ + intro s t x z v hz hv hE hB + rw [transport_velocity_divergence_rescale s t x e i hz v,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + exact (mul_le_mul_of_nonneg_left + (hb ⟨coneDirection 0 z,hn⟩ _ _ v hE hB hv) (inv_nonneg.mpr (sq_nonneg _))).trans_eq (by ring) + +end RVM.Magnetic + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/UniformDatumKernel.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/UniformDatumKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a52911561f27074029b4f7a69bb201fc0644a25 --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/UniformDatumKernel.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Model + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma uniform_velocity_integral_bound_from_caps {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {H : Vec × Vec → W} (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) + (A P : ℝ) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ f : Phase → ℝ, + (∀ z, |f z|≤A) → (∀ x v, P<‖v‖ → f (x,v)=0) → + ∀ y n : Vec, ‖n‖=1 → ‖∫ v : Vec, f (y,v) • H (n,v)‖≤C := by + let K := closedBall (0:Vec) P + have hK : IsCompact K := isCompact_closedBall _ _ + obtain ⟨B,hB⟩ := ((isCompact_sphere (0:Vec) 1).prod hK).exists_bound_of_continuousOn + (hH.mono (by intro p hp; exact ⟨hp.1,mem_univ _⟩)) + let D := max B 0 + have hD : 0≤D := le_max_right _ _ + refine ⟨A*D*(volume K).toReal,by positivity,?_⟩ + intro f hf hp y n hn + have hn' : n∈sphere (0:Vec) 1 := mem_sphere_zero_iff_norm.mpr hn + have he : (∫ v in K, f (y,v) • H (n,v))=(∫ v, f (y,v) • H (n,v)) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hp y v (by simpa only [K,mem_closedBall,dist_zero_right,not_le] using hv),zero_smul] + rw [←he] + have hb : ∀ v∈K, ‖f (y,v) • H (n,v)‖≤A*D := by + intro v hv + rw [norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hf (y,v)) ((hB (n,v) ⟨hn',hv⟩).trans (le_max_left _ _)) (norm_nonneg _) hA + exact norm_setIntegral_le_of_norm_le_const hK.measure_lt_top hb + +lemma uniform_velocity_integral_lipschitz_from_caps {W : Type*} + [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {H : Vec × Vec → W} (hH : ContinuousOn H (sphere (0:Vec) 1 ×ˢ univ)) + (A P : ℝ) (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ f : Phase → ℝ, Continuous f → + (∀ x y v, |f (y,v)-f (x,v)|≤A*‖y-x‖) → (∀ x v, P<‖v‖ → f (x,v)=0) → + ∀ x y n : Vec, ‖n‖=1 → + ‖(∫ v, f (y,v) • H (n,v))-(∫ v, f (x,v) • H (n,v))‖≤C*‖y-x‖ := by + let K := closedBall (0:Vec) P + have hK : IsCompact K := isCompact_closedBall _ _ + obtain ⟨B,hB⟩ := ((isCompact_sphere (0:Vec) 1).prod hK).exists_bound_of_continuousOn + (hH.mono (by intro p hp; exact ⟨hp.1,mem_univ _⟩)) + let D := max B 0 + have hD : 0≤D := le_max_right _ _ + refine ⟨A*D*(volume K).toReal,by positivity,?_⟩ + intro f hf hfl hp x y n hn + have hz (z v : Vec) (hv : v∉K) : f (z,v)=0 := + hp z v (by simpa only [K,mem_closedBall,dist_zero_right,not_le] using hv) + have hn' : n∈sphere (0:Vec) 1 := mem_sphere_zero_iff_norm.mpr hn + have hint (z : Vec) : Integrable (fun v => f (z,v) • H (n,v)) := by + apply Continuous.integrable_of_hasCompactSupport + · exact (hf.comp (continuous_const.prodMk continuous_id)).smul + (hH.comp_continuous (continuous_const.prodMk continuous_id) (fun v => ⟨hn',mem_univ v⟩)) + · exact HasCompactSupport.intro hK (fun v hv => by rw [hz z v hv,zero_smul]) + rw [← integral_sub (hint y) (hint x)] + have he : (∫ v in K, f (y,v) • H (n,v)-f (x,v) • H (n,v))= + ∫ v, f (y,v) • H (n,v)-f (x,v) • H (n,v) := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + simp only [hz _ v hv,zero_smul,sub_self] + rw [← he] + have hb : ∀ v∈K, ‖f (y,v) • H (n,v)-f (x,v) • H (n,v)‖≤ A*‖y-x‖*D := by + intro v hv + rw [← sub_smul,norm_smul,Real.norm_eq_abs] + exact mul_le_mul (hfl x y v) ((hB (n,v) ⟨hn',hv⟩).trans (le_max_left _ _)) (norm_nonneg _) (by positivity) + exact (norm_setIntegral_le_of_norm_le_const hK.measure_lt_top hb).trans_eq (by simp only [Measure.real]; ring) + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraKernels.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraKernels.lean new file mode 100644 index 0000000000000000000000000000000000000000..1740bf499eb9550fabd99d9b68a7228b33de34cf --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraKernels.lean @@ -0,0 +1,1266 @@ +import Mathlib +import OAI.Analysis.VlasovMaxwell.Continuation.GlobalBoundaryBound +import OAI.Analysis.VlasovMaxwell.Regularity.PhysicalC0 +import OAI.Analysis.VlasovMaxwell.Population.TransportSingularBulk + +namespace OAI + +noncomputable section + +section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM.Magnetic + +lemma integral_symmetric_annulus_tendsto {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + {F : Vec → W} {t : ℝ} (ht : 0 ∫ z in ball (0:Vec) (t-a) \ ball (0:Vec) a,F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t,F z)) := by + have hh : Tendsto (fun a : ℝ => ∫ z in ball (0:Vec) t, + (ball (0:Vec) (t-a) \ ball (0:Vec) a).indicator F z) (𝓝[>] (0:ℝ)) + (𝓝 (∫ z in ball (0:Vec) t,F z)) := by + apply tendsto_integral_filter_of_dominated_convergence (fun z => ‖F z‖) + · exact Eventually.of_forall (fun a => hF.aestronglyMeasurable.indicator (measurableSet_ball.diff measurableSet_ball)) + · exact Eventually.of_forall (fun a => ae_of_all _ (fun z => norm_indicator_le_norm_self _ _)) + · exact hF.norm + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hn : ‖z‖ f (u,z,v)) y e=fderiv ℝ f (u,y,v) (0,e,0) := by + have hm : HasFDerivAt (fun z : Vec => (u,z,v)) + ((0 : Vec →L[ℝ] ℝ).prod ((ContinuousLinearMap.id ℝ Vec).prod 0)) y := + (hasFDerivAt_const u y).prodMk ((hasFDerivAt_id (𝕜:=ℝ) y).prodMk (hasFDerivAt_const v y)) + have hh := hf.hasFDerivAt.comp (f:=fun z : Vec => (u,z,v)) y hm + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma transportConeCoefficient_uniform_bound (P : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ z v : Vec, z≠0 → ‖v‖≤P → + |transportConeCoefficient i (z,v)|≤C/‖z‖^2 := by + let K := sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := (isCompact_sphere _ _).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fun p : Phase => transportAngularCore p.1 (velocity p.2) i) K := by + intro p hp + have hn : ‖p.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1 + have hh := contDiffAt_transportAngularCore (k:=1) (z:=p) contDiffAt_fst + (contDiff_velocity.contDiffAt.comp p contDiffAt_snd) (cone_denom_pos p.2 p.1 hn).ne' + exact ((PiLp.proj 2 (𝕜:=ℝ) (fun _ : Fin 3 => ℝ) i).continuous.continuousAt.comp hh.continuousAt).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro z v hz hv + have hb := hC (coneDirection 0 z,v) ⟨by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + unfold transportConeCoefficient + rw [abs_mul,abs_of_nonneg (inv_nonneg.mpr (sq_nonneg _))] + apply (mul_le_mul_of_nonneg_left (hb.trans (le_max_left _ _)) (inv_nonneg.mpr (sq_nonneg _))).trans_eq + simp only [coneRadius,zero_sub,norm_neg] + ring + +lemma transport_derivative_integrable {s : Solution} {U t P N : ℝ} (x e : Vec) (i : Fin 3) + (_ht : 0 s.f (u,z,v)) y‖≤N) : + IntegrableOn (fun z => ∫ v,transportConeCoefficient i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => transportConeCoefficient i p* + fderiv ℝ s.f (t-coneRadius 0 p.1,x+p.1,p.2) (0,e,0) + let A := ball (0:Vec) t \ ({0} : Set Vec) + have hzprop {z : Vec} (hz : z∈A) : z≠0 ∧ 0 (t-coneRadius 0 p.1,x+p.1,p.2)) p := + ((contDiffAt_const.sub hr).prodMk ((contDiffAt_const.add contDiffAt_fst).prodMk contDiffAt_snd)).continuousAt + have hdf : ContinuousAt (fun q : Phase => fderiv ℝ s.f (t-coneRadius 0 q.1,x+q.1,q.2)) p := + ((particle_contDiffAt_positive hf hh.2.1 (x+p.1) p.2).continuousAt_fderiv (by simp)).comp (f:=fun q : Phase => (t-coneRadius 0 q.1,x+q.1,q.2)) hm + exact ((transportConeCoefficient_contDiffAt i hh.1).continuousAt.mul + (hdf.clm_apply continuousAt_const)).continuousWithinAt + have hzero (z : Vec) (hz : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + have hh := hzprop hz + have hvP : P<‖v‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hv + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨hh.2.1.le,hh.2.2⟩ y v hvP) + dsimp [F] + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e,he] + simp + obtain ⟨C,hC,hcb⟩ := transportConeCoefficient_uniform_bound P i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have hK : IsCompact (closedBall (0:Vec) P) := isCompact_closedBall _ _ + apply integrableOn_ball_of_punctured_bound (α:=2) (C:=D) (by norm_num) + (continuousOn_integral_uniform_support hK hfc hzero) + intro z hz hzt + have hza : z∈A := ⟨by simpa only [mem_ball,dist_zero_right] using hzt,norm_pos_iff.mp hz⟩ + have hh := hzprop hza + have heq : (∫ v,F (z,v))=∫ v in closedBall (0:Vec) P,F (z,v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero (hzero z hza)).symm + change ‖∫ v,F (z,v)‖≤_ + rw [heq,Real.rpow_neg (norm_nonneg z),Real.rpow_two] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact hK.measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => F (z,v)) (C:=(C/‖z‖^2)*(N*‖e‖)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + dsimp [F] + rw [abs_mul,←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e] + apply mul_le_mul (hcb z v hh.1 (by simpa only [mem_closedBall,dist_zero_right] using hv)) + · simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans (mul_le_mul_of_nonneg_right (hfN _ ⟨hh.2.1.le,hh.2.2⟩ _ v) (norm_nonneg e)) + · exact abs_nonneg _ + · positivity) + exact hb.trans_eq (by simp only [D,Measure.real,Measure.restrict_apply_univ]; ring) + +lemma magnetic_transport_gradient_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨B,C,D,hB,hC,hD,hbound⟩ := magnetic_transport_annulus_gradient_bound P A M H e i hA hH + refine ⟨B,C,D,hB,hC,hD,?_⟩ + intro s U t N x ht htU hUH hN hf hE hB hc heq hfA hP hEB hfN + apply norm_integral_ball_of_annulus_bound ht (transport_derivative_integrable x e i ht htU hf hN hP hfN) + intro ε R hε hεR hRt + exact hbound s U t N ε R x ht htU hUH hN hε hεR hRt hf hE hB hc heq hfA hP hEB hfN + +lemma particle_fixed_time_contDiff {s : Solution} {k : ℕ∞ω} {u : ℝ} + (hf : ContDiffOn ℝ k s.f particleHalfSpace) (hu : 0≤u) : + ContDiff ℝ k (fun p : Phase => s.f (u,p)) := by + apply contDiffOn_univ.mp + exact hf.comp (contDiff_const.prodMk contDiff_id).contDiffOn (fun _ _ => hu) + +lemma transport_kernel_velocity_contDiff (i : Fin 3) {z : Vec} (hz : z≠0) : + ContDiff ℝ 1 (fun v => transportConeCoefficient i (z,v)) := by + apply contDiff_iff_contDiffAt.mpr + intro v + exact (transportConeCoefficient_contDiffAt i hz).comp v (contDiffAt_const.prodMk contDiffAt_id) + +lemma hasDerivAt_transport_particle_line {s : Solution} {u P : ℝ} + (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hu : 0 ∫ v,transportConeCoefficient i (z,v)*s.f (u,x+q • e,v)) + (∫ v,transportConeCoefficient i (z,v)*fderiv ℝ s.f (u,x+a • e,v) (0,e,0)) a := by + let F : ℝ × Vec → ℝ := fun p => s.f (u,x+p.1 • e,p.2) + let w : Vec → ℝ := fun v => transportConeCoefficient i (z,v) + have hF : ContDiff ℝ 1 F := (particle_fixed_time_contDiff hf hu.le).comp + ((contDiff_const.add (contDiff_fst.smul contDiff_const)).prodMk contDiff_snd) + have hw : ContDiff ℝ 1 w := transport_kernel_velocity_contDiff i hz + have hzero (a : ℝ) (_ : a∈(univ : Set ℝ)) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (a,v)=0 := + hP _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + have hG : ContDiffOn ℝ 1 (fun p : ℝ × Vec => w p.2*F p) (univ ×ˢ univ) := + ((hw.comp contDiff_snd).mul hF).contDiffOn + have hd := (hasFDerivAt_integral_uniform_support isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG (by intro q hq v hv; rw [hzero q hq v hv,mul_zero])).differentiableAt.hasDerivAt + rw [show deriv (fun x => ∫ v, w v*F (x,v)) a = fderiv ℝ (fun x => ∫ v,w v*F (x,v)) a 1 from rfl,fderiv_weighted_integral_uniform_support_apply isOpen_univ + (isCompact_closedBall (0:Vec) P) (mem_univ a) hF.contDiffOn hw hzero] at hd + apply hd.congr_deriv + apply integral_congr_ae + exact ae_of_all _ (fun v => by + apply congrArg (fun r : ℝ => w v*r) + have hm : HasFDerivAt (fun p : ℝ × Vec => (u,x+p.1 • e,p.2)) + ((0 : (ℝ × Vec) →L[ℝ] ℝ).prod + (((ContinuousLinearMap.smulRight (ContinuousLinearMap.fst ℝ ℝ Vec) e)).prod + (ContinuousLinearMap.snd ℝ ℝ Vec))) (a,v) := by + convert (hasFDerivAt_const u (a,v)).prodMk + (((hasFDerivAt_const x (a,v)).add ((hasFDerivAt_fst (𝕜:=ℝ)).smul_const e)).prodMk + (hasFDerivAt_snd (𝕜:=ℝ))) using 1 + first | rfl | simp + have hh := (particle_differentiableAt_positive hf hu _ v).hasFDerivAt.comp + (f:=fun p : ℝ × Vec => (u,x+p.1 • e,p.2)) (a,v) hm + simpa only [ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply, + zero_apply,ContinuousLinearMap.smulRight_apply, + ContinuousLinearMap.coe_fst',ContinuousLinearMap.coe_snd',one_smul,F,Function.comp_def] using + congrArg (fun L : (ℝ × Vec) →L[ℝ] ℝ => L (1,0)) hh.fderiv) + +lemma norm_transport_velocity_integral_le {P C A : ℝ} {z : Vec} {i : Fin 3} + {g : Vec → ℝ} (_hA : 0≤A) + (hk : ∀ v, ‖v‖≤P → |transportConeCoefficient i (z,v)|≤C/‖z‖^2) + (hzero : ∀ v, P<‖v‖ → g v=0) (hg : ∀ v, |g v|≤A) : + ‖∫ v,transportConeCoefficient i (z,v)*g v‖≤volume.real (closedBall (0:Vec) P)*C*A/‖z‖^2 := by + have heq : (∫ v,transportConeCoefficient i (z,v)*g v)= + ∫ v in closedBall (0:Vec) P,transportConeCoefficient i (z,v)*g v := by + symm + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + rw [hzero v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),mul_zero] + rw [heq] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ]; exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => transportConeCoefficient i (z,v)*g v) (C:=(C/‖z‖^2)*A) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + rw [Real.norm_eq_abs,abs_mul] + exact mul_le_mul (hk v (by simpa only [mem_closedBall,dist_zero_right] using hv)) (hg v) + (abs_nonneg _) (le_trans (abs_nonneg _) (hk v (by simpa only [mem_closedBall,dist_zero_right] using hv)))) + exact hb.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ]; ring) + +lemma transport_density_integrable {s : Solution} {U t P A : ℝ} (x : Vec) (i : Fin 3) + (htU : t≤U) (hf : ContDiffOn ℝ 1 s.f particleHalfSpace) (hA : 0≤A) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) + (hfA : ∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) : + IntegrableOn (fun z => ∫ v,transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,x+z,v)) + (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => transportConeCoefficient i p*s.f (t-coneRadius 0 p.1,x+p.1,p.2) + let U₀ := retardedSpaceDomain t 0 + have htime {z : Vec} (hz : z∈U₀) : t-coneRadius 0 z∈Icc (0:ℝ) U := + ⟨hz.2.le,(sub_le_self _ (norm_nonneg _)).trans htU⟩ + have hk : ContinuousOn (transportConeCoefficient i) (U₀ ×ˢ univ) := by + intro p hp + exact (transportConeCoefficient_contDiffAt i hp.1.1.symm).continuousAt.continuousWithinAt + have hfc : ContinuousOn F (U₀ ×ˢ univ) := hk.mul + (shifted_particle_continuousOn x htU (hf.continuousOn.mono (fun p hp => hp.1))) + have hzero (z : Vec) (hz : z∈U₀) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + dsimp [F] + rw [hP _ (htime hz) _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),mul_zero] + have hsub : ball (0:Vec) t \ ({0} : Set Vec)⊆U₀ := by + intro z hz + exact ⟨(show z≠0 from hz.2).symm,by simpa only [coneRadius,zero_sub,norm_neg] using + (sub_pos.mpr (show ‖z‖ hcb z v (norm_pos_iff.mp hz) hv) + (hP _ (htime hzu) (x+z)) (hfA _ (htime hzu) (x+z)) + simpa only [Real.rpow_neg (norm_nonneg z),Real.rpow_two,div_eq_mul_inv] using hb + +lemma hasDerivAt_magnetic_transport_integral {s : Solution} {U t P A N : ℝ} + (x e : Vec) (i : Fin 3) (a : ℝ) + (ht : 0 s.f (u,z,v)) y‖≤N) : + HasDerivAt (fun q : ℝ => ∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) + (∫ z in ball (0:Vec) t, ∫ v,transportConeCoefficient i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,(x+a • e)+z,v) (0,e,0)) a := by + obtain ⟨C,hC,hcb⟩ := transportConeCoefficient_uniform_bound P i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have htime {z : Vec} (hz : z∈ball (0:Vec) t) : + 0 D*‖z‖^(-(2:ℝ))) (by simp) + (Eventually.of_forall (fun q => (transport_density_integrable (x+q • e) i htU hf hA hP hfA).aestronglyMeasurable)) + (transport_density_integrable (x+a • e) i htU hf hA hP hfA) + (transport_derivative_integrable (x+a • e) e i ht htU hf hN hP hfN).aestronglyMeasurable + ?_ ((integrableOn_norm_rpow_neg (R:=t) (show (2:ℝ)<3 by norm_num)).const_mul D) ?_).2 + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + intro q _ + have htz := htime hz + refine (norm_transport_velocity_integral_le (mul_nonneg hN (norm_nonneg e)) + (fun v hv => hcb z v hz0 hv) ?_ ?_).trans_eq ?_ + · intro v hv + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf htz.1 _ _) e] + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨htz.1.le,htz.2⟩ y v hv) + rw [he] + simp + · intro v + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf htz.1 _ _) e] + simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans + (mul_le_mul_of_nonneg_right (hfN _ ⟨htz.1.le,htz.2⟩ _ v) (norm_nonneg e)) + · simp only [D,Real.rpow_neg (norm_nonneg z),Real.rpow_two] + ring + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + intro q _ + have htz := htime hz + simpa only [add_right_comm] using hasDerivAt_transport_particle_line hf htz.1 + (hP _ ⟨htz.1.le,htz.2⟩) (x+z) e z hz0 i q + +lemma magnetic_transport_deriv_bound (P A M H : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) (hH : 0≤H) : + ∃ B C D : ℝ, 0≤B ∧ 0≤C ∧ 0≤D ∧ + ∀ (s : Solution) (U t N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t, ∫ v, + transportConeCoefficient i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + B+D*(Real.log (max 1 H)+Real.log (1+C*N)) := by + obtain ⟨B,C,D,hB,hC,hD,hb⟩ := magnetic_transport_gradient_bound P A M H e i hA hH + refine ⟨B,C,D,hB,hC,hD,?_⟩ + intro s U t N x ht htU hUH hN hf hE hBB hc heq hfA hP hEB hfN + rw [(hasDerivAt_magnetic_transport_integral x e i 0 ht htU hf hA hN hP hfA hfN).deriv] + simpa only [zero_smul,add_zero] using hb s U t N x ht htU hUH hN hf hE hBB hc heq hfA hP hEB hfN + +lemma source_sphere_support {s : Solution} {t U P r : ℝ} (x e : Vec) (i : Fin 3) + (hr : 0≤r) (hrt : r≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ n : Sphere,r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • + (sourceConeCoefficient s t x i (r • n.1,v) • coneSpatialLift 0 (r • n.1) v e)) ∂sphereMeasure) = + (∫ n : Sphere,r^2*dot n.1 (∫ v in closedBall (0:Vec) P,s.f (t-r,x+r • n.1,v) • + sourceFixedFlux v (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i (r • n.1)) ∂sphereMeasure) := by + apply integral_congr_ae + apply ae_of_all + intro n + have hrad : coneRadius 0 (r • n.1)=r := by + simp only [coneRadius,zero_sub,norm_neg,norm_smul,Real.norm_of_nonneg hr,sphere_norm,mul_one] + simp only [sourceConeCoefficient,hrad] + change r^2*dot n.1 (∫ v,s.f (t-r,x+r • n.1,v) • sourceFixedFlux v + (s.E (t-r,x+r • n.1)) (s.B (t-r,x+r • n.1)) e i (r • n.1))=_ + congr 2 + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ ⟨by linarith,by linarith⟩ _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_smul] + +lemma source_bulk_support {s : Solution} {t U P ε R : ℝ} (x e : Vec) (i : Fin 3) + (hRt : R≤t) (htU : t≤U) + (hP : ∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) : + (∫ z in ball (0:Vec) R \ ball (0:Vec) ε,∫ v,s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) = + ∫ z in ball (0:Vec) R \ ball (0:Vec) ε,sourceDivisionBulk P s t x e i z := by + apply setIntegral_congr_fun (measurableSet_ball.diff measurableSet_ball) + intro z hz + have hu : t-coneRadius 0 z∈Icc (0:ℝ) U := by + have hzR : ‖z‖ linarith [norm_nonneg z] + apply (setIntegral_eq_integral_of_forall_compl_eq_zero _).symm + intro v hv + rw [hP _ hu _ v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv),zero_mul] + +lemma magnetic_source_annulus_gradient_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H Q ε R : ℝ) (x : Vec), + 0≤H → 0≤Q → 0<ε → ε≤R → R s.f (u,z,v)) y‖≤N) : + IntegrableOn (fun z => ∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) (ball (0:Vec) t) := by + let F : Phase → ℝ := fun p => sourceConeCoefficient s t x i p* + fderiv ℝ s.f (t-coneRadius 0 p.1,x+p.1,p.2) (0,e,0) + let A := ball (0:Vec) t \ ({0} : Set Vec) + have hzprop {z : Vec} (hz : z∈A) : z≠0 ∧ 0 (t-coneRadius 0 p.1,x+p.1,p.2)) p := + ((contDiffAt_const.sub hr).prodMk ((contDiffAt_const.add contDiffAt_fst).prodMk contDiffAt_snd)).continuousAt + have hdf : ContinuousAt (fun q : Phase => fderiv ℝ s.f (t-coneRadius 0 q.1,x+q.1,q.2)) p := + ((particle_contDiffAt_positive hf hh.2.1 (x+p.1) p.2).continuousAt_fderiv (by simp)).comp (f:=fun q : Phase => (t-coneRadius 0 q.1,x+q.1,q.2)) hm + exact ((sourceConeCoefficient_contDiffAt hE hB x i hh.1 hh.2.1).continuousAt.mul + (hdf.clm_apply continuousAt_const)).continuousWithinAt + have hzero (z : Vec) (hz : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (z,v)=0 := by + have hh := hzprop hz + have hvP : P<‖v‖ := by simpa only [mem_closedBall,dist_zero_right,not_le] using hv + have he : (fun y => s.f (t-coneRadius 0 z,y,v))=fun _ => (0:ℝ) := + funext (fun y => hP _ ⟨hh.2.1.le,hh.2.2⟩ y v hvP) + dsimp [F] + rw [←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e,he] + simp + obtain ⟨C,hC,hcb⟩ := sourceConeCoefficient_uniform_bound P M i + let D := volume.real (closedBall (0:Vec) P)*C*N*‖e‖ + have hK : IsCompact (closedBall (0:Vec) P) := isCompact_closedBall _ _ + apply integrableOn_ball_of_punctured_bound (α:=1) (C:=D) (by norm_num) + (continuousOn_integral_uniform_support hK hfc hzero) + intro z hz hzt + have hza : z∈A := ⟨by simpa only [mem_ball,dist_zero_right] using hzt,norm_pos_iff.mp hz⟩ + have hh := hzprop hza + have heq : (∫ v,F (z,v))=∫ v in closedBall (0:Vec) P,F (z,v) := + (setIntegral_eq_integral_of_forall_compl_eq_zero (hzero z hza)).symm + change ‖∫ v,F (z,v)‖≤_ + rw [heq,Real.rpow_neg (norm_nonneg z),Real.rpow_one] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ] + exact hK.measure_lt_top⟩ + have hb := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => F (z,v)) (C:=(C/‖z‖)*(N*‖e‖)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + dsimp [F] + rw [abs_mul,←particle_spatial_fderiv (particle_differentiableAt_positive hf hh.2.1 _ _) e] + apply mul_le_mul (hcb s t x z v hh.1 (by simpa only [mem_closedBall,dist_zero_right] using hv) + (hEB _ ⟨hh.2.1.le,hh.2.2⟩ _).1 (hEB _ ⟨hh.2.1.le,hh.2.2⟩ _).2) + · simpa only [Real.norm_eq_abs] using (ContinuousLinearMap.le_opNorm _ e).trans (mul_le_mul_of_nonneg_right (hfN _ ⟨hh.2.1.le,hh.2.2⟩ _ v) (norm_nonneg e)) + · exact abs_nonneg _ + · positivity) + exact hb.trans_eq (by simp only [D,Measure.real,Measure.restrict_apply_univ]; ring) + +lemma magnetic_source_particle_gradient_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H Q N : ℝ) (x : Vec), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤C*(H+H^2*(1+Q)) := by + obtain ⟨C,hC,hb⟩ := magnetic_source_annulus_gradient_bound P A M e i hA + refine ⟨C,hC,?_⟩ + intro s U t H Q N x ht htU hUH hQ hN hf hE hB hc heq hfA hP hEB hDF hfN + apply norm_integral_ball_of_annulus_bound ht + (source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN) + intro ε R hε hεR hRt + exact hb s U t H Q ε R x (ht.le.trans (htU.trans hUH)) hQ hε hεR hRt htU hUH + hf hE hB hc heq hfA hP hEB hDF + +lemma sourceAngularProfile_derivative_bound (P M : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (n : Sphere) (v E B : Vec), ‖v‖≤P → ‖E‖≤M → ‖B‖≤M → + ‖fderiv ℝ (sourceAngularProfile i) ((n.1,E,B),v)‖≤C := by + let K := (sphere (0:Vec) 1 ×ˢ (closedBall (0:Vec) M ×ˢ closedBall (0:Vec) M)) ×ˢ closedBall (0:Vec) P + have hK : IsCompact K := ((isCompact_sphere _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _))).prod (isCompact_closedBall _ _) + have hc : ContinuousOn (fderiv ℝ (sourceAngularProfile i)) K := by + intro p hp + have hn : ‖p.1.1‖=1 := by simpa only [mem_sphere,dist_zero_right] using hp.1.1 + exact ((sourceAngularProfile_contDiffAt i (cone_denom_pos p.2 p.1.1 hn).ne').continuousAt_fderiv (by simp)).continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hc + refine ⟨max C 0,le_max_right _ _,?_⟩ + intro n v E B hv hE hB + apply (hC ((n.1,E,B),v) ?_).trans (le_max_left _ _) + exact ⟨⟨n.2,by simpa only [mem_prod,mem_closedBall,dist_zero_right] using And.intro hE hB⟩, + by simpa only [mem_closedBall,dist_zero_right] using hv⟩ + +def sourceReceiverKernel (s : Solution) (t : ℝ) (i : Fin 3) (p : Vec × Phase) : ℝ := + sourceConeCoefficient s t p.1 i p.2 + +lemma sourceReceiverKernel_contDiffAt {s : Solution} {t : ℝ} (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + {p : Vec × Phase} (hz : p.2.1≠0) (ht : 0 (t-coneRadius 0 q.2.1,q.1+q.2.1)) p := + (contDiffAt_const.sub hr).prodMk (contDiffAt_fst.add contDiffAt_snd.fst) + have he := (field_contDiffAt_positive hE ht (p.1+p.2.1)).comp p hm + have hb := (field_contDiffAt_positive hB ht (p.1+p.2.1)).comp p hm + have hprof := (sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 p.2.1,s.E (t-coneRadius 0 p.2.1,p.1+p.2.1),s.B (t-coneRadius 0 p.2.1,p.1+p.2.1)),p.2.2)) + (cone_denom_pos p.2.2 _ (coneDirection_norm hz.symm)).ne').comp p + ((hn.prodMk (he.prodMk hb)).prodMk contDiffAt_snd.snd) + exact (hr.inv (norm_ne_zero_iff.mpr (sub_ne_zero.mpr hz.symm))).mul hprof + +lemma source_receiver_fderiv_formula {s : Solution} {t : ℝ} (x z v e : Vec) (i : Fin 3) + (hE : ContDiffOn ℝ 1 s.E fieldHalfSpace) (hB : ContDiffOn ℝ 1 s.B fieldHalfSpace) + (hz : z≠0) (ht : 0 sourceConeCoefficient s t y i (z,v)) x e = + (coneRadius 0 z)⁻¹*fderiv ℝ (sourceAngularProfile i) + ((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v) + ((0,fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e),fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)),0) := by + have hm := (hasFDerivAt_const (t-coneRadius 0 z) x).prodMk ((hasFDerivAt_id (𝕜:=ℝ) x).add_const z) + have he := ((field_contDiffAt_positive hE ht (x+z)).differentiableAt (by simp)).hasFDerivAt.comp x hm + have hb := ((field_contDiffAt_positive hB ht (x+z)).differentiableAt (by simp)).hasFDerivAt.comp x hm + have hp := ((sourceAngularProfile_contDiffAt i + (p:=((coneDirection 0 z,s.E (t-coneRadius 0 z,x+z),s.B (t-coneRadius 0 z,x+z)),v)) + (cone_denom_pos v _ (coneDirection_norm hz.symm)).ne').differentiableAt (by simp)).hasFDerivAt.comp x + (((hasFDerivAt_const (coneDirection 0 z) x).prodMk (he.prodMk hb)).prodMk (hasFDerivAt_const v x)) + have hh := hp.const_mul ((coneRadius 0 z)⁻¹) + change HasFDerivAt (fun y => sourceConeCoefficient s t y i (z,v)) _ x at hh + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma physical_source_receiver_bound (P M : ℝ) (i : Fin 3) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (t : ℝ) (x z v e : Vec), + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + z≠0 → 0 sourceConeCoefficient s t y i (z,v)) x e|≤ + C/‖z‖*max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ + ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖*‖e‖ := by + obtain ⟨C,hC,hcb⟩ := sourceAngularProfile_derivative_bound P M i + refine ⟨C,hC,?_⟩ + intro s t x z v e hE hB hz ht hv he hb + rw [source_receiver_fderiv_formula x z v e i hE hB hz ht,abs_mul, + abs_of_nonneg (inv_nonneg.mpr (show 0≤coneRadius 0 z from norm_nonneg _))] + let Q := max ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖ + have hQ : 0≤Q := (norm_nonneg _).trans (le_max_left _ _) + have he' : ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e)‖≤Q*‖e‖ := by + exact (ContinuousLinearMap.le_opNorm _ (0,e)).trans (by + simpa only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg e)] using mul_le_mul_of_nonneg_right + (le_max_left ‖fderiv ℝ s.E (t-coneRadius 0 z,x+z)‖ _) (norm_nonneg ((0:ℝ),e))) + have hb' : ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)‖≤Q*‖e‖ := by + exact (ContinuousLinearMap.le_opNorm _ (0,e)).trans (by + simpa only [Prod.norm_mk,norm_zero,max_eq_right (norm_nonneg e)] using mul_le_mul_of_nonneg_right + (le_max_right _ ‖fderiv ℝ s.B (t-coneRadius 0 z,x+z)‖) (norm_nonneg ((0:ℝ),e))) + have hn : coneDirection 0 z∈sphere (0:Vec) 1 := by + simpa only [mem_sphere,dist_zero_right] using coneDirection_norm hz.symm + have hd := hcb ⟨coneDirection 0 z,hn⟩ v _ _ hv he hb + have harg : ‖(((0:Vec),fderiv ℝ s.E (t-coneRadius 0 z,x+z) (0,e), + fderiv ℝ s.B (t-coneRadius 0 z,x+z) (0,e)),(0:Vec))‖≤Q*‖e‖ := by + simp only [Prod.norm_mk,norm_zero] + exact max_le (max_le (by positivity) (max_le he' hb')) (by positivity) + have hh := (ContinuousLinearMap.le_opNorm _ _).trans (mul_le_mul hd harg (norm_nonneg _) hC) + apply (mul_le_mul_of_nonneg_left hh (inv_nonneg.mpr (show 0≤coneRadius 0 z from norm_nonneg _))).trans_eq + simp only [coneRadius,zero_sub,norm_neg,Q] + ring + +lemma norm_velocity_integral_bound {P C : ℝ} {g : Vec → ℝ} + (hzero : ∀ v, P<‖v‖ → g v=0) (hb : ∀ v, ‖v‖≤P → |g v|≤C) : + ‖∫ v,g v‖≤volume.real (closedBall (0:Vec) P)*C := by + rw [←setIntegral_eq_integral_of_forall_compl_eq_zero (s:=closedBall (0:Vec) P) + (f:=g) (fun v hv => hzero v (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv))] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := ⟨by + rw [Measure.restrict_apply_univ]; exact (isCompact_closedBall _ _).measure_lt_top⟩ + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) (f:=g) (C:=C) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + simpa only [Real.norm_eq_abs] using hb v (by simpa only [mem_closedBall,dist_zero_right] using hv)) + simpa only [Measure.real,Measure.restrict_apply_univ,smul_eq_mul,mul_comm] using hh + +lemma retarded_packet_integrable {F : Vec × Phase → ℝ} {t P C : ℝ} (x : Vec) + (hc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ v,F (x,z,v)) (ball (0:Vec) t) := by + let A := ball (0:Vec) t \ ({0}:Set Vec) + have hC : ContinuousOn (fun p : Phase => F (x,p)) (A ×ˢ univ) := by + intro p hp + exact ((hc (x,p) hp.1.2 (by simpa only [mem_ball,dist_zero_right] using hp.1.1)).comp + (continuousAt_const.prodMk continuousAt_id)).continuousWithinAt + have hzero (z : Vec) (hza : z∈A) (v : Vec) (hv : v∉closedBall (0:Vec) P) : F (x,z,v)=0 := + hz x z v hza.2 (by simpa only [mem_ball,dist_zero_right] using hza.1) + (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + apply integrableOn_ball_of_punctured_bound (α:=1) (C:=volume.real (closedBall (0:Vec) P)*C) + (by norm_num) (continuousOn_integral_uniform_support (isCompact_closedBall _ _) hC hzero) + intro z hz0 hzt + have hzn := norm_pos_iff.mp hz0 + have hh := norm_velocity_integral_bound (hz x z · hzn hzt) (hb x z · hzn hzt) + simpa only [Real.rpow_neg (norm_nonneg z),Real.rpow_one,div_eq_mul_inv,mul_assoc] using hh + +lemma retarded_packet_spatial_fderiv {F : Vec × Phase → ℝ} {x z v : Vec} + (hF : DifferentiableAt ℝ F (x,z,v)) (e : Vec) : + fderiv ℝ (fun y => F (y,z,v)) x e=fderiv ℝ F (x,z,v) (e,0,0) := by + have hh := hF.hasFDerivAt.comp x ((hasFDerivAt_id (𝕜:=ℝ) x).prodMk (hasFDerivAt_const (z,v) x)) + exact congrArg (fun L : Vec →L[ℝ] ℝ => L e) hh.fderiv + +lemma retarded_packet_derivative_zero {F : Vec × Phase → ℝ} {P t : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ F (y,z,v))=fun _ => (0:ℝ) := funext (fun y => hz y z v hz0 hzt hv) + rw [he] + simp + +lemma hasDerivAt_retarded_packet_line {F : Vec × Phase → ℝ} {t P : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ v,F (x+q • e,z,v)) + (∫ v,fderiv ℝ F (x+a • e,z,v) (e,0,0)) a := by + let G : ℝ × Vec → ℝ := fun p => F (x+p.1 • e,z,p.2) + have hG : ContDiff ℝ 1 G := by + apply contDiff_iff_contDiffAt.mpr + intro p + exact (hF (x+p.1 • e,z,p.2) hz0 hzt).comp p + ((contDiffAt_const.add (contDiffAt_fst.smul contDiffAt_const)).prodMk + (contDiffAt_const.prodMk contDiffAt_snd)) + have hzero (q : ℝ) (_ : q∈(univ : Set ℝ)) (v : Vec) (hv : v∉closedBall (0:Vec) P) : G (q,v)=0 := + hz _ z v hz0 hzt (by simpa only [mem_closedBall,dist_zero_right,not_le] using hv) + have hd := (hasFDerivAt_integral_uniform_support isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG.contDiffOn hzero).differentiableAt.hasDerivAt + rw [show deriv (fun q => ∫ v,G (q,v)) a = fderiv ℝ (fun q => ∫ v,G (q,v)) a 1 from rfl, + fderiv_integral_uniform_support_apply isOpen_univ (isCompact_closedBall (0:Vec) P) + (mem_univ a) hG.contDiffOn hzero] at hd + apply hd.congr_deriv + apply integral_congr_ae + apply ae_of_all + intro v + have hm := ((hasFDerivAt_const x (a,v)).add ((hasFDerivAt_fst (𝕜:=ℝ)).smul_const e)).prodMk + ((hasFDerivAt_const z (a,v)).prodMk (hasFDerivAt_snd (𝕜:=ℝ))) + have hh := ((hF (x+a • e,z,v) hz0 hzt).differentiableAt (by simp)).hasFDerivAt.comp (a,v) hm + change HasFDerivAt G _ (a,v) at hh + simpa using congrArg (fun L : (ℝ × Vec) →L[ℝ] ℝ => L (1,0)) hh.fderiv + +lemma hasDerivAt_retarded_packet_integral {F : Vec × Phase → ℝ} {t P C D : ℝ} + (hF : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ ∫ z in ball (0:Vec) t,∫ v,F (x+q • e,z,v)) + (∫ z in ball (0:Vec) t,∫ v,fderiv ℝ F (x+a • e,z,v) (e,0,0)) a := by + let V := volume.real (closedBall (0:Vec) P) + have hfc := fun p hp ht => (hF p hp ht).continuousAt + have hdc : ∀ p : Vec × Phase, p.2.1≠0 → ‖p.2.1‖ fderiv ℝ F p (e,0,0)) p := by + intro p hp ht + exact ((hF p hp ht).continuousAt_fderiv (by simp)).clm_apply continuousAt_const + have hdz := fun x z v hz0 hzt hv => retarded_packet_derivative_zero hF hz x z v e hz0 hzt hv + apply (hasDerivAt_integral_of_dominated_loc_of_deriv_le (s:=univ) + (bound:=fun z : Vec => V*D*‖z‖^(-(1:ℝ))) (by simp) + (Eventually.of_forall (fun q => (retarded_packet_integrable (x+q • e) hfc hz hb).aestronglyMeasurable)) + (retarded_packet_integrable (x+a • e) hfc hz hb) + (retarded_packet_integrable (x+a • e) hdc hdz hD).aestronglyMeasurable + ?_ ((integrableOn_norm_rpow_neg (R:=t) (show (1:ℝ)<3 by norm_num)).const_mul (V*D)) ?_).2 + · filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hzball hz0 + intro q _ + have hzt : ‖z‖ C*g (t-‖z‖)/‖z‖^2) (ball (0:Vec) t) := by + obtain ⟨D,hD⟩ := (isCompact_closedBall (0:Vec) t).exists_bound_of_continuousOn + (f:=fun z : Vec => C*g (t-‖z‖)) (by fun_prop) + apply integrableOn_ball_of_punctured_bound (α:=2) (C:=D) (by norm_num) + · intro z hz + have hn : ‖z‖≠0 := norm_ne_zero_iff.mpr hz.2 + exact ((continuous_const.mul (hg.comp (continuous_const.sub continuous_norm))).continuousAt.div + (continuous_norm.pow 2).continuousAt (pow_ne_zero 2 hn)).continuousWithinAt + · intro z hz hzt + rw [norm_div,norm_pow,norm_norm,Real.rpow_neg (norm_nonneg z),Real.rpow_two] + exact (div_le_div_of_nonneg_right (hD z (by + simpa only [mem_closedBall,dist_zero_right] using hzt.le)) (sq_nonneg _)).trans_eq (by ring) + +lemma kernel_volterra_norm_subset {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + [CompleteSpace W] {F : Vec → W} {t C : ℝ} {S : Set Vec} + (ht : 0≤t) (hC : 0≤C) (hS : MeasurableSet S) (hsub : S⊆ball (0:Vec) t) + {g : ℝ → ℝ} (hg : Continuous g) (hg0 : ∀ u∈Icc (0:ℝ) t,0≤g u) + (hb : ∀ z∈S,z≠0 → ‖F z‖≤C*g (t-‖z‖)/‖z‖^2) : + ‖∫ z in S,F z‖≤(4*Real.pi)*C*(∫ u in Icc (0:ℝ) t,g u) := by + let G : Vec → ℝ := fun z => C*g (t-‖z‖)/‖z‖^2 + have hG : IntegrableOn G (ball (0:Vec) t) := radial_volterra_majorant_integrable hg + have hgball (z : Vec) (hz : z∈ball (0:Vec) t) : 0≤g (t-‖z‖) := + hg0 _ ⟨by + have hh : ‖z‖ hsub hz))).trans + apply (le_abs_self _).trans + change ‖∫ z in ball (0:Vec) t,G z‖≤_ + apply kernel_volterra_norm ht hC hG hg + intro z hz hzt + dsimp [G] + have hgzt := hg0 (t-‖z‖) ⟨sub_nonneg.mpr hzt,sub_le_self _ (norm_nonneg z)⟩ + rw [abs_of_nonneg (by positivity)] + +lemma source_volterra_factor {a b q H : ℝ} (ha : 0≤a) (hb : 0≤b) (hq : 0≤q) (hH : 0≤H) : + a+(a*q+b)*H≤(a+b)*(1+H)*(1+q) := by + have hh : a*q+b≤(a+b)*(1+q) := by nlinarith [mul_nonneg hb hq] + have hh' := mul_le_mul_of_nonneg_right hh hH + nlinarith [mul_nonneg (add_nonneg ha hb) hq] + +lemma source_division_bulk_annulus_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H ε R : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → 0<ε → ε≤R → R sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z|≤ + 3*Ks/‖z‖^2+(3*Ks/‖z‖)*g (t-‖z‖) := by + have hh := hks s t ‖z‖ x v n hE hB hzpos (hzr.1.trans hRt) hv + rw [hn] at hh + apply (hh (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2).trans + exact add_le_add le_rfl (mul_le_mul_of_nonneg_left + (by simpa only [hrad] using max_le (hDF _ hu _).1 (hDF _ hu _).2) (by positivity)) + have hh := norm_integral_le_of_norm_le_const (μ:=volume.restrict (closedBall (0:Vec) P)) + (f:=fun v => s.f (t-coneRadius 0 z,x+z,v)* + (divergence (fun y => sourceConeCoefficient s t x i (y,v) • coneSpatialLift 0 y v e) z+ + divergence (fun w => sourceConeCoefficient s t x i (z,w) • + (coneSpatialCoefficient 0 z w e • coneLorentz s t x (z,w))) v)) + (C:=A*(((3*Ks+Kv)*(1+H)*(1+g (t-‖z‖)))/‖z‖^2)) (by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + have hvP : ‖v‖≤P := by simpa only [mem_closedBall,dist_zero_right] using hv + have hvb := hkv s t x z v hzn hvP (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + rw [hrad] at hvb + rw [Real.norm_eq_abs,abs_mul] + apply mul_le_mul (hf _ ⟨hu.1.le,hu.2⟩ _ v) _ (abs_nonneg _) hA + exact ((abs_add_le _ _).trans (add_le_add (hs v hvP) hvb)).trans + ((inverse_source_majorant (by positivity) hKv hgpos hzpos (hzr.1.le.trans (hRt.le.trans (htU.trans hUH)))).trans + (div_le_div_of_nonneg_right (source_volterra_factor (by positivity) hKv hgpos hH) (sq_nonneg _)))) + exact hh.trans_eq (by simp only [Measure.real,Measure.restrict_apply_univ,L,V]; ring) + have hh := kernel_volterra_norm_subset (hε.le.trans (hεR.trans hRt.le)) hL + (measurableSet_ball.diff measurableSet_ball) + (show ball (0:Vec) R \ ball (0:Vec) ε ⊆ ball (0:Vec) t from fun z hz => ball_subset_ball hRt.le hz.1) + (g:=fun u => 1+g u) (continuous_const.add hg) + (fun u hu => by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity) + (fun z hz _ => hb z hz) + rw [Real.norm_eq_abs] at hh + exact hh.trans_eq (by dsimp [C,L]; ring) + +lemma electric_source_annulus_gradient_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H ε R : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → 0<ε → ε≤R → R by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity)) + have hBR : B*R≤B*H := mul_le_mul_of_nonneg_left hRH hB + have hBe : B*ε≤B*H := mul_le_mul_of_nonneg_left heH hB + have hBW : 0≤B*((1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := mul_nonneg hB hW + have hCH := mul_nonneg hC hH + nlinarith + +lemma electric_source_particle_gradient_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) + (hA : 0≤A) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U t H N : ℝ) (x : Vec) (g : ℝ → ℝ), + 0 s.f (u,z,v)) y‖≤N) → + |∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)|≤C*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + obtain ⟨C,hC,hb⟩ := electric_source_annulus_gradient_volterra_bound P A M e i hA + refine ⟨C,hC,?_⟩ + intro s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN + apply norm_integral_ball_of_annulus_bound ht + (source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN) + intro ε R hε hεR hRt + exact hb s U t H ε R x g (ht.le.trans (htU.trans hUH)) hg hg0 hε hεR hRt htU hUH + hf hE hB hc heq hfA hP hEB hDF + +lemma source_receiver_packet_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t : ℝ) (g : ℝ → ℝ),t≤U → (∀ u∈Icc (0:ℝ) U,0≤g u) → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤g u ∧ ‖fderiv ℝ s.B (u,y)‖≤g u) → + ∀ x z v : Vec,z≠0 → ‖z‖ linarith [norm_nonneg z] + have hQ : 0≤g (t-coneRadius 0 z) := hg0 _ ⟨hu.1.le,hu.2⟩ + have hd := hkb s t x z v e hE hB hz hu.1 hv (hEB _ ⟨hu.1.le,hu.2⟩ _).1 (hEB _ ⟨hu.1.le,hu.2⟩ _).2 + have hd' : |fderiv ℝ (sourceReceiverKernel s t i) (x,z,v) (e,0,0)|≤K/‖z‖*g (t-coneRadius 0 z)*‖e‖ := by + rw [←retarded_packet_spatial_fderiv + ((sourceReceiverKernel_contDiffAt i hE hB (p:=(x,z,v)) hz hu.1).differentiableAt (by simp)) e] + exact hd.trans (by gcongr; exact max_le (hDF _ hu _).1 (hDF _ hu _).2) + exact (by + dsimp [sourceReceiverParticlePacket] + rw [abs_mul] + exact (mul_le_mul hd' (hfA _ ⟨hu.1.le,hu.2⟩ _ _) (abs_nonneg _) (by positivity)).trans_eq (by simp only [coneRadius,zero_sub,norm_neg]; ring)) + +lemma electric_source_receiver_integral_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H : ℝ) (x : Vec) (g : ℝ → ℝ), + 0≤t → t≤U → U≤H → Continuous g → (∀ u∈Icc (0:ℝ) U,0≤g u) → + ContDiffOn ℝ 1 s.E fieldHalfSpace → ContDiffOn ℝ 1 s.B fieldHalfSpace → + (∀ u∈Icc (0:ℝ) U, ∀ y v, |s.f (u,y,v)|≤A) → + (∀ u∈Icc (0:ℝ) U, ∀ y v, P<‖v‖ → s.f (u,y,v)=0) → + (∀ u∈Icc (0:ℝ) U, ∀ y, ‖s.E (u,y)‖≤M ∧ ‖s.B (u,y)‖≤M) → + (∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤g u ∧ ‖fderiv ℝ s.B (u,y)‖≤g u) → + |∫ z in ball (0:Vec) t,∫ v,sourceReceiverParticlePacket s t e i (x,z,v)|≤ + C*H*(∫ u in Icc (0:ℝ) t,g u) := by + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_volterra_bound P A M e i hA + let V := volume.real (closedBall (0:Vec) P) + have hV : 0≤V := by dsimp [V]; positivity + refine ⟨4*Real.pi*V*K,by positivity,?_⟩ + intro s U t H x g ht htU hUH hg hg0 hE hB hfA hP hEB hDF + have hH : 0≤H := ht.trans (htU.trans hUH) + rw [←Real.norm_eq_abs] + apply (kernel_volterra_norm_subset ht (C:=V*K*H) (by positivity) measurableSet_ball + (Subset.rfl) hg (fun u hu => hg0 u ⟨hu.1,hu.2.trans htU⟩) ?_).trans_eq (by ring) + intro z hz hz0 + have hzt : ‖z‖ linarith [norm_nonneg z] + have hgu : 0≤g (t-‖z‖) := by simpa only [coneRadius,zero_sub,norm_neg] using hg0 _ hu + have hh := norm_velocity_integral_bound (P:=P) (g:=fun v => sourceReceiverParticlePacket s t e i (x,z,v)) + (fun v hv => by simp only [sourceReceiverParticlePacket,hP _ hu _ v hv,mul_zero]) + (hkb s U t g htU hg0 hE hB hfA hEB hDF x z · hz0 hzt) + apply hh.trans + change V*(K*g (t-‖z‖)/‖z‖)≤_ + have hn : ‖z‖≠0 := norm_ne_zero_iff.mpr hz0 + calc + _ = (V*K*g (t-‖z‖)*‖z‖)/‖z‖^2 := by field_simp + _ ≤ (V*K*g (t-‖z‖)*H)/‖z‖^2 := by gcongr; exact hzt.le.trans (htU.trans hUH) + _ = _ := by ring + +lemma electric_source_deriv_volterra_bound (P A M : ℝ) (e : Vec) (i : Fin 3) (hA : 0≤A) : + ∃ C : ℝ,0≤C ∧ ∀ (s : Solution) (U t H N : ℝ) (x : Vec) (g : ℝ → ℝ), + 0 s.f (u,z,v)) y‖≤N) → + |deriv (fun q : ℝ => ∫ z in ball (0:Vec) t,∫ v, + sourceConeCoefficient s t (x+q • e) i (z,v)*s.f (t-coneRadius 0 z,(x+q • e)+z,v)) 0|≤ + C*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + obtain ⟨C₁,hC₁,hb₁⟩ := electric_source_particle_gradient_volterra_bound P A M e i hA + obtain ⟨C₂,hC₂,hb₂⟩ := electric_source_receiver_integral_volterra_bound P A M e i hA + obtain ⟨K,hK,hkb⟩ := source_receiver_packet_bound P A M e i hA + refine ⟨C₁+C₂,by positivity,?_⟩ + intro s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN + obtain ⟨Q₀,hQ₀⟩ := isCompact_Icc.exists_bound_of_continuousOn (f:=g) hg.continuousOn + let Q := max Q₀ 0 + have hQ : 0≤Q := le_max_right _ _ + have hDFconst : ∀ u∈Ioc (0:ℝ) U, ∀ y, ‖fderiv ℝ s.E (u,y)‖≤Q ∧ ‖fderiv ℝ s.B (u,y)‖≤Q := by + intro u hu y + have hh : g u≤Q := (le_abs_self _).trans ((hQ₀ u ⟨hu.1.le,hu.2⟩).trans (le_max_left _ _)) + exact ⟨(hDF u hu y).1.trans hh,(hDF u hu y).2.trans hh⟩ + have hH : 0≤H := ht.le.trans (htU.trans hUH) + have hprop (z : Vec) (hz : ‖z‖ linarith [norm_nonneg z] + let R := sourceReceiverParticlePacket s t e i + let F := fun p : Vec × Phase => fderiv ℝ (sourceWeightedPacket s t i) p (e,0,0) + have hRc : ∀ p : Vec × Phase,p.2.1≠0 → ‖p.2.1‖ sourceReceiverParticlePacket_continuousAt e i hf hE hB hp hpt + have hRz : ∀ x z v : Vec,z≠0 → ‖z‖ sourceWeightedPacket_contDiffAt i hf hE hB hp (hprop p.2.1 hpt).1 + have hWz : ∀ x z v : Vec,z≠0 → ‖z‖ retarded_packet_derivative_zero hweighted hWz x z v e hz hzt hv + have hRi := retarded_packet_integrable x hRc hRz (hkb s U t Q htU hQ hE hB hfA hEB hDFconst) + have hPi := source_particle_derivative_integrable x e i ht htU hf hN hE hB hEB hP hfN + have hsplit : (∫ z in ball (0:Vec) t,∫ v,F (x,z,v))= + (∫ z in ball (0:Vec) t,∫ v,R (x,z,v))+ + (∫ z in ball (0:Vec) t,∫ v,sourceConeCoefficient s t x i (z,v)* + fderiv ℝ s.f (t-coneRadius 0 z,x+z,v) (0,e,0)) := by + rw [←integral_add hRi hPi] + apply integral_congr_ae + filter_upwards [ae_restrict_mem measurableSet_ball,ae_restrict_of_ae (volume.ae_ne (0:Vec))] with z hz hz0 + have hzt : ‖z‖ by + dsimp [F,R,sourceReceiverParticlePacket] + rw [sourceWeightedPacket_fderiv x z v e i hf hE hB hz0 (hprop z hzt).1] + ring) + linarith + rw [(hasDerivAt_electric_source_integral x e i 0 htU hf hE hB hA hN hQ hP hfA hEB hDFconst hfN).deriv] + simp only [zero_smul,add_zero] + change |∫ z in ball (0:Vec) t,∫ v,F (x,z,v)|≤_ + rw [hsplit] + apply (abs_add_le _ _).trans + apply (add_le_add (hb₂ s U t H x g ht.le htU hUH hg hg0 hE hB hfA hP hEB hDF) + (hb₁ s U t H N x g ht htU hUH hg hg0 hN hf hE hB hc heq hfA hP hEB hDF hfN)).trans + have hJ : 0≤∫ u in Icc (0:ℝ) t,1+g u := setIntegral_nonneg measurableSet_Icc + (fun u hu => by have hh := hg0 u ⟨hu.1,hu.2.trans htU⟩; positivity) + have hG : 0≤∫ u in Icc (0:ℝ) t,g u := setIntegral_nonneg measurableSet_Icc + (fun u hu => hg0 u ⟨hu.1,hu.2.trans htU⟩) + have hGJ : (∫ u in Icc (0:ℝ) t,g u)≤∫ u in Icc (0:ℝ) t,1+g u := + integral_mono hg.integrableOn_Icc (continuous_const.add hg).integrableOn_Icc (fun u => by linarith) + have hh : C₂*H*(∫ u in Icc (0:ℝ) t,g u)≤C₂*(H+(1+H)*(∫ u in Icc (0:ℝ) t,1+g u)) := by + have hmul : H*(∫ u in Icc (0:ℝ) t,g u)≤(1+H)*(∫ u in Icc (0:ℝ) t,1+g u) := by + gcongr; linarith + have hh' := mul_le_mul_of_nonneg_left (hmul.trans (le_add_of_nonneg_left hH)) hC₂ + nlinarith + nlinarith + +lemma uniform_normalised_integrand_curvature_horizon (A P L R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Icc (0:ℝ) R, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a : Vec → ℝ, ∀ E B : Vec → Vec, + (∀ x, |a x|≤A ∧ ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + CurvatureBound a Hf → CurvatureBound E H → CurvatureBound B H → + (∀ x y, |a y-a x|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => normalisedPhysicalIntegrand ((r,n,v),(a x,E x,B x))) + (C*(Hf+H+2*(M+N)^2)) := by + let K : Set (ℝ × Vec × Vec) := Icc (0:ℝ) R ×ˢ sphere (0:Vec) 1 ×ˢ closedBall (0:Vec) P + let S : Set (ℝ × Vec × Vec) := closedBall (0:ℝ) A ×ˢ closedBall (0:Vec) L ×ˢ closedBall (0:Vec) L + have hK : IsCompact K := isCompact_Icc.prod ((isCompact_sphere _ _).prod (isCompact_closedBall _ _)) + have hS : IsCompact S := (isCompact_closedBall _ _).prod + ((isCompact_closedBall _ _).prod (isCompact_closedBall _ _)) + have hc : Convex ℝ S := (convex_closedBall _ _).prod ((convex_closedBall _ _).prod (convex_closedBall _ _)) + obtain ⟨C,hC,hb⟩ := compact_parameter_curvature (X:=Vec) hK hS hc + (g:=normalisedPhysicalIntegrand) (fun q hq => normalisedPhysicalIntegrand_smoothAt + ((cone_denom_pos q.1.2.2 q.1.2.1 (mem_sphere_zero_iff_norm.mp hq.1.2.1)).ne')) + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL + apply hb (r,n,v) ⟨hr,mem_sphere_zero_iff_norm.mpr hn,mem_closedBall_zero_iff.mpr hv⟩ + (fun x => (a x,E x,B x)) + (fun x => ⟨by simpa only [mem_closedBall_zero_iff,Real.norm_eq_abs] using (hbnd x).1, + mem_closedBall_zero_iff.mpr (hbnd x).2.1,mem_closedBall_zero_iff.mpr (hbnd x).2.2⟩) + (Hf+H) (M+N) (add_nonneg hM hN) + · exact (ha.mono (le_add_of_nonneg_right hH)).prodMk + ((hE.mono (le_add_of_nonneg_left hHf)).prodMk (hB.mono (le_add_of_nonneg_left hHf))) + · intro x y + apply max_le + · exact (haL x y).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hN) (norm_nonneg _)) + · exact max_le (((hEBL x y).1).trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hM) (norm_nonneg _))) + ((hEBL x y).2.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hM) (norm_nonneg _))) + +lemma uniform_physical_integrand_curvature_horizon (A P L R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) R, ∀ n : Vec, ‖n‖=1 → + ∀ v : Vec, ‖v‖≤P → ∀ a : Vec → ℝ, ∀ E B : Vec → Vec, + (∀ x, |a x|≤A ∧ ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + CurvatureBound a Hf → CurvatureBound E H → CurvatureBound B H → + (∀ x y, |a y-a x|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => (a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))) + (C*(Hf+H+2*(M+N)^2)/r^2) := by + obtain ⟨C,hC,hb⟩ := uniform_normalised_integrand_curvature_horizon A P L R + refine ⟨C,hC,?_⟩ + intro r hr n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL x w + have hh := hb r ⟨hr.1.le,hr.2⟩ n hn v hv a E B hbnd Hf H M N hHf hH hM hN ha hE hB haL hEBL x w + simp only [normalisedPhysicalIntegrand_eq hr.1.ne'] at hh + rw [show (2:ℝ) • (r^2 • ((a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))))= + r^2 • ((2:ℝ) • ((a x*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x))))) by module, + ← smul_add,← smul_sub,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r)] at hh + rw [div_mul_eq_mul_div] + exact (le_div_iff₀ (sq_pos_of_pos hr.1)).mpr (by simpa only [mul_comm] using hh) + +lemma uniform_physical_integral_curvature_horizon (A P L R : ℝ) : + ∃ C : ℝ, 0≤C ∧ ∀ r∈Ioc (0:ℝ) R, ∀ n : Vec, ‖n‖=1 → + ∀ f : Vec → Vec → ℝ, (∀ x, Continuous (f x)) → (∀ x, HasCompactSupport (f x)) → + (∀ x v, |f x v|≤A) → (∀ x v, P<‖v‖ → f x v=0) → + ∀ E B : Vec → Vec, (∀ x, ‖E x‖≤L ∧ ‖B x‖≤L) → + ∀ Hf H M N : ℝ, 0≤Hf → 0≤H → 0≤M → 0≤N → + (∀ v, CurvatureBound (fun x => f x v) Hf) → CurvatureBound E H → CurvatureBound B H → + (∀ v x y, |f y v-f x v|≤M*‖y-x‖) → + (∀ x y, ‖E y-E x‖≤N*‖y-x‖ ∧ ‖B y-B x‖≤N*‖y-x‖) → + CurvatureBound (fun x => ∫ v : Vec, (f x v*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x)))) + (C*(Hf+H+2*(M+N)^2)/r^2) := by + obtain ⟨K,hK,hk⟩ := uniform_physical_integrand_curvature_horizon A P L R + refine ⟨K*volume.real (closedBall (0:Vec) P),by positivity,?_⟩ + intro r hr n hn f hf hc hab hs E B hEB Hf H M N hHf hH hM hN hfc hEc hBc hfL hEBL + let g : Vec → Vec → Vec := fun v x => (f x v*(1-dot n (velocity v))) • + physicalElectricKernel r n (velocity v) (fderiv ℝ velocity v (E x+cross (velocity v) (B x))) + have hint (x : Vec) : Integrable (fun v => g v x) := + integrable_physical_integrand (hf x) (hc x) hr.1.ne' hn (E x) (B x) + have he (x : Vec) : (∫ v in closedBall (0:Vec) P, g v x)=∫ v, g v x := by + apply setIntegral_eq_integral_of_forall_compl_eq_zero + intro v hv + simp only [g,hs x v (by simpa only [mem_closedBall_zero_iff,not_le] using hv),zero_mul,zero_smul] + let : IsFiniteMeasure (volume.restrict (closedBall (0:Vec) P)) := + ⟨by simpa only [Measure.restrict_apply_univ] using (isCompact_closedBall (0:Vec) P).measure_lt_top⟩ + have hbound : ∀ᵐ v ∂volume.restrict (closedBall (0:Vec) P), + CurvatureBound (g v) (K*(Hf+H+2*(M+N)^2)/r^2) := by + filter_upwards [ae_restrict_mem measurableSet_closedBall] with v hv + exact hk r hr n hn v (mem_closedBall_zero_iff.mp hv) (fun x => f x v) E B + (fun x => ⟨hab x v,hEB x⟩) Hf H M N hHf hH hM hN (hfc v) hEc hBc (hfL v) hEBL + have hh := CurvatureBound.integral (fun x => (hint x).restrict) hbound + simp only [he,Measure.real,Measure.restrict_apply_univ] at hh + convert hh using 1 + simp only [Measure.real] + ring + +end RVM +end + +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma boundary_integral_curvature_volterra {U W : Type*} + [NormedAddCommGroup U] [NormedSpace ℝ U] [NormedAddCommGroup W] [NormedSpace ℝ W] [CompleteSpace W] + {F : Vec → U → W} {a : U → W} {t C D : ℝ} {g : ℝ → ℝ} + (ht : 0≤t) (hC : 0≤C) (hg : Continuous g) (hg0 : ∀ u∈Icc (0:ℝ) t,0≤g u) + (hF : ∀ x, IntegrableOn (fun z => F z x) (ball (0:Vec) t)) + (ha : CurvatureBound a D) + (hFc : ∀ z : Vec, 0<‖z‖ → ‖z‖≤t → CurvatureBound (F z) (C*g (t-‖z‖)/‖z‖^2)) : + CurvatureBound (fun x => a x+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z x) + (D+C*(∫ u in Icc (0:ℝ) t,g u)) := by + intro x v + have hp : IntegrableOn (fun z => F z (x+v)+F z (x-v)) (ball (0:Vec) t) := (hF (x+v)).add (hF (x-v)) + have hm : IntegrableOn (fun z => (2:ℝ) • F z x) (ball (0:Vec) t) := (hF x).smul (2:ℝ) + have he : (a (x+v)+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z (x+v))+ + (a (x-v)+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z (x-v))- + (2:ℝ) • (a x+(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, F z x)= + (a (x+v)+a (x-v)-(2:ℝ) • a x)+(4*Real.pi)⁻¹ • + ∫ z in ball (0:Vec) t, (F z (x+v)+F z (x-v)-(2:ℝ) • F z x) := by + rw [integral_sub hp hm,integral_add (hF (x+v)) (hF (x-v)),integral_smul] + module + rw [he] + have hb := kernel_volterra_norm_subset (F:=fun z => F z (x+v)+F z (x-v)-(2:ℝ) • F z x) + ht (show 0≤C*‖v‖^2 by positivity) measurableSet_ball (Subset.refl _) hg hg0 (by + intro z hz hz0 + exact (hFc z (norm_pos_iff.mpr hz0) (mem_ball_zero_iff.mp hz).le x v).trans_eq (by ring)) + have hscale : ‖(4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t, + (F z (x+v)+F z (x-v)-(2:ℝ) • F z x)‖≤C*(∫ u in Icc (0:ℝ) t,g u)*‖v‖^2 := by + rw [norm_smul,Real.norm_of_nonneg (by positivity : 0≤(4*Real.pi)⁻¹)] + exact (mul_le_mul_of_nonneg_left hb (by positivity)).trans_eq (by field_simp) + exact ((norm_add_le _ _).trans (add_le_add (ha x v) hscale)).trans_eq (by ring) + +lemma retarded_density_curvature_volterra (A P L M N R : ℝ) (hM : 0≤M) (hN : 0≤N) : + ∃ C : ℝ, 0≤C ∧ ∀ (s : Solution) (U : ℝ) (g : ℝ → ℝ), U≤R → + RegularParticle s.f → + (∀ r∈Icc (0:ℝ) U,0≤g r) → + (∀ r∈Icc (0:ℝ) U,∀ x v,|s.f (r,x,v)|≤A) → + (∀ r∈Icc (0:ℝ) U,∀ x v,P<‖v‖ → s.f (r,x,v)=0) → + (∀ r∈Icc (0:ℝ) U,∀ x,‖s.E (r,x)‖≤L ∧ ‖s.B (r,x)‖≤L) → + (∀ r∈Icc (0:ℝ) U,∀ v,CurvatureBound (fun x => s.f (r,x,v)) (g r)) → + (∀ r∈Icc (0:ℝ) U,CurvatureBound (fun x => s.E (r,x)) (g r) ∧ CurvatureBound (fun x => s.B (r,x)) (g r)) → + (∀ r∈Icc (0:ℝ) U,∀ v x y,|s.f (r,y,v)-s.f (r,x,v)|≤M*‖y-x‖) → + SpatialFieldLip U N s.E s.B → + ∀ t∈Icc (0:ℝ) U,∀ z : Vec,0<‖z‖ → ‖z‖≤t → + CurvatureBound (fun x => retardedElectricDensity s t x (x+z)) (C*(1+g (t-‖z‖))/‖z‖^2) ∧ + CurvatureBound (fun x => retardedMagneticDensity s t x (x+z)) (C*(1+g (t-‖z‖))/‖z‖^2) := by + obtain ⟨C,hC,hk⟩ := uniform_physical_integral_curvature_horizon A P L R + refine ⟨C*(2+2*(M+N)^2),by positivity,?_⟩ + intro s U g hUR hreg hg0 hab hs hEB hfc hEBc hfL hEBL t ht z hz hzt + have htime : t-‖z‖∈Icc (0:ℝ) U := ⟨by linarith,by linarith [ht.2,norm_nonneg z]⟩ + have hn : ‖-(‖z‖⁻¹ • z)‖=1 := by + simpa only [coneDirection,coneRadius,sub_zero,zero_sub,norm_neg,smul_neg] using coneDirection_norm (x:=(0:Vec)) (y:=z) (norm_pos_iff.mp hz).symm + have hslice (x : Vec) := hreg.slice htime.1 x + have he : CurvatureBound (fun x => retardedElectricDensity s t x (x+z)) + (C*(g (t-‖z‖)+g (t-‖z‖)+2*(M+N)^2)/‖z‖^2) := by + simp only [retardedElectricDensity,coneRadius_add,coneDirection_add] + exact hk ‖z‖ ⟨hz,hzt.trans (ht.2.trans hUR)⟩ _ hn (fun x v => s.f (t-‖z‖,x+z,v)) + (fun x => (hslice (x+z)).1.continuous) (fun x => (hslice (x+z)).2) + (fun x v => hab _ htime (x+z) v) (fun x v hv => hs _ htime (x+z) v hv) + (fun x => s.E (t-‖z‖,x+z)) (fun x => s.B (t-‖z‖,x+z)) (fun x => hEB _ htime (x+z)) + _ _ M N (hg0 _ htime) (hg0 _ htime) hM hN (fun v => (hfc _ htime v).translate z) + ((hEBc _ htime).1.translate z) ((hEBc _ htime).2.translate z) + (fun v x y => by simpa only [add_sub_add_right_eq_sub] using hfL _ htime v (x+z) (y+z)) + (fun x y => by simpa only [add_sub_add_right_eq_sub] using hEBL _ htime (x+z) (y+z)) + have hm : C*(g (t-‖z‖)+g (t-‖z‖)+2*(M+N)^2)/‖z‖^2≤ + (C*(2+2*(M+N)^2))*(1+g (t-‖z‖))/‖z‖^2 := by + apply div_le_div_of_nonneg_right _ (sq_nonneg _) + nlinarith [mul_nonneg (mul_nonneg hC (sq_nonneg (M+N))) (hg0 _ htime)] + have he' := he.mono hm + refine ⟨he',?_⟩ + simpa only [retardedMagneticDensity,coneDirection_add,hn,one_mul] using he'.cross_const_left (-(‖z‖⁻¹ • z)) + +lemma classical_fields_curvature_volterra_bound {d : Datum} (hd : Admissible d) + (A P L M N R : ℝ) (hM : 0≤M) (hN : 0≤N) (hR : 0≤R) : + ∃ D K : ℝ,0≤D ∧ 0≤K ∧ ∀ (s : Solution) (U t : ℝ) (g : ℝ → ℝ), + ClassicalBefore d s U → SmoothOnFiniteHorizons s → 0 s.f (r,x,v)) (g r)) → + (∀ r∈Icc (0:ℝ) U,CurvatureBound (fun x => s.E (r,x)) (g r) ∧ CurvatureBound (fun x => s.B (r,x)) (g r)) → + (∀ r∈Icc (0:ℝ) U,∀ v x y,|s.f (r,y,v)-s.f (r,x,v)|≤M*‖y-x‖) → + SpatialFieldLip U N s.E s.B → + CurvatureBound (fun x => s.E (t,x)) (D+K*(∫ r in Icc (0:ℝ) t,1+g r)) ∧ + CurvatureBound (fun x => s.B (t,x)) (D+K*(∫ r in Icc (0:ℝ) t,1+g r)) := by + obtain ⟨K,hK,hden⟩ := retarded_density_curvature_volterra A P L M N R hM hN + obtain ⟨J,hJ,hJi,hJb⟩ := datum_boundary_global_jets_horizon hd R hR 2 + refine ⟨2*J,K,by positivity,hK,?_⟩ + intro s U t g hs hm ht htU hUR hg hg0 hab hP hEB hfc hEBc hfL hEBL + have hdt := hden s U g hUR ⟨hs.1,hs.2.2.2.2.2.2.1⟩ hg0 hab hP hEB hfc hEBc hfL hEBL t ⟨ht.le,htU.le⟩ + have hsub : Icc (0:ℝ) t ⊆ Icc (0:ℝ) U := fun r hr => ⟨hr.1,hr.2.trans htU.le⟩ + have hgb : ∀ r∈Icc (0:ℝ) t,0≤1+g r := fun r hr => by have := hg0 r (hsub hr); linarith + have hglob : Continuous (fun r => 1+g r) := continuous_const.add hg + have heq : (fun x => s.E (t,x))=(fun x => electricBoundaryField (datumBoundarySolution d) t x+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t,retardedElectricDensity s t x (x+z)) := by + funext x + rw [classical_electric_physical_vector_before hs hm ht htU x] + congr 1 + ext i + exact classical_electricConeBoundary_datum_before hs ht x i + have hbq : (fun x => s.B (t,x))=(fun x => magneticBoundaryField (datumBoundarySolution d) t x+ + (4*Real.pi)⁻¹ • ∫ z in ball (0:Vec) t,retardedMagneticDensity s t x (x+z)) := by + funext x + rw [classical_magnetic_physical_vector_before hs hm ht htU x] + congr 1 + ext i + exact classical_magneticConeBoundary_datum_before hs ht x i + rw [heq,hbq] + have hb := hJb t ⟨ht,htU.le.trans hUR⟩ + constructor + · exact boundary_integral_curvature_volterra ht.le hK hglob hgb + (fun x => integrableOn_retardedElectricDensity_le hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 ht.le le_rfl x) + (curvature_of_second_derivative_bound hb.1.1 hJ (fun x => (hb.2 x).1)) (fun z hz hzt => (hdt z hz hzt).1) + · exact boundary_integral_curvature_volterra ht.le hK hglob hgb + (fun x => integrableOn_retardedMagneticDensity_le hs.1 hs.2.1 hs.2.2.1 hs.2.2.2.2.2.2.1 ht.le le_rfl x) + (curvature_of_second_derivative_bound hb.1.2 hJ (fun x => (hb.2 x).2)) (fun z hz hzt => (hdt z hz hzt).2) + +end RVM + +end + +end OAI diff --git a/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraMajorant.lean b/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraMajorant.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd6c6f5ac1c7c24afd836565a4de2cbf5b29767c --- /dev/null +++ b/lean/OAI/Analysis/VlasovMaxwell/Retarded/VolterraMajorant.lean @@ -0,0 +1,54 @@ +import Mathlib + +namespace OAI + +noncomputable section +open Set Filter Metric MeasureTheory +open scoped Topology ContDiff + +namespace RVM + +lemma exists_tame_volterra_majorant {D C F : ℝ} (hD : 0≤D) (hC : 0≤C) (hF : 0≤F) : + ∃ H : ℝ → ℝ, Continuous H ∧ Monotone H ∧ (∀ t, 0≤t → 1≤H t) ∧ + ∀ t, 0≤t → D+C*(∫ u in Icc (0:ℝ) t, 1+(F+1)*(1+H u))≤H t := by + let ell := 2*C*(F+2)+1 + let H : ℝ → ℝ := fun t => (D+1)*Real.exp (ell*t) + have hell : 0≤ell := by dsimp [ell]; positivity + have hH : Continuous H := continuous_const.mul (Real.continuous_exp.comp (continuous_const.mul continuous_id)) + have hmon : Monotone H := fun a b hab => mul_le_mul_of_nonneg_left + (Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left hab hell)) (by positivity) + have hH1 (t : ℝ) (ht : 0≤t) : 1≤H t := by + have h0 : H 0=D+1 := by simp [H] + have hh := hmon ht + rw [h0] at hh + linarith + have hd (t : ℝ) : HasDerivAt H (ell*H t) t := by + convert (((Real.hasDerivAt_exp (ell*t)).comp t ((hasDerivAt_id t).const_mul ell)).const_mul (D+1)) using 1 + · rfl + · dsimp [H] + ring + refine ⟨H,hH,hmon,hH1,?_⟩ + intro t ht + have hb (u : ℝ) (hu : 0≤u) : C*(1+(F+1)*(1+H u))≤ell*H u := by + have h1 := hH1 u hu + have hfirst : 1+(F+1)*(1+H u)≤(F+2)*(1+H u) := by linarith + have hsecond : (F+2)*(1+H u)≤2*(F+2)*H u := by nlinarith [mul_nonneg (by linarith : 0≤F+2) (by linarith : 0≤H u-1)] + calc + C*(1+(F+1)*(1+H u))≤C*(2*(F+2)*H u) := mul_le_mul_of_nonneg_left (hfirst.trans hsecond) hC + _ ≤ ell*H u := by dsimp [ell]; nlinarith + have hleft : Continuous (fun u => C*(1+(F+1)*(1+H u))) := by fun_prop + have hright : Continuous (fun u => ell*H u) := continuous_const.mul hH + have hi := setIntegral_mono_on (μ:=volume) (hleft.continuousOn.integrableOn_compact isCompact_Icc) + (hright.continuousOn.integrableOn_compact isCompact_Icc) measurableSet_Icc + (fun u (hu : u∈Icc (0:ℝ) t) => hb u hu.1) + have he : (∫ u in Icc (0:ℝ) t, ell*H u)=H t-(D+1) := by + rw [integral_Icc_eq_integral_Ioc,←intervalIntegral.integral_of_le ht, + intervalIntegral.integral_eq_sub_of_hasDerivAt (fun u _ => hd u) (hright.intervalIntegrable 0 t)] + simp [H] + rw [integral_const_mul,he] at hi + linarith + +end RVM +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/AbsorptionCriteria.lean b/lean/OAI/Analysis/WeakInfiniteness/AbsorptionCriteria.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2af5fb0e6e60adeec78cd6263525a081229bcc8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/AbsorptionCriteria.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralExactPair +import OAI.Analysis.WeakInfiniteness.CentralOInfinityCopies +import OAI.Analysis.WeakInfiniteness.HalfFlipCriterion + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +universe u + +def oInfinityAbsorptionEquiv_of_contractiveDiagonalization + (A : Type u) [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + [SeparableSpace A] (h : ContractiveIdentityDiagonalization A) + (hflip : ApproximateHalfFlip OInfinity) : + A ≃⋆ₐ[ℂ] MinimalTensor A OInfinity := + oInfinityAbsorptionEquiv_of_elementaryIntertwining A + (elementaryUnitaryIntertwining_of_centralCopies_halfFlip + h.centralExactCuntzPair.approximatelyCentralCopies hflip) + +lemma oInfinity_no_character (φ : OInfinity →⋆ₐ[ℂ] ℂ) : False := by + let r := φ (oInfinityIsometry 0) + let s := φ (oInfinityIsometry 1) + have hr : star r*r=1 := by + dsimp only [r] + rw [← map_star,← map_mul,oInfinityIsometry_relations,ite_eq_left rfl,map_one] + have hs : star s*s=1 := by + dsimp only [s] + rw [← map_star,← map_mul,oInfinityIsometry_relations,ite_eq_left rfl,map_one] + have hrs : star r*s=0 := by + dsimp only [r,s] + rw [← map_star,← map_mul,oInfinityIsometry_relations,ite_eq_right (by omega),map_zero] + rcases mul_eq_zero.mp hrs with h | h + · rw [h,zero_mul] at hr + exact zero_ne_one hr + · rw [h,mul_zero] at hs + exact zero_ne_one hs + +lemma oInfinity_no_unital_map_into_forcedUnitization + (A : Type u) [NonUnitalCStarAlgebra A] + (φ : OInfinity →⋆ₐ[ℂ] Unitization ℂ A) : False := by + let χ : Unitization ℂ A →⋆ₐ[ℂ] ℂ := + { Unitization.fstHom ℂ A with map_star' := Unitization.fst_star } + exact oInfinity_no_character (χ.comp φ) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/AlgebraicTensorSpan.lean b/lean/OAI/Analysis/WeakInfiniteness/AlgebraicTensorSpan.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9cdb11614de9949584a7727eebe3ec0cba95243 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/AlgebraicTensorSpan.lean @@ -0,0 +1,93 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +universe u v + +section AlgebraicSpan + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +def linearStarSpan (S : Set A) (hm : ∀ x ∈ S, ∀ y ∈ S, x * y ∈ S) + (hs : ∀ x ∈ S, star x ∈ S) : NonUnitalStarSubalgebra ℂ A where + carrier := Submodule.span ℂ S + zero_mem' := Submodule.zero_mem _ + add_mem' := Submodule.add_mem _ + smul_mem' c _ hx := Submodule.smul_mem _ c hx + mul_mem' {a} {b} ha hb := by + change a * b ∈ Submodule.span ℂ S + induction ha using Submodule.span_induction with + | mem x hx => + induction hb using Submodule.span_induction with + | mem y hy => exact Submodule.subset_span (hm x hx y hy) + | zero => simp + | add x y _ _ hpx hpy => rw [mul_add]; exact Submodule.add_mem _ hpx hpy + | smul c x _ hpx => rw [mul_smul_comm]; exact Submodule.smul_mem _ c hpx + | zero => simp + | add x y _ _ hpx hpy => rw [add_mul]; exact Submodule.add_mem _ hpx hpy + | smul c x _ hpx => rw [smul_mul_assoc]; exact Submodule.smul_mem _ c hpx + star_mem' {a} ha := by + change star a ∈ Submodule.span ℂ S + induction ha using Submodule.span_induction with + | mem x hx => exact Submodule.subset_span (hs x hx) + | zero => simp + | add x y _ _ hpx hpy => rw [star_add]; exact Submodule.add_mem _ hpx hpy + | smul c x _ hpx => rw [star_smul]; exact Submodule.smul_mem _ (star c) hpx + +lemma linearStarSpan_eq_adjoin (S : Set A) (hm : ∀ x ∈ S, ∀ y ∈ S, x * y ∈ S) + (hs : ∀ x ∈ S, star x ∈ S) : + linearStarSpan S hm hs = NonUnitalStarAlgebra.adjoin ℂ S := by + apply le_antisymm + · change Submodule.span ℂ S ≤ (NonUnitalStarAlgebra.adjoin ℂ S).toNonUnitalSubalgebra.toSubmodule + exact Submodule.span_le.mpr (NonUnitalStarAlgebra.subset_adjoin ℂ S) + · exact NonUnitalStarAlgebra.adjoin_le (fun _ hx => Submodule.subset_span hx) + +lemma closure_adjoin_eq_closure_span (S : Set A) (hm : ∀ x ∈ S, ∀ y ∈ S, x * y ∈ S) + (hs : ∀ x ∈ S, star x ∈ S) : + closure (NonUnitalStarAlgebra.adjoin ℂ S : Set A) = + closure (Submodule.span ℂ S : Set A) := by + rw [← linearStarSpan_eq_adjoin S hm hs] + rfl + +end AlgebraicSpan + +section TensorSpan + +variable {A : Type u} {B C : Type v} [NonUnitalCStarAlgebra A] + [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +lemma minimalTensor_eq_closure_span : + (minimalTensorSubalgebra A B : Set (SpatialAmbient A B)) = + closure (Submodule.span ℂ (Set.range fun p : A × B => spatialElementary p.1 p.2) : Set (SpatialAmbient A B)) := by + apply closure_adjoin_eq_closure_span + · rintro _ ⟨⟨a,b⟩,rfl⟩ _ ⟨⟨c,d⟩,rfl⟩ + exact ⟨(a*c,b*d), spatialElementary_mul a c b d⟩ + · rintro _ ⟨⟨a,b⟩,rfl⟩ + exact ⟨(star a, star b), spatialElementary_star a b⟩ + +lemma tensorKernelIdeal_eq_closure_span (q : B →⋆ₙₐ[ℂ] C) : + (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A B)) = + closure (Submodule.span ℂ {z | ∃ a : A, ∃ b : B, q b = 0 ∧ z = spatialElementary a b} : + Set (SpatialAmbient A B)) := by + apply closure_adjoin_eq_closure_span + · rintro _ ⟨a,b,hb,rfl⟩ _ ⟨c,d,hd,rfl⟩ + exact ⟨a*c,b*d,by rw [map_mul,hb,zero_mul], (spatialElementary_mul a c b d).symm⟩ + · rintro _ ⟨a,b,hb,rfl⟩ + exact ⟨star a,star b,by rw [map_star,hb,star_zero], (spatialElementary_star a b).symm⟩ + +end TensorSpan + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/AnnihilatorStates.lean b/lean/OAI/Analysis/WeakInfiniteness/AnnihilatorStates.lean new file mode 100644 index 0000000000000000000000000000000000000000..b837b6d8f56c3306ce4cebb4e09f40b7c9502576 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/AnnihilatorStates.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.InvariantSubspaces + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +universe u v + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma realState_nonneg {f : WeakDual ℝ (selfAdjoint A)} (hf : f ∈ realStateSpace A) + {a : A} (ha : 0 ≤ a) : 0 ≤ f ⟨a,ha.isSelfAdjoint⟩ := by + have h := (realStateComplexification f hf).map_nonneg ha + rw [realStateComplexification_apply f hf ⟨a,ha.isSelfAdjoint⟩] at h + exact (Complex.le_def.mp h).1 + +def annihilatorStates (S : Set A) : Set (WeakDual ℝ (selfAdjoint A)) := + {f | f ∈ realStateSpace A ∧ ∀ x ∈ S,∀ a : A, + f ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0} + +lemma annihilatorStates_isCompact (S : Set A) : IsCompact (annihilatorStates S) := by + apply (realStateSpace_isCompact A).inter_right + show IsClosed {f : WeakDual ℝ (selfAdjoint A) | ∀ x ∈ S,∀ a : A, + f ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0} + have he : {f : WeakDual ℝ (selfAdjoint A) | ∀ x ∈ S,∀ a : A, + f ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0} = + ⋂ x : A,⋂ _hx : x ∈ S,⋂ a : A,{f : WeakDual ℝ (selfAdjoint A) | + f ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0} := by + ext f + simp only [Set.mem_iInter,Set.mem_ofPred_eq] + rw [he] + exact isClosed_iInter (fun x : A => isClosed_iInter (fun _hx : x ∈ S => + isClosed_iInter (fun a : A => isClosed_eq + (WeakDual.eval_continuous (⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩ : selfAdjoint A)) + (continuous_const : Continuous (fun _ : WeakDual ℝ (selfAdjoint A) => (0 : ℝ)))))) + +lemma annihilatorStates_isExtreme (S : Set A) : IsExtreme ℝ (realStateSpace A) (annihilatorStates S) := by + constructor + · exact fun _ hf => hf.1 + · intro g hg k hk f hf hseg + obtain ⟨t,s,ht,hs,hts,he⟩ := hseg + have hz : ∀ x ∈ S,∀ a : A,g ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0 := by + intro x hx a + have hv := DFunLike.congr_fun he ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩ + change t*g _+s*k _=f _ at hv + rw [hf.2 x hx a] at hv + have hg0 := realState_nonneg hg (star_mul_self_nonneg (x*a)) + have hk0 := realState_nonneg hk (star_mul_self_nonneg (x*a)) + nlinarith + exact ⟨hg,hz⟩ + +lemma annihilatorStates_gns_zero {S : Set A} {f : WeakDual ℝ (selfAdjoint A)} + (hf : f ∈ annihilatorStates S) {x : A} (hx : x ∈ S) : + (realStateComplexification f hf.1).gnsStarAlgHom x=0 := by + let Φ := realStateComplexification f hf.1 + let Ω := gnsCyclicVector Φ + have hzero : ∀ η : Φ.GNS,Φ.gnsStarAlgHom x η=0 := + isClosed_property (gnsAction_cyclic_dense Φ) + (isClosed_eq (Φ.gnsStarAlgHom x).continuous continuous_const) (by + intro a + have he := DFunLike.congr_fun (gns_vectorFunctional_eq f hf.1) + ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩ + change representationVectorFunctional Φ.gnsStarAlgHom Ω _=f _ at he + rw [representationVectorFunctional_square,hf.2 x hx a] at he + have hn : Φ.gnsStarAlgHom (x*a) Ω=0 := norm_eq_zero.mp (sq_eq_zero_iff.mp he) + simpa only [map_mul,mul_apply_eq_comp] using hn) + ext η + exact hzero η + +theorem exists_extreme_annihilator_state {S : Set A} {g : WeakDual ℝ (selfAdjoint A)} + (hg : g ∈ annihilatorStates S) (b : selfAdjoint A) : + ∃ f ∈ (realStateSpace A).extremePoints ℝ, + f ∈ annihilatorStates S ∧ g b ≤ f b := by + let F := annihilatorStates S + let T := {f ∈ F | ∀ h ∈ F,h b ≤ f b} + have hT : T.Nonempty := by + obtain ⟨f,hf,hm⟩ := (annihilatorStates_isCompact S).exists_isMaxOn ⟨g,hg⟩ + (WeakDual.eval_continuous b).continuousOn + exact ⟨f,hf,hm⟩ + have he : IsExposed ℝ F T := by + intro _ + exact ⟨realStateEvaluation b,rfl⟩ + let : LocallyConvexSpace ℝ (WeakDual ℝ (selfAdjoint A)) := + inferInstanceAs (LocallyConvexSpace ℝ (WeakBilin (topDualPairing ℝ (selfAdjoint A)))) + obtain ⟨f,hf⟩ := (he.isCompact (annihilatorStates_isCompact S)).extremePoints_nonempty hT + refine ⟨f,(annihilatorStates_isExtreme S).extremePoints_subset_extremePoints + (he.isExtreme.extremePoints_subset_extremePoints hf),hf.1.1,hf.1.2 g hg⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ApproximateCut.lean b/lean/OAI/Analysis/WeakInfiniteness/ApproximateCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd2d01539f6e0478655d31a7f28168599821644f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ApproximateCut.lean @@ -0,0 +1,40 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section Ordered + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma norm_sub_mul_of_pos_contraction (x y : A) (hy : 0 ≤ y) (hyn : ‖y‖ ≤ 1) : + ‖x - x * y‖ ≤ ‖x‖ := by + have hy' : 0 ≤ (y : Unitization ℂ A) := Unitization.inr_nonneg_iff.mpr hy + have hyp : (y : Unitization ℂ A) ≤ 1 := + (norm_le_one_iff_of_nonneg _ hy').mp (by simpa only [Unitization.norm_inr] using hyn) + have hn : ‖(1 : Unitization ℂ A) - y‖ ≤ 1 := + (norm_le_one_iff_of_nonneg _ (sub_nonneg.mpr hyp)).mpr (by simpa using hy') + calc + ‖x - x * y‖ = ‖(x : Unitization ℂ A) * (1 - y)‖ := by + rw [mul_sub, mul_one, ← Unitization.inr_mul, ← Unitization.inr_sub, Unitization.norm_inr] + _ ≤ ‖(x : Unitization ℂ A)‖ * ‖(1 : Unitization ℂ A) - y‖ := norm_mul_le _ _ + _ ≤ ‖(x : Unitization ℂ A)‖ * 1 := mul_le_mul_of_nonneg_left hn (norm_nonneg _) + _ = ‖x‖ := by rw [mul_one,Unitization.norm_inr] + +end Ordered + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/BoundedImplementation.lean b/lean/OAI/Analysis/WeakInfiniteness/BoundedImplementation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1970588e70abeabcfe48f93f12770fb184bfb47e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/BoundedImplementation.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.LocalConnection + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +def boundedCutFunction (r s : ℝ) : ℝ := Real.sqrt (max (s-r) 0) / max r s + +lemma continuous_boundedCutFunction {r : ℝ} (hr : 0 < r) : + Continuous (boundedCutFunction r) := by + apply Continuous.div + · fun_prop + · fun_prop + · intro s + exact ne_of_gt (hr.trans_le (le_max_left _ _)) + +lemma boundedCutFunction_zero {r : ℝ} (hr : 0 < r) : boundedCutFunction r 0=0 := by + simp only [boundedCutFunction,zero_sub,max_eq_right (neg_nonpos.mpr hr.le),Real.sqrt_zero,zero_div] + +lemma boundedCutFunction_mul {r : ℝ} (hr : 0 < r) (s : ℝ) : + s*boundedCutFunction r s=Real.sqrt (max (s-r) 0) := by + by_cases hs : s ≤ r + · simp only [boundedCutFunction,max_eq_right (sub_nonpos.mpr hs),Real.sqrt_zero,zero_div,mul_zero] + · have hrs : r ≤ s := (lt_of_not_ge hs).le + have hs0 : s ≠ 0 := ne_of_gt (hr.trans_le hrs) + simp only [boundedCutFunction,max_eq_right hrs] + field_simp + +lemma boundedCutFunction_square_le {r : ℝ} (hr : 0 < r) (s : ℝ) : + r^2*(boundedCutFunction r s)^2 ≤ (s*boundedCutFunction r s)^2 := by + by_cases hs : s ≤ r + · simp only [boundedCutFunction,max_eq_right (sub_nonpos.mpr hs),Real.sqrt_zero,zero_div,mul_zero] + norm_num + · have hrs : r ≤ s := (lt_of_not_ge hs).le + have hsq : r^2 ≤ s^2 := sq_le_sq₀ hr.le (hr.le.trans hrs) |>.mpr hrs + nlinarith [mul_le_mul_of_nonneg_right hsq (sq_nonneg (boundedCutFunction r s))] + +section General + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma boundedCutFunction_cfc_product {Q : A} (hQ : 0 ≤ Q) {r : ℝ} (hr : 0 < r) : + Q*cfcₙ (boundedCutFunction r) Q=CFC.sqrt (positiveCut r Q) := by + rw [CFC.sqrt_eq_real_sqrt _ (positiveCut_nonneg r Q),positiveCut] + rw [← cfcₙ_comp Real.sqrt (fun s : ℝ => max (s-r) 0) Q + Real.continuous_sqrt.continuousOn Real.sqrt_zero (by fun_prop) + (by simpa using max_eq_right (neg_nonpos.mpr hr.le))] + have hq : Q=cfcₙ (fun s : ℝ => s) Q := (cfcₙ_id' ℝ Q hQ.isSelfAdjoint).symm + rw [hq] at ⊢ + rw [← hq] + conv_lhs => arg 1; rw [hq] + rw [← cfcₙ_mul (fun s : ℝ => s) (boundedCutFunction r) Q + continuous_id.continuousOn rfl (continuous_boundedCutFunction hr).continuousOn + (boundedCutFunction_zero hr)] + apply cfcₙ_congr + intro s _ + exact boundedCutFunction_mul hr s + +lemma boundedCutFunction_cfc_norm {Q : A} (hQ : 0 ≤ Q) {r : ℝ} (hr : 0 < r) (v : A) : + r*‖cfcₙ (boundedCutFunction r) Q*v‖ ≤ ‖Q*(cfcₙ (boundedCutFunction r) Q*v)‖ := by + let j := cfcₙ (boundedCutFunction r) Q + have hj : IsSelfAdjoint j := cfcₙ_predicate _ _ + have hqj : IsSelfAdjoint (Q*j) := by + rw [boundedCutFunction_cfc_product hQ hr] + exact (CFC.sqrt_nonneg _).isSelfAdjoint + have hle : r^2 • (j*j) ≤ (Q*j)*(Q*j) := by + have hjj : j*j=cfcₙ (fun s : ℝ => (boundedCutFunction r s)^2) Q := by + simp only [pow_two] + exact (cfcₙ_mul _ _ _ (continuous_boundedCutFunction hr).continuousOn + (boundedCutFunction_zero hr) (continuous_boundedCutFunction hr).continuousOn + (boundedCutFunction_zero hr)).symm + have hprod : Q*j=cfcₙ (fun s : ℝ => s*boundedCutFunction r s) Q := by + conv_lhs => arg 1; rw [(cfcₙ_id' ℝ Q hQ.isSelfAdjoint).symm] + exact (cfcₙ_mul _ _ _ continuous_id.continuousOn rfl + (continuous_boundedCutFunction hr).continuousOn (boundedCutFunction_zero hr)).symm + have hf := continuous_boundedCutFunction hr + rw [hjj,hprod,← cfcₙ_smul (r^2) (fun s : ℝ => boundedCutFunction r s ^ 2) Q (hf.pow 2).continuousOn + (by simp [boundedCutFunction_zero hr]),← cfcₙ_mul + (fun s : ℝ => s*boundedCutFunction r s) (fun s : ℝ => s*boundedCutFunction r s) Q + (continuous_id.mul hf).continuousOn (by simp) (continuous_id.mul hf).continuousOn (by simp)] + exact cfcₙ_mono (fun s _ => by simpa only [smul_eq_mul,pow_two] using boundedCutFunction_square_le hr s) + ((hf.pow 2).const_smul (r^2)).continuousOn + ((continuous_id.mul hf).mul (continuous_id.mul hf)).continuousOn + (by simp [boundedCutFunction_zero hr]) (by simp) + have ho := star_left_conjugate_le_conjugate hle v + have he1 : star v*(r^2 • (j*j))*v=r^2 • (star (j*v)*(j*v)) := by + simp only [star_mul,hj.star_eq,mul_smul_comm,smul_mul_assoc,mul_assoc] + have he2 : star v*((Q*j)*(Q*j))*v=star (Q*(j*v))*(Q*(j*v)) := by + calc + _=star ((Q*j)*v)*((Q*j)*v) := by + rw [star_mul (Q*j) v,hqj.star_eq] + simp only [mul_assoc] + _=_ := by simp only [mul_assoc] + rw [he1,he2] at ho + have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg ho + (smul_nonneg (sq_nonneg r) (star_mul_self_nonneg (j*v))) + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r), + CStarRing.norm_star_mul_self,CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (j*v),norm_nonneg (Q*(j*v))] + +lemma exists_bounded_cut_implementation {Q c : A} (hQ : 0 ≤ Q) (_hc : 0 ≤ c) + (hcn : ‖c‖ ≤ 1) {m : ℝ} (hm : 0 < m) + (hcomp : ElementCuntzSubequiv c (positiveCut (m/2) Q)) {δ : ℝ} + (hδ : 0 < δ) (hδ1 : δ < 1) : + ∃ x : A, ‖star (Q*x)*(Q*x)-c‖ < δ ∧ ‖Q*x‖ ≤ 2 ∧ ‖x‖ ≤ 4/m := by + obtain ⟨v,hv⟩ := elementCuntzSubequiv_iff.mp hcomp δ hδ + let x := cfcₙ (boundedCutFunction (m/2)) Q*v + have hprod : Q*x=CFC.sqrt (positiveCut (m/2) Q)*v := by + rw [← mul_assoc,boundedCutFunction_cfc_product hQ (by positivity)] + have he : star (Q*x)*(Q*x)=star v*positiveCut (m/2) Q*v := by + rw [hprod,star_mul,(CFC.sqrt_nonneg (positiveCut (m/2) Q)).star_eq] + calc + (star v*CFC.sqrt (positiveCut (m/2) Q))*(CFC.sqrt (positiveCut (m/2) Q)*v)= + star v*(CFC.sqrt (positiveCut (m/2) Q)*CFC.sqrt (positiveCut (m/2) Q))*v := by noncomm_ring + _=star v*positiveCut (m/2) Q*v := by rw [CFC.sqrt_mul_sqrt_self _ (positiveCut_nonneg _ _)] + have hxerr : ‖star (Q*x)*(Q*x)-c‖<δ := by rwa [he] + have hxnorm : ‖Q*x‖ ≤ 2 := by + have hn : ‖star (Q*x)*(Q*x)‖ ≤ ‖star (Q*x)*(Q*x)-c‖+‖c‖ := by + calc + _=‖(star (Q*x)*(Q*x)-c)+c‖ := by rw [sub_add_cancel] + _≤_ := norm_add_le _ _ + rw [CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (Q*x)] + refine ⟨x,hxerr,hxnorm,?_⟩ + have hn := boundedCutFunction_cfc_norm hQ (show 0 < m/2 by positivity) v + change m/2*‖x‖ ≤ ‖Q*x‖ at hn + apply (le_div_iff₀ hm).mpr + nlinarith + +end General + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CPCentralCriterion.lean b/lean/OAI/Analysis/WeakInfiniteness/CPCentralCriterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac5588aa4ac9748635826fef023b04ee5efedefa --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CPCentralCriterion.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CPCorrection +import OAI.Analysis.WeakInfiniteness.CentralExactPair + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma localCentralExactCuntzPair_of_cpc_schwarz_control + (r s : A) (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) + (hchoose : ∀ (F : Finset A) (δ : ℝ),0<δ → + ∃ φ : A →L[ℂ] A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + ‖φ 1-1‖<δ ∧ ‖φ 1-star (φ r)*φ r‖<δ ∧ + ‖φ 1-star (φ s)*φ s‖<δ ∧ + ∀ a∈F,∀ z : A,‖z‖≤1 → ‖a*φ z-φ z*a‖<δ) : + LocalCentralExactCuntzPair A := by + classical + intro F ε hε + let M : ℝ := 1+∑ a∈F,‖a‖ + have hM : 0 ‖a‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M] + linarith + let η : ℝ := ε/(4*M+4) + have hη : 0<η := div_pos hε (by linarith) + have hηε : (4*M+4)*η=ε := mul_div_cancel₀ _ (by linarith) + obtain ⟨δ,hδ,hcorr⟩ := exists_cuntzPair_near_cpc_images (B := A) r s hr hs hrs η hη + let κ : ℝ := min δ (ε/2) + have hκ : 0<κ := lt_min hδ (by positivity) + obtain ⟨φ,hφ,hφn,hu,hdr,hds,hF⟩ := hchoose F κ hκ + obtain ⟨x,y,hx,hy,hxy,hxr,hys⟩ := hcorr φ hφ hφn + (hu.trans_le (min_le_left _ _)) (hdr.trans_le (min_le_left _ _)) + (hds.trans_le (min_le_left _ _)) + have hn (z : A) (hz : star z*z=1) : ‖z‖≤1 := by + have he := congrArg norm hz + rw [CStarRing.norm_star_mul_self] at he + have h1 : ‖(1:A)‖≤1 := cstar_norm_one_le_one + nlinarith [norm_nonneg z] + refine ⟨x,y,hx,hy,hxy,?_⟩ + intro a ha + have hb (z w : A) (hz : ‖a*z-z*a‖<κ) (hw : ‖w-z‖<η) : + ‖a*w-w*a‖<ε := by + have hle := norm_commutator_perturbation_le a w z + have hκle : κ≤ε/2 := min_le_right _ _ + have hprod : 2*‖a‖*‖w-z‖≤2*M*η := by + gcongr + exact haM a ha + nlinarith + exact ⟨hb (φ r) x (hF a ha r (hn r hr)) hxr, + hb (φ s) y (hF a ha s (hn s hs)) hys⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CPCorrection.lean b/lean/OAI/Analysis/WeakInfiniteness/CPCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff151982c5ce898aa78dfd18a815e91d4c714847 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CPCorrection.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CPDefect +import OAI.Analysis.WeakInfiniteness.CuntzPairCorrection + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u v + +variable {A : Type u} {B : Type v} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +lemma exists_cuntzPair_near_cpc_images (r s : A) + (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) + (ε : ℝ) (hε : 0<ε) : + ∃ δ : ℝ,0<δ ∧ ∀ φ : A →L[ℂ] B,CompletelyPositive φ → ‖φ‖≤1 → + ‖φ 1-1‖<δ → ‖φ 1-star (φ r)*φ r‖<δ → + ‖φ 1-star (φ s)*φ s‖<δ → + ∃ x y : B,star x*x=1 ∧ star y*y=1 ∧ star x*y=0 ∧ + ‖x-φ r‖<ε ∧ ‖y-φ s‖<ε := by + obtain ⟨κ,hκ,hcorr⟩ := exists_cuntzPair_near (A := B) ε hε + let δ : ℝ := min (κ/4) (κ^2/4) + have hδ : 0<δ := lt_min (by positivity) (by positivity) + refine ⟨δ,hδ,?_⟩ + intro φ hφ hφn hu hdr hds + have hdκ : δ≤κ/4 := min_le_left _ _ + have hdκsq : δ≤κ^2/4 := min_le_right _ _ + have hn (z : A) (hz : star z*z=1) : ‖φ z‖≤1 := by + have he := congrArg norm hz + rw [CStarRing.norm_star_mul_self] at he + have h1 : ‖(1:A)‖≤1 := cstar_norm_one_le_one + have hzn : ‖z‖≤1 := by nlinarith [norm_nonneg z] + exact (φ.le_opNorm z).trans ((mul_le_mul hφn hzn + (norm_nonneg _) zero_le_one).trans (by norm_num)) + have herr := cpc_cuntzPair_errors hφ hφn r s hr hs hrs + apply hcorr (φ r) (φ s) (hn r hr) (hn s hs) + · have h := herr.1 + linarith + · have h := herr.2.1 + linarith + · have h := herr.2.2 + have h0 := norm_nonneg (star (φ r)*φ s) + nlinarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CPDefect.lean b/lean/OAI/Analysis/WeakInfiniteness/CPDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0acc2ab4e0c2f7529a598133c3bce54fee54707 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CPDefect.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CPSchwarz + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u v + +section Range + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma cuntzPair_range_sum_le_one (r s : A) + (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) : + r*star r+s*star s≤1 := by + let p := r*star r + let q := s*star s + have hp : star p=p := by simp [p] + have hq : star q=q := by simp [q] + have hpp : p*p=p := by + dsimp only [p] + calc + _ = r*(star r*r)*star r := by noncomm_ring + _ = _ := by rw [hr,mul_one] + have hqq : q*q=q := by + dsimp only [q] + calc + _ = s*(star s*s)*star s := by noncomm_ring + _ = _ := by rw [hs,mul_one] + have hpq : p*q=0 := by + dsimp only [p,q] + calc + _ = r*(star r*s)*star s := by noncomm_ring + _ = _ := by rw [hrs,mul_zero,zero_mul] + have hqp : q*p=0 := by + simpa only [star_mul,hp,hq,star_zero] using congrArg star hpq + have h := star_mul_self_nonneg (1-p-q) + have he : star (1-p-q)*(1-p-q)=1-(p+q) := by + simp only [star_sub,star_one,hp,hq] + calc + _ = 1-p-p+p*p-q-q+p*q+q*p+q*q := by noncomm_ring + _ = _ := by rw [hpp,hqq,hpq,hqp]; noncomm_ring + rw [he] at h + exact sub_nonneg.mp h + +lemma rowContraction_cross_norm_sq_le (x y : A) + (hrow : x*star x+y*star y≤1) (hy : ‖y‖≤1) : + ‖star x*y‖^2≤‖1-star y*y‖ := by + have hp := star_left_conjugate_nonneg (sub_nonneg.mpr hrow) y + have hord : star (star x*y)*(star x*y)≤ star y*y*(1-star y*y) := by + apply sub_nonneg.mp + convert hp using 1 + simp only [star_mul,star_star] + noncomm_ring + have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg + hord (star_mul_self_nonneg (star x*y)) + have hy' : ‖star y*y‖≤1 := by + calc + _ ≤ ‖star y‖*‖y‖ := norm_mul_le _ _ + _ ≤ 1*1 := by rw [norm_star]; gcongr + _ = _ := by ring + calc + _ = ‖star (star x*y)*(star x*y)‖ := by rw [CStarRing.norm_star_mul_self]; ring + _ ≤ ‖star y*y*(1-star y*y)‖ := hn + _ ≤ ‖star y*y‖*‖1-star y*y‖ := norm_mul_le _ _ + _ ≤ 1*‖1-star y*y‖ := mul_le_mul_of_nonneg_right hy' (norm_nonneg _) + _ = _ := one_mul _ + +end Range + +section CP + +variable {A : Type u} {B : Type v} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +lemma cpc_cuntzPair_range_sum_le_one {φ : A →L[ℂ] B} + (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (r s : A) (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) : + φ r*star (φ r)+φ s*star (φ s)≤1 := by + have hr' : φ r*star (φ r)≤φ (r*star r) := by + simpa only [star_star,completelyPositive_map_star hφ] using + completelyPositive_schwarz hφ hφn (star r) + have hs' : φ s*star (φ s)≤φ (s*star s) := by + simpa only [star_star,completelyPositive_map_star hφ] using + completelyPositive_schwarz hφ hφn (star s) + have hrow := completelyPositive_map_nonneg hφ + (sub_nonneg.mpr (cuntzPair_range_sum_le_one r s hr hs hrs)) + rw [map_sub,map_add,sub_nonneg] at hrow + exact (add_le_add hr' hs').trans (hrow.trans (completelyPositive_one_le_one hφ hφn)) + +lemma cpc_cuntzPair_errors {φ : A →L[ℂ] B} + (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (r s : A) (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) : + ‖star (φ r)*φ r-1‖≤‖φ 1-1‖+‖φ 1-star (φ r)*φ r‖ ∧ + ‖star (φ s)*φ s-1‖≤‖φ 1-1‖+‖φ 1-star (φ s)*φ s‖ ∧ + ‖star (φ r)*φ s‖^2≤‖φ 1-1‖+‖φ 1-star (φ s)*φ s‖ := by + have herr (z : B) : ‖z-1‖≤‖φ 1-1‖+‖φ 1-z‖ := by + calc + _ ≤ ‖z-φ 1‖+‖φ 1-1‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ = _ := by rw [norm_sub_rev z]; ring + have hsn : ‖s‖≤1 := by + have hn := congrArg norm hs + rw [CStarRing.norm_star_mul_self] at hn + have h1 : ‖(1:A)‖≤1 := cstar_norm_one_le_one + nlinarith [norm_nonneg s] + have hφs : ‖φ s‖≤1 := (φ.le_opNorm s).trans ((mul_le_mul hφn hsn + (norm_nonneg _) zero_le_one).trans (by norm_num)) + refine ⟨herr _,herr _,?_⟩ + have hc := rowContraction_cross_norm_sq_le (φ r) (φ s) + (cpc_cuntzPair_range_sum_le_one hφ hφn r s hr hs hrs) hφs + rw [norm_sub_rev 1] at hc + exact hc.trans (herr _) + +end CP + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CPSchwarz.lean b/lean/OAI/Analysis/WeakInfiniteness/CPSchwarz.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d869215d64172c4014354c57dfa420782deef2e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CPSchwarz.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralCuntzWords +import OAI.Analysis.WeakInfiniteness.NuclearCP + +namespace OAI + +noncomputable section + +namespace WeakPureInfiniteness + +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + + + +open scoped CStarAlgebra ComplexOrder + +universe u v + +section Star + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +lemma completelyPositive_map_nonneg {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + {a : A} (ha : 0≤a) : 0≤φ a := by + exact map_nonneg hφ.toMap ha + +lemma completelyPositive_map_star {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + (a : A) : φ (star a)=star (φ a) := by + obtain ⟨x,hx,_,rfl⟩ := CStarAlgebra.exists_sum_four_nonneg a + have hxstar (i : Fin 4) : star (x i)=x i := (IsSelfAdjoint.of_nonneg (hx i)).star_eq + have hy (i : Fin 4) : star (φ (x i))=φ (x i) := + (IsSelfAdjoint.of_nonneg (completelyPositive_map_nonneg hφ (hx i))).star_eq + simp only [star_sum,star_smul,map_sum,map_smul,hxstar,hy] + +end Star + +section Diagonal + +variable {B : Type v} [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +local instance schwarzMatrixRealModule {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n B) := Module.complexToReal _ + +lemma cstarMatrix_diagonal_nonneg {n : Type*} [Fintype n] + (M : CStarMatrix n n B) (hM : 0≤M) (i : n) : 0≤M i i := by + let X := CFC.sqrt M + have he : star X*X=M := by + rw [show star X=X from (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg M)).star_eq] + exact CFC.sqrt_mul_sqrt_self M hM + rw [← he,CStarMatrix.mul_apply] + exact Finset.sum_nonneg fun j _ => star_mul_self_nonneg (X j i) + +end Diagonal + + +variable {A : Type u} {B : Type v} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +lemma completelyPositive_one_le_one {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + (hφn : ‖φ‖≤1) : φ 1≤1 := by + apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ (completelyPositive_map_nonneg hφ zero_le_one)).mp + exact (φ.le_opNorm 1).trans ((mul_le_mul hφn cstar_norm_one_le_one + (norm_nonneg _) zero_le_one).trans (by norm_num)) + +lemma completelyPositive_schwarz {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + (hφn : ‖φ‖≤1) (a : A) : star (φ a)*φ a≤φ (star a*a) := by + let R : CStarMatrix (Fin 2) (Fin 2) A := CStarMatrix.ofMatrix !![a,1;0,0] + let M := matrixLinearMap φ (star R*R) + have hM : 0≤M := matrixLinearMap_nonneg hφ (star_mul_self_nonneg R) + let V : CStarMatrix (Fin 2) (Fin 2) B := CStarMatrix.ofMatrix !![1,0;-φ a,0] + have hN := cstarMatrix_diagonal_nonneg (star V*M*V) (star_left_conjugate_nonneg hM V) 0 + have he : (star V*M*V) 0 0= + φ (star a*a)-star (φ a)*φ a-star (φ a)*φ a+star (φ a)*φ 1*φ a := by + simp [V,M,R,CStarMatrix.mul_apply,CStarMatrix.star_apply,Fin.sum_univ_two, + completelyPositive_map_star hφ] + noncomm_ring + rw [he] at hN + have hp := star_left_conjugate_nonneg (sub_nonneg.mpr (completelyPositive_one_le_one hφ hφn)) (φ a) + apply sub_nonneg.mp + have h := add_nonneg hN hp + convert h using 1; noncomm_ring + + + + +end WeakPureInfiniteness + +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CStarClosedRange.lean b/lean/OAI/Analysis/WeakInfiniteness/CStarClosedRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1d922e5e08e1200923861a0ac08fdc43ad8624a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CStarClosedRange.lean @@ -0,0 +1,134 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +lemma starHom_continuous {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + (φ : A →⋆ₐ[ℂ] B) : Continuous φ := by + let f := φ.toAlgHom.toLinearMap.mkContinuous 1 (by + intro x + change ‖φ x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le φ x) + exact f.continuous + +private def clipScale (M t : ℝ) : ℝ := M / Real.sqrt (max (M ^ 2) t) + +private lemma clipScale_den_pos {M : ℝ} (hM : 0 < M) (t : ℝ) : + 0 < Real.sqrt (max (M ^ 2) t) := + Real.sqrt_pos.mpr ((sq_pos_of_pos hM).trans_le (le_max_left _ _)) + +private lemma continuous_clipScale {M : ℝ} (hM : 0 < M) : Continuous (clipScale M) := by + exact continuous_const.div + (Real.continuous_sqrt.comp (continuous_const.max continuous_id)) + (fun t => (clipScale_den_pos hM t).ne') + +private lemma clipScale_eq_one {M t : ℝ} (hM : 0 < M) (ht : t ≤ M ^ 2) : + clipScale M t = 1 := by + simp [clipScale, max_eq_left ht, Real.sqrt_sq hM.le, hM.ne'] + +private lemma clipScale_bound {M t : ℝ} (hM : 0 < M) (ht : 0 ≤ t) : + |clipScale M t * t * clipScale M t| ≤ M ^ 2 := by + have hd := clipScale_den_pos hM t + have hs : (Real.sqrt (max (M ^ 2) t)) ^ 2 = max (M ^ 2) t := + Real.sq_sqrt ((sq_nonneg M).trans (le_max_left _ _)) + have hf : 0 ≤ clipScale M t := div_nonneg hM.le hd.le + rw [abs_of_nonneg (mul_nonneg (mul_nonneg hf ht) hf)] + unfold clipScale + apply (mul_le_mul_iff_right₀ (sq_pos_of_pos hd)).mp + field_simp + nlinarith [le_max_right (M ^ 2) t] + +section Unital + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] [Nontrivial B] + +theorem starHom_exists_lift_norm_le (φ : A →⋆ₐ[ℂ] B) (x : A) + {M : ℝ} (hM : 0 < M) (hx : ‖φ x‖ ≤ M) : + ∃ y : A, φ y = φ x ∧ ‖y‖ ≤ M := by + let a := star x * x + let f := clipScale M + have ha : IsSelfAdjoint a := .star_mul_self x + have hf : Continuous f := continuous_clipScale hM + let y := x * cfc f a + have hprod : star y * y = cfc (fun t => f t * t * f t) a := by + dsimp only [y] + rw [star_mul, (IsSelfAdjoint.cfc (f := f) (a := a)).star_eq] + rw [cfc_mul (fun t => f t * t) f a (hf.mul continuous_id).continuousOn hf.continuousOn, + cfc_mul f (fun t : ℝ => t) a hf.continuousOn continuous_id.continuousOn, cfc_id' ℝ a ha] + dsimp only [a] + noncomm_ring + have hyn : ‖y‖ ≤ M := by + have hn : ‖star y * y‖ ≤ M ^ 2 := by + rw [hprod] + apply norm_cfc_le (sq_nonneg M) + intro t ht + exact clipScale_bound hM (spectrum_star_mul_self_nonneg t ht) + rw [CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg y] + have hφa : φ a = star (φ x) * φ x := by + dsimp only [a] + rw [map_mul, map_star] + have he : cfc f (φ a) = 1 := by + have heq : cfc f (φ a) = cfc (fun _ : ℝ => (1 : ℝ)) (φ a) := by + apply cfc_congr + intro t ht + apply clipScale_eq_one hM + have ht' := spectrum.norm_le_norm_of_mem ht + rw [hφa, CStarRing.norm_star_mul_self] at ht' + have ht0 : 0 ≤ t := spectrum_star_mul_self_nonneg t (hφa ▸ ht) + rw [Real.norm_eq_abs, abs_of_nonneg ht0] at ht' + nlinarith [norm_nonneg (φ x)] + rw [heq, cfc_const 1 (φ a) (ha.map φ), map_one] + refine ⟨y, ?_, hyn⟩ + dsimp only [y] + rw [map_mul, φ.map_cfc f a hf.continuousOn (ha := ha) (hφa := ha.map φ), he, mul_one] + +theorem starHom_isClosed_range (φ : A →⋆ₐ[ℂ] B) : IsClosed (Set.range φ) := by + let f : A →L[ℂ] B := φ.toAlgHom.toLinearMap.mkContinuous 1 (by + intro x + change ‖φ x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le φ x) + let K := f.ker + let F : A ⧸ K →L[ℂ] B := K.liftQL f le_rfl + have hbound : ∀ z : A ⧸ K, ‖z‖ ≤ (1 : ℝ≥0) * ‖F z‖ := by + intro z + induction z using Submodule.Quotient.induction_on K with + | H x => + change ‖(Submodule.Quotient.mk x : A ⧸ K)‖ ≤ (1 : ℝ) * ‖φ x‖ + rw [one_mul] + by_cases hx : φ x = 0 + · have hk : x ∈ K := hx + rw [(Submodule.Quotient.mk_eq_zero K).mpr hk, norm_zero, hx, norm_zero] + · obtain ⟨y, hy, hyn⟩ := starHom_exists_lift_norm_le φ x (norm_pos_iff.mpr hx) le_rfl + have hq : (Submodule.Quotient.mk x : A ⧸ K) = Submodule.Quotient.mk y := by + apply (Submodule.Quotient.eq K).mpr + change φ (x - y) = 0 + rw [map_sub, hy, sub_self] + rw [hq] + exact (Submodule.Quotient.norm_mk_le K y).trans hyn + have hclosed := (F.antilipschitz_of_bound hbound).isClosed_range F.uniformContinuous + have hr : Set.range F = Set.range φ := by + ext b + constructor + · rintro ⟨z, rfl⟩ + obtain ⟨x, rfl⟩ := Submodule.Quotient.mk_surjective K z + exact ⟨x, rfl⟩ + · rintro ⟨x, rfl⟩ + exact ⟨Submodule.Quotient.mk x, rfl⟩ + exact hr ▸ hclosed + +end Unital + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralCopiesTensor.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralCopiesTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..38dbfbded40896e2d68a0e73cbe3c0add9c0892b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralCopiesTensor.lean @@ -0,0 +1,132 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryIntertwining +import OAI.Analysis.WeakInfiniteness.TensorNorm + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +variable (A : Type u) (D : Type v) [CStarAlgebra A] [CStarAlgebra D] + +def ApproximatelyCentralCopies : Prop := + ∀ (E : Finset A) (K : Finset D) (ε : ℝ),0<ε → + ∃ θ : D →⋆ₐ[ℂ] A,∀ a ∈ E,∀ d ∈ K,‖θ d*a-a*θ d‖<ε + +variable {A D} + +def tensorCopyMap (θ : D →⋆ₐ[ℂ] A) : MinimalTensor D D →⋆ₙₐ[ℂ] MinimalTensor A D := + minimalMapAny θ.toNonUnitalStarAlgHom (NonUnitalStarAlgHom.id ℂ D) + +@[simp] lemma tensorCopyMap_elementary (θ : D →⋆ₐ[ℂ] A) (d e : D) : + tensorCopyMap θ (minimalElementary d e)=minimalElementary (θ d) e := by + simp only [tensorCopyMap,minimalMapAny_elementary,StarAlgHom.coe_toNonUnitalStarAlgHom, + NonUnitalStarAlgHom.coe_id, id_eq] + +lemma tensorCopyMap_polynomial_commutator (θ : D →⋆ₐ[ℂ] A) (c : D × D →₀ ℂ) (a : A) : + tensorCopyMap θ (minimalPolynomial c)*minimalLeftEmbedding A D a- + minimalLeftEmbedding A D a*tensorCopyMap θ (minimalPolynomial c)= + c.sum (fun p t => t • minimalElementary (θ p.1*a-a*θ p.1) p.2) := by + simp only [minimalPolynomial,Finsupp.sum,map_sum,map_smul, + Finset.sum_mul,Finset.mul_sum,← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro p hp + change c p • tensorCopyMap θ (minimalElementary p.1 p.2)*minimalElementary a 1- + minimalElementary a 1*(c p • tensorCopyMap θ (minimalElementary p.1 p.2))=_ + rw [tensorCopyMap_elementary,smul_mul_assoc,mul_smul_comm,← smul_sub] + congr 1 + rw [← minimalElementary_mul,← minimalElementary_mul,mul_one,one_mul] + exact (map_sub (minimalElementaryLeftLinear p.2) (θ p.1*a) (a*θ p.1)).symm + +lemma norm_tensorCopyMap_polynomial_commutator_le (θ : D →⋆ₐ[ℂ] A) + (c : D × D →₀ ℂ) (a : A) (η : ℝ) + (hc : ∀ p ∈ c.support,‖θ p.1*a-a*θ p.1‖≤η) : + ‖tensorCopyMap θ (minimalPolynomial c)*minimalLeftEmbedding A D a- + minimalLeftEmbedding A D a*tensorCopyMap θ (minimalPolynomial c)‖ ≤ + (∑ p ∈ c.support,‖c p‖*‖p.2‖)*η := by + rw [tensorCopyMap_polynomial_commutator] + dsimp only [Finsupp.sum] + calc + _ ≤ ∑ p ∈ c.support,‖c p • minimalElementary (θ p.1*a-a*θ p.1) p.2‖ := norm_sum_le _ _ + _ ≤ ∑ p ∈ c.support,(‖c p‖*‖p.2‖)*η := by + apply Finset.sum_le_sum + intro p hp + rw [norm_smul,norm_minimalElementary] + have hh := mul_le_mul_of_nonneg_left (hc p hp) (mul_nonneg (norm_nonneg (c p)) (norm_nonneg p.2)) + nlinarith + _ = _ := (Finset.sum_mul _ _ _).symm + +lemma norm_commutator_perturb_le (x y b : MinimalTensor A D) : + ‖x*b-b*x‖ ≤ 2*‖b‖*‖x-y‖+‖y*b-b*y‖ := by + have he : x*b-b*x=(x-y)*b-b*(x-y)+(y*b-b*y) := by noncomm_ring + rw [he] + calc + _ ≤ ‖(x-y)*b-b*(x-y)‖+‖y*b-b*y‖ := norm_add_le _ _ + _ ≤ (‖(x-y)*b‖+‖b*(x-y)‖)+‖y*b-b*y‖ := add_le_add (norm_sub_le _ _) (le_refl _) + _ ≤ (‖x-y‖*‖b‖+‖b‖*‖x-y‖)+‖y*b-b*y‖ := by + gcongr <;> exact norm_mul_le _ _ + _ = _ := by ring + +lemma ApproximatelyCentralCopies.tensor_commutator (h : ApproximatelyCentralCopies A D) + (E : Finset A) (z : MinimalTensor D D) (ε : ℝ) (hε : 0<ε) : + ∃ θ : D →⋆ₐ[ℂ] A,∀ a ∈ E, + ‖tensorCopyMap θ z*minimalLeftEmbedding A D a- + minimalLeftEmbedding A D a*tensorCopyMap θ z‖<ε := by + classical + let M : ℝ := 1+∑ a ∈ E,‖a‖ + have hM : 0 ‖b‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M]; linarith + obtain ⟨c,hc⟩ := Metric.denseRange_iff.mp + (minimalPolynomial_denseRange (A := D) (D := D)) z (ε/(8*M)) (by positivity) + have hcz : ‖z-minimalPolynomial c‖<ε/(8*M) := by simpa only [dist_eq_norm] using hc + let C : ℝ := 1+∑ p ∈ c.support,‖c p‖*‖p.2‖ + have hC : 0 + (hθ a ha p.1 (Finset.mem_image.mpr ⟨p,hp,rfl⟩)).le) + have href := norm_commutator_perturb_le (tensorCopyMap θ z) + (tensorCopyMap θ (minimalPolynomial c)) (minimalLeftEmbedding A D a) + have hnorm : ‖tensorCopyMap θ z-tensorCopyMap θ (minimalPolynomial c)‖≤‖z-minimalPolynomial c‖ := by + rw [← map_sub] + exact NonUnitalStarAlgHom.norm_apply_le _ _ + have hleft : ‖minimalLeftEmbedding A D a‖≤M := + (NonUnitalStarAlgHom.norm_apply_le _ _).trans (haM a ha) + have herror : 2*‖minimalLeftEmbedding A D a‖* + ‖tensorCopyMap θ z-tensorCopyMap θ (minimalPolynomial c)‖≤ε/4 := by + calc + _ ≤ 2*M*(ε/(8*M)) := by gcongr; exact hnorm.trans hcz.le + _ = _ := by field_simp; ring + have hsum : (∑ p ∈ c.support,‖c p‖*‖p.2‖)*η ≤ ε/4 := by + calc + _ ≤ C*η := mul_le_mul_of_nonneg_right (by dsimp only [C]; linarith) hη.le + _ = _ := by dsimp only [η]; field_simp + linarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralCuntzWords.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralCuntzWords.lean new file mode 100644 index 0000000000000000000000000000000000000000..b3a4adfc94e47b79de2968180d2f9b114e6c01e7 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralCuntzWords.lean @@ -0,0 +1,117 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.OInfinityUniversal + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u + +variable {A : Type u} [CStarAlgebra A] + +lemma cstar_norm_one_le_one : ‖(1:A)‖≤1 := by + have hh : ‖star (1:A)*(1:A)‖=‖(1:A)‖*‖(1:A)‖ := CStarRing.norm_star_mul_self + simp only [star_one,mul_one] at hh + nlinarith [norm_nonneg (1:A)] + +lemma norm_isometry_le_one {s : A} (hs : star s*s=1) : ‖s‖≤1 := by + have hh : ‖star s*s‖=‖s‖*‖s‖ := CStarRing.norm_star_mul_self + rw [hs] at hh + have hn : ‖(1:A)‖≤1 := cstar_norm_one_le_one + have hp := norm_nonneg s + nlinarith + +lemma norm_cuntzWord_le_one (s : ℕ → A) (hs : ∀ i,‖s i‖≤1) (w : List (ℕ × Bool)) : + ‖cuntzWord s w‖≤1 := by + induction w with + | nil => exact cstar_norm_one_le_one + | cons ib w ih => + rcases ib with ⟨i,b⟩ + have hx : ‖if b then s i else star (s i)‖≤1 := by cases b <;> simpa using hs i + exact (norm_mul_le _ _).trans ((mul_le_mul hx ih (norm_nonneg _) zero_le_one).trans_eq (one_mul 1)) + +lemma norm_commutator_star_right (a x : A) : + ‖a*star x-star x*a‖=‖star a*x-x*star a‖ := by + rw [← norm_star (a*star x-star x*a),star_sub,star_mul,star_mul,star_star,norm_sub_rev] + +lemma norm_commutator_mul_le (a x y : A) : + ‖a*(x*y)-(x*y)*a‖≤‖a*x-x*a‖*‖y‖+‖x‖*‖a*y-y*a‖ := by + have he : a*(x*y)-(x*y)*a=(a*x-x*a)*y+x*(a*y-y*a) := by noncomm_ring + rw [he] + exact (norm_add_le _ _).trans (add_le_add (norm_mul_le _ _) (norm_mul_le _ _)) + +lemma norm_cuntzWord_commutator_le (s : ℕ → A) (hs : ∀ i,‖s i‖≤1) + (a : A) (w : List (ℕ × Bool)) (δ : ℝ) (hδ : 0≤δ) + (hcomm : ∀ ib ∈ w,‖a*s ib.1-s ib.1*a‖≤δ ∧ ‖star a*s ib.1-s ib.1*star a‖≤δ) : + ‖a*cuntzWord s w-cuntzWord s w*a‖≤(w.length:ℝ)*δ := by + induction w with + | nil => simp [cuntzWord] + | cons ib w ih => + rcases ib with ⟨i,b⟩ + have hx : ‖if b then s i else star (s i)‖≤1 := by cases b <;> simpa using hs i + have hc : ‖a*(if b then s i else star (s i))-(if b then s i else star (s i))*a‖≤δ := by + have hh := hcomm (i,b) (by simp) + cases b + · simpa only [Bool.false_eq_true,↓reduceIte,norm_commutator_star_right] using hh.2 + · simpa using hh.1 + have hi := ih (fun p hp => hcomm p (List.mem_cons_of_mem _ hp)) + have hn := norm_cuntzWord_le_one s hs w + change ‖a*((if b then s i else star (s i))*cuntzWord s w)- + ((if b then s i else star (s i))*cuntzWord s w)*a‖≤_ + calc + _ ≤ ‖a*(if b then s i else star (s i))-(if b then s i else star (s i))*a‖*‖cuntzWord s w‖+ + ‖if b then s i else star (s i)‖*‖a*cuntzWord s w-cuntzWord s w*a‖ := norm_commutator_mul_le _ _ _ + _ ≤ δ*1+1*((w.length:ℝ)*δ) := by + apply add_le_add + · exact mul_le_mul hc hn (norm_nonneg _) hδ + · exact mul_le_mul hx hi (norm_nonneg _) zero_le_one + _ = _ := by simp only [List.length_cons,Nat.cast_add,Nat.cast_one]; ring + +def cuntzPolynomialCentralWeight (c : List (ℕ × Bool) →₀ ℂ) : ℝ := + ∑ w ∈ c.support,‖c w‖*(w.length:ℝ) + +lemma cuntzPolynomialCentralWeight_nonneg (c : List (ℕ × Bool) →₀ ℂ) : + 0≤cuntzPolynomialCentralWeight c := by + unfold cuntzPolynomialCentralWeight + positivity + +lemma norm_cuntzPolynomial_commutator_le (s : ℕ → A) (hs : ∀ i,‖s i‖≤1) + (a : A) (c : List (ℕ × Bool) →₀ ℂ) (δ : ℝ) (hδ : 0≤δ) + (hcomm : ∀ w ∈ c.support,∀ ib ∈ w, + ‖a*s ib.1-s ib.1*a‖≤δ ∧ ‖star a*s ib.1-s ib.1*star a‖≤δ) : + ‖a*cuntzPolynomial s c-cuntzPolynomial s c*a‖≤cuntzPolynomialCentralWeight c*δ := by + have he : a*cuntzPolynomial s c-cuntzPolynomial s c*a= + ∑ w ∈ c.support,c w • (a*cuntzWord s w-cuntzWord s w*a) := by + simp only [cuntzPolynomial,Finsupp.sum,Finset.mul_sum,Finset.sum_mul, + ← Finset.sum_sub_distrib,mul_smul_comm,smul_mul_assoc,smul_sub] + rw [he] + calc + _ ≤ ∑ w ∈ c.support,‖c w • (a*cuntzWord s w-cuntzWord s w*a)‖ := norm_sum_le _ _ + _ ≤ ∑ w ∈ c.support,‖c w‖*((w.length:ℝ)*δ) := by + apply Finset.sum_le_sum + intro w hw + rw [norm_smul] + exact mul_le_mul_of_nonneg_left (norm_cuntzWord_commutator_le s hs a w δ hδ (hcomm w hw)) (norm_nonneg _) + _ = _ := by simp only [cuntzPolynomialCentralWeight,Finset.sum_mul,mul_assoc] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralExactPair.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralExactPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bca5f4fb2261326e8d16a79742d1aeab8e80f88 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralExactPair.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralizationEstimates +import OAI.Analysis.WeakInfiniteness.CuntzPairCorrection + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u + +variable (A : Type u) [CStarAlgebra A] + +def LocalCentralExactCuntzPair : Prop := + ∀ (E : Finset A) (ε : ℝ),0<ε → ∃ r s : A, + star r*r=1 ∧ star s*s=1 ∧ star r*s=0 ∧ + ∀ a ∈ E,‖a*r-r*a‖<ε ∧ ‖a*s-s*a‖<ε + +variable {A} + +lemma norm_commutator_perturbation_le (a r s : A) : + ‖a*r-r*a‖≤‖a*s-s*a‖+2*‖a‖*‖r-s‖ := by + have he : a*r-r*a=(a*s-s*a)+(a*(r-s)-(r-s)*a) := by noncomm_ring + rw [he] + calc + _ ≤ ‖a*s-s*a‖+‖a*(r-s)-(r-s)*a‖ := norm_add_le _ _ + _ ≤ ‖a*s-s*a‖+(‖a*(r-s)‖+‖(r-s)*a‖) := by gcongr; exact norm_sub_le _ _ + _ ≤ ‖a*s-s*a‖+(‖a‖*‖r-s‖+‖r-s‖*‖a‖) := by gcongr <;> exact norm_mul_le _ _ + _ = _ := by ring + +variable [PartialOrder A] [StarOrderedRing A] + +lemma LocalCentralCuntzPair.exact_unital (h : LocalCentralCuntzPair A) : + LocalCentralExactCuntzPair A := by + classical + intro E ε hε + let M : ℝ := 1+∑ a ∈ E,‖a‖ + have hM : 0 ‖b‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M] + linarith + let η : ℝ := ε/(4*M+4) + have hη : 0<η := div_pos hε (by linarith) + have hηε : (4*M+4)*η=ε := mul_div_cancel₀ _ (by linarith) + obtain ⟨δ,hδ,hcorr⟩ := exists_cuntzPair_near (A := A) η hη + let κ := min δ (ε/2) + have hκ : 0<κ := lt_min hδ (by positivity) + obtain ⟨s,t,hs,ht,hF⟩ := h (insert 1 E) κ hκ + have h1 := hF 1 (Finset.mem_insert_self _ _) + obtain ⟨r,q,hr,hq,hrq,hrs,hqt⟩ := hcorr s t hs ht + (by simpa using lt_of_lt_of_le h1.2.2.1 (min_le_left δ (ε/2))) + (by simpa using lt_of_lt_of_le h1.2.2.2.1 (min_le_left δ (ε/2))) + (by simpa using lt_of_lt_of_le h1.2.2.2.2 (min_le_left δ (ε/2))) + refine ⟨r,q,hr,hq,hrq,?_⟩ + intro a ha + have ha' := hF a (Finset.mem_insert_of_mem ha) + have hsr : ‖a*s-s*a‖<ε/2 := lt_of_lt_of_le ha'.1 (min_le_right δ (ε/2)) + have htq : ‖a*t-t*a‖<ε/2 := lt_of_lt_of_le ha'.2.1 (min_le_right δ (ε/2)) + have hbound (v w : A) (hw : ‖a*w-w*a‖<ε/2) (hvw : ‖v-w‖<η) : ‖a*v-v*a‖<ε := by + have hn := norm_commutator_perturbation_le a v w + have hb : 2*‖a‖*‖v-w‖≤2*M*η := by + gcongr + exact haM a ha + have hη0 : 0≤η := hη.le + nlinarith + exact ⟨hbound r s hsr hrs,hbound q t htq hqt⟩ + +lemma ContractiveIdentityDiagonalization.centralExactCuntzPair + (h : ContractiveIdentityDiagonalization A) : LocalCentralExactCuntzPair A := + h.localCentralCuntzPair.exact_unital + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralOInfinityCopies.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralOInfinityCopies.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe8f2a1ebda77c5bbbed466e6acaff92539a0384 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralOInfinityCopies.lean @@ -0,0 +1,170 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralCopiesTensor +import OAI.Analysis.WeakInfiniteness.CentralCuntzWords +import OAI.Analysis.WeakInfiniteness.CentralExactPair +import OAI.Analysis.WeakInfiniteness.UnitalCuntzEmbedding + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u + +variable {A : Type u} [CStarAlgebra A] + +lemma cstar_norm_pow_le_one (s : A) (hs : ‖s‖≤1) (n : ℕ) : ‖s^n‖≤1 := by + induction n with + | zero => simpa using (cstar_norm_one_le_one (A := A)) + | succ n ih => + rw [pow_succ] + exact (norm_mul_le _ _).trans ((mul_le_mul ih hs (norm_nonneg _) zero_le_one).trans_eq (one_mul 1)) + +lemma norm_commutator_pow_le (a s : A) (hs : ‖s‖≤1) (δ : ℝ) (hδ : 0≤δ) + (hcomm : ‖a*s-s*a‖≤δ) (n : ℕ) : ‖a*s^n-s^n*a‖≤(n:ℝ)*δ := by + induction n with + | zero => simp + | succ n ih => + rw [pow_succ] + have hn : ‖s^n‖≤1 := cstar_norm_pow_le_one s hs n + calc + _ ≤ ‖a*s^n-s^n*a‖*‖s‖+‖s^n‖*‖a*s-s*a‖ := norm_commutator_mul_le _ _ _ + _ ≤ ((n:ℝ)*δ)*1+1*δ := by + exact add_le_add (mul_le_mul ih hs (norm_nonneg _) (by positivity)) + (mul_le_mul hn hcomm (norm_nonneg _) zero_le_one) + _ = _ := by simp only [Nat.cast_add,Nat.cast_one]; ring + +lemma LocalCentralExactCuntzPair.central_generators (h : LocalCentralExactCuntzPair A) + (E : Finset A) (L : Finset ℕ) (ε : ℝ) (hε : 0<ε) : + ∃ θ : OInfinity →⋆ₐ[ℂ] A,∀ a ∈ E,∀ i ∈ L, + ‖a*θ (oInfinityIsometry i)-θ (oInfinityIsometry i)*a‖<ε := by + classical + let N : ℝ := 1+∑ i ∈ L,((i:ℝ)+1) + have hN : 0 (j:ℝ)+1) + (fun _ _ => by positivity) hi + dsimp only [N] + linarith + let δ := ε/(2*N) + have hδ : 0<δ := by dsimp only [δ]; positivity + obtain ⟨r,s,hr,hs,hrs,hcomm⟩ := h E δ hδ + refine ⟨oInfinityMap (fun n => s^n*r) (binaryCuntzFamily_relations hr hs hrs),?_⟩ + intro a ha i hi + rw [oInfinityMap_isometry] + have hrn : ‖r‖≤1 := norm_isometry_le_one hr + have hsn : ‖s‖≤1 := norm_isometry_le_one hs + have hn : ‖s^i‖≤1 := cstar_norm_pow_le_one s hsn i + have hp := norm_commutator_pow_le a s hsn δ hδ.le (hcomm a ha).2.le i + calc + _ ≤ ‖a*s^i-s^i*a‖*‖r‖+‖s^i‖*‖a*r-r*a‖ := norm_commutator_mul_le _ _ _ + _ ≤ ((i:ℝ)*δ)*1+1*δ := add_le_add + (mul_le_mul hp hrn (norm_nonneg _) (by positivity)) + (mul_le_mul hn (hcomm a ha).1.le (norm_nonneg _) zero_le_one) + _ = ((i:ℝ)+1)*δ := by ring + _ ≤ N*δ := mul_le_mul_of_nonneg_right (hiN i hi) hδ.le + _ = ε/2 := by dsimp only [δ]; field_simp + _ < ε := by linarith + +lemma oInfinityPolynomial_denseRange : DenseRange (cuntzPolynomial oInfinityIsometry) := by + have hsub : (StarAlgebra.adjoin ℂ (Set.range oInfinityIsometry) : Set OInfinity) ⊆ + Set.range (cuntzPolynomial oInfinityIsometry) := by + intro y hy + exact exists_cuntzPolynomial_of_mem_adjoin _ _ hy + have ht : closure (StarAlgebra.adjoin ℂ (Set.range oInfinityIsometry) : Set OInfinity)=Set.univ := by + change (closedStarSpan (Set.range oInfinityIsometry) : Set OInfinity)=Set.univ + rw [oInfinity_generators_dense] + rfl + apply dense_iff_closure_eq.mpr + apply Set.eq_univ_of_univ_subset + rw [← ht] + exact closure_mono hsub + +lemma LocalCentralExactCuntzPair.approximatelyCentralCopies + (h : LocalCentralExactCuntzPair A) : ApproximatelyCentralCopies A OInfinity := by + classical + intro E K ε hε + let M : ℝ := 1+∑ a ∈ E,‖a‖ + have hM : 0 ‖a‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M] + linarith + have happ (d : OInfinity) : ∃ c : List (ℕ × Bool) →₀ ℂ, + ‖d-cuntzPolynomial oInfinityIsometry c‖<ε/(8*M) := by + obtain ⟨c,hc⟩ := Metric.denseRange_iff.mp oInfinityPolynomial_denseRange d (ε/(8*M)) (by positivity) + exact ⟨c,by simpa only [dist_eq_norm] using hc⟩ + choose c hc using happ + let C : ℝ := 1+∑ d ∈ K,cuntzPolynomialCentralWeight (c d) + have hC : 0 cuntzPolynomialCentralWeight_nonneg (c d)) + dsimp only [C] + linarith + have hdC (d : OInfinity) (hd : d∈K) : cuntzPolynomialCentralWeight (c d)≤C := by + have hb := Finset.single_le_sum (f := fun d => cuntzPolynomialCentralWeight (c d)) + (fun _ _ => cuntzPolynomialCentralWeight_nonneg _) hd + dsimp only [C] + linarith + let L : Finset ℕ := K.biUnion (fun d => (c d).support.biUnion (fun w => w.toFinset.image Prod.fst)) + have hL (d : OInfinity) (hd : d∈K) (w : List (ℕ × Bool)) (hw : w∈(c d).support) + (ib : ℕ × Bool) (hib : ib∈w) : ib.1∈L := by + apply Finset.mem_biUnion.mpr + refine ⟨d,hd,Finset.mem_biUnion.mpr ⟨w,hw,?_⟩⟩ + exact Finset.mem_image.mpr ⟨ib,by simpa using hib,rfl⟩ + let δ := ε/(4*C) + have hδ : 0<δ := by dsimp only [δ]; positivity + obtain ⟨θ,hθ⟩ := h.central_generators (E ∪ E.image star) L δ hδ + refine ⟨θ,?_⟩ + intro a ha d hd + let s : ℕ → A := fun i => θ (oInfinityIsometry i) + have hs (i : ℕ) : ‖s i‖≤1 := by + apply norm_isometry_le_one + dsimp only [s] + rw [← map_star,← map_mul,oInfinityIsometry_relations,ite_eq_left rfl,map_one] + have hpoly : ‖a*θ (cuntzPolynomial oInfinityIsometry (c d))- + θ (cuntzPolynomial oInfinityIsometry (c d))*a‖≤cuntzPolynomialCentralWeight (c d)*δ := by + rw [map_cuntzPolynomial] + apply norm_cuntzPolynomial_commutator_le s hs a (c d) δ hδ.le + intro w hw ib hib + exact ⟨(hθ a (Finset.mem_union_left _ ha) ib.1 (hL d hd w hw ib hib)).le, + (hθ (star a) (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨a,ha,rfl⟩)) + ib.1 (hL d hd w hw ib hib)).le⟩ + have hn : ‖θ d-θ (cuntzPolynomial oInfinityIsometry (c d))‖≤ + ‖d-cuntzPolynomial oInfinityIsometry (c d)‖ := by + rw [← map_sub] + exact NonUnitalStarAlgHom.norm_apply_le _ _ + have herr : 2*‖a‖*‖θ d-θ (cuntzPolynomial oInfinityIsometry (c d))‖≤ε/4 := by + calc + _ ≤ 2*M*(ε/(8*M)) := by + gcongr + · exact haM a ha + · exact hn.trans (hc d).le + _ = _ := by field_simp; ring + have hmain : cuntzPolynomialCentralWeight (c d)*δ≤ε/4 := by + calc + _ ≤ C*δ := mul_le_mul_of_nonneg_right (hdC d hd) hδ.le + _ = _ := by dsimp only [δ]; field_simp + rw [norm_sub_rev] + have hb := norm_commutator_perturbation_le a (θ d) (θ (cuntzPolynomial oInfinityIsometry (c d))) + linarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralState.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralState.lean new file mode 100644 index 0000000000000000000000000000000000000000..d8bf91c5c82182c9ccbda88ba9f02690d266e6e1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralState.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder InnerProductSpace ENNReal MatrixOrder + +universe u v + +section VectorState + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +def vectorStateLinear (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : A →ₗ[ℂ] ℂ where + toFun a := inner ℂ ξ (π a ξ) + map_add' a b := by simp + map_smul' c a := by simp + +omit [PartialOrder A] [StarOrderedRing A] in +lemma vectorStateLinear_bound (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) (a : A) : + ‖vectorStateLinear π ξ a‖≤‖ξ‖^2*‖a‖ := by + calc + _ ≤ ‖ξ‖*‖π a ξ‖ := norm_inner_le_norm ξ _ + _ ≤ ‖ξ‖*(‖π a‖*‖ξ‖) := mul_le_mul_of_nonneg_left ((π a).le_opNorm ξ) (norm_nonneg _) + _ ≤ ‖ξ‖*(‖a‖*‖ξ‖) := by gcongr; exact NonUnitalStarAlgHom.norm_apply_le _ _ + _ = _ := by ring + +def vectorStateContinuous (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : A →L[ℂ] ℂ := + (vectorStateLinear π ξ).mkContinuous (‖ξ‖^2) (vectorStateLinear_bound π ξ) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma vectorStateContinuous_apply (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) (a : A) : + vectorStateContinuous π ξ a=inner ℂ ξ (π a ξ) := rfl + +lemma vectorStateContinuous_cp (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : + CompletelyPositive (vectorStateContinuous π ξ) := by + classical + intro n x hx + let : Module ℝ (CStarMatrix (Fin n) (Fin n) A) := Module.complexToReal _ + let y := CFC.sqrt x + have hy : star y*y=x := by + dsimp only [y] + rw [(CFC.sqrt_nonneg x).star_eq,CFC.sqrt_mul_sqrt_self x hx] + have he : CStarMatrix.ofMatrix (fun i j => vectorStateContinuous π ξ (x i j))= + ∑ k : Fin n,CStarMatrix.ofMatrix (Matrix.gram ℂ (fun i => π (y k i) ξ)) := by + ext i j + rw [← hy] + simp only [CStarMatrix.mul_apply,CStarMatrix.star_apply,vectorStateContinuous_apply, + map_sum,map_mul,map_star,mul_apply_eq_comp, + ContinuousLinearMap.star_eq_adjoint,ContinuousLinearMap.adjoint_inner_right] + change (∑ k,inner ℂ (π (y k i) ξ) (π (y k j) ξ)) = + matrixEntryLinear i j (∑ k : Fin n,CStarMatrix.ofMatrix (Matrix.gram ℂ (fun i => π (y k i) ξ))) + rw [map_sum] + rfl + rw [he] + apply Finset.sum_nonneg + intro k _ + exact map_nonneg CStarMatrix.ofMatrixStarAlgEquiv (Matrix.posSemidef_gram ℂ _).nonneg + +omit [PartialOrder A] [StarOrderedRing A] in +lemma vectorStateContinuous_norm_le (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : + ‖vectorStateContinuous π ξ‖≤‖ξ‖^2 := + ContinuousLinearMap.opNorm_le_bound _ (sq_nonneg _) (vectorStateLinear_bound π ξ) + +end VectorState + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralVacuum.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralVacuum.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5011838237e1d496723da5fded23d93f4793695 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralVacuum.lean @@ -0,0 +1,94 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralState + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder InnerProductSpace ENNReal + +local instance : PartialOrder OInfinity := CStarAlgebra.spectralOrder _ + +local instance : StarOrderedRing OInfinity := CStarAlgebra.spectralOrderedRing _ + +def fockVacuum : FockSpace := lp.single 2 [] 1 + +lemma fockVacuum_norm : ‖fockVacuum‖=1 := by + rw [fockVacuum,lp.norm_single (by norm_num : (0 : ℝ≥0∞)<2),norm_one] + +def oInfinityVacuumState : OInfinity →L[ℂ] ℂ := + vectorStateContinuous (oInfinityEvaluation fockRepresentation).toNonUnitalStarAlgHom fockVacuum + +lemma oInfinityVacuumState_one : oInfinityVacuumState 1=1 := by + change inner ℂ fockVacuum ((oInfinityEvaluation fockRepresentation) 1 fockVacuum)=1 + rw [map_one] + change inner ℂ fockVacuum fockVacuum=1 + simp [fockVacuum] + +lemma oInfinityVacuumState_isometry (i : ℕ) : oInfinityVacuumState (oInfinityIsometry i)=0 := by + change inner ℂ fockVacuum (fockShift i fockVacuum)=0 + simp [fockVacuum,fockShift_single,lp.inner_single_left,lp.single_apply] + +def oInfinityCentralStateMap : OInfinity →L[ℂ] OInfinity := + (starHomContinuousLinear (StarAlgHom.ofId ℂ OInfinity).toNonUnitalStarAlgHom).comp + oInfinityVacuumState + +lemma oInfinityCentralStateMap_apply (a : OInfinity) : + oInfinityCentralStateMap a=oInfinityVacuumState a • (1:OInfinity) := by + change algebraMap ℂ OInfinity (oInfinityVacuumState a)=_ + exact Algebra.algebraMap_eq_smul_one _ + +lemma oInfinityCentralStateMap_cp : CompletelyPositive oInfinityCentralStateMap := by + intro n x hx + have h := vectorStateContinuous_cp (oInfinityEvaluation fockRepresentation).toNonUnitalStarAlgHom + fockVacuum n x hx + exact map_nonneg (CStarMatrix.mapₙₐ (StarAlgHom.ofId ℂ OInfinity).toNonUnitalStarAlgHom) h + +lemma oInfinityCentralStateMap_norm_le : ‖oInfinityCentralStateMap‖≤1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro a + rw [oInfinityCentralStateMap_apply,norm_smul,norm_one,mul_one,one_mul] + have h := vectorStateLinear_bound (oInfinityEvaluation fockRepresentation).toNonUnitalStarAlgHom + fockVacuum a + change ‖oInfinityVacuumState a‖≤‖fockVacuum‖^2*‖a‖ at h + rwa [fockVacuum_norm,one_pow,one_mul] at h + +lemma exists_unital_cpc_central_map_killing_generators : + ∃ Φ : OInfinity →L[ℂ] OInfinity,CompletelyPositive Φ ∧ ‖Φ‖≤1 ∧ Φ 1=1 ∧ + (∀ a z : OInfinity,a*Φ z=Φ z*a) ∧ + (∀ i : ℕ,Φ (oInfinityIsometry i)=0) ∧ + ∀ i : ℕ,‖Φ 1-star (Φ (oInfinityIsometry i))*Φ (oInfinityIsometry i)‖=1 := by + have hu : oInfinityCentralStateMap 1=1 := by + change (StarAlgHom.ofId ℂ OInfinity) (oInfinityVacuumState 1)=1 + rw [oInfinityVacuumState_one,map_one] + have hz (i : ℕ) : oInfinityCentralStateMap (oInfinityIsometry i)=0 := by + change (StarAlgHom.ofId ℂ OInfinity) (oInfinityVacuumState (oInfinityIsometry i))=0 + rw [oInfinityVacuumState_isometry,map_zero] + refine ⟨oInfinityCentralStateMap,oInfinityCentralStateMap_cp,oInfinityCentralStateMap_norm_le, + hu,?_,hz,?_⟩ + · intro a z + simp only [oInfinityCentralStateMap_apply,mul_smul_comm,smul_mul_assoc,mul_one,one_mul] + · intro i + rw [hu,hz,star_zero,zero_mul,sub_zero,norm_one] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CentralizationEstimates.lean b/lean/OAI/Analysis/WeakInfiniteness/CentralizationEstimates.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc74f94d2f152136c357f444d85a538821994a55 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CentralizationEstimates.lean @@ -0,0 +1,184 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section UnitalEstimate + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma norm_commutator_sq_le_unital (v a : B) (hv : ‖v‖ ≤ 1) : + ‖a*v-v*a‖^2 ≤ ‖star v*(star a*a)*v-star a*a‖ + + 2*‖a‖*‖star v*a*v-a‖ := by + have hvv : star v*v ≤ 1 := by + apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ (star_mul_self_nonneg v)).mp + rw [CStarRing.norm_star_mul_self] + exact (mul_le_mul hv hv (norm_nonneg _) zero_le_one).trans (by norm_num) + let d := a*v-v*a + let e := a-star v*a*v + let R := (star v*(star a*a)*v-star a*a)+star a*e+star e*a + have hR : star d*d ≤ R := by + apply sub_nonneg.mp + have he : R-star d*d=star a*(1-star v*v)*a := by + dsimp only [R,e,d] + simp only [star_sub,star_mul,star_star] + noncomm_ring + rw [he] + exact star_left_conjugate_nonneg (sub_nonneg.mpr hvv) a + have hn := CStarAlgebra.norm_le_norm_of_le_of_nonneg hR (star_mul_self_nonneg d) + rw [CStarRing.norm_star_mul_self] at hn + have hRn : ‖R‖ ≤ ‖star v*(star a*a)*v-star a*a‖+2*‖a‖*‖e‖ := by + calc + _ ≤ ‖star v*(star a*a)*v-star a*a‖+‖star a*e‖+‖star e*a‖ := norm_add₃_le + _ ≤ ‖star v*(star a*a)*v-star a*a‖+‖star a‖*‖e‖+‖star e‖*‖a‖ := by + gcongr <;> exact norm_mul_le _ _ + _ = _ := by rw [norm_star,norm_star]; ring + have he : ‖e‖=‖star v*a*v-a‖ := norm_sub_rev _ _ + rw [he] at hRn + exact (by simpa only [pow_two] using hn.trans hRn) + +end UnitalEstimate + +section NonUnitalEstimate + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +lemma norm_commutator_sq_le (v a : A) (hv : ‖v‖ ≤ 1) : + ‖a*v-v*a‖^2 ≤ ‖star v*(star a*a)*v-star a*a‖ + + 2*‖a‖*‖star v*a*v-a‖ := by + have h := norm_commutator_sq_le_unital (v : Unitization ℂ A) (a : Unitization ℂ A) + (by simpa only [Unitization.norm_inr] using hv) + simpa only [← Unitization.inr_mul,← Unitization.inr_star,← Unitization.inr_sub, + Unitization.norm_inr] using h + +lemma norm_relative_initial_defect_le (v a : A) (hv : ‖v‖ ≤ 1) : + ‖(star v*v)*a-a‖ ≤ ‖a*v-v*a‖+‖star v*a*v-a‖ := by + have he : (star v*v)*a-a= -star v*(a*v-v*a)+(star v*a*v-a) := by noncomm_ring + rw [he] + calc + _ ≤ ‖-star v*(a*v-v*a)‖+‖star v*a*v-a‖ := norm_add_le _ _ + _ ≤ ‖-star v‖*‖a*v-v*a‖+‖star v*a*v-a‖ := by gcongr; exact norm_mul_le _ _ + _ ≤ _ := by simpa only [norm_neg,norm_star,one_mul] using + add_le_add (mul_le_mul_of_nonneg_right hv (norm_nonneg (a*v-v*a))) (le_refl ‖star v*a*v-a‖) + +lemma norm_relative_cross_defect_le (s t a : A) (hs : ‖s‖ ≤ 1) : + ‖(star s*t)*a‖ ≤ ‖a*t-t*a‖+‖star s*a*t‖ := by + have he : (star s*t)*a= -star s*(a*t-t*a)+star s*a*t := by noncomm_ring + rw [he] + calc + _ ≤ ‖-star s*(a*t-t*a)‖+‖star s*a*t‖ := norm_add_le _ _ + _ ≤ ‖-star s‖*‖a*t-t*a‖+‖star s*a*t‖ := by gcongr; exact norm_mul_le _ _ + _ ≤ _ := by simpa only [norm_neg,norm_star,one_mul] using + add_le_add (mul_le_mul_of_nonneg_right hs (norm_nonneg (a*t-t*a))) (le_refl ‖star s*a*t‖) + +def ContractiveIdentityDiagonalization (A : Type*) [NonUnitalCStarAlgebra A] : Prop := + ∀ (F : Finset A) (ε : ℝ),0 < ε →∃ s t : A,‖s‖≤1 ∧ ‖t‖≤1 ∧ + ∀ a ∈ F,‖star s*a*s-a‖<ε ∧ ‖star t*a*t-a‖<ε ∧ ‖star s*a*t‖<ε + +def LocalCentralCuntzPair (A : Type*) [NonUnitalCStarAlgebra A] : Prop := + ∀ (F : Finset A) (ε : ℝ),0 < ε →∃ s t : A,‖s‖≤1 ∧ ‖t‖≤1 ∧ + ∀ a ∈ F,‖a*s-s*a‖<ε ∧ ‖a*t-t*a‖<ε ∧ + ‖(star s*s)*a-a‖<ε ∧ ‖(star t*t)*a-a‖<ε ∧ ‖(star s*t)*a‖<ε + +lemma ContractiveIdentityDiagonalization.localCentralCuntzPair + (h : ContractiveIdentityDiagonalization A) : LocalCentralCuntzPair A := by + classical + intro F ε hε + let M : ℝ := 1+∑ a ∈ F,‖a‖ + have hM : 0 < M := by dsimp only [M]; positivity + have haM (a : A) (ha : a ∈ F) : ‖a‖ ≤ M := by + have hs := Finset.single_le_sum (f := fun b : A => ‖b‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M] + linarith + let δ := min (ε/4) (ε^2/(16*(1+2*M))) + have hδ : 0 < δ := lt_min (by positivity) (by positivity) + have hδε : δ ≤ ε/4 := min_le_left _ _ + have hδsq : (1+2*M)*δ ≤ ε^2/16 := by + have hle : δ ≤ ε^2/(16*(1+2*M)) := min_le_right _ _ + have hp : 0 < 16*(1+2*M) := by positivity + have hh := (le_div_iff₀ hp).mp hle + nlinarith + obtain ⟨s,t,hs,ht,hF⟩ := h (F ∪ F.image (fun a => star a*a)) δ hδ + have he (a : A) (ha : a ∈ F) := hF a (Finset.mem_union_left _ ha) + have he2 (a : A) (ha : a ∈ F) := hF (star a*a) + (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨a,ha,rfl⟩)) + have hcomm (v a : A) (hv : ‖v‖≤1) (ha : a ∈ F) + (hva : ‖star v*a*v-a‖<δ) + (hv2 : ‖star v*(star a*a)*v-star a*a‖<δ) : ‖a*v-v*a‖<ε/2 := by + have hn := norm_commutator_sq_le v a hv + have hna : 0 ≤ ‖a‖ := norm_nonneg _ + have hbound : ‖a*v-v*a‖^2 ≤ (1+2*M)*δ := calc + _ ≤ δ+2*‖a‖*δ := hn.trans (add_le_add hv2.le (mul_le_mul_of_nonneg_left hva.le (by positivity))) + _ ≤ (1+2*M)*δ := by nlinarith [haM a ha] + have hn0 := norm_nonneg (a*v-v*a) + nlinarith + refine ⟨s,t,hs,ht,?_⟩ + intro a ha + have hsa := hcomm s a hs ha (he a ha).1 (he2 a ha).1 + have hta := hcomm t a ht ha (he a ha).2.1 (he2 a ha).2.1 + have hsi := norm_relative_initial_defect_le s a hs + have hti := norm_relative_initial_defect_le t a ht + have hst := norm_relative_cross_defect_le s t a hs + have hbase := he a ha + refine ⟨by linarith,by linarith,?_,?_,?_⟩ <;> linarith + +lemma LocalCentralCuntzPair.contractiveIdentityDiagonalization + (h : LocalCentralCuntzPair A) : ContractiveIdentityDiagonalization A := by + intro F ε hε + obtain ⟨s,t,hs,ht,hF⟩ := h F (ε/3) (by positivity) + refine ⟨s,t,hs,ht,?_⟩ + intro a ha + obtain ⟨hsa,hta,hsi,hti,hst⟩ := hF a ha + have hcomp (v : A) (hv : ‖v‖≤1) : + ‖star v*a*v-a‖ ≤ ‖a*v-v*a‖+‖(star v*v)*a-a‖ := by + have he : star v*a*v-a=star v*(a*v-v*a)+((star v*v)*a-a) := by noncomm_ring + rw [he] + calc + _ ≤ ‖star v*(a*v-v*a)‖+‖(star v*v)*a-a‖ := norm_add_le _ _ + _ ≤ ‖star v‖*‖a*v-v*a‖+‖(star v*v)*a-a‖ := by gcongr; exact norm_mul_le _ _ + _ ≤ _ := by simpa only [norm_star,one_mul] using + add_le_add (mul_le_mul_of_nonneg_right hv (norm_nonneg (a*v-v*a))) (le_refl ‖(star v*v)*a-a‖) + have hcross : ‖star s*a*t‖ ≤ ‖a*t-t*a‖+‖(star s*t)*a‖ := by + have he : star s*a*t=star s*(a*t-t*a)+(star s*t)*a := by noncomm_ring + rw [he] + calc + _ ≤ ‖star s*(a*t-t*a)‖+‖(star s*t)*a‖ := norm_add_le _ _ + _ ≤ ‖star s‖*‖a*t-t*a‖+‖(star s*t)*a‖ := by gcongr; exact norm_mul_le _ _ + _ ≤ _ := by simpa only [norm_star,one_mul] using + add_le_add (mul_le_mul_of_nonneg_right hs (norm_nonneg (a*t-t*a))) (le_refl ‖(star s*t)*a‖) + refine ⟨?_,?_,?_⟩ + · have hh := hcomp s hs; linarith + · have hh := hcomp t ht; linarith + · linarith + +lemma contractiveIdentityDiagonalization_iff_localCentralCuntzPair : + ContractiveIdentityDiagonalization A ↔ LocalCentralCuntzPair A := + ⟨ContractiveIdentityDiagonalization.localCentralCuntzPair, + LocalCentralCuntzPair.contractiveIdentityDiagonalization⟩ + +end NonUnitalEstimate + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ChoiFactor.lean b/lean/OAI/Analysis/WeakInfiniteness/ChoiFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ed625246b17d539e85fc19408827f049bf52ab6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ChoiFactor.lean @@ -0,0 +1,117 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section MatrixUnits + +variable {n : Type*} [Fintype n] [DecidableEq n] + +omit [Fintype n] in +lemma matrixUnit_star (i j : n) : star (matrixUnit i j)=matrixUnit j i := by + ext k l + change star (if l=i ∧ k=j then (1:ℂ) else 0)=(if k=j ∧ l=i then 1 else 0) + by_cases h : l=i ∧ k=j + · simp [h] + · have hh : ¬(k=j ∧ l=i) := by tauto + simp [h,hh] + +lemma matrixUnit_mul (i j k l : n) : + matrixUnit i j*matrixUnit k l=if j=k then matrixUnit i l else 0 := by + ext a b + change (∑ c,(if a=i ∧ c=j then (1:ℂ) else 0)*(if c=k ∧ b=l then 1 else 0))=_ + by_cases h : j=k + · subst k + rw [ite_eq_left rfl] + change _=if a=i ∧ b=l then (1:ℂ) else 0 + by_cases ha : a=i <;> by_cases hb : b=l <;> simp [ha,hb] + · simp only [ite_eq_right h] + change _=0 + apply Finset.sum_eq_zero + intro c _ + by_cases hc : c=j + · subst c; simp [h] + · simp [hc] + +lemma matrixUnits_nonneg (k : n) : + 0≤(CStarMatrix.ofMatrix (fun i j : n => matrixUnit i j) : + CStarMatrix n n (CStarMatrix n n ℂ)) := by + let R : CStarMatrix n n (CStarMatrix n n ℂ) := + CStarMatrix.ofMatrix (fun i j => if i=k then matrixUnit k j else 0) + have he : star R*R=CStarMatrix.ofMatrix (fun i j : n => matrixUnit i j) := by + ext i j a b + have hentry : (star R*R) i j=matrixUnit i j := by + change (∑ l,star (if l=k then matrixUnit k i else 0)*(if l=k then matrixUnit k j else 0))=_ + rw [Finset.sum_eq_single k] + · simp [matrixUnit_star,matrixUnit_mul] + · intro l _ hl + simp [hl] + · simp + exact congrArg (fun M : CStarMatrix n n ℂ => M a b) hentry + rw [← he] + exact star_mul_self_nonneg R + +end MatrixUnits + +section Coefficients + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance choiMatrixRealModule {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +lemma completelyPositive_matrix_gram {n : ℕ} (hn : 1≤n) + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) (hψ : CompletelyPositive ψ) : + ∃ X : CStarMatrix (Fin n) (Fin n) A,∀ i j, + ψ (matrixUnit i j)=∑ k,star (X k i)*X k j := by + let M : CStarMatrix (Fin n) (Fin n) A := + matrixLinearMap ψ (CStarMatrix.ofMatrix (fun i j : Fin n => matrixUnit i j)) + have hM : 0≤M := matrixLinearMap_nonneg hψ (matrixUnits_nonneg (⟨0,by omega⟩ : Fin n)) + let X := CFC.sqrt M + have hX : star X*X=M := by + rw [show star X=X from (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg M)).star_eq] + exact CFC.sqrt_mul_sqrt_self M hM + refine ⟨X,?_⟩ + intro i j + have he := congrArg (fun Z : CStarMatrix (Fin n) (Fin n) A => Z i j) hX + exact he.symm + +omit [PartialOrder A] [StarOrderedRing A] in +lemma completelyPositive_matrix_expansion {n : ℕ} + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) + (X : CStarMatrix (Fin n) (Fin n) A) + (hX : ∀ i j,ψ (matrixUnit i j)=∑ k,star (X k i)*X k j) + (M : CStarMatrix (Fin n) (Fin n) ℂ) : + ψ M=∑ i,∑ j,M i j • (∑ k,star (X k i)*X k j) := by + conv_lhs => rw [← matrix_unit_expansion M] + simp only [map_sum,map_smul,hX] + +end Coefficients + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/Clipping.lean b/lean/OAI/Analysis/WeakInfiniteness/Clipping.lean new file mode 100644 index 0000000000000000000000000000000000000000..2bc5e5a151a7aa7ab0a93169a0efbf1e330706f9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/Clipping.lean @@ -0,0 +1,145 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +def clipFunction (t : ℝ) : ℝ := (max 1 (Real.sqrt t))⁻¹ + +lemma continuous_clipFunction : Continuous clipFunction := by + apply Continuous.inv₀ + · exact continuous_const.max Real.continuous_sqrt + · intro t + have : 0 < max (1 : ℝ) (Real.sqrt t) := lt_of_lt_of_le zero_lt_one (le_max_left _ _) + exact ne_of_gt this + +lemma clipFunction_nonneg (t : ℝ) : 0 ≤ clipFunction t := by + unfold clipFunction + positivity + +lemma clipFunction_le_one (t : ℝ) : clipFunction t ≤ 1 := by + unfold clipFunction + exact inv_le_one_of_one_le₀ (le_max_left _ _) + +def cstarClip (v : B) : B := v*cfc clipFunction (star v*v) + +lemma star_mul_function_square (v : B) (f : ℝ → ℝ) (hf : Continuous f) : + star (v*cfc f (star v*v))*(v*cfc f (star v*v))= + cfc (fun t => f t*t*f t) (star v*v) := by + have ha : IsSelfAdjoint (star v*v) := (star_mul_self_nonneg v).isSelfAdjoint + rw [star_mul, (cfc_predicate f (star v*v)).star_eq] + calc + (cfc f (star v*v)*star v)*(v*cfc f (star v*v)) = + (cfc f (star v*v)*(star v*v))*cfc f (star v*v) := by noncomm_ring + _ = (cfc f (star v*v)*cfc (fun t : ℝ => t) (star v*v))*cfc f (star v*v) := by + rw [cfc_id' ℝ (star v*v)] + _ = cfc (fun t => f t*t*f t) (star v*v) := by + rw [← cfc_mul f (fun t : ℝ => t) (star v*v) hf.continuousOn continuous_id.continuousOn, + ← cfc_mul (fun t : ℝ => f t*t) f (star v*v) (hf.mul continuous_id).continuousOn hf.continuousOn] + +lemma clip_scalar_norm (t : ℝ) (ht : 0 ≤ t) : + ‖clipFunction t*t*clipFunction t‖ ≤ 1 := by + have hsq := Real.sq_sqrt ht + have hs := Real.sqrt_nonneg t + have hf := clipFunction_nonneg t + rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] + unfold clipFunction + by_cases ht1 : Real.sqrt t ≤ 1 + · rw [max_eq_left ht1, inv_one, one_mul, mul_one] + nlinarith + · have hs1 : 1 < Real.sqrt t := lt_of_not_ge ht1 + rw [max_eq_right hs1.le] + have hs0 : Real.sqrt t ≠ 0 := ne_of_gt (lt_trans zero_lt_one hs1) + have : (Real.sqrt t)⁻¹*t*(Real.sqrt t)⁻¹=1 := by + calc + _ = (Real.sqrt t)⁻¹*(Real.sqrt t)^2*(Real.sqrt t)⁻¹ := by rw [hsq] + _ = 1 := by field_simp + exact this.le + +lemma norm_cstarClip_le (v : B) : ‖cstarClip v‖ ≤ 1 := by + have ha : 0 ≤ star v*v := star_mul_self_nonneg v + have hn : ‖star (cstarClip v)*cstarClip v‖ ≤ 1 := by + rw [cstarClip, star_mul_function_square v clipFunction continuous_clipFunction] + apply norm_cfc_le zero_le_one + intro t ht + exact clip_scalar_norm t (spectrum_nonneg_of_nonneg ha ht) + rw [CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (cstarClip v)] + +lemma clip_scalar_difference_bound (t M : ℝ) (ht : 0 ≤ t) (hM : 0 ≤ M) (htM : t ≤ M^2) : + ‖(1-clipFunction t)*t*(1-clipFunction t)‖ ≤ (max (M-1) 0)^2 := by + have hs := Real.sqrt_nonneg t + have hsq := Real.sq_sqrt ht + have hsM : Real.sqrt t ≤ M := by nlinarith + have hg : 0 ≤ 1-clipFunction t := sub_nonneg.mpr (clipFunction_le_one t) + rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] + unfold clipFunction + by_cases ht1 : Real.sqrt t ≤ 1 + · rw [max_eq_left ht1, inv_one, sub_self, zero_mul, zero_mul] + positivity + · have hs1 : 1 < Real.sqrt t := lt_of_not_ge ht1 + rw [max_eq_right hs1.le] + have hs0 : Real.sqrt t ≠ 0 := ne_of_gt (lt_trans zero_lt_one hs1) + have hid : (1-(Real.sqrt t)⁻¹)*t*(1-(Real.sqrt t)⁻¹)=(Real.sqrt t-1)^2 := by + calc + _ = (1-(Real.sqrt t)⁻¹)*(Real.sqrt t)^2*(1-(Real.sqrt t)⁻¹) := by rw [hsq] + _ = (Real.sqrt t-1)^2 := by field_simp + rw [hid, max_eq_left (by linarith : 0 ≤ M-1)] + nlinarith + +omit [PartialOrder B] [StarOrderedRing B] in +lemma sub_cstarClip (v : B) : + v-cstarClip v=v*cfc (fun t : ℝ => 1-clipFunction t) (star v*v) := by + rw [cfc_sub (fun _ : ℝ => 1) clipFunction (star v*v) continuous_const.continuousOn + continuous_clipFunction.continuousOn, cfc_const_one ℝ (star v*v), mul_sub, mul_one] + rfl + +lemma norm_sub_cstarClip_le (v : B) : ‖v-cstarClip v‖ ≤ max (‖v‖-1) 0 := by + nontriviality B + have ha : 0 ≤ star v*v := star_mul_self_nonneg v + have hn : ‖star (v-cstarClip v)*(v-cstarClip v)‖ ≤ (max (‖v‖-1) 0)^2 := by + rw [sub_cstarClip, star_mul_function_square v (fun t : ℝ => 1-clipFunction t) + (continuous_const.sub continuous_clipFunction)] + apply norm_cfc_le (sq_nonneg _) + intro t ht + apply clip_scalar_difference_bound t ‖v‖ (spectrum_nonneg_of_nonneg ha ht) (norm_nonneg v) + have hh := spectrum.norm_le_norm_of_mem ht + rw [Real.norm_eq_abs, abs_of_nonneg (spectrum_nonneg_of_nonneg ha ht), + CStarRing.norm_star_mul_self] at hh + nlinarith + rw [CStarRing.norm_star_mul_self] at hn + have hm : 0 ≤ max (‖v‖-1) 0 := le_max_right _ _ + nlinarith [norm_nonneg (v-cstarClip v)] + +lemma map_cstarClip {C : Type*} [CStarAlgebra C] [PartialOrder C] [StarOrderedRing C] + (π : B →⋆ₐ[ℂ] C) (v : B) : π (cstarClip v)=cstarClip (π v) := by + have ha : IsSelfAdjoint (star v*v) := (star_mul_self_nonneg v).isSelfAdjoint + rw [cstarClip, map_mul, π.map_cfc clipFunction (star v*v) + continuous_clipFunction.continuousOn (by fun_prop) ha (ha.map π), map_mul, map_star] + rfl + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ClippingTools.lean b/lean/OAI/Analysis/WeakInfiniteness/ClippingTools.lean new file mode 100644 index 0000000000000000000000000000000000000000..bec29cd606149e56e4c11745c42c0f27625c60ac --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ClippingTools.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Clipping + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma norm_clip_sub_le {T W : B} {δ : ℝ} (hδ : 0 ≤ δ) + (hW : ‖W‖ ≤ 1) (hTW : ‖T-W‖ ≤ δ) : ‖cstarClip T-W‖ ≤ 2*δ := by + have hT : ‖T‖ ≤ 1+δ := (norm_le_norm_add_norm_sub' T W).trans (add_le_add hW hTW) + have hc : ‖T-cstarClip T‖ ≤ δ := + (norm_sub_cstarClip_le T).trans (max_le (by linarith) hδ) + calc + ‖cstarClip T-W‖ ≤ ‖cstarClip T-T‖+‖T-W‖ := by + simpa only [dist_eq_norm] using dist_triangle (cstarClip T) T W + _ ≤ δ+δ := by rw [norm_sub_rev (cstarClip T) T]; exact add_le_add hc hTW + _ = 2*δ := by ring + +variable {H K : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + +omit [CompleteSpace H] [CompleteSpace K] in +lemma isometry_intertwiner_error_le (T W : K →L[ℂ] K) (D : H →L[ℂ] H) + (J : H →ₗᵢ[ℂ] K) (hW : W.comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp D) : + ‖T.comp J.toContinuousLinearMap-J.toContinuousLinearMap.comp D‖ ≤ ‖T-W‖ := by + rw [← hW, ← ContinuousLinearMap.sub_comp] + apply (ContinuousLinearMap.opNorm_comp_le _ _).trans + have hn : ‖J.toContinuousLinearMap‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro x + change ‖J x‖ ≤ 1*‖x‖ + rw [J.norm_map, one_mul] + exact (mul_le_mul_of_nonneg_left hn (norm_nonneg _)).trans_eq (mul_one _) + +lemma clip_reducing_models (T W : K →L[ℂ] K) (D : H →L[ℂ] H) + (J : H →ₗᵢ[ℂ] K) {δ : ℝ} (hδ : 0 ≤ δ) (hW : ‖W‖ ≤ 1) (hTW : ‖T-W‖ ≤ δ) + (hr : W.comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp D) + (hra : (star W).comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp (star D)) : + ‖(cstarClip T).comp J.toContinuousLinearMap-J.toContinuousLinearMap.comp D‖ ≤ 2*δ ∧ + ‖(star (cstarClip T)).comp J.toContinuousLinearMap-J.toContinuousLinearMap.comp (star D)‖ ≤ 2*δ := by + have hnorm := norm_clip_sub_le hδ hW hTW + constructor + · exact (isometry_intertwiner_error_le _ _ _ J hr).trans hnorm + · apply (isometry_intertwiner_error_le _ _ _ J hra).trans + rwa [← star_sub, norm_star] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ColumnCoreNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/ColumnCoreNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..e63208320cef7bcb4411d084ab914d2cffc2a4fc --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ColumnCoreNorm.lean @@ -0,0 +1,60 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ColumnNormalization + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma norm_column_core (D : B) {τ : ℝ} (hτ : 0 ≤ τ) : + ‖cfc (columnCoreFunction τ) (star D*D)‖=max (‖D‖-τ) 0 := by + obtain hB | hB := subsingleton_or_nontrivial B + · have hD : D=0 := Subsingleton.elim _ _ + have hz : cfc (columnCoreFunction τ) (star D*D)=0 := Subsingleton.elim _ _ + rw [hz,norm_zero,hD,norm_zero] + simp only [zero_sub,max_eq_right (neg_nonpos.mpr hτ)] + let : Nontrivial B := hB + apply le_antisymm + · apply norm_cfc_le (le_max_right _ _) + intro s hs + have hs0 := spectrum_nonneg_of_nonneg (star_mul_self_nonneg D) hs + have hsn := (Real.le_norm_self s).trans (spectrum.norm_le_norm_of_mem hs) + rw [CStarRing.norm_star_mul_self] at hsn + have hsr : Real.sqrt s ≤ ‖D‖ := by + nlinarith [Real.sq_sqrt hs0,Real.sqrt_nonneg s,norm_nonneg D] + rw [Real.norm_eq_abs,abs_of_nonneg (le_max_right _ _)] + exact max_le_max (by linarith) le_rfl + · have he := norm_apply_le_norm_cfc (columnCoreFunction τ) (star D*D) + (CStarAlgebra.norm_mem_spectrum_of_nonneg (star D * D) (star_mul_self_nonneg D)) + (continuous_columnCoreFunction τ).continuousOn (IsSelfAdjoint.star_mul_self D) + rw [Real.norm_eq_abs,abs_of_nonneg (le_max_right _ _),CStarRing.norm_star_mul_self] at he + simpa only [columnCoreFunction,Real.sqrt_mul_self (norm_nonneg D)] using he + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ColumnNormalization.lean b/lean/OAI/Analysis/WeakInfiniteness/ColumnNormalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..c611e7266a368181e09af0f9e0d77d68a88468d9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ColumnNormalization.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Intertwining + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +def columnMetricFunction (τ s : ℝ) : ℝ := (max τ (Real.sqrt s))⁻¹ + +def columnCoreFunction (τ s : ℝ) : ℝ := max (Real.sqrt s-τ) 0 + +lemma continuous_columnMetricFunction {τ : ℝ} (hτ : 0 < τ) : + Continuous (columnMetricFunction τ) := by + apply Continuous.inv₀ (continuous_const.max Real.continuous_sqrt) + intro s + exact ne_of_gt (lt_of_lt_of_le hτ (le_max_left _ _)) + +lemma continuous_columnCoreFunction (τ : ℝ) : Continuous (columnCoreFunction τ) := by + unfold columnCoreFunction + fun_prop + +lemma columnMetricFunction_nonneg {τ : ℝ} (hτ : 0 < τ) (s : ℝ) : + 0 ≤ columnMetricFunction τ s := inv_nonneg.mpr (hτ.le.trans (le_max_left _ _)) + +lemma columnMetricFunction_bound {τ : ℝ} (hτ : 0 < τ) (s : ℝ) : + columnMetricFunction τ s ≤ τ⁻¹ := + inv_anti₀ hτ (le_max_left _ _) + +lemma columnMetricFunction_scalar {τ s : ℝ} (hτ : 0 < τ) (hs : 0 ≤ s) : + 0 ≤ s*(columnMetricFunction τ s)^2 ∧ s*(columnMetricFunction τ s)^2 ≤ 1 ∧ + (s*(columnMetricFunction τ s)^2)*columnCoreFunction τ s=columnCoreFunction τ s := by + have hm : 0 < max τ (Real.sqrt s) := hτ.trans_le (le_max_left _ _) + have he : s*(columnMetricFunction τ s)^2=(Real.sqrt s/max τ (Real.sqrt s))^2 := by + rw [div_pow,Real.sq_sqrt hs] + simp only [columnMetricFunction,div_eq_mul_inv,inv_pow] + have hr0 : 0 ≤ Real.sqrt s/max τ (Real.sqrt s) := div_nonneg (Real.sqrt_nonneg _) hm.le + have hr1 : Real.sqrt s/max τ (Real.sqrt s) ≤ 1 := (div_le_one₀ hm).mpr (le_max_right _ _) + refine ⟨by positivity,by rw [he]; nlinarith,?_⟩ + by_cases h : Real.sqrt s ≤ τ + · have hc : columnCoreFunction τ s=0 := max_eq_right (sub_nonpos.mpr h) + rw [hc,mul_zero] + · have hp : 0 < Real.sqrt s := hτ.trans (lt_of_not_ge h) + have hmax : max τ (Real.sqrt s)=Real.sqrt s := max_eq_right (le_of_not_ge h) + rw [he,hmax,div_self (ne_of_gt hp),one_pow,one_mul] + +lemma column_left_normalization (D : B) {τ : ℝ} (hτ : 0 < τ) : + let F := cfc (columnMetricFunction τ) (D*star D) + let p := F*D + let h := cfc (columnCoreFunction τ) (star D*D) + ‖F‖ ≤ τ⁻¹ ∧ ‖p‖ ≤ 1 ∧ 0 ≤ h ∧ star p*p*h=h := by + dsimp only + let f := columnMetricFunction τ + let G := cfc f (star D*D) + have hf := continuous_columnMetricFunction hτ + have hc := continuous_columnCoreFunction τ + have hF : ‖cfc f (D*star D)‖ ≤ τ⁻¹ := by + apply norm_cfc_le (by positivity) + intro s _ + rw [Real.norm_eq_abs,abs_of_nonneg (columnMetricFunction_nonneg hτ s)] + exact columnMetricFunction_bound hτ s + have hG : IsSelfAdjoint G := cfc_predicate _ _ + have hpair : star (cfc f (D*star D)*D)*(cfc f (D*star D)*D)= + cfc (fun s : ℝ => s*(f s)^2) (star D*D) := by + rw [cfc_star_mul_intertwine D f hf,star_mul,hG.star_eq] + have hfun : cfc (fun s : ℝ => s*(f s)^2) (star D*D)=(star D*D)*G*G := by + rw [show (fun s : ℝ => s*(f s)^2)=(fun s : ℝ => s*f s*f s) by ext; ring] + rw [cfc_mul (fun s : ℝ => s*f s) f _ (continuous_id.mul hf).continuousOn hf.continuousOn, + cfc_mul (fun s : ℝ => s) f _ continuous_id.continuousOn hf.continuousOn,cfc_id' ℝ (star D*D) (IsSelfAdjoint.star_mul_self D)] + rw [hfun] + have hcomm : Commute G (star D*D) := (Commute.refl (star D*D)).cfc_real f + calc + G*star D*(D*G)=G*(star D*D)*G := by simp only [mul_assoc] + _=(star D*D)*G*G := by rw [hcomm.eq] + have hp : ‖cfc f (D*star D)*D‖ ≤ 1 := by + have hn : ‖cfc (fun s : ℝ => s*(f s)^2) (star D*D)‖ ≤ 1 := by + apply norm_cfc_le (by positivity) + intro s hs + have h := columnMetricFunction_scalar hτ (spectrum_nonneg_of_nonneg (star_mul_self_nonneg D) hs) + rw [Real.norm_eq_abs,abs_of_nonneg h.1] + exact h.2.1 + rw [← hpair,CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (cfc f (D*star D)*D)] + refine ⟨hF,hp,cfc_nonneg (fun s _ => le_max_right _ _),?_⟩ + rw [hpair,← cfc_mul (fun s : ℝ => s*(f s)^2) (columnCoreFunction τ) _ + (continuous_id.mul (hf.pow 2)).continuousOn hc.continuousOn] + apply cfc_congr + intro s hs + exact (columnMetricFunction_scalar hτ (spectrum_nonneg_of_nonneg (star_mul_self_nonneg D) hs)).2.2 + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CompatibleInverse.lean b/lean/OAI/Analysis/WeakInfiniteness/CompatibleInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a7611cfeb10e61618035f477f6f11f45c551466 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CompatibleInverse.lean @@ -0,0 +1,127 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +section Unital + +variable {B : Type*} [CStarAlgebra B] [Nontrivial B] + +lemma exists_small_inverse (a : B) {d : ℝ} (had : ‖a‖ ≤ d) (hd : d < 1) : + ∃ b : B,(1+a)*b=1 ∧ b*(1+a)=1 ∧ ‖b‖ ≤ (1-d)⁻¹ := by + have ha : ‖-a‖ < 1 := by simpa only [norm_neg] using had.trans_lt hd + let u := Units.oneSub (-a) ha + let b : B := ↑u⁻¹ + have hl : (1+a)*b=1 := by simpa only [u,Units.val_oneSub,sub_neg_eq_add] using u.mul_inv + have hr : b*(1+a)=1 := by simpa only [u,Units.val_oneSub,sub_neg_eq_add] using u.inv_mul + refine ⟨b,hl,hr,?_⟩ + have he : b=1-a*b := by + rw [add_mul,one_mul] at hl + exact (eq_sub_iff_add_eq).mpr hl + have hb := norm_sub_le (1 : B) (a*b) + have hn1 : ‖(1 : B)‖ ≤ 1 := norm_one.le + have hm := norm_mul_le a b + have hab : ‖a‖*‖b‖ ≤ d*‖b‖ := mul_le_mul_of_nonneg_right had (norm_nonneg b) + rw [← he] at hb + rw [inv_eq_one_div] + change ‖b‖ ≤ 1/(1-d) + apply (le_div_iff₀ (by linarith : 0 < 1-d)).mpr + nlinarith + +lemma exists_factored_inverse (g a : B) (hg : ‖g‖ ≤ 1) {d : ℝ} + (had : ‖a‖ ≤ d) (hd : d < 1) : + ∃ z : B, ‖z‖ ≤ d/(1-d) ∧ + (1+g*a*g)*(1+g*z*g)=1 ∧ (1+g*z*g)*(1+g*a*g)=1 := by + have hd0 : 0 ≤ d := (norm_nonneg a).trans had + have hagg : ‖a*g*g‖ ≤ d := by + calc + _≤‖a‖*‖g‖*‖g‖ := (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _≤d*1*1 := by gcongr + _=d := by ring + obtain ⟨b,hl,hr,hb⟩ := exists_small_inverse (a*g*g) hagg hd + refine ⟨-b*a,?_,?_,?_⟩ + · calc + ‖-b*a‖≤‖-b‖*‖a‖ := norm_mul_le _ _ + _≤(1-d)⁻¹*d := by rw [norm_neg]; gcongr + _=d/(1-d) := by ring + · calc + _=1+g*a*g-g*((1+a*g*g)*b)*a*g := by noncomm_ring + _=1 := by rw [hl]; noncomm_ring + · calc + _=1+g*a*g-g*(b*(1+a*g*g))*a*g := by noncomm_ring + _=1 := by rw [hr]; noncomm_ring + +lemma norm_one_add_le (a : B) : ‖1+a‖ ≤ 1+‖a‖ := by + simpa only [norm_one] using norm_add_le (1 : B) a + +lemma norm_factored_perturbation_le (g z : B) (hg : ‖g‖ ≤ 1) : + ‖1+g*z*g‖ ≤ 1+‖z‖ := by + apply (norm_one_add_le _).trans + apply add_le_add_right + calc + _≤‖g‖*‖z‖*‖g‖ := (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _≤1*‖z‖*1 := by gcongr + _=‖z‖ := by ring + +lemma normalized_inverse_difference_bound + (g z Z Z₁ W W₁ p F C e y : B) {η : ℝ} + (hη : 0 ≤ η) (hg : ‖g‖ ≤ 1) (hz : ‖z‖ ≤ 1/3) (hZ₁ : ‖Z₁‖ ≤ 9/8) + (hp : ‖p‖ ≤ 1) (he : ‖e‖ ≤ 1) (hy : ‖y‖ ≤ 1) + (hgself : IsSelfAdjoint g) (hZ : Z=1+g*z*g) (hFCg : F*C*g=p) + (hZW : Z*star W=1) (hW₁Z₁ : star W₁*Z₁=1) + (hW : W=W₁+(η : ℂ) • (g*y*g)) : + ‖F*C*(Z-Z₁)*e‖ ≤ 3/2*η := by + have hdiff : Z-Z₁= -(η : ℂ) • (Z*g*star y*g*Z₁) := by + have heq : Z*(star W₁-star W)*Z₁=Z-Z₁ := by + rw [mul_sub,sub_mul,mul_assoc Z (star W₁) Z₁,hW₁Z₁,hZW,mul_one,one_mul] + rw [← heq,hW,star_add,star_smul,star_mul,star_mul,hgself.star_eq] + simp only [Complex.star_def,Complex.conj_ofReal,sub_add_cancel_left,neg_mul,mul_neg,mul_smul_comm,smul_mul_assoc] + simp only [mul_assoc,neg_smul] + rw [hdiff,mul_smul_comm,smul_mul_assoc,norm_smul,norm_neg,Complex.norm_real, + Real.norm_eq_abs,abs_of_nonneg hη] + have halg : F*C*(Z*g*star y*g*Z₁)*e=p*(1+z*g*g)*star y*g*Z₁*e := by + rw [hZ,← hFCg] + noncomm_ring + rw [halg] + have hh : ‖1+z*g*g‖ ≤ 4/3 := by + have hmul : ‖z*g*g‖ ≤ 1/3 := by + calc + _≤‖z‖*‖g‖*‖g‖ := (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _≤(1/3)*1*1 := by gcongr + _=1/3 := by ring + exact (norm_one_add_le _).trans (by linarith) + have hn : ‖p*(1+z*g*g)*star y*g*Z₁*e‖ ≤ 3/2 := by + calc + _≤‖p‖*‖1+z*g*g‖*‖star y‖*‖g‖*‖Z₁‖*‖e‖ := by + repeat' first | apply (norm_mul_le _ _).trans | apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + exact le_refl _ + _≤1*(4/3)*1*1*(9/8)*1 := by rw [norm_star]; gcongr + _=3/2 := by norm_num + nlinarith + +end Unital + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CompatiblePerturbations.lean b/lean/OAI/Analysis/WeakInfiniteness/CompatiblePerturbations.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d218a17e37efa4970c888720a37a78c99e93dab --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CompatiblePerturbations.lean @@ -0,0 +1,205 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CompatibleInverse +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.UniformPerturbation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable (A : Type 1) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def UniformPerturbationOne (σ : ℝ) : Prop := + ∀ p q h k c : A, ‖p‖ ≤ 1 → ‖q‖ ≤ 1 → 0 ≤ h → 0 ≤ k → 0 ≤ c → + star p*p*h=h → q*star q*k=k → + CuntzSubequiv (diagonalCopies 1 c) (diagonalCopies 1 h) → + CuntzSubequiv (diagonalCopies 1 c) (diagonalCopies 1 k) → + ∀ (T : A) (η α : ℝ), 0 < η → 0 < α → + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ + +lemma exists_uniformPerturbationOne (hA : Exact A) + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) : + ∃ σ : ℝ,0 < σ ∧ σ < 1 ∧ UniformPerturbationOne A σ := by + obtain ⟨σ,hσ,hσ1,h⟩ := exists_uniform_perturbation_constant_one + exact ⟨σ,hσ,hσ1,h A hA 1 (by norm_num) (fun a ha _ => hpi a ha)⟩ + +end + +section Algebra + +variable {B : Type*} [CStarAlgebra B] + +lemma metric_column_expansion (F C g e p y Z : B) (η : ℝ) + (hFCg : F*C*g=p) (hge : g*e=e) (hZ : Z=1+(η : ℂ) • (g*y*g)) : + F*C*Z*e=F*C*e+(η : ℂ) • (p*y*e) := by + rw [hZ,mul_add,add_mul,mul_one,mul_smul_comm,smul_mul_assoc] + congr 2 + calc + F*C*(g*y*g)*e = (F*C*g)*y*(g*e) := by simp only [mul_assoc] + _ = p*y*e := by rw [hFCg,hge] + +lemma metric_column_update (F C g e p y Z W : B) (η : ℝ) + (hFCg : F*C*g=p) (hge : g*e=e) (hZ : Z=W+(η : ℂ) • (g*y*g)) : + F*C*Z*e=F*C*W*e+(η : ℂ) • (p*y*e) := by + rw [hZ,mul_add,add_mul,mul_smul_comm,smul_mul_assoc] + congr 2 + calc + F*C*(g*y*g)*e = (F*C*g)*y*(g*e) := by simp only [mul_assoc] + _ = p*y*e := by rw [hFCg,hge] + +end Algebra + +section Unitization + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_snd_mul_inr (u : Unitization ℂ A) (a : A) : + ((u*(a : Unitization ℂ A)).snd : Unitization ℂ A)=u*(a : Unitization ℂ A) := by + apply unitization_inr_snd_of_fst_eq_zero + simp only [Unitization.fst_mul,Unitization.fst_inr,mul_zero] + +lemma exists_compatible_metric_perturbations + {σ τ : ℝ} (hσ : 0 < σ) (hσ1 : σ < 1) (hτ : 0 < τ) + (hpert : UniformPerturbationOne A σ) + (g F₁ F₂ C₁ C₂ : Unitization ℂ A) (hg : ‖g‖ ≤ 1) (hgsa : IsSelfAdjoint g) + (p₁ p₂ e f h₁ h₂ k₁ k₂ d₁ d₂ : A) + (hp₁ : ‖p₁‖ ≤ 1) (hp₂ : ‖p₂‖ ≤ 1) (he : ‖e‖ ≤ 1) (hf : ‖f‖ ≤ 1) + (hh₁ : 0 ≤ h₁) (hh₂ : 0 ≤ h₂) (hk₁ : 0 ≤ k₁) (hk₂ : 0 ≤ k₂) + (hd₁ : 0 ≤ d₁) (hd₂ : 0 ≤ d₂) + (hph₁ : star p₁*p₁*h₁=h₁) (hph₂ : star p₂*p₂*h₂=h₂) + (hek₁ : e*star e*k₁=k₁) (hfk₂ : f*star f*k₂=k₂) + (hdh₁ : CuntzSubequiv (diagonalCopies 1 d₁) (diagonalCopies 1 h₁)) + (hdh₂ : CuntzSubequiv (diagonalCopies 1 d₂) (diagonalCopies 1 h₂)) + (hdk₁ : CuntzSubequiv (diagonalCopies 1 d₁) (diagonalCopies 1 k₁)) + (hdk₂ : CuntzSubequiv (diagonalCopies 1 d₂) (diagonalCopies 1 k₂)) + (hge : g*(e : Unitization ℂ A)=(e : Unitization ℂ A)) + (hgf : g*(f : Unitization ℂ A)=(f : Unitization ℂ A)) + (hFC₁ : F₁*C₁*g=(p₁ : Unitization ℂ A)) + (hFC₂ : F₂*C₂*g=(p₂ : Unitization ℂ A)) : + ∃ Z W z w : Unitization ℂ A, + Z=1+g*z*g ∧ W=1+g*w*g ∧ star Z*W=1 ∧ + ‖Z‖ ≤ 2 ∧ ‖W‖ ≤ 2 ∧ + (∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + τ ≤ ‖π d₁‖ → σ/16 ≤ ‖(Unitization.starLift π) (F₁*C₁*Z*(e : Unitization ℂ A))‖) ∧ + (∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + τ ≤ ‖π d₂‖ → σ^2/128 ≤ ‖(Unitization.starLift π) (F₂*C₂*W*(f : Unitization ℂ A))‖) := by + let B := Unitization ℂ A + let η : ℝ := 1/8 + let η' : ℝ := σ/128 + have hη : 0 < η := by norm_num [η] + have hη' : 0 < η' := by dsimp [η']; positivity + let T₁ : A := (F₁*C₁*(e : B)).snd + have hT₁ : (T₁ : B)=F₁*C₁*(e : B) := inr_snd_mul_inr _ _ + obtain ⟨y,hy,hytest⟩ := hpert p₁ e h₁ k₁ d₁ hp₁ he hh₁ hk₁ hd₁ hph₁ hek₁ hdh₁ hdk₁ T₁ η τ hη hτ + let a₁ : B := (η : ℂ) • (y : B) + have ha₁ : ‖a₁‖ ≤ 1/8 := by + dsimp only [a₁,η] + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos (by norm_num : (0 : ℝ) < 1/8),Unitization.norm_inr] + nlinarith + let Z₁ : B := 1+g*a₁*g + have hZ₁ : ‖Z₁‖ ≤ 9/8 := (norm_factored_perturbation_le g a₁ hg).trans (by linarith) + obtain ⟨w₁,hw₁,hleft₁,hright₁⟩ := exists_factored_inverse g (star a₁) hg + (by simpa only [norm_star] using ha₁) (by norm_num : (1/8 : ℝ) < 1) + have hw₁' : ‖w₁‖ ≤ 1/7 := by norm_num at hw₁; exact hw₁ + let W₁ : B := 1+g*w₁*g + have hstarZ₁ : star Z₁=1+g*star a₁*g := by + dsimp only [Z₁] + rw [star_add,star_one,star_mul,star_mul,hgsa.star_eq] + simp only [mul_assoc] + have hW₁Z₁ : star W₁*Z₁=1 := by + have h := congrArg star hleft₁ + simpa only [← hstarZ₁,star_mul,star_star,star_one] using h + have hfirst (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (hπ : τ ≤ ‖π d₁‖) : + σ/8 ≤ ‖(Unitization.starLift π) (F₁*C₁*Z₁*(e : B))‖ := by + have hz : Z₁=1+(η : ℂ) • (g*(y : B)*g) := by simp only [Z₁,a₁,mul_smul_comm,smul_mul_assoc] + rw [metric_column_expansion F₁ C₁ g (e : B) (p₁ : B) (y : B) Z₁ η hFC₁ hge hz,← hT₁] + rw [← Unitization.inr_mul,← Unitization.inr_mul,← Unitization.inr_smul,← Unitization.inr_add, + starLift_inr_apply_general] + simpa only [η,div_eq_mul_inv,one_mul] using hytest H π hπ + let T₂ : A := (F₂*C₂*W₁*(f : B)).snd + have hT₂ : (T₂ : B)=F₂*C₂*W₁*(f : B) := inr_snd_mul_inr _ _ + obtain ⟨y',hy',hytest'⟩ := hpert p₂ f h₂ k₂ d₂ hp₂ hf hh₂ hk₂ hd₂ hph₂ hfk₂ hdh₂ hdk₂ T₂ η' τ hη' hτ + let w : B := w₁+(η' : ℂ) • (y' : B) + have hw : ‖w‖ ≤ 1/4 := by + have hn : ‖(η' : ℂ) • (y' : B)‖ ≤ η' := by + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hη',Unitization.norm_inr] + nlinarith + have hsum := norm_add_le w₁ ((η' : ℂ) • (y' : B)) + dsimp only [η'] at hn + dsimp only [w] + linarith + obtain ⟨z,hz,hleft,hright⟩ := exists_factored_inverse g (star w) hg + (by simpa only [norm_star] using hw) (by norm_num : (1/4 : ℝ) < 1) + have hz' : ‖z‖ ≤ 1/3 := by norm_num at hz; exact hz + let Z : B := 1+g*z*g + let W : B := 1+g*w*g + have hstarW : star W=1+g*star w*g := by + dsimp only [W] + rw [star_add,star_one,star_mul,star_mul,hgsa.star_eq] + simp only [mul_assoc] + have hZW : Z*star W=1 := by simpa only [hstarW] using hright + have hstarZW : star Z*W=1 := by + have h := congrArg star hleft + simpa only [← hstarW,star_mul,star_star,star_one] using h + have hW : W=W₁+(η' : ℂ) • (g*(y' : B)*g) := by + simp only [W,W₁,w,mul_add,add_mul,mul_smul_comm,smul_mul_assoc,add_assoc] + have hdiff : ‖F₁*C₁*(Z-Z₁)*(e : B)‖ ≤ 3/2*η' := + normalized_inverse_difference_bound g z Z Z₁ W W₁ (p₁ : B) F₁ C₁ (e : B) (y' : B) + hη'.le hg hz' hZ₁ (by simpa only [Unitization.norm_inr] using hp₁) + (by simpa only [Unitization.norm_inr] using he) (by simpa only [Unitization.norm_inr] using hy') + hgsa rfl hFC₁ hZW hW₁Z₁ hW + refine ⟨Z,W,z,w,rfl,rfl,hstarZW,?_,?_,?_,?_⟩ + · exact (norm_factored_perturbation_le g z hg).trans (by linarith) + · exact (norm_factored_perturbation_le g w hg).trans (by linarith) + · intro H π hπ + have ht := hfirst H π hπ + have hnorm := norm_sub_norm_le ((Unitization.starLift π) (F₁*C₁*Z₁*(e : B))) + ((Unitization.starLift π) (F₁*C₁*Z*(e : B))) + have hc : ‖(Unitization.starLift π) (F₁*C₁*Z₁*(e : B))- + (Unitization.starLift π) (F₁*C₁*Z*(e : B))‖ ≤ 3/2*η' := by + rw [← map_sub] + have halg : F₁*C₁*Z₁*(e : B)-F₁*C₁*Z*(e : B)= -(F₁*C₁*(Z-Z₁)*(e : B)) := by noncomm_ring + rw [halg,map_neg,norm_neg] + exact (NonUnitalStarAlgHom.norm_apply_le (Unitization.starLift π).toNonUnitalStarAlgHom _).trans hdiff + dsimp only [η'] at hc + linarith + · intro H π hπ + rw [metric_column_update F₂ C₂ g (f : B) (p₂ : B) (y' : B) W W₁ η' hFC₂ hgf hW,← hT₂] + rw [← Unitization.inr_mul,← Unitization.inr_mul,← Unitization.inr_smul,← Unitization.inr_add, + starLift_inr_apply_general] + have ht := hytest' H π hπ + dsimp only [η'] at ht + nlinarith + +end Unitization + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CompatibleSeparation.lean b/lean/OAI/Analysis/WeakInfiniteness/CompatibleSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..fec4f0bc7d882d5fcc2a3aa05c3884c812262632 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CompatibleSeparation.lean @@ -0,0 +1,207 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CompatibleInverse +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.UniversePerturbation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra + +section + +variable (A : Type u) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def UniformPerturbationOne_any (σ : ℝ) : Prop := + ∀ p q h k c : A, ‖p‖ ≤ 1 → ‖q‖ ≤ 1 → 0 ≤ h → 0 ≤ k → 0 ≤ c → + star p*p*h=h → q*star q*k=k → + CuntzSubequiv (diagonalCopies 1 c) (diagonalCopies 1 h) → + CuntzSubequiv (diagonalCopies 1 c) (diagonalCopies 1 k) → + ∀ (T : A) (η α : ℝ), 0 < η → 0 < α → + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ + +lemma exists_uniformPerturbationOne_any (hA : Exact A) + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) : + ∃ σ : ℝ,0 < σ ∧ σ < 1 ∧ UniformPerturbationOne_any A σ := by + obtain ⟨σ,hσ,hσ1,h⟩ := exists_uniform_perturbation_constant_any + exact ⟨σ,hσ,hσ1,h A hA 1 (by norm_num) (fun a ha _ => hpi a ha)⟩ + +end + +section Algebra + +variable {B : Type*} [CStarAlgebra B] + +lemma metric_column_expansion_any (F C g e p y Z : B) (η : ℝ) + (hFCg : F*C*g=p) (hge : g*e=e) (hZ : Z=1+(η : ℂ) • (g*y*g)) : + F*C*Z*e=F*C*e+(η : ℂ) • (p*y*e) := by + rw [hZ,mul_add,add_mul,mul_one,mul_smul_comm,smul_mul_assoc] + congr 2 + calc + F*C*(g*y*g)*e = (F*C*g)*y*(g*e) := by simp only [mul_assoc] + _ = p*y*e := by rw [hFCg,hge] + +lemma metric_column_update_any (F C g e p y Z W : B) (η : ℝ) + (hFCg : F*C*g=p) (hge : g*e=e) (hZ : Z=W+(η : ℂ) • (g*y*g)) : + F*C*Z*e=F*C*W*e+(η : ℂ) • (p*y*e) := by + rw [hZ,mul_add,add_mul,mul_smul_comm,smul_mul_assoc] + congr 2 + calc + F*C*(g*y*g)*e = (F*C*g)*y*(g*e) := by simp only [mul_assoc] + _ = p*y*e := by rw [hFCg,hge] + +end Algebra + +section Unitization + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_snd_mul_inr_any (u : Unitization ℂ A) (a : A) : + ((u*(a : Unitization ℂ A)).snd : Unitization ℂ A)=u*(a : Unitization ℂ A) := by + apply unitization_inr_snd_of_fst_eq_zero + simp only [Unitization.fst_mul,Unitization.fst_inr,mul_zero] + +lemma exists_compatible_metric_perturbations_any + {σ τ : ℝ} (hσ : 0 < σ) (hσ1 : σ < 1) (hτ : 0 < τ) + (hpert : UniformPerturbationOne_any A σ) + (g F₁ F₂ C₁ C₂ : Unitization ℂ A) (hg : ‖g‖ ≤ 1) (hgsa : IsSelfAdjoint g) + (p₁ p₂ e f h₁ h₂ k₁ k₂ d₁ d₂ : A) + (hp₁ : ‖p₁‖ ≤ 1) (hp₂ : ‖p₂‖ ≤ 1) (he : ‖e‖ ≤ 1) (hf : ‖f‖ ≤ 1) + (hh₁ : 0 ≤ h₁) (hh₂ : 0 ≤ h₂) (hk₁ : 0 ≤ k₁) (hk₂ : 0 ≤ k₂) + (hd₁ : 0 ≤ d₁) (hd₂ : 0 ≤ d₂) + (hph₁ : star p₁*p₁*h₁=h₁) (hph₂ : star p₂*p₂*h₂=h₂) + (hek₁ : e*star e*k₁=k₁) (hfk₂ : f*star f*k₂=k₂) + (hdh₁ : CuntzSubequiv (diagonalCopies 1 d₁) (diagonalCopies 1 h₁)) + (hdh₂ : CuntzSubequiv (diagonalCopies 1 d₂) (diagonalCopies 1 h₂)) + (hdk₁ : CuntzSubequiv (diagonalCopies 1 d₁) (diagonalCopies 1 k₁)) + (hdk₂ : CuntzSubequiv (diagonalCopies 1 d₂) (diagonalCopies 1 k₂)) + (hge : g*(e : Unitization ℂ A)=(e : Unitization ℂ A)) + (hgf : g*(f : Unitization ℂ A)=(f : Unitization ℂ A)) + (hFC₁ : F₁*C₁*g=(p₁ : Unitization ℂ A)) + (hFC₂ : F₂*C₂*g=(p₂ : Unitization ℂ A)) : + ∃ Z W z w : Unitization ℂ A, + Z=1+g*z*g ∧ W=1+g*w*g ∧ star Z*W=1 ∧ + ‖Z‖ ≤ 2 ∧ ‖W‖ ≤ 2 ∧ + (∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + τ ≤ ‖π d₁‖ → σ/16 ≤ ‖(Unitization.starLift π) (F₁*C₁*Z*(e : Unitization ℂ A))‖) ∧ + (∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + τ ≤ ‖π d₂‖ → σ^2/128 ≤ ‖(Unitization.starLift π) (F₂*C₂*W*(f : Unitization ℂ A))‖) := by + let B := Unitization ℂ A + let η : ℝ := 1/8 + let η' : ℝ := σ/128 + have hη : 0 < η := by norm_num [η] + have hη' : 0 < η' := by dsimp [η']; positivity + let T₁ : A := (F₁*C₁*(e : B)).snd + have hT₁ : (T₁ : B)=F₁*C₁*(e : B) := inr_snd_mul_inr_any _ _ + obtain ⟨y,hy,hytest⟩ := hpert p₁ e h₁ k₁ d₁ hp₁ he hh₁ hk₁ hd₁ hph₁ hek₁ hdh₁ hdk₁ T₁ η τ hη hτ + let a₁ : B := (η : ℂ) • (y : B) + have ha₁ : ‖a₁‖ ≤ 1/8 := by + dsimp only [a₁,η] + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos (by norm_num : (0 : ℝ) < 1/8),Unitization.norm_inr] + nlinarith + let Z₁ : B := 1+g*a₁*g + have hZ₁ : ‖Z₁‖ ≤ 9/8 := (norm_factored_perturbation_le g a₁ hg).trans (by linarith) + obtain ⟨w₁,hw₁,hleft₁,hright₁⟩ := exists_factored_inverse g (star a₁) hg + (by simpa only [norm_star] using ha₁) (by norm_num : (1/8 : ℝ) < 1) + have hw₁' : ‖w₁‖ ≤ 1/7 := by norm_num at hw₁; exact hw₁ + let W₁ : B := 1+g*w₁*g + have hstarZ₁ : star Z₁=1+g*star a₁*g := by + dsimp only [Z₁] + rw [star_add,star_one,star_mul,star_mul,hgsa.star_eq] + simp only [mul_assoc] + have hW₁Z₁ : star W₁*Z₁=1 := by + have h := congrArg star hleft₁ + simpa only [← hstarZ₁,star_mul,star_star,star_one] using h + have hfirst (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (hπ : τ ≤ ‖π d₁‖) : + σ/8 ≤ ‖(Unitization.starLift π) (F₁*C₁*Z₁*(e : B))‖ := by + have hz : Z₁=1+(η : ℂ) • (g*(y : B)*g) := by simp only [Z₁,a₁,mul_smul_comm,smul_mul_assoc] + rw [metric_column_expansion_any F₁ C₁ g (e : B) (p₁ : B) (y : B) Z₁ η hFC₁ hge hz,← hT₁] + rw [← Unitization.inr_mul,← Unitization.inr_mul,← Unitization.inr_smul,← Unitization.inr_add, + starLift_inr_apply_general] + simpa only [η,div_eq_mul_inv,one_mul] using hytest H π hπ + let T₂ : A := (F₂*C₂*W₁*(f : B)).snd + have hT₂ : (T₂ : B)=F₂*C₂*W₁*(f : B) := inr_snd_mul_inr_any _ _ + obtain ⟨y',hy',hytest'⟩ := hpert p₂ f h₂ k₂ d₂ hp₂ hf hh₂ hk₂ hd₂ hph₂ hfk₂ hdh₂ hdk₂ T₂ η' τ hη' hτ + let w : B := w₁+(η' : ℂ) • (y' : B) + have hw : ‖w‖ ≤ 1/4 := by + have hn : ‖(η' : ℂ) • (y' : B)‖ ≤ η' := by + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hη',Unitization.norm_inr] + nlinarith + have hsum := norm_add_le w₁ ((η' : ℂ) • (y' : B)) + dsimp only [η'] at hn + dsimp only [w] + linarith + obtain ⟨z,hz,hleft,hright⟩ := exists_factored_inverse g (star w) hg + (by simpa only [norm_star] using hw) (by norm_num : (1/4 : ℝ) < 1) + have hz' : ‖z‖ ≤ 1/3 := by norm_num at hz; exact hz + let Z : B := 1+g*z*g + let W : B := 1+g*w*g + have hstarW : star W=1+g*star w*g := by + dsimp only [W] + rw [star_add,star_one,star_mul,star_mul,hgsa.star_eq] + simp only [mul_assoc] + have hZW : Z*star W=1 := by simpa only [hstarW] using hright + have hstarZW : star Z*W=1 := by + have h := congrArg star hleft + simpa only [← hstarW,star_mul,star_star,star_one] using h + have hW : W=W₁+(η' : ℂ) • (g*(y' : B)*g) := by + simp only [W,W₁,w,mul_add,add_mul,mul_smul_comm,smul_mul_assoc,add_assoc] + have hdiff : ‖F₁*C₁*(Z-Z₁)*(e : B)‖ ≤ 3/2*η' := + normalized_inverse_difference_bound g z Z Z₁ W W₁ (p₁ : B) F₁ C₁ (e : B) (y' : B) + hη'.le hg hz' hZ₁ (by simpa only [Unitization.norm_inr] using hp₁) + (by simpa only [Unitization.norm_inr] using he) (by simpa only [Unitization.norm_inr] using hy') + hgsa rfl hFC₁ hZW hW₁Z₁ hW + refine ⟨Z,W,z,w,rfl,rfl,hstarZW,?_,?_,?_,?_⟩ + · exact (norm_factored_perturbation_le g z hg).trans (by linarith) + · exact (norm_factored_perturbation_le g w hg).trans (by linarith) + · intro H π hπ + have ht := hfirst H π hπ + have hnorm := norm_sub_norm_le ((Unitization.starLift π) (F₁*C₁*Z₁*(e : B))) + ((Unitization.starLift π) (F₁*C₁*Z*(e : B))) + have hc : ‖(Unitization.starLift π) (F₁*C₁*Z₁*(e : B))- + (Unitization.starLift π) (F₁*C₁*Z*(e : B))‖ ≤ 3/2*η' := by + rw [← map_sub] + have halg : F₁*C₁*Z₁*(e : B)-F₁*C₁*Z*(e : B)= -(F₁*C₁*(Z-Z₁)*(e : B)) := by noncomm_ring + rw [halg,map_neg,norm_neg] + exact (NonUnitalStarAlgHom.norm_apply_le (Unitization.starLift π).toNonUnitalStarAlgHom _).trans hdiff + dsimp only [η'] at hc + linarith + · intro H π hπ + rw [metric_column_update_any F₂ C₂ g (f : B) (p₂ : B) (y' : B) W W₁ η' hFC₂ hgf hW,← hT₂] + rw [← Unitization.inr_mul,← Unitization.inr_mul,← Unitization.inr_smul,← Unitization.inr_add, + starLift_inr_apply_general] + have ht := hytest' H π hπ + dsimp only [η'] at ht + nlinarith + +end Unitization + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ComplexScalar.lean b/lean/OAI/Analysis/WeakInfiniteness/ComplexScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..fd3f31cb6d2bf9d9c62ec8b9951092b9bde3c9b5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ComplexScalar.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ScalarHereditary + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology ComplexStarModule + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma exists_scalar_of_positive_scalars (D : NonUnitalStarSubalgebra ℂ A) + [IsClosed (D : Set A)] (π : A →⋆ₙₐ[ℂ] B) (k : B) + (hp : ∀ b ∈ D,0 ≤ b → ∃ r : ℝ,π b=r • k) {x : A} (hx : x ∈ D) : + ∃ z : ℂ,π x=z • k := by + have hsa : ∀ b ∈ D,IsSelfAdjoint b → ∃ r : ℝ,π b=r • k := by + intro b hb hbs + obtain ⟨r,hr⟩ := hp b⁺ (cfcₙ_mem (·⁺ : ℝ → ℝ) hb) (CFC.posPart_nonneg b) + obtain ⟨s,hs⟩ := hp b⁻ (cfcₙ_mem (·⁻ : ℝ → ℝ) hb) (CFC.negPart_nonneg b) + refine ⟨r-s,?_⟩ + calc + π b=π (b⁺-b⁻) := congrArg π (CFC.posPart_sub_negPart b hbs).symm + _ = π b⁺-π b⁻ := map_sub π _ _ + _ = (r-s) • k := by rw [hr,hs]; module + have hre : (ℜ x : A) ∈ D := by + rw [realPart_apply_coe,← IsScalarTower.algebraMap_smul ℂ] + exact SMulMemClass.smul_mem _ (add_mem hx (star_mem hx)) + have him : (ℑ x : A) ∈ D := by + rw [imaginaryPart_apply_coe] + apply SMulMemClass.smul_mem + rw [← IsScalarTower.algebraMap_smul ℂ (M := A)] + exact SMulMemClass.smul_mem _ (sub_mem hx (star_mem hx)) + obtain ⟨r,hr⟩ := hsa _ hre (ℜ x).property + obtain ⟨s,hs⟩ := hsa _ him (ℑ x).property + refine ⟨(r : ℂ)+Complex.I*(s : ℂ),?_⟩ + calc + π x=π ((ℜ x : A)+Complex.I • (ℑ x : A)) := congrArg π (realPart_add_I_smul_imaginaryPart x).symm + _ = r • k+Complex.I • (s • k) := by rw [map_add,map_smul,hr,hs] + _ = _ := by + rw [add_smul,mul_smul] + change r • k+Complex.I • (s • k) = + (algebraMap ℝ ℂ r) • k+Complex.I • ((algebraMap ℝ ℂ s) • k) + rw [IsScalarTower.algebraMap_smul ℂ,IsScalarTower.algebraMap_smul ℂ] + +lemma hereditary_image_scalar_of_no_orthogonal (π : A →⋆ₙₐ[ℂ] B) + {h : A} (hh : 0 ≤ h) (hhn : π h ≠ 0) + (hno : ∀ a ∈ hereditarySubalgebra h hh.isSelfAdjoint, + ∀ b ∈ hereditarySubalgebra h hh.isSelfAdjoint, + 0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0) + {x : A} (hx : x ∈ hereditarySubalgebra h hh.isSelfAdjoint) : + ∃ z : ℂ,π x=z • π h := + exists_scalar_of_positive_scalars _ π (π h) + (fun _ hb hb0 => exists_real_scalar_of_no_orthogonal π hh hhn hno hb hb0) hx + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CompressedStates.lean b/lean/OAI/Analysis/WeakInfiniteness/CompressedStates.lean new file mode 100644 index 0000000000000000000000000000000000000000..d79c24206ec55d34e39b43508589d662ff41281f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CompressedStates.lean @@ -0,0 +1,98 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.VectorStates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology ComplexOrder InnerProductSpace + +variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_compressed_real_state {b g : A} (hb : 0 ≤ b) (hg : IsSelfAdjoint g) + (hgn : ‖g‖ ≤ 1) {δ : ℝ} (hδ : 0 < δ) (hδb : δ ≤ ‖g*b*g‖) : + ∃ f ∈ realStateSpace A,δ ≤ f ⟨b,hb.isSelfAdjoint⟩ ∧ + ∀ c : A, f ⟨star c*c,(star_mul_self_nonneg c).isSelfAdjoint⟩ ≤ + (‖b‖/δ)*‖c*g‖^2 := by + have hgbg : 0 ≤ g*b*g := by simpa only [hg.star_eq] using star_right_conjugate_nonneg hb g + have hgbgn : g*b*g ≠ 0 := by + intro hz + rw [hz,norm_zero] at hδb + exact (not_le_of_gt hδ) hδb + let : Nontrivial A := nontrivial_of_ne _ _ hgbgn + obtain ⟨f,hf,hfb⟩ := exists_norming_real_state (g*b*g) hgbg + let Φ := realStateComplexification f hf + let π := Φ.gnsStarAlgHom + let Ω := gnsCyclicVector Φ + let ξ := π g Ω + have hΩ : ‖Ω‖=1 := norm_gnsCyclicVector Φ (realStateComplexification_one f hf) + have hvec : representationVectorFunctional π ξ ⟨b,hb.isSelfAdjoint⟩=‖g*b*g‖ := by + have he := DFunLike.congr_fun (gns_vectorFunctional_eq f hf) ⟨g*b*g,hgbg.isSelfAdjoint⟩ + change (inner ℂ Ω (π (g*b*g) Ω)).re=f ⟨g*b*g,hgbg.isSelfAdjoint⟩ at he + rw [hfb] at he + change (inner ℂ (π g Ω) (π b (π g Ω))).re=_ + rw [← ContinuousLinearMap.adjoint_inner_right] + have hs : (π g).adjoint=π g := by + change star (π g)=π g + rw [← map_star,hg.star_eq] + rw [hs] + simpa only [map_mul,mul_apply_eq_comp] using he + have hξle : ‖ξ‖ ≤ 1 := calc + ‖ξ‖ ≤ ‖π g‖*‖Ω‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ ‖g‖*‖Ω‖ := by gcongr; exact NonUnitalStarAlgHom.norm_apply_le π.toNonUnitalStarAlgHom g + _ ≤ 1 := by rw [hΩ,mul_one]; exact hgn + have hξ : ξ ≠ 0 := by + intro hz + change ‖g*b*g‖ ≥ δ at hδb + have he : representationVectorFunctional π ξ ⟨b,hb.isSelfAdjoint⟩=0 := by + simp [representationVectorFunctional,hz] + rw [hvec] at he + exact (not_le_of_gt hδ) (he ▸ hδb) + have ht : 0 < ‖ξ‖^2 := sq_pos_of_pos (norm_pos_iff.mpr hξ) + have htone : ‖ξ‖^2 ≤ 1 := by nlinarith [norm_nonneg ξ] + have hbnd : ‖g*b*g‖ ≤ ‖ξ‖^2*‖b‖ := by + have he := (representationVectorFunctional π ξ).le_opNorm ⟨b,hb.isSelfAdjoint⟩ + rw [hvec,norm_norm] at he + exact he.trans (mul_le_mul_of_nonneg_right (representationVectorFunctional_norm_le π ξ) (norm_nonneg b)) + have hinv : (‖ξ‖^2)⁻¹ ≤ ‖b‖/δ := by + apply (le_div_iff₀ hδ).mpr + apply (inv_mul_le_iff₀ ht).mpr + nlinarith + let F := StrongDual.toWeakDual ((‖ξ‖^2)⁻¹ • representationVectorFunctional π ξ) + refine ⟨F,normalized_vector_mem_realStateSpace π hξ,?_,?_⟩ + · change δ ≤ (‖ξ‖^2)⁻¹*representationVectorFunctional π ξ ⟨b,hb.isSelfAdjoint⟩ + rw [hvec] + apply (le_inv_mul_iff₀ ht).mpr + exact (mul_le_of_le_one_left hδ.le htone).trans hδb + · intro c + change (‖ξ‖^2)⁻¹*representationVectorFunctional π ξ ⟨star c*c,(star_mul_self_nonneg c).isSelfAdjoint⟩ ≤ _ + rw [representationVectorFunctional_square] + have hc : ‖π c ξ‖ ≤ ‖c*g‖ := calc + _ = ‖π (c*g) Ω‖ := by rw [map_mul]; rfl + _ ≤ ‖π (c*g)‖*‖Ω‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ ‖c*g‖*‖Ω‖ := by gcongr; exact NonUnitalStarAlgHom.norm_apply_le π.toNonUnitalStarAlgHom _ + _ = ‖c*g‖ := by rw [hΩ,mul_one] + exact mul_le_mul hinv (by nlinarith [norm_nonneg (π c ξ),norm_nonneg (c*g)]) + (sq_nonneg _) (div_nonneg (norm_nonneg b) hδ.le) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CompressionObstruction.lean b/lean/OAI/Analysis/WeakInfiniteness/CompressionObstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..7428984d284f8826b2ec21adeacb8e5590d5fee5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CompressionObstruction.lean @@ -0,0 +1,62 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryCP + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +local instance compressionObstructionPartialOrder : PartialOrder OInfinity := + CStarAlgebra.spectralOrder _ + +local instance compressionObstructionStarOrderedRing : StarOrderedRing OInfinity := + CStarAlgebra.spectralOrderedRing _ + +lemma exists_unital_cpc_compression_killing_isometry : + ∃ Φ : OInfinity →L[ℂ] OInfinity,CompletelyPositive Φ ∧ ‖Φ‖≤1 ∧ + Φ 1=1 ∧ + star (oInfinityIsometry 1)*oInfinityIsometry 1=1 ∧ + Φ (oInfinityIsometry 1)=0 ∧ + Φ (star (oInfinityIsometry 1)*oInfinityIsometry 1)≠ + star (Φ (oInfinityIsometry 1))*Φ (oInfinityIsometry 1) := by + let v : Fin 1 → OInfinity := fun _ => oInfinityIsometry 0 + have h00 : star (oInfinityIsometry 0)*oInfinityIsometry 0=1 := (oInfinityIsometry_relations 0 0).trans (ite_eq_left rfl) + have h01 : star (oInfinityIsometry 0)*oInfinityIsometry 1=0 := (oInfinityIsometry_relations 0 1).trans (ite_eq_right (by decide)) + have h11 : star (oInfinityIsometry 1)*oInfinityIsometry 1=1 := (oInfinityIsometry_relations 1 1).trans (ite_eq_left rfl) + have he (a : OInfinity) : finiteCompressionContinuous v a= + star (oInfinityIsometry 0)*a*oInfinityIsometry 0 := by + simp only [finiteCompressionContinuous_apply,finiteCompression,Fin.sum_univ_one,v] + have hn : ‖finiteCompressionContinuous v‖≤1 := by + have h := finiteCompressionContinuous_norm_le v + simpa only [Fin.sum_univ_one,v,h00,norm_one] using h + have hu : finiteCompressionContinuous v 1=1 := by rw [he,mul_one,h00] + have hz : finiteCompressionContinuous v (oInfinityIsometry 1)=0 := by + rw [he,h01,zero_mul] + refine ⟨finiteCompressionContinuous v,finiteCompressionContinuous_cp v,hn,hu,h11,hz,?_⟩ + rw [h11,hu,hz,star_zero,zero_mul] + intro h + have hn := congrArg norm h + norm_num only [norm_one,norm_zero] at hn + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ContinuousDeletion.lean b/lean/OAI/Analysis/WeakInfiniteness/ContinuousDeletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e36e425e3fe304c27c2a65e7feced6ae9dc1dd1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ContinuousDeletion.lean @@ -0,0 +1,150 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SmallPartition +import OAI.Analysis.WeakInfiniteness.SpectralDeletion + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped BigOperators Topology CStarAlgebra + +section CFCDeletion + +variable {A : Type*} [CStarAlgebra A] + +def ContinuouslySupported (U p : A) (S : Set ℝ) : Prop := + ∀ g : C(ℝ,ℝ), (∀ x ∈ S,g x=0) → p*cfc g U=0 ∧ cfc g U*p=0 + +lemma cfc_partition_sum (U : A) (hU : IsSelfAdjoint U) + {ι : Type*} [Fintype ι] (f : ι → C(ℝ,ℝ)) + (hs : ∀ x ∈ spectrum ℝ U,∑ i,f i x=1) : ∑ i,cfc (f i) U=1 := by + rw [← cfc_sum_univ (fun i => ⇑(f i)) U (fun i => (f i).continuous.continuousOn)] + calc + cfc (∑ i,⇑(f i)) U=cfc (fun _ : ℝ => 1) U := by + apply cfc_congr + intro x hx + simpa using hs x hx + _ = 1 := by rw [cfc_const_one ℝ U hU] + +lemma cfc_mul_eq_zero_of_small_supports (U : A) + (f g : C(ℝ,ℝ)) (c d δ : ℝ) + (hf : tsupport f ⊆ Metric.ball c δ) (hg : tsupport g ⊆ Metric.ball d δ) + (hcd : 2*δ ≤ dist c d) : cfc f U*cfc g U=0 := by + rw [← cfc_mul f g U f.continuous.continuousOn g.continuous.continuousOn] + calc + cfc (fun x => f x*g x) U=cfc (fun _ : ℝ => 0) U := by + apply cfc_congr + intro x _ + by_cases hfx : f x=0 + · simp only [hfx,zero_mul] + by_cases hgx : g x=0 + · simp only [hgx,mul_zero] + have hx1 : dist x c < δ := hf (subset_tsupport f hfx) + have hx2 : dist x d < δ := hg (subset_tsupport g hgx) + have ht := dist_triangle c x d + rw [dist_comm c x] at ht + exfalso + linarith + _ = 0 := cfc_zero ℝ U + +lemma vanishes_on_separated_sets (f g : C(ℝ,ℝ)) (c d δ : ℝ) + (hf : tsupport f ⊆ Metric.ball c δ) (hg : tsupport g ⊆ Metric.ball d δ) + (S T : Set ℝ) (hsep : ∀ x ∈ S,∀ y ∈ T,8*δ ≤ dist x y) + (hcd : ¬4*δ < dist c d) : + (∀ x ∈ S,f x=0) ∨ (∀ y ∈ T,g y=0) := by + by_contra h + push Not at h + obtain ⟨⟨x,hx,hfx⟩,⟨y,hy,hgy⟩⟩ := h + have hxc : dist x c < δ := hf (subset_tsupport f hfx) + have hyd : dist y d < δ := hg (subset_tsupport g hgy) + have ht1 := dist_triangle x c y + have ht2 := dist_triangle c d y + rw [dist_comm d y] at ht2 + have hs := hsep x hx y hy + have h0 : 0 < δ := lt_of_le_of_lt (dist_nonneg) hxc + have hc := le_of_not_gt hcd + linarith + +theorem exists_continuous_spectral_deletion (U V : A) + (hU : IsSelfAdjoint U) (hV : IsSelfAdjoint V) {ρ : ℝ} (hρ : 0 < ρ) : + ∃ H : A, IsSelfAdjoint H ∧ ∃ n : ℕ, ∃ e : Fin n → A, + (∀ i,IsSelfAdjoint (e i)) ∧ (∑ i,e i=1) ∧ (∀ i,e i*H*e i=0) ∧ + ∀ (p q : A) (S T : Set ℝ), ContinuouslySupported U p S → + ContinuouslySupported U q T → (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) → + p*H*q=p*V*q := by + classical + let δ : ℝ := ρ/8 + have hδ : 0 < δ := by dsimp [δ]; positivity + obtain ⟨n,c,f,hf,hfs,_⟩ := exists_small_partition (spectrum ℝ U) + (ContinuousFunctionalCalculus.isCompact_spectrum U) hδ + let e : Fin n → A := fun i => cfc (f i) U + let R : Fin n → Fin n → Prop := fun j k => 4*δ < dist (c j) (c k) + let H := finiteDeletion e V R + have hesa : ∀ i,IsSelfAdjoint (e i) := fun i => cfc_predicate (f i) U + refine ⟨H,finiteDeletion_selfAdjoint e V R hesa hV (fun j k => by + dsimp [R]; rw [dist_comm]),n,e,hesa,cfc_partition_sum U hU f hfs,?_,?_⟩ + · apply finiteDeletion_diagonals e V R e + intro l j k hjk + dsimp only [R] at hjk + by_cases hlj : 2*δ ≤ dist (c l) (c j) + · exact Or.inl (cfc_mul_eq_zero_of_small_supports U (f l) (f j) + (c l) (c j) δ (hf l) (hf j) hlj) + · right + apply cfc_mul_eq_zero_of_small_supports U (f k) (f l) + (c k) (c l) δ (hf k) (hf l) + have ht := dist_triangle (c j) (c l) (c k) + rw [dist_comm (c j) (c l),dist_comm (c l) (c k)] at ht + have hh := lt_of_not_ge hlj + linarith + · intro p q S T hp hq hsep + apply finiteDeletion_preserves_corner e V p q R (cfc_partition_sum U hU f hfs) + intro j k hjk + have hs : ∀ x ∈ S,∀ y ∈ T,8*δ ≤ dist x y := by + have heq : 8*δ=ρ := by dsimp [δ]; ring + simpa only [heq] using hsep + rcases vanishes_on_separated_sets (f j) (f k) (c j) (c k) δ + (hf j) (hf k) S T hs hjk with hj | hk + · exact Or.inl (hp (f j) hj).1 + · exact Or.inr (hq (f k) hk).2 + +end CFCDeletion + +section Images + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder B] [StarOrderedRing B] + +lemma both_signs_in_image_of_partition_diagonals (π : A →⋆ₐ[ℂ] B) + {a : A} (ha : IsSelfAdjoint a) (hne : π a ≠ 0) + {ι : Type*} [Fintype ι] (e : ι → A) (he : ∀ i,IsSelfAdjoint (e i)) + (hs : ∑ i,e i=1) (hd : ∀ i,e i*a*e i=0) : + (π a)⁺ ≠ 0 ∧ (π a)⁻ ≠ 0 := by + apply both_signs_of_partition_diagonals (ha.map π) hne (fun i => π (e i)) + (fun i => (he i).map π) + · rw [← map_sum,hs,map_one] + · intro i + simpa only [map_mul,map_zero] using congrArg π (hd i) + +end Images + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CoreSelection.lean b/lean/OAI/Analysis/WeakInfiniteness/CoreSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1565a8bc3c50ba0aa5b4d8b978d8d36fc219fe7 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CoreSelection.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Plateau + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma exists_supported_positive_core (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + {u : A} (hu : 0 ≤ u) (hn : π u ≠ 0) : + ∃ p ∈ hereditarySubalgebra u hu.isSelfAdjoint, + ∃ h ∈ hereditarySubalgebra u hu.isSelfAdjoint, + 0 ≤ p ∧ ‖p‖ ≤ 1 ∧ 0 ≤ h ∧ p*h=h ∧ π h ≠ 0 := by + let α := ‖π u‖ + have hα : 0 < α := norm_pos_iff.mpr hn + let p := cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) u) + let h := positiveCut (7*α/8) u + have huD := self_mem_hereditary u hu + have hmidD : positiveCut (α/2) u ∈ hereditarySubalgebra u hu.isSelfAdjoint := cfcₙ_mem _ huD + have hpD : p ∈ hereditarySubalgebra u hu.isSelfAdjoint := cfcₙ_mem _ hmidD + have hhD : h ∈ hereditarySubalgebra u hu.isSelfAdjoint := cfcₙ_mem _ huD + have hp : 0 ≤ p := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg (α/8) s) + have hpn : ‖p‖ ≤ 1 := by + apply norm_cfcₙ_le + intro s _ + rw [Real.norm_eq_abs,abs_of_nonneg (spectralRamp_nonneg (α/8) s)] + exact spectralRamp_le_one _ _ + refine ⟨p,hpD,h,hhD,hp,hpn,positiveCut_nonneg _ _, + spectralRamp_positiveCut_plateau u hu.isSelfAdjoint hα,?_⟩ + have he : π h=positiveCut (7*α/8) (π u) := + π.map_cfcₙ (fun s : ℝ => max (s-7*α/8) 0) u (by fun_prop) + (max_eq_right (by linarith)) (by fun_prop) hu.isSelfAdjoint (map_nonneg π hu).isSelfAdjoint + rw [he] + exact positiveCut_ne_zero_of_lt_norm (map_nonneg π hu) (by positivity) (by dsimp [α]; linarith) + +lemma positiveCut_eq_zero_of_norm_le {B : Type*} [CStarAlgebra B] + (b : B) {α : ℝ} (hα : 0 ≤ α) (hbn : ‖b‖ ≤ α) : positiveCut α b=0 := by + obtain hB | hB := subsingleton_or_nontrivial B + · exact Subsingleton.elim _ _ + let : Nontrivial B := hB + change cfcₙ (fun s : ℝ => max (s-α) 0) b=0 + calc + cfcₙ (fun s : ℝ => max (s-α) 0) b=cfcₙ (0 : ℝ → ℝ) b := by + apply cfcₙ_congr + intro s hs + change max (s-α) 0=0 + apply max_eq_right + rcases mem_quasispectrum_iff.mp hs with rfl | hs + · linarith + · have := spectrum.norm_le_norm_of_mem hs + have := Real.le_norm_self s + linarith + _ = 0 := cfcₙ_zero ℝ b + +lemma norm_lt_of_positiveCut_image_ne_zero + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) {c : A} (hc : 0 ≤ c) {α : ℝ} (hα : 0 ≤ α) + (hn : π (positiveCut α c) ≠ 0) : α < ‖π c‖ := by + have he : π (positiveCut α c)=positiveCut α (π c) := + π.map_cfcₙ (fun s : ℝ => max (s-α) 0) c (by fun_prop) + (max_eq_right (by linarith)) (by fun_prop) hc.isSelfAdjoint (map_nonneg π hc).isSelfAdjoint + rw [he] at hn + exact lt_of_not_ge (fun h => hn (positiveCut_eq_zero_of_norm_le _ hα h)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernel.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcc65c017977b94c807d734bb6d76699dfc66cda --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernel.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorLaws +import OAI.Analysis.WeakInfiniteness.UnitizationTensor + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace Topology + +universe u v w x y z + +section + +variable {A : Type u} {C D : Type v} [NonUnitalCStarAlgebra A] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +lemma minimalMapAny_right (q : C →⋆ₙₐ[ℂ] D) : + minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q=minimalMapRight (A := A) q := by + apply minimalTensor_hom_ext + intro a c + simp only [minimalMapAny_elementary,minimalMapRight_elementary] + rfl + +lemma minimalKernel_induction (q : C →⋆ₙₐ[ℂ] D) + (S : Submodule ℂ (MinimalTensor A C)) (hS : IsClosed (S : Set (MinimalTensor A C))) + (he : ∀ a c, q c=0 → minimalElementary a c ∈ S) + (z : MinimalTensor A C) (hz : z.val ∈ tensorKernelIdeal (A := A) q) : z ∈ S := by + let T : Submodule ℂ (SpatialAmbient A C) := S.map (minimalTensorSubalgebra A C).toSubmodule.subtype + have hT : IsClosed (T : Set (SpatialAmbient A C)) := isClosed_closure.isClosedMap_subtype_val _ hS + have hs : Submodule.span ℂ {z | ∃ a : A,∃ c : C,q c=0 ∧ z=spatialElementary a c} ≤ T := by + apply Submodule.span_le.mpr + rintro y ⟨a,c,hc,rfl⟩ + exact ⟨minimalElementary a c,he a c hc,rfl⟩ + change z.val ∈ (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A C)) at hz + rw [tensorKernelIdeal_eq_closure_span] at hz + obtain ⟨y,hy,hyz⟩ := (closure_minimal hs hT) hz + exact (Subtype.ext hyz : y=z) ▸ hy + +lemma exact_kernel_mapAny (hA : Exact A) (C D : Type u) + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + (q : C →⋆ₙₐ[ℂ] D) (hq : Function.Surjective q) + (z : MinimalTensor A C) (hz : minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q z=0) : + z.val ∈ tensorKernelIdeal (A := A) q := by + apply hA C D q hq z + exact (minimalMapRight_eq_zero_iff q z).mp (by rw [← minimalMapAny_right]; exact hz) + +end + +section KernelMap + +variable {A : Type u} {B : Type w} {C D : Type v} {E F : Type x} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + [NonUnitalCStarAlgebra E] [NonUnitalCStarAlgebra F] + +lemma minimalMapAny_tensorKernel (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] E) + (q : C →⋆ₙₐ[ℂ] D) (r : E →⋆ₙₐ[ℂ] F) (hqr : ∀ c, q c=0 → r (ψ c)=0) + (z : MinimalTensor A C) (hz : z.val ∈ tensorKernelIdeal (A := A) q) : + (minimalMapAny φ ψ z).val ∈ tensorKernelIdeal (A := B) r := by + let f := (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra B E)).comp (minimalMapAny φ ψ) + let S := (tensorKernelIdeal (A := B) r).toSubmodule.comap (show MinimalTensor A C →ₗ[ℂ] SpatialAmbient B E from + { toFun := f, map_add' := map_add f, map_smul' := map_smul f }) + apply minimalKernel_induction q S ?_ ?_ z hz + · exact isClosed_closure.preimage (nonUnitalStarHom_continuous f) + · intro a c hc + change (minimalMapAny φ ψ (minimalElementary a c)).val ∈ tensorKernelIdeal (A := B) r + rw [minimalMapAny_elementary] + apply NonUnitalStarSubalgebra.le_topologicalClosure + apply NonUnitalStarAlgebra.subset_adjoin + exact ⟨φ a,ψ c,hqr c hc,rfl⟩ + +end KernelMap + +section TensorEquivalence + +variable {A : Type u} {B : Type v} {C : Type w} {D : Type x} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def minimalTensorEquiv (e : A ≃⋆ₐ[ℂ] B) (f : C ≃⋆ₐ[ℂ] D) : + MinimalTensor A C ≃⋆ₐ[ℂ] MinimalTensor B D := by + let F := minimalMapAny e.toNonUnitalStarAlgHom f.toNonUnitalStarAlgHom + let G := minimalMapAny e.symm.toNonUnitalStarAlgHom f.symm.toNonUnitalStarAlgHom + have hGF : G.comp F=NonUnitalStarAlgHom.id ℂ (MinimalTensor A C) := by + apply minimalTensor_hom_ext + intro a c + simp [F,G] + have hFG : F.comp G=NonUnitalStarAlgHom.id ℂ (MinimalTensor B D) := by + apply minimalTensor_hom_ext + intro a c + simp [F,G] + have hl : Function.LeftInverse G F := fun x => DFunLike.congr_fun hGF x + have hr : Function.RightInverse G F := fun x => DFunLike.congr_fun hFG x + exact StarAlgEquiv.ofBijective F ⟨hl.injective,hr.surjective⟩ + +@[simp] lemma minimalTensorEquiv_elementary (e : A ≃⋆ₐ[ℂ] B) (f : C ≃⋆ₐ[ℂ] D) + (a : A) (c : C) : minimalTensorEquiv e f (minimalElementary a c)=minimalElementary (e a) (f c) := + minimalMapAny_elementary _ _ a c + +end TensorEquivalence + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernelHeredity.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernelHeredity.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf6ac6a09efc5f308d4240ce090a5391e3dbba75 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseKernelHeredity.lean @@ -0,0 +1,93 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernel +import OAI.Analysis.WeakInfiniteness.CrossUniverseLeftMap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter Topology + +universe u v w + +lemma kernel_of_injective_unital {A : Type u} {B : Type v} {C D : Type w} + [CStarAlgebra A] [CStarAlgebra B] [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + (φ : A →⋆ₐ[ℂ] B) (hφ : Function.Injective φ) (q : C →⋆ₙₐ[ℂ] D) + (hB : ∀ z : MinimalTensor B C, minimalMapAny (NonUnitalStarAlgHom.id ℂ B) q z=0 → + z.val ∈ tensorKernelIdeal (A := B) q) + (z : MinimalTensor A C) (hz : minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q z=0) : + z.val ∈ tensorKernelIdeal (A := A) q := by + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let I := kernelAlgebra q + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let l := CStarAlgebra.approximateUnit I + have hl := CStarAlgebra.increasingApproximateUnit I + let : l.NeBot := hl.toIsApproximateUnit.neBot + let e : I → C := Subtype.val + have he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1 := by + filter_upwards [hl.eventually_nonneg,hl.eventually_norm] with i hi hn + refine ⟨?_,hn⟩ + obtain ⟨x,hx⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hi + have hi' : e i=star (e x)*e x := congrArg Subtype.val hx + rw [hi'] + exact star_mul_self_nonneg _ + have happ : ∀ c : C,q c=0 → Tendsto (fun i => c*e i) l (𝓝 c) := by + intro c hc + let x : I := ⟨c,hc⟩ + exact continuous_subtype_val.tendsto x |>.comp (hl.tendsto_mul_left x) + let Φ : MinimalTensor A C →⋆ₙₐ[ℂ] MinimalTensor B C := minimalMapLeftAny φ.toNonUnitalStarAlgHom + have hm : (Φ z).val ∈ tensorKernelIdeal (A := B) q := by + apply hB + have heq := minimalMapLeftAny_right_comm φ.toNonUnitalStarAlgHom q + have hh := DFunLike.congr_fun heq z + change minimalMapAny (NonUnitalStarAlgHom.id ℂ B) q (Φ z)=minimalMapLeftAny φ.toNonUnitalStarAlgHom (minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q z) at hh + rw [hh,hz,map_zero] + have hcuts := tensorCut_tendsto_zero_on_ideal l e he q happ (Φ z) hm + have hcutz : Tendsto (fun i => tensorCut (e i) z) l (𝓝 0) := by + apply tendsto_zero_iff_norm_tendsto_zero.mpr + have hn := tendsto_zero_iff_norm_tendsto_zero.mp hcuts + convert hn using 1 + funext i + rw [← minimalMapLeftAny_tensorCut] + exact (norm_minimalMapLeftAny φ.toNonUnitalStarAlgHom hφ _).symm + exact tensor_mem_ideal_of_cuts l e q (fun i => i.property) z hcutz + +lemma universal_fixed_kernel_impossible + (h : ∀ z : MinimalTensor UniversalContraction (FullGroupAlgebra (FreeGroup Bool)), + minimalMapAny (NonUnitalStarAlgHom.id ℂ UniversalContraction) + fullToReducedLarge.toNonUnitalStarAlgHom z=0 → + z.val ∈ tensorKernelIdeal (A := UniversalContraction) fullToReducedLarge.toNonUnitalStarAlgHom) : False := by + apply not_le_of_gt freeDiagonalFunctional_witness_gap + apply freeDiagonalFunctional_bound_of_kernel + intro z hz + have hm := kernel_of_injective_unital fullToUniversal fullToUniversal_injective + fullToReducedLarge.toNonUnitalStarAlgHom h z ((DFunLike.congr_fun (minimalMapAny_right fullToReducedLarge.toNonUnitalStarAlgHom) z).trans hz) + apply minimalKernel_induction fullToReducedLarge.toNonUnitalStarAlgHom + freeDiagonalFunctional.toLinearMap.ker + (isClosed_singleton.preimage freeDiagonalFunctional.continuous) ?_ z hm + intro a c hc + exact freeDiagonalFunctional_large_elementary_kernel a c hc + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseLeftMap.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseLeftMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..e287ecf9402794924b397ba56b4efb06ea9eef10 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseLeftMap.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorLaws + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v w + +variable {A : Type u} {B : Type v} {C : Type w} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +def minimalMapLeftAny (φ : A →⋆ₙₐ[ℂ] B) : MinimalTensor A C →⋆ₙₐ[ℂ] MinimalTensor B C := + minimalMapAny φ (NonUnitalStarAlgHom.id ℂ C) + +@[simp] lemma minimalMapLeftAny_elementary (φ : A →⋆ₙₐ[ℂ] B) (a : A) (c : C) : + minimalMapLeftAny φ (minimalElementary a c)=minimalElementary (φ a) c := + minimalMapAny_elementary _ _ _ _ + +lemma norm_minimalMapLeftAny (φ : A →⋆ₙₐ[ℂ] B) (hφ : Function.Injective φ) + (z : MinimalTensor A C) : ‖minimalMapLeftAny φ z‖=‖z‖ := + norm_minimalMapAny φ _ hφ Function.injective_id z + +lemma minimalMapLeftAny_tensorCut {A : Type u} {B : Type v} + [CStarAlgebra A] [CStarAlgebra B] (φ : A →⋆ₐ[ℂ] B) (e : C) + (x : MinimalTensor A C) : + minimalMapLeftAny φ.toNonUnitalStarAlgHom (tensorCut e x)= + tensorCut e (minimalMapLeftAny φ.toNonUnitalStarAlgHom x) := by + simp only [tensorCut,map_sub,map_mul] + congr 2 + change minimalMapLeftAny φ.toNonUnitalStarAlgHom (minimalElementary (1:A) e)=minimalElementary (1:B) e + rw [minimalMapLeftAny_elementary] + change minimalElementary (φ 1) e=_ + rw [map_one] + +lemma minimalMapLeftAny_right_comm {D : Type w} [NonUnitalCStarAlgebra D] + (φ : A →⋆ₙₐ[ℂ] B) (q : C →⋆ₙₐ[ℂ] D) : + (minimalMapAny (NonUnitalStarAlgHom.id ℂ B) q).comp (minimalMapLeftAny φ)= + (minimalMapLeftAny φ).comp (minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q) := by + apply minimalTensor_hom_ext + intro a c + simp [minimalMapLeftAny] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSmallExact.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSmallExact.lean new file mode 100644 index 0000000000000000000000000000000000000000..c06dca0e393883cf628cb93ce1c5ed9c01a8fe93 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSmallExact.lean @@ -0,0 +1,82 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernel +import OAI.Analysis.WeakInfiniteness.SmallCStar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +lemma exact_kernel_small (A : Type u) [NonUnitalCStarAlgebra A] (hA : Exact A) + {C D : Type v} [CStarAlgebra C] [CStarAlgebra D] + [Small.{0} C] [Small.{0} D] + (q : C →⋆ₙₐ[ℂ] D) (hq : Function.Surjective q) + (z : MinimalTensor A C) + (hz : minimalMapAny (NonUnitalStarAlgHom.id ℂ A) q z=0) : + z.val ∈ tensorKernelIdeal (A := A) q := by + let E := ULift.{u} (SmallCStarCarrier C) + let F := ULift.{u} (SmallCStarCarrier D) + let e : E ≃⋆ₐ[ℂ] C := uliftStarAlgEquiv.trans (smallCStarStarAlgEquiv C) + let f : F ≃⋆ₐ[ℂ] D := uliftStarAlgEquiv.trans (smallCStarStarAlgEquiv D) + let r : E →⋆ₙₐ[ℂ] F := f.symm.toNonUnitalStarAlgHom.comp (q.comp e.toNonUnitalStarAlgHom) + have hr : Function.Surjective r := f.symm.surjective.comp (hq.comp e.surjective) + let idA := NonUnitalStarAlgHom.id ℂ A + let Z := minimalMapAny idA e.symm.toNonUnitalStarAlgHom z + have heq : (minimalMapAny idA r).comp (minimalMapAny idA e.symm.toNonUnitalStarAlgHom)= + (minimalMapAny idA f.symm.toNonUnitalStarAlgHom).comp (minimalMapAny idA q) := by + apply minimalTensor_hom_ext + intro a c + rw [NonUnitalStarAlgHom.comp_apply, NonUnitalStarAlgHom.comp_apply, + minimalMapAny_elementary idA e.symm.toNonUnitalStarAlgHom, + minimalMapAny_elementary idA r, minimalMapAny_elementary idA q, + minimalMapAny_elementary idA f.symm.toNonUnitalStarAlgHom] + change minimalElementary a (f.symm (q (e (e.symm c)))) = + minimalElementary a (f.symm (q c)) + rw [e.apply_symm_apply] + have hZ : minimalMapAny idA r Z=0 := by + change ((minimalMapAny idA r).comp (minimalMapAny idA e.symm.toNonUnitalStarAlgHom)) z=0 + rw [heq] + change minimalMapAny idA f.symm.toNonUnitalStarAlgHom (minimalMapAny idA q z)=0 + rw [hz,map_zero] + have hm := exact_kernel_mapAny hA E F r hr Z hZ + have hqr : ∀ c, r c=0 → q (e c)=0 := by + intro c hc + change f.symm (q (e c)) = 0 at hc + have hh := congrArg f hc + simpa only [StarAlgEquiv.apply_symm_apply, map_zero] using hh + have hh := minimalMapAny_tensorKernel idA e.toNonUnitalStarAlgHom r q hqr Z hm + have hi : (minimalMapAny idA e.toNonUnitalStarAlgHom).comp + (minimalMapAny idA e.symm.toNonUnitalStarAlgHom)= + NonUnitalStarAlgHom.id ℂ (MinimalTensor A C) := by + apply minimalTensor_hom_ext + intro a c + rw [NonUnitalStarAlgHom.comp_apply, + minimalMapAny_elementary idA e.symm.toNonUnitalStarAlgHom, + minimalMapAny_elementary idA e.toNonUnitalStarAlgHom] + change minimalElementary a (e (e.symm c)) = minimalElementary a c + rw [e.apply_symm_apply] + have hzz : minimalMapAny idA e.toNonUnitalStarAlgHom Z=z := DFunLike.congr_fun hi z + rwa [hzz] at hh + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSupportedSeparation.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSupportedSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..0042aaf053aaa67e5dd4acc12736cc45458a8dba --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseSupportedSeparation.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseUniformModels +import OAI.Analysis.WeakInfiniteness.SupportedSeparation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace ComplexOrder + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +theorem exists_separated_supported_model_any + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (c : A) (hc : 0 ≤ c) {α : ℝ} (hα : 0 < α) + (e : CStarMatrix (Fin n) (Fin n) A) (he : IsSelfAdjoint e) + (U : CStarMatrix (Fin 1) (Fin n) A) (hU : U.conjTranspose*U=e) + (V : supportedAlgebra e he) : + ∃ w : CStarMatrix (Fin n) (Fin n) A, ‖w‖ ≤ 1 ∧ + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)*w* + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)=w ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ ≤ ‖matrixRepresentation π (Fin n) (V.val-w)‖ := by + classical + by_contra h + push Not at h + let B := Unitization ℂ (supportedAlgebra e he) + let V₀ : B := Unitization.inr V + let v : B := cstarClip V₀ + have hB : Exact B := exact_unitization_supportedAlgebra hA U e he hU + have hmodels : FiniteContractionModelsAny B v γ := by + intro H _ D hD + obtain ⟨d,coord,M,hMn,hM⟩ := exists_scalar_matrix_coordinates D + obtain ⟨w,hwn,hEw,hred⟩ := exists_uniform_reducing_model hn hpi c hc hα d M (hMn.trans_le hD) + obtain ⟨K,π,hπc,hnear⟩ := h w hwn hEw + obtain ⟨J,hJ,hJa⟩ := hred K π hπc + let lam : supportedAlgebra e he →⋆ₙₐ[ℂ] + (HilbertVector (Fin n) K →L[ℂ] HilbertVector (Fin n) K) := + (matrixRepresentation π (Fin n)).comp (NonUnitalStarSubalgebraClass.subtype (supportedAlgebra e he)) + let πB : B →⋆ₐ[ℂ] (HilbertVector (Fin n) K →L[ℂ] HilbertVector (Fin n) K) := + Unitization.starLift lam + let J' := J.comp coord.toLinearIsometry + let T := matrixRepresentation π (Fin n) V.val + let W := matrixRepresentation π (Fin n) w + have hr : W.comp J'.toContinuousLinearMap=J'.toContinuousLinearMap.comp D := by + apply transport_reducing_coordinates coord J W D + rwa [← hM] + have hra : (star W).comp J'.toContinuousLinearMap=J'.toContinuousLinearMap.comp (star D) := by + apply transport_reducing_coordinates coord J (star W) (star D) + rw [show coord.conjStarAlgEquiv (star D)=star (coord.conjStarAlgEquiv D) from + map_star coord.conjStarAlgEquiv.toStarAlgHom D, ← hM] + exact hJa + have hTW : ‖T-W‖ ≤ σ := by + simpa only [T,W,map_sub] using hnear.le + have hW : ‖W‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le (matrixRepresentation π (Fin n)) w).trans hwn + have herr := clip_reducing_models T W D J' hσ hW hTW hr hra + have hclip : πB v=cstarClip T := by + change πB (cstarClip V₀)=cstarClip T + rw [map_cstarClip] + congr 1 + calc + πB V₀ = (Unitization.starLift.symm πB) V := + (Unitization.starLift_symm_apply_apply πB V).symm + _ = lam V := congrArg (fun f => f V) (Unitization.starLift.left_inv lam) + _ = T := rfl + refine ⟨⟨HilbertVector (Fin n) K⟩,πB,J',?_,?_⟩ + · rw [hclip] + exact herr.1.trans hσγ + · rw [hclip] + exact herr.2.trans hσγ + exact hgap B v (norm_cstarClip_le V₀) hB hmodels + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorBound.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..b08f69035a90b11d6454ea4b582faf8457f061ce --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorBound.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FaithfulRepresentation +import OAI.Analysis.WeakInfiniteness.UniformModels + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct ENNReal + +open UniformSpace + +universe u v w x + +section + +variable {A : Type u} {C : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra C] + +variable {H : Type w} {K : Type x} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + +lemma norm_tensorSum_le_spatial_any {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (ρ : C →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + ‖∑ i ∈ s, TensorProduct.mapL (π (a i)) (ρ (c i))‖ ≤ + ‖∑ i ∈ s, spatialElementary (a i) (c i)‖ := by + let := CStarAlgebra.spectralOrder A + let := CStarAlgebra.spectralOrderedRing A + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + obtain ⟨H₀,π₀,hπ₀⟩ := exists_faithful_representation A + obtain ⟨K₀,ρ₀,hρ₀⟩ := exists_faithful_representation C + let H' : ComplexHilbert.{max u v} := ⟨ULift.{v} H₀⟩ + let K' : ComplexHilbert.{max u v} := ⟨ULift.{u} K₀⟩ + let e : H₀ ≃ₗᵢ[ℂ] H' := (LinearIsometryEquiv.ulift ℂ H₀).symm + let f : K₀ ≃ₗᵢ[ℂ] K' := (LinearIsometryEquiv.ulift ℂ K₀).symm + let π' := e.conjStarAlgEquiv.toNonUnitalStarAlgHom.comp π₀ + let ρ' := f.conjStarAlgEquiv.toNonUnitalStarAlgHom.comp ρ₀ + have hπ' : Function.Injective π' := e.conjStarAlgEquiv.injective.comp hπ₀ + have hρ' : Function.Injective ρ' := f.conjStarAlgEquiv.injective.comp hρ₀ + let σ : SpatialRepresentation A C := {left := H',right := K',leftRep := π',rightRep := ρ'} + calc + _ ≤ ‖∑ i ∈ s,TensorProduct.mapL (π (a i)) (ρ' (c i))‖ := + tensor_norm_le_faithful_finset s (fun i => π (a i)) c ρ' ρ hρ' + _ = ‖∑ i ∈ s,TensorProduct.mapL (ρ' (c i)) (π (a i))‖ := norm_tensorSum_flip s _ _ + _ ≤ ‖∑ i ∈ s,TensorProduct.mapL (ρ' (c i)) (π' (a i))‖ := + tensor_norm_le_faithful_finset s (fun i => ρ' (c i)) a π' π hπ' + _ = ‖∑ i ∈ s,TensorProduct.mapL (π' (a i)) (ρ' (c i))‖ := norm_tensorSum_flip s _ _ + _ = ‖(∑ i ∈ s, spatialElementary (a i) (c i)) σ‖ := by rw [spatialSum_apply,norm_completion] + _ ≤ _ := lp.norm_apply_le_norm ENNReal.top_ne_zero _ σ + +end + +lemma norm_spatialSum_map_any {A : Type u} {B : Type v} {C : Type w} {D : Type x} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) : + ‖∑ i ∈ s,spatialElementary (φ (a i)) (ψ (c i))‖ ≤ + ‖∑ i ∈ s,spatialElementary (a i) (c i)‖ := by + apply lp.norm_le_of_forall_le (norm_nonneg _) + intro π + rw [spatialSum_apply,norm_completion] + exact norm_tensorSum_le_spatial_any s a c (π.leftRep.comp φ) (π.rightRep.comp ψ) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorLaws.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorLaws.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8a601bf766e223f9fe3c2faab47ec349294bf90 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorLaws.lean @@ -0,0 +1,135 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorMap +import OAI.Analysis.WeakInfiniteness.WordTensorDensity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct ENNReal + +open UniformSpace Topology + +universe u v w x y z + +section + +variable {A : Type u} {B : Type v} {C : Type w} {D : Type x} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +lemma minimalTensor_hom_ext {E : Type*} [NonUnitalCStarAlgebra E] + (f g : MinimalTensor A C →⋆ₙₐ[ℂ] E) + (h : ∀ a c, f (minimalElementary a c)=g (minimalElementary a c)) : f=g := by + let S : Submodule ℂ (MinimalTensor A C) := + { carrier := {x | f x=g x} + zero_mem' := by simp + add_mem' := by intro a b ha hb; simp only [Set.mem_ofPred_eq,map_add] at *; rw [ha,hb] + smul_mem' := by intro t a ha; simp only [Set.mem_ofPred_eq,map_smul] at *; rw [ha] } + have hS : S=⊤ := minimal_elementary_span_dense S + (isClosed_eq (nonUnitalStarHom_continuous f) (nonUnitalStarHom_continuous g)) h + ext a + have ha : a ∈ S := by rw [hS]; trivial + exact ha + +@[simp] lemma minimalMapAny_id : + minimalMapAny (NonUnitalStarAlgHom.id ℂ A) (NonUnitalStarAlgHom.id ℂ C)= + NonUnitalStarAlgHom.id ℂ (MinimalTensor A C) := by + apply minimalTensor_hom_ext + intro a c + simp + +lemma minimalMapAny_comp {E : Type y} {F : Type z} + [NonUnitalCStarAlgebra E] [NonUnitalCStarAlgebra F] + (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) + (η : B →⋆ₙₐ[ℂ] E) (κ : D →⋆ₙₐ[ℂ] F) : + (minimalMapAny η κ).comp (minimalMapAny φ ψ)=minimalMapAny (η.comp φ) (κ.comp ψ) := by + apply minimalTensor_hom_ext + intro a c + simp + +lemma norm_spatialSum_le_image_any {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) + (hφ : Function.Injective φ) (hψ : Function.Injective ψ) : + ‖∑ i ∈ s,spatialElementary (a i) (c i)‖ ≤ + ‖∑ i ∈ s,spatialElementary (φ (a i)) (ψ (c i))‖ := by + let := CStarAlgebra.spectralOrder A + let := CStarAlgebra.spectralOrderedRing A + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let := CStarAlgebra.spectralOrder B + let := CStarAlgebra.spectralOrderedRing B + let := CStarAlgebra.spectralOrder D + let := CStarAlgebra.spectralOrderedRing D + obtain ⟨H,π,hπ⟩ := exists_faithful_representation B + obtain ⟨K,ρ,hρ⟩ := exists_faithful_representation D + apply lp.norm_le_of_forall_le (norm_nonneg _) + intro σ + rw [spatialSum_apply,norm_completion] + calc + _ ≤ ‖∑ i ∈ s,TensorProduct.mapL (σ.leftRep (a i)) (ρ (ψ (c i)))‖ := + tensor_norm_le_faithful_finset s (fun i => σ.leftRep (a i)) c + (ρ.comp ψ) σ.rightRep (hρ.comp hψ) + _ = ‖∑ i ∈ s,TensorProduct.mapL (ρ (ψ (c i))) (σ.leftRep (a i))‖ := norm_tensorSum_flip s _ _ + _ ≤ ‖∑ i ∈ s,TensorProduct.mapL (ρ (ψ (c i))) (π (φ (a i)))‖ := + tensor_norm_le_faithful_finset s (fun i => ρ (ψ (c i))) a + (π.comp φ) σ.leftRep (hπ.comp hφ) + _ = ‖∑ i ∈ s,TensorProduct.mapL (π (φ (a i))) (ρ (ψ (c i)))‖ := norm_tensorSum_flip s _ _ + _ ≤ _ := norm_tensorSum_le_spatial_any s (fun i => φ (a i)) (fun i => ψ (c i)) π ρ + +lemma norm_minimalMapAny (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) + (hφ : Function.Injective φ) (hψ : Function.Injective ψ) (z : MinimalTensor A C) : + ‖minimalMapAny φ ψ z‖=‖z‖ := by + apply le_antisymm (NonUnitalStarAlgHom.norm_apply_le _ _) + let S := Submodule.span ℂ (Set.range fun p : A × C => minimalElementary p.1 p.2) + have hd : S.topologicalClosure=⊤ := by + apply minimal_elementary_span_dense _ (Submodule.isClosed_topologicalClosure _) + intro a c + exact Submodule.le_topologicalClosure _ (Submodule.subset_span (Set.mem_range_self (a,c))) + have hz : z ∈ closure (S : Set (MinimalTensor A C)) := by + change z ∈ S.topologicalClosure + rw [hd] + trivial + apply closure_minimal (t := {z | ‖z‖ ≤ ‖minimalMapAny φ ψ z‖}) ?_ + (isClosed_le continuous_norm ((nonUnitalStarHom_continuous _).norm)) hz + intro z hz + classical + obtain ⟨d,rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hz + change ‖d.sum (fun p t => t • minimalElementary p.1 p.2)‖ ≤ + ‖minimalMapAny φ ψ (d.sum (fun p t => t • minimalElementary p.1 p.2))‖ + simp only [Finsupp.sum,map_sum,map_smul,minimalMapAny_elementary] + change ‖(minimalTensorSubalgebra A C).subtype (∑ p ∈ d.support,d p • minimalElementary p.1 p.2)‖ ≤ + ‖(minimalTensorSubalgebra B D).subtype (∑ p ∈ d.support,d p • minimalElementary (φ p.1) (ψ p.2))‖ + simp only [map_sum,map_smul] + change ‖∑ p ∈ d.support,d p • spatialElementary p.1 p.2‖ ≤ + ‖∑ p ∈ d.support,d p • spatialElementary (φ p.1) (ψ p.2)‖ + simpa only [map_smul,spatialElementary_smul_left] using + norm_spatialSum_le_image_any d.support (fun p => d p • p.1) Prod.snd φ ψ hφ hψ + +lemma minimalMapAny_isometry (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) + (hφ : Function.Injective φ) (hψ : Function.Injective ψ) : Isometry (minimalMapAny φ ψ) := + AddMonoidHomClass.isometry_of_norm _ (norm_minimalMapAny φ ψ hφ hψ) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorMap.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..73d8686f0cb6c731626bd48062fbd3333cfea29b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseTensorMap.lean @@ -0,0 +1,147 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorBound + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct ENNReal + +open UniformSpace Topology + +universe u v w x + +section + +variable {A : Type u} {B : Type v} {C : Type w} {D : Type x} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +lemma minimalElementary_mul (a a' : A) (c c' : C) : + minimalElementary (a*a') (c*c')=minimalElementary a c*minimalElementary a' c' := + Subtype.ext (spatialElementary_mul a a' c c') + +lemma minimalElementary_star (a : A) (c : C) : + minimalElementary (star a) (star c)=star (minimalElementary a c) := + Subtype.ext (spatialElementary_star a c) + +lemma minimalElementary_smul_left (t : ℂ) (a : A) (c : C) : + minimalElementary (t • a) c=t • minimalElementary a c := + Subtype.ext (spatialElementary_smul_left t a c) + +variable (φ : A →⋆ₙₐ[ℂ] B) (ψ : C →⋆ₙₐ[ℂ] D) + +def crossTensorPair (p : A × C) : MinimalTensor A C × MinimalTensor B D := + (minimalElementary p.1 p.2,minimalElementary (φ p.1) (ψ p.2)) + +lemma crossTensorPair_mul (p q : A × C) : crossTensorPair φ ψ (p*q)= + crossTensorPair φ ψ p*crossTensorPair φ ψ q := by + ext <;> simp only [crossTensorPair,Prod.fst_mul,Prod.snd_mul,map_mul,minimalElementary_mul] + +lemma crossTensorPair_star (p : A × C) : crossTensorPair φ ψ (star p)=star (crossTensorPair φ ψ p) := by + ext <;> simp only [crossTensorPair,Prod.fst_star,Prod.snd_star,map_star,minimalElementary_star] + +def crossTensorGraph : NonUnitalStarSubalgebra ℂ (MinimalTensor A C × MinimalTensor B D) := + (NonUnitalStarAlgebra.adjoin ℂ (Set.range (crossTensorPair φ ψ))).topologicalClosure + +instance crossTensorGraphCStar : NonUnitalCStarAlgebra (crossTensorGraph φ ψ) := by + letI : IsClosed (crossTensorGraph φ ψ : Set (MinimalTensor A C × MinimalTensor B D)) := isClosed_closure + infer_instance + +lemma crossTensorGraph_norm (z : crossTensorGraph φ ψ) : ‖z.val.2‖ ≤ ‖z.val.1‖ := by + have hz := z.property + change z.val ∈ closure (NonUnitalStarAlgebra.adjoin ℂ (Set.range (crossTensorPair φ ψ)) : Set _) at hz + rw [closure_adjoin_eq_closure_span _ + (by rintro _ ⟨p,rfl⟩ _ ⟨q,rfl⟩; exact ⟨p*q,crossTensorPair_mul φ ψ p q⟩) + (by rintro _ ⟨p,rfl⟩; exact ⟨star p,crossTensorPair_star φ ψ p⟩)] at hz + apply closure_minimal (t := {z : MinimalTensor A C × MinimalTensor B D | ‖z.2‖ ≤ ‖z.1‖}) + ?_ (isClosed_le (by fun_prop) (by fun_prop)) hz + intro z hz + classical + obtain ⟨d,rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hz + change ‖(d.sum fun p t => t • crossTensorPair φ ψ p).2‖ ≤ + ‖(d.sum fun p t => t • crossTensorPair φ ψ p).1‖ + simp only [Finsupp.sum,Prod.snd_sum,Prod.fst_sum,crossTensorPair] + change ‖(minimalTensorSubalgebra B D).subtype (∑ p ∈ d.support,d p • minimalElementary (φ p.1) (ψ p.2))‖ ≤ + ‖(minimalTensorSubalgebra A C).subtype (∑ p ∈ d.support,d p • minimalElementary p.1 p.2)‖ + simp only [map_sum,map_smul] + change ‖∑ p ∈ d.support,d p • spatialElementary (φ p.1) (ψ p.2)‖ ≤ + ‖∑ p ∈ d.support,d p • spatialElementary p.1 p.2‖ + simpa only [map_smul,spatialElementary_smul_left] using + norm_spatialSum_map_any d.support (fun p => d p • p.1) Prod.snd φ ψ + +def crossTensorFirst : crossTensorGraph φ ψ →⋆ₙₐ[ℂ] MinimalTensor A C where + toFun z := z.val.1 + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +def crossTensorSecond : crossTensorGraph φ ψ →⋆ₙₐ[ℂ] MinimalTensor B D where + toFun z := z.val.2 + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +lemma crossTensorFirst_isometry : Isometry (crossTensorFirst φ ψ) := by + apply AddMonoidHomClass.isometry_of_norm + intro z + change ‖z.val.1‖=‖z.val‖ + rw [Prod.norm_def,max_eq_left (crossTensorGraph_norm φ ψ z)] + +lemma crossTensorFirst_surjective : Function.Surjective (crossTensorFirst φ ψ) := by + let F := (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra A C)).comp (crossTensorFirst φ ψ) + have hle : minimalTensorSubalgebra A C ≤ NonUnitalStarAlgHom.range F := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ (NonUnitalStarAlgebra.adjoin_le ?_) + · exact nonUnitalStarHom_isClosed_range F + · rintro _ ⟨p,rfl⟩ + refine ⟨⟨crossTensorPair φ ψ p,?_⟩,rfl⟩ + exact NonUnitalStarSubalgebra.le_topologicalClosure _ + (NonUnitalStarAlgebra.subset_adjoin ℂ _ (Set.mem_range_self p)) + intro z + obtain ⟨y,hy⟩ := hle z.property + exact ⟨y,Subtype.ext hy⟩ + +def minimalMapAny : MinimalTensor A C →⋆ₙₐ[ℂ] MinimalTensor B D := + (crossTensorSecond φ ψ).comp + (StarAlgEquiv.ofBijective (crossTensorFirst φ ψ) + ⟨(crossTensorFirst_isometry φ ψ).injective,crossTensorFirst_surjective φ ψ⟩).symm.toNonUnitalStarAlgHom + +@[simp] lemma minimalMapAny_elementary (a : A) (c : C) : + minimalMapAny φ ψ (minimalElementary a c)=minimalElementary (φ a) (ψ c) := by + let z : crossTensorGraph φ ψ := ⟨crossTensorPair φ ψ (a,c), + NonUnitalStarSubalgebra.le_topologicalClosure _ + (NonUnitalStarAlgebra.subset_adjoin ℂ _ (Set.mem_range_self (a,c)))⟩ + let e := StarAlgEquiv.ofBijective (crossTensorFirst φ ψ) + ⟨(crossTensorFirst_isometry φ ψ).injective,crossTensorFirst_surjective φ ψ⟩ + have he : e z=minimalElementary a c := rfl + change (e.symm (minimalElementary a c)).val.2=_ + rw [← he,StarAlgEquiv.symm_apply_apply] + rfl + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformGap.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformGap.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c67a88ca77488c28b3e7658b2d33642989a84a1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformGap.lean @@ -0,0 +1,157 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernelHeredity +import OAI.Analysis.WeakInfiniteness.CrossUniverseSmallExact +import OAI.Analysis.WeakInfiniteness.CrossUniverseUniformModels +import OAI.Analysis.WeakInfiniteness.SmallFree +import OAI.Analysis.WeakInfiniteness.UniformGap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter + +open scoped Topology + +universe u + +section UniformCutEstimate + +variable {B : Type u} {C : Type 1} [CStarAlgebra B] [NonUnitalCStarAlgebra C] + [PartialOrder C] [StarOrderedRing C] + +lemma norm_tensorCut_wordTensor_le_of_models_any (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModelsAny B v θ) (e : C) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) : + ‖tensorCut e (wordTensor s c)‖ ≤ + ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (tensorCut e (wordTensor s c))‖ + + wordTensorCost s c * θ := by + rw [tensorCut_wordTensor] + exact (norm_wordTensor_le_of_models_any s (fun w => c w - c w * e) v hv φ hφ hθ hmodels).trans + (add_le_add le_rfl (mul_le_mul_of_nonneg_right (wordTensorCost_cut_le s c e he hen) hθ)) + +end UniformCutEstimate + +structure ExactModelDataAny (θ : ℝ) where + Carrier : Type u + [cStarAlgebra : CStarAlgebra Carrier] + v : Carrier + norm_v : ‖v‖ ≤ 1 + exactAlgebra : Exact Carrier + models : FiniteContractionModelsAny Carrier v θ + +attribute [instance] ExactModelDataAny.cStarAlgebra + +lemma fixed_kernel_universal_of_arbitrarily_good_models + (hall : ∀ θ : ℝ, 0 < θ → Nonempty (ExactModelDataAny.{u} θ)) {C D : Type 1} [CStarAlgebra C] [CStarAlgebra D] + [Small.{0} C] [Small.{0} D] (q : C →⋆ₙₐ[ℂ] D) (hq : Function.Surjective q) + (z : MinimalTensor UniversalContraction C) + (hz : minimalMapAny (NonUnitalStarAlgHom.id ℂ UniversalContraction) q z=0) : + z.val ∈ tensorKernelIdeal (A := UniversalContraction) q := by + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let I := kernelAlgebra q + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let l := CStarAlgebra.approximateUnit I + have hl := CStarAlgebra.increasingApproximateUnit I + let : l.NeBot := hl.toIsApproximateUnit.neBot + let e : I → C := Subtype.val + have he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1 := by + filter_upwards [hl.eventually_nonneg, hl.eventually_norm] with i hi hn + refine ⟨?_, hn⟩ + obtain ⟨x,hx⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hi + have hi' : e i = star (e x) * e x := congrArg Subtype.val hx + rw [hi'] + exact star_mul_self_nonneg _ + have happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c) := by + intro c hc + let x : I := ⟨c,hc⟩ + exact continuous_subtype_val.tendsto x |>.comp (hl.tendsto_mul_left x) + apply tensor_mem_ideal_of_cuts l e q (fun i => i.property) z + apply Metric.tendsto_nhds.mpr + intro ε hε + obtain ⟨c,hc⟩ := wordTensorLinear_range_dense.exists_dist_lt z (by positivity : 0 < ε/4) + let s := c.support + let w := wordTensor s c + have hzw : ‖z-w‖ < ε/4 := by + simpa only [dist_eq_norm, wordTensorLinear_apply, w, s, wordTensor] using hc + let cost := wordTensorCost s c + have hc0 : 0 ≤ cost := wordTensorCost_nonneg s c + let θ := (ε/4)/(cost+1) + have hθ : 0 < θ := div_pos (by positivity) (by positivity) + have hcost : cost * θ ≤ ε/4 := by + have heq : (cost+1)*θ = ε/4 := mul_div_cancel₀ _ (by positivity) + nlinarith [le_of_lt hθ] + obtain ⟨M⟩ := hall θ hθ + let := CStarAlgebra.spectralOrder M.Carrier + let := CStarAlgebra.spectralOrderedRing M.Carrier + let φ := universalContractionMap M.v M.norm_v + have hφ : φ universalContractionGenerator = M.v := universalContractionMap_generator _ _ + let Φ : MinimalTensor UniversalContraction C →⋆ₙₐ[ℂ] MinimalTensor M.Carrier C := + minimalMapLeftAny φ.toNonUnitalStarAlgHom + have hmem : (Φ z).val ∈ tensorKernelIdeal (A := M.Carrier) q := by + apply exact_kernel_small M.Carrier M.exactAlgebra q hq + have hh := DFunLike.congr_fun (minimalMapLeftAny_right_comm φ.toNonUnitalStarAlgHom q) z + change minimalMapAny (NonUnitalStarAlgHom.id ℂ M.Carrier) q (Φ z)= + minimalMapLeftAny φ.toNonUnitalStarAlgHom (minimalMapAny (NonUnitalStarAlgHom.id ℂ UniversalContraction) q z) at hh + rw [hh,hz,map_zero] + have hcuts := tensorCut_tendsto_zero_on_ideal l e he q happ (Φ z) hmem + have hsmall : ∀ᶠ i in l, ‖Φ (tensorCut (e i) z)‖ < ε/4 := by + have h := Metric.tendsto_nhds.mp hcuts (ε/4) (by positivity) + filter_upwards [h] with i hi + simpa only [Φ, minimalMapLeftAny_tensorCut, dist_zero_right] using hi + filter_upwards [he,hsmall] with i hi his + rw [dist_zero_right] + have hdiff : ‖tensorCut (e i) z - tensorCut (e i) w‖ ≤ ‖z-w‖ := by + change ‖tensorCutLinear (e i) z - tensorCutLinear (e i) w‖ ≤ _ + rw [← map_sub] + exact norm_tensorCut_le (e i) hi.1 hi.2 (z-w) + have hΦdiff : ‖Φ (tensorCut (e i) w) - Φ (tensorCut (e i) z)‖ ≤ ‖z-w‖ := by + rw [← map_sub] + exact (NonUnitalStarAlgHom.norm_apply_le Φ _).trans ((norm_sub_rev _ _).le.trans hdiff) + have hmodel := norm_tensorCut_wordTensor_le_of_models_any s c M.v M.norm_v φ hφ + (le_of_lt hθ) M.models (e i) hi.1 hi.2 + have hm : ‖Φ (tensorCut (e i) w)‖ ≤ ‖Φ (tensorCut (e i) z)‖ + ‖z-w‖ := + (norm_le_norm_add_norm_sub' _ _).trans (add_le_add le_rfl hΦdiff) + have hn := norm_le_norm_add_norm_sub' (tensorCut (e i) z) (tensorCut (e i) w) + change ‖tensorCut (e i) w‖ ≤ ‖Φ (tensorCut (e i) w)‖ + cost * θ at hmodel + linarith + +theorem exists_uniform_gap_any : + ∃ γ : ℝ, 0 < γ ∧ ∀ (B : Type u) [CStarAlgebra B] (v : B), + ‖v‖ ≤ 1 → Exact B → ¬ FiniteContractionModelsAny B v γ := by + classical + by_contra h + have hall : ∀ θ : ℝ, 0 < θ → Nonempty (ExactModelDataAny.{u} θ) := by + intro θ hθ + by_contra hn + apply h + refine ⟨θ,hθ,?_⟩ + intro B hB v hv hExact hmodels + exact hn ⟨{ Carrier := B, v := v, norm_v := hv, exactAlgebra := hExact, models := hmodels }⟩ + exact universal_fixed_kernel_impossible (fixed_kernel_universal_of_arbitrarily_good_models hall + fullToReducedLarge.toNonUnitalStarAlgHom fullToReducedLarge_surjective) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformModels.lean b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1117c6e63998b67cba7761da836fd07a01e7424 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CrossUniverseUniformModels.lean @@ -0,0 +1,136 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseLeftMap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct + +universe u + +def FiniteContractionModelsAny (B : Type u) [CStarAlgebra B] (v : B) (θ : ℝ) : Prop := + ∀ (H : ComplexHilbert.{1}) [FiniteDimensional ℂ H] (D : H →L[ℂ] H), ‖D‖ ≤ 1 → + ∃ K : ComplexHilbert.{u}, ∃ π : B →⋆ₐ[ℂ] (K →L[ℂ] K), ∃ J : H →ₗᵢ[ℂ] K, + ‖(π v).comp J.toContinuousLinearMap - J.toContinuousLinearMap.comp D‖ ≤ θ ∧ + ‖(star (π v)).comp J.toContinuousLinearMap - J.toContinuousLinearMap.comp (star D)‖ ≤ θ + +variable {B : Type u} {C : Type 1} [CStarAlgebra B] [NonUnitalCStarAlgebra C] + +lemma minimalMapLeft_wordTensor_any (s : Finset (List Bool)) (c : List Bool → C) + (φ : UniversalContraction →⋆ₐ[ℂ] B) : + minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c) = + ∑ w ∈ s, minimalElementary (φ (universalWord w)) (c w) := by + rw [wordTensor, map_sum] + apply Finset.sum_congr rfl + intro w _hw + exact minimalMapLeftAny_elementary φ.toNonUnitalStarAlgHom (universalWord w) (c w) + +lemma norm_model_amplifiedPolynomial_le_any (s : Finset (List Bool)) (c : List Bool → C) + (φ : UniversalContraction →⋆ₐ[ℂ] B) (K : ComplexHilbert.{1}) (L : ComplexHilbert.{u}) + (π : B →⋆ₐ[ℂ] (L →L[ℂ] L)) (σ : C →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + ‖amplifiedPolynomial s (fun w => σ (c w)) + (operatorLetters (π (φ universalContractionGenerator)))‖ ≤ + ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c)‖ := by + calc + _ = ‖∑ w ∈ s, TensorProduct.mapL (π (φ (universalWord w))) (σ (c w))‖ := by + rw [norm_tensorSum_flip] + unfold amplifiedPolynomial + congr 1 + apply Finset.sum_congr rfl + intro w _hw + congr 1 + exact (unitalRep_universalWord (π.comp φ) w).symm + _ ≤ ‖∑ w ∈ s,spatialElementary (φ (universalWord w)) (c w)‖ := + norm_tensorSum_le_spatial_any s (fun w => φ (universalWord w)) c π.toNonUnitalStarAlgHom σ + _ = _ := by + rw [minimalMapLeft_wordTensor_any] + change _ = ‖(minimalTensorSubalgebra B C).subtype + (∑ w ∈ s,minimalElementary (φ (universalWord w)) (c w))‖ + rw [map_sum] + rfl + +lemma norm_faithfulAmplifiedPolynomial_le_of_models_any (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModelsAny B v θ) (K : ComplexHilbert.{1}) + (σ : C →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + ‖amplifiedPolynomial s (fun w => σ (c w)) + (operatorLetters (universalUnitalRepresentation universalContractionGenerator))‖ ≤ + ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + wordTensorCost s c * θ := by + have hM : 0 ≤ ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := add_nonneg (norm_nonneg _) (mul_nonneg (wordTensorCost_nonneg s c) hθ) + apply norm_amplifiedPolynomial_le_of_finite_compressions _ _ _ hM + intro E hE + let T := universalUnitalRepresentation universalContractionGenerator + have hT : ‖T‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le universalUnitalRepresentation _).trans + norm_universalContractionGenerator_le_one + let H : ComplexHilbert.{1} := { Carrier := E } + obtain ⟨L, π, J, hj, hjstar⟩ := hmodels H (compress E T) ((norm_compress_le E T).trans hT) + have hJ : ∀ i : Bool, ‖(operatorLetters (π v) i).comp J.toContinuousLinearMap - + J.toContinuousLinearMap.comp (operatorLetters (compress E T) i)‖ ≤ θ := by + intro i + cases i + · exact hjstar + · exact hj + have hcomp : (fun i => compress E (operatorLetters T i)) = operatorLetters (compress E T) := by + funext i + exact (operatorLetters_compress E T i).symm + rw [hcomp] + have hπ : ‖π v‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le π v).trans hv + have hb := norm_amplifiedPolynomial_le s (fun w => σ (c w)) + (operatorLetters (π v)) (operatorLetters (compress E T)) J + (operatorLetters_norm _ hπ) (operatorLetters_norm _ ((norm_compress_le E T).trans hT)) hθ hJ + have hcost : (∑ w ∈ s, ‖σ (c w)‖ * w.length) ≤ wordTensorCost s c := by + apply Finset.sum_le_sum + intro w hw + exact mul_le_mul_of_nonneg_right (NonUnitalStarAlgHom.norm_apply_le σ _) (Nat.cast_nonneg _) + apply hb.trans + apply add_le_add + · simpa only [hφ] using norm_model_amplifiedPolynomial_le_any s c φ K L π σ + · exact mul_le_mul_of_nonneg_right hcost hθ + +lemma norm_wordTensor_le_of_models_any (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModelsAny B v θ) : + ‖wordTensor s c‖ ≤ ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := by + let := CStarAlgebra.spectralOrder UniversalContraction + let := CStarAlgebra.spectralOrderedRing UniversalContraction + have hM : 0 ≤ ‖minimalMapLeftAny φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := add_nonneg (norm_nonneg _) (mul_nonneg (wordTensorCost_nonneg s c) hθ) + change ‖(wordTensor s c).val‖ ≤ _ + rw [wordTensor_val] + apply lp.norm_le_of_forall_le hM + intro ρ + rw [spatialSum_apply, norm_completion, norm_tensorSum_flip] + apply (tensor_norm_le_faithful_finset s (fun w => ρ.rightRep (c w)) universalWord + universalFaithfulRepresentation ρ.leftRep universalFaithfulRepresentation_injective).trans + have he : ∀ w, universalFaithfulRepresentation (universalWord w) = + wordEval (operatorLetters (universalUnitalRepresentation universalContractionGenerator)) w := + unitalRep_universalWord universalUnitalRepresentation + simp only [he] + exact norm_faithfulAmplifiedPolynomial_le_of_models_any s c v hv φ hφ hθ hmodels ρ.right ρ.rightRep + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CuntzComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/CuntzComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6c37c4ef08f405f3edff92968b805118cef08ab --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CuntzComparison.lean @@ -0,0 +1,46 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace + +namespace WeakPureInfiniteness + +section Definitions + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m k : Type*} [Fintype m] [Fintype k] + +def CuntzSubequiv (a : CStarMatrix m m A) (b : CStarMatrix k k A) : Prop := + ∀ ε : ℝ, 0 < ε → ∃ v : CStarMatrix k m A, ‖v.conjTranspose * b * v - a‖ < ε + +def blockSum (a : CStarMatrix m m A) (b : CStarMatrix k k A) : + CStarMatrix (m ⊕ k) (m ⊕ k) A := + CStarMatrix.ofMatrix (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm a) 0 0 + (CStarMatrix.ofMatrix.symm b)) + +def ProperlyInfinite (a : CStarMatrix m m A) : Prop := + CuntzSubequiv (blockSum a a) a + +def diagonalCopies (n : ℕ) (a : A) : CStarMatrix (Fin n) (Fin n) A := + CStarMatrix.ofMatrix (Matrix.diagonal fun _ => a) + +variable (A) + +def WeaklyPurelyInfinite : Prop := + ∃ n : ℕ, 1 ≤ n ∧ ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a) + +def StronglyPurelyInfinite : Prop := + ∀ a b : A, 0 ≤ a → 0 ≤ b → ∀ ε : ℝ, 0 < ε → + ∃ s t : A, ‖star s * (a * a) * s - a * a‖ < ε ∧ + ‖star t * (b * b) * t - b * b‖ < ε ∧ ‖star s * a * b * t‖ < ε + +end Definitions + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CuntzCopies.lean b/lean/OAI/Analysis/WeakInfiniteness/CuntzCopies.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd9b7e256b423dfb8511e5611b973243aef99845 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CuntzCopies.lean @@ -0,0 +1,144 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n k l : Type*} [Fintype m] [Fintype n] [Fintype k] [Fintype l] + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype n] [Fintype k] [Fintype l] in +lemma continuous_blockSum : Continuous (fun p : CStarMatrix m m A × CStarMatrix n n A => blockSum p.1 p.2) := by + change Continuous (fun p : Matrix m m A × Matrix n n A => Matrix.fromBlocks p.1 0 0 p.2) + exact continuous_fst.matrix_fromBlocks continuous_const continuous_const continuous_snd + +lemma CuntzSubequiv.blockSum {a : CStarMatrix m m A} {b : CStarMatrix n n A} + {c : CStarMatrix k k A} {d : CStarMatrix l l A} + (hab : CuntzSubequiv a b) (hcd : CuntzSubequiv c d) : + CuntzSubequiv (blockSum a c) (blockSum b d) := by + intro ε hε + obtain ⟨δ, hδ, hcont⟩ := Metric.continuousAt_iff.mp + (continuous_blockSum (m := m) (n := k) (A := A)).continuousAt ε hε + obtain ⟨v, hv⟩ := hab δ hδ + obtain ⟨w, hw⟩ := hcd δ hδ + let V : CStarMatrix (n ⊕ l) (m ⊕ k) A := Matrix.fromBlocks v 0 0 w + refine ⟨V, ?_⟩ + have he : V.conjTranspose*WeakPureInfiniteness.blockSum b d*V = WeakPureInfiniteness.blockSum (v.conjTranspose*b*v) (w.conjTranspose*d*w) := by + change (Matrix.fromBlocks (CStarMatrix.ofMatrix.symm v) 0 0 (CStarMatrix.ofMatrix.symm w)).conjTranspose * + Matrix.fromBlocks (CStarMatrix.ofMatrix.symm b) 0 0 (CStarMatrix.ofMatrix.symm d) * Matrix.fromBlocks (CStarMatrix.ofMatrix.symm v) 0 0 (CStarMatrix.ofMatrix.symm w) = + Matrix.fromBlocks ((CStarMatrix.ofMatrix.symm v).conjTranspose*(CStarMatrix.ofMatrix.symm b)*(CStarMatrix.ofMatrix.symm v)) 0 0 + ((CStarMatrix.ofMatrix.symm w).conjTranspose*(CStarMatrix.ofMatrix.symm d)*(CStarMatrix.ofMatrix.symm w)) + simp only [Matrix.fromBlocks_conjTranspose, Matrix.conjTranspose_zero, + Matrix.fromBlocks_multiply, Matrix.mul_zero, Matrix.zero_mul, add_zero, zero_add] + rw [he] + have hp : dist (v.conjTranspose*b*v, w.conjTranspose*d*w) (a,c) < δ := by + rw [Prod.dist_eq] + exact max_lt (by simpa only [dist_eq_norm] using hv) (by simpa only [dist_eq_norm] using hw) + simpa only [dist_eq_norm] using hcont hp + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype n] [Fintype k] [Fintype l] in +def matrixSubmatrix (e : m → n) (f : k → l) (M : CStarMatrix n l A) : CStarMatrix m k A := + fun i j => M (e i) (f j) + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype n] [Fintype k] [Fintype l] in +lemma continuous_matrixSubmatrix (e : m → n) (f : k → l) : Continuous (matrixSubmatrix (A := A) e f) := by + change Continuous (fun M : Matrix n l A => M.submatrix e f) + fun_prop + +lemma CuntzSubequiv.submatrix_left {a : CStarMatrix n n A} {b : CStarMatrix k k A} + (hab : CuntzSubequiv a b) (e : m → n) : CuntzSubequiv (matrixSubmatrix e e a) b := by + intro ε hε + obtain ⟨δ, hδ, hcont⟩ := Metric.continuousAt_iff.mp + (continuous_matrixSubmatrix (A := A) e e).continuousAt ε hε + obtain ⟨v, hv⟩ := hab δ hδ + refine ⟨matrixSubmatrix id e v, ?_⟩ + have he : (matrixSubmatrix id e v).conjTranspose*b*matrixSubmatrix id e v = + matrixSubmatrix e e (v.conjTranspose*b*v) := by + ext i j + simp only [CStarMatrix.mul_apply, CStarMatrix.conjTranspose_apply, matrixSubmatrix, id_eq] + rw [he] + simpa only [dist_eq_norm] using hcont (by simpa only [dist_eq_norm] using hv) + +lemma CuntzSubequiv.reindex_right {a : CStarMatrix m m A} {b : CStarMatrix n n A} + (hab : CuntzSubequiv a b) (e : k ≃ n) : CuntzSubequiv a (matrixSubmatrix e e b) := by + have h := (cuntzSubequiv_refl (matrixSubmatrix e e b)).submatrix_left e.symm + have he : matrixSubmatrix e.symm e.symm (matrixSubmatrix e e b) = b := by + ext i j + simp only [matrixSubmatrix, Equiv.apply_symm_apply] + rw [he] at h + exact hab.trans h + +omit [PartialOrder A] [StarOrderedRing A] in +lemma diagonalCopies_submatrix (a : A) {d r : ℕ} (e : Fin d → Fin r) + (he : Function.Injective e) : matrixSubmatrix e e (diagonalCopies r a) = diagonalCopies d a := by + ext i j + simp only [matrixSubmatrix, diagonalCopies, CStarMatrix.ofMatrix_apply, Matrix.diagonal_apply] + simp only [he.eq_iff] + +lemma diagonalCopies_cuntzSubequiv (a : A) {d r : ℕ} (hdr : d ≤ r) : + CuntzSubequiv (diagonalCopies d a) (diagonalCopies r a) := by + have h := (cuntzSubequiv_refl (diagonalCopies r a)).submatrix_left (Fin.castLE hdr) + rwa [diagonalCopies_submatrix a _ (Fin.castLE_injective hdr)] at h + +omit [PartialOrder A] [StarOrderedRing A] in +lemma diagonalCopies_double (a : A) (r : ℕ) : + matrixSubmatrix (finSumFinEquiv.symm : Fin (r+r) → Fin r ⊕ Fin r) + finSumFinEquiv.symm (blockSum (diagonalCopies r a) (diagonalCopies r a)) = + diagonalCopies (r+r) a := by + classical + change (Matrix.fromBlocks (Matrix.diagonal (fun _ : Fin r => a)) 0 0 + (Matrix.diagonal (fun _ : Fin r => a))).submatrix finSumFinEquiv.symm finSumFinEquiv.symm = + Matrix.diagonal (fun _ : Fin (r+r) => a) + rw [Matrix.fromBlocks_diagonal] + rw [Matrix.submatrix_diagonal_equiv] + congr 1 + funext i + dsimp only [Function.comp_def] + cases finSumFinEquiv.symm i <;> rfl + +lemma ProperlyInfinite.diagonal_powers {a : A} {n : ℕ} + (hpi : ProperlyInfinite (diagonalCopies n a)) (k : ℕ) : + CuntzSubequiv (diagonalCopies (2^k*n) a) (diagonalCopies n a) := by + induction k with + | zero => + exact diagonalCopies_cuntzSubequiv a (by simp) + | succ k ih => + have h := (ih.blockSum ih).trans hpi + have h' := h.submatrix_left (finSumFinEquiv.symm : Fin (2^k*n+2^k*n) → _) + rw [diagonalCopies_double] at h' + exact (diagonalCopies_cuntzSubequiv a (show 2^(k+1)*n ≤ 2^k*n+2^k*n by + rw [pow_succ]; nlinarith)).trans h' + +lemma ProperlyInfinite.diagonal_absorbs {a : A} {n : ℕ} (hn : 1 ≤ n) + (hpi : ProperlyInfinite (diagonalCopies n a)) (d : ℕ) : + CuntzSubequiv (diagonalCopies d a) (diagonalCopies n a) := by + have hd : d ≤ 2^d*n := calc + d ≤ 2^d := (Nat.lt_two_pow_self (n := d)).le + _ ≤ 2^d*n := by simpa only [mul_one] using Nat.mul_le_mul_left (2^d) hn + exact (diagonalCopies_cuntzSubequiv a hd).trans (hpi.diagonal_powers d) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CuntzPairCorrection.lean b/lean/OAI/Analysis/WeakInfiniteness/CuntzPairCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..b135163bbcc571e3742bfa3f51653fcbc4abbb0d --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CuntzPairCorrection.lean @@ -0,0 +1,172 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.RectangularPolar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +universe u + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma rectangular_norm_le_sum_entries {m n : Type*} [Fintype m] [Fintype n] + (M : CStarMatrix m n A) : ‖M‖ ≤ ∑ j,∑ i,‖M i j‖ := by + rw [CStarMatrix.norm_def] + refine (CStarMatrix.toCLM M).opNorm_le_bound (by positivity) fun v => ?_ + simp only [CStarMatrix.toCLM_apply_eq_sum,Finset.sum_mul] + apply WithCStarModule.pi_norm_le_sum_norm _ |>.trans + gcongr with i _ + apply norm_sum_le _ _ |>.trans + gcongr with j _ + apply norm_mul_le _ _ |>.trans + rw [mul_comm] + gcongr + exact WithCStarModule.norm_apply_le_norm v j + +lemma exists_inverse_sqrt_tolerance (ε : ℝ) (hε : 0<ε) : + ∃ δ : ℝ,0<δ ∧ ∀ g : A,0≤g → ‖g-1‖<δ → + IsStrictlyPositive g ∧ ‖g^(-(1/2):ℝ)-1‖<ε := by + have h1 : IsStrictlyPositive (1:A) := isUnit_one.isStrictlyPositive zero_le_one + have hc := (CFC.continuousOn_rpow (A := A) (-(1/2):ℝ)) (1:A) h1 + obtain ⟨δ,hδ,hclose⟩ := Metric.continuousWithinAt_iff.mp hc ε hε + refine ⟨min δ 1,lt_min hδ zero_lt_one,?_⟩ + intro g hg hgn + have hn : ‖1-g‖<1 := by rw [norm_sub_rev]; exact lt_of_lt_of_le hgn (min_le_right _ _) + have hu : IsUnit g := by + have hh := isUnit_one_sub_of_norm_lt_one hn + simpa only [sub_sub_cancel] using hh + have hp := hu.isStrictlyPositive hg + refine ⟨hp,?_⟩ + have hh := hclose hp (show dist g 1<δ by simpa only [dist_eq_norm] using lt_of_lt_of_le hgn (min_le_left _ _)) + simpa only [CFC.one_rpow,dist_eq_norm] using hh + +local instance correctionMatrixReal {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +local instance correctionMatrixRealAlgebra {n : Type*} [Fintype n] [DecidableEq n] : + Algebra ℝ (CStarMatrix n n A) := Algebra.complexToReal + +lemma exists_rectangular_isometry_near {m n : Type*} [Fintype m] [Fintype n] [DecidableEq n] + (M ε : ℝ) (hM : 0≤M) (hε : 0<ε) : + ∃ δ : ℝ,0<δ ∧ ∀ u : CStarMatrix m n A,‖u‖≤M → ‖u.conjTranspose*u-1‖<δ → + ∃ v : CStarMatrix m n A,v.conjTranspose*v=1 ∧ ‖v-u‖<ε := by + classical + obtain ⟨δ,hδ,hcorr⟩ := exists_inverse_sqrt_tolerance (A := CStarMatrix n n A) + (ε/(M+1)) (div_pos hε (by linarith)) + refine ⟨δ,hδ,?_⟩ + intro u hu hug + let g : CStarMatrix n n A := u.conjTranspose*u + obtain ⟨hgp,hgn⟩ := hcorr g (rectangular_initial_nonneg u) hug + let k : CStarMatrix n n A := g^(-(1/2):ℝ) + have hk : star k=k := (CFC.rpow_nonneg (a := g)).star_eq + refine ⟨u*k,?_,?_⟩ + · calc + (u*k).conjTranspose*(u*k) = k*(u.conjTranspose*u)*k := by + rw [rectangular_star_mul] + change (star k*u.conjTranspose)*(u*k)=_ + rw [hk] + simp only [rectangular_mul_assoc] + _ = 1 := CFC.conjugate_rpow_neg_one_half g hgp + · have hu1 : u*(1:CStarMatrix n n A)=u := by + ext i j + change (∑ l,u i l*(if l=j then 1 else 0))=u i j + simp + have hsub : u*(k-1)=u*k-u*(1:CStarMatrix n n A) := by + ext i j + change (∑ l,u i l*(k l j-(1:CStarMatrix n n A) l j))= + (∑ l,u i l*k l j)-(∑ l,u i l*(1:CStarMatrix n n A) l j) + simp only [mul_sub,Finset.sum_sub_distrib] + have he : u*k-u=u*(k-1) := by rw [hsub,hu1] + rw [he] + calc + _ ≤ ‖u‖*‖k-1‖ := rectangular_norm_mul_le _ _ + _ ≤ M*‖k-1‖ := mul_le_mul_of_nonneg_right hu (norm_nonneg _) + _ < (M+1)*(ε/(M+1)) := by + change ‖k-1‖<ε/(M+1) at hgn + have hn := norm_nonneg (k-1) + have hp : 0 < ε/(M+1) := div_pos hε (by linarith) + nlinarith + _ = ε := mul_div_cancel₀ _ (by linarith : M+1≠0) + +def cuntzPairRow (s t : A) : CStarMatrix (Fin 1) (Fin 2) A := + CStarMatrix.ofMatrix (fun _ => ![s,t]) + +omit [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] in +@[simp] lemma cuntzPairRow_apply (s t : A) (i : Fin 1) (j : Fin 2) : + cuntzPairRow s t i j=![s,t] j := rfl + +omit [PartialOrder A] [StarOrderedRing A] in +lemma cuntzPairRow_initial_entry (s t : A) (i j : Fin 2) : + ((cuntzPairRow s t).conjTranspose*cuntzPairRow s t) i j = + star (![s,t] i)*(![s,t] j) := by + change (∑ k : Fin 1,star ((cuntzPairRow s t) k i)*(cuntzPairRow s t) k j)=_ + simp only [Fin.sum_univ_one,cuntzPairRow_apply] + +lemma norm_cuntzPairRow_le (s t : A) : ‖cuntzPairRow s t‖≤‖s‖+‖t‖ := by + have h := rectangular_norm_le_sum_entries (cuntzPairRow s t) + simpa only [Fin.sum_univ_two,Fin.sum_univ_one,cuntzPairRow_apply,Matrix.cons_val_zero,Matrix.cons_val_one] using h + +lemma norm_cuntzPairRow_initial_sub_one_le (s t : A) : + ‖(cuntzPairRow s t).conjTranspose*cuntzPairRow s t-1‖ ≤ + ‖star s*s-1‖+‖star t*t-1‖+2*‖star s*t‖ := by + have h := rectangular_norm_le_sum_entries + ((cuntzPairRow s t).conjTranspose*cuntzPairRow s t-1) + have hnorm : ‖star t*s‖=‖star s*t‖ := by + rw [← norm_star (star s*t),star_mul,star_star] + simp only [Fin.sum_univ_two,CStarMatrix.sub_apply,cuntzPairRow_initial_entry, + Matrix.cons_val_zero,Matrix.cons_val_one, + CStarMatrix.one_apply_eq,CStarMatrix.one_apply_ne (by decide : (0:Fin 2)≠1), + CStarMatrix.one_apply_ne (by decide : (1:Fin 2)≠0),sub_zero,hnorm] at h + linarith + +lemma exists_cuntzPair_near (ε : ℝ) (hε : 0<ε) : + ∃ δ : ℝ,0<δ ∧ ∀ s t : A,‖s‖≤1 → ‖t‖≤1 → + ‖star s*s-1‖<δ → ‖star t*t-1‖<δ → ‖star s*t‖<δ → + ∃ r q : A,star r*r=1 ∧ star q*q=1 ∧ star r*q=0 ∧ ‖r-s‖<ε ∧ ‖q-t‖<ε := by + obtain ⟨δ,hδ,hcorr⟩ := exists_rectangular_isometry_near (A := A) + (m := Fin 1) (n := Fin 2) 2 ε (by norm_num) hε + refine ⟨δ/4,by positivity,?_⟩ + intro s t hs ht hss htt hst + have hu : ‖cuntzPairRow s t‖≤2 := (norm_cuntzPairRow_le s t).trans (by linarith) + have hg : ‖(cuntzPairRow s t).conjTranspose*cuntzPairRow s t-1‖<δ := by + have h := norm_cuntzPairRow_initial_sub_one_le s t + linarith + obtain ⟨v,hv,hvn⟩ := hcorr (cuntzPairRow s t) hu hg + refine ⟨v 0 0,v 0 1,?_,?_,?_,?_,?_⟩ + · have h := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 0 0) hv + change (∑ k : Fin 1,star (v k 0)*v k 0)=(1:CStarMatrix (Fin 2) (Fin 2) A) 0 0 at h + simpa using h + · have h := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 1 1) hv + change (∑ k : Fin 1,star (v k 1)*v k 1)=(1:CStarMatrix (Fin 2) (Fin 2) A) 1 1 at h + simpa using h + · have h := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 0 1) hv + change (∑ k : Fin 1,star (v k 0)*v k 1)=(1:CStarMatrix (Fin 2) (Fin 2) A) 0 1 at h + simpa [CStarMatrix.one_apply_ne (by decide : (0:Fin 2)≠1)] using h + · have h := (CStarMatrix.norm_entry_le_norm (M := v-cuntzPairRow s t) (i := 0) (j := 0)).trans_lt hvn + simpa only [CStarMatrix.sub_apply,cuntzPairRow_apply,Matrix.cons_val_zero,Matrix.cons_val_one] using h + · have h := (CStarMatrix.norm_entry_le_norm (M := v-cuntzPairRow s t) (i := 0) (j := 1)).trans_lt hvn + simpa only [CStarMatrix.sub_apply,cuntzPairRow_apply,Matrix.cons_val_zero,Matrix.cons_val_one] using h + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CutImplementation.lean b/lean/OAI/Analysis/WeakInfiniteness/CutImplementation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f45cb3f7c0c7138df71410bfcc61f56ff253f689 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CutImplementation.lean @@ -0,0 +1,93 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzComparison +import OAI.Analysis.WeakInfiniteness.RectangularPolar +import OAI.Analysis.WeakInfiniteness.SpectralCut + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +local instance matrixRealModuleCut {A : Type*} [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n : Type*} [Fintype m] [Fintype n] + +omit [Fintype n] in +lemma rectangular_sqrt_initial (h : CStarMatrix m m A) (V : CStarMatrix m n A) + (hh : 0 ≤ h) : + (CFC.sqrt h*V).conjTranspose*(CFC.sqrt h*V) = V.conjTranspose*h*V := by + rw [rectangular_star_mul, ← CStarMatrix.star_eq_conjTranspose, + (CFC.sqrt_nonneg h).star_eq] + calc + (V.conjTranspose*CFC.sqrt h)*(CFC.sqrt h*V) = + V.conjTranspose*(CFC.sqrt h*CFC.sqrt h)*V := by + simp only [rectangular_mul_assoc] + _ = V.conjTranspose*h*V := by rw [CFC.sqrt_mul_sqrt_self h hh] + +lemma rectangular_sandwich_nonneg (h : CStarMatrix m m A) (V : CStarMatrix m n A) + (hh : 0 ≤ h) : 0 ≤ V.conjTranspose*h*V := by + rw [← rectangular_sqrt_initial h V hh] + exact rectangular_initial_nonneg _ + +lemma CuntzSubequiv.exact_spectralRamp {x : CStarMatrix n n A} + {h : CStarMatrix m m A} (hx : 0 ≤ x) (hh : 0 ≤ h) (hxh : CuntzSubequiv x h) + (δ : ℝ) (hδ : 0 < δ) : + ∃ R : CStarMatrix m n A, + R.conjTranspose*R = cfcₙ (spectralRamp δ) x ∧ + R*R.conjTranspose ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ ‖R‖ ≤ 1 := by + let θ := δ/2 + have hθ : 0 < θ := by dsimp only [θ]; positivity + obtain ⟨V, hV⟩ := hxh (θ/2) (by positivity) + let y := V.conjTranspose*h*V + let z := cfcₙ (spectralRamp θ) x + have hz : 0 ≤ z := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg θ s) + have hd : 0 ≤ cfcₙ (spectralRamp δ) x := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg δ s) + have hzero : ∀ s, s ≤ 2*θ → spectralRamp δ s = 0 := by + intro s hs + apply spectralRamp_eq_zero hδ + dsimp only [θ] at hs + linarith + have hdom : cfcₙ (spectralRamp δ) x ≤ (2*1/θ) • (z*y*z) := + spectralRamp_domination x y hx (rectangular_sandwich_nonneg h V hh) hθ zero_le_one hV.le + (spectralRamp δ) (continuous_spectralRamp δ) (spectralRamp_eq_zero hδ hδ.le) + hzero (spectralRamp_le_one δ) + have he : (CFC.sqrt h*(V*z)).conjTranspose*(CFC.sqrt h*(V*z)) = z*y*z := by + rw [← rectangular_mul_assoc (CFC.sqrt h) V z, rectangular_initial_mul, + rectangular_sqrt_initial h V hh, hz.star_eq] + obtain ⟨R, hR, hRher⟩ := rectangular_exact_initial_hereditary h (V*z) + (cfcₙ (spectralRamp δ) x) hh hd (show 0 ≤ 2*1/θ by positivity) (by rwa [he]) + refine ⟨R, hR, hRher, ?_⟩ + have hn : ‖cfcₙ (spectralRamp δ) x‖ ≤ 1 := by + apply norm_cfcₙ_le + intro s _ + rw [Real.norm_eq_abs, abs_of_nonneg (spectralRamp_nonneg δ s)] + exact spectralRamp_le_one δ s + rw [← hR, rectangular_norm_initial] at hn + nlinarith [norm_nonneg R] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/CyclicOrbit.lean b/lean/OAI/Analysis/WeakInfiniteness/CyclicOrbit.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3cdab8455dd3688d0c16c01da7c0c69d1aca9fb --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/CyclicOrbit.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PureIrreducible + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +open scoped ComplexOrder InnerProductSpace Topology + +section Unital + +variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem extreme_norming_state_representation [Nontrivial A] (b : A) (hb : 0 ≤ b) : + ∃ (f : WeakDual ℝ (selfAdjoint A)) (hf : f ∈ (realStateSpace A).extremePoints ℝ), + ‖(realStateComplexification f hf.1).gnsStarAlgHom b‖=‖b‖ := by + obtain ⟨f,hf,hfb⟩ := exists_extreme_norming_real_state b hb + refine ⟨f,hf,le_antisymm + (NonUnitalStarAlgHom.norm_apply_le (realStateComplexification f hf.1).gnsNonUnitalStarAlgHom b) ?_⟩ + let Φ := realStateComplexification f hf.1 + let Ω := gnsCyclicVector Φ + have hΩ : ‖Ω‖=1 := norm_gnsCyclicVector Φ (realStateComplexification_one f hf.1) + have hv : (inner ℂ Ω (Φ.gnsStarAlgHom b Ω)).re=‖b‖ := by + have he := DFunLike.congr_fun (gns_vectorFunctional_eq f hf.1) ⟨b,hb.isSelfAdjoint⟩ + exact he.trans hfb + calc + ‖b‖ = (inner ℂ Ω (Φ.gnsStarAlgHom b Ω)).re := hv.symm + _ ≤ ‖inner ℂ Ω (Φ.gnsStarAlgHom b Ω)‖ := Complex.re_le_norm _ + _ ≤ ‖Ω‖*‖Φ.gnsStarAlgHom b Ω‖ := norm_inner_le_norm _ _ + _ ≤ ‖Ω‖*(‖Φ.gnsStarAlgHom b‖*‖Ω‖) := by + gcongr; exact ContinuousLinearMap.le_opNorm _ _ + _ = ‖Φ.gnsStarAlgHom b‖ := by rw [hΩ,one_mul,mul_one] + +end Unital + +section NonUnital + +variable {A : Type u} {H : Type v} [NonUnitalCStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +def NonUnitalRepresentationIrreducible (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) : Prop := + ∀ S : Submodule ℂ H,IsClosed (S : Set H) → + (∀ a : A,∀ x ∈ S,π a x ∈ S) → S=⊥ ∨ S=⊤ + +lemma irreducible_restrict_unitization + (π : Unitization ℂ A →⋆ₐ[ℂ] (H →L[ℂ] H)) (hπ : RepresentationIrreducible π) : + NonUnitalRepresentationIrreducible + (π.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom ℂ A)) := by + intro S hSc hS + apply hπ S hSc + intro u x hx + rw [← Unitization.inl_fst_add_inr_snd_eq u,map_add, ← Unitization.algebraMap_eq_inl] + have hc : π (algebraMap ℂ (Unitization ℂ A) u.fst) = + algebraMap ℂ (H →L[ℂ] H) u.fst := AlgHomClass.commutes π _ + rw [hc] + change u.fst • x+π (Unitization.inr u.snd) x ∈ S + exact S.add_mem (S.smul_mem _ hx) (hS _ _ hx) + +variable [PartialOrder A] [StarOrderedRing A] + +theorem exists_irreducible_norming_representation (b : A) (hb : 0 ≤ b) (hb0 : b ≠ 0) : + ∃ (H : Type u) (_ : NormedAddCommGroup H) (_ : InnerProductSpace ℂ H) (_ : CompleteSpace H) + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π ∧ ‖π b‖=‖b‖ ∧ π b ≠ 0 := by + let u : Unitization ℂ A := (b : Unitization ℂ A) + have hu : 0 ≤ u := by + change 0 ≤ (Unitization.inrNonUnitalStarAlgHom ℂ A) b + exact map_nonneg (Unitization.inrNonUnitalStarAlgHom ℂ A) hb + obtain ⟨f,hf,hfn⟩ := extreme_norming_state_representation u hu + let Φ := realStateComplexification f hf.1 + let π := Φ.gnsStarAlgHom.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom ℂ A) + have hn : ‖π b‖=‖b‖ := by + change ‖Φ.gnsStarAlgHom u‖=‖b‖ + rw [hfn] + exact Unitization.norm_inr b + refine ⟨Φ.GNS,inferInstance,inferInstance,inferInstance,π, + irreducible_restrict_unitization Φ.gnsStarAlgHom (extreme_real_state_gns_irreducible f hf),hn,?_⟩ + intro hz + have : ‖b‖=0 := by rw [← hn,hz,norm_zero] + exact hb0 (norm_eq_zero.mp this) + +end NonUnital + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/DetectedSigns.lean b/lean/OAI/Analysis/WeakInfiniteness/DetectedSigns.lean new file mode 100644 index 0000000000000000000000000000000000000000..3802ad4816ce0999ce19a99c683d1ca0a2de506c --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/DetectedSigns.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.HereditaryDeletion +import OAI.Analysis.WeakInfiniteness.SecondCoupling +import OAI.Analysis.WeakInfiniteness.SquareZero4 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_detected_both_signs_on_norm_slice_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ h ∈ D,IsSelfAdjoint h ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + π h⁺ ≠ 0 ∧ π h⁻ ≠ 0 := by + obtain ⟨U,hUD,V,hVD,hU,hV,ρ,hρ,hc⟩ := + exists_second_coupling_on_norm_slice_any hσ hσγ hgap hA hn hpi D hD hb hα hlocal + obtain ⟨h,hhD,hh,m,e,he,hs,hd,hcorners⟩ := + exists_hereditary_continuous_deletion D hD.1 U V hUD hVD hU hV hρ + refine ⟨h,hhD,hh,?_⟩ + intro H π hπb + obtain ⟨p,q,S,T,hp,hq,hST,hpn⟩ := hc H π hπb + have hhn : π h ≠ 0 := by + intro hz + apply hpn + rw [← hcorners p q S T hp hq hST,map_mul,map_mul,hz,mul_zero,zero_mul] + have hhn' : (Unitization.starLift π) (h : Unitization ℂ A) ≠ 0 := by + rwa [starLift_inr_apply] + have hsigns := both_signs_in_image_of_partition_diagonals (Unitization.starLift π) + (hh.map (Unitization.inrNonUnitalStarAlgHom ℂ A)) hhn' e he hs hd + change ((Unitization.starLift π) (h : Unitization ℂ A))⁺ ≠ 0 ∧ + ((Unitization.starLift π) (h : Unitization ℂ A))⁻ ≠ 0 at hsigns + rw [starLift_inr_apply] at hsigns + simpa only [map_posPart π hh,map_negPart π hh] using hsigns + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/DiagonalRegular.lean b/lean/OAI/Analysis/WeakInfiniteness/DiagonalRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..65036e5a9dc92e90bc1ba0564ed601a8af72c449 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/DiagonalRegular.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ReducedGroupAlgebra +import OAI.Analysis.WeakInfiniteness.ScalarDiagonal + +namespace OAI + +universe u v + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace + +namespace WeakPureInfiniteness + +section ContinuousGroupCoefficients + +variable {G : Type u} [Group G] + +def starHomCLM {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + (φ : A →⋆ₐ[ℂ] B) : A →L[ℂ] B := + φ.toAlgHom.toLinearMap.mkContinuous 1 (fun x => by + change ‖φ x‖ ≤ 1 * ‖x‖ + simpa only [one_mul] using NonUnitalStarAlgHom.norm_apply_le φ x) + +@[simp] lemma starHomCLM_apply {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + (φ : A →⋆ₐ[ℂ] B) (x : A) : starHomCLM φ x = φ x := rfl + +lemma groupCLM_ext {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + (f g : FullGroupAlgebra G →L[ℂ] E) + (h : ∀ s : G, f (fullGroupElement s) = g (fullGroupElement s)) : f = g := by + apply DFunLike.coe_injective + apply fullGroupPolynomial_dense.equalizer f.continuous g.continuous + funext c + simp only [Function.comp_apply, fullGroupPolynomial, Finsupp.linearCombination_apply, + Finsupp.sum, map_sum, map_smul, h] + +def rightGroupEvaluation : FullGroupAlgebra G →⋆ₐ[ℂ] + (GroupHilbert G →L[ℂ] GroupHilbert G) := + (groupInversion.conjStarAlgEquiv.toStarAlgHom).comp + (fullGroupEvaluation (leftRegularRepresentation G)) + +lemma rightGroupEvaluation_element (s : G) : + rightGroupEvaluation (fullGroupElement s) = rightRegular s := by + apply ContinuousLinearMap.ext + intro ξ + change groupInversion ((leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) + (groupInversion.symm ξ)) = _ + rw [groupInversion_intertwines, LinearIsometryEquiv.apply_symm_apply] + +lemma rightGroupEvaluation_eq_zero {b : FullGroupAlgebra G} (hb : fullToReduced b = 0) : + rightGroupEvaluation b = 0 := by + have h : fullGroupEvaluation (leftRegularRepresentation G) b = 0 := + congrArg Subtype.val hb + change groupInversion.conjStarAlgEquiv + (fullGroupEvaluation (leftRegularRepresentation G) b) = 0 + rw [h, map_zero] + +end ContinuousGroupCoefficients + +section MinimalElementaryContinuity + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def minimalElementaryLeft (b : B) : A →L[ℂ] MinimalTensor A B := + LinearMap.mkContinuous + { toFun a := minimalElementary a b + map_add' a a' := Subtype.ext (spatialElementary_add_left a a' b) + map_smul' c a := Subtype.ext (spatialElementary_smul_left c a b) } + ‖b‖ (fun a => by + change ‖spatialElementary a b‖ ≤ ‖b‖ * ‖a‖ + simpa only [mul_comm ‖b‖] using norm_spatialElementary_le a b) + +def minimalElementaryRight (a : A) : B →L[ℂ] MinimalTensor A B := + LinearMap.mkContinuous + { toFun b := minimalElementary a b + map_add' b b' := Subtype.ext (spatialElementary_add_right a b b') + map_smul' c b := Subtype.ext (spatialElementary_smul_right c a b) } + ‖a‖ (norm_spatialElementary_le a) + +@[simp] lemma minimalElementaryLeft_apply (a : A) (b : B) : + minimalElementaryLeft b a = minimalElementary a b := rfl + +@[simp] lemma minimalElementaryRight_apply (a : A) (b : B) : + minimalElementaryRight a b = minimalElementary a b := rfl + +end MinimalElementaryContinuity + +section RegularPairing + +variable {G : Type u} [Group G] + +abbrev regularBase : GroupHilbert G := by + classical + exact lp.single 2 1 1 + +lemma regularBase_eq [DecidableEq G] : + regularBase (G := G) = lp.single 2 1 1 := by + apply Subtype.ext + funext g + simp [regularBase, lp.single, Pi.single_apply] + +def regularPairingRight (a : FullGroupAlgebra G) : FullGroupAlgebra G →L[ℂ] ℂ := + (innerSL ℂ (regularBase (G := G))).comp + ((fullGroupEvaluation (leftRegularRepresentation G) a).comp + ((ContinuousLinearMap.apply ℂ (GroupHilbert G) regularBase).comp + (starHomCLM rightGroupEvaluation))) + +def regularPairingLeft (b : FullGroupAlgebra G) : FullGroupAlgebra G →L[ℂ] ℂ := + (innerSL ℂ (regularBase (G := G))).comp + ((ContinuousLinearMap.apply ℂ (GroupHilbert G) (rightGroupEvaluation b regularBase)).comp + (starHomCLM (fullGroupEvaluation (leftRegularRepresentation G)))) + +lemma regularPairingRight_apply (a b : FullGroupAlgebra G) : + regularPairingRight a b = inner ℂ (regularBase (G := G)) + (fullGroupEvaluation (leftRegularRepresentation G) a + (rightGroupEvaluation b regularBase)) := rfl + +lemma regularPairingLeft_apply (a b : FullGroupAlgebra G) : + regularPairingLeft b a = regularPairingRight a b := rfl + +end RegularPairing + +section FreeRegularPairing + +variable {α : Type u} [Fintype α] [DecidableEq α] + +lemma freeDiagonalFunctional_regular (a b : FullGroupAlgebra (FreeGroup α)) : + freeDiagonalFunctional (minimalElementary a b) = regularPairingRight a b := by + classical + have hright (s : FreeGroup α) : + freeDiagonalFunctional.comp (minimalElementaryRight (fullGroupElement s)) = + regularPairingRight (fullGroupElement s) := by + apply groupCLM_ext + intro t + change freeDiagonalFunctional (minimalElementary (fullGroupElement s) (fullGroupElement t)) = + regularPairingRight (fullGroupElement s) (fullGroupElement t) + simp only [freeDiagonalFunctional_group_tensors, regularPairingRight_apply, + rightGroupEvaluation_element] + change (if s = t then (1 : ℂ) else 0) = inner ℂ (regularBase (G := FreeGroup α)) + ((leftRegular s : GroupHilbert (FreeGroup α) →L[ℂ] GroupHilbert (FreeGroup α)) + ((rightRegular t : GroupHilbert (FreeGroup α) →L[ℂ] GroupHilbert (FreeGroup α)) regularBase)) + rw [regularBase_eq] + have hh := inner_leftRight_regular_base s t + by_cases hst : s = t + · simpa only [ite_eq_left hst, mul_apply_eq_comp] using hh.symm + · simpa only [ite_eq_right hst, mul_apply_eq_comp] using hh.symm + have hleft : freeDiagonalFunctional.comp (minimalElementaryLeft b) = regularPairingLeft b := by + apply groupCLM_ext + intro s + exact DFunLike.congr_fun (hright s) b + exact DFunLike.congr_fun hleft a + +lemma freeDiagonalFunctional_elementary_kernel (a b : FullGroupAlgebra (FreeGroup α)) + (hb : fullToReduced b = 0) : + freeDiagonalFunctional (minimalElementary a b) = 0 := by + rw [freeDiagonalFunctional_regular, regularPairingRight_apply, + rightGroupEvaluation_eq_zero hb] + simp + +end FreeRegularPairing + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ElementaryCP.lean b/lean/OAI/Analysis/WeakInfiniteness/ElementaryCP.lean new file mode 100644 index 0000000000000000000000000000000000000000..91b71f023f132339d641af0ada0fa749cd70c22a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ElementaryCP.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NuclearCompression + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +omit [PartialOrder A] [StarOrderedRing A] in +def finiteCompressionLinear (v : Fin n → A) : A →ₗ[ℂ] A where + toFun := finiteCompression v + map_add' r s := by + simp only [finiteCompression,mul_add,add_mul,Finset.sum_add_distrib] + map_smul' c r := by + simp only [finiteCompression,mul_smul_comm,smul_mul_assoc,Finset.smul_sum,RingHom.id_apply] + +def finiteCompressionContinuous (v : Fin n → A) : A →L[ℂ] A := + (finiteCompressionLinear v).mkContinuous ‖∑ i,star (v i)*v i‖ (finiteCompression_norm_le v) + +lemma finiteCompressionContinuous_apply (v : Fin n → A) (r : A) : + finiteCompressionContinuous v r=finiteCompression v r := rfl + +lemma finiteCompressionContinuous_norm_le (v : Fin n → A) : + ‖finiteCompressionContinuous v‖≤‖∑ i,star (v i)*v i‖ := + ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + (fun r => finiteCompression_norm_le v r) + +lemma finiteCompressionContinuous_cp (v : Fin n → A) : + CompletelyPositive (finiteCompressionContinuous v) := by + intro m x hx + have he_i (i : Fin n) (j k : Fin m) : + (star (diagonalCopies m (v i))*x*diagonalCopies m (v i)) j k= + star (v i)*x j k*v i := by + simp [diagonalCopies,CStarMatrix.mul_apply,CStarMatrix.star_apply,Matrix.diagonal_apply,apply_ite,ite_mul] + have he : CStarMatrix.ofMatrix (fun j k => finiteCompressionContinuous v (x j k))= + ∑ i,star (diagonalCopies m (v i))*x*diagonalCopies m (v i) := by + ext j k + change (∑ i,star (v i)*x j k*v i)=matrixEntryLinear j k + (∑ i,star (diagonalCopies m (v i))*x*diagonalCopies m (v i)) + rw [map_sum] + change (∑ i,star (v i)*x j k*v i)= + ∑ i,(star (diagonalCopies m (v i))*x*diagonalCopies m (v i)) j k + simp only [he_i] + rw [he] + exact Finset.sum_nonneg fun i _ => star_left_conjugate_nonneg hx (diagonalCopies m (v i)) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ElementaryComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/ElementaryComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..3524f7ce114b0ac09da66f5e4c367ead8534d6b6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ElementaryComparison.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +open scoped NNReal + +open Filter Topology + +section ElementaryComparison + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m k : Type*} [Fintype m] [Fintype k] + +lemma zero_cuntzSubequiv (b : CStarMatrix k k A) : + CuntzSubequiv (0 : CStarMatrix m m A) b := by + intro ε hε + refine ⟨0, ?_⟩ + simpa using hε + +lemma CuntzSubequiv.of_exact {a : CStarMatrix m m A} {b : CStarMatrix k k A} + (v : CStarMatrix k m A) (hv : v.conjTranspose * b * v = a) : + CuntzSubequiv a b := by + intro ε hε + exact ⟨v, by simpa [hv] using hε⟩ + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] in +lemma continuous_matrix_mul {l : Type*} [Fintype l] : + Continuous (fun p : CStarMatrix m k A × CStarMatrix k l A => p.1 * p.2) := by + change Continuous ((CStarMatrix.ofMatrixL : Matrix m l A ≃L[ℂ] CStarMatrix m l A) ∘ + fun p : CStarMatrix m k A × CStarMatrix k l A => + (CStarMatrix.ofMatrixL.symm p.1) * (CStarMatrix.ofMatrixL.symm p.2)) + apply Continuous.comp (ContinuousLinearEquiv.continuous _) + apply continuous_pi + intro i + apply continuous_pi + intro j + simp only [Matrix.mul_apply] + fun_prop + +omit [PartialOrder A] [StarOrderedRing A] in +lemma continuous_matrix_sandwich (v : CStarMatrix k m A) : + Continuous (fun b : CStarMatrix k k A => v.conjTranspose * b * v) := by + exact continuous_matrix_mul.comp <| + (continuous_matrix_mul.comp (continuous_const.prodMk continuous_id)).prodMk continuous_const + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] in +lemma matrix_mul_assoc {l o : Type*} [Fintype l] [Fintype o] + (a : CStarMatrix m k A) (b : CStarMatrix k l A) (c : CStarMatrix l o A) : + a * b * c = a * (b * c) := Matrix.mul_assoc _ _ _ + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] in +lemma matrix_conjTranspose_mul {l : Type*} [Fintype l] + (a : CStarMatrix m k A) (b : CStarMatrix k l A) : + (a * b).conjTranspose = b.conjTranspose * a.conjTranspose := + Matrix.conjTranspose_mul _ _ + +lemma cuntzSubequiv_iff_mem_closure {a : CStarMatrix m m A} {b : CStarMatrix k k A} : + CuntzSubequiv a b ↔ + a ∈ closure (Set.range fun v : CStarMatrix k m A => v.conjTranspose * b * v) := by + rw [Metric.mem_closure_iff] + constructor + · intro h ε hε + obtain ⟨v, hv⟩ := h ε hε + exact ⟨_, ⟨v, rfl⟩, by simpa [dist_eq_norm, norm_sub_rev] using hv⟩ + · intro h ε hε + obtain ⟨_, ⟨v, rfl⟩, hv⟩ := h ε hε + exact ⟨v, by simpa [dist_eq_norm, norm_sub_rev] using hv⟩ + +lemma CuntzSubequiv.of_tendsto {ι : Type*} {f : Filter ι} [f.NeBot] + {a : ι → CStarMatrix m m A} {a₀ : CStarMatrix m m A} {b : CStarMatrix k k A} + (hab : ∀ i, CuntzSubequiv (a i) b) (ha : Tendsto a f (𝓝 a₀)) : + CuntzSubequiv a₀ b := by + rw [cuntzSubequiv_iff_mem_closure] + apply isClosed_closure.mem_of_tendsto ha + exact Filter.Eventually.of_forall fun i => (cuntzSubequiv_iff_mem_closure.mp (hab i)) + +lemma CuntzSubequiv.trans {l : Type*} [Fintype l] + {a : CStarMatrix m m A} {b : CStarMatrix k k A} {c : CStarMatrix l l A} + (hab : CuntzSubequiv a b) (hbc : CuntzSubequiv b c) : CuntzSubequiv a c := by + intro ε hε + obtain ⟨v, hv⟩ := hab (ε / 2) (by positivity) + obtain ⟨δ, hδ, hcont⟩ := Metric.continuousAt_iff.mp + (continuous_matrix_sandwich v).continuousAt (ε / 2) (by positivity) + obtain ⟨w, hw⟩ := hbc δ hδ + refine ⟨w * v, ?_⟩ + have heq : (w * v).conjTranspose * c * (w * v) = + v.conjTranspose * (w.conjTranspose * c * w) * v := by + rw [matrix_conjTranspose_mul] + simp only [matrix_mul_assoc] + rw [heq] + have ht := hcont (by simpa only [dist_eq_norm] using hw) + have hnorm := norm_sub_le_norm_sub_add_norm_sub + (v.conjTranspose * (w.conjTranspose * c * w) * v) (v.conjTranspose * b * v) a + simp only [dist_eq_norm] at ht + linarith + +lemma cuntzSubequiv_refl (a : CStarMatrix m m A) : CuntzSubequiv a a := by + let au := CStarAlgebra.increasingApproximateUnit (CStarMatrix m m A) + intro ε hε + have hl := Metric.tendsto_nhds.mp (au.tendsto_mul_left a) (ε / 2) (by positivity) + have hr := Metric.tendsto_nhds.mp (au.tendsto_mul_right a) (ε / 2) (by positivity) + obtain ⟨u, hleft, hright, hstar, hnorm⟩ := + (hl.and (hr.and (au.eventually_star_eq.and au.eventually_norm))).exists + refine ⟨u, ?_⟩ + rw [← CStarMatrix.star_eq_conjTranspose, hstar] + have heq : u * a * u - a = (u * a - a) * u + (a * u - a) := by noncomm_ring + rw [heq] + calc + _ ≤ ‖(u * a - a) * u‖ + ‖a * u - a‖ := norm_add_le _ _ + _ ≤ ‖u * a - a‖ * ‖u‖ + ‖a * u - a‖ := add_le_add (norm_mul_le _ _) le_rfl + _ ≤ ‖u * a - a‖ + ‖a * u - a‖ := by + have hbound : ‖u * a - a‖ * ‖u‖ ≤ ‖u * a - a‖ := by + nlinarith [norm_nonneg (u * a - a)] + exact add_le_add hbound le_rfl + _ < ε := by simp only [dist_eq_norm] at hleft hright; linarith + +end ElementaryComparison + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ElementaryIntertwining.lean b/lean/OAI/Analysis/WeakInfiniteness/ElementaryIntertwining.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9dec2bf102f0aac91278e6fba43429cbabb94ae --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ElementaryIntertwining.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.OInfinityCriterion +import OAI.Analysis.WeakInfiniteness.UnitaryIntertwining + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +universe u v + +section Polynomial + +variable {A : Type u} {D : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra D] + +def minimalPolynomial (c : A × D →₀ ℂ) : MinimalTensor A D := + c.sum fun p t => t • minimalElementary p.1 p.2 + +lemma minimalPolynomial_denseRange : DenseRange (minimalPolynomial (A := A) (D := D)) := by + let S := Submodule.span ℂ (Set.range fun p : A × D => minimalElementary p.1 p.2) + have h : S.topologicalClosure=⊤ := by + apply minimal_elementary_span_dense _ S.isClosed_topologicalClosure + intro a d + exact S.le_topologicalClosure (Submodule.subset_span (Set.mem_range_self (a,d))) + have hr : Set.range (minimalPolynomial (A := A) (D := D))=(S : Set (MinimalTensor A D)) := by + ext x + exact Finsupp.mem_span_range_iff_exists_finsupp.symm + intro z + rw [hr] + change z ∈ S.topologicalClosure + rw [h] + trivial + +end Polynomial + +section UnitalRight + +variable {A : Type u} {D : Type v} [NonUnitalCStarAlgebra A] [CStarAlgebra D] + +def ElementaryUnitaryIntertwining (A : Type u) (D : Type v) + [NonUnitalCStarAlgebra A] [CStarAlgebra D] : Prop := + ∀ (E : Finset A) (T : Finset (A × D)) (ε : ℝ), 0 < ε → + ∃ u : unitary (Unitization ℂ (MinimalTensor A D)), + (∀ a ∈ E,dist (unitizationInnerFun u (minimalLeftEmbedding A D a)) + (minimalLeftEmbedding A D a)<ε) ∧ + ∀ p ∈ T,∃ a : A,dist (unitizationInnerFun u (minimalLeftEmbedding A D a)) + (minimalElementary p.1 p.2)<ε + +lemma ElementaryUnitaryIntertwining.unitaryFiniteIntertwining + (h : ElementaryUnitaryIntertwining A D) : + UnitaryFiniteIntertwining (minimalLeftEmbedding A D) := by + classical + intro E F ε hε + have hd : ∀ z : MinimalTensor A D,∃ c : A × D →₀ ℂ, + dist (minimalPolynomial c) z<ε/2 := by + intro z + simpa only [dist_comm] using + Metric.denseRange_iff.mp minimalPolynomial_denseRange z (ε/2) (by positivity) + choose c hc using hd + let T : Finset (A × D) := F.biUnion fun z => + (c z).support.image (fun p => ((c z p) • p.1,p.2)) + let N : ℝ := 1+∑ z ∈ F,((c z).support.card : ℝ) + have hN : 0 < N := by dsimp only [N]; positivity + have hN1 : 1 ≤ N := by + dsimp only [N] + exact le_add_of_nonneg_right (Finset.sum_nonneg fun _ _ => Nat.cast_nonneg _) + let δ : ℝ := ε/(4*N) + have hδ : 0 < δ := div_pos hε (by positivity) + have hδε : δ < ε := by + dsimp only [δ] + apply (div_lt_iff₀ (by positivity : 0 < 4*N)).mpr + nlinarith + obtain ⟨u,hE,hT⟩ := h E T δ hδ + have hw : ∀ p : A × D,∃ a : A,p ∈ T → + dist (unitizationInnerFun u (minimalLeftEmbedding A D a)) (minimalElementary p.1 p.2)<δ := by + intro p + by_cases hp : p ∈ T + · obtain ⟨a,ha⟩ := hT p hp + exact ⟨a,fun _ => ha⟩ + · exact ⟨0,fun h => (hp h).elim⟩ + choose w hw using hw + refine ⟨u,fun a ha => (hE a ha).trans hδε,?_⟩ + intro z hz + let g : A × D → A × D := fun p => ((c z p) • p.1,p.2) + let a : A := ∑ p ∈ (c z).support,w (g p) + have hg (p : A × D) (hp : p ∈ (c z).support) : g p ∈ T := by + exact Finset.mem_biUnion.mpr ⟨z,hz,Finset.mem_image.mpr ⟨p,hp,rfl⟩⟩ + have hn : ((c z).support.card : ℝ) ≤ N := by + have hs := Finset.single_le_sum (f := fun y : MinimalTensor A D => ((c y).support.card : ℝ)) + (fun _ _ => Nat.cast_nonneg _) hz + dsimp only [N] + linarith + have he : dist (unitizationInnerFun u (minimalLeftEmbedding A D a)) (minimalPolynomial (c z)) + ≤ ((c z).support.card : ℝ)*δ := by + rw [dist_eq_norm] + change ‖unitizationInnerHom u (minimalLeftEmbedding A D a)-minimalPolynomial (c z)‖ ≤ _ + dsimp only [a,minimalPolynomial,Finsupp.sum] + rw [map_sum,map_sum,← Finset.sum_sub_distrib] + calc + _ ≤ ∑ p ∈ (c z).support, + ‖unitizationInnerHom u (minimalLeftEmbedding A D (w (g p)))- + c z p • minimalElementary p.1 p.2‖ := norm_sum_le _ _ + _ ≤ ∑ _p ∈ (c z).support,δ := by + apply Finset.sum_le_sum + intro p hp + have hp' := (hw (g p) (hg p hp)).le + rw [dist_eq_norm] at hp' + change ‖unitizationInnerHom u (minimalLeftEmbedding A D (w (g p)))- + minimalElementary (c z p • p.1) p.2‖ ≤ δ at hp' + rwa [minimalElementary_smul_left] at hp' + _ = _ := by simp + refine ⟨a,?_⟩ + have hdist := dist_triangle (unitizationInnerFun u (minimalLeftEmbedding A D a)) + (minimalPolynomial (c z)) z + have hNδ : N*δ=ε/4 := by dsimp only [δ]; field_simp + have hbound := mul_le_mul_of_nonneg_right hn hδ.le + rw [hNδ] at hbound + have hcz := hc z + linarith + +lemma ElementaryUnitaryIntertwining.finiteIntertwining + (h : ElementaryUnitaryIntertwining A D) : + FiniteIntertwining (minimalLeftEmbedding A D) := + h.unitaryFiniteIntertwining.finiteIntertwining + +end UnitalRight + +def oInfinityAbsorptionEquiv_of_elementaryIntertwining (A : Type u) + [NonUnitalCStarAlgebra A] [SeparableSpace A] + (h : ElementaryUnitaryIntertwining A OInfinity) : + A ≃⋆ₐ[ℂ] MinimalTensor A OInfinity := + oInfinityAbsorptionEquiv_of_finiteIntertwining A h.finiteIntertwining + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ExactHereditary.lean b/lean/OAI/Analysis/WeakInfiniteness/ExactHereditary.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5c3c203e0e8b757e679b9dfd00de02f52fcb11d --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ExactHereditary.lean @@ -0,0 +1,133 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorIdealCut +import OAI.Analysis.WeakInfiniteness.TensorInjectivity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology + +namespace WeakPureInfiniteness + +universe u v + +section IdealCharacterization + +variable {A : Type u} {C D : Type v} [CStarAlgebra A] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +lemma tensor_mul_kernel_element_mem (q : C →⋆ₙₐ[ℂ] D) (e : C) (he : q e = 0) + (x : MinimalTensor A C) : + (x * rightElementaryHom e).val ∈ tensorKernelIdeal (A := A) q := by + have hs : ∀ z ∈ Submodule.span ℂ + (Set.range fun p : A × C => spatialElementary p.1 p.2), + z * spatialElementary (1 : A) e ∈ tensorKernelIdeal (A := A) q := by + intro z hz + induction hz using Submodule.span_induction with + | mem z hz => + obtain ⟨⟨a,c⟩,rfl⟩ := hz + rw [← spatialElementary_mul, mul_one] + apply NonUnitalStarSubalgebra.le_topologicalClosure + apply NonUnitalStarAlgebra.subset_adjoin ℂ + exact ⟨a,c*e,by rw [map_mul,he,mul_zero],rfl⟩ + | zero => + rw [zero_mul] + exact (tensorKernelIdeal (A := A) q).zero_mem + | add z w _ _ hz hw => + rw [add_mul] + exact (tensorKernelIdeal (A := A) q).add_mem hz hw + | smul c z _ hz => + rw [smul_mul_assoc] + exact (tensorKernelIdeal (A := A) q).smul_mem c hz + have hc : IsClosed {z : SpatialAmbient A C | + z * spatialElementary (1 : A) e ∈ tensorKernelIdeal (A := A) q} := + isClosed_closure.preimage (continuous_id.mul continuous_const) + have hx := x.property + change x.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hx + rw [minimalTensor_eq_closure_span] at hx + exact (closure_minimal hs hc) hx + +lemma tensor_mem_ideal_of_cuts {ι : Type*} (l : Filter ι) [l.NeBot] + (e : ι → C) (q : C →⋆ₙₐ[ℂ] D) (he : ∀ i, q (e i) = 0) + (x : MinimalTensor A C) + (hx : Tendsto (fun i => tensorCut (e i) x) l (𝓝 0)) : + x.val ∈ tensorKernelIdeal (A := A) q := by + have hmul : Tendsto (fun i => x * rightElementaryHom (e i)) l (𝓝 x) := by + have h := (tendsto_const_nhds : Tendsto (fun _ : ι => x) l (𝓝 x)).sub hx + simpa only [tensorCut, sub_sub_cancel, sub_zero] using h + apply isClosed_closure.mem_of_tendsto (continuous_subtype_val.tendsto x |>.comp hmul) + exact Filter.Eventually.of_forall (fun i => tensor_mul_kernel_element_mem q (e i) (he i) x) + +end IdealCharacterization + +section Heredity + +variable {A B : Type u} [CStarAlgebra A] [CStarAlgebra B] + +lemma minimalMapLeft_tensorCut {C : Type v} [NonUnitalCStarAlgebra C] + (φ : A →⋆ₐ[ℂ] B) (e : C) (x : MinimalTensor A C) : + minimalMapLeft φ.toNonUnitalStarAlgHom (tensorCut e x) = + tensorCut e (minimalMapLeft φ.toNonUnitalStarAlgHom x) := by + simp only [tensorCut, map_sub, map_mul] + congr 2 + change minimalMapLeft φ.toNonUnitalStarAlgHom (minimalElementary (1 : A) e) = + minimalElementary (1 : B) e + rw [minimalMapLeft_elementary] + change minimalElementary (φ 1) e = _ + rw [map_one] + +theorem exact_of_injective_unital + (φ : A →⋆ₐ[ℂ] B) (hφ : Function.Injective φ) + (K : ComplexHilbert.{u}) (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) + (hψ : Function.Injective ψ) (hB : Exact B) : Exact A := by + intro C D _ _ q hq z hz + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let I := kernelAlgebra q + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let l := CStarAlgebra.approximateUnit I + have hl := CStarAlgebra.increasingApproximateUnit I + let : l.NeBot := hl.toIsApproximateUnit.neBot + let e : I → C := Subtype.val + have he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1 := by + filter_upwards [hl.eventually_nonneg, hl.eventually_norm] with i hi hn + refine ⟨?_, hn⟩ + obtain ⟨x, hx⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hi + have hi' : e i = star (e x) * e x := congrArg Subtype.val hx + rw [hi'] + exact star_mul_self_nonneg _ + have happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c) := by + intro c hc + let x : I := ⟨c,hc⟩ + exact continuous_subtype_val.tendsto x |>.comp (hl.tendsto_mul_left x) + have hmem : (minimalMapLeft φ.toNonUnitalStarAlgHom z).val ∈ + tensorKernelIdeal (A := B) q := by + apply hB C D q hq + intro π + exact hz (π.precompLeft φ.toNonUnitalStarAlgHom) + have hcuts := tensorCut_tendsto_zero_on_ideal l e he q happ + (minimalMapLeft φ.toNonUnitalStarAlgHom z) hmem + have hcutz : Tendsto (fun i => tensorCut (e i) z) l (𝓝 0) := by + apply tendsto_zero_iff_norm_tendsto_zero.mpr + have hn := tendsto_zero_iff_norm_tendsto_zero.mp hcuts + convert hn using 1 + funext i + rw [← minimalMapLeft_tensorCut] + exact (norm_minimalMapLeft φ.toNonUnitalStarAlgHom K ψ hφ hψ _).symm + exact tensor_mem_ideal_of_cuts l e q (fun i => i.property) z hcutz + +end Heredity + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ExactInfiniteness.lean b/lean/OAI/Analysis/WeakInfiniteness/ExactInfiniteness.lean new file mode 100644 index 0000000000000000000000000000000000000000..da42f6564f5bbf6c210117f0d902a3dc2a5946e3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ExactInfiniteness.lean @@ -0,0 +1,31 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.StrongInfiniteness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +theorem exact_weaklyPurelyInfinite_stronglyPurelyInfinite + (A : Type u) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + (hExact : Exact A) (hWeak : WeaklyPurelyInfinite A) : StronglyPurelyInfinite A := + exact_weaklyPurelyInfinite_stronglyPurelyInfinite_any hExact hWeak + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FaithfulContractions.lean b/lean/OAI/Analysis/WeakInfiniteness/FaithfulContractions.lean new file mode 100644 index 0000000000000000000000000000000000000000..deb2bf67875b4f885e4fe6837526f4be545dfdab --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FaithfulContractions.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ExactHereditary +import OAI.Analysis.WeakInfiniteness.NormKernelWitness +import OAI.Analysis.WeakInfiniteness.ProductRepresentation +import OAI.Analysis.WeakInfiniteness.UniversalGroupEmbedding + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +def universalHilbert : ComplexHilbert.{1} where + Carrier := lp (fun π : ContractionRepresentation => π.hilbert) 2 + +def contractionAmbientRepresentation : + ContractionAmbient →⋆ₙₐ[ℂ] (universalHilbert →L[ℂ] universalHilbert) := + productRepresentation + +lemma contractionAmbientRepresentation_injective : + Function.Injective contractionAmbientRepresentation := productRepresentation_injective + +def universalFaithfulRepresentation : + UniversalContraction →⋆ₙₐ[ℂ] (universalHilbert →L[ℂ] universalHilbert) := + contractionAmbientRepresentation.comp + universalContractionSubalgebra.subtype.toNonUnitalStarAlgHom + +lemma universalFaithfulRepresentation_injective : + Function.Injective universalFaithfulRepresentation := + contractionAmbientRepresentation_injective.comp Subtype.val_injective + +theorem universalContraction_not_exact : ¬ Exact UniversalContraction := by + intro h + exact fullFreeTwo_not_exact + (exact_of_injective_unital fullToUniversal fullToUniversal_injective + universalHilbert universalFaithfulRepresentation universalFaithfulRepresentation_injective h) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FaithfulRepresentation.lean b/lean/OAI/Analysis/WeakInfiniteness/FaithfulRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b699cc0c997ead940d0b0bb5640c9e2acc7308b8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FaithfulRepresentation.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.States +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ENNReal ComplexOrder InnerProductSpace + +section DirectSum + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +variable {ι : Type*} {H : ι → Type*} + [∀ i, NormedAddCommGroup (H i)] [∀ i, InnerProductSpace ℂ (H i)] [∀ i, CompleteSpace (H i)] + +def sumRepresentation (π : ∀ i, A →⋆ₙₐ[ℂ] (H i →L[ℂ] H i)) : + A →⋆ₙₐ[ℂ] (lp H 2 →L[ℂ] lp H 2) where + toFun a := lp.mapCLM 2 (fun i => π i a) (norm_nonneg a) + (fun i => NonUnitalStarAlgHom.norm_apply_le (π i) a) + map_zero' := by ext x i; simp [lp.mapCLM] + map_add' a b := by + ext x i + change π i (a+b) (x i)=π i a (x i)+π i b (x i) + rw [map_add, add_apply] + map_smul' r a := by ext x i; simp [lp.mapCLM] + map_mul' a b := by ext x i; simp [lp.mapCLM] + map_star' a := by + apply ContinuousLinearMap.ext + intro x + apply ext_inner_left ℂ + intro y + rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right, + lp.inner_eq_tsum, lp.inner_eq_tsum] + apply tsum_congr + intro i + change inner ℂ (y i) (π i (star a) (x i))=inner ℂ (π i a (y i)) (x i) + rw [map_star, ContinuousLinearMap.star_eq_adjoint, + ContinuousLinearMap.adjoint_inner_right] + +@[simp] lemma sumRepresentation_apply (π : ∀ i, A →⋆ₙₐ[ℂ] (H i →L[ℂ] H i)) + (a : A) (x : lp H 2) (i : ι) : sumRepresentation π a x i=π i a (x i) := rfl + +lemma sumRepresentation_injective (π : ∀ i, A →⋆ₙₐ[ℂ] (H i →L[ℂ] H i)) + (hπ : ∀ a : A, (∀ i, π i a=0) → a=0) : Function.Injective (sumRepresentation π) := by + classical + apply (injective_iff_map_eq_zero _).mpr + intro a ha + apply hπ a + intro i + ext ξ + have h := congrArg (fun T : lp H 2 →L[ℂ] lp H 2 => T (lp.single 2 i ξ) i) ha + simpa using h + +end DirectSum + +universe hilbertUniverse + +section GNSFaithful + +variable (A : Type hilbertUniverse) [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def universalGNSHilbert : ComplexHilbert.{hilbertUniverse} where + Carrier := lp (fun f : A →ₚ[ℂ] ℂ => f.GNS) 2 + +def universalGNSRepresentation : A →⋆ₙₐ[ℂ] + (universalGNSHilbert A →L[ℂ] universalGNSHilbert A) := + sumRepresentation (fun f : A →ₚ[ℂ] ℂ => f.gnsNonUnitalStarAlgHom) + +lemma universalGNSRepresentation_injective : Function.Injective (universalGNSRepresentation A) := by + apply sumRepresentation_injective + intro a ha + by_cases hA : Subsingleton A + · exact Subsingleton.elim _ _ + · have : Nontrivial A := not_subsingleton_iff_nontrivial.mp hA + obtain ⟨f,_,hf⟩ := exists_norming_gns a + apply norm_eq_zero.mp + rw [← hf] + change ‖f.gnsNonUnitalStarAlgHom a‖=0 + rw [ha f, norm_zero] + +end GNSFaithful + +theorem exists_faithful_representation (A : Type hilbertUniverse) [NonUnitalCStarAlgebra A] : + ∃ (H : ComplexHilbert.{hilbertUniverse}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), Function.Injective π := by + let U := Unitization ℂ A + let := CStarAlgebra.spectralOrder U + let := CStarAlgebra.spectralOrderedRing U + refine ⟨universalGNSHilbert U, + (universalGNSRepresentation U).comp (Unitization.inrNonUnitalStarAlgHom ℂ A), ?_⟩ + exact (universalGNSRepresentation_injective U).comp Unitization.inr_injective + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FaithfulTensorNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/FaithfulTensorNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca1dadf1692e4021903a5b207a4135753a1e33dd --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FaithfulTensorNorm.lean @@ -0,0 +1,64 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorMatrixNorm + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section TensorRightRepresentation + +variable {n H K L B : Type*} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + [NormedAddCommGroup L] [InnerProductSpace ℂ L] [CompleteSpace L] + [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma map_tensorCoefficientMatrix + (b : OrthonormalBasis n ℂ H) (T : H →L[ℂ] H) (a : B) + (φ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + CStarMatrix.mapₙₐ φ (tensorCoefficientMatrix b T a) = + tensorCoefficientMatrix b T (φ a) := by + apply CStarMatrix.ext + intro i j + change φ ((b.repr (T (b j)) i) • a) = (b.repr (T (b j)) i) • φ a + exact map_smul φ _ _ + +lemma tensor_norm_le_faithful_finite_left {ι : Type*} (s : Finset ι) + (b : OrthonormalBasis n ℂ H) (T : ι → H →L[ℂ] H) (a : ι → B) + (φ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (ψ : B →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hφ : Function.Injective φ) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (ψ (a i))‖ ≤ + ‖∑ i ∈ s, TensorProduct.mapL (T i) (φ (a i))‖ := by + rw [norm_tensorCoefficientSum s b, norm_tensorCoefficientSum s b] + let M : CStarMatrix n n B := ∑ i ∈ s, tensorCoefficientMatrix b (T i) (a i) + have hm (ρ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + CStarMatrix.mapₙₐ ρ M = ∑ i ∈ s, tensorCoefficientMatrix b (T i) (ρ (a i)) := by + simp only [M, map_sum, map_tensorCoefficientMatrix] + have hn : CStarMatrix.mapₙₐ ψ M = ∑ i ∈ s, tensorCoefficientMatrix b (T i) (ψ (a i)) := by + simp only [M, map_sum, map_tensorCoefficientMatrix] + rw [← hm φ, ← hn] + have hinj : Function.Injective (CStarMatrix.mapₙₐ φ (n := n)) := by + intro X Y hXY + ext i j + apply hφ + exact congrArg (fun Z : CStarMatrix n n (K →L[ℂ] K) => Z i j) hXY + rw [NonUnitalStarAlgHom.norm_map (CStarMatrix.mapₙₐ φ) hinj M] + exact NonUnitalStarAlgHom.norm_apply_le (CStarMatrix.mapₙₐ ψ) M + +end TensorRightRepresentation + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FellAbsorption.lean b/lean/OAI/Analysis/WeakInfiniteness/FellAbsorption.lean new file mode 100644 index 0000000000000000000000000000000000000000..55cb6915afa4dc6ce1dffc384e82a1fa63b83b66 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FellAbsorption.lean @@ -0,0 +1,245 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.GroupRegular + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness.HilbertValued + +abbrev HilbertSum (G H : Type*) [NormedAddCommGroup H] : Type _ := lp (fun _ : G => H) 2 + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +variable {G K : Type*} + +omit [InnerProductSpace ℂ H] [CompleteSpace H] in +lemma mem_l2_reindex (e : G ≃ K) (ξ : HilbertSum K H) : + Memℓp (fun g => ξ (e g)) 2 := by + apply (memℓp_gen_iff (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)).mpr + have hs : Summable (fun k => ‖ξ k‖ ^ (2 : ℝ≥0∞).toReal) := + Memℓp.summable (by norm_num) ξ.property + exact e.summable_iff.mpr hs + +def l2Reindex (e : G ≃ K) : HilbertSum G H ≃ₗᵢ[ℂ] HilbertSum K H where + toFun ξ := ⟨fun k => ξ (e.symm k), mem_l2_reindex e.symm ξ⟩ + invFun ξ := ⟨fun g => ξ (e g), mem_l2_reindex e ξ⟩ + left_inv ξ := by ext g; simp + right_inv ξ := by ext k; simp + map_add' _ _ := rfl + map_smul' _ _ := rfl + norm_map' ξ := by + rw [lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal), + lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)] + congr 1 + exact e.symm.tsum_eq (fun g => ‖ξ g‖ ^ (2 : ℝ≥0∞).toReal) + +omit [CompleteSpace H] in +@[simp] + +lemma l2Reindex_apply (e : G ≃ K) (ξ : HilbertSum G H) (k : K) : + l2Reindex e ξ k = ξ (e.symm k) := rfl + +omit [CompleteSpace H] in +lemma l2Reindex_single [DecidableEq G] [DecidableEq K] (e : G ≃ K) (g : G) (c : H) : + l2Reindex e (lp.single 2 g c) = lp.single 2 (e g) c := by + classical + ext k + simp only [l2Reindex_apply, lp.single_apply, Pi.single_apply] + have he : e.symm k = g ↔ k = e g := e.symm_apply_eq + simp only [he] + +section SchurBound + +variable {X I : Type*} [Fintype I] + +omit [InnerProductSpace ℂ H] [CompleteSpace H] in +lemma l2_summable_norm_sq (ξ : HilbertSum X H) : Summable (fun x => ‖ξ x‖ ^ 2) := by + have h := Memℓp.summable (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ.property + norm_num at h + exact h + +omit [InnerProductSpace ℂ H] [CompleteSpace H] in +lemma l2_norm_sq (ξ : HilbertSum X H) : ‖ξ‖ ^ 2 = ∑' x, ‖ξ x‖ ^ 2 := by + have h := lp.norm_rpow_eq_tsum (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ + norm_num at h + exact h + +lemma weighted_two_mul_le (a b w : ℝ) (hw : 0 < w) : + 2 * a * b ≤ w * a ^ 2 + w⁻¹ * b ^ 2 := by + have h := sq_nonneg (w * a - b) + have hi : w * w⁻¹ = 1 := mul_inv_cancel₀ hw.ne' + apply (mul_le_mul_iff_right₀ hw).mp + nlinarith + +def permutationSum (e : I → X ≃ X) : HilbertSum X H →L[ℂ] HilbertSum X H := + ∑ i, (l2Reindex (e i)).toContinuousLinearEquiv.toContinuousLinearMap + +omit [InnerProductSpace ℂ H] [CompleteSpace H] in +lemma weighted_squares_summable (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (ξ : HilbertSum X H) (i : I) : + Summable (fun x => (w ((e i).symm x) / w x) * ‖ξ x‖ ^ 2) := by + apply Summable.of_nonneg_of_le + (fun x => mul_nonneg (div_nonneg (hw _).le (hw _).le) (sq_nonneg _)) + (fun x => mul_le_mul_of_nonneg_right + ((Finset.single_le_sum (fun j _ => div_nonneg (hw _).le (hw _).le) + (Finset.mem_univ i)).trans (hrow x)) (sq_nonneg _)) + ((l2_summable_norm_sq ξ).mul_left C) + +omit [InnerProductSpace ℂ H] [CompleteSpace H] in +lemma weighted_squares_sum_le (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (ξ : HilbertSum X H) : + ∑ i, ∑' x, (w ((e i).symm x) / w x) * ‖ξ x‖ ^ 2 ≤ C * ‖ξ‖ ^ 2 := by + have hs (i : I) := weighted_squares_summable w hw e C hrow ξ i + rw [← Summable.tsum_finsetSum (fun i _ => hs i)] + simp_rw [← Finset.sum_mul] + rw [l2_norm_sq ξ, ← tsum_mul_left] + apply Summable.tsum_le_tsum + (fun x => mul_le_mul_of_nonneg_right (hrow x) (sq_nonneg _)) + · simpa only [Finset.sum_mul] using summable_sum (fun i _ => hs i) + · exact (l2_summable_norm_sq ξ).mul_left C + +omit [CompleteSpace H] in +theorem norm_permutationSum_le (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) (hC : 0 ≤ C) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (hcol : ∀ x, ∑ i, w (e i x) / w x ≤ C) : + ‖permutationSum (H := H) e‖ ≤ C := by + classical + apply ContinuousLinearMap.opNorm_le_of_re_inner_le hC + intro ξ η hξ hη + have hs₁ (i : I) := weighted_squares_summable w hw e C hrow η i + have hs₂ (i : I) : Summable (fun x => + (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) := by + have h := weighted_squares_summable w hw (fun i => (e i).symm) C hcol ξ i + convert (e i).symm.summable_iff.mpr h using 1 + ext x + simp + have hpoint (i : I) (x : X) : + 2 * (inner ℂ (ξ ((e i).symm x)) (η x)).re ≤ + (w ((e i).symm x) / w x) * ‖η x‖ ^ 2 + + (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2 := by + have hr := (Complex.re_le_norm (inner ℂ (ξ ((e i).symm x)) (η x))).trans + (norm_inner_le_norm (ξ ((e i).symm x)) (η x)) + have he := weighted_two_mul_le ‖η x‖ ‖ξ ((e i).symm x)‖ + (w ((e i).symm x) / w x) (div_pos (hw _) (hw _)) + rw [inv_div] at he + nlinarith + have hi (i : I) : + 2 * (inner ℂ (l2Reindex (e i) ξ) η).re ≤ + (∑' x, (w ((e i).symm x) / w x) * ‖η x‖ ^ 2) + + (∑' x, (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) := by + have hin := lp.summable_inner (𝕜 := ℂ) (l2Reindex (e i) ξ) η + have hre := (Complex.reCLM.hasSum hin.hasSum).summable + have hret : (inner ℂ (l2Reindex (e i) ξ) η).re = + ∑' x, (inner ℂ (ξ ((e i).symm x)) (η x)).re := by + exact Complex.reCLM.map_tsum hin + rw [hret, ← tsum_mul_left, ← (hs₁ i).tsum_add (hs₂ i)] + exact Summable.tsum_le_tsum (hpoint i) (hre.mul_left 2) ((hs₁ i).add (hs₂ i)) + have hsecond : + (∑ i, ∑' x, (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) = + (∑ i, ∑' x, (w (e i x) / w x) * ‖ξ x‖ ^ 2) := by + apply Finset.sum_congr rfl + intro i _ + convert (e i).symm.tsum_eq (fun x => (w (e i x) / w x) * ‖ξ x‖ ^ 2) using 1 + simp + have htotal := Finset.sum_le_sum (fun i (_ : i ∈ Finset.univ) => hi i) + rw [Finset.sum_add_distrib, hsecond] at htotal + have hb₁ := weighted_squares_sum_le w hw e C hrow η + have hb₂ := weighted_squares_sum_le w hw (fun i => (e i).symm) C hcol ξ + simp only [Equiv.symm_symm] at hb₂ + have heval : (inner ℂ (permutationSum e ξ) η).re = + ∑ i, (inner ℂ (l2Reindex (e i) ξ) η).re := by + simp [permutationSum] + change (inner ℂ (permutationSum e ξ) η).re ≤ C + rw [heval] + rw [← Finset.mul_sum] at htotal + simp only [hξ, hη, one_pow, mul_one] at hb₁ hb₂ + nlinarith + +end SchurBound + +def l2Diagonal {X : Type*} (v : X → H ≃ₗᵢ[ℂ] H) : + HilbertSum X H ≃ₗᵢ[ℂ] HilbertSum X H where + toFun ξ := ⟨fun x => v x (ξ x), by + apply (memℓp_gen_iff (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)).mpr + simpa only [LinearIsometryEquiv.norm_map] using + (Memℓp.summable (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ.property)⟩ + invFun ξ := ⟨fun x => (v x).symm (ξ x), by + apply (memℓp_gen_iff (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)).mpr + simpa only [LinearIsometryEquiv.norm_map] using + (Memℓp.summable (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ.property)⟩ + left_inv ξ := by ext x; simp + right_inv ξ := by ext x; simp + map_add' ξ η := by ext x; exact map_add (v x) _ _ + map_smul' c ξ := by ext x; exact map_smul (v x) _ _ + norm_map' ξ := by + rw [lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal), + lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)] + simp + +omit [CompleteSpace H] in +@[simp] + +lemma l2Diagonal_apply {X : Type*} (v : X → H ≃ₗᵢ[ℂ] H) + (ξ : HilbertSum X H) (x : X) : l2Diagonal v ξ x = v x (ξ x) := rfl + +omit [CompleteSpace H] in +@[simp] + +lemma l2Diagonal_symm_apply {X : Type*} (v : X → H ≃ₗᵢ[ℂ] H) + (ξ : HilbertSum X H) (x : X) : (l2Diagonal v).symm ξ x = (v x).symm (ξ x) := rfl + +variable [Group G] + +def fellUnitary (π : G →* H ≃ₗᵢ[ℂ] H) : HilbertSum G H ≃ₗᵢ[ℂ] HilbertSum G H := + l2Diagonal π + +def twistedRegular (π : G →* H ≃ₗᵢ[ℂ] H) (s : G) : + HilbertSum G H →L[ℂ] HilbertSum G H := + ((l2Reindex (Equiv.mulLeft s)).trans (l2Diagonal (fun _ => π s))).toContinuousLinearEquiv + |>.toContinuousLinearMap + +omit [CompleteSpace H] in +@[simp] + +lemma twistedRegular_apply (π : G →* H ≃ₗᵢ[ℂ] H) (s g : G) (ξ : HilbertSum G H) : + twistedRegular π s ξ g = π s (ξ (s⁻¹ * g)) := rfl + +theorem fell_intertwines (π : G →* H ≃ₗᵢ[ℂ] H) (s : G) : + (fellUnitary π).conjStarAlgEquiv + (l2Reindex (Equiv.mulLeft s)).toContinuousLinearEquiv.toContinuousLinearMap = + twistedRegular π s := by + ext ξ g + change π g ((π (s⁻¹ * g)).symm (ξ (s⁻¹ * g))) = π s (ξ (s⁻¹ * g)) + have he : (π g) * (π (s⁻¹ * g))⁻¹ = π s := by + rw [← map_inv, ← map_mul] + simp + exact congrArg (fun f : H ≃ₗᵢ[ℂ] H => f (ξ (s⁻¹ * g))) he + +theorem norm_twistedRegular_sum {I : Type*} (s : I → G) (F : Finset I) + (π : G →* H ≃ₗᵢ[ℂ] H) : + ‖∑ i ∈ F, twistedRegular π (s i)‖ = + ‖∑ i ∈ F, (l2Reindex (H := H) (Equiv.mulLeft (s i))).toContinuousLinearEquiv.toContinuousLinearMap‖ := by + simp_rw [← fell_intertwines π] + rw [← map_sum] + exact NonUnitalStarAlgHom.norm_map + ((fellUnitary π).conjStarAlgEquiv.toStarAlgHom.toNonUnitalStarAlgHom) + (fellUnitary π).conjStarAlgEquiv.injective _ + +end WeakPureInfiniteness.HilbertValued +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FinalAssembly.lean b/lean/OAI/Analysis/WeakInfiniteness/FinalAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe623f13ae7297f0e611dc410e00bf15f5df7060 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FinalAssembly.lean @@ -0,0 +1,113 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CoreSelection +import OAI.Analysis.WeakInfiniteness.IdealComparison2 +import OAI.Analysis.WeakInfiniteness.PrimitiveIdealTest + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma elementCuntz_of_primitive_support + (hpi : ∀ x : A,0 ≤ x → ProperlyInfinite (diagonalCopies 1 x)) + {a b : A} (ha : 0 ≤ a) (hb : 0 ≤ b) + (hsupp : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → π a ≠ 0 → π b ≠ 0) : + ElementCuntzSubequiv a b := by + apply generatedClosedIdeal_copies_cuntz hb ha (by norm_num : 1 ≤ 1) (hpi b hb) (k := 1) + apply mem_closed_ideal_of_irreducible_test (generatedClosedIdeal b hb.isSelfAdjoint) + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _) + (fun x hx c => generatedClosedIdeal_mul_left b c hb.isSelfAdjoint hx) + (fun x hx c => generatedClosedIdeal_mul_right b c hb.isSelfAdjoint hx) ha + intro H π hπ hI + by_contra hn + exact hsupp H π hπ hn (hI b (self_mem_generatedClosedIdeal b hb)) + +lemma norm_positiveCut_le {a : A} (ha : 0 ≤ a) {r : ℝ} (hr : 0 ≤ r) : + ‖positiveCut r a‖ ≤ ‖a‖ := by + apply norm_cfcₙ_le + intro s hs + have hs0 : 0 ≤ s := NonnegSpectrumClass.nonneg_of_mem_quasispectrum ha hs + have hsn : s ≤ ‖a‖ := by simpa only [Real.norm_eq_abs,abs_of_nonneg hs0] using + (NonUnitalIsometricContinuousFunctionalCalculus.norm_quasispectrum_le a hs ha.isSelfAdjoint) + rw [Real.norm_eq_abs,abs_of_nonneg (le_max_right _ _)] + exact max_le (by linarith) (norm_nonneg a) + +lemma exists_left_approx_of_hereditary {a Q : A} (ha : 0 ≤ a) + (hQ : Q ∈ hereditarySubalgebra a ha.isSelfAdjoint) (x : A) {δ : ℝ} (hδ : 0 < δ) : + ∃ s : A, ‖a*s-Q*x‖ < δ := by + have hm : Q*x ∈ closure (Set.range (fun s : A => a*s)) := by + apply closure_minimal _ (isClosed_closure.preimage (continuous_id.mul continuous_const)) hQ + rintro _ ⟨y,rfl⟩ + apply subset_closure + exact ⟨y*a*x,by change a*(y*a*x)=(a*y*a)*x; simp only [mul_assoc]⟩ + obtain ⟨_,⟨s,rfl⟩,hs⟩ := Metric.mem_closure_iff.mp hm δ hδ + exact ⟨s,by simpa only [dist_eq_norm'] using hs⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma norm_star_mul_approx_le (S T U V : A) {δ : ℝ} (hδ : 0 ≤ δ) + (hU : ‖U‖ ≤ 2) (hV : ‖V‖ ≤ 2) (hSU : ‖S-U‖ ≤ δ) (hTV : ‖T-V‖ ≤ δ) : + ‖star S*T-star U*V‖ ≤ (4+δ)*δ := by + have hT : ‖T‖ ≤ 2+δ := by + calc + ‖T‖=‖(T-V)+V‖ := by rw [sub_add_cancel] + _≤‖T-V‖+‖V‖ := norm_add_le _ _ + _≤δ+2 := add_le_add hTV hV + _=2+δ := by ring + calc + ‖star S*T-star U*V‖=‖star (S-U)*T+star U*(T-V)‖ := by congr 1; simp only [star_sub]; noncomm_ring + _≤‖star (S-U)*T‖+‖star U*(T-V)‖ := norm_add_le _ _ + _≤‖S-U‖*‖T‖+‖U‖*‖T-V‖ := by + exact add_le_add (by simpa only [norm_star] using norm_mul_le (star (S-U)) T) + (by simpa only [norm_star] using norm_mul_le (star U) (T-V)) + _≤δ*(2+δ)+2*δ := by gcongr + _=(4+δ)*δ := by ring + +lemma cut_square_cuntz_of_norm_coverage + (hpi : ∀ x : A,0 ≤ x → ProperlyInfinite (diagonalCopies 1 x)) + {a Q : A} (ha : 0 ≤ a) (hQ : 0 ≤ Q) {r m : ℝ} (hr : 0 < r) (hm : 0 < m) + (hcover : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → r ≤ ‖π a‖ → m ≤ ‖π Q‖) : + ElementCuntzSubequiv (positiveCut (r^2) (a*a)) (positiveCut (m/2) Q) := by + have haa : 0 ≤ a*a := by simpa only [ha.star_eq] using star_mul_self_nonneg a + apply elementCuntz_of_primitive_support hpi (positiveCut_nonneg _ _) (positiveCut_nonneg _ _) + intro H π hπ hn + have hn' := norm_lt_of_positiveCut_image_ne_zero π haa (sq_nonneg r) hn + rw [map_mul] at hn' + have hnπ : ‖π a*π a‖=‖π a‖^2 := by + simpa only [(map_nonneg π ha).star_eq,pow_two] using (CStarRing.norm_star_mul_self (x := π a)) + rw [hnπ] at hn' + have har : r ≤ ‖π a‖ := by nlinarith [norm_nonneg (π a)] + have hQr := hcover H π hπ har + have he : π (positiveCut (m/2) Q)=positiveCut (m/2) (π Q) := + π.map_cfcₙ (fun s : ℝ => max (s-m/2) 0) Q (by fun_prop) + (max_eq_right (by linarith)) (by fun_prop) hQ.isSelfAdjoint (map_nonneg π hQ).isSelfAdjoint + rw [he] + exact positiveCut_ne_zero_of_lt_norm (map_nonneg π hQ) (by positivity) (by linarith) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..41c962dcf91b468551a0501cf69065e187d7c76d --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteComparison.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.LocalConnection +import OAI.Analysis.WeakInfiniteness.LocalFamily +import OAI.Analysis.WeakInfiniteness.RectangularComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +def fiberDiagonal {m : ℕ} (x : Fin m → A) : CStarMatrix (Fin m) (Fin m) A := + CStarMatrix.ofMatrix (Matrix.diagonal x) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma continuous_fiberDiagonal (m : ℕ) : Continuous (fiberDiagonal (A := A) (m := m)) := by + change Continuous (fun x : Fin m → A => Matrix.diagonal x) + fun_prop + +lemma copies_cuntz_fiberDiagonal {m : ℕ} {c : A} {x : Fin m → A} + (hcx : ∀ i,ElementCuntzSubequiv c (x i)) : + CuntzSubequiv (diagonalCopies m c) (fiberDiagonal x) := by + intro ε hε + obtain ⟨δ,hδ,hcont⟩ := Metric.continuousAt_iff.mp + ((continuous_fiberDiagonal (A := A) m).continuousAt (x := fun _ => c)) ε hε + choose v hv using fun i => elementCuntzSubequiv_iff.mp (hcx i) δ hδ + refine ⟨fiberDiagonal v,?_⟩ + have he : (fiberDiagonal v).conjTranspose*fiberDiagonal x*fiberDiagonal v= + fiberDiagonal (fun i => star (v i)*x i*v i) := by + change (Matrix.diagonal v).conjTranspose*Matrix.diagonal x*Matrix.diagonal v= + Matrix.diagonal (fun i => star (v i)*x i*v i) + simp only [Matrix.diagonal_conjTranspose,Matrix.diagonal_mul_diagonal,Pi.star_apply] + rw [he] + have hd : dist (fun i => star (v i)*x i*v i) (fun _ => c) < δ := + (dist_pi_lt_iff hδ).mpr (fun i => by simpa only [dist_eq_norm] using hv i) + have hout := hcont hd + rw [dist_eq_norm] at hout + exact hout + +lemma orthogonal_fiberDiagonal_cuntz_sum {m : ℕ} (x : Fin m → A) (hx : ∀ i,0 ≤ x i) + (hxx : ∀ i j,i ≠ j → x i*x j=0) : + CuntzSubequiv (fiberDiagonal x) (diagonalCopies 1 (∑ i,x i)) := by + let R : CStarMatrix (Fin 1) (Fin m) A := fun _ j => CFC.sqrt (x j) + have hRi : R.conjTranspose*R=fiberDiagonal x := by + ext i j + change (∑ k : Fin 1,star (CFC.sqrt (x i))*CFC.sqrt (x j))=Matrix.diagonal x i j + simp only [Fin.sum_univ_one,(CFC.sqrt_nonneg (x i)).star_eq] + by_cases hij : i=j + · subst j + rw [Matrix.diagonal_apply_eq,CFC.sqrt_mul_sqrt_self _ (hx i)] + · rw [Matrix.diagonal_apply_ne _ hij] + exact mul_zero_of_hereditary (hx i).isSelfAdjoint (hx j).isSelfAdjoint (hxx i j hij) + (sqrt_mem_hereditary _ _ (hx i).isSelfAdjoint (self_mem_hereditary _ (hx i)) (hx i)) + (sqrt_mem_hereditary _ _ (hx j).isSelfAdjoint (self_mem_hereditary _ (hx j)) (hx j)) + have hRr : R*R.conjTranspose=diagonalCopies 1 (∑ i,x i) := by + ext i j + have hi : i=0 := Subsingleton.elim _ _ + have hj : j=0 := Subsingleton.elim _ _ + subst i; subst j + change (∑ k : Fin m,CFC.sqrt (x k)*star (CFC.sqrt (x k)))=∑ k : Fin m,x k + apply Finset.sum_congr rfl + intro k _ + rw [(CFC.sqrt_nonneg _).star_eq,CFC.sqrt_mul_sqrt_self _ (hx k)] + rw [← hRi,← hRr] + exact rectangular_initial_cuntz_range R + +lemma copies_cuntz_of_common_orthogonal {m : ℕ} {c h : A} (hh : 0 ≤ h) + (x : Fin m → A) (hx : ∀ i,0 ≤ x i ∧ x i ∈ hereditarySubalgebra h hh.isSelfAdjoint) + (hxx : ∀ i j,i ≠ j → x i*x j=0) (hcx : ∀ i,ElementCuntzSubequiv c (x i)) : + CuntzSubequiv (diagonalCopies m c) (diagonalCopies 1 h) := by + apply (copies_cuntz_fiberDiagonal hcx).trans + apply (orthogonal_fiberDiagonal_cuntz_sum x (fun i => (hx i).1) hxx).trans + exact elementCuntzSubequiv_of_hereditary (Finset.sum_nonneg (fun i _ => (hx i).1)) hh + ((hereditarySubalgebra h hh.isSelfAdjoint).sum_mem (fun i _ => (hx i).2)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteCoordinates.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..6fb804c7696074104f2cb917590dd966321b8c58 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteCoordinates.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ReducingColumns + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace CStarAlgebra ComplexOrder + +variable {n : Type*} [Fintype n] + +def scalarActionHom : CStarMatrix n n ℂ →⋆ₙₐ[ℂ] + (HilbertVector n ℂ →L[ℂ] HilbertVector n ℂ) := + matrixRepresentation (StarAlgHom.ofId ℂ (ℂ →L[ℂ] ℂ)).toNonUnitalStarAlgHom n + +lemma scalarActionHom_eq (D : CStarMatrix n n ℂ) : + scalarActionHom D=scalarMatrixAction (H := ℂ) D := rfl + +lemma scalarActionHom_injective : Function.Injective (scalarActionHom (n := n)) := by + classical + intro D E h + ext i j + have hh := congrArg (fun T : HilbertVector n ℂ →L[ℂ] HilbertVector n ℂ => + T (PiLp.single 2 j 1) i) h + simpa [scalarActionHom_eq, scalarMatrixAction_apply, PiLp.single_apply, smul_eq_mul] using hh + +lemma norm_scalarMatrixAction (D : CStarMatrix n n ℂ) : + ‖scalarMatrixAction (H := ℂ) D‖=‖D‖ := + NonUnitalStarAlgHom.norm_map scalarActionHom scalarActionHom_injective D + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma exists_scalar_matrix_coordinates [FiniteDimensional ℂ H] (D : H →L[ℂ] H) : + ∃ (d : ℕ) (e : H ≃ₗᵢ[ℂ] HilbertVector (Fin d) ℂ) + (M : CStarMatrix (Fin d) (Fin d) ℂ), + ‖M‖=‖D‖ ∧ scalarMatrixAction (H := ℂ) M=e.conjStarAlgEquiv D := by + classical + let b := stdOrthonormalBasis ℂ H + let M : CStarMatrix (Fin (Module.finrank ℂ H)) (Fin (Module.finrank ℂ H)) ℂ := + fun i j => ⟪b i, D (b j)⟫_ℂ + have he : scalarMatrixAction (H := ℂ) M=b.repr.conjStarAlgEquiv D := by + ext x i + obtain ⟨y,rfl⟩ := b.repr.surjective x + rw [scalarMatrixAction_apply, LinearIsometryEquiv.conjStarAlgEquiv_apply_apply] + rw [b.repr.symm_apply_apply] + simp only [M, OrthonormalBasis.repr_apply_apply, smul_eq_mul] + conv_rhs => rw [← b.sum_repr' y] + simp only [map_sum, map_smul, inner_sum, inner_smul_right] + apply Finset.sum_congr rfl + intro j _ + exact mul_comm _ _ + refine ⟨Module.finrank ℂ H,b.repr,M,?_,he⟩ + rw [← norm_scalarMatrixAction M, he] + exact @StarAlgEquiv.norm_map _ (H →L[ℂ] H) + (HilbertVector (Fin (Module.finrank ℂ H)) ℂ →L[ℂ] HilbertVector (Fin (Module.finrank ℂ H)) ℂ) + _ _ _ _ _ b.repr.conjStarAlgEquiv D + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteCoupling.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteCoupling.lean new file mode 100644 index 0000000000000000000000000000000000000000..692be64c707f9c1cc7668f1c467a1621679c322b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteCoupling.lean @@ -0,0 +1,141 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.InnerSubalgebras +import OAI.Analysis.WeakInfiniteness.OrthogonalPerturbation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +structure OrthogonalPerturbationData (A : Type*) [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] (n : ℕ) where + p : A + q : A + h : A + k : A + c : A + norm_p : ‖p‖ ≤ 1 + norm_q : ‖q‖ ≤ 1 + nonneg_p : 0 ≤ p + nonneg_q : 0 ≤ q + orthogonal : p*q=0 + nonneg_h : 0 ≤ h + nonneg_k : 0 ≤ k + nonneg_c : 0 ≤ c + support_h : p*h=h + support_k : q*k=k + compare_h : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h) + compare_k : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k) + α : ℝ + pos_α : 0 < α + +omit [PartialOrder A] [StarOrderedRing A] in +lemma norm_corner_le_one (p q y : A) (hp : ‖p‖ ≤ 1) (hq : ‖q‖ ≤ 1) (hy : ‖y‖ ≤ 1) : + ‖p*y*q‖ ≤ 1 := by + calc + ‖p*y*q‖ ≤ (‖p‖*‖y‖)*‖q‖ := + (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _ ≤ (1*1)*1 := by gcongr + _ = 1 := by norm_num + +omit [PartialOrder A] [StarOrderedRing A] in +lemma corner_add_smul (p q U y : A) (z : ℂ) : + p*(U+z • y)*q=p*U*q+z • (p*y*q) := by + rw [mul_add,add_mul,mul_smul_comm,smul_mul_assoc] + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_finite_coupling_of_gap_one + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {ι : Type*} (F : ι → OrthogonalPerturbationData A n) : + ∀ s : Finset ι, (∀ i ∈ s, (F i).p ∈ D ∧ (F i).q ∈ D) → + ∃ U : A, U ∈ D ∧ IsSelfAdjoint U ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ i ∈ s, ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + (F i).α ≤ ‖π (F i).c‖ → ε ≤ ‖π ((F i).p*U*(F i).q)‖ := by + classical + intro s + induction s using Finset.induction_on with + | empty => + intro _ + refine ⟨0,D.zero_mem,IsSelfAdjoint.zero A,1,zero_lt_one,?_⟩ + simp + | @insert i s hi ih => + intro hmem + obtain ⟨U,hUD,hUsa,ε,hε,hU⟩ := ih (fun j hj => hmem j (Finset.mem_insert_of_mem hj)) + let δ := ε/4 + have hδ : 0 < δ := by dsimp [δ]; positivity + have hph : star (F i).p*(F i).p*(F i).h=(F i).h := by + rw [(F i).nonneg_p.star_eq,mul_assoc,(F i).support_h,(F i).support_h] + have hqk : (F i).q*star (F i).q*(F i).k=(F i).k := by + rw [(F i).nonneg_q.star_eq,mul_assoc,(F i).support_k,(F i).support_k] + obtain ⟨y,hyn,hysa,⟨z,hz⟩,hnew⟩ := selfadjoint_uniform_perturbation_of_gap_one + hσ.le hσγ hgap hA hn hpi (F i).p (F i).q (F i).h (F i).k (F i).c + (F i).norm_p (F i).norm_q (F i).nonneg_p (F i).nonneg_q (F i).orthogonal + (F i).nonneg_h (F i).nonneg_k (F i).nonneg_c hph hqk + (F i).compare_h (F i).compare_k ((F i).p*U*(F i).q) hδ (F i).pos_α + have hyD : y ∈ D := by + rw [hz] + exact hD.symmetrized_corner_mem (hmem i (Finset.mem_insert_self ..)).1 + (hmem i (Finset.mem_insert_self ..)).2 z + let U' := U+(δ : ℂ) • y + have hU'D : U' ∈ D := D.add_mem hUD (D.smul_mem _ hyD) + have hU'sa : IsSelfAdjoint U' := by + show star (U+(δ : ℂ) • y)=U+(δ : ℂ) • y + simp only [star_add,star_smul,hUsa.star_eq,hysa.star_eq,Complex.star_def,Complex.conj_ofReal] + refine ⟨U',hU'D,hU'sa,min (ε/2) (σ*δ),lt_min (by positivity) (mul_pos hσ hδ),?_⟩ + intro j hj H π hπc + rcases Finset.mem_insert.mp hj with rfl | hj + · apply (min_le_right _ _).trans + dsimp only [U'] + rw [corner_add_smul] + exact hnew H π hπc + · have hold := hU j hj H π hπc + have herr : ‖π ((δ : ℂ) • ((F j).p*y*(F j).q))‖ ≤ δ := by + calc + _ ≤ ‖(δ : ℂ) • ((F j).p*y*(F j).q)‖ := NonUnitalStarAlgHom.norm_apply_le π _ + _ = δ*‖(F j).p*y*(F j).q‖ := by + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hδ] + _ ≤ δ*1 := mul_le_mul_of_nonneg_left + (norm_corner_le_one _ _ _ (F j).norm_p (F j).norm_q hyn) hδ.le + _ = δ := mul_one _ + have hdiff : π ((F j).p*U*(F j).q)-π ((F j).p*U'*(F j).q)= + -π ((δ : ℂ) • ((F j).p*y*(F j).q)) := by + dsimp only [U'] + rw [corner_add_smul,map_add] + abel + have ht := norm_le_norm_add_norm_sub' (π ((F j).p*U*(F j).q)) + (π ((F j).p*U'*(F j).q)) + rw [hdiff,norm_neg] at ht + apply (min_le_left _ _).trans + dsimp only [δ] at herr + linarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteDiagonalState.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteDiagonalState.lean new file mode 100644 index 0000000000000000000000000000000000000000..e18cc05da29a98209af5d4ce173661b7bfcfe71f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteDiagonalState.lean @@ -0,0 +1,131 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +lemma tensor_inner_smul_smul {E K : Type*} + [NormedAddCommGroup E] [InnerProductSpace ℂ E] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + (x y : E ⊗[ℂ] K) (c : ℂ) : + inner ℂ (c • x) (c • y) = star c * c * inner ℂ x y := by + calc + _ = star c * inner ℂ x (c • y) := inner_smul_left x (c • y) c + _ = star c * (c * inner ℂ x y) := congrArg (star c * ·) (inner_smul_right x y c) + _ = _ := by ring + +variable (F : Type*) [Group F] [Fintype F] [DecidableEq F] + +noncomputable def finiteLeftRegularIsometry : + F →* (EuclideanSpace ℂ F ≃ₗᵢ[ℂ] EuclideanSpace ℂ F) where + toFun s := LinearIsometryEquiv.piLpCongrLeft 2 ℂ ℂ (Equiv.mulLeft s) + map_one' := by + ext ξ g + change ξ ((1 : F)⁻¹ * g) = ξ g + simp + map_mul' s t := by + ext ξ g + change ξ ((s * t)⁻¹ * g) = ξ (t⁻¹ * (s⁻¹ * g)) + simp [mul_assoc] + +noncomputable def finiteLeftRegular : F →* unitary (EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) := + Unitary.linearIsometryEquiv.symm.toMonoidHom.comp (finiteLeftRegularIsometry F) + +omit [DecidableEq F] in +@[simp] + +lemma finiteLeftRegular_apply (s : F) (ξ : EuclideanSpace ℂ F) (g : F) : + (finiteLeftRegular F s : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) ξ g = ξ (s⁻¹ * g) := rfl + +@[simp] +lemma finiteLeftRegular_single (s g : F) : + (finiteLeftRegular F s : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (EuclideanSpace.single g (1 : ℂ)) = EuclideanSpace.single (s * g) (1 : ℂ) := by + classical + exact LinearIsometryEquiv.piLpCongrLeft_single (Equiv.mulLeft s) g 1 + +noncomputable def finiteDiagonalVector : + EuclideanSpace ℂ F ⊗[ℂ] EuclideanSpace ℂ F := + ∑ g : F, EuclideanSpace.single g (1 : ℂ) ⊗ₜ[ℂ] EuclideanSpace.single g (1 : ℂ) + +lemma inner_finiteDiagonalVector_translate (s t : F) : + inner ℂ (finiteDiagonalVector F) + (TensorProduct.mapL (finiteLeftRegular F s : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (finiteLeftRegular F t : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (finiteDiagonalVector F)) = if s = t then (Fintype.card F : ℂ) else 0 := by + classical + simp only [finiteDiagonalVector, map_sum, TensorProduct.mapL_tmul, + finiteLeftRegular_single, inner_sum, sum_inner, TensorProduct.inner_tmul, + EuclideanSpace.inner_single_left, map_one, one_mul, PiLp.single_apply] + by_cases hst : s = t + · subst t + simp + · rw [ite_eq_right hst] + apply Finset.sum_eq_zero + intro g _ + apply Finset.sum_eq_zero + intro h _ + by_cases hg : h = s * g + · simp [hg, hst] + · simp [hg] + +lemma inner_finiteDiagonalVector_self : + inner ℂ (finiteDiagonalVector F) (finiteDiagonalVector F) = (Fintype.card F : ℂ) := by + have h := inner_finiteDiagonalVector_translate F 1 1 + simpa using h + +noncomputable def normalizedFiniteDiagonalVector : + EuclideanSpace ℂ F ⊗[ℂ] EuclideanSpace ℂ F := + ((Real.sqrt (Fintype.card F : ℝ))⁻¹ : ℂ) • finiteDiagonalVector F + +lemma normalizedFiniteDiagonalVector_inner_translate (s t : F) : + inner ℂ (normalizedFiniteDiagonalVector F) + (TensorProduct.mapL (finiteLeftRegular F s : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (finiteLeftRegular F t : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (normalizedFiniteDiagonalVector F)) = if s = t then 1 else 0 := by + classical + have hc : (Fintype.card F : ℝ) > 0 := by exact_mod_cast Fintype.card_pos + have hs : Real.sqrt (Fintype.card F : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hc) + have hsq : (Real.sqrt (Fintype.card F : ℝ) : ℂ) ^ 2 = (Fintype.card F : ℂ) := by + exact_mod_cast Real.sq_sqrt hc.le + let c : ℂ := (Real.sqrt (Fintype.card F : ℝ) : ℂ)⁻¹ + let T := TensorProduct.mapL + (finiteLeftRegular F s : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + (finiteLeftRegular F t : EuclideanSpace ℂ F →L[ℂ] EuclideanSpace ℂ F) + have hi := tensor_inner_smul_smul (finiteDiagonalVector F) (T (finiteDiagonalVector F)) c + have ht := inner_finiteDiagonalVector_translate F s t + change inner ℂ (c • finiteDiagonalVector F) (T (c • finiteDiagonalVector F)) = _ + rw [map_smul] + calc + _ = star c * c * inner ℂ (finiteDiagonalVector F) (T (finiteDiagonalVector F)) := hi + _ = star c * c * (if s = t then (Fintype.card F : ℂ) else 0) := + congrArg (star c * c * ·) ht + _ = _ := by + simp only [c, star_inv₀, Complex.star_def, Complex.conj_ofReal] + by_cases hst : s = t + · simp only [ite_eq_left hst] + rw [← hsq] + have hsc : (Real.sqrt (Fintype.card F : ℝ) : ℂ) ≠ 0 := by exact_mod_cast hs + field_simp + · simp [hst] + +lemma norm_normalizedFiniteDiagonalVector : ‖normalizedFiniteDiagonalVector F‖ = 1 := by + have h : inner ℂ (normalizedFiniteDiagonalVector F) (normalizedFiniteDiagonalVector F) = 1 := by + simpa using normalizedFiniteDiagonalVector_inner_translate F 1 1 + calc + _ = Real.sqrt (Complex.re (inner ℂ (normalizedFiniteDiagonalVector F) + (normalizedFiniteDiagonalVector F))) := + norm_eq_sqrt_re_inner (𝕜 := ℂ) (normalizedFiniteDiagonalVector F) + _ = 1 := by rw [h]; simp + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteGroupTensor.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteGroupTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..bb635b9c36f9071b204ff988e8572a2d2c474b79 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteGroupTensor.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteDiagonalState +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra +import OAI.Analysis.WeakInfiniteness.LiftedHilbert +import OAI.Analysis.WeakInfiniteness.SpatialVectorStates + +namespace OAI + +universe u + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +section TensorConjugation + +variable {H K L M : Type*} + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + [NormedAddCommGroup L] [InnerProductSpace ℂ L] [CompleteSpace L] + [NormedAddCommGroup M] [InnerProductSpace ℂ M] [CompleteSpace M] + +lemma tensor_map_conj (e : H ≃ₗᵢ[ℂ] L) (f : K ≃ₗᵢ[ℂ] M) + (S : H →L[ℂ] H) (T : K →L[ℂ] K) (ξ : H ⊗[ℂ] K) : + TensorProduct.mapL (e.conjStarAlgEquiv S) (f.conjStarAlgEquiv T) + (TensorProduct.congrIsometry e f ξ) = + TensorProduct.congrIsometry e f (TensorProduct.mapL S T ξ) := by + induction ξ using TensorProduct.inductionOn with + | tmul x y => simp + | add x y hx hy => simp only [map_add, hx, hy] + +end TensorConjugation + +section FiniteGroupSpatial + +variable {G F : Type u} [Group G] [Group F] [Fintype F] [DecidableEq F] + +abbrev finiteGroupRepresentation (q : G →* F) : GroupRepresentation G where + hilbert := ⟨EuclideanSpace ℂ F⟩ + group := (finiteLeftRegular F).comp q + +abbrev finiteGroupSpatialRepresentation (q : G →* F) : + SpatialRepresentation (FullGroupAlgebra G) (FullGroupAlgebra G) where + left := ⟨ULift.{u+1} (EuclideanSpace ℂ F)⟩ + right := ⟨ULift.{u+1} (EuclideanSpace ℂ F)⟩ + leftRep := ((LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm.conjStarAlgEquiv.toStarAlgHom.comp + (fullGroupEvaluation (finiteGroupRepresentation q))).toNonUnitalStarAlgHom + rightRep := ((LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm.conjStarAlgEquiv.toStarAlgHom.comp + (fullGroupEvaluation (finiteGroupRepresentation q))).toNonUnitalStarAlgHom + +def finiteGroupSpatialDiagonal (_q : G →* F) : + ULift.{u+1} (EuclideanSpace ℂ F) ⊗[ℂ] ULift.{u+1} (EuclideanSpace ℂ F) := + TensorProduct.congrIsometry (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm + (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm (normalizedFiniteDiagonalVector F) + +lemma norm_finiteGroupSpatialDiagonal (q : G →* F) : ‖finiteGroupSpatialDiagonal q‖ = 1 := by + unfold finiteGroupSpatialDiagonal + exact (LinearIsometryEquiv.norm_map _ _).trans (norm_normalizedFiniteDiagonalVector F) + +lemma finiteGroupSpatialDiagonal_coefficient (q : G →* F) (s t : G) : + spatialVectorFunctional (finiteGroupSpatialRepresentation q) + (finiteGroupSpatialDiagonal q : Completion + (ULift.{u+1} (EuclideanSpace ℂ F) ⊗[ℂ] ULift.{u+1} (EuclideanSpace ℂ F))) + (spatialElementary (fullGroupElement s) (fullGroupElement t)) = + if q s = q t then (1 : ℂ) else 0 := by + rw [spatialVectorFunctional_elementary] + change inner ℂ (TensorProduct.congrIsometry + (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm + (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm (normalizedFiniteDiagonalVector F)) (TensorProduct.mapL + ((LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm.conjStarAlgEquiv (finiteLeftRegular F (q s))) + ((LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm.conjStarAlgEquiv (finiteLeftRegular F (q t))) + (TensorProduct.congrIsometry + (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm + (LinearIsometryEquiv.ulift ℂ (EuclideanSpace ℂ F)).symm (normalizedFiniteDiagonalVector F))) = _ + rw [tensor_map_conj] + exact (LinearIsometryEquiv.inner_map_map ..).trans + (normalizedFiniteDiagonalVector_inner_translate F (q s) (q t)) + +end FiniteGroupSpatial + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModels.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ddbb8cf216d5aaed8c50b38c53753e48f75e5e4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModels.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FixedColumns +import OAI.Analysis.WeakInfiniteness.OperatorReducing +import OAI.Analysis.WeakInfiniteness.Plateau +import OAI.Analysis.WeakInfiniteness.ReducingColumns + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace CStarAlgebra ComplexOrder + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma exact_column_reducing_model {n d : ℕ} + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (L : CStarMatrix (Fin n) (Fin d) A) + (e : A) (hL : L.conjTranspose*L=diagonalCopies d e) + (ξ : H) (hξ : ‖ξ‖=1) (he : π e ξ=ξ) (D : CStarMatrix (Fin d) (Fin d) ℂ) : + ∃ J : HilbertVector (Fin d) ℂ →ₗᵢ[ℂ] HilbertVector (Fin n) H, + (matrixRepresentation π (Fin n) (matrixScalarRight L D*L.conjTranspose)).comp J.toContinuousLinearMap= + J.toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D) ∧ + (matrixRepresentation π (Fin n) (matrixScalarRight L D*L.conjTranspose)).adjoint.comp J.toContinuousLinearMap= + J.toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D).adjoint := by + let F := rectangularRepresentation π L + let T := vectorTensorIsometry (n := Fin d) ξ hξ + let a := scalarMatrixAction (H := H) D + have hi : F.adjoint.comp (F.comp T.toContinuousLinearMap)=T.toContinuousLinearMap := by + rw [← ContinuousLinearMap.comp_assoc] + change ((rectangularRepresentation π L).adjoint.comp (rectangularRepresentation π L)).comp + T.toContinuousLinearMap = _ + rw [← rectangularRepresentation_star, ← rectangularRepresentation_mul, hL, + rectangularRepresentation_square] + exact diagonal_rep_plateau π e ξ hξ he d + have ha := scalarAction_vectorTensor D ξ hξ + have ha' : a.adjoint.comp T.toContinuousLinearMap= + T.toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D).adjoint := by + rw [← scalarMatrixAction_star, ← scalarMatrixAction_star] + exact scalarAction_vectorTensor D.conjTranspose ξ hξ + obtain ⟨J,_,hJ,hJ'⟩ := exists_reducing_column F T (scalarMatrixAction (H := ℂ) D) a hi ha ha' + have hw : matrixRepresentation π (Fin n) (matrixScalarRight L D*L.conjTranspose)= + F.comp (a.comp F.adjoint) := by + rw [← rectangularRepresentation_square, rectangularRepresentation_mul, + rectangularRepresentation_scalarRight, rectangularRepresentation_star, + ContinuousLinearMap.comp_assoc] + exact ⟨J, by rwa [hw], by rwa [hw]⟩ + +lemma representation_plateau_vector (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (c : A) (hc : 0 ≤ c) + {α : ℝ} (hα : 0 < α) (hαc : α ≤ ‖π c‖) : + ∃ ξ : H, ‖ξ‖=1 ∧ π (cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) c)) ξ=ξ := by + have hcπ : 0 ≤ π c := map_nonneg π hc + obtain ⟨ξ,hξ,he⟩ := exists_plateau_vector hcπ hα hαc + refine ⟨ξ,hξ,?_⟩ + have hcut : π (positiveCut (α/2) c)=positiveCut (α/2) (π c) := + π.map_cfcₙ (fun s : ℝ => max (s-α/2) 0) c (by fun_prop) + (max_eq_right (by linarith)) (by fun_prop) hc.isSelfAdjoint hcπ.isSelfAdjoint + rw [π.map_cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) c) + (continuous_spectralRamp _).continuousOn (spectralRamp_eq_zero (by positivity) (by positivity)) + (by fun_prop) (positiveCut_nonneg _ _).isSelfAdjoint + ((positiveCut_nonneg (α/2) c).isSelfAdjoint.map π), hcut] + exact he + +theorem exists_uniform_reducing_model {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (c : A) (hc : 0 ≤ c) {α : ℝ} (hα : 0 < α) (d : ℕ) + (D : CStarMatrix (Fin d) (Fin d) ℂ) (hD : ‖D‖ ≤ 1) : + ∃ w : CStarMatrix (Fin n) (Fin n) A, ‖w‖ ≤ 1 ∧ + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)*w* + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)=w ∧ + ∀ (H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π c‖ → + ∃ J : HilbertVector (Fin d) ℂ →ₗᵢ[ℂ] HilbertVector (Fin n) H, + (matrixRepresentation π (Fin n) w).comp J.toContinuousLinearMap= + J.toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D) ∧ + (matrixRepresentation π (Fin n) w).adjoint.comp J.toContinuousLinearMap= + J.toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D).adjoint := by + obtain ⟨L,hL,_,hLn,hEL⟩ := exists_finite_model_columns hn hpi c hα d + let w := matrixScalarRight L D*L.conjTranspose + let E := diagonalCopies n (cfcₙ (spectralRamp (α/4)) c) + have hE : 0 ≤ E := diagonalCopies_nonneg n (cfcₙ_nonneg (fun s _ => spectralRamp_nonneg _ s)) + have hLE : L.conjTranspose*E=L.conjTranspose := by + have h := congrArg CStarMatrix.conjTranspose hEL + rw [rectangular_star_mul] at h + change L.conjTranspose*star E=L.conjTranspose at h + rwa [hE.star_eq] at h + refine ⟨w, ?_, ?_, ?_⟩ + · calc + ‖w‖ ≤ ‖matrixScalarRight L D‖*‖L.conjTranspose‖ := rectangular_norm_mul_le _ _ + _ ≤ (‖L‖*‖D‖)*‖L‖ := by rw [rectangular_norm_conjTranspose]; gcongr; exact matrixScalarRight_norm_le _ _ + _ ≤ (1*1)*1 := by gcongr + _ = 1 := by norm_num + · change E*(matrixScalarRight L D*L.conjTranspose)*E=matrixScalarRight L D*L.conjTranspose + rw [← rectangular_mul_assoc E, matrixScalarRight_mul_left, hEL, + rectangular_mul_assoc, hLE] + · intro H _ _ _ π hαc + obtain ⟨ξ,hξ,he⟩ := representation_plateau_vector π c hc hα hαc + exact exact_column_reducing_model π L _ hL ξ hξ he D + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModelsExtension.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModelsExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..8eab92e1f7197e6d49305a895a3e9d7ecaaf3782 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteReducingModelsExtension.lean @@ -0,0 +1,271 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PolynomialCompression + +namespace OAI + +noncomputable section + +namespace WeakPureInfiniteness + +section + +section + +open scoped TensorProduct ENNReal ComplexOrder + +open UniformSpace + +universe u v + +section + + + +attribute [instance] ComplexHilbert.normedAddCommGroup + ComplexHilbert.innerProductSpace ComplexHilbert.completeSpace + + + + +attribute [instance] CuntzRepresentation.nontrivial + +open scoped InnerProductSpace + + + + +attribute [instance] ContractionRepresentation.nontrivial + + +end + +section + + +section UniformRepresentations + +open scoped ENNReal + +variable {ι : Type*} (B : ι → Type*) [∀ i, NonUnitalCStarAlgebra (B i)] + +abbrev UniformCStarProduct := lp B ∞ + +instance : NonUnitalCStarAlgebra (UniformCStarProduct B) := by + unfold UniformCStarProduct + infer_instance + +instance : CoeFun (UniformCStarProduct B) (fun _ => ∀ i, B i) := ⟨fun x => x.val⟩ + +variable {B} {A : Type*} [NonUnitalCStarAlgebra A] + +noncomputable def uniformProductHom (ρ : ∀ i, A →⋆ₙₐ[ℂ] B i) : + A →⋆ₙₐ[ℂ] UniformCStarProduct B where + toFun x := ⟨fun i => ρ i x, memℓp_infty ⟨‖x‖, by + rintro _ ⟨i, rfl⟩ + exact NonUnitalStarAlgHom.norm_apply_le (ρ i) x⟩⟩ + map_zero' := Subtype.ext (funext fun i => map_zero (ρ i)) + map_add' x y := Subtype.ext (funext fun i => map_add (ρ i) x y) + map_mul' x y := Subtype.ext (funext fun i => map_mul (ρ i) x y) + map_star' x := Subtype.ext (funext fun i => map_star (ρ i) x) + map_smul' c x := Subtype.ext (funext fun i => map_smul (ρ i) c x) + +lemma uniformProductHom_injective (ρ : ∀ i, A →⋆ₙₐ[ℂ] B i) + (hρ : ∀ x y, (∀ i, ρ i x = ρ i y) → x = y) : + Function.Injective (uniformProductHom ρ) := by + intro x y hxy + apply hρ x y + intro i + exact congrArg (fun x : UniformCStarProduct B => x i) hxy + +lemma norm_le_iff_representations (ρ : ∀ i, A →⋆ₙₐ[ℂ] B i) + (hρ : ∀ x y, (∀ i, ρ i x = ρ i y) → x = y) + (x : A) {C : ℝ} (hC : 0 ≤ C) : + ‖x‖ ≤ C ↔ ∀ i, ‖ρ i x‖ ≤ C := by + constructor + · exact fun hx i => (NonUnitalStarAlgHom.norm_apply_le (ρ i) x).trans hx + · intro hx + rw [← NonUnitalStarAlgHom.norm_map (uniformProductHom ρ) + (uniformProductHom_injective ρ hρ) x] + exact lp.norm_le_of_forall_le hC hx + +lemma norm_matrix_le_iff_representations {n : Type*} [Fintype n] + [PartialOrder A] [StarOrderedRing A] + [∀ i, PartialOrder (B i)] [∀ i, StarOrderedRing (B i)] + (ρ : ∀ i, A →⋆ₙₐ[ℂ] B i) + (hρ : ∀ x y, (∀ i, ρ i x = ρ i y) → x = y) + (M : CStarMatrix n n A) {C : ℝ} (hC : 0 ≤ C) : + ‖M‖ ≤ C ↔ ∀ i, ‖CStarMatrix.mapₙₐ (ρ i) M‖ ≤ C := by + apply norm_le_iff_representations (fun i => CStarMatrix.mapₙₐ (ρ i)) _ M hC + intro M N hMN + ext j k + apply hρ + intro i + exact congrArg (fun z : CStarMatrix n n (B i) => z j k) (hMN i) + +end UniformRepresentations + + + +noncomputable instance (priority := 2000) : NonUnitalCStarAlgebra UniversalContraction := + CStarAlgebra.toNonUnitalCStarAlgebra _ + +noncomputable instance (priority := 2000) : PartialOrder UniversalContraction := CStarAlgebra.spectralOrder _ + +noncomputable instance (priority := 2000) : StarOrderedRing UniversalContraction := CStarAlgebra.spectralOrderedRing _ + +noncomputable instance : @StarOrderedRing UniversalContraction + (NonUnitalCStarAlgebra.toNonUnitalNormedRing.toNonUnitalRing.toNonUnitalSemiring) + (inferInstance) (NonUnitalCStarAlgebra.toStarRing) := by + exact CStarAlgebra.spectralOrderedRing _ + +noncomputable def universalMatrixPolynomial {n : Type*} + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) : CStarMatrix n n UniversalContraction := + CStarMatrix.ofMatrix fun i j => universalPolynomial s (a i j) + +noncomputable def matrixPolynomialOperator {n H : Type*} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) (T : H →L[ℂ] H) : + PiLp 2 (fun _ : n => H) →L[ℂ] PiLp 2 (fun _ : n => H) := + matrixOperator (CStarMatrix.ofMatrix fun i j => polynomialOperator s (a i j) T) + +@[simp] +lemma matrixPolynomialOperator_apply {n H : Type*} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) (T : H →L[ℂ] H) + (x : PiLp 2 (fun _ : n => H)) (i : n) : + matrixPolynomialOperator s a T x i = ∑ j, polynomialOperator s (a i j) T (x j) := by + exact matrixOperator_apply _ x i + +lemma norm_universalMatrixPolynomial_le_iff {n : Type*} [Fintype n] + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) {C : ℝ} (hC : 0 ≤ C) : + ‖universalMatrixPolynomial s a‖ ≤ C ↔ + ∀ π : ContractionRepresentation, ‖matrixPolynomialOperator s a π.operator‖ ≤ C := by + have hsep : ∀ x y : UniversalContraction, + (∀ π, contractionEvaluation π x = contractionEvaluation π y) → x = y := by + intro x y h + apply Subtype.ext + exact Subtype.ext (funext h) + refine (norm_matrix_le_iff_representations + (fun π => (contractionEvaluation π).toNonUnitalStarAlgHom) hsep _ hC).trans ?_ + apply forall_congr' + intro π + have he : CStarMatrix.mapₙₐ (contractionEvaluation π).toNonUnitalStarAlgHom + (universalMatrixPolynomial s a) = + CStarMatrix.ofMatrix (fun i j => polynomialOperator s (a i j) π.operator) := by + apply CStarMatrix.ext + intro i j + exact contractionEvaluation_polynomial π s (a i j) + have hn : ‖CStarMatrix.mapₙₐ (contractionEvaluation π).toNonUnitalStarAlgHom + (universalMatrixPolynomial s a)‖ = ‖matrixPolynomialOperator s a π.operator‖ := calc + _ = ‖CStarMatrix.ofMatrix (fun i j => polynomialOperator s (a i j) π.operator)‖ := + congrArg norm he + _ = _ := (norm_matrixOperator _).symm + exact Iff.of_eq (congrArg (· ≤ C) hn) + +section MatrixPolynomialCompression + +variable {H n : Type} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +noncomputable def piLpSubmoduleInclusion (K : Submodule ℂ H) : + PiLp 2 (fun _ : n => K) →ₗᵢ[ℂ] PiLp 2 (fun _ : n => H) where + toFun x := WithLp.toLp 2 (fun i => (x i : H)) + map_add' _ _ := rfl + map_smul' _ _ := rfl + norm_map' _ := by simp only [PiLp.norm_eq_of_L2]; rfl + +omit [CompleteSpace H] in +@[simp] + +lemma piLpSubmoduleInclusion_apply (K : Submodule ℂ H) + (x : PiLp 2 (fun _ : n => K)) (i : n) : + piLpSubmoduleInclusion K x i = (x i : H) := rfl + +lemma polynomialOperator_family_compression_exact {S : Type*} [Finite S] + (s : Finset (List Bool)) (a : List Bool → ℂ) (T : H →L[ℂ] H) + (ξ : S → H) (j : S) : + let m := s.sup List.length + let K := wordSpace (operatorLetters T) ξ m + let ξ₀ : K := ⟨ξ j, testVector_mem_wordSpace _ _ _ j⟩ + (polynomialOperator s a (compress K T) ξ₀ : H) = polynomialOperator s a T (ξ j) := by + dsimp only + let m := s.sup List.length + let K := wordSpace (operatorLetters T) ξ m + let ξ₀ : K := ⟨ξ j, testVector_mem_wordSpace _ _ _ j⟩ + change K.subtypeL (polynomialOperator s a (compress K T) ξ₀) = _ + simp only [polynomialOperator, sum_apply, FunLike.coe_smul, + Pi.smul_apply, map_sum, map_smul] + apply Finset.sum_congr rfl + intro w hw + congr 1 + have he : operatorLetters (compress K T) = fun i => compress K (operatorLetters T i) := by + funext i + exact operatorLetters_compress K T i + rw [he] + exact wordSpace_compression_exact (operatorLetters T) ξ m w (Finset.le_sup hw) j + +lemma matrixPolynomialOperator_compression_exact + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) (T : H →L[ℂ] H) + (ξ : PiLp 2 (fun _ : n => H)) : + let m := s.sup List.length + let K := wordSpace (operatorLetters T) (fun j => ξ j) m + let ξ₀ : PiLp 2 (fun _ : n => K) := WithLp.toLp 2 + (fun j => ⟨ξ j, testVector_mem_wordSpace _ _ _ j⟩) + piLpSubmoduleInclusion K (matrixPolynomialOperator s a (compress K T) ξ₀) = + matrixPolynomialOperator s a T ξ := by + dsimp only + ext i + rw [piLpSubmoduleInclusion_apply, matrixPolynomialOperator_apply] + simp only [Submodule.coe_sum, matrixPolynomialOperator_apply] + apply Finset.sum_congr rfl + intro j _ + exact polynomialOperator_family_compression_exact s (a i j) T (fun j => ξ j) j + +end MatrixPolynomialCompression + +lemma norm_universalMatrixPolynomial_le_of_finite_tests {n : Type} [Fintype n] + (s : Finset (List Bool)) (a : n → n → List Bool → ℂ) {C : ℝ} (hC : 0 ≤ C) + (h : ∀ π : ContractionRepresentation, FiniteDimensional ℂ π.hilbert → + ‖matrixPolynomialOperator s a π.operator‖ ≤ C) : + ‖universalMatrixPolynomial s a‖ ≤ C := by + classical + apply (norm_universalMatrixPolynomial_le_iff s a hC).mpr + intro π + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro ξ + by_cases hξ : ξ = 0 + · simp [hξ] + obtain ⟨j, hj⟩ : ∃ j, ξ j ≠ 0 := by + by_contra he + push Not at he + exact hξ (by ext j; exact he j) + let m := s.sup List.length + let K := wordSpace (operatorLetters π.operator) (fun j => ξ j) m + let : Nontrivial K := ⟨⟨⟨ξ j, testVector_mem_wordSpace _ _ _ j⟩, 0, + fun he => hj (congrArg Subtype.val he)⟩⟩ + let π₀ : ContractionRepresentation := + { hilbert := { Carrier := K } + operator := compress K π.operator + norm_operator_le_one := (norm_compress_le K π.operator).trans π.norm_operator_le_one } + let ξ₀ : PiLp 2 (fun _ : n => K) := WithLp.toLp 2 + (fun j => ⟨ξ j, testVector_mem_wordSpace _ _ _ j⟩) + have he : piLpSubmoduleInclusion K (matrixPolynomialOperator s a π₀.operator ξ₀) = + matrixPolynomialOperator s a π.operator ξ := + matrixPolynomialOperator_compression_exact s a π.operator ξ + have hξ₀ : ‖ξ₀‖ = ‖ξ‖ := (piLpSubmoduleInclusion K).norm_map ξ₀ |>.symm + rw [← he, LinearIsometry.norm_map] + exact (ContinuousLinearMap.le_opNorm _ ξ₀).trans + ((mul_le_mul_of_nonneg_right (h π₀ inferInstance) (norm_nonneg ξ₀)).trans_eq + (congrArg (C * ·) hξ₀)) + +end + + +end +end + +end WeakPureInfiniteness + +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteSelection.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dd84f7ed136f58e05100906f076ebafada7a0d6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteSelection.lean @@ -0,0 +1,119 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CoreSelection +import OAI.Analysis.WeakInfiniteness.FiniteCoupling +import OAI.Analysis.WeakInfiniteness.LocalCommon +import OAI.Analysis.WeakInfiniteness.PrimitiveCompactness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v w + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma finite_norm_support_cover_nonunital {ι : Type w} (x : ι → A) (b : A) (hb : 0 ≤ b) + (α : ℝ) (hα : 0 < α) + (hcover : ∀ (H : Type u) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),NonUnitalRepresentationIrreducible π → + α ≤ ‖π b‖ → ∃ i,π (x i) ≠ 0) : + ∃ F : Finset ι,∀ (H : Type v) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),α ≤ ‖π b‖ → ∃ i ∈ F,π (x i) ≠ 0 := by + let ιA := Unitization.inrNonUnitalStarAlgHom ℂ A + obtain ⟨F,hF⟩ := finite_norm_support_cover (fun i => ιA (x i)) (ιA b) (map_nonneg ιA hb) α hα (by + intro f hf hfb + let Φ := realStateComplexification f hf.1 + let π := Φ.gnsStarAlgHom.toNonUnitalStarAlgHom.comp ιA + exact hcover Φ.GNS π + (irreducible_restrict_unitization Φ.gnsStarAlgHom (extreme_real_state_gns_irreducible f hf)) hfb) + refine ⟨F,?_⟩ + intro H _ _ _ π hπ + have hb' : α ≤ ‖(Unitization.starLift π) (ιA b)‖ := by + change α ≤ ‖(Unitization.starLift π) (b : Unitization ℂ A)‖ + rwa [starLift_inr_apply] + obtain ⟨i,hi,hin⟩ := hF H (Unitization.starLift π) hb' + refine ⟨i,hi,?_⟩ + change (Unitization.starLift π) (x i : Unitization ℂ A) ≠ 0 at hin + rwa [starLift_inr_apply] at hin + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma make_local_perturbationData {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} (hπ : NonUnitalRepresentationIrreducible π) + (p q h k : A) (hp : 0 ≤ p) (hq : 0 ≤ q) (hpn : ‖p‖ ≤ 1) (hqn : ‖q‖ ≤ 1) + (hpq : p*q=0) (hh : 0 ≤ h) (hk : 0 ≤ k) (hph : p*h=h) (hqk : q*k=k) + (hhn : π h ≠ 0) (hkn : π k ≠ 0) : + ∃ F : OrthogonalPerturbationData A n,F.p=p ∧ F.q=q ∧ π (positiveCut F.α F.c) ≠ 0 := by + obtain ⟨c,hc,-,hcn,hch,hck⟩ := exists_local_common_element hn hpi hπ hh hk hhn hkn + let α := ‖π c‖/2 + have hα : 0 < α := by dsimp [α]; exact half_pos (norm_pos_iff.mpr hcn) + let F : OrthogonalPerturbationData A n := + ⟨p,q,h,k,c,hpn,hqn,hp,hq,hpq,hh,hk,hc,hph,hqk,hch,hck,α,hα⟩ + refine ⟨F,rfl,rfl,?_⟩ + change π (positiveCut α c) ≠ 0 + rw [show π (positiveCut α c)=positiveCut α (π c) from + π.map_cfcₙ (fun s : ℝ => max (s-α) 0) c (by fun_prop) + (max_eq_right (by linarith)) (by fun_prop) hc.isSelfAdjoint (map_nonneg π hc).isSelfAdjoint] + exact positiveCut_ne_zero_of_lt_norm (map_nonneg π hc) hα.le (by dsimp [α]; linarith [norm_pos_iff.mpr hcn]) + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_selected_finite_coupling_of_gap_one + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + (b : A) (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) (Q : A → A → Prop) + (hloc : ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → α ≤ ‖π b‖ → + ∃ F : OrthogonalPerturbationData A n,F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q ∧ + π (positiveCut F.α F.c) ≠ 0) : + ∃ (F : Finset {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q}) + (U : A),U ∈ D ∧ IsSelfAdjoint U ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π b‖ → ∃ i ∈ F,π (i.val.p*U*i.val.q) ≠ 0 := by + let I := {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q} + obtain ⟨F,hF⟩ := finite_norm_support_cover_nonunital + (fun i : I => positiveCut i.val.α i.val.c) b hb α hα (by + intro H _ _ _ π hπ hπb + let H' : ComplexHilbert.{1} := ⟨H⟩ + obtain ⟨i,hiD,hjD,hQ,hin⟩ := hloc H' π hπ hπb + exact ⟨⟨i,hiD,hjD,hQ⟩,hin⟩) + obtain ⟨U,hUD,hUsa,ε,hε,hU⟩ := exists_finite_coupling_of_gap_one hσ hσγ hgap hA hn hpi + D hD (fun i : I => i.val) F (fun i _ => ⟨i.property.1,i.property.2.1⟩) + refine ⟨F,U,hUD,hUsa,?_⟩ + intro H π hπb + obtain ⟨i,hi,hin⟩ := hF H π hπb + have hci := norm_lt_of_positiveCut_image_ne_zero π i.val.nonneg_c i.val.pos_α.le hin + refine ⟨i,hi,?_⟩ + intro hz + have he := hU i hi H π hci.le + rw [hz,norm_zero] at he + exact (not_le_of_gt hε) he + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FiniteUnitaryLog.lean b/lean/OAI/Analysis/WeakInfiniteness/FiniteUnitaryLog.lean new file mode 100644 index 0000000000000000000000000000000000000000..d36bf9ad9c44a8cf8bcb666e40cf566bb2a6f2c1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FiniteUnitaryLog.lean @@ -0,0 +1,51 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +universe u + +variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [FiniteDimensional ℂ H] + +def finiteContinuousEndAlgEquiv : (H →ₗ[ℂ] H) ≃ₐ[ℂ] (H →L[ℂ] H) := + { LinearMap.toContinuousLinearMap with + map_mul' := fun _ _ => rfl + commutes' := fun _ => rfl } + +lemma finite_spectrum_continuousEnd (T : H →L[ℂ] H) : (spectrum ℂ T).Finite := by + rw [← finiteContinuousEndAlgEquiv.apply_symm_apply T, AlgEquiv.spectrum_eq] + exact Module.End.finite_spectrum _ + +lemma finite_expUnitary_argSelfAdjoint (u : unitary (H →L[ℂ] H)) : + expUnitary (Unitary.argSelfAdjoint u) = u := by + let : CompleteSpace H := FiniteDimensional.complete ℂ H + apply Subtype.ext + have : ContinuousOn arg (spectrum ℂ (u : H →L[ℂ] H)) := + (finite_spectrum_continuousEnd _).continuousOn _ + rw [expUnitary_coe, Unitary.argSelfAdjoint_coe, ← CFC.exp_eq_normedSpace_exp (𝕜 := ℂ), + ← cfc_comp_smul .., ← cfc_comp' ..] + conv_rhs => rw [← cfc_id' ℂ (u : H →L[ℂ] H)] + refine cfc_congr fun y hy ↦ ?_ + have hy₁ : ‖y‖ = 1 := spectrum.norm_eq_one_of_unitary u.2 hy + have hh : I * y.arg = log y := + Complex.ext (by simp [log_re, hy₁]) (by simp [log_im]) + simpa [← exp_eq_exp_ℂ, hh] using exp_log (by aesop) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FirstCoupling.lean b/lean/OAI/Analysis/WeakInfiniteness/FirstCoupling.lean new file mode 100644 index 0000000000000000000000000000000000000000..72e609e8631795d56bae537152da3787772a75da --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FirstCoupling.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SelectedCoupling +import OAI.Analysis.WeakInfiniteness.SquareZero + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_first_coupling_on_norm_slice_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ U ∈ D,IsSelfAdjoint U ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + ∃ p ∈ D,∃ q ∈ D,0 ≤ p ∧ 0 ≤ q ∧ p*q=0 ∧ π (p*U*q) ≠ 0 := by + obtain ⟨F,U,hUD,hU,hUF⟩ := exists_selected_finite_coupling_of_gap_any hσ hσγ hgap hA hn hpi + D hD b hb hα (fun _ _ => True) (by + intro H π hπ hπb + obtain ⟨c,hcD,hc,hcn⟩ := hlocal H π hπ hπb + obtain ⟨u,huD,v,hvD,hu,hv,huv,hun,hvn⟩ := exists_orthogonal_detected_pair hn hpi π hc hcn + obtain ⟨F,hFu,hFv,hFn⟩ := exists_core_perturbationData hn hpi hπ hu hv huv hun hvn + have huD' : u ∈ D := hereditarySubalgebra_le_of_mem hD hc.isSelfAdjoint hcD huD + have hvD' : v ∈ D := hereditarySubalgebra_le_of_mem hD hc.isSelfAdjoint hcD hvD + exact ⟨F,hereditarySubalgebra_le_of_mem hD hu.isSelfAdjoint huD' hFu, + hereditarySubalgebra_le_of_mem hD hv.isSelfAdjoint hvD' hFv,True.intro,hFn⟩) + refine ⟨U,hUD,hU,?_⟩ + intro H π hπb + obtain ⟨i,_,hin⟩ := hUF H π hπb + exact ⟨i.val.p,i.property.1,i.val.q,i.property.2.1,i.val.nonneg_p,i.val.nonneg_q, + i.val.orthogonal,hin⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FixedColumns.lean b/lean/OAI/Analysis/WeakInfiniteness/FixedColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..83885809e5c3e74f27f614806b778ec629ccc264 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FixedColumns.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixCutToolkit +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.CutImplementation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance matrixRealModuleColumns {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +lemma uniformCopies_absorbs {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (a : A) (ha : 0 ≤ a) (d : ℕ) : + CuntzSubequiv (diagonalCopies d a) (diagonalCopies n a) := by + by_cases haz : a=0 + · subst a + intro ε hε + refine ⟨0, ?_⟩ + simpa [diagonalCopies] using hε + · exact (hpi a ha haz).diagonal_absorbs hn d + +lemma exists_finite_model_columns {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (c : A) {α : ℝ} (hα : 0 < α) (d : ℕ) : + ∃ L : CStarMatrix (Fin n) (Fin d) A, + L.conjTranspose*L=diagonalCopies d (cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) c)) ∧ + L*L.conjTranspose ∈ hereditarySubalgebra (diagonalCopies n (positiveCut (α/2) c)) + (diagonalCopies_nonneg n (positiveCut_nonneg (α/2) c)).isSelfAdjoint ∧ + ‖L‖ ≤ 1 ∧ diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)*L=L := by + let c₁ := positiveCut (α/2) c + have hc₁ : 0 ≤ c₁ := positiveCut_nonneg _ _ + obtain ⟨L,hL,hLher,hLn⟩ := (uniformCopies_absorbs hn hpi c₁ hc₁ d).exact_spectralRamp + (diagonalCopies_nonneg d hc₁) (diagonalCopies_nonneg n hc₁) (α/8) (by positivity) + refine ⟨L, ?_, hLher, hLn, ?_⟩ + · rw [hL, diagonalCopies_cfc d c₁ hc₁.isSelfAdjoint (spectralRamp (α/8)) + (continuous_spectralRamp _) (spectralRamp_eq_zero (by positivity) (by positivity))] + · apply rectangular_left_identity_of_hereditary_range _ _ L + (diagonalCopies_nonneg n hc₁).isSelfAdjoint _ hLher + change (diagonalHom n (cfcₙ (spectralRamp (α/4)) c))*(diagonalHom n c₁)=diagonalHom n c₁ + rw [← map_mul] + congr 1 + exact spectralRamp_mul_positiveCut c (by positivity) (by linarith) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FixedRows.lean b/lean/OAI/Analysis/WeakInfiniteness/FixedRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..37debd6b8847d156009690eb2354e4fb8ef08980 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FixedRows.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CutImplementation +import OAI.Analysis.WeakInfiniteness.MatrixCutToolkit + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance matrixRealModuleRows {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +lemma exists_fixed_comparison_row {n : ℕ} (c h : A) (hc : 0 ≤ c) (hh : 0 ≤ h) + (hch : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h)) + {α : ℝ} (hα : 0 < α) : + ∃ R : CStarMatrix (Fin 1) (Fin n) A, + R.conjTranspose*R=diagonalCopies n (cfcₙ (spectralRamp (α/4)) c) ∧ + R*R.conjTranspose∈hereditarySubalgebra (diagonalCopies 1 h) + (diagonalCopies_nonneg 1 hh).isSelfAdjoint ∧ ‖R‖≤1 := by + obtain ⟨R,hR,hRh,hRn⟩ := hch.exact_spectralRamp + (diagonalCopies_nonneg n hc) (diagonalCopies_nonneg 1 hh) (α/4) (by positivity) + refine ⟨R,?_,hRh,hRn⟩ + rw [hR, diagonalCopies_cfc n c hc.isSelfAdjoint (spectralRamp (α/4)) + (continuous_spectralRamp _) (spectralRamp_eq_zero (by positivity) (by positivity))] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma spectralRamp_mul_ramp (c : A) {θ δ : ℝ} (hθ : 0 < θ) (hδ : 2*θ ≤ δ) : + cfcₙ (spectralRamp θ) c*cfcₙ (spectralRamp δ) c=cfcₙ (spectralRamp δ) c := by + have hd : 0 < δ := lt_of_lt_of_le (by linarith : 0 < 2*θ) hδ + by_cases hc : IsSelfAdjoint c + · rw [← cfcₙ_mul (spectralRamp θ) (spectralRamp δ) c + (continuous_spectralRamp _).continuousOn (spectralRamp_eq_zero hθ (by positivity)) + (continuous_spectralRamp _).continuousOn (spectralRamp_eq_zero hd (by positivity))] + apply cfcₙ_congr + intro s hs + dsimp only + by_cases hsd : s ≤ δ + · rw [spectralRamp_eq_zero hd hsd, mul_zero] + · rw [spectralRamp_eq_one hθ (hδ.trans (le_of_lt (lt_of_not_ge hsd))), one_mul] + · simp only [cfcₙ_apply_of_not_predicate c hc, mul_zero] + +lemma fixed_row_shallow_support {n : ℕ} (c : A) + {α : ℝ} (hα : 0 < α) (R : CStarMatrix (Fin 1) (Fin n) A) + (hR : R.conjTranspose*R=diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)) : + diagonalCopies n (cfcₙ (spectralRamp (α/16)) c)*R.conjTranspose=R.conjTranspose := by + apply rectangular_left_identity_of_range + rw [rectangular_conjTranspose_conjTranspose, hR] + change diagonalHom n (cfcₙ (spectralRamp (α/16)) c)* + diagonalHom n (cfcₙ (spectralRamp (α/4)) c)=diagonalHom n (cfcₙ (spectralRamp (α/4)) c) + rw [← map_mul, spectralRamp_mul_ramp c (by positivity : 0 < α/16) (by linarith)] + +lemma fixed_row_partial_isometry {n : ℕ} (p h : A) (hh : 0 ≤ h) + (hph : star p*p*h=h) (R : CStarMatrix (Fin 1) (Fin n) A) + (hR : R*R.conjTranspose∈hereditarySubalgebra (diagonalCopies 1 h) + (diagonalCopies_nonneg 1 hh).isSelfAdjoint) : + diagonalCopies 1 (star p*p)*R=R := by + apply rectangular_left_identity_of_hereditary_range _ _ R + (diagonalCopies_nonneg 1 hh).isSelfAdjoint _ hR + change diagonalHom 1 (star p*p)*diagonalHom 1 h=diagonalHom 1 h + rw [← map_mul, hph] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FourColumnNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/FourColumnNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e4f75aa4dc4256d63f12ea2d08a21ae3fda15f1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FourColumnNorm.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.RectangularPolar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +local instance matrixRealModuleFour {j : Type*} [Fintype j] : + Module ℝ (CStarMatrix j j A) := Module.complexToReal _ + +lemma norm_rectangular_sqrt_left (U : CStarMatrix m n A) (V : CStarMatrix n k A) : + ‖CFC.sqrt (U.conjTranspose*U)*V‖=‖U*V‖ := by + have he : (CFC.sqrt (U.conjTranspose*U)*V).conjTranspose* + (CFC.sqrt (U.conjTranspose*U)*V)=(U*V).conjTranspose*(U*V) := by + rw [rectangular_star_mul,rectangular_star_mul] + change (V.conjTranspose*star (CFC.sqrt (U.conjTranspose*U)))* + (CFC.sqrt (U.conjTranspose*U)*V)=(V.conjTranspose*U.conjTranspose)*(U*V) + rw [(CFC.sqrt_nonneg (U.conjTranspose*U)).star_eq] + calc + _=V.conjTranspose*(CFC.sqrt (U.conjTranspose*U)*CFC.sqrt (U.conjTranspose*U))*V := by + simp only [rectangular_mul_assoc] + _=V.conjTranspose*(U.conjTranspose*U)*V := by + rw [CFC.sqrt_mul_sqrt_self _ (rectangular_initial_nonneg U)] + _=_ := by simp only [rectangular_mul_assoc] + have hn := congrArg norm he + rw [rectangular_norm_initial,rectangular_norm_initial] at hn + nlinarith [norm_nonneg (CFC.sqrt (U.conjTranspose*U)*V),norm_nonneg (U*V)] + +lemma norm_rectangular_sqrt_right (U : CStarMatrix m n A) (V : CStarMatrix k n A) : + ‖U*CFC.sqrt (V.conjTranspose*V)‖=‖U*V.conjTranspose‖ := by + have h := norm_rectangular_sqrt_left V U.conjTranspose + have h1 : (U*CFC.sqrt (V.conjTranspose*V)).conjTranspose= + CFC.sqrt (V.conjTranspose*V)*U.conjTranspose := by + rw [rectangular_star_mul] + change star (CFC.sqrt (V.conjTranspose*V))*U.conjTranspose=_ + rw [(CFC.sqrt_nonneg (V.conjTranspose*V)).star_eq] + have h2 : (U*V.conjTranspose).conjTranspose=V*U.conjTranspose := by + rw [rectangular_star_mul,rectangular_conjTranspose_conjTranspose] + rw [← h1,← h2,rectangular_norm_conjTranspose,rectangular_norm_conjTranspose] at h + exact h + +lemma norm_rectangular_range_roots (U : CStarMatrix m n A) (V : CStarMatrix m k A) : + ‖CFC.sqrt (U*U.conjTranspose)*CFC.sqrt (V*V.conjTranspose)‖= + ‖U.conjTranspose*V‖ := by + have h1 := norm_rectangular_sqrt_left U.conjTranspose (CFC.sqrt (V*V.conjTranspose)) + have h2 := norm_rectangular_sqrt_right U.conjTranspose V.conjTranspose + simp only [rectangular_conjTranspose_conjTranspose] at h1 h2 + exact h1.trans h2 + +open WithCStarModule in +lemma norm_matrix_le_sum_entries (M : CStarMatrix m n A) : ‖M‖ ≤ ∑ j,∑ i,‖M i j‖ := by + rw [CStarMatrix.norm_def] + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro v + simp only [CStarMatrix.toCLM_apply_eq_sum,Finset.sum_mul] + apply (pi_norm_le_sum_norm _).trans + gcongr with i _ + apply (norm_sum_le _ _).trans + gcongr with j _ + apply (norm_mul_le _ _).trans + rw [mul_comm] + gcongr + exact WithCStarModule.norm_apply_le_norm v j + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteQuotients.lean b/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteQuotients.lean new file mode 100644 index 0000000000000000000000000000000000000000..196c5bc8bd594dea32d031b73d4bd38065e52cc2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteQuotients.lean @@ -0,0 +1,161 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +open FreeGroup + +variable {α : Type*} [Fintype α] [DecidableEq α] + +noncomputable def freeWordBall (m : ℕ) : Finset (FreeGroup α) := by + classical + exact (Finset.range (m + 1)).biUnion fun k => + Finset.univ.image (fun f : Fin k → α × Bool => FreeGroup.mk (List.ofFn f)) + +lemma mem_freeWordBall (g : FreeGroup α) (m : ℕ) : + g ∈ freeWordBall m ↔ FreeGroup.norm g ≤ m := by + classical + constructor + · intro hg + obtain ⟨k, hk, hg'⟩ := Finset.mem_biUnion.mp hg + obtain ⟨f, _, rfl⟩ := Finset.mem_image.mp hg' + exact FreeGroup.norm_mk_le.trans (by simpa using Nat.le_of_lt_succ (Finset.mem_range.mp hk)) + · intro hg + apply Finset.mem_biUnion.mpr + refine ⟨g.toWord.length, Finset.mem_range.mpr (Nat.lt_succ_of_le hg), ?_⟩ + apply Finset.mem_image.mpr + refine ⟨fun i => g.toWord.get i, Finset.mem_univ _, ?_⟩ + simpa using (FreeGroup.mk_toWord (x := g)) + +lemma one_mem_freeWordBall (m : ℕ) : (1 : FreeGroup α) ∈ freeWordBall m := by + rw [mem_freeWordBall] + simp + +lemma exists_freeBallTranslation (m : ℕ) (a : α) : + ∃ σ : Equiv.Perm (freeWordBall (α := α) m), + ∀ (x : freeWordBall (α := α) m), FreeGroup.of a * x.val ∈ freeWordBall m → + (σ x).val = FreeGroup.of a * x.val := by + classical + let D := {x : freeWordBall (α := α) m // FreeGroup.of a * x.val ∈ freeWordBall m} + let f : D → freeWordBall (α := α) m := fun x => x.val + let g : D → freeWordBall (α := α) m := fun x => ⟨FreeGroup.of a * x.val.val, x.property⟩ + have hf : Function.Injective f := Subtype.val_injective + have hg : Function.Injective g := by + intro x y h + apply Subtype.ext + apply Subtype.ext + exact mul_left_cancel (congrArg Subtype.val h) + obtain ⟨σ, hσ⟩ := Equiv.Perm.exists_extending_pair f g hf hg + refine ⟨σ, fun x hx => ?_⟩ + exact congrArg Subtype.val (hσ ⟨x, hx⟩) + +noncomputable def freeBallTranslation (m : ℕ) (a : α) : + Equiv.Perm (freeWordBall (α := α) m) := + (exists_freeBallTranslation m a).choose + +lemma freeBallTranslation_apply (m : ℕ) (a : α) (x : freeWordBall (α := α) m) + (hx : FreeGroup.of a * x.val ∈ freeWordBall m) : + (freeBallTranslation m a x).val = FreeGroup.of a * x.val := + (exists_freeBallTranslation m a).choose_spec x hx + +lemma freeBallTranslation_inv_apply (m : ℕ) (a : α) (x : freeWordBall (α := α) m) + (hx : (FreeGroup.of a)⁻¹ * x.val ∈ freeWordBall m) : + ((freeBallTranslation m a)⁻¹ x).val = (FreeGroup.of a)⁻¹ * x.val := by + let y : freeWordBall (α := α) m := ⟨(FreeGroup.of a)⁻¹ * x.val, hx⟩ + have hy : freeBallTranslation m a y = x := by + apply Subtype.ext + rw [freeBallTranslation_apply] + · simp [y] + · simp [y, x.property] + have hiy := congrArg (freeBallTranslation m a).symm hy + simp only [Equiv.symm_apply_apply] at hiy + exact congrArg Subtype.val hiy.symm + +noncomputable def freeFiniteQuotient (m : ℕ) : + FreeGroup α →* Equiv.Perm (freeWordBall (α := α) m) := + FreeGroup.lift (freeBallTranslation m) + +lemma freeFiniteQuotient_of (m : ℕ) (a : α) : + freeFiniteQuotient m (FreeGroup.of a) = freeBallTranslation m a := by + simp [freeFiniteQuotient] + +omit [Fintype α] [DecidableEq α] in +lemma free_mk_cons_pos (a : α) (w : List (α × Bool)) : + FreeGroup.mk ((a, true) :: w) = FreeGroup.of a * FreeGroup.mk w := rfl + +omit [Fintype α] [DecidableEq α] in +lemma free_mk_cons_neg (a : α) (w : List (α × Bool)) : + FreeGroup.mk ((a, false) :: w) = (FreeGroup.of a)⁻¹ * FreeGroup.mk w := rfl + +lemma freeFiniteQuotient_word_apply (m : ℕ) (w : List (α × Bool)) (hw : w.length ≤ m) : + (freeFiniteQuotient m (FreeGroup.mk w) ⟨1, one_mem_freeWordBall m⟩).val = + FreeGroup.mk w := by + induction w with + | nil => simp [← FreeGroup.one_eq_mk] + | cons x w ih => + have hw' : w.length ≤ m := (Nat.le_succ w.length).trans hw + have ih' := ih hw' + have hmem : FreeGroup.mk (x :: w) ∈ freeWordBall (α := α) m := + (mem_freeWordBall _ _).mpr (FreeGroup.norm_mk_le.trans hw) + rcases x with ⟨a, b⟩ + cases b + · rw [free_mk_cons_neg] at hmem ⊢ + simp only [_root_.map_mul, _root_.map_inv, freeFiniteQuotient_of, Equiv.Perm.coe_mul, + Function.comp_apply] + rw [freeBallTranslation_inv_apply, ih'] + simpa only [ih'] using hmem + · rw [free_mk_cons_pos] at hmem ⊢ + simp only [_root_.map_mul, freeFiniteQuotient_of, Equiv.Perm.coe_mul, Function.comp_apply] + rw [freeBallTranslation_apply, ih'] + simpa only [ih'] using hmem + +lemma freeFiniteQuotient_apply_base (m : ℕ) (g : FreeGroup α) (hg : g ∈ freeWordBall m) : + (freeFiniteQuotient m g ⟨1, one_mem_freeWordBall m⟩).val = g := by + have hw := freeFiniteQuotient_word_apply m g.toWord ((mem_freeWordBall g m).mp hg) + simpa only [FreeGroup.mk_toWord] using hw + +lemma freeFiniteQuotient_injOn_ball (m : ℕ) : + Set.InjOn (freeFiniteQuotient (α := α) m) (↑(freeWordBall (α := α) m) : Set (FreeGroup α)) := by + intro x hx y hy h + have he := congrArg (fun σ : Equiv.Perm (freeWordBall (α := α) m) => + (σ ⟨1, one_mem_freeWordBall m⟩).val) h + simpa only [freeFiniteQuotient_apply_base m x hx, + freeFiniteQuotient_apply_base m y hy] using he + +lemma freeFiniteQuotient_injOn_finset (S : Finset (FreeGroup α)) : + ∃ m : ℕ, Set.InjOn (freeFiniteQuotient (α := α) m) (↑S : Set (FreeGroup α)) := by + refine ⟨S.sup FreeGroup.norm, fun x hx y hy h => ?_⟩ + apply freeFiniteQuotient_injOn_ball _ ?_ ?_ h + · exact (mem_freeWordBall _ _).mpr (Finset.le_sup hx) + · exact (mem_freeWordBall _ _).mpr (Finset.le_sup hy) + +lemma eventually_freeFiniteQuotient_eq_iff (s t : FreeGroup α) : + ∀ᶠ m in Filter.atTop, freeFiniteQuotient m s = freeFiniteQuotient m t ↔ s = t := by + filter_upwards [Filter.eventually_ge_atTop (max (FreeGroup.norm s) (FreeGroup.norm t))] with m hm + constructor + · intro h + exact freeFiniteQuotient_injOn_ball m + ((mem_freeWordBall _ _).mpr ((le_max_left _ _).trans hm)) + ((mem_freeWordBall _ _).mpr ((le_max_right _ _).trans hm)) h + · rintro rfl + rfl + +lemma tendsto_freeFiniteQuotient_diagonal (s t : FreeGroup α) : + Filter.Tendsto (fun m => if freeFiniteQuotient m s = freeFiniteQuotient m t then (1 : ℂ) else 0) + Filter.atTop (nhds (if s = t then (1 : ℂ) else 0)) := by + apply tendsto_const_nhds.congr' + filter_upwards [eventually_freeFiniteQuotient_eq_iff s t] with m hm + simp only [hm] + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteRepresentations.lean b/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteRepresentations.lean new file mode 100644 index 0000000000000000000000000000000000000000..564377b03b2c882808365db21e196ec7c79eded8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FreeFiniteRepresentations.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FreeFiniteQuotients + +namespace OAI + +universe u + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +open FreeGroup + +variable {α : Type*} [Fintype α] [DecidableEq α] + +variable {H : Type u} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +def freeOrbitSpace (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) : Submodule ℂ H := + Submodule.span ℂ ((fun g => π g ξ) '' (↑(freeWordBall (α := α) m) : Set (FreeGroup α))) + +instance freeOrbitSpace_finite (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) : + FiniteDimensional ℂ (freeOrbitSpace π m ξ) := by + unfold freeOrbitSpace + exact FiniteDimensional.span_of_finite ℂ ((freeWordBall (α := α) m).finite_toSet.image _) + +lemma freeOrbitSpace_mem (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) + (g : FreeGroup α) (hg : g ∈ freeWordBall m) : π g ξ ∈ freeOrbitSpace π m ξ := + Submodule.subset_span ⟨g,hg,rfl⟩ + +lemma freeOrbitSpace_base (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) : + ξ ∈ freeOrbitSpace π m ξ := by + simpa using freeOrbitSpace_mem π m ξ 1 (one_mem_freeWordBall m) + +def extendUnitaryOn (K : Submodule ℂ H) [FiniteDimensional ℂ K] (U : H ≃ₗᵢ[ℂ] H) : + K ≃ₗᵢ[ℂ] K := by + let S := K.comap (U.toLinearMap.comp K.subtype) + let L : S →ₗᵢ[ℂ] K := + { toLinearMap := + { toFun := fun x => ⟨U x.val.val, x.property⟩ + map_add' := by intro x y; apply Subtype.ext; exact U.map_add _ _ + map_smul' := by intro c x; apply Subtype.ext; exact U.map_smul _ _ } + norm_map' := fun x => U.norm_map x.val.val } + exact L.extend.toLinearIsometryEquiv rfl + +lemma extendUnitaryOn_apply (K : Submodule ℂ H) [FiniteDimensional ℂ K] + (U : H ≃ₗᵢ[ℂ] H) (x : K) (hx : U x.val ∈ K) : + (extendUnitaryOn K U x).val = U x.val := by + unfold extendUnitaryOn + exact congrArg Subtype.val (LinearIsometry.extend_apply _ ⟨x,hx⟩) + +lemma extendUnitaryOn_symm_apply (K : Submodule ℂ H) [FiniteDimensional ℂ K] + (U : H ≃ₗᵢ[ℂ] H) (x : K) (hx : U.symm x.val ∈ K) : + ((extendUnitaryOn K U).symm x).val = U.symm x.val := by + let y : K := ⟨U.symm x.val, hx⟩ + have hy : extendUnitaryOn K U y = x := by + apply Subtype.ext + rw [extendUnitaryOn_apply, LinearIsometryEquiv.apply_symm_apply] + simpa only [y, LinearIsometryEquiv.apply_symm_apply] using x.property + have he := congrArg (extendUnitaryOn K U).symm hy + simp only [LinearIsometryEquiv.symm_apply_apply] at he + exact congrArg Subtype.val he.symm + +def freeFiniteRepresentation (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) : + FreeGroup α →* freeOrbitSpace π m ξ ≃ₗᵢ[ℂ] freeOrbitSpace π m ξ := + FreeGroup.lift (fun a => extendUnitaryOn (freeOrbitSpace π m ξ) (π (FreeGroup.of a))) + +lemma freeFiniteRepresentation_of (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) (a : α) : + freeFiniteRepresentation π m ξ (FreeGroup.of a) = + extendUnitaryOn (freeOrbitSpace π m ξ) (π (FreeGroup.of a)) := by + simp [freeFiniteRepresentation] + +lemma freeFiniteRepresentation_word (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) + (w : List (α × Bool)) (hw : w.length ≤ m) : + (freeFiniteRepresentation π m ξ (FreeGroup.mk w) ⟨ξ, freeOrbitSpace_base π m ξ⟩).val = + π (FreeGroup.mk w) ξ := by + induction w with + | nil => simp [← FreeGroup.one_eq_mk] + | cons x w ih => + have hw' : w.length ≤ m := (Nat.le_succ w.length).trans hw + have ih' := ih hw' + have hmem : π (FreeGroup.mk (x :: w)) ξ ∈ freeOrbitSpace π m ξ := + freeOrbitSpace_mem π m ξ _ ((mem_freeWordBall _ _).mpr (FreeGroup.norm_mk_le.trans hw)) + rcases x with ⟨a,b⟩ + cases b + · rw [free_mk_cons_neg] at hmem ⊢ + simp only [_root_.map_mul, _root_.map_inv, freeFiniteRepresentation_of, + LinearIsometryEquiv.coe_mul, Function.comp_apply, LinearIsometryEquiv.coe_inv] at hmem ⊢ + rw [extendUnitaryOn_symm_apply, ih'] + simpa only [ih'] using hmem + · rw [free_mk_cons_pos] at hmem ⊢ + simp only [_root_.map_mul, freeFiniteRepresentation_of, + LinearIsometryEquiv.coe_mul, Function.comp_apply] at hmem ⊢ + rw [extendUnitaryOn_apply, ih'] + simpa only [ih'] using hmem + +lemma freeFiniteRepresentation_ball (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) (m : ℕ) (ξ : H) + (g : FreeGroup α) (hg : g ∈ freeWordBall m) : + (freeFiniteRepresentation π m ξ g ⟨ξ, freeOrbitSpace_base π m ξ⟩).val = π g ξ := by + simpa only [FreeGroup.mk_toWord] using + freeFiniteRepresentation_word π m ξ g.toWord ((mem_freeWordBall g m).mp hg) + +lemma norm_freePolynomial_le_of_finite_tests (c : FreeGroup α →₀ ℂ) (C : ℝ) (hC : 0 ≤ C) + (h : ∀ (V : Type u) [NormedAddCommGroup V] [InnerProductSpace ℂ V] + [FiniteDimensional ℂ V] (ρ : FreeGroup α →* V ≃ₗᵢ[ℂ] V), + ‖c.sum (fun g a => a • (ρ g : V →L[ℂ] V))‖ ≤ C) + (π : FreeGroup α →* H ≃ₗᵢ[ℂ] H) : + ‖c.sum (fun g a => a • (π g : H →L[ℂ] H))‖ ≤ C := by + classical + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro ξ + let m := c.support.sup FreeGroup.norm + let K := freeOrbitSpace π m ξ + let η : K := ⟨ξ, freeOrbitSpace_base π m ξ⟩ + let ρ := freeFiniteRepresentation π m ξ + have he : (c.sum (fun g a => a • (ρ g : K →L[ℂ] K)) η).val = + c.sum (fun g a => a • (π g : H →L[ℂ] H)) ξ := by + simp only [Finsupp.sum, sum_apply, smul_apply, + Submodule.coe_sum, Submodule.coe_smul_of_tower] + apply Finset.sum_congr rfl + intro g hg + exact congrArg (fun x : H => c g • x) + (freeFiniteRepresentation_ball π m ξ g ((mem_freeWordBall _ _).mpr (Finset.le_sup hg))) + rw [← he] + exact (ContinuousLinearMap.le_opNorm _ η).trans + (mul_le_mul_of_nonneg_right (h K ρ) (norm_nonneg η)) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FreeTreeNormExtension.lean b/lean/OAI/Analysis/WeakInfiniteness/FreeTreeNormExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce00a0d34ec08ef79ed3314efdda7058f9a69bb0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FreeTreeNormExtension.lean @@ -0,0 +1,160 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FreeTwistedNorm + +namespace OAI + +noncomputable section + +noncomputable section + +open scoped ENNReal InnerProductSpace + +namespace WeakPureInfiniteness + +variable {G K : Type*} + +variable [Group G] + +section SchurBound + +variable {X I : Type*} [Fintype I] + +lemma l2_summable_norm_sq (ξ : GroupHilbert X) : Summable (fun x => ‖ξ x‖ ^ 2) := by + have h := Memℓp.summable (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ.property + norm_num at h + exact h + +lemma l2_norm_sq (ξ : GroupHilbert X) : ‖ξ‖ ^ 2 = ∑' x, ‖ξ x‖ ^ 2 := by + have h := lp.norm_rpow_eq_tsum (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal) ξ + norm_num at h + exact h + +lemma weighted_two_mul_le (a b w : ℝ) (hw : 0 < w) : + 2 * a * b ≤ w * a ^ 2 + w⁻¹ * b ^ 2 := by + have h := sq_nonneg (w * a - b) + have hi : w * w⁻¹ = 1 := mul_inv_cancel₀ hw.ne' + apply (mul_le_mul_iff_right₀ hw).mp + nlinarith + +def permutationSum (e : I → X ≃ X) : GroupHilbert X →L[ℂ] GroupHilbert X := + ∑ i, (l2Reindex (e i)).toContinuousLinearEquiv.toContinuousLinearMap + +lemma weighted_squares_summable (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (ξ : GroupHilbert X) (i : I) : + Summable (fun x => (w ((e i).symm x) / w x) * ‖ξ x‖ ^ 2) := by + apply Summable.of_nonneg_of_le + (fun x => mul_nonneg (div_nonneg (hw _).le (hw _).le) (sq_nonneg _)) + (fun x => mul_le_mul_of_nonneg_right + ((Finset.single_le_sum (fun j _ => div_nonneg (hw _).le (hw _).le) + (Finset.mem_univ i)).trans (hrow x)) (sq_nonneg _)) + ((l2_summable_norm_sq ξ).mul_left C) + +lemma weighted_squares_sum_le (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (ξ : GroupHilbert X) : + ∑ i, ∑' x, (w ((e i).symm x) / w x) * ‖ξ x‖ ^ 2 ≤ C * ‖ξ‖ ^ 2 := by + have hs (i : I) := weighted_squares_summable w hw e C hrow ξ i + rw [← Summable.tsum_finsetSum (fun i _ => hs i)] + simp_rw [← Finset.sum_mul] + rw [l2_norm_sq ξ, ← tsum_mul_left] + apply Summable.tsum_le_tsum + (fun x => mul_le_mul_of_nonneg_right (hrow x) (sq_nonneg _)) + · simpa only [Finset.sum_mul] using summable_sum (fun i _ => hs i) + · exact (l2_summable_norm_sq ξ).mul_left C + +theorem norm_permutationSum_le (w : X → ℝ) (hw : ∀ x, 0 < w x) + (e : I → X ≃ X) (C : ℝ) (hC : 0 ≤ C) + (hrow : ∀ x, ∑ i, w ((e i).symm x) / w x ≤ C) + (hcol : ∀ x, ∑ i, w (e i x) / w x ≤ C) : + ‖permutationSum e‖ ≤ C := by + classical + apply ContinuousLinearMap.opNorm_le_of_re_inner_le hC + intro ξ η hξ hη + have hs₁ (i : I) := weighted_squares_summable w hw e C hrow η i + have hs₂ (i : I) : Summable (fun x => + (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) := by + have h := weighted_squares_summable w hw (fun i => (e i).symm) C hcol ξ i + convert (e i).symm.summable_iff.mpr h using 1 + ext x + simp + have hpoint (i : I) (x : X) : + 2 * (inner ℂ (ξ ((e i).symm x)) (η x)).re ≤ + (w ((e i).symm x) / w x) * ‖η x‖ ^ 2 + + (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2 := by + have hr := (Complex.re_le_norm (inner ℂ (ξ ((e i).symm x)) (η x))).trans + (norm_inner_le_norm (ξ ((e i).symm x)) (η x)) + have he := weighted_two_mul_le ‖η x‖ ‖ξ ((e i).symm x)‖ + (w ((e i).symm x) / w x) (div_pos (hw _) (hw _)) + rw [inv_div] at he + nlinarith + have hi (i : I) : + 2 * (inner ℂ (l2Reindex (e i) ξ) η).re ≤ + (∑' x, (w ((e i).symm x) / w x) * ‖η x‖ ^ 2) + + (∑' x, (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) := by + have hin := lp.summable_inner (𝕜 := ℂ) (l2Reindex (e i) ξ) η + have hre := (Complex.reCLM.hasSum hin.hasSum).summable + have hret : (inner ℂ (l2Reindex (e i) ξ) η).re = + ∑' x, (inner ℂ (ξ ((e i).symm x)) (η x)).re := by + exact Complex.reCLM.map_tsum hin + rw [hret, ← tsum_mul_left, ← (hs₁ i).tsum_add (hs₂ i)] + exact Summable.tsum_le_tsum (hpoint i) (hre.mul_left 2) ((hs₁ i).add (hs₂ i)) + have hsecond : + (∑ i, ∑' x, (w x / w ((e i).symm x)) * ‖ξ ((e i).symm x)‖ ^ 2) = + (∑ i, ∑' x, (w (e i x) / w x) * ‖ξ x‖ ^ 2) := by + apply Finset.sum_congr rfl + intro i _ + convert (e i).symm.tsum_eq (fun x => (w (e i x) / w x) * ‖ξ x‖ ^ 2) using 1 + simp + have htotal := Finset.sum_le_sum (fun i (_ : i ∈ Finset.univ) => hi i) + rw [Finset.sum_add_distrib, hsecond] at htotal + have hb₁ := weighted_squares_sum_le w hw e C hrow η + have hb₂ := weighted_squares_sum_le w hw (fun i => (e i).symm) C hcol ξ + simp only [Equiv.symm_symm] at hb₂ + have heval : (inner ℂ (permutationSum e ξ) η).re = + ∑ i, (inner ℂ (l2Reindex (e i) ξ) η).re := by + simp [permutationSum] + change (inner ℂ (permutationSum e ξ) η).re ≤ C + rw [heval] + rw [← Finset.mul_sum] at htotal + simp only [hξ, hη, one_pow, mul_one] at hb₁ hb₂ + nlinarith + +end SchurBound + +def inverseLetterEquiv : FreeLetter ≃ FreeLetter where + toFun := inverseLetter + invFun := inverseLetter + left_inv := inverseLetter_inverseLetter + right_inv := inverseLetter_inverseLetter + +lemma freeTreeWeight_inverse_sum_le (g : FreeTwo) : + ∑ s : FreeLetter, freeTreeWeight ((freeLetter s)⁻¹ * g) / freeTreeWeight g ≤ + 2 * Real.sqrt 3 := by + have he := inverseLetterEquiv.sum_comp + (fun s => freeTreeWeight (freeLetter s * g) / freeTreeWeight g) + simp only [inverseLetterEquiv, Equiv.coe_fn_mk, freeLetter_inverseLetter] at he + rw [he] + exact freeTreeWeight_sum_le g + +def freeTreeAdjacency : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo := + ∑ s : FreeLetter, (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo) + +theorem norm_freeTreeAdjacency_le : ‖freeTreeAdjacency‖ ≤ 2 * Real.sqrt 3 := by + have h := norm_permutationSum_le freeTreeWeight freeTreeWeight_pos + (fun s : FreeLetter => Equiv.mulLeft (freeLetter s)) (2 * Real.sqrt 3) + (by positivity) + (by simpa using freeTreeWeight_inverse_sum_le) + (by simpa using freeTreeWeight_sum_le) + exact h + +theorem norm_freeTreeAdjacency_lt_four : ‖freeTreeAdjacency‖ < 4 := + norm_freeTreeAdjacency_le.trans_lt freeTree_norm_gap + +end WeakPureInfiniteness +end +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FreeTwistedNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/FreeTwistedNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..e993a2b8ec8c4bec69cd9850bdceeb6120a88f9a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FreeTwistedNorm.lean @@ -0,0 +1,135 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FellAbsorption + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +abbrev FreeTwo := FreeGroup Bool + +abbrev FreeLetter := Bool × Bool + +def freeLetter (s : FreeLetter) : FreeTwo := + if s.2 then FreeGroup.of s.1 else (FreeGroup.of s.1)⁻¹ + +def inverseLetter (s : FreeLetter) : FreeLetter := (s.1, !s.2) + +@[simp] +lemma freeLetter_inverseLetter (s : FreeLetter) : + freeLetter (inverseLetter s) = (freeLetter s)⁻¹ := by + rcases s with ⟨a, b⟩ + cases b <;> simp [freeLetter, inverseLetter] + +@[simp] +lemma inverseLetter_inverseLetter (s : FreeLetter) : + inverseLetter (inverseLetter s) = s := by + rcases s with ⟨a,b⟩ + cases b <;> rfl + +@[simp] +lemma toWord_freeLetter (s : FreeLetter) : (freeLetter s).toWord = [s] := by + rcases s with ⟨a,b⟩ + cases b <;> simp [freeLetter, FreeGroup.toWord_inv, FreeGroup.invRev] + +lemma toWord_freeLetter_mul (s : FreeLetter) (g : FreeTwo) : + (freeLetter s * g).toWord = + match g.toWord with + | [] => [s] + | t :: l => if s = inverseLetter t then l else s :: t :: l := by + rw [FreeGroup.toWord_mul, toWord_freeLetter] + simp only [List.singleton_append, FreeGroup.reduce.cons, FreeGroup.reduce_toWord] + cases h : g.toWord with + | nil => rfl + | cons t l => + simp only [inverseLetter, Prod.ext_iff] + +def freeTreeWeight (g : FreeTwo) : ℝ := (Real.sqrt 3) ^ (- (g.toWord.length : ℤ)) + +lemma freeTreeWeight_pos (g : FreeTwo) : 0 < freeTreeWeight g := by + exact zpow_pos (Real.sqrt_pos.mpr (by norm_num)) _ + +lemma freeTreeWeight_one : freeTreeWeight 1 = 1 := by + simp [freeTreeWeight] + +lemma freeTreeWeight_step_nil (s : FreeLetter) {g : FreeTwo} (h : g.toWord = []) : + freeTreeWeight (freeLetter s * g) / freeTreeWeight g = (Real.sqrt 3)⁻¹ := by + simp [freeTreeWeight, toWord_freeLetter_mul, h] + +lemma freeTreeWeight_step_cons (s t : FreeLetter) (l : List FreeLetter) + {g : FreeTwo} (h : g.toWord = t :: l) : + freeTreeWeight (freeLetter s * g) / freeTreeWeight g = + if s = inverseLetter t then Real.sqrt 3 else (Real.sqrt 3)⁻¹ := by + have hs : Real.sqrt 3 ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by norm_num)) + rw [freeTreeWeight, toWord_freeLetter_mul, h] + unfold freeTreeWeight + rw [h] + by_cases he : s = inverseLetter t + · simp only [ite_eq_left he, List.length_cons, Nat.cast_add, Nat.cast_one] + rw [← zpow_sub₀ hs] + convert zpow_one (Real.sqrt 3) using 1 + congr 1 + omega + · simp only [ite_eq_right he, List.length_cons, Nat.cast_add, Nat.cast_one] + rw [← zpow_sub₀ hs] + convert zpow_neg_one (Real.sqrt 3) using 1 + congr 1 + omega + +theorem freeTreeWeight_sum_le (g : FreeTwo) : + ∑ s : FreeLetter, freeTreeWeight (freeLetter s * g) / freeTreeWeight g ≤ + 2 * Real.sqrt 3 := by + have hs0 : 0 < Real.sqrt 3 := Real.sqrt_pos.mpr (by norm_num) + have hs2 : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + cases h : g.toWord with + | nil => + simp_rw [freeTreeWeight_step_nil _ h] + norm_num + have hi : Real.sqrt 3 * (Real.sqrt 3)⁻¹ = 1 := mul_inv_cancel₀ hs0.ne' + nlinarith + | cons t l => + simp_rw [freeTreeWeight_step_cons _ t l h] + have hsum : (∑ s : FreeLetter, if s = inverseLetter t then Real.sqrt 3 + else (Real.sqrt 3)⁻¹) = Real.sqrt 3 + 3 * (Real.sqrt 3)⁻¹ := by + rcases t with ⟨a,b⟩ + cases a <;> cases b <;> norm_num [Fintype.sum_prod_type, inverseLetter] <;> ring + rw [hsum] + have hi : Real.sqrt 3 * (Real.sqrt 3)⁻¹ = 1 := mul_inv_cancel₀ hs0.ne' + nlinarith + +lemma freeTree_norm_gap : 2 * Real.sqrt 3 < 4 := by + have hs : Real.sqrt 3 ^ 2 = 3 := Real.sq_sqrt (by norm_num) + have hp := Real.sqrt_nonneg (3 : ℝ) + nlinarith + +theorem norm_freeTwisted_sum_le {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (π : FreeTwo →* H ≃ₗᵢ[ℂ] H) : + ‖∑ s : FreeLetter, HilbertValued.twistedRegular π (freeLetter s)‖ ≤ + 2 * Real.sqrt 3 := by + rw [HilbertValued.norm_twistedRegular_sum freeLetter Finset.univ π] + apply HilbertValued.norm_permutationSum_le freeTreeWeight freeTreeWeight_pos + (fun s : FreeLetter => Equiv.mulLeft (freeLetter s)) (2 * Real.sqrt 3) + (by positivity) + · intro g + let e : FreeLetter ≃ FreeLetter := + ⟨inverseLetter, inverseLetter, inverseLetter_inverseLetter, inverseLetter_inverseLetter⟩ + have he := e.sum_comp (fun s => freeTreeWeight (freeLetter s * g) / freeTreeWeight g) + simp only [e, Equiv.coe_fn_mk, freeLetter_inverseLetter] at he + change (∑ s : FreeLetter, freeTreeWeight ((freeLetter s)⁻¹ * g) / freeTreeWeight g) ≤ _ + rw [he] + exact freeTreeWeight_sum_le g + · exact freeTreeWeight_sum_le + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FullGroupAlgebra.lean b/lean/OAI/Analysis/WeakInfiniteness/FullGroupAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae5ef759f1e8a420dec44442c068e55c626789b0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FullGroupAlgebra.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +universe u + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +noncomputable def closedStarSpan {B : Type*} [CStarAlgebra B] (s : Set B) : + StarSubalgebra ℂ B := (StarAlgebra.adjoin ℂ s).topologicalClosure + +lemma closedStarSpan_closed {B : Type*} [CStarAlgebra B] (s : Set B) : + IsClosed (closedStarSpan s : Set B) := isClosed_closure + +lemma subset_closedStarSpan {B : Type*} [CStarAlgebra B] (s : Set B) : + s ⊆ closedStarSpan s := fun _ hx => + StarSubalgebra.le_topologicalClosure _ (StarAlgebra.subset_adjoin ℂ s hx) + +lemma closedStarSpan_le {B : Type*} [CStarAlgebra B] (s : Set B) + (S : StarSubalgebra ℂ B) (hS : IsClosed (S : Set B)) (hs : s ⊆ S) : + closedStarSpan s ≤ S := + StarSubalgebra.topologicalClosure_minimal + (StarAlgebra.adjoin_le hs) hS + +@[instance_reducible] +noncomputable def closedStarSpanCStar {B : Type*} [CStarAlgebra B] (s : Set B) : + CStarAlgebra (closedStarSpan s) := by + letI := closedStarSpan_closed s + infer_instance + +structure GroupRepresentation (G : Type u) [Group G] where + hilbert : ComplexHilbert.{u} + [nontrivial : Nontrivial hilbert] + group : G →* unitary (hilbert →L[ℂ] hilbert) + +attribute [instance] GroupRepresentation.nontrivial + +def FullGroupAmbient (G : Type u) [Group G] : Type (u + 1) := + lp (fun π : GroupRepresentation G => π.hilbert →L[ℂ] π.hilbert) ∞ + +instance (G : Type u) [Group G] : CStarAlgebra (FullGroupAmbient G) := by + unfold FullGroupAmbient + exact { } + +instance (G : Type u) [Group G] : CoeFun (FullGroupAmbient G) + (fun _ => ∀ π : GroupRepresentation G, π.hilbert →L[ℂ] π.hilbert) := ⟨fun x => x.val⟩ + +variable {G : Type u} [Group G] + +def fullGroupOperator (g : G) : FullGroupAmbient G := + ⟨fun π => π.group g, memℓp_infty ⟨1, by + rintro _ ⟨π, rfl⟩ + exact le_of_eq (CStarRing.norm_coe_unitary (π.group g))⟩⟩ + +lemma fullGroupOperator_one : fullGroupOperator (1 : G) = 1 := by + apply Subtype.ext + funext π + change (π.group 1 : π.hilbert →L[ℂ] π.hilbert) = 1 + simp + +lemma fullGroupOperator_mul (g h : G) : + fullGroupOperator (g * h) = fullGroupOperator g * fullGroupOperator h := by + apply Subtype.ext + funext π + change (π.group (g * h) : π.hilbert →L[ℂ] π.hilbert) = (π.group g : _) * π.group h + simp + +lemma fullGroupOperator_inv (g : G) : fullGroupOperator g⁻¹ = star (fullGroupOperator g) := by + apply Subtype.ext + funext π + change (π.group g⁻¹ : π.hilbert →L[ℂ] π.hilbert) = star (π.group g : _) + rw [map_inv] + rfl + +def fullGroupSubalgebra (G : Type u) [Group G] : StarSubalgebra ℂ (FullGroupAmbient G) := + closedStarSpan (Set.range (fullGroupOperator (G := G))) + +def FullGroupAlgebra (G : Type u) [Group G] : Type (u + 1) := fullGroupSubalgebra G + +instance : CStarAlgebra (FullGroupAlgebra G) := closedStarSpanCStar _ + +def fullGroupElement (g : G) : FullGroupAlgebra G := + ⟨fullGroupOperator g, subset_closedStarSpan _ ⟨g, rfl⟩⟩ + +@[simp] +lemma fullGroupElement_one : fullGroupElement (1 : G) = 1 := + Subtype.ext fullGroupOperator_one + +@[simp] +lemma fullGroupElement_mul (g h : G) : + fullGroupElement (g * h) = fullGroupElement g * fullGroupElement h := + Subtype.ext (fullGroupOperator_mul g h) + +@[simp] +lemma fullGroupElement_inv (g : G) : fullGroupElement g⁻¹ = star (fullGroupElement g) := + Subtype.ext (fullGroupOperator_inv g) + +lemma fullGroupElement_unitary (g : G) : fullGroupElement g ∈ unitary (FullGroupAlgebra G) := by + constructor + · rw [← fullGroupElement_inv, ← fullGroupElement_mul, inv_mul_cancel, fullGroupElement_one] + · rw [← fullGroupElement_inv, ← fullGroupElement_mul, mul_inv_cancel, fullGroupElement_one] + +def fullGroupUnitary : G →* unitary (FullGroupAlgebra G) where + toFun g := ⟨fullGroupElement g, fullGroupElement_unitary g⟩ + map_one' := Subtype.ext fullGroupElement_one + map_mul' g h := Subtype.ext (fullGroupElement_mul g h) + +def fullGroupEvaluation (π : GroupRepresentation G) : + FullGroupAlgebra G →⋆ₐ[ℂ] (π.hilbert →L[ℂ] π.hilbert) where + toFun x := x.val π + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +@[simp] +lemma fullGroupEvaluation_element (π : GroupRepresentation G) (g : G) : + fullGroupEvaluation π (fullGroupElement g) = π.group g := rfl + +lemma norm_fullGroup_le_iff (x : FullGroupAlgebra G) {c : ℝ} (hc : 0 ≤ c) : + ‖x‖ ≤ c ↔ ∀ π : GroupRepresentation G, ‖fullGroupEvaluation π x‖ ≤ c := by + constructor + · exact fun h π => + (NonUnitalStarAlgHom.norm_apply_le (fullGroupEvaluation π).toNonUnitalStarAlgHom x).trans h + · intro h + change ‖(x.val : FullGroupAmbient G)‖ ≤ c + exact lp.norm_le_of_forall_le hc h + +lemma fullGroupEvaluation_separates (x y : FullGroupAlgebra G) + (h : ∀ π : GroupRepresentation G, fullGroupEvaluation π x = fullGroupEvaluation π y) : x = y := by + apply Subtype.ext + apply Subtype.ext + funext π + exact h π + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/FullGroupDensity.lean b/lean/OAI/Analysis/WeakInfiniteness/FullGroupDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..7310d82a1bf20918526d9ddbc32ba23a2b3c8377 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/FullGroupDensity.lean @@ -0,0 +1,73 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +universe u + +section GroupPolynomialDensity + +variable {G : Type u} [Group G] + +def groupSpan : StarSubalgebra ℂ (FullGroupAmbient G) where + carrier := Submodule.span ℂ (Set.range (fullGroupOperator (G := G))) + zero_mem' := Submodule.zero_mem _ + add_mem' := Submodule.add_mem _ + algebraMap_mem' c := by + rw [Algebra.algebraMap_eq_smul_one, ← fullGroupOperator_one] + exact Submodule.smul_mem _ c (Submodule.subset_span (Set.mem_range_self 1)) + mul_mem' {a} {b} hx hy := by + change a * b ∈ Submodule.span ℂ (Set.range (fullGroupOperator (G := G))) + induction hx using Submodule.span_induction with + | mem x hx => + obtain ⟨g, rfl⟩ := hx + induction hy using Submodule.span_induction with + | mem y hy => + obtain ⟨h, rfl⟩ := hy + rw [← fullGroupOperator_mul] + exact Submodule.subset_span (Set.mem_range_self (g*h)) + | zero => simp + | add x y hx hy hpx hpy => rw [mul_add]; exact Submodule.add_mem _ hpx hpy + | smul c x hx hpx => rw [mul_smul_comm]; exact Submodule.smul_mem _ c hpx + | zero => simp + | add x y hx hy hpx hpy => rw [add_mul]; exact Submodule.add_mem _ hpx hpy + | smul c x hx hpx => rw [smul_mul_assoc]; exact Submodule.smul_mem _ c hpx + star_mem' {a} hx := by + change star a ∈ Submodule.span ℂ (Set.range (fullGroupOperator (G := G))) + induction hx using Submodule.span_induction with + | mem x hx => + obtain ⟨g,rfl⟩ := hx + rw [← fullGroupOperator_inv] + exact Submodule.subset_span (Set.mem_range_self g⁻¹) + | zero => simp + | add x y hx hy hpx hpy => rw [star_add]; exact Submodule.add_mem _ hpx hpy + | smul c x hx hpx => rw [star_smul]; exact Submodule.smul_mem _ (star c) hpx + +lemma groupSpan_eq_adjoin : groupSpan (G := G) = + StarAlgebra.adjoin ℂ (Set.range (fullGroupOperator (G := G))) := by + apply le_antisymm + · change Submodule.span ℂ (Set.range (fullGroupOperator (G := G))) ≤ + (StarAlgebra.adjoin ℂ (Set.range (fullGroupOperator (G := G)))).toSubalgebra.toSubmodule + exact Submodule.span_le.mpr (StarAlgebra.subset_adjoin ℂ _) + · exact StarAlgebra.adjoin_le (fun _ hx => Submodule.subset_span hx) + +lemma fullGroupSubalgebra_eq_closure_span : + (fullGroupSubalgebra G : Set (FullGroupAmbient G)) = + closure (Submodule.span ℂ (Set.range (fullGroupOperator (G := G))) : Set (FullGroupAmbient G)) := by + rw [fullGroupSubalgebra, closedStarSpan, ← groupSpan_eq_adjoin] + rfl + +end GroupPolynomialDensity + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/GroupPolynomials.lean b/lean/OAI/Analysis/WeakInfiniteness/GroupPolynomials.lean new file mode 100644 index 0000000000000000000000000000000000000000..da90bcc4034464a5949671e9c260c636a2de14b0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/GroupPolynomials.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FullGroupDensity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +variable {G : Type*} [Group G] + +def fullGroupAmbientInclusion : FullGroupAlgebra G →⋆ₐ[ℂ] FullGroupAmbient G where + toFun x := x.val + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +def fullGroupPolynomial : (G →₀ ℂ) →ₗ[ℂ] FullGroupAlgebra G := + Finsupp.linearCombination ℂ fullGroupElement + +lemma fullGroupPolynomial_val (c : G →₀ ℂ) : + (fullGroupPolynomial c).val = c.sum (fun g z => z • fullGroupOperator g) := by + simp only [fullGroupPolynomial, Finsupp.linearCombination_apply, Finsupp.sum] + change (fullGroupAmbientInclusion (G := G)) (∑ g ∈ c.support, c g • fullGroupElement g) = _ + simp only [map_sum, map_smul] + rfl + +lemma fullGroupPolynomial_dense : DenseRange (fullGroupPolynomial (G := G)) := by + rw [Metric.denseRange_iff] + intro x ε hε + have hx : x.val ∈ (fullGroupSubalgebra G : Set (FullGroupAmbient G)) := x.property + rw [fullGroupSubalgebra_eq_closure_span] at hx + obtain ⟨y, hy, hdist⟩ := Metric.mem_closure_iff.mp hx ε hε + obtain ⟨c, rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hy + refine ⟨c, ?_⟩ + rw [dist_eq_norm] + change ‖x.val - (fullGroupPolynomial c).val‖ < ε + rw [fullGroupPolynomial_val] + simpa only [dist_eq_norm] using hdist + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/GroupRegular.lean b/lean/OAI/Analysis/WeakInfiniteness/GroupRegular.lean new file mode 100644 index 0000000000000000000000000000000000000000..38cfa7e1afd12573f6b7cb1c96e6319795bad33a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/GroupRegular.lean @@ -0,0 +1,126 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace + +namespace WeakPureInfiniteness + +abbrev GroupHilbert (G : Type*) : Type _ := lp (fun _ : G => ℂ) 2 + +variable {G K : Type*} + +lemma mem_l2_reindex (e : G ≃ K) (ξ : GroupHilbert K) : + Memℓp (fun g => ξ (e g)) 2 := by + apply (memℓp_gen_iff (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)).mpr + have hs : Summable (fun k => ‖ξ k‖ ^ (2 : ℝ≥0∞).toReal) := + Memℓp.summable (by norm_num) ξ.property + exact e.summable_iff.mpr hs + +def l2Reindex (e : G ≃ K) : GroupHilbert G ≃ₗᵢ[ℂ] GroupHilbert K where + toFun ξ := ⟨fun k => ξ (e.symm k), mem_l2_reindex e.symm ξ⟩ + invFun ξ := ⟨fun g => ξ (e g), mem_l2_reindex e ξ⟩ + left_inv ξ := by ext g; simp + right_inv ξ := by ext k; simp + map_add' _ _ := rfl + map_smul' _ _ := rfl + norm_map' ξ := by + rw [lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal), + lp.norm_eq_tsum_rpow (by norm_num : (0 : ℝ) < (2 : ℝ≥0∞).toReal)] + congr 1 + exact e.symm.tsum_eq (fun g => ‖ξ g‖ ^ (2 : ℝ≥0∞).toReal) + +@[simp] +lemma l2Reindex_apply (e : G ≃ K) (ξ : GroupHilbert G) (k : K) : + l2Reindex e ξ k = ξ (e.symm k) := rfl + +lemma l2Reindex_single [DecidableEq G] [DecidableEq K] (e : G ≃ K) (g : G) (c : ℂ) : + l2Reindex e (lp.single 2 g c) = lp.single 2 (e g) c := by + classical + ext k + simp only [l2Reindex_apply, lp.single_apply, Pi.single_apply] + have he : e.symm k = g ↔ k = e g := e.symm_apply_eq + simp only [he] + +variable [Group G] + +def leftRegularIsometry : G →* (GroupHilbert G ≃ₗᵢ[ℂ] GroupHilbert G) where + toFun s := l2Reindex (Equiv.mulLeft s) + map_one' := by + ext ξ g + change ξ ((1 : G)⁻¹ * g) = ξ g + simp + map_mul' s t := by + ext ξ g + change ξ ((s * t)⁻¹ * g) = ξ (t⁻¹ * (s⁻¹ * g)) + simp [mul_assoc] + +def rightRegularIsometry : G →* (GroupHilbert G ≃ₗᵢ[ℂ] GroupHilbert G) where + toFun s := l2Reindex (Equiv.mulRight s⁻¹) + map_one' := by + ext ξ g + change ξ (g * ((1 : G)⁻¹)⁻¹) = ξ g + simp + map_mul' s t := by + ext ξ g + change ξ (g * ((s * t)⁻¹)⁻¹) = ξ ((g * (s⁻¹)⁻¹) * (t⁻¹)⁻¹) + simp [mul_assoc] + +def leftRegular : G →* unitary (GroupHilbert G →L[ℂ] GroupHilbert G) := + Unitary.linearIsometryEquiv.symm.toMonoidHom.comp leftRegularIsometry + +def rightRegular : G →* unitary (GroupHilbert G →L[ℂ] GroupHilbert G) := + Unitary.linearIsometryEquiv.symm.toMonoidHom.comp rightRegularIsometry + +@[simp] +lemma leftRegular_apply (s g : G) (ξ : GroupHilbert G) : + (leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) ξ g = ξ (s⁻¹ * g) := rfl + +@[simp] +lemma rightRegular_apply (s g : G) (ξ : GroupHilbert G) : + (rightRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) ξ g = ξ (g * s) := by + change ξ (g * (s⁻¹)⁻¹) = _ + rw [inv_inv] + +lemma leftRegular_single [DecidableEq G] (s g : G) (c : ℂ) : + (leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) (lp.single 2 g c) = + lp.single 2 (s * g) c := l2Reindex_single (Equiv.mulLeft s) g c + +lemma rightRegular_single [DecidableEq G] (s g : G) (c : ℂ) : + (rightRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) (lp.single 2 g c) = + lp.single 2 (g * s⁻¹) c := l2Reindex_single (Equiv.mulRight s⁻¹) g c + +lemma leftRegular_commute_right (s t : G) : + Commute (leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) + (rightRegular t : GroupHilbert G →L[ℂ] GroupHilbert G) := by + ext ξ g + simp [mul_assoc] + +def groupInversion : GroupHilbert G ≃ₗᵢ[ℂ] GroupHilbert G := l2Reindex (Equiv.inv G) + +lemma groupInversion_intertwines (s : G) (ξ : GroupHilbert G) : + groupInversion ((leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) ξ) = + (rightRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) (groupInversion ξ) := by + ext g + simp [groupInversion] + +lemma inner_leftRight_regular_base [DecidableEq G] (s t : G) : + inner ℂ (lp.single (E := fun _ : G => ℂ) 2 1 1) + (((leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) * rightRegular t) + (lp.single 2 1 1)) = if s = t then 1 else 0 := by + classical + rw [mul_apply_eq_comp, rightRegular_single, leftRegular_single] + simp only [one_mul, lp.inner_single_left, RCLike.inner_apply, + map_one, one_mul, lp.single_apply] + simp [Pi.single_apply, eq_comm, mul_inv_eq_one] + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/HalfFlipCriterion.lean b/lean/OAI/Analysis/WeakInfiniteness/HalfFlipCriterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..facb963e0aa56e892c05bf19a13fe8da0ce20ad2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/HalfFlipCriterion.lean @@ -0,0 +1,131 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralCopiesTensor +import OAI.Analysis.WeakInfiniteness.InnerNorm +import OAI.Analysis.WeakInfiniteness.MapInner + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +variable (D : Type v) [CStarAlgebra D] + +def ApproximateHalfFlip : Prop := + ∀ (K : Finset D) (ε : ℝ),0<ε → + ∃ u : unitary (Unitization ℂ (MinimalTensor D D)),∀ d ∈ K, + ‖unitizationInnerFun u (minimalElementary d 1)-minimalElementary 1 d‖<ε + +variable {A : Type u} {D} [CStarAlgebra A] + +lemma mapUnitary_snd (φ : MinimalTensor D D →⋆ₙₐ[ℂ] MinimalTensor A D) + (u : unitary (Unitization ℂ (MinimalTensor D D))) : + (mapUnitary φ u).val.snd=φ u.val.snd := by + simp [mapUnitary,Unitization.starMap_apply,Unitization.algebraMap_eq_inl] + +lemma elementaryUnitaryIntertwining_of_centralCopies_halfFlip + (hcentral : ApproximatelyCentralCopies A D) (hflip : ApproximateHalfFlip D) : + ElementaryUnitaryIntertwining A D := by + classical + intro E T ε hε + let M : ℝ := 1+∑ p ∈ T,(‖p.1‖+‖p.2‖) + have hM : 0 ‖q.1‖+‖q.2‖) + (fun _ _ => add_nonneg (norm_nonneg _) (norm_nonneg _)) hp + have h1 := norm_nonneg p.1 + have h2 := norm_nonneg p.2 + dsimp only [M] + constructor <;> linarith + let δ := ε/(4*(1+M)) + have hδ : 0<δ := by dsimp only [δ]; positivity + have hδε : δ<ε := by + dsimp only [δ] + apply (div_lt_iff₀ (by positivity : 0<4*(1+M))).mpr + nlinarith + have hMδ : 2*M*δ<ε := by + have he : 4*(1+M)*δ=ε := by dsimp only [δ]; field_simp + nlinarith + obtain ⟨u,hu⟩ := hflip (T.image Prod.snd) δ hδ + obtain ⟨θ,hθ⟩ := hcentral.tensor_commutator (E ∪ T.image Prod.fst) u.val.snd δ hδ + let Φ := tensorCopyMap θ + let v := mapUnitary Φ u + have hfix (a : A) (ha : a ∈ E ∪ T.image Prod.fst) : + ‖unitizationInnerFun v (minimalLeftEmbedding A D a)-minimalLeftEmbedding A D a‖<δ := by + rw [norm_unitizationInnerFun_sub] + dsimp only [v] + rw [mapUnitary_snd] + exact hθ a ha + have hmove (d : D) (hd : d ∈ T.image Prod.snd) : + ‖unitizationInnerFun v (minimalLeftEmbedding A D (θ d))-minimalElementary (1:A) d‖<δ := by + have he : unitizationInnerFun v (minimalLeftEmbedding A D (θ d))- + minimalElementary (1:A) d = + Φ (unitizationInnerFun u (minimalElementary d 1)-minimalElementary (1:D) d) := by + rw [map_sub,map_unitizationInnerFun] + dsimp only [Φ,v,tensorCopyMap] + simp only [minimalMapAny_elementary,StarAlgHom.coe_toNonUnitalStarAlgHom, + NonUnitalStarAlgHom.coe_id,id_eq,map_one] + rfl + rw [he] + exact (NonUnitalStarAlgHom.norm_apply_le _ _).trans_lt (hu d hd) + refine ⟨v,?_,?_⟩ + · intro a ha + rw [dist_eq_norm] + exact (hfix a (Finset.mem_union_left _ ha)).trans hδε + · rintro ⟨a,d⟩ hp + refine ⟨a*θ d,?_⟩ + rw [dist_eq_norm] + let x := minimalLeftEmbedding A D a + let y := minimalLeftEmbedding A D (θ d) + let z := minimalElementary (1:A) d + have he : unitizationInnerFun v (minimalLeftEmbedding A D (a*θ d))-minimalElementary a d= + (unitizationInnerFun v x-x)*unitizationInnerFun v y+ + x*(unitizationInnerFun v y-z) := by + change unitizationInnerHom v (minimalLeftEmbedding A D (a*θ d))-_=_ + rw [map_mul,map_mul] + have hxz : x*z=minimalElementary a d := by + change minimalElementary a 1*minimalElementary 1 d=_ + rw [← minimalElementary_mul,mul_one,one_mul] + rw [← hxz] + change unitizationInnerHom v x*unitizationInnerHom v y-x*z=_ + change unitizationInnerFun v x*unitizationInnerFun v y-x*z=_ + noncomm_ring + rw [he] + have ha := hfix a (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨(a,d),hp,rfl⟩)) + have hd := hmove d (Finset.mem_image.mpr ⟨(a,d),hp,rfl⟩) + have hn := hnorm (a,d) hp + have hx : ‖x‖≤M := (NonUnitalStarAlgHom.norm_apply_le _ _).trans hn.1 + have hy : ‖unitizationInnerFun v y‖≤M := by + exact (NonUnitalStarAlgHom.norm_apply_le (unitizationInnerHom v) y).trans + ((NonUnitalStarAlgHom.norm_apply_le (minimalLeftEmbedding A D) (θ d)).trans + ((NonUnitalStarAlgHom.norm_apply_le θ.toNonUnitalStarAlgHom d).trans hn.2)) + calc + _ ≤ ‖(unitizationInnerFun v x-x)*unitizationInnerFun v y‖+ + ‖x*(unitizationInnerFun v y-z)‖ := norm_add_le _ _ + _ ≤ ‖unitizationInnerFun v x-x‖*‖unitizationInnerFun v y‖+ + ‖x‖*‖unitizationInnerFun v y-z‖ := by gcongr <;> exact norm_mul_le _ _ + _ ≤ δ*M+M*δ := by gcongr + _ = 2*M*δ := by ring + _ < ε := hMδ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/HalfFlipGenerators.lean b/lean/OAI/Analysis/WeakInfiniteness/HalfFlipGenerators.lean new file mode 100644 index 0000000000000000000000000000000000000000..dac3de1682278f68e321e18d295cda74f657cc91 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/HalfFlipGenerators.lean @@ -0,0 +1,201 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CentralOInfinityCopies +import OAI.Analysis.WeakInfiniteness.HalfFlipCriterion +import OAI.Analysis.WeakInfiniteness.TensorFlipEquivalence + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +section WordEstimates + +variable {D : Type u} {B : Type v} [CStarAlgebra D] [NonUnitalCStarAlgebra B] + +lemma norm_starHom_cuntzWord_sub_le (φ ψ : D →⋆ₙₐ[ℂ] B) + (s : ℕ → D) (hs : ∀ i,‖s i‖≤1) (w : List (ℕ × Bool)) + (δ : ℝ) (hδ : 0≤δ) (h1 : ‖φ 1-ψ 1‖≤δ) + (hgen : ∀ ib∈w,‖φ (s ib.1)-ψ (s ib.1)‖≤δ) : + ‖φ (cuntzWord s w)-ψ (cuntzWord s w)‖≤((w.length:ℝ)+1)*δ := by + induction w with + | nil => simpa [cuntzWord] using h1 + | cons ib w ih => + rcases ib with ⟨i,b⟩ + let x : D := if b then s i else star (s i) + have hx : ‖x‖≤1 := by dsimp only [x]; cases b <;> simpa only [Bool.false_eq_true,↓reduceIte,norm_star] using hs i + have hxφ : ‖φ x‖≤1 := (NonUnitalStarAlgHom.norm_apply_le _ _).trans hx + have hwψ : ‖ψ (cuntzWord s w)‖≤1 := + (NonUnitalStarAlgHom.norm_apply_le _ _).trans (norm_cuntzWord_le_one s hs w) + have hxd : ‖φ x-ψ x‖≤δ := by + have hh := hgen (i,b) (by simp) + dsimp only [x] + cases b + · simpa only [Bool.false_eq_true,↓reduceIte,map_star,← star_sub,norm_star] using hh + · simpa using hh + have hi := ih (fun p hp => hgen p (List.mem_cons_of_mem _ hp)) + change ‖φ (x*cuntzWord s w)-ψ (x*cuntzWord s w)‖≤_ + have he : φ (x*cuntzWord s w)-ψ (x*cuntzWord s w)= + φ x*(φ (cuntzWord s w)-ψ (cuntzWord s w))+(φ x-ψ x)*ψ (cuntzWord s w) := by + rw [map_mul,map_mul] + noncomm_ring + rw [he] + calc + _ ≤ ‖φ x*(φ (cuntzWord s w)-ψ (cuntzWord s w))‖+ + ‖(φ x-ψ x)*ψ (cuntzWord s w)‖ := norm_add_le _ _ + _ ≤ ‖φ x‖*‖φ (cuntzWord s w)-ψ (cuntzWord s w)‖+ + ‖φ x-ψ x‖*‖ψ (cuntzWord s w)‖ := add_le_add (norm_mul_le _ _) (norm_mul_le _ _) + _ ≤ 1*(((w.length:ℝ)+1)*δ)+δ*1 := add_le_add + (mul_le_mul hxφ hi (norm_nonneg _) zero_le_one) + (mul_le_mul hxd hwψ (norm_nonneg _) hδ) + _ = _ := by simp only [List.length_cons,Nat.cast_add,Nat.cast_one]; ring + +def cuntzPolynomialHomWeight (c : List (ℕ × Bool) →₀ ℂ) : ℝ := + ∑ w∈c.support,‖c w‖*((w.length:ℝ)+1) + +lemma cuntzPolynomialHomWeight_nonneg (c : List (ℕ × Bool) →₀ ℂ) : + 0≤cuntzPolynomialHomWeight c := by + unfold cuntzPolynomialHomWeight + positivity + +lemma norm_starHom_cuntzPolynomial_sub_le (φ ψ : D →⋆ₙₐ[ℂ] B) + (s : ℕ → D) (hs : ∀ i,‖s i‖≤1) (c : List (ℕ × Bool) →₀ ℂ) + (δ : ℝ) (hδ : 0≤δ) (h1 : ‖φ 1-ψ 1‖≤δ) + (hgen : ∀ w∈c.support,∀ ib∈w,‖φ (s ib.1)-ψ (s ib.1)‖≤δ) : + ‖φ (cuntzPolynomial s c)-ψ (cuntzPolynomial s c)‖≤cuntzPolynomialHomWeight c*δ := by + have he : φ (cuntzPolynomial s c)-ψ (cuntzPolynomial s c)= + ∑ w∈c.support,c w • (φ (cuntzWord s w)-ψ (cuntzWord s w)) := by + simp only [cuntzPolynomial,Finsupp.sum,map_sum,map_smul,← Finset.sum_sub_distrib,smul_sub] + rw [he] + calc + _ ≤ ∑ w∈c.support,‖c w • (φ (cuntzWord s w)-ψ (cuntzWord s w))‖ := norm_sum_le _ _ + _ ≤ ∑ w∈c.support,‖c w‖*(((w.length:ℝ)+1)*δ) := by + apply Finset.sum_le_sum + intro w hw + rw [norm_smul] + exact mul_le_mul_of_nonneg_left (norm_starHom_cuntzWord_sub_le φ ψ s hs w δ hδ h1 (hgen w hw)) + (norm_nonneg _) + _ = _ := by simp only [cuntzPolynomialHomWeight,Finset.sum_mul]; congr 1; ext w; ring + +end WordEstimates + +variable (D : Type u) [CStarAlgebra D] + +def GeneratorHalfFlip (s : ℕ → D) : Prop := + ∀ (N : ℕ) (ε : ℝ),0<ε → + ∃ u : unitary (Unitization ℂ (MinimalTensor D D)), + ‖unitizationInnerFun u (minimalElementary (1:D) (1:D))- + minimalElementary (1:D) (1:D)‖<ε ∧ + ∀ i cuntzPolynomialHomWeight_nonneg (c d)) + dsimp only [C] + linarith + have hdC (d : D) (hd : d∈K) : cuntzPolynomialHomWeight (c d)≤C := by + have hb := Finset.single_le_sum (f := fun d => cuntzPolynomialHomWeight (c d)) + (fun _ _ => cuntzPolynomialHomWeight_nonneg _) hd + dsimp only [C] + linarith + let L := K.biUnion (fun d => (c d).support.biUnion (fun w => w.toFinset.image Prod.fst)) + let N := L.sup id+1 + have hN (d : D) (hd : d∈K) (w : List (ℕ × Bool)) (hw : w∈(c d).support) + (ib : ℕ × Bool) (hib : ib∈w) : ib.1 norm_isometry_le_one + (by rw [oInfinityIsometry_relations,ite_eq_left rfl])) + oInfinityPolynomial_denseRange h + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/Hereditary.lean b/lean/OAI/Analysis/WeakInfiniteness/Hereditary.lean new file mode 100644 index 0000000000000000000000000000000000000000..72aedf037992efec7b8ff354e4e14c5f3c1b5bfc --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/Hereditary.lean @@ -0,0 +1,372 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology + +open Filter + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def principalRightIdeal (a : A) : Submodule ℂ A := + (LinearMap.range (LinearMap.mulLeft ℂ a)).topologicalClosure + +instance (a : A) : IsClosed (principalRightIdeal a : Set A) := + Submodule.isClosed_topologicalClosure _ + +instance (a : A) : CompleteSpace (principalRightIdeal a) := + (Submodule.isClosed_topologicalClosure _).isComplete.completeSpace_coe + +def principalRightMap (a : A) : A →ₗ[ℂ] principalRightIdeal a := + (LinearMap.mulLeft ℂ a).codRestrict _ (fun b => + Submodule.le_topologicalClosure _ (LinearMap.mem_range_self _ b)) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma principalRightMap_dense (a : A) : DenseRange (principalRightMap a) := by + have h : DenseRange (Set.inclusion (show Set.range (fun b : A => a*b) ⊆ + closure (Set.range (fun b : A => a*b)) from subset_closure) ∘ + Set.rangeFactorization (fun b : A => a*b)) := + ((denseRange_inclusion_iff subset_closure).2 subset_rfl).comp + Set.rangeFactorization_surjective.denseRange (continuous_inclusion subset_closure) + exact h + +lemma norm_mul_abs (x b : A) : ‖CFC.abs x * b‖ = ‖x * b‖ := by + have heq : star (CFC.abs x * b) * (CFC.abs x * b) = star (x*b) * (x*b) := by + rw [star_mul, (CFC.abs_nonneg x).star_eq, star_mul] + calc + star b * CFC.abs x * (CFC.abs x * b) = + star b * (CFC.abs x * CFC.abs x) * b := by noncomm_ring + _ = star b * (star x * x) * b := by rw [CFC.abs_mul_abs] + _ = star b * star x * (x*b) := by noncomm_ring + have hn := congrArg norm heq + rw [CStarRing.norm_star_mul_self, CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (CFC.abs x * b), norm_nonneg (x * b)] + +def partialPolar (x : A) : principalRightIdeal (CFC.abs x) →L[ℂ] A := + (LinearMap.mulLeft ℂ x).extendOfNorm (principalRightMap (CFC.abs x)) + +lemma partialPolar_apply_mul (x b : A) : + partialPolar x (principalRightMap (CFC.abs x) b) = x*b := by + apply LinearMap.extendOfNorm_eq (principalRightMap_dense _) + refine ⟨1, fun c => ?_⟩ + change ‖x*c‖ ≤ 1 * ‖CFC.abs x*c‖ + rw [one_mul, norm_mul_abs] + +lemma partialPolar_norm (x : A) (a : principalRightIdeal (CFC.abs x)) : + ‖partialPolar x a‖ = ‖a‖ := by + refine (principalRightMap_dense (CFC.abs x)).induction_on a ?_ ?_ + · exact isClosed_eq (by fun_prop) (by fun_prop) + · intro b + rw [partialPolar_apply_mul] + exact (norm_mul_abs x b).symm + +lemma partialPolar_initial_square (x : A) (a : principalRightIdeal (CFC.abs x)) : + star (partialPolar x a) * partialPolar x a = star (a : A) * (a : A) := by + refine (principalRightMap_dense (CFC.abs x)).induction_on a ?_ ?_ + · exact isClosed_eq (by fun_prop) (by fun_prop) + · intro b + rw [partialPolar_apply_mul] + change star (x*b) * (x*b) = star (CFC.abs x*b) * (CFC.abs x*b) + rw [star_mul, star_mul, (CFC.abs_nonneg x).star_eq] + calc + star b * star x * (x*b) = star b * (star x*x) * b := by noncomm_ring + _ = star b * (CFC.abs x*CFC.abs x) * b := by rw [CFC.abs_mul_abs] + _ = star b * CFC.abs x * (CFC.abs x*b) := by noncomm_ring + +lemma partialPolar_mem_rightIdeal (x : A) (a : principalRightIdeal (CFC.abs x)) : + partialPolar x a ∈ principalRightIdeal x := by + refine (principalRightMap_dense (CFC.abs x)).induction_on a ?_ ?_ + · exact (Submodule.isClosed_topologicalClosure _).preimage (partialPolar x).continuous + · intro b + rw [partialPolar_apply_mul] + exact Submodule.le_topologicalClosure _ (LinearMap.mem_range_self _ b) + +def sandwichSubalgebra (h : A) (hh : IsSelfAdjoint h) : NonUnitalStarSubalgebra ℂ A where + carrier := Set.range (fun b : A => h*b*h) + zero_mem' := ⟨0, by simp⟩ + add_mem' := by + rintro _ _ ⟨b, rfl⟩ ⟨c, rfl⟩ + exact ⟨b+c, by noncomm_ring⟩ + smul_mem' := by + rintro c _ ⟨b, rfl⟩ + exact ⟨c • b, by simp only [mul_smul_comm, smul_mul_assoc]⟩ + mul_mem' := by + rintro _ _ ⟨b, rfl⟩ ⟨c, rfl⟩ + exact ⟨b*h*h*c, by noncomm_ring⟩ + star_mem' := by + rintro _ ⟨b, rfl⟩ + exact ⟨star b, by simp only [star_mul, hh.star_eq]; noncomm_ring⟩ + +def hereditarySubalgebra (h : A) (hh : IsSelfAdjoint h) : NonUnitalStarSubalgebra ℂ A := + (sandwichSubalgebra h hh).topologicalClosure + +instance (h : A) (hh : IsSelfAdjoint h) : + IsClosed (hereditarySubalgebra h hh : Set A) := + NonUnitalStarSubalgebra.isClosed_topologicalClosure _ + +instance (h : A) (hh : IsSelfAdjoint h) : CompleteSpace (hereditarySubalgebra h hh) := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).isComplete.completeSpace_coe + +omit [PartialOrder A] [StarOrderedRing A] in +lemma sandwich_mem (h b : A) (hh : IsSelfAdjoint h) : h*b*h ∈ hereditarySubalgebra h hh := + (sandwichSubalgebra h hh).le_topologicalClosure ⟨b, rfl⟩ + +lemma square_mem_hereditary (h : A) (hh : IsSelfAdjoint h) : + h*h ∈ hereditarySubalgebra h hh := by + have ht : Tendsto (fun e : A => h*e*h) (CStarAlgebra.approximateUnit A) (𝓝 (h*h)) := + ((CStarAlgebra.increasingApproximateUnit A).tendsto_mul_left h).mul_const h + exact (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).mem_of_tendsto ht + (Eventually.of_forall (fun e => sandwich_mem h e hh)) + +lemma sqrt_mem_hereditary (h x : A) (hh : IsSelfAdjoint h) + (hx : x ∈ hereditarySubalgebra h hh) (hxpos : 0 ≤ x) : + CFC.sqrt x ∈ hereditarySubalgebra h hh := by + rw [CFC.sqrt_eq_real_sqrt x hxpos] + exact cfcₙ_mem Real.sqrt hx + +lemma self_mem_hereditary (h : A) (hh : 0 ≤ h) : + h ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + convert sqrt_mem_hereditary h (h*h) hh.isSelfAdjoint + (square_mem_hereditary h hh.isSelfAdjoint) (by simpa only [hh.star_eq] using star_mul_self_nonneg h) using 1 + exact (CFC.sqrt_mul_self h hh).symm + +omit [PartialOrder A] [StarOrderedRing A] in +lemma principalRightIdeal_mul_mem (h a b : A) (ha : a ∈ principalRightIdeal h) : + a*b ∈ principalRightIdeal h := by + have hc : IsClosed {a : A | a*b ∈ principalRightIdeal h} := + (Submodule.isClosed_topologicalClosure _).preimage (continuous_id.mul_const b) + apply closure_minimal _ hc ha + rintro _ ⟨c, rfl⟩ + exact Submodule.le_topologicalClosure _ ⟨c*b, by change h*(c*b) = (h*c)*b; simp only [mul_assoc]⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma hereditary_le_rightIdeal (h : A) (hh : IsSelfAdjoint h) : + (hereditarySubalgebra h hh : Set A) ⊆ principalRightIdeal h := by + apply closure_minimal _ (Submodule.isClosed_topologicalClosure _) + rintro _ ⟨b, rfl⟩ + exact Submodule.le_topologicalClosure _ ⟨b*h, by change h*(b*h) = h*b*h; simp only [mul_assoc]⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rightIdeal_square_mem_hereditary (h a : A) (hh : IsSelfAdjoint h) + (ha : a ∈ principalRightIdeal h) : a * star a ∈ hereditarySubalgebra h hh := by + have hc : IsClosed {a : A | a * star a ∈ hereditarySubalgebra h hh} := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage (by fun_prop) + apply closure_minimal _ hc ha + rintro _ ⟨b, rfl⟩ + change (h*b)*star (h*b) ∈ hereditarySubalgebra h hh + convert sandwich_mem h (b*star b) hh using 1 + simp only [star_mul, hh.star_eq, mul_assoc] + +def residual (e h : A) := h - e*h - h*e + e*h*e + +lemma residual_nonneg (e h : A) (he : IsSelfAdjoint e) (hh : 0 ≤ h) : + 0 ≤ residual e h := by + have hs : CFC.sqrt h * CFC.sqrt h = h := CFC.sqrt_mul_sqrt_self h hh + convert mul_star_self_nonneg (CFC.sqrt h-e*CFC.sqrt h) using 1 + simp only [residual, star_sub, star_mul, (CFC.sqrt_nonneg h).star_eq, he.star_eq] + rw [show (CFC.sqrt h-e*CFC.sqrt h) * (CFC.sqrt h-CFC.sqrt h*e) = + CFC.sqrt h*CFC.sqrt h-e*(CFC.sqrt h*CFC.sqrt h) - + (CFC.sqrt h*CFC.sqrt h)*e+e*(CFC.sqrt h*CFC.sqrt h)*e by noncomm_ring, hs] + +lemma residual_mono (e : A) (he : IsSelfAdjoint e) {h k : A} (hkh : h ≤ k) : + residual e h ≤ residual e k := by + apply sub_nonneg.mp + convert residual_nonneg e (k-h) he (sub_nonneg.mpr hkh) using 1 + simp only [residual] + noncomm_ring + +omit [PartialOrder A] [StarOrderedRing A] in +lemma residual_square (e a : A) (he : IsSelfAdjoint e) : + residual e (a*star a) = (a-e*a)*star (a-e*a) := by + simp only [residual, star_sub, star_mul, he.star_eq] + noncomm_ring + +lemma norm_sub_left_mul_sq_le (e h a : A) (he : IsSelfAdjoint e) + (ha : a*star a ≤ h) : ‖a-e*a‖^2 ≤ ‖residual e h‖ := by + have hb := CStarAlgebra.norm_le_norm_of_le_of_nonneg (residual_mono e he ha) + (residual_nonneg e (a*star a) he (mul_star_self_nonneg a)) + rw [residual_square e a he, CStarRing.norm_self_mul_star] at hb + simpa only [pow_two] using hb + +omit [PartialOrder A] [StarOrderedRing A] in +lemma norm_residual_le (e h : A) (he : ‖e‖ ≤ 1) : + ‖residual e h‖ ≤ 2 * ‖h-e*h‖ := by + have hr : residual e h = (h-e*h) - (h-e*h)*e := by + simp only [residual] + noncomm_ring + rw [hr] + calc + ‖(h-e*h) - (h-e*h)*e‖ ≤ ‖h-e*h‖ + ‖(h-e*h)*e‖ := norm_sub_le _ _ + _ ≤ ‖h-e*h‖ + ‖h-e*h‖*‖e‖ := add_le_add le_rfl (norm_mul_le _ _) + _ ≤ ‖h-e*h‖ + ‖h-e*h‖*1 := by gcongr + _ = 2*‖h-e*h‖ := by ring + +lemma norm_sub_left_mul_le_sqrt (e h a : A) (he : IsSelfAdjoint e) (hen : ‖e‖ ≤ 1) + (ha : a*star a ≤ h) : ‖a-e*a‖ ≤ Real.sqrt (2*‖h-e*h‖) := by + apply (Real.le_sqrt (norm_nonneg _) (by positivity)).mpr + exact (norm_sub_left_mul_sq_le e h a he ha).trans (norm_residual_le e h hen) + +lemma principalRightIdeal_of_square_le (h a : A) (hh : 0 ≤ h) (ha : a*star a ≤ h) : + a ∈ principalRightIdeal h := by + let S := hereditarySubalgebra h hh.isSelfAdjoint + let := CStarAlgebra.spectralOrder S + let := CStarAlgebra.spectralOrderedRing S + let h₀ : S := ⟨h, self_mem_hereditary h hh⟩ + let F := CStarAlgebra.approximateUnit S + have hF := CStarAlgebra.increasingApproximateUnit S + have ht : Tendsto (fun e : S => (e:A)*h) F (𝓝 h) := by + exact (continuous_subtype_val.tendsto h₀).comp (hF.tendsto_mul_right h₀) + have hd : Tendsto (fun e : S => ‖h-(e:A)*h‖) F (𝓝 0) := by + simpa only [sub_self, norm_zero] using + ((tendsto_const_nhds : Tendsto (fun _ : S => h) F (𝓝 h)).sub ht).norm + have hb : Tendsto (fun e : S => Real.sqrt (2*‖h-(e:A)*h‖)) F (𝓝 0) := by + simpa only [mul_zero, Real.sqrt_zero] using (hd.const_mul 2).sqrt + have hn : Tendsto (fun e : S => ‖a-(e:A)*a‖) F (𝓝 0) := by + apply squeeze_zero' (Eventually.of_forall (fun _ => norm_nonneg _)) _ hb + filter_upwards [hF.eventually_isSelfAdjoint, hF.eventually_norm] with e he hen + exact norm_sub_left_mul_le_sqrt (e:A) h a + (show IsSelfAdjoint (e:A) from congrArg Subtype.val he) hen ha + have ht' : Tendsto (fun e : S => (e:A)*a) F (𝓝 a) := by + apply tendsto_iff_norm_sub_tendsto_zero.mpr + simpa only [norm_sub_rev] using hn + exact (Submodule.isClosed_topologicalClosure _).mem_of_tendsto ht' + (Eventually.of_forall (fun e => principalRightIdeal_mul_mem h (e:A) a + (hereditary_le_rightIdeal h hh.isSelfAdjoint e.property))) + +lemma mem_hereditary_of_le (h x : A) (hh : 0 ≤ h) (hx : 0 ≤ x) (hxh : x ≤ h) : + x ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + have hs : CFC.sqrt x * star (CFC.sqrt x) = x := by + rw [(CFC.sqrt_nonneg x).star_eq, CFC.sqrt_mul_sqrt_self x hx] + rw [← hs] + exact rightIdeal_square_mem_hereditary h _ hh.isSelfAdjoint + (principalRightIdeal_of_square_le h _ hh (by rwa [hs])) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma principalRightIdeal_le_of_mem {h a : A} (ha : a ∈ principalRightIdeal h) : + principalRightIdeal a ≤ principalRightIdeal h := by + intro x hx + apply closure_minimal _ (Submodule.isClosed_topologicalClosure _) hx + rintro _ ⟨b, rfl⟩ + exact principalRightIdeal_mul_mem h a b ha + +omit [PartialOrder A] [StarOrderedRing A] in +lemma principalRightIdeal_smul_le (h : A) (c : ℝ) : + principalRightIdeal (c•h) ≤ principalRightIdeal h := by + intro x hx + apply closure_minimal _ (Submodule.isClosed_topologicalClosure _) hx + rintro _ ⟨b, rfl⟩ + exact Submodule.le_topologicalClosure _ ⟨c•b, by + change h*(c•b) = (c•h)*b + simp only [mul_smul_comm, smul_mul_assoc]⟩ + +lemma principalRightIdeal_of_square_le_smul (h a : A) (hh : 0 ≤ h) + {c : ℝ} (hc : 0 ≤ c) (ha : a*star a ≤ c•h) : a ∈ principalRightIdeal h := + principalRightIdeal_smul_le h c (principalRightIdeal_of_square_le (c•h) a + (smul_nonneg hc hh) ha) + +lemma mem_hereditary_of_le_smul (h x : A) (hh : 0 ≤ h) (hx : 0 ≤ x) + {c : ℝ} (hc : 0 ≤ c) (hxh : x ≤ c•h) : + x ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + have hs : CFC.sqrt x * star (CFC.sqrt x) = x := by + rw [(CFC.sqrt_nonneg x).star_eq, CFC.sqrt_mul_sqrt_self x hx] + rw [← hs] + exact rightIdeal_square_mem_hereditary h _ hh.isSelfAdjoint + (principalRightIdeal_of_square_le_smul h _ hh hc (by rwa [hs])) + +lemma principalRightIdeal_sqrt (h : A) (hh : 0 ≤ h) : + principalRightIdeal (CFC.sqrt h) = principalRightIdeal h := by + apply le_antisymm + · apply principalRightIdeal_le_of_mem + exact hereditary_le_rightIdeal h hh.isSelfAdjoint + (sqrt_mem_hereditary h h hh.isSelfAdjoint (self_mem_hereditary h hh) hh) + · apply principalRightIdeal_le_of_mem + have hs : CFC.sqrt h*CFC.sqrt h ∈ principalRightIdeal (CFC.sqrt h) := + Submodule.le_topologicalClosure _ (LinearMap.mem_range_self _ (CFC.sqrt h)) + simpa only [CFC.sqrt_mul_sqrt_self h hh] using hs + +lemma exists_exact_initial_square_of_domination (u d : A) (hd : 0 ≤ d) + {c : ℝ} (hc : 0 ≤ c) (hdu : d ≤ c • (star u*u)) : + ∃ r : A, star r*r = d ∧ r ∈ principalRightIdeal u := by + let a := CFC.sqrt d + have ha : a*star a = d := by + dsimp only [a] + rw [(CFC.sqrt_nonneg d).star_eq, CFC.sqrt_mul_sqrt_self d hd] + have hamem : a ∈ principalRightIdeal (CFC.abs u) := by + have hat := principalRightIdeal_of_square_le_smul (star u*u) a + (star_mul_self_nonneg u) hc (by rwa [ha]) + rw [← principalRightIdeal_sqrt (star u*u) (star_mul_self_nonneg u)] at hat + exact hat + let a₀ : principalRightIdeal (CFC.abs u) := ⟨a, hamem⟩ + refine ⟨partialPolar u a₀, ?_, partialPolar_mem_rightIdeal u a₀⟩ + rw [partialPolar_initial_square] + change star a*a = d + rw [show star a = a from (CFC.sqrt_nonneg d).star_eq] + rw [show a*a = d from CFC.sqrt_mul_sqrt_self d hd] + +lemma exists_exact_initial_square_in_hereditary (h u d : A) (hh : 0 ≤ h) + (hu : u ∈ principalRightIdeal h) (hd : 0 ≤ d) {c : ℝ} (hc : 0 ≤ c) + (hdu : d ≤ c • (star u*u)) : + ∃ r : A, star r*r = d ∧ r*star r ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + obtain ⟨r, hr, hrmem⟩ := exists_exact_initial_square_of_domination u d hd hc hdu + exact ⟨r, hr, rightIdeal_square_mem_hereditary h r hh.isSelfAdjoint + (principalRightIdeal_le_of_mem hu hrmem)⟩ + +lemma exists_comparison_of_rightIdeal (h a : A) (hh : 0 ≤ h) + (ha : a ∈ principalRightIdeal h) (ε : ℝ) (hε : 0 < ε) : + ∃ v : A, ‖star v*h*v - star a*a‖ < ε := by + have ha' : a ∈ principalRightIdeal (CFC.sqrt h) := by + rwa [principalRightIdeal_sqrt h hh] + let F : Set A := closure (Set.range (fun v : A => star v*h*v)) + have hc : IsClosed {a : A | star a*a ∈ F} := + isClosed_closure.preimage (by fun_prop) + have hamem : star a*a ∈ F := by + apply closure_minimal _ hc ha' + rintro _ ⟨v, rfl⟩ + apply subset_closure + refine ⟨v, ?_⟩ + change star v*h*v = star (CFC.sqrt h*v)*(CFC.sqrt h*v) + rw [star_mul, (CFC.sqrt_nonneg h).star_eq] + calc + star v*h*v = star v*(CFC.sqrt h*CFC.sqrt h)*v := by + rw [CFC.sqrt_mul_sqrt_self h hh] + _ = star v*CFC.sqrt h*(CFC.sqrt h*v) := by noncomm_ring + obtain ⟨_, ⟨v, rfl⟩, hv⟩ := Metric.mem_closure_iff.mp hamem ε hε + exact ⟨v, by simpa only [dist_eq_norm, norm_sub_rev] using hv⟩ + +lemma exists_comparison_of_hereditary (h x : A) (hh : 0 ≤ h) (hx : 0 ≤ x) + (hmem : x ∈ hereditarySubalgebra h hh.isSelfAdjoint) (ε : ℝ) (hε : 0 < ε) : + ∃ v : A, ‖star v*h*v-x‖ < ε := by + have hs : star (CFC.sqrt x)*CFC.sqrt x = x := by + rw [(CFC.sqrt_nonneg x).star_eq, CFC.sqrt_mul_sqrt_self x hx] + have ha := hereditary_le_rightIdeal h hh.isSelfAdjoint + (sqrt_mem_hereditary h x hh.isSelfAdjoint hmem hx) + simpa only [hs] using exists_comparison_of_rightIdeal h (CFC.sqrt x) hh ha ε hε + +lemma exists_comparison_of_star_mul (u : A) (ε : ℝ) (hε : 0 < ε) : + ∃ v : A, ‖star v*(u*star u)*v - star u*u‖ < ε := + exists_comparison_of_rightIdeal (u*star u) u (mul_star_self_nonneg u) + (principalRightIdeal_of_square_le (u*star u) u (mul_star_self_nonneg u) le_rfl) ε hε + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/HereditaryDeletion.lean b/lean/OAI/Analysis/WeakInfiniteness/HereditaryDeletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c95bc4668776c72de00fc33b74fcab381ae1017 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/HereditaryDeletion.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped BigOperators Topology CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +theorem exists_hereditary_continuous_deletion + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosed (D : Set A)) + (U V : A) (hUD : U ∈ D) (hVD : V ∈ D) + (hU : IsSelfAdjoint U) (hV : IsSelfAdjoint V) {ρ : ℝ} (hρ : 0 < ρ) : + ∃ H ∈ D,IsSelfAdjoint H ∧ ∃ n : ℕ,∃ e : Fin n → Unitization ℂ A, + (∀ i,IsSelfAdjoint (e i)) ∧ (∑ i,e i=1) ∧ + (∀ i,e i*(H : Unitization ℂ A)*e i=0) ∧ + ∀ (p q : A) (S T : Set ℝ), + ContinuouslySupported (U : Unitization ℂ A) (p : Unitization ℂ A) S → + ContinuouslySupported (U : Unitization ℂ A) (q : Unitization ℂ A) T → + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) → p*H*q=p*V*q := by + classical + let u : Unitization ℂ A := U + let v : Unitization ℂ A := V + let E := unitizationSubalgebra D + let : IsClosed (E : Set (Unitization ℂ A)) := unitizationSubalgebra_closed D hD + have hu : IsSelfAdjoint u := hU.map (Unitization.inrNonUnitalStarAlgHom ℂ A) + have hv : IsSelfAdjoint v := hV.map (Unitization.inrNonUnitalStarAlgHom ℂ A) + let δ : ℝ := ρ/8 + have hδ : 0 < δ := by dsimp [δ]; positivity + obtain ⟨n,c,f,hf,hfs,_⟩ := exists_small_partition (spectrum ℝ u) + (ContinuousFunctionalCalculus.isCompact_spectrum u) hδ + let e : Fin n → Unitization ℂ A := fun i => cfc (f i) u + let R : Fin n → Fin n → Prop := fun j k => 4*δ < dist (c j) (c k) + let H := finiteDeletion e v R + have heD : ∀ i,e i ∈ E := fun i => cfc_mem (f i) (unitizationSubalgebra_inr_mem D hUD) + have hHD : H ∈ E := by + apply E.sum_mem + intro j _ + apply E.sum_mem + intro k _ + split_ifs + · exact E.mul_mem (E.mul_mem (heD j) hVD) (heD k) + · exact E.zero_mem + have hH0 : H.fst=0 := by + change (Unitization.fstHom ℂ A) H=0 + simp only [H,finiteDeletion,map_sum,apply_ite,map_mul,map_zero] + simp [v] + have hHe : (H.snd : Unitization ℂ A)=H := unitization_inr_snd_of_fst_eq_zero hH0 + have hesa : ∀ i,IsSelfAdjoint (e i) := fun i => cfc_predicate (f i) u + have hHsa : IsSelfAdjoint H := finiteDeletion_selfAdjoint e v R hesa hv (fun j k => by + dsimp [R]; rw [dist_comm]) + have hdiag : ∀ i,e i*H*e i=0 := by + apply finiteDeletion_diagonals e v R e + intro l j k hjk + dsimp only [R] at hjk + by_cases hlj : 2*δ ≤ dist (c l) (c j) + · exact Or.inl (cfc_mul_eq_zero_of_small_supports u (f l) (f j) + (c l) (c j) δ (hf l) (hf j) hlj) + · right + apply cfc_mul_eq_zero_of_small_supports u (f k) (f l) + (c k) (c l) δ (hf k) (hf l) + have ht := dist_triangle (c j) (c l) (c k) + rw [dist_comm (c j) (c l),dist_comm (c l) (c k)] at ht + have hh := lt_of_not_ge hlj + linarith + refine ⟨H.snd,hHD,?_,n,e,hesa,cfc_partition_sum u hu f hfs,?_,?_⟩ + · have := congrArg (fun z : Unitization ℂ A => z.snd) hHsa.star_eq + exact this + · simpa only [hHe] using hdiag + · intro p q S T hp hq hsep + apply Unitization.inr_injective (R := ℂ) + simp only [Unitization.inr_mul] + rw [hHe] + apply finiteDeletion_preserves_corner e v _ _ R (cfc_partition_sum u hu f hfs) + intro j k hjk + have hs : ∀ x ∈ S,∀ y ∈ T,8*δ ≤ dist x y := by + have heq : 8*δ=ρ := by dsimp [δ]; ring + simpa only [heq] using hsep + rcases vanishes_on_separated_sets (f j) (f k) (c j) (c k) δ + (hf j) (hf k) S T hs hjk with hj | hk + · exact Or.inl (hp (f j) hj).1 + · exact Or.inr (hq (f k) hk).2 + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IdealComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/IdealComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..a51ac01247d9ac9a86dea2b0632f0fb4deb37f6b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IdealComparison.lean @@ -0,0 +1,116 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter + +open scoped Topology CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma elementCuntzSubequiv_of_le_smul {a b : A} (ha : 0 ≤ a) (hb : 0 ≤ b) + {c : ℝ} (hc : 0 ≤ c) (hab : a ≤ c • b) : ElementCuntzSubequiv a b := + elementCuntzSubequiv_of_hereditary ha hb (mem_hereditary_of_le_smul b a hb ha hc hab) + +lemma sum_cuntz_fiberDiagonal {m : ℕ} (x : Fin m → A) : + CuntzSubequiv (diagonalCopies 1 (∑ i,x i)) (fiberDiagonal x) := by + let Y : A → CStarMatrix (Fin m) (Fin 1) A := fun e _ _ => e + have he : ∀ e : A,(Y e).conjTranspose*fiberDiagonal x*Y e= + diagonalCopies 1 (star e*(∑ i,x i)*e) := by + intro e + ext i j + have hi : i=0 := Subsingleton.elim _ _ + have hj : j=0 := Subsingleton.elim _ _ + subst i; subst j + change (∑ k : Fin m,(∑ l : Fin m,star e*Matrix.diagonal x l k)*e)=star e*(∑ i,x i)*e + simp only [Matrix.diagonal_apply] + simp only [mul_ite,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,ite_true] + rw [← Finset.sum_mul,← Finset.mul_sum] + intro ε hε + obtain ⟨v,hv⟩ := elementCuntzSubequiv_iff.mp + (cuntzSubequiv_refl (diagonalCopies 1 (∑ i,x i))) ε hε + refine ⟨Y v,?_⟩ + rw [he] + have hn := NonUnitalStarAlgHom.norm_apply_le (diagonalHom (A := A) 1) + (star v*(∑ i,x i)*v-∑ i,x i) + rw [map_sub] at hn + exact hn.trans_lt hv + +omit [PartialOrder A] [StarOrderedRing A] in +def oneBlockColumn (e : A) : CStarMatrix (Fin 1 ⊕ Fin 1) (Fin 1) A := fun _ _ => e + +omit [PartialOrder A] [StarOrderedRing A] in +lemma blockSum_one_sandwich (a b e : A) : + (oneBlockColumn e).conjTranspose * blockSum (diagonalCopies 1 a) (diagonalCopies 1 b) * + oneBlockColumn e = diagonalCopies 1 (star e*(a+b)*e) := by + ext i j + have hi : i=0 := Subsingleton.elim _ _ + have hj : j=0 := Subsingleton.elim _ _ + subst i; subst j + simp only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,oneBlockColumn, + Fintype.sum_sum_type,Fin.sum_univ_one,blockSum,diagonalCopies, + CStarMatrix.ofMatrix_apply,Equiv.symm_apply_apply,Matrix.fromBlocks_apply₁₁,Matrix.fromBlocks_apply₁₂, + Matrix.fromBlocks_apply₂₁,Matrix.fromBlocks_apply₂₂,Matrix.diagonal_apply_eq, + Matrix.zero_apply,mul_zero,zero_add,add_zero] + noncomm_ring + +lemma sum_two_cuntz_block (a b : A) : + CuntzSubequiv (diagonalCopies 1 (a+b)) (blockSum (diagonalCopies 1 a) (diagonalCopies 1 b)) := by + intro ε hε + obtain ⟨v,hv⟩ := elementCuntzSubequiv_iff.mp + (cuntzSubequiv_refl (diagonalCopies 1 (a+b))) ε hε + refine ⟨oneBlockColumn v,?_⟩ + rw [blockSum_one_sandwich] + have hn := NonUnitalStarAlgHom.norm_apply_le (diagonalHom (A := A) 1) + (star v*(a+b)*v-(a+b)) + rw [map_sub] at hn + exact hn.trans_lt hv + +lemma star_add_mul_add_le (x y : A) : + star (x+y)*(x+y) ≤ (2 : ℝ) • (star x*x+star y*y) := by + have h := star_mul_self_nonneg (x-y) + have he : (2 : ℝ) • (star x*x+star y*y)-star (x+y)*(x+y)=star (x-y)*(x-y) := by + simp only [two_smul,star_sub,star_add] + noncomm_ring + exact sub_nonneg.mp (he.symm ▸ h) + +lemma star_mul_product_cuntz (a z : A) : + ElementCuntzSubequiv (star (a*z)*(a*z)) (star z*z) := by + + apply (element_initial_cuntz_range (a*z)).trans + have hc := (cuntzSubequiv_refl (diagonalCopies 1 (z*star z))).sandwich_left (diagonalCopies 1 (star a)) + have he : (diagonalCopies 1 (star a)).conjTranspose*diagonalCopies 1 (z*star z)*diagonalCopies 1 (star a)= + diagonalCopies 1 ((a*z)*star (a*z)) := by + change star ((diagonalHom 1) (star a))*(diagonalHom 1) (z*star z)*(diagonalHom 1) (star a)= + (diagonalHom 1) ((a*z)*star (a*z)) + rw [← map_star,← map_mul,← map_mul,star_star] + apply congrArg (diagonalHom (A := A) 1) + rw [star_mul] + noncomm_ring + rw [he] at hc + exact hc.trans (element_range_cuntz_initial z) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IdealComparison2.lean b/lean/OAI/Analysis/WeakInfiniteness/IdealComparison2.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d60435282fc151c16bf9f2e6ab5723d96df5140 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IdealComparison2.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.IdealComparison +import OAI.Analysis.WeakInfiniteness.IdealSpan + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma CuntzSubequiv.copies_of_properlyInfinite_right + {m : Type*} [Fintype m] {a : A} {H : CStarMatrix m m A} + (haH : CuntzSubequiv (diagonalCopies 1 a) H) (hH : ProperlyInfinite H) (k : ℕ) : + CuntzSubequiv (diagonalCopies k a) H := by + have hp : ∀ j : ℕ,CuntzSubequiv (diagonalCopies (2^j) a) H := by + intro j + induction j with + | zero => exact haH + | succ j ih => + have h := ((ih.blockSum ih).trans hH).submatrix_left + (finSumFinEquiv.symm : Fin (2^j+2^j) → Fin (2^j) ⊕ Fin (2^j)) + rw [diagonalCopies_double] at h + have he : 2^(j+1)=2^j+2^j := by rw [pow_succ,Nat.mul_two] + rw [he] + exact h + exact (diagonalCopies_cuntzSubequiv a (Nat.lt_two_pow_self (n := k)).le).trans (hp k) + +lemma algebraicIdealSpan_square_cuntz {h : A} (hh : 0 ≤ h) {n : ℕ} (hn : 1 ≤ n) + (hpi : ProperlyInfinite (diagonalCopies n h)) {x : A} (hx : x ∈ algebraicIdealSpan h) : + CuntzSubequiv (diagonalCopies 1 (star x*x)) (diagonalCopies n h) := by + induction hx using Submodule.span_induction with + | mem y hy => + obtain ⟨⟨a,b⟩,rfl⟩ := hy + have hc : ElementCuntzSubequiv (star (a*h*b)*(a*h*b)) (star (h*b)*(h*b)) := by + simpa only [mul_assoc] using star_mul_product_cuntz a (h*b) + apply hc.trans ((element_initial_cuntz_range (h*b)).trans _) + apply (elementCuntzSubequiv_of_hereditary (mul_star_self_nonneg (h*b)) hh ?_).trans + (diagonalCopies_cuntzSubequiv h hn) + have he : (h*b)*star (h*b)=h*(b*star b)*h := by rw [star_mul,hh.star_eq]; noncomm_ring + rw [he] + exact sandwich_mem h (b*star b) hh.isSelfAdjoint + | zero => + have he : diagonalCopies 1 (star (0 : A)*0)=0 := by ext i j; simp [diagonalCopies] + rw [he] + exact zero_cuntzSubequiv _ + | add x y _ _ hx hy => + apply (elementCuntzSubequiv_of_le_smul (star_mul_self_nonneg (x+y)) + (add_nonneg (star_mul_self_nonneg x) (star_mul_self_nonneg y)) (by norm_num : (0 : ℝ) ≤ 2) + (star_add_mul_add_le x y)).trans + exact (sum_two_cuntz_block (star x*x) (star y*y)).trans ((hx.blockSum hy).trans hpi) + | smul c x _ hx => + apply (elementCuntzSubequiv_of_hereditary (star_mul_self_nonneg (c•x)) + (star_mul_self_nonneg x) ?_).trans hx + have hm := (hereditarySubalgebra (star x*x) (star_mul_self_nonneg x).isSelfAdjoint).smul_mem + (c*star c) (self_mem_hereditary (star x*x) (star_mul_self_nonneg x)) + simp only [star_smul,smul_mul_assoc,mul_smul_comm,smul_smul] + exact hm + +theorem generatedClosedIdeal_copies_cuntz {h x : A} (hh : 0 ≤ h) (hx : 0 ≤ x) + {n : ℕ} (hn : 1 ≤ n) (hpi : ProperlyInfinite (diagonalCopies n h)) + (hm : x ∈ generatedClosedIdeal h hh.isSelfAdjoint) (k : ℕ) : + CuntzSubequiv (diagonalCopies k x) (diagonalCopies n h) := by + have hs : CFC.sqrt x ∈ generatedClosedIdeal h hh.isSelfAdjoint := by + rw [CFC.sqrt_eq_real_sqrt x hx] + exact cfcₙ_mem Real.sqrt hm + have hclosed : IsClosed {a : A | CuntzSubequiv + (diagonalCopies 1 (star a*a)) (diagonalCopies n h)} := by + simp only [cuntzSubequiv_iff_mem_closure] + exact isClosed_closure.preimage + ((map_continuous (diagonalHom (A := A) 1)).comp (continuous_star.mul continuous_id)) + have hc : CuntzSubequiv (diagonalCopies 1 (star (CFC.sqrt x)*CFC.sqrt x)) + (diagonalCopies n h) := + closure_minimal (fun a ha => algebraicIdealSpan_square_cuntz hh hn hpi ha) hclosed hs + rw [(CFC.sqrt_nonneg x).star_eq,CFC.sqrt_mul_sqrt_self x hx] at hc + exact hc.copies_of_properlyInfinite_right hpi k + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IdealSeparation.lean b/lean/OAI/Analysis/WeakInfiniteness/IdealSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..975daad587818f6375853e91f20629c423332d50 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IdealSeparation.lean @@ -0,0 +1,115 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AnnihilatorStates +import OAI.Analysis.WeakInfiniteness.CompressedStates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter + +open scoped Topology ComplexOrder InnerProductSpace CStarAlgebra + +variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_annihilator_state_of_not_mem + (I : NonUnitalStarSubalgebra ℂ A) (hI : IsClosed (I : Set A)) + (hIL : ∀ x ∈ I,∀ a : A,a*x ∈ I) (hIR : ∀ x ∈ I,∀ a : A,x*a ∈ I) + {b : A} (hb : 0 ≤ b) (hbI : b ∉ I) : + ∃ f ∈ annihilatorStates (I : Set A),0 < f ⟨b,hb.isSelfAdjoint⟩ := by + classical + let : IsClosed (I : Set A) := hI + let : CompleteSpace I := hI.isComplete.completeSpace_coe + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let L := CStarAlgebra.approximateUnit I + have hL := CStarAlgebra.increasingApproximateUnit I + obtain ⟨δ,hδ,hball⟩ := Metric.mem_nhds_iff.mp (hI.isOpen_compl.mem_nhds hbI) + have hdist : ∀ y ∈ I,δ ≤ ‖b-y‖ := by + intro y hy + by_contra! hn + have hyb : y ∈ Metric.ball b δ := by + rw [Metric.mem_ball,dist_eq_norm,norm_sub_rev] + exact hn + exact hball hyb hy + have hb0 : b ≠ 0 := fun hz => hbI (hz ▸ I.zero_mem) + let : Nontrivial A := nontrivial_of_ne _ _ hb0 + obtain ⟨f₀,hf₀,_⟩ := exists_norming_real_state b hb + let Good : I → Prop := fun e => 0 ≤ (e : A) ∧ ‖(e : A)‖ ≤ 1 + have hgood : ∀ᶠ e in L,Good e := by + filter_upwards [hL.eventually_nonneg,hL.eventually_norm] with e he hen + have heq : (e : A)=star ((CFC.sqrt e : I) : A)*((CFC.sqrt e : I) : A) := by + have hh : e=star (CFC.sqrt e)*CFC.sqrt e := by + rw [(CFC.sqrt_nonneg e).star_eq,CFC.sqrt_mul_sqrt_self e he] + exact congrArg (fun x : I => (x : A)) hh + exact ⟨heq.symm ▸ star_mul_self_nonneg (((CFC.sqrt e : I) : A)),hen⟩ + have hex : ∀ e : I,∃ f ∈ realStateSpace A,Good e → + δ ≤ f ⟨b,hb.isSelfAdjoint⟩ ∧ ∀ c : A, + f ⟨star c*c,(star_mul_self_nonneg c).isSelfAdjoint⟩ ≤ + (‖b‖/δ)*‖c*(1-(e : A))‖^2 := by + intro e + by_cases he : Good e + · have heone : (e : A) ≤ 1 := (CStarAlgebra.mem_Icc_iff_norm_le_one.mpr he).2 + have hgn : ‖1-(e : A)‖ ≤ 1 := + (CStarAlgebra.mem_Icc_iff_norm_le_one.mp + ⟨sub_nonneg.mpr heone,sub_le_self _ he.1⟩).2 + have hresI : b-(1-(e : A))*b*(1-(e : A)) ∈ I := by + have heq : b-(1-(e : A))*b*(1-(e : A))= + (e : A)*b+b*(e : A)-(e : A)*b*(e : A) := by noncomm_ring + rw [heq] + exact I.sub_mem (I.add_mem (hIR e e.property b) (hIL e e.property b)) + (hIR (e*b) (hIR e e.property b) e) + have hdb : δ ≤ ‖(1-(e : A))*b*(1-(e : A))‖ := by + simpa only [sub_sub_cancel] using hdist _ hresI + obtain ⟨f,hf,hfb,hfc⟩ := exists_compressed_real_state hb + (by change star (1-(e:A))=1-(e:A); rw [star_sub,star_one,he.1.star_eq]) hgn hδ hdb + exact ⟨f,hf,fun _ => ⟨hfb,hfc⟩⟩ + · exact ⟨f₀,hf₀,fun hh => (he hh).elim⟩ + choose f hf hfb using hex + let C := {g ∈ realStateSpace A | δ ≤ g ⟨b,hb.isSelfAdjoint⟩} + have hC : IsCompact C := (realStateSpace_isCompact A).inter_right + (isClosed_le continuous_const (WeakDual.eval_continuous _)) + have hfC : ∀ᶠ e in L,f e ∈ C := by + filter_upwards [hgood] with e he + exact ⟨hf e,(hfb e he).1⟩ + obtain ⟨g,hg,hcluster⟩ := hC.exists_mapClusterPt (u := f) (f := L) (le_principal_iff.mpr hfC) + refine ⟨g,⟨hg.1,?_⟩,hδ.trans_le hg.2⟩ + intro x hx a + let c : A := x*a + have hcI : c ∈ I := hIR x hx a + let cI : I := ⟨c,hcI⟩ + have ht : Tendsto (fun e : I => c*(e : A)) L (𝓝 c) := + (continuous_subtype_val.tendsto cI).comp (hL.tendsto_mul_left cI) + have hzero : Tendsto (fun e : I => (‖b‖/δ)*‖c*(1-(e : A))‖^2) L (𝓝 0) := by + have hh := (((tendsto_const_nhds : Tendsto (fun _ : I => c) L (𝓝 c)).sub ht).norm.pow 2).const_mul (‖b‖/δ) + simpa only [mul_sub,mul_one,sub_self,norm_zero,zero_pow (by decide : 2 ≠ 0),mul_zero] using hh + let q : selfAdjoint A := ⟨star c*c,(star_mul_self_nonneg c).isSelfAdjoint⟩ + have htq : Tendsto (fun e : I => f e q) L (𝓝 0) := by + apply squeeze_zero' (Eventually.of_forall (fun e => realState_nonneg (hf e) (star_mul_self_nonneg c))) _ hzero + filter_upwards [hgood] with e he + exact (hfb e he).2 c + have hcq : MapClusterPt (g q) L (fun e => f e q) := + hcluster.continuousAt_comp (WeakDual.eval_continuous q).continuousAt + exact eq_of_nhds_neBot (hcq.clusterPt.mono htq) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IdealSpan.lean b/lean/OAI/Analysis/WeakInfiniteness/IdealSpan.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d600d70f12e1575b2832a85263a708827269330 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IdealSpan.lean @@ -0,0 +1,116 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Hereditary + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +def algebraicIdealSpan (h : A) : Submodule ℂ A := + Submodule.span ℂ (Set.range (fun p : A × A => p.1*h*p.2)) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma algebraicIdealSpan_mul_left (h a : A) {x : A} (hx : x ∈ algebraicIdealSpan h) : + a*x ∈ algebraicIdealSpan h := by + induction hx using Submodule.span_induction with + | mem y hy => + obtain ⟨⟨c,d⟩,rfl⟩ := hy + exact Submodule.subset_span ⟨(a*c,d),by simp only [mul_assoc]⟩ + | zero => simpa only [mul_zero] using (algebraicIdealSpan h).zero_mem + | add y z _ _ hy hz => simpa only [mul_add] using (algebraicIdealSpan h).add_mem hy hz + | smul c y _ hy => simpa only [mul_smul_comm] using (algebraicIdealSpan h).smul_mem c hy + +omit [PartialOrder A] [StarOrderedRing A] in +lemma algebraicIdealSpan_mul_right (h a : A) {x : A} (hx : x ∈ algebraicIdealSpan h) : + x*a ∈ algebraicIdealSpan h := by + induction hx using Submodule.span_induction with + | mem y hy => + obtain ⟨⟨c,d⟩,rfl⟩ := hy + exact Submodule.subset_span ⟨(c,d*a),by simp only [mul_assoc]⟩ + | zero => simpa only [zero_mul] using (algebraicIdealSpan h).zero_mem + | add y z _ _ hy hz => simpa only [add_mul] using (algebraicIdealSpan h).add_mem hy hz + | smul c y _ hy => simpa only [smul_mul_assoc] using (algebraicIdealSpan h).smul_mem c hy + +omit [PartialOrder A] [StarOrderedRing A] in +lemma algebraicIdealSpan_star (h : A) (hh : IsSelfAdjoint h) {x : A} + (hx : x ∈ algebraicIdealSpan h) : star x ∈ algebraicIdealSpan h := by + induction hx using Submodule.span_induction with + | mem y hy => + obtain ⟨⟨c,d⟩,rfl⟩ := hy + exact Submodule.subset_span ⟨(star d,star c),by + simp only [star_mul,hh.star_eq,mul_assoc]⟩ + | zero => simpa only [star_zero] using (algebraicIdealSpan h).zero_mem + | add y z _ _ hy hz => simpa only [star_add] using (algebraicIdealSpan h).add_mem hy hz + | smul c y _ hy => simpa only [star_smul] using (algebraicIdealSpan h).smul_mem (star c) hy + +omit [PartialOrder A] [StarOrderedRing A] in +def algebraicIdealSubalgebra (h : A) (hh : IsSelfAdjoint h) : NonUnitalStarSubalgebra ℂ A where + toSubmodule := algebraicIdealSpan h + mul_mem' := fun {x _} _ hy => algebraicIdealSpan_mul_left h x hy + star_mem' := algebraicIdealSpan_star h hh + +def generatedClosedIdeal (h : A) (hh : IsSelfAdjoint h) : NonUnitalStarSubalgebra ℂ A := + (algebraicIdealSubalgebra h hh).topologicalClosure + +instance (h : A) (hh : IsSelfAdjoint h) : IsClosed (generatedClosedIdeal h hh : Set A) := + NonUnitalStarSubalgebra.isClosed_topologicalClosure _ + +instance (h : A) (hh : IsSelfAdjoint h) : CompleteSpace (generatedClosedIdeal h hh) := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).isComplete.completeSpace_coe + +omit [PartialOrder A] [StarOrderedRing A] in +lemma generatedClosedIdeal_mul_left (h a : A) (hh : IsSelfAdjoint h) {x : A} + (hx : x ∈ generatedClosedIdeal h hh) : a*x ∈ generatedClosedIdeal h hh := by + apply closure_minimal _ ((NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage + (continuous_const.mul continuous_id)) hx + intro y hy + exact (algebraicIdealSubalgebra h hh).le_topologicalClosure (algebraicIdealSpan_mul_left h a hy) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma generatedClosedIdeal_mul_right (h a : A) (hh : IsSelfAdjoint h) {x : A} + (hx : x ∈ generatedClosedIdeal h hh) : x*a ∈ generatedClosedIdeal h hh := by + apply closure_minimal _ ((NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage + (continuous_id.mul continuous_const)) hx + intro y hy + exact (algebraicIdealSubalgebra h hh).le_topologicalClosure (algebraicIdealSpan_mul_right h a hy) + +lemma hereditary_le_generatedClosedIdeal (h : A) (hh : IsSelfAdjoint h) : + hereditarySubalgebra h hh ≤ generatedClosedIdeal h hh := by + intro x hx + apply closure_minimal _ (NonUnitalStarSubalgebra.isClosed_topologicalClosure _) hx + rintro _ ⟨a,rfl⟩ + have ht : Filter.Tendsto (fun e : A => (h*a)*h*e) (CStarAlgebra.approximateUnit A) + (𝓝 (h*a*h)) := (CStarAlgebra.increasingApproximateUnit A).tendsto_mul_left _ + exact (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).mem_of_tendsto ht + (Filter.Eventually.of_forall (fun e => (algebraicIdealSubalgebra h hh).le_topologicalClosure + (Submodule.subset_span ⟨(h*a,e),rfl⟩))) + +lemma self_mem_generatedClosedIdeal (h : A) (hh : 0 ≤ h) : + h ∈ generatedClosedIdeal h hh.isSelfAdjoint := + hereditary_le_generatedClosedIdeal h hh.isSelfAdjoint (self_mem_hereditary h hh) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IndividualInfiniteness.lean b/lean/OAI/Analysis/WeakInfiniteness/IndividualInfiniteness.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f8ae73fb5cd9421be62bb98d7ddebe9c3cb4baa --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IndividualInfiniteness.lean @@ -0,0 +1,178 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IdealComparison2 +import OAI.Analysis.WeakInfiniteness.PrimitiveIdealTest +import OAI.Analysis.WeakInfiniteness.SquareZero6 +import OAI.Analysis.WeakInfiniteness.SquareZeroComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter + +open scoped Topology CStarAlgebra + +universe u + +section General + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma properlyInfinite_zero (m : Type*) [Fintype m] : + ProperlyInfinite (0 : CStarMatrix m m A) := by + intro ε hε + refine ⟨0,?_⟩ + have hb : blockSum (0 : CStarMatrix m m A) (0 : CStarMatrix m m A)=0 := by ext i j; cases i <;> cases j <;> rfl + simpa only [CStarMatrix.mul_zero,CStarMatrix.zero_mul,hb,sub_zero,norm_zero] using hε + +lemma weak_amplification_all {n : ℕ} + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {a : A} (ha : 0 ≤ a) : ProperlyInfinite (diagonalCopies n a) := by + by_cases h : a=0 + · subst a + have he : diagonalCopies n (0 : A)=0 := (diagonalHom n).map_zero + rw [he] + exact properlyInfinite_zero _ + · exact hpi a ha h + +lemma norm_sub_positiveCut_le {a : A} (ha : 0 ≤ a) {r : ℝ} (hr : 0 ≤ r) : + ‖a-positiveCut r a‖ ≤ r := by + have he : a-positiveCut r a=cfcₙ (fun t : ℝ => t-max (t-r) 0) a := by + rw [cfcₙ_sub (fun t : ℝ => t) (fun t : ℝ => max (t-r) 0) a + (by fun_prop) rfl (by fun_prop) (by simpa using (max_eq_right (neg_nonpos.mpr hr)))] + change a-positiveCut r a=cfcₙ (id : ℝ → ℝ) a-positiveCut r a + rw [cfcₙ_id ℝ a ha.isSelfAdjoint] + rw [he] + apply norm_cfcₙ_le + intro t ht + have ht0 : 0 ≤ t := NonnegSpectrumClass.nonneg_of_mem_quasispectrum ha ht + rw [Real.norm_eq_abs] + apply abs_le.mpr + constructor + · have : max (t-r) 0 ≤ t := max_le (by linarith) ht0 + linarith + · have := le_max_left (t-r) 0 + linarith + +omit [PartialOrder A] [StarOrderedRing A] in +lemma blockSum_diagonalCopies_one (a : A) : + matrixSubmatrix (finSumFinEquiv : Fin 1 ⊕ Fin 1 → Fin 2) finSumFinEquiv + (diagonalCopies 2 a)=blockSum (diagonalCopies 1 a) (diagonalCopies 1 a) := by + have he := congrArg + (matrixSubmatrix (finSumFinEquiv : Fin 1 ⊕ Fin 1 → Fin 2) finSumFinEquiv) + (diagonalCopies_double a 1) + have hleft : matrixSubmatrix finSumFinEquiv finSumFinEquiv + (matrixSubmatrix finSumFinEquiv.symm finSumFinEquiv.symm + (blockSum (diagonalCopies 1 a) (diagonalCopies 1 a)))= + blockSum (diagonalCopies 1 a) (diagonalCopies 1 a) := by + ext i j + simp only [matrixSubmatrix,Equiv.symm_apply_apply] + rw [hleft] at he + exact he.symm + +lemma properlyInfinite_of_cuts {a : A} (ha : 0 ≤ a) + (hcuts : ∀ r : ℝ,0 < r → + CuntzSubequiv (diagonalCopies 2 (positiveCut r a)) (diagonalCopies 1 a)) : + ProperlyInfinite (diagonalCopies 1 a) := by + have hc : CuntzSubequiv (diagonalCopies 2 a) (diagonalCopies 1 a) := by + intro ε hε + obtain ⟨v,hv⟩ := hcuts (ε/3) (by positivity) (ε/3) (by positivity) + refine ⟨v,?_⟩ + have hn := NonUnitalStarAlgHom.norm_apply_le (diagonalHom (A := A) 2) + (a-positiveCut (ε/3) a) + rw [map_sub] at hn + have hn' := norm_sub_positiveCut_le ha (by positivity : 0 ≤ ε/3) + have he : v.conjTranspose*diagonalCopies 1 a*v-diagonalCopies 2 a = + (v.conjTranspose*diagonalCopies 1 a*v-diagonalCopies 2 (positiveCut (ε/3) a))+ + (diagonalCopies 2 (positiveCut (ε/3) a)-diagonalCopies 2 a) := by abel + rw [he] + have ht := norm_add_le + (v.conjTranspose*diagonalCopies 1 a*v-diagonalCopies 2 (positiveCut (ε/3) a)) + (diagonalCopies 2 (positiveCut (ε/3) a)-diagonalCopies 2 a) + rw [norm_sub_rev (diagonalCopies 2 (positiveCut (ε/3) a))] at ht + exact lt_of_le_of_lt ht (by change ‖_-_‖+‖(diagonalHom 2) a-(diagonalHom 2) (positiveCut (ε/3) a)‖<ε; linarith) + have h := hc.submatrix_left (finSumFinEquiv : Fin 1 ⊕ Fin 1 → Fin 2) + rw [blockSum_diagonalCopies_one] at h + exact h + +end General + +section UniverseOne + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_binary_splitting_over_norm_slice_one + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {a : A} (ha : 0 ≤ a) {r : ℝ} (hr : 0 < r) (j : ℕ) : + ∃ z : A,0 ≤ z ∧ CuntzSubequiv (diagonalCopies (2^j) z) (diagonalCopies 1 a) ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),r ≤ ‖π a‖ → π z ≠ 0 := by + induction j with + | zero => + refine ⟨a,ha,cuntzSubequiv_refl _,?_⟩ + intro H π hπ hnz + rw [hnz,norm_zero] at hπ + linarith + | succ j ih => + obtain ⟨z,hz,hza,hzn⟩ := ih + have hlocal : NonzeroOnNormSlice (hereditarySubalgebra z hz.isSelfAdjoint) a r := by + intro H π _ hπa + exact ⟨z,self_mem_hereditary z hz,hz,hzn H π hπa⟩ + obtain ⟨x,hx,hxx,hxn⟩ := exists_square_zero_on_norm_slice_one hA hn hpi + (hereditarySubalgebra z hz.isSelfAdjoint) (hereditarySubalgebra_inner z hz.isSelfAdjoint) ha hr hlocal + refine ⟨star x*x,star_mul_self_nonneg x, + ((square_zero_two_copies hz hx hxx).power_two_binary j).trans hza,?_⟩ + intro H π hπa + rw [map_mul,map_star] + exact (CStarRing.star_mul_self_eq_zero_iff (π x)).not.mpr (hxn H π hπa) + +theorem exact_weaklyPurelyInfinite_individuallyProperlyInfinite_one + (hA : Exact A) (hW : WeaklyPurelyInfinite A) {a : A} (ha : 0 ≤ a) : + ProperlyInfinite (diagonalCopies 1 a) := by + obtain ⟨n,hn,hpi⟩ := hW + apply properlyInfinite_of_cuts ha + intro r hr + obtain ⟨z,hz,hza,hzn⟩ := exists_binary_splitting_over_norm_slice_one hA hn hpi ha hr n + have hznn : CuntzSubequiv (diagonalCopies n z) (diagonalCopies 1 a) := + (diagonalCopies_cuntzSubequiv z (Nat.lt_two_pow_self (n := n)).le).trans hza + have hcut : positiveCut r a ∈ generatedClosedIdeal z hz.isSelfAdjoint := by + apply mem_closed_ideal_of_irreducible_test _ + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _) + (fun x hx d => generatedClosedIdeal_mul_left z d hz.isSelfAdjoint hx) + (fun x hx d => generatedClosedIdeal_mul_right z d hz.isSelfAdjoint hx) + (positiveCut_nonneg r a) + intro H π _ hπI + have hpiz : π z=0 := hπI z (self_mem_generatedClosedIdeal z hz) + have hnorm : ‖π a‖ ≤ r := (lt_of_not_ge (fun h => hzn H π h hpiz)).le + have he := π.map_cfcₙ (fun t : ℝ => max (t-r) 0) a (by fun_prop) + (by simpa using max_eq_right (neg_nonpos.mpr hr.le)) (by fun_prop) + ha.isSelfAdjoint (map_nonneg π ha).isSelfAdjoint + change π (positiveCut r a)=positiveCut r (π a) at he + rw [he] + exact positiveCut_eq_zero_of_norm_le _ hr.le hnorm + exact (generatedClosedIdeal_copies_cuntz hz (positiveCut_nonneg r a) hn + (weak_amplification_all hpi hz) hcut 2).trans hznn + +end UniverseOne + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/InnerNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/InnerNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..3eb3ff17b44e2f7f5bc641f129db754ec56400ac --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/InnerNorm.lean @@ -0,0 +1,51 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UnitaryIntertwining + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u + +variable {B : Type u} [NonUnitalCStarAlgebra B] + +lemma norm_unitizationInnerFun_sub (u : unitary (Unitization ℂ B)) (b : B) : + ‖unitizationInnerFun u b-b‖=‖(u.val.snd)*b-b*(u.val.snd)‖ := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (unitizationInnerFun u b-b), + Unitization.inr_sub,inr_unitizationInnerFun,Unitary.conjStarAlgAut_apply] + have he : u.val*(b:Unitization ℂ B)*star u.val-(b:Unitization ℂ B)= + (u.val*(b:Unitization ℂ B)-(b:Unitization ℂ B)*u.val)*star u.val := by + rw [sub_mul,mul_assoc (b:Unitization ℂ B),Unitary.mul_star_self_of_mem u.property, mul_one] + rw [he] + have hu : star u.val=(star u).val := rfl + rw [hu,CStarRing.norm_mul_coe_unitary] + have hc : u.val*(b:Unitization ℂ B)-(b:Unitization ℂ B)*u.val= + ((u.val.snd*b-b*u.val.snd : B):Unitization ℂ B) := by + apply Unitization.ext + · simp [sub_eq_add_neg] + · simp only [sub_eq_add_neg,Unitization.snd_add,Unitization.snd_neg,Unitization.snd_mul,Unitization.fst_inr, + Unitization.snd_inr,zero_smul,add_zero,zero_add] + abel + rw [hc,Unitization.norm_inr] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/InnerSubalgebras.lean b/lean/OAI/Analysis/WeakInfiniteness/InnerSubalgebras.lean new file mode 100644 index 0000000000000000000000000000000000000000..caa947a15bf2c09beb03b0ec92e62a20d2c213b4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/InnerSubalgebras.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Hereditary + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +def IsClosedInner (D : NonUnitalStarSubalgebra ℂ A) : Prop := + IsClosed (D : Set A) ∧ ∀ a ∈ D, ∀ b ∈ D, ∀ x : A, a*x*b ∈ D + +lemma hereditarySubalgebra_inner (h : A) (hh : IsSelfAdjoint h) : + IsClosedInner (hereditarySubalgebra h hh) := by + refine ⟨NonUnitalStarSubalgebra.isClosed_topologicalClosure _,?_⟩ + intro a ha b hb x + have hc : IsClosed {a : A | a*x*b ∈ hereditarySubalgebra h hh} := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage (by fun_prop) + apply closure_minimal _ hc ha + rintro _ ⟨u,rfl⟩ + have hc' : IsClosed {b : A | (h*u*h)*x*b ∈ hereditarySubalgebra h hh} := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage (by fun_prop) + apply closure_minimal _ hc' hb + rintro _ ⟨v,rfl⟩ + have he : (h*u*h)*x*(h*v*h)=h*(u*h*x*h*v)*h := by noncomm_ring + change (h*u*h)*x*(h*v*h) ∈ hereditarySubalgebra h hh + rw [he] + exact sandwich_mem h (u*h*x*h*v) hh + +lemma hereditarySubalgebra_le_of_mem {D : NonUnitalStarSubalgebra ℂ A} + (hD : IsClosedInner D) {h : A} (hh : IsSelfAdjoint h) (hm : h ∈ D) : + hereditarySubalgebra h hh ≤ D := by + intro a ha + apply closure_minimal _ hD.1 ha + rintro _ ⟨x,rfl⟩ + exact hD.2 h hm h hm x + +lemma IsClosedInner.symmetrized_corner_mem {D : NonUnitalStarSubalgebra ℂ A} + (hD : IsClosedInner D) {p q : A} (hp : p ∈ D) (hq : q ∈ D) (x : A) : + p*x*q+star (p*x*q) ∈ D := + D.add_mem (hD.2 p hp q hq x) (star_mem (s := D) (hD.2 p hp q hq x)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/Intertwining.lean b/lean/OAI/Analysis/WeakInfiniteness/Intertwining.lean new file mode 100644 index 0000000000000000000000000000000000000000..8979e1beb32b1cca0d0c590ee6481bc0778cb374 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/Intertwining.lean @@ -0,0 +1,82 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] + +local instance : Algebra ℝ (B × B) := Algebra.complexToReal + +def intertwiningAlgebra (D : B) : StarSubalgebra ℂ (B × B) where + carrier := {z | z.1*D=D*z.2 ∧ star D*z.1=z.2*star D} + zero_mem' := by simp + one_mem' := by simp + add_mem' := by + rintro ⟨x₁,x₂⟩ ⟨y₁,y₂⟩ ⟨hx,hx'⟩ ⟨hy,hy'⟩ + constructor <;> dsimp at * + · simp only [add_mul,mul_add,hx,hy] + · simp only [add_mul,mul_add,hx',hy'] + mul_mem' := by + rintro ⟨x₁,x₂⟩ ⟨y₁,y₂⟩ ⟨hx,hx'⟩ ⟨hy,hy'⟩ + constructor <;> dsimp at * + · rw [mul_assoc,hy,← mul_assoc,hx,mul_assoc] + · rw [← mul_assoc,hx',mul_assoc,hy',← mul_assoc] + algebraMap_mem' := by intro c; simp only [Set.mem_ofPred_eq,Prod.algebraMap_apply]; constructor <;> simp [Algebra.commutes] + star_mem' := by + rintro ⟨x₁,x₂⟩ ⟨hx,hx'⟩ + constructor <;> dsimp at * + · simpa only [star_mul,star_star] using congrArg star hx' + · simpa only [star_mul,star_star] using congrArg star hx + +instance intertwiningAlgebra_isClosed (D : B) : IsClosed (intertwiningAlgebra D : Set (B × B)) := by + change IsClosed {z : B × B | z.1*D=D*z.2 ∧ star D*z.1=z.2*star D} + exact (isClosed_eq (by fun_prop) (by fun_prop)).inter (isClosed_eq (by fun_prop) (by fun_prop)) + +lemma cfc_star_mul_intertwine (D : B) (f : ℝ → ℝ) (hf : Continuous f) : + cfc f (D*star D)*D=D*cfc f (star D*D) := by + have hm : (D*star D,star D*D) ∈ intertwiningAlgebra D := by + constructor <;> simp only [mul_assoc] + have h := cfc_mem f hm + have hprod : IsSelfAdjoint (D*star D,star D*D) := by + change star (D*star D,star D*D)=(D*star D,star D*D) + apply Prod.ext + · exact IsSelfAdjoint.mul_star_self D + · exact IsSelfAdjoint.star_mul_self D + have hfst := (StarAlgHom.fst ℂ B B).map_cfc f (D*star D,star D*D) + hf.continuousOn continuous_fst hprod (IsSelfAdjoint.mul_star_self D) + have hsnd := (StarAlgHom.snd ℂ B B).map_cfc f (D*star D,star D*D) + hf.continuousOn continuous_snd hprod (IsSelfAdjoint.star_mul_self D) + change (cfc f (D*star D,star D*D)).1=cfc f (D*star D) at hfst + change (cfc f (D*star D,star D*D)).2=cfc f (star D*D) at hsnd + change (cfc f (D*star D,star D*D)).1*D=D*(cfc f (D*star D,star D*D)).2 ∧ _ at h + rw [hfst,hsnd] at h + exact h.1 + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IntertwiningConstruction.lean b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..f783317bac419c62217284440f4e66e2b82abf39 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningConstruction.lean @@ -0,0 +1,127 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IntertwiningLimit + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter Topology + +universe u v + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def FiniteIntertwining (φ : A →⋆ₙₐ[ℂ] B) : Prop := + ∀ (E : Finset A) (F : Finset B) (ε : ℝ), 0 < ε → + ∃ β : B ≃⋆ₐ[ℂ] B, + (∀ a ∈ E, dist (β (φ a)) (φ a) < ε) ∧ + ∀ b ∈ F, ∃ a : A, dist (β (φ a)) b < ε + +structure IntertwiningState (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] where + automorphism : B ≃⋆ₐ[ℂ] B + tests : Finset A + +def IntertwiningState.map (φ : A →⋆ₙₐ[ℂ] B) (p : IntertwiningState A B) : A →⋆ₙₐ[ℂ] B := + p.automorphism.toNonUnitalStarAlgHom.comp φ + +def IntertwiningStep (φ : A →⋆ₙₐ[ℂ] B) (d : ℕ → A) (b : ℕ → B) (n : ℕ) + (p q : IntertwiningState A B) : Prop := + p.tests ⊆ q.tests ∧ d n ∈ q.tests ∧ + (∀ a ∈ p.tests, dist (p.map φ a) (q.map φ a) ≤ (1/2 : ℝ)^n) ∧ + ∀ i ≤ n, ∃ a ∈ q.tests, dist (q.map φ a) (b i) ≤ (1/2 : ℝ)^n + +lemma exists_intertwiningStep (φ : A →⋆ₙₐ[ℂ] B) (h : FiniteIntertwining φ) + (d : ℕ → A) (b : ℕ → B) (n : ℕ) (p : IntertwiningState A B) : + ∃ q, IntertwiningStep φ d b n p q := by + classical + let F : Finset B := Finset.univ.image (fun i : Fin (n+1) => p.automorphism.symm (b i)) + obtain ⟨β,hβ,hF⟩ := h p.tests F ((1/2 : ℝ)^n) (by positivity) + have hc : ∀ i : Fin (n+1), ∃ a : A, + dist (p.automorphism (β (φ a))) (b i) ≤ (1/2 : ℝ)^n := by + intro i + obtain ⟨a,ha⟩ := hF (p.automorphism.symm (b i)) (Finset.mem_image.mpr ⟨i,Finset.mem_univ _,rfl⟩) + refine ⟨a,?_⟩ + have he := (StarAlgEquiv.isometry p.automorphism).dist_eq (β (φ a)) (p.automorphism.symm (b i)) + rw [p.automorphism.apply_symm_apply] at he + exact he.trans_le ha.le + choose c hc using hc + let E := p.tests ∪ {d n} ∪ Finset.univ.image c + let q : IntertwiningState A B := ⟨β.trans p.automorphism,E⟩ + refine ⟨q,?_,?_,?_,?_⟩ + · intro a ha + exact Finset.mem_union_left _ (Finset.mem_union_left _ ha) + · exact Finset.mem_union_left _ (Finset.mem_union_right _ (Finset.mem_singleton_self _)) + · intro a ha + change dist (p.automorphism (φ a)) (p.automorphism (β (φ a))) ≤ _ + rw [(StarAlgEquiv.isometry p.automorphism).dist_eq,dist_comm] + exact (hβ a ha).le + · intro i hi + let j : Fin (n+1) := ⟨i,Nat.lt_succ_of_le hi⟩ + refine ⟨c j,Finset.mem_union_right _ (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩),hc j⟩ + +def intertwiningStages (φ : A →⋆ₙₐ[ℂ] B) (h : FiniteIntertwining φ) + (d : ℕ → A) (b : ℕ → B) : ℕ → IntertwiningState A B := + Nat.rec ⟨StarAlgEquiv.refl ℂ B,∅⟩ + (fun n p => Classical.choose (exists_intertwiningStep φ h d b n p)) + +lemma intertwiningStages_step (φ : A →⋆ₙₐ[ℂ] B) (h : FiniteIntertwining φ) + (d : ℕ → A) (b : ℕ → B) (n : ℕ) : + IntertwiningStep φ d b n (intertwiningStages φ h d b n) (intertwiningStages φ h d b (n+1)) := + Classical.choose_spec (exists_intertwiningStep φ h d b n (intertwiningStages φ h d b n)) + +lemma intertwiningStages_tests_mono (φ : A →⋆ₙₐ[ℂ] B) (h : FiniteIntertwining φ) + (d : ℕ → A) (b : ℕ → B) : Monotone (fun n => (intertwiningStages φ h d b n).tests) := by + apply monotone_nat_of_le_succ + intro n + exact (intertwiningStages_step φ h d b n).1 + +lemma intertwiningStages_isometry (φ : A →⋆ₙₐ[ℂ] B) (hi : Isometry φ) + (h : FiniteIntertwining φ) (d : ℕ → A) (b : ℕ → B) (n : ℕ) : + Isometry ((intertwiningStages φ h d b n).map φ) := by + change Isometry ((intertwiningStages φ h d b n).automorphism ∘ φ) + exact (StarAlgEquiv.isometry _).comp hi + +lemma intertwiningStages_cauchy_test (φ : A →⋆ₙₐ[ℂ] B) (h : FiniteIntertwining φ) + (d : ℕ → A) (b : ℕ → B) (N : ℕ) (a : A) + (ha : a ∈ (intertwiningStages φ h d b N).tests) : + CauchySeq (fun n => (intertwiningStages φ h d b n).map φ a) := by + have hc : CauchySeq (fun n => (intertwiningStages φ h d b (N+n)).map φ a) := by + apply cauchySeq_of_dist_le_of_summable (fun n => (1/2 : ℝ)^(N+n)) + · intro n + exact (intertwiningStages_step φ h d b (N+n)).2.2.1 a + (intertwiningStages_tests_mono φ h d b (Nat.le_add_right _ _) ha) + · exact (summable_geometric_of_norm_lt_one (by norm_num : ‖(1/2 : ℝ)‖ < 1)).comp_injective + (add_right_injective N) + apply (cauchySeq_shift N).mp + simpa only [Nat.add_comm] using hc + +lemma intertwiningStages_cauchy (φ : A →⋆ₙₐ[ℂ] B) (hi : Isometry φ) + (h : FiniteIntertwining φ) (d : ℕ → A) (hd : DenseRange d) (b : ℕ → B) (a : A) : + CauchySeq (fun n => (intertwiningStages φ h d b n).map φ a) := by + apply cauchySeq_isometries_of_dense d hd _ (intertwiningStages_isometry φ hi h d b) + intro i + exact intertwiningStages_cauchy_test φ h d b (i+1) (d i) + (intertwiningStages_step φ h d b i).2.1 + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IntertwiningEquiv.lean b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..0bf1404de72725bd7a3788b996dbae58b3e58599 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningEquiv.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IntertwiningConstruction + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter Topology TopologicalSpace + +universe u v + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma intertwiningStages_dist_limit (φ : A →⋆ₙₐ[ℂ] B) (hi : Isometry φ) + (h : FiniteIntertwining φ) (d : ℕ → A) (hd : DenseRange d) (b : ℕ → B) + (N : ℕ) (a : A) (ha : a ∈ (intertwiningStages φ h d b N).tests) : + dist ((intertwiningStages φ h d b N).map φ a) + (starHomLimit (fun n => (intertwiningStages φ h d b n).map φ) + (intertwiningStages_cauchy φ hi h d hd b) a) ≤ 2*(1/2 : ℝ)^N := by + let f := fun n => (intertwiningStages φ h d b n).map φ + let hf := intertwiningStages_cauchy φ hi h d hd b + have hs : Summable (fun n => (1/2 : ℝ)^(N+n)) := + (summable_geometric_of_norm_lt_one (by norm_num : ‖(1/2 : ℝ)‖ < 1)).comp_injective + (add_right_injective N) + have ht : Tendsto (fun n => N+n) atTop atTop := by + simpa only [Nat.add_comm] using (tendsto_add_atTop_nat N) + have hc := (starHomLimitFun_tendsto f hf a).comp ht + have hb : ∀ n,dist (f (N+n) a) (f (N+(n+1)) a) ≤ (1/2 : ℝ)^(N+n) := by + intro n + exact (intertwiningStages_step φ h d b (N+n)).2.2.1 a + (intertwiningStages_tests_mono φ h d b (Nat.le_add_right _ _) ha) + have he := dist_le_tsum_of_dist_le_of_tendsto₀ _ hb hs hc + change dist (f N a) (starHomLimitFun f hf a) ≤ _ + calc + dist (f N a) (starHomLimitFun f hf a) ≤ ∑' n,(1/2 : ℝ)^(N+n) := by + simpa only [Nat.add_zero] using he + _ = (1/2 : ℝ)^N * ∑' n,(1/2 : ℝ)^n := by + simp only [pow_add,tsum_mul_left] + _ = 2*(1/2 : ℝ)^N := by + rw [tsum_geometric_of_norm_lt_one (by norm_num : ‖(1/2 : ℝ)‖ < 1)] + ring + +lemma intertwiningStages_dense_limit (φ : A →⋆ₙₐ[ℂ] B) (hi : Isometry φ) + (h : FiniteIntertwining φ) (d : ℕ → A) (hd : DenseRange d) + (b : ℕ → B) (hb : DenseRange b) : + DenseRange (starHomLimit (fun n => (intertwiningStages φ h d b n).map φ) + (intertwiningStages_cauchy φ hi h d hd b)) := by + let f := fun n => (intertwiningStages φ h d b n).map φ + let hf := intertwiningStages_cauchy φ hi h d hd b + let g := starHomLimit f hf + have ht : Tendsto (fun n => 2*(1/2 : ℝ)^n) atTop (𝓝 0) := by + simpa only [mul_zero] using (tendsto_const_nhds.mul + (tendsto_pow_atTop_nhds_zero_of_lt_one (by norm_num : (0:ℝ) ≤ 1/2) + (by norm_num : (1/2 : ℝ) < 1)) : + Tendsto (fun n => 2*(1/2 : ℝ)^n) atTop (𝓝 (2*0))) + have hcl : Set.range b ⊆ closure (Set.range g) := by + rintro _ ⟨i,rfl⟩ + apply Metric.mem_closure_iff.mpr + intro ε hε + obtain ⟨N,hN⟩ := eventually_atTop.mp (ht.eventually_lt_const hε) + let n := max i N + obtain ⟨a,ha,hea⟩ := (intertwiningStages_step φ h d b n).2.2.2 i (le_max_left _ _) + have hel := intertwiningStages_dist_limit φ hi h d hd b (n+1) a ha + refine ⟨g a,⟨a,rfl⟩,?_⟩ + have htri := dist_triangle (b i) (f (n+1) a) (g a) + rw [dist_comm (b i) (f (n+1) a)] at htri + have he : (1/2 : ℝ)^n + 2*(1/2 : ℝ)^(n+1) = 2*(1/2 : ℝ)^n := by + rw [pow_succ]; ring + have hle : dist (b i) (g a) ≤ 2*(1/2 : ℝ)^n := by + calc + dist (b i) (g a) ≤ dist (f (n+1) a) (b i) + dist (f (n+1) a) (g a) := htri + _ ≤ (1/2 : ℝ)^n + 2*(1/2 : ℝ)^(n+1) := add_le_add hea hel + _ = _ := he + exact hle.trans_lt (hN n (le_max_right _ _)) + intro y + exact closure_minimal hcl isClosed_closure (hb y) + +def finiteIntertwiningStarEquiv [SeparableSpace A] [SeparableSpace B] + (φ : A →⋆ₙₐ[ℂ] B) (hi : Isometry φ) (h : FiniteIntertwining φ) : A ≃⋆ₐ[ℂ] B := + starEquivOfConvergentIsometries + (fun n => (intertwiningStages φ h (denseSeq A) (denseSeq B) n).map φ) + (intertwiningStages_cauchy φ hi h (denseSeq A) (denseRange_denseSeq A) (denseSeq B)) + (intertwiningStages_isometry φ hi h (denseSeq A) (denseSeq B)) + (intertwiningStages_dense_limit φ hi h (denseSeq A) (denseRange_denseSeq A) + (denseSeq B) (denseRange_denseSeq B)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IntertwiningLimit.lean b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..889aae07f13332e13535350bb5dd2b40317db361 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IntertwiningLimit.lean @@ -0,0 +1,93 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter Topology + +universe u v + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def starHomLimitFun (f : ℕ → A →⋆ₙₐ[ℂ] B) (hf : ∀ a,CauchySeq (fun n => f n a)) (a : A) : B := + Classical.choose (cauchySeq_tendsto_of_complete (hf a)) + +lemma starHomLimitFun_tendsto (f : ℕ → A →⋆ₙₐ[ℂ] B) (hf : ∀ a,CauchySeq (fun n => f n a)) + (a : A) : Tendsto (fun n => f n a) atTop (𝓝 (starHomLimitFun f hf a)) := + Classical.choose_spec (cauchySeq_tendsto_of_complete (hf a)) + +def starHomLimit (f : ℕ → A →⋆ₙₐ[ℂ] B) (hf : ∀ a,CauchySeq (fun n => f n a)) : A →⋆ₙₐ[ℂ] B where + toFun := starHomLimitFun f hf + map_zero' := by + apply tendsto_nhds_unique (starHomLimitFun_tendsto f hf 0) + simpa only [map_zero] using (tendsto_const_nhds : Tendsto (fun _ : ℕ => (0:B)) atTop (𝓝 0)) + map_add' a b := by + apply tendsto_nhds_unique (starHomLimitFun_tendsto f hf (a+b)) + simpa only [map_add] using (starHomLimitFun_tendsto f hf a).add (starHomLimitFun_tendsto f hf b) + map_mul' a b := by + apply tendsto_nhds_unique (starHomLimitFun_tendsto f hf (a*b)) + simpa only [map_mul] using (starHomLimitFun_tendsto f hf a).mul (starHomLimitFun_tendsto f hf b) + map_smul' t a := by + apply tendsto_nhds_unique (starHomLimitFun_tendsto f hf (t • a)) + simpa only [map_smul,MonoidHom.id_apply] using (starHomLimitFun_tendsto f hf a).const_smul t + map_star' a := by + apply tendsto_nhds_unique (starHomLimitFun_tendsto f hf (star a)) + simpa only [map_star] using (starHomLimitFun_tendsto f hf a).star + +lemma starHomLimit_isometry (f : ℕ → A →⋆ₙₐ[ℂ] B) + (hf : ∀ a,CauchySeq (fun n => f n a)) (hi : ∀ n,Isometry (f n)) : + Isometry (starHomLimit f hf) := by + apply Isometry.of_dist_eq + intro a b + have ht := (starHomLimitFun_tendsto f hf a).dist (starHomLimitFun_tendsto f hf b) + change dist (starHomLimitFun f hf a) (starHomLimitFun f hf b)=dist a b + apply tendsto_nhds_unique ht + simpa only [(hi _).dist_eq] using + (tendsto_const_nhds : Tendsto (fun _ : ℕ => dist a b) atTop (𝓝 (dist a b))) + +lemma cauchySeq_isometries_of_dense {ι : Type*} (d : ι → A) (hd : DenseRange d) + (f : ℕ → A →⋆ₙₐ[ℂ] B) (hi : ∀ n,Isometry (f n)) + (hc : ∀ i,CauchySeq (fun n => f n (d i))) (a : A) : CauchySeq (fun n => f n a) := by + rw [Metric.cauchySeq_iff] + intro ε hε + obtain ⟨i,hiε⟩ := Metric.denseRange_iff.mp hd a (ε/3) (by positivity) + obtain ⟨N,hN⟩ := Metric.cauchySeq_iff.mp (hc i) (ε/3) (by positivity) + refine ⟨N,fun m hm n hn => ?_⟩ + have he := dist_triangle4 (f m a) (f m (d i)) (f n (d i)) (f n a) + rw [(hi m).dist_eq,(hi n).dist_eq,dist_comm (d i) a] at he + have hmid := hN m hm n hn + linarith + +def starEquivOfConvergentIsometries (f : ℕ → A →⋆ₙₐ[ℂ] B) + (hf : ∀ a,CauchySeq (fun n => f n a)) (hi : ∀ n,Isometry (f n)) + (hd : DenseRange (starHomLimit f hf)) : A ≃⋆ₐ[ℂ] B := by + let g := starHomLimit f hf + have hg : Isometry g := starHomLimit_isometry f hf hi + have hs : Function.Surjective g := by + intro b + have h := hd b + rwa [hg.isClosedEmbedding.isClosed_range.closure_eq] at h + exact StarAlgEquiv.ofBijective g ⟨hg.injective,hs⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/InvariantSubspaces.lean b/lean/OAI/Analysis/WeakInfiniteness/InvariantSubspaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..20c421af69fa5a143ea95b5112dbbf6d63a7150b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/InvariantSubspaces.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.VectorStates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +variable {A H : Type*} [CStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +def RepresentationInvariant (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (S : Submodule ℂ H) : Prop := + ∀ a : A,∀ x ∈ S,π a x ∈ S + +def RepresentationIrreducible (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) : Prop := + ∀ S : Submodule ℂ H,IsClosed (S : Set H) → RepresentationInvariant π S → S=⊥ ∨ S=⊤ + +lemma RepresentationInvariant.orthogonal {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} + {S : Submodule ℂ H} (hS : RepresentationInvariant π S) : + RepresentationInvariant π Sᗮ := by + intro a x hx y hy + have ho := hx (π (star a) y) (hS (star a) y hy) + rw [map_star] at ho + change inner ℂ ((π a).adjoint y) x=0 at ho + rwa [ContinuousLinearMap.adjoint_inner_left] at ho + +lemma RepresentationInvariant.projection_commutes {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} + {S : Submodule ℂ H} [S.HasOrthogonalProjection] (hS : RepresentationInvariant π S) + (a : A) (x : H) : S.starProjection (π a x)= π a (S.starProjection x) := by + apply S.eq_starProjection_of_mem_orthogonal + · exact hS a _ (S.starProjection_apply_mem x) + · rw [← map_sub] + exact hS.orthogonal a _ (S.sub_starProjection_mem_orthogonal x) + +lemma RepresentationInvariant.vectorFunctional_decomposition {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} + {S : Submodule ℂ H} [S.HasOrthogonalProjection] (hS : RepresentationInvariant π S) + (x : H) : representationVectorFunctional π x = + representationVectorFunctional π (S.starProjection x)+ + representationVectorFunctional π (Sᗮ.starProjection x) := by + ext b + change (inner ℂ x (π (b : A) x)).re= + (inner ℂ (S.starProjection x) (π (b : A) (S.starProjection x))).re+ + (inner ℂ (Sᗮ.starProjection x) (π (b : A) (Sᗮ.starProjection x))).re + have hxy : inner ℂ (S.starProjection x) (π (b : A) (Sᗮ.starProjection x))=0 := + hS.orthogonal (b : A) _ (Sᗮ.starProjection_apply_mem x) _ (S.starProjection_apply_mem x) + have hyx : inner ℂ (Sᗮ.starProjection x) (π (b : A) (S.starProjection x))=0 := + inner_eq_zero_symm.mpr ((Sᗮ.starProjection_apply_mem x) _ (hS (b : A) _ (S.starProjection_apply_mem x))) + conv_lhs => rw [← S.starProjection_add_starProjection_orthogonal x] + simp only [map_add,inner_add_left,inner_add_right,hxy,hyx,add_zero,zero_add,Complex.add_re] + +variable [PartialOrder A] [StarOrderedRing A] + +lemma gnsAction_cyclic_eq (f : A →ₚ[ℂ] ℂ) (a : A) : + f.gnsStarAlgHom a (gnsCyclicVector f)=(f.toPreGNS a : f.GNS) := by + change f.gnsNonUnitalStarAlgHom a (f.toPreGNS 1 : f.GNS)=_ + rw [PositiveLinearMap.gnsNonUnitalStarAlgHom_apply_coe] + change ((f.toPreGNS (a*1)) : f.GNS)=_ + rw [mul_one] + +lemma gnsAction_cyclic_dense (f : A →ₚ[ℂ] ℂ) : + DenseRange (fun a : A => f.gnsStarAlgHom a (gnsCyclicVector f)) := by + have hr : Set.range (fun a : A => f.gnsStarAlgHom a (gnsCyclicVector f))= + Set.range (fun a : f.PreGNS => (a : f.GNS)) := by + ext x + constructor + · rintro ⟨a,rfl⟩ + exact ⟨f.toPreGNS a,(gnsAction_cyclic_eq f a).symm⟩ + · rintro ⟨a,rfl⟩ + refine ⟨f.ofPreGNS a,?_⟩ + change f.gnsStarAlgHom (f.ofPreGNS a) (gnsCyclicVector f)=(a : f.GNS) + rw [gnsAction_cyclic_eq,PositiveLinearMap.toPreGNS_ofPreGNS] + change Dense (Set.range _) + rw [hr] + exact UniformSpace.Completion.denseRange_coe + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/IrreducibleOrbits.lean b/lean/OAI/Analysis/WeakInfiniteness/IrreducibleOrbits.lean new file mode 100644 index 0000000000000000000000000000000000000000..69aeca3d83c6778501926b5150517f92a21e84ee --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/IrreducibleOrbits.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.InvariantSubspaces + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +variable {A H : Type*} [CStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma RepresentationIrreducible.cyclic {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} + (hπ : RepresentationIrreducible π) {ξ : H} (hξ : ξ ≠ 0) : + DenseRange (fun a : A => π a ξ) := by + let l : A →ₗ[ℂ] H := + { toFun := fun a => π a ξ + map_add' := by intro a b; simp + map_smul' := by intro r a; simp } + let S := l.range.topologicalClosure + have hS : RepresentationInvariant π S := by + intro a x hx + change π a x ∈ closure (l.range : Set H) + apply map_mem_closure (π a).continuous hx + rintro _ ⟨b,rfl⟩ + exact ⟨a*b,by simp [l,map_mul]⟩ + obtain hs | hs := hπ S l.range.isClosed_topologicalClosure hS + · have hm : ξ ∈ S := l.range.le_topologicalClosure ⟨1,by simp [l]⟩ + rw [hs,Submodule.mem_bot] at hm + exact (hξ hm).elim + · change Dense (l.range : Set H) + exact Submodule.dense_iff_topologicalClosure_eq_top.mpr hs + +lemma RepresentationIrreducible.exists_mixed_nonzero {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} + (hπ : RepresentationIrreducible π) {u v : A} (hu : π u ≠ 0) (hv : π v ≠ 0) : + ∃ x : A,π (u*x*v) ≠ 0 := by + by_contra! hn + obtain ⟨ξ,hξ⟩ : ∃ ξ : H,π v ξ ≠ 0 := by + by_contra! h + exact hv (by ext ξ; exact h ξ) + have hz : ∀ η : H,π u η=0 := isClosed_property (hπ.cyclic hξ) + (isClosed_eq (π u).continuous continuous_const) (by + intro a + have hh := DFunLike.congr_fun (hn a) ξ + simpa only [map_mul,mul_apply_eq_comp,zero_apply] using hh) + exact hu (by ext η; exact hz η) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LiftedHilbert.lean b/lean/OAI/Analysis/WeakInfiniteness/LiftedHilbert.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec57d404eed50499373f65ff50c81d25ca658b84 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LiftedHilbert.lean @@ -0,0 +1,27 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +universe v + +instance uliftInnerProduct {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] : + InnerProductSpace ℂ (ULift.{v} H) where + inner x y := inner ℂ x.down y.down + norm_sq_eq_re_inner x := norm_sq_eq_re_inner x.down + conj_inner_symm x y := inner_conj_symm x.down y.down + add_left x y z := inner_add_left x.down y.down z.down + smul_left x y c := inner_smul_left x.down y.down c + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalCommon.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalCommon.lean new file mode 100644 index 0000000000000000000000000000000000000000..7bb5f964903f535ac11fcdff820e75cbb23adeeb --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalCommon.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteComparison +import OAI.Analysis.WeakInfiniteness.LocalConnection2 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma exists_local_common_element {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} (hπ : NonUnitalRepresentationIrreducible π) + {h k : A} (hh : 0 ≤ h) (hk : 0 ≤ k) (hhn : π h ≠ 0) (hkn : π k ≠ 0) : + ∃ c : A,0 ≤ c ∧ c ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ π c ≠ 0 ∧ + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h) ∧ + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k) := by + obtain ⟨x,hx,hxx⟩ := exists_orthogonal_detected_family hn hpi π n hh hhn + obtain ⟨y,hy,hyy⟩ := exists_orthogonal_detected_family hn hpi π n hk hkn + obtain ⟨d,hd,hdh,hdn,-,hdx⟩ := exists_local_common_family hπ hh hhn x (fun i => (hx i).2) + obtain ⟨c,hc,hcd,hcn,hccd,hcy⟩ := exists_local_common_family hπ hd hdn y (fun i => (hy i).2) + refine ⟨c,hc,hereditarySubalgebra_le_of_mem (hereditarySubalgebra_inner h hh.isSelfAdjoint) + hd.isSelfAdjoint hdh hcd,hcn,?_,?_⟩ + · exact copies_cuntz_of_common_orthogonal hh x (fun i => ⟨(hx i).2.1,(hx i).1⟩) + hxx (fun i => hccd.trans (hdx i)) + · exact copies_cuntz_of_common_orthogonal hk y (fun i => ⟨(hy i).2.1,(hy i).1⟩) hyy hcy + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalConnection.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalConnection.lean new file mode 100644 index 0000000000000000000000000000000000000000..3baa57da69b99b33e5a6a68dd46150045b53989a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalConnection.lean @@ -0,0 +1,62 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PerturbationRows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +abbrev ElementCuntzSubequiv (a b : A) : Prop := + CuntzSubequiv (diagonalCopies 1 a) (diagonalCopies 1 b) + +lemma elementCuntzSubequiv_iff {a b : A} : ElementCuntzSubequiv a b ↔ + ∀ ε : ℝ,0 < ε → ∃ v : A,‖star v*b*v-a‖ < ε := by + constructor + · intro hab ε hε + obtain ⟨v,hv⟩ := hab ε hε + refine ⟨matrixSingletonHom v,?_⟩ + have he := NonUnitalStarAlgHom.norm_apply_le (matrixSingletonHom (A := A)) + (star v*diagonalCopies 1 b*v-diagonalCopies 1 a) + simp only [map_sub,map_mul,map_star,singleton_diagonal] at he + exact he.trans_lt hv + · intro hab ε hε + obtain ⟨v,hv⟩ := hab ε hε + refine ⟨diagonalCopies 1 v,?_⟩ + have he := NonUnitalStarAlgHom.norm_apply_le (diagonalHom (A := A) 1) (star v*b*v-a) + simp only [map_sub,map_mul,map_star,CStarMatrix.star_eq_conjTranspose] at he + exact he.trans_lt hv + +lemma elementCuntzSubequiv_of_hereditary {a b : A} (ha : 0 ≤ a) (hb : 0 ≤ b) + (hm : a ∈ hereditarySubalgebra b hb.isSelfAdjoint) : ElementCuntzSubequiv a b := + elementCuntzSubequiv_iff.mpr (exists_comparison_of_hereditary b a hb ha hm) + +lemma element_initial_cuntz_range (z : A) : ElementCuntzSubequiv (star z*z) (z*star z) := + elementCuntzSubequiv_iff.mpr (exists_comparison_of_star_mul z) + +lemma element_range_cuntz_initial (z : A) : ElementCuntzSubequiv (z*star z) (star z*z) := by + simpa only [star_star] using element_initial_cuntz_range (star z) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalConnection2.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalConnection2.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1f2af7313a27cb4a2a23b5f6950f1e5e231728f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalConnection2.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CyclicOrbit +import OAI.Analysis.WeakInfiniteness.ElementaryComparison +import OAI.Analysis.WeakInfiniteness.InnerSubalgebras +import OAI.Analysis.WeakInfiniteness.IrreducibleOrbits +import OAI.Analysis.WeakInfiniteness.LocalConnection + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma starLift_inr_apply (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (a : A) : + (Unitization.starLift π) (a : Unitization ℂ A)=π a := + congrArg (fun f : A →⋆ₙₐ[ℂ] (H →L[ℂ] H) => f a) (Equiv.symm_apply_apply Unitization.starLift π) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma irreducible_starLift {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} + (hπ : NonUnitalRepresentationIrreducible π) : RepresentationIrreducible (Unitization.starLift π) := by + intro S hSc hS + apply hπ S hSc + intro a x hx + simpa only [starLift_inr_apply] using hS (a : Unitization ℂ A) x hx + +lemma exists_local_common_two {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} + (hπ : NonUnitalRepresentationIrreducible π) {h k : A} + (hh : 0 ≤ h) (hk : 0 ≤ k) (hhn : π h ≠ 0) (hkn : π k ≠ 0) : + ∃ c : A,0 ≤ c ∧ c ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ π c ≠ 0 ∧ + ElementCuntzSubequiv c h ∧ ElementCuntzSubequiv c k := by + let ρ := Unitization.starLift π + obtain ⟨x,hx⟩ := (irreducible_starLift hπ).exists_mixed_nonzero + (u := (h : Unitization ℂ A)) (v := (k : Unitization ℂ A)) (by simpa only [starLift_inr_apply] using hhn) (by simpa only [starLift_inr_apply] using hkn) + let z : A := x.fst • (h*k)+h*x.snd*k + have hz : π z ≠ 0 := by + have he : (h : Unitization ℂ A)*x*(k : Unitization ℂ A)=(z : Unitization ℂ A) := by + rw [← Unitization.inl_fst_add_inr_snd_eq x] + simp only [mul_add,add_mul,Unitization.inr_mul_inl,← Unitization.inr_mul,smul_mul_assoc,← Unitization.inr_add] + rfl + rw [he] at hx + simpa only [starLift_inr_apply] using hx + have hzright : z ∈ principalRightIdeal h := by + apply Submodule.le_topologicalClosure _ + refine ⟨x.fst • k+x.snd*k,?_⟩ + change h*(x.fst • k+x.snd*k)=z + dsimp [z] + rw [mul_add,mul_smul_comm,mul_assoc] + have hzleft : star z ∈ principalRightIdeal k := by + apply Submodule.le_topologicalClosure _ + refine ⟨star x.fst • h+star x.snd*h,?_⟩ + change k*(star x.fst • h+star x.snd*h)=star z + simp only [z,star_add,star_smul,star_mul,hh.star_eq,hk.star_eq,mul_add,mul_smul_comm,mul_assoc] + have hc : 0 ≤ z*star z := mul_star_self_nonneg z + have hch := rightIdeal_square_mem_hereditary h z hh.isSelfAdjoint hzright + have hck : star z*z ∈ hereditarySubalgebra k hk.isSelfAdjoint := by + simpa only [star_star] using rightIdeal_square_mem_hereditary k (star z) hk.isSelfAdjoint hzleft + refine ⟨z*star z,hc,hch,?_,elementCuntzSubequiv_of_hereditary hc hh hch, + (element_range_cuntz_initial z).trans (elementCuntzSubequiv_of_hereditary (star_mul_self_nonneg z) hk hck)⟩ + intro he + have he' : π z*star (π z)=0 := by simpa only [map_mul,map_star] using he + exact hz ((CStarRing.mul_star_self_eq_zero_iff _).mp he') + +lemma exists_local_common_family {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} + (hπ : NonUnitalRepresentationIrreducible π) {h : A} + (hh : 0 ≤ h) (hhn : π h ≠ 0) {m : ℕ} (x : Fin m → A) + (hx : ∀ i,0 ≤ x i ∧ π (x i) ≠ 0) : + ∃ c : A,0 ≤ c ∧ c ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ π c ≠ 0 ∧ + ElementCuntzSubequiv c h ∧ ∀ i,ElementCuntzSubequiv c (x i) := by + induction m generalizing h with + | zero => exact ⟨h,hh,self_mem_hereditary h hh,hhn,cuntzSubequiv_refl _,by simp⟩ + | succ m ih => + obtain ⟨d,hd,hdh,hdn,hdch,hdx⟩ := exists_local_common_two hπ hh (hx 0).1 hhn (hx 0).2 + obtain ⟨c,hc,hcd,hcn,hccd,hct⟩ := ih hd hdn (fun i => x i.succ) (fun i => hx i.succ) + refine ⟨c,hc,hereditarySubalgebra_le_of_mem (hereditarySubalgebra_inner h hh.isSelfAdjoint) + hd.isSelfAdjoint hdh hcd,hcn,hccd.trans hdch,?_⟩ + intro i + exact Fin.cases (hccd.trans hdx) hct i + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalFamily.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..17504cf60621c2b49bf8ffc41004dc4d71dbf510 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalFamily.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.LocalPair + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma mul_zero_of_mem_hereditary_left {a b x : A} (ha : IsSelfAdjoint a) + (hab : a*b=0) (hx : x ∈ hereditarySubalgebra a ha) : x*b=0 := by + apply closure_minimal _ (isClosed_eq (continuous_id.mul_const b) continuous_const) hx + rintro _ ⟨c,rfl⟩ + change a*c*a*b=0 + rw [mul_assoc,hab,mul_zero] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma mul_zero_of_hereditary {a b x y : A} (ha : IsSelfAdjoint a) (hb : IsSelfAdjoint b) + (hab : a*b=0) (hx : x ∈ hereditarySubalgebra a ha) (hy : y ∈ hereditarySubalgebra b hb) : + x*y=0 := by + have hxb := mul_zero_of_mem_hereditary_left ha hab hx + apply closure_minimal _ (isClosed_eq (continuous_const.mul continuous_id) continuous_const) hy + rintro _ ⟨c,rfl⟩ + change x*(b*c*b)=0 + rw [← mul_assoc,← mul_assoc,hxb,zero_mul,zero_mul] + +lemma exists_orthogonal_detected_family {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (π : A →⋆ₙₐ[ℂ] B) (m : ℕ) {h : A} (hh : 0 ≤ h) (hhn : π h ≠ 0) : + ∃ x : Fin m → A, + (∀ i,x i ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ 0 ≤ x i ∧ π (x i) ≠ 0) ∧ + ∀ i j,i ≠ j → x i*x j=0 := by + induction m generalizing h with + | zero => exact ⟨Fin.elim0,by simp⟩ + | succ m ih => + obtain ⟨a,ha,b,hb,ha0,hb0,hab,han,hbn⟩ := exists_orthogonal_detected_pair hn hpi π hh hhn + obtain ⟨x,hx,hxx⟩ := ih ha0 han + refine ⟨Fin.cons b x,?_,?_⟩ + · intro i + refine Fin.cases ?_ (fun j => ?_) i + · exact ⟨hb,hb0,hbn⟩ + · exact ⟨hereditarySubalgebra_le_of_mem (hereditarySubalgebra_inner h hh.isSelfAdjoint) + ha0.isSelfAdjoint ha (hx j).1,(hx j).2⟩ + · intro i j + refine Fin.cases ?_ (fun i => ?_) i + · refine Fin.cases (by simp) (fun j _ => ?_) j + have he := mul_zero_of_mem_hereditary_left ha0.isSelfAdjoint hab (hx j).1 + have he' := congrArg star he + simpa only [Fin.cons_zero,Fin.cons_succ,star_mul,hb0.star_eq,(hx j).2.1.star_eq,star_zero] using he' + · refine Fin.cases (fun _ => ?_) (fun j hij => ?_) j + · exact mul_zero_of_mem_hereditary_left ha0.isSelfAdjoint hab (hx i).1 + · exact hxx i j (fun he => hij (congrArg Fin.succ he)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalPair.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..491835153f1ee9604e34943116f007b5c0c9e3ec --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalPair.lean @@ -0,0 +1,138 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ComplexScalar +import OAI.Analysis.WeakInfiniteness.FixedColumns +import OAI.Analysis.WeakInfiniteness.InnerSubalgebras + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma map_ramp_cut_mul_of_no_orthogonal (π : A →⋆ₙₐ[ℂ] B) + {h : A} (hh : 0 ≤ h) (hhn : π h ≠ 0) + (hno : ∀ a ∈ hereditarySubalgebra h hh.isSelfAdjoint, + ∀ b ∈ hereditarySubalgebra h hh.isSelfAdjoint, + 0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0) : + π (cfcₙ (spectralRamp (‖π h‖/8)) (positiveCut (‖π h‖/2) h))*π h=π h := by + let l := ‖π h‖ + have hl : 0 < l := norm_pos_iff.mpr hhn + have hhπ : IsSelfAdjoint (π h) := (map_nonneg π hh).isSelfAdjoint + have hf : Continuous (fun x : ℝ => max (x-l/2) 0) := by fun_prop + have hf0 : max (0-l/2) 0=0 := max_eq_right (by linarith) + have hg0 : spectralRamp (l/8) 0=0 := spectralRamp_eq_zero (by positivity) (by positivity) + rw [π.map_cfcₙ _ _ (continuous_spectralRamp _).continuousOn hg0 (by fun_prop) + (positiveCut_nonneg _ _).isSelfAdjoint (map_nonneg π (positiveCut_nonneg _ _)).isSelfAdjoint] + change cfcₙ (spectralRamp (l/8)) (π (cfcₙ (fun x : ℝ => max (x-l/2) 0) h))*π h=π h + rw [π.map_cfcₙ _ _ hf.continuousOn hf0 (by fun_prop) hh.isSelfAdjoint hhπ] + rw [← cfcₙ_comp (spectralRamp (l/8)) (fun x : ℝ => max (x-l/2) 0) (π h) + (continuous_spectralRamp _).continuousOn hg0 hf.continuousOn hf0 hhπ] + conv_rhs => rw [← cfcₙ_id' ℝ (π h) hhπ] + conv_lhs => rhs; rw [← cfcₙ_id' ℝ (π h) hhπ] + rw [← cfcₙ_mul ((spectralRamp (l/8)) ∘ (fun x : ℝ => max (x-l/2) 0)) + (fun x : ℝ => x) (π h) ((continuous_spectralRamp _).comp hf).continuousOn + (by simpa only [Function.comp_apply,hf0] using hg0) continuous_id.continuousOn rfl] + apply cfcₙ_congr + intro x hx + rcases mem_quasispectrum_iff.mp hx with rfl | hx + · simp + rcases spectrum_dichotomy_of_no_orthogonal _ π hno (self_mem_hereditary h hh) hh hx with rfl | rfl + · simp + · change spectralRamp (l/8) (max (l-l/2) 0)*l=l + rw [max_eq_left (by linarith),spectralRamp_eq_one (by positivity) (by linarith),one_mul] + +lemma exists_orthogonal_detected_pair {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (π : A →⋆ₙₐ[ℂ] B) {h : A} (hh : 0 ≤ h) (hhn : π h ≠ 0) : + ∃ a ∈ hereditarySubalgebra h hh.isSelfAdjoint, + ∃ b ∈ hereditarySubalgebra h hh.isSelfAdjoint, + 0 ≤ a ∧ 0 ≤ b ∧ a*b=0 ∧ π a ≠ 0 ∧ π b ≠ 0 := by + classical + by_contra! hno + have hno' : ∀ a ∈ hereditarySubalgebra h hh.isSelfAdjoint, + ∀ b ∈ hereditarySubalgebra h hh.isSelfAdjoint, + 0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0 := by + intro a ha b hb ha0 hb0 hab + by_cases han : π a=0 + · exact Or.inl han + · exact Or.inr (hno a ha b hb ha0 hb0 hab han) + let l := ‖π h‖ + have hl : 0 < l := norm_pos_iff.mpr hhn + let e := cfcₙ (spectralRamp (l/4)) h + let d := cfcₙ (spectralRamp (l/8)) (positiveCut (l/2) h) + obtain ⟨L,hL,-,-,heL⟩ := exists_finite_model_columns hn hpi h hl (n+1) + have he : e ∈ hereditarySubalgebra h hh.isSelfAdjoint := + cfcₙ_mem _ (self_mem_hereditary h hh) + have heL' (i : Fin n) (j : Fin (n+1)) : e*L i j=L i j := by + have hv := congrArg (fun X => X i j) heL + change ((Matrix.diagonal fun _ : Fin n => e)*(CStarMatrix.ofMatrix.symm L)) i j=L i j at hv + simpa only [Matrix.diagonal_mul,CStarMatrix.ofMatrix_symm_apply] using hv + have hm (i : Fin n) (j : Fin (n+1)) : L i j*h ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + rw [← heL' i j] + exact (hereditarySubalgebra_inner h hh.isSelfAdjoint).2 e he h + (self_mem_hereditary h hh) (L i j) + choose z hz using fun i j => hereditary_image_scalar_of_no_orthogonal π hh hhn hno' (hm i j) + let Z : Matrix (Fin n) (Fin (n+1)) ℂ := z + have hsq : π h*π h=l • π h := square_eq_norm_smul_of_no_orthogonal _ π hno' + (self_mem_hereditary h hh) hh + have hsqn : π h*π h ≠ 0 := by rw [hsq]; exact smul_ne_zero (ne_of_gt hl) hhn + have hdh : π d*π h=π h := map_ramp_cut_mul_of_no_orthogonal π hh hhn hno' + have hgram (i j : Fin (n+1)) : + (Z.conjTranspose*Z) i j • (π h*π h) = (1 : Matrix (Fin (n+1)) (Fin (n+1)) ℂ) i j • (π h*π h) := by + calc + (Z.conjTranspose*Z) i j • (π h*π h) = + ∑ k : Fin n,star (π (L k i*h))*π (L k j*h) := by + change (∑ k : Fin n,star (z k i)*z k j) • (π h*π h)=_ + simp only [Finset.sum_smul,hz,star_smul,(map_nonneg π hh).star_eq, + smul_mul_assoc,mul_smul_comm,smul_smul] + apply Finset.sum_congr rfl + intro k _ + rw [mul_comm] + _ = π (h*(L.conjTranspose*L) i j*h) := by + simp only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,map_mul,map_star,map_sum, + Finset.mul_sum,Finset.sum_mul,star_mul,(map_nonneg π hh).star_eq] + apply Finset.sum_congr rfl + intro k _ + noncomm_ring + _ = π (h*(diagonalCopies (n+1) d) i j*h) := by rw [hL] + _ = _ := by + by_cases hij : i=j + · subst j + simp only [diagonalCopies,CStarMatrix.ofMatrix_apply,Matrix.diagonal_apply_eq,Matrix.one_apply_eq,one_smul,map_mul] + rw [mul_assoc,hdh] + · simp [diagonalCopies,Matrix.diagonal_apply_ne _ hij,Matrix.one_apply_ne hij] + have hZZ : Z.conjTranspose*Z=1 := by + ext i j + exact (smul_left_injective ℂ hsqn) (hgram i j) + have hr := (Matrix.rank_mul_le_left Z.conjTranspose Z).trans (Matrix.rank_le_width Z.conjTranspose) + rw [hZZ,Matrix.rank_one] at hr + simp only [Fintype.card_fin] at hr + omega + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/LocalSplitting.lean b/lean/OAI/Analysis/WeakInfiniteness/LocalSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..141029a9377084738ffa64df30d21439c3b768c4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/LocalSplitting.lean @@ -0,0 +1,113 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma spectrum_dichotomy_of_no_orthogonal + (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + (π : A →⋆ₙₐ[ℂ] B) + (hno : ∀ a ∈ D,∀ b ∈ D,0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0) + {c : A} (hc : c ∈ D) (hc0 : 0 ≤ c) {s : ℝ} (hs : s ∈ spectrum ℝ (π c)) : + s=0 ∨ s=‖π c‖ := by + by_contra! hn + obtain hB | hB := subsingleton_or_nontrivial B + · have he : spectrum ℝ (π c)=∅ := spectrum.of_subsingleton (π c) + rw [he] at hs + exact hs + let : Nontrivial B := hB + have hπc : 0 ≤ π c := map_nonneg π hc0 + have hs0 : 0 < s := lt_of_le_of_ne + (NonnegSpectrumClass.nonneg_of_mem_quasispectrum hπc (spectrum_subset_quasispectrum ℝ (π c) hs)) hn.1.symm + have hsN : s < ‖π c‖ := lt_of_le_of_ne + ((Real.le_norm_self s).trans (spectrum.norm_le_norm_of_mem hs)) hn.2 + let t : ℝ := (s+‖π c‖)/2 + have hst : s < t := by dsimp [t]; linarith + have htN : t < ‖π c‖ := by dsimp [t]; linarith + have ht0 : 0 < t := hs0.trans hst + let f : ℝ → ℝ := fun x => x*max (t-x) 0 + let g : ℝ → ℝ := fun x => max (x-t) 0 + have hf : Continuous f := by dsimp [f]; fun_prop + have hg : Continuous g := by dsimp [g]; fun_prop + have hf0 : f 0=0 := by simp [f] + have hg0 : g 0=0 := by dsimp [g]; rw [max_eq_right (by linarith)] + have hfg : cfcₙ f c*cfcₙ g c=0 := by + rw [← cfcₙ_mul f g c hf.continuousOn hf0 hg.continuousOn hg0] + calc + cfcₙ (fun x => f x*g x) c=cfcₙ (0 : ℝ → ℝ) c := by + apply cfcₙ_congr + intro x _ + change x*max (t-x) 0*max (x-t) 0=0 + rcases le_total x t with hx | hx + · rw [max_eq_right (by linarith : x-t ≤ 0),mul_zero] + · rw [max_eq_right (by linarith : t-x ≤ 0),mul_zero,zero_mul] + _ = 0 := cfcₙ_zero ℝ c + have hfa : 0 ≤ cfcₙ f c := cfcₙ_nonneg (fun x hx => + mul_nonneg (NonnegSpectrumClass.nonneg_of_mem_quasispectrum hc0 hx) (le_max_right _ _)) + have hga : 0 ≤ cfcₙ g c := cfcₙ_nonneg (fun _ _ => le_max_right _ _) + have hfπ : π (cfcₙ f c)=cfcₙ f (π c) := + π.map_cfcₙ f c hf.continuousOn hf0 (by fun_prop) hc0.isSelfAdjoint hπc.isSelfAdjoint + have hgπ : π (cfcₙ g c)=cfcₙ g (π c) := + π.map_cfcₙ g c hg.continuousOn hg0 (by fun_prop) hc0.isSelfAdjoint hπc.isSelfAdjoint + obtain hz | hz := hno (cfcₙ f c) (cfcₙ_mem f hc) (cfcₙ g c) (cfcₙ_mem g hc) hfa hga hfg + · rw [hfπ] at hz + have hh := norm_apply_le_norm_cfcₙ f (π c) + (spectrum_subset_quasispectrum ℝ (π c) hs) hf.continuousOn hf0 hπc.isSelfAdjoint + rw [hz,norm_zero] at hh + have hpos : 0 < f s := by dsimp [f]; rw [max_eq_left (by linarith)]; positivity + exact (not_le_of_gt (norm_pos_iff.mpr (ne_of_gt hpos))) hh + · rw [hgπ] at hz + have hcn : π c ≠ 0 := by intro he; rw [he,norm_zero] at htN; linarith + let : Nontrivial B := nontrivial_of_ne (π c) 0 hcn + have hh := norm_apply_le_norm_cfcₙ g (π c) + (spectrum_subset_quasispectrum ℝ (π c) (CStarAlgebra.norm_mem_spectrum_of_nonneg (π c) hπc)) + hg.continuousOn hg0 hπc.isSelfAdjoint + rw [hz,norm_zero] at hh + have hpos : 0 < g ‖π c‖ := by dsimp [g]; rw [max_eq_left (by linarith)]; linarith + exact (not_le_of_gt (norm_pos_iff.mpr (ne_of_gt hpos))) hh + +lemma square_eq_norm_smul_of_no_orthogonal + (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + (π : A →⋆ₙₐ[ℂ] B) + (hno : ∀ a ∈ D,∀ b ∈ D,0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0) + {c : A} (hc : c ∈ D) (hc0 : 0 ≤ c) : π c*π c=‖π c‖ • π c := by + have hπc : IsSelfAdjoint (π c) := (map_nonneg π hc0).isSelfAdjoint + calc + π c*π c=cfcₙ (fun x : ℝ => x*x) (π c) := by rw [cfcₙ_mul (fun x : ℝ => x) (fun x : ℝ => x) (π c),cfcₙ_id' ℝ _ hπc] + _ = cfcₙ (fun x : ℝ => ‖π c‖*x) (π c) := by + apply cfcₙ_congr + intro x hx + rcases (mem_quasispectrum_iff.mp hx) with rfl | hx + · simp + rcases spectrum_dichotomy_of_no_orthogonal D π hno hc hc0 hx with rfl | rfl <;> simp + _ = ‖π c‖ • π c := cfcₙ_const_mul_id _ _ hπc + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/Main.lean b/lean/OAI/Analysis/WeakInfiniteness/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e9e00d5572cb014f5082ff3ed0bb19adea7c0d0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/Main.lean @@ -0,0 +1,240 @@ +import OAI.Analysis.WeakInfiniteness.TensorFoundations +import OAI.Analysis.WeakInfiniteness.CuntzComparison +import OAI.Analysis.WeakInfiniteness.CStarClosedRange +import OAI.Analysis.WeakInfiniteness.NonUnitalClosedRange +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality +import OAI.Analysis.WeakInfiniteness.SpatialVectorStates +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra +import OAI.Analysis.WeakInfiniteness.FullGroupDensity +import OAI.Analysis.WeakInfiniteness.GroupPolynomials +import OAI.Analysis.WeakInfiniteness.FiniteDiagonalState +import OAI.Analysis.WeakInfiniteness.LiftedHilbert +import OAI.Analysis.WeakInfiniteness.FiniteGroupTensor +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.TensorDensity +import OAI.Analysis.WeakInfiniteness.FreeFiniteQuotients +import OAI.Analysis.WeakInfiniteness.ScalarDiagonal +import OAI.Analysis.WeakInfiniteness.GroupRegular +import OAI.Analysis.WeakInfiniteness.ReducedGroupAlgebra +import OAI.Analysis.WeakInfiniteness.DiagonalRegular +import OAI.Analysis.WeakInfiniteness.MatrixRepresentation +import OAI.Analysis.WeakInfiniteness.TensorMatrixNorm +import OAI.Analysis.WeakInfiniteness.FaithfulTensorNorm +import OAI.Analysis.WeakInfiniteness.TensorCompression +import OAI.Analysis.WeakInfiniteness.FellAbsorption +import OAI.Analysis.WeakInfiniteness.FreeTwistedNorm +import OAI.Analysis.WeakInfiniteness.TensorHilbertSum +import OAI.Analysis.WeakInfiniteness.NonUnitalGroupTensor +import OAI.Analysis.WeakInfiniteness.ULiftCStar +import OAI.Analysis.WeakInfiniteness.ReducedOperators +import OAI.Analysis.WeakInfiniteness.TensorIdealFunctional +import OAI.Analysis.WeakInfiniteness.NormKernelWitness +import OAI.Analysis.WeakInfiniteness.TensorFlip +import OAI.Analysis.WeakInfiniteness.TensorInjectivity +import OAI.Analysis.WeakInfiniteness.ApproximateCut +import OAI.Analysis.WeakInfiniteness.TensorCut +import OAI.Analysis.WeakInfiniteness.UniformKernelConvergence +import OAI.Analysis.WeakInfiniteness.TensorIdealCut +import OAI.Analysis.WeakInfiniteness.ExactHereditary +import OAI.Analysis.WeakInfiniteness.UniversalFreeEmbedding +import OAI.Analysis.WeakInfiniteness.FiniteUnitaryLog +import OAI.Analysis.WeakInfiniteness.PairUnitary +import OAI.Analysis.WeakInfiniteness.UniversalGroupMap +import OAI.Analysis.WeakInfiniteness.FreeFiniteRepresentations +import OAI.Analysis.WeakInfiniteness.UniversalGroupNorm +import OAI.Analysis.WeakInfiniteness.UniversalGroupEmbedding +import OAI.Analysis.WeakInfiniteness.ProductRepresentation +import OAI.Analysis.WeakInfiniteness.FaithfulContractions +import OAI.Analysis.WeakInfiniteness.WordCompression +import OAI.Analysis.WeakInfiniteness.PolynomialCompression +import OAI.Analysis.WeakInfiniteness.States +import OAI.Analysis.WeakInfiniteness.UniversalMapping +import OAI.Analysis.WeakInfiniteness.PolynomialSpan +import OAI.Analysis.WeakInfiniteness.UniformModels +import OAI.Analysis.WeakInfiniteness.WordTensorDensity +import OAI.Analysis.WeakInfiniteness.UniformGap +import OAI.Analysis.WeakInfiniteness.ElementaryComparison +import OAI.Analysis.WeakInfiniteness.Hereditary +import OAI.Analysis.WeakInfiniteness.RectangularCStar +import OAI.Analysis.WeakInfiniteness.RectangularPolar +import OAI.Analysis.WeakInfiniteness.SpectralCut +import OAI.Analysis.WeakInfiniteness.CutImplementation +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.RectangularComparison +import OAI.Analysis.WeakInfiniteness.MatrixCutToolkit +import OAI.Analysis.WeakInfiniteness.Plateau +import OAI.Analysis.WeakInfiniteness.FixedColumns +import OAI.Analysis.WeakInfiniteness.MatrixHilbert +import OAI.Analysis.WeakInfiniteness.MatrixMaps +import OAI.Analysis.WeakInfiniteness.ReducingColumns +import OAI.Analysis.WeakInfiniteness.OperatorReducing +import OAI.Analysis.WeakInfiniteness.FiniteReducingModels +import OAI.Analysis.WeakInfiniteness.TensorMultiplier +import OAI.Analysis.WeakInfiniteness.NonunitalHeredity +import OAI.Analysis.WeakInfiniteness.NonunitalExactness +import OAI.Analysis.WeakInfiniteness.FaithfulRepresentation +import OAI.Analysis.WeakInfiniteness.TensorSubalgebras +import OAI.Analysis.WeakInfiniteness.UnitizationTensor +import OAI.Analysis.WeakInfiniteness.UnitizationExact +import OAI.Analysis.WeakInfiniteness.SupportedCorner +import OAI.Analysis.WeakInfiniteness.Clipping +import OAI.Analysis.WeakInfiniteness.SupportedExact +import OAI.Analysis.WeakInfiniteness.FiniteCoordinates +import OAI.Analysis.WeakInfiniteness.ClippingTools +import OAI.Analysis.WeakInfiniteness.SupportedSeparation +import OAI.Analysis.WeakInfiniteness.FixedRows +import OAI.Analysis.WeakInfiniteness.PerturbationRows +import OAI.Analysis.WeakInfiniteness.UniformPerturbation +import OAI.Analysis.WeakInfiniteness.PureStates +import OAI.Analysis.WeakInfiniteness.VectorStates +import OAI.Analysis.WeakInfiniteness.InvariantSubspaces +import OAI.Analysis.WeakInfiniteness.PureIrreducible +import OAI.Analysis.WeakInfiniteness.CyclicOrbit +import OAI.Analysis.WeakInfiniteness.IrreducibleOrbits +import OAI.Analysis.WeakInfiniteness.AnnihilatorStates +import OAI.Analysis.WeakInfiniteness.StatePullback +import OAI.Analysis.WeakInfiniteness.PrimitiveCompactness +import OAI.Analysis.WeakInfiniteness.LocalSplitting +import OAI.Analysis.WeakInfiniteness.ScalarHereditary +import OAI.Analysis.WeakInfiniteness.ComplexScalar +import OAI.Analysis.WeakInfiniteness.InnerSubalgebras +import OAI.Analysis.WeakInfiniteness.LocalPair +import OAI.Analysis.WeakInfiniteness.LocalFamily +import OAI.Analysis.WeakInfiniteness.LocalConnection +import OAI.Analysis.WeakInfiniteness.LocalConnection2 +import OAI.Analysis.WeakInfiniteness.FiniteComparison +import OAI.Analysis.WeakInfiniteness.LocalCommon +import OAI.Analysis.WeakInfiniteness.SpectralDeletion +import OAI.Analysis.WeakInfiniteness.SmallPartition +import OAI.Analysis.WeakInfiniteness.ContinuousDeletion +import OAI.Analysis.WeakInfiniteness.OrthogonalPerturbation +import OAI.Analysis.WeakInfiniteness.FiniteCoupling +import OAI.Analysis.WeakInfiniteness.CoreSelection +import OAI.Analysis.WeakInfiniteness.FiniteSelection +import OAI.Analysis.WeakInfiniteness.SpectralWindows +import OAI.Analysis.WeakInfiniteness.SeparatedSpectralWindows +import OAI.Analysis.WeakInfiniteness.SpectralResidual +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.HereditaryDeletion +import OAI.Analysis.WeakInfiniteness.SquareZero +import OAI.Analysis.WeakInfiniteness.SquareZero2 +import OAI.Analysis.WeakInfiniteness.SquareZero3 +import OAI.Analysis.WeakInfiniteness.SquareZero4 +import OAI.Analysis.WeakInfiniteness.SquareZero5 +import OAI.Analysis.WeakInfiniteness.SquareZero6 +import OAI.Analysis.WeakInfiniteness.SquareZeroComparison +import OAI.Analysis.WeakInfiniteness.IdealSpan +import OAI.Analysis.WeakInfiniteness.IdealComparison +import OAI.Analysis.WeakInfiniteness.IdealComparison2 +import OAI.Analysis.WeakInfiniteness.CompressedStates +import OAI.Analysis.WeakInfiniteness.IdealSeparation +import OAI.Analysis.WeakInfiniteness.PrimitiveIdealTest +import OAI.Analysis.WeakInfiniteness.IndividualInfiniteness +import OAI.Analysis.WeakInfiniteness.BoundedImplementation +import OAI.Analysis.WeakInfiniteness.CompatibleInverse +import OAI.Analysis.WeakInfiniteness.Intertwining +import OAI.Analysis.WeakInfiniteness.ColumnNormalization +import OAI.Analysis.WeakInfiniteness.OrthogonalCores +import OAI.Analysis.WeakInfiniteness.FourColumnNorm +import OAI.Analysis.WeakInfiniteness.FinalAssembly +import OAI.Analysis.WeakInfiniteness.QuantitativeAssembly +import OAI.Analysis.WeakInfiniteness.ScalingAssembly +import OAI.Analysis.WeakInfiniteness.SeparationScalar +import OAI.Analysis.WeakInfiniteness.SeparationScalarBounds +import OAI.Analysis.WeakInfiniteness.PolarCFC +import OAI.Analysis.WeakInfiniteness.CompatiblePerturbations +import OAI.Analysis.WeakInfiniteness.SeparationCores +import OAI.Analysis.WeakInfiniteness.ColumnCoreNorm +import OAI.Analysis.WeakInfiniteness.SeparationCoreSelection +import OAI.Analysis.WeakInfiniteness.SeparationMetric +import OAI.Analysis.WeakInfiniteness.SeparationCoverage +import OAI.Analysis.WeakInfiniteness.SeparationSupport +import OAI.Analysis.WeakInfiniteness.SeparationFourColumns +import OAI.Analysis.WeakInfiniteness.SeparationColumnBounds +import OAI.Analysis.WeakInfiniteness.SeparationNormCoverage +import OAI.Analysis.WeakInfiniteness.SeparationPreassembly +import OAI.Analysis.WeakInfiniteness.SeparationTransferredCoverage +import OAI.Analysis.WeakInfiniteness.SeparatingPositivesProducer +import OAI.Analysis.WeakInfiniteness.StrongInfinitenessOne +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorBound +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorMap +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorLaws +import OAI.Analysis.WeakInfiniteness.SmallCStar +import OAI.Analysis.WeakInfiniteness.SmallFree +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernel +import OAI.Analysis.WeakInfiniteness.CrossUniverseSmallExact +import OAI.Analysis.WeakInfiniteness.CrossUniverseLeftMap +import OAI.Analysis.WeakInfiniteness.CrossUniverseUniformModels +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernelHeredity +import OAI.Analysis.WeakInfiniteness.CrossUniverseUniformGap +import OAI.Analysis.WeakInfiniteness.CrossUniverseSupportedSeparation +import OAI.Analysis.WeakInfiniteness.UniversePerturbation +import OAI.Analysis.WeakInfiniteness.UniverseSelfadjoint +import OAI.Analysis.WeakInfiniteness.UniverseCoupling +import OAI.Analysis.WeakInfiniteness.SelectedCoupling +import OAI.Analysis.WeakInfiniteness.FirstCoupling +import OAI.Analysis.WeakInfiniteness.SecondCoupling +import OAI.Analysis.WeakInfiniteness.DetectedSigns +import OAI.Analysis.WeakInfiniteness.UniverseSquareZero +import OAI.Analysis.WeakInfiniteness.UniverseIndividualInfiniteness +import OAI.Analysis.WeakInfiniteness.CompatibleSeparation +import OAI.Analysis.WeakInfiniteness.QuantitativeSeparation +import OAI.Analysis.WeakInfiniteness.StrongInfiniteness +import OAI.Analysis.WeakInfiniteness.ExactInfiniteness +import OAI.Analysis.WeakInfiniteness.NuclearCP +import OAI.Analysis.WeakInfiniteness.NuclearTensorBound +import OAI.Analysis.WeakInfiniteness.NuclearTensorMap +import OAI.Analysis.WeakInfiniteness.MatrixTensorCoordinates +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact +import OAI.Analysis.WeakInfiniteness.NuclearApproximation +import OAI.Analysis.WeakInfiniteness.NuclearExact +import OAI.Analysis.WeakInfiniteness.OInfinityUniversal +import OAI.Analysis.WeakInfiniteness.OInfinityMap +import OAI.Analysis.WeakInfiniteness.IntertwiningLimit +import OAI.Analysis.WeakInfiniteness.IntertwiningConstruction +import OAI.Analysis.WeakInfiniteness.IntertwiningEquiv +import OAI.Analysis.WeakInfiniteness.TensorAbsorption +import OAI.Analysis.WeakInfiniteness.OInfinityCriterion +import OAI.Analysis.WeakInfiniteness.UnitalCuntzEmbedding +import OAI.Analysis.WeakInfiniteness.UnitaryIntertwining +import OAI.Analysis.WeakInfiniteness.TensorNorm +import OAI.Analysis.WeakInfiniteness.TensorFlipEquivalence +import OAI.Analysis.WeakInfiniteness.ElementaryIntertwining +import OAI.Analysis.WeakInfiniteness.CentralizationEstimates +import OAI.Analysis.WeakInfiniteness.MapInner +import OAI.Analysis.WeakInfiniteness.InnerNorm +import OAI.Analysis.WeakInfiniteness.CentralCopiesTensor +import OAI.Analysis.WeakInfiniteness.HalfFlipCriterion +import OAI.Analysis.WeakInfiniteness.CuntzPairCorrection +import OAI.Analysis.WeakInfiniteness.CentralExactPair +import OAI.Analysis.WeakInfiniteness.CentralCuntzWords +import OAI.Analysis.WeakInfiniteness.CentralOInfinityCopies +import OAI.Analysis.WeakInfiniteness.AbsorptionCriteria +import OAI.Analysis.WeakInfiniteness.HalfFlipGenerators +import OAI.Analysis.WeakInfiniteness.ChoiFactor +import OAI.Analysis.WeakInfiniteness.NuclearCoefficients +import OAI.Analysis.WeakInfiniteness.CPSchwarz +import OAI.Analysis.WeakInfiniteness.NuclearColumn +import OAI.Analysis.WeakInfiniteness.NuclearColumnApproximation +import OAI.Analysis.WeakInfiniteness.NuclearCompression +import OAI.Analysis.WeakInfiniteness.ElementaryCP +import OAI.Analysis.WeakInfiniteness.NuclearCentralization +import OAI.Analysis.WeakInfiniteness.CompressionObstruction +import OAI.Analysis.WeakInfiniteness.NonunitalGram +import OAI.Analysis.WeakInfiniteness.NonunitalCoefficients +import OAI.Analysis.WeakInfiniteness.NonunitalRealization +import OAI.Analysis.WeakInfiniteness.NonunitalSchwarz +import OAI.Analysis.WeakInfiniteness.NonunitalColumn +import OAI.Analysis.WeakInfiniteness.NonunitalColumnApproximation +import OAI.Analysis.WeakInfiniteness.NonunitalCompression +import OAI.Analysis.WeakInfiniteness.NonunitalCentralization +import OAI.Analysis.WeakInfiniteness.RelativeAveraging +import OAI.Analysis.WeakInfiniteness.CPDefect +import OAI.Analysis.WeakInfiniteness.CPCorrection +import OAI.Analysis.WeakInfiniteness.CPCentralCriterion +import OAI.Analysis.WeakInfiniteness.CentralState +import OAI.Analysis.WeakInfiniteness.CentralVacuum +import OAI.Analysis.WeakInfiniteness.FiniteReducingModelsExtension +import OAI.Analysis.WeakInfiniteness.FreeTreeNormExtension +import OAI.Analysis.PureInfiniteness.AbsorptionMain diff --git a/lean/OAI/Analysis/WeakInfiniteness/MapInner.lean b/lean/OAI/Analysis/WeakInfiniteness/MapInner.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0a904d23bbd95b15741d3712b2d56e04e516ff9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MapInner.lean @@ -0,0 +1,47 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UnitaryIntertwining + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v w + +variable {B : Type u} {C : Type v} [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +def mapUnitary (φ : B →⋆ₙₐ[ℂ] C) (u : unitary (Unitization ℂ B)) : + unitary (Unitization ℂ C) := + ⟨Unitization.starMap φ u,by + exact Unitary.map_mem (Unitization.starMap φ) u.property⟩ + +lemma map_unitizationInnerFun (φ : B →⋆ₙₐ[ℂ] C) + (u : unitary (Unitization ℂ B)) (b : B) : + φ (unitizationInnerFun u b)=unitizationInnerFun (mapUnitary φ u) (φ b) := by + apply Unitization.inr_injective (R := ℂ) + rw [inr_unitizationInnerFun] + rw [← Unitization.starMap_inr] + rw [inr_unitizationInnerFun] + simp only [Unitary.conjStarAlgAut_apply,map_mul,map_star,mapUnitary] + rw [Unitization.starMap_inr] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixCutToolkit.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixCutToolkit.lean new file mode 100644 index 0000000000000000000000000000000000000000..896591c0f2a11cea058f824e51d24e277647f2f5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixCutToolkit.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzComparison +import OAI.Analysis.WeakInfiniteness.RectangularPolar +import OAI.Analysis.WeakInfiniteness.SpectralCut + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +local instance matrixRealModuleToolkit {A : Type*} [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def diagonalHom (n : ℕ) : A →⋆ₙₐ[ℂ] CStarMatrix (Fin n) (Fin n) A where + toFun := diagonalCopies n + map_add' a b := by + ext i j + simp only [diagonalCopies, CStarMatrix.ofMatrix_apply, Matrix.diagonal_apply, + CStarMatrix.add_apply] + split_ifs <;> simp + map_zero' := by ext i j; simp [diagonalCopies] + map_mul' a b := by + change Matrix.diagonal (fun _ : Fin n => a*b) = + Matrix.diagonal (fun _ : Fin n => a)*Matrix.diagonal (fun _ : Fin n => b) + rw [Matrix.diagonal_mul_diagonal] + map_smul' c a := by + ext i j + simp only [diagonalCopies, CStarMatrix.ofMatrix_apply, Matrix.diagonal_apply, + CStarMatrix.smul_apply] + split_ifs <;> simp + map_star' a := by + ext i j + simp only [diagonalCopies, CStarMatrix.ofMatrix_apply, Matrix.diagonal_apply, + CStarMatrix.star_eq_conjTranspose, CStarMatrix.conjTranspose_apply] + split_ifs <;> simp_all + +lemma diagonalCopies_nonneg (n : ℕ) {a : A} (ha : 0 ≤ a) : 0 ≤ diagonalCopies n a := +by + have he : diagonalCopies n a = star ((diagonalHom n) (CFC.sqrt a))* + (diagonalHom n) (CFC.sqrt a) := by + rw [← map_star, ← map_mul, (CFC.sqrt_nonneg a).star_eq, CFC.sqrt_mul_sqrt_self a ha] + rfl + rw [he] + exact star_mul_self_nonneg _ + +lemma diagonalCopies_cfc (n : ℕ) (a : A) (ha : IsSelfAdjoint a) + (f : ℝ → ℝ) (hf : Continuous f) (hf0 : f 0 = 0) : + diagonalCopies n (cfcₙ f a) = cfcₙ f (diagonalCopies n a) := + (diagonalHom n).map_cfcₙ f a hf.continuousOn hf0 (by fun_prop) ha (ha.map (diagonalHom n)) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma left_identity_on_hereditary (e h : A) (hh : IsSelfAdjoint h) (he : e*h=h) + {x : A} (hx : x ∈ hereditarySubalgebra h hh) : e*x=x := by + have hclosed : IsClosed {x : A | e*x=x} := isClosed_eq (by fun_prop) continuous_id + apply closure_minimal ?_ hclosed hx + rintro _ ⟨b,rfl⟩ + change e*(h*b*h)=h*b*h + rw [← mul_assoc, ← mul_assoc, he] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_sub_mul {m n k : Type*} [Fintype n] + (u v : CStarMatrix m n A) (w : CStarMatrix n k A) : (u-v)*w=u*w-v*w := + Matrix.sub_mul _ _ _ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_mul_sub {m n k : Type*} [Fintype n] + (u : CStarMatrix m n A) (v w : CStarMatrix n k A) : u*(v-w)=u*v-u*w := + Matrix.mul_sub _ _ _ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_star_sub {m n : Type*} (u v : CStarMatrix m n A) : + (u-v).conjTranspose=u.conjTranspose-v.conjTranspose := Matrix.conjTranspose_sub _ _ + +lemma rectangular_left_identity_of_range {m n : Type*} [Fintype m] [Fintype n] + (e : CStarMatrix m m A) (u : CStarMatrix m n A) + (he : e*(u*u.conjTranspose)=u*u.conjTranspose) : e*u=u := by + let v := e*u-u + have hvu : v*u.conjTranspose=0 := by + change (e*u-u)*u.conjTranspose=0 + rw [rectangular_sub_mul, rectangular_mul_assoc, he, sub_self] + have hv : v*v.conjTranspose=0 := by + change v*(e*u-u).conjTranspose=0 + rw [rectangular_star_sub, rectangular_star_mul, rectangular_mul_sub, + ← rectangular_mul_assoc, hvu] + simp only [sub_zero] + exact Matrix.zero_mul _ + have hn := rectangular_norm_range v + rw [hv, norm_zero] at hn + have hh : ‖v‖=0 := by nlinarith [norm_nonneg v] + exact sub_eq_zero.mp (norm_eq_zero.mp hh) + +lemma rectangular_left_identity_of_hereditary_range {m n : Type*} [Fintype m] [Fintype n] + (e h : CStarMatrix m m A) (u : CStarMatrix m n A) (hh : IsSelfAdjoint h) + (he : e*h=h) (hu : u*u.conjTranspose ∈ hereditarySubalgebra h hh) : e*u=u := + rectangular_left_identity_of_range e u (left_identity_on_hereditary e h hh he hu) + +def positiveCut (δ : ℝ) (a : A) : A := cfcₙ (fun s : ℝ => max (s-δ) 0) a + +lemma positiveCut_nonneg (δ : ℝ) (a : A) : 0 ≤ positiveCut δ a := + cfcₙ_nonneg (fun _ _ => le_max_right _ _) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma spectralRamp_mul_positiveCut (a : A) {θ δ : ℝ} (hθ : 0 < θ) (hδ : 2*θ ≤ δ) : + cfcₙ (spectralRamp θ) a*positiveCut δ a = positiveCut δ a := by + have hf0 : max (0-δ) 0 = 0 := by rw [max_eq_right]; linarith + rw [positiveCut, ← cfcₙ_mul (spectralRamp θ) (fun s : ℝ => max (s-δ) 0) a + (continuous_spectralRamp θ).continuousOn (spectralRamp_eq_zero hθ hθ.le) + (by fun_prop) hf0] + congr 1 + funext s + by_cases hs : s ≤ δ + · rw [max_eq_right (by linarith : s-δ ≤ 0), mul_zero] + · rw [spectralRamp_eq_one hθ (by linarith), one_mul] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixHilbert.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixHilbert.lean new file mode 100644 index 0000000000000000000000000000000000000000..064f3089dddb74688b7dd4f4f178e4ce8b362c6f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixHilbert.lean @@ -0,0 +1,101 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +abbrev HilbertVector (n H : Type*) [NormedAddCommGroup H] := PiLp 2 (fun _ : n => H) + +def matrixAction (M : CStarMatrix m n (H →L[ℂ] H)) : + HilbertVector n H →L[ℂ] HilbertVector m H := + (PiLp.continuousLinearEquiv 2 ℂ (fun _ : m => H)).symm.toContinuousLinearMap.comp + ((ContinuousLinearMap.pi fun i => ∑ j, (M i j).comp (ContinuousLinearMap.proj j)).comp + (PiLp.continuousLinearEquiv 2 ℂ (fun _ : n => H)).toContinuousLinearMap) + +omit [CompleteSpace H] [Fintype m] in +@[simp] + +lemma matrixAction_apply (M : CStarMatrix m n (H →L[ℂ] H)) + (x : HilbertVector n H) (i : m) : matrixAction M x i = ∑ j, M i j (x j) := by + simp [matrixAction] + +omit [CompleteSpace H] in +lemma matrixAction_add (M N : CStarMatrix m n (H →L[ℂ] H)) : + matrixAction (M+N)=matrixAction M+matrixAction N := by + ext x i + simp [matrixAction_apply, Finset.sum_add_distrib] + +omit [CompleteSpace H] in +lemma matrixAction_smul (c : ℂ) (M : CStarMatrix m n (H →L[ℂ] H)) : + matrixAction (c • M)=c • matrixAction M := by + ext x i + simp [matrixAction_apply, Finset.smul_sum] + +omit [CompleteSpace H] [Fintype m] in +lemma matrixAction_mul (M : CStarMatrix m n (H →L[ℂ] H)) + (N : CStarMatrix n k (H →L[ℂ] H)) : + matrixAction (M*N)=(matrixAction M).comp (matrixAction N) := by + ext x i + simp only [matrixAction_apply, CStarMatrix.mul_apply, sum_apply, + mul_apply_eq_comp, ContinuousLinearMap.comp_apply, map_sum] + rw [Finset.sum_comm] + +lemma matrixAction_star (M : CStarMatrix m n (H →L[ℂ] H)) : + matrixAction M.conjTranspose=(matrixAction M).adjoint := by + apply (ContinuousLinearMap.eq_adjoint_iff _ _).mpr + intro x y + simp only [PiLp.inner_apply, matrixAction_apply, CStarMatrix.conjTranspose_apply, + sum_inner, inner_sum, ContinuousLinearMap.star_eq_adjoint, + ContinuousLinearMap.adjoint_inner_left] + rw [Finset.sum_comm] + +def matrixActionHom : CStarMatrix n n (H →L[ℂ] H) →⋆ₙₐ[ℂ] + (HilbertVector n H →L[ℂ] HilbertVector n H) where + toFun := matrixAction + map_zero' := by ext x i; simp + map_add' := matrixAction_add + map_smul' := matrixAction_smul + map_mul' := matrixAction_mul + map_star' := matrixAction_star + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +def matrixRepresentation (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (n : Type*) [Fintype n] : + CStarMatrix n n A →⋆ₙₐ[ℂ] (HilbertVector n H →L[ℂ] HilbertVector n H) := + matrixActionHom.comp (CStarMatrix.mapₙₐ π) + +@[simp] +lemma matrixRepresentation_apply (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (M : CStarMatrix n n A) (x : HilbertVector n H) (i : n) : + matrixRepresentation π n M x i = ∑ j, π (M i j) (x j) := by + change matrixAction ((CStarMatrix.mapₙₐ π) M) x i = _ + rw [matrixAction_apply] + rfl + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixMaps.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixMaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..299a8b3e4f6921167c5ffe4c2115b3badf9a64a8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixMaps.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.RectangularCStar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +def rectangularMap (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) : CStarMatrix m n B := M.map φ + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] [Fintype m] [Fintype n] in +@[simp] lemma rectangularMap_apply (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) (i : m) (j : n) : + rectangularMap φ M i j = φ (M i j) := rfl + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] [Fintype m] [Fintype k] in +lemma rectangularMap_mul (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) (N : CStarMatrix n k A) : + rectangularMap φ (M*N)=rectangularMap φ M*rectangularMap φ N := by + ext i j + simp only [rectangularMap_apply, CStarMatrix.mul_apply, map_sum, map_mul] + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] [Fintype m] [Fintype n] in +lemma rectangularMap_star (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) : + rectangularMap φ M.conjTranspose=(rectangularMap φ M).conjTranspose := by + ext i j + simp only [rectangularMap_apply, CStarMatrix.conjTranspose_apply, map_star] + +lemma rectangularMap_norm_le (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) : + ‖rectangularMap φ M‖ ≤ ‖M‖ := by + have h := NonUnitalStarAlgHom.norm_apply_le (CStarMatrix.mapₙₐ φ) (M.conjTranspose*M) + change ‖rectangularMap φ (M.conjTranspose*M)‖ ≤ ‖M.conjTranspose*M‖ at h + rw [rectangularMap_mul, rectangularMap_star, rectangular_norm_initial, rectangular_norm_initial] at h + nlinarith [norm_nonneg M, norm_nonneg (rectangularMap φ M)] + +lemma rectangularMap_norm (φ : A →⋆ₙₐ[ℂ] B) (hφ : Function.Injective φ) (M : CStarMatrix m n A) : + ‖rectangularMap φ M‖ = ‖M‖ := by + have hi : Function.Injective (CStarMatrix.mapₙₐ (n := n) φ) := by + intro u v h + ext i j + apply hφ + exact congrArg (fun X : CStarMatrix n n B => X i j) h + have h := NonUnitalStarAlgHom.norm_map (CStarMatrix.mapₙₐ φ) hi (M.conjTranspose*M) + change ‖rectangularMap φ (M.conjTranspose*M)‖ = ‖M.conjTranspose*M‖ at h + rw [rectangularMap_mul, rectangularMap_star, rectangular_norm_initial, rectangular_norm_initial] at h + nlinarith [norm_nonneg M, norm_nonneg (rectangularMap φ M)] + +def matrixScalarRight (M : CStarMatrix m n A) (D : CStarMatrix n k ℂ) : CStarMatrix m k A := + fun i j => ∑ l, D l j • M i l + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +@[simp] lemma matrixScalarRight_apply (M : CStarMatrix m n A) (D : CStarMatrix n k ℂ) (i : m) (j : k) : + matrixScalarRight M D i j = ∑ l, D l j • M i l := rfl + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] [Fintype m] [Fintype k] in +lemma rectangularMap_scalarRight (φ : A →⋆ₙₐ[ℂ] B) (M : CStarMatrix m n A) (D : CStarMatrix n k ℂ) : + rectangularMap φ (matrixScalarRight M D)=matrixScalarRight (rectangularMap φ M) D := by + ext i j + simp only [rectangularMap_apply, matrixScalarRight_apply, map_sum, map_smul] + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +lemma matrixScalarRight_inr (M : CStarMatrix m n A) (D : CStarMatrix n k ℂ) : + rectangularMap (Unitization.inrNonUnitalStarAlgHom ℂ A) (matrixScalarRight M D) = + rectangularMap (Unitization.inrNonUnitalStarAlgHom ℂ A) M* + rectangularMap (StarAlgHom.ofId ℂ (Unitization ℂ A)).toNonUnitalStarAlgHom D := by + apply CStarMatrix.ext + intro i j + simp only [rectangularMap_apply, matrixScalarRight_apply, CStarMatrix.mul_apply, + map_sum, map_smul, StarAlgHom.coe_toNonUnitalStarAlgHom, StarAlgHom.ofId_apply, + Algebra.algebraMap_eq_smul_one, mul_smul_comm, mul_one] + +lemma matrixScalarRight_norm_le (M : CStarMatrix m n A) (D : CStarMatrix n k ℂ) : + ‖matrixScalarRight M D‖ ≤ ‖M‖*‖D‖ := by + let ι := Unitization.inrNonUnitalStarAlgHom ℂ A + let κ := (StarAlgHom.ofId ℂ (Unitization ℂ A)).toNonUnitalStarAlgHom + have hi : Function.Injective ι := Unitization.inr_injective + calc + ‖matrixScalarRight M D‖ = ‖rectangularMap ι (matrixScalarRight M D)‖ := (rectangularMap_norm ι hi _).symm + _ = ‖rectangularMap ι M*rectangularMap κ D‖ := by rw [matrixScalarRight_inr] + _ ≤ ‖rectangularMap ι M‖*‖rectangularMap κ D‖ := rectangular_norm_mul_le _ _ + _ ≤ ‖M‖*‖D‖ := by rw [rectangularMap_norm ι hi]; gcongr; exact rectangularMap_norm_le κ D + +omit [PartialOrder A] [StarOrderedRing A] [Fintype k] in +lemma matrixScalarRight_mul_left (X : CStarMatrix m m A) (M : CStarMatrix m n A) + (D : CStarMatrix n k ℂ) : X*matrixScalarRight M D=matrixScalarRight (X*M) D := by + ext i j + simp only [CStarMatrix.mul_apply, matrixScalarRight_apply, Finset.mul_sum, mul_smul_comm, Finset.smul_sum] + rw [Finset.sum_comm] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixRepresentation.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..28290030727a918b2ae5d505e9c3e629d12cc83f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixRepresentation.lean @@ -0,0 +1,101 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace + +namespace WeakPureInfiniteness + +section MatrixOperators + +variable {n H : Type*} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +noncomputable def matrixOperator (M : CStarMatrix n n (H →L[ℂ] H)) : + (PiLp 2 (fun _ : n => H)) →L[ℂ] (PiLp 2 (fun _ : n => H)) := + let e := PiLp.continuousLinearEquiv 2 ℂ (fun _ : n => H) + e.symm.toContinuousLinearMap.comp + ((ContinuousLinearMap.pi fun i => ∑ j, (M i j).comp (ContinuousLinearMap.proj j)).comp + e.toContinuousLinearMap) + +omit [CompleteSpace H] in +@[simp] + +lemma matrixOperator_apply (M : CStarMatrix n n (H →L[ℂ] H)) + (x : PiLp 2 (fun _ : n => H)) (i : n) : + matrixOperator M x i = ∑ j, M i j (x j) := by + simp [matrixOperator] + +omit [CompleteSpace H] in +lemma matrixOperator_add (M N : CStarMatrix n n (H →L[ℂ] H)) : + matrixOperator (M + N) = matrixOperator M + matrixOperator N := by + ext x i + simp [Finset.sum_add_distrib] + +omit [CompleteSpace H] in +lemma matrixOperator_smul (c : ℂ) (M : CStarMatrix n n (H →L[ℂ] H)) : + matrixOperator (c • M) = c • matrixOperator M := by + ext x i + simp [Finset.smul_sum] + +omit [CompleteSpace H] in +lemma matrixOperator_zero : matrixOperator (0 : CStarMatrix n n (H →L[ℂ] H)) = 0 := by + ext x i + simp + +omit [CompleteSpace H] in +lemma matrixOperator_mul (M N : CStarMatrix n n (H →L[ℂ] H)) : + matrixOperator (M * N) = matrixOperator M * matrixOperator N := by + ext x i + simp only [matrixOperator_apply, CStarMatrix.mul_apply, sum_apply, + mul_apply_eq_comp, map_sum] + exact Finset.sum_comm + +lemma matrixOperator_star (M : CStarMatrix n n (H →L[ℂ] H)) : + matrixOperator (star M) = star (matrixOperator M) := by + rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.eq_adjoint_iff] + intro x y + simp only [PiLp.inner_apply, matrixOperator_apply, sum_inner, inner_sum, + CStarMatrix.star_apply, ContinuousLinearMap.star_eq_adjoint, + ContinuousLinearMap.adjoint_inner_left] + exact Finset.sum_comm + +noncomputable def matrixOperatorHom : CStarMatrix n n (H →L[ℂ] H) →⋆ₙₐ[ℂ] + ((PiLp 2 (fun _ : n => H)) →L[ℂ] (PiLp 2 (fun _ : n => H))) where + toFun := matrixOperator + map_zero' := matrixOperator_zero + map_add' := matrixOperator_add + map_smul' := matrixOperator_smul + map_mul' := matrixOperator_mul + map_star' := matrixOperator_star + +omit [CompleteSpace H] in +lemma matrixOperator_single [DecidableEq n] (M : CStarMatrix n n (H →L[ℂ] H)) (i j : n) (x : H) : + matrixOperator M (PiLp.single 2 j x) i = M i j x := by + simp [PiLp.single_apply, apply_ite] + +omit [CompleteSpace H] in +lemma matrixOperator_injective : Function.Injective (matrixOperator (n := n) (H := H)) := by + classical + intro M N h + ext i j x + have he := congrArg (fun T => T (PiLp.single 2 j x) i) h + simpa only [matrixOperator_single] using he + +lemma norm_matrixOperator (M : CStarMatrix n n (H →L[ℂ] H)) : + ‖matrixOperator M‖ = ‖M‖ := by + exact NonUnitalStarAlgHom.norm_map (matrixOperatorHom (n := n) (H := H)) (by exact matrixOperator_injective (n := n) (H := H)) M + +end MatrixOperators + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorCoordinates.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..9680b851cd02d8cc5f62f2de2685431dbc01a6f8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorCoordinates.lean @@ -0,0 +1,109 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NuclearTensorMap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct CStarAlgebra ComplexOrder + +universe u + +section + +variable {n : Type*} [Fintype n] [DecidableEq n] + {C : Type u} [NonUnitalCStarAlgebra C] [PartialOrder C] [StarOrderedRing C] + +def scalarMatrixRep : CStarMatrix n n ℂ →⋆ₙₐ[ℂ] + (EuclideanSpace ℂ n →L[ℂ] EuclideanSpace ℂ n) := + matrixOperatorHom.comp (CStarMatrix.mapₙₐ + (StarAlgHom.ofId ℂ (ℂ →L[ℂ] ℂ)).toNonUnitalStarAlgHom) + +lemma scalarMatrixRep_basis (M : CStarMatrix n n ℂ) (i j : n) : + scalarMatrixRep M ((EuclideanSpace.basisFun n ℂ) j) i=M i j := by + rw [EuclideanSpace.basisFun_apply] + change matrixOperator (CStarMatrix.mapₙₐ + (StarAlgHom.ofId ℂ (ℂ →L[ℂ] ℂ)).toNonUnitalStarAlgHom M) (PiLp.single 2 j 1) i=_ + rw [matrixOperator_single] + simp [Algebra.algebraMap_eq_smul_one] + +def matrixTensorCoefficient (M : CStarMatrix n n ℂ) (c : C) : CStarMatrix n n C := + CStarMatrix.ofMatrix (fun i j => M i j • c) + +omit [PartialOrder C] [StarOrderedRing C] in +lemma matrixTensorCoefficient_eq (M : CStarMatrix n n ℂ) (c : C) : + matrixTensorCoefficient M c=tensorCoefficientMatrix (EuclideanSpace.basisFun n ℂ) (scalarMatrixRep M) c := by + ext i j + change M i j • c = (EuclideanSpace.basisFun n ℂ).repr (scalarMatrixRep M ((EuclideanSpace.basisFun n ℂ) j)) i • c + rw [EuclideanSpace.basisFun_repr,scalarMatrixRep_basis] + +lemma norm_matrixTensorSum_le {ι : Type*} (s : Finset ι) + (M : ι → CStarMatrix n n ℂ) (c : ι → C) : + ‖∑ i ∈ s,matrixTensorCoefficient (M i) (c i)‖ ≤ + ‖∑ i ∈ s,spatialElementary (M i) (c i)‖ := by + obtain ⟨H,ρ,hρ⟩ := exists_faithful_representation C + have hi : Function.Injective (CStarMatrix.mapₙₐ (n := n) ρ) := by + intro X Y hXY + ext i j + exact hρ (congrArg (fun Z : CStarMatrix n n (H →L[ℂ] H) => Z i j) hXY) + rw [← NonUnitalStarAlgHom.norm_map (CStarMatrix.mapₙₐ ρ) hi] + simp only [map_sum,matrixTensorCoefficient_eq,map_tensorCoefficientMatrix] + rw [← norm_tensorCoefficientSum] + exact norm_tensorSum_le_spatial_any s M c scalarMatrixRep ρ + +def matrixTensorPolynomial : (CStarMatrix n n ℂ × C →₀ ℂ) →ₗ[ℂ] CStarMatrix n n C := + Finsupp.linearCombination ℂ (fun p => matrixTensorCoefficient p.1 p.2) + +lemma norm_matrixTensorPolynomial_le (d : CStarMatrix n n ℂ × C →₀ ℂ) : + ‖matrixTensorPolynomial d‖ ≤ 1*‖tensorPolynomial d‖ := by + classical + rw [one_mul] + change ‖d.sum (fun p t => t • matrixTensorCoefficient p.1 p.2)‖ ≤ + ‖(minimalTensorSubalgebra (CStarMatrix n n ℂ) C).subtype + (d.sum fun p t => t • minimalElementary p.1 p.2)‖ + simp only [Finsupp.sum,map_sum,map_smul] + change ‖∑ p ∈ d.support,d p • matrixTensorCoefficient p.1 p.2‖ ≤ + ‖∑ p ∈ d.support,d p • spatialElementary p.1 p.2‖ + have hs (t : ℂ) (M : CStarMatrix n n ℂ) (c : C) : + matrixTensorCoefficient (t • M) c=t • matrixTensorCoefficient M c := by + ext i j + exact mul_smul t (M i j) c + simpa only [spatialElementary_smul_left,hs] using + norm_matrixTensorSum_le d.support (fun p => d p • p.1) Prod.snd + +def matrixTensorCoordinates : MinimalTensor (CStarMatrix n n ℂ) C →L[ℂ] CStarMatrix n n C := + matrixTensorPolynomial.extendOfNorm tensorPolynomial + +lemma matrixTensorCoordinates_polynomial (d : CStarMatrix n n ℂ × C →₀ ℂ) : + matrixTensorCoordinates (tensorPolynomial d)=matrixTensorPolynomial d := + LinearMap.extendOfNorm_eq (tensorPolynomial_dense (A := CStarMatrix n n ℂ) (C := C)) + ⟨1,norm_matrixTensorPolynomial_le (n := n) (C := C)⟩ d + +lemma matrixTensorCoordinates_elementary (M : CStarMatrix n n ℂ) (c : C) : + matrixTensorCoordinates (minimalElementary M c)=matrixTensorCoefficient M c := by + rw [← tensorPolynomial_single M c,matrixTensorCoordinates_polynomial] + simp [matrixTensorPolynomial] + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorExact.lean b/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorExact.lean new file mode 100644 index 0000000000000000000000000000000000000000..e401265468b8f5a7dfef49da2a2213986b5de3ca --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/MatrixTensorExact.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixTensorCoordinates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {n : Type*} [Fintype n] [DecidableEq n] + {C D : Type u} [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + [PartialOrder C] [StarOrderedRing C] [PartialOrder D] [StarOrderedRing D] + +def matrixEntryLinear (i j : n) : CStarMatrix n n C →ₗ[ℂ] C where + toFun M := M i j + map_add' _ _ := rfl + map_smul' _ _ := rfl + +def matrixUnit (i j : n) : CStarMatrix n n ℂ := + CStarMatrix.ofMatrix (fun k l => if k=i ∧ l=j then 1 else 0) + +lemma matrix_unit_expansion (M : CStarMatrix n n ℂ) : + (∑ i,∑ j,M i j • matrixUnit i j)=M := by + ext k l + change matrixEntryLinear k l (∑ i,∑ j,M i j • matrixUnit i j)=M k l + simp only [map_sum,map_smul] + change (∑ i,∑ j,M i j * (if k=i ∧ l=j then 1 else 0))=M k l + simp [ite_and] + +def matrixEntryContinuous (i j : n) : CStarMatrix n n C →L[ℂ] C := + (matrixEntryLinear i j).mkContinuous 1 (fun M => by + change ‖M i j‖ ≤ 1*‖M‖ + simpa only [one_mul] using (CStarMatrix.norm_entry_le_norm (M := M) (i := i) (j := j))) + +def matrixTensorReconstruct : CStarMatrix n n C →L[ℂ] MinimalTensor (CStarMatrix n n ℂ) C := + ∑ i,∑ j,(minimalElementaryRightContinuous (matrixUnit i j)).comp (matrixEntryContinuous i j) + +lemma matrixTensorReconstruct_apply (M : CStarMatrix n n C) : + matrixTensorReconstruct M=∑ i,∑ j,minimalElementary (matrixUnit i j) (M i j) := by + simp only [matrixTensorReconstruct,sum_apply,ContinuousLinearMap.comp_apply] + rfl + +lemma minimalElementary_balance {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + (t : ℂ) (a : A) (b : B) : minimalElementary a (t • b)=minimalElementary (t • a) b := by + apply Subtype.ext + exact (spatialElementary_smul_right t a b).trans (spatialElementary_smul_left t a b).symm + +lemma matrixTensorReconstruct_coefficient (M : CStarMatrix n n ℂ) (c : C) : + matrixTensorReconstruct (matrixTensorCoefficient M c)=minimalElementary M c := by + rw [matrixTensorReconstruct_apply] + change (∑ i,∑ j,minimalElementary (matrixUnit i j) (M i j • c))=minimalElementary M c + simp only [minimalElementary_balance] + change (∑ i,∑ j,minimalElementaryLeftLinear c (M i j • matrixUnit i j))=minimalElementaryLeftLinear c M + simpa only [map_sum] using congrArg (minimalElementaryLeftLinear c) (matrix_unit_expansion M) + +lemma matrixTensorReconstruct_coordinates (z : MinimalTensor (CStarMatrix n n ℂ) C) : + matrixTensorReconstruct (matrixTensorCoordinates z)=z := by + have he : (matrixTensorReconstruct (n := n) (C := C)).comp matrixTensorCoordinates= + ContinuousLinearMap.id ℂ (MinimalTensor (CStarMatrix n n ℂ) C) := by + apply minimalTensor_clm_ext + intro M c + change matrixTensorReconstruct (matrixTensorCoordinates (minimalElementary M c))=minimalElementary M c + rw [matrixTensorCoordinates_elementary,matrixTensorReconstruct_coefficient] + exact DFunLike.congr_fun he z + +lemma matrixTensorCoordinates_right_comm (q : C →⋆ₙₐ[ℂ] D) + (z : MinimalTensor (CStarMatrix n n ℂ) C) : + CStarMatrix.mapₙₐ q (matrixTensorCoordinates z)=matrixTensorCoordinates (minimalMapRight q z) := by + let f : CStarMatrix n n C →L[ℂ] CStarMatrix n n D := starHomContinuousLinear (CStarMatrix.mapₙₐ q) + let g : MinimalTensor (CStarMatrix n n ℂ) C →L[ℂ] MinimalTensor (CStarMatrix n n ℂ) D := + starHomContinuousLinear (minimalMapRight q) + let F : MinimalTensor (CStarMatrix n n ℂ) C →L[ℂ] CStarMatrix n n C := matrixTensorCoordinates + let G : MinimalTensor (CStarMatrix n n ℂ) D →L[ℂ] CStarMatrix n n D := matrixTensorCoordinates + have he : f.comp F=G.comp g := by + apply minimalTensor_clm_ext + intro M c + change CStarMatrix.mapₙₐ q (matrixTensorCoordinates (minimalElementary M c))= + matrixTensorCoordinates (minimalMapRight q (minimalElementary M c)) + rw [matrixTensorCoordinates_elementary,minimalMapRight_elementary,matrixTensorCoordinates_elementary] + ext i j + exact map_smul q (M i j) c + exact DFunLike.congr_fun he z + +lemma matrixTensor_kernel (q : C →⋆ₙₐ[ℂ] D) (z : MinimalTensor (CStarMatrix n n ℂ) C) + (hz : minimalMapRight q z=0) : + z.val ∈ tensorKernelIdeal (A := CStarMatrix n n ℂ) q := by + have hm : CStarMatrix.mapₙₐ q (matrixTensorCoordinates z)=0 := by + rw [matrixTensorCoordinates_right_comm,hz,map_zero] + rw [← matrixTensorReconstruct_coordinates z,matrixTensorReconstruct_apply] + change (minimalTensorSubalgebra (CStarMatrix n n ℂ) C).subtype + (∑ i,∑ j,minimalElementary (matrixUnit i j) (matrixTensorCoordinates z i j)) ∈ _ + simp only [map_sum] + apply (tensorKernelIdeal (A := CStarMatrix n n ℂ) q).toSubmodule.sum_mem + intro i _ + apply (tensorKernelIdeal (A := CStarMatrix n n ℂ) q).toSubmodule.sum_mem + intro j _ + apply NonUnitalStarSubalgebra.le_topologicalClosure + apply NonUnitalStarAlgebra.subset_adjoin + exact ⟨matrixUnit i j,matrixTensorCoordinates z i j, + congrArg (fun M : CStarMatrix n n D => M i j) hm,rfl⟩ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonUnitalClosedRange.lean b/lean/OAI/Analysis/WeakInfiniteness/NonUnitalClosedRange.lean new file mode 100644 index 0000000000000000000000000000000000000000..914c103bb61c00bf41f845f2b80b30fb7f230eda --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonUnitalClosedRange.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CStarClosedRange + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +section NonUnital + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma nonUnitalStarHom_continuous (φ : A →⋆ₙₐ[ℂ] B) : Continuous φ := by + let f := (φ : A →ₗ[ℂ] B).mkContinuous 1 (by + intro x + change ‖φ x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le φ x) + exact f.continuous + +theorem nonUnitalStarHom_exists_lift_norm_le (φ : A →⋆ₙₐ[ℂ] B) (x : A) + {M : ℝ} (hM : 0 < M) (hx : ‖φ x‖ ≤ M) : + ∃ y : A, φ y = φ x ∧ ‖y‖ ≤ M := by + obtain ⟨y, hy, hyn⟩ := starHom_exists_lift_norm_le (Unitization.starMap φ) + (x : Unitization ℂ A) hM (by simpa only [Unitization.starMap_inr, Unitization.norm_inr] using hx) + have hfst : y.fst = 0 := by + simpa [Unitization.algebraMap_eq_inl] using congrArg (fun z : Unitization ℂ B => z.fst) hy + have he : (y.snd : Unitization ℂ A) = y := by + apply Unitization.ext + · simpa using hfst.symm + · rfl + refine ⟨y.snd, ?_, ?_⟩ + · simpa [Unitization.algebraMap_eq_inl] using congrArg (fun z : Unitization ℂ B => z.snd) hy + · rw [← Unitization.norm_inr (𝕜 := ℂ), he] + exact hyn + +theorem nonUnitalStarHom_isClosed_range (φ : A →⋆ₙₐ[ℂ] B) : IsClosed (Set.range φ) := by + let f : A →L[ℂ] B := (φ : A →ₗ[ℂ] B).mkContinuous 1 (by + intro x + change ‖φ x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le φ x) + let K := f.ker + let F : A ⧸ K →L[ℂ] B := K.liftQL f le_rfl + have hbound : ∀ z : A ⧸ K, ‖z‖ ≤ (1 : ℝ≥0) * ‖F z‖ := by + intro z + induction z using Submodule.Quotient.induction_on K with + | H x => + change ‖(Submodule.Quotient.mk x : A ⧸ K)‖ ≤ (1 : ℝ) * ‖φ x‖ + rw [one_mul] + by_cases hx : φ x = 0 + · have hk : x ∈ K := hx + rw [(Submodule.Quotient.mk_eq_zero K).mpr hk, norm_zero, hx, norm_zero] + · obtain ⟨y, hy, hyn⟩ := nonUnitalStarHom_exists_lift_norm_le φ x + (norm_pos_iff.mpr hx) le_rfl + have hq : (Submodule.Quotient.mk x : A ⧸ K) = Submodule.Quotient.mk y := by + apply (Submodule.Quotient.eq K).mpr + change φ (x - y) = 0 + rw [map_sub, hy, sub_self] + rw [hq] + exact (Submodule.Quotient.norm_mk_le K y).trans hyn + have hclosed := (F.antilipschitz_of_bound hbound).isClosed_range F.uniformContinuous + have hr : Set.range F = Set.range φ := by + ext b + constructor + · rintro ⟨z, rfl⟩ + obtain ⟨x, rfl⟩ := Submodule.Quotient.mk_surjective K z + exact ⟨x, rfl⟩ + · rintro ⟨x, rfl⟩ + exact ⟨Submodule.Quotient.mk x, rfl⟩ + exact hr ▸ hclosed + +end NonUnital + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonUnitalGroupTensor.lean b/lean/OAI/Analysis/WeakInfiniteness/NonUnitalGroupTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..a49dfb9459911ecdf6629befd91c633e8f30f091 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonUnitalGroupTensor.lean @@ -0,0 +1,110 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorHilbertSum + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section NonUnitalGroup + +variable {A B G : Type*} [CStarAlgebra A] [CStarAlgebra B] [Group G] + +def completedGroupOperator (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) (g : G) : B := + φ (u g) + (1 - φ 1) + +lemma completedGroupOperator_one (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) : + completedGroupOperator φ u 1 = 1 := by + simp [completedGroupOperator] + +lemma completedGroupOperator_mul (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) (g h : G) : + completedGroupOperator φ u (g * h) = + completedGroupOperator φ u g * completedGroupOperator φ u h := by + have hx (a : A) : φ a * (1 - φ 1) = 0 := by + rw [mul_sub, mul_one, ← map_mul, mul_one, sub_self] + have hy (a : A) : (1 - φ 1) * φ a = 0 := by + rw [sub_mul, one_mul, ← map_mul, one_mul, sub_self] + have hc : (1 - φ 1) * (1 - φ 1) = 1 - φ 1 := by + rw [mul_sub, mul_one, hy, sub_zero] + simp only [completedGroupOperator, map_mul, Submonoid.coe_mul, add_mul, mul_add, + hx, hy, hc, add_zero, zero_add] + +lemma completedGroupOperator_inv (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) (g : G) : + completedGroupOperator φ u g⁻¹ = star (completedGroupOperator φ u g) := by + simp only [completedGroupOperator, map_inv, ← Unitary.star_eq_inv, Unitary.coe_star, + map_star, star_add, star_sub, star_one] + have hφ : star (φ 1) = φ 1 := by rw [← map_star, star_one] + rw [hφ] + +lemma completedGroupOperator_unitary (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) (g : G) : + completedGroupOperator φ u g ∈ unitary B := by + constructor + · rw [← completedGroupOperator_inv, ← completedGroupOperator_mul, + inv_mul_cancel, completedGroupOperator_one] + · rw [← completedGroupOperator_inv, ← completedGroupOperator_mul, + mul_inv_cancel, completedGroupOperator_one] + +def completedGroupUnitary (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) : G →* unitary B where + toFun g := ⟨completedGroupOperator φ u g, completedGroupOperator_unitary φ u g⟩ + map_one' := Subtype.ext (completedGroupOperator_one φ u) + map_mul' g h := Subtype.ext (completedGroupOperator_mul φ u g h) + +lemma projection_mul_completedGroup (φ : A →⋆ₙₐ[ℂ] B) (u : G →* unitary A) (g : G) : + φ 1 * completedGroupOperator φ u g = φ (u g) := by + simp only [completedGroupOperator, mul_add, mul_sub, mul_one, ← map_mul, + one_mul, sub_self, add_zero] + +end NonUnitalGroup + +theorem norm_freeTensor_nonunital_sum_le {A H : Type*} [CStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (φ : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (u : FreeTwo →* unitary A) : + ‖∑ s : FreeLetter, TensorProduct.mapL (φ (u (freeLetter s))) + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo)‖ ≤ + 2 * Real.sqrt 3 := by + let π : FreeTwo →* H ≃ₗᵢ[ℂ] H := + Unitary.linearIsometryEquiv.toMonoidHom.comp (completedGroupUnitary φ u) + let T := ∑ s : FreeLetter, TensorProduct.mapL + (π (freeLetter s)).toContinuousLinearEquiv.toContinuousLinearMap + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo) + have he : (∑ s : FreeLetter, TensorProduct.mapL (φ (u (freeLetter s))) + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo)) = + ((φ 1).rTensor (GroupHilbert FreeTwo)).comp T := by + apply ContinuousLinearMap.ext + intro z + induction z using TensorProduct.inductionOn with + | tmul ξ η => + simp only [T, sum_apply, TensorProduct.mapL_tmul, ContinuousLinearMap.comp_apply, + map_sum, ContinuousLinearMap.rTensor_tmul] + apply Finset.sum_congr rfl + intro s _ + congr 1 + exact (congrArg (fun f : H →L[ℂ] H => f ξ) + (projection_mul_completedGroup φ u (freeLetter s))).symm + | add z w hz hw => simp only [map_add, hz, hw] + rw [he] + have hp : ‖(φ 1).rTensor (GroupHilbert FreeTwo)‖ ≤ 1 := by + apply (ContinuousLinearMap.norm_rTensor_le _ _).trans + apply (NonUnitalStarAlgHom.norm_apply_le φ 1).trans + cases subsingleton_or_nontrivial A with + | inl h => simp [Subsingleton.elim (1 : A) 0] + | inr h => simp + have ht : ‖T‖ ≤ 2 * Real.sqrt 3 := norm_freeTensor_sum_le π + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans + (by + simpa only [one_mul] using mul_le_mul hp ht + (ContinuousLinearMap.opNorm_nonneg T) zero_le_one) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalCentralization.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCentralization.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e6bf2f3c4af38a07089c7adbf893aeaea7d4c50 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCentralization.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryCP +import OAI.Analysis.WeakInfiniteness.NonunitalColumnApproximation +import OAI.Analysis.WeakInfiniteness.NonunitalCompression + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +lemma norm_finite_inner_le (v w : Fin n → A) : + ‖∑ i,star (v i)*w i‖≤ + Real.sqrt ‖∑ i,star (v i)*v i‖*Real.sqrt ‖∑ i,star (w i)*w i‖ := by + have he : matrixSingletonHom ((finiteColumn v).conjTranspose*finiteColumn w)= + ∑ i,star (v i)*w i := rfl + rw [← he] + calc + _ ≤ ‖(finiteColumn v).conjTranspose*finiteColumn w‖ := + NonUnitalStarAlgHom.norm_apply_le _ _ + _ ≤ ‖(finiteColumn v).conjTranspose‖*‖finiteColumn w‖ := rectangular_norm_mul_le _ _ + _ = _ := by rw [rectangular_norm_conjTranspose,finiteColumn_norm,finiteColumn_norm] + +lemma nonunitalCoefficient_initial_action_error (v : Fin n → A) + (hv : ‖nonunitalCoefficientMap v 1‖≤1) + (M : CStarMatrix (Fin n) (Fin n) ℂ) (a : A) : + ‖nonunitalCoefficientMap v 1*a-a‖≤ + ‖nonunitalCoefficientMap v M-a‖+ + Real.sqrt ‖∑ i,star (nonunitalCoefficientAction M v i-v i*a)* + (nonunitalCoefficientAction M v i-v i*a)‖ := by + have he : nonunitalCoefficientMap v M-nonunitalCoefficientMap v 1*a= + ∑ i,star (v i)*(nonunitalCoefficientAction M v i-v i*a) := by + rw [nonunitalCoefficientMap_mixed,nonunitalCoefficientMap_initial] + simp only [Finset.sum_mul,mul_sub,Finset.sum_sub_distrib,mul_assoc] + have hb := norm_finite_inner_le v (fun i => nonunitalCoefficientAction M v i-v i*a) + have hs : Real.sqrt ‖∑ i,star (v i)*v i‖≤1 := Real.sqrt_le_one.mpr (by + simpa only [nonunitalCoefficientMap_initial] using hv) + calc + _ ≤ ‖nonunitalCoefficientMap v 1*a-nonunitalCoefficientMap v M‖+ + ‖nonunitalCoefficientMap v M-a‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ = ‖∑ i,star (v i)*(nonunitalCoefficientAction M v i-v i*a)‖+ + ‖nonunitalCoefficientMap v M-a‖ := by rw [norm_sub_rev,he] + _ ≤ Real.sqrt ‖∑ i,star (nonunitalCoefficientAction M v i-v i*a)* + (nonunitalCoefficientAction M v i-v i*a)‖+‖nonunitalCoefficientMap v M-a‖ := by + refine add_le_add (hb.trans ?_) le_rfl + simpa only [one_mul] using mul_le_mul_of_nonneg_right hs (Real.sqrt_nonneg _) + _ = _ := add_comm _ _ + +lemma nuclear_weaklyPurelyInfinite_nonunital_centralizing_compression + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ v : Fin n → A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + ‖nonunitalCoefficientMap v 1‖≤1 ∧ + CompletelyPositive (finiteCompressionContinuous v) ∧ + ‖finiteCompressionContinuous v‖≤1 ∧ + ∀ a∈F,‖nonunitalCoefficientMap v (φ a)-a‖<ε ∧ + ‖nonunitalCoefficientMap v 1*a-a‖<ε ∧ + ‖a*nonunitalCoefficientMap v 1-a‖<ε ∧ + ∀ r : A,‖r‖≤1 → ‖a*finiteCompression v r-finiteCompression v r*a‖<ε := by + classical + let δ : ℝ := min (ε/4) (ε^2/64) + have hδ : 0<δ := lt_min (by positivity) (by positivity) + have hδε : δ≤ε/4 := min_le_left _ _ + have hδsq : δ≤ε^2/64 := min_le_right _ _ + let G : Finset A := F∪F.image star + obtain ⟨n,hn,φ,v,hφ,hφn,hv,happ⟩ := + nuclear_weaklyPurelyInfinite_nonunital_column_approximation hN hW G δ hδ + have hvn : ‖∑ i,star (v i)*v i‖≤1 := by + simpa only [nonunitalCoefficientMap_initial] using hv + let D (b : A) : ℝ := ‖∑ i,star (nonunitalCoefficientAction (φ b) v i-v i*b)* + (nonunitalCoefficientAction (φ b) v i-v i*b)‖ + have hD (b : A) (hb : b∈G) : Real.sqrt (D b)<ε/8 := by + have hb0 : 0≤D b := norm_nonneg _ + have hbδ : D b<δ := (happ b hb).2 + have hsq := Real.sq_sqrt hb0 + have hs0 := Real.sqrt_nonneg (D b) + nlinarith + have hrow (a : A) (ha : a∈G) : ‖nonunitalCoefficientMap v 1*a-a‖<ε := by + have ht := nonunitalCoefficient_initial_action_error v hv (φ a) a + have h1 := (happ a ha).1 + have h2 := hD a ha + change _ ≤ ‖nonunitalCoefficientMap v (φ a)-a‖+Real.sqrt (D a) at ht + linarith + have hqstar : star (nonunitalCoefficientMap v 1)=nonunitalCoefficientMap v 1 := + (IsSelfAdjoint.of_nonneg (nonunitalCoefficientMap_nonneg v 1 zero_le_one)).star_eq + refine ⟨n,hn,φ,v,hφ,hφn,hv,finiteCompressionContinuous_cp v, + (finiteCompressionContinuous_norm_le v).trans hvn,?_⟩ + intro a ha + have haG : a∈G := Finset.mem_union_left _ ha + have hasG : star a∈G := Finset.mem_union_right _ (Finset.mem_image_of_mem star ha) + refine ⟨(happ a haG).1.trans_le (hδε.trans (by linarith)),hrow a haG,?_,?_⟩ + · have he : star (nonunitalCoefficientMap v 1*star a-star a)=a*nonunitalCoefficientMap v 1-a := by + rw [star_sub,star_mul,star_star,hqstar] + rw [← he,norm_star] + exact hrow (star a) hasG + · intro r hr + exact (finiteCompression_nonunital_commutator_norm_le v φ hφ hvn a r hr).trans_lt + (show Real.sqrt (D (star a))+Real.sqrt (D a)<ε by + have h1 := hD (star a) hasG + have h2 := hD a haG + linarith) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalCoefficients.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..998fc29d2a923cfce62b114762328aac3910b75c --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCoefficients.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] + +variable {n : ℕ} + +def finiteCoefficientSum (v : Fin n → A) (M : CStarMatrix (Fin n) (Fin n) ℂ) : A := + ∑ i,∑ j,M i j • (star (v i)*v j) + +def matrixCoefficientWeight (M : CStarMatrix (Fin n) (Fin n) ℂ) : ℝ := + ∑ i,∑ j,‖M i j‖ + +lemma matrixCoefficientWeight_nonneg (M : CStarMatrix (Fin n) (Fin n) ℂ) : + 0 ≤ matrixCoefficientWeight M := + Finset.sum_nonneg fun _ _ => Finset.sum_nonneg fun _ _ => norm_nonneg _ + +lemma matrixCoefficientWeight_one : matrixCoefficientWeight (1:CStarMatrix (Fin n) (Fin n) ℂ)=n := by + simp [matrixCoefficientWeight,CStarMatrix.one_apply,apply_ite] + +lemma finiteCoefficientSum_one (v : Fin n → A) : + finiteCoefficientSum v 1=∑ i,star (v i)*v i := by + simp [finiteCoefficientSum,CStarMatrix.one_apply] + +lemma finiteCoefficientSum_gram_error + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) (v : Fin n → A) + (η : ℝ) (hv : ∀ i j,‖star (v i)*v j-ψ (matrixUnit i j)‖≤η) + (M : CStarMatrix (Fin n) (Fin n) ℂ) : + ‖finiteCoefficientSum v M-ψ M‖≤η*matrixCoefficientWeight M := by + have he : finiteCoefficientSum v M-ψ M= + ∑ i,∑ j,M i j • (star (v i)*v j-ψ (matrixUnit i j)) := by + conv_lhs => arg 2; rw [← matrix_unit_expansion M] + simp only [map_sum,map_smul,finiteCoefficientSum,smul_sub,Finset.sum_sub_distrib] + rw [he] + calc + _ ≤ ∑ i,∑ j,‖M i j • (star (v i)*v j-ψ (matrixUnit i j))‖ := + (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => norm_sum_le _ _) + _ ≤ ∑ i,∑ j,‖M i j‖*η := by + apply Finset.sum_le_sum + intro i _ + apply Finset.sum_le_sum + intro j _ + rw [norm_smul] + exact mul_le_mul_of_nonneg_left (hv i j) (norm_nonneg _) + _ = _ := by simp only [matrixCoefficientWeight,← Finset.sum_mul]; ring + +lemma finiteCoefficientSum_rescale (v : Fin n → A) (κ : ℝ) (hκ : 0≤κ) + (M : CStarMatrix (Fin n) (Fin n) ℂ) : + finiteCoefficientSum (fun i => (Real.sqrt κ:ℂ) • v i) M= + (κ:ℂ) • finiteCoefficientSum v M := by + have he (i j : Fin n) : + star ((Real.sqrt κ:ℂ) • v i)*((Real.sqrt κ:ℂ) • v j)= + (κ:ℂ) • (star (v i)*v j) := by + simp only [star_smul,Complex.star_def,Complex.conj_ofReal,smul_mul_assoc,mul_smul_comm,smul_smul] + rw [← Complex.ofReal_mul,Real.mul_self_sqrt hκ] + simp only [finiteCoefficientSum,he,smul_comm (M _ _) (κ:ℂ),Finset.smul_sum] + +lemma finiteCoefficientSum_rescale_error + (v : Fin n → A) (κ : ℝ) (hκ : 0≤κ) (hκ1 : κ≤1) + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) + (M : CStarMatrix (Fin n) (Fin n) ℂ) : + ‖finiteCoefficientSum (fun i => (Real.sqrt κ:ℂ) • v i) M-ψ M‖≤ + ‖finiteCoefficientSum v M-ψ M‖+(1-κ)*‖ψ M‖ := by + rw [finiteCoefficientSum_rescale v κ hκ M] + have he : (κ:ℂ) • finiteCoefficientSum v M-ψ M= + (κ:ℂ) • (finiteCoefficientSum v M-ψ M)+((κ:ℂ)-1) • ψ M := by + rw [smul_sub,sub_smul,one_smul] + abel + rw [he] + calc + _ ≤ ‖(κ:ℂ) • (finiteCoefficientSum v M-ψ M)‖+‖((κ:ℂ)-1) • ψ M‖ := norm_add_le _ _ + _ = κ*‖finiteCoefficientSum v M-ψ M‖+(1-κ)*‖ψ M‖ := by + rw [norm_smul,norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg hκ] + have hnorm : ‖(κ:ℂ)-1‖=1-κ := by + rw [← Complex.ofReal_one,← Complex.ofReal_sub,Complex.norm_real,Real.norm_eq_abs, + abs_of_nonpos (by linarith)] + ring + rw [hnorm] + _ ≤ _ := add_le_add (by simpa only [one_mul] using + mul_le_mul_of_nonneg_right hκ1 (norm_nonneg (finiteCoefficientSum v M-ψ M))) le_rfl + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumn.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumn.lean new file mode 100644 index 0000000000000000000000000000000000000000..db9e3c00f68686b9079972bfd60a39871ac566d5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumn.lean @@ -0,0 +1,175 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact +import OAI.Analysis.WeakInfiniteness.NonunitalSchwarz + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section CoefficientMap + +variable {A : Type u} [NonUnitalCStarAlgebra A] + +variable {n : Type*} [Fintype n] [DecidableEq n] + +def nonunitalCoefficientMap (v : n → A) : CStarMatrix n n ℂ →ₗ[ℂ] A := + ∑ i,∑ j,(matrixEntryLinear i j).smulRight (star (v i)*v j) + +omit [DecidableEq n] in +lemma nonunitalCoefficientMap_apply (v : n → A) (M : CStarMatrix n n ℂ) : + nonunitalCoefficientMap v M=∑ i,∑ j,M i j • (star (v i)*v j) := by + simp only [nonunitalCoefficientMap, LinearMap.sum_apply, LinearMap.smulRight_apply] + rfl + +def nonunitalCoefficientAction (M : CStarMatrix n n ℂ) (v : n → A) (i : n) : A := + ∑ j,M i j • v j + +lemma nonunitalCoefficientMap_initial (v : n → A) : + nonunitalCoefficientMap v 1=∑ i,star (v i)*v i := by + rw [nonunitalCoefficientMap_apply] + simp [CStarMatrix.one_apply] + +omit [DecidableEq n] in +lemma nonunitalCoefficientMap_mixed (v : n → A) (M : CStarMatrix n n ℂ) : + nonunitalCoefficientMap v M=∑ i,star (v i)*nonunitalCoefficientAction M v i := by + simp only [nonunitalCoefficientMap_apply,nonunitalCoefficientAction,Finset.mul_sum,mul_smul_comm] + +omit [DecidableEq n] in +lemma nonunitalCoefficientMap_square (v : n → A) (M : CStarMatrix n n ℂ) : + nonunitalCoefficientMap v (star M*M)= + ∑ i,star (nonunitalCoefficientAction M v i)*nonunitalCoefficientAction M v i := by + simp only [nonunitalCoefficientMap_apply,CStarMatrix.mul_apply,CStarMatrix.star_apply, + Finset.sum_smul,nonunitalCoefficientAction,star_sum,Finset.sum_mul,Finset.mul_sum, + star_smul,smul_mul_assoc,mul_smul_comm,Finset.smul_sum,smul_smul, mul_comm (M _ _)] + calc + (∑ i,∑ j,∑ k,(star (M k i)*M k j) • (star (v i)*v j)) = + ∑ i,∑ k,∑ j,(star (M k i)*M k j) • (star (v i)*v j) := by + congr 1; ext i; rw [Finset.sum_comm] + _ = ∑ k,∑ i,∑ j,(star (M k i)*M k j) • (star (v i)*v j) := Finset.sum_comm + _ = _ := by congr 1; ext k; rw [Finset.sum_comm] + +lemma nonunitalCoefficient_defect_identity (v : n → A) (M : CStarMatrix n n ℂ) (a : A) : + (∑ i,star (nonunitalCoefficientAction M v i-v i*a)*(nonunitalCoefficientAction M v i-v i*a)) = + nonunitalCoefficientMap v (star M*M)-star (nonunitalCoefficientMap v M)*a- + star a*nonunitalCoefficientMap v M+star a*nonunitalCoefficientMap v 1*a := by + have he (i : n) : + star (nonunitalCoefficientAction M v i-v i*a)*(nonunitalCoefficientAction M v i-v i*a)= + star (nonunitalCoefficientAction M v i)*nonunitalCoefficientAction M v i- + (star (nonunitalCoefficientAction M v i)*v i)*a- + star a*(star (v i)*nonunitalCoefficientAction M v i)+ + star a*(star (v i)*v i)*a := by + simp only [star_sub,star_mul] + noncomm_ring + simp only [he,Finset.sum_add_distrib,Finset.sum_sub_distrib, + ← Finset.sum_mul,← Finset.mul_sum] + rw [nonunitalCoefficientMap_square,nonunitalCoefficientMap_initial,nonunitalCoefficientMap_mixed] + simp only [star_sum,star_mul,star_star] + +end CoefficientMap + +section Positivity + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : Type*} [Fintype n] [DecidableEq n] + +local instance nonunitalCoefficientMatrixRealModule : Module ℝ (CStarMatrix n n ℂ) := + Module.complexToReal _ + +lemma nonunitalCoefficientMap_nonneg (v : n → A) + (M : CStarMatrix n n ℂ) (hM : 0≤M) : 0 ≤ nonunitalCoefficientMap v M := by + let X := CFC.sqrt M + have hX : star X*X=M := by + rw [show star X=X from (IsSelfAdjoint.of_nonneg (CFC.sqrt_nonneg M)).star_eq] + exact CFC.sqrt_mul_sqrt_self M hM + rw [← hX,nonunitalCoefficientMap_square] + exact Finset.sum_nonneg fun i _ => star_mul_self_nonneg _ + +lemma nonunitalCoefficientMap_mono (v : n → A) : Monotone (nonunitalCoefficientMap v) := by + intro M N hMN + have h := nonunitalCoefficientMap_nonneg v (N-M) (sub_nonneg.mpr hMN) + simpa only [map_sub,sub_nonneg] using h + +omit [Fintype n] [DecidableEq n] in +lemma nonunital_contraction_conjugate_le_self (p a : A) (hp : 0≤p) (hpn : ‖p‖≤1) : + star a*p*a ≤ star a*a := by + have hpU : 0≤(p:Unitization ℂ A) := Unitization.inr_nonneg_iff.mpr hp + have hp1 : (p:Unitization ℂ A)≤1 := + (CStarAlgebra.norm_le_one_iff_of_nonneg _ hpU).mp (by + simpa only [Unitization.norm_inr] using hpn) + have h := star_left_conjugate_nonneg (sub_nonneg.mpr hp1) (a:Unitization ℂ A) + apply sub_nonneg.mp + apply Unitization.inr_nonneg_iff.mp + convert h using 1 + simp only [Unitization.inr_sub,Unitization.inr_mul,Unitization.inr_star] + noncomm_ring + +lemma nonunitalCoefficient_defect_le (v : n → A) + (φ : A →L[ℂ] CStarMatrix n n ℂ) (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (hv : ‖nonunitalCoefficientMap v 1‖≤1) (a : A) : + (∑ i,star (nonunitalCoefficientAction (φ a) v i-v i*a)* + (nonunitalCoefficientAction (φ a) v i-v i*a)) ≤ + nonunitalCoefficientMap v (φ (star a*a))-star a*a+ + star a*(a-nonunitalCoefficientMap v (φ a))+ + star (a-nonunitalCoefficientMap v (φ a))*a := by + have h1 := sub_nonneg.mpr (nonunitalCoefficientMap_mono v (completelyPositive_schwarz_nonunital_domain hφ hφn a)) + have h2 := sub_nonneg.mpr (nonunital_contraction_conjugate_le_self + (nonunitalCoefficientMap v 1) a (nonunitalCoefficientMap_nonneg v 1 zero_le_one) hv) + apply sub_nonneg.mp + rw [nonunitalCoefficient_defect_identity] + have h := add_nonneg h1 h2 + convert h using 1 + simp only [star_sub] + noncomm_ring + +lemma nonunitalCoefficient_defect_norm_le (v : n → A) + (φ : A →L[ℂ] CStarMatrix n n ℂ) (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (hv : ‖nonunitalCoefficientMap v 1‖≤1) (a : A) : + ‖∑ i,star (nonunitalCoefficientAction (φ a) v i-v i*a)* + (nonunitalCoefficientAction (φ a) v i-v i*a)‖ ≤ + ‖nonunitalCoefficientMap v (φ (star a*a))-star a*a‖+ + 2*‖a‖*‖nonunitalCoefficientMap v (φ a)-a‖ := by + have h := CStarAlgebra.norm_le_norm_of_le_of_nonneg + (nonunitalCoefficient_defect_le v φ hφ hφn hv a) + (Finset.sum_nonneg fun i _ => star_mul_self_nonneg _) + refine h.trans ?_ + calc + _ ≤ (‖nonunitalCoefficientMap v (φ (star a*a))-star a*a‖+ + ‖star a*(a-nonunitalCoefficientMap v (φ a))‖)+ + ‖star (a-nonunitalCoefficientMap v (φ a))*a‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ (‖nonunitalCoefficientMap v (φ (star a*a))-star a*a‖+ + ‖a‖*‖a-nonunitalCoefficientMap v (φ a)‖)+ + ‖a-nonunitalCoefficientMap v (φ a)‖*‖a‖ := by + gcongr + · simpa only [norm_star] using norm_mul_le (star a) (a-nonunitalCoefficientMap v (φ a)) + · simpa only [norm_star] using norm_mul_le (star (a-nonunitalCoefficientMap v (φ a))) a + _ = _ := by rw [norm_sub_rev a]; ring + +end Positivity + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumnApproximation.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumnApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..abc93d77786ce312cc513f31b3c4327cfa57b553 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalColumnApproximation.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalColumn +import OAI.Analysis.WeakInfiniteness.NonunitalRealization + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma nuclear_weaklyPurelyInfinite_nonunital_column_approximation + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ v : Fin n → A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + ‖nonunitalCoefficientMap v 1‖≤1 ∧ + ∀ a∈F,‖nonunitalCoefficientMap v (φ a)-a‖<ε ∧ + ‖∑ i,star (nonunitalCoefficientAction (φ a) v i-v i*a)* + (nonunitalCoefficientAction (φ a) v i-v i*a)‖<ε := by + classical + let M : ℝ := ∑ a ∈ F, ‖a‖ + have hM0 : 0≤M := Finset.sum_nonneg fun a _ => norm_nonneg a + have hM (a : A) (ha : a∈F) : ‖a‖≤M := + Finset.single_le_sum (fun b _ => norm_nonneg b) ha + let δ : ℝ := ε/(2*(1+2*M)) + have hd : 0<2*(1+2*M) := by positivity + have hδ : 0<δ := div_pos hε hd + have hδeq : δ*(2*(1+2*M))=ε := div_mul_cancel₀ ε (ne_of_gt hd) + have hδε : δ<ε := by nlinarith [mul_nonneg hM0 (le_of_lt hδ)] + let G : Finset A := F∪F.image (fun a => star a*a) + obtain ⟨n,hn,φ,v,hφ,hφn,hvn,happ⟩ := + nuclear_weaklyPurelyInfinite_nonunital_coefficient_approximation hN hW G δ hδ + have hv : ‖nonunitalCoefficientMap v 1‖≤1 := by + simpa only [nonunitalCoefficientMap_initial] using hvn + have happ' (a : A) (ha : a∈G) : ‖nonunitalCoefficientMap v (φ a)-a‖<δ := by + simpa only [nonunitalCoefficientMap_apply,finiteCoefficientSum] using happ a ha + refine ⟨n,hn,φ,v,hφ,hφn,hv,?_⟩ + intro a ha + have haG : a∈G := Finset.mem_union_left _ ha + have haaG : star a*a∈G := Finset.mem_union_right _ + (Finset.mem_image_of_mem _ ha) + refine ⟨(happ' a haG).trans hδε,?_⟩ + have hb := nonunitalCoefficient_defect_norm_le v φ hφ hφn hv a + have he : 2*‖a‖*‖nonunitalCoefficientMap v (φ a)-a‖≤2*‖a‖*δ := + mul_le_mul_of_nonneg_left (happ' a haG).le (by positivity) + have hm : 2*‖a‖*δ≤2*M*δ := by gcongr; exact hM a ha + have hsmall : δ+2*M*δ<ε := by nlinarith + exact hb.trans_lt ((add_lt_add_of_lt_of_le (happ' (star a*a) haaG) (he.trans hm)).trans hsmall) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalCompression.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..6decf538fa12f5a69cd4fdfd7129deac13b62ac1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalCompression.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalColumn +import OAI.Analysis.WeakInfiniteness.NuclearCompression + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section Central + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +lemma finiteCompression_nonunital_commutator (v : Fin n → A) (φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ) + (hφ : CompletelyPositive φ) (a r : A) : + a*finiteCompression v r-finiteCompression v r*a= + -(∑ i,star (nonunitalCoefficientAction (φ (star a)) v i-v i*star a)*r*v i)+ + ∑ i,star (v i)*r*(nonunitalCoefficientAction (φ a) v i-v i*a) := by + have he : (∑ i,∑ j,φ a j i • (star (v j)*r*v i)) = + ∑ i,∑ j,φ a i j • (star (v i)*r*v j) := Finset.sum_comm + simp only [finiteCompression,nonunitalCoefficientAction,star_sub,star_sum,star_smul, + completelyPositive_map_star hφ,CStarMatrix.star_apply,star_star,star_mul, + Finset.sum_mul,Finset.mul_sum,sub_mul,mul_sub,Finset.sum_sub_distrib, + smul_mul_assoc,mul_smul_comm] + rw [he] + simp only [mul_assoc] + abel + +lemma finiteCompression_nonunital_commutator_norm_le (v : Fin n → A) + (φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ) (hφ : CompletelyPositive φ) + (hv : ‖∑ i,star (v i)*v i‖≤1) (a r : A) (hr : ‖r‖≤1) : + ‖a*finiteCompression v r-finiteCompression v r*a‖ ≤ + Real.sqrt ‖∑ i,star (nonunitalCoefficientAction (φ (star a)) v i-v i*star a)* + (nonunitalCoefficientAction (φ (star a)) v i-v i*star a)‖+ + Real.sqrt ‖∑ i,star (nonunitalCoefficientAction (φ a) v i-v i*a)* + (nonunitalCoefficientAction (φ a) v i-v i*a)‖ := by + let d (a : A) (i : Fin n) := nonunitalCoefficientAction (φ a) v i-v i*a + have hs : Real.sqrt ‖∑ i,star (v i)*v i‖≤1 := (Real.sqrt_le_one).mpr hv + rw [finiteCompression_nonunital_commutator v φ hφ a r] + calc + _ ≤ ‖∑ i,star (d (star a) i)*r*v i‖+‖∑ i,star (v i)*r*d a i‖ := by + simpa only [norm_neg] using norm_add_le + (-(∑ i,star (d (star a) i)*r*v i)) (∑ i,star (v i)*r*d a i) + _ ≤ (Real.sqrt ‖∑ i,star (d (star a) i)*d (star a) i‖*‖r‖* + Real.sqrt ‖∑ i,star (v i)*v i‖)+ + (Real.sqrt ‖∑ i,star (v i)*v i‖*‖r‖*Real.sqrt ‖∑ i,star (d a i)*d a i‖) := + add_le_add (norm_finite_sandwich_le (d (star a)) v r) + (norm_finite_sandwich_le v (d a) r) + _ ≤ (Real.sqrt ‖∑ i,star (d (star a) i)*d (star a) i‖*1*1)+ + (1*1*Real.sqrt ‖∑ i,star (d a i)*d a i‖) := by gcongr + _ = _ := by simp only [mul_one,one_mul,d] + +end Central + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalExactness.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalExactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..e120d222b130c8901f826451457c52e14d4abed1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalExactness.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalHeredity +import OAI.Analysis.WeakInfiniteness.TensorIdealCut + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter Topology + +universe algebraUniverse + +variable {A B : Type algebraUniverse} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +theorem exact_of_injective + (φ : A →⋆ₙₐ[ℂ] B) (hφ : Function.Injective φ) + (K : ComplexHilbert.{algebraUniverse}) (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) + (hψ : Function.Injective ψ) (hB : Exact B) : Exact A := by + intro C D _ _ q hq z hz + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let I := kernelAlgebra q + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let l := CStarAlgebra.approximateUnit I + have hl := CStarAlgebra.increasingApproximateUnit I + let : l.NeBot := hl.toIsApproximateUnit.neBot + let e : I → C := Subtype.val + have he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1 := by + filter_upwards [hl.eventually_nonneg, hl.eventually_norm] with i hi hn + refine ⟨?_, hn⟩ + obtain ⟨x, hx⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hi + have hi' : e i = star (e x) * e x := congrArg Subtype.val hx + rw [hi'] + exact star_mul_self_nonneg _ + have happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c) := by + intro c hc + let x : I := ⟨c,hc⟩ + exact continuous_subtype_val.tendsto x |>.comp (hl.tendsto_mul_left x) + have hmem : (minimalMapLeft φ z).val ∈ + tensorKernelIdeal (A := B) q := by + apply hB C D q hq + intro π + exact hz (π.precompLeft φ) + have hcuts := tensorCutNonunital_tendsto_zero_on_ideal l e he q happ + (minimalMapLeft φ z) hmem + have hcutz : Tendsto (fun i => tensorCutNonunital (e i) z) l (𝓝 0) := by + apply tendsto_zero_iff_norm_tendsto_zero.mpr + have hn := tendsto_zero_iff_norm_tendsto_zero.mp hcuts + convert hn using 1 + funext i + rw [← minimalMapLeft_tensorCutNonunital] + exact (norm_minimalMapLeft φ K ψ hφ hψ _).symm + exact tensor_mem_ideal_of_nonunitalCuts l e q (fun i => i.property) z hcutz + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalGram.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalGram.lean new file mode 100644 index 0000000000000000000000000000000000000000..0651784d81878dd3d2e382cbf7e5fe5210c3eb13 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalGram.lean @@ -0,0 +1,116 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.MatrixCutToolkit +import OAI.Analysis.WeakInfiniteness.RectangularComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology ComplexOrder + +open Filter + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +local instance nonunitalGramMatrixRealModule : Module ℝ (CStarMatrix (Fin n) (Fin n) A) := + Module.complexToReal _ + +omit [PartialOrder A] [StarOrderedRing A] in +def finiteGram (v : Fin n → A) : CStarMatrix (Fin n) (Fin n) A := + CStarMatrix.ofMatrix (fun i j => star (v i)*v j) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma finiteGram_apply (v : Fin n → A) (i j : Fin n) : + finiteGram v i j=star (v i)*v j := rfl + +lemma matrix_diagonal_mul_tendsto_nonunital (X : CStarMatrix (Fin n) (Fin n) A) : + Tendsto (fun e => diagonalCopies n e*X) + (CStarAlgebra.approximateUnit A) (𝓝 X) := by + have he : (fun e => diagonalCopies n e*X)= + fun e => CStarMatrix.ofMatrix (fun i j => e*X i j) := by + funext e + ext i j + change (Matrix.diagonal (fun _ : Fin n => e)*(CStarMatrix.ofMatrix.symm X)) i j=e*X i j + rw [Matrix.diagonal_mul] + rfl + rw [he] + change Tendsto (fun e => fun i j => e*X i j) _ (𝓝 (fun i j => X i j)) + exact tendsto_pi_nhds.mpr fun i => tendsto_pi_nhds.mpr fun j => + (CStarAlgebra.increasingApproximateUnit A).tendsto_mul_right (X i j) + +lemma nonunital_positive_matrix_gram_approximation + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + (M : CStarMatrix (Fin n) (Fin n) A) (hM : 0≤M) + (ε : ℝ) (hε : 0<ε) : + ∃ v : Fin n → A,‖finiteGram v-M‖<ε := by + let X := CFC.sqrt M + have hX : star X*X=M := by + rw [show star X=X from (CFC.sqrt_nonneg M).star_eq] + exact CFC.sqrt_mul_sqrt_self M hM + let l := CStarAlgebra.approximateUnit A + let hl := CStarAlgebra.increasingApproximateUnit A + let : l.NeBot := hl.toIsApproximateUnit.neBot + have ht := matrix_diagonal_mul_tendsto_nonunital X + have ht' : Tendsto (fun e => star (diagonalCopies n e*X)*(diagonalCopies n e*X)) l (𝓝 M) := by + simpa only [hX] using ht.star.mul ht + have hev : ∀ᶠ e in l,‖star (diagonalCopies n e*X)*(diagonalCopies n e*X)-M‖<ε/2 := by + exact (Metric.tendsto_nhds.mp ht' (ε/2) (by positivity)).mono fun e he => by + simpa only [dist_eq_norm] using he + obtain ⟨e,he⟩ := hev.exists + let h := star e*e + have hp := (hpi h (star_mul_self_nonneg e)).diagonal_absorbs (by omega : 1≤1) n + have hc := hp.sandwich_left X + obtain ⟨R,hR⟩ := hc (ε/2) (by positivity) + let v : Fin n → A := fun i => e*R 0 i + have hv : finiteGram v=R.conjTranspose*diagonalCopies 1 h*R := by + ext i j + change star (e*R 0 i)*(e*R 0 j)= + ∑ k : Fin 1,(∑ l : Fin 1,star (R l i)*(diagonalCopies 1 h) l k)*R k j + simp only [Fin.sum_univ_one,diagonalCopies,CStarMatrix.ofMatrix_apply, + Matrix.diagonal_apply_eq,star_mul,h,mul_assoc] + have hdiag : star (diagonalCopies n e)*diagonalCopies n e=diagonalCopies n h := by + change star (diagonalHom n e)*diagonalHom n e=diagonalHom n (star e*e) + rw [← map_star,← map_mul] + have hmiddle : X.conjTranspose*diagonalCopies n h*X= + star (diagonalCopies n e*X)*(diagonalCopies n e*X) := by + rw [star_mul] + rw [← hdiag] + simp only [CStarMatrix.star_eq_conjTranspose,mul_assoc] + refine ⟨v,?_⟩ + rw [hv] + calc + _ ≤ ‖R.conjTranspose*diagonalCopies 1 h*R-(X.conjTranspose*diagonalCopies n h*X)‖+ + ‖(X.conjTranspose*diagonalCopies n h*X)-M‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add hR (by simpa only [hmiddle] using he) + _ = ε := by ring + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalHeredity.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalHeredity.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec1b6a4f79a175a39a0e3f00344ee54218a2e57a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalHeredity.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorMultiplier +import OAI.Analysis.WeakInfiniteness.UniformKernelConvergence + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u v + +noncomputable section + +open Filter Topology + +variable {A B : Type u} {C D : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def tensorCutNonunitalLinear (e : C) : MinimalTensor A C →ₗ[ℂ] MinimalTensor A C where + toFun := tensorCutNonunital e + map_add' x y := by apply Subtype.ext; change (x.val+y.val)-(x.val+y.val)*_=(_-_*_)+(_-_*_); rw [add_mul,add_sub_add_comm] + map_smul' c x := by apply Subtype.ext; change c • x.val-(c • x.val)*_ = c • (x.val-x.val*_); rw [smul_mul_assoc,smul_sub] + +def cutVanishingSpaceNonunital {ι : Type*} (l : Filter ι) (e : ι → C) : + Submodule ℂ (MinimalTensor A C) where + carrier := {x | Tendsto (fun i => tensorCutNonunital (e i) x) l (𝓝 0)} + zero_mem' := by + change Tendsto (fun i => tensorCutNonunital (e i) (0 : MinimalTensor A C)) l (𝓝 0) + have hz (e : C) : tensorCutNonunital e (0 : MinimalTensor A C)=0 := + Subtype.ext (by change 0-0*_=0; simp) + simp only [hz] + exact tendsto_const_nhds + add_mem' hx hy := by + change Tendsto _ _ _ + have hadd (i) (x y : MinimalTensor A C) : + tensorCutNonunital (e i) (x+y) = tensorCutNonunital (e i) x + tensorCutNonunital (e i) y := + (tensorCutNonunitalLinear (e i)).map_add x y + simp only [hadd] + simpa only [add_zero] using hx.add hy + smul_mem' c x hx := by + change Tendsto _ _ _ + have hsmul (i) (y : MinimalTensor A C) : + tensorCutNonunital (e i) (c • y) = c • tensorCutNonunital (e i) y := + (tensorCutNonunitalLinear (e i)).map_smul c y + simp only [hsmul] + simpa only [smul_zero] using hx.const_smul c + +lemma cutVanishingSpaceNonunital_closed [PartialOrder C] [StarOrderedRing C] + {ι : Type*} (l : Filter ι) (e : ι → C) + (he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1) : + IsClosed (cutVanishingSpaceNonunital (A := A) l e : Set (MinimalTensor A C)) := by + apply isClosed_setOf_tendsto_zero_of_bound l (fun i => tensorCutNonunitalLinear (e i)) + filter_upwards [he] with i hi + exact norm_tensorCutNonunital_le (e i) hi.1 hi.2 + +lemma tensorCutNonunital_tendsto_zero_on_ideal [PartialOrder C] [StarOrderedRing C] + {ι : Type*} (l : Filter ι) (e : ι → C) + (he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1) + (q : C →⋆ₙₐ[ℂ] D) + (happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c)) + (x : MinimalTensor A C) (hx : x.val ∈ tensorKernelIdeal (A := A) q) : + Tendsto (fun i => tensorCutNonunital (e i) x) l (𝓝 0) := by + let S := cutVanishingSpaceNonunital (A := A) l e + let j : MinimalTensor A C →ₗ[ℂ] SpatialAmbient A C := + { toFun := Subtype.val + map_add' _ _ := rfl + map_smul' _ _ := rfl } + let T := S.map j + have hTc : IsClosed (T : Set (SpatialAmbient A C)) := + isClosed_closure.isClosedMap_subtype_val _ (cutVanishingSpaceNonunital_closed l e he) + have hgen : ∀ a c, q c = 0 → spatialElementary a c ∈ T := by + intro a c hc + refine ⟨minimalElementary a c, ?_, rfl⟩ + change Tendsto (fun i => tensorCutNonunital (e i) (minimalElementary a c)) l (𝓝 0) + simp only [tensorCutNonunital_elementary] + let F : C →L[ℂ] MinimalTensor A C := + LinearMap.mkContinuous + { toFun c := minimalElementary a c + map_add' c d := Subtype.ext (spatialElementary_add_right a c d) + map_smul' r c := Subtype.ext (spatialElementary_smul_right r a c) } + ‖a‖ (norm_spatialElementary_le a) + have hh : Tendsto (fun i => c-c*e i) l (𝓝 0) := by + simpa only [sub_self] using + (tendsto_const_nhds : Tendsto (fun _ : ι => c) l (𝓝 c)).sub (happ c hc) + have hF (b : C) : F b = minimalElementary a b := rfl + have h := F.continuous.tendsto 0 |>.comp hh + simp only [Function.comp_def, hF] at h + have hz : minimalElementary a (0 : C) = (0 : MinimalTensor A C) := map_zero F + exact hz ▸ h + have hspan : Submodule.span ℂ + {z : SpatialAmbient A C | ∃ a : A, ∃ c : C, q c = 0 ∧ z = spatialElementary a c} ≤ T := by + apply Submodule.span_le.mpr + rintro _ ⟨a,c,hc,rfl⟩ + exact hgen a c hc + change x.val ∈ (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A C)) at hx + rw [tensorKernelIdeal_eq_closure_span] at hx + have hmem : x.val ∈ T := (closure_minimal hspan hTc) hx + obtain ⟨y,hy,hyx⟩ := hmem + have hyx' : y = x := Subtype.ext hyx + exact hyx' ▸ hy + +lemma tensorRightMultiply_kernel_mem (q : C →⋆ₙₐ[ℂ] D) (e : C) (he : q e=0) + (x : MinimalTensor A C) : + (tensorRightMultiply e x).val ∈ tensorKernelIdeal (A := A) q := by + have hs : ∀ z ∈ Submodule.span ℂ + (Set.range fun p : A × C => spatialElementary p.1 p.2), + z*spatialRightMultiplier e ∈ tensorKernelIdeal (A := A) q := by + intro z hz + induction hz using Submodule.span_induction with + | mem z hz => + obtain ⟨⟨a,c⟩,rfl⟩ := hz + rw [spatialElementary_mul_rightMultiplier] + apply NonUnitalStarSubalgebra.le_topologicalClosure + apply NonUnitalStarAlgebra.subset_adjoin ℂ + exact ⟨a,c*e,by rw [map_mul,he,mul_zero],rfl⟩ + | zero => rw [zero_mul]; exact (tensorKernelIdeal (A := A) q).zero_mem + | add z w _ _ hz hw => rw [add_mul]; exact (tensorKernelIdeal (A := A) q).add_mem hz hw + | smul c z _ hz => rw [smul_mul_assoc]; exact (tensorKernelIdeal (A := A) q).smul_mem c hz + have hc : IsClosed {z : SpatialAmbient A C | z*spatialRightMultiplier e ∈ tensorKernelIdeal (A := A) q} := + isClosed_closure.preimage (continuous_id.mul continuous_const) + have hx := x.property + change x.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hx + rw [minimalTensor_eq_closure_span] at hx + exact (closure_minimal hs hc) hx + +lemma tensor_mem_ideal_of_nonunitalCuts {ι : Type*} (l : Filter ι) [l.NeBot] + (e : ι → C) (q : C →⋆ₙₐ[ℂ] D) (he : ∀ i, q (e i)=0) + (x : MinimalTensor A C) + (hx : Tendsto (fun i => tensorCutNonunital (e i) x) l (𝓝 0)) : + x.val ∈ tensorKernelIdeal (A := A) q := by + have hmul : Tendsto (fun i => tensorRightMultiply (e i) x) l (𝓝 x) := by + have h := (tendsto_const_nhds : Tendsto (fun _ : ι => x) l (𝓝 x)).sub hx + simpa only [tensorCutNonunital, sub_sub_cancel, sub_zero] using h + apply isClosed_closure.mem_of_tendsto (continuous_subtype_val.tendsto x |>.comp hmul) + exact Filter.Eventually.of_forall (fun i => tensorRightMultiply_kernel_mem q (e i) (he i) x) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalRealization.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..badc686609c3659c1fa92b762f23b49387b17d63 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalRealization.lean @@ -0,0 +1,138 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ChoiFactor +import OAI.Analysis.WeakInfiniteness.NonunitalCoefficients +import OAI.Analysis.WeakInfiniteness.NonunitalGram +import OAI.Analysis.WeakInfiniteness.NuclearExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma nonunital_completelyPositive_coefficient_approximation + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + {n : ℕ} (hn : 1≤n) + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) + (hψ : CompletelyPositive ψ) (hψn : ‖ψ‖≤1) + (F : Finset (CStarMatrix (Fin n) (Fin n) ℂ)) (ε : ℝ) (hε : 0<ε) : + ∃ w : Fin n → A,‖∑ i,star (w i)*w i‖≤1 ∧ + ∀ M∈F,‖finiteCoefficientSum w M-ψ M‖<ε := by + classical + let W : ℝ := 1+∑ M∈F,(matrixCoefficientWeight M+(n:ℝ)*‖ψ M‖) + have hW : 0 add_nonneg (matrixCoefficientWeight_nonneg M) + (mul_nonneg (Nat.cast_nonneg n) (norm_nonneg _)) + dsimp only [W] + linarith + let η : ℝ := ε/(2*W) + have hη : 0<η := div_pos hε (by positivity) + have hηW : η*W<ε := by + dsimp only [η] + have hw0 : W≠0 := ne_of_gt hW + field_simp + nlinarith + let M₀ : CStarMatrix (Fin n) (Fin n) A := + matrixLinearMap ψ (CStarMatrix.ofMatrix (fun i j : Fin n => matrixUnit i j)) + have hM₀ : 0≤M₀ := matrixLinearMap_nonneg hψ + (matrixUnits_nonneg (⟨0,by omega⟩ : Fin n)) + obtain ⟨v,hv⟩ := nonunital_positive_matrix_gram_approximation hpi M₀ hM₀ η hη + have hvij (i j : Fin n) : ‖star (v i)*v j-ψ (matrixUnit i j)‖≤η := by + exact (CStarMatrix.norm_entry_le_norm (M := finiteGram v-M₀) (i := i) (j := j)).trans hv.le + have hvM (M : CStarMatrix (Fin n) (Fin n) ℂ) : + ‖finiteCoefficientSum v M-ψ M‖≤η*matrixCoefficientWeight M := + finiteCoefficientSum_gram_error ψ v η hvij M + have hψ1 : ‖ψ 1‖≤1 := by + let : Nonempty (Fin n) := ⟨⟨0,by omega⟩⟩ + calc + _ ≤ ‖ψ‖*‖(1:CStarMatrix (Fin n) (Fin n) ℂ)‖ := ψ.le_opNorm 1 + _ = ‖ψ‖ := by rw [norm_one,mul_one] + _ ≤ 1 := hψn + have hv1 : ‖finiteCoefficientSum v 1‖≤1+(n:ℝ)*η := by + have he := hvM 1 + rw [matrixCoefficientWeight_one] at he + have ht := norm_le_norm_sub_add (finiteCoefficientSum v 1) (ψ 1) + nlinarith + let κ : ℝ := (1+(n:ℝ)*η)⁻¹ + have hnη : 0≤(n:ℝ)*η := mul_nonneg (Nat.cast_nonneg n) hη.le + have hd : 0<1+(n:ℝ)*η := by linarith + have hκ : 0<κ := inv_pos.mpr hd + have hκe : κ*(1+(n:ℝ)*η)=1 := inv_mul_cancel₀ (ne_of_gt hd) + have hκ1 : κ≤1 := by nlinarith + have hκerr : 1-κ≤(n:ℝ)*η := by nlinarith [mul_nonneg (sub_nonneg.mpr hκ1) hnη] + let w : Fin n → A := fun i => (Real.sqrt κ:ℂ) • v i + refine ⟨w,?_,?_⟩ + · rw [← finiteCoefficientSum_one] + change ‖finiteCoefficientSum (fun i => (Real.sqrt κ:ℂ) • v i) 1‖≤1 + rw [finiteCoefficientSum_rescale v κ hκ.le 1,norm_smul, + Complex.norm_real,Real.norm_eq_abs,abs_of_pos hκ] + exact (mul_le_mul_of_nonneg_left hv1 hκ.le).trans_eq hκe + · intro M hMF + have hMW : matrixCoefficientWeight M+(n:ℝ)*‖ψ M‖≤W := by + have ht := Finset.single_le_sum (s := F) + (f := fun M => matrixCoefficientWeight M+(n:ℝ)*‖ψ M‖) + (fun M _ => add_nonneg (matrixCoefficientWeight_nonneg M) + (mul_nonneg (Nat.cast_nonneg n) (norm_nonneg _))) hMF + dsimp only [W] + linarith + calc + _ ≤ ‖finiteCoefficientSum v M-ψ M‖+(1-κ)*‖ψ M‖ := + finiteCoefficientSum_rescale_error v κ hκ.le hκ1 ψ M + _ ≤ η*matrixCoefficientWeight M+((n:ℝ)*η)*‖ψ M‖ := + add_le_add (hvM M) (mul_le_mul_of_nonneg_right hκerr (norm_nonneg _)) + _ = η*(matrixCoefficientWeight M+(n:ℝ)*‖ψ M‖) := by ring + _ ≤ η*W := mul_le_mul_of_nonneg_left hMW hη.le + _ < ε := hηW + +lemma nuclear_weaklyPurelyInfinite_nonunital_coefficient_approximation + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ v : Fin n → A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + ‖∑ i,star (v i)*v i‖≤1 ∧ + ∀ a∈F,‖finiteCoefficientSum v (φ a)-a‖<ε := by + classical + have hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a) := + fun _ ha => exact_weaklyPurelyInfinite_individuallyProperlyInfinite_any + (nuclear_exact hN) hW ha + obtain ⟨n,hn,φ,ψ,hφ,hψ,hφn,hψn,happ⟩ := hN F (ε/2) (by positivity) + obtain ⟨v,hv,hvapp⟩ := nonunital_completelyPositive_coefficient_approximation + hpi hn ψ hψ hψn (F.image φ) (ε/2) (by positivity) + refine ⟨n,hn,φ,v,hφ,hφn,hv,?_⟩ + intro a ha + calc + _ ≤ ‖finiteCoefficientSum v (φ a)-ψ (φ a)‖+‖ψ (φ a)-a‖ := + norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ < ε/2+ε/2 := add_lt_add (hvapp (φ a) (Finset.mem_image_of_mem φ ha)) (happ a ha) + _ = ε := by ring + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalSchwarz.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSchwarz.lean new file mode 100644 index 0000000000000000000000000000000000000000..46e99554ed7e479f83ed4781166815ff01ab5cc9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSchwarz.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CPSchwarz + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder Topology + +open Filter + +universe u v + +section + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +lemma completelyPositive_schwarz_nonunital_domain {φ : A →L[ℂ] B} + (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) (a : A) : + star (φ a)*φ a≤φ (star a*a) := by + let l := CStarAlgebra.approximateUnit A + let hl := CStarAlgebra.increasingApproximateUnit A + let f : A → B := fun e => φ (star a*a)-φ (star a*e)*φ a- + star (φ a)*φ (e*a)+star (φ a)*φ a + have hf : ∀ᶠ e in l,0≤f e := by + filter_upwards [hl.eventually_nonneg,hl.eventually_norm] with e he hen + have hestar : star e=e := (IsSelfAdjoint.of_nonneg he).star_eq + have hφe : φ (star e*e)≤1 := by + apply (CStarAlgebra.norm_le_one_iff_of_nonneg _ + (completelyPositive_map_nonneg hφ (star_mul_self_nonneg e))).mp + calc + _ ≤ ‖φ‖*‖star e*e‖ := φ.le_opNorm _ + _ ≤ ‖star e*e‖ := by simpa only [one_mul] using + mul_le_mul_of_nonneg_right hφn (norm_nonneg (star e*e)) + _ ≤ 1 := by rw [CStarRing.norm_star_mul_self]; nlinarith [norm_nonneg e] + let R : CStarMatrix (Fin 2) (Fin 2) A := CStarMatrix.ofMatrix !![a,e;0,0] + let M := matrixLinearMap φ (star R*R) + have hM : 0≤M := matrixLinearMap_nonneg hφ (star_mul_self_nonneg R) + let V : CStarMatrix (Fin 2) (Fin 2) B := CStarMatrix.ofMatrix !![1,0;-φ a,0] + have hN := cstarMatrix_diagonal_nonneg (star V*M*V) + (star_left_conjugate_nonneg hM V) 0 + have heq : (star V*M*V) 0 0= + φ (star a*a)-φ (star a*e)*φ a-star (φ a)*φ (e*a)+ + star (φ a)*φ (star e*e)*φ a := by + simp [V,M,R,CStarMatrix.mul_apply,CStarMatrix.star_apply,Fin.sum_univ_two,hestar] + noncomm_ring + rw [heq] at hN + have hP := star_left_conjugate_nonneg (sub_nonneg.mpr hφe) (φ a) + have h := add_nonneg hN hP + convert h using 1 + dsimp only [f] + noncomm_ring + have hleft : Tendsto (fun e => φ (star a*e)) l (𝓝 (star (φ a))) := by + rw [← completelyPositive_map_star hφ a] + exact φ.continuous.tendsto _ |>.comp (hl.tendsto_mul_left (star a)) + have hright : Tendsto (fun e => φ (e*a)) l (𝓝 (φ a)) := + φ.continuous.tendsto _ |>.comp (hl.tendsto_mul_right a) + have ht : Tendsto f l (𝓝 (φ (star a*a)-star (φ a)*φ a)) := by + have ht' := (((tendsto_const_nhds (x := φ (star a*a))).sub (hleft.mul_const (φ a))).sub + (hright.const_mul (star (φ a)))).add_const (star (φ a)*φ a) + convert ht' using 1 + noncomm_ring + exact sub_nonneg.mp (ge_of_tendsto ht hf) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools.lean new file mode 100644 index 0000000000000000000000000000000000000000..33591d90c1e29701d0118ac5fc53bce998ba4fd3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SpectralResidual + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +section Unital + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] + +lemma exists_separated_spectral_windows + (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + (π : A →⋆ₐ[ℂ] B) {U p q : A} (hU : IsSelfAdjoint U) (hUD : U ∈ D) + (hp : IsSelfAdjoint p) (hpD : p ∈ D) (hpq : p*q=0) (hc : π (p*U*q) ≠ 0) : + ∃ u ∈ D,∃ v ∈ D,0 ≤ u ∧ 0 ≤ v ∧ u*v=0 ∧ π u ≠ 0 ∧ π v ≠ 0 ∧ + ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ ContinuouslySupported U u S ∧ + ContinuouslySupported U v T ∧ (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) := by + have hn : π U ≠ 0 := by + intro hz + apply hc + rw [map_mul,map_mul,hz,mul_zero,zero_mul] + obtain ⟨t,ht,ht0⟩ := exists_nonzero_spectral_value (hU.map π) hn + by_cases htwo : ∃ s ∈ spectrum ℝ (π U),s ≠ 0 ∧ s ≠ t + · obtain ⟨s,hs,hs0,hst⟩ := htwo + exact exists_windows_of_two_nonzero_spectral_values D π hU hUD hs ht hs0 ht0 hst + · apply exists_windows_of_single_nonzero_spectral_value D π hU hUD hp hpD hpq hc ht ht0 + intro s hs + by_cases hs0 : s=0 + · exact Or.inl hs0 + · exact Or.inr (by by_contra hst; exact htwo ⟨s,hs,hs0,hst⟩) + +end Unital + +section NonUnital + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type*} [CStarAlgebra B] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma starLift_inr_apply_general (π : A →⋆ₙₐ[ℂ] B) (a : A) : + (Unitization.starLift π) (a : Unitization ℂ A)=π a := + congrArg (fun f : A →⋆ₙₐ[ℂ] B => f a) (Equiv.symm_apply_apply Unitization.starLift π) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma unitization_subalgebra_closed (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosed (D : Set A)) : + IsClosed ((NonUnitalStarSubalgebra.map (Unitization.inrNonUnitalStarAlgHom ℂ A) D : + NonUnitalStarSubalgebra ℂ (Unitization ℂ A)) : Set (Unitization ℂ A)) := by + rw [NonUnitalStarSubalgebra.coe_map] + exact Unitization.isometry_inr.isClosedEmbedding.isClosedMap _ hD + +lemma exists_nonunital_separated_spectral_windows + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosed (D : Set A)) + (π : A →⋆ₙₐ[ℂ] B) {U p q : A} (hU : IsSelfAdjoint U) (hUD : U ∈ D) + (hp : IsSelfAdjoint p) (hpD : p ∈ D) (hpq : p*q=0) (hc : π (p*U*q) ≠ 0) : + ∃ u ∈ D,∃ v ∈ D,0 ≤ u ∧ 0 ≤ v ∧ u*v=0 ∧ π u ≠ 0 ∧ π v ≠ 0 ∧ + ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ + ContinuouslySupported (U : Unitization ℂ A) (u : Unitization ℂ A) S ∧ + ContinuouslySupported (U : Unitization ℂ A) (v : Unitization ℂ A) T ∧ + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) := by + let ι := Unitization.inrNonUnitalStarAlgHom ℂ A + let E := NonUnitalStarSubalgebra.map ι D + let : IsClosed (E : Set (Unitization ℂ A)) := unitization_subalgebra_closed D hD + have hEc : (Unitization.starLift π) (ι p*ι U*ι q) ≠ 0 := by + rw [← map_mul,← map_mul] + change (Unitization.starLift π) ((p*U*q : A) : Unitization ℂ A) ≠ 0 + rwa [starLift_inr_apply_general] + obtain ⟨u,hu,v,hv,hu0,hv0,huv,hun,hvn,S,T,ρ,hρ,huS,hvT,hST⟩ := + exists_separated_spectral_windows E (Unitization.starLift π) + (hU.map ι) (NonUnitalStarSubalgebra.mem_map.mpr ⟨U,hUD,rfl⟩) + (hp.map ι) (NonUnitalStarSubalgebra.mem_map.mpr ⟨p,hpD,rfl⟩) + (by rw [← map_mul,hpq,map_zero]) hEc + obtain ⟨u₀,hu₀,rfl⟩ := NonUnitalStarSubalgebra.mem_map.mp hu + obtain ⟨v₀,hv₀,rfl⟩ := NonUnitalStarSubalgebra.mem_map.mp hv + refine ⟨u₀,hu₀,v₀,hv₀,Unitization.inr_nonneg_iff.mp hu0, + Unitization.inr_nonneg_iff.mp hv0,?_,?_,?_,S,T,ρ,hρ,huS,hvT,hST⟩ + · apply Unitization.inr_injective (R := ℂ) + change ι (u₀*v₀)=ι 0 + rw [map_mul,map_zero] + exact huv + · change (Unitization.starLift π) (u₀ : Unitization ℂ A) ≠ 0 at hun + rwa [starLift_inr_apply_general] at hun + · change (Unitization.starLift π) (v₀ : Unitization ℂ A) ≠ 0 at hvn + rwa [starLift_inr_apply_general] at hvn + +end NonUnital + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools2.lean b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools2.lean new file mode 100644 index 0000000000000000000000000000000000000000..3973121a1f3cd430f1102b106c29156dc03ceb3e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NonunitalSpectralTools2.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SpectralWindows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma map_mem_hereditary (φ : A →⋆ₙₐ[ℂ] B) {h x : A} (hh : IsSelfAdjoint h) + (hx : x ∈ hereditarySubalgebra h hh) : + φ x ∈ hereditarySubalgebra (φ h) (hh.map φ) := by + apply closure_minimal _ ((NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage + (map_continuous φ)) hx + rintro _ ⟨b,rfl⟩ + change φ (h*b*h) ∈ hereditarySubalgebra (φ h) (hh.map φ) + rw [map_mul,map_mul] + exact sandwich_mem (φ h) (φ b) (hh.map φ) + +lemma continuouslySupported_hereditary_nonunital (U u : A) (hu : IsSelfAdjoint u) (S : Set ℝ) + (hs : ContinuouslySupported (U : Unitization ℂ A) (u : Unitization ℂ A) S) + {v : A} (hv : v ∈ hereditarySubalgebra u hu) : + ContinuouslySupported (U : Unitization ℂ A) (v : Unitization ℂ A) S := + continuouslySupported_hereditary (U : Unitization ℂ A) (u : Unitization ℂ A) + (hu.map (Unitization.inrNonUnitalStarAlgHom ℂ A)) S hs + (map_mem_hereditary (Unitization.inrNonUnitalStarAlgHom ℂ A) hu hv) + +def unitizationSubalgebra (D : NonUnitalStarSubalgebra ℂ A) : StarSubalgebra ℂ (Unitization ℂ A) where + carrier := {z | z.snd ∈ D} + algebraMap_mem' z := by change (0 : A) ∈ D; exact D.zero_mem + add_mem' ha hb := D.add_mem ha hb + mul_mem' {a b} ha hb := by + change a.fst • b.snd+b.fst • a.snd+a.snd*b.snd ∈ D + exact D.add_mem (D.add_mem (D.smul_mem _ hb) (D.smul_mem _ ha)) (D.mul_mem ha hb) + star_mem' ha := star_mem (s := D) ha + +lemma unitizationSubalgebra_closed (D : NonUnitalStarSubalgebra ℂ A) + (hD : IsClosed (D : Set A)) : IsClosed (unitizationSubalgebra D : Set (Unitization ℂ A)) := + hD.preimage Unitization.continuous_snd + +lemma unitizationSubalgebra_inr_mem (D : NonUnitalStarSubalgebra ℂ A) {a : A} (ha : a ∈ D) : + (a : Unitization ℂ A) ∈ unitizationSubalgebra D := ha + +omit [NonUnitalCStarAlgebra A] in +lemma unitization_inr_snd_of_fst_eq_zero {z : Unitization ℂ A} (hz : z.fst=0) : + (z.snd : Unitization ℂ A)=z := by + ext <;> simp [hz] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NormKernelWitness.lean b/lean/OAI/Analysis/WeakInfiniteness/NormKernelWitness.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae8971310da64d0017827165d286766a20e9c71b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NormKernelWitness.lean @@ -0,0 +1,69 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.DiagonalRegular +import OAI.Analysis.WeakInfiniteness.ReducedOperators +import OAI.Analysis.WeakInfiniteness.TensorIdealFunctional + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +lemma functional_norm_le_image {A B : Type*} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + (q : A →⋆ₙₐ[ℂ] B) (φ : A →L[ℂ] ℂ) + (hφ : ∀ y, q y = 0 → φ y = 0) (hφn : ‖φ‖ ≤ 1) + (x : A) {M : ℝ} (hM : 0 < M) (hxn : ‖q x‖ ≤ M) : ‖φ x‖ ≤ M := by + obtain ⟨z,hz,hzn⟩ := nonUnitalStarHom_exists_lift_norm_le q x hM hxn + have hker : q (x-z) = 0 := by rw [map_sub,hz,sub_self] + have hzero := hφ (x-z) hker + have hval : φ x = φ z := sub_eq_zero.mp (by simpa only [map_sub] using hzero) + rw [hval] + exact (φ.le_opNorm z).trans + ((mul_le_mul_of_nonneg_right hφn (norm_nonneg z)).trans + (by simpa only [one_mul] using hzn)) + +lemma freeDiagonalFunctional_large_elementary_kernel (a b : FullGroupAlgebra (FreeGroup Bool)) + (hb : fullToReducedLarge b = 0) : + freeDiagonalFunctional (minimalElementary a b) = 0 := + freeDiagonalFunctional_elementary_kernel a b (congrArg ULift.down hb) + +lemma freeDiagonalFunctional_witness_gap : + 2 * Real.sqrt 3 < ‖freeDiagonalFunctional freeDiagonalWitness‖ := by + rw [freeDiagonalFunctional_witness] + norm_num + nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 3), Real.sqrt_nonneg (3 : ℝ)] + +lemma freeDiagonalFunctional_kernel_of_exact (hQ : Exact (FullGroupAlgebra (FreeGroup Bool))) + (x : MinimalTensor (FullGroupAlgebra (FreeGroup Bool)) (FullGroupAlgebra (FreeGroup Bool))) + (hx : minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom x = 0) : + freeDiagonalFunctional x = 0 := + exact_functional_kernel (A := FullGroupAlgebra (FreeGroup Bool)) (B := FullGroupAlgebra (FreeGroup Bool)) (C := ReducedFreeLarge) hQ fullToReducedLarge.toNonUnitalStarAlgHom + fullToReducedLarge_surjective freeDiagonalFunctional + freeDiagonalFunctional_large_elementary_kernel x hx + +lemma freeDiagonalFunctional_bound_of_kernel + (hk : ∀ y : MinimalTensor (FullGroupAlgebra (FreeGroup Bool)) (FullGroupAlgebra (FreeGroup Bool)), minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom y = 0 → + freeDiagonalFunctional y = 0) : + ‖freeDiagonalFunctional freeDiagonalWitness‖ ≤ 2 * Real.sqrt 3 := by + exact functional_norm_le_image (minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom) + freeDiagonalFunctional hk norm_freeDiagonalFunctional_le freeDiagonalWitness + (by positivity) norm_freeDiagonalWitness_reduced_le + +theorem fullFreeTwo_not_exact : ¬ Exact (FullGroupAlgebra (FreeGroup Bool)) := by + intro hQ + exact not_le_of_gt freeDiagonalFunctional_witness_gap + (freeDiagonalFunctional_bound_of_kernel (freeDiagonalFunctional_kernel_of_exact hQ)) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearApproximation.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e44218eb2c932e3904bc2c1cfa157f7de8982c92 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearApproximation.lean @@ -0,0 +1,122 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NuclearTensorMap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u v w + +section + +variable {A : Type u} {B : Type v} {C : Type w} + [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + [NonUnitalCStarAlgebra C] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma tensorPolynomial_eq_sum (d : A × C →₀ ℂ) : + tensorPolynomial d=∑ p ∈ d.support,minimalElementary (d p • p.1) p.2 := by + change (∑ p ∈ d.support,d p • minimalElementary p.1 p.2)=_ + apply Finset.sum_congr rfl + intro p _ + exact Subtype.ext (spatialElementary_smul_left (d p) p.1 p.2).symm + +lemma norm_cpTensor_comp_le (φ : A →L[ℂ] B) (ψ : B →L[ℂ] A) + (hφ : CompletelyPositive φ) (hψ : CompletelyPositive ψ) + (hφn : ‖φ‖ ≤ 1) (hψn : ‖ψ‖ ≤ 1) (z : MinimalTensor A C) : + ‖minimalCPMap ψ (minimalCPMap φ z)‖ ≤ 16*‖z‖ := by + have hp := norm_minimalCPMap_le φ hφ z + have hq := norm_minimalCPMap_le ψ hψ (minimalCPMap φ z) + have h1 : ‖minimalCPMap φ z‖ ≤ 4*‖z‖ := hp.trans (by gcongr; linarith) + have h2 : ‖minimalCPMap ψ (minimalCPMap φ z)‖ ≤ 4*‖minimalCPMap φ z‖ := hq.trans (by gcongr; linarith) + linarith + +lemma norm_cpTensor_sum_error_le {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (φ : A →L[ℂ] B) (ψ : B →L[ℂ] A) (hφ : CompletelyPositive φ) (hψ : CompletelyPositive ψ) + {δ : ℝ} (hδ : ∀ i ∈ s,‖ψ (φ (a i))-a i‖ ≤ δ) : + ‖minimalCPMap ψ (minimalCPMap φ (∑ i ∈ s,minimalElementary (a i) (c i)))- + ∑ i ∈ s,minimalElementary (a i) (c i)‖ ≤ δ*(∑ i ∈ s,‖c i‖) := by + simp only [map_sum,minimalCPMap_elementary φ hφ,minimalCPMap_elementary ψ hψ] + rw [← Finset.sum_sub_distrib] + calc + _ ≤ ∑ i ∈ s,‖minimalElementary (ψ (φ (a i))) (c i)-minimalElementary (a i) (c i)‖ := norm_sum_le _ _ + _ ≤ ∑ i ∈ s,δ*‖c i‖ := by + apply Finset.sum_le_sum + intro i hi + have he : minimalElementary (ψ (φ (a i))) (c i)-minimalElementary (a i) (c i)= + minimalElementary (ψ (φ (a i))-a i) (c i) := (map_sub (minimalElementaryLeftLinear (c i)) _ _).symm + rw [he] + exact (norm_spatialElementary_le _ _).trans (mul_le_mul_of_nonneg_right (hδ i hi) (norm_nonneg _)) + _ = _ := (Finset.mul_sum s (fun i => ‖c i‖) δ).symm + +end + +section + +variable {A : Type u} {C : Type w} + [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + [NonUnitalCStarAlgebra C] + +lemma nuclear_tensor_approximation (hA : Nuclear A) (z : MinimalTensor A C) + {ε : ℝ} (hε : 0 < ε) : + ∃ n : ℕ,1 ≤ n ∧ ∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A, + CompletelyPositive φ ∧ CompletelyPositive ψ ∧ ‖φ‖ ≤ 1 ∧ ‖ψ‖ ≤ 1 ∧ + ‖minimalCPMap ψ (minimalCPMap φ z)-z‖ < ε := by + classical + obtain ⟨d,hd⟩ := Metric.denseRange_iff.mp (tensorPolynomial_dense (A := A) (C := C)) z (ε/34) (by positivity) + let p := tensorPolynomial d + have hp : ‖z-p‖ < ε/34 := by simpa only [dist_eq_norm] using hd + let a : A × C → A := fun t => d t • t.1 + let K : ℝ := ∑ t ∈ d.support,‖t.2‖ + have hK : 0 ≤ K := Finset.sum_nonneg (fun _ _ => norm_nonneg _) + let δ := ε/(2*(K+1)) + have hδ : 0 < δ := div_pos hε (by positivity) + obtain ⟨n,hn,φ,ψ,hφ,hψ,hφn,hψn,hap⟩ := hA (d.support.image a) δ hδ + have herr : ‖minimalCPMap ψ (minimalCPMap φ p)-p‖ ≤ δ*K := by + rw [show p=∑ t ∈ d.support,minimalElementary (a t) t.2 from tensorPolynomial_eq_sum d] + exact norm_cpTensor_sum_error_le d.support a Prod.snd φ ψ hφ hψ + (fun t ht => (hap (a t) (Finset.mem_image.mpr ⟨t,ht,rfl⟩)).le) + have hδK : δ*K < ε/2 := by + have hh : δ*(2*(K+1))=ε := div_mul_cancel₀ ε (by positivity) + dsimp [δ] at hh ⊢ + nlinarith + have ht : ‖minimalCPMap ψ (minimalCPMap φ z)-minimalCPMap ψ (minimalCPMap φ p)‖ ≤ 16*‖z-p‖ := by + rw [← map_sub,← map_sub] + exact norm_cpTensor_comp_le φ ψ hφ hψ hφn hψn (z-p) + refine ⟨n,hn,φ,ψ,hφ,hψ,hφn,hψn,?_⟩ + have hc : ‖(minimalCPMap ψ (minimalCPMap φ z)-minimalCPMap ψ (minimalCPMap φ p))+ + (minimalCPMap ψ (minimalCPMap φ p)-p)+(p-z)‖ ≤ + ‖minimalCPMap ψ (minimalCPMap φ z)-minimalCPMap ψ (minimalCPMap φ p)‖+ + ‖minimalCPMap ψ (minimalCPMap φ p)-p‖+‖p-z‖ := norm_add₃_le + have he : (minimalCPMap ψ (minimalCPMap φ z)-minimalCPMap ψ (minimalCPMap φ p))+ + (minimalCPMap ψ (minimalCPMap φ p)-p)+(p-z)=minimalCPMap ψ (minimalCPMap φ z)-z := by abel + rw [he,norm_sub_rev p z] at hc + linarith + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearCP.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearCP.lean new file mode 100644 index 0000000000000000000000000000000000000000..ecb393fb515a89d332098f8cb4c67052e1757a8e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearCP.lean @@ -0,0 +1,166 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology ComplexOrder + +open Filter + +universe u v + +local instance nuclearMatrixRealModule {A : Type*} [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +section + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +variable {n : Type*} [Fintype n] + +def matrixLinearMap (φ : A →L[ℂ] B) : CStarMatrix n n A →L[ℂ] CStarMatrix n n B where + toLinearMap := CStarMatrix.mapₗ φ.toLinearMap + cont := by + change Continuous (fun M : n → n → A => fun i j => φ (M i j)) + exact continuous_pi fun i => continuous_pi fun j => + φ.continuous.comp ((continuous_apply j).comp (continuous_apply i)) + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] [Fintype n] in +@[simp] lemma matrixLinearMap_apply (φ : A →L[ℂ] B) (M : CStarMatrix n n A) (i j : n) : + matrixLinearMap φ M i j = φ (M i j) := rfl + +lemma matrixLinearMap_nonneg {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + {M : CStarMatrix n n A} (hM : 0 ≤ M) : 0 ≤ matrixLinearMap φ M := + hφ.toMap.map_cstarMatrix_nonneg M hM + +lemma matrixLinearMap_mono {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) : + Monotone (matrixLinearMap (n := n) φ) := by + intro M N hMN + have hm := matrixLinearMap_nonneg hφ (sub_nonneg.mpr hMN) + simpa only [map_sub,sub_nonneg] using hm + +variable [DecidableEq n] + +def matrixDiagonalHom : A →⋆ₙₐ[ℂ] CStarMatrix n n A where + toFun a := CStarMatrix.ofMatrix (Matrix.diagonal fun _ => a) + map_zero' := by ext i j; simp + map_add' a b := by ext i j; simp [Matrix.diagonal_apply]; split_ifs <;> simp + map_mul' a b := by + change Matrix.diagonal (fun _ : n => a*b)=Matrix.diagonal (fun _ : n => a)*Matrix.diagonal (fun _ : n => b) + rw [Matrix.diagonal_mul_diagonal] + map_smul' c a := by ext i j; simp [Matrix.diagonal_apply] + map_star' a := by + ext i j + simp only [CStarMatrix.ofMatrix_apply, CStarMatrix.star_eq_conjTranspose, + CStarMatrix.conjTranspose_apply,Matrix.diagonal_apply] + split_ifs <;> simp_all + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] in +@[simp] lemma matrixLinearMap_diagonal (φ : A →L[ℂ] B) (a : A) : + matrixLinearMap φ (matrixDiagonalHom (n := n) a)=matrixDiagonalHom (n := n) (φ a) := by + ext i j + simp only [matrixLinearMap_apply,matrixDiagonalHom,NonUnitalStarAlgHom.coe_mk, + CStarMatrix.ofMatrix_apply,Matrix.diagonal_apply] + split_ifs <;> simp + +lemma matrix_mul_diagonal_tendsto (M : CStarMatrix n n A) : + Tendsto (fun e => M * matrixDiagonalHom (n := n) e) + (CStarAlgebra.approximateUnit A) (𝓝 M) := by + have he : (fun e => M * matrixDiagonalHom (n := n) e) = + fun e => CStarMatrix.ofMatrix (fun i j => M i j * e) := by + funext e + ext i j + change ((CStarMatrix.ofMatrix.symm M : Matrix n n A) * Matrix.diagonal (fun _ : n => e)) i j = M i j * e + rw [Matrix.mul_diagonal] + rfl + rw [he] + change Tendsto (fun e => fun i j => M i j * e) _ (𝓝 (fun i j => M i j)) + exact tendsto_pi_nhds.mpr fun i => tendsto_pi_nhds.mpr fun j => + (CStarAlgebra.increasingApproximateUnit A).tendsto_mul_left (M i j) + +lemma norm_matrixLinearMap_nonneg_le {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + (M : CStarMatrix n n A) (hM : 0 ≤ M) : + ‖matrixLinearMap φ M‖ ≤ ‖φ‖ * ‖M‖ := by + let F := matrixLinearMap (n := n) φ + let l := CStarAlgebra.approximateUnit A + have hl := CStarAlgebra.increasingApproximateUnit A + let : l.NeBot := hl.toIsApproximateUnit.neBot + have ht := matrix_mul_diagonal_tendsto (CFC.sqrt M) + have hsq : star (CFC.sqrt M)*CFC.sqrt M=M := by + rw [(CFC.sqrt_nonneg M).star_eq,CFC.sqrt_mul_sqrt_self M hM] + have ht' : Tendsto (fun e => star (matrixDiagonalHom (n := n) e)*M*matrixDiagonalHom (n := n) e) + l (𝓝 M) := by + convert ht.star.mul ht using 1 + · ext e + simp only [star_mul,mul_assoc] + rw [← mul_assoc (star (CFC.sqrt M)),hsq] + · rw [hsq] + apply le_of_tendsto (F.continuous.tendsto M |>.comp ht' |>.norm) + filter_upwards [hl.eventually_norm] with e he + let D := matrixDiagonalHom (n := n) e + have hpos : 0 ≤ star D*M*D := star_left_conjugate_nonneg hM _ + have hle := matrixLinearMap_mono hφ + (CStarAlgebra.star_left_conjugate_le_norm_smul D M hM.isSelfAdjoint) + have hn : ‖F (star D*D)‖ ≤ ‖φ‖ := by + have hd : F (star D*D)=matrixDiagonalHom (n := n) (φ (star e*e)) := by + simp only [D,F,← map_star,← map_mul,matrixLinearMap_diagonal] + rw [hd] + calc + _ ≤ ‖φ (star e*e)‖ := NonUnitalStarAlgHom.norm_apply_le _ _ + _ ≤ ‖φ‖ * ‖star e*e‖ := φ.le_opNorm _ + _ ≤ ‖φ‖ * 1 := by + gcongr + rw [CStarRing.norm_star_mul_self] + nlinarith [norm_nonneg e] + _ = ‖φ‖ := mul_one _ + calc + ‖F (star D*M*D)‖ ≤ ‖F (‖M‖ • (star D*D))‖ := + CStarAlgebra.norm_le_norm_of_le_of_nonneg hle (matrixLinearMap_nonneg hφ hpos) + _ = ‖M‖ * ‖F (star D*D)‖ := by + change ‖F ((‖M‖ : ℂ) • (star D*D))‖ = _ + rw [map_smul,norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_nonneg (norm_nonneg M)] + _ ≤ ‖M‖ * ‖φ‖ := mul_le_mul_of_nonneg_left hn (norm_nonneg M) + _ = ‖φ‖ * ‖M‖ := mul_comm _ _ + +lemma norm_matrixLinearMap_le {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) + (M : CStarMatrix n n A) : ‖matrixLinearMap φ M‖ ≤ (4*‖φ‖)*‖M‖ := by + obtain ⟨x,hx,hxn,rfl⟩ := CStarAlgebra.exists_sum_four_nonneg M + rw [map_sum] + apply (norm_sum_le _ _).trans + calc + (∑ i : Fin 4, ‖matrixLinearMap φ (Complex.I ^ (i : ℕ) • x i)‖) ≤ + ∑ _i : Fin 4, ‖φ‖ * ‖∑ i : Fin 4, Complex.I ^ (i : ℕ) • x i‖ := by + apply Finset.sum_le_sum + intro i _ + simp only [map_smul,norm_smul,norm_pow,Complex.norm_I,one_pow,one_mul] + exact (norm_matrixLinearMap_nonneg_le hφ _ (hx i)).trans + (mul_le_mul_of_nonneg_left (hxn i) (norm_nonneg φ)) + _ = _ := by simp; ring + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearCentralization.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearCentralization.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc69e48164690308fedc11d7437d7bcf4e04bc76 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearCentralization.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryCP +import OAI.Analysis.WeakInfiniteness.NuclearColumnApproximation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma nuclear_weaklyPurelyInfinite_centralizing_compression + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ v : Fin n → A, + CompletelyPositive (finiteCompressionContinuous v) ∧ + ‖finiteCompressionContinuous v‖≤1 ∧ + ‖finiteCompression v 1-1‖<ε ∧ + ∀ a∈F,∀ r : A,‖r‖≤1 → + ‖a*finiteCompression v r-finiteCompression v r*a‖<ε := by + classical + let δ : ℝ := min (ε/2) (ε^2/16) + have hδ : 0<δ := lt_min (by positivity) (by positivity) + have hδε : δ<ε := (min_le_left _ _).trans_lt (by linarith) + have hδsq : δ≤ε^2/16 := min_le_right _ _ + let G : Finset A := F∪F.image star + obtain ⟨n,hn,φ,v,hφ,_,hv,hv1,happ⟩ := + nuclear_weaklyPurelyInfinite_column_approximation hN hW G δ hδ + let k : Fin n := ⟨0,by omega⟩ + have hv0 : 0 ≤ matrixCoefficientMap v 1 := matrixCoefficientMap_nonneg v k 1 zero_le_one + have hvn : ‖∑ i,star (v i)*v i‖≤1 := by + simpa only [matrixCoefficientMap_initial] using + (CStarAlgebra.norm_le_one_iff_of_nonneg _ hv0).mpr hv + refine ⟨n,hn,v,finiteCompressionContinuous_cp v, + (finiteCompressionContinuous_norm_le v).trans hvn,?_,?_⟩ + · simpa only [finiteCompression,mul_one,matrixCoefficientMap_initial] using hv1.trans hδε + · intro a ha r hr + have haG : a∈G := Finset.mem_union_left _ ha + have hasG : star a∈G := Finset.mem_union_right _ (Finset.mem_image_of_mem star ha) + let D (b : A) : ℝ := ‖∑ i,star (matrixCoefficientAction (φ b) v i-v i*b)* + (matrixCoefficientAction (φ b) v i-v i*b)‖ + have hD (b : A) (hb : b∈G) : Real.sqrt (D b)<ε/4 := by + have hb0 : 0≤D b := norm_nonneg _ + have hbδ : D b<δ := (happ b hb).2 + have hsq := Real.sq_sqrt hb0 + have hs0 := Real.sqrt_nonneg (D b) + nlinarith + exact (finiteCompression_commutator_norm_le v φ hφ hvn a r hr).trans_lt + (show Real.sqrt (D (star a))+Real.sqrt (D a)<ε by + have h1 := hD (star a) hasG + have h2 := hD a haG + linarith) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearCoefficients.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..a79c3517ced3c3e56acb80f30a2d164e0932a20b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearCoefficients.lean @@ -0,0 +1,120 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ChoiFactor +import OAI.Analysis.WeakInfiniteness.NuclearExact +import OAI.Analysis.WeakInfiniteness.UnitalCuntzEmbedding + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section Folding + +variable {A : Type u} [CStarAlgebra A] + +variable {n : Type*} [Fintype n] [DecidableEq n] + +lemma matrixUnits_sum_diagonal : (∑ i : n,matrixUnit i i)=(1:CStarMatrix n n ℂ) := by + ext a b + change matrixEntryLinear a b (∑ i : n,matrixUnit i i)=(1:CStarMatrix n n ℂ) a b + simp only [map_sum] + change (∑ i,if a=i ∧ b=i then (1:ℂ) else 0)=if a=b then 1 else 0 + by_cases h : a=b + · subst b + simp + · apply Eq.trans (Finset.sum_eq_zero ?_) (by simp [h]) + intro i _ + have hh : ¬(a=i ∧ b=i) := by rintro ⟨rfl,rfl⟩; exact h rfl + simp [hh] + +lemma fold_matrix_gram (r : n → A) (hr : ∀ i j,star (r i)*r j=if i=j then 1 else 0) + (X : CStarMatrix n n A) (i j : n) : + star (∑ k,r k*X k i)*(∑ k,r k*X k j)=∑ k,star (X k i)*X k j := by + have he (k l : n) : star (r k*X k i)*(r l*X l j)= + if k=l then star (X k i)*X k j else 0 := by + calc + _ = star (X k i)*(star (r k)*r l)*X l j := by simp only [star_mul,mul_assoc] + _ = _ := by + rw [hr] + split_ifs with h + · subst l; simp + · simp + calc + _ = ∑ k,∑ l,star (r k*X k i)*(r l*X l j) := by + rw [star_sum,Finset.sum_mul] + simp only [Finset.mul_sum] + _ = _ := by simp only [he,Finset.sum_ite_eq,Finset.mem_univ,ite_true] + +end Folding + +section Realization + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma completelyPositive_realize_coefficients {n : ℕ} (hn : 1≤n) + (r : Fin n → A) (hr : ∀ i j,star (r i)*r j=if i=j then 1 else 0) + (ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A) (hψ : CompletelyPositive ψ) : + ∃ v : Fin n → A,(∀ i j,ψ (matrixUnit i j)=star (v i)*v j) ∧ + (∀ M,ψ M=∑ i,∑ j,M i j • (star (v i)*v j)) ∧ + (∑ i,star (v i)*v i)=ψ 1 := by + obtain ⟨X,hX⟩ := completelyPositive_matrix_gram hn ψ hψ + let v : Fin n → A := fun i => ∑ k,r k*X k i + have hv (i j : Fin n) : ψ (matrixUnit i j)=star (v i)*v j := by + rw [hX,fold_matrix_gram r hr X] + refine ⟨v,hv,?_,?_⟩ + · intro M + conv_lhs => rw [← matrix_unit_expansion M] + simp only [map_sum,map_smul,hv] + · simp only [← hv,← map_sum,matrixUnits_sum_diagonal] + +lemma nuclear_weaklyPurelyInfinite_coefficient_approximation + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ v : Fin n → A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + ‖∑ i,star (v i)*v i‖≤1 ∧ + ∀ a∈F,‖(∑ i,∑ j,φ a i j • (star (v i)*v j))-a‖<ε := by + obtain ⟨r,s,hr,hs,hrs⟩ := exists_two_isometries_of_properlyInfinite + (exact_weaklyPurelyInfinite_individuallyProperlyInfinite_any (nuclear_exact hN) hW zero_le_one) + obtain ⟨n,hn,φ,ψ,hφ,hψ,hφn,hψn,happ⟩ := hN F ε hε + let R : Fin n → A := fun k => s^(k:ℕ)*r + have hR (i j : Fin n) : star (R i)*R j=if i=j then 1 else 0 := by + have hh := binaryCuntzFamily_relations hr hs hrs (i:ℕ) (j:ℕ) + simpa only [Fin.val_inj] using hh + obtain ⟨v,_,hv,hv1⟩ := completelyPositive_realize_coefficients hn R hR ψ hψ + refine ⟨n,hn,φ,v,hφ,hφn,?_,?_⟩ + · rw [hv1] + let : Nonempty (Fin n) := ⟨⟨0,by omega⟩⟩ + calc + _ ≤ ‖ψ‖*‖(1:CStarMatrix (Fin n) (Fin n) ℂ)‖ := ψ.le_opNorm 1 + _ ≤ 1 := by rw [norm_one,mul_one]; exact hψn + · intro a ha + rw [← hv] + exact happ a ha + +end Realization + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearColumn.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearColumn.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2fe570672d0630959344f4b37931c505a7c97f4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearColumn.lean @@ -0,0 +1,169 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CPSchwarz +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section CoefficientMap + +variable {A : Type u} [CStarAlgebra A] + +variable {n : Type*} [Fintype n] [DecidableEq n] + +def matrixCoefficientMap (v : n → A) : CStarMatrix n n ℂ →ₗ[ℂ] A := + ∑ i,∑ j,(matrixEntryLinear i j).smulRight (star (v i)*v j) + +omit [DecidableEq n] in +lemma matrixCoefficientMap_apply (v : n → A) (M : CStarMatrix n n ℂ) : + matrixCoefficientMap v M=∑ i,∑ j,M i j • (star (v i)*v j) := by + simp only [matrixCoefficientMap, LinearMap.sum_apply, LinearMap.smulRight_apply] + rfl + +def matrixCoefficientAction (M : CStarMatrix n n ℂ) (v : n → A) (i : n) : A := + ∑ j,M i j • v j + +lemma matrixCoefficientMap_initial (v : n → A) : + matrixCoefficientMap v 1=∑ i,star (v i)*v i := by + rw [matrixCoefficientMap_apply] + simp [CStarMatrix.one_apply] + +omit [DecidableEq n] in +lemma matrixCoefficientMap_mixed (v : n → A) (M : CStarMatrix n n ℂ) : + matrixCoefficientMap v M=∑ i,star (v i)*matrixCoefficientAction M v i := by + simp only [matrixCoefficientMap_apply,matrixCoefficientAction,Finset.mul_sum,mul_smul_comm] + +omit [DecidableEq n] in +lemma matrixCoefficientMap_square (v : n → A) (M : CStarMatrix n n ℂ) : + matrixCoefficientMap v (star M*M)= + ∑ i,star (matrixCoefficientAction M v i)*matrixCoefficientAction M v i := by + simp only [matrixCoefficientMap_apply,CStarMatrix.mul_apply,CStarMatrix.star_apply, + Finset.sum_smul,matrixCoefficientAction,star_sum,Finset.sum_mul,Finset.mul_sum, + star_smul,smul_mul_assoc,mul_smul_comm,Finset.smul_sum,smul_smul, mul_comm (M _ _)] + calc + (∑ i,∑ j,∑ k,(star (M k i)*M k j) • (star (v i)*v j)) = + ∑ i,∑ k,∑ j,(star (M k i)*M k j) • (star (v i)*v j) := by + congr 1; ext i; rw [Finset.sum_comm] + _ = ∑ k,∑ i,∑ j,(star (M k i)*M k j) • (star (v i)*v j) := Finset.sum_comm + _ = _ := by congr 1; ext k; rw [Finset.sum_comm] + +lemma matrixCoefficient_defect_identity (v : n → A) (M : CStarMatrix n n ℂ) (a : A) : + (∑ i,star (matrixCoefficientAction M v i-v i*a)*(matrixCoefficientAction M v i-v i*a)) = + matrixCoefficientMap v (star M*M)-star (matrixCoefficientMap v M)*a- + star a*matrixCoefficientMap v M+star a*matrixCoefficientMap v 1*a := by + have he (i : n) : + star (matrixCoefficientAction M v i-v i*a)*(matrixCoefficientAction M v i-v i*a)= + star (matrixCoefficientAction M v i)*matrixCoefficientAction M v i- + (star (matrixCoefficientAction M v i)*v i)*a- + star a*(star (v i)*matrixCoefficientAction M v i)+ + star a*(star (v i)*v i)*a := by + simp only [star_sub,star_mul] + noncomm_ring + simp only [he,Finset.sum_add_distrib,Finset.sum_sub_distrib, + ← Finset.sum_mul,← Finset.mul_sum] + rw [matrixCoefficientMap_square,matrixCoefficientMap_initial,matrixCoefficientMap_mixed] + simp only [star_sum,star_mul,star_star] + +end CoefficientMap + +section Positivity + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : Type*} [Fintype n] [DecidableEq n] + +lemma matrixCoefficientMap_nonneg (v : n → A) (k : n) + (M : CStarMatrix n n ℂ) (hM : 0≤M) : 0 ≤ matrixCoefficientMap v M := by + let ι : CStarMatrix n n ℂ →⋆ₙₐ[ℂ] CStarMatrix n n A := + CStarMatrix.mapₙₐ (StarAlgHom.ofId ℂ A).toNonUnitalStarAlgHom + let V : CStarMatrix n n A := CStarMatrix.ofMatrix (fun i j => if j=k then v i else 0) + have h := cstarMatrix_diagonal_nonneg (star V*ι M*V) + (star_left_conjugate_nonneg (map_nonneg ι hM) V) k + have he : (star V*ι M*V) k k=matrixCoefficientMap v M := by + change (∑ j, (∑ i, star (if k=k then v i else 0) * + (StarAlgHom.ofId ℂ A) (M i j)) * (if k=k then v j else 0)) = _ + simp only [ite_true, Finset.sum_mul] + rw [matrixCoefficientMap_apply] + rw [Finset.sum_comm] + congr 1 + ext i + congr 1 + ext j + rw [StarAlgHom.ofId_apply, Algebra.algebraMap_eq_smul_one] + simp only [mul_smul_comm,mul_one,smul_mul_assoc] + rwa [he] at h + +lemma matrixCoefficientMap_mono (v : n → A) (k : n) : Monotone (matrixCoefficientMap v) := by + intro M N hMN + have h := matrixCoefficientMap_nonneg v k (N-M) (sub_nonneg.mpr hMN) + simpa only [map_sub,sub_nonneg] using h + +lemma matrixCoefficient_defect_le (v : n → A) (k : n) + (φ : A →L[ℂ] CStarMatrix n n ℂ) (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (hv : matrixCoefficientMap v 1≤1) (a : A) : + (∑ i,star (matrixCoefficientAction (φ a) v i-v i*a)* + (matrixCoefficientAction (φ a) v i-v i*a)) ≤ + matrixCoefficientMap v (φ (star a*a))-star a*a+ + star a*(a-matrixCoefficientMap v (φ a))+ + star (a-matrixCoefficientMap v (φ a))*a := by + have h1 := sub_nonneg.mpr (matrixCoefficientMap_mono v k (completelyPositive_schwarz hφ hφn a)) + have h2 := star_left_conjugate_nonneg (sub_nonneg.mpr hv) a + apply sub_nonneg.mp + rw [matrixCoefficient_defect_identity] + have h := add_nonneg h1 h2 + convert h using 1 + simp only [star_sub] + noncomm_ring + +lemma matrixCoefficient_defect_norm_le (v : n → A) (k : n) + (φ : A →L[ℂ] CStarMatrix n n ℂ) (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) + (hv : matrixCoefficientMap v 1≤1) (a : A) : + ‖∑ i,star (matrixCoefficientAction (φ a) v i-v i*a)* + (matrixCoefficientAction (φ a) v i-v i*a)‖ ≤ + ‖matrixCoefficientMap v (φ (star a*a))-star a*a‖+ + 2*‖a‖*‖matrixCoefficientMap v (φ a)-a‖ := by + have h := CStarAlgebra.norm_le_norm_of_le_of_nonneg + (matrixCoefficient_defect_le v k φ hφ hφn hv a) + (Finset.sum_nonneg fun i _ => star_mul_self_nonneg _) + refine h.trans ?_ + calc + _ ≤ (‖matrixCoefficientMap v (φ (star a*a))-star a*a‖+ + ‖star a*(a-matrixCoefficientMap v (φ a))‖)+ + ‖star (a-matrixCoefficientMap v (φ a))*a‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ (‖matrixCoefficientMap v (φ (star a*a))-star a*a‖+ + ‖a‖*‖a-matrixCoefficientMap v (φ a)‖)+ + ‖a-matrixCoefficientMap v (φ a)‖*‖a‖ := by + gcongr + · simpa only [norm_star] using norm_mul_le (star a) (a-matrixCoefficientMap v (φ a)) + · simpa only [norm_star] using norm_mul_le (star (a-matrixCoefficientMap v (φ a))) a + _ = _ := by rw [norm_sub_rev a]; ring + +end Positivity + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearColumnApproximation.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearColumnApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ad687b2cf785dfe93a788407f5d7a97386072e2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearColumnApproximation.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NuclearCoefficients +import OAI.Analysis.WeakInfiniteness.NuclearColumn + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma matrixCoefficient_initial_gap {n : Type*} [Fintype n] [DecidableEq n] + (v : n → A) (k : n) (φ : A →L[ℂ] CStarMatrix n n ℂ) + (hφ : CompletelyPositive φ) (hφn : ‖φ‖≤1) (hv : matrixCoefficientMap v 1≤1) : + ‖matrixCoefficientMap v 1-1‖≤‖matrixCoefficientMap v (φ 1)-1‖ := by + have hq := matrixCoefficientMap_mono v k (completelyPositive_one_le_one hφ hφn) + have hle : 1-matrixCoefficientMap v 1≤1-matrixCoefficientMap v (φ 1) := by + apply sub_nonneg.mp + convert sub_nonneg.mpr hq using 1 + abel + have h := CStarAlgebra.norm_le_norm_of_le_of_nonneg hle (sub_nonneg.mpr hv) + simpa only [norm_sub_rev (1:A)] using h + +lemma nuclear_weaklyPurelyInfinite_column_approximation + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ v : Fin n → A,CompletelyPositive φ ∧ ‖φ‖≤1 ∧ + matrixCoefficientMap v 1≤1 ∧ ‖matrixCoefficientMap v 1-1‖<ε ∧ + ∀ a∈F,‖matrixCoefficientMap v (φ a)-a‖<ε ∧ + ‖∑ i,star (matrixCoefficientAction (φ a) v i-v i*a)* + (matrixCoefficientAction (φ a) v i-v i*a)‖<ε := by + classical + let M : ℝ := ∑ a ∈ F, ‖a‖ + have hM0 : 0≤M := Finset.sum_nonneg fun a _ => norm_nonneg a + have hM (a : A) (ha : a∈F) : ‖a‖≤M := + Finset.single_le_sum (fun b _ => norm_nonneg b) ha + let δ : ℝ := ε/(2*(1+2*M)) + have hd : 0<2*(1+2*M) := by positivity + have hδ : 0<δ := div_pos hε hd + have hδeq : δ*(2*(1+2*M))=ε := div_mul_cancel₀ ε (ne_of_gt hd) + have hδε : δ<ε := by nlinarith [mul_nonneg hM0 (le_of_lt hδ)] + let G : Finset A := insert 1 (F∪F.image (fun a => star a*a)) + obtain ⟨n,hn,φ,v,hφ,hφn,hvn,happ⟩ := + nuclear_weaklyPurelyInfinite_coefficient_approximation hN hW G δ hδ + let k : Fin n := ⟨0,by omega⟩ + have hv0 : 0 ≤ matrixCoefficientMap v 1 := matrixCoefficientMap_nonneg v k 1 zero_le_one + have hv : matrixCoefficientMap v 1≤1 := + (CStarAlgebra.norm_le_one_iff_of_nonneg _ hv0).mp (by + simpa only [matrixCoefficientMap_initial] using hvn) + have happ' (a : A) (ha : a∈G) : ‖matrixCoefficientMap v (φ a)-a‖<δ := by + simpa only [matrixCoefficientMap_apply] using happ a ha + refine ⟨n,hn,φ,v,hφ,hφn,hv,?_,?_⟩ + · exact (matrixCoefficient_initial_gap v k φ hφ hφn hv).trans_lt + ((happ' 1 (Finset.mem_insert_self ..)).trans hδε) + · intro a ha + have haG : a∈G := Finset.mem_insert_of_mem (Finset.mem_union_left _ ha) + have haaG : star a*a∈G := Finset.mem_insert_of_mem (Finset.mem_union_right _ + (Finset.mem_image_of_mem _ ha)) + refine ⟨(happ' a haG).trans hδε,?_⟩ + have hb := matrixCoefficient_defect_norm_le v k φ hφ hφn hv a + have he : 2*‖a‖*‖matrixCoefficientMap v (φ a)-a‖≤2*‖a‖*δ := + mul_le_mul_of_nonneg_left (happ' a haG).le (by positivity) + have hm : 2*‖a‖*δ≤2*M*δ := by gcongr; exact hM a ha + have hsmall : δ+2*M*δ<ε := by nlinarith + exact hb.trans_lt ((add_lt_add_of_lt_of_le (happ' (star a*a) haaG) (he.trans hm)).trans hsmall) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearCompression.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6146ce9f3af50dc982d2041d9c32d04a0173656 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearCompression.lean @@ -0,0 +1,137 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NuclearColumn +import OAI.Analysis.WeakInfiniteness.PerturbationRows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +def finiteColumn (v : Fin n → A) : CStarMatrix (Fin n) (Fin 1) A := + CStarMatrix.ofMatrix (fun i _ => v i) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma finiteColumn_initial (v : Fin n → A) : + matrixSingletonHom ((finiteColumn v).conjTranspose*finiteColumn v)=∑ i,star (v i)*v i := rfl + +lemma finiteColumn_norm_sq (v : Fin n → A) : + ‖finiteColumn v‖^2=‖∑ i,star (v i)*v i‖ := by + rw [← finiteColumn_initial,NonUnitalStarAlgHom.norm_map (matrixSingletonHom (A := A)) + matrixSingletonHom_injective,rectangular_norm_initial] + +lemma finiteColumn_norm (v : Fin n → A) : + ‖finiteColumn v‖=Real.sqrt ‖∑ i,star (v i)*v i‖ := by + rw [← finiteColumn_norm_sq,Real.sqrt_sq (norm_nonneg _)] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma finiteColumn_sandwich (v w : Fin n → A) (r : A) : + matrixSingletonHom ((finiteColumn v).conjTranspose*diagonalCopies n r*finiteColumn w)= + ∑ i,star (v i)*r*w i := by + change (∑ i,(∑ j,star (v j)*(if j=i then r else 0))*w i)=_ + simp only [mul_ite,mul_zero,Finset.sum_ite_eq',Finset.mem_univ,ite_true] + +lemma norm_finite_sandwich_le (v w : Fin n → A) (r : A) : + ‖∑ i,star (v i)*r*w i‖≤ + Real.sqrt ‖∑ i,star (v i)*v i‖*‖r‖*Real.sqrt ‖∑ i,star (w i)*w i‖ := by + rw [← finiteColumn_sandwich] + calc + _ ≤ ‖(finiteColumn v).conjTranspose*diagonalCopies n r*finiteColumn w‖ := + NonUnitalStarAlgHom.norm_apply_le _ _ + _ ≤ (‖(finiteColumn v).conjTranspose‖*‖diagonalCopies n r‖)*‖finiteColumn w‖ := + (rectangular_norm_mul_le _ _).trans + (mul_le_mul_of_nonneg_right (rectangular_norm_mul_le _ _) (norm_nonneg _)) + _ ≤ (‖finiteColumn v‖*‖r‖)*‖finiteColumn w‖ := by + rw [rectangular_norm_conjTranspose] + gcongr + exact norm_diagonalCopies_le _ _ + _ = _ := by rw [finiteColumn_norm,finiteColumn_norm] + +omit [PartialOrder A] [StarOrderedRing A] in +def finiteCompression (v : Fin n → A) (r : A) : A := ∑ i,star (v i)*r*v i + +lemma finiteCompression_norm_le (v : Fin n → A) (r : A) : + ‖finiteCompression v r‖≤‖∑ i,star (v i)*v i‖*‖r‖ := by + have h := norm_finite_sandwich_le v v r + calc + _ ≤ Real.sqrt ‖∑ i,star (v i)*v i‖*‖r‖*Real.sqrt ‖∑ i,star (v i)*v i‖ := h + _ = _ := by rw [mul_right_comm _ ‖r‖,Real.mul_self_sqrt (norm_nonneg _)] + +end + +section Central + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +lemma finiteCompression_commutator (v : Fin n → A) (φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ) + (hφ : CompletelyPositive φ) (a r : A) : + a*finiteCompression v r-finiteCompression v r*a= + -(∑ i,star (matrixCoefficientAction (φ (star a)) v i-v i*star a)*r*v i)+ + ∑ i,star (v i)*r*(matrixCoefficientAction (φ a) v i-v i*a) := by + have he : (∑ i,∑ j,φ a j i • (star (v j)*r*v i)) = + ∑ i,∑ j,φ a i j • (star (v i)*r*v j) := Finset.sum_comm + simp only [finiteCompression,matrixCoefficientAction,star_sub,star_sum,star_smul, + completelyPositive_map_star hφ,CStarMatrix.star_apply,star_star,star_mul, + Finset.sum_mul,Finset.mul_sum,sub_mul,mul_sub,Finset.sum_sub_distrib, + smul_mul_assoc,mul_smul_comm] + rw [he] + simp only [mul_assoc] + abel + +lemma finiteCompression_commutator_norm_le (v : Fin n → A) + (φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ) (hφ : CompletelyPositive φ) + (hv : ‖∑ i,star (v i)*v i‖≤1) (a r : A) (hr : ‖r‖≤1) : + ‖a*finiteCompression v r-finiteCompression v r*a‖ ≤ + Real.sqrt ‖∑ i,star (matrixCoefficientAction (φ (star a)) v i-v i*star a)* + (matrixCoefficientAction (φ (star a)) v i-v i*star a)‖+ + Real.sqrt ‖∑ i,star (matrixCoefficientAction (φ a) v i-v i*a)* + (matrixCoefficientAction (φ a) v i-v i*a)‖ := by + let d (a : A) (i : Fin n) := matrixCoefficientAction (φ a) v i-v i*a + have hs : Real.sqrt ‖∑ i,star (v i)*v i‖≤1 := (Real.sqrt_le_one).mpr hv + rw [finiteCompression_commutator v φ hφ a r] + calc + _ ≤ ‖∑ i,star (d (star a) i)*r*v i‖+‖∑ i,star (v i)*r*d a i‖ := by + simpa only [norm_neg] using norm_add_le + (-(∑ i,star (d (star a) i)*r*v i)) (∑ i,star (v i)*r*d a i) + _ ≤ (Real.sqrt ‖∑ i,star (d (star a) i)*d (star a) i‖*‖r‖* + Real.sqrt ‖∑ i,star (v i)*v i‖)+ + (Real.sqrt ‖∑ i,star (v i)*v i‖*‖r‖*Real.sqrt ‖∑ i,star (d a i)*d a i‖) := + add_le_add (norm_finite_sandwich_le (d (star a)) v r) + (norm_finite_sandwich_le v (d a) r) + _ ≤ (Real.sqrt ‖∑ i,star (d (star a) i)*d (star a) i‖*1*1)+ + (1*1*Real.sqrt ‖∑ i,star (d a i)*d a i‖) := by gcongr + _ = _ := by simp only [mul_one,one_mul,d] + +end Central + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearExact.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearExact.lean new file mode 100644 index 0000000000000000000000000000000000000000..4481a55503610ce861335eae72e88377fbfac633 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearExact.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ExactInfiniteness +import OAI.Analysis.WeakInfiniteness.MatrixTensorExact +import OAI.Analysis.WeakInfiniteness.NuclearApproximation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem nuclear_exact (hA : Nuclear A) : Exact A := by + intro C D _ _ q _ z hz + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let := CStarAlgebra.spectralOrder D + let := CStarAlgebra.spectralOrderedRing D + have hzq : minimalMapRight q z=0 := (minimalMapRight_eq_zero_iff q z).mpr hz + have hc : IsClosed (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A C)) := + isClosed_closure + change z.val ∈ (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A C)) + rw [← hc.closure_eq] + rw [Metric.mem_closure_iff] + intro ε hε + obtain ⟨n,_,φ,ψ,hφ,hψ,_,_,he⟩ := nuclear_tensor_approximation hA z hε + let y := minimalCPMap ψ (minimalCPMap φ z) + have hφz : minimalMapRight q (minimalCPMap φ z)=0 := by + rw [minimalCPMap_right_comm φ hφ,hzq,map_zero] + have hym : y.val ∈ tensorKernelIdeal (A := A) q := + minimalCPMap_kernel ψ hψ q (minimalCPMap φ z) (matrixTensor_kernel q _ hφz) + refine ⟨y.val,hym,?_⟩ + rw [dist_comm,dist_eq_norm] + exact he + +theorem nuclear_weaklyPurelyInfinite_stronglyPurelyInfinite + (hA : Nuclear A) (hW : WeaklyPurelyInfinite A) : StronglyPurelyInfinite A := + exact_weaklyPurelyInfinite_stronglyPurelyInfinite A (nuclear_exact hA) hW + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorBound.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..c930fe98216f73d0985c66d3feee7f070774f291 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorBound.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorBound +import OAI.Analysis.WeakInfiniteness.NuclearCP + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra TensorProduct ENNReal + +section + +variable {A B n H K L : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + [Fintype n] [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + [NormedAddCommGroup L] [InnerProductSpace ℂ L] [CompleteSpace L] + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] in +lemma matrixLinearMap_tensorCoefficient (φ : A →L[ℂ] B) + (b : OrthonormalBasis n ℂ H) (T : H →L[ℂ] H) (a : A) : + matrixLinearMap φ (tensorCoefficientMatrix b T a)=tensorCoefficientMatrix b T (φ a) := by + ext i j + exact map_smul φ _ _ + +lemma tensor_norm_cp_finite_left {ι : Type*} (s : Finset ι) + (b : OrthonormalBasis n ℂ H) (T : ι → H →L[ℂ] H) (a : ι → A) + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) + (ρ : A →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (π : B →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hρ : Function.Injective ρ) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (π (φ (a i)))‖ ≤ + (4*‖φ‖)*‖∑ i ∈ s,TensorProduct.mapL (T i) (ρ (a i))‖ := by + classical + rw [norm_tensorCoefficientSum s b,norm_tensorCoefficientSum s b] + let M : CStarMatrix n n A := ∑ i ∈ s,tensorCoefficientMatrix b (T i) (a i) + have hf : CStarMatrix.mapₙₐ π (matrixLinearMap φ M)= + ∑ i ∈ s,tensorCoefficientMatrix b (T i) (π (φ (a i))) := by + simp only [M,map_sum,matrixLinearMap_tensorCoefficient,map_tensorCoefficientMatrix] + have hr : CStarMatrix.mapₙₐ ρ M=∑ i ∈ s,tensorCoefficientMatrix b (T i) (ρ (a i)) := by + simp only [M,map_sum,map_tensorCoefficientMatrix] + rw [← hf,← hr] + have hi : Function.Injective (CStarMatrix.mapₙₐ (n := n) ρ) := by + intro X Y hXY + ext i j + exact hρ (congrArg (fun Z : CStarMatrix n n (K →L[ℂ] K) => Z i j) hXY) + rw [NonUnitalStarAlgHom.norm_map _ hi] + exact (NonUnitalStarAlgHom.norm_apply_le _ _).trans (norm_matrixLinearMap_le hφ M) + +omit [Fintype n] in +lemma tensor_norm_cp {ι : Type*} [Finite ι] (s : Finset ι) + (T : ι → H →L[ℂ] H) (a : ι → A) + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) + (ρ : A →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (π : B →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hρ : Function.Injective ρ) : + ‖∑ i ∈ s,TensorProduct.mapL (T i) (π (φ (a i)))‖ ≤ + (4*‖φ‖)*‖∑ i ∈ s,TensorProduct.mapL (T i) (ρ (a i))‖ := by + apply norm_tensorSum_le_of_finite_compressions s T (fun i => π (φ (a i))) (by positivity) + intro V hV + exact (tensor_norm_cp_finite_left s (stdOrthonormalBasis ℂ V) + (fun i => compress V (T i)) a φ hφ ρ π hρ).trans + (mul_le_mul_of_nonneg_left (norm_tensorSum_compress_le s V T (fun i => ρ (a i))) (by positivity)) + +omit [Fintype n] in +lemma tensor_norm_cp_finset {ι : Type*} (s : Finset ι) + (T : ι → H →L[ℂ] H) (a : ι → A) + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) + (ρ : A →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (π : B →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hρ : Function.Injective ρ) : + ‖∑ i ∈ s,TensorProduct.mapL (T i) (π (φ (a i)))‖ ≤ + (4*‖φ‖)*‖∑ i ∈ s,TensorProduct.mapL (T i) (ρ (a i))‖ := by + classical + rw [← Finset.sum_coe_sort s (fun i => TensorProduct.mapL (T i) (π (φ (a i)))), + ← Finset.sum_coe_sort s (fun i => TensorProduct.mapL (T i) (ρ (a i)))] + exact tensor_norm_cp Finset.univ (fun i : s => T i) (fun i : s => a i) φ hφ ρ π hρ + +end + +lemma norm_spatialSum_cp {A B C : Type*} [NonUnitalCStarAlgebra A] + [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) : + ‖∑ i ∈ s,spatialElementary (φ (a i)) (c i)‖ ≤ + (4*‖φ‖)*‖∑ i ∈ s,spatialElementary (a i) (c i)‖ := by + obtain ⟨H,ρ,hρ⟩ := exists_faithful_representation A + apply lp.norm_le_of_forall_le (by positivity) + intro π + rw [spatialSum_apply,norm_completion,norm_tensorSum_flip] + apply (tensor_norm_cp_finset s (fun i => π.rightRep (c i)) a φ hφ ρ π.leftRep hρ).trans + apply mul_le_mul_of_nonneg_left _ (by positivity) + rw [norm_tensorSum_flip] + exact norm_tensorSum_le_spatial_any s a c ρ π.rightRep + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorMap.lean b/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..142b29da8185bef2cbe04ee436657d0ba18f5a6b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/NuclearTensorMap.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseKernel +import OAI.Analysis.WeakInfiniteness.NuclearTensorBound + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v w x + +section + +variable {A : Type u} {B : Type v} {C : Type w} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +def tensorPolynomial : (A × C →₀ ℂ) →ₗ[ℂ] MinimalTensor A C := + Finsupp.linearCombination ℂ (fun p => minimalElementary p.1 p.2) + +@[simp] lemma tensorPolynomial_single (a : A) (c : C) : + tensorPolynomial (Finsupp.single (a,c) 1)=minimalElementary a c := by + simp [tensorPolynomial] + +lemma tensorPolynomial_dense : DenseRange (tensorPolynomial (A := A) (C := C)) := by + have hd : (LinearMap.range (tensorPolynomial (A := A) (C := C))).topologicalClosure=⊤ := by + apply minimal_elementary_span_dense _ (Submodule.isClosed_topologicalClosure _) + intro a c + apply Submodule.le_topologicalClosure + exact ⟨Finsupp.single (a,c) 1,tensorPolynomial_single a c⟩ + apply dense_iff_closure_eq.mpr + exact congrArg (fun S : Submodule ℂ (MinimalTensor A C) => (S : Set (MinimalTensor A C))) hd + +lemma minimalTensor_clm_ext {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {f g : MinimalTensor A C →L[ℂ] E} + (h : ∀ a c,f (minimalElementary a c)=g (minimalElementary a c)) : f=g := by + have hs : LinearMap.ker (f-g).toLinearMap=⊤ := by + apply minimal_elementary_span_dense _ (f-g).isClosed_ker + intro a c + change f (minimalElementary a c)-g (minimalElementary a c)=0 + exact sub_eq_zero.mpr (h a c) + ext z + have hz : z ∈ LinearMap.ker (f-g).toLinearMap := by rw [hs]; trivial + exact sub_eq_zero.mp hz + +def starHomContinuousLinear (f : A →⋆ₙₐ[ℂ] B) : A →L[ℂ] B where + toLinearMap := { toFun := f, map_add' := map_add f, map_smul' := map_smul f } + cont := nonUnitalStarHom_continuous f + +variable [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +def cpTensorPolynomial (φ : A →L[ℂ] B) : (A × C →₀ ℂ) →ₗ[ℂ] MinimalTensor B C := + Finsupp.linearCombination ℂ (fun p => minimalElementary (φ p.1) p.2) + +lemma norm_cpTensorPolynomial_le (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (d : A × C →₀ ℂ) : + ‖cpTensorPolynomial φ d‖ ≤ (4*‖φ‖)*‖tensorPolynomial d‖ := by + classical + change ‖(minimalTensorSubalgebra B C).subtype (d.sum fun p t => t • minimalElementary (φ p.1) p.2)‖ ≤ + (4*‖φ‖)*‖(minimalTensorSubalgebra A C).subtype (d.sum fun p t => t • minimalElementary p.1 p.2)‖ + simp only [Finsupp.sum,map_sum,map_smul] + change ‖∑ p ∈ d.support,d p • spatialElementary (φ p.1) p.2‖ ≤ + (4*‖φ‖)*‖∑ p ∈ d.support,d p • spatialElementary p.1 p.2‖ + simpa only [map_smul,spatialElementary_smul_left] using + norm_spatialSum_cp d.support (fun p => d p • p.1) Prod.snd φ hφ + +def minimalCPMap (φ : A →L[ℂ] B) : MinimalTensor A C →L[ℂ] MinimalTensor B C := + (cpTensorPolynomial φ).extendOfNorm tensorPolynomial + +lemma minimalCPMap_polynomial (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (d : A × C →₀ ℂ) : + minimalCPMap φ (tensorPolynomial d)=cpTensorPolynomial φ d := + LinearMap.extendOfNorm_eq tensorPolynomial_dense ⟨4*‖φ‖,norm_cpTensorPolynomial_le φ hφ⟩ d + +lemma minimalCPMap_elementary (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (a : A) (c : C) : + minimalCPMap φ (minimalElementary a c)=minimalElementary (φ a) c := by + rw [← tensorPolynomial_single a c,minimalCPMap_polynomial φ hφ] + simp [cpTensorPolynomial] + +lemma norm_minimalCPMap_le (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (z : MinimalTensor A C) : + ‖minimalCPMap φ z‖ ≤ (4*‖φ‖)*‖z‖ := + LinearMap.norm_extendOfNorm_apply_le tensorPolynomial_dense _ (norm_cpTensorPolynomial_le φ hφ) z + +lemma minimalCPMap_kernel {D : Type w} [NonUnitalCStarAlgebra D] + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (q : C →⋆ₙₐ[ℂ] D) + (z : MinimalTensor A C) (hz : z.val ∈ tensorKernelIdeal (A := A) q) : + (minimalCPMap φ z).val ∈ tensorKernelIdeal (A := B) q := by + let f := (starHomContinuousLinear (minimalAmbientInclusion (A := B) (B := C))).comp (minimalCPMap φ) + let S := (tensorKernelIdeal (A := B) q).toSubmodule.comap f.toLinearMap + apply minimalKernel_induction q S ?_ ?_ z hz + · exact isClosed_closure.preimage f.continuous + · intro a c hc + change (minimalCPMap φ (minimalElementary a c)).val ∈ tensorKernelIdeal (A := B) q + rw [minimalCPMap_elementary φ hφ] + apply NonUnitalStarSubalgebra.le_topologicalClosure + apply NonUnitalStarAlgebra.subset_adjoin + exact ⟨φ a,c,hc,rfl⟩ + +lemma minimalCPMap_right_comm {D : Type w} [NonUnitalCStarAlgebra D] + (φ : A →L[ℂ] B) (hφ : CompletelyPositive φ) (q : C →⋆ₙₐ[ℂ] D) + (z : MinimalTensor A C) : + minimalMapRight q (minimalCPMap φ z)=minimalCPMap φ (minimalMapRight q z) := by + let f : MinimalTensor B C →L[ℂ] MinimalTensor B D := starHomContinuousLinear (minimalMapRight q) + let g : MinimalTensor A C →L[ℂ] MinimalTensor A D := starHomContinuousLinear (minimalMapRight q) + let F : MinimalTensor A C →L[ℂ] MinimalTensor B C := minimalCPMap φ + let G : MinimalTensor A D →L[ℂ] MinimalTensor B D := minimalCPMap φ + have he : f.comp F=G.comp g := by + apply minimalTensor_clm_ext + intro a c + change minimalMapRight q (minimalCPMap φ (minimalElementary a c))= + minimalCPMap φ (minimalMapRight q (minimalElementary a c)) + rw [minimalCPMap_elementary φ hφ,minimalMapRight_elementary,minimalMapRight_elementary, + minimalCPMap_elementary φ hφ] + exact DFunLike.congr_fun he z + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OInfinityCriterion.lean b/lean/OAI/Analysis/WeakInfiniteness/OInfinityCriterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2729ce5087fb501cff8c9b73eca507475d5dc92 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OInfinityCriterion.lean @@ -0,0 +1,41 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IntertwiningEquiv +import OAI.Analysis.WeakInfiniteness.TensorAbsorption +import OAI.Analysis.WeakInfiniteness.OInfinityUniversal + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +universe u + +def oInfinityAbsorptionEquiv_of_finiteIntertwining + (A : Type u) [NonUnitalCStarAlgebra A] [SeparableSpace A] + (h : FiniteIntertwining (minimalLeftEmbedding A OInfinity)) : + A ≃⋆ₐ[ℂ] MinimalTensor A OInfinity := + finiteIntertwiningStarEquiv (minimalLeftEmbedding A OInfinity) + (minimalLeftEmbedding_isometry A OInfinity) h + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OInfinityMap.lean b/lean/OAI/Analysis/WeakInfiniteness/OInfinityMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..46757b414fca2cf816496818d774145d856505a3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OInfinityMap.lean @@ -0,0 +1,153 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CStarClosedRange +import OAI.Analysis.WeakInfiniteness.OInfinityUniversal + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u + +variable {A : Type u} [CStarAlgebra A] + +lemma oInfinity_graph_bound (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) + (z : OInfinity × A) + (hz : z ∈ closedStarSpan (Set.range fun i => (oInfinityIsometry i,s i))) : + ‖z.2‖ ≤ ‖z.1‖ := by + change z ∈ {z : OInfinity × A | ‖z.2‖ ≤ ‖z.1‖} + apply closure_minimal (s := (StarAlgebra.adjoin ℂ + (Set.range fun i => (oInfinityIsometry i,s i)) : Set _)) ?_ ?_ hz + · intro z hz + obtain ⟨c,rfl⟩ := exists_cuntzPolynomial_of_mem_adjoin _ _ hz + change ‖(StarAlgHom.snd ℂ OInfinity A) (cuntzPolynomial _ c)‖ ≤ + ‖(StarAlgHom.fst ℂ OInfinity A) (cuntzPolynomial _ c)‖ + rw [map_cuntzPolynomial,map_cuntzPolynomial] + exact norm_cuntzPolynomial_le s hs c + · exact isClosed_le (continuous_norm.comp continuous_snd) (continuous_norm.comp continuous_fst) + +def oInfinityGraph (s : ℕ → A) : StarSubalgebra ℂ (OInfinity × A) := + closedStarSpan (Set.range fun i => (oInfinityIsometry i,s i)) + +instance oInfinityGraphCStar (s : ℕ → A) : CStarAlgebra (oInfinityGraph s) := closedStarSpanCStar _ + +def oInfinityGraphFirst (s : ℕ → A) : oInfinityGraph s →⋆ₐ[ℂ] OInfinity := + (StarAlgHom.fst ℂ OInfinity A).comp (oInfinityGraph s).subtype + +lemma oInfinityGraphFirst_isometry (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) : + Isometry (oInfinityGraphFirst s) := by + apply Isometry.of_dist_eq + intro x y + change dist x.val.1 y.val.1=dist x.val y.val + rw [dist_eq_norm,dist_eq_norm,Prod.norm_def] + have hb := oInfinity_graph_bound s hs (x-y).val (x-y).property + change ‖x.val.2-y.val.2‖ ≤ ‖x.val.1-y.val.1‖ at hb + exact (max_eq_left hb).symm + +lemma oInfinityGraphFirst_surjective (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) : + Function.Surjective (oInfinityGraphFirst s) := by + let : CompleteSpace (oInfinityGraph s) := (closedStarSpan_closed _).completeSpace_coe + let φ := oInfinityGraphFirst s + let S := φ.range.map oInfinitySubalgebra.subtype + have hS : IsClosed (S : Set CuntzAmbient) := by + have hi : Isometry (oInfinitySubalgebra.subtype.comp φ) := + isometry_subtype_coe.comp (oInfinityGraphFirst_isometry s hs) + have he : (S : Set CuntzAmbient)=Set.range (oInfinitySubalgebra.subtype.comp φ) := by + ext x + simp only [S] + change (∃ y,(∃ z,φ z=y) ∧ _=x) ↔ ∃ z,_=x + constructor + · rintro ⟨y,⟨z,rfl⟩,rfl⟩; exact ⟨z,rfl⟩ + · rintro ⟨z,rfl⟩; exact ⟨φ z,⟨z,rfl⟩,rfl⟩ + rw [he] + exact hi.isClosedEmbedding.isClosed_range + have hgen : Set.range cuntzGenerator ⊆ S := by + rintro _ ⟨i,rfl⟩ + refine ⟨oInfinityIsometry i,?_,rfl⟩ + exact ⟨⟨(oInfinityIsometry i,s i),subset_closedStarSpan _ ⟨i,rfl⟩⟩,rfl⟩ + have ht : oInfinitySubalgebra ≤ S := closedStarSpan_le (Set.range cuntzGenerator) S hS hgen + intro x + obtain ⟨y,hy,hey⟩ := ht x.property + obtain ⟨z,hz⟩ := hy + refine ⟨z,?_⟩ + apply Subtype.ext + exact (congrArg (fun y : OInfinity => y.val) hz).trans hey + +def oInfinityMap (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) : OInfinity →⋆ₐ[ℂ] A := + let equiv : oInfinityGraph s ≃⋆ₐ[ℂ] OInfinity := + StarAlgEquiv.ofBijective (oInfinityGraphFirst s) + ⟨(oInfinityGraphFirst_isometry s hs).injective,oInfinityGraphFirst_surjective s hs⟩ + ((StarAlgHom.snd ℂ OInfinity A).comp (oInfinityGraph s).subtype).comp + equiv.symm.toStarAlgHom + +@[simp] lemma oInfinityMap_isometry (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) (i : ℕ) : + oInfinityMap s hs (oInfinityIsometry i)=s i := by + let z : oInfinityGraph s := + ⟨(oInfinityIsometry i,s i),subset_closedStarSpan _ ⟨i,rfl⟩⟩ + let e : oInfinityGraph s ≃⋆ₐ[ℂ] OInfinity := StarAlgEquiv.ofBijective (oInfinityGraphFirst s) + ⟨(oInfinityGraphFirst_isometry s hs).injective,oInfinityGraphFirst_surjective s hs⟩ + have he : e z=oInfinityIsometry i := rfl + change (e.symm (oInfinityIsometry i)).val.2=s i + have hz : e.symm (oInfinityIsometry i)=z := by + exact (congrArg e.symm he).symm.trans (e.symm_apply_apply z) + exact congrArg (fun w : oInfinityGraph s => w.val.2) hz + +lemma oInfinity_generators_dense : + closedStarSpan (Set.range oInfinityIsometry)=⊤ := by + let S := closedStarSpan (Set.range oInfinityIsometry) + let T := S.map oInfinitySubalgebra.subtype + have ht : IsClosed (T : Set CuntzAmbient) := by + change IsClosed (oInfinitySubalgebra.subtype '' (S : Set OInfinity)) + exact isometry_subtype_coe.isClosedEmbedding.isClosedMap _ (closedStarSpan_closed _) + have hg : Set.range cuntzGenerator ⊆ T := by + rintro _ ⟨i,rfl⟩ + exact ⟨oInfinityIsometry i,subset_closedStarSpan _ ⟨i,rfl⟩,rfl⟩ + have hle : oInfinitySubalgebra ≤ T := closedStarSpan_le _ T ht hg + apply top_unique + intro x _ + obtain ⟨y,hy,he⟩ := hle x.property + exact (Subtype.ext he : y=x) ▸ hy + +lemma oInfinity_hom_ext (φ ψ : OInfinity →⋆ₐ[ℂ] A) + (h : ∀ i,φ (oInfinityIsometry i)=ψ (oInfinityIsometry i)) : φ=ψ := by + let S : StarSubalgebra ℂ OInfinity := + { carrier := {x | φ x=ψ x} + zero_mem' := by simp + add_mem' := by intro x y hx hy; change φ x=ψ x at hx; change φ y=ψ y at hy; change φ (x+y)=ψ (x+y); simp only [map_add,hx,hy] + mul_mem' := by intro x y hx hy; change φ x=ψ x at hx; change φ y=ψ y at hy; change φ (x*y)=ψ (x*y); simp only [map_mul,hx,hy] + algebraMap_mem' := by intro r; exact (φ.commutes r).trans (ψ.commutes r).symm + star_mem' := by intro x hx; change φ x=ψ x at hx; change φ (star x)=ψ (star x); simp only [map_star,hx] } + have hc : IsClosed (S : Set OInfinity) := isClosed_eq (starHom_continuous φ) (starHom_continuous ψ) + have hle : closedStarSpan (Set.range oInfinityIsometry) ≤ S := by + apply closedStarSpan_le _ S hc + rintro _ ⟨i,rfl⟩ + exact h i + rw [oInfinity_generators_dense] at hle + ext x + exact hle (show x ∈ (⊤ : StarSubalgebra ℂ OInfinity) from trivial) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OInfinityUniversal.lean b/lean/OAI/Analysis/WeakInfiniteness/OInfinityUniversal.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd8229d0b10a4f61a911056a2c5f66a5973e8069 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OInfinityUniversal.lean @@ -0,0 +1,176 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra +import OAI.Analysis.WeakInfiniteness.SmallCStar +import OAI.Analysis.WeakInfiniteness.States + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +open scoped ComplexOrder + +universe u v + +section Words + +variable {A : Type u} {B : Type v} [CStarAlgebra A] [CStarAlgebra B] + +def cuntzWord (s : ℕ → A) : List (ℕ × Bool) → A + | [] => 1 + | (i,b)::w => (if b then s i else star (s i))*cuntzWord s w + +def cuntzPolynomial (s : ℕ → A) (c : List (ℕ × Bool) →₀ ℂ) : A := + c.sum fun w t => t • cuntzWord s w + +lemma map_cuntzWord (φ : A →⋆ₐ[ℂ] B) (s : ℕ → A) (w : List (ℕ × Bool)) : + φ (cuntzWord s w)=cuntzWord (fun i => φ (s i)) w := by + induction w with + | nil => exact map_one φ + | cons i w ih => rcases i with ⟨i,b⟩; cases b <;> simp [cuntzWord,ih,map_star] + +lemma map_cuntzPolynomial (φ : A →⋆ₐ[ℂ] B) (s : ℕ → A) (c : List (ℕ × Bool) →₀ ℂ) : + φ (cuntzPolynomial s c)=cuntzPolynomial (fun i => φ (s i)) c := by + simp [cuntzPolynomial,Finsupp.sum,map_cuntzWord] + +lemma cuntzWord_append (s : ℕ → A) (w z : List (ℕ × Bool)) : + cuntzWord s (w++z)=cuntzWord s w*cuntzWord s z := by + induction w with + | nil => simp [cuntzWord] + | cons i w ih => simp [cuntzWord,ih,mul_assoc] + +def cuntzWordMonoid (s : ℕ → A) : Submonoid A where + carrier := Set.range (cuntzWord s) + one_mem' := ⟨[],rfl⟩ + mul_mem' := by + rintro _ _ ⟨w,rfl⟩ ⟨z,rfl⟩ + exact ⟨w++z,cuntzWord_append s w z⟩ + +lemma adjoin_le_cuntzWordSpan (s : ℕ → A) : + (StarAlgebra.adjoin ℂ (Set.range s)).toSubalgebra.toSubmodule ≤ + Submodule.span ℂ (Set.range (cuntzWord s)) := by + rw [StarAlgebra.adjoin_eq_span] + apply Submodule.span_mono + change Submonoid.closure (Set.range s ∪ star (Set.range s)) ≤ cuntzWordMonoid s + apply Submonoid.closure_le.mpr + intro y hy + rcases hy with ⟨i,rfl⟩ | hy + · exact ⟨[(i,true)],by simp [cuntzWord]⟩ + · obtain ⟨i,hi⟩ : ∃ i,s i=star y := hy + exact ⟨[(i,false)],by simp [cuntzWord,hi]⟩ + +lemma exists_cuntzPolynomial_of_mem_adjoin (s : ℕ → A) (y : A) + (hy : y ∈ StarAlgebra.adjoin ℂ (Set.range s)) : + ∃ c : List (ℕ × Bool) →₀ ℂ,cuntzPolynomial s c=y := + Finsupp.mem_span_range_iff_exists_finsupp.mp (adjoin_le_cuntzWordSpan s hy) + +lemma closedStarSpan_range_separable (s : ℕ → A) : + SeparableSpace (closedStarSpan (Set.range s)) := by + have hs := (Set.countable_range (cuntzWord s)).isSeparable.span (R := ℂ) + have hsub : (StarAlgebra.adjoin ℂ (Set.range s) : Set A) ⊆ + (Submodule.span ℂ (Set.range (cuntzWord s)) : Set A) := adjoin_le_cuntzWordSpan s + exact (hs.closure.mono (closure_mono hsub)).separableSpace + +end Words + +instance oInfinity_separable : SeparableSpace OInfinity := + closedStarSpan_range_separable cuntzGenerator + +section NormBound + +variable {A : Type u} [CStarAlgebra A] + +lemma norm_cuntzPolynomial_small {B : Type} [CStarAlgebra B] + [PartialOrder B] [StarOrderedRing B] (s : ℕ → B) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) (c : List (ℕ × Bool) →₀ ℂ) : + ‖cuntzPolynomial s c‖ ≤ ‖cuntzPolynomial oInfinityIsometry c‖ := by + by_cases hn : Nontrivial B + · let := hn + obtain ⟨f,hf,hfn⟩ := exists_norming_gns (cuntzPolynomial s c) + have hv : gnsCyclicVector f ≠ 0 := by + intro h + have hh := norm_gnsCyclicVector f hf + rw [h,norm_zero] at hh + norm_num at hh + let : Nontrivial f.GNS := ⟨⟨gnsCyclicVector f,0,hv⟩⟩ + let π : CuntzRepresentation := + { hilbert := { Carrier := f.GNS } + generators := fun i => f.gnsStarAlgHom (s i) + relations := fun i j => by + rw [← map_star,← map_mul,hs i j] + split_ifs <;> simp } + calc + ‖cuntzPolynomial s c‖ = ‖f.gnsStarAlgHom (cuntzPolynomial s c)‖ := hfn.symm + _ = ‖oInfinityEvaluation π (cuntzPolynomial oInfinityIsometry c)‖ := by + rw [map_cuntzPolynomial,map_cuntzPolynomial] + rfl + _ ≤ _ := NonUnitalStarAlgHom.norm_apply_le (oInfinityEvaluation π) _ + · let := not_nontrivial_iff_subsingleton.mp hn + rw [Subsingleton.elim (cuntzPolynomial s c) 0,norm_zero] + exact norm_nonneg _ + +lemma norm_cuntzPolynomial_separable [SeparableSpace A] (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) (c : List (ℕ × Bool) →₀ ℂ) : + ‖cuntzPolynomial s c‖ ≤ ‖cuntzPolynomial oInfinityIsometry c‖ := by + let := small_of_separable_metric A + let B := SmallCStarCarrier A + let := CStarAlgebra.spectralOrder B + let := CStarAlgebra.spectralOrderedRing B + let e : B ≃⋆ₐ[ℂ] A := smallCStarStarAlgEquiv A + let t : ℕ → B := fun i => e.symm (s i) + have ht : ∀ i j,star (t i)*t j=if i=j then 1 else 0 := by + intro i j + dsimp [t] + rw [← map_star,← map_mul,hs i j] + split_ifs <;> simp + have he : cuntzPolynomial s c=e (cuntzPolynomial t c) := by + change cuntzPolynomial s c=e.toStarAlgHom (cuntzPolynomial t c) + rw [map_cuntzPolynomial] + change cuntzPolynomial s c=cuntzPolynomial (fun i => e (e.symm (s i))) c + simp only [e.apply_symm_apply] + rw [he,StarAlgEquiv.norm_map] + exact norm_cuntzPolynomial_small t ht c + +lemma norm_cuntzPolynomial_le (s : ℕ → A) + (hs : ∀ i j,star (s i)*s j=if i=j then 1 else 0) (c : List (ℕ × Bool) →₀ ℂ) : + ‖cuntzPolynomial s c‖ ≤ ‖cuntzPolynomial oInfinityIsometry c‖ := by + let S := closedStarSpan (Set.range s) + let : CStarAlgebra S := closedStarSpanCStar _ + let : SeparableSpace S := closedStarSpan_range_separable s + let t : ℕ → S := fun i => ⟨s i,subset_closedStarSpan _ ⟨i,rfl⟩⟩ + have ht : ∀ i j,star (t i)*t j=if i=j then 1 else 0 := by + intro i j + apply Subtype.ext + change star (s i)*s j = ((if i=j then (1:S) else 0):S).val + rw [hs] + split_ifs <;> rfl + have he : (S.subtype (cuntzPolynomial t c))=cuntzPolynomial s c := by + rw [map_cuntzPolynomial] + rfl + rw [← he] + exact norm_cuntzPolynomial_separable t ht c + +end NormBound + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OperatorReducing.lean b/lean/OAI/Analysis/WeakInfiniteness/OperatorReducing.lean new file mode 100644 index 0000000000000000000000000000000000000000..8958b39f7fe7d984a025b075834e01b768fc57a8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OperatorReducing.lean @@ -0,0 +1,65 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace + +variable {E F G : Type*} + [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [InnerProductSpace ℂ F] [CompleteSpace F] + [NormedAddCommGroup G] [InnerProductSpace ℂ G] [CompleteSpace G] + +lemma exists_reducing_column (L : E →L[ℂ] F) (T : G →ₗᵢ[ℂ] E) + (D : G →L[ℂ] G) (a : E →L[ℂ] E) + (hL : L.adjoint.comp (L.comp T.toContinuousLinearMap) = T.toContinuousLinearMap) + (ha : a.comp T.toContinuousLinearMap = T.toContinuousLinearMap.comp D) + (ha' : a.adjoint.comp T.toContinuousLinearMap = T.toContinuousLinearMap.comp D.adjoint) : + ∃ J : G →ₗᵢ[ℂ] F, + J.toContinuousLinearMap=L.comp T.toContinuousLinearMap ∧ + (L.comp (a.comp L.adjoint)).comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp D ∧ + (L.comp (a.comp L.adjoint)).adjoint.comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp D.adjoint := by + have hpoint (x : G) : L.adjoint (L (T x))=T x := congrArg (fun t : G →L[ℂ] E => t x) hL + let J₀ := L.toLinearMap.comp T.toLinearMap + have hi : ∀ x y, inner ℂ (J₀ x) (J₀ y)=inner ℂ x y := by + intro x y + change inner ℂ (L (T x)) (L (T y))=inner ℂ x y + rw [← ContinuousLinearMap.adjoint_inner_right, hpoint] + exact T.inner_map_map x y + let J := J₀.isometryOfInner hi + have hJ : J.toContinuousLinearMap=L.comp T.toContinuousLinearMap := by ext x; rfl + refine ⟨J,hJ,?_,?_⟩ + · rw [hJ] + ext x + change L (a (L.adjoint (L (T x))))=L (T (D x)) + rw [hpoint] + exact congrArg L (congrArg (fun t : G →L[ℂ] E => t x) ha) + · rw [hJ] + simp only [ContinuousLinearMap.adjoint_comp, ContinuousLinearMap.adjoint_adjoint] + ext x + change L (a.adjoint (L.adjoint (L (T x))))=L (T (D.adjoint x)) + rw [hpoint] + exact congrArg L (congrArg (fun t : G →L[ℂ] E => t x) ha') + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OrthogonalCores.lean b/lean/OAI/Analysis/WeakInfiniteness/OrthogonalCores.lean new file mode 100644 index 0000000000000000000000000000000000000000..7435378d0629dcea338a22f259d8f4ffde3fcb04 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OrthogonalCores.lean @@ -0,0 +1,126 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.CutImplementation +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.SupportedCorner +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +section + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance matrixRealModuleCores {m : Type*} [Fintype m] : + Module ℝ (CStarMatrix m m A) := Module.complexToReal _ + +lemma exists_two_exact_core_columns {h : A} (hh : 0 ≤ h) + (hpi : ProperlyInfinite (diagonalCopies 1 h)) {δ : ℝ} (hδ : 0 < δ) : + ∃ r s : A,star r*r=cfcₙ (spectralRamp δ) h ∧ + star s*s=cfcₙ (spectralRamp δ) h ∧ star r*s=0 ∧ + r*star r+s*star s ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + have hc := hpi.diagonal_absorbs (by norm_num : 1 ≤ 1) 2 + obtain ⟨R,hR,hRher,_⟩ := hc.exact_spectralRamp (diagonalCopies_nonneg 2 hh) + (diagonalCopies_nonneg 1 hh) δ hδ + rw [← diagonalCopies_cfc 2 h hh.isSelfAdjoint (spectralRamp δ) + (continuous_spectralRamp δ) (spectralRamp_eq_zero hδ hδ.le)] at hR + refine ⟨R 0 0,R 0 1,?_,?_,?_,?_⟩ + · have he := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 0 0) hR + simpa only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,Fin.sum_univ_one, + diagonalCopies,CStarMatrix.ofMatrix_apply,Matrix.diagonal_apply_eq] using he + · have he := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 1 1) hR + simpa only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,Fin.sum_univ_one, + diagonalCopies,CStarMatrix.ofMatrix_apply,Matrix.diagonal_apply_eq] using he + · have he := congrArg (fun M : CStarMatrix (Fin 2) (Fin 2) A => M 0 1) hR + simpa only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,Fin.sum_univ_one, + diagonalCopies,CStarMatrix.ofMatrix_apply,Matrix.diagonal_apply_ne _ (by decide : (0 : Fin 2) ≠ 1)] using he + · have hm := map_mem_hereditary (matrixSingletonHom (A := A)) + (diagonalCopies_nonneg 1 hh).isSelfAdjoint hRher + change (R*R.conjTranspose) 0 0 ∈ hereditarySubalgebra h hh.isSelfAdjoint at hm + simpa only [CStarMatrix.mul_apply,CStarMatrix.conjTranspose_apply,Fin.sum_univ_two] using hm + +lemma norm_spectralRamp_le_one {B : Type*} [NonUnitalCStarAlgebra B] + (h : B) (δ : ℝ) : ‖cfcₙ (spectralRamp δ) h‖ ≤ 1 := by + apply norm_cfcₙ_le + intro t _ + rw [Real.norm_eq_abs,abs_of_nonneg (spectralRamp_nonneg δ t)] + exact spectralRamp_le_one δ t + +lemma norm_spectralRamp_eq_one {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + {h : B} (hh : 0 ≤ h) {δ : ℝ} (hδ : 0 < δ) (hn : 2*δ ≤ ‖h‖) : + ‖cfcₙ (spectralRamp δ) h‖=1 := by + have hz : h ≠ 0 := by intro hz; rw [hz,norm_zero] at hn; linarith + let : Nontrivial B := nontrivial_of_ne h 0 hz + apply le_antisymm (norm_spectralRamp_le_one h δ) + have he := norm_apply_le_norm_cfcₙ (spectralRamp δ) h + (spectrum_subset_quasispectrum ℝ h (CStarAlgebra.norm_mem_spectrum_of_nonneg h hh)) + (continuous_spectralRamp δ).continuousOn (spectralRamp_eq_zero hδ hδ.le) hh.isSelfAdjoint + simpa only [spectralRamp_eq_one hδ hn,norm_one] using he + +lemma exists_two_orthogonal_cores {h : A} (hh : 0 ≤ h) + (hpi : ProperlyInfinite (diagonalCopies 1 h)) {δ : ℝ} (hδ : 0 < δ) : + ∃ e f : A,0 ≤ e ∧ 0 ≤ f ∧ ‖e‖ ≤ 1 ∧ ‖f‖ ≤ 1 ∧ e*f=0 ∧ + e ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ + f ∈ hereditarySubalgebra h hh.isSelfAdjoint ∧ + ∀ (H : ComplexHilbert) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + 2*δ ≤ ‖π h‖ → ‖π e‖=1 ∧ ‖π f‖=1 := by + obtain ⟨r,s,hr,hs,hrs,hm⟩ := exists_two_exact_core_columns hh hpi hδ + let e := r*star r + let f := s*star s + have he : 0 ≤ e := mul_star_self_nonneg r + have hf : 0 ≤ f := mul_star_self_nonneg s + have heN : ‖e‖ ≤ 1 := by + rw [show e=r*star r from rfl,CStarRing.norm_self_mul_star,← CStarRing.norm_star_mul_self (x := r),hr] + exact norm_spectralRamp_le_one h δ + have hfN : ‖f‖ ≤ 1 := by + rw [show f=s*star s from rfl,CStarRing.norm_self_mul_star,← CStarRing.norm_star_mul_self (x := s),hs] + exact norm_spectralRamp_le_one h δ + have hef : e*f=0 := by + change (r*star r)*(s*star s)=0 + rw [mul_assoc,← mul_assoc (star r),hrs,zero_mul,mul_zero] + have hem : e ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + exact hereditarySubalgebra_le_of_mem (hereditarySubalgebra_inner h hh.isSelfAdjoint) + (add_nonneg he hf).isSelfAdjoint hm (mem_hereditary_of_le (e+f) e (add_nonneg he hf) he (le_add_of_nonneg_right hf)) + have hfm : f ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + exact hereditarySubalgebra_le_of_mem (hereditarySubalgebra_inner h hh.isSelfAdjoint) + (add_nonneg he hf).isSelfAdjoint hm (mem_hereditary_of_le (e+f) f (add_nonneg he hf) hf (le_add_of_nonneg_left he)) + refine ⟨e,f,he,hf,heN,hfN,hef,hem,hfm,?_⟩ + intro H π hn + have hp : 0 ≤ π h := map_nonneg π hh + have hc : π (cfcₙ (spectralRamp δ) h)=cfcₙ (spectralRamp δ) (π h) := + π.map_cfcₙ _ _ (continuous_spectralRamp δ).continuousOn (spectralRamp_eq_zero hδ hδ.le) + (by fun_prop) hh.isSelfAdjoint hp.isSelfAdjoint + have hnr : ‖π e‖=‖π (cfcₙ (spectralRamp δ) h)‖ := by + rw [← hr,map_mul,map_mul,map_star,CStarRing.norm_self_mul_star,CStarRing.norm_star_mul_self] + have hns : ‖π f‖=‖π (cfcₙ (spectralRamp δ) h)‖ := by + rw [← hs,map_mul,map_mul,map_star,CStarRing.norm_self_mul_star,CStarRing.norm_star_mul_self] + rw [hc,norm_spectralRamp_eq_one hp hδ hn] at hnr hns + exact ⟨hnr,hns⟩ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/OrthogonalPerturbation.lean b/lean/OAI/Analysis/WeakInfiniteness/OrthogonalPerturbation.lean new file mode 100644 index 0000000000000000000000000000000000000000..a44706dc0a181f7df629d093e18c9686d6de4e8a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/OrthogonalPerturbation.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UniformPerturbation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +lemma norm_selfadjoint_of_square_zero (x : A) (hx : x*x=0) : + ‖x+star x‖=‖x‖ := by + have hxs : star x*star x=0 := by + simpa only [star_mul,star_zero] using congrArg star hx + have hsa : IsSelfAdjoint (x+star x) := by + show star (x+star x)=x+star x + rw [star_add,star_star,add_comm] + have horth : (star x*x)*(x*star x)=0 := by + calc + (star x*x)*(x*star x)=star x*(x*x)*star x := by noncomm_ring + _ = 0 := by rw [hx,mul_zero,zero_mul] + have hsum : (x+star x)*(x+star x)=star x*x+x*star x := by + noncomm_ring [hx,hxs] + have hn := (CStarRing.norm_star_mul_self (x := x+star x)) + rw [hsa.star_eq] at hn + rw [hsum] at hn + rw [(IsSelfAdjoint.star_mul_self x).norm_add_eq_max + (IsSelfAdjoint.mul_star_self x) horth] at hn + rw [CStarRing.norm_star_mul_self,CStarRing.norm_self_mul_star,max_self] at hn + nlinarith [norm_nonneg (x+star x),norm_nonneg x] + +lemma isSelfAdjoint_add_star (x : A) : IsSelfAdjoint (x+star x) := by + show star (x+star x)=x+star x + rw [star_add,star_star,add_comm] + +variable [PartialOrder A] [StarOrderedRing A] + +lemma orthogonal_selfadjoint_test (p q y : A) (hp : 0 ≤ p) (hq : 0 ≤ q) + (hpq : p*q=0) (hpn : ‖p‖ ≤ 1) (hqn : ‖q‖ ≤ 1) (hyn : ‖y‖ ≤ 1) : + ‖p*y*q+star (p*y*q)‖ ≤ 1 ∧ + p*(p*y*q+star (p*y*q))*q=(p*p)*y*(q*q) := by + have hqp : q*p=0 := by + simpa only [star_mul,hp.star_eq,hq.star_eq,star_zero] using congrArg star hpq + have hz : (p*y*q)*(p*y*q)=0 := by + calc + (p*y*q)*(p*y*q)=p*y*(q*p)*y*q := by noncomm_ring + _ = 0 := by rw [hqp,mul_zero,zero_mul,zero_mul] + constructor + · rw [norm_selfadjoint_of_square_zero _ hz] + calc + ‖p*y*q‖ ≤ (‖p‖*‖y‖)*‖q‖ := + (norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _ ≤ (1*1)*1 := by gcongr + _ = 1 := by norm_num + · have hc : p*star (p*y*q)*q=0 := by + rw [star_mul,star_mul,hp.star_eq,hq.star_eq] + calc + p*(q*(star y*p))*q=(p*q)*star y*(p*q) := by noncomm_ring + _ = 0 := by rw [hpq,zero_mul,zero_mul] + rw [mul_add,add_mul,hc,add_zero] + noncomm_ring + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem selfadjoint_uniform_perturbation_of_gap_one + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (p q h k c : A) (hpn : ‖p‖ ≤ 1) (hqn : ‖q‖ ≤ 1) + (hp : 0 ≤ p) (hq : 0 ≤ q) (hpq : p*q=0) + (hh : 0 ≤ h) (hk : 0 ≤ k) (hc : 0 ≤ c) + (hph : star p*p*h=h) (hqk : q*star q*k=k) + (hch : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h)) + (hck : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k)) + (T : A) {η α : ℝ} (hη : 0 < η) (hα : 0 < α) : + ∃ y : A, ‖y‖ ≤ 1 ∧ IsSelfAdjoint y ∧ + (∃ z : A, y=p*z*q+star (p*z*q)) ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + have hpp : p*p*h=h := by simpa only [hp.star_eq] using hph + have hqq : q*q*k=k := by simpa only [hq.star_eq] using hqk + have hp4 : star (p*p)*(p*p)*h=h := by + rw [star_mul,hp.star_eq] + calc + (p*p)*(p*p)*h=(p*p)*(p*p*h) := by noncomm_ring + _ = h := by rw [hpp,hpp] + have hq4 : (q*q)*star (q*q)*k=k := by + rw [star_mul,hq.star_eq] + calc + (q*q)*(q*q)*k=(q*q)*(q*q*k) := by noncomm_ring + _ = k := by rw [hqq,hqq] + have hppn : ‖p*p‖ ≤ 1 := (norm_mul_le _ _).trans (by nlinarith [norm_nonneg p]) + have hqqn : ‖q*q‖ ≤ 1 := (norm_mul_le _ _).trans (by nlinarith [norm_nonneg q]) + obtain ⟨z,hzn,hz⟩ := uniform_perturbation_of_gap_one hσ hσγ hgap hA hn hpi + (p*p) (q*q) h k c hppn hqqn hh hk hc hp4 hq4 hch hck T hη hα + have hy := orthogonal_selfadjoint_test p q z hp hq hpq hpn hqn hzn + refine ⟨p*z*q+star (p*z*q),hy.1,isSelfAdjoint_add_star _,⟨z,rfl⟩,?_⟩ + intro H π hπc + rw [hy.2] + exact hz H π hπc + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PairUnitary.lean b/lean/OAI/Analysis/WeakInfiniteness/PairUnitary.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a2c12337a90e9c958c1b55c7bff6e8b7b681ef4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PairUnitary.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteUnitaryLog + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +universe u + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + +def pairUnitary (x : A) (b : Bool) : unitary A := + selfAdjoint.expUnitary ((2 * Real.pi) • (if b then realPart x else imaginaryPart x)) + +def pairGroup (x : A) : FreeGroup Bool →* unitary A := + FreeGroup.lift (pairUnitary x) + +@[simp] lemma pairGroup_of (x : A) (b : Bool) : + pairGroup x (FreeGroup.of b) = pairUnitary x b := by simp [pairGroup] + +lemma map_pairUnitary (f : A →⋆ₐ[ℂ] B) (x : A) (b : Bool) : + f (pairUnitary x b) = (pairUnitary (f x) b : B) := by + cases b <;> simp only [pairUnitary, Bool.false_eq_true, ite_false, ite_true, + selfAdjoint.expUnitary_coe] + all_goals + let : NormedAlgebra ℚ A := NormedAlgebra.restrictScalars ℚ ℂ A + let : NormedAlgebra ℚ B := NormedAlgebra.restrictScalars ℚ ℂ B + have hf : Continuous f := (f.toAlgHom.toLinearMap.mkContinuous 1 + (fun x => by + change ‖f x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le f x)).continuous + rw [NormedSpace.map_exp f hf] + congr 1 + change f (I • ((2 * Real.pi) • (_ : A))) = I • ((2 * Real.pi) • (_ : B)) + rw [map_smul, ← Complex.coe_smul, map_smul] + simp only [map_realPart, map_imaginaryPart, Complex.coe_smul] + +lemma map_pairGroup (f : A →⋆ₐ[ℂ] B) (x : A) (g : FreeGroup Bool) : + f (pairGroup x g) = (pairGroup (f x) g : B) := by + have h : (Unitary.map ({ f.toMonoidHom with map_star' := map_star f } : A →⋆* B)).toMonoidHom.comp (pairGroup x) = + pairGroup (f x) := by + apply FreeGroup.ext_hom + intro b + apply Subtype.ext + change f (pairGroup x (FreeGroup.of b)) = (pairGroup (f x) (FreeGroup.of b) : B) + rw [pairGroup_of, pairGroup_of] + exact map_pairUnitary f x b + exact congrArg (fun ρ : FreeGroup Bool →* unitary B => (ρ g : B)) h + +def logarithmContraction (S T : unitary A) : A := + (2 * Real.pi)⁻¹ • ((Unitary.argSelfAdjoint S : A) + + Complex.I • (Unitary.argSelfAdjoint T : A)) + +lemma norm_logarithmContraction_le (S T : unitary A) : + ‖logarithmContraction S T‖ ≤ 1 := by + have hp : 0 < 2 * Real.pi := mul_pos (by norm_num) Real.pi_pos + rw [logarithmContraction, norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos hp] + apply (mul_le_mul_of_nonneg_left (norm_add_le _ _) (inv_nonneg.mpr hp.le)).trans + rw [norm_smul, Complex.norm_I, one_mul] + have hS : ‖(Unitary.argSelfAdjoint S : A)‖ ≤ Real.pi := Unitary.norm_argSelfAdjoint_le_pi S + have hT : ‖(Unitary.argSelfAdjoint T : A)‖ ≤ Real.pi := Unitary.norm_argSelfAdjoint_le_pi T + have hn := add_le_add hS hT + have hn' : ‖(Unitary.argSelfAdjoint S : A)‖ + ‖(Unitary.argSelfAdjoint T : A)‖ ≤ + 2 * Real.pi := by simpa only [two_mul] using hn + exact (mul_le_mul_of_nonneg_left hn' (inv_nonneg.mpr hp.le)).trans_eq + (inv_mul_cancel₀ (ne_of_gt hp)) + +lemma realPart_logarithmContraction (S T : unitary A) : + (2 * Real.pi) • realPart (logarithmContraction S T) = Unitary.argSelfAdjoint S := by + have hr (h : selfAdjoint A) : realPart (h : A) = h := Subtype.ext h.property.coe_realPart + simp only [logarithmContraction, map_smul, map_add, realPart_I_smul, hr, + (Unitary.argSelfAdjoint T).property.imaginaryPart, neg_zero, add_zero, smul_smul] + rw [mul_inv_cancel₀ (mul_ne_zero two_ne_zero Real.pi_ne_zero), one_smul] + +lemma imaginaryPart_logarithmContraction (S T : unitary A) : + (2 * Real.pi) • imaginaryPart (logarithmContraction S T) = Unitary.argSelfAdjoint T := by + have hr (h : selfAdjoint A) : realPart (h : A) = h := Subtype.ext h.property.coe_realPart + simp only [logarithmContraction, map_smul, map_add, imaginaryPart_I_smul, hr, + (Unitary.argSelfAdjoint S).property.imaginaryPart, zero_add, smul_smul] + rw [mul_inv_cancel₀ (mul_ne_zero two_ne_zero Real.pi_ne_zero), one_smul] + +lemma pairUnitary_logarithmContraction {H : Type u} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [FiniteDimensional ℂ H] + (S T : unitary (H →L[ℂ] H)) (b : Bool) : + pairUnitary (logarithmContraction S T) b = if b then S else T := by + let : CompleteSpace H := FiniteDimensional.complete ℂ H + cases b <;> simp only [pairUnitary, Bool.false_eq_true, ite_false, ite_true] + · rw [imaginaryPart_logarithmContraction, finite_expUnitary_argSelfAdjoint] + · rw [realPart_logarithmContraction, finite_expUnitary_argSelfAdjoint] + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PerturbationRows.lean b/lean/OAI/Analysis/WeakInfiniteness/PerturbationRows.lean new file mode 100644 index 0000000000000000000000000000000000000000..fa9379bed2aa8095b32b945532b9edcbfab987b4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PerturbationRows.lean @@ -0,0 +1,142 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FixedRows +import OAI.Analysis.WeakInfiniteness.MatrixHilbert +import OAI.Analysis.WeakInfiniteness.MatrixMaps +import OAI.Analysis.WeakInfiniteness.SupportedCorner + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +local instance matrixRealModulePerturbRows {m : Type*} [Fintype m] : + Module ℝ (CStarMatrix m m A) := Module.complexToReal _ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma diagonal_singleton (X : CStarMatrix (Fin 1) (Fin 1) A) : + diagonalCopies 1 (matrixSingletonHom X)=X := by + ext i j + have hi : i=0 := Subsingleton.elim _ _ + have hj : j=0 := Subsingleton.elim _ _ + subst i; subst j + rfl + +omit [PartialOrder A] [StarOrderedRing A] in +lemma singleton_diagonal (x : A) : matrixSingletonHom (diagonalCopies 1 x)=x := rfl + +lemma norm_diagonalCopies_le (m : ℕ) (x : A) : ‖diagonalCopies m x‖ ≤ ‖x‖ := + NonUnitalStarAlgHom.norm_apply_le (diagonalHom m) x + +lemma norm_row_test_le (R S : CStarMatrix (Fin 1) (Fin n) A) + (w : CStarMatrix (Fin n) (Fin n) A) (hR : ‖R‖ ≤ 1) (hS : ‖S‖ ≤ 1) (hw : ‖w‖ ≤ 1) : + ‖matrixSingletonHom (-(R*w*S.conjTranspose))‖ ≤ 1 := by + apply (NonUnitalStarAlgHom.norm_apply_le (matrixSingletonHom (A := A)) _).trans + rw [norm_neg] + calc + ‖R*w*S.conjTranspose‖ ≤ (‖R‖*‖w‖)*‖S.conjTranspose‖ := + (rectangular_norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right + (rectangular_norm_mul_le R w) (norm_nonneg _)) + _ ≤ (1*1)*1 := by rw [rectangular_norm_conjTranspose]; gcongr + _ = 1 := by norm_num + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_mul_sub_perturb {m k l : Type*} [Fintype k] + (L : CStarMatrix m k A) (X Y : CStarMatrix k l A) : L*(X-Y)=L*X-L*Y := + Matrix.mul_sub L X Y + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_sub_mul_perturb {m k l : Type*} [Fintype k] + (X Y : CStarMatrix m k A) (R : CStarMatrix k l A) : (X-Y)*R=X*R-Y*R := + Matrix.sub_mul X Y R + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_neg_mul_perturb {m k l : Type*} [Fintype k] + (L : CStarMatrix m k A) (R : CStarMatrix k l A) : (-L)*R=-(L*R) := Matrix.neg_mul L R + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_mul_neg_perturb {m k l : Type*} [Fintype k] + (L : CStarMatrix m k A) (R : CStarMatrix k l A) : L*(-R)=-(L*R) := Matrix.mul_neg L R + +omit [PartialOrder A] [StarOrderedRing A] in +lemma compress_row_test (L : CStarMatrix (Fin n) (Fin 1) A) + (K R S : CStarMatrix (Fin 1) (Fin n) A) + (P Q : CStarMatrix (Fin 1) (Fin 1) A) (E w : CStarMatrix (Fin n) (Fin n) A) + (hL : L*P*R=E) (hK : S.conjTranspose*Q*K=E) (hw : E*w*E=w) : + L*(P*(-(R*w*S.conjTranspose))*Q)*K= -w := by + rw [rectangular_mul_neg_perturb, rectangular_neg_mul_perturb, + rectangular_mul_neg_perturb, rectangular_neg_mul_perturb] + congr 1 + calc + L*(P*(R*w*S.conjTranspose)*Q)*K = (L*P*R)*w*(S.conjTranspose*Q*K) := by + simp only [rectangular_mul_assoc] + _ = w := by rw [hL,hK,hw] + +lemma norm_representation_compression_le {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] + (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (L : CStarMatrix (Fin n) (Fin 1) A) (K : CStarMatrix (Fin 1) (Fin n) A) + (X : CStarMatrix (Fin 1) (Fin 1) A) (hL : ‖L‖ ≤ 1) (hK : ‖K‖ ≤ 1) : + ‖matrixRepresentation π (Fin n) (L*X*K)‖ ≤ ‖π (matrixSingletonHom X)‖ := by + have hX : ‖rectangularMap π X‖ = ‖π (matrixSingletonHom X)‖ := by + have hh := NonUnitalStarAlgHom.norm_map matrixSingletonHom matrixSingletonHom_injective + (rectangularMap π X) + exact hh.symm + calc + _ ≤ ‖rectangularMap π (L*X*K)‖ := NonUnitalStarAlgHom.norm_apply_le (matrixActionHom (n := Fin n) (H := H)) (rectangularMap π (L*X*K)) + _ = ‖rectangularMap π L*rectangularMap π X*rectangularMap π K‖ := by rw [rectangularMap_mul, rectangularMap_mul] + _ ≤ ‖rectangularMap π L‖*‖rectangularMap π X‖*‖rectangularMap π K‖ := + (rectangular_norm_mul_le _ _).trans (mul_le_mul_of_nonneg_right + (rectangular_norm_mul_le _ _) (norm_nonneg _)) + _ ≤ 1*‖π (matrixSingletonHom X)‖*1 := by + rw [hX] + gcongr + · exact (rectangularMap_norm_le π L).trans hL + · exact (rectangularMap_norm_le π K).trans hK + _ = ‖π (matrixSingletonHom X)‖ := by ring + +lemma supported_testing_element (c : A) {α : ℝ} (hα : 0 < α) + (R S : CStarMatrix (Fin 1) (Fin n) A) + (hR : R.conjTranspose*R=diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)) + (hS : S.conjTranspose*S=diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)) + (X : CStarMatrix (Fin 1) (Fin 1) A) (z : ℂ) : + let e := diagonalCopies n (cfcₙ (spectralRamp (α/16)) c) + e*(z • (R.conjTranspose*X*S))=z • (R.conjTranspose*X*S) ∧ + (z • (R.conjTranspose*X*S))*e=z • (R.conjTranspose*X*S) := by + dsimp only + have hl := fixed_row_shallow_support c hα R hR + have hr := congrArg CStarMatrix.conjTranspose (fixed_row_shallow_support c hα S hS) + have he : IsSelfAdjoint (diagonalCopies n (cfcₙ (spectralRamp (α/16)) c)) := by + exact (cfcₙ_predicate (spectralRamp (α/16)) c).map (diagonalHom n) + rw [rectangular_star_mul, rectangular_conjTranspose_conjTranspose] at hr + change S*star (diagonalCopies n (cfcₙ (spectralRamp (α/16)) c))=S at hr + rw [he.star_eq] at hr + constructor + · rw [mul_smul_comm, ← rectangular_mul_assoc, ← rectangular_mul_assoc, hl] + · rw [smul_mul_assoc, rectangular_mul_assoc, hr] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/Plateau.lean b/lean/OAI/Analysis/WeakInfiniteness/Plateau.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bcc7e2ac3596608bae698b038fac720bb5817f3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/Plateau.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixCutToolkit + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma spectralRamp_positiveCut_plateau (a : A) (ha : IsSelfAdjoint a) + {α : ℝ} (hα : 0 < α) : + cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) a)*positiveCut (7*α/8) a = + positiveCut (7*α/8) a := by + have h0 : max (0-α/2) 0 = 0 := max_eq_right (by linarith) + have h1 : max (0-7*α/8) 0 = 0 := max_eq_right (by linarith) + rw [positiveCut, ← cfcₙ_comp (spectralRamp (α/8)) (fun s : ℝ => max (s-α/2) 0) a + (continuous_spectralRamp _).continuousOn (spectralRamp_eq_zero (by positivity) (by positivity)) + (by fun_prop) h0 ha] + rw [positiveCut, ← cfcₙ_mul (spectralRamp (α/8) ∘ (fun s : ℝ => max (s-α/2) 0)) (fun s : ℝ => max (s-7*α/8) 0) a ((continuous_spectralRamp _).comp (by fun_prop)).continuousOn (by + change spectralRamp (α/8) (max (0-α/2) 0)=0 + rw [h0] + exact spectralRamp_eq_zero (by positivity) (by positivity)) + (by fun_prop) h1] + congr 1 + funext s + change spectralRamp (α/8) (max (s-α/2) 0)*max (s-7*α/8) 0 = max (s-7*α/8) 0 + by_cases hs : s ≤ 7*α/8 + · rw [max_eq_right (by linarith : s-7*α/8 ≤ 0), mul_zero] + · rw [spectralRamp_eq_one (by positivity) (by have := le_max_left (s-α/2) 0; linarith), one_mul] + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma positiveCut_ne_zero_of_lt_norm {b : H →L[ℂ] H} (hb : 0 ≤ b) + {δ : ℝ} (hδ : 0 ≤ δ) (hδb : δ < ‖b‖) : positiveCut δ b ≠ 0 := by + have : Nontrivial (H →L[ℂ] H) := ⟨⟨b, 0, by intro h; rw [h, norm_zero] at hδb; linarith⟩⟩ + have hm := CStarAlgebra.norm_mem_spectrum_of_nonneg b hb + have hle := norm_apply_le_norm_cfcₙ (fun s : ℝ => max (s-δ) 0) b + (spectrum_subset_quasispectrum ℝ b hm) (by fun_prop) (max_eq_right (by linarith)) hb.isSelfAdjoint + rw [Real.norm_eq_abs, abs_of_nonneg (le_max_right _ _), max_eq_left (by linarith)] at hle + intro hz + change positiveCut δ b = 0 at hz + change ‖b‖-δ ≤ ‖positiveCut δ b‖ at hle + rw [hz, norm_zero] at hle + linarith + +lemma exists_plateau_vector {b : H →L[ℂ] H} (hb : 0 ≤ b) + {α : ℝ} (hα : 0 < α) (hαb : α ≤ ‖b‖) : + ∃ ξ : H, ‖ξ‖ = 1 ∧ cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) b) ξ = ξ := by + let z := positiveCut (7*α/8) b + have hz : z ≠ 0 := positiveCut_ne_zero_of_lt_norm hb (by positivity) (by linarith) + obtain ⟨v, hv⟩ : ∃ v : H, z v ≠ 0 := by + by_contra! h + apply hz + ext v + exact h v + let ξ := (‖z v‖⁻¹ : ℂ) • z v + refine ⟨ξ, ?_, ?_⟩ + · dsimp only [ξ] + rw [norm_smul, norm_inv, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by positivity), inv_mul_cancel₀ (norm_ne_zero_iff.mpr hv)] + · have he := congrArg (fun T : H →L[ℂ] H => T v) + (spectralRamp_positiveCut_plateau b hb.isSelfAdjoint hα) + change cfcₙ (spectralRamp (α/8)) (positiveCut (α/2) b) (z v) = z v at he + dsimp only [ξ] + rw [map_smul, he] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PolarCFC.lean b/lean/OAI/Analysis/WeakInfiniteness/PolarCFC.lean new file mode 100644 index 0000000000000000000000000000000000000000..250529e20d5b5a31923547598ac1243c3b4af2b0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PolarCFC.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Intertwining +import OAI.Analysis.WeakInfiniteness.SeparationScalarBounds + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma initial_mul_cfc (X : B) (f : ℝ → ℝ) (hf : Continuous f) : + star (X*cfc f (star X*X))*(X*cfc f (star X*X))= + cfc (fun s => s*(f s)^2) (star X*X) := by + have hF : IsSelfAdjoint (cfc f (star X*X)) := cfc_predicate _ _ + have hcomm : Commute (cfc f (star X*X)) (star X*X) := (Commute.refl _).cfc_real f + rw [star_mul,hF.star_eq] + calc + _=cfc f (star X*X)*(star X*X)*cfc f (star X*X) := by simp only [mul_assoc] + _=(star X*X)*cfc f (star X*X)*cfc f (star X*X) := by rw [hcomm.eq] + _=cfc (fun s : ℝ => s*f s*f s) (star X*X) := by + rw [cfc_mul (fun s : ℝ => s*f s) f _ (continuous_id.mul hf).continuousOn hf.continuousOn, + cfc_mul (fun s : ℝ => s) f _ continuous_id.continuousOn hf.continuousOn, + cfc_id' ℝ (star X*X) (IsSelfAdjoint.star_mul_self X)] + _=_ := by congr 1; ext s; ring + +lemma norm_mul_cfc_initial_le (X : B) (f : ℝ → ℝ) (hf : Continuous f) + {c : ℝ} (hc : 0 ≤ c) + (hscalar : ∀ s ∈ spectrum ℝ (star X*X),s*(f s)^2 ≤ c^2) : + ‖X*cfc f (star X*X)‖ ≤ c := by + have hn : ‖cfc (fun s => s*(f s)^2) (star X*X)‖ ≤ c^2 := by + apply norm_cfc_le (sq_nonneg c) + intro s hs + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg + (spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs) (sq_nonneg _))] + exact hscalar s hs + rw [← initial_mul_cfc X f hf,CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg (X*cfc f (star X*X))] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma sandwich_cfc_initial (X : B) (f : ℝ → ℝ) (hf : Continuous f) : + X*cfc f (star X*X)*star X=cfc (fun s => s*f s) (X*star X) := by + rw [← cfc_star_mul_intertwine X f hf,mul_assoc] + have hcomm : Commute (cfc f (X*star X)) (X*star X) := (Commute.refl _).cfc_real f + rw [hcomm.eq] + rw [cfc_mul (fun s : ℝ => s) f _ continuous_id.continuousOn hf.continuousOn, + cfc_id' ℝ (X*star X) (IsSelfAdjoint.mul_star_self X)] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma cfc_real_mul_three (a : B) (_ha : IsSelfAdjoint a) + (f g k : ℝ → ℝ) (hf : Continuous f) (hg : Continuous g) (hk : Continuous k) : + cfc f a*cfc g a*cfc k a=cfc (fun s => f s*g s*k s) a := by + rw [cfc_mul (fun s => f s*g s) k a (hf.mul hg).continuousOn hk.continuousOn, + cfc_mul f g a hf.continuousOn hg.continuousOn] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma norm_separationR (X : B) {l : ℝ} (hl : 0 < l) : + ‖cfc (separationR l) (star X*X)‖ ≤ 1 := by + apply norm_cfc_le (by norm_num) + intro s _ + rw [Real.norm_eq_abs,abs_of_nonneg (separationR_nonneg hl.le s)] + exact separationR_le_one hl s + +lemma norm_separation_polar (X : B) {l : ℝ} (hl : 0 < l) : + ‖X*cfc (separationV l) (star X*X)‖ ≤ 1 := by + apply norm_mul_cfc_initial_le X _ (continuous_separationV hl) (by norm_num) + intro s hs + simpa only [one_pow] using separation_sV_sq_le_one hl + (spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs) + +lemma norm_separation_low (X : B) {l : ℝ} (hl : 0 < l) : + ‖cfc (separationL l) (X*star X)*X*cfc (separationL l) (star X*X)‖ ≤ 8*l := by + rw [cfc_star_mul_intertwine X _ (continuous_separationL l),mul_assoc, + ← cfc_mul _ _ _ (continuous_separationL l).continuousOn (continuous_separationL l).continuousOn] + apply norm_mul_cfc_initial_le X _ ((continuous_separationL l).mul (continuous_separationL l)) (by positivity) + intro s hs + have h := separation_low_square_bound hl (spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs) + change s * (separationL l s * separationL l s)^2 ≤ (8*l)^2 + nlinarith + +lemma norm_separation_mixedR (X : B) {l : ℝ} (hl : 0 < l) : + ‖cfc (separationL l) (X*star X)*X*cfc (separationR l) (star X*X)‖ ≤ 3*l := by + rw [cfc_star_mul_intertwine X _ (continuous_separationL l),mul_assoc, + ← cfc_mul _ _ _ (continuous_separationL l).continuousOn (continuous_separationR hl).continuousOn] + apply norm_mul_cfc_initial_le X _ ((continuous_separationL l).mul (continuous_separationR hl)) (by positivity) + intro s hs + have h := separation_mixed_R_square_bound hl (spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs) + change s * (separationL l s * separationR l s)^2 ≤ (3*l)^2 + nlinarith + +lemma norm_separation_mixedV (X : B) {l : ℝ} (hl : 0 < l) : + ‖cfc (separationV l) (star X*X)*(star X*X)*cfc (separationL l) (star X*X)‖ ≤ 3*l := by + have he : cfc (separationV l) (star X*X)*(star X*X)*cfc (separationL l) (star X*X)= + cfc (fun s => s*separationV l s*separationL l s) (star X*X) := by + rw [(Commute.refl (star X*X)).cfc_real (separationV l) |>.eq] + conv_lhs => lhs; lhs; rw [← cfc_id' ℝ (star X*X) (IsSelfAdjoint.star_mul_self X)] + exact cfc_real_mul_three _ (IsSelfAdjoint.star_mul_self X) (fun s => s) _ _ continuous_id + (continuous_separationV hl) (continuous_separationL l) + rw [he] + apply norm_cfc_le (by positivity) + intro s hs + have hs0 := spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs + rw [Real.norm_eq_abs,abs_of_nonneg (mul_nonneg (mul_nonneg hs0 (separationV_nonneg hl s)) + (separationL_bounds l s).1)] + have h := separation_mixed_V_square_bound hl hs0 + nlinarith [mul_nonneg (mul_nonneg hs0 (separationV_nonneg hl s)) (separationL_bounds l s).1] + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PolynomialCompression.lean b/lean/OAI/Analysis/WeakInfiniteness/PolynomialCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..c09261f8b6940fd0d054e70f08853ea9df1abc06 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PolynomialCompression.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UniversalFreeEmbedding +import OAI.Analysis.WeakInfiniteness.WordCompression + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +noncomputable def operatorLetters {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (T : H →L[ℂ] H) : + Bool → H →L[ℂ] H := fun i => if i then T else star T + +noncomputable def universalWord : List Bool → UniversalContraction + | [] => 1 + | i :: w => (if i then universalContractionGenerator else star universalContractionGenerator) * + universalWord w + +@[simp] +lemma contractionEvaluation_word (π : ContractionRepresentation) (w : List Bool) : + contractionEvaluation π (universalWord w) = wordEval (operatorLetters π.operator) w := by + induction w with + | nil => rfl + | cons i w ih => + cases i <;> simp [universalWord, wordEval, operatorLetters, ih, + ContinuousLinearMap.mul_def] + +noncomputable def universalPolynomial (s : Finset (List Bool)) (a : List Bool → ℂ) : + UniversalContraction := ∑ w ∈ s, a w • universalWord w + +noncomputable def polynomialOperator {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (s : Finset (List Bool)) + (a : List Bool → ℂ) (T : H →L[ℂ] H) : H →L[ℂ] H := + ∑ w ∈ s, a w • wordEval (operatorLetters T) w + +@[simp] +lemma contractionEvaluation_polynomial (π : ContractionRepresentation) + (s : Finset (List Bool)) (a : List Bool → ℂ) : + contractionEvaluation π (universalPolynomial s a) = polynomialOperator s a π.operator := by + simp [universalPolynomial, polynomialOperator] + +lemma norm_universalPolynomial_le_iff (s : Finset (List Bool)) (a : List Bool → ℂ) + {C : ℝ} (hC : 0 ≤ C) : + ‖universalPolynomial s a‖ ≤ C ↔ + ∀ π : ContractionRepresentation, ‖polynomialOperator s a π.operator‖ ≤ C := by + constructor + · intro h π + rw [← contractionEvaluation_polynomial] + exact (NonUnitalStarAlgHom.norm_apply_le (contractionEvaluation π).toNonUnitalStarAlgHom _).trans h + · intro h + change ‖((universalPolynomial s a).val : ContractionAmbient)‖ ≤ C + apply lp.norm_le_of_forall_le hC + intro π + change ‖contractionEvaluation π (universalPolynomial s a)‖ ≤ C + rw [contractionEvaluation_polynomial] + exact h π + +section PolynomialCompression + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma operatorLetters_compress (K : Submodule ℂ H) [CompleteSpace K] + (T : H →L[ℂ] H) (i : Bool) : + operatorLetters (compress K T) i = compress K (operatorLetters T i) := by + cases i + · exact adjoint_compress K T + · rfl + +lemma polynomialOperator_compression_exact (s : Finset (List Bool)) (a : List Bool → ℂ) + (T : H →L[ℂ] H) (ξ : H) : + let m := s.sup List.length + let K := wordSpace (operatorLetters T) (fun _ : Unit => ξ) m + let ξ₀ : K := ⟨ξ, testVector_mem_wordSpace _ _ _ ()⟩ + (polynomialOperator s a (compress K T) ξ₀ : H) = polynomialOperator s a T ξ := by + dsimp only + let m := s.sup List.length + let K := wordSpace (operatorLetters T) (fun _ : Unit => ξ) m + let ξ₀ : K := ⟨ξ, testVector_mem_wordSpace _ _ _ ()⟩ + change K.subtypeL (polynomialOperator s a (compress K T) ξ₀) = _ + simp only [polynomialOperator, sum_apply, FunLike.coe_smul, + Pi.smul_apply, map_sum, map_smul] + apply Finset.sum_congr rfl + intro w hw + congr 1 + have he : operatorLetters (compress K T) = fun i => compress K (operatorLetters T i) := by + funext i + exact operatorLetters_compress K T i + rw [he] + exact wordSpace_compression_exact (operatorLetters T) (fun _ : Unit => ξ) m w + (Finset.le_sup hw) () + +lemma norm_universalPolynomial_le_of_finite_tests + (s : Finset (List Bool)) (a : List Bool → ℂ) {C : ℝ} (hC : 0 ≤ C) + (h : ∀ π : ContractionRepresentation, FiniteDimensional ℂ π.hilbert → + ‖polynomialOperator s a π.operator‖ ≤ C) : + ‖universalPolynomial s a‖ ≤ C := by + apply (norm_universalPolynomial_le_iff s a hC).mpr + intro π + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro ξ + by_cases hξ : ξ = 0 + · simp [hξ] + let m := s.sup List.length + let K := wordSpace (operatorLetters π.operator) (fun _ : Unit => ξ) m + let : Nontrivial K := ⟨⟨⟨ξ, testVector_mem_wordSpace _ _ _ ()⟩, 0, + fun he => hξ (congrArg Subtype.val he)⟩⟩ + let π₀ : ContractionRepresentation := + { hilbert := { Carrier := K } + operator := compress K π.operator + norm_operator_le_one := (norm_compress_le K π.operator).trans π.norm_operator_le_one } + let ξ₀ : K := ⟨ξ, testVector_mem_wordSpace _ _ _ ()⟩ + have he : (polynomialOperator s a π₀.operator ξ₀ : π.hilbert) = + polynomialOperator s a π.operator ξ := polynomialOperator_compression_exact s a π.operator ξ + rw [← he] + exact (ContinuousLinearMap.le_opNorm (polynomialOperator s a π₀.operator) ξ₀).trans + (mul_le_mul_of_nonneg_right (h π₀ inferInstance) (norm_nonneg ξ₀)) + +end PolynomialCompression + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PolynomialSpan.lean b/lean/OAI/Analysis/WeakInfiniteness/PolynomialSpan.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d0fa1e0c3129c95383c099dfc11d32e502984e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PolynomialSpan.lean @@ -0,0 +1,137 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UniversalMapping + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +variable {A : Type*} [CStarAlgebra A] + +lemma algebraWord_append (x : A) (w z : List Bool) : + algebraWord x (w ++ z) = algebraWord x w * algebraWord x z := by + induction w with + | nil => simp [algebraWord] + | cons i w ih => simp [algebraWord, ih, mul_assoc] + +def wordMonoid (x : A) : Submonoid A where + carrier := Set.range (algebraWord x) + one_mem' := ⟨[], rfl⟩ + mul_mem' := by + rintro _ _ ⟨w,rfl⟩ ⟨z,rfl⟩ + exact ⟨w++z, algebraWord_append x w z⟩ + +lemma adjoin_le_wordSpan (x : A) : + (StarAlgebra.adjoin ℂ {x}).toSubalgebra.toSubmodule ≤ + Submodule.span ℂ (Set.range (algebraWord x)) := by + rw [StarAlgebra.adjoin_eq_span] + apply Submodule.span_mono + change Submonoid.closure ({x} ∪ star {x}) ≤ wordMonoid x + apply Submonoid.closure_le.mpr + intro y hy + have hy' : y = x ∨ star y = x := by simpa using hy + rcases hy' with rfl | he + · exact ⟨[true], by simp [algebraWord]⟩ + · exact ⟨[false], by simp [algebraWord, ← he]⟩ + +lemma exists_polynomial_of_mem_adjoin (x y : A) (hy : y ∈ StarAlgebra.adjoin ℂ {x}) : + ∃ c : List Bool →₀ ℂ, algebraPolynomial x c = y := + Finsupp.mem_span_range_iff_exists_finsupp.mp (adjoin_le_wordSpan x hy) + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma universal_graph_bound (v : B) (hv : ‖v‖ ≤ 1) + (z : UniversalContraction × B) + (hz : z ∈ closedStarSpan {(universalContractionGenerator, v)}) : + ‖z.2‖ ≤ ‖z.1‖ := by + change z ∈ {z : UniversalContraction × B | ‖z.2‖ ≤ ‖z.1‖} + apply closure_minimal (s := (StarAlgebra.adjoin ℂ {(universalContractionGenerator, v)} : Set _)) ?_ ?_ hz + · intro z hz + obtain ⟨c, rfl⟩ := exists_polynomial_of_mem_adjoin _ _ hz + change ‖(StarAlgHom.snd ℂ UniversalContraction B) (algebraPolynomial _ c)‖ ≤ + ‖(StarAlgHom.fst ℂ UniversalContraction B) (algebraPolynomial _ c)‖ + rw [map_algebraPolynomial, map_algebraPolynomial] + exact norm_algebraPolynomial_le_universal v hv c + · exact isClosed_le (continuous_norm.comp continuous_snd) (continuous_norm.comp continuous_fst) + +def universalGraph (v : B) : StarSubalgebra ℂ (UniversalContraction × B) := + closedStarSpan {(universalContractionGenerator, v)} + +instance universalGraphCStar (v : B) : CStarAlgebra (universalGraph v) := closedStarSpanCStar _ + +def universalGraphFirst (v : B) : universalGraph v →⋆ₐ[ℂ] UniversalContraction := + (StarAlgHom.fst ℂ UniversalContraction B).comp (universalGraph v).subtype + +lemma universalGraphFirst_isometry (v : B) (hv : ‖v‖ ≤ 1) : + Isometry (universalGraphFirst v) := by + apply AddMonoidHomClass.isometry_of_norm + intro z + change ‖z.val.1‖ = ‖z.val‖ + rw [Prod.norm_def, max_eq_left (universal_graph_bound v hv z.val z.property)] + +lemma universalGraphFirst_surjective (v : B) (hv : ‖v‖ ≤ 1) : + Function.Surjective (universalGraphFirst v) := by + let : CompleteSpace (universalGraph v) := (closedStarSpan_closed _).completeSpace_coe + let φ := universalGraphFirst v + let S := φ.range.map universalContractionSubalgebra.subtype + have hS : IsClosed (S : Set ContractionAmbient) := by + have hi : Isometry (universalContractionSubalgebra.subtype.comp φ) := + (isometry_subtype_coe).comp (universalGraphFirst_isometry v hv) + have he : (S : Set ContractionAmbient) = Set.range (universalContractionSubalgebra.subtype.comp φ) := by + ext x + simp only [S] + change (∃ y, (∃ z, φ z = y) ∧ _ = x) ↔ ∃ z, _ = x + constructor + · rintro ⟨y, ⟨z,rfl⟩, rfl⟩; exact ⟨z,rfl⟩ + · rintro ⟨z,rfl⟩; exact ⟨φ z, ⟨z,rfl⟩, rfl⟩ + rw [he] + exact hi.isClosedEmbedding.isClosed_range + have hgen : universalOperator ∈ S := by + refine ⟨universalContractionGenerator, ?_, rfl⟩ + exact ⟨⟨(universalContractionGenerator, v), subset_closedStarSpan _ (Set.mem_singleton _)⟩,rfl⟩ + have hs : universalContractionSubalgebra ≤ S := + closedStarSpan_le {universalOperator} S hS (Set.singleton_subset_iff.mpr hgen) + intro x + obtain ⟨y,hy,hey⟩ := hs x.property + obtain ⟨z,hz⟩ := hy + refine ⟨z, ?_⟩ + apply Subtype.ext + exact (congrArg (fun y : UniversalContraction => y.val) hz).trans hey + +def universalContractionMap (v : B) (hv : ‖v‖ ≤ 1) : UniversalContraction →⋆ₐ[ℂ] B := + ((StarAlgHom.snd ℂ UniversalContraction B).comp (universalGraph v).subtype).comp + (StarAlgEquiv.ofBijective (universalGraphFirst v) + ⟨(universalGraphFirst_isometry v hv).injective, universalGraphFirst_surjective v hv⟩).symm.toStarAlgHom + +@[simp] lemma universalContractionMap_generator (v : B) (hv : ‖v‖ ≤ 1) : + universalContractionMap v hv universalContractionGenerator = v := by + let z : universalGraph v := + ⟨(universalContractionGenerator, v), subset_closedStarSpan _ (Set.mem_singleton _)⟩ + let e := StarAlgEquiv.ofBijective (universalGraphFirst v) + ⟨(universalGraphFirst_isometry v hv).injective, universalGraphFirst_surjective v hv⟩ + have he : e z = universalContractionGenerator := rfl + change (e.symm universalContractionGenerator).val.2 = v + rw [← he, StarAlgEquiv.symm_apply_apply] + +@[simp] lemma universalContractionMap_polynomial (v : B) (hv : ‖v‖ ≤ 1) + (c : List Bool →₀ ℂ) : + universalContractionMap v hv (algebraPolynomial universalContractionGenerator c) = + algebraPolynomial v c := by + rw [map_algebraPolynomial, universalContractionMap_generator] + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PrimitiveCompactness.lean b/lean/OAI/Analysis/WeakInfiniteness/PrimitiveCompactness.lean new file mode 100644 index 0000000000000000000000000000000000000000..f486d7f6cfc39ec020b2bf931ca56ece83f834e0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PrimitiveCompactness.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.StatePullback + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +universe u v w + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_state_annihilating_family {ι : Type w} (x : ι → A) (b : selfAdjoint A) (α : ℝ) + (h : ∀ F : Finset ι,∃ f ∈ realStateSpace A,α ≤ f b ∧ + ∀ i ∈ F,∀ a : A,f ⟨star (x i*a)*(x i*a),(star_mul_self_nonneg (x i*a)).isSelfAdjoint⟩=0) : + ∃ f ∈ annihilatorStates (Set.range x), α ≤ f b := by + let C := {f ∈ realStateSpace A | α ≤ f b} + let T : ι → Set (WeakDual ℝ (selfAdjoint A)) := fun i => + {f | ∀ a : A,f ⟨star (x i*a)*(x i*a),(star_mul_self_nonneg (x i*a)).isSelfAdjoint⟩=0} + have hC : IsCompact C := (realStateSpace_isCompact A).inter_right + (isClosed_le continuous_const (WeakDual.eval_continuous b)) + have hT : ∀ i,IsClosed (T i) := by + intro i + simp only [T,Set.ofPred_forall] + exact isClosed_iInter (fun a => isClosed_eq (WeakDual.eval_continuous _) continuous_const) + obtain ⟨f,hfC,hfT⟩ := hC.inter_iInter_nonempty T hT (by + intro F + obtain ⟨g,hg,hgb,hgT⟩ := h F + refine ⟨g,⟨hg,hgb⟩,?_⟩ + simpa only [Set.mem_iInter,T,Set.mem_ofPred_eq] using hgT) + refine ⟨f,⟨hfC.1,?_⟩,hfC.2⟩ + rintro _ ⟨i,rfl⟩ a + exact (Set.mem_iInter.mp hfT i) a + +theorem finite_norm_support_cover {ι : Type w} (x : ι → A) (b : A) (hb : 0 ≤ b) + (α : ℝ) (hα : 0 < α) + (hcover : ∀ (f : WeakDual ℝ (selfAdjoint A)) (hf : f ∈ (realStateSpace A).extremePoints ℝ), + α ≤ ‖(realStateComplexification f hf.1).gnsStarAlgHom b‖ → + ∃ i, (realStateComplexification f hf.1).gnsStarAlgHom (x i) ≠ 0) : + ∃ F : Finset ι,∀ (H : Type v) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)),α ≤ ‖π b‖ → ∃ i ∈ F,π (x i) ≠ 0 := by + classical + by_contra! hn + have hfinite : ∀ F : Finset ι,∃ f ∈ realStateSpace A,α ≤ f ⟨b,hb.isSelfAdjoint⟩ ∧ + ∀ i ∈ F,∀ a : A,f ⟨star (x i*a)*(x i*a),(star_mul_self_nonneg (x i*a)).isSelfAdjoint⟩=0 := by + intro F + obtain ⟨H,hH,hI,hC,π,hπ,hF⟩ := hn F + have hbn : π b ≠ 0 := by + intro hz + rw [hz,norm_zero] at hπ + exact (not_le_of_gt hα) hπ + let : Nontrivial (H →L[ℂ] H) := nontrivial_of_ne (π b) 0 hbn + obtain ⟨f,hf,hfb⟩ := exists_annihilator_norming_pullback π (x '' (F : Set ι)) + (by rintro _ ⟨i,hi,rfl⟩; exact hF i hi) b hb + refine ⟨f,hf.1,by rwa [hfb],?_⟩ + intro i hi a + exact hf.2 (x i) ⟨i,hi,rfl⟩ a + obtain ⟨g,hg,hgb⟩ := exists_state_annihilating_family x ⟨b,hb.isSelfAdjoint⟩ α hfinite + obtain ⟨f,hf,hfS,hfb⟩ := exists_extreme_annihilator_state hg ⟨b,hb.isSelfAdjoint⟩ + let Φ := realStateComplexification f hf.1 + have he : f ⟨b,hb.isSelfAdjoint⟩ ≤ ‖Φ.gnsStarAlgHom b‖ := by + let Ω := gnsCyclicVector Φ + have hΩ : ‖Ω‖=1 := norm_gnsCyclicVector Φ (realStateComplexification_one f hf.1) + have hv := DFunLike.congr_fun (gns_vectorFunctional_eq f hf.1) ⟨b,hb.isSelfAdjoint⟩ + change (inner ℂ Ω (Φ.gnsStarAlgHom b Ω)).re=f ⟨b,hb.isSelfAdjoint⟩ at hv + calc + _ = (inner ℂ Ω (Φ.gnsStarAlgHom b Ω)).re := hv.symm + _ ≤ ‖inner ℂ Ω (Φ.gnsStarAlgHom b Ω)‖ := Complex.re_le_norm _ + _ ≤ ‖Ω‖*‖Φ.gnsStarAlgHom b Ω‖ := norm_inner_le_norm _ _ + _ ≤ ‖Ω‖*(‖Φ.gnsStarAlgHom b‖*‖Ω‖) := by + gcongr; exact ContinuousLinearMap.le_opNorm _ _ + _ = ‖Φ.gnsStarAlgHom b‖ := by rw [hΩ,one_mul,mul_one] + obtain ⟨i,hi⟩ := hcover f hf (hgb.trans (hfb.trans he)) + exact hi (annihilatorStates_gns_zero hfS ⟨i,rfl⟩) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PrimitiveIdealTest.lean b/lean/OAI/Analysis/WeakInfiniteness/PrimitiveIdealTest.lean new file mode 100644 index 0000000000000000000000000000000000000000..291aad42fab509b60ffd88967445596747c8edf5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PrimitiveIdealTest.lean @@ -0,0 +1,119 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CyclicOrbit +import OAI.Analysis.WeakInfiniteness.IdealSeparation +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology ComplexOrder InnerProductSpace CStarAlgebra + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def unitizationClosedIdeal (I : NonUnitalStarSubalgebra ℂ A) : + NonUnitalStarSubalgebra ℂ (Unitization ℂ A) where + carrier := {x | x.fst=0 ∧ x.snd ∈ I} + zero_mem' := ⟨rfl,I.zero_mem⟩ + add_mem' := by + intro x y hx hy + exact ⟨by simp only [Unitization.fst_add,hx.1,hy.1,add_zero],I.add_mem hx.2 hy.2⟩ + smul_mem' := by + intro c x hx + exact ⟨by simp only [Unitization.fst_smul,hx.1,smul_zero],I.smul_mem c hx.2⟩ + mul_mem' := by + intro x y hx hy + refine ⟨by simp only [Unitization.fst_mul,hx.1,zero_mul],?_⟩ + simp only [Unitization.snd_mul,hx.1,hy.1,zero_smul,zero_add] + exact I.mul_mem hx.2 hy.2 + star_mem' := by + intro x hx + exact ⟨by simp only [Unitization.fst_star,hx.1,star_zero],star_mem hx.2⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma unitizationClosedIdeal_isClosed (I : NonUnitalStarSubalgebra ℂ A) + (hI : IsClosed (I : Set A)) : IsClosed (unitizationClosedIdeal I : Set (Unitization ℂ A)) := + (isClosed_eq Unitization.continuous_fst continuous_const).inter + (hI.preimage Unitization.continuous_snd) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma unitizationClosedIdeal_mul_left (I : NonUnitalStarSubalgebra ℂ A) + (hIL : ∀ x ∈ I,∀ a : A,a*x ∈ I) {x : Unitization ℂ A} + (hx : x ∈ unitizationClosedIdeal I) (a : Unitization ℂ A) : + a*x ∈ unitizationClosedIdeal I := by + refine ⟨by simp only [Unitization.fst_mul,hx.1,mul_zero],?_⟩ + simp only [Unitization.snd_mul,hx.1,zero_smul,add_zero] + exact I.add_mem (I.smul_mem a.fst hx.2) (hIL x.snd hx.2 a.snd) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma unitizationClosedIdeal_mul_right (I : NonUnitalStarSubalgebra ℂ A) + (hIR : ∀ x ∈ I,∀ a : A,x*a ∈ I) {x : Unitization ℂ A} + (hx : x ∈ unitizationClosedIdeal I) (a : Unitization ℂ A) : + x*a ∈ unitizationClosedIdeal I := by + refine ⟨by simp only [Unitization.fst_mul,hx.1,zero_mul],?_⟩ + simp only [Unitization.snd_mul,hx.1,zero_smul,zero_add] + exact I.add_mem (I.smul_mem a.fst hx.2) (hIR x.snd hx.2 a.snd) + +theorem exists_irreducible_separating_closed_ideal + (I : NonUnitalStarSubalgebra ℂ A) (hI : IsClosed (I : Set A)) + (hIL : ∀ x ∈ I,∀ a : A,a*x ∈ I) (hIR : ∀ x ∈ I,∀ a : A,x*a ∈ I) + {b : A} (hb : 0 ≤ b) (hbI : b ∉ I) : + ∃ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π ∧ (∀ x ∈ I,π x=0) ∧ π b ≠ 0 := by + let J := unitizationClosedIdeal I + let u : Unitization ℂ A := (b : Unitization ℂ A) + have hu : 0 ≤ u := map_nonneg (Unitization.inrNonUnitalStarAlgHom ℂ A) hb + have huJ : u ∉ J := fun h => hbI h.2 + obtain ⟨g,hg,hgb⟩ := exists_annihilator_state_of_not_mem J + (unitizationClosedIdeal_isClosed I hI) + (fun x hx a => unitizationClosedIdeal_mul_left I hIL hx a) + (fun x hx a => unitizationClosedIdeal_mul_right I hIR hx a) hu huJ + obtain ⟨f,hf,hfJ,hgf⟩ := exists_extreme_annihilator_state hg ⟨u,hu.isSelfAdjoint⟩ + let Φ := realStateComplexification f hf.1 + let π := Φ.gnsStarAlgHom.toNonUnitalStarAlgHom.comp (Unitization.inrNonUnitalStarAlgHom ℂ A) + let H : ComplexHilbert.{u} := { Carrier := Φ.GNS } + refine ⟨H,π,irreducible_restrict_unitization Φ.gnsStarAlgHom + (extreme_real_state_gns_irreducible f hf),?_,?_⟩ + · intro x hx + exact annihilatorStates_gns_zero hfJ (show (x : Unitization ℂ A) ∈ J from ⟨rfl,hx⟩) + · intro hz + have he := DFunLike.congr_fun (gns_vectorFunctional_eq f hf.1) ⟨u,hu.isSelfAdjoint⟩ + change (inner ℂ (gnsCyclicVector Φ) (Φ.gnsStarAlgHom u (gnsCyclicVector Φ))).re = + f ⟨u,hu.isSelfAdjoint⟩ at he + change Φ.gnsStarAlgHom u=0 at hz + rw [hz,zero_apply,inner_zero_right,Complex.zero_re] at he + linarith + +theorem mem_closed_ideal_of_irreducible_test + (I : NonUnitalStarSubalgebra ℂ A) (hI : IsClosed (I : Set A)) + (hIL : ∀ x ∈ I,∀ a : A,a*x ∈ I) (hIR : ∀ x ∈ I,∀ a : A,x*a ∈ I) + {b : A} (hb : 0 ≤ b) + (htest : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → (∀ x ∈ I,π x=0) → π b=0) : b ∈ I := by + by_contra hn + obtain ⟨H,π,hπ,hπI,hπb⟩ := exists_irreducible_separating_closed_ideal I hI hIL hIR hb hn + exact hπb (htest H π hπ hπI) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ProductRepresentation.lean b/lean/OAI/Analysis/WeakInfiniteness/ProductRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9d2c6d5dcc9eb48997330f8611e0139f36d266c --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ProductRepresentation.lean @@ -0,0 +1,94 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +universe u v + +section ProductRepresentation + +variable {ι : Type u} {H : ι → Type v} + [∀ i, NormedAddCommGroup (H i)] [∀ i, InnerProductSpace ℂ (H i)] + [∀ i, CompleteSpace (H i)] + +lemma mem_l2_productAction (T : lp (fun i => H i →L[ℂ] H i) ∞) (ξ : lp H 2) : + Memℓp (fun i => T i (ξ i)) 2 := by + apply (ξ.property.const_smul (‖T‖ : ℂ)).mono' + intro i + change ‖T i (ξ i)‖ ≤ ‖(‖T‖ : ℂ) • (ξ i)‖ + rw [norm_smul, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (norm_nonneg T)] + exact (T i).le_opNorm (ξ i) |>.trans + (mul_le_mul_of_nonneg_right (lp.norm_apply_le_norm ENNReal.top_ne_zero T i) (norm_nonneg _)) + +def productAction (T : lp (fun i => H i →L[ℂ] H i) ∞) : lp H 2 →L[ℂ] lp H 2 := + LinearMap.mkContinuous + { toFun ξ := ⟨fun i => T i (ξ i), mem_l2_productAction T ξ⟩ + map_add' ξ η := by ext i; exact map_add (T i) _ _ + map_smul' c ξ := by ext i; exact map_smul (T i) _ _ } + ‖T‖ (by + intro ξ + calc + _ ≤ ‖(‖T‖ : ℂ) • ξ‖ := lp.norm_mono (by norm_num) (by + intro i + simp only [lp.coeFn_smul, Pi.smul_apply, norm_smul, Complex.norm_real, + Real.norm_eq_abs, abs_of_nonneg (norm_nonneg T)] + exact ((T i).le_opNorm (ξ i)).trans + (mul_le_mul_of_nonneg_right (lp.norm_apply_le_norm ENNReal.top_ne_zero T i) + (norm_nonneg _))) + _ = ‖(‖T‖ : ℂ)‖ * ‖ξ‖ := norm_smul _ _ + _ = ‖T‖ * ‖ξ‖ := by rw [Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (norm_nonneg T)]) + +@[simp] lemma productAction_apply (T : lp (fun i => H i →L[ℂ] H i) ∞) + (ξ : lp H 2) (i : ι) : productAction T ξ i = T i (ξ i) := rfl + +lemma productAction_star (T : lp (fun i => H i →L[ℂ] H i) ∞) : + productAction (star T) = star (productAction T) := by + apply ContinuousLinearMap.ext + intro ξ + apply ext_inner_left ℂ + intro η + rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right] + change (∑' i, inner ℂ (η i) (star (T i) (ξ i))) = + ∑' i, inner ℂ (T i (η i)) (ξ i) + apply tsum_congr + intro i + rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right] + +def productRepresentation : lp (fun i => H i →L[ℂ] H i) ∞ →⋆ₙₐ[ℂ] (lp H 2 →L[ℂ] lp H 2) where + toFun := productAction + map_zero' := by ext ξ i; simp + map_add' S T := by ext ξ i; rfl + map_mul' S T := by ext ξ i; rfl + map_smul' c T := by ext ξ i; rfl + map_star' := productAction_star + +lemma productRepresentation_injective : Function.Injective (productRepresentation (H := H)) := by + classical + intro S T h + apply Subtype.ext + funext i + apply ContinuousLinearMap.ext + intro ξ + have he := congrArg (fun F : lp H 2 →L[ℂ] lp H 2 => F (lp.single 2 i ξ) i) h + change (productAction S (lp.single 2 i ξ)) i = (productAction T (lp.single 2 i ξ)) i at he + simpa only [productAction_apply, lp.single_apply_self] using he + +end ProductRepresentation + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PureIrreducible.lean b/lean/OAI/Analysis/WeakInfiniteness/PureIrreducible.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2da982502bd3af440059180a96a3da727cde58b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PureIrreducible.lean @@ -0,0 +1,115 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.InvariantSubspaces + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +variable {A H : Type*} [CStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +lemma RepresentationInvariant.eq_bot_of_projected_cyclic_zero + {π : A →⋆ₐ[ℂ] (H →L[ℂ] H)} {S : Submodule ℂ H} [S.HasOrthogonalProjection] + (hS : RepresentationInvariant π S) (Ω : H) + (hd : DenseRange (fun a : A => π a Ω)) (hΩ : S.starProjection Ω=0) : S=⊥ := by + have hzero : ∀ x : H,S.starProjection x=0 := isClosed_property hd + (isClosed_eq S.starProjection.continuous continuous_const) (by + intro a + rw [hS.projection_commutes,hΩ,map_zero]) + apply le_antisymm + · intro x hx + rw [Submodule.mem_bot] + rw [← S.starProjection_eq_self_iff.mpr hx] + exact hzero x + · exact bot_le + +variable [PartialOrder A] [StarOrderedRing A] + +theorem irreducible_of_extreme_cyclic_vector_state + (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (Ω : H) (hΩ : ‖Ω‖=1) + (hd : DenseRange (fun a : A => π a Ω)) + (hf : StrongDual.toWeakDual (representationVectorFunctional π Ω) ∈ + (realStateSpace A).extremePoints ℝ) : RepresentationIrreducible π := by + intro S hSc hS + let : CompleteSpace S := hSc.isComplete.completeSpace_coe + by_cases h0 : S.starProjection Ω=0 + · exact Or.inl (hS.eq_bot_of_projected_cyclic_zero Ω hd h0) + by_cases h1 : Sᗮ.starProjection Ω=0 + · right + have he : Sᗮ=⊥ := hS.orthogonal.eq_bot_of_projected_cyclic_zero Ω hd h1 + have he' := congrArg Submodule.orthogonal he + simpa using he' + exfalso + let t : ℝ := ‖S.starProjection Ω‖^2 + let s : ℝ := ‖Sᗮ.starProjection Ω‖^2 + have ht : 0 < t := sq_pos_of_pos (norm_pos_iff.mpr h0) + have hs : 0 < s := sq_pos_of_pos (norm_pos_iff.mpr h1) + have hts : t+s=1 := by + have h := Submodule.norm_sq_eq_add_norm_sq_starProjection Ω S + rw [hΩ,one_pow] at h + exact h.symm + let g := StrongDual.toWeakDual (t⁻¹ • representationVectorFunctional π (S.starProjection Ω)) + let k := StrongDual.toWeakDual (s⁻¹ • representationVectorFunctional π (Sᗮ.starProjection Ω)) + have hg : g ∈ realStateSpace A := normalized_vector_mem_realStateSpace π h0 + have hk : k ∈ realStateSpace A := normalized_vector_mem_realStateSpace π h1 + have hsum : t • g+s • k=StrongDual.toWeakDual (representationVectorFunctional π Ω) := by + apply DFunLike.ext + intro b + change t*(t⁻¹*representationVectorFunctional π (S.starProjection Ω) b)+ + s*(s⁻¹*representationVectorFunctional π (Sᗮ.starProjection Ω) b)= + representationVectorFunctional π Ω b + rw [← mul_assoc t, mul_inv_cancel₀ ht.ne',one_mul, + ← mul_assoc s,mul_inv_cancel₀ hs.ne',one_mul] + exact (DFunLike.congr_fun (hS.vectorFunctional_decomposition Ω) b).symm + have hgf : g=StrongDual.toWeakDual (representationVectorFunctional π Ω) := + hf.2 hg hk ⟨t,s,ht,hs,hts,hsum⟩ + have hnorm : ∀ x : H,‖S.starProjection x‖^2=t*‖x‖^2 := by + apply isClosed_property hd (isClosed_eq (by fun_prop) (by fun_prop)) + intro a + have he := DFunLike.congr_fun hgf + ⟨star a*a,(star_mul_self_nonneg a).isSelfAdjoint⟩ + change t⁻¹*representationVectorFunctional π (S.starProjection Ω) + ⟨star a*a,(star_mul_self_nonneg a).isSelfAdjoint⟩= + representationVectorFunctional π Ω ⟨star a*a,(star_mul_self_nonneg a).isSelfAdjoint⟩ at he + rw [representationVectorFunctional_square,representationVectorFunctional_square] at he + rw [hS.projection_commutes] + have hem := congrArg (fun r : ℝ => t*r) he + rw [← mul_assoc,mul_inv_cancel₀ ht.ne',one_mul] at hem + exact hem + have he := hnorm (S.starProjection Ω) + rw [S.starProjection_eq_self_iff.mpr (S.starProjection_apply_mem Ω)] at he + change t=t*t at he + nlinarith + +theorem extreme_real_state_gns_irreducible + (f : WeakDual ℝ (selfAdjoint A)) (hf : f ∈ (realStateSpace A).extremePoints ℝ) : + RepresentationIrreducible (realStateComplexification f hf.1).gnsStarAlgHom := by + let Φ := realStateComplexification f hf.1 + apply irreducible_of_extreme_cyclic_vector_state Φ.gnsStarAlgHom (gnsCyclicVector Φ) + · exact norm_gnsCyclicVector Φ (realStateComplexification_one f hf.1) + · exact gnsAction_cyclic_dense Φ + · rwa [gns_vectorFunctional_eq] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/PureStates.lean b/lean/OAI/Analysis/WeakInfiniteness/PureStates.lean new file mode 100644 index 0000000000000000000000000000000000000000..37e7c032d695c4a05c5ee6ed75777afea12d56b7 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/PureStates.lean @@ -0,0 +1,123 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.States + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology ComplexOrder + +section States + +variable (A : Type*) [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def realStateSpace : Set (WeakDual ℝ (selfAdjoint A)) := + {f | ‖WeakDual.toStrongDual f‖ ≤ 1 ∧ f 1=1} + +omit [PartialOrder A] [StarOrderedRing A] in +lemma realStateSpace_isCompact : IsCompact (realStateSpace A) := by + have h := (WeakDual.isCompact_closedBall (0 : StrongDual ℝ (selfAdjoint A)) 1).inter_right + (isClosed_eq (WeakDual.eval_continuous (1 : selfAdjoint A)) + (continuous_const : Continuous (fun _ : WeakDual ℝ (selfAdjoint A) => (1 : ℝ)))) + convert h using 1 + ext f + change (‖WeakDual.toStrongDual f‖ ≤ 1 ∧ f 1=1) ↔ + (dist (WeakDual.toStrongDual f) 0 ≤ 1 ∧ f 1=1) + have hd := dist_zero_right (WeakDual.toStrongDual f) + rw [hd] + +variable {A} + +def realStateEvaluation (b : selfAdjoint A) : WeakDual ℝ (selfAdjoint A) →L[ℝ] ℝ where + toFun f := f b + map_add' _ _ := rfl + map_smul' _ _ := rfl + cont := WeakDual.eval_continuous b + +omit [PartialOrder A] [StarOrderedRing A] in +lemma realState_le_norm {f : WeakDual ℝ (selfAdjoint A)} (hf : f ∈ realStateSpace A) + (b : selfAdjoint A) : f b ≤ ‖b‖ := by + calc + f b ≤ ‖f b‖ := Real.le_norm_self _ + _ ≤ ‖WeakDual.toStrongDual f‖*‖b‖ := (WeakDual.toStrongDual f).le_opNorm _ + _ ≤ 1*‖b‖ := mul_le_mul_of_nonneg_right hf.1 (norm_nonneg _) + _ = ‖b‖ := one_mul _ + +lemma exists_norming_real_state [Nontrivial A] (b : A) (hb : 0 ≤ b) : + ∃ f ∈ realStateSpace A,f ⟨b,hb.isSelfAdjoint⟩=‖b‖ := by + let b' : selfAdjoint A := ⟨b,hb.isSelfAdjoint⟩ + have hn : ‖b'+1‖=‖b‖+1 := norm_add_one_of_nonneg b hb + obtain ⟨f,hf,hfb⟩ := exists_dual_vector ℝ (b'+1) (by rw [hn]; positivity) + have hf1 : f 1 ≤ 1 := calc + f 1 ≤ ‖f 1‖ := Real.le_norm_self _ + _ ≤ ‖f‖*‖(1 : selfAdjoint A)‖ := f.le_opNorm _ + _ = 1 := by rw [hf]; change 1*‖(1 : A)‖=1; simp + have hfb' : f b' ≤ ‖b‖ := calc + f b' ≤ ‖f b'‖ := Real.le_norm_self _ + _ ≤ ‖f‖*‖b'‖ := f.le_opNorm _ + _ = ‖b‖ := by rw [hf,one_mul]; rfl + rw [map_add,hn] at hfb + change f b'+f 1=‖b‖+1 at hfb + have hfone : f 1=1 := by linarith + have hfnorm : f b'=‖b‖ := by linarith + refine ⟨f,⟨hf.le,hfone⟩,hfnorm⟩ + +theorem exists_extreme_norming_real_state [Nontrivial A] (b : A) (hb : 0 ≤ b) : + ∃ f ∈ (realStateSpace A).extremePoints ℝ,f ⟨b,hb.isSelfAdjoint⟩=‖b‖ := by + let b' : selfAdjoint A := ⟨b,hb.isSelfAdjoint⟩ + let S := {f ∈ realStateSpace A | ∀ g ∈ realStateSpace A,g b' ≤ f b'} + have hexposed : IsExposed ℝ (realStateSpace A) S := by + intro _ + exact ⟨realStateEvaluation b',rfl⟩ + obtain ⟨g,hg,hgb⟩ := exists_norming_real_state b hb + have hS : S.Nonempty := by + refine ⟨g,hg,?_⟩ + intro k hk + rw [hgb] + exact realState_le_norm hk b' + let : LocallyConvexSpace ℝ (WeakDual ℝ (selfAdjoint A)) := + inferInstanceAs (LocallyConvexSpace ℝ (WeakBilin (topDualPairing ℝ (selfAdjoint A)))) + obtain ⟨f,hf⟩ := (hexposed.isCompact (realStateSpace_isCompact A)).extremePoints_nonempty hS + refine ⟨f,hexposed.isExtreme.extremePoints_subset_extremePoints hf,?_⟩ + apply le_antisymm (realState_le_norm hf.1.1 b') + change ‖b‖ ≤ f b' + rw [← hgb] + exact hf.1.2 g hg + +def realStateComplexification (f : WeakDual ℝ (selfAdjoint A)) + (hf : f ∈ realStateSpace A) : A →ₚ[ℂ] ℂ := + positiveComplexification (WeakDual.toStrongDual f) hf.1 hf.2 + +lemma realStateComplexification_apply (f : WeakDual ℝ (selfAdjoint A)) + (hf : f ∈ realStateSpace A) (b : selfAdjoint A) : + realStateComplexification f hf (b : A)=(f b : ℂ) := + positiveComplexification_apply _ _ _ _ + +lemma realStateComplexification_one (f : WeakDual ℝ (selfAdjoint A)) + (hf : f ∈ realStateSpace A) : realStateComplexification f hf 1=1 := by + change realStateComplexification f hf ((1 : selfAdjoint A) : A)=1 + rw [realStateComplexification_apply,hf.2,Complex.ofReal_one] + +end States + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/QuantitativeAssembly.lean b/lean/OAI/Analysis/WeakInfiniteness/QuantitativeAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1230852e1fd89fa8e41353b7b68dedcc35e516a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/QuantitativeAssembly.lean @@ -0,0 +1,155 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.BoundedImplementation +import OAI.Analysis.WeakInfiniteness.FinalAssembly +import OAI.Analysis.WeakInfiniteness.IndividualInfiniteness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def QuantitativeSeparatingPositives (A : Type u) [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] (σ : ℝ) : Prop := + ∀ (a b : A) (ha : 0 ≤ a) (hb : 0 ≤ b), ‖a‖ ≤ 1 → ‖b‖ ≤ 1 → + ∀ r l : ℝ,0 < r → r < 1 → 0 < l → l < 1/10 → + ∃ Q R : A,0 ≤ Q ∧ 0 ≤ R ∧ + Q ∈ hereditarySubalgebra a ha.isSelfAdjoint ∧ + R ∈ hereditarySubalgebra b hb.isSelfAdjoint ∧ + (∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → + (r ≤ ‖π a‖ → r*σ^2/1024 ≤ ‖π Q‖) ∧ + (r ≤ ‖π b‖ → r*σ^2/1024 ≤ ‖π R‖)) ∧ + ‖Q*R‖ ≤ 20*Real.sqrt l + +lemma separation_parameter_choices {ε σ : ℝ} (hε : 0 < ε) (hσ : 0 < σ) : + ∃ r l δ : ℝ,0 < r ∧ r < 1 ∧ 0 < l ∧ l < 1/10 ∧ 0 < δ ∧ δ < 1 ∧ + r^2 ≤ ε/16 ∧ δ+(4+δ)*δ ≤ ε/6 ∧ + 320*Real.sqrt l/(r*σ^2/1024)^2 ≤ ε/4 := by + let r := min (1/2) (Real.sqrt ε/4) + have hr : 0 < r := lt_min (by norm_num) (by positivity) + have hr1 : r < 1 := (min_le_left _ _).trans_lt (by norm_num) + have hrε : r^2 ≤ ε/16 := by + have h := min_le_right (1/2 : ℝ) (Real.sqrt ε/4) + change r ≤ _ at h + nlinarith [Real.sq_sqrt hε.le,Real.sqrt_nonneg ε] + let m := r*σ^2/1024 + have hm : 0 < m := by dsimp [m]; positivity + let z := ε*m^2/1280 + have hz : 0 < z := by dsimp [z]; positivity + let l := min (1/20) (z^2) + have hl : 0 < l := lt_min (by norm_num) (sq_pos_of_pos hz) + have hl1 : l < 1/10 := (min_le_left _ _).trans_lt (by norm_num) + have hls : Real.sqrt l ≤ z := by + have := min_le_right (1/20 : ℝ) (z^2) + change l ≤ z^2 at this + nlinarith [Real.sq_sqrt hl.le,Real.sqrt_nonneg l] + let δ := min (1/2) (ε/36) + have hδ : 0 < δ := lt_min (by norm_num) (by positivity) + have hδh : δ ≤ 1/2 := min_le_left _ _ + have hδε : δ ≤ ε/36 := min_le_right _ _ + refine ⟨r,l,δ,hr,hr1,hl,hl1,hδ,by linarith,hrε,?_,?_⟩ + · nlinarith + · change 320*Real.sqrt l/m^2 ≤ ε/4 + apply (div_le_iff₀ (sq_pos_of_pos hm)).mpr + dsimp only [z] at hls + nlinarith + +theorem contractive_spi_of_quantitative_separation + (hpi : ∀ x : A,0 ≤ x → ProperlyInfinite (diagonalCopies 1 x)) + {σ : ℝ} (hσ : 0 < σ) (hsep : QuantitativeSeparatingPositives A σ) + (a b : A) (ha : 0 ≤ a) (hb : 0 ≤ b) (han : ‖a‖ ≤ 1) (hbn : ‖b‖ ≤ 1) + {ε : ℝ} (hε : 0 < ε) : + ∃ s t : A, ‖star s*(a*a)*s-a*a‖ < ε ∧ + ‖star t*(b*b)*t-b*b‖ < ε ∧ ‖star s*a*b*t‖ < ε := by + obtain ⟨r,l,δ,hr,hr1,hl,hl1,hδ,hδ1,hrε,hδε,hlε⟩ := separation_parameter_choices hε hσ + let m := r*σ^2/1024 + have hm : 0 < m := by dsimp [m]; positivity + obtain ⟨Q,R,hQ,hR,hQa,hRb,hcover,hQR⟩ := hsep a b ha hb han hbn r l hr hr1 hl hl1 + have hca := cut_square_cuntz_of_norm_coverage hpi ha hQ hr hm (fun H π hπ => (hcover H π hπ).1) + have hcb := cut_square_cuntz_of_norm_coverage hpi hb hR hr hm (fun H π hπ => (hcover H π hπ).2) + have haa : 0 ≤ a*a := by simpa only [ha.star_eq] using star_mul_self_nonneg a + have hbb : 0 ≤ b*b := by simpa only [hb.star_eq] using star_mul_self_nonneg b + have hcan : ‖positiveCut (r^2) (a*a)‖ ≤ 1 := by + calc + _≤‖a*a‖ := norm_positiveCut_le haa (sq_nonneg r) + _≤‖a‖*‖a‖ := norm_mul_le _ _ + _≤1*1 := by gcongr + _=1 := by norm_num + have hcbn : ‖positiveCut (r^2) (b*b)‖ ≤ 1 := by + calc + _≤‖b*b‖ := norm_positiveCut_le hbb (sq_nonneg r) + _≤‖b‖*‖b‖ := norm_mul_le _ _ + _≤1*1 := by gcongr + _=1 := by norm_num + obtain ⟨x,hxe,hxn,hx⟩ := exists_bounded_cut_implementation hQ (positiveCut_nonneg _ _) hcan hm hca hδ hδ1 + obtain ⟨y,hye,hyn,hy⟩ := exists_bounded_cut_implementation hR (positiveCut_nonneg _ _) hcbn hm hcb hδ hδ1 + obtain ⟨s,hs⟩ := exists_left_approx_of_hereditary ha hQa x hδ + obtain ⟨t,ht⟩ := exists_left_approx_of_hereditary hb hRb y hδ + have hcross : ‖star (Q*x)*(R*y)‖ ≤ ε/4 := by + calc + _=‖star x*(Q*R)*y‖ := by congr 1; rw [star_mul,hQ.star_eq]; simp only [mul_assoc] + _≤‖star x‖*‖Q*R‖*‖y‖ := (norm_mul_le _ _).trans + (mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)) + _≤(4/m)*(20*Real.sqrt l)*(4/m) := by rw [norm_star]; gcongr + _=320*Real.sqrt l/m^2 := by ring + _≤ε/4 := hlε + have hsa := norm_star_mul_approx_le (a*s) (a*s) (Q*x) (Q*x) hδ.le hxn hxn hs.le hs.le + have htb := norm_star_mul_approx_le (b*t) (b*t) (R*y) (R*y) hδ.le hyn hyn ht.le ht.le + have hst := norm_star_mul_approx_le (a*s) (b*t) (Q*x) (R*y) hδ.le hxn hyn hs.le ht.le + have haerr : ‖star (a*s)*(a*s)-a*a‖ < ε := by + have hcut := norm_sub_positiveCut_le haa (sq_nonneg r) + calc + _=‖(star (a*s)*(a*s)-star (Q*x)*(Q*x))+ + (star (Q*x)*(Q*x)-positiveCut (r^2) (a*a))+(positiveCut (r^2) (a*a)-a*a)‖ := by congr 1; abel + _≤‖star (a*s)*(a*s)-star (Q*x)*(Q*x)‖+ + ‖star (Q*x)*(Q*x)-positiveCut (r^2) (a*a)‖+‖positiveCut (r^2) (a*a)-a*a‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _< (4+δ)*δ+δ+r^2 := by rw [norm_sub_rev (positiveCut _ (a*a)) (a*a)]; linarith + _< ε := by linarith + have hberr : ‖star (b*t)*(b*t)-b*b‖ < ε := by + have hcut := norm_sub_positiveCut_le hbb (sq_nonneg r) + calc + _=‖(star (b*t)*(b*t)-star (R*y)*(R*y))+ + (star (R*y)*(R*y)-positiveCut (r^2) (b*b))+(positiveCut (r^2) (b*b)-b*b)‖ := by congr 1; abel + _≤‖star (b*t)*(b*t)-star (R*y)*(R*y)‖+ + ‖star (R*y)*(R*y)-positiveCut (r^2) (b*b)‖+‖positiveCut (r^2) (b*b)-b*b‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _< (4+δ)*δ+δ+r^2 := by rw [norm_sub_rev (positiveCut _ (b*b)) (b*b)]; linarith + _< ε := by linarith + refine ⟨s,t,?_,?_,?_⟩ + · simpa only [star_mul,ha.star_eq,mul_assoc] using haerr + · simpa only [star_mul,hb.star_eq,mul_assoc] using hberr + · have hn : ‖star (a*s)*(b*t)‖ ≤ (4+δ)*δ+ε/4 := by + calc + _=‖(star (a*s)*(b*t)-star (Q*x)*(R*y))+star (Q*x)*(R*y)‖ := by rw [sub_add_cancel] + _≤‖star (a*s)*(b*t)-star (Q*x)*(R*y)‖+‖star (Q*x)*(R*y)‖ := norm_add_le _ _ + _≤_ := add_le_add hst hcross + have : ‖star (a*s)*(b*t)‖ < ε := by linarith + simpa only [star_mul,ha.star_eq,mul_assoc] using this + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/QuantitativeSeparation.lean b/lean/OAI/Analysis/WeakInfiniteness/QuantitativeSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c01f0e87bcda5546d00ebd121d75e0613dab39d --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/QuantitativeSeparation.lean @@ -0,0 +1,233 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CompatibleSeparation +import OAI.Analysis.WeakInfiniteness.QuantitativeAssembly +import OAI.Analysis.WeakInfiniteness.SeparationColumnBounds +import OAI.Analysis.WeakInfiniteness.SeparationPreassembly +import OAI.Analysis.WeakInfiniteness.SeparationSupport +import OAI.Analysis.WeakInfiniteness.SeparationTransferredCoverage + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma separatingPositives_of_four_columns_any + (a b x₀ x₁ y₀ y₁ : A) (ha : 0 ≤ a) (hb : 0 ≤ b) + {r l σ : ℝ} (hr : 0 < r) (hl : 0 < l) (hl1 : l < 1/10) + (hσ : 0 < σ) (hσ1 : σ < 1) + (hx₀mem : x₀ ∈ principalRightIdeal a) (hx₁mem : x₁ ∈ principalRightIdeal a) + (hy₀mem : y₀ ∈ principalRightIdeal b) (hy₁mem : y₁ ∈ principalRightIdeal b) + (h00 : ‖star x₀*y₀‖ ≤ 8*l) (h10 : ‖star x₁*y₀‖ ≤ 6*Real.sqrt l) + (h01 : ‖star x₀*y₁‖ ≤ 6*Real.sqrt l) (h11 : star x₁*y₁=0) + (hcoverage₁ : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + r ≤ ‖π a‖ → r*(σ/16)/8 ≤ max ‖π x₀‖ ‖π x₁‖) + (hcoverage₂ : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + r ≤ ‖π b‖ → r*(σ^2/128)/8 ≤ max ‖π y₀‖ ‖π y₁‖) : + ∃ Q R : A,0 ≤ Q ∧ 0 ≤ R ∧ + Q ∈ hereditarySubalgebra a ha.isSelfAdjoint ∧ + R ∈ hereditarySubalgebra b hb.isSelfAdjoint ∧ + (∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → + (r ≤ ‖π a‖ → r*σ^2/1024 ≤ ‖π Q‖) ∧ + (r ≤ ‖π b‖ → r*σ^2/1024 ≤ ‖π R‖)) ∧ ‖Q*R‖ ≤ 20*Real.sqrt l := by + let Q : A := CFC.sqrt (x₀*star x₀+x₁*star x₁) + let R : A := CFC.sqrt (y₀*star y₀+y₁*star y₁) + have hQQ : 0 ≤ x₀*star x₀+x₁*star x₁ := add_nonneg (mul_star_self_nonneg x₀) (mul_star_self_nonneg x₁) + have hRR : 0 ≤ y₀*star y₀+y₁*star y₁ := add_nonneg (mul_star_self_nonneg y₀) (mul_star_self_nonneg y₁) + refine ⟨Q,R,CFC.sqrt_nonneg _,CFC.sqrt_nonneg _,?_,?_,?_,?_⟩ + · exact sqrt_mem_hereditary a _ ha.isSelfAdjoint ((hereditarySubalgebra a ha.isSelfAdjoint).add_mem + (rightIdeal_square_mem_hereditary a x₀ ha.isSelfAdjoint hx₀mem) + (rightIdeal_square_mem_hereditary a x₁ ha.isSelfAdjoint hx₁mem)) hQQ + · exact sqrt_mem_hereditary b _ hb.isSelfAdjoint ((hereditarySubalgebra b hb.isSelfAdjoint).add_mem + (rightIdeal_square_mem_hereditary b y₀ hb.isSelfAdjoint hy₀mem) + (rightIdeal_square_mem_hereditary b y₁ hb.isSelfAdjoint hy₁mem)) hRR + · intro H π _ + constructor + · intro hπ + have h := hcoverage₁ H π hπ + obtain ⟨hx,hy⟩ := norm_sqrt_sum_representation π x₀ x₁ + have hm := max_le hx hy + have hs : σ^2 ≤ 8*σ := by nlinarith + have hmul := mul_le_mul_of_nonneg_left hs hr.le + exact (by nlinarith : r*σ^2/1024 ≤ r*(σ/16)/8).trans (h.trans hm) + · intro hπ + have h := hcoverage₂ H π hπ + obtain ⟨hx,hy⟩ := norm_sqrt_sum_representation π y₀ y₁ + have hm := max_le hx hy + have heq : r*(σ^2/128)/8 = r*σ^2/1024 := by ring + rw [heq] at h + exact h.trans hm + · have hn := norm_two_sqrt_sums_le x₀ x₁ y₀ y₁ + rw [h11,norm_zero] at hn + have hls : l ≤ Real.sqrt l := by nlinarith [Real.sq_sqrt hl.le,Real.sqrt_nonneg l] + change ‖CFC.sqrt (x₀*star x₀+x₁*star x₁)*CFC.sqrt (y₀*star y₀+y₁*star y₁)‖ ≤ _ + linarith + +theorem quantitative_separatingPositives_any + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + {σ : ℝ} (hσ : 0 < σ) (hσ1 : σ < 1) (hpert : UniformPerturbationOne_any A σ) : + QuantitativeSeparatingPositives A σ := by + intro a b ha hb han hbn r l hr _ hl hl1 + let B := Unitization ℂ A + let X : A := a*b + let Xu : B := X + let T : B := star Xu*Xu + let S : B := Xu*star Xu + let V : B := cfc (separationV l) T + let R₀ : B := cfc (separationR l) T + let g₀ : A := cfcₙ (separationG l) (star X*X) + let N₀ : A := cfcₙ (separationN l) (star X*X) + let g : B := cfc (separationG l) T + let N : B := cfc (separationN l) T + let Lₛ : B := cfc (separationL l) S + let Lₜ : B := cfc (separationL l) T + let C₁ : A := unitizedRight a (Xu*V) + let C₂ : A := unitizedRight b R₀ + have hg₀ : (g₀ : B)=g := inr_separationG X hl + have hN₀ : (N₀ : B)=N := inr_separationN X hl + have hC₁ : (C₁ : B)=(a : B)*Xu*V := by rw [inr_unitizedRight]; simp only [mul_assoc] + have hC₂ : (C₂ : B)=(b : B)*R₀ := inr_unitizedRight b R₀ + have hXu : Xu=(a : B)*(b : B) := by simp only [Xu,X,Unitization.inr_mul] + have hXn : ‖Xu‖ ≤ 1 := by + rw [show Xu=(X : B) from rfl,Unitization.norm_inr] + exact (norm_mul_le a b).trans (by nlinarith [norm_nonneg a,norm_nonneg b]) + obtain ⟨e,f,k₁,k₂,he,hf,hk₁,hk₂,hen,hfn,hef,hek₁,hfk₂,hge,hgf,hkdet⟩ := + exists_separation_cores hpi X hl + have hgeu : g*(e : B)=(e : B) := by + rw [← hg₀,← Unitization.inr_mul,hge] + have hgfu : g*(f : B)=(f : B) := by + rw [← hg₀,← Unitization.inr_mul,hgf] + let τ : ℝ := r*Real.sqrt l/8 + have hτ : 0 < τ := by dsimp only [τ]; positivity + let D₁ : A := C₁*g₀ + let D₂ : A := C₂*g₀ + let h₁ : A := cfcₙ (columnCoreFunction τ) (star D₁*D₁) + let h₂ : A := cfcₙ (columnCoreFunction τ) (star D₂*D₂) + let d₁ : A := cfcₙ (columnCoreFunction (2*τ)) (star (C₁*N₀)*(C₁*N₀)) + let d₂ : A := cfcₙ (columnCoreFunction (2*τ)) (star (C₂*N₀)*(C₂*N₀)) + let F₁ : B := cfc (columnMetricFunction τ) ((D₁ : B)*star (D₁ : B)) + let F₂ : B := cfc (columnMetricFunction τ) ((D₂ : B)*star (D₂ : B)) + obtain ⟨p₁,hp₁eq,hF₁,hp₁,hh₁,hph₁⟩ := nonunital_column_left_normalization D₁ hτ + obtain ⟨p₂,hp₂eq,hF₂,hp₂,hh₂,hph₂⟩ := nonunital_column_left_normalization D₂ hτ + have hFC₁ : F₁*(C₁ : B)*g=(p₁ : B) := by + rw [mul_assoc,← hg₀,← Unitization.inr_mul] + exact hp₁eq + have hFC₂ : F₂*(C₂ : B)*g=(p₂ : B) := by + rw [mul_assoc,← hg₀,← Unitization.inr_mul] + exact hp₂eq + have hd₁ : 0 ≤ d₁ := cfcₙ_nonneg (fun s _ => le_max_right _ _) + have hd₂ : 0 ≤ d₂ := cfcₙ_nonneg (fun s _ => le_max_right _ _) + obtain ⟨hdh₁,hdk₁⟩ := separation_core_comparisons hpi X C₁ k₁ hk₁ hl hτ + (fun H π hπ => (hkdet H π hπ).1) + obtain ⟨hdh₂,hdk₂⟩ := separation_core_comparisons hpi X C₂ k₂ hk₂ hl hτ + (fun H π hπ => (hkdet H π hπ).2) + obtain ⟨Z,W,z,w,hZfact,hWfact,hZW,hZn,hWn,htest₁,htest₂⟩ := + exists_compatible_metric_perturbations_any hσ hσ1 hτ hpert g F₁ F₂ (C₁ : B) (C₂ : B) + (norm_separationG Xu l) (cfc_predicate _ _) p₁ p₂ e f h₁ h₂ k₁ k₂ d₁ d₂ + hp₁ hp₂ hen hfn hh₁ hh₂ hk₁ hk₂ hd₁ hd₂ hph₁ hph₂ hek₁ hfk₂ + hdh₁ hdh₂ hdk₁ hdk₂ hgeu hgfu hFC₁ hFC₂ + let s : ℂ := (((Real.sqrt l)⁻¹ : ℝ) : ℂ) + let x₀ : A := unitizedRight a Lₛ + let y₀ : A := unitizedRight b Lₜ + let x₁ : A := s • unitizedRight C₁ (Z*(e : B)) + let y₁ : A := s • unitizedRight C₂ (W*(f : B)) + have hx₀ : (x₀ : B)=(a : B)*Lₛ := inr_unitizedRight a Lₛ + have hy₀ : (y₀ : B)=(b : B)*Lₜ := inr_unitizedRight b Lₜ + have hx₁ : (x₁ : B)=s • ((C₁ : B)*Z*(e : B)) := by + rw [Unitization.inr_smul,inr_unitizedRight] + simp only [mul_assoc] + have hy₁ : (y₁ : B)=s • ((C₂ : B)*W*(f : B)) := by + rw [Unitization.inr_smul,inr_unitizedRight] + simp only [mul_assoc] + have hx₀mem : x₀ ∈ principalRightIdeal a := inr_factor_mem_principal ha Lₛ hx₀ + have hy₀mem : y₀ ∈ principalRightIdeal b := inr_factor_mem_principal hb Lₜ hy₀ + have hx₁mem : x₁ ∈ principalRightIdeal a := by + apply inr_factor_mem_principal ha (s • (Xu*V*Z*(e : B))) + rw [hx₁,hC₁,mul_smul_comm] + simp only [mul_assoc] + have hy₁mem : y₁ ∈ principalRightIdeal b := by + apply inr_factor_mem_principal hb (s • (R₀*W*(f : B))) + rw [hy₁,hC₂,mul_smul_comm] + simp only [mul_assoc] + have haU : 0 ≤ (a : B) := Unitization.inr_nonneg_iff.mpr ha + have heU : 0 ≤ (e : B) := Unitization.inr_nonneg_iff.mpr he + have hefU : (e : B)*(f : B)=0 := by rw [← Unitization.inr_mul,hef,Unitization.inr_zero] + have hcols := separation_four_column_bounds (a : B) (b : B) (e : B) (f : B) Z W w haU heU hefU hl + (by simpa only [Unitization.norm_inr] using hen) (by simpa only [Unitization.norm_inr] using hfn) + hZn hWn (by simpa only [← hXu] using hgfu) (by simpa only [← hXu] using hWfact) hZW + have h00 : ‖star x₀*y₀‖ ≤ 8*l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₀*y₀),Unitization.inr_mul,Unitization.inr_star,hx₀,hy₀] + simpa only [← hXu] using hcols.1 + have h10 : ‖star x₁*y₀‖ ≤ 6*Real.sqrt l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₁*y₀),Unitization.inr_mul,Unitization.inr_star,hx₁,hy₀,hC₁] + simpa only [← hXu] using hcols.2.1 + have h01 : ‖star x₀*y₁‖ ≤ 6*Real.sqrt l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₀*y₁),Unitization.inr_mul,Unitization.inr_star,hx₀,hy₁,hC₂] + simpa only [← hXu] using hcols.2.2.1 + have h11 : star x₁*y₁=0 := by + apply Unitization.inr_injective (R := ℂ) + rw [Unitization.inr_mul,Unitization.inr_star,hx₁,hy₁,hC₁,hC₂,Unitization.inr_zero] + simpa only [← hXu] using hcols.2.2.2 + let K₁ : B := star (Xu*cfc (separationK l) T) + let K₂ : B := cfc (separationJ l) T + have hK₁ : ‖K₁‖ ≤ (Real.sqrt l)⁻¹ := by + rw [norm_star] + exact norm_separation_coverage_factor Xu hXn hl + have hK₂ : ‖K₂‖ ≤ (Real.sqrt l)⁻¹ := norm_separationJ Xu hXn hl (by linarith) + have haeq : (a : B)=(x₀ : B)+((C₁ : B)*(N₀ : B))*K₁ := by + rw [hx₀,hC₁,hN₀] + rw [separation_first_coverage_identity (a : B) Xu hl] + exact separation_LN_decomposition (a : B) S (IsSelfAdjoint.mul_star_self Xu) l + have hbeq : (b : B)=(y₀ : B)+((C₂ : B)*(N₀ : B))*K₂ := by + rw [hy₀,hC₂,hN₀] + rw [separation_second_coverage_identity (b : B) Xu hl] + exact separation_LN_decomposition (b : B) T (IsSelfAdjoint.star_mul_self Xu) l + have hcoverage₁ := separation_transferred_coverage a x₀ x₁ C₁ N₀ K₁ F₁ ((C₁ : B)*Z*(e : B)) + hr hl (rfl : τ=r*Real.sqrt l/8) (by linarith : σ/16 ≤ 4) haeq hx₁ hK₁ hF₁ + (fun H π hπ => by + have ht := htest₁ H π hπ + simpa only [mul_assoc] using ht) + have hcoverage₂ := separation_transferred_coverage b y₀ y₁ C₂ N₀ K₂ F₂ ((C₂ : B)*W*(f : B)) + hr hl (rfl : τ=r*Real.sqrt l/8) (by nlinarith : σ^2/128 ≤ 4) hbeq hy₁ hK₂ hF₂ + (fun H π hπ => by + have ht := htest₂ H π hπ + simpa only [mul_assoc] using ht) + exact separatingPositives_of_four_columns_any a b x₀ x₁ y₀ y₁ ha hb hr hl hl1 hσ hσ1 + hx₀mem hx₁mem hy₀mem hy₁mem h00 h10 h01 h11 hcoverage₁ hcoverage₂ + +theorem exists_quantitative_separatingPositives_any (hA : Exact A) + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) : + ∃ σ : ℝ,0 < σ ∧ σ < 1 ∧ QuantitativeSeparatingPositives A σ := by + obtain ⟨σ,hσ,hσ1,hpert⟩ := exists_uniformPerturbationOne_any A hA hpi + exact ⟨σ,hσ,hσ1,quantitative_separatingPositives_any hpi hσ hσ1 hpert⟩ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/RectangularCStar.lean b/lean/OAI/Analysis/WeakInfiniteness/RectangularCStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..3407803fd4593db982036e7d9353230fb6e1411f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/RectangularCStar.lean @@ -0,0 +1,125 @@ +import Mathlib + +namespace OAI + +noncomputable section + +namespace WeakPureInfiniteness + +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + + +open scoped CStarAlgebra InnerProductSpace NNReal + +open CStarMatrix CStarModule ContinuousLinearMap + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +omit [PartialOrder A] [StarOrderedRing A] [Fintype k] in +lemma rectangular_toCLM_mul (M : CStarMatrix m n A) (N : CStarMatrix n k A) : + toCLM (M*N) = (toCLM N).comp (toCLM M) := by + ext v i + simp only [toCLM_apply, comp_apply] + exact congrFun (Matrix.vecMul_vecMul v M N).symm i + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype n] in +lemma rectangular_conjTranspose_conjTranspose (M : CStarMatrix m n A) : + M.conjTranspose.conjTranspose = M := by + ext i j + simp only [CStarMatrix.conjTranspose_apply, star_star] + +lemma rectangular_norm_mul_le (M : CStarMatrix m n A) (N : CStarMatrix n k A) : + ‖M*N‖ ≤ ‖M‖*‖N‖ := by + rw [CStarMatrix.norm_def, rectangular_toCLM_mul] + exact (ContinuousLinearMap.opNorm_comp_le _ _).trans_eq (mul_comm _ _) + +lemma rectangular_norm_conjTranspose_le (M : CStarMatrix m n A) : + ‖M.conjTranspose‖ ≤ ‖M‖ := by + apply CStarMatrix.norm_le_of_forall_inner_le (C := ‖M‖₊) + intro v w + refine (congrArg (fun a : A => ‖a‖) + (inner_toCLM_conjTranspose_right (M := M) (v := w) (w := v))).trans_le ?_ + calc + ‖⟪toCLM M w, v⟫_A‖ ≤ ‖toCLM M w‖*‖v‖ := norm_inner_le (WithCStarModule A (n → A)) + _ ≤ (‖M‖*‖w‖)*‖v‖ := by + gcongr + exact le_opNorm _ _ + _ = ‖M‖₊*‖v‖*‖w‖ := by simp only [coe_nnnorm]; ring + +lemma rectangular_norm_conjTranspose (M : CStarMatrix m n A) : + ‖M.conjTranspose‖ = ‖M‖ := by + apply le_antisymm (rectangular_norm_conjTranspose_le M) + simpa only [rectangular_conjTranspose_conjTranspose] using + rectangular_norm_conjTranspose_le M.conjTranspose + +lemma rectangular_norm_sq_le_range (M : CStarMatrix m n A) : + ‖M‖^2 ≤ ‖M*M.conjTranspose‖ := by + have hmain : ‖M‖ ≤ Real.sqrt ‖M*M.conjTranspose‖ := by + change ‖toCLM M‖ ≤ Real.sqrt ‖M*M.conjTranspose‖ + rw [opNorm_le_iff (by positivity)] + intro v + rw [norm_eq_sqrt_norm_inner_self (A := A), ← inner_toCLM_conjTranspose_right] + have h₁ : ‖⟪v, (toCLM M.conjTranspose) ((toCLM M) v)⟫_A‖ ≤ + ‖M*M.conjTranspose‖ * ‖v‖^2 := calc + _ ≤ ‖v‖ * ‖(toCLM M.conjTranspose) ((toCLM M) v)‖ := norm_inner_le (WithCStarModule A (m → A)) + _ ≤ ‖v‖ * (‖(toCLM M.conjTranspose).comp (toCLM M)‖ * ‖v‖) := by + gcongr + exact le_opNorm ((toCLM M.conjTranspose).comp (toCLM M)) v + _ = ‖M*M.conjTranspose‖*‖v‖^2 := by + rw [← rectangular_toCLM_mul, ← CStarMatrix.norm_def] + ring + conv_rhs => rw [show ‖v‖ = Real.sqrt (‖v‖^2) by simp] + rw [← Real.sqrt_mul (norm_nonneg _)] + exact Real.sqrt_le_sqrt h₁ + exact (Real.le_sqrt (norm_nonneg _) (norm_nonneg _)).mp hmain + +lemma rectangular_norm_range (M : CStarMatrix m n A) : + ‖M*M.conjTranspose‖ = ‖M‖^2 := by + apply le_antisymm _ (rectangular_norm_sq_le_range M) + simpa only [rectangular_norm_conjTranspose, pow_two] using + rectangular_norm_mul_le M M.conjTranspose + +lemma rectangular_norm_initial (M : CStarMatrix m n A) : + ‖M.conjTranspose*M‖ = ‖M‖^2 := by + simpa only [rectangular_conjTranspose_conjTranspose, rectangular_norm_conjTranspose] using + rectangular_norm_range M.conjTranspose + +lemma rectangular_initial_nonneg (M : CStarMatrix m n A) : 0 ≤ M.conjTranspose*M := by + classical + cases isEmpty_or_nonempty n with + | inl hn => + have : M.conjTranspose*M = 0 := by ext i j; exact hn.false i |>.elim + rw [this] + | inr hn => + let i₀ : n := Classical.choice hn + let R (i : m) : CStarMatrix n n A := fun j k => if j = i₀ then M i k else 0 + have hrows (T : m → n → A) : + Matrix.conjTranspose (Matrix.of T) * Matrix.of T = ∑ i : m, + Matrix.conjTranspose (Matrix.of (fun j k : n => if j = i₀ then T i k else 0)) * + Matrix.of (fun j k : n => if j = i₀ then T i k else 0) := by + ext j k + simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Matrix.sum_apply, Matrix.of_apply] + simp + have he : M.conjTranspose*M = ∑ i : m, star (R i)*R i := + hrows (Matrix.of.symm (CStarMatrix.ofMatrix.symm M)) + rw [he] + exact Finset.sum_nonneg (fun i _ => star_mul_self_nonneg (R i)) + + +end WeakPureInfiniteness + +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/RectangularComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/RectangularComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..728e90c6a3fa8b816740edd8d70c57d97e5bf612 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/RectangularComparison.lean @@ -0,0 +1,87 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ElementaryComparison +import OAI.Analysis.WeakInfiniteness.RectangularPolar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology CStarAlgebra + +local instance matrixRealModuleComparison {A : Type*} [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +lemma cuntzSubequiv_of_hereditary {h x : CStarMatrix n n A} + (hh : 0 ≤ h) (hx : 0 ≤ x) (hm : x ∈ hereditarySubalgebra h hh.isSelfAdjoint) : + CuntzSubequiv x h := by + intro ε hε + simpa only [CStarMatrix.star_eq_conjTranspose] using + exists_comparison_of_hereditary h x hh hx hm ε hε + +lemma cuntzSubequiv_of_le_smul {h x : CStarMatrix n n A} + (hh : 0 ≤ h) (hx : 0 ≤ x) {c : ℝ} (hc : 0 ≤ c) (hxh : x ≤ c • h) : + CuntzSubequiv x h := + cuntzSubequiv_of_hereditary hh hx (mem_hereditary_of_le_smul h x hh hx hc hxh) + +lemma rectangular_initial_cuntz_range (u : CStarMatrix m n A) : + CuntzSubequiv (u.conjTranspose*u) (u*u.conjTranspose) := by + let t := u.conjTranspose*u + have ht : 0 ≤ t := rectangular_initial_nonneg u + have htt : 0 ≤ t*t := by simpa only [ht.star_eq] using star_mul_self_nonneg t + have hm : t ∈ hereditarySubalgebra (t*t) htt.isSelfAdjoint := by + have hs := sqrt_mem_hereditary (t*t) (t*t) htt.isSelfAdjoint + (self_mem_hereditary (t*t) htt) htt + rwa [CFC.sqrt_mul_self t ht] at hs + intro ε hε + obtain ⟨b,hb⟩ := cuntzSubequiv_of_hereditary htt ht hm ε hε + refine ⟨u*b, ?_⟩ + have he : (u*b).conjTranspose*(u*u.conjTranspose)*(u*b) = b.conjTranspose*(t*t)*b := by + rw [rectangular_star_mul] + dsimp only [t] + simp only [rectangular_mul_assoc] + rwa [he] + +lemma CuntzSubequiv.sandwich_left {x : CStarMatrix n n A} {h : CStarMatrix m m A} + (hxh : CuntzSubequiv x h) (v : CStarMatrix n k A) : + CuntzSubequiv (v.conjTranspose*x*v) h := by + intro ε hε + obtain ⟨δ,hδ,hcont⟩ := Metric.continuousAt_iff.mp + (continuous_matrix_sandwich v).continuousAt ε hε + obtain ⟨w,hw⟩ := hxh δ hδ + refine ⟨w*v, ?_⟩ + rw [rectangular_star_mul] + have he : (v.conjTranspose*w.conjTranspose)*h*(w*v) = + v.conjTranspose*(w.conjTranspose*h*w)*v := by + simp only [rectangular_mul_assoc] + rw [he] + simpa only [dist_eq_norm] using hcont (by simpa only [dist_eq_norm] using hw) + +lemma rectangular_sandwich_cuntz (h : CStarMatrix n n A) (v : CStarMatrix n m A) : + CuntzSubequiv (v.conjTranspose*h*v) h := (cuntzSubequiv_refl h).sandwich_left v + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/RectangularPolar.lean b/lean/OAI/Analysis/WeakInfiniteness/RectangularPolar.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b28c636cf66c73f5141caf0473e080fa9c35750 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/RectangularPolar.lean @@ -0,0 +1,214 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Hereditary +import OAI.Analysis.WeakInfiniteness.RectangularCStar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +local instance matrixRealModule {A : Type*} [NonUnitalCStarAlgebra A] + [PartialOrder A] [StarOrderedRing A] {n : Type*} [Fintype n] : + Module ℝ (CStarMatrix n n A) := Module.complexToReal _ + +section RectangularPolar + +open scoped Topology CStarAlgebra + +open Filter + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype n] [Fintype k] in +lemma rectangular_continuous_conjTranspose : + Continuous (fun M : CStarMatrix m n A => M.conjTranspose) := by + change Continuous (fun M : Matrix m n A => M.conjTranspose) + fun_prop + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +lemma rectangular_continuous_mul : + Continuous (fun p : CStarMatrix m n A × CStarMatrix n k A => p.1*p.2) := by + change Continuous (fun p : Matrix m n A × Matrix n k A => p.1*p.2) + fun_prop + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +lemma rectangular_star_mul (M : CStarMatrix m n A) (N : CStarMatrix n k A) : + (M*N).conjTranspose = N.conjTranspose*M.conjTranspose := + Matrix.conjTranspose_mul _ _ + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] in +lemma rectangular_mul_assoc {l : Type*} (L : CStarMatrix m n A) + (M : CStarMatrix n k A) (N : CStarMatrix k l A) : + (L*M)*N = L*(M*N) := Matrix.mul_assoc _ _ _ + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +def rectangularLeftMap (u : CStarMatrix m n A) : + CStarMatrix n n A →ₗ[ℂ] CStarMatrix m n A where + toFun b := u*b + map_add' := CStarMatrix.mul_add u + map_smul' c b := CStarMatrix.mul_smul u c b + +omit [PartialOrder A] [StarOrderedRing A] [Fintype m] [Fintype k] in +def rectangularRightIdeal (u : CStarMatrix m n A) : Submodule ℂ (CStarMatrix m n A) := + (rectangularLeftMap u).range.topologicalClosure + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_initial_mul (u : CStarMatrix m n A) (b : CStarMatrix n n A) : + (u*b).conjTranspose*(u*b) = star b*(u.conjTranspose*u)*b := by + rw [rectangular_star_mul] + simp only [rectangular_mul_assoc, CStarMatrix.star_eq_conjTranspose] + +lemma rectangular_norm_mul_sqrt (u : CStarMatrix m n A) (b : CStarMatrix n n A) : + ‖CFC.sqrt (u.conjTranspose*u)*b‖ = ‖u*b‖ := by + have heq : star (CFC.sqrt (u.conjTranspose*u)*b)*(CFC.sqrt (u.conjTranspose*u)*b) = + (u*b).conjTranspose*(u*b) := by + rw [rectangular_initial_mul, star_mul, (CFC.sqrt_nonneg (u.conjTranspose*u)).star_eq] + calc + star b * CFC.sqrt (u.conjTranspose * u) * (CFC.sqrt (u.conjTranspose * u) * b) = + star b * (CFC.sqrt (u.conjTranspose * u) * CFC.sqrt (u.conjTranspose * u)) * b := by + noncomm_ring + _ = star b*(u.conjTranspose*u)*b := by + rw [CFC.sqrt_mul_sqrt_self _ (rectangular_initial_nonneg u)] + have hn := congrArg norm heq + rw [CStarRing.norm_star_mul_self, rectangular_norm_initial] at hn + nlinarith [norm_nonneg (CFC.sqrt (u.conjTranspose*u)*b), norm_nonneg (u*b)] + +def rectangularPolar (u : CStarMatrix m n A) : + principalRightIdeal (CFC.sqrt (u.conjTranspose*u)) →L[ℂ] CStarMatrix m n A := + (rectangularLeftMap u).extendOfNorm (principalRightMap (CFC.sqrt (u.conjTranspose*u))) + +lemma rectangularPolar_apply_mul (u : CStarMatrix m n A) (b : CStarMatrix n n A) : + rectangularPolar u (principalRightMap (CFC.sqrt (u.conjTranspose*u)) b) = u*b := by + apply LinearMap.extendOfNorm_eq (principalRightMap_dense _) + refine ⟨1, fun c => ?_⟩ + change ‖u*c‖ ≤ 1*‖CFC.sqrt (u.conjTranspose*u)*c‖ + rw [one_mul, rectangular_norm_mul_sqrt] + +lemma rectangularPolar_initial_square (u : CStarMatrix m n A) + (a : principalRightIdeal (CFC.sqrt (u.conjTranspose*u))) : + (rectangularPolar u a).conjTranspose*rectangularPolar u a = star (a : CStarMatrix n n A)*(a : CStarMatrix n n A) := by + refine (principalRightMap_dense (CFC.sqrt (u.conjTranspose*u))).induction_on a ?_ ?_ + · apply isClosed_eq + · exact rectangular_continuous_mul.comp + ((rectangular_continuous_conjTranspose.comp (rectangularPolar u).continuous).prodMk + (rectangularPolar u).continuous) + · fun_prop + · intro b + rw [rectangularPolar_apply_mul] + change (u*b).conjTranspose*(u*b) = + star (CFC.sqrt (u.conjTranspose*u)*b)*(CFC.sqrt (u.conjTranspose*u)*b) + rw [rectangular_initial_mul, star_mul, (CFC.sqrt_nonneg (u.conjTranspose*u)).star_eq] + calc + star b*(u.conjTranspose*u)*b = + star b * (CFC.sqrt (u.conjTranspose*u)*CFC.sqrt (u.conjTranspose*u))*b := by + rw [CFC.sqrt_mul_sqrt_self _ (rectangular_initial_nonneg u)] + _ = star b*CFC.sqrt (u.conjTranspose*u)*(CFC.sqrt (u.conjTranspose*u)*b) := by + noncomm_ring + +lemma rectangularPolar_mem_rightIdeal (u : CStarMatrix m n A) + (a : principalRightIdeal (CFC.sqrt (u.conjTranspose*u))) : + rectangularPolar u a ∈ rectangularRightIdeal u := by + refine (principalRightMap_dense (CFC.sqrt (u.conjTranspose*u))).induction_on a ?_ ?_ + · exact (Submodule.isClosed_topologicalClosure _).preimage (rectangularPolar u).continuous + · intro b + rw [rectangularPolar_apply_mul] + exact Submodule.le_topologicalClosure _ (LinearMap.mem_range_self _ b) + +lemma rectangular_exact_initial_of_domination (u : CStarMatrix m n A) + (d : CStarMatrix n n A) (hd : 0 ≤ d) {c : ℝ} (hc : 0 ≤ c) + (hdu : d ≤ c • (u.conjTranspose*u)) : + ∃ r : CStarMatrix m n A, r.conjTranspose*r = d ∧ r ∈ rectangularRightIdeal u := by + let a := CFC.sqrt d + have ha : a*star a = d := by + dsimp only [a] + rw [(CFC.sqrt_nonneg d).star_eq, CFC.sqrt_mul_sqrt_self d hd] + have hamem : a ∈ principalRightIdeal (CFC.sqrt (u.conjTranspose*u)) := by + rw [principalRightIdeal_sqrt _ (rectangular_initial_nonneg u)] + exact principalRightIdeal_of_square_le_smul _ a + (rectangular_initial_nonneg u) hc (by rwa [ha]) + let a₀ : principalRightIdeal (CFC.sqrt (u.conjTranspose*u)) := ⟨a, hamem⟩ + refine ⟨rectangularPolar u a₀, ?_, rectangularPolar_mem_rightIdeal u a₀⟩ + rw [rectangularPolar_initial_square] + change star a*a = d + rw [show star a = a from (CFC.sqrt_nonneg d).star_eq] + exact CFC.sqrt_mul_sqrt_self d hd + +end RectangularPolar + +section RectangularHereditary + +open scoped Topology CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {m n : Type*} [Fintype m] [Fintype n] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rightIdeal_sandwich_mem_hereditary (h a b : A) (hh : IsSelfAdjoint h) + (ha : a ∈ principalRightIdeal h) : a*b*star a ∈ hereditarySubalgebra h hh := by + have hc : IsClosed {a : A | a*b*star a ∈ hereditarySubalgebra h hh} := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage (by fun_prop) + apply closure_minimal _ hc ha + rintro _ ⟨y, rfl⟩ + change (h*y)*b*star (h*y) ∈ hereditarySubalgebra h hh + rw [star_mul, hh.star_eq] + have he : (h*y)*b*(star y*h) = h*(y*b*star y)*h := by noncomm_ring + rw [he] + exact sandwich_mem h _ hh + +omit [PartialOrder A] [StarOrderedRing A] in +lemma rectangular_range_mul (a : CStarMatrix m m A) (V : CStarMatrix m n A) : + (a*V)*(a*V).conjTranspose = a*(V*V.conjTranspose)*star a := by + rw [rectangular_star_mul] + simp only [rectangular_mul_assoc, CStarMatrix.star_eq_conjTranspose] + +lemma rectangularRightIdeal_range_mem_hereditary (h a : CStarMatrix m m A) + (V : CStarMatrix m n A) (hh : IsSelfAdjoint h) (ha : a ∈ principalRightIdeal h) + (r : CStarMatrix m n A) (hr : r ∈ rectangularRightIdeal (a*V)) : + r*r.conjTranspose ∈ hereditarySubalgebra h hh := by + have hcont : Continuous (fun r : CStarMatrix m n A => r*r.conjTranspose) := + rectangular_continuous_mul.comp (continuous_id.prodMk rectangular_continuous_conjTranspose) + have hc : IsClosed {r : CStarMatrix m n A | r*r.conjTranspose ∈ hereditarySubalgebra h hh} := + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _).preimage hcont + apply closure_minimal _ hc hr + rintro _ ⟨b, rfl⟩ + change ((a*V)*b)*((a*V)*b).conjTranspose ∈ hereditarySubalgebra h hh + rw [rectangular_mul_assoc a V b, rectangular_range_mul] + exact rightIdeal_sandwich_mem_hereditary h a _ hh ha + +lemma rectangular_exact_initial_hereditary (h : CStarMatrix m m A) + (V : CStarMatrix m n A) (d : CStarMatrix n n A) (hh : 0 ≤ h) (hd : 0 ≤ d) + {c : ℝ} (hc : 0 ≤ c) + (hdu : d ≤ c • ((CFC.sqrt h*V).conjTranspose*(CFC.sqrt h*V))) : + ∃ r : CStarMatrix m n A, r.conjTranspose*r = d ∧ + r*r.conjTranspose ∈ hereditarySubalgebra h hh.isSelfAdjoint := by + obtain ⟨r, hr, hrmem⟩ := rectangular_exact_initial_of_domination (CFC.sqrt h*V) d hd hc hdu + refine ⟨r, hr, rectangularRightIdeal_range_mem_hereditary h (CFC.sqrt h) V + hh.isSelfAdjoint ?_ r hrmem⟩ + exact hereditary_le_rightIdeal h hh.isSelfAdjoint + (sqrt_mem_hereditary h h hh.isSelfAdjoint (self_mem_hereditary h hh) hh) + +end RectangularHereditary + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ReducedGroupAlgebra.lean b/lean/OAI/Analysis/WeakInfiniteness/ReducedGroupAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbdfbce02d02642ebc638208349aa9af60548bde --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ReducedGroupAlgebra.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CStarClosedRange +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra +import OAI.Analysis.WeakInfiniteness.GroupRegular + +namespace OAI + +universe u + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace + +namespace WeakPureInfiniteness + +variable {G : Type u} [Group G] + +instance groupHilbertNontrivial (G : Type u) [Group G] : Nontrivial (GroupHilbert G) := by + classical + refine ⟨⟨0, lp.single 2 (1 : G) (1 : ℂ), ?_⟩⟩ + intro h + have h' := congrArg (fun ξ : GroupHilbert G => ξ 1) h + simp at h' + +abbrev leftRegularRepresentation (G : Type u) [Group G] : GroupRepresentation G where + hilbert := ⟨GroupHilbert G⟩ + group := leftRegular + +def reducedGroupSubalgebra (G : Type u) [Group G] : + StarSubalgebra ℂ (GroupHilbert G →L[ℂ] GroupHilbert G) := + (fullGroupEvaluation (leftRegularRepresentation G)).range + +abbrev ReducedGroupAlgebra (G : Type u) [Group G] : Type u := reducedGroupSubalgebra G + +lemma reducedGroupSubalgebra_closed (G : Type u) [Group G] : + IsClosed (reducedGroupSubalgebra G : Set (GroupHilbert G →L[ℂ] GroupHilbert G)) := + starHom_isClosed_range (fullGroupEvaluation (leftRegularRepresentation G)) + +instance (G : Type u) [Group G] : CStarAlgebra (ReducedGroupAlgebra G) := by + letI := reducedGroupSubalgebra_closed G + unfold ReducedGroupAlgebra + infer_instance + +def fullToReduced : FullGroupAlgebra G →⋆ₐ[ℂ] ReducedGroupAlgebra G := + (fullGroupEvaluation (leftRegularRepresentation G)).rangeRestrict + +lemma fullToReduced_surjective : Function.Surjective (fullToReduced (G := G)) := by + rintro ⟨x, hx⟩ + change ∃ y, fullGroupEvaluation (leftRegularRepresentation G) y = x at hx + obtain ⟨y, hy⟩ := hx + exact ⟨y, Subtype.ext hy⟩ + +@[simp] +lemma fullToReduced_element (g : G) : + ((fullToReduced (fullGroupElement g) : ReducedGroupAlgebra G) : + GroupHilbert G →L[ℂ] GroupHilbert G) = leftRegular g := rfl + +def fullGroupAmbientEvaluation (π : GroupRepresentation G) : + FullGroupAmbient G →⋆ₐ[ℂ] (π.hilbert →L[ℂ] π.hilbert) where + toFun x := x π + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +lemma reducedGroupSubalgebra_eq_closedStarSpan : reducedGroupSubalgebra G = + closedStarSpan (Set.range fun g : G => (leftRegular g : GroupHilbert G →L[ℂ] GroupHilbert G)) := by + let S := closedStarSpan (Set.range fun g : G => (leftRegular g : GroupHilbert G →L[ℂ] GroupHilbert G)) + let φ := fullGroupAmbientEvaluation (leftRegularRepresentation G) + apply le_antisymm + · intro x hx + change ∃ y, fullGroupEvaluation (leftRegularRepresentation G) y = x at hx + obtain ⟨y, rfl⟩ := hx + have h : fullGroupSubalgebra G ≤ S.comap φ := by + change closedStarSpan _ ≤ S.comap φ + apply closedStarSpan_le + · exact (closedStarSpan_closed _).preimage (starHom_continuous φ) + · rintro _ ⟨g, rfl⟩ + exact subset_closedStarSpan _ ⟨g, rfl⟩ + exact h y.property + · apply StarSubalgebra.topologicalClosure_minimal + · apply StarAlgebra.adjoin_le + rintro _ ⟨g, rfl⟩ + change ∃ y, fullGroupEvaluation (leftRegularRepresentation G) y = _ + exact ⟨fullGroupElement g, rfl⟩ + · exact reducedGroupSubalgebra_closed G + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ReducedOperators.lean b/lean/OAI/Analysis/WeakInfiniteness/ReducedOperators.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f0cff516819cff5ff1330cca38eeef42194e519 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ReducedOperators.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonUnitalGroupTensor +import OAI.Analysis.WeakInfiniteness.ReducedGroupAlgebra +import OAI.Analysis.WeakInfiniteness.ScalarDiagonal +import OAI.Analysis.WeakInfiniteness.TensorCompression +import OAI.Analysis.WeakInfiniteness.ULiftCStar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +abbrev ReducedFreeLarge := ULift.{1} (ReducedGroupAlgebra FreeTwo) + +def fullToReducedLarge : FullGroupAlgebra (FreeGroup Bool) →⋆ₐ[ℂ] ReducedFreeLarge := + uliftStarAlgEquiv.symm.toStarAlgHom.comp fullToReduced + +lemma fullToReducedLarge_surjective : Function.Surjective fullToReducedLarge := by + intro d + obtain ⟨b,hb⟩ := fullToReduced_surjective d.down + exact ⟨b, ULift.down_injective hb⟩ + +def reducedLargeToOperators : ReducedFreeLarge →⋆ₐ[ℂ] + (GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo) where + toFun x := x.down.val + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +lemma reducedLargeToOperators_injective : Function.Injective reducedLargeToOperators := by + intro x y h + exact ULift.down_injective (Subtype.ext h) + +lemma reducedLargeToOperators_element (s : FreeTwo) : + reducedLargeToOperators (fullToReducedLarge (fullGroupElement s)) = leftRegular s := rfl + +def freeDiagonalWitness : MinimalTensor (FullGroupAlgebra (FreeGroup Bool)) (FullGroupAlgebra (FreeGroup Bool)) := + ∑ s : FreeLetter, minimalElementary (fullGroupElement (freeLetter s)) (fullGroupElement (freeLetter s)) + +lemma freeDiagonalFunctional_witness : freeDiagonalFunctional freeDiagonalWitness = 4 := by + simp only [freeDiagonalWitness, map_sum, freeDiagonalFunctional_group_tensors] + norm_num [FreeLetter] + +lemma completion_sum {ι H K : Type*} [NormedAddCommGroup H] [NormedSpace ℂ H] + [NormedAddCommGroup K] [NormedSpace ℂ K] (s : Finset ι) (T : ι → H →L[ℂ] K) : + (∑ i ∈ s, T i).completion = ∑ i ∈ s, (T i).completion := by + classical + induction s using Finset.induction_on with + | empty => simp only [Finset.sum_empty, completion_zero] + | @insert i s hi ih => simp only [Finset.sum_insert hi, completion_add, ih] + +lemma norm_freeDiagonalWitness_reduced_le : + ‖minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom freeDiagonalWitness‖ ≤ 2 * Real.sqrt 3 := by + let := CStarAlgebra.spectralOrder ReducedFreeLarge + let := CStarAlgebra.spectralOrderedRing ReducedFreeLarge + change ‖(minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom freeDiagonalWitness).val‖ ≤ _ + apply lp.norm_le_of_forall_le (by positivity) + intro π + have he : (minimalMapRight (A := FullGroupAlgebra (FreeGroup Bool)) (C := FullGroupAlgebra (FreeGroup Bool)) (D := ReducedFreeLarge) fullToReducedLarge.toNonUnitalStarAlgHom freeDiagonalWitness).val π = + (∑ s : FreeLetter, TensorProduct.mapL + (π.leftRep (fullGroupElement (freeLetter s))) + (π.rightRep (fullToReducedLarge (fullGroupElement (freeLetter s))))).completion := by + rw [completion_sum] + change (∑ s : FreeLetter, spatialElementary (fullGroupElement (freeLetter s)) + (fullToReducedLarge (fullGroupElement (freeLetter s)))) π = _ + rfl + rw [he, norm_completion] + have h := tensor_norm_le_faithful Finset.univ + (fun s : FreeLetter => π.leftRep (fullGroupElement (freeLetter s))) + (fun s : FreeLetter => fullToReducedLarge (fullGroupElement (freeLetter s))) + reducedLargeToOperators.toNonUnitalStarAlgHom π.rightRep reducedLargeToOperators_injective + apply h.trans + change ‖∑ s : FreeLetter, TensorProduct.mapL (π.leftRep (fullGroupElement (freeLetter s))) + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo)‖ ≤ _ + exact norm_freeTensor_nonunital_sum_le π.leftRep (fullGroupUnitary (G := FreeTwo)) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ReducingColumns.lean b/lean/OAI/Analysis/WeakInfiniteness/ReducingColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae4e2e47ac7a7b7c52067d1a2023797335ebf6d1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ReducingColumns.lean @@ -0,0 +1,119 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzComparison +import OAI.Analysis.WeakInfiniteness.MatrixHilbert +import OAI.Analysis.WeakInfiniteness.MatrixMaps + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace CStarAlgebra ComplexOrder + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +variable {m n k : Type*} [Fintype m] [Fintype n] [Fintype k] + +def rectangularRepresentation (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (M : CStarMatrix m n A) : + HilbertVector n H →L[ℂ] HilbertVector m H := matrixAction (rectangularMap π M) + +omit [Fintype m] in +@[simp] lemma rectangularRepresentation_apply (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (M : CStarMatrix m n A) (x : HilbertVector n H) (i : m) : + rectangularRepresentation π M x i = ∑ j, π (M i j) (x j) := by + simp [rectangularRepresentation, matrixAction_apply] + +lemma rectangularRepresentation_square (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (M : CStarMatrix n n A) : + rectangularRepresentation π M=matrixRepresentation π n M := rfl + +omit [Fintype m] in +lemma rectangularRepresentation_mul (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (M : CStarMatrix m n A) (N : CStarMatrix n k A) : + rectangularRepresentation π (M*N)=(rectangularRepresentation π M).comp (rectangularRepresentation π N) := by + rw [rectangularRepresentation, rectangularMap_mul, matrixAction_mul] + rfl + +lemma rectangularRepresentation_star (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (M : CStarMatrix m n A) : + rectangularRepresentation π M.conjTranspose=(rectangularRepresentation π M).adjoint := by + rw [rectangularRepresentation, rectangularMap_star, matrixAction_star] + rfl + +omit [CompleteSpace H] in +def vectorTensorLinear (ξ : H) : HilbertVector n ℂ →ₗ[ℂ] HilbertVector n H where + toFun x := WithLp.toLp 2 (fun i => x i • ξ) + map_add' x y := by ext i; simp [add_smul] + map_smul' c x := by ext i; simp [smul_smul] + +omit [CompleteSpace H] in +def vectorTensorIsometry (ξ : H) (hξ : ‖ξ‖=1) : HilbertVector n ℂ →ₗᵢ[ℂ] HilbertVector n H where + toLinearMap := vectorTensorLinear ξ + norm_map' x := by + have he : ‖vectorTensorLinear (n := n) ξ x‖^2=‖x‖^2 := by + simp only [PiLp.norm_sq_eq_of_L2, vectorTensorLinear, LinearMap.coe_mk, AddHom.coe_mk, + norm_smul, hξ, mul_one] + nlinarith [norm_nonneg (vectorTensorLinear (n := n) ξ x), norm_nonneg x] + +omit [CompleteSpace H] in +@[simp] lemma vectorTensorIsometry_apply (ξ : H) (hξ : ‖ξ‖=1) (x : HilbertVector n ℂ) (i : n) : + vectorTensorIsometry ξ hξ x i = x i • ξ := rfl + +def scalarMatrixAction (D : CStarMatrix m n ℂ) : HilbertVector n H →L[ℂ] HilbertVector m H := + rectangularRepresentation (StarAlgHom.ofId ℂ (H →L[ℂ] H)).toNonUnitalStarAlgHom D + +omit [Fintype m] in +@[simp] lemma scalarMatrixAction_apply (D : CStarMatrix m n ℂ) (x : HilbertVector n H) (i : m) : + scalarMatrixAction D x i = ∑ j, D i j • x j := by + simp [scalarMatrixAction, Algebra.algebraMap_eq_smul_one] + +lemma scalarMatrixAction_star (D : CStarMatrix m n ℂ) : + scalarMatrixAction (H := H) D.conjTranspose=(scalarMatrixAction (H := H) D).adjoint := + rectangularRepresentation_star _ _ + +omit [Fintype m] in +lemma rectangularRepresentation_scalarRight (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (L : CStarMatrix m n A) (D : CStarMatrix n k ℂ) : + rectangularRepresentation π (matrixScalarRight L D)= + (rectangularRepresentation π L).comp (scalarMatrixAction (H := H) D) := by + ext x i + simp only [rectangularRepresentation_apply, matrixScalarRight_apply, map_sum, map_smul, + sum_apply, smul_apply, ContinuousLinearMap.comp_apply, + scalarMatrixAction_apply] + rw [Finset.sum_comm] + +lemma scalarAction_vectorTensor (D : CStarMatrix n n ℂ) (ξ : H) (hξ : ‖ξ‖=1) : + (scalarMatrixAction (H := H) D).comp (vectorTensorIsometry (n := n) ξ hξ).toContinuousLinearMap = + (vectorTensorIsometry ξ hξ).toContinuousLinearMap.comp (scalarMatrixAction (H := ℂ) D) := by + ext x i + simp only [ContinuousLinearMap.comp_apply, LinearIsometry.coe_toContinuousLinearMap, + scalarMatrixAction_apply, vectorTensorIsometry_apply, Finset.sum_smul, + smul_smul, smul_eq_mul] + +lemma diagonal_rep_plateau (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + (e : A) (ξ : H) (hξ : ‖ξ‖=1) (he : π e ξ=ξ) (d : ℕ) : + (matrixRepresentation π (Fin d) (diagonalCopies d e)).comp + (vectorTensorIsometry ξ hξ).toContinuousLinearMap = (vectorTensorIsometry ξ hξ).toContinuousLinearMap := by + ext x i + simp [matrixRepresentation_apply, diagonalCopies, Matrix.diagonal_apply, apply_ite, ite_apply, he] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/RelativeAveraging.lean b/lean/OAI/Analysis/WeakInfiniteness/RelativeAveraging.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c41c6e2245737d0e5aa81127f1647f8bfea8992 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/RelativeAveraging.lean @@ -0,0 +1,109 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalCentralization + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder Topology + +open Filter + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma finiteCompression_approximate_initial {n : ℕ} (v : Fin n → A) + (ε : ℝ) (hε : 0<ε) : + ∃ e : A,0≤e ∧ ‖e‖≤1 ∧ ‖finiteCompression v e-nonunitalCoefficientMap v 1‖<ε := by + let l := CStarAlgebra.approximateUnit A + let hl := CStarAlgebra.increasingApproximateUnit A + have ht : Tendsto (finiteCompression v) l (𝓝 (nonunitalCoefficientMap v 1)) := by + rw [nonunitalCoefficientMap_initial] + have hs := tendsto_finsetSum Finset.univ (fun i _ => + (hl.tendsto_mul_right (v i)).const_mul (star (v i))) + change Tendsto (fun e => ∑ i, star (v i) * e * v i) + (CStarAlgebra.approximateUnit A) (𝓝 (∑ i, star (v i) * v i)) + simpa only [mul_assoc] using hs + have he : ∀ᶠ e in l,‖finiteCompression v e-nonunitalCoefficientMap v 1‖<ε := by + exact (Metric.tendsto_nhds.mp ht ε hε).mono fun e he => by + simpa only [dist_eq_norm] using he + obtain ⟨e,he0,hen,hee⟩ := (hl.eventually_nonneg.and (hl.eventually_norm.and he)).exists + exact ⟨e,he0,hen,hee⟩ + +lemma nuclear_weaklyPurelyInfinite_relative_cpc_averaging + (hN : Nuclear A) (hW : WeaklyPurelyInfinite A) + (F : Finset A) (ε : ℝ) (hε : 0<ε) : + ∃ n : ℕ,1≤n ∧∃ v : Fin n → A,∃ e : A,0≤e ∧ ‖e‖≤1 ∧ + CompletelyPositive (finiteCompressionContinuous v) ∧ + ‖finiteCompressionContinuous v‖≤1 ∧ + ∀ a∈F,‖finiteCompression v e*a-a‖<ε ∧ + ‖a*finiteCompression v e-a‖<ε ∧ + ∀ r : A,‖r‖≤1 → ‖a*finiteCompression v r-finiteCompression v r*a‖<ε := by + classical + obtain ⟨n,hn,φ,v,_,_,_,hcp,hcn,happ⟩ := + nuclear_weaklyPurelyInfinite_nonunital_centralizing_compression hN hW F (ε/2) (by positivity) + let M : ℝ := 1+∑ a∈F,‖a‖ + have hM : 0 ‖a‖) (fun _ _ => norm_nonneg _) ha + dsimp only [M] + linarith + let η : ℝ := ε/(2*M) + have hη : 0<η := div_pos hε (by positivity) + have hηM : η*M=ε/2 := by dsimp only [η]; field_simp + obtain ⟨e,he,hen,hee⟩ := finiteCompression_approximate_initial v η hη + refine ⟨n,hn,v,e,he,hen,hcp,hcn,?_⟩ + intro a ha + have hbound : ‖finiteCompression v e-nonunitalCoefficientMap v 1‖*‖a‖≤ε/2 := by + calc + _ ≤ η*M := mul_le_mul hee.le (haM a ha).le (norm_nonneg _) hη.le + _ = _ := hηM + refine ⟨?_,?_,?_⟩ + · calc + _ ≤ ‖finiteCompression v e*a-nonunitalCoefficientMap v 1*a‖+ + ‖nonunitalCoefficientMap v 1*a-a‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ ‖finiteCompression v e-nonunitalCoefficientMap v 1‖*‖a‖+ + ‖nonunitalCoefficientMap v 1*a-a‖ := by + rw [← sub_mul] + exact add_le_add (norm_mul_le _ _) le_rfl + _ < ε/2+ε/2 := add_lt_add_of_le_of_lt hbound (happ a ha).2.1 + _ = _ := by ring + · calc + _ ≤ ‖a*finiteCompression v e-a*nonunitalCoefficientMap v 1‖+ + ‖a*nonunitalCoefficientMap v 1-a‖ := norm_sub_le_norm_sub_add_norm_sub _ _ _ + _ ≤ ‖a‖*‖finiteCompression v e-nonunitalCoefficientMap v 1‖+ + ‖a*nonunitalCoefficientMap v 1-a‖ := by + rw [← mul_sub] + exact add_le_add (norm_mul_le _ _) le_rfl + _ < ε/2+ε/2 := add_lt_add_of_le_of_lt (by simpa only [mul_comm] using hbound) + (happ a ha).2.2.1 + _ = _ := by ring + · intro r hr + exact ((happ a ha).2.2.2 r hr).trans (by linarith) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ScalarDiagonal.lean b/lean/OAI/Analysis/WeakInfiniteness/ScalarDiagonal.lean new file mode 100644 index 0000000000000000000000000000000000000000..4027187908fb4dd6fe3a3e7372a4bb6037fcbca1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ScalarDiagonal.lean @@ -0,0 +1,104 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteGroupTensor +import OAI.Analysis.WeakInfiniteness.FreeFiniteQuotients +import OAI.Analysis.WeakInfiniteness.TensorDensity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +universe u + +section DiagonalPolynomial + +variable {G : Type u} [Group G] + +def diagonalCoefficient : (G × G →₀ ℂ) →ₗ[ℂ] ℂ := by + classical + exact Finsupp.linearCombination ℂ (fun p => if p.1 = p.2 then 1 else 0) + +lemma finite_diagonal_polynomial (F : Type u) [Group F] [Fintype F] [DecidableEq F] + (q : G →* F) (c : G × G →₀ ℂ) : + spatialVectorFunctional (finiteGroupSpatialRepresentation q) + (finiteGroupSpatialDiagonal q : Completion + (ULift.{u+1} (EuclideanSpace ℂ F) ⊗[ℂ] ULift.{u+1} (EuclideanSpace ℂ F))) + (groupTensorPolynomial c).val = + c.sum (fun p z => z • (if q p.1 = q p.2 then (1 : ℂ) else 0)) := by + rw [groupTensorPolynomial_val] + simp only [Finsupp.sum, map_sum, map_smul, finiteGroupSpatialDiagonal_coefficient] + +lemma finite_diagonal_polynomial_bound (F : Type u) [Group F] [Fintype F] [DecidableEq F] + (q : G →* F) (c : G × G →₀ ℂ) : + ‖c.sum (fun p z => z • (if q p.1 = q p.2 then (1 : ℂ) else 0))‖ ≤ + ‖groupTensorPolynomial c‖ := by + rw [← finite_diagonal_polynomial F q c] + apply (ContinuousLinearMap.le_opNorm _ _).trans + have hb := norm_spatialVectorFunctional_le (finiteGroupSpatialRepresentation q) + (finiteGroupSpatialDiagonal q : Completion + (ULift.{u+1} (EuclideanSpace ℂ F) ⊗[ℂ] ULift.{u+1} (EuclideanSpace ℂ F))) + simp only [Completion.norm_coe, norm_finiteGroupSpatialDiagonal, one_mul] at hb + exact (mul_le_mul_of_nonneg_right hb (norm_nonneg _)).trans_eq (one_mul _) + +end DiagonalPolynomial + +section FreeDiagonal + +variable {α : Type u} [Fintype α] [DecidableEq α] + +lemma norm_free_diagonalCoefficient_le (c : FreeGroup α × FreeGroup α →₀ ℂ) : + ‖diagonalCoefficient c‖ ≤ ‖groupTensorPolynomial c‖ := by + classical + let S := c.support.image Prod.fst ∪ c.support.image Prod.snd + obtain ⟨m, hm⟩ := freeFiniteQuotient_injOn_finset S + have heq (p : FreeGroup α × FreeGroup α) (hp : p ∈ c.support) : + freeFiniteQuotient m p.1 = freeFiniteQuotient m p.2 ↔ p.1 = p.2 := by + constructor + · exact hm (Finset.mem_union_left _ (Finset.mem_image.mpr ⟨p,hp,rfl⟩)) + (Finset.mem_union_right _ (Finset.mem_image.mpr ⟨p,hp,rfl⟩)) + · rintro h; rw [h] + have hv : diagonalCoefficient c = c.sum (fun p z => + z • (if freeFiniteQuotient m p.1 = freeFiniteQuotient m p.2 then (1 : ℂ) else 0)) := by + simp only [diagonalCoefficient, Finsupp.linearCombination_apply, Finsupp.sum] + apply Finset.sum_congr rfl + intro p hp + by_cases h : p.1 = p.2 + · simp [h] + · simp [h, not_congr (heq p hp)] + rw [hv] + exact finite_diagonal_polynomial_bound _ (freeFiniteQuotient m) c + +def freeDiagonalFunctional : + MinimalTensor (FullGroupAlgebra (FreeGroup α)) (FullGroupAlgebra (FreeGroup α)) →L[ℂ] ℂ := + diagonalCoefficient.extendOfNorm groupTensorPolynomial + +lemma freeDiagonalFunctional_polynomial (c : FreeGroup α × FreeGroup α →₀ ℂ) : + freeDiagonalFunctional (groupTensorPolynomial c) = diagonalCoefficient c := by + apply LinearMap.extendOfNorm_eq groupTensorPolynomial_dense + exact ⟨1, fun c => by simpa only [one_mul] using norm_free_diagonalCoefficient_le c⟩ + +lemma norm_freeDiagonalFunctional_le : ‖freeDiagonalFunctional (α := α)‖ ≤ 1 := by + apply LinearMap.opNorm_extendOfNorm_le groupTensorPolynomial_dense zero_le_one + intro c + simpa only [one_mul] using norm_free_diagonalCoefficient_le c + +lemma freeDiagonalFunctional_group_tensors (s t : FreeGroup α) : + freeDiagonalFunctional (minimalElementary (fullGroupElement s) (fullGroupElement t)) = + if s = t then (1 : ℂ) else 0 := by + have h := freeDiagonalFunctional_polynomial (Finsupp.single (s,t) 1) + by_cases hst : s = t + · simpa [hst, groupTensorPolynomial, diagonalCoefficient, Finsupp.linearCombination_single] using h + · simpa [hst, groupTensorPolynomial, diagonalCoefficient, Finsupp.linearCombination_single] using h + +end FreeDiagonal + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ScalarHereditary.lean b/lean/OAI/Analysis/WeakInfiniteness/ScalarHereditary.lean new file mode 100644 index 0000000000000000000000000000000000000000..6281685960fb4e23848da7d366bec8ea61a5943f --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ScalarHereditary.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.Hereditary +import OAI.Analysis.WeakInfiniteness.LocalSplitting + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology ComplexStarModule + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] in +lemma map_mul_of_hereditary_square (π : A →⋆ₙₐ[ℂ] B) {h : A} (hh : IsSelfAdjoint h) + {l : ℝ} (he : π h*π h=l • π h) {b : A} (hb : b ∈ hereditarySubalgebra h hh) : + π h*π b=l • π b := by + have hc : IsClosed {x : A | π h*π x=l • π x} := isClosed_eq (by fun_prop) (by fun_prop) + apply closure_minimal _ hc hb + rintro _ ⟨x,rfl⟩ + change π h*π (h*x*h)=l • π (h*x*h) + simp only [map_mul] + rw [← mul_assoc,← mul_assoc,he,smul_mul_assoc,smul_mul_assoc] + +lemma exists_real_scalar_of_no_orthogonal (π : A →⋆ₙₐ[ℂ] B) + {h : A} (hh : 0 ≤ h) (hhn : π h ≠ 0) + (hno : ∀ a ∈ hereditarySubalgebra h hh.isSelfAdjoint, + ∀ b ∈ hereditarySubalgebra h hh.isSelfAdjoint, + 0 ≤ a → 0 ≤ b → a*b=0 → π a=0 ∨ π b=0) + {b : A} (hb : b ∈ hereditarySubalgebra h hh.isSelfAdjoint) (hb0 : 0 ≤ b) : + ∃ r : ℝ,π b=r • π h := by + let l := ‖π h‖ + let μ := ‖π b‖ + let r := ‖π (h+b)‖ + have hl : 0 < l := norm_pos_iff.mpr hhn + have hsqh : π h*π h=l • π h := square_eq_norm_smul_of_no_orthogonal _ π hno + (self_mem_hereditary h hh) hh + have hsqb : π b*π b=μ • π b := square_eq_norm_smul_of_no_orthogonal _ π hno hb hb0 + have hsql : π h*π b=l • π b := map_mul_of_hereditary_square π hh.isSelfAdjoint hsqh hb + have hsqr : π b*π h=l • π b := by + have he := congrArg star hsql + simpa only [star_mul,(map_nonneg π hh).star_eq,(map_nonneg π hb0).star_eq, + star_smul,star_trivial] using he + have hsum := square_eq_norm_smul_of_no_orthogonal _ π hno + ((hereditarySubalgebra h hh.isSelfAdjoint).add_mem (self_mem_hereditary h hh) hb) (add_nonneg hh hb0) + have hprod : π (h+b)*π (h+b)=l • π h+(2*l+μ) • π b := by + simp only [map_add,mul_add,add_mul,hsqh,hsqb,hsql,hsqr] + module + rw [hprod] at hsum + change l • π h+(2*l+μ) • π b=r • π (h+b) at hsum + rw [map_add,smul_add] at hsum + have hr : r ≤ l+μ := by dsimp [r,l,μ]; rw [map_add]; exact norm_add_le _ _ + have hd : 0 < 2*l+μ-r := by linarith + have he : (2*l+μ-r) • π b=(r-l) • π h := by + convert congrArg (fun z : B => z-l • π h-r • π b) hsum using 1 <;> module + refine ⟨(2*l+μ-r)⁻¹*(r-l),?_⟩ + calc + π b=(2*l+μ-r)⁻¹ • ((2*l+μ-r) • π b) := by + rw [smul_smul,inv_mul_cancel₀ (ne_of_gt hd),one_smul] + _ = (2*l+μ-r)⁻¹ • ((r-l) • π h) := by rw [he] + _ = _ := by rw [smul_smul] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ScalingAssembly.lean b/lean/OAI/Analysis/WeakInfiniteness/ScalingAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e60d76935a5938afb777dc4da61d354d5982d12 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ScalingAssembly.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma stronglyPurelyInfinite_of_contractive + (hc : ∀ a b : A,0 ≤ a → 0 ≤ b → ‖a‖ ≤ 1 → ‖b‖ ≤ 1 → + ∀ ε : ℝ,0 < ε → ∃ s t : A, ‖star s*(a*a)*s-a*a‖ < ε ∧ + ‖star t*(b*b)*t-b*b‖ < ε ∧ ‖star s*a*b*t‖ < ε) : + StronglyPurelyInfinite A := by + intro a b ha hb ε hε + let M := max 1 (max ‖a‖ ‖b‖) + have hM1 : 1 ≤ M := le_max_left _ _ + have hM : 0 < M := lt_of_lt_of_le zero_lt_one hM1 + have hMa : ‖a‖ ≤ M := (le_max_left _ _).trans (le_max_right _ _) + have hMb : ‖b‖ ≤ M := (le_max_right _ _).trans (le_max_right _ _) + let a' := M⁻¹ • a + let b' := M⁻¹ • b + have ha' : 0 ≤ a' := smul_nonneg (inv_nonneg.mpr hM.le) ha + have hb' : 0 ≤ b' := smul_nonneg (inv_nonneg.mpr hM.le) hb + have han : ‖a'‖ ≤ 1 := by + rw [show a'=M⁻¹ • a from rfl,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hM),inv_mul_eq_div] + exact (div_le_one₀ hM).mpr hMa + have hbn : ‖b'‖ ≤ 1 := by + rw [show b'=M⁻¹ • b from rfl,norm_smul,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hM),inv_mul_eq_div] + exact (div_le_one₀ hM).mpr hMb + obtain ⟨s,t,hs,ht,hst⟩ := hc a' b' ha' hb' han hbn (ε/M^2) (by positivity) + have he (x y : A) : M^2 • ((M⁻¹ • x)*(M⁻¹ • y))=x*y := by + rw [smul_mul_assoc,mul_smul_comm,smul_smul,smul_smul] + have : M^2*M⁻¹*M⁻¹=1 := by field_simp + rw [this,one_smul] + have hes : M^2 • (star s*(a'*a')*s-a'*a')=star s*(a*a)*s-a*a := by + calc + _=star s*(M^2 • (a'*a'))*s-M^2 • (a'*a') := by + simp only [smul_sub,smul_mul_assoc,mul_smul_comm] + _=_ := by rw [he] + have het : M^2 • (star t*(b'*b')*t-b'*b')=star t*(b*b)*t-b*b := by + calc + _=star t*(M^2 • (b'*b'))*t-M^2 • (b'*b') := by + simp only [smul_sub,smul_mul_assoc,mul_smul_comm] + _=_ := by rw [he] + have hest : M^2 • (star s*a'*b'*t)=star s*a*b*t := by + calc + _=star s*(M^2 • (a'*b'))*t := by simp only [smul_mul_assoc,mul_smul_comm,mul_assoc] + _=_ := by rw [he]; simp only [mul_assoc] + refine ⟨s,t,?_,?_,?_⟩ + · rw [← hes,norm_smul,Real.norm_eq_abs,abs_of_pos (sq_pos_of_pos hM)] + exact (mul_lt_mul_of_pos_left hs (sq_pos_of_pos hM)).trans_le (by field_simp; rfl) + · rw [← het,norm_smul,Real.norm_eq_abs,abs_of_pos (sq_pos_of_pos hM)] + exact (mul_lt_mul_of_pos_left ht (sq_pos_of_pos hM)).trans_le (by field_simp; rfl) + · rw [← hest,norm_smul,Real.norm_eq_abs,abs_of_pos (sq_pos_of_pos hM)] + exact (mul_lt_mul_of_pos_left hst (sq_pos_of_pos hM)).trans_le (by field_simp; rfl) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SecondCoupling.lean b/lean/OAI/Analysis/WeakInfiniteness/SecondCoupling.lean new file mode 100644 index 0000000000000000000000000000000000000000..30651e181d124bcd1aa3614155c269bb1823bbcb --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SecondCoupling.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FirstCoupling +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_second_coupling_on_norm_slice_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ U ∈ D,∃ V ∈ D,IsSelfAdjoint U ∧ IsSelfAdjoint V ∧ ∃ ρ : ℝ,0 < ρ ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + ∃ p q : A,∃ S T : Set ℝ, + ContinuouslySupported (U : Unitization ℂ A) (p : Unitization ℂ A) S ∧ + ContinuouslySupported (U : Unitization ℂ A) (q : Unitization ℂ A) T ∧ + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) ∧ π (p*V*q) ≠ 0 := by + classical + obtain ⟨U,hUD,hU,hUc⟩ := exists_first_coupling_on_norm_slice_any hσ hσγ hgap hA hn hpi D hD hb hα hlocal + let Q : A → A → Prop := fun p q => ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ + ContinuouslySupported (U : Unitization ℂ A) (p : Unitization ℂ A) S ∧ + ContinuouslySupported (U : Unitization ℂ A) (q : Unitization ℂ A) T ∧ + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) + obtain ⟨F,V,hVD,hV,hVc⟩ := exists_selected_finite_coupling_of_gap_any hσ hσγ hgap hA hn hpi + D hD b hb hα Q (by + intro H π hπ hπb + obtain ⟨p,hpD,q,_,hp,_,hpq,hpc⟩ := hUc H π hπb + obtain ⟨u,huD,v,hvD,hu,hv,huv,hun,hvn,S,T,ρ,hρ,huS,hvT,hST⟩ := + exists_nonunital_separated_spectral_windows D hD.1 π hU hUD hp.isSelfAdjoint hpD hpq hpc + obtain ⟨i,hip,hiq,hin⟩ := exists_core_perturbationData hn hpi hπ hu hv huv hun hvn + refine ⟨i,hereditarySubalgebra_le_of_mem hD hu.isSelfAdjoint huD hip, + hereditarySubalgebra_le_of_mem hD hv.isSelfAdjoint hvD hiq,?_,hin⟩ + exact ⟨S,T,ρ,hρ,continuouslySupported_hereditary_nonunital U u hu.isSelfAdjoint S huS hip, + continuouslySupported_hereditary_nonunital U v hv.isSelfAdjoint T hvT hiq,hST⟩) + let I := {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q} + choose S T r hr hp hq hsep using fun i : I => i.property.2.2 + have hmin : ∃ ρ : ℝ,0 < ρ ∧ ∀ i ∈ F,ρ ≤ r i := by + clear hVc + induction F using Finset.induction_on with + | empty => exact ⟨1,zero_lt_one,by simp⟩ + | @insert i F _ ih => + obtain ⟨ρ,hρ,hρF⟩ := ih + refine ⟨min (r i) ρ,lt_min (hr i) hρ,?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (hρF j hj) + obtain ⟨ρ,hρ,hρF⟩ := hmin + refine ⟨U,hUD,V,hVD,hU,hV,ρ,hρ,?_⟩ + intro H π hπb + obtain ⟨i,hi,hin⟩ := hVc H π hπb + exact ⟨i.val.p,i.val.q,S i,T i,hp i,hq i, + fun x hx y hy => (hρF i hi).trans (hsep i x hx y hy),hin⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SelectedCoupling.lean b/lean/OAI/Analysis/WeakInfiniteness/SelectedCoupling.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fcc98ae4b44478628333026f71e77d68b415a23 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SelectedCoupling.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteSelection +import OAI.Analysis.WeakInfiniteness.UniverseCoupling + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace ComplexOrder + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_selected_finite_coupling_of_gap_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + (b : A) (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) (Q : A → A → Prop) + (hloc : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → α ≤ ‖π b‖ → + ∃ F : OrthogonalPerturbationData A n,F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q ∧ + π (positiveCut F.α F.c) ≠ 0) : + ∃ (F : Finset {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q}) + (U : A),U ∈ D ∧ IsSelfAdjoint U ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π b‖ → ∃ i ∈ F,π (i.val.p*U*i.val.q) ≠ 0 := by + let I := {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q} + obtain ⟨F,hF⟩ := finite_norm_support_cover_nonunital + (fun i : I => positiveCut i.val.α i.val.c) b hb α hα (by + intro H _ _ _ π hπ hπb + let H' : ComplexHilbert.{u} := ⟨H⟩ + obtain ⟨i,hiD,hjD,hQ,hin⟩ := hloc H' π hπ hπb + exact ⟨⟨i,hiD,hjD,hQ⟩,hin⟩) + obtain ⟨U,hUD,hUsa,ε,hε,hU⟩ := exists_finite_coupling_of_gap_any hσ hσγ hgap hA hn hpi + D hD (fun i : I => i.val) F (fun i _ => ⟨i.property.1,i.property.2.1⟩) + refine ⟨F,U,hUD,hUsa,?_⟩ + intro H π hπb + obtain ⟨i,hi,hin⟩ := hF H π hπb + have hci := norm_lt_of_positiveCut_image_ne_zero π i.val.nonneg_c i.val.pos_α.le hin + refine ⟨i,hi,?_⟩ + intro hz + have he := hU i hi H π hci.le + rw [hz,norm_zero] at he + exact (not_le_of_gt hε) he + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparatedSpectralWindows.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparatedSpectralWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dc2354bc562bfb1d2fa568f18f48c4d4993dc95 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparatedSpectralWindows.lean @@ -0,0 +1,103 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SpectralWindows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +lemma tent_support_subset (t r : ℝ) (hr : 0 < r) : + ∀ x,spectralTent t r x ≠ 0 → x ∈ Metric.closedBall t r := by + intro x hx + have he : |x-t| < r := lt_of_not_ge (fun h => hx (spectralTent_zero hr h)) + simpa only [Metric.mem_closedBall,Real.dist_eq] using he.le + +lemma separated_closedBalls (s t r : ℝ) : + ∀ x ∈ Metric.closedBall s r,∀ y ∈ Metric.closedBall t r, + dist s t-2*r ≤ dist x y := by + intro x hx y hy + have hx' : dist x s ≤ r := hx + have hy' : dist y t ≤ r := hy + have ht1 := dist_triangle s x t + have ht2 := dist_triangle x y t + rw [dist_comm s x] at ht1 + linarith + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] + +lemma exists_windows_of_two_nonzero_spectral_values + (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + (π : A →⋆ₐ[ℂ] B) {U : A} (hU : IsSelfAdjoint U) (hUD : U ∈ D) + {s t : ℝ} (hs : s ∈ spectrum ℝ (π U)) (ht : t ∈ spectrum ℝ (π U)) + (hs0 : s ≠ 0) (ht0 : t ≠ 0) (hst : s ≠ t) : + ∃ u ∈ D,∃ v ∈ D,0 ≤ u ∧ 0 ≤ v ∧ u*v=0 ∧ π u ≠ 0 ∧ π v ≠ 0 ∧ + ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ ContinuouslySupported U u S ∧ + ContinuouslySupported U v T ∧ (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) := by + let r := min (min |s| |t|) (dist s t)/4 + have hr : 0 < r := by + dsimp [r] + exact div_pos (lt_min (lt_min (abs_pos.mpr hs0) (abs_pos.mpr ht0)) (dist_pos.mpr hst)) (by norm_num) + have hrs : r ≤ |s| := by + have := (min_le_left (min |s| |t|) (dist s t)).trans (min_le_left |s| |t|) + dsimp [r]; linarith [abs_nonneg s] + have hrt : r ≤ |t| := by + have := (min_le_left (min |s| |t|) (dist s t)).trans (min_le_right |s| |t|) + dsimp [r]; linarith [abs_nonneg t] + have hrst : 2*r < dist s t := by + have := min_le_right (min |s| |t|) (dist s t) + dsimp [r] at hr ⊢; linarith + let f : C(ℝ,ℝ) := ⟨spectralTent s r,spectralTent_continuous s r⟩ + let g : C(ℝ,ℝ) := ⟨spectralTent t r,spectralTent_continuous t r⟩ + have hf0 : f 0=0 := spectralTent_zero hr (by simpa using hrs) + have hg0 : g 0=0 := spectralTent_zero hr (by simpa using hrt) + have hfg : cfc f U*cfc g U=0 := by + rw [← cfc_mul f g U f.continuous.continuousOn g.continuous.continuousOn] + calc + cfc (fun x => f x*g x) U=cfc (0 : ℝ → ℝ) U := by + apply cfc_congr + intro x _ + change f x*g x=0 + by_cases hfx : f x=0 + · rw [hfx,zero_mul] + by_cases hgx : g x=0 + · rw [hgx,mul_zero] + have hx := separated_closedBalls s t r x (tent_support_subset s r hr x hfx) + x (tent_support_subset t r hr x hgx) + rw [dist_self] at hx + exfalso; linarith + _ = 0 := cfc_zero ℝ U + refine ⟨cfc f U,cfc_mem_of_zero D hUD f hf0,cfc g U,cfc_mem_of_zero D hUD g hg0, + cfc_nonneg (fun x _ => spectralTent_nonneg s r x), + cfc_nonneg (fun x _ => spectralTent_nonneg t r x),hfg, + cfc_nonzero_of_spectral_value π hU f hs ?_, + cfc_nonzero_of_spectral_value π hU g ht ?_,Metric.closedBall s r,Metric.closedBall t r, + dist s t-2*r,sub_pos.mpr hrst,continuouslySupported_cfc U f _ (tent_support_subset s r hr), + continuouslySupported_cfc U g _ (tent_support_subset t r hr),separated_closedBalls s t r⟩ + · change spectralTent s r s ≠ 0 + rw [spectralTent_center]; exact one_ne_zero + · change spectralTent t r t ≠ 0 + rw [spectralTent_center]; exact one_ne_zero + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparatingPositivesProducer.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparatingPositivesProducer.lean new file mode 100644 index 0000000000000000000000000000000000000000..854d9307dfecdf062f1be59e28979ced37fbae3e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparatingPositivesProducer.lean @@ -0,0 +1,231 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CompatiblePerturbations +import OAI.Analysis.WeakInfiniteness.QuantitativeAssembly +import OAI.Analysis.WeakInfiniteness.SeparationColumnBounds +import OAI.Analysis.WeakInfiniteness.SeparationPreassembly +import OAI.Analysis.WeakInfiniteness.SeparationSupport +import OAI.Analysis.WeakInfiniteness.SeparationTransferredCoverage + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma separatingPositives_of_four_columns + (a b x₀ x₁ y₀ y₁ : A) (ha : 0 ≤ a) (hb : 0 ≤ b) + {r l σ : ℝ} (hr : 0 < r) (hl : 0 < l) (hl1 : l < 1/10) + (hσ : 0 < σ) (hσ1 : σ < 1) + (hx₀mem : x₀ ∈ principalRightIdeal a) (hx₁mem : x₁ ∈ principalRightIdeal a) + (hy₀mem : y₀ ∈ principalRightIdeal b) (hy₁mem : y₁ ∈ principalRightIdeal b) + (h00 : ‖star x₀*y₀‖ ≤ 8*l) (h10 : ‖star x₁*y₀‖ ≤ 6*Real.sqrt l) + (h01 : ‖star x₀*y₁‖ ≤ 6*Real.sqrt l) (h11 : star x₁*y₁=0) + (hcoverage₁ : ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + r ≤ ‖π a‖ → r*(σ/16)/8 ≤ max ‖π x₀‖ ‖π x₁‖) + (hcoverage₂ : ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + r ≤ ‖π b‖ → r*(σ^2/128)/8 ≤ max ‖π y₀‖ ‖π y₁‖) : + ∃ Q R : A,0 ≤ Q ∧ 0 ≤ R ∧ + Q ∈ hereditarySubalgebra a ha.isSelfAdjoint ∧ + R ∈ hereditarySubalgebra b hb.isSelfAdjoint ∧ + (∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → + (r ≤ ‖π a‖ → r*σ^2/1024 ≤ ‖π Q‖) ∧ + (r ≤ ‖π b‖ → r*σ^2/1024 ≤ ‖π R‖)) ∧ ‖Q*R‖ ≤ 20*Real.sqrt l := by + let Q : A := CFC.sqrt (x₀*star x₀+x₁*star x₁) + let R : A := CFC.sqrt (y₀*star y₀+y₁*star y₁) + have hQQ : 0 ≤ x₀*star x₀+x₁*star x₁ := add_nonneg (mul_star_self_nonneg x₀) (mul_star_self_nonneg x₁) + have hRR : 0 ≤ y₀*star y₀+y₁*star y₁ := add_nonneg (mul_star_self_nonneg y₀) (mul_star_self_nonneg y₁) + refine ⟨Q,R,CFC.sqrt_nonneg _,CFC.sqrt_nonneg _,?_,?_,?_,?_⟩ + · exact sqrt_mem_hereditary a _ ha.isSelfAdjoint ((hereditarySubalgebra a ha.isSelfAdjoint).add_mem + (rightIdeal_square_mem_hereditary a x₀ ha.isSelfAdjoint hx₀mem) + (rightIdeal_square_mem_hereditary a x₁ ha.isSelfAdjoint hx₁mem)) hQQ + · exact sqrt_mem_hereditary b _ hb.isSelfAdjoint ((hereditarySubalgebra b hb.isSelfAdjoint).add_mem + (rightIdeal_square_mem_hereditary b y₀ hb.isSelfAdjoint hy₀mem) + (rightIdeal_square_mem_hereditary b y₁ hb.isSelfAdjoint hy₁mem)) hRR + · intro H π _ + constructor + · intro hπ + have h := hcoverage₁ H π hπ + obtain ⟨hx,hy⟩ := norm_sqrt_sum_representation π x₀ x₁ + have hm := max_le hx hy + have hs : σ^2 ≤ 8*σ := by nlinarith + have hmul := mul_le_mul_of_nonneg_left hs hr.le + exact (by nlinarith : r*σ^2/1024 ≤ r*(σ/16)/8).trans (h.trans hm) + · intro hπ + have h := hcoverage₂ H π hπ + obtain ⟨hx,hy⟩ := norm_sqrt_sum_representation π y₀ y₁ + have hm := max_le hx hy + have heq : r*(σ^2/128)/8 = r*σ^2/1024 := by ring + rw [heq] at h + exact h.trans hm + · have hn := norm_two_sqrt_sums_le x₀ x₁ y₀ y₁ + rw [h11,norm_zero] at hn + have hls : l ≤ Real.sqrt l := by nlinarith [Real.sq_sqrt hl.le,Real.sqrt_nonneg l] + change ‖CFC.sqrt (x₀*star x₀+x₁*star x₁)*CFC.sqrt (y₀*star y₀+y₁*star y₁)‖ ≤ _ + linarith + +theorem quantitative_separatingPositives_one + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + {σ : ℝ} (hσ : 0 < σ) (hσ1 : σ < 1) (hpert : UniformPerturbationOne A σ) : + QuantitativeSeparatingPositives A σ := by + intro a b ha hb han hbn r l hr _ hl hl1 + let B := Unitization ℂ A + let X : A := a*b + let Xu : B := X + let T : B := star Xu*Xu + let S : B := Xu*star Xu + let V : B := cfc (separationV l) T + let R₀ : B := cfc (separationR l) T + let g₀ : A := cfcₙ (separationG l) (star X*X) + let N₀ : A := cfcₙ (separationN l) (star X*X) + let g : B := cfc (separationG l) T + let N : B := cfc (separationN l) T + let Lₛ : B := cfc (separationL l) S + let Lₜ : B := cfc (separationL l) T + let C₁ : A := unitizedRight a (Xu*V) + let C₂ : A := unitizedRight b R₀ + have hg₀ : (g₀ : B)=g := inr_separationG X hl + have hN₀ : (N₀ : B)=N := inr_separationN X hl + have hC₁ : (C₁ : B)=(a : B)*Xu*V := by rw [inr_unitizedRight]; simp only [mul_assoc] + have hC₂ : (C₂ : B)=(b : B)*R₀ := inr_unitizedRight b R₀ + have hXu : Xu=(a : B)*(b : B) := by simp only [Xu,X,Unitization.inr_mul] + have hXn : ‖Xu‖ ≤ 1 := by + rw [show Xu=(X : B) from rfl,Unitization.norm_inr] + exact (norm_mul_le a b).trans (by nlinarith [norm_nonneg a,norm_nonneg b]) + obtain ⟨e,f,k₁,k₂,he,hf,hk₁,hk₂,hen,hfn,hef,hek₁,hfk₂,hge,hgf,hkdet⟩ := + exists_separation_cores hpi X hl + have hgeu : g*(e : B)=(e : B) := by + rw [← hg₀,← Unitization.inr_mul,hge] + have hgfu : g*(f : B)=(f : B) := by + rw [← hg₀,← Unitization.inr_mul,hgf] + let τ : ℝ := r*Real.sqrt l/8 + have hτ : 0 < τ := by dsimp only [τ]; positivity + let D₁ : A := C₁*g₀ + let D₂ : A := C₂*g₀ + let h₁ : A := cfcₙ (columnCoreFunction τ) (star D₁*D₁) + let h₂ : A := cfcₙ (columnCoreFunction τ) (star D₂*D₂) + let d₁ : A := cfcₙ (columnCoreFunction (2*τ)) (star (C₁*N₀)*(C₁*N₀)) + let d₂ : A := cfcₙ (columnCoreFunction (2*τ)) (star (C₂*N₀)*(C₂*N₀)) + let F₁ : B := cfc (columnMetricFunction τ) ((D₁ : B)*star (D₁ : B)) + let F₂ : B := cfc (columnMetricFunction τ) ((D₂ : B)*star (D₂ : B)) + obtain ⟨p₁,hp₁eq,hF₁,hp₁,hh₁,hph₁⟩ := nonunital_column_left_normalization D₁ hτ + obtain ⟨p₂,hp₂eq,hF₂,hp₂,hh₂,hph₂⟩ := nonunital_column_left_normalization D₂ hτ + have hFC₁ : F₁*(C₁ : B)*g=(p₁ : B) := by + rw [mul_assoc,← hg₀,← Unitization.inr_mul] + exact hp₁eq + have hFC₂ : F₂*(C₂ : B)*g=(p₂ : B) := by + rw [mul_assoc,← hg₀,← Unitization.inr_mul] + exact hp₂eq + have hd₁ : 0 ≤ d₁ := cfcₙ_nonneg (fun s _ => le_max_right _ _) + have hd₂ : 0 ≤ d₂ := cfcₙ_nonneg (fun s _ => le_max_right _ _) + obtain ⟨hdh₁,hdk₁⟩ := separation_core_comparisons hpi X C₁ k₁ hk₁ hl hτ + (fun H π hπ => (hkdet H π hπ).1) + obtain ⟨hdh₂,hdk₂⟩ := separation_core_comparisons hpi X C₂ k₂ hk₂ hl hτ + (fun H π hπ => (hkdet H π hπ).2) + obtain ⟨Z,W,z,w,hZfact,hWfact,hZW,hZn,hWn,htest₁,htest₂⟩ := + exists_compatible_metric_perturbations hσ hσ1 hτ hpert g F₁ F₂ (C₁ : B) (C₂ : B) + (norm_separationG Xu l) (cfc_predicate _ _) p₁ p₂ e f h₁ h₂ k₁ k₂ d₁ d₂ + hp₁ hp₂ hen hfn hh₁ hh₂ hk₁ hk₂ hd₁ hd₂ hph₁ hph₂ hek₁ hfk₂ + hdh₁ hdh₂ hdk₁ hdk₂ hgeu hgfu hFC₁ hFC₂ + let s : ℂ := (((Real.sqrt l)⁻¹ : ℝ) : ℂ) + let x₀ : A := unitizedRight a Lₛ + let y₀ : A := unitizedRight b Lₜ + let x₁ : A := s • unitizedRight C₁ (Z*(e : B)) + let y₁ : A := s • unitizedRight C₂ (W*(f : B)) + have hx₀ : (x₀ : B)=(a : B)*Lₛ := inr_unitizedRight a Lₛ + have hy₀ : (y₀ : B)=(b : B)*Lₜ := inr_unitizedRight b Lₜ + have hx₁ : (x₁ : B)=s • ((C₁ : B)*Z*(e : B)) := by + rw [Unitization.inr_smul,inr_unitizedRight] + simp only [mul_assoc] + have hy₁ : (y₁ : B)=s • ((C₂ : B)*W*(f : B)) := by + rw [Unitization.inr_smul,inr_unitizedRight] + simp only [mul_assoc] + have hx₀mem : x₀ ∈ principalRightIdeal a := inr_factor_mem_principal ha Lₛ hx₀ + have hy₀mem : y₀ ∈ principalRightIdeal b := inr_factor_mem_principal hb Lₜ hy₀ + have hx₁mem : x₁ ∈ principalRightIdeal a := by + apply inr_factor_mem_principal ha (s • (Xu*V*Z*(e : B))) + rw [hx₁,hC₁,mul_smul_comm] + simp only [mul_assoc] + have hy₁mem : y₁ ∈ principalRightIdeal b := by + apply inr_factor_mem_principal hb (s • (R₀*W*(f : B))) + rw [hy₁,hC₂,mul_smul_comm] + simp only [mul_assoc] + have haU : 0 ≤ (a : B) := Unitization.inr_nonneg_iff.mpr ha + have heU : 0 ≤ (e : B) := Unitization.inr_nonneg_iff.mpr he + have hefU : (e : B)*(f : B)=0 := by rw [← Unitization.inr_mul,hef,Unitization.inr_zero] + have hcols := separation_four_column_bounds (a : B) (b : B) (e : B) (f : B) Z W w haU heU hefU hl + (by simpa only [Unitization.norm_inr] using hen) (by simpa only [Unitization.norm_inr] using hfn) + hZn hWn (by simpa only [← hXu] using hgfu) (by simpa only [← hXu] using hWfact) hZW + have h00 : ‖star x₀*y₀‖ ≤ 8*l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₀*y₀),Unitization.inr_mul,Unitization.inr_star,hx₀,hy₀] + simpa only [← hXu] using hcols.1 + have h10 : ‖star x₁*y₀‖ ≤ 6*Real.sqrt l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₁*y₀),Unitization.inr_mul,Unitization.inr_star,hx₁,hy₀,hC₁] + simpa only [← hXu] using hcols.2.1 + have h01 : ‖star x₀*y₁‖ ≤ 6*Real.sqrt l := by + rw [← Unitization.norm_inr (𝕜 := ℂ) (star x₀*y₁),Unitization.inr_mul,Unitization.inr_star,hx₀,hy₁,hC₂] + simpa only [← hXu] using hcols.2.2.1 + have h11 : star x₁*y₁=0 := by + apply Unitization.inr_injective (R := ℂ) + rw [Unitization.inr_mul,Unitization.inr_star,hx₁,hy₁,hC₁,hC₂,Unitization.inr_zero] + simpa only [← hXu] using hcols.2.2.2 + let K₁ : B := star (Xu*cfc (separationK l) T) + let K₂ : B := cfc (separationJ l) T + have hK₁ : ‖K₁‖ ≤ (Real.sqrt l)⁻¹ := by + rw [norm_star] + exact norm_separation_coverage_factor Xu hXn hl + have hK₂ : ‖K₂‖ ≤ (Real.sqrt l)⁻¹ := norm_separationJ Xu hXn hl (by linarith) + have haeq : (a : B)=(x₀ : B)+((C₁ : B)*(N₀ : B))*K₁ := by + rw [hx₀,hC₁,hN₀] + rw [separation_first_coverage_identity (a : B) Xu hl] + exact separation_LN_decomposition (a : B) S (IsSelfAdjoint.mul_star_self Xu) l + have hbeq : (b : B)=(y₀ : B)+((C₂ : B)*(N₀ : B))*K₂ := by + rw [hy₀,hC₂,hN₀] + rw [separation_second_coverage_identity (b : B) Xu hl] + exact separation_LN_decomposition (b : B) T (IsSelfAdjoint.star_mul_self Xu) l + have hcoverage₁ := separation_transferred_coverage a x₀ x₁ C₁ N₀ K₁ F₁ ((C₁ : B)*Z*(e : B)) + hr hl (rfl : τ=r*Real.sqrt l/8) (by linarith : σ/16 ≤ 4) haeq hx₁ hK₁ hF₁ + (fun H π hπ => by + have ht := htest₁ H π hπ + simpa only [mul_assoc] using ht) + have hcoverage₂ := separation_transferred_coverage b y₀ y₁ C₂ N₀ K₂ F₂ ((C₂ : B)*W*(f : B)) + hr hl (rfl : τ=r*Real.sqrt l/8) (by nlinarith : σ^2/128 ≤ 4) hbeq hy₁ hK₂ hF₂ + (fun H π hπ => by + have ht := htest₂ H π hπ + simpa only [mul_assoc] using ht) + exact separatingPositives_of_four_columns a b x₀ x₁ y₀ y₁ ha hb hr hl hl1 hσ hσ1 + hx₀mem hx₁mem hy₀mem hy₁mem h00 h10 h01 h11 hcoverage₁ hcoverage₂ + +theorem exists_quantitative_separatingPositives_one (hA : Exact A) + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) : + ∃ σ : ℝ,0 < σ ∧ σ < 1 ∧ QuantitativeSeparatingPositives A σ := by + obtain ⟨σ,hσ,hσ1,hpert⟩ := exists_uniformPerturbationOne A hA hpi + exact ⟨σ,hσ,hσ1,quantitative_separatingPositives_one hpi hσ hσ1 hpert⟩ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationColumnBounds.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationColumnBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbe1b940b47c858d632f4f3a08248c9cc5d2a5c3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationColumnBounds.lean @@ -0,0 +1,115 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SeparationMetric + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma separation_four_column_bounds (a b e f Z W w : B) + (ha : 0 ≤ a) (he : 0 ≤ e) (hef : e*f=0) + {l : ℝ} (hl : 0 < l) + (hen : ‖e‖ ≤ 1) (hfn : ‖f‖ ≤ 1) (hZ : ‖Z‖ ≤ 2) (hWn : ‖W‖ ≤ 2) + (hgf : cfc (separationG l) (star (a*b)*(a*b))*f=f) + (hW : W=1+cfc (separationG l) (star (a*b)*(a*b))*w*cfc (separationG l) (star (a*b)*(a*b))) + (hZW : star Z*W=1) : + let X := a*b + let T := star X*X + let S := X*star X + let C₁ := a*X*cfc (separationV l) T + let C₂ := b*cfc (separationR l) T + let x₀ := a*cfc (separationL l) S + let y₀ := b*cfc (separationL l) T + let x₁ := (((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (C₁*Z*e) + let y₁ := (((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (C₂*W*f) + ‖star x₀*y₀‖ ≤ 8*l ∧ ‖star x₁*y₀‖ ≤ 6*Real.sqrt l ∧ + ‖star x₀*y₁‖ ≤ 6*Real.sqrt l ∧ star x₁*y₁=0 := by + dsimp only + let X := a*b + let T := star X*X + let S := X*star X + let V := cfc (separationV l) T + let R := cfc (separationR l) T + let Lₛ := cfc (separationL l) S + let Lₜ := cfc (separationL l) T + have hV : IsSelfAdjoint V := cfc_predicate _ _ + have hLs : IsSelfAdjoint Lₛ := cfc_predicate _ _ + have hroot : 0 < Real.sqrt l := Real.sqrt_pos.mpr hl + have hscale : (Real.sqrt l)⁻¹*l=Real.sqrt l := by + have hsq := Real.sq_sqrt hl.le + field_simp + nlinarith + have hs_norm : ‖(((Real.sqrt l)⁻¹ : ℝ) : ℂ)‖=(Real.sqrt l)⁻¹ := by + rw [Complex.norm_real,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hroot)] + have hx0 : star (a*Lₛ)*(b*Lₜ)=Lₛ*X*Lₜ := by + rw [star_mul,hLs.star_eq,ha.star_eq] + dsimp only [X] + simp only [mul_assoc] + have hx1 : star (a*X*V*Z*e)*(b*Lₜ)=e*star Z*(V*T*Lₜ) := by + rw [star_mul (a*X*V*Z) e,star_mul (a*X*V) Z,star_mul (a*X) V,star_mul a X, + he.star_eq,hV.star_eq,ha.star_eq] + dsimp only [T,X] + simp only [mul_assoc] + have hxy1 : star (a*Lₛ)*(b*R*W*f)=(Lₛ*X*R)*W*f := by + rw [star_mul,hLs.star_eq,ha.star_eq] + dsimp only [X] + simp only [mul_assoc] + refine ⟨?_,?_,?_,?_⟩ + · change ‖star (a*Lₛ)*(b*Lₜ)‖ ≤ _ + rw [hx0] + exact norm_separation_low X hl + · change ‖star ((((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (a*X*V*Z*e))*(b*Lₜ)‖ ≤ _ + rw [star_smul,Complex.star_def,Complex.conj_ofReal,smul_mul_assoc,hx1,norm_smul,hs_norm] + have hn : ‖e*star Z*(V*T*Lₜ)‖ ≤ 1*2*(3*l) := by + apply (norm_mul_le _ _).trans + apply mul_le_mul _ (norm_separation_mixedV X hl) (norm_nonneg _) (by positivity) + apply (norm_mul_le _ _).trans + rw [norm_star] + gcongr + calc + _≤(Real.sqrt l)⁻¹*(1*2*(3*l)) := mul_le_mul_of_nonneg_left hn (by positivity) + _=6*Real.sqrt l := by nlinarith [hscale] + · change ‖star (a*Lₛ)*((((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (b*R*W*f))‖ ≤ _ + rw [mul_smul_comm,hxy1,norm_smul,hs_norm] + have hn : ‖(Lₛ*X*R)*W*f‖ ≤ (3*l)*2*1 := by + exact (norm_mul_le _ _).trans ((mul_le_mul_of_nonneg_right (norm_mul_le _ _) (norm_nonneg _)).trans + (by gcongr; exact norm_separation_mixedR X hl)) + calc + _≤(Real.sqrt l)⁻¹*((3*l)*2*1) := mul_le_mul_of_nonneg_left hn (by positivity) + _=6*Real.sqrt l := by nlinarith [hscale] + · change star ((((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (a*X*V*Z*e))* + ((((Real.sqrt l)⁻¹ : ℝ) : ℂ) • (b*R*W*f))=0 + rw [star_smul,smul_mul_assoc,mul_smul_comm] + have hh : star (a*X*V*Z*e)*(b*R*W*f)=0 := compatible_columns_orthogonal + (a*X*V) (b*R) (cfc (separationG l) T) e f Z W w l he.isSelfAdjoint hef hgf hW hZW + (separation_metric_identity a b ha.isSelfAdjoint hl) + rw [hh,smul_zero,smul_zero] + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationCoreSelection.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationCoreSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b1f56e89325c2acbea4b3d62cdac440a989ee21 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationCoreSelection.lean @@ -0,0 +1,121 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ColumnCoreNorm +import OAI.Analysis.WeakInfiniteness.OrthogonalCores +import OAI.Analysis.WeakInfiniteness.Plateau +import OAI.Analysis.WeakInfiniteness.SeparationCores +import OAI.Analysis.WeakInfiniteness.SeparationScalar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +universe u v + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma map_column_core_norm (π : A →⋆ₙₐ[ℂ] B) (D : A) {τ : ℝ} (hτ : 0 ≤ τ) : + ‖π (cfcₙ (columnCoreFunction τ) (star D*D))‖=max (‖π D‖-τ) 0 := by + rw [π.map_cfcₙ (columnCoreFunction τ) (star D*D) + (continuous_columnCoreFunction τ).continuousOn (columnCoreFunction_zero hτ) + (by fun_prop) (IsSelfAdjoint.star_mul_self D) + ((IsSelfAdjoint.star_mul_self D).map π)] + rw [map_mul,map_star,cfcₙ_eq_cfc (continuous_columnCoreFunction τ).continuousOn (columnCoreFunction_zero hτ)] + exact norm_column_core _ hτ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma separationG_core (X : A) {l : ℝ} (hl : 0 < l) : + cfcₙ (separationG l) (star X*X)*cfcₙ (columnCoreFunction (2*l)) (star X*X)= + cfcₙ (columnCoreFunction (2*l)) (star X*X) := by + rw [← cfcₙ_mul (separationG l) (columnCoreFunction (2*l)) _ + (continuous_separationG l).continuousOn (separationG_zero hl) + (continuous_columnCoreFunction (2*l)).continuousOn (columnCoreFunction_zero (by positivity))] + apply cfcₙ_congr + intro s _ + change separationG l s*max (Real.sqrt s-2*l) 0=max (Real.sqrt s-2*l) 0 + by_cases h : Real.sqrt s ≤ 2*l + · rw [max_eq_right (sub_nonpos.mpr h),mul_zero] + · rw [show separationG l s=1 from spectralRamp_eq_one hl (le_of_not_ge h),one_mul] + +lemma exists_separation_cores + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + (X : A) {l : ℝ} (hl : 0 < l) : + let g := cfcₙ (separationG l) (star X*X) + ∃ e f k₁ k₂ : A,0 ≤ e ∧ 0 ≤ f ∧ 0 ≤ k₁ ∧ 0 ≤ k₂ ∧ + ‖e‖ ≤ 1 ∧ ‖f‖ ≤ 1 ∧ e*f=0 ∧ e*star e*k₁=k₁ ∧ f*star f*k₂=k₂ ∧ + g*e=e ∧ g*f=f ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + 4*l ≤ ‖π X‖ → π k₁ ≠ 0 ∧ π k₂ ≠ 0 := by + dsimp only + let h₀ : A := cfcₙ (columnCoreFunction (2*l)) (star X*X) + let g : A := cfcₙ (separationG l) (star X*X) + have hh₀ : 0 ≤ h₀ := cfcₙ_nonneg (fun s _ => le_max_right _ _) + obtain ⟨e₀,f₀,he₀,hf₀,_,_,hef₀,heh,hfh,hrep⟩ := + exists_two_orthogonal_cores hh₀ (hpi h₀ hh₀) hl + let e : A := cfcₙ (spectralRamp (1/4)) e₀ + let f : A := cfcₙ (spectralRamp (1/4)) f₀ + let k₁ : A := positiveCut (1/2) e₀ + let k₂ : A := positiveCut (1/2) f₀ + have he : 0 ≤ e := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg _ s) + have hf : 0 ≤ f := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg _ s) + have heE : e ∈ hereditarySubalgebra e₀ he₀.isSelfAdjoint := cfcₙ_mem _ (self_mem_hereditary e₀ he₀) + have hfF : f ∈ hereditarySubalgebra f₀ hf₀.isSelfAdjoint := cfcₙ_mem _ (self_mem_hereditary f₀ hf₀) + have heH : e ∈ hereditarySubalgebra h₀ hh₀.isSelfAdjoint := cfcₙ_mem _ heh + have hfH : f ∈ hereditarySubalgebra h₀ hh₀.isSelfAdjoint := cfcₙ_mem _ hfh + have hgH : g*h₀=h₀ := separationG_core X hl + have hek : e*k₁=k₁ := spectralRamp_mul_positiveCut e₀ (by norm_num) (by norm_num) + have hfk : f*k₂=k₂ := spectralRamp_mul_positiveCut f₀ (by norm_num) (by norm_num) + refine ⟨e,f,k₁,k₂,he,hf,positiveCut_nonneg _ _,positiveCut_nonneg _ _, + norm_spectralRamp_le_one _ _,norm_spectralRamp_le_one _ _, + mul_zero_of_hereditary he₀.isSelfAdjoint hf₀.isSelfAdjoint hef₀ heE hfF,?_,?_, + left_identity_on_hereditary g h₀ hh₀.isSelfAdjoint hgH heH, + left_identity_on_hereditary g h₀ hh₀.isSelfAdjoint hgH hfH,?_⟩ + · rw [he.star_eq,mul_assoc,hek,hek] + · rw [hf.star_eq,mul_assoc,hfk,hfk] + · intro H π hn + have hhn : 2*l ≤ ‖π h₀‖ := by + rw [show h₀=cfcₙ (columnCoreFunction (2*l)) (star X*X) from rfl, + map_column_core_norm π X (by positivity)] + exact le_trans (by linarith) (le_max_left _ _) + obtain ⟨heN,hfN⟩ := hrep H π hhn + constructor + · have hm : π k₁=positiveCut (1/2) (π e₀) := + π.map_cfcₙ (fun s : ℝ => max (s-1/2) 0) e₀ (by fun_prop) (by norm_num) + (by fun_prop) he₀.isSelfAdjoint (map_nonneg π he₀).isSelfAdjoint + rw [hm] + exact positiveCut_ne_zero_of_lt_norm (map_nonneg π he₀) (by norm_num) (by rw [heN]; norm_num) + · have hm : π k₂=positiveCut (1/2) (π f₀) := + π.map_cfcₙ (fun s : ℝ => max (s-1/2) 0) f₀ (by fun_prop) (by norm_num) + (by fun_prop) hf₀.isSelfAdjoint (map_nonneg π hf₀).isSelfAdjoint + rw [hm] + exact positiveCut_ne_zero_of_lt_norm (map_nonneg π hf₀) (by norm_num) (by rw [hfN]; norm_num) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationCores.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationCores.lean new file mode 100644 index 0000000000000000000000000000000000000000..9824a4b212c140fc3125406592ef109a2400f6c1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationCores.lean @@ -0,0 +1,65 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ColumnNormalization +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma columnCoreFunction_zero {τ : ℝ} (hτ : 0 ≤ τ) : columnCoreFunction τ 0=0 := by + simp only [columnCoreFunction,Real.sqrt_zero,zero_sub] + exact max_eq_right (neg_nonpos.mpr hτ) + +lemma nonunital_column_left_normalization (D : A) {τ : ℝ} (hτ : 0 < τ) : + let F : Unitization ℂ A := cfc (columnMetricFunction τ) ((D : Unitization ℂ A)*star (D : Unitization ℂ A)) + let h : A := cfcₙ (columnCoreFunction τ) (star D*D) + ∃ p : A,F*(D : Unitization ℂ A)=(p : Unitization ℂ A) ∧ + ‖F‖ ≤ τ⁻¹ ∧ ‖p‖ ≤ 1 ∧ 0 ≤ h ∧ star p*p*h=h := by + dsimp only + let F : Unitization ℂ A := cfc (columnMetricFunction τ) ((D : Unitization ℂ A)*star (D : Unitization ℂ A)) + let p : A := (F*(D : Unitization ℂ A)).snd + let h : A := cfcₙ (columnCoreFunction τ) (star D*D) + have hp : (p : Unitization ℂ A)=F*(D : Unitization ℂ A) := by + apply unitization_inr_snd_of_fst_eq_zero + simp only [Unitization.fst_mul,Unitization.fst_inr,mul_zero] + have hh : (h : Unitization ℂ A)=cfc (columnCoreFunction τ) (star (D : Unitization ℂ A)*(D : Unitization ℂ A)) := by + dsimp only [h] + rw [Unitization.real_cfcₙ_eq_cfc_inr _ _ (columnCoreFunction_zero hτ.le),Unitization.inr_mul,Unitization.inr_star] + obtain ⟨hF,hpn,hhn,hph⟩ := column_left_normalization (D : Unitization ℂ A) hτ + refine ⟨p,hp.symm,hF,?_,?_,?_⟩ + · rw [← Unitization.norm_inr (𝕜 := ℂ) p,hp] + exact hpn + · exact cfcₙ_nonneg (fun s _ => le_max_right _ _) + · apply Unitization.inr_injective (R := ℂ) + rw [Unitization.inr_mul,Unitization.inr_mul,Unitization.inr_star,hp,hh] + exact hph + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationCoverage.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c06a0c250cbb6e1f9644d7ef378e9a042db85d0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationCoverage.lean @@ -0,0 +1,108 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PolarCFC + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +def separationJ (l s : ℝ) : ℝ := Real.sqrt (separationFloor l s)/Real.sqrt l + +lemma continuous_separationJ (l : ℝ) : Continuous (separationJ l) := + (Real.continuous_sqrt.comp (continuous_separationFloor l)).div_const _ + +lemma separationRJ {l : ℝ} (hl : 0 < l) (s : ℝ) : separationR l s*separationJ l s=1 := by + unfold separationR separationJ + have h1 : Real.sqrt l ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hl) + have h2 : Real.sqrt (separationFloor l s) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (separationFloor_pos hl s)) + field_simp + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma separation_second_coverage_identity (b X : B) {l : ℝ} (hl : 0 < l) : + (b*cfc (separationR l) (star X*X))*cfc (separationN l) (star X*X)* + cfc (separationJ l) (star X*X)=b*cfc (separationN l) (star X*X) := by + have he : (b*cfc (separationR l) (star X*X))*cfc (separationN l) (star X*X)* + cfc (separationJ l) (star X*X)= + b*(cfc (separationR l) (star X*X)*cfc (separationN l) (star X*X)*cfc (separationJ l) (star X*X)) := by + simp only [mul_assoc] + rw [he,cfc_real_mul_three _ (IsSelfAdjoint.star_mul_self X) _ _ _ + (continuous_separationR hl) (continuous_separationN l) (continuous_separationJ l)] + congr 1 + apply cfc_congr + intro s _ + calc + _=(separationR l s*separationJ l s)*separationN l s := by ring + _=_ := by rw [separationRJ hl,one_mul] + +lemma norm_separationJ (X : B) (hX : ‖X‖ ≤ 1) {l : ℝ} (hl : 0 < l) (hl1 : l ≤ 1) : + ‖cfc (separationJ l) (star X*X)‖ ≤ (Real.sqrt l)⁻¹ := by + nontriviality B + apply norm_cfc_le (by positivity) + intro s hs + have hs0 := spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs + have hs1 : s ≤ 1 := by + have hn : s ≤ ‖star X*X‖ := by + have h := spectrum.norm_le_norm_of_mem hs + simpa only [Real.norm_eq_abs,abs_of_nonneg hs0] using h + rw [CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg X] + have hfloor : separationFloor l s ≤ 1 := by + apply max_le hl1 + nlinarith [Real.sq_sqrt hs0,Real.sqrt_nonneg s] + have hroot : Real.sqrt (separationFloor l s) ≤ 1 := by + have h := Real.sqrt_le_sqrt hfloor + simpa using h + rw [Real.norm_eq_abs,abs_of_nonneg (by dsimp only [separationJ]; positivity),separationJ,div_eq_mul_inv] + calc + _≤1*(Real.sqrt l)⁻¹ := mul_le_mul_of_nonneg_right hroot (by positivity) + _=_ := one_mul _ + +omit [PartialOrder B] [StarOrderedRing B] in +lemma norm_separationN_le_one (X : B) (l : ℝ) : + ‖cfc (separationN l) (star X*X)‖ ≤ 1 := by + apply norm_cfc_le (by norm_num) + intro s _ + change ‖spectralRamp (4*l) (Real.sqrt s)‖ ≤ 1 + rw [Real.norm_eq_abs,abs_of_nonneg (spectralRamp_nonneg _ _)] + exact spectralRamp_le_one _ _ + +lemma separationN_eq_zero_of_norm_le (X : B) {l : ℝ} (hl : 0 < l) (hX : ‖X‖ ≤ 4*l) : + cfc (separationN l) (star X*X)=0 := by + nontriviality B + rw [← cfc_zero ℝ (star X*X)] + apply cfc_congr + intro s hs + have hs0 := spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs + have hn : s ≤ ‖X‖^2 := by + have h := spectrum.norm_le_norm_of_mem hs + simpa only [Real.norm_eq_abs,abs_of_nonneg hs0,CStarRing.norm_star_mul_self,pow_two] using h + exact spectralRamp_eq_zero (by positivity) (by nlinarith [Real.sq_sqrt hs0,Real.sqrt_nonneg s,norm_nonneg X]) + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationFourColumns.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationFourColumns.lean new file mode 100644 index 0000000000000000000000000000000000000000..93a9f3569c7dee7717192c4ee5de27fea59605a6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationFourColumns.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FourColumnNorm +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.SupportedCorner + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma map_positive_sqrt (φ : A →⋆ₙₐ[ℂ] B) {a : A} (ha : 0 ≤ a) : + φ (CFC.sqrt a)=CFC.sqrt (φ a) := by + symm + apply CFC.sqrt_unique + · rw [← map_mul,CFC.sqrt_mul_sqrt_self a ha] + · exact map_nonneg φ (CFC.sqrt_nonneg a) + +lemma norm_column_le_sqrt_sum (x y : A) : ‖x‖ ≤ ‖CFC.sqrt (x*star x+y*star y)‖ := by + have hxy : 0 ≤ x*star x+y*star y := add_nonneg (mul_star_self_nonneg x) (mul_star_self_nonneg y) + have h := CStarAlgebra.norm_le_norm_of_le_of_nonneg + (le_add_of_nonneg_right (mul_star_self_nonneg y)) (mul_star_self_nonneg x) + have he : ‖CFC.sqrt (x*star x+y*star y)‖^2=‖x*star x+y*star y‖ := by + rw [pow_two,← CStarRing.norm_star_mul_self,(CFC.sqrt_nonneg _).star_eq,CFC.sqrt_mul_sqrt_self _ hxy] + rw [CStarRing.norm_self_mul_star] at h + nlinarith [norm_nonneg x,norm_nonneg (CFC.sqrt (x*star x+y*star y))] + +lemma norm_other_column_le_sqrt_sum (x y : A) : ‖y‖ ≤ ‖CFC.sqrt (x*star x+y*star y)‖ := by + simpa only [add_comm] using norm_column_le_sqrt_sum y x + +local instance matrixRealModuleFourAssembly {j : Type*} [Fintype j] : + Module ℝ (CStarMatrix j j A) := Module.complexToReal _ + +def twoEntryRow (x y : A) : CStarMatrix (Fin 1) (Fin 2) A := fun _ j => ![x,y] j + +omit [PartialOrder A] [StarOrderedRing A] in +lemma twoEntryRow_range (x y : A) : + matrixSingletonHom (twoEntryRow x y*(twoEntryRow x y).conjTranspose)=x*star x+y*star y := by + change (∑ i : Fin 2, (![x,y] i)*star (![x,y] i))=x*star x+y*star y + simp only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one] + +lemma norm_two_sqrt_sums_le (x₀ x₁ y₀ y₁ : A) : + ‖CFC.sqrt (x₀*star x₀+x₁*star x₁)*CFC.sqrt (y₀*star y₀+y₁*star y₁)‖ ≤ + ‖star x₀*y₀‖+‖star x₁*y₀‖+‖star x₀*y₁‖+‖star x₁*y₁‖ := by + let U := twoEntryRow x₀ x₁ + let V := twoEntryRow y₀ y₁ + have hU : 0 ≤ U*U.conjTranspose := by + simpa only [rectangular_conjTranspose_conjTranspose] using rectangular_initial_nonneg U.conjTranspose + have hV : 0 ≤ V*V.conjTranspose := by + simpa only [rectangular_conjTranspose_conjTranspose] using rectangular_initial_nonneg V.conjTranspose + have hsU := map_positive_sqrt (matrixSingletonHom (A := A)) hU + have hsV := map_positive_sqrt (matrixSingletonHom (A := A)) hV + have hnorm := NonUnitalStarAlgHom.norm_map (matrixSingletonHom (A := A)) matrixSingletonHom_injective + (CFC.sqrt (U*U.conjTranspose)*CFC.sqrt (V*V.conjTranspose)) + rw [map_mul,hsU,hsV,twoEntryRow_range,twoEntryRow_range] at hnorm + rw [hnorm,norm_rectangular_range_roots] + apply (norm_matrix_le_sum_entries _).trans_eq + change (∑ j : Fin 2,∑ i : Fin 2, ‖(∑ k : Fin 1,star (![x₀,x₁] i)*(![y₀,y₁] j))‖)=_ + simp only [Fin.sum_univ_two,Fin.sum_univ_one,Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_fin_one] + ring + +end + +section + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_snd_inr_mul (a : A) (u : Unitization ℂ A) : + (((a : Unitization ℂ A)*u).snd : Unitization ℂ A)=(a : Unitization ℂ A)*u := by + apply unitization_inr_snd_of_fst_eq_zero + simp only [Unitization.fst_mul,Unitization.fst_inr,zero_mul] + +lemma unitizedRight_mem_principal (a : A) (ha : 0 ≤ a) (u : Unitization ℂ A) : + ((a : Unitization ℂ A)*u).snd ∈ principalRightIdeal a := by + have haself : a ∈ principalRightIdeal a := hereditary_le_rightIdeal a ha.isSelfAdjoint + (self_mem_hereditary a ha) + change (0 : ℂ) • u.snd+u.fst • a+a*u.snd ∈ principalRightIdeal a + rw [zero_smul,zero_add] + exact (principalRightIdeal a).add_mem ((principalRightIdeal a).smul_mem _ haself) + (Submodule.le_topologicalClosure _ (LinearMap.mem_range_self (LinearMap.mulLeft ℂ a) u.snd)) + +lemma norm_sqrt_sum_representation {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + (π : A →⋆ₙₐ[ℂ] B) (x y : A) : + ‖π x‖ ≤ ‖π (CFC.sqrt (x*star x+y*star y))‖ ∧ + ‖π y‖ ≤ ‖π (CFC.sqrt (x*star x+y*star y))‖ := by + rw [map_positive_sqrt π (add_nonneg (mul_star_self_nonneg x) (mul_star_self_nonneg y)), + map_add,map_mul,map_mul,map_star,map_star] + exact ⟨norm_column_le_sqrt_sum _ _,norm_other_column_le_sqrt_sum _ _⟩ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationMetric.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..3accc716757f222b3c0567c4f056fc707333f759 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationMetric.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PolarCFC + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +lemma separation_metric_identity (a b : B) (ha : IsSelfAdjoint a) + {l : ℝ} (hl : 0 < l) : + let X := a*b + let T := star X*X + let C₁ := a*X*cfc (separationV l) T + let C₂ := b*cfc (separationR l) T + star C₁*C₂*cfc (separationG l) T=(l : ℂ) • cfc (separationG l) T := by + dsimp only + have hV : IsSelfAdjoint (cfc (separationV l) (star (a*b)*(a*b))) := cfc_predicate _ _ + have hstar : star (a*(a*b)*cfc (separationV l) (star (a*b)*(a*b)))= + cfc (separationV l) (star (a*b)*(a*b))*star (a*b)*a := by + rw [star_mul (a*(a*b)) _,star_mul a (a*b),hV.star_eq,ha.star_eq,mul_assoc] + rw [hstar] + let X := a*b + let T := star X*X + have halg : (cfc (separationV l) T*star X*a)*(b*cfc (separationR l) T)*cfc (separationG l) T= + cfc (separationV l) T*T*cfc (separationR l) T*cfc (separationG l) T := by + dsimp only [T,X] + simp only [mul_assoc] + rw [halg] + rw [(Commute.refl T).cfc_real (separationV l) |>.eq] + have hid : cfc (fun s : ℝ => s) T=T := cfc_id' ℝ T (IsSelfAdjoint.star_mul_self X) + conv_lhs => lhs; lhs; lhs; rw [← hid] + rw [cfc_real_mul_three T (IsSelfAdjoint.star_mul_self X) (fun s => s) _ _ continuous_id + (continuous_separationV hl) (continuous_separationR hl), + ← cfc_mul (fun s => s*separationV l s*separationR l s) (separationG l) T ((continuous_id.mul (continuous_separationV hl)).mul (continuous_separationR hl)).continuousOn + (continuous_separationG l).continuousOn] + have he : cfc (fun s => s*separationV l s*separationR l s*separationG l s) T= + cfc (fun s => l*separationG l s) T := by + apply cfc_congr + intro s hs + exact separationVRG hl (spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs) + rw [he,cfc_const_mul l (separationG l) T (continuous_separationG l).continuousOn] + exact (IsScalarTower.algebraMap_smul ℂ l (cfc (separationG l) T)).symm + +omit [PartialOrder B] [StarOrderedRing B] in +lemma compatible_columns_orthogonal (C₁ C₂ g e f Z W w : B) (l : ℝ) + (he : IsSelfAdjoint e) (hef : e*f=0) (hgf : g*f=f) + (hW : W=1+g*w*g) (hZW : star Z*W=1) + (hmetric : star C₁*C₂*g=(l : ℂ) • g) : + star (C₁*Z*e)*(C₂*W*f)=0 := by + let D := star C₁*C₂-(l : ℂ) • (1 : B) + have hDg : D*g=0 := by + dsimp only [D] + rw [sub_mul,hmetric,smul_mul_assoc,one_mul,sub_self] + have hDf : D*f=0 := by rw [← hgf,← mul_assoc,hDg,zero_mul] + have hDWf : D*W*f=0 := by + rw [hW,mul_add,mul_one,add_mul,hDf] + have heq : D*(g*w*g)*f=(D*g)*w*g*f := by simp only [mul_assoc] + rw [heq,hDg,zero_mul,zero_mul,zero_mul,add_zero] + have hM : (star C₁*C₂)*W*f=(l : ℂ) • (W*f) := by + have h : D*W*f=(star C₁*C₂)*W*f-(l : ℂ) • (W*f) := by + dsimp only [D] + simp only [sub_mul,smul_mul_assoc,one_mul,mul_assoc] + rw [h] at hDWf + exact sub_eq_zero.mp hDWf + rw [star_mul,star_mul,he.star_eq] + calc + _=e*star Z*((star C₁*C₂)*W*f) := by simp only [mul_assoc] + _=(l : ℂ) • (e*(star Z*W)*f) := by rw [hM]; simp only [mul_smul_comm,mul_assoc] + _=0 := by rw [hZW,mul_one,hef,smul_zero] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma cfc_separationGN (X : B) {l : ℝ} (hl : 0 < l) : + cfc (separationG l) (star X*X)*cfc (separationN l) (star X*X)= + cfc (separationN l) (star X*X) := by + rw [← cfc_mul _ _ _ (continuous_separationG l).continuousOn (continuous_separationN l).continuousOn] + exact cfc_congr (fun s _ => separationGN hl s) + +lemma separation_first_coverage_identity (a X : B) {l : ℝ} (hl : 0 < l) : + (a*X*cfc (separationV l) (star X*X))*cfc (separationN l) (star X*X)* + star (X*cfc (separationK l) (star X*X))= + a*cfc (separationN l) (X*star X) := by + have hK : IsSelfAdjoint (cfc (separationK l) (star X*X)) := cfc_predicate _ _ + rw [star_mul,hK.star_eq] + have he : (a*X*cfc (separationV l) (star X*X))*cfc (separationN l) (star X*X)* + (cfc (separationK l) (star X*X)*star X)= + a*(X*(cfc (separationV l) (star X*X)*cfc (separationN l) (star X*X)* + cfc (separationK l) (star X*X))*star X) := by simp only [mul_assoc] + rw [he,cfc_real_mul_three _ (IsSelfAdjoint.star_mul_self X) _ _ _ + (continuous_separationV hl) (continuous_separationN l) (continuous_separationK hl), + sandwich_cfc_initial X (fun s => separationV l s*separationN l s*separationK l s) (((continuous_separationV hl).mul (continuous_separationN l)).mul (continuous_separationK hl))] + congr 1 + apply cfc_congr + intro s hs + have h := separation_coverage_VKN hl (spectrum_nonneg_of_nonneg (mul_star_self_nonneg X) hs) + nlinarith + +lemma norm_separation_coverage_factor (X : B) (hX : ‖X‖ ≤ 1) + {l : ℝ} (hl : 0 < l) : + ‖X*cfc (separationK l) (star X*X)‖ ≤ (Real.sqrt l)⁻¹ := by + nontriviality B + apply norm_mul_cfc_initial_le X _ (continuous_separationK hl) (by positivity) + intro s hs + have hs0 := spectrum_nonneg_of_nonneg (star_mul_self_nonneg X) hs + have hs1 : s ≤ 1 := by + have hn : s ≤ ‖star X*X‖ := by + have h := spectrum.norm_le_norm_of_mem hs + simpa only [Real.norm_eq_abs,abs_of_nonneg hs0] using h + rw [CStarRing.norm_star_mul_self] at hn + nlinarith [norm_nonneg X] + have h := separation_coverage_K_bound hl hs0 hs1 + simpa only [inv_pow,Real.sq_sqrt hl.le] using h + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationNormCoverage.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationNormCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..c69e05cba9c7da6bc4e2110b09ee6d05168e55fb --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationNormCoverage.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SeparationScalar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {B : Type*} [CStarAlgebra B] + +lemma separation_detection_alternative (a x₀ D K : B) {r l τ : ℝ} + (hr : 0 < r) (hl : 0 < l) (hτ : τ=r*Real.sqrt l/8) + (ha : r ≤ ‖a‖) (haeq : a=x₀+D*K) (hK : ‖K‖ ≤ (Real.sqrt l)⁻¹) : + r/2 ≤ ‖x₀‖ ∨ τ ≤ max (‖D‖-2*τ) 0 := by + by_cases hx : r/2 ≤ ‖x₀‖ + · exact Or.inl hx + right + have hroot : 0 < Real.sqrt l := Real.sqrt_pos.mpr hl + have hτpos : 0 < τ := by rw [hτ]; positivity + have hn : r ≤ ‖x₀‖+‖D‖*(Real.sqrt l)⁻¹ := by + apply ha.trans + rw [haeq] + exact (norm_add_le _ _).trans (add_le_add le_rfl ((norm_mul_le _ _).trans + (mul_le_mul_of_nonneg_left hK (norm_nonneg _)))) + have hmul := mul_le_mul_of_nonneg_right hn hroot.le + have hinv : (Real.sqrt l)⁻¹*Real.sqrt l=1 := inv_mul_cancel₀ (ne_of_gt hroot) + have hnorm : ‖D‖*(Real.sqrt l)⁻¹*Real.sqrt l=‖D‖ := by rw [mul_assoc,hinv,mul_one] + have hsmall := mul_lt_mul_of_pos_right (lt_of_not_ge hx) hroot + have hτeq : 8*τ=r*Real.sqrt l := by rw [hτ]; ring + exact (by nlinarith : τ ≤ ‖D‖-2*τ).trans (le_max_left _ _) + +lemma separation_normalized_column_lower (F Y : B) {r l τ c : ℝ} + (hr : 0 < r) (hl : 0 < l) (hτ : τ=r*Real.sqrt l/8) + (hF : ‖F‖ ≤ τ⁻¹) (hY : c ≤ ‖F*Y‖) : + r*c/8 ≤ ‖(((Real.sqrt l)⁻¹ : ℝ) : ℂ) • Y‖ := by + have hroot : 0 < Real.sqrt l := Real.sqrt_pos.mpr hl + have hτpos : 0 < τ := by rw [hτ]; positivity + have hn : c ≤ τ⁻¹*‖Y‖ := hY.trans ((norm_mul_le _ _).trans + (mul_le_mul_of_nonneg_right hF (norm_nonneg _))) + have hmul := mul_le_mul_of_nonneg_left hn hτpos.le + have hinv : τ*τ⁻¹=1 := mul_inv_cancel₀ (ne_of_gt hτpos) + have hy : τ*c ≤ ‖Y‖ := by simpa only [← mul_assoc,hinv,one_mul] using hmul + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos (inv_pos.mpr hroot),mul_comm ((Real.sqrt l)⁻¹) ‖Y‖,← div_eq_mul_inv] + apply (le_div_iff₀ hroot).mpr + rw [hτ] at hy + nlinarith + +lemma separation_column_coverage (a x₀ C N K F Y : B) {r l τ c : ℝ} + (hr : 0 < r) (hl : 0 < l) (hτ : τ=r*Real.sqrt l/8) (hc : c ≤ 4) + (ha : r ≤ ‖a‖) (haeq : a=x₀+(C*N)*K) (hK : ‖K‖ ≤ (Real.sqrt l)⁻¹) + (hF : ‖F‖ ≤ τ⁻¹) + (hdet : τ ≤ max (‖C*N‖-2*τ) 0 → c ≤ ‖F*Y‖) : + r*c/8 ≤ max ‖x₀‖ ‖(((Real.sqrt l)⁻¹ : ℝ) : ℂ) • Y‖ := by + obtain hx | hd := separation_detection_alternative a x₀ (C*N) K hr hl hτ ha haeq hK + · exact (by nlinarith : r*c/8 ≤ ‖x₀‖).trans (le_max_left _ _) + · exact (separation_normalized_column_lower F Y hr hl hτ hF (hdet hd)).trans (le_max_right _ _) + +end + +section + +variable {B : Type*} [CStarAlgebra B] + +lemma separation_LN_decomposition (a T : B) (hT : IsSelfAdjoint T) (l : ℝ) : + a=a*cfc (separationL l) T+a*cfc (separationN l) T := by + rw [← mul_add] + have he : cfc (separationL l) T+cfc (separationN l) T=1 := by + rw [← cfc_add _ _ _ (continuous_separationL l).continuousOn (continuous_separationN l).continuousOn] + have hfun : (fun s => separationL l s+separationN l s)=(fun _ => (1 : ℝ)) := by + funext s + unfold separationL + ring + rw [hfun,cfc_const_one ℝ T hT] + rw [he,mul_one] + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationPreassembly.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationPreassembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bd3e97d44ffd016b43fcec6241454a4d61856b5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationPreassembly.lean @@ -0,0 +1,73 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SeparationFourColumns +import OAI.Analysis.WeakInfiniteness.SeparationScalar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +def unitizedRight (a : A) (u : Unitization ℂ A) : A := ((a : Unitization ℂ A)*u).snd + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_unitizedRight (a : A) (u : Unitization ℂ A) : + ((unitizedRight a u : A) : Unitization ℂ A)=(a : Unitization ℂ A)*u := inr_snd_inr_mul a u + +lemma inr_factor_mem_principal {a x : A} (ha : 0 ≤ a) (u : Unitization ℂ A) + (hx : (x : Unitization ℂ A)=(a : Unitization ℂ A)*u) : + x ∈ principalRightIdeal a := by + have he : x=unitizedRight a u := by + apply Unitization.inr_injective (R := ℂ) + rw [inr_unitizedRight,hx] + rw [he] + exact unitizedRight_mem_principal a ha u + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_separationG (X : A) {l : ℝ} (hl : 0 < l) : + ((cfcₙ (separationG l) (star X*X) : A) : Unitization ℂ A)= + cfc (separationG l) (star (X : Unitization ℂ A)*(X : Unitization ℂ A)) := by + rw [Unitization.real_cfcₙ_eq_cfc_inr _ _ (separationG_zero hl),Unitization.inr_mul,Unitization.inr_star] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma inr_separationN (X : A) {l : ℝ} (hl : 0 < l) : + ((cfcₙ (separationN l) (star X*X) : A) : Unitization ℂ A)= + cfc (separationN l) (star (X : Unitization ℂ A)*(X : Unitization ℂ A)) := by + rw [Unitization.real_cfcₙ_eq_cfc_inr _ _ (separationN_zero hl),Unitization.inr_mul,Unitization.inr_star] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma norm_separationG (X : Unitization ℂ A) (l : ℝ) : + ‖cfc (separationG l) (star X*X)‖ ≤ 1 := by + apply norm_cfc_le (by norm_num) + intro s _ + change ‖spectralRamp l (Real.sqrt s)‖ ≤ 1 + rw [Real.norm_eq_abs,abs_of_nonneg (spectralRamp_nonneg _ _)] + exact spectralRamp_le_one _ _ + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationScalar.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4f0accfa95a9675a540e69efdcefab49bbe2b5c --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationScalar.lean @@ -0,0 +1,146 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SpectralCut + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +def separationFloor (l s : ℝ) : ℝ := max l (Real.sqrt s) + +def separationR (l s : ℝ) : ℝ := Real.sqrt l / Real.sqrt (separationFloor l s) + +def separationV (l s : ℝ) : ℝ := separationR l s / separationFloor l s + +def separationK (l s : ℝ) : ℝ := (Real.sqrt l * Real.sqrt (separationFloor l s))⁻¹ + +def separationG (l s : ℝ) : ℝ := spectralRamp l (Real.sqrt s) + +def separationN (l s : ℝ) : ℝ := spectralRamp (4*l) (Real.sqrt s) + +def separationL (l s : ℝ) : ℝ := 1-separationN l s + +lemma separationFloor_pos {l : ℝ} (hl : 0 < l) (s : ℝ) : 0 < separationFloor l s := + hl.trans_le (le_max_left _ _) + +lemma continuous_separationFloor (l : ℝ) : Continuous (separationFloor l) := + continuous_const.max Real.continuous_sqrt + +lemma continuous_separationR {l : ℝ} (hl : 0 < l) : Continuous (separationR l) := by + unfold separationR + exact continuous_const.div (Real.continuous_sqrt.comp (continuous_separationFloor l)) + (fun s => ne_of_gt (Real.sqrt_pos.mpr (separationFloor_pos hl s))) + +lemma continuous_separationV {l : ℝ} (hl : 0 < l) : Continuous (separationV l) := by + unfold separationV + exact (continuous_separationR hl).div (continuous_separationFloor l) + (fun s => ne_of_gt (separationFloor_pos hl s)) + +lemma continuous_separationK {l : ℝ} (hl : 0 < l) : Continuous (separationK l) := by + unfold separationK + exact (continuous_const.mul (Real.continuous_sqrt.comp (continuous_separationFloor l))).inv₀ + (fun s => ne_of_gt (mul_pos (Real.sqrt_pos.mpr hl) (Real.sqrt_pos.mpr (separationFloor_pos hl s)))) + +lemma continuous_separationG (l : ℝ) : Continuous (separationG l) := + (continuous_spectralRamp l).comp Real.continuous_sqrt + +lemma continuous_separationN (l : ℝ) : Continuous (separationN l) := + (continuous_spectralRamp (4*l)).comp Real.continuous_sqrt + +lemma continuous_separationL (l : ℝ) : Continuous (separationL l) := + continuous_const.sub (continuous_separationN l) + +lemma separationR_nonneg {l : ℝ} (_hl : 0 ≤ l) (s : ℝ) : 0 ≤ separationR l s := by + exact div_nonneg (Real.sqrt_nonneg _) (Real.sqrt_nonneg _) + +lemma separationV_nonneg {l : ℝ} (hl : 0 < l) (s : ℝ) : 0 ≤ separationV l s := + div_nonneg (separationR_nonneg hl.le s) (separationFloor_pos hl s).le + +lemma separationR_sq {l : ℝ} (hl : 0 < l) (s : ℝ) : + (separationR l s)^2=l/separationFloor l s := by + rw [separationR,div_pow,Real.sq_sqrt hl.le,Real.sq_sqrt (separationFloor_pos hl s).le] + +lemma separationV_sq {l : ℝ} (hl : 0 < l) (s : ℝ) : + (separationV l s)^2=l/(separationFloor l s)^3 := by + rw [separationV,div_pow,separationR_sq hl] + ring + +lemma separationR_le_one {l : ℝ} (hl : 0 < l) (s : ℝ) : separationR l s ≤ 1 := by + apply (div_le_one₀ (Real.sqrt_pos.mpr (separationFloor_pos hl s))).mpr + exact Real.sqrt_le_sqrt (le_max_left _ _) + +lemma separation_floor_ge_sqrt (l s : ℝ) : Real.sqrt s ≤ separationFloor l s := le_max_right _ _ + +lemma separation_floor_eq {l s : ℝ} (h : l ≤ Real.sqrt s) : separationFloor l s=Real.sqrt s := + max_eq_right h + +lemma separation_sV_sq_le_one {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s*(separationV l s)^2 ≤ 1 := by + rw [separationV_sq hl] + have hm := separationFloor_pos hl s + have hml : l ≤ separationFloor l s := le_max_left _ _ + have hsr := separation_floor_ge_sqrt l s + have hs2 : s ≤ (separationFloor l s)^2 := by nlinarith [Real.sq_sqrt hs,Real.sqrt_nonneg s] + rw [← mul_div_assoc] + apply (div_le_one₀ (pow_pos hm 3)).mpr + calc + s*l ≤ (separationFloor l s)^2*separationFloor l s := by gcongr + _ = (separationFloor l s)^3 := by ring + +lemma separationG_zero {l : ℝ} (hl : 0 < l) : separationG l 0=0 := by + exact spectralRamp_eq_zero hl (by simpa using hl.le) + +lemma separationN_zero {l : ℝ} (hl : 0 < l) : separationN l 0=0 := by + exact spectralRamp_eq_zero (by positivity) (by simpa using (show 0 ≤ 4*l by positivity)) + +lemma separationGN {l : ℝ} (hl : 0 < l) (s : ℝ) : + separationG l s*separationN l s=separationN l s := by + by_cases h : Real.sqrt s ≤ 4*l + · rw [show separationN l s=0 from spectralRamp_eq_zero (by positivity) h,mul_zero] + · rw [show separationG l s=1 from spectralRamp_eq_one hl (by linarith [lt_of_not_ge h]),one_mul] + +lemma separationVRG {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s*separationV l s*separationR l s*separationG l s=l*separationG l s := by + by_cases h : Real.sqrt s ≤ l + · rw [show separationG l s=0 from spectralRamp_eq_zero hl h,mul_zero,mul_zero] + · have hp : 0 < Real.sqrt s := hl.trans (lt_of_not_ge h) + have he : s*separationV l s*separationR l s=l := by + rw [separationV] + calc + s*(separationR l s/separationFloor l s)*separationR l s = + s*(separationR l s)^2/separationFloor l s := by ring + _=l := by rw [separationR_sq hl,separation_floor_eq (le_of_not_ge h)] + field_simp + nlinarith [Real.sq_sqrt hs] + rw [he] + +lemma separation_low_support {l s : ℝ} (hl : 0 < l) (h : 8*l ≤ Real.sqrt s) : + separationL l s=0 := by + have hn : separationN l s=1 := spectralRamp_eq_one (by positivity) (by linarith) + simp only [separationL,hn,sub_self] + +lemma separationL_bounds (l s : ℝ) : 0 ≤ separationL l s ∧ separationL l s ≤ 1 := by + constructor + · exact sub_nonneg.mpr (spectralRamp_le_one (4*l) (Real.sqrt s)) + · exact sub_le_self _ (spectralRamp_nonneg (4*l) (Real.sqrt s)) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationScalarBounds.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationScalarBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..111c10c51f56142cbb277eac312b18e06d9dd136 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationScalarBounds.lean @@ -0,0 +1,106 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SeparationScalar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +lemma separationK_sq {l : ℝ} (hl : 0 < l) (s : ℝ) : + (separationK l s)^2=(l*separationFloor l s)⁻¹ := by + rw [separationK,inv_pow,mul_pow,Real.sq_sqrt hl.le,Real.sq_sqrt (separationFloor_pos hl s).le] + +lemma separation_low_square_bound {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s*(separationL l s)^4 ≤ 64*l^2 := by + by_cases h : 8*l ≤ Real.sqrt s + · rw [separation_low_support hl h]; nlinarith [sq_nonneg l] + · have hsqrt : Real.sqrt s ≤ 8*l := (lt_of_not_ge h).le + have hL := separationL_bounds l s + have hL2 : (separationL l s)^2 ≤ 1 := by nlinarith + have hL4 : (separationL l s)^4 ≤ 1 := by nlinarith [sq_nonneg ((separationL l s)^2)] + have hs' : s ≤ 64*l^2 := by nlinarith [Real.sq_sqrt hs,Real.sqrt_nonneg s] + nlinarith + +lemma separation_mixed_R_square_bound {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s*(separationR l s)^2*(separationL l s)^2 ≤ 9*l^2 := by + by_cases h : 8*l ≤ Real.sqrt s + · rw [separation_low_support hl h]; nlinarith [sq_nonneg l] + · have hu : Real.sqrt s ≤ 8*l := (lt_of_not_ge h).le + have hm := separationFloor_pos hl s + have hu0 := Real.sqrt_nonneg s + have hum := separation_floor_ge_sqrt l s + have hsq : s ≤ Real.sqrt s*separationFloor l s := by + nlinarith [Real.sq_sqrt hs,mul_nonneg hu0 (sub_nonneg.mpr hum)] + have hbase : s*(separationR l s)^2 ≤ 8*l^2 := by + rw [separationR_sq hl,← mul_div_assoc] + apply (div_le_iff₀ hm).mpr + have hmul := mul_le_mul_of_nonneg_right hsq hl.le + have hmul2 := mul_le_mul_of_nonneg_right hu (mul_nonneg hl.le hm.le) + nlinarith + have hL := separationL_bounds l s + have hL2 : (separationL l s)^2 ≤ 1 := by nlinarith + have hbase0 : 0 ≤ s*(separationR l s)^2 := by positivity + nlinarith [mul_nonneg hbase0 (sub_nonneg.mpr hL2)] + +lemma separation_mixed_V_square_bound {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s^2*(separationV l s)^2*(separationL l s)^2 ≤ 9*l^2 := by + have hm := separationFloor_pos hl s + have hum := separation_floor_ge_sqrt l s + have hs2 : s ≤ (separationFloor l s)^2 := by nlinarith [Real.sq_sqrt hs,Real.sqrt_nonneg s] + have hbase : s^2*(separationV l s)^2 ≤ s*(separationR l s)^2 := by + rw [separationV,div_pow] + have he : s^2*((separationR l s)^2/(separationFloor l s)^2)= + (s^2*(separationR l s)^2)/(separationFloor l s)^2 := by ring + rw [he] + apply (div_le_iff₀ (sq_pos_of_pos hm)).mpr + have h := mul_le_mul_of_nonneg_left hs2 (mul_nonneg hs (sq_nonneg (separationR l s))) + nlinarith + exact (mul_le_mul_of_nonneg_right hbase (sq_nonneg _)).trans (separation_mixed_R_square_bound hl hs) + +lemma separation_coverage_VKN {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) : + s*separationV l s*separationK l s*separationN l s=separationN l s := by + by_cases h : Real.sqrt s ≤ 4*l + · rw [show separationN l s=0 from spectralRamp_eq_zero (by positivity) h,mul_zero] + · have hu : 0 < Real.sqrt s := by linarith [lt_of_not_ge h] + have hm : separationFloor l s=Real.sqrt s := separation_floor_eq (by linarith [lt_of_not_ge h]) + have he : s*separationV l s*separationK l s=1 := by + unfold separationV separationR separationK + rw [hm] + have hl' : Real.sqrt l ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hl) + have hu' : Real.sqrt (Real.sqrt s) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr hu) + field_simp + nlinarith [Real.sq_sqrt hs,Real.sq_sqrt hu.le] + rw [he,one_mul] + +lemma separation_coverage_K_bound {l s : ℝ} (hl : 0 < l) (hs : 0 ≤ s) (hs1 : s ≤ 1) : + s*(separationK l s)^2 ≤ l⁻¹ := by + have hm := separationFloor_pos hl s + have hum := separation_floor_ge_sqrt l s + have hu0 := Real.sqrt_nonneg s + have hu1 : Real.sqrt s ≤ 1 := by nlinarith [Real.sq_sqrt hs] + have hsle : s ≤ separationFloor l s := by nlinarith [Real.sq_sqrt hs,mul_nonneg hu0 (sub_nonneg.mpr hu1)] + rw [separationK_sq hl,← div_eq_mul_inv] + apply (div_le_iff₀ (mul_pos hl hm)).mpr + rw [show l⁻¹*(l*separationFloor l s)=separationFloor l s by field_simp] + exact hsle + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationSupport.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..be7f2ecfe3a3e816f2dbe0e1a6c543c35c7691d2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationSupport.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FinalAssembly +import OAI.Analysis.WeakInfiniteness.SeparationCoreSelection +import OAI.Analysis.WeakInfiniteness.SeparationCoverage + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +universe u v + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {B : Type v} [CStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] in +lemma map_separationN (π : A →⋆ₙₐ[ℂ] B) (X : A) {l : ℝ} (hl : 0 < l) : + π (cfcₙ (separationN l) (star X*X))=cfc (separationN l) (star (π X)*π X) := by + rw [π.map_cfcₙ (separationN l) (star X*X) (continuous_separationN l).continuousOn + (separationN_zero hl) (by fun_prop) (IsSelfAdjoint.star_mul_self X) ((IsSelfAdjoint.star_mul_self X).map π), + map_mul,map_star,cfcₙ_eq_cfc (continuous_separationN l).continuousOn (separationN_zero hl)] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma nonunital_separationGN (X : A) {l : ℝ} (hl : 0 < l) : + cfcₙ (separationG l) (star X*X)*cfcₙ (separationN l) (star X*X)= + cfcₙ (separationN l) (star X*X) := by + rw [← cfcₙ_mul _ _ _ (continuous_separationG l).continuousOn (separationG_zero hl) + (continuous_separationN l).continuousOn (separationN_zero hl)] + exact cfcₙ_congr (fun s _ => separationGN hl s) + +omit [PartialOrder A] [StarOrderedRing A] in +lemma nonunital_norm_separationN (X : A) (l : ℝ) : + ‖cfcₙ (separationN l) (star X*X)‖ ≤ 1 := by + apply norm_cfcₙ_le + intro s _ + change ‖spectralRamp (4*l) (Real.sqrt s)‖ ≤ 1 + rw [Real.norm_eq_abs,abs_of_nonneg (spectralRamp_nonneg _ _)] + exact spectralRamp_le_one _ _ + +lemma separation_core_comparisons + (hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a)) + (X C k : A) (hk : 0 ≤ k) {l τ : ℝ} (hl : 0 < l) (hτ : 0 < τ) + (hkdet : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),4*l ≤ ‖π X‖ → π k ≠ 0) : + let g := cfcₙ (separationG l) (star X*X) + let N := cfcₙ (separationN l) (star X*X) + let h := cfcₙ (columnCoreFunction τ) (star (C*g)*(C*g)) + let d := cfcₙ (columnCoreFunction (2*τ)) (star (C*N)*(C*N)) + ElementCuntzSubequiv d h ∧ ElementCuntzSubequiv d k := by + dsimp only + let g := cfcₙ (separationG l) (star X*X) + let N := cfcₙ (separationN l) (star X*X) + let h := cfcₙ (columnCoreFunction τ) (star (C*g)*(C*g)) + let d := cfcₙ (columnCoreFunction (2*τ)) (star (C*N)*(C*N)) + have hh : 0 ≤ h := cfcₙ_nonneg (fun s _ => le_max_right _ _) + have hd : 0 ≤ d := cfcₙ_nonneg (fun s _ => le_max_right _ _) + have hnlt (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) (hπd : π d ≠ 0) : + 2*τ < ‖π (C*N)‖ := by + have hn := norm_pos_iff.mpr hπd + rw [show d=cfcₙ (columnCoreFunction (2*τ)) (star (C*N)*(C*N)) from rfl, + map_column_core_norm π (C*N) (by positivity)] at hn + exact sub_pos.mp ((lt_max_iff.mp hn).resolve_right (lt_irrefl 0)) + constructor + · apply elementCuntz_of_primitive_support hpi hd hh + intro H π _ hπd + have hlt := hnlt H π hπd + have hn : ‖π (C*N)‖ ≤ ‖π (C*g)‖ := by + have he : C*N=(C*g)*N := by rw [mul_assoc,nonunital_separationGN X hl] + rw [he,map_mul] + have hN : ‖π N‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le π _).trans (nonunital_norm_separationN X l) + exact (norm_mul_le _ _).trans (by nlinarith [norm_nonneg (π (C*g))]) + apply norm_pos_iff.mp + rw [show h=cfcₙ (columnCoreFunction τ) (star (C*g)*(C*g)) from rfl, + map_column_core_norm π (C*g) hτ.le] + exact lt_of_lt_of_le (by linarith : 0 < ‖π (C*g)‖-τ) (le_max_left _ _) + · apply elementCuntz_of_primitive_support hpi hd hk + intro H π _ hπd + apply hkdet H π + by_contra hn + have hN : π N=0 := by + rw [show N=cfcₙ (separationN l) (star X*X) from rfl,map_separationN π X hl] + exact separationN_eq_zero_of_norm_le _ hl (le_of_lt (lt_of_not_ge hn)) + have hnlt' := hnlt H π hπd + rw [map_mul,hN,mul_zero,norm_zero] at hnlt' + linarith + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SeparationTransferredCoverage.lean b/lean/OAI/Analysis/WeakInfiniteness/SeparationTransferredCoverage.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b215a255ce46eab33b521594e73db2618591ef4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SeparationTransferredCoverage.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.SeparationCoreSelection +import OAI.Analysis.WeakInfiniteness.SeparationNormCoverage + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +universe u + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma separation_transferred_coverage + (a x₀ x₁ C N : A) (K F Y : Unitization ℂ A) {r l τ c : ℝ} + (hr : 0 < r) (hl : 0 < l) (hτ : τ=r*Real.sqrt l/8) (hc : c ≤ 4) + (haeq : (a : Unitization ℂ A)=(x₀ : Unitization ℂ A)+((C : Unitization ℂ A)*(N : Unitization ℂ A))*K) + (hx₁ : (x₁ : Unitization ℂ A)=(((Real.sqrt l)⁻¹ : ℝ) : ℂ) • Y) + (hK : ‖K‖ ≤ (Real.sqrt l)⁻¹) (hF : ‖F‖ ≤ τ⁻¹) + (hdet : ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + τ ≤ ‖π (cfcₙ (columnCoreFunction (2*τ)) (star (C*N)*(C*N)))‖ → + c ≤ ‖(Unitization.starLift π) (F*Y)‖) : + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),r ≤ ‖π a‖ → + r*c/8 ≤ max ‖π x₀‖ ‖π x₁‖ := by + intro H π hπ + let φ := Unitization.starLift π + have hτpos : 0 < τ := by rw [hτ]; positivity + have hD : ‖π (C*N)‖=‖φ (C : Unitization ℂ A)*φ (N : Unitization ℂ A)‖ := by + rw [← map_mul,← Unitization.inr_mul,starLift_inr_apply_general] + have hFπ : ‖φ F‖ ≤ τ⁻¹ := (NonUnitalStarAlgHom.norm_apply_le φ.toNonUnitalStarAlgHom _).trans hF + have hKπ : ‖φ K‖ ≤ (Real.sqrt l)⁻¹ := (NonUnitalStarAlgHom.norm_apply_le φ.toNonUnitalStarAlgHom _).trans hK + have hxπ : φ (x₁ : Unitization ℂ A)=(((Real.sqrt l)⁻¹ : ℝ) : ℂ) • φ Y := by rw [hx₁,map_smul] + have haπ : φ (a : Unitization ℂ A)=φ (x₀ : Unitization ℂ A)+ + (φ (C : Unitization ℂ A)*φ (N : Unitization ℂ A))*φ K := by + rw [haeq,map_add,map_mul,map_mul] + have ht := separation_column_coverage (φ (a : Unitization ℂ A)) (φ (x₀ : Unitization ℂ A)) + (φ (C : Unitization ℂ A)) (φ (N : Unitization ℂ A)) (φ K) (φ F) (φ Y) + hr hl hτ hc (by simpa only [φ,starLift_inr_apply_general] using hπ) haπ hKπ hFπ + (fun hd => by + rw [← map_mul] + apply hdet H π + rw [map_column_core_norm π (C*N) (by positivity),hD] + exact hd) + rw [← hxπ] at ht + simpa only [φ,starLift_inr_apply_general] using ht + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SmallCStar.lean b/lean/OAI/Analysis/WeakInfiniteness/SmallCStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..47cdaaf854fbfb55c6bd9aeaa4c930cd22867994 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SmallCStar.lean @@ -0,0 +1,92 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +universe u v + +lemma small_of_separable_metric (X : Type u) [MetricSpace X] [SeparableSpace X] + [Nonempty X] : Small.{0} X := by + apply small_of_injective (f := fun x : X => fun n : ℕ => dist x (denseSeq X n)) + intro x y h + have he : (fun z : X => dist x z)=(fun z : X => dist y z) := + (denseRange_denseSeq X).equalizer (by fun_prop) (by fun_prop) h + have hy := congrFun he x + simpa only [dist_self,eq_comm,dist_eq_zero] using hy + +def SmallCStarCarrier (A : Type u) [Small.{0} A] := Shrink.{0} A + +section SmallTransport + +variable (A : Type u) [CStarAlgebra A] [Small.{0} A] + +def smallCStarEquiv : SmallCStarCarrier A ≃ A := (equivShrink A).symm + +instance smallCStarNormedRing : NormedRing (SmallCStarCarrier A) := (smallCStarEquiv A).normedRing + +instance smallCStarAlgebraStruct : Algebra ℂ (SmallCStarCarrier A) := (smallCStarEquiv A).algebra ℂ + +instance smallCStarNormedSpace : NormedSpace ℂ (SmallCStarCarrier A) := + AddEquiv.normedSpace ℂ (smallCStarEquiv A).addEquiv + +instance smallCStarStarRing : StarRing (SmallCStarCarrier A) := (smallCStarEquiv A).starRing + +instance smallCStarStarModule : StarModule ℂ (SmallCStarCarrier A) := (smallCStarEquiv A).starModule ℂ + +lemma smallCStarEquiv_isometry : Isometry (smallCStarEquiv A) := by + intro x y + rfl + +instance smallCStarComplete : CompleteSpace (SmallCStarCarrier A) := + (show SmallCStarCarrier A ≃ᵢ A from + { smallCStarEquiv A with isometry_toFun := smallCStarEquiv_isometry A }).completeSpace + +instance smallCStarCStar : CStarAlgebra (SmallCStarCarrier A) where + norm_smul_le r x := by + change ‖smallCStarEquiv A ((smallCStarEquiv A).symm (r • smallCStarEquiv A x))‖ ≤ _ + rw [Equiv.apply_symm_apply] + exact norm_smul_le r (smallCStarEquiv A x) + norm_mul_self_le x := by + change ‖smallCStarEquiv A x‖ * ‖smallCStarEquiv A x‖ ≤ + ‖smallCStarEquiv A (star x*x)‖ + change ‖smallCStarEquiv A x‖ * ‖smallCStarEquiv A x‖ ≤ + ‖smallCStarEquiv A ((smallCStarEquiv A).symm + (smallCStarEquiv A ((smallCStarEquiv A).symm (star (smallCStarEquiv A x))) * smallCStarEquiv A x))‖ + simp only [Equiv.apply_symm_apply] + exact CStarRing.norm_mul_self_le _ + +def smallCStarStarAlgEquiv : SmallCStarCarrier A ≃⋆ₐ[ℂ] A := + { (smallCStarEquiv A).algEquiv ℂ with + map_smul' := fun r x => by + change smallCStarEquiv A ((smallCStarEquiv A).symm (r • smallCStarEquiv A x))=_ + exact Equiv.apply_symm_apply _ _ + map_star' := fun x => by + change smallCStarEquiv A ((smallCStarEquiv A).symm (star (smallCStarEquiv A x)))=_ + exact Equiv.apply_symm_apply _ _ } + +end SmallTransport + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SmallFree.lean b/lean/OAI/Analysis/WeakInfiniteness/SmallFree.lean new file mode 100644 index 0000000000000000000000000000000000000000..d36af43049759afd4718b31333bfcbce70e4c8d6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SmallFree.lean @@ -0,0 +1,48 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ReducedOperators +import OAI.Analysis.WeakInfiniteness.SmallCStar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +instance fullGroup_separable {G : Type*} [Group G] [Countable G] : + SeparableSpace (FullGroupAlgebra G) := by + have hs : IsSeparable (fullGroupSubalgebra G : Set (FullGroupAmbient G)) := by + rw [fullGroupSubalgebra_eq_closure_span] + exact (Set.countable_range (fullGroupOperator (G := G))).isSeparable.span.closure + exact hs.separableSpace + +instance fullGroup_small {G : Type*} [Group G] [Countable G] : Small.{0} (FullGroupAlgebra G) := + small_of_separable_metric _ + +instance reducedFreeLarge_separable : SeparableSpace ReducedFreeLarge := by + have hs := isSeparable_range (starHom_continuous fullToReducedLarge) + rw [Set.range_eq_univ.mpr fullToReducedLarge_surjective] at hs + exact isSeparable_univ_iff.mp hs + +instance reducedFreeLarge_small : Small.{0} ReducedFreeLarge := small_of_separable_metric _ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SmallPartition.lean b/lean/OAI/Analysis/WeakInfiniteness/SmallPartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0aa61956f837e77dfa748b1d9d943afd9448936 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SmallPartition.lean @@ -0,0 +1,52 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped BigOperators Topology + +lemma exists_small_partition (K : Set ℝ) (hK : IsCompact K) {δ : ℝ} (hδ : 0 < δ) : + ∃ n : ℕ, ∃ c : Fin n → ℝ, ∃ f : Fin n → C(ℝ,ℝ), + (∀ i, tsupport (f i) ⊆ Metric.ball (c i) δ) ∧ + (∀ x ∈ K, ∑ i,f i x=1) ∧ (∀ i x,0 ≤ f i x ∧ f i x ≤ 1) := by + classical + obtain ⟨s,hs⟩ := hK.elim_finite_subcover (fun c : ℝ => Metric.ball c δ) + (fun _ => Metric.isOpen_ball) (by + intro x _ + exact Set.mem_iUnion.mpr ⟨x,by simpa using hδ⟩) + let e : Fin s.card ≃ s := by simpa using (Fintype.equivFin s).symm + let c : Fin s.card → ℝ := fun i => (e i).val + have hcover : K ⊆ ⋃ i, Metric.ball (c i) δ := by + intro x hx + obtain ⟨y,hxy⟩ := Set.mem_iUnion.mp (hs hx) + obtain ⟨hy',hxy'⟩ := Set.mem_iUnion.mp hxy + exact Set.mem_iUnion.mpr ⟨e.symm ⟨y,hy'⟩,by simpa [c] using hxy'⟩ + obtain ⟨f,hf,hfs,hn,_⟩ := exists_continuous_sum_one_of_isOpen_isCompact + (s := fun i : Fin s.card => Metric.ball (c i) δ) + (fun _ => Metric.isOpen_ball) hK hcover + refine ⟨s.card,c,f,hf,?_,hn⟩ + intro x hx + simpa using hfs hx + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SpatialVectorStates.lean b/lean/OAI/Analysis/WeakInfiniteness/SpatialVectorStates.lean new file mode 100644 index 0000000000000000000000000000000000000000..9327aae186359c132ec2508a3a7de001b68b424b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SpatialVectorStates.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +universe u v + +section SpatialVectorStates + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def spatialVectorFunctional (π : SpatialRepresentation A B) (ξ : π.space) : + SpatialAmbient A B →L[ℂ] ℂ := + LinearMap.mkContinuous + { toFun z := inner ℂ ξ (z π ξ) + map_add' x y := by + change inner ℂ ξ ((x π + y π) ξ) = _ + simp only [add_apply, inner_add_right] + map_smul' c x := by + change inner ℂ ξ (c • (x π ξ)) = c • inner ℂ ξ (x π ξ) + exact inner_smul_right ξ (x π ξ) c } + (‖ξ‖ * ‖ξ‖) (by + intro z + calc + ‖inner ℂ ξ (z π ξ)‖ ≤ ‖ξ‖ * ‖z π ξ‖ := norm_inner_le_norm _ _ + _ ≤ ‖ξ‖ * (‖z π‖ * ‖ξ‖) := mul_le_mul_of_nonneg_left ((z π).le_opNorm ξ) (norm_nonneg _) + _ ≤ ‖ξ‖ * (‖z‖ * ‖ξ‖) := mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right (lp.norm_apply_le_norm ENNReal.top_ne_zero z π) (norm_nonneg _)) + (norm_nonneg _) + _ = (‖ξ‖ * ‖ξ‖) * ‖z‖ := by ring) + +lemma norm_spatialVectorFunctional_le (π : SpatialRepresentation A B) (ξ : π.space) : + ‖spatialVectorFunctional π ξ‖ ≤ ‖ξ‖ * ‖ξ‖ := + LinearMap.mkContinuous_norm_le _ (mul_self_nonneg _) _ + +@[simp] +lemma spatialVectorFunctional_elementary (π : SpatialRepresentation A B) + (ξ : π.left ⊗[ℂ] π.right) (a : A) (b : B) : + spatialVectorFunctional π (ξ : π.space) (spatialElementary a b) = + inner ℂ ξ (TensorProduct.mapL (π.leftRep a) (π.rightRep b) ξ) := by + change inner ℂ (ξ : Completion _) ((TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + (ξ : Completion _)) = _ + simp only [ContinuousLinearMap.completion_apply_coe, Completion.inner_coe] + +end SpatialVectorStates + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SpectralCut.lean b/lean/OAI/Analysis/WeakInfiniteness/SpectralCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..490353b19f435203e07e86f6303c556b75230be4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SpectralCut.lean @@ -0,0 +1,139 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +open scoped Topology CStarAlgebra + +def spectralRamp (θ s : ℝ) : ℝ := min 1 (max 0 ((s-θ)/θ)) + +lemma continuous_spectralRamp (θ : ℝ) : Continuous (spectralRamp θ) := by + unfold spectralRamp + fun_prop + +lemma spectralRamp_nonneg (θ s : ℝ) : 0 ≤ spectralRamp θ s := + le_min zero_le_one (le_max_left _ _) + +lemma spectralRamp_le_one (θ s : ℝ) : spectralRamp θ s ≤ 1 := min_le_left _ _ + +lemma spectralRamp_eq_zero {θ s : ℝ} (hθ : 0 < θ) (hs : s ≤ θ) : + spectralRamp θ s = 0 := by + unfold spectralRamp + rw [max_eq_left (div_nonpos_of_nonpos_of_nonneg (sub_nonpos.mpr hs) hθ.le)] + exact min_eq_right zero_le_one + +lemma spectralRamp_eq_one {θ s : ℝ} (hθ : 0 < θ) (hs : 2*θ ≤ s) : + spectralRamp θ s = 1 := by + unfold spectralRamp + apply min_eq_left + apply le_trans _ (le_max_right _ _) + rw [le_div_iff₀ hθ] + linarith + +lemma spectralRamp_coercive {θ : ℝ} (hθ : 0 < θ) (s : ℝ) : + θ*(spectralRamp θ s*spectralRamp θ s) ≤ spectralRamp θ s*s*spectralRamp θ s := by + by_cases hs : s ≤ θ + · rw [spectralRamp_eq_zero hθ hs] + simp + · have h : θ ≤ s := le_of_lt (lt_of_not_ge hs) + nlinarith [mul_le_mul_of_nonneg_right h (mul_self_nonneg (spectralRamp θ s))] + +lemma spectralRamp_dominates {θ L : ℝ} (hθ : 0 < θ) (hL : 0 ≤ L) + (f : ℝ → ℝ) (hzero : ∀ s, s ≤ 2*θ → f s = 0) + (hbound : ∀ s, f s ≤ L) (s : ℝ) : + f s ≤ L*(spectralRamp θ s*spectralRamp θ s) := by + by_cases hs : s ≤ 2*θ + · rw [hzero s hs] + exact mul_nonneg hL (mul_self_nonneg _) + · rw [spectralRamp_eq_one hθ (le_of_lt (lt_of_not_ge hs)), one_mul, mul_one] + exact hbound s + +section Algebra + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma conjugate_perturbation_lower (x y z : A) (hx : IsSelfAdjoint x) + (hy : IsSelfAdjoint y) (hz : IsSelfAdjoint z) {δ : ℝ} + (hclose : ‖x-y‖ ≤ δ) : z*x*z - δ • (z*z) ≤ z*y*z := by + have hsq : 0 ≤ z*z := by simpa only [hz.star_eq] using star_mul_self_nonneg z + have h := CStarAlgebra.star_left_conjugate_le_norm_smul z (x - y) (hx.sub hy) + rw [hz.star_eq] at h + have h' : z*(x-y)*z ≤ δ • (z*z) := h.trans (smul_le_smul_of_nonneg_right hclose hsq) + have he : z*(x-y)*z = z*x*z-z*y*z := by noncomm_ring + rw [he] at h' + exact sub_le_iff_le_add.mpr ((sub_le_iff_le_add.mp h').trans_eq (add_comm _ _)) + +lemma spectralRamp_algebra_coercive (x : A) (hx : 0 ≤ x) {θ : ℝ} (hθ : 0 < θ) : + θ • (cfcₙ (spectralRamp θ) x*cfcₙ (spectralRamp θ) x) ≤ + cfcₙ (spectralRamp θ) x*x*cfcₙ (spectralRamp θ) x := by + have hg := (continuous_spectralRamp θ).continuousOn (s := quasispectrum ℝ x) + have hg0 : spectralRamp θ 0 = 0 := spectralRamp_eq_zero hθ hθ.le + have hm := cfcₙ_mono (a := x) (fun s _ => spectralRamp_coercive hθ s) + (by fun_prop) (by fun_prop) (by simp [hg0]) (by simp [hg0]) + rw [cfcₙ_const_mul θ (fun s => spectralRamp θ s*spectralRamp θ s) x + (by fun_prop) (by simp [hg0]), + cfcₙ_mul (spectralRamp θ) (spectralRamp θ) x hg hg0 hg hg0, + cfcₙ_mul (fun s => spectralRamp θ s*s) (spectralRamp θ) x + (by fun_prop) (by simp [hg0]) hg hg0, + cfcₙ_mul (spectralRamp θ) (fun s : ℝ => s) x hg hg0 continuousOn_id rfl, + cfcₙ_id' ℝ x hx.isSelfAdjoint] at hm + exact hm + +lemma spectralRamp_algebra_dominates (x : A) {θ L : ℝ} (hθ : 0 < θ) (hL : 0 ≤ L) + (f : ℝ → ℝ) (hf : Continuous f) (hf0 : f 0 = 0) + (hzero : ∀ s, s ≤ 2*θ → f s = 0) (hbound : ∀ s, f s ≤ L) : + cfcₙ f x ≤ L • (cfcₙ (spectralRamp θ) x*cfcₙ (spectralRamp θ) x) := by + have hg := (continuous_spectralRamp θ).continuousOn (s := quasispectrum ℝ x) + have hg0 : spectralRamp θ 0 = 0 := spectralRamp_eq_zero hθ hθ.le + have hm := cfcₙ_mono (a := x) (fun s _ => spectralRamp_dominates hθ hL f hzero hbound s) + hf.continuousOn (by fun_prop) hf0 (by simp [hg0]) + rw [cfcₙ_const_mul L (fun s => spectralRamp θ s*spectralRamp θ s) x + (by fun_prop) (by simp [hg0]), + cfcₙ_mul (spectralRamp θ) (spectralRamp θ) x hg hg0 hg hg0] at hm + exact hm + +lemma spectralRamp_domination (x y : A) (hx : 0 ≤ x) (hy : 0 ≤ y) + {θ L : ℝ} (hθ : 0 < θ) (hL : 0 ≤ L) (hclose : ‖y-x‖ ≤ θ/2) + (f : ℝ → ℝ) (hf : Continuous f) (hf0 : f 0 = 0) + (hzero : ∀ s, s ≤ 2*θ → f s = 0) (hbound : ∀ s, f s ≤ L) : + cfcₙ f x ≤ (2*L/θ) • (cfcₙ (spectralRamp θ) x*y*cfcₙ (spectralRamp θ) x) := by + let z := cfcₙ (spectralRamp θ) x + have hz : 0 ≤ z := cfcₙ_nonneg (fun s _ => spectralRamp_nonneg θ s) + have hclose' : ‖x-y‖ ≤ θ/2 := by rwa [norm_sub_rev] + have hp := conjugate_perturbation_lower x y z hx.isSelfAdjoint hy.isSelfAdjoint hz.isSelfAdjoint hclose' + have hp' : (θ/2) • (z*z) ≤ z*y*z := by + have hco : θ • (z*z) ≤ z*x*z := spectralRamp_algebra_coercive x hx hθ + calc + (θ/2) • (z*z) = θ • (z*z) - (θ/2) • (z*z) := by + rw [← sub_smul]; congr 1; ring + _ ≤ z*x*z - (θ/2) • (z*z) := sub_le_sub_right hco _ + _ ≤ z*y*z := hp + have hc : 0 ≤ 2*L/θ := by positivity + calc + cfcₙ f x ≤ L • (z*z) := spectralRamp_algebra_dominates x hθ hL f hf hf0 hzero hbound + _ = (2*L/θ) • ((θ/2) • (z*z)) := by + rw [smul_smul] + congr 1 + field_simp + _ ≤ (2*L/θ) • (z*y*z) := smul_le_smul_of_nonneg_left hp' hc + +end Algebra + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SpectralDeletion.lean b/lean/OAI/Analysis/WeakInfiniteness/SpectralDeletion.lean new file mode 100644 index 0000000000000000000000000000000000000000..6da0c073effb35f7ac5b9ff0dc9ca1a3c8e0e067 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SpectralDeletion.lean @@ -0,0 +1,153 @@ +import Mathlib + +namespace OAI + +noncomputable section + +namespace WeakPureInfiniteness + +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + + + +open scoped BigOperators CStarAlgebra + +section PositiveDiagonal + +variable {A : Type*} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma sqrt_mul_eq_zero_of_sandwich_eq_zero {a e : A} (ha : 0 ≤ a) + (he : IsSelfAdjoint e) (h : e*a*e=0) : CFC.sqrt a*e=0 := by + apply (CStarRing.star_mul_self_eq_zero_iff _).mp + rw [star_mul,he.star_eq,(CFC.sqrt_nonneg a).star_eq] + calc + (e*CFC.sqrt a)*(CFC.sqrt a*e)=e*(CFC.sqrt a*CFC.sqrt a)*e := by noncomm_ring + _ = 0 := by rw [CFC.sqrt_mul_sqrt_self a ha,h] + +end PositiveDiagonal + +section UnitPartition + +variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {ι : Type*} [Fintype ι] + +lemma eq_zero_of_nonneg_of_partition_diagonals {a : A} (ha : 0 ≤ a) + (e : ι → A) (he : ∀ i, IsSelfAdjoint (e i)) (hs : ∑ i,e i=1) + (hd : ∀ i,e i*a*e i=0) : a=0 := by + have hz : CFC.sqrt a=0 := by + calc + CFC.sqrt a=CFC.sqrt a*(∑ i,e i) := by rw [hs,mul_one] + _ = ∑ i,CFC.sqrt a*e i := Finset.mul_sum .. + _ = 0 := by simp only [sqrt_mul_eq_zero_of_sandwich_eq_zero ha (he _) (hd _), + Finset.sum_const_zero] + exact (CFC.sqrt_eq_zero_iff a ha).mp hz + +lemma both_signs_of_partition_diagonals {a : A} (ha : IsSelfAdjoint a) (hne : a ≠ 0) + (e : ι → A) (he : ∀ i, IsSelfAdjoint (e i)) (hs : ∑ i,e i=1) + (hd : ∀ i,e i*a*e i=0) : a⁺ ≠ 0 ∧ a⁻ ≠ 0 := by + constructor + · intro h + have han : 0 ≤ -a := neg_nonneg.mpr ((CFC.posPart_eq_zero_iff a ha).mp h) + have hz := eq_zero_of_nonneg_of_partition_diagonals han e he hs (by simpa using hd) + exact hne (neg_eq_zero.mp hz) + · intro h + exact hne (eq_zero_of_nonneg_of_partition_diagonals + ((CFC.negPart_eq_zero_iff a ha).mp h) e he hs hd) + +end UnitPartition + +section FiniteDeletion + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +variable {ι κ : Type*} [Fintype ι] + +def finiteDeletion (f : ι → A) (V : A) (R : ι → ι → Prop) [DecidableRel R] : A := + ∑ j, ∑ k, if R j k then f j*V*f k else 0 + +lemma finiteDeletion_selfAdjoint (f : ι → A) (V : A) (R : ι → ι → Prop) + [DecidableRel R] (hf : ∀ j, IsSelfAdjoint (f j)) (hV : IsSelfAdjoint V) + (hR : ∀ j k,R j k ↔ R k j) : IsSelfAdjoint (finiteDeletion f V R) := by + show star (finiteDeletion f V R)=finiteDeletion f V R + simp only [finiteDeletion, star_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + by_cases h : R j k + · rw [ite_eq_left h,ite_eq_left ((hR j k).mp h),star_mul,star_mul,(hf j).star_eq, + (hf k).star_eq,hV.star_eq] + noncomm_ring + · rw [ite_eq_right h,ite_eq_right (by simpa only [← hR j k] using h),star_zero] + +lemma finiteDeletion_diagonals (f : ι → A) (V : A) (R : ι → ι → Prop) + [DecidableRel R] (e : κ → A) + (h : ∀ l j k,R j k → e l*f j=0 ∨ f k*e l=0) : + ∀ l,e l*finiteDeletion f V R*e l=0 := by + intro l + simp only [finiteDeletion,Finset.mul_sum,Finset.sum_mul] + apply Finset.sum_eq_zero + intro j _ + apply Finset.sum_eq_zero + intro k _ + by_cases hjk : R j k + · rw [ite_eq_left hjk] + rcases h l j k hjk with hleft | hright + · rw [← mul_assoc,← mul_assoc,hleft,zero_mul,zero_mul,zero_mul] + · calc + e l*(f j*V*f k)*e l=e l*f j*V*(f k*e l) := by noncomm_ring + _ = 0 := by rw [hright,mul_zero] + · simp only [ite_eq_right hjk,mul_zero,zero_mul] + +end FiniteDeletion + + +variable {A : Type*} [CStarAlgebra A] + +variable {ι : Type*} [Fintype ι] + +lemma finiteDeletion_preserves_corner (f : ι → A) (V p q : A) + (R : ι → ι → Prop) [DecidableRel R] (hs : ∑ i,f i=1) + (h : ∀ j k,¬R j k → p*f j=0 ∨ f k*q=0) : + p*finiteDeletion f V R*q=p*V*q := by + calc + p*finiteDeletion f V R*q=∑ j,∑ k,p*(f j*V*f k)*q := by + simp only [finiteDeletion,Finset.mul_sum,Finset.sum_mul] + apply Finset.sum_congr rfl + intro j _ + apply Finset.sum_congr rfl + intro k _ + by_cases hjk : R j k + · rw [ite_eq_left hjk] + · rw [ite_eq_right hjk,mul_zero,zero_mul] + rcases h j k hjk with hleft | hright + · rw [← mul_assoc,← mul_assoc,hleft,zero_mul,zero_mul,zero_mul] + · symm + calc + p*(f j*V*f k)*q=p*f j*V*(f k*q) := by noncomm_ring + _ = 0 := by rw [hright,mul_zero] + _ = p*((∑ j,f j)*V*(∑ k,f k))*q := by + simp only [Finset.mul_sum,Finset.sum_mul] + exact Finset.sum_comm + _ = p*V*q := by rw [hs,one_mul,mul_one] + + + + +end WeakPureInfiniteness + +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SpectralResidual.lean b/lean/OAI/Analysis/WeakInfiniteness/SpectralResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..4822b0732b833b3404c821c1b79bc41197300662 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SpectralResidual.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SeparatedSpectralWindows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma residual_eq_unital (e h : A) : residual e h=(1-e)*h*(1-e) := by + unfold residual + noncomm_ring + +lemma exists_windows_of_single_nonzero_spectral_value + (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + (π : A →⋆ₐ[ℂ] B) {U p q : A} (hU : IsSelfAdjoint U) (hUD : U ∈ D) + (hp : IsSelfAdjoint p) (hpD : p ∈ D) (hpq : p*q=0) (hc : π (p*U*q) ≠ 0) + {t : ℝ} (ht : t ∈ spectrum ℝ (π U)) (ht0 : t ≠ 0) + (honly : ∀ s ∈ spectrum ℝ (π U),s=0 ∨ s=t) : + ∃ u ∈ D,∃ v ∈ D,0 ≤ u ∧ 0 ≤ v ∧ u*v=0 ∧ π u ≠ 0 ∧ π v ≠ 0 ∧ + ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ ContinuouslySupported U u S ∧ + ContinuouslySupported U v T ∧ (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) := by + let r := |t|/4 + have hr : 0 < r := by dsimp [r]; exact div_pos (abs_pos.mpr ht0) (by norm_num) + let f : C(ℝ,ℝ) := ⟨spectralTent t (r/2),spectralTent_continuous t (r/2)⟩ + let E : C(ℝ,ℝ) := ⟨spectralPlateau t r,spectralPlateau_continuous t r⟩ + have hf0 : f 0=0 := spectralTent_zero (by positivity) (by dsimp [r]; simp; linarith [abs_nonneg t]) + have hE0 : E 0=0 := spectralPlateau_zero hr (by dsimp [r]; simp; linarith [abs_nonneg t]) + have hEt : E t=1 := spectralPlateau_one hr (by simp; exact hr.le) + let e := cfc E U + have heSA : IsSelfAdjoint e := cfc_predicate E U + let u := cfc f U + let v := residual e (p*p) + have heD : e ∈ D := cfc_mem_of_zero D hUD E hE0 + have hp2 : p*p ∈ D := D.mul_mem hpD hpD + have hvD : v ∈ D := D.add_mem (D.sub_mem (D.sub_mem hp2 (D.mul_mem heD hp2)) + (D.mul_mem hp2 heD)) (D.mul_mem (D.mul_mem heD hp2) heD) + have hUe : π U=t • π e := by + dsimp only [e] + rw [π.map_cfc E U E.continuous.continuousOn (by fun_prop) hU (hU.map π), + ← cfc_const_mul t E (π U) E.continuous.continuousOn] + calc + π U=cfc (fun s : ℝ => s) (π U) := (cfc_id' ℝ _ (hU.map π)).symm + _ = cfc (fun s => t*E s) (π U) := by + apply cfc_congr + intro s hs + change s=t*E s + rcases honly s hs with rfl | rfl + · rw [hE0,mul_zero] + · rw [hEt,mul_one] + have hvn : π v ≠ 0 := by + intro hz + have he : π ((1-e)*p)=0 := by + apply (CStarRing.mul_star_self_eq_zero_iff _).mp + have hv : ((1-e)*p)*star ((1-e)*p)=v := by + dsimp only [v] + rw [residual_eq_unital] + simp only [star_mul,hp.star_eq,star_sub,star_one,heSA.star_eq] + noncomm_ring + rw [← map_star,← map_mul,hv,hz] + have hep : π e*π p=π p := by + rw [map_mul,map_sub,map_one,sub_mul,one_mul] at he + exact (sub_eq_zero.mp he).symm + have hpe : π p*π e=π p := by + have hh := congrArg star hep + simpa only [star_mul,← map_star,hp.star_eq,heSA.star_eq] using hh + apply hc + rw [map_mul,map_mul,hUe,mul_smul_comm,smul_mul_assoc,hpe,← map_mul,hpq,map_zero,smul_zero] + have hfE : u*(1-e)=0 ∧ (1-e)*u=0 := by + have hf : ContinuouslySupported U u (Metric.closedBall t (r/2)) := + continuouslySupported_cfc U f _ (tent_support_subset t (r/2) (by positivity)) + let g : C(ℝ,ℝ) := 1-E + have hgf : ∀ x ∈ Metric.closedBall t (r/2),g x=0 := by + intro x hx + change 1-spectralPlateau t r x=0 + rw [spectralPlateau_one hr (by + have hx' : |x-t| ≤ r/2 := by simpa only [Metric.mem_closedBall,Real.dist_eq] using hx + linarith),sub_self] + have hh := hf g hgf + have hg : cfc g U=1-e := by + change cfc (fun x => 1-E x) U=1-e + rw [cfc_sub (fun _ : ℝ => 1) E U continuousOn_const E.continuous.continuousOn, + cfc_const_one ℝ U hU] + rwa [hg] at hh + have huv : u*v=0 := by + dsimp only [v] + rw [residual_eq_unital,← mul_assoc,← mul_assoc,hfE.1,zero_mul,zero_mul] + have hvS : ContinuouslySupported U v {s : ℝ | r ≤ dist s t} := by + intro g hg + have hEg : (1-e)*cfc g U=0 ∧ cfc g U*(1-e)=0 := by + have hzero : (fun s : ℝ => (1-E s)*g s)=(0 : ℝ → ℝ) := by + funext s + change (1-E s)*g s=0 + by_cases hs : r ≤ dist s t + · rw [hg s hs,mul_zero] + · have hs' : |s-t| ≤ r := by simpa only [Real.dist_eq] using (le_of_lt (lt_of_not_ge hs)) + change (1-spectralPlateau t r s)*g s=0 + rw [spectralPlateau_one hr hs',sub_self,zero_mul] + have hmap : cfc (fun s : ℝ => 1-E s) U=1-e := by + rw [cfc_sub (fun _ : ℝ => 1) E U continuousOn_const E.continuous.continuousOn, + cfc_const_one ℝ U hU] + constructor + · rw [← hmap,← cfc_mul (fun s : ℝ => 1-E s) g U + (by fun_prop) g.continuous.continuousOn,hzero,cfc_zero ℝ U] + · rw [← hmap,← cfc_mul g (fun s : ℝ => 1-E s) U + g.continuous.continuousOn (by fun_prop)] + have heq : (fun s : ℝ => g s*(1-E s))=(0 : ℝ → ℝ) := by + simpa only [mul_comm] using hzero + rw [heq,cfc_zero ℝ U] + constructor + · dsimp only [v] + rw [residual_eq_unital,mul_assoc,hEg.1,mul_zero] + · dsimp only [v] + rw [residual_eq_unital,← mul_assoc,← mul_assoc,hEg.2,zero_mul,zero_mul] + refine ⟨u,cfc_mem_of_zero D hUD f hf0,v,hvD, + cfc_nonneg (fun x _ => spectralTent_nonneg t (r/2) x), + residual_nonneg e (p*p) (cfc_predicate E U) (by simpa only [hp.star_eq] using star_mul_self_nonneg p), + huv,cfc_nonzero_of_spectral_value π hU f ht ?_,hvn, + Metric.closedBall t (r/2),{s : ℝ | r ≤ dist s t},r/2,by positivity, + continuouslySupported_cfc U f _ (tent_support_subset t (r/2) (by positivity)),hvS,?_⟩ + · change spectralTent t (r/2) t ≠ 0 + rw [spectralTent_center]; exact one_ne_zero + · intro x hx y hy + have hx' : dist x t ≤ r/2 := hx + have hy' : r ≤ dist y t := hy + have hh := dist_triangle y x t + rw [dist_comm y x] at hh + linarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SpectralWindows.lean b/lean/OAI/Analysis/WeakInfiniteness/SpectralWindows.lean new file mode 100644 index 0000000000000000000000000000000000000000..5083c967a0f4077bf432c75bce40ec0447a0d963 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SpectralWindows.lean @@ -0,0 +1,126 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ContinuousDeletion +import OAI.Analysis.WeakInfiniteness.LocalFamily + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +def spectralTent (t r x : ℝ) : ℝ := max (1-|x-t|/r) 0 + +lemma spectralTent_continuous (t r : ℝ) : Continuous (spectralTent t r) := by + unfold spectralTent; fun_prop + +lemma spectralTent_nonneg (t r x : ℝ) : 0 ≤ spectralTent t r x := le_max_right _ _ + +lemma spectralTent_center (t r : ℝ) : spectralTent t r t=1 := by + simp [spectralTent] + +lemma spectralTent_zero {t r x : ℝ} (hr : 0 < r) (hx : r ≤ |x-t|) : + spectralTent t r x=0 := by + apply max_eq_right + have : 1 ≤ |x-t|/r := (le_div_iff₀ hr).mpr (by simpa using hx) + linarith + +def spectralPlateau (t r x : ℝ) : ℝ := min 1 (max 0 (2-|x-t|/r)) + +lemma spectralPlateau_continuous (t r : ℝ) : Continuous (spectralPlateau t r) := by + unfold spectralPlateau; fun_prop + +lemma spectralPlateau_one {t r x : ℝ} (hr : 0 < r) (hx : |x-t| ≤ r) : + spectralPlateau t r x=1 := by + apply min_eq_left + have : |x-t|/r ≤ 1 := (div_le_iff₀ hr).mpr (by simpa using hx) + exact (by linarith : 1 ≤ 2-|x-t|/r).trans (le_max_right _ _) + +lemma spectralPlateau_zero {t r x : ℝ} (hr : 0 < r) (hx : 2*r ≤ |x-t|) : + spectralPlateau t r x=0 := by + unfold spectralPlateau + have : 2 ≤ |x-t|/r := (le_div_iff₀ hr).mpr (by linarith) + rw [max_eq_left (by linarith)] + exact min_eq_right zero_le_one + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + +lemma continuouslySupported_cfc (U : A) (f : C(ℝ,ℝ)) (S : Set ℝ) + (hf : ∀ x,f x ≠ 0 → x ∈ S) : ContinuouslySupported U (cfc f U) S := by + intro g hg + constructor + · rw [← cfc_mul f g U f.continuous.continuousOn g.continuous.continuousOn] + calc + cfc (fun x => f x*g x) U=cfc (0 : ℝ → ℝ) U := by + apply cfc_congr + intro x _ + change f x*g x=0 + by_cases hx : f x=0 + · rw [hx,zero_mul] + · rw [hg x (hf x hx),mul_zero] + _ = 0 := cfc_zero ℝ U + · rw [← cfc_mul g f U g.continuous.continuousOn f.continuous.continuousOn] + calc + cfc (fun x => g x*f x) U=cfc (0 : ℝ → ℝ) U := by + apply cfc_congr + intro x _ + change g x*f x=0 + by_cases hx : f x=0 + · rw [hx,mul_zero] + · rw [hg x (hf x hx),zero_mul] + _ = 0 := cfc_zero ℝ U + +lemma continuouslySupported_hereditary (U u : A) (hu : IsSelfAdjoint u) (S : Set ℝ) + (hs : ContinuouslySupported U u S) {v : A} (hv : v ∈ hereditarySubalgebra u hu) : + ContinuouslySupported U v S := by + intro g hg + constructor + · exact mul_zero_of_mem_hereditary_left hu (hs g hg).1 hv + · have hright := mul_zero_of_mem_hereditary_left hu (hs g hg).1 + (star_mem (s := hereditarySubalgebra u hu) hv) + have he := congrArg star hright + simpa only [star_mul,star_star,(cfc_predicate g U).star_eq,star_zero] using he + +lemma cfc_nonzero_of_spectral_value (π : A →⋆ₐ[ℂ] B) {U : A} (hU : IsSelfAdjoint U) + (f : C(ℝ,ℝ)) {t : ℝ} (ht : t ∈ spectrum ℝ (π U)) (hf : f t ≠ 0) : + π (cfc f U) ≠ 0 := by + rw [π.map_cfc f U f.continuous.continuousOn (by fun_prop) hU (hU.map π)] + intro hz + have he := norm_apply_le_norm_cfc f (π U) ht f.continuous.continuousOn (hU.map π) + rw [hz,norm_zero] at he + exact (not_le_of_gt (norm_pos_iff.mpr hf)) he + +lemma cfc_mem_of_zero (D : NonUnitalStarSubalgebra ℂ A) [IsClosed (D : Set A)] + {U : A} (hU : U ∈ D) (f : C(ℝ,ℝ)) (hf : f 0=0) : cfc f U ∈ D := by + rw [← cfcₙ_eq_cfc (f := (f : ℝ → ℝ)) (a := U) f.continuous.continuousOn hf] + exact cfcₙ_mem f hU + +lemma exists_nonzero_spectral_value {U : B} (hU : IsSelfAdjoint U) (hn : U ≠ 0) : + ∃ t ∈ spectrum ℝ U,t ≠ 0 := by + by_contra! h + apply hn + calc + U=cfc (fun x : ℝ => x) U := (cfc_id' ℝ U hU).symm + _ = cfc (0 : ℝ → ℝ) U := cfc_congr (fun x hx => h x hx) + _ = 0 := cfc_zero ℝ U + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce4d108a53f0a82f78c1a3087e25b61d2de1aab3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteSelection + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u v + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {H : Type v} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +def NonzeroOnNormSlice (D : NonUnitalStarSubalgebra ℂ A) (b : A) (α : ℝ) : Prop := + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + NonUnitalRepresentationIrreducible π → α ≤ ‖π b‖ → + ∃ h ∈ D,0 ≤ h ∧ π h ≠ 0 + +lemma exists_core_perturbationData {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)} (hπ : NonUnitalRepresentationIrreducible π) + {u v : A} (hu : 0 ≤ u) (hv : 0 ≤ v) (huv : u*v=0) (hun : π u ≠ 0) (hvn : π v ≠ 0) : + ∃ F : OrthogonalPerturbationData A n, + F.p ∈ hereditarySubalgebra u hu.isSelfAdjoint ∧ + F.q ∈ hereditarySubalgebra v hv.isSelfAdjoint ∧ π (positiveCut F.α F.c) ≠ 0 := by + obtain ⟨p,hpD,h,hhD,hp,hpn,hh,hph,hhn⟩ := exists_supported_positive_core π hu hun + obtain ⟨q,hqD,k,hkD,hq,hqn,hk,hqk,hkn⟩ := exists_supported_positive_core π hv hvn + obtain ⟨F,hFp,hFq,hFc⟩ := make_local_perturbationData hn hpi hπ p q h k hp hq hpn hqn + (mul_zero_of_hereditary hu.isSelfAdjoint hv.isSelfAdjoint huv hpD hqD) + hh hk hph hqk hhn hkn + exact ⟨F,by rwa [hFp],by rwa [hFq],hFc⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma image_hereditary_corner_zero (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)) + {a b p q x : A} (ha : IsSelfAdjoint a) (hb : IsSelfAdjoint b) + (hp : p ∈ hereditarySubalgebra a ha) (hq : q ∈ hereditarySubalgebra b hb) + (hz : π (a*x*b)=0) : π (p*x*q)=0 := by + have hc : IsClosed {p : A | π (p*x*q)=0} := isClosed_eq (by fun_prop) continuous_const + apply closure_minimal _ hc hp + rintro _ ⟨c,rfl⟩ + have hc' : IsClosed {q : A | π ((a*c*a)*x*q)=0} := isClosed_eq (by fun_prop) continuous_const + apply closure_minimal _ hc' hq + rintro _ ⟨d,rfl⟩ + change π ((a*c*a)*x*(b*d*b))=0 + have he : (a*c*a)*x*(b*d*b)=(a*c)*(a*x*b)*(d*b) := by noncomm_ring + rw [he,map_mul,map_mul,hz,mul_zero,zero_mul] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero2.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero2.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8c8a4d58d415df0d819436bd0c7703ff038e513 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero2.lean @@ -0,0 +1,60 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SquareZero + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_first_coupling_on_norm_slice + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ U ∈ D,IsSelfAdjoint U ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + ∃ p ∈ D,∃ q ∈ D,0 ≤ p ∧ 0 ≤ q ∧ p*q=0 ∧ π (p*U*q) ≠ 0 := by + obtain ⟨F,U,hUD,hU,hUF⟩ := exists_selected_finite_coupling_of_gap_one hσ hσγ hgap hA hn hpi + D hD b hb hα (fun _ _ => True) (by + intro H π hπ hπb + obtain ⟨c,hcD,hc,hcn⟩ := hlocal H π hπ hπb + obtain ⟨u,huD,v,hvD,hu,hv,huv,hun,hvn⟩ := exists_orthogonal_detected_pair hn hpi π hc hcn + obtain ⟨F,hFu,hFv,hFn⟩ := exists_core_perturbationData hn hpi hπ hu hv huv hun hvn + have huD' : u ∈ D := hereditarySubalgebra_le_of_mem hD hc.isSelfAdjoint hcD huD + have hvD' : v ∈ D := hereditarySubalgebra_le_of_mem hD hc.isSelfAdjoint hcD hvD + exact ⟨F,hereditarySubalgebra_le_of_mem hD hu.isSelfAdjoint huD' hFu, + hereditarySubalgebra_le_of_mem hD hv.isSelfAdjoint hvD' hFv,True.intro,hFn⟩) + refine ⟨U,hUD,hU,?_⟩ + intro H π hπb + obtain ⟨i,_,hin⟩ := hUF H π hπb + exact ⟨i.val.p,i.property.1,i.val.q,i.property.2.1,i.val.nonneg_p,i.val.nonneg_q, + i.val.orthogonal,hin⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero3.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero3.lean new file mode 100644 index 0000000000000000000000000000000000000000..19ec0fe747992b1ca4a627a5415fa54a71f1baae --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero3.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools +import OAI.Analysis.WeakInfiniteness.NonunitalSpectralTools2 +import OAI.Analysis.WeakInfiniteness.SquareZero2 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_second_coupling_on_norm_slice + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ U ∈ D,∃ V ∈ D,IsSelfAdjoint U ∧ IsSelfAdjoint V ∧ ∃ ρ : ℝ,0 < ρ ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + ∃ p q : A,∃ S T : Set ℝ, + ContinuouslySupported (U : Unitization ℂ A) (p : Unitization ℂ A) S ∧ + ContinuouslySupported (U : Unitization ℂ A) (q : Unitization ℂ A) T ∧ + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) ∧ π (p*V*q) ≠ 0 := by + classical + obtain ⟨U,hUD,hU,hUc⟩ := exists_first_coupling_on_norm_slice hσ hσγ hgap hA hn hpi D hD hb hα hlocal + let Q : A → A → Prop := fun p q => ∃ S T : Set ℝ,∃ ρ : ℝ,0 < ρ ∧ + ContinuouslySupported (U : Unitization ℂ A) (p : Unitization ℂ A) S ∧ + ContinuouslySupported (U : Unitization ℂ A) (q : Unitization ℂ A) T ∧ + (∀ x ∈ S,∀ y ∈ T,ρ ≤ dist x y) + obtain ⟨F,V,hVD,hV,hVc⟩ := exists_selected_finite_coupling_of_gap_one hσ hσγ hgap hA hn hpi + D hD b hb hα Q (by + intro H π hπ hπb + obtain ⟨p,hpD,q,_,hp,_,hpq,hpc⟩ := hUc H π hπb + obtain ⟨u,huD,v,hvD,hu,hv,huv,hun,hvn,S,T,ρ,hρ,huS,hvT,hST⟩ := + exists_nonunital_separated_spectral_windows D hD.1 π hU hUD hp.isSelfAdjoint hpD hpq hpc + obtain ⟨i,hip,hiq,hin⟩ := exists_core_perturbationData hn hpi hπ hu hv huv hun hvn + refine ⟨i,hereditarySubalgebra_le_of_mem hD hu.isSelfAdjoint huD hip, + hereditarySubalgebra_le_of_mem hD hv.isSelfAdjoint hvD hiq,?_,hin⟩ + exact ⟨S,T,ρ,hρ,continuouslySupported_hereditary_nonunital U u hu.isSelfAdjoint S huS hip, + continuouslySupported_hereditary_nonunital U v hv.isSelfAdjoint T hvT hiq,hST⟩) + let I := {F : OrthogonalPerturbationData A n // F.p ∈ D ∧ F.q ∈ D ∧ Q F.p F.q} + choose S T r hr hp hq hsep using fun i : I => i.property.2.2 + have hmin : ∃ ρ : ℝ,0 < ρ ∧ ∀ i ∈ F,ρ ≤ r i := by + clear hVc + induction F using Finset.induction_on with + | empty => exact ⟨1,zero_lt_one,by simp⟩ + | @insert i F _ ih => + obtain ⟨ρ,hρ,hρF⟩ := ih + refine ⟨min (r i) ρ,lt_min (hr i) hρ,?_⟩ + intro j hj + rcases Finset.mem_insert.mp hj with rfl | hj + · exact min_le_left _ _ + · exact (min_le_right _ _).trans (hρF j hj) + obtain ⟨ρ,hρ,hρF⟩ := hmin + refine ⟨U,hUD,V,hVD,hU,hV,ρ,hρ,?_⟩ + intro H π hπb + obtain ⟨i,hi,hin⟩ := hVc H π hπb + exact ⟨i.val.p,i.val.q,S i,T i,hp i,hq i, + fun x hx y hy => (hρF i hi).trans (hsep i x hx y hy),hin⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero4.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero4.lean new file mode 100644 index 0000000000000000000000000000000000000000..03c3d51038bcef3b4b55e828312d6188d0b68f36 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero4.lean @@ -0,0 +1,39 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma map_posPart (π : A →⋆ₙₐ[ℂ] B) {a : A} (ha : IsSelfAdjoint a) : π a⁺=(π a)⁺ := by + rw [CFC.posPart_def,CFC.posPart_def] + exact π.map_cfcₙ (·⁺ : ℝ → ℝ) a (by fun_prop) (by simp) (by fun_prop) ha (ha.map π) + +lemma map_negPart (π : A →⋆ₙₐ[ℂ] B) {a : A} (ha : IsSelfAdjoint a) : π a⁻=(π a)⁻ := by + rw [CFC.negPart_def,CFC.negPart_def] + exact π.map_cfcₙ (·⁻ : ℝ → ℝ) a (by fun_prop) (by simp) (by fun_prop) ha (ha.map π) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero5.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero5.lean new file mode 100644 index 0000000000000000000000000000000000000000..55953b43fd996ce07e8d30cd941531f1776acacf --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero5.lean @@ -0,0 +1,66 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.HereditaryDeletion +import OAI.Analysis.WeakInfiniteness.SquareZero3 +import OAI.Analysis.WeakInfiniteness.SquareZero4 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_detected_both_signs_on_norm_slice + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ h ∈ D,IsSelfAdjoint h ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → + π h⁺ ≠ 0 ∧ π h⁻ ≠ 0 := by + obtain ⟨U,hUD,V,hVD,hU,hV,ρ,hρ,hc⟩ := + exists_second_coupling_on_norm_slice hσ hσγ hgap hA hn hpi D hD hb hα hlocal + obtain ⟨h,hhD,hh,m,e,he,hs,hd,hcorners⟩ := + exists_hereditary_continuous_deletion D hD.1 U V hUD hVD hU hV hρ + refine ⟨h,hhD,hh,?_⟩ + intro H π hπb + obtain ⟨p,q,S,T,hp,hq,hST,hpn⟩ := hc H π hπb + have hhn : π h ≠ 0 := by + intro hz + apply hpn + rw [← hcorners p q S T hp hq hST,map_mul,map_mul,hz,mul_zero,zero_mul] + have hhn' : (Unitization.starLift π) (h : Unitization ℂ A) ≠ 0 := by + rwa [starLift_inr_apply] + have hsigns := both_signs_in_image_of_partition_diagonals (Unitization.starLift π) + (hh.map (Unitization.inrNonUnitalStarAlgHom ℂ A)) hhn' e he hs hd + change ((Unitization.starLift π) (h : Unitization ℂ A))⁺ ≠ 0 ∧ + ((Unitization.starLift π) (h : Unitization ℂ A))⁻ ≠ 0 at hsigns + rw [starLift_inr_apply] at hsigns + simpa only [map_posPart π hh,map_negPart π hh] using hsigns + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZero6.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZero6.lean new file mode 100644 index 0000000000000000000000000000000000000000..de2844d203bfcc7d0e484bd46db4f86d09d08f64 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZero6.lean @@ -0,0 +1,79 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SquareZero5 + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_square_zero_on_norm_slice_of_gap_one + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ x ∈ D,x*x=0 ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → π x ≠ 0 := by + obtain ⟨h,hhD,hh,hhn⟩ := exists_detected_both_signs_on_norm_slice hσ hσγ hgap hA hn hpi D hD hb hα hlocal + let : IsClosed (D : Set A) := hD.1 + have hpD : h⁺ ∈ D := cfcₙ_mem (·⁺ : ℝ → ℝ) hhD + have hqD : h⁻ ∈ D := cfcₙ_mem (·⁻ : ℝ → ℝ) hhD + let Q : A → A → Prop := fun p q => + p ∈ hereditarySubalgebra h⁺ (CFC.posPart_nonneg h).isSelfAdjoint ∧ + q ∈ hereditarySubalgebra h⁻ (CFC.negPart_nonneg h).isSelfAdjoint + obtain ⟨F,z,hzD,_,hzc⟩ := exists_selected_finite_coupling_of_gap_one hσ hσγ hgap hA hn hpi + D hD b hb hα Q (by + intro H π hπ hπb + obtain ⟨hpn,hqn⟩ := hhn H π hπb + obtain ⟨i,hip,hiq,hin⟩ := exists_core_perturbationData hn hpi hπ + (CFC.posPart_nonneg h) (CFC.negPart_nonneg h) (CFC.posPart_mul_negPart h) hpn hqn + exact ⟨i,hereditarySubalgebra_le_of_mem hD (CFC.posPart_nonneg h).isSelfAdjoint hpD hip, + hereditarySubalgebra_le_of_mem hD (CFC.negPart_nonneg h).isSelfAdjoint hqD hiq,⟨hip,hiq⟩,hin⟩) + refine ⟨h⁺*z*h⁻,hD.2 h⁺ hpD h⁻ hqD z,?_,?_⟩ + · calc + (h⁺*z*h⁻)*(h⁺*z*h⁻)=(h⁺*z)*(h⁻*h⁺)*(z*h⁻) := by noncomm_ring + _ = 0 := by rw [CFC.negPart_mul_posPart,mul_zero,zero_mul] + · intro H π hπb hnz + obtain ⟨i,_,hin⟩ := hzc H π hπb + exact hin (image_hereditary_corner_zero π (CFC.posPart_nonneg h).isSelfAdjoint + (CFC.negPart_nonneg h).isSelfAdjoint i.property.2.2.1 i.property.2.2.2 hnz) + +theorem exists_square_zero_on_norm_slice_one + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ x ∈ D,x*x=0 ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → π x ≠ 0 := by + obtain ⟨γ,hγ,hgap⟩ := exists_uniform_gap_one + exact exists_square_zero_on_norm_slice_of_gap_one (σ := γ/2) (by positivity) + (by linarith) hgap hA hn hpi D hD hb hα hlocal + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SquareZeroComparison.lean b/lean/OAI/Analysis/WeakInfiniteness/SquareZeroComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..c71c74ae5ade59b7257e9c0f9e6282a341765352 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SquareZeroComparison.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CuntzCopies +import OAI.Analysis.WeakInfiniteness.FiniteComparison + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma square_zero_two_copies {a x : A} (ha : 0 ≤ a) + (hx : x ∈ hereditarySubalgebra a ha.isSelfAdjoint) (hxx : x*x=0) : + CuntzSubequiv (diagonalCopies 2 (star x*x)) (diagonalCopies 1 a) := by + let D := hereditarySubalgebra a ha.isSelfAdjoint + have hx' : x ∈ D := hx + have hxs : star x ∈ D := star_mem hx' + have hz : star x*x ∈ D := D.mul_mem hxs hx' + have hw : x*star x ∈ D := D.mul_mem hx' hxs + have hzw : (star x*x)*(x*star x)=0 := by + calc + _ = star x*(x*x)*star x := by noncomm_ring + _ = 0 := by rw [hxx,mul_zero,zero_mul] + have hwz : (x*star x)*(star x*x)=0 := by + simpa only [star_mul,star_star,star_zero] using congrArg star hzw + let y : Fin 2 → A := ![star x*x,x*star x] + apply copies_cuntz_of_common_orthogonal ha y + · intro i + fin_cases i + · exact ⟨star_mul_self_nonneg x,hz⟩ + · exact ⟨mul_star_self_nonneg x,hw⟩ + · intro i j hij + fin_cases i <;> fin_cases j + · exact (hij rfl).elim + · exact hzw + · exact hwz + · exact (hij rfl).elim + · intro i + fin_cases i + · exact cuntzSubequiv_refl _ + · exact element_initial_cuntz_range x + +lemma CuntzSubequiv.double_copies {r s : ℕ} {a b : A} + (hab : CuntzSubequiv (diagonalCopies r a) (diagonalCopies s b)) : + CuntzSubequiv (diagonalCopies (r+r) a) (diagonalCopies (s+s) b) := by + have h := (hab.blockSum hab).submatrix_left + (finSumFinEquiv.symm : Fin (r+r) → Fin r ⊕ Fin r) + rw [diagonalCopies_double] at h + have h' := h.reindex_right (finSumFinEquiv.symm : Fin (s+s) ≃ Fin s ⊕ Fin s) + rwa [diagonalCopies_double] at h' + +lemma CuntzSubequiv.power_two_copies {a b : A} + (hab : ElementCuntzSubequiv a b) (j : ℕ) : + CuntzSubequiv (diagonalCopies (2^j) a) (diagonalCopies (2^j) b) := by + induction j with + | zero => exact hab + | succ j ih => + have h := ih.double_copies + have he : 2^(j+1)=2^j+2^j := by rw [pow_succ,Nat.mul_two] + rw [he] + exact h + +lemma CuntzSubequiv.power_two_binary {a b : A} + (hab : CuntzSubequiv (diagonalCopies 2 a) (diagonalCopies 1 b)) (j : ℕ) : + CuntzSubequiv (diagonalCopies (2^(j+1)) a) (diagonalCopies (2^j) b) := by + induction j with + | zero => exact hab + | succ j ih => + have h := ih.double_copies + have he : 2^(j+1+1)=2^(j+1)+2^(j+1) := by rw [pow_succ,Nat.mul_two] + have hf : 2^(j+1)=2^j+2^j := by rw [pow_succ,Nat.mul_two] + rw [he,hf] + rw [hf] at h + exact h + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/StatePullback.lean b/lean/OAI/Analysis/WeakInfiniteness/StatePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..81efa5de0b926bc49c4a6b58d213a7e24b7832db --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/StatePullback.lean @@ -0,0 +1,84 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AnnihilatorStates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped ComplexOrder InnerProductSpace Topology + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + +def selfAdjointMap (π : A →⋆ₐ[ℂ] B) : selfAdjoint A →L[ℝ] selfAdjoint B where + toFun b := ⟨π (b : A),b.property.map π⟩ + map_add' _ _ := Subtype.ext (map_add π _ _) + map_smul' r b := Subtype.ext (map_real_smul π (starHom_continuous π) r (b : A)) + cont := by + have hπ : Continuous π := starHom_continuous π + fun_prop + +def realStatePullback (π : A →⋆ₐ[ℂ] B) (f : WeakDual ℝ (selfAdjoint B)) : + WeakDual ℝ (selfAdjoint A) := + StrongDual.toWeakDual ((WeakDual.toStrongDual f).comp (selfAdjointMap π)) + +lemma realStatePullback_mem (π : A →⋆ₐ[ℂ] B) {f : WeakDual ℝ (selfAdjoint B)} + (hf : f ∈ realStateSpace B) : realStatePullback π f ∈ realStateSpace A := by + constructor + · apply ((WeakDual.toStrongDual f).comp (selfAdjointMap π)).opNorm_le_bound zero_le_one + intro b + change ‖f (selfAdjointMap π b)‖ ≤ 1*‖b‖ + calc + _ ≤ ‖WeakDual.toStrongDual f‖*‖selfAdjointMap π b‖ := + (WeakDual.toStrongDual f).le_opNorm _ + _ ≤ 1*‖selfAdjointMap π b‖ := mul_le_mul_of_nonneg_right hf.1 (norm_nonneg _) + _ ≤ 1*‖b‖ := by + gcongr + exact NonUnitalStarAlgHom.norm_apply_le π.toNonUnitalStarAlgHom (b : A) + · change f (selfAdjointMap π 1)=1 + have h1 : selfAdjointMap π 1=1 := Subtype.ext (map_one π) + rw [h1] + exact hf.2 + +variable [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +omit [PartialOrder B] [StarOrderedRing B] in +lemma realStatePullback_annihilator (π : A →⋆ₐ[ℂ] B) {f : WeakDual ℝ (selfAdjoint B)} + (hf : f ∈ realStateSpace B) (S : Set A) (hS : ∀ x ∈ S,π x=0) : + realStatePullback π f ∈ annihilatorStates S := by + refine ⟨realStatePullback_mem π hf,?_⟩ + intro x hx a + change f (selfAdjointMap π ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩)=0 + have hz : selfAdjointMap π ⟨star (x*a)*(x*a),(star_mul_self_nonneg (x*a)).isSelfAdjoint⟩=0 := by + apply Subtype.ext + change π (star (x*a)*(x*a))=0 + simp [map_mul,map_star,hS x hx] + rw [hz,map_zero] + +lemma exists_annihilator_norming_pullback [Nontrivial B] (π : A →⋆ₐ[ℂ] B) + (S : Set A) (hS : ∀ x ∈ S,π x=0) (b : A) (hb : 0 ≤ b) : + ∃ f ∈ annihilatorStates S,f ⟨b,hb.isSelfAdjoint⟩=‖π b‖ := by + obtain ⟨g,hg,hgb⟩ := exists_norming_real_state (π b) (map_nonneg π hb) + refine ⟨realStatePullback π g,realStatePullback_annihilator π hg S hS,?_⟩ + exact hgb + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/States.lean b/lean/OAI/Analysis/WeakInfiniteness/States.lean new file mode 100644 index 0000000000000000000000000000000000000000..79e119a067ac16ffc1129b0544dd6f8f525c5a5a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/States.lean @@ -0,0 +1,145 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +variable {A : Type*} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma norm_add_one_of_nonneg [Nontrivial A] (b : A) (hb : 0 ≤ b) : + ‖b + 1‖ = ‖b‖ + 1 := by + apply le_antisymm + · exact (norm_add_le _ _).trans (by rw [norm_one]) + · have hs : ‖b‖ + 1 ∈ spectrum ℝ (b + 1) := by + simpa only [map_one, add_comm (1 : A) b] using + (spectrum.add_mem_add_iff (R := ℝ) (a := b) (r := ‖b‖) (s := 1)).mpr + (CStarAlgebra.norm_mem_spectrum_of_nonneg b hb) + simpa only [Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ ‖b‖ + 1)] using + spectrum.norm_le_norm_of_mem hs + +def selfAdjointComplexification (f : selfAdjoint A →ₗ[ℝ] ℝ) : A →ₗ[ℂ] ℂ where + toFun a := (f (realPart a) : ℂ) + Complex.I * (f (imaginaryPart a) : ℂ) + map_add' a b := by simp only [map_add, Complex.ofReal_add]; ring + map_smul' c a := by + simp only [realPart_smul, imaginaryPart_smul, map_sub, map_add, + map_smul, smul_eq_mul, Complex.ofReal_sub, Complex.ofReal_add, Complex.ofReal_mul] + apply Complex.ext <;> simp + +omit [PartialOrder A] [StarOrderedRing A] in +lemma selfAdjointComplexification_apply (f : selfAdjoint A →ₗ[ℝ] ℝ) (b : selfAdjoint A) : + selfAdjointComplexification f (b : A) = (f b : ℂ) := by + have hr : realPart (b : A) = b := Subtype.ext b.property.coe_realPart + simp [selfAdjointComplexification, hr, b.property.imaginaryPart] + +lemma real_functional_nonneg (f : selfAdjoint A →L[ℝ] ℝ) + (hf : ‖f‖ ≤ 1) (hf1 : f 1 = 1) (b : selfAdjoint A) (hb : 0 ≤ (b : A)) : + 0 ≤ f b := by + let z : selfAdjoint A := ‖b‖ • 1 - b + have hb' : IsSelfAdjoint (b : A) := b.property + have hz : 0 ≤ (z : A) := by + change 0 ≤ ‖b‖ • (1 : A) - (b : A) + rw [sub_nonneg, ← Algebra.algebraMap_eq_smul_one] + exact hb'.le_algebraMap_norm_self + have hzn : ‖z‖ ≤ ‖b‖ := by + change ‖(z : A)‖ ≤ ‖(b : A)‖ + apply (CStarAlgebra.norm_le_iff_le_algebraMap _ (norm_nonneg _) hz).mpr + change ‖b‖ • (1 : A) - (b : A) ≤ algebraMap ℝ A ‖(b : A)‖ + rw [Algebra.algebraMap_eq_smul_one] + exact sub_le_self _ hb + have hg : f z ≤ ‖b‖ := calc + f z ≤ ‖f z‖ := Real.le_norm_self _ + _ ≤ ‖f‖ * ‖z‖ := f.le_opNorm z + _ ≤ 1 * ‖b‖ := mul_le_mul hf hzn (norm_nonneg _) zero_le_one + _ = ‖b‖ := one_mul _ + simp only [z, map_sub, map_smul, hf1, smul_eq_mul, mul_one] at hg + linarith + +def positiveComplexification (f : selfAdjoint A →L[ℝ] ℝ) + (hf : ‖f‖ ≤ 1) (hf1 : f 1 = 1) : A →ₚ[ℂ] ℂ where + toLinearMap := selfAdjointComplexification f.toLinearMap + monotone' := by + intro a b hab + change selfAdjointComplexification f.toLinearMap a ≤ selfAdjointComplexification f.toLinearMap b + rw [← sub_nonneg, ← map_sub] + let z : selfAdjoint A := ⟨b-a, IsSelfAdjoint.of_nonneg (sub_nonneg.mpr hab)⟩ + change 0 ≤ selfAdjointComplexification f.toLinearMap (z : A) + rw [selfAdjointComplexification_apply] + exact Complex.zero_le_real.mpr (real_functional_nonneg f hf hf1 z (sub_nonneg.mpr hab)) + +lemma positiveComplexification_apply (f : selfAdjoint A →L[ℝ] ℝ) + (hf : ‖f‖ ≤ 1) (hf1 : f 1 = 1) (b : selfAdjoint A) : + positiveComplexification f hf hf1 (b : A) = (f b : ℂ) := + selfAdjointComplexification_apply _ _ + +theorem exists_norming_positive_functional [Nontrivial A] (b : A) (hb : 0 ≤ b) : + ∃ f : A →ₚ[ℂ] ℂ, f 1 = 1 ∧ f b = (‖b‖ : ℂ) := by + let b' : selfAdjoint A := ⟨b, IsSelfAdjoint.of_nonneg hb⟩ + have hn : ‖b' + 1‖ = ‖b‖ + 1 := norm_add_one_of_nonneg b hb + obtain ⟨f, hf, hfb⟩ := exists_dual_vector ℝ (b' + 1) (by rw [hn]; positivity) + have hf1 : f 1 ≤ 1 := calc + f 1 ≤ ‖f 1‖ := Real.le_norm_self _ + _ ≤ ‖f‖ * ‖(1 : selfAdjoint A)‖ := f.le_opNorm _ + _ = 1 := by rw [hf]; change 1 * ‖(1 : A)‖ = 1; simp + have hfb' : f b' ≤ ‖b‖ := calc + f b' ≤ ‖f b'‖ := Real.le_norm_self _ + _ ≤ ‖f‖ * ‖b'‖ := f.le_opNorm _ + _ = ‖b‖ := by rw [hf, one_mul]; rfl + rw [map_add, hn] at hfb + change f b' + f 1 = ‖b‖ + 1 at hfb + have hfone : f 1 = 1 := by linarith + have hfnorm : f b' = ‖b‖ := by linarith + refine ⟨positiveComplexification f hf.le hfone, ?_, ?_⟩ + · change positiveComplexification f hf.le hfone ((1 : selfAdjoint A) : A) = 1 + rw [positiveComplexification_apply, hfone, Complex.ofReal_one] + · change positiveComplexification f hf.le hfone (b' : A) = _ + rw [positiveComplexification_apply, hfnorm] + +def gnsCyclicVector (f : A →ₚ[ℂ] ℂ) : f.GNS := + (f.toPreGNS 1 : f.GNS) + +lemma norm_gnsCyclicVector (f : A →ₚ[ℂ] ℂ) (hf : f 1 = 1) : + ‖gnsCyclicVector f‖ = 1 := by + rw [gnsCyclicVector, UniformSpace.Completion.norm_coe] + rw [PositiveLinearMap.preGNS_norm_def] + simp [hf] + +lemma norm_gns_action_sq (f : A →ₚ[ℂ] ℂ) (a : A) : + ‖f.gnsStarAlgHom a (gnsCyclicVector f)‖ ^ 2 = (f (star a * a)).re := by + change ‖f.gnsNonUnitalStarAlgHom a (f.toPreGNS 1 : f.GNS)‖ ^ 2 = _ + rw [PositiveLinearMap.gnsNonUnitalStarAlgHom_apply_coe, UniformSpace.Completion.norm_coe] + change ‖f.toPreGNS (a * 1)‖ ^ 2 = _ + rw [mul_one, PositiveLinearMap.preGNS_norm_def] + apply Real.sq_sqrt + exact (Complex.nonneg_iff.mp (f.map_nonneg (star_mul_self_nonneg a))).1 + +theorem exists_norming_gns [Nontrivial A] (a : A) : + ∃ f : A →ₚ[ℂ] ℂ, f 1 = 1 ∧ ‖f.gnsStarAlgHom a‖ = ‖a‖ := by + obtain ⟨f, hf, hfa⟩ := exists_norming_positive_functional (star a * a) + (star_mul_self_nonneg a) + refine ⟨f, hf, le_antisymm (NonUnitalStarAlgHom.norm_apply_le f.gnsNonUnitalStarAlgHom a) ?_⟩ + have hn : ‖f.gnsStarAlgHom a (gnsCyclicVector f)‖ = ‖a‖ := by + have hs := norm_gns_action_sq f a + rw [hfa, Complex.ofReal_re, CStarRing.norm_star_mul_self] at hs + nlinarith [norm_nonneg (f.gnsStarAlgHom a (gnsCyclicVector f)), norm_nonneg a] + calc + ‖a‖ = ‖f.gnsStarAlgHom a (gnsCyclicVector f)‖ := hn.symm + _ ≤ ‖f.gnsStarAlgHom a‖ * ‖gnsCyclicVector f‖ := ContinuousLinearMap.le_opNorm _ _ + _ = ‖f.gnsStarAlgHom a‖ := by rw [norm_gnsCyclicVector f hf, mul_one] + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/StrongInfiniteness.lean b/lean/OAI/Analysis/WeakInfiniteness/StrongInfiniteness.lean new file mode 100644 index 0000000000000000000000000000000000000000..32be98a0a5d811e5103d31a0f909ce5a5b757a40 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/StrongInfiniteness.lean @@ -0,0 +1,49 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.QuantitativeSeparation +import OAI.Analysis.WeakInfiniteness.ScalingAssembly +import OAI.Analysis.WeakInfiniteness.UniverseIndividualInfiniteness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exact_weaklyPurelyInfinite_stronglyPurelyInfinite_any + (hA : Exact A) (hW : WeaklyPurelyInfinite A) : StronglyPurelyInfinite A := by + have hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a) := + fun _ ha => exact_weaklyPurelyInfinite_individuallyProperlyInfinite_any hA hW ha + obtain ⟨σ,hσ,_,hsep⟩ := exists_quantitative_separatingPositives_any hA hpi + apply stronglyPurelyInfinite_of_contractive + intro a b ha hb han hbn ε hε + exact contractive_spi_of_quantitative_separation hpi hσ hsep a b ha hb han hbn hε + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/StrongInfinitenessOne.lean b/lean/OAI/Analysis/WeakInfiniteness/StrongInfinitenessOne.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ca2b9a30da7dd93ec6eeb15d087c2f743913e0a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/StrongInfinitenessOne.lean @@ -0,0 +1,46 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ScalingAssembly +import OAI.Analysis.WeakInfiniteness.SeparatingPositivesProducer + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +section + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exact_weaklyPurelyInfinite_stronglyPurelyInfinite_one + (hA : Exact A) (hW : WeaklyPurelyInfinite A) : StronglyPurelyInfinite A := by + have hpi : ∀ a : A,0 ≤ a → ProperlyInfinite (diagonalCopies 1 a) := + fun _ ha => exact_weaklyPurelyInfinite_individuallyProperlyInfinite_one hA hW ha + obtain ⟨σ,hσ,_,hsep⟩ := exists_quantitative_separatingPositives_one hA hpi + apply stronglyPurelyInfinite_of_contractive + intro a b ha hb han hbn ε hε + exact contractive_spi_of_quantitative_separation hpi hσ hsep a b ha hb han hbn hε + +end + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SupportedCorner.lean b/lean/OAI/Analysis/WeakInfiniteness/SupportedCorner.lean new file mode 100644 index 0000000000000000000000000000000000000000..656f5a34765e4233e80fec8bfc96c48b164a65a6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SupportedCorner.lean @@ -0,0 +1,131 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.RectangularPolar + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +variable {A : Type*} [NonUnitalCStarAlgebra A] + +def supportedAlgebra (e : A) (he : IsSelfAdjoint e) : NonUnitalStarSubalgebra ℂ A where + carrier := {z | e*z=z ∧ z*e=z} + zero_mem' := by simp + add_mem' hx hy := by + change e*(_+_)=_ ∧ (_+_)*e=_ + simp only [mul_add, add_mul, hx.1, hx.2, hy.1, hy.2, and_self] + mul_mem' hx hy := by + constructor + · rw [← mul_assoc, hx.1] + · rw [mul_assoc, hy.2] + smul_mem' c x hx := by + change e*(c • x)=_ ∧ (c • x)*e=_ + simp only [mul_smul_comm, smul_mul_assoc, hx.1, hx.2, and_self] + star_mem' hx := by + constructor + · simpa only [star_mul, he.star_eq] using congrArg star hx.2 + · simpa only [star_mul, he.star_eq] using congrArg star hx.1 + +lemma supportedAlgebra_closed (e : A) (he : IsSelfAdjoint e) : + IsClosed (supportedAlgebra e he : Set A) := + (isClosed_eq (by fun_prop) continuous_id).inter (isClosed_eq (by fun_prop) continuous_id) + +instance supportedAlgebra_complete (e : A) (he : IsSelfAdjoint e) : + CompleteSpace (supportedAlgebra e he) := (supportedAlgebra_closed e he).completeSpace_coe + +def matrixSingletonHom : CStarMatrix (Fin 1) (Fin 1) A →⋆ₙₐ[ℂ] A where + toFun x := x 0 0 + map_zero' := rfl + map_add' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + map_mul' x y := by + change (∑ i : Fin 1, x 0 i*y i 0)=x 0 0*y 0 0 + exact Fin.sum_univ_one _ + +lemma matrixSingletonHom_injective : Function.Injective (matrixSingletonHom (A := A)) := by + intro x y h + ext i j + have hi : i=0 := Subsingleton.elim _ _ + have hj : j=0 := Subsingleton.elim _ _ + subst i; subst j + exact h + +variable {n : Type*} [Fintype n] + +lemma rectangular_mul_zero_support {m k : Type*} (M : CStarMatrix m n A) : + M*(0 : CStarMatrix n k A)=0 := Matrix.mul_zero M + +lemma rectangular_zero_mul_support {m k : Type*} (M : CStarMatrix n k A) : + (0 : CStarMatrix m n A)*M=0 := Matrix.zero_mul M + +lemma rectangular_mul_add_support {m k : Type*} (M : CStarMatrix m n A) + (N P : CStarMatrix n k A) : M*(N+P)=M*N+M*P := Matrix.mul_add M N P + +lemma rectangular_add_mul_support {m k : Type*} (M N : CStarMatrix m n A) + (P : CStarMatrix n k A) : (M+N)*P=M*P+N*P := Matrix.add_mul M N P + +lemma rectangular_mul_smul_support {m k : Type*} (M : CStarMatrix m n A) + (c : ℂ) (N : CStarMatrix n k A) : M*(c • N)=c • (M*N) := Matrix.mul_smul M c N + +lemma rectangular_smul_mul_support {m k : Type*} (M : CStarMatrix m n A) + (c : ℂ) (N : CStarMatrix n k A) : (c • M)*N=c • (M*N) := Matrix.smul_mul c M N + +variable [PartialOrder A] [StarOrderedRing A] + +def supportedCompression (U : CStarMatrix (Fin 1) n A) + (e : CStarMatrix n n A) (he : IsSelfAdjoint e) (hU : U.conjTranspose*U=e) : + supportedAlgebra e he →⋆ₙₐ[ℂ] CStarMatrix (Fin 1) (Fin 1) A where + toFun z := U*z.val*U.conjTranspose + map_zero' := by change U*0*U.conjTranspose=0; rw [rectangular_mul_zero_support, rectangular_zero_mul_support] + map_add' x y := by + change U*(x.val+y.val)*U.conjTranspose=U*x.val*U.conjTranspose+U*y.val*U.conjTranspose + rw [rectangular_mul_add_support, rectangular_add_mul_support] + map_smul' c z := by + change U*(c • z.val)*U.conjTranspose=c • (U*z.val*U.conjTranspose) + rw [rectangular_mul_smul_support, rectangular_smul_mul_support] + map_mul' x y := by + change U*(x.val*y.val)*U.conjTranspose=(U*x.val*U.conjTranspose)*(U*y.val*U.conjTranspose) + simp only [rectangular_mul_assoc] + rw [← rectangular_mul_assoc U.conjTranspose U, hU, + ← rectangular_mul_assoc e y.val, y.property.1] + map_star' z := by + change U*z.val.conjTranspose*U.conjTranspose=(U*z.val*U.conjTranspose).conjTranspose + rw [rectangular_star_mul, rectangular_star_mul, rectangular_conjTranspose_conjTranspose, + rectangular_mul_assoc] + +lemma supportedCompression_inverse (U : CStarMatrix (Fin 1) n A) + (e : CStarMatrix n n A) (he : IsSelfAdjoint e) (hU : U.conjTranspose*U=e) + (z : supportedAlgebra e he) : + U.conjTranspose*(supportedCompression U e he hU z)*U=z.val := by + change U.conjTranspose*(U*z.val*U.conjTranspose)*U=z.val + rw [← rectangular_mul_assoc, ← rectangular_mul_assoc, hU, + rectangular_mul_assoc (e*z.val) U.conjTranspose U, hU, z.property.1, z.property.2] + +lemma supportedCompression_injective (U : CStarMatrix (Fin 1) n A) + (e : CStarMatrix n n A) (he : IsSelfAdjoint e) (hU : U.conjTranspose*U=e) : + Function.Injective (supportedCompression U e he hU) := by + intro x y h + apply Subtype.ext + rw [← supportedCompression_inverse U e he hU x, ← supportedCompression_inverse U e he hU y, h] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SupportedExact.lean b/lean/OAI/Analysis/WeakInfiniteness/SupportedExact.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ba28f26ed10d466cde6c56160ed7efff7f8bea0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SupportedExact.lean @@ -0,0 +1,50 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.SupportedCorner +import OAI.Analysis.WeakInfiniteness.UnitizationExact + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +omit [PartialOrder A] [StarOrderedRing A] in +instance supportedAlgebra_isClosed (e : A) (he : IsSelfAdjoint e) : + IsClosed (supportedAlgebra e he : Set A) := supportedAlgebra_closed e he + +lemma exact_supportedAlgebra (hA : Exact A) (U : CStarMatrix (Fin 1) (Fin n) A) + (e : CStarMatrix (Fin n) (Fin n) A) (he : IsSelfAdjoint e) (hU : U.conjTranspose*U=e) : + Exact (supportedAlgebra e he) := + exact_subalgebra (matrixSingletonHom.comp (supportedCompression U e he hU)) + (matrixSingletonHom_injective.comp (supportedCompression_injective U e he hU)) hA + +lemma exact_unitization_supportedAlgebra (hA : Exact A) (U : CStarMatrix (Fin 1) (Fin n) A) + (e : CStarMatrix (Fin n) (Fin n) A) (he : IsSelfAdjoint e) (hU : U.conjTranspose*U=e) : + Exact (Unitization ℂ (supportedAlgebra e he)) := + exact_unitization (exact_supportedAlgebra hA U e he hU) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/SupportedSeparation.lean b/lean/OAI/Analysis/WeakInfiniteness/SupportedSeparation.lean new file mode 100644 index 0000000000000000000000000000000000000000..5f9eb8f5af4ecb49de65d72f2938ae6b87d67831 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/SupportedSeparation.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ClippingTools +import OAI.Analysis.WeakInfiniteness.FiniteCoordinates +import OAI.Analysis.WeakInfiniteness.FiniteReducingModels +import OAI.Analysis.WeakInfiniteness.SupportedExact +import OAI.Analysis.WeakInfiniteness.UniformModels + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped InnerProductSpace CStarAlgebra ComplexOrder + +lemma transport_reducing_coordinates {H X K : Type*} + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup X] [InnerProductSpace ℂ X] [CompleteSpace X] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + (e : H ≃ₗᵢ[ℂ] X) (J : X →ₗᵢ[ℂ] K) (W : K →L[ℂ] K) (D : H →L[ℂ] H) + (h : W.comp J.toContinuousLinearMap=J.toContinuousLinearMap.comp (e.conjStarAlgEquiv D)) : + W.comp (J.comp e.toLinearIsometry).toContinuousLinearMap= + (J.comp e.toLinearIsometry).toContinuousLinearMap.comp D := by + ext x + have hh := congrArg (fun L : X →L[ℂ] K => L (e x)) h + simpa using hh + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +variable {n : ℕ} + +theorem exists_separated_supported_model_one + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (c : A) (hc : 0 ≤ c) {α : ℝ} (hα : 0 < α) + (e : CStarMatrix (Fin n) (Fin n) A) (he : IsSelfAdjoint e) + (U : CStarMatrix (Fin 1) (Fin n) A) (hU : U.conjTranspose*U=e) + (V : supportedAlgebra e he) : + ∃ w : CStarMatrix (Fin n) (Fin n) A, ‖w‖ ≤ 1 ∧ + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)*w* + diagonalCopies n (cfcₙ (spectralRamp (α/4)) c)=w ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ ≤ ‖matrixRepresentation π (Fin n) (V.val-w)‖ := by + classical + by_contra h + push Not at h + let B := Unitization ℂ (supportedAlgebra e he) + let V₀ : B := Unitization.inr V + let v : B := cstarClip V₀ + have hB : Exact B := exact_unitization_supportedAlgebra hA U e he hU + have hmodels : FiniteContractionModels B v γ := by + intro H _ D hD + obtain ⟨d,coord,M,hMn,hM⟩ := exists_scalar_matrix_coordinates D + obtain ⟨w,hwn,hEw,hred⟩ := exists_uniform_reducing_model hn hpi c hc hα d M (hMn.trans_le hD) + obtain ⟨K,π,hπc,hnear⟩ := h w hwn hEw + obtain ⟨J,hJ,hJa⟩ := hred K π hπc + let lam : supportedAlgebra e he →⋆ₙₐ[ℂ] + (HilbertVector (Fin n) K →L[ℂ] HilbertVector (Fin n) K) := + (matrixRepresentation π (Fin n)).comp (NonUnitalStarSubalgebraClass.subtype (supportedAlgebra e he)) + let πB : B →⋆ₐ[ℂ] (HilbertVector (Fin n) K →L[ℂ] HilbertVector (Fin n) K) := + Unitization.starLift lam + let J' := J.comp coord.toLinearIsometry + let T := matrixRepresentation π (Fin n) V.val + let W := matrixRepresentation π (Fin n) w + have hr : W.comp J'.toContinuousLinearMap=J'.toContinuousLinearMap.comp D := by + apply transport_reducing_coordinates coord J W D + rwa [← hM] + have hra : (star W).comp J'.toContinuousLinearMap=J'.toContinuousLinearMap.comp (star D) := by + apply transport_reducing_coordinates coord J (star W) (star D) + rw [show coord.conjStarAlgEquiv (star D)=star (coord.conjStarAlgEquiv D) from + map_star coord.conjStarAlgEquiv.toStarAlgHom D, ← hM] + exact hJa + have hTW : ‖T-W‖ ≤ σ := by + simpa only [T,W,map_sub] using hnear.le + have hW : ‖W‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le (matrixRepresentation π (Fin n)) w).trans hwn + have herr := clip_reducing_models T W D J' hσ hW hTW hr hra + have hclip : πB v=cstarClip T := by + change πB (cstarClip V₀)=cstarClip T + rw [map_cstarClip] + congr 1 + calc + πB V₀ = (Unitization.starLift.symm πB) V := + (Unitization.starLift_symm_apply_apply πB V).symm + _ = lam V := congrArg (fun f => f V) (Unitization.starLift.left_inv lam) + _ = T := rfl + refine ⟨⟨HilbertVector (Fin n) K⟩,πB,J',?_,?_⟩ + · rw [hclip] + exact herr.1.trans hσγ + · rw [hclip] + exact herr.2.trans hσγ + exact hgap B v (norm_cstarClip_le V₀) hB hmodels + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorAbsorption.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorAbsorption.lean new file mode 100644 index 0000000000000000000000000000000000000000..85b11d9d2c20d47dc7d7cfd34dc98c9ac9a144d8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorAbsorption.lean @@ -0,0 +1,135 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorMap +import OAI.Analysis.WeakInfiniteness.WordTensorDensity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open TopologicalSpace + +open scoped TensorProduct + +universe u v + +section Separable + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +instance minimalTensor_separable [SeparableSpace A] [SeparableSpace B] : + SeparableSpace (MinimalTensor A B) := by + let t : ℕ × ℕ → MinimalTensor A B := fun p => minimalElementary (denseSeq A p.1) (denseSeq B p.2) + let S := Submodule.span ℂ (Set.range t) + have hs : IsSeparable (S.topologicalClosure : Set (MinimalTensor A B)) := + ((Set.countable_range t).isSeparable.span (R := ℂ)).closure + have hij : ∀ i j,minimalElementary (denseSeq A i) (denseSeq B j) ∈ S.topologicalClosure := by + intro i j + exact S.le_topologicalClosure (Submodule.subset_span ⟨(i,j),rfl⟩) + have hib : ∀ i b,minimalElementary (denseSeq A i) b ∈ S.topologicalClosure := by + intro i b + have hc : IsClosed {b : B | minimalElementary (denseSeq A i) b ∈ S.topologicalClosure} := + S.isClosed_topologicalClosure.preimage (minimalElementaryRightContinuous (denseSeq A i)).continuous + have hsub : Set.range (denseSeq B) ⊆ {b : B | minimalElementary (denseSeq A i) b ∈ S.topologicalClosure} := by + rintro _ ⟨j,rfl⟩ + exact hij i j + exact closure_minimal hsub hc (denseRange_denseSeq B b) + have he : S.topologicalClosure=⊤ := by + apply minimal_elementary_span_dense _ S.isClosed_topologicalClosure + intro a b + have hc : IsClosed {a : A | minimalElementary a b ∈ S.topologicalClosure} := + S.isClosed_topologicalClosure.preimage (minimalElementaryLeftContinuous b).continuous + have hsub : Set.range (denseSeq A) ⊆ {a : A | minimalElementary a b ∈ S.topologicalClosure} := by + rintro _ ⟨i,rfl⟩ + exact hib i b + exact closure_minimal hsub hc (denseRange_denseSeq A a) + rw [he] at hs + exact isSeparable_univ_iff.mp hs + +end Separable + +section ElementaryZero + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma minimalElementary_eq_zero_iff (a : A) (b : B) : + minimalElementary a b=0 ↔ a=0 ∨ b=0 := by + constructor + · intro hab + by_cases hb : b=0 + · exact Or.inr hb + obtain ⟨H,π,hπ⟩ := exists_faithful_representation A + obtain ⟨K,ρ,hρ⟩ := exists_faithful_representation B + have hr : ρ b ≠ 0 := by + intro hz + exact hb (hρ (hz.trans (map_zero ρ).symm)) + obtain ⟨y,hy⟩ : ∃ y : K,ρ b y ≠ 0 := by + by_contra hn + push Not at hn + exact hr (ContinuousLinearMap.ext hn) + have hn : ‖TensorProduct.mapL (π a) (ρ b)‖ ≤ ‖minimalElementary a b‖ := by + change ‖TensorProduct.mapL (π a) (ρ b)‖ ≤ ‖spatialElementary a b‖ + simpa using norm_tensorSum_le_spatial_any ({()} : Finset Unit) (fun _ : Unit => a) + (fun _ : Unit => b) π ρ + rw [hab,norm_zero] at hn + have hp : π a=0 := by + ext x + have he := (TensorProduct.mapL (π a) (ρ b)).le_opNorm (x ⊗ₜ[ℂ] y) + have hz : ‖(TensorProduct.mapL (π a) (ρ b)) (x ⊗ₜ[ℂ] y)‖ ≤ 0 := by + calc + _ ≤ ‖TensorProduct.mapL (π a) (ρ b)‖ * ‖x ⊗ₜ[ℂ] y‖ := he + _ ≤ 0 * ‖x ⊗ₜ[ℂ] y‖ := mul_le_mul_of_nonneg_right hn (norm_nonneg _) + _ = 0 := zero_mul _ + simp only [TensorProduct.mapL_tmul,TensorProduct.norm_tmul] at hz + have hnorm : ‖(π a) x‖ * ‖(ρ b) y‖ = 0 := + le_antisymm hz (mul_nonneg (norm_nonneg _) (norm_nonneg _)) + exact norm_eq_zero.mp ((mul_eq_zero.mp hnorm).resolve_right (norm_ne_zero_iff.mpr hy)) + exact Or.inl (hπ (hp.trans (map_zero π).symm)) + · rintro (rfl | rfl) + · exact map_zero (minimalElementaryLeftLinear b) + · exact map_zero (minimalElementaryRightLinear a) + +end ElementaryZero + +section LeftEmbedding + +variable (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [CStarAlgebra B] + +def minimalLeftEmbedding : A →⋆ₙₐ[ℂ] MinimalTensor A B where + toFun a := minimalElementary a 1 + map_zero' := map_zero (minimalElementaryLeftLinear (1:B)) + map_add' a b := map_add (minimalElementaryLeftLinear (1:B)) a b + map_smul' c a := map_smul (minimalElementaryLeftLinear (1:B)) c a + map_mul' a b := by rw [← minimalElementary_mul,one_mul] + map_star' a := by rw [← minimalElementary_star,star_one] + +lemma minimalLeftEmbedding_injective [Nontrivial B] : Function.Injective (minimalLeftEmbedding A B) := by + apply (injective_iff_map_eq_zero _).mpr + intro a ha + exact ((minimalElementary_eq_zero_iff a (1:B)).mp ha).resolve_right one_ne_zero + +lemma minimalLeftEmbedding_isometry [Nontrivial B] : Isometry (minimalLeftEmbedding A B) := + NonUnitalStarAlgHom.isometry _ (minimalLeftEmbedding_injective A B) + +end LeftEmbedding + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorCompression.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1fa3a7255327bd063f1d63f8293ed4e5f719443 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorCompression.lean @@ -0,0 +1,135 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FaithfulTensorNorm + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section FiniteTensorCompressions + +variable {H K : Type*} + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + +def compress (V : Submodule ℂ H) [V.HasOrthogonalProjection] + (T : H →L[ℂ] H) : V →L[ℂ] V := + V.orthogonalProjectionOnto.comp (T.comp V.subtypeL) + +lemma norm_compress_le (V : Submodule ℂ H) [V.HasOrthogonalProjection] + (T : H →L[ℂ] H) : ‖compress V T‖ ≤ ‖T‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro x + calc + ‖compress V T x‖ ≤ ‖T (x : H)‖ := V.norm_orthogonalProjectionOnto_apply_le _ + _ ≤ ‖T‖ * ‖x‖ := T.le_opNorm _ + +lemma norm_tensorSum_compress_le {ι : Type*} (s : Finset ι) + (V : Submodule ℂ H) [V.HasOrthogonalProjection] + (T : ι → H →L[ℂ] H) (S : ι → K →L[ℂ] K) : + ‖∑ i ∈ s, TensorProduct.mapL (compress V (T i)) (S i)‖ ≤ + ‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ := by + let P := V.orthogonalProjectionOnto.rTensor K + let J := (V.subtypeₗᵢ.rTensor K).toContinuousLinearMap + have hP : ‖P‖ ≤ 1 := by + apply (ContinuousLinearMap.norm_rTensor_le K _).trans + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro x + simpa only [one_mul] using V.norm_orthogonalProjectionOnto_apply_le x + have hJ : ‖J‖ ≤ 1 := (V.subtypeₗᵢ.rTensor K).norm_toContinuousLinearMap_le + have he : (∑ i ∈ s, TensorProduct.mapL (compress V (T i)) (S i)) = + P.comp ((∑ i ∈ s, TensorProduct.mapL (T i) (S i)).comp J) := by + apply ContinuousLinearMap.ext + intro z + induction z using TensorProduct.inductionOn with + | tmul v k => + simp only [sum_apply, TensorProduct.mapL_tmul, ContinuousLinearMap.comp_apply, + J, LinearIsometry.coe_toContinuousLinearMap, LinearIsometry.rTensor_apply, + LinearMap.rTensor_tmul, P, map_sum, ContinuousLinearMap.rTensor_tmul] + rfl + | add z w hz hw => simp only [map_add, hz, hw] + rw [he] + calc + _ ≤ ‖P‖ * (‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ * ‖J‖) := + (ContinuousLinearMap.opNorm_comp_le _ _).trans + (mul_le_mul_of_nonneg_left (ContinuousLinearMap.opNorm_comp_le _ _) (norm_nonneg _)) + _ ≤ 1 * (‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ * 1) := + mul_le_mul hP (mul_le_mul_of_nonneg_left hJ (ContinuousLinearMap.opNorm_nonneg _)) + (mul_nonneg (ContinuousLinearMap.opNorm_nonneg _) (ContinuousLinearMap.opNorm_nonneg J)) zero_le_one + _ = _ := by rw [mul_one, one_mul] + +lemma norm_tensorSum_le_of_finite_compressions {ι : Type*} [Finite ι] (s : Finset ι) + (T : ι → H →L[ℂ] H) (S : ι → K →L[ℂ] K) {C : ℝ} (hC : 0 ≤ C) + (h : ∀ (V : Submodule ℂ H) [FiniteDimensional ℂ V], + ‖∑ i ∈ s, TensorProduct.mapL (compress V (T i)) (S i)‖ ≤ C) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ ≤ C := by + classical + apply ContinuousLinearMap.opNorm_le_bound _ hC + intro z + obtain ⟨m, ξ, η, rfl⟩ := TensorProduct.exists_sum_tmul_eq z + let V₀ := Submodule.span ℂ (Set.range ξ) + let V₁ := Submodule.span ℂ (Set.range fun p : ι × Fin m => T p.1 (ξ p.2)) + let V := V₀ ⊔ V₁ + let : FiniteDimensional ℂ V₀ := FiniteDimensional.span_of_finite ℂ (Set.finite_range ξ) + let : FiniteDimensional ℂ V₁ := FiniteDimensional.span_of_finite ℂ (Set.finite_range _) + have hξ (j : Fin m) : ξ j ∈ V := + (show V₀ ≤ V from le_sup_left) (Submodule.subset_span (Set.mem_range_self j)) + have hT (i : ι) (j : Fin m) : T i (ξ j) ∈ V := + (show V₁ ≤ V from le_sup_right) (Submodule.subset_span (Set.mem_range_self (i,j))) + let v : V ⊗[ℂ] K := ∑ j, (⟨ξ j, hξ j⟩ : V) ⊗ₜ[ℂ] η j + let J : (V ⊗[ℂ] K) →ₗᵢ[ℂ] (H ⊗[ℂ] K) := V.subtypeₗᵢ.rTensor K + have hv : J v = ∑ j, ξ j ⊗ₜ[ℂ] η j := by + simp only [J, v, map_sum, LinearIsometry.rTensor_apply, LinearMap.rTensor_tmul] + rfl + have he : J ((∑ i ∈ s, TensorProduct.mapL (compress V (T i)) (S i)) v) = + (∑ i ∈ s, TensorProduct.mapL (T i) (S i)) (∑ j, ξ j ⊗ₜ[ℂ] η j) := by + simp only [sum_apply, v, map_sum, TensorProduct.mapL_tmul, + J, LinearIsometry.rTensor_apply, LinearMap.rTensor_tmul] + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + congr 1 + exact Submodule.starProjection_eq_self_iff.mpr (hT j i) + rw [← he, J.norm_map, ← hv, J.norm_map] + exact (ContinuousLinearMap.le_opNorm _ v).trans + (mul_le_mul_of_nonneg_right (h V) (norm_nonneg v)) + +end FiniteTensorCompressions + +section TensorNormIndependence + +variable {H K L B : Type*} + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + [NormedAddCommGroup L] [InnerProductSpace ℂ L] [CompleteSpace L] + [NonUnitalCStarAlgebra B] [PartialOrder B] [StarOrderedRing B] + +theorem tensor_norm_le_faithful {ι : Type*} [Finite ι] (s : Finset ι) + (T : ι → H →L[ℂ] H) (a : ι → B) + (φ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (ψ : B →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hφ : Function.Injective φ) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (ψ (a i))‖ ≤ + ‖∑ i ∈ s, TensorProduct.mapL (T i) (φ (a i))‖ := by + apply norm_tensorSum_le_of_finite_compressions s T (fun i => ψ (a i)) + (ContinuousLinearMap.opNorm_nonneg (∑ i ∈ s, TensorProduct.mapL (T i) (φ (a i)))) + intro V hV + exact (tensor_norm_le_faithful_finite_left s (stdOrthonormalBasis ℂ V) + (fun i => compress V (T i)) a φ ψ hφ).trans + (norm_tensorSum_compress_le s V T (fun i => φ (a i))) + +end TensorNormIndependence + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorCut.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc09467644e212f49ee865f55cec4eb63afc8fa0 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorCut.lean @@ -0,0 +1,68 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ApproximateCut +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +universe u v + +section TensorCut + +variable {A : Type u} {C : Type v} [CStarAlgebra A] [NonUnitalCStarAlgebra C] + +def rightElementaryHom : C →⋆ₙₐ[ℂ] MinimalTensor A C where + toFun c := minimalElementary 1 c + map_zero' := Subtype.ext (spatialElementary_zero_right 1) + map_add' _ _ := Subtype.ext (spatialElementary_add_right _ _ _) + map_smul' _ _ := Subtype.ext (spatialElementary_smul_right _ _ _) + map_mul' x y := by + apply Subtype.ext + change spatialElementary 1 (x*y) = spatialElementary (1 : A) x * spatialElementary 1 y + simpa only [one_mul] using spatialElementary_mul (1 : A) 1 x y + map_star' x := by + apply Subtype.ext + change spatialElementary 1 (star x) = star (spatialElementary (1 : A) x) + simpa only [star_one] using spatialElementary_star (1 : A) x + +@[simp] lemma rightElementaryHom_apply (c : C) : + rightElementaryHom (A := A) c = minimalElementary 1 c := rfl + +def tensorCut (c : C) (x : MinimalTensor A C) : MinimalTensor A C := + x - x * rightElementaryHom c + +lemma norm_tensorCut_le [PartialOrder C] [StarOrderedRing C] + (e : C) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) (x : MinimalTensor A C) : + ‖tensorCut e x‖ ≤ ‖x‖ := by + let := CStarAlgebra.spectralOrder (MinimalTensor A C) + let := CStarAlgebra.spectralOrderedRing (MinimalTensor A C) + exact norm_sub_mul_of_pos_contraction x (rightElementaryHom e) + (map_nonneg (rightElementaryHom (A := A)) he) + ((NonUnitalStarAlgHom.norm_apply_le (rightElementaryHom (A := A)) e).trans hen) + +lemma tensorCut_elementary (e c : C) (a : A) : + tensorCut e (minimalElementary a c) = minimalElementary a (c - c * e) := by + apply Subtype.ext + change spatialElementary a c - spatialElementary a c * spatialElementary 1 e = _ + rw [← spatialElementary_mul, mul_one] + have h := spatialElementary_add_right a (c-c*e) (c*e) + rw [sub_add_cancel] at h + exact sub_eq_iff_eq_add.mpr h + +end TensorCut + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorDensity.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab214f09f4bf2126aee9d08cb953cf36020b224b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorDensity.lean @@ -0,0 +1,141 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.GroupPolynomials +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate + +namespace WeakPureInfiniteness + +universe u v + +section TensorContinuity + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def spatialElementaryLeft (b : B) : A →L[ℂ] SpatialAmbient A B := + LinearMap.mkContinuous + { toFun a := spatialElementary a b + map_add' a a' := spatialElementary_add_left a a' b + map_smul' c a := spatialElementary_smul_left c a b } + ‖b‖ (fun a => by + change ‖spatialElementary a b‖ ≤ ‖b‖ * ‖a‖ + simpa only [mul_comm ‖b‖] using norm_spatialElementary_le a b) + +def spatialElementaryRight (a : A) : B →L[ℂ] SpatialAmbient A B := + LinearMap.mkContinuous + { toFun b := spatialElementary a b + map_add' b b' := spatialElementary_add_right a b b' + map_smul' c b := spatialElementary_smul_right c a b } + ‖a‖ (norm_spatialElementary_le a) + +@[simp] lemma spatialElementaryLeft_apply (a : A) (b : B) : + spatialElementaryLeft b a = spatialElementary a b := rfl + +@[simp] lemma spatialElementaryRight_apply (a : A) (b : B) : + spatialElementaryRight a b = spatialElementary a b := rfl + +lemma spatialElementary_sum_left {I : Type*} (s : Finset I) (a : I → A) (b : B) : + spatialElementary (∑ i ∈ s, a i) b = ∑ i ∈ s, spatialElementary (a i) b := by + classical + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp only [Finset.sum_insert hi, spatialElementary_add_left, ih] + +lemma spatialElementary_sum_right {I : Type*} (s : Finset I) (a : A) (b : I → B) : + spatialElementary a (∑ i ∈ s, b i) = ∑ i ∈ s, spatialElementary a (b i) := by + classical + induction s using Finset.induction_on with + | empty => simp + | @insert i s hi ih => simp only [Finset.sum_insert hi, spatialElementary_add_right, ih] + +def minimalAmbientInclusion : MinimalTensor A B →⋆ₙₐ[ℂ] SpatialAmbient A B where + toFun x := x.val + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +end TensorContinuity + +section GroupTensorDensity + +variable {G : Type u} [Group G] + +def groupTensorPolynomial : (G × G →₀ ℂ) →ₗ[ℂ] + MinimalTensor (FullGroupAlgebra G) (FullGroupAlgebra G) := + Finsupp.linearCombination ℂ (fun p => minimalElementary (fullGroupElement p.1) (fullGroupElement p.2)) + +lemma groupTensorPolynomial_val (c : G × G →₀ ℂ) : + (groupTensorPolynomial c).val = c.sum (fun p z => z • + spatialElementary (fullGroupElement p.1) (fullGroupElement p.2)) := by + simp only [groupTensorPolynomial, Finsupp.linearCombination_apply, Finsupp.sum] + change (minimalAmbientInclusion (A := FullGroupAlgebra G) (B := FullGroupAlgebra G)) + (∑ p ∈ c.support, c p • minimalElementary (fullGroupElement p.1) (fullGroupElement p.2)) = _ + simp only [map_sum, map_smul] + rfl + +lemma groupTensorPolynomial_dense : DenseRange (groupTensorPolynomial (G := G)) := by + let S : Submodule ℂ (SpatialAmbient (FullGroupAlgebra G) (FullGroupAlgebra G)) := + Submodule.span ℂ (Set.range fun p : G × G => + spatialElementary (fullGroupElement p.1) (fullGroupElement p.2)) + have hgen (s t : G) : spatialElementary (fullGroupElement s) (fullGroupElement t) ∈ S := + Submodule.subset_span (Set.mem_range_self (s,t)) + have hpoly (c d : G →₀ ℂ) : + spatialElementary (fullGroupPolynomial c) (fullGroupPolynomial d) ∈ S := by + change spatialElementary (c.sum (fun s z => z • fullGroupElement s)) + (d.sum (fun t z => z • fullGroupElement t)) ∈ S + have hl := spatialElementary_sum_left (A := FullGroupAlgebra G) (B := FullGroupAlgebra G) + c.support (fun s => c s • fullGroupElement s) (d.sum (fun t z => z • fullGroupElement t)) + refine hl.symm ▸ ?_ + apply Submodule.sum_mem S + intro s hs + have hsm := spatialElementary_smul_left (A := FullGroupAlgebra G) (B := FullGroupAlgebra G) + (c s) (fullGroupElement s) (d.sum (fun t z => z • fullGroupElement t)) + refine hsm.symm ▸ ?_ + apply Submodule.smul_mem S + have hr := spatialElementary_sum_right (A := FullGroupAlgebra G) (B := FullGroupAlgebra G) + d.support (fullGroupElement s) (fun t => d t • fullGroupElement t) + refine hr.symm ▸ ?_ + apply Submodule.sum_mem S + intro t ht + have hsm' := spatialElementary_smul_right (A := FullGroupAlgebra G) (B := FullGroupAlgebra G) + (d t) (fullGroupElement s) (fullGroupElement t) + exact hsm'.symm ▸ Submodule.smul_mem S _ (hgen s t) + have hall (a b : FullGroupAlgebra G) : spatialElementary a b ∈ S.topologicalClosure := by + refine (fullGroupPolynomial_dense (G := G)).induction_on a ?_ ?_ + · exact S.isClosed_topologicalClosure.preimage (spatialElementaryLeft b).continuous + · intro c + refine (fullGroupPolynomial_dense (G := G)).induction_on b ?_ ?_ + · exact S.isClosed_topologicalClosure.preimage (spatialElementaryRight (fullGroupPolynomial c)).continuous + · intro d + exact Submodule.le_topologicalClosure S (hpoly c d) + have hr (x : MinimalTensor (FullGroupAlgebra G) (FullGroupAlgebra G)) : x.val ∈ S.topologicalClosure := by + have hx : x.val ∈ (minimalTensorSubalgebra (FullGroupAlgebra G) (FullGroupAlgebra G) : Set _) := x.property + rw [minimalTensor_eq_closure_span] at hx + exact closure_minimal (Submodule.span_le.mpr (by rintro _ ⟨⟨a,b⟩,rfl⟩; exact hall a b)) + S.isClosed_topologicalClosure hx + rw [Metric.denseRange_iff] + intro x ε hε + obtain ⟨y, hy, hd⟩ := Metric.mem_closure_iff.mp (hr x) ε hε + obtain ⟨c, rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hy + refine ⟨c, ?_⟩ + rw [dist_eq_norm] + change ‖x.val - (groupTensorPolynomial c).val‖ < ε + rw [groupTensorPolynomial_val] + simpa only [dist_eq_norm] using hd + +end GroupTensorDensity + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorFlip.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorFlip.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc21e3c7361696ba60ed49a447beeef4ca1f31f8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorFlip.lean @@ -0,0 +1,49 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section TensorFlip + +variable {H K : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + +lemma norm_tensorSum_flip {ι : Type*} (s : Finset ι) + (T : ι → H →L[ℂ] H) (S : ι → K →L[ℂ] K) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ = + ‖∑ i ∈ s, TensorProduct.mapL (S i) (T i)‖ := by + let e := TensorProduct.commIsometry ℂ H K + have he (x : H ⊗[ℂ] K) : + e ((∑ i ∈ s, TensorProduct.mapL (T i) (S i)) x) = + (∑ i ∈ s, TensorProduct.mapL (S i) (T i)) (e x) := by + induction x using TensorProduct.inductionOn with + | tmul x y => simp [e, TensorProduct.commIsometry_apply] + | add x y hx hy => simp only [map_add,hx,hy] + apply le_antisymm + · apply ContinuousLinearMap.opNorm_le_bound _ (ContinuousLinearMap.opNorm_nonneg _) + intro x + rw [← e.norm_map ((∑ i ∈ s, TensorProduct.mapL (T i) (S i)) x), he] + simpa using (∑ i ∈ s, TensorProduct.mapL (S i) (T i)).le_opNorm (e x) + · apply ContinuousLinearMap.opNorm_le_bound _ (ContinuousLinearMap.opNorm_nonneg _) + intro y + obtain ⟨x,rfl⟩ := e.surjective y + rw [← he, e.norm_map, e.norm_map] + exact (∑ i ∈ s, TensorProduct.mapL (T i) (S i)).le_opNorm x + +end TensorFlip + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorFlipEquivalence.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorFlipEquivalence.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c72ff11ae7640d31f7ca28b91cf1cef7fc2bd71 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorFlipEquivalence.lean @@ -0,0 +1,164 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorLaws + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct ENNReal + +open UniformSpace Topology + +universe u v + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma norm_spatialSum_flip {ι : Type*} (s : Finset ι) (a : ι → A) (b : ι → B) : + ‖∑ i ∈ s,spatialElementary (a i) (b i)‖ = + ‖∑ i ∈ s,spatialElementary (b i) (a i)‖ := by + apply le_antisymm + · apply lp.norm_le_of_forall_le (norm_nonneg _) + intro π + rw [spatialSum_apply,norm_completion,norm_tensorSum_flip] + exact norm_tensorSum_le_spatial_any s b a π.rightRep π.leftRep + · apply lp.norm_le_of_forall_le (norm_nonneg _) + intro π + rw [spatialSum_apply,norm_completion,norm_tensorSum_flip] + exact norm_tensorSum_le_spatial_any s a b π.rightRep π.leftRep + +def tensorFlipPair (p : A × B) : MinimalTensor A B × MinimalTensor B A := + (minimalElementary p.1 p.2,minimalElementary p.2 p.1) + +lemma tensorFlipPair_mul (p q : A × B) : tensorFlipPair (p*q)= + tensorFlipPair p*tensorFlipPair q := by + ext <;> simp only [tensorFlipPair,Prod.fst_mul,Prod.snd_mul,minimalElementary_mul] + +lemma tensorFlipPair_star (p : A × B) : tensorFlipPair (star p)=star (tensorFlipPair p) := by + ext <;> simp only [tensorFlipPair,Prod.fst_star,Prod.snd_star,minimalElementary_star] + +variable (A B) in + +def tensorFlipGraph : NonUnitalStarSubalgebra ℂ (MinimalTensor A B × MinimalTensor B A) := + (NonUnitalStarAlgebra.adjoin ℂ (Set.range (tensorFlipPair (A := A) (B := B)))).topologicalClosure + +instance tensorFlipGraphCStar : NonUnitalCStarAlgebra (tensorFlipGraph A B) := by + letI : IsClosed (tensorFlipGraph A B : Set (MinimalTensor A B × MinimalTensor B A)) := isClosed_closure + infer_instance + +lemma tensorFlipGraph_norm (z : tensorFlipGraph A B) : ‖z.val.2‖=‖z.val.1‖ := by + have hz := z.property + change z.val ∈ closure (NonUnitalStarAlgebra.adjoin ℂ (Set.range (tensorFlipPair (A := A) (B := B))) : Set _) at hz + rw [closure_adjoin_eq_closure_span _ + (by rintro _ ⟨p,rfl⟩ _ ⟨q,rfl⟩; exact ⟨p*q,tensorFlipPair_mul p q⟩) + (by rintro _ ⟨p,rfl⟩; exact ⟨star p,tensorFlipPair_star p⟩)] at hz + apply closure_minimal (t := {z : MinimalTensor A B × MinimalTensor B A | ‖z.2‖=‖z.1‖}) + ?_ (isClosed_eq (by fun_prop) (by fun_prop)) hz + intro z hz + classical + obtain ⟨d,rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hz + change ‖(d.sum fun p t => t • tensorFlipPair p).2‖ = + ‖(d.sum fun p t => t • tensorFlipPair p).1‖ + simp only [Finsupp.sum,Prod.snd_sum,Prod.fst_sum,tensorFlipPair] + change ‖(minimalTensorSubalgebra B A).subtype (∑ p ∈ d.support,d p • minimalElementary p.2 p.1)‖ = + ‖(minimalTensorSubalgebra A B).subtype (∑ p ∈ d.support,d p • minimalElementary p.1 p.2)‖ + simp only [map_sum,map_smul] + change ‖∑ p ∈ d.support,d p • spatialElementary p.2 p.1‖ = + ‖∑ p ∈ d.support,d p • spatialElementary p.1 p.2‖ + simpa only [spatialElementary_smul_left,spatialElementary_smul_right] using + norm_spatialSum_flip d.support (fun p => d p • p.2) Prod.fst + +def tensorFlipFirst : tensorFlipGraph A B →⋆ₙₐ[ℂ] MinimalTensor A B where + toFun z := z.val.1 + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +def tensorFlipSecond : tensorFlipGraph A B →⋆ₙₐ[ℂ] MinimalTensor B A where + toFun z := z.val.2 + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +lemma tensorFlipFirst_isometry : Isometry (tensorFlipFirst (A := A) (B := B)) := by + apply AddMonoidHomClass.isometry_of_norm + intro z + change ‖z.val.1‖ = ‖z.val‖ + rw [Prod.norm_def,tensorFlipGraph_norm z,max_self] + +lemma tensorFlipFirst_surjective : Function.Surjective (tensorFlipFirst (A := A) (B := B)) := by + let F := (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra A B)).comp tensorFlipFirst + have hle : minimalTensorSubalgebra A B ≤ NonUnitalStarAlgHom.range F := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ (NonUnitalStarAlgebra.adjoin_le ?_) + · exact nonUnitalStarHom_isClosed_range F + · rintro _ ⟨p,rfl⟩ + refine ⟨⟨tensorFlipPair p,?_⟩,rfl⟩ + exact NonUnitalStarSubalgebra.le_topologicalClosure _ + (NonUnitalStarAlgebra.subset_adjoin ℂ _ (Set.mem_range_self p)) + intro z + obtain ⟨y,hy⟩ := hle z.property + exact ⟨y,Subtype.ext hy⟩ + +variable (A B) in + +def minimalFlipHom : MinimalTensor A B →⋆ₙₐ[ℂ] MinimalTensor B A := + (tensorFlipSecond (A := A) (B := B)).comp + (StarAlgEquiv.ofBijective (tensorFlipFirst (A := A) (B := B)) + ⟨(tensorFlipFirst_isometry (A := A) (B := B)).injective,tensorFlipFirst_surjective⟩).symm.toNonUnitalStarAlgHom + +@[simp] lemma minimalFlipHom_elementary (a : A) (b : B) : + minimalFlipHom A B (minimalElementary a b)=minimalElementary b a := by + let z : tensorFlipGraph A B := ⟨tensorFlipPair (a,b), + NonUnitalStarSubalgebra.le_topologicalClosure _ + (NonUnitalStarAlgebra.subset_adjoin ℂ _ (Set.mem_range_self (a,b)))⟩ + let e := StarAlgEquiv.ofBijective (tensorFlipFirst (A := A) (B := B)) + ⟨(tensorFlipFirst_isometry (A := A) (B := B)).injective,tensorFlipFirst_surjective⟩ + have he : e z=minimalElementary a b := rfl + change (e.symm (minimalElementary a b)).val.2=_ + rw [← he,StarAlgEquiv.symm_apply_apply] + rfl + +lemma minimalFlipHom_involutive (z : MinimalTensor A B) : + minimalFlipHom B A (minimalFlipHom A B z)=z := by + have h : (minimalFlipHom B A).comp (minimalFlipHom A B)= + NonUnitalStarAlgHom.id ℂ (MinimalTensor A B) := by + apply minimalTensor_hom_ext + intro a b + simp + exact DFunLike.congr_fun h z + +variable (A B) in + +def minimalFlip : MinimalTensor A B ≃⋆ₐ[ℂ] MinimalTensor B A := + StarAlgEquiv.ofBijective (minimalFlipHom A B) + ⟨Function.HasLeftInverse.injective ⟨minimalFlipHom B A,minimalFlipHom_involutive⟩, + fun z => ⟨minimalFlipHom B A z,minimalFlipHom_involutive z⟩⟩ + +@[simp] lemma minimalFlip_elementary (a : A) (b : B) : + minimalFlip A B (minimalElementary a b)=minimalElementary b a := + minimalFlipHom_elementary a b + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorFoundations.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorFoundations.lean new file mode 100644 index 0000000000000000000000000000000000000000..de172124b1101c397e79f2891e842205810bf6d4 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorFoundations.lean @@ -0,0 +1,479 @@ +import Mathlib + +namespace OAI + +universe u v + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace + +namespace WeakPureInfiniteness + +section CompletedOperators + +variable {H K L : Type*} + [NormedAddCommGroup H] [NormedSpace ℂ H] + [NormedAddCommGroup K] [NormedSpace ℂ K] + [NormedAddCommGroup L] [NormedSpace ℂ L] + +lemma norm_completion_le (T : H →L[ℂ] K) : ‖T.completion‖ ≤ ‖T‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg T) + intro x + induction x using Completion.induction_on with + | hp => exact isClosed_le (by fun_prop) (by fun_prop) + | ih x => simpa using T.le_opNorm x + +lemma norm_completion (T : H →L[ℂ] K) : ‖T.completion‖ = ‖T‖ := by + apply le_antisymm (norm_completion_le T) + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro x + simpa using T.completion.le_opNorm (x : Completion H) + +lemma completion_comp (S : K →L[ℂ] L) (T : H →L[ℂ] K) : + (S.comp T).completion = S.completion.comp T.completion := by + ext x + induction x using Completion.induction_on with + | hp => exact isClosed_eq (by fun_prop) (by fun_prop) + | ih x => simp + +lemma completion_add (S T : H →L[ℂ] K) : + (S + T).completion = S.completion + T.completion := by + ext x + induction x using Completion.induction_on with + | hp => exact isClosed_eq (by fun_prop) (by fun_prop) + | ih x => simp [← Completion.coe_add] + +lemma completion_smul (c : ℂ) (T : H →L[ℂ] K) : + (c • T).completion = c • T.completion := by + ext x + induction x using Completion.induction_on with + | hp => + exact isClosed_eq (c • T).completion.continuous + (T.completion.continuous.const_smul c) + | ih x => simp only [ContinuousLinearMap.completion_apply_coe, + smul_apply, Completion.coe_smul] + +lemma completion_zero : (0 : H →L[ℂ] K).completion = 0 := by + ext x + induction x using Completion.induction_on with + | hp => exact isClosed_eq (by fun_prop) (by fun_prop) + | ih x => simp + +end CompletedOperators + +section CompletedHilbertTensor + +variable {H K : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + +lemma inner_mapL_star (S : H →L[ℂ] H) (T : K →L[ℂ] K) (x y : H ⊗[ℂ] K) : + inner ℂ ((TensorProduct.mapL S T) x) y = + inner ℂ x ((TensorProduct.mapL (star S) (star T)) y) := by + induction x using TensorProduct.inductionOn with + | tmul x₁ x₂ => + induction y using TensorProduct.inductionOn with + | tmul y₁ y₂ => + simp only [TensorProduct.mapL_tmul, TensorProduct.inner_tmul, + ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right] + | add y₁ y₂ h₁ h₂ => simp only [inner_add_right, map_add, h₁, h₂] + | add x₁ x₂ h₁ h₂ => simp only [map_add, inner_add_left, h₁, h₂] + +lemma completion_mapL_star (S : H →L[ℂ] H) (T : K →L[ℂ] K) : + star (TensorProduct.mapL S T).completion = + (TensorProduct.mapL (star S) (star T)).completion := by + ext x + apply ext_inner_left ℂ + intro y + rw [ContinuousLinearMap.star_eq_adjoint, ContinuousLinearMap.adjoint_inner_right] + induction x using Completion.induction_on with + | hp => exact isClosed_eq (by fun_prop) (by fun_prop) + | ih x => + induction y using Completion.induction_on with + | hp => exact isClosed_eq (by fun_prop) (by fun_prop) + | ih y => + simp only [ContinuousLinearMap.completion_apply_coe, Completion.inner_coe] + exact inner_mapL_star S T y x + +end CompletedHilbertTensor + +structure ComplexHilbert where + Carrier : Type u + [normedAddCommGroup : NormedAddCommGroup Carrier] + [innerProductSpace : InnerProductSpace ℂ Carrier] + [completeSpace : CompleteSpace Carrier] + +attribute [instance] ComplexHilbert.normedAddCommGroup + ComplexHilbert.innerProductSpace ComplexHilbert.completeSpace + +instance : CoeSort ComplexHilbert.{u} (Type u) := ⟨ComplexHilbert.Carrier⟩ + +instance completedTensorCStar (H K : ComplexHilbert.{u}) : + CStarAlgebra (Completion (H ⊗[ℂ] K) →L[ℂ] Completion (H ⊗[ℂ] K)) := inferInstance + +instance hilbertOperatorsCStar (H : ComplexHilbert.{u}) : + CStarAlgebra (H →L[ℂ] H) := inferInstance + +structure SpatialRepresentation (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] where + left : ComplexHilbert.{max u v} + right : ComplexHilbert.{max u v} + leftRep : A →⋆ₙₐ[ℂ] (left →L[ℂ] left) + rightRep : B →⋆ₙₐ[ℂ] (right →L[ℂ] right) + +abbrev SpatialRepresentation.hilbert {A : Type u} {B : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + (π : SpatialRepresentation A B) : ComplexHilbert.{max u v} where + Carrier := Completion (π.left ⊗[ℂ] π.right) + +abbrev SpatialRepresentation.space {A : Type u} {B : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + (π : SpatialRepresentation A B) := Completion (π.left ⊗[ℂ] π.right) + +def SpatialAmbient (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : Type (max u v + 1) := + lp (fun π : SpatialRepresentation A B => π.space →L[ℂ] π.space) ∞ + +instance spatialAmbientCStar (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : + NonUnitalCStarAlgebra (SpatialAmbient A B) := by + unfold SpatialAmbient + infer_instance + +instance spatialAmbientCoeFun (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : + CoeFun (SpatialAmbient A B) (fun _ => ∀ π : SpatialRepresentation A B, π.space →L[ℂ] π.space) := + ⟨fun z => z.val⟩ + +def spatialElementary {A : Type u} {B : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + (a : A) (b : B) : SpatialAmbient A B := + ⟨fun π => (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion, + memℓp_infty ⟨‖a‖ * ‖b‖, by + rintro _ ⟨π, rfl⟩ + dsimp only + rw [norm_completion] + exact (TensorProduct.norm_mapL_le _ _).trans + (mul_le_mul (NonUnitalStarAlgHom.norm_apply_le π.leftRep a) (NonUnitalStarAlgHom.norm_apply_le π.rightRep b) + (norm_nonneg _) (norm_nonneg _))⟩⟩ + +section ElementaryTensors + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +@[simp] +lemma spatialElementary_zero_left (b : B) : spatialElementary (0 : A) b = 0 := by + apply Subtype.ext + funext π + change (TensorProduct.mapL _ _).completion = 0 + simp [completion_zero] + +@[simp] +lemma spatialElementary_zero_right (a : A) : spatialElementary a (0 : B) = 0 := by + apply Subtype.ext + funext π + change (TensorProduct.mapL _ _).completion = 0 + simp [completion_zero] + +lemma spatialElementary_add_left (a a' : A) (b : B) : + spatialElementary (a + a') b = spatialElementary a b + spatialElementary a' b := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep (a + a')) (π.rightRep b)).completion = + (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + + (TensorProduct.mapL (π.leftRep a') (π.rightRep b)).completion + rw [map_add, TensorProduct.mapL_add_left, completion_add] + +lemma spatialElementary_add_right (a : A) (b b' : B) : + spatialElementary a (b + b') = spatialElementary a b + spatialElementary a b' := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep a) (π.rightRep (b + b'))).completion = + (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + + (TensorProduct.mapL (π.leftRep a) (π.rightRep b')).completion + rw [map_add, TensorProduct.mapL_add_right, completion_add] + +lemma spatialElementary_smul_left (c : ℂ) (a : A) (b : B) : + spatialElementary (c • a) b = c • spatialElementary a b := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep (c • a)) (π.rightRep b)).completion = + c • (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + rw [map_smul, TensorProduct.mapL_smul_left, completion_smul] + +lemma spatialElementary_smul_right (c : ℂ) (a : A) (b : B) : + spatialElementary a (c • b) = c • spatialElementary a b := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep a) (π.rightRep (c • b))).completion = + c • (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + rw [map_smul, TensorProduct.mapL_smul_right, completion_smul] + +lemma spatialElementary_mul (a a' : A) (b b' : B) : + spatialElementary (a * a') (b * b') = spatialElementary a b * spatialElementary a' b' := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep (a * a')) (π.rightRep (b * b'))).completion = + (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion * + (TensorProduct.mapL (π.leftRep a') (π.rightRep b')).completion + rw [map_mul, map_mul, TensorProduct.mapL_mul] + exact completion_comp _ _ + +@[simp] +lemma spatialElementary_star (a : A) (b : B) : + spatialElementary (star a) (star b) = star (spatialElementary a b) := by + apply Subtype.ext + funext π + change (TensorProduct.mapL (π.leftRep (star a)) (π.rightRep (star b))).completion = + star (TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion + rw [map_star, map_star] + exact (completion_mapL_star _ _).symm + +lemma norm_spatialElementary_le (a : A) (b : B) : ‖spatialElementary a b‖ ≤ ‖a‖ * ‖b‖ := by + apply lp.norm_le_of_forall_le (mul_nonneg (norm_nonneg _) (norm_nonneg _)) + intro π + change ‖(TensorProduct.mapL (π.leftRep a) (π.rightRep b)).completion‖ ≤ _ + rw [norm_completion] + exact (TensorProduct.norm_mapL_le _ _).trans + (mul_le_mul (NonUnitalStarAlgHom.norm_apply_le π.leftRep a) + (NonUnitalStarAlgHom.norm_apply_le π.rightRep b) (norm_nonneg _) (norm_nonneg _)) + +end ElementaryTensors + +def minimalTensorSubalgebra (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : + NonUnitalStarSubalgebra ℂ (SpatialAmbient A B) := + (NonUnitalStarAlgebra.adjoin ℂ (Set.range fun p : A × B => spatialElementary p.1 p.2)).topologicalClosure + +abbrev MinimalTensor (A : Type u) (B : Type v) + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] := minimalTensorSubalgebra A B + +instance (A : Type u) (B : Type v) [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : + NonUnitalCStarAlgebra (MinimalTensor A B) := by + letI : IsClosed ((minimalTensorSubalgebra A B : NonUnitalStarSubalgebra ℂ + (SpatialAmbient A B)) : Set (SpatialAmbient A B)) := + isClosed_closure + exact inferInstance + +section Exactness + +variable {A : Type u} {C D : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def SpatialRepresentation.precompRight (π : SpatialRepresentation A D) + (q : C →⋆ₙₐ[ℂ] D) : SpatialRepresentation A C where + left := π.left + right := π.right + leftRep := π.leftRep + rightRep := π.rightRep.comp q + +def tensorKernelIdeal (q : C →⋆ₙₐ[ℂ] D) : NonUnitalStarSubalgebra ℂ (SpatialAmbient A C) := + (NonUnitalStarAlgebra.adjoin ℂ + {z | ∃ a : A, ∃ c : C, q c = 0 ∧ z = spatialElementary a c}).topologicalClosure + +end Exactness + +def Exact (A : Type u) [NonUnitalCStarAlgebra A] : Prop := + ∀ (C D : Type u) [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + (q : C →⋆ₙₐ[ℂ] D), Function.Surjective q → + ∀ z : MinimalTensor A C, + (∀ π : SpatialRepresentation A D, (z.val : SpatialAmbient A C) (π.precompRight q) = 0) → + z.val ∈ tensorKernelIdeal (A := A) q + +section Nuclearity + +variable {A B : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [PartialOrder A] [StarOrderedRing A] [PartialOrder B] [StarOrderedRing B] + +def CompletelyPositive (φ : A →L[ℂ] B) : Prop := + ∀ n : ℕ, ∀ x : CStarMatrix (Fin n) (Fin n) A, 0 ≤ x → + 0 ≤ CStarMatrix.ofMatrix (fun i j => φ (x i j)) + +def CompletelyPositive.toMap {φ : A →L[ℂ] B} (hφ : CompletelyPositive φ) : + CompletelyPositiveMap A B where + toLinearMap := φ.toLinearMap + map_cstarMatrix_nonneg' n x hx := hφ n x hx + +lemma completelyPositive_of_map (φ : A →L[ℂ] B) (ψ : CompletelyPositiveMap A B) + (h : ψ.toLinearMap = φ.toLinearMap) : CompletelyPositive φ := by + intro n x hx + have hm := ψ.map_cstarMatrix_nonneg' n x hx + have he : x.map ψ.toLinearMap = CStarMatrix.ofMatrix (fun i j => φ (x i j)) := by + ext i j + exact congrArg (fun f : A →ₗ[ℂ] B => f (x i j)) h + exact he ▸ hm + +def Nuclear (A : Type*) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] : Prop := + ∀ F : Finset A, ∀ ε : ℝ, 0 < ε → + ∃ n : ℕ, 1 ≤ n ∧ + ∃ φ : A →L[ℂ] CStarMatrix (Fin n) (Fin n) ℂ, + ∃ ψ : CStarMatrix (Fin n) (Fin n) ℂ →L[ℂ] A, + CompletelyPositive φ ∧ CompletelyPositive ψ ∧ ‖φ‖ ≤ 1 ∧ ‖ψ‖ ≤ 1 ∧ + ∀ a ∈ F, ‖ψ (φ a) - a‖ < ε + +end Nuclearity + +structure CuntzRepresentation where + hilbert : ComplexHilbert.{0} + [nontrivial : Nontrivial hilbert] + generators : ℕ → hilbert →L[ℂ] hilbert + relations : ∀ i j, star (generators i) * generators j = if i = j then 1 else 0 + +attribute [instance] CuntzRepresentation.nontrivial + +abbrev CuntzAmbient := + lp (fun π : CuntzRepresentation => π.hilbert →L[ℂ] π.hilbert) ∞ + +instance : CStarAlgebra CuntzAmbient where + +lemma CuntzRepresentation.norm_generator (π : CuntzRepresentation) (i : ℕ) : + ‖π.generators i‖ = 1 := by + have h : ‖π.generators i‖ * ‖π.generators i‖ = 1 := by + rw [← CStarRing.norm_star_mul_self, π.relations i i, ite_eq_left rfl, norm_one] + nlinarith [norm_nonneg (π.generators i)] + +def cuntzGenerator (i : ℕ) : CuntzAmbient := + ⟨fun π => π.generators i, memℓp_infty ⟨1, by + rintro _ ⟨π, rfl⟩ + exact (π.norm_generator i).le⟩⟩ + +def oInfinitySubalgebra : StarSubalgebra ℂ CuntzAmbient := + (StarAlgebra.adjoin ℂ (Set.range cuntzGenerator)).topologicalClosure + +abbrev OInfinity := oInfinitySubalgebra + +instance : CStarAlgebra OInfinity := by + letI : IsClosed (oInfinitySubalgebra : Set CuntzAmbient) := + isClosed_closure + exact inferInstance + +open scoped InnerProductSpace + +abbrev FockSpace := lp (fun _ : List ℕ => ℂ) 2 + +def fockBasis (w : List ℕ) : ℂ →ₗᵢ[ℂ] FockSpace where + toLinearMap := (lp.singleContinuousLinearMap ℂ (fun _ : List ℕ => ℂ) 2 w).toLinearMap + norm_map' z := by + change ‖lp.single (E := fun _ : List ℕ => ℂ) 2 w z‖ = ‖z‖ + exact lp.norm_single (E := fun _ : List ℕ => ℂ) (by norm_num : (0 : ℝ≥0∞) < 2) w z + +@[simp] +lemma fockBasis_apply (w : List ℕ) (z : ℂ) : + fockBasis w z = lp.single 2 w z := rfl + +lemma fockPrefix_orthogonal (i : ℕ) : + OrthogonalFamily ℂ (fun _ : List ℕ => ℂ) (fun w => fockBasis (i :: w)) := by + intro w v h z t + simp only [fockBasis_apply, lp.inner_single_left] + rw [lp.single_apply_ne 2 _ _ (by simpa using h)] + exact inner_zero_right _ + +def fockShift (i : ℕ) : FockSpace →ₗᵢ[ℂ] FockSpace := + (fockPrefix_orthogonal i).linearIsometry + +@[simp] +lemma fockShift_single (i : ℕ) (w : List ℕ) (z : ℂ) : + fockShift i (lp.single 2 w z) = lp.single 2 (i :: w) z := + (fockPrefix_orthogonal i).linearIsometry_apply_single z + +lemma fockShift_apply (i : ℕ) (x : FockSpace) (w : List ℕ) : + fockShift i x (i :: w) = x w := by + have h := (fockPrefix_orthogonal i).hasSum_linearIsometry x + have h' := (lp.evalCLM ℂ (fun _ : List ℕ => ℂ) 2 (i :: w)).hasSum h + change HasSum (fun v : List ℕ => + lp.single (E := fun _ : List ℕ => ℂ) 2 (i :: v) (x v) (i :: w)) + (fockShift i x (i :: w)) at h' + have h'' : HasSum (fun v => if v = w then x w else 0) + (fockShift i x (i :: w)) := by + convert h' using 1 + ext v + by_cases h : v = w + · subst v; simp + · simp [lp.single_apply, h, Ne.symm h] + exact h''.unique (hasSum_ite_eq w (x w)) + +lemma fockShift_apply_ne (i j : ℕ) (hij : i ≠ j) (x : FockSpace) (w : List ℕ) : + fockShift j x (i :: w) = 0 := by + have h := (fockPrefix_orthogonal j).hasSum_linearIsometry x + have h' := (lp.evalCLM ℂ (fun _ : List ℕ => ℂ) 2 (i :: w)).hasSum h + change HasSum (fun v : List ℕ => + lp.single (E := fun _ : List ℕ => ℂ) 2 (j :: v) (x v) (i :: w)) + (fockShift j x (i :: w)) at h' + have h'' : HasSum (fun _ : List ℕ => (0 : ℂ)) + (fockShift j x (i :: w)) := by + convert h' using 1 + ext v + simp [lp.single_apply, hij] + exact h''.unique hasSum_zero + +lemma fockShift_adjoint_apply (i : ℕ) (x : FockSpace) (w : List ℕ) : + (fockShift i).toContinuousLinearMap.adjoint x w = x (i :: w) := by + have h := ContinuousLinearMap.adjoint_inner_right (fockShift i).toContinuousLinearMap + (lp.single (E := fun _ : List ℕ => ℂ) 2 w 1) x + change inner ℂ (lp.single 2 w 1) ((fockShift i).toContinuousLinearMap.adjoint x) = + inner ℂ (fockShift i (lp.single 2 w 1)) x at h + simpa [fockShift_single, lp.inner_single_left, RCLike.inner_apply] using h + +lemma fockShift_relations (i j : ℕ) : + star (fockShift i).toContinuousLinearMap * (fockShift j).toContinuousLinearMap = + if i = j then 1 else 0 := by + ext x w + change ((fockShift i).toContinuousLinearMap.adjoint ((fockShift j) x)) w = _ + rw [fockShift_adjoint_apply] + by_cases h : i = j + · subst j + simp [fockShift_apply] + · simp [h, fockShift_apply_ne i j h] + +instance fockSpace_nontrivial : Nontrivial FockSpace := by + refine ⟨⟨lp.single 2 [] 1, 0, ?_⟩⟩ + intro h + have h' := congrArg (fun x : FockSpace => x []) h + simp at h' + +def fockRepresentation : CuntzRepresentation where + hilbert := { Carrier := FockSpace } + generators i := (fockShift i).toContinuousLinearMap + relations := fockShift_relations + +instance : Nonempty CuntzRepresentation := ⟨fockRepresentation⟩ + +instance : Nontrivial CuntzAmbient := by + refine ⟨⟨0, 1, ?_⟩⟩ + intro h + have h' := congrArg (fun x : CuntzAmbient => x fockRepresentation) h + exact zero_ne_one h' + +instance : Nontrivial OInfinity := inferInstance + +def oInfinityEvaluation (π : CuntzRepresentation) : + OInfinity →⋆ₐ[ℂ] (π.hilbert →L[ℂ] π.hilbert) where + toFun x := x.val π + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +def oInfinityIsometry (i : ℕ) : OInfinity := + ⟨cuntzGenerator i, StarSubalgebra.le_topologicalClosure _ + (StarAlgebra.subset_adjoin ℂ _ ⟨i, rfl⟩)⟩ + +@[simp] +lemma oInfinityEvaluation_isometry (π : CuntzRepresentation) (i : ℕ) : + oInfinityEvaluation π (oInfinityIsometry i) = π.generators i := rfl + +lemma oInfinityIsometry_relations (i j : ℕ) : + star (oInfinityIsometry i) * oInfinityIsometry j = if i = j then 1 else 0 := by + apply Subtype.ext + apply Subtype.ext + funext π + change star (π.generators i) * π.generators j = _ + rw [π.relations i j] + split_ifs <;> rfl + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorFunctoriality.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorFunctoriality.lean new file mode 100644 index 0000000000000000000000000000000000000000..ada7adb37fce6252351c2a5d0f010928cd90378e --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorFunctoriality.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.NonUnitalClosedRange +import OAI.Analysis.WeakInfiniteness.TensorFoundations + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal + +namespace WeakPureInfiniteness + +universe u v + +section TensorFunctoriality + +variable {A : Type u} {C D : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def spatialMapRight (q : C →⋆ₙₐ[ℂ] D) : SpatialAmbient A C →⋆ₙₐ[ℂ] SpatialAmbient A D where + toFun z := ⟨fun π => z (π.precompRight q), memℓp_infty ⟨‖z‖, by + rintro _ ⟨π, rfl⟩ + exact lp.norm_apply_le_norm ENNReal.top_ne_zero z (π.precompRight q)⟩⟩ + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +@[simp] +lemma spatialMapRight_elementary (q : C →⋆ₙₐ[ℂ] D) (a : A) (c : C) : + spatialMapRight q (spatialElementary a c) = spatialElementary a (q c) := rfl + +lemma spatialElementary_mem (a : A) (c : C) : + spatialElementary a c ∈ minimalTensorSubalgebra A C := + NonUnitalStarSubalgebra.le_topologicalClosure _ + (NonUnitalStarAlgebra.subset_adjoin ℂ _ (Set.mem_range_self (a,c))) + +def minimalElementary (a : A) (c : C) : MinimalTensor A C := + ⟨spatialElementary a c, spatialElementary_mem a c⟩ + +lemma spatialMapRight_mem (q : C →⋆ₙₐ[ℂ] D) {z : SpatialAmbient A C} + (hz : z ∈ minimalTensorSubalgebra A C) : + spatialMapRight q z ∈ minimalTensorSubalgebra A D := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ + (t := NonUnitalStarSubalgebra.comap (spatialMapRight q) (minimalTensorSubalgebra A D)) + (NonUnitalStarAlgebra.adjoin_le ?_) ?_ hz + · rintro _ ⟨⟨a,c⟩, rfl⟩ + change spatialMapRight q (spatialElementary a c) ∈ minimalTensorSubalgebra A D + rw [spatialMapRight_elementary] + exact spatialElementary_mem a (q c) + · exact isClosed_closure.preimage (nonUnitalStarHom_continuous (spatialMapRight q)) + +def minimalMapRight (q : C →⋆ₙₐ[ℂ] D) : MinimalTensor A C →⋆ₙₐ[ℂ] MinimalTensor A D := + NonUnitalStarAlgHom.codRestrict + ((spatialMapRight q).comp (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra A C))) + (minimalTensorSubalgebra A D) (fun z => spatialMapRight_mem q z.property) + +@[simp] +lemma minimalMapRight_elementary (q : C →⋆ₙₐ[ℂ] D) (a : A) (c : C) : + minimalMapRight q (minimalElementary a c) = minimalElementary a (q c) := rfl + +theorem minimalMapRight_surjective (q : C →⋆ₙₐ[ℂ] D) (hq : Function.Surjective q) : + Function.Surjective (minimalMapRight (A := A) q) := by + let F := (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra A D)).comp + (minimalMapRight (A := A) q) + have hle : minimalTensorSubalgebra A D ≤ NonUnitalStarAlgHom.range F := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ + (NonUnitalStarAlgebra.adjoin_le ?_) + · exact nonUnitalStarHom_isClosed_range F + · rintro _ ⟨⟨a,d⟩, rfl⟩ + obtain ⟨c, rfl⟩ := hq d + exact ⟨minimalElementary a c, rfl⟩ + intro z + obtain ⟨y, hy⟩ := hle z.property + exact ⟨y, Subtype.ext hy⟩ + +end TensorFunctoriality + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorHilbertSum.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorHilbertSum.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c6918233dff0e80b24e71e451ad0919e18fb6d9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorHilbertSum.lean @@ -0,0 +1,101 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FreeTwistedNorm + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section TensorHilbertSum + +variable {H G : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +def tensorSequence (ξ : H) : GroupHilbert G →L[ℂ] HilbertValued.HilbertSum G H := + lp.mapCLM 2 (fun _ => (ContinuousLinearMap.id ℂ ℂ).smulRight ξ) (norm_nonneg ξ) + (fun _ => by simp [ContinuousLinearMap.norm_smulRight_apply]) + +@[simp] +lemma tensorSequence_apply (ξ : H) (η : GroupHilbert G) (g : G) : + tensorSequence ξ η g = η g • ξ := rfl + +def tensorSequenceBilinear : H →ₗ[ℂ] GroupHilbert G →ₗ[ℂ] HilbertValued.HilbertSum G H where + toFun ξ := (tensorSequence ξ).toLinearMap + map_add' ξ ζ := by ext η g; simp [smul_add] + map_smul' c ξ := by ext η g; simp [smul_smul, mul_comm] + +def tensorToHilbertSumMap : (H ⊗[ℂ] GroupHilbert G) →ₗ[ℂ] HilbertValued.HilbertSum G H := + TensorProduct.lift tensorSequenceBilinear + +@[simp] +lemma tensorToHilbertSumMap_tmul (ξ : H) (η : GroupHilbert G) : + tensorToHilbertSumMap (ξ ⊗ₜ[ℂ] η) = tensorSequence ξ η := rfl + +lemma tensorToHilbertSumMap_inner (x y : H ⊗[ℂ] GroupHilbert G) : + inner ℂ (tensorToHilbertSumMap x) (tensorToHilbertSumMap y) = inner ℂ x y := by + induction x using TensorProduct.inductionOn with + | tmul ξ η => + induction y using TensorProduct.inductionOn with + | tmul ζ θ => + simp only [tensorToHilbertSumMap_tmul, lp.inner_eq_tsum, tensorSequence_apply, + inner_smul_left, inner_smul_right, TensorProduct.inner_tmul, RCLike.inner_apply] + rw [← tsum_mul_left] + apply tsum_congr + intro g + ring + | add y z hy hz => simp only [map_add, inner_add_right, hy, hz] + | add x z hx hz => simp only [map_add, inner_add_left, hx, hz] + +def tensorToHilbertSum : (H ⊗[ℂ] GroupHilbert G) →ₗᵢ[ℂ] HilbertValued.HilbertSum G H := + LinearMap.isometryOfInner (E := H ⊗[ℂ] GroupHilbert G) + (E' := HilbertValued.HilbertSum G H) (𝕜 := ℂ) tensorToHilbertSumMap + (fun x y => tensorToHilbertSumMap_inner x y) + +variable [Group G] + +lemma tensorToHilbertSum_intertwining (π : G →* H ≃ₗᵢ[ℂ] H) (s : G) + (z : H ⊗[ℂ] GroupHilbert G) : + tensorToHilbertSum (TensorProduct.mapL + (π s).toContinuousLinearEquiv.toContinuousLinearMap (leftRegular s) z) = + HilbertValued.twistedRegular π s (tensorToHilbertSum z) := by + induction z using TensorProduct.inductionOn with + | tmul ξ η => + ext g + change (((leftRegular s : GroupHilbert G →L[ℂ] GroupHilbert G) η) g) • π s ξ = + π s (η (s⁻¹ * g) • ξ) + simp + | add z w hz hw => simp only [map_add, hz, hw] + +end TensorHilbertSum + +theorem norm_freeTensor_sum_le {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (π : FreeTwo →* H ≃ₗᵢ[ℂ] H) : + ‖∑ s : FreeLetter, TensorProduct.mapL + (π (freeLetter s)).toContinuousLinearEquiv.toContinuousLinearMap + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo)‖ ≤ 2 * Real.sqrt 3 := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro z + have he : tensorToHilbertSum ((∑ s : FreeLetter, TensorProduct.mapL + (π (freeLetter s)).toContinuousLinearEquiv.toContinuousLinearMap + (leftRegular (freeLetter s) : GroupHilbert FreeTwo →L[ℂ] GroupHilbert FreeTwo)) z) = + (∑ s : FreeLetter, HilbertValued.twistedRegular π (freeLetter s)) + (tensorToHilbertSum z) := by + simp only [sum_apply, map_sum, tensorToHilbertSum_intertwining] + rw [← (tensorToHilbertSum (H := H) (G := FreeTwo)).norm_map, he] + exact (ContinuousLinearMap.le_opNorm _ _).trans + (by + simpa using mul_le_mul_of_nonneg_right (norm_freeTwisted_sum_le π) + (norm_nonneg (tensorToHilbertSum z))) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorIdealCut.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorIdealCut.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9c8e8b6c955209ca9479a477484e93968dab1e8 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorIdealCut.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.TensorCut +import OAI.Analysis.WeakInfiniteness.UniformKernelConvergence + +namespace OAI + +universe u v + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology + +namespace WeakPureInfiniteness + +open Filter Topology + +section TensorIdealCut + +variable {A : Type u} {C D : Type v} [CStarAlgebra A] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def kernelAlgebra (q : C →⋆ₙₐ[ℂ] D) : NonUnitalStarSubalgebra ℂ C where + carrier := {c | q c = 0} + zero_mem' := map_zero q + add_mem' hx hy := by change q (_+_) = 0; rw [map_add,hx,hy,add_zero] + mul_mem' hx _ := by change q (_*_) = 0; rw [map_mul,hx,zero_mul] + smul_mem' c _ hx := by change q (c • _) = 0; rw [map_smul,hx,smul_zero] + star_mem' hx := by change q (star _) = 0; rw [map_star,hx,star_zero] + +lemma kernelAlgebra_closed (q : C →⋆ₙₐ[ℂ] D) : IsClosed (kernelAlgebra q : Set C) := + isClosed_eq (nonUnitalStarHom_continuous q) continuous_const + +instance (q : C →⋆ₙₐ[ℂ] D) : NonUnitalCStarAlgebra (kernelAlgebra q) := by + letI := kernelAlgebra_closed q + infer_instance + +def tensorCutLinear (e : C) : MinimalTensor A C →ₗ[ℂ] MinimalTensor A C where + toFun := tensorCut e + map_add' x y := by simp [tensorCut,add_mul,add_sub_add_comm] + map_smul' c x := by simp [tensorCut,smul_mul_assoc,smul_sub] + +def cutVanishingSpace {ι : Type*} (l : Filter ι) (e : ι → C) : + Submodule ℂ (MinimalTensor A C) where + carrier := {x | Tendsto (fun i => tensorCut (e i) x) l (𝓝 0)} + zero_mem' := by simpa [tensorCut] using (tendsto_const_nhds : Tendsto (fun _ : ι => (0 : MinimalTensor A C)) l (𝓝 0)) + add_mem' hx hy := by + change Tendsto _ _ _ + have hadd (i) (x y : MinimalTensor A C) : + tensorCut (e i) (x+y) = tensorCut (e i) x + tensorCut (e i) y := + (tensorCutLinear (e i)).map_add x y + simp only [hadd] + simpa only [add_zero] using hx.add hy + smul_mem' c x hx := by + change Tendsto _ _ _ + have hsmul (i) (y : MinimalTensor A C) : + tensorCut (e i) (c • y) = c • tensorCut (e i) y := + (tensorCutLinear (e i)).map_smul c y + simp only [hsmul] + simpa only [smul_zero] using hx.const_smul c + +lemma cutVanishingSpace_closed [PartialOrder C] [StarOrderedRing C] + {ι : Type*} (l : Filter ι) (e : ι → C) + (he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1) : + IsClosed (cutVanishingSpace (A := A) l e : Set (MinimalTensor A C)) := by + apply isClosed_setOf_tendsto_zero_of_bound l (fun i => tensorCutLinear (e i)) + filter_upwards [he] with i hi + exact norm_tensorCut_le (e i) hi.1 hi.2 + +lemma tensorCut_tendsto_zero_on_ideal [PartialOrder C] [StarOrderedRing C] + {ι : Type*} (l : Filter ι) (e : ι → C) + (he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1) + (q : C →⋆ₙₐ[ℂ] D) + (happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c)) + (x : MinimalTensor A C) (hx : x.val ∈ tensorKernelIdeal (A := A) q) : + Tendsto (fun i => tensorCut (e i) x) l (𝓝 0) := by + let S := cutVanishingSpace (A := A) l e + let j : MinimalTensor A C →ₗ[ℂ] SpatialAmbient A C := + { toFun := Subtype.val + map_add' _ _ := rfl + map_smul' _ _ := rfl } + let T := S.map j + have hTc : IsClosed (T : Set (SpatialAmbient A C)) := + isClosed_closure.isClosedMap_subtype_val _ (cutVanishingSpace_closed l e he) + have hgen : ∀ a c, q c = 0 → spatialElementary a c ∈ T := by + intro a c hc + refine ⟨minimalElementary a c, ?_, rfl⟩ + change Tendsto (fun i => tensorCut (e i) (minimalElementary a c)) l (𝓝 0) + simp only [tensorCut_elementary] + let F : C →L[ℂ] MinimalTensor A C := + LinearMap.mkContinuous + { toFun c := minimalElementary a c + map_add' c d := Subtype.ext (spatialElementary_add_right a c d) + map_smul' r c := Subtype.ext (spatialElementary_smul_right r a c) } + ‖a‖ (norm_spatialElementary_le a) + have hh : Tendsto (fun i => c-c*e i) l (𝓝 0) := by + simpa only [sub_self] using + (tendsto_const_nhds : Tendsto (fun _ : ι => c) l (𝓝 c)).sub (happ c hc) + have hF (b : C) : F b = minimalElementary a b := rfl + have h := F.continuous.tendsto 0 |>.comp hh + simp only [Function.comp_def, hF] at h + have hz : minimalElementary a (0 : C) = (0 : MinimalTensor A C) := map_zero F + exact hz ▸ h + have hspan : Submodule.span ℂ + {z : SpatialAmbient A C | ∃ a : A, ∃ c : C, q c = 0 ∧ z = spatialElementary a c} ≤ T := by + apply Submodule.span_le.mpr + rintro _ ⟨a,c,hc,rfl⟩ + exact hgen a c hc + change x.val ∈ (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A C)) at hx + rw [tensorKernelIdeal_eq_closure_span] at hx + have hmem : x.val ∈ T := (closure_minimal hspan hTc) hx + obtain ⟨y,hy,hyx⟩ := hmem + have hyx' : y = x := Subtype.ext hyx + exact hyx' ▸ hy + +end TensorIdealCut + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorIdealFunctional.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorIdealFunctional.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac80b37a64cfa2dcc5db8dcd41df5b6e5aff49b1 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorIdealFunctional.lean @@ -0,0 +1,80 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality + +namespace OAI + +universe u v + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section ClosedTensorIdeal + +variable {A : Type u} {B C : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +lemma tensorFunctional_vanishes_ideal (q : B →⋆ₙₐ[ℂ] C) + (φ : MinimalTensor A B →L[ℂ] ℂ) + (hφ : ∀ a b, q b = 0 → φ (minimalElementary a b) = 0) + (x : MinimalTensor A B) (hx : x.val ∈ tensorKernelIdeal (A := A) q) : φ x = 0 := by + have hs : ∀ y ∈ Submodule.span ℂ + {z : SpatialAmbient A B | ∃ a : A, ∃ b : B, q b = 0 ∧ z = spatialElementary a b}, + ∃ z : MinimalTensor A B, z.val = y ∧ φ z = 0 := by + intro y hy + induction hy using Submodule.span_induction with + | mem y hy => + obtain ⟨a,b,hb,rfl⟩ := hy + exact ⟨minimalElementary a b, rfl, hφ a b hb⟩ + | zero => exact ⟨0, rfl, map_zero φ⟩ + | add y w _ _ hy hw => + obtain ⟨z,rfl,hz⟩ := hy + obtain ⟨v,rfl,hv⟩ := hw + exact ⟨z+v, rfl, by rw [map_add,hz,hv,add_zero]⟩ + | smul c y _ hy => + obtain ⟨z,rfl,hz⟩ := hy + exact ⟨c • z, rfl, by rw [map_smul,hz,smul_zero]⟩ + by_contra hn + have hp : 0 < ‖φ x‖ := norm_pos_iff.mpr hn + have hC : 0 < ‖φ‖ + 1 := by positivity + change x.val ∈ (tensorKernelIdeal (A := A) q : Set (SpatialAmbient A B)) at hx + rw [tensorKernelIdeal_eq_closure_span] at hx + obtain ⟨y,hy,hd⟩ := Metric.mem_closure_iff.mp hx (‖φ x‖ / (‖φ‖ + 1)) (div_pos hp hC) + obtain ⟨z,rfl,hz⟩ := hs y hy + have hd' : ‖x-z‖ < ‖φ x‖ / (‖φ‖ + 1) := by + change ‖x.val-z.val‖ < _ + simpa only [dist_eq_norm] using hd + have he : φ (x-z) = φ x := by rw [map_sub,hz,sub_zero] + have hbound : ‖φ x‖ ≤ (‖φ‖ + 1) * ‖x-z‖ := by + rw [← he] + exact (φ.le_opNorm (x-z)).trans (mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _)) + have hlt : (‖φ‖ + 1) * ‖x-z‖ < ‖φ x‖ := by + exact (mul_lt_mul_of_pos_left hd' hC).trans_eq (mul_div_cancel₀ _ (ne_of_gt hC)) + exact (not_lt_of_ge hbound) hlt + +lemma exact_functional_kernel {A B C : Type u} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + (hA : Exact A) (q : B →⋆ₙₐ[ℂ] C) (hq : Function.Surjective q) + (φ : MinimalTensor A B →L[ℂ] ℂ) + (hφ : ∀ a b, q b = 0 → φ (minimalElementary a b) = 0) + (x : MinimalTensor A B) (hx : minimalMapRight q x = 0) : φ x = 0 := by + apply tensorFunctional_vanishes_ideal q φ hφ x + apply hA B C q hq x + intro π + exact congrArg (fun y : MinimalTensor A C => y.val π) hx + +end ClosedTensorIdeal + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorInjectivity.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..b110d8fa13758192fd8b4a445c9a79b69963faa5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorInjectivity.lean @@ -0,0 +1,151 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.TensorCompression +import OAI.Analysis.WeakInfiniteness.TensorFlip +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section TensorLeft + +universe leftUniverse rightUniverse + +variable {A B : Type leftUniverse} {C : Type rightUniverse} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] [NonUnitalCStarAlgebra C] + +def SpatialRepresentation.precompLeft (π : SpatialRepresentation B C) + (φ : A →⋆ₙₐ[ℂ] B) : SpatialRepresentation A C where + left := π.left + right := π.right + leftRep := π.leftRep.comp φ + rightRep := π.rightRep + +def spatialMapLeft (φ : A →⋆ₙₐ[ℂ] B) : SpatialAmbient A C →⋆ₙₐ[ℂ] SpatialAmbient B C where + toFun z := ⟨fun π => z (π.precompLeft φ), memℓp_infty ⟨‖z‖, by + rintro _ ⟨π, rfl⟩ + exact lp.norm_apply_le_norm ENNReal.top_ne_zero z _⟩⟩ + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_smul' _ _ := rfl + map_star' _ := rfl + +@[simp] lemma spatialMapLeft_elementary (φ : A →⋆ₙₐ[ℂ] B) (a : A) (c : C) : + spatialMapLeft φ (spatialElementary a c) = spatialElementary (φ a) c := rfl + +lemma spatialMapLeft_mem (φ : A →⋆ₙₐ[ℂ] B) {z : SpatialAmbient A C} + (hz : z ∈ minimalTensorSubalgebra A C) : + spatialMapLeft φ z ∈ minimalTensorSubalgebra B C := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ + (t := NonUnitalStarSubalgebra.comap (spatialMapLeft φ) (minimalTensorSubalgebra B C)) + (NonUnitalStarAlgebra.adjoin_le ?_) ?_ hz + · rintro _ ⟨⟨a,c⟩, rfl⟩ + change spatialMapLeft φ (spatialElementary a c) ∈ minimalTensorSubalgebra B C + rw [spatialMapLeft_elementary] + exact spatialElementary_mem (φ a) c + · exact isClosed_closure.preimage (nonUnitalStarHom_continuous (spatialMapLeft φ)) + +def minimalMapLeft (φ : A →⋆ₙₐ[ℂ] B) : MinimalTensor A C →⋆ₙₐ[ℂ] MinimalTensor B C := + NonUnitalStarAlgHom.codRestrict + ((spatialMapLeft φ).comp (NonUnitalStarSubalgebraClass.subtype (minimalTensorSubalgebra A C))) + (minimalTensorSubalgebra B C) (fun z => spatialMapLeft_mem φ z.property) + +@[simp] lemma minimalMapLeft_elementary (φ : A →⋆ₙₐ[ℂ] B) (a : A) (c : C) : + minimalMapLeft φ (minimalElementary a c) = minimalElementary (φ a) c := rfl + +lemma spatialSum_apply {ι : Type*} (s : Finset ι) (a : ι → A) (c : ι → C) + (π : SpatialRepresentation A C) : + (∑ i ∈ s, spatialElementary (a i) (c i)) π = + (∑ i ∈ s, TensorProduct.mapL (π.leftRep (a i)) (π.rightRep (c i))).completion := by + classical + induction s using Finset.induction_on with + | empty => simp only [Finset.sum_empty,completion_zero]; rfl + | @insert i s hi ih => + simp only [Finset.sum_insert hi,completion_add] + change _ + (∑ j ∈ s, spatialElementary (a j) (c j)) π = _ + rw [ih] + rfl + +lemma norm_spatialSum_le_image {ι : Type*} [Finite ι] (s : Finset ι) + (a : ι → A) (c : ι → C) (φ : A →⋆ₙₐ[ℂ] B) + (K : ComplexHilbert.{max leftUniverse rightUniverse}) (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) + (hφ : Function.Injective φ) (hψ : Function.Injective ψ) : + ‖∑ i ∈ s, spatialElementary (a i) (c i)‖ ≤ + ‖∑ i ∈ s, spatialElementary (φ (a i)) (c i)‖ := by + let := CStarAlgebra.spectralOrder A + let := CStarAlgebra.spectralOrderedRing A + apply lp.norm_le_of_forall_le (norm_nonneg _) + intro π + rw [spatialSum_apply,norm_completion,norm_tensorSum_flip] + apply (tensor_norm_le_faithful s (fun i => π.rightRep (c i)) a + (ψ.comp φ) π.leftRep (hψ.comp hφ)).trans + rw [norm_tensorSum_flip] + let ρ : SpatialRepresentation B C := + { left := K, right := π.right, leftRep := ψ, rightRep := π.rightRep } + have h := lp.norm_apply_le_norm ENNReal.top_ne_zero + (∑ i ∈ s, spatialElementary (φ (a i)) (c i)) ρ + change ‖(∑ i ∈ s, spatialElementary (φ (a i)) (c i)) ρ‖ ≤ _ at h + rw [spatialSum_apply,norm_completion] at h + exact h + +lemma norm_spatialSum_le_image_finset {ι : Type*} (s : Finset ι) + (a : ι → A) (c : ι → C) (φ : A →⋆ₙₐ[ℂ] B) + (K : ComplexHilbert.{max leftUniverse rightUniverse}) (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) + (hφ : Function.Injective φ) (hψ : Function.Injective ψ) : + ‖∑ i ∈ s, spatialElementary (a i) (c i)‖ ≤ + ‖∑ i ∈ s, spatialElementary (φ (a i)) (c i)‖ := by + classical + rw [← Finset.sum_coe_sort s (fun i => spatialElementary (a i) (c i)), + ← Finset.sum_coe_sort s (fun i => spatialElementary (φ (a i)) (c i))] + exact norm_spatialSum_le_image Finset.univ (fun i : s => a i) (fun i : s => c i) φ K ψ hφ hψ + +lemma norm_spatialMapLeft_ge_on_span + (φ : A →⋆ₙₐ[ℂ] B) (K : ComplexHilbert.{max leftUniverse rightUniverse}) + (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (hφ : Function.Injective φ) (hψ : Function.Injective ψ) + (z : SpatialAmbient A C) + (hz : z ∈ Submodule.span ℂ (Set.range fun p : A × C => spatialElementary p.1 p.2)) : + ‖z‖ ≤ ‖spatialMapLeft φ z‖ := by + classical + obtain ⟨d, rfl⟩ := Finsupp.mem_span_range_iff_exists_finsupp.mp hz + simp only [Finsupp.sum, map_sum, map_smul, spatialMapLeft_elementary] + simpa only [← spatialElementary_smul_left, map_smul] using + norm_spatialSum_le_image_finset d.support (fun i => d i • i.1) Prod.snd φ K ψ hφ hψ + +lemma norm_minimalMapLeft (φ : A →⋆ₙₐ[ℂ] B) + (K : ComplexHilbert.{max leftUniverse rightUniverse}) + (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (hφ : Function.Injective φ) (hψ : Function.Injective ψ) + (z : MinimalTensor A C) : ‖minimalMapLeft φ z‖ = ‖z‖ := by + apply le_antisymm (NonUnitalStarAlgHom.norm_apply_le _ _) + let S := {x : SpatialAmbient A C | ‖x‖ ≤ ‖spatialMapLeft φ x‖} + have hc : IsClosed S := isClosed_le continuous_norm + ((nonUnitalStarHom_continuous (spatialMapLeft φ)).norm) + have hz := z.property + change z.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hz + rw [minimalTensor_eq_closure_span] at hz + exact (closure_minimal (fun _ hx => norm_spatialMapLeft_ge_on_span φ K ψ hφ hψ _ hx) hc) hz + +lemma minimalMapLeft_isometry (φ : A →⋆ₙₐ[ℂ] B) + (K : ComplexHilbert.{max leftUniverse rightUniverse}) + (ψ : B →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (hφ : Function.Injective φ) (hψ : Function.Injective ψ) : + Isometry (minimalMapLeft (C := C) φ) := by + apply AddMonoidHomClass.isometry_of_norm + exact norm_minimalMapLeft φ K ψ hφ hψ + +end TensorLeft + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorMatrixNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorMatrixNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e4c056a23bcbaa12ce348855c8a9862dac8b5ef --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorMatrixNorm.lean @@ -0,0 +1,129 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.MatrixRepresentation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +section BasisTensor + +variable {n H K : Type*} [Fintype n] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + +def basisTensorMap (b : OrthonormalBasis n ℂ H) : + PiLp 2 (fun _ : n => K) →ₗ[ℂ] H ⊗[ℂ] K where + toFun x := ∑ i, b i ⊗ₜ[ℂ] x i + map_add' x y := by simp [TensorProduct.tmul_add, Finset.sum_add_distrib] + map_smul' c x := by simp [TensorProduct.tmul_smul, Finset.smul_sum] + +lemma basisTensorMap_inner (b : OrthonormalBasis n ℂ H) + (x y : PiLp 2 (fun _ : n => K)) : + inner ℂ (basisTensorMap b x) (basisTensorMap b y) = inner ℂ x y := by + classical + simp [basisTensorMap, sum_inner, inner_sum, TensorProduct.inner_tmul, b.inner_eq_ite, + PiLp.inner_apply] + +def basisTensorIsometry (b : OrthonormalBasis n ℂ H) : + PiLp 2 (fun _ : n => K) →ₗᵢ[ℂ] H ⊗[ℂ] K := + LinearMap.isometryOfInner (E := PiLp 2 (fun _ : n => K)) + (E' := H ⊗[ℂ] K) (𝕜 := ℂ) (basisTensorMap b) (fun x y => basisTensorMap_inner b x y) + +lemma basisTensorMap_surjective (b : OrthonormalBasis n ℂ H) : + Function.Surjective (basisTensorMap (K := K) b) := by + intro z + induction z using TensorProduct.inductionOn with + | tmul h k => + refine ⟨WithLp.toLp 2 (fun i => (b.repr h i) • k), ?_⟩ + change ∑ i, b i ⊗ₜ[ℂ] ((b.repr h i) • k) = h ⊗ₜ[ℂ] k + conv_rhs => rw [← b.sum_repr h] + rw [TensorProduct.sum_tmul] + simp only [TensorProduct.smul_tmul, TensorProduct.tmul_smul] + | add z w hz hw => + obtain ⟨x, rfl⟩ := hz + obtain ⟨y, rfl⟩ := hw + exact ⟨x + y, map_add _ _ _⟩ + +def basisTensorEquiv (b : OrthonormalBasis n ℂ H) : + PiLp 2 (fun _ : n => K) ≃ₗᵢ[ℂ] H ⊗[ℂ] K := + LinearIsometryEquiv.ofSurjective (basisTensorIsometry b) (basisTensorMap_surjective b) + +@[simp] +lemma basisTensorEquiv_apply (b : OrthonormalBasis n ℂ H) + (x : PiLp 2 (fun _ : n => K)) : + basisTensorEquiv b x = ∑ i, b i ⊗ₜ[ℂ] x i := rfl + +def tensorCoefficientMatrix {B : Type*} [AddCommGroup B] [Module ℂ B] + (b : OrthonormalBasis n ℂ H) (T : H →L[ℂ] H) (a : B) : CStarMatrix n n B := + CStarMatrix.ofMatrix fun i j => (b.repr (T (b j)) i) • a + +@[simp] +lemma tensorCoefficientMatrix_apply {B : Type*} [AddCommGroup B] [Module ℂ B] + (b : OrthonormalBasis n ℂ H) (T : H →L[ℂ] H) (a : B) (i j : n) : + tensorCoefficientMatrix b T a i j = (b.repr (T (b j)) i) • a := rfl + +lemma tensorCoefficientMatrix_intertwining (b : OrthonormalBasis n ℂ H) + (T : H →L[ℂ] H) (S : K →L[ℂ] K) (x : PiLp 2 (fun _ : n => K)) : + basisTensorEquiv b (matrixOperator (tensorCoefficientMatrix b T S) x) = + TensorProduct.mapL T S (basisTensorEquiv b x) := by + simp only [basisTensorEquiv_apply, matrixOperator_apply, tensorCoefficientMatrix_apply, + smul_apply, TensorProduct.tmul_sum, TensorProduct.tmul_smul, + map_sum, TensorProduct.mapL_tmul] + rw [Finset.sum_comm] + congr 1 + funext j + simpa only [TensorProduct.sum_tmul, ← TensorProduct.smul_tmul'] using + congrArg (fun h : H => h ⊗ₜ[ℂ] S (x j)) (b.sum_repr (T (b j))) + +lemma norm_eq_of_isometric_intertwining {E F : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + (e : E ≃ₗᵢ[ℂ] F) (T : E →L[ℂ] E) (S : F →L[ℂ] F) + (h : ∀ x, e (T x) = S (e x)) : ‖T‖ = ‖S‖ := by + apply le_antisymm + · apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro x + rw [← e.norm_map (T x), h] + simpa only [e.norm_map] using S.le_opNorm (e x) + · apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro y + obtain ⟨x, rfl⟩ := e.surjective y + rw [← h, e.norm_map, e.norm_map] + exact T.le_opNorm x + +lemma tensorCoefficientSum_intertwining {ι : Type*} (s : Finset ι) + (b : OrthonormalBasis n ℂ H) (T : ι → H →L[ℂ] H) (S : ι → K →L[ℂ] K) + (x : PiLp 2 (fun _ : n => K)) : + basisTensorEquiv b (matrixOperator (∑ i ∈ s, tensorCoefficientMatrix b (T i) (S i)) x) = + (∑ i ∈ s, TensorProduct.mapL (T i) (S i)) (basisTensorEquiv b x) := by + classical + induction s using Finset.induction_on with + | empty => simp [matrixOperator_zero] + | @insert i s hi hs => + simp only [Finset.sum_insert hi, matrixOperator_add, add_apply, + map_add, tensorCoefficientMatrix_intertwining, hs] + +lemma norm_tensorCoefficientSum [CompleteSpace K] {ι : Type*} (s : Finset ι) + (b : OrthonormalBasis n ℂ H) (T : ι → H →L[ℂ] H) (S : ι → K →L[ℂ] K) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (S i)‖ = + ‖∑ i ∈ s, tensorCoefficientMatrix b (T i) (S i)‖ := by + rw [← norm_matrixOperator] + exact (norm_eq_of_isometric_intertwining (basisTensorEquiv b) _ _ + (tensorCoefficientSum_intertwining s b T S)).symm + +end BasisTensor + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorMultiplier.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorMultiplier.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8a575caa13a0f677dccf36bad8f14006705cddc --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorMultiplier.lean @@ -0,0 +1,139 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.ApproximateCut +import OAI.Analysis.WeakInfiniteness.TensorInjectivity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u v + +noncomputable section + +open scoped TensorProduct ENNReal ComplexOrder + +open UniformSpace Filter Topology + +variable {A B : Type u} {C D : Type v} + [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def spatialRightMultiplier (c : C) : SpatialAmbient A C := + ⟨fun π => (TensorProduct.mapL (1 : π.left →L[ℂ] π.left) (π.rightRep c)).completion, + memℓp_infty ⟨‖c‖, by + rintro _ ⟨π,rfl⟩ + dsimp only + rw [norm_completion] + exact (TensorProduct.norm_mapL_le _ _).trans + ((mul_le_mul ContinuousLinearMap.norm_id_le (NonUnitalStarAlgHom.norm_apply_le π.rightRep c) + (norm_nonneg _) zero_le_one).trans_eq (one_mul _))⟩⟩ + +def spatialRightMultiplierHom : C →⋆ₙₐ[ℂ] SpatialAmbient A C where + toFun := spatialRightMultiplier + map_zero' := by + apply Subtype.ext; funext π + change (TensorProduct.mapL _ (π.rightRep 0)).completion=0 + simp [completion_zero] + map_add' c d := by + apply Subtype.ext; funext π + change (TensorProduct.mapL _ (π.rightRep (c+d))).completion=_+_ + rw [map_add, TensorProduct.mapL_add_right, completion_add] + rfl + map_smul' r c := by + apply Subtype.ext; funext π + change (TensorProduct.mapL _ (π.rightRep (r • c))).completion=r • _ + rw [map_smul, TensorProduct.mapL_smul_right, completion_smul] + rfl + map_mul' c d := by + apply Subtype.ext; funext π + change (TensorProduct.mapL (1 : π.left →L[ℂ] π.left) (π.rightRep (c*d))).completion=_*_ + rw [map_mul, ← one_mul (1 : π.left →L[ℂ] π.left), TensorProduct.mapL_mul] + exact completion_comp _ _ + map_star' c := by + apply Subtype.ext; funext π + change (TensorProduct.mapL (1 : π.left →L[ℂ] π.left) (π.rightRep (star c))).completion=star _ + rw [map_star, ← star_one (π.left →L[ℂ] π.left)] + exact (completion_mapL_star _ _).symm + +lemma spatialElementary_mul_rightMultiplier (a : A) (c e : C) : + spatialElementary a c * spatialRightMultiplier e=spatialElementary a (c*e) := by + apply Subtype.ext; funext π + change (TensorProduct.mapL (π.leftRep a) (π.rightRep c)).completion * + (TensorProduct.mapL 1 (π.rightRep e)).completion = + (TensorProduct.mapL (π.leftRep a) (π.rightRep (c*e))).completion + rw [map_mul, ← mul_one (π.leftRep a), TensorProduct.mapL_mul] + exact (completion_comp _ _).symm + +lemma spatial_mul_rightMultiplier_mem (e : C) (x : MinimalTensor A C) : + x.val * spatialRightMultiplier e ∈ minimalTensorSubalgebra A C := by + have hs : ∀ z ∈ Submodule.span ℂ (Set.range fun p : A × C => spatialElementary p.1 p.2), + z * spatialRightMultiplier e ∈ minimalTensorSubalgebra A C := by + intro z hz + induction hz using Submodule.span_induction with + | mem z hz => + obtain ⟨⟨a,c⟩,rfl⟩ := hz + rw [spatialElementary_mul_rightMultiplier] + exact spatialElementary_mem a (c*e) + | zero => simp only [zero_mul]; exact (minimalTensorSubalgebra A C).zero_mem + | add z w _ _ hz hw => rw [add_mul]; exact (minimalTensorSubalgebra A C).add_mem hz hw + | smul c z _ hz => rw [smul_mul_assoc]; exact (minimalTensorSubalgebra A C).smul_mem c hz + have hc : IsClosed {z : SpatialAmbient A C | z*spatialRightMultiplier e ∈ minimalTensorSubalgebra A C} := + isClosed_closure.preimage (continuous_id.mul continuous_const) + have hx := x.property + change x.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hx + rw [minimalTensor_eq_closure_span] at hx + exact (closure_minimal hs hc) hx + +def tensorRightMultiply (e : C) (x : MinimalTensor A C) : MinimalTensor A C := + ⟨x.val * spatialRightMultiplier e, spatial_mul_rightMultiplier_mem e x⟩ + +def tensorCutNonunital (e : C) (x : MinimalTensor A C) : MinimalTensor A C := + x-tensorRightMultiply e x + +lemma norm_tensorCutNonunital_le [PartialOrder C] [StarOrderedRing C] + (e : C) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) (x : MinimalTensor A C) : + ‖tensorCutNonunital e x‖ ≤ ‖x‖ := by + let := CStarAlgebra.spectralOrder (SpatialAmbient A C) + let := CStarAlgebra.spectralOrderedRing (SpatialAmbient A C) + exact norm_sub_mul_of_pos_contraction x.val (spatialRightMultiplierHom e) + (map_nonneg (spatialRightMultiplierHom (A := A)) he) + ((NonUnitalStarAlgHom.norm_apply_le (spatialRightMultiplierHom (A := A)) e).trans hen) + +lemma tensorCutNonunital_elementary (e c : C) (a : A) : + tensorCutNonunital e (minimalElementary a c)=minimalElementary a (c-c*e) := by + apply Subtype.ext + change spatialElementary a c-spatialElementary a c*spatialRightMultiplier e=_ + rw [spatialElementary_mul_rightMultiplier] + have h := spatialElementary_add_right a (c-c*e) (c*e) + rw [sub_add_cancel] at h + exact sub_eq_iff_eq_add.mpr h + +lemma spatialMapLeft_rightMultiplier (φ : A →⋆ₙₐ[ℂ] B) (e : C) : + spatialMapLeft φ (spatialRightMultiplier e)=spatialRightMultiplier e := rfl + +lemma minimalMapLeft_tensorCutNonunital (φ : A →⋆ₙₐ[ℂ] B) (e : C) (x : MinimalTensor A C) : + minimalMapLeft φ (tensorCutNonunital e x)=tensorCutNonunital e (minimalMapLeft φ x) := by + apply Subtype.ext + change spatialMapLeft φ (x.val-x.val*spatialRightMultiplier e)=_ + rw [map_sub, map_mul, spatialMapLeft_rightMultiplier] + rfl + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3727539103b6f165d1ae22658229ce4250022ee --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorNorm.lean @@ -0,0 +1,85 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseTensorBound + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct + +universe u v w z + +section Hilbert + +variable {E : Type u} {F : Type v} {G : Type w} {H : Type z} + [NormedAddCommGroup E] [InnerProductSpace ℂ E] + [NormedAddCommGroup F] [InnerProductSpace ℂ F] + [NormedAddCommGroup G] [InnerProductSpace ℂ G] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +lemma norm_tensorProduct_mapL (f : E →L[ℂ] F) (g : G →L[ℂ] H) : + ‖TensorProduct.mapL f g‖=‖f‖*‖g‖ := by + apply le_antisymm (TensorProduct.norm_mapL_le f g) + let N := ‖TensorProduct.mapL f g‖ + have hxy (x : E) (y : G) : ‖f x‖*‖g y‖ ≤ (N*‖x‖)*‖y‖ := by + have h := (TensorProduct.mapL f g).le_opNorm (x ⊗ₜ[ℂ] y) + simpa only [TensorProduct.mapL_tmul,TensorProduct.norm_tmul,mul_assoc] using h + have hx (x : E) : ‖f x‖*‖g‖ ≤ N*‖x‖ := by + have h : ‖(‖f x‖:ℂ) • g‖ ≤ N*‖x‖ := by + refine ContinuousLinearMap.opNorm_le_bound ((‖f x‖:ℂ) • g) + (show 0≤N*‖x‖ from mul_nonneg (norm_nonneg (TensorProduct.mapL f g)) (norm_nonneg _)) ?_ + intro y + simpa only [smul_apply,norm_smul,Complex.norm_real, + Real.norm_eq_abs,abs_of_nonneg (norm_nonneg _)] using hxy x y + simpa only [norm_smul,Complex.norm_real,Real.norm_eq_abs, + abs_of_nonneg (norm_nonneg _)] using h + have h : ‖(‖g‖:ℂ) • f‖ ≤ N := by + refine ContinuousLinearMap.opNorm_le_bound ((‖g‖:ℂ) • f) (show 0≤N from norm_nonneg (TensorProduct.mapL f g)) ?_ + intro x + simpa only [smul_apply,norm_smul,Complex.norm_real, + Real.norm_eq_abs,abs_of_nonneg (norm_nonneg _),mul_comm ‖g‖] using hx x + simpa only [norm_smul,Complex.norm_real,Real.norm_eq_abs, + abs_of_nonneg (norm_nonneg _),mul_comm ‖g‖] using h + +end Hilbert + +section CrossNorm + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +lemma norm_minimalElementary (a : A) (b : B) : ‖minimalElementary a b‖=‖a‖*‖b‖ := by + apply le_antisymm (norm_spatialElementary_le a b) + obtain ⟨H,π,hπ⟩ := exists_faithful_representation A + obtain ⟨K,ρ,hρ⟩ := exists_faithful_representation B + have hn : ‖TensorProduct.mapL (π a) (ρ b)‖ ≤ ‖minimalElementary a b‖ := by + change ‖TensorProduct.mapL (π a) (ρ b)‖ ≤ ‖spatialElementary a b‖ + simpa using norm_tensorSum_le_spatial_any ({()} : Finset Unit) (fun _ : Unit => a) + (fun _ : Unit => b) π ρ + rw [norm_tensorProduct_mapL] at hn + have ha : ‖π a‖=‖a‖ := (NonUnitalStarAlgHom.isometry π hπ).norm_map_of_map_zero (map_zero π) a + have hb : ‖ρ b‖=‖b‖ := (NonUnitalStarAlgHom.isometry ρ hρ).norm_map_of_map_zero (map_zero ρ) b + rwa [ha,hb] at hn + +end CrossNorm + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/TensorSubalgebras.lean b/lean/OAI/Analysis/WeakInfiniteness/TensorSubalgebras.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a66939d4e7be443ad26188da2dfc11786766fed --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/TensorSubalgebras.lean @@ -0,0 +1,47 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FaithfulRepresentation +import OAI.Analysis.WeakInfiniteness.NonunitalExactness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +variable {A B : Type u} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +theorem exact_subalgebra (φ : A →⋆ₙₐ[ℂ] B) (hφ : Function.Injective φ) + (hB : Exact B) : Exact A := by + obtain ⟨H,π,hπ⟩ := exists_faithful_representation B + exact exact_of_injective φ hφ H π hπ hB + +lemma minimalMapLeft_injective {C : Type u} [NonUnitalCStarAlgebra C] + (φ : A →⋆ₙₐ[ℂ] B) (hφ : Function.Injective φ) : + Function.Injective (minimalMapLeft (C := C) φ) := by + obtain ⟨H,π,hπ⟩ := exists_faithful_representation B + apply (injective_iff_map_eq_zero _).mpr + intro z hz + apply norm_eq_zero.mp + rw [← norm_minimalMapLeft φ H π hφ hπ z, hz, norm_zero] + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/ULiftCStar.lean b/lean/OAI/Analysis/WeakInfiniteness/ULiftCStar.lean new file mode 100644 index 0000000000000000000000000000000000000000..327c056f6a7231dbc136978c999ce51884cd7009 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/ULiftCStar.lean @@ -0,0 +1,40 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace + +namespace WeakPureInfiniteness + +universe u v + +instance uliftStarRing {A : Type u} [Semiring A] [StarRing A] : StarRing (ULift.{v} A) where + star x := ⟨star x.down⟩ + star_involutive x := by cases x; simp only [star_star] + star_mul x y := by apply ULift.down_injective; exact star_mul x.down y.down + star_add x y := by apply ULift.down_injective; exact star_add x.down y.down + +instance uliftStarModule {A : Type u} [Semiring A] [StarRing A] [Algebra ℂ A] + [StarModule ℂ A] : StarModule ℂ (ULift.{v} A) where + star_smul r x := by apply ULift.down_injective; exact star_smul r x.down + +instance uliftCStarAlgebra {A : Type u} [CStarAlgebra A] : CStarAlgebra (ULift.{v} A) where + norm_mul_self_le x := CStarRing.norm_mul_self_le x.down + +def uliftStarAlgEquiv {A : Type u} [CStarAlgebra A] : ULift.{v} A ≃⋆ₐ[ℂ] A := + { ULift.algEquiv (R := ℂ) (A := A) with + map_smul' := fun _ _ => rfl + map_star' := fun _ => rfl } + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniformGap.lean b/lean/OAI/Analysis/WeakInfiniteness/UniformGap.lean new file mode 100644 index 0000000000000000000000000000000000000000..faea1aaceaf0b233a1f08634d1a140fefd17b4f3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniformGap.lean @@ -0,0 +1,165 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.UniformModels +import OAI.Analysis.WeakInfiniteness.WordTensorDensity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open Filter + +open scoped Topology + +section UniformCutEstimate + +variable {B C : Type 1} [CStarAlgebra B] [NonUnitalCStarAlgebra C] + [PartialOrder C] [StarOrderedRing C] + +omit [PartialOrder C] [StarOrderedRing C] in +lemma tensorCut_wordTensor (s : Finset (List Bool)) (c : List Bool → C) (e : C) : + tensorCut e (wordTensor s c) = wordTensor s (fun w => c w - c w * e) := by + change tensorCutLinear e (∑ w ∈ s, minimalElementary (universalWord w) (c w)) = _ + rw [map_sum] + unfold wordTensor + apply Finset.sum_congr rfl + intro w _hw + exact tensorCut_elementary e (c w) (universalWord w) + +lemma wordTensorCost_cut_le (s : Finset (List Bool)) (c : List Bool → C) + (e : C) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) : + wordTensorCost s (fun w => c w - c w * e) ≤ wordTensorCost s c := by + unfold wordTensorCost + apply Finset.sum_le_sum + intro w _hw + exact mul_le_mul_of_nonneg_right (norm_sub_mul_of_pos_contraction (c w) e he hen) + (Nat.cast_nonneg _) + +lemma norm_tensorCut_wordTensor_le_of_models (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModels B v θ) (e : C) (he : 0 ≤ e) (hen : ‖e‖ ≤ 1) : + ‖tensorCut e (wordTensor s c)‖ ≤ + ‖minimalMapLeft φ.toNonUnitalStarAlgHom (tensorCut e (wordTensor s c))‖ + + wordTensorCost s c * θ := by + rw [tensorCut_wordTensor] + exact (norm_wordTensor_le_of_models s (fun w => c w - c w * e) v hv φ hφ hθ hmodels).trans + (add_le_add le_rfl (mul_le_mul_of_nonneg_right (wordTensorCost_cut_le s c e he hen) hθ)) + +end UniformCutEstimate + +structure ExactModelData (θ : ℝ) where + Carrier : Type 1 + [cStarAlgebra : CStarAlgebra Carrier] + v : Carrier + norm_v : ‖v‖ ≤ 1 + exactAlgebra : Exact Carrier + models : FiniteContractionModels Carrier v θ + +attribute [instance] ExactModelData.cStarAlgebra + +lemma exact_universal_of_arbitrarily_good_models + (hall : ∀ θ : ℝ, 0 < θ → Nonempty (ExactModelData θ)) : Exact UniversalContraction := by + intro C D _ _ q hq z hz + let := CStarAlgebra.spectralOrder C + let := CStarAlgebra.spectralOrderedRing C + let I := kernelAlgebra q + let := CStarAlgebra.spectralOrder I + let := CStarAlgebra.spectralOrderedRing I + let l := CStarAlgebra.approximateUnit I + have hl := CStarAlgebra.increasingApproximateUnit I + let : l.NeBot := hl.toIsApproximateUnit.neBot + let e : I → C := Subtype.val + have he : ∀ᶠ i in l, 0 ≤ e i ∧ ‖e i‖ ≤ 1 := by + filter_upwards [hl.eventually_nonneg, hl.eventually_norm] with i hi hn + refine ⟨?_, hn⟩ + obtain ⟨x,hx⟩ := CStarAlgebra.nonneg_iff_eq_star_mul_self.mp hi + have hi' : e i = star (e x) * e x := congrArg Subtype.val hx + rw [hi'] + exact star_mul_self_nonneg _ + have happ : ∀ c : C, q c = 0 → Tendsto (fun i => c * e i) l (𝓝 c) := by + intro c hc + let x : I := ⟨c,hc⟩ + exact continuous_subtype_val.tendsto x |>.comp (hl.tendsto_mul_left x) + apply tensor_mem_ideal_of_cuts l e q (fun i => i.property) z + apply Metric.tendsto_nhds.mpr + intro ε hε + obtain ⟨c,hc⟩ := wordTensorLinear_range_dense.exists_dist_lt z (by positivity : 0 < ε/4) + let s := c.support + let w := wordTensor s c + have hzw : ‖z-w‖ < ε/4 := by + simpa only [dist_eq_norm, wordTensorLinear_apply, w, s, wordTensor] using hc + let cost := wordTensorCost s c + have hc0 : 0 ≤ cost := wordTensorCost_nonneg s c + let θ := (ε/4)/(cost+1) + have hθ : 0 < θ := div_pos (by positivity) (by positivity) + have hcost : cost * θ ≤ ε/4 := by + have heq : (cost+1)*θ = ε/4 := mul_div_cancel₀ _ (by positivity) + nlinarith [le_of_lt hθ] + obtain ⟨M⟩ := hall θ hθ + let := CStarAlgebra.spectralOrder M.Carrier + let := CStarAlgebra.spectralOrderedRing M.Carrier + let φ := universalContractionMap M.v M.norm_v + have hφ : φ universalContractionGenerator = M.v := universalContractionMap_generator _ _ + let Φ : MinimalTensor UniversalContraction C →⋆ₙₐ[ℂ] MinimalTensor M.Carrier C := + minimalMapLeft φ.toNonUnitalStarAlgHom + have hmem : (Φ z).val ∈ tensorKernelIdeal (A := M.Carrier) q := by + apply M.exactAlgebra C D q hq + intro π + exact hz (π.precompLeft φ.toNonUnitalStarAlgHom) + have hcuts := tensorCut_tendsto_zero_on_ideal l e he q happ (Φ z) hmem + have hsmall : ∀ᶠ i in l, ‖Φ (tensorCut (e i) z)‖ < ε/4 := by + have h := Metric.tendsto_nhds.mp hcuts (ε/4) (by positivity) + filter_upwards [h] with i hi + simpa only [Φ, minimalMapLeft_tensorCut, dist_zero_right] using hi + filter_upwards [he,hsmall] with i hi his + rw [dist_zero_right] + have hdiff : ‖tensorCut (e i) z - tensorCut (e i) w‖ ≤ ‖z-w‖ := by + change ‖tensorCutLinear (e i) z - tensorCutLinear (e i) w‖ ≤ _ + rw [← map_sub] + exact norm_tensorCut_le (e i) hi.1 hi.2 (z-w) + have hΦdiff : ‖Φ (tensorCut (e i) w) - Φ (tensorCut (e i) z)‖ ≤ ‖z-w‖ := by + rw [← map_sub] + exact (NonUnitalStarAlgHom.norm_apply_le Φ _).trans ((norm_sub_rev _ _).le.trans hdiff) + have hmodel := norm_tensorCut_wordTensor_le_of_models s c M.v M.norm_v φ hφ + (le_of_lt hθ) M.models (e i) hi.1 hi.2 + have hm : ‖Φ (tensorCut (e i) w)‖ ≤ ‖Φ (tensorCut (e i) z)‖ + ‖z-w‖ := + (norm_le_norm_add_norm_sub' _ _).trans (add_le_add le_rfl hΦdiff) + have hn := norm_le_norm_add_norm_sub' (tensorCut (e i) z) (tensorCut (e i) w) + change ‖tensorCut (e i) w‖ ≤ ‖Φ (tensorCut (e i) w)‖ + cost * θ at hmodel + linarith + +theorem exists_uniform_gap_one : + ∃ γ : ℝ, 0 < γ ∧ ∀ (B : Type 1) [CStarAlgebra B] (v : B), + ‖v‖ ≤ 1 → Exact B → ¬ FiniteContractionModels B v γ := by + classical + by_contra h + have hall : ∀ θ : ℝ, 0 < θ → Nonempty (ExactModelData θ) := by + intro θ hθ + by_contra hn + apply h + refine ⟨θ,hθ,?_⟩ + intro B hB v hv hExact hmodels + exact hn ⟨{ Carrier := B, v := v, norm_v := hv, exactAlgebra := hExact, models := hmodels }⟩ + exact universalContraction_not_exact (exact_universal_of_arbitrarily_good_models hall) + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniformKernelConvergence.lean b/lean/OAI/Analysis/WeakInfiniteness/UniformKernelConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..f931b0adb9bdb9c89dec1678591b65961ac340ec --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniformKernelConvergence.lean @@ -0,0 +1,41 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology + +namespace WeakPureInfiniteness + +lemma isClosed_setOf_tendsto_zero_of_bound {ι E F : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + (l : Filter ι) (T : ι → E →ₗ[ℂ] F) + (hT : ∀ᶠ i in l, ∀ x, ‖T i x‖ ≤ ‖x‖) : + IsClosed {x : E | Tendsto (fun i => T i x) l (𝓝 0)} := by + apply isClosed_of_closure_subset + intro x hx + apply Metric.tendsto_nhds.mpr + intro ε hε + obtain ⟨y,hy,hxy⟩ := Metric.mem_closure_iff.mp hx (ε/2) (by positivity) + have hy' := (Metric.tendsto_nhds.mp hy) (ε/2) (by positivity) + filter_upwards [hT,hy'] with i hi hiy + rw [dist_zero_right] at hiy ⊢ + have hxy' : ‖x-y‖ < ε/2 := by simpa only [dist_eq_norm] using hxy + have he : T i x = T i (x-y) + T i y := by rw [← map_add,sub_add_cancel] + rw [he] + exact (norm_add_le _ _).trans_lt + ((add_lt_add_of_le_of_lt (hi (x-y)) hiy).trans_le (by linarith)) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniformModels.lean b/lean/OAI/Analysis/WeakInfiniteness/UniformModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9f52110aedcf45a777dafdf44b3bbf974f4f971 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniformModels.lean @@ -0,0 +1,199 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FaithfulContractions +import OAI.Analysis.WeakInfiniteness.UniversalMapping + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped TensorProduct + +def FiniteContractionModels (B : Type 1) [CStarAlgebra B] (v : B) (θ : ℝ) : Prop := + ∀ (H : ComplexHilbert.{1}) [FiniteDimensional ℂ H] (D : H →L[ℂ] H), ‖D‖ ≤ 1 → + ∃ K : ComplexHilbert.{1}, ∃ π : B →⋆ₐ[ℂ] (K →L[ℂ] K), ∃ J : H →ₗᵢ[ℂ] K, + ‖(π v).comp J.toContinuousLinearMap - J.toContinuousLinearMap.comp D‖ ≤ θ ∧ + ‖(star (π v)).comp J.toContinuousLinearMap - J.toContinuousLinearMap.comp (star D)‖ ≤ θ + +lemma universalFaithfulRepresentation_one : universalFaithfulRepresentation 1 = 1 := by + ext ξ + rfl + +def universalUnitalRepresentation : + UniversalContraction →⋆ₐ[ℂ] (universalHilbert →L[ℂ] universalHilbert) := + { universalFaithfulRepresentation with + map_one' := universalFaithfulRepresentation_one + commutes' := fun c => by + change universalFaithfulRepresentation (c • 1) = c • 1 + rw [map_smul, universalFaithfulRepresentation_one] } + +lemma unitalRep_universalWord {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] + (π : UniversalContraction →⋆ₐ[ℂ] (H →L[ℂ] H)) (w : List Bool) : + π (universalWord w) = wordEval (operatorLetters (π universalContractionGenerator)) w := by + rw [← algebraWord_universal, map_algebraWord, algebraWord_operator] + +lemma operatorLetters_norm {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (T : H →L[ℂ] H) (hT : ‖T‖ ≤ 1) : + ∀ i, ‖operatorLetters T i‖ ≤ 1 := by + intro i + cases i <;> simpa [operatorLetters] using hT + +lemma tensor_norm_le_faithful_finset {H K L A ι : Type*} + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] [CompleteSpace K] + [NormedAddCommGroup L] [InnerProductSpace ℂ L] [CompleteSpace L] + [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + (s : Finset ι) (T : ι → H →L[ℂ] H) (a : ι → A) + (φ : A →⋆ₙₐ[ℂ] (K →L[ℂ] K)) (ψ : A →⋆ₙₐ[ℂ] (L →L[ℂ] L)) + (hφ : Function.Injective φ) : + ‖∑ i ∈ s, TensorProduct.mapL (T i) (ψ (a i))‖ ≤ + ‖∑ i ∈ s, TensorProduct.mapL (T i) (φ (a i))‖ := by + classical + rw [← Finset.sum_coe_sort s (fun i => TensorProduct.mapL (T i) (ψ (a i))), + ← Finset.sum_coe_sort s (fun i => TensorProduct.mapL (T i) (φ (a i)))] + exact tensor_norm_le_faithful Finset.univ (fun i : s => T i) (fun i : s => a i) φ ψ hφ + +section PolynomialTensorEstimate + +variable {B C : Type 1} [CStarAlgebra B] [NonUnitalCStarAlgebra C] + +def wordTensor (s : Finset (List Bool)) (c : List Bool → C) : MinimalTensor UniversalContraction C := + ∑ w ∈ s, minimalElementary (universalWord w) (c w) + +lemma wordTensor_val (s : Finset (List Bool)) (c : List Bool → C) : + (wordTensor s c).val = ∑ w ∈ s, spatialElementary (universalWord w) (c w) := by + change (minimalTensorSubalgebra UniversalContraction C).subtype + (∑ w ∈ s, minimalElementary (universalWord w) (c w)) = _ + rw [map_sum] + rfl + +lemma minimalMapLeft_wordTensor (s : Finset (List Bool)) (c : List Bool → C) + (φ : UniversalContraction →⋆ₐ[ℂ] B) : + minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c) = + ∑ w ∈ s, minimalElementary (φ (universalWord w)) (c w) := by + rw [wordTensor, map_sum] + apply Finset.sum_congr rfl + intro w _hw + exact minimalMapLeft_elementary φ.toNonUnitalStarAlgHom (universalWord w) (c w) + +def wordTensorCost (s : Finset (List Bool)) (c : List Bool → C) : ℝ := + ∑ w ∈ s, ‖c w‖ * w.length + +lemma wordTensorCost_nonneg (s : Finset (List Bool)) (c : List Bool → C) : + 0 ≤ wordTensorCost s c := by + unfold wordTensorCost + positivity + +lemma norm_model_amplifiedPolynomial_le (s : Finset (List Bool)) (c : List Bool → C) + (φ : UniversalContraction →⋆ₐ[ℂ] B) (K L : ComplexHilbert.{1}) + (π : B →⋆ₐ[ℂ] (L →L[ℂ] L)) (σ : C →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + ‖amplifiedPolynomial s (fun w => σ (c w)) + (operatorLetters (π (φ universalContractionGenerator)))‖ ≤ + ‖minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)‖ := by + let ρ : SpatialRepresentation B C := + { left := L, right := K, leftRep := π.toNonUnitalStarAlgHom, rightRep := σ } + calc + _ = ‖∑ w ∈ s, TensorProduct.mapL (π (φ (universalWord w))) (σ (c w))‖ := by + rw [norm_tensorSum_flip] + unfold amplifiedPolynomial + congr 1 + apply Finset.sum_congr rfl + intro w _hw + congr 1 + exact (unitalRep_universalWord (π.comp φ) w).symm + _ = ‖((minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)).val) ρ‖ := by + rw [minimalMapLeft_wordTensor] + change _ = ‖((minimalTensorSubalgebra B C).subtype + (∑ w ∈ s, minimalElementary (φ (universalWord w)) (c w))) ρ‖ + rw [map_sum] + change _ = ‖(∑ w ∈ s, spatialElementary (φ (universalWord w)) (c w)) ρ‖ + rw [spatialSum_apply, norm_completion] + rfl + _ ≤ _ := lp.norm_apply_le_norm ENNReal.top_ne_zero _ ρ + +lemma norm_faithfulAmplifiedPolynomial_le_of_models (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModels B v θ) (K : ComplexHilbert.{1}) + (σ : C →⋆ₙₐ[ℂ] (K →L[ℂ] K)) : + ‖amplifiedPolynomial s (fun w => σ (c w)) + (operatorLetters (universalUnitalRepresentation universalContractionGenerator))‖ ≤ + ‖minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + wordTensorCost s c * θ := by + have hM : 0 ≤ ‖minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := add_nonneg (norm_nonneg _) (mul_nonneg (wordTensorCost_nonneg s c) hθ) + apply norm_amplifiedPolynomial_le_of_finite_compressions _ _ _ hM + intro E hE + let T := universalUnitalRepresentation universalContractionGenerator + have hT : ‖T‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le universalUnitalRepresentation _).trans + norm_universalContractionGenerator_le_one + let H : ComplexHilbert.{1} := { Carrier := E } + obtain ⟨L, π, J, hj, hjstar⟩ := hmodels H (compress E T) ((norm_compress_le E T).trans hT) + have hJ : ∀ i : Bool, ‖(operatorLetters (π v) i).comp J.toContinuousLinearMap - + J.toContinuousLinearMap.comp (operatorLetters (compress E T) i)‖ ≤ θ := by + intro i + cases i + · exact hjstar + · exact hj + have hcomp : (fun i => compress E (operatorLetters T i)) = operatorLetters (compress E T) := by + funext i + exact (operatorLetters_compress E T i).symm + rw [hcomp] + have hπ : ‖π v‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le π v).trans hv + have hb := norm_amplifiedPolynomial_le s (fun w => σ (c w)) + (operatorLetters (π v)) (operatorLetters (compress E T)) J + (operatorLetters_norm _ hπ) (operatorLetters_norm _ ((norm_compress_le E T).trans hT)) hθ hJ + have hcost : (∑ w ∈ s, ‖σ (c w)‖ * w.length) ≤ wordTensorCost s c := by + apply Finset.sum_le_sum + intro w hw + exact mul_le_mul_of_nonneg_right (NonUnitalStarAlgHom.norm_apply_le σ _) (Nat.cast_nonneg _) + apply hb.trans + apply add_le_add + · simpa only [hφ] using norm_model_amplifiedPolynomial_le s c φ K L π σ + · exact mul_le_mul_of_nonneg_right hcost hθ + +lemma norm_wordTensor_le_of_models (s : Finset (List Bool)) (c : List Bool → C) + (v : B) (hv : ‖v‖ ≤ 1) (φ : UniversalContraction →⋆ₐ[ℂ] B) + (hφ : φ universalContractionGenerator = v) {θ : ℝ} (hθ : 0 ≤ θ) + (hmodels : FiniteContractionModels B v θ) : + ‖wordTensor s c‖ ≤ ‖minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := by + let := CStarAlgebra.spectralOrder UniversalContraction + let := CStarAlgebra.spectralOrderedRing UniversalContraction + have hM : 0 ≤ ‖minimalMapLeft φ.toNonUnitalStarAlgHom (wordTensor s c)‖ + + wordTensorCost s c * θ := add_nonneg (norm_nonneg _) (mul_nonneg (wordTensorCost_nonneg s c) hθ) + change ‖(wordTensor s c).val‖ ≤ _ + rw [wordTensor_val] + apply lp.norm_le_of_forall_le hM + intro ρ + rw [spatialSum_apply, norm_completion, norm_tensorSum_flip] + apply (tensor_norm_le_faithful_finset s (fun w => ρ.rightRep (c w)) universalWord + universalFaithfulRepresentation ρ.leftRep universalFaithfulRepresentation_injective).trans + have he : ∀ w, universalFaithfulRepresentation (universalWord w) = + wordEval (operatorLetters (universalUnitalRepresentation universalContractionGenerator)) w := + unitalRep_universalWord universalUnitalRepresentation + simp only [he] + exact norm_faithfulAmplifiedPolynomial_le_of_models s c v hv φ hφ hθ hmodels ρ.right ρ.rightRep + +end PolynomialTensorEstimate + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniformPerturbation.lean b/lean/OAI/Analysis/WeakInfiniteness/UniformPerturbation.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5ebd17fe6c5e1922b4e434df52e991f237c8ed3 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniformPerturbation.lean @@ -0,0 +1,152 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PerturbationRows +import OAI.Analysis.WeakInfiniteness.SupportedSeparation +import OAI.Analysis.WeakInfiniteness.UniformGap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +variable {A : Type 1} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance matrixRealModuleUniform {m : Type*} [Fintype m] : + Module ℝ (CStarMatrix m m A) := Module.complexToReal _ + +theorem uniform_perturbation_of_gap_one + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type 1) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModels B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (p q h k c : A) (hp : ‖p‖ ≤ 1) (hq : ‖q‖ ≤ 1) + (hh : 0 ≤ h) (hk : 0 ≤ k) (hc : 0 ≤ c) + (hph : star p*p*h=h) (hqk : q*star q*k=k) + (hch : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h)) + (hck : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k)) + (T : A) {η α : ℝ} (hη : 0 < η) (hα : 0 < α) : + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + obtain ⟨R,hR,hRh,hRn⟩ := exists_fixed_comparison_row c h hc hh hch hα + obtain ⟨S,hS,hSk,hSn⟩ := exists_fixed_comparison_row c k hc hk hck hα + obtain ⟨U,hU,_,_⟩ := exists_fixed_comparison_row c h hc hh hch (α := α/4) (by positivity) + let E := diagonalCopies n (cfcₙ (spectralRamp (α/4)) c) + let e := diagonalCopies n (cfcₙ (spectralRamp (α/16)) c) + have he : IsSelfAdjoint e := by + have hcself : IsSelfAdjoint (cfcₙ (spectralRamp (α/16)) c) := cfcₙ_predicate _ _ + exact hcself.map (diagonalHom n) + have hUe : U.conjTranspose*U=e := by + have hd : α/4/4=α/16 := by ring + simpa only [hd] using hU + let P := diagonalCopies 1 p + let Q := diagonalCopies 1 q + let X := diagonalCopies 1 T + let L := R.conjTranspose*star P + let K := star Q*S + have hPR : star P*P*R=R := by + change (star (diagonalHom 1 p)*diagonalHom 1 p)*R=R + rw [← map_star,← map_mul] + exact fixed_row_partial_isometry p h hh hph R hRh + have hQS : Q*star Q*S=S := by + have hhq : star (star q)*star q*k=k := by simpa only [star_star] using hqk + change diagonalHom 1 q*star (diagonalHom 1 q)*S=S + rw [← map_star,← map_mul] + rw [show diagonalHom 1 (q*star q)=diagonalCopies 1 (q*star q) from rfl] + simpa only [star_star] using fixed_row_partial_isometry (star q) k hk hhq S hSk + have hLPR : L*P*R=E := by + dsimp only [L] + rw [rectangular_mul_assoc, rectangular_mul_assoc, ← rectangular_mul_assoc (star P), hPR] + exact hR + have hSQK : S.conjTranspose*Q*K=E := by + dsimp only [K] + rw [rectangular_mul_assoc, ← rectangular_mul_assoc Q, hQS] + exact hS + have hLn : ‖L‖ ≤ 1 := by + calc + ‖L‖ ≤ ‖R.conjTranspose‖*‖star P‖ := rectangular_norm_mul_le _ _ + _ = ‖R‖*‖P‖ := by rw [rectangular_norm_conjTranspose,norm_star] + _ ≤ 1*1 := by gcongr; exact (norm_diagonalCopies_le 1 p).trans hp + _ = 1 := one_mul _ + have hKn : ‖K‖ ≤ 1 := by + calc + ‖K‖ ≤ ‖star Q‖*‖S‖ := rectangular_norm_mul_le _ _ + _ = ‖Q‖*‖S‖ := by rw [norm_star] + _ ≤ 1*1 := by gcongr; exact (norm_diagonalCopies_le 1 q).trans hq + _ = 1 := one_mul _ + let Vval := (η : ℂ)⁻¹ • (R.conjTranspose*(star P*X*star Q)*S) + let V : supportedAlgebra e he := ⟨Vval,supported_testing_element c hα R S hR hS _ _⟩ + obtain ⟨w,hwn,hEw,hsep⟩ := exists_separated_supported_model_one hσ hσγ hgap hA hn hpi c hc hα e he U hUe V + let y := matrixSingletonHom (-(R*w*S.conjTranspose)) + have hyn : ‖y‖ ≤ 1 := norm_row_test_le R S w hRn hSn hwn + have hy : diagonalCopies 1 y= -(R*w*S.conjTranspose) := diagonal_singleton _ + have hcompy : L*(P*(diagonalCopies 1 y)*Q)*K= -w := by + rw [hy] + exact compress_row_test L K R S P Q E w hLPR hSQK hEw + have hcη : (η : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (ne_of_gt hη) + have hηV : (η : ℂ) • Vval=L*X*K := by + dsimp only [Vval] + rw [smul_smul, mul_inv_cancel₀ hcη, one_smul] + dsimp only [L,K] + simp only [rectangular_mul_assoc] + have hcomp : L*diagonalCopies 1 (T+(η : ℂ) • (p*y*q))*K=(η : ℂ) • (Vval-w) := by + change L*(diagonalHom 1 (T+(η : ℂ) • (p*y*q)))*K= _ + rw [map_add,map_smul,map_mul,map_mul] + change L*(X+(η : ℂ) • (P*diagonalCopies 1 y*Q))*K= _ + rw [rectangular_mul_add_support,rectangular_add_mul_support, + rectangular_mul_smul_support,rectangular_smul_mul_support,hcompy, + smul_sub,hηV,smul_neg,sub_eq_add_neg] + refine ⟨y,hyn,?_⟩ + intro H π hπc + have hs := hsep H π hπc + have hb := norm_representation_compression_le π L K + (diagonalCopies 1 (T+(η : ℂ) • (p*y*q))) hLn hKn + rw [hcomp,map_smul,norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hη, + singleton_diagonal] at hb + exact (by nlinarith : σ*η ≤ η*‖matrixRepresentation π (Fin n) (Vval-w)‖).trans hb + +theorem exists_uniform_perturbation_constant_one : + ∃ σ : ℝ, 0 < σ ∧ σ < 1 ∧ + ∀ (A : Type 1) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A], + Exact A → ∀ n : ℕ, 1 ≤ n → + (∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) → + ∀ p q h k c : A, ‖p‖ ≤ 1 → ‖q‖ ≤ 1 → 0 ≤ h → 0 ≤ k → 0 ≤ c → + star p*p*h=h → q*star q*k=k → + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h) → + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k) → + ∀ (T : A) (η α : ℝ), 0 < η → 0 < α → + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{1}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + obtain ⟨γ,hγ,hgap⟩ := exists_uniform_gap_one + let σ := min (1/2) (γ/3) + have hσ : 0 < σ := lt_min (by norm_num) (by positivity) + have hσ1 : σ < 1 := (min_le_left _ _).trans_lt (by norm_num) + have hσγ : 2*σ ≤ γ := by have := min_le_right (1/2 : ℝ) (γ/3); dsimp [σ]; linarith + refine ⟨σ,hσ,hσ1,?_⟩ + intro A _ _ _ hA n hn hpi p q h k c hp hq hh hk hc hph hqk hch hck T η α hη hα + exact uniform_perturbation_of_gap_one hσ.le hσγ hgap hA hn hpi p q h k c hp hq + hh hk hc hph hqk hch hck T hη hα + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UnitalCuntzEmbedding.lean b/lean/OAI/Analysis/WeakInfiniteness/UnitalCuntzEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..3716e65c2de7027eabf9a654de5444f99c16257a --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UnitalCuntzEmbedding.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.OInfinityMap +import OAI.Analysis.WeakInfiniteness.OrthogonalCores +import OAI.Analysis.WeakInfiniteness.UniverseIndividualInfiniteness + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra + +universe u + +variable {A : Type u} [CStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma spectralRamp_one : cfcₙ (spectralRamp (1/4)) (1:A) = 1 := by + rw [cfcₙ_eq_cfc (continuous_spectralRamp _).continuousOn + (spectralRamp_eq_zero (by norm_num : (0:ℝ)<1/4) (by norm_num))] + have h := cfc_algebraMap (A := A) (1:ℝ) (spectralRamp (1/4)) + rw [map_one,spectralRamp_eq_one (by norm_num : (0:ℝ)<1/4) (by norm_num),map_one] at h + exact h + +lemma exists_two_isometries_of_properlyInfinite + (hpi : ProperlyInfinite (diagonalCopies 1 (1:A))) : + ∃ r s : A,star r*r=1 ∧ star s*s=1 ∧ star r*s=0 := by + obtain ⟨r,s,hr,hs,hrs,_⟩ := exists_two_exact_core_columns + (show (0:A)≤1 from zero_le_one) hpi (by norm_num : (0:ℝ)<1/4) + rw [spectralRamp_one] at hr hs + exact ⟨r,s,hr,hs,hrs⟩ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma star_pow_mul_pow_of_isometry {r : A} (hr : star r*r=1) (n : ℕ) : + star (r^n)*r^n=1 := by + induction n with + | zero => simp + | succ n ih => + calc + star (r^(n+1))*r^(n+1) = star r*(star (r^n)*r^n)*r := by + simp only [pow_succ,star_mul,mul_assoc] + _ = 1 := by rw [ih,mul_one,hr] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma star_mul_power_of_orthogonal {r s : A} (hrs : star r*s=0) {n : ℕ} (hn : n≠0) : + star r*s^n=0 := by + obtain ⟨n,rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn + rw [pow_succ',← mul_assoc,hrs,zero_mul] + +omit [PartialOrder A] [StarOrderedRing A] in +lemma binaryCuntzFamily_relations {r s : A} + (hr : star r*r=1) (hs : star s*s=1) (hrs : star r*s=0) (i j : ℕ) : + star (s^i*r)*(s^j*r)=if i=j then 1 else 0 := by + have hlt : ∀ i j : ℕ,i s^n*r) (binaryCuntzFamily_relations hr hs hrs)⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UnitaryIntertwining.lean b/lean/OAI/Analysis/WeakInfiniteness/UnitaryIntertwining.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac192df96a1b88392554609618d4b664f32ab3b5 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UnitaryIntertwining.lean @@ -0,0 +1,86 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IntertwiningConstruction + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +universe u v + +variable {A : Type u} {B : Type v} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] + +def unitizationInnerFun (u : unitary (Unitization ℂ B)) (b : B) : B := + (Unitary.conjStarAlgAut ℂ (Unitization ℂ B) u (b : Unitization ℂ B)).snd + +lemma inr_unitizationInnerFun (u : unitary (Unitization ℂ B)) (b : B) : + ((unitizationInnerFun u b : B) : Unitization ℂ B) = + Unitary.conjStarAlgAut ℂ (Unitization ℂ B) u (b : Unitization ℂ B) := by + apply Unitization.ext + · simp [unitizationInnerFun] + · rfl + +def unitizationInnerHom (u : unitary (Unitization ℂ B)) : B →⋆ₙₐ[ℂ] B where + toFun := unitizationInnerFun u + map_zero' := by + apply Unitization.inr_injective (R := ℂ) + rw [inr_unitizationInnerFun] + simp + map_add' x y := by + apply Unitization.inr_injective (R := ℂ) + simp only [inr_unitizationInnerFun,Unitization.inr_add,map_add] + map_mul' x y := by + apply Unitization.inr_injective (R := ℂ) + simp only [inr_unitizationInnerFun,Unitization.inr_mul,map_mul] + map_smul' c x := by + apply Unitization.inr_injective (R := ℂ) + simp only [inr_unitizationInnerFun,Unitization.inr_smul,map_smul,MonoidHom.id_apply] + map_star' x := by + apply Unitization.inr_injective (R := ℂ) + simp only [inr_unitizationInnerFun,Unitization.inr_star,map_star] + +lemma unitizationInnerFun_star_left (u : unitary (Unitization ℂ B)) (b : B) : + unitizationInnerFun (star u) (unitizationInnerFun u b)=b := by + apply Unitization.inr_injective (R := ℂ) + rw [inr_unitizationInnerFun,inr_unitizationInnerFun, + ← Unitary.conjStarAlgAut_symm,StarAlgEquiv.symm_apply_apply] + +def unitizationInnerEquiv (u : unitary (Unitization ℂ B)) : B ≃⋆ₐ[ℂ] B := + StarAlgEquiv.ofBijective (unitizationInnerHom u) + ⟨Function.HasLeftInverse.injective ⟨unitizationInnerFun (star u),unitizationInnerFun_star_left u⟩, + fun b => ⟨unitizationInnerFun (star u) b,by + change unitizationInnerFun u (unitizationInnerFun (star u) b)=b + simpa only [star_star] using unitizationInnerFun_star_left (star u) b⟩⟩ + +def UnitaryFiniteIntertwining (φ : A →⋆ₙₐ[ℂ] B) : Prop := + ∀ (E : Finset A) (F : Finset B) (ε : ℝ), 0 < ε → + ∃ u : unitary (Unitization ℂ B), + (∀ a ∈ E,dist (unitizationInnerFun u (φ a)) (φ a)<ε) ∧ + ∀ b ∈ F,∃ a : A,dist (unitizationInnerFun u (φ a)) b<ε + +lemma UnitaryFiniteIntertwining.finiteIntertwining {φ : A →⋆ₙₐ[ℂ] B} + (h : UnitaryFiniteIntertwining φ) : FiniteIntertwining φ := by + intro E F ε hε + obtain ⟨u,hE,hF⟩ := h E F ε hε + exact ⟨unitizationInnerEquiv u,hE,hF⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UnitizationExact.lean b/lean/OAI/Analysis/WeakInfiniteness/UnitizationExact.lean new file mode 100644 index 0000000000000000000000000000000000000000..3afe442385181c4baffbf35c61cf85a49cf9a691 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UnitizationExact.lean @@ -0,0 +1,146 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorSubalgebras +import OAI.Analysis.WeakInfiniteness.UnitizationTensor + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped TensorProduct ComplexOrder ENNReal + +variable {A C D : Type u} [NonUnitalCStarAlgebra A] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +def unitizationCharacter : Unitization ℂ A →⋆ₐ[ℂ] ℂ where + toAlgHom := Unitization.fstHom ℂ A + map_star' _ := rfl + +def unitizationScalarEnd : Unitization ℂ A →⋆ₐ[ℂ] Unitization ℂ A := + (StarAlgHom.ofId ℂ (Unitization ℂ A)).comp unitizationCharacter + +lemma unitizationScalarEnd_apply (a : Unitization ℂ A) : + unitizationScalarEnd a=a.fst • (1 : Unitization ℂ A) := + by + change algebraMap ℂ (Unitization ℂ A) a.fst=a.fst • (1 : Unitization ℂ A) + exact Algebra.algebraMap_eq_smul_one _ + +lemma unitization_difference_scalarEnd (a : Unitization ℂ A) : + a-unitizationScalarEnd a=(a.snd : Unitization ℂ A) := by + change a-algebraMap ℂ (Unitization ℂ A) a.fst=(a.snd : Unitization ℂ A) + apply Unitization.ext + · change a.fst-a.fst=0 + exact sub_self _ + · change a.snd-0=a.snd + exact sub_zero _ + +lemma minimalMapLeft_scalarEnd_elementary (a : Unitization ℂ A) (c : C) : + minimalMapLeft unitizationScalarEnd.toNonUnitalStarAlgHom (minimalElementary a c)= + rightElementaryHom (a.fst • c) := by + rw [minimalMapLeft_elementary] + apply Subtype.ext + change spatialElementary (unitizationScalarEnd a) c=spatialElementary 1 (a.fst • c) + rw [unitizationScalarEnd_apply, spatialElementary_smul_left, spatialElementary_smul_right] + +lemma difference_scalarEnd_elementary (a : Unitization ℂ A) (c : C) : + minimalElementary a c- + minimalMapLeft unitizationScalarEnd.toNonUnitalStarAlgHom (minimalElementary a c)= + minimalMapLeft (Unitization.inrNonUnitalStarAlgHom ℂ A) (minimalElementary a.snd c) := by + rw [minimalMapLeft_elementary, minimalMapLeft_elementary] + apply Subtype.ext + change spatialElementary a c-spatialElementary (unitizationScalarEnd a) c= + spatialElementary (a.snd : Unitization ℂ A) c + have h := spatialElementary_add_left (a-unitizationScalarEnd a) (unitizationScalarEnd a) c + rw [sub_add_cancel, unitization_difference_scalarEnd] at h + exact sub_eq_iff_eq_add.mpr h + +lemma unitizationTensor_decomposition (z : MinimalTensor (Unitization ℂ A) C) : + ∃ (z₀ : MinimalTensor A C) (c : C), + z-minimalMapLeft unitizationScalarEnd.toNonUnitalStarAlgHom z= + minimalMapLeft (Unitization.inrNonUnitalStarAlgHom ℂ A) z₀ ∧ + minimalMapLeft unitizationScalarEnd.toNonUnitalStarAlgHom z=rightElementaryHom c := by + let P := minimalMapLeft (C := C) (unitizationScalarEnd (A := A)).toNonUnitalStarAlgHom + let i := minimalMapLeft (C := C) (Unitization.inrNonUnitalStarAlgHom ℂ A) + let r := rightElementaryHom (A := Unitization ℂ A) (C := C) + let L : MinimalTensor (Unitization ℂ A) C →ₗ[ℂ] MinimalTensor (Unitization ℂ A) C := + LinearMap.id-(P : MinimalTensor (Unitization ℂ A) C →ₗ[ℂ] MinimalTensor (Unitization ℂ A) C) + have hL : Continuous L := continuous_id.sub (nonUnitalStarHom_continuous P) + let R := LinearMap.range (i : MinimalTensor A C →ₗ[ℂ] MinimalTensor (Unitization ℂ A) C) + let S := R.comap L + have hS : IsClosed (S : Set (MinimalTensor (Unitization ℂ A) C)) := + (nonUnitalStarHom_isClosed_range i).preimage hL + have hz₀ : L z∈R := minimalTensor_closed_submodule S hS (by + intro a c + exact ⟨minimalElementary a.snd c, (difference_scalarEnd_elementary a c).symm⟩) z + obtain ⟨z₀,hz₀⟩ := hz₀ + let R' := LinearMap.range (r : C →ₗ[ℂ] MinimalTensor (Unitization ℂ A) C) + let S' := R'.comap (P : MinimalTensor (Unitization ℂ A) C →ₗ[ℂ] MinimalTensor (Unitization ℂ A) C) + have hS' : IsClosed (S' : Set (MinimalTensor (Unitization ℂ A) C)) := + (nonUnitalStarHom_isClosed_range r).preimage (nonUnitalStarHom_continuous P) + have hcz : P z∈R' := minimalTensor_closed_submodule S' hS' (by + intro a c + exact ⟨a.fst • c, (minimalMapLeft_scalarEnd_elementary a c).symm⟩) z + obtain ⟨c,hc⟩ := hcz + exact ⟨z₀,c,hz₀.symm,hc.symm⟩ + +lemma minimalMapRight_rightElementary {E : Type u} [CStarAlgebra E] + (q : C →⋆ₙₐ[ℂ] D) (c : C) : + minimalMapRight q (rightElementaryHom (A := E) c)=rightElementaryHom (q c) := rfl + +lemma mapLeft_tensorKernel {B : Type u} [NonUnitalCStarAlgebra B] + (φ : A →⋆ₙₐ[ℂ] B) (q : C →⋆ₙₐ[ℂ] D) {x : SpatialAmbient A C} + (hx : x∈tensorKernelIdeal (A := A) q) : + spatialMapLeft φ x∈tensorKernelIdeal (A := B) q := by + apply NonUnitalStarSubalgebra.topologicalClosure_minimal _ + (t := NonUnitalStarSubalgebra.comap (spatialMapLeft φ) (tensorKernelIdeal (A := B) q)) + (NonUnitalStarAlgebra.adjoin_le ?_) ?_ hx + · rintro _ ⟨a,c,hc,rfl⟩ + change spatialMapLeft φ (spatialElementary a c)∈tensorKernelIdeal (A := B) q + rw [spatialMapLeft_elementary] + apply NonUnitalStarSubalgebra.le_topologicalClosure + exact NonUnitalStarAlgebra.subset_adjoin ℂ _ ⟨φ a,c,hc,rfl⟩ + · exact isClosed_closure.preimage (nonUnitalStarHom_continuous (spatialMapLeft φ)) + +theorem exact_unitization (hA : Exact A) : Exact (Unitization ℂ A) := by + intro C D _ _ q hq z hz + have hzq : minimalMapRight q z=0 := (minimalMapRight_eq_zero_iff q z).mpr hz + obtain ⟨z₀,c,hz₀,hc⟩ := unitizationTensor_decomposition z + have hPq : minimalMapRight q (minimalMapLeft unitizationScalarEnd.toNonUnitalStarAlgHom z)=0 := by + rw [minimalMapLeft_right_commute, hzq, map_zero] + have hqc : q c=0 := by + apply (rightElementaryHom_injective (E := Unitization ℂ A)) + rw [map_zero, ← minimalMapRight_rightElementary, ← hc, hPq] + have hz₀q : minimalMapRight q z₀=0 := by + apply minimalMapLeft_injective (Unitization.inrNonUnitalStarAlgHom ℂ A) Unitization.inr_injective + rw [map_zero, ← minimalMapLeft_right_commute, ← hz₀, map_sub, hzq, hPq, sub_self] + have hz₀mem := hA C D q hq z₀ ((minimalMapRight_eq_zero_iff q z₀).mp hz₀q) + have hz' : z=minimalMapLeft (Unitization.inrNonUnitalStarAlgHom ℂ A) z₀+rightElementaryHom c := by + rw [← hz₀, ← hc, sub_add_cancel] + rw [hz'] + apply (tensorKernelIdeal (A := Unitization ℂ A) q).add_mem + · exact mapLeft_tensorKernel (Unitization.inrNonUnitalStarAlgHom ℂ A) q hz₀mem + · apply NonUnitalStarSubalgebra.le_topologicalClosure + exact NonUnitalStarAlgebra.subset_adjoin ℂ _ ⟨1,c,hqc,rfl⟩ + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UnitizationTensor.lean b/lean/OAI/Analysis/WeakInfiniteness/UnitizationTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..857da4bb6bc3165c6cf55a6a6ecd1e349c529d60 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UnitizationTensor.lean @@ -0,0 +1,103 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FaithfulRepresentation +import OAI.Analysis.WeakInfiniteness.TensorCut +import OAI.Analysis.WeakInfiniteness.TensorInjectivity + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped TensorProduct ComplexOrder ENNReal + +open UniformSpace + +variable {A C D : Type u} [NonUnitalCStarAlgebra A] + [NonUnitalCStarAlgebra C] [NonUnitalCStarAlgebra D] + +lemma spatialElementary_ne_zero {a : A} {c : C} (ha : a≠0) (hc : c≠0) : + spatialElementary a c≠0 := by + obtain ⟨H,π,hπ⟩ := exists_faithful_representation A + obtain ⟨K,ρ,hρ⟩ := exists_faithful_representation C + have hπa : π a≠0 := by intro h; apply ha; apply hπ; simpa using h + have hρc : ρ c≠0 := by intro h; apply hc; apply hρ; simpa using h + obtain ⟨ξ,hξ⟩ : ∃ ξ : H, π a ξ≠0 := by + by_contra h + apply hπa + ext ξ + simpa using not_exists.mp h ξ + obtain ⟨η,hη⟩ : ∃ η : K, ρ c η≠0 := by + by_contra h + apply hρc + ext η + simpa using not_exists.mp h η + let σ : SpatialRepresentation A C := {left := H, right := K, leftRep := π, rightRep := ρ} + intro h + have hh := congrArg (fun z : SpatialAmbient A C => z σ ((ξ ⊗ₜ[ℂ] η : H ⊗[ℂ] K) : Completion _)) h + change ((TensorProduct.mapL (π a) (ρ c)).completion _)=0 at hh + rw [ContinuousLinearMap.completion_apply_coe, TensorProduct.mapL_tmul] at hh + have hn := congrArg norm hh + rw [Completion.norm_coe, TensorProduct.norm_tmul, norm_zero] at hn + exact (ne_of_gt (mul_pos (norm_pos_iff.mpr hξ) (norm_pos_iff.mpr hη))) hn + +lemma rightElementaryHom_injective {E : Type u} [CStarAlgebra E] [Nontrivial E] : + Function.Injective (rightElementaryHom (A := E) (C := C)) := by + apply (injective_iff_map_eq_zero _).mpr + intro c hc + by_contra h + exact spatialElementary_ne_zero (one_ne_zero : (1 : E)≠0) h (congrArg Subtype.val hc) + +lemma minimalTensor_closed_submodule (S : Submodule ℂ (MinimalTensor A C)) + (hS : IsClosed (S : Set (MinimalTensor A C))) + (he : ∀ a c, minimalElementary a c∈S) (x : MinimalTensor A C) : x∈S := by + let j : MinimalTensor A C →ₗ[ℂ] SpatialAmbient A C := + { toFun := Subtype.val, map_add' _ _ := rfl, map_smul' _ _ := rfl } + let T := S.map j + have hTc : IsClosed (T : Set (SpatialAmbient A C)) := + isClosed_closure.isClosedMap_subtype_val _ hS + have hs : Submodule.span ℂ (Set.range fun p : A×C => spatialElementary p.1 p.2) ≤ T := by + apply Submodule.span_le.mpr + rintro _ ⟨⟨a,c⟩,rfl⟩ + exact ⟨minimalElementary a c,he a c,rfl⟩ + have hx := x.property + change x.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hx + rw [minimalTensor_eq_closure_span] at hx + obtain ⟨y,hy,hyx⟩ := (closure_minimal hs hTc) hx + exact (Subtype.ext hyx : y=x) ▸ hy + +lemma minimalMapLeft_right_commute {B : Type u} [NonUnitalCStarAlgebra B] + (φ : A →⋆ₙₐ[ℂ] B) (q : C →⋆ₙₐ[ℂ] D) (z : MinimalTensor A C) : + minimalMapRight q (minimalMapLeft φ z)=minimalMapLeft φ (minimalMapRight q z) := rfl + +lemma minimalMapRight_eq_zero_iff (q : C →⋆ₙₐ[ℂ] D) (z : MinimalTensor A C) : + minimalMapRight q z=0 ↔ ∀ π : SpatialRepresentation A D, z.val (π.precompRight q)=0 := by + constructor + · intro h π + exact congrArg (fun z : MinimalTensor A D => z.val π) h + · intro h + apply Subtype.ext + apply Subtype.ext + exact funext h + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversalFreeEmbedding.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversalFreeEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..b06a2dbab59da5c1f77074bacb6d865292e08712 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversalFreeEmbedding.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FullGroupAlgebra + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology + +namespace WeakPureInfiniteness + +structure ContractionRepresentation where + hilbert : ComplexHilbert.{0} + [nontrivial : Nontrivial hilbert] + operator : hilbert →L[ℂ] hilbert + norm_operator_le_one : ‖operator‖ ≤ 1 + +attribute [instance] ContractionRepresentation.nontrivial + +def ContractionAmbient : Type 1 := + lp (fun π : ContractionRepresentation => π.hilbert →L[ℂ] π.hilbert) ∞ + +instance : CStarAlgebra ContractionAmbient := by + unfold ContractionAmbient + exact { } + +instance : CoeFun ContractionAmbient + (fun _ => ∀ π : ContractionRepresentation, π.hilbert →L[ℂ] π.hilbert) := + ⟨fun z => z.val⟩ + +noncomputable def universalOperator : ContractionAmbient := + ⟨fun π => π.operator, memℓp_infty ⟨1, by + rintro _ ⟨π, rfl⟩ + exact π.norm_operator_le_one⟩⟩ + +noncomputable def universalContractionSubalgebra : StarSubalgebra ℂ ContractionAmbient := + closedStarSpan {universalOperator} + +def UniversalContraction : Type 1 := universalContractionSubalgebra + +instance : CStarAlgebra UniversalContraction := closedStarSpanCStar _ + +noncomputable def universalContractionGenerator : UniversalContraction := + ⟨universalOperator, subset_closedStarSpan _ (Set.mem_singleton _)⟩ + +noncomputable def contractionEvaluation (π : ContractionRepresentation) : + UniversalContraction →⋆ₐ[ℂ] (π.hilbert →L[ℂ] π.hilbert) where + toFun x := x.val π + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +@[simp] +lemma contractionEvaluation_star (π : ContractionRepresentation) (x : UniversalContraction) : + contractionEvaluation π (star x) = star (contractionEvaluation π x) := rfl + +@[simp] +lemma contractionEvaluation_smul (π : ContractionRepresentation) (c : ℂ) (x : UniversalContraction) : + contractionEvaluation π (c • x) = c • contractionEvaluation π x := rfl + +@[simp] +lemma contractionEvaluation_generator (π : ContractionRepresentation) : + contractionEvaluation π universalContractionGenerator = π.operator := rfl + +lemma norm_universalContractionGenerator_le_one : ‖universalContractionGenerator‖ ≤ 1 := by + change ‖(universalOperator : ContractionAmbient)‖ ≤ 1 + apply lp.norm_le_of_forall_le zero_le_one + exact fun π => π.norm_operator_le_one + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupEmbedding.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupEmbedding.lean new file mode 100644 index 0000000000000000000000000000000000000000..0db4062b93523c929442c0e778e3679f2058535b --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupEmbedding.lean @@ -0,0 +1,53 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FreeFiniteRepresentations +import OAI.Analysis.WeakInfiniteness.UniversalGroupNorm + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +lemma norm_fullToUniversal_polynomial (c : FreeGroup Bool →₀ ℂ) : + ‖fullToUniversal (fullGroupPolynomial c)‖ = ‖fullGroupPolynomial c‖ := by + apply le_antisymm (NonUnitalStarAlgHom.norm_apply_le fullToUniversal _) + apply (norm_fullGroup_le_iff _ (norm_nonneg _)).mpr + intro π + rw [fullGroupEvaluation_polynomial] + let ρ := Unitary.linearIsometryEquiv.toMonoidHom.comp π.group + exact norm_freePolynomial_le_of_finite_tests c _ (norm_nonneg _) + (fun V _ _ _ ρ => finite_norm_le_fullToUniversal c V ρ) ρ + +lemma fullToUniversal_continuous : Continuous fullToUniversal := + (fullToUniversal.toAlgHom.toLinearMap.mkContinuous 1 (fun x => by + change ‖fullToUniversal x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le fullToUniversal x)).continuous + +lemma norm_fullToUniversal (x : FullGroupAlgebra (FreeGroup Bool)) : + ‖fullToUniversal x‖ = ‖x‖ := by + refine (fullGroupPolynomial_dense (G := FreeGroup Bool)).induction_on + (p := fun y => ‖fullToUniversal y‖ = ‖y‖) x ?_ ?_ + · exact isClosed_eq (continuous_norm.comp fullToUniversal_continuous) continuous_norm + · exact norm_fullToUniversal_polynomial + +theorem fullToUniversal_isometry : Isometry fullToUniversal := + AddMonoidHomClass.isometry_of_norm fullToUniversal norm_fullToUniversal + +lemma fullToUniversal_injective : Function.Injective fullToUniversal := + fullToUniversal_isometry.injective + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupMap.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..f292e4c70bd0f25d59f19c72b8b6cb03f92a30f9 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupMap.lean @@ -0,0 +1,76 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PairUnitary +import OAI.Analysis.WeakInfiniteness.UniversalFreeEmbedding + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +def pairRepresentation (π : ContractionRepresentation) : GroupRepresentation (FreeGroup Bool) where + hilbert := π.hilbert + group := pairGroup π.operator + +def pairAmbientMap : FullGroupAmbient (FreeGroup Bool) →⋆ₐ[ℂ] ContractionAmbient where + toFun x := ⟨fun π => x (pairRepresentation π), memℓp_infty ⟨‖x‖, by + rintro _ ⟨π,rfl⟩ + exact lp.norm_apply_le_norm ENNReal.top_ne_zero x (pairRepresentation π)⟩⟩ + map_zero' := rfl + map_add' _ _ := rfl + map_mul' _ _ := rfl + map_one' := rfl + commutes' _ := rfl + map_star' _ := rfl + +lemma pairAmbientMap_element (g : FreeGroup Bool) : + pairAmbientMap (fullGroupOperator g) = + ((pairGroup universalContractionGenerator g : UniversalContraction).val) := by + apply Subtype.ext + funext π + exact (map_pairGroup (contractionEvaluation π) universalContractionGenerator g).symm + +lemma pairAmbientMap_mem (x : FullGroupAlgebra (FreeGroup Bool)) : + pairAmbientMap x.val ∈ universalContractionSubalgebra := by + have hcont : Continuous pairAmbientMap := + (pairAmbientMap.toAlgHom.toLinearMap.mkContinuous 1 (fun x => by + change ‖pairAmbientMap x‖ ≤ 1 * ‖x‖ + rw [one_mul] + exact NonUnitalStarAlgHom.norm_apply_le pairAmbientMap x)).continuous + have hs : fullGroupSubalgebra (FreeGroup Bool) ≤ + universalContractionSubalgebra.comap pairAmbientMap := by + apply closedStarSpan_le + · exact (closedStarSpan_closed _).preimage hcont + · rintro _ ⟨g,rfl⟩ + change pairAmbientMap (fullGroupOperator g) ∈ universalContractionSubalgebra + rw [pairAmbientMap_element] + exact (pairGroup universalContractionGenerator g : UniversalContraction).property + exact hs x.property + +def fullToUniversal : FullGroupAlgebra (FreeGroup Bool) →⋆ₐ[ℂ] UniversalContraction := + (pairAmbientMap.comp (fullGroupSubalgebra (FreeGroup Bool)).subtype).codRestrict + universalContractionSubalgebra pairAmbientMap_mem + +@[simp] lemma fullToUniversal_element (g : FreeGroup Bool) : + fullToUniversal (fullGroupElement g) = + (pairGroup universalContractionGenerator g : UniversalContraction) := + Subtype.ext (pairAmbientMap_element g) + +lemma fullToUniversal_evaluation (π : ContractionRepresentation) + (x : FullGroupAlgebra (FreeGroup Bool)) : + contractionEvaluation π (fullToUniversal x) = fullGroupEvaluation (pairRepresentation π) x := rfl + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupNorm.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..0922c384d45409797f2a0193dcb12906a7002aad --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversalGroupNorm.lean @@ -0,0 +1,70 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.GroupPolynomials +import OAI.Analysis.WeakInfiniteness.UniversalGroupMap + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +lemma fullGroupEvaluation_polynomial {G : Type*} [Group G] (π : GroupRepresentation G) + (c : G →₀ ℂ) : fullGroupEvaluation π (fullGroupPolynomial c) = + c.sum (fun g a => a • (π.group g : π.hilbert →L[ℂ] π.hilbert)) := by + simp only [fullGroupPolynomial, Finsupp.linearCombination_apply, Finsupp.sum, + map_sum, map_smul, fullGroupEvaluation_element] + +lemma finite_norm_le_fullToUniversal (c : FreeGroup Bool →₀ ℂ) + (V : Type) [NormedAddCommGroup V] [InnerProductSpace ℂ V] [FiniteDimensional ℂ V] + (ρ : FreeGroup Bool →* V ≃ₗᵢ[ℂ] V) : + ‖c.sum (fun g a => a • (ρ g : V →L[ℂ] V))‖ ≤ ‖fullToUniversal (fullGroupPolynomial c)‖ := by + classical + let : CompleteSpace V := FiniteDimensional.complete ℂ V + cases subsingleton_or_nontrivial V with + | inl h => + let := h + have hz : c.sum (fun g a => a • (ρ g : V →L[ℂ] V)) = 0 := Subsingleton.elim _ _ + rw [hz, norm_zero] + exact norm_nonneg _ + | inr h => + let := h + let uρ : FreeGroup Bool →* unitary (V →L[ℂ] V) := + Unitary.linearIsometryEquiv.symm.toMonoidHom.comp ρ + let S := uρ (FreeGroup.of true) + let T := uρ (FreeGroup.of false) + let π : ContractionRepresentation := + { hilbert := ⟨V⟩ + operator := logarithmContraction S T + norm_operator_le_one := norm_logarithmContraction_le S T } + have hpair : pairGroup π.operator = uρ := by + apply FreeGroup.ext_hom + intro b + rw [pairGroup_of] + change pairUnitary (logarithmContraction S T) b = uρ (FreeGroup.of b) + rw [pairUnitary_logarithmContraction] + cases b <;> rfl + have he : contractionEvaluation π (fullToUniversal (fullGroupPolynomial c)) = + c.sum (fun g a => a • (ρ g : V →L[ℂ] V)) := by + rw [fullToUniversal_evaluation,fullGroupEvaluation_polynomial] + apply Finsupp.sum_congr + intro g _ + change c g • (pairGroup π.operator g : V →L[ℂ] V) = c g • (ρ g : V →L[ℂ] V) + rw [hpair] + rfl + exact he ▸ NonUnitalStarAlgHom.norm_apply_le (contractionEvaluation π) + (fullToUniversal (fullGroupPolynomial c)) + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversalMapping.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversalMapping.lean new file mode 100644 index 0000000000000000000000000000000000000000..129192dede4d960d4b8a43ef52c9fc8a65c02a68 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversalMapping.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.PolynomialCompression +import OAI.Analysis.WeakInfiniteness.States + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +variable {A B : Type*} [CStarAlgebra A] [CStarAlgebra B] + +def algebraWord (x : A) : List Bool → A + | [] => 1 + | i :: w => (if i then x else star x) * algebraWord x w + +def algebraPolynomial (x : A) (c : List Bool →₀ ℂ) : A := + c.sum fun w a => a • algebraWord x w + +lemma map_algebraWord (φ : A →⋆ₐ[ℂ] B) (x : A) (w : List Bool) : + φ (algebraWord x w) = algebraWord (φ x) w := by + induction w with + | nil => exact map_one φ + | cons i w ih => cases i <;> simp [algebraWord, ih, map_star] + +lemma map_algebraPolynomial (φ : A →⋆ₐ[ℂ] B) (x : A) (c : List Bool →₀ ℂ) : + φ (algebraPolynomial x c) = algebraPolynomial (φ x) c := by + simp [algebraPolynomial, Finsupp.sum, map_algebraWord] + +lemma algebraWord_operator {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (T : H →L[ℂ] H) (w : List Bool) : + algebraWord T w = wordEval (operatorLetters T) w := by + induction w with + | nil => rfl + | cons i w ih => cases i <;> simp [algebraWord, ih, wordEval, operatorLetters, + ContinuousLinearMap.mul_def] + +lemma algebraWord_universal (w : List Bool) : + algebraWord universalContractionGenerator w = universalWord w := by + induction w with + | nil => rfl + | cons i w ih => simp only [algebraWord, universalWord, ih] + +lemma algebraPolynomial_universal (c : List Bool →₀ ℂ) : + algebraPolynomial universalContractionGenerator c = universalPolynomial c.support c := by + simp only [algebraPolynomial, Finsupp.sum, algebraWord_universal, universalPolynomial] + +lemma algebraPolynomial_operator {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (T : H →L[ℂ] H) (c : List Bool →₀ ℂ) : + algebraPolynomial T c = polynomialOperator c.support c T := by + simp only [algebraPolynomial, Finsupp.sum, algebraWord_operator, polynomialOperator] + +lemma norm_finitePolynomial_le_universal {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [FiniteDimensional ℂ H] (T : H →L[ℂ] H) + (hT : ‖T‖ ≤ 1) (c : List Bool →₀ ℂ) : + ‖algebraPolynomial T c‖ ≤ ‖algebraPolynomial universalContractionGenerator c‖ := by + by_cases hn : Nontrivial H + · let := hn + let e := (stdOrthonormalBasis ℂ H).repr + let : Nontrivial (EuclideanSpace ℂ (Fin (Module.finrank ℂ H))) := e.symm.toEquiv.nontrivial + let D := e.conjStarAlgEquiv T + have hD : ‖D‖ ≤ 1 := (NonUnitalStarAlgHom.norm_apply_le e.conjStarAlgEquiv T).trans hT + let π : ContractionRepresentation := + { hilbert := { Carrier := EuclideanSpace ℂ (Fin (Module.finrank ℂ H)) } + operator := D + norm_operator_le_one := hD } + have he := map_algebraPolynomial e.conjStarAlgEquiv.toStarAlgHom T c + calc + ‖algebraPolynomial T c‖ = ‖algebraPolynomial D c‖ := by + change ‖algebraPolynomial T c‖ = ‖algebraPolynomial (e.conjStarAlgEquiv.toStarAlgHom T) c‖ + rw [← he] + exact (StarAlgEquiv.norm_map e.conjStarAlgEquiv _).symm + _ = ‖contractionEvaluation π (algebraPolynomial universalContractionGenerator c)‖ := by + rw [map_algebraPolynomial]; rfl + _ ≤ _ := NonUnitalStarAlgHom.norm_apply_le (contractionEvaluation π) _ + · let := not_nontrivial_iff_subsingleton.mp hn + have hz : algebraPolynomial T c = 0 := Subsingleton.elim _ _ + rw [hz, norm_zero] + exact norm_nonneg _ + +lemma norm_operatorPolynomial_le_universal {H : Type*} [NormedAddCommGroup H] + [InnerProductSpace ℂ H] [CompleteSpace H] (T : H →L[ℂ] H) + (hT : ‖T‖ ≤ 1) (c : List Bool →₀ ℂ) : + ‖algebraPolynomial T c‖ ≤ ‖algebraPolynomial universalContractionGenerator c‖ := by + rw [algebraPolynomial_operator] + apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _) + intro ξ + let K := wordSpace (operatorLetters T) (fun _ : Unit => ξ) (c.support.sup List.length) + let ξ₀ : K := ⟨ξ, testVector_mem_wordSpace _ _ _ ()⟩ + have he : (polynomialOperator c.support c (compress K T) ξ₀ : H) = + polynomialOperator c.support c T ξ := polynomialOperator_compression_exact _ _ _ _ + rw [← he] + have hb := norm_finitePolynomial_le_universal (compress K T) ((norm_compress_le _ _).trans hT) c + rw [algebraPolynomial_operator] at hb + exact (ContinuousLinearMap.le_opNorm _ ξ₀).trans + (mul_le_mul_of_nonneg_right hb (norm_nonneg _)) + +lemma norm_algebraPolynomial_le_universal [PartialOrder A] [StarOrderedRing A] + (x : A) (hx : ‖x‖ ≤ 1) (c : List Bool →₀ ℂ) : + ‖algebraPolynomial x c‖ ≤ ‖algebraPolynomial universalContractionGenerator c‖ := by + by_cases hn : Nontrivial A + · let := hn + obtain ⟨f, _, hf⟩ := exists_norming_gns (algebraPolynomial x c) + rw [← hf, map_algebraPolynomial] + exact norm_operatorPolynomial_le_universal _ + ((NonUnitalStarAlgHom.norm_apply_le f.gnsNonUnitalStarAlgHom x).trans hx) c + · let := not_nontrivial_iff_subsingleton.mp hn + rw [Subsingleton.elim (algebraPolynomial x c) 0, norm_zero] + exact norm_nonneg _ + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniverseCoupling.lean b/lean/OAI/Analysis/WeakInfiniteness/UniverseCoupling.lean new file mode 100644 index 0000000000000000000000000000000000000000..025099aec792c0a3d2ff471b16c3855c7dd825a7 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniverseCoupling.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.FiniteCoupling +import OAI.Analysis.WeakInfiniteness.UniverseSelfadjoint + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace ComplexOrder + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_finite_coupling_of_gap_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {ι : Type*} (F : ι → OrthogonalPerturbationData A n) : + ∀ s : Finset ι, (∀ i ∈ s, (F i).p ∈ D ∧ (F i).q ∈ D) → + ∃ U : A, U ∈ D ∧ IsSelfAdjoint U ∧ ∃ ε : ℝ, 0 < ε ∧ + ∀ i ∈ s, ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + (F i).α ≤ ‖π (F i).c‖ → ε ≤ ‖π ((F i).p*U*(F i).q)‖ := by + classical + intro s + induction s using Finset.induction_on with + | empty => + intro _ + refine ⟨0,D.zero_mem,IsSelfAdjoint.zero A,1,zero_lt_one,?_⟩ + simp + | @insert i s hi ih => + intro hmem + obtain ⟨U,hUD,hUsa,ε,hε,hU⟩ := ih (fun j hj => hmem j (Finset.mem_insert_of_mem hj)) + let δ := ε/4 + have hδ : 0 < δ := by dsimp [δ]; positivity + have hph : star (F i).p*(F i).p*(F i).h=(F i).h := by + rw [(F i).nonneg_p.star_eq,mul_assoc,(F i).support_h,(F i).support_h] + have hqk : (F i).q*star (F i).q*(F i).k=(F i).k := by + rw [(F i).nonneg_q.star_eq,mul_assoc,(F i).support_k,(F i).support_k] + obtain ⟨y,hyn,hysa,⟨z,hz⟩,hnew⟩ := selfadjoint_uniform_perturbation_of_gap_any + hσ.le hσγ hgap hA hn hpi (F i).p (F i).q (F i).h (F i).k (F i).c + (F i).norm_p (F i).norm_q (F i).nonneg_p (F i).nonneg_q (F i).orthogonal + (F i).nonneg_h (F i).nonneg_k (F i).nonneg_c hph hqk + (F i).compare_h (F i).compare_k ((F i).p*U*(F i).q) hδ (F i).pos_α + have hyD : y ∈ D := by + rw [hz] + exact hD.symmetrized_corner_mem (hmem i (Finset.mem_insert_self ..)).1 + (hmem i (Finset.mem_insert_self ..)).2 z + let U' := U+(δ : ℂ) • y + have hU'D : U' ∈ D := D.add_mem hUD (D.smul_mem _ hyD) + have hU'sa : IsSelfAdjoint U' := by + show star (U+(δ : ℂ) • y)=U+(δ : ℂ) • y + simp only [star_add,star_smul,hUsa.star_eq,hysa.star_eq,Complex.star_def,Complex.conj_ofReal] + refine ⟨U',hU'D,hU'sa,min (ε/2) (σ*δ),lt_min (by positivity) (mul_pos hσ hδ),?_⟩ + intro j hj H π hπc + rcases Finset.mem_insert.mp hj with rfl | hj + · apply (min_le_right _ _).trans + dsimp only [U'] + rw [corner_add_smul] + exact hnew H π hπc + · have hold := hU j hj H π hπc + have herr : ‖π ((δ : ℂ) • ((F j).p*y*(F j).q))‖ ≤ δ := by + calc + _ ≤ ‖(δ : ℂ) • ((F j).p*y*(F j).q)‖ := NonUnitalStarAlgHom.norm_apply_le π _ + _ = δ*‖(F j).p*y*(F j).q‖ := by + rw [norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hδ] + _ ≤ δ*1 := mul_le_mul_of_nonneg_left + (norm_corner_le_one _ _ _ (F j).norm_p (F j).norm_q hyn) hδ.le + _ = δ := mul_one _ + have hdiff : π ((F j).p*U*(F j).q)-π ((F j).p*U'*(F j).q)= + -π ((δ : ℂ) • ((F j).p*y*(F j).q)) := by + dsimp only [U'] + rw [corner_add_smul,map_add] + abel + have ht := norm_le_norm_add_norm_sub' (π ((F j).p*U*(F j).q)) + (π ((F j).p*U'*(F j).q)) + rw [hdiff,norm_neg] at ht + apply (min_le_left _ _).trans + dsimp only [δ] at herr + linarith + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniverseIndividualInfiniteness.lean b/lean/OAI/Analysis/WeakInfiniteness/UniverseIndividualInfiniteness.lean new file mode 100644 index 0000000000000000000000000000000000000000..663d010a1528411903ec391d1d879a678bdb7c4c --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniverseIndividualInfiniteness.lean @@ -0,0 +1,91 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.IndividualInfiniteness +import OAI.Analysis.WeakInfiniteness.UniverseSquareZero + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace ComplexOrder + +universe u + +section UniverseOne + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +lemma exists_binary_splitting_over_norm_slice_any + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + {a : A} (ha : 0 ≤ a) {r : ℝ} (hr : 0 < r) (j : ℕ) : + ∃ z : A,0 ≤ z ∧ CuntzSubequiv (diagonalCopies (2^j) z) (diagonalCopies 1 a) ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)),r ≤ ‖π a‖ → π z ≠ 0 := by + induction j with + | zero => + refine ⟨a,ha,cuntzSubequiv_refl _,?_⟩ + intro H π hπ hnz + rw [hnz,norm_zero] at hπ + linarith + | succ j ih => + obtain ⟨z,hz,hza,hzn⟩ := ih + have hlocal : NonzeroOnNormSlice (hereditarySubalgebra z hz.isSelfAdjoint) a r := by + intro H π _ hπa + exact ⟨z,self_mem_hereditary z hz,hz,hzn H π hπa⟩ + obtain ⟨x,hx,hxx,hxn⟩ := exists_square_zero_on_norm_slice_any hA hn hpi + (hereditarySubalgebra z hz.isSelfAdjoint) (hereditarySubalgebra_inner z hz.isSelfAdjoint) ha hr hlocal + refine ⟨star x*x,star_mul_self_nonneg x, + ((square_zero_two_copies hz hx hxx).power_two_binary j).trans hza,?_⟩ + intro H π hπa + rw [map_mul,map_star] + exact (CStarRing.star_mul_self_eq_zero_iff (π x)).not.mpr (hxn H π hπa) + +theorem exact_weaklyPurelyInfinite_individuallyProperlyInfinite_any + (hA : Exact A) (hW : WeaklyPurelyInfinite A) {a : A} (ha : 0 ≤ a) : + ProperlyInfinite (diagonalCopies 1 a) := by + obtain ⟨n,hn,hpi⟩ := hW + apply properlyInfinite_of_cuts ha + intro r hr + obtain ⟨z,hz,hza,hzn⟩ := exists_binary_splitting_over_norm_slice_any hA hn hpi ha hr n + have hznn : CuntzSubequiv (diagonalCopies n z) (diagonalCopies 1 a) := + (diagonalCopies_cuntzSubequiv z (Nat.lt_two_pow_self (n := n)).le).trans hza + have hcut : positiveCut r a ∈ generatedClosedIdeal z hz.isSelfAdjoint := by + apply mem_closed_ideal_of_irreducible_test _ + (NonUnitalStarSubalgebra.isClosed_topologicalClosure _) + (fun x hx d => generatedClosedIdeal_mul_left z d hz.isSelfAdjoint hx) + (fun x hx d => generatedClosedIdeal_mul_right z d hz.isSelfAdjoint hx) + (positiveCut_nonneg r a) + intro H π _ hπI + have hpiz : π z=0 := hπI z (self_mem_generatedClosedIdeal z hz) + have hnorm : ‖π a‖ ≤ r := (lt_of_not_ge (fun h => hzn H π h hpiz)).le + have he := π.map_cfcₙ (fun t : ℝ => max (t-r) 0) a (by fun_prop) + (by simpa using max_eq_right (neg_nonpos.mpr hr.le)) (by fun_prop) + ha.isSelfAdjoint (map_nonneg π ha).isSelfAdjoint + change π (positiveCut r a)=positiveCut r (π a) at he + rw [he] + exact positiveCut_eq_zero_of_norm_le _ hr.le hnorm + exact (generatedClosedIdeal_copies_cuntz hz (positiveCut_nonneg r a) hn + (weak_amplification_all hpi hz) hcut 2).trans hznn + +end UniverseOne + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniversePerturbation.lean b/lean/OAI/Analysis/WeakInfiniteness/UniversePerturbation.lean new file mode 100644 index 0000000000000000000000000000000000000000..832e9f407200f8316651525846e1ef86cb54bff2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniversePerturbation.lean @@ -0,0 +1,154 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CrossUniverseSupportedSeparation +import OAI.Analysis.WeakInfiniteness.CrossUniverseUniformGap +import OAI.Analysis.WeakInfiniteness.PerturbationRows + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra ComplexOrder + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +local instance matrixRealModuleUniform_any {m : Type*} [Fintype m] : + Module ℝ (CStarMatrix m m A) := Module.complexToReal _ + +theorem uniform_perturbation_of_gap_any + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (p q h k c : A) (hp : ‖p‖ ≤ 1) (hq : ‖q‖ ≤ 1) + (hh : 0 ≤ h) (hk : 0 ≤ k) (hc : 0 ≤ c) + (hph : star p*p*h=h) (hqk : q*star q*k=k) + (hch : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h)) + (hck : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k)) + (T : A) {η α : ℝ} (hη : 0 < η) (hα : 0 < α) : + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + obtain ⟨R,hR,hRh,hRn⟩ := exists_fixed_comparison_row c h hc hh hch hα + obtain ⟨S,hS,hSk,hSn⟩ := exists_fixed_comparison_row c k hc hk hck hα + obtain ⟨U,hU,_,_⟩ := exists_fixed_comparison_row c h hc hh hch (α := α/4) (by positivity) + let E := diagonalCopies n (cfcₙ (spectralRamp (α/4)) c) + let e := diagonalCopies n (cfcₙ (spectralRamp (α/16)) c) + have he : IsSelfAdjoint e := by + have hcself : IsSelfAdjoint (cfcₙ (spectralRamp (α/16)) c) := cfcₙ_predicate _ _ + exact hcself.map (diagonalHom n) + have hUe : U.conjTranspose*U=e := by + have hd : α/4/4=α/16 := by ring + simpa only [hd] using hU + let P := diagonalCopies 1 p + let Q := diagonalCopies 1 q + let X := diagonalCopies 1 T + let L := R.conjTranspose*star P + let K := star Q*S + have hPR : star P*P*R=R := by + change (star (diagonalHom 1 p)*diagonalHom 1 p)*R=R + rw [← map_star,← map_mul] + exact fixed_row_partial_isometry p h hh hph R hRh + have hQS : Q*star Q*S=S := by + have hhq : star (star q)*star q*k=k := by simpa only [star_star] using hqk + change diagonalHom 1 q*star (diagonalHom 1 q)*S=S + rw [← map_star,← map_mul] + rw [show diagonalHom 1 (q*star q)=diagonalCopies 1 (q*star q) from rfl] + simpa only [star_star] using fixed_row_partial_isometry (star q) k hk hhq S hSk + have hLPR : L*P*R=E := by + dsimp only [L] + rw [rectangular_mul_assoc, rectangular_mul_assoc, ← rectangular_mul_assoc (star P), hPR] + exact hR + have hSQK : S.conjTranspose*Q*K=E := by + dsimp only [K] + rw [rectangular_mul_assoc, ← rectangular_mul_assoc Q, hQS] + exact hS + have hLn : ‖L‖ ≤ 1 := by + calc + ‖L‖ ≤ ‖R.conjTranspose‖*‖star P‖ := rectangular_norm_mul_le _ _ + _ = ‖R‖*‖P‖ := by rw [rectangular_norm_conjTranspose,norm_star] + _ ≤ 1*1 := by gcongr; exact (norm_diagonalCopies_le 1 p).trans hp + _ = 1 := one_mul _ + have hKn : ‖K‖ ≤ 1 := by + calc + ‖K‖ ≤ ‖star Q‖*‖S‖ := rectangular_norm_mul_le _ _ + _ = ‖Q‖*‖S‖ := by rw [norm_star] + _ ≤ 1*1 := by gcongr; exact (norm_diagonalCopies_le 1 q).trans hq + _ = 1 := one_mul _ + let Vval := (η : ℂ)⁻¹ • (R.conjTranspose*(star P*X*star Q)*S) + let V : supportedAlgebra e he := ⟨Vval,supported_testing_element c hα R S hR hS _ _⟩ + obtain ⟨w,hwn,hEw,hsep⟩ := exists_separated_supported_model_any hσ hσγ hgap hA hn hpi c hc hα e he U hUe V + let y := matrixSingletonHom (-(R*w*S.conjTranspose)) + have hyn : ‖y‖ ≤ 1 := norm_row_test_le R S w hRn hSn hwn + have hy : diagonalCopies 1 y= -(R*w*S.conjTranspose) := diagonal_singleton _ + have hcompy : L*(P*(diagonalCopies 1 y)*Q)*K= -w := by + rw [hy] + exact compress_row_test L K R S P Q E w hLPR hSQK hEw + have hcη : (η : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (ne_of_gt hη) + have hηV : (η : ℂ) • Vval=L*X*K := by + dsimp only [Vval] + rw [smul_smul, mul_inv_cancel₀ hcη, one_smul] + dsimp only [L,K] + simp only [rectangular_mul_assoc] + have hcomp : L*diagonalCopies 1 (T+(η : ℂ) • (p*y*q))*K=(η : ℂ) • (Vval-w) := by + change L*(diagonalHom 1 (T+(η : ℂ) • (p*y*q)))*K= _ + rw [map_add,map_smul,map_mul,map_mul] + change L*(X+(η : ℂ) • (P*diagonalCopies 1 y*Q))*K= _ + rw [rectangular_mul_add_support,rectangular_add_mul_support, + rectangular_mul_smul_support,rectangular_smul_mul_support,hcompy, + smul_sub,hηV,smul_neg,sub_eq_add_neg] + refine ⟨y,hyn,?_⟩ + intro H π hπc + have hs := hsep H π hπc + have hb := norm_representation_compression_le π L K + (diagonalCopies 1 (T+(η : ℂ) • (p*y*q))) hLn hKn + rw [hcomp,map_smul,norm_smul,Complex.norm_real,Real.norm_eq_abs,abs_of_pos hη, + singleton_diagonal] at hb + exact (by nlinarith : σ*η ≤ η*‖matrixRepresentation π (Fin n) (Vval-w)‖).trans hb + +theorem exists_uniform_perturbation_constant_any : + ∃ σ : ℝ, 0 < σ ∧ σ < 1 ∧ + ∀ (A : Type u) [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A], + Exact A → ∀ n : ℕ, 1 ≤ n → + (∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) → + ∀ p q h k c : A, ‖p‖ ≤ 1 → ‖q‖ ≤ 1 → 0 ≤ h → 0 ≤ k → 0 ≤ c → + star p*p*h=h → q*star q*k=k → + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h) → + CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k) → + ∀ (T : A) (η α : ℝ), 0 < η → 0 < α → + ∃ y : A, ‖y‖ ≤ 1 ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + obtain ⟨γ,hγ,hgap⟩ := exists_uniform_gap_any + let σ := min (1/2) (γ/3) + have hσ : 0 < σ := lt_min (by norm_num) (by positivity) + have hσ1 : σ < 1 := (min_le_left _ _).trans_lt (by norm_num) + have hσγ : 2*σ ≤ γ := by have := min_le_right (1/2 : ℝ) (γ/3); dsimp [σ]; linarith + refine ⟨σ,hσ,hσ1,?_⟩ + intro A _ _ _ hA n hn hpi p q h k c hp hq hh hk hc hph hqk hch hck T η α hη hα + exact uniform_perturbation_of_gap_any hσ.le hσγ hgap hA hn hpi p q h k c hp hq + hh hk hc hph hqk hch hck T hη hα + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniverseSelfadjoint.lean b/lean/OAI/Analysis/WeakInfiniteness/UniverseSelfadjoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6a6dac87c9cf283e93c961d0ef914ab607853b6 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniverseSelfadjoint.lean @@ -0,0 +1,74 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.OrthogonalPerturbation +import OAI.Analysis.WeakInfiniteness.UniversePerturbation + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped CStarAlgebra Topology InnerProductSpace ComplexOrder + +universe u + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem selfadjoint_uniform_perturbation_of_gap_any + {γ σ : ℝ} (hσ : 0 ≤ σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A, 0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (p q h k c : A) (hpn : ‖p‖ ≤ 1) (hqn : ‖q‖ ≤ 1) + (hp : 0 ≤ p) (hq : 0 ≤ q) (hpq : p*q=0) + (hh : 0 ≤ h) (hk : 0 ≤ k) (hc : 0 ≤ c) + (hph : star p*p*h=h) (hqk : q*star q*k=k) + (hch : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 h)) + (hck : CuntzSubequiv (diagonalCopies n c) (diagonalCopies 1 k)) + (T : A) {η α : ℝ} (hη : 0 < η) (hα : 0 < α) : + ∃ y : A, ‖y‖ ≤ 1 ∧ IsSelfAdjoint y ∧ + (∃ z : A, y=p*z*q+star (p*z*q)) ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), + α ≤ ‖π c‖ → σ*η ≤ ‖π (T+(η : ℂ) • (p*y*q))‖ := by + have hpp : p*p*h=h := by simpa only [hp.star_eq] using hph + have hqq : q*q*k=k := by simpa only [hq.star_eq] using hqk + have hp4 : star (p*p)*(p*p)*h=h := by + rw [star_mul,hp.star_eq] + calc + (p*p)*(p*p)*h=(p*p)*(p*p*h) := by noncomm_ring + _ = h := by rw [hpp,hpp] + have hq4 : (q*q)*star (q*q)*k=k := by + rw [star_mul,hq.star_eq] + calc + (q*q)*(q*q)*k=(q*q)*(q*q*k) := by noncomm_ring + _ = k := by rw [hqq,hqq] + have hppn : ‖p*p‖ ≤ 1 := (norm_mul_le _ _).trans (by nlinarith [norm_nonneg p]) + have hqqn : ‖q*q‖ ≤ 1 := (norm_mul_le _ _).trans (by nlinarith [norm_nonneg q]) + obtain ⟨z,hzn,hz⟩ := uniform_perturbation_of_gap_any hσ hσγ hgap hA hn hpi + (p*p) (q*q) h k c hppn hqqn hh hk hc hp4 hq4 hch hck T hη hα + have hy := orthogonal_selfadjoint_test p q z hp hq hpq hpn hqn hzn + refine ⟨p*z*q+star (p*z*q),hy.1,isSelfAdjoint_add_star _,⟨z,rfl⟩,?_⟩ + intro H π hπc + rw [hy.2] + exact hz H π hπc + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/UniverseSquareZero.lean b/lean/OAI/Analysis/WeakInfiniteness/UniverseSquareZero.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e54b88934d405d01f3faa8c37be6dab0ef4b8ed --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/UniverseSquareZero.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.DetectedSigns + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +universe u + +noncomputable section + +open scoped CStarAlgebra Topology + +variable {A : Type u} [NonUnitalCStarAlgebra A] [PartialOrder A] [StarOrderedRing A] + +theorem exists_square_zero_on_norm_slice_of_gap_any + {γ σ : ℝ} (hσ : 0 < σ) (hσγ : 2*σ ≤ γ) + (hgap : ∀ (B : Type u) [CStarAlgebra B] (v : B), ‖v‖ ≤ 1 → Exact B → + ¬ FiniteContractionModelsAny B v γ) + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ x ∈ D,x*x=0 ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → π x ≠ 0 := by + obtain ⟨h,hhD,hh,hhn⟩ := exists_detected_both_signs_on_norm_slice_any hσ hσγ hgap hA hn hpi D hD hb hα hlocal + let : IsClosed (D : Set A) := hD.1 + have hpD : h⁺ ∈ D := cfcₙ_mem (·⁺ : ℝ → ℝ) hhD + have hqD : h⁻ ∈ D := cfcₙ_mem (·⁻ : ℝ → ℝ) hhD + let Q : A → A → Prop := fun p q => + p ∈ hereditarySubalgebra h⁺ (CFC.posPart_nonneg h).isSelfAdjoint ∧ + q ∈ hereditarySubalgebra h⁻ (CFC.negPart_nonneg h).isSelfAdjoint + obtain ⟨F,z,hzD,_,hzc⟩ := exists_selected_finite_coupling_of_gap_any hσ hσγ hgap hA hn hpi + D hD b hb hα Q (by + intro H π hπ hπb + obtain ⟨hpn,hqn⟩ := hhn H π hπb + obtain ⟨i,hip,hiq,hin⟩ := exists_core_perturbationData hn hpi hπ + (CFC.posPart_nonneg h) (CFC.negPart_nonneg h) (CFC.posPart_mul_negPart h) hpn hqn + exact ⟨i,hereditarySubalgebra_le_of_mem hD (CFC.posPart_nonneg h).isSelfAdjoint hpD hip, + hereditarySubalgebra_le_of_mem hD (CFC.negPart_nonneg h).isSelfAdjoint hqD hiq,⟨hip,hiq⟩,hin⟩) + refine ⟨h⁺*z*h⁻,hD.2 h⁺ hpD h⁻ hqD z,?_,?_⟩ + · calc + (h⁺*z*h⁻)*(h⁺*z*h⁻)=(h⁺*z)*(h⁻*h⁺)*(z*h⁻) := by noncomm_ring + _ = 0 := by rw [CFC.negPart_mul_posPart,mul_zero,zero_mul] + · intro H π hπb hnz + obtain ⟨i,_,hin⟩ := hzc H π hπb + exact hin (image_hereditary_corner_zero π (CFC.posPart_nonneg h).isSelfAdjoint + (CFC.negPart_nonneg h).isSelfAdjoint i.property.2.2.1 i.property.2.2.2 hnz) + +theorem exists_square_zero_on_norm_slice_any + (hA : Exact A) {n : ℕ} (hn : 1 ≤ n) + (hpi : ∀ a : A,0 ≤ a → a ≠ 0 → ProperlyInfinite (diagonalCopies n a)) + (D : NonUnitalStarSubalgebra ℂ A) (hD : IsClosedInner D) + {b : A} (hb : 0 ≤ b) {α : ℝ} (hα : 0 < α) + (hlocal : NonzeroOnNormSlice D b α) : + ∃ x ∈ D,x*x=0 ∧ + ∀ (H : ComplexHilbert.{u}) (π : A →⋆ₙₐ[ℂ] (H →L[ℂ] H)), α ≤ ‖π b‖ → π x ≠ 0 := by + obtain ⟨γ,hγ,hgap⟩ := exists_uniform_gap_any + exact exists_square_zero_on_norm_slice_of_gap_any (σ := γ/2) (by positivity) + (by linarith) hgap hA hn hpi D hD hb hα hlocal + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/VectorStates.lean b/lean/OAI/Analysis/WeakInfiniteness/VectorStates.lean new file mode 100644 index 0000000000000000000000000000000000000000..7121f2e66d6fa509f625c23b12a1a3889fa0cbd2 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/VectorStates.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.CStarClosedRange +import OAI.Analysis.WeakInfiniteness.PureStates + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +open scoped Topology ComplexOrder InnerProductSpace + +section VectorStates + +variable {A H : Type*} [CStarAlgebra A] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] + +def representationVectorFunctional (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : + selfAdjoint A →L[ℝ] ℝ where + toFun b := (inner ℂ ξ (π (b : A) ξ)).re + map_add' b c := by simp + map_smul' r b := by + change (inner ℂ ξ (π (r • (b : A)) ξ)).re=r • (inner ℂ ξ (π (b : A) ξ)).re + rw [map_real_smul π (starHom_continuous π)] + simp + cont := by + have hπ : Continuous π := starHom_continuous π + fun_prop + +lemma representationVectorFunctional_norm_le (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : + ‖representationVectorFunctional π ξ‖ ≤ ‖ξ‖^2 := by + apply (representationVectorFunctional π ξ).opNorm_le_bound (sq_nonneg _) + intro b + change ‖(inner ℂ ξ (π (b : A) ξ)).re‖ ≤ ‖ξ‖^2*‖b‖ + calc + _ ≤ ‖inner ℂ ξ (π (b : A) ξ)‖ := by simpa only [Real.norm_eq_abs] using Complex.abs_re_le_norm (inner ℂ ξ (π (b : A) ξ)) + _ ≤ ‖ξ‖*‖π (b : A) ξ‖ := norm_inner_le_norm _ _ + _ ≤ ‖ξ‖*(‖π (b : A)‖*‖ξ‖) := by gcongr; exact ContinuousLinearMap.le_opNorm _ _ + _ ≤ ‖ξ‖*(‖(b : A)‖*‖ξ‖) := by gcongr; exact NonUnitalStarAlgHom.norm_apply_le π.toNonUnitalStarAlgHom _ + _ = ‖ξ‖^2*‖b‖ := by change ‖ξ‖*(‖b‖*‖ξ‖)=_; ring + +lemma representationVectorFunctional_one (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (ξ : H) : + representationVectorFunctional π ξ 1=‖ξ‖^2 := by + change (inner ℂ ξ (π 1 ξ)).re=_ + rw [map_one,one_apply_eq_self] + exact inner_self_eq_norm_sq (𝕜 := ℂ) ξ + +variable [PartialOrder A] [StarOrderedRing A] + +lemma representationVectorFunctional_square (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) (ξ : H) (a : A) : + representationVectorFunctional π ξ ⟨star a*a,(star_mul_self_nonneg a).isSelfAdjoint⟩= + ‖π a ξ‖^2 := by + change (inner ℂ ξ (π (star a*a) ξ)).re=_ + rw [map_mul,map_star] + change (inner ℂ ξ ((π a).adjoint (π a ξ))).re=_ + rw [ContinuousLinearMap.adjoint_inner_right] + exact inner_self_eq_norm_sq (𝕜 := ℂ) _ + +omit [PartialOrder A] [StarOrderedRing A] in +lemma normalized_vector_mem_realStateSpace (π : A →⋆ₐ[ℂ] (H →L[ℂ] H)) {ξ : H} (hξ : ξ ≠ 0) : + (StrongDual.toWeakDual ((‖ξ‖^2)⁻¹ • representationVectorFunctional π ξ)) ∈ realStateSpace A := by + have ht : 0 < ‖ξ‖^2 := sq_pos_of_pos (norm_pos_iff.mpr hξ) + constructor + · change ‖(‖ξ‖^2)⁻¹ • representationVectorFunctional π ξ‖ ≤ 1 + calc + _ ≤ ‖(‖ξ‖^2)⁻¹‖*‖representationVectorFunctional π ξ‖ := ContinuousLinearMap.opNorm_smul_le _ _ + _ = (‖ξ‖^2)⁻¹*‖representationVectorFunctional π ξ‖ := by + rw [Real.norm_eq_abs,abs_of_pos (inv_pos.mpr ht)] + _ ≤ (‖ξ‖^2)⁻¹*(‖ξ‖^2) := mul_le_mul_of_nonneg_left + (representationVectorFunctional_norm_le π ξ) (le_of_lt (inv_pos.mpr ht)) + _ = 1 := inv_mul_cancel₀ ht.ne' + · change (‖ξ‖^2)⁻¹*representationVectorFunctional π ξ 1=1 + rw [representationVectorFunctional_one,inv_mul_cancel₀ ht.ne'] + +lemma gns_vectorFunctional_eq (f : WeakDual ℝ (selfAdjoint A)) (hf : f ∈ realStateSpace A) : + StrongDual.toWeakDual (representationVectorFunctional + (realStateComplexification f hf).gnsStarAlgHom + (gnsCyclicVector (realStateComplexification f hf)))=f := by + apply DFunLike.ext + intro b + change (inner ℂ (gnsCyclicVector (realStateComplexification f hf)) + ((realStateComplexification f hf).gnsStarAlgHom (b : A) + (gnsCyclicVector (realStateComplexification f hf)))).re=f b + change (inner ℂ (((realStateComplexification f hf).toPreGNS 1) : + (realStateComplexification f hf).GNS) + ((realStateComplexification f hf).gnsNonUnitalStarAlgHom (b : A) + ((realStateComplexification f hf).toPreGNS 1))).re=f b + rw [PositiveLinearMap.gnsNonUnitalStarAlgHom_apply_coe,UniformSpace.Completion.inner_coe] + change ((realStateComplexification f hf) (star (1 : A)*((b : A)*1))).re=f b + rw [star_one,one_mul,mul_one,realStateComplexification_apply,Complex.ofReal_re] + +end VectorStates + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/WordCompression.lean b/lean/OAI/Analysis/WeakInfiniteness/WordCompression.lean new file mode 100644 index 0000000000000000000000000000000000000000..541690f94584398c2d7f33bfd14cfd1dbdef3f26 --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/WordCompression.lean @@ -0,0 +1,299 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.TensorCompression + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint + +namespace WeakPureInfiniteness + +section Words + +variable {ι E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + +def wordEval (T : ι → E →L[ℂ] E) : List ι → E →L[ℂ] E + | [] => ContinuousLinearMap.id ℂ E + | i :: w => (T i).comp (wordEval T w) + +lemma norm_wordEval_le_one (T : ι → E →L[ℂ] E) (hT : ∀ i, ‖T i‖ ≤ 1) + (w : List ι) : ‖wordEval T w‖ ≤ 1 := by + induction w with + | nil => exact ContinuousLinearMap.norm_id_le + | cons i w ih => + calc + ‖wordEval T (i :: w)‖ ≤ ‖T i‖ * ‖wordEval T w‖ := + ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ 1 * 1 := mul_le_mul (hT i) ih (norm_nonneg _) (by positivity) + _ = 1 := one_mul _ + +lemma norm_wordEval_intertwining_le + (T : ι → F →L[ℂ] F) (D : ι → E →L[ℂ] E) (J : E →L[ℂ] F) + (hT : ∀ i, ‖T i‖ ≤ 1) (hD : ∀ i, ‖D i‖ ≤ 1) + {θ : ℝ} (hθ : 0 ≤ θ) + (hJ : ∀ i, ‖(T i).comp J - J.comp (D i)‖ ≤ θ) + (w : List ι) : + ‖(wordEval T w).comp J - J.comp (wordEval D w)‖ ≤ w.length * θ := by + induction w with + | nil => simp [wordEval] + | cons i w ih => + have hid : + (wordEval T (i :: w)).comp J - J.comp (wordEval D (i :: w)) = + (T i).comp ((wordEval T w).comp J - J.comp (wordEval D w)) + + ((T i).comp J - J.comp (D i)).comp (wordEval D w) := by + simp only [wordEval, ContinuousLinearMap.comp_sub, ContinuousLinearMap.sub_comp, + ContinuousLinearMap.comp_assoc] + abel + rw [hid] + calc + _ ≤ ‖(T i).comp ((wordEval T w).comp J - J.comp (wordEval D w))‖ + + ‖((T i).comp J - J.comp (D i)).comp (wordEval D w)‖ := norm_add_le _ _ + _ ≤ ‖T i‖ * ‖(wordEval T w).comp J - J.comp (wordEval D w)‖ + + ‖(T i).comp J - J.comp (D i)‖ * ‖wordEval D w‖ := by + exact add_le_add (ContinuousLinearMap.opNorm_comp_le _ _) + (ContinuousLinearMap.opNorm_comp_le _ _) + _ ≤ 1 * (w.length * θ) + θ * 1 := by + apply add_le_add + · exact mul_le_mul (hT i) ih (norm_nonneg _) (by positivity) + · exact mul_le_mul (hJ i) (norm_wordEval_le_one D hD w) (norm_nonneg _) hθ + _ = (i :: w).length * θ := by simp [Nat.cast_add, add_mul] + +end Words + +section FiniteCompression + +variable {ι S H : Type*} [Finite ι] [Finite S] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +def wordSpace (T : ι → H →L[ℂ] H) (ξ : S → H) : ℕ → Submodule ℂ H + | 0 => Submodule.span ℂ (Set.range ξ) + | m + 1 => wordSpace T ξ m ⊔ ⨆ i, (wordSpace T ξ m).map (T i).toLinearMap + +instance wordSpace_finiteDimensional (T : ι → H →L[ℂ] H) (ξ : S → H) (m : ℕ) : + FiniteDimensional ℂ (wordSpace T ξ m) := by + induction m with + | zero => exact FiniteDimensional.span_of_finite ℂ (Set.finite_range ξ) + | succ m ih => + change FiniteDimensional ℂ + ↥(wordSpace T ξ m ⊔ ⨆ i, (wordSpace T ξ m).map (T i).toLinearMap) + let := ih + infer_instance + +omit [Finite ι] [Finite S] in +lemma wordSpace_mono (T : ι → H →L[ℂ] H) (ξ : S → H) : Monotone (wordSpace T ξ) := by + apply monotone_nat_of_le_succ + intro m + exact le_sup_left + +omit [Finite ι] [Finite S] in +lemma wordEval_mem_wordSpace (T : ι → H →L[ℂ] H) (ξ : S → H) (w : List ι) (j : S) : + wordEval T w (ξ j) ∈ wordSpace T ξ w.length := by + induction w with + | nil => exact Submodule.subset_span (Set.mem_range_self j) + | cons i w ih => + apply (show (⨆ i, (wordSpace T ξ w.length).map (T i).toLinearMap) ≤ + wordSpace T ξ (i :: w).length from le_sup_right) + apply (le_iSup (fun i => (wordSpace T ξ w.length).map (T i).toLinearMap) i) + exact Submodule.mem_map.mpr ⟨_, ih, rfl⟩ + +omit [Finite ι] [Finite S] in +lemma wordEval_mem_wordSpace_of_length_le (T : ι → H →L[ℂ] H) (ξ : S → H) + (w : List ι) (j : S) {m : ℕ} (hw : w.length ≤ m) : + wordEval T w (ξ j) ∈ wordSpace T ξ m := + wordSpace_mono T ξ hw (wordEval_mem_wordSpace T ξ w j) + +omit [Finite ι] [Finite S] in +lemma testVector_mem_wordSpace (T : ι → H →L[ℂ] H) (ξ : S → H) (m : ℕ) (j : S) : + ξ j ∈ wordSpace T ξ m := + wordEval_mem_wordSpace_of_length_le T ξ [] j (Nat.zero_le m) + +omit [Finite ι] [Finite S] in +lemma adjoint_compress [CompleteSpace H] (K : Submodule ℂ H) [CompleteSpace K] + (T : H →L[ℂ] H) : + (compress K T).adjoint = compress K T.adjoint := by + simp only [compress, ContinuousLinearMap.adjoint_comp, Submodule.adjoint_subtypeL, + Submodule.adjoint_orthogonalProjectionOnto, ContinuousLinearMap.comp_assoc] + +omit [Finite ι] [Finite S] in +lemma compressed_wordEval (K : Submodule ℂ H) [K.HasOrthogonalProjection] + (T : ι → H →L[ℂ] H) (ξ : H) (hξ : ξ ∈ K) (w : List ι) + (hmem : ∀ u : List ι, u.length ≤ w.length → wordEval T u ξ ∈ K) : + (wordEval (fun i => compress K (T i)) w ⟨ξ, hξ⟩ : H) = wordEval T w ξ := by + induction w with + | nil => rfl + | cons i w ih => + change (K.orthogonalProjectionOnto + (T i (wordEval (fun i => compress K (T i)) w ⟨ξ, hξ⟩ : H)) : H) = _ + rw [ih (fun u hu => hmem u (by simpa using Nat.le_succ_of_le hu))] + exact Submodule.starProjection_eq_self_iff.mpr (hmem (i :: w) le_rfl) + +lemma wordSpace_compression_exact (T : ι → H →L[ℂ] H) (ξ : S → H) (m : ℕ) + (w : List ι) (hw : w.length ≤ m) (j : S) : + (wordEval (fun i => compress (wordSpace T ξ m) (T i)) w + ⟨ξ j, testVector_mem_wordSpace T ξ m j⟩ : H) = wordEval T w (ξ j) := by + apply compressed_wordEval + intro u hu + exact wordEval_mem_wordSpace_of_length_le T ξ u j (hu.trans hw) + +end FiniteCompression + +section Amplification + +open scoped TensorProduct + +variable {ι K E F : Type*} + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + [NormedAddCommGroup E] [InnerProductSpace ℂ E] + [NormedAddCommGroup F] [InnerProductSpace ℂ F] + +noncomputable def amplifiedPolynomial (s : Finset (List ι)) + (B : List ι → K →L[ℂ] K) (T : ι → E →L[ℂ] E) : + (K ⊗[ℂ] E) →L[ℂ] (K ⊗[ℂ] E) := + ∑ w ∈ s, TensorProduct.mapL (B w) (wordEval T w) + +lemma amplifiedPolynomial_intertwining + (s : Finset (List ι)) (B : List ι → K →L[ℂ] K) + (T : ι → F →L[ℂ] F) (D : ι → E →L[ℂ] E) (J : E →L[ℂ] F) : + (amplifiedPolynomial s B T).comp (J.lTensor K) - + (J.lTensor K).comp (amplifiedPolynomial s B D) = + ∑ w ∈ s, TensorProduct.mapL (B w) + ((wordEval T w).comp J - J.comp (wordEval D w)) := by + simp only [amplifiedPolynomial, ContinuousLinearMap.finsetSum_comp, ContinuousLinearMap.comp_finsetSum, + ContinuousLinearMap.mapL_comp_lTensor, ContinuousLinearMap.lTensor_comp_mapL, + ← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro w hw + simp only [TensorProduct.mapL, ContinuousLinearMap.lTensor_sub, ContinuousLinearMap.comp_sub] + +lemma norm_amplifiedPolynomial_intertwining_le + (s : Finset (List ι)) (B : List ι → K →L[ℂ] K) + (T : ι → F →L[ℂ] F) (D : ι → E →L[ℂ] E) (J : E →L[ℂ] F) + (hT : ∀ i, ‖T i‖ ≤ 1) (hD : ∀ i, ‖D i‖ ≤ 1) + {θ : ℝ} (hθ : 0 ≤ θ) + (hJ : ∀ i, ‖(T i).comp J - J.comp (D i)‖ ≤ θ) : + ‖(amplifiedPolynomial s B T).comp (J.lTensor K) - + (J.lTensor K).comp (amplifiedPolynomial s B D)‖ ≤ + (∑ w ∈ s, ‖B w‖ * w.length) * θ := by + rw [amplifiedPolynomial_intertwining] + calc + _ ≤ ∑ w ∈ s, ‖TensorProduct.mapL (B w) + ((wordEval T w).comp J - J.comp (wordEval D w))‖ := by + have hs := norm_sum_le s (fun w => TensorProduct.mapL (B w) + ((wordEval T w).comp J - J.comp (wordEval D w))) + exact hs + _ ≤ ∑ w ∈ s, ‖B w‖ * (w.length * θ) := by + apply Finset.sum_le_sum + intro w hw + have hm := TensorProduct.norm_mapL_le (B w) + ((wordEval T w).comp J - J.comp (wordEval D w)) + have hw := norm_wordEval_intertwining_le T D J hT hD hθ hJ w + exact hm.trans (mul_le_mul_of_nonneg_left hw (norm_nonneg (B w))) + _ = _ := by simp only [← mul_assoc, Finset.sum_mul] + +lemma norm_amplifiedPolynomial_le + (s : Finset (List ι)) (B : List ι → K →L[ℂ] K) + (T : ι → F →L[ℂ] F) (D : ι → E →L[ℂ] E) (J : E →ₗᵢ[ℂ] F) + (hT : ∀ i, ‖T i‖ ≤ 1) (hD : ∀ i, ‖D i‖ ≤ 1) + {θ : ℝ} (hθ : 0 ≤ θ) + (hJ : ∀ i, ‖(T i).comp J.toContinuousLinearMap - + J.toContinuousLinearMap.comp (D i)‖ ≤ θ) : + ‖amplifiedPolynomial s B D‖ ≤ ‖amplifiedPolynomial s B T‖ + + (∑ w ∈ s, ‖B w‖ * w.length) * θ := by + let Q := (J.lTensor K).toContinuousLinearMap + have hQ : ‖Q‖ ≤ 1 := (J.lTensor K).norm_toContinuousLinearMap_le + have herr : ‖(amplifiedPolynomial s B T).comp Q - + Q.comp (amplifiedPolynomial s B D)‖ ≤ (∑ w ∈ s, ‖B w‖ * w.length) * θ := + by + simpa only [Q, LinearIsometry.toContinuousLinearMap_lTensor] using + norm_amplifiedPolynomial_intertwining_le s B T D J.toContinuousLinearMap hT hD hθ hJ + calc + _ = ‖Q.comp (amplifiedPolynomial s B D)‖ := + ((J.lTensor K).norm_toContinuousLinearMap_comp).symm + _ ≤ ‖(amplifiedPolynomial s B T).comp Q‖ + + ‖(amplifiedPolynomial s B T).comp Q - Q.comp (amplifiedPolynomial s B D)‖ := + by + rw [norm_sub_rev ((amplifiedPolynomial s B T).comp Q)] + exact norm_le_norm_add_norm_sub' (Q.comp (amplifiedPolynomial s B D)) + ((amplifiedPolynomial s B T).comp Q) + _ ≤ ‖amplifiedPolynomial s B T‖ * ‖Q‖ + + (∑ w ∈ s, ‖B w‖ * w.length) * θ := + add_le_add (ContinuousLinearMap.opNorm_comp_le _ _) herr + _ ≤ _ := add_le_add + (mul_le_of_le_one_right (norm_nonneg (amplifiedPolynomial s B T)) hQ) le_rfl + +end Amplification + +section FiniteAmplificationTests + +open scoped TensorProduct + +variable {ι S K H : Type*} [Finite ι] [Fintype S] + [NormedAddCommGroup K] [InnerProductSpace ℂ K] + [NormedAddCommGroup H] [InnerProductSpace ℂ H] + +omit [Finite ι] [Fintype S] in +lemma amplifiedPolynomial_tmul (s : Finset (List ι)) + (B : List ι → K →L[ℂ] K) (T : ι → H →L[ℂ] H) (κ : K) (ξ : H) : + amplifiedPolynomial s B T (κ ⊗ₜ[ℂ] ξ) = + ∑ w ∈ s, B w κ ⊗ₜ[ℂ] wordEval T w ξ := by + simp only [amplifiedPolynomial, sum_apply, TensorProduct.mapL_tmul] + +lemma amplifiedPolynomial_compression_exact + (s : Finset (List ι)) (B : List ι → K →L[ℂ] K) + (T : ι → H →L[ℂ] H) (κ : S → K) (ξ : S → H) {m : ℕ} + (hm : ∀ w ∈ s, w.length ≤ m) : + let L := wordSpace T ξ m + let v : K ⊗[ℂ] L := ∑ j, κ j ⊗ₜ[ℂ] ⟨ξ j, testVector_mem_wordSpace T ξ m j⟩ + (L.subtypeₗᵢ.lTensor K) (amplifiedPolynomial s B (fun i => compress L (T i)) v) = + amplifiedPolynomial s B T (∑ j, κ j ⊗ₜ[ℂ] ξ j) := by + dsimp only + simp only [map_sum, amplifiedPolynomial_tmul, LinearIsometry.lTensor_apply, LinearMap.lTensor_tmul] + apply Finset.sum_congr rfl + intro j hj + apply Finset.sum_congr rfl + intro w hw + congr 1 + exact wordSpace_compression_exact T ξ m w (hm w hw) j + +omit [Fintype S] in +lemma norm_amplifiedPolynomial_le_of_finite_compressions + (s : Finset (List ι)) (B : List ι → K →L[ℂ] K) (T : ι → H →L[ℂ] H) + {M : ℝ} (hM : 0 ≤ M) + (htest : ∀ (L : Submodule ℂ H) [FiniteDimensional ℂ L], + ‖amplifiedPolynomial s B (fun i => compress L (T i))‖ ≤ M) : + ‖amplifiedPolynomial s B T‖ ≤ M := by + classical + apply ContinuousLinearMap.opNorm_le_bound _ hM + intro x + obtain ⟨k, κ, ξ, rfl⟩ := TensorProduct.exists_sum_tmul_eq x + let m := s.sup List.length + have hm : ∀ w ∈ s, w.length ≤ m := fun w hw => Finset.le_sup hw + let L := wordSpace T ξ m + let v : K ⊗[ℂ] L := ∑ j, κ j ⊗ₜ[ℂ] ⟨ξ j, testVector_mem_wordSpace T ξ m j⟩ + let Q : (K ⊗[ℂ] L) →ₗᵢ[ℂ] (K ⊗[ℂ] H) := L.subtypeₗᵢ.lTensor K + have hv : Q v = ∑ j, κ j ⊗ₜ[ℂ] ξ j := by + simp only [Q, v, LinearIsometry.lTensor_apply, map_sum, LinearMap.lTensor_tmul] + rfl + have hp : Q (amplifiedPolynomial s B (fun i => compress L (T i)) v) = + amplifiedPolynomial s B T (∑ j, κ j ⊗ₜ[ℂ] ξ j) := + amplifiedPolynomial_compression_exact s B T κ ξ hm + rw [← hp, Q.norm_map, ← hv, Q.norm_map] + exact (ContinuousLinearMap.le_opNorm _ v).trans + (mul_le_mul_of_nonneg_right (htest L) (norm_nonneg v)) + +end FiniteAmplificationTests + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/Analysis/WeakInfiniteness/WordTensorDensity.lean b/lean/OAI/Analysis/WeakInfiniteness/WordTensorDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8947cd0bccb6cc393348f0d6378aba6169ff28d --- /dev/null +++ b/lean/OAI/Analysis/WeakInfiniteness/WordTensorDensity.lean @@ -0,0 +1,130 @@ +import Mathlib +import OAI.Analysis.WeakInfiniteness.AlgebraicTensorSpan +import OAI.Analysis.WeakInfiniteness.PolynomialSpan +import OAI.Analysis.WeakInfiniteness.TensorFunctoriality + +namespace OAI + +noncomputable section +open scoped TensorProduct ENNReal ComplexOrder +open UniformSpace +open CStarAlgebra +open scoped NNReal +open scoped TensorProduct ComplexConjugate +open scoped ENNReal InnerProductSpace +open scoped InnerProductSpace +open scoped TensorProduct InnerProductSpace +open Filter Topology +open Complex selfAdjoint +open scoped ComplexOrder + +namespace WeakPureInfiniteness + +noncomputable section + +lemma universal_word_span_dense (S : Submodule ℂ UniversalContraction) + (hS : IsClosed (S : Set UniversalContraction)) (hw : ∀ w, universalWord w ∈ S) : + S = ⊤ := by + let f : UniversalContraction →⋆ₐ[ℂ] ContractionAmbient := universalContractionSubalgebra.subtype + let T : Submodule ℂ ContractionAmbient := S.map f.toLinearMap + have hT : IsClosed (T : Set ContractionAmbient) := + (closedStarSpan_closed {universalOperator}).isClosedMap_subtype_val _ hS + have hp : ∀ c : List Bool →₀ ℂ, algebraPolynomial universalContractionGenerator c ∈ S := by + intro c + unfold algebraPolynomial + apply S.sum_mem + intro w _hw + exact S.smul_mem _ (algebraWord_universal w ▸ hw w) + have ha : (StarAlgebra.adjoin ℂ {universalOperator} : Set ContractionAmbient) ⊆ T := by + intro y hy + obtain ⟨c, rfl⟩ := exists_polynomial_of_mem_adjoin universalOperator y hy + let z : UniversalContraction := algebraPolynomial universalContractionGenerator c + refine ⟨z, hp c, ?_⟩ + exact map_algebraPolynomial f universalContractionGenerator c + apply top_unique + intro x _hx + have hxT : x.val ∈ T := (closure_minimal ha hT) x.property + obtain ⟨y, hy, he⟩ := hxT + have hey : y = x := Subtype.ext he + exact hey ▸ hy + +section TensorDensity + +variable {A : Type*} {C : Type*} [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra C] + +def minimalElementaryRightLinear (a : A) : C →ₗ[ℂ] MinimalTensor A C where + toFun := minimalElementary a + map_add' c d := Subtype.ext (spatialElementary_add_right a c d) + map_smul' r c := Subtype.ext (spatialElementary_smul_right r a c) + +def minimalElementaryLeftLinear (c : C) : A →ₗ[ℂ] MinimalTensor A C where + toFun a := minimalElementary a c + map_add' a b := Subtype.ext (spatialElementary_add_left a b c) + map_smul' r a := Subtype.ext (spatialElementary_smul_left r a c) + +def minimalElementaryRightContinuous (a : A) : C →L[ℂ] MinimalTensor A C := + (minimalElementaryRightLinear a).mkContinuous ‖a‖ (norm_spatialElementary_le a) + +def minimalElementaryLeftContinuous (c : C) : A →L[ℂ] MinimalTensor A C := + (minimalElementaryLeftLinear c).mkContinuous ‖c‖ (fun a => by + change ‖spatialElementary a c‖ ≤ ‖c‖ * ‖a‖ + simpa only [mul_comm] using norm_spatialElementary_le a c) + +lemma minimal_elementary_span_dense (S : Submodule ℂ (MinimalTensor A C)) + (hS : IsClosed (S : Set (MinimalTensor A C))) + (he : ∀ a c, minimalElementary a c ∈ S) : S = ⊤ := by + let T : Submodule ℂ (SpatialAmbient A C) := + S.map (minimalTensorSubalgebra A C).toSubmodule.subtype + have hT : IsClosed (T : Set (SpatialAmbient A C)) := + isClosed_closure.isClosedMap_subtype_val _ hS + have hs : Submodule.span ℂ + (Set.range fun p : A × C => spatialElementary p.1 p.2) ≤ T := by + apply Submodule.span_le.mpr + rintro y ⟨⟨a,c⟩,rfl⟩ + exact ⟨minimalElementary a c, he a c, rfl⟩ + apply top_unique + intro x _hx + have hx' := x.property + change x.val ∈ (minimalTensorSubalgebra A C : Set (SpatialAmbient A C)) at hx' + rw [minimalTensor_eq_closure_span] at hx' + have hxT : x.val ∈ T := (closure_minimal hs hT) hx' + obtain ⟨y,hy,he⟩ := hxT + have he' : y = x := Subtype.ext he + exact he' ▸ hy + +end TensorDensity + +variable {C : Type*} [NonUnitalCStarAlgebra C] + +def wordTensorLinear : (List Bool →₀ C) →ₗ[ℂ] MinimalTensor UniversalContraction C := + Finsupp.lsum ℂ (fun w => minimalElementaryRightLinear (universalWord w)) + +lemma wordTensorLinear_apply (c : List Bool →₀ C) : + wordTensorLinear c = ∑ w ∈ c.support, minimalElementary (universalWord w) (c w) := rfl + +lemma wordTensorLinear_range_dense : DenseRange (wordTensorLinear (C := C)) := by + have hd : (LinearMap.range (wordTensorLinear (C := C))).topologicalClosure = ⊤ := by + apply minimal_elementary_span_dense _ (Submodule.isClosed_topologicalClosure _) + intro a c + let S : Submodule ℂ UniversalContraction := + (LinearMap.range (wordTensorLinear (C := C))).topologicalClosure.comap + (minimalElementaryLeftLinear c) + have hS : IsClosed (S : Set UniversalContraction) := + (Submodule.isClosed_topologicalClosure _).preimage (minimalElementaryLeftContinuous c).continuous + have hw : ∀ w, universalWord w ∈ S := by + intro w + apply Submodule.le_topologicalClosure + refine ⟨Finsupp.single w c, ?_⟩ + exact Finsupp.lsum_single ℂ (fun w => minimalElementaryRightLinear (universalWord w)) w c + have hall := universal_word_span_dense S hS hw + have ha : a ∈ S := by rw [hall]; trivial + exact ha + apply dense_iff_closure_eq.mpr + exact congrArg (fun S : Submodule ℂ (MinimalTensor UniversalContraction C) => (S : Set (MinimalTensor UniversalContraction C))) hd + +end + +end WeakPureInfiniteness +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Basic.lean b/lean/OAI/CategoryTheory/Globular/Basic.lean new file mode 100644 index 0000000000000000000000000000000000000000..4237a29e82ab62a323dbac993fd1146c19a59794 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Basic.lean @@ -0,0 +1,131 @@ +import OAI.CategoryTheory.Globular.Model + +namespace OAI + +universe u v w + +namespace Grothendieck +namespace GlobularSet +@[simps] +def Hom.id (X : GlobularSet.{u}) : Hom X X where + app _ := _root_.id + source_app _ _ := rfl + target_app _ _ := rfl + +@[simps] +def Hom.comp {X Y Z : GlobularSet.{u}} (f : Hom X Y) (g : Hom Y Z) : Hom X Z where + app n x := g.app n (f.app n x) + source_app n x := by rw [f.source_app, g.source_app] + target_app n x := by rw [f.target_app, g.target_app] + +instance : CategoryTheory.Category GlobularSet.{u} where + Hom := Hom + id := Hom.id + comp := Hom.comp + id_comp _ := by ext; rfl + comp_id _ := by ext; rfl + assoc _ _ _ := by ext; rfl +@[simp] +theorem Hom.boundary_app {X Y : GlobularSet.{u}} (f : Hom X Y) (n) (x : X.Cell n) : + f.boundaryMap n (X.boundary n x) = Y.boundary n (f.app n x) := by + cases n with + | zero => rfl + | succ n => exact Subtype.ext (Prod.ext (f.source_app n x) (f.target_app n x)) + +def ExactBoundaryTest {X Y : GlobularSet.{u}} (f : Hom X Y) : Prop := + ∀ (n) (b : X.Boundary n) (y : Y.Cell n), Y.boundary n y = f.boundaryMap n b → + ∃ x : X.Cell n, X.boundary n x = b ∧ Y.Joined n (f.app n x) y + +theorem parallel_iff_boundary_eq (X : GlobularSet.{u}) (n) (x y : X.Cell n) : + X.Parallel n x y ↔ X.boundary n x = X.boundary n y := by + cases n with + | zero => exact ⟨fun _ => rfl, fun _ => trivial⟩ + | succ n => + constructor + · intro h + exact Subtype.ext (Prod.ext h.1 h.2) + · intro h + have h' := congrArg Subtype.val h + exact ⟨congrArg Prod.fst h', congrArg Prod.snd h'⟩ + +theorem ExactBoundaryTest.reflects_joined {X Y : GlobularSet.{u}} {f : Hom X Y} + (hf : ExactBoundaryTest f) {n} {x y : X.Cell n} (hp : X.Parallel n x y) + (h : Y.Joined n (f.app n x) (f.app n y)) : X.Joined n x y := by + obtain ⟨h, hs, ht⟩ := h + let b : X.Boundary (n + 1) := ⟨(x, y), hp⟩ + have hb : Y.boundary (n + 1) h = f.boundaryMap (n + 1) b := by + exact Subtype.ext (Prod.ext hs ht) + obtain ⟨z, hz, _⟩ := hf (n + 1) b h hb + have hz' := congrArg Subtype.val hz + exact ⟨z, congrArg Prod.fst hz', congrArg Prod.snd hz'⟩ + +@[simp] +theorem Hom.boundaryMap_comp {X Y Z : GlobularSet.{u}} (f : Hom X Y) (g : Hom Y Z) + (n) (b : X.Boundary n) : + (f.comp g).boundaryMap n b = g.boundaryMap n (f.boundaryMap n b) := by + cases n <;> rfl + +theorem ExactBoundaryTest.of_mutual_composites {X Y : GlobularSet.{u}} + (i : Hom X Y) (r : Hom Y X) + (hu : ExactBoundaryTest (i.comp r)) (hv : ExactBoundaryTest (r.comp i)) : + ExactBoundaryTest i := by + intro n b y hy + have hb : X.boundary n (r.app n y) = (i.comp r).boundaryMap n b := by + rw [← r.boundary_app, hy, Hom.boundaryMap_comp] + obtain ⟨x, hx, h⟩ := hu n b (r.app n y) hb + refine ⟨x, hx, hv.reflects_joined ?_ (i.map_joined h)⟩ + rw [parallel_iff_boundary_eq, ← i.boundary_app, hx, hy] + +end GlobularSet + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularTheory.Model +noncomputable def cellEquiv {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) : + (disk C n ⟶ X) ≃ X.underlying.Cell n := + show (yoneda.obj (⟨Shape.globe n⟩ : C.Obj) ⟶ X.presheaf) ≃ + X.presheaf.obj (op (⟨Shape.globe n⟩ : C.Obj)) from yonedaEquiv + +end GlobularTheory.Model + +namespace GlobularTheory +theorem unit_source (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.source n)) (C.unit hC n) = C.id (Shape.globe n) := + (Classical.choose_spec (hC.2 (C.unitPair n))).1 + +theorem unit_target (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.target n)) (C.unit hC n) = C.id (Shape.globe n) := + (Classical.choose_spec (hC.2 (C.unitPair n))).2 + +end GlobularTheory + +namespace GlobularTheory.Model +theorem eval_comp {C : GlobularTheory.{v}} (X : C.Model) {R S T : Shape} + (f : C.Hom R S) (g : C.Hom S T) (x : X.presheaf.obj (op (⟨T⟩ : C.Obj))) : + X.eval (C.comp f g) x = X.eval f (X.eval g x) := by + exact ConcreteCategory.congr_hom + (X.presheaf.map_comp (show (op (⟨T⟩ : C.Obj)) ⟶ op ⟨S⟩ from Quiver.Hom.op g) + (show (op (⟨S⟩ : C.Obj)) ⟶ op ⟨R⟩ from Quiver.Hom.op f)) x + +@[simp] +theorem eval_id {C : GlobularTheory.{v}} (X : C.Model) {S : Shape} + (x : X.presheaf.obj (op (⟨S⟩ : C.Obj))) : X.eval (C.id S) x = x := by + exact ConcreteCategory.congr_hom (X.presheaf.map_id (op (⟨S⟩ : C.Obj))) x +@[simp] +theorem unitCell_source {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (x : X.underlying.Cell n) : X.underlying.source n (X.unitCell hC n x) = x := by + change X.presheaf.obj (op (⟨Shape.globe n⟩ : C.Obj)) at x + change X.eval (C.base (Shape.source n)) (X.eval (C.unit hC n) x) = x + rw [← eval_comp, C.unit_source, eval_id] + +@[simp] +theorem unitCell_target {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (x : X.underlying.Cell n) : X.underlying.target n (X.unitCell hC n x) = x := by + change X.presheaf.obj (op (⟨Shape.globe n⟩ : C.Obj)) at x + change X.eval (C.base (Shape.target n)) (X.eval (C.unit hC n) x) = x + rw [← eval_comp, C.unit_target, eval_id] + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Boundary.lean b/lean/OAI/CategoryTheory/Globular/Boundary.lean new file mode 100644 index 0000000000000000000000000000000000000000..d71fe084d05f4217f107ceedfa6e4bc9066287db --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Boundary.lean @@ -0,0 +1,330 @@ +import OAI.CategoryTheory.Globular.Composition + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +namespace Shape + +theorem face_two_source (n : ℕ) (side : Bool) : + face (show n < n+2 by omega) side = + face (Nat.lt_succ_self n) side ≫ source (n+1) := + GlobularTheory.shapeGlobes.map_comp (Globe.face (Nat.lt_succ_self n) side) (Globe.source (n+1)) + +theorem globe_seam_general (n k : ℕ) (h : k < n) : + (globe n).seam h = face h true := Category.comp_id _ + +end Shape + +namespace GlobularTheory.Model + +theorem compCell_congr_left {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a₀ a₁ b : X.underlying.Cell (n+1)) + (hab₀ : X.underlying.target n a₀ = X.underlying.source n b) + (hab₁ : X.underlying.target n a₁ = X.underlying.source n b) + (ha : X.underlying.Joined (n+1) a₀ a₁) : + X.underlying.Joined (n+1) (X.compCell hC n a₀ b hab₀) (X.compCell hC n a₁ b hab₁) := by + obtain ⟨h, hs, ht⟩ := ha + let hn : n < n+2 := by omega + let S := (Shape.globe (n+2)).attach n (n+1) hn (Nat.lt_succ_self n) + let D := freeShape C S + let l : Shape.globe (n+2) ⟶ S := (Shape.globe (n+2)).inl n (n+1) hn (Nat.lt_succ_self n) + let r : Shape.globe (n+1) ⟶ S := (Shape.globe (n+2)).inr n (n+1) hn (Nat.lt_succ_self n) + let H : D.underlying.Cell (n+2) := C.base l + let B : D.underlying.Cell (n+1) := C.base r + let A₀ := D.underlying.source (n+1) H + let A₁ := D.underlying.target (n+1) H + have hAB₀ : D.underlying.target n A₀ = D.underlying.source n B := by + change C.comp (C.base (Shape.face (Nat.lt_succ_self n) true)) + (C.comp (C.base (Shape.source (n+1))) (C.base l)) = + C.comp (C.base (Shape.source n)) (C.base r) + rw [← C.assoc, ← C.base_comp, ← Shape.face_two_source, ← C.base_comp, ← C.base_comp] + exact congrArg C.base (by + simpa only [S, l, r, Shape.globe_seam_general, Shape.source] using + Shape.seam_inl (Shape.globe (n+2)) n (n+1) hn (Nat.lt_succ_self n)) + have hAB₁ : D.underlying.target n A₁ = D.underlying.source n B := + (D.underlying.target_source n H).symm.trans hAB₀ + let t := X.sumTuple (Shape.globe (n+2)) n (n+1) hn (Nat.lt_succ_self n) h b (by + change X.presheaf.obj (op (⟨Shape.globe (n+2)⟩ : C.Obj)) at h + change X.presheaf.obj (op (⟨Shape.globe (n+1)⟩ : C.Obj)) at b + rw [Shape.globe_seam_general, Shape.face_two_source, C.base_comp, eval_comp] + change X.underlying.target n (X.underlying.source (n+1) h) = X.underlying.source n b + rw [hs, hab₀]) + let f : D ⟶ X := X.tupleMap S t + have hfH : (underlyingMap f).app (n+2) H = h := X.sumTuple_left _ _ _ _ _ _ _ _ + have hfB : (underlyingMap f).app (n+1) B = b := X.sumTuple_right _ _ _ _ _ _ _ _ + have hfA₀ : (underlyingMap f).app (n+1) A₀ = a₀ := by + rw [(underlyingMap f).source_app, hfH, hs] + have hfA₁ : (underlyingMap f).app (n+1) A₁ = a₁ := by + rw [(underlyingMap f).target_app, hfH, ht] + let u := D.compCell hC n A₀ B hAB₀ + let z := D.compCell hC n A₁ B hAB₁ + have hp : D.underlying.Parallel (n+1) u z := by + constructor + · dsimp [u, z] + simp only [compCell_source] + exact D.underlying.source_source n H + · dsimp [u, z] + simp only [compCell_target] + have hz := (underlyingMap f).map_joined (freeShape_joined C hC S (n+1) u z hp) + simpa only [u, z, map_compCell f, hfA₀, hfA₁, hfB] using hz + +theorem compCell_congr_right {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a b₀ b₁ : X.underlying.Cell (n+1)) + (hab₀ : X.underlying.target n a = X.underlying.source n b₀) + (hab₁ : X.underlying.target n a = X.underlying.source n b₁) + (hb : X.underlying.Joined (n+1) b₀ b₁) : + X.underlying.Joined (n+1) (X.compCell hC n a b₀ hab₀) (X.compCell hC n a b₁ hab₁) := by + obtain ⟨h, hs, ht⟩ := hb + let hn : n < n+2 := by omega + let S := (Shape.globe (n+1)).attach n (n+2) (Nat.lt_succ_self n) hn + let D := freeShape C S + let l : Shape.globe (n+1) ⟶ S := (Shape.globe (n+1)).inl n (n+2) (Nat.lt_succ_self n) hn + let r : Shape.globe (n+2) ⟶ S := (Shape.globe (n+1)).inr n (n+2) (Nat.lt_succ_self n) hn + let A : D.underlying.Cell (n+1) := C.base l + let H : D.underlying.Cell (n+2) := C.base r + let B₀ := D.underlying.source (n+1) H + let B₁ := D.underlying.target (n+1) H + have hAB₀ : D.underlying.target n A = D.underlying.source n B₀ := by + change C.comp (C.base (Shape.target n)) (C.base l) = + C.comp (C.base (Shape.face (Nat.lt_succ_self n) false)) + (C.comp (C.base (Shape.source (n+1))) (C.base r)) + rw [← C.assoc] + simp only [← C.base_comp] + rw [← Shape.face_two_source] + exact congrArg C.base (by + simpa only [Shape.globe_seam] using + Shape.seam_inl (Shape.globe (n+1)) n (n+2) (Nat.lt_succ_self n) hn) + have hAB₁ : D.underlying.target n A = D.underlying.source n B₁ := + hAB₀.trans (D.underlying.source_source n H) + let t := X.sumTuple (Shape.globe (n+1)) n (n+2) (Nat.lt_succ_self n) hn a h (by + change X.presheaf.obj (op (⟨Shape.globe (n+2)⟩ : C.Obj)) at h + change X.presheaf.obj (op (⟨Shape.globe (n+1)⟩ : C.Obj)) at a + rw [Shape.globe_seam, Shape.face_two_source, C.base_comp, eval_comp] + change X.underlying.target n a = X.underlying.source n (X.underlying.source (n+1) h) + rw [hs, hab₀]) + let f : D ⟶ X := X.tupleMap S t + have hfA : (underlyingMap f).app (n+1) A = a := X.sumTuple_left _ _ _ _ _ _ _ _ + have hfH : (underlyingMap f).app (n+2) H = h := X.sumTuple_right _ _ _ _ _ _ _ _ + have hfB₀ : (underlyingMap f).app (n+1) B₀ = b₀ := by + rw [(underlyingMap f).source_app, hfH, hs] + have hfB₁ : (underlyingMap f).app (n+1) B₁ = b₁ := by + rw [(underlyingMap f).target_app, hfH, ht] + let u := D.compCell hC n A B₀ hAB₀ + let z := D.compCell hC n A B₁ hAB₁ + have hp : D.underlying.Parallel (n+1) u z := by + constructor + · dsimp [u, z] + simp only [compCell_source] + · dsimp [u, z] + simp only [compCell_target] + exact D.underlying.target_source n H + have hz := (underlyingMap f).map_joined (freeShape_joined C hC S (n+1) u z hp) + simpa only [u, z, map_compCell f, hfA, hfB₀, hfB₁] using hz + +end GlobularTheory.Model +end Grothendieck + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +noncomputable def targetDisk (C : GlobularTheory.{v}) (n : ℕ) : + disk C n ⟶ disk C (n+1) := + show (disk C n).presheaf ⟶ (disk C (n+1)).presheaf from + yoneda.map (show (⟨Shape.globe n⟩ : C.Obj) ⟶ ⟨Shape.globe (n+1)⟩ from + C.base (Shape.target n)) + +@[simp] theorem cellEquiv_targetDisk {C : GlobularTheory.{v}} {X : C.Model} + (n : ℕ) (a : disk C (n+1) ⟶ X) : + cellEquiv X n (targetDisk C n ≫ a) = X.underlying.target n (cellEquiv X (n+1) a) := + (yonedaEquiv_naturality a + (show (⟨Shape.globe n⟩ : C.Obj) ⟶ ⟨Shape.globe (n+1)⟩ from + C.base (Shape.target n))).symm + +structure BoundaryRepresentation (C : GlobularTheory.{v}) (n : ℕ) where + obj : C.Model + inclusion : obj ⟶ disk C n + equiv : ∀ X : C.Model, (obj ⟶ X) ≃ X.underlying.Boundary n + naturality : ∀ {X Y : C.Model} (f : obj ⟶ X) (g : X ⟶ Y), + equiv Y (f ≫ g) = (underlyingMap g).boundaryMap n (equiv X f) + inclusion_boundary : ∀ {X : C.Model} (f : disk C n ⟶ X), + equiv X (inclusion ≫ f) = X.underlying.boundary n (cellEquiv X n f) + +namespace BoundaryRepresentation + +noncomputable def zero (C : GlobularTheory.{v}) : BoundaryRepresentation C 0 where + obj := ⊥_ C.Model + inclusion := initial.to _ + equiv X := + { toFun := fun _ => PUnit.unit + invFun := fun _ => initial.to X + left_inv := fun _ => initial.hom_ext _ _ + right_inv := fun _ => by change (PUnit.unit : PUnit) = _; exact Subsingleton.elim _ _ } + naturality _ _ := rfl + inclusion_boundary _ := rfl + +variable {C : GlobularTheory.{v}} {n : ℕ} (R : BoundaryRepresentation C n) + +noncomputable abbrev nextObj : C.Model := pushout R.inclusion R.inclusion + +noncomputable def nextValue (X : C.Model) (f : R.nextObj ⟶ X) : + X.underlying.Boundary (n+1) := + ⟨(cellEquiv X n (pushout.inl _ _ ≫ f), cellEquiv X n (pushout.inr _ _ ≫ f)), by + rw [GlobularSet.parallel_iff_boundary_eq, + ← R.inclusion_boundary, ← R.inclusion_boundary, ← Category.assoc, ← Category.assoc, + pushout.condition]⟩ + +theorem nextValue_bijective (X : C.Model) : Function.Bijective (R.nextValue X) := by + constructor + · intro f g h + apply pushout.hom_ext + · apply (cellEquiv X n).injective + exact congrArg (fun b => b.1.1) h + · apply (cellEquiv X n).injective + exact congrArg (fun b => b.1.2) h + · intro b + let f := (cellEquiv X n).symm b.1.1 + let g := (cellEquiv X n).symm b.1.2 + have hfg : R.inclusion ≫ f = R.inclusion ≫ g := by + apply (R.equiv X).injective + simp only [R.inclusion_boundary, f, g, Equiv.apply_symm_apply] + exact (GlobularSet.parallel_iff_boundary_eq _ _ _ _).1 b.2 + refine ⟨pushout.desc f g hfg, ?_⟩ + apply Subtype.ext + change (cellEquiv X n (pushout.inl _ _ ≫ pushout.desc f g hfg), + cellEquiv X n (pushout.inr _ _ ≫ pushout.desc f g hfg)) = b.1 + simp only [pushout.inl_desc, pushout.inr_desc, f, g, Equiv.apply_symm_apply] + +theorem face_condition : R.inclusion ≫ J C n = R.inclusion ≫ targetDisk C n := by + apply (R.equiv (disk C (n+1))).injective + rw [R.inclusion_boundary, R.inclusion_boundary] + have h := GlobularSet.Joined.parallel + (⟨cellEquiv (disk C (n+1)) (n+1) (𝟙 _), rfl, rfl⟩ : + (disk C (n+1)).underlying.Joined n + ((disk C (n+1)).underlying.source n (cellEquiv _ (n+1) (𝟙 _))) + ((disk C (n+1)).underlying.target n (cellEquiv _ (n+1) (𝟙 _)))) + have hs := cellEquiv_J (X := disk C (n+1)) n (𝟙 _) + have ht := cellEquiv_targetDisk (X := disk C (n+1)) n (𝟙 _) + rw [Category.comp_id] at hs ht + rw [hs, ht] + exact (GlobularSet.parallel_iff_boundary_eq _ _ _ _).1 h + +noncomputable def succ : BoundaryRepresentation C (n+1) where + obj := R.nextObj + inclusion := pushout.desc (J C n) (targetDisk C n) R.face_condition + equiv X := Equiv.ofBijective (R.nextValue X) (R.nextValue_bijective X) + naturality f g := by + apply Subtype.ext + apply Prod.ext <;> change cellEquiv _ n (_ ≫ (f ≫ g)) = _ + · rw [← Category.assoc, cellEquiv_comp]; rfl + · rw [← Category.assoc, cellEquiv_comp]; rfl + inclusion_boundary f := by + apply Subtype.ext + change (cellEquiv _ n (pushout.inl _ _ ≫ (pushout.desc _ _ _ ≫ f)), + cellEquiv _ n (pushout.inr _ _ ≫ (pushout.desc _ _ _ ≫ f))) = + (_, _) + simp only [← Category.assoc, pushout.inl_desc, pushout.inr_desc, + cellEquiv_J, cellEquiv_targetDisk] + +end BoundaryRepresentation + +noncomputable def boundaryRepresentation (C : GlobularTheory.{v}) : + (n : ℕ) → BoundaryRepresentation C n + | 0 => BoundaryRepresentation.zero C + | n+1 => (boundaryRepresentation C n).succ + +noncomputable abbrev boundaryDisk (C : GlobularTheory.{v}) (n : ℕ) : C.Model := + (boundaryRepresentation C n).obj + +noncomputable abbrev I (C : GlobularTheory.{v}) (n : ℕ) : boundaryDisk C n ⟶ disk C n := + (boundaryRepresentation C n).inclusion + +open CategoryTheory CategoryTheory.Limits Opposite + +theorem hasLiftingProperty_I_iff {C : GlobularTheory.{v}} {X Y : C.Model} + (n : ℕ) (p : X ⟶ Y) : + HasLiftingProperty (I C n) p ↔ + ∀ (b : X.underlying.Boundary n) (y : Y.underlying.Cell n), + Y.underlying.boundary n y = (underlyingMap p).boundaryMap n b → + ∃ x : X.underlying.Cell n, + X.underlying.boundary n x = b ∧ (underlyingMap p).app n x = y := by + let R := boundaryRepresentation C n + constructor + · intro hp b y hy + let f : boundaryDisk C n ⟶ X := (R.equiv X).symm b + let g : disk C n ⟶ Y := (cellEquiv Y n).symm y + have sq : CommSq f (I C n) p g := by + constructor + apply (R.equiv Y).injective + rw [R.naturality, R.inclusion_boundary] + simpa only [f, g, Equiv.apply_symm_apply] using hy.symm + let := hp + refine ⟨cellEquiv X n sq.lift, ?_, ?_⟩ + · rw [← R.inclusion_boundary, sq.fac_left] + exact (R.equiv X).apply_symm_apply b + · rw [← cellEquiv_comp, sq.fac_right] + exact (cellEquiv Y n).apply_symm_apply y + · intro hp + constructor + intro f g sq + have h : Y.underlying.boundary n (cellEquiv Y n g) = + (underlyingMap p).boundaryMap n (R.equiv X f) := by + rw [← R.inclusion_boundary, ← R.naturality, sq.w] + obtain ⟨x, hx, hpx⟩ := hp (R.equiv X f) (cellEquiv Y n g) h + let l : disk C n ⟶ X := (cellEquiv X n).symm x + refine CommSq.HasLift.mk' { l := l, fac_left := ?_, fac_right := ?_ } + · apply (R.equiv X).injective + rw [R.inclusion_boundary] + simpa only [l, Equiv.apply_symm_apply] using hx + · apply (cellEquiv Y n).injective + rw [cellEquiv_comp] + simpa only [l, Equiv.apply_symm_apply] using hpx + +theorem liftsBoundaries_iff {C : GlobularTheory.{v}} {X Y : C.Model} (p : X ⟶ Y) : + GlobularSet.LiftsBoundaries (underlyingMap p) ↔ ∀ n, HasLiftingProperty (I C n) p := by + simp only [hasLiftingProperty_I_iff, GlobularSet.LiftsBoundaries] + +theorem hasLiftingProperty_J_iff {C : GlobularTheory.{v}} {X Y : C.Model} + (n : ℕ) (p : X ⟶ Y) : + HasLiftingProperty (J C n) p ↔ + ∀ (x : X.underlying.Cell n) (y : Y.underlying.Cell (n+1)), + Y.underlying.source n y = (underlyingMap p).app n x → + ∃ z : X.underlying.Cell (n+1), + X.underlying.source n z = x ∧ (underlyingMap p).app (n+1) z = y := by + constructor + · intro hp x y hy + let f : disk C n ⟶ X := (cellEquiv X n).symm x + let g : disk C (n+1) ⟶ Y := (cellEquiv Y (n+1)).symm y + have sq : CommSq f (J C n) p g := by + constructor + apply (cellEquiv Y n).injective + rw [cellEquiv_comp, cellEquiv_J] + simpa only [f, g, Equiv.apply_symm_apply] using hy.symm + let := hp + refine ⟨cellEquiv X (n+1) sq.lift, ?_, ?_⟩ + · rw [← cellEquiv_J, sq.fac_left] + exact (cellEquiv X n).apply_symm_apply x + · rw [← cellEquiv_comp, sq.fac_right] + exact (cellEquiv Y (n+1)).apply_symm_apply y + · intro hp + constructor + intro f g sq + have h : Y.underlying.source n (cellEquiv Y (n+1) g) = + (underlyingMap p).app n (cellEquiv X n f) := by + rw [← cellEquiv_J, ← cellEquiv_comp, sq.w] + obtain ⟨z, hz, hpz⟩ := hp (cellEquiv X n f) (cellEquiv Y (n+1) g) h + let l : disk C (n+1) ⟶ X := (cellEquiv X (n+1)).symm z + refine CommSq.HasLift.mk' { l := l, fac_left := ?_, fac_right := ?_ } + · apply (cellEquiv X n).injective + rw [cellEquiv_J] + simpa only [l, Equiv.apply_symm_apply] using hz + · apply (cellEquiv Y (n+1)).injective + rw [cellEquiv_comp] + simpa only [l, Equiv.apply_symm_apply] using hpz + +end Grothendieck.GlobularTheory.Model + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/BoundaryCells.lean b/lean/OAI/CategoryTheory/Globular/BoundaryCells.lean new file mode 100644 index 0000000000000000000000000000000000000000..453f765f7f4f93faa00e308895278430cdc52330 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/BoundaryCells.lean @@ -0,0 +1,184 @@ +import OAI.CategoryTheory.Globular.CylinderPresentations + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularSet.LiftStage +variable {A X Y : GlobularSet.{v}} {p : Hom X Y} {f : Hom A Y} {m : ℕ} +theorem evalFace_app (s : LiftStage p f m) {k j : ℕ} (a : Globe.Face k j) + (hj : j ≤ m) (hk : k ≤ m) (x : A.Cell j) : + s.app k hk (A.evalFace a x) = X.evalFace a (s.app j hj x) := by + cases a with + | id => rfl + | @face j h side => + change s.app k hk (A.faceMap h side x) = X.faceMap h side (s.app j hj x) + induction j, h using Nat.le_induction with + | base => + simp only [GlobularSet.faceMap_succ] + cases side + · exact s.source_app k hj x + · exact s.target_app k hj x + | succ j h ih => + rw [A.faceMap_source h side, X.faceMap_source h side, ← s.source_app j hj] + exact ih (by omega) (A.source j x) +end GlobularSet.LiftStage +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] (B : GlobularFrame K) + +def diskDiagram (j : ℕ) {Y : K} (a : B.obj j ⟶ Y) : + GlobularSet.Hom (GlobularPresheaf.disk.{v} j).underlying (B.homGlob Y) where + app k x := B.diagram.eval x.down ≫ a + source_app k x := by + change B.diagram.eval ((Globe.source k) ≫ x.down) ≫ a = + B.diagram.source k ≫ B.diagram.eval x.down ≫ a + have h := B.diagram.functor.map_comp (Globe.source k) x.down + change B.diagram.eval _ = B.diagram.eval (Globe.source k) ≫ B.diagram.eval x.down at h + erw [h, Category.assoc] + congr 1 + exact CoGlobularObject.face_succ _ _ false + target_app k x := by + change B.diagram.eval ((Globe.target k) ≫ x.down) ≫ a = + B.diagram.target k ≫ B.diagram.eval x.down ≫ a + have h := B.diagram.functor.map_comp (Globe.target k) x.down + change B.diagram.eval _ = B.diagram.eval (Globe.target k) ≫ B.diagram.eval x.down at h + erw [h, Category.assoc] + congr 1 + exact CoGlobularObject.face_succ _ _ true + +theorem diskDiagram_cell {j : ℕ} {Y : K} + (f : GlobularSet.Hom (GlobularPresheaf.disk.{v} j).underlying (B.homGlob Y)) + (k : ℕ) (x : (GlobularPresheaf.disk.{v} j).underlying.Cell k) : + f.app k x = B.diagram.eval x.down ≫ f.app j ⟨𝟙 _⟩ := by + have h := f.evalFace_app x.down ⟨𝟙 _⟩ + erw [GlobularPresheaf.underlying_evalFace] at h + change f.app k ⟨x.down ≫ 𝟙 _⟩ = _ at h + rw [Category.comp_id] at h + exact h.trans (B.homGlob_eval _ _ _) + +noncomputable def boundaryCell (j k : ℕ) (hk : k ≤ j) (ε : Bool) : B.obj k ⟶ B.bd (j+1) := + if h : k = j then eqToHom (congrArg B.obj h) ≫ (if ε then B.right j else B.left j) + else B.diagram.face (by omega : k < j) ε ≫ B.left j + +theorem boundaryCell_top (j : ℕ) (ε : Bool) : + B.boundaryCell j j le_rfl ε = if ε then B.right j else B.left j := by + simp only [boundaryCell, dite_eq_left rfl, eqToHom_refl, Category.id_comp] +theorem boundaryCell_low {j k : ℕ} (h : k < j) (ε : Bool) : + B.boundaryCell j k (by omega) ε = B.diagram.face h ε ≫ B.left j := by + simp only [boundaryCell, dite_eq_right (show k ≠ j by omega)] + rfl + +@[reassoc] theorem boundaryCell_inc (j k : ℕ) (hk : k ≤ j) (ε : Bool) : + B.boundaryCell j k hk ε ≫ B.inc (j+1) = B.diagram.face (by omega : k < j+1) ε := by + by_cases h : k = j + · subst k + rw [B.boundaryCell_top, CoGlobularObject.face_succ] + cases ε <;> rfl + · have hk' : k < j := by omega + erw [B.boundaryCell_low hk', Category.assoc] + exact B.diagram.face_adjacent hk' ε false + +theorem boundaryCell_adjacent (j k : ℕ) (hk : k+1 ≤ j) (ε δ : Bool) : + B.diagram.adjacent k δ ≫ B.boundaryCell j (k+1) hk ε = + B.boundaryCell j k (by omega) δ := by + by_cases h : k+1 = j + · subst j + rw [B.boundaryCell_top, B.boundaryCell_low (Nat.lt_succ_self k), + CoGlobularObject.face_succ] + cases ε with + | false => rfl + | true => + cases δ <;> change (_ ≫ B.inc (k+1)) ≫ B.right (k+1) = + (_ ≫ B.inc (k+1)) ≫ B.left (k+1) + all_goals + exact (Category.assoc _ _ _).trans + ((congrArg (_ ≫ ·) (B.square (k+1)).w.symm).trans + (Category.assoc _ _ _).symm) + · have hk' : k+1 < j := by omega + erw [B.boundaryCell_low hk', B.boundaryCell_low (by omega : k < j), ← Category.assoc] + erw [← B.diagram.face_succ k δ, B.diagram.face_comp] + +noncomputable def boundaryApp (j k : ℕ) (hk : k ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell k) : B.obj k ⟶ B.bd (j+1) := by + change ULift.{v} (Globe.Face _ (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face _ ε => exact B.boundaryCell j k hk ε + +@[simp] theorem boundaryApp_face (j k : ℕ) (hk : k ≤ j) (ε : Bool) : + B.boundaryApp j k hk ⟨Globe.Face.face (by omega : k < j+1) ε⟩ = B.boundaryCell j k hk ε := rfl + +theorem boundaryApp_source (j k : ℕ) (hk : k+1 ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell (k+1)) : + B.boundaryApp j k (by omega) ((GlobularPresheaf.disk (j+1)).underlying.source k x) = + B.diagram.source k ≫ B.boundaryApp j (k+1) hk x := by + change ULift.{v} (Globe.Face _ (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face h ε => exact (B.boundaryCell_adjacent j k hk ε false).symm +theorem boundaryApp_target (j k : ℕ) (hk : k+1 ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell (k+1)) : + B.boundaryApp j k (by omega) ((GlobularPresheaf.disk (j+1)).underlying.target k x) = + B.diagram.target k ≫ B.boundaryApp j (k+1) hk x := by + change ULift.{v} (Globe.Face _ (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face h ε => exact (B.boundaryCell_adjacent j k hk ε true).symm + +@[reassoc] theorem boundaryApp_inc (j k : ℕ) (hk : k ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell k) : + B.boundaryApp j k hk x ≫ B.inc (j+1) = B.diagram.eval x.down := by + change ULift.{v} (Globe.Face _ (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face h ε => exact B.boundaryCell_inc j k hk ε + +variable {D : GlobularFrame K} +namespace Hom +variable {B} +variable (e : Hom D B) +@[reassoc] theorem face_naturality {j k : ℕ} (h : j < k) (ε : Bool) : + D.diagram.face h ε ≫ e.obj k = e.obj j ≫ B.diagram.face h ε := by + induction k, h using Nat.le_induction with + | base => + rw [CoGlobularObject.face_succ, CoGlobularObject.face_succ] + cases ε + · exact e.source_naturality j + · exact e.target_naturality j + | succ k h ih => + erw [← D.diagram.face_adjacent h ε false, Category.assoc, e.source_naturality, + ← Category.assoc, ih, Category.assoc, B.diagram.face_adjacent h ε false] + rfl + +@[reassoc] theorem boundaryCell_naturality (j k : ℕ) (hk : k ≤ j) (ε : Bool) : + D.boundaryCell j k hk ε ≫ e.bd (j+1) = e.obj k ≫ B.boundaryCell j k hk ε := by + by_cases h : k = j + · subst k + rw [D.boundaryCell_top, B.boundaryCell_top] + cases ε + · exact e.left j + · exact e.right j + · have hk' : k < j := by omega + erw [D.boundaryCell_low hk', B.boundaryCell_low hk', Category.assoc, e.left, + ← Category.assoc, e.face_naturality, Category.assoc] + rfl + +@[reassoc] theorem boundaryApp_naturality (j k : ℕ) (hk : k ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell k) : + D.boundaryApp j k hk x ≫ e.bd (j+1) = e.obj k ≫ B.boundaryApp j k hk x := by + change ULift.{v} (Globe.Face _ (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face h ε => exact e.boundaryCell_naturality j k hk ε +end Hom +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Coglobular.lean b/lean/OAI/CategoryTheory/Globular/Coglobular.lean new file mode 100644 index 0000000000000000000000000000000000000000..71764122ba85bdd4d5deaa0d0c59d41b0d42f34b --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Coglobular.lean @@ -0,0 +1,349 @@ +import OAI.CategoryTheory.Globular.Whisker + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +structure CoGlobularObject (K : Type u) [Category.{v} K] where + obj : ℕ → K + source : ∀ n, obj n ⟶ obj (n+1) + target : ∀ n, obj n ⟶ obj (n+1) + source_source : ∀ n, source n ≫ source (n+1) = source n ≫ target (n+1) + target_source : ∀ n, target n ≫ source (n+1) = target n ≫ target (n+1) + +namespace CoGlobularObject +variable {K : Type u} [Category.{v} K] + +def adjacent (B : CoGlobularObject K) (n : ℕ) (ε : Bool) : B.obj n ⟶ B.obj (n+1) := + if ε then B.target n else B.source n + +theorem adjacent_pair (B : CoGlobularObject K) (n : ℕ) (ε δ : Bool) : + B.adjacent n ε ≫ B.adjacent (n+1) δ = B.adjacent n ε ≫ B.source (n+1) := by + cases ε <;> cases δ <;> simp only [adjacent, Bool.false_eq_true, ↓reduceIte] + · exact (B.source_source n).symm + · exact (B.target_source n).symm + +def face (B : CoGlobularObject K) {m k : ℕ} (h : m < k) (ε : Bool) : B.obj m ⟶ B.obj k := + match k with + | 0 => False.elim (by omega) + | k+1 => if e : m = k then eqToHom (congrArg B.obj e) ≫ B.adjacent k ε + else B.face (by omega : m < k) ε ≫ B.source k + +@[simp] theorem face_succ (B : CoGlobularObject K) (n : ℕ) (ε : Bool) : + B.face (Nat.lt_succ_self n) ε = B.adjacent n ε := by + rw [face, dite_eq_left rfl] + simp + +theorem face_adjacent (B : CoGlobularObject K) {m k : ℕ} (h : m < k) (ε δ : Bool) : + B.face h ε ≫ B.adjacent k δ = B.face (by omega : m < k+1) ε := by + induction k with + | zero => omega + | succ k ih => + by_cases e : m = k + · subst m + rw [face_succ, B.adjacent_pair] + rw [face, dite_eq_right (by omega)] + rw [face_succ] + · have hm : m < k := by omega + rw [face, dite_eq_right e, Category.assoc] + change (B.face hm ε ≫ B.adjacent k false ≫ B.adjacent (k+1) δ) = _ + rw [B.adjacent_pair, ← Category.assoc] + rw [face, dite_eq_right (by omega), face, dite_eq_right e] + rfl + +theorem face_comp (B : CoGlobularObject K) {m k l : ℕ} (h : m < k) (h' : k < l) + (ε δ : Bool) : B.face h ε ≫ B.face h' δ = B.face (h.trans h') ε := by + induction l with + | zero => omega + | succ l ih => + by_cases e : k = l + · subst k + rw [face_succ] + exact B.face_adjacent h ε δ + · have hkl : k < l := by omega + rw [face, dite_eq_right e, ← Category.assoc, ih hkl] + exact B.face_adjacent (h.trans hkl) ε false + +def eval (B : CoGlobularObject K) {m n : ℕ} (f : Globe.Face m n) : B.obj m ⟶ B.obj n := + match f with + | .id _ => 𝟙 _ + | .face h ε => B.face h ε + +def functor (B : CoGlobularObject K) : Globe ⥤ K where + obj k := B.obj k.dim + map f := B.eval f + map_id _ := rfl + map_comp {X Y Z} f g := by + rcases X with ⟨x⟩ + rcases Y with ⟨y⟩ + rcases Z with ⟨z⟩ + change Globe.Face x y at f + change Globe.Face y z at g + cases f with + | id => exact (Category.id_comp _).symm + | face h ε => + cases g with + | id => exact (Category.comp_id _).symm + | face h' δ => exact (B.face_comp h h' ε δ).symm + +noncomputable def realization (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] : + GlobularPresheaf.{max v w} ⥤ K := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + exact uliftYoneda.{max v w}.leftKanExtension B.functor + +noncomputable def globeIso (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] + (k : ℕ) : B.realization.obj (GlobularPresheaf.disk.{max v w} k) ≅ B.obj k := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + exact (Presheaf.isExtensionAlongULiftYoneda B.functor).app (Globe.mk k) + +instance preservesColimits_realization (B : CoGlobularObject K) + [HasColimitsOfSize.{0,max v w} K] : PreservesColimits B.realization := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + unfold realization + infer_instance + +@[reassoc] theorem globeIso_naturality (B : CoGlobularObject K) + [HasColimitsOfSize.{0,max v w} K] {j k : ℕ} (f : Globe.Face j k) : + B.realization.map (uliftYoneda.map f) ≫ (B.globeIso k).hom = + (B.globeIso j).hom ≫ B.eval f := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + exact (Presheaf.isExtensionAlongULiftYoneda B.functor).hom.naturality f + +noncomputable def homEquiv (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] + (S : GlobularPresheaf.{max v w}) (Y : K) : + (B.realization.obj S ⟶ Y) ≃ (S ⟶ (Presheaf.restrictedULiftYoneda.{w} B.functor).obj Y) := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + exact (Presheaf.uliftYonedaAdjunction _ (uliftYoneda.leftKanExtensionUnit B.functor)).homEquiv S Y + +noncomputable def cell (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] + (S : GlobularPresheaf.{max v w}) (k : ℕ) (x : S.obj (op (Globe.mk k))) : + B.obj k ⟶ B.realization.obj S := + (B.globeIso k).inv ≫ B.realization.map (uliftYonedaEquiv.symm x) + +@[simp] theorem homEquiv_app (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] + (S : GlobularPresheaf.{max v w}) (Y : K) (f : B.realization.obj S ⟶ Y) + (k : ℕ) (x : S.obj (op (Globe.mk k))) : + ((B.homEquiv S Y) f).app (op (Globe.mk k)) x = ULift.up (B.cell S k x ≫ f) := by + let : (uliftYoneda.{max v w}).HasPointwiseLeftKanExtension B.functor := fun _ => by infer_instance + change ((uliftYoneda.{max v w}).leftKanExtension B.functor).obj S ⟶ Y at f + change ((Presheaf.uliftYonedaAdjunction _ (uliftYoneda.leftKanExtensionUnit B.functor)).homEquiv S Y f).app _ x = _ + rw [Presheaf.uliftYonedaAdjunction_homEquiv_app] + congr 1 + exact (Category.assoc _ _ _).symm + +theorem hom_ext (B : CoGlobularObject K) [HasColimitsOfSize.{0,max v w} K] + {S : GlobularPresheaf.{max v w}} {Y : K} {f g : B.realization.obj S ⟶ Y} + (h : ∀ k x, B.cell S k x ≫ f = B.cell S k x ≫ g) : f = g := by + apply (B.homEquiv S Y).injective + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + rcases k with ⟨⟨k⟩⟩ + simp only [homEquiv_app] + exact congrArg ULift.up (h k x) + +end CoGlobularObject + +structure FiniteCoGlobularObject (K : Type u) [Category.{v} K] (q : ℕ) where + obj : ∀ k, k ≤ q → K + source : ∀ k (hk : k+1 ≤ q), obj k (by omega) ⟶ obj (k+1) hk + target : ∀ k (hk : k+1 ≤ q), obj k (by omega) ⟶ obj (k+1) hk + source_source : ∀ k (hk : k+2 ≤ q), + source k (by omega) ≫ source (k+1) hk = source k (by omega) ≫ target (k+1) hk + target_source : ∀ k (hk : k+2 ≤ q), + target k (by omega) ≫ source (k+1) hk = target k (by omega) ≫ target (k+1) hk + +namespace FiniteCoGlobularObject +variable {K : Type u} [Category.{v} K] [HasTerminal K] {q : ℕ} + +noncomputable def completedObj (B : FiniteCoGlobularObject K q) (k : ℕ) : K := + if h : k ≤ q then B.obj k h else ⊤_ K + +theorem completedObj_eq (B : FiniteCoGlobularObject K q) (k : ℕ) (h : k ≤ q) : + B.completedObj k = B.obj k h := dite_eq_left h + +theorem completedObj_terminal (B : FiniteCoGlobularObject K q) (k : ℕ) (h : ¬ k ≤ q) : + B.completedObj k = ⊤_ K := dite_eq_right h + +noncomputable def completedArrow (B : FiniteCoGlobularObject K q) (k : ℕ) (ε : Bool) : + B.completedObj k ⟶ B.completedObj (k+1) := + if h : k+1 ≤ q then + eqToHom (B.completedObj_eq k (by omega)) ≫ + (if ε then B.target k h else B.source k h) ≫ + eqToHom (B.completedObj_eq (k+1) h).symm + else terminal.from _ ≫ eqToHom (B.completedObj_terminal (k+1) h).symm + +theorem completed_identity (B : FiniteCoGlobularObject K q) (k : ℕ) (ε : Bool) : + B.completedArrow k ε ≫ B.completedArrow (k+1) false = + B.completedArrow k ε ≫ B.completedArrow (k+1) true := by + by_cases h : k+2 ≤ q + · simp only [completedArrow, h, show k+1 ≤ q by omega, ↓reduceDIte] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + cases ε <;> simp only [Bool.false_eq_true, ↓reduceIte] + · rw [← Category.assoc (B.source k _), B.source_source k h, Category.assoc] + · rw [← Category.assoc (B.target k _), B.target_source k h, Category.assoc] + · have ht : IsTerminal (B.completedObj (k+2)) := by + simpa only [completedObj, dite_eq_right h] using (terminalIsTerminal (C := K)) + exact ht.hom_ext _ _ + +noncomputable abbrev complete (B : FiniteCoGlobularObject K q) : CoGlobularObject K where + obj := B.completedObj + source k := B.completedArrow k false + target k := B.completedArrow k true + source_source k := B.completed_identity k false + target_source k := B.completed_identity k true + +noncomputable def map {L : Type w} [Category.{v} L] + (B : FiniteCoGlobularObject K q) (F : K ⥤ L) : FiniteCoGlobularObject L q where + obj k hk := F.obj (B.obj k hk) + source k hk := F.map (B.source k hk) + target k hk := F.map (B.target k hk) + source_source k hk := by rw [← F.map_comp, ← F.map_comp, B.source_source k hk] + target_source k hk := by rw [← F.map_comp, ← F.map_comp, B.target_source k hk] + +noncomputable def lowIso (B : FiniteCoGlobularObject K q) (k : ℕ) (hk : k ≤ q) : + B.complete.obj k ≅ B.obj k hk := eqToIso (B.completedObj_eq k hk) + +noncomputable def face (B : FiniteCoGlobularObject K q) {j k : ℕ} + (h : j < k) (hk : k ≤ q) (ε : Bool) : B.obj j (by omega) ⟶ B.obj k hk := + (B.lowIso j (by omega)).inv ≫ B.complete.face h ε ≫ (B.lowIso k hk).hom + +@[simp] theorem face_succ (B : FiniteCoGlobularObject K q) (k : ℕ) + (hk : k+1 ≤ q) (ε : Bool) : + B.face (Nat.lt_succ_self k) hk ε = if ε then B.target k hk else B.source k hk := by + rw [face, CoGlobularObject.face_succ] + have e : B.complete.adjacent k ε = B.completedArrow k ε := by cases ε <;> rfl + rw [e] + change eqToHom (B.completedObj_eq k (by omega)).symm ≫ B.completedArrow k ε ≫ + eqToHom (B.completedObj_eq (k+1) hk) = _ + rw [completedArrow, dite_eq_left hk] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_trans, eqToHom_refl, + Category.id_comp, Category.comp_id] + +theorem face_comp (B : FiniteCoGlobularObject K q) {i j k : ℕ} + (h : i < j) (h' : j < k) (hk : k ≤ q) (ε δ : Bool) : + B.face h (by omega) ε ≫ B.face h' hk δ = B.face (h.trans h') hk ε := by + simp only [face, Category.assoc, Iso.hom_inv_id_assoc] + rw [← Category.assoc (B.complete.face h ε), B.complete.face_comp] + +theorem face_adjacent (B : FiniteCoGlobularObject K q) {j k : ℕ} + (h : j < k) (hk : k+1 ≤ q) (ε δ : Bool) : + B.face h (by omega) ε ≫ (if δ then B.target k hk else B.source k hk) = + B.face (by omega : j < k+1) hk ε := by + rw [← B.face_succ k hk δ] + exact B.face_comp h (Nat.lt_succ_self k) hk ε δ + +noncomputable def realization (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] : GlobularPresheaf.{max v w} ⥤ K := B.complete.realization + +noncomputable def globeIso (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] (k : ℕ) (hk : k ≤ q) : + B.realization.obj (GlobularPresheaf.disk.{max v w} k) ≅ B.obj k hk := + (B.complete.globeIso k) ≪≫ B.lowIso k hk + +@[reassoc] theorem globeIso_face (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] {j k : ℕ} (h : j < k) (hk : k ≤ q) (ε : Bool) : + B.realization.map (GlobularPresheaf.face h ε) ≫ (B.globeIso k hk).hom = + (B.globeIso j (by omega)).hom ≫ B.face h hk ε := by + change B.complete.realization.map (GlobularPresheaf.face h ε) ≫ + ((B.complete.globeIso k).hom ≫ (B.lowIso k hk).hom) = + ((B.complete.globeIso j).hom ≫ (B.lowIso j (by omega)).hom) ≫ + (B.lowIso j (by omega)).inv ≫ B.complete.face h ε ≫ (B.lowIso k hk).hom + simp only [Category.assoc, Iso.hom_inv_id_assoc] + have e := B.complete.globeIso_naturality (Globe.face h ε) + change B.complete.realization.map (GlobularPresheaf.face h ε) ≫ + (B.complete.globeIso k).hom = (B.complete.globeIso j).hom ≫ B.complete.face h ε at e + rw [← Category.assoc, e, Category.assoc] + +end FiniteCoGlobularObject + +namespace Shape +open GlobularTheory + +def linearBlock (n k : ℕ) : Shape := + if k < n then globe k else if k = n then globe (n+1) else tripleShape n + +theorem linearBlock_low (n k : ℕ) (h : k < n) : linearBlock n k = globe k := by + simp only [linearBlock, ite_eq_left h] + +theorem linearBlock_center (n k : ℕ) (h : k = n) : linearBlock n k = globe (n+1) := by + subst k + simp only [linearBlock, lt_self_iff_false, ↓reduceIte] + +theorem linearBlock_high (n k : ℕ) (h : n < k) : linearBlock n k = tripleShape n := by + simp only [linearBlock, ite_eq_right (by omega : ¬ k < n), ite_eq_right (by omega : ¬ k = n)] + +noncomputable def linearAdjacent (n k : ℕ) (hk : k ≤ n) (ε : Bool) : + linearBlock n k ⟶ linearBlock n (k+1) := + if h : k < n then + if h' : k+1 < n then + eqToHom (linearBlock_low n k h) ≫ face (Nat.lt_succ_self k) ε ≫ + eqToHom (linearBlock_low n (k+1) h').symm + else + eqToHom (linearBlock_low n k h) ≫ face (by omega : k < n+1) ε ≫ + eqToHom (linearBlock_center n (k+1) (by omega)).symm + else + eqToHom (linearBlock_center n k (by omega)) ≫ + (if ε then tripleLast n else tripleFirst n) ≫ + eqToHom (linearBlock_high n (k+1) (by omega)).symm + +theorem face_comp {a b c : ℕ} (h : a < b) (h' : b < c) (ε δ : Bool) : + face h ε ≫ face h' δ = face (h.trans h') ε := by + change uliftYoneda.map (Globe.face h ε) ≫ uliftYoneda.map (Globe.face h' δ) = _ + rw [← uliftYoneda.map_comp] + rfl + +theorem face_triple_first_last (n k : ℕ) (hk : k < n) (ε : Bool) : + face (by omega : k < n+1) ε ≫ tripleFirst n = + face (by omega : k < n+1) ε ≫ tripleLast n := by + have h₀ := congrArg (fun f => face hk ε ≫ f) (triple_first_middle n) + have h₁ := congrArg (fun f => face hk ε ≫ f) (triple_middle_last n) + rw [← Category.assoc, ← Category.assoc] at h₀ h₁ + change (face hk ε ≫ face (Nat.lt_succ_self n) true) ≫ tripleFirst n = + (face hk ε ≫ face (Nat.lt_succ_self n) false) ≫ tripleMiddle n at h₀ + change (face hk ε ≫ face (Nat.lt_succ_self n) true) ≫ tripleMiddle n = + (face hk ε ≫ face (Nat.lt_succ_self n) false) ≫ tripleLast n at h₁ + rw [face_comp, face_comp] at h₀ h₁ + exact h₀.trans h₁ + +theorem linearAdjacent_identity (n k : ℕ) (hk : k+2 ≤ n+1) (ε : Bool) : + linearAdjacent n k (by omega) ε ≫ linearAdjacent n (k+1) (by omega) false = + linearAdjacent n k (by omega) ε ≫ linearAdjacent n (k+1) (by omega) true := by + have h : k < n := by omega + by_cases h' : k+1 < n + · by_cases h'' : k+2 < n + · simp only [linearAdjacent, dite_eq_left h, dite_eq_left h', dite_eq_left h''] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [← Category.assoc (face _ ε), face_comp, ← Category.assoc (face _ ε), face_comp] + · simp only [linearAdjacent, dite_eq_left h, dite_eq_left h', dite_eq_right h''] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [← Category.assoc (face _ ε), face_comp, ← Category.assoc (face _ ε), face_comp] + · simp only [linearAdjacent, dite_eq_left h, dite_eq_right h', Bool.false_eq_true, ↓reduceIte] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [← Category.assoc (face _ ε), face_triple_first_last n k h ε, Category.assoc] + +noncomputable def linearDiagram (n : ℕ) : FiniteCoGlobularObject Shape (n+1) where + obj k _ := linearBlock n k + source k hk := linearAdjacent n k (by omega) false + target k hk := linearAdjacent n k (by omega) true + source_source k hk := linearAdjacent_identity n k hk false + target_source k hk := linearAdjacent_identity n k hk true + +noncomputable def linearGlobularDiagram (n : ℕ) : FiniteCoGlobularObject GlobularPresheaf.{0} (n+1) := + (linearDiagram n).map realization + +noncomputable def linearization (n : ℕ) : GlobularPresheaf.{0} ⥤ GlobularPresheaf.{0} := + (linearGlobularDiagram n).realization + +noncomputable def linearGlobeIso (n k : ℕ) (hk : k ≤ n+1) : + (linearization n).obj (GlobularPresheaf.disk k) ≅ (linearBlock n k).realize := + (linearGlobularDiagram n).globeIso k hk + +end Shape +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Colimits.lean b/lean/OAI/CategoryTheory/Globular/Colimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..56c4f68a59185dd8ca49a98594a519e2fc6bda82 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Colimits.lean @@ -0,0 +1,352 @@ +import OAI.CategoryTheory.Globular.Reflection + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularSet + +theorem source_bijective_of_coskeletal (X : GlobularSet.{u}) (q n : ℕ) + (hX : ∀ j, q < j → Function.Bijective (X.boundary j)) (hn : q < n) : + Function.Bijective (X.source n) := by + have ht (z : X.Cell (n+1)) : X.source n z = X.target n z := + (hX n hn).1 ((X.parallel_iff_boundary_eq n _ _).1 (Joined.parallel ⟨z, rfl, rfl⟩)) + constructor + · intro x y h + apply (hX (n+1) (by omega)).1 + exact Subtype.ext (Prod.ext h ((ht x).symm.trans (h.trans (ht y)))) + · intro x + have hp : X.Parallel n x x := by cases n <;> simp [Parallel] + obtain ⟨z, hz⟩ := (hX (n+1) (by omega)).2 ⟨(x, x), hp⟩ + exact ⟨z, congrArg (fun b => b.1.1) hz⟩ + +end GlobularSet + +namespace GlobularTheory.Model + +@[simp] theorem cellEquiv_comp {C : GlobularTheory.{v}} {X Y : C.Model} + (n : ℕ) (a : disk C n ⟶ X) (f : X ⟶ Y) : + cellEquiv Y n (a ≫ f) = (underlyingMap f).app n (cellEquiv X n a) := rfl + +@[simp] theorem cellEquiv_J {C : GlobularTheory.{v}} {X : C.Model} + (n : ℕ) (a : disk C (n+1) ⟶ X) : + cellEquiv X n (J C n ≫ a) = X.underlying.source n (cellEquiv X (n+1) a) := by + exact (yonedaEquiv_naturality a + (show (⟨Shape.globe n⟩ : C.Obj) ⟶ ⟨Shape.globe (n+1)⟩ from + C.base (Shape.source n))).symm + +theorem J_coskeletalLocalMap (C : GlobularTheory.{v}) (k n : ℕ) (hkn : k < n) : + CoskeletalLocalMap k (J C n) := by + intro Z hZ g + obtain ⟨z, hz, unique⟩ := (Z.underlying.source_bijective_of_coskeletal k n hZ hkn).existsUnique + (cellEquiv Z n g) + refine ⟨(cellEquiv Z (n+1)).symm z, ?_, ?_⟩ + · apply (cellEquiv Z n).injective + simpa only [cellEquiv_J, Equiv.apply_symm_apply] using hz + · intro a ha + apply (cellEquiv Z (n+1)).injective + rw [Equiv.apply_symm_apply] + apply unique + exact (cellEquiv_J n a).symm.trans (congrArg (cellEquiv Z n) ha) + +theorem CoskeletalLocalMap.pushout {C : GlobularTheory.{v}} (q : ℕ) + {A B X Y : C.Model} (f : A ⟶ B) (a : A ⟶ X) (i : X ⟶ Y) (b : B ⟶ Y) + (sq : IsPushout a f i b) (hf : CoskeletalLocalMap q f) : + CoskeletalLocalMap q i := by + intro Z hZ x + obtain ⟨z, hz, unique⟩ := hf Z hZ (a ≫ x) + refine ⟨sq.desc x z hz.symm, sq.inl_desc _ _ _, ?_⟩ + intro y hy + apply sq.hom_ext + · exact hy.trans (sq.inl_desc _ _ _).symm + · have hz' : b ≫ y = z := unique (b ≫ y) + ((Category.assoc f b y).symm.trans + ((congrArg (· ≫ y) sq.w.symm).trans ((Category.assoc a i y).trans (congrArg (a ≫ ·) hy)))) + exact hz'.trans (sq.inr_desc _ _ _).symm + +theorem elementary_pushout_low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X Y : C.Model} (n : ℕ) (a : disk C n ⟶ X) (i : X ⟶ Y) + (b : disk C (n+1) ⟶ Y) (sq : IsPushout a (J C n) i b) + (k : ℕ) (hkn : k < n) : + Function.Bijective ((underlyingMap i).app k) := + (coskeletalLocalMap_iff hC k i).1 + ((J_coskeletalLocalMap C k n hkn).pushout k (J C n) a i b sq) k le_rfl + +theorem low_bijections_eq_local (C : GlobularTheory.{v}) (hC : C.IsCoherator) (q : ℕ) : + (fun {X Y : C.Model} (f : X ⟶ Y) => + ∀ k, k ≤ q → Function.Bijective ((underlyingMap f).app k) : MorphismProperty C.Model) = + ObjectProperty.isLocal (fun X : C.Model => X.IsCoskeletal q) := by + ext X Y f + rw [← coskeletalLocalMap_iff hC q f] + exact forall_congr' (fun Z => imp_congr_right (fun _ => + (Function.bijective_iff_existsUnique (fun g : Y ⟶ Z => f ≫ g)).symm)) + +theorem low_bijective_transfinite {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {X Y : C.Model} (f : X ⟶ Y) + {J : Type v} [LinearOrder J] [OrderBot J] [SuccOrder J] [WellFoundedLT J] + (H : TransfiniteCompositionOfShape J f) + (hH : ∀ j, ¬ IsMax j → ∀ k, k ≤ q → Function.Bijective + ((underlyingMap (H.F.map (homOfLE (Order.le_succ j)))).app k)) : + ∀ k, k ≤ q → Function.Bijective ((underlyingMap f).app k) := by + let P : ObjectProperty C.Model := fun X => X.IsCoskeletal q + have hf : P.isLocal f := P.isLocal.transfiniteCompositionsOfShape_le J f + ⟨{ toTransfiniteCompositionOfShape := H + map_mem j hj := by + change ObjectProperty.isLocal (fun X : C.Model => X.IsCoskeletal q) _ + rw [← low_bijections_eq_local C hC q] + exact hH j hj }⟩ + change ObjectProperty.isLocal (fun X : C.Model => X.IsCoskeletal q) f at hf + rwa [← low_bijections_eq_local C hC q] at hf + +end GlobularTheory.Model + +namespace GlobularSet + +theorem exactBoundaryTest_split_into_coskeletal {X Y : GlobularSet.{u}} + (i : Hom X Y) (r : Hom Y X) (hr : i.comp r = Hom.id X) (q : ℕ) + (hlo : ∀ k, k < q → Function.Surjective (i.app k)) + (hhi : ∀ j, q < j → Function.Surjective (Y.boundary j)) + (hrefl : ∀ j x, Y.Joined j x x) : ExactBoundaryTest i := by + intro d b y hy + have hb : X.boundary d (r.app d y) = b := by + rw [← r.boundary_app, hy, ← Hom.boundaryMap_comp] + have hh := congrArg (fun f : Hom X X => f.boundaryMap d b) hr + cases d with + | zero => exact PUnit.ext _ _ + | succ d => exact hh + refine ⟨r.app d y, hb, ?_⟩ + by_cases hd : d < q + · obtain ⟨x, rfl⟩ := hlo d hd y + have hx : r.app d (i.app d x) = x := congrArg (fun f : Hom X X => f.app d x) hr + rw [hx] + exact hrefl d _ + · have hp : Y.Parallel d (i.app d (r.app d y)) y := by + apply (Y.parallel_iff_boundary_eq d _ _).2 + rw [← i.boundary_app, hb, hy] + obtain ⟨z, hz⟩ := hhi (d+1) (by omega) ⟨(_, _), hp⟩ + exact ⟨z, congrArg (fun z => z.1.1) hz, congrArg (fun z => z.1.2) hz⟩ + +end GlobularSet + +namespace GlobularTheory.Model + +theorem elementary_pushout_to_coskeletal {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X Y : C.Model} (n : ℕ) (a : disk C n ⟶ X) (i : X ⟶ Y) + (b : disk C (n+1) ⟶ Y) (sq : IsPushout a (J C n) i b) + (hY : Y.IsCoskeletal n) : WeakEquivalence hC i := by + obtain ⟨r, hr⟩ := elementary_pushout_retraction hC n a i b sq + apply weakEquivalence_of_exactBoundaryTest hC + apply GlobularSet.exactBoundaryTest_split_into_coskeletal (underlyingMap i) (underlyingMap r) + (show (underlyingMap i).comp (underlyingMap r) = GlobularSet.Hom.id X.underlying from + congrArg (fun f : X ⟶ X => underlyingMap f) hr) n + · exact fun k hk => (elementary_pushout_low_bijective hC n a i b sq k hk).2 + · exact fun j hj => (hY j hj).2 + · exact Y.joined_refl hC + +end GlobularTheory.Model + +namespace GlobularTheory + +structure SumIndex where + S : Shape + b : ℕ + h : ℕ + left : b < S.1 + right : b < h + +noncomputable def sumDiagram (C : GlobularTheory.{v}) (t : SumIndex) : + WalkingCospan ⥤ C.Objᵒᵖ := + cospan (C.toTheoryData.arity.map (t.S.seam t.left)).op + (C.toTheoryData.arity.map (Shape.face t.right false)).op + +noncomputable def sumCone (C : GlobularTheory.{v}) (t : SumIndex) : Cone (C.sumDiagram t) := + PullbackCone.mk (C.toTheoryData.arity.map (t.S.inl t.b t.h t.left t.right)).op + (C.toTheoryData.arity.map (t.S.inr t.b t.h t.left t.right)).op + (by simpa only [← op_comp] using congrArg Quiver.Hom.op (C.sums t.S t.b t.h t.left t.right).w) + +noncomputable def sumConeIsLimit (C : GlobularTheory.{v}) (t : SumIndex) : + IsLimit (C.sumCone t) := + (C.sums t.S t.b t.h t.left t.right).op.flip.isLimit + +noncomputable def sumComparison (C : GlobularTheory.{v}) (t : SumIndex) := + Presheaf.coconePtToShrinkYoneda (C.sumCone t) + (colimit.isColimit ((C.sumDiagram t).leftOp ⋙ shrinkYoneda.{v})) + +noncomputable def sumComparisons (C : GlobularTheory.{v}) : + MorphismProperty (C.Objᵒᵖ ⥤ Type v) := + MorphismProperty.ofHoms C.sumComparison + +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +instance shrinkYoneda_cardinalPresentable (C : GlobularTheory.{v}) + (S : C.Obj) : IsCardinalPresentable (shrinkYoneda.{v}.obj S) Cardinal.aleph0.{v} where + preservesColimitOfShape J _ _ := by + let e : coyoneda.obj (op (shrinkYoneda.{v}.obj S)) ≅ + (evaluation C.Objᵒᵖ (Type v)).obj (op S) := + NatIso.ofComponents (fun P => Equiv.toIso shrinkYonedaEquiv) + exact preservesColimitsOfShape_of_natIso e.symm + +instance sumComparison_source_presentable (C : GlobularTheory.{v}) (t : SumIndex) : + IsCardinalPresentable (colimit ((C.sumDiagram t).leftOp ⋙ shrinkYoneda.{v})) + Cardinal.aleph0.{v} := by + let (k : WalkingCospanᵒᵖ) : IsCardinalPresentable + (((C.sumDiagram t).leftOp ⋙ shrinkYoneda.{v}).obj k) Cardinal.aleph0.{v} := + C.shrinkYoneda_cardinalPresentable (((C.sumDiagram t).obj k.unop).unop) + apply isCardinalPresentable_of_isColimit _ (colimit.isColimit _) Cardinal.aleph0.{v} + exact hasCardinalLT_of_finite _ _ le_rfl + +theorem sumComparisons_rightAdjoint (C : GlobularTheory.{v}) : + C.sumComparisons.isLocal.ι.IsRightAdjoint := by + let : MorphismProperty.IsSmall.{v} (MorphismProperty.ofHoms C.sumComparison) := + MorphismProperty.isSmall_ofHoms.{v} (ι := SumIndex) C.sumComparison + change (MorphismProperty.ofHoms C.sumComparison).isLocal.ι.IsRightAdjoint + apply MorphismProperty.isRightAdjoint_ι_isLocal _ Cardinal.aleph0.{v} + rintro X Y f ⟨t⟩ + exact ⟨C.sumComparison_source_presentable t, + C.shrinkYoneda_cardinalPresentable (C.sumCone t).pt.unop⟩ + + +theorem sumComparison_local_iff (C : GlobularTheory.{v}) + (P : C.Objᵒᵖ ⥤ Type v) (t : SumIndex) : + (MorphismProperty.single (C.sumComparison t)).isLocal P ↔ + IsPullback + (P.map (C.toTheoryData.arity.map (t.S.inl t.b t.h t.left t.right)).op) + (P.map (C.toTheoryData.arity.map (t.S.inr t.b t.h t.left t.right)).op) + (P.map (C.toTheoryData.arity.map (t.S.seam t.left)).op) + (P.map (C.toTheoryData.arity.map (Shape.face t.right false)).op) := by + unfold sumComparison + rw [← Presheaf.nonempty_isLimit_mapCone_iff.{v} (C.sumCone t) + (colimit.isColimit ((C.sumDiagram t).leftOp ⋙ shrinkYoneda.{v})) P] + constructor + · rintro ⟨h⟩ + exact IsPullback.of_isLimit_cone h + · intro h + exact ⟨(PullbackCone.isLimitMapConeEquiv _ P).symm h.isLimit⟩ + +namespace Model + +theorem sums_local {C : GlobularTheory.{v}} (M : C.Model) : + C.sumComparisons.isLocal M.presheaf := by + rintro A B f ⟨t⟩ + exact (MorphismProperty.isLocal_single_iff_bijective _ _).1 + ((C.sumComparison_local_iff M.presheaf t).2 (M.sums t.S t.b t.h t.left t.right)) + +noncomputable def toLocal (C : GlobularTheory.{v}) : + C.Model ⥤ C.sumComparisons.isLocal.FullSubcategory where + obj X := ⟨X.presheaf, X.sums_local⟩ + map f := ObjectProperty.homMk f + +theorem local_sums (C : GlobularTheory.{v}) + (P : C.sumComparisons.isLocal.FullSubcategory) (t : SumIndex) : + IsPullback + (P.obj.map (C.toTheoryData.arity.map (t.S.inl t.b t.h t.left t.right)).op) + (P.obj.map (C.toTheoryData.arity.map (t.S.inr t.b t.h t.left t.right)).op) + (P.obj.map (C.toTheoryData.arity.map (t.S.seam t.left)).op) + (P.obj.map (C.toTheoryData.arity.map (Shape.face t.right false)).op) := by + apply (C.sumComparison_local_iff P.obj t).mp + apply (MorphismProperty.isLocal_single_iff_bijective (C.sumComparison t) P.obj).mpr + exact P.property (C.sumComparison t) (MorphismProperty.ofHoms.mk t) + +noncomputable def fromLocal (C : GlobularTheory.{v}) : + C.sumComparisons.isLocal.FullSubcategory ⥤ C.Model where + obj P := + { presheaf := P.obj + sums := fun S b h hl hr => local_sums C P ⟨S,b,h,hl,hr⟩ } + map f := f.hom + +noncomputable def localEquivalence (C : GlobularTheory.{v}) : + C.Model ≌ C.sumComparisons.isLocal.FullSubcategory where + functor := toLocal C + inverse := fromLocal C + unitIso := NatIso.ofComponents (fun X => Iso.refl X) + counitIso := NatIso.ofComponents (fun X => Iso.refl X) + +noncomputable instance hasColimits (C : GlobularTheory.{v}) : HasColimitsOfSize.{v,v} C.Model := by + let := C.sumComparisons_rightAdjoint + let : Reflective C.sumComparisons.isLocal.ι := + ⟨_, Adjunction.ofIsRightAdjoint C.sumComparisons.isLocal.ι⟩ + let : HasColimitsOfSize.{v,v} C.sumComparisons.isLocal.FullSubcategory := + hasColimits_of_reflective C.sumComparisons.isLocal.ι + exact Adjunction.has_colimits_of_equivalence (localEquivalence C).functor + +end Model +end GlobularTheory + +namespace GlobularTheory.Model + +abbrev CutoffModels (C : GlobularTheory.{v}) (q : ℕ) := + ObjectProperty.FullSubcategory (fun X : C.Model => X.IsCoskeletal q) + +noncomputable def chosenCutoff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) : C.Model := + (exists_cutoff_reflection hC X q).choose + +noncomputable def cutoffUnit {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) : X ⟶ chosenCutoff hC q X := + (exists_cutoff_reflection hC X q).choose_spec.choose + +theorem cutoffUnit_low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) (k : ℕ) (hk : k ≤ q) : + Function.Bijective ((underlyingMap (cutoffUnit hC q X)).app k) := + (exists_cutoff_reflection hC X q).choose_spec.choose_spec.1 k hk + +theorem chosenCutoff_coskeletal {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) : (chosenCutoff hC q X).IsCoskeletal q := + (exists_cutoff_reflection hC X q).choose_spec.choose_spec.2.1 + +theorem cutoffUnit_universal {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) (Y : CutoffModels C q) (f : X ⟶ Y.obj) : + ∃! l : chosenCutoff hC q X ⟶ Y.obj, cutoffUnit hC q X ≫ l = f := + (exists_cutoff_reflection hC X q).choose_spec.choose_spec.2.2 Y.obj Y.property f + +noncomputable def cutoffObject {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) : CutoffModels C q := + ⟨chosenCutoff hC q X, chosenCutoff_coskeletal hC q X⟩ + +noncomputable def cutoffEquiv {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) (Y : CutoffModels C q) : + (cutoffObject hC q X ⟶ Y) ≃ (X ⟶ Y.obj) := + Equiv.ofBijective (fun f => cutoffUnit hC q X ≫ f.hom) (by + constructor + · intro f g h + apply ObjectProperty.hom_ext + obtain ⟨_, _, hu⟩ := cutoffUnit_universal hC q X Y (cutoffUnit hC q X ≫ f.hom) + exact (hu f.hom rfl).trans (hu g.hom h.symm).symm + · intro f + obtain ⟨l, hl, _⟩ := cutoffUnit_universal hC q X Y f + exact ⟨ObjectProperty.homMk l, hl⟩) + +theorem cutoffEquiv_natural {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) (Y Y' : CutoffModels C q) (g : Y ⟶ Y') + (h : cutoffObject hC q X ⟶ Y) : + cutoffEquiv hC q X Y' (h ≫ g) = cutoffEquiv hC q X Y h ≫ g.hom := by + change cutoffUnit hC q X ≫ (h.hom ≫ g.hom) = (cutoffUnit hC q X ≫ h.hom) ≫ g.hom + exact (Category.assoc _ _ _).symm + +noncomputable def cutoffFunctor {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : C.Model ⥤ CutoffModels C q := + Adjunction.leftAdjointOfEquiv (G := (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q))) + (cutoffEquiv hC q) (cutoffEquiv_natural hC q) + +noncomputable def cutoffAdjunction {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : cutoffFunctor hC q ⊣ (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)) := + Adjunction.adjunctionOfEquivLeft _ _ + +@[instance_reducible] noncomputable def cutoffReflective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : Reflective (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)) := + ⟨cutoffFunctor hC q, cutoffAdjunction hC q⟩ + +theorem cutoff_hasColimits {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : HasColimitsOfSize.{v,v} (CutoffModels C q) := by + let := cutoffReflective hC q + exact hasColimits_of_reflective (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)) + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Composition.lean b/lean/OAI/CategoryTheory/Globular/Composition.lean new file mode 100644 index 0000000000000000000000000000000000000000..199e3e851a1ca136b098185d08d0983cf036a29c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Composition.lean @@ -0,0 +1,318 @@ +import OAI.CategoryTheory.Globular.Fillers + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model + +theorem sumTuple_ext {C : GlobularTheory.{v}} (X : C.Model) + (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) + {x y : X.presheaf.obj (op (⟨S.attach b h hl hr⟩ : C.Obj))} + (h₀ : X.eval (C.base (S.inl b h hl hr)) x = X.eval (C.base (S.inl b h hl hr)) y) + (h₁ : X.eval (C.base (S.inr b h hl hr)) x = X.eval (C.base (S.inr b h hl hr)) y) : x = y := + Types.ext_of_isPullback (X.sums S b h hl hr) h₀ h₁ + +theorem map_compositionTuple {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (n : ℕ) (a b : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) : + f.app (op (⟨compositionShape n⟩ : C.Obj)) (X.compositionTuple n a b hab) = + Y.compositionTuple n ((underlyingMap f).app (n+1) a) ((underlyingMap f).app (n+1) b) + (by rw [← (underlyingMap f).target_app, ← (underlyingMap f).source_app, hab]) := by + apply Y.sumTuple_ext (Shape.globe (n+1)) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + · change Y.eval (C.base (compositionLeft n)) (f.app _ _) = Y.eval (C.base (compositionLeft n)) _ + rw [← map_eval, compositionTuple_left, compositionTuple_left] + rfl + · change Y.eval (C.base (compositionRight n)) (f.app _ _) = Y.eval (C.base (compositionRight n)) _ + rw [← map_eval, compositionTuple_right, compositionTuple_right] + rfl + +theorem map_compCell {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (n : ℕ) (a b : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) : + (underlyingMap f).app (n+1) (X.compCell hC n a b hab) = + Y.compCell hC n ((underlyingMap f).app (n+1) a) ((underlyingMap f).app (n+1) b) + (by rw [← (underlyingMap f).target_app, ← (underlyingMap f).source_app, hab]) := by + exact (map_eval f (C.composition hC n) (X.compositionTuple n a b hab)).trans + (congrArg (Y.eval (C.composition hC n)) (map_compositionTuple f n a b hab)) + +noncomputable def tupleMap {C : GlobularTheory.{v}} (X : C.Model) (S : Shape) + (t : X.presheaf.obj (op (⟨S⟩ : C.Obj))) : freeShape C S ⟶ X := + yonedaEquiv.symm t + +@[simp] theorem tupleMap_app {C : GlobularTheory.{v}} (X : C.Model) (S : Shape) + (t : X.presheaf.obj (op (⟨S⟩ : C.Obj))) (n : ℕ) + (a : C.Hom (Shape.globe n) S) : + (underlyingMap (X.tupleMap S t)).app n a = X.eval a t := rfl + +theorem joined_of_parallel_expressions {C : GlobularTheory.{v}} (X : C.Model) + (hC : C.IsCoherator) (S : Shape) (n : ℕ) + (a b : (freeShape C S).underlying.Cell n) + (hp : (freeShape C S).underlying.Parallel n a b) + (t : X.presheaf.obj (op (⟨S⟩ : C.Obj))) : + X.underlying.Joined n (X.eval a t) (X.eval b t) := + (underlyingMap (X.tupleMap S t)).map_joined (freeShape_joined C hC S n a b hp) + +noncomputable def topCell (C : GlobularTheory.{v}) (n : ℕ) : + (disk C n).underlying.Cell n := C.id (Shape.globe n) + +@[simp] theorem tupleMap_topCell {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a : X.underlying.Cell n) : + (underlyingMap (X.tupleMap (Shape.globe n) a)).app n (topCell C n) = a := + X.eval_id a + +theorem compCell_left_unit {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.Joined (n+1) + (X.compCell hC n (X.unitCell hC n (X.underlying.source n a)) a + (X.unitCell_target hC n _)) a := by + let D := disk C (n+1) + let c := topCell C (n+1) + let f : D ⟶ X := X.tupleMap (Shape.globe (n+1)) a + have hf : (underlyingMap f).app (n+1) c = a := X.tupleMap_topCell (n+1) a + let u := D.compCell hC n (D.unitCell hC n (D.underlying.source n c)) c + (D.unitCell_target hC n _) + have hp : D.underlying.Parallel (n+1) u c := by + constructor <;> dsimp [u] <;> simp only [compCell_source, compCell_target, unitCell_source] + have h := (underlyingMap f).map_joined + (freeShape_joined C hC (Shape.globe (n+1)) (n+1) u c hp) + simpa only [u, map_compCell f, map_unitCell f, + (underlyingMap f).source_app, hf] using h + +theorem compCell_right_unit {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.Joined (n+1) + (X.compCell hC n a (X.unitCell hC n (X.underlying.target n a)) + (X.unitCell_source hC n _).symm) a := by + let D := disk C (n+1) + let c := topCell C (n+1) + let f : D ⟶ X := X.tupleMap (Shape.globe (n+1)) a + have hf : (underlyingMap f).app (n+1) c = a := X.tupleMap_topCell (n+1) a + let u := D.compCell hC n c (D.unitCell hC n (D.underlying.target n c)) + (D.unitCell_source hC n _).symm + have hp : D.underlying.Parallel (n+1) u c := by + constructor <;> dsimp [u] <;> simp only [compCell_source, compCell_target, unitCell_target] + have h := (underlyingMap f).map_joined + (freeShape_joined C hC (Shape.globe (n+1)) (n+1) u c hp) + simpa only [u, map_compCell f, map_unitCell f, + (underlyingMap f).target_app, hf] using h + +theorem compCell_inverse_right {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.Joined (n+1) + (X.compCell hC n a (X.inverseCell hC n a) (X.inverseCell_source hC n a).symm) + (X.unitCell hC n (X.underlying.source n a)) := by + let D := disk C (n+1) + let c := topCell C (n+1) + let f : D ⟶ X := X.tupleMap (Shape.globe (n+1)) a + have hf : (underlyingMap f).app (n+1) c = a := X.tupleMap_topCell (n+1) a + let u := D.compCell hC n c (D.inverseCell hC n c) (D.inverseCell_source hC n c).symm + let z := D.unitCell hC n (D.underlying.source n c) + have hp : D.underlying.Parallel (n+1) u z := by + constructor <;> dsimp [u, z] <;> + simp only [compCell_source, compCell_target, inverseCell_target, unitCell_source, unitCell_target] + have h := (underlyingMap f).map_joined + (freeShape_joined C hC (Shape.globe (n+1)) (n+1) u z hp) + simpa only [u, z, map_compCell f, map_unitCell f, map_inverseCell f, + (underlyingMap f).source_app, hf] using h + +theorem compCell_inverse_left {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.Joined (n+1) + (X.compCell hC n (X.inverseCell hC n a) a (X.inverseCell_target hC n a)) + (X.unitCell hC n (X.underlying.target n a)) := by + let D := disk C (n+1) + let c := topCell C (n+1) + let f : D ⟶ X := X.tupleMap (Shape.globe (n+1)) a + have hf : (underlyingMap f).app (n+1) c = a := X.tupleMap_topCell (n+1) a + let u := D.compCell hC n (D.inverseCell hC n c) c (D.inverseCell_target hC n c) + let z := D.unitCell hC n (D.underlying.target n c) + have hp : D.underlying.Parallel (n+1) u z := by + constructor <;> dsimp [u, z] <;> + simp only [compCell_source, compCell_target, inverseCell_source, unitCell_source, unitCell_target] + have h := (underlyingMap f).map_joined + (freeShape_joined C hC (Shape.globe (n+1)) (n+1) u z hp) + simpa only [u, z, map_compCell f, map_unitCell f, map_inverseCell f, + (underlyingMap f).target_app, hf] using h + +end GlobularTheory.Model +end Grothendieck + +namespace Grothendieck.GlobularSet + +theorem Hom.boundaryMap_id (X : GlobularSet.{u}) (n : ℕ) (b : X.Boundary n) : + (Hom.id X).boundaryMap n b = b := by + cases n with + | zero => + change (PUnit.unit : PUnit) = b + exact Subsingleton.elim _ _ + | succ n => exact Subtype.ext rfl + +theorem HasFillers.joined {X : GlobularSet.{u}} (hX : X.HasFillers) + {n : ℕ} {a b : X.Cell n} (hp : X.Parallel n a b) : X.Joined n a b := by + obtain ⟨z, hz⟩ := hX (n+1) ⟨(a,b), hp⟩ + exact ⟨z, congrArg (fun x => x.1.1) hz, congrArg (fun x => x.1.2) hz⟩ + +theorem HasFillers.retract {X Y : GlobularSet.{u}} (hY : Y.HasFillers) + (i : Hom X Y) (r : Hom Y X) (hir : i.comp r = Hom.id X) : X.HasFillers := by + intro n b + obtain ⟨y, hy⟩ := hY n (i.boundaryMap n b) + refine ⟨r.app n y, ?_⟩ + rw [← r.boundary_app, hy, ← Hom.boundaryMap_comp, hir, Hom.boundaryMap_id] + +theorem hasFillers_of_endpoint_factorization {X Y P : GlobularSet.{u}} + (hX : X.HasFillers) (i : Hom X Y) (r : Hom Y X) (h : Hom Y P) + (p₀ p₁ : Hom P Y) (hh₀ : h.comp p₀ = Hom.id Y) + (hh₁ : h.comp p₁ = r.comp i) (hp₁ : LiftsBoundaries p₁) : Y.HasFillers := by + intro n b + obtain ⟨x, hx⟩ := hX n (r.boundaryMap n b) + have hb : Y.boundary n (i.app n x) = p₁.boundaryMap n (h.boundaryMap n b) := by + rw [← i.boundary_app, hx, ← Hom.boundaryMap_comp, ← Hom.boundaryMap_comp, hh₁] + obtain ⟨z, hz, _⟩ := hp₁ n (h.boundaryMap n b) (i.app n x) hb + refine ⟨p₀.app n z, ?_⟩ + rw [← p₀.boundary_app, hz, ← Hom.boundaryMap_comp, hh₀, Hom.boundaryMap_id] + +def LiftsSource {X Y : GlobularSet.{u}} (f : Hom X Y) (n : ℕ) : Prop := + ∀ (x : X.Cell n) (y : Y.Cell (n+1)), Y.source n y = f.app n x → + ∃ z : X.Cell (n+1), X.source n z = x ∧ f.app (n+1) z = y + +theorem liftsBoundary_of_contractible {X Y : GlobularSet.{u}} (f : Hom X Y) + (hX : X.HasFillers) (hY : Y.HasFillers) (n : ℕ) (hf : LiftsSource f n) + (b : X.Boundary n) (y : Y.Cell n) (hy : Y.boundary n y = f.boundaryMap n b) : + ∃ x : X.Cell n, X.boundary n x = b ∧ f.app n x = y := by + obtain ⟨x, hx⟩ := hX n b + have hp : Y.Parallel n (f.app n x) y := by + rw [parallel_iff_boundary_eq, ← f.boundary_app, hx, hy] + obtain ⟨c, hc₀, hc₁⟩ := hY.joined hp + obtain ⟨d, hd₀, hd⟩ := hf x c hc₀ + refine ⟨X.target n d, ?_, ?_⟩ + · have h := (parallel_iff_boundary_eq X n (X.source n d) (X.target n d)).1 + (Joined.parallel ⟨d, rfl, rfl⟩) + rw [hd₀, hx] at h + exact h.symm + · rw [f.target_app, hd, hc₁] + +end Grothendieck.GlobularSet + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +namespace Shape + +theorem attach_seam (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) + {k : ℕ} (hk : k < h) : + (S.attach b h hl hr).seam hk = face hk true ≫ S.inr b h hl hr := rfl + +end Shape + +namespace GlobularTheory + +def tripleShape (n : ℕ) : Shape := + (compositionShape n).attach n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def tripleFirst (n : ℕ) : Shape.globe (n+1) ⟶ tripleShape n := + compositionLeft n ≫ (compositionShape n).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def tripleMiddle (n : ℕ) : Shape.globe (n+1) ⟶ tripleShape n := + compositionRight n ≫ (compositionShape n).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def tripleLast (n : ℕ) : Shape.globe (n+1) ⟶ tripleShape n := + (compositionShape n).inr n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +theorem triple_first_middle (n : ℕ) : + Shape.target n ≫ tripleFirst n = Shape.source n ≫ tripleMiddle n := by + exact (Category.assoc _ _ _).symm.trans + ((congrArg (fun g => g ≫ (compositionShape n).inl n (n+1) + (Nat.lt_succ_self n) (Nat.lt_succ_self n)) (composition_seam n)).trans + (Category.assoc _ _ _)) + +theorem triple_middle_last (n : ℕ) : + Shape.target n ≫ tripleMiddle n = Shape.source n ≫ tripleLast n := by + have h := Shape.seam_inl (compositionShape n) n (n+1) + (Nat.lt_succ_self n) (Nat.lt_succ_self n) + change (Shape.target n ≫ compositionRight n) ≫ _ = Shape.source n ≫ _ at h + exact (Category.assoc _ _ _).symm.trans h + +namespace Model + +noncomputable def tripleTuple {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b c : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) + (hbc : X.underlying.target n b = X.underlying.source n c) : + X.presheaf.obj (op (⟨tripleShape n⟩ : C.Obj)) := + X.sumTuple (compositionShape n) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + (X.compositionTuple n a b hab) c (by + change X.eval (C.base (Shape.target n ≫ compositionRight n)) _ = _ + rw [C.base_comp, eval_comp, compositionTuple_right] + exact hbc) + +@[simp] theorem tripleTuple_first {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b c : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) + (hbc : X.underlying.target n b = X.underlying.source n c) : + X.eval (C.base (tripleFirst n)) (X.tripleTuple n a b c hab hbc) = a := by + let j : compositionShape n ⟶ tripleShape n := (compositionShape n).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + let t := X.tripleTuple n a b c hab hbc + change X.eval (C.base (compositionLeft n ≫ j)) t = a + rw [C.base_comp, eval_comp] + have hj : X.eval (C.base j) t = X.compositionTuple n a b hab := + X.sumTuple_left _ _ _ _ _ _ _ _ + rw [hj, compositionTuple_left] + +@[simp] theorem tripleTuple_middle {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b c : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) + (hbc : X.underlying.target n b = X.underlying.source n c) : + X.eval (C.base (tripleMiddle n)) (X.tripleTuple n a b c hab hbc) = b := by + let j : compositionShape n ⟶ tripleShape n := (compositionShape n).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + let t := X.tripleTuple n a b c hab hbc + change X.eval (C.base (compositionRight n ≫ j)) t = b + rw [C.base_comp, eval_comp] + have hj : X.eval (C.base j) t = X.compositionTuple n a b hab := + X.sumTuple_left _ _ _ _ _ _ _ _ + rw [hj, compositionTuple_right] + +@[simp] theorem tripleTuple_last {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b c : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) + (hbc : X.underlying.target n b = X.underlying.source n c) : + X.eval (C.base (tripleLast n)) (X.tripleTuple n a b c hab hbc) = c := + X.sumTuple_right _ _ _ _ _ _ _ _ + +theorem compCell_assoc {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a b c : X.underlying.Cell (n+1)) + (hab : X.underlying.target n a = X.underlying.source n b) + (hbc : X.underlying.target n b = X.underlying.source n c) : + X.underlying.Joined (n+1) + (X.compCell hC n (X.compCell hC n a b hab) c (by rw [compCell_target, hbc])) + (X.compCell hC n a (X.compCell hC n b c hbc) (by rw [compCell_source, hab])) := by + let D := freeShape C (tripleShape n) + let A : D.underlying.Cell (n+1) := C.base (tripleFirst n) + let B : D.underlying.Cell (n+1) := C.base (tripleMiddle n) + let E : D.underlying.Cell (n+1) := C.base (tripleLast n) + have hAB : D.underlying.target n A = D.underlying.source n B := by + change C.comp (C.base (Shape.target n)) (C.base (tripleFirst n)) = + C.comp (C.base (Shape.source n)) (C.base (tripleMiddle n)) + rw [← C.base_comp, ← C.base_comp, triple_first_middle] + have hBE : D.underlying.target n B = D.underlying.source n E := by + change C.comp (C.base (Shape.target n)) (C.base (tripleMiddle n)) = + C.comp (C.base (Shape.source n)) (C.base (tripleLast n)) + rw [← C.base_comp, ← C.base_comp, triple_middle_last] + let f : D ⟶ X := X.tupleMap (tripleShape n) (X.tripleTuple n a b c hab hbc) + have hfA : (underlyingMap f).app (n+1) A = a := X.tripleTuple_first n a b c hab hbc + have hfB : (underlyingMap f).app (n+1) B = b := X.tripleTuple_middle n a b c hab hbc + have hfE : (underlyingMap f).app (n+1) E = c := X.tripleTuple_last n a b c hab hbc + let u := D.compCell hC n (D.compCell hC n A B hAB) E (by rw [compCell_target, hBE]) + let z := D.compCell hC n A (D.compCell hC n B E hBE) (by rw [compCell_source, hAB]) + have hp : D.underlying.Parallel (n+1) u z := by + constructor <;> dsimp [u, z] <;> simp only [compCell_source, compCell_target] + have h := (underlyingMap f).map_joined (freeShape_joined C hC (tripleShape n) (n+1) u z hp) + simpa only [u, z, map_compCell f, hfA, hfB, hfE] using h + +end Model +end GlobularTheory +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CriticalJoint.lean b/lean/OAI/CategoryTheory/Globular/CriticalJoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc07ba97f9ce753eded79fe2f9ba0f9f9e2fdb91 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CriticalJoint.lean @@ -0,0 +1,95 @@ +import OAI.CategoryTheory.Globular.CylinderJointUpper + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {D B : GlobularFrame K} + +theorem criticalJoint_retract (e : Bool → Hom D B) (n : ℕ) + (i : B.obj n ≅ D.obj (n+1)) + (hs : (e false).obj n ≫ i.hom = D.diagram.source n) + (ht : (e true).obj n ≫ i.hom = D.diagram.target n) + (hb : (e false).bd n = (e true).bd n) [Epi ((e false).bd n)] : + ∃ f : jointSource e n ⟶ oneSided (e false) (n+1), + ∃ g : oneSided (e false) (n+1) ⟶ jointSource e n, f ≫ g = 𝟙 _ := by + let aB := pushout.inl ((e false).bd (n+1)) (D.inc (n+1)) + let aD := pushout.inr ((e false).bd (n+1)) (D.inc (n+1)) + let c := TwoEndpoints.base (D.diagram.source n) (fun ε => (e ε).obj n) + let d := TwoEndpoints.endpoint (D.diagram.source n) (fun ε => (e ε).obj n) + let side (ε : Bool) := if ε then B.right n else B.left n + have hc (ε) : D.diagram.source n ≫ d ε = (e ε).obj n ≫ c := + (TwoEndpoints.condition (D.diagram.source n) (fun ε => (e ε).obj n) ε).symm + have hcommon : D.inc n ≫ (e false).obj n = D.inc n ≫ (e true).obj n := by + rw [← (e false).inc, hb, (e true).inc] + have hsi : D.diagram.source n ≫ i.inv = (e false).obj n := by + apply (cancel_mono i.hom).1 + erw [Category.assoc, Iso.inv_hom_id, Category.comp_id] + exact hs.symm + have hti : D.diagram.target n ≫ i.inv = (e true).obj n := by + apply (cancel_mono i.hom).1 + erw [Category.assoc, Iso.inv_hom_id, Category.comp_id] + exact ht.symm + have hpar : B.inc n ≫ i.hom ≫ d false = B.inc n ≫ i.hom ≫ d true := by + apply (cancel_epi ((e false).bd n)).1 + have hx (ε) : (e false).bd n ≫ B.inc n ≫ i.hom ≫ d ε = D.inc n ≫ (e ε).obj n ≫ c := by + erw [← Category.assoc, (e false).inc, Category.assoc] + have hh : (e false).obj n ≫ i.hom ≫ d ε = (e ε).obj n ≫ c := + (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ d ε) hs).trans (hc ε)) + exact congrArg (D.inc n ≫ ·) hh + exact (hx false).trans (((Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ c) hcommon).trans (Category.assoc _ _ _))).trans (hx true).symm) + let b := (B.square n).desc (i.hom ≫ d false) (i.hom ≫ d true) hpar + have hbg : (e false).bd (n+1) ≫ b = D.inc (n+1) ≫ i.inv ≫ c := by + apply (D.square n).hom_ext + · erw [← Category.assoc, (e false).left, Category.assoc, IsPushout.inl_desc] + erw [← Category.assoc, hs, hc false] + have hh : D.diagram.source n ≫ i.inv ≫ c = (e false).obj n ≫ c := + (Category.assoc _ _ _).symm.trans (congrArg (· ≫ c) hsi) + exact hh.symm.trans (Category.assoc _ _ _) + · erw [← Category.assoc, (e false).right, Category.assoc, IsPushout.inr_desc] + erw [← Category.assoc, hs, hc true] + have hh : D.diagram.target n ≫ i.inv ≫ c = (e true).obj n ≫ c := + (Category.assoc _ _ _).symm.trans (congrArg (· ≫ c) hti) + exact hh.symm.trans (Category.assoc _ _ _) + let g := pushout.desc b (i.inv ≫ c) hbg + have hgB : aB ≫ g = b := pushout.inl_desc _ _ _ + have hgD : aD ≫ g = i.inv ≫ c := pushout.inr_desc _ _ _ + have hfd (ε) : (e ε).obj n ≫ i.hom ≫ aD = D.diagram.source n ≫ i.inv ≫ side ε ≫ aB := by + have hl : D.left n ≫ (e false).bd (n+1) ≫ aB = (e false).obj n ≫ B.left n ≫ aB := by + erw [← Category.assoc, (e false).left, Category.assoc] + have hr : D.right n ≫ (e false).bd (n+1) ≫ aB = (e false).obj n ≫ B.right n ≫ aB := by + erw [← Category.assoc, (e false).right, Category.assoc] + have hp : (e false).bd (n+1) ≫ aB = D.inc (n+1) ≫ aD := pushout.condition + have hrhs (ε) : D.diagram.source n ≫ i.inv ≫ side ε ≫ aB = (e false).obj n ≫ side ε ≫ aB := + (Category.assoc _ _ _).symm.trans (congrArg (· ≫ side ε ≫ aB) hsi) + cases ε + · have hh : (e false).obj n ≫ i.hom ≫ aD = (e false).obj n ≫ B.left n ≫ aB := + (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ aD) hs).trans + ((Category.assoc _ _ _).trans ((congrArg (D.left n ≫ ·) hp).symm.trans hl))) + exact hh.trans (hrhs false).symm + · have hh : (e true).obj n ≫ i.hom ≫ aD = (e false).obj n ≫ B.right n ≫ aB := + (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ aD) ht).trans + ((Category.assoc _ _ _).trans ((congrArg (D.right n ≫ ·) hp).symm.trans hr))) + exact hh.trans (hrhs true).symm + let f := TwoEndpoints.desc (D.diagram.source n) (fun ε => (e ε).obj n) + (i.hom ≫ aD) (fun ε => i.inv ≫ side ε ≫ aB) hfd + refine ⟨f,g,?_⟩ + apply TwoEndpoints.hom_ext + · erw [← Category.assoc, TwoEndpoints.base_desc, Category.assoc, hgD, Iso.hom_inv_id_assoc, + Category.comp_id] + · intro ε + erw [← Category.assoc, TwoEndpoints.endpoint_desc, Category.assoc, Category.assoc, hgB] + cases ε + · change i.inv ≫ B.left n ≫ b = d false ≫ 𝟙 _ + erw [IsPushout.inl_desc, Iso.inv_hom_id_assoc, Category.comp_id] + · change i.inv ≫ B.right n ≫ b = d true ≫ 𝟙 _ + erw [IsPushout.inr_desc, Iso.inv_hom_id_assoc, Category.comp_id] +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Cutoff.lean b/lean/OAI/CategoryTheory/Globular/Cutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac4783801aa74de8cddab2480631742d4e5ee271 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Cutoff.lean @@ -0,0 +1,382 @@ +import OAI.CategoryTheory.Globular.Homotopy + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularTheory.Model + +theorem components_eq_iff {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (x y : X.underlying.Cell 0) : + Quot.mk (X.underlying.Joined 0) x = Quot.mk (X.underlying.Joined 0) y ↔ + X.underlying.Joined 0 x y := + ⟨fun h => (X.joined_equivalence hC 0).eqvGen_iff.mp (Quot.eqvGen_exact h), Quot.sound⟩ + +theorem loops_joined_equivalence {C : GlobularTheory.{v}} (X : C.Model) + (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + Equivalence (fun a b : X.Loops hC x n => X.underlying.Joined (n+1) a.1 b.1) := + ⟨fun a => X.joined_refl hC (n+1) a.1, fun h => X.joined_symm hC h, + fun h k => X.joined_trans hC h k⟩ + +theorem weakEquivalence_of_exactBoundaryTest {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X Y : C.Model} (f : X ⟶ Y) (hf : GlobularSet.ExactBoundaryTest (underlyingMap f)) : + WeakEquivalence hC f := by + constructor + · constructor + · intro a b hab + induction a using Quot.inductionOn with | h a => + induction b using Quot.inductionOn with | h b => + apply Quot.sound + apply hf.reflects_joined (n := 0) trivial + exact (Y.components_eq_iff hC _ _).mp hab + · intro b + induction b using Quot.inductionOn with | h b => + obtain ⟨a, _, ha⟩ := hf 0 PUnit.unit b rfl + exact ⟨Quot.mk _ a, Quot.sound ha⟩ + · intro x n + constructor + · intro a b hab + induction a using Quot.inductionOn with | h a => + induction b using Quot.inductionOn with | h b => + apply Quot.sound + apply hf.reflects_joined + · exact ⟨a.2.1.trans b.2.1.symm, a.2.2.trans b.2.2.symm⟩ + · exact (Y.loops_joined_equivalence hC _ n).eqvGen_iff.mp + (Quot.eqvGen_exact hab) + · intro b + induction b using Quot.inductionOn with | h b => + let c := X.baseCell hC x n + let bd : X.underlying.Boundary (n+1) := + ⟨(c, c), by cases n <;> simp [GlobularSet.Parallel]⟩ + have hb : Y.underlying.boundary (n+1) b.1 = + (underlyingMap f).boundaryMap (n+1) bd := by + apply Subtype.ext + exact Prod.ext (b.2.1.trans (map_baseCell f hC x n).symm) + (b.2.2.trans (map_baseCell f hC x n).symm) + obtain ⟨a, ha, hab⟩ := hf (n+1) bd b.1 hb + have ha' := congrArg Subtype.val ha + let a' : X.Loops hC x n := + ⟨a, congrArg Prod.fst ha', congrArg Prod.snd ha'⟩ + exact ⟨Quot.mk _ a', Quot.sound hab⟩ + +end GlobularTheory.Model + +namespace GlobularSet + +def cutoffCell (X : GlobularSet.{u}) (q n : ℕ) : Type u := + if n ≤ q then X.Cell n else X.Boundary (q+1) + +def cutoffFace (X : GlobularSet.{u}) (q n : ℕ) (side : Bool) : + X.cutoffCell q (n+1) → X.cutoffCell q n := by + by_cases h : n+1 ≤ q + · have hn : n ≤ q := Nat.le_trans (Nat.le_succ n) h + simpa only [cutoffCell, ite_eq_left h, ite_eq_left hn] using + (if side then X.target n else X.source n) + · by_cases hn : n = q + · subst n + simpa only [cutoffCell, ite_eq_right h, ite_eq_left (Nat.le_refl q)] using + (fun b : X.Boundary (q+1) => if side then b.1.2 else b.1.1) + · have hnq : ¬ n ≤ q := by omega + simpa only [cutoffCell, ite_eq_right h, ite_eq_right hnq] using + (_root_.id : X.Boundary (q+1) → X.Boundary (q+1)) + +theorem cutoffCell_low (X : GlobularSet.{u}) {q n : ℕ} (h : n ≤ q) : + X.cutoffCell q n = X.Cell n := ite_eq_left h + +theorem cutoffCell_high (X : GlobularSet.{u}) {q n : ℕ} (h : ¬ n ≤ q) : + X.cutoffCell q n = X.Boundary (q+1) := ite_eq_right h + +theorem cutoffFace_low (X : GlobularSet.{u}) {q n : ℕ} (h : n+1 ≤ q) (side) : + HEq (X.cutoffFace q n side) (if side then X.target n else X.source n) := by + simp only [cutoffFace, dite_eq_left h] + exact cast_heq _ _ + +theorem cutoffFace_seam (X : GlobularSet.{u}) (q : ℕ) (side) : + HEq (X.cutoffFace q q side) + (fun b : X.Boundary (q+1) => if side then b.1.2 else b.1.1) := by + simp only [cutoffFace, dite_eq_right (Nat.not_succ_le_self q)] + exact cast_heq _ _ + +private theorem comp_eq_of_heq {A B C A' B' C' : Type u} + (ha : A = A') (hb : B = B') (hc : C = C') + {s t : A → B} {s' t' : A' → B'} {l : B → C} {l' : B' → C'} + (hs : HEq s s') (ht : HEq t t') (hl : HEq l l') + (w : ∀ x, l' (s' x) = l' (t' x)) : ∀ x, l (s x) = l (t x) := by + cases ha; cases hb; cases hc + cases eq_of_heq hs; cases eq_of_heq ht; cases eq_of_heq hl + exact w + +def cutoff (X : GlobularSet.{u}) (q : ℕ) : GlobularSet.{u} where + Cell := X.cutoffCell q + source n := X.cutoffFace q n false + target n := X.cutoffFace q n true + source_source n x := by + by_cases h : n+1+1 ≤ q + · have h₁ : n+1 ≤ q := by omega + have h₀ : n ≤ q := by omega + exact comp_eq_of_heq (X.cutoffCell_low h) (X.cutoffCell_low h₁) + (X.cutoffCell_low h₀) (X.cutoffFace_low h false) (X.cutoffFace_low h true) + (X.cutoffFace_low h₁ false) (X.source_source n) x + · by_cases h₁ : n+1 = q + · subst q + exact comp_eq_of_heq (X.cutoffCell_high (Nat.not_succ_le_self (n+1))) + (X.cutoffCell_low le_rfl) (X.cutoffCell_low (Nat.le_succ n)) + (X.cutoffFace_seam (n+1) false) (X.cutoffFace_seam (n+1) true) + (X.cutoffFace_low le_rfl false) (fun x => x.2.1) x + · by_cases h₀ : n = q + · subst q + simp [cutoffFace] + · have h₁' : ¬ n+1 ≤ q := by omega + simp [cutoffFace, h, h₁, h₀, h₁'] + target_source n x := by + by_cases h : n+1+1 ≤ q + · have h₁ : n+1 ≤ q := by omega + have h₀ : n ≤ q := by omega + exact comp_eq_of_heq (X.cutoffCell_low h) (X.cutoffCell_low h₁) + (X.cutoffCell_low h₀) (X.cutoffFace_low h false) (X.cutoffFace_low h true) + (X.cutoffFace_low h₁ true) (X.target_source n) x + · by_cases h₁ : n+1 = q + · subst q + exact comp_eq_of_heq (X.cutoffCell_high (Nat.not_succ_le_self (n+1))) + (X.cutoffCell_low le_rfl) (X.cutoffCell_low (Nat.le_succ n)) + (X.cutoffFace_seam (n+1) false) (X.cutoffFace_seam (n+1) true) + (X.cutoffFace_low le_rfl true) (fun x => x.2.2) x + · by_cases h₀ : n = q + · subst q + simp [cutoffFace] + · have h₁' : ¬ n+1 ≤ q := by omega + simp [cutoffFace, h, h₁, h₀, h₁'] + +end GlobularSet + +namespace GlobularTheory.Model + +@[simp] +theorem underlyingMap_id {C : GlobularTheory.{v}} (X : C.Model) : + underlyingMap (𝟙 X) = GlobularSet.Hom.id X.underlying := rfl + +@[simp] +theorem underlyingMap_comp {C : GlobularTheory.{v}} {X Y Z : C.Model} + (f : X ⟶ Y) (g : Y ⟶ Z) : + underlyingMap (f ≫ g) = (underlyingMap f).comp (underlyingMap g) := rfl + +theorem BoundaryAttachment.hasLiftingProperty {C : GlobularTheory.{v}} + {X Y P Q : C.Model} {i : X ⟶ Y} (A : BoundaryAttachment i) (p : P ⟶ Q) + (hp : GlobularSet.LiftsBoundaries (underlyingMap p)) : HasLiftingProperty i p := by + classical + constructor + intro f g sq + have liftcell : ∀ k, ∃ z : P.underlying.Cell (A.dimension k), + P.underlying.boundary _ z = (underlyingMap f).boundaryMap _ (A.boundary k) ∧ + (underlyingMap p).app _ z = (underlyingMap g).app _ (A.cell k) := by + intro k + apply hp + rw [← (underlyingMap g).boundary_app, A.cell_boundary] + have eq := congrArg (fun e => (underlyingMap e).boundaryMap _ (A.boundary k)) sq.w + simpa only [underlyingMap_comp, GlobularSet.Hom.boundaryMap_comp] using eq.symm + choose z hz hzp using liftcell + obtain ⟨l, hl, huniq⟩ := A.universal P f z hz + have hcomp : l ≫ p = g := by + obtain ⟨_, _, unique⟩ := A.universal Q (i ≫ g) + (fun k => (underlyingMap g).app _ (A.cell k)) + (fun k => by rw [← (underlyingMap g).boundary_app, A.cell_boundary, + underlyingMap_comp, GlobularSet.Hom.boundaryMap_comp]) + apply (unique (l ≫ p) ?_).trans (unique g ?_).symm + · constructor + · rw [← Category.assoc, hl.1, sq.w] + · intro k + change (underlyingMap p).app _ ((underlyingMap l).app _ (A.cell k)) = _ + rw [hl.2, hzp] + · exact ⟨rfl, fun _ => rfl⟩ + exact CommSq.HasLift.mk' ⟨l, hl.1, hcomp⟩ + +theorem section_of_isCellular {C : GlobularTheory.{v}} {X P : C.Model} + (hX : X.IsCellular) (p : P ⟶ X) + (hp : GlobularSet.LiftsBoundaries (underlyingMap p)) : ∃ s : X ⟶ P, s ≫ p = 𝟙 X := by + obtain ⟨A⟩ := hX + let := A.linearOrder + let := A.orderBot + let := A.succOrder + let := A.wellFoundedLT + have : A.chain.F.IsWellOrderContinuous := A.chain.isWellOrderContinuous + have : HasLiftingProperty (A.chain.incl.app ⊥) p := + HasLiftingProperty.transfiniteComposition.hasLiftingProperty_ι_app_bot + (hc := A.chain.isColimit) + (fun j hj => (A.attachment j hj).hasLiftingProperty p hp) + let f : A.chain.F.obj ⊥ ⟶ P := A.chain.isoBot.hom ≫ A.isInitial.to P + have sq : CommSq f (A.chain.incl.app ⊥) p (𝟙 X) := by + constructor + dsimp [f] + rw [Category.comp_id, Category.assoc] + have eq : A.isInitial.to P ≫ p = A.start := A.isInitial.hom_ext _ _ + rw [eq] + exact (congrArg (A.chain.isoBot.hom ≫ ·) A.chain.fac.symm).trans + (by simp only [Iso.hom_inv_id_assoc]) + exact ⟨sq.lift, sq.fac_right⟩ + + +noncomputable def unitMap (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + disk C (n+1) ⟶ disk C n := + show (disk C (n+1)).presheaf ⟶ (disk C n).presheaf from + yoneda.map (show (⟨Shape.globe (n+1)⟩ : C.Obj) ⟶ ⟨Shape.globe n⟩ from C.unit hC n) + +@[simp] +theorem J_comp_unitMap (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + J C n ≫ unitMap C hC n = 𝟙 (disk C n) := by + apply NatTrans.ext + funext S + apply ConcreteCategory.hom_ext + intro f + change C.Hom S.unop.shape (Shape.globe n) at f + change C.comp (C.comp f (C.base (Shape.source n))) (C.unit hC n) = f + rw [C.assoc, C.unit_source, C.comp_id] + +theorem elementary_pushout_retraction {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X Y : C.Model} (n : ℕ) (a : disk C n ⟶ X) (i : X ⟶ Y) + (b : disk C (n+1) ⟶ Y) (sq : IsPushout a (J C n) i b) : + ∃ r : Y ⟶ X, i ≫ r = 𝟙 X := by + have w : a ≫ 𝟙 X = J C n ≫ (unitMap C hC n ≫ a) := by + rw [← Category.assoc, J_comp_unitMap, Category.id_comp, Category.comp_id] + exact ⟨sq.desc (𝟙 X) (unitMap C hC n ≫ a) w, sq.inl_desc _ _ w⟩ + +theorem weakEquivalence_of_partialPath_data {C : GlobularTheory.{v}} + (hC : C.IsCoherator) {X Y : C.Model} (hX : X.IsCellular) + (n : ℕ) (a : disk C n ⟶ X) (i : X ⟶ Y) (b : disk C (n+1) ⟶ Y) + (sq : IsPushout a (J C n) i b) + (PX PY : C.Model) (pX₀ pX₁ : PX ⟶ X) (pY₀ pY₁ : PY ⟶ Y) + (Pi : PX ⟶ PY) (nat₀ : Pi ≫ pY₀ = pX₀ ≫ i) (nat₁ : Pi ≫ pY₁ = pX₁ ≫ i) + (hpX₀ : GlobularSet.LiftsBoundaries (underlyingMap pX₀)) + (hpX₁ : GlobularSet.LiftsBoundaries (underlyingMap pX₁)) + (hpY₀ : GlobularSet.LiftsBoundaries (underlyingMap pY₀)) + (hpY₁ : GlobularSet.LiftsBoundaries (underlyingMap pY₁)) + (joint : ∀ (t : disk C n ⟶ PY) (u₀ u₁ : disk C (n+1) ⟶ Y), + t ≫ pY₀ = J C n ≫ u₀ → t ≫ pY₁ = J C n ≫ u₁ → + ∃ l : disk C (n+1) ⟶ PY, + J C n ≫ l = t ∧ l ≫ pY₀ = u₀ ∧ l ≫ pY₁ = u₁) : + WeakEquivalence hC i := by + obtain ⟨r, hr⟩ := elementary_pushout_retraction hC n a i b sq + obtain ⟨h, hh⟩ := section_of_isCellular hX pX₀ hpX₀ + let u : X ⟶ X := h ≫ pX₁ + let ru : Y ⟶ X := r ≫ u + have diu : i ≫ ru = u := by simp only [ru, ← Category.assoc, hr, Category.id_comp] + have w₀ : (a ≫ h ≫ Pi) ≫ pY₀ = J C n ≫ b := by + simp only [Category.assoc, nat₀] + rw [← Category.assoc h, hh, Category.id_comp, ← sq.w] + have w₁ : (a ≫ h ≫ Pi) ≫ pY₁ = J C n ≫ (b ≫ ru ≫ i) := by + simp only [Category.assoc, nat₁] + rw [← Category.assoc h] + change a ≫ (u ≫ i) = _ + rw [← diu] + simp only [← Category.assoc] + rw [sq.w] + obtain ⟨l, hl, hl₀, hl₁⟩ := joint (a ≫ h ≫ Pi) b (b ≫ ru ≫ i) w₀ w₁ + let f : Y ⟶ PY := sq.desc (h ≫ Pi) l hl.symm + have hf₀ : f ≫ pY₀ = 𝟙 Y := by + apply sq.hom_ext + · dsimp [f] + rw [← Category.assoc, sq.inl_desc, Category.assoc, nat₀, + ← Category.assoc, hh, Category.id_comp, Category.comp_id] + · dsimp [f] + rw [← Category.assoc, sq.inr_desc, hl₀, Category.comp_id] + have hf₁ : f ≫ pY₁ = ru ≫ i := by + apply sq.hom_ext + · dsimp [f] + rw [← Category.assoc, sq.inl_desc, Category.assoc, nat₁] + rw [← Category.assoc i, diu] + rfl + · dsimp [f] + rw [← Category.assoc, sq.inr_desc, hl₁] + apply weakEquivalence_of_exactBoundaryTest hC + apply GlobularSet.ExactBoundaryTest.of_mutual_composites (underlyingMap i) (underlyingMap ru) + · have test := GlobularSet.exactBoundaryTest_endpoint_section + (underlyingMap pX₀) (underlyingMap pX₁) (underlyingMap h) hpX₀ hpX₁ + (fun k x => congrFun (congrArg (fun e => (underlyingMap e).app k) hh) x) + (X.joined_refl hC) + rw [← underlyingMap_comp, diu] + exact test + · have test := GlobularSet.exactBoundaryTest_endpoint_section + (underlyingMap pY₀) (underlyingMap pY₁) (underlyingMap f) hpY₀ hpY₁ + (fun k x => congrFun (congrArg (fun e => (underlyingMap e).app k) hf₀) x) + (Y.joined_refl hC) + rw [← underlyingMap_comp] + rw [← underlyingMap_comp, hf₁] at test + exact test + +end GlobularTheory.Model + +namespace GlobularSet + +def faceMap (X : GlobularSet.{u}) {m n : ℕ} (h : m < n) (side : Bool) : + X.Cell n → X.Cell m := + Nat.leRecOn (C := fun k => X.Cell k → X.Cell m) h + (fun {k} f x => f (X.source k x)) (if side then X.target m else X.source m) + +@[simp] +theorem faceMap_succ (X : GlobularSet.{u}) (m : ℕ) (side : Bool) : + X.faceMap (Nat.lt_succ_self m) side = (if side then X.target m else X.source m) := + Nat.leRecOn_self _ + +theorem faceMap_source (X : GlobularSet.{u}) {m n : ℕ} (h : m < n) (side : Bool) + (x : X.Cell (n+1)) : + X.faceMap (Nat.lt_succ_of_lt h) side x = X.faceMap h side (X.source n x) := by + unfold faceMap + rw [Nat.leRecOn_succ h] + +theorem faceMap_target (X : GlobularSet.{u}) {m n : ℕ} (h : m < n) (side : Bool) + (x : X.Cell (n+1)) : + X.faceMap h side (X.source n x) = X.faceMap h side (X.target n x) := by + induction n, h using Nat.le_induction with + | base => + simp only [faceMap_succ] + cases side + · exact X.source_source m x + · exact X.target_source m x + | succ n h _ => + rw [faceMap_source X h, faceMap_source X h, X.source_source] + +theorem faceMap_comp (X : GlobularSet.{u}) {m n k : ℕ} + (h : m < n) (h' : n < k) (side side' : Bool) (x : X.Cell k) : + X.faceMap (h.trans h') side x = + X.faceMap h side (X.faceMap h' side' x) := by + induction k, h' using Nat.le_induction with + | base => + rw [faceMap_source X h, faceMap_succ] + cases side' + · rfl + · exact X.faceMap_target h side x + | succ k h' ih => + rw [faceMap_source X (h.trans h'), faceMap_source X h'] + exact ih (X.source k x) + +def evalFace (X : GlobularSet.{u}) {m n : ℕ} : Globe.Face m n → (X.Cell n → X.Cell m) + | .id _ => _root_.id + | .face h side => X.faceMap h side + +theorem evalFace_comp (X : GlobularSet.{u}) {m n k : ℕ} (f : Globe.Face m n) + (g : Globe.Face n k) (x : X.Cell k) : + X.evalFace (f.comp g) x = X.evalFace f (X.evalFace g x) := by + cases f with + | id => rfl + | face h side => + cases g with + | id => rfl + | face h' side' => exact X.faceMap_comp h h' side side' x + +def presheaf (X : GlobularSet.{u}) : GlobularPresheaf.{u} where + obj n := X.Cell n.unop.dim + map f := TypeCat.ofHom (X.evalFace f.unop) + map_id _ := rfl + map_comp f g := by + apply ConcreteCategory.hom_ext + intro x + exact X.evalFace_comp g.unop f.unop x + +end GlobularSet + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CutoffCells.lean b/lean/OAI/CategoryTheory/Globular/CutoffCells.lean new file mode 100644 index 0000000000000000000000000000000000000000..be611e041dc5b4aa5d606aa205a9b3637b8d1196 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CutoffCells.lean @@ -0,0 +1,331 @@ +import OAI.CategoryTheory.Globular.Realization + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularSet + +def cutoffLow (X : GlobularSet.{u}) {q n : ℕ} (h : n ≤ q) : + (X.cutoff q).Cell n ≃ X.Cell n := Equiv.cast (X.cutoffCell_low h) + +def cutoffHigh (X : GlobularSet.{u}) {q n : ℕ} (h : q < n) : + (X.cutoff q).Cell n ≃ X.Boundary (q+1) := + Equiv.cast (X.cutoffCell_high (Nat.not_le_of_gt h)) + +theorem cutoffFace_high (X : GlobularSet.{u}) {q n : ℕ} (h : q < n) (side) : + HEq (X.cutoffFace q n side) (_root_.id : X.Boundary (q+1) → _) := by + have hn : ¬ n+1 ≤ q := by omega + have hne : n ≠ q := by omega + simp only [cutoffFace, dite_eq_right hn, dite_eq_right hne] + exact cast_heq _ _ + +private theorem coord_face {A B A' B' : Type u} (e : A ≃ A') (f : B ≃ B') + (he : ∀ x, HEq (e x) x) (hf : ∀ x, HEq (f x) x) + (g : A → B) (g' : A' → B') (hg : HEq g g') (x : A) : + f (g x) = g' (e x) := by + have ha : A = A' := (type_eq_of_heq (he x)).symm + have hb : B = B' := (type_eq_of_heq (hf (g x))).symm + cases ha; cases hb + rw [eq_of_heq (hf (g x)), eq_of_heq hg, eq_of_heq (he x)] + +theorem cutoffLow_face (X : GlobularSet.{u}) {q n : ℕ} (h : n+1 ≤ q) + (side : Bool) (x : (X.cutoff q).Cell (n+1)) : + X.cutoffLow (Nat.le_trans (Nat.le_succ n) h) (X.cutoffFace q n side x) = + (if side then X.target n else X.source n) (X.cutoffLow h x) := + coord_face _ _ (fun _ => cast_heq _ _) (fun _ => cast_heq _ _) + _ _ (X.cutoffFace_low h side) x + +theorem cutoff_seam_face (X : GlobularSet.{u}) (q : ℕ) (side : Bool) + (x : (X.cutoff q).Cell (q+1)) : + X.cutoffLow (q := q) le_rfl (X.cutoffFace q q side x) = + (if side then (X.cutoffHigh (Nat.lt_succ_self q) x).1.2 + else (X.cutoffHigh (Nat.lt_succ_self q) x).1.1) := + coord_face _ _ (fun _ => cast_heq _ _) (fun _ => cast_heq _ _) + _ _ (X.cutoffFace_seam q side) x + +theorem cutoff_high_face (X : GlobularSet.{u}) {q n : ℕ} (h : q < n) + (side : Bool) (x : (X.cutoff q).Cell (n+1)) : + X.cutoffHigh h (X.cutoffFace q n side x) = + X.cutoffHigh (Nat.lt_trans h (Nat.lt_succ_self n)) x := + coord_face _ _ (fun _ => cast_heq _ _) (fun _ => cast_heq _ _) + _ _ (X.cutoffFace_high h side) x + +theorem cutoffLow_parallel (X : GlobularSet.{u}) {q n : ℕ} (h : n ≤ q) + (x y : (X.cutoff q).Cell n) : + (X.cutoff q).Parallel n x y ↔ X.Parallel n (X.cutoffLow h x) (X.cutoffLow h y) := by + cases n with + | zero => rfl + | succ n => + change (_ = _ ∧ _ = _) ↔ (_ = _ ∧ _ = _) + have hs z := X.cutoffLow_face h false z + have ht z := X.cutoffLow_face h true z + change ∀ z, X.cutoffLow _ ((X.cutoff q).source n z) = X.source n (X.cutoffLow h z) at hs + change ∀ z, X.cutoffLow _ ((X.cutoff q).target n z) = X.target n (X.cutoffLow h z) at ht + constructor + · intro ⟨a, b⟩ + exact ⟨by rw [← hs, ← hs, a], by rw [← ht, ← ht, b]⟩ + · intro ⟨a, b⟩ + exact ⟨(X.cutoffLow _).injective (by rw [hs, hs, a]), + (X.cutoffLow _).injective (by rw [ht, ht, b])⟩ + +theorem cutoff_boundary_seam_bijective (X : GlobularSet.{u}) (q : ℕ) : + Function.Bijective ((X.cutoff q).boundary (q+1)) := by + constructor + · intro x y h + apply (X.cutoffHigh (Nat.lt_succ_self q)).injective + apply Subtype.ext + apply Prod.ext + · have hs := congrArg (fun b : (X.cutoff q).Boundary (q+1) => + X.cutoffLow (q := q) le_rfl b.1.1) h + change X.cutoffLow _ (X.cutoffFace q q false x) = + X.cutoffLow _ (X.cutoffFace q q false y) at hs + rw [X.cutoff_seam_face q false x, X.cutoff_seam_face q false y] at hs + exact hs + · have ht := congrArg (fun b : (X.cutoff q).Boundary (q+1) => + X.cutoffLow (q := q) le_rfl b.1.2) h + change X.cutoffLow _ (X.cutoffFace q q true x) = + X.cutoffLow _ (X.cutoffFace q q true y) at ht + rw [X.cutoff_seam_face q true x, X.cutoff_seam_face q true y] at ht + exact ht + · intro b + let c : X.Boundary (q+1) := + ⟨(X.cutoffLow le_rfl b.1.1, X.cutoffLow le_rfl b.1.2), + (X.cutoffLow_parallel le_rfl _ _).mp b.2⟩ + refine ⟨(X.cutoffHigh (Nat.lt_succ_self q)).symm c, ?_⟩ + apply Subtype.ext + apply Prod.ext + · apply (X.cutoffLow (q := q) le_rfl).injective + change X.cutoffLow _ (X.cutoffFace q q false _) = _ + rw [X.cutoff_seam_face] + change (X.cutoffHigh (Nat.lt_succ_self q) + ((X.cutoffHigh (Nat.lt_succ_self q)).symm c)).1.1 = c.1.1 + exact congrArg (fun b : X.Boundary (q+1) => b.1.1) + ((X.cutoffHigh (Nat.lt_succ_self q)).apply_symm_apply c) + · apply (X.cutoffLow (q := q) le_rfl).injective + change X.cutoffLow _ (X.cutoffFace q q true _) = _ + rw [X.cutoff_seam_face] + change (X.cutoffHigh (Nat.lt_succ_self q) + ((X.cutoffHigh (Nat.lt_succ_self q)).symm c)).1.2 = c.1.2 + exact congrArg (fun b : X.Boundary (q+1) => b.1.2) + ((X.cutoffHigh (Nat.lt_succ_self q)).apply_symm_apply c) + +theorem cutoff_boundary_bijective (X : GlobularSet.{u}) (q j : ℕ) (hj : q < j) : + Function.Bijective ((X.cutoff q).boundary j) := by + induction j with + | zero => omega + | succ j ih => + by_cases h : j = q + · subst j; exact X.cutoff_boundary_seam_bijective q + have hq : q < j := by omega + have hs (x : (X.cutoff q).Cell (j+1)) : + X.cutoffHigh hq ((X.cutoff q).source j x) = + X.cutoffHigh (Nat.lt_trans hq (Nat.lt_succ_self j)) x := + X.cutoff_high_face hq false x + have ht (x : (X.cutoff q).Cell (j+1)) : + X.cutoffHigh hq ((X.cutoff q).target j x) = + X.cutoffHigh (Nat.lt_trans hq (Nat.lt_succ_self j)) x := + X.cutoff_high_face hq true x + constructor + · intro a b hab + apply (X.cutoffHigh (Nat.lt_trans hq (Nat.lt_succ_self j))).injective + rw [← hs, ← hs] + exact congrArg (fun c : (X.cutoff q).Boundary (j+1) => + X.cutoffHigh hq c.1.1) hab + · intro b + have w : b.1.1 = b.1.2 := (ih hq).1 + (((X.cutoff q).parallel_iff_boundary_eq j _ _).mp b.2) + let z := (X.cutoffHigh (Nat.lt_trans hq (Nat.lt_succ_self j))).symm + (X.cutoffHigh hq b.1.1) + refine ⟨z, Subtype.ext (Prod.ext ?_ ?_)⟩ + · apply (X.cutoffHigh hq).injective + exact (hs z).trans (Equiv.apply_symm_apply _ _) + · apply (X.cutoffHigh hq).injective + exact (ht z).trans ((Equiv.apply_symm_apply _ _).trans (congrArg _ w)) + + +theorem faceMap_parallel (X : GlobularSet.{u}) {q n : ℕ} (h : q < n) (x : X.Cell n) : + X.Parallel q (X.faceMap h false x) (X.faceMap h true x) := by + cases q with + | zero => trivial + | succ q => + constructor + · simpa only [faceMap_succ, Bool.false_eq_true, ↓reduceIte] using (X.faceMap_comp (Nat.lt_succ_self q) h false false x).symm.trans + (X.faceMap_comp (Nat.lt_succ_self q) h false true x) + · simpa only [faceMap_succ, ↓reduceIte] using (X.faceMap_comp (Nat.lt_succ_self q) h true false x).symm.trans + (X.faceMap_comp (Nat.lt_succ_self q) h true true x) + +def cutoffUnitCell (X : GlobularSet.{u}) (q n : ℕ) (x : X.Cell n) : (X.cutoff q).Cell n := + if h : n ≤ q then (X.cutoffLow h).symm x + else (X.cutoffHigh (Nat.lt_of_not_ge h)).symm + ⟨(X.faceMap (Nat.lt_of_not_ge h) false x, X.faceMap (Nat.lt_of_not_ge h) true x), + X.faceMap_parallel (Nat.lt_of_not_ge h) x⟩ + +@[simp] +theorem cutoffUnitCell_low (X : GlobularSet.{u}) {q n : ℕ} (h : n ≤ q) (x : X.Cell n) : + X.cutoffLow h (X.cutoffUnitCell q n x) = x := by + unfold cutoffUnitCell + rw [dite_eq_left h] + exact (X.cutoffLow h).apply_symm_apply x + +@[simp] +theorem cutoffUnitCell_high (X : GlobularSet.{u}) {q n : ℕ} (h : q < n) (x : X.Cell n) : + X.cutoffHigh h (X.cutoffUnitCell q n x) = + ⟨(X.faceMap h false x, X.faceMap h true x), X.faceMap_parallel h x⟩ := by + unfold cutoffUnitCell + rw [dite_eq_right (Nat.not_le_of_gt h)] + exact (X.cutoffHigh h).apply_symm_apply _ + +theorem cutoffUnitCell_face (X : GlobularSet.{u}) (q n : ℕ) (side : Bool) + (x : X.Cell (n+1)) : + X.cutoffUnitCell q n ((if side then X.target n else X.source n) x) = + X.cutoffFace q n side (X.cutoffUnitCell q (n+1) x) := by + by_cases h : n+1 ≤ q + · apply (X.cutoffLow (Nat.le_trans (Nat.le_succ n) h)).injective + rw [X.cutoffLow_face h side, X.cutoffUnitCell_low, X.cutoffUnitCell_low] + · by_cases hn : n = q + · subst n + apply (X.cutoffLow (q := q) le_rfl).injective + rw [X.cutoff_seam_face, X.cutoffUnitCell_low, X.cutoffUnitCell_high] + cases side <;> simp only [Bool.false_eq_true, ↓reduceIte, faceMap_succ] + · have hq : q < n := by omega + apply (X.cutoffHigh hq).injective + rw [X.cutoff_high_face hq side, X.cutoffUnitCell_high, X.cutoffUnitCell_high] + apply Subtype.ext + apply Prod.ext + · change X.faceMap hq false ((if side then X.target n else X.source n) x) = + X.faceMap (Nat.lt_trans hq (Nat.lt_succ_self n)) false x + rw [X.faceMap_source hq false] + cases side + · rfl + · exact (X.faceMap_target hq false x).symm + · change X.faceMap hq true ((if side then X.target n else X.source n) x) = + X.faceMap (Nat.lt_trans hq (Nat.lt_succ_self n)) true x + rw [X.faceMap_source hq true] + cases side + · rfl + · exact (X.faceMap_target hq true x).symm + +def cutoffUnit (X : GlobularSet.{u}) (q : ℕ) : Hom X (X.cutoff q) where + app := X.cutoffUnitCell q + source_app n x := X.cutoffUnitCell_face q n false x + target_app n x := X.cutoffUnitCell_face q n true x + +theorem cutoffUnit_bijective (X : GlobularSet.{u}) {q n : ℕ} (h : n ≤ q) : + Function.Bijective ((X.cutoffUnit q).app n) := by + have w : (X.cutoffUnit q).app n = (X.cutoffLow h).symm := by + funext x + apply (X.cutoffLow h).injective + exact (X.cutoffUnitCell_low h x).trans ((X.cutoffLow h).apply_symm_apply x).symm + rw [w] + exact (X.cutoffLow h).symm.bijective + +theorem Hom.evalFace_app {X Y : GlobularSet.{u}} (f : Hom X Y) + {k j : ℕ} (a : Globe.Face k j) (x : X.Cell j) : + f.app k (X.evalFace a x) = Y.evalFace a (f.app j x) := by + cases a with + | id => rfl + | @face j h side => + change f.app k (X.faceMap h side x) = Y.faceMap h side (f.app j x) + induction j, h using Nat.le_induction with + | base => + simp only [faceMap_succ] + cases side + · exact f.source_app k x + · exact f.target_app k x + | succ j h ih => + rw [X.faceMap_source h side, Y.faceMap_source h side, ← f.source_app] + exact ih (X.source j x) + +def Hom.presheafMap {X Y : GlobularSet.{u}} (f : Hom X Y) : X.presheaf ⟶ Y.presheaf where + app n := TypeCat.ofHom (f.app n.unop.dim) + naturality _ _ a := ConcreteCategory.hom_ext _ _ (f.evalFace_app a.unop) + +end GlobularSet + +namespace GlobularPresheaf + +noncomputable def tupleCellEquiv (X : GlobularPresheaf.{v}) (n : ℕ) : + X.tuples.presheaf.obj (op (Shape.globe n)) ≃ X.obj (op (Globe.mk n)) where + toFun f := f.app (op (Globe.mk n)) ⟨⟨𝟙 (Globe.mk n)⟩⟩ + invFun x := + { app k := TypeCat.ofHom (fun f => X.map f.down.down.op x) + naturality k l f := by + apply ConcreteCategory.hom_ext + intro g + change X.map (g.down.down.op ≫ f) x = X.map f (X.map g.down.down.op x) + rw [X.map_comp] + rfl } + left_inv f := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro g + let e : (Shape.liftedRealization.obj (Shape.globe n)).obj (op (Globe.mk n)) := + ⟨⟨𝟙 (Globe.mk n)⟩⟩ + have h := ConcreteCategory.congr_hom (f.naturality g.down.down.op) e + change X.map g.down.down.op (f.app (op (Globe.mk n)) e) = f.app k g + change f.app k ⟨⟨g.down.down ≫ 𝟙 (Globe.mk n)⟩⟩ = + X.map g.down.down.op (f.app (op (Globe.mk n)) e) at h + exact h.symm.trans (congrArg (fun t => f.app k t) + (show (⟨⟨g.down.down ≫ 𝟙 (Globe.mk n)⟩⟩ : + (Shape.liftedRealization.obj (Shape.globe n)).obj k) = g from + by apply ULift.ext; apply ULift.ext; exact Category.comp_id _)) + right_inv x := by + change X.map (𝟙 _) x = x + rw [X.map_id] + rfl + +noncomputable def tuplesMap {X Y : GlobularPresheaf.{v}} (f : X ⟶ Y) : + X.tuples.presheaf ⟶ Y.tuples.presheaf := + Functor.whiskerLeft Shape.liftedRealization.op (yoneda.map f) + +@[simp] +theorem tupleCellEquiv_map {X Y : GlobularPresheaf.{v}} (f : X ⟶ Y) (n : ℕ) + (x : X.tuples.presheaf.obj (op (Shape.globe n))) : + Y.tupleCellEquiv n ((tuplesMap f).app (op (Shape.globe n)) x) = + f.app (op (Globe.mk n)) (X.tupleCellEquiv n x) := rfl + +theorem tupleCellEquiv_face (X : GlobularPresheaf.{v}) {m n : ℕ} (h : m < n) + (side : Bool) (x : X.tuples.presheaf.obj (op (Shape.globe n))) : + X.tupleCellEquiv m (X.tuples.presheaf.map (Shape.face h side).op x) = + X.map (Globe.face h side).op (X.tupleCellEquiv n x) := by + let e : (Shape.liftedRealization.obj (Shape.globe n)).obj (op (Globe.mk n)) := + ⟨⟨𝟙 (Globe.mk n)⟩⟩ + have w := ConcreteCategory.congr_hom (x.naturality (Globe.face h side).op) e + change x.app (op (Globe.mk m)) ⟨⟨𝟙 (Globe.mk m) ≫ Globe.face h side⟩⟩ = + X.map (Globe.face h side).op (x.app (op (Globe.mk n)) e) + change x.app (op (Globe.mk m)) ⟨⟨Globe.face h side ≫ 𝟙 (Globe.mk n)⟩⟩ = + X.map (Globe.face h side).op (x.app (op (Globe.mk n)) e) at w + have hi := congrArg (fun a : Globe.mk m ⟶ Globe.mk n => + x.app (op (Globe.mk m)) ⟨⟨a⟩⟩) (Category.id_comp (Globe.face h side)) + have hc := congrArg (fun a : Globe.mk m ⟶ Globe.mk n => + x.app (op (Globe.mk m)) ⟨⟨a⟩⟩) (Category.comp_id (Globe.face h side)) + exact hi.trans (hc.symm.trans w) + +noncomputable def tupleUnderlyingMap (X : GlobularPresheaf.{v}) : + GlobularSet.Hom X.tuples.underlying X.underlying where + app := fun n => X.tupleCellEquiv n + source_app n x := X.tupleCellEquiv_face (Nat.lt_succ_self n) false x + target_app n x := X.tupleCellEquiv_face (Nat.lt_succ_self n) true x + +theorem tuplesMap_bijective_globe {X Y : GlobularPresheaf.{v}} (f : X ⟶ Y) + (n : ℕ) (h : Function.Bijective (f.app (op (Globe.mk n)))) : + Function.Bijective ((tuplesMap f).app (op (Shape.globe n))) := by + have w : (tuplesMap f).app (op (Shape.globe n)) = + (Y.tupleCellEquiv n).symm ∘ f.app (op (Globe.mk n)) ∘ X.tupleCellEquiv n := by + funext x + apply (Y.tupleCellEquiv n).injective + simpa only [Function.comp_apply, Equiv.apply_symm_apply] using tupleCellEquiv_map f n x + rw [w] + exact (Y.tupleCellEquiv n).symm.bijective.comp (h.comp (X.tupleCellEquiv n).bijective) + +end GlobularPresheaf + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CutoffExistence.lean b/lean/OAI/CategoryTheory/Globular/CutoffExistence.lean new file mode 100644 index 0000000000000000000000000000000000000000..20517f17c24040e50d035aced1ab410e286a83ec --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CutoffExistence.lean @@ -0,0 +1,256 @@ +import OAI.CategoryTheory.Globular.CutoffCells + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularSet + +theorem Hom.reflects_parallel {X Y : GlobularSet.{u}} (f : Hom X Y) + (hf : ∀ n, Function.Injective (f.app n)) {n : ℕ} {x y : X.Cell n} + (h : Y.Parallel n (f.app n x) (f.app n y)) : X.Parallel n x y := by + cases n with + | zero => trivial + | succ n => + exact ⟨hf n (by rw [f.source_app, f.source_app]; exact h.1), + hf n (by rw [f.target_app, f.target_app]; exact h.2)⟩ + +theorem Hom.boundaryMap_bijective {X Y : GlobularSet.{u}} (f : Hom X Y) + (hf : ∀ n, Function.Bijective (f.app n)) (n : ℕ) : + Function.Bijective (f.boundaryMap n) := by + cases n with + | zero => + change Function.Bijective (fun _ : PUnit => (PUnit.unit : PUnit)) + exact ⟨fun _ _ _ => Subsingleton.elim _ _, fun _ => ⟨PUnit.unit, rfl⟩⟩ + | succ n => + constructor + · intro x y h + have hv := congrArg Subtype.val h + exact Subtype.ext (Prod.ext ((hf n).1 (congrArg Prod.fst hv)) + ((hf n).1 (congrArg Prod.snd hv))) + · intro b + obtain ⟨x, hx⟩ := (hf n).2 b.1.1 + obtain ⟨y, hy⟩ := (hf n).2 b.1.2 + have hp : X.Parallel n x y := f.reflects_parallel (fun k => (hf k).1) + (by rw [hx, hy]; exact b.2) + exact ⟨⟨(x,y), hp⟩, Subtype.ext (Prod.ext hx hy)⟩ + +theorem Hom.boundary_bijective_iff {X Y : GlobularSet.{u}} (f : Hom X Y) + (hf : ∀ n, Function.Bijective (f.app n)) (n : ℕ) : + Function.Bijective (X.boundary n) ↔ Function.Bijective (Y.boundary n) := by + have w : f.boundaryMap n ∘ X.boundary n = Y.boundary n ∘ f.app n := by + funext x; exact f.boundary_app n x + constructor + · intro h + have hb := (f.boundaryMap_bijective hf n).comp h + rw [w] at hb + exact (Function.Bijective.of_comp_iff _ (hf n)).mp hb + · intro h + have hb := h.comp (hf n) + rw [← w] at hb + constructor + · exact fun _ _ hxy => hb.1 (congrArg (f.boundaryMap n) hxy) + · intro b + obtain ⟨x, hx⟩ := hb.2 (f.boundaryMap n b) + exact ⟨x, (f.boundaryMap_bijective hf n).1 hx⟩ + +end GlobularSet + +namespace Shape + +noncomputable def cellArrow (S : Shape) (k : Globeᵒᵖ) (x : S.realize.obj k) : + globe k.unop.dim ⟶ S := uliftYonedaEquiv.symm x + +theorem cellArrow_map (S : Shape) {k l : Globeᵒᵖ} (a : k ⟶ l) (x : S.realize.obj k) : + S.cellArrow l (S.realize.map a x) = + GlobularTheory.shapeGlobes.map a.unop ≫ S.cellArrow k x := + uliftYonedaEquiv_symm_map a x + +theorem cellArrow_naturality {S R : Shape} (f : S ⟶ R) (k : Globeᵒᵖ) + (x : S.realize.obj k) : + R.cellArrow k (f.app k x) = S.cellArrow k x ≫ f := + (uliftYonedaEquiv_symm_comp x f).symm + +theorem cellArrow_identity (n : ℕ) : + (globe n).cellArrow (op (Globe.mk n)) ⟨𝟙 (Globe.mk n)⟩ = 𝟙 (globe n) := by + apply uliftYonedaEquiv.injective + simp only [cellArrow] + rfl + +end Shape + +namespace TupleSystem + +noncomputable def globularPresheaf (T : TupleSystem.{v}) : GlobularPresheaf.{v} := + GlobularTheory.shapeGlobes.op ⋙ T.presheaf + +noncomputable def evaluation (T : TupleSystem.{v}) : + T.presheaf ⟶ T.globularPresheaf.tuples.presheaf where + app S := TypeCat.ofHom (fun x => + { app k := TypeCat.ofHom (fun s => T.presheaf.map (S.unop.cellArrow k s.down).op x) + naturality k l a := by + apply ConcreteCategory.hom_ext + intro s + change ULift.{v} (S.unop.realize.obj k) at s + change T.presheaf.map + (S.unop.cellArrow l (S.unop.realize.map a s.down)).op x = + T.presheaf.map (GlobularTheory.shapeGlobes.map a.unop).op + (T.presheaf.map (S.unop.cellArrow k s.down).op x) + rw [Shape.cellArrow_map] + exact ConcreteCategory.congr_hom (T.presheaf.map_comp _ _) x }) + naturality S R f := by + apply ConcreteCategory.hom_ext + intro x + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro s + change ULift.{v} (R.unop.realize.obj k) at s + change T.presheaf.map (R.unop.cellArrow k s.down).op (T.presheaf.map f x) = + T.presheaf.map (S.unop.cellArrow k (f.unop.app k s.down)).op x + rw [Shape.cellArrow_naturality] + exact (ConcreteCategory.congr_hom (T.presheaf.map_comp _ _) x).symm + +@[simp] +theorem evaluation_globe (T : TupleSystem.{v}) (n : ℕ) + (x : T.presheaf.obj (op (Shape.globe n))) : + T.globularPresheaf.tupleCellEquiv n ((T.evaluation.app (op (Shape.globe n))) x) = x := by + change T.presheaf.map + ((Shape.globe n).cellArrow (op (Globe.mk n)) ⟨𝟙 (Globe.mk n)⟩).op x = x + rw [Shape.cellArrow_identity, op_id, T.presheaf.map_id] + rfl + +theorem evaluation_bijective_globe (T : TupleSystem.{v}) (n : ℕ) : + Function.Bijective (T.evaluation.app (op (Shape.globe n))) := by + have h : (fun x => T.evaluation.app (op (Shape.globe n)) x) = + (T.globularPresheaf.tupleCellEquiv n).symm := by + funext x + apply (T.globularPresheaf.tupleCellEquiv n).injective + exact (T.evaluation_globe n x).trans (Equiv.apply_symm_apply _ _).symm + change Function.Bijective (fun x => T.evaluation.app (op (Shape.globe n)) x) + rw [h] + exact (T.globularPresheaf.tupleCellEquiv n).symm.bijective + +theorem evaluation_bijective (T : TupleSystem.{v}) (S : Shape) : + Function.Bijective (T.evaluation.app (op S)) := + bijective_of_globes T.evaluation S.height (fun k _ => T.evaluation_bijective_globe k) S le_rfl + +end TupleSystem + +namespace GlobularPresheaf + +theorem underlying_evalFace (X : GlobularPresheaf.{u}) {k j : ℕ} + (a : Globe.Face k j) (x : X.obj (op (Globe.mk j))) : + X.underlying.evalFace a x = X.map (show Globe.mk k ⟶ Globe.mk j from a).op x := by + cases a with + | id => + change x = X.map (𝟙 _) x + rw [X.map_id] + rfl + | @face j h side => + change X.underlying.faceMap h side x = X.map (Globe.face h side).op x + induction j, h using Nat.le_induction with + | base => + rw [GlobularSet.faceMap_succ] + cases side <;> rfl + | succ j h ih => + apply (X.underlying.faceMap_source h side x).trans + apply (ih (X.underlying.source j x)).trans + have w : Globe.face (Nat.lt_succ_of_lt h) side = Globe.face h side ≫ Globe.source j := rfl + rw [w, op_comp, X.map_comp] + rfl + +def underlyingPresheafIso (X : GlobularPresheaf.{u}) : X.underlying.presheaf ≅ X where + hom := + { app _ := 𝟙 _ + naturality k j a := by + apply ConcreteCategory.hom_ext + intro x + exact X.underlying_evalFace a.unop x } + inv := + { app _ := 𝟙 _ + naturality k j a := by + apply ConcreteCategory.hom_ext + intro x + exact (X.underlying_evalFace a.unop x).symm } + +end GlobularPresheaf + +namespace GlobularSet + +def presheafUnderlyingMap (X : GlobularSet.{u}) : Hom X.presheaf.underlying X where + app _ := _root_.id + source_app n x := by + change X.faceMap (Nat.lt_succ_self n) false x = X.source n x + rw [X.faceMap_succ] + rfl + target_app n x := by + change X.faceMap (Nat.lt_succ_self n) true x = X.target n x + rw [X.faceMap_succ] + rfl + +end GlobularSet + +namespace TupleSystem + +noncomputable def modelUnderlyingMap {C : GlobularTheory.{v}} (T : TupleSystem.{v}) + (a : GlobularTheory.Morphism C T.endTheory) : + GlobularSet.Hom (T.model a).underlying T.underlying where + app _ := _root_.id + source_app n x := ConcreteCategory.congr_hom (a.map_base (Shape.source n)) x + target_app n x := ConcreteCategory.congr_hom (a.map_base (Shape.target n)) x + +end TupleSystem + +namespace GlobularTheory.Model + +theorem exists_cutoff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (X : C.Model) (q : ℕ) : + ∃ (R : C.Model) (η : X ⟶ R), + (∀ n, n ≤ q → Function.Bijective ((underlyingMap η).app n)) ∧ + (∀ j, q < j → Function.Bijective (R.underlying.boundary j)) := by + let G := X.tuples.globularPresheaf + let Z := G.underlying.cutoff q + let U := Z.presheaf.tuples + let g : G ⟶ Z.presheaf := G.underlyingPresheafIso.inv ≫ + (G.underlying.cutoffUnit q).presheafMap + let f : X.tuples.presheaf ⟶ U.presheaf := X.tuples.evaluation ≫ + GlobularPresheaf.tuplesMap g + have hlow (S : Shape) (hS : S.height ≤ q) : Function.Bijective (f.app (op S)) := by + apply TupleSystem.bijective_of_globes f q _ S hS + intro k hk + exact (GlobularPresheaf.tuplesMap_bijective_globe g k + (G.underlying.cutoffUnit_bijective hk)).comp (X.tuples.evaluation_bijective_globe k) + have hhigh (j : ℕ) (hj : q < j) : Function.Bijective (U.underlying.boundary j) := by + apply ((Z.presheaf.tupleUnderlyingMap).boundary_bijective_iff + (fun k => (Z.presheaf.tupleCellEquiv k).bijective) j).mpr + apply (Z.presheafUnderlyingMap.boundary_bijective_iff + (fun _ => Function.bijective_id) j).mpr + exact G.underlying.cutoff_boundary_bijective q j hj + obtain ⟨a, ha⟩ := hC.1.some.lift (TupleSystem.relativeSource f) + (TupleSystem.relativeSource_liftsFillers f q hlow hhigh) X.interpretation + let R := U.model (a.comp (TupleSystem.relativeTarget f)) + let η : X ⟶ R := + { app S := f.app (op S.unop.shape) + naturality S T g := by + have w := (a.map g.unop).w + have hm := congrArg (fun z : Morphism C X.tuples.endTheory => z.map g.unop) ha + change (a.map g.unop).left = X.presheaf.map g at hm + rw [hm] at w + exact w } + refine ⟨R, η, ?_, ?_⟩ + · intro k hk + exact hlow (Shape.globe k) hk + · intro j hj + exact ((U.modelUnderlyingMap (a.comp (TupleSystem.relativeTarget f))).boundary_bijective_iff + (fun _ => Function.bijective_id) j).mpr (hhigh j hj) + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CutoffExpansion.lean b/lean/OAI/CategoryTheory/Globular/CutoffExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..263ec257cd841f20d2229e89e75ea1f8c52ee616 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CutoffExpansion.lean @@ -0,0 +1,103 @@ +import OAI.CategoryTheory.Globular.ReflectedCylinder + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits + +theorem exactBoundaryTest_of_cutoff_path {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) {X Y : CutoffModels C q} (i : X ⟶ Y) + (hi : (sourceClass hC q r).rlp.llp i) (hX : Cofibrant hC q X) + (z : Y ⟶ X) (hz : i ≫ z = 𝟙 X) (P : CutoffPathData hC q r Y) : + GlobularSet.ExactBoundaryTest (underlyingMap i.hom) := by + let := cutoff_hasLimits hC q + obtain ⟨a, ha⟩ := hX P.p₀ P.lifts₀ i + let u : X ⟶ Y := a ≫ P.p₁ + let := hi (prod.lift P.p₀ P.p₁) P.joint_rlp + have sq : CommSq a i (prod.lift P.p₀ P.p₁) (prod.lift (𝟙 Y) (z ≫ u)) := by + constructor + apply prod.hom_ext + · simpa only [Category.assoc, prod.lift_fst, Category.comp_id] using ha + · simp only [Category.assoc, prod.lift_snd] + rw [← Category.assoc i, hz, Category.id_comp] + have hf₀ : sq.lift ≫ P.p₀ = 𝟙 Y := by + have e := congrArg (· ≫ prod.fst) sq.fac_right + simpa only [Category.assoc, prod.lift_fst] using e + have hf₁ : sq.lift ≫ P.p₁ = z ≫ u := by + have e := congrArg (· ≫ prod.snd) sq.fac_right + simpa only [Category.assoc, prod.lift_snd] using e + have hp₀ : GlobularSet.LiftsBoundaries (underlyingMap P.p₀.hom) := by + intro k + exact (hasLiftingProperty_I_iff k P.p₀.hom).1 + ((boundaryClass_rlp_iff hC q 0 P.p₀).1 P.lifts₀ k (Nat.zero_le k)) + have hp₁ : GlobularSet.LiftsBoundaries (underlyingMap P.p₁.hom) := by + intro k + exact (hasLiftingProperty_I_iff k P.p₁.hom).1 + ((boundaryClass_rlp_iff hC q 0 P.p₁).1 P.lifts₁ k (Nat.zero_le k)) + apply GlobularSet.ExactBoundaryTest.of_retract_factor + (underlyingMap i.hom) (underlyingMap z.hom) (underlyingMap u.hom) + (congrArg (fun t : X ⟶ X => underlyingMap t.hom) hz) _ (Y.obj.joined_refl hC) + have hv := GlobularSet.exactBoundaryTest_endpoint_section + (underlyingMap P.p₀.hom) (underlyingMap P.p₁.hom) (underlyingMap sq.lift.hom) + hp₀ hp₁ + (fun k x => congrFun (congrArg (fun t => (underlyingMap t.hom).app k) hf₀) x) + (Y.obj.joined_refl hC) + have e := congrArg (fun t : Y ⟶ Y => underlyingMap t.hom) hf₁ + change GlobularSet.ExactBoundaryTest (underlyingMap (sq.lift ≫ P.p₁).hom) at hv + rw [e] at hv + exact hv + +theorem sourceClass_cofibration_mono {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {r s : ℕ} (hrs : r ≤ s) : + (sourceClass hC q s).rlp.llp ≤ (sourceClass hC q r).rlp.llp := by + intro X Y i hi P Q p hp + apply hi p + rw [sourceClass_rlp_iff] at hp ⊢ + exact fun k hk => hp k (hrs.trans hk) + +theorem expansionContraction_mono {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {r s : ℕ} (hrs : r ≤ s) (H : ExpansionContraction hC q r) : + ExpansionContraction hC q s := by + intro X Y i hi hX hXF + exact H i (sourceClass_cofibration_mono hC q hrs i hi) hX hXF + +theorem expansionContraction_all {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : ExpansionContraction hC q r := by + let := cutoff_hasColimits hC q + let := cutoff_hasLimits hC q + have hall : ∀ m r, q-r = m → ExpansionContraction hC q r := by + intro m + induction m using Nat.strong_induction_on with + | h m ih => + intro r hr + by_cases hqr : q ≤ r + · exact expansionContraction_mono hC q hqr (expansionContraction_top hC q) + · have Hnext : ExpansionContraction hC q (r+1) := @ih (q-(r+1)) (by omega) (r+1) rfl + exact expansionContraction_of_paths hC q r + (fun Y => ⟨cylinderPathData hC q r (by omega) Hnext Y⟩) + exact @hall (q-r) r rfl + +theorem cutoff_elementary_exactBoundaryTest {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) {X Y : C.Model} (hX : X.IsCellular) + (a : disk C n ⟶ X) (i : X ⟶ Y) (b : disk C (n+1) ⟶ Y) + (sq : IsPushout a (J C n) i b) : + GlobularSet.ExactBoundaryTest (underlyingMap ((cutoffFunctor hC q).map i).hom) := by + let := cutoff_hasColimits hC q + let := cutoff_hasLimits hC q + let F := cutoffFunctor hC q + let : F.IsLeftAdjoint := (cutoffAdjunction hC q).isLeftAdjoint + have hi : (sourceClass hC q n).rlp.llp (F.map i) := by + apply MorphismProperty.of_isPushout (sq.map F) + intro P Q p hp + exact hp _ (MorphismProperty.ofHoms.mk (⟨n,le_rfl⟩ : {k : ℕ // n ≤ k})) + obtain ⟨z,hz⟩ := elementary_pushout_retraction hC n a i b sq + apply exactBoundaryTest_of_cutoff_path hC q n (F.map i) hi + (isCellular_cutoff_cofibrant hC q hX) (F.map z) + · exact (F.map_comp i z).symm.trans ((congrArg F.map hz).trans (F.map_id X)) + · exact cylinderPathData hC q n hnq (expansionContraction_all hC q (n+1)) (F.obj Y) + +end Grothendieck.GlobularTheory.Model + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderContractibility.lean b/lean/OAI/CategoryTheory/Globular/CylinderContractibility.lean new file mode 100644 index 0000000000000000000000000000000000000000..61f3bcc45bca31d37447db5d3f733ad43129975d --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderContractibility.lean @@ -0,0 +1,129 @@ +import OAI.CategoryTheory.Globular.OneSidedPresentation + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularPresheaf +noncomputable def liftSmallDiskIso (j : ℕ) : liftSmall.{v}.obj (disk.{0} j) ≅ disk.{v} j := + NatIso.ofComponents (fun _ => Equiv.toIso + { toFun := fun x => ⟨x.down.down⟩ + invFun := fun x => ⟨⟨x.down⟩⟩ + left_inv := fun _ => rfl + right_inv := fun _ => rfl }) (by intros; rfl) +end GlobularPresheaf +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) + +theorem hasFillers_of_iso {X Y : CutoffModels C q} (e : X ≅ Y) + (hX : X.obj.underlying.HasFillers) : Y.obj.underlying.HasFillers := by + apply hX.retract (underlyingMap e.inv.hom) (underlyingMap e.hom.hom) + exact congrArg (fun z : Y ⟶ Y => underlyingMap z.hom) e.inv_hom_id + +noncomputable def cylinderCriticalData (ε : Bool) : + GlobularFrame.CriticalData (cylinderEndpoint hC q n ε) n ε where + low j hj := by + change IsIso ((cylinderNode hC q n j).endpoint ε) + rw [cylinderNode_low hC q n hj] + change IsIso (𝟙 _) + infer_instance + iso := eqToIso (congrArg CylinderNode.obj (cylinderNode_critical hC q n)) + endpoint := by + change (cylinderNode hC q n n).endpoint ε ≫ + eqToHom (congrArg CylinderNode.obj (cylinderNode_critical hC q n)) = _ + have h (Z : CylinderNode (cutoffDiskFrame hC q) n) + (hz : Z = CylinderNode.critical (cutoffDiskFrame hC q) n) : + Z.endpoint ε ≫ eqToHom (congrArg CylinderNode.obj hz) = + if ε then (cutoffDiskFrame hC q).diagram.target n else (cutoffDiskFrame hC q).diagram.source n := by + subst Z + exact Category.comp_id _ + exact h _ (cylinderNode_critical hC q n) + +theorem cutoff_boundary_surjective_iff (X : CutoffModels C q) (j : ℕ) : + Function.Surjective (X.obj.underlying.boundary j) ↔ + ∀ a : cutoffBoundary hC q j ⟶ X, ∃ b : cutoffDisk hC q j ⟶ X, cutoffI hC q j ≫ b = a := by + let A := cutoffAdjunction hC q + let R := boundaryRepresentation C j + constructor + · intro h a + obtain ⟨x, hx⟩ := h (R.equiv X.obj (A.homEquiv _ X a)) + refine ⟨(A.homEquiv _ X).symm ((cellEquiv X.obj j).symm x), ?_⟩ + apply (A.homEquiv _ X).injective + rw [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] + apply (R.equiv X.obj).injective + change R.equiv X.obj (R.inclusion ≫ (cellEquiv X.obj j).symm x) = _ + simpa only [R.inclusion_boundary, Equiv.apply_symm_apply] using hx + · intro h a + obtain ⟨g, hg⟩ := h ((A.homEquiv _ X).symm ((R.equiv X.obj).symm a)) + refine ⟨cellEquiv X.obj j (A.homEquiv _ X g), ?_⟩ + have e := congrArg (A.homEquiv _ X) hg + rw [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] at e + change R.inclusion ≫ A.homEquiv _ X g = _ at e + rw [← R.inclusion_boundary, e, Equiv.apply_symm_apply] + +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimits : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cutoffFrame_diskWhisker_hasFillers (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + (j : ℕ) (ε : Bool) : + ((cutoffDiskFrame hC q).realization.obj + ((GlobularPresheaf.whiskering n ε).obj (GlobularPresheaf.disk.{v} j))).obj.underlying.HasFillers := by + apply hasFillers_of_iso (q := q) + ((cutoffDiskFrame hC q).realization.mapIso + ((GlobularPresheaf.whiskering n ε).mapIso (GlobularPresheaf.liftSmallDiskIso j))) + exact cutoffFrame_whisker_hasFillers hC q n hnq H (Shape.globe j) ε + +theorem cylinderNode_high_hasFillers {j : ℕ} (hj : n < j) (hnq : n ≤ q) + (ε : Bool) + (hA : (GlobularFrame.oneSided (cylinderEndpoint hC q n ε) j).obj.underlying.HasFillers) : + (cylinderNode hC q n j).obj.obj.underlying.HasFillers := by + let i := GlobularFrame.oneSidedMap (cylinderEndpoint hC q n ε) j + have hi := cylinderFrame_upper hC q n hj ε + apply hA.of_low_bijective (underlyingMap i.hom) n + · intro k hk + exact upper_cofibration_low_bijective hC q (n+1) k (hk.trans hnq) (by omega) i hi + · intro k hk + rw [cutoff_boundary_surjective_iff hC q] + apply (lifting_terminal_iff _ _).1 + exact cylinderNode_upper_fillers hC q n hj _ + (MorphismProperty.ofHoms.mk (⟨k,by omega⟩ : {k : ℕ // n+1 ≤ k})) + +theorem cylinder_oneSided_contractible (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) : + ∀ j, n < j → ∀ ε : Bool, + Cofibrant hC q (GlobularFrame.oneSided (cylinderEndpoint hC q n ε) j) ∧ + (GlobularFrame.oneSided (cylinderEndpoint hC q n ε) j).obj.underlying.HasFillers ∧ + (sourceClass hC q (n+1)).rlp.llp (GlobularFrame.oneSidedMap (cylinderEndpoint hC q n ε) j) := by + intro j + induction j using Nat.strong_induction_on with + | h j ih => + intro hj ε + cases j with + | zero => omega + | succ j => + let e := cylinderEndpoint hC q n ε + let U := (cylinderCriticalData hC q n ε).whiskerPresentation (GlobularPresheaf.disk.{v} (j+1)).underlying + let V := GlobularFrame.Presentation.oneSidedPresentation e j + let f := V.comparison U (by omega) + have hf : (sourceClass hC q (n+1)).rlp.llp f := by + intro X Y p hp + exact V.comparison_lifting U (by omega) p (fun k hk hk' => + (ih k (by omega) hk ε).2.2 p hp) + have hU : Cofibrant hC q U.obj := cutoffFrame_cofibrant hC q _ + have hUF : U.obj.obj.underlying.HasFillers := cutoffFrame_diskWhisker_hasFillers hC q n hnq H (j+1) ε + have hV : Cofibrant hC q V.obj := hU.of_cofibration f + (boundaryClass_cofibration_le hC q 0 (n+1) (Nat.zero_le _) f + (sourceClass_cofibration_le hC q (n+1) f hf)) + have hVF : V.obj.obj.underlying.HasFillers := H f hf hU hUF + refine ⟨hV, hVF, ?_⟩ + exact upper_boundary_is_source hC q (n+1) H _ + (cylinderFrame_upper hC q n hj ε) hV hVF + (cylinderNode_high_hasFillers hC q n hj hnq ε hVF) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderExtension.lean b/lean/OAI/CategoryTheory/Globular/CylinderExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..fef28d965f10197e47cccb73d10207f0c3842672 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderExtension.lean @@ -0,0 +1,120 @@ +import OAI.CategoryTheory.Globular.CylinderTheory + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsExtension : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cylinderShapeEndpoint_low (S : Shape) (hS : S.height < n) : + (cylinderShapeEndpoint hC q n false).app S = (cylinderShapeEndpoint hC q n true).app S := by + change (shapeFrameIso hC q S).hom ≫ (cylinderEndpoint hC q n false).shapeEndpoint.app S = + (shapeFrameIso hC q S).hom ≫ (cylinderEndpoint hC q n true).shapeEndpoint.app S + apply congrArg ((shapeFrameIso hC q S).hom ≫ ·) + apply (cutoffDiskFrame hC q).hom_ext + intro j x + erw [GlobularFrame.Hom.cell_realization, GlobularFrame.Hom.cell_realization] + change S.2.height < n at hS + have hj : j < n := by + by_contra h + exact (S.2.bounded j (by omega)).false x.down + have he : (cylinderEndpoint hC q n false).obj j = (cylinderEndpoint hC q n true).obj j := by + change (cylinderNode hC q n j).endpoint false = (cylinderNode hC q n j).endpoint true + rw [cylinderNode_low hC q n hj] + rfl + exact congrArg (· ≫ _) he + +theorem completedCylinder_extend (j : ℕ) (B : CutoffModels C q) + (e : Bool → (cutoffBoundary hC q j ⟶ B)) {Y : CutoffModels C q} + (hY : Y.obj.underlying.HasFillers) (b : B ⟶ Y) + (d : Bool → (cutoffDisk hC q j ⟶ Y)) + (hd : ∀ ε, e ε ≫ b = cutoffI hC q j ≫ d ε) : + ∃ l : (completedCylinder hC q n j B e).obj ⟶ Y, + (completedCylinder hC q n j B e).inc ≫ l = b ∧ + ∀ ε, (completedCylinder hC q n j B e).endpoint ε ≫ l = d ε := by + let F := cylinderFactor hC q n j B e + have hp : (boundaryClass hC q (n+1)).rlp (terminal.from Y) := by + rintro A B f ⟨⟨k,hk⟩⟩ + exact (lifting_terminal_iff _ _).2 ((cutoff_hasFillers_iff hC q _).1 hY k) + let a := TwoEndpoints.desc (cutoffI hC q j) e b d hd + obtain ⟨l,hl⟩ := (lifting_terminal_iff F.i Y).1 (F.hi _ hp) a + refine ⟨l, ?_, ?_⟩ + · change (TwoEndpoints.base _ _ ≫ F.i) ≫ l = b + erw [Category.assoc, hl] + exact TwoEndpoints.base_desc _ _ _ _ _ + · intro ε + change (TwoEndpoints.endpoint _ _ ε ≫ F.i) ≫ l = d ε + erw [Category.assoc, hl] + exact TwoEndpoints.endpoint_desc _ _ _ _ _ _ + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem criticalCylinder_extend {Y : CutoffModels C q} + (hY : Y.obj.underlying.HasFillers) + (b : (cutoffDiskFrame hC q).bd n ⟶ Y) + (d : Bool → ((cutoffDiskFrame hC q).obj n ⟶ Y)) + (hd : ∀ ε, b = (cutoffDiskFrame hC q).inc n ≫ d ε) : + ∃ l : (CylinderNode.critical (cutoffDiskFrame hC q) n).obj ⟶ Y, + (CylinderNode.critical (cutoffDiskFrame hC q) n).inc ≫ l = b ∧ + ∀ ε, (CylinderNode.critical (cutoffDiskFrame hC q) n).endpoint ε ≫ l = d ε := by + let D := cutoffDiskFrame hC q + let a := (D.square n).desc (d false) (d true) ((hd false).symm.trans (hd true)) + obtain ⟨l,hl⟩ := (cutoff_hasFillers_iff hC q Y).1 hY (n+1) a + have hs : D.diagram.source n ≫ l = d false := by + change (D.left n ≫ D.inc (n+1)) ≫ l = _ + erw [Category.assoc, hl] + exact (D.square n).inl_desc _ _ _ + have ht : D.diagram.target n ≫ l = d true := by + change (D.right n ≫ D.inc (n+1)) ≫ l = _ + erw [Category.assoc, hl] + exact (D.square n).inr_desc _ _ _ + refine ⟨l, ?_, ?_⟩ + · change (D.inc n ≫ D.diagram.source n) ≫ l = b + erw [Category.assoc, hs] + exact (hd false).symm + · intro ε + cases ε + · exact hs + · exact ht + +theorem cylinderNode_extend (j : ℕ) {Y : CutoffModels C q} + (hY : Y.obj.underlying.HasFillers) (b : (cylinderNode hC q n j).bd ⟶ Y) + (d : Bool → (cutoffDisk hC q j ⟶ Y)) + (hd : ∀ ε, (cylinderNode hC q n j).bdEnd ε ≫ b = cutoffI hC q j ≫ d ε) + (hlow : j < n → d false = d true) : + ∃ l : (cylinderNode hC q n j).obj ⟶ Y, + (cylinderNode hC q n j).inc ≫ l = b ∧ + ∀ ε, (cylinderNode hC q n j).endpoint ε ≫ l = d ε := by + revert b + by_cases hj : j < n + · erw [cylinderNode_low hC q n hj] + intro b hd + refine ⟨d false, ?_, ?_⟩ + · have h := hd false + exact (Category.id_comp b).symm.trans h |>.symm + · intro ε + cases ε + · exact Category.id_comp _ + · exact (Category.id_comp _).trans (hlow hj) + · by_cases he : j = n + · subst j + erw [cylinderNode_critical] + intro b hd + exact criticalCylinder_extend hC q n hY b d (fun ε => (Category.id_comp b).symm.trans (hd ε)) + · cases j with + | zero => omega + | succ j => + erw [cylinderNode_high hC q n (by omega)] + intro b hd + exact completedCylinder_extend hC q n _ _ _ hY b d hd + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderFramework.lean b/lean/OAI/CategoryTheory/Globular/CylinderFramework.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a944a944f842dcf41790b93b6788b7fe7be595c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderFramework.lean @@ -0,0 +1,259 @@ +import OAI.CategoryTheory.Globular.ReverseWhisker + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +structure GlobularFrame (K : Type u) [Category.{v} K] where + obj : ℕ → K + bd : ℕ → K + inc : ∀ j, bd j ⟶ obj j + left : ∀ j, obj j ⟶ bd (j+1) + right : ∀ j, obj j ⟶ bd (j+1) + square : ∀ j, IsPushout (inc j) (inc j) (left j) (right j) + initial : IsInitial (bd 0) + +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] + +def diagram (B : GlobularFrame K) : CoGlobularObject K where + obj := B.obj + source j := B.left j ≫ B.inc (j+1) + target j := B.right j ≫ B.inc (j+1) + source_source j := by + simp only [Category.assoc] + rw [← Category.assoc (B.inc (j+1)), (B.square (j+1)).w, Category.assoc] + target_source j := by + simp only [Category.assoc] + rw [← Category.assoc (B.inc (j+1)), (B.square (j+1)).w, Category.assoc] + +def homGlob (B : GlobularFrame K) (Y : K) : GlobularSet.{v} where + Cell j := B.obj j ⟶ Y + source j f := B.diagram.source j ≫ f + target j f := B.diagram.target j ≫ f + source_source j f := by + change B.diagram.source j ≫ B.diagram.source (j+1) ≫ f = + B.diagram.source j ≫ B.diagram.target (j+1) ≫ f + erw [← Category.assoc, B.diagram.source_source, Category.assoc] + target_source j f := by + change B.diagram.target j ≫ B.diagram.source (j+1) ≫ f = + B.diagram.target j ≫ B.diagram.target (j+1) ≫ f + erw [← Category.assoc, B.diagram.target_source, Category.assoc] + +def post {B : GlobularFrame K} {X Y : K} (f : X ⟶ Y) : + GlobularSet.Hom (B.homGlob X) (B.homGlob Y) where + app _ a := a ≫ f + source_app _ _ := Category.assoc _ _ _ + target_app _ _ := Category.assoc _ _ _ + +structure BoundaryEquiv (B : GlobularFrame K) (n : ℕ) where + equiv : ∀ Y, (B.bd n ⟶ Y) ≃ (B.homGlob Y).Boundary n + naturality : ∀ {X Y} (a : B.bd n ⟶ X) (f : X ⟶ Y), + equiv Y (a ≫ f) = (post f).boundaryMap n (equiv X a) + inc_boundary : ∀ {Y} (a : B.obj n ⟶ Y), + equiv Y (B.inc n ≫ a) = (B.homGlob Y).boundary n a + +namespace BoundaryEquiv +variable (B : GlobularFrame K) +noncomputable def zero : BoundaryEquiv B 0 where + equiv Y := + { toFun := fun _ => PUnit.unit + invFun := fun _ => B.initial.to Y + left_inv := fun _ => B.initial.hom_ext _ _ + right_inv := fun _ => by change (PUnit.unit : PUnit) = _; exact Subsingleton.elim _ _ } + naturality _ _ := rfl + inc_boundary _ := rfl + +variable {B} {n : ℕ} (R : BoundaryEquiv B n) + +def nextValue (Y : K) (f : B.bd (n+1) ⟶ Y) : (B.homGlob Y).Boundary (n+1) := + ⟨(B.left n ≫ f, B.right n ≫ f), by + rw [GlobularSet.parallel_iff_boundary_eq, ← R.inc_boundary, ← R.inc_boundary, + ← Category.assoc, ← Category.assoc, (B.square n).w]⟩ + +theorem nextValue_bijective (Y : K) : Function.Bijective (R.nextValue Y) := by + constructor + · intro f g h + apply (B.square n).hom_ext + · exact congrArg (fun b => b.1.1) h + · exact congrArg (fun b => b.1.2) h + · intro b + have hb : B.inc n ≫ b.1.1 = B.inc n ≫ b.1.2 := by + apply (R.equiv Y).injective + erw [R.inc_boundary, R.inc_boundary] + exact (GlobularSet.parallel_iff_boundary_eq _ _ _ _).1 b.2 + refine ⟨(B.square n).desc b.1.1 b.1.2 hb, ?_⟩ + apply Subtype.ext + exact Prod.ext ((B.square n).inl_desc _ _ _) ((B.square n).inr_desc _ _ _) + +noncomputable def succ : BoundaryEquiv B (n+1) where + equiv Y := Equiv.ofBijective (R.nextValue Y) (R.nextValue_bijective Y) + naturality a f := by + apply Subtype.ext + change (B.left n ≫ (a ≫ f), B.right n ≫ (a ≫ f)) = + ((B.left n ≫ a) ≫ f, (B.right n ≫ a) ≫ f) + exact Prod.ext (Category.assoc _ _ _).symm (Category.assoc _ _ _).symm + inc_boundary a := by + apply Subtype.ext + exact Prod.ext (Category.assoc _ _ _).symm (Category.assoc _ _ _).symm + +end BoundaryEquiv + +noncomputable def boundaryEquiv (B : GlobularFrame K) : (n : ℕ) → BoundaryEquiv B n + | 0 => BoundaryEquiv.zero B + | n+1 => (boundaryEquiv B n).succ + +structure Hom (D B : GlobularFrame K) where + obj : ∀ j, D.obj j ⟶ B.obj j + bd : ∀ j, D.bd j ⟶ B.bd j + inc : ∀ j, bd j ≫ B.inc j = D.inc j ≫ obj j + left : ∀ j, D.left j ≫ bd (j+1) = obj j ≫ B.left j + right : ∀ j, D.right j ≫ bd (j+1) = obj j ≫ B.right j + +namespace Hom +variable {D B : GlobularFrame K} +@[reassoc] theorem source_naturality (e : Hom D B) (j : ℕ) : + D.diagram.source j ≫ e.obj (j+1) = e.obj j ≫ B.diagram.source j := by + change (D.left j ≫ D.inc (j+1)) ≫ e.obj (j+1) = _ + rw [Category.assoc, ← e.inc, ← Category.assoc, e.left, Category.assoc] + rfl +@[reassoc] theorem target_naturality (e : Hom D B) (j : ℕ) : + D.diagram.target j ≫ e.obj (j+1) = e.obj j ≫ B.diagram.target j := by + change (D.right j ≫ D.inc (j+1)) ≫ e.obj (j+1) = _ + rw [Category.assoc, ← e.inc, ← Category.assoc, e.right, Category.assoc] + rfl + +def pre (e : Hom D B) (Y : K) : GlobularSet.Hom (B.homGlob Y) (D.homGlob Y) where + app j a := e.obj j ≫ a + source_app j a := by + change e.obj j ≫ B.diagram.source j ≫ a = D.diagram.source j ≫ e.obj (j+1) ≫ a + erw [← Category.assoc, ← e.source_naturality, Category.assoc] + rfl + target_app j a := by + change e.obj j ≫ B.diagram.target j ≫ a = D.diagram.target j ≫ e.obj (j+1) ≫ a + erw [← Category.assoc, ← e.target_naturality, Category.assoc] + rfl + +theorem boundary_naturality (e : Hom D B) {Y : K} (j : ℕ) (a : B.bd j ⟶ Y) : + (D.boundaryEquiv j).equiv Y (e.bd j ≫ a) = + (e.pre Y).boundaryMap j ((B.boundaryEquiv j).equiv Y a) := by + cases j with + | zero => rfl + | succ j => + apply Subtype.ext + change (D.left j ≫ (e.bd (j+1) ≫ a), D.right j ≫ (e.bd (j+1) ≫ a)) = + (e.obj j ≫ (B.left j ≫ a), e.obj j ≫ (B.right j ≫ a)) + simp only [← Category.assoc, e.left, e.right] + +end Hom +end GlobularFrame + +namespace GlobularSet + +def fiberProd {X Y Z : GlobularSet.{v}} (f : Hom X Z) (g : Hom Y Z) : GlobularSet.{v} where + Cell k := {xy : X.Cell k × Y.Cell k // f.app k xy.1 = g.app k xy.2} + source k xy := ⟨(X.source k xy.1.1, Y.source k xy.1.2), by + rw [f.source_app, g.source_app, xy.2]⟩ + target k xy := ⟨(X.target k xy.1.1, Y.target k xy.1.2), by + rw [f.target_app, g.target_app, xy.2]⟩ + source_source k xy := Subtype.ext (Prod.ext (X.source_source k _) (Y.source_source k _)) + target_source k xy := Subtype.ext (Prod.ext (X.target_source k _) (Y.target_source k _)) + +namespace fiberProd +variable {X Y Z : GlobularSet.{v}} (f : Hom X Z) (g : Hom Y Z) +def fst : Hom (fiberProd f g) X where + app _ xy := xy.1.1 + source_app _ _ := rfl + target_app _ _ := rfl +def snd : Hom (fiberProd f g) Y where + app _ xy := xy.1.2 + source_app _ _ := rfl + target_app _ _ := rfl + +variable {A : GlobularSet.{v}} +def lift (a : Hom A X) (b : Hom A Y) (h : a.comp f = b.comp g) : Hom A (fiberProd f g) where + app k x := ⟨(a.app k x, b.app k x), congrFun (congrArg (fun t => t.app k) h) x⟩ + source_app k x := Subtype.ext (Prod.ext (a.source_app k x) (b.source_app k x)) + target_app k x := Subtype.ext (Prod.ext (a.target_app k x) (b.target_app k x)) + +@[simp] theorem lift_fst (a : Hom A X) (b : Hom A Y) (h : a.comp f = b.comp g) : + (lift f g a b h).comp (fst f g) = a := rfl +@[simp] theorem lift_snd (a : Hom A X) (b : Hom A Y) (h : a.comp f = b.comp g) : + (lift f g a b h).comp (snd f g) = b := rfl + +end fiberProd +end GlobularSet + +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {D B : GlobularFrame K} + +noncomputable abbrev oneSided (e : Hom D B) (j : ℕ) : K := pushout (e.bd j) (D.inc j) +noncomputable def oneSidedMap (e : Hom D B) (j : ℕ) : oneSided e j ⟶ B.obj j := + pushout.desc (B.inc j) (e.obj j) (e.inc j) + +namespace Hom +variable (e : Hom D B) {X Y : K} (p : X ⟶ Y) + +def relativeGlob : GlobularSet.{v} := GlobularSet.fiberProd (e.pre Y) (post p) + +def relativeMap : GlobularSet.Hom (B.homGlob X) (e.relativeGlob p) := + GlobularSet.fiberProd.lift (e.pre Y) (post p) (post p) (e.pre X) (by + ext k a + exact (Category.assoc _ _ _).symm) + +theorem relativeMap_liftsBoundary (j : ℕ) (hp : HasLiftingProperty (oneSidedMap e j) p) : + GlobularSet.LiftsBoundary (e.relativeMap p) j := by + intro bd z hz + let a := (B.boundaryEquiv j).equiv X |>.symm bd + have ha : (B.boundaryEquiv j).equiv X a = bd := Equiv.apply_symm_apply _ _ + have hz₁ := congrArg ((GlobularSet.fiberProd.fst (e.pre Y) (post p)).boundaryMap j) hz + have hz₂ := congrArg ((GlobularSet.fiberProd.snd (e.pre Y) (post p)).boundaryMap j) hz + have hab : e.bd j ≫ a = D.inc j ≫ z.1.2 := by + apply ((D.boundaryEquiv j).equiv X).injective + erw [e.boundary_naturality, ha, (D.boundaryEquiv j).inc_boundary] + cases j with + | zero => rfl + | succ j => exact hz₂.symm + have hap : a ≫ p = B.inc j ≫ z.1.1 := by + apply ((B.boundaryEquiv j).equiv Y).injective + erw [(B.boundaryEquiv j).naturality, ha, (B.boundaryEquiv j).inc_boundary] + cases j with + | zero => rfl + | succ j => exact hz₁.symm + let top : oneSided e j ⟶ X := pushout.desc a z.1.2 hab + have sq : CommSq top (oneSidedMap e j) p z.1.1 := by + constructor + apply pushout.hom_ext + · dsimp only [top, oneSidedMap] + erw [pushout.inl_desc_assoc, pushout.inl_desc_assoc] + exact hap + · dsimp only [top, oneSidedMap] + erw [pushout.inr_desc_assoc, pushout.inr_desc_assoc] + exact z.2.symm + let : sq.HasLift := hp.sq_hasLift sq + let l := sq.lift + refine ⟨l, ?_, ?_⟩ + · have hh : B.inc j ≫ l = a := by + have h := congrArg (pushout.inl (e.bd j) (D.inc j) ≫ ·) sq.fac_left + dsimp only [oneSidedMap, top] at h + erw [pushout.inl_desc, pushout.inl_desc_assoc] at h + exact h + rw [← (B.boundaryEquiv j).inc_boundary, hh, ha] + · apply Subtype.ext + apply Prod.ext + · exact sq.fac_right + · have h := congrArg (pushout.inr (e.bd j) (D.inc j) ≫ ·) sq.fac_left + dsimp only [oneSidedMap, top] at h + erw [pushout.inr_desc, pushout.inr_desc_assoc] at h + exact h + +end Hom +end GlobularFrame + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderGluing.lean b/lean/OAI/CategoryTheory/Globular/CylinderGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..c146e9596a066bc4c010ec4e5e6684ee310b6f2b --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderGluing.lean @@ -0,0 +1,150 @@ +import OAI.CategoryTheory.Globular.CylinderLifting + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] {D B : GlobularFrame K} + +structure CriticalData (e : Hom D B) (n : ℕ) (ε : Bool) where + low : ∀ j, j < n → IsIso (e.obj j) + iso : B.obj n ≅ D.obj (n+1) + endpoint : e.obj n ≫ iso.hom = if ε then D.diagram.target n else D.diagram.source n + +namespace CriticalData +variable {e : Hom D B} {n : ℕ} {ε : Bool} (c : CriticalData e n ε) +variable {S : GlobularSet.{v}} {Y : K} + +noncomputable def stageOfFac (f : GlobularSet.Hom S (D.homGlob Y)) + (a : ∀ j, j ≤ n → S.Cell j → (B.obj j ⟶ Y)) + (ha : ∀ j hj x, e.obj j ≫ a j hj x = f.app j x) : + GlobularSet.LiftStage (e.pre Y) f n where + app := a + fac := ha + source_app j hj x := by + let : IsIso (e.obj j) := c.low j (by omega) + apply (cancel_epi (e.obj j)).1 + change e.obj j ≫ a j _ (S.source j x) = e.obj j ≫ B.diagram.source j ≫ a (j+1) hj x + erw [ha, ← Category.assoc, ← e.source_naturality, Category.assoc, ha] + exact f.source_app j x + target_app j hj x := by + let : IsIso (e.obj j) := c.low j (by omega) + apply (cancel_epi (e.obj j)).1 + change e.obj j ≫ a j _ (S.target j x) = e.obj j ≫ B.diagram.target j ≫ a (j+1) hj x + erw [ha, ← Category.assoc, ← e.target_naturality, Category.assoc, ha] + exact f.target_app j x + +noncomputable def initialCell + (a : GlobularSet.Hom (S.whisker n ε) (D.homGlob Y)) + (j : ℕ) (hj : j ≤ n) (x : S.Cell j) : B.obj j ⟶ Y := by + by_cases h : j < n + · let : IsIso (e.obj j) := c.low j h + exact inv (e.obj j) ≫ a.app j (.base j x) + · have h' : j = n := by omega + subst j + exact c.iso.hom ≫ a.app (n+1) (.edge x) + +theorem initialCell_low (a : GlobularSet.Hom (S.whisker n ε) (D.homGlob Y)) + (j : ℕ) (hj : j < n) (x : S.Cell j) : + e.obj j ≫ c.initialCell a j (by omega) x = a.app j (.base j x) := by + let : IsIso (e.obj j) := c.low j hj + simp only [initialCell, dite_eq_left hj] + erw [IsIso.hom_inv_id_assoc] + +theorem initialCell_top (a : GlobularSet.Hom (S.whisker n ε) (D.homGlob Y)) + (x : S.Cell n) : c.initialCell a n le_rfl x = c.iso.hom ≫ a.app (n+1) (.edge x) := by + simp only [initialCell, dite_eq_right (Nat.lt_irrefl n)] + +theorem initialCell_fac (a : GlobularSet.Hom (S.whisker n ε) (D.homGlob Y)) + (j : ℕ) (hj : j ≤ n) (x : S.Cell j) : + e.obj j ≫ c.initialCell a j hj x = a.app j (.base j x) := by + by_cases h : j < n + · exact c.initialCell_low a j h x + · have hj' : j = n := by omega + subst j + erw [c.initialCell_top, ← Category.assoc, c.endpoint] + cases ε with + | false => exact (a.source_app n (.edge x)).symm + | true => exact (a.target_app n (.edge x)).symm + +noncomputable def initialStage (a : GlobularSet.Hom (S.whisker n ε) (D.homGlob Y)) : + GlobularSet.LiftStage (e.pre Y) ((S.whiskerInclusion n ε).comp a) n := + c.stageOfFac _ (c.initialCell a) (c.initialCell_fac a) + +end CriticalData + +structure RelativeStage (e : Hom D B) {X Y : K} (p : X ⟶ Y) + {S : GlobularSet.{v}} (f : GlobularSet.Hom S (D.homGlob X)) {m : ℕ} + (b : GlobularSet.LiftStage (e.pre Y) (f.comp (post p)) m) (k : ℕ) (hk : k ≤ m) where + stage : GlobularSet.LiftStage (e.pre X) f k + fac_right : ∀ j (hj : j ≤ k) x, stage.app j hj x ≫ p = b.app j (hj.trans hk) x + +namespace RelativeStage +variable [HasPushouts K] {e : Hom D B} {X Y : K} {p : X ⟶ Y} +variable {S : GlobularSet.{v}} {f : GlobularSet.Hom S (D.homGlob X)} {m k : ℕ} +variable {b : GlobularSet.LiftStage (e.pre Y) (f.comp (post p)) m} {hk : k ≤ m} + +noncomputable def succ (a : RelativeStage e p f b k hk) (hk' : k+1 ≤ m) + (hp : HasLiftingProperty (oneSidedMap e (k+1)) p) : RelativeStage e p f b (k+1) hk' := by + let g := e.relativeMap p + have H := e.relativeMap_liftsBoundary p (k+1) hp + let z (x : S.Cell (k+1)) : (e.relativeGlob p).Cell (k+1) := + ⟨(b.app (k+1) hk' x, f.app (k+1) x), b.fac (k+1) hk' x⟩ + have hz (x : S.Cell (k+1)) : + g.boundaryMap (k+1) (a.stage.nextBoundary x) = (e.relativeGlob p).boundary (k+1) (z x) := by + apply Subtype.ext + apply Prod.ext + · apply Subtype.ext + apply Prod.ext + · exact (a.fac_right k le_rfl (S.source k x)).trans (b.source_app k hk' x) + · exact (a.stage.fac k le_rfl (S.source k x)).trans (f.source_app k x) + · apply Subtype.ext + apply Prod.ext + · exact (a.fac_right k le_rfl (S.target k x)).trans (b.target_app k hk' x) + · exact (a.stage.fac k le_rfl (S.target k x)).trans (f.target_app k x) + choose l hlb hlg using fun x => H (a.stage.nextBoundary x) (z x) (hz x).symm + let s := a.stage.extendTop l + (fun x => congrArg (fun t => t.1.1) (hlb x)) + (fun x => congrArg (fun t => t.1.2) (hlb x)) + (fun x => congrArg (fun t => t.1.2) (hlg x)) + refine ⟨s, ?_⟩ + intro j hj x + by_cases h : j ≤ k + · simpa only [s, GlobularSet.LiftStage.extendTop, dite_eq_left h] using a.fac_right j h x + · have hj' : j = k+1 := by omega + subst j + have hx : l x ≫ p = b.app (k+1) hk' x := congrArg (fun t => t.1.1) (hlg x) + simpa only [s, GlobularSet.LiftStage.extendTop, dite_eq_right (by omega : ¬ k+1 ≤ k)] using hx + +theorem succ_old (a : RelativeStage e p f b k hk) (hk' : k+1 ≤ m) + (hp : HasLiftingProperty (oneSidedMap e (k+1)) p) (j : ℕ) (hj : j ≤ k) (x : S.Cell j) : + (a.succ hk' hp).stage.app j (by omega) x = a.stage.app j hj x := by + simp only [succ, GlobularSet.LiftStage.extendTop, dite_eq_left hj] + +noncomputable def extendBy (a : RelativeStage e p f b k hk) : + (d : ℕ) → (hd : k+d ≤ m) → + (∀ j, k < j → j ≤ k+d → HasLiftingProperty (oneSidedMap e j) p) → + RelativeStage e p f b (k+d) hd + | 0, _, _ => a + | d+1, hd, hp => (a.extendBy d (by omega) (fun j hj hj' => hp j hj (by omega))).succ hd + (hp (k+d+1) (by omega) le_rfl) + +theorem extendBy_old (a : RelativeStage e p f b k hk) (d : ℕ) (hd : k+d ≤ m) + (hp : ∀ j, k < j → j ≤ k+d → HasLiftingProperty (oneSidedMap e j) p) + (j : ℕ) (hj : j ≤ k) (x : S.Cell j) : + (a.extendBy d hd hp).stage.app j (by omega) x = a.stage.app j hj x := by + induction d with + | zero => rfl + | succ d ih => + rw [extendBy, succ_old _ _ _ j (hj.trans (Nat.le_add_right k d))] + exact ih _ _ + +end RelativeStage + +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderInterpretation.lean b/lean/OAI/CategoryTheory/Globular/CylinderInterpretation.lean new file mode 100644 index 0000000000000000000000000000000000000000..983a617795e46cc626b4341f6b7fc67838711d95 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderInterpretation.lean @@ -0,0 +1,179 @@ +import OAI.CategoryTheory.Globular.FrameOperations + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsInterpretation : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cylinderPair_parallel (a : (cylinderTheory hC q n).AdmissiblePair) : + (cylinderFrame hC q n).inc a.n ≫ ((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.source.cylinder = + (cylinderFrame hC q n).inc a.n ≫ ((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.target.cylinder := by + rcases a with ⟨j,S,hS,s,t,hp⟩ + cases j with + | zero => exact (cylinderFrame hC q n).initial.hom_ext _ _ + | succ j => + apply ((cylinderFrame hC q n).square j).hom_ext + · change (((cylinderFrame hC q n).left j ≫ (cylinderFrame hC q n).inc (j+1))) ≫ _ ≫ s.cylinder = + (((cylinderFrame hC q n).left j ≫ (cylinderFrame hC q n).inc (j+1))) ≫ _ ≫ t.cylinder + change (cylinderFrame hC q n).diagram.source j ≫ _ ≫ s.cylinder = + (cylinderFrame hC q n).diagram.source j ≫ _ ≫ t.cylinder + have hh (f : (cylinderTheory hC q n).Hom (Shape.globe (j+1)) S) : + (cylinderFrame hC q n).diagram.source j ≫ + ((cylinderFrame hC q n).shapeGlobeIso (j+1)).inv ≫ f.cylinder = + ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ + (cylinderFrame hC q n).shapeRealization.map (Shape.source j) ≫ f.cylinder := + (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ f.cylinder) ((cylinderFrame hC q n).shapeGlobeIso_source_inv j)).trans + (Category.assoc _ _ _)) + exact (hh s).trans ((congrArg (((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ ·) + (congrArg RepresentedHom.cylinder hp.1)).trans (hh t).symm) + · change (((cylinderFrame hC q n).right j ≫ (cylinderFrame hC q n).inc (j+1))) ≫ _ ≫ s.cylinder = + (((cylinderFrame hC q n).right j ≫ (cylinderFrame hC q n).inc (j+1))) ≫ _ ≫ t.cylinder + change (cylinderFrame hC q n).diagram.target j ≫ _ ≫ s.cylinder = + (cylinderFrame hC q n).diagram.target j ≫ _ ≫ t.cylinder + have hh (f : (cylinderTheory hC q n).Hom (Shape.globe (j+1)) S) : + (cylinderFrame hC q n).diagram.target j ≫ + ((cylinderFrame hC q n).shapeGlobeIso (j+1)).inv ≫ f.cylinder = + ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ + (cylinderFrame hC q n).shapeRealization.map (Shape.target j) ≫ f.cylinder := + (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ f.cylinder) ((cylinderFrame hC q n).shapeGlobeIso_target_inv j)).trans + (Category.assoc _ _ _)) + exact (hh s).trans ((congrArg (((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ ·) + (congrArg RepresentedHom.cylinder hp.2)).trans (hh t).symm) + +noncomputable def cylinderPairBoundary (a : (cylinderTheory hC q n).AdmissiblePair) : + (cylinderFrame hC q n).bd (a.n+1) ⟶ (cylinderFrame hC q n).shapeRealization.obj a.arity := + ((cylinderFrame hC q n).square a.n).desc + (((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.source.cylinder) + (((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.target.cylinder) + (cylinderPair_parallel hC q n a) + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +@[reassoc] theorem cylinderPairBoundary_left (a : (cylinderTheory hC q n).AdmissiblePair) : + (cylinderFrame hC q n).left a.n ≫ cylinderPairBoundary hC q n a = + ((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.source.cylinder := + ((cylinderFrame hC q n).square a.n).inl_desc _ _ _ +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +@[reassoc] theorem cylinderPairBoundary_right (a : (cylinderTheory hC q n).AdmissiblePair) : + (cylinderFrame hC q n).right a.n ≫ cylinderPairBoundary hC q n a = + ((cylinderFrame hC q n).shapeGlobeIso a.n).inv ≫ a.target.cylinder := + ((cylinderFrame hC q n).square a.n).inr_desc _ _ _ + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cylinderPairBoundary_endpoint (a : (cylinderTheory hC q n).AdmissiblePair) + (z : C.Hom (Shape.globe (a.n+1)) a.arity) (hz : Fills (cylinderProjection hC q n) a z) (ε : Bool) : + (cylinderEndpoint hC q n ε).bd (a.n+1) ≫ cylinderPairBoundary hC q n a = + (cutoffDiskFrame hC q).inc (a.n+1) ≫ (cutoffRepresentables hC q).map z ≫ + (cylinderShapeEndpoint hC q n ε).app a.arity := by + let D := cutoffDiskFrame hC q + let B := cylinderFrame hC q n + let F := cutoffRepresentables hC q + let e := cylinderEndpoint hC q n ε + let E := cylinderShapeEndpoint hC q n ε + have hs : E.app (Shape.globe a.n) ≫ a.source.cylinder = F.map (show C.toTheoryData.arity.obj (Shape.globe a.n) ⟶ C.toTheoryData.arity.obj a.arity from a.source.original) ≫ E.app a.arity := by + cases ε + · exact a.source.endpoint₀ + · exact a.source.endpoint₁ + have ht : E.app (Shape.globe a.n) ≫ a.target.cylinder = F.map (show C.toTheoryData.arity.obj (Shape.globe a.n) ⟶ C.toTheoryData.arity.obj a.arity from a.target.original) ≫ E.app a.arity := by + cases ε + · exact a.target.endpoint₀ + · exact a.target.endpoint₁ + apply (D.square a.n).hom_ext + · change D.left a.n ≫ e.bd (a.n+1) ≫ cylinderPairBoundary hC q n a = + D.left a.n ≫ D.inc (a.n+1) ≫ F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ E.app a.arity + erw [← Category.assoc, e.left, Category.assoc, cylinderPairBoundary_left] + erw [← Category.assoc, cylinderShapeEndpoint_globe_inv hC q n ε a.n] + change E.app (Shape.globe a.n) ≫ a.source.cylinder = + D.diagram.source a.n ≫ F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ E.app a.arity + rw [hs] + have hh : C.comp (C.base (Shape.source a.n)) z = a.source.original := hz.1 + have hz' := congrArg (fun f : C.toTheoryData.arity.obj (Shape.globe a.n) ⟶ C.toTheoryData.arity.obj a.arity => F.map f) hh + erw [F.map_comp, cutoffRepresentables_source] at hz' + exact congrArg (· ≫ E.app a.arity) hz'.symm + · change D.right a.n ≫ e.bd (a.n+1) ≫ cylinderPairBoundary hC q n a = + D.right a.n ≫ D.inc (a.n+1) ≫ F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ E.app a.arity + erw [← Category.assoc, e.right, Category.assoc, cylinderPairBoundary_right] + erw [← Category.assoc, cylinderShapeEndpoint_globe_inv hC q n ε a.n] + change E.app (Shape.globe a.n) ≫ a.target.cylinder = + D.diagram.target a.n ≫ F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ E.app a.arity + rw [ht] + have hh : C.comp (C.base (Shape.target a.n)) z = a.target.original := hz.2 + have hz' := congrArg (fun f : C.toTheoryData.arity.obj (Shape.globe a.n) ⟶ C.toTheoryData.arity.obj a.arity => F.map f) hh + erw [F.map_comp, cutoffRepresentables_target] at hz' + exact congrArg (· ≫ E.app a.arity) hz'.symm + +theorem cylinderProjection_liftsFillers (hnq : n ≤ q) + (H : ExpansionContraction hC q (n+1)) : LiftsFillers (cylinderProjection hC q n) := by + intro a z hz + let B := cylinderFrame hC q n + let F := cutoffRepresentables hC q + let Y := B.shapeRealization.obj a.arity + let d (ε : Bool) : cutoffDisk hC q (a.n+1) ⟶ Y := + F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ (cylinderShapeEndpoint hC q n ε).app a.arity + have hd (ε : Bool) : (cylinderNode hC q n (a.n+1)).bdEnd ε ≫ + cylinderPairBoundary hC q n a = cutoffI hC q (a.n+1) ≫ d ε := + cylinderPairBoundary_endpoint hC q n a z hz ε + have hlow (h : a.n+1 < n) : d false = d true := by + have hh : a.arity.height < n := Nat.lt_of_le_of_lt a.height h + have heq := cylinderShapeEndpoint_low hC q n a.arity hh + exact congrArg (fun f : F.obj (C.toTheoryData.arity.obj a.arity) ⟶ Y => F.map (show C.toTheoryData.arity.obj (Shape.globe (a.n+1)) ⟶ C.toTheoryData.arity.obj a.arity from z) ≫ f) heq + have hY : Y.obj.underlying.HasFillers := + (cylinderShape_contractible hC q n hnq H a.arity).2 + obtain ⟨l,hl,he⟩ := cylinderNode_extend hC q n (a.n+1) hY + (cylinderPairBoundary hC q n a) d hd hlow + let w : (cylinderTheory hC q n).Hom (Shape.globe (a.n+1)) a.arity := + { original := z + cylinder := (B.shapeGlobeIso (a.n+1)).hom ≫ l + endpoint₀ := by + erw [← Category.assoc, cylinderShapeEndpoint_globe hC q n false (a.n+1)] + exact he false + endpoint₁ := by + erw [← Category.assoc, cylinderShapeEndpoint_globe hC q n true (a.n+1)] + exact he true } + refine ⟨w, ⟨?_, ?_⟩, rfl⟩ + · apply RepresentedHom.ext hz.1 + change B.shapeRealization.map (Shape.source a.n) ≫ (B.shapeGlobeIso (a.n+1)).hom ≫ l = + a.source.cylinder + erw [← Category.assoc, GlobularFrame.shapeGlobeIso_source, Category.assoc] + change (B.shapeGlobeIso a.n).hom ≫ (B.left a.n ≫ B.inc (a.n+1)) ≫ l = _ + have hh : (B.left a.n ≫ B.inc (a.n+1)) ≫ l = + (B.shapeGlobeIso a.n).inv ≫ a.source.cylinder := + (Category.assoc _ _ _).trans ((congrArg (B.left a.n ≫ ·) hl).trans + (cylinderPairBoundary_left hC q n a)) + exact (congrArg ((B.shapeGlobeIso a.n).hom ≫ ·) hh).trans + ((B.shapeGlobeIso a.n).hom_inv_id_assoc _) + · apply RepresentedHom.ext hz.2 + change B.shapeRealization.map (Shape.target a.n) ≫ (B.shapeGlobeIso (a.n+1)).hom ≫ l = + a.target.cylinder + erw [← Category.assoc, GlobularFrame.shapeGlobeIso_target, Category.assoc] + change (B.shapeGlobeIso a.n).hom ≫ (B.right a.n ≫ B.inc (a.n+1)) ≫ l = _ + have hh : (B.right a.n ≫ B.inc (a.n+1)) ≫ l = + (B.shapeGlobeIso a.n).inv ≫ a.target.cylinder := + (Category.assoc _ _ _).trans ((congrArg (B.right a.n ≫ ·) hl).trans + (cylinderPairBoundary_right hC q n a)) + exact (congrArg ((B.shapeGlobeIso a.n).hom ≫ ·) hh).trans + ((B.shapeGlobeIso a.n).hom_inv_id_assoc _) + +noncomputable def cylinderInterpretation (hnq : n ≤ q) + (H : ExpansionContraction hC q (n+1)) : Morphism C (cylinderTheory hC q n) := + Classical.choose (hC.1.some.lift (cylinderProjection hC q n) + (cylinderProjection_liftsFillers hC q n hnq H) (Morphism.id C)) + +theorem cylinderInterpretation_projection (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) : + (cylinderInterpretation hC q n hnq H).comp (cylinderProjection hC q n) = Morphism.id C := + Classical.choose_spec (hC.1.some.lift (cylinderProjection hC q n) + (cylinderProjection_liftsFillers hC q n hnq H) (Morphism.id C)) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderJointUpper.lean b/lean/OAI/CategoryTheory/Globular/CylinderJointUpper.lean new file mode 100644 index 0000000000000000000000000000000000000000..08f0e46229ed035444c7aeedbc405755ef73495b --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderJointUpper.lean @@ -0,0 +1,106 @@ +import OAI.CategoryTheory.Globular.FrameJoint + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace CylinderNode +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {D : GlobularFrame K} {j : ℕ} +noncomputable def twoSideMap (Z : CylinderNode D j) : + TwoEndpoints.obj (D.inc j) Z.bdEnd ⟶ Z.obj := + TwoEndpoints.desc (D.inc j) Z.bdEnd Z.inc Z.endpoint Z.comm + +theorem critical_twoSide_lifting (D : GlobularFrame K) (n : ℕ) + {X Y : K} (p : X ⟶ Y) (h : HasLiftingProperty (D.inc (n+1)) p) : + HasLiftingProperty ((critical D n).twoSideMap) p := by + constructor + intro a y sq + let e : Bool → (D.bd n ⟶ D.bd n) := fun _ => 𝟙 _ + let ds (ε) := TwoEndpoints.endpoint (D.inc n) e ε ≫ a + have hd : D.inc n ≫ ds false = D.inc n ≫ ds true := by + have hx (ε) : D.inc n ≫ ds ε = TwoEndpoints.base (D.inc n) e ≫ a := by + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ a) ((TwoEndpoints.condition (D.inc n) e ε).symm.trans + (Category.id_comp _)))) + exact (hx false).trans (hx true).symm + let b := (D.square n).desc (ds false) (ds true) hd + have hdp (ε) : ds ε ≫ p = (if ε then D.diagram.target n else D.diagram.source n) ≫ y := by + have hh := congrArg (TwoEndpoints.endpoint (D.inc n) e ε ≫ ·) sq.w + erw [← Category.assoc _ ((critical D n).twoSideMap), TwoEndpoints.endpoint_desc] at hh + exact (Category.assoc _ _ _).trans hh + have sq' : CommSq b (D.inc (n+1)) p y := by + constructor + apply (D.square n).hom_ext + · erw [← Category.assoc, IsPushout.inl_desc] + exact (hdp false).trans (Category.assoc _ _ _) + · erw [← Category.assoc, IsPushout.inr_desc] + exact (hdp true).trans (Category.assoc _ _ _) + let : sq'.HasLift := h.sq_hasLift sq' + have hs : D.diagram.source n ≫ sq'.lift = ds false := by + change (D.left n ≫ D.inc (n+1)) ≫ sq'.lift = _ + rw [Category.assoc, sq'.fac_left] + exact (D.square n).inl_desc _ _ _ + have ht : D.diagram.target n ≫ sq'.lift = ds true := by + change (D.right n ≫ D.inc (n+1)) ≫ sq'.lift = _ + rw [Category.assoc, sq'.fac_left] + exact (D.square n).inr_desc _ _ _ + refine CommSq.HasLift.mk' ⟨sq'.lift, ?_, sq'.fac_right⟩ + apply TwoEndpoints.hom_ext + · erw [← Category.assoc, TwoEndpoints.base_desc] + change (D.inc n ≫ D.diagram.source n) ≫ sq'.lift = _ + erw [Category.assoc, hs] + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ a) ((TwoEndpoints.condition (D.inc n) e false).symm.trans + (Category.id_comp _)))) + · intro ε + erw [← Category.assoc, TwoEndpoints.endpoint_desc] + cases ε + · exact hs + · exact ht +end CylinderNode +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] + +theorem completedCylinder_twoSide_upper (j : ℕ) (B : CutoffModels C q) + (e : Bool → (cutoffBoundary hC q j ⟶ B)) : + (boundaryClass hC q (n+1)).rlp.llp ((completedCylinder hC q n j B e).twoSideMap) := by + let F := cylinderFactor hC q n j B e + have he : (completedCylinder hC q n j B e).twoSideMap = F.i := by + apply TwoEndpoints.hom_ext + · exact TwoEndpoints.base_desc _ _ _ _ _ + · intro ε + exact TwoEndpoints.endpoint_desc _ _ _ _ _ ε + rw [he] + exact F.hi + +theorem cylinderFrame_twoEnded_upper {j : ℕ} (hj : n ≤ j) : + (boundaryClass hC q (n+1)).rlp.llp + (GlobularFrame.twoEndedMap (cylinderEndpoint hC q n) j) := by + change (boundaryClass hC q (n+1)).rlp.llp ((cylinderNode hC q n j).twoSideMap) + by_cases he : j = n + · subst j + rw [cylinderNode_critical] + intro X Y p hp + exact CylinderNode.critical_twoSide_lifting (cutoffDiskFrame hC q) n p + (hp _ (MorphismProperty.ofHoms.mk (⟨n+1,le_rfl⟩ : {j : ℕ // n+1 ≤ j}))) + · cases j with + | zero => omega + | succ j => + rw [cylinderNode_high hC q n (by omega)] + exact completedCylinder_twoSide_upper hC q n _ _ _ + +theorem cylinderFrame_jointSource_upper (k : ℕ) (hk : n ≤ k) : + (boundaryClass hC q (n+1)).rlp.llp + (GlobularFrame.jointSourceMap (cylinderEndpoint hC q n) k) := by + intro X Y p hp + exact GlobularFrame.jointSource_lifting (cylinderEndpoint hC q n) p k + (cylinderFrame_twoEnded_upper hC q n hk p hp) + (cylinderFrame_twoEnded_upper hC q n (by omega) p hp) +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderLifting.lean b/lean/OAI/CategoryTheory/Globular/CylinderLifting.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6feae9d98e9660e2ad6219e2906a0cd255528c0 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderLifting.lean @@ -0,0 +1,98 @@ +import OAI.CategoryTheory.Globular.WhiskerUniverse + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace CylinderNode +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {D : GlobularFrame K} {j : ℕ} +noncomputable def oneSideMap (Z : CylinderNode D j) (ε : Bool) : + pushout (Z.bdEnd ε) (D.inc j) ⟶ Z.obj := pushout.desc Z.inc (Z.endpoint ε) (Z.comm ε) +end CylinderNode +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem completedCylinder_upper (j : ℕ) (hj : n < j) + (B : CutoffModels C q) (e : Bool → (cutoffBoundary hC q j ⟶ B)) (ε : Bool) : + (boundaryClass hC q (n+1)).rlp.llp + ((completedCylinder hC q n j B e).oneSideMap ε) := by + let := cutoff_hasColimits hC q + intro X Y p hp + exact TwoEndpoints.oneSide_lifting (cutoffI hC q j) e + (cylinderFactor hC q n j B e).i p + (hp _ (MorphismProperty.ofHoms.mk (⟨j,by omega⟩ : {j : ℕ // n+1 ≤ j}))) + ((cylinderFactor hC q n j B e).hi p hp) ε + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cylinderNode_upper {j : ℕ} (hj : n < j) (ε : Bool) : + (boundaryClass hC q (n+1)).rlp.llp ((cylinderNode hC q n j).oneSideMap ε) := by + cases j with + | zero => omega + | succ j => + rw [cylinderNode_high hC q n (by omega)] + exact completedCylinder_upper hC q n (j+1) hj _ _ ε + +omit [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem cylinderFrame_upper {j : ℕ} (hj : n < j) (ε : Bool) : + (boundaryClass hC q (n+1)).rlp.llp + (GlobularFrame.oneSidedMap (cylinderEndpoint hC q n ε) j) := + cylinderNode_upper hC q n hj ε + +theorem cylinderNode_upper_fillers {j : ℕ} (hj : n < j) : + (boundaryClass hC q (n+1)).rlp (terminal.from (cylinderNode hC q n j).obj) := by + let := cutoff_hasLimits hC q + cases j with + | zero => omega + | succ j => + rw [cylinderNode_high hC q n (by omega)] + let F := cylinderFactor hC q n (j+1) + (cylinderNode hC q n j).nextBoundary (cylinderNode hC q n j).nextBdEnd + have e : terminal.from F.Z = F.p := terminal.hom_ext _ _ + exact e ▸ F.hp + +end GlobularTheory.Model +namespace GlobularSet.LiftStage +variable {A : GlobularSet.{u}} {X Y : GlobularSet.{u}} {p : Hom X Y} {f : Hom A Y} + +noncomputable def extendOne {n : ℕ} (a : LiftStage p f n) (hp : LiftsBoundary p (n+1)) : + LiftStage p f (n+1) := by + have h x : ∃ z, X.boundary (n+1) z = a.nextBoundary x ∧ + p.app (n+1) z = f.app (n+1) x := by + apply hp + apply Subtype.ext + exact Prod.ext ((f.source_app n x).symm.trans (a.fac n le_rfl _).symm) + ((f.target_app n x).symm.trans (a.fac n le_rfl _).symm) + choose z hz hf using h + exact a.extendTop z (fun x => congrArg (fun b => b.1.1) (hz x)) + (fun x => congrArg (fun b => b.1.2) (hz x)) hf + +@[simp] theorem extendOne_old {n : ℕ} (a : LiftStage p f n) (hp : LiftsBoundary p (n+1)) + (k : ℕ) (hk : k ≤ n) (x : A.Cell k) : + (a.extendOne hp).app k (by omega) x = a.app k hk x := by + simp only [extendOne, extendTop, dite_eq_left hk] + +noncomputable def extendBy {n : ℕ} (a : LiftStage p f n) : + (d : ℕ) → (∀ j, n < j → j ≤ n+d → LiftsBoundary p j) → LiftStage p f (n+d) + | 0, _ => a + | d+1, h => (extendBy a d (fun j hj hj' => h j hj (by omega))).extendOne + (h (n+d+1) (by omega) le_rfl) + +theorem extendBy_old {n : ℕ} (a : LiftStage p f n) (d : ℕ) + (h : ∀ j, n < j → j ≤ n+d → LiftsBoundary p j) + (k : ℕ) (hk : k ≤ n) (x : A.Cell k) : + (a.extendBy d h).app k (by omega) x = a.app k hk x := by + induction d with + | zero => rfl + | succ d ih => + rw [extendBy, extendOne_old _ _ k (by omega)] + exact ih _ + +end GlobularSet.LiftStage +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderObjects.lean b/lean/OAI/CategoryTheory/Globular/CylinderObjects.lean new file mode 100644 index 0000000000000000000000000000000000000000..9c0846c7c1558165f7cc6fc15ff41b41f30dee61 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderObjects.lean @@ -0,0 +1,330 @@ +import OAI.CategoryTheory.Globular.CylinderFramework + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] {L : Type w} [Category.{v} L] + +noncomputable def map (D : GlobularFrame K) (F : K ⥤ L) [PreservesColimitsOfShape WalkingSpan F] + [PreservesColimitsOfShape (Discrete PEmpty) F] : GlobularFrame L where + obj j := F.obj (D.obj j) + bd j := F.obj (D.bd j) + inc j := F.map (D.inc j) + left j := F.map (D.left j) + right j := F.map (D.right j) + square j := (D.square j).map F + initial := D.initial.isInitialObj F _ + +end GlobularFrame + +namespace GlobularTheory.Model + +noncomputable def diskFrame (C : GlobularTheory.{v}) : GlobularFrame C.Model where + obj := disk C + bd := boundaryDisk C + inc := I C + left j := pushout.inl (I C j) (I C j) + right j := pushout.inr (I C j) (I C j) + square _j := IsPushout.of_hasPushout _ _ + initial := initialIsInitial + +@[simp] theorem diskFrame_source (C : GlobularTheory.{v}) (j : ℕ) : + (diskFrame C).diagram.source j = J C j := by + change pushout.inl _ _ ≫ pushout.desc _ _ _ = _ + exact pushout.inl_desc _ _ _ + +@[simp] theorem diskFrame_target (C : GlobularTheory.{v}) (j : ℕ) : + (diskFrame C).diagram.target j = targetDisk C j := by + change pushout.inr _ _ ≫ pushout.desc _ _ _ = _ + exact pushout.inr_desc _ _ _ + +noncomputable def cutoffDiskFrame {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) : + GlobularFrame (CutoffModels C q) := by + let : (cutoffFunctor hC q).IsLeftAdjoint := (cutoffAdjunction hC q).isLeftAdjoint + exact (diskFrame C).map (cutoffFunctor hC q) + +@[simp] theorem cutoffDiskFrame_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q j : ℕ) : (cutoffDiskFrame hC q).diagram.source j = cutoffJ hC q j := by + change (cutoffFunctor hC q).map _ ≫ (cutoffFunctor hC q).map _ = _ + rw [← Functor.map_comp] + exact congrArg (cutoffFunctor hC q).map (diskFrame_source C j) + +end GlobularTheory.Model + +structure CylinderNode {K : Type u} [Category.{v} K] (D : GlobularFrame K) (j : ℕ) where + bd : K + obj : K + inc : bd ⟶ obj + bdEnd : Bool → (D.bd j ⟶ bd) + endpoint : Bool → (D.obj j ⟶ obj) + comm : ∀ ε, bdEnd ε ≫ inc = D.inc j ≫ endpoint ε + +namespace CylinderNode +variable {K : Type u} [Category.{v} K] {D : GlobularFrame K} {j : ℕ} + +noncomputable def critical (D : GlobularFrame K) (n : ℕ) : CylinderNode D n where + bd := D.bd n + obj := D.obj (n+1) + inc := D.inc n ≫ D.diagram.source n + bdEnd _ := 𝟙 _ + endpoint ε := if ε then D.diagram.target n else D.diagram.source n + comm ε := by + cases ε + · simp + · simp only [↓reduceIte, Category.id_comp] + change D.inc n ≫ D.left n ≫ D.inc (n+1) = D.inc n ≫ D.right n ≫ D.inc (n+1) + rw [← Category.assoc, (D.square n).w, Category.assoc] + +variable [HasPushouts K] + +noncomputable abbrev nextBoundary (Z : CylinderNode D j) : K := pushout Z.inc Z.inc + +noncomputable def nextBdEnd (Z : CylinderNode D j) (ε : Bool) : + D.bd (j+1) ⟶ Z.nextBoundary := + (D.square j).desc (Z.endpoint ε ≫ pushout.inl _ _) (Z.endpoint ε ≫ pushout.inr _ _) + (by rw [← Category.assoc, ← Z.comm, Category.assoc, pushout.condition, + ← Category.assoc, Z.comm, Category.assoc]) + +@[reassoc (attr := simp)] theorem nextBdEnd_left (Z : CylinderNode D j) (ε : Bool) : + D.left j ≫ Z.nextBdEnd ε = Z.endpoint ε ≫ pushout.inl _ _ := + (D.square j).inl_desc _ _ _ + +@[reassoc (attr := simp)] theorem nextBdEnd_right (Z : CylinderNode D j) (ε : Bool) : + D.right j ≫ Z.nextBdEnd ε = Z.endpoint ε ≫ pushout.inr _ _ := + (D.square j).inr_desc _ _ _ + +end CylinderNode + +namespace TwoEndpoints +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {Bd Disk B : K} (i : Bd ⟶ Disk) (e : Bool → (Bd ⟶ B)) + +noncomputable abbrev first : K := pushout (e false) i +noncomputable abbrev obj : K := pushout (e true ≫ pushout.inl (e false) i) i +noncomputable def base : B ⟶ obj i e := pushout.inl _ _ ≫ pushout.inl _ _ +noncomputable def endpoint (ε : Bool) : Disk ⟶ obj i e := + if ε then pushout.inr _ _ else pushout.inr _ _ ≫ pushout.inl _ _ + +theorem condition (ε : Bool) : e ε ≫ base i e = i ≫ endpoint i e ε := by + cases ε + · simp only [base, endpoint, Bool.false_eq_true, ↓reduceIte, ← Category.assoc] + rw [pushout.condition] + · simp only [base, endpoint, ↓reduceIte, ← Category.assoc] + exact pushout.condition + +variable {Y : K} +noncomputable def desc (b : B ⟶ Y) (d : Bool → (Disk ⟶ Y)) + (h : ∀ ε, e ε ≫ b = i ≫ d ε) : obj i e ⟶ Y := + pushout.desc (pushout.desc b (d false) (h false)) (d true) + (by rw [Category.assoc, pushout.inl_desc]; exact h true) + +@[reassoc (attr := simp)] theorem base_desc (b : B ⟶ Y) (d : Bool → (Disk ⟶ Y)) + (h : ∀ ε, e ε ≫ b = i ≫ d ε) : base i e ≫ desc i e b d h = b := by + simp only [base, desc, Category.assoc, pushout.inl_desc] + +@[reassoc (attr := simp)] theorem endpoint_desc (b : B ⟶ Y) (d : Bool → (Disk ⟶ Y)) + (h : ∀ ε, e ε ≫ b = i ≫ d ε) (ε : Bool) : endpoint i e ε ≫ desc i e b d h = d ε := by + cases ε <;> simp only [endpoint, desc, Bool.false_eq_true, + ↓reduceIte, Category.assoc, pushout.inl_desc, pushout.inr_desc] + +theorem hom_ext {f g : obj i e ⟶ Y} (hb : base i e ≫ f = base i e ≫ g) + (hd : ∀ ε, endpoint i e ε ≫ f = endpoint i e ε ≫ g) : f = g := by + apply pushout.hom_ext + · apply pushout.hom_ext + · simpa only [base, Category.assoc] using hb + · simpa only [endpoint, Bool.false_eq_true, ↓reduceIte, Category.assoc] using hd false + · simpa only [endpoint, ↓reduceIte] using hd true + +theorem oneSide_lifting {P X Y : K} (f : obj i e ⟶ P) (p : X ⟶ Y) + (hi : HasLiftingProperty i p) (hf : HasLiftingProperty f p) (ε : Bool) : + HasLiftingProperty (pushout.desc (base i e ≫ f) (endpoint i e ε ≫ f) + (by rw [← Category.assoc, condition, Category.assoc])) p := by + constructor + intro a b sq + let aB := pushout.inl (e ε) i ≫ a + let aD := pushout.inr (e ε) i ≫ a + have ha : e ε ≫ aB = i ≫ aD := by + dsimp only [aB, aD] + rw [← Category.assoc, pushout.condition, Category.assoc] + have hB : aB ≫ p = base i e ≫ f ≫ b := by + have h := congrArg (pushout.inl (e ε) i ≫ ·) sq.w + simpa only [aB, Category.assoc, pushout.inl_desc_assoc] using h + have hD : aD ≫ p = endpoint i e ε ≫ f ≫ b := by + have h := congrArg (pushout.inr (e ε) i ≫ ·) sq.w + simpa only [aD, Category.assoc, pushout.inr_desc_assoc] using h + have otherSq : CommSq (e (!ε) ≫ aB) i p (endpoint i e (!ε) ≫ f ≫ b) := by + constructor + rw [Category.assoc, hB, ← Category.assoc (e (!ε)), condition, Category.assoc] + let : otherSq.HasLift := hi.sq_hasLift otherSq + let ds : Bool → (Disk ⟶ X) := fun δ => if δ = ε then aD else otherSq.lift + have dsε : ds ε = aD := by simp [ds] + have dsother : ds (!ε) = otherSq.lift := by cases ε <;> simp [ds] + have hds : ∀ δ, e δ ≫ aB = i ≫ ds δ := by + intro δ + by_cases h : δ = ε + · subst δ; rw [dsε]; exact ha + · have he : δ = !ε := by cases δ <;> cases ε <;> simp_all + subst δ; rw [dsother]; exact otherSq.fac_left.symm + let a' := desc i e aB ds hds + have sq' : CommSq a' f p b := by + constructor + apply hom_ext i e + · simp only [← Category.assoc, base_desc, a'] + simpa only [Category.assoc] using hB + · intro δ + simp only [← Category.assoc, endpoint_desc, a'] + by_cases h : δ = ε + · subst δ; rw [dsε]; simpa only [Category.assoc] using hD + · have he : δ = !ε := by cases δ <;> cases ε <;> simp_all + subst δ; rw [dsother]; simpa only [Category.assoc] using otherSq.fac_right + let : sq'.HasLift := hf.sq_hasLift sq' + refine CommSq.HasLift.mk' ⟨sq'.lift, ?_, sq'.fac_right⟩ + apply pushout.hom_ext + · rw [pushout.inl_desc_assoc, Category.assoc, sq'.fac_left] + exact base_desc i e aB ds hds + · rw [pushout.inr_desc_assoc, Category.assoc, sq'.fac_left] + exact (endpoint_desc i e aB ds hds ε).trans dsε + +end TwoEndpoints +open CategoryTheory CategoryTheory.Limits Opposite +namespace CylinderNode +variable {K : Type u} [Category.{v} K] {D : GlobularFrame K} {j : ℕ} + +def stationary (D : GlobularFrame K) (j : ℕ) : CylinderNode D j where + bd := D.bd j + obj := D.obj j + inc := D.inc j + bdEnd _ := 𝟙 _ + endpoint _ := 𝟙 _ + comm _ := by simp + +structure Step (Z : CylinderNode D j) (W : CylinderNode D (j+1)) where + left : Z.obj ⟶ W.bd + right : Z.obj ⟶ W.bd + square : IsPushout Z.inc Z.inc left right + end_left : ∀ ε, D.left j ≫ W.bdEnd ε = Z.endpoint ε ≫ left + end_right : ∀ ε, D.right j ≫ W.bdEnd ε = Z.endpoint ε ≫ right + +def stationaryStep (D : GlobularFrame K) (j : ℕ) : + Step (stationary D j) (stationary D (j+1)) where + left := D.left j + right := D.right j + square := D.square j + end_left _ := by simp [stationary] + end_right _ := by simp [stationary] + +noncomputable def criticalStep (D : GlobularFrame K) (j : ℕ) : + Step (stationary D j) (critical D (j+1)) where + left := D.left j + right := D.right j + square := D.square j + end_left _ := by simp [stationary, critical] + end_right _ := by simp [stationary, critical] + +end CylinderNode + +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) + +noncomputable def cylinderFactor (j : ℕ) (B : CutoffModels C q) + (e : Bool → (cutoffBoundary hC q j ⟶ B)) := by + let := cutoff_hasColimits hC q + let := cutoff_hasLimits hC q + let := boundaryClass_smallObject hC q (n+1) + exact MorphismProperty.factorizationData (boundaryClass hC q (n+1)).rlp.llp + (boundaryClass hC q (n+1)).rlp + (terminal.from (TwoEndpoints.obj (cutoffI hC q j) e)) + +noncomputable def completedCylinder (j : ℕ) (B : CutoffModels C q) + (e : Bool → (cutoffBoundary hC q j ⟶ B)) : CylinderNode (cutoffDiskFrame hC q) j := by + let := cutoff_hasColimits hC q + let F := cylinderFactor hC q n j B e + exact + { bd := B + obj := F.Z + inc := TwoEndpoints.base (cutoffI hC q j) e ≫ F.i + bdEnd := e + endpoint ε := TwoEndpoints.endpoint (cutoffI hC q j) e ε ≫ F.i + comm ε := by erw [← Category.assoc, TwoEndpoints.condition, Category.assoc] } + +noncomputable def cylinderNext {j : ℕ} (Z : CylinderNode (cutoffDiskFrame hC q) j) : + CylinderNode (cutoffDiskFrame hC q) (j+1) := by + let := cutoff_hasColimits hC q + exact completedCylinder hC q n (j+1) Z.nextBoundary Z.nextBdEnd + +noncomputable def cylinderNextStep {j : ℕ} (Z : CylinderNode (cutoffDiskFrame hC q) j) : + CylinderNode.Step Z (cylinderNext hC q n Z) := by + let := cutoff_hasColimits hC q + exact + { left := pushout.inl Z.inc Z.inc + right := pushout.inr Z.inc Z.inc + square := IsPushout.of_hasPushout _ _ + end_left := Z.nextBdEnd_left + end_right := Z.nextBdEnd_right } + +noncomputable def cylinderNode : (j : ℕ) → CylinderNode (cutoffDiskFrame hC q) j + | 0 => if 0 < n then CylinderNode.stationary (cutoffDiskFrame hC q) 0 + else CylinderNode.critical (cutoffDiskFrame hC q) 0 + | j+1 => if j+1 < n then CylinderNode.stationary (cutoffDiskFrame hC q) (j+1) + else if j+1 = n then CylinderNode.critical (cutoffDiskFrame hC q) (j+1) + else cylinderNext hC q n (cylinderNode j) + +theorem cylinderNode_low {j : ℕ} (h : j < n) : + cylinderNode hC q n j = CylinderNode.stationary (cutoffDiskFrame hC q) j := by + cases j <;> simp only [cylinderNode, ite_eq_left h] + +theorem cylinderNode_critical : cylinderNode hC q n n = + CylinderNode.critical (cutoffDiskFrame hC q) n := by + cases n <;> simp only [cylinderNode, Nat.lt_irrefl, ite_false, ite_true] + +theorem cylinderNode_high {j : ℕ} (h : n ≤ j) : + cylinderNode hC q n (j+1) = cylinderNext hC q n (cylinderNode hC q n j) := by + simp only [cylinderNode, ite_eq_right (show ¬ j+1 < n by omega), + ite_eq_right (show ¬ j+1 = n by omega)] + +noncomputable def cylinderStep (j : ℕ) : + CylinderNode.Step (cylinderNode hC q n j) (cylinderNode hC q n (j+1)) := by + by_cases h : j < n + · by_cases h' : j+1 < n + · rw [cylinderNode_low hC q n h, cylinderNode_low hC q n h'] + exact CylinderNode.stationaryStep _ _ + · have e : j+1 = n := by omega + rw [cylinderNode_low hC q n h] + have hc : cylinderNode hC q n (j+1) = CylinderNode.critical (cutoffDiskFrame hC q) (j+1) := by + subst n; exact cylinderNode_critical hC q (j+1) + rw [hc] + exact CylinderNode.criticalStep _ _ + · rw [cylinderNode_high hC q n (by omega)] + exact cylinderNextStep hC q n _ + +noncomputable def cylinderFrame : GlobularFrame (CutoffModels C q) where + obj j := (cylinderNode hC q n j).obj + bd j := (cylinderNode hC q n j).bd + inc j := (cylinderNode hC q n j).inc + left j := (cylinderStep hC q n j).left + right j := (cylinderStep hC q n j).right + square j := (cylinderStep hC q n j).square + initial := by + by_cases h : n = 0 + · subst n; rw [cylinderNode_critical] + exact (cutoffDiskFrame hC q).initial + · rw [cylinderNode_low hC q n (by omega)] + exact (cutoffDiskFrame hC q).initial + +noncomputable def cylinderEndpoint (ε : Bool) : + GlobularFrame.Hom (cutoffDiskFrame hC q) (cylinderFrame hC q n) where + obj j := (cylinderNode hC q n j).endpoint ε + bd j := (cylinderNode hC q n j).bdEnd ε + inc j := (cylinderNode hC q n j).comm ε + left j := (cylinderStep hC q n j).end_left ε + right j := (cylinderStep hC q n j).end_right ε + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderPathLifting.lean b/lean/OAI/CategoryTheory/Globular/CylinderPathLifting.lean new file mode 100644 index 0000000000000000000000000000000000000000..7153e2210f397a2eda4dec22cbb74b3971f4fc94 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderPathLifting.lean @@ -0,0 +1,139 @@ +import OAI.CategoryTheory.Globular.CylinderSplitting + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularSet + +theorem liftsBoundary_of_bijective {X Y : GlobularSet.{v}} (p : Hom X Y) (k : ℕ) + (hp : ∀ j, j ≤ k → Function.Bijective (p.app j)) : LiftsBoundary p k := by + intro bd y hy + obtain ⟨x,hx⟩ := (hp k le_rfl).surjective y + refine ⟨x, ?_, hx⟩ + apply (Hom.boundaryMap_bijective_of_low p k (fun j hj => hp j (by omega))).injective + rw [p.boundary_app, hx, hy] + +theorem LiftsBoundary.comp {X Y Z : GlobularSet.{v}} {f : Hom X Y} {g : Hom Y Z} + {k : ℕ} (hf : LiftsBoundary f k) (hg : LiftsBoundary g k) : LiftsBoundary (f.comp g) k := by + intro bd z hz + obtain ⟨y,hy,hgz⟩ := hg (f.boundaryMap k bd) z + (by simpa only [Hom.boundaryMap_comp] using hz) + obtain ⟨x,hx,hfx⟩ := hf bd y hy + exact ⟨x,hx,(congrArg (g.app k) hfx).trans hgz⟩ + +end GlobularSet +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasPushouts K] {B D : GlobularFrame K} + +theorem Hom.pre_liftsBoundary (e : Hom D B) (Y : K) (j : ℕ) + (s : B.obj j ⟶ oneSided e j) (hs : oneSidedMap e j ≫ s = 𝟙 _) : + GlobularSet.LiftsBoundary (e.pre Y) j := by + intro bd y hy + let a := (B.boundaryEquiv j).equiv Y |>.symm bd + have ha : (B.boundaryEquiv j).equiv Y a = bd := Equiv.apply_symm_apply _ _ + have hab : e.bd j ≫ a = D.inc j ≫ y := by + apply ((D.boundaryEquiv j).equiv Y).injective + erw [e.boundary_naturality, ha, (D.boundaryEquiv j).inc_boundary] + exact hy.symm + let top := pushout.desc a y hab + have hh : oneSidedMap e j ≫ s ≫ top = top := by rw [← Category.assoc, hs, Category.id_comp] + have hb : B.inc j ≫ s ≫ top = a := by + have h := congrArg (pushout.inl (e.bd j) (D.inc j) ≫ ·) hh + dsimp only [oneSidedMap,top] at h + erw [pushout.inl_desc_assoc, pushout.inl_desc] at h + exact h + have he : e.obj j ≫ s ≫ top = y := by + have h := congrArg (pushout.inr (e.bd j) (D.inc j) ≫ ·) hh + dsimp only [oneSidedMap,top] at h + erw [pushout.inr_desc_assoc, pushout.inr_desc] at h + exact h + exact ⟨s ≫ top, ((B.boundaryEquiv j).inc_boundary _).symm.trans + ((congrArg ((B.boundaryEquiv j).equiv Y) hb).trans ha), he⟩ + +theorem jointSource_lift (e : Bool → Hom D B) (Y : K) (k : ℕ) + (s : B.obj (k+1) ⟶ jointSource e k) (hs : jointSourceMap e k ≫ s = 𝟙 _) + (t : B.obj k ⟶ Y) (u : Bool → (D.obj (k+1) ⟶ Y)) + (hu : ∀ ε, (e ε).obj k ≫ t = D.diagram.source k ≫ u ε) : + ∃ l : B.obj (k+1) ⟶ Y, B.diagram.source k ≫ l = t ∧ + ∀ ε, (e ε).obj (k+1) ≫ l = u ε := by + let top := TwoEndpoints.desc (D.diagram.source k) (fun ε => (e ε).obj k) t u hu + have hh : jointSourceMap e k ≫ s ≫ top = top := by rw [← Category.assoc, hs, Category.id_comp] + refine ⟨s ≫ top, ?_, ?_⟩ + · have h := congrArg (TwoEndpoints.base (D.diagram.source k) (fun ε => (e ε).obj k) ≫ ·) hh + dsimp only [jointSourceMap,top] at h + erw [TwoEndpoints.base_desc_assoc, TwoEndpoints.base_desc] at h + exact h + · intro ε + have h := congrArg (TwoEndpoints.endpoint (D.diagram.source k) (fun ε => (e ε).obj k) ε ≫ ·) hh + dsimp only [jointSourceMap,top] at h + erw [TwoEndpoints.endpoint_desc_assoc, TwoEndpoints.endpoint_desc] at h + exact h +end GlobularFrame +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +variable (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + +theorem fullCylinderEvaluation_bijective (Y : CutoffModels C q) (j : ℕ) : + Function.Bijective ((fullCylinderEvaluation hC q n hnq H Y).app j) := by + have h₁ : Function.LeftInverse ((fullCylinderCoevaluation hC q n hnq H Y).app j) + ((fullCylinderEvaluation hC q n hnq H Y).app j) := by + intro a + exact congrFun (congrArg (fun f => f.app j) (fullCylinderEvaluation_coevaluation hC q n hnq H Y)) a + have h₂ : Function.RightInverse ((fullCylinderCoevaluation hC q n hnq H Y).app j) + ((fullCylinderEvaluation hC q n hnq H Y).app j) := by + intro a + exact congrFun (congrArg (fun f => f.app j) (fullCylinderCoevaluation_evaluation hC q n hnq H Y)) a + exact ⟨h₁.injective,h₂.surjective⟩ + +theorem fullCylinderEndpoint_liftsBoundary (Y : CutoffModels C q) (ε : Bool) (j : ℕ) : + GlobularSet.LiftsBoundary (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)) j := by + rw [fullCylinderEndpoint_evaluation] + obtain ⟨s,hs⟩ := cylinder_oneSided_split hC q n hnq H j ε + exact ((GlobularSet.liftsBoundary_of_bijective _ j (fun k _ => + fullCylinderEvaluation_bijective hC q n hnq H Y k)).comp + ((cylinderEndpoint hC q n ε).pre_liftsBoundary Y j s hs)).comp + (GlobularSet.liftsBoundary_of_bijective _ j (fun k _ => (cutoffCellEquiv hC q Y k).bijective)) + +theorem fullCylinder_joint (Y : CutoffModels C q) (k : ℕ) (hk : n ≤ k) + (t : (fullCylinder hC q n hnq H Y).underlying.Cell k) + (u : Bool → Y.obj.underlying.Cell (k+1)) + (hu : ∀ ε, (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app k t = + Y.obj.underlying.source k (u ε)) : + ∃ l : (fullCylinder hC q n hnq H Y).underlying.Cell (k+1), + (fullCylinder hC q n hnq H Y).underlying.source k l = t ∧ + ∀ ε, (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app (k+1) l = u ε := by + let E := fullCylinderEvaluation hC q n hnq H Y + let D := cutoffDiskCoevaluation hC q Y + have hh ε : (cylinderEndpoint hC q n ε).obj k ≫ E.app k t = + (cutoffDiskFrame hC q).diagram.source k ≫ D.app (k+1) (u ε) := by + apply (cutoffCellEquiv hC q Y k).injective + have he := congrFun (congrArg (fun f => f.app k) + (fullCylinderEndpoint_evaluation hC q n hnq H Y ε)) t + change (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app k t = + cutoffCellEquiv hC q Y k ((cylinderEndpoint hC q n ε).obj k ≫ E.app k t) at he + exact he.symm.trans ((hu ε).trans ((cutoffCellEquiv_source hC q k _).trans + (congrArg (Y.obj.underlying.source k) (Equiv.apply_symm_apply _ _))).symm) + obtain ⟨s,hs⟩ := cylinder_joint_split hC q n hnq H k hk + obtain ⟨l,hl,he⟩ := GlobularFrame.jointSource_lift (cylinderEndpoint hC q n) Y k s hs + (E.app k t) (fun ε => D.app (k+1) (u ε)) hh + obtain ⟨z,hz⟩ := (fullCylinderEvaluation_bijective hC q n hnq H Y (k+1)).surjective l + refine ⟨z, ?_, ?_⟩ + · apply (fullCylinderEvaluation_bijective hC q n hnq H Y k).injective + rw [E.source_app, hz] + exact hl + · intro ε + have h := congrFun (congrArg (fun f => f.app (k+1)) + (fullCylinderEndpoint_evaluation hC q n hnq H Y ε)) z + change (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app (k+1) z = + cutoffCellEquiv hC q Y (k+1) ((cylinderEndpoint hC q n ε).obj (k+1) ≫ E.app (k+1) z) at h + rw [hz] at h + exact h.trans ((congrArg (cutoffCellEquiv hC q Y (k+1)) (he ε)).trans + (Equiv.apply_symm_apply _ _)) +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderPresentations.lean b/lean/OAI/CategoryTheory/Globular/CylinderPresentations.lean new file mode 100644 index 0000000000000000000000000000000000000000..b9fadf0bffed1044173e6f945b8a8a2878c47d77 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderPresentations.lean @@ -0,0 +1,155 @@ +import OAI.CategoryTheory.Globular.SkeletalPresentation + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularSet + +def whiskerDescOriented {X Y : GlobularSet.{u}} (n : ℕ) (ε : Bool) (f : Hom X Y) + (e : X.Cell n → Y.Cell (n+1)) + (he : ∀ x, (if ε then Y.target n else Y.source n) (e x) = f.app n x) : + Hom (X.whisker n ε) Y where + app _ x := match x with + | .base k x => f.app k x + | .tip x => (if ε then Y.source n else Y.target n) (e x) + | .edge x => e x + source_app k x := by + cases x with + | base _ x => exact f.source_app k x + | tip x => + cases ε <;> simp only [Bool.false_eq_true, ↓reduceIte] at he + · change f.app k (X.source k x) = Y.source k (Y.target (k+1) (e x)) + rw [f.source_app, ← he, Y.source_source] + · change f.app k (X.source k x) = Y.source k (Y.source (k+1) (e x)) + rw [f.source_app, ← he, Y.source_source] + | edge x => cases ε <;> first | exact (he x).symm | rfl + target_app k x := by + cases x with + | base _ x => exact f.target_app k x + | tip x => + cases ε <;> simp only [Bool.false_eq_true, ↓reduceIte] at he + · change f.app k (X.target k x) = Y.target k (Y.target (k+1) (e x)) + rw [f.target_app, ← he, Y.target_source] + · change f.app k (X.target k x) = Y.target k (Y.source (k+1) (e x)) + rw [f.target_app, ← he, Y.target_source] + | edge x => cases ε <;> first | exact (he x).symm | rfl + +end GlobularSet +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasColimitsOfSize.{0,v} K] +variable {D B : GlobularFrame K} {e : Hom D B} + +namespace CriticalData +variable {n : ℕ} {ε : Bool} (c : CriticalData e n ε) {S : GlobularSet.{v}} {Y : K} + +noncomputable def whiskerDiagram (f : GlobularSet.Hom S (D.homGlob Y)) + (a : GlobularSet.LiftStage (e.pre Y) f n) : + GlobularSet.Hom (S.whisker n ε) (D.homGlob Y) := + GlobularSet.whiskerDescOriented n ε f (fun x => c.iso.inv ≫ a.app n le_rfl x) (by + intro x + have he := c.endpoint + cases ε <;> simp only [Bool.false_eq_true, ↓reduceIte] at he ⊢ + all_goals + change _ ≫ c.iso.inv ≫ a.app n le_rfl x = f.app n x + erw [← he, Category.assoc, Iso.hom_inv_id_assoc] + exact a.fac n le_rfl x) + +noncomputable def whiskerPresentation (S : GlobularSet.{v}) : Presentation e S n where + obj := D.realization.obj (S.whisker n ε).presheaf + base := (S.whiskerInclusion n ε).comp + ((S.whisker n ε).toPresheafUnderlying.comp (D.cellMap _)) + stage := c.initialStage ((S.whisker n ε).toPresheafUnderlying.comp (D.cellMap _)) + desc f a := D.desc ((S.whisker n ε).presheafUnderlyingMap.comp (c.whiskerDiagram f a)) + base_desc f a j x := D.cell_desc (S := (S.whisker n ε).presheaf) _ j (.base j x) + stage_desc f a j hj x := by + by_cases h : j < n + · let : IsIso (e.obj j) := c.low j h + apply (cancel_epi (e.obj j)).1 + change e.obj j ≫ c.initialCell _ j hj x ≫ _ = e.obj j ≫ a.app j hj x + rw [← Category.assoc, c.initialCell_fac] + erw [D.cell_desc] + exact (a.fac j hj x).symm + · have hj' : j = n := by omega + subst j + change c.initialCell _ n le_rfl x ≫ _ = a.app n le_rfl x + rw [c.initialCell_top] + change (c.iso.hom ≫ D.cell (S.whisker n ε).presheaf (n+1) (.edge x)) ≫ _ = _ + erw [Category.assoc, D.cell_desc] + change c.iso.hom ≫ c.iso.inv ≫ a.app n le_rfl x = _ + exact c.iso.hom_inv_id_assoc _ + hom_ext := by + intro Y f g hb hs + have hd := GlobularSet.whisker_hom_ext n ε + ((S.whisker n ε).toPresheafUnderlying.comp (D.realizeHom f)) + ((S.whisker n ε).toPresheafUnderlying.comp (D.realizeHom g)) hb (by + intro x + have h := hs n le_rfl x + change c.initialCell _ n le_rfl x ≫ f = c.initialCell _ n le_rfl x ≫ g at h + rw [c.initialCell_top] at h + change (c.iso.hom ≫ D.cell (S.whisker n ε).presheaf (n+1) (.edge x)) ≫ f = + (c.iso.hom ≫ D.cell (S.whisker n ε).presheaf (n+1) (.edge x)) ≫ g at h + simp only [Category.assoc] at h + exact (cancel_epi c.iso.hom).1 h) + apply D.hom_ext + intro j x + exact congrFun (congrArg (fun z => z.app j) hd) x +end CriticalData + +namespace Presentation +variable (e : Hom D B) (S : GlobularSet.{v}) (m : ℕ) +variable (hm : ∀ j, m < j → IsEmpty (S.Cell j)) + +noncomputable def fullStage (Y : K) (f : GlobularSet.Hom S (B.homGlob Y)) : + GlobularSet.LiftStage (e.pre Y) (f.comp (e.pre Y)) m where + app j _ := f.app j + source_app j _ := f.source_app j + target_app j _ := f.target_app j + fac _ _ _ := rfl + +noncomputable def full : Presentation e S m where + obj := B.realization.obj S.presheaf + base := (S.toPresheafUnderlying.comp (B.cellMap _)).comp (e.pre _) + stage := fullStage e S m _ (S.toPresheafUnderlying.comp (B.cellMap _)) + desc f a := B.desc (S.presheafUnderlyingMap.comp + { app := fun j x => if hj : j ≤ m then a.app j hj x else (hm j (by omega)).elim x + source_app := by + intro j x + by_cases h : j+1 ≤ m + · rw [dite_eq_left (by omega), dite_eq_left h] + exact a.source_app j h x + · exact (hm (j+1) (by omega)).elim x + target_app := by + intro j x + by_cases h : j+1 ≤ m + · rw [dite_eq_left (by omega), dite_eq_left h] + exact a.target_app j h x + · exact (hm (j+1) (by omega)).elim x }) + base_desc f a j x := by + change (e.obj j ≫ B.cell S.presheaf j x) ≫ B.desc _ = f.app j x + erw [Category.assoc, B.cell_desc] + by_cases hj : j ≤ m + · dsimp only [GlobularSet.Hom.comp, GlobularSet.presheafUnderlyingMap] + rw [dite_eq_left hj] + exact a.fac j hj x + · exact (hm j (by omega)).elim x + stage_desc f a j hj x := by + change B.cell S.presheaf j x ≫ B.desc _ = _ + erw [B.cell_desc] + dsimp only [GlobularSet.Hom.comp, GlobularSet.presheafUnderlyingMap] + rw [dite_eq_left hj] + rfl + hom_ext := by + intro Y f g _ hs + apply B.hom_ext + intro j x + by_cases hj : j ≤ m + · exact hs j hj x + · exact (hm j (by omega)).elim x +end Presentation +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderShapes.lean b/lean/OAI/CategoryTheory/Globular/CylinderShapes.lean new file mode 100644 index 0000000000000000000000000000000000000000..41aa494468c3c1a80da55bcd2b8cd7788ba988ea --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderShapes.lean @@ -0,0 +1,78 @@ +import OAI.CategoryTheory.Globular.CylinderContractibility + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsShapes : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +theorem Cofibrant.of_iso {X Y : CutoffModels C q} (hX : Cofibrant hC q X) (e : X ≅ Y) : + Cofibrant hC q Y := by + intro P Q p hp f + exact hX.retract e.inv e.hom e.inv_hom_id p hp f + +noncomputable def cylinderShape (S : Shape) : CutoffModels C q := + (cylinderFrame hC q n).realization.obj (GlobularPresheaf.liftSmall.obj S.realize) + +theorem cylinderShape_contractible (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) (S : Shape) : + Cofibrant hC q (cylinderShape hC q n S) ∧ (cylinderShape hC q n S).obj.underlying.HasFillers := by + let T := GlobularPresheaf.liftSmall.{v}.obj S.realize + let e := cylinderEndpoint hC q n false + let m := max n S.height + have hm (j : ℕ) (hj : m < j) : IsEmpty (T.underlying.Cell j) := by + constructor + intro x + exact (S.2.bounded j (lt_of_le_of_lt (Nat.le_max_right n S.height) hj)).false x.down + let U := (cylinderCriticalData hC q n false).whiskerPresentation T.underlying + let V := GlobularFrame.Presentation.full e T.underlying m hm + let f := V.comparison U (Nat.le_max_left _ _) + have hf : (sourceClass hC q (n+1)).rlp.llp f := by + intro X Y p hp + exact V.comparison_lifting U (Nat.le_max_left _ _) p (fun k hk _ => + (cylinder_oneSided_contractible hC q n hnq H k hk false).2.2 p hp) + have hU : Cofibrant hC q U.obj := cutoffFrame_cofibrant hC q _ + have hUF : U.obj.obj.underlying.HasFillers := cutoffFrame_whisker_hasFillers hC q n hnq H S false + have hV : Cofibrant hC q V.obj := hU.of_cofibration f + (boundaryClass_cofibration_le hC q 0 (n+1) (Nat.zero_le _) f + (sourceClass_cofibration_le hC q (n+1) f hf)) + have hVF : V.obj.obj.underlying.HasFillers := H f hf hU hUF + let iso := (cylinderFrame hC q n).realization.mapIso T.underlyingPresheafIso + exact ⟨Cofibrant.of_iso hC q hV iso, hasFillers_of_iso (q := q) iso hVF⟩ + +theorem cylinderNode_contractible (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) (j : ℕ) : + Cofibrant hC q (cylinderNode hC q n j).obj ∧ + (cylinderNode hC q n j).obj.obj.underlying.HasFillers := by + let iso := (cylinderFrame hC q n).realization.mapIso (GlobularPresheaf.liftSmallDiskIso j) ≪≫ + (cylinderFrame hC q n).diagram.globeIso j + have h := cylinderShape_contractible hC q n hnq H (Shape.globe j) + exact ⟨Cofibrant.of_iso hC q h.1 iso, hasFillers_of_iso (q := q) iso h.2⟩ + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] in +theorem boundary_cofibration_split {r : ℕ} {X Y : CutoffModels C q} (i : X ⟶ Y) + (hi : (boundaryClass hC q r).rlp.llp i) (hX : X.obj.underlying.HasFillers) : + ∃ s : Y ⟶ X, i ≫ s = 𝟙 X := by + have hp : (boundaryClass hC q r).rlp (terminal.from X) := by + rintro A B f ⟨⟨k,hk⟩⟩ + exact (lifting_terminal_iff _ _).2 ((cutoff_hasFillers_iff hC q _).1 hX k) + have sq : CommSq (𝟙 X) i (terminal.from X) (terminal.from Y) := ⟨terminal.hom_ext _ _⟩ + let : sq.HasLift := (hi _ hp).sq_hasLift sq + exact ⟨sq.lift, sq.fac_left⟩ + +theorem cylinder_oneSided_split_high (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + {j : ℕ} (hj : n < j) (ε : Bool) : + ∃ s : (cylinderFrame hC q n).obj j ⟶ GlobularFrame.oneSided (cylinderEndpoint hC q n ε) j, + GlobularFrame.oneSidedMap (cylinderEndpoint hC q n ε) j ≫ s = 𝟙 _ := by + exact boundary_cofibration_split hC q _ (cylinderFrame_upper hC q n hj ε) + (cylinder_oneSided_contractible hC q n hnq H j hj ε).2.1 + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderSplitting.lean b/lean/OAI/CategoryTheory/Globular/CylinderSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcf484fd119e70756a55b841c01439714a46e003 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderSplitting.lean @@ -0,0 +1,123 @@ +import OAI.CategoryTheory.Globular.CriticalJoint + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace TwoEndpoints +variable {K : Type u} [Category.{v} K] [HasPushouts K] +theorem base_property (W : MorphismProperty K) [W.IsStableUnderCobaseChange] + [W.IsStableUnderComposition] {Bd Disk B : K} (i : Bd ⟶ Disk) + (e : Bool → (Bd ⟶ B)) (hi : W i) : W (base i e) := + W.comp_mem _ _ (MorphismProperty.of_isPushout (IsPushout.of_hasPushout (e false) i) hi) + (MorphismProperty.of_isPushout (IsPushout.of_hasPushout (e true ≫ pushout.inl (e false) i) i) hi) +end TwoEndpoints +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasPushouts K] {D B : GlobularFrame K} +theorem oneSided_split_of_endpoint (e : Hom D B) (j : ℕ) [Epi (e.bd j)] + (r : B.obj j ⟶ D.obj j) (hr : e.obj j ≫ r = 𝟙 _) : + ∃ s : B.obj j ⟶ oneSided e j, oneSidedMap e j ≫ s = 𝟙 _ := by + refine ⟨r ≫ pushout.inr (e.bd j) (D.inc j), ?_⟩ + apply pushout.hom_ext + · apply (cancel_epi (e.bd j)).1 + erw [← Category.assoc _ (pushout.inl _ _), pushout.condition, Category.assoc, + ← Category.assoc (pushout.inr _ _), pushout.inr_desc] + erw [← Category.assoc (e.obj j) r, hr, Category.id_comp, Category.comp_id] + exact pushout.condition.symm + · erw [← Category.assoc, pushout.inr_desc, ← Category.assoc, hr, Category.id_comp, + Category.comp_id] +end GlobularFrame +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] + +theorem cylinder_critical_joint_contractible (hnq : n ≤ q) + (H : ExpansionContraction hC q (n+1)) : + (GlobularFrame.jointSource (cylinderEndpoint hC q n) n).obj.underlying.HasFillers := by + have hb : (cylinderEndpoint hC q n false).bd n = (cylinderEndpoint hC q n true).bd n := by + change (cylinderNode hC q n n).bdEnd false = (cylinderNode hC q n n).bdEnd true + rw [cylinderNode_critical]; rfl + have : Epi ((cylinderEndpoint hC q n false).bd n) := by + change Epi ((cylinderNode hC q n n).bdEnd false) + rw [cylinderNode_critical] + change Epi (𝟙 _); infer_instance + obtain ⟨f,g,hfg⟩ := GlobularFrame.criticalJoint_retract (cylinderEndpoint hC q n) n + (cylinderCriticalData hC q n false).iso + (cylinderCriticalData hC q n false).endpoint + (cylinderCriticalData hC q n true).endpoint hb + exact ((cylinder_oneSided_contractible hC q n hnq H (n+1) (by omega) false).2.1).retract + (underlyingMap f.hom) (underlyingMap g.hom) + (congrArg (fun z : GlobularFrame.jointSource (cylinderEndpoint hC q n) n ⟶ + GlobularFrame.jointSource (cylinderEndpoint hC q n) n => underlyingMap z.hom) hfg) + +theorem cylinder_joint_contractible (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + (k : ℕ) (hk : n ≤ k) : + (GlobularFrame.jointSource (cylinderEndpoint hC q n) k).obj.underlying.HasFillers := by + by_cases he : k = n + · subst k; exact cylinder_critical_joint_contractible hC q n hnq H + · let f := TwoEndpoints.base ((cutoffDiskFrame hC q).diagram.source k) + (fun ε => (cylinderEndpoint hC q n ε).obj k) + have hf : (sourceClass hC q (n+1)).rlp.llp f := by + apply TwoEndpoints.base_property + rw [cutoffDiskFrame_source] + intro X Y p hp + exact hp _ (MorphismProperty.ofHoms.mk (⟨k,by omega⟩ : {j : ℕ // n+1 ≤ j})) + exact H f hf (cylinderNode_contractible hC q n hnq H k).1 + (cylinderNode_contractible hC q n hnq H k).2 + +theorem cylinder_joint_split (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + (k : ℕ) (hk : n ≤ k) : + ∃ s : (cylinderFrame hC q n).obj (k+1) ⟶ + GlobularFrame.jointSource (cylinderEndpoint hC q n) k, + GlobularFrame.jointSourceMap (cylinderEndpoint hC q n) k ≫ s = 𝟙 _ := + boundary_cofibration_split hC q _ (cylinderFrame_jointSource_upper hC q n k hk) + (cylinder_joint_contractible hC q n hnq H k hk) + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] in +@[simp] theorem target_comp_unitMap (j : ℕ) : targetDisk C j ≫ unitMap C hC j = 𝟙 _ := by + apply NatTrans.ext + funext S + apply ConcreteCategory.hom_ext + intro f + change C.Hom S.unop.shape (Shape.globe j) at f + change C.comp (C.comp f (C.base (Shape.target j))) (C.unit hC j) = f + rw [C.assoc, C.unit_target, C.comp_id] + +theorem cylinder_oneSided_split (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + (j : ℕ) (ε : Bool) : + ∃ s : (cylinderFrame hC q n).obj j ⟶ GlobularFrame.oneSided (cylinderEndpoint hC q n ε) j, + GlobularFrame.oneSidedMap (cylinderEndpoint hC q n ε) j ≫ s = 𝟙 _ := by + by_cases hj : n < j + · exact cylinder_oneSided_split_high hC q n hnq H hj ε + · have hepi : Epi ((cylinderEndpoint hC q n ε).bd j) := by + change Epi ((cylinderNode hC q n j).bdEnd ε) + by_cases he : j = n + · subst j; rw [cylinderNode_critical]; change Epi (𝟙 _); infer_instance + · rw [cylinderNode_low hC q n (by omega)]; change Epi (𝟙 _); infer_instance + suffices hr : ∃ r : (cylinderFrame hC q n).obj j ⟶ (cutoffDiskFrame hC q).obj j, + (cylinderEndpoint hC q n ε).obj j ≫ r = 𝟙 _ by + obtain ⟨r,hr⟩ := hr + exact GlobularFrame.oneSided_split_of_endpoint (cylinderEndpoint hC q n ε) j r hr + change ∃ r : (cylinderNode hC q n j).obj ⟶ (cutoffDiskFrame hC q).obj j, + (cylinderNode hC q n j).endpoint ε ≫ r = 𝟙 _ + by_cases he : j = n + · subst j + rw [cylinderNode_critical] + refine ⟨(cutoffFunctor hC q).map (unitMap C hC n), ?_⟩ + cases ε + · change (cutoffDiskFrame hC q).diagram.source n ≫ _ = _ + rw [cutoffDiskFrame_source] + change (cutoffFunctor hC q).map (J C n) ≫ _ = _ + erw [← Functor.map_comp, J_comp_unitMap] + exact (cutoffFunctor hC q).map_id _ + · change (cutoffDiskFrame hC q).diagram.target n ≫ _ = _ + erw [cutoffDiskFrame_target, ← Functor.map_comp, target_comp_unitMap] + exact (cutoffFunctor hC q).map_id _ + · rw [cylinderNode_low hC q n (by omega)] + exact ⟨𝟙 _, Category.id_comp _⟩ +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/CylinderTheory.lean b/lean/OAI/CategoryTheory/Globular/CylinderTheory.lean new file mode 100644 index 0000000000000000000000000000000000000000..885f0d8c2a0324d2f1356b7bae57bb99f5dbad8a --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/CylinderTheory.lean @@ -0,0 +1,64 @@ +import OAI.CategoryTheory.Globular.ShapeFrame + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasColimitsOfSize.{0,v} K] +theorem shapeRealization_sums (B : GlobularFrame K) (S : Shape) (b h : ℕ) + (hl : b < S.1) (hr : b < h) : + IsPushout (B.shapeRealization.map (S.seam hl)) + (B.shapeRealization.map (Shape.face hr false)) + (B.shapeRealization.map (S.inl b h hl hr)) + (B.shapeRealization.map (S.inr b h hl hr)) := + (Shape.liftedRealization_pushout S b h hl hr).map B.realization +end GlobularFrame +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsTheory : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +noncomputable def shapeFrameNatIso : + C.toTheoryData.arity ⋙ cutoffRepresentables hC q ≅ (cutoffDiskFrame hC q).shapeRealization := + NatIso.ofComponents (shapeFrameIso hC q) (fun f => shapeFrameIso_naturality hC q f) + +noncomputable def cylinderShapeEndpoint (ε : Bool) : + C.toTheoryData.arity ⋙ cutoffRepresentables hC q ⟶ (cylinderFrame hC q n).shapeRealization := + (shapeFrameNatIso hC q).hom ≫ (cylinderEndpoint hC q n ε).shapeEndpoint + +@[reassoc] theorem cylinderShapeEndpoint_globe (ε : Bool) (j : ℕ) : + (cylinderShapeEndpoint hC q n ε).app (Shape.globe j) ≫ + ((cylinderFrame hC q n).shapeGlobeIso j).hom = (cylinderEndpoint hC q n ε).obj j := by + change ((shapeFrameIso hC q (Shape.globe j)).hom ≫ + (cylinderEndpoint hC q n ε).shapeEndpoint.app _) ≫ _ = _ + erw [shapeFrameIso_globe, Category.assoc] + exact GlobularFrame.shapeEndpoint_globe _ _ + +theorem cutoffRepresentables_sums (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + IsPushout ((cutoffRepresentables hC q).map (C.base (S.seam hl))) + ((cutoffRepresentables hC q).map (C.base (Shape.face hr false))) + ((cutoffRepresentables hC q).map (C.base (S.inl b h hl hr))) + ((cutoffRepresentables hC q).map (C.base (S.inr b h hl hr))) := by + exact ((cutoffDiskFrame hC q).shapeRealization_sums S b h hl hr).of_iso' + (shapeFrameIso hC q (Shape.globe b)) (shapeFrameIso hC q S) + (shapeFrameIso hC q (Shape.globe h)) (shapeFrameIso hC q (S.attach b h hl hr)) + (shapeFrameIso_naturality hC q _).symm (shapeFrameIso_naturality hC q _).symm + (shapeFrameIso_naturality hC q _).symm (shapeFrameIso_naturality hC q _).symm + +noncomputable abbrev cylinderTheory : GlobularTheory.{v} := + representedTheory (cutoffRepresentables hC q) (cylinderFrame hC q n).shapeRealization + (cylinderShapeEndpoint hC q n false) (cylinderShapeEndpoint hC q n true) + (cylinderFrame hC q n).shapeRealization_sums (cutoffRepresentables_sums hC q) +noncomputable abbrev cylinderProjection : Morphism (cylinderTheory hC q n) C := + representedProjection (cutoffRepresentables hC q) (cylinderFrame hC q n).shapeRealization + (cylinderShapeEndpoint hC q n false) (cylinderShapeEndpoint hC q n true) + (cylinderFrame hC q n).shapeRealization_sums (cutoffRepresentables_sums hC q) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Density.lean b/lean/OAI/CategoryTheory/Globular/Density.lean new file mode 100644 index 0000000000000000000000000000000000000000..8091c3dadd1156e57d392d7ef24f2a832a37e155 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Density.lean @@ -0,0 +1,164 @@ +import OAI.CategoryTheory.Globular.LinearShape + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularPresheaf + +noncomputable def densityDesc {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) [PreservesColimitsOfSize.{0,0} F] + (S : GlobularPresheaf.{0}) (Y : K) + (d : ∀ (k : Globe), S.obj (op k) → (F.obj (uliftYoneda.obj k) ⟶ Y)) + (hd : ∀ {k l : Globe} (f : k ⟶ l) x, + F.map (uliftYoneda.map f) ≫ d l x = d k (S.map f.op x)) : F.obj S ⟶ Y := + (isColimitOfPreserves F (Presheaf.colimitOfRepresentable S)).desc + { pt := Y + ι := + { app x := d x.unop.1.unop x.unop.2 + naturality x y f := by + dsimp + erw [Category.comp_id] + exact (hd f.unop.1.unop y.unop.2).trans (congrArg (d x.unop.1.unop) f.unop.2) } } + +@[reassoc (attr := simp)] theorem densityDesc_cell {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) [PreservesColimitsOfSize.{0,0} F] + (S : GlobularPresheaf.{0}) (Y : K) (d) (hd) (k : Globe) (x : S.obj (op k)) : + F.map (uliftYonedaEquiv.symm x) ≫ densityDesc F S Y d hd = d k x := by + exact (isColimitOfPreserves F (Presheaf.colimitOfRepresentable S)).fac _ + (op (Functor.elementsMk S (op k) x)) + +theorem density_hom_ext {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) [PreservesColimitsOfSize.{0,0} F] + {S : GlobularPresheaf.{0}} {Y : K} {f g : F.obj S ⟶ Y} + (h : ∀ (k : Globe) (x : S.obj (op k)), + F.map (uliftYonedaEquiv.symm x) ≫ f = F.map (uliftYonedaEquiv.symm x) ≫ g) : f = g := by + apply (isColimitOfPreserves F (Presheaf.colimitOfRepresentable S)).hom_ext + intro x + exact h x.unop.1.unop x.unop.2 + +noncomputable def liftSmall : GlobularPresheaf.{0} ⥤ GlobularPresheaf.{v} := + (Functor.whiskeringRight Globeᵒᵖ (Type) (Type v)).obj uliftFunctor.{v,0} + +instance liftSmall_preservesColimits : PreservesColimitsOfSize.{0,0} (liftSmall.{v}) := by + unfold liftSmall + infer_instance + +end GlobularPresheaf + +namespace GlobularTheory.Model + +noncomputable def smallFree {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) : + GlobularPresheaf.{0} ⥤ CutoffModels C q := + GlobularPresheaf.liftSmall.{v} ⋙ cutoffFreeGlobular hC q + +instance smallFree_preservesColimits {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) : + PreservesColimitsOfSize.{0,0} (smallFree hC q) := by + let : PreservesColimitsOfSize.{0,0} (cutoffFreeGlobular hC q) := + preservesColimitsOfSize_shrink _ + unfold smallFree + infer_instance + +noncomputable def cutoffShapeEquiv {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) (Y : CutoffModels C q) : + ((cutoffFunctor hC q).obj (freeShape C S) ⟶ Y) ≃ + (GlobularPresheaf.liftSmall.obj S.realize ⟶ (cutoffForgetGlobular C q).obj Y) := + ((cutoffAdjunction hC q).homEquiv _ Y).trans (shapeGlobularEquiv S Y.obj) + +@[reassoc] theorem cutoffShapeEquiv_naturality {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) {Y Z : CutoffModels C q} + (a : (cutoffFunctor hC q).obj (freeShape C S) ⟶ Y) (b : Y ⟶ Z) : + cutoffShapeEquiv hC q S Z (a ≫ b) = + cutoffShapeEquiv hC q S Y a ≫ (cutoffForgetGlobular C q).map b := by + change shapeGlobularEquiv S Z.obj + ((cutoffAdjunction hC q).homEquiv _ Z (a ≫ b)) = + shapeGlobularEquiv S Y.obj ((cutoffAdjunction hC q).homEquiv _ Y a) ≫ _ + erw [Adjunction.homEquiv_naturality_right, shapeGlobularEquiv_natural] + rfl + +noncomputable def smallFreeShapeIso {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) : + (smallFree hC q).obj S.realize ≅ (cutoffFunctor hC q).obj (freeShape C S) := by + let U := cutoffForgetGlobular C q + let A := cutoffGlobularAdjunction hC q + let P := (cutoffFunctor hC q).obj (freeShape C S) + let X := GlobularPresheaf.liftSmall.obj S.realize + let E (Y : CutoffModels C q) := cutoffShapeEquiv hC q S Y + let f := (A.homEquiv X P).symm (E P (𝟙 P)) + let g := (E ((cutoffFreeGlobular hC q).obj X)).symm (A.unit.app X) + have hf : A.homEquiv X P f = E P (𝟙 P) := (A.homEquiv X P).apply_symm_apply _ + have hg : E ((cutoffFreeGlobular hC q).obj X) g = A.unit.app X := (E _).apply_symm_apply _ + refine ⟨f, g, ?_, ?_⟩ + · apply (A.homEquiv X _).injective + erw [Adjunction.homEquiv_naturality_right, hf, Adjunction.homEquiv_id] + change E P (𝟙 P) ≫ U.map g = _ + erw [← cutoffShapeEquiv_naturality] + erw [Category.id_comp] + exact hg + · apply (E P).injective + change E P (g ≫ f) = E P (𝟙 P) + erw [cutoffShapeEquiv_naturality, hg] + exact hf + +theorem smallFree_cofibrant {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : GlobularPresheaf.{0}) : Cofibrant hC q ((smallFree hC q).obj S) := + cutoffFreeGlobular_cofibrant hC q _ + +noncomputable def smallFreeGen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + ((smallFree hC q).obj S).obj.underlying.Cell k := + (GlobularPresheaf.underlyingMap + ((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S))).app k + (ULift.up x) + +noncomputable def smallFreeDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : GlobularSet.Hom (GlobularPresheaf.liftSmall.obj S).underlying Y.obj.underlying) : + (smallFree hC q).obj S ⟶ Y := + ((cutoffGlobularAdjunction hC q).homEquiv _ Y).symm + ((GlobularPresheaf.liftSmall.obj S).underlyingPresheafIso.inv ≫ + f.presheafMap ≫ ((cutoffForgetGlobular C q).obj Y).underlyingPresheafIso.hom) + +@[simp] theorem smallFreeDesc_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : GlobularSet.Hom (GlobularPresheaf.liftSmall.obj S).underlying Y.obj.underlying) + (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (smallFreeDesc hC q f).hom).app k (smallFreeGen hC q S k x) = + f.app k (ULift.up x) := by + have h := ((cutoffGlobularAdjunction hC q).homEquiv _ Y).apply_symm_apply + ((GlobularPresheaf.liftSmall.obj S).underlyingPresheafIso.inv ≫ + f.presheafMap ≫ ((cutoffForgetGlobular C q).obj Y).underlyingPresheafIso.hom) + exact congrFun (congrArg (fun z => (GlobularPresheaf.underlyingMap z).app k) h) (ULift.up x) + +@[simp] theorem smallFreeGen_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + ((smallFree hC q).obj S).obj.underlying.source k (smallFreeGen hC q S (k+1) x) = + smallFreeGen hC q S k (S.underlying.source k x) := by + exact (GlobularPresheaf.underlyingMap + ((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S))).source_app k + (ULift.up x) |>.symm + +@[simp] theorem smallFreeGen_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + ((smallFree hC q).obj S).obj.underlying.target k (smallFreeGen hC q S (k+1) x) = + smallFreeGen hC q S k (S.underlying.target k x) := by + exact (GlobularPresheaf.underlyingMap + ((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S))).target_app k + (ULift.up x) |>.symm + +@[simp] theorem smallFreeGen_map {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap ((smallFree hC q).map f).hom).app k (smallFreeGen hC q S k x) = + smallFreeGen hC q T k ((GlobularPresheaf.underlyingMap f).app k x) := by + have h := (cutoffGlobularAdjunction hC q).unit.naturality + (GlobularPresheaf.liftSmall.map f) + exact (congrFun (congrArg (fun z => (GlobularPresheaf.underlyingMap z).app k) h) + (ULift.up x)).symm + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/DiskComparison.lean b/lean/OAI/CategoryTheory/Globular/DiskComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..c90095f139bd1dce8a9845d276c7eec73bea50db --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/DiskComparison.lean @@ -0,0 +1,168 @@ +import OAI.CategoryTheory.Globular.Colimits + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace Globe + +def faceLE {m n : ℕ} (h : m ≤ n) (side : Bool) : Globe.mk m ⟶ Globe.mk n := + if e : m = n then e ▸ Face.id m else Face.face (lt_of_le_of_ne h e) side + +@[simp] theorem faceLE_refl (n : ℕ) (side : Bool) : faceLE (le_refl n) side = 𝟙 (Globe.mk n) := by + simp only [faceLE, dite_true] + rfl + +@[simp] theorem faceLE_of_lt {m n : ℕ} (h : m < n) (side : Bool) : + faceLE h.le side = face h side := by + simp [faceLE, h.ne, face] + +end Globe + +namespace GlobularPresheaf + +noncomputable def faceLE {m n : ℕ} (h : m ≤ n) (side : Bool) : disk.{u} m ⟶ disk.{u} n := + uliftYoneda.{u}.map (Globe.faceLE h side) + +@[simp] theorem faceLE_refl (n : ℕ) (side : Bool) : faceLE (le_refl n) side = 𝟙 (disk.{u} n) := by + change uliftYoneda.map (Globe.faceLE (le_refl n) side) = 𝟙 _ + rw [Globe.faceLE_refl, uliftYoneda.map_id] + +@[simp] theorem faceLE_of_lt {m n : ℕ} (h : m < n) (side : Bool) : + faceLE.{u} h.le side = face h side := by + unfold faceLE face + rw [Globe.faceLE_of_lt] + +theorem face_low_bijective {m n k : ℕ} (h : m < n) (hk : k < m) (side : Bool) : + Function.Bijective ((face.{u} h side).app (op (Globe.mk k))) := by + constructor + · rintro ⟨a⟩ ⟨b⟩ he + cases a with + | id => omega + | face ha ba => + cases b with + | id => omega + | face hb bb => + have : ba = bb := by + change ULift.up (Globe.Face.face (ha.trans h) ba) = + ULift.up (Globe.Face.face (hb.trans h) bb) at he + cases he + rfl + subst bb + rfl + · rintro ⟨a⟩ + cases a with + | id => omega + | face ha ba => + exact ⟨⟨Globe.Face.face hk ba⟩, rfl⟩ + +theorem face_low_equal {m n k : ℕ} (h : m < n) (hk : k < m) (b c : Bool) : + (face.{u} h b).app (op (Globe.mk k)) = (face h c).app (op (Globe.mk k)) := by + apply ConcreteCategory.hom_ext + rintro ⟨a⟩ + cases a with + | id => omega + | face ha ba => rfl + +theorem faceLE_low_bijective {m n k : ℕ} (h : m ≤ n) (hk : k < m) (side : Bool) : + Function.Bijective ((faceLE.{u} h side).app (op (Globe.mk k))) := by + rcases lt_or_eq_of_le h with h | rfl + · rw [faceLE_of_lt h] + exact face_low_bijective h hk side + · rw [faceLE_refl] + exact Function.bijective_id + + +theorem face_comp_faceLE {a b c : ℕ} (hab : a < b) (hbc : b ≤ c) (s t : Bool) : + face.{u} hab s ≫ faceLE hbc t = face (hab.trans_le hbc) s := by + rcases lt_or_eq_of_le hbc with hbc | rfl + · rw [faceLE_of_lt hbc] + change uliftYoneda.map (Globe.face hab s) ≫ uliftYoneda.map (Globe.face hbc t) = _ + rw [← uliftYoneda.map_comp] + rfl + · rw [faceLE_refl, Category.comp_id] + +theorem globeMap_low_equal {m n k : ℕ} (f g : Globe.mk m ⟶ Globe.mk n) (hk : k < m) : + (uliftYoneda.{u}.map f).app (op (Globe.mk k)) = + (uliftYoneda.{u}.map g).app (op (Globe.mk k)) := by + change Globe.Face m n at f g + apply ConcreteCategory.hom_ext + rintro ⟨a⟩ + cases a with + | id => omega + | face ha ba => + cases f with + | id => + cases g with + | id => rfl + | face hg bg => omega + | face hf bf => + cases g with + | id => omega + | face hg bg => rfl + +theorem disk_hom_ext {n : ℕ} {X : GlobularPresheaf.{u}} {f g : disk n ⟶ X} + (h : f.app (op (Globe.mk n)) = g.app (op (Globe.mk n))) : f = g := by + apply uliftYonedaEquiv.injective + exact ConcreteCategory.congr_hom h _ + +theorem pushout_comparison_isIso {D : Type u} [Category.{v} D] + {A B E P A' B' E' P' : D} + {f : A ⟶ B} {g : A ⟶ E} {i : B ⟶ P} {j : E ⟶ P} + {f' : A' ⟶ B'} {g' : A' ⟶ E'} {i' : B' ⟶ P'} {j' : E' ⟶ P'} + (h : IsPushout f g i j) (h' : IsPushout f' g' i' j') + (a : A ⟶ A') (b : B ⟶ B') (e : E ⟶ E') (p : P ⟶ P') + [IsIso a] [IsIso b] [IsIso e] + (hf : f ≫ b = a ≫ f') (hg : g ≫ e = a ≫ g') + (hi : i ≫ p = b ≫ i') (hj : j ≫ p = e ≫ j') : IsIso p := by + let r : P' ⟶ P := h'.desc (inv b ≫ i) (inv e ≫ j) (by + apply (cancel_epi a).1 + simp only [← Category.assoc, ← hf, ← hg] + simp only [Category.assoc, IsIso.hom_inv_id_assoc] + exact h.w) + refine ⟨r, ?_, ?_⟩ + · apply h.hom_ext + · rw [← Category.assoc, hi, Category.assoc] + simp only [r, IsPushout.inl_desc, IsIso.hom_inv_id_assoc, Category.comp_id] + · rw [← Category.assoc, hj, Category.assoc] + simp only [r, IsPushout.inr_desc, IsIso.hom_inv_id_assoc, Category.comp_id] + · apply h'.hom_ext + · simp only [r, IsPushout.inl_desc_assoc, hi, Category.assoc, + IsIso.inv_hom_id_assoc, Category.comp_id] + · simp only [r, IsPushout.inr_desc_assoc, hj, Category.assoc, + IsIso.inv_hom_id_assoc, Category.comp_id] + + +theorem faceLE_cap_bijective {q d n k : ℕ} (hd : d = min n (q+1)) + (h : d ≤ n) (hk : k ≤ q) : + Function.Bijective ((faceLE.{u} h false).app (op (Globe.mk k))) := by + rcases lt_or_eq_of_le h with hlt | rfl + · apply faceLE_low_bijective + have : d = q+1 := by omega + omega + · rw [faceLE_refl] + exact Function.bijective_id + +theorem face_comp_eq_of_app_eq {m n : ℕ} {X : GlobularPresheaf.{u}} + (h : m < n) (s : Bool) (a b : disk n ⟶ X) + (hab : a.app (op (Globe.mk m)) = b.app (op (Globe.mk m))) : + face h s ≫ a = face h s ≫ b := by + apply disk_hom_ext + exact congrArg (fun t => (face h s).app (op (Globe.mk m)) ≫ t) hab + +end GlobularPresheaf + +namespace Shape + +noncomputable def last (S : Shape) : GlobularPresheaf.disk S.1 ⟶ S.realize := + S.2.lastInclusion + +end Shape + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/DiskRealization.lean b/lean/OAI/CategoryTheory/Globular/DiskRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad5982a490a69b1ce1731181d07e9ac7a5f8236f --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/DiskRealization.lean @@ -0,0 +1,139 @@ +import OAI.CategoryTheory.Globular.FrameRealization + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularPresheaf + +def homEquiv (S T : GlobularPresheaf.{v}) : + (S ⟶ T) ≃ GlobularSet.Hom S.underlying T.underlying where + toFun := underlyingMap + invFun f := S.underlyingPresheafIso.inv ≫ f.presheafMap ≫ T.underlyingPresheafIso.hom + left_inv f := by apply underlyingMap_injective; rfl + right_inv f := by ext; rfl +end GlobularPresheaf +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasColimitsOfSize.{0,v} K] +noncomputable def realizationHomEquiv (B : GlobularFrame K) (S : GlobularPresheaf.{v}) (Y : K) : + (B.realization.obj S ⟶ Y) ≃ GlobularSet.Hom S.underlying (B.homGlob Y) where + toFun := B.realizeHom + invFun := B.desc + left_inv := B.desc_realizeHom + right_inv := B.realizeHom_desc +end GlobularFrame +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) + +noncomputable def cutoffCellEquiv (Y : CutoffModels C q) (j : ℕ) : + (cutoffDisk hC q j ⟶ Y) ≃ Y.obj.underlying.Cell j := + ((cutoffAdjunction hC q).homEquiv (disk C j) Y).trans (cellEquiv Y.obj j) + +@[simp] theorem cutoffCellEquiv_comp {Y Z : CutoffModels C q} (j : ℕ) + (a : cutoffDisk hC q j ⟶ Y) (f : Y ⟶ Z) : + cutoffCellEquiv hC q Z j (a ≫ f) = + (underlyingMap f.hom).app j (cutoffCellEquiv hC q Y j a) := by + unfold cutoffCellEquiv + dsimp only [Equiv.trans_apply] + erw [Adjunction.homEquiv_naturality_right, cellEquiv_comp] + rfl + +@[simp] theorem cutoffDiskFrame_target (j : ℕ) : + (cutoffDiskFrame hC q).diagram.target j = (cutoffFunctor hC q).map (targetDisk C j) := by + change (cutoffFunctor hC q).map _ ≫ (cutoffFunctor hC q).map _ = _ + rw [← Functor.map_comp] + exact congrArg (cutoffFunctor hC q).map (diskFrame_target C j) + +@[simp] theorem cutoffCellEquiv_source {Y : CutoffModels C q} (j : ℕ) + (a : cutoffDisk hC q (j+1) ⟶ Y) : + cutoffCellEquiv hC q Y j ((cutoffDiskFrame hC q).diagram.source j ≫ a) = + Y.obj.underlying.source j (cutoffCellEquiv hC q Y (j+1) a) := by + rw [cutoffDiskFrame_source] + unfold cutoffCellEquiv cutoffJ + dsimp only [Equiv.trans_apply] + erw [Adjunction.homEquiv_naturality_left, cellEquiv_J] + +@[simp] theorem cutoffCellEquiv_target {Y : CutoffModels C q} (j : ℕ) + (a : cutoffDisk hC q (j+1) ⟶ Y) : + cutoffCellEquiv hC q Y j ((cutoffDiskFrame hC q).diagram.target j ≫ a) = + Y.obj.underlying.target j (cutoffCellEquiv hC q Y (j+1) a) := by + rw [cutoffDiskFrame_target] + unfold cutoffCellEquiv + dsimp only [Equiv.trans_apply] + erw [Adjunction.homEquiv_naturality_left, cellEquiv_targetDisk] + +noncomputable def cutoffDiskEvaluation (Y : CutoffModels C q) : + GlobularSet.Hom ((cutoffDiskFrame hC q).homGlob Y) Y.obj.underlying where + app j := cutoffCellEquiv hC q Y j + source_app := cutoffCellEquiv_source hC q + target_app := cutoffCellEquiv_target hC q + +noncomputable def cutoffDiskCoevaluation (Y : CutoffModels C q) : + GlobularSet.Hom Y.obj.underlying ((cutoffDiskFrame hC q).homGlob Y) where + app j := (cutoffCellEquiv hC q Y j).symm + source_app j x := by + apply (cutoffCellEquiv hC q Y j).injective + erw [Equiv.apply_symm_apply, cutoffCellEquiv_source, Equiv.apply_symm_apply] + target_app j x := by + apply (cutoffCellEquiv hC q Y j).injective + erw [Equiv.apply_symm_apply, cutoffCellEquiv_target, Equiv.apply_symm_apply] + +noncomputable def cutoffDiskHomEquiv (S : GlobularSet.{v}) (Y : CutoffModels C q) : + GlobularSet.Hom S ((cutoffDiskFrame hC q).homGlob Y) ≃ + GlobularSet.Hom S Y.obj.underlying where + toFun f := f.comp (cutoffDiskEvaluation hC q Y) + invFun f := f.comp (cutoffDiskCoevaluation hC q Y) + left_inv f := by ext j x; exact Equiv.symm_apply_apply _ _ + right_inv f := by ext j x; exact Equiv.apply_symm_apply _ _ + +variable [HasColimitsOfSize.{0,v} (CutoffModels C q)] +noncomputable def cutoffFrameHomEquiv (S : GlobularPresheaf.{v}) (Y : CutoffModels C q) : + ((cutoffDiskFrame hC q).realization.obj S ⟶ Y) ≃ + (S ⟶ (cutoffForgetGlobular C q).obj Y) := + ((cutoffDiskFrame hC q).realizationHomEquiv S Y).trans + ((cutoffDiskHomEquiv hC q S.underlying Y).trans + (GlobularPresheaf.homEquiv S ((cutoffForgetGlobular C q).obj Y)).symm) + +@[reassoc] theorem cutoffFrameHomEquiv_naturality (S : GlobularPresheaf.{v}) + {Y Z : CutoffModels C q} (a : (cutoffDiskFrame hC q).realization.obj S ⟶ Y) (b : Y ⟶ Z) : + cutoffFrameHomEquiv hC q S Z (a ≫ b) = + cutoffFrameHomEquiv hC q S Y a ≫ (cutoffForgetGlobular C q).map b := by + apply GlobularPresheaf.underlyingMap_injective + ext j x + change cutoffCellEquiv hC q Z j ((cutoffDiskFrame hC q).cell S j x ≫ (a ≫ b)) = + (underlyingMap b.hom).app j + (cutoffCellEquiv hC q Y j ((cutoffDiskFrame hC q).cell S j x ≫ a)) + erw [← Category.assoc, cutoffCellEquiv_comp] + +noncomputable def cutoffFrameFreeIso (S : GlobularPresheaf.{v}) : + (cutoffFreeGlobular hC q).obj S ≅ (cutoffDiskFrame hC q).realization.obj S := by + let U := cutoffForgetGlobular C q + let A := cutoffGlobularAdjunction hC q + let P := (cutoffDiskFrame hC q).realization.obj S + let E (Y : CutoffModels C q) := cutoffFrameHomEquiv hC q S Y + let f := (A.homEquiv S P).symm (E P (𝟙 P)) + let g := (E ((cutoffFreeGlobular hC q).obj S)).symm (A.unit.app S) + have hf : A.homEquiv S P f = E P (𝟙 P) := (A.homEquiv S P).apply_symm_apply _ + have hg : E ((cutoffFreeGlobular hC q).obj S) g = A.unit.app S := (E _).apply_symm_apply _ + refine ⟨f, g, ?_, ?_⟩ + · apply (A.homEquiv S _).injective + erw [Adjunction.homEquiv_naturality_right, hf, Adjunction.homEquiv_id] + change E P (𝟙 P) ≫ U.map g = _ + erw [← cutoffFrameHomEquiv_naturality, Category.id_comp] + exact hg + · apply (E P).injective + change E P (g ≫ f) = E P (𝟙 P) + erw [cutoffFrameHomEquiv_naturality, hg] + exact hf + +theorem cutoffFrame_cofibrant (S : GlobularPresheaf.{v}) : + Cofibrant hC q ((cutoffDiskFrame hC q).realization.obj S) := by + let e := cutoffFrameFreeIso hC q S + intro P Q p hp f + exact Cofibrant.retract (cutoffFreeGlobular_cofibrant hC q S) e.inv e.hom e.inv_hom_id p hp f +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/ElementaryExpansion.lean b/lean/OAI/CategoryTheory/Globular/ElementaryExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..e83f2e0c86750be81106b336b45456448d618cde --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/ElementaryExpansion.lean @@ -0,0 +1,66 @@ +import OAI.CategoryTheory.Globular.CutoffExpansion + +namespace OAI + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits +namespace GlobularSet + +theorem exactBoundaryTest_at_of_low_square.{v} {X Y R S : GlobularSet.{v}} + (i : Hom X Y) (j : Hom R S) (a : Hom X R) (b : Hom Y S) + (sq : i.comp b = a.comp j) (hj : ExactBoundaryTest j) (d : ℕ) + (ha : ∀ k, k ≤ d → Function.Bijective (a.app k)) + (hb : Function.Injective (b.app d)) (hb₁ : Function.Surjective (b.app (d+1))) + (bd : X.Boundary d) (y : Y.Cell d) (hy : Y.boundary d y = i.boundaryMap d bd) : + ∃ x : X.Cell d, X.boundary d x = bd ∧ Y.Joined d (i.app d x) y := by + have hy' : S.boundary d (b.app d y) = j.boundaryMap d (a.boundaryMap d bd) := by + rw [← b.boundary_app,hy, ← Hom.boundaryMap_comp, sq, Hom.boundaryMap_comp] + obtain ⟨r,hr,z,zs,zt⟩ := hj d (a.boundaryMap d bd) (b.app d y) hy' + obtain ⟨x,hx⟩ := (ha d le_rfl).surjective r + have hxbd : X.boundary d x = bd := by + apply (Hom.boundaryMap_bijective_of_low a d (fun k hk => ha k (by omega))).injective + rw [a.boundary_app,hx,hr] + obtain ⟨c,hc⟩ := hb₁ z + have hsquare : b.app d (i.app d x) = j.app d (a.app d x) := + congrFun (congrArg (fun f => f.app d) sq) x + refine ⟨x,hxbd,c, ?_, ?_⟩ + · apply hb + rw [b.source_app,hc,zs,hsquare,hx] + · apply hb + rw [b.target_app,hc,zt] + +end GlobularSet + +theorem elementary_expansion.{v} (C : GlobularTheory.{v}) (hC : C.IsCoherator) + (X : C.Model) (hX : X.IsCellular) (n : ℕ) + (a : GlobularTheory.Model.disk C n ⟶ X) + (Y : C.Model) (i : X ⟶ Y) + (b : GlobularTheory.Model.disk C (n + 1) ⟶ Y) + (square : IsPushout a (GlobularTheory.Model.J C n) i b) : + GlobularTheory.Model.WeakEquivalence hC i := by + apply GlobularTheory.Model.weakEquivalence_of_exactBoundaryTest hC + intro d bd y hy + let q := max (n+1) (d+1) + have hnq : n ≤ q := by dsimp [q]; omega + have hdq : d ≤ q := by dsimp [q]; omega + have hd₁q : d+1 ≤ q := Nat.le_max_right _ _ + let F := GlobularTheory.Model.cutoffFunctor hC q + let ηX := GlobularTheory.Model.underlyingMap + (GlobularTheory.Model.cutoffUnit hC q X) + let ηY := GlobularTheory.Model.underlyingMap + (GlobularTheory.Model.cutoffUnit hC q Y) + have hs : (GlobularTheory.Model.underlyingMap i).comp ηY = + ηX.comp (GlobularTheory.Model.underlyingMap (F.map i).hom) := + congrArg GlobularTheory.Model.underlyingMap + ((GlobularTheory.Model.cutoffAdjunction hC q).unit.naturality i) + exact GlobularSet.exactBoundaryTest_at_of_low_square + (GlobularTheory.Model.underlyingMap i) + (GlobularTheory.Model.underlyingMap (F.map i).hom) ηX ηY hs + (GlobularTheory.Model.cutoff_elementary_exactBoundaryTest hC q n hnq hX a i b square) + d (fun k hk => GlobularTheory.Model.cutoffUnit_low_bijective hC q X k (hk.trans hdq)) + (GlobularTheory.Model.cutoffUnit_low_bijective hC q Y d hdq).injective + (GlobularTheory.Model.cutoffUnit_low_bijective hC q Y (d+1) hd₁q).surjective bd y hy + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Expansion.lean b/lean/OAI/CategoryTheory/Globular/Expansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..9740a05e7c8bed62364b856b1dfcb9ad93bac709 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Expansion.lean @@ -0,0 +1,295 @@ +import OAI.CategoryTheory.Globular.SmallObject + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +def ExpansionContraction {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : Prop := + ∀ {X Y : CutoffModels C q} (i : X ⟶ Y), + (sourceClass hC q r).rlp.llp i → Cofibrant hC q X → + X.obj.underlying.HasFillers → Y.obj.underlying.HasFillers + +theorem boundary_rlp_of_source_rlp {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) {X Y : CutoffModels C q} (p : X ⟶ Y) + (hX : X.obj.underlying.HasFillers) (hY : Y.obj.underlying.HasFillers) + (hp : (sourceClass hC q r).rlp p) : (boundaryClass hC q r).rlp p := by + rw [boundaryClass_rlp_iff] + intro n hn + rw [hasLiftingProperty_I_iff] + apply GlobularSet.liftsBoundary_of_contractible (underlyingMap p.hom) hX hY + exact (hasLiftingProperty_J_iff n p.hom).1 + ((sourceClass_rlp_iff hC q r p).1 hp n hn) + +theorem upper_boundary_is_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) (H : ExpansionContraction hC q r) + {X Y : CutoffModels C q} (i : X ⟶ Y) + (hi : (boundaryClass hC q r).rlp.llp i) (hX : Cofibrant hC q X) + (hXF : X.obj.underlying.HasFillers) (hYF : Y.obj.underlying.HasFillers) : + (sourceClass hC q r).rlp.llp i := by + let := sourceClass_smallObject hC q r + let W := sourceClass hC q r + let F := MorphismProperty.factorizationData W.rlp.llp W.rlp i + have hZF := H F.i F.hi hX hXF + have hFp := boundary_rlp_of_source_rlp hC q r F.p hZF hYF F.hp + let := hi F.p hFp + have sq : CommSq F.i i F.p (𝟙 Y) := ⟨by rw [Category.comp_id, F.fac]⟩ + let s := sq.lift + have hs : i ≫ s = F.i := sq.fac_left + have hsp : s ≫ F.p = 𝟙 Y := sq.fac_right + intro P Q p hp + constructor + intro a b ab + let := F.hi p hp + have sq' : CommSq a F.i p (F.p ≫ b) := by + constructor + rw [← Category.assoc, F.fac, ab.w] + refine CommSq.HasLift.mk' ⟨s ≫ sq'.lift, ?_, ?_⟩ + · rw [← Category.assoc, hs, sq'.fac_left] + · rw [Category.assoc, sq'.fac_right, ← Category.assoc, hsp, Category.id_comp] + +theorem upper_pushout_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) (H : ExpansionContraction hC q r) + {X Y X' Y' : CutoffModels C q} {i : X ⟶ Y} {a : X ⟶ X'} + {i' : X' ⟶ Y'} {b : Y ⟶ Y'} (sq : IsPushout a i i' b) + (hi : (boundaryClass hC q r).rlp.llp i) (hX : Cofibrant hC q X) + (hXF : X.obj.underlying.HasFillers) (hYF : Y.obj.underlying.HasFillers) + (hX' : Cofibrant hC q X') (hX'F : X'.obj.underlying.HasFillers) : + Y'.obj.underlying.HasFillers := by + apply H i' _ hX' hX'F + exact MorphismProperty.of_isPushout sq + (upper_boundary_is_source hC q r H i hi hX hXF hYF) + +theorem hasLiftingProperty_I_of_unique {C : GlobularTheory.{v}} {X Y : C.Model} + (p : X ⟶ Y) (n : ℕ) (hX : Function.Bijective (X.underlying.boundary n)) + (hY : Function.Bijective (Y.underlying.boundary n)) : + HasLiftingProperty (I C n) p := by + rw [hasLiftingProperty_I_iff] + intro b y hy + obtain ⟨x, hx⟩ := hX.2 b + refine ⟨x, hx, hY.1 ?_⟩ + rw [← (underlyingMap p).boundary_app, hx, hy] + +theorem upper_cofibration_low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r k : ℕ) (hkq : k ≤ q) (hkr : k < r) + {X Y : CutoffModels C q} (i : X ⟶ Y) + (hi : (boundaryClass hC q r).rlp.llp i) : + Function.Bijective ((underlyingMap i.hom).app k) := by + let X' : CutoffModels C q := ⟨chosenCutoff hC k X.obj, + fun j hj => chosenCutoff_coskeletal hC k X.obj j (by omega)⟩ + let Y' : CutoffModels C q := ⟨chosenCutoff hC k Y.obj, + fun j hj => chosenCutoff_coskeletal hC k Y.obj j (by omega)⟩ + let p : X' ⟶ Y' := ObjectProperty.homMk (((cutoffFunctor hC k).map i.hom).hom) + let a : X ⟶ X' := ObjectProperty.homMk (cutoffUnit hC k X.obj) + let b : Y ⟶ Y' := ObjectProperty.homMk (cutoffUnit hC k Y.obj) + have hp : (boundaryClass hC q r).rlp p := by + rw [boundaryClass_rlp_iff] + intro j hj + exact hasLiftingProperty_I_of_unique p.hom j + (chosenCutoff_coskeletal hC k X.obj j (by omega)) + (chosenCutoff_coskeletal hC k Y.obj j (by omega)) + let := hi p hp + have sq : CommSq a i p b := by + constructor + apply ObjectProperty.hom_ext + exact ((cutoffAdjunction hC k).unit.naturality i.hom).symm + let l := sq.lift + have ha : Function.Bijective ((underlyingMap a.hom).app k) := + cutoffUnit_low_bijective hC k X.obj k le_rfl + have hb : Function.Bijective ((underlyingMap b.hom).app k) := + cutoffUnit_low_bijective hC k Y.obj k le_rfl + have hil (x : X.obj.underlying.Cell k) : + (underlyingMap l.hom).app k ((underlyingMap i.hom).app k x) = + (underlyingMap a.hom).app k x := + congrFun (congrArg (fun f => (underlyingMap f.hom).app k) sq.fac_left) x + have hlp (y : Y.obj.underlying.Cell k) : + (underlyingMap p.hom).app k ((underlyingMap l.hom).app k y) = + (underlyingMap b.hom).app k y := + congrFun (congrArg (fun f => (underlyingMap f.hom).app k) sq.fac_right) y + constructor + · intro x y hxy + apply ha.1 + rw [← hil, ← hil, hxy] + · intro y + obtain ⟨x, hx⟩ := ha.2 ((underlyingMap l.hom).app k y) + refine ⟨x, hb.1 ?_⟩ + rw [← hlp, hil, hx, hlp] + +theorem expansionContraction_top {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : ExpansionContraction hC q q := by + intro X Y i hi _ hX + have hib := sourceClass_cofibration_le hC q q i hi + intro j b + by_cases hj : q < j + · exact (Y.property j hj).2 b + · obtain ⟨b', hb'⟩ := ((underlyingMap i.hom).boundaryMap_bijective_of_low j + (fun k hk => upper_cofibration_low_bijective hC q q k (by omega) (by omega) i hib)).2 b + obtain ⟨x, hx⟩ := hX j b' + exact ⟨(underlyingMap i.hom).app j x, by + rw [← (underlyingMap i.hom).boundary_app, hx, hb']⟩ + +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck.GlobularSet + +structure LiftStage {A X Y : GlobularSet.{v}} (p : Hom X Y) (f : Hom A Y) (n : ℕ) where + app : ∀ k, k ≤ n → A.Cell k → X.Cell k + source_app : ∀ k (h : k+1 ≤ n) x, + app k (by omega) (A.source k x) = X.source k (app (k+1) h x) + target_app : ∀ k (h : k+1 ≤ n) x, + app k (by omega) (A.target k x) = X.target k (app (k+1) h x) + fac : ∀ k (h : k ≤ n) x, p.app k (app k h x) = f.app k x + +namespace LiftStage +variable {A X Y : GlobularSet.{v}} {p : Hom X Y} {f : Hom A Y} + +noncomputable def zero (hp : LiftsBoundaries p) : LiftStage p f 0 := by + have h x := hp 0 PUnit.unit (f.app 0 x) rfl + choose z _ hz using h + exact + { app := fun k hk x => by + have e : k = 0 := by omega + subst k + exact z x + source_app := fun k hk => by omega + target_app := fun k hk => by omega + fac := fun k hk x => by + have e : k = 0 := by omega + subst k + exact hz x } + +def nextBoundary {n : ℕ} (a : LiftStage p f n) (x : A.Cell (n+1)) : X.Boundary (n+1) := + ⟨(a.app n le_rfl (A.source n x), a.app n le_rfl (A.target n x)), by + cases n with + | zero => trivial + | succ n => + constructor + · rw [← a.source_app n le_rfl, ← a.source_app n le_rfl, A.source_source] + · rw [← a.target_app n le_rfl, ← a.target_app n le_rfl, A.target_source]⟩ + +noncomputable def succ {n : ℕ} (a : LiftStage p f n) (hp : LiftsBoundaries p) : + LiftStage p f (n+1) := by + have h x : ∃ z, X.boundary (n+1) z = a.nextBoundary x ∧ + p.app (n+1) z = f.app (n+1) x := by + apply hp + apply Subtype.ext + exact Prod.ext ((f.source_app n x).symm.trans (a.fac n le_rfl _).symm) + ((f.target_app n x).symm.trans (a.fac n le_rfl _).symm) + choose z hz hzp using h + have hs x := (congrArg (fun b => b.1.1) (hz x)).symm + have ht x := (congrArg (fun b => b.1.2) (hz x)).symm + exact + { app := fun k hk x => if h : k ≤ n then a.app k h x else by + have e : k = n+1 := by omega + subst k + exact z x + source_app := fun k hk x => by + dsimp only + split_ifs with h h' + · exact a.source_app k h' x + · have e : k = n := by omega + subst k + exact hs x + · omega + · omega + target_app := fun k hk x => by + dsimp only + split_ifs with h h' + · exact a.target_app k h' x + · have e : k = n := by omega + subst k + exact ht x + · omega + · omega + fac := fun k hk x => by + dsimp only + split_ifs with h + · exact a.fac k h x + · have e : k = n+1 := by omega + subst k + exact hzp x } + +@[simp] theorem succ_old {n : ℕ} (a : LiftStage p f n) (hp : LiftsBoundaries p) + (k : ℕ) (hk : k ≤ n) (x : A.Cell k) : + (a.succ hp).app k (by omega) x = a.app k hk x := by + simp only [succ, dite_eq_left hk] + +noncomputable def tower (hp : LiftsBoundaries p) : ∀ n, LiftStage p f n + | 0 => zero hp + | n+1 => (tower hp n).succ hp + +end LiftStage + +theorem LiftsBoundaries.lift {A X Y : GlobularSet.{v}} {p : Hom X Y} + (hp : LiftsBoundaries p) (f : Hom A Y) : ∃ g : Hom A X, g.comp p = f := by + let a (n : ℕ) := LiftStage.tower (f := f) hp n + let g : Hom A X := + { app := fun n => (a n).app n le_rfl + source_app := fun n x => by + exact (LiftStage.succ_old (a n) hp n le_rfl _).symm.trans + ((a (n+1)).source_app n le_rfl x) + target_app := fun n x => by + exact (LiftStage.succ_old (a n) hp n le_rfl _).symm.trans + ((a (n+1)).target_app n le_rfl x) } + exact ⟨g, by ext n x; exact (a n).fac n le_rfl x⟩ + +end Grothendieck.GlobularSet + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +theorem isCellular_cutoff_cofibrant {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {X : C.Model} (hX : X.IsCellular) : + Cofibrant hC q ((cutoffFunctor hC q).obj X) := by + intro P Q p hp f + have hp' : GlobularSet.LiftsBoundaries (underlyingMap p.hom) := by + intro n + exact (hasLiftingProperty_I_iff n p.hom).1 + ((boundaryClass_rlp_iff hC q 0 p).1 hp n (Nat.zero_le n)) + obtain ⟨A⟩ := hX + let := A.linearOrder + let := A.orderBot + let := A.succOrder + let := A.wellFoundedLT + have : A.chain.F.IsWellOrderContinuous := A.chain.isWellOrderContinuous + have : HasLiftingProperty (A.chain.incl.app ⊥) p.hom := + HasLiftingProperty.transfiniteComposition.hasLiftingProperty_ι_app_bot + (hc := A.chain.isColimit) + (fun j hj => (A.attachment j hj).hasLiftingProperty p.hom hp') + let a : X ⟶ Q.obj := (cutoffAdjunction hC q).homEquiv X Q f + let b : A.chain.F.obj ⊥ ⟶ P.obj := A.chain.isoBot.hom ≫ A.isInitial.to P.obj + have sq : CommSq b (A.chain.incl.app ⊥) p.hom a := by + constructor + dsimp [b] + rw [Category.assoc] + rw [A.isInitial.hom_ext (A.isInitial.to P.obj ≫ p.hom) (A.start ≫ a)] + rw [← Category.assoc] + have w : A.chain.isoBot.hom ≫ A.start = A.chain.incl.app ⊥ := by + exact (congrArg (A.chain.isoBot.hom ≫ ·) A.chain.fac.symm).trans + (by simp only [Iso.hom_inv_id_assoc]) + rw [w] + refine ⟨((cutoffAdjunction hC q).homEquiv X P).symm sq.lift, ?_⟩ + apply ((cutoffAdjunction hC q).homEquiv X Q).injective + rw [Adjunction.homEquiv_naturality_right, Equiv.apply_symm_apply] + exact sq.fac_right + +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck.GlobularPresheaf +open CategoryTheory Opposite + +theorem liftsBoundaries_lift {A X Y : GlobularPresheaf.{v}} {p : X ⟶ Y} + (hp : GlobularSet.LiftsBoundaries (underlyingMap p)) (f : A ⟶ Y) : + ∃ g : A ⟶ X, g ≫ p = f := by + obtain ⟨g, hg⟩ := hp.lift (underlyingMap f) + let l : A ⟶ X := A.underlyingPresheafIso.inv ≫ g.presheafMap ≫ X.underlyingPresheafIso.hom + refine ⟨l, ?_⟩ + apply underlyingMap_injective + exact hg + +end Grothendieck.GlobularPresheaf + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Factorization.lean b/lean/OAI/CategoryTheory/Globular/Factorization.lean new file mode 100644 index 0000000000000000000000000000000000000000..acd9048008690f69a10a5eff993b8996cdd6c6a8 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Factorization.lean @@ -0,0 +1,246 @@ +import OAI.CategoryTheory.Globular.CutoffExistence + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularSet + +structure FactorStage {X R Y : GlobularSet.{v}} (η : Hom X R) (f : Hom X Y) (n : ℕ) where + app : ∀ k, k ≤ n → R.Cell k → Y.Cell k + source_app : ∀ k (h : k+1 ≤ n) x, + app k (by omega) (R.source k x) = Y.source k (app (k+1) h x) + target_app : ∀ k (h : k+1 ≤ n) x, + app k (by omega) (R.target k x) = Y.target k (app (k+1) h x) + fac : ∀ k (h : k ≤ n) x, app k h (η.app k x) = f.app k x + +namespace FactorStage + +variable {X R Y : GlobularSet.{v}} {η : Hom X R} {f : Hom X Y} + +noncomputable def zero (h : Function.Bijective (η.app 0)) : FactorStage η f 0 where + app k hk x := by + have e : k = 0 := by omega + subst k + exact f.app 0 ((Equiv.ofBijective _ h).symm x) + source_app k hk := by omega + target_app k hk := by omega + fac k hk x := by + have e : k = 0 := by omega + subst k + exact congrArg (f.app 0) ((Equiv.ofBijective _ h).symm_apply_apply x) + +def nextBoundary {n : ℕ} (a : FactorStage η f n) (x : R.Cell (n+1)) : + Y.Boundary (n+1) := + ⟨(a.app n le_rfl (R.source n x), a.app n le_rfl (R.target n x)), by + cases n with + | zero => trivial + | succ n => + constructor + · rw [← a.source_app n le_rfl, ← a.source_app n le_rfl, R.source_source] + · rw [← a.target_app n le_rfl, ← a.target_app n le_rfl, R.target_source]⟩ + +def extend {n : ℕ} (a : FactorStage η f n) (z : R.Cell (n+1) → Y.Cell (n+1)) + (hs : ∀ x, a.app n le_rfl (R.source n x) = Y.source n (z x)) + (ht : ∀ x, a.app n le_rfl (R.target n x) = Y.target n (z x)) + (hf : ∀ x, z (η.app (n+1) x) = f.app (n+1) x) : FactorStage η f (n+1) where + app k hk x := if h : k ≤ n then a.app k h x else by + have e : k = n+1 := by omega + subst k + exact z x + source_app k hk x := by + dsimp only + split_ifs with h h' + · exact a.source_app k h' x + · have e : k = n := by omega + subst k + exact hs x + · omega + · omega + target_app k hk x := by + dsimp only + split_ifs with h h' + · exact a.target_app k h' x + · have e : k = n := by omega + subst k + exact ht x + · omega + · omega + fac k hk x := by + dsimp only + split_ifs with h + · exact a.fac k h x + · have e : k = n+1 := by omega + subst k + exact hf x + +@[simp] theorem extend_old {n : ℕ} (a : FactorStage η f n) (z hs ht hf) + (k : ℕ) (hk : k ≤ n) (x : R.Cell k) : + (a.extend z hs ht hf).app k (by omega) x = a.app k hk x := by + simp only [extend, dite_eq_left hk] + +theorem exists_extend {n q : ℕ} (a : FactorStage η f n) + (hη : ∀ k, k ≤ q → Function.Bijective (η.app k)) + (hY : ∀ j, q < j → Function.Bijective (Y.boundary j)) : + ∃ b : FactorStage η f (n+1), ∀ k (hk : k ≤ n) x, + b.app k (by omega) x = a.app k hk x := by + classical + by_cases hn : n+1 ≤ q + · let e := Equiv.ofBijective (η.app (n+1)) (hη _ hn) + let z (x : R.Cell (n+1)) := f.app (n+1) (e.symm x) + have hs x : a.app n le_rfl (R.source n x) = Y.source n (z x) := by + rw [show x = η.app (n+1) (e.symm x) from (e.apply_symm_apply x).symm, + ← η.source_app, a.fac, f.source_app] + exact congrArg (fun x => Y.source n (f.app (n+1) x)) (e.symm_apply_apply _).symm + have ht x : a.app n le_rfl (R.target n x) = Y.target n (z x) := by + rw [show x = η.app (n+1) (e.symm x) from (e.apply_symm_apply x).symm, + ← η.target_app, a.fac, f.target_app] + exact congrArg (fun x => Y.target n (f.app (n+1) x)) (e.symm_apply_apply _).symm + have hf x : z (η.app (n+1) x) = f.app (n+1) x := + congrArg (f.app (n+1)) (e.symm_apply_apply x) + exact ⟨a.extend z hs ht hf, fun k hk x => a.extend_old z hs ht hf k hk x⟩ + · let e := Equiv.ofBijective (Y.boundary (n+1)) (hY _ (by omega)) + let z (x : R.Cell (n+1)) := e.symm (a.nextBoundary x) + have hb x : Y.boundary (n+1) (z x) = a.nextBoundary x := e.apply_symm_apply _ + have hs x : a.app n le_rfl (R.source n x) = Y.source n (z x) := + (congrArg (fun b => b.1.1) (hb x)).symm + have ht x : a.app n le_rfl (R.target n x) = Y.target n (z x) := + (congrArg (fun b => b.1.2) (hb x)).symm + have hf x : z (η.app (n+1) x) = f.app (n+1) x := by + apply e.injective + change Y.boundary (n+1) (z _) = Y.boundary (n+1) _ + rw [hb, ← f.boundary_app] + apply Subtype.ext + apply Prod.ext + · change a.app n _ (R.source n (η.app (n+1) x)) = f.app n (X.source n x) + rw [← η.source_app, a.fac] + · change a.app n _ (R.target n (η.app (n+1) x)) = f.app n (X.target n x) + rw [← η.target_app, a.fac] + exact ⟨a.extend z hs ht hf, fun k hk x => a.extend_old z hs ht hf k hk x⟩ + +end FactorStage + +theorem existsUnique_factor_low_bijective {X R Y : GlobularSet.{v}} + (η : Hom X R) (f : Hom X Y) (q : ℕ) + (hη : ∀ k, k ≤ q → Function.Bijective (η.app k)) + (hY : ∀ j, q < j → Function.Bijective (Y.boundary j)) : + ∃! g : Hom R Y, η.comp g = f := by + classical + let a : (n : ℕ) → FactorStage η f n := fun n => Nat.rec + (FactorStage.zero (hη 0 (Nat.zero_le _))) + (fun _ a => (a.exists_extend hη hY).choose) n + have ha (n k : ℕ) (hk : k ≤ n) (x : R.Cell k) : + (a (n+1)).app k (by omega) x = (a n).app k hk x := + (FactorStage.exists_extend (a n) hη hY).choose_spec k hk x + let g : Hom R Y := + { app n := (a n).app n le_rfl + source_app n x := by + rw [← ha n n le_rfl] + exact (a (n+1)).source_app n le_rfl x + target_app n x := by + rw [← ha n n le_rfl] + exact (a (n+1)).target_app n le_rfl x } + have hg : η.comp g = f := by + ext n x + exact (a n).fac n le_rfl x + refine ⟨g, hg, ?_⟩ + intro g' hg' + ext n x + induction n with + | zero => + obtain ⟨y, rfl⟩ := (hη 0 (Nat.zero_le q)).2 x + exact (congrArg (fun h : Hom X Y => h.app 0 y) hg').trans + (congrArg (fun h : Hom X Y => h.app 0 y) hg).symm + | succ n ih => + by_cases hn : n+1 ≤ q + · obtain ⟨y, rfl⟩ := (hη (n+1) hn).2 x + exact (congrArg (fun h : Hom X Y => h.app (n+1) y) hg').trans + (congrArg (fun h : Hom X Y => h.app (n+1) y) hg).symm + · apply (hY (n+1) (by omega)).1 + apply Subtype.ext + apply Prod.ext + · exact (g'.source_app n x).symm.trans ((ih _).trans (g.source_app n x)) + · exact (g'.target_app n x).symm.trans ((ih _).trans (g.target_app n x)) + +end GlobularSet + +namespace TupleSystem + +noncomputable def evaluationIso (T : TupleSystem.{v}) : + T.presheaf ≅ T.globularPresheaf.tuples.presheaf := + NatIso.ofComponents + (fun S => (Equiv.ofBijective (T.evaluation.app S) (T.evaluation_bijective S.unop)).toIso) + (fun g => T.evaluation.naturality g) + +theorem hom_ext_globes {T U : TupleSystem.{v}} (f g : T.presheaf ⟶ U.presheaf) + (h : ∀ n, f.app (op (Shape.globe n)) = g.app (op (Shape.globe n))) : f = g := by + apply NatTrans.ext + funext S + apply ConcreteCategory.hom_ext + intro x + apply (U.evaluation_bijective S.unop).1 + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro z + change U.presheaf.map (S.unop.cellArrow k z.down).op (f.app S x) = + U.presheaf.map (S.unop.cellArrow k z.down).op (g.app S x) + have hf := ConcreteCategory.congr_hom (f.naturality (S.unop.cellArrow k z.down).op) x + have hg := ConcreteCategory.congr_hom (g.naturality (S.unop.cellArrow k z.down).op) x + change f.app (op (Shape.globe k.unop.dim)) _ = _ at hf + change g.app (op (Shape.globe k.unop.dim)) _ = _ at hg + rw [h] at hf + exact hf.symm.trans hg + +noncomputable def mapFromUnderlying {T U : TupleSystem.{v}} + (g : GlobularSet.Hom T.underlying U.underlying) : T.presheaf ⟶ U.presheaf := + T.evaluationIso.hom ≫ GlobularPresheaf.tuplesMap + (T.globularPresheaf.underlyingPresheafIso.inv ≫ g.presheafMap ≫ + U.globularPresheaf.underlyingPresheafIso.hom) ≫ U.evaluationIso.inv + +@[simp] theorem mapFromUnderlying_globe {T U : TupleSystem.{v}} + (g : GlobularSet.Hom T.underlying U.underlying) (n : ℕ) + (x : T.underlying.Cell n) : + (mapFromUnderlying g).app (op (Shape.globe n)) x = g.app n x := by + apply (U.evaluation_bijective_globe n).1 + change U.evaluationIso.hom.app (op (Shape.globe n)) + (U.evaluationIso.inv.app (op (Shape.globe n)) _) = _ + rw [Iso.inv_hom_id_app_apply] + apply U.globularPresheaf.tupleCellEquiv n |>.injective + have w := GlobularPresheaf.tupleCellEquiv_map + (T.globularPresheaf.underlyingPresheafIso.inv ≫ g.presheafMap ≫ + U.globularPresheaf.underlyingPresheafIso.hom) n (T.evaluation.app _ x) + apply w.trans + change g.app n (T.globularPresheaf.tupleCellEquiv n (T.evaluation.app _ x)) = + U.globularPresheaf.tupleCellEquiv n (U.evaluation.app _ (g.app n x)) + exact (congrArg (g.app n) (T.evaluation_globe n x)).trans + (U.evaluation_globe n (g.app n x)).symm + +end TupleSystem + +namespace GlobularTheory.Model + +theorem underlyingMap_injective {C : GlobularTheory.{v}} {X Y : C.Model} : + Function.Injective (@underlyingMap _ X Y) := by + intro f g h + have w : (show X.tuples.presheaf ⟶ Y.tuples.presheaf from + Functor.whiskerLeft C.toTheoryData.arity.op f) = + Functor.whiskerLeft C.toTheoryData.arity.op g := by + apply TupleSystem.hom_ext_globes + intro n + apply ConcreteCategory.hom_ext + intro x + exact congrArg (fun k : GlobularSet.Hom X.underlying Y.underlying => k.app n x) h + apply NatTrans.ext + funext S + exact congrArg (fun k => k.app (op S.unop.shape)) w + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Fillers.lean b/lean/OAI/CategoryTheory/Globular/Fillers.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b0a43d91412c70060b1007d0b0bfc3d2e4ce7fa --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Fillers.lean @@ -0,0 +1,307 @@ +import OAI.CategoryTheory.Globular.Spines + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularTheory.Model + +noncomputable def freeShapeMap (C : GlobularTheory.{v}) {S T : Shape} + (f : S ⟶ T) : freeShape C S ⟶ freeShape C T := + yoneda.map (C.toTheoryData.arity.map f) + +theorem freeShapeMap_low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {S T : Shape} (f : S ⟶ T) (q : ℕ) + (hf : ∀ k, k ≤ q → Function.Bijective (f.app (op (Globe.mk k)))) : + ∀ k, k ≤ q → Function.Bijective ((underlyingMap (freeShapeMap C f)).app k) := by + apply (coskeletalLocalMap_iff hC q (freeShapeMap C f)).mp + intro Z hZ g + have hb := TupleSystem.map_bijective_of_low (T := Z.tuples) f q hf hZ + obtain ⟨x, hx⟩ := hb.2 (yonedaEquiv g) + let h : freeShape C T ⟶ Z := yonedaEquiv.symm x + have hh : freeShapeMap C f ≫ h = g := by + apply yonedaEquiv.injective + have hv : yonedaEquiv h = x := Equiv.apply_symm_apply _ _ + exact (yonedaEquiv_naturality h (C.toTheoryData.arity.map f)).symm.trans + ((congrArg (Z.tuples.presheaf.map f.op) hv).trans hx) + refine ⟨h, hh, ?_⟩ + intro h' hh' + apply yonedaEquiv.injective + apply hb.1 + exact (yonedaEquiv_naturality h' (C.toTheoryData.arity.map f)).trans + ((congrArg yonedaEquiv hh').trans + ((congrArg yonedaEquiv hh).symm.trans + (yonedaEquiv_naturality h (C.toTheoryData.arity.map f)).symm)) + +end GlobularTheory.Model + +namespace GlobularSet + +def HasFillers (X : GlobularSet.{u}) : Prop := ∀ n, Function.Surjective (X.boundary n) + +theorem Hom.reflects_parallel_of_low {X Y : GlobularSet.{u}} (f : Hom X Y) + {n : ℕ} (hf : ∀ k, k < n → Function.Injective (f.app k)) + {a b : X.Cell n} (h : Y.Parallel n (f.app n a) (f.app n b)) : + X.Parallel n a b := by + cases n with + | zero => trivial + | succ n => + exact ⟨hf n (Nat.lt_succ_self n) (by rw [f.source_app, f.source_app]; exact h.1), + hf n (Nat.lt_succ_self n) (by rw [f.target_app, f.target_app]; exact h.2)⟩ + +theorem Hom.boundaryMap_bijective_of_low {X Y : GlobularSet.{u}} (f : Hom X Y) + (n : ℕ) (hf : ∀ k, k < n → Function.Bijective (f.app k)) : + Function.Bijective (f.boundaryMap n) := by + cases n with + | zero => + change Function.Bijective (fun _ : PUnit => (PUnit.unit : PUnit)) + exact ⟨fun _ _ _ => Subsingleton.elim _ _, fun _ => ⟨PUnit.unit, rfl⟩⟩ + | succ n => + constructor + · intro a b h + exact Subtype.ext (Prod.ext + ((hf n (Nat.lt_succ_self n)).1 (congrArg (fun b => b.1.1) h)) + ((hf n (Nat.lt_succ_self n)).1 (congrArg (fun b => b.1.2) h))) + · intro b + obtain ⟨x, hx⟩ := (hf n (Nat.lt_succ_self n)).2 b.1.1 + obtain ⟨y, hy⟩ := (hf n (Nat.lt_succ_self n)).2 b.1.2 + have hp : X.Parallel n x y := f.reflects_parallel_of_low + (fun k hk => (hf k (by omega)).1) (by rw [hx, hy]; exact b.2) + exact ⟨⟨(x, y), hp⟩, Subtype.ext (Prod.ext hx hy)⟩ + +theorem HasFillers.of_low_bijective {X Y : GlobularSet.{u}} + (hX : X.HasFillers) (f : Hom X Y) (q : ℕ) + (hf : ∀ k, k ≤ q → Function.Bijective (f.app k)) + (hY : ∀ j, q < j → Function.Surjective (Y.boundary j)) : Y.HasFillers := by + intro n + by_cases hn : n ≤ q + · intro b + obtain ⟨b', hb'⟩ := (f.boundaryMap_bijective_of_low n (fun k hk => hf k (by omega))).2 b + obtain ⟨x, hx⟩ := hX n b' + exact ⟨f.app n x, (f.boundary_app n x).symm.trans ((congrArg (f.boundaryMap n) hx).trans hb')⟩ + · exact hY n (by omega) + +end GlobularSet + +namespace GlobularTheory.Model + +theorem freeShape_joined (C : GlobularTheory.{v}) (hC : C.IsCoherator) (S : Shape) + (n : ℕ) (a b : (freeShape C S).underlying.Cell n) + (hp : (freeShape C S).underlying.Parallel n a b) : + (freeShape C S).underlying.Joined n a b := by + let P := S.2.spine n + let f : P.S ⟶ S := P.map + let i := underlyingMap (freeShapeMap C f) + have hi : ∀ k, k ≤ n → Function.Bijective (i.app k) := + freeShapeMap_low_bijective hC f n P.low_bijective + obtain ⟨a', ha⟩ := (hi n le_rfl).2 a + obtain ⟨b', hb⟩ := (hi n le_rfl).2 b + have hp' : (freeShape C P.S).underlying.Parallel n a' b' := + i.reflects_parallel_of_low (fun k hk => (hi k (by omega)).1) (by rw [ha, hb]; exact hp) + have hp'' : C.Parallel n a' b' := by + cases n <;> exact hp' + let pair : C.AdmissiblePair := ⟨n, P.S, P.height_le, a', b', hp''⟩ + obtain ⟨z, hs, ht⟩ := hC.2 pair + have hz : (freeShape C P.S).underlying.Joined n a' b' := ⟨z, hs, ht⟩ + have hz' := i.map_joined hz + rw [ha, hb] at hz' + exact hz' + +theorem freeShape_hasFillers (C : GlobularTheory.{v}) (hC : C.IsCoherator) (S : Shape) : + (freeShape C S).underlying.HasFillers := by + intro n + cases n with + | zero => + intro b + let f : Shape.globe 0 ⟶ S := + show GlobularPresheaf.disk 0 ⟶ S.realize from + GlobularPresheaf.faceLE (Nat.zero_le S.1) false ≫ S.last + refine ⟨C.base f, ?_⟩ + change PUnit.unit = b + exact Subsingleton.elim _ _ + | succ n => + intro b + obtain ⟨z, hs, ht⟩ := freeShape_joined C hC S n b.1.1 b.1.2 b.2 + exact ⟨z, Subtype.ext (Prod.ext hs ht)⟩ + +theorem cutoff_freeShape_hasFillers (C : GlobularTheory.{v}) (hC : C.IsCoherator) + (S : Shape) (q : ℕ) : + (chosenCutoff hC q (freeShape C S)).underlying.HasFillers := + (freeShape_hasFillers C hC S).of_low_bijective + (underlyingMap (cutoffUnit hC q (freeShape C S))) q + (cutoffUnit_low_bijective hC q _) + (fun j hj => (chosenCutoff_coskeletal hC q _ j hj).2) + +end GlobularTheory.Model + +end Grothendieck + +namespace Grothendieck.GlobularTheory.Model + +open CategoryTheory CategoryTheory.Limits Opposite + +def presheafFunctor (C : GlobularTheory.{v}) : C.Model ⥤ (C.Objᵒᵖ ⥤ Type v) where + obj X := X.presheaf + map f := f + +noncomputable def forgetGlobular (C : GlobularTheory.{v}) : C.Model ⥤ GlobularPresheaf.{v} := + presheafFunctor C ⋙ (Functor.whiskeringLeft Globeᵒᵖ C.Objᵒᵖ (Type v)).obj C.globes.op + +@[instance_reducible] noncomputable def presheafReflection (C : GlobularTheory.{v}) : + Reflective C.sumComparisons.isLocal.ι := by + let := C.sumComparisons_rightAdjoint + exact ⟨_, Adjunction.ofIsRightAdjoint C.sumComparisons.isLocal.ι⟩ + +noncomputable def freePresheaf (C : GlobularTheory.{v}) : + (C.Objᵒᵖ ⥤ Type v) ⥤ C.Model := by + let := presheafReflection C + exact reflector C.sumComparisons.isLocal.ι ⋙ fromLocal C + +noncomputable def presheafAdjunction (C : GlobularTheory.{v}) : + freePresheaf C ⊣ presheafFunctor C := by + let := presheafReflection C + exact ((reflectorAdjunction C.sumComparisons.isLocal.ι).comp + (localEquivalence C).symm.toAdjunction) + +noncomputable def freeGlobular (C : GlobularTheory.{v}) : GlobularPresheaf.{v} ⥤ C.Model := + C.globes.op.lan ⋙ freePresheaf C + +noncomputable def globularAdjunction (C : GlobularTheory.{v}) : + freeGlobular C ⊣ forgetGlobular C := + (C.globes.op.lanAdjunction (Type v)).comp (presheafAdjunction C) + +instance freeGlobular_preservesColimits (C : GlobularTheory.{v}) : + PreservesColimitsOfSize.{v,v} (freeGlobular C) := + (globularAdjunction C).leftAdjoint_preservesColimits + +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularTheory + +noncomputable def composition (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.Hom (Shape.globe (n+1)) (compositionShape n) := + (hC.2 (C.compositionPair n)).choose + +theorem composition_source (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.source n)) (C.composition hC n) = + C.base (Shape.source n ≫ compositionLeft n) := + (hC.2 (C.compositionPair n)).choose_spec.1 + +theorem composition_target (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.target n)) (C.composition hC n) = + C.base (Shape.target n ≫ compositionRight n) := + (hC.2 (C.compositionPair n)).choose_spec.2 + +noncomputable def inverse (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.Hom (Shape.globe (n+1)) (Shape.globe (n+1)) := + (hC.2 (C.inversePair n)).choose + +theorem inverse_source (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.source n)) (C.inverse hC n) = C.base (Shape.target n) := + (hC.2 (C.inversePair n)).choose_spec.1 + +theorem inverse_target (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.comp (C.base (Shape.target n)) (C.inverse hC n) = C.base (Shape.source n) := + (hC.2 (C.inversePair n)).choose_spec.2 + +namespace Model + +theorem map_eval {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + {S T : Shape} (a : C.Hom S T) (t : X.presheaf.obj (op (⟨T⟩ : C.Obj))) : + f.app (op (⟨S⟩ : C.Obj)) (X.eval a t) = + Y.eval a (f.app (op (⟨T⟩ : C.Obj)) t) := + (ConcreteCategory.congr_hom (f.naturality + (show (op (⟨T⟩ : C.Obj)) ⟶ op ⟨S⟩ from Quiver.Hom.op a)) t) + +noncomputable def sumTuple {C : GlobularTheory.{v}} (X : C.Model) + (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) + (a : X.presheaf.obj (op (⟨S⟩ : C.Obj))) (d : X.underlying.Cell h) + (w : X.eval (C.base (S.seam hl)) a = X.eval (C.base (Shape.face hr false)) d) : + X.presheaf.obj (op (⟨S.attach b h hl hr⟩ : C.Obj)) := + (Types.exists_of_isPullback (X.sums S b h hl hr) a d w).choose + +@[simp] theorem sumTuple_left {C : GlobularTheory.{v}} (X : C.Model) + (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) + (a : X.presheaf.obj (op (⟨S⟩ : C.Obj))) (d : X.underlying.Cell h) + (w : X.eval (C.base (S.seam hl)) a = X.eval (C.base (Shape.face hr false)) d) : + X.eval (C.base (S.inl b h hl hr)) (X.sumTuple S b h hl hr a d w) = a := + (Types.exists_of_isPullback (X.sums S b h hl hr) a d w).choose_spec.1 + +@[simp] theorem sumTuple_right {C : GlobularTheory.{v}} (X : C.Model) + (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) + (a : X.presheaf.obj (op (⟨S⟩ : C.Obj))) (d : X.underlying.Cell h) + (w : X.eval (C.base (S.seam hl)) a = X.eval (C.base (Shape.face hr false)) d) : + X.eval (C.base (S.inr b h hl hr)) (X.sumTuple S b h hl hr a d w) = d := + (Types.exists_of_isPullback (X.sums S b h hl hr) a d w).choose_spec.2 + +noncomputable def compositionTuple {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.presheaf.obj (op (⟨compositionShape n⟩ : C.Obj)) := + X.sumTuple (Shape.globe (n+1)) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + a b (by rw [Shape.globe_seam]; exact hab) + +@[simp] theorem compositionTuple_left {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.eval (C.base (compositionLeft n)) (X.compositionTuple n a b hab) = a := + X.sumTuple_left _ _ _ _ _ _ _ _ + +@[simp] theorem compositionTuple_right {C : GlobularTheory.{v}} (X : C.Model) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.eval (C.base (compositionRight n)) (X.compositionTuple n a b hab) = b := + X.sumTuple_right _ _ _ _ _ _ _ _ + +noncomputable def compCell {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.underlying.Cell (n+1) := X.eval (C.composition hC n) (X.compositionTuple n a b hab) + +@[simp] theorem compCell_source {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.underlying.source n (X.compCell hC n a b hab) = X.underlying.source n a := by + change X.eval (C.base (Shape.source n)) (X.eval _ _) = _ + rw [← eval_comp, composition_source, C.base_comp, eval_comp, compositionTuple_left] + rfl + +@[simp] theorem compCell_target {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) (n : ℕ) + (a b : X.underlying.Cell (n+1)) (hab : X.underlying.target n a = X.underlying.source n b) : + X.underlying.target n (X.compCell hC n a b hab) = X.underlying.target n b := by + change X.eval (C.base (Shape.target n)) (X.eval _ _) = _ + rw [← eval_comp, composition_target, C.base_comp, eval_comp, compositionTuple_right] + rfl + +noncomputable def inverseCell {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) (n : ℕ) + (a : X.underlying.Cell (n+1)) : X.underlying.Cell (n+1) := X.eval (C.inverse hC n) a + +@[simp] theorem inverseCell_source {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.source n (X.inverseCell hC n a) = X.underlying.target n a := by + change X.presheaf.obj (op (⟨Shape.globe (n+1)⟩ : C.Obj)) at a + change X.eval (C.base (Shape.source n)) (X.eval _ a) = _ + rw [← eval_comp, inverse_source] + rfl + +@[simp] theorem inverseCell_target {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.target n (X.inverseCell hC n a) = X.underlying.source n a := by + change X.presheaf.obj (op (⟨Shape.globe (n+1)⟩ : C.Obj)) at a + change X.eval (C.base (Shape.target n)) (X.eval _ a) = _ + rw [← eval_comp, inverse_target] + rfl + +theorem map_inverseCell {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (n : ℕ) (a : X.underlying.Cell (n+1)) : + (underlyingMap f).app (n+1) (X.inverseCell hC n a) = + Y.inverseCell hC n ((underlyingMap f).app (n+1) a) := + map_eval f (C.inverse hC n) a + +end Model +end GlobularTheory +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/FrameJoint.lean b/lean/OAI/CategoryTheory/Globular/FrameJoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..72312d752deb3aa16ab1696987fba632b1c28d39 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/FrameJoint.lean @@ -0,0 +1,122 @@ +import OAI.CategoryTheory.Globular.FullCylinder + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasPushouts K] +variable {D B : GlobularFrame K} (e : Bool → Hom D B) + +noncomputable abbrev twoEnded (j : ℕ) := TwoEndpoints.obj (D.inc j) (fun ε => (e ε).bd j) +noncomputable def twoEndedMap (j : ℕ) : twoEnded e j ⟶ B.obj j := + TwoEndpoints.desc (D.inc j) (fun ε => (e ε).bd j) (B.inc j) (fun ε => (e ε).obj j) + (fun ε => (e ε).inc j) + +theorem twoEnded_lift {X Y : K} (p : X ⟶ Y) (j : ℕ) + (h : HasLiftingProperty (twoEndedMap e j) p) + (a : B.bd j ⟶ X) (d : Bool → (D.obj j ⟶ X)) + (hd : ∀ ε, (e ε).bd j ≫ a = D.inc j ≫ d ε) + (y : B.obj j ⟶ Y) (ha : a ≫ p = B.inc j ≫ y) + (hy : ∀ ε, d ε ≫ p = (e ε).obj j ≫ y) : + ∃ l : B.obj j ⟶ X, B.inc j ≫ l = a ∧ (∀ ε, (e ε).obj j ≫ l = d ε) ∧ l ≫ p = y := by + let t := TwoEndpoints.desc (D.inc j) (fun ε => (e ε).bd j) a d hd + have sq : CommSq t (twoEndedMap e j) p y := by + constructor + apply TwoEndpoints.hom_ext + · erw [← Category.assoc, TwoEndpoints.base_desc] + erw [← Category.assoc, TwoEndpoints.base_desc] + exact ha + · intro ε + erw [← Category.assoc, TwoEndpoints.endpoint_desc] + erw [← Category.assoc, TwoEndpoints.endpoint_desc] + exact hy ε + let : sq.HasLift := h.sq_hasLift sq + refine ⟨sq.lift, ?_, ?_, sq.fac_right⟩ + · have hh := congrArg (TwoEndpoints.base (D.inc j) (fun ε => (e ε).bd j) ≫ ·) sq.fac_left + erw [← Category.assoc, TwoEndpoints.base_desc, TwoEndpoints.base_desc] at hh + exact hh + · intro ε + have hh := congrArg (TwoEndpoints.endpoint (D.inc j) (fun ε => (e ε).bd j) ε ≫ ·) sq.fac_left + erw [← Category.assoc, TwoEndpoints.endpoint_desc, TwoEndpoints.endpoint_desc] at hh + exact hh + +noncomputable abbrev jointSource (k : ℕ) := + TwoEndpoints.obj (D.diagram.source k) (fun ε => (e ε).obj k) +noncomputable def jointSourceMap (k : ℕ) : jointSource e k ⟶ B.obj (k+1) := + TwoEndpoints.desc (D.diagram.source k) (fun ε => (e ε).obj k) + (B.diagram.source k) (fun ε => (e ε).obj (k+1)) + (fun ε => ((e ε).source_naturality k).symm) + +omit [HasPushouts K] in +@[reassoc] theorem inc_source_eq_inc_target (B : GlobularFrame K) (k : ℕ) : + B.inc k ≫ B.diagram.source k = B.inc k ≫ B.diagram.target k := by + change B.inc k ≫ B.left k ≫ B.inc (k+1) = B.inc k ≫ B.right k ≫ B.inc (k+1) + rw [← Category.assoc, (B.square k).w, Category.assoc] + +theorem jointSource_lifting {X Y : K} (p : X ⟶ Y) (k : ℕ) + (h₀ : HasLiftingProperty (twoEndedMap e k) p) + (h₁ : HasLiftingProperty (twoEndedMap e (k+1)) p) : + HasLiftingProperty (jointSourceMap e k) p := by + constructor + intro a y sq + let u := TwoEndpoints.base (D.diagram.source k) (fun ε => (e ε).obj k) ≫ a + let d (ε) := TwoEndpoints.endpoint (D.diagram.source k) (fun ε => (e ε).obj k) ε ≫ a + have hd (ε) : (e ε).obj k ≫ u = D.diagram.source k ≫ d ε := by + dsimp only [u,d] + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ a) (TwoEndpoints.condition (D.diagram.source k) + (fun ε => (e ε).obj k) ε)).trans (Category.assoc _ _ _)) + have hu : u ≫ p = B.diagram.source k ≫ y := by + have h := congrArg (TwoEndpoints.base (D.diagram.source k) (fun ε => (e ε).obj k) ≫ ·) sq.w + erw [← Category.assoc _ (jointSourceMap e k), TwoEndpoints.base_desc] at h + exact (Category.assoc _ _ _).trans h + have hyp (ε) : d ε ≫ p = (e ε).obj (k+1) ≫ y := by + have h := congrArg (TwoEndpoints.endpoint (D.diagram.source k) (fun ε => (e ε).obj k) ε ≫ ·) sq.w + erw [← Category.assoc _ (jointSourceMap e k), TwoEndpoints.endpoint_desc] at h + exact (Category.assoc _ _ _).trans h + have hbd (ε) : (e ε).bd k ≫ (B.inc k ≫ u) = D.inc k ≫ (D.diagram.target k ≫ d ε) := by + erw [← Category.assoc, (e ε).inc, Category.assoc] + exact (congrArg (D.inc k ≫ ·) (hd ε)).trans + ((Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ d ε) (inc_source_eq_inc_target D k)).trans (Category.assoc _ _ _))) + have hbyp : (B.inc k ≫ u) ≫ p = B.inc k ≫ B.diagram.target k ≫ y := by + erw [Category.assoc, hu] + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ y) (inc_source_eq_inc_target B k)).trans (Category.assoc _ _ _)) + have hdy (ε) : (D.diagram.target k ≫ d ε) ≫ p = (e ε).obj k ≫ B.diagram.target k ≫ y := by + erw [Category.assoc, hyp] + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ y) ((e ε).target_naturality k)).trans (Category.assoc _ _ _)) + obtain ⟨v,hv,he,hvp⟩ := twoEnded_lift e p k h₀ (B.inc k ≫ u) + (fun ε => D.diagram.target k ≫ d ε) hbd (B.diagram.target k ≫ y) hbyp hdy + let b := (B.square k).desc u v hv.symm + have hbe (ε) : (e ε).bd (k+1) ≫ b = D.inc (k+1) ≫ d ε := by + apply (D.square k).hom_ext + · rw [← Category.assoc, (e ε).left, Category.assoc, IsPushout.inl_desc] + exact (hd ε).trans (Category.assoc _ _ _) + · rw [← Category.assoc, (e ε).right, Category.assoc, IsPushout.inr_desc] + exact (he ε).trans (Category.assoc _ _ _) + have hbp : b ≫ p = B.inc (k+1) ≫ y := by + apply (B.square k).hom_ext + · rw [← Category.assoc, IsPushout.inl_desc] + exact hu.trans (Category.assoc _ _ _) + · rw [← Category.assoc, IsPushout.inr_desc] + exact hvp.trans (Category.assoc _ _ _) + obtain ⟨l,hl,hel,hlp⟩ := twoEnded_lift e p (k+1) h₁ b d hbe y hbp hyp + refine CommSq.HasLift.mk' ⟨l, ?_, hlp⟩ + apply TwoEndpoints.hom_ext + · erw [← Category.assoc, TwoEndpoints.base_desc] + change (B.left k ≫ B.inc (k+1)) ≫ l = u + rw [Category.assoc, hl] + exact (B.square k).inl_desc _ _ _ + · intro ε + erw [← Category.assoc, TwoEndpoints.endpoint_desc] + exact hel ε + +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/FrameMaps.lean b/lean/OAI/CategoryTheory/Globular/FrameMaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..e79ca37c8f5ee683a764191b359b891e9de9f5ce --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/FrameMaps.lean @@ -0,0 +1,102 @@ +import OAI.CategoryTheory.Globular.CylinderShapes + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasColimitsOfSize.{0,v} K] + +@[reassoc] theorem cell_naturality (B : GlobularFrame K) {S T : GlobularPresheaf.{v}} + (f : S ⟶ T) (k : ℕ) (x : S.underlying.Cell k) : + B.cell S k x ≫ B.realization.map f = B.cell T k (f.app (op (Globe.mk k)) x) := by + unfold cell CoGlobularObject.cell + erw [Category.assoc, ← Functor.map_comp] + congr 2 + apply uliftYonedaEquiv.injective + erw [uliftYonedaEquiv_comp, Equiv.apply_symm_apply, Equiv.apply_symm_apply] + +namespace Hom +variable {D B : GlobularFrame K} +noncomputable def realization (e : Hom D B) : D.realization ⟶ B.realization where + app S := D.desc ((B.cellMap S).comp (e.pre _)) + naturality S T f := by + apply D.hom_ext + intro k x + erw [cell_naturality_assoc, D.cell_desc] + erw [← Category.assoc, D.cell_desc] + change e.obj k ≫ B.cell T k (f.app _ x) = (e.obj k ≫ B.cell S k x) ≫ B.realization.map f + rw [Category.assoc, cell_naturality] + +@[reassoc (attr := simp)] theorem cell_realization (e : Hom D B) (S : GlobularPresheaf.{v}) + (k : ℕ) (x : S.underlying.Cell k) : + D.cell S k x ≫ e.realization.app S = e.obj k ≫ B.cell S k x := D.cell_desc _ _ _ + +end Hom + +noncomputable abbrev shapeRealization (B : GlobularFrame K) : Shape ⥤ K := + Shape.liftedRealization ⋙ B.realization +noncomputable def shapeGlobeIso (B : GlobularFrame K) (j : ℕ) : + B.shapeRealization.obj (Shape.globe j) ≅ B.obj j := + B.realization.mapIso (GlobularPresheaf.liftSmallDiskIso j) ≪≫ B.diagram.globeIso j + +noncomputable abbrev Hom.shapeEndpoint {D B : GlobularFrame K} (e : Hom D B) : + D.shapeRealization ⟶ B.shapeRealization := Functor.whiskerLeft Shape.liftedRealization e.realization + +@[reassoc] theorem shapeGlobeIso_cell (B : GlobularFrame K) (j : ℕ) : + B.cell (Shape.liftedRealization.obj (Shape.globe j)) j (ULift.up (ULift.up (𝟙 (Globe.mk j)))) ≫ + (B.shapeGlobeIso j).hom = 𝟙 _ := by + dsimp only [shapeGlobeIso, Iso.trans_hom, Functor.mapIso_hom] + erw [cell_naturality_assoc] + change B.diagram.cell (GlobularPresheaf.disk j) j (ULift.up (𝟙 (Globe.mk j))) ≫ _ = _ + unfold CoGlobularObject.cell + have h : (uliftYonedaEquiv.symm (ULift.up (𝟙 (Globe.mk j))) : GlobularPresheaf.disk.{v} j ⟶ _) = 𝟙 _ := by + apply uliftYonedaEquiv.injective + rfl + erw [h] + erw [B.diagram.realization.map_id (GlobularPresheaf.disk.{v} j), Category.comp_id, Iso.inv_hom_id] + rfl + +theorem shapeGlobeIso_inv_cell (B : GlobularFrame K) (j : ℕ) : + (B.shapeGlobeIso j).inv = B.cell (Shape.liftedRealization.obj (Shape.globe j)) j + (ULift.up (ULift.up (𝟙 (Globe.mk j)))) := by + apply (cancel_mono (B.shapeGlobeIso j).hom).1 + rw [Iso.inv_hom_id, shapeGlobeIso_cell] + +@[reassoc] theorem shapeEndpoint_globe {D B : GlobularFrame K} (e : Hom D B) (j : ℕ) : + (D.shapeGlobeIso j).inv ≫ e.shapeEndpoint.app (Shape.globe j) ≫ (B.shapeGlobeIso j).hom = e.obj j := by + rw [shapeGlobeIso_inv_cell] + calc + _ = (e.obj j ≫ B.cell (Shape.liftedRealization.obj (Shape.globe j)) j + (ULift.up (ULift.up (𝟙 (Globe.mk j))))) ≫ (B.shapeGlobeIso j).hom := by + erw [← Category.assoc, Hom.cell_realization] + _ = e.obj j ≫ (B.cell (Shape.liftedRealization.obj (Shape.globe j)) j + (ULift.up (ULift.up (𝟙 (Globe.mk j)))) ≫ (B.shapeGlobeIso j).hom) := Category.assoc _ _ _ + _ = e.obj j ≫ 𝟙 _ := congrArg (e.obj j ≫ ·) (B.shapeGlobeIso_cell j) + _ = e.obj j := Category.comp_id _ + +@[reassoc] theorem shapeGlobeIso_face (B : GlobularFrame K) {j k : ℕ} (h : j < k) (ε : Bool) : + B.shapeRealization.map (Shape.face h ε) ≫ + (B.shapeGlobeIso k).hom = (B.shapeGlobeIso j).hom ≫ B.diagram.face h ε := by + apply (cancel_epi (B.shapeGlobeIso j).inv).1 + erw [Iso.inv_hom_id_assoc] + rw [shapeGlobeIso_inv_cell] + erw [cell_naturality_assoc] + have h' := B.cell_face (Shape.liftedRealization.obj (Shape.globe k)) (Globe.face h ε) + (ULift.up (ULift.up (𝟙 (Globe.mk k)))) + change B.diagram.face h ε ≫ B.cell (Shape.liftedRealization.obj (Shape.globe k)) k + (ULift.up (ULift.up (𝟙 (Globe.mk k)))) = + B.cell (Shape.liftedRealization.obj (Shape.globe k)) j + (ULift.up (ULift.up (Globe.face h ε))) at h' + change B.cell (Shape.liftedRealization.obj (Shape.globe k)) j + (ULift.up (ULift.up (Globe.face h ε))) ≫ (B.shapeGlobeIso k).hom = _ + rw [← h'] + exact (Category.assoc _ _ _).trans ((congrArg (B.diagram.face h ε ≫ ·) + (B.shapeGlobeIso_cell k)).trans (Category.comp_id _)) + +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/FrameOperations.lean b/lean/OAI/CategoryTheory/Globular/FrameOperations.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b76fb7e51e7d6f8d7d1713e7744d0f724b9b5cd --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/FrameOperations.lean @@ -0,0 +1,69 @@ +import OAI.CategoryTheory.Globular.CylinderExtension + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] [HasColimitsOfSize.{0,v} K] + +@[reassoc] theorem shapeGlobeIso_source (B : GlobularFrame K) (j : ℕ) : + B.shapeRealization.map (Shape.source j) ≫ (B.shapeGlobeIso (j+1)).hom = + (B.shapeGlobeIso j).hom ≫ B.diagram.source j := by + simpa only [Shape.source, CoGlobularObject.face_succ, CoGlobularObject.adjacent, Bool.false_eq_true, ↓reduceIte] + using B.shapeGlobeIso_face (Nat.lt_succ_self j) false + +@[reassoc] theorem shapeGlobeIso_target (B : GlobularFrame K) (j : ℕ) : + B.shapeRealization.map (Shape.target j) ≫ (B.shapeGlobeIso (j+1)).hom = + (B.shapeGlobeIso j).hom ≫ B.diagram.target j := by + simpa only [Shape.target, CoGlobularObject.face_succ, CoGlobularObject.adjacent, ↓reduceIte] + using B.shapeGlobeIso_face (Nat.lt_succ_self j) true + +@[reassoc] theorem shapeGlobeIso_source_inv (B : GlobularFrame K) (j : ℕ) : + B.diagram.source j ≫ (B.shapeGlobeIso (j+1)).inv = + (B.shapeGlobeIso j).inv ≫ B.shapeRealization.map (Shape.source j) := by + apply (cancel_mono (B.shapeGlobeIso (j+1)).hom).1 + erw [Category.assoc, Iso.inv_hom_id, Category.comp_id, Category.assoc, + shapeGlobeIso_source, Iso.inv_hom_id_assoc] + +@[reassoc] theorem shapeGlobeIso_target_inv (B : GlobularFrame K) (j : ℕ) : + B.diagram.target j ≫ (B.shapeGlobeIso (j+1)).inv = + (B.shapeGlobeIso j).inv ≫ B.shapeRealization.map (Shape.target j) := by + apply (cancel_mono (B.shapeGlobeIso (j+1)).hom).1 + erw [Category.assoc, Iso.inv_hom_id, Category.comp_id, Category.assoc, + shapeGlobeIso_target, Iso.inv_hom_id_assoc] + +end GlobularFrame +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsOperations : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) + +@[reassoc] theorem cylinderShapeEndpoint_globe_inv (ε : Bool) (j : ℕ) : + (cylinderEndpoint hC q n ε).obj j ≫ ((cylinderFrame hC q n).shapeGlobeIso j).inv = + (cylinderShapeEndpoint hC q n ε).app (Shape.globe j) := by + apply (cancel_mono ((cylinderFrame hC q n).shapeGlobeIso j).hom).1 + erw [Category.assoc, Iso.inv_hom_id, Category.comp_id] + exact (cylinderShapeEndpoint_globe hC q n ε j).symm + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] in +@[simp] theorem cutoffRepresentables_source (j : ℕ) : + (cutoffRepresentables hC q).map (C.base (Shape.source j)) = + (cutoffDiskFrame hC q).diagram.source j := by + rw [cutoffDiskFrame_source] + rfl + +omit [HasColimitsOfSize.{v,v} (CutoffModels C q)] in +@[simp] theorem cutoffRepresentables_target (j : ℕ) : + (cutoffRepresentables hC q).map (C.base (Shape.target j)) = + (cutoffDiskFrame hC q).diagram.target j := by + rw [cutoffDiskFrame_target] + rfl + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/FrameRealization.lean b/lean/OAI/CategoryTheory/Globular/FrameRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..b462df088821fc08fe8bc9a76b67c5caa2c3207f --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/FrameRealization.lean @@ -0,0 +1,107 @@ +import OAI.CategoryTheory.Globular.CylinderObjects + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] (B : GlobularFrame K) + +theorem homGlob_faceMap (Y : K) {j k : ℕ} (h : j < k) (ε : Bool) + (a : B.obj k ⟶ Y) : (B.homGlob Y).faceMap h ε a = B.diagram.face h ε ≫ a := by + induction k, h using Nat.le_induction with + | base => + rw [GlobularSet.faceMap_succ, CoGlobularObject.face_succ] + cases ε <;> rfl + | succ k h ih => + erw [(B.homGlob Y).faceMap_source h ε, ih, + ← B.diagram.face_adjacent h ε false] + exact (Category.assoc _ _ _).symm + +theorem homGlob_eval (Y : K) {j k : ℕ} (f : Globe.Face j k) (a : B.obj k ⟶ Y) : + (B.homGlob Y).evalFace f a = B.diagram.eval f ≫ a := by + cases f with + | id => exact (Category.id_comp a).symm + | face h ε => exact B.homGlob_faceMap Y h ε a + +noncomputable def homGlobPresheafIso (Y : K) : + (B.homGlob Y).presheaf ≅ (Presheaf.restrictedULiftYoneda.{v} B.diagram.functor).obj Y := + NatIso.ofComponents (fun _ => Equiv.toIso Equiv.ulift.symm) (by + intro j k f + apply ConcreteCategory.hom_ext + intro a + change ULift.up ((B.homGlob Y).evalFace f.unop a) = ULift.up (B.diagram.eval f.unop ≫ a) + exact congrArg ULift.up (B.homGlob_eval Y f.unop a)) + +variable [HasColimitsOfSize.{0,v} K] +noncomputable abbrev realization : GlobularPresheaf.{v} ⥤ K := B.diagram.realization +noncomputable abbrev cell (S : GlobularPresheaf.{v}) (k : ℕ) (x : S.underlying.Cell k) : + B.obj k ⟶ B.realization.obj S := B.diagram.cell S k x + +noncomputable def desc {S : GlobularPresheaf.{v}} {Y : K} + (f : GlobularSet.Hom S.underlying (B.homGlob Y)) : B.realization.obj S ⟶ Y := + (B.diagram.homEquiv S Y).symm + (S.underlyingPresheafIso.inv ≫ f.presheafMap ≫ (B.homGlobPresheafIso Y).hom) + +@[reassoc (attr := simp)] theorem cell_desc {S : GlobularPresheaf.{v}} {Y : K} + (f : GlobularSet.Hom S.underlying (B.homGlob Y)) (k : ℕ) (x : S.underlying.Cell k) : + B.cell S k x ≫ B.desc f = f.app k x := by + have e := (B.diagram.homEquiv S Y).apply_symm_apply + (S.underlyingPresheafIso.inv ≫ f.presheafMap ≫ (B.homGlobPresheafIso Y).hom) + have h := congrArg (fun t : S ⟶ (Presheaf.restrictedULiftYoneda.{v} B.diagram.functor).obj Y => + t.app (op (Globe.mk k)) x) e + erw [CoGlobularObject.homEquiv_app] at h + exact congrArg ULift.down h + +@[reassoc] theorem cell_face (S : GlobularPresheaf.{v}) {j k : ℕ} (f : Globe.Face j k) + (x : S.underlying.Cell k) : + B.diagram.eval f ≫ B.cell S k x = B.cell S j (S.map (show Globe.mk j ⟶ Globe.mk k from f).op x) := by + have e := B.diagram.globeIso_naturality f + have e' : B.diagram.eval f ≫ (B.diagram.globeIso k).inv = + (B.diagram.globeIso j).inv ≫ B.realization.map (uliftYoneda.map f) := by + rw [← Iso.inv_hom_id_assoc (B.diagram.globeIso j) (B.diagram.eval f), ← e] + erw [Category.assoc, Category.assoc, Iso.hom_inv_id, Category.comp_id] + rfl + unfold cell CoGlobularObject.cell + erw [← Category.assoc, e', Category.assoc, ← Functor.map_comp] + congr 2 + exact (uliftYonedaEquiv_symm_map (show Globe.mk j ⟶ Globe.mk k from f).op x).symm + +noncomputable def cellMap (S : GlobularPresheaf.{v}) : + GlobularSet.Hom S.underlying (B.homGlob (B.realization.obj S)) where + app := B.cell S + source_app k x := by + change B.cell S k (S.map (Globe.source k).op x) = B.diagram.source k ≫ B.cell S (k+1) x + simpa only [CoGlobularObject.eval, Globe.source, Globe.face, CoGlobularObject.face_succ, + CoGlobularObject.adjacent, Bool.false_eq_true, ite_false, diagram] using + (B.cell_face S (Globe.source k) x).symm + target_app k x := by + change B.cell S k (S.map (Globe.target k).op x) = B.diagram.target k ≫ B.cell S (k+1) x + simpa only [CoGlobularObject.eval, Globe.target, Globe.face, CoGlobularObject.face_succ, + CoGlobularObject.adjacent, ite_true, diagram] using + (B.cell_face S (Globe.target k) x).symm + +noncomputable def realizeHom {S : GlobularPresheaf.{v}} {Y : K} + (f : B.realization.obj S ⟶ Y) : GlobularSet.Hom S.underlying (B.homGlob Y) := + (B.cellMap S).comp (post f) + +theorem hom_ext {S : GlobularPresheaf.{v}} {Y : K} {f g : B.realization.obj S ⟶ Y} + (h : ∀ k x, B.cell S k x ≫ f = B.cell S k x ≫ g) : f = g := B.diagram.hom_ext h + +@[simp] theorem realizeHom_desc {S : GlobularPresheaf.{v}} {Y : K} + (f : GlobularSet.Hom S.underlying (B.homGlob Y)) : B.realizeHom (B.desc f) = f := by + ext k x + exact B.cell_desc f k x + +@[simp] theorem desc_realizeHom {S : GlobularPresheaf.{v}} {Y : K} + (f : B.realization.obj S ⟶ Y) : B.desc (B.realizeHom f) = f := by + apply B.hom_ext + intro k x + exact B.cell_desc (B.realizeHom f) k x + +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/FullCylinder.lean b/lean/OAI/CategoryTheory/Globular/FullCylinder.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e09751cd2243ecca8b769440e98935c7acdeb61 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/FullCylinder.lean @@ -0,0 +1,135 @@ +import OAI.CategoryTheory.Globular.CylinderInterpretation + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +local instance smallColimitsFullCylinder : HasColimitsOfSize.{0,v} (CutoffModels C q) := + hasColimitsOfSizeShrink.{0,v} (CutoffModels C q) +variable (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + +noncomputable def cylinderRealization : C.Obj ⥤ CutoffModels C q where + obj S := (cylinderFrame hC q n).shapeRealization.obj S.shape + map f := ((cylinderInterpretation hC q n hnq H).map f).cylinder + map_id S := congrArg RepresentedHom.cylinder ((cylinderInterpretation hC q n hnq H).map_id S.shape) + map_comp f g := congrArg RepresentedHom.cylinder ((cylinderInterpretation hC q n hnq H).map_comp f g) + +@[simp] theorem cylinderRealization_base {S T : Shape} (f : S ⟶ T) : + (cylinderRealization hC q n hnq H).map (C.base f) = + (cylinderFrame hC q n).shapeRealization.map f := + congrArg RepresentedHom.cylinder ((cylinderInterpretation hC q n hnq H).map_base f) + +theorem cylinderInterpretation_original {S T : Shape} (f : C.Hom S T) : + ((cylinderInterpretation hC q n hnq H).map f).original = f := + congrArg (fun z : Morphism C C => z.map f) (cylinderInterpretation_projection hC q n hnq H) + +noncomputable def fullCylinder (Y : CutoffModels C q) : C.Model where + presheaf := (cylinderRealization hC q n hnq H).op ⋙ yoneda.obj Y + sums S b h hl hr := by + simp only [Functor.comp_map, Functor.op_map, Quiver.Hom.unop_op, TheoryData.arity, cylinderRealization_base] + exact (((cylinderFrame hC q n).shapeRealization_sums S b h hl hr).op.map (yoneda.obj Y)).flip + +noncomputable def fullCylinderEndpoint (Y : CutoffModels C q) (ε : Bool) : + fullCylinder hC q n hnq H Y ⟶ Y.obj where + app S := ↾(fun a => yonedaEquiv ((cutoffAdjunction hC q).homEquiv _ Y + ((cylinderShapeEndpoint hC q n ε).app S.unop.shape ≫ a))) + naturality S T f := by + apply ConcreteCategory.hom_ext + intro a + symm + change Y.obj.presheaf.map f (yonedaEquiv ((cutoffAdjunction hC q).homEquiv _ Y + ((cylinderShapeEndpoint hC q n ε).app S.unop.shape ≫ a))) = + yonedaEquiv ((cutoffAdjunction hC q).homEquiv _ Y + ((cylinderShapeEndpoint hC q n ε).app T.unop.shape ≫ + (cylinderRealization hC q n hnq H).map f.unop ≫ a)) + have he : (cylinderShapeEndpoint hC q n ε).app T.unop.shape ≫ + (cylinderRealization hC q n hnq H).map f.unop = + (cutoffRepresentables hC q).map f.unop ≫ + (cylinderShapeEndpoint hC q n ε).app S.unop.shape := by + let E := (cylinderInterpretation hC q n hnq H).map f.unop + have ho : (show T.unop ⟶ S.unop from E.original) = f.unop := + cylinderInterpretation_original hC q n hnq H f.unop + cases ε + · exact E.endpoint₀.trans (congrArg (fun z : T.unop ⟶ S.unop => + (cutoffRepresentables hC q).map z ≫ (cylinderShapeEndpoint hC q n false).app S.unop.shape) ho) + · exact E.endpoint₁.trans (congrArg (fun z : T.unop ⟶ S.unop => + (cutoffRepresentables hC q).map z ≫ (cylinderShapeEndpoint hC q n true).app S.unop.shape) ho) + have ha : (cylinderShapeEndpoint hC q n ε).app T.unop.shape ≫ + (cylinderRealization hC q n hnq H).map f.unop ≫ a = + (cutoffRepresentables hC q).map f.unop ≫ + ((cylinderShapeEndpoint hC q n ε).app S.unop.shape ≫ a) := + (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ a) he).trans (Category.assoc _ _ _)) + have hadj := (cutoffAdjunction hC q).homEquiv_naturality_left + (show freeShape C T.unop.shape ⟶ freeShape C S.unop.shape from yoneda.map f.unop) + ((cylinderShapeEndpoint hC q n ε).app S.unop.shape ≫ a) + exact (yonedaEquiv_naturality _ f.unop).trans + ((congrArg yonedaEquiv hadj.symm).trans + (congrArg (fun z => yonedaEquiv ((cutoffAdjunction hC q).homEquiv _ Y z)) ha.symm)) + +noncomputable def fullCylinderEvaluation (Y : CutoffModels C q) : + GlobularSet.Hom (fullCylinder hC q n hnq H Y).underlying ((cylinderFrame hC q n).homGlob Y) where + app j a := ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ a + source_app j a := by + change ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ + (cylinderRealization hC q n hnq H).map (C.base (Shape.source j)) ≫ a = + (cylinderFrame hC q n).diagram.source j ≫ ((cylinderFrame hC q n).shapeGlobeIso (j+1)).inv ≫ a + erw [cylinderRealization_base, ← Category.assoc, + ← GlobularFrame.shapeGlobeIso_source_inv, Category.assoc] + target_app j a := by + change ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ + (cylinderRealization hC q n hnq H).map (C.base (Shape.target j)) ≫ a = + (cylinderFrame hC q n).diagram.target j ≫ ((cylinderFrame hC q n).shapeGlobeIso (j+1)).inv ≫ a + erw [cylinderRealization_base, ← Category.assoc, + ← GlobularFrame.shapeGlobeIso_target_inv, Category.assoc] + +noncomputable def fullCylinderCoevaluation (Y : CutoffModels C q) : + GlobularSet.Hom ((cylinderFrame hC q n).homGlob Y) (fullCylinder hC q n hnq H Y).underlying where + app j a := ((cylinderFrame hC q n).shapeGlobeIso j).hom ≫ a + source_app j a := by + change ((cylinderFrame hC q n).shapeGlobeIso j).hom ≫ + (cylinderFrame hC q n).diagram.source j ≫ a = + (cylinderRealization hC q n hnq H).map (C.base (Shape.source j)) ≫ + ((cylinderFrame hC q n).shapeGlobeIso (j+1)).hom ≫ a + erw [cylinderRealization_base] + exact (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ a) + ((cylinderFrame hC q n).shapeGlobeIso_source j).symm).trans (Category.assoc _ _ _)) + target_app j a := by + change ((cylinderFrame hC q n).shapeGlobeIso j).hom ≫ + (cylinderFrame hC q n).diagram.target j ≫ a = + (cylinderRealization hC q n hnq H).map (C.base (Shape.target j)) ≫ + ((cylinderFrame hC q n).shapeGlobeIso (j+1)).hom ≫ a + erw [cylinderRealization_base] + exact (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ a) + ((cylinderFrame hC q n).shapeGlobeIso_target j).symm).trans (Category.assoc _ _ _)) + +@[simp] theorem fullCylinderEvaluation_coevaluation (Y : CutoffModels C q) : + (fullCylinderEvaluation hC q n hnq H Y).comp (fullCylinderCoevaluation hC q n hnq H Y) = + GlobularSet.Hom.id _ := by + ext j a + exact Iso.hom_inv_id_assoc _ _ + +@[simp] theorem fullCylinderCoevaluation_evaluation (Y : CutoffModels C q) : + (fullCylinderCoevaluation hC q n hnq H Y).comp (fullCylinderEvaluation hC q n hnq H Y) = + GlobularSet.Hom.id _ := by + ext j a + exact Iso.inv_hom_id_assoc _ _ + +@[simp] theorem fullCylinderEndpoint_evaluation (Y : CutoffModels C q) (ε : Bool) : + underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε) = + ((fullCylinderEvaluation hC q n hnq H Y).comp + ((cylinderEndpoint hC q n ε).pre Y)).comp (cutoffDiskEvaluation hC q Y) := by + ext j a + change cutoffCellEquiv hC q Y j ((cylinderShapeEndpoint hC q n ε).app (Shape.globe j) ≫ a) = + cutoffCellEquiv hC q Y j ((cylinderEndpoint hC q n ε).obj j ≫ + ((cylinderFrame hC q n).shapeGlobeIso j).inv ≫ a) + erw [← Category.assoc, cylinderShapeEndpoint_globe_inv] +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Groupoid.lean b/lean/OAI/CategoryTheory/Globular/Groupoid.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a2e936d84048e9696639e0a70a7e515c7187ee7 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Groupoid.lean @@ -0,0 +1,326 @@ +import OAI.CategoryTheory.Globular.Expansion + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +noncomputable def cutoffFreeGlobular {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : GlobularPresheaf.{v} ⥤ CutoffModels C q := + freeGlobular C ⋙ cutoffFunctor hC q + +noncomputable def cutoffForgetGlobular (C : GlobularTheory.{v}) (q : ℕ) : + CutoffModels C q ⥤ GlobularPresheaf.{v} := + (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)) ⋙ forgetGlobular C + +noncomputable def cutoffGlobularAdjunction {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : cutoffFreeGlobular hC q ⊣ cutoffForgetGlobular C q := + (globularAdjunction C).comp (cutoffAdjunction hC q) + +instance cutoffFreeGlobular_preservesColimits {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : PreservesColimitsOfSize.{v,v} (cutoffFreeGlobular hC q) := + (cutoffGlobularAdjunction hC q).leftAdjoint_preservesColimits + +theorem cutoffFreeGlobular_cofibrant {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : GlobularPresheaf.{v}) : + Cofibrant hC q ((cutoffFreeGlobular hC q).obj S) := by + intro P Q p hp f + have hp' : GlobularSet.LiftsBoundaries (underlyingMap p.hom) := by + intro n + exact (hasLiftingProperty_I_iff n p.hom).1 + ((boundaryClass_rlp_iff hC q 0 p).1 hp n (Nat.zero_le n)) + let A := cutoffGlobularAdjunction hC q + obtain ⟨g, hg⟩ := GlobularPresheaf.liftsBoundaries_lift hp' (A.homEquiv S Q f) + refine ⟨(A.homEquiv S P).symm g, ?_⟩ + apply (A.homEquiv S Q).injective + rw [Adjunction.homEquiv_naturality_right] + exact (congrArg (· ≫ (cutoffForgetGlobular C q).map p) + ((A.homEquiv S P).apply_symm_apply g)).trans hg + +noncomputable def shapeGlobularEquiv {C : GlobularTheory.{v}} (S : Shape) (X : C.Model) : + (freeShape C S ⟶ X) ≃ + ((Shape.liftedRealization.{v}).obj S ⟶ (forgetGlobular C).obj X) := + yonedaEquiv.trans (Equiv.ofBijective (X.tuples.evaluation.app (op S)) + (X.tuples.evaluation_bijective S)) + +theorem shapeGlobularEquiv_natural {C : GlobularTheory.{v}} (S : Shape) {X Y : C.Model} + (a : freeShape C S ⟶ X) (b : X ⟶ Y) : + shapeGlobularEquiv S Y (a ≫ b) = + shapeGlobularEquiv S X a ≫ (forgetGlobular C).map b := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + exact (ConcreteCategory.congr_hom (b.naturality + (C.toTheoryData.arity.map (S.cellArrow k x.down)).op) (yonedaEquiv a)).symm + +theorem cutoffFreeShape_cofibrant {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) : Cofibrant hC q ((cutoffFunctor hC q).obj (freeShape C S)) := by + intro P Q p hp f + have hp' : GlobularSet.LiftsBoundaries (underlyingMap p.hom) := by + intro n + exact (hasLiftingProperty_I_iff n p.hom).1 + ((boundaryClass_rlp_iff hC q 0 p).1 hp n (Nat.zero_le n)) + let A := cutoffAdjunction hC q + let a := A.homEquiv (freeShape C S) Q f + obtain ⟨g, hg⟩ := GlobularPresheaf.liftsBoundaries_lift hp' (shapeGlobularEquiv S Q.obj a) + let l := (shapeGlobularEquiv S P.obj).symm g + have hl : l ≫ p.hom = a := by + apply (shapeGlobularEquiv S Q.obj).injective + rw [shapeGlobularEquiv_natural] + change shapeGlobularEquiv S P.obj ((shapeGlobularEquiv S P.obj).symm g) ≫ _ = _ + exact (congrArg (· ≫ (forgetGlobular C).map p.hom) + ((shapeGlobularEquiv S P.obj).apply_symm_apply g)).trans hg + refine ⟨(A.homEquiv (freeShape C S) P).symm l, ?_⟩ + apply (A.homEquiv (freeShape C S) Q).injective + rw [Adjunction.homEquiv_naturality_right, Equiv.apply_symm_apply] + exact hl + +open CategoryTheory CategoryTheory.Limits Opposite + +structure CellGroupoid {C : GlobularTheory.{v}} (X : C.Model) (_hC : C.IsCoherator) + (n : ℕ) where + cell : X.underlying.Cell n + +namespace CellGroupoid +variable {C : GlobularTheory.{v}} {X : C.Model} {hC : C.IsCoherator} {n : ℕ} + +abbrev Edge (x y : CellGroupoid X hC n) := + {a : X.underlying.Cell (n+1) // X.underlying.source n a = x.cell ∧ + X.underlying.target n a = y.cell} + +def edgeSetoid (x y : CellGroupoid X hC n) : Setoid (Edge x y) where + r a b := X.underlying.Joined (n+1) a.1 b.1 + iseqv := ⟨fun a => X.joined_refl hC _ a.1, + fun h => X.joined_symm hC h, fun h k => X.joined_trans hC h k⟩ + +noncomputable def edgeComp {x y z : CellGroupoid X hC n} + (a : Edge x y) (b : Edge y z) : Edge x z := + ⟨X.compCell hC n a.1 b.1 (a.2.2.trans b.2.1.symm), + (X.compCell_source hC n _ _ _).trans a.2.1, + (X.compCell_target hC n _ _ _).trans b.2.2⟩ + +noncomputable instance : Category (CellGroupoid X hC n) where + Hom x y := Quotient (edgeSetoid x y) + id x := Quotient.mk _ ⟨X.unitCell hC n x.cell, + X.unitCell_source hC n _, X.unitCell_target hC n _⟩ + comp a b := Quotient.map₂ edgeComp (fun {a a'} ha {b b'} hb => + X.joined_trans hC + (X.compCell_congr_left hC n a.1 a'.1 b.1 + (a.2.2.trans b.2.1.symm) (a'.2.2.trans b.2.1.symm) ha) + (X.compCell_congr_right hC n a'.1 b.1 b'.1 + (a'.2.2.trans b.2.1.symm) (a'.2.2.trans b'.2.1.symm) hb)) a b + id_comp a := by + induction a using Quotient.inductionOn with | h a => + apply Quotient.sound + change X.underlying.Joined (n+1) (X.compCell hC n _ a.1 _) a.1 + simpa only [a.2.1] using X.compCell_left_unit hC n a.1 + comp_id a := by + induction a using Quotient.inductionOn with | h a => + apply Quotient.sound + change X.underlying.Joined (n+1) (X.compCell hC n a.1 _ _) a.1 + simpa only [a.2.2] using X.compCell_right_unit hC n a.1 + assoc a b c := by + induction a using Quotient.inductionOn with | h a => + induction b using Quotient.inductionOn with | h b => + induction c using Quotient.inductionOn with | h c => + exact Quotient.sound (X.compCell_assoc hC n a.1 b.1 c.1 _ _) + +noncomputable def ofEdge {x y : CellGroupoid X hC n} (a : Edge x y) : x ⟶ y := + Quotient.mk _ a + +theorem ofEdge_eq_iff {x y : CellGroupoid X hC n} (a b : Edge x y) : + ofEdge a = ofEdge b ↔ X.underlying.Joined (n+1) a.1 b.1 := + Quotient.eq + +noncomputable instance : Groupoid (CellGroupoid X hC n) := Groupoid.ofIsIso (by + intro x y a + induction a using Quotient.inductionOn with | h a => + refine ⟨ofEdge ⟨X.inverseCell hC n a.1, + (X.inverseCell_source hC n _).trans a.2.2, + (X.inverseCell_target hC n _).trans a.2.1⟩, ?_, ?_⟩ + · apply Quotient.sound + change X.underlying.Joined (n+1) (X.compCell hC n a.1 (X.inverseCell hC n a.1) _) _ + simpa only [a.2.1] using X.compCell_inverse_right hC n a.1 + · apply Quotient.sound + change X.underlying.Joined (n+1) (X.compCell hC n (X.inverseCell hC n a.1) a.1 _) _ + simpa only [a.2.2] using X.compCell_inverse_left hC n a.1) + +noncomputable def map {Y : C.Model} (f : X ⟶ Y) : + CellGroupoid X hC n ⥤ CellGroupoid Y hC n where + obj x := ⟨(underlyingMap f).app n x.cell⟩ + map a := Quotient.map (fun a => + ⟨(underlyingMap f).app (n+1) a.1, + ((underlyingMap f).source_app n a.1).symm.trans (congrArg _ a.2.1), + ((underlyingMap f).target_app n a.1).symm.trans (congrArg _ a.2.2)⟩) + (fun _ _ h => (underlyingMap f).map_joined h) a + map_id x := by + apply congrArg (Quotient.mk _) + apply Subtype.ext + exact map_unitCell f hC n x.cell + map_comp a b := by + induction a using Quotient.inductionOn with | h a => + induction b using Quotient.inductionOn with | h b => + apply congrArg (Quotient.mk _) + apply Subtype.ext + exact map_compCell f hC n a.1 b.1 _ + +end CellGroupoid +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck.GlobularSet + +namespace LiftStage +variable {A X Y : GlobularSet.{v}} {p : Hom X Y} {f : Hom A Y} + +noncomputable def extendTop {n : ℕ} (a : LiftStage p f n) + (z : A.Cell (n+1) → X.Cell (n+1)) + (hs : ∀ x, X.source n (z x) = a.app n le_rfl (A.source n x)) + (ht : ∀ x, X.target n (z x) = a.app n le_rfl (A.target n x)) + (hzp : ∀ x, p.app (n+1) (z x) = f.app (n+1) x) : LiftStage p f (n+1) where + app k hk x := if h : k ≤ n then a.app k h x else by + have e : k = n+1 := by omega + subst k + exact z x + source_app k hk x := by + dsimp only + split_ifs with h h' + · exact a.source_app k h' x + · have e : k = n := by omega + subst k + exact (hs x).symm + · omega + · omega + target_app k hk x := by + dsimp only + split_ifs with h h' + · exact a.target_app k h' x + · have e : k = n := by omega + subst k + exact (ht x).symm + · omega + · omega + fac k hk x := by + dsimp only + split_ifs with h + · exact a.fac k h x + · have e : k = n+1 := by omega + subst k + exact hzp x + +noncomputable def ofBounded {n : ℕ} (a : LiftStage p f n) + (hA : ∀ k, n < k → IsEmpty (A.Cell k)) : Hom A X where + app k x := if hk : k ≤ n then a.app k hk x else (hA k (by omega)).false x |>.elim + source_app k x := by + have hk : k+1 ≤ n := by + by_contra h + exact (hA (k+1) (by omega)).false x + simp only [dite_eq_left hk, dite_eq_left (show k ≤ n by omega)] + exact a.source_app k hk x + target_app k x := by + have hk : k+1 ≤ n := by + by_contra h + exact (hA (k+1) (by omega)).false x + simp only [dite_eq_left hk, dite_eq_left (show k ≤ n by omega)] + exact a.target_app k hk x + +theorem ofBounded_fac {n : ℕ} (a : LiftStage p f n) + (hA : ∀ k, n < k → IsEmpty (A.Cell k)) : (a.ofBounded hA).comp p = f := by + ext k x + have hk : k ≤ n := by + by_contra h + exact (hA k (by omega)).false x + simpa only [Hom.comp, ofBounded, dite_eq_left hk] using a.fac k hk x + +end LiftStage + +theorem lift_of_top_joined {A X Y : GlobularSet.{v}} {p : Hom X Y} + (n : ℕ) (hp : LiftsSource p (n+1)) (f : Hom A Y) (a : Hom A X) + (hA : ∀ k, n+1 < k → IsEmpty (A.Cell k)) + (ha : ∀ k, k ≤ n → ∀ x, p.app k (a.app k x) = f.app k x) + (htop : ∀ x, Y.Joined (n+1) (p.app (n+1) (a.app (n+1) x)) (f.app (n+1) x)) : + ∃ g : Hom A X, g.comp p = f := by + let lo : LiftStage p f n := + { app := fun k _ => a.app k + source_app := fun k _ => a.source_app k + target_app := fun k _ => a.target_app k + fac := ha } + have h x : ∃ z : X.Cell (n+1), + X.source n z = a.app n (A.source n x) ∧ + X.target n z = a.app n (A.target n x) ∧ p.app (n+1) z = f.app (n+1) x := by + obtain ⟨c, hc₀, hc₁⟩ := htop x + obtain ⟨d, hd₀, hd⟩ := hp (a.app (n+1) x) c hc₀ + refine ⟨X.target (n+1) d, ?_, ?_, ?_⟩ + · rw [← X.source_source, hd₀, ← a.source_app] + · rw [← X.target_source, hd₀, ← a.target_app] + · rw [p.target_app, hd, hc₁] + choose z hs ht hz using h + let b := lo.extendTop z hs ht hz + exact ⟨b.ofBounded hA, b.ofBounded_fac hA⟩ + +end Grothendieck.GlobularSet + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +theorem free_hasFillers_of_top_homotopy {C : GlobularTheory.{v}} + (hC : C.IsCoherator) (q n : ℕ) (H : ExpansionContraction hC q (n+1)) + (S : GlobularPresheaf.{v}) + (hS : ∀ k, n+1 < k → IsEmpty (S.underlying.Cell k)) + (L : CutoffModels C q) (hL : Cofibrant hC q L) + (hLF : L.obj.underlying.HasFillers) + (f : (cutoffFreeGlobular hC q).obj S ⟶ L) + (g : L ⟶ (cutoffFreeGlobular hC q).obj S) + (hlo : ∀ k, k ≤ n → ∀ x, + (underlyingMap (f ≫ g).hom).app k + (GlobularPresheaf.underlyingMap ((cutoffGlobularAdjunction hC q).unit.app S) |>.app k x) = + (GlobularPresheaf.underlyingMap ((cutoffGlobularAdjunction hC q).unit.app S)).app k x) + (htop : ∀ x, ((cutoffFreeGlobular hC q).obj S).obj.underlying.Joined (n+1) + ((underlyingMap (f ≫ g).hom).app (n+1) + ((GlobularPresheaf.underlyingMap ((cutoffGlobularAdjunction hC q).unit.app S)).app (n+1) x)) + ((GlobularPresheaf.underlyingMap ((cutoffGlobularAdjunction hC q).unit.app S)).app (n+1) x)) : + ((cutoffFreeGlobular hC q).obj S).obj.underlying.HasFillers := by + let := sourceClass_smallObject hC q (n+1) + let W := sourceClass hC q (n+1) + let F := MorphismProperty.factorizationData W.rlp.llp W.rlp g + have hQ := H F.i F.hi hL hLF + let A := cutoffGlobularAdjunction hC q + let U := cutoffForgetGlobular C q + let eta := A.unit.app S + let a := eta ≫ U.map f ≫ U.map F.i + have hp : GlobularSet.LiftsSource (underlyingMap F.p.hom) (n+1) := + (hasLiftingProperty_J_iff (n+1) F.p.hom).1 + ((sourceClass_rlp_iff hC q (n+1) F.p).1 F.hp (n+1) le_rfl) + have hap : a ≫ U.map F.p = eta ≫ U.map (f ≫ g) := by + simp only [a, Category.assoc, ← Functor.map_comp, F.fac] + have hap' := congrArg GlobularPresheaf.underlyingMap hap + obtain ⟨b, hb⟩ := GlobularSet.lift_of_top_joined n hp + (GlobularPresheaf.underlyingMap eta) (GlobularPresheaf.underlyingMap a) hS + (by + intro k hk x + have e := congrFun (congrArg (fun z => z.app k) hap') x + exact e.trans (hlo k hk x)) + (by + intro x + have e := congrFun (congrArg (fun z => z.app (n+1)) hap') x + exact e ▸ htop x) + let b' : S ⟶ U.obj F.Z := S.underlyingPresheafIso.inv ≫ + b.presheafMap ≫ (U.obj F.Z).underlyingPresheafIso.hom + have hb' : b' ≫ U.map F.p = eta := by + apply GlobularPresheaf.underlyingMap_injective + exact hb + let s := (A.homEquiv S F.Z).symm b' + have hs : s ≫ F.p = 𝟙 _ := by + apply (A.homEquiv S _).injective + rw [Adjunction.homEquiv_naturality_right] + change A.homEquiv S F.Z ((A.homEquiv S F.Z).symm b') ≫ U.map F.p = _ + rw [Equiv.apply_symm_apply, hb'] + exact (A.homEquiv_id S).symm + apply hQ.retract (underlyingMap s.hom) (underlyingMap F.p.hom) + exact congrArg (fun z => underlyingMap z.hom) hs + +end Grothendieck.GlobularTheory.Model + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Homotopy.lean b/lean/OAI/CategoryTheory/Globular/Homotopy.lean new file mode 100644 index 0000000000000000000000000000000000000000..93dbd323121f8a992e9ef8fa345005f97cd7deb6 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Homotopy.lean @@ -0,0 +1,393 @@ +import OAI.CategoryTheory.Globular.Basic + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularSet + +theorem Parallel.symm {X : GlobularSet.{u}} {n} {x y : X.Cell n} + (h : X.Parallel n x y) : X.Parallel n y x := by + cases n with + | zero => trivial + | succ n => exact ⟨h.1.symm, h.2.symm⟩ + +theorem outer_parallel {X : GlobularSet.{u}} {n} {f g : X.Cell (n + 1)} + (h : X.target n f = X.source n g) : + X.Parallel n (X.source n f) (X.target n g) := by + cases n with + | zero => trivial + | succ n => + exact ⟨(X.source_source n f).trans ((congrArg (X.source n) h).trans + (X.source_source n g)), + (X.target_source n f).trans ((congrArg (X.target n) h).trans + (X.target_source n g))⟩ + +def LiftsBoundaries {X Y : GlobularSet.{u}} (f : Hom X Y) : Prop := + ∀ (n) (b : X.Boundary n) (y : Y.Cell n), Y.boundary n y = f.boundaryMap n b → + ∃ x : X.Cell n, X.boundary n x = b ∧ f.app n x = y + +theorem exactBoundaryTest_endpoint_section {P X : GlobularSet.{u}} + (p₀ p₁ : Hom P X) (h : Hom X P) + (h₀ : LiftsBoundaries p₀) (h₁ : LiftsBoundaries p₁) + (s : ∀ n x, p₀.app n (h.app n x) = x) + (units : ∀ n x, X.Joined n x x) : ExactBoundaryTest (h.comp p₁) := by + intro n b y hy + obtain ⟨z, hz, hzy⟩ := h₁ n (h.boundaryMap n b) y + (by simpa only [Hom.boundaryMap_comp] using hy) + let x := p₀.app n z + have hb : X.boundary n x = b := by + rw [← p₀.boundary_app, hz] + cases n with + | zero => rfl + | succ n => exact Subtype.ext (Prod.ext (s n _) (s n _)) + have hp : P.Parallel n (h.app n x) z := by + rw [parallel_iff_boundary_eq, ← h.boundary_app, hb, hz] + obtain ⟨e, es, et⟩ := units n x + have he : X.boundary (n + 1) e = + p₀.boundaryMap (n + 1) (⟨(h.app n x, z), hp⟩ : P.Boundary (n + 1)) := by + apply Subtype.ext + exact Prod.ext (es.trans (s n x).symm) et + obtain ⟨c, hc, _⟩ := h₀ (n + 1) ⟨(h.app n x, z), hp⟩ e he + have hc' := congrArg Subtype.val hc + refine ⟨x, hb, ?_⟩ + have joined : P.Joined n (h.app n x) z := + ⟨c, congrArg Prod.fst hc', congrArg Prod.snd hc'⟩ + simpa only [Hom.comp_app, hzy] using p₁.map_joined joined + +end GlobularSet + +namespace Shape + +theorem source_source (n : ℕ) : + source n ≫ source (n + 1) = source n ≫ target (n + 1) := by + have h := congrArg (fun f => GlobularTheory.shapeGlobes.map f) (Globe.source_source n) + exact (GlobularTheory.shapeGlobes.map_comp _ _).symm.trans + (h.trans (GlobularTheory.shapeGlobes.map_comp _ _)) + +theorem target_source (n : ℕ) : + target n ≫ source (n + 1) = target n ≫ target (n + 1) := by + have h := congrArg (fun f => GlobularTheory.shapeGlobes.map f) (Globe.target_source n) + exact (GlobularTheory.shapeGlobes.map_comp _ _).symm.trans + (h.trans (GlobularTheory.shapeGlobes.map_comp _ _)) + +theorem seam_inl (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + S.seam hl ≫ S.inl b h hl hr = face hr false ≫ S.inr b h hl hr := by + have eq := pushout.condition (f := GlobularPresheaf.face hl true ≫ S.2.lastInclusion) + (g := GlobularPresheaf.face hr false) + exact eq + +@[simp] +theorem globe_seam (n : ℕ) : (globe (n + 1)).seam (Nat.lt_succ_self n) = target n := by + exact Category.comp_id (GlobularPresheaf.face (Nat.lt_succ_self n) true) + +end Shape + +namespace GlobularTheory + +noncomputable def inversePair (C : GlobularTheory.{v}) (n : ℕ) : C.AdmissiblePair where + n := n + arity := Shape.globe (n + 1) + height := le_rfl + source := C.base (Shape.target n) + target := C.base (Shape.source n) + parallel := by + cases n with + | zero => trivial + | succ n => + constructor + · rw [← C.base_comp, ← C.base_comp] + exact congrArg C.base (Shape.source_source n).symm + · rw [← C.base_comp, ← C.base_comp] + exact congrArg C.base (Shape.target_source n).symm + +namespace Model + +theorem joined_refl {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (x : X.underlying.Cell n) : X.underlying.Joined n x x := + ⟨X.unitCell hC n x, X.unitCell_source hC n x, X.unitCell_target hC n x⟩ + +theorem joined_symm {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + {n : ℕ} {x y : X.underlying.Cell n} (h : X.underlying.Joined n x y) : + X.underlying.Joined n y x := by + obtain ⟨z, rfl, rfl⟩ := h + obtain ⟨w, hs, ht⟩ := hC.2 (C.inversePair n) + change C.Hom (Shape.globe (n + 1)) (Shape.globe (n + 1)) at w + change C.comp (C.base (Shape.source n)) w = C.base (Shape.target n) at hs + change C.comp (C.base (Shape.target n)) w = C.base (Shape.source n) at ht + refine ⟨X.eval w z, ?_, ?_⟩ + · change X.presheaf.obj (op (⟨Shape.globe (n + 1)⟩ : C.Obj)) at z + change X.eval (C.base (Shape.source n)) (X.eval w z) = + X.eval (C.base (Shape.target n)) z + rw [← eval_comp, hs] + · change X.presheaf.obj (op (⟨Shape.globe (n + 1)⟩ : C.Obj)) at z + change X.eval (C.base (Shape.target n)) (X.eval w z) = + X.eval (C.base (Shape.source n)) z + rw [← eval_comp, ht] + +end Model + +def compositionShape (n : ℕ) : Shape := + (Shape.globe (n + 1)).attach n (n + 1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def compositionLeft (n : ℕ) : Shape.globe (n + 1) ⟶ compositionShape n := + (Shape.globe (n + 1)).inl n (n + 1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def compositionRight (n : ℕ) : Shape.globe (n + 1) ⟶ compositionShape n := + (Shape.globe (n + 1)).inr n (n + 1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +theorem composition_seam (n : ℕ) : + Shape.target n ≫ compositionLeft n = Shape.source n ≫ compositionRight n := by + simpa only [Shape.globe_seam, Shape.source, compositionLeft, compositionRight, + compositionShape] using Shape.seam_inl (Shape.globe (n + 1)) n + (n + 1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def compositionPair (C : GlobularTheory.{v}) (n : ℕ) : C.AdmissiblePair where + n := n + arity := compositionShape n + height := Nat.max_self (n + 1) ▸ le_rfl + source := C.base (Shape.source n ≫ compositionLeft n) + target := C.base (Shape.target n ≫ compositionRight n) + parallel := by + cases n with + | zero => trivial + | succ n => + constructor + · rw [← C.base_comp, ← C.base_comp] + apply congrArg C.base + calc + _ = (Shape.source n ≫ Shape.target (n+1)) ≫ compositionLeft (n+1) := by + rw [← Category.assoc, Shape.source_source] + _ = Shape.source n ≫ (Shape.source (n+1) ≫ compositionRight (n+1)) := by + rw [Category.assoc, composition_seam] + _ = _ := by rw [← Category.assoc, Shape.source_source, Category.assoc] + · rw [← C.base_comp, ← C.base_comp] + apply congrArg C.base + calc + _ = (Shape.target n ≫ Shape.target (n+1)) ≫ compositionLeft (n+1) := by + rw [← Category.assoc, Shape.target_source] + _ = Shape.target n ≫ (Shape.source (n+1) ≫ compositionRight (n+1)) := by + rw [Category.assoc, composition_seam] + _ = _ := by rw [← Category.assoc, Shape.target_source, Category.assoc] + +namespace Model + +theorem joined_trans {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + {n : ℕ} {x y z : X.underlying.Cell n} + (h : X.underlying.Joined n x y) (k : X.underlying.Joined n y z) : + X.underlying.Joined n x z := by + obtain ⟨a, ha, ha'⟩ := h + obtain ⟨b, hb, hb'⟩ := k + have hab : X.eval (C.base ((Shape.globe (n+1)).seam (Nat.lt_succ_self n))) a = + X.eval (C.base (Shape.face (Nat.lt_succ_self n) false)) b := by + rw [Shape.globe_seam] + exact ha'.trans hb.symm + obtain ⟨t, htl, htr⟩ := Types.exists_of_isPullback + (X.sums (Shape.globe (n+1)) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) a b hab + change X.presheaf.obj (op (⟨compositionShape n⟩ : C.Obj)) at t + change X.eval (C.base (compositionLeft n)) t = a at htl + change X.eval (C.base (compositionRight n)) t = b at htr + obtain ⟨w, hs, ht⟩ := hC.2 (C.compositionPair n) + change C.Hom (Shape.globe (n+1)) (compositionShape n) at w + change C.comp (C.base (Shape.source n)) w = C.base (Shape.source n ≫ compositionLeft n) at hs + change C.comp (C.base (Shape.target n)) w = C.base (Shape.target n ≫ compositionRight n) at ht + refine ⟨X.eval w t, ?_, ?_⟩ + · change X.eval (C.base (Shape.source n)) (X.eval w t) = x + rw [← eval_comp, hs, C.base_comp, eval_comp, htl] + exact ha + · change X.eval (C.base (Shape.target n)) (X.eval w t) = z + rw [← eval_comp, ht, C.base_comp, eval_comp, htr] + exact hb' + +theorem joined_equivalence {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) : Equivalence (X.underlying.Joined n) := + ⟨X.joined_refl hC n, X.joined_symm hC, X.joined_trans hC⟩ + +end Model +namespace Morphism + +@[simp] theorem id_comp {C D : GlobularTheory.{v}} (f : Morphism C D) : + (id C).comp f = f := by ext; rfl + +@[simp] theorem comp_id {C D : GlobularTheory.{v}} (f : Morphism C D) : + f.comp (id D) = f := by ext; rfl + +theorem comp_assoc {B C D E : GlobularTheory.{v}} + (f : Morphism B C) (g : Morphism C D) (h : Morphism D E) : + (f.comp g).comp h = f.comp (g.comp h) := by ext; rfl + +def mapPair {C D : GlobularTheory.{v}} (f : Morphism C D) (p : C.AdmissiblePair) : + D.AdmissiblePair where + n := p.n + arity := p.arity + height := p.height + source := f.map p.source + target := f.map p.target + parallel := by + cases p with + | mk n S hd s t hp => + cases n with + | zero => trivial + | succ n => + change _ = _ ∧ _ = _ + change _ = _ ∧ _ = _ at hp + constructor + · rw [← f.map_base, ← f.map_comp, ← f.map_comp, hp.1] + · rw [← f.map_base, ← f.map_comp, ← f.map_comp, hp.2] + +end Morphism + +theorem Fills.map {C D E : GlobularTheory.{v}} {a : Morphism C D} + {p : C.AdmissiblePair} {z : D.Hom (Shape.globe (p.n + 1)) p.arity} + (hz : Fills a p z) (b : Morphism D E) : Fills (a.comp b) p (b.map z) := by + constructor + · change E.comp (E.base _) (b.map z) = b.map (a.map p.source) + rw [← b.map_base, ← b.map_comp, hz.1] + · change E.comp (E.base _) (b.map z) = b.map (a.map p.target) + rw [← b.map_base, ← b.map_comp, hz.2] + +theorem IsFreeExtension.hom_ext {C D : GlobularTheory.{v}} {f : Morphism C D} + {G : Type v} {pair : G → C.AdmissiblePair} + {filler : ∀ g, D.Hom (Shape.globe ((pair g).n + 1)) (pair g).arity} + (hf : IsFreeExtension f G pair filler) {E : GlobularTheory.{v}} + (a b : Morphism D E) (h : f.comp a = f.comp b) + (hg : ∀ g, a.map (filler g) = b.map (filler g)) : a = b := by + obtain ⟨c, _, hc⟩ := hf.2 E (f.comp a) (fun g => a.map (filler g)) + (fun g => (hf.1 g).map a) + exact (hc a ⟨rfl, fun _ => rfl⟩).trans + (hc b ⟨h.symm, fun g => (hg g).symm⟩).symm + +def LiftsFillers {E D : GlobularTheory.{v}} (p : Morphism E D) : Prop := + ∀ (a : E.AdmissiblePair) (z : D.Hom (Shape.globe (a.n + 1)) a.arity), + Fills p a z → ∃ w, Fills (Morphism.id E) a w ∧ p.map w = z + +namespace CellularPresentation + +theorem hom_ext {C : GlobularTheory.{v}} (P : C.CellularPresentation) + {D : GlobularTheory.{v}} (a b : Morphism C D) + (h : ∀ r, (P.inclusion r).comp a = (P.inclusion r).comp b) : a = b := by + obtain ⟨c, _, hc⟩ := P.colimit D (fun r => (P.inclusion r).comp a) + (fun r => by rw [← Morphism.comp_assoc, P.compatible]) + exact (hc a (fun _ => rfl)).trans (hc b (fun r => (h r).symm)).symm + +theorem lift {C E D : GlobularTheory.{v}} (P : C.CellularPresentation) + (p : Morphism E D) (hp : LiftsFillers p) (f : Morphism C D) : + ∃ a : Morphism C E, a.comp p = f := by + classical + let StageLift (r : ℕ) := + { a : Morphism (P.stage r) E // a.comp p = (P.inclusion r).comp f } + have initial : Nonempty (StageLift 0) := by + let : Unique (Morphism (P.stage 0) E) := (P.initial E).some + let : Unique (Morphism (P.stage 0) D) := (P.initial D).some + exact ⟨⟨default, Subsingleton.elim _ _⟩⟩ + have next (r : ℕ) (a : StageLift r) : + ∃ b : StageLift (r + 1), (P.step r).comp b.1 = a.1 := by + let z (g : P.generators r) := f.map ((P.inclusion (r+1)).map (P.filler r g)) + have hz (g : P.generators r) : Fills (a.1.comp p) (P.pair r g) (z g) := by + have h := ((P.free r).1 g).map ((P.inclusion (r+1)).comp f) + rw [a.2, ← Morphism.comp_assoc, P.compatible] at * + exact h + have hw (g : P.generators r) : + ∃ w, Fills a.1 (P.pair r g) w ∧ p.map w = z g := by + obtain ⟨w, hw, he⟩ := hp (a.1.mapPair (P.pair r g)) (z g) (hz g) + exact ⟨w, hw, he⟩ + choose w hw he using hw + obtain ⟨b, ⟨hb, hbg⟩, _⟩ := (P.free r).2 E a.1 w hw + have hbp : b.comp p = (P.inclusion (r+1)).comp f := by + apply (P.free r).hom_ext + · rw [← Morphism.comp_assoc, hb, a.2, ← Morphism.comp_assoc, P.compatible] + · intro g + change p.map (b.map (P.filler r g)) = z g + rw [hbg, he] + exact ⟨⟨b, hbp⟩, hb⟩ + let a : (r : ℕ) → StageLift r := fun r => Nat.rec initial.some + (fun r a => (next r a).choose) r + have ha (r : ℕ) : (P.step r).comp (a (r+1)).1 = (a r).1 := + (next r (a r)).choose_spec + obtain ⟨b, hb, _⟩ := P.colimit E (fun r => (a r).1) ha + refine ⟨b, P.hom_ext _ _ (fun r => ?_)⟩ + rw [← Morphism.comp_assoc, hb, (a r).2] + +end CellularPresentation +end GlobularTheory + +structure TupleSystem where + presheaf : Shapeᵒᵖ ⥤ Type v + sums : ∀ (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h), + IsPullback + (presheaf.map (S.inl b h hl hr).op) + (presheaf.map (S.inr b h hl hr).op) + (presheaf.map (S.seam hl).op) + (presheaf.map (Shape.face hr false).op) + +namespace TupleSystem + +noncomputable def endData (T : TupleSystem.{v}) : TheoryData.{v} where + Hom S R := T.presheaf.obj (op R) ⟶ T.presheaf.obj (op S) + id _ := 𝟙 _ + comp f g := g ≫ f + id_comp f := Category.comp_id f + comp_id f := Category.id_comp f + assoc f g h := (Category.assoc h g f).symm + base f := T.presheaf.map f.op + base_id S := T.presheaf.map_id (op S) + base_comp f g := T.presheaf.map_comp g.op f.op + +noncomputable def endEmbedding (T : TupleSystem.{v}) : T.endData.Obj ⥤ (Type v)ᵒᵖ where + obj S := op (T.presheaf.obj (op S.shape)) + map f := f.op + map_id _ := rfl + map_comp _ _ := rfl + +noncomputable def endEmbedding_fullyFaithful (T : TupleSystem.{v}) : + T.endEmbedding.FullyFaithful where + preimage f := f.unop + +noncomputable def endTheory (T : TupleSystem.{v}) : GlobularTheory.{v} where + toTheoryData := T.endData + sums S b h hl hr := by + let : T.endEmbedding.Full := T.endEmbedding_fullyFaithful.full + let : T.endEmbedding.Faithful := T.endEmbedding_fullyFaithful.faithful + apply IsPushout.of_map_of_faithful T.endEmbedding + exact (T.sums S b h hl hr).op.flip + +noncomputable def model {C : GlobularTheory.{v}} (T : TupleSystem.{v}) + (a : GlobularTheory.Morphism C T.endTheory) : C.Model where + presheaf := + { obj := fun S => T.presheaf.obj (op S.unop.shape) + map := fun f => a.map f.unop + map_id := fun S => a.map_id S.unop.shape + map_comp := fun f g => a.map_comp g.unop f.unop } + sums S b h hl hr := by + change IsPullback (a.map (C.base (S.inl b h hl hr))) + (a.map (C.base (S.inr b h hl hr))) (a.map (C.base (S.seam hl))) + (a.map (C.base (Shape.face hr false))) + rw [a.map_base, a.map_base, a.map_base, a.map_base] + exact T.sums S b h hl hr + +end TupleSystem + +namespace GlobularTheory.Model + +noncomputable abbrev tuples {C : GlobularTheory.{v}} (X : C.Model) : TupleSystem.{v} where + presheaf := C.toTheoryData.arity.op ⋙ X.presheaf + sums := X.sums + +noncomputable def interpretation {C : GlobularTheory.{v}} (X : C.Model) : + Morphism C X.tuples.endTheory where + map f := X.presheaf.map (show (⟨_⟩ : C.Obj) ⟶ ⟨_⟩ from f).op + map_id S := X.presheaf.map_id (op (⟨S⟩ : C.Obj)) + map_comp f g := X.presheaf.map_comp (show (op (⟨_⟩ : C.Obj)) ⟶ op ⟨_⟩ from Quiver.Hom.op (show (⟨_⟩ : C.Obj) ⟶ ⟨_⟩ from g)) + (show (op (⟨_⟩ : C.Obj)) ⟶ op ⟨_⟩ from + Quiver.Hom.op (show (⟨_⟩ : C.Obj) ⟶ ⟨_⟩ from f)) + map_base _ := rfl + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/HomotopyGroups.lean b/lean/OAI/CategoryTheory/Globular/HomotopyGroups.lean new file mode 100644 index 0000000000000000000000000000000000000000..fbf881075441dd4dec47b36d5b418229a1ca90e8 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/HomotopyGroups.lean @@ -0,0 +1,37 @@ +import OAI.CategoryTheory.Globular.ElementaryExpansion + +namespace OAI + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory + +noncomputable instance homotopyGroupGroup.{v} {C : GlobularTheory.{v}} (X : C.Model) + (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + Group (X.HomotopyGroup hC x n) := + show Group (End (⟨X.baseCell hC x n⟩ : CellGroupoid X hC n)) from inferInstance + +noncomputable def homotopyMapHom.{v} {C : GlobularTheory.{v}} {X Y : C.Model} + (f : X ⟶ Y) (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + X.HomotopyGroup hC x n →* Y.HomotopyGroup hC ((underlyingMap f).app 0 x) n where + toFun := homotopyMap f hC x n + map_one' := by + apply congrArg (Quot.mk _) + apply Subtype.ext + exact (map_unitCell f hC n (X.baseCell hC x n)).trans + (congrArg (Y.unitCell hC n) (map_baseCell f hC x n)) + map_mul' a b := by + induction a using Quot.inductionOn with | h a => + induction b using Quot.inductionOn with | h b => + apply congrArg (Quot.mk _) + apply Subtype.ext + exact map_compCell f hC n b.1 a.1 _ + +noncomputable def homotopyGroupIsoOfWeakEquivalence.{v} {C : GlobularTheory.{v}} + {X Y : C.Model} (f : X ⟶ Y) (hC : C.IsCoherator) (hf : WeakEquivalence hC f) + (x : X.underlying.Cell 0) (n : ℕ) : + X.HomotopyGroup hC x n ≃* Y.HomotopyGroup hC ((underlyingMap f).app 0 x) n := + MulEquiv.ofBijective (homotopyMapHom f hC x n) (hf.2 x n) + +end Grothendieck.GlobularTheory.Model + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/LinearCells.lean b/lean/OAI/CategoryTheory/Globular/LinearCells.lean new file mode 100644 index 0000000000000000000000000000000000000000..463573325a15486a5f3a4483a82a7c82b2104a1c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/LinearCells.lean @@ -0,0 +1,224 @@ +import OAI.CategoryTheory.Globular.SmallFree + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace FiniteCoGlobularObject +variable {K : Type u} [Category.{v} K] [HasTerminal K] {q : ℕ} + +noncomputable def cell (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] (S : GlobularPresheaf.{max v w}) + (k : ℕ) (hk : k ≤ q) (x : S.underlying.Cell k) : B.obj k hk ⟶ B.realization.obj S := + (B.globeIso k hk).inv ≫ B.realization.map (uliftYonedaEquiv.symm x) + +@[reassoc] theorem cell_face (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] (S : GlobularPresheaf.{max v w}) + {j k : ℕ} (h : j < k) (hk : k ≤ q) (ε : Bool) (x : S.underlying.Cell k) : + B.face h hk ε ≫ B.cell S k hk x = + B.cell S j (h.le.trans hk) (S.map (Globe.face h ε).op x) := by + have e := B.globeIso_face h hk ε + have e' : B.face h hk ε ≫ (B.globeIso k hk).inv = + (B.globeIso j (h.le.trans hk)).inv ≫ B.realization.map (GlobularPresheaf.face h ε) := by + rw [← Iso.inv_hom_id_assoc (B.globeIso j (h.le.trans hk)) (B.face h hk ε), ← e] + rw [Category.assoc, Category.assoc, Iso.hom_inv_id, Category.comp_id] + unfold cell + erw [← Category.assoc, e', Category.assoc, ← Functor.map_comp] + congr 2 + exact (uliftYonedaEquiv_symm_map (Globe.face h ε).op x).symm + +instance preservesColimits_realization (B : FiniteCoGlobularObject K q) + [HasColimitsOfSize.{0,max v w} K] : PreservesColimits B.realization := by + unfold realization + infer_instance + +end FiniteCoGlobularObject +namespace Shape + +noncomputable def linearLow (n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) + (hk : k < n) (x : S.underlying.Cell k) : GlobularPresheaf.disk k ⟶ (linearization n).obj S := + realization.map (eqToHom (linearBlock_low n k hk).symm) ≫ + (linearGlobularDiagram n).cell S k (by omega) x + +noncomputable def linearEdge (n : ℕ) (S : GlobularPresheaf.{0}) + (x : S.underlying.Cell n) : GlobularPresheaf.disk (n+1) ⟶ (linearization n).obj S := + realization.map (eqToHom (linearBlock_center n n rfl).symm) ≫ + (linearGlobularDiagram n).cell S n (by omega) x + +noncomputable def linearTriple (n : ℕ) (S : GlobularPresheaf.{0}) + (x : S.underlying.Cell (n+1)) : (GlobularTheory.tripleShape n).realize ⟶ (linearization n).obj S := + realization.map (eqToHom (linearBlock_high n (n+1) (by omega)).symm) ≫ + (linearGlobularDiagram n).cell S (n+1) le_rfl x + +@[reassoc] theorem linearLow_face (n : ℕ) (S : GlobularPresheaf.{0}) + {j k : ℕ} (h : j < k) (hk : k < n) (ε : Bool) (x : S.underlying.Cell k) : + GlobularPresheaf.face h ε ≫ linearLow n S k hk x = + linearLow n S j (by omega) (S.map (Globe.face h ε).op x) := by + have e := (linearGlobularDiagram n).cell_face S h (by omega) ε x + rw [linear_face_low n j k h hk ε] at e + have e' := congrArg (realization.map (eqToHom (linearBlock_low n j (by omega)).symm) ≫ ·) e + change _ = linearLow n S j (h.trans hk) _ at e' + erw [← Category.assoc, ← Functor.map_comp] at e' + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] at e' + erw [Functor.map_comp, Category.assoc] at e' + exact e' + +@[reassoc] theorem linearEdge_face (n : ℕ) (S : GlobularPresheaf.{0}) + {j : ℕ} (h : j < n) (ε : Bool) (x : S.underlying.Cell n) : + GlobularPresheaf.face (by omega : j < n+1) ε ≫ linearEdge n S x = + linearLow n S j h (S.map (Globe.face h ε).op x) := by + have e := (linearGlobularDiagram n).cell_face S h (by omega) ε x + rw [linear_face_center n j h ε] at e + have e' := congrArg (realization.map (eqToHom (linearBlock_low n j h).symm) ≫ ·) e + change _ = linearLow n S j h _ at e' + erw [← Category.assoc, ← Functor.map_comp] at e' + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] at e' + erw [Functor.map_comp, Category.assoc] at e' + exact e' + +@[reassoc] theorem linearTriple_face (n : ℕ) (S : GlobularPresheaf.{0}) + (ε : Bool) (x : S.underlying.Cell (n+1)) : + realization.map (if ε then GlobularTheory.tripleLast n else GlobularTheory.tripleFirst n) ≫ + linearTriple n S x = + linearEdge n S (S.map (Globe.face (Nat.lt_succ_self n) ε).op x) := by + have e := (linearGlobularDiagram n).cell_face S (Nat.lt_succ_self n) le_rfl ε x + rw [linear_face_top n ε] at e + have e' := congrArg (realization.map (eqToHom (linearBlock_center n n rfl).symm) ≫ ·) e + change _ = linearEdge n S _ at e' + erw [← Category.assoc, ← Functor.map_comp] at e' + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] at e' + erw [Functor.map_comp, Category.assoc] at e' + exact e' + +end Shape +namespace GlobularTheory.Model + +noncomputable def smallFreeCell {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} (k : ℕ) (f : GlobularPresheaf.disk k ⟶ S) : + ((smallFree hC q).obj S).obj.underlying.Cell k := + smallFreeGen hC q S k (f.app (op (Globe.mk k)) (ULift.up (𝟙 (Globe.mk k)))) + +@[simp] theorem smallFreeCell_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} (k : ℕ) (f : GlobularPresheaf.disk (k+1) ⟶ S) : + ((smallFree hC q).obj S).obj.underlying.source k (smallFreeCell hC q (k+1) f) = + smallFreeCell hC q k (GlobularPresheaf.face (Nat.lt_succ_self k) false ≫ f) := by + unfold smallFreeCell + erw [smallFreeGen_source] + exact congrArg (smallFreeGen hC q S k) + ((GlobularPresheaf.underlyingMap f).source_app k (ULift.up (𝟙 (Globe.mk (k+1))))).symm + +@[simp] theorem smallFreeCell_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} (k : ℕ) (f : GlobularPresheaf.disk (k+1) ⟶ S) : + ((smallFree hC q).obj S).obj.underlying.target k (smallFreeCell hC q (k+1) f) = + smallFreeCell hC q k (GlobularPresheaf.face (Nat.lt_succ_self k) true ≫ f) := by + unfold smallFreeCell + erw [smallFreeGen_target] + exact congrArg (smallFreeGen hC q S k) + ((GlobularPresheaf.underlyingMap f).target_app k (ULift.up (𝟙 (Globe.mk (k+1))))).symm + +@[simp] theorem smallFreeCell_map {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (k : ℕ) + (a : GlobularPresheaf.disk k ⟶ S) : + (underlyingMap ((smallFree hC q).map f).hom).app k (smallFreeCell hC q k a) = + smallFreeCell hC q k (a ≫ f) := + smallFreeGen_map hC q f k _ + +@[simp] theorem smallShapeDesc_cell {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) {Y : CutoffModels C q} + (t : Y.obj.presheaf.obj (op (⟨S⟩ : C.Obj))) (k : ℕ) (f : Shape.globe k ⟶ S) : + (underlyingMap (smallShapeDesc hC q S t).hom).app k + (smallFreeCell hC q k (Shape.realization.map f)) = Y.obj.eval (C.base f) t := by + unfold smallFreeCell + erw [smallShapeDesc_gen] + have e : S.cellArrow (op (Globe.mk k)) (f.app (op (Globe.mk k)) + (ULift.up (𝟙 (Globe.mk k)))) = f := uliftYonedaEquiv.symm_apply_apply f + erw [e] + +end GlobularTheory.Model + +namespace GlobularPresheaf + +noncomputable def finiteRealizationDesc {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) [PreservesColimitsOfSize.{0,0} F] + {q : ℕ} (B : FiniteCoGlobularObject GlobularPresheaf.{0} q) + (S : GlobularPresheaf.{0}) (hS : ∀ k, q < k → IsEmpty (S.underlying.Cell k)) (Y : K) + (d : ∀ k (hk : k ≤ q), S.underlying.Cell k → (F.obj (B.obj k hk) ⟶ Y)) + (hd : ∀ {j k : ℕ} (h : j < k) (hk : k ≤ q) (ε : Bool) x, + F.map (B.face h hk ε) ≫ d k hk x = d j (h.le.trans hk) (S.map (Globe.face h ε).op x)) : + F.obj (B.realization.obj S) ⟶ Y := by + let D (k : Globe) (x : S.obj (op k)) : (B.realization ⋙ F).obj (uliftYoneda.obj k) ⟶ Y := + if h : k.dim ≤ q then F.map (B.globeIso k.dim h).hom ≫ d k.dim h x + else (hS k.dim (by omega)).false x |>.elim + apply densityDesc (B.realization ⋙ F) S Y D + intro k l f x + rcases k with ⟨k⟩ + rcases l with ⟨l⟩ + have hl : l ≤ q := by + by_contra hn + exact (hS l (by omega)).false x + change Globe.Face k l at f + cases f with + | id => + change (B.realization ⋙ F).map (uliftYoneda.map (𝟙 (Globe.mk k))) ≫ D _ x = _ + change _ = D _ (S.map (𝟙 (op (Globe.mk k))) x) + erw [uliftYoneda.map_id, (B.realization ⋙ F).map_id, Category.id_comp, S.map_id] + rfl + | face h ε => + have hk := h.le.trans hl + dsimp only [D] + rw [dite_eq_left hl, dite_eq_left hk] + change F.map (B.realization.map (GlobularPresheaf.face h ε)) ≫ + F.map (B.globeIso l hl).hom ≫ d l hl x = _ + erw [← Category.assoc, ← F.map_comp, B.globeIso_face, F.map_comp, Category.assoc, hd] + rfl + +@[reassoc] theorem finiteRealizationDesc_cell {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) [PreservesColimitsOfSize.{0,0} F] + {q : ℕ} (B : FiniteCoGlobularObject GlobularPresheaf.{0} q) + (S : GlobularPresheaf.{0}) (hS : ∀ k, q < k → IsEmpty (S.underlying.Cell k)) (Y : K) + (d) (hd) (k : ℕ) (hk : k ≤ q) (x : S.underlying.Cell k) : + F.map (B.cell S k hk x) ≫ finiteRealizationDesc F B S hS Y d hd = d k hk x := by + unfold finiteRealizationDesc FiniteCoGlobularObject.cell + rw [F.map_comp, Category.assoc] + dsimp only + erw [densityDesc_cell (B.realization ⋙ F)] + dsimp only + erw [dite_eq_left hk, ← Category.assoc, ← F.map_comp, Iso.inv_hom_id, F.map_id, Category.id_comp] + +end GlobularPresheaf + +namespace FiniteCoGlobularObject + +theorem face_natural {K : Type u} [Category.{v} K] + (F : GlobularPresheaf.{0} ⥤ K) {q : ℕ} + (B : FiniteCoGlobularObject GlobularPresheaf.{0} q) + (S : GlobularPresheaf.{0}) (Y : K) + (d : ∀ k (hk : k ≤ q), S.underlying.Cell k → (F.obj (B.obj k hk) ⟶ Y)) + (hd : ∀ k (hk : k+1 ≤ q) (ε : Bool) x, + F.map (if ε then B.target k hk else B.source k hk) ≫ d (k+1) hk x = + d k (by omega) (S.map (Globe.face (Nat.lt_succ_self k) ε).op x)) : + ∀ {j k : ℕ} (h : j < k) (hk : k ≤ q) (ε : Bool) x, + F.map (B.face h hk ε) ≫ d k hk x = + d j (h.le.trans hk) (S.map (Globe.face h ε).op x) := by + intro j k + induction k with + | zero => intro h; omega + | succ k ih => + intro h hk ε x + by_cases e : j = k + · subst j + rw [B.face_succ] + exact hd k hk ε x + · have hj : j < k := by omega + erw [← B.face_adjacent hj hk ε false, F.map_comp, Category.assoc, hd, ih hj] + congr 1 + have e := S.map_comp (Globe.face (Nat.lt_succ_self k) false).op (Globe.face hj ε).op + exact (ConcreteCategory.congr_hom e x).symm + +end FiniteCoGlobularObject + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/LinearShape.lean b/lean/OAI/CategoryTheory/Globular/LinearShape.lean new file mode 100644 index 0000000000000000000000000000000000000000..49f0fda029cddaee02de145b5b0e7c0315384378 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/LinearShape.lean @@ -0,0 +1,693 @@ +import OAI.CategoryTheory.Globular.Coglobular + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace Shape + +def linearHeight (n k : ℕ) : ℕ := if k < n then k else n+1 + +theorem linearHeight_lt (n b k : ℕ) (hb : b < n) (hk : b < k) : + b < linearHeight n k := by + unfold linearHeight + split_ifs <;> omega + +theorem linear_adjacent_realization (n k : ℕ) (hk : k ≤ n) (ε : Bool) : + (if ε then (linearGlobularDiagram n).target k (by omega) + else (linearGlobularDiagram n).source k (by omega)) = + realization.map (linearAdjacent n k hk ε) := by + cases ε <;> rfl + +theorem linear_face_low (n b k : ℕ) (h : b < k) (hk : k < n) (ε : Bool) : + (linearGlobularDiagram n).face h (by omega) ε = + realization.map (eqToHom (linearBlock_low n b (by omega)) ≫ + face h ε ≫ eqToHom (linearBlock_low n k hk).symm) := by + induction k with + | zero => omega + | succ k ih => + by_cases eb : b = k + · subst b + rw [FiniteCoGlobularObject.face_succ, linear_adjacent_realization _ _ (by omega)] + congr 1 + simp only [linearAdjacent, dite_eq_left (by omega : k < n), dite_eq_left hk] + · have hb : b < k := by omega + rw [← (linearGlobularDiagram n).face_adjacent hb (by omega) ε false, + ih hb (by omega), linear_adjacent_realization _ _ (by omega)] + change realization.map _ ≫ realization.map _ = realization.map _ + rw [← Functor.map_comp] + congr 1 + simp only [linearAdjacent, dite_eq_left (by omega : k < n), dite_eq_left hk] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [← Category.assoc (face _ ε), face_comp] + +theorem linear_face_center (n b : ℕ) (h : b < n) (ε : Bool) : + (linearGlobularDiagram n).face h (by omega) ε = + realization.map (eqToHom (linearBlock_low n b h) ≫ + face (by omega : b < n+1) ε ≫ eqToHom (linearBlock_center n n rfl).symm) := by + cases n with + | zero => omega + | succ n => + by_cases eb : b = n + · subst b + rw [FiniteCoGlobularObject.face_succ, linear_adjacent_realization _ _ (by omega)] + congr 1 + simp only [linearAdjacent, dite_eq_left (Nat.lt_succ_self n), dite_eq_right (lt_irrefl (n+1))] + · have hb : b < n := by omega + rw [← (linearGlobularDiagram (n+1)).face_adjacent hb (by omega) ε false, + linear_face_low _ _ _ hb (by omega), linear_adjacent_realization _ _ (by omega)] + change realization.map _ ≫ realization.map _ = realization.map _ + rw [← Functor.map_comp] + congr 1 + simp only [linearAdjacent, dite_eq_left (Nat.lt_succ_self n), dite_eq_right (lt_irrefl (n+1))] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [← Category.assoc (face _ ε), face_comp] + +theorem linear_face_top (n : ℕ) (ε : Bool) : + (linearGlobularDiagram n).face (Nat.lt_succ_self n) le_rfl ε = + realization.map (eqToHom (linearBlock_center n n rfl) ≫ + (if ε then GlobularTheory.tripleLast n else GlobularTheory.tripleFirst n) ≫ + eqToHom (linearBlock_high n (n+1) (Nat.lt_succ_self n)).symm) := by + rw [FiniteCoGlobularObject.face_succ, linear_adjacent_realization _ _ (by omega)] + congr 1 + simp only [linearAdjacent, dite_eq_right (lt_irrefl n)] + +theorem linear_face_top_low (n b : ℕ) (h : b < n) (ε : Bool) : + (linearGlobularDiagram n).face (by omega : b < n+1) le_rfl ε = + realization.map (eqToHom (linearBlock_low n b h) ≫ + face (by omega : b < n+1) ε ≫ GlobularTheory.tripleLast n ≫ + eqToHom (linearBlock_high n (n+1) (Nat.lt_succ_self n)).symm) := by + rw [← (linearGlobularDiagram n).face_adjacent h le_rfl ε true, + linear_face_center, linear_adjacent_realization _ _ (by omega)] + change realization.map _ ≫ realization.map _ = realization.map _ + rw [← Functor.map_comp] + congr 1 + simp only [linearAdjacent, dite_eq_right (lt_irrefl n), ↓reduceIte] + simp only [Category.assoc, eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + +theorem isPushout_attach (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + IsPushout (S.seam hl) (face hr false) (S.inl b h hl hr) (S.inr b h hl hr) := by + have H := realization_pushout S b h hl hr + apply IsPushout.mk' + · exact H.w + · intro T f g hi hj + exact H.hom_ext hi hj + · intro T f g hw + exact ⟨H.desc f g hw, H.inl_desc _ _ _, H.inr_desc _ _ _⟩ + +end Shape +namespace GlobularTheory + +theorem composition_isPushout (n : ℕ) : + IsPushout (Shape.target n) (Shape.source n) (compositionLeft n) (compositionRight n) := by + have h := Shape.isPushout_attach (Shape.globe (n+1)) n (n+1) + (Nat.lt_succ_self n) (Nat.lt_succ_self n) + change IsPushout (Shape.target n ≫ 𝟙 _) (Shape.source n) (compositionLeft n) (compositionRight n) at h + simpa only [Category.comp_id] using h + +noncomputable def triplePrefix (n : ℕ) : compositionShape n ⟶ tripleShape n := + (compositionShape n).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +theorem triple_isPushout (n : ℕ) : + IsPushout (Shape.target n ≫ compositionRight n) (Shape.source n) + (triplePrefix n) (tripleLast n) := Shape.isPushout_attach _ _ _ _ _ + +noncomputable def tripleDesc {S : Shape} (n : ℕ) + (a b c : Shape.globe (n+1) ⟶ S) + (hab : Shape.target n ≫ a = Shape.source n ≫ b) + (hbc : Shape.target n ≫ b = Shape.source n ≫ c) : tripleShape n ⟶ S := + (triple_isPushout n).desc ((composition_isPushout n).desc a b hab) c (by + rw [Category.assoc, IsPushout.inr_desc] + exact hbc) + +@[reassoc (attr := simp)] theorem tripleDesc_first {S : Shape} (n : ℕ) + (a b c : Shape.globe (n+1) ⟶ S) (hab) (hbc) : + tripleFirst n ≫ tripleDesc n a b c hab hbc = a := by + change (compositionLeft n ≫ triplePrefix n) ≫ tripleDesc n a b c hab hbc = a + rw [tripleDesc, Category.assoc, IsPushout.inl_desc, IsPushout.inl_desc] + +@[reassoc (attr := simp)] theorem tripleDesc_middle {S : Shape} (n : ℕ) + (a b c : Shape.globe (n+1) ⟶ S) (hab) (hbc) : + tripleMiddle n ≫ tripleDesc n a b c hab hbc = b := by + change (compositionRight n ≫ triplePrefix n) ≫ tripleDesc n a b c hab hbc = b + rw [tripleDesc, Category.assoc, IsPushout.inl_desc, IsPushout.inr_desc] + +@[reassoc (attr := simp)] theorem tripleDesc_last {S : Shape} (n : ℕ) + (a b c : Shape.globe (n+1) ⟶ S) (hab) (hbc) : + tripleLast n ≫ tripleDesc n a b c hab hbc = c := by + exact (triple_isPushout n).inr_desc _ _ _ + +theorem triple_hom_ext {S : Shape} (n : ℕ) {f g : tripleShape n ⟶ S} + (h₀ : tripleFirst n ≫ f = tripleFirst n ≫ g) + (h₁ : tripleMiddle n ≫ f = tripleMiddle n ≫ g) + (h₂ : tripleLast n ≫ f = tripleLast n ≫ g) : f = g := by + apply (triple_isPushout n).hom_ext + · apply (composition_isPushout n).hom_ext + · exact (Category.assoc _ _ _).symm.trans (h₀.trans (Category.assoc _ _ _)) + · exact (Category.assoc _ _ _).symm.trans (h₁.trans (Category.assoc _ _ _)) + · exact h₂ + +end GlobularTheory +namespace Shape + +open GlobularTheory + +noncomputable def lastArrow (S : Shape) : globe S.1 ⟶ S := S.last + +abbrev appendTwo (n : ℕ) (T : Table (n+1)) : Shape := + (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).attach + n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def appendTwoOld (n : ℕ) (T : Table (n+1)) : ⟨n+1,T⟩ ⟶ appendTwo n T := + inl ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) ≫ + (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).inl + n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def appendTwoMiddle (n : ℕ) (T : Table (n+1)) : globe (n+1) ⟶ appendTwo n T := + inr ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) ≫ + (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).inl + n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def appendTwoLast (n : ℕ) (T : Table (n+1)) : globe (n+1) ⟶ appendTwo n T := + (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).inr + n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + +noncomputable def appendTwoTail (n : ℕ) (T : Table (n+1)) : tripleShape n ⟶ appendTwo n T := + tripleDesc n (lastArrow ⟨n+1,T⟩ ≫ appendTwoOld n T) (appendTwoMiddle n T) (appendTwoLast n T) + (by + have h := (isPushout_attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).w + change (target n ≫ lastArrow ⟨n+1,T⟩) ≫ + inl ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) = + source n ≫ inr ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) at h + simpa only [appendTwoOld, appendTwoMiddle, Category.assoc] using + congrArg (fun f => f ≫ (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) + (Nat.lt_succ_self n)).inl n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) h) + (by + exact (Category.assoc _ _ _).symm.trans + (isPushout_attach (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) + (Nat.lt_succ_self n)) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)).w) + +@[reassoc (attr := simp)] theorem appendTwoTail_first (n : ℕ) (T : Table (n+1)) : + tripleFirst n ≫ appendTwoTail n T = lastArrow ⟨n+1,T⟩ ≫ appendTwoOld n T := + tripleDesc_first _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem appendTwoTail_middle (n : ℕ) (T : Table (n+1)) : + tripleMiddle n ≫ appendTwoTail n T = appendTwoMiddle n T := + tripleDesc_middle _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem appendTwoTail_last (n : ℕ) (T : Table (n+1)) : + tripleLast n ≫ appendTwoTail n T = appendTwoLast n T := + tripleDesc_last _ _ _ _ _ _ + +theorem appendTwo_isPushout (n : ℕ) (T : Table (n+1)) : + IsPushout (lastArrow ⟨n+1,T⟩) (tripleFirst n) (appendTwoOld n T) (appendTwoTail n T) := by + let S : Shape := ⟨n+1,T⟩ + let S' := S.attach n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + let p := isPushout_attach S n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + let p' := isPushout_attach S' n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) + apply IsPushout.mk' + · exact (appendTwoTail_first n T).symm + · intro R f g hf hg + have hm := congrArg (tripleMiddle n ≫ ·) hg + have hl := congrArg (tripleLast n ≫ ·) hg + simp only [appendTwoTail_middle_assoc, appendTwoTail_last_assoc] at hm hl + apply p'.hom_ext + · apply p.hom_ext + · exact (Category.assoc _ _ _).symm.trans (hf.trans (Category.assoc _ _ _)) + · exact (Category.assoc _ _ _).symm.trans (hm.trans (Category.assoc _ _ _)) + · exact hl + · intro R f g hw + have w₁ : S.seam (Nat.lt_succ_self n) ≫ f = source n ≫ (tripleMiddle n ≫ g) := by + change (target n ≫ lastArrow S) ≫ f = _ + rw [Category.assoc, hw, ← Category.assoc] + exact congrArg (· ≫ g) (triple_first_middle n) + let d₁ : S' ⟶ R := p.desc f (tripleMiddle n ≫ g) w₁ + have w₂ : S'.seam (Nat.lt_succ_self n) ≫ d₁ = source n ≫ (tripleLast n ≫ g) := by + change (target n ≫ S.inr n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) ≫ d₁ = _ + erw [Category.assoc, IsPushout.inr_desc, ← Category.assoc] + exact congrArg (· ≫ g) (triple_middle_last n) + let d₂ : appendTwo n T ⟶ R := p'.desc d₁ (tripleLast n ≫ g) w₂ + have ho : appendTwoOld n T ≫ d₂ = f := by + change (p.cocone.inl ≫ p'.cocone.inl) ≫ d₂ = _ + erw [Category.assoc, IsPushout.inl_desc, IsPushout.inl_desc] + have hm : appendTwoMiddle n T ≫ d₂ = tripleMiddle n ≫ g := by + change (p.cocone.inr ≫ p'.cocone.inl) ≫ d₂ = _ + erw [Category.assoc, IsPushout.inl_desc, IsPushout.inr_desc] + have hl : appendTwoLast n T ≫ d₂ = tripleLast n ≫ g := p'.inr_desc _ _ _ + refine ⟨d₂, ho, ?_⟩ + apply triple_hom_ext n + · rw [appendTwoTail_first_assoc, ho] + exact hw + · rw [appendTwoTail_middle_assoc, hm] + · rw [appendTwoTail_last_assoc, hl] + +end Shape + +theorem threeChain_pushout {K : Type u} [Category.{v} K] + {A D B V T B₁ B₂ : K} {s t : A ⟶ D} {a : D ⟶ B} + {c₀ c₁ : D ⟶ V} {c : V ⟶ T} {c₂ : D ⟶ T} + {i : B ⟶ B₁} {j : D ⟶ B₁} {i' : B₁ ⟶ B₂} {j' : D ⟶ B₂} + (p₀ : IsPushout t s c₀ c₁) (p₁ : IsPushout (t ≫ c₁) s c c₂) + (p : IsPushout (t ≫ a) s i j) (p' : IsPushout (t ≫ j) s i' j') + (m : T ⟶ B₂) (hm₀ : (c₀ ≫ c) ≫ m = a ≫ i ≫ i') + (hm₁ : (c₁ ≫ c) ≫ m = j ≫ i') (hm₂ : c₂ ≫ m = j') : + IsPushout a (c₀ ≫ c) (i ≫ i') m := by + apply IsPushout.mk' + · exact hm₀.symm + · intro R f g hf hg + apply p'.hom_ext + · apply p.hom_ext + · simpa only [Category.assoc] using hf + · have h := congrArg ((c₁ ≫ c) ≫ ·) hg + simpa only [← Category.assoc, hm₁] using h + · have h := congrArg (c₂ ≫ ·) hg + simpa only [← Category.assoc, hm₂] using h + · intro R f g hw + have w₁ : (t ≫ a) ≫ f = s ≫ ((c₁ ≫ c) ≫ g) := by + rw [Category.assoc, hw] + simpa only [Category.assoc] using congrArg (fun z => z ≫ c ≫ g) p₀.w + let d₁ := p.desc f ((c₁ ≫ c) ≫ g) w₁ + have w₂ : (t ≫ j) ≫ d₁ = s ≫ (c₂ ≫ g) := by + rw [Category.assoc, p.inr_desc] + simpa only [Category.assoc] using congrArg (· ≫ g) p₁.w + let d₂ := p'.desc d₁ (c₂ ≫ g) w₂ + have ho : (i ≫ i') ≫ d₂ = f := by + rw [Category.assoc, p'.inl_desc, p.inl_desc] + have hm : (j ≫ i') ≫ d₂ = (c₁ ≫ c) ≫ g := by + rw [Category.assoc, p'.inl_desc, p.inr_desc] + have hl : j' ≫ d₂ = c₂ ≫ g := p'.inr_desc _ _ _ + refine ⟨d₂, ho, ?_⟩ + apply p₁.hom_ext + · apply p₀.hom_ext + · calc + c₀ ≫ c ≫ m ≫ d₂ = a ≫ (i ≫ i') ≫ d₂ := by + simpa only [Category.assoc] using congrArg (· ≫ d₂) hm₀ + _ = a ≫ f := by rw [ho] + _ = c₀ ≫ c ≫ g := by simpa only [Category.assoc] using hw + · simpa only [Category.assoc] using + (congrArg (· ≫ d₂) hm₁).trans hm + · exact (Category.assoc _ _ _).symm.trans ((congrArg (· ≫ d₂) hm₂).trans hl) + +namespace Shape +open GlobularTheory + +theorem composition_realization_isPushout (n : ℕ) : + IsPushout (realization.map (target n)) (realization.map (source n)) + (realization.map (compositionLeft n)) (realization.map (compositionRight n)) := by + have h := realization_pushout (globe (n+1)) n (n+1) + (Nat.lt_succ_self n) (Nat.lt_succ_self n) + change IsPushout (GlobularPresheaf.face (Nat.lt_succ_self n) true ≫ 𝟙 _) + (realization.map (source n)) _ _ at h + rw [Category.comp_id] at h + exact h + +theorem triple_realization_isPushout (n : ℕ) : + IsPushout (realization.map (target n ≫ compositionRight n)) + (realization.map (source n)) (realization.map (triplePrefix n)) + (realization.map (tripleLast n)) := realization_pushout _ _ _ _ _ + +theorem appendTwo_realization_isPushout (n : ℕ) (T : Table (n+1)) : + IsPushout (realization.map (lastArrow ⟨n+1,T⟩)) (realization.map (tripleFirst n)) + (realization.map (appendTwoOld n T)) (realization.map (appendTwoTail n T)) := by + apply threeChain_pushout (composition_realization_isPushout n) + (triple_realization_isPushout n) + (realization_pushout ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) + (realization_pushout (attach ⟨n+1,T⟩ n (n+1) (Nat.lt_succ_self n) + (Nat.lt_succ_self n)) n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) + · exact congrArg realization.map (appendTwoTail_first n T) + · exact congrArg realization.map (appendTwoTail_middle n T) + · exact congrArg realization.map (appendTwoTail_last n T) + +abbrev appendThree (S : Shape) (n b : ℕ) (hl : b < S.1) (hb : b < n) : Shape := + appendTwo n (Table.attach S.2 b (n+1) hl (by omega)) + +noncomputable def appendThreeOld (S : Shape) (n b : ℕ) (hl : b < S.1) (hb : b < n) : + S ⟶ appendThree S n b hl hb := + S.inl b (n+1) hl (by omega) ≫ appendTwoOld n _ + +noncomputable def appendThreeTail (S : Shape) (n b : ℕ) (hl : b < S.1) (hb : b < n) : + tripleShape n ⟶ appendThree S n b hl hb := appendTwoTail n _ + +theorem appendThree_realization_isPushout (S : Shape) (n b : ℕ) + (hl : b < S.1) (hb : b < n) : + IsPushout (realization.map (S.seam hl)) + (realization.map (face (by omega : b < n+1) false ≫ tripleFirst n)) + (realization.map (appendThreeOld S n b hl hb)) + (realization.map (appendThreeTail S n b hl hb)) := by + have h₂ := appendTwo_realization_isPushout n (Table.attach S.2 b (n+1) hl (by omega)) + change IsPushout (realization.map (S.inr b (n+1) hl (by omega))) _ _ _ at h₂ + exact (realization_pushout S b (n+1) hl (by omega)).paste_vert h₂ + +theorem linearBlock_gt (n b k : ℕ) (hb : b < n) (hk : b < k) : + b < (linearBlock n k).1 := by + by_cases h : k < n + · rw [linearBlock_low n k h] + exact hk + · by_cases h' : k = n + · rw [linearBlock_center n k h'] + exact Nat.lt_trans hb (Nat.lt_succ_self n) + · rw [linearBlock_high n k (by omega)] + exact Nat.lt_trans hb (Nat.lt_succ_self n) + +theorem face_lastArrow_transport {b : ℕ} {S T : Shape} (e : S = T) + (hs : b < S.1) (ht : b < T.1) (ε : Bool) : + face hs ε ≫ lastArrow S = face ht ε ≫ lastArrow T ≫ eqToHom e.symm := by + subst T + simp only [eqToHom_refl, Category.comp_id] + +@[reassoc] theorem linear_face_below (n b k : ℕ) (h : b < k) (hb : b < n) + (hk : k ≤ n+1) (ε : Bool) : + realization.map (eqToHom (linearBlock_low n b hb).symm) ≫ + (linearGlobularDiagram n).face h hk ε = + realization.map (face (linearBlock_gt n b k hb h) ε ≫ lastArrow (linearBlock n k)) := by + by_cases hl : k < n + · erw [linear_face_low n b k h hl, ← Functor.map_comp] + congr 1 + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [face_lastArrow_transport (linearBlock_low n k hl) _ h] + rfl + · by_cases hc : k = n + · subst k + erw [linear_face_center n b h, ← Functor.map_comp] + congr 1 + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [face_lastArrow_transport (linearBlock_center n n rfl) _ (by omega : b < n+1)] + rfl + · have he : k = n+1 := by omega + subst k + erw [linear_face_top_low n b hb, ← Functor.map_comp] + congr 1 + simp only [eqToHom_trans_assoc, eqToHom_refl, Category.id_comp] + rw [face_lastArrow_transport (linearBlock_high n (n+1) (by omega)) _ + (show b < (tripleShape n).1 by exact (by omega : b < n+1))] + rfl + +end Shape + +noncomputable def pushoutSpanIso {K : Type u} [Category.{v} K] + {A B D E A' B' D' E' : K} {f : A ⟶ B} {g : A ⟶ D} {i : B ⟶ E} {j : D ⟶ E} + {f' : A' ⟶ B'} {g' : A' ⟶ D'} {i' : B' ⟶ E'} {j' : D' ⟶ E'} + (p : IsPushout f g i j) (p' : IsPushout f' g' i' j') + (a : A ≅ A') (b : B ≅ B') (d : D ≅ D') + (hf : f ≫ b.hom = a.hom ≫ f') (hg : g ≫ d.hom = a.hom ≫ g') : E ≅ E' := + (p.of_iso (inl' := b.inv ≫ i) (inr' := d.inv ≫ j) a b d (Iso.refl E) hf hg (by simp) (by simp)).isoIsPushout _ _ p' + +@[reassoc (attr := simp)] theorem pushoutSpanIso_inl {K : Type u} [Category.{v} K] + {A B D E A' B' D' E' : K} {f : A ⟶ B} {g : A ⟶ D} {i : B ⟶ E} {j : D ⟶ E} + {f' : A' ⟶ B'} {g' : A' ⟶ D'} {i' : B' ⟶ E'} {j' : D' ⟶ E'} + (p : IsPushout f g i j) (p' : IsPushout f' g' i' j') + (a : A ≅ A') (b : B ≅ B') (d : D ≅ D') (hf) (hg) : + i ≫ (pushoutSpanIso p p' a b d hf hg).hom = b.hom ≫ i' := by + have h := (p.of_iso (inl' := b.inv ≫ i) (inr' := d.inv ≫ j) a b d (Iso.refl E) hf hg (by simp) (by simp)).inl_isoIsPushout_hom _ _ p' + have h' := congrArg (b.hom ≫ ·) h + simpa only [pushoutSpanIso, ← Category.assoc, Iso.hom_inv_id, Category.id_comp] using h' + +@[reassoc (attr := simp)] theorem pushoutSpanIso_inr {K : Type u} [Category.{v} K] + {A B D E A' B' D' E' : K} {f : A ⟶ B} {g : A ⟶ D} {i : B ⟶ E} {j : D ⟶ E} + {f' : A' ⟶ B'} {g' : A' ⟶ D'} {i' : B' ⟶ E'} {j' : D' ⟶ E'} + (p : IsPushout f g i j) (p' : IsPushout f' g' i' j') + (a : A ≅ A') (b : B ≅ B') (d : D ≅ D') (hf) (hg) : + j ≫ (pushoutSpanIso p p' a b d hf hg).hom = d.hom ≫ j' := by + have h := (p.of_iso (inl' := b.inv ≫ i) (inr' := d.inv ≫ j) a b d (Iso.refl E) hf hg (by simp) (by simp)).inr_isoIsPushout_hom _ _ p' + have h' := congrArg (d.hom ≫ ·) h + simpa only [pushoutSpanIso, ← Category.assoc, Iso.hom_inv_id, Category.id_comp] using h' + +instance preservesColimits_linearization (n : ℕ) : PreservesColimits (Shape.linearization n) := + CoGlobularObject.preservesColimits_realization _ + +namespace Table +open Shape GlobularTheory + +structure LinearData (n : ℕ) {k : ℕ} (T : Table k) (hk : k ≤ n+1) where + table : Table (linearBlock n k).1 + iso : (linearization n).obj T.realize ≅ table.realize + port : realization.map (lastArrow (linearBlock n k)) ≫ + (linearGlobeIso n k hk).inv ≫ (linearization n).map T.lastInclusion ≫ iso.hom = + table.lastInclusion + +namespace LinearData + +noncomputable def globe (n k : ℕ) (hk : k ≤ n+1) : LinearData n (Table.globe k) hk where + table := (linearBlock n k).2 + iso := linearGlobeIso n k hk + port := by + change _ ≫ (linearGlobeIso n k hk).inv ≫ (linearization n).map (𝟙 _) ≫ + (linearGlobeIso n k hk).hom = _ + erw [CategoryTheory.Functor.map_id, Category.id_comp, Iso.inv_hom_id, Category.comp_id] + rfl + +noncomputable def extend {n k : ℕ} {T : Table k} {hk : k ≤ n+1} + (d : LinearData n T hk) (b h : ℕ) (hl : b < k) (hr : b < h) (hh : h ≤ n+1) + (R : Table (linearBlock n h).1) + (i : d.table.realize ⟶ R.realize) (j : (linearBlock n h).realize ⟶ R.realize) + (p : IsPushout + ((linearGlobularDiagram n).face hl hk true ≫ (linearGlobeIso n k hk).inv ≫ + (linearization n).map T.lastInclusion ≫ d.iso.hom) + ((linearGlobularDiagram n).face hr hh false) i j) + (hj : realization.map (lastArrow (linearBlock n h)) ≫ j = R.lastInclusion) : + LinearData n (T.attach b h hl hr) hh := by + let P := (Shape.realization_pushout ⟨k,T⟩ b h hl hr).map (linearization n) + have hf : (linearization n).map (realization.map (Shape.seam ⟨k,T⟩ hl)) ≫ d.iso.hom = + (linearGlobeIso n b (by omega)).hom ≫ + (linearGlobularDiagram n).face hl hk true ≫ (linearGlobeIso n k hk).inv ≫ + (linearization n).map T.lastInclusion ≫ d.iso.hom := by + change (linearization n).map (GlobularPresheaf.face hl true ≫ T.lastInclusion) ≫ _ = _ + rw [CategoryTheory.Functor.map_comp, Category.assoc] + have e := (linearGlobularDiagram n).globeIso_face hl hk true + have e' := congrArg (fun z => z ≫ (linearGlobeIso n k hk).inv ≫ + (linearization n).map T.lastInclusion ≫ d.iso.hom) e + erw [Category.assoc, Iso.hom_inv_id_assoc, Category.assoc] at e' + exact e' + have hg : (linearization n).map (realization.map (Shape.face hr false)) ≫ + (linearGlobeIso n h hh).hom = (linearGlobeIso n b (by omega)).hom ≫ + (linearGlobularDiagram n).face hr hh false := + (linearGlobularDiagram n).globeIso_face hr hh false + let e := pushoutSpanIso P p (linearGlobeIso n b (by omega)) d.iso + (linearGlobeIso n h hh) hf hg + refine ⟨R, e, ?_⟩ + change _ ≫ (linearGlobeIso n h hh).inv ≫ + (linearization n).map (realization.map (Shape.inr ⟨k,T⟩ b h hl hr)) ≫ e.hom = _ + erw [pushoutSpanIso_inr, Iso.inv_hom_id_assoc] + exact hj + +theorem seam_below {n k : ℕ} {T : Table k} {hk : k ≤ n+1} + (d : LinearData n T hk) (b : ℕ) (hl : b < k) (hb : b < n) : + realization.map (eqToHom (linearBlock_low n b hb).symm) ≫ + (linearGlobularDiagram n).face hl hk true ≫ (linearGlobeIso n k hk).inv ≫ + (linearization n).map T.lastInclusion ≫ d.iso.hom = + realization.map (Shape.seam ⟨(linearBlock n k).1,d.table⟩ (linearBlock_gt n b k hb hl)) := by + let f : (linearBlock n b).realize ⟶ (linearBlock n k).realize := + (linearGlobularDiagram n).face hl hk true + let m : (linearBlock n k).realize ⟶ d.table.realize := + (linearGlobeIso n k hk).inv ≫ (linearization n).map T.lastInclusion ≫ d.iso.hom + have e : realization.map (eqToHom (linearBlock_low n b hb).symm) ≫ f = + realization.map (Shape.face (linearBlock_gt n b k hb hl) true) ≫ + realization.map (lastArrow (linearBlock n k)) := + (linear_face_below n b k hl hb hk true).trans (realization.map_comp _ _) + have hp : realization.map (lastArrow (linearBlock n k)) ≫ m = d.table.lastInclusion := d.port + change realization.map (eqToHom (linearBlock_low n b hb).symm) ≫ f ≫ m = _ + erw [← Category.assoc, e, Category.assoc, hp] + rfl + +end LinearData + +private theorem lastArrow_isIso_globe {S : Shape} {k : ℕ} (e : S = Shape.globe k) : + IsIso (lastArrow S) := by + subst S + change IsIso (𝟙 (Shape.globe k)) + infer_instance + +theorem linearBlock_lastArrow_isIso (n h : ℕ) (hh : h ≤ n) : + IsIso (lastArrow (linearBlock n h)) := by + rcases lt_or_eq_of_le hh with hlt | he + · exact lastArrow_isIso_globe (linearBlock_low n h hlt) + · subst h + exact lastArrow_isIso_globe (linearBlock_center n n rfl) + +def reindex {k h : ℕ} (e : k = h) (T : Table k) : Table h := e ▸ T + +noncomputable def reindexIso {k h : ℕ} (e : k = h) (T : Table k) : + (T.reindex e).realize ≅ T.realize := by + subst h + exact Iso.refl _ + +@[reassoc] theorem reindexIso_last {k h : ℕ} (e : k = h) (T : Table k) : + (T.reindex e).lastInclusion ≫ (T.reindexIso e).hom = + realization.map (eqToHom (congrArg Shape.globe e.symm)) ≫ T.lastInclusion := by + subst h + simp only [reindex, reindexIso, Iso.refl_hom, Category.comp_id, eqToHom_refl, + CategoryTheory.Functor.map_id] + exact (Category.id_comp _).symm + +@[reassoc] theorem lastArrow_transport {S R : Shape} (e : S = R) : + realization.map (lastArrow S) ≫ realization.map (eqToHom e) = + realization.map (eqToHom (congrArg Shape.globe (congrArg Sigma.fst e))) ≫ + realization.map (lastArrow R) := by + subst R + simp + +namespace LinearData + +noncomputable def attachLow {n k : ℕ} {T : Table k} {hk : k ≤ n+1} + (d : LinearData n T hk) (b h : ℕ) (hl : b < k) (hr : b < h) (hh : h ≤ n) : + LinearData n (T.attach b h hl hr) (by omega) := by + let S : Shape := ⟨(linearBlock n k).1,d.table⟩ + have hb : b < n := by omega + let hl' := linearBlock_gt n b k hb hl + let hr' := linearBlock_gt n b h hb hr + let R := Table.attach d.table b (linearBlock n h).1 hl' hr' + let a := realization.mapIso (eqToIso (linearBlock_low n b hb).symm) + letI := linearBlock_lastArrow_isIso n h hh + let r := asIso (realization.map (lastArrow (linearBlock n h))) + let i := realization.map (Shape.inl S b (linearBlock n h).1 hl' hr') + let j := r.inv ≫ realization.map (Shape.inr S b (linearBlock n h).1 hl' hr') + apply d.extend b h hl hr (by omega) R i j + · apply (Shape.realization_pushout S b (linearBlock n h).1 hl' hr').of_iso + a (Iso.refl _) r (Iso.refl _) + · simp only [Iso.refl_hom, Category.comp_id] + exact (d.seam_below b hl hb).symm + · have h' := (linear_face_below n b h hr hb (by omega) false).symm + change realization.map _ = _ at h' + erw [CategoryTheory.Functor.map_comp] at h' + exact h' + · simp only [Iso.refl_hom, Category.comp_id, Category.id_comp] + rfl + · exact (r.hom_inv_id_assoc _).symm + · change r.hom ≫ r.inv ≫ _ = _ + erw [r.hom_inv_id_assoc] + rfl + +noncomputable def attachHighBelow {n k : ℕ} {T : Table k} {hk : k ≤ n+1} + (d : LinearData n T hk) (b : ℕ) (hl : b < k) (hb : b < n) : + LinearData n (T.attach b (n+1) hl (by omega)) le_rfl := by + let S : Shape := ⟨(linearBlock n k).1,d.table⟩ + let hl' := linearBlock_gt n b k hb hl + let R := Shape.appendThree S n b hl' hb + let e : (linearBlock n (n+1)).1 = n+1 := + congrArg Sigma.fst (linearBlock_high n (n+1) (by omega)) + let a := realization.mapIso (eqToIso (linearBlock_low n b hb).symm) + let c := realization.mapIso (eqToIso (linearBlock_high n (n+1) (by omega)).symm) + let r := R.2.reindexIso e.symm + let i := realization.map (appendThreeOld S n b hl' hb) ≫ r.inv + let j := c.inv ≫ realization.map (appendThreeTail S n b hl' hb) ≫ r.inv + apply d.extend b (n+1) hl (by omega) le_rfl (R.2.reindex e.symm) i j + · apply (appendThree_realization_isPushout S n b hl' hb).of_iso + a (Iso.refl _) c r.symm + · simp only [Iso.refl_hom, Category.comp_id] + exact (d.seam_below b hl hb).symm + · have hf := linear_face_top_low n b hb false + rw [← Category.assoc (face _ false), ← face_triple_first_last n b hb false] at hf + change _ = realization.map (_ ≫ _ ≫ _) at hf + erw [CategoryTheory.Functor.map_comp, CategoryTheory.Functor.map_comp] at hf + change (linearGlobularDiagram n).face (by omega : b < n+1) le_rfl false = + a.inv ≫ realization.map (face (by omega : b < n+1) false ≫ tripleFirst n) ≫ c.hom at hf + erw [hf, Iso.hom_inv_id_assoc] + · simp only [Iso.refl_hom, Category.id_comp] + rfl + · change _ ≫ r.inv = c.hom ≫ c.inv ≫ _ ≫ r.inv + erw [Iso.hom_inv_id_assoc] + · apply (cancel_mono r.hom).1 + change (realization.map (lastArrow (linearBlock n (n+1))) ≫ c.inv) ≫ + realization.map (appendThreeTail S n b hl' hb) ≫ r.inv ≫ r.hom = _ + erw [Iso.inv_hom_id, Category.comp_id, reindexIso_last] + have ht := lastArrow_transport (linearBlock_high n (n+1) (by omega)) + have hz := congrArg (fun z => z ≫ realization.map (appendThreeTail S n b hl' hb)) ht + change _ = realization.map (eqToHom (congrArg Shape.globe e)) ≫ R.2.lastInclusion + erw [Category.assoc] at hz + refine hz.trans ?_ + change (_ ≫ realization.map (tripleLast n)) ≫ + realization.map (appendTwoTail n _) = _ + erw [Category.assoc, ← CategoryTheory.Functor.map_comp, appendTwoTail_last] + rfl + +theorem face_top_normalized (n : ℕ) (ε : Bool) : + realization.map (eqToHom (linearBlock_center n n rfl).symm) ≫ + (linearGlobularDiagram n).face (Nat.lt_succ_self n) le_rfl ε = + realization.map (if ε then tripleLast n else tripleFirst n) ≫ + realization.map (eqToHom (linearBlock_high n (n+1) (by omega)).symm) := by + erw [linear_face_top, ← CategoryTheory.Functor.map_comp] + congr 1 + simp only [← Category.assoc, eqToHom_trans, eqToHom_refl, Category.id_comp] + rfl + +noncomputable def attachHighCritical {n : ℕ} {T : Table (n+1)} + (d : LinearData n T le_rfl) : + LinearData n (T.attach n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n)) le_rfl := by + let eh := linearBlock_high n (n+1) (Nat.lt_succ_self n) + let e : (linearBlock n (n+1)).1 = n+1 := congrArg Sigma.fst eh + let U : Table (n+1) := d.table.reindex e + let o := d.table.reindexIso e + let R := Shape.appendTwo n U + let a := realization.mapIso (eqToIso (linearBlock_center n n rfl).symm) + let c := realization.mapIso (eqToIso eh.symm) + let r := R.2.reindexIso e.symm + let i := o.inv ≫ realization.map (appendTwoOld n U) ≫ r.inv + let j := c.inv ≫ realization.map (appendTwoTail n U) ≫ r.inv + let m : (linearBlock n (n+1)).realize ⟶ d.table.realize := + (linearGlobeIso n (n+1) le_rfl).inv ≫ (linearization n).map T.lastInclusion ≫ d.iso.hom + apply d.extend n (n+1) (Nat.lt_succ_self n) (Nat.lt_succ_self n) le_rfl + (R.2.reindex e.symm) i j + · apply (appendTwo_realization_isPushout n U).of_iso a o c r.symm + · have hface : a.hom ≫ (linearGlobularDiagram n).face (Nat.lt_succ_self n) le_rfl true = + realization.map (tripleLast n) ≫ c.hom := face_top_normalized n true + have ht := lastArrow_transport eh.symm + have hp : realization.map (lastArrow (linearBlock n (n+1))) ≫ m = d.table.lastInclusion := d.port + change U.lastInclusion ≫ o.hom = a.hom ≫ + (linearGlobularDiagram n).face (Nat.lt_succ_self n) le_rfl true ≫ m + erw [← Category.assoc a.hom, hface, Category.assoc] + have ht' := congrArg (· ≫ m) ht + change (realization.map (tripleLast n) ≫ c.hom) ≫ m = + (realization.map (eqToHom (congrArg Shape.globe e.symm)) ≫ + realization.map (lastArrow (linearBlock n (n+1)))) ≫ m at ht' + erw [Category.assoc, Category.assoc, hp] at ht' + exact (reindexIso_last e d.table).trans ht'.symm + · exact (face_top_normalized n false).symm + · change _ ≫ r.inv = o.hom ≫ o.inv ≫ _ ≫ r.inv + erw [Iso.hom_inv_id_assoc] + · change _ ≫ r.inv = c.hom ≫ c.inv ≫ _ ≫ r.inv + erw [Iso.hom_inv_id_assoc] + · apply (cancel_mono r.hom).1 + change (realization.map (lastArrow (linearBlock n (n+1))) ≫ c.inv) ≫ + realization.map (appendTwoTail n U) ≫ r.inv ≫ r.hom = _ + erw [Iso.inv_hom_id, Category.comp_id, reindexIso_last] + have ht := lastArrow_transport eh + have hz := congrArg (fun z => z ≫ realization.map (appendTwoTail n U)) ht + change _ = realization.map (eqToHom (congrArg Shape.globe e)) ≫ R.2.lastInclusion + erw [Category.assoc] at hz + refine hz.trans ?_ + change (_ ≫ realization.map (tripleLast n)) ≫ realization.map (appendTwoTail n U) = _ + erw [Category.assoc, ← CategoryTheory.Functor.map_comp, appendTwoTail_last] + rfl + +end LinearData + +theorem last_le_height {k : ℕ} (T : Table k) : k ≤ T.height := by + cases T with + | globe k => exact le_rfl + | attach T b h hl hr => exact Nat.le_max_right _ _ + +noncomputable def linearData (n : ℕ) {k : ℕ} (T : Table k) + (hT : T.height ≤ n+1) : LinearData n T (T.last_le_height.trans hT) := by + induction T with + | globe k => exact LinearData.globe n k hT + | @attach k T b h hl hr ih => + have hprev : T.height ≤ n+1 := (Nat.le_max_left _ _).trans hT + have hh : h ≤ n+1 := (Nat.le_max_right _ _).trans hT + let d := ih hprev + by_cases hlo : h ≤ n + · exact d.attachLow b h hl hr hlo + · have eh : h = n+1 := by omega + subst h + by_cases hb : b < n + · exact d.attachHighBelow b hl hb + · have eb : b = n := by omega + have ek : k = n+1 := by have := T.last_le_height.trans hprev; omega + subst b k + exact d.attachHighCritical + +end Table +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Main.lean b/lean/OAI/CategoryTheory/Globular/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..96245df082996cfd9cd32c46f14a27dc30df6b1c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Main.lean @@ -0,0 +1 @@ +import OAI.CategoryTheory.Globular.HomotopyGroups diff --git a/lean/OAI/CategoryTheory/Globular/Model.lean b/lean/OAI/CategoryTheory/Globular/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..00cbbce975e044c2bc1fdf541bace0ca6e0cc408 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Model.lean @@ -0,0 +1,525 @@ +import Mathlib + +namespace OAI + +universe u v w + +namespace Grothendieck + +structure GlobularSet where + Cell : ℕ → Type u + source : ∀ n, Cell (n + 1) → Cell n + target : ∀ n, Cell (n + 1) → Cell n + source_source : ∀ n x, source n (source (n + 1) x) = source n (target (n + 1) x) + target_source : ∀ n x, target n (source (n + 1) x) = target n (target (n + 1) x) + +namespace GlobularSet + +@[ext] +structure Hom (X Y : GlobularSet.{u}) where + app : ∀ n, X.Cell n → Y.Cell n + source_app : ∀ n x, app n (X.source n x) = Y.source n (app (n + 1) x) + target_app : ∀ n x, app n (X.target n x) = Y.target n (app (n + 1) x) + +def Parallel (X : GlobularSet.{u}) : ∀ n, X.Cell n → X.Cell n → Prop + | 0, _, _ => True + | n + 1, x, y => X.source n x = X.source n y ∧ X.target n x = X.target n y + +def Joined (X : GlobularSet.{u}) (n : ℕ) (x y : X.Cell n) : Prop := + ∃ h : X.Cell (n + 1), X.source n h = x ∧ X.target n h = y + +theorem Joined.parallel {X : GlobularSet.{u}} {n : ℕ} {x y : X.Cell n} + (h : X.Joined n x y) : X.Parallel n x y := by + obtain ⟨h, rfl, rfl⟩ := h + cases n with + | zero => trivial + | succ n => exact ⟨X.source_source n h, X.target_source n h⟩ + +theorem Hom.map_joined {X Y : GlobularSet.{u}} (f : Hom X Y) {n : ℕ} + {x y : X.Cell n} (h : X.Joined n x y) : Y.Joined n (f.app n x) (f.app n y) := by + obtain ⟨h, hs, ht⟩ := h + exact ⟨f.app (n + 1) h, by rw [← f.source_app, hs], by rw [← f.target_app, ht]⟩ + +def Boundary (X : GlobularSet.{u}) : ℕ → Type u + | 0 => PUnit + | n + 1 => { p : X.Cell n × X.Cell n // X.Parallel n p.1 p.2 } + +def boundary (X : GlobularSet.{u}) : ∀ n, X.Cell n → X.Boundary n + | 0, _ => PUnit.unit + | n + 1, x => ⟨(X.source n x, X.target n x), by + cases n with + | zero => trivial + | succ n => exact ⟨X.source_source n x, X.target_source n x⟩⟩ + +theorem Hom.map_parallel {X Y : GlobularSet.{u}} (f : Hom X Y) {n : ℕ} + {x y : X.Cell n} (h : X.Parallel n x y) : + Y.Parallel n (f.app n x) (f.app n y) := by + cases n with + | zero => trivial + | succ n => + change _ = _ ∧ _ = _ + exact ⟨by rw [← f.source_app, ← f.source_app, h.1], + by rw [← f.target_app, ← f.target_app, h.2]⟩ + +def Hom.boundaryMap {X Y : GlobularSet.{u}} (f : Hom X Y) : ∀ n, X.Boundary n → Y.Boundary n + | 0, _ => PUnit.unit + | n + 1, b => ⟨(f.app n b.1.1, f.app n b.1.2), by + cases n with + | zero => trivial + | succ n => + exact ⟨by rw [← f.source_app, ← f.source_app, b.2.1], + by rw [← f.target_app, ← f.target_app, b.2.2]⟩⟩ + +end GlobularSet + +open CategoryTheory CategoryTheory.Limits Opposite + +@[ext] +structure Globe where + dim : ℕ + +namespace Globe + +inductive Face : ℕ → ℕ → Type + | id (n : ℕ) : Face n n + | face {m n : ℕ} (lt : m < n) (side : Bool) : Face m n + +namespace Face + +def comp {m n k : ℕ} : Face m n → Face n k → Face m k + | .id _, g => g + | .face h b, .id _ => .face h b + | .face h b, .face h' _ => .face (h.trans h') b + +@[simp] +theorem id_comp {m n} (f : Face m n) : comp (.id m) f = f := rfl + +@[simp] +theorem comp_id {m n} (f : Face m n) : comp f (.id n) = f := by cases f <;> rfl + +theorem assoc {a b c d} (f : Face a b) (g : Face b c) (h : Face c d) : + comp (comp f g) h = comp f (comp g h) := by + cases f <;> cases g <;> cases h <;> rfl + +end Face + +instance : Category Globe where + Hom m n := Face m.dim n.dim + id m := .id m.dim + comp := Face.comp + id_comp _ := rfl + comp_id {X Y} f := by cases X; cases Y; cases f <;> rfl + assoc {W X Y Z} f g h := by + cases W; cases X; cases Y; cases Z + cases f <;> cases g <;> cases h <;> rfl + +def face {m n : ℕ} (h : m < n) (side : Bool) : Globe.mk m ⟶ Globe.mk n := + Face.face h side + +def source (n : ℕ) : Globe.mk n ⟶ Globe.mk (n + 1) := face (Nat.lt_succ_self n) false + +def target (n : ℕ) : Globe.mk n ⟶ Globe.mk (n + 1) := face (Nat.lt_succ_self n) true + +@[simp] +theorem source_source (n) : source n ≫ source (n + 1) = source n ≫ target (n + 1) := rfl + +@[simp] +theorem target_source (n) : target n ≫ source (n + 1) = target n ≫ target (n + 1) := rfl + +end Globe + +abbrev GlobularPresheaf := Globeᵒᵖ ⥤ Type u + +namespace GlobularPresheaf + +def underlying (X : GlobularPresheaf.{u}) : GlobularSet.{u} where + Cell n := X.obj (op (Globe.mk n)) + source n := X.map (Globe.source n).op + target n := X.map (Globe.target n).op + source_source n x := by + have h := congrArg (fun f => X.map f) (congrArg Quiver.Hom.op (show Globe.source n ≫ Globe.source (n + 1) = Globe.source n ≫ Globe.target (n + 1) from rfl)) + simpa only [op_comp, X.map_comp, types_comp_apply] using ConcreteCategory.congr_hom h x + target_source n x := by + have h := congrArg (fun f => X.map f) (congrArg Quiver.Hom.op (show Globe.target n ≫ Globe.source (n + 1) = Globe.target n ≫ Globe.target (n + 1) from rfl)) + simpa only [op_comp, X.map_comp, types_comp_apply] using ConcreteCategory.congr_hom h x + +def underlyingMap {X Y : GlobularPresheaf.{u}} (f : X ⟶ Y) : X.underlying.Hom Y.underlying where + app n := f.app (op (Globe.mk n)) + source_app n x := by + exact ConcreteCategory.congr_hom (f.naturality (Globe.source n).op) x + target_app n x := by + exact ConcreteCategory.congr_hom (f.naturality (Globe.target n).op) x + +def disk (n : ℕ) : GlobularPresheaf.{u} := uliftYoneda.{u}.obj (Globe.mk n) + +def face {m n : ℕ} (h : m < n) (side : Bool) : disk.{u} m ⟶ disk.{u} n := + uliftYoneda.{u}.map (Globe.face h side) + +end GlobularPresheaf + +inductive Table : ℕ → Type + | globe (n : ℕ) : Table n + | attach {last : ℕ} (T : Table last) (b h : ℕ) (left : b < last) (right : b < h) : Table h + +namespace Table + +def height : {n : ℕ} → Table n → ℕ + | _, .globe n => n + | _, .attach T _ h _ _ => max T.height h + +noncomputable def realizeWithLast : {n : ℕ} → Table n → + (Σ X : GlobularPresheaf.{0}, GlobularPresheaf.disk n ⟶ X) + | _, .globe n => ⟨GlobularPresheaf.disk n, 𝟙 _⟩ + | _, .attach T _ h hl hr => + let prev := T.realizeWithLast + let f := GlobularPresheaf.face hl true ≫ prev.2 + let g := GlobularPresheaf.face hr false + ⟨pushout f g, pushout.inr f g⟩ + +noncomputable def realize {n} (T : Table n) : GlobularPresheaf.{0} := T.realizeWithLast.1 + +noncomputable def lastInclusion {n} (T : Table n) : GlobularPresheaf.disk n ⟶ T.realize := + T.realizeWithLast.2 + +end Table + +abbrev Shape := Σ n, Table n + +namespace Shape + +noncomputable def realize (S : Shape) : GlobularPresheaf.{0} := S.2.realize + +def height (S : Shape) : ℕ := S.2.height + +def globe (n : ℕ) : Shape := ⟨n, Table.globe n⟩ + +noncomputable instance : Category Shape where + Hom S T := S.realize ⟶ T.realize + id S := 𝟙 S.realize + comp f g := f ≫ g + id_comp := Category.id_comp + comp_id := Category.comp_id + assoc := Category.assoc + + +noncomputable def face {m n : ℕ} (h : m < n) (side : Bool) : globe m ⟶ globe n := + GlobularPresheaf.face h side + +noncomputable def source (n : ℕ) : globe n ⟶ globe (n + 1) := face (Nat.lt_succ_self n) false + +noncomputable def target (n : ℕ) : globe n ⟶ globe (n + 1) := face (Nat.lt_succ_self n) true + +def attach (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : Shape := + ⟨h, Table.attach S.2 b h hl hr⟩ + +noncomputable def seam (S : Shape) {b : ℕ} (hl : b < S.1) : globe b ⟶ S := + show GlobularPresheaf.disk b ⟶ S.realize from + GlobularPresheaf.face hl true ≫ S.2.lastInclusion + +noncomputable def inl (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + S ⟶ S.attach b h hl hr := + pushout.inl (GlobularPresheaf.face hl true ≫ S.2.lastInclusion) + (GlobularPresheaf.face hr false) + +noncomputable def inr (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + globe h ⟶ S.attach b h hl hr := + pushout.inr (GlobularPresheaf.face hl true ≫ S.2.lastInclusion) + (GlobularPresheaf.face hr false) + +end Shape + +structure TheoryData where + Hom : Shape → Shape → Type v + id : ∀ S, Hom S S + comp : ∀ {S T U}, Hom S T → Hom T U → Hom S U + id_comp : ∀ {S T} (f : Hom S T), comp (id S) f = f + comp_id : ∀ {S T} (f : Hom S T), comp f (id T) = f + assoc : ∀ {R S T U} (f : Hom R S) (g : Hom S T) (h : Hom T U), + comp (comp f g) h = comp f (comp g h) + base : ∀ {S T}, (S ⟶ T) → Hom S T + base_id : ∀ S, base (𝟙 S) = id S + base_comp : ∀ {R S T} (f : R ⟶ S) (g : S ⟶ T), base (f ≫ g) = comp (base f) (base g) + +namespace TheoryData + +structure Obj (C : TheoryData.{v}) where + shape : Shape + +instance (C : TheoryData.{v}) : Category C.Obj where + Hom S T := C.Hom S.shape T.shape + id S := C.id S.shape + comp f g := C.comp f g + id_comp := C.id_comp + comp_id := C.comp_id + assoc := C.assoc + +noncomputable def arity (C : TheoryData.{v}) : Shape ⥤ C.Obj where + obj S := ⟨S⟩ + map f := C.base f + map_id := C.base_id + map_comp := C.base_comp + +def PreservesGlobularSums (C : TheoryData.{v}) : Prop := + ∀ (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h), + IsPushout (C.arity.map (S.seam hl)) (C.arity.map (Shape.face hr false)) + (C.arity.map (S.inl b h hl hr)) (C.arity.map (S.inr b h hl hr)) + +end TheoryData + +structure GlobularTheory extends TheoryData.{v} where + sums : toTheoryData.PreservesGlobularSums + +namespace GlobularTheory + +abbrev Obj (C : GlobularTheory.{v}) := C.toTheoryData.Obj + +@[ext] +structure Morphism (C D : GlobularTheory.{v}) where + map : ∀ {S T}, C.Hom S T → D.Hom S T + map_id : ∀ S, map (C.id S) = D.id S + map_comp : ∀ {R S T} (f : C.Hom R S) (g : C.Hom S T), + map (C.comp f g) = D.comp (map f) (map g) + map_base : ∀ {S T} (f : S ⟶ T), map (C.base f) = D.base f + +namespace Morphism + +def id (C : GlobularTheory.{v}) : Morphism C C where + map f := f + map_id _ := rfl + map_comp _ _ := rfl + map_base _ := rfl + +def comp {C D E : GlobularTheory.{v}} (f : Morphism C D) (g : Morphism D E) : Morphism C E where + map a := g.map (f.map a) + map_id S := by rw [f.map_id, g.map_id] + map_comp a b := by rw [f.map_comp, g.map_comp] + map_base a := by rw [f.map_base, g.map_base] + +end Morphism + +def Parallel (C : GlobularTheory.{v}) {S : Shape} : + ∀ n, C.Hom (Shape.globe n) S → C.Hom (Shape.globe n) S → Prop + | 0, _, _ => True + | n + 1, f, g => + C.comp (C.base (Shape.source n)) f = C.comp (C.base (Shape.source n)) g ∧ + C.comp (C.base (Shape.target n)) f = C.comp (C.base (Shape.target n)) g + +structure AdmissiblePair (C : GlobularTheory.{v}) where + n : ℕ + arity : Shape + height : arity.height ≤ n + 1 + source : C.Hom (Shape.globe n) arity + target : C.Hom (Shape.globe n) arity + parallel : C.Parallel n source target + +def Fills {C D : GlobularTheory.{v}} (f : Morphism C D) (p : C.AdmissiblePair) + (z : D.Hom (Shape.globe (p.n + 1)) p.arity) : Prop := + D.comp (D.base (Shape.source p.n)) z = f.map p.source ∧ + D.comp (D.base (Shape.target p.n)) z = f.map p.target + +def IsFreeExtension {C D : GlobularTheory.{v}} (f : Morphism C D) + (G : Type v) (pair : G → C.AdmissiblePair) + (filler : ∀ g, D.Hom (Shape.globe ((pair g).n + 1)) (pair g).arity) : Prop := + (∀ g, Fills f (pair g) (filler g)) ∧ + ∀ (E : GlobularTheory.{v}) (a : Morphism C E) + (chosen : ∀ g, E.Hom (Shape.globe ((pair g).n + 1)) (pair g).arity), + (∀ g, Fills a (pair g) (chosen g)) → + ∃! b : Morphism D E, f.comp b = a ∧ ∀ g, b.map (filler g) = chosen g + +structure CellularPresentation (C : GlobularTheory.{v}) where + stage : ℕ → GlobularTheory.{v} + initial : ∀ D : GlobularTheory.{v}, Nonempty (Unique (Morphism (stage 0) D)) + step : ∀ r, Morphism (stage r) (stage (r + 1)) + generators : ℕ → Type v + pair : ∀ r, generators r → (stage r).AdmissiblePair + filler : ∀ r g, (stage (r + 1)).Hom (Shape.globe ((pair r g).n + 1)) (pair r g).arity + free : ∀ r, IsFreeExtension (step r) (generators r) (pair r) (filler r) + inclusion : ∀ r, Morphism (stage r) C + compatible : ∀ r, (step r).comp (inclusion (r + 1)) = inclusion r + colimit : ∀ (D : GlobularTheory.{v}) (a : ∀ r, Morphism (stage r) D), + (∀ r, (step r).comp (a (r + 1)) = a r) → + ∃! b : Morphism C D, ∀ r, (inclusion r).comp b = a r + +def IsCoherator (C : GlobularTheory.{v}) : Prop := + Nonempty C.CellularPresentation ∧ + ∀ p : C.AdmissiblePair, ∃ z, Fills (Morphism.id C) p z + + +noncomputable def shapeGlobes : Globe ⥤ Shape where + obj n := Shape.globe n.dim + map f := uliftYoneda.map f + map_id n := by exact uliftYoneda.map_id n + map_comp f g := by exact uliftYoneda.map_comp f g + +noncomputable def globes (C : GlobularTheory.{v}) : Globe ⥤ C.Obj := + shapeGlobes ⋙ C.toTheoryData.arity + +structure Model (C : GlobularTheory.{v}) where + presheaf : C.Objᵒᵖ ⥤ Type v + sums : ∀ (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h), + IsPullback + (presheaf.map (C.toTheoryData.arity.map (S.inl b h hl hr)).op) + (presheaf.map (C.toTheoryData.arity.map (S.inr b h hl hr)).op) + (presheaf.map (C.toTheoryData.arity.map (S.seam hl)).op) + (presheaf.map (C.toTheoryData.arity.map (Shape.face hr false)).op) + +namespace Model + +instance (C : GlobularTheory.{v}) : Category C.Model where + Hom X Y := X.presheaf ⟶ Y.presheaf + id X := 𝟙 X.presheaf + comp f g := f ≫ g + id_comp := Category.id_comp + comp_id := Category.comp_id + assoc := Category.assoc + +noncomputable def underlying {C : GlobularTheory.{v}} (X : C.Model) : GlobularSet.{v} := + GlobularPresheaf.underlying (C.globes.op ⋙ X.presheaf) + +noncomputable def underlyingMap {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) : + X.underlying.Hom Y.underlying := + GlobularPresheaf.underlyingMap (Functor.whiskerLeft C.globes.op f) + +noncomputable def freeShape (C : GlobularTheory.{v}) (S : Shape) : C.Model where + presheaf := yoneda.obj ⟨S⟩ + sums T b h hl hr := ((C.sums T b h hl hr).op.map (yoneda.obj ⟨S⟩)).flip + +noncomputable def disk (C : GlobularTheory.{v}) (n : ℕ) : C.Model := + freeShape C (Shape.globe n) + +noncomputable def J (C : GlobularTheory.{v}) (n : ℕ) : disk C n ⟶ disk C (n + 1) := + show (disk C n).presheaf ⟶ (disk C (n + 1)).presheaf from + yoneda.map (C.toTheoryData.arity.map (Shape.source n)) + +structure BoundaryAttachment {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) where + index : Type v + dimension : index → ℕ + boundary : ∀ k, X.underlying.Boundary (dimension k) + cell : ∀ k, Y.underlying.Cell (dimension k) + cell_boundary : ∀ k, Y.underlying.boundary _ (cell k) = + (underlyingMap f).boundaryMap _ (boundary k) + universal : ∀ (Z : C.Model) (g : X ⟶ Z) + (z : ∀ k, Z.underlying.Cell (dimension k)), + (∀ k, Z.underlying.boundary _ (z k) = (underlyingMap g).boundaryMap _ (boundary k)) → + ∃! h : Y ⟶ Z, f ≫ h = g ∧ ∀ k, (underlyingMap h).app _ (cell k) = z k + +structure CellularPresentation {C : GlobularTheory.{v}} (X : C.Model) where + order : Type v + linearOrder : LinearOrder order + orderBot : OrderBot order + succOrder : SuccOrder order + wellFoundedLT : WellFoundedLT order + initial : C.Model + isInitial : IsInitial initial + start : initial ⟶ X + chain : @TransfiniteCompositionOfShape _ _ order linearOrder orderBot + _ _ start succOrder wellFoundedLT + attachment : ∀ j, ¬ IsMax j → BoundaryAttachment + (chain.F.map (homOfLE (Order.le_succ j))) + +def IsCellular {C : GlobularTheory.{v}} (X : C.Model) : Prop := Nonempty X.CellularPresentation + +end Model + +def unitPair (C : GlobularTheory.{v}) (n : ℕ) : C.AdmissiblePair where + n := n + arity := Shape.globe n + height := Nat.le_succ n + source := C.id (Shape.globe n) + target := C.id (Shape.globe n) + parallel := by cases n <;> simp [Parallel] + +noncomputable def unit (C : GlobularTheory.{v}) (hC : C.IsCoherator) (n : ℕ) : + C.Hom (Shape.globe (n + 1)) (Shape.globe n) := Classical.choose (hC.2 (C.unitPair n)) + +end GlobularTheory + +namespace GlobularTheory.Model + +def eval {C : GlobularTheory.{v}} (X : C.Model) {S T : Shape} (f : C.Hom S T) : + X.presheaf.obj (op (⟨T⟩ : C.Obj)) → X.presheaf.obj (op (⟨S⟩ : C.Obj)) := + X.presheaf.map (show (⟨S⟩ : C.Obj) ⟶ ⟨T⟩ from f).op + +noncomputable def unitCell {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (x : X.underlying.Cell n) : X.underlying.Cell (n + 1) := + X.eval (C.unit hC n) x + +noncomputable def baseCell {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (x : X.underlying.Cell 0) : ∀ n, X.underlying.Cell n + | 0 => x + | n + 1 => X.unitCell hC n (X.baseCell hC x n) + +theorem map_unitCell {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (n : ℕ) (x : X.underlying.Cell n) : + (underlyingMap f).app (n + 1) (X.unitCell hC n x) = + Y.unitCell hC n ((underlyingMap f).app n x) := by + exact ConcreteCategory.congr_hom (f.naturality + (show (op (⟨Shape.globe n⟩ : C.Obj)) ⟶ op ⟨Shape.globe (n+1)⟩ from + Quiver.Hom.op (C.unit hC n))) x + +theorem map_baseCell {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + (underlyingMap f).app n (X.baseCell hC x n) = + Y.baseCell hC ((underlyingMap f).app 0 x) n := by + induction n with + | zero => rfl + | succ n ih => simp only [baseCell, map_unitCell, ih] + +def Loops {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (x : X.underlying.Cell 0) (n : ℕ) : Type v := + { z : X.underlying.Cell (n + 1) // X.underlying.source n z = X.baseCell hC x n ∧ + X.underlying.target n z = X.baseCell hC x n } + +def Components {C : GlobularTheory.{v}} (X : C.Model) : Type v := + Quot (X.underlying.Joined 0) + +def HomotopyGroup {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (x : X.underlying.Cell 0) (n : ℕ) : Type v := + Quot (fun a b : X.Loops hC x n => X.underlying.Joined (n + 1) a.1 b.1) + +noncomputable def loopsMap {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + X.Loops hC x n → Y.Loops hC ((underlyingMap f).app 0 x) n := by + have hb : ∀ k, (underlyingMap f).app k (X.baseCell hC x k) = + Y.baseCell hC ((underlyingMap f).app 0 x) k := by + intro k + induction k with + | zero => rfl + | succ k ih => + have h := ConcreteCategory.congr_hom (f.naturality + (show (op (⟨Shape.globe k⟩ : C.Obj)) ⟶ op ⟨Shape.globe (k+1)⟩ from + Quiver.Hom.op (C.unit hC k))) (X.baseCell hC x k) + change (underlyingMap f).app (k+1) (X.unitCell hC k (X.baseCell hC x k)) = + Y.unitCell hC k ((underlyingMap f).app k (X.baseCell hC x k)) at h + simpa only [baseCell, ih] using h + exact fun z => ⟨(underlyingMap f).app (n + 1) z.1, + by rw [← (underlyingMap f).source_app, z.2.1, hb], + by rw [← (underlyingMap f).target_app, z.2.2, hb]⟩ + +noncomputable def componentsMap {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) : + X.Components → Y.Components := + Quot.map ((underlyingMap f).app 0) (by + rintro _ _ ⟨h, hs, ht⟩ + exact ⟨(underlyingMap f).app _ h, + by rw [← (underlyingMap f).source_app, hs], + by rw [← (underlyingMap f).target_app, ht]⟩) + +noncomputable def homotopyMap {C : GlobularTheory.{v}} {X Y : C.Model} (f : X ⟶ Y) + (hC : C.IsCoherator) (x : X.underlying.Cell 0) (n : ℕ) : + X.HomotopyGroup hC x n → Y.HomotopyGroup hC ((underlyingMap f).app 0 x) n := + Quot.map (loopsMap f hC x n) (by + rintro _ _ ⟨h, hs, ht⟩ + exact ⟨(underlyingMap f).app _ h, + by rw [← (underlyingMap f).source_app, hs]; rfl, + by rw [← (underlyingMap f).target_app, ht]; rfl⟩) + +def WeakEquivalence {C : GlobularTheory.{v}} (hC : C.IsCoherator) {X Y : C.Model} + (f : X ⟶ Y) : Prop := + Function.Bijective (componentsMap f) ∧ + ∀ (x : X.underlying.Cell 0) (n : ℕ), Function.Bijective (homotopyMap f hC x n) + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/OneSidedPresentation.lean b/lean/OAI/CategoryTheory/Globular/OneSidedPresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebf27334467585c4b3d290662dd67b9887c5a8e3 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/OneSidedPresentation.lean @@ -0,0 +1,118 @@ +import OAI.CategoryTheory.Globular.BoundaryCells + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] {D B : GlobularFrame K} + +namespace Presentation +variable {e : Hom D B} {j : ℕ} {Y : K} +variable (f : GlobularSet.Hom (GlobularPresheaf.disk.{v} (j+1)).underlying (D.homGlob Y)) +variable (a : GlobularSet.LiftStage (e.pre Y) f j) + +noncomputable def boundaryDesc : B.bd (j+1) ⟶ Y := + ((B.boundaryEquiv (j+1)).equiv Y).symm (a.nextBoundary ⟨𝟙 _⟩) + +@[reassoc] theorem boundaryDesc_left : + B.left j ≫ boundaryDesc f a = a.app j le_rfl ⟨Globe.source j⟩ := by + have h := ((B.boundaryEquiv (j+1)).equiv Y).apply_symm_apply (a.nextBoundary ⟨𝟙 _⟩) + exact congrArg (fun b => b.1.1) h +@[reassoc] theorem boundaryDesc_right : + B.right j ≫ boundaryDesc f a = a.app j le_rfl ⟨Globe.target j⟩ := by + have h := ((B.boundaryEquiv (j+1)).equiv Y).apply_symm_apply (a.nextBoundary ⟨𝟙 _⟩) + exact congrArg (fun b => b.1.2) h + +@[reassoc] theorem boundaryApp_desc (k : ℕ) (hk : k ≤ j) + (x : (GlobularPresheaf.disk.{v} (j+1)).underlying.Cell k) : + B.boundaryApp j k hk x ≫ boundaryDesc f a = a.app k hk x := by + change ULift.{v} (Globe.Face k (j+1)) at x + rcases x with ⟨x⟩ + cases x with + | id => exfalso; change j+1 ≤ j at hk; omega + | face h ε => + rw [B.boundaryApp_face] + by_cases hk' : k = j + · subst k + rw [B.boundaryCell_top] + cases ε + · exact boundaryDesc_left f a + · exact boundaryDesc_right f a + · have hk' : k < j := by omega + erw [B.boundaryCell_low hk', Category.assoc, boundaryDesc_left] + have h := a.evalFace_app (Globe.Face.face hk' ε) le_rfl hk ⟨Globe.source j⟩ + erw [B.homGlob_eval, GlobularPresheaf.underlying_evalFace] at h + exact h.symm + +theorem boundaryDesc_comm : + e.bd (j+1) ≫ boundaryDesc f a = D.inc (j+1) ≫ f.app (j+1) ⟨𝟙 _⟩ := by + apply (D.square j).hom_ext + · rw [← Category.assoc, e.left, Category.assoc, boundaryDesc_left] + exact (a.fac j le_rfl ⟨Globe.source j⟩).trans + ((D.diskDiagram_cell f j ⟨Globe.source j⟩).trans (by + change D.diagram.face (Nat.lt_succ_self j) false ≫ _ = _ + rw [CoGlobularObject.face_succ] + exact Category.assoc _ _ _)) + · rw [← Category.assoc, e.right, Category.assoc, boundaryDesc_right] + exact (a.fac j le_rfl ⟨Globe.target j⟩).trans + ((D.diskDiagram_cell f j ⟨Globe.target j⟩).trans (by + change D.diagram.face (Nat.lt_succ_self j) true ≫ _ = _ + rw [CoGlobularObject.face_succ] + exact Category.assoc _ _ _)) + +variable [HasPushouts K] +noncomputable def oneSidedStage (e : Hom D B) (j : ℕ) : + GlobularSet.LiftStage (e.pre (oneSided e (j+1))) + (D.diskDiagram (j+1) (pushout.inr (e.bd (j+1)) (D.inc (j+1)))) j where + app k hk x := B.boundaryApp j k hk x ≫ pushout.inl _ _ + source_app k hk x := by + change B.boundaryApp j k _ _ ≫ _ = B.diagram.source k ≫ B.boundaryApp j (k+1) hk x ≫ _ + erw [B.boundaryApp_source] + exact Category.assoc _ _ _ + target_app k hk x := by + change B.boundaryApp j k _ _ ≫ _ = B.diagram.target k ≫ B.boundaryApp j (k+1) hk x ≫ _ + erw [B.boundaryApp_target] + exact Category.assoc _ _ _ + fac k hk x := by + change e.obj k ≫ B.boundaryApp j k hk x ≫ _ = D.diagram.eval x.down ≫ _ + erw [← Category.assoc, ← e.boundaryApp_naturality, Category.assoc, + pushout.condition, ← Category.assoc, D.boundaryApp_inc] + rfl + +noncomputable def oneSidedPresentation (e : Hom D B) (j : ℕ) : + Presentation e (GlobularPresheaf.disk.{v} (j+1)).underlying j where + obj := oneSided e (j+1) + base := D.diskDiagram (j+1) (pushout.inr _ _) + stage := oneSidedStage e j + desc f a := pushout.desc (boundaryDesc f a) (f.app (j+1) ⟨𝟙 _⟩) (boundaryDesc_comm f a) + base_desc f a k x := by + change (D.diagram.eval x.down ≫ pushout.inr _ _) ≫ _ = _ + erw [Category.assoc, pushout.inr_desc] + exact (D.diskDiagram_cell f k x).symm + stage_desc f a k hk x := by + change (B.boundaryApp j k hk x ≫ pushout.inl _ _) ≫ _ = _ + erw [Category.assoc, pushout.inl_desc] + exact boundaryApp_desc f a k hk x + hom_ext := by + intro Y f g hb hs + apply pushout.hom_ext + · apply (B.square j).hom_ext + · have h := hs j le_rfl ⟨Globe.source j⟩ + change (B.boundaryCell j j le_rfl false ≫ _) ≫ f = (B.boundaryCell j j le_rfl false ≫ _) ≫ g at h + rw [B.boundaryCell_top] at h + exact (Category.assoc _ _ _).symm.trans (h.trans (Category.assoc _ _ _)) + · have h := hs j le_rfl ⟨Globe.target j⟩ + change (B.boundaryCell j j le_rfl true ≫ _) ≫ f = (B.boundaryCell j j le_rfl true ≫ _) ≫ g at h + rw [B.boundaryCell_top] at h + exact (Category.assoc _ _ _).symm.trans (h.trans (Category.assoc _ _ _)) + · have h := hb (j+1) ⟨𝟙 _⟩ + change (𝟙 _ ≫ pushout.inr _ _) ≫ f = (𝟙 _ ≫ pushout.inr _ _) ≫ g at h + simpa only [Category.id_comp] using h +end Presentation +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Realization.lean b/lean/OAI/CategoryTheory/Globular/Realization.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7a9784fb4e6c07079969cb0e91ad8972c805dc4 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Realization.lean @@ -0,0 +1,268 @@ +import OAI.CategoryTheory.Globular.Cutoff + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace Shape + +noncomputable def realization : Shape ⥤ GlobularPresheaf.{0} where + obj := realize + map f := f + +noncomputable def liftedRealization : Shape ⥤ GlobularPresheaf.{v} := + realization ⋙ (Functor.whiskeringRight Globeᵒᵖ (Type) (Type v)).obj uliftFunctor.{v,0} + +theorem realization_pushout (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + IsPushout (realization.map (S.seam hl)) (realization.map (face hr false)) + (realization.map (S.inl b h hl hr)) (realization.map (S.inr b h hl hr)) := + IsPushout.of_hasPushout _ _ + +theorem liftedRealization_pushout (S : Shape) (b h : ℕ) (hl : b < S.1) (hr : b < h) : + IsPushout (liftedRealization.{v}.map (S.seam hl)) + (liftedRealization.{v}.map (face hr false)) + (liftedRealization.{v}.map (S.inl b h hl hr)) + (liftedRealization.{v}.map (S.inr b h hl hr)) := + (realization_pushout S b h hl hr).map + ((Functor.whiskeringRight Globeᵒᵖ (Type) (Type v)).obj uliftFunctor.{v,0}) + +end Shape + +namespace GlobularPresheaf + +noncomputable def tuples (X : GlobularPresheaf.{v}) : TupleSystem.{v} where + presheaf := Shape.liftedRealization.op ⋙ yoneda.obj X + sums S b h hl hr := + ((Shape.liftedRealization_pushout S b h hl hr).op.flip).map (yoneda.obj X) + +end GlobularPresheaf + +namespace TupleSystem + +noncomputable def relativeData {T U : TupleSystem.{v}} (f : T.presheaf ⟶ U.presheaf) : + TheoryData.{v} where + Hom S R := Arrow.mk (f.app (op R)) ⟶ Arrow.mk (f.app (op S)) + id _ := 𝟙 _ + comp a b := b ≫ a + id_comp a := Category.comp_id a + comp_id a := Category.id_comp a + assoc a b c := (Category.assoc c b a).symm + base a := Arrow.homMk (T.presheaf.map a.op) (U.presheaf.map a.op) (f.naturality a.op) + base_id S := by apply Arrow.hom_ext <;> exact CategoryTheory.Functor.map_id _ _ + base_comp a b := by apply Arrow.hom_ext <;> exact CategoryTheory.Functor.map_comp _ b.op a.op + +noncomputable def relativeEmbedding {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) : (relativeData f).Obj ⥤ (Arrow (Type v))ᵒᵖ where + obj S := op (Arrow.mk (f.app (op S.shape))) + map a := a.op + +noncomputable def relativeEmbedding_fullyFaithful {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) : (relativeEmbedding f).FullyFaithful where + preimage a := a.unop + +private theorem arrow_isPullback {P X Y Z : Arrow (Type v)} + {a : P ⟶ X} {b : P ⟶ Y} {c : X ⟶ Z} {d : Y ⟶ Z} + (hl : IsPullback a.left b.left c.left d.left) + (hr : IsPullback a.right b.right c.right d.right) : IsPullback a b c d where + w := Arrow.hom_ext _ _ hl.w hr.w + isLimit' := ⟨Comma.fstSndJointlyReflectLimit + ((PullbackCone.isLimitMapConeEquiv _ _).symm hl.isLimit) + ((PullbackCone.isLimitMapConeEquiv _ _).symm hr.isLimit)⟩ + +noncomputable def relativeTheory {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) : GlobularTheory.{v} where + toTheoryData := relativeData f + sums S b h hl hr := by + let : (relativeEmbedding f).Full := (relativeEmbedding_fullyFaithful f).full + let : (relativeEmbedding f).Faithful := (relativeEmbedding_fullyFaithful f).faithful + apply IsPushout.of_map_of_faithful (relativeEmbedding f) + exact (arrow_isPullback (T.sums S b h hl hr) (U.sums S b h hl hr)).op.flip + +noncomputable def relativeSource {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) : GlobularTheory.Morphism (relativeTheory f) T.endTheory where + map a := a.left + map_id _ := rfl + map_comp _ _ := rfl + map_base _ := rfl + +noncomputable def relativeTarget {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) : GlobularTheory.Morphism (relativeTheory f) U.endTheory where + map a := a.right + map_id _ := rfl + map_comp _ _ := rfl + map_base _ := rfl + +noncomputable def relativeModelMap {C : GlobularTheory.{v}} {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) (a : GlobularTheory.Morphism C (relativeTheory f)) : + T.model (a.comp (relativeSource f)) ⟶ U.model (a.comp (relativeTarget f)) where + app S := f.app (op S.unop.shape) + naturality _ _ g := (a.map g.unop).w + +end TupleSystem + +namespace GlobularSet + +theorem lift_operation {X Y : GlobularSet.{v}} (η : X.Hom Y) + {A B : Type v} (f : A → B) (n : ℕ) + (s t : A → X.Cell n) (s' t' : B → Y.Cell n) + (hs : ∀ a, η.app n (s a) = s' (f a)) + (ht : ∀ a, η.app n (t a) = t' (f a)) + (hp : ∀ b, Y.Parallel n (s' b) (t' b)) + (z : A → X.Cell (n+1)) (hzs : ∀ a, X.source n (z a) = s a) + (hzt : ∀ a, X.target n (z a) = t a) + (h : Function.Bijective f ∨ Function.Bijective (Y.boundary (n+1))) : + ∃ z' : B → Y.Cell (n+1), + (∀ b, Y.source n (z' b) = s' b) ∧ + (∀ b, Y.target n (z' b) = t' b) ∧ + (∀ a, η.app (n+1) (z a) = z' (f a)) := by + classical + rcases h with h | h + · let e : A ≃ B := Equiv.ofBijective f h + refine ⟨fun b => η.app (n+1) (z (e.symm b)), ?_, ?_, ?_⟩ + · intro b + rw [← η.source_app, hzs, hs] + exact congrArg s' (e.apply_symm_apply b) + · intro b + rw [← η.target_app, hzt, ht] + exact congrArg t' (e.apply_symm_apply b) + · intro a + exact congrArg (fun a => η.app (n+1) (z a)) (e.symm_apply_apply a).symm + · let e : Y.Cell (n+1) ≃ Y.Boundary (n+1) := Equiv.ofBijective _ h + let b (x : B) : Y.Boundary (n+1) := ⟨(s' x, t' x), hp x⟩ + have hb (x : B) : Y.boundary (n+1) (e.symm (b x)) = b x := e.apply_symm_apply _ + refine ⟨fun x => e.symm (b x), ?_, ?_, ?_⟩ + · intro x + exact congrArg (fun a => a.1.1) (hb x) + · intro x + exact congrArg (fun a => a.1.2) (hb x) + · intro a + apply h.1 + rw [hb, ← η.boundary_app] + apply Subtype.ext + change (η.app n (X.source n (z a)), η.app n (X.target n (z a))) = + (s' (f a), t' (f a)) + rw [hzs, hs, hzt, ht] + +end GlobularSet + +namespace TupleSystem + +noncomputable def underlying (T : TupleSystem.{v}) : GlobularSet.{v} := + GlobularPresheaf.underlying (GlobularTheory.shapeGlobes.op ⋙ T.presheaf) + +noncomputable def underlyingMap {T U : TupleSystem.{v}} (f : T.presheaf ⟶ U.presheaf) : + T.underlying.Hom U.underlying := + GlobularPresheaf.underlyingMap (Functor.whiskerLeft GlobularTheory.shapeGlobes.op f) + +theorem parallel_eval (T : TupleSystem.{v}) {S : Shape} (n : ℕ) + (s t : T.presheaf.obj (op S) ⟶ T.presheaf.obj (op (Shape.globe n))) + (hp : T.endTheory.Parallel n s t) + (x : T.presheaf.obj (op S)) : T.underlying.Parallel n (s x) (t x) := by + cases n with + | zero => trivial + | succ n => + exact ⟨ConcreteCategory.congr_hom hp.1 x, ConcreteCategory.congr_hom hp.2 x⟩ + +theorem relativeSource_liftsFillers {T U : TupleSystem.{v}} + (f : T.presheaf ⟶ U.presheaf) (q : ℕ) + (hlow : ∀ S : Shape, S.height ≤ q → Function.Bijective (f.app (op S))) + (hhigh : ∀ k, q < k → Function.Bijective (U.underlying.boundary k)) : + GlobularTheory.LiftsFillers (relativeSource f) := by + intro a z hz + change T.presheaf.obj (op a.arity) ⟶ T.presheaf.obj (op (Shape.globe (a.n+1))) at z + have hp := U.parallel_eval a.n a.source.right a.target.right + ((relativeTarget f).mapPair a).parallel + have choice : Function.Bijective (f.app (op a.arity)) ∨ + Function.Bijective (U.underlying.boundary (a.n+1)) := by + by_cases h : a.n+1 ≤ q + · exact Or.inl (hlow _ (a.height.trans h)) + · exact Or.inr (hhigh _ (Nat.lt_of_not_ge h)) + obtain ⟨z', hzs, hzt, hη⟩ := GlobularSet.lift_operation (underlyingMap f) + (f.app (op a.arity)) a.n a.source.left a.target.left a.source.right a.target.right + (fun x => ConcreteCategory.congr_hom a.source.w x) + (fun x => ConcreteCategory.congr_hom a.target.w x) hp z + (fun x => ConcreteCategory.congr_hom hz.1 x) + (fun x => ConcreteCategory.congr_hom hz.2 x) choice + let w : (relativeTheory f).Hom (Shape.globe (a.n+1)) a.arity := + Arrow.homMk z (TypeCat.ofHom z') (ConcreteCategory.hom_ext _ _ hη) + refine ⟨w, ⟨?_, ?_⟩, rfl⟩ + · apply Arrow.hom_ext + · exact hz.1 + · exact ConcreteCategory.hom_ext _ _ hzs + · apply Arrow.hom_ext + · exact hz.2 + · exact ConcreteCategory.hom_ext _ _ hzt + + +private theorem bijective_pullback_map + {P A B R P' A' B' R' : Type v} + (l : P ⟶ A) (r : P ⟶ B) (s : A ⟶ R) (t : B ⟶ R) + (l' : P' ⟶ A') (r' : P' ⟶ B') (s' : A' ⟶ R') (t' : B' ⟶ R') + (h : IsPullback l r s t) (h' : IsPullback l' r' s' t') + (p : P ⟶ P') (a : A ⟶ A') (b : B ⟶ B') (c : R ⟶ R') + (wl : l ≫ a = p ≫ l') (wr : r ≫ b = p ≫ r') + (ws : s ≫ c = a ≫ s') (wt : t ≫ c = b ≫ t') + (ha : Function.Bijective a) (hb : Function.Bijective b) + (hc : Function.Injective c) : Function.Bijective p := by + have hl (x : P) : a (l x) = l' (p x) := ConcreteCategory.congr_hom wl x + have hr (x : P) : b (r x) = r' (p x) := ConcreteCategory.congr_hom wr x + have hs (x : A) : c (s x) = s' (a x) := ConcreteCategory.congr_hom ws x + have ht (x : B) : c (t x) = t' (b x) := ConcreteCategory.congr_hom wt x + constructor + · intro x y hp + apply Types.ext_of_isPullback h + · apply ha.1 + rw [hl, hl, hp] + · apply hb.1 + rw [hr, hr, hp] + · intro x + obtain ⟨y, hy⟩ := ha.2 (l' x) + obtain ⟨z, hz⟩ := hb.2 (r' x) + have w : s y = t z := by + apply hc + rw [hs, ht, hy, hz] + exact ConcreteCategory.congr_hom h'.w x + obtain ⟨u, hu, hv⟩ := Types.exists_of_isPullback h y z w + refine ⟨u, Types.ext_of_isPullback h' ?_ ?_⟩ + · rw [← hl, hu, hy] + · rw [← hr, hv, hz] + +theorem bijective_of_globes {T U : TupleSystem.{v}} (f : T.presheaf ⟶ U.presheaf) + (q : ℕ) (hg : ∀ k, k ≤ q → Function.Bijective (f.app (op (Shape.globe k)))) + (S : Shape) (hS : S.height ≤ q) : Function.Bijective (f.app (op S)) := by + cases S with + | mk k table => + induction table with + | globe k => exact hg k hS + | @attach last tab b h hl hr ih => + have htab : (Shape.height ⟨last, tab⟩) ≤ q := (max_le_iff.mp hS).1 + have hh : h ≤ q := (max_le_iff.mp hS).2 + apply bijective_pullback_map + (T.presheaf.map (Shape.inl ⟨last, tab⟩ b h hl hr).op) + (T.presheaf.map (Shape.inr ⟨last, tab⟩ b h hl hr).op) + (T.presheaf.map (Shape.seam ⟨last, tab⟩ hl).op) + (T.presheaf.map (Shape.face hr false).op) + (U.presheaf.map (Shape.inl ⟨last, tab⟩ b h hl hr).op) + (U.presheaf.map (Shape.inr ⟨last, tab⟩ b h hl hr).op) + (U.presheaf.map (Shape.seam ⟨last, tab⟩ hl).op) + (U.presheaf.map (Shape.face hr false).op) + (T.sums _ b h hl hr) (U.sums _ b h hl hr) + _ (f.app (op ⟨last, tab⟩)) (f.app (op (Shape.globe h))) + (f.app (op (Shape.globe b))) + · exact f.naturality _ + · exact f.naturality _ + · exact f.naturality _ + · exact f.naturality _ + · exact ih htab + · exact hg h hh + · exact (hg b (Nat.le_trans (Nat.le_of_lt hr) hh)).1 + +end TupleSystem + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/ReflectedCylinder.lean b/lean/OAI/CategoryTheory/Globular/ReflectedCylinder.lean new file mode 100644 index 0000000000000000000000000000000000000000..acf117fa958087206e0c691faba47ea5f7f97de1 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/ReflectedCylinder.lean @@ -0,0 +1,126 @@ +import OAI.CategoryTheory.Globular.CylinderPathLifting + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{v,v} (CutoffModels C q)] [HasLimitsOfSize.{v,v} (CutoffModels C q)] +variable (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + +noncomputable def reflectedCylinder (Y : CutoffModels C q) : CutoffModels C q := + cutoffObject hC q (fullCylinder hC q n hnq H Y) + +noncomputable def reflectedCylinderEndpoint (Y : CutoffModels C q) (ε : Bool) : + reflectedCylinder hC q n hnq H Y ⟶ Y := + (cutoffEquiv hC q (fullCylinder hC q n hnq H Y) Y).symm + (fullCylinderEndpoint hC q n hnq H Y ε) + +theorem reflectedCylinderEndpoint_factor (Y : CutoffModels C q) (ε : Bool) : + cutoffUnit hC q (fullCylinder hC q n hnq H Y) ≫ + (reflectedCylinderEndpoint hC q n hnq H Y ε).hom = + fullCylinderEndpoint hC q n hnq H Y ε := + (cutoffEquiv hC q (fullCylinder hC q n hnq H Y) Y).apply_symm_apply _ + +theorem reflectedCylinderEndpoint_app (Y : CutoffModels C q) (ε : Bool) (j : ℕ) + (a : (fullCylinder hC q n hnq H Y).underlying.Cell j) : + (underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom).app j + ((underlyingMap (cutoffUnit hC q (fullCylinder hC q n hnq H Y))).app j a) = + (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app j a := + congrFun (congrArg (fun z => (underlyingMap z).app j) + (reflectedCylinderEndpoint_factor hC q n hnq H Y ε)) a + +theorem reflectedCylinderEndpoint_lifts (Y : CutoffModels C q) (ε : Bool) : + (boundaryClass hC q 0).rlp (reflectedCylinderEndpoint hC q n hnq H Y ε) := by + rw [boundaryClass_rlp_iff] + intro j _ + by_cases hj : j ≤ q + · rw [hasLiftingProperty_I_iff] + intro bd y hy + let η := underlyingMap (cutoffUnit hC q (fullCylinder hC q n hnq H Y)) + let p := underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom + have hη := GlobularSet.Hom.boundaryMap_bijective_of_low η j + (fun k hk => cutoffUnit_low_bijective hC q _ k (by omega)) + obtain ⟨bd',hbd'⟩ := hη.surjective bd + have hf : η.comp p = underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε) := + congrArg underlyingMap (reflectedCylinderEndpoint_factor hC q n hnq H Y ε) + have hy' : Y.obj.underlying.boundary j y = + (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).boundaryMap j bd' := by + exact hy.trans ((congrArg (p.boundaryMap j) hbd'.symm).trans + ((GlobularSet.Hom.boundaryMap_comp η p j bd').symm.trans + (congrArg (fun f => f.boundaryMap j bd') hf))) + obtain ⟨a,ha,hpa⟩ := fullCylinderEndpoint_liftsBoundary hC q n hnq H Y ε j bd' y hy' + refine ⟨η.app j a, ?_, ?_⟩ + · exact (η.boundary_app j a).symm.trans + ((congrArg (η.boundaryMap j) ha).trans hbd') + · exact (reflectedCylinderEndpoint_app hC q n hnq H Y ε j a).trans hpa + · exact hasLiftingProperty_I_of_unique _ j + ((reflectedCylinder hC q n hnq H Y).property j (by omega)) (Y.property j (by omega)) + +theorem reflectedCylinder_joint_cells (Y : CutoffModels C q) (k : ℕ) (hk : n ≤ k) + (t : (reflectedCylinder hC q n hnq H Y).obj.underlying.Cell k) + (u : Bool → Y.obj.underlying.Cell (k+1)) + (hu : ∀ ε, (underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom).app k t = + Y.obj.underlying.source k (u ε)) : + ∃ l : (reflectedCylinder hC q n hnq H Y).obj.underlying.Cell (k+1), + (reflectedCylinder hC q n hnq H Y).obj.underlying.source k l = t ∧ + ∀ ε, (underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom).app (k+1) l = u ε := by + by_cases hkq : k ≤ q + · let η := underlyingMap (cutoffUnit hC q (fullCylinder hC q n hnq H Y)) + obtain ⟨t',ht'⟩ := (cutoffUnit_low_bijective hC q (fullCylinder hC q n hnq H Y) k hkq).surjective t + have hu' ε : (underlyingMap (fullCylinderEndpoint hC q n hnq H Y ε)).app k t' = + Y.obj.underlying.source k (u ε) := by + rw [← reflectedCylinderEndpoint_app, ht'] + exact hu ε + obtain ⟨l,hl,hpl⟩ := fullCylinder_joint hC q n hnq H Y k hk t' u hu' + refine ⟨η.app (k+1) l, ?_, ?_⟩ + · exact (η.source_app k l).symm.trans ((congrArg (η.app k) hl).trans ht') + · intro ε + exact (reflectedCylinderEndpoint_app hC q n hnq H Y ε (k+1) l).trans (hpl ε) + · let R := reflectedCylinder hC q n hnq H Y + refine ⟨R.obj.unitCell hC k t, R.obj.unitCell_source hC k t, ?_⟩ + intro ε + apply (Y.obj.underlying.source_bijective_of_coskeletal q k Y.property (by omega)).injective + rw [← (underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom).source_app, + R.obj.unitCell_source] + exact hu ε + +noncomputable def cylinderPathData (Y : CutoffModels C q) : CutoffPathData hC q n Y where + P := reflectedCylinder hC q n hnq H Y + p₀ := reflectedCylinderEndpoint hC q n hnq H Y false + p₁ := reflectedCylinderEndpoint hC q n hnq H Y true + lifts₀ := reflectedCylinderEndpoint_lifts hC q n hnq H Y false + lifts₁ := reflectedCylinderEndpoint_lifts hC q n hnq H Y true + joint k hk t u₀ u₁ h₀ h₁ := by + let R := reflectedCylinder hC q n hnq H Y + let u : Bool → Y.obj.underlying.Cell (k+1) := fun ε => + if ε then cutoffCellEquiv hC q Y (k+1) u₁ else cutoffCellEquiv hC q Y (k+1) u₀ + have hu ε : (underlyingMap (reflectedCylinderEndpoint hC q n hnq H Y ε).hom).app k + (cutoffCellEquiv hC q R k t) = Y.obj.underlying.source k (u ε) := by + cases ε + · have h := congrArg (cutoffCellEquiv hC q Y k) h₀ + erw [cutoffCellEquiv_comp, ← cutoffDiskFrame_source, cutoffCellEquiv_source] at h + exact h + · have h := congrArg (cutoffCellEquiv hC q Y k) h₁ + erw [cutoffCellEquiv_comp, ← cutoffDiskFrame_source, cutoffCellEquiv_source] at h + exact h + obtain ⟨l,hl,he⟩ := reflectedCylinder_joint_cells hC q n hnq H Y k hk + (cutoffCellEquiv hC q R k t) u hu + refine ⟨(cutoffCellEquiv hC q R (k+1)).symm l, ?_, ?_, ?_⟩ + · apply (cutoffCellEquiv hC q R k).injective + erw [← cutoffDiskFrame_source,cutoffCellEquiv_source, Equiv.apply_symm_apply] + exact hl + · apply (cutoffCellEquiv hC q Y (k+1)).injective + erw [cutoffCellEquiv_comp, Equiv.apply_symm_apply] + exact he false + · apply (cutoffCellEquiv hC q Y (k+1)).injective + erw [cutoffCellEquiv_comp, Equiv.apply_symm_apply] + exact he true + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Reflection.lean b/lean/OAI/CategoryTheory/Globular/Reflection.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9d2e74058a2b6955f67a390d2f70fc9da51ff3f --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Reflection.lean @@ -0,0 +1,258 @@ +import OAI.CategoryTheory.Globular.Factorization + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace GlobularTheory.Model + +def OperationCompatible {C : GlobularTheory.{v}} {R Y : C.Model} + (g : R.tuples.presheaf ⟶ Y.tuples.presheaf) {S T : Shape} (u : C.Hom S T) : Prop := + ∀ x, g.app (op S) (R.eval u x) = Y.eval u (g.app (op T) x) + +noncomputable def compatibleData {C : GlobularTheory.{v}} {R Y : C.Model} + (g : R.tuples.presheaf ⟶ Y.tuples.presheaf) : TheoryData.{v} where + Hom S T := {u : C.Hom S T // OperationCompatible g u} + id S := ⟨C.id S, fun x => (congrArg (g.app (op S)) (R.eval_id x)).trans + (Y.eval_id _).symm⟩ + comp {S _T U} a b := ⟨C.comp a.1 b.1, fun x => + (congrArg (g.app (op S)) (R.eval_comp a.1 b.1 x)).trans + ((a.2 (R.eval b.1 x)).trans + ((congrArg (Y.eval a.1) (b.2 x)).trans + (Y.eval_comp a.1 b.1 (g.app (op U) x)).symm))⟩ + id_comp a := Subtype.ext (C.id_comp a.1) + comp_id a := Subtype.ext (C.comp_id a.1) + assoc a b c := Subtype.ext (C.assoc a.1 b.1 c.1) + base u := ⟨C.base u, fun x => ConcreteCategory.congr_hom (g.naturality u.op) x⟩ + base_id S := Subtype.ext (C.base_id S) + base_comp a b := Subtype.ext (C.base_comp a b) + +noncomputable def compatibleTheory {C : GlobularTheory.{v}} {R Y : C.Model} + (g : R.tuples.presheaf ⟶ Y.tuples.presheaf) : GlobularTheory.{v} where + toTheoryData := compatibleData g + sums S b h hl hr := by + apply IsPushout.mk' + · apply Subtype.ext + exact (C.sums S b h hl hr).w + · intro T a a' ha hb + apply Subtype.ext + apply (C.sums S b h hl hr).hom_ext (W := (⟨T.shape⟩ : C.Obj)) + · exact congrArg Subtype.val ha + · exact congrArg Subtype.val hb + · intro T a b' hab + let d : C.Hom (S.attach b h hl hr) T.shape := + (C.sums S b h hl hr).desc (W := (⟨T.shape⟩ : C.Obj)) a.1 b'.1 + (congrArg Subtype.val hab) + have hd₀ : C.comp (C.base (S.inl b h hl hr)) d = a.1 := + (C.sums S b h hl hr).inl_desc _ _ _ + have hd₁ : C.comp (C.base (S.inr b h hl hr)) d = b'.1 := + (C.sums S b h hl hr).inr_desc _ _ _ + have hd : OperationCompatible g d := by + intro x + apply Types.ext_of_isPullback (Y.sums S b h hl hr) + · have w := ConcreteCategory.congr_hom + (g.naturality (S.inl b h hl hr).op) (R.eval d x) + change g.app (op S) (R.eval (C.base (S.inl b h hl hr)) (R.eval d x)) = _ at w + have wr := (R.eval_comp (C.base (S.inl b h hl hr)) d x).symm.trans + (congrArg (fun z => R.eval z x) hd₀) + have wy := (Y.eval_comp (C.base (S.inl b h hl hr)) d + (g.app (op T.shape) x)).symm.trans + (congrArg (fun z => Y.eval z (g.app (op T.shape) x)) hd₀) + exact w.symm.trans ((congrArg (g.app (op S)) wr).trans ((a.2 x).trans wy.symm)) + · have w := ConcreteCategory.congr_hom + (g.naturality (S.inr b h hl hr).op) (R.eval d x) + have wr := (R.eval_comp (C.base (S.inr b h hl hr)) d x).symm.trans + (congrArg (fun z => R.eval z x) hd₁) + have wy := (Y.eval_comp (C.base (S.inr b h hl hr)) d + (g.app (op T.shape) x)).symm.trans + (congrArg (fun z => Y.eval z (g.app (op T.shape) x)) hd₁) + exact w.symm.trans ((congrArg (g.app (op (Shape.globe h))) wr).trans + ((b'.2 x).trans wy.symm)) + exact ⟨⟨d, hd⟩, Subtype.ext hd₀, Subtype.ext hd₁⟩ + +noncomputable def compatibleProjection {C : GlobularTheory.{v}} {R Y : C.Model} + (g : R.tuples.presheaf ⟶ Y.tuples.presheaf) : Morphism (compatibleTheory g) C where + map u := u.1 + map_id _ := rfl + map_comp _ _ := rfl + map_base _ := rfl + +theorem compatibleProjection_liftsFillers {C : GlobularTheory.{v}} + {X R Y : C.Model} (η : X ⟶ R) (f : X ⟶ Y) + (g : R.tuples.presheaf ⟶ Y.tuples.presheaf) (q : ℕ) + (hη : ∀ k, k ≤ q → Function.Bijective ((underlyingMap η).app k)) + (hY : ∀ j, q < j → Function.Bijective (Y.underlying.boundary j)) + (hg : (Functor.whiskerLeft C.toTheoryData.arity.op η) ≫ g = + Functor.whiskerLeft C.toTheoryData.arity.op f) : + LiftsFillers (compatibleProjection g) := by + intro p z hz + have hnat : OperationCompatible g z := by + intro x + by_cases hn : p.n+1 ≤ q + · have ht : Function.Bijective + ((Functor.whiskerLeft C.toTheoryData.arity.op η).app (op p.arity)) := + TupleSystem.bijective_of_globes (T := X.tuples) (U := R.tuples) + (Functor.whiskerLeft C.toTheoryData.arity.op η) q hη p.arity (p.height.trans hn) + obtain ⟨x, rfl⟩ := ht.2 x + have hηz := ConcreteCategory.congr_hom + (η.naturality (show (⟨Shape.globe (p.n+1)⟩ : C.Obj) ⟶ ⟨p.arity⟩ from z).op) x + have hfz := ConcreteCategory.congr_hom + (f.naturality (show (⟨Shape.globe (p.n+1)⟩ : C.Obj) ⟶ ⟨p.arity⟩ from z).op) x + have fac (S : Shape) (x : X.presheaf.obj (op (⟨S⟩ : C.Obj))) : + g.app (op S) (η.app (op ⟨S⟩) x) = f.app (op ⟨S⟩) x := + ConcreteCategory.congr_hom (congrArg (fun k : X.tuples.presheaf ⟶ Y.tuples.presheaf => k.app (op S)) hg) x + exact (congrArg (g.app (op (Shape.globe (p.n+1)))) hηz.symm).trans + ((fac (Shape.globe (p.n+1)) (X.eval z x)).trans + (hfz.trans (congrArg (Y.eval z) (fac p.arity x).symm))) + · apply (hY (p.n+1) (by omega)).1 + apply Subtype.ext + apply Prod.ext + · have gs := ConcreteCategory.congr_hom + (g.naturality (Shape.source p.n).op) (R.eval z x) + have hs : C.comp (C.base (Shape.source p.n)) z = p.source.1 := hz.1 + have wr := (R.eval_comp (C.base (Shape.source p.n)) z x).symm.trans + (congrArg (fun u => R.eval u x) hs) + have wy := (Y.eval_comp (C.base (Shape.source p.n)) z (g.app (op p.arity) x)).symm.trans + (congrArg (fun u => Y.eval u (g.app (op p.arity) x)) hs) + exact gs.symm.trans ((congrArg (g.app (op (Shape.globe p.n))) wr).trans + ((p.source.2 x).trans wy.symm)) + · have gt := ConcreteCategory.congr_hom + (g.naturality (Shape.target p.n).op) (R.eval z x) + have ht : C.comp (C.base (Shape.target p.n)) z = p.target.1 := hz.2 + have wr := (R.eval_comp (C.base (Shape.target p.n)) z x).symm.trans + (congrArg (fun u => R.eval u x) ht) + have wy := (Y.eval_comp (C.base (Shape.target p.n)) z (g.app (op p.arity) x)).symm.trans + (congrArg (fun u => Y.eval u (g.app (op p.arity) x)) ht) + exact gt.symm.trans ((congrArg (g.app (op (Shape.globe p.n))) wr).trans + ((p.target.2 x).trans wy.symm)) + refine ⟨⟨z, hnat⟩, ?_, rfl⟩ + exact ⟨Subtype.ext hz.1, Subtype.ext hz.2⟩ + + +theorem existsUnique_factor_coskeletal {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X R Y : C.Model} (η : X ⟶ R) (f : X ⟶ Y) (q : ℕ) + (hη : ∀ k, k ≤ q → Function.Bijective ((underlyingMap η).app k)) + (hY : ∀ j, q < j → Function.Bijective (Y.underlying.boundary j)) : + ∃! l : R ⟶ Y, η ≫ l = f := by + obtain ⟨g₀, hg₀, hgUnique⟩ := GlobularSet.existsUnique_factor_low_bijective + (underlyingMap η) (underlyingMap f) q hη hY + let g : R.tuples.presheaf ⟶ Y.tuples.presheaf := TupleSystem.mapFromUnderlying (T := R.tuples) (U := Y.tuples) g₀ + have hg : (Functor.whiskerLeft C.toTheoryData.arity.op η) ≫ g = + Functor.whiskerLeft C.toTheoryData.arity.op f := by + apply TupleSystem.hom_ext_globes (T := X.tuples) (U := Y.tuples) + intro n + apply ConcreteCategory.hom_ext + intro x + change (TupleSystem.mapFromUnderlying (T := R.tuples) (U := Y.tuples) g₀).app (op (Shape.globe n)) + ((underlyingMap η).app n x) = (underlyingMap f).app n x + exact (TupleSystem.mapFromUnderlying_globe (T := R.tuples) (U := Y.tuples) g₀ n _).trans + (congrArg (fun h : GlobularSet.Hom X.underlying Y.underlying => h.app n x) hg₀) + obtain ⟨a, ha⟩ := hC.1.some.lift (compatibleProjection g) + (compatibleProjection_liftsFillers η f g q hη hY hg) (Morphism.id C) + have hav {S T : Shape} (u : C.Hom S T) : (a.map u).1 = u := + congrArg (fun k : Morphism C C => k.map u) ha + let l : R ⟶ Y := + { app S := g.app (op S.unop.shape) + naturality S T u := by + apply ConcreteCategory.hom_ext + intro x + have w := (a.map u.unop).2 x + exact (congrArg (g.app (op T.unop.shape)) + (congrArg (fun z => R.eval z x) (hav u.unop)).symm).trans + (w.trans (congrArg (fun z => Y.eval z (g.app (op S.unop.shape) x)) (hav u.unop))) } + have hl : η ≫ l = f := by + apply NatTrans.ext + funext S + exact congrArg (fun k => k.app (op S.unop.shape)) hg + have hlg : underlyingMap l = g₀ := by + ext n x + exact TupleSystem.mapFromUnderlying_globe (T := R.tuples) (U := Y.tuples) g₀ n x + refine ⟨l, hl, ?_⟩ + intro l' hl' + apply underlyingMap_injective + apply Eq.trans _ hlg.symm + apply hgUnique + exact congrArg (fun k : X ⟶ Y => underlyingMap k) hl' + +def IsCoskeletal {C : GlobularTheory.{v}} (X : C.Model) (q : ℕ) : Prop := + ∀ j, q < j → Function.Bijective (X.underlying.boundary j) + +theorem exists_cutoff_reflection {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (X : C.Model) (q : ℕ) : + ∃ (R : C.Model) (η : X ⟶ R), + (∀ n, n ≤ q → Function.Bijective ((underlyingMap η).app n)) ∧ + R.IsCoskeletal q ∧ + ∀ (Y : C.Model), Y.IsCoskeletal q → ∀ f : X ⟶ Y, ∃! l : R ⟶ Y, η ≫ l = f := by + obtain ⟨R, η, hlo, hhi⟩ := exists_cutoff hC X q + exact ⟨R, η, hlo, hhi, fun _ hY f => existsUnique_factor_coskeletal hC η f q hlo hY⟩ + + +def CoskeletalLocalMap {C : GlobularTheory.{v}} (q : ℕ) {X Y : C.Model} + (i : X ⟶ Y) : Prop := + ∀ (Z : C.Model), Z.IsCoskeletal q → ∀ g : X ⟶ Z, ∃! h : Y ⟶ Z, i ≫ h = g + +theorem coskeletalLocalMap_iff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {X Y : C.Model} (i : X ⟶ Y) : + CoskeletalLocalMap q i ↔ + ∀ k, k ≤ q → Function.Bijective ((underlyingMap i).app k) := by + constructor + · intro hi + obtain ⟨RX, ηX, hX, hRX, uX⟩ := exists_cutoff_reflection hC X q + obtain ⟨RY, ηY, hY, hRY, _⟩ := exists_cutoff_reflection hC Y q + obtain ⟨g, hg, _⟩ := hi RX hRX ηX + obtain ⟨a, ha, _⟩ := uX RY hRY (i ≫ ηY) + obtain ⟨_, _, unique⟩ := hi RY hRY (i ≫ ηY) + have hy : g ≫ a = ηY := (unique (g ≫ a) + ((Category.assoc i g a).symm.trans ((congrArg (· ≫ a) hg).trans ha))).trans + (unique ηY rfl).symm + intro k hk + constructor + · intro x y h + apply (hX k hk).1 + have fac := congrArg (fun f : X ⟶ RX => (underlyingMap f).app k) hg + exact (congrFun fac x).symm.trans ((congrArg ((underlyingMap g).app k) h).trans + (congrFun fac y)) + · intro y + obtain ⟨x, hx⟩ := (hX k hk).2 ((underlyingMap g).app k y) + refine ⟨x, (hY k hk).1 ?_⟩ + have fac := congrArg (fun f : X ⟶ RY => (underlyingMap f).app k x) ha + have fac' := congrArg (fun f : Y ⟶ RY => (underlyingMap f).app k y) hy + exact fac.symm.trans ((congrArg ((underlyingMap a).app k) hx).trans fac') + · intro hi Z hZ g + exact existsUnique_factor_coskeletal hC i g q hi hZ + +theorem BoundaryAttachment.coskeletalLocalMap {C : GlobularTheory.{v}} + {X Y : C.Model} {i : X ⟶ Y} (A : BoundaryAttachment i) (q : ℕ) + (hA : ∀ k, q < A.dimension k) : CoskeletalLocalMap q i := by + intro Z hZ g + have cells : ∀ k, ∃! z, Z.underlying.boundary (A.dimension k) z = + (underlyingMap g).boundaryMap _ (A.boundary k) := by + intro k + exact (hZ (A.dimension k) (hA k)).existsUnique _ + choose z hz uniqueCell using cells + obtain ⟨h, hh, unique⟩ := A.universal Z g z hz + refine ⟨h, hh.1, ?_⟩ + intro h' hh' + apply unique h' + refine ⟨hh', ?_⟩ + intro k + apply uniqueCell + rw [← (underlyingMap h').boundary_app, A.cell_boundary] + simpa only [underlyingMap_comp, GlobularSet.Hom.boundaryMap_comp] using + congrArg (fun f : X ⟶ Z => (underlyingMap f).boundaryMap _ (A.boundary k)) hh' + +theorem BoundaryAttachment.low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + {X Y : C.Model} {i : X ⟶ Y} (A : BoundaryAttachment i) (q : ℕ) + (hA : ∀ k, q < A.dimension k) (j : ℕ) (hj : j ≤ q) : + Function.Bijective ((underlyingMap i).app j) := + (coskeletalLocalMap_iff hC q i).1 (A.coskeletalLocalMap q hA) j hj + +end GlobularTheory.Model + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/RelativeLifting.lean b/lean/OAI/CategoryTheory/Globular/RelativeLifting.lean new file mode 100644 index 0000000000000000000000000000000000000000..00b939cd26d98a0d76e23e8d79d059db1c72b4c1 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/RelativeLifting.lean @@ -0,0 +1,375 @@ +import OAI.CategoryTheory.Globular.Groupoid + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularSet + +def LiftsBoundary {X Y : GlobularSet.{v}} (p : Hom X Y) (k : ℕ) : Prop := + ∀ (bd : X.Boundary k) (y : Y.Cell k), Y.boundary k y = p.boundaryMap k bd → + ∃ x : X.Cell k, X.boundary k x = bd ∧ p.app k x = y + +structure RelativeLiftStage {A B X Y : GlobularSet.{v}} + (i : Hom A B) (a : Hom A X) (p : Hom X Y) (b : Hom B Y) (n : ℕ) + extends LiftStage p b n where + on_domain : ∀ k (hk : k ≤ n) x, app k hk (i.app k x) = a.app k x + +namespace RelativeLiftStage +variable {A B X Y : GlobularSet.{v}} {i : Hom A B} {a : Hom A X} + {p : Hom X Y} {b : Hom B Y} + +theorem exists_cell (r k : ℕ) + (hi : Function.Injective (i.app k)) + (hlo : k < r → Function.Surjective (i.app k)) + (hp : r ≤ k → LiftsBoundary p k) + (sq : a.comp p = i.comp b) + (bd : B.Cell k → X.Boundary k) + (hbd : ∀ x, X.boundary k (a.app k x) = bd (i.app k x)) + (hbp : ∀ y, Y.boundary k (b.app k y) = p.boundaryMap k (bd y)) : + ∃ z : B.Cell k → X.Cell k, + (∀ y, X.boundary k (z y) = bd y) ∧ + (∀ y, p.app k (z y) = b.app k y) ∧ + (∀ x, z (i.app k x) = a.app k x) := by + classical + have e x : p.app k (a.app k x) = b.app k (i.app k x) := + congrFun (congrArg (fun t => t.app k) sq) x + have hz y : ∃ z : X.Cell k, X.boundary k z = bd y ∧ p.app k z = b.app k y ∧ + ∀ x, i.app k x = y → z = a.app k x := by + by_cases hy : ∃ x, i.app k x = y + · obtain ⟨x, rfl⟩ := hy + exact ⟨a.app k x, hbd x, e x, fun x' hx' => congrArg (a.app k) (hi hx').symm⟩ + · have hk : r ≤ k := by + by_contra hk + exact hy (hlo (by omega) y) + obtain ⟨z, hz, hzp⟩ := hp hk (bd y) (b.app k y) (hbp y) + exact ⟨z, hz, hzp, fun x hx => (hy ⟨x,hx⟩).elim⟩ + choose z hb hf ho using hz + exact ⟨z, hb, hf, fun x => ho _ x rfl⟩ + +noncomputable def zero (r : ℕ) + (hi : ∀ k, Function.Injective (i.app k)) + (hlo : ∀ k, k < r → Function.Surjective (i.app k)) + (hp : ∀ k, r ≤ k → LiftsBoundary p k) (sq : a.comp p = i.comp b) : + RelativeLiftStage i a p b 0 := by + choose z _hb hf ho using exists_cell r 0 (hi 0) (hlo 0) (hp 0) sq + (fun _ => PUnit.unit) (fun _ => rfl) (fun _ => rfl) + exact + { app := fun k hk x => by + have e : k = 0 := by omega + subst k + exact z x + source_app := fun k hk => by omega + target_app := fun k hk => by omega + fac := fun k hk x => by + have e : k = 0 := by omega + subst k + exact hf x + on_domain := fun k hk x => by + have e : k = 0 := by omega + subst k + exact ho x } + +noncomputable def succ (r : ℕ) + (hi : ∀ k, Function.Injective (i.app k)) + (hlo : ∀ k, k < r → Function.Surjective (i.app k)) + (hp : ∀ k, r ≤ k → LiftsBoundary p k) (sq : a.comp p = i.comp b) + {n : ℕ} (s : RelativeLiftStage i a p b n) : RelativeLiftStage i a p b (n+1) := by + let bd := s.toLiftStage.nextBoundary + have hbd x : X.boundary (n+1) (a.app (n+1) x) = bd (i.app (n+1) x) := by + apply Subtype.ext + apply Prod.ext + · change X.source n (a.app (n+1) x) = s.app n le_rfl (B.source n (i.app (n+1) x)) + rw [← a.source_app, ← i.source_app, s.on_domain] + · change X.target n (a.app (n+1) x) = s.app n le_rfl (B.target n (i.app (n+1) x)) + rw [← a.target_app, ← i.target_app, s.on_domain] + have hbp y : Y.boundary (n+1) (b.app (n+1) y) = p.boundaryMap (n+1) (bd y) := by + apply Subtype.ext + apply Prod.ext + · exact (b.source_app n y).symm.trans (s.fac n le_rfl _).symm + · exact (b.target_app n y).symm.trans (s.fac n le_rfl _).symm + choose z hb hf ho using exists_cell r (n+1) (hi _) (hlo _) (hp _) sq bd hbd hbp + let t := s.toLiftStage.extendTop z + (fun y => congrArg (fun c => c.1.1) (hb y)) + (fun y => congrArg (fun c => c.1.2) (hb y)) hf + refine { toLiftStage := t, on_domain := ?_ } + intro k hk x + dsimp only [t, LiftStage.extendTop] + split_ifs with h + · exact s.on_domain k h x + · have e : k = n+1 := by omega + subst k + exact ho x + +theorem succ_old (r : ℕ) + (hi : ∀ k, Function.Injective (i.app k)) + (hlo : ∀ k, k < r → Function.Surjective (i.app k)) + (hp : ∀ k, r ≤ k → LiftsBoundary p k) (sq : a.comp p = i.comp b) + {n : ℕ} (s : RelativeLiftStage i a p b n) (k : ℕ) (hk : k ≤ n) (x : B.Cell k) : + (s.succ r hi hlo hp sq).app k (by omega) x = s.app k hk x := by + dsimp only [succ, LiftStage.extendTop] + simp only [dite_eq_left hk] + +end RelativeLiftStage + +theorem relative_lift {A B X Y : GlobularSet.{v}} (i : Hom A B) (a : Hom A X) + (p : Hom X Y) (b : Hom B Y) (r : ℕ) + (hi : ∀ k, Function.Injective (i.app k)) + (hlo : ∀ k, k < r → Function.Surjective (i.app k)) + (hp : ∀ k, r ≤ k → LiftsBoundary p k) (sq : a.comp p = i.comp b) : + ∃ l : Hom B X, i.comp l = a ∧ l.comp p = b := by + let s : (n : ℕ) → RelativeLiftStage i a p b n := + Nat.rec (RelativeLiftStage.zero r hi hlo hp sq) (fun _ s => s.succ r hi hlo hp sq) + let l : Hom B X := + { app := fun n => (s n).app n le_rfl + source_app := fun n x => + ((s n).succ_old r hi hlo hp sq n le_rfl _).symm.trans + ((s (n+1)).source_app n le_rfl x) + target_app := fun n x => + ((s n).succ_old r hi hlo hp sq n le_rfl _).symm.trans + ((s (n+1)).target_app n le_rfl x) } + refine ⟨l, ?_, ?_⟩ + · ext n x + exact (s n).on_domain n le_rfl x + · ext n x + exact (s n).fac n le_rfl x + +end Grothendieck.GlobularSet + +namespace Grothendieck.GlobularPresheaf +open CategoryTheory Opposite + +theorem relative_lift {A B X Y : GlobularPresheaf.{v}} + (i : A ⟶ B) (a : A ⟶ X) (p : X ⟶ Y) (b : B ⟶ Y) (r : ℕ) + (hi : ∀ k, Function.Injective ((underlyingMap i).app k)) + (hlo : ∀ k, k < r → Function.Surjective ((underlyingMap i).app k)) + (hp : ∀ k, r ≤ k → GlobularSet.LiftsBoundary (underlyingMap p) k) + (sq : a ≫ p = i ≫ b) : ∃ l : B ⟶ X, i ≫ l = a ∧ l ≫ p = b := by + obtain ⟨g, hg₀, hg₁⟩ := GlobularSet.relative_lift (underlyingMap i) + (underlyingMap a) (underlyingMap p) (underlyingMap b) r hi hlo hp + (congrArg underlyingMap sq) + let l : B ⟶ X := B.underlyingPresheafIso.inv ≫ g.presheafMap ≫ X.underlyingPresheafIso.hom + exact ⟨l, underlyingMap_injective hg₀, underlyingMap_injective hg₁⟩ + +end Grothendieck.GlobularPresheaf + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite + +theorem cutoffFreeGlobular_map_cofibration {C : GlobularTheory.{v}} + (hC : C.IsCoherator) (q r : ℕ) {S T : GlobularPresheaf.{v}} (i : S ⟶ T) + (hi : ∀ k, Function.Injective ((GlobularPresheaf.underlyingMap i).app k)) + (hlo : ∀ k, k < r → Function.Surjective ((GlobularPresheaf.underlyingMap i).app k)) : + (boundaryClass hC q r).rlp.llp ((cutoffFreeGlobular hC q).map i) := by + intro P Q p hp + constructor + intro a b sq + let A := cutoffGlobularAdjunction hC q + let U := cutoffForgetGlobular C q + let a' := A.homEquiv S P a + let b' := A.homEquiv T Q b + have hs : a' ≫ U.map p = i ≫ b' := by + rw [← Adjunction.homEquiv_naturality_right, ← Adjunction.homEquiv_naturality_left] + exact congrArg (A.homEquiv S Q) sq.w + have hp' : ∀ k, r ≤ k → GlobularSet.LiftsBoundary + (GlobularPresheaf.underlyingMap (U.map p)) k := by + intro k hk + exact (hasLiftingProperty_I_iff k p.hom).1 + ((boundaryClass_rlp_iff hC q r p).1 hp k hk) + obtain ⟨l, hl₀, hl₁⟩ := GlobularPresheaf.relative_lift i a' (U.map p) b' r hi hlo hp' hs + refine CommSq.HasLift.mk' ⟨(A.homEquiv T P).symm l, ?_, ?_⟩ + · apply (A.homEquiv S P).injective + rw [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] + exact hl₀ + · apply (A.homEquiv T Q).injective + rw [Adjunction.homEquiv_naturality_right, Equiv.apply_symm_apply] + exact hl₁ + +theorem cutoff_hasLimits {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) : HasLimitsOfSize.{v,v} (CutoffModels C q) := by + let := cutoffReflective hC q + exact hasLimits_of_reflective (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)) + +theorem cutoff_hasFillers_iff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : CutoffModels C q) : + X.obj.underlying.HasFillers ↔ ∀ n (f : cutoffBoundary hC q n ⟶ X), + ∃ g : cutoffDisk hC q n ⟶ X, cutoffI hC q n ≫ g = f := by + rw [hasFillers_iff] + let A := cutoffAdjunction hC q + constructor + · intro h n f + obtain ⟨g, hg⟩ := h n (A.homEquiv _ X f) + refine ⟨(A.homEquiv _ X).symm g, (A.homEquiv _ X).injective ?_⟩ + rw [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] + exact hg + · intro h n f + obtain ⟨g, hg⟩ := h n ((A.homEquiv _ X).symm f) + refine ⟨A.homEquiv _ X g, ?_⟩ + have e := congrArg (A.homEquiv _ X) hg + simpa only [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] using e + +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits + +theorem lifting_terminal_iff {K : Type u} [Category.{v} K] [HasTerminal K] + {A B : K} (j : A ⟶ B) (X : K) : + HasLiftingProperty j (terminal.from X) ↔ ∀ a : A ⟶ X, ∃ b : B ⟶ X, j ≫ b = a := by + constructor + · intro h a + let := h + have sq : CommSq a j (terminal.from X) (terminal.from B) := ⟨terminal.hom_ext _ _⟩ + exact ⟨sq.lift, sq.fac_left⟩ + · intro h + constructor + intro a b _sq + obtain ⟨l, hl⟩ := h a + exact CommSq.HasLift.mk' ⟨l, hl, terminal.hom_ext _ _⟩ + +namespace GlobularTheory.Model + +structure CutoffPathData {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) (Y : CutoffModels C q) where + P : CutoffModels C q + p₀ : P ⟶ Y + p₁ : P ⟶ Y + lifts₀ : (boundaryClass hC q 0).rlp p₀ + lifts₁ : (boundaryClass hC q 0).rlp p₁ + joint : ∀ k, r ≤ k → ∀ (t : cutoffDisk hC q k ⟶ P) + (u₀ u₁ : cutoffDisk hC q (k+1) ⟶ Y), + t ≫ p₀ = cutoffJ hC q k ≫ u₀ → t ≫ p₁ = cutoffJ hC q k ≫ u₁ → + ∃ l : cutoffDisk hC q (k+1) ⟶ P, + cutoffJ hC q k ≫ l = t ∧ l ≫ p₀ = u₀ ∧ l ≫ p₁ = u₁ + +theorem CutoffPathData.joint_rlp {C : GlobularTheory.{v}} {hC : C.IsCoherator} + {q r : ℕ} {Y : CutoffModels C q} (D : CutoffPathData hC q r Y) + [HasBinaryProduct Y Y] : (sourceClass hC q r).rlp (prod.lift D.p₀ D.p₁) := by + rintro _ _ j ⟨⟨k,hk⟩⟩ + constructor + intro a b sq + have hf : a ≫ D.p₀ = cutoffJ hC q k ≫ (b ≫ prod.fst) := by + have e := congrArg (· ≫ prod.fst) sq.w + simpa only [Category.assoc, prod.lift_fst] using e + have hg : a ≫ D.p₁ = cutoffJ hC q k ≫ (b ≫ prod.snd) := by + have e := congrArg (· ≫ prod.snd) sq.w + simpa only [Category.assoc, prod.lift_snd] using e + obtain ⟨l, hl, hl₀, hl₁⟩ := D.joint k hk a (b ≫ prod.fst) (b ≫ prod.snd) hf hg + refine CommSq.HasLift.mk' ⟨l, hl, ?_⟩ + apply prod.hom_ext + · simpa only [Category.assoc, prod.lift_fst] using hl₀ + · simpa only [Category.assoc, prod.lift_snd] using hl₁ + +theorem expansionContraction_of_paths {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) (D : ∀ Y, Nonempty (CutoffPathData hC q r Y)) : + ExpansionContraction hC q r := by + let := cutoff_hasLimits hC q + intro X Y i hi hX hXF + have hiI : (boundaryClass hC q 0).rlp.llp i := + boundaryClass_cofibration_le hC q 0 r (Nat.zero_le r) i + (sourceClass_cofibration_le hC q r i hi) + have ht : (boundaryClass hC q 0).rlp (terminal.from X) := by + rintro A B j ⟨⟨k,_⟩⟩ + rw [lifting_terminal_iff] + exact (cutoff_hasFillers_iff hC q _).1 hXF k + let := hiI (terminal.from X) ht + have retractSq : CommSq (𝟙 X) i (terminal.from X) (terminal.from Y) := + ⟨terminal.hom_ext _ _⟩ + let z : Y ⟶ X := retractSq.lift + have hz : i ≫ z = 𝟙 X := retractSq.fac_left + obtain ⟨P⟩ := D Y + obtain ⟨a, ha⟩ := hX P.p₀ P.lifts₀ i + let u : X ⟶ Y := a ≫ P.p₁ + let := hi (prod.lift P.p₀ P.p₁) P.joint_rlp + have sq : CommSq a i (prod.lift P.p₀ P.p₁) (prod.lift (𝟙 Y) (z ≫ u)) := by + constructor + apply prod.hom_ext + · simpa only [Category.assoc, prod.lift_fst, Category.comp_id] using ha + · simp only [Category.assoc, prod.lift_snd] + rw [← Category.assoc i, hz, Category.id_comp] + have hf₀ : sq.lift ≫ P.p₀ = 𝟙 Y := by + have e := congrArg (· ≫ prod.fst) sq.fac_right + simpa only [Category.assoc, prod.lift_fst] using e + have hf₁ : sq.lift ≫ P.p₁ = z ≫ u := by + have e := congrArg (· ≫ prod.snd) sq.fac_right + simpa only [Category.assoc, prod.lift_snd] using e + refine GlobularSet.hasFillers_of_endpoint_factorization hXF + (underlyingMap u.hom) (underlyingMap z.hom) (underlyingMap sq.lift.hom) + (underlyingMap P.p₀.hom) (underlyingMap P.p₁.hom) + (congrArg (fun t : Y ⟶ Y => underlyingMap t.hom) hf₀) + (congrArg (fun t : Y ⟶ Y => underlyingMap t.hom) hf₁) ?_ + intro k + exact (hasLiftingProperty_I_iff k P.p₁.hom).1 + ((boundaryClass_rlp_iff hC q 0 P.p₁).1 P.lifts₁ k (Nat.zero_le k)) + +end GlobularTheory.Model +end Grothendieck + +namespace Grothendieck.GlobularSet + +theorem ExactBoundaryTest.of_retract_factor {X Y : GlobularSet.{u}} + (i : Hom X Y) (r : Hom Y X) (u : Hom X Y) (hir : i.comp r = Hom.id X) + (hv : ExactBoundaryTest (r.comp u)) (units : ∀ k x, Y.Joined k x x) : + ExactBoundaryTest i := by + intro k bd y hy + have hx : X.boundary k (r.app k y) = bd := by + rw [← r.boundary_app, hy, ← Hom.boundaryMap_comp, hir, Hom.boundaryMap_id] + refine ⟨r.app k y, hx, hv.reflects_joined ?_ ?_⟩ + · rw [parallel_iff_boundary_eq, ← i.boundary_app, hx, hy] + · have e : r.app k (i.app k (r.app k y)) = r.app k y := + congrFun (congrArg (fun t => t.app k) hir) (r.app k y) + change Y.Joined k (u.app k (r.app k (i.app k (r.app k y)))) (u.app k (r.app k y)) + rw [e] + exact units k _ + +end Grothendieck.GlobularSet + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits + +theorem weakEquivalence_of_cutoff_path {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) {X Y : CutoffModels C q} (i : X ⟶ Y) + (hi : (sourceClass hC q r).rlp.llp i) (hX : Cofibrant hC q X) + (z : Y ⟶ X) (hz : i ≫ z = 𝟙 X) (P : CutoffPathData hC q r Y) : + WeakEquivalence hC i.hom := by + let := cutoff_hasLimits hC q + obtain ⟨a, ha⟩ := hX P.p₀ P.lifts₀ i + let u : X ⟶ Y := a ≫ P.p₁ + let := hi (prod.lift P.p₀ P.p₁) P.joint_rlp + have sq : CommSq a i (prod.lift P.p₀ P.p₁) (prod.lift (𝟙 Y) (z ≫ u)) := by + constructor + apply prod.hom_ext + · simpa only [Category.assoc, prod.lift_fst, Category.comp_id] using ha + · simp only [Category.assoc, prod.lift_snd] + rw [← Category.assoc i, hz, Category.id_comp] + have hf₀ : sq.lift ≫ P.p₀ = 𝟙 Y := by + have e := congrArg (· ≫ prod.fst) sq.fac_right + simpa only [Category.assoc, prod.lift_fst] using e + have hf₁ : sq.lift ≫ P.p₁ = z ≫ u := by + have e := congrArg (· ≫ prod.snd) sq.fac_right + simpa only [Category.assoc, prod.lift_snd] using e + have hp₀ : GlobularSet.LiftsBoundaries (underlyingMap P.p₀.hom) := by + intro k + exact (hasLiftingProperty_I_iff k P.p₀.hom).1 + ((boundaryClass_rlp_iff hC q 0 P.p₀).1 P.lifts₀ k (Nat.zero_le k)) + have hp₁ : GlobularSet.LiftsBoundaries (underlyingMap P.p₁.hom) := by + intro k + exact (hasLiftingProperty_I_iff k P.p₁.hom).1 + ((boundaryClass_rlp_iff hC q 0 P.p₁).1 P.lifts₁ k (Nat.zero_le k)) + apply weakEquivalence_of_exactBoundaryTest hC + apply GlobularSet.ExactBoundaryTest.of_retract_factor + (underlyingMap i.hom) (underlyingMap z.hom) (underlyingMap u.hom) + (congrArg (fun t : X ⟶ X => underlyingMap t.hom) hz) _ (Y.obj.joined_refl hC) + have hv := GlobularSet.exactBoundaryTest_endpoint_section + (underlyingMap P.p₀.hom) (underlyingMap P.p₁.hom) (underlyingMap sq.lift.hom) + hp₀ hp₁ + (fun k x => congrFun (congrArg (fun t => (underlyingMap t.hom).app k) hf₀) x) + (Y.obj.joined_refl hC) + have e := congrArg (fun t : Y ⟶ Y => underlyingMap t.hom) hf₁ + change GlobularSet.ExactBoundaryTest (underlyingMap (sq.lift ≫ P.p₁).hom) at hv + rw [e] at hv + exact hv + +end Grothendieck.GlobularTheory.Model + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/ReverseWhisker.lean b/lean/OAI/CategoryTheory/Globular/ReverseWhisker.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ada0e902cb8f39ae58d169fa727bd893936aa97 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/ReverseWhisker.lean @@ -0,0 +1,375 @@ +import OAI.CategoryTheory.Globular.SpineWhisker + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model + +noncomputable abbrev reverseWhiskerFree {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) := + (smallFree hC q).obj ((GlobularPresheaf.whiskering n true).obj S) + +noncomputable def rwBase {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + (reverseWhiskerFree hC q n S).obj.underlying.Cell k := + smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) k (.base k x) + +noncomputable def rwEdge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (reverseWhiskerFree hC q n S).obj.underlying.Cell (n+1) := + smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) (n+1) (.edge x) + +@[simp] theorem rwBase_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + (reverseWhiskerFree hC q n S).obj.underlying.source k (rwBase hC q n S (k+1) x) = + rwBase hC q n S k (S.underlying.source k x) := by + unfold rwBase + erw [smallFreeGen_source] + congr 1 + exact (S.underlying.whisker n true).presheafUnderlyingMap.source_app _ _ + +@[simp] theorem rwBase_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + (reverseWhiskerFree hC q n S).obj.underlying.target k (rwBase hC q n S (k+1) x) = + rwBase hC q n S k (S.underlying.target k x) := by + unfold rwBase + erw [smallFreeGen_target] + congr 1 + exact (S.underlying.whisker n true).presheafUnderlyingMap.target_app _ _ + +@[simp] theorem rwEdge_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (reverseWhiskerFree hC q n S).obj.underlying.target n (rwEdge hC q n S x) = rwBase hC q n S n x := by + unfold rwEdge rwBase + erw [smallFreeGen_target] + congr 1 + exact (S.underlying.whisker n true).presheafUnderlyingMap.target_app _ _ + +noncomputable def smallReverseWhiskerCell {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) + (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (k : ℕ) (x : (S.underlying.whisker n true).Cell k) : Y.obj.underlying.Cell k := + match x with + | .base k x => (underlyingMap f.hom).app k (smallFreeGen hC q S k x) + | .tip x => Y.obj.underlying.source n (e x) + | .edge x => e x + +theorem smallReverseWhiskerCell_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.target n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) + (k : ℕ) (x : (S.underlying.whisker n true).Cell (k+1)) : + smallReverseWhiskerCell hC q n f e k ((S.underlying.whisker n true).source k x) = + Y.obj.underlying.source k (smallReverseWhiskerCell hC q n f e (k+1) x) := by + cases x with + | base k x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.source k x)) = _ + rw [← smallFreeGen_source, (underlyingMap f.hom).source_app] + rfl + | tip x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.source k x)) = _ + rw [← smallFreeGen_source, (underlyingMap f.hom).source_app, ← he] + exact (Y.obj.underlying.source_source k _).symm + | edge x => rfl + +theorem smallReverseWhiskerCell_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.target n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) + (k : ℕ) (x : (S.underlying.whisker n true).Cell (k+1)) : + smallReverseWhiskerCell hC q n f e k ((S.underlying.whisker n true).target k x) = + Y.obj.underlying.target k (smallReverseWhiskerCell hC q n f e (k+1) x) := by + cases x with + | base k x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.target k x)) = _ + rw [← smallFreeGen_target, (underlyingMap f.hom).target_app] + rfl + | tip x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.target k x)) = _ + rw [← smallFreeGen_target, (underlyingMap f.hom).target_app, ← he] + exact (Y.obj.underlying.target_source k _).symm + | edge x => exact (he x).symm + +noncomputable def smallReverseWhiskerDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.target n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) : reverseWhiskerFree hC q n S ⟶ Y := + smallFreeDescCells hC q (smallReverseWhiskerCell hC q n f e) + (fun k x => by + have h := (S.underlying.whisker n true).presheafUnderlyingMap.source_app k x + change (S.underlying.whisker n true).presheaf.underlying.source k x = + (S.underlying.whisker n true).source k x at h + exact (congrArg (smallReverseWhiskerCell hC q n f e k) h).trans + (smallReverseWhiskerCell_source hC q n f e he k x)) + (fun k x => by + have h := (S.underlying.whisker n true).presheafUnderlyingMap.target_app k x + change (S.underlying.whisker n true).presheaf.underlying.target k x = + (S.underlying.whisker n true).target k x at h + exact (congrArg (smallReverseWhiskerCell hC q n f e k) h).trans + (smallReverseWhiskerCell_target hC q n f e he k x)) + +@[simp] theorem smallReverseWhiskerDesc_base {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e) (he) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (smallReverseWhiskerDesc hC q n f e he).hom).app k (rwBase hC q n S k x) = + (underlyingMap f.hom).app k (smallFreeGen hC q S k x) := + smallFreeDescCells_gen hC q _ _ _ k _ + +@[simp] theorem smallReverseWhiskerDesc_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e) (he) (x : S.underlying.Cell n) : + (underlyingMap (smallReverseWhiskerDesc hC q n f e he).hom).app (n+1) (rwEdge hC q n S x) = e x := + smallFreeDescCells_gen hC q _ _ _ (n+1) _ + +noncomputable def reverseWhiskerIn {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) : (smallFree hC q).obj S ⟶ reverseWhiskerFree hC q n S := + (smallFree hC q).map ((GlobularPresheaf.whiskeringInclusion n true).app S) + +@[simp] theorem reverseWhiskerIn_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (reverseWhiskerIn hC q n S).hom).app k (smallFreeGen hC q S k x) = + rwBase hC q n S k x := smallFreeGen_map hC q _ k x + +theorem inverseCell_inverse {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a : X.underlying.Cell (n+1)) : + X.underlying.Joined (n+1) (X.inverseCell hC n (X.inverseCell hC n a)) a := by + let D := disk C (n+1) + let c := topCell C (n+1) + let f : D ⟶ X := X.tupleMap (Shape.globe (n+1)) a + have hf : (underlyingMap f).app (n+1) c = a := X.tupleMap_topCell (n+1) a + let u := D.inverseCell hC n (D.inverseCell hC n c) + have hp : D.underlying.Parallel (n+1) u c := by + constructor <;> dsimp [u] <;> simp only [inverseCell_source, inverseCell_target] + have h := (underlyingMap f).map_joined + (freeShape_joined C hC (Shape.globe (n+1)) (n+1) u c hp) + simpa only [u, map_inverseCell f, hf] using h + +@[simp] theorem rwEdge_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (reverseWhiskerFree hC q n S).obj.underlying.source n (rwEdge hC q n S x) = + smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) n (.tip x) := by + unfold rwEdge + erw [smallFreeGen_source] + congr 1 + exact (S.underlying.whisker n true).presheafUnderlyingMap.source_app _ _ + +noncomputable def reverseWhiskerToWhisker {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) : + reverseWhiskerFree hC q n S ⟶ whiskerFree hC q n S := + smallReverseWhiskerDesc hC q n (whiskerIn hC q n S) + (fun x => (whiskerFree hC q n S).obj.inverseCell hC n (wEdge hC q n S x)) + (fun x => by rw [inverseCell_target, wEdge_source, whiskerIn_gen]) + +noncomputable def whiskerToReverseWhisker {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) : + whiskerFree hC q n S ⟶ reverseWhiskerFree hC q n S := + smallWhiskerDesc hC q n (reverseWhiskerIn hC q n S) + (fun x => (reverseWhiskerFree hC q n S).obj.inverseCell hC n (rwEdge hC q n S x)) + (fun x => by rw [inverseCell_source, rwEdge_target, reverseWhiskerIn_gen]) + +@[simp] theorem reverseWhiskerRound_base {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app k (rwBase hC q n S k x) = + rwBase hC q n S k x := by + change (underlyingMap (whiskerToReverseWhisker hC q n S).hom).app k + ((underlyingMap (reverseWhiskerToWhisker hC q n S).hom).app k _) = _ + unfold reverseWhiskerToWhisker + rw [smallReverseWhiskerDesc_base, whiskerIn_gen] + unfold whiskerToReverseWhisker + rw [smallWhiskerDesc_base, reverseWhiskerIn_gen] + +@[simp] theorem reverseWhiskerRound_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app (n+1) (rwEdge hC q n S x) = + (reverseWhiskerFree hC q n S).obj.inverseCell hC n + ((reverseWhiskerFree hC q n S).obj.inverseCell hC n (rwEdge hC q n S x)) := by + change (underlyingMap (whiskerToReverseWhisker hC q n S).hom).app (n+1) + ((underlyingMap (reverseWhiskerToWhisker hC q n S).hom).app (n+1) _) = _ + unfold reverseWhiskerToWhisker + rw [smallReverseWhiskerDesc_edge, map_inverseCell] + unfold whiskerToReverseWhisker + rw [smallWhiskerDesc_edge] + +theorem reverseWhiskerRound_low {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (hk : k ≤ n) + (x : (S.underlying.whisker n true).Cell k) : + (underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app k + (smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) k x) = + smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) k x := by + cases x with + | base k x => exact reverseWhiskerRound_base hC q n S k x + | edge x => omega + | tip x => + rw [← rwEdge_source, (underlyingMap _).source_app, reverseWhiskerRound_edge, + inverseCell_source, inverseCell_target, rwEdge_source] + +theorem reverseWhiskerRound_top {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) + (x : (S.underlying.whisker n true).Cell (n+1)) : + (reverseWhiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app (n+1) + (smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) (n+1) x)) + (smallFreeGen hC q ((GlobularPresheaf.whiskering n true).obj S) (n+1) x) := by + cases x with + | base k x => + change (reverseWhiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app (n+1) (rwBase hC q n S (n+1) x)) _ + rw [reverseWhiskerRound_base] + exact (reverseWhiskerFree hC q n S).obj.joined_refl hC _ _ + | edge x => + change (reverseWhiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap ((reverseWhiskerToWhisker hC q n S) ≫ + (whiskerToReverseWhisker hC q n S)).hom).app (n+1) (rwEdge hC q n S x)) _ + rw [reverseWhiskerRound_edge] + exact inverseCell_inverse _ hC n _ + +theorem reverseWhiskerFree_bounded_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (H : ExpansionContraction hC q (n+1)) (S : Shape) (hS : S.height ≤ n+1) : + (reverseWhiskerFree hC q n S.realize).obj.underlying.HasFillers := by + have hb (k : ℕ) (hk : n+1 < k) : IsEmpty (S.realize.underlying.Cell k) := + S.2.bounded k (lt_of_le_of_lt hS hk) + apply free_hasFillers_of_top_homotopy hC q n H + (GlobularPresheaf.liftSmall.obj ((GlobularPresheaf.whiskering n true).obj S.realize)) + (fun k hk => ⟨fun x => (S.realize.underlying.whisker_bounded n true hb k hk).false x.down⟩) + (whiskerFree hC q n S.realize) (smallFree_cofibrant hC q _) + (whiskerFree_bounded_hasFillers hC q n H S hS) + (reverseWhiskerToWhisker hC q n S.realize) (whiskerToReverseWhisker hC q n S.realize) + · intro k hk x + exact reverseWhiskerRound_low hC q n S.realize k hk x.down + · intro x + exact reverseWhiskerRound_top hC q n S.realize x.down + +theorem reverseWhiskerFree_hom_ext {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + {f g : reverseWhiskerFree hC q n S ⟶ Y} + (hb : ∀ k x, (underlyingMap f.hom).app k (rwBase hC q n S k x) = + (underlyingMap g.hom).app k (rwBase hC q n S k x)) + (he : ∀ x, (underlyingMap f.hom).app (n+1) (rwEdge hC q n S x) = + (underlyingMap g.hom).app (n+1) (rwEdge hC q n S x)) : f = g := by + apply smallFree_hom_ext hC q + intro k x + cases x with + | base k x => exact hb k x + | edge x => exact he x + | tip x => + rw [← rwEdge_source hC q k S x, (underlyingMap f.hom).source_app, + (underlyingMap g.hom).source_app, he] + +noncomputable def reverseWhiskerFreeMap {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) : + reverseWhiskerFree hC q n S ⟶ reverseWhiskerFree hC q n T := + (smallFree hC q).map ((GlobularPresheaf.whiskering n true).map f) + +@[simp] theorem reverseWhiskerFreeMap_base {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (reverseWhiskerFreeMap hC q n f).hom).app k (rwBase hC q n S k x) = + rwBase hC q n T k ((GlobularPresheaf.underlyingMap f).app k x) := + smallFreeGen_map hC q _ k _ + +@[simp] theorem reverseWhiskerFreeMap_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (x : S.underlying.Cell n) : + (underlyingMap (reverseWhiskerFreeMap hC q n f).hom).app (n+1) (rwEdge hC q n S x) = + rwEdge hC q n T ((GlobularPresheaf.underlyingMap f).app n x) := + smallFreeGen_map hC q _ (n+1) _ + +@[reassoc] theorem reverseWhiskerIn_naturality {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) : + reverseWhiskerIn hC q n S ≫ reverseWhiskerFreeMap hC q n f = + (smallFree hC q).map f ≫ reverseWhiskerIn hC q n T := by + unfold reverseWhiskerIn reverseWhiskerFreeMap + rw [← Functor.map_comp, ← Functor.map_comp] + exact congrArg (smallFree hC q).map ((GlobularPresheaf.whiskeringInclusion n true).naturality f).symm + +theorem reverseWhiskerFree_hasFillers_of_spine {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + {S T : GlobularPresheaf.{0}} (f : S ⟶ T) + (hf : ∀ k, k ≤ n → Function.Bijective ((GlobularPresheaf.underlyingMap f).app k)) + (hS : ((smallFree hC q).obj S).obj.underlying.HasFillers) + (hT : ((smallFree hC q).obj T).obj.underlying.HasFillers) + (hW : (reverseWhiskerFree hC q n S).obj.underlying.HasFillers) : + (reverseWhiskerFree hC q n T).obj.underlying.HasFillers := by + let := cutoff_hasColimits hC q + let F := smallFree hC q + obtain ⟨M,i,p,s,hip,hsp,hi,hM,hp⟩ := exists_upper_resolution hC q n hnq + (F.map f) (smallFree_cofibrant hC q T) hS hT + (smallFree_low_bijective hC q n hnq f hf) + let a := reverseWhiskerIn hC q n S + let Q := pushout a i + let j : reverseWhiskerFree hC q n S ⟶ Q := pushout.inl a i + let k : M ⟶ Q := pushout.inr a i + have hQ : Q.obj.underlying.HasFillers := upper_pushout_hasFillers hC q (n+1) H + (IsPushout.of_hasPushout a i) hi (smallFree_cofibrant hC q S) hS hM + (smallFree_cofibrant hC q _) hW + let wm := reverseWhiskerFreeMap hC q n f + let r : Q ⟶ reverseWhiskerFree hC q n T := pushout.desc wm (p ≫ reverseWhiskerIn hC q n T) (by + rw [← Category.assoc, hip] + exact reverseWhiskerIn_naturality hC q n f) + have hjr : j ≫ r = wm := pushout.inl_desc _ _ _ + have hkr : k ≫ r = p ≫ reverseWhiskerIn hC q n T := pushout.inr_desc _ _ _ + let E := Equiv.ofBijective ((GlobularPresheaf.underlyingMap f).app n) (hf n le_rfl) + have hsgen (x : T.underlying.Cell n) : + (underlyingMap s.hom).app n (smallFreeGen hC q T n x) = + (underlyingMap i.hom).app n (smallFreeGen hC q S n (E.symm x)) := by + apply hp n le_rfl + have hs := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) hsp) + (smallFreeGen hC q T n x) + have hi' := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) hip) + (smallFreeGen hC q S n (E.symm x)) + exact hs.trans (((smallFreeGen_map hC q f n (E.symm x)).trans + (congrArg (smallFreeGen hC q T n) (E.apply_symm_apply x))).symm.trans hi'.symm) + let e (x : T.underlying.Cell n) := (underlyingMap j.hom).app (n+1) (rwEdge hC q n S (E.symm x)) + have he (x : T.underlying.Cell n) : Q.obj.underlying.target n (e x) = + (underlyingMap (s ≫ k).hom).app n (smallFreeGen hC q T n x) := by + change Q.obj.underlying.target n ((underlyingMap j.hom).app (n+1) _) = + (underlyingMap k.hom).app n ((underlyingMap s.hom).app n _) + rw [← (underlyingMap j.hom).target_app, rwEdge_target, hsgen] + have hh := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) + (pushout.condition (f := a) (g := i))) (smallFreeGen hC q S n (E.symm x)) + exact (congrArg ((underlyingMap j.hom).app n) + (reverseWhiskerIn_gen hC q n S n (E.symm x))).symm.trans hh + let t := smallReverseWhiskerDesc hC q n (s ≫ k) e he + have htr : t ≫ r = 𝟙 _ := by + apply reverseWhiskerFree_hom_ext hC q n + · intro l x + change (underlyingMap r.hom).app l ((underlyingMap t.hom).app l _) = rwBase hC q n T l x + have ht := smallReverseWhiskerDesc_base hC q n (s ≫ k) e he l x + apply (congrArg ((underlyingMap r.hom).app l) ht).trans + have hcomp : (s ≫ k) ≫ r = reverseWhiskerIn hC q n T := by + rw [Category.assoc, hkr, ← Category.assoc, hsp, Category.id_comp] + exact (congrFun (congrArg (fun z => (underlyingMap z.hom).app l) hcomp) + (smallFreeGen hC q T l x)).trans (reverseWhiskerIn_gen hC q n T l x) + · intro x + change (underlyingMap r.hom).app (n+1) ((underlyingMap t.hom).app (n+1) _) = rwEdge hC q n T x + have ht := smallReverseWhiskerDesc_edge hC q n (s ≫ k) e he x + apply (congrArg ((underlyingMap r.hom).app (n+1)) ht).trans + have hh := congrFun (congrArg (fun z => (underlyingMap z.hom).app (n+1)) hjr) + (rwEdge hC q n S (E.symm x)) + exact hh.trans ((reverseWhiskerFreeMap_edge hC q n f (E.symm x)).trans + (congrArg (rwEdge hC q n T) (E.apply_symm_apply x))) + exact hQ.retract (underlyingMap t.hom) (underlyingMap r.hom) + (congrArg (fun z : reverseWhiskerFree hC q n T ⟶ reverseWhiskerFree hC q n T => underlyingMap z.hom) htr) + +theorem reverseWhiskerFree_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) (S : Shape) : + (reverseWhiskerFree hC q n S.realize).obj.underlying.HasFillers := by + let P := S.2.spine n + exact reverseWhiskerFree_hasFillers_of_spine hC q n hnq H P.map P.low_bijective + (smallShape_hasFillers hC q P.S) (smallShape_hasFillers hC q S) + (reverseWhiskerFree_bounded_hasFillers hC q n H P.S P.height_le) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/ShapeFrame.lean b/lean/OAI/CategoryTheory/Globular/ShapeFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7a5928f8dd476ef9f6d6c335f3eb761e6678a02 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/ShapeFrame.lean @@ -0,0 +1,131 @@ +import OAI.CategoryTheory.Globular.FrameMaps + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) + +noncomputable def representables (C : GlobularTheory.{v}) : C.Obj ⥤ C.Model where + obj S := freeShape C S.shape + map f := yoneda.map f + map_id S := yoneda.map_id S + map_comp f g := yoneda.map_comp f g + +noncomputable abbrev cutoffRepresentables : C.Obj ⥤ CutoffModels C q := + representables C ⋙ cutoffFunctor hC q + +@[reassoc] theorem shapeGlobularEquiv_left {S T : Shape} (f : S ⟶ T) + (X : C.Model) (a : freeShape C T ⟶ X) : + shapeGlobularEquiv S X (yoneda.map (C.base f) ≫ a) = + Shape.liftedRealization.map f ≫ shapeGlobularEquiv T X a := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + change X.eval (C.base (S.cellArrow k x.down)) (yonedaEquiv (yoneda.map (C.base f) ≫ a)) = + X.eval (C.base (T.cellArrow k (f.app k x.down))) (yonedaEquiv a) + erw [← yonedaEquiv_naturality, Shape.cellArrow_naturality, C.base_comp, eval_comp] + rfl + +@[reassoc] theorem cutoffShapeEquiv_left {S T : Shape} (f : S ⟶ T) + (Y : CutoffModels C q) (a : (cutoffRepresentables hC q).obj ⟨T⟩ ⟶ Y) : + cutoffShapeEquiv hC q S Y ((cutoffRepresentables hC q).map (C.base f) ≫ a) = + Shape.liftedRealization.map f ≫ cutoffShapeEquiv hC q T Y a := by + change shapeGlobularEquiv S Y.obj + ((cutoffAdjunction hC q).homEquiv _ Y ((cutoffFunctor hC q).map (yoneda.map (C.base f)) ≫ a)) = + Shape.liftedRealization.map f ≫ shapeGlobularEquiv T Y.obj + ((cutoffAdjunction hC q).homEquiv _ Y a) + erw [Adjunction.homEquiv_naturality_left] + exact shapeGlobularEquiv_left f Y.obj _ + +variable [HasColimitsOfSize.{0,v} (CutoffModels C q)] + +@[reassoc] theorem cutoffFrameHomEquiv_left {S T : GlobularPresheaf.{v}} (f : S ⟶ T) + (Y : CutoffModels C q) (a : (cutoffDiskFrame hC q).realization.obj T ⟶ Y) : + cutoffFrameHomEquiv hC q S Y ((cutoffDiskFrame hC q).realization.map f ≫ a) = + f ≫ cutoffFrameHomEquiv hC q T Y a := by + apply GlobularPresheaf.underlyingMap_injective + ext j x + change cutoffCellEquiv hC q Y j ((cutoffDiskFrame hC q).cell S j x ≫ + (cutoffDiskFrame hC q).realization.map f ≫ a) = + cutoffCellEquiv hC q Y j ((cutoffDiskFrame hC q).cell T j (f.app _ x) ≫ a) + erw [GlobularFrame.cell_naturality_assoc] + rfl + +noncomputable def shapeFrameIso (S : Shape) : + (cutoffRepresentables hC q).obj ⟨S⟩ ≅ (cutoffDiskFrame hC q).shapeRealization.obj S := by + let A := (cutoffRepresentables hC q).obj ⟨S⟩ + let B := (cutoffDiskFrame hC q).shapeRealization.obj S + let E (Y) := cutoffShapeEquiv hC q S Y + let G (Y) := cutoffFrameHomEquiv hC q (Shape.liftedRealization.obj S) Y + let f : A ⟶ B := (E B).symm (G B (𝟙 B)) + let g : B ⟶ A := (G A).symm (E A (𝟙 A)) + have hf : E B f = G B (𝟙 B) := (E B).apply_symm_apply _ + have hg : G A g = E A (𝟙 A) := (G A).apply_symm_apply _ + refine ⟨f,g,?_,?_⟩ + · apply (E A).injective + erw [cutoffShapeEquiv_naturality, hf, ← cutoffFrameHomEquiv_naturality, Category.id_comp] + exact hg + · apply (G B).injective + erw [cutoffFrameHomEquiv_naturality, hg, ← cutoffShapeEquiv_naturality, Category.id_comp] + exact hf + +@[simp] theorem shapeFrameIso_equiv (S : Shape) {Y : CutoffModels C q} + (a : (cutoffDiskFrame hC q).shapeRealization.obj S ⟶ Y) : + cutoffShapeEquiv hC q S Y ((shapeFrameIso hC q S).hom ≫ a) = + cutoffFrameHomEquiv hC q (Shape.liftedRealization.obj S) Y a := by + change cutoffShapeEquiv hC q S Y + ((cutoffShapeEquiv hC q S _).symm (cutoffFrameHomEquiv hC q _ _ (𝟙 _)) ≫ a) = _ + erw [cutoffShapeEquiv_naturality, Equiv.apply_symm_apply, + ← cutoffFrameHomEquiv_naturality, Category.id_comp] + rfl + +@[reassoc] theorem shapeFrameIso_naturality {S T : Shape} (f : S ⟶ T) : + (cutoffRepresentables hC q).map (C.base f) ≫ (shapeFrameIso hC q T).hom = + (shapeFrameIso hC q S).hom ≫ (cutoffDiskFrame hC q).shapeRealization.map f := by + let D := cutoffDiskFrame hC q + let Y := D.shapeRealization.obj T + apply (cutoffShapeEquiv hC q S Y).injective + have hh : cutoffShapeEquiv hC q T Y (shapeFrameIso hC q T).hom = + cutoffFrameHomEquiv hC q (Shape.liftedRealization.obj T) Y (𝟙 Y) := by + have h := shapeFrameIso_equiv hC q T (𝟙 Y) + erw [Category.comp_id] at h + exact h + have hl := cutoffFrameHomEquiv_left hC q (Shape.liftedRealization.map f) Y (𝟙 Y) + erw [Category.comp_id] at hl + exact (cutoffShapeEquiv_left hC q f Y _).trans + ((congrArg (fun g : Shape.liftedRealization.obj T ⟶ (cutoffForgetGlobular C q).obj Y => + Shape.liftedRealization.map f ≫ g) hh).trans + (hl.symm.trans (shapeFrameIso_equiv hC q S (D.shapeRealization.map f)).symm)) + +omit [HasColimitsOfSize.{0,v} (CutoffModels C q)] in +@[simp] theorem cutoffShapeEquiv_top (Y : CutoffModels C q) (j : ℕ) + (a : cutoffDisk hC q j ⟶ Y) : + (cutoffShapeEquiv hC q (Shape.globe j) Y a).app (op (Globe.mk j)) + (ULift.up (ULift.up (𝟙 (Globe.mk j)))) = cutoffCellEquiv hC q Y j a := by + change Y.obj.eval (C.base ((Shape.globe j).cellArrow _ (ULift.up (𝟙 (Globe.mk j))))) _ = _ + erw [Shape.cellArrow_identity, C.base_id, eval_id] + rfl + +@[simp] theorem shapeFrameIso_globe (j : ℕ) : + (shapeFrameIso hC q (Shape.globe j)).hom = ((cutoffDiskFrame hC q).shapeGlobeIso j).inv := by + apply (cutoffCellEquiv hC q _ j).injective + have hh := shapeFrameIso_equiv hC q (Shape.globe j) (𝟙 _) + erw [Category.comp_id] at hh + have e := congrArg (fun f => f.app (op (Globe.mk j)) + (ULift.up (ULift.up (𝟙 (Globe.mk j))))) hh + erw [cutoffShapeEquiv_top] at e + change cutoffCellEquiv hC q _ j _ = cutoffCellEquiv hC q _ j + ((cutoffDiskFrame hC q).cell (Shape.liftedRealization.obj (Shape.globe j)) j + (ULift.up (ULift.up (𝟙 (Globe.mk j)))) ≫ 𝟙 _) at e + erw [Category.comp_id, ← GlobularFrame.shapeGlobeIso_inv_cell] at e + exact e + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/SkeletalPresentation.lean b/lean/OAI/CategoryTheory/Globular/SkeletalPresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..b20461c91c026a9b9a65a4071daf7aa45b3546be --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/SkeletalPresentation.lean @@ -0,0 +1,108 @@ +import OAI.CategoryTheory.Globular.CylinderGluing + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularSet.LiftStage +variable {S A B : GlobularSet.{v}} {p : Hom A B} {f : Hom S B} +def restrict {n m : ℕ} (a : LiftStage p f m) (h : n ≤ m) : LiftStage p f n where + app j hj := a.app j (hj.trans h) + source_app j hj := a.source_app j (hj.trans h) + target_app j hj := a.target_app j (hj.trans h) + fac j hj := a.fac j (hj.trans h) +end GlobularSet.LiftStage +namespace GlobularFrame +variable {K : Type u} [Category.{v} K] {D B : GlobularFrame K} +variable {e : Hom D B} {S : GlobularSet.{v}} {m : ℕ} + +structure Presentation (e : Hom D B) (S : GlobularSet.{v}) (m : ℕ) where + obj : K + base : GlobularSet.Hom S (D.homGlob obj) + stage : GlobularSet.LiftStage (e.pre obj) base m + desc : ∀ {Y : K} (f : GlobularSet.Hom S (D.homGlob Y)), + GlobularSet.LiftStage (e.pre Y) f m → (obj ⟶ Y) + base_desc : ∀ {Y} f a j x, base.app j x ≫ desc (Y := Y) f a = f.app j x + stage_desc : ∀ {Y} f a j hj x, stage.app j hj x ≫ desc (Y := Y) f a = a.app j hj x + hom_ext : ∀ {Y} {f g : obj ⟶ Y}, + (∀ j x, base.app j x ≫ f = base.app j x ≫ g) → + (∀ j hj x, stage.app j hj x ≫ f = stage.app j hj x ≫ g) → f = g + +namespace Presentation +variable (V : Presentation e S m) +noncomputable def stageOn {Y : K} (f : GlobularSet.Hom S (D.homGlob Y)) + (b : V.obj ⟶ Y) (hb : ∀ j x, V.base.app j x ≫ b = f.app j x) : + GlobularSet.LiftStage (e.pre Y) f m where + app j hj x := V.stage.app j hj x ≫ b + source_app j hj x := by + change V.stage.app j _ (S.source j x) ≫ b = B.diagram.source j ≫ V.stage.app (j+1) hj x ≫ b + erw [V.stage.source_app] + exact Category.assoc _ _ _ + target_app j hj x := by + change V.stage.app j _ (S.target j x) ≫ b = B.diagram.target j ≫ V.stage.app (j+1) hj x ≫ b + erw [V.stage.target_app] + exact Category.assoc _ _ _ + fac j hj x := by + change e.obj j ≫ V.stage.app j hj x ≫ b = f.app j x + have hv : e.obj j ≫ V.stage.app j hj x = V.base.app j x := V.stage.fac j hj x + erw [← Category.assoc, hv, hb] + +noncomputable def postStage {Y : K} (b : V.obj ⟶ Y) : + GlobularSet.LiftStage (e.pre Y) (V.base.comp (post b)) m := + V.stageOn _ b (fun _ _ => rfl) + +variable {n : ℕ} (U : Presentation e S n) +noncomputable def comparison (h : n ≤ m) : U.obj ⟶ V.obj := + U.desc V.base (V.stage.restrict h) + +@[reassoc] theorem comparison_base (h : n ≤ m) (j : ℕ) (x : S.Cell j) : + U.base.app j x ≫ V.comparison U h = V.base.app j x := U.base_desc _ _ j x +@[reassoc] theorem comparison_stage (h : n ≤ m) (j : ℕ) (hj : j ≤ n) (x : S.Cell j) : + U.stage.app j hj x ≫ V.comparison U h = V.stage.app j (hj.trans h) x := U.stage_desc _ _ j hj x + +variable [HasPushouts K] +theorem comparison_lifting (h : n ≤ m) {X Y : K} (p : X ⟶ Y) + (hp : ∀ j, n < j → j ≤ m → HasLiftingProperty (oneSidedMap e j) p) : + HasLiftingProperty (V.comparison U h) p := by + constructor + intro a b sq + let f : GlobularSet.Hom S (D.homGlob X) := U.base.comp (post a) + have hb : ∀ j x, V.base.app j x ≫ b = (f.comp (post p)).app j x := by + intro j x + change V.base.app j x ≫ b = (U.base.app j x ≫ a) ≫ p + erw [Category.assoc, sq.w, ← Category.assoc, comparison_base] + let t := V.stageOn (f.comp (post p)) b hb + let s : RelativeStage e p f t n h := + ⟨U.postStage a, fun j hj x => by + change (U.stage.app j hj x ≫ a) ≫ p = V.stage.app j (hj.trans h) x ≫ b + erw [Category.assoc, sq.w, ← Category.assoc, comparison_stage]⟩ + let d := m-n + have hd : n+d = m := Nat.add_sub_of_le h + let z := s.extendBy d (by omega) (fun j hj hj' => hp j hj (by omega)) + let l := V.desc f (z.stage.restrict (by omega : m ≤ n+d)) + have hl₁ : V.comparison U h ≫ l = a := by + apply U.hom_ext + · intro j x + erw [← Category.assoc, comparison_base, V.base_desc] + rfl + · intro j hj x + erw [← Category.assoc, comparison_stage, V.stage_desc] + change z.stage.app j _ x = U.stage.app j hj x ≫ a + exact s.extendBy_old d _ _ j hj x + have hl₂ : l ≫ p = b := by + apply V.hom_ext + · intro j x + erw [← Category.assoc, V.base_desc] + exact (hb j x).symm + · intro j hj x + erw [← Category.assoc, V.stage_desc] + exact z.fac_right j (by omega) x + exact CommSq.HasLift.mk' ⟨l, hl₁, hl₂⟩ + +end Presentation +end GlobularFrame +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/SmallFree.lean b/lean/OAI/CategoryTheory/Globular/SmallFree.lean new file mode 100644 index 0000000000000000000000000000000000000000..f2ac6f6718bb6e02b18b4ad090d0a29eb98fd7a9 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/SmallFree.lean @@ -0,0 +1,88 @@ +import OAI.CategoryTheory.Globular.Density + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model + +theorem smallFree_hom_ext {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + {f g : (smallFree hC q).obj S ⟶ Y} + (h : ∀ k x, (underlyingMap f.hom).app k (smallFreeGen hC q S k x) = + (underlyingMap g.hom).app k (smallFreeGen hC q S k x)) : f = g := by + apply ((cutoffGlobularAdjunction hC q).homEquiv _ Y).injective + apply GlobularPresheaf.underlyingMap_injective + ext k x + exact h k x.down + +noncomputable def smallShapeDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) {Y : CutoffModels C q} + (t : Y.obj.presheaf.obj (op (⟨S⟩ : C.Obj))) : (smallFree hC q).obj S.realize ⟶ Y := + ((cutoffGlobularAdjunction hC q).homEquiv _ Y).symm + (shapeGlobularEquiv S Y.obj (Y.obj.tupleMap S t)) + +@[simp] theorem smallShapeDesc_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) {Y : CutoffModels C q} + (t : Y.obj.presheaf.obj (op (⟨S⟩ : C.Obj))) (k : ℕ) (x : S.realize.underlying.Cell k) : + (underlyingMap (smallShapeDesc hC q S t).hom).app k (smallFreeGen hC q S.realize k x) = + Y.obj.eval (C.base (S.cellArrow (op (Globe.mk k)) x)) t := by + have h := ((cutoffGlobularAdjunction hC q).homEquiv _ Y).apply_symm_apply + (shapeGlobularEquiv S Y.obj (Y.obj.tupleMap S t)) + have e := congrFun (congrArg (fun z => (GlobularPresheaf.underlyingMap z).app k) h) (ULift.up x) + change (underlyingMap (smallShapeDesc hC q S t).hom).app k + (smallFreeGen hC q S.realize k x) = + ((Y.obj.tuples.evaluation.app (op S)) (yonedaEquiv (Y.obj.tupleMap S t))).app + (op (Globe.mk k)) (ULift.up x) at e + have ht : yonedaEquiv (Y.obj.tupleMap S t) = t := yonedaEquiv.apply_symm_apply t + erw [ht] at e + exact e + +@[reassoc] theorem smallShapeDesc_naturality {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S T : Shape} (f : S ⟶ T) {Y : CutoffModels C q} + (t : Y.obj.presheaf.obj (op (⟨T⟩ : C.Obj))) : + (smallFree hC q).map (Shape.realization.map f) ≫ smallShapeDesc hC q T t = + smallShapeDesc hC q S (Y.obj.eval (C.base f) t) := by + apply smallFree_hom_ext hC q + intro k x + change (underlyingMap (smallShapeDesc hC q T t).hom).app k + ((underlyingMap ((smallFree hC q).map (Shape.realization.map f)).hom).app k + (smallFreeGen hC q S.realize k x)) = _ + erw [smallFreeGen_map, smallShapeDesc_gen, smallShapeDesc_gen] + change Y.obj.eval (C.base (T.cellArrow _ (f.app _ x))) t = _ + erw [Shape.cellArrow_naturality, C.base_comp, eval_comp] + +noncomputable def smallDiskDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q k : ℕ) {Y : CutoffModels C q} (x : Y.obj.underlying.Cell k) : + (smallFree hC q).obj (GlobularPresheaf.disk k) ⟶ Y := + smallShapeDesc hC q (Shape.globe k) x + +@[simp] theorem smallDiskDesc_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q k : ℕ) {Y : CutoffModels C q} (x : Y.obj.underlying.Cell k) : + (underlyingMap (smallDiskDesc hC q k x).hom).app k + (smallFreeGen hC q (GlobularPresheaf.disk k) k (ULift.up (𝟙 (Globe.mk k)))) = x := by + unfold smallDiskDesc + erw [smallShapeDesc_gen, Shape.cellArrow_identity, C.base_id, eval_id] + +theorem smallShape_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (S : Shape) : ((smallFree hC q).obj S.realize).obj.underlying.HasFillers := by + let e := smallFreeShapeIso hC q S + apply (cutoff_freeShape_hasFillers C hC S q).retract + (underlyingMap e.hom.hom) (underlyingMap e.inv.hom) + exact congrArg (fun z => underlyingMap z.hom) e.hom_inv_id + +theorem linearFree_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : Shape) (hS : S.2.height ≤ n+1) : + ((smallFree hC q).obj ((Shape.linearization n).obj S.realize)).obj.underlying.HasFillers := by + let d := S.2.linearData n hS + let e := (smallFree hC q).mapIso d.iso + apply (smallShape_hasFillers hC q ⟨_,d.table⟩).retract + (underlyingMap e.hom.hom) (underlyingMap e.inv.hom) + exact congrArg (fun z => underlyingMap z.hom) e.hom_inv_id + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/SmallObject.lean b/lean/OAI/CategoryTheory/Globular/SmallObject.lean new file mode 100644 index 0000000000000000000000000000000000000000..319fc178de1002ef81d63ba783faad9f42852924 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/SmallObject.lean @@ -0,0 +1,303 @@ +import OAI.CategoryTheory.Globular.Boundary + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularTheory.Model +open CategoryTheory CategoryTheory.Limits Opposite +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +instance presheafFunctor_finitelyAccessible (C : GlobularTheory.{v}) : + (presheafFunctor C).IsCardinalAccessible Cardinal.aleph0.{v} := by + let : C.sumComparisons.isLocal.ι.IsCardinalAccessible Cardinal.aleph0.{v} := by + apply MorphismProperty.isCardinalAccessible_ι_isLocal _ Cardinal.aleph0.{v} + rintro X Y f ⟨t⟩ + exact ⟨C.sumComparison_source_presentable t, + C.shrinkYoneda_cardinalPresentable (C.sumCone t).pt.unop⟩ + let : (toLocal C).IsEquivalence := (localEquivalence C).isEquivalence_functor + change ((toLocal C) ⋙ C.sumComparisons.isLocal.ι).IsCardinalAccessible Cardinal.aleph0.{v} + infer_instance + +instance freeShape_finitelyPresentable (C : GlobularTheory.{v}) (S : Shape) : + IsCardinalPresentable (freeShape C S) Cardinal.aleph0.{v} := by + let e : coyoneda.obj (op (freeShape C S)) ≅ + presheafFunctor C ⋙ (evaluation C.Objᵒᵖ (Type v)).obj (op (⟨S⟩ : C.Obj)) := + NatIso.ofComponents (fun X => Equiv.toIso yonedaEquiv) + exact Functor.isCardinalAccessible_of_natIso e.symm Cardinal.aleph0.{v} + +instance disk_finitelyPresentable (C : GlobularTheory.{v}) (n : ℕ) : + IsCardinalPresentable (disk C n) Cardinal.aleph0.{v} := + freeShape_finitelyPresentable C (Shape.globe n) + +instance boundaryDisk_finitelyPresentable (C : GlobularTheory.{v}) (n : ℕ) : + IsCardinalPresentable (boundaryDisk C n) Cardinal.aleph0.{v} := by + induction n with + | zero => + change IsCardinalPresentable (⊥_ C.Model) Cardinal.aleph0.{v} + let (k : Discrete PEmpty) : IsCardinalPresentable + ((Functor.empty C.Model).obj k) Cardinal.aleph0.{v} := by cases k.as + apply isCardinalPresentable_of_isColimit _ (initialIsInitial) Cardinal.aleph0.{v} + exact hasCardinalLT_of_finite _ _ le_rfl + | succ n ih => + let := ih + change IsCardinalPresentable (pushout (I C n) (I C n)) Cardinal.aleph0.{v} + let (k : WalkingSpan) : IsCardinalPresentable + ((span (I C n) (I C n)).obj k) Cardinal.aleph0.{v} := by + cases k with + | none => exact ih + | some k => cases k <;> exact disk_finitelyPresentable C n + apply isCardinalPresentable_of_isColimit _ (colimit.isColimit _) Cardinal.aleph0.{v} + exact hasCardinalLT_of_finite _ _ le_rfl + +open CategoryTheory CategoryTheory.Limits Opposite +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +noncomputable def highBoundaries (C : GlobularTheory.{v}) (q : ℕ) : + MorphismProperty C.Model := + MorphismProperty.ofHoms (fun n : {n : ℕ // q < n} => I C n.1) + +theorem isCoskeletal_iff_local {C : GlobularTheory.{v}} (M : C.Model) (q : ℕ) : + M.IsCoskeletal q ↔ (highBoundaries C q).isLocal M := by + constructor + · intro h A B i hi + rcases hi with ⟨⟨n, hn⟩⟩ + let R := boundaryRepresentation C n + constructor + · intro f g hfg + apply (cellEquiv M n).injective + apply (h n hn).1 + rw [← R.inclusion_boundary, ← R.inclusion_boundary] + exact congrArg (R.equiv M) hfg + · intro f + obtain ⟨x, hx⟩ := (h n hn).2 (R.equiv M f) + refine ⟨(cellEquiv M n).symm x, ?_⟩ + apply (R.equiv M).injective + rw [R.inclusion_boundary, Equiv.apply_symm_apply] + exact hx + · intro h n hn + have hb := h (I C n) (MorphismProperty.ofHoms.mk (⟨n, hn⟩ : {n : ℕ // q < n})) + let R := boundaryRepresentation C n + change Function.Bijective (fun f : disk C n ⟶ M => R.inclusion ≫ f) at hb + constructor + · intro x y hxy + apply (cellEquiv M n).symm.injective + apply hb.1 + apply (R.equiv M).injective + simpa only [R.inclusion_boundary, Equiv.apply_symm_apply] using hxy + · intro b + obtain ⟨f, hf⟩ := hb.2 ((R.equiv M).symm b) + change R.inclusion ≫ f = (R.equiv M).symm b at hf + refine ⟨cellEquiv M n f, ?_⟩ + rw [← R.inclusion_boundary, hf] + exact (R.equiv M).apply_symm_apply b + +theorem highBoundaries_local (C : GlobularTheory.{v}) (q : ℕ) : + (highBoundaries C q).isLocal = (fun X : C.Model => X.IsCoskeletal q) := by + funext X + exact propext (isCoskeletal_iff_local X q).symm + +instance cutoffInclusion_finitelyAccessible (C : GlobularTheory.{v}) (q : ℕ) : + (ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q)).IsCardinalAccessible + Cardinal.aleph0.{v} := by + rw [← highBoundaries_local] + apply MorphismProperty.isCardinalAccessible_ι_isLocal _ Cardinal.aleph0.{v} + rintro A B i ⟨⟨n, hn⟩⟩ + exact ⟨boundaryDisk_finitelyPresentable C n, disk_finitelyPresentable C n⟩ + +theorem cutoff_finitelyPresentable {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) (X : C.Model) [IsCardinalPresentable X Cardinal.aleph0.{v}] : + IsCardinalPresentable ((cutoffFunctor hC q).obj X) Cardinal.aleph0.{v} := + (cutoffAdjunction hC q).isCardinalPresentable_leftAdjoint_obj Cardinal.aleph0.{v} X + +open CategoryTheory CategoryTheory.Limits Opposite +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +noncomputable instance hasLimits (C : GlobularTheory.{v}) : HasLimitsOfSize.{v,v} C.Model := by + let := presheafReflection C + let : HasLimitsOfSize.{v,v} C.sumComparisons.isLocal.FullSubcategory := + hasLimits_of_reflective C.sumComparisons.isLocal.ι + exact Adjunction.has_limits_of_equivalence (localEquivalence C).functor + +theorem hasFillers_iff {C : GlobularTheory.{v}} (X : C.Model) : + X.underlying.HasFillers ↔ ∀ n (f : boundaryDisk C n ⟶ X), + ∃ g : disk C n ⟶ X, I C n ≫ g = f := by + constructor + · intro h n f + let R := boundaryRepresentation C n + obtain ⟨x, hx⟩ := h n (R.equiv X f) + refine ⟨(cellEquiv X n).symm x, (R.equiv X).injective ?_⟩ + change R.equiv X (R.inclusion ≫ (cellEquiv X n).symm x) = R.equiv X f + simpa only [R.inclusion_boundary, Equiv.apply_symm_apply] using hx + · intro h n b + let R := boundaryRepresentation C n + obtain ⟨g, hg⟩ := h n ((R.equiv X).symm b) + refine ⟨cellEquiv X n g, ?_⟩ + change R.inclusion ≫ g = (R.equiv X).symm b at hg + rw [← R.inclusion_boundary, hg, Equiv.apply_symm_apply] + +theorem hasFillers_of_filteredColimit {C : GlobularTheory.{v}} + {K : Type v} [SmallCategory K] [IsFiltered K] + {F : K ⥤ C.Model} {c : Cocone F} (hc : IsColimit c) + (hF : ∀ k, (F.obj k).underlying.HasFillers) : c.pt.underlying.HasFillers := by + rw [hasFillers_iff] + intro n f + obtain ⟨k, g, hg⟩ := IsFinitelyPresentable.exists_hom_of_isColimit hc f + obtain ⟨a, ha⟩ := (hasFillers_iff (F.obj k)).1 (hF k) n g + exact ⟨a ≫ c.ι.app k, by rw [← Category.assoc, ha, hg]⟩ + +theorem hasFillers_of_cutoffFilteredColimit {C : GlobularTheory.{v}} + (q : ℕ) + {K : Type v} [SmallCategory K] [IsFiltered K] + {F : K ⥤ CutoffModels C q} {c : Cocone F} (hc : IsColimit c) + (hF : ∀ k, (F.obj k).obj.underlying.HasFillers) : c.pt.obj.underlying.HasFillers := by + let ι := ObjectProperty.ι (fun X : C.Model => X.IsCoskeletal q) + have : PreservesFilteredColimitsOfSize.{v,v} ι := + Functor.IsFinitelyAccessible_iff_preservesFilteredColimitsOfSize.mp inferInstance + exact hasFillers_of_filteredColimit (isColimitOfPreserves ι hc) hF + +end Grothendieck.GlobularTheory.Model + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +attribute [local instance] Cardinal.fact_isRegular_aleph0 Cardinal.orderBotAleph0OrdToType + +theorem smallObjectArgument_of_finiteDomains {A : Type u} [Category.{v} A] + [HasColimitsOfSize.{v,v} A] {ι : Type w} [Small.{v} ι] + {U V : ι → A} (f : ∀ i, U i ⟶ V i) + [∀ i, IsCardinalPresentable (U i) Cardinal.aleph0.{v}] : + (MorphismProperty.ofHoms f).HasSmallObjectArgument.{v} := by + refine ⟨Cardinal.aleph0.{v}, inferInstance, inferInstance, ?_⟩ + refine { preservesColimit := ?_ } + rintro _ _ _ _ _ ⟨i⟩ g hg + infer_instance + +namespace GlobularTheory.Model + +noncomputable abbrev cutoffDisk {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) : CutoffModels C q := (cutoffFunctor hC q).obj (disk C n) + +noncomputable abbrev cutoffBoundary {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) : CutoffModels C q := (cutoffFunctor hC q).obj (boundaryDisk C n) + +noncomputable abbrev cutoffI {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) : cutoffBoundary hC q n ⟶ cutoffDisk hC q n := + (cutoffFunctor hC q).map (I C n) + +noncomputable abbrev cutoffJ {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) : cutoffDisk hC q n ⟶ cutoffDisk hC q (n+1) := + (cutoffFunctor hC q).map (J C n) + +noncomputable def boundaryClass {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : MorphismProperty (CutoffModels C q) := + MorphismProperty.ofHoms (fun n : {n : ℕ // r ≤ n} => cutoffI hC q n.1) + +noncomputable def sourceClass {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : MorphismProperty (CutoffModels C q) := + MorphismProperty.ofHoms (fun n : {n : ℕ // r ≤ n} => cutoffJ hC q n.1) + +theorem boundaryClass_rlp_iff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) {X Y : CutoffModels C q} (p : X ⟶ Y) : + (boundaryClass hC q r).rlp p ↔ + ∀ n, r ≤ n → HasLiftingProperty (I C n) p.hom := by + constructor + · intro hp n hn + exact ((cutoffAdjunction hC q).hasLiftingProperty_iff _ _).1 + (hp _ (MorphismProperty.ofHoms.mk (⟨n, hn⟩ : {n : ℕ // r ≤ n}))) + · intro hp _ _ i hi + rcases hi with ⟨⟨n, hn⟩⟩ + exact ((cutoffAdjunction hC q).hasLiftingProperty_iff _ _).2 (hp n hn) + +theorem sourceClass_rlp_iff {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) {X Y : CutoffModels C q} (p : X ⟶ Y) : + (sourceClass hC q r).rlp p ↔ + ∀ n, r ≤ n → HasLiftingProperty (J C n) p.hom := by + constructor + · intro hp n hn + exact ((cutoffAdjunction hC q).hasLiftingProperty_iff _ _).1 + (hp _ (MorphismProperty.ofHoms.mk (⟨n, hn⟩ : {n : ℕ // r ≤ n}))) + · intro hp _ _ i hi + rcases hi with ⟨⟨n, hn⟩⟩ + exact ((cutoffAdjunction hC q).hasLiftingProperty_iff _ _).2 (hp n hn) + +theorem boundaryClass_smallObject {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : (boundaryClass hC q r).HasSmallObjectArgument.{v} := by + let := cutoff_hasColimits hC q + let (n : {n : ℕ // r ≤ n}) : IsCardinalPresentable + (cutoffBoundary hC q n.1) Cardinal.aleph0.{v} := + cutoff_finitelyPresentable hC q (boundaryDisk C n.1) + exact smallObjectArgument_of_finiteDomains _ + +theorem sourceClass_smallObject {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : (sourceClass hC q r).HasSmallObjectArgument.{v} := by + let := cutoff_hasColimits hC q + let (n : {n : ℕ // r ≤ n}) : IsCardinalPresentable + (cutoffDisk hC q n.1) Cardinal.aleph0.{v} := + cutoff_finitelyPresentable hC q (disk C n.1) + exact smallObjectArgument_of_finiteDomains _ + +def Cofibrant {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q : ℕ) + (X : CutoffModels C q) : Prop := + ∀ {P Q : CutoffModels C q} (p : P ⟶ Q), (boundaryClass hC q 0).rlp p → + ∀ f : X ⟶ Q, ∃ g : X ⟶ P, g ≫ p = f + +theorem Cofibrant.of_cofibration {C : GlobularTheory.{v}} {hC : C.IsCoherator} + {q : ℕ} {X Y : CutoffModels C q} (hX : Cofibrant hC q X) (i : X ⟶ Y) + (hi : (boundaryClass hC q 0).rlp.llp i) : Cofibrant hC q Y := by + intro P Q p hp f + obtain ⟨g, hg⟩ := hX p hp (i ≫ f) + let := hi p hp + have sq : CommSq g i p f := ⟨hg⟩ + exact ⟨sq.lift, sq.fac_right⟩ + +theorem Cofibrant.retract {C : GlobularTheory.{v}} {hC : C.IsCoherator} + {q : ℕ} {X Y : CutoffModels C q} (hY : Cofibrant hC q Y) + (i : X ⟶ Y) (r : Y ⟶ X) (hir : i ≫ r = 𝟙 X) : Cofibrant hC q X := by + intro P Q p hp f + obtain ⟨g, hg⟩ := hY p hp (r ≫ f) + exact ⟨i ≫ g, by rw [Category.assoc, hg, ← Category.assoc, hir, Category.id_comp]⟩ + +theorem hasLiftingProperty_J_of_I {C : GlobularTheory.{v}} {X Y : C.Model} + (n : ℕ) (p : X ⟶ Y) (hn : HasLiftingProperty (I C n) p) + (hn₁ : HasLiftingProperty (I C (n+1)) p) : HasLiftingProperty (J C n) p := by + rw [hasLiftingProperty_J_iff] + intro x y hy + have hb : Y.underlying.boundary n (Y.underlying.target n y) = + (underlyingMap p).boundaryMap n (X.underlying.boundary n x) := by + rw [(underlyingMap p).boundary_app] + have hp := (GlobularSet.parallel_iff_boundary_eq Y.underlying n + (Y.underlying.source n y) (Y.underlying.target n y)).1 + (GlobularSet.Joined.parallel ⟨y, rfl, rfl⟩) + rw [hy] at hp + exact hp.symm + obtain ⟨z, hz, hpz⟩ := (hasLiftingProperty_I_iff n p).1 hn + (X.underlying.boundary n x) (Y.underlying.target n y) hb + let b : X.underlying.Boundary (n+1) := ⟨(x,z), + (GlobularSet.parallel_iff_boundary_eq _ _ _ _).2 hz.symm⟩ + have hby : Y.underlying.boundary (n+1) y = (underlyingMap p).boundaryMap (n+1) b := by + apply Subtype.ext + exact Prod.ext hy hpz.symm + obtain ⟨a, ha, hpa⟩ := (hasLiftingProperty_I_iff (n+1) p).1 hn₁ b y hby + exact ⟨a, congrArg (fun v => v.1.1) ha, hpa⟩ + +theorem sourceClass_cofibration_le {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) : (sourceClass hC q r).rlp.llp ≤ (boundaryClass hC q r).rlp.llp := by + apply MorphismProperty.antitone_llp + intro X Y p hp + rw [sourceClass_rlp_iff] + have h := (boundaryClass_rlp_iff hC q r p).1 hp + intro n hn + exact hasLiftingProperty_J_of_I n p.hom (h n hn) (h (n+1) (by omega)) + +theorem boundaryClass_cofibration_le {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r s : ℕ) (hrs : r ≤ s) : + (boundaryClass hC q s).rlp.llp ≤ (boundaryClass hC q r).rlp.llp := by + apply MorphismProperty.antitone_llp + intro X Y p hp + rw [boundaryClass_rlp_iff] at hp ⊢ + exact fun n hn => hp n (hrs.trans hn) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/SpineWhisker.lean b/lean/OAI/CategoryTheory/Globular/SpineWhisker.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c489a1edbe9634c849631bcba3bfca7d855900c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/SpineWhisker.lean @@ -0,0 +1,309 @@ +import OAI.CategoryTheory.Globular.Tree + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model + +noncomputable def smallWhiskerCell {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) + (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (k : ℕ) (x : (S.underlying.whisker n false).Cell k) : Y.obj.underlying.Cell k := + match x with + | .base k x => (underlyingMap f.hom).app k (smallFreeGen hC q S k x) + | .tip x => Y.obj.underlying.target n (e x) + | .edge x => e x + +theorem smallWhiskerCell_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.source n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) + (k : ℕ) (x : (S.underlying.whisker n false).Cell (k+1)) : + smallWhiskerCell hC q n f e k ((S.underlying.whisker n false).source k x) = + Y.obj.underlying.source k (smallWhiskerCell hC q n f e (k+1) x) := by + cases x with + | base k x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.source k x)) = _ + rw [← smallFreeGen_source, (underlyingMap f.hom).source_app] + rfl + | tip x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.source k x)) = _ + rw [← smallFreeGen_source, (underlyingMap f.hom).source_app, ← he] + exact Y.obj.underlying.source_source k _ + | edge x => exact (he x).symm + +theorem smallWhiskerCell_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.source n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) + (k : ℕ) (x : (S.underlying.whisker n false).Cell (k+1)) : + smallWhiskerCell hC q n f e k ((S.underlying.whisker n false).target k x) = + Y.obj.underlying.target k (smallWhiskerCell hC q n f e (k+1) x) := by + cases x with + | base k x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.target k x)) = _ + rw [← smallFreeGen_target, (underlyingMap f.hom).target_app] + rfl + | tip x => + change (underlyingMap f.hom).app k (smallFreeGen hC q S k (S.underlying.target k x)) = _ + rw [← smallFreeGen_target, (underlyingMap f.hom).target_app, ← he] + exact Y.obj.underlying.target_source k _ + | edge x => rfl + +noncomputable def smallWhiskerDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e : S.underlying.Cell n → Y.obj.underlying.Cell (n+1)) + (he : ∀ x, Y.obj.underlying.source n (e x) = + (underlyingMap f.hom).app n (smallFreeGen hC q S n x)) : whiskerFree hC q n S ⟶ Y := + smallFreeDescCells hC q (smallWhiskerCell hC q n f e) + (fun k x => by + have h := (S.underlying.whisker n false).presheafUnderlyingMap.source_app k x + change (S.underlying.whisker n false).presheaf.underlying.source k x = + (S.underlying.whisker n false).source k x at h + exact (congrArg (smallWhiskerCell hC q n f e k) h).trans + (smallWhiskerCell_source hC q n f e he k x)) + (fun k x => by + have h := (S.underlying.whisker n false).presheafUnderlyingMap.target_app k x + change (S.underlying.whisker n false).presheaf.underlying.target k x = + (S.underlying.whisker n false).target k x at h + exact (congrArg (smallWhiskerCell hC q n f e k) h).trans + (smallWhiskerCell_target hC q n f e he k x)) + +@[simp] theorem smallWhiskerDesc_base {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e) (he) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (smallWhiskerDesc hC q n f e he).hom).app k (wBase hC q n S k x) = + (underlyingMap f.hom).app k (smallFreeGen hC q S k x) := + smallFreeDescCells_gen hC q _ _ _ k _ + +@[simp] theorem smallWhiskerDesc_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : (smallFree hC q).obj S ⟶ Y) (e) (he) (x : S.underlying.Cell n) : + (underlyingMap (smallWhiskerDesc hC q n f e he).hom).app (n+1) (wEdge hC q n S x) = e x := + smallFreeDescCells_gen hC q _ _ _ (n+1) _ + +noncomputable def whiskerIn {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) : (smallFree hC q).obj S ⟶ whiskerFree hC q n S := + (smallFree hC q).map ((GlobularPresheaf.whiskeringInclusion n false).app S) + +@[simp] theorem whiskerIn_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (whiskerIn hC q n S).hom).app k (smallFreeGen hC q S k x) = + wBase hC q n S k x := smallFreeGen_map hC q _ k x + +theorem smallFree_low_bijective {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q r : ℕ) (hrq : r ≤ q) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) + (hf : ∀ k, k ≤ r → Function.Bijective ((GlobularPresheaf.underlyingMap f).app k)) : + ∀ k, k ≤ r → Function.Bijective ((underlyingMap ((smallFree hC q).map f).hom).app k) := by + apply (coskeletalLocalMap_iff hC r _).mp + intro Z hZ g + let Z' : CutoffModels C q := ⟨Z, fun j hj => hZ j (lt_of_le_of_lt hrq hj)⟩ + let A := cutoffGlobularAdjunction hC q + let g' : (smallFree hC q).obj S ⟶ Z' := ObjectProperty.homMk g + let f' := GlobularPresheaf.liftSmall.map f + have hf' : ∀ k, k ≤ r → Function.Bijective (f'.app (op (Globe.mk k))) := by + intro k hk + exact ULift.map_bijective.mpr (hf k hk) + have hb := GlobularPresheaf.precomp_bijective_low f' r hf' hZ + obtain ⟨b, hb'⟩ := hb.2 (A.homEquiv _ Z' g') + let a := (A.homEquiv _ Z').symm b + have ha : (smallFree hC q).map f ≫ a = g' := by + apply (A.homEquiv _ Z').injective + erw [Adjunction.homEquiv_naturality_left, Equiv.apply_symm_apply] + exact hb' + refine ⟨a.hom, congrArg (fun t => t.hom) ha, ?_⟩ + intro a' ha' + let a'' : (smallFree hC q).obj T ⟶ Z' := ObjectProperty.homMk a' + have hh : (smallFree hC q).map f ≫ a'' = g' := by + apply ObjectProperty.hom_ext + exact ha' + have hh' : a'' = a := by + apply (A.homEquiv _ Z').injective + apply hb.1 + change f' ≫ A.homEquiv _ Z' a'' = f' ≫ A.homEquiv _ Z' a + erw [← Adjunction.homEquiv_naturality_left, ← Adjunction.homEquiv_naturality_left, hh, ha] + exact congrArg (fun t => t.hom) hh' + +theorem liftsBoundary_of_bijective {X Y : GlobularSet.{u}} (p : GlobularSet.Hom X Y) + (k : ℕ) (hp : ∀ j, j ≤ k → Function.Bijective (p.app j)) : + GlobularSet.LiftsBoundary p k := by + intro bd y hy + obtain ⟨x, hx⟩ := (hp k le_rfl).2 y + refine ⟨x, ?_, hx⟩ + apply (p.boundaryMap_bijective_of_low k (fun j hj => hp j hj.le)).1 + rw [p.boundary_app, hx, hy] + +theorem exists_upper_resolution {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) {X Y : CutoffModels C q} (f : X ⟶ Y) + (hY : Cofibrant hC q Y) (hXF : X.obj.underlying.HasFillers) + (hYF : Y.obj.underlying.HasFillers) + (hf : ∀ k, k ≤ n → Function.Bijective ((underlyingMap f.hom).app k)) : + ∃ (M : CutoffModels C q) (i : X ⟶ M) (p : M ⟶ Y) (s : Y ⟶ M), + i ≫ p = f ∧ s ≫ p = 𝟙 Y ∧ (boundaryClass hC q (n+1)).rlp.llp i ∧ + M.obj.underlying.HasFillers ∧ + ∀ k, k ≤ n → Function.Injective ((underlyingMap p.hom).app k) := by + let := boundaryClass_smallObject hC q (n+1) + let W := boundaryClass hC q (n+1) + let F := MorphismProperty.factorizationData W.rlp.llp W.rlp f + have hi k (hk : k ≤ n) := upper_cofibration_low_bijective hC q (n+1) k + (hk.trans hnq) (by omega) F.i F.hi + have hp k (hk : k ≤ n) : Function.Bijective ((underlyingMap F.p.hom).app k) := by + have fac (x : X.obj.underlying.Cell k) : + (underlyingMap F.p.hom).app k ((underlyingMap F.i.hom).app k x) = + (underlyingMap f.hom).app k x := + congrFun (congrArg (fun z => (underlyingMap z.hom).app k) F.fac) x + constructor + · intro a b hab + obtain ⟨a', rfl⟩ := (hi k hk).2 a + obtain ⟨b', rfl⟩ := (hi k hk).2 b + exact congrArg ((underlyingMap F.i.hom).app k) + ((hf k hk).1 ((fac a').symm.trans (hab.trans (fac b')))) + · intro y + obtain ⟨x, hx⟩ := (hf k hk).2 y + exact ⟨(underlyingMap F.i.hom).app k x, (fac x).trans hx⟩ + have hMF : F.Z.obj.underlying.HasFillers := by + apply hXF.of_low_bijective (underlyingMap F.i.hom) n hi + intro k hk bd + obtain ⟨y, hy⟩ := hYF k ((underlyingMap F.p.hom).boundaryMap k bd) + obtain ⟨x, hx, _⟩ := (hasLiftingProperty_I_iff k F.p.hom).1 + ((boundaryClass_rlp_iff hC q (n+1) F.p).1 F.hp k (by omega)) bd y hy + exact ⟨x, hx⟩ + have hpI : (boundaryClass hC q 0).rlp F.p := by + rw [boundaryClass_rlp_iff] + intro k _ + by_cases hk : k ≤ n + · rw [hasLiftingProperty_I_iff] + exact liftsBoundary_of_bijective (underlyingMap F.p.hom) k + (fun j hj => hp j (hj.trans hk)) + · exact (boundaryClass_rlp_iff hC q (n+1) F.p).1 F.hp k (by omega) + obtain ⟨s, hs⟩ := hY F.p hpI (𝟙 Y) + exact ⟨F.Z, F.i, F.p, s, F.fac, hs, F.hi, hMF, fun k hk => (hp k hk).1⟩ + +theorem whiskerFree_hom_ext {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + {f g : whiskerFree hC q n S ⟶ Y} + (hb : ∀ k x, (underlyingMap f.hom).app k (wBase hC q n S k x) = + (underlyingMap g.hom).app k (wBase hC q n S k x)) + (he : ∀ x, (underlyingMap f.hom).app (n+1) (wEdge hC q n S x) = + (underlyingMap g.hom).app (n+1) (wEdge hC q n S x)) : f = g := by + apply smallFree_hom_ext hC q + intro k x + cases x with + | base k x => exact hb k x + | edge x => exact he x + | tip x => + rw [← wEdge_target hC q k S x, (underlyingMap f.hom).target_app, + (underlyingMap g.hom).target_app, he] + +noncomputable def whiskerFreeMap {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) : + whiskerFree hC q n S ⟶ whiskerFree hC q n T := + (smallFree hC q).map ((GlobularPresheaf.whiskering n false).map f) + +@[simp] theorem whiskerFreeMap_base {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (whiskerFreeMap hC q n f).hom).app k (wBase hC q n S k x) = + wBase hC q n T k ((GlobularPresheaf.underlyingMap f).app k x) := + smallFreeGen_map hC q _ k _ + +@[simp] theorem whiskerFreeMap_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) (x : S.underlying.Cell n) : + (underlyingMap (whiskerFreeMap hC q n f).hom).app (n+1) (wEdge hC q n S x) = + wEdge hC q n T ((GlobularPresheaf.underlyingMap f).app n x) := + smallFreeGen_map hC q _ (n+1) _ + +@[reassoc] theorem whiskerIn_naturality {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) {S T : GlobularPresheaf.{0}} (f : S ⟶ T) : + whiskerIn hC q n S ≫ whiskerFreeMap hC q n f = + (smallFree hC q).map f ≫ whiskerIn hC q n T := by + unfold whiskerIn whiskerFreeMap + rw [← Functor.map_comp, ← Functor.map_comp] + exact congrArg (smallFree hC q).map ((GlobularPresheaf.whiskeringInclusion n false).naturality f).symm + +theorem whiskerFree_hasFillers_of_spine {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + {S T : GlobularPresheaf.{0}} (f : S ⟶ T) + (hf : ∀ k, k ≤ n → Function.Bijective ((GlobularPresheaf.underlyingMap f).app k)) + (hS : ((smallFree hC q).obj S).obj.underlying.HasFillers) + (hT : ((smallFree hC q).obj T).obj.underlying.HasFillers) + (hW : (whiskerFree hC q n S).obj.underlying.HasFillers) : + (whiskerFree hC q n T).obj.underlying.HasFillers := by + let := cutoff_hasColimits hC q + let F := smallFree hC q + obtain ⟨M,i,p,s,hip,hsp,hi,hM,hp⟩ := exists_upper_resolution hC q n hnq + (F.map f) (smallFree_cofibrant hC q T) hS hT + (smallFree_low_bijective hC q n hnq f hf) + let a := whiskerIn hC q n S + let Q := pushout a i + let j : whiskerFree hC q n S ⟶ Q := pushout.inl a i + let k : M ⟶ Q := pushout.inr a i + have hQ : Q.obj.underlying.HasFillers := upper_pushout_hasFillers hC q (n+1) H + (IsPushout.of_hasPushout a i) hi (smallFree_cofibrant hC q S) hS hM + (smallFree_cofibrant hC q _) hW + let wm := whiskerFreeMap hC q n f + let r : Q ⟶ whiskerFree hC q n T := pushout.desc wm (p ≫ whiskerIn hC q n T) (by + rw [← Category.assoc, hip] + exact whiskerIn_naturality hC q n f) + have hjr : j ≫ r = wm := pushout.inl_desc _ _ _ + have hkr : k ≫ r = p ≫ whiskerIn hC q n T := pushout.inr_desc _ _ _ + let E := Equiv.ofBijective ((GlobularPresheaf.underlyingMap f).app n) (hf n le_rfl) + have hsgen (x : T.underlying.Cell n) : + (underlyingMap s.hom).app n (smallFreeGen hC q T n x) = + (underlyingMap i.hom).app n (smallFreeGen hC q S n (E.symm x)) := by + apply hp n le_rfl + have hs := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) hsp) + (smallFreeGen hC q T n x) + have hi' := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) hip) + (smallFreeGen hC q S n (E.symm x)) + exact hs.trans (((smallFreeGen_map hC q f n (E.symm x)).trans + (congrArg (smallFreeGen hC q T n) (E.apply_symm_apply x))).symm.trans hi'.symm) + let e (x : T.underlying.Cell n) := (underlyingMap j.hom).app (n+1) (wEdge hC q n S (E.symm x)) + have he (x : T.underlying.Cell n) : Q.obj.underlying.source n (e x) = + (underlyingMap (s ≫ k).hom).app n (smallFreeGen hC q T n x) := by + change Q.obj.underlying.source n ((underlyingMap j.hom).app (n+1) _) = + (underlyingMap k.hom).app n ((underlyingMap s.hom).app n _) + rw [← (underlyingMap j.hom).source_app, wEdge_source, hsgen] + have hh := congrFun (congrArg (fun z => (underlyingMap z.hom).app n) + (pushout.condition (f := a) (g := i))) (smallFreeGen hC q S n (E.symm x)) + exact (congrArg ((underlyingMap j.hom).app n) + (whiskerIn_gen hC q n S n (E.symm x))).symm.trans hh + let t := smallWhiskerDesc hC q n (s ≫ k) e he + have htr : t ≫ r = 𝟙 _ := by + apply whiskerFree_hom_ext hC q n + · intro l x + change (underlyingMap r.hom).app l ((underlyingMap t.hom).app l _) = wBase hC q n T l x + have ht := smallWhiskerDesc_base hC q n (s ≫ k) e he l x + apply (congrArg ((underlyingMap r.hom).app l) ht).trans + have hcomp : (s ≫ k) ≫ r = whiskerIn hC q n T := by + rw [Category.assoc, hkr, ← Category.assoc, hsp, Category.id_comp] + exact (congrFun (congrArg (fun z => (underlyingMap z.hom).app l) hcomp) + (smallFreeGen hC q T l x)).trans (whiskerIn_gen hC q n T l x) + · intro x + change (underlyingMap r.hom).app (n+1) ((underlyingMap t.hom).app (n+1) _) = wEdge hC q n T x + have ht := smallWhiskerDesc_edge hC q n (s ≫ k) e he x + apply (congrArg ((underlyingMap r.hom).app (n+1)) ht).trans + have hh := congrFun (congrArg (fun z => (underlyingMap z.hom).app (n+1)) hjr) + (wEdge hC q n S (E.symm x)) + exact hh.trans ((whiskerFreeMap_edge hC q n f (E.symm x)).trans + (congrArg (wEdge hC q n T) (E.apply_symm_apply x))) + exact hQ.retract (underlyingMap t.hom) (underlyingMap r.hom) + (congrArg (fun z : whiskerFree hC q n T ⟶ whiskerFree hC q n T => underlyingMap z.hom) htr) + +theorem whiskerFree_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) (S : Shape) : + (whiskerFree hC q n S.realize).obj.underlying.HasFillers := by + let P := S.2.spine n + exact whiskerFree_hasFillers_of_spine hC q n hnq H P.map P.low_bijective + (smallShape_hasFillers hC q P.S) (smallShape_hasFillers hC q S) + (whiskerFree_bounded_hasFillers hC q n H P.S P.height_le) + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Spines.lean b/lean/OAI/CategoryTheory/Globular/Spines.lean new file mode 100644 index 0000000000000000000000000000000000000000..26629fff40becca2bc2860442c7dda0ca979d721 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Spines.lean @@ -0,0 +1,228 @@ +import OAI.CategoryTheory.Globular.DiskComparison + +namespace OAI + +universe u v w + +namespace Grothendieck + +open CategoryTheory CategoryTheory.Limits Opposite + +namespace Table + +structure SpineData {n : ℕ} (T : Table n) (q : ℕ) where + S : Shape + last_eq : S.1 = min n (q+1) + height_le : S.height ≤ q+1 + map : S.realize ⟶ T.realize + low_bijective : ∀ k, k ≤ q → Function.Bijective (map.app (op (Globe.mk k))) + last_low : ∀ k, k ≤ q → + (S.last ≫ map).app (op (Globe.mk k)) = + (GlobularPresheaf.faceLE (show S.1 ≤ n by rw [last_eq]; exact min_le_left _ _) false ≫ + T.lastInclusion).app (op (Globe.mk k)) + +namespace SpineData + +noncomputable def globe (q n : ℕ) : (Table.globe n).SpineData q where + S := Shape.globe (min n (q+1)) + last_eq := rfl + height_le := min_le_right _ _ + map := GlobularPresheaf.faceLE (min_le_left n (q+1)) false + low_bijective _ hk := GlobularPresheaf.faceLE_cap_bijective rfl _ hk + last_low _ _ := rfl + +noncomputable def attachHigh {n : ℕ} {T : Table n} {q : ℕ} + (P : T.SpineData q) (b h : ℕ) (hl : b < n) (hr : b < h) (hb : q < b) : + (Table.attach T b h hl hr).SpineData q := by + have hdim : P.S.1 = q+1 := by rw [P.last_eq]; omega + have hn : P.S.1 ≤ n := by omega + have hh : P.S.1 ≤ h := by omega + have hsb : P.S.1 ≤ b := by omega + let i : T.realize ⟶ (Table.attach T b h hl hr).realize := Shape.inl ⟨n,T⟩ b h hl hr + let j : GlobularPresheaf.disk h ⟶ (Table.attach T b h hl hr).realize := + Shape.inr ⟨n,T⟩ b h hl hr + have sq : IsPushout (GlobularPresheaf.face hl true ≫ T.lastInclusion) + (GlobularPresheaf.face hr false) i j := IsPushout.of_hasPushout _ _ + refine ⟨P.S, ?_, P.height_le, P.map ≫ i, ?_, ?_⟩ + · rw [hdim] + omega + · intro k hk + let E := (evaluation Globeᵒᵖ (Type 0)).obj (op (Globe.mk k)) + have hg : IsIso (E.map (GlobularPresheaf.face hr false)) := + (isIso_iff_bijective _).2 (GlobularPresheaf.face_low_bijective hr (by omega) false) + have hi : IsIso (E.map i) := (sq.map E).isIso_inl_of_isIso hg + exact ((isIso_iff_bijective _).1 hi).comp (P.low_bijective k hk) + · intro k hk + let c := op (Globe.mk k) + let bridge := GlobularPresheaf.faceLE hsb false + have e1 : (GlobularPresheaf.faceLE hn false).app c = + (bridge ≫ GlobularPresheaf.face hl true).app c := by + change (uliftYoneda.map (Globe.faceLE hn false)).app c = + (uliftYoneda.map (Globe.faceLE hsb false) ≫ uliftYoneda.map (Globe.face hl true)).app c + rw [← uliftYoneda.map_comp] + exact GlobularPresheaf.globeMap_low_equal _ _ (by omega) + have e2 : (bridge ≫ GlobularPresheaf.face hr false).app c = + (GlobularPresheaf.faceLE hh false).app c := by + change (uliftYoneda.map (Globe.faceLE hsb false) ≫ uliftYoneda.map (Globe.face hr false)).app c = + (uliftYoneda.map (Globe.faceLE hh false)).app c + rw [← uliftYoneda.map_comp] + exact GlobularPresheaf.globeMap_low_equal _ _ (by omega) + have hp := P.last_low k hk + have hw := congrArg (fun a => a.app c) sq.w + simp only [NatTrans.comp_app] at hp hw e1 e2 + change P.S.last.app c ≫ (P.map.app c ≫ i.app c) = + (GlobularPresheaf.faceLE hh false).app c ≫ j.app c + rw [← Category.assoc, hp, e1] + calc + ((bridge.app c ≫ (GlobularPresheaf.face hl true).app c) ≫ T.lastInclusion.app c) ≫ i.app c = + bridge.app c ≫ (((GlobularPresheaf.face hl true).app c ≫ T.lastInclusion.app c) ≫ i.app c) := by simp only [Category.assoc] + _ = bridge.app c ≫ ((GlobularPresheaf.face hr false).app c ≫ j.app c) := by rw [hw] + _ = (GlobularPresheaf.faceLE hh false).app c ≫ j.app c := by rw [← Category.assoc, e2] + +end SpineData +end Table + +namespace Table.SpineData + +noncomputable def attachLow {n : ℕ} {T : Table n} {q : ℕ} + (P : T.SpineData q) (b h : ℕ) (hl : b < n) (hr : b < h) (hb : b ≤ q) : + (Table.attach T b h hl hr).SpineData q := by + have hn : P.S.1 ≤ n := by rw [P.last_eq]; exact min_le_left _ _ + have hbl : b < P.S.1 := by rw [P.last_eq]; omega + have hbr : b < min h (q+1) := by omega + let N : Shape := P.S.attach b (min h (q+1)) hbl hbr + let il : P.S.realize ⟶ N.realize := Shape.inl P.S b (min h (q+1)) hbl hbr + let ir : GlobularPresheaf.disk (min h (q+1)) ⟶ N.realize := + Shape.inr P.S b (min h (q+1)) hbl hbr + let cap := GlobularPresheaf.faceLE (min_le_left h (q+1)) false + let il' : T.realize ⟶ (Table.attach T b h hl hr).realize := Shape.inl ⟨n,T⟩ b h hl hr + let ir' : GlobularPresheaf.disk h ⟶ (Table.attach T b h hl hr).realize := + Shape.inr ⟨n,T⟩ b h hl hr + have sl : GlobularPresheaf.face hbl true ≫ P.S.last ≫ P.map = + GlobularPresheaf.face hl true ≫ T.lastInclusion := by + rw [GlobularPresheaf.face_comp_eq_of_app_eq hbl true _ _ (P.last_low b hb)] + rw [← Category.assoc, + GlobularPresheaf.face_comp_faceLE hbl hn true false] + have sr : GlobularPresheaf.face hbr false ≫ cap = GlobularPresheaf.face hr false := + GlobularPresheaf.face_comp_faceLE hbr _ false false + have sq : IsPushout (GlobularPresheaf.face hbl true ≫ P.S.last) + (GlobularPresheaf.face hbr false) il ir := IsPushout.of_hasPushout _ _ + have sq' : IsPushout (GlobularPresheaf.face hl true ≫ T.lastInclusion) + (GlobularPresheaf.face hr false) il' ir' := IsPushout.of_hasPushout _ _ + let f : N.realize ⟶ (Table.attach T b h hl hr).realize := + sq.desc (P.map ≫ il') (cap ≫ ir') (by + calc + (GlobularPresheaf.face hbl true ≫ P.S.last) ≫ (P.map ≫ il') = + (GlobularPresheaf.face hbl true ≫ P.S.last ≫ P.map) ≫ il' := by simp only [Category.assoc] + _ = (GlobularPresheaf.face hl true ≫ T.lastInclusion) ≫ il' := congrArg (fun a => a ≫ il') sl + _ = GlobularPresheaf.face hr false ≫ ir' := sq'.w + _ = GlobularPresheaf.face hbr false ≫ (cap ≫ ir') := by rw [← Category.assoc, sr]) + have fi : il ≫ f = P.map ≫ il' := sq.inl_desc _ _ _ + have fj : ir ≫ f = cap ≫ ir' := sq.inr_desc _ _ _ + refine ⟨N, rfl, ?_, f, ?_, ?_⟩ + · exact max_le P.height_le (min_le_right _ _) + · intro k hk + let E := (evaluation Globeᵒᵖ (Type 0)).obj (op (Globe.mk k)) + have : IsIso (E.map P.map) := (isIso_iff_bijective _).2 (P.low_bijective k hk) + have : IsIso (E.map cap) := (isIso_iff_bijective _).2 + (GlobularPresheaf.faceLE_cap_bijective rfl _ hk) + apply (isIso_iff_bijective _).1 + apply GlobularPresheaf.pushout_comparison_isIso (sq.map E) (sq'.map E) + (𝟙 _) (E.map P.map) (E.map cap) (E.map f) + · simpa only [Category.id_comp, ← E.map_comp, Category.assoc] using congrArg E.map sl + · simpa only [Category.id_comp, ← E.map_comp] using congrArg E.map sr + · simpa only [← E.map_comp] using congrArg E.map fi + · simpa only [← E.map_comp] using congrArg E.map fj + · intro k hk + exact congrArg (fun a => a.app (op (Globe.mk k))) fj + +end Table.SpineData + +namespace Table + +noncomputable def spine (q : ℕ) : {n : ℕ} → (T : Table n) → T.SpineData q + | _, .globe n => SpineData.globe q n + | _, .attach T b h hl hr => + if hb : b ≤ q then (spine q T).attachLow b h hl hr hb + else (spine q T).attachHigh b h hl hr (by omega) + +end Table + +namespace GlobularPresheaf + +theorem underlyingMap_injective {X Y : GlobularPresheaf.{u}} : + Function.Injective (fun f : X ⟶ Y => underlyingMap f) := by + intro f g h + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + exact congrArg (fun a => a.app k.unop.dim x) h + +theorem existsUnique_factor_low_bijective {X R Y : GlobularPresheaf.{u}} + (η : X ⟶ R) (f : X ⟶ Y) (q : ℕ) + (hη : ∀ k, k ≤ q → Function.Bijective (η.app (op (Globe.mk k)))) + (hY : ∀ j, q < j → Function.Bijective (Y.underlying.boundary j)) : + ∃! g : R ⟶ Y, η ≫ g = f := by + obtain ⟨g, hg, hu⟩ := GlobularSet.existsUnique_factor_low_bijective + (underlyingMap η) (underlyingMap f) q hη hY + let l : R ⟶ Y := R.underlyingPresheafIso.inv ≫ g.presheafMap ≫ Y.underlyingPresheafIso.hom + have hl : underlyingMap l = g := by ext n x; rfl + have hf : η ≫ l = f := by + apply underlyingMap_injective + change (underlyingMap η).comp (underlyingMap l) = underlyingMap f + rw [hl, hg] + refine ⟨l, hf, ?_⟩ + intro l' hl' + apply underlyingMap_injective + apply Eq.trans _ hl.symm + apply hu + exact congrArg (fun a : X ⟶ Y => underlyingMap a) hl' + +theorem precomp_bijective_low {X R Y : GlobularPresheaf.{u}} + (η : X ⟶ R) (q : ℕ) + (hη : ∀ k, k ≤ q → Function.Bijective (η.app (op (Globe.mk k)))) + (hY : ∀ j, q < j → Function.Bijective (Y.underlying.boundary j)) : + Function.Bijective (fun g : R ⟶ Y => η ≫ g) := by + constructor + · intro a b hab + obtain ⟨_, _, hu⟩ := existsUnique_factor_low_bijective η (η ≫ b) q hη hY + exact (hu a hab).trans (hu b rfl).symm + · intro f + obtain ⟨g, hg, _⟩ := existsUnique_factor_low_bijective η f q hη hY + exact ⟨g, hg⟩ + +end GlobularPresheaf + +namespace TupleSystem + +theorem map_bijective_of_low {T : TupleSystem.{v}} {S R : Shape} (f : S ⟶ R) + (q : ℕ) (hf : ∀ k, k ≤ q → Function.Bijective (f.app (op (Globe.mk k)))) + (hT : ∀ j, q < j → Function.Bijective (T.underlying.boundary j)) : + Function.Bijective (T.presheaf.map f.op) := by + have hg : ∀ k, k ≤ q → Function.Bijective + ((Shape.liftedRealization.{v}.map f).app (op (Globe.mk k))) := by + intro k hk + exact ULift.map_bijective.mpr (hf k hk) + have hb := GlobularPresheaf.precomp_bijective_low + (Y := T.globularPresheaf) (Shape.liftedRealization.map f) q hg hT + have hn (x : T.presheaf.obj (op R)) : + T.evaluation.app (op S) (T.presheaf.map f.op x) = + Shape.liftedRealization.map f ≫ T.evaluation.app (op R) x := + ConcreteCategory.congr_hom (T.evaluation.naturality f.op) x + constructor + · intro x y h + apply (T.evaluation_bijective R).1 + apply hb.1 + exact (hn x).symm.trans ((congrArg (T.evaluation.app (op S)) h).trans (hn y)) + · intro y + obtain ⟨g, hg⟩ := hb.2 (T.evaluation.app (op S) y) + obtain ⟨x, hx⟩ := (T.evaluation_bijective R).2 g + refine ⟨x, (T.evaluation_bijective S).1 ?_⟩ + exact (hn x).trans ((congrArg (fun g => Shape.liftedRealization.map f ≫ g) hx).trans hg) + +end TupleSystem + +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Tree.lean b/lean/OAI/CategoryTheory/Globular/Tree.lean new file mode 100644 index 0000000000000000000000000000000000000000..170396fa23a0425e694701083a427d3221b6d8d1 --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Tree.lean @@ -0,0 +1,667 @@ +import OAI.CategoryTheory.Globular.LinearCells + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularTheory.Model + +noncomputable def smallFreeDescCells {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f : ∀ k, S.underlying.Cell k → Y.obj.underlying.Cell k) + (hs : ∀ k x, f k (S.underlying.source k x) = Y.obj.underlying.source k (f (k+1) x)) + (ht : ∀ k x, f k (S.underlying.target k x) = Y.obj.underlying.target k (f (k+1) x)) : + (smallFree hC q).obj S ⟶ Y := + smallFreeDesc hC q + { app := fun k x => f k x.down + source_app := fun k x => hs k x.down + target_app := fun k x => ht k x.down } + +@[simp] theorem smallFreeDescCells_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} + (f) (hs) (ht) (k : ℕ) (x : S.underlying.Cell k) : + (underlyingMap (smallFreeDescCells hC q (Y := Y) f hs ht).hom).app k + (smallFreeGen hC q S k x) = f k x := smallFreeDesc_gen hC q _ _ _ + +@[simp] theorem smallFreeCell_face {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {j k : ℕ} (h : j < k) (ε : Bool) + (f : GlobularPresheaf.disk k ⟶ S) : + ((smallFree hC q).obj S).obj.eval (C.base (Shape.face h ε)) (smallFreeCell hC q k f) = + smallFreeCell hC q j (GlobularPresheaf.face h ε ≫ f) := by + unfold smallFreeCell smallFreeGen + have e := ((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S)).naturality + (Globe.face h ε).op + have e' := ConcreteCategory.congr_hom e + (show (GlobularPresheaf.liftSmall.{v}.obj S).obj (op (Globe.mk k)) from + ULift.up (f.app (op (Globe.mk k)) (ULift.up (𝟙 (Globe.mk k))))) + change ((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S)).app + (op (Globe.mk j)) (ULift.up (S.map (Globe.face h ε).op + (f.app (op (Globe.mk k)) (ULift.up (𝟙 (Globe.mk k)))))) = + ((smallFree hC q).obj S).obj.eval (C.base (Shape.face h ε)) _ at e' + apply e'.symm.trans + apply congrArg (((cutoffGlobularAdjunction hC q).unit.app (GlobularPresheaf.liftSmall.obj S)).app + (op (Globe.mk j))) + apply congrArg ULift.up + exact (ConcreteCategory.congr_hom (f.naturality (Globe.face h ε).op) + (show (GlobularPresheaf.disk k).obj (op (Globe.mk k)) from + ULift.up (𝟙 (Globe.mk k)))).symm + +noncomputable abbrev linearFree {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) := + (smallFree hC q).obj ((Shape.linearization n).obj S) + +noncomputable def linLow {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (hk : k < n) (x : S.underlying.Cell k) : + (linearFree hC q n S).obj.underlying.Cell k := + smallFreeCell hC q k (Shape.linearLow n S k hk x) + +noncomputable def linEdge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (linearFree hC q n S).obj.underlying.Cell (n+1) := + smallFreeCell hC q (n+1) (Shape.linearEdge n S x) + +noncomputable def linMiddle {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (linearFree hC q n S).obj.underlying.Cell (n+1) := + smallFreeCell hC q (n+1) (Shape.realization.map (tripleMiddle n) ≫ Shape.linearTriple n S x) + +@[simp] theorem linMiddle_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (linearFree hC q n S).obj.underlying.source n (linMiddle hC q n S x) = + (linearFree hC q n S).obj.underlying.target n (linEdge hC q n S (S.underlying.source n x)) := by + unfold linMiddle linEdge + erw [smallFreeCell_source, smallFreeCell_target] + apply congrArg (smallFreeCell hC q n) + have e : GlobularPresheaf.face (Nat.lt_succ_self n) true ≫ Shape.realization.map (tripleFirst n) = + GlobularPresheaf.face (Nat.lt_succ_self n) false ≫ Shape.realization.map (tripleMiddle n) := + triple_first_middle n + calc + _ = (GlobularPresheaf.face (Nat.lt_succ_self n) false ≫ + Shape.realization.map (tripleMiddle n)) ≫ Shape.linearTriple n S x := + (Category.assoc _ _ _).symm + _ = (GlobularPresheaf.face (Nat.lt_succ_self n) true ≫ + Shape.realization.map (tripleFirst n)) ≫ Shape.linearTriple n S x := + congrArg (· ≫ Shape.linearTriple n S x) e.symm + _ = _ := by + erw [Category.assoc, Shape.linearTriple_face n S false x] + rfl + +@[simp] theorem linMiddle_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (linearFree hC q n S).obj.underlying.target n (linMiddle hC q n S x) = + (linearFree hC q n S).obj.underlying.source n (linEdge hC q n S (S.underlying.target n x)) := by + unfold linMiddle linEdge + erw [smallFreeCell_target, smallFreeCell_source] + apply congrArg (smallFreeCell hC q n) + have e : GlobularPresheaf.face (Nat.lt_succ_self n) true ≫ Shape.realization.map (tripleMiddle n) = + GlobularPresheaf.face (Nat.lt_succ_self n) false ≫ Shape.realization.map (tripleLast n) := + triple_middle_last n + calc + _ = (GlobularPresheaf.face (Nat.lt_succ_self n) true ≫ + Shape.realization.map (tripleMiddle n)) ≫ Shape.linearTriple n S x := + (Category.assoc _ _ _).symm + _ = (GlobularPresheaf.face (Nat.lt_succ_self n) false ≫ + Shape.realization.map (tripleLast n)) ≫ Shape.linearTriple n S x := + congrArg (· ≫ Shape.linearTriple n S x) e + _ = _ := by + erw [Category.assoc, Shape.linearTriple_face n S true x] + rfl + +@[simp] theorem linLow_face {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) {j k : ℕ} (h : j < k) (hk : k < n) + (ε : Bool) (x : S.underlying.Cell k) : + (linearFree hC q n S).obj.eval (C.base (Shape.face h ε)) (linLow hC q n S k hk x) = + linLow hC q n S j (h.trans hk) (S.map (Globe.face h ε).op x) := by + unfold linLow + erw [smallFreeCell_face, Shape.linearLow_face] + +@[simp] theorem linEdge_face {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) {j : ℕ} (h : j < n) + (ε : Bool) (x : S.underlying.Cell n) : + (linearFree hC q n S).obj.eval (C.base (Shape.face (by omega : j < n+1) ε)) + (linEdge hC q n S x) = linLow hC q n S j h (S.map (Globe.face h ε).op x) := by + unfold linEdge linLow + erw [smallFreeCell_face, Shape.linearEdge_face] + +noncomputable def linOriginal {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) + (hS : ∀ k, n+1 < k → IsEmpty (S.underlying.Cell k)) + (k : ℕ) (x : S.underlying.Cell k) : (linearFree hC q n S).obj.underlying.Cell k := by + by_cases h : k < n + · exact linLow hC q n S k h x + · by_cases e : k = n + · subst k + exact (linearFree hC q n S).obj.underlying.source n (linEdge hC q n S x) + · have ek : k = n+1 := by + by_contra hn + exact (hS k (by omega)).false x + subst k + exact (linearFree hC q n S).obj.compCell hC n + (linEdge hC q n S (S.underlying.source n x)) (linMiddle hC q n S x) + (linMiddle_source hC q n S x).symm + +@[simp] theorem linOriginal_low {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (hk : k < n) + (x : S.underlying.Cell k) : linOriginal hC q n S hS k x = linLow hC q n S k hk x := by + unfold linOriginal + rw [dite_eq_left hk] + +@[simp] theorem linOriginal_center {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell n) : + linOriginal hC q n S hS n x = + (linearFree hC q n S).obj.underlying.source n (linEdge hC q n S x) := by + unfold linOriginal + rw [dite_eq_right (lt_irrefl n), dite_eq_left rfl] + +@[simp] theorem linOriginal_high {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell (n+1)) : + linOriginal hC q n S hS (n+1) x = + (linearFree hC q n S).obj.compCell hC n + (linEdge hC q n S (S.underlying.source n x)) (linMiddle hC q n S x) + (linMiddle_source hC q n S x).symm := by + unfold linOriginal + rw [dite_eq_right (by omega), dite_eq_right (by omega)] + +theorem linOriginal_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (x : S.underlying.Cell (k+1)) : + linOriginal hC q n S hS k (S.underlying.source k x) = + (linearFree hC q n S).obj.underlying.source k (linOriginal hC q n S hS (k+1) x) := by + have hk : k ≤ n := by + by_contra h + exact (hS (k+1) (by omega)).false x + by_cases he : k = n + · subst k + erw [linOriginal_center, linOriginal_high, compCell_source] + · have hkn : k < n := by omega + erw [linOriginal_low _ _ _ _ _ _ hkn] + by_cases e : k+1 = n + · subst n + erw [linOriginal_center] + change _ = (linearFree hC q (k+1) S).obj.eval (C.base (Shape.source k)) + ((linearFree hC q (k+1) S).obj.eval (C.base (Shape.source (k+1))) _) + erw [← eval_comp, ← C.base_comp] + erw [← Shape.face_two_source] + exact (linEdge_face hC q (k+1) S (Nat.lt_succ_self k) false x).symm + · have h' : k+1 < n := by omega + erw [linOriginal_low _ _ _ _ _ _ h'] + exact (linLow_face hC q n S (Nat.lt_succ_self k) h' false x).symm + +theorem linOriginal_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (x : S.underlying.Cell (k+1)) : + linOriginal hC q n S hS k (S.underlying.target k x) = + (linearFree hC q n S).obj.underlying.target k (linOriginal hC q n S hS (k+1) x) := by + have hk : k ≤ n := by + by_contra h + exact (hS (k+1) (by omega)).false x + by_cases he : k = n + · subst k + erw [linOriginal_center, linOriginal_high, compCell_target, linMiddle_target] + · have hkn : k < n := by omega + erw [linOriginal_low _ _ _ _ _ _ hkn] + by_cases e : k+1 = n + · subst n + erw [linOriginal_center] + change _ = (linearFree hC q (k+1) S).obj.eval (C.base (Shape.target k)) + ((linearFree hC q (k+1) S).obj.eval (C.base (Shape.source (k+1))) _) + erw [← eval_comp, ← C.base_comp] + erw [← Shape.face_two_source] + exact (linEdge_face hC q (k+1) S (Nat.lt_succ_self k) true x).symm + · have h' : k+1 < n := by omega + erw [linOriginal_low _ _ _ _ _ _ h'] + exact (linLow_face hC q n S (Nat.lt_succ_self k) h' true x).symm + +noncomputable def whiskerToLinearCell {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) + (hS : ∀ k, n+1 < k → IsEmpty (S.underlying.Cell k)) + (k : ℕ) (x : (S.underlying.whisker n false).Cell k) : + (linearFree hC q n S).obj.underlying.Cell k := + match x with + | .base k x => linOriginal hC q n S hS k x + | .tip x => (linearFree hC q n S).obj.underlying.target n (linEdge hC q n S x) + | .edge x => linEdge hC q n S x + +theorem whiskerToLinearCell_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) + (x : (S.underlying.whisker n false).Cell (k+1)) : + whiskerToLinearCell hC q n S hS k ((S.underlying.whisker n false).source k x) = + (linearFree hC q n S).obj.underlying.source k (whiskerToLinearCell hC q n S hS (k+1) x) := by + cases x with + | base k x => exact linOriginal_source hC q n S hS k x + | tip x => + change linOriginal hC q (k+1) S hS k (S.underlying.source k x) = _ + rw [linOriginal_source, linOriginal_center] + exact (linearFree hC q (k+1) S).obj.underlying.source_source k _ + | edge x => exact linOriginal_center hC q n S hS x + +theorem whiskerToLinearCell_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) + (x : (S.underlying.whisker n false).Cell (k+1)) : + whiskerToLinearCell hC q n S hS k ((S.underlying.whisker n false).target k x) = + (linearFree hC q n S).obj.underlying.target k (whiskerToLinearCell hC q n S hS (k+1) x) := by + cases x with + | base k x => exact linOriginal_target hC q n S hS k x + | tip x => + change linOriginal hC q (k+1) S hS k (S.underlying.target k x) = _ + rw [linOriginal_target, linOriginal_center] + exact (linearFree hC q (k+1) S).obj.underlying.target_source k _ + | edge x => rfl + +noncomputable abbrev whiskerFree {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) := + (smallFree hC q).obj ((GlobularPresheaf.whiskering n false).obj S) + +noncomputable def whiskerToLinear {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) + (hS : ∀ k, n+1 < k → IsEmpty (S.underlying.Cell k)) : whiskerFree hC q n S ⟶ linearFree hC q n S := + smallFreeDescCells hC q (whiskerToLinearCell hC q n S hS) + (fun k x => by + have e := (S.underlying.whisker n false).presheafUnderlyingMap.source_app k x + change ((GlobularPresheaf.whiskering n false).obj S).underlying.source k x = + (S.underlying.whisker n false).source k x at e + exact (congrArg (whiskerToLinearCell hC q n S hS k) e).trans + (whiskerToLinearCell_source hC q n S hS k x)) + (fun k x => by + have e := (S.underlying.whisker n false).presheafUnderlyingMap.target_app k x + change ((GlobularPresheaf.whiskering n false).obj S).underlying.target k x = + (S.underlying.whisker n false).target k x at e + exact (congrArg (whiskerToLinearCell hC q n S hS k) e).trans + (whiskerToLinearCell_target hC q n S hS k x)) + +noncomputable def wBase {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell k) : + (whiskerFree hC q n S).obj.underlying.Cell k := + smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) k (.base k x) + +noncomputable def wEdge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (whiskerFree hC q n S).obj.underlying.Cell (n+1) := + smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) (n+1) (.edge x) + +@[simp] theorem wBase_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + (whiskerFree hC q n S).obj.underlying.source k (wBase hC q n S (k+1) x) = + wBase hC q n S k (S.underlying.source k x) := by + unfold wBase + erw [smallFreeGen_source] + congr 1 + exact (S.underlying.whisker n false).presheafUnderlyingMap.source_app _ _ + +@[simp] theorem wBase_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (x : S.underlying.Cell (k+1)) : + (whiskerFree hC q n S).obj.underlying.target k (wBase hC q n S (k+1) x) = + wBase hC q n S k (S.underlying.target k x) := by + unfold wBase + erw [smallFreeGen_target] + congr 1 + exact (S.underlying.whisker n false).presheafUnderlyingMap.target_app _ _ + +@[simp] theorem wEdge_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (whiskerFree hC q n S).obj.underlying.source n (wEdge hC q n S x) = wBase hC q n S n x := by + unfold wEdge wBase + erw [smallFreeGen_source] + congr 1 + exact (S.underlying.whisker n false).presheafUnderlyingMap.source_app _ _ + +noncomputable def wMiddle {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (whiskerFree hC q n S).obj.underlying.Cell (n+1) := + (whiskerFree hC q n S).obj.compCell hC n + ((whiskerFree hC q n S).obj.inverseCell hC n (wEdge hC q n S (S.underlying.source n x))) + (wBase hC q n S (n+1) x) (by rw [inverseCell_target, wEdge_source, wBase_source]) + +@[simp] theorem wMiddle_source {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (whiskerFree hC q n S).obj.underlying.source n (wMiddle hC q n S x) = + (whiskerFree hC q n S).obj.underlying.target n (wEdge hC q n S (S.underlying.source n x)) := by + unfold wMiddle + rw [compCell_source, inverseCell_source] + +@[simp] theorem wMiddle_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (whiskerFree hC q n S).obj.underlying.target n (wMiddle hC q n S x) = + (whiskerFree hC q n S).obj.underlying.source n (wEdge hC q n S (S.underlying.target n x)) := by + unfold wMiddle + rw [compCell_target, wBase_target, wEdge_source] + +noncomputable def wTriple {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell (n+1)) : + (whiskerFree hC q n S).obj.presheaf.obj (op (⟨tripleShape n⟩ : C.Obj)) := + (whiskerFree hC q n S).obj.tripleTuple n + (wEdge hC q n S (S.underlying.source n x)) (wMiddle hC q n S x) + (wEdge hC q n S (S.underlying.target n x)) + (wMiddle_source hC q n S x).symm (wMiddle_target hC q n S x) + +noncomputable def linReverseBlock {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (hk : k ≤ n+1) + (x : S.underlying.Cell k) : + (smallFree hC q).obj ((Shape.linearGlobularDiagram n).obj k hk) ⟶ whiskerFree hC q n S := by + by_cases h : k < n + · exact (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_low n k h))) ≫ + smallDiskDesc hC q k (wBase hC q n S k x) + · by_cases e : k = n + · subst k + exact (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_center n n rfl))) ≫ + smallDiskDesc hC q (n+1) (wEdge hC q n S x) + · have ek : k = n+1 := by omega + subst k + exact (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_high n (n+1) (by omega)))) ≫ + smallShapeDesc hC q (tripleShape n) (wTriple hC q n S x) + +@[simp] theorem linReverseBlock_low {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (hk : k ≤ n+1) (h : k < n) + (x : S.underlying.Cell k) : linReverseBlock hC q n S k hk x = + (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_low n k h))) ≫ + smallDiskDesc hC q k (wBase hC q n S k x) := by + unfold linReverseBlock + rw [dite_eq_left h] + rfl + +@[simp] theorem linReverseBlock_center {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hk : n ≤ n+1) (x : S.underlying.Cell n) : + linReverseBlock hC q n S n hk x = + (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_center n n rfl))) ≫ + smallDiskDesc hC q (n+1) (wEdge hC q n S x) := by + unfold linReverseBlock + rw [dite_eq_right (lt_irrefl n), dite_eq_left rfl] + rfl + +@[simp] theorem linReverseBlock_high {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hk : n+1 ≤ n+1) (x : S.underlying.Cell (n+1)) : + linReverseBlock hC q n S (n+1) hk x = + (smallFree hC q).map (Shape.realization.map (eqToHom (Shape.linearBlock_high n (n+1) (by omega)))) ≫ + smallShapeDesc hC q (tripleShape n) (wTriple hC q n S x) := by + unfold linReverseBlock + rw [dite_eq_right (by omega), dite_eq_right (by omega)] + rfl + +theorem transportedShapeDesc {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {A B D E : Shape} (e : A = B) (f : B ⟶ D) (e' : E = D) + {Y : CutoffModels C q} (t : Y.obj.presheaf.obj (op (⟨D⟩ : C.Obj))) : + (smallFree hC q).map (Shape.realization.map (eqToHom e ≫ f ≫ eqToHom e'.symm)) ≫ + (smallFree hC q).map (Shape.realization.map (eqToHom e')) ≫ smallShapeDesc hC q D t = + (smallFree hC q).map (Shape.realization.map (eqToHom e)) ≫ + smallShapeDesc hC q B (Y.obj.eval (C.base f) t) := by + subst B + subst E + simp only [eqToHom_refl, Category.id_comp, Category.comp_id] + erw [Shape.realization.map_id, (smallFree hC q).map_id, Category.id_comp, + smallShapeDesc_naturality] + erw [Shape.realization.map_id, (smallFree hC q).map_id, Category.id_comp] + +theorem linReverseBlock_adjacent {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (k : ℕ) (hk : k+1 ≤ n+1) + (ε : Bool) (x : S.underlying.Cell (k+1)) : + (smallFree hC q).map ((Shape.linearGlobularDiagram n).face (Nat.lt_succ_self k) hk ε) ≫ + linReverseBlock hC q n S (k+1) hk x = + linReverseBlock hC q n S k (by omega) (S.map (Globe.face (Nat.lt_succ_self k) ε).op x) := by + by_cases e : k = n + · subst k + erw [Shape.linear_face_top, linReverseBlock_center, linReverseBlock_high] + erw [transportedShapeDesc] + unfold smallDiskDesc + congr 2 + cases ε <;> simp only [Bool.false_eq_true, ↓reduceIte] + · exact tripleTuple_first _ _ _ _ _ _ _ + · exact tripleTuple_last _ _ _ _ _ _ _ + · have h : k < n := by omega + by_cases e' : k+1 = n + · subst n + erw [Shape.linear_face_center, linReverseBlock_low _ _ _ _ _ _ h, linReverseBlock_center] + unfold smallDiskDesc + erw [transportedShapeDesc] + congr 2 + erw [Shape.face_two_source, C.base_comp, eval_comp] + cases ε + · exact (congrArg ((whiskerFree hC q (k+1) S).obj.underlying.source k) + (wEdge_source hC q (k+1) S x)).trans (wBase_source hC q (k+1) S k x) + · exact (congrArg ((whiskerFree hC q (k+1) S).obj.underlying.target k) + (wEdge_source hC q (k+1) S x)).trans (wBase_target hC q (k+1) S k x) + · have h' : k+1 < n := by omega + erw [Shape.linear_face_low _ _ _ _ h', linReverseBlock_low _ _ _ _ _ _ h', + linReverseBlock_low _ _ _ _ _ _ h] + unfold smallDiskDesc + erw [transportedShapeDesc] + congr 2 + cases ε + · exact wBase_source hC q n S k x + · exact wBase_target hC q n S k x + +noncomputable def linearToWhisker {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) + (hS : ∀ k, n+1 < k → IsEmpty (S.underlying.Cell k)) : linearFree hC q n S ⟶ whiskerFree hC q n S := + GlobularPresheaf.finiteRealizationDesc (smallFree hC q) (Shape.linearGlobularDiagram n) + S hS (whiskerFree hC q n S) (linReverseBlock hC q n S) + ((Shape.linearGlobularDiagram n).face_natural (smallFree hC q) S (whiskerFree hC q n S) + (linReverseBlock hC q n S) (fun k hk ε x => by + rw [← FiniteCoGlobularObject.face_succ] + exact linReverseBlock_adjacent hC q n S k hk ε x)) + +theorem cancelShapeTransport {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {A B : Shape} (e : A = B) {Y : CutoffModels C q} + (f : (smallFree hC q).obj B.realize ⟶ Y) : + (smallFree hC q).map (Shape.realization.map (eqToHom e.symm)) ≫ + (smallFree hC q).map (Shape.realization.map (eqToHom e)) ≫ f = f := by + subst B + erw [Shape.realization.map_id, (smallFree hC q).map_id, Category.id_comp, Category.id_comp] + +@[reassoc] theorem linearToWhisker_lowHom {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (hk : k < n) + (x : S.underlying.Cell k) : + (smallFree hC q).map (Shape.linearLow n S k hk x) ≫ linearToWhisker hC q n S hS = + smallDiskDesc hC q k (wBase hC q n S k x) := by + unfold Shape.linearLow linearToWhisker + erw [(smallFree hC q).map_comp, Category.assoc, GlobularPresheaf.finiteRealizationDesc_cell] + erw [linReverseBlock_low _ _ _ _ _ _ hk, cancelShapeTransport] + +@[reassoc] theorem linearToWhisker_edgeHom {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell n) : + (smallFree hC q).map (Shape.linearEdge n S x) ≫ linearToWhisker hC q n S hS = + smallDiskDesc hC q (n+1) (wEdge hC q n S x) := by + unfold Shape.linearEdge linearToWhisker + erw [(smallFree hC q).map_comp, Category.assoc, GlobularPresheaf.finiteRealizationDesc_cell] + erw [linReverseBlock_center, cancelShapeTransport] + +@[reassoc] theorem linearToWhisker_tripleHom {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell (n+1)) : + (smallFree hC q).map (Shape.linearTriple n S x) ≫ linearToWhisker hC q n S hS = + smallShapeDesc hC q (tripleShape n) (wTriple hC q n S x) := by + unfold Shape.linearTriple linearToWhisker + erw [(smallFree hC q).map_comp, Category.assoc, GlobularPresheaf.finiteRealizationDesc_cell] + erw [linReverseBlock_high, cancelShapeTransport] + +theorem smallFreeCell_image {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q : ℕ) {S : GlobularPresheaf.{0}} {Y : CutoffModels C q} (k : ℕ) + (a : GlobularPresheaf.disk k ⟶ S) (f : (smallFree hC q).obj S ⟶ Y) + (x : Y.obj.underlying.Cell k) (h : (smallFree hC q).map a ≫ f = smallDiskDesc hC q k x) : + (underlyingMap f.hom).app k (smallFreeCell hC q k a) = x := by + have e := congrFun (congrArg (fun z => (underlyingMap z.hom).app k) h) + (smallFreeGen hC q (GlobularPresheaf.disk k) k (ULift.up (𝟙 (Globe.mk k)))) + change (underlyingMap f.hom).app k + ((underlyingMap ((smallFree hC q).map a).hom).app k _) = _ at e + have hm : (underlyingMap ((smallFree hC q).map a).hom).app k + (smallFreeGen hC q (GlobularPresheaf.disk k) k (ULift.up (𝟙 (Globe.mk k)))) = + smallFreeCell hC q k a := smallFreeGen_map hC q a k _ + exact ((congrArg (underlyingMap f.hom |>.app k) hm).symm.trans e).trans + (smallDiskDesc_gen hC q k x) + +@[simp] theorem linearToWhisker_low {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (hk : k < n) (x : S.underlying.Cell k) : + (underlyingMap (linearToWhisker hC q n S hS).hom).app k (linLow hC q n S k hk x) = + wBase hC q n S k x := + smallFreeCell_image hC q k _ _ _ (linearToWhisker_lowHom hC q n S hS k hk x) + +@[simp] theorem linearToWhisker_edge {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell n) : + (underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1) (linEdge hC q n S x) = + wEdge hC q n S x := + smallFreeCell_image hC q (n+1) _ _ _ (linearToWhisker_edgeHom hC q n S hS x) + +@[simp] theorem linearToWhisker_middle {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (x : S.underlying.Cell (n+1)) : + (underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1) (linMiddle hC q n S x) = + wMiddle hC q n S x := by + let a : GlobularPresheaf.disk (n+1) ⟶ (tripleShape n).realize := + Shape.realization.map (tripleMiddle n) + have he : (smallFree hC q).map a ≫ smallShapeDesc hC q (tripleShape n) (wTriple hC q n S x) = + smallDiskDesc hC q (n+1) (wMiddle hC q n S x) := by + have e := smallShapeDesc_naturality hC q (tripleMiddle n) (wTriple hC q n S x) + have ht : (whiskerFree hC q n S).obj.eval (C.base (tripleMiddle n)) (wTriple hC q n S x) = + wMiddle hC q n S x := tripleTuple_middle _ _ _ _ _ _ _ + exact e.trans (congrArg (smallShapeDesc hC q (Shape.globe (n+1))) ht) + apply smallFreeCell_image hC q (n+1) (a ≫ Shape.linearTriple n S x) + calc + _ = (smallFree hC q).map a ≫ + ((smallFree hC q).map (Shape.linearTriple n S x) ≫ linearToWhisker hC q n S hS) := by + rw [(smallFree hC q).map_comp, Category.assoc] + _ = (smallFree hC q).map a ≫ smallShapeDesc hC q (tripleShape n) (wTriple hC q n S x) := + congrArg (_ ≫ ·) (linearToWhisker_tripleHom hC q n S hS x) + _ = _ := he + +theorem compCell_cancel_left {C : GlobularTheory.{v}} (X : C.Model) (hC : C.IsCoherator) + (n : ℕ) (a b : X.underlying.Cell (n+1)) + (h : X.underlying.source n a = X.underlying.source n b) : + X.underlying.Joined (n+1) + (X.compCell hC n a + (X.compCell hC n (X.inverseCell hC n a) b (by rw [inverseCell_target, h])) + (by rw [compCell_source, inverseCell_source])) b := by + have hi := X.compCell_assoc hC n a (X.inverseCell hC n a) b + (X.inverseCell_source hC n a).symm (by rw [inverseCell_target, h]) + apply X.joined_trans hC (X.joined_symm hC hi) + apply X.joined_trans hC (X.compCell_congr_left hC n + (X.compCell hC n a (X.inverseCell hC n a) (X.inverseCell_source hC n a).symm) + (X.unitCell hC n (X.underlying.source n a)) b + (by rw [compCell_target, inverseCell_target, h]) + (by rw [unitCell_target, h]) (X.compCell_inverse_right hC n a)) + simpa only [h] using X.compCell_left_unit hC n b + +@[simp] theorem whiskerToLinear_gen {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) + (x : ((GlobularPresheaf.whiskering n false).obj S).underlying.Cell k) : + (underlyingMap (whiskerToLinear hC q n S hS).hom).app k + (smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) k x) = + whiskerToLinearCell hC q n S hS k x := smallFreeDescCells_gen hC q _ _ _ k x + +@[simp] theorem wEdge_target {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (x : S.underlying.Cell n) : + (whiskerFree hC q n S).obj.underlying.target n (wEdge hC q n S x) = + smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) n (.tip x) := by + unfold wEdge + erw [smallFreeGen_target] + congr 1 + exact (S.underlying.whisker n false).presheafUnderlyingMap.target_app _ _ + +theorem whiskerLinear_low {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) (k : ℕ) (hk : k ≤ n) + (x : ((GlobularPresheaf.whiskering n false).obj S).underlying.Cell k) : + (underlyingMap (whiskerToLinear hC q n S hS ≫ linearToWhisker hC q n S hS).hom).app k + (smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) k x) = + smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) k x := by + change (underlyingMap (linearToWhisker hC q n S hS).hom).app k + ((underlyingMap (whiskerToLinear hC q n S hS).hom).app k _) = _ + apply (congrArg ((underlyingMap (linearToWhisker hC q n S hS).hom).app k) + (whiskerToLinear_gen hC q n S hS k x)).trans + cases x with + | base k x => + change (underlyingMap (linearToWhisker hC q n S hS).hom).app k + (linOriginal hC q n S hS k x) = wBase hC q n S k x + by_cases e : k = n + · subst k + erw [linOriginal_center, (underlyingMap (linearToWhisker hC q n S hS).hom).source_app, + linearToWhisker_edge, wEdge_source] + · have h : k < n := by omega + erw [linOriginal_low _ _ _ _ _ _ h, linearToWhisker_low] + | tip x => + change (underlyingMap (linearToWhisker hC q k S hS).hom).app k + ((linearFree hC q k S).obj.underlying.target k (linEdge hC q k S x)) = _ + erw [(underlyingMap (linearToWhisker hC q k S hS).hom).target_app, + linearToWhisker_edge, wEdge_target] + | edge x => exact (Nat.not_succ_le_self n hk).elim + +theorem whiskerLinear_top {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (S : GlobularPresheaf.{0}) (hS) + (x : ((GlobularPresheaf.whiskering n false).obj S).underlying.Cell (n+1)) : + (whiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap (whiskerToLinear hC q n S hS ≫ linearToWhisker hC q n S hS).hom).app (n+1) + (smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) (n+1) x)) + (smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) (n+1) x) := by + change (whiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1) + ((underlyingMap (whiskerToLinear hC q n S hS).hom).app (n+1) _)) _ + have e := congrArg ((underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1)) + (whiskerToLinear_gen hC q n S hS (n+1) x) + apply (congrArg (fun z => (whiskerFree hC q n S).obj.underlying.Joined (n+1) z + (smallFreeGen hC q ((GlobularPresheaf.whiskering n false).obj S) (n+1) x)) e).mpr + cases x with + | base k x => + change (whiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1) + (linOriginal hC q n S hS (n+1) x)) (wBase hC q n S (n+1) x) + erw [linOriginal_high] + simp only [map_compCell, linearToWhisker_edge, linearToWhisker_middle] + exact (whiskerFree hC q n S).obj.compCell_cancel_left hC n + (wEdge hC q n S (S.underlying.source n x)) (wBase hC q n S (n+1) x) + (by rw [wEdge_source, wBase_source]) + | edge x => + change (whiskerFree hC q n S).obj.underlying.Joined (n+1) + ((underlyingMap (linearToWhisker hC q n S hS).hom).app (n+1) + (linEdge hC q n S x)) (wEdge hC q n S x) + rw [linearToWhisker_edge] + exact (whiskerFree hC q n S).obj.joined_refl hC _ _ + +end GlobularTheory.Model +namespace GlobularPresheaf + +theorem disk_bounded (n k : ℕ) (h : n < k) : IsEmpty ((disk n).underlying.Cell k) := by + constructor + intro x + change ULift (Globe.mk k ⟶ Globe.mk n) at x + rcases x with ⟨x⟩ + change Globe.Face k n at x + cases x with + | id => omega + | face h' ε => omega + +end GlobularPresheaf +namespace Table + +theorem bounded {l : ℕ} (T : Table l) (k : ℕ) (h : T.height < k) : + IsEmpty (T.realize.underlying.Cell k) := by + induction T with + | globe n => exact GlobularPresheaf.disk_bounded n k h + | @attach l T b j hl hr ih => + have hk : T.height < k := lt_of_le_of_lt (Nat.le_max_left _ _) h + have hj : j < k := lt_of_le_of_lt (Nat.le_max_right _ _) h + have H := (Shape.realization_pushout ⟨l,T⟩ b j hl hr).map + ((evaluation Globeᵒᵖ (Type)).obj (op (Globe.mk k))) + constructor + intro x + obtain ⟨y, _⟩ | ⟨y, _⟩ := Types.eq_or_eq_of_isPushout H x + · exact (ih hk).false y + · exact (GlobularPresheaf.disk_bounded j k hj).false y + +end Table +namespace GlobularTheory.Model + +theorem whiskerFree_bounded_hasFillers {C : GlobularTheory.{v}} (hC : C.IsCoherator) + (q n : ℕ) (H : ExpansionContraction hC q (n+1)) + (S : Shape) (hS : S.height ≤ n+1) : (whiskerFree hC q n S.realize).obj.underlying.HasFillers := by + have hb (k : ℕ) (hk : n+1 < k) : IsEmpty (S.realize.underlying.Cell k) := + S.2.bounded k (lt_of_le_of_lt hS hk) + apply free_hasFillers_of_top_homotopy hC q n H + (GlobularPresheaf.liftSmall.obj ((GlobularPresheaf.whiskering n false).obj S.realize)) + (fun k hk => ⟨fun x => (S.realize.underlying.whisker_bounded n false hb k hk).false x.down⟩) + (linearFree hC q n S.realize) (smallFree_cofibrant hC q _) + (linearFree_hasFillers hC q n S hS) + (whiskerToLinear hC q n S.realize hb) (linearToWhisker hC q n S.realize hb) + · intro k hk x + exact whiskerLinear_low hC q n S.realize hb k hk x.down + · intro x + exact whiskerLinear_top hC q n S.realize hb x.down + +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/Whisker.lean b/lean/OAI/CategoryTheory/Globular/Whisker.lean new file mode 100644 index 0000000000000000000000000000000000000000..a055ac94a6c06dcd15eed408cd3139e477e64b6c --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/Whisker.lean @@ -0,0 +1,393 @@ +import OAI.CategoryTheory.Globular.RelativeLifting + +namespace OAI + +universe u v w + +namespace Grothendieck.GlobularTheory +open CategoryTheory CategoryTheory.Limits Opposite + +structure RepresentedHom {C : GlobularTheory.{v}} {K : Type u} [Category.{v} K] + (F : C.Obj ⥤ K) (R : Shape ⥤ K) + (e₀ e₁ : C.toTheoryData.arity ⋙ F ⟶ R) (S T : Shape) where + original : C.Hom S T + cylinder : R.obj S ⟶ R.obj T + endpoint₀ : e₀.app S ≫ cylinder = F.map (show C.toTheoryData.arity.obj S ⟶ C.toTheoryData.arity.obj T from original) ≫ e₀.app T + endpoint₁ : e₁.app S ≫ cylinder = F.map (show C.toTheoryData.arity.obj S ⟶ C.toTheoryData.arity.obj T from original) ≫ e₁.app T + +@[ext] theorem RepresentedHom.ext {C : GlobularTheory.{v}} {K : Type u} [Category.{v} K] + {F : C.Obj ⥤ K} {R : Shape ⥤ K} {e₀ e₁ : C.toTheoryData.arity ⋙ F ⟶ R} + {S T : Shape} {a b : RepresentedHom F R e₀ e₁ S T} + (h : a.original = b.original) (k : a.cylinder = b.cylinder) : a = b := by + cases a + cases b + cases h + cases k + rfl + +noncomputable def representedData {C : GlobularTheory.{v}} {K : Type u} [Category.{v} K] + (F : C.Obj ⥤ K) (R : Shape ⥤ K) + (e₀ e₁ : C.toTheoryData.arity ⋙ F ⟶ R) : TheoryData.{v} where + Hom := RepresentedHom F R e₀ e₁ + id S := ⟨C.id S, 𝟙 _, by + change e₀.app S ≫ 𝟙 _ = F.map (𝟙 _) ≫ e₀.app S + simp, by + change e₁.app S ≫ 𝟙 _ = F.map (𝟙 _) ≫ e₁.app S + simp⟩ + comp a b := + { original := C.comp a.original b.original + cylinder := a.cylinder ≫ b.cylinder + endpoint₀ := by + rw [← Category.assoc, a.endpoint₀, Category.assoc, b.endpoint₀, ← Category.assoc] + exact congrArg (· ≫ e₀.app _) (F.map_comp a.original b.original).symm + endpoint₁ := by + rw [← Category.assoc, a.endpoint₁, Category.assoc, b.endpoint₁, ← Category.assoc] + exact congrArg (· ≫ e₁.app _) (F.map_comp a.original b.original).symm } + id_comp a := RepresentedHom.ext (C.id_comp _) (Category.id_comp _) + comp_id a := RepresentedHom.ext (C.comp_id _) (Category.comp_id _) + assoc a b c := RepresentedHom.ext (C.assoc _ _ _) (Category.assoc _ _ _) + base f := ⟨C.base f, R.map f, (e₀.naturality f).symm, (e₁.naturality f).symm⟩ + base_id S := RepresentedHom.ext (C.base_id S) (R.map_id S) + base_comp a b := RepresentedHom.ext (C.base_comp a b) (R.map_comp a b) + +noncomputable def representedTheory {C : GlobularTheory.{v}} {K : Type u} [Category.{v} K] + (F : C.Obj ⥤ K) (R : Shape ⥤ K) + (e₀ e₁ : C.toTheoryData.arity ⋙ F ⟶ R) + (hR : ∀ (S : Shape) b h hl hr, IsPushout + (R.map (S.seam hl)) (R.map (Shape.face hr false)) + (R.map (S.inl b h hl hr)) (R.map (S.inr b h hl hr))) + (hF : ∀ (S : Shape) b h hl hr, IsPushout + (F.map (C.base (S.seam hl))) (F.map (C.base (Shape.face hr false))) + (F.map (C.base (S.inl b h hl hr))) (F.map (C.base (S.inr b h hl hr)))) : + GlobularTheory.{v} where + toTheoryData := representedData F R e₀ e₁ + sums S b h hl hr := by + apply IsPushout.mk' + · exact RepresentedHom.ext (C.sums S b h hl hr).w (hR S b h hl hr).w + · intro T a a' ha hb + apply RepresentedHom.ext + · exact (C.sums S b h hl hr).hom_ext (W := C.toTheoryData.arity.obj T.shape) + (congrArg RepresentedHom.original ha) (congrArg RepresentedHom.original hb) + · exact (hR S b h hl hr).hom_ext + (congrArg RepresentedHom.cylinder ha) (congrArg RepresentedHom.cylinder hb) + · intro T a b' hab + change RepresentedHom F R e₀ e₁ S T.shape at a + change RepresentedHom F R e₀ e₁ (Shape.globe h) T.shape at b' + let d : C.Hom (S.attach b h hl hr) T.shape := + (C.sums S b h hl hr).desc (W := C.toTheoryData.arity.obj T.shape) a.original b'.original + (congrArg RepresentedHom.original hab) + let l : R.obj (S.attach b h hl hr) ⟶ R.obj T.shape := + (hR S b h hl hr).desc a.cylinder b'.cylinder + (congrArg RepresentedHom.cylinder hab) + have hd₀ : C.comp (C.base (S.inl b h hl hr)) d = a.original := + (C.sums S b h hl hr).inl_desc _ _ _ + have hd₁ : C.comp (C.base (S.inr b h hl hr)) d = b'.original := + (C.sums S b h hl hr).inr_desc _ _ _ + have hl₀ : R.map (S.inl b h hl hr) ≫ l = a.cylinder := + (hR S b h hl hr).inl_desc _ _ _ + have hl₁ : R.map (S.inr b h hl hr) ≫ l = b'.cylinder := + (hR S b h hl hr).inr_desc _ _ _ + have he (e : C.toTheoryData.arity ⋙ F ⟶ R) + (ha : e.app S ≫ a.cylinder = F.map a.original ≫ e.app T.shape) + (hb : e.app (Shape.globe h) ≫ b'.cylinder = F.map b'.original ≫ e.app T.shape) : + e.app (S.attach b h hl hr) ≫ l = F.map d ≫ e.app T.shape := by + apply (hF S b h hl hr).hom_ext + · change (C.toTheoryData.arity ⋙ F).map (S.inl b h hl hr) ≫ + e.app (S.attach b h hl hr) ≫ l = + F.map (C.base (S.inl b h hl hr)) ≫ F.map d ≫ e.app T.shape + rw [← Category.assoc, e.naturality, Category.assoc, hl₀, ha] + simpa only [Category.assoc, Functor.comp_obj, TheoryData.arity, Shape.globe] using congrArg (· ≫ e.app T.shape) + ((F.map_comp (C.base (S.inl b h hl hr)) d).symm.trans + (congrArg F.map hd₀)).symm + · change (C.toTheoryData.arity ⋙ F).map (S.inr b h hl hr) ≫ + e.app (S.attach b h hl hr) ≫ l = + F.map (C.base (S.inr b h hl hr)) ≫ F.map d ≫ e.app T.shape + rw [← Category.assoc, e.naturality, Category.assoc, hl₁, hb] + simpa only [Category.assoc, Functor.comp_obj, TheoryData.arity, Shape.globe] using congrArg (· ≫ e.app T.shape) + ((F.map_comp (C.base (S.inr b h hl hr)) d).symm.trans + (congrArg F.map hd₁)).symm + let w : RepresentedHom F R e₀ e₁ (S.attach b h hl hr) T.shape := + ⟨d, l, he e₀ a.endpoint₀ b'.endpoint₀, he e₁ a.endpoint₁ b'.endpoint₁⟩ + exact ⟨w, RepresentedHom.ext hd₀ ((hR S b h hl hr).inl_desc _ _ _), + RepresentedHom.ext hd₁ ((hR S b h hl hr).inr_desc _ _ _)⟩ + +noncomputable def representedProjection {C : GlobularTheory.{v}} {K : Type u} [Category.{v} K] + (F : C.Obj ⥤ K) (R : Shape ⥤ K) + (e₀ e₁ : C.toTheoryData.arity ⋙ F ⟶ R) (hR hF) : + Morphism (representedTheory F R e₀ e₁ hR hF) C where + map f := f.original + map_id _ := rfl + map_comp _ _ := rfl + map_base _ := rfl + +end Grothendieck.GlobularTheory + +namespace Grothendieck.GlobularSet + +inductive WhiskerCell (X : GlobularSet.{u}) (n : ℕ) : ℕ → Type u + | base (k : ℕ) : X.Cell k → WhiskerCell X n k + | tip : X.Cell n → WhiskerCell X n n + | edge : X.Cell n → WhiskerCell X n (n+1) + +namespace WhiskerCell + +def source {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) (k : ℕ) + (x : WhiskerCell X n (k+1)) : WhiskerCell X n k := by + cases x with + | base _ x => exact .base _ (X.source k x) + | tip x => exact .base _ (X.source k x) + | edge x => exact if ε then .tip x else .base _ x + +def target {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) (k : ℕ) + (x : WhiskerCell X n (k+1)) : WhiskerCell X n k := by + cases x with + | base _ x => exact .base _ (X.target k x) + | tip x => exact .base _ (X.target k x) + | edge x => exact if ε then .base _ x else .tip x + +@[simp] theorem source_base {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) + (k : ℕ) (x : X.Cell (k+1)) : + source n ε k (.base _ x) = .base _ (X.source k x) := rfl + +@[simp] theorem target_base {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) + (k : ℕ) (x : X.Cell (k+1)) : + target n ε k (.base _ x) = .base _ (X.target k x) := rfl + +@[simp] theorem source_tip {X : GlobularSet.{u}} (ε : Bool) + (k : ℕ) (x : X.Cell (k+1)) : + source (k+1) ε k (.tip x) = .base _ (X.source k x) := rfl + +@[simp] theorem target_tip {X : GlobularSet.{u}} (ε : Bool) + (k : ℕ) (x : X.Cell (k+1)) : + target (k+1) ε k (.tip x) = .base _ (X.target k x) := rfl + +@[simp] theorem source_edge {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) + (x : X.Cell n) : source n ε n (.edge x) = if ε then .tip x else .base _ x := rfl + +@[simp] theorem target_edge {X : GlobularSet.{u}} (n : ℕ) (ε : Bool) + (x : X.Cell n) : target n ε n (.edge x) = if ε then .base _ x else .tip x := rfl + +end WhiskerCell + +def whisker (X : GlobularSet.{u}) (n : ℕ) (ε : Bool) : GlobularSet.{u} where + Cell := WhiskerCell X n + source := WhiskerCell.source n ε + target := WhiskerCell.target n ε + source_source k x := by + cases x with + | base _ x => simp only [WhiskerCell.source_base, WhiskerCell.target_base, + X.source_source] + | tip x => simp only [WhiskerCell.source_tip, WhiskerCell.target_tip, + WhiskerCell.source_base, X.source_source] + | edge x => cases ε <;> rfl + target_source k x := by + cases x with + | base _ x => simp only [WhiskerCell.source_base, WhiskerCell.target_base, + X.target_source] + | tip x => simp only [WhiskerCell.source_tip, WhiskerCell.target_tip, + WhiskerCell.target_base, X.target_source] + | edge x => cases ε <;> rfl + +def whiskerInclusion (X : GlobularSet.{u}) (n : ℕ) (ε : Bool) : Hom X (X.whisker n ε) where + app := WhiskerCell.base + source_app _ _ := rfl + target_app _ _ := rfl + +def whiskerMap {X Y : GlobularSet.{u}} (f : Hom X Y) (n : ℕ) (ε : Bool) : + Hom (X.whisker n ε) (Y.whisker n ε) where + app _ x := match x with + | .base k x => .base k (f.app k x) + | .tip x => .tip (f.app n x) + | .edge x => .edge (f.app n x) + source_app k x := by + cases x with + | base _ x => exact congrArg (WhiskerCell.base k) (f.source_app k x) + | tip x => exact congrArg (WhiskerCell.base k) (f.source_app k x) + | edge x => cases ε <;> rfl + target_app k x := by + cases x with + | base _ x => exact congrArg (WhiskerCell.base k) (f.target_app k x) + | tip x => exact congrArg (WhiskerCell.base k) (f.target_app k x) + | edge x => cases ε <;> rfl + +theorem whisker_bounded (X : GlobularSet.{u}) (n : ℕ) (ε : Bool) + (hX : ∀ k, n+1 < k → IsEmpty (X.Cell k)) (k : ℕ) (hk : n+1 < k) : + IsEmpty ((X.whisker n ε).Cell k) := by + constructor + intro x + cases x with + | base k x => exact (hX k hk).false x + | tip x => omega + | edge x => omega + +theorem whiskerMap_injective {X Y : GlobularSet.{u}} (f : Hom X Y) + (hf : ∀ k, Function.Injective (f.app k)) (n : ℕ) (ε : Bool) (k : ℕ) : + Function.Injective ((whiskerMap f n ε).app k) := by + intro x y h + cases x <;> cases y <;> + simp only [whiskerMap, reduceCtorEq] at h + all_goals congr 1; apply hf; injection h + + +def toPresheafUnderlying (X : GlobularSet.{u}) : Hom X X.presheaf.underlying where + app _ := _root_.id + source_app n x := (X.presheafUnderlyingMap.source_app n x).symm + target_app n x := (X.presheafUnderlyingMap.target_app n x).symm + +def whiskerDesc {X Y : GlobularSet.{u}} (n : ℕ) (f : Hom X Y) + (e : X.Cell n → Y.Cell (n+1)) (he : ∀ x, Y.source n (e x) = f.app n x) : + Hom (X.whisker n false) Y where + app _ x := match x with + | .base k x => f.app k x + | .tip x => Y.target n (e x) + | .edge x => e x + source_app k x := by + cases x with + | base _ x => exact f.source_app k x + | tip x => + change f.app k (X.source k x) = Y.source k (Y.target (k+1) (e x)) + rw [f.source_app, ← he, Y.source_source] + | edge x => exact (he x).symm + target_app k x := by + cases x with + | base _ x => exact f.target_app k x + | tip x => + change f.app k (X.target k x) = Y.target k (Y.target (k+1) (e x)) + rw [f.target_app, ← he, Y.target_source] + | edge x => rfl + +theorem whisker_hom_ext {X Y : GlobularSet.{u}} (n : ℕ) (ε : Bool) + (f g : Hom (X.whisker n ε) Y) + (hbase : ∀ k x, f.app k (.base k x) = g.app k (.base k x)) + (hedge : ∀ x, f.app (n+1) (.edge x) = g.app (n+1) (.edge x)) : f = g := by + ext k x + cases x with + | base k x => exact hbase k x + | edge x => exact hedge x + | tip x => + cases ε with + | false => + have hf := f.target_app n (.edge x) + have hg := g.target_app n (.edge x) + exact hf.trans ((congrArg (Y.target n) (hedge x)).trans hg.symm) + | true => + have hf := f.source_app n (.edge x) + have hg := g.source_app n (.edge x) + exact hf.trans ((congrArg (Y.source n) (hedge x)).trans hg.symm) + +end Grothendieck.GlobularSet + +namespace Grothendieck.GlobularPresheaf +open CategoryTheory CategoryTheory.Limits Opposite + +def whiskering (n : ℕ) (ε : Bool) : GlobularPresheaf.{u} ⥤ GlobularPresheaf.{u} where + obj X := (X.underlying.whisker n ε).presheaf + map f := (GlobularSet.whiskerMap (underlyingMap f) n ε).presheafMap + map_id X := by + ext ⟨⟨k⟩⟩ x + cases x <;> rfl + map_comp f g := by + ext ⟨⟨k⟩⟩ x + cases x <;> rfl + +def whiskeringInclusion (n : ℕ) (ε : Bool) : 𝟭 GlobularPresheaf.{u} ⟶ whiskering n ε where + app X := X.underlyingPresheafIso.inv ≫ (X.underlying.whiskerInclusion n ε).presheafMap + naturality {X Y} f := by ext; rfl + +def whiskeringDesc {X Y : GlobularPresheaf.{u}} (n : ℕ) (f : X ⟶ Y) + (e : X.underlying.Cell n → Y.underlying.Cell (n+1)) + (he : ∀ x, Y.underlying.source n (e x) = (underlyingMap f).app n x) : + (whiskering n false).obj X ⟶ Y := + (GlobularSet.whiskerDesc n (underlyingMap f) e he).presheafMap ≫ Y.underlyingPresheafIso.hom + +theorem whiskering_hom_ext {X Y : GlobularPresheaf.{u}} (n : ℕ) (ε : Bool) + (f g : (whiskering n ε).obj X ⟶ Y) + (hbase : ∀ k x, f.app (op (Globe.mk k)) (.base k x) = + g.app (op (Globe.mk k)) (.base k x)) + (hedge : ∀ x, f.app (op (Globe.mk (n+1))) (.edge x) = + g.app (op (Globe.mk (n+1))) (.edge x)) : f = g := by + apply underlyingMap_injective + have h := GlobularSet.whisker_hom_ext n ε + ((X.underlying.whisker n ε).toPresheafUnderlying.comp (underlyingMap f)) + ((X.underlying.whisker n ε).toPresheafUnderlying.comp (underlyingMap g)) hbase hedge + ext k x + exact congrFun (congrArg (fun z => z.app k) h) x + +theorem whiskering_pushout {A B D E : GlobularPresheaf.{u}} + {f : A ⟶ B} {g : A ⟶ D} {i : B ⟶ E} {j : D ⟶ E} + (h : IsPushout f g i j) (n : ℕ) : IsPushout + ((whiskering n false).map f) ((whiskering n false).map g) + ((whiskering n false).map i) ((whiskering n false).map j) := by + let W := whiskering n false + let η := whiskeringInclusion n false + let N := (evaluation Globeᵒᵖ (Type u)).obj (op (Globe.mk n)) + have hn := h.map N + have ηi : i ≫ η.app E = η.app B ≫ W.map i := η.naturality i + have ηj : j ≫ η.app E = η.app D ≫ W.map j := η.naturality j + have ηf : f ≫ η.app B = η.app A ≫ W.map f := η.naturality f + have ηg : g ≫ η.app D = η.app A ≫ W.map g := η.naturality g + apply IsPushout.mk' + · rw [← W.map_comp, ← W.map_comp, h.w] + · intro T a b ha hb + apply whiskering_hom_ext n false a b + · have he : η.app E ≫ a = η.app E ≫ b := h.hom_ext + (by rw [← Category.assoc, ηi, Category.assoc, ha, + ← Category.assoc, ← ηi, Category.assoc]) + (by rw [← Category.assoc, ηj, Category.assoc, hb, + ← Category.assoc, ← ηj, Category.assoc]) + intro k x + exact congrFun (congrArg (fun z => z.app (op (Globe.mk k))) he) x + · have he := hn.hom_ext (W := T.obj (op (Globe.mk (n+1)))) + (k := TypeCat.ofHom (fun x => a.app (op (Globe.mk (n+1))) (.edge x))) + (l := TypeCat.ofHom (fun x => b.app (op (Globe.mk (n+1))) (.edge x))) + (by ext x; exact congrFun (congrArg (fun z => z.app (op (Globe.mk (n+1)))) ha) (.edge x)) + (by ext x; exact congrFun (congrArg (fun z => z.app (op (Globe.mk (n+1)))) hb) (.edge x)) + exact fun x => ConcreteCategory.congr_hom he x + · intro T a b hab + have hf : f ≫ η.app B ≫ a = g ≫ η.app D ≫ b := by + rw [← Category.assoc, ηf, Category.assoc, hab, + ← Category.assoc, ← ηg, Category.assoc] + let d : E ⟶ T := h.desc (η.app B ≫ a) (η.app D ≫ b) hf + have hw : N.map f ≫ TypeCat.ofHom (fun x => a.app (op (Globe.mk (n+1))) (.edge x)) = + N.map g ≫ TypeCat.ofHom (fun x => b.app (op (Globe.mk (n+1))) (.edge x)) := by + ext x + exact congrFun (congrArg (fun z => z.app (op (Globe.mk (n+1)))) hab) (.edge x) + let t : E.obj (op (Globe.mk n)) ⟶ T.obj (op (Globe.mk (n+1))) := + hn.desc (TypeCat.ofHom (fun x => a.app (op (Globe.mk (n+1))) (.edge x))) + (TypeCat.ofHom (fun x => b.app (op (Globe.mk (n+1))) (.edge x))) hw + have ht : ∀ x, T.underlying.source n (t x) = (underlyingMap d).app n x := by + have he : t ≫ T.map (Globe.source n).op = d.app (op (Globe.mk n)) := by + apply hn.hom_ext + · rw [← Category.assoc, hn.inl_desc] + have hd := congrArg (fun z => z.app (op (Globe.mk n))) (h.inl_desc _ _ hf) + change _ = (i ≫ d).app (op (Globe.mk n)) + rw [hd] + ext x + exact (((B.underlying.whisker n false).toPresheafUnderlying.comp + (underlyingMap a)).source_app n (.edge x)).symm + · rw [← Category.assoc, hn.inr_desc] + have hd := congrArg (fun z => z.app (op (Globe.mk n))) (h.inr_desc _ _ hf) + change _ = (j ≫ d).app (op (Globe.mk n)) + rw [hd] + ext x + exact (((D.underlying.whisker n false).toPresheafUnderlying.comp + (underlyingMap b)).source_app n (.edge x)).symm + exact fun x => ConcreteCategory.congr_hom he x + let l := whiskeringDesc n d t ht + refine ⟨l, ?_, ?_⟩ + · apply whiskering_hom_ext n false + · intro k x + exact congrFun (congrArg (fun z => z.app (op (Globe.mk k))) + (h.inl_desc _ _ hf)) x + · intro x + exact ConcreteCategory.congr_hom (hn.inl_desc _ _ hw) x + · apply whiskering_hom_ext n false + · intro k x + exact congrFun (congrArg (fun z => z.app (op (Globe.mk k))) + (h.inr_desc _ _ hf)) x + · intro x + exact ConcreteCategory.congr_hom (hn.inr_desc _ _ hw) x + +end Grothendieck.GlobularPresheaf + +end OAI diff --git a/lean/OAI/CategoryTheory/Globular/WhiskerUniverse.lean b/lean/OAI/CategoryTheory/Globular/WhiskerUniverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..e34a376aa8212787b0d580e650fbf256b83f146b --- /dev/null +++ b/lean/OAI/CategoryTheory/Globular/WhiskerUniverse.lean @@ -0,0 +1,126 @@ +import OAI.CategoryTheory.Globular.DiskRealization + +namespace OAI + +universe u v w + +namespace Grothendieck +open CategoryTheory CategoryTheory.Limits Opposite +namespace GlobularSet + +def ulift (X : GlobularSet.{0}) : GlobularSet.{v} where + Cell j := ULift.{v} (X.Cell j) + source j x := ⟨X.source j x.down⟩ + target j x := ⟨X.target j x.down⟩ + source_source j x := congrArg ULift.up (X.source_source j x.down) + target_source j x := congrArg ULift.up (X.target_source j x.down) + +theorem ulift_faceMap (X : GlobularSet.{0}) {j k : ℕ} (h : j < k) (ε : Bool) + (x : (X.ulift.{v}).Cell k) : + (X.ulift.{v}).faceMap h ε x = ⟨X.faceMap h ε x.down⟩ := by + induction k, h using Nat.le_induction with + | base => rw [faceMap_succ, faceMap_succ]; cases ε <;> rfl + | succ k h ih => + rw [(X.ulift.{v}).faceMap_source h ε, X.faceMap_source h ε] + exact ih _ + +theorem ulift_evalFace (X : GlobularSet.{0}) {j k : ℕ} (f : Globe.Face j k) + (x : (X.ulift.{v}).Cell k) : + (X.ulift.{v}).evalFace f x = ⟨X.evalFace f x.down⟩ := by + cases f with + | id => rfl + | face h ε => exact X.ulift_faceMap h ε x + +noncomputable def uliftPresheafIso (X : GlobularSet.{0}) : + (X.ulift.{v}).presheaf ≅ GlobularPresheaf.liftSmall.obj X.presheaf := + NatIso.ofComponents (fun _ => Iso.refl _) (by + intro j k f + apply ConcreteCategory.hom_ext + intro x + exact X.ulift_evalFace f.unop x) + +def uliftWhiskerTo (X : GlobularSet.{0}) (n : ℕ) (ε : Bool) : + Hom ((X.whisker n ε).ulift.{v}) ((X.ulift.{v}).whisker n ε) where + app _ x := match x.down with + | .base j x => .base j ⟨x⟩ + | .tip x => .tip ⟨x⟩ + | .edge x => .edge ⟨x⟩ + source_app j x := by + rcases x with ⟨x⟩ + cases x with + | base _ x => rfl + | tip x => rfl + | edge x => cases ε <;> rfl + target_app j x := by + rcases x with ⟨x⟩ + cases x with + | base _ x => rfl + | tip x => rfl + | edge x => cases ε <;> rfl + +def uliftWhiskerFrom (X : GlobularSet.{0}) (n : ℕ) (ε : Bool) : + Hom ((X.ulift.{v}).whisker n ε) ((X.whisker n ε).ulift.{v}) where + app _ x := match x with + | .base j x => ⟨.base j x.down⟩ + | .tip x => ⟨.tip x.down⟩ + | .edge x => ⟨.edge x.down⟩ + source_app j x := by + cases x with + | base _ x => rfl + | tip x => rfl + | edge x => cases ε <;> rfl + target_app j x := by + cases x with + | base _ x => rfl + | tip x => rfl + | edge x => cases ε <;> rfl + +def uliftWhiskerIso (X : GlobularSet.{0}) (n : ℕ) (ε : Bool) : + ((X.whisker n ε).ulift.{v}).presheaf ≅ ((X.ulift.{v}).whisker n ε).presheaf where + hom := (X.uliftWhiskerTo n ε).presheafMap + inv := (X.uliftWhiskerFrom n ε).presheafMap + hom_inv_id := by + have h : (X.uliftWhiskerTo n ε).comp (X.uliftWhiskerFrom n ε) = + Hom.id ((X.whisker n ε).ulift.{v}) := by + ext j x + rcases x with ⟨x⟩ + cases x <;> rfl + exact congrArg Hom.presheafMap h + inv_hom_id := by + have h : (X.uliftWhiskerFrom n ε).comp (X.uliftWhiskerTo n ε) = + Hom.id ((X.ulift.{v}).whisker n ε) := by + ext j x + cases x <;> rfl + exact congrArg Hom.presheafMap h +end GlobularSet +namespace GlobularPresheaf + +noncomputable def liftSmallWhiskerIso (S : GlobularPresheaf.{0}) (n : ℕ) (ε : Bool) : + liftSmall.{v}.obj ((whiskering n ε).obj S) ≅ + (whiskering n ε).obj (liftSmall.{v}.obj S) := + (S.underlying.whisker n ε).uliftPresheafIso.symm ≪≫ S.underlying.uliftWhiskerIso n ε +end GlobularPresheaf +namespace GlobularTheory.Model +variable {C : GlobularTheory.{v}} (hC : C.IsCoherator) (q n : ℕ) +variable [HasColimitsOfSize.{0,v} (CutoffModels C q)] + +theorem cutoffFrame_whisker_hasFillers (hnq : n ≤ q) (H : ExpansionContraction hC q (n+1)) + (S : Shape) (ε : Bool) : + ((cutoffDiskFrame hC q).realization.obj + ((GlobularPresheaf.whiskering n ε).obj (GlobularPresheaf.liftSmall.obj S.realize))).obj.underlying.HasFillers := by + let e := (cutoffFreeGlobular hC q).mapIso (GlobularPresheaf.liftSmallWhiskerIso S.realize n ε) ≪≫ + cutoffFrameFreeIso hC q _ + have h : ((smallFree hC q).obj ((GlobularPresheaf.whiskering n ε).obj S.realize)).obj.underlying.HasFillers := by + cases ε + · exact whiskerFree_hasFillers hC q n hnq H S + · exact reverseWhiskerFree_hasFillers hC q n hnq H S + exact h.retract (underlyingMap e.inv.hom) (underlyingMap e.hom.hom) + (by + have hh := congrArg (fun z : ((cutoffDiskFrame hC q).realization.obj + ((GlobularPresheaf.whiskering n ε).obj (GlobularPresheaf.liftSmall.obj S.realize))) ⟶ _ => + underlyingMap z.hom) e.inv_hom_id + exact hh) +end GlobularTheory.Model +end Grothendieck + +end OAI diff --git a/lean/OAI/CategoryTheory/Limits/KernelRetraction.lean b/lean/OAI/CategoryTheory/Limits/KernelRetraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..becf2d66ec57f57f9e74e2a3bf22fc53b29ec82e --- /dev/null +++ b/lean/OAI/CategoryTheory/Limits/KernelRetraction.lean @@ -0,0 +1,24 @@ +import Mathlib + +namespace OAI + +/-! A nonzero kernel morphism obstructs a retraction. -/ + +namespace KernelObstruction + +open CategoryTheory CategoryTheory.Limits + +theorem no_retraction_of_nonzero_kernel + {C : Type*} [Category C] [HasZeroMorphisms C] + {D U V : C} (f : U ⟶ V) (z : D ⟶ U) (hz : z ≠ 0) (hk : z ≫ f = 0) : + ¬ ∃ r : V ⟶ U, f ≫ r = 𝟙 U := by + rintro ⟨r, hr⟩ + apply hz + calc + z = z ≫ (f ≫ r) := by rw [hr, Category.comp_id] + _ = (z ≫ f) ≫ r := (Category.assoc z f r).symm + _ = 0 := by rw [hk, zero_comp] + +end KernelObstruction + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/ActionDerived.lean b/lean/OAI/CategoryTheory/ThickClosure/ActionDerived.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd375ef5e9310ad6fdcddd572606ee7ac4f10092 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/ActionDerived.lean @@ -0,0 +1,98 @@ +import OAI.CategoryTheory.ThickClosure.LaurentAction + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentDg +open CategoryTheory CategoryTheory.Limits HomologicalComplex +universe u w +variable {R : Type u} [Ring R] {D : ℕ} + +noncomputable def actualEquivalence (hD : 0 < D) : Module R D ≌ ActionModule R D := by + letI : (actionFunctor (R:=R) (D:=D)).EssSurj := actionFunctor_essSurj hD + letI : (actionFunctor (R:=R) (D:=D)).IsEquivalence := {} + exact (actionFunctor (R:=R) (D:=D)).asEquivalence + +namespace ActionModule +def forget : ActionModule R D ⥤ ChainComplex (ModuleCat.{u} R) ℤ where + obj G := ChainComplex.of G.X G.d G.dd + map f := ChainComplex.ofHom f.f (by intro n; simpa only [ChainComplex.of_d] using f.comm_d n) + map_id G := by ext n; rfl + map_comp f g := by ext n; rfl + +def quasiIso : MorphismProperty (ActionModule R D) := fun _ _ f => QuasiIso (forget.map f) + +def homology (n : ℤ) : ActionModule R D ⥤ ModuleCat.{u} R := + forget ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] +abbrev localization (hD : 0 < D) : ActionModule R D ⥤ LaurentDg.Derived R D := + (actualEquivalence hD).inverse ⋙ LaurentDg.localization R D +end ActionModule +noncomputable def actionForgetIso : + actionFunctor (R:=R) (D:=D) ⋙ ActionModule.forget ≅ LaurentDg.forget := + NatIso.ofComponents (fun _ => Iso.refl _) (by intro M N f; simp; rfl) + +noncomputable def inverseForgetIso (hD : 0 < D) : + (actualEquivalence (R:=R) hD).inverse ⋙ LaurentDg.forget ≅ ActionModule.forget := + Functor.isoWhiskerLeft (actualEquivalence hD).inverse actionForgetIso.symm ≪≫ + (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (actualEquivalence hD).counitIso ActionModule.forget ≪≫ + Functor.leftUnitor ActionModule.forget + +lemma inverse_quasiIso_iff (hD : 0 < D) {M N : ActionModule R D} (f : M ⟶ N) : + LaurentDg.quasiIso ((actualEquivalence hD).inverse.map f) ↔ ActionModule.quasiIso f := by + change QuasiIso (LaurentDg.forget.map ((actualEquivalence hD).inverse.map f)) ↔ + QuasiIso (ActionModule.forget.map f) + rw [_root_.quasiIso_iff, _root_.quasiIso_iff] + simp only [quasiIsoAt_iff_isIso_homologyMap] + apply forall_congr' + intro n + exact NatIso.isIso_map_iff (Functor.isoWhiskerRight (inverseForgetIso hD) + (HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n)) f + +namespace ActionModule +variable (R) (D) (hD : 0 < D) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +theorem localization_isLocalization : + (localization (R:=R) hD).IsLocalization (quasiIso (R:=R) (D:=D)) := by + let := LaurentDg.localization_isLocalization R D + apply Functor.IsLocalization.of_equivalence_source (LaurentDg.localization R D) + (LaurentDg.quasiIso (R:=R) (D:=D)) (localization (R:=R) hD) + (quasiIso (R:=R) (D:=D)) (actualEquivalence hD) + · intro M N f hf + apply MorphismProperty.le_isoClosure + change QuasiIso (forget.map (actionFunctor.map f)) + rw [_root_.quasiIso_iff] + intro n + rw [quasiIsoAt_iff_isIso_homologyMap] + change IsIso (((actionFunctor ⋙ forget) ⋙ + HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n).map f) + rw [NatIso.isIso_map_iff (Functor.isoWhiskerRight actionForgetIso _)] + have : QuasiIso (LaurentDg.forget.map f) := hf + exact inferInstanceAs (IsIso (homologyMap (LaurentDg.forget.map f) n)) + · intro M N f hf + exact Localization.inverts (LaurentDg.localization R D) (LaurentDg.quasiIso (R:=R) (D:=D)) + ((actualEquivalence hD).inverse.map f) ((inverse_quasiIso_iff hD f).mpr hf) + · exact (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (actualEquivalence hD).unitIso.symm (LaurentDg.localization R D) ≪≫ + Functor.leftUnitor (LaurentDg.localization R D) + +noncomputable def localizationHomologyIso (n : ℤ) : + localization (R:=R) hD ⋙ LaurentDg.derivedHomology n ≅ homology (R:=R) (D:=D) n := + Functor.associator _ _ _ ≪≫ + Functor.isoWhiskerLeft (actualEquivalence hD).inverse + (LaurentDg.localizationHomologyIso n) ≪≫ + (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (inverseForgetIso hD) _ +end ActionModule +end HahnWilson.LaurentDg + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/BackwardStep.lean b/lean/OAI/CategoryTheory/ThickClosure/BackwardStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..6397cbfba7fab3817c3d732657d924ff60866826 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/BackwardStep.lean @@ -0,0 +1,83 @@ +import OAI.CategoryTheory.ThickClosure.PrincipalModules + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.BackwardStep +section ModuleMaps +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.PrincipalModules +universe u v w +variable {R : Type u} [Ring R] [IsDomain R] + +lemma torsion_to_free_zero {M N : ModuleCat.{u} R} [Module.Free R N] + (hM : IsTorsionModule R M) (f : M ⟶ N) : f = 0 := by + ext x + obtain ⟨a, ha, hx⟩ := hM x + have hf : a • f x = 0 := by rw [← map_smul, hx, map_zero] + exact (smul_eq_zero.mp hf).resolve_left ha + +end ModuleMaps +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.PrincipalModules +universe u v w +variable {R : Type u} [Ring R] [IsDomain R] +variable {E : Type v} [Category.{w} E] [HasZeroObject E] [HasShift E ℤ] + [Preadditive E] [∀ (n : ℤ), (shiftFunctor E n).Additive] + [Pretriangulated E] [IsTriangulated E] + +theorem homology_backward_step (H : E ⥤ ModuleCat.{u} R) [H.IsHomological] + {Y F P₁ P₂ V L : E} (f : F ⟶ P₁) (u₁₂ : P₁ ⟶ P₂) + (w₁₂ : P₂ ⟶ F⟦(1 : ℤ)⟧) + (h₁₂ : Triangle.mk f u₁₂ w₁₂ ∈ distTriang E) + (l : L ⟶ P₂) (v : P₂ ⟶ V) (w₂₃ : V ⟶ L⟦(1 : ℤ)⟧) + (h₂₃ : Triangle.mk l v w₂₃ ∈ distTriang E) + (r : P₂ ⟶ L) (hlr : l ≫ r = 𝟙 L) + (hY : IsTorsionModule R (H.obj Y)) + (hL : IsTorsionModule R (H.obj (L⟦(-1 : ℤ)⟧))) + [Module.Free R (H.obj F)] + (g : Y ⟶ P₁) (hg : H.map (g ≫ u₁₂) = 0) + (hgv : g ≫ u₁₂ ≫ v = 0) : H.map g = 0 := by + obtain ⟨Z, z, w₁₃, h₁₃⟩ := distinguished_cocone_triangle₁ (u₁₂ ≫ v) + let o := Triangulated.someOctahedron' (rfl : u₁₂ ≫ v = u₁₂ ≫ v) h₁₂ h₂₃ h₁₃ + have hLift : ∃ k : Y ⟶ Z, g = k ≫ z := + (Triangle.mk z (u₁₂ ≫ v) w₁₃).coyoneda_exact₂ h₁₃ g hgv + obtain ⟨k, hk'⟩ := hLift + have hk : k ≫ z = g := hk'.symm + have hi : Mono (H.map o.m₁) := by + let S := (shortComplexOfDistTriangle (Triangle.mk o.m₁ o.m₃ (l ≫ w₁₂)).invRotate + (inv_rot_of_distTriang _ o.mem)).map H + have hex : S.Exact := H.map_distinguished_exact _ (inv_rot_of_distTriang _ o.mem) + let : Module.Free R S.X₂ := inferInstanceAs (Module.Free R (H.obj F)) + have hz : S.f = 0 := torsion_to_free_zero hL S.f + exact (S.exact_iff_mono hz).mp hex + have hl : Mono (H.map l) := by + have hid : H.map l ≫ H.map r = 𝟙 _ := by rw [← H.map_comp, hlr, H.map_id] + exact @mono_of_mono _ _ _ _ _ (H.map l) (H.map r) (by rw [hid]; infer_instance) + have hkl : H.map k ≫ H.map o.m₃ = 0 := by + apply (cancel_mono (H.map l)).mp + rw [CategoryTheory.Limits.zero_comp, Category.assoc, ← H.map_comp, o.comm₄, + H.map_comp, ← Category.assoc, ← H.map_comp, hk, ← H.map_comp, hg] + let S := (shortComplexOfDistTriangle (Triangle.mk o.m₁ o.m₃ (l ≫ w₁₂)) o.mem).map H + have hex : S.Exact := H.map_distinguished_exact _ o.mem + let : Mono S.f := hi + let : Module.Free R S.X₁ := inferInstanceAs (Module.Free R (H.obj F)) + obtain ⟨a, ha⟩ := hex.lift' (H.map k) hkl + change a ≫ H.map o.m₁ = H.map k at ha + have ha0 : a = 0 := torsion_to_free_zero hY a + have hk0 : H.map k = 0 := by + calc + H.map k = a ≫ H.map o.m₁ := ha.symm + _ = (0 : H.obj Y ⟶ H.obj F) ≫ H.map o.m₁ := by rw [ha0]; rfl + _ = 0 := CategoryTheory.Limits.zero_comp + rw [← hk, H.map_comp, hk0, CategoryTheory.Limits.zero_comp] + +end HahnWilson.BackwardStep + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/Coefficients.lean b/lean/OAI/CategoryTheory/ThickClosure/Coefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..d664abcc879a54f438f21e018463ffa2f2ae844e --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/Coefficients.lean @@ -0,0 +1,176 @@ +import OAI.CategoryTheory.ThickClosure.ActionDerived + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentDg +open CategoryTheory CategoryTheory.Limits +universe u +variable (R : Type u) [Ring R] (D : ℕ) +abbrev coefficientModule := HahnWilson.LaurentCriterion.coefficient R D + +def coefficientConst (i : ℤ) (r : R) : (coefficientModule R D).X i := fun _ => r + +def coefficientEval (i : ℤ) (h : (i : ZMod D) = 0) : + (coefficientModule R D).X i →ₗ[R] R := LinearMap.proj (PLift.up h) + +noncomputable def coefficientToPiece (i : ℤ) : + (coefficientModule R D).X i →ₗ[R] LaurentPolynomial R := by + classical + exact if h : (i : ZMod D) = 0 then + (AddMonoidAlgebra.lsingle ((i : ℤ) / (D:ℤ))).comp (coefficientEval R D i h) else 0 + +noncomputable def coefficientTo : total (coefficientModule R D) →ₗ[R] LaurentPolynomial R := + DirectSum.toModule R ℤ (LaurentPolynomial R) (coefficientToPiece R D) + +lemma coefficientTo_inc (i : ℤ) (x : (coefficientModule R D).X i) : + coefficientTo R D (inc (coefficientModule R D) i x) = coefficientToPiece R D i x := by + simp [coefficientTo, inc] + +noncomputable def coefficientFrom : LaurentPolynomial R →ₗ[R] total (coefficientModule R D) := + (Finsupp.linearCombination R (fun q : ℤ => inc (coefficientModule R D) ((D:ℤ)*q) + (coefficientConst R D _ 1))).comp (AddMonoidAlgebra.coeffLinearEquiv R).toLinearMap + +lemma coefficientFrom_single (q : ℤ) (r : R) : + coefficientFrom R D (AddMonoidAlgebra.single q r) = + inc (coefficientModule R D) ((D:ℤ)*q) (coefficientConst R D _ r) := by + change (Finsupp.linearCombination R _) (Finsupp.single q r) = _ + rw [Finsupp.linearCombination_single] + rw [← map_smul] + congr 1 + change (fun _ : PLift ((((D:ℤ)*q : ℤ) : ZMod D) = 0) => r • (1:R)) = _ + funext h + exact mul_one r + +lemma coefficientTo_monomial (hD : 0 < D) (q : ℤ) (r : R) : + coefficientTo R D (inc (coefficientModule R D) ((D:ℤ)*q) (coefficientConst R D _ r)) = + AddMonoidAlgebra.single q r := by + rw [coefficientTo_inc] + have hc : (((D:ℤ)*q : ℤ) : ZMod D) = 0 := by simp + have hD' : (D:ℤ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hD) + rw [coefficientToPiece, dite_eq_left hc] + change AddMonoidAlgebra.single (((D:ℤ)*q) / (D:ℤ)) r = _ + rw [Int.mul_ediv_cancel_left _ hD'] + +lemma coefficientTo_from (hD : 0 < D) (a : LaurentPolynomial R) : + coefficientTo R D (coefficientFrom R D a) = a := by + induction a using AddMonoidAlgebra.induction_linear with + | zero => simp + | add a b ha hb => simp only [map_add, ha, hb] + | single q r => rw [coefficientFrom_single, coefficientTo_monomial R D hD] + +lemma coefficientFrom_to (hD : 0 < D) (z : total (coefficientModule R D)) : + coefficientFrom R D (coefficientTo R D z) = z := by + have he : (coefficientFrom R D).comp (coefficientTo R D) = LinearMap.id := by + apply DirectSum.linearMap_ext + intro i + ext x : 1 + change coefficientFrom R D (coefficientTo R D (inc (coefficientModule R D) i x)) = + inc (coefficientModule R D) i x + by_cases h : (i : ZMod D) = 0 + · obtain ⟨q, hq, hqu⟩ := (exponent_exists_unique hD 0 i).mp (by simpa using h.symm) + have hq' : i = (D:ℤ)*q := by simpa using hq + clear hq hqu + subst i + have hc : (((D:ℤ)*q : ℤ) : ZMod D) = 0 := by simp + let r : R := x (PLift.up hc) + have hx : x = coefficientConst R D _ r := by + change x = (fun _ => r) + funext h + exact congrArg x (Subsingleton.elim _ _) + rw [hx, coefficientTo_monomial R D hD, coefficientFrom_single] + · have hx : x = 0 := by + change x = (0 : PLift ((i:ZMod D) = 0) → R) + funext a + exact (h a.down).elim + rw [hx] + simp + exact congrArg (fun f : total (coefficientModule R D) →ₗ[R] total (coefficientModule R D) => f z) he + +noncomputable def coefficientEquiv (hD : 0 < D) : + total (coefficientModule R D) ≃ₗ[R] LaurentPolynomial R := + LinearEquiv.ofLinearMap (coefficientTo R D) (coefficientFrom R D) + (by apply LinearMap.ext; intro a; exact coefficientTo_from R D hD a) + (by apply LinearMap.ext; intro z; exact coefficientFrom_to R D hD z) + +lemma coefficient_power_const (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)) (r : R) : + ((coefficientModule R D).power i j h).hom (coefficientConst R D i r) = + coefficientConst R D j r := by + have hh {a b : ZMod D} (h : a = b) : + ((HahnWilson.PeriodicDual.cell R D 0).XIsoOfEq h).hom (fun _ => r) = fun _ => r := by + subst b + rfl + exact hh h + +lemma coefficient_act_const (q j : ℤ) (r s : R) : + laurentRepresentation (coefficientModule R D) (AddMonoidAlgebra.single q r) + (inc (coefficientModule R D) ((D:ℤ)*j) (coefficientConst R D _ s)) = + inc (coefficientModule R D) ((D:ℤ)*(q+j)) (coefficientConst R D _ (r*s)) := by + rw [laurentRepresentation_single, coefficient_power_const] + have h : (D:ℤ)*j+(D:ℤ)*q = (D:ℤ)*(q+j) := by ring + generalize (D:ℤ)*j+(D:ℤ)*q = a at * + generalize (D:ℤ)*(q+j) = b at * + subst b + rfl + +lemma coefficient_act_from (a b : LaurentPolynomial R) : + laurentRepresentation (coefficientModule R D) a (coefficientFrom R D b) = + coefficientFrom R D (a*b) := by + induction a using AddMonoidAlgebra.induction_linear with + | zero => simp + | add a a' ha ha' => + rw [map_add, add_mul, map_add] + exact congrArg₂ (·+·) ha ha' + | single q r => + induction b using AddMonoidAlgebra.induction_linear with + | zero => simp + | add b b' hb hb' => simpa only [map_add, mul_add] using congrArg₂ (·+·) hb hb' + | single j s => + rw [coefficientFrom_single, coefficient_act_const, AddMonoidAlgebra.single_mul_single, + coefficientFrom_single] + +lemma coefficient_differential_zero : totalDifferential (coefficientModule R D) = 0 := by + apply DirectSum.linearMap_ext + intro n + obtain ⟨i, rfl⟩ : ∃ i : ℤ, n = i+1 := ⟨n-1, by omega⟩ + ext x : 1 + simp only [LinearMap.comp_apply, totalDifferential_inc_succ] + have hd : (coefficientModule R D).d i = 0 := by + change (HahnWilson.PeriodicDual.cell R D 0).d ((i+1:ℤ):ZMod D) (i:ZMod D) = 0 + exact HahnWilson.PeriodicSplitting.diagonalComplex_d _ _ _ + rw [hd] + simp + +theorem coefficient_regular_aux (hD : 0 < D) : + ∃ e : total (HahnWilson.LaurentCriterion.coefficient R D) ≃+ LaurentPolynomial R, + (∀ (q : ℤ) (r : R), + e (inc (HahnWilson.LaurentCriterion.coefficient R D) ((D:ℤ)*q) (coefficientConst R D _ r)) = + AddMonoidAlgebra.single q r) ∧ + (∀ (a : LaurentPolynomial R) (z : total (HahnWilson.LaurentCriterion.coefficient R D)), + e (laurentRepresentation (HahnWilson.LaurentCriterion.coefficient R D) a z) = a * e z) ∧ + totalDifferential (HahnWilson.LaurentCriterion.coefficient R D) = 0 := by + refine ⟨(coefficientEquiv R D hD).toAddEquiv, coefficientTo_monomial R D hD, ?_, + coefficient_differential_zero R D⟩ + intro a z + change coefficientTo R D (laurentRepresentation (coefficientModule R D) a z) = a * coefficientTo R D z + nth_rw 1 [← coefficientFrom_to R D hD z] + rw [coefficient_act_from, coefficientTo_from R D hD] + +theorem coefficient_regular (hD : 0 < D) : + ∃ e : total (HahnWilson.LaurentCriterion.coefficient R D) ≃+ LaurentPolynomial R, + (∀ (q : ℤ) (r : R), + e (inc (HahnWilson.LaurentCriterion.coefficient R D) ((D:ℤ)*q) (fun _ => r)) = + AddMonoidAlgebra.single q r) ∧ + (∀ (a : LaurentPolynomial R) (z : total (HahnWilson.LaurentCriterion.coefficient R D)), + e (laurentRepresentation (HahnWilson.LaurentCriterion.coefficient R D) a z) = a * e z) ∧ + totalDifferential (HahnWilson.LaurentCriterion.coefficient R D) = 0 := by + exact coefficient_regular_aux R D hD +end HahnWilson.LaurentDg + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/Criterion.lean b/lean/OAI/CategoryTheory/ThickClosure/Criterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..66257993b02b04cfce37b915c0330bd253cf1256 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/Criterion.lean @@ -0,0 +1,109 @@ +import OAI.CategoryTheory.ThickClosure.PeriodicBackward + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.FiniteTowerCriterion +section ModuleCriterion +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.PrincipalModules HahnWilson.PeriodicDerived HahnWilson.PeriodicDual +universe u v w c h +variable (S₀ : Type u) [Ring S₀] [IsDomain S₀] + [IsPrincipalIdealRing S₀] [IsPrincipalIdealRing S₀ᵐᵒᵖ] +variable (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} S₀ᵐᵒᵖ) + (.down (ZMod D))).HasLocalization.{w}] +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] [IsIdempotentComplete C] + +def ExactPerfect (Ψ : C ⥤ PeriodicDerived S₀ᵐᵒᵖ D) [Ψ.CommShift ℤ] : Prop := + (∀ X, IsPerfect S₀ᵐᵒᵖ D (Ψ.obj X)) ∧ + ∀ T : Triangle C, T ∈ distTriang C → + Ψ.mapTriangle.obj T ∈ HahnWilson.CyclicTriangle.distinguished S₀ᵐᵒᵖ D + +end ModuleCriterion + +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.PrincipalModules HahnWilson.PeriodicDerived HahnWilson.PeriodicDual +universe u v w c h +variable (S₀ : Type u) [Ring S₀] [IsDomain S₀] + [IsPrincipalIdealRing S₀] [IsPrincipalIdealRing S₀ᵐᵒᵖ] +variable (D : ℕ) (hD : 0 < D) (heven : Even D) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} S₀ᵐᵒᵖ) + (.down (ZMod D))).HasLocalization.{w}] +variable [HasDerivedCategory.{v} (ModuleCat.{u} S₀ᵐᵒᵖ)] +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] [IsIdempotentComplete C] + +include hD heven in + +theorem finite_tower_criterion + (T₀ U₀ : C) (Ψ : C ⥤ PeriodicDerived S₀ᵐᵒᵖ D) [Ψ.CommShift ℤ] + (hΨ : ExactPerfect S₀ D C Ψ) + (eT : Ψ.obj T₀ ≅ (Q S₀ᵐᵒᵖ D).obj (cell S₀ᵐᵒᵖ D 0)) + (htor : ∀ i, IsTorsionModule S₀ᵐᵒᵖ ((homology S₀ᵐᵒᵖ D i).obj (Ψ.obj U₀))) + (hnonzero : ∃ i, ¬ IsZero ((homology S₀ᵐᵒᵖ D i).obj (Ψ.obj U₀))) + (htests : ∀ P, HahnWilson.FiniteTower.Thick C T₀ P → ∀ g : U₀ ⟶ P, + (∀ i, (homology S₀ᵐᵒᵖ D i).map (Ψ.map g) = 0) → + DualGhost S₀ᵐᵒᵖ D (Ψ.map g)) : + ¬ HahnWilson.FiniteTower.Thick C T₀ U₀ := by + classical + let R := S₀ᵐᵒᵖ + let : IsPrincipalIdealRing Rᵐᵒᵖ := + IsPrincipalIdealRing.of_surjective (RingEquiv.opOp S₀) (RingEquiv.opOp S₀).surjective + let A := HahnWilson.Unroll.derivedFunctor R D + let F := Ψ ⋙ A + let : F.IsTriangulated := ⟨fun T hT => by + apply isomorphic_distinguished _ + (HahnWilson.CyclicTriangle.map_distinguished R D (Ψ.mapTriangle.obj T) (hΨ.2 T hT)) + exact (Functor.mapTriangleCompIso Ψ A).app T⟩ + have hTfree (n : ℤ) : Module.Free R + ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj (F.obj T₀)) := by + let e : (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj (F.obj T₀) ≅ + ModuleCat.of R (PLift (-(n : ZMod D) = 0) → R) := + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).mapIso (A.mapIso eT) ≪≫ + HahnWilson.GradedSplit.derivedDiagonalHomologyIso R D + (fun i => ModuleCat.of R (PLift (i = 0) → R)) n + exact Module.Free.of_equiv e.toLinearEquiv.symm + have hghost (P : C) (hP : HahnWilson.FiniteTower.Tower C T₀ P) : + ∀ g : U₀ ⟶ P, ∀ i, (homology R D i).map (Ψ.map g) = 0 := by + induction hP with + | @zero P hz => + intro g + apply (HahnWilson.HomologyBridge.all_zero_iff R D (Ψ.map g)).mp + intro n + exact ((F ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).map_isZero hz).eq_of_tgt _ _ + | step tr htr hf ht ih => + intro g + have hg₂ : ∀ i, (homology R D i).map (Ψ.map g ≫ Ψ.map tr.mor₂) = 0 := by + simpa only [Functor.map_comp] using ih (g ≫ tr.mor₂) + have hd₂ : DualGhost R D (Ψ.map g ≫ Ψ.map tr.mor₂) := by + simpa only [Functor.map_comp] using + htests tr.obj₃ (HahnWilson.FiniteTower.tower_thick C T₀ _ ht) + (g ≫ tr.mor₂) (ih (g ≫ tr.mor₂)) + exact HahnWilson.PeriodicBackward.step R D hD heven (Ψ.mapTriangle.obj tr) + (hΨ.2 tr htr) (hΨ.1 _) (Ψ.map g) htor + (HahnWilson.FreeHomology.free_layer R C F T₀ hTfree tr.obj₁ hf) hg₂ hd₂ + intro hU + obtain ⟨P,hP,⟨r⟩⟩ := HahnWilson.FiniteTower.tower_normal_form C T₀ U₀ hU + obtain ⟨i,hi⟩ := hnonzero + apply hi + apply (IsZero.iff_id_eq_zero _).mpr + have hr := congrArg (fun f => (homology R D i).map (Ψ.map f)) r.retract + have hid : (homology R D i).map (Ψ.map (𝟙 U₀)) = 𝟙 _ := + (congrArg (fun f => (homology R D i).map f) (Ψ.map_id U₀)).trans + ((homology R D i).map_id _) + apply hid.symm.trans + simpa only [Functor.map_comp, hghost P hP r.i i, + CategoryTheory.Limits.zero_comp] using hr.symm +end HahnWilson.FiniteTowerCriterion + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/CyclicShift.lean b/lean/OAI/CategoryTheory/ThickClosure/CyclicShift.lean new file mode 100644 index 0000000000000000000000000000000000000000..6756096a83cf97154be569e6a4c66f2c620eb8a0 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/CyclicShift.lean @@ -0,0 +1,205 @@ +import OAI.CategoryTheory.ThickClosure.Unroll + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.CyclicShift +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.Unroll +universe u +variable (R : Type u) [Ring R] (D : ℕ) + +def cyclicShift (n : ℤ) : PC R D ⥤ PC R D where + obj P := + { X := fun i => P.X (i - (n : ZMod D)) + d := fun i j => n.negOnePow • P.d (i - (n : ZMod D)) (j - (n : ZMod D)) + d_comp_d' := by + intros + simp only [Linear.comp_units_smul, Linear.units_smul_comp, d_comp_d, smul_zero] + shape := by + intro i j hij + rw [P.shape, smul_zero] + intro h + apply hij + change j+1=i + change j-(n : ZMod D)+1 = i-(n : ZMod D) at h + exact sub_left_inj.mp (by simpa only [sub_add_eq_add_sub] using h) } + map f := + { f := fun i => f.f (i - (n : ZMod D)) + comm' := by + intros + simp only [Linear.comp_units_smul, Hom.comm, Linear.units_smul_comp] } + map_id := by intros; rfl + map_comp := by intros; rfl + +def shiftZeroIso : cyclicShift R D 0 ≅ 𝟭 (PC R D) := + NatIso.ofComponents (fun P => Hom.isoOfComponents + (fun i => P.XIsoOfEq (by simp)) + (by intro i j hij; dsimp [cyclicShift]; simp only [one_smul, XIsoOfEq_hom_comp_d, d_comp_XIsoOfEq_hom])) + (by intro P Q f; ext i; simp [cyclicShift, XIsoOfEq]) + +def shiftAddIso (n m : ℤ) : + cyclicShift R D (n+m) ≅ cyclicShift R D n ⋙ cyclicShift R D m := + NatIso.ofComponents (fun P => Hom.isoOfComponents + (fun i => P.XIsoOfEq (by simp only [Int.cast_add]; abel)) + (by + intro i j hij + dsimp [cyclicShift] + simp only [Int.negOnePow_add, Linear.units_smul_comp, Linear.comp_units_smul, + d_comp_XIsoOfEq_hom, XIsoOfEq_hom_comp_d, smul_smul] + congr 1 + exact mul_comm _ _)) + (by + intro P Q f + apply Hom.ext + funext i + exact XIsoOfEq_hom_naturality f (by simp only [Int.cast_add]; abel)) + +theorem shift_zero : Nonempty (cyclicShift R D 0 ≅ 𝟭 (PC R D)) := ⟨shiftZeroIso R D⟩ + +theorem shift_add (n m : ℤ) : Nonempty + (cyclicShift R D (n+m) ≅ cyclicShift R D n ⋙ cyclicShift R D m) := + ⟨shiftAddIso R D n m⟩ + +def unrollShiftIso (n : ℤ) : + cyclicShift R D n ⋙ functor R D ≅ functor R D ⋙ + CategoryTheory.shiftFunctor (CochainComplex (ModuleCat.{u} R) ℤ) n := + NatIso.ofComponents (fun P => Hom.isoOfComponents + (fun i => P.XIsoOfEq (by simp only [Int.cast_add]; abel)) + (by + intro i j hij + have hj : i+1=j := hij + subst j + simp [cyclicShift, functor, obj, CochainComplex.of.d, add_right_comm i n 1, + Linear.comp_units_smul, Linear.units_smul_comp])) + (by + intro P Q f + apply Hom.ext + funext i + exact XIsoOfEq_hom_naturality f (by simp only [Int.cast_add]; abel)) + +theorem unroll_shift (n : ℤ) : Nonempty + (cyclicShift R D n ⋙ functor R D ≅ functor R D ⋙ + CategoryTheory.shiftFunctor (CochainComplex (ModuleCat.{u} R) ℤ) n) := + ⟨unrollShiftIso R D n⟩ + +section ShiftStructure + +attribute [local simp] XIsoOfEq +instance : HasShift (PC R D) ℤ := hasShiftMk _ _ + { F := cyclicShift R D + zero := shiftZeroIso R D + add := shiftAddIso R D + assoc_hom_app := by + intros + apply Hom.ext + funext i + simp [shiftAddIso, cyclicShift, XIsoOfEq] + erw [eqToHom_f] + simp + zero_add_hom_app := by + intros + apply Hom.ext + funext i + simp [shiftAddIso, shiftZeroIso, cyclicShift, XIsoOfEq] + erw [eqToHom_f] + simp + add_zero_hom_app := by + intros + apply Hom.ext + funext i + simp [shiftAddIso, shiftZeroIso, cyclicShift, XIsoOfEq] + erw [eqToHom_f] + simp } + +@[simp] lemma shiftZero_hom_f (P : PC R D) (i : ZMod D) : + ((CategoryTheory.shiftFunctorZero (PC R D) ℤ).hom.app P).f i = + (P.XIsoOfEq (show i - (0 : ℤ) = i by simp)).hom := by tauto + +@[simp] lemma shiftAdd_hom_f (P : PC R D) (n m : ℤ) (i : ZMod D) : + ((CategoryTheory.shiftFunctorAdd (PC R D) n m).hom.app P).f i = + (P.XIsoOfEq (show i - ((n+m : ℤ) : ZMod D) = i - (m : ZMod D) - (n : ZMod D) + by simp only [Int.cast_add]; abel)).hom := by tauto + +instance : (Unroll.functor R D).CommShift ℤ where + commShiftIso := unrollShiftIso R D + commShiftIso_zero := by + apply Iso.ext + apply NatTrans.ext + funext P + apply Hom.ext + funext i + simp [Functor.CommShift.isoZero, unrollShiftIso, XIsoOfEq, + Unroll.functor, Unroll.map, cyclicShift, + CochainComplex.shiftFunctorZero_inv_app_f] + dsimp only [Hom.isoOfComponents] + exact (eqToHom_trans _ _).symm + commShiftIso_add n m := by + apply Iso.ext + apply NatTrans.ext + funext P + apply Hom.ext + funext i + simp [Functor.CommShift.isoAdd, unrollShiftIso, XIsoOfEq, + Unroll.functor, cyclicShift] + dsimp only [Functor.CommShift.isoAdd', Hom.isoOfComponents, + Functor.isoWhiskerLeft, Functor.isoWhiskerRight] + simp [Unroll.map, CochainComplex.shiftFunctorAdd_inv_app_f, + shiftFunctorAdd'_eq_shiftFunctorAdd] + erw [eqToHom_trans, eqToHom_trans, eqToHom_trans] + · rfl + · change P.X (- (i : ZMod D) - (m : ZMod D) - (n : ZMod D)) = + P.X (- ((i + m : ℤ) : ZMod D) - (n : ZMod D)) + congr 1 + simp only [Int.cast_add] + abel + · change P.X (- ((i + m : ℤ) : ZMod D) - (n : ZMod D)) = + P.X (- ((i + m + n : ℤ) : ZMod D)) + congr 1 + simp only [Int.cast_add] + abel + +end ShiftStructure + +lemma quasiIso_iff_unroll {P Q : PC R D} (f : P ⟶ Q) : + QuasiIso ((Unroll.functor R D).map f) ↔ QuasiIso f := by + constructor + · intro h + rw [quasiIso_iff] + intro i + obtain ⟨n, hn⟩ := ZMod.intCast_surjective (-i) + have hi : -(n : ZMod D) = i := by rw [hn]; simp + rw [quasiIsoAt_iff_isIso_homologyMap, ← hi] + have := h + exact (NatIso.isIso_map_iff (homologyIso R D n) f).mp + (inferInstanceAs (IsIso (homologyMap ((Unroll.functor R D).map f) n))) + · intro h + have := h + exact map_quasiIso R D f + +lemma quasiIso_shift_iff {P Q : PC R D} (f : P ⟶ Q) (n : ℤ) : + QuasiIso ((cyclicShift R D n).map f) ↔ QuasiIso f := by + rw [← quasiIso_iff_unroll R D] + let e : Arrow.mk ((cyclicShift R D n ⋙ Unroll.functor R D).map f) ≅ + Arrow.mk ((Unroll.functor R D ⋙ CategoryTheory.shiftFunctor _ n).map f) := + Arrow.isoMk ((unrollShiftIso R D n).app P) ((unrollShiftIso R D n).app Q) + ((unrollShiftIso R D n).hom.naturality f).symm + change QuasiIso ((cyclicShift R D n ⋙ Unroll.functor R D).map f) ↔ _ + rw [quasiIso_iff_of_arrow_mk_iso _ _ e] + change QuasiIso ((CategoryTheory.shiftFunctor _ n).map ((Unroll.functor R D).map f)) ↔ _ + rw [CochainComplex.quasiIso_shift_iff, quasiIso_iff_unroll] + +instance quasiIso_isCompatibleWithShift : (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).IsCompatibleWithShift ℤ where + condition n := by + ext P Q f + exact quasiIso_shift_iff R D f n + +end HahnWilson.CyclicShift + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/CyclicStructure.lean b/lean/OAI/CategoryTheory/ThickClosure/CyclicStructure.lean new file mode 100644 index 0000000000000000000000000000000000000000..489312ffb4fccaa0615442ee010ec069e72443c0 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/CyclicStructure.lean @@ -0,0 +1,106 @@ +import OAI.CategoryTheory.ThickClosure.DerivedHom + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.CyclicStructure +section ShiftStructure +open CategoryTheory CategoryTheory.Limits +universe u v w v' +variable {C : Type u} [Category.{v} C] {E : Type w} [Category.{v'} E] + +noncomputable def initial_map (W : MorphismProperty C) (L : C ⥤ E) [L.IsLocalization W] + {Z : C} (hZ : IsInitial Z) : IsInitial (L.obj Z) := by + letI : L.EssSurj := Localization.essSurj L W + have h : W.IsInvertedBy (coyoneda.obj (Opposite.op Z)) := by + intro A B f hf + rw [CategoryTheory.isIso_iff_bijective] + exact ⟨fun _ _ _ => hZ.hom_ext _ _, fun g => ⟨hZ.to _, hZ.hom_ext _ _⟩⟩ + refine IsInitial.ofUniqueHom (fun X => L.map (hZ.to (L.objPreimage X)) ≫ + (L.objObjPreimageIso X).hom) ?_ + intro X f + apply (cancel_mono (L.objObjPreimageIso X).inv).mp + obtain ⟨a, ha⟩ := (HahnWilson.LocalizationHom.map_bijective_of_inverts C E W L + Z (L.objPreimage X) h).2 (f ≫ (L.objObjPreimageIso X).inv) + rw [← ha] + simp only [Category.assoc, Iso.hom_inv_id, Category.comp_id] + exact congrArg L.map (hZ.hom_ext _ _) + +theorem isZero_map (W : MorphismProperty C) (L : C ⥤ E) [L.IsLocalization W] + {Z : C} (hZ : IsZero Z) : IsZero (L.obj Z) := by + have hi := initial_map W L hZ.isInitial + have ht := initial_map W.op L.op hZ.op.isInitial + exact ⟨fun X => ⟨⟨⟨hi.to X⟩, fun f => hi.hom_ext f _⟩⟩, + fun X => ⟨⟨⟨ht.unop.from X⟩, fun f => ht.unop.hom_ext f _⟩⟩⟩ + +variable (R : Type u) [Ring R] (D : ℕ) + +theorem quasiIso_products : + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).IsStableUnderFiniteProducts := by + constructor + intro J hJ + apply MorphismProperty.IsStableUnderProductsOfShape.mk + intro X₁ X₂ _ _ f hf + rw [HomologicalComplex.mem_quasiIso_iff, quasiIso_iff] + intro i + rw [quasiIsoAt_iff_isIso_homologyMap] + let H := HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) i + have hn : H.map (Limits.Pi.map f) ≫ piComparison H X₂ = + piComparison H X₁ ≫ Limits.Pi.map (fun j => H.map (f j)) := by + apply Limits.Pi.hom_ext + intro j + simp only [Category.assoc, piComparison_comp_π, Limits.Pi.map_π] + rw [← H.map_comp, Limits.Pi.map_π, H.map_comp, ← Category.assoc, piComparison_comp_π] + have (j : J) : QuasiIso (f j) := hf j + have (j : J) : IsIso (H.map (f j)) := inferInstanceAs (IsIso (HomologicalComplex.homologyMap (f j) i)) + have : IsIso (H.map (Limits.Pi.map f) ≫ piComparison H X₂) := by rw [hn]; infer_instance + exact (isIso_comp_right_iff (H.map (Limits.Pi.map f)) (piComparison H X₂)).mp inferInstance + +end ShiftStructure + +open CategoryTheory CategoryTheory.Limits +open HahnWilson.PeriodicDerived ZeroObject +universe u w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +noncomputable instance : HasZeroObject (PeriodicDerived.{u,w} R D) := + ⟨⟨(Q.{u,w} R D).obj 0, isZero_map (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) (Q.{u,w} R D) (isZero_zero _)⟩⟩ + +noncomputable instance : HasZeroMorphisms (PeriodicDerived.{u,w} R D) := + (isZero_zero (PeriodicDerived.{u,w} R D)).hasZeroMorphisms + +instance : (Q.{u,w} R D).PreservesZeroMorphisms := + Functor.preservesZeroMorphisms_of_map_zero_object + ((isZero_map (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) (Q.{u,w} R D) (isZero_zero _)).iso (isZero_zero _)) + +instance : (HomologicalComplex.quasiIso (ModuleCat.{u} R) + (.down (ZMod D))).IsStableUnderFiniteProducts := quasiIso_products R D + +omit [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] in +theorem complexFiniteProducts : HasFiniteProducts (PeriodicComplex R D) := by + constructor + intro n + let : HasLimitsOfShape (Discrete (Fin n)) (ModuleCat.{u} R) := + ModuleCat.hasLimitsOfShape.{0,0,u,u} + exact HomologicalComplex.instHasLimitsOfShape + +noncomputable instance : HasFiniteProducts (PeriodicDerived.{u,w} R D) := by + let := complexFiniteProducts R D + change HasFiniteProducts ((HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).Localization') + infer_instance + +instance : PreservesFiniteProducts (Q.{u,w} R D) := by + let := complexFiniteProducts R D + change PreservesFiniteProducts ((HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).Q') + infer_instance + +end HahnWilson.CyclicStructure + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/CyclicTriangle.lean b/lean/OAI/CategoryTheory/ThickClosure/CyclicTriangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..900152dd0936591d0c1fbd71dacfe944b366f457 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/CyclicTriangle.lean @@ -0,0 +1,135 @@ +import OAI.CategoryTheory.ThickClosure.UnrollDerived + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.CyclicTriangle +section ConeTriangles +open CategoryTheory CategoryTheory.Limits HomologicalComplex CategoryTheory.Pretriangulated +open HahnWilson.Unroll HahnWilson.CyclicShift +universe u +variable (R : Type u) [Ring R] (D : ℕ) + +lemma next_rel (i : ZMod D) : (ComplexShape.down (ZMod D)).Rel i (i-1) := by + simp [ComplexShape.down_Rel] + +def delta {P Q : PC R D} (f : P ⟶ Q) : + homotopyCofiber f ⟶ (cyclicShift R D 1).obj P where + f i := -homotopyCofiber.fstX f i (i-(1 : ℤ)) (by simp [ComplexShape.down_Rel]) + comm' := by + intro i j hij + have hj : j = i - (1 : ℤ) := by + change j+1=i at hij + simpa only [Int.cast_one] using (eq_sub_iff_add_eq.mpr hij) + subst j + change (-homotopyCofiber.fstX f i (i-(1 : ℤ)) _) ≫ + ((1 : ℤ).negOnePow • P.d (i-(1 : ℤ)) (i-(1 : ℤ)-(1 : ℤ))) = + homotopyCofiber.d f i (i-(1 : ℤ)) ≫ + (-homotopyCofiber.fstX f (i-(1 : ℤ)) (i-(1 : ℤ)-(1 : ℤ)) _) + simp only [Int.negOnePow_one, Units.neg_smul, one_smul, + Preadditive.comp_neg, Preadditive.neg_comp, neg_neg] + rw [homotopyCofiber.d_fstX f _ _ _ (by simp [ComplexShape.down_Rel]) + (by simp [ComplexShape.down_Rel])] + simp + +def triangle {P Q : PC R D} (f : P ⟶ Q) : Triangle (PC R D) := + Triangle.mk f (homotopyCofiber.inr f) (delta R D f) + +open CochainComplex.HomComplex + +lemma fstX_transport {P Q : PC R D} (f : P ⟶ Q) (i j k : ZMod D) + (h : j = k) (hij : (ComplexShape.down (ZMod D)).Rel i j) + (hik : (ComplexShape.down (ZMod D)).Rel i k) : + homotopyCofiber.fstX f i j hij ≫ (P.XIsoOfEq h).hom = + homotopyCofiber.fstX f i k hik := by + subst k + simp + +lemma ordinary_delta_f {A B : CochainComplex (ModuleCat.{u} R) ℤ} + (f : A ⟶ B) (n : ℤ) : + (CochainComplex.mappingCone.triangle f).mor₃.f n = + -homotopyCofiber.fstX f n (n+1) rfl := by + apply homotopyCofiber.ext_from_X f (n+1) n rfl + · erw [Preadditive.comp_neg, homotopyCofiber.inlX_fstX] + · erw [Preadditive.comp_neg, homotopyCofiber.inrX_fstX, neg_zero] + +lemma coneIso_delta {P Q : PC R D} (f : P ⟶ Q) : + (Unroll.functor R D).map (delta R D f) ≫ + ((Unroll.functor R D).commShiftIso (1 : ℤ)).hom.app P = + (coneIso R D f).hom ≫ (CochainComplex.mappingCone.triangle (Unroll.map R D f)).mor₃ := by + apply Hom.ext + funext n + change (-homotopyCofiber.fstX f (-(n : ZMod D)) (-(n : ZMod D)-(1 : ℤ)) _) ≫ + (P.XIsoOfEq (by simp only [Int.cast_add, Int.cast_one]; abel)).hom = + (coneXIso R D f n).hom ≫ + (CochainComplex.mappingCone.triangle (Unroll.map R D f)).mor₃.f n + erw [Preadditive.neg_comp, fstX_transport R D, ordinary_delta_f R, + Preadditive.comp_neg] + congr 1 + change homotopyCofiber.fstX f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) _ = + ((homotopyCofiber.XIsoBiprod f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) + (down_rel D n)).hom ≫ + (homotopyCofiber.XIsoBiprod (Unroll.map R D f) n (n+1) (up_rel n)).inv) ≫ + homotopyCofiber.fstX (Unroll.map R D f) n (n+1) rfl + simp [homotopyCofiber.fstX] + · erw [Category.assoc, Iso.inv_hom_id_assoc] + rfl + +def unrollTriangleIso {P Q : PC R D} (f : P ⟶ Q) : + (Unroll.functor R D).mapTriangle.obj (triangle R D f) ≅ + CochainComplex.mappingCone.triangle (Unroll.map R D f) := + Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _) (coneIso R D f) + (by change Unroll.map R D f ≫ 𝟙 _ = 𝟙 _ ≫ Unroll.map R D f; simp) + (by + change Unroll.map R D (homotopyCofiber.inr f) ≫ (coneIso R D f).hom = + 𝟙 _ ≫ CochainComplex.mappingCone.inr (Unroll.map R D f) + simpa only [Category.id_comp] using coneIso_inr R D f) + (by + change ((Unroll.functor R D).map (delta R D f) ≫ + ((Unroll.functor R D).commShiftIso (1 : ℤ)).hom.app P) ≫ + (CategoryTheory.shiftFunctor _ (1 : ℤ)).map (𝟙 ((Unroll.functor R D).obj P)) = + (coneIso R D f).hom ≫ (CochainComplex.mappingCone.triangle (Unroll.map R D f)).mor₃ + exact (congrArg (fun a => ((Unroll.functor R D).map (delta R D f) ≫ + ((Unroll.functor R D).commShiftIso (1 : ℤ)).hom.app P) ≫ a) + ((CategoryTheory.shiftFunctor (CochainComplex (ModuleCat.{u} R) ℤ) (1 : ℤ)).map_id _)).trans + ((Category.comp_id _).trans (coneIso_delta R D f))) + +end ConeTriangles +open CategoryTheory CategoryTheory.Limits HomologicalComplex CategoryTheory.Pretriangulated +open HahnWilson.Unroll HahnWilson.CyclicShift +universe u v w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +instance : NatTrans.CommShift (derivedFactors R D).hom ℤ := by + let : Localization.Lifting (q R D) + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) + (Unroll.functor R D ⋙ DerivedCategory.Q) (derivedFunctor R D) := + ⟨derivedFactors R D⟩ + exact NatTrans.commShift_iso_hom_of_localization (q R D) + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) ℤ + (Unroll.functor R D ⋙ DerivedCategory.Q) (derivedFunctor R D) + +def distinguished : Set (Triangle (PD R D)) := + { T | ∃ (P Q : PC R D) (f : P ⟶ Q), + Nonempty (T ≅ (q R D).mapTriangle.obj (triangle R D f)) } + +lemma map_distinguished (T : Triangle (PD R D)) (hT : T ∈ distinguished R D) : + (derivedFunctor R D).mapTriangle.obj T ∈ distTriang _ := by + obtain ⟨P, Q, f, ⟨e⟩⟩ := hT + apply isomorphic_distinguished _ (DerivedCategory.mappingCone_triangle_distinguished (Unroll.map R D f)) + exact ((derivedFunctor R D).mapTriangle.mapIso e) ≪≫ + ((Functor.mapTriangleCompIso (q R D) (derivedFunctor R D)).symm.app _) ≪≫ + ((Functor.mapTriangleIso (derivedFactors R D)).app _) ≪≫ + ((Functor.mapTriangleCompIso (Unroll.functor R D) DerivedCategory.Q).app _) ≪≫ + (DerivedCategory.Q.mapTriangle.mapIso (unrollTriangleIso R D f)) +end HahnWilson.CyclicTriangle + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/DerivedHom.lean b/lean/OAI/CategoryTheory/ThickClosure/DerivedHom.lean new file mode 100644 index 0000000000000000000000000000000000000000..42e1c1ca64a4b834fd021e70f50fc94798189cdd --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/DerivedHom.lean @@ -0,0 +1,77 @@ +import OAI.CategoryTheory.ThickClosure.PeriodicHom +import OAI.CategoryTheory.ThickClosure.LocalizationHom + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicDerivedHom +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived HahnWilson.PeriodicHom +universe u w +variable {R : Type u} [Ring R] {D : ℕ} +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +abbrev Qh : HomotopyCategory (ModuleCat.{u} R) (.down (ZMod D)) ⥤ PeriodicDerived R D := + HomologicalComplexUpToQuasiIso.Qh + +omit [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] in +lemma free_coyoneda_inverts (G : ZMod D → ModuleCat.{u} R) [∀ i, Projective (G i)] : + (HomotopyCategory.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).IsInvertedBy + (coyoneda.obj (Opposite.op (homotopyQuotient.obj (diagonalComplex G)))) := by + rintro ⟨P⟩ ⟨P'⟩ f hf + obtain ⟨f, rfl⟩ := homotopyQuotient.map_surjective f + have hq : QuasiIso f := + (HomologicalComplex.mem_quasiIso_iff f).mp + ((HomotopyCategory.quotient_map_mem_quasiIso_iff f).mp hf) + rw [CategoryTheory.isIso_iff_bijective] + exact free_hom_quasiIso_bijective G f + +theorem free_derived_map_bijective (G : ZMod D → ModuleCat.{u} R) + [∀ i, Projective (G i)] (P : PeriodicComplex R D) : + Function.Bijective (Qh.map : + (homotopyQuotient.obj (diagonalComplex G) ⟶ homotopyQuotient.obj P) → + (Qh.obj (homotopyQuotient.obj (diagonalComplex G)) ⟶ + Qh.obj (homotopyQuotient.obj P))) := + HahnWilson.LocalizationHom.map_bijective_of_inverts _ _ _ Qh _ _ + (free_coyoneda_inverts G) + +lemma quotient_homology_zero_iff {P P' : PeriodicComplex R D} + (f : homotopyQuotient.obj P ⟶ homotopyQuotient.obj P') (i : ZMod D) : + (homology R D i).map (Qh.map f) = 0 ↔ + (HomotopyCategory.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) i).map f = 0 := by + let e := HomologicalComplexUpToQuasiIso.homologyFunctorFactorsh (ModuleCat.{u} R) + (.down (ZMod D)) i + have he := NatIso.naturality_1 e f + constructor + · intro hf + simpa [hf] using he.symm + · intro hf + simpa [hf] using (NatIso.naturality_2 e f).symm + +theorem free_derived_zero_iff (G : ZMod D → ModuleCat.{u} R) + [∀ i, Projective (G i)] (P : PeriodicComplex R D) + (f : Qh.obj (homotopyQuotient.obj (diagonalComplex G)) ⟶ + Qh.obj (homotopyQuotient.obj P)) : + f = Qh.map 0 ↔ ∀ i, (homology R D i).map f = 0 := by + obtain ⟨g, rfl⟩ := (free_derived_map_bijective G P).2 f + rw [(free_derived_map_bijective G P).1.eq_iff] + obtain ⟨g, rfl⟩ := homotopyQuotient.map_surjective g + rw [HomotopyCategory.quotient_map_eq_zero_iff, homotopy_zero_iff] + apply forall_congr' + intro i + rw [quotient_homology_zero_iff] + change (HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) i).map g = 0 ↔ _ + let e := HomotopyCategory.homologyFunctorFactors (ModuleCat.{u} R) (.down (ZMod D)) i + rw [← NatIso.naturality_1 e g] + simp only [Preadditive.IsIso.comp_left_eq_zero, Preadditive.IsIso.comp_right_eq_zero] + rfl + +end HahnWilson.PeriodicDerivedHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/FiniteProducts.lean b/lean/OAI/CategoryTheory/ThickClosure/FiniteProducts.lean new file mode 100644 index 0000000000000000000000000000000000000000..658d2bcb27617b8c8c0be251063d92b88979321c --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/FiniteProducts.lean @@ -0,0 +1,24 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +universe u +namespace HahnWilson.FiniteTower +variable (R : Type u) [Ring R] (D : ℕ) +theorem chainComplexFiniteProducts : HasFiniteProducts (ChainComplex (ModuleCat.{u} R) (ZMod D)) := by + constructor + intro n + let : HasLimitsOfShape (Discrete (Fin n)) (ModuleCat.{u} R) := + ModuleCat.hasLimitsOfShape.{0,0,u,u} + exact HomologicalComplex.instHasLimitsOfShape + +end HahnWilson.FiniteTower + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/FiniteTower.lean b/lean/OAI/CategoryTheory/ThickClosure/FiniteTower.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b104786f5d15e55bd6441cbcfeb1e1723b980e9 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/FiniteTower.lean @@ -0,0 +1,84 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.FiniteTower +section TowerConstruction +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +universe u v +variable (C : Type u) [Category.{v} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] + +abbrev FreeLayer (T : C) : ObjectProperty C := + ((ObjectProperty.singleton T).shiftClosure ℤ).binaryProductsClosure + +abbrev Thick (T : C) : ObjectProperty C := + (ObjectProperty.singleton T).triangEnvelope + +inductive Tower (T : C) : C → Prop + | zero {P : C} (hP : IsZero P) : Tower T P + | step (tr : Triangle C) (htr : tr ∈ distTriang C) + (hF : FreeLayer C T tr.obj₁) (tail : Tower T tr.obj₃) : Tower T tr.obj₂ + +end TowerConstruction +section PretriangulatedClosure +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +universe u v +variable (C : Type u) [Category.{v} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] + +lemma tower_of_layer (T P : C) (hP : FreeLayer C T P) : Tower C T P := by + exact Tower.step (contractibleTriangle P) (contractible_distinguished P) hP + (Tower.zero (isZero_zero C)) + +lemma tower_of_extension (T : C) (n : ℕ) (P : C) + (hP : (FreeLayer C T).extensionProductIter n P) : Tower C T P := by + induction n generalizing P with + | zero => exact tower_of_layer C T P hP + | succ n ih => + rw [ObjectProperty.extensionProductIter_succ] at hP + obtain ⟨F, B, f, g, h, ht, hF, hB⟩ := hP + exact Tower.step (Triangle.mk f g h) ht hF (ih B hB) + +theorem tower_normal_form [IsIdempotentComplete C] (T P : C) (hP : Thick C T P) : + ∃ P₀ : C, Tower C T P₀ ∧ Nonempty (Retract P P₀) := by + obtain ⟨n, hn⟩ := (ObjectProperty.prop_triangEnvelope_iff _ _).mp hP + change ((FreeLayer C T).retractClosure.extensionProductIter n).retractClosure P at hn + rw [ObjectProperty.retractClosure_extensionProductIter_retractClosure] at hn + obtain ⟨P₀, h₀, hret⟩ := hn + exact ⟨P₀, tower_of_extension C T n P₀ h₀, hret⟩ + +end PretriangulatedClosure + +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +universe u v +variable (C : Type u) [Category.{v} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] + +lemma layer_thick (T P : C) (hP : FreeLayer C T P) : Thick C T P := by + have h : FreeLayer C T ≤ Thick C T := by + apply (ObjectProperty.binaryProductsClosure_le_iff + (P := (ObjectProperty.singleton T).shiftClosure ℤ) (Q := Thick C T)).mpr + apply (ObjectProperty.shiftClosure_le_iff (ObjectProperty.singleton T) (Thick C T) (A := ℤ)).mpr + exact (ObjectProperty.singleton T).le_triangEnvelope + exact h P hP + +lemma tower_thick (T P : C) (hP : Tower C T P) : Thick C T P := by + induction hP with + | zero h => exact (Thick C T).prop_of_isZero h + | step tr htr hf _ ih => + exact (Thick C T).ext_of_isTriangulatedClosed₂ tr htr (layer_thick C T _ hf) ih + +end HahnWilson.FiniteTower + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/FreeHomology.lean b/lean/OAI/CategoryTheory/ThickClosure/FreeHomology.lean new file mode 100644 index 0000000000000000000000000000000000000000..8dbfe822eca43f52bd81a059c722eda8a820e4fa --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/FreeHomology.lean @@ -0,0 +1,63 @@ +import OAI.CategoryTheory.ThickClosure.FiniteTower +import OAI.CategoryTheory.ThickClosure.HomologyBridge + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.FreeHomology +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +universe u v w c h +variable (R : Type u) [Ring R] + +lemma free_of_presentation {ι : Type} [Finite ι] {X : ModuleCat.{u} R} + (p : LimitPresentation (Discrete ι) X) + (hf : ∀ i : Discrete ι, Module.Free R (p.diag.obj i)) : Module.Free R X := by + classical + let e : X ≅ ModuleCat.of R (∀ i : ι, p.diag.obj ⟨i⟩) := + p.isLimit.conePointUniqueUpToIso (limit.isLimit p.diag) ≪≫ + HasLimit.isoOfNatIso Discrete.natIsoFunctor ≪≫ ModuleCat.piIsoPi _ + let (i : ι) : Module.Free R (p.diag.obj ⟨i⟩) := hf ⟨i⟩ + exact Module.Free.of_equiv e.toLinearEquiv.symm + +variable [HasDerivedCategory.{v} (ModuleCat.{u} R)] +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] +variable (F : C ⥤ DerivedCategory (ModuleCat.{u} R)) [F.CommShift ℤ] [F.IsTriangulated] + +omit [IsTriangulated C] in +lemma free_layer (T : C) + (hT : ∀ n : ℤ, Module.Free R ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj (F.obj T))) + (P : C) (hP : HahnWilson.FiniteTower.FreeLayer C T P) : + ∀ n : ℤ, Module.Free R ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj (F.obj P)) := by + induction hP with + | of_mem X hX => + obtain ⟨Y, a, e, hY⟩ := hX + have hY := (ObjectProperty.singleton_iff T Y).mp hY + subst Y + intro n + let H := DerivedCategory.homologyFunctor (ModuleCat.{u} R) n + let e' : H.obj (F.obj X) ≅ + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) (a+n)).obj (F.obj T) := H.mapIso (F.mapIso e ≪≫ (F.commShiftIso a).app T) ≪≫ + ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) 0).shiftIso a n (a+n) rfl).app (F.obj T) + let := hT (a+n) + exact Module.Free.of_equiv e'.toLinearEquiv.symm + | of_isoClosure e _ ih => + intro n + let := ih n + exact Module.Free.of_equiv + ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).mapIso (F.mapIso e)).toLinearEquiv + | of_limitPresentation p _ ih => + intro n + exact free_of_presentation R (p.map (F ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n)) + (fun i => ih i n) + +end HahnWilson.FreeHomology + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/GradedSplit.lean b/lean/OAI/CategoryTheory/ThickClosure/GradedSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..13a56c59ba6fb30a9fc6ae0786930d226efb4732 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/GradedSplit.lean @@ -0,0 +1,117 @@ +import OAI.CategoryTheory.ThickClosure.CyclicTriangle +import OAI.CategoryTheory.ThickClosure.PeriodicDual + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.GradedSplit +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +open HahnWilson.Unroll +universe u v w +variable (R : Type u) [Ring R] (D : ℕ) + +instance : (Unroll.functor R D).Additive where + map_add := by intros; rfl + +abbrev dg (V : ZMod D → ModuleCat.{u} R) := diagonalComplex V +abbrev dgProd (V L : ZMod D → ModuleCat.{u} R) := + dg R D (fun i => ModuleCat.of R (V i × L i)) + +def pV (V L : ZMod D → ModuleCat.{u} R) : dgProd R D V L ⟶ dg R D V where + f i := ModuleCat.ofHom (LinearMap.fst R (V i) (L i)) + comm' := by intros; simp [dgProd, dg, diagonalComplex, ChainComplex.of.d] +def pL (V L : ZMod D → ModuleCat.{u} R) : dgProd R D V L ⟶ dg R D L where + f i := ModuleCat.ofHom (LinearMap.snd R (V i) (L i)) + comm' := by intros; simp [dgProd, dg, diagonalComplex, ChainComplex.of.d] +def iV (V L : ZMod D → ModuleCat.{u} R) : dg R D V ⟶ dgProd R D V L where + f i := ModuleCat.ofHom (LinearMap.inl R (V i) (L i)) + comm' := by intros; simp [dgProd, dg, diagonalComplex, ChainComplex.of.d] +def iL (V L : ZMod D → ModuleCat.{u} R) : dg R D L ⟶ dgProd R D V L where + f i := ModuleCat.ofHom (LinearMap.inr R (V i) (L i)) + comm' := by intros; simp [dgProd, dg, diagonalComplex, ChainComplex.of.d] + +@[simp] lemma iV_pV (V L : ZMod D → ModuleCat.{u} R) : iV R D V L ≫ pV R D V L = 𝟙 _ := by ext; rfl +@[simp] lemma iL_pL (V L : ZMod D → ModuleCat.{u} R) : iL R D V L ≫ pL R D V L = 𝟙 _ := by ext; rfl +@[simp] lemma iV_pL (V L : ZMod D → ModuleCat.{u} R) : iV R D V L ≫ pL R D V L = 0 := by ext; rfl +@[simp] lemma iL_pV (V L : ZMod D → ModuleCat.{u} R) : iL R D V L ≫ pV R D V L = 0 := by ext; rfl +lemma decomp (V L : ZMod D → ModuleCat.{u} R) : + pL R D V L ≫ iL R D V L + pV R D V L ≫ iV R D V L = 𝟙 _ := by + apply Hom.ext + funext i + apply ModuleCat.hom_ext + apply LinearMap.ext + rintro ⟨v,l⟩ + change (0,l) + (v,0) = (v,l) + simp + +def diagonalHomologyIso (V : ZMod D → ModuleCat.{u} R) (i : ZMod D) : + (diagonalComplex V).homology i ≅ V i := + (ShortComplex.LeftHomologyData.ofZeros ((diagonalComplex V).sc i) + (diagonalComplex_d V _ _) (diagonalComplex_d V _ _)).homologyIso + +variable [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +abbrev F₀ := Unroll.functor R D ⋙ DerivedCategory.Q + +noncomputable def splitIso (V L : ZMod D → ModuleCat.{u} R) : + (F₀ R D).obj (dgProd R D V L) ≅ + (F₀ R D).obj (dg R D L) ⊞ (F₀ R D).obj (dg R D V) where + hom := biprod.lift ((F₀ R D).map (pL R D V L)) ((F₀ R D).map (pV R D V L)) + inv := biprod.desc ((F₀ R D).map (iL R D V L)) ((F₀ R D).map (iV R D V L)) + hom_inv_id := by + rw [biprod.lift_desc, ← Functor.map_comp, ← Functor.map_comp, ← Functor.map_add, + decomp] + exact (F₀ R D).map_id _ + inv_hom_id := by + ext <;> simp [← Functor.map_comp] + +@[reassoc] lemma iL_splitIso (V L : ZMod D → ModuleCat.{u} R) : + (F₀ R D).map (iL R D V L) ≫ (splitIso R D V L).hom = biprod.inl := by + ext <;> simp [splitIso, ← Functor.map_comp] +@[reassoc] lemma splitIso_pV (V L : ZMod D → ModuleCat.{u} R) : + (splitIso R D V L).hom ≫ biprod.snd = (F₀ R D).map (pV R D V L) := by + exact biprod.lift_snd _ _ + +lemma splitTriangle (V L : ZMod D → ModuleCat.{u} R) : + Triangle.mk ((F₀ R D).map (iL R D V L)) ((F₀ R D).map (pV R D V L)) 0 ∈ + distTriang (DerivedCategory (ModuleCat.{u} R)) := by + apply isomorphic_distinguished _ (binaryBiproductTriangle_distinguished _ _) + exact Triangle.isoMk _ _ (Iso.refl _) (splitIso R D V L) (Iso.refl _) + (by + change (F₀ R D).map (iL R D V L) ≫ (splitIso R D V L).hom = 𝟙 _ ≫ biprod.inl + exact (iL_splitIso R D V L).trans (Category.id_comp _).symm) + (by + change (F₀ R D).map (pV R D V L) ≫ 𝟙 _ = (splitIso R D V L).hom ≫ biprod.snd + exact (Category.comp_id _).trans (splitIso_pV R D V L).symm) + (by + change (0 : (F₀ R D).obj (dg R D V) ⟶ ((F₀ R D).obj (dg R D L))⟦(1:ℤ)⟧) ≫ + (shiftFunctor (DerivedCategory (ModuleCat.{u} R)) (1:ℤ)).map (𝟙 ((F₀ R D).obj (dg R D L))) = + (𝟙 ((F₀ R D).obj (dg R D V))) ≫ 0 + exact (CategoryTheory.Limits.zero_comp).trans (CategoryTheory.Limits.comp_zero).symm) + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +def derivedDiagonalHomologyIso (V : ZMod D → ModuleCat.{u} R) (n : ℤ) : + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj + ((derivedFunctor R D).obj ((Q R D).obj (diagonalComplex V))) ≅ V (-(n : ZMod D)) := + (derivedHomologyIso R D n).app _ ≪≫ + (HomologicalComplexUpToQuasiIso.homologyFunctorFactors (ModuleCat.{u} R) + (.down (ZMod D)) (-(n : ZMod D))).app _ ≪≫ + diagonalHomologyIso R D V _ + +def F₀DiagonalHomologyIso (V : ZMod D → ModuleCat.{u} R) (n : ℤ) : + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj + ((F₀ R D).obj (diagonalComplex V)) ≅ V (-(n : ZMod D)) := + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).mapIso ((derivedFactors R D).symm.app _) ≪≫ + derivedDiagonalHomologyIso R D V n + +end HahnWilson.GradedSplit + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/HomologyBridge.lean b/lean/OAI/CategoryTheory/ThickClosure/HomologyBridge.lean new file mode 100644 index 0000000000000000000000000000000000000000..16b2ddcccf00cd7fbca66138ec8e5f20ba627526 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/HomologyBridge.lean @@ -0,0 +1,97 @@ +import OAI.CategoryTheory.ThickClosure.GradedSplit + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.Unroll +open CategoryTheory CategoryTheory.Limits HomologicalComplex ZeroObject +universe u v w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +instance derived_preservesZero : (derivedFunctor R D).PreservesZeroMorphisms := by + have hq : IsZero ((q R D).obj (0 : PC R D)) := + HahnWilson.CyclicStructure.isZero_map (HomologicalComplex.quasiIso (ModuleCat.{u} R) + (.down (ZMod D))) (q R D) (isZero_zero _) + have hu : IsZero ((derivedFunctor R D).obj ((q R D).obj (0 : PC R D))) := + IsZero.of_iso ((GradedSplit.F₀ R D).map_isZero (isZero_zero _)) + ((derivedFactors R D).app _) + have hz : IsZero ((derivedFunctor R D).obj (0 : PD R D)) := + IsZero.of_iso hu ((derivedFunctor R D).mapIso ((hq.iso (isZero_zero _)).symm)) + exact Functor.preservesZeroMorphisms_of_map_zero_object (hz.iso (isZero_zero _)) + +end HahnWilson.Unroll + +namespace HahnWilson.HomologyBridge +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PrincipalModules HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +open HahnWilson.Unroll HahnWilson.GradedSplit +universe u v w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +lemma zero_iff {X Y : PeriodicDerived R D} (f : X ⟶ Y) (n : ℤ) : + (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).map ((derivedFunctor R D).map f) = 0 ↔ + (homology R D (-(n : ZMod D))).map f = 0 := by + let e := derivedHomologyIso R D n + have h := e.hom.naturality f + constructor + · intro hf + apply (cancel_epi (e.hom.app X)).mp + rw [← h] + change (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).map + ((derivedFunctor R D).map f) ≫ _ = _ + rw [hf, CategoryTheory.Limits.zero_comp, CategoryTheory.Limits.comp_zero] + · intro hf + apply (cancel_mono (e.hom.app Y)).mp + change (derivedFunctor R D ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).map f ≫ _ = _ + rw [h] + change _ ≫ (homology R D (-(n : ZMod D))).map f = _ + rw [hf, CategoryTheory.Limits.comp_zero, CategoryTheory.Limits.zero_comp] + +lemma all_zero_iff {X Y : PeriodicDerived R D} (f : X ⟶ Y) : + (∀ n : ℤ, (DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).map + ((derivedFunctor R D).map f) = 0) ↔ + ∀ i : ZMod D, (homology R D i).map f = 0 := by + constructor + · intro h i + obtain ⟨n,hn⟩ := ZMod.intCast_surjective (-i) + have hi : -(n : ZMod D) = i := by rw [hn, neg_neg] + exact hi ▸ (zero_iff R D f n).mp (h n) + · intro h n + exact (zero_iff R D f n).mpr (h _) + +omit [HasDerivedCategory.{v} (ModuleCat.{u} R)] in +lemma torsion_of_iso {M N : ModuleCat.{u} R} (e : M ≅ N) + (h : IsTorsionModule R N) : IsTorsionModule R M := by + intro x + obtain ⟨a,ha,hx⟩ := h (e.hom x) + refine ⟨a,ha,?_⟩ + apply e.toLinearEquiv.injective + simpa using hx + +lemma torsion (X : PeriodicDerived R D) + (h : ∀ i, IsTorsionModule R ((homology R D i).obj X)) (n : ℤ) : + IsTorsionModule R ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj + ((derivedFunctor R D).obj X)) := + torsion_of_iso R ((derivedHomologyIso R D n).app X) (h _) + +lemma torsion_shift_diagonal (L : ZMod D → ModuleCat.{u} R) + (h : ∀ i, IsTorsionModule R (L i)) (m n : ℤ) : + IsTorsionModule R ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj + (((F₀ R D).obj (dg R D L))⟦m⟧)) := by + let e := ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) 0).shiftIso m n (m+n) rfl).app + ((F₀ R D).obj (dg R D L)) + exact torsion_of_iso R (e ≪≫ F₀DiagonalHomologyIso R D L (m+n)) (h _) + +end HahnWilson.HomologyBridge + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/LaurentAction.lean b/lean/OAI/CategoryTheory/ThickClosure/LaurentAction.lean new file mode 100644 index 0000000000000000000000000000000000000000..721e16bad17811887083f886d8305c2d139c76d4 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/LaurentAction.lean @@ -0,0 +1,383 @@ +import OAI.CategoryTheory.ThickClosure.PerfectModules + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentDg +open CategoryTheory CategoryTheory.Limits +universe u +variable {R : Type u} [Ring R] {D : ℕ} + +abbrev familyTotal (X : ℤ → ModuleCat.{u} R) := DirectSum ℤ (fun i => X i) +abbrev familyInc (X : ℤ → ModuleCat.{u} R) (i : ℤ) : X i →ₗ[R] familyTotal X := + DirectSum.lof R ℤ (fun i => X i) i + +def familyDifferential (X : ℤ → ModuleCat.{u} R) (d : ∀ i, X (i+1) ⟶ X i) : + familyTotal X →ₗ[R] familyTotal X := + DirectSum.toModule R ℤ (familyTotal X) (fun i => + (familyInc X (i-1)).comp ((eqToHom (congrArg X (by omega : i = i-1+1))) ≫ d (i-1)).hom) + +structure ActionModule (R : Type u) [Ring R] (D : ℕ) where + X : ℤ → ModuleCat.{u} R + d : ∀ i, X (i+1) ⟶ X i + dd : ∀ i, d (i+1) ≫ d i = 0 + action : LaurentPolynomial R →+* AddMonoid.End (familyTotal X) + coefficient : ∀ (r : R) (z : familyTotal X), action (AddMonoidAlgebra.single 0 r) z = r • z + homogeneous : ∀ (q i : ℤ) (x : X i), ∃ y : X (i+(D:ℤ)*q), + action (AddMonoidAlgebra.single q 1) (familyInc X i x) = familyInc X _ y + differential : ∀ (a : LaurentPolynomial R) (z : familyTotal X), + familyDifferential X d (action a z) = action a (familyDifferential X d z) + +structure PowerData (X : ℤ → ModuleCat.{u} R) (d : ∀ i, X (i+1) ⟶ X i) where + power : ∀ i j : ℤ, (i : ZMod D) = (j : ZMod D) → (X i ≅ X j) + refl : ∀ i, power i i rfl = Iso.refl _ + trans : ∀ (i j k : ℤ) (h : (i : ZMod D) = (j : ZMod D)) + (h' : (j : ZMod D) = (k : ZMod D)), + power i j h ≪≫ power j k h' = power i k (h.trans h') + comm : ∀ (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)), + (power (i+1) (j+1) (by simpa only [Int.cast_add, Int.cast_one] using + (congrArg (fun x : ZMod D => x+1) h))).hom ≫ d j = d i ≫ (power i j h).hom + +def ActionModule.presentation (G : ActionModule R D) (P : PowerData (D:=D) G.X G.d) : Module R D := + ⟨G.X, G.d, G.dd, P.power, P.refl, P.trans, P.comm⟩ + +def totalMap {X Y : ℤ → ModuleCat.{u} R} (f : ∀ i, X i ⟶ Y i) : + familyTotal X →ₗ[R] familyTotal Y := + DirectSum.toModule R ℤ (familyTotal Y) (fun i => (familyInc Y i).comp (f i).hom) + +lemma familyInc_injective (X : ℤ → ModuleCat.{u} R) (i : ℤ) : + Function.Injective (familyInc X i) := DirectSum.of_injective i + +lemma familyDifferential_inc_succ (X : ℤ → ModuleCat.{u} R) + (d : ∀ i, X (i+1) ⟶ X i) (i : ℤ) (x : X (i+1)) : + familyDifferential X d (familyInc X (i+1) x) = familyInc X i (d i x) := by + unfold familyDifferential + rw [DirectSum.toModule_lof] + have aux (j : ℤ) (h : j = i) (h' : i+1 = j+1) : + familyInc X j (((eqToHom (congrArg X h') ≫ d j).hom) x) = familyInc X i (d i x) := by + subst j + rfl + exact aux (i+1-1) (by omega) (by omega) + +namespace ActionModule + +@[instance_reducible] +def asModule (G : ActionModule R D) : _root_.Module (LaurentPolynomial R) (familyTotal G.X) := + Module.compHom _ G.action + +lemma monomial_add (G : ActionModule R D) (q r : ℤ) (z : familyTotal G.X) : + G.action (AddMonoidAlgebra.single (q+r) 1) z = + G.action (AddMonoidAlgebra.single q 1) (G.action (AddMonoidAlgebra.single r 1) z) := by + have h := congrArg (fun e : AddMonoid.End (familyTotal G.X) => e z) + (G.action.map_mul (AddMonoidAlgebra.single q 1) (AddMonoidAlgebra.single r 1)) + simpa only [AddMonoidAlgebra.single_mul_single, one_mul, AddMonoid.End.coe_mul, Function.comp_apply] using h + +lemma monomial_zero (G : ActionModule R D) (z : familyTotal G.X) : + G.action (AddMonoidAlgebra.single 0 1) z = z := by + simpa only [one_smul] using G.coefficient 1 z + +lemma monomial_smul (G : ActionModule R D) (q : ℤ) (r : R) (z : familyTotal G.X) : + G.action (AddMonoidAlgebra.single q 1) (r • z) = + r • G.action (AddMonoidAlgebra.single q 1) z := by + have hcomm : AddMonoidAlgebra.single q (1:R) * AddMonoidAlgebra.single 0 r = + AddMonoidAlgebra.single 0 r * AddMonoidAlgebra.single q 1 := by + simp only [AddMonoidAlgebra.single_mul_single, add_zero, zero_add, one_mul, mul_one] + have h := congrArg (fun a => G.action a z) hcomm + simpa only [map_mul, AddMonoid.End.coe_mul, Function.comp_apply, G.coefficient] using h + +lemma exists_powerValue (G : ActionModule R D) (q i j : ℤ) + (h : j = i+(D:ℤ)*q) (x : G.X i) : + ∃ y : G.X j, G.action (AddMonoidAlgebra.single q 1) (familyInc G.X i x) = familyInc G.X j y := by + subst j + exact G.homogeneous q i x + +noncomputable def powerValue (G : ActionModule R D) (q i j : ℤ) + (h : j = i+(D:ℤ)*q) (x : G.X i) : G.X j := + Classical.choose (exists_powerValue G q i j h x) + +lemma powerValue_spec (G : ActionModule R D) (q i j : ℤ) + (h : j = i+(D:ℤ)*q) (x : G.X i) : + familyInc G.X j (powerValue G q i j h x) = + G.action (AddMonoidAlgebra.single q 1) (familyInc G.X i x) := + (Classical.choose_spec (exists_powerValue G q i j h x)).symm + +noncomputable def powerLinear (G : ActionModule R D) (q i j : ℤ) + (h : j = i+(D:ℤ)*q) : G.X i →ₗ[R] G.X j where + toFun := powerValue G q i j h + map_add' x y := by + apply familyInc_injective G.X j + simp only [powerValue_spec, map_add] + map_smul' r x := by + apply familyInc_injective G.X j + simp only [powerValue_spec, map_smul, monomial_smul, RingHom.id_apply] + +lemma powerLinear_spec (G : ActionModule R D) (q i j : ℤ) + (h : j = i+(D:ℤ)*q) (x : G.X i) : + familyInc G.X j (powerLinear G q i j h x) = + G.action (AddMonoidAlgebra.single q 1) (familyInc G.X i x) := powerValue_spec G q i j h x + +noncomputable def exponent (hD : 0 < D) (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)) : ℤ := + Classical.choose ((exponent_exists_unique hD i j).mp h).exists + +lemma exponent_spec (hD : 0 < D) (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)) : + j = i+(D:ℤ)*exponent hD i j h := + Classical.choose_spec ((exponent_exists_unique hD i j).mp h).exists + +lemma exponent_eq (hD : 0 < D) (i j q : ℤ) (h : (i : ZMod D) = (j : ZMod D)) + (hq : j = i+(D:ℤ)*q) : exponent hD i j h = q := + ((exponent_exists_unique hD i j).mp h).unique (exponent_spec hD i j h) hq + +noncomputable def directMap (G : ActionModule R D) (hD : 0 < D) (i j : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) : G.X i ⟶ G.X j := + ModuleCat.ofHom (powerLinear G (exponent hD i j h) i j (exponent_spec hD i j h)) + +lemma directMap_spec (G : ActionModule R D) (hD : 0 < D) (i j q : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) (hq : j = i+(D:ℤ)*q) (x : G.X i) : + familyInc G.X j (directMap G hD i j h x) = + G.action (AddMonoidAlgebra.single q 1) (familyInc G.X i x) := by + have he := exponent_eq hD i j q h hq + exact (powerLinear_spec G _ i j (exponent_spec hD i j h) x).trans (by rw [he]) + +lemma directMap_refl (G : ActionModule R D) (hD : 0 < D) (i : ℤ) : + directMap G hD i i rfl = 𝟙 _ := by + ext x + apply familyInc_injective G.X i + rw [directMap_spec G hD i i 0 rfl (by simp), monomial_zero] + rfl + +lemma directMap_trans (G : ActionModule R D) (hD : 0 < D) (i j k : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) (h' : (j : ZMod D) = (k : ZMod D)) : + directMap G hD i j h ≫ directMap G hD j k h' = directMap G hD i k (h.trans h') := by + let q := exponent hD i j h + let r := exponent hD j k h' + have hq : j = i+(D:ℤ)*q := exponent_spec hD i j h + have hr : k = j+(D:ℤ)*r := exponent_spec hD j k h' + have hsum : k = i+(D:ℤ)*(r+q) := by rw [hr, hq]; ring + ext x + apply familyInc_injective G.X k + change familyInc G.X k (directMap G hD j k h' (directMap G hD i j h x)) = _ + rw [directMap_spec G hD j k r h' hr, directMap_spec G hD i j q h hq, + directMap_spec G hD i k (r+q) (h.trans h') hsum, monomial_add] + +noncomputable def directIso (G : ActionModule R D) (hD : 0 < D) (i j : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) : G.X i ≅ G.X j where + hom := directMap G hD i j h + inv := directMap G hD j i h.symm + hom_inv_id := by rw [directMap_trans, directMap_refl] + inv_hom_id := by rw [directMap_trans, directMap_refl] + +lemma directMap_d (G : ActionModule R D) (hD : 0 < D) (i j : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) : + directMap G hD (i+1) (j+1) (by simpa only [Int.cast_add, Int.cast_one] using + (congrArg (fun x : ZMod D => x+1) h)) ≫ G.d j = G.d i ≫ directMap G hD i j h := by + let q := exponent hD i j h + have hq : j = i+(D:ℤ)*q := exponent_spec hD i j h + have hq' : j+1 = i+1+(D:ℤ)*q := by omega + ext x + apply familyInc_injective G.X j + change familyInc G.X j (G.d j (directMap G hD (i+1) (j+1) _ x)) = + familyInc G.X j (directMap G hD i j h (G.d i x)) + rw [← familyDifferential_inc_succ, directMap_spec G hD (i+1) (j+1) q _ hq', + G.differential, familyDifferential_inc_succ, directMap_spec G hD i j q h hq] + +noncomputable def reconstructed (G : ActionModule R D) (hD : 0 < D) : + PowerData (D:=D) G.X G.d where + power := directIso G hD + refl i := by apply Iso.ext; exact directMap_refl G hD i + trans i j k h h' := by apply Iso.ext; exact directMap_trans G hD i j k h h' + comm i j h := directMap_d G hD i j h + +end ActionModule + +lemma representation_single_total (M : Module R D) (q : ℤ) (r : R) (z : total M) : + laurentRepresentation M (AddMonoidAlgebra.single q r) z = r • shiftPower M q z := by + unfold laurentRepresentation + erw [AddMonoidAlgebra.liftNCRingHom_single] + rfl + +lemma totalMap_inc {X Y : ℤ → ModuleCat.{u} R} (f : ∀ i, X i ⟶ Y i) + (i : ℤ) (x : X i) : + totalMap f (familyInc X i x) = familyInc Y i (f i x) := + DirectSum.toModule_lof _ _ _ + +theorem action_reconstructs (hD : 0 < D) (G : ActionModule R D) : + ∃ P : PowerData (D:=D) G.X G.d, + laurentRepresentation (G.presentation P) = G.action := by + refine ⟨G.reconstructed hD, ?_⟩ + apply AddMonoidAlgebra.ringHom_ext + · intro r + apply AddMonoidHom.ext + intro z + erw [representation_single_total, shiftPower_zero] + exact (G.coefficient r z).symm + · intro q + apply DirectSum.addHom_ext + intro i x + change laurentRepresentation (G.presentation (G.reconstructed hD)) + (AddMonoidAlgebra.single q 1) (inc _ i x) = _ + rw [laurentRepresentation_single, one_smul] + exact ActionModule.directMap_spec G hD i (i+(D:ℤ)*q) q (power_cast i q) rfl x + +theorem morphism_action_iff (M N : Module R D) (f : ∀ i, M.X i ⟶ N.X i) : + (∀ (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)), + f i ≫ (N.power i j h).hom = (M.power i j h).hom ≫ f j) ↔ + (∀ (a : LaurentPolynomial R) (z : total M), + totalMap f (laurentRepresentation M a z) = laurentRepresentation N a (totalMap f z)) := by + constructor + · intro hf + have ht (q : ℤ) : (totalMap f).comp (shiftPower M q) = + (shiftPower N q).comp (totalMap f) := by + apply DirectSum.linearMap_ext + intro i + ext x : 1 + change totalMap f (shiftPower M q (inc M i x)) = shiftPower N q (totalMap f (inc M i x)) + simp only [shiftPower_inc, move, LinearMap.comp_apply, totalMap_inc] + change inc N _ (((M.power i _ _).hom ≫ f _) x) = + inc N _ ((f i ≫ (N.power i _ _).hom) x) + rw [hf] + intro a z + induction a using AddMonoidAlgebra.induction_linear with + | zero => simp + | add a b ha hb => + rw [map_add, map_add] + change totalMap f (laurentRepresentation M a z + laurentRepresentation M b z) = + laurentRepresentation N a (totalMap f z) + laurentRepresentation N b (totalMap f z) + rw [map_add, ha, hb] + | single q r => + rw [representation_single_total, representation_single_total, map_smul] + exact congrArg (fun z => r • z) (LinearMap.congr_fun (ht q) z) + · intro hf i j h + obtain ⟨q, hq⟩ := (ZMod.intCast_eq_intCast_iff_dvd_sub i j D).mp h + have ej : j = i+(D:ℤ)*q := by omega + subst j + ext x + apply familyInc_injective N.X (i+(D:ℤ)*q) + change inc N _ ((N.power i _ h).hom (f i x)) = inc N _ (f _ ((M.power i _ h).hom x)) + have hh := hf (AddMonoidAlgebra.single q 1) (inc M i x) + simpa only [laurentRepresentation_single, one_smul, totalMap_inc] using hh.symm +lemma totalMap_id (X : ℤ → ModuleCat.{u} R) : totalMap (fun i => 𝟙 (X i)) = LinearMap.id := by + apply DirectSum.linearMap_ext + intro i + ext x : 1 + simpa only [LinearMap.comp_apply, LinearMap.id_apply, ModuleCat.id_apply] using + totalMap_inc (fun i => 𝟙 (X i)) i x + +lemma totalMap_comp {X Y Z : ℤ → ModuleCat.{u} R} + (f : ∀ i, X i ⟶ Y i) (g : ∀ i, Y i ⟶ Z i) : + totalMap (fun i => f i ≫ g i) = (totalMap g).comp (totalMap f) := by + apply DirectSum.linearMap_ext + intro i + ext x : 1 + simp only [LinearMap.comp_apply, totalMap_inc] + rfl + +namespace ActionModule +@[ext] structure Hom (M N : ActionModule R D) where + f : ∀ i, M.X i ⟶ N.X i + comm_d : ∀ i, f (i+1) ≫ N.d i = M.d i ≫ f i + comm_action : ∀ (a : LaurentPolynomial R) (z : familyTotal M.X), + totalMap f (M.action a z) = N.action a (totalMap f z) + +instance : Category (ActionModule R D) where + Hom M N := Hom M N + id M := ⟨fun i => 𝟙 _, by intro i; simp, by intro a z; rw [totalMap_id]; rfl⟩ + comp f g := ⟨fun i => f.f i ≫ g.f i, + by intro i; rw [Category.assoc, g.comm_d, ← Category.assoc, f.comm_d, Category.assoc], + by intro a z; rw [totalMap_comp]; simp only [LinearMap.comp_apply, f.comm_action, g.comm_action]⟩ + id_comp f := by apply Hom.ext; funext i; exact Category.id_comp _ + comp_id f := by apply Hom.ext; funext i; exact Category.comp_id _ + assoc f g h := by apply Hom.ext; funext i; exact Category.assoc _ _ _ + +@[simp] lemma id_f (M : ActionModule R D) (i : ℤ) : (𝟙 M : M ⟶ M).f i = 𝟙 _ := rfl +@[simp] lemma comp_f {M N P : ActionModule R D} (f : M ⟶ N) (g : N ⟶ P) (i : ℤ) : + (f ≫ g).f i = f.f i ≫ g.f i := rfl +end ActionModule +lemma familyDifferential_eq (M : Module R D) : + familyDifferential M.X M.d = totalDifferential M := by + apply DirectSum.linearMap_ext + intro n + obtain ⟨i, rfl⟩ : ∃ i : ℤ, n = i+1 := ⟨n-1, by omega⟩ + ext x : 1 + simp only [LinearMap.comp_apply, familyDifferential_inc_succ, totalDifferential_inc_succ] + +def asAction (M : Module R D) : ActionModule R D where + X := M.X + d := M.d + dd := M.dd + action := laurentRepresentation M + coefficient r z := by rw [representation_single_total, shiftPower_zero]; rfl + homogeneous q i x := ⟨(M.power i _ (power_cast i q)).hom x, + by simpa only [one_smul] using laurentRepresentation_single M q i 1 x⟩ + differential a z := by + rw [familyDifferential_eq] + exact (congrArg (fun e : AddMonoid.End (total M) => e z) + (laurentRepresentation_commute M a).eq).symm + +def actionFunctor : Module R D ⥤ ActionModule R D where + obj := asAction + map f := ⟨f.f, f.comm_d, (morphism_action_iff _ _ _).mp f.comm_power⟩ + map_id M := by apply ActionModule.Hom.ext; rfl + map_comp f g := by apply ActionModule.Hom.ext; rfl + +instance actionFunctor_faithful : (actionFunctor (R:=R) (D:=D)).Faithful where + map_injective := by + intro M N f g h + apply Module.Hom.ext + exact congrArg ActionModule.Hom.f h + +instance actionFunctor_full : (actionFunctor (R:=R) (D:=D)).Full where + map_surjective := by + intro M N f + refine ⟨⟨f.f, f.comm_d, (morphism_action_iff M N f.f).mpr f.comm_action⟩, ?_⟩ + apply ActionModule.Hom.ext + rfl + +noncomputable def presentationActionIso (G : ActionModule R D) + (P : PowerData (D:=D) G.X G.d) (hρ : laurentRepresentation (G.presentation P) = G.action) : + asAction (G.presentation P) ≅ G where + hom := ⟨fun i => 𝟙 (G.X i), by + intro i + change 𝟙 (G.X (i+1)) ≫ G.d i = G.d i ≫ 𝟙 (G.X i) + simp, by + intro a z + change totalMap (fun i => 𝟙 (G.X i)) (laurentRepresentation (G.presentation P) a z) = + G.action a (totalMap (fun i => 𝟙 (G.X i)) z) + rw [totalMap_id] + exact congrArg (fun ρ : LaurentPolynomial R →+* AddMonoid.End (familyTotal G.X) => ρ a z) hρ⟩ + inv := ⟨fun i => 𝟙 (G.X i), by + intro i + change 𝟙 (G.X (i+1)) ≫ G.d i = G.d i ≫ 𝟙 (G.X i) + simp, by + intro a z + change totalMap (fun i => 𝟙 (G.X i)) (G.action a z) = + laurentRepresentation (G.presentation P) a (totalMap (fun i => 𝟙 (G.X i)) z) + rw [totalMap_id] + exact (congrArg (fun ρ : LaurentPolynomial R →+* AddMonoid.End (familyTotal G.X) => ρ a z) hρ).symm⟩ + hom_inv_id := by apply ActionModule.Hom.ext; funext i; exact Category.id_comp _ + inv_hom_id := by apply ActionModule.Hom.ext; funext i; exact Category.id_comp _ + +lemma actionFunctor_essSurj (hD : 0 < D) : (actionFunctor (R:=R) (D:=D)).EssSurj where + mem_essImage G := by + obtain ⟨P, hp⟩ := action_reconstructs hD G + exact ⟨G.presentation P, ⟨presentationActionIso G P hp⟩⟩ + +theorem actual_action_equivalence (hD : 0 < D) : + ∃ E : Module R D ≌ ActionModule R D, + (∀ M, (E.functor.obj M).X = M.X ∧ HEq (E.functor.obj M).d M.d) ∧ + (∀ {M N : Module R D} (f : M ⟶ N) (i : ℤ), HEq ((E.functor.map f).f i) (f.f i)) := by + let : (actionFunctor (R:=R) (D:=D)).EssSurj := actionFunctor_essSurj hD + let : (actionFunctor (R:=R) (D:=D)).IsEquivalence := {} + refine ⟨(actionFunctor (R:=R) (D:=D)).asEquivalence, ?_, ?_⟩ + · intro M + exact ⟨rfl, HEq.rfl⟩ + · intro M N f i + exact HEq.rfl +end HahnWilson.LaurentDg + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/LaurentCriterion.lean b/lean/OAI/CategoryTheory/ThickClosure/LaurentCriterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..27e37ac121a18be563333358cfbbe7802fd8993e --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/LaurentCriterion.lean @@ -0,0 +1,76 @@ +import OAI.CategoryTheory.ThickClosure.LaurentModules +import OAI.CategoryTheory.ThickClosure.Criterion + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentCriterion +section ModuleCriterion +open CategoryTheory CategoryTheory.Limits +open HahnWilson.LaurentDg HahnWilson.PeriodicDerived HahnWilson.PeriodicDual +universe u w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +abbrev coefficient : LaurentDg.Module R D := LaurentDg.inflateObj (cell R D 0) +abbrev B : LaurentDg.Derived R D := (LaurentDg.localization R D).obj (coefficient R D) + +def coefficientIso : B R D ≅ (Q R D).obj (cell R D 0) := + (Q R D).mapIso (LaurentDg.counitApp (cell R D 0)) + +def dualHomologyMap {M N : LaurentDg.Derived R D} (f : M ⟶ N) (n : ℤ) : + (N ⟶ (B R D)⟦n⟧) → (M ⟶ (B R D)⟦n⟧) := fun a => f ≫ a + +end ModuleCriterion +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.LaurentDg HahnWilson.PrincipalModules +universe u v w c h +variable (S₀ : Type u) [Ring S₀] [IsDomain S₀] + [IsPrincipalIdealRing S₀] [IsPrincipalIdealRing S₀ᵐᵒᵖ] +variable (D : ℕ) (hD : 0 < D) (heven : Even D) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} S₀ᵐᵒᵖ) + (.down (ZMod D))).HasLocalization.{w}] +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] [IsIdempotentComplete C] + +include hD heven in + +theorem finite_tower_criterion + (T₀ U₀ : C) (Ψ : C ⥤ LaurentDg.Derived S₀ᵐᵒᵖ D) [Ψ.CommShift ℤ] + (hΨ : HahnWilson.FiniteTowerCriterion.ExactPerfect S₀ D C Ψ) + (eT : Ψ.obj T₀ ≅ B S₀ᵐᵒᵖ D) + (htor : ∀ n : ℤ, IsTorsionModule S₀ᵐᵒᵖ ((derivedHomology n).obj (Ψ.obj U₀))) + (hnonzero : ∃ n : ℤ, ¬ IsZero ((derivedHomology n).obj (Ψ.obj U₀))) + (htests : ∀ P, HahnWilson.FiniteTower.Thick C T₀ P → ∀ g : U₀ ⟶ P, + (∀ n : ℤ, (derivedHomology n).map (Ψ.map g) = 0) → + ∀ n : ℤ, dualHomologyMap S₀ᵐᵒᵖ D (Ψ.map g) n = 0) : + ¬ HahnWilson.FiniteTower.Thick C T₀ U₀ := by + let := HasDerivedCategory.standard (ModuleCat.{u} S₀ᵐᵒᵖ) + apply HahnWilson.FiniteTowerCriterion.finite_tower_criterion S₀ D hD heven C + T₀ U₀ Ψ hΨ (eT ≪≫ coefficientIso S₀ᵐᵒᵖ D) + · intro i + obtain ⟨n, rfl⟩ := ZMod.intCast_surjective i + exact htor n + · obtain ⟨n, hn⟩ := hnonzero + exact ⟨(n : ZMod D), hn⟩ + · intro P hP g hg + apply (HahnWilson.PeriodicDual.dualGhost_iff S₀ᵐᵒᵖ D (Ψ.map g)).mpr + intro n a + let e := (shiftFunctor (LaurentDg.Derived S₀ᵐᵒᵖ D) n).mapIso + (coefficientIso S₀ᵐᵒᵖ D) + have ht := htests P hP g (fun m => hg (m : ZMod D)) n + have ha := congrFun ht (a ≫ e.inv) + change Ψ.map g ≫ (a ≫ e.inv) = 0 at ha + apply (cancel_mono e.inv).mp + simpa only [Category.assoc, CategoryTheory.Limits.zero_comp] using ha + +end HahnWilson.LaurentCriterion + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/LaurentModules.lean b/lean/OAI/CategoryTheory/ThickClosure/LaurentModules.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b26555bec585429e0504e64bcd6ca5f8a03fdf6 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/LaurentModules.lean @@ -0,0 +1,309 @@ +import OAI.CategoryTheory.ThickClosure.PeriodicDerived + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentDg +universe u w +variable (R : Type u) [Ring R] (D : ℕ) + +structure Module where + X : ℤ → ModuleCat.{u} R + d : ∀ n : ℤ, X (n + 1) ⟶ X n + dd : ∀ n, d (n + 1) ≫ d n = 0 + power : ∀ i j : ℤ, (i : ZMod D) = (j : ZMod D) → (X i ≅ X j) + power_refl : ∀ i, power i i rfl = Iso.refl _ + power_trans : ∀ (i j k : ℤ) (h : (i : ZMod D) = (j : ZMod D)) + (h' : (j : ZMod D) = (k : ZMod D)), + power i j h ≪≫ power j k h' = power i k (h.trans h') + power_d : ∀ (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)), + (power (i + 1) (j + 1) (by simpa only [Int.cast_add, Int.cast_one] using (congrArg (fun x : ZMod D => x + 1) h))).hom ≫ d j = + d i ≫ (power i j h).hom + +namespace Module +variable {R D} +@[ext] structure Hom (M N : Module R D) where + f : ∀ i, M.X i ⟶ N.X i + comm_d : ∀ i, f (i + 1) ≫ N.d i = M.d i ≫ f i + comm_power : ∀ (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)), + f i ≫ (N.power i j h).hom = (M.power i j h).hom ≫ f j + +instance : Category (Module R D) where + Hom M N := Hom M N + id M := ⟨fun i => 𝟙 _, by intros; simp, by intros; simp⟩ + comp f g := ⟨fun i => f.f i ≫ g.f i, + by intro i; rw [Category.assoc, g.comm_d, ← Category.assoc, f.comm_d, Category.assoc], + by intro i j h; rw [Category.assoc, g.comm_power, ← Category.assoc, f.comm_power, Category.assoc]⟩ + id_comp f := by apply Hom.ext; funext i; exact Category.id_comp _ + comp_id f := by apply Hom.ext; funext i; exact Category.comp_id _ + assoc f g h := by apply Hom.ext; funext i; exact Category.assoc _ _ _ + +@[simp] lemma id_f (M : Module R D) (i : ℤ) : (𝟙 M : M ⟶ M).f i = 𝟙 _ := rfl +@[simp] lemma comp_f {M N P : Module R D} (f : M ⟶ N) (g : N ⟶ P) (i : ℤ) : + (f ≫ g).f i = f.f i ≫ g.f i := rfl +@[simp] lemma power_hom_refl (M : Module R D) (i : ℤ) : + (M.power i i rfl).hom = 𝟙 _ := by rw [M.power_refl]; rfl +@[simp, reassoc] lemma power_hom_trans (M : Module R D) (i j k : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) (h' : (j : ZMod D) = (k : ZMod D)) : + (M.power i j h).hom ≫ (M.power j k h').hom = (M.power i k (h.trans h')).hom := + congrArg Iso.hom (M.power_trans i j k h h') +end Module + +variable {R D} + +def rep (i : ZMod D) : ℤ := Classical.choose (ZMod.intCast_surjective i) +@[simp] lemma rep_cast (i : ZMod D) : ((rep i : ℤ) : ZMod D) = i := + Classical.choose_spec (ZMod.intCast_surjective i) + +lemma rep_next (i : ZMod D) : + ((rep (i + 1) : ℤ) : ZMod D) = ((rep i + 1 : ℤ) : ZMod D) := by simp + +def reduceD (M : Module R D) (i : ZMod D) : + M.X (rep (i+1)) ⟶ M.X (rep i) := + (M.power (rep (i+1)) (rep i+1) (rep_next i)).hom ≫ M.d (rep i) + +lemma reduceD_sq (M : Module R D) (i : ZMod D) : + reduceD M (i+1) ≫ reduceD M i = 0 := by + dsimp [reduceD] + rw [Category.assoc, ← Category.assoc (M.d (rep (i+1))), + ← M.power_d _ _ (rep_next i)] + simp only [Category.assoc, M.dd, CategoryTheory.Limits.comp_zero] + +abbrev reduceObj (M : Module R D) : ChainComplex (ModuleCat.{u} R) (ZMod D) := + ChainComplex.of (fun i => M.X (rep i)) (reduceD M) (reduceD_sq M) + +lemma reduceObj_d (M : Module R D) (i : ZMod D) : + (reduceObj M).d (i+1) i = reduceD M i := by + exact ChainComplex.of_d (fun i => M.X (rep i)) (reduceD M) i + +lemma reduceObj_d_eq (M : Module R D) (i j : ZMod D) (h : i = j+1) : + (reduceObj M).d i j = + (M.power (rep i) (rep j+1) (by simp [h])).hom ≫ M.d (rep j) := by + subst i + exact ChainComplex.of_d (fun i => M.X (rep i)) (reduceD M) j + +def reduce : Module R D ⥤ ChainComplex (ModuleCat.{u} R) (ZMod D) where + obj := reduceObj + map f := ChainComplex.ofHom (fun i => f.f (rep i)) (by + intro i + rw [reduceObj_d, reduceObj_d] + dsimp [reduceD] + rw [← Category.assoc, f.comm_power, Category.assoc, f.comm_d] + exact (Category.assoc _ _ _).symm) + map_id M := by ext i; rfl + map_comp f g := by ext i; rfl + +def inflateObj (P : ChainComplex (ModuleCat.{u} R) (ZMod D)) : Module R D where + X n := P.X (n : ZMod D) + d n := P.d ((n+1 : ℤ) : ZMod D) (n : ZMod D) + dd n := P.d_comp_d _ _ _ + power i j h := P.XIsoOfEq h + power_refl i := rfl + power_trans i j k h h' := by + apply Iso.ext + exact P.XIsoOfEq_hom_comp_XIsoOfEq_hom h h' + power_d i j h := by simp [HomologicalComplex.XIsoOfEq_hom_comp_d, + HomologicalComplex.d_comp_XIsoOfEq_hom] + +def inflate : ChainComplex (ModuleCat.{u} R) (ZMod D) ⥤ Module R D where + obj := inflateObj + map f := ⟨fun i => f.f (i : ZMod D), + by intro n; exact f.comm _ _, + by intro i j h; exact HomologicalComplex.XIsoOfEq_hom_naturality f h⟩ + map_id M := by apply Module.Hom.ext; rfl + map_comp f g := by apply Module.Hom.ext; rfl + +namespace Module +@[simp] lemma power_hom_eqToHom (M : Module R D) {i j : ℤ} (h : i = j) : + (M.power i j (congrArg (fun n : ℤ => (n : ZMod D)) h)).hom = + eqToHom (congrArg M.X h) := by subst j; simp + +def isoMk {M N : Module R D} (e : ∀ i, M.X i ≅ N.X i) + (hd : ∀ i, (e (i+1)).hom ≫ N.d i = M.d i ≫ (e i).hom) + (hp : ∀ (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)), + (e i).hom ≫ (N.power i j h).hom = (M.power i j h).hom ≫ (e j).hom) : M ≅ N where + hom := ⟨fun i => (e i).hom, hd, hp⟩ + inv := ⟨fun i => (e i).inv, by + intro i + apply (cancel_epi (e (i+1)).hom).mp + rw [Iso.hom_inv_id_assoc, ← Category.assoc, hd, Category.assoc, + Iso.hom_inv_id, Category.comp_id], by + intro i j h + apply (cancel_epi (e i).hom).mp + rw [Iso.hom_inv_id_assoc, ← Category.assoc, hp, Category.assoc, + Iso.hom_inv_id, Category.comp_id]⟩ + hom_inv_id := by apply Hom.ext; funext i; exact (e i).hom_inv_id + inv_hom_id := by apply Hom.ext; funext i; exact (e i).inv_hom_id +end Module + +noncomputable def counitApp (P : ChainComplex (ModuleCat.{u} R) (ZMod D)) : + reduceObj (inflateObj P) ≅ P := + HomologicalComplex.Hom.isoOfComponents (fun i => P.XIsoOfEq (rep_cast i)) (by + intro i j hij + have hij' : j + 1 = i := hij + subst i + rw [reduceObj_d] + simp only [reduceD, inflateObj, + HomologicalComplex.XIsoOfEq_hom_comp_d, + HomologicalComplex.d_comp_XIsoOfEq_hom]) + +noncomputable def counit : inflate (R:=R) (D:=D) ⋙ reduce ≅ 𝟭 _ := + NatIso.ofComponents counitApp (by + intro P Q f + apply HomologicalComplex.Hom.ext + funext i + exact HomologicalComplex.XIsoOfEq_hom_naturality f (rep_cast i)) + +noncomputable def unitApp (M : Module R D) : M ≅ inflateObj (reduceObj M) := + Module.isoMk (fun n => M.power n (rep (n : ZMod D)) (rep_cast _).symm) (by + intro n + change (M.power (n+1) (rep ((n+1 : ℤ) : ZMod D)) (rep_cast _).symm).hom ≫ + (reduceObj M).d ((n+1 : ℤ) : ZMod D) (n : ZMod D) = + M.d n ≫ (M.power n (rep (n : ZMod D)) (rep_cast _).symm).hom + rw [reduceObj_d_eq M _ _ (by push_cast; rfl)] + rw [← Category.assoc, Module.power_hom_trans] + exact M.power_d n (rep (n : ZMod D)) (rep_cast _).symm) (by + intro i j h + change _ ≫ ((reduceObj M).XIsoOfEq h).hom = _ + change _ ≫ eqToHom (congrArg M.X (congrArg rep h)) = _ + rw [← M.power_hom_eqToHom (congrArg rep h), Module.power_hom_trans] + exact (M.power_hom_trans i j (rep (j : ZMod D)) h (rep_cast _).symm).symm) + +noncomputable def unit : 𝟭 (Module R D) ≅ reduce ⋙ inflate := + NatIso.ofComponents unitApp (by + intro M N f + apply Module.Hom.ext + funext n + exact f.comm_power n (rep (n : ZMod D)) (rep_cast _).symm) + +noncomputable def equivalence : Module R D ≌ ChainComplex (ModuleCat.{u} R) (ZMod D) := + CategoryTheory.Equivalence.mk reduce inflate unit counit + +def forgetObj (M : Module R D) : ChainComplex (ModuleCat.{u} R) ℤ := + ChainComplex.of M.X M.d M.dd + +def forget : Module R D ⥤ ChainComplex (ModuleCat.{u} R) ℤ where + obj := forgetObj + map f := ChainComplex.ofHom f.f (by intro n; simpa only [forgetObj, ChainComplex.of_d] using f.comm_d n) + map_id M := by ext n; rfl + map_comp f g := by ext n; rfl + +abbrev unroll : ChainComplex (ModuleCat.{u} R) (ZMod D) ⥤ + ChainComplex (ModuleCat.{u} R) ℤ := inflate ⋙ forget + +def unrollScIso (n : ℤ) : unroll (R:=R) (D:=D) ⋙ + shortComplexFunctor' (ModuleCat.{u} R) (.down ℤ) (n+1) n (n-1) ≅ + shortComplexFunctor' (ModuleCat.{u} R) (.down (ZMod D)) + (((n+1 : ℤ) : ZMod D)) (n : ZMod D) (((n-1 : ℤ) : ZMod D)) := by + refine NatIso.ofComponents (fun P => ?_) ?_ + · refine ShortComplex.isoMk (Iso.refl _) (Iso.refl _) (Iso.refl _) ?_ ?_ + · simp [shortComplexFunctor', unroll, inflate, inflateObj, forget, forgetObj, ChainComplex.of.d] + · simp [shortComplexFunctor', unroll, inflate, inflateObj, forget, forgetObj, ChainComplex.of.d] + · intro P Q f + apply ShortComplex.hom_ext <;> + simp [unroll, inflate, inflateObj, forget, forgetObj, ShortComplex.isoMk, shortComplexFunctor'] + +def unrollHomologyIso (n : ℤ) : + unroll (R:=R) (D:=D) ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n ≅ + HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) (n : ZMod D) := + Functor.isoWhiskerLeft unroll + (homologyFunctorIso' (ModuleCat.{u} R) (.down ℤ) (n+1) n (n-1) (by simp) (by simp)) ≪≫ + (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (unrollScIso n) _ ≪≫ + (homologyFunctorIso' (ModuleCat.{u} R) (.down (ZMod D)) + (((n+1 : ℤ) : ZMod D)) (n : ZMod D) (((n-1 : ℤ) : ZMod D)) + (by simp) (by simp)).symm + +def homology (n : ℤ) : Module R D ⥤ ModuleCat.{u} R := + forget ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n + +def homologyIso (n : ℤ) : homology (R:=R) (D:=D) n ≅ + reduce ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) (n : ZMod D) := + (Functor.leftUnitor _).symm ≪≫ + Functor.isoWhiskerRight unit _ ≪≫ + Functor.associator _ _ _ ≪≫ + Functor.isoWhiskerLeft reduce ((Functor.associator _ _ _).symm ≪≫ unrollHomologyIso n) + +def quasiIso : MorphismProperty (Module R D) := fun _ _ f => + QuasiIso (forget.map f) + +lemma quasiIso_iff {M N : Module R D} (f : M ⟶ N) : + quasiIso f ↔ QuasiIso (reduce.map f) := by + change QuasiIso (forget.map f) ↔ _ + rw [_root_.quasiIso_iff, _root_.quasiIso_iff] + simp only [quasiIsoAt_iff_isIso_homologyMap] + have hh (n : ℤ) : IsIso (homologyMap (forget.map f) n) ↔ + IsIso (homologyMap (reduce.map f) (n : ZMod D)) := by + exact NatIso.isIso_map_iff (homologyIso n) f + refine ⟨fun h i => ?_, fun h n => (hh n).mpr (h (n : ZMod D))⟩ + obtain ⟨n, rfl⟩ := ZMod.intCast_surjective i + exact (hh n).mp (h n) + +section DerivedMaps +variable (R D) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +abbrev Derived := HomologicalComplexUpToQuasiIso (ModuleCat.{u} R) (.down (ZMod D)) + +abbrev localization : Module R D ⥤ Derived R D := + reduce ⋙ HomologicalComplexUpToQuasiIso.Q + +theorem localization_isLocalization : + (localization R D).IsLocalization (quasiIso (R:=R) (D:=D)) := by + let Q : ChainComplex (ModuleCat.{u} R) (ZMod D) ⥤ Derived R D := + HomologicalComplexUpToQuasiIso.Q + let W := HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D)) + apply Functor.IsLocalization.of_equivalence_source Q W (localization R D) + (quasiIso (R:=R) (D:=D)) equivalence.symm + · intro P P' f hf + apply MorphismProperty.le_isoClosure + change QuasiIso (forget.map (inflate.map f)) + rw [_root_.quasiIso_iff] + intro n + rw [quasiIsoAt_iff_isIso_homologyMap] + change IsIso ((unroll ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down ℤ) n).map f) + rw [NatIso.isIso_map_iff (unrollHomologyIso n)] + have : QuasiIso f := hf + exact inferInstanceAs (IsIso (homologyMap f (n : ZMod D))) + · intro M N f hf + have : QuasiIso (reduce.map f) := (quasiIso_iff f).mp hf + exact Localization.inverts Q W (reduce.map f) ((quasiIso_iff f).mp hf) + · exact (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight counit Q ≪≫ Functor.leftUnitor Q + +end DerivedMaps + +lemma exponent_exists_unique (hD : 0 < D) (i j : ℤ) : + (i : ZMod D) = (j : ZMod D) ↔ ∃! q : ℤ, j = i + (D : ℤ) * q := by + rw [ZMod.intCast_eq_intCast_iff_dvd_sub] + constructor + · rintro ⟨q, hq⟩ + refine ⟨q, by omega, ?_⟩ + intro q' hq' + have h : (D : ℤ) * q' = (D : ℤ) * q := by omega + exact mul_left_cancel₀ (by exact_mod_cast (Nat.ne_of_gt hD)) h + · rintro ⟨q, hq, _⟩ + exact ⟨q, by omega⟩ + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +abbrev derivedHomology (n : ℤ) : Derived R D ⥤ ModuleCat.{u} R := + HomologicalComplexUpToQuasiIso.homologyFunctor _ _ (n : ZMod D) + +def localizationHomologyIso (n : ℤ) : + localization R D ⋙ derivedHomology n ≅ homology (R:=R) (D:=D) n := + Functor.associator _ _ _ ≪≫ + Functor.isoWhiskerLeft reduce + (HomologicalComplexUpToQuasiIso.homologyFunctorFactors (ModuleCat.{u} R) + (.down (ZMod D)) (n : ZMod D)) ≪≫ + (homologyIso n).symm + +end HahnWilson.LaurentDg + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/LocalizationHom.lean b/lean/OAI/CategoryTheory/ThickClosure/LocalizationHom.lean new file mode 100644 index 0000000000000000000000000000000000000000..78f92eae3bed2dde24c68433784f3a2d722be0bc --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/LocalizationHom.lean @@ -0,0 +1,70 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LocalizationHom +open CategoryTheory +universe u v w v' + +theorem map_bijective_of_inverts (C : Type u) [Category.{v} C] + (E : Type w) [Category.{v'} E] (W : MorphismProperty C) + (L : C ⥤ E) [L.IsLocalization W] (X Y : C) + (h : W.IsInvertedBy (coyoneda.obj (Opposite.op X))) : + Function.Bijective (L.map : (X ⟶ Y) → (L.obj X ⟶ L.obj Y)) := by + let F := coyoneda.obj (Opposite.op X) ⋙ uliftFunctor.{v',v} + have hF : W.IsInvertedBy F := MorphismProperty.IsInvertedBy.of_comp W _ h _ + let F' := Localization.lift F hF L + let e : L ⋙ F' ≅ F := Localization.fac F hF L + let U := coyoneda.obj (Opposite.op (L.obj X)) ⋙ uliftFunctor.{v,v'} + let j : F ⟶ L ⋙ U := + { app := fun A => ↾fun f => ULift.up (L.map f.down) + naturality := by intro A B f; ext g; exact congrArg ULift.up (L.map_comp g.down f) } + let j' : F' ⟶ U := Localization.liftNatTrans L W F (L ⋙ U) F' U j + have hj (A : C) : j'.app (L.obj A) = e.hom.app A ≫ j.app A := by + dsimp only [j'] + rw [Localization.liftNatTrans_app] + rfl + let x : F'.obj (L.obj X) := e.inv.app X (ULift.up (𝟙 X)) + let invMap (f : L.obj X ⟶ L.obj Y) : X ⟶ Y := + (e.hom.app Y (F'.map f x)).down + have hex : e.hom.app X x = ULift.up (𝟙 X) := by + have he := ConcreteCategory.congr_hom (e.inv_hom_id_app X) + (show F.obj X from ULift.up (𝟙 X)) + exact he + have leftInv (f : X ⟶ Y) : invMap (L.map f) = f := by + have he := ConcreteCategory.congr_hom (e.hom.naturality f) x + change e.hom.app Y (F'.map (L.map f) x) = + ULift.up ((e.hom.app X x).down ≫ f) at he + rw [hex, Category.id_comp] at he + exact congrArg ULift.down he + have hx : j'.app (L.obj X) x = ULift.up (𝟙 (L.obj X)) := by + rw [hj] + change ULift.up (L.map (e.hom.app X x).down) = _ + rw [hex, L.map_id] + have rightInv (f : L.obj X ⟶ L.obj Y) : L.map (invMap f) = f := by + have hnat := ConcreteCategory.congr_hom (j'.naturality f) x + change j'.app (L.obj Y) (F'.map f x) = + ULift.up ((j'.app (L.obj X) x).down ≫ f) at hnat + rw [hx, hj] at hnat + change ULift.up (L.map ((e.hom.app Y (F'.map f x)).down)) = + ULift.up (𝟙 (L.obj X) ≫ f) at hnat + simpa only [Category.id_comp] using congrArg ULift.down hnat + exact ⟨Function.LeftInverse.injective leftInv, Function.RightInverse.surjective rightInv⟩ + +theorem map_bijective (C : Type u) [Category.{v} C] + (E : Type w) [Category.{v} E] (W : MorphismProperty C) + (L : C ⥤ E) [L.IsLocalization W] (X Y : C) + (h : W.IsInvertedBy (coyoneda.obj (Opposite.op X))) : + Function.Bijective (L.map : (X ⟶ Y) → (L.obj X ⟶ L.obj Y)) := + map_bijective_of_inverts C E W L X Y h + +end HahnWilson.LocalizationHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/Main.lean b/lean/OAI/CategoryTheory/ThickClosure/Main.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3bf43fcd31bf132c5e0694f2dcd5415c050cd48 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/Main.lean @@ -0,0 +1,30 @@ +import OAI.CategoryTheory.ThickClosure.PrincipalModules +import OAI.CategoryTheory.ThickClosure.PeriodicSplitting +import OAI.CategoryTheory.ThickClosure.PeriodicDerived +import OAI.CategoryTheory.ThickClosure.PeriodicHom +import OAI.CategoryTheory.ThickClosure.LocalizationHom +import OAI.CategoryTheory.ThickClosure.DerivedHom +import OAI.CategoryTheory.ThickClosure.CyclicStructure +import OAI.CategoryTheory.ThickClosure.Unroll +import OAI.CategoryTheory.ThickClosure.CyclicShift +import OAI.CategoryTheory.ThickClosure.UnrollDerived +import OAI.CategoryTheory.ThickClosure.CyclicTriangle +import OAI.CategoryTheory.ThickClosure.PeriodicDual +import OAI.CategoryTheory.ThickClosure.GradedSplit +import OAI.CategoryTheory.ThickClosure.HomologyBridge +import OAI.CategoryTheory.ThickClosure.FiniteTower +import OAI.CategoryTheory.ThickClosure.FreeHomology +import OAI.CategoryTheory.ThickClosure.BackwardStep +import OAI.CategoryTheory.ThickClosure.PeriodicBackward +import OAI.CategoryTheory.ThickClosure.Criterion +import OAI.CategoryTheory.ThickClosure.LaurentModules +import OAI.CategoryTheory.ThickClosure.LaurentCriterion +import OAI.CategoryTheory.ThickClosure.PerfectModules +import OAI.CategoryTheory.ThickClosure.SourceCriterion +import OAI.CategoryTheory.ThickClosure.LaurentAction +import OAI.CategoryTheory.ThickClosure.ActionDerived +import OAI.CategoryTheory.ThickClosure.Coefficients +import OAI.LinearAlgebra.RankMatching.Basic +import OAI.Topology.HahnSeries.Pivots +import OAI.RingTheory.Interpolation.Bounds +import OAI.CategoryTheory.ThickClosure.FiniteProducts diff --git a/lean/OAI/CategoryTheory/ThickClosure/PerfectModules.lean b/lean/OAI/CategoryTheory/ThickClosure/PerfectModules.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a5a1bf3130d75b836975ed7b0672e2891255964 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PerfectModules.lean @@ -0,0 +1,163 @@ +import OAI.CategoryTheory.ThickClosure.LaurentCriterion + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.LaurentDg +open CategoryTheory CategoryTheory.Limits +universe u +variable {R : Type u} [Ring R] {D : ℕ} + +abbrev total (M : Module R D) := DirectSum ℤ (fun n => M.X n) +abbrev inc (M : Module R D) (n : ℤ) : M.X n →ₗ[R] total M := + DirectSum.lof R ℤ (fun n => M.X n) n + +lemma power_cast (i q : ℤ) : (i : ZMod D) = ((i + (D : ℤ)*q : ℤ) : ZMod D) := by simp + +def move (M : Module R D) (i j : ℤ) (h : (i : ZMod D) = (j : ZMod D)) : + M.X i →ₗ[R] total M := (inc M j).comp (M.power i j h).hom.hom + +lemma move_congr (M : Module R D) (i j k : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) (h' : (i : ZMod D) = (k : ZMod D)) + (e : j = k) : move M i j h = move M i k h' := by + subst k + rfl + +def shiftPower (M : Module R D) (q : ℤ) : total M →ₗ[R] total M := + DirectSum.toModule R ℤ (total M) (fun i => move M i (i+(D:ℤ)*q) (power_cast i q)) + +@[simp] lemma shiftPower_inc (M : Module R D) (q i : ℤ) (x : M.X i) : + shiftPower M q (inc M i x) = move M i (i+(D:ℤ)*q) (power_cast i q) x := + DirectSum.toModule_lof _ _ _ + +lemma shiftPower_move (M : Module R D) (q i j : ℤ) + (h : (i : ZMod D) = (j : ZMod D)) (x : M.X i) : + shiftPower M q (move M i j h x) = + move M i (j+(D:ℤ)*q) (h.trans (power_cast j q)) x := by + simp only [move, LinearMap.comp_apply, shiftPower_inc] + change inc M _ (((M.power i j h).hom ≫ + (M.power j (j+(D:ℤ)*q) (power_cast j q)).hom) x) = _ + rw [M.power_hom_trans] + +@[simp] lemma move_self (M : Module R D) (i : ℤ) (x : M.X i) : + move M i i rfl x = inc M i x := by simp [move] + +lemma shiftPower_zero (M : Module R D) : shiftPower M 0 = LinearMap.id := by + apply DirectSum.linearMap_ext + intro i + ext x + simp + +lemma shiftPower_add (M : Module R D) (q r : ℤ) : + shiftPower M (q+r) = (shiftPower M q).comp (shiftPower M r) := by + apply DirectSum.linearMap_ext + intro i + ext x + simp only [LinearMap.comp_apply, shiftPower_inc, shiftPower_move] + have h : i+(D:ℤ)*(q+r) = i+(D:ℤ)*r+(D:ℤ)*q := by ring + simp only [h] + +def powerRepresentation (M : Module R D) : Multiplicative ℤ →* AddMonoid.End (total M) where + toFun q := (shiftPower M q.toAdd).toAddMonoidHom + map_one' := by change (shiftPower M 0).toAddMonoidHom = AddMonoidHom.id _; rw [shiftPower_zero]; rfl + map_mul' q r := by + change (shiftPower M (q.toAdd+r.toAdd)).toAddMonoidHom = _ + rw [shiftPower_add] + rfl + +def laurentRepresentation (M : Module R D) : LaurentPolynomial R →+* AddMonoid.End (total M) := + AddMonoidAlgebra.liftNCRingHom (Module.toAddMonoidEnd R (total M)) + (powerRepresentation M) (by + intro r q + apply AddMonoidHom.ext + intro x + exact ((shiftPower M q.toAdd).map_smul r x).symm) + +lemma laurentRepresentation_single (M : Module R D) (q i : ℤ) (r : R) (x : M.X i) : + laurentRepresentation M (AddMonoidAlgebra.single q r) (inc M i x) = + inc M (i+(D:ℤ)*q) (r • (M.power i _ (power_cast i q)).hom x) := by + unfold laurentRepresentation + erw [AddMonoidAlgebra.liftNCRingHom_single] + change r • shiftPower M q (inc M i x) = _ + simp [shiftPower_inc, move] + +def totalDifferential (M : Module R D) : total M →ₗ[R] total M := + DirectSum.toModule R ℤ (total M) (fun i => + (inc M (i-1)).comp ((ChainComplex.of M.X M.d M.dd).d i (i-1)).hom) + +lemma totalDifferential_inc (M : Module R D) (i : ℤ) (x : M.X i) : + totalDifferential M (inc M i x) = + inc M (i-1) ((ChainComplex.of M.X M.d M.dd).d i (i-1) x) := + DirectSum.toModule_lof _ _ _ + +lemma totalDifferential_inc_succ (M : Module R D) (i : ℤ) (x : M.X (i+1)) : + totalDifferential M (inc M (i+1) x) = inc M i (M.d i x) := by + rw [totalDifferential_inc] + erw [show i+1-1=i by omega] + have hd : (ChainComplex.of M.X M.d M.dd).d (i+1) i = M.d i := + ChainComplex.of_d M.X M.d i + rw [hd] + +lemma totalDifferential_sq (M : Module R D) : + (totalDifferential M).comp (totalDifferential M) = 0 := by + apply DirectSum.linearMap_ext + intro i + ext x : 1 + simp only [LinearMap.comp_apply, totalDifferential_inc] + change inc M (i-1-1) (((ChainComplex.of M.X M.d M.dd).d i (i-1) ≫ + (ChainComplex.of M.X M.d M.dd).d (i-1) (i-1-1)) x) = 0 + rw [HomologicalComplex.d_comp_d] + exact map_zero _ + +lemma totalDifferential_shiftPower (M : Module R D) (q : ℤ) : + (totalDifferential M).comp (shiftPower M q) = + (shiftPower M q).comp (totalDifferential M) := by + apply DirectSum.linearMap_ext + intro n + obtain ⟨i, rfl⟩ : ∃ i : ℤ, n = i+1 := ⟨n-1, by omega⟩ + ext x : 1 + simp only [LinearMap.comp_apply, shiftPower_inc, totalDifferential_inc_succ] + have h : i+1+(D:ℤ)*q = i+(D:ℤ)*q+1 := by omega + rw [move_congr M (i+1) _ (i+(D:ℤ)*q+1) _ (by simp) h] + simp only [move, LinearMap.comp_apply, totalDifferential_inc_succ] + change inc M _ (((M.power (i+1) (i+(D:ℤ)*q+1) _).hom ≫ + M.d (i+(D:ℤ)*q)) x) = _ + rw [M.power_d i (i+(D:ℤ)*q) (power_cast i q)] + rfl + +lemma laurentRepresentation_commute (M : Module R D) (a : LaurentPolynomial R) : + Commute (laurentRepresentation M a) (totalDifferential M).toAddMonoidHom := by + induction a using AddMonoidAlgebra.induction_linear with + | zero => rw [map_zero]; exact Commute.zero_left _ + | add a b ha hb => simpa only [map_add] using ha.add_left hb + | single q r => + unfold laurentRepresentation + erw [AddMonoidAlgebra.liftNCRingHom_single] + apply Commute.mul_left + · apply AddMonoidHom.ext + intro x + exact ((totalDifferential M).map_smul r x).symm + · exact congrArg LinearMap.toAddMonoidHom (totalDifferential_shiftPower M q).symm + +theorem actual_laurent_action (M : Module R D) (_hD : 0 < D) (_heven : Even D) : + ∃ (ρ : LaurentPolynomial R →+* AddMonoid.End (total M)) + (δ : AddMonoid.End (total M)), + (∀ (q i : ℤ) (r : R) (x : M.X i), + ρ (AddMonoidAlgebra.single q r) (inc M i x) = + inc M (i + (D : ℤ)*q) (r • (M.power i _ (power_cast i q)).hom x)) ∧ + (∀ (i : ℤ) (x : M.X (i+1)), δ (inc M (i+1) x) = inc M i (M.d i x)) ∧ + δ * δ = 0 ∧ ∀ a, Commute (ρ a) δ := by + refine ⟨laurentRepresentation M, (totalDifferential M).toAddMonoidHom, + laurentRepresentation_single M, totalDifferential_inc_succ M, ?_, + laurentRepresentation_commute M⟩ + exact congrArg LinearMap.toAddMonoidHom (totalDifferential_sq M) + +end HahnWilson.LaurentDg + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PeriodicBackward.lean b/lean/OAI/CategoryTheory/ThickClosure/PeriodicBackward.lean new file mode 100644 index 0000000000000000000000000000000000000000..a5a5196adc134ccfb5a07d7708a57b5cfab0eed1 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PeriodicBackward.lean @@ -0,0 +1,92 @@ +import OAI.CategoryTheory.ThickClosure.FreeHomology +import OAI.CategoryTheory.ThickClosure.BackwardStep +import OAI.CategoryTheory.ThickClosure.PeriodicDual + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicBackward +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.PrincipalModules HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +open HahnWilson.PeriodicDual HahnWilson.Unroll HahnWilson.GradedSplit +universe u v w +variable (R : Type u) [Ring R] [IsDomain R] + [IsPrincipalIdealRing R] [IsPrincipalIdealRing Rᵐᵒᵖ] + (D : ℕ) (hD : 0 < D) (heven : Even D) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +include hD heven in + +theorem step (T : Triangle (PeriodicDerived R D)) + (hT : T ∈ HahnWilson.CyclicTriangle.distinguished R D) + (hP : IsPerfect R D T.obj₃) + {Y : PeriodicDerived R D} (g : Y ⟶ T.obj₂) + (hY : ∀ i, IsTorsionModule R ((homology R D i).obj Y)) + (hF : ∀ n : ℤ, Module.Free R + ((DerivedCategory.homologyFunctor (ModuleCat.{u} R) n).obj + ((derivedFunctor R D).obj T.obj₁))) + (hg : ∀ i, (homology R D i).map (g ≫ T.mor₂) = 0) + (hd : DualGhost R D (g ≫ T.mor₂)) : + ∀ i, (homology R D i).map g = 0 := by + let : NeZero D := ⟨Nat.ne_of_gt hD⟩ + obtain ⟨V,L,hV,hL,_,⟨eP⟩⟩ := perfect_splitting (R := R) (D := D) hD heven T.obj₃ hP + let A := derivedFunctor R D + let e := A.mapIso eP ≪≫ (derivedFactors R D).app (dgProd R D V L) + let l : (F₀ R D).obj (dg R D L) ⟶ A.obj T.obj₃ := + (F₀ R D).map (iL R D V L) ≫ e.inv + let v : A.obj T.obj₃ ⟶ (F₀ R D).obj (dg R D V) := + e.hom ≫ (F₀ R D).map (pV R D V L) + let r : A.obj T.obj₃ ⟶ (F₀ R D).obj (dg R D L) := + e.hom ≫ (F₀ R D).map (pL R D V L) + have hsplit : Triangle.mk l v 0 ∈ distTriang (DerivedCategory (ModuleCat.{u} R)) := by + apply isomorphic_distinguished _ (splitTriangle R D V L) + refine Triangle.isoMk _ _ (Iso.refl _) e (Iso.refl _) ?_ ?_ ?_ + · change l ≫ e.hom = 𝟙 _ ≫ (F₀ R D).map (iL R D V L) + simp [l] + · change v ≫ 𝟙 _ = e.hom ≫ (F₀ R D).map (pV R D V L) + simp [v] + · change (0 : (F₀ R D).obj (dg R D V) ⟶ ((F₀ R D).obj (dg R D L))⟦(1:ℤ)⟧) ≫ + (shiftFunctor (DerivedCategory (ModuleCat.{u} R)) (1:ℤ)).map (𝟙 ((F₀ R D).obj (dg R D L))) = + 𝟙 _ ≫ 0 + simp + have hlr : l ≫ r = 𝟙 _ := by + simp only [l, r, Category.assoc, e.inv_hom_id_assoc, ← Functor.map_comp, iL_pL] + exact (F₀ R D).map_id _ + have hfzero : (g ≫ T.mor₂) ≫ (eP.hom ≫ (Q R D).map (pV R D V L)) = 0 := + dualGhost_free_zero R D V hV _ (DualGhost.comp_right R D hd _) + have hnat := (derivedFactors R D).hom.naturality (pV R D V L) + change A.map ((Q R D).map (pV R D V L)) ≫ (derivedFactors R D).hom.app (dg R D V) = + (derivedFactors R D).hom.app (dgProd R D V L) ≫ (F₀ R D).map (pV R D V L) at hnat + have hgv : A.map g ≫ A.map T.mor₂ ≫ v = 0 := by + calc + _ = A.map ((g ≫ T.mor₂) ≫ (eP.hom ≫ (Q R D).map (pV R D V L))) ≫ + (derivedFactors R D).hom.app (dg R D V) := by + simp only [v, e, Iso.trans_hom, Functor.mapIso_hom, Functor.map_comp, + Category.assoc, hnat] + rfl + _ = 0 := by rw [hfzero, A.map_zero, CategoryTheory.Limits.zero_comp] + apply (HahnWilson.HomologyBridge.all_zero_iff R D g).mp + intro n + let H := DerivedCategory.homologyFunctor (ModuleCat.{u} R) n + let := hF n + exact HahnWilson.BackwardStep.homology_backward_step H + (A.map T.mor₁) (A.map T.mor₂) + (A.map T.mor₃ ≫ (A.commShiftIso (1:ℤ)).hom.app T.obj₁) + (HahnWilson.CyclicTriangle.map_distinguished R D T hT) + l v 0 hsplit r hlr + (HahnWilson.HomologyBridge.torsion R D Y hY n) + (HahnWilson.HomologyBridge.torsion_shift_diagonal R D L hL (-1) n) + (A.map g) (by + simpa only [Functor.map_comp] using + (HahnWilson.HomologyBridge.zero_iff R D (g ≫ T.mor₂) n).mpr (hg _)) hgv + +end HahnWilson.PeriodicBackward + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PeriodicDerived.lean b/lean/OAI/CategoryTheory/ThickClosure/PeriodicDerived.lean new file mode 100644 index 0000000000000000000000000000000000000000..124beb3201ec44c1217e485aaa4fa618d45f6412 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PeriodicDerived.lean @@ -0,0 +1,252 @@ +import OAI.CategoryTheory.ThickClosure.PeriodicSplitting + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicDerived +section Localization +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PrincipalModules HahnWilson.PeriodicSplitting +universe u w +variable (R : Type u) [Ring R] (D : ℕ) + +abbrev PeriodicComplex := ChainComplex (ModuleCat.{u} R) (ZMod D) + +def GradedFiniteFree (P : PeriodicComplex R D) : Prop := + (∀ i j, P.d i j = 0) ∧ ∀ i, Module.Free R (P.X i) ∧ Module.Finite R (P.X i) + +inductive FiniteCell : PeriodicComplex R D → Prop + | free {P} (h : GradedFiniteFree R D P) : FiniteCell P + | cone {P Q} (f : P ⟶ Q) (hP : FiniteCell P) (hQ : FiniteCell Q) : + FiniteCell (homotopyCofiber f) + | iso {P Q} (e : P ≅ Q) (hP : FiniteCell P) : FiniteCell Q + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (ComplexShape.down (ZMod D))).HasLocalization.{w}] + +abbrev _root_.OAI.HahnWilson.PeriodicDerived := + HomologicalComplexUpToQuasiIso (ModuleCat.{u} R) (ComplexShape.down (ZMod D)) + +abbrev Q : PeriodicComplex R D ⥤ PeriodicDerived R D := + HomologicalComplexUpToQuasiIso.Q + +abbrev homology (i : ZMod D) : PeriodicDerived R D ⥤ ModuleCat.{u} R := + HomologicalComplexUpToQuasiIso.homologyFunctor _ _ i + +def IsPerfect (P : PeriodicDerived R D) : Prop := + ∃ C : PeriodicComplex R D, FiniteCell R D C ∧ + Nonempty (Retract P ((Q R D).obj C)) + +end Localization + +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PrincipalModules HahnWilson.PeriodicSplitting +universe u w +variable {R : Type u} [Ring R] {D : ℕ} + +lemma finiteCell_terms {P : PeriodicComplex R D} (hP : FiniteCell R D P) : + ∀ i, Module.Free R (P.X i) ∧ Module.Finite R (P.X i) := by + induction hP with + | free h => exact h.2 + | @cone P Q f hP hQ ihP ihQ => + intro i + let := (ihP (i - 1)).1 + let := (ihP (i - 1)).2 + let := (ihQ i).1 + let := (ihQ i).2 + let e := (homotopyCofiber.XIsoBiprod f i (i - 1) + (sub_add_cancel i 1)).toLinearEquiv.trans + (ModuleCat.biprodIsoProd (P.X (i - 1)) (Q.X i)).toLinearEquiv + exact ⟨Module.Free.of_equiv e.symm, Module.Finite.equiv e.symm⟩ + | @iso P Q e hP ih => + intro i + let := (ih i).1 + let := (ih i).2 + let el : (P.X i) ≃ₗ[R] (Q.X i) := + ((HomologicalComplex.eval _ _ i).mapIso e).toLinearEquiv + exact ⟨Module.Free.of_equiv el, Module.Finite.equiv el⟩ + +lemma down_prev (i : ZMod D) : (ComplexShape.down (ZMod D)).Rel i (i - 1) := + sub_add_cancel i 1 + +lemma cofiber_XIso_hom_snd {P Q : PeriodicComplex R D} (f : P ⟶ Q) + (i j : ZMod D) (hij : (ComplexShape.down (ZMod D)).Rel i j) : + (homotopyCofiber.XIsoBiprod f i j hij).hom ≫ biprod.snd = + homotopyCofiber.sndX f i := by + obtain rfl := (ComplexShape.down (ZMod D)).next_eq' hij + simp only [homotopyCofiber.sndX, dite_eq_left hij] + +section ResolutionCell +variable (F G : ZMod D → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) + +def diagonalFamilyMap : diagonalComplex G ⟶ diagonalComplex F where + f := r + comm' i j hij := by + change r i ≫ (diagonalComplex F).d i j = (diagonalComplex G).d i j ≫ r j + rw [diagonalComplex_d, diagonalComplex_d] + simp + +def resolutionConeIso : homotopyCofiber (diagonalFamilyMap F G r) ≅ + resolutionComplex F G r := by + classical + let φ := diagonalFamilyMap F G r + let e (i : ZMod D) : (homotopyCofiber φ).X i ≅ (resolutionComplex F G r).X i := + homotopyCofiber.XIsoBiprod φ i (i - 1) (down_prev i) ≪≫ + biprod.braiding (G (i - 1)) (F i) + have efst (i : ZMod D) : (e i).hom ≫ biprod.fst = homotopyCofiber.sndX φ i := by + dsimp [e] + rw [Category.assoc, biprod.braiding_hom, biprod.lift_fst] + exact cofiber_XIso_hom_snd φ i (i - 1) (down_prev i) + have esnd (i : ZMod D) : (e i).hom ≫ biprod.snd = + homotopyCofiber.fstX φ i (i - 1) (down_prev i) := by + dsimp [e, homotopyCofiber.fstX] + simp only [Category.assoc, biprod.braiding_hom, biprod.lift_snd] + refine Hom.isoOfComponents e ?_ + intro i j hij + have hji : j = i - 1 := eq_sub_iff_add_eq.mpr hij + subst j + rw [resolutionComplex_d_prev] + apply biprod.hom_ext + · simp only [Category.assoc, biprod.inl_fst, Category.comp_id] + rw [← Category.assoc, esnd, efst] + change _ = homotopyCofiber.d φ i (i - 1) ≫ homotopyCofiber.sndX φ (i - 1) + rw [homotopyCofiber.d_sndX φ i (i - 1) (down_prev i)] + have hz : (diagonalComplex F).d i (i - 1) = 0 := diagonalComplex_d F _ _ + change _ = _ + _ ≫ (diagonalComplex F).d i (i - 1) + rw [hz, CategoryTheory.Limits.comp_zero, add_zero] + rfl + · simp only [Category.assoc, biprod.inl_snd, CategoryTheory.Limits.comp_zero] + change 0 = homotopyCofiber.d φ i (i - 1) ≫ (e (i - 1)).hom ≫ biprod.snd + rw [esnd, homotopyCofiber.d_fstX φ i (i - 1) (i - 1 - 1) + (down_prev i) (down_prev (i - 1))] + have hz : (diagonalComplex G).d (i - 1) (i - 1 - 1) = 0 := diagonalComplex_d G _ _ + change 0 = -(_ ≫ (diagonalComplex G).d (i - 1) (i - 1 - 1)) + rw [hz, CategoryTheory.Limits.comp_zero, neg_zero] + +lemma resolution_finiteCell (hF : ∀ i, Module.Free R (F i) ∧ Module.Finite R (F i)) + (hG : ∀ i, Module.Free R (G i) ∧ Module.Finite R (G i)) : + FiniteCell R D (resolutionComplex F G r) := by + apply FiniteCell.iso (resolutionConeIso F G r) + apply FiniteCell.cone + · exact FiniteCell.free ⟨diagonalComplex_d G,hG⟩ + · exact FiniteCell.free ⟨diagonalComplex_d F,hF⟩ + +end ResolutionCell + +variable [IsDomain R] [IsPrincipalIdealRing R] + [IsPrincipalIdealRing Rᵐᵒᵖ] + +omit [IsDomain R] [IsPrincipalIdealRing Rᵐᵒᵖ] in +lemma finite_homology_of_finite_terms (P : PeriodicComplex R D) + (h : ∀ i, Module.Finite R (P.X i)) (i : ZMod D) : + Module.Finite R (P.homology i) := by + let := h i + let : Module.Finite R (P.cycles i) := + Module.Finite.of_injective (P.iCycles i).hom + ((ModuleCat.mono_iff_injective _).mp inferInstance) + exact Module.Finite.of_surjective (P.homologyπ i).hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (ComplexShape.down (ZMod D))).HasLocalization.{w}] + +omit [IsDomain R] [IsPrincipalIdealRing Rᵐᵒᵖ] in +theorem perfect_homology_finite (P : PeriodicDerived R D) (hP : IsPerfect R D P) : + ∀ i, Module.Finite R ((homology R D i).obj P) := by + obtain ⟨C,hC,⟨ret⟩⟩ := hP + intro i + let := finite_homology_of_finite_terms C (fun i => (finiteCell_terms hC i).2) i + let e := (HomologicalComplexUpToQuasiIso.homologyFunctorFactors + (ModuleCat.{u} R) (ComplexShape.down (ZMod D)) i).app C + let : Module.Finite R ((homology R D i).obj ((Q R D).obj C)) := + Module.Finite.equiv (show C.homology i ≃ₗ[R] + (homology R D i).obj ((Q R D).obj C) from e.toLinearEquiv.symm) + let ret' := ret.map (homology R D i) + exact Module.Finite.of_surjective ret'.r.hom + ((ModuleCat.epi_iff_surjective _).mp inferInstance) + +omit [IsDomain R] [IsPrincipalIdealRing R] [IsPrincipalIdealRing Rᵐᵒᵖ] in +lemma perfect_of_iso {P P' : PeriodicDerived R D} (e : P ≅ P') + (h : IsPerfect R D P') : IsPerfect R D P := by + obtain ⟨C,hC,⟨ret⟩⟩ := h + exact ⟨C,hC,⟨(Retract.ofIso e).trans ret⟩⟩ + +omit [IsPrincipalIdealRing Rᵐᵒᵖ] in +lemma diagonal_perfect (H : ZMod D → ModuleCat.{u} R) + (hfin : ∀ i, Module.Finite R (H i)) : + IsPerfect R D ((Q R D).obj (diagonalComplex H)) := by + classical + have hex (i : ZMod D) := @exists_categorical_resolution R _ _ _ (H i) (hfin i) + choose n m r p w hr hp using hex + let F : ZMod D → ModuleCat.{u} R := fun i => ModuleCat.of R (Fin (n i) → R) + let G : ZMod D → ModuleCat.{u} R := fun i => ModuleCat.of R (Fin (m i) → R) + let C := resolutionComplex F G r + let f : C ⟶ diagonalComplex H := diagonalMap F G H r p w + have hf : QuasiIso f := diagonalMap_quasiIso F G H r p w hr (fun i => (hp i).some) + let : IsIso ((Q R D).map f) := + HomologicalComplexUpToQuasiIso.isIso_Q_map_iff_mem_quasiIso f |>.mpr + ((mem_quasiIso_iff f).mpr hf) + refine ⟨C,resolution_finiteCell F G r (fun _ => ⟨inferInstance,inferInstance⟩) + (fun _ => ⟨inferInstance,inferInstance⟩),?_⟩ + exact ⟨Retract.ofIso (asIso ((Q R D).map f)).symm⟩ + +lemma derived_homology_splitting (hD : 0 < D) (heven : Even D) + (P : PeriodicComplex R D) (hfin : ∀ i, Module.Finite R (P.homology i)) : + Nonempty ((Q R D).obj P ≅ (Q R D).obj (homologyDiagonal P)) := by + obtain ⟨C,f,g,hf,hg,_⟩ := periodic_homology_splitting hD heven P hfin + let : IsIso ((Q R D).map f) := + HomologicalComplexUpToQuasiIso.isIso_Q_map_iff_mem_quasiIso f |>.mpr + ((mem_quasiIso_iff f).mpr hf) + let : IsIso ((Q R D).map g) := + HomologicalComplexUpToQuasiIso.isIso_Q_map_iff_mem_quasiIso g |>.mpr + ((mem_quasiIso_iff g).mpr hg) + exact ⟨(asIso ((Q R D).map f)).symm ≪≫ asIso ((Q R D).map g)⟩ + +theorem perfect_splitting (hD : 0 < D) (heven : Even D) + (P : PeriodicDerived R D) (hP : IsPerfect R D P) : + ∃ (V L : ZMod D → ModuleCat.{u} R), + (∀ i, Module.Free R (V i) ∧ Module.Finite R (V i)) ∧ + (∀ i, IsTorsionModule R (L i)) ∧ + IsPerfect R D ((Q R D).obj (diagonalComplex L)) ∧ + Nonempty (P ≅ (Q R D).obj + (diagonalComplex (fun i => ModuleCat.of R ((V i) × (L i))))) := by + classical + let : (Q R D).EssSurj := Localization.essSurj (Q R D) + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (ComplexShape.down (ZMod D))) + let C := (Q R D).objPreimage P + let e : (Q R D).obj C ≅ P := (Q R D).objObjPreimageIso P + have hC := perfect_of_iso e hP + have hfin (i : ZMod D) : Module.Finite R (C.homology i) := by + let := perfect_homology_finite ((Q R D).obj C) hC i + let ei := (HomologicalComplexUpToQuasiIso.homologyFunctorFactors + (ModuleCat.{u} R) (ComplexShape.down (ZMod D)) i).app C + exact Module.Finite.equiv (show (homology R D i).obj ((Q R D).obj C) ≃ₗ[R] + C.homology i from ei.toLinearEquiv) + have hex (i : ZMod D) := @torsion_free_decomposition R _ _ _ _ + (C.homology i) _ _ (hfin i) + choose T V hcomp htor hfree hvfin using hex + let Vf (i : ZMod D) : ModuleCat.{u} R := ModuleCat.of R (V i) + let Lf (i : ZMod D) : ModuleCat.{u} R := ModuleCat.of R (T i) + have hlf (i : ZMod D) : Module.Finite R (Lf i) := by + let := hfin i + exact Module.Finite.of_injective (T i).subtype Subtype.val_injective + refine ⟨Vf,Lf,fun i => ⟨hfree i,hvfin i⟩,htor,diagonal_perfect Lf hlf,?_⟩ + let eh : homologyDiagonal C ≅ + diagonalComplex (fun i => ModuleCat.of R ((Vf i) × (Lf i))) := + Hom.isoOfComponents (fun i => (Submodule.prodEquivOfIsCompl (V i) (T i) + (hcomp i).symm).symm.toModuleIso) (by + intro i j hij + change _ ≫ (diagonalComplex _).d i j = (homologyDiagonal C).d i j ≫ _ + change _ ≫ (diagonalComplex _).d i j = (diagonalComplex _).d i j ≫ _ + rw [diagonalComplex_d, diagonalComplex_d] + simp) + obtain ⟨es⟩ := derived_homology_splitting hD heven C hfin + exact ⟨e.symm ≪≫ es ≪≫ (Q R D).mapIso eh⟩ + +end HahnWilson.PeriodicDerived + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PeriodicDual.lean b/lean/OAI/CategoryTheory/ThickClosure/PeriodicDual.lean new file mode 100644 index 0000000000000000000000000000000000000000..12d076e4a17feaa2735a7900cc52b8abfc20ac5d --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PeriodicDual.lean @@ -0,0 +1,178 @@ +import OAI.CategoryTheory.ThickClosure.CyclicShift +import OAI.CategoryTheory.ThickClosure.DerivedHom + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicDual +section DualModules +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +universe u w +variable (R : Type u) [Ring R] (D : ℕ) + +def cell (i : ZMod D) : PeriodicComplex R D := + diagonalComplex (fun j => ModuleCat.of R (PLift (j = i) → R)) + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +def DualGhost {P P' : PeriodicDerived R D} (f : P ⟶ P') : Prop := + ∀ i (a : P' ⟶ (Q R D).obj (cell R D i)), f ≫ a = 0 + +end DualModules + +section ChosenBases +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +universe u w +variable (R : Type u) [Ring R] (D : ℕ) [NeZero D] +variable (V : ZMod D → ModuleCat.{u} R) +variable [∀ i, Module.Free R (V i)] [∀ i, Module.Finite R (V i)] + +abbrev BasisIndex := Σ i : ZMod D, Module.Free.ChooseBasisIndex R (V i) + +noncomputable def coordinate (t : BasisIndex R D V) : diagonalComplex V ⟶ cell R D t.1 where + f j := ModuleCat.ofHom + { toFun := fun x h => (Module.Free.chooseBasis R (V t.1)).equivFun (h.down ▸ x) t.2 + map_add' := by intros; ext h; obtain ⟨h⟩ := h; subst j; simp + map_smul' := by intros; ext h; obtain ⟨h⟩ := h; subst j; simp } + comm' i j hij := by + change _ ≫ (diagonalComplex (fun k => ModuleCat.of R (PLift (k = t.1) → R))).d i j = + (diagonalComplex V).d i j ≫ _ + simp [diagonalComplex, ChainComplex.of.d] + +noncomputable def coordinateFan : Fan (fun t : BasisIndex R D V => cell R D t.1) := + Fan.mk (diagonalComplex V) (coordinate R D V) + +noncomputable def coordinateLift (s : Fan (fun t : BasisIndex R D V => cell R D t.1)) : + s.pt ⟶ diagonalComplex V where + f j := ModuleCat.ofHom ((Module.Free.chooseBasis R (V j)).equivFun.symm.toLinearMap.comp + (LinearMap.pi (fun b => (LinearMap.proj (PLift.up rfl)).comp ((s.π.app ⟨⟨j,b⟩⟩).f j).hom))) + comm' i j hij := by + change _ ≫ (diagonalComplex V).d i j = s.pt.d i j ≫ _ + rw [diagonalComplex_d, CategoryTheory.Limits.comp_zero] + apply ModuleCat.hom_ext + ext x + change 0 = (Module.Free.chooseBasis R (V j)).equivFun.symm + (fun b => (s.π.app ⟨⟨j,b⟩⟩).f j (s.pt.d i j x) (PLift.up rfl)) + apply (Module.Free.chooseBasis R (V j)).equivFun.injective + rw [map_zero, LinearEquiv.apply_symm_apply] + funext b + have h := congrArg (fun (a : s.pt.X i ⟶ (cell R D j).X j) => a x (PLift.up rfl)) + ((s.π.app ⟨⟨j,b⟩⟩).comm i j) + change ((s.π.app ⟨⟨j,b⟩⟩).f i ≫ (diagonalComplex _).d i j) x _ = _ at h + erw [diagonalComplex_d, CategoryTheory.Limits.comp_zero] at h + exact h + +noncomputable def coordinateFanIsLimit : IsLimit (coordinateFan R D V) := by + classical + refine Fan.IsLimit.mk _ (coordinateLift R D V) ?_ ?_ + · intro s t + apply Hom.ext + funext j + apply ModuleCat.hom_ext + apply LinearMap.ext + intro x + funext h + obtain ⟨i,b⟩ := t + obtain ⟨h⟩ := h + dsimp at h + subst j + change (Module.Free.chooseBasis R (V i)).equivFun + ((Module.Free.chooseBasis R (V i)).equivFun.symm _) b = _ + rw [LinearEquiv.apply_symm_apply] + rfl + · intro s m hm + apply Hom.ext + funext j + apply ModuleCat.hom_ext + apply LinearMap.ext + intro x + apply (Module.Free.chooseBasis R (V j)).equivFun.injective + change (Module.Free.chooseBasis R (V j)).equivFun (m.f j x) = + (Module.Free.chooseBasis R (V j)).equivFun + ((Module.Free.chooseBasis R (V j)).equivFun.symm _) + rw [LinearEquiv.apply_symm_apply] + funext b + exact congrArg (fun (a : s.pt ⟶ cell R D j) => a.f j x (PLift.up rfl)) (hm ⟨j,b⟩) + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + + theorem dualGhost_free_zero_inst + {P : PeriodicDerived R D} (f : P ⟶ (Q R D).obj (diagonalComplex V)) + (hf : DualGhost R D f) : f = 0 := by + have hc := isLimitOfPreserves (Q R D) (coordinateFanIsLimit R D V) + apply hc.hom_ext + intro j + change f ≫ (Q R D).map (coordinate R D V j.as) = 0 ≫ _ + rw [CategoryTheory.Limits.zero_comp] + exact hf j.as.1 _ + +end ChosenBases + +section DerivedDual +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +universe u w +variable (R : Type u) [Ring R] (D : ℕ) [NeZero D] +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] +theorem dualGhost_free_zero (V : ZMod D → ModuleCat.{u} R) + (hV : ∀ i, Module.Free R (V i) ∧ Module.Finite R (V i)) + {P : PeriodicDerived R D} (f : P ⟶ (Q R D).obj (diagonalComplex V)) + (hf : DualGhost R D f) : f = 0 := by + let (i : ZMod D) := (hV i).1 + let (i : ZMod D) := (hV i).2 + exact dualGhost_free_zero_inst R D V f hf + +omit [NeZero D] in +lemma DualGhost.comp_right {P P' P'' : PeriodicDerived R D} + {f : P ⟶ P'} (hf : DualGhost R D f) (g : P' ⟶ P'') : DualGhost R D (f ≫ g) := by + intro i a + rw [Category.assoc] + exact hf i (g ≫ a) + +end DerivedDual + +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived HahnWilson.CyclicShift +universe u w +variable (R : Type u) [Ring R] (D : ℕ) + +noncomputable def cellShiftIso (n : ℤ) : + ((cell R D 0)⟦n⟧) ≅ cell R D (n : ZMod D) := by + refine Hom.isoOfComponents (fun i => ?_) ?_ + · exact (LinearEquiv.piCongrLeft R (fun _ : PLift (i = (n : ZMod D)) => R) + (Equiv.plift.trans ((Equiv.ofIff sub_eq_zero).trans Equiv.plift.symm))).toModuleIso + · intro i j hij + change _ ≫ (cell R D (n : ZMod D)).d i j = + ((cyclicShift R D n).obj (cell R D 0)).d i j ≫ _ + simp [cell, cyclicShift, diagonalComplex, ChainComplex.of.d] + +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + +lemma dualGhost_iff {P P' : PeriodicDerived R D} (f : P ⟶ P') : + DualGhost R D f ↔ + ∀ n : ℤ, ∀ a : P' ⟶ ((Q R D).obj (cell R D 0))⟦n⟧, f ≫ a = 0 := by + constructor + · intro h n a + let e := ((Q R D).commShiftIso n).symm.app (cell R D 0) ≪≫ + (Q R D).mapIso (cellShiftIso R D n) + apply (cancel_mono e.hom).mp + simpa only [Category.assoc, CategoryTheory.Limits.zero_comp] using h (n : ZMod D) (a ≫ e.hom) + · intro h i a + obtain ⟨n, hn⟩ := ZMod.intCast_surjective i + subst i + let e := ((Q R D).commShiftIso n).symm.app (cell R D 0) ≪≫ + (Q R D).mapIso (cellShiftIso R D n) + apply (cancel_mono e.inv).mp + simpa only [Category.assoc, CategoryTheory.Limits.zero_comp] using h n (a ≫ e.inv) + +end HahnWilson.PeriodicDual + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PeriodicHom.lean b/lean/OAI/CategoryTheory/ThickClosure/PeriodicHom.lean new file mode 100644 index 0000000000000000000000000000000000000000..295d7337bf8b422f6dcc05ba435c12f259dcb104 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PeriodicHom.lean @@ -0,0 +1,156 @@ +import OAI.CategoryTheory.ThickClosure.PeriodicDerived + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicHom +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PeriodicSplitting HahnWilson.PeriodicDerived +universe u w +variable {R : Type u} [Ring R] {D : ℕ} + +abbrev homotopyQuotient : PeriodicComplex R D ⥤ + HomotopyCategory (ModuleCat.{u} R) (.down (ZMod D)) := + HomotopyCategory.quotient _ _ + +variable (G : ZMod D → ModuleCat.{u} R) {P : PeriodicComplex R D} + +lemma diagonal_map_cycle (f : diagonalComplex G ⟶ P) (i : ZMod D) : + f.f i ≫ P.d i (i - 1) = 0 := by + rw [f.comm, diagonalComplex_d, CategoryTheory.Limits.zero_comp] + +noncomputable def cycleClass (f : diagonalComplex G ⟶ P) (i : ZMod D) : + G i ⟶ P.homology i := + P.liftCycles' (f.f i) (i - 1) (down_prev i) (diagonal_map_cycle G f i) ≫ P.homologyπ i + +lemma source_cycle_naturality (f : diagonalComplex G ⟶ P) (i : ZMod D) : + (diagonalComplex G).liftCycles' (𝟙 (G i)) (i - 1) (down_prev i) (by rw [Category.id_comp]; exact diagonalComplex_d G _ _) ≫ + cyclesMap f i = + P.liftCycles' (f.f i) (i - 1) (down_prev i) (diagonal_map_cycle G f i) := by + apply (cancel_mono (P.iCycles i)).mp + simp only [Category.assoc, cyclesMap_i, liftCycles_i_assoc, liftCycles_i, + Category.id_comp] + +lemma cycleClass_eq (f : diagonalComplex G ⟶ P) (i : ZMod D) : + cycleClass G f i = + (diagonalComplex G).liftCycles' (𝟙 (G i)) (i - 1) (down_prev i) (by rw [Category.id_comp]; exact diagonalComplex_d G _ _) ≫ + (diagonalComplex G).homologyπ i ≫ homologyMap f i := by + unfold cycleClass + rw [← source_cycle_naturality, Category.assoc, homologyπ_naturality] + +lemma null_homotopy_of_cycleClass_zero [∀ i, Projective (G i)] + (f : diagonalComplex G ⟶ P) (hf : ∀ i, cycleClass G f i = 0) : + Nonempty (Homotopy f 0) := by + classical + let S (i : ZMod D) := ShortComplex.mk (P.toCycles (i + 1) i) (P.homologyπ i) + (P.toCycles_comp_homologyπ (i + 1) i) + have hS (i : ZMod D) : (S i).Exact := + (S i).exact_of_g_is_cokernel (P.homologyIsCokernel (i + 1) i + ((ComplexShape.down (ZMod D)).prev_eq' rfl)) + let z (i : ZMod D) := + P.liftCycles' (f.f i) (i - 1) (down_prev i) (diagonal_map_cycle G f i) + have hzi (i : ZMod D) : z i ≫ (S i).g = 0 := hf i + let h (i : ZMod D) : G i ⟶ P.X (i + 1) := + (hS i).liftFromProjective (z i) (hzi i) + have hk (i : ZMod D) : h i ≫ P.d (i + 1) i = f.f i := by + have he := congrArg (fun a => a ≫ P.iCycles i) + ((hS i).liftFromProjective_comp (z i) (hzi i)) + change (h i ≫ P.toCycles (i + 1) i) ≫ P.iCycles i = z i ≫ P.iCycles i at he + simpa only [Category.assoc, toCycles_i, z, liftCycles_i] using he + let h' (i j : ZMod D) (hji : (ComplexShape.down (ZMod D)).Rel j i) : + (diagonalComplex G).X i ⟶ P.X j := + h i ≫ (P.XIsoOfEq hji).hom + have he : f = Homotopy.nullHomotopicMap' h' := by + ext i : 1 + rw [Homotopy.nullHomotopicMap'_f (show (ComplexShape.down (ZMod D)).Rel (i + 1) i from rfl) + (down_prev i), diagonalComplex_d, CategoryTheory.Limits.zero_comp, zero_add] + dsimp [h'] + simpa using (hk i).symm + exact ⟨(Homotopy.ofEq he).trans (Homotopy.nullHomotopy' h')⟩ + +theorem homotopy_zero_iff [∀ i, Projective (G i)] + (f : diagonalComplex G ⟶ P) : + Nonempty (Homotopy f 0) ↔ ∀ i, homologyMap f i = 0 := by + constructor + · rintro ⟨h⟩ i + simpa using h.homologyMap_eq i + · intro hf + apply null_homotopy_of_cycleClass_zero G f + intro i + rw [cycleClass_eq, hf i, CategoryTheory.Limits.comp_zero, + CategoryTheory.Limits.comp_zero] + +lemma cycleClass_comp {P' : PeriodicComplex R D} (f : diagonalComplex G ⟶ P) + (q : P ⟶ P') (i : ZMod D) : + cycleClass G (f ≫ q) i = cycleClass G f i ≫ homologyMap q i := by + simp only [cycleClass_eq, homologyMap_comp, Category.assoc] + +lemma cycleClass_sub (f g : diagonalComplex G ⟶ P) (i : ZMod D) : + cycleClass G (f - g) i = cycleClass G f i - cycleClass G g i := by + simp only [cycleClass_eq, homologyMap_sub, Preadditive.comp_sub] + +lemma quotient_eq_of_cycleClass_eq [∀ i, Projective (G i)] + (f g : diagonalComplex G ⟶ P) (h : ∀ i, cycleClass G f i = cycleClass G g i) : + homotopyQuotient.map f = homotopyQuotient.map g := by + apply sub_eq_zero.mp + rw [← Functor.map_sub, HomotopyCategory.quotient_map_eq_zero_iff] + apply null_homotopy_of_cycleClass_zero G + intro i + rw [cycleClass_sub, h i, sub_self] + +noncomputable def mapOfClasses [∀ i, Projective (G i)] + (v : ∀ i, G i ⟶ P.homology i) : diagonalComplex G ⟶ P where + f i := Projective.factorThru (v i) (P.homologyπ i) ≫ P.iCycles i + comm' i j hij := by + rw [Category.assoc, iCycles_d, CategoryTheory.Limits.comp_zero, diagonalComplex_d, + CategoryTheory.Limits.zero_comp] + +lemma cycleClass_mapOfClasses [∀ i, Projective (G i)] + (v : ∀ i, G i ⟶ P.homology i) (i : ZMod D) : + cycleClass G (mapOfClasses G v) i = v i := by + unfold cycleClass + have he : P.liftCycles' ((mapOfClasses G v).f i) (i - 1) (down_prev i) + (diagonal_map_cycle G (mapOfClasses G v) i) = + Projective.factorThru (v i) (P.homologyπ i) := by + apply (cancel_mono (P.iCycles i)).mp + rw [liftCycles_i] + rfl + rw [he, Projective.factorThru_comp] + +theorem free_hom_quasiIso_bijective [∀ i, Projective (G i)] + {P' : PeriodicComplex R D} (q : P ⟶ P') [QuasiIso q] : + Function.Bijective (fun f : homotopyQuotient.obj (diagonalComplex G) ⟶ + homotopyQuotient.obj P => f ≫ homotopyQuotient.map q) := by + constructor + · intro f g h + obtain ⟨f, rfl⟩ := homotopyQuotient.map_surjective f + obtain ⟨g, rfl⟩ := homotopyQuotient.map_surjective g + have he : homotopyQuotient.map (f ≫ q) = homotopyQuotient.map (g ≫ q) := by + simpa only [Functor.map_comp] using h + have hh := HomotopyCategory.homotopyOfEq _ _ he + apply sub_eq_zero.mp + rw [← Functor.map_sub, HomotopyCategory.quotient_map_eq_zero_iff, homotopy_zero_iff] + intro i + rw [homologyMap_sub, sub_eq_zero] + apply (cancel_mono (homologyMap q i)).mp + simpa only [homologyMap_comp] using hh.homologyMap_eq i + · intro f + obtain ⟨f, rfl⟩ := homotopyQuotient.map_surjective f + let v (i : ZMod D) := cycleClass G f i ≫ inv (homologyMap q i) + refine ⟨homotopyQuotient.map (mapOfClasses G v), ?_⟩ + dsimp only + rw [← Functor.map_comp] + apply quotient_eq_of_cycleClass_eq + intro i + rw [cycleClass_comp, cycleClass_mapOfClasses] + simp [v] + +end HahnWilson.PeriodicHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PeriodicSplitting.lean b/lean/OAI/CategoryTheory/ThickClosure/PeriodicSplitting.lean new file mode 100644 index 0000000000000000000000000000000000000000..82fc29007f0a95d2cdec1b1ef2f343a0bb90c822 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PeriodicSplitting.lean @@ -0,0 +1,349 @@ +import OAI.CategoryTheory.ThickClosure.PrincipalModules + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PeriodicSplitting +open CategoryTheory CategoryTheory.Limits HomologicalComplex +open HahnWilson.PrincipalModules +universe u +variable {R : Type u} [Ring R] {D : ℕ} + +def homologyDiagonal (P : ChainComplex (ModuleCat.{u} R) (ZMod D)) : + ChainComplex (ModuleCat.{u} R) (ZMod D) := + ChainComplex.of (fun i => P.homology i) (fun _ => 0) (fun _ => by simp) + +section Resolution +variable {ι : Type*} [AddCommGroup ι] [One ι] [DecidableEq ι] +variable (F G : ι → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) + +abbrev resolutionTerm (i : ι) : ModuleCat.{u} R := F i ⊞ G (i - 1) + +def resolutionD (i : ι) : resolutionTerm F G (i + 1) ⟶ resolutionTerm F G i := + biprod.snd ≫ eqToHom (congrArg G (add_sub_cancel_right i 1)) ≫ r i ≫ biprod.inl + +omit [DecidableEq ι] in +lemma resolutionD_sq (i : ι) : + resolutionD F G r (i + 1) ≫ resolutionD F G r i = 0 := by + dsimp [resolutionD] + simp only [CategoryTheory.Category.assoc, biprod.inl_snd_assoc, + CategoryTheory.Limits.comp_zero, CategoryTheory.Limits.zero_comp] + +abbrev resolutionComplex : ChainComplex (ModuleCat.{u} R) ι := + ChainComplex.of (resolutionTerm F G) (resolutionD F G r) (resolutionD_sq F G r) + +@[simp] lemma resolutionComplex_d (i : ι) : + (resolutionComplex F G r).d (i + 1) i = resolutionD F G r i := + ChainComplex.of_d _ _ _ + +lemma resolutionComplex_d_prev (i : ι) : + (resolutionComplex F G r).d i (i - 1) = + biprod.snd ≫ r (i - 1) ≫ biprod.inl := by + have hnat {j k : ι} (h : j = k) : + eqToHom (congrArg (resolutionTerm F G) h) ≫ biprod.snd = + biprod.snd ≫ eqToHom (congrArg (fun l => G (l - 1)) h) := by + subst k + simp + change ChainComplex.of.d _ _ _ _ = _ + rw [ChainComplex.of.d, dite_eq_left (sub_add_cancel i 1).symm] + dsimp only [resolutionD] + rw [← CategoryTheory.Category.assoc, hnat] + simp only [CategoryTheory.Category.assoc, eqToHom_trans_assoc, eqToHom_refl, + Category.id_comp] + exact (sub_add_cancel i 1).symm + +variable {F G r} (P : ChainComplex (ModuleCat.{u} R) ι) +variable (a : ∀ i, F i ⟶ P.X i) (b : ∀ i, G (i - 1) ⟶ P.X i) +variable (ha : ∀ i j, a i ≫ P.d i j = 0) +variable (hb : ∀ i, b (i + 1) ≫ P.d (i + 1) i = + eqToHom (congrArg G (add_sub_cancel_right i 1)) ≫ r i ≫ a i) + +def resolutionMap : resolutionComplex F G r ⟶ P := + ChainComplex.ofHom (fun i => biprod.desc (a i) (b i)) (by + intro i + apply biprod.hom_ext' + · simp [resolutionD, CategoryTheory.Category.assoc, ha] + · simp [resolutionD, CategoryTheory.Category.assoc, hb]) + +@[simp, reassoc] lemma resolutionMap_inl (i : ι) : + biprod.inl ≫ (resolutionMap P a b ha hb).f i = a i := by + exact biprod.inl_desc _ _ + +end Resolution + +section ResolutionHomology +variable {ι : Type*} [AddCommGroup ι] [One ι] [DecidableEq ι] +variable (F G H : ι → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) +variable (p : ∀ i, F i ⟶ H i) (hr : ∀ i, Mono (r i)) +variable (hrp : ∀ i, r i ≫ p i = 0) +variable (hp : ∀ i, IsColimit (CokernelCofork.ofπ (p i) (hrp i))) + +def resolutionLeftHomologyData (i : ι) : + ((resolutionComplex F G r).sc' (i + 1) i (i - 1)).LeftHomologyData := by + letI := hr (i - 1) + let S := (resolutionComplex F G r).sc' (i + 1) i (i - 1) + have wi : (biprod.inl : F i ⟶ S.X₂) ≫ S.g = 0 := by + change biprod.inl ≫ (resolutionComplex F G r).d i (i - 1) = 0 + rw [resolutionComplex_d_prev] + simp + let hker : IsLimit (KernelFork.ofι (biprod.inl : F i ⟶ S.X₂) wi) := + isKernelCompMono (biprod.isKernelSndKernelFork (F i) (G (i - 1))) + (r (i - 1) ≫ biprod.inl) (resolutionComplex_d_prev F G r i) + let η : resolutionTerm F G (i + 1) ⟶ G i := + biprod.snd ≫ eqToHom (congrArg G (add_sub_cancel_right i 1)) + letI : Epi η := by dsimp [η]; infer_instance + have heq : hker.lift (KernelFork.ofι S.f S.zero) = η ≫ r i := by + apply (cancel_mono (biprod.inl : F i ⟶ S.X₂)).mp + have hfac := hker.fac (KernelFork.ofι S.f S.zero) WalkingParallelPair.zero + change hker.lift (KernelFork.ofι S.f S.zero) ≫ biprod.inl = S.f at hfac + exact hfac.trans (resolutionComplex_d F G r i) + refine { + K := F i + H := H i + i := biprod.inl + π := p i + wi := wi + hi := hker + wπ := ?_ + hπ := ?_ } + · change hker.lift (KernelFork.ofι S.f S.zero) ≫ p i = 0 + exact (congrArg (fun f => f ≫ p i) heq).trans + ((CategoryTheory.Category.assoc η (r i) (p i)).trans + ((congrArg (fun f => η ≫ f) (hrp i)).trans CategoryTheory.Limits.comp_zero)) + · exact isCokernelEpiComp (hp i) η heq + +@[simp] lemma resolutionLeftHomologyData_i (i : ι) : + (resolutionLeftHomologyData F G H r p hr hrp hp i).i = biprod.inl := rfl +@[simp] lemma resolutionLeftHomologyData_π (i : ι) : + (resolutionLeftHomologyData F G H r p hr hrp hp i).π = p i := rfl + +end ResolutionHomology + +def leftHomologyMapOfSquares {S₁ S₂ : ShortComplex (ModuleCat.{u} R)} + (f : S₁ ⟶ S₂) (h₁ : S₁.LeftHomologyData) (h₂ : S₂.LeftHomologyData) + (u : h₁.K ⟶ h₂.K) (v : h₁.H ⟶ h₂.H) + (hi : u ≫ h₂.i = h₁.i ≫ f.τ₂) (hp : h₁.π ≫ v = u ≫ h₂.π) : + ShortComplex.LeftHomologyMapData f h₁ h₂ where + φK := u + φH := v + commi := hi + commπ := hp + commf' := by + apply (cancel_mono h₂.i).mp + simp only [CategoryTheory.Category.assoc, hi, + h₂.f'_i, h₁.f'_i_assoc] + exact f.comm₁₂.symm + +section LiftResolution +variable {ι : Type*} [AddCommGroup ι] [One ι] [DecidableEq ι] +variable (P : ChainComplex (ModuleCat.{u} R) ι) +variable (L : ∀ i, (P.sc' (i + 1) i (i - 1)).LeftHomologyData) +variable (F G : ι → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) +variable (p : ∀ i, F i ⟶ (L i).H) (hrp : ∀ i, r i ≫ p i = 0) +variable [hF : ∀ i, Projective (F i)] [hG : ∀ i, Projective (G i)] + +noncomputable def chosenCycleLift (i : ι) : F i ⟶ (L i).K := + Projective.factorThru (p i) (L i).π + +omit [DecidableEq ι] in +@[simp, reassoc] lemma chosenCycleLift_π (i : ι) : + chosenCycleLift P L F p i ≫ (L i).π = p i := + Projective.factorThru_comp _ _ + +noncomputable def chosenBoundaryLift (i : ι) : G i ⟶ P.X (i + 1) := by + let S := ShortComplex.mk (L i).f' (L i).π (L i).f'_π + have hS : S.Exact := S.exact_of_g_is_cokernel (L i).hπ + exact hS.liftFromProjective (r i ≫ chosenCycleLift P L F p i) (by + change (r i ≫ chosenCycleLift P L F p i) ≫ (L i).π = 0 + rw [CategoryTheory.Category.assoc, chosenCycleLift_π, hrp]) + +omit [DecidableEq ι] in +@[simp, reassoc] lemma chosenBoundaryLift_f' (i : ι) : + chosenBoundaryLift P L F G r p hrp i ≫ (L i).f' = + r i ≫ chosenCycleLift P L F p i := by + let S := ShortComplex.mk (L i).f' (L i).π (L i).f'_π + exact ShortComplex.Exact.liftFromProjective_comp + (S.exact_of_g_is_cokernel (L i).hπ) _ _ + +noncomputable def resolutionCycleMap (i : ι) : F i ⟶ P.X i := + chosenCycleLift P L F p i ≫ (L i).i + +noncomputable def resolutionBoundaryMap (i : ι) : G (i - 1) ⟶ P.X i := + chosenBoundaryLift P L F G r p hrp (i - 1) ≫ + eqToHom (congrArg P.X (sub_add_cancel i 1)) + +lemma resolutionCycleMap_d (i j : ι) : resolutionCycleMap P L F p i ≫ P.d i j = 0 := by + by_cases h : (ComplexShape.down ι).Rel i j + · have hj : j = i - 1 := by + have := (ComplexShape.down ι).next_eq' h + have hj' := (ComplexShape.down ι).next_eq' (show (ComplexShape.down ι).Rel i (i - 1) from sub_add_cancel i 1) + exact this.symm.trans hj' + subst j + exact (CategoryTheory.Category.assoc _ _ _).trans + ((congrArg (fun f => chosenCycleLift P L F p i ≫ f) (L i).wi).trans CategoryTheory.Limits.comp_zero) + · rw [P.shape _ _ h, CategoryTheory.Limits.comp_zero] + +omit [DecidableEq ι] in +lemma resolutionBoundaryMap_d (i : ι) : + resolutionBoundaryMap P L F G r p hrp (i + 1) ≫ P.d (i + 1) i = + eqToHom (congrArg G (add_sub_cancel_right i 1)) ≫ + r i ≫ resolutionCycleMap P L F p i := by + have hnat {j k : ι} (h : j = k) : + chosenBoundaryLift P L F G r p hrp j ≫ + eqToHom (congrArg (fun l => P.X (l + 1)) h) = + eqToHom (congrArg G h) ≫ chosenBoundaryLift P L F G r p hrp k := by + subst k + simp + have hb : resolutionBoundaryMap P L F G r p hrp (i + 1) = + eqToHom (congrArg G (add_sub_cancel_right i 1)) ≫ + chosenBoundaryLift P L F G r p hrp i := + hnat (add_sub_cancel_right i 1) + rw [hb, CategoryTheory.Category.assoc] + congr 1 + change chosenBoundaryLift P L F G r p hrp i ≫ (P.sc' (i + 1) i (i - 1)).f = _ + exact (congrArg (fun z => chosenBoundaryLift P L F G r p hrp i ≫ z) + (L i).f'_i.symm).trans + ((CategoryTheory.Category.assoc _ _ _).symm.trans + ((congrArg (fun z => z ≫ (L i).i) (chosenBoundaryLift_f' P L F G r p hrp i)).trans + (CategoryTheory.Category.assoc _ _ _))) + +noncomputable def comparisonMap : resolutionComplex F G r ⟶ P := + resolutionMap P (resolutionCycleMap P L F p) (resolutionBoundaryMap P L F G r p hrp) + (resolutionCycleMap_d P L F p) (resolutionBoundaryMap_d P L F G r p hrp) + +end LiftResolution + +section ComparisonHomology +variable {ι : Type*} [AddCommGroup ι] [One ι] [DecidableEq ι] +variable (P : ChainComplex (ModuleCat.{u} R) ι) +variable (L : ∀ i, (P.sc' (i + 1) i (i - 1)).LeftHomologyData) +variable (F G : ι → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) +variable (p : ∀ i, F i ⟶ (L i).H) (hrp : ∀ i, r i ≫ p i = 0) +variable [hF : ∀ i, Projective (F i)] [hG : ∀ i, Projective (G i)] +variable (hr : ∀ i, Mono (r i)) +variable (hp : ∀ i, IsColimit (CokernelCofork.ofπ (p i) (hrp i))) + +include hr hp in +lemma comparisonMap_quasiIso : QuasiIso (comparisonMap P L F G r p hrp) := by + rw [quasiIso_iff] + intro i + rw [quasiIsoAt_iff' _ (i + 1) i (i - 1) + ((ComplexShape.down ι).prev_eq' rfl) + ((ComplexShape.down ι).next_eq' (sub_add_cancel i 1))] + let f := (shortComplexFunctor' (ModuleCat.{u} R) (ComplexShape.down ι) + (i + 1) i (i - 1)).map (comparisonMap P L F G r p hrp) + let h := resolutionLeftHomologyData F G (fun i => (L i).H) r p hr hrp hp i + let u := chosenCycleLift P L F p i + have hi : u ≫ (L i).i = h.i ≫ f.τ₂ := by + change resolutionCycleMap P L F p i = + biprod.inl ≫ (comparisonMap P L F G r p hrp).f i + exact (resolutionMap_inl _ _ _ _ _ _).symm + have hπ : h.π ≫ 𝟙 (L i).H = u ≫ (L i).π := by + change p i ≫ 𝟙 _ = chosenCycleLift P L F p i ≫ (L i).π + simp + exact (leftHomologyMapOfSquares f h (L i) u (𝟙 _) hi hπ).quasiIso_iff.mpr + (inferInstance : IsIso (𝟙 (L i).H)) + +end ComparisonHomology + +section Diagonal +variable {ι : Type*} [AddCommGroup ι] [One ι] [DecidableEq ι] + +noncomputable def cyclicHomologyData (P : ChainComplex (ModuleCat.{u} R) ι) (i : ι) : + (P.sc' (i + 1) i (i - 1)).LeftHomologyData := + (P.sc i).homologyData.left.ofIso (P.isoSc' (i + 1) i (i - 1) + ((ComplexShape.down ι).prev_eq' rfl) + ((ComplexShape.down ι).next_eq' (sub_add_cancel i 1))) + +abbrev diagonalComplex (H : ι → ModuleCat.{u} R) : ChainComplex (ModuleCat.{u} R) ι := + ChainComplex.of H (fun _ => 0) (fun _ => by simp) + +@[simp] lemma diagonalComplex_d (H : ι → ModuleCat.{u} R) (i j : ι) : + (diagonalComplex H).d i j = 0 := by + change ChainComplex.of.d H (fun _ => 0) i j = 0 + unfold ChainComplex.of.d + split <;> simp + +variable (F G H : ι → ModuleCat.{u} R) (r : ∀ i, G i ⟶ F i) +variable (p : ∀ i, F i ⟶ H i) (hrp : ∀ i, r i ≫ p i = 0) + +def diagonalMap : resolutionComplex F G r ⟶ diagonalComplex H := + resolutionMap (diagonalComplex H) p (fun _ => 0) + (fun i j => (congrArg (fun z => p i ≫ z) (diagonalComplex_d H i j)).trans + CategoryTheory.Limits.comp_zero) (fun i => by simp [hrp]) + +variable (hr : ∀ i, Mono (r i)) +variable (hp : ∀ i, IsColimit (CokernelCofork.ofπ (p i) (hrp i))) + +include hr hp in +lemma diagonalMap_quasiIso : QuasiIso (diagonalMap F G H r p hrp) := by + rw [quasiIso_iff] + intro i + rw [quasiIsoAt_iff' _ (i + 1) i (i - 1) + ((ComplexShape.down ι).prev_eq' rfl) + ((ComplexShape.down ι).next_eq' (sub_add_cancel i 1))] + let f := (shortComplexFunctor' (ModuleCat.{u} R) (ComplexShape.down ι) + (i + 1) i (i - 1)).map (diagonalMap F G H r p hrp) + let h := resolutionLeftHomologyData F G H r p hr hrp hp i + let S := (diagonalComplex H).sc' (i + 1) i (i - 1) + have hf : S.f = 0 := diagonalComplex_d H _ _ + have hg : S.g = 0 := diagonalComplex_d H _ _ + let h' := ShortComplex.LeftHomologyData.ofZeros S hf hg + have hi : p i ≫ h'.i = h.i ≫ f.τ₂ := by + change p i ≫ 𝟙 _ = biprod.inl ≫ (diagonalMap F G H r p hrp).f i + exact (Category.comp_id _).trans (biprod.inl_desc _ _).symm + have hπ : h.π ≫ 𝟙 (H i) = p i ≫ h'.π := rfl + exact (leftHomologyMapOfSquares f h h' (p i) (𝟙 _) hi hπ).quasiIso_iff.mpr + (inferInstance : IsIso (𝟙 (H i))) + +end Diagonal + +theorem exists_categorical_resolution [IsDomain R] [IsPrincipalIdealRing R] + (M : ModuleCat.{u} R) [Module.Finite R M] : + ∃ (n m : ℕ) (r : ModuleCat.of R (Fin m → R) ⟶ ModuleCat.of R (Fin n → R)) + (p : ModuleCat.of R (Fin n → R) ⟶ M) (w : r ≫ p = 0), + Mono r ∧ Nonempty (IsColimit (CokernelCofork.ofπ p w)) := by + obtain ⟨n,m,r,p,hr,hp,hex⟩ := finite_free_resolution (R := R) M + have he : Function.Exact r p := LinearMap.exact_iff.mpr hex.symm + let r' : ModuleCat.of R (Fin m → R) ⟶ ModuleCat.of R (Fin n → R) := ModuleCat.ofHom r + let p' : ModuleCat.of R (Fin n → R) ⟶ M := ModuleCat.ofHom p + have w : r' ≫ p' = 0 := by + apply ModuleCat.hom_ext + exact LinearMap.ext (fun x => he.apply_apply_eq_zero x) + exact ⟨n,m,r',p',w,(ModuleCat.mono_iff_injective r').mpr hr, + ⟨ModuleCat.isColimitCokernelCofork r' p' he hp⟩⟩ + +theorem periodic_homology_splitting [IsDomain R] [IsPrincipalIdealRing R] + [IsPrincipalIdealRing Rᵐᵒᵖ] (_hD : 0 < D) (_hDeven : Even D) + (P : ChainComplex (ModuleCat.{u} R) (ZMod D)) + (hfin : ∀ i, Module.Finite R (P.homology i)) : + ∃ (Q : ChainComplex (ModuleCat.{u} R) (ZMod D)) + (f : Q ⟶ P) (g : Q ⟶ homologyDiagonal P), + QuasiIso f ∧ QuasiIso g ∧ + ∀ i, Module.Free R (Q.X i) ∧ Module.Finite R (Q.X i) := by + classical + let L := cyclicHomologyData P + have hex (i : ZMod D) := @exists_categorical_resolution R _ _ _ (P.homology i) (hfin i) + choose n m r p w hr hp using hex + let F : ZMod D → ModuleCat.{u} R := fun i => ModuleCat.of R (Fin (n i) → R) + let G : ZMod D → ModuleCat.{u} R := fun i => ModuleCat.of R (Fin (m i) → R) + let Q := resolutionComplex F G r + let : ∀ i, Projective (F i) := fun i => inferInstance + let : ∀ i, Projective (G i) := fun i => inferInstance + let f : Q ⟶ P := comparisonMap P L F G r p w + let g : Q ⟶ homologyDiagonal P := diagonalMap F G (fun i => P.homology i) r p w + refine ⟨Q,f,g,comparisonMap_quasiIso P L F G r p w hr (fun i => (hp i).some), + diagonalMap_quasiIso F G (fun i => P.homology i) r p w hr (fun i => (hp i).some),?_⟩ + intro i + let e := (ModuleCat.biprodIsoProd (F i) (G (i - 1))).toLinearEquiv + exact ⟨Module.Free.of_equiv e.symm, Module.Finite.equiv e.symm⟩ + +end HahnWilson.PeriodicSplitting + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/PrincipalModules.lean b/lean/OAI/CategoryTheory/ThickClosure/PrincipalModules.lean new file mode 100644 index 0000000000000000000000000000000000000000..768fdf260badd95adeddf2a968707fe5fefb51af --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/PrincipalModules.lean @@ -0,0 +1,371 @@ +import Mathlib + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.PrincipalModules +variable {R : Type*} [Ring R] [IsDomain R] + +def IsTorsionModule (R : Type*) [Ring R] (M : Type*) [AddCommGroup M] [Module R M] : Prop := + ∀ m : M, ∃ a : R, a ≠ 0 ∧ a • m = 0 + +section LeftPrincipal +variable [IsPrincipalIdealRing R] + +lemma ideal_free (I : Ideal R) : Module.Free R I := by + classical + by_cases hI : I = ⊥ + · subst I + infer_instance + · let d : R := Submodule.IsPrincipal.generator I + have hd : d ≠ 0 := by + intro hd + exact hI ((Submodule.IsPrincipal.eq_bot_iff_generator_eq_zero I).mpr hd) + let f : R →ₗ[R] I := (LinearMap.mulRight R d).codRestrict I + (fun a => I.smul_mem a (Submodule.IsPrincipal.generator_mem I)) + have hf : Function.Bijective f := by + constructor + · intro a b hab + have hab' : a * d = b * d := congrArg Subtype.val hab + exact mul_right_cancel₀ hd hab' + · intro x + obtain ⟨a,ha⟩ := (Submodule.IsPrincipal.mem_iff_eq_smul_generator I).mp x.property + exact ⟨a, Subtype.ext ha.symm⟩ + exact Module.Free.of_equiv (LinearEquiv.ofBijective f hf) + +def splitEquiv {M P : Type*} [AddCommGroup M] [Module R M] + [AddCommGroup P] [Module R P] (f : M →ₗ[R] P) (s : P →ₗ[R] M) + (hs : f.comp s = .id) : (f.ker × P) ≃ₗ[R] M := by + let u : f.ker × P →ₗ[R] M := f.ker.subtype.coprod s + have hsf (p : P) : f (s p) = p := LinearMap.congr_fun hs p + apply LinearEquiv.ofBijective u + constructor + · rintro ⟨k,p⟩ ⟨l,q⟩ h + have hpq : p = q := by + have := congrArg f h + simpa [u, hsf, k.property, l.property] using this + subst q + have hkl : (k : M) = (l : M) := by simpa [u] using h + exact Prod.ext (Subtype.ext hkl) rfl + · intro m + refine ⟨(⟨m - s (f m), ?_⟩, f m), ?_⟩ + · simp [LinearMap.mem_ker, hsf] + · simp [u] + +theorem finite_free_submodule (n : ℕ) (N : Submodule R (Fin n → R)) : + Module.Free R N ∧ Module.Finite R N := by + classical + constructor + swap + · exact Module.Finite.of_injective N.subtype N.subtype_injective + induction n with + | zero => infer_instance + | succ n ih => + let f : N →ₗ[R] R := (LinearMap.proj (0 : Fin (n + 1))).comp N.subtype + let φ : N →ₗ[R] f.range := f.rangeRestrict + let tail : φ.ker →ₗ[R] (Fin n → R) := + LinearMap.pi (fun i => (LinearMap.proj i.succ).comp (N.subtype.comp φ.ker.subtype)) + have ht : Function.Injective tail := by + intro x y hxy + apply Subtype.ext + apply Subtype.ext + funext i + refine Fin.cases ?_ (fun j => ?_) i + · have hx : ((x : N) : Fin (n + 1) → R) 0 = 0 := by + have := congrArg Subtype.val x.property + exact this + have hy : ((y : N) : Fin (n + 1) → R) 0 = 0 := by + have := congrArg Subtype.val y.property + exact this + exact hx.trans hy.symm + · exact congrFun hxy j + have hk : Module.Free R φ.ker := by + let : Module.Free R tail.range := ih tail.range + exact Module.Free.of_equiv (LinearEquiv.ofInjective tail ht).symm + let : Module.Free R φ.ker := hk + let : Module.Free R f.range := ideal_free f.range + obtain ⟨s,hs⟩ := φ.exists_rightInverse_of_surjective + (LinearMap.range_eq_top.mpr (by + rintro ⟨y, x, rfl⟩ + exact ⟨x, rfl⟩)) + exact Module.Free.of_equiv (splitEquiv φ s hs) + +lemma common_left_multiple (a b : R) (ha : a ≠ 0) (hb : b ≠ 0) : + ∃ u v : R, u ≠ 0 ∧ v ≠ 0 ∧ u * a = v * b := by + classical + by_contra h + have hn : ∀ u v : R, u * a = v * b → u = 0 ∧ v = 0 := by + intro u v huv + by_cases hu : u = 0 + · exact ⟨hu, (mul_eq_zero.mp (by simpa [hu] using huv.symm)).resolve_right hb⟩ + · have hv : v ≠ 0 := by + intro hv + have : u * a = 0 := by simpa [hv] using huv + exact (mul_ne_zero hu ha) this + exact False.elim (h ⟨u,v,hu,hv,huv⟩) + let f : R × R →ₗ[R] R := (LinearMap.mulRight R a).coprod (LinearMap.mulRight R b) + have hf : Function.Injective f := by + rw [← LinearMap.ker_eq_bot] + apply (Submodule.eq_bot_iff _).mpr + rintro ⟨u,v⟩ huv + have he : u * a = (-v) * b := by + have he : u * a + v * b = 0 := huv + rw [neg_mul] + exact eq_neg_of_add_eq_zero_left he + obtain ⟨hu,hv⟩ := hn u (-v) he + have hv' : v = 0 := neg_eq_zero.mp hv + simp [hu,hv'] + have : Subsingleton R := IsNoetherian.subsingleton_of_injective hf + exact (zero_ne_one : (0 : R) ≠ 1) (Subsingleton.elim _ _) + +@[instance_reducible] +noncomputable def principalOreSet : OreLocalization.OreSet (nonZeroDivisors R) := by + classical + apply Classical.choice + rw [OreLocalization.nonempty_oreSet_iff_of_noZeroDivisors] + intro r s + by_cases hr : r = 0 + · exact ⟨0, 1, by simp [hr]⟩ + · obtain ⟨u,v,hu,hv,h⟩ := common_left_multiple r s hr (nonZeroDivisors.coe_ne_zero s) + exact ⟨v, ⟨u, mem_nonZeroDivisors_of_ne_zero hu⟩, h⟩ + +theorem finite_free_resolution + (M : Type*) [AddCommGroup M] [Module R M] [Module.Finite R M] : + ∃ (n m : ℕ) (f : (Fin m → R) →ₗ[R] (Fin n → R)) + (g : (Fin n → R) →ₗ[R] M), + Function.Injective f ∧ Function.Surjective g ∧ LinearMap.range f = LinearMap.ker g := by + classical + obtain ⟨n,v,hv⟩ := Module.Finite.exists_fin (R := R) (M := M) + let g : (Fin n → R) →ₗ[R] M := Fintype.linearCombination R v + have hg : Function.Surjective g := by + rw [← LinearMap.range_eq_top] + exact (Fintype.range_linearCombination R v).trans hv + obtain ⟨hfree,hfin⟩ := finite_free_submodule n g.ker + let := hfree + let := hfin + let m := Module.finrank R g.ker + let e : (Fin m → R) ≃ₗ[R] g.ker := (Module.finBasis R g.ker).equivFun.symm + let f : (Fin m → R) →ₗ[R] (Fin n → R) := g.ker.subtype.comp e.toLinearMap + refine ⟨n,m,f,g,g.ker.subtype_injective.comp e.injective,hg,?_⟩ + ext x + constructor + · rintro ⟨y,rfl⟩ + exact (e y).property + · intro hx + exact ⟨e.symm ⟨x,hx⟩, congrArg Subtype.val (e.apply_symm_apply _)⟩ + +end LeftPrincipal + +section Localization +variable [IsPrincipalIdealRing R] +local instance principalModulesOreSet : OreLocalization.OreSet (nonZeroDivisors R) := + principalOreSet +open OreLocalization + +abbrev FractionRing (R : Type*) [Ring R] [IsDomain R] [IsPrincipalIdealRing R] := + OreLocalization (nonZeroDivisors R) R + +variable (M : Type*) [AddCommGroup M] [Module R M] + +def moduleNumerator : M →ₗ[R] OreLocalization (nonZeroDivisors R) M where + toFun m := m /ₒ (1 : nonZeroDivisors R) + map_add' _ _ := add_oreDiv.symm + map_smul' _ _ := (smul_oreDiv_one _ _).symm + +lemma numerator_eq_zero_iff (m : M) : moduleNumerator (R := R) M m = 0 ↔ + ∃ a : R, a ≠ 0 ∧ a • m = 0 := by + change m /ₒ (1 : nonZeroDivisors R) = 0 ↔ _ + rw [← zero_oreDiv (1 : nonZeroDivisors R), oreDiv_eq_iff] + constructor + · rintro ⟨u,v,hu,hv⟩ + have huv : (u : R) = v := by simpa using hv + exact ⟨v, huv ▸ nonZeroDivisors.coe_ne_zero u, by simpa using hu.symm⟩ + · rintro ⟨a,ha,ham⟩ + exact ⟨⟨a,mem_nonZeroDivisors_of_ne_zero ha⟩,a,by simp [ham],by simp⟩ + +lemma localization_finite [Module.Finite R M] : + Module.Finite (FractionRing R) (OreLocalization (nonZeroDivisors R) M) := by + classical + obtain ⟨n,v,hv⟩ := Module.Finite.exists_fin (R := R) (M := M) + let K := Submodule.span (FractionRing R) (Set.range (moduleNumerator (R := R) M ∘ v)) + have hm (m : M) : moduleNumerator (R := R) M m ∈ K := by + have hmem : m ∈ Submodule.span R (Set.range v) := by rw [hv]; trivial + induction hmem using Submodule.span_induction with + | mem x hx => + obtain ⟨i,rfl⟩ := hx + exact Submodule.subset_span ⟨i,rfl⟩ + | zero => simp + | add x y hx hy hx' hy' => simpa using K.add_mem hx' hy' + | smul a x hx hx' => + have := K.smul_mem (a /ₒ (1 : nonZeroDivisors R)) hx' + change (a • x) /ₒ (1 : nonZeroDivisors R) ∈ K + simpa only [moduleNumerator, LinearMap.coe_mk, AddHom.coe_mk, smul_div_one] using this + have hK : K = ⊤ := by + apply top_unique + intro x hx + induction x using OreLocalization.ind with + | c m s => + have := K.smul_mem ((1 : R) /ₒ s) (hm m) + simpa [moduleNumerator, smul_div_one] using this + exact Module.Finite.of_fg_top + (Submodule.fg_iff_exists_fin_generating_family.mpr ⟨n,_,hK⟩) + +variable [IsPrincipalIdealRing Rᵐᵒᵖ] + +omit [IsPrincipalIdealRing R] in +lemma common_right_multiple (a b : R) (ha : a ≠ 0) (hb : b ≠ 0) : + ∃ u v : R, u ≠ 0 ∧ v ≠ 0 ∧ a * u = b * v := by + obtain ⟨u,v,hu,hv,h⟩ := common_left_multiple (MulOpposite.op a) (MulOpposite.op b) + (by simpa using ha) (by simpa using hb) + exact ⟨u.unop,v.unop,by simpa using hu,by simpa using hv, + congrArg MulOpposite.unop h⟩ + +lemma right_denominator (q : FractionRing R) : + ∃ b : R, b ≠ 0 ∧ ∃ a : R, + q * OreLocalization.numeratorRingHom b = OreLocalization.numeratorRingHom a := by + induction q using OreLocalization.ind with + | c r s => + by_cases hr : r = 0 + · exact ⟨1,one_ne_zero,0,by simp [hr]⟩ + obtain ⟨u,v,hu,hv,h⟩ := common_right_multiple r s hr (nonZeroDivisors.coe_ne_zero s) + refine ⟨u,hu,v,?_⟩ + change (r /ₒ s) * (u /ₒ (1 : nonZeroDivisors R)) = v /ₒ (1 : nonZeroDivisors R) + rw [mul_div_one,h] + simpa [Submonoid.smul_def, smul_eq_mul] using (OreLocalization.expand' v (1 : nonZeroDivisors R) s).symm + +lemma common_right_denominator (s : Finset (FractionRing R)) : + ∃ b : R, b ≠ 0 ∧ ∀ q ∈ s, ∃ a : R, + q * OreLocalization.numeratorRingHom b = OreLocalization.numeratorRingHom a := by + classical + induction s using Finset.induction_on with + | empty => exact ⟨1,one_ne_zero,by simp⟩ + | @insert q s hqs ih => + obtain ⟨b,hb,hb'⟩ := ih + obtain ⟨d,hd,a,ha⟩ := right_denominator q + obtain ⟨u,v,hu,hv,he⟩ := common_right_multiple b d hb hd + refine ⟨b*u,mul_ne_zero hb hu,?_⟩ + intro z hz + obtain rfl | hz := Finset.mem_insert.mp hz + · refine ⟨a*v,?_⟩ + rw [he,map_mul,←mul_assoc,ha,map_mul] + · obtain ⟨c,hc⟩ := hb' z hz + refine ⟨c*u,?_⟩ + rw [map_mul,←mul_assoc,hc,map_mul] + +lemma integral_coordinate [Module.Finite R M] + (g : M →ₗ[R] FractionRing R) : + ∃ f : M →ₗ[R] R, ∀ m, f m = 0 ↔ g m = 0 := by + classical + obtain ⟨n,v,hv⟩ := Module.Finite.exists_fin (R := R) (M := M) + obtain ⟨b,hb,hb'⟩ := common_right_denominator (Finset.univ.image (g ∘ v)) + let ν : R →ₗ[R] FractionRing R := moduleNumerator (R := R) R + have hν : Function.Injective ν := OreLocalization.numeratorHom_inj inf_le_left + let h : M →ₗ[R] FractionRing R := (LinearMap.mulRight R (ν b)).comp g + have hmem (m : M) : h m ∈ ν.range := by + have hvm : m ∈ Submodule.span R (Set.range v) := by rw [hv]; trivial + induction hvm using Submodule.span_induction with + | mem x hx => + obtain ⟨j,rfl⟩ := hx + obtain ⟨a,ha⟩ := hb' (g (v j)) (Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩) + exact ⟨a,ha.symm⟩ + | zero => simp + | add x y hx hy hx' hy' => simpa only [map_add] using ν.range.add_mem hx' hy' + | smul a x hx hx' => simpa only [map_smul] using ν.range.smul_mem a hx' + let e : R ≃ₗ[R] ν.range := LinearEquiv.ofInjective ν hν + let f : M →ₗ[R] R := e.symm.toLinearMap.comp (h.codRestrict ν.range hmem) + have hfh (m : M) : ν (f m) = h m := by + exact congrArg Subtype.val (e.apply_symm_apply ⟨h m,hmem m⟩) + have hνb : ν b ≠ 0 := by + intro he + exact hb (hν (he.trans (map_zero ν).symm)) + refine ⟨f,?_⟩ + intro m + constructor + · intro hm + have he : h m = 0 := by rw [←hfh,hm,map_zero] + exact (mul_eq_zero.mp he).resolve_right hνb + · intro hm + apply hν + rw [hfh,map_zero] + change g m * ν b = 0 + rw [hm,zero_mul] + +lemma torsion_kernel_map [Module.Finite R M] : + ∃ (n : ℕ) (f : M →ₗ[R] (Fin n → R)), + ∀ m, f m = 0 ↔ ∃ a : R, a ≠ 0 ∧ a • m = 0 := by + classical + let := localization_finite (R := R) M + let Q := FractionRing R + let V := OreLocalization (nonZeroDivisors R) M + let n := Module.finrank Q V + let e : V ≃ₗ[Q] (Fin n → Q) := (Module.finBasis Q V).equivFun + let g : M →ₗ[R] (Fin n → Q) := + (e.restrictScalars R).toLinearMap.comp (moduleNumerator (R := R) M) + have hi (i : Fin n) := integral_coordinate M ((LinearMap.proj i).comp g) + choose f hf using hi + refine ⟨n,LinearMap.pi f,?_⟩ + intro m + rw [←numerator_eq_zero_iff] + constructor + · intro hm + apply e.injective + rw [map_zero] + funext i + exact (hf i m).mp (congrFun hm i) + · intro hm + apply funext + intro i + apply (hf i m).mpr + change e (moduleNumerator (R := R) M m) i = 0 + rw [hm,map_zero] + rfl + +end Localization + +theorem torsion_free_decomposition [IsPrincipalIdealRing R] [IsPrincipalIdealRing Rᵐᵒᵖ] + (M : Type*) [AddCommGroup M] [Module R M] [Module.Finite R M] : + ∃ (T Q : Submodule R M), IsCompl T Q ∧ IsTorsionModule R T ∧ + Module.Free R Q ∧ Module.Finite R Q := by + classical + obtain ⟨n,f,hf⟩ := torsion_kernel_map (R := R) M + obtain ⟨hfree,hfin⟩ := finite_free_submodule n f.range + let := hfree + let := hfin + let φ : M →ₗ[R] f.range := f.rangeRestrict + have hφ : Function.Surjective φ := by + rintro ⟨y,x,rfl⟩ + exact ⟨x,rfl⟩ + obtain ⟨s,hs⟩ := φ.exists_rightInverse_of_surjective (LinearMap.range_eq_top.mpr hφ) + have hsf (y : f.range) : φ (s y) = y := LinearMap.congr_fun hs y + have hsi : Function.Injective s := by + intro x y hxy + have := congrArg φ hxy + simpa [hsf] using this + refine ⟨φ.ker,s.range,?_,?_,Module.Free.of_equiv (LinearEquiv.ofInjective s hsi), + Module.Finite.equiv (LinearEquiv.ofInjective s hsi)⟩ + · constructor + · apply Submodule.disjoint_def.mpr + intro x hx hxs + obtain ⟨y,rfl⟩ := hxs + have hy : y = 0 := (hsf y).symm.trans hx + simp [hy] + · rw [codisjoint_iff] + apply top_unique + intro m hm + apply Submodule.mem_sup.mpr + refine ⟨m-s (φ m),?_,s (φ m),⟨φ m,rfl⟩,by simp⟩ + simp [LinearMap.mem_ker,hsf] + · intro m + have hfm : f m = 0 := congrArg Subtype.val m.property + obtain ⟨a,ha,ham⟩ := (hf m).mp hfm + exact ⟨a,ha,Subtype.ext ham⟩ + +end HahnWilson.PrincipalModules + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/SourceCriterion.lean b/lean/OAI/CategoryTheory/ThickClosure/SourceCriterion.lean new file mode 100644 index 0000000000000000000000000000000000000000..4226a9a7bdd464c4a791a21a8e12b5dabdb7c296 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/SourceCriterion.lean @@ -0,0 +1,93 @@ +import OAI.CategoryTheory.ThickClosure.PerfectModules + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.SourceCriterion +section SourceData +open CategoryTheory CategoryTheory.Limits CategoryTheory.Pretriangulated +open HahnWilson.LaurentDg HahnWilson.PeriodicDerived HahnWilson.PeriodicDual +universe u c h + +@[instance_reducible] noncomputable def chosenLocalization (R : Type u) [Ring R] (D : ℕ) : + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{u+1} := + MorphismProperty.HasLocalization.standard _ +attribute [local instance] chosenLocalization + +abbrev DgDerived (R : Type u) [Ring R] (D : ℕ) := LaurentDg.Derived R D + +abbrev Perf (R : Type u) [Ring R] (D : ℕ) := + ObjectProperty.FullSubcategory (IsPerfect R D) + +abbrev inclusion (R : Type u) [Ring R] (D : ℕ) : Perf R D ⥤ DgDerived R D := + ObjectProperty.ι (IsPerfect R D) + +lemma coefficient_perfect (R : Type u) [Ring R] (D : ℕ) : + IsPerfect R D (HahnWilson.LaurentCriterion.B R D) := by + classical + refine ⟨cell R D 0, FiniteCell.free ⟨?_, ?_⟩, + ⟨Retract.ofIso (HahnWilson.LaurentCriterion.coefficientIso R D)⟩⟩ + · exact HahnWilson.PeriodicSplitting.diagonalComplex_d _ + · intro i + change Module.Free R (PLift (i = 0) → R) ∧ Module.Finite R (PLift (i = 0) → R) + exact ⟨inferInstance, inferInstance⟩ + +noncomputable def B₀ (R : Type u) [Ring R] (D : ℕ) : Perf R D := + ⟨HahnWilson.LaurentCriterion.B R D, coefficient_perfect R D⟩ + +abbrev H (R : Type u) [Ring R] (D : ℕ) (n : ℤ) : Perf R D ⥤ ModuleCat.{u} R := + inclusion R D ⋙ LaurentDg.derivedHomology n + +def HdualMap (R : Type u) [Ring R] (D : ℕ) + {M N : Perf R D} (f : M ⟶ N) (n : ℤ) := + HahnWilson.LaurentCriterion.dualHomologyMap R D ((inclusion R D).map f) (-n) + +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] [IsIdempotentComplete C] + +def Exact (R : Type u) [Ring R] (D : ℕ) (Ψ : C ⥤ Perf R D) + [(Ψ ⋙ inclusion R D).CommShift ℤ] : Prop := + ∀ T : Triangle C, T ∈ distTriang C → + (Ψ ⋙ inclusion R D).mapTriangle.obj T ∈ HahnWilson.CyclicTriangle.distinguished R D + +end SourceData +open CategoryTheory CategoryTheory.Limits +open HahnWilson.PrincipalModules +universe u c h +attribute [local instance] chosenLocalization +variable (S₀ : Type u) [Ring S₀] [IsDomain S₀] + [IsPrincipalIdealRing S₀] [IsPrincipalIdealRing S₀ᵐᵒᵖ] +variable (D₀ : ℕ) (hD₀ : 0 < D₀) (heven : Even D₀) +variable (C : Type c) [Category.{h} C] [HasZeroObject C] [HasShift C ℤ] + [Preadditive C] [∀ (n : ℤ), (shiftFunctor C n).Additive] + [Pretriangulated C] [IsTriangulated C] [IsIdempotentComplete C] +include hD₀ heven in + +theorem finite_tower_criterion (T₀ U₀ : C) (Ψ : C ⥤ Perf S₀ᵐᵒᵖ D₀) + [(Ψ ⋙ inclusion S₀ᵐᵒᵖ D₀).CommShift ℤ] + (hΨ : Exact C S₀ᵐᵒᵖ D₀ Ψ) (eT : Ψ.obj T₀ ≅ B₀ S₀ᵐᵒᵖ D₀) + (htor : ∀ n : ℤ, IsTorsionModule S₀ᵐᵒᵖ ((H S₀ᵐᵒᵖ D₀ n).obj (Ψ.obj U₀))) + (hnonzero : ∃ n : ℤ, ¬ IsZero ((H S₀ᵐᵒᵖ D₀ n).obj (Ψ.obj U₀))) + (htests : ∀ P, HahnWilson.FiniteTower.Thick C T₀ P → ∀ g : U₀ ⟶ P, + (∀ n : ℤ, (H S₀ᵐᵒᵖ D₀ n).map (Ψ.map g) = 0) → + ∀ n : ℤ, HdualMap S₀ᵐᵒᵖ D₀ (Ψ.map g) n = 0) : + ¬ HahnWilson.FiniteTower.Thick C T₀ U₀ := by + apply HahnWilson.LaurentCriterion.finite_tower_criterion S₀ D₀ hD₀ heven C + T₀ U₀ (Ψ ⋙ inclusion S₀ᵐᵒᵖ D₀) + · exact ⟨fun X => (Ψ.obj X).property, hΨ⟩ + · exact (inclusion S₀ᵐᵒᵖ D₀).mapIso eT + · exact htor + · exact hnonzero + · intro P hP g hg n + obtain ⟨m, rfl⟩ : ∃ m : ℤ, -m = n := ⟨-n, Int.neg_neg n⟩ + exact htests P hP g hg m +end HahnWilson.SourceCriterion + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/Unroll.lean b/lean/OAI/CategoryTheory/ThickClosure/Unroll.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb2fa5c100443baccd6b98a1322f7d7b5880f9d5 --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/Unroll.lean @@ -0,0 +1,77 @@ +import OAI.CategoryTheory.ThickClosure.CyclicStructure + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.Unroll +universe u +variable (R : Type u) [Ring R] (D : ℕ) +abbrev PC := ChainComplex (ModuleCat.{u} R) (ZMod D) + +def obj (P : PC R D) : CochainComplex (ModuleCat.{u} R) ℤ := + CochainComplex.of (fun n : ℤ => P.X (-(n : ZMod D))) + (fun n => P.d (-(n : ZMod D)) (-((n + 1 : ℤ) : ZMod D))) + (fun _ => P.d_comp_d _ _ _) + +def map {P Q : PC R D} (f : P ⟶ Q) : obj R D P ⟶ obj R D Q := + CochainComplex.ofHom (fun n => f.f (-(n : ZMod D))) (by + intro n + simpa only [obj, CochainComplex.of_d] using + (f.comm (-(n : ZMod D)) (-((n + 1 : ℤ) : ZMod D)))) + +def functor : PC R D ⥤ CochainComplex (ModuleCat.{u} R) ℤ where + obj := obj R D + map := map R D + map_id P := by ext n; rfl + map_comp f g := by ext n; rfl + +def scIso (n : ℤ) : functor R D ⋙ + shortComplexFunctor' (ModuleCat.{u} R) (.up ℤ) (n-1) n (n+1) ≅ + shortComplexFunctor' (ModuleCat.{u} R) (.down (ZMod D)) + (-((n-1 : ℤ) : ZMod D)) (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) := by + refine NatIso.ofComponents (fun P => ?_) ?_ + · refine ShortComplex.isoMk (Iso.refl _) (Iso.refl _) (Iso.refl _) ?_ ?_ + · simp [shortComplexFunctor', functor, obj, CochainComplex.of.d] + · simp [shortComplexFunctor', functor, obj, CochainComplex.of.d] + · intro P Q f + apply ShortComplex.hom_ext <;> simp [functor, map, ShortComplex.isoMk, shortComplexFunctor', obj] + +def homologyIso (n : ℤ) : + functor R D ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.up ℤ) n ≅ + HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) (-(n : ZMod D)) := + Functor.isoWhiskerLeft (functor R D) + (homologyFunctorIso' (ModuleCat.{u} R) (.up ℤ) (n-1) n (n+1) (by simp) (by simp)) ≪≫ + (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (scIso R D n) _ ≪≫ + (homologyFunctorIso' (ModuleCat.{u} R) (.down (ZMod D)) + (-((n-1 : ℤ) : ZMod D)) (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) + (by simp; abel) (by simp; abel)).symm + +theorem homology_iso (n : ℤ) : Nonempty + (functor R D ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.up ℤ) n ≅ + HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) (-(n : ZMod D))) := + ⟨homologyIso R D n⟩ + +theorem map_quasiIso {P Q : PC R D} (f : P ⟶ Q) [QuasiIso f] : + QuasiIso ((functor R D).map f) := by + rw [quasiIso_iff] + intro n + rw [quasiIsoAt_iff_isIso_homologyMap] + let e := homologyIso R D n + let F := functor R D ⋙ HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.up ℤ) n + let G := HomologicalComplex.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) (-(n : ZMod D)) + change IsIso (F.map f) + have h : F.map f ≫ (e.app Q).hom = (e.app P).hom ≫ G.map f := e.hom.naturality f + have : IsIso (G.map f) := inferInstanceAs (IsIso (homologyMap f (-(n : ZMod D)))) + have : IsIso (F.map f ≫ (e.app Q).hom) := h.symm ▸ inferInstance + exact (isIso_comp_right_iff (F.map f) (e.app Q).hom).mp inferInstance + +end HahnWilson.Unroll + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/ThickClosure/UnrollDerived.lean b/lean/OAI/CategoryTheory/ThickClosure/UnrollDerived.lean new file mode 100644 index 0000000000000000000000000000000000000000..e54eb26c31a3a03d071128150b97f0dbd41eb27d --- /dev/null +++ b/lean/OAI/CategoryTheory/ThickClosure/UnrollDerived.lean @@ -0,0 +1,169 @@ +import OAI.CategoryTheory.ThickClosure.CyclicShift +import OAI.CategoryTheory.ThickClosure.DerivedHom + +namespace OAI + +noncomputable section +open scoped BigOperators nonZeroDivisors +open LinearMap Submodule +open CategoryTheory CategoryTheory.Limits HomologicalComplex + +namespace HahnWilson.Unroll +section DerivedFunctor +open CategoryTheory CategoryTheory.Limits HomologicalComplex +universe u v w +variable (R : Type u) [Ring R] (D : ℕ) +variable [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] + [HasDerivedCategory.{v} (ModuleCat.{u} R)] + +abbrev PD := HomologicalComplexUpToQuasiIso (ModuleCat.{u} R) (.down (ZMod D)) +abbrev q : PC R D ⥤ PD R D := HomologicalComplexUpToQuasiIso.Q + +omit [(HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).HasLocalization.{w}] in +lemma inverts_quasiIso : + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))).IsInvertedBy + (functor R D ⋙ DerivedCategory.Q) := by + intro P Q f hf + have : QuasiIso f := (mem_quasiIso_iff f).mp hf + have := map_quasiIso R D f + exact inferInstanceAs (IsIso (DerivedCategory.Q.map ((functor R D).map f))) + +def derivedFunctor : PD R D ⥤ DerivedCategory (ModuleCat.{u} R) := + Localization.lift (functor R D ⋙ DerivedCategory.Q) (inverts_quasiIso R D) (q R D) + +def derivedFactors : q R D ⋙ derivedFunctor R D ≅ functor R D ⋙ DerivedCategory.Q := + Localization.fac (functor R D ⋙ DerivedCategory.Q) (inverts_quasiIso R D) (q R D) + +def derivedHomologyIso (n : ℤ) : + derivedFunctor R D ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n ≅ + HomologicalComplexUpToQuasiIso.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) + (-(n : ZMod D)) := by + let W := HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D)) + let F := derivedFunctor R D ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n + let G := HomologicalComplexUpToQuasiIso.homologyFunctor (ModuleCat.{u} R) + (.down (ZMod D)) (-(n : ZMod D)) + let H := HomologicalComplex.homologyFunctor (ModuleCat.{u} R) + (.down (ZMod D)) (-(n : ZMod D)) + let e : q R D ⋙ F ≅ H := + (Functor.associator _ _ _).symm ≪≫ + Functor.isoWhiskerRight (derivedFactors R D) _ ≪≫ + Functor.associator _ _ _ ≪≫ + Functor.isoWhiskerLeft (functor R D) + (DerivedCategory.homologyFunctorFactors (ModuleCat.{u} R) n) ≪≫ + homologyIso R D n + letI : Localization.Lifting (q R D) W H F := ⟨e⟩ + letI : Localization.Lifting (q R D) W H G := + ⟨HomologicalComplexUpToQuasiIso.homologyFunctorFactors (ModuleCat.{u} R) + (.down (ZMod D)) (-(n : ZMod D))⟩ + exact Localization.liftNatIso (q R D) W H H F G (Iso.refl _) + +theorem derived_homology_iso (n : ℤ) : Nonempty + (derivedFunctor R D ⋙ DerivedCategory.homologyFunctor (ModuleCat.{u} R) n ≅ + HomologicalComplexUpToQuasiIso.homologyFunctor (ModuleCat.{u} R) (.down (ZMod D)) + (-(n : ZMod D))) := + ⟨derivedHomologyIso R D n⟩ + +instance : (derivedFunctor R D).CommShift ℤ := by + letI : Localization.Lifting (q R D) + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) + (Unroll.functor R D ⋙ DerivedCategory.Q) (derivedFunctor R D) := + ⟨derivedFactors R D⟩ + exact Functor.commShiftOfLocalization (q R D) + (HomologicalComplex.quasiIso (ModuleCat.{u} R) (.down (ZMod D))) ℤ + (Unroll.functor R D ⋙ DerivedCategory.Q) (derivedFunctor R D) +end DerivedFunctor +open CategoryTheory CategoryTheory.Limits HomologicalComplex +universe u +variable (R : Type u) [Ring R] (D : ℕ) + +lemma down_rel (n : ℤ) : (ComplexShape.down (ZMod D)).Rel + (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) := by + simp [ComplexShape.down_Rel] + +lemma up_rel (n : ℤ) : (ComplexShape.up ℤ).Rel n (n+1) := rfl + +def coneXIso {P Q : PC R D} (f : P ⟶ Q) (n : ℤ) : + (obj R D (homotopyCofiber f)).X n ≅ + (CochainComplex.mappingCone (map R D f)).X n := + homotopyCofiber.XIsoBiprod f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) (down_rel D n) ≪≫ + (homotopyCofiber.XIsoBiprod (map R D f) n (n+1) (up_rel n)).symm + +@[simp] lemma obj_d (P : PC R D) (n : ℤ) : + (obj R D P).d n (n+1) = P.d (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) := by + simp [obj, CochainComplex.of_d] + +@[simp] lemma map_f {P Q : PC R D} (f : P ⟶ Q) (n : ℤ) : + (map R D f).f n = f.f (-(n : ZMod D)) := rfl + +lemma coneXIso_comm {P Q : PC R D} (f : P ⟶ Q) (n : ℤ) : + (coneXIso R D f n).hom ≫ (CochainComplex.mappingCone (map R D f)).d n (n+1) = + (obj R D (homotopyCofiber f)).d n (n+1) ≫ (coneXIso R D f (n+1)).hom := by + simp only [coneXIso] + erw [obj_d] + change + ((homotopyCofiber.XIsoBiprod f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) + (down_rel D n)).hom ≫ + (homotopyCofiber.XIsoBiprod (map R D f) n (n+1) (up_rel n)).inv) ≫ + homotopyCofiber.d (map R D f) n (n+1) = + homotopyCofiber.d f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) ≫ + ((homotopyCofiber.XIsoBiprod f (-((n+1 : ℤ) : ZMod D)) + (-((n+1+1 : ℤ) : ZMod D)) (down_rel D (n+1))).hom ≫ + (homotopyCofiber.XIsoBiprod (map R D f) (n+1) (n+1+1) (up_rel (n+1))).inv) + apply (cancel_epi (homotopyCofiber.XIsoBiprod f (-(n : ZMod D)) + (-((n+1 : ℤ) : ZMod D)) (down_rel D n)).inv).mp + erw [Category.assoc, Iso.inv_hom_id_assoc] + apply biprod.hom_ext' + all_goals + apply homotopyCofiber.ext_to_X (map R D f) (n+1) (n+1+1) (up_rel (n+1)) + all_goals + simp [homotopyCofiber.inlX_d_assoc f _ _ _ (down_rel D n) (down_rel D (n+1))] + repeat erw [Category.assoc] + try erw [homotopyCofiber.inlX_XIsoBiprod_hom_assoc f _ _ (down_rel D (n+1))] + try erw [homotopyCofiber.inrX_XIsoBiprod_hom_assoc f _ _ (down_rel D (n+1))] + try erw [homotopyCofiber.inl_XIsoBiprod_inv_assoc (map R D f) (n+1) n (up_rel n)] + try erw [homotopyCofiber.inr_XIsoBiprod_inv_assoc (map R D f) (n+1) n (up_rel n)] + try erw [homotopyCofiber.inl_XIsoBiprod_inv_assoc (map R D f) (n+1+1) (n+1) (up_rel (n+1))] + try erw [homotopyCofiber.inr_XIsoBiprod_inv_assoc (map R D f) (n+1+1) (n+1) (up_rel (n+1))] + simp [homotopyCofiber.inlX_d_assoc (map R D f) n (n+1) (n+1+1) (up_rel n) (up_rel (n+1))] + all_goals simp [obj] + all_goals + erw [homotopyCofiber.inl_XIsoBiprod_inv_assoc (map R D f) + (n+1+1) (n+1) (up_rel (n+1))] + · erw [homotopyCofiber.inrX_fstX, homotopyCofiber.inlX_fstX] + simp + erw [Limits.comp_zero, add_zero] + · erw [homotopyCofiber.inlX_sndX, homotopyCofiber.inrX_sndX] + simp + rfl + +def coneIso {P Q : PC R D} (f : P ⟶ Q) : + obj R D (homotopyCofiber f) ≅ CochainComplex.mappingCone (map R D f) := + Hom.isoOfComponents (coneXIso R D f) (by + intro i j hij + have hj : i+1 = j := hij + subst j + exact coneXIso_comm R D f i) + +lemma coneIso_inr {P Q : PC R D} (f : P ⟶ Q) : + map R D (homotopyCofiber.inr f) ≫ (coneIso R D f).hom = + CochainComplex.mappingCone.inr (map R D f) := by + apply Hom.ext + funext n + change homotopyCofiber.inrX f (-(n : ZMod D)) ≫ (coneXIso R D f n).hom = + homotopyCofiber.inrX (map R D f) n + change homotopyCofiber.inrX f (-(n : ZMod D)) ≫ + ((homotopyCofiber.XIsoBiprod f (-(n : ZMod D)) (-((n+1 : ℤ) : ZMod D)) (down_rel D n)).hom ≫ + (homotopyCofiber.XIsoBiprod (map R D f) n (n+1) (up_rel n)).inv) = _ + erw [← Category.assoc, homotopyCofiber.inrX_XIsoBiprod_hom] + exact homotopyCofiber.inr_XIsoBiprod_inv (map R D f) (n+1) n (up_rel n) + +theorem cone_iso {P Q : PC R D} (f : P ⟶ Q) : + ∃ e : obj R D (homotopyCofiber f) ≅ CochainComplex.mappingCone (map R D f), + map R D (homotopyCofiber.inr f) ≫ e.hom = CochainComplex.mappingCone.inr (map R D f) := + ⟨coneIso R D f, coneIso_inr R D f⟩ + +end HahnWilson.Unroll + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/AlexanderWhitney.lean b/lean/OAI/CategoryTheory/Thomason/AlexanderWhitney.lean new file mode 100644 index 0000000000000000000000000000000000000000..38ae9f657447227a33a55b07302457fa8d585590 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/AlexanderWhitney.lean @@ -0,0 +1,822 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.ModelClasses + +namespace OAI + +/-! Alexander Whitney. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] {D : Type v} [PartialOrder D] + +lemma awZeroWord_map (θ : E →o Fin 2) (f : D →o E) {l : List D} + (h : l.Pairwise (· ≤ ·)) : + awZeroWord θ (l.map f) = map f (awZeroWord (θ.comp f) l) := by + have he : (∀ a ∈ l.map f, θ a = 0) ↔ (∀ a ∈ l, (θ.comp f) a = 0) := by + simp only [List.mem_map, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂, + OrderHom.comp_coe, Function.comp_apply] + unfold awZeroWord + simp only [he] + split + · exact (map_bracket f h).symm + · exact (map_zero _).symm + +lemma awEdgeWord_map (θ : E →o Fin 2) (f : D →o E) {l : List D} + (h : l.Pairwise (· ≤ ·)) : + awEdgeWord θ (l.map f) = map f (awEdgeWord (θ.comp f) l) := by + cases l using List.reverseRecOn with + | nil => simp + | append_singleton l a => + rw [List.map_append, List.map_singleton, awEdgeWord_append, awEdgeWord_append] + change (if θ (f a) = 0 then 0 else awZeroWord θ (l.map f)) = + map f (if θ (f a) = 0 then 0 else awZeroWord (θ.comp f) l) + split + · exact (map_zero _).symm + · exact awZeroWord_map θ f (List.pairwise_append.mp h).1 + +lemma awZero_map (θ : E →o Fin 2) (f : D →o E) (c : Chains D) : + awZero θ (map f c) = map f (awZero (θ.comp f) c) := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • bracket l.val := by + rw [bracket_of_pairwise l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul] + congr 1 + rw [map_bracket f (l.property.imp fun h => le_of_lt h), awZero_bracket, + awZero_bracket, awZeroWord_map θ f (l.property.imp fun h => le_of_lt h)] + +lemma awEdge_map (θ : E →o Fin 2) (f : D →o E) (c : Chains D) : + awEdge θ (map f c) = map f (awEdge (θ.comp f) c) := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • bracket l.val := by + rw [bracket_of_pairwise l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul] + congr 1 + have hl := l.property.imp fun h => le_of_lt h + rw [map_bracket f hl, + awEdge_bracket θ (List.pairwise_map.mpr (hl.imp fun h => f.monotone h)), + awEdge_bracket (θ.comp f) hl, awEdgeWord_map θ f hl] + +lemma awHom_naturality (θ : E →o Fin 2) (f : D →o E) : + DirectedComplex.Hom.comp (complexMap f) (awHom θ) = + DirectedComplex.Hom.comp (awHom (θ.comp f)) (complexMap f).cylinder := by + ext p c + cases p with + | zero => + apply Prod.ext <;> apply Subtype.ext + · exact awZero_map θ f c.val + · change map f c.val - awZero θ (map f c.val) = + map f (c.val - awZero (θ.comp f) c.val) + rw [map_sub, awZero_map] + | succ p => + apply Prod.ext + · exact Subtype.ext (awZero_map θ f c.val) + · apply Prod.ext + · apply Subtype.ext + change map f c.val - awZero θ (map f c.val) = + map f (c.val - awZero (θ.comp f) c.val) + rw [map_sub, awZero_map] + · exact Subtype.ext (awEdge_map θ f c.val) + +lemma awHom_projection (θ : E →o Fin 2) : + DirectedComplex.Hom.comp (awHom θ) (complex E).cylinderProjection = + DirectedComplex.Hom.id (complex E) := by + ext p c + cases p <;> apply Subtype.ext <;> + change awZero θ c.val + (c.val - awZero θ c.val) = c.val <;> abel + +lemma awZero_const_zero (c : Chains E) : + awZero (OrderHom.const E (0 : Fin 2)) c = c := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + rw [map_add, ih] + congr 1 + change Finsupp.linearCombination ℤ _ (Finsupp.single l z) = _ + rw [Finsupp.linearCombination_single, awZeroWord_of_all _ (by simp)] + rw [bracket_of_pairwise l.property] + simp + +lemma awEdge_const_zero (c : Chains E) : + awEdge (OrderHom.const E (0 : Fin 2)) c = 0 := by + classical + rw [awEdge, Finsupp.linearCombination_apply, Finsupp.sum] + apply Finset.sum_eq_zero + intro w _ + rw [awEdgeWord_of_all _ (by simp), smul_zero] + +lemma awZero_const_one_of_grade {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+1)) : + awZero (OrderHom.const E (1 : Fin 2)) c = 0 := by + classical + rw [awZero, Finsupp.linearCombination_apply, Finsupp.sum] + apply Finset.sum_eq_zero + intro w hw + have hl := (mem_grade_iff (p+1) c).mp hc w (Finsupp.mem_support_iff.mp hw) + have hn : w.val ≠ [] := by intro he; simp [he] at hl + rw [awZeroWord_of_not_all, smul_zero] + intro h + obtain ⟨a, ha⟩ := List.exists_mem_of_ne_nil w.val hn + simpa using h a ha + +lemma awEdge_const_one_of_grade {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) : + awEdge (OrderHom.const E (1 : Fin 2)) c = 0 := by + classical + rw [awEdge, Finsupp.linearCombination_apply, Finsupp.sum] + apply Finset.sum_eq_zero + intro w hw + have hl := (mem_grade_iff (p+2) c).mp hc w (Finsupp.mem_support_iff.mp hw) + suffices awEdgeWord (OrderHom.const E (1 : Fin 2)) w.val = 0 by rw [this, smul_zero] + rcases w with ⟨w, hws⟩ + cases w using List.reverseRecOn with + | nil => simp at hl + | append_singleton l a => + rw [awEdgeWord_append] + change (if (1 : Fin 2) = 0 then 0 else awZeroWord (OrderHom.const E 1) l) = 0 + rw [ite_eq_right (by decide : (1 : Fin 2) ≠ 0)] + apply awZeroWord_of_not_all + intro h + have hn : l ≠ [] := by intro he; simp [he] at hl + obtain ⟨b, hb⟩ := List.exists_mem_of_ne_nil l hn + simpa using h b hb + +lemma awHom_endpoint (b : Bool) : + awHom (OrderHom.const E (if b then (1 : Fin 2) else 0)) = + (complex E).cylinderEndpoint b := by + ext p c + cases p with + | zero => + cases b <;> apply Prod.ext <;> apply Subtype.ext + · exact awZero_const_zero c.val + · change c.val - awZero (OrderHom.const E (0 : Fin 2)) c.val = 0 + rw [awZero_const_zero, sub_self] + · exact awZero_const_one_of_grade c.property + · change c.val - awZero (OrderHom.const E (1 : Fin 2)) c.val = c.val + rw [awZero_const_one_of_grade c.property, sub_zero] + | succ p => + cases b + · apply Prod.ext + · exact Subtype.ext (awZero_const_zero c.val) + · apply Prod.ext <;> apply Subtype.ext + · change c.val - awZero (OrderHom.const E (0 : Fin 2)) c.val = 0 + rw [awZero_const_zero, sub_self] + · exact awEdge_const_zero c.val + · apply Prod.ext + · exact Subtype.ext (awZero_const_one_of_grade c.property) + · apply Prod.ext <;> apply Subtype.ext + · change c.val - awZero (OrderHom.const E (1 : Fin 2)) c.val = c.val + rw [awZero_const_one_of_grade c.property, sub_zero] + · exact awEdge_const_one_of_grade c.property + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] + +def supportedOn (S : Set E) : Submodule ℤ (Chains E) := + Finsupp.supported ℤ ℤ {w : Word E | ∀ a ∈ w.val, a ∈ S} + +lemma mem_supportedOn_iff (S : Set E) (c : Chains E) : + c ∈ supportedOn S ↔ ∀ w, c w ≠ 0 → ∀ a ∈ w.val, a ∈ S := by + simp only [supportedOn, Finsupp.mem_supported, Set.subset_def, Finsupp.mem_support_iff, + Finset.mem_coe, Set.mem_ofPred_eq] + +lemma bracket_mem_supportedOn {S : Set E} {l : List E} + (h : ∀ a ∈ l, a ∈ S) : bracket l ∈ supportedOn S := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [bracket_of_pairwise hs] + exact Finsupp.single_mem_supported ℤ 1 h + · rw [bracket_of_not_pairwise hs] + exact Submodule.zero_mem _ + +lemma faces_mem_submodule {D : Type v} (Q : Submodule ℤ (Chains E)) + (H : List D → Chains E) (l : List D) + (hH : ∀ m, m.Sublist l → H m ∈ Q) : faces H l ∈ Q := by + induction l generalizing H with + | nil => exact Q.zero_mem + | cons a l ih => + rw [faces_cons] + apply Q.sub_mem + · exact hH l (List.sublist_cons_self a l) + · apply ih + intro m hm + exact hH (a :: m) (List.Sublist.cons_cons a hm) + +lemma wordBoundary_mem_supportedOn {S : Set E} {l : List E} + (h : ∀ a ∈ l, a ∈ S) : wordBoundary l ∈ supportedOn S := by + rw [← faces_bracket] + apply faces_mem_submodule + intro m hm + exact bracket_mem_supportedOn (fun a ha => h a (hm.subset ha)) + +lemma boundary_mem_supportedOn {S : Set E} {c : Chains E} (hc : c ∈ supportedOn S) : + boundary c ∈ supportedOn S := by + classical + rw [boundary, Finsupp.linearCombination_apply, Finsupp.sum] + apply Submodule.sum_mem + intro w hw + apply Submodule.smul_mem + exact wordBoundary_mem_supportedOn ((mem_supportedOn_iff S c).mp hc w + (Finsupp.mem_support_iff.mp hw)) + +lemma bracket_apply [DecidableEq E] (l : List E) (w : Word E) : + bracket l w = if l = w.val then 1 else 0 := by + classical + by_cases he : l = w.val + · subst l + rw [bracket_of_pairwise w.property] + simp + · by_cases hs : l.Pairwise (· < ·) + · rw [bracket_of_pairwise hs] + have hn : (⟨l, hs⟩ : Word E) ≠ w := fun h => he (congrArg Subtype.val h) + simp [he, hn] + · simp [bracket_of_not_pairwise hs, he] + +lemma prepend_apply_zero (a : E) (c : Chains E) (w : Word E) + (h : ∀ l : List E, a :: l ≠ w.val) : prepend a c w = 0 := by + classical + rw [prepend, Finsupp.linearCombination_apply, Finsupp.sum] + simp only [Finset.sum_apply, Finsupp.coe_finsetSum] + apply Finset.sum_eq_zero + intro t _ + simp only [Finsupp.smul_apply, smul_eq_mul, bracket_apply, ite_eq_right (h t.val), mul_zero] + +def tailWord (w : Word E) : Word E := ⟨w.val.tail, w.property.tail⟩ + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [LinearOrder E] + +lemma wordBoundary_leading {a b : E} {l : List E} (h : (a :: b :: l).Pairwise (· < ·)) + (t : Word E) (ht : b :: l ≤ t.val) : + wordBoundary (a :: b :: l) t = if (b :: l) = t.val then 1 else 0 := by + have hz : prepend a (wordBoundary (b :: l)) t = 0 := by + apply prepend_apply_zero + intro q hq + have hab : a < b := (List.pairwise_cons.mp h).1 b (by simp) + have hlt : a :: q < b :: l := List.Lex.rel hab + exact (not_lt_of_ge ht) (hq ▸ hlt) + rw [wordBoundary_cons, Finsupp.sub_apply, hz, sub_zero, bracket_apply] + +lemma wordBoundary_leading' (w t : Word E) (hn : 2 ≤ w.val.length) + (ht : tailWord w ≤ t) : + wordBoundary w.val t = if tailWord w = t then 1 else 0 := by + rcases w with ⟨w, hw⟩ + cases w with + | nil => simp at hn + | cons a w => + cases w with + | nil => simp at hn + | cons b l => + rw [wordBoundary_leading hw t ht] + congr 1 + exact propext ⟨fun h => Subtype.ext h, fun h => congrArg Subtype.val h⟩ + +lemma tailWord_not_supported {S : Set E} (hS : IsLowerSet S) (w : Word E) + (hn : 2 ≤ w.val.length) (hw : ¬∀ a ∈ w.val, a ∈ S) : + ¬∀ a ∈ (tailWord w).val, a ∈ S := by + rcases w with ⟨w, hp⟩ + cases w with + | nil => simp at hn + | cons a w => + cases w with + | nil => simp at hn + | cons b l => + intro h + apply hw + intro c hc + simp only [List.mem_cons] at hc + rcases hc with rfl | hc + · apply hS (le_of_lt ((List.pairwise_cons.mp hp).1 b (by simp))) + exact h b (by simp [tailWord]) + · exact h c (by simpa only [tailWord, List.tail_cons, List.mem_cons] using hc) + +lemma positive_supportedOn_of_boundary {S : Set E} (hS : IsLowerSet S) + {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) (hp : Positive c) + (hd : boundary c ∈ supportedOn S) : c ∈ supportedOn S := by + classical + rw [mem_supportedOn_iff] + by_contra hn + push Not at hn + obtain ⟨w, hw, a, ha, hna⟩ := hn + let T := c.support.filter (fun t => ¬∀ b ∈ t.val, b ∈ S) + have hwT : w ∈ T := by + exact Finset.mem_filter.mpr ⟨Finsupp.mem_support_iff.mpr hw, fun h => hna (h a ha)⟩ + have hT : (T.image tailWord).Nonempty := (show T.Nonempty from ⟨w, hwT⟩).image tailWord + let t : Word E := (T.image tailWord).max' hT + have htmem : t ∈ T.image tailWord := Finset.max'_mem _ _ + obtain ⟨w₀, hw₀, hwt⟩ := Finset.mem_image.mp htmem + have hw₀c : c w₀ ≠ 0 := Finsupp.mem_support_iff.mp (Finset.mem_filter.mp hw₀).1 + have hw₀len : w₀.val.length = p+2 := (mem_grade_iff (p+2) c).mp hc w₀ hw₀c + have htS : ¬∀ b ∈ t.val, b ∈ S := by + rw [← hwt] + exact tailWord_not_supported hS w₀ (by omega) (Finset.mem_filter.mp hw₀).2 + have hmax : ∀ s ∈ T, tailWord s ≤ t := by + intro s hs + exact Finset.le_max' _ _ (Finset.mem_image.mpr ⟨s, hs, rfl⟩) + have hcoef : ∀ s ∈ c.support, 0 ≤ wordBoundary s.val t := by + intro s hs + by_cases hsin : ∀ b ∈ s.val, b ∈ S + · have hbd := wordBoundary_mem_supportedOn hsin + have he : wordBoundary s.val t = 0 := by + by_contra he + exact htS ((mem_supportedOn_iff S _).mp hbd t he) + rw [he] + · have hlen := (mem_grade_iff (p+2) c).mp hc s (Finsupp.mem_support_iff.mp hs) + rw [wordBoundary_leading' s t (by omega) (hmax s (Finset.mem_filter.mpr ⟨hs, hsin⟩))] + split <;> omega + have hpos : 0 < (boundary c) t := by + rw [boundary, Finsupp.linearCombination_apply, Finsupp.sum] + simp only [Finset.sum_apply, Finsupp.coe_finsetSum, Finsupp.smul_apply, smul_eq_mul] + apply Finset.sum_pos' + · intro s hs + exact mul_nonneg (hp s) (hcoef s hs) + · refine ⟨w₀, (Finset.mem_filter.mp hw₀).1, ?_⟩ + rw [wordBoundary_leading' w₀ t (by omega) (hmax w₀ hw₀), ite_eq_left hwt, mul_one] + exact lt_of_le_of_ne (hp w₀) (Ne.symm hw₀c) + exact htS ((mem_supportedOn_iff S _).mp hd t (ne_of_gt hpos)) + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] + +def subsetWordEmbedding (S : Set E) : Word S ↪ Word E := + wordEmbedding (OrderEmbedding.subtype S) + +lemma mem_range_subsetWordEmbedding (S : Set E) (w : Word E) + (h : ∀ a ∈ w.val, a ∈ S) : w ∈ Set.range (subsetWordEmbedding S) := by + let l : List S := w.val.attach.map (fun a => ⟨a.val, h a.val a.property⟩) + have hl : l.map Subtype.val = w.val := by simp [l, List.map_map] + have hp : l.Pairwise (· < ·) := by + have hh := hl ▸ w.property + change l.Pairwise (fun a b : S => a.val < b.val) + exact List.pairwise_map.mp hh + refine ⟨⟨l, hp⟩, ?_⟩ + exact Subtype.ext hl + +def restrictChain (S : Set E) : Chains E →ₗ[ℤ] Chains S := + Finsupp.lcomapDomain (subsetWordEmbedding S) (subsetWordEmbedding S).injective + +@[simp] lemma restrictChain_apply (S : Set E) (c : Chains E) (w : Word S) : + restrictChain S c w = c (subsetWordEmbedding S w) := rfl + +lemma map_restrictChain (S : Set E) {c : Chains E} (hc : c ∈ supportedOn S) : + map (OrderEmbedding.subtype S).toOrderHom (restrictChain S c) = c := by + rw [map_orderEmbedding] + apply Finsupp.mapDomain_comapDomain (subsetWordEmbedding S) + (subsetWordEmbedding S).injective c + intro w hw + exact mem_range_subsetWordEmbedding S w ((mem_supportedOn_iff S c).mp hc w + (Finsupp.mem_support_iff.mp hw)) + +lemma restrictChain_mem_grade (S : Set E) {p : ℕ} {c : Chains E} + (hc : c ∈ grade p) : restrictChain S c ∈ grade p := by + rw [mem_grade_iff] + intro w hw + have h := (mem_grade_iff p c).mp hc (subsetWordEmbedding S w) hw + change (w.val.map Subtype.val).length = p at h + simpa only [List.length_map] using h + +lemma restrictChain_positive (S : Set E) {c : Chains E} (hc : Positive c) : + Positive (restrictChain S c) := fun w => hc (subsetWordEmbedding S w) + +lemma map_mem_supportedOn (S : Set E) (c : Chains S) : + map (OrderEmbedding.subtype S).toOrderHom c ∈ supportedOn S := by + classical + rw [map_orderEmbedding, mem_supportedOn_iff] + intro w hw + have hr : w ∈ Set.range (subsetWordEmbedding S) := by + by_contra hr + exact hw (Finsupp.mapDomain_of_notMem_range c w hr) + obtain ⟨s, rfl⟩ := hr + intro a ha + obtain ⟨b, _, hb⟩ := List.mem_map.mp ha + exact hb ▸ b.property + +def restrictGrade (S : Set E) (p : ℕ) : + (complex E).Chain p →+ (complex S).Chain p where + toFun c := ⟨restrictChain S c.val, restrictChain_mem_grade S c.property⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' x y := Subtype.ext (map_add _ x.val y.val) + +lemma complexMap_restrictGrade (S : Set E) (p : ℕ) (c : (complex E).Chain p) + (hc : c.val ∈ supportedOn S) : + (complexMap (OrderEmbedding.subtype S).toOrderHom).map p (restrictGrade S p c) = c := + Subtype.ext (map_restrictChain S hc) + +open DirectedComplex + +def restrictTable (S : Set E) (x : Table (complex E)) + (hx : ∀ p b, (x.row p b).val ∈ supportedOn S) : Table (complex S) where + row p b := restrictGrade S p (x.row p b) + positive p b := restrictChain_positive S (x.positive p b) + boundary p b := by + apply complexMap_orderEmbedding_injective (OrderEmbedding.subtype S) p + rw [(complexMap (OrderEmbedding.subtype S).toOrderHom).map_d p + (restrictGrade S (p+1) (x.row (p+1) b)), + complexMap_restrictGrade S (p+1) _ (hx (p+1) b), x.boundary, map_sub, + complexMap_restrictGrade S p _ (hx p true), + complexMap_restrictGrade S p _ (hx p false)] + augmentation b := by + rw [← (complexMap (OrderEmbedding.subtype S).toOrderHom).map_augmentation, + complexMap_restrictGrade S 0 _ (hx 0 b)] + exact x.augmentation b + bounded := by + obtain ⟨k, hk⟩ := x.bounded + refine ⟨k, fun p hp b => ?_⟩ + rw [hk p hp b, map_zero] + +lemma table_map_restrictTable (S : Set E) (x : Table (complex E)) + (hx : ∀ p b, (x.row p b).val ∈ supportedOn S) : + (complexMap (OrderEmbedding.subtype S).toOrderHom).table (restrictTable S x hx) = x := by + ext p b + exact complexMap_restrictGrade S p _ (hx p b) + +lemma table_map_orderEmbedding_injective {D : Type v} [PartialOrder D] (f : E ↪o D) : + Function.Injective (complexMap f.toOrderHom).table := by + intro x y h + ext p b + apply complexMap_orderEmbedding_injective f p + exact congrArg (fun z => z.row p b) h + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [LinearOrder E] +open DirectedComplex + +lemma table_supportedOn_lower {S : Set E} (hS : IsLowerSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∀ p b, (x.row p b).val ∈ supportedOn S := by + intro p + induction p with + | zero => exact hx + | succ p ih => + intro b + apply positive_supportedOn_of_boundary hS (x.row (p+1) b).property (x.positive _ _) + have hb := congrArg Subtype.val (x.boundary p b) + change boundary (x.row (p+1) b).val = (x.row p true).val - (x.row p false).val at hb + rw [hb] + exact (supportedOn S).sub_mem (ih true) (ih false) + +lemma table_initial_segment_unique_lift {S : Set E} (hS : IsLowerSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∃! y : Table (complex S), + (complexMap (OrderEmbedding.subtype S).toOrderHom).table y = x := by + refine ⟨restrictTable S x (table_supportedOn_lower hS x hx), + table_map_restrictTable S x _, ?_⟩ + intro y hy + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S) + exact hy.trans (table_map_restrictTable S x _).symm + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] + +def reverseWord : Word E ≃ Word Eᵒᵈ where + toFun w := ⟨w.val.reverse, List.pairwise_reverse.mpr w.property⟩ + invFun w := ⟨w.val.reverse, List.pairwise_reverse.mpr w.property⟩ + left_inv w := Subtype.ext (List.reverse_reverse w.val) + right_inv w := Subtype.ext (List.reverse_reverse w.val) + +def reverseChain : Chains E ≃ₗ[ℤ] Chains Eᵒᵈ := Finsupp.domLCongr reverseWord + +@[simp] lemma reverseChain_apply (c : Chains E) (w : Word Eᵒᵈ) : + reverseChain c w = c (reverseWord.symm w) := rfl + +lemma reverseChain_bracket (l : List E) : + reverseChain (bracket l) = bracket (E := Eᵒᵈ) l.reverse := by + classical + by_cases hp : l.Pairwise (· < ·) + · rw [bracket_of_pairwise hp] + change Finsupp.domLCongr reverseWord (Finsupp.single ⟨l,hp⟩ 1) = _ + rw [Finsupp.domLCongr_single] + exact (bracket_of_pairwise (List.pairwise_reverse.mpr hp)).symm + · have hr : ¬l.reverse.Pairwise (fun a b : Eᵒᵈ => a < b) := by + intro hr + exact hp (List.pairwise_reverse.mp + (show l.reverse.Pairwise (fun a b : E => b < a) from hr)) + simp only [bracket_of_not_pairwise hp, bracket_of_not_pairwise hr, map_zero] + +lemma reverseChain_mem_grade {k : ℕ} {c : Chains E} (hc : c ∈ grade k) : + reverseChain c ∈ grade k := by + rw [mem_grade_iff] + intro w hw + have h := (mem_grade_iff k c).mp hc (reverseWord.symm w) hw + change w.val.reverse.length = k at h + simpa only [List.length_reverse] using h + +lemma reverseChain_positive {c : Chains E} (hc : Positive c) : + Positive (reverseChain c) := fun w => hc (reverseWord.symm w) + +lemma reverseChain_supportedOn {S : Set E} {c : Chains E} + (hc : c ∈ supportedOn S) : reverseChain c ∈ supportedOn (E := Eᵒᵈ) S := by + apply (mem_supportedOn_iff (E := Eᵒᵈ) S (reverseChain c)).mpr + intro w hw a ha + apply (mem_supportedOn_iff S c).mp hc (reverseWord.symm w) hw a + exact List.mem_reverse.mpr ha + +lemma supportedOn_of_reverseChain {S : Set E} {c : Chains E} + (hc : reverseChain c ∈ supportedOn (E := Eᵒᵈ) S) : c ∈ supportedOn S := by + rw [mem_supportedOn_iff] + intro w hw a ha + have hz : reverseChain c (reverseWord w) ≠ 0 := by simpa using hw + apply (mem_supportedOn_iff (E := Eᵒᵈ) S _).mp hc (reverseWord w) hz a + exact List.mem_reverse.mpr ha + +section +omit [PartialOrder E] +variable {M : Type v} [AddCommGroup M] + +lemma faces_reverse (H : List E → M) (l : List E) : + faces H l.reverse = -((-1 : ℤ)^l.length) • faces (fun m => H m.reverse) l := by + induction l generalizing H with + | nil => simp + | cons a l ih => + rw [List.reverse_cons, faces_append_singleton, ih] + simp only [List.length_reverse, List.length_cons, pow_succ, mul_neg, mul_one, + neg_neg, faces_cons, List.reverse_cons, smul_sub, neg_smul] + abel + +end + +lemma wordBoundary_reverse (l : List E) : + wordBoundary (E := Eᵒᵈ) l.reverse = + -((-1 : ℤ)^l.length) • reverseChain (wordBoundary l) := by + calc + _ = faces (fun m : List E => bracket (E := Eᵒᵈ) m) l.reverse := + (faces_bracket (E := Eᵒᵈ) l.reverse).symm + _ = -((-1 : ℤ)^l.length) • + faces (fun m => bracket (E := Eᵒᵈ) m.reverse) l := faces_reverse _ l + _ = _ := by + congr 1 + have h := faces_hom reverseChain.toAddMonoidHom bracket l + change reverseChain (faces bracket l) = + faces (fun m => reverseChain (bracket m)) l at h + simp only [reverseChain_bracket, faces_bracket] at h + exact h.symm + +lemma boundary_reverseChain {k : ℕ} {c : Chains E} (hc : c ∈ grade k) : + boundary (reverseChain c) = -((-1 : ℤ)^k) • reverseChain (boundary c) := by + classical + have he : c = c.sum (fun w z => z • bracket w.val) := by + rw [Finsupp.sum] + conv_lhs => rw [← Finsupp.sum_single c] + apply Finset.sum_congr rfl + intro w _ + rw [bracket_of_pairwise w.property] + simp + rw [he] + simp only [Finsupp.sum, map_sum, map_smul, Finset.smul_sum] + apply Finset.sum_congr rfl + intro w hw + have hk := (mem_grade_iff k c).mp hc w (Finsupp.mem_support_iff.mp hw) + have hb := boundary_bracket (E := Eᵒᵈ) (l := w.val.reverse) + (List.pairwise_reverse.mpr (w.property.imp le_of_lt)) + rw [reverseChain_bracket, hb, wordBoundary_reverse w.val, hk, + boundary_bracket (w.property.imp le_of_lt), smul_comm] + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [LinearOrder E] + +lemma positive_supportedOn_of_boundary_upper {S : Set E} (hS : IsUpperSet S) + {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) (hp : Positive c) + (hd : boundary c ∈ supportedOn S) : c ∈ supportedOn S := by + apply supportedOn_of_reverseChain + apply positive_supportedOn_of_boundary (E := Eᵒᵈ) hS + (reverseChain_mem_grade hc) (reverseChain_positive hp) + rw [boundary_reverseChain hc] + exact (supportedOn (E := Eᵒᵈ) S).smul_mem _ (reverseChain_supportedOn hd) + +open DirectedComplex + +lemma table_supportedOn_upper {S : Set E} (hS : IsUpperSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∀ p b, (x.row p b).val ∈ supportedOn S := by + intro p + induction p with + | zero => exact hx + | succ p ih => + intro b + apply positive_supportedOn_of_boundary_upper hS + (x.row (p+1) b).property (x.positive _ _) + have hb := congrArg Subtype.val (x.boundary p b) + change boundary (x.row (p+1) b).val = (x.row p true).val - (x.row p false).val at hb + rw [hb] + exact (supportedOn S).sub_mem (ih true) (ih false) + +lemma table_final_segment_unique_lift {S : Set E} (hS : IsUpperSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∃! y : Table (complex S), + (complexMap (OrderEmbedding.subtype S).toOrderHom).table y = x := by + refine ⟨restrictTable S x (table_supportedOn_upper hS x hx), + table_map_restrictTable S x _, ?_⟩ + intro y hy + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S) + exact hy.trans (table_map_restrictTable S x _).symm + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] + +lemma augmentation_eq_sum {c : Chains E} (hc : c ∈ grade 1) : + emptyCoefficient (boundary c) = c.sum (fun _ z => z) := by + classical + rw [boundary, Finsupp.linearCombination_apply, Finsupp.sum, map_sum, Finsupp.sum] + apply Finset.sum_congr rfl + intro w hw + have hlen := (mem_grade_iff 1 c).mp hc w (Finsupp.mem_support_iff.mp hw) + obtain ⟨a, ha⟩ := List.length_eq_one_iff.mp hlen + rw [ha] + simp [wordBoundary_cons, wordBoundary_nil, emptyCoefficient_bracket] + +lemma positive_mass_one {c : Chains E} (hp : Positive c) + (hc : c.sum (fun _ z => z) = 1) : ∃ w : Word E, c = Finsupp.single w 1 := by + classical + have hne : c ≠ 0 := by intro h; simp [h] at hc + obtain ⟨w, hw⟩ := Finsupp.ne_iff.mp hne + change c w ≠ 0 at hw + have hws : w ∈ c.support := Finsupp.mem_support_iff.mpr hw + have hle : c w ≤ 1 := by + rw [← hc, Finsupp.sum] + exact Finset.single_le_sum (fun s _ => hp s) hws + have hw1 : c w = 1 := by have := hp w; omega + have he : ∑ s ∈ c.support.erase w, c s = 0 := by + have h := Finset.sum_erase_add c.support (fun s => c s) hws + rw [show ∑ s ∈ c.support, c s = 1 from hc, hw1] at h + omega + refine ⟨w, ?_⟩ + ext t + by_cases ht : t = w + · subst t; simpa using hw1 + · rw [Finsupp.single_eq_of_ne ht] + by_cases hts : t ∈ c.support + · have htle := Finset.single_le_sum (s := c.support.erase w) + (fun s _ => hp s) (Finset.mem_erase.mpr ⟨ht, hts⟩) + have htn := hp t + omega + · exact Finsupp.notMem_support_iff.mp hts + +lemma positive_augmentation_one {c : Chains E} (hc : c ∈ grade 1) + (hp : Positive c) (ha : emptyCoefficient (boundary c) = 1) : + ∃ a : E, c = bracket [a] := by + rw [augmentation_eq_sum hc] at ha + obtain ⟨w, hw⟩ := positive_mass_one hp ha + have hlen : w.val.length = 1 := by + apply (mem_grade_iff 1 c).mp hc w + rw [hw, Finsupp.single_eq_same] + norm_num + obtain ⟨a, he⟩ := List.length_eq_one_iff.mp hlen + refine ⟨a, ?_⟩ + rw [hw, ← he, bracket_of_pairwise w.property] + +open DirectedComplex + +lemma table_zero_row_vertex (x : Table (complex E)) (b : Bool) : + ∃ a : E, (x.row 0 b).val = bracket [a] := + positive_augmentation_one (x.row 0 b).property (x.positive 0 b) (x.augmentation b) + +def vertexTable (a : E) : Table (complex E) where + row p _ := match p with + | 0 => ⟨bracket [a], bracket_mem_grade [a]⟩ + | _+1 => 0 + positive p b := by + cases p with + | zero => + change Positive (bracket [a]) + exact bracket_positive [a] + | succ p => exact (complex E).positive (p+1) |>.zero_mem + boundary p b := by + cases p with + | zero => + apply Subtype.ext + change boundary 0 = bracket [a] - bracket [a] + simp + | succ p => simp only [map_zero, sub_self] + augmentation b := by + change emptyCoefficient (boundary (bracket [a])) = 1 + rw [boundary_bracket (by simp)] + simp [wordBoundary, emptyCoefficient_bracket] + bounded := ⟨0, by intros p hp b; cases p <;> first | omega | rfl⟩ + +@[simp] lemma vertexTable_row_zero (a : E) (b : Bool) : + (vertexTable a).row 0 b = + (⟨bracket [a], bracket_mem_grade [a]⟩ : (complex E).Chain 0) := by + rfl + +lemma vertexTable_row_pos (a : E) {p : ℕ} (hp : 0 < p) (b : Bool) : + (vertexTable a).row p b = 0 := by cases p <;> first | omega | rfl + +lemma vertexTable_source (a : E) : Table.truncate 0 false (vertexTable a) = vertexTable a := by + ext p b + cases p with + | zero => rfl + | succ p => simp [vertexTable_row_pos a (by omega : 0 < p+1)] + +lemma bracket_singleton_injective : Function.Injective (fun a : E => bracket [a]) := by + classical + intro a b h + have he := congrArg (fun c : Chains E => c ⟨[a], by simp⟩) h + by_contra hn + have hl : [b] ≠ [a] := by simpa [eq_comm] using hn + simp [bracket_apply, hl] at he + +def tableObjectsEquiv : (complex E).nu.Objects ≃ E where + toFun x := Classical.choose (table_zero_row_vertex x.val false) + invFun a := ⟨vertexTable a, vertexTable_source a⟩ + left_inv x := by + apply Subtype.ext + let a := Classical.choose (table_zero_row_vertex x.val false) + have he : vertexTable a = Table.truncate 0 false x.val := by + ext p b + cases p with + | zero => + apply Subtype.ext + change bracket [a] = (x.val.row 0 false).val + exact (Classical.choose_spec (table_zero_row_vertex x.val false)).symm + | succ p => + change (vertexTable a).row (p+1) b = 0 + exact vertexTable_row_pos a (by omega) b + exact he.trans x.property + right_inv a := by + apply bracket_singleton_injective + exact (Classical.choose_spec (table_zero_row_vertex (vertexTable a) false)).symm + +end Thomason.NormalizedChains + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/AtomFibers.lean b/lean/OAI/CategoryTheory/Thomason/AtomFibers.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7e834ac474d0b813d0d55a27e3c00a4c07c37f5 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/AtomFibers.lean @@ -0,0 +1,770 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.CoreCouniversality + +namespace OAI + +/-! Atom Fibers. -/ + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits AbstractTransfer +attribute [local instance] Cardinal.fact_isRegular_aleph0 Cardinal.orderBotAleph0OrdToType + +theorem finitePosetComparisonOfCore (T : RightIntervalCore.{u}) (n : ℕ) + (hS : T.SimplexDescent n) (hn : 1 ≤ n) : + PosetComparison (categorificationFinite.{u} n) (streetNerveFinite n) + (categorificationFiniteAdjunction n) := by + let := T.rightAdjoint + exact { + unit_weak := posetCategorificationFiniteUnit_weakEquivalence n hn + attachment_mono := AttachmentComparison.finite_nerve_attachment_mono n hn + comparison := AttachmentComparison.core_gray_comparison_local T + T.tensor.rightAdjoint (Adjunction.ofIsLeftAdjoint T.tensor) n hS hn } + +def finiteEndpointOfCore (T : RightIntervalCore.{u}) (n : ℕ) + (hS : T.SimplexDescent n) (hn : 1 ≤ n) : + ExactModelEndpoint (thomasonLeftFinite.{u} n) (thomasonRightFinite n) + (thomasonFiniteAdjunction n) := by + letI : MorphismProperty.IsCardinalForSmallObjectArgument + (hornImages (L (categorificationFinite.{u} n))) Cardinal.aleph0.{u} := + thomasonHornFinite_smallCardinal n + letI : MorphismProperty.IsCardinalForSmallObjectArgument + (boundaryImages (L (categorificationFinite.{u} n))) Cardinal.aleph0.{u} := + thomasonBoundaryFinite_smallCardinal n + exact AbstractTransfer.exactEndpoint (finitePosetComparisonOfCore T n hS hn) + +def exactEndpointTwo : + ExactModelEndpoint (thomasonLeftFinite.{u} 2) (thomasonRightFinite 2) + (thomasonFiniteAdjunction 2) := + finiteEndpointOfCore GrayRecursive.IntervalHom.intervalCore 2 + RightIntervalCore.intervalCore_simplexDescent_two (by omega) + +theorem endpointTwo : Nonempty + (ExactModelEndpoint (thomasonLeftFinite.{u} 2) (thomasonRightFinite 2) + (thomasonFiniteAdjunction 2)) := ⟨exactEndpointTwo⟩ +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory.Functor +open CategoryTheory + +variable {C D : OmegaCategory.{u}} (F : C ⟶ D) + +lemma onCells_injective_mono {n k : ℕ} (hkn : k ≤ n) + (h : Function.Injective (F.onCells n)) : Function.Injective (F.onCells k) := by + intro x y he + have heq : F.map x.val = F.map y.val := congrArg Subtype.val he + apply Subtype.ext + exact congrArg (fun z : C.Cells n => z.val) (h + (a₁ := ⟨x.val,C.source_fixed_upwards hkn x.property⟩) + (a₂ := ⟨y.val,C.source_fixed_upwards hkn y.property⟩) + (Subtype.ext heq)) + +lemma onCells_injective_of_map_injective (h : Function.Injective F.map) (n : ℕ) : + Function.Injective (F.onCells n) := by + intro x y he + exact Subtype.ext (h (congrArg Subtype.val he)) + +lemma map_surjective_of_onCells_surjective + (h : ∀ n, Function.Surjective (F.onCells n)) : Function.Surjective F.map := by + intro y + obtain ⟨n,hn⟩ := D.finite_dimension y + obtain ⟨x,hx⟩ := h n ⟨y,hn⟩ + exact ⟨x.val,congrArg Subtype.val hx⟩ + +lemma map_injective_of_onCells_injective {n : ℕ} (hn : C.IsTruncated n) + (h : Function.Injective (F.onCells n)) : Function.Injective F.map := by + intro x y he + exact congrArg Subtype.val + (h (a₁ := ⟨x,hn x⟩) (a₂ := ⟨y,hn y⟩) (Subtype.ext he)) + +lemma onCells_injective_of_isIso [IsIso F] (n : ℕ) : + Function.Injective (F.onCells n) := by + apply F.onCells_injective_of_map_injective + intro x y he + have hx := congrArg (fun G : C ⟶ C => G.map x) (IsIso.hom_inv_id F) + have hy := congrArg (fun G : C ⟶ C => G.map y) (IsIso.hom_inv_id F) + change (inv F).map (F.map x) = x at hx + change (inv F).map (F.map y) = y at hy + exact hx.symm.trans ((congrArg (inv F).map he).trans hy) + +end Thomason.OmegaCategory.Functor + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table OmegaCategory NormalizedChains + +lemma chainComparison_finiteSimplex_surjective_of_lower_injective + (P : Type u) [LinearOrder P] [Finite P] (n : ℕ) + (h : ∀ k, k < n → Function.Injective + ((chainComparison (NormalizedChains.complex P)).onCells k)) : + Function.Surjective ((chainComparison (NormalizedChains.complex P)).onCells n) := by + let := Fintype.ofFinite P + by_cases he : Fintype.card P = 0 + · let : IsEmpty P := Fintype.card_eq_zero_iff.mp he + intro t + exact isEmptyElim (PosetTables.tableStart + ((NormalizedChains.complex P).cylinderProjection.table t.val)) + · have hp : Fintype.card P = (Fintype.card P - 1) + 1 := by omega + let e := Fintype.orderIsoFinOfCardEq P hp + apply (Prism.Basis.ofOrderIso e).surjective_onCells_of_lower_injective + (chainComparison (NormalizedChains.complex P)) n h + intro b hb + obtain ⟨x,hx⟩ := chainComparison_atom_lift e b + exact ⟨⟨x.val, (tensorFunctor.obj (NormalizedChains.complex P).nu).source_fixed_upwards hb x.property⟩,hx⟩ + +lemma chainComparison_finiteSimplex_isIso_of_injective + (P : Type u) [LinearOrder P] [Finite P] + (h : Function.Injective (chainComparison (NormalizedChains.complex P)).map) : + IsIso (chainComparison (NormalizedChains.complex P)) := by + exact (OmegaCategory.isoOfBijective (chainComparison (NormalizedChains.complex P)) + ⟨h,(chainComparison (NormalizedChains.complex P)).map_surjective_of_onCells_surjective + (fun n => chainComparison_finiteSimplex_surjective_of_lower_injective P n + (fun k _ => (chainComparison (NormalizedChains.complex P)).onCells_injective_of_map_injective h k))⟩).isIso_hom + +lemma chainComparison_injective_of_higher_crossing {M : DirectedComplex.{u}} + (h : ∀ n : ℕ, 3 ≤ n → ∀ x y : (tensorFunctor.obj M.nu).Cells n, + tensorLabel x.val false = 0 → tensorLabel x.val true = 1 → + tensorLabel y.val false = 0 → tensorLabel y.val true = 1 → + (chainComparison M).map x.val = (chainComparison M).map y.val → x = y) : + Function.Injective (chainComparison M).map := by + apply chainComparison_injective_of_crossing + intro x y hxs hxt hys hyt he + obtain ⟨i,hi⟩ := (tensorFunctor.obj M.nu).finite_dimension x + obtain ⟨j,hj⟩ := (tensorFunctor.obj M.nu).finite_dimension y + by_cases hb : max i j ≤ 2 + · exact chainComparison_twocells_injective x y + ((tensorFunctor.obj M.nu).source_fixed_upwards (by omega) hi) + ((tensorFunctor.obj M.nu).source_fixed_upwards (by omega) hj) he + · exact congrArg Subtype.val (h (max i j) (by omega) + ⟨x,(tensorFunctor.obj M.nu).source_fixed_upwards (le_max_left i j) hi⟩ + ⟨y,(tensorFunctor.obj M.nu).source_fixed_upwards (le_max_right i j) hj⟩ + hxs hxt hys hyt he) + +theorem fullMain_of_standard_higher_crossing_injective + (h : ∀ m n : ℕ, 3 ≤ n → + ∀ x y : (tensorFunctor.obj (NormalizedChains.complex (ULift.{u} (Fin (m+3)))).nu).Cells n, + tensorLabel x.val false = 0 → tensorLabel x.val true = 1 → + tensorLabel y.val false = 0 → tensorLabel y.val true = 1 → + (chainComparison (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).map x.val = + (chainComparison (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).map y.val → x = y) : + FullMain.{u} := by + apply fullMain_of_standardSimplexComparison_isIso + intro m + exact chainComparison_finiteSimplex_isIso_of_injective _ + (chainComparison_injective_of_higher_crossing (h m)) + +theorem fullMain_of_standard_top_crossing_injective + (h : ∀ m : ℕ, + ∀ x y : (tensorFunctor.obj (NormalizedChains.complex (ULift.{u} (Fin (m+3)))).nu).Cells (m+3), + tensorLabel x.val false = 0 → tensorLabel x.val true = 1 → + tensorLabel y.val false = 0 → tensorLabel y.val true = 1 → + (chainComparison (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).map x.val = + (chainComparison (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).map y.val → x = y) : + FullMain.{u} := by + apply fullMain_of_standardSimplexComparison_isIso + intro m + apply chainComparison_finiteSimplex_isIso_of_injective + apply chainComparison_injective_of_crossing + intro x y hxs hxt hys hyt he + have hb : (tensorFunctor.obj (NormalizedChains.complex (ULift.{u} (Fin (m+3)))).nu).IsTruncated (m+3) := + tensor_truncated (NormalizedChains.table_truncated_of_card_le (n := m+2) (by simp)) + exact congrArg Subtype.val (h m ⟨x,hb x⟩ ⟨y,hb y⟩ hxs hxt hys hyt he) + +lemma chainComparison_precomp_bijective_of_injective + (P : Type u) [LinearOrder P] [Finite P] (n : ℕ) + (h : Function.Injective ((chainComparison (NormalizedChains.complex P)).onCells n)) + (Y : OmegaCategory.{u}) (hY : Y.IsTruncated n) : + Function.Bijective (fun G : (NormalizedChains.complex P).cylinder.nu ⟶ Y => + chainComparison (NormalizedChains.complex P) ≫ G) := by + let F := chainComparison (NormalizedChains.complex P) + have hs : ∀ k, k ≤ n+1 → Function.Surjective (F.onCells k) := by + intro k hk + apply chainComparison_finiteSimplex_surjective_of_lower_injective P k + intro j hj + exact F.onCells_injective_mono (by omega : j ≤ n) h + exact F.precomp_bijective_truncated ⟨h,hs n (by omega)⟩ (hs (n+1) le_rfl) hY + +lemma chainComparison_onCells_injective_of_iso {M N : DirectedComplex.{u}} + (e : M ≅ N) (n : ℕ) + (h : Function.Injective ((chainComparison M).onCells n)) : + Function.Injective ((chainComparison N).onCells n) := by + have : IsIso (tensorFunctor.map e.inv.nu) := + show IsIso ((DirectedComplex.nuFunctor ⋙ tensorFunctor).map e.inv) from inferInstance + intro x y he + apply (tensorFunctor.map e.inv.nu).onCells_injective_of_isIso n + apply h + apply Subtype.ext + have hn := chainComparison_natural e.inv + have hx := congrArg (fun F : tensorFunctor.obj N.nu ⟶ M.cylinder.nu => F.map x.val) hn + have hy := congrArg (fun F : tensorFunctor.obj N.nu ⟶ M.cylinder.nu => F.map y.val) hn + change (chainComparison M).map ((tensorFunctor.map e.inv.nu).map x.val) = + e.inv.cylinder.nu.map ((chainComparison N).map x.val) at hx + change (chainComparison M).map ((tensorFunctor.map e.inv.nu).map y.val) = + e.inv.cylinder.nu.map ((chainComparison N).map y.val) at hy + change (chainComparison M).map ((tensorFunctor.map e.inv.nu).map x.val) = + (chainComparison M).map ((tensorFunctor.map e.inv.nu).map y.val) + exact hx.trans ((congrArg e.inv.cylinder.nu.map (congrArg Subtype.val he)).trans hy.symm) + +lemma chainComparison_onCells_injective_of_standard (n : ℕ) + (h : ∀ m : ℕ, Function.Injective ((chainComparison + (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).onCells n)) + (P : Type u) [LinearOrder P] [Finite P] : + Function.Injective ((chainComparison (NormalizedChains.complex P)).onCells n) := by + let := Fintype.ofFinite P + by_cases hs : Fintype.card P ≤ 2 + · let := chainComparison_small_isIso P hs + exact (chainComparison (NormalizedChains.complex P)).onCells_injective_of_isIso n + · have hp : Fintype.card P = (Fintype.card P - 3) + 3 := by omega + exact chainComparison_onCells_injective_of_iso (NormalizedChains.complexFinIso P hp) n + (h (Fintype.card P - 3)) + +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory GrayRecursive.IntervalHom + +def finiteEndpointOfStandardInjectivity (n : ℕ) (hn : 1 ≤ n) + (h : ∀ m : ℕ, Function.Injective ((chainComparison + (NormalizedChains.complex (ULift.{u} (Fin (m+3))))).onCells n)) : + ExactModelEndpoint (thomasonLeftFinite.{u} n) (thomasonRightFinite n) + (thomasonFiniteAdjunction n) := by + apply finiteEndpointOfCore intervalCore n ?_ hn + intro P _ _ Y hY + exact chainComparison_precomp_bijective_of_injective _ n + (chainComparison_onCells_injective_of_standard n h _) Y hY +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.RankedAtoms +open Table +variable {K : DirectedComplex.{u}} (A : RankedAtoms.{u,v} K) +include A + +lemma atom_face_coefficient_pos (b : A.Index) (p : ℕ) (hp : p < A.dim b) (e : Bool) : + ∃ c : A.Index, 0 < A.coefficient c p ((A.atom b).row p e) := by + induction p with + | zero => + by_contra hn + push Not at hn + have he : (A.atom b).row 0 e = 0 := by + apply A.ext 0 + intro c + rw [map_zero] + have hx := (A.positive 0 _).mp ((A.atom b).positive 0 e) c + exact le_antisymm (hn c) hx + have ha := (A.atom b).augmentation e + rw [he,map_zero] at ha + omega + | succ p ih => + by_contra hn + push Not at hn + have he : (A.atom b).row (p+1) e = 0 := by + apply A.ext (p+1) + intro c + rw [map_zero] + exact le_antisymm (hn c) + ((A.positive (p+1) _).mp ((A.atom b).positive (p+1) e) c) + have hd := (A.atom b).boundary p e + rw [he,map_zero] at hd + have hh : (A.atom b).row p true = (A.atom b).row p false := + sub_eq_zero.mp hd.symm + obtain ⟨c,hc⟩ := ih (by omega) + have hs : A.coefficient c p ((A.atom b).row p false) ≠ 0 := by + cases e + · exact ne_of_gt hc + · rw [← hh]; exact ne_of_gt hc + have ht : A.coefficient c p ((A.atom b).row p true) ≠ 0 := by rw [hh]; exact hs + have hr := A.ranked b p (by omega) false c hs + have hr' := A.ranked b p (by omega) true c ht + simp only [Bool.false_eq_true,ite_false,ite_true] at hr hr' + omega + +lemma basis_derivative_negative (p : ℕ) (b : A.Index) (hb : A.dim b = p+1) : + ∃ c : A.Index, A.rank b < A.rank c ∧ + A.coefficient c p (K.d p (A.basis (p+1) b)) < 0 := by + obtain ⟨c,hc⟩ := A.atom_face_coefficient_pos b p (by omega) false + have hs : A.rank b < A.rank c := A.ranked b p (by omega) false c (ne_of_gt hc) + have ht : A.coefficient c p ((A.atom b).row p true) = 0 := by + by_contra hn + have h := A.ranked b p (by omega) true c hn + simp only [ite_true] at h + omega + refine ⟨c,hs,?_⟩ + have he : A.basis (p+1) b = (A.atom b).row (p+1) false := by rw [← hb,A.basis_own] + rw [he,(A.atom b).boundary,map_sub,ht] + omega + +lemma maximal_transition_coefficient_le (p : ℕ) (z : K.Chain (p+1)) + (x : K.Chain p) (hz : z ∈ K.positive (p+1)) + (hy : x + K.d p z ∈ K.positive p) (b : A.Index) + (hb : A.coefficient b (p+1) z ≠ 0) + (hmax : ∀ c, A.coefficient c (p+1) z ≠ 0 → A.rank c ≤ A.rank b) : + ∃ t : A.Index, A.coefficient b (p+1) z ≤ A.coefficient t p x := by + classical + obtain ⟨t,ht,hd⟩ := A.basis_derivative_negative p b (A.homogeneous b (p+1) z hb) + have hnonpos (c : A.Index) : + A.coefficient c (p+1) z * A.coefficient t p (K.d p (A.basis (p+1) c)) ≤ 0 := by + by_cases hc : A.coefficient c (p+1) z = 0 + · simp [hc] + apply mul_nonpos_of_nonneg_of_nonpos ((A.positive (p+1) z).mp hz c) + by_contra hn + have h := (A.derivative_rank p c t (A.homogeneous c (p+1) z hc)).1 (lt_of_not_ge hn) + have hm := hmax c hc + omega + have hsum : A.coefficient t p (K.d p z) ≤ + A.coefficient b (p+1) z * A.coefficient t p (K.d p (A.basis (p+1) b)) := by + rw [A.coefficient_derivative] + calc + _ ≤ ∑ c : A.Index, if c = b then A.coefficient b (p+1) z * + A.coefficient t p (K.d p (A.basis (p+1) b)) else 0 := by + apply Finset.sum_le_sum + intro c _ + by_cases hc : c = b + · subst c; simp only; exact le_rfl + · rw [ite_eq_right hc]; exact hnonpos c + _ = _ := by simp + have hmul : A.coefficient b (p+1) z * A.coefficient t p (K.d p (A.basis (p+1) b)) ≤ + - A.coefficient b (p+1) z := by + calc + _ ≤ A.coefficient b (p+1) z * (-1) := mul_le_mul_of_nonneg_left (by omega) + ((A.positive (p+1) z).mp hz b) + _ = _ := mul_neg_one _ + have hh := (A.positive p _).mp hy t + rw [map_add] at hh + exact ⟨t,by omega⟩ + +lemma top_coefficient_le_one (n : ℕ) (y : Table K) (hy : truncate n false y = y) + (b : A.Index) : A.coefficient b n (y.row n false) ≤ 1 := by + classical + induction n generalizing y b with + | zero => + obtain ⟨c,hc,rfl⟩ := A.objects_atomic y hy + have he := A.top c b false + rw [hc] at he + rw [he] + split_ifs <;> omega + | succ n ihn => + generalize hm : (A.mass (n+1) (y.row (n+1) false)).toNat = m + induction m using Nat.strong_induction_on generalizing y b with + | h m ihm => + let z := y.row (n+1) false + have hz : z ∈ K.positive (n+1) := y.positive (n+1) false + by_cases he : z = 0 + · change A.coefficient b (n+1) z ≤ 1 + rw [he,map_zero] + omega + let S := Finset.univ.filter (fun c => A.coefficient c (n+1) z ≠ 0) + have hs : S.Nonempty := by + by_contra hn + apply he + apply A.ext (n+1) + intro c + rw [map_zero] + by_contra hc + exact hn ⟨c,by simp [S,hc]⟩ + obtain ⟨c,hc,hmax⟩ := Finset.exists_max_image S A.rank hs + have hc' : A.coefficient c (n+1) z ≠ 0 := (Finset.mem_filter.mp hc).2 + have hmax' : ∀ d, A.coefficient d (n+1) z ≠ 0 → A.rank d ≤ A.rank c := + fun d hd => hmax d (by simp [S,hd]) + have hp : 0 < A.coefficient c (n+1) z := + lt_of_le_of_ne ((A.positive (n+1) z).mp hz c) (Ne.symm hc') + have hd := A.homogeneous c (n+1) z hc' + have hfinal : y.row n false + K.d n z ∈ K.positive n := by + change y.row n false + K.d n (y.row (n+1) false) ∈ _ + rw [y.boundary] + convert y.positive n true using 1; abel + by_cases hbc : b = c + · subst b + obtain ⟨t,ht⟩ := A.maximal_transition_coefficient_le n z (y.row n false) hz hfinal c hc' hmax' + have hi := ihn (truncate n false y) (by simp only [truncate_truncate,lt_self_iff_false,ite_false]) t + change A.coefficient t n ((truncate n false y).row n false) ≤ 1 at hi + simp only [truncate_row, lt_self_iff_false, ite_false, ite_true] at hi + exact ht.trans hi + · have hrem := A.peel_remainder (n+1) z hz c hp + have hpos := A.peel_positive n z (y.row n false) hz (y.positive n false) hfinal c hp hmax' + obtain ⟨x,w,hxw,hx,hw,hxt,hwt,heq⟩ := + split_top y hy (A.basis (n+1) c) (z - A.basis (n+1) c) + (A.basis_positive (n+1) c) hrem (by dsimp [z]; abel) hpos + have hlt : (A.mass (n+1) (w.row (n+1) false)).toNat < m := by + rw [hwt,map_sub,A.mass_basis (n+1) c hd,← hm] + change (A.mass (n+1) z - 1).toNat < (A.mass (n+1) z).toNat + rw [Int.toNat_lt_toNat (A.mass_pos (n+1) z hz c hp)] + omega + have hi := ihm _ hlt w hw b rfl + rw [hwt,map_sub,A.coefficient_basis,ite_eq_left hd,ite_eq_right (Ne.symm hbc),sub_zero] at hi + exact hi + +lemma row_coefficient_zero_or_one (y : Table K) (p : ℕ) (e : Bool) (b : A.Index) : + A.coefficient b p (y.row p e) = 0 ∨ A.coefficient b p (y.row p e) = 1 := by + have hn := (A.positive p _).mp (y.positive p e) b + have hu := A.top_coefficient_le_one p (truncate p e y) + (by simp only [truncate_truncate,lt_self_iff_false,ite_false]) b + simp only [truncate_row, lt_self_iff_false, ite_false, ite_true] at hu + omega +end Thomason.DirectedComplex.RankedAtoms + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.RankedAtoms +open Table +variable {K : DirectedComplex.{u}} (A : RankedAtoms.{u,v} K) +include A + +lemma positive_cycle_zero (p : ℕ) (z : K.Chain (p+1)) + (hz : z ∈ K.positive (p+1)) (hd : K.d p z = 0) : z = 0 := by + classical + by_contra he + let S := Finset.univ.filter (fun c => A.coefficient c (p+1) z ≠ 0) + have hs : S.Nonempty := by + by_contra hn + apply he + apply A.ext (p+1) + intro c + rw [map_zero] + by_contra hc + exact hn ⟨c,by simp [S,hc]⟩ + obtain ⟨b,hb,hmax⟩ := Finset.exists_max_image S A.rank hs + have hb' : A.coefficient b (p+1) z ≠ 0 := (Finset.mem_filter.mp hb).2 + obtain ⟨t,ht⟩ := A.maximal_transition_coefficient_le p z 0 hz + (by rw [hd,add_zero]; exact (K.positive p).zero_mem) b hb' + (fun c hc => hmax c (by simp [S,hc])) + rw [map_zero] at ht + exact hb' (le_antisymm ht ((A.positive (p+1) z).mp hz b)) + +lemma positiveAcyclic : PositiveAcyclic K where + augmentation_nonneg x hx := by rw [A.augmentation_eq_mass]; exact A.mass_nonneg _ _ hx + augmentation_zero := A.positive_augmentation_zero + cycle_zero := A.positive_cycle_zero + +lemma positive_split_basis (p : ℕ) (b : A.Index) (hb : A.dim b = p) + (x y : K.Chain p) (hx : x ∈ K.positive p) (hy : y ∈ K.positive p) + (he : x+y = A.basis p b) : x = 0 ∨ y = 0 := by + have h (c : A.Index) := congrArg (A.coefficient c p) he + simp only [map_add,A.coefficient_basis,ite_eq_left hb] at h + have hbx := (A.positive p x).mp hx b + have hby := (A.positive p y).mp hy b + have hsum : A.coefficient b p x + A.coefficient b p y = 1 := by simpa using h b + have heq (c : A.Index) (hc : c ≠ b) : A.coefficient c p x = 0 ∧ A.coefficient c p y = 0 := by + have hh := h c + rw [ite_eq_right (Ne.symm hc)] at hh + have hhx := (A.positive p x).mp hx c + have hhy := (A.positive p y).mp hy c + omega + have hh : A.coefficient b p x = 0 ∨ A.coefficient b p y = 0 := by omega + rcases hh with hx0 | hy0 + · left + apply A.ext p + intro c + rw [map_zero] + by_cases hc : c = b + · simpa only [hc] using hx0 + · exact (heq c hc).1 + · right + apply A.ext p + intro c + rw [map_zero] + by_cases hc : c = b + · simpa only [hc] using hy0 + · exact (heq c hc).2 + +lemma atom_subrows_fixed (b : A.Index) (k n : ℕ) (hn : n ≤ A.dim b) + (x : Table K) (hx : truncate n false x = x) + (hsub : ∀ p, k < p → ∀ e c, + A.coefficient c p (x.row p e) ≤ A.coefficient c p ((A.atom b).row p e)) + (htop : x.row (A.dim b) false = 0) : truncate k false x = x := by + induction n generalizing x with + | zero => exact K.nu.source_fixed_upwards (Nat.zero_le k) hx + | succ n ih => + by_cases hk : n+1 ≤ k + · exact K.nu.source_fixed_upwards hk hx + have hkn : k < n+1 := by omega + have he : x.row (n+1) false = 0 := by + by_cases he : n+1 = A.dim b + · exact (congrArg (fun p => x.row p false = 0) he).mpr htop + apply A.ext (n+1) + intro c + rw [map_zero] + have hc := (A.positive (n+1) _).mp (x.positive (n+1) false) c + by_contra hne + have hpos : 0 < A.coefficient c (n+1) (x.row (n+1) false) := by omega + have hs := hsub (n+1) hkn false c + have ht := hsub (n+1) hkn true c + rw [← row_top_fixed x hx] at ht + have hrs := A.ranked b (n+1) (by omega) false c (ne_of_gt (hpos.trans_le hs)) + have hrt := A.ranked b (n+1) (by omega) true c (ne_of_gt (hpos.trans_le ht)) + simp only [Bool.false_eq_true,ite_false,ite_true] at hrs hrt + omega + exact ih (by omega) x (fixed_of_top_zero hx he) hsub htop + +lemma atom_indecomposable (b : A.Index) (k : ℕ) (x y : Table K) + (h : truncate k true x = truncate k false y) + (he : comp k x y h = A.atom b) : + truncate k false x = x ∨ truncate k false y = y := by + have hz : truncate (A.dim b) false (comp k x y h) = comp k x y h := by + rw [he]; exact A.bounded b + obtain ⟨hx,hy⟩ := A.comp_dimension_factors x y h hz + by_cases hk : A.dim b ≤ k + · exact Or.inl (K.nu.source_fixed_upwards hk hx) + have hkd : k < A.dim b := by omega + have hrows (p : ℕ) (hp : k < p) (e : Bool) : + x.row p e + y.row p e = (A.atom b).row p e := by + have hh := congrArg (fun z : Table K => z.row p e) he + rw [comp_row] at hh + simpa only [show ¬p < k by omega,show p ≠ k by omega,ite_false] using hh + have hsub (p : ℕ) (hp : k < p) (e : Bool) (c : A.Index) : + A.coefficient c p (x.row p e) ≤ A.coefficient c p ((A.atom b).row p e) ∧ + A.coefficient c p (y.row p e) ≤ A.coefficient c p ((A.atom b).row p e) := by + have hh := congrArg (A.coefficient c p) (hrows p hp e) + rw [map_add] at hh + have hhx := (A.positive p _).mp (x.positive p e) c + have hhy := (A.positive p _).mp (y.positive p e) c + omega + have ht : x.row (A.dim b) false + y.row (A.dim b) false = A.basis (A.dim b) b := by + rw [A.basis_own]; exact hrows (A.dim b) hkd false + rcases A.positive_split_basis (A.dim b) b rfl _ _ (x.positive _ _) (y.positive _ _) ht with hxt | hyt + · exact Or.inl (A.atom_subrows_fixed b k (A.dim b) le_rfl x hx + (fun p hp e c => (hsub p hp e c).1) hxt) + · exact Or.inr (A.atom_subrows_fixed b k (A.dim b) le_rfl y hy + (fun p hp e c => (hsub p hp e c).2) hyt) +end Thomason.DirectedComplex.RankedAtoms + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {M : DirectedComplex.{u}} (A : RankedAtoms.{u,v} M.cylinder) +include A + +lemma chainComparison_lowers_dimension (n : ℕ) + (z : (tensorFunctor.obj M.nu).Cell) + (hz : (tensorFunctor.obj M.nu).source (n+1) z = z) + (hzero : ((chainComparison M).map z).row (n+1) false = 0) : + (tensorFunctor.obj M.nu).source n z = z := by + let T := tensorFunctor.obj M.nu + let F := chainComparison M + have img_bound (z : T.Cell) (hz : T.source (n+1) z = z) : + truncate (n+1) false (F.map z) = F.map z := by + change M.cylinder.nu.source (n+1) (F.map z) = F.map z + rw [← F.map_source,hz] + apply tensor_bounded_cells_induction (n+1) + (fun z => (F.map z).row (n+1) false = 0 → T.source n z = z) ?_ ?_ ?_ ?_ z hz hzero + · intro a x hx he + apply (chainComparison_endpoint_fiber (T.source n (((tensorEndpoint a).app M.nu).map x)) a x).mp + rw [F.map_source] + have hb : T.source (n+1) (((tensorEndpoint a).app M.nu).map x) = + ((tensorEndpoint a).app M.nu).map x := by + rw [← ((tensorEndpoint a).app M.nu).map_source] + exact congrArg ((tensorEndpoint a).app M.nu).map hx + exact (fixed_of_top_zero (img_bound _ hb) he).trans (chainComparison_endpoint_apply a x) + · intro r hr x he + by_cases hrn : r < n + · exact T.source_fixed_upwards (by omega : r+1 ≤ n) (verticalCell_bounded r x) + have hrn : r = n := by omega + subst r + have he' : x.val.row n false = 0 := by + change ((chainComparison M).map (verticalCell n x)).row (n+1) false = 0 at he + rw [chainComparison_verticalCell] at he + have hh := congrArg (fun t : M.cylinder.Chain (n+1) => t.2.2) he + change (verticalRow x.val (n+1) false).2.2 = 0 at hh + simp only [verticalRow] at hh + split_ifs at hh <;> exact hh + cases n with + | zero => + have ha := x.val.augmentation false + rw [he',map_zero] at ha + exact False.elim (by omega) + | succ n => + exact verticalCell_bounded_of_bounded (n+1) n x (fixed_of_top_zero x.property he') + · intro r hr y hy _ + exact T.source_fixed_upwards (by omega) hy + · intro r hr x y hx hy h ihx ihy he + change (F.map (T.comp r x y h)).row (n+1) false = 0 at he + rw [F.map_comp r x y h (F.map_composable h)] at he + change (DirectedComplex.Table.comp r (F.map x) (F.map y) (F.map_composable h)).row (n+1) false = 0 at he + erw [comp_row] at he + simp only [show ¬n+1 < r by omega,show n+1 ≠ r by omega,ite_false] at he + obtain ⟨hxt,hyt⟩ := A.positive_add_zero ((F.map x).positive (n+1) false) + ((F.map y).positive (n+1) false) he + have hx' := ihx hxt + have hy' := ihy hyt + by_cases hrn : r < n + · rw [T.source_comp_gt n r hrn x y h (T.source_composable hrn h)] + exact T.comp_congr_cells r _ _ hx' hy' + · have hnr : n = r := by omega + subst r + rw [T.comp_of_left_source_fixed n x y h hx'] + exact hy' + +lemma chainComparison_reflects_dimension (n : ℕ) + (z : (tensorFunctor.obj M.nu).Cell) + (hz : truncate n false ((chainComparison M).map z) = (chainComparison M).map z) : + (tensorFunctor.obj M.nu).source n z = z := by + obtain ⟨d,hd⟩ := (tensorFunctor.obj M.nu).finite_dimension z + induction d generalizing z with + | zero => exact (tensorFunctor.obj M.nu).source_fixed_upwards (Nat.zero_le n) hd + | succ d ih => + by_cases hdn : d+1 ≤ n + · exact (tensorFunctor.obj M.nu).source_fixed_upwards hdn hd + have hzero := row_above_fixed ((chainComparison M).map z) hz (by omega : n < d+1) false + exact ih z hz (chainComparison_lowers_dimension A d z hd hzero) +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.CylinderTables +open Table +variable {M : DirectedComplex.{u}} + +lemma cross_vertical (x : Table M) (p : ℕ) (e : Bool) : + cross (verticalTable x) p e = x.row p e := by + change (verticalRow x (p+1) e).2.2 = x.row p e + simp only [verticalRow] + split_ifs <;> rfl + +lemma vertical_injective : Function.Injective (verticalTable (K := M)) := by + intro x y h + apply Table.ext + funext p e + exact (cross_vertical x p e).symm.trans + ((congrArg (fun z => cross z p e) h).trans (cross_vertical y p e)) + +lemma label_vertical (x : Table M) (e : Bool) : + label (verticalTable x) e = if e then 1 else 0 := by + cases e + · exact M.augmentation.map_zero + · exact x.augmentation true + +lemma vertical_ne_endpoint (x y : Table M) (a : Bool) : + verticalTable x ≠ (M.cylinderEndpoint a).table y := by + intro h + have hs := congrArg (fun z => label z false) h + have ht := congrArg (fun z => label z true) h + rw [label_vertical,label_endpoint] at hs ht + cases a <;> simp_all + +end Thomason.DirectedComplex.CylinderTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {M : DirectedComplex.{u}} (A : RankedAtoms.{u,v} M.cylinder) +include A + +lemma chainComparison_atom_generator (b : A.Index) + (z : (tensorFunctor.obj M.nu).Cell) + (hz : (chainComparison M).map z = A.atom b) : + (∃ (a : Bool) (x : M.nu.Cells (A.dim b)), z = ((tensorEndpoint a).app M.nu).map x.val) ∨ + (∃ r, r+1 = A.dim b ∧ ∃ x : M.nu.Cells r, z = verticalCell r x) := by + let T := tensorFunctor.obj M.nu + let F := chainComparison M + have hb : T.source (A.dim b) z = z := + chainComparison_reflects_dimension A (A.dim b) z (hz ▸ A.bounded b) + apply tensor_bounded_cells_induction (A.dim b) + (fun z => F.map z = A.atom b → + (∃ (a : Bool) (x : M.nu.Cells (A.dim b)), z = ((tensorEndpoint a).app M.nu).map x.val) ∨ + (∃ r, r+1 = A.dim b ∧ ∃ x : M.nu.Cells r, z = verticalCell r x)) ?_ ?_ ?_ ?_ z hb hz + · intro a x hx _ + exact Or.inl ⟨a,⟨x,hx⟩,rfl⟩ + · intro r hr x he + have hd : A.dim b ≤ r+1 := by + apply A.atom_dimension_le b + rw [← he] + change M.cylinder.nu.source (r+1) (F.map (verticalCell r x)) = _ + rw [← F.map_source] + exact congrArg F.map (verticalCell_bounded r x) + exact Or.inr ⟨r,by omega,x,rfl⟩ + · intro r hr x hx he + have hd : A.dim b ≤ r := by + apply A.atom_dimension_le b + rw [← he] + change M.cylinder.nu.source r (F.map x) = _ + rw [← F.map_source] + exact congrArg F.map hx + omega + · intro r hr x y hx hy h ihx ihy he + have him : DirectedComplex.Table.comp r (F.map x) (F.map y) (F.map_composable h) = A.atom b := + (F.map_comp r x y h (F.map_composable h)).symm.trans he + rcases A.atom_indecomposable b r (F.map x) (F.map y) (F.map_composable h) him with hf | hf + · have hx' := chainComparison_reflects_dimension A r x hf + have hc := T.comp_of_left_source_fixed r x y h hx' + rw [hc] at he ⊢ + exact ihy he + · have hy' := chainComparison_reflects_dimension A r y hf + have hc := T.comp_of_right_source_fixed r x y h hy' + rw [hc] at he ⊢ + exact ihx he + +lemma chainComparison_atom_fiber_subsingleton (b : A.Index) + (x y : (tensorFunctor.obj M.nu).Cell) + (hx : (chainComparison M).map x = A.atom b) + (hy : (chainComparison M).map y = A.atom b) : x = y := by + rcases chainComparison_atom_generator A b x hx with ⟨a,t,rfl⟩ | ⟨r,_,t,rfl⟩ + · exact ((chainComparison_endpoint_fiber y a t.val).mp + (hy.trans (hx.symm.trans (chainComparison_endpoint_apply a t.val)))).symm + · rw [chainComparison_verticalCell] at hx + rcases chainComparison_atom_generator A b y hy with ⟨a,s,rfl⟩ | ⟨q,_,s,rfl⟩ + · erw [chainComparison_endpoint_apply a s.val] at hy + exact False.elim (CylinderTables.vertical_ne_endpoint t.val s.val a (hx.trans hy.symm)) + · rw [chainComparison_verticalCell] at hy + exact verticalCell_eq_of_value t s (CylinderTables.vertical_injective (hx.trans hy.symm)) + +omit A in + +lemma chainComparison_atom_unique {N : ℕ} {P : Type u} [LinearOrder P] + (e : Fin (N+1) ≃o P) (b : (NormalizedChains.Prism.Basis.ofOrderIso e).Index) : + ∃! x : (tensorFunctor.obj (NormalizedChains.complex P).nu).Cells + ((NormalizedChains.Prism.Basis.ofOrderIso e).dim b), + (chainComparison (NormalizedChains.complex P)).map x.val = + (NormalizedChains.Prism.Basis.ofOrderIso e).atom b := by + obtain ⟨x,hx⟩ := chainComparison_atom_lift e b + refine ⟨x,hx,?_⟩ + intro y hy + exact Subtype.ext (chainComparison_atom_fiber_subsingleton + (NormalizedChains.Prism.Basis.ofOrderIso e) b y.val x.val hy hx) +end Thomason.GrayRecursive.IntervalHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/AttachmentComparison.lean b/lean/OAI/CategoryTheory/Thomason/AttachmentComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dd9c4bc9a205584580fd7a0214df3316b867f71 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/AttachmentComparison.lean @@ -0,0 +1,742 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.Couniversality + +namespace OAI + +/-! Attachment Comparison. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.FilteredPosets +open CategoryTheory Limits Opposite + +def nerveIsColimit {J : Type u} [Category.{u} J] [IsFiltered J] + {D : J ⥤ PartOrd.{u}} (c : Cocone D) + (hrel : ∀ j (x y : D.obj j), c.ι.app j x ≤ c.ι.app j y → x ≤ y) + (hcover : ∀ t : Finset c.pt, ∃ j, ∀ x ∈ t, ∃ y : D.obj j, c.ι.app j y = x) : + IsColimit (PartOrd.nerveFunctor.mapCocone c) := by + classical + apply evaluationJointlyReflectsColimits + intro m + apply Types.FilteredColimit.isColimitOf' + · intro x + change (nerve c.pt).obj m at x + let t : Finset c.pt := Finset.univ.image x.obj + obtain ⟨j,hj⟩ := hcover t + have hx (i : Fin (m.unop.len+1)) : ∃ y : D.obj j, c.ι.app j y = x.obj i := + hj _ (Finset.mem_image.mpr ⟨i,Finset.mem_univ _,rfl⟩) + let y : Fin (m.unop.len+1) →o D.obj j := { + toFun i := (hx i).choose + monotone' := by + intro a b hab + apply hrel j + rw [(hx a).choose_spec,(hx b).choose_spec] + exact leOfHom (x.map (homOfLE hab)) } + refine ⟨j,y.toFunctor,?_⟩ + apply nerve.ext_of_isThin + funext i + exact (hx i).choose_spec.symm + · intro j x y h + refine ⟨j,𝟙 j,?_⟩ + rw [CategoryTheory.Functor.map_id] + change x = y + apply nerve.ext_of_isThin + funext i + have he := congrArg (fun z : (nerve c.pt).obj m => z.obj i) h + exact le_antisymm (hrel j _ _ he.le) (hrel j _ _ he.ge) + +def diagram {J E : Type u} [Preorder J] [PartialOrder E] + (S : J →o Set E) : J ⥤ PartOrd.{u} where + obj j := PartOrd.of (S j) + map f := PartOrd.ofHom ⟨fun x => ⟨x.val,S.monotone (leOfHom f) x.property⟩, + fun _ _ h => h⟩ + map_id _ := rfl + map_comp _ _ := rfl + +def cocone {J E : Type u} [Preorder J] [PartialOrder E] + (S : J →o Set E) : Cocone (diagram S) where + pt := PartOrd.of E + ι := { + app j := PartOrd.ofHom (OrderEmbedding.subtype (S j)).toOrderHom + naturality _ _ _ := rfl } + +def unionIsColimit {J E : Type u} [Preorder J] [IsFiltered J] [PartialOrder E] + (S : J →o Set E) (hcover : ∀ t : Finset E, ∃ j, (↑t : Set E) ⊆ S j) : + IsColimit (PartOrd.nerveFunctor.mapCocone (cocone S)) := by + apply nerveIsColimit + · intro j x y h + exact h + · intro t + obtain ⟨j,hj⟩ := hcover t + exact ⟨j,fun x hx => ⟨⟨x,hj hx⟩,rfl⟩⟩ + +def oldDiagram {J E : Type u} [Preorder J] [PartialOrder E] + (S : J →o Set E) (A : Set E) : J ⥤ PartOrd.{u} where + obj j := PartOrd.of {s : S j | s.val ∈ A} + map f := PartOrd.ofHom ⟨fun x => + ⟨⟨x.val.val,S.monotone (leOfHom f) x.val.property⟩,x.property⟩, + fun _ _ h => h⟩ + map_id _ := rfl + map_comp _ _ := rfl + +def oldCocone {J E : Type u} [Preorder J] [PartialOrder E] + (S : J →o Set E) (A : Set E) : Cocone (oldDiagram S A) where + pt := PartOrd.of A + ι := { + app _ := PartOrd.ofHom ⟨fun x => ⟨x.val.val,x.property⟩,fun _ _ h => h⟩ + naturality _ _ _ := rfl } + +def inclusion {J E : Type u} [Preorder J] [PartialOrder E] + (S : J →o Set E) (A : Set E) : oldDiagram S A ⟶ diagram S where + app j := PartOrd.ofHom (OrderEmbedding.subtype {s : S j | s.val ∈ A}).toOrderHom + naturality _ _ _ := rfl + +def oldUnionIsColimit {J E : Type u} [Preorder J] [IsFiltered J] [PartialOrder E] + (S : J →o Set E) (hcover : ∀ t : Finset E, ∃ j, (↑t : Set E) ⊆ S j) + (A : Set E) : IsColimit (PartOrd.nerveFunctor.mapCocone (oldCocone S A)) := by + classical + apply nerveIsColimit + · intro j x y h + exact h + · intro t + obtain ⟨j,hj⟩ := hcover (t.image Subtype.val) + refine ⟨j,fun x hx => ?_⟩ + exact ⟨⟨⟨x.val,hj (Finset.mem_image.mpr ⟨x,hx,rfl⟩)⟩,x.property⟩,rfl⟩ + +def close {E : Type u} (q : E → E) (s : Finset E) : Finset E := by + classical + exact s ∪ s.image q + +lemma mem_close {E : Type u} (q : E → E) (s : Finset E) (x : E) : + x ∈ close q s ↔ x ∈ s ∨ ∃ y ∈ s, q y = x := by + classical + simp [close] + +lemma close_contains {E : Type u} (q : E → E) (s : Finset E) : s ⊆ close q s := by + intro x hx + exact (mem_close q s x).mpr (Or.inl hx) + +lemma close_stable {E : Type u} (q : E → E) (hq : ∀ x, q (q x) = q x) + (s : Finset E) {x : E} (hx : x ∈ close q s) : q x ∈ close q s := by + apply (mem_close q s (q x)).mpr + right + rcases (mem_close q s x).mp hx with hx | ⟨y,hy,h⟩ + · exact ⟨x,hx,rfl⟩ + · exact ⟨y,hy,by rw [← h,hq y]⟩ + +def closedFamily {E : Type u} (q : E → E) : Finset E →o Set E where + toFun s := ↑(close q s) + monotone' := by + intro s t h x hx + apply (mem_close q t x).mpr + rcases (mem_close q s x).mp hx with hx | ⟨y,hy,he⟩ + · exact Or.inl (h hx) + · exact Or.inr ⟨y,h hy,he⟩ + +instance closedFamily_finite {E : Type u} (q : E → E) (s : Finset E) : + Finite (closedFamily q s) := (close q s).finite_toSet.to_subtype + +lemma closedFamily_cover {E : Type u} (q : E → E) : + ∀ t : Finset E, ∃ s, (↑t : Set E) ⊆ closedFamily q s := + fun t => ⟨t,close_contains q t⟩ + +end Thomason.FilteredPosets + +end + +noncomputable section +universe u v w z + + +namespace Thomason.FilteredPushouts +open CategoryTheory Limits + +def isColimitOfPushout {J : Type u} [Category.{u} J] + {C : Type v} [Category.{w} C] + {A X B Y : J ⥤ C} (a : A ⟶ X) (b : A ⟶ B) (j : X ⟶ Y) (v : B ⟶ Y) + (sq : ∀ k, IsPushout (a.app k) (b.app k) (j.app k) (v.app k)) + (cA : Cocone A) (cX : Cocone X) (cB : Cocone B) (cY : Cocone Y) + (hA : IsColimit cA) (hX : IsColimit cX) (hB : IsColimit cB) + (a₀ : cA.pt ⟶ cX.pt) (b₀ : cA.pt ⟶ cB.pt) + (j₀ : cX.pt ⟶ cY.pt) (v₀ : cB.pt ⟶ cY.pt) + (sq₀ : IsPushout a₀ b₀ j₀ v₀) + (ha : ∀ k, (a.app k) ≫ cX.ι.app k = cA.ι.app k ≫ a₀) + (hb : ∀ k, (b.app k) ≫ cB.ι.app k = cA.ι.app k ≫ b₀) + (hj : ∀ k, (j.app k) ≫ cY.ι.app k = cX.ι.app k ≫ j₀) + (hv : ∀ k, (v.app k) ≫ cY.ι.app k = cB.ι.app k ≫ v₀) : + IsColimit cY := by + let cx (s : Cocone Y) : Cocone X := ⟨s.pt,j ≫ s.ι⟩ + let cb (s : Cocone Y) : Cocone B := ⟨s.pt,v ≫ s.ι⟩ + have compat (s : Cocone Y) : a₀ ≫ hX.desc (cx s) = b₀ ≫ hB.desc (cb s) := by + apply hA.hom_ext + intro k + rw [← Category.assoc,← ha,Category.assoc,hX.fac, + ← Category.assoc _ b₀,← hb,Category.assoc,hB.fac] + exact (Category.assoc _ _ _).symm.trans + ((congrArg (· ≫ s.ι.app k) (sq k).w).trans (Category.assoc _ _ _)) + refine { + desc := fun s => sq₀.desc (hX.desc (cx s)) (hB.desc (cb s)) (compat s) + fac := ?_ + uniq := ?_ } + · intro s k + apply (sq k).hom_ext + · rw [← Category.assoc,hj,Category.assoc,sq₀.inl_desc,hX.fac] + rfl + · rw [← Category.assoc,hv,Category.assoc,sq₀.inr_desc,hB.fac] + rfl + · intro s m hm + apply sq₀.hom_ext + · rw [sq₀.inl_desc] + apply hX.hom_ext + intro k + rw [← Category.assoc,← hj,Category.assoc,hm,hX.fac] + rfl + · rw [sq₀.inr_desc] + apply hB.hom_ext + intro k + rw [← Category.assoc,← hv,Category.assoc,hm,hB.fac] + rfl + +section Attachment +variable {J : Type u} [Category.{u} J] [IsConnected J] + {C : Type v} [Category.{w} C] [HasPushouts C] + {A B : J ⥤ C} (cA : Cocone A) (cB : Cocone B) + (hA : IsColimit cA) (hB : IsColimit cB) + {X Y : C} (a : cA.pt ⟶ X) (b : A ⟶ B) (b₀ : cA.pt ⟶ cB.pt) + (hb : b ≫ cB.ι = cA.ι ≫ (CategoryTheory.Functor.const J).map b₀) + (j : X ⟶ Y) (v : cB.pt ⟶ Y) (sq : IsPushout a b₀ j v) + +abbrev attachingMap : A ⟶ (CategoryTheory.Functor.const J).obj X := + cA.ι ≫ (CategoryTheory.Functor.const J).map a + +abbrev attachmentDiagram : J ⥤ C := pushout (attachingMap cA a) b + +def attachmentCocone : Cocone (attachmentDiagram cA a b) where + pt := Y + ι := pushout.desc ((CategoryTheory.Functor.const J).map j) + (cB.ι ≫ (CategoryTheory.Functor.const J).map v) (by + change (cA.ι ≫ (CategoryTheory.Functor.const J).map a) ≫ + (CategoryTheory.Functor.const J).map j = _ + rw [Category.assoc,← CategoryTheory.Functor.map_comp,sq.w, + CategoryTheory.Functor.map_comp,← Category.assoc,← hb,Category.assoc]) + +omit [IsConnected J] in +lemma attachmentCocone_inl (k : J) : + (pushout.inl (attachingMap cA a) b).app k ≫ + (attachmentCocone cA cB a b b₀ hb j v sq).ι.app k = j := by + change ((pushout.inl (attachingMap cA a) b) ≫ + (attachmentCocone cA cB a b b₀ hb j v sq).ι).app k = j + simp only [attachmentCocone,pushout.inl_desc] + rfl + +omit [IsConnected J] in +lemma attachmentCocone_inr (k : J) : + (pushout.inr (attachingMap cA a) b).app k ≫ + (attachmentCocone cA cB a b b₀ hb j v sq).ι.app k = cB.ι.app k ≫ v := by + change ((pushout.inr (attachingMap cA a) b) ≫ + (attachmentCocone cA cB a b b₀ hb j v sq).ι).app k = _ + simp only [attachmentCocone,pushout.inr_desc] + rfl + +def attachmentIsColimit : IsColimit (attachmentCocone cA cB a b b₀ hb j v sq) := by + apply isColimitOfPushout (attachingMap cA a) b + (pushout.inl (attachingMap cA a) b) (pushout.inr (attachingMap cA a) b) + (fun k => (IsPushout.of_hasPushout (attachingMap cA a) b).map ((evaluation J C).obj k)) + cA (constCocone J X) cB (attachmentCocone cA cB a b b₀ hb j v sq) + hA (isColimitConstCocone J X) hB a b₀ j v sq + · intro k + change (cA.ι.app k ≫ a) ≫ 𝟙 X = cA.ι.app k ≫ a + exact Category.comp_id _ + · intro k + exact congrArg (fun t => t.app k) hb + · intro k + change _ = 𝟙 X ≫ j + rw [Category.id_comp] + exact attachmentCocone_inl cA cB a b b₀ hb j v sq k + · exact attachmentCocone_inr cA cB a b b₀ hb j v sq +end Attachment + +end Thomason.FilteredPushouts + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits FilteredPosets FilteredPushouts + +theorem couniversal_of_finite {D : Type v} [Category.{w} D] [HasPushouts D] + (L : SSet.{u} ⥤ D) (N : D ⥤ SSet.{u}) [PreservesColimitsOfSize.{u,u} L] + (hfin : ∀ (P : Type u) [PartialOrder P] [Finite P] (A : Set P), + IsLowerSet A → ∀ (r : P →o A), (∀ (a : A) (x : P), a.val ≤ x ↔ a ≤ r x) → + ∀ {X Y : D} (a : L.obj (nerve A) ⟶ X) (j : X ⟶ Y) (v : L.obj (nerve P) ⟶ Y), + IsPushout a (L.map (nerveMap (OrderEmbedding.subtype A).toOrderHom.toFunctor)) j v → + simplicialWeakEquivalences (N.map j)) + {E : Type u} [PartialOrder E] [PreservesColimitsOfShape (Finset E) N] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : D} (a : L.obj (nerve A) ⟶ X) (j : X ⟶ Y) (v : L.obj (nerve E) ⟶ Y) + (sq : IsPushout a (L.map (nerveMap (OrderEmbedding.subtype A).toOrderHom.toFunctor)) j v) : + simplicialWeakEquivalences (N.map j) := by + classical + let q : E → E := fun e => (r e).val + have hr (x : A) : r x.val = x := + le_antisymm ((hadj (r x.val) x.val).mpr le_rfl) ((hadj x x.val).mp le_rfl) + have hq (x : E) : q (q x) = q x := congrArg Subtype.val (hr (r x)) + let S := closedFamily q + let cA := L.mapCocone (PartOrd.nerveFunctor.mapCocone (oldCocone S A)) + let cB := L.mapCocone (PartOrd.nerveFunctor.mapCocone (cocone S)) + have hcA : IsColimit cA := isColimitOfPreserves L + (oldUnionIsColimit S (closedFamily_cover q) A) + have hcB : IsColimit cB := isColimitOfPreserves L + (unionIsColimit S (closedFamily_cover q)) + let b := CategoryTheory.Functor.whiskerRight + (CategoryTheory.Functor.whiskerRight (inclusion S A) PartOrd.nerveFunctor) L + let b₀ := L.map (nerveMap (OrderEmbedding.subtype (fun element : E => element ∈ A)).toOrderHom.toFunctor) + have hb : b ≫ cB.ι = cA.ι ≫ (CategoryTheory.Functor.const (Finset E)).map b₀ := by + apply NatTrans.ext + funext s + change L.map _ ≫ L.map _ = L.map _ ≫ L.map _ + erw [← L.map_comp,← L.map_comp] + rfl + let cY := attachmentCocone cA cB a b b₀ hb j v sq + have hcY : IsColimit cY := attachmentIsColimit cA cB hcA hcB a b b₀ hb j v sq + let p := pushout.inl (attachingMap cA a) b + let cp := constCocone (Finset E) X + have hp (s : Finset E) : simplicialWeakEquivalences (N.map (p.app s)) := by + let r' : S s →o {x : S s | x.val ∈ A} := + ⟨fun x => ⟨⟨(r x.val).val, close_stable q hq s x.property⟩,(r x.val).property⟩, + fun _ _ h => r.monotone h⟩ + apply hfin (S s) {x : S s | x.val ∈ A} (restricted_lower hA (S s)) r' + (fun x y => hadj ⟨x.val.val,x.property⟩ y.val) ((attachingMap cA a).app s) + (p.app s) ((pushout.inr (attachingMap cA a) b).app s) + exact (IsPushout.of_hasPushout (attachingMap cA a) b).map + ((evaluation (Finset E) D).obj s) + apply FilteredWeak.weak_of_colimit (CategoryTheory.Functor.whiskerRight p N) + (N.mapCocone cp) (N.mapCocone cY) + (isColimitOfPreserves N (isColimitConstCocone (Finset E) X)) + (isColimitOfPreserves N hcY) (N.map j) _ hp + intro s + change N.map (𝟙 X) ≫ N.map j = N.map (p.app s) ≫ N.map (cY.ι.app s) + rw [N.map_id,Category.id_comp,← N.map_comp] + exact congrArg (fun f : X ⟶ Y => N.map f) + (attachmentCocone_inl cA cB a b b₀ hb j v sq s).symm + +theorem poset_couniversal + (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {E : Type u} [PartialOrder E] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : OmegaCategory.NCategory.{u} n} {a : AttachmentComparison.posetObj n A ⟶ X} + {j : X ⟶ Y} {v : AttachmentComparison.posetObj n E ⟶ Y} + (sq : IsPushout a (AttachmentComparison.inc n A) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + let := (categorificationFiniteAdjunction n).leftAdjoint_preservesColimits + exact couniversal_of_finite (categorificationFinite n) (streetNerveFinite n) + (fun P _ _ A hA r hr _ _ a j v sq => + finite_poset_couniversal T R adj n hn A hA r hr sq) A hA r hadj a j v sq + +theorem omega_poset_couniversal + (T : RightIntervalExtension.{u}) + {E : Type u} [PartialOrder E] (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : OmegaCategory.{u}} {a : categorification.obj (nerve A) ⟶ X} + {j : X ⟶ Y} {v : categorification.obj (nerve E) ⟶ Y} + (sq : IsPushout a (categorification.map + (nerveMap (OrderEmbedding.subtype A).toOrderHom.toFunctor)) j v) : + simplicialWeakEquivalences (streetNerveFunctor.map j) := by + let := categorificationAdjunction.leftAdjoint_preservesColimits + exact couniversal_of_finite categorification streetNerveFunctor + (fun P _ _ A hA r hr _ _ a j v sq => + omega_finite_poset_couniversal T A hA r hr sq) A hA r hadj a j v sq + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.AttachmentComparison +open CategoryTheory Limits OmegaCategory Attachments Couniversality + +lemma gray_piece_couniversal (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] + (A S : Set B) (hA : IsLowerSet A) (hAS : A ⊆ S) + (r : S →o A) (hadj : ∀ (a : A) (s : S), a.val ≤ s.val ↔ a ≤ r s) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n S ⟶ Y) + (sq : IsPushout a (sb n A S hAS) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + let e := nestedOldIso (categorificationFinite n) A S hAS + let r' : S →o {s : S | s.val ∈ A} := + ⟨fun s => ⟨⟨(r s).val,hAS (r s).property⟩,(r s).property⟩, + fun _ _ h => r.monotone h⟩ + have sq' : IsPushout (e.hom ≫ a) (inc n {s : S | s.val ∈ A}) j v := by + apply sq.of_iso' e (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom,Category.comp_id] + exact nestedOldIso_inc (categorificationFinite n) A S hAS + · simp + · simp + exact poset_couniversal T R adj n hn {s : S | s.val ∈ A} + (restricted_lower hA S) r' (fun a s => hadj ⟨a.val.val,a.property⟩ s) sq' + +lemma gray_comparison_local (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] + (A : Set B) (hA : IsLowerSet A) + (r : upward A →o A) + (hadj : ∀ (a : A) (z : upward A), a.val ≤ z.val ↔ a ≤ r z) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n B ⟶ Y) (sc : IsPushout a (inc n A) j v) + {P : SSet.{u}} {lX : (streetNerveFinite n).obj X ⟶ P} + {lB : (streetNerveFinite n).obj (posetObj n B) ⟶ P} + (ss : IsPushout ((streetNerveFinite n).map a) ((streetNerveFinite n).map (inc n A)) lX lB) + (F : P ⟶ (streetNerveFinite n).obj Y) + (hFX : lX ≫ F = (streetNerveFinite n).map j) + (hFB : lB ≫ F = (streetNerveFinite n).map v) : simplicialWeakEquivalences F := by + let Z := upward A + let C := Aᶜ + have hAZ : A ⊆ Z := fun x hx => ⟨x,hx,le_rfl⟩ + have hZ : IsUpperSet Z := by + intro x y hxy hx + obtain ⟨a,ha,hax⟩ := hx + exact ⟨a,ha,hax.trans hxy⟩ + have hC : IsUpperSet C := isUpperSet_compl.mpr hA + have hcov : Z ∪ C = Set.univ := by + apply Set.eq_univ_of_forall + intro x + by_cases hx : x ∈ A + · exact Or.inl (hAZ hx) + · exact Or.inr hx + obtain ⟨YZ,jZ,vZ,uZ,scZ,hj,hv,sq⟩ := + attachment_nerve_cover n hn A Z C hZ hC hAZ disjoint_compl_right hcov a j v sc + let N := streetNerveFinite n + let e := N.map (sb n A Z hAZ) + let b := N.map a + let PZ := pushout b e + let xZ := pushout.inl b e + let zZ := pushout.inr b e + let sZ := IsPushout.of_hasPushout b e + let FZ : PZ ⟶ N.obj YZ := sZ.desc (N.map jZ) (N.map vZ) (by + rw [← N.map_comp, ← N.map_comp, scZ.w]) + have hFZX : xZ ≫ FZ = N.map jZ := sZ.inl_desc _ _ _ + have hFZZ : zZ ≫ FZ = N.map vZ := sZ.inr_desc _ _ _ + have hwj : simplicialWeakEquivalences (N.map jZ) := + gray_piece_couniversal T R adj n hn A Z hA hAZ r hadj a jZ vZ scZ + have hwe : simplicialWeakEquivalences e := + gray_piece_couniversal T R adj n hn A Z hA hAZ r hadj + (𝟙 _) (sb n A Z hAZ) (𝟙 _) IsPushout.of_id_fst + have hcE : Mono e := by + let e' := nestedOldIso (categorificationFinite n) A Z hAZ + have he' : sb n A Z hAZ = e'.inv ≫ inc n {z : Z | z.val ∈ A} := by + calc + _ = e'.inv ≫ (e'.hom ≫ sb n A Z hAZ) := by simp + _ = _ := congrArg (e'.inv ≫ ·) (nestedOldIso_inc (categorificationFinite n) A Z hAZ) + have : Mono (N.map (inc n {z : Z | z.val ∈ A})) := + finite_nerve_attachment_mono n hn _ (restricted_lower hA Z) + (𝟙 _) _ (𝟙 _) IsPushout.of_id_fst + dsimp [e] + rw [he',CategoryTheory.Functor.map_comp] + infer_instance + have hwx : simplicialWeakEquivalences xZ := by + have he : SSet.anodyneExtensions e := KanQuillen.anodyne_class.symm ▸ ⟨hcE,hwe⟩ + exact KanQuillen.anodyne_weak _ (SSet.anodyneExtensions.of_isPushout sZ he) + have hwFZ : simplicialWeakEquivalences FZ := + simplicialWeakEquivalences.of_precomp xZ FZ hwx (hFZX ▸ hwj) + let pZ : PZ ⟶ P := sZ.desc lX (N.map (inc n Z) ≫ lB) (by + rw [← Category.assoc, ← N.map_comp, sb_inc] + exact ss.w) + have hpZX : xZ ≫ pZ = lX := sZ.inl_desc _ _ _ + have hpZZ : zZ ≫ pZ = N.map (inc n Z) ≫ lB := sZ.inr_desc _ _ _ + have ss' : IsPushout b (e ≫ N.map (inc n Z)) (xZ ≫ pZ) lB := by + rw [hpZX, ← N.map_comp, sb_inc] + exact ss + have sr : IsPushout zZ (N.map (inc n Z)) pZ lB := ss'.of_top hpZZ sZ + have sp := (poset_nerve_cover n hn Z C hZ hC hcov).paste_horiz sr + let k := N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ + let c := N.map (sb n (Z ∩ C) C Set.inter_subset_right) + have hc : Mono c := finite_nerve_inter_upper_mono n hn Z C hZ + have hk : k ≫ FZ = N.map (sb n (Z ∩ C) Z Set.inter_subset_left ≫ vZ) := by + rw [show k = N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ from rfl, + Category.assoc, hFZZ, ← N.map_comp] + have sq' : IsPushout (k ≫ FZ) c (N.map uZ) (N.map (inc n C ≫ v)) := by + rw [hk] + exact sq + have hFpZ : pZ ≫ F = FZ ≫ N.map uZ := by + apply sZ.hom_ext + · rw [← Category.assoc, hpZX, ← Category.assoc xZ, hFZX, ← N.map_comp, hj] + exact hFX + · rw [← Category.assoc, hpZZ, Category.assoc, hFB, + ← Category.assoc zZ, hFZZ, ← N.map_comp, ← N.map_comp, hv] + have hFC : (N.map (inc n C) ≫ lB) ≫ F = N.map (inc n C ≫ v) := by + rw [Category.assoc, hFB, ← N.map_comp] + exact KanLocal.local_weak F (KanLocal.local_pushout_map k c FZ + (GeometricRecognition.weak_local FZ hwFZ) sp sq' F hFpZ hFC) + +end Thomason.AttachmentComparison + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaAttachmentComparison +open CategoryTheory Limits OmegaCategory Attachments Couniversality +open AttachmentComparison (upward) + +abbrev posetObj (P : Type u) [PartialOrder P] := categorification.obj (nerve P) +abbrev sb {P : Type u} [PartialOrder P] (A B : Set P) (h : A ⊆ B) := + categorification.map (nerveMap (subposetMap A B h).toFunctor) +abbrev inc {P : Type u} [PartialOrder P] (A : Set P) := + categorification.map (nerveMap (OrderEmbedding.subtype (fun element : P => element ∈ A)).toOrderHom.toFunctor) + +@[reassoc] lemma sb_inc {P : Type u} [PartialOrder P] + (A B : Set P) (h : A ⊆ B) : sb A B h ≫ inc B = inc A := by + rw [← categorification.map_comp] + rfl + +lemma attachment_nerve_cover {P : Type u} [PartialOrder P] + (A Z C : Set P) (hZ : IsUpperSet Z) (hC : IsUpperSet C) + (hAZ : A ⊆ Z) (hAC : Disjoint A C) (hcover : Z ∪ C = Set.univ) + {X Y : OmegaCategory.{u}} (a : posetObj A ⟶ X) (j : X ⟶ Y) + (v : posetObj P ⟶ Y) (sc : IsPushout a (inc A) j v) : + ∃ (YZ : OmegaCategory.{u}) (jZ : X ⟶ YZ) (vZ : posetObj Z ⟶ YZ) (uZ : YZ ⟶ Y), + IsPushout a (sb A Z hAZ) jZ vZ ∧ jZ ≫ uZ = j ∧ vZ ≫ uZ = inc Z ≫ v ∧ + IsPushout (streetNerveFunctor.map (sb (Z ∩ C) Z Set.inter_subset_left ≫ vZ)) + (streetNerveFunctor.map (sb (Z ∩ C) C Set.inter_subset_right)) + (streetNerveFunctor.map uZ) (streetNerveFunctor.map (inc C ≫ v)) := by + obtain ⟨T₁,T₂,hT₁,hT₂,hTc,⟨jZ,vZ,hj,hv,sz⟩,⟨e₂,he₂⟩,⟨e₃,he₃⟩⟩ := + cosieve_attachment_covers A Z C hZ hC hAZ hAC hcover a j v sc + let N := streetNerveFunctor + let u₁ := (Y.fullOn T₁).inclusion + let u₂ := (Y.fullOn T₂).inclusion + let u₃ := (Y.fullOn (T₁ ∩ T₂)).inclusion + let p₁ : (Y.fullOn (T₁ ∩ T₂)).category ⟶ (Y.fullOn T₁).category := + fullOnMap Set.inter_subset_left + let p₂ : (Y.fullOn (T₁ ∩ T₂)).category ⟶ (Y.fullOn T₂).category := + fullOnMap Set.inter_subset_right + change vZ ≫ u₁ = inc Z ≫ v at hv + change e₂.hom ≫ u₂ = inc C ≫ v at he₂ + change e₃.hom ≫ u₃ = inc (Z ∩ C) ≫ v at he₃ + have hu₁ : p₁ ≫ u₁ = u₃ := rfl + have hu₂ : p₂ ≫ u₂ = u₃ := rfl + have : Mono (N.map u₁) := fullInclusion_nerve_mono Y T₁ + have : Mono (N.map u₂) := fullInclusion_nerve_mono Y T₂ + have sq : IsPushout (N.map p₁) (N.map p₂) (N.map u₁) (N.map u₂) := + cosieve_cover_nerve_isPushout hT₁ hT₂ (fun x => by + have hx : x ∈ T₁ ∪ T₂ := by rw [hTc]; trivial + exact hx) + refine ⟨(Y.fullOn T₁).category, jZ, vZ, u₁, sz, hj, hv, ?_⟩ + apply sq.of_iso' (N.mapIso e₃) (Iso.refl _) (N.mapIso e₂) (Iso.refl _) + · simp only [CategoryTheory.Functor.mapIso_hom, Iso.refl_hom, Category.comp_id] + change N.map e₃.hom ≫ N.map p₁ = N.map (sb (Z ∩ C) Z Set.inter_subset_left ≫ vZ) + apply (cancel_mono (N.map u₁)).mp + simp only [← N.map_comp, Category.assoc, hu₁, he₃, hv] + rw [sb_inc_assoc] + · simp only [CategoryTheory.Functor.mapIso_hom] + change N.map e₃.hom ≫ N.map p₂ = N.map (sb (Z ∩ C) C Set.inter_subset_right) ≫ N.map e₂.hom + apply (cancel_mono (N.map u₂)).mp + simp only [← N.map_comp, Category.assoc, hu₂, he₃, he₂] + rw [sb_inc_assoc] + · simp [N] + · simp only [CategoryTheory.Functor.mapIso_hom, Iso.refl_hom, Category.comp_id] + change N.map e₂.hom ≫ N.map u₂ = N.map (inc C ≫ v) + rw [← N.map_comp, he₂] + +lemma poset_nerve_cover {P : Type u} [PartialOrder P] + (Z C : Set P) (hZ : IsUpperSet Z) (hC : IsUpperSet C) + (hcover : Z ∪ C = Set.univ) : + IsPushout (streetNerveFunctor.map (sb (Z ∩ C) Z Set.inter_subset_left)) + (streetNerveFunctor.map (sb (Z ∩ C) C Set.inter_subset_right)) + (streetNerveFunctor.map (inc Z)) (streetNerveFunctor.map (inc C)) := by + obtain ⟨YZ,jZ,vZ,uZ,sz,hj,hv,sq⟩ := attachment_nerve_cover (∅ : Set P) Z C + hZ hC (Set.empty_subset Z) (by simp) hcover + (𝟙 (posetObj (∅ : Set P))) (inc (∅ : Set P)) (𝟙 (posetObj P)) + (IsPushout.of_id_fst) + have : IsIso vZ := sz.isIso_inr_of_isIso + let N := streetNerveFunctor + apply sq.of_iso' (Iso.refl _) (N.mapIso (asIso vZ)) (Iso.refl _) (Iso.refl _) + · simp [N] + · simp + · simp only [CategoryTheory.Functor.mapIso_hom, asIso_hom, Iso.refl_hom, Category.comp_id] + change N.map vZ ≫ N.map uZ = N.map (inc Z) + rw [← N.map_comp, hv, Category.comp_id] + · simp + +lemma nerve_attachment_mono {B : Type u} [PartialOrder B] (A : Set B) (hA : IsLowerSet A) + {X Y : OmegaCategory.{u}} (a : posetObj A ⟶ X) + (j : X ⟶ Y) (v : posetObj B ⟶ Y) (sc : IsPushout a (inc A) j v) : + Mono (streetNerveFunctor.map j) := by + obtain ⟨S,hS,e,he⟩ := poset_sieve_attachment A hA a j v sc + have hinc := OmegaCategory.Subcategory.inclusion_mono (Y.fullOn S) + have : Mono j := by + rw [← he] + infer_instance + let : PreservesLimits streetNerveFunctor := + categorificationAdjunction.rightAdjoint_preservesLimits + infer_instance + +lemma nerve_upper_mono {P : Type u} [PartialOrder P] (S : Set P) (hS : IsUpperSet S) : + Mono (streetNerveFunctor.map (inc S)) := by + let l := NormalizedChains.PosetTables.upperSegmentLabel S hS + have hS' : S = {p | l p = 1} := by + ext p + exact (NormalizedChains.PosetTables.upperSegmentLabel_one S hS p).symm + let e := posetPieceFiberIso S l 1 hS' + have he := posetPieceFiberIso_inclusion S l 1 hS' + have := OmegaCategory.Subcategory.inclusion_mono + ((posetCategorificationLabel l).fiber (intervalVertex 1)) + have : Mono (inc S) := by + change Mono (categorification.map + (nerveMap (OrderEmbedding.subtype (fun element : P => element ∈ S)).toOrderHom.monotone.functor)) + rw [← he] + infer_instance + let : PreservesLimits streetNerveFunctor := + categorificationAdjunction.rightAdjoint_preservesLimits + infer_instance + +lemma nerve_inter_upper_mono {P : Type u} [PartialOrder P] (Z C : Set P) (hZ : IsUpperSet Z) : + Mono (streetNerveFunctor.map (sb (Z ∩ C) C Set.inter_subset_right)) := by + let e := nestedOldIso categorification (Z ∩ C) C Set.inter_subset_right + have : Mono (streetNerveFunctor.map (inc {c : C | c.val ∈ Z ∩ C})) := + nerve_upper_mono _ (by + intro x y hxy hx + exact ⟨hZ hxy hx.1,y.property⟩) + have he : sb (Z ∩ C) C Set.inter_subset_right = + e.inv ≫ inc {c : C | c.val ∈ Z ∩ C} := by + calc + _ = e.inv ≫ (e.hom ≫ sb (Z ∩ C) C Set.inter_subset_right) := by simp + _ = _ := congrArg (e.inv ≫ ·) (nestedOldIso_inc + categorification (Z ∩ C) C Set.inter_subset_right) + rw [he, CategoryTheory.Functor.map_comp] + infer_instance + +lemma gray_piece_couniversal (T : RightIntervalExtension.{u}) + {B : Type u} [PartialOrder B] + (A S : Set B) (hA : IsLowerSet A) (hAS : A ⊆ S) + (r : S →o A) (hadj : ∀ (a : A) (s : S), a.val ≤ s.val ↔ a ≤ r s) + {X Y : OmegaCategory.{u}} (a : posetObj A ⟶ X) + (j : X ⟶ Y) (v : posetObj S ⟶ Y) + (sq : IsPushout a (sb A S hAS) j v) : + simplicialWeakEquivalences (streetNerveFunctor.map j) := by + let e := nestedOldIso categorification A S hAS + let r' : S →o {s : S | s.val ∈ A} := + ⟨fun s => ⟨⟨(r s).val,hAS (r s).property⟩,(r s).property⟩, + fun _ _ h => r.monotone h⟩ + have sq' : IsPushout (e.hom ≫ a) (inc {s : S | s.val ∈ A}) j v := by + apply sq.of_iso' e (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom,Category.comp_id] + exact nestedOldIso_inc categorification A S hAS + · simp + · simp + exact omega_poset_couniversal T {s : S | s.val ∈ A} + (restricted_lower hA S) r' (fun a s => hadj ⟨a.val.val,a.property⟩ s) sq' + +lemma gray_comparison_local (T : RightIntervalExtension.{u}) + {B : Type u} [PartialOrder B] + (A : Set B) (hA : IsLowerSet A) + (r : upward A →o A) + (hadj : ∀ (a : A) (z : upward A), a.val ≤ z.val ↔ a ≤ r z) + {X Y : OmegaCategory.{u}} (a : posetObj A ⟶ X) + (j : X ⟶ Y) (v : posetObj B ⟶ Y) (sc : IsPushout a (inc A) j v) + {P : SSet.{u}} {lX : streetNerveFunctor.obj X ⟶ P} + {lB : streetNerveFunctor.obj (posetObj B) ⟶ P} + (ss : IsPushout (streetNerveFunctor.map a) (streetNerveFunctor.map (inc A)) lX lB) + (F : P ⟶ streetNerveFunctor.obj Y) + (hFX : lX ≫ F = streetNerveFunctor.map j) + (hFB : lB ≫ F = streetNerveFunctor.map v) : simplicialWeakEquivalences F := by + let Z := upward A + let C := Aᶜ + have hAZ : A ⊆ Z := fun x hx => ⟨x,hx,le_rfl⟩ + have hZ : IsUpperSet Z := by + intro x y hxy hx + obtain ⟨a,ha,hax⟩ := hx + exact ⟨a,ha,hax.trans hxy⟩ + have hC : IsUpperSet C := isUpperSet_compl.mpr hA + have hcov : Z ∪ C = Set.univ := by + apply Set.eq_univ_of_forall + intro x + by_cases hx : x ∈ A + · exact Or.inl (hAZ hx) + · exact Or.inr hx + obtain ⟨YZ,jZ,vZ,uZ,scZ,hj,hv,sq⟩ := + attachment_nerve_cover A Z C hZ hC hAZ disjoint_compl_right hcov a j v sc + let N := streetNerveFunctor + let e := N.map (sb A Z hAZ) + let b := N.map a + let PZ := pushout b e + let xZ := pushout.inl b e + let zZ := pushout.inr b e + let sZ := IsPushout.of_hasPushout b e + let FZ : PZ ⟶ N.obj YZ := sZ.desc (N.map jZ) (N.map vZ) (by + rw [← N.map_comp, ← N.map_comp, scZ.w]) + have hFZX : xZ ≫ FZ = N.map jZ := sZ.inl_desc _ _ _ + have hFZZ : zZ ≫ FZ = N.map vZ := sZ.inr_desc _ _ _ + have hwj : simplicialWeakEquivalences (N.map jZ) := + gray_piece_couniversal T A Z hA hAZ r hadj a jZ vZ scZ + have hwe : simplicialWeakEquivalences e := + gray_piece_couniversal T A Z hA hAZ r hadj + (𝟙 _) (sb A Z hAZ) (𝟙 _) IsPushout.of_id_fst + have hcE : Mono e := by + let e' := nestedOldIso categorification A Z hAZ + have he' : sb A Z hAZ = e'.inv ≫ inc {z : Z | z.val ∈ A} := by + calc + _ = e'.inv ≫ (e'.hom ≫ sb A Z hAZ) := by simp + _ = _ := congrArg (e'.inv ≫ ·) (nestedOldIso_inc categorification A Z hAZ) + have : Mono (N.map (inc {z : Z | z.val ∈ A})) := + nerve_attachment_mono _ (restricted_lower hA Z) + (𝟙 _) _ (𝟙 _) IsPushout.of_id_fst + dsimp [e] + rw [he',CategoryTheory.Functor.map_comp] + infer_instance + have hwx : simplicialWeakEquivalences xZ := by + have he : SSet.anodyneExtensions e := KanQuillen.anodyne_class.symm ▸ ⟨hcE,hwe⟩ + exact KanQuillen.anodyne_weak _ (SSet.anodyneExtensions.of_isPushout sZ he) + have hwFZ : simplicialWeakEquivalences FZ := + simplicialWeakEquivalences.of_precomp xZ FZ hwx (hFZX ▸ hwj) + let pZ : PZ ⟶ P := sZ.desc lX (N.map (inc Z) ≫ lB) (by + rw [← Category.assoc, ← N.map_comp, sb_inc] + exact ss.w) + have hpZX : xZ ≫ pZ = lX := sZ.inl_desc _ _ _ + have hpZZ : zZ ≫ pZ = N.map (inc Z) ≫ lB := sZ.inr_desc _ _ _ + have ss' : IsPushout b (e ≫ N.map (inc Z)) (xZ ≫ pZ) lB := by + rw [hpZX, ← N.map_comp, sb_inc] + exact ss + have sr : IsPushout zZ (N.map (inc Z)) pZ lB := ss'.of_top hpZZ sZ + have sp := (poset_nerve_cover Z C hZ hC hcov).paste_horiz sr + let k := N.map (sb (Z ∩ C) Z Set.inter_subset_left) ≫ zZ + let c := N.map (sb (Z ∩ C) C Set.inter_subset_right) + have hc : Mono c := nerve_inter_upper_mono Z C hZ + have hk : k ≫ FZ = N.map (sb (Z ∩ C) Z Set.inter_subset_left ≫ vZ) := by + rw [show k = N.map (sb (Z ∩ C) Z Set.inter_subset_left) ≫ zZ from rfl, + Category.assoc, hFZZ, ← N.map_comp] + have sq' : IsPushout (k ≫ FZ) c (N.map uZ) (N.map (inc C ≫ v)) := by + rw [hk] + exact sq + have hFpZ : pZ ≫ F = FZ ≫ N.map uZ := by + apply sZ.hom_ext + · rw [← Category.assoc, hpZX, ← Category.assoc xZ, hFZX, ← N.map_comp, hj] + exact hFX + · rw [← Category.assoc, hpZZ, Category.assoc, hFB, + ← Category.assoc zZ, hFZZ, ← N.map_comp, ← N.map_comp, hv] + have hFC : (N.map (inc C) ≫ lB) ≫ F = N.map (inc C ≫ v) := by + rw [Category.assoc, hFB, ← N.map_comp] + exact KanLocal.local_weak F (KanLocal.local_pushout_map k c FZ + (GeometricRecognition.weak_local FZ hwFZ) sp sq' F hFpZ hFC) + +end Thomason.OmegaAttachmentComparison + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/BarycentricMesh.lean b/lean/OAI/CategoryTheory/Thomason/BarycentricMesh.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8c61309fb525dfc2e1eca9785036eb987a16acd --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/BarycentricMesh.lean @@ -0,0 +1,643 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.Polyhedra + +namespace OAI + +/-! Barycentric Mesh. -/ + +noncomputable section +universe u v w z +open PartialOrder + +namespace Thomason.GeometricRecognition.PolyPoint +variable {P : Type u} [PartialOrder P] +local instance barycentricMeshDecidableEq : DecidableEq P := Classical.decEq P + +lemma barycentricLinear_support_eq (g : NonemptyFiniteChains P →₀ ℝ) + (hg : ∀ s, 0 ≤ g s) : + (barycentricLinear g).support = g.support.biUnion NonemptyFiniteChains.finset := by + classical + apply Finset.Subset.antisymm (barycentricLinear_support g) + intro p hp + obtain ⟨s,hs,hps⟩ := Finset.mem_biUnion.mp hp + rw [Finsupp.mem_support_iff] + apply ne_of_gt + rw [barycentricLinear_apply, Finsupp.sum] + apply (Finset.sum_pos_iff_of_nonneg (fun t ht => + mul_nonneg (hg t) ((barycenter t).nonneg p))).mpr + refine ⟨s,hs,mul_pos ?_ ?_⟩ + · exact lt_of_le_of_ne (hg s) (Ne.symm (Finsupp.mem_support_iff.mp hs)) + · rw [barycenter_apply, ite_eq_left hps] + exact inv_pos.mpr (by exact_mod_cast Finset.card_pos.mpr s.nonempty) + +lemma barycentricLinear_eq_zero_iff (g : NonemptyFiniteChains P →₀ ℝ) + (hg : ∀ s, 0 ≤ g s) : barycentricLinear g = 0 ↔ g = 0 := by + classical + constructor + · intro he + by_contra hg0 + obtain ⟨s,hs⟩ := Finsupp.support_nonempty_iff.mpr hg0 + obtain ⟨p,hp⟩ := s.nonempty + have hmem : p ∈ (barycentricLinear g).support := by + rw [barycentricLinear_support_eq g hg] + exact Finset.mem_biUnion.mpr ⟨s,hs,hp⟩ + simp [he] at hmem + · rintro rfl + exact map_zero _ + +lemma flag_has_max (S : Finset (NonemptyFiniteChains P)) + (hc : IsChain (· ≤ ·) (S : Set (NonemptyFiniteChains P))) (hne : S.Nonempty) : + ∃ s ∈ S, ∀ t ∈ S, t ≤ s := by + obtain ⟨s,hs,hm⟩ := Finset.exists_max_image S (fun t => t.finset.card) hne + refine ⟨s,hs,fun t ht => ?_⟩ + rcases hc.total ht hs with h | h + · exact h + · exact le_of_eq (NonemptyFiniteChains.ext (Finset.eq_of_subset_of_card_le h (hm t ht))).symm + +lemma flag_union_eq_max (S : Finset (NonemptyFiniteChains P)) + (s : NonemptyFiniteChains P) (hs : s ∈ S) (hm : ∀ t ∈ S, t ≤ s) : + S.biUnion NonemptyFiniteChains.finset = s.finset := by + classical + ext p + constructor + · rintro hp + obtain ⟨t,ht,hpt⟩ := Finset.mem_biUnion.mp hp + exact hm t ht hpt + · intro hp + exact Finset.mem_biUnion.mpr ⟨s,hs,hp⟩ + +lemma flag_max_exclusive_vertex (S : Finset (NonemptyFiniteChains P)) + (hc : IsChain (· ≤ ·) (S : Set (NonemptyFiniteChains P))) + (s : NonemptyFiniteChains P) (_ : s ∈ S) (hm : ∀ t ∈ S, t ≤ s) : + ∃ p ∈ s.finset, ∀ t ∈ S, p ∈ t.finset → t = s := by + classical + by_cases hne : (S.erase s).Nonempty + · obtain ⟨t,ht,htm⟩ := flag_has_max (S.erase s) (hc.mono (by simp)) hne + have hts : t ≤ s := hm t (Finset.mem_of_mem_erase ht) + have hst : ¬s.finset ⊆ t.finset := by + intro h + exact (Finset.mem_erase.mp ht).1 (le_antisymm hts h) + obtain ⟨p,hps,hpt⟩ := Finset.not_subset.mp hst + refine ⟨p,hps,fun a ha hpa => ?_⟩ + by_contra has + exact hpt (htm a (Finset.mem_erase.mpr ⟨has,ha⟩) hpa) + · obtain ⟨p,hp⟩ := s.nonempty + refine ⟨p,hp,fun t ht hpt => ?_⟩ + by_contra hts + exact hne ⟨t,Finset.mem_erase.mpr ⟨hts,ht⟩⟩ + +lemma barycentric_max_minimum (g : NonemptyFiniteChains P →₀ ℝ) + (hn : ∀ s, 0 ≤ g s) (hc : IsChain (· ≤ ·) (g.support : Set (NonemptyFiniteChains P))) + (s : NonemptyFiniteChains P) (hs : s ∈ g.support) (hm : ∀ t ∈ g.support, t ≤ s) : + (∀ p ∈ s.finset, g s * (s.finset.card : ℝ)⁻¹ ≤ barycentricLinear g p) ∧ + ∃ p ∈ s.finset, barycentricLinear g p = g s * (s.finset.card : ℝ)⁻¹ := by + classical + constructor + · intro p hp + rw [barycentricLinear_apply, Finsupp.sum] + have hl := Finset.single_le_sum (f := fun t => g t * (barycenter t).weights p) + (fun t ht => mul_nonneg (hn t) ((barycenter t).nonneg p)) hs + simpa only [barycenter_apply, ite_eq_left hp] using hl + · obtain ⟨p,hps,hex⟩ := flag_max_exclusive_vertex g.support hc s hs hm + refine ⟨p,hps,?_⟩ + rw [barycentricLinear_apply, Finsupp.sum] + calc + ∑ t ∈ g.support, g t * (barycenter t).weights p = + g s * (barycenter s).weights p := by + apply Finset.sum_eq_single s + · intro t ht hts + have hpnot : p ∉ t.finset := fun h => hts (hex t ht h) + simp [barycenter_apply, hpnot] + · exact fun h => (h hs).elim + _ = _ := by rw [barycenter_apply, ite_eq_left hps] + +lemma barycentricLinear_injective_nonneg_flag + (g h : NonemptyFiniteChains P →₀ ℝ) + (hgn : ∀ s, 0 ≤ g s) (hhn : ∀ s, 0 ≤ h s) + (hgc : IsChain (· ≤ ·) (g.support : Set (NonemptyFiniteChains P))) + (hhc : IsChain (· ≤ ·) (h.support : Set (NonemptyFiniteChains P))) + (he : barycentricLinear g = barycentricLinear h) : g = h := by + classical + suffices ∀ (n : ℕ) (g h : NonemptyFiniteChains P →₀ ℝ), g.support.card = n → + (∀ s, 0 ≤ g s) → (∀ s, 0 ≤ h s) → + IsChain (· ≤ ·) (g.support : Set (NonemptyFiniteChains P)) → + IsChain (· ≤ ·) (h.support : Set (NonemptyFiniteChains P)) → + barycentricLinear g = barycentricLinear h → g = h by + exact this _ g h rfl hgn hhn hgc hhc he + intro n + induction n using Nat.strong_induction_on with + | h n ih => + intro g h hcard hgn hhn hgc hhc he + by_cases hg0 : g = 0 + · subst g + have hh0 : h = 0 := (barycentricLinear_eq_zero_iff h hhn).mp (by simpa using he.symm) + exact hh0.symm + have hh0 : h ≠ 0 := by + rintro rfl + exact hg0 ((barycentricLinear_eq_zero_iff g hgn).mp (by simpa using he)) + obtain ⟨s,hs,hsm⟩ := flag_has_max g.support hgc (Finsupp.support_nonempty_iff.mpr hg0) + obtain ⟨t,ht,htm⟩ := flag_has_max h.support hhc (Finsupp.support_nonempty_iff.mpr hh0) + have hst : s = t := by + apply NonemptyFiniteChains.ext + calc + s.finset = (barycentricLinear g).support := + ((barycentricLinear_support_eq g hgn).trans (flag_union_eq_max _ s hs hsm)).symm + _ = (barycentricLinear h).support := congrArg Finsupp.support he + _ = t.finset := (barycentricLinear_support_eq h hhn).trans (flag_union_eq_max _ t ht htm) + subst t + obtain ⟨hgl,p,hp,hpe⟩ := barycentric_max_minimum g hgn hgc s hs hsm + obtain ⟨hhl,q,hq,hqe⟩ := barycentric_max_minimum h hhn hhc s ht htm + have hcoef : g s = h s := by + have hp' := hhl p hp + have hq' := hgl q hq + rw [← he, hpe] at hp' + rw [he, hqe] at hq' + have hc : (s.finset.card : ℝ)⁻¹ > 0 := + inv_pos.mpr (by exact_mod_cast Finset.card_pos.mpr s.nonempty) + exact (mul_right_cancel₀ hc.ne') (le_antisymm hq' hp') + have herase : barycentricLinear (g.erase s) = barycentricLinear (h.erase s) := by + have hg := congrArg barycentricLinear (Finsupp.erase_add_single s g) + have hh := congrArg barycentricLinear (Finsupp.erase_add_single s h) + rw [map_add] at hg hh + rw [hcoef, he] at hg + exact add_right_cancel (hg.trans hh.symm) + have heraseeq : g.erase s = h.erase s := by + apply ih (g.erase s).support.card + · rw [Finsupp.support_erase, ← hcard] + exact Finset.card_lt_card (Finset.erase_ssubset hs) + · rfl + · intro t + rw [Finsupp.erase_apply] + split_ifs + · exact le_rfl + · exact hgn t + · intro t + rw [Finsupp.erase_apply] + split_ifs + · exact le_rfl + · exact hhn t + · exact hgc.mono (by simp) + · exact hhc.mono (by simp) + · exact herase + calc + g = g.erase s + Finsupp.single s (g s) := (Finsupp.erase_add_single s g).symm + _ = h.erase s + Finsupp.single s (h s) := by rw [heraseeq,hcoef] + _ = h := Finsupp.erase_add_single s h + +lemma subdivide_injective : Function.Injective (@subdivide P _) := by + intro x y h + apply PolyPoint.ext + apply barycentricLinear_injective_nonneg_flag x.weights y.weights + x.nonneg y.nonneg x.chain y.chain + exact congrArg PolyPoint.weights h + +end Thomason.GeometricRecognition.PolyPoint + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GeometricRecognition +namespace PolyPoint +variable {P : Type u} [PartialOrder P] + +instance finiteChainIndex [Finite P] : Finite (ChainIndex P) := + Finite.of_injective ChainIndex.carrier (by + intro s t h + cases s + cases t + cases h + rfl) + +lemma isCompact_chainFace (s : ChainIndex P) : + IsCompact (Set.range (fun x : Face s.carrier => x.val)) := by + classical + have he : Set.range (fun x : Face s.carrier => x.val) = Set.range (eval s.vertices) := by + ext x + constructor + · rintro ⟨a,rfl⟩ + exact ⟨s.coordinates a, s.eval_coordinates a⟩ + · rintro ⟨a,rfl⟩ + refine ⟨⟨eval s.vertices a, ?_⟩,rfl⟩ + intro p hp + obtain ⟨i,hi,rfl⟩ := Finset.mem_image.mp (evalWeights_support s.vertices a hp) + exact s.vertices_mem i + rw [he] + exact isCompact_range (continuous_eval s.vertices) + +instance compactSpace [Finite P] : CompactSpace (PolyPoint P) := by + classical + have hc : IsCompact (⋃ s : ChainIndex P, Set.range (fun x : Face s.carrier => x.val)) := + isCompact_iUnion isCompact_chainFace + have he : (⋃ s : ChainIndex P, Set.range (fun x : Face s.carrier => x.val)) = Set.univ := by + apply Set.eq_univ_of_forall + intro x + exact Set.mem_iUnion.mpr ⟨supportIndex x, ⟨⟨x,Finset.Subset.refl _⟩,rfl⟩⟩ + exact ⟨he ▸ hc⟩ + +lemma embedding_weights [Finite P] : + Topology.IsEmbedding (fun x : PolyPoint P => (fun p => x.weights p)) := + ((continuous_pi continuous_weights).isClosedEmbedding + (by intro x y h; exact PolyPoint.ext (Finsupp.ext (congrFun h)))).isEmbedding + +lemma continuous_iff_weights [Finite P] {A : Type*} [TopologicalSpace A] + (f : A → PolyPoint P) : Continuous f ↔ ∀ p, Continuous (fun a => (f a).weights p) := by + rw [embedding_weights.isInducing.continuous_iff] + exact continuous_pi_iff + +instance finiteBoundedChainIndex (s : Finset P) : + Finite {t : ChainIndex P // t.carrier ⊆ s} := by + classical + apply Finite.of_injective + (fun t : {t : ChainIndex P // t.carrier ⊆ s} => + (⟨t.val.carrier,Finset.mem_powerset.mpr t.property⟩ : ↥s.powerset)) + intro a b h + apply Subtype.ext + have hc : a.val.carrier = b.val.carrier := congrArg Subtype.val h + obtain ⟨⟨ca,ha,na⟩,pa⟩ := a + obtain ⟨⟨cb,hb,nb⟩,pb⟩ := b + cases hc + rfl + +lemma isCompact_carrier (s : Finset P) : + IsCompact {x : PolyPoint P | x.weights.support ⊆ s} := by + classical + have hc : IsCompact (⋃ t : {t : ChainIndex P // t.carrier ⊆ s}, + Set.range (fun x : Face t.val.carrier => x.val)) := + isCompact_iUnion (fun t => isCompact_chainFace t.val) + have he : (⋃ t : {t : ChainIndex P // t.carrier ⊆ s}, + Set.range (fun x : Face t.val.carrier => x.val)) = + {x : PolyPoint P | x.weights.support ⊆ s} := by + ext x + constructor + · intro hx + obtain ⟨t,⟨a,rfl⟩⟩ := Set.mem_iUnion.mp hx + exact a.property.trans t.property + · intro hx + exact Set.mem_iUnion.mpr ⟨⟨supportIndex x,hx⟩,⟨⟨x,Finset.Subset.refl _⟩,rfl⟩⟩ + exact he ▸ hc + +lemma isClosed_carrier (s : Finset P) : + IsClosed {x : PolyPoint P | x.weights.support ⊆ s} := by + classical + have he : {x : PolyPoint P | x.weights.support ⊆ s} = + ⋂ p : {p : P // p ∉ s}, {x : PolyPoint P | x.weights p.val = 0} := by + ext x + simp only [Set.mem_ofPred_eq, Set.mem_iInter] + constructor + · intro hx p + exact Finsupp.notMem_support_iff.mp (fun h => p.property (hx h)) + · intro hx p hp + by_contra hps + exact (Finsupp.mem_support_iff.mp hp) (hx ⟨p,hps⟩) + rw [he] + exact isClosed_iInter (fun p => isClosed_eq (continuous_weights p.val) continuous_const) + +lemma continuous_face_val (s : Finset P) : Continuous (fun x : Face s => x.val) := by + let : CompactSpace {x : PolyPoint P | x.weights.support ⊆ s} := + isCompact_iff_compactSpace.mp (isCompact_carrier s) + have hc : Continuous (fun x : {x : PolyPoint P | x.weights.support ⊆ s} => + (fun p => x.val.weights p)) := + continuous_pi (fun p => (continuous_weights p).comp continuous_subtype_val) + have he : Topology.IsEmbedding + (fun x : {x : PolyPoint P | x.weights.support ⊆ s} => (fun p => x.val.weights p)) := + (hc.isClosedEmbedding (by + intro x y h + exact Subtype.ext (PolyPoint.ext (Finsupp.ext (congrFun h))))).isEmbedding + have hf : Continuous (fun x : Face s => + (⟨x.val,x.property⟩ : {x : PolyPoint P | x.weights.support ⊆ s})) := + he.continuous_iff.mpr continuous_induced_dom + exact continuous_subtype_val.comp hf + +lemma continuous_of_finite_carrier {A : Type*} [TopologicalSpace A] + (f : A → PolyPoint P) (s : Finset P) (h : ∀ a, (f a).weights.support ⊆ s) + (hf : ∀ p, Continuous (fun a => (f a).weights p)) : Continuous f := by + let g : A → Face s := fun a => ⟨f a,h a⟩ + have hg : Continuous g := continuous_induced_rng.mpr (continuous_pi hf) + exact (continuous_face_val s).comp hg + +end PolyPoint +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open PartialOrder + +namespace Thomason.GeometricRecognition.PolyPoint +variable {P : Type u} [PartialOrder P] +local instance boundedFacesDecidableEq : DecidableEq P := Classical.decEq P + +instance finiteBoundedFaces (s : Finset P) : + Finite {t : NonemptyFiniteChains P // t.finset ⊆ s} := by + classical + apply Finite.of_injective + (fun t : {t : NonemptyFiniteChains P // t.finset ⊆ s} => + (⟨t.val.finset,Finset.mem_powerset.mpr t.property⟩ : ↥s.powerset)) + intro a b h + exact Subtype.ext (NonemptyFiniteChains.ext (congrArg Subtype.val h)) + +def allFaces (s : Finset P) : Finset (NonemptyFiniteChains P) := + letI : Finite ↑{t : NonemptyFiniteChains P | t.finset ⊆ s} := finiteBoundedFaces s + (Set.toFinite {t : NonemptyFiniteChains P | t.finset ⊆ s}).toFinset + +@[simp] lemma mem_allFaces (s : Finset P) (t : NonemptyFiniteChains P) : + t ∈ allFaces s ↔ t.finset ⊆ s := by simp [allFaces] + +lemma subdivide_carrier_iff (x : PolyPoint (NonemptyFiniteChains P)) (s : Finset P) : + (subdivide x).weights.support ⊆ s ↔ x.weights.support ⊆ allFaces s := by + classical + change (barycentricLinear x.weights).support ⊆ s ↔ _ + rw [barycentricLinear_support_eq x.weights x.nonneg] + constructor + · intro h t ht + rw [mem_allFaces] + exact fun p hp => h (Finset.mem_biUnion.mpr ⟨t,ht,hp⟩) + · intro h p hp + obtain ⟨t,ht,hpt⟩ := Finset.mem_biUnion.mp hp + exact (mem_allFaces s t).mp (h ht) hpt + +lemma isClosedMap_subdivide : IsClosedMap (@subdivide P _) := by + classical + intro A hA + rw [isClosed_iff_faces] + intro s + let K : Set (PolyPoint (NonemptyFiniteChains P)) := + {x | x.weights.support ⊆ allFaces s.carrier} + have hK : IsCompact K := isCompact_carrier _ + have hAK : IsCompact (A ∩ K) := hK.inter_left hA + have he : (fun y : Face s.carrier => y.val) ⁻¹' (subdivide '' A) = + (fun y : Face s.carrier => y.val) ⁻¹' (subdivide '' (A ∩ K)) := by + ext y + constructor + · rintro ⟨x,hx,hxy⟩ + refine ⟨x,⟨hx,?_⟩,hxy⟩ + exact (subdivide_carrier_iff x s.carrier).mp + (by rw [hxy]; exact y.property) + · rintro ⟨x,⟨hx,hKx⟩,hxy⟩ + exact ⟨x,hx,hxy⟩ + rw [he] + exact (hAK.image continuous_subdivide).isClosed.preimage (continuous_chainFace_val s) + +def subdivisionHomeomorph : PolyPoint (NonemptyFiniteChains P) ≃ₜ PolyPoint P := + (Equiv.ofBijective subdivide ⟨subdivide_injective,subdivide_surjective⟩).toHomeomorphOfContinuousClosed + continuous_subdivide isClosedMap_subdivide +end Thomason.GeometricRecognition.PolyPoint + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GeometricRecognition.Mesh +variable {P : Type u} {V : Type v} [NormedAddCommGroup V] [NormedSpace ℝ V] +local instance : DecidableEq P := Classical.decEq P + +def average (s : Finset P) (v : P → V) : V := (s.card : ℝ)⁻¹ • ∑ p ∈ s, v p + +lemma card_smul_average (s : Finset P) (hs : s.Nonempty) (v : P → V) : + (s.card : ℝ) • average s v = ∑ p ∈ s, v p := by + rw [average, smul_smul, mul_inv_cancel₀, one_smul] + exact_mod_cast Finset.card_ne_zero.mpr hs + +lemma average_sub (s : Finset P) (hs : s.Nonempty) (v : P → V) (w : V) : + average s v - w = average s (fun p => v p - w) := by + have hn : (s.card : ℝ) ≠ 0 := by exact_mod_cast Finset.card_ne_zero.mpr hs + rw [average, average, Finset.sum_sub_distrib, Finset.sum_const, + ← Nat.cast_smul_eq_nsmul ℝ, smul_sub, smul_smul, inv_mul_cancel₀ hn, one_smul] + +lemma norm_average_sub_le (s : Finset P) (hs : s.Nonempty) (v : P → V) (w : V) + (d : ℝ) (hd : ∀ p ∈ s, ‖v p - w‖ ≤ d) : ‖average s v - w‖ ≤ d := by + have hn : (s.card : ℝ) ≠ 0 := by exact_mod_cast Finset.card_ne_zero.mpr hs + rw [average_sub s hs, average, norm_smul, Real.norm_of_nonneg (by positivity)] + calc + (s.card : ℝ)⁻¹ * ‖∑ p ∈ s, (v p - w)‖ ≤ + (s.card : ℝ)⁻¹ * ∑ p ∈ s, d := + mul_le_mul_of_nonneg_left (norm_sum_le_of_le s hd) (by positivity) + _ = d := by rw [Finset.sum_const, nsmul_eq_mul, ← mul_assoc, inv_mul_cancel₀ hn, one_mul] + +lemma sum_average_sub (s : Finset P) (hs : s.Nonempty) (v : P → V) : + ∑ p ∈ s, (average s v - v p) = 0 := by + rw [Finset.sum_sub_distrib, Finset.sum_const, ← Nat.cast_smul_eq_nsmul ℝ, + card_smul_average s hs v, sub_self] + +lemma average_sub_average (s t : Finset P) (ht : t.Nonempty) (hst : s ⊆ t) + (hs : s.Nonempty) (v : P → V) : + average s v - average t v = (t.card : ℝ)⁻¹ • + ∑ p ∈ t \ s, (average s v - v p) := by + classical + have hn : (t.card : ℝ) ≠ 0 := by exact_mod_cast Finset.card_ne_zero.mpr ht + have hsum : ∑ p ∈ t \ s, (average s v - v p) = ∑ p ∈ t, (average s v - v p) := by + rw [Finset.sum_sdiff_eq_sub hst, sum_average_sub s hs v, sub_zero] + rw [hsum, Finset.sum_sub_distrib, Finset.sum_const, ← Nat.cast_smul_eq_nsmul ℝ, + smul_sub, smul_smul, inv_mul_cancel₀ hn, one_smul] + rfl + +lemma norm_average_sub_average_le (s t : Finset P) (ht : t.Nonempty) (hst : s ⊆ t) + (hs : s.Nonempty) (v : P → V) (d : ℝ) + (hd : ∀ p ∈ t, ∀ q ∈ t, ‖v p - v q‖ ≤ d) : + ‖average s v - average t v‖ ≤ + ((t.card : ℝ) - (s.card : ℝ)) / (t.card : ℝ) * d := by + classical + rw [average_sub_average s t ht hst hs, norm_smul, Real.norm_of_nonneg (by positivity)] + have hb (q : P) (hq : q ∈ t \ s) : ‖average s v - v q‖ ≤ d := + norm_average_sub_le s hs v (v q) d (fun p hp => hd p (hst hp) q (Finset.mem_sdiff.mp hq).1) + calc + (t.card : ℝ)⁻¹ * ‖∑ p ∈ t \ s, (average s v - v p)‖ ≤ + (t.card : ℝ)⁻¹ * ∑ p ∈ t \ s, d := + mul_le_mul_of_nonneg_left (norm_sum_le_of_le (t \ s) hb) (by positivity) + _ = ((t.card : ℝ) - (s.card : ℝ)) / (t.card : ℝ) * d := by + rw [Finset.sum_const, nsmul_eq_mul, Finset.card_sdiff, + Finset.inter_eq_left.mpr hst, Nat.cast_sub (Finset.card_le_card hst)] + ring + +def ratio (N : ℕ) : ℝ := ((N : ℝ) - 1) / (N : ℝ) + +lemma ratio_nonneg {N : ℕ} (hN : 0 < N) : 0 ≤ ratio N := by + dsimp [ratio] + exact div_nonneg (sub_nonneg.mpr (by exact_mod_cast Nat.succ_le_iff.mpr hN)) (by positivity) + +lemma ratio_lt_one {N : ℕ} (hN : 0 < N) : ratio N < 1 := by + dsimp [ratio] + apply (div_lt_iff₀ (by exact_mod_cast hN : (0 : ℝ) < N)).mpr + linarith + +lemma card_ratio_le {s t : Finset P} (hs : s.Nonempty) (ht : t.Nonempty) + (N : ℕ) (hcard : t.card ≤ N) : + ((t.card : ℝ) - (s.card : ℝ)) / (t.card : ℝ) ≤ ratio N := by + have htpos : (0 : ℝ) < t.card := by exact_mod_cast Finset.card_pos.mpr ht + have hNpos : (0 : ℝ) < N := lt_of_lt_of_le htpos (by exact_mod_cast hcard) + have hspos : (1 : ℝ) ≤ s.card := by exact_mod_cast Finset.card_pos.mpr hs + have hc : (t.card : ℝ) ≤ N := by exact_mod_cast hcard + rw [ratio, div_le_div_iff₀ htpos hNpos] + nlinarith + +lemma norm_nested_barycenters_le (s t : Finset P) (ht : t.Nonempty) (hst : s ⊆ t) + (hs : s.Nonempty) (v : P → V) (d : ℝ) (hd0 : 0 ≤ d) + (hd : ∀ p ∈ t, ∀ q ∈ t, ‖v p - v q‖ ≤ d) + (N : ℕ) (hcard : t.card ≤ N) : + ‖average s v - average t v‖ ≤ ratio N * d := + (norm_average_sub_average_le s t ht hst hs v d hd).trans + (mul_le_mul_of_nonneg_right (card_ratio_le hs ht N hcard) hd0) + +end Thomason.GeometricRecognition.Mesh + +end + +noncomputable section +universe u v w z +open PartialOrder + +namespace Thomason.GeometricRecognition +namespace Mesh +variable {P : Type u} [PartialOrder P] +variable {V : Type v} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def ChainBound (P : Type u) [PartialOrder P] (N : ℕ) : Prop := + ∀ s : NonemptyFiniteChains P, s.finset.card ≤ N + +lemma chainBound_subdivision {N : ℕ} (h : ChainBound P N) : + ChainBound (NonemptyFiniteChains P) N := by + classical + intro c + have hinj : Set.InjOn (fun s : NonemptyFiniteChains P => s.finset.card) c.finset := by + intro a ha b hb he + change a.finset.card = b.finset.card at he + rcases c.comparable ⟨a,ha⟩ ⟨b,hb⟩ with hab | hba + · exact NonemptyFiniteChains.ext (Finset.eq_of_subset_of_card_le (show a.finset ⊆ b.finset from hab) he.ge) + · exact (NonemptyFiniteChains.ext (Finset.eq_of_subset_of_card_le (show b.finset ⊆ a.finset from hba) he.le)).symm + have he : (c.finset.image (fun s => s.finset.card)).card = c.finset.card := + Finset.card_image_of_injOn hinj + have hsub : c.finset.image (fun s => s.finset.card) ⊆ Finset.Icc 1 N := by + intro n hn + obtain ⟨a,ha,rfl⟩ := Finset.mem_image.mp hn + exact Finset.mem_Icc.mpr ⟨Finset.card_pos.mpr a.nonempty, h a⟩ + have hn := Finset.card_le_card hsub + simpa only [he, Nat.card_Icc, Nat.add_sub_cancel] using hn + +def Bound (v : P → V) (d : ℝ) : Prop := + ∀ p q, (p ≤ q ∨ q ≤ p) → ‖v p - v q‖ ≤ d + +lemma bound_subdivision (v : P → V) (d : ℝ) (hd : 0 ≤ d) (hv : Bound v d) + {N : ℕ} (hN : ChainBound P N) : + Bound (fun s : NonemptyFiniteChains P => average s.finset v) (ratio N * d) := by + intro s t hst + rcases hst with hst | hts + · exact norm_nested_barycenters_le s.finset t.finset t.nonempty hst s.nonempty + v d hd (fun p hp q hq => hv p q (t.comparable ⟨p,hp⟩ ⟨q,hq⟩)) N (hN t) + · rw [norm_sub_rev] + exact norm_nested_barycenters_le t.finset s.finset s.nonempty hts t.nonempty + v d hd (fun p hp q hq => hv p q (s.comparable ⟨p,hp⟩ ⟨q,hq⟩)) N (hN s) + +def evaluate (v : P → V) (x : PolyPoint P) : V := + Finsupp.linearCombination ℝ v x.weights + +lemma evaluate_eq_sum (v : P → V) (x : PolyPoint P) : + evaluate v x = ∑ p ∈ x.weights.support, x.weights p • v p := by + rfl + +lemma norm_evaluate_sub_le (v : P → V) (x : PolyPoint P) (w : V) (d : ℝ) + (h : ∀ p ∈ x.weights.support, ‖v p - w‖ ≤ d) : ‖evaluate v x - w‖ ≤ d := by + have ht : ∑ p ∈ x.weights.support, x.weights p = 1 := x.total + have he : evaluate v x - w = + ∑ p ∈ x.weights.support, x.weights p • (v p - w) := by + simp_rw [smul_sub] + rw [Finset.sum_sub_distrib, ← Finset.sum_smul, ht, one_smul] + rfl + rw [he] + calc + ‖∑ p ∈ x.weights.support, x.weights p • (v p - w)‖ ≤ + ∑ p ∈ x.weights.support, x.weights p * d := by + apply norm_sum_le_of_le + intro p hp + rw [norm_smul, Real.norm_of_nonneg (x.nonneg p)] + exact mul_le_mul_of_nonneg_left (h p hp) (x.nonneg p) + _ = d := by + rw [← Finset.sum_mul, ht, one_mul] + +lemma evaluate_barycenter (v : P → V) (s : NonemptyFiniteChains P) : + evaluate v (PolyPoint.barycenter s) = average s.finset v := by + classical + simp only [evaluate, PolyPoint.barycenter, map_sum, Finsupp.linearCombination_single, + ← Finset.smul_sum, average] + +lemma evaluate_subdivide (v : P → V) (x : PolyPoint (NonemptyFiniteChains P)) : + evaluate v (PolyPoint.subdivide x) = + evaluate (fun s : NonemptyFiniteChains P => average s.finset v) x := by + change Finsupp.linearCombination ℝ v (PolyPoint.barycentricLinear x.weights) = _ + have hi : PolyPoint.barycentricLinear x.weights = + x.weights.sum (fun s r => r • (PolyPoint.barycenter s).weights) := rfl + rw [hi, map_finsuppSum] + simp only [map_smul] + change x.weights.sum (fun s r => r • evaluate v (PolyPoint.barycenter s)) = _ + simp only [evaluate_barycenter] + rfl + +instance finiteChains [Finite P] : Finite (NonemptyFiniteChains P) := + Finite.of_injective NonemptyFiniteChains.finset + (fun _ _ h => NonemptyFiniteChains.ext h) + +@[reducible] def level (P : PartOrd.{u}) : ℕ → PartOrd.{u} + | 0 => P + | n + 1 => PartOrd.of (NonemptyFiniteChains (level P n)) + +instance finiteLevel (P : PartOrd.{u}) [Finite P] (n : ℕ) : Finite (level P n) := by + induction n with + | zero => exact ‹Finite P› + | succ n ih => exact @finiteChains (level P n) _ ih + +def levelHomeomorph (P : PartOrd.{u}) : (n : ℕ) → PolyPoint (level P n) ≃ₜ PolyPoint P + | 0 => Homeomorph.refl _ + | n + 1 => PolyPoint.subdivisionHomeomorph.trans (levelHomeomorph P n) + +def levelVertices (P : PartOrd.{u}) (v : P → V) : (n : ℕ) → level P n → V + | 0 => v + | n + 1 => fun s => average s.finset (levelVertices P v n) + +lemma chainBound_level (P : PartOrd.{u}) {N : ℕ} (h : ChainBound P N) (n : ℕ) : + ChainBound (level P n) N := by + induction n with + | zero => exact h + | succ n ih => exact chainBound_subdivision ih + +lemma bound_level (P : PartOrd.{u}) (v : P → V) (d : ℝ) (hd : 0 ≤ d) + (hv : Bound v d) {N : ℕ} (hN : 0 < N) (hP : ChainBound P N) (n : ℕ) : + Bound (levelVertices P v n) ((ratio N) ^ n * d) := by + induction n with + | zero => simpa only [levelVertices, pow_zero, one_mul] using hv + | succ n ih => + have h := bound_subdivision (levelVertices P v n) ((ratio N) ^ n * d) + (mul_nonneg (pow_nonneg (ratio_nonneg hN) n) hd) ih (chainBound_level P hP n) + simpa only [levelVertices, pow_succ', mul_assoc] using h + +lemma evaluate_levelHomeomorph (P : PartOrd.{u}) (v : P → V) (n : ℕ) + (x : PolyPoint (level P n)) : + evaluate v (levelHomeomorph P n x) = evaluate (levelVertices P v n) x := by + induction n with + | zero => rfl + | succ n ih => + change evaluate v (levelHomeomorph P n (PolyPoint.subdivide x)) = _ + rw [ih] + exact evaluate_subdivide (levelVertices P v n) x + +lemma exists_small_mesh (P : PartOrd.{u}) (v : P → V) (d : ℝ) (hd : 0 ≤ d) + (hv : Bound v d) {N : ℕ} (hN : 0 < N) (hP : ChainBound P N) + {ε : ℝ} (hε : 0 < ε) : + ∃ n : ℕ, ∃ e : ℝ, 0 ≤ e ∧ e < ε ∧ Bound (levelVertices P v n) e := by + have ht : Filter.Tendsto (fun n : ℕ => ratio N ^ n * d) Filter.atTop (nhds 0) := by + simpa only [zero_mul] using + (tendsto_pow_atTop_nhds_zero_of_lt_one (ratio_nonneg hN) (ratio_lt_one hN)).mul_const d + obtain ⟨n, hn⟩ := Filter.Eventually.exists (ht.eventually (gt_mem_nhds hε)) + exact ⟨n,ratio N ^ n * d, mul_nonneg (pow_nonneg (ratio_nonneg hN) n) hd, + hn, bound_level P v d hd hv hN hP n⟩ + +end Mesh +end Thomason.GeometricRecognition + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/BoundaryQuotients.lean b/lean/OAI/CategoryTheory/Thomason/BoundaryQuotients.lean new file mode 100644 index 0000000000000000000000000000000000000000..15d08439e7476a63bf356a472aedc6fcbbd5f42d --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/BoundaryQuotients.lean @@ -0,0 +1,766 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.GlobularComplexes + +namespace OAI + +/-! Boundary Quotients. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +def boundarySetoid (C : OmegaCategory.{u}) (n : ℕ) : Setoid C.Cell where + r x y := C.source n x = C.source n y ∧ C.target n x = C.target n y + iseqv := ⟨fun _ => ⟨rfl,rfl⟩, fun h => ⟨h.1.symm,h.2.symm⟩, + fun h h' => ⟨h.1.trans h'.1,h.2.trans h'.2⟩⟩ + +namespace BoundaryQuotient +variable (C : OmegaCategory.{u}) (n : ℕ) +abbrev Cell := Quotient (boundarySetoid C n) +def map (x : C.Cell) : Cell C n := Quotient.mk _ x +lemma map_eq_iff (x y : C.Cell) : map C n x = map C n y ↔ + C.source n x = C.source n y ∧ C.target n x = C.target n y := Quotient.eq +lemma surjective : Function.Surjective (map C n) := Quotient.mk_surjective + +lemma source_respects (k : ℕ) {x y : C.Cell} + (h : C.source n x = C.source n y ∧ C.target n x = C.target n y) : + C.source n (C.source k x) = C.source n (C.source k y) ∧ + C.target n (C.source k x) = C.target n (C.source k y) := by + by_cases hk : n < k + · simpa [C.source_source, C.target_source, hk, min_eq_left (le_of_lt hk)] using h + · have hs : C.source k x = C.source k y := by + simpa [C.source_source, min_eq_left (Nat.le_of_not_gt hk)] using congrArg (C.source k) h.1 + exact ⟨congrArg (C.source n) hs, congrArg (C.target n) hs⟩ + +lemma target_respects (k : ℕ) {x y : C.Cell} + (h : C.source n x = C.source n y ∧ C.target n x = C.target n y) : + C.source n (C.target k x) = C.source n (C.target k y) ∧ + C.target n (C.target k x) = C.target n (C.target k y) := by + by_cases hk : n < k + · simpa [C.source_target, C.target_target, hk, min_eq_left (le_of_lt hk)] using h + · have ht : C.target k x = C.target k y := by + simpa [C.target_target, min_eq_left (Nat.le_of_not_gt hk)] using congrArg (C.target k) h.2 + exact ⟨congrArg (C.source n) ht, congrArg (C.target n) ht⟩ + +def source (k : ℕ) : Cell C n → Cell C n := Quotient.map (C.source k) (fun _ _ h => source_respects C n k h) +def target (k : ℕ) : Cell C n → Cell C n := Quotient.map (C.target k) (fun _ _ h => target_respects C n k h) +@[simp] lemma source_map (k : ℕ) (x : C.Cell) : source C n k (map C n x) = map C n (C.source k x) := rfl +@[simp] lemma target_map (k : ℕ) (x : C.Cell) : target C n k (map C n x) = map C n (C.target k x) := rfl + +lemma source_high (k : ℕ) (hk : n < k) (x : Cell C n) : source C n k x = x := by + induction x using Quotient.inductionOn with | h x => + apply (map_eq_iff C n _ _).mpr + simp [C.source_source, C.target_source, hk, min_eq_left (le_of_lt hk)] +lemma target_high (k : ℕ) (hk : n < k) (x : Cell C n) : target C n k x = x := by + induction x using Quotient.inductionOn with | h x => + apply (map_eq_iff C n _ _).mpr + simp [C.source_target, C.target_target, hk, min_eq_left (le_of_lt hk)] + +lemma injective_on_lower {x y : C.Cell} (hx : C.source n x = x) + (hy : C.source n y = y) (h : map C n x = map C n y) : x = y := by + simpa only [hx,hy] using ((map_eq_iff C n x y).mp h).1 + +lemma composable_low {k : ℕ} (hk : k ≤ n) {x y : C.Cell} + (h : target C n k (map C n x) = source C n k (map C n y)) : + C.target k x = C.source k y := by + apply injective_on_lower C n _ _ h + · exact C.source_fixed_upwards hk (C.source_target_self k x) + · exact C.source_fixed_upwards hk (C.source_source_self k y) + +def comp (k : ℕ) (x y : Cell C n) (h : target C n k x = source C n k y) : Cell C n := + if hk : k ≤ n then + map C n (C.comp k x.out y.out (composable_low C n hk (by simpa [map] using h))) + else x + +lemma comp_map (k : ℕ) (x y : C.Cell) (h : C.target k x = C.source k y) + (h' : target C n k (map C n x) = source C n k (map C n y)) : + comp C n k (map C n x) (map C n y) h' = map C n (C.comp k x y h) := by + by_cases hk : k ≤ n + · simp only [comp, dite_eq_left hk] + apply (map_eq_iff C n _ _).mpr + have hx := (map_eq_iff C n _ _).mp (Quotient.out_eq (map C n x)) + have hy := (map_eq_iff C n _ _).mp (Quotient.out_eq (map C n y)) + have hr : C.target k (map C n x).out = C.source k (map C n y).out := + composable_low C n hk (by simpa [map] using h') + by_cases hnk : n ≤ k + · simpa only [C.source_comp_le n k hnk, C.target_comp_le n k hnk] using And.intro hx.1 hy.2 + · have hlt : k < n := Nat.lt_of_not_ge hnk + constructor + · rw [C.source_comp_gt n k hlt _ _ _ (C.source_composable hlt hr), + C.source_comp_gt n k hlt _ _ _ (C.source_composable hlt h)] + congr 1 + · exact hx.1 + · exact hy.1 + · rw [C.target_comp_gt n k hlt _ _ _ (C.target_composable hlt hr), + C.target_comp_gt n k hlt _ _ _ (C.target_composable hlt h)] + congr 1 + · exact hx.2 + · exact hy.2 + · simp only [comp, dite_eq_right hk] + apply (map_eq_iff C n _ _).mpr + have hn : n ≤ k := le_of_lt (Nat.lt_of_not_ge hk) + rw [C.source_comp_le n k hn, C.target_comp_le n k hn] + refine ⟨rfl, ?_⟩ + have he := congrArg (C.target n) h + simpa [C.target_target, C.target_source, Nat.lt_of_not_ge hk, min_eq_left hn] using he + +lemma comp_map_low (k : ℕ) (hk : k ≤ n) (x y : C.Cell) + (h : target C n k (map C n x) = source C n k (map C n y)) : + comp C n k (map C n x) (map C n y) h = + map C n (C.comp k x y (composable_low C n hk h)) := + comp_map C n k x y _ h + +lemma comp_high (k : ℕ) (hk : n < k) (x y : Cell C n) + (h : target C n k x = source C n k y) : comp C n k x y h = x := by + simp only [comp, dite_eq_right (Nat.not_le.mpr hk)] + +lemma high_composable {k : ℕ} (hk : n < k) {x y : Cell C n} + (h : target C n k x = source C n k y) : x = y := by + simpa only [target_high C n k hk, source_high C n k hk] using h + +lemma source_source (i j : ℕ) (x : Cell C n) : + source C n i (source C n j x) = source C n (min i j) x := by + obtain ⟨x,rfl⟩ := surjective C n x + simp only [source_map,C.source_source] +lemma target_target (i j : ℕ) (x : Cell C n) : + target C n i (target C n j x) = target C n (min i j) x := by + obtain ⟨x,rfl⟩ := surjective C n x + simp only [target_map,C.target_target] +lemma source_target (i j : ℕ) (x : Cell C n) : + source C n i (target C n j x) = if i < j then source C n i x else target C n j x := by + obtain ⟨x,rfl⟩ := surjective C n x + by_cases h : i < j <;> simp [source_map,target_map,C.source_target,h] +lemma target_source (i j : ℕ) (x : Cell C n) : + target C n i (source C n j x) = if i < j then target C n i x else source C n j x := by + obtain ⟨x,rfl⟩ := surjective C n x + by_cases h : i < j <;> simp [source_map,target_map,C.target_source,h] + +lemma source_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell C n) + (h : target C n k x = source C n k y) : + source C n i (comp C n k x y h) = source C n i x := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + obtain ⟨y,rfl⟩ := surjective C n y + simp only [comp_map_low C n k hk,source_map,C.source_comp_le i k hik] + · rw [comp_high C n k (Nat.lt_of_not_ge hk)] +lemma target_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell C n) + (h : target C n k x = source C n k y) : + target C n i (comp C n k x y h) = target C n i y := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + obtain ⟨y,rfl⟩ := surjective C n y + simp only [comp_map_low C n k hk,target_map,C.target_comp_le i k hik] + · rw [comp_high C n k (Nat.lt_of_not_ge hk), high_composable C n (Nat.lt_of_not_ge hk) h] + +lemma source_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell C n) + (h : target C n k x = source C n k y) + (hs : target C n k (source C n i x) = source C n k (source C n i y)) : + source C n i (comp C n k x y h) = comp C n k (source C n i x) (source C n i y) hs := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + obtain ⟨y,rfl⟩ := surjective C n y + simp only [comp_map_low C n k hk,source_map] + exact congrArg (map C n) (C.source_comp_gt i k hki x y _ _) + · rw [comp_high C n k (Nat.lt_of_not_ge hk), comp_high C n k (Nat.lt_of_not_ge hk)] +lemma target_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell C n) + (h : target C n k x = source C n k y) + (ht : target C n k (target C n i x) = source C n k (target C n i y)) : + target C n i (comp C n k x y h) = comp C n k (target C n i x) (target C n i y) ht := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + obtain ⟨y,rfl⟩ := surjective C n y + simp only [comp_map_low C n k hk,target_map] + exact congrArg (map C n) (C.target_comp_gt i k hki x y _ _) + · rw [comp_high C n k (Nat.lt_of_not_ge hk), comp_high C n k (Nat.lt_of_not_ge hk)] + +lemma unit_left (k : ℕ) (x : Cell C n) + (h : target C n k (source C n k x) = source C n k x) : + comp C n k (source C n k x) x h = x := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + simp only [source_map,comp_map_low C n k hk,C.unit_left] + · rw [comp_high C n k (Nat.lt_of_not_ge hk),source_high C n k (Nat.lt_of_not_ge hk)] +lemma unit_right (k : ℕ) (x : Cell C n) + (h : target C n k x = source C n k (target C n k x)) : + comp C n k x (target C n k x) h = x := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + simp only [target_map,comp_map_low C n k hk,C.unit_right] + · rw [comp_high C n k (Nat.lt_of_not_ge hk)] + +lemma assoc (k : ℕ) (x y z : Cell C n) + (hxy : target C n k x = source C n k y) (hyz : target C n k y = source C n k z) + (hxy_z : target C n k (comp C n k x y hxy) = source C n k z) + (hx_yz : target C n k x = source C n k (comp C n k y z hyz)) : + comp C n k (comp C n k x y hxy) z hxy_z = comp C n k x (comp C n k y z hyz) hx_yz := by + by_cases hk : k ≤ n + · obtain ⟨x,rfl⟩ := surjective C n x + obtain ⟨y,rfl⟩ := surjective C n y + obtain ⟨z,rfl⟩ := surjective C n z + simp only [comp_map_low C n k hk] + exact congrArg (map C n) (C.assoc k x y z _ _ _ _) + · simp only [comp_high C n k (Nat.lt_of_not_ge hk)] + +lemma interchange (k l : ℕ) (hkl : k < l) (a b c d : Cell C n) + (hab : target C n l a = source C n l b) (hcd : target C n l c = source C n l d) + (hac : target C n k a = source C n k c) (hbd : target C n k b = source C n k d) + (hab_cd : target C n k (comp C n l a b hab) = source C n k (comp C n l c d hcd)) + (hac_bd : target C n l (comp C n k a c hac) = source C n l (comp C n k b d hbd)) : + comp C n k (comp C n l a b hab) (comp C n l c d hcd) hab_cd = + comp C n l (comp C n k a c hac) (comp C n k b d hbd) hac_bd := by + by_cases hl : l ≤ n + · have hk : k ≤ n := (le_of_lt hkl).trans hl + obtain ⟨a,rfl⟩ := surjective C n a + obtain ⟨b,rfl⟩ := surjective C n b + obtain ⟨c,rfl⟩ := surjective C n c + obtain ⟨d,rfl⟩ := surjective C n d + simp only [comp_map_low C n k hk,comp_map_low C n l hl] + exact congrArg (map C n) (C.interchange k l hkl a b c d _ _ _ _ _ _) + · simp only [comp_high C n l (Nat.lt_of_not_ge hl)] + +def category : OmegaCategory.{u} where + Cell := Cell C n + source := source C n + target := target C n + comp := comp C n + source_source := source_source C n + target_target := target_target C n + source_target := source_target C n + target_source := target_source C n + source_comp_le := source_comp_le C n + target_comp_le := target_comp_le C n + source_comp_gt := source_comp_gt C n + target_comp_gt := target_comp_gt C n + unit_left := unit_left C n + unit_right := unit_right C n + assoc := assoc C n + interchange := interchange C n + finite_dimension x := ⟨n+1, source_high C n (n+1) (by omega) x⟩ + +lemma truncated : (category C n).IsTruncated (n+1) := + source_high C n (n+1) (by omega) + +def projection : Functor C (category C n) where + map := map C n + map_source _ _ := rfl + map_target _ _ := rfl + map_comp k x y h h' := (comp_map C n k x y h h').symm + +end BoundaryQuotient + +lemma truncationUnit_injective_below (C : OmegaCategory.{u}) (n k : ℕ) + (hk : k < n) {x y : C.Cell} (hx : C.source k x = x) + (hy : C.source k y = y) + (h : (truncationUnit n C).map x = (truncationUnit n C).map y) : x = y := by + let D : NCategory.{u} n := ⟨BoundaryQuotient.category C k, fun z => + (BoundaryQuotient.category C k).source_fixed_upwards (by omega) + (BoundaryQuotient.truncated C k z)⟩ + let F := truncationLift D (BoundaryQuotient.projection C k) + exact BoundaryQuotient.injective_on_lower C k hx hy (congrArg F.map h) + +lemma truncationUnit_surjective (C : OmegaCategory.{u}) (n : ℕ) : + Function.Surjective (truncationUnit n C).map := by + intro z + induction z using Quotient.inductionOn with | h z => + rcases z with ⟨z,hz⟩ + induction hz with + | gen x => exact ⟨x,rfl⟩ + | source k z hz ih => + obtain ⟨x,hx⟩ := ih + refine ⟨C.source k x, ?_⟩ + rw [(truncationUnit n C).map_source, hx] + rfl + | target k z hz ih => + obtain ⟨x,hx⟩ := ih + refine ⟨C.target k x, ?_⟩ + rw [(truncationUnit n C).map_target, hx] + rfl + | comp k z w hz hw hm ihz ihw => + obtain ⟨x,hx⟩ := ihz + obtain ⟨y,hy⟩ := ihw + have he : (truncationPresentation n C).category.target k (Quotient.mk _ ⟨z,hz⟩) = + (truncationPresentation n C).category.source k (Quotient.mk _ ⟨w,hw⟩) := + Quotient.sound hm + rw [← (truncationPresentation n C).mk_comp k ⟨z,hz⟩ ⟨w,hw⟩ hm he] + change ∃ a, (truncationUnit n C).map a = + (truncationPresentation n C).category.comp k _ _ he + by_cases hk : k < n + · have he' : (truncationUnit n C).map (C.target k x) = + (truncationUnit n C).map (C.source k y) := by + rw [(truncationUnit n C).map_target, (truncationUnit n C).map_source, hx, hy] + exact he + have hc := truncationUnit_injective_below C n k hk + (C.source_target_self k x) (C.source_source_self k y) he' + refine ⟨C.comp k x y hc, ?_⟩ + rw [(truncationUnit n C).map_comp k x y hc ((truncationUnit n C).map_composable hc)] + congr 1 + · refine ⟨y, ?_⟩ + rw [(truncationPresentation n C).category.comp_of_left_source_fixed k _ _ he + ((truncationPresentation n C).category.source_fixed_upwards + (Nat.le_of_not_gt hk) (truncation_isTruncated n C _))] + exact hy + +lemma truncationUnit_surjective_nCells (C : OmegaCategory.{u}) (n : ℕ) + (z : (truncation n C).val.Cell) : + ∃ x : C.Cell, C.source n x = x ∧ (truncationUnit n C).map x = z := by + obtain ⟨x,rfl⟩ := truncationUnit_surjective C n z + refine ⟨C.source n x, C.source_source_self n x, ?_⟩ + rw [(truncationUnit n C).map_source] + exact truncation_isTruncated n C _ + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +lemma truncationUnit_onCells_surjective (C : OmegaCategory.{u}) (n p : ℕ) : + Function.Surjective ((truncationUnit n C).onCells p) := by + intro z + obtain ⟨x,hx⟩ := truncationUnit_surjective C n z.val + refine ⟨C.sourceCell p x, ?_⟩ + apply Subtype.ext + change (truncationUnit n C).map (C.source p x) = z.val + rw [(truncationUnit n C).map_source, hx, z.property] + +def truncationCellLift (C : OmegaCategory.{u}) (n p : ℕ) + (z : (truncation n C).val.Cells p) : C.Cells p := + (truncationUnit_onCells_surjective C n p z).choose + +@[simp] lemma truncationCellLift_unit (C : OmegaCategory.{u}) (n p : ℕ) + (z : (truncation n C).val.Cells p) : + (truncationUnit n C).onCells p (truncationCellLift C n p z) = z := + (truncationUnit_onCells_surjective C n p z).choose_spec + +@[simp] lemma truncationCellLift_map (C : OmegaCategory.{u}) (n p : ℕ) + (z : (truncation n C).val.Cells p) : + (truncationUnit n C).map (truncationCellLift C n p z).val = z.val := + congrArg Subtype.val (truncationCellLift_unit C n p z) + +lemma truncationUnit_onCells_injective (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) : + Function.Injective ((truncationUnit n C).onCells p) := by + intro x y h + exact Subtype.ext (truncationUnit_injective_below C n p hp x.property y.property + (congrArg Subtype.val h)) + +@[simp] lemma truncationCellLift_of_unit (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) + (x : C.Cells p) : truncationCellLift C n p ((truncationUnit n C).onCells p x) = x := + truncationUnit_onCells_injective C n p hp (truncationCellLift_unit C n p _) + +lemma truncationCellLift_source_fixed (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) + (x : (truncation n C).val.Cells p) (k : ℕ) (hk : k ≤ p) + (hx : (truncation n C).val.source k x.val = x.val) : + C.source k (truncationCellLift C n p x).val = (truncationCellLift C n p x).val := by + apply truncationUnit_injective_below C n p hp + (C.source_fixed_upwards hk (C.source_source_self k _)) (truncationCellLift C n p x).property + rw [(truncationUnit n C).map_source, truncationCellLift_map] + exact hx + +lemma truncationCellLift_composable (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) + (x y : (truncation n C).val.Cells p) (k : ℕ) (hk : k < p) + (h : (truncation n C).val.target k x.val = (truncation n C).val.source k y.val) : + C.target k (truncationCellLift C n p x).val = C.source k (truncationCellLift C n p y).val := by + apply truncationUnit_injective_below C n k (lt_trans hk hp) + (C.source_target_self k _) (C.source_source_self k _) + rw [(truncationUnit n C).map_source, (truncationUnit n C).map_target, + truncationCellLift_map, truncationCellLift_map] + exact h + +lemma truncationCellLift_comp (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) + (x y : (truncation n C).val.Cells p) (k : ℕ) (hk : k < p) + (h : (truncation n C).val.target k x.val = (truncation n C).val.source k y.val) : + truncationCellLift C n p ((truncation n C).val.gradedComp hk x y h) = + C.gradedComp hk (truncationCellLift C n p x) (truncationCellLift C n p y) + (truncationCellLift_composable C n p hp x y k hk h) := by + apply truncationUnit_onCells_injective C n p hp + rw [truncationCellLift_unit, (truncationUnit n C).onCells_comp] + simp only [truncationCellLift_unit] + rfl + +def truncationLambdaRawRetraction (C : OmegaCategory.{u}) (n p : ℕ) : + (truncation n C).val.LambdaRaw p →ₗ[ℤ] C.LambdaChain p := + Finsupp.linearCombination ℤ (fun x => C.lambdaGen (truncationCellLift C n p x)) + +@[simp] lemma truncationLambdaRawRetraction_single (C : OmegaCategory.{u}) (n p : ℕ) + (x : (truncation n C).val.Cells p) : + truncationLambdaRawRetraction C n p (Finsupp.single x 1) = + C.lambdaGen (truncationCellLift C n p x) := by + exact (Finsupp.linearCombination_single _ _ _).trans (one_smul ℤ _) + +lemma truncationLambdaRawRetraction_relations (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) : + (truncation n C).val.lambdaRelations p ≤ LinearMap.ker (truncationLambdaRawRetraction C n p) := by + apply Submodule.span_le.mpr + intro z hz + change truncationLambdaRawRetraction C n p z = 0 + rcases hz with ⟨x,k,hk,hx,rfl⟩ | ⟨k,hk,x,y,h,rfl⟩ + · rw [truncationLambdaRawRetraction_single] + exact C.lambdaGen_degenerate hk _ (truncationCellLift_source_fixed C n p hp x k hk.le hx) + · simp only [map_sub,truncationLambdaRawRetraction_single] + rw [truncationCellLift_comp C n p hp x y k hk h, C.lambdaGen_comp hk] + abel + +def truncationLambdaRetraction (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) : + (truncation n C).val.LambdaChain p →ₗ[ℤ] C.LambdaChain p := + ((truncation n C).val.lambdaRelations p).liftQ (truncationLambdaRawRetraction C n p) + (truncationLambdaRawRetraction_relations C n p hp) + +@[simp] lemma truncationLambdaRetraction_gen (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) + (x : (truncation n C).val.Cells p) : + truncationLambdaRetraction C n p hp ((truncation n C).val.lambdaGen x) = + C.lambdaGen (truncationCellLift C n p x) := + truncationLambdaRawRetraction_single C n p x + +lemma truncationLambdaRetraction_leftInverse (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) : + (truncationLambdaRetraction C n p hp).comp ((truncationUnit n C).lambdaMap p) = LinearMap.id := by + apply C.lambda_linear_ext + intro x + change truncationLambdaRetraction C n p hp + ((truncationUnit n C).lambdaMap p (C.lambdaGen x)) = C.lambdaGen x + rw [Functor.lambdaMap_gen] + exact (truncationLambdaRetraction_gen C n p hp ((truncationUnit n C).onCells p x)).trans + (congrArg C.lambdaGen (truncationCellLift_of_unit C n p hp x)) + +lemma truncationUnit_lambdaMap_injective (C : OmegaCategory.{u}) (n p : ℕ) (hp : p < n) : + Function.Injective ((truncationUnit n C).lambdaMap p) := by + intro x y h + have hx := LinearMap.congr_fun (truncationLambdaRetraction_leftInverse C n p hp) x + have hy := LinearMap.congr_fun (truncationLambdaRetraction_leftInverse C n p hp) y + exact hx.symm.trans ((congrArg (truncationLambdaRetraction C n p hp) h).trans hy) + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open DirectedComplex DirectedComplex.Table NormalizedChains OmegaCategory + +variable {C : OmegaCategory.{u}} {n N : ℕ} + +def liftedBasis (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (w : Word (Fin (N+1))) : C.LambdaChain p := by + classical + by_cases h : w.val.length = p+1 + · rcases w with ⟨w,hw⟩ + cases w with + | nil => simp at h + | cons a l => + let A := simplexAtom a l (hw.imp le_of_lt) + have he : (a::l).length-1 = p := by simp only [List.length_cons] at h ⊢; omega + exact C.lambdaGen (truncationCellLift C n p (F.onCells p ⟨A.table, he ▸ A.dimension⟩)) + · exact 0 + +lemma liftedBasis_cons (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (a : Fin (N+1)) (l : List (Fin (N+1))) (ha : (a::l).Pairwise (· < ·)) + (h : l.length = p) + (hd : truncate p false (simplexAtom a l (ha.imp le_of_lt)).table = + (simplexAtom a l (ha.imp le_of_lt)).table) : + liftedBasis F p ⟨a::l,ha⟩ = C.lambdaGen + (truncationCellLift C n p (F.onCells p ⟨_,hd⟩)) := by + simp [liftedBasis,h] + +lemma liftedBasis_unit (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (w : Word (Fin (N+1))) : + (truncationUnit n C).lambdaMap p (liftedBasis F p w) = F.lambdaMap p (basisLambda p w) := by + classical + unfold liftedBasis basisLambda + split_ifs with h + · rcases w with ⟨w,hw⟩ + cases w with + | nil => simp at h + | cons a l => + erw [OmegaCategory.Functor.lambdaMap_gen, OmegaCategory.Functor.lambdaMap_gen] + congr 1 + exact truncationCellLift_unit C n p _ + · exact (map_zero ((truncationUnit n C).lambdaMap p)).trans (map_zero (F.lambdaMap p)).symm + +def liftedChainMap (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) : (complex (Fin (N+1))).Chain p →ₗ[ℤ] C.LambdaChain p := + (Finsupp.linearCombination ℤ (liftedBasis F p)).comp (grade (p+1)).subtype + +lemma liftedChainMap_bracket (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (w : Word (Fin (N+1))) (h : w.val.length = p+1) : + liftedChainMap F p ⟨bracket w.val, h ▸ bracket_mem_grade w.val⟩ = liftedBasis F p w := by + change Finsupp.linearCombination ℤ (liftedBasis F p) (bracket w.val) = _ + rw [bracket_of_pairwise w.property,Finsupp.linearCombination_single,one_smul] + +lemma liftedChainMap_unit (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (x : (complex (Fin (N+1))).Chain p) : + (truncationUnit n C).lambdaMap p (liftedChainMap F p x) = + F.lambdaMap p (atomCounitInverse p x) := by + change ((truncationUnit n C).lambdaMap p).comp + (Finsupp.linearCombination ℤ (liftedBasis F p)) x.val = + (F.lambdaMap p).comp (Finsupp.linearCombination ℤ (basisLambda p)) x.val + congr 1 + apply Finsupp.lhom_ext + intro w z + change (truncationUnit n C).lambdaMap p + (Finsupp.linearCombination ℤ (liftedBasis F p) (Finsupp.single w z)) = + F.lambdaMap p (Finsupp.linearCombination ℤ (basisLambda p) (Finsupp.single w z)) + erw [Finsupp.linearCombination_single,Finsupp.linearCombination_single,map_smul,map_smul, + liftedBasis_unit] + rfl + +lemma liftedChainMap_d (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (hN : N ≤ n) (p : ℕ) (x : (complex (Fin (N+1))).Chain (p+1)) : + liftedChainMap F p ((complex (Fin (N+1))).d p x) = + C.lambdaD p (liftedChainMap F (p+1) x) := by + by_cases hp : p < n + · apply truncationUnit_lambdaMap_injective C n p hp + rw [liftedChainMap_unit] + have hd := (simplexCounitInverse N).map_d p x + change atomCounitInverse p ((complex (Fin (N+1))).d p x) = + (Oriental N).lambdaD p (atomCounitInverse (p+1) x) at hd + rw [hd] + exact (LinearMap.congr_fun (F.lambdaMap_d p) _).trans + ((congrArg ((truncation n C).val.lambdaD p) (liftedChainMap_unit F (p+1) x).symm).trans + (LinearMap.congr_fun ((truncationUnit n C).lambdaMap_d p) _).symm) + · have hx : x = 0 := by + apply Subtype.ext + exact grade_eq_zero_of_card_lt x.property (by simp only [Fintype.card_fin]; omega) + rw [hx,map_zero,map_zero,map_zero,map_zero] + +lemma liftedChainMap_aug (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (x : (complex (Fin (N+1))).Chain 0) : + C.lambdaAug (liftedChainMap F 0 x) = (complex (Fin (N+1))).augmentation x := by + calc + _ = (truncation n C).val.lambdaAug + ((truncationUnit n C).lambdaMap 0 (liftedChainMap F 0 x)) := + (LinearMap.congr_fun ((truncationUnit n C).lambdaMap_aug) _).symm + _ = (truncation n C).val.lambdaAug (F.lambdaMap 0 (atomCounitInverse 0 x)) := + congrArg _ (liftedChainMap_unit F 0 x) + _ = (Oriental N).lambdaAug (atomCounitInverse 0 x) := + LinearMap.congr_fun F.lambdaMap_aug _ + _ = _ := (simplexCounitInverse N).map_augmentation x + +lemma liftedBasis_positive (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (w : Word (Fin (N+1))) : liftedBasis F p w ∈ C.lambdaPositive p := by + classical + unfold liftedBasis + split_ifs with h + · rcases w with ⟨w,hw⟩ + cases w with + | nil => simp at h + | cons a l => exact C.lambdaGen_positive _ + · exact AddSubmonoid.zero_mem _ + +lemma liftedChainMap_positive (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) + (p : ℕ) (x : (complex (Fin (N+1))).Chain p) (hx : x ∈ (complex (Fin (N+1))).positive p) : + liftedChainMap F p x ∈ C.lambdaPositive p := by + classical + change Finsupp.linearCombination ℤ (liftedBasis F p) x.val ∈ _ + rw [Finsupp.linearCombination_apply,Finsupp.sum] + apply AddSubmonoid.sum_mem + intro w _ + have hw : 0 ≤ x.val w := hx w + have he : x.val w = (x.val w).toNat := (Int.toNat_of_nonneg hw).symm + rw [he,Nat.cast_smul_eq_nsmul] + exact AddSubmonoid.nsmul_mem _ (liftedBasis_positive F p w) _ + +def liftedChainHom (F : OmegaCategory.Functor (Oriental N) (truncation n C).val) (hN : N ≤ n) : + Hom (complex (Fin (N+1))) C.linearization where + map p := (liftedChainMap F p).toAddMonoidHom + map_d := liftedChainMap_d F hN + map_augmentation := liftedChainMap_aug F + map_positive := liftedChainMap_positive F + +lemma atomCounitInverse_row (p : ℕ) (y : Table (complex (Fin (N+1)))) (b : Bool) : + atomCounitInverse p (y.row p b) = (Oriental N).lambdaGen + (if b then (Oriental N).targetCell p y else (Oriental N).sourceCell p y) := by + have h := atomCounitInverse_top (p := p) (truncate p b y) (by simp only [truncate_truncate,lt_self_iff_false,ite_false]) + rw [truncate_top_row] at h + cases b <;> exact h + +variable {K : DirectedComplex.{u}} + +def boundedOrientalLift (F : OmegaCategory.Functor (Oriental N) (truncation n K.nu).val) + (hN : N ≤ n) : OmegaCategory.Functor (Oriental N) K.nu := + (Hom.comp (liftedChainHom F hN) K.lambdaCounit).nu + +lemma boundedOrientalLift_atom + (F : OmegaCategory.Functor (Oriental N) (truncation n K.nu).val) (hN : N ≤ n) + (a : Fin (N+1)) (l : List (Fin (N+1))) (ha : (a::l).Pairwise (· < ·)) : + (boundedOrientalLift F hN).map (simplexAtom a l (ha.imp le_of_lt)).table = + (truncationCellLift K.nu n l.length + (F.onCells l.length ⟨(simplexAtom a l (ha.imp le_of_lt)).table, + by + change @Eq (Table (complex (Fin (N+1)))) (truncate l.length false _) _ + simpa only [List.length_cons,Nat.add_sub_cancel] using + (simplexAtom a l (ha.imp le_of_lt)).dimension⟩)).val := by + let A := simplexAtom a l (ha.imp le_of_lt) + have hd : truncate l.length false A.table = A.table := by + simpa only [List.length_cons,Nat.add_sub_cancel] using A.dimension + let L := truncationCellLift K.nu n l.length (F.onCells l.length ⟨A.table,hd⟩) + have hL : (truncationUnit n K.nu).map L.val = F.map A.table := + truncationCellLift_map K.nu n l.length _ + have hlen : l.length ≤ N := by + have h := ha.nodup.length_le_card + simp only [List.length_cons,Fintype.card_fin] at h + omega + apply Table.ext + funext p b + change K.lambdaCounitMap p (liftedChainMap F p (A.table.row p b)) = L.val.row p b + by_cases hp : p < l.length + · have hl : liftedChainMap F p (A.table.row p b) = K.nu.lambdaGen + (if b then K.nu.targetCell p L.val else K.nu.sourceCell p L.val) := by + apply truncationUnit_lambdaMap_injective K.nu n p (by omega) + rw [liftedChainMap_unit,atomCounitInverse_row] + cases b <;> simp only [Bool.false_eq_true,↓reduceIte] + · erw [OmegaCategory.Functor.lambdaMap_gen,OmegaCategory.Functor.lambdaMap_gen] + congr 1 + apply Subtype.ext + change F.map (truncate p false A.table) = + (truncationUnit n K.nu).map (truncate p false L.val) + exact (F.map_source p A.table).trans + ((congrArg ((truncation n K.nu).val.source p) hL.symm).trans + ((truncationUnit n K.nu).map_source p L.val).symm) + · erw [OmegaCategory.Functor.lambdaMap_gen,OmegaCategory.Functor.lambdaMap_gen] + congr 1 + apply Subtype.ext + change F.map (truncate p true A.table) = + (truncationUnit n K.nu).map (truncate p true L.val) + exact (F.map_target p A.table).trans + ((congrArg ((truncation n K.nu).val.target p) hL.symm).trans + ((truncationUnit n K.nu).map_target p L.val).symm) + rw [hl] + cases b <;> simp only [Bool.false_eq_true,↓reduceIte] + · rw [K.lambdaCounitMap_gen] + exact truncate_top_row p false L.val false + · rw [K.lambdaCounitMap_gen] + exact truncate_top_row p true L.val false + · by_cases he : p = l.length + · subst p + have ht : A.table.row l.length b = + (⟨bracket (a::l),bracket_mem_grade (a::l)⟩ : (complex (Fin (N+1))).Chain l.length) := by + apply Subtype.ext + have ht := A.top b + have he : (a::l).length-1 = l.length := by simp + rw [he] at ht + exact ht + rw [ht,liftedChainMap_bracket F l.length ⟨a::l,ha⟩ rfl, + liftedBasis_cons F l.length a l ha rfl hd] + rw [K.lambdaCounitMap_gen] + change L.val.row l.length false = L.val.row l.length b + have h := congrArg (fun t : Table K => t.row l.length b) L.property + change (truncate l.length false L.val).row l.length b = L.val.row l.length b at h + erw [truncate_top_row] at h + exact h + · have hlt : l.length < p := by omega + rw [row_above_fixed A.table hd hlt b,map_zero,map_zero, + row_above_fixed L.val L.property hlt b] + +lemma boundedOrientalLift_unit + (F : OmegaCategory.Functor (Oriental N) (truncation n K.nu).val) (hN : N ≤ n) : + OmegaCategory.Functor.comp (boundedOrientalLift F hN) (truncationUnit n K.nu) = F := by + apply oriental_functor_ext + intro a l ha + change (truncationUnit n K.nu).map + ((boundedOrientalLift F hN).map (simplexAtom a l (ha.imp le_of_lt)).table) = _ + rw [boundedOrientalLift_atom F hN a l ha] + exact truncationCellLift_map K.nu n l.length _ + +lemma truncation_oriental_surjective (K : DirectedComplex.{u}) (n N : ℕ) (hN : N ≤ n) : + Function.Surjective (fun G : OmegaCategory.Functor (Oriental N) K.nu => + OmegaCategory.Functor.comp G (truncationUnit n K.nu)) := by + intro F + exact ⟨boundedOrientalLift F hN,boundedOrientalLift_unit F hN⟩ + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex +open Table OmegaCategory + +structure PartialHom (K : DirectedComplex.{u}) (L : DirectedComplex.{v}) (n : ℕ) where + map : (p : ℕ) → K.Chain p →+ L.Chain p + map_d (p : ℕ) (hp : p < n) (x : K.Chain (p+1)) : + map p (K.d p x) = L.d p (map (p+1) x) + map_augmentation (x : K.Chain 0) : L.augmentation (map 0 x) = K.augmentation x + map_positive (p : ℕ) (x : K.Chain p) : + x ∈ K.positive p → map p x ∈ L.positive p + +namespace PartialHom +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{v}} {n : ℕ} + +def table (f : PartialHom K L n) (x : Table K) : Table L where + row p b := if p < n then f.map p (x.row p b) else + if p = n then f.map p (x.row p false) else 0 + positive p b := by + split_ifs with h h + · exact f.map_positive p _ (x.positive p b) + · exact f.map_positive p _ (x.positive p false) + · exact (L.positive p).zero_mem + boundary p b := by + by_cases hp : p < n + · by_cases hp' : p+1 < n + · simp only [hp,hp',ite_true] + rw [← f.map_d p hp,x.boundary,map_sub] + · have he : p+1 = n := by omega + simp only [hp,ite_true,ite_false,he,lt_self_iff_false] + rw [← f.map_d p hp,x.boundary,map_sub] + · have hp' : ¬p+1 < n := by omega + have he' : p+1 ≠ n := by omega + simp only [hp,hp',he',ite_false,map_zero] + split <;> simp + augmentation b := by + by_cases hn : 0 < n + · simp only [hn,ite_true]; rw [f.map_augmentation,x.augmentation] + · have he : n = 0 := by omega + simp only [he,lt_self_iff_false,ite_false,ite_true] + rw [f.map_augmentation,x.augmentation] + bounded := ⟨n,fun p hp b => by simp [show ¬p simp_all only [map_zero] + +lemma table_target_lt (f : PartialHom K L n) (k : ℕ) (hk : k simp_all only [map_zero, not_true_eq_false] + +lemma table_composable (f : PartialHom K L n) {k : ℕ} (hk : k split_ifs <;> simp_all only [map_add, add_zero, not_true_eq_false] + +lemma table_source_n (f : PartialHom K L n) (x : Table K) : + f.table (truncate n false x) = f.table x := by + rw [f.table_source,f.table_bounded] + +end PartialHom +end Thomason.DirectedComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/BoundedCylinders.lean b/lean/OAI/CategoryTheory/Thomason/BoundedCylinders.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3d8f5934c49ff7911f444df8d1646607ec49627 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/BoundedCylinders.lean @@ -0,0 +1,795 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.EdgeComparison + +namespace OAI + +/-! Bounded Cylinders. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.CylinderTables +open Table +variable {M : DirectedComplex.{u}} + +lemma truncate_zero_ext (x y : Table M) (a b : Bool) + (h : x.row 0 a = y.row 0 b) : truncate 0 a x = truncate 0 b y := by + ext p e + cases p with + | zero => exact h + | succ p => rfl + +lemma truncate_one_ext (x y : Table M) (a b : Bool) + (h₀ : ∀ e, x.row 0 e = y.row 0 e) (h₁ : x.row 1 a = y.row 1 b) : + truncate 1 a x = truncate 1 b y := by + ext p e + cases p with + | zero => exact h₀ e + | succ p => cases p with + | zero => exact h₁ + | succ p => rfl + +def tableSandwich (l c r : Table M) : Table M.cylinder := + M.cylinder.nu.join 0 + (M.cylinder.nu.join 0 ((M.cylinderEndpoint false).table l) (verticalTable c)) + ((M.cylinderEndpoint true).table r) + +lemma tableSandwich_match_left (l c : Table M) (hl : l.row 0 true = c.row 0 false) : + truncate 0 true ((M.cylinderEndpoint false).table l) = truncate 0 false (verticalTable c) := by + apply truncate_zero_ext + change (l.row 0 true, 0) = (c.row 0 false, 0) + rw [hl] + +lemma tableSandwich_match_right (l c r : Table M) + (hl : l.row 0 true = c.row 0 false) (hr : r.row 0 false = c.row 0 true) : + truncate 0 true (M.cylinder.nu.join 0 ((M.cylinderEndpoint false).table l) (verticalTable c)) = + truncate 0 false ((M.cylinderEndpoint true).table r) := by + apply (M.cylinder.nu.join_target_le 0 0 _ _ le_rfl (tableSandwich_match_left l c hl)).trans + apply truncate_zero_ext + change (0, c.row 0 true) = (0, r.row 0 false) + rw [hr] + +lemma tableSandwich_zero (l c r : Table M) + (hl : l.row 0 true = c.row 0 false) (hr : r.row 0 false = c.row 0 true) (b : Bool) : + (tableSandwich l c r).row 0 b = if b then (0,r.row 0 true) else (l.row 0 false,0) := by + unfold tableSandwich + rw [GrayRecursive.IntervalHom.table_join_zero_row_zero _ _ (tableSandwich_match_right l c r hl hr), + GrayRecursive.IntervalHom.table_join_zero_row_zero _ _ (tableSandwich_match_left l c hl)] + cases b <;> rfl + +lemma tableSandwich_succ (l c r : Table M) + (hl : l.row 0 true = c.row 0 false) (hr : r.row 0 false = c.row 0 true) + (p : ℕ) (b : Bool) : + (tableSandwich l c r).row (p+1) b = + M.cylinderEndpointMap false (p+1) (l.row (p+1) b) + verticalRow c (p+1) b + + M.cylinderEndpointMap true (p+1) (r.row (p+1) b) := by + unfold tableSandwich + rw [GrayRecursive.IntervalHom.table_join_zero_row_succ _ _ (tableSandwich_match_right l c r hl hr), + GrayRecursive.IntervalHom.table_join_zero_row_succ _ _ (tableSandwich_match_left l c hl)] + rfl + +lemma tableSandwich_bounded (l c r : Table M) + (hl : l.row 0 true = c.row 0 false) (hr : r.row 0 false = c.row 0 true) + (hdl : truncate 2 false l = l) (hdc : truncate 1 false c = c) (hdr : truncate 2 false r = r) : + truncate 2 false (tableSandwich l c r) = tableSandwich l c r := by + have heL : M.cylinder.nu.source 2 ((M.cylinderEndpoint false).table l) = + (M.cylinderEndpoint false).table l := by + change truncate 2 false _ = _ + rw [← Hom.table_truncate, hdl] + have heR : M.cylinder.nu.source 2 ((M.cylinderEndpoint true).table r) = + (M.cylinderEndpoint true).table r := by + change truncate 2 false _ = _ + rw [← Hom.table_truncate, hdr] + exact GrayRecursive.IntervalHom.composite_bounded M.cylinder.nu (by omega : 0 < 2) _ _ + (GrayRecursive.IntervalHom.composite_bounded M.cylinder.nu (by omega : 0 < 2) _ _ + heL (GrayRecursive.vertical_fixed c hdc) (tableSandwich_match_left l c hl)) + heR (tableSandwich_match_right l c r hl hr) + +lemma crossingProfile_face_zero (t : Table M.cylinder) (hs : label t false = 0) + (ht : label t true = 1) (b : Bool) : + (crossingProfile t hs ht).row 0 b = cross t 0 b := rfl + +lemma profile_left_zero (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (b : Bool) : + (leftProfile t hs ht).row 0 b = if b then cross t 0 true else side t false 0 false := by + obtain ⟨_,htgt⟩ := crossing_starts_ends hM t hs ht + cases b <;> simp only [leftProfile, leftProfileRow, Even.zero, Bool.false_eq_true, + ite_false, ite_true, add_zero, htgt, zero_add] + +lemma profile_right_zero (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (b : Bool) : + (rightProfile t hs ht).row 0 b = if b then side t true 0 true else cross t 0 false := by + obtain ⟨hsrc,_⟩ := crossing_starts_ends hM t hs ht + cases b <;> simp only [rightProfile, rightProfileRow, Even.zero, Bool.false_eq_true, + ite_false, ite_true, add_zero, hsrc, zero_add] + +lemma face_one_label (t : Table M.cylinder) (a b : Bool) : + label (truncate 1 a t) b = label t b := rfl + +def profileEdge (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) + (a b : Bool) : Table M := + if a then rightProfile (truncate 1 b t) hs ht else leftProfile (truncate 1 b t) hs ht + +lemma profileEdge_bounded (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) + (a b : Bool) : truncate 1 false (profileEdge t hs ht a b) = profileEdge t hs ht a b := by + have h : truncate 1 false (truncate 1 b t) = truncate 1 b t := by simp only [truncate_truncate, lt_self_iff_false, ite_false] + cases a + · exact leftProfile_bounded (truncate 1 b t) hs ht h + · exact rightProfile_bounded (truncate 1 b t) hs ht h + +lemma profileEdge_zero (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (a b e : Bool) : + (profileEdge t hs ht a b).row 0 e = + if a then (if e then side t true 0 true else cross t 0 b) + else (if e then cross t 0 b else side t false 0 false) := by + cases a + · change (leftProfile (truncate 1 b t) hs ht).row 0 e = _ + erw [profile_left_zero hM] + cases e <;> rfl + · change (rightProfile (truncate 1 b t) hs ht).row 0 e = _ + erw [profile_right_zero hM] + cases e <;> rfl + +lemma profileEdge_one (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) + (a b e : Bool) : (profileEdge t hs ht a b).row 1 e = side t a 1 b := by + cases a <;> cases e <;> + change _ + (0 : M.Chain 1) = _ <;> exact add_zero _ + +section TwoCell +variable (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + +def twoRight : Table M.cylinder := tableSandwich (profileEdge t hs ht false false) + (truncate 0 false (crossingProfile t hs ht)) (rightProfile t hs ht) + +def twoMiddle : Table M.cylinder := tableSandwich (profileEdge t hs ht false false) + (crossingProfile t hs ht) (profileEdge t hs ht true true) + +def twoLeft : Table M.cylinder := tableSandwich (leftProfile t hs ht) + (truncate 0 true (crossingProfile t hs ht)) (profileEdge t hs ht true true) + +include hM + +lemma twoRight_matches : + (profileEdge t hs ht false false).row 0 true = (truncate 0 false (crossingProfile t hs ht)).row 0 false ∧ + (rightProfile t hs ht).row 0 false = (truncate 0 false (crossingProfile t hs ht)).row 0 true := by + simp only [profileEdge_zero hM, profile_right_zero hM, Bool.false_eq_true, ite_false, ite_true, + truncate_top_row, crossingProfile_face_zero, and_self] + +lemma twoMiddle_matches : + (profileEdge t hs ht false false).row 0 true = (crossingProfile t hs ht).row 0 false ∧ + (profileEdge t hs ht true true).row 0 false = (crossingProfile t hs ht).row 0 true := by + simp only [profileEdge_zero hM, Bool.false_eq_true, ite_false, ite_true, + crossingProfile_face_zero, and_self] + +lemma twoLeft_matches : + (leftProfile t hs ht).row 0 true = (truncate 0 true (crossingProfile t hs ht)).row 0 false ∧ + (profileEdge t hs ht true true).row 0 false = (truncate 0 true (crossingProfile t hs ht)).row 0 true := by + simp only [profile_left_zero hM, profileEdge_zero hM, Bool.false_eq_true, ite_false, ite_true, + truncate_top_row, crossingProfile_face_zero, and_self] + +lemma twoRight_zero (b : Bool) : (twoRight t hs ht).row 0 b = t.row 0 b := by + obtain ⟨hsrc, htgt⟩ := crossing_starts_ends hM t hs ht + rw [twoRight, tableSandwich_zero _ _ _ (twoRight_matches hM t hs ht).1 (twoRight_matches hM t hs ht).2, + profile_right_zero hM, profileEdge_zero hM] + cases b + · exact Prod.ext rfl hsrc.symm + · exact Prod.ext htgt.symm rfl + +lemma twoMiddle_zero (b : Bool) : (twoMiddle t hs ht).row 0 b = t.row 0 b := by + obtain ⟨hsrc, htgt⟩ := crossing_starts_ends hM t hs ht + rw [twoMiddle, tableSandwich_zero _ _ _ (twoMiddle_matches hM t hs ht).1 (twoMiddle_matches hM t hs ht).2, + profileEdge_zero hM, profileEdge_zero hM] + cases b + · exact Prod.ext rfl hsrc.symm + · exact Prod.ext htgt.symm rfl + +lemma twoLeft_zero (b : Bool) : (twoLeft t hs ht).row 0 b = t.row 0 b := by + obtain ⟨hsrc, htgt⟩ := crossing_starts_ends hM t hs ht + rw [twoLeft, tableSandwich_zero _ _ _ (twoLeft_matches hM t hs ht).1 (twoLeft_matches hM t hs ht).2, + profileEdge_zero hM, profile_left_zero hM] + cases b + · exact Prod.ext rfl hsrc.symm + · exact Prod.ext htgt.symm rfl + +lemma twoRight_one (b : Bool) : (twoRight t hs ht).row 1 b = + (side t false 1 false, + side t true 1 b + (if b then cross t 1 true else 0), cross t 0 false) := by + rw [twoRight, tableSandwich_succ _ _ _ (twoRight_matches hM t hs ht).1 (twoRight_matches hM t hs ht).2, + profileEdge_one] + cases b <;> + simp [verticalRow, truncate_row, rightProfile, rightProfileRow, crossingProfile, + cylinderEndpointMap] + +lemma twoMiddle_one (b : Bool) : (twoMiddle t hs ht).row 1 b = + (side t false 1 false + (if b then cross t 1 true else 0), + (if b then 0 else cross t 1 false) + side t true 1 true, cross t 0 b) := by + rw [twoMiddle, tableSandwich_succ _ _ _ (twoMiddle_matches hM t hs ht).1 (twoMiddle_matches hM t hs ht).2, + profileEdge_one, profileEdge_one] + cases b <;> simp [verticalRow, crossingProfile, cylinderEndpointMap] + +lemma twoLeft_one (b : Bool) : (twoLeft t hs ht).row 1 b = + (side t false 1 b + (if b then 0 else cross t 1 false), side t true 1 true, cross t 0 true) := by + rw [twoLeft, tableSandwich_succ _ _ _ (twoLeft_matches hM t hs ht).1 (twoLeft_matches hM t hs ht).2, + profileEdge_one] + cases b <;> + simp [verticalRow, truncate_row, leftProfile, leftProfileRow, crossingProfile, + cylinderEndpointMap] + +variable (hb : truncate 2 false t = t) +include hb + +omit hM in +lemma profileCross_two_zero (b : Bool) : cross t 2 b = 0 := + cross_of_row_zero t 2 b (row_above_fixed t hb (by omega) b) + +lemma twoRight_two (b : Bool) : (twoRight t hs ht).row 2 b = (0,side t true 2 b,0) := by + rw [twoRight, tableSandwich_succ _ _ _ (twoRight_matches hM t hs ht).1 (twoRight_matches hM t hs ht).2] + have hl := row_above_fixed _ (profileEdge_bounded t hs ht false false) (by omega : 1 < 2) b + have hc := profileCross_two_zero t hb b + simp only [hl, map_zero] + change (0 : M.cylinder.Chain 2) + verticalRow _ 2 b + + M.cylinderEndpointMap true 2 (rightProfileRow t 2 b) = _ + cases b <;> + simp [verticalRow, truncate_row, rightProfileRow, hc, cylinderEndpointMap] + +lemma twoMiddle_two (b : Bool) : (twoMiddle t hs ht).row 2 b = (0,0,cross t 1 b) := by + rw [twoMiddle, tableSandwich_succ _ _ _ (twoMiddle_matches hM t hs ht).1 (twoMiddle_matches hM t hs ht).2] + have hl := row_above_fixed _ (profileEdge_bounded t hs ht false false) (by omega : 1 < 2) b + have hr := row_above_fixed _ (profileEdge_bounded t hs ht true true) (by omega : 1 < 2) b + simp only [hl, hr, map_zero, zero_add, add_zero] + change verticalRow (crossingProfile t hs ht) 2 b = _ + have hc := profileCross_two_zero t hb b + cases b <;> simp [verticalRow, crossingProfile, hc] + +lemma twoLeft_two (b : Bool) : (twoLeft t hs ht).row 2 b = (side t false 2 b,0,0) := by + rw [twoLeft, tableSandwich_succ _ _ _ (twoLeft_matches hM t hs ht).1 (twoLeft_matches hM t hs ht).2] + have hr := row_above_fixed _ (profileEdge_bounded t hs ht true true) (by omega : 1 < 2) b + have hc := profileCross_two_zero t hb b + simp only [hr, map_zero, add_zero] + change M.cylinderEndpointMap false 2 (leftProfileRow t 2 b) + verticalRow _ 2 b = _ + cases b <;> simp [verticalRow, truncate_row, leftProfileRow, hc, cylinderEndpointMap] + +omit hM hb in +lemma profileEdge_bounded_two (_hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (_hb : truncate 2 false t = t) (a b : Bool) : + truncate 2 false (profileEdge t hs ht a b) = profileEdge t hs ht a b := + M.nu.source_fixed_upwards (by omega : 1 ≤ 2) (profileEdge_bounded t hs ht a b) + +lemma twoRight_bounded : truncate 2 false (twoRight t hs ht) = twoRight t hs ht := + tableSandwich_bounded _ _ _ (twoRight_matches hM t hs ht).1 (twoRight_matches hM t hs ht).2 + (profileEdge_bounded_two hM t hs ht hb false false) + (by simp only [truncate_truncate, Nat.not_lt_zero, ite_false]) + (rightProfile_bounded t hs ht hb) + +lemma twoMiddle_bounded : truncate 2 false (twoMiddle t hs ht) = twoMiddle t hs ht := + tableSandwich_bounded _ _ _ (twoMiddle_matches hM t hs ht).1 (twoMiddle_matches hM t hs ht).2 + (profileEdge_bounded_two hM t hs ht hb false false) (crossingProfile_bounded t hs ht hb) + (profileEdge_bounded_two hM t hs ht hb true true) + +lemma twoLeft_bounded : truncate 2 false (twoLeft t hs ht) = twoLeft t hs ht := + tableSandwich_bounded _ _ _ (twoLeft_matches hM t hs ht).1 (twoLeft_matches hM t hs ht).2 + (leftProfile_bounded t hs ht hb) + (by simp only [truncate_truncate, Nat.not_lt_zero, ite_false]) + (profileEdge_bounded_two hM t hs ht hb true true) + +omit hM hb in +lemma twoRight_source (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (_hb : truncate 2 false t = t) : + truncate 1 false (twoRight t hs ht) = truncate 1 false t := by + apply truncate_one_ext + · exact twoRight_zero hM t hs ht + · rw [twoRight_one hM t hs ht] + simp only [Bool.false_eq_true, ite_false, add_zero] + rfl + +lemma twoRightMiddle_match : truncate 1 true (twoRight t hs ht) = truncate 1 false (twoMiddle t hs ht) := by + have he : cross t 1 false = cross t 1 true := + congrArg (fun z => z.2.2) (row_top_fixed t hb) + apply truncate_one_ext + · intro e + rw [twoRight_zero hM t hs ht, twoMiddle_zero hM t hs ht] + · rw [twoRight_one hM t hs ht, twoMiddle_one hM t hs ht] + simp only [ite_true, Bool.false_eq_true, ite_false, add_zero, he, add_comm] + +lemma twoMiddleLeft_match : truncate 1 true (twoMiddle t hs ht) = truncate 1 false (twoLeft t hs ht) := by + have he : cross t 1 false = cross t 1 true := + congrArg (fun z => z.2.2) (row_top_fixed t hb) + apply truncate_one_ext + · intro e + rw [twoMiddle_zero hM t hs ht, twoLeft_zero hM t hs ht] + · rw [twoMiddle_one hM t hs ht, twoLeft_one hM t hs ht] + simp only [ite_true, Bool.false_eq_true, ite_false, zero_add, he] + +lemma twoRightMiddleLeft_match : truncate 1 true + (comp 1 (twoRight t hs ht) (twoMiddle t hs ht) (twoRightMiddle_match hM t hs ht hb)) = + truncate 1 false (twoLeft t hs ht) := by + rw [target_comp_le 1 1 le_rfl] + exact twoMiddleLeft_match hM t hs ht hb + +lemma crossing_two_factor : + comp 1 (comp 1 (twoRight t hs ht) (twoMiddle t hs ht) (twoRightMiddle_match hM t hs ht hb)) + (twoLeft t hs ht) (twoRightMiddleLeft_match hM t hs ht hb) = t := by + apply ext_source_top (comp_dimension (by omega : 1 < 2) + (comp_dimension (by omega : 1 < 2) (twoRight_bounded hM t hs ht hb) + (twoMiddle_bounded hM t hs ht hb) _) (twoLeft_bounded hM t hs ht hb) _) hb + · rw [source_comp_le 1 1 le_rfl, source_comp_le 1 1 le_rfl] + exact twoRight_source hM t hs ht hb + · simp only [comp_row, show ¬2 < 1 by omega, show (2 : ℕ) ≠ 1 by omega, ite_false] + rw [twoRight_two hM t hs ht hb, twoMiddle_two hM t hs ht hb, twoLeft_two hM t hs ht hb] + simp only [Prod.mk_add_mk, add_zero, zero_add] + rfl + +end TwoCell +end Thomason.DirectedComplex.CylinderTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table OmegaCategory +open CylinderTables +variable {M : DirectedComplex.{u}} + +def TwoLiftable (t : Table M.cylinder) : Prop := + ∃ x : (tensorFunctor.obj M.nu).Cell, + (tensorFunctor.obj M.nu).source 2 x = x ∧ (chainComparison M).map x = t + +lemma TwoLiftable.endpoint (a : Bool) (t : Table M) (ht : truncate 2 false t = t) : + TwoLiftable ((M.cylinderEndpoint a).table t) := by + refine ⟨((tensorEndpoint a).app M.nu).map t, ?_, chainComparison_endpoint_apply a t⟩ + erw [← ((tensorEndpoint a).app M.nu).map_source] + exact congrArg ((tensorEndpoint a).app M.nu).map ht + +lemma TwoLiftable.vertical (t : Table M) (ht : truncate 1 false t = t) : + TwoLiftable (verticalTable t) := by + refine ⟨(generatorCylinder (X := M.nu) 1 ⟨t,ht⟩).map (verticalTable (GlobeComplex.topTable 1)), ?_, ?_⟩ + · exact ((generatorCylinder (X := M.nu) 1 ⟨t,ht⟩).map_source 2 _).symm.trans + (congrArg (generatorCylinder (X := M.nu) 1 ⟨t,ht⟩).map + (vertical_fixed _ (GlobeComplex.topTable_bounded 1))) + · change (chainComparison M).map ((tensorPresentation M.nu).generator ⟨1,⟨t,ht⟩,_⟩) = _ + erw [chainComparison_generator,tableCylinder_vertical,ht] + +lemma TwoLiftable.comp {a b : Table M.cylinder} (ha : TwoLiftable a) (hb : TwoLiftable b) + (k : ℕ) (hk : k ≤ 1) (h : truncate k true a = truncate k false b) : + TwoLiftable (DirectedComplex.Table.comp k a b h) := by + obtain ⟨x,hx,rfl⟩ := ha + obtain ⟨y,hy,rfl⟩ := hb + have hm : (tensorFunctor.obj M.nu).target k x = (tensorFunctor.obj M.nu).source k y := by + apply chainComparison_edges_injective + · exact (tensorFunctor.obj M.nu).source_fixed_upwards hk + ((tensorFunctor.obj M.nu).source_target_self k x) + · exact (tensorFunctor.obj M.nu).source_fixed_upwards hk + ((tensorFunctor.obj M.nu).source_source_self k y) + · rw [(chainComparison M).map_target, (chainComparison M).map_source] + exact h + refine ⟨(tensorFunctor.obj M.nu).comp k x y hm, ?_, ?_⟩ + · rw [← (tensorFunctor.obj M.nu).join_eq k x y hm] + exact composite_bounded _ (by omega : k < 2) x y hx hy hm + · exact (chainComparison M).map_comp k x y hm h + +lemma TwoLiftable.join {a b : Table M.cylinder} (ha : TwoLiftable a) (hb : TwoLiftable b) + (k : ℕ) (hk : k ≤ 1) (h : truncate k true a = truncate k false b) : + TwoLiftable (M.cylinder.nu.join k a b) := by + rw [M.cylinder.nu.join_eq k a b h] + exact ha.comp hb k hk h + +lemma TwoLiftable.sandwich (l c r : Table M) + (hl : l.row 0 true = c.row 0 false) (hr : r.row 0 false = c.row 0 true) + (hdl : truncate 2 false l = l) (hdc : truncate 1 false c = c) (hdr : truncate 2 false r = r) : + TwoLiftable (tableSandwich l c r) := + ((TwoLiftable.endpoint false l hdl).join (TwoLiftable.vertical c hdc) 0 (by omega) + (tableSandwich_match_left l c hl)).join (TwoLiftable.endpoint true r hdr) 0 (by omega) + (tableSandwich_match_right l c r hl hr) + +theorem chainComparison_crossing_twocells_surjective (hM : PositiveAcyclic M) + (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) + (hb : truncate 2 false t = t) : TwoLiftable t := by + have hr : TwoLiftable (twoRight t hs ht) := + TwoLiftable.sandwich _ _ _ (twoRight_matches hM t hs ht).1 (twoRight_matches hM t hs ht).2 + (profileEdge_bounded_two hM t hs ht hb false false) + (by simp only [truncate_truncate, Nat.not_lt_zero, ite_false]) (rightProfile_bounded t hs ht hb) + have hc : TwoLiftable (twoMiddle t hs ht) := + TwoLiftable.sandwich _ _ _ (twoMiddle_matches hM t hs ht).1 (twoMiddle_matches hM t hs ht).2 + (profileEdge_bounded_two hM t hs ht hb false false) (crossingProfile_bounded t hs ht hb) + (profileEdge_bounded_two hM t hs ht hb true true) + have hl : TwoLiftable (twoLeft t hs ht) := + TwoLiftable.sandwich _ _ _ (twoLeft_matches hM t hs ht).1 (twoLeft_matches hM t hs ht).2 + (leftProfile_bounded t hs ht hb) (by simp only [truncate_truncate, Nat.not_lt_zero, ite_false]) + (profileEdge_bounded_two hM t hs ht hb true true) + rw [← crossing_two_factor hM t hs ht hb] + exact (hr.comp hc 1 le_rfl (twoRightMiddle_match hM t hs ht hb)).comp hl 1 le_rfl + (twoRightMiddleLeft_match hM t hs ht hb) + +theorem chainComparison_twocells_surjective (hM : PositiveAcyclic M) : + Function.Surjective ((chainComparison M).onCells 2) := by + intro t + have hl : TwoLiftable t.val := by + rcases endpoint_or_crossing hM t.val with ⟨a,ha⟩ | ⟨hs,ht⟩ + · rw [ha] + apply TwoLiftable.endpoint + change truncate 2 false (M.cylinderProjection.table t.val) = _ + erw [← Hom.table_truncate, show truncate 2 false t.val = t.val from t.property] + rfl + · exact chainComparison_crossing_twocells_surjective hM t.val hs ht t.property + obtain ⟨x,hx,he⟩ := hl + exact ⟨⟨x,hx⟩,Subtype.ext he⟩ + +theorem chainComparison_poset_twocells_surjective (P : Type u) [PartialOrder P] : + Function.Surjective ((chainComparison (NormalizedChains.complex P)).onCells 2) := + chainComparison_twocells_surjective (NormalizedChains.complexPositiveAcyclic P) +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {X Y : OmegaCategory.{u}} {M : DirectedComplex.{u}} + +def verticalCell (n : ℕ) (x : X.Cells n) : (tensorFunctor.obj X).Cell := + (generatorCylinder n x).map (verticalTable (topTable n)) + +lemma verticalCell_bounded (n : ℕ) (x : X.Cells n) : + (tensorFunctor.obj X).source (n+1) (verticalCell n x) = verticalCell n x := by + unfold verticalCell + erw [← (generatorCylinder n x).map_source] + change (generatorCylinder n x).map (truncate (n+1) false (verticalTable (topTable n))) = _ + rw [vertical_fixed _ (topTable_bounded n)] + +lemma verticalCell_natural (F : X ⟶ Y) (n : ℕ) (x : X.Cells n) : + (tensorFunctor.map F).map (verticalCell n x) = verticalCell n (F.onCells n x) := + tensorFunctor_map_generator F n x (verticalTable (topTable n)) + +lemma chainComparison_verticalCell (n : ℕ) (x : M.nu.Cells n) : + (chainComparison M).map (verticalCell n x) = verticalTable x.val := by + change (chainComparison M).map ((tensorPresentation M.nu).generator ⟨n,x,_⟩) = _ + erw [chainComparison_generator,tableCylinder_vertical] + exact congrArg verticalTable x.property + +lemma verticalCell_zero (x : X.Objects) : verticalCell 0 x = verticalObject x := rfl + +lemma vertical_one_face (a : Bool) : + truncate 1 a (verticalTable (topTable.{u} 1)) = + if a then (K.{u} 1).nu.join 0 (atEnd false (topTable 1)) (verticalTable (vertex 0 true)) + else (K.{u} 1).nu.join 0 (verticalTable (vertex 0 false)) (atEnd true (topTable 1)) := by + rw [← suspendTable_top 0, ← up_vertical, ← up_truncate] + rw [CylinderTables.vertical_object_face _ (topTable_bounded 0)] + cases a + · change up (atEnd false (topTable 0)) = _ + rw [up_endpoint_false] + exact ((K 1).nu.join_eq 0 _ _ (up_endpoint_left_matching (topTable 0))).symm + · change up (atEnd true (topTable 0)) = _ + rw [up_endpoint_true] + exact ((K 1).nu.join_eq 0 _ _ (up_endpoint_right_matching (topTable 0))).symm + +lemma tensorUnitCell_face (k : ℕ) (a : Bool) (x : X.Cell) : + tensorUnitCell (X.face k a x) = face k a (tensorUnitCell x) := by + cases a + · exact tensorUnitCell_source k x + · exact tensorUnitCell_target k x + +lemma generatorCylinder_vertical_face (n m : ℕ) (x : X.Cells n) (a : Bool) : + (generatorCylinder n x).map (verticalTable (truncate m a (topTable n))) = + verticalCell m ⟨X.face m a x.val, by + cases a + · exact X.source_source_self m x.val + · exact X.source_target_self m x.val⟩ := by + let v : X.Cells m := ⟨X.face m a x.val, by + cases a + · exact X.source_source_self m x.val + · exact X.source_target_self m x.val⟩ + have he := tensorUnitCell_face m a x.val + rw [tensorUnitCell_of_bounded n x, face_ofMap] at he + change tensorUnitCell v.val = _ at he + rw [tensorUnitCell_of_bounded m v] at he + have h := congrArg (fun t => (eval m t).map (verticalTable (topTable m))) he + rw [eval_ofMap_self, eval_ofMap_self] at h + change verticalCell m v = + (generatorCylinder n x).map ((faceMap n m a).cylinder.nu.map (verticalTable (topTable m))) at h + rw [verticalTable_natural,faceMap_top] at h + exact h.symm + +lemma verticalCell_dimension_independent (n m : ℕ) (hnm : n ≤ m) (x : X.Cells n) : + verticalCell m ⟨x.val, X.source_fixed_upwards hnm x.property⟩ = verticalCell n x := by + have h := generatorCylinder_vertical_face n m x false + have hd : truncate m false (topTable.{u} n) = topTable n := + (complex n).nu.source_fixed_upwards hnm (topTable_bounded n) + rw [hd] at h + have hx : X.face m false x.val = x.val := X.source_fixed_upwards hnm x.property + exact (congrArg (verticalCell m) (Subtype.ext hx.symm)).trans h.symm + +lemma generatorCylinder_vertical_vertex (n : ℕ) (x : X.Cells (n+1)) (a : Bool) : + (generatorCylinder (n+1) x).map (verticalTable (vertex n a)) = + verticalObject ⟨X.face 0 a x.val, by cases a; exact X.source_source_self 0 x.val; exact X.source_target_self 0 x.val⟩ := by + let v : X.Objects := ⟨X.face 0 a x.val, by cases a; exact X.source_source_self 0 x.val; exact X.source_target_self 0 x.val⟩ + have he := tensorUnitCell_face 0 a x.val + rw [tensorUnitCell_of_bounded (n+1) x, face_ofMap] at he + change tensorUnitCell v.val = _ at he + rw [tensorUnitCell_of_bounded 0 v] at he + have h := congrArg (fun t => (eval 0 t).map (verticalTable (topTable 0))) he + rw [eval_ofMap_self, eval_ofMap_self, restrictCylinder_zero_vertical] at h + exact h.symm + +lemma verticalCell_one_face (x : X.Cells 1) (a : Bool) : + (tensorFunctor.obj X).face 1 a (verticalCell 1 x) = + if a then (tensorFunctor.obj X).join 0 (((tensorEndpoint false).app X).map x.val) + (verticalObject ⟨X.target 0 x.val, X.source_target_self 0 x.val⟩) + else (tensorFunctor.obj X).join 0 + (verticalObject ⟨X.source 0 x.val, X.source_source_self 0 x.val⟩) + (((tensorEndpoint true).app X).map x.val) := by + unfold verticalCell + erw [← (generatorCylinder 1 x).map_face] + have hh : (K.{u} 1).nu.face 1 a (verticalTable (topTable 1)) = + truncate 1 a (verticalTable (topTable 1)) := by cases a <;> rfl + rw [hh,vertical_one_face] + cases a + · simp only [Bool.false_eq_true, ite_false] + erw [(generatorCylinder 1 x).map_join 0 _ _ (by + change truncate 0 true (verticalTable (vertex 0 false)) = truncate 0 false (atEnd true (topTable 1)) + rw [← suspendTable_top 0] + exact up_endpoint_left_matching (topTable 0)), + generatorCylinder_endpoint,lift_top,generatorCylinder_vertical_vertex] + rfl + · simp only [ite_true] + erw [(generatorCylinder 1 x).map_join 0 _ _ (by + change truncate 0 true (atEnd false (topTable 1)) = truncate 0 false (verticalTable (vertex 0 true)) + rw [← suspendTable_top 0] + exact up_endpoint_right_matching (topTable 0)), + generatorCylinder_endpoint,lift_top,generatorCylinder_vertical_vertex] + rfl + +lemma generatorCylinder_matching {n k : ℕ} (x y : X.Cells n) + (h : X.target k x.val = X.source k y.val) : + FaceMatching k (generatorCylinder n x) (generatorCylinder n y) := by + apply face_matching + rw [← tensorUnitCell_of_bounded n x, ← tensorUnitCell_of_bounded n y, + ← tensorUnitCell_face k true, ← tensorUnitCell_face k false] + exact congrArg tensorUnitCell h + +lemma generatorCylinder_comp {n k : ℕ} (hk : k < n) (x y : X.Cells n) + (h : X.target k x.val = X.source k y.val) : + generatorCylinder n (X.gradedComp hk x y h) = + pasteCylinder hk (generatorCylinder n x) (generatorCylinder n y) + (generatorCylinder_matching x y h) := by + apply ofMap_injective + rw [← tensorUnitCell_of_bounded n (X.gradedComp hk x y h)] + have h' : face k true (tensorUnitCell x.val) = face k false (tensorUnitCell y.val) := by + rw [← tensorUnitCell_face k true, ← tensorUnitCell_face k false] + exact congrArg tensorUnitCell h + change tensorUnitCell (X.comp k x.val y.val h) = _ + rw [tensorUnitCell_comp k x.val y.val h h'] + change comp k (tensorUnitCell x.val) (tensorUnitCell y.val) h' = _ + simp only [tensorUnitCell_of_bounded n x,tensorUnitCell_of_bounded n y] + exact comp_ofMap hk _ _ _ + +lemma verticalCell_one_comp (x y : X.Cells 1) (h : X.target 0 x.val = X.source 0 y.val) : + verticalCell 1 (X.gradedComp (by omega : 0 < 1) x y h) = + (tensorFunctor.obj X).join 1 + ((tensorFunctor.obj X).join 0 (verticalCell 1 x) (((tensorEndpoint true).app X).map y.val)) + ((tensorFunctor.obj X).join 0 (((tensorEndpoint false).app X).map x.val) (verticalCell 1 y)) := by + unfold verticalCell + rw [generatorCylinder_comp, ← suspendTable_top 0, ← up_vertical, pasteCylinder_zero_up, + concatInterval_zero_vertical] + rw [hom_join_val _ _ _ (zero_interval_seam _ _ + ((rectangleDiagramOfFunctor (generatorCylinder 1 x)).horizontalDiagonal_matching + (rectangleDiagramOfFunctor (generatorCylinder 1 y)) + (zeroFaceMatching_seam (generatorCylinder_matching x y h))))] + erw [RectangleDiagram.horizontalDiagonalOne_map,RectangleDiagram.horizontalDiagonalTwo_map, + project_zero_vertical,suspendTable_top] + change (tensorFunctor.obj X).join 1 + ((tensorFunctor.obj X).join 0 ((generatorCylinder 1 x).map (up (verticalTable (topTable 0)))) + ((generatorCylinder 1 y).map (atEnd true (topTable 1)))) + ((tensorFunctor.obj X).join 0 ((generatorCylinder 1 x).map (atEnd false (topTable 1))) + ((generatorCylinder 1 y).map (up (verticalTable (topTable 0))))) = _ + rw [up_vertical,suspendTable_top,generatorCylinder_endpoint,generatorCylinder_endpoint,lift_top,lift_top] +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {X Y : OmegaCategory.{u}} + +lemma tensor_cells_induction (P : (tensorFunctor.obj X).Cell → Prop) + (hend : ∀ a x, P (((tensorEndpoint a).app X).map x)) + (hvertical : ∀ n (x : X.Cells n), P (verticalCell n x)) + (hsource : ∀ k x, P x → P ((tensorFunctor.obj X).source k x)) + (htarget : ∀ k x, P x → P ((tensorFunctor.obj X).target k x)) + (hcomp : ∀ k x y (h : (tensorFunctor.obj X).target k x = + (tensorFunctor.obj X).source k y), P x → P y → + P ((tensorFunctor.obj X).comp k x y h)) : ∀ z, P z := by + apply (tensorPresentation X).cells_induction P + · rintro ⟨n,x,z⟩ + change P ((generatorCylinder n x).map z) + apply GrayRecursive.generated n (fun t => P ((generatorCylinder n x).map t)) + · intro a t + rw [generatorCylinder_endpoint] + exact hend a _ + · intro t + obtain ⟨p,a,_,he⟩ := table_classification t + rw [he,generatorCylinder_vertical_face] + exact hvertical p _ + · intro k s t h hs ht + erw [(generatorCylinder n x).map_comp k s t h ((generatorCylinder n x).map_composable h)] + exact hcomp k _ _ _ hs ht + · exact hsource + · exact htarget + · exact hcomp + +lemma tensor_functor_ext {F G : tensorFunctor.obj X ⟶ Y} + (hend : ∀ a x, F.map (((tensorEndpoint a).app X).map x) = + G.map (((tensorEndpoint a).app X).map x)) + (hvertical : ∀ n (x : X.Cells n), F.map (verticalCell n x) = G.map (verticalCell n x)) : + F = G := by + apply OmegaCategory.Functor.ext + funext z + apply tensor_cells_induction (fun t => F.map t = G.map t) hend hvertical + · intro k x h + rw [F.map_source,G.map_source,h] + · intro k x h + rw [F.map_target,G.map_target,h] + · intro k x y h hx hy + rw [F.map_comp k x y h (F.map_composable h), G.map_comp k x y h (G.map_composable h)] + congr 1 + +lemma verticalCell_eq_of_value {n m : ℕ} (x : X.Cells n) (y : X.Cells m) + (h : x.val = y.val) : verticalCell n x = verticalCell m y := by + let xn : X.Cells (max n m) := ⟨x.val,X.source_fixed_upwards (le_max_left _ _) x.property⟩ + let ym : X.Cells (max n m) := ⟨y.val,X.source_fixed_upwards (le_max_right _ _) y.property⟩ + calc + verticalCell n x = verticalCell (max n m) xn := + (verticalCell_dimension_independent n (max n m) (le_max_left _ _) x).symm + _ = verticalCell (max n m) ym := congrArg (verticalCell (max n m)) (Subtype.ext h) + _ = verticalCell m y := verticalCell_dimension_independent m (max n m) (le_max_right _ _) y + +lemma verticalCell_bounded_of_bounded (p n : ℕ) (x : X.Cells p) + (hx : X.source n x.val = x.val) : + (tensorFunctor.obj X).source (n+1) (verticalCell p x) = verticalCell p x := by + rw [verticalCell_eq_of_value x (⟨x.val,hx⟩ : X.Cells n) rfl] + exact verticalCell_bounded n _ + +lemma tensor_truncated {n : ℕ} (hn : X.IsTruncated n) : + (tensorFunctor.obj X).IsTruncated (n+1) := by + apply tensor_cells_induction (fun z => (tensorFunctor.obj X).source (n+1) z = z) + · intro a x + rw [← ((tensorEndpoint a).app X).map_source] + exact congrArg ((tensorEndpoint a).app X).map (X.source_fixed_upwards (by omega) (hn x)) + · intro p x + exact verticalCell_bounded_of_bounded p n x (hn x.val) + · intro k x hx + by_cases hk : k < n+1 + · exact (tensorFunctor.obj X).source_fixed_upwards (by omega) + ((tensorFunctor.obj X).source_source_self k x) + · rw [(tensorFunctor.obj X).source_fixed_upwards (by omega : n+1 ≤ k) hx] + exact hx + · intro k x hx + by_cases hk : k < n+1 + · exact (tensorFunctor.obj X).source_fixed_upwards (by omega) + ((tensorFunctor.obj X).source_target_self k x) + · rw [(tensorFunctor.obj X).target_eq_self_of_source_eq_self + ((tensorFunctor.obj X).source_fixed_upwards (by omega : n+1 ≤ k) hx)] + exact hx + · intro k x y h hx hy + by_cases hk : k < n+1 + · rw [(tensorFunctor.obj X).source_comp_gt (n+1) k hk x y h + ((tensorFunctor.obj X).source_composable hk h)] + congr 1 + · rw [(tensorFunctor.obj X).comp_of_left_source_fixed k x y h + ((tensorFunctor.obj X).source_fixed_upwards (by omega) hx)] + exact hy +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {X Y : OmegaCategory.{u}} + +lemma tensor_bounded_cells_induction (k : ℕ) (P : (tensorFunctor.obj X).Cell → Prop) + (hend : ∀ a x, X.source k x = x → P (((tensorEndpoint a).app X).map x)) + (hvertical : ∀ r, r < k → ∀ x : X.Cells r, P (verticalCell r x)) + (hlower : ∀ r, r < k → ∀ z, (tensorFunctor.obj X).source r z = z → P z) + (hcomp : ∀ r, r < k → ∀ x y + (_hx : (tensorFunctor.obj X).source k x = x) + (_hy : (tensorFunctor.obj X).source k y = y) + (h : (tensorFunctor.obj X).target r x = (tensorFunctor.obj X).source r y), + P x → P y → P ((tensorFunctor.obj X).comp r x y h)) : + ∀ z, (tensorFunctor.obj X).source k z = z → P z := by + let T := tensorFunctor.obj X + have hg (n : ℕ) (x : X.Cells n) (t : Table (K n)) + (ht : truncate k false t = t) : P ((generatorCylinder n x).map t) := by + have h := generated_bounded n k + (fun t => T.source k ((generatorCylinder n x).map t) = (generatorCylinder n x).map t ∧ + P ((generatorCylinder n x).map t)) ?_ ?_ ?_ t ht + · exact h.2 + · intro a y hy + rw [generatorCylinder_endpoint] + have hb : X.source k ((GlobeComplex.lift x.val x.property).map y) = (GlobeComplex.lift x.val x.property).map y := by + erw [← (GlobeComplex.lift x.val x.property).map_source] + exact congrArg (GlobeComplex.lift x.val x.property).map hy + exact ⟨(((tensorEndpoint a).app X).map_source k _).symm.trans + (congrArg ((tensorEndpoint a).app X).map hb), hend a _ hb⟩ + · intro r hr y hy + obtain ⟨p,a,_,hpr,rfl⟩ := bounded_table_classification y hy + rw [generatorCylinder_vertical_face] + exact ⟨T.source_fixed_upwards (by omega : p+1 ≤ k) (verticalCell_bounded p _), + hvertical p (by omega) _⟩ + · intro l s t h hs ht + erw [(generatorCylinder n x).map_comp l s t h ((generatorCylinder n x).map_composable h)] + by_cases hl : l < k + · refine ⟨?_, hcomp l hl _ _ hs.1 ht.1 _ hs.2 ht.2⟩ + erw [T.source_comp_gt k l hl _ _ _ (T.source_composable hl + ((generatorCylinder n x).map_composable h))] + exact T.comp_congr_cells l _ _ hs.1 ht.1 + · erw [T.comp_of_left_source_fixed l _ _ _ (T.source_fixed_upwards (by omega) hs.1)] + exact ht + have hh : ∀ z : T.Cell, P (T.source k z) ∧ P (T.target k z) := by + apply (tensorPresentation X).cells_induction + (fun z => P (T.source k z) ∧ P (T.target k z)) + · rintro ⟨n,x,z⟩ + change Table (K n) at z + change P (T.source k ((generatorCylinder n x).map z)) ∧ + P (T.target k ((generatorCylinder n x).map z)) + erw [← (generatorCylinder n x).map_source, ← (generatorCylinder n x).map_target] + exact ⟨hg n x (truncate k false z) (by simp only [truncate_truncate,lt_self_iff_false,ite_false]), + hg n x (truncate k true z) (by simp only [truncate_truncate,lt_self_iff_false,ite_false])⟩ + · intro i z hz + change P (T.source k (T.source i z)) ∧ P (T.target k (T.source i z)) + by_cases hi : i < k + · erw [T.source_source, min_eq_right hi.le, T.target_source, ite_eq_right (by omega : ¬ k < i)] + exact ⟨hlower i hi _ (T.source_source_self i z), hlower i hi _ (T.source_source_self i z)⟩ + · by_cases he : k = i + · subst i + erw [T.source_source_self,T.target_source_self] + exact And.intro hz.1 hz.1 + · erw [T.source_source, min_eq_left (by omega : k ≤ i), + T.target_source, ite_eq_left (by omega : k < i)] + exact hz + · intro i z hz + change P (T.source k (T.target i z)) ∧ P (T.target k (T.target i z)) + by_cases hi : i < k + · erw [T.source_target, ite_eq_right (by omega : ¬ k < i), T.target_target, min_eq_right hi.le] + exact ⟨hlower i hi _ (T.source_target_self i z), hlower i hi _ (T.source_target_self i z)⟩ + · by_cases he : k = i + · subst i + erw [T.source_target_self,T.target_target_self] + exact And.intro hz.2 hz.2 + · erw [T.source_target, ite_eq_left (by omega : k < i), T.target_target, min_eq_left (by omega : k ≤ i)] + exact hz + · intro l x y h hx hy + by_cases hl : l < k + · erw [T.source_comp_gt k l hl _ _ _ (T.source_composable hl h), + T.target_comp_gt k l hl _ _ _ (T.target_composable hl h)] + exact ⟨hcomp l hl _ _ (T.source_source_self k x) (T.source_source_self k y) _ hx.1 hy.1, + hcomp l hl _ _ (T.source_target_self k x) (T.source_target_self k y) _ hx.2 hy.2⟩ + · erw [T.source_comp_le k l (by omega), T.target_comp_le k l (by omega)] + exact ⟨hx.1,hy.2⟩ + intro z hz + have hh₁ := (hh z).1 + change P ((tensorFunctor.obj X).source k z) at hh₁ + simpa only [hz] using hh₁ +end Thomason.GrayRecursive.IntervalHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/AcceptedComplexes.lean b/lean/OAI/CategoryTheory/Thomason/Chains/AcceptedComplexes.lean new file mode 100644 index 0000000000000000000000000000000000000000..378892a7a4ea7d4ec2baf6107e1d2ddba15e7573 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/AcceptedComplexes.lean @@ -0,0 +1,133 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Representation + +namespace OAI + +/-! The bundled-group and carrier-and-instance presentations of augmented + directed complexes have the same positive tables and strict realization. -/ + +namespace Thomason.Construction.DirectedComplex + +open CategoryTheory + +universe u + +/-- Express a directed complex using its chain carriers and group instances. -/ +def toAccepted (K : DirectedComplex.{u}) : Thomason.DirectedComplex.{u} where + Chain n := K.group n + group _ := inferInstance + d := K.differential + d_d := K.differential_squared + augmentation := K.augmentation + augmentation_d := K.augmentation_differential + positive := K.positive + +/-- Bundle the chain groups of a carrier-and-instance directed complex. -/ +def ofAccepted (K : Thomason.DirectedComplex.{u}) : DirectedComplex.{u} where + group n := AddCommGrpCat.of (K.Chain n) + differential := K.d + differential_squared := K.d_d + augmentation := K.augmentation + augmentation_differential := K.augmentation_d + positive := K.positive + +/-- A positive chain map is unchanged on each chain group by the conversion. -/ +def Hom.toAccepted {K L : DirectedComplex.{u}} (f : Hom K L) : + Thomason.DirectedComplex.Hom K.toAccepted L.toAccepted where + map := f.app + map_d := f.differential + map_augmentation := f.augmentation + map_positive n _ hx := f.positive n hx + +/-- Positive chain maps also admit the bundled-group presentation. -/ +def Hom.ofAccepted {K L : Thomason.DirectedComplex.{u}} (f : Thomason.DirectedComplex.Hom K L) : + Hom (ofAccepted K) (ofAccepted L) where + app := f.map + differential := f.map_d + augmentation := f.map_augmentation + positive n _ hx := f.map_positive n _ hx + +namespace Cell + +variable {K L : DirectedComplex.{u}} + +/-- Transpose the degree and boundary indices of a positive globular table. -/ +def toAccepted (x : Cell K) : Thomason.DirectedComplex.Table K.toAccepted where + row n a := x.table a n + positive n a := x.positive a n + boundary n a := x.boundary a n + augmentation := x.augmentation + bounded := x.finite_support + +/-- Express a positive table in the Boolean-face presentation. -/ +def ofAccepted (x : Thomason.DirectedComplex.Table K.toAccepted) : Cell K where + table a n := x.row n a + positive a n := x.positive n a + boundary a n := x.boundary n a + augmentation := x.augmentation + finite_support := x.bounded + +/-- The table conversion preserves all chains, including zero upper chains. -/ +def acceptedEquiv (K : DirectedComplex.{u}) : Cell K ≃ Thomason.DirectedComplex.Table K.toAccepted where + toFun := toAccepted + invFun := ofAccepted + left_inv _ := rfl + right_inv _ := rfl + +@[simp] theorem toAccepted_face (x : Cell K) (a : Bool) (n : ℕ) : + (x.face a n).toAccepted = Thomason.DirectedComplex.Table.truncate n a x.toAccepted := by + ext n a + rfl + +@[simp] theorem ofAccepted_truncate (x : Thomason.DirectedComplex.Table K.toAccepted) + (n : ℕ) (a : Bool) : + ofAccepted (Thomason.DirectedComplex.Table.truncate n a x) = (ofAccepted x).face a n := by + ext a n + rfl + +@[simp] theorem toAccepted_comp (x y : Cell K) (n : ℕ) + (h : x.face true n = y.face false n) + (h' : Thomason.DirectedComplex.Table.truncate n true x.toAccepted = + Thomason.DirectedComplex.Table.truncate n false y.toAccepted) : + (Cell.comp x y n h).toAccepted = + Thomason.DirectedComplex.Table.comp n x.toAccepted y.toAccepted h' := by + ext n a + rfl + +@[simp] theorem toAccepted_map (f : Hom K L) (x : Cell K) : + (Cell.map f x).toAccepted = f.toAccepted.table x.toAccepted := rfl + +end Cell + +/-- The two positive-table realizations are isomorphic as strict omega-categories. -/ +def realizationIso (K : DirectedComplex.{u}) : + toOmega.obj K.realization ≅ K.toAccepted.nu where + hom := + { map := Cell.toAccepted + map_source n x := Cell.toAccepted_face x false n + map_target n x := Cell.toAccepted_face x true n + map_comp n x y h h' := Cell.toAccepted_comp x y n h h' } + inv := + { map := Cell.ofAccepted + map_source n x := Cell.ofAccepted_truncate x n false + map_target n x := Cell.ofAccepted_truncate x n true + map_comp _ _ _ _ _ := by + apply Cell.ext + rfl } + hom_inv_id := by + apply Thomason.OmegaCategory.Functor.ext + rfl + inv_hom_id := by + apply Thomason.OmegaCategory.Functor.ext + rfl + +/-- Realization of a positive chain map commutes with the presentation isomorphism. -/ +theorem realizationIso_naturality {K L : DirectedComplex.{u}} (f : Hom K L) : + toOmega.map f.realization ≫ (realizationIso L).hom = + (realizationIso K).hom ≫ f.toAccepted.nu := by + apply Thomason.OmegaCategory.Functor.ext + rfl + +end Thomason.Construction.DirectedComplex + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/BarycentricSupportPositive.lean b/lean/OAI/CategoryTheory/Thomason/Chains/BarycentricSupportPositive.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9ad410c7f73b2b705db95e8715aa5b0652d2b64 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/BarycentricSupportPositive.lean @@ -0,0 +1,42 @@ +import OAI.CategoryTheory.Thomason.Simplicial.RealizationTopology + +namespace OAI + +section + +/-! # Positivity after support restriction and epimorphic simplex maps -/ + +namespace Thomason.Construction.HornBarycentric + +open Convexity + +noncomputable section + +/-- All coordinates on the ordered support are nonzero. -/ +theorem supportCoordinates_nonzero {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) + (k : Fin (supportLen x+1)) : (supportCoordinates x).weights k ≠ 0 := by + have he := congrArg (fun p : StdSimplex ℝ (Fin (n+1)) => p.weights (supportMap x k)) + (support_recover x) + change (supportCoordinates x).weights.mapDomain (supportMap x) (supportMap x k) = + x.weights (supportMap x k) at he + rw [Finsupp.mapDomain_apply_of_injective (supportMap x).injective] at he + rw [he] + exact Finsupp.mem_support_iff.mp (supportMap_mem x k) + +/-- A surjective vertex map preserves nonvanishing of all barycentric coordinates. -/ +theorem map_nonzero {m n : ℕ} (f : Fin (m+1) → Fin (n+1)) + (hf : Function.Surjective f) (x : StdSimplex ℝ (Fin (m+1))) + (hx : ∀ i, x.weights i ≠ 0) (j : Fin (n+1)) : + (StdSimplex.map f x).weights j ≠ 0 := by + apply Finsupp.mem_support_iff.mp + rw [support_map] + obtain ⟨i, rfl⟩ := hf j + exact Finset.mem_image.mpr ⟨i, Finsupp.mem_support_iff.mpr (hx i), rfl⟩ + +end + +end Thomason.Construction.HornBarycentric + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/DirectedComplex.lean b/lean/OAI/CategoryTheory/Thomason/Chains/DirectedComplex.lean new file mode 100644 index 0000000000000000000000000000000000000000..40e500bf0630defda633510a13d9c60cc30d8c2b --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/DirectedComplex.lean @@ -0,0 +1,222 @@ +import Mathlib.Algebra.Category.Grp.Basic +import Mathlib.Algebra.Group.Submonoid.Defs +import Mathlib.Tactic + +namespace OAI + +section + +/-! +# Augmented directed complexes and their globular cells + +An augmented directed complex consists of chain groups, differentials, an +augmentation and positive submonoids. A globular cell is a +finite table of positive chains, with the boundary and augmentation equations +in Steiner's construction `nu`. Its faces are truncations of this table. +-/ + +namespace Thomason.Construction + +universe u + +structure DirectedComplex where + group : ℕ → AddCommGrpCat.{u} + differential (n : ℕ) : group (n + 1) →+ group n + differential_squared (n : ℕ) (x : group (n + 2)) : + differential n (differential (n + 1) x) = 0 + augmentation : group 0 →+ ℤ + augmentation_differential (x : group 1) : augmentation (differential 0 x) = 0 + positive (n : ℕ) : AddSubmonoid (group n) + +namespace DirectedComplex + +/-- A chain map preserving the augmentation and positive submonoids. -/ +structure Hom (K L : DirectedComplex.{u}) where + app (n : ℕ) : K.group n →+ L.group n + differential (n : ℕ) (x : K.group (n + 1)) : + app n (K.differential n x) = L.differential n (app (n + 1) x) + augmentation (x : K.group 0) : L.augmentation (app 0 x) = K.augmentation x + positive (n : ℕ) {x : K.group n} : x ∈ K.positive n → app n x ∈ L.positive n + +/-- The finite positive chain table defining a cell of `nu K`. -/ +@[ext] +structure Cell (K : DirectedComplex.{u}) where + table (a : Bool) (n : ℕ) : K.group n + positive (a : Bool) (n : ℕ) : table a n ∈ K.positive n + augmentation (a : Bool) : K.augmentation (table a 0) = 1 + boundary (a : Bool) (n : ℕ) : + K.differential n (table a (n + 1)) = table true n - table false n + finite_support : ∃ N, ∀ n, N < n → ∀ a, table a n = 0 + +namespace Cell + +variable {K L M : DirectedComplex.{u}} + +/-- Applying a positive chain map in every degree preserves the full table +equations, including the boundary data below any vanishing top chain. -/ +def map (f : Hom K L) (x : Cell K) : Cell L where + table a n := f.app n (x.table a n) + positive a n := f.positive n (x.positive a n) + augmentation a := (f.augmentation _).trans (x.augmentation a) + boundary a n := by + rw [← f.differential, x.boundary, map_sub] + finite_support := by + obtain ⟨N, hN⟩ := x.finite_support + exact ⟨N, fun n hn a => by rw [hN n hn a, map_zero]⟩ + +@[simp] +theorem map_table (f : Hom K L) (x : Cell K) (a : Bool) (n : ℕ) : + (map f x).table a n = f.app n (x.table a n) := rfl + +/-- Truncate a table at degree `n`, retaining the chosen boundary twice in +that degree. The lower-dimensional entries remain unchanged. -/ +def cutTable (x : Cell K) (a : Bool) (n : ℕ) (b : Bool) (m : ℕ) : K.group m := + if m < n then x.table b m else if m = n then x.table a m else 0 + +def face (x : Cell K) (a : Bool) (n : ℕ) : Cell K where + table := x.cutTable a n + positive b m := by + unfold cutTable + split_ifs + · exact x.positive b m + · exact x.positive a m + · exact (K.positive m).zero_mem + augmentation b := by + by_cases hn : n = 0 + · subst n + simpa only [cutTable, Nat.lt_irrefl, ite_false, ite_true] using x.augmentation a + · have hn' : 0 < n := Nat.pos_of_ne_zero hn + simpa only [cutTable, hn', ite_true] using x.augmentation b + boundary b m := by + by_cases h : m + 1 < n + · have hm : m < n := by omega + simp only [cutTable, h, hm, ite_true, x.boundary] + · by_cases he : m + 1 = n + · have hm : m < n := by omega + subst n + simp only [cutTable, Nat.lt_irrefl, Nat.lt_succ_self, ite_false, + ite_true, x.boundary] + · have hm : ¬m < n := by omega + by_cases hmn : m = n + · subst n + simp [cutTable] + · simp only [cutTable, h, he, hm, hmn, ite_false, map_zero, sub_self] + finite_support := ⟨n, fun m hm a => by + simp only [cutTable, Nat.not_lt.mpr (Nat.le_of_lt hm), + Nat.ne_of_gt hm, ite_false]⟩ + +@[simp] +theorem face_table (x : Cell K) (a : Bool) (n : ℕ) (b : Bool) (m : ℕ) : + (x.face a n).table b m = x.cutTable a n b m := rfl + +/-- Positive chain maps preserve globular source and target truncation. -/ +theorem map_face (f : Hom K L) (x : Cell K) (a : Bool) (n : ℕ) : + map f (x.face a n) = (map f x).face a n := by + ext b m + simp only [map_table, face_table, cutTable] + split_ifs <;> simp only [map_zero] + +/-- The face operations satisfy the strict globular identities. -/ +theorem face_face (x : Cell K) (a b : Bool) (m n : ℕ) : + (x.face b n).face a m = if m < n then x.face a m else x.face b n := by + ext c k + by_cases hmn : m < n + · rw [ite_eq_left hmn] + simp only [face_table, cutTable] + split_ifs <;> (try rfl) + all_goals omega + · rw [ite_eq_right hmn] + simp only [face_table, cutTable] + split_ifs <;> (try rfl) + all_goals omega + +theorem matching_top {x y : Cell K} {n : ℕ} (h : x.face true n = y.face false n) : + x.table true n = y.table false n := by + have h' := congrArg (fun z : Cell K => z.table false n) h + simpa only [face_table, cutTable, Nat.lt_irrefl, ite_false, ite_true] using h' + +theorem matching_below {x y : Cell K} {n : ℕ} (h : x.face true n = y.face false n) + (a : Bool) {m : ℕ} (hm : m < n) : x.table a m = y.table a m := by + have h' := congrArg (fun z : Cell K => z.table a m) h + simpa only [face_table, cutTable, hm, ite_true] using h' + +/-- The table for composition along dimension `n`: retain common lower data, +take the exterior boundaries at `n`, and add the higher chains. -/ +def pasteTable (x y : Cell K) (n : ℕ) (a : Bool) (m : ℕ) : K.group m := + if m < n then x.table a m + else if m = n then if a then y.table true m else x.table false m + else x.table a m + y.table a m + +def comp (x y : Cell K) (n : ℕ) (h : x.face true n = y.face false n) : Cell K where + table := pasteTable x y n + positive a m := by + unfold pasteTable + split_ifs + · exact x.positive a m + · exact y.positive true m + · exact x.positive false m + · exact (K.positive m).add_mem (x.positive a m) (y.positive a m) + augmentation a := by + by_cases hn : n = 0 + · subst n + cases a <;> simp only [pasteTable, Nat.lt_irrefl, ite_false, ite_true, + Bool.false_eq_true, x.augmentation, y.augmentation] + · have hn' : 0 < n := Nat.pos_of_ne_zero hn + simp only [pasteTable, hn', ite_true, x.augmentation] + boundary a m := by + by_cases hm : m + 1 < n + · have hm' : m < n := by omega + simp only [pasteTable, hm, hm', ite_true, x.boundary] + · by_cases he : m + 1 = n + · have hm' : m < n := by omega + subst n + cases a + · simp only [pasteTable, Nat.lt_irrefl, Nat.lt_succ_self, ite_false, ite_true, + Bool.false_eq_true, x.boundary] + · simp only [pasteTable, Nat.lt_irrefl, Nat.lt_succ_self, ite_false, ite_true, + y.boundary] + rw [matching_below h true (Nat.lt_succ_self m), + matching_below h false (Nat.lt_succ_self m)] + · have hm' : n ≤ m := by omega + by_cases hmn : m = n + · subst n + simp [pasteTable, x.boundary, y.boundary] + have ht : x.table true m = y.table false m := matching_top h + rw [ht] + abel + · have hnlt : ¬m < n := by omega + simp only [pasteTable, hm, he, hnlt, hmn, ite_false, map_add, + x.boundary, y.boundary] + abel + finite_support := by + obtain ⟨N, hN⟩ := x.finite_support + obtain ⟨M, hM⟩ := y.finite_support + refine ⟨max n (max N M), ?_⟩ + intro m hm a + have hnm : n < m := lt_of_le_of_lt (le_max_left _ _) hm + have hNm : N < m := lt_of_le_of_lt ((le_max_left N M).trans (le_max_right _ _)) hm + have hMm : M < m := lt_of_le_of_lt ((le_max_right N M).trans (le_max_right _ _)) hm + simp only [pasteTable, Nat.not_lt.mpr hnm.le, Nat.ne_of_gt hnm, ite_false, + hN m hNm a, hM m hMm a, add_zero] + +@[simp] +theorem comp_table (x y : Cell K) (n : ℕ) (h) (a : Bool) (m : ℕ) : + (comp x y n h).table a m = pasteTable x y n a m := rfl + +/-- Positive chain maps respect composition of globular +tables. This includes maps sending generators to sums or zero. -/ +theorem map_comp (f : Hom K L) (x y : Cell K) (n : ℕ) + (h : x.face true n = y.face false n) + (h' : (map f x).face true n = (map f y).face false n) : + map f (comp x y n h) = comp (map f x) (map f y) n h' := by + ext a m + simp only [map_table, comp_table, pasteTable] + split_ifs <;> simp only [map_add] + +end Cell +end DirectedComplex +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/FinalPositiveSimplexSupport.lean b/lean/OAI/CategoryTheory/Thomason/Chains/FinalPositiveSimplexSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..c936de77043135ea611c18fba8168e66e6032fbf --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/FinalPositiveSimplexSupport.lean @@ -0,0 +1,1020 @@ +import OAI.CategoryTheory.Thomason.Chains.DirectedComplex +import OAI.CategoryTheory.Thomason.Strict.StrictCompositeListReplacement +import Mathlib.Algebra.BigOperators.Group.Finset.Basic +import Mathlib.Data.Finset.Max +import Mathlib.LinearAlgebra.Finsupp.LinearCombination +import Mathlib.Order.Fin.Basic + +namespace OAI + +section + +/-! +# Realizing directed complexes as strict omega-categories + +The finite positive tables form a strict omega-category. Composition +adds the higher chains and uses the exterior source and target chains. +The globular, unit, associative and interchange laws are proved on tables. +-/ + +namespace Thomason.Construction.DirectedComplex + +universe u + +namespace Cell + +variable {K : DirectedComplex.{u}} + +theorem source_comp (x y : Cell K) (n : ℕ) (h) : + (comp x y n h).face false n = x.face false n := by + ext a m + simp only [face_table, cutTable, comp_table, pasteTable, Bool.false_eq_true, ite_false] + split_ifs <;> rfl + +theorem target_comp (x y : Cell K) (n : ℕ) (h) : + (comp x y n h).face true n = y.face true n := by + ext a m + by_cases hm : m < n + · simp only [face_table, cutTable, comp_table, pasteTable, hm, ite_true] + exact matching_below h a hm + · simp only [face_table, cutTable, comp_table, pasteTable, hm, ite_false] + split_ifs <;> rfl + +theorem left_unit (x : Cell K) (n : ℕ) (h) : comp (x.face false n) x n h = x := by + ext a m + by_cases hm : m < n + · simp only [comp_table, pasteTable, face_table, cutTable, hm, ite_true] + · by_cases he : m = n + · subst m + cases a <;> simp [comp_table, pasteTable, face_table, cutTable] + · simp only [comp_table, pasteTable, face_table, cutTable, + hm, he, ite_false, zero_add] + +theorem right_unit (x : Cell K) (n : ℕ) (h) : comp x (x.face true n) n h = x := by + ext a m + by_cases hm : m < n + · simp only [comp_table, pasteTable, hm, ite_true] + · by_cases he : m = n + · subst m + cases a <;> simp [comp_table, pasteTable, face_table, cutTable] + · simp only [comp_table, pasteTable, face_table, cutTable, + hm, he, ite_false, add_zero] + +theorem assoc (x y z : Cell K) (n : ℕ) (hxy hyz hl hr) : + comp (comp x y n hxy) z n hl = comp x (comp y z n hyz) n hr := by + ext a m + simp only [comp_table, pasteTable] + split_ifs <;> (try contradiction) <;> (try rfl) + all_goals exact add_assoc _ _ _ + +theorem face_comp (x y : Cell K) (n m : ℕ) (hnm : n < m) (a : Bool) (h h') : + (comp x y n h).face a m = comp (x.face a m) (y.face a m) n h' := by + ext b k + simp only [face_table, cutTable, comp_table, pasteTable] + split_ifs <;> (try rfl) + all_goals simp_all + +theorem interchange (a b c d : Cell K) (m n : ℕ) (hmn : m < n) + (hab hcd hac hbd hl hr) : + comp (comp a b m hab) (comp c d m hcd) n hl = + comp (comp a c n hac) (comp b d n hbd) m hr := by + ext e k + simp only [comp_table, pasteTable] + split_ifs <;> (try rfl) + all_goals first | omega | abel + +/-- Finite support supplies a dimension bound: the top positive and negative +chains coincide because the next chain vanishes. -/ +theorem finite_dimension (x : Cell K) : ∃ n, x.face false n = x ∧ x.face true n = x := by + obtain ⟨N, hN⟩ := x.finite_support + have ht : x.table true N = x.table false N := by + apply sub_eq_zero.mp + rw [← x.boundary false N, hN (N + 1) (Nat.lt_succ_self N) false, map_zero] + have hf (a : Bool) : x.face a N = x := by + ext b m + by_cases hm : m < N + · simp only [face_table, cutTable, hm, ite_true] + · by_cases he : m = N + · subst m + cases a <;> cases b <;> + simp only [face_table, cutTable, Nat.lt_irrefl, ite_false, ite_true, ht] + · have hNm : N < m := by omega + simp only [face_table, cutTable, hm, he, ite_false, hN m hNm b] + exact ⟨N, hf false, hf true⟩ + +end Cell + +/-- Steiner's positive-table construction as a strict omega-category. -/ +def realization (K : DirectedComplex.{u}) : StrictOmegaCategory.{u} where + Cell := Cell K + face a n x := x.face a n + globular a b m n x := Cell.face_face x a b m n + comp n x y h := Cell.comp x y n h + source_comp n x y h := Cell.source_comp x y n h + target_comp n x y h := Cell.target_comp x y n h + face_comp a m n hnm x y h h' := Cell.face_comp x y n m hnm a h h' + left_unit n x h := Cell.left_unit x n h + right_unit n x h := Cell.right_unit x n h + assoc n x y z hxy hyz hl hr := Cell.assoc x y z n hxy hyz hl hr + interchange m n hmn a b c d hab hcd hac hbd hl hr := + Cell.interchange a b c d m n hmn hab hcd hac hbd hl hr + finite_dimension := Cell.finite_dimension + +/-- A positive augmentation-preserving chain map gives a strict functor. -/ +def Hom.realization {K L : DirectedComplex.{u}} (f : Hom K L) : + StrictOmegaCategory.Hom K.realization L.realization where + toFun := Cell.map f + map_face a n x := Cell.map_face f x a n + map_comp n x y h h' := Cell.map_comp f x y n h h' + +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # Dimension bounds of positive tables + +A strict dimension bound is exactly vanishing of the chain table above +that degree. This relates globular truncation to chain support. +-/ + +namespace Thomason.Construction.DirectedComplex.Cell + +variable {K : DirectedComplex.{0}} + +theorem dimensionLE_iff_zero_above (x : Cell K) (n : ℕ) : + K.realization.DimensionLE n x ↔ ∀ k, n < k → ∀ a, x.table a k = 0 := by + constructor + · intro hx k hk a + have h := congrArg (fun y : Cell K => y.table a k) hx.1 + change cutTable x false n a k = x.table a k at h + simpa only [cutTable, Nat.not_lt.mpr hk.le, Nat.ne_of_gt hk, ite_false] using h.symm + · intro hx + have ht : x.table true n = x.table false n := by + apply sub_eq_zero.mp + rw [← x.boundary false n, hx (n+1) (Nat.lt_succ_self n) false, map_zero] + have hf (a : Bool) : x.face a n = x := by + apply Cell.ext + funext b k + change cutTable x a n b k = x.table b k + by_cases hk : k < n + · simp only [cutTable, hk, ite_true] + · by_cases he : k = n + · subst k + cases a <;> cases b <;> simp only [cutTable, Nat.lt_irrefl, ite_false, + ite_true, ht] + · have hnk : n < k := by omega + simp only [cutTable, hk, he, ite_false, hx k hnk b] + exact ⟨hf false, hf true⟩ + +end Thomason.Construction.DirectedComplex.Cell + +end + +section + +/-! # Positive binary decomposition of a globular table + +This is the binary table construction in Steiner 2004, Proposition 5.1. +A positive middle chain determines the cell, matching, and composition +equations without a generation hypothesis. +-/ + +namespace Thomason.Construction.DirectedComplex.Cell + +universe u + +variable {K : DirectedComplex.{u}} + +/-- A finite positive table with a common augmentation on its two sides. +Sums of atoms have this form even when their augmentation exceeds one. -/ +structure PositiveTable (K : DirectedComplex.{u}) where + table (a : Bool) (n : ℕ) : K.group n + positive (a : Bool) (n : ℕ) : table a n ∈ K.positive n + augmentation (a : Bool) : K.augmentation (table a 0) = K.augmentation (table false 0) + boundary (a : Bool) (n : ℕ) : + K.differential n (table a (n+1)) = table true n - table false n + finite_support : ∃ N, ∀ n, N < n → ∀ a, table a n = 0 + +namespace PositiveTable + +/-- Globular cells are the augmentation-one positive tables. -/ +def ofCell (x : Cell K) : PositiveTable K where + table := x.table + positive := x.positive + augmentation a := by rw [x.augmentation a, x.augmentation false] + boundary := x.boundary + finite_support := x.finite_support + +instance : Coe (Cell K) (PositiveTable K) := ⟨ofCell⟩ + +/-- Positive tables add without an artificial augmentation-one restriction. -/ +def add (A B : PositiveTable K) : PositiveTable K where + table a n := A.table a n + B.table a n + positive a n := (K.positive n).add_mem (A.positive a n) (B.positive a n) + augmentation a := by rw [map_add, map_add, A.augmentation a, B.augmentation a] + boundary a n := by rw [map_add, A.boundary, B.boundary]; abel + finite_support := by + obtain ⟨N, hN⟩ := A.finite_support + obtain ⟨M, hM⟩ := B.finite_support + refine ⟨max N M, ?_⟩ + intro n hn a + rw [hN n (lt_of_le_of_lt (Nat.le_max_left _ _) hn) a, + hM n (lt_of_le_of_lt (Nat.le_max_right _ _) hn) a, zero_add] + +def zero : PositiveTable K where + table _ _ := 0 + positive _ _ := (K.positive _).zero_mem + augmentation _ := rfl + boundary _ _ := by rw [map_zero, sub_self] + finite_support := ⟨0, fun _ _ _ => rfl⟩ + +/-- Finite sums of atoms are positive tables. -/ +def ofCells : List (Cell K) → PositiveTable K + | [] => zero + | A :: as => add (ofCell A) (ofCells as) + +@[simp] theorem ofCells_table (as : List (Cell K)) (side : Bool) (n : ℕ) : + (ofCells as).table side n = (as.map (fun A => A.table side n)).sum := by + induction as with + | nil => rfl + | cons A as ih => + change A.table side n + (ofCells as).table side n = _ + simpa only [List.map_cons, List.sum_cons] using congrArg (A.table side n + ·) ih + +end PositiveTable + +/-- Replace the upper part of X by A and retain one chosen r-boundary of X. -/ +def replacementTable (X : Cell K) (A : PositiveTable K) (r : ℕ) (side a : Bool) (n : ℕ) : K.group n := + if n < r then X.table a n else if n = r then + X.table side n + A.table a n - A.table side n else A.table a n + +/-- A positive middle boundary suffices to make the replacement a +strict globular cell, with every lower boundary equation retained. -/ +def replacement (X : Cell K) (A : PositiveTable K) (r : ℕ) (side : Bool) + (hpos : ∀ a, X.table side r + A.table a r - A.table side r ∈ K.positive r) : + Cell K where + table := replacementTable X A r side + positive a n := by + unfold replacementTable + split_ifs with hn he + · exact X.positive a n + · subst n + exact hpos a + · exact A.positive a n + augmentation a := by + by_cases hr : r = 0 + · subst r + simp only [replacementTable, Nat.lt_irrefl, ite_false, ite_true, + map_sub, map_add, X.augmentation, A.augmentation] + norm_num + · have hr' : 0 < r := Nat.pos_of_ne_zero hr + simpa only [replacementTable, hr', ite_true] using X.augmentation a + boundary a n := by + by_cases hnr : n+1 < r + · have hn : n < r := by omega + simpa only [replacementTable, hnr, hn, ite_true] using X.boundary a n + · by_cases he : n+1 = r + · subst r + have hn : n < n+1 := Nat.lt_succ_self n + simp only [replacementTable, hn, Nat.lt_irrefl, ite_false, ite_true, + map_sub, map_add, X.boundary, A.boundary] + abel + · have hnr' : r ≤ n := by omega + by_cases he' : n = r + · subst n + simp only [replacementTable, Nat.lt_irrefl, Nat.not_lt.mpr (Nat.le_succ r), + Nat.succ_ne_self, ite_false, ite_true, A.boundary] + abel + · have hn : ¬ n < r := Nat.not_lt.mpr hnr' + simpa only [replacementTable, hnr, he, hn, he', ite_false] using A.boundary a n + finite_support := by + obtain ⟨N, hN⟩ := A.finite_support + refine ⟨max r N, ?_⟩ + intro n hn a + have hrn : r < n := lt_of_le_of_lt (Nat.le_max_left r N) hn + have hNn : N < n := lt_of_le_of_lt (Nat.le_max_right r N) hn + simp only [replacementTable, Nat.not_lt.mpr hrn.le, Nat.ne_of_gt hrn, + ite_false, hN n hNn a] + +@[simp] theorem replacement_table (X : Cell K) (A : PositiveTable K) (r : ℕ) (side : Bool) + (hpos : ∀ a, X.table side r + A.table a r - A.table side r ∈ K.positive r) + (a : Bool) (n : ℕ) : + (replacement X A r side hpos).table a n = replacementTable X A r side a n := rfl + +/-- The difference of the two r-boundaries is additive whenever the next +table is additive. -/ +theorem boundary_add_of_above (X : Cell K) (A B : PositiveTable K) (r : ℕ) + (he : X.table false (r+1) = A.table false (r+1) + B.table false (r+1)) : + X.table true r - X.table false r = + (A.table true r - A.table false r) + (B.table true r - B.table false r) := by + have hh := congrArg (K.differential r) he + simpa only [map_add, X.boundary, A.boundary, B.boundary] using hh + +/-- The two formulas for the joining chain agree. -/ +theorem replacement_middle_eq (X : Cell K) (A B : PositiveTable K) (r : ℕ) + (he : X.table false (r+1) = A.table false (r+1) + B.table false (r+1)) : + X.table false r + A.table true r - A.table false r = + X.table true r + B.table false r - B.table true r := by + have hh := boundary_add_of_above X A B r he + apply sub_eq_zero.mp + calc + _ = (A.table true r - A.table false r) + (B.table true r - B.table false r) - + (X.table true r - X.table false r) := by abel + _ = 0 := by rw [hh, sub_self] + +/-- Binary table decomposition with an explicitly positive joining chain. -/ +theorem exists_comp_of_positive_middle (X : Cell K) (A B : PositiveTable K) (r : ℕ) + (he : ∀ n, r < n → ∀ a, X.table a n = A.table a n + B.table a n) + (hm : X.table false r + A.table true r - A.table false r ∈ K.positive r) : + ∃ (Y Z : Cell K) (hyz : Y.face true r = Z.face false r), + comp Y Z r hyz = X ∧ + (∀ n, r < n → ∀ a, Y.table a n = A.table a n) ∧ + (∀ n, r < n → ∀ a, Z.table a n = B.table a n) := by + have hm' := replacement_middle_eq X A B r (he (r+1) (Nat.lt_succ_self r) false) + have hA : ∀ a, X.table false r + A.table a r - A.table false r ∈ K.positive r := by + intro a + cases a + · simpa only [add_sub_cancel_right] using X.positive false r + · exact hm + have hB : ∀ a, X.table true r + B.table a r - B.table true r ∈ K.positive r := by + intro a + cases a + · rw [← hm'] + exact hm + · simpa only [add_sub_cancel_right] using X.positive true r + let Y := replacement X A r false hA + let Z := replacement X B r true hB + have hyz : Y.face true r = Z.face false r := by + apply Cell.ext + funext a n + change cutTable Y true r a n = cutTable Z false r a n + unfold cutTable + split_ifs with hn heq + · change replacementTable X A r false a n = replacementTable X B r true a n + simp only [replacementTable, hn, ite_true] + · subst n + simpa only [Y, Z, replacement, replacementTable, Nat.lt_irrefl, + ite_false, ite_true] using hm' + · rfl + refine ⟨Y, Z, hyz, ?_, ?_, ?_⟩ + · apply Cell.ext + funext a n + change pasteTable Y Z r a n = X.table a n + unfold pasteTable + split_ifs with hn heq ha + · change replacementTable X A r false a n = _ + simp only [replacementTable, hn, ite_true] + · subst n + subst a + simp [Z, replacement, replacementTable] + · subst n + have ha' : a = false := by cases a <;> simp_all + subst a + simp [Y, replacement, replacementTable] + · have hrn : r < n := by omega + change replacementTable X A r false a n + replacementTable X B r true a n = _ + simp only [replacementTable, hn, heq, ite_false] + exact (he n hrn a).symm + · intro n hn a + change replacementTable X A r false a n = _ + simp only [replacementTable, Nat.not_lt.mpr hn.le, Nat.ne_of_gt hn, ite_false] + · intro n hn a + change replacementTable X B r true a n = _ + simp only [replacementTable, Nat.not_lt.mpr hn.le, Nat.ne_of_gt hn, ite_false] + +end Thomason.Construction.DirectedComplex.Cell + +end + +section + +/-! # Uniqueness of factors with prescribed upper tables + +This is the binary form of Steiner 2004, Proposition 5.8. It is a direct +calculation on cell tables which supplies free-gluing coherence. +-/ + +namespace Thomason.Construction.DirectedComplex.Cell + +universe u + +variable {K : DirectedComplex.{u}} + +/-- Two r-compositions with the same total and the same upper left factor +have identical factors, including all lower boundary data. -/ +theorem factors_unique_of_above (Y Z Y' Z' : Cell K) (r : ℕ) + (hyz : Y.face true r = Z.face false r) + (hyz' : Y'.face true r = Z'.face false r) + (he : comp Y Z r hyz = comp Y' Z' r hyz') + (hupper : ∀ n, r < n → ∀ side, Y.table side n = Y'.table side n) : + Y = Y' ∧ Z = Z' := by + have hlow (n : ℕ) (hn : n < r) (side : Bool) : Y.table side n = Y'.table side n := by + have hh := congrArg (fun X : Cell K => X.table side n) he + simpa only [comp_table, pasteTable, hn, ite_true] using hh + have hfalse : Y.table false r = Y'.table false r := by + have hh := congrArg (fun X : Cell K => X.table false r) he + simpa only [comp_table, pasteTable, Nat.lt_irrefl, ite_false, ite_true, + Bool.false_eq_true] using hh + have htrue : Y.table true r = Y'.table true r := by + have hh := congrArg (K.differential r) (hupper (r+1) (by omega) false) + rw [Y.boundary, Y'.boundary, hfalse] at hh + simpa only [sub_add_cancel] using congrArg (fun z => z + Y'.table false r) hh + have hY : Y = Y' := by + apply Cell.ext + funext side n + rcases lt_trichotomy n r with hn | rfl | hn + · exact hlow n hn side + · cases side <;> assumption + · exact hupper n hn side + refine ⟨hY, ?_⟩ + apply Cell.ext + funext side n + rcases lt_trichotomy n r with hn | rfl | hn + · exact (matching_below hyz side hn).symm.trans + ((hlow n hn side).trans (matching_below hyz' side hn)) + · cases side with + | false => exact (matching_top hyz).symm.trans (htrue.trans (matching_top hyz')) + | true => + have hh := congrArg (fun X : Cell K => X.table true n) he + simpa only [comp_table, pasteTable, Nat.lt_irrefl, ite_false, ite_true] using hh + · have hh := congrArg (fun X : Cell K => X.table side n) he + simp only [comp_table, pasteTable, Nat.not_lt.mpr hn.le, Nat.ne_of_gt hn, ite_false] at hh + rw [hupper n hn side] at hh + exact add_left_cancel hh + +end Thomason.Construction.DirectedComplex.Cell + +end + +section + +/-! # Uniqueness of an entire ordered string of positive-table factors + +The binary reconstruction gives Steiner's Proposition 5.8 for any finite +nonempty string, once corresponding factors have the same upper tables. +-/ + +namespace Thomason.Construction.DirectedComplex.Cell + +open StrictOmegaCategory + +universe u + +variable {K : DirectedComplex.{u}} {r : ℕ} + +/-- Above the composition degree, the table of a string is the sum of its +factor tables. -/ +theorem compositeList_table {xs : List (Cell K)} {x : Cell K} + (h : CompositeList K.realization r xs x) (n : ℕ) (hn : r < n) (side : Bool) : + x.table side n = (xs.map (fun y => y.table side n)).sum := by + refine CompositeList.rec + (motive := fun (xs : List K.realization) (x : K.realization) _ => + x.table side n = (xs.map (fun y => y.table side n)).sum) ?_ ?_ h + · intro x + simp only [List.map_cons, List.map_nil, List.sum_cons, + List.sum_nil, add_zero] + · intro x xs y hy hxy ih + dsimp only [DirectedComplex.realization] at x xs y hxy ih ⊢ + simp only [comp_table, pasteTable, Nat.not_lt.mpr hn.le, + Nat.ne_of_gt hn, ite_false, List.map_cons, List.sum_cons] + rw [ih] + +theorem compositeList_factors_unique {xs ys : List (Cell K)} {x y : Cell K} + (hx : CompositeList K.realization r xs x) + (hy : CompositeList K.realization r ys y) (hxy : x = y) + (hupper : List.Forall₂ (fun A D : Cell K => + ∀ n, r < n → ∀ side, A.table side n = D.table side n) xs ys) : xs = ys := by + refine CompositeList.rec + (motive := fun (xs : List K.realization) (x : K.realization) _ => + ∀ (ys : List K.realization) (y : K.realization), + CompositeList K.realization r ys y → x = y → + List.Forall₂ (fun A D : Cell K => + ∀ n, r < n → ∀ side, A.table side n = D.table side n) xs ys → xs = ys) + ?_ ?_ hx ys y hy hxy hupper + · intro x ys y hy hxy hupper + cases hy with + | singleton y => exact congrArg (fun z => [z]) hxy + | @cons y ys z hz hyz => + cases hupper with + | cons hhead htail => + cases htail + exact (hz.nonempty rfl).elim + · intro x xs z hz hxz ih ys y hy hxy hupper + cases hy with + | singleton y => + cases hupper with + | cons hhead htail => + cases htail + exact (hz.nonempty rfl).elim + | @cons y ys w hw hyw => + cases hupper with + | cons hhead htail => + have he := factors_unique_of_above x z y w r hxz hyw hxy hhead + exact congrArg₂ List.cons he.1 (ih ys w hw he.2 htail) + +end Thomason.Construction.DirectedComplex.Cell + +end + +section + +/-! +# The normalized directed simplex complex + +The degree-p group is the free abelian group on strictly increasing +(p+1)-tuples of vertices. The differential is alternating deletion and the +positive cone consists of nonnegative coefficients. These normalized chains define the orientals. The differential identity +is described in Steiner (2007), Section 3, the oriental identification in +Theorem 3.2, and the cosimplicial action in Section 4. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +abbrev Basis (m p : ℕ) := Fin (p + 1) ↪o Fin (m + 1) +abbrev Chains (m p : ℕ) := Basis m p →₀ ℤ + +def deleteVertex {m p : ℕ} (s : Basis m (p + 1)) (i : Fin (p + 2)) : Basis m p := + (Fin.succAboveOrderEmb i).trans s + +noncomputable def differentialBasis (m p : ℕ) (s : Basis m (p + 1)) : Chains m p := + ∑ i : Fin (p + 2), Finsupp.single (deleteVertex s i) ((-1 : ℤ) ^ (i : ℕ)) + +noncomputable def differential (m p : ℕ) : Chains m (p + 1) →ₗ[ℤ] Chains m p := + Finsupp.linearCombination ℤ (differentialBasis m p) + +noncomputable def augmentation (m : ℕ) : Chains m 0 →ₗ[ℤ] ℤ := + Finsupp.linearCombination ℤ (fun _ => 1) + +@[simp] +theorem augmentation_single (m : ℕ) (s : Basis m 0) (z : ℤ) : + augmentation m (Finsupp.single s z) = z := by + simp [augmentation] + +@[simp] +theorem differential_single (m p : ℕ) (s : Basis m (p + 1)) (z : ℤ) : + differential m p (Finsupp.single s z) = z • differentialBasis m p s := by + simp [differential] + +theorem augmentation_differentialBasis (m : ℕ) (s : Basis m 1) : + augmentation m (differentialBasis m 0 s) = 0 := by + simp [differentialBasis, Fin.sum_univ_succ] + +theorem augmentation_differential (m : ℕ) (x : Chains m 1) : + augmentation m (differential m 0 x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp [augmentation_differentialBasis] + +def positive (m p : ℕ) : AddSubmonoid (Chains m p) where + carrier := {x | ∀ s, 0 ≤ x s} + zero_mem' := fun _ => le_rfl + add_mem' hx hy s := add_nonneg (hx s) (hy s) + +/-- The usual differential identity on these concrete normalized chains. -/ +def BoundarySquared (m : ℕ) : Prop := + ∀ (p : ℕ) (x : Chains m (p + 2)), differential m p (differential m (p + 1) x) = 0 + +/-- The augmented directed simplex complex with its differential identity. -/ +noncomputable abbrev directedComplex (m : ℕ) (hsq : BoundarySquared m) : DirectedComplex where + group p := AddCommGrpCat.of (Chains m p) + differential p := (differential m p).toAddMonoidHom + differential_squared := hsq + augmentation := (augmentation m).toAddMonoidHom + augmentation_differential := augmentation_differential m + positive := positive m + +/-- The m-th oriental is the strict realization of the normalized directed +simplex. -/ +noncomputable def oriental (m : ℕ) (hsq : BoundarySquared m) : StrictOmegaCategory := + (directedComplex m hsq).realization + +/-- A monotone vertex map takes a nondegenerate simplex to its image if that +image is nondegenerate, and to zero otherwise. -/ +noncomputable def mapBasis {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (p : ℕ) (s : Basis m p) : Chains n p := by + classical + exact if h : StrictMono (fun i => f (s i)) then + Finsupp.single (OrderEmbedding.ofStrictMono (fun i => f (s i)) h) 1 else 0 + +noncomputable def mapChains {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) (p : ℕ) : + Chains m p →ₗ[ℤ] Chains n p := + Finsupp.linearCombination ℤ (mapBasis f p) + +@[simp] +theorem mapChains_single {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) (p : ℕ) + (s : Basis m p) (z : ℤ) : mapChains f p (Finsupp.single s z) = z • mapBasis f p s := by + simp [mapChains] + +theorem mapBasis_nonneg {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m p) (t : Basis n p) : 0 ≤ mapBasis f p s t := by + classical + unfold mapBasis + split_ifs + · simp only [Finsupp.single_apply] + split_ifs <;> norm_num + · simp + +theorem mapChains_positive {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + {x : Chains m p} (hx : x ∈ positive m p) : mapChains f p x ∈ positive n p := by + classical + intro t + simp only [mapChains, Finsupp.linearCombination_apply, Finsupp.sum, + Finsupp.finsetSum_apply, Finsupp.smul_apply, smul_eq_mul] + exact Finset.sum_nonneg fun s _ => mul_nonneg (hx s) (mapBasis_nonneg f s t) + +theorem augmentation_mapBasis {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m 0) : augmentation n (mapBasis f 0 s) = 1 := by + have h : StrictMono (fun i => f (s i)) := fun i j hij => by + have : i = j := Fin.ext (by omega) + subst j + exact False.elim (lt_irrefl _ hij) + simp [mapBasis, h] + +theorem augmentation_mapChains {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (x : Chains m 0) : augmentation n (mapChains f 0 x) = augmentation m x := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp [augmentation_mapBasis] + +@[simp] +theorem mapBasis_id {m p : ℕ} (s : Basis m p) : + mapBasis (OrderHom.id : Fin (m + 1) →o Fin (m + 1)) p s = Finsupp.single s 1 := by + classical + have h : StrictMono (fun i => (OrderHom.id : Fin (m + 1) →o Fin (m + 1)) (s i)) := + s.strictMono + rw [mapBasis, dite_eq_left h] + rfl + +@[simp] +theorem mapChains_id {m p : ℕ} (x : Chains m p) : + mapChains (OrderHom.id : Fin (m + 1) →o Fin (m + 1)) p x = x := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp + +theorem mapBasis_comp {m n k p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (g : Fin (n + 1) →o Fin (k + 1)) (s : Basis m p) : + mapChains g p (mapBasis f p s) = mapBasis (g.comp f) p s := by + classical + by_cases hf : StrictMono (fun i => f (s i)) + · let t : Basis n p := OrderEmbedding.ofStrictMono (fun i => f (s i)) hf + have ht : mapBasis f p s = Finsupp.single t 1 := dite_eq_left hf + rw [ht, mapChains_single, one_smul] + by_cases hg : StrictMono (fun i => g (t i)) + · have hgf : StrictMono (fun i => (g.comp f) (s i)) := hg + simp only [mapBasis, dite_eq_left hg, dite_eq_left hgf] + rfl + · have hgf : ¬StrictMono (fun i => (g.comp f) (s i)) := hg + simp only [mapBasis, dite_eq_right hg, dite_eq_right hgf] + · have hgf : ¬StrictMono (fun i => (g.comp f) (s i)) := by + intro h + apply hf + intro i j hij + exact lt_of_not_ge fun hle => (not_le_of_gt (h hij)) (g.monotone hle) + simp only [mapBasis, dite_eq_right hf, dite_eq_right hgf, map_zero] + +theorem mapChains_comp {m n k p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (g : Fin (n + 1) →o Fin (k + 1)) (x : Chains m p) : + mapChains g p (mapChains f p x) = mapChains (g.comp f) p x := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp [mapBasis_comp] + +/-- The classical naturality identity for alternating normalized chains. +This is the normalized simplex chain-map assertion of Steiner (2007), +Section 4. -/ +def BoundaryNaturality {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) : Prop := + ∀ (p : ℕ) (x : Chains m (p + 1)), + mapChains f p (differential m p x) = differential n p (mapChains f (p + 1) x) + +noncomputable def directedMap {m n : ℕ} (hm : BoundarySquared m) (hn : BoundarySquared n) + (f : Fin (m + 1) →o Fin (n + 1)) (hf : BoundaryNaturality f) : + DirectedComplex.Hom (directedComplex m hm) (directedComplex n hn) where + app p := (mapChains f p).toAddMonoidHom + differential := hf + augmentation := augmentation_mapChains f + positive _ := mapChains_positive f + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Square-zero for the explicit normalized simplex differential + +The two deletion orders are paired by a fixed-point-free involution on +indices. They give the same remaining simplex and opposite signs. This +discharges the square-zero part of the classical normalized-chain input. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- Swap the order of two vertex deletions, accounting for the index shift. -/ +def swapDeletion {p : ℕ} (ij : Fin (p + 3) × Fin (p + 2)) : + Fin (p + 3) × Fin (p + 2) := + (ij.1.succAbove ij.2, ij.2.predAbove ij.1) + +/-- Swapping the two deleted original vertices twice restores both indices. -/ +theorem swapDeletion_involutive {p : ℕ} : Function.Involutive (@swapDeletion p) := by + rintro ⟨i, j⟩ + exact Prod.ext (Fin.succAbove_succAbove_predAbove i j) + (Fin.predAbove_predAbove_succAbove i j) + +/-- The paired deletion order gives exactly the same basis simplex. -/ +theorem deleteVertex_swap {m p : ℕ} (s : Basis m (p + 2)) + (i : Fin (p + 3)) (j : Fin (p + 2)) : + deleteVertex (deleteVertex s (i.succAbove j)) (j.predAbove i) = + deleteVertex (deleteVertex s i) j := by + ext k + exact congrArg (fun v => (s v).val) + (Fin.succAbove_succAbove_succAbove_predAbove i j k) + +/-- Exactly one index changes by one when the order of deletion is exchanged. -/ +theorem deletion_sign {p : ℕ} (i : Fin (p + 3)) (j : Fin (p + 2)) : + (-1 : ℤ) ^ ((i.succAbove j).val + (j.predAbove i).val) = + -((-1 : ℤ) ^ (i.val + j.val)) := by + by_cases hij : j.castSucc < i + · have hs : (i.succAbove j).val + (j.predAbove i).val + 1 = i.val + j.val := by + rw [Fin.succAbove_of_castSucc_lt _ _ hij, Fin.predAbove_of_castSucc_lt _ _ hij] + simp only [Fin.val_castSucc, Fin.val_pred] + omega + have he := congrArg (fun k => (-1 : ℤ) ^ k) hs + rw [pow_succ, mul_neg_one] at he + exact (neg_eq_iff_eq_neg).mp he + · have hle : i ≤ j.castSucc := le_of_not_gt hij + have hs : (i.succAbove j).val + (j.predAbove i).val = i.val + j.val + 1 := by + rw [Fin.succAbove_of_le_castSucc _ _ hle, Fin.predAbove_of_le_castSucc _ _ hle] + simp only [Fin.val_succ, Fin.coe_castPred] + omega + rw [hs, pow_succ, mul_neg_one] + +/-- Alternating double deletion vanishes on each nondegenerate simplex. -/ +theorem differential_squared_basis {m p : ℕ} (s : Basis m (p + 2)) : + differential m p (differentialBasis m (p + 1) s) = 0 := by + classical + let term (ij : Fin (p + 3) × Fin (p + 2)) : Chains m p := + ((-1 : ℤ) ^ (ij.1.val + ij.2.val)) • + Finsupp.single (deleteVertex (deleteVertex s ij.1) ij.2) 1 + have hsum : (∑ ij, term ij) = 0 := by + apply Finset.sum_ninvolution swapDeletion + · rintro ⟨i, j⟩ + dsimp [term, swapDeletion] + rw [deleteVertex_swap, deletion_sign, neg_smul] + exact add_neg_cancel _ + · rintro ⟨i, j⟩ _ he + have hi := congrArg Prod.fst he + exact Fin.succAbove_ne i j hi + · intro ij + exact Finset.mem_univ _ + · exact swapDeletion_involutive + rw [differentialBasis, map_sum] + simp_rw [differential_single, differentialBasis, Finset.smul_sum, Finsupp.smul_single, + smul_eq_mul, ← pow_add] + simpa only [Fintype.sum_prod_type, term, Finsupp.smul_single, smul_eq_mul, mul_one] + using hsum + +/-- The concrete normalized differential squares to zero, without hypotheses. -/ +theorem boundarySquared (m : ℕ) : BoundarySquared m := by + intro p x + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp [differential_squared_basis] + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Initial support of positive normalized simplex chains + +An extremal first vertex detects a nonzero boundary of any positive chain +that leaves an initial segment, detecting initial-face support without +a composition-generation hypothesis. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- Deleting a non-first vertex leaves the first vertex unchanged. -/ +theorem deleteVertex_first_of_ne_zero {m p : ℕ} (s : Basis m (p + 1)) + (i : Fin (p + 2)) (hi : i ≠ 0) : deleteVertex s i 0 = s 0 := by + change s (i.succAbove 0) = s 0 + rw [Fin.succAbove_ne_zero_zero hi] + +/-- No vertex of a face lies above the original final vertex. -/ +theorem deleteVertex_last_le {m p : ℕ} (s : Basis m (p + 1)) (i : Fin (p + 2)) : + deleteVertex s i (Fin.last p) ≤ s (Fin.last (p + 1)) := + s.monotone (Fin.le_last _) + +/-- At the face obtained by deleting the first vertex of b, only the first +face of a simplex starting no later than b can contribute. -/ +theorem differentialBasis_at_first_face {m p : ℕ} (s b : Basis m (p + 1)) + (hs : s 0 ≤ b 0) : + differentialBasis m p s (deleteVertex b 0) = + Finsupp.single (deleteVertex s 0) (1 : ℤ) (deleteVertex b 0) := by + classical + unfold differentialBasis + rw [Finsupp.finsetSum_apply] + rw [Finset.sum_eq_single 0] + · simp only [Fin.val_zero, pow_zero] + · intro i _ hi + have hne : deleteVertex s i ≠ deleteVertex b 0 := by + intro he + have he0 := congrArg (fun t : Basis m p => t 0) he + rw [deleteVertex_first_of_ne_zero s i hi] at he0 + have hb : b 0 < deleteVertex b 0 0 := + b.strictMono (Fin.succ_pos (0 : Fin (p+1))) + exact (not_lt_of_ge hs) (hb.trans_eq he0.symm) + exact Finsupp.single_eq_of_ne hne.symm + · intro h + exact False.elim (h (Finset.mem_univ _)) + +/-- A face of a simplex lying below q also lies below q. -/ +theorem differentialBasis_zero_above {m p : ℕ} (s : Basis m (p + 1)) + (t : Basis m p) (q : Fin (m + 1)) + (hs : s (Fin.last (p+1)) ≤ q) (ht : q < t (Fin.last p)) : + differentialBasis m p s t = 0 := by + classical + unfold differentialBasis + rw [Finsupp.finsetSum_apply] + apply Finset.sum_eq_zero + intro i _ + apply Finsupp.single_eq_of_ne + intro he + have hl := deleteVertex_last_le s i + rw [← he] at hl + exact (not_le_of_gt ht) (hl.trans hs) + +/-- Support in an initial segment is detected by the differential on positive +chains of positive degree. -/ +theorem positive_support_below_of_boundary {m p : ℕ} (q : Fin (m + 1)) + (c : Chains m (p + 1)) (hc : c ∈ positive m (p + 1)) + (hd : ∀ t : Basis m p, q < t (Fin.last p) → differential m p c t = 0) : + ∀ b : Basis m (p + 1), q < b (Fin.last (p + 1)) → c b = 0 := by + classical + intro b hb + by_contra hcb + let S := c.support.filter (fun s => q < s (Fin.last (p+1))) + have hS : S.Nonempty := ⟨b, Finset.mem_filter.mpr ⟨Finsupp.mem_support_iff.mpr hcb, hb⟩⟩ + obtain ⟨a, ha, hmax⟩ := S.exists_max_image (fun s => s 0) hS + have hac : a ∈ c.support := (Finset.mem_filter.mp ha).1 + have haq : q < a (Fin.last (p+1)) := (Finset.mem_filter.mp ha).2 + let t := deleteVertex a 0 + have hat : q < t (Fin.last p) := haq + have hnonneg (s : Basis m (p+1)) (hs : s ∈ c.support) : + 0 ≤ differentialBasis m p s t := by + by_cases hsq : q < s (Fin.last (p+1)) + · have hs0 : s 0 ≤ a 0 := hmax s (Finset.mem_filter.mpr ⟨hs, hsq⟩) + rw [differentialBasis_at_first_face s a hs0, Finsupp.single_apply] + split_ifs <;> omega + · rw [differentialBasis_zero_above s t q (le_of_not_gt hsq) hat] + have heval : differential m p c t = + ∑ s ∈ c.support, c s * differentialBasis m p s t := by + simp only [differential, Finsupp.linearCombination_apply, Finsupp.sum, + Finsupp.finsetSum_apply, Finsupp.smul_apply, smul_eq_mul] + have hsum : c a * differentialBasis m p a t ≤ + ∑ s ∈ c.support, c s * differentialBasis m p s t := + Finset.single_le_sum (fun s hs => mul_nonneg (hc s) (hnonneg s hs)) hac + have hapos : 0 < c a := lt_of_le_of_ne (hc a) (Ne.symm (Finsupp.mem_support_iff.mp hac)) + have hself : differentialBasis m p a t = 1 := by + rw [differentialBasis_at_first_face a a le_rfl, Finsupp.single_eq_same] + rw [hself, mul_one, ← heval, hd t hat] at hsum + exact (not_le_of_gt hapos) hsum + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Final support of positive simplex chains + +The last face has a dimension-dependent sign. Multiplying the boundary +coefficient by this sign makes an extremal last vertex detect every +positive chain leaving a final segment. This is the cosieve counterpart +of the checked initial-support argument. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- Deleting a non-last vertex leaves the last vertex unchanged. -/ +theorem deleteVertex_last_of_ne_last {m p : ℕ} (s : Basis m (p + 1)) + (i : Fin (p + 2)) (hi : i ≠ Fin.last (p + 1)) : + deleteVertex s i (Fin.last p) = s (Fin.last (p + 1)) := by + change s (i.succAbove (Fin.last p)) = _ + rw [Fin.succAbove_ne_last_last hi] + +theorem deleteVertex_first_ge {m p : ℕ} (s : Basis m (p + 1)) (i : Fin (p + 2)) : + s 0 ≤ deleteVertex s i 0 := s.monotone (Fin.zero_le _) + +/-- At an extremal last face, all other face coefficients vanish. -/ +theorem differentialBasis_at_last_face {m p : ℕ} (s b : Basis m (p + 1)) + (hs : b (Fin.last (p + 1)) ≤ s (Fin.last (p + 1))) : + differentialBasis m p s (deleteVertex b (Fin.last (p + 1))) = + Finsupp.single (deleteVertex s (Fin.last (p + 1))) ((-1 : ℤ) ^ (p + 1)) + (deleteVertex b (Fin.last (p + 1))) := by + classical + unfold differentialBasis + rw [Finsupp.finsetSum_apply] + rw [Finset.sum_eq_single (Fin.last (p + 1))] + · rfl + · intro i _ hi + have hne : deleteVertex s i ≠ deleteVertex b (Fin.last (p + 1)) := by + intro he + have he0 := congrArg (fun t : Basis m p => t (Fin.last p)) he + rw [deleteVertex_last_of_ne_last s i hi] at he0 + have hb : deleteVertex b (Fin.last (p + 1)) (Fin.last p) < b (Fin.last (p + 1)) := by + change b ((Fin.last (p + 1)).succAbove (Fin.last p)) < _ + rw [Fin.succAbove_last] + exact b.strictMono (Fin.castSucc_lt_last _) + exact (not_lt_of_ge hs) (he0 ▸ hb) + exact Finsupp.single_eq_of_ne hne.symm + · intro h + exact False.elim (h (Finset.mem_univ _)) + +/-- A simplex in a final segment has no boundary below the segment. -/ +theorem differentialBasis_zero_below {m p : ℕ} (s : Basis m (p + 1)) + (t : Basis m p) (q : Fin (m + 1)) (hs : q ≤ s 0) (ht : t 0 < q) : + differentialBasis m p s t = 0 := by + classical + unfold differentialBasis + rw [Finsupp.finsetSum_apply] + apply Finset.sum_eq_zero + intro i _ + apply Finsupp.single_eq_of_ne + intro he + have hl := deleteVertex_first_ge s i + rw [← he] at hl + exact (not_le_of_gt ht) (hs.trans hl) + +private theorem sign_square (p : ℕ) : ((-1 : ℤ) ^ p) * ((-1 : ℤ) ^ p) = 1 := by + rw [← mul_pow] + simp + +/-- The boundary detects final support of every positive chain. -/ +theorem positive_support_above_of_boundary {m p : ℕ} (q : Fin (m + 1)) + (c : Chains m (p + 1)) (hc : c ∈ positive m (p + 1)) + (hd : ∀ t : Basis m p, t 0 < q → differential m p c t = 0) : + ∀ b : Basis m (p + 1), b 0 < q → c b = 0 := by + classical + intro b hb + by_contra hcb + let S := c.support.filter (fun s => s 0 < q) + have hS : S.Nonempty := ⟨b, Finset.mem_filter.mpr ⟨Finsupp.mem_support_iff.mpr hcb, hb⟩⟩ + obtain ⟨a, ha, hmin⟩ := S.exists_min_image (fun s => s (Fin.last (p + 1))) hS + have hac : a ∈ c.support := (Finset.mem_filter.mp ha).1 + have haq : a 0 < q := (Finset.mem_filter.mp ha).2 + let t := deleteVertex a (Fin.last (p + 1)) + have hat : t 0 < q := by + change a ((Fin.last (p + 1)).succAbove 0) < q + rw [Fin.succAbove_last] + exact haq + let σ : ℤ := (-1) ^ (p + 1) + have hnonneg (s : Basis m (p + 1)) (hs : s ∈ c.support) : + 0 ≤ σ * differentialBasis m p s t := by + by_cases hsq : s 0 < q + · have hslast : a (Fin.last (p + 1)) ≤ s (Fin.last (p + 1)) := + hmin s (Finset.mem_filter.mpr ⟨hs, hsq⟩) + rw [differentialBasis_at_last_face s a hslast, Finsupp.single_apply] + split_ifs + · exact (sign_square (p + 1)).symm ▸ (by norm_num : (0 : ℤ) ≤ 1) + · simp + · rw [differentialBasis_zero_below s t q (le_of_not_gt hsq) hat, mul_zero] + have heval : σ * differential m p c t = + ∑ s ∈ c.support, c s * (σ * differentialBasis m p s t) := by + simp only [differential, Finsupp.linearCombination_apply, Finsupp.sum, + Finsupp.finsetSum_apply, Finsupp.smul_apply, smul_eq_mul, Finset.mul_sum] + apply Finset.sum_congr rfl + intro s _ + ring + have hsum : c a * (σ * differentialBasis m p a t) ≤ + ∑ s ∈ c.support, c s * (σ * differentialBasis m p s t) := + Finset.single_le_sum (fun s hs => mul_nonneg (hc s) (hnonneg s hs)) hac + have hapos : 0 < c a := lt_of_le_of_ne (hc a) (Ne.symm (Finsupp.mem_support_iff.mp hac)) + have hself : σ * differentialBasis m p a t = 1 := by + rw [differentialBasis_at_last_face a a le_rfl, Finsupp.single_eq_same] + exact sign_square (p + 1) + rw [hself, mul_one, ← heval, hd t hat, mul_zero] at hsum + exact (not_le_of_gt hapos) hsum + +end Thomason.Construction.SimplexComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/FiniteChainMesh.lean b/lean/OAI/CategoryTheory/Thomason/Chains/FiniteChainMesh.lean new file mode 100644 index 0000000000000000000000000000000000000000..d87c2ce1d9300770f28c621c9a3a9fab1989779f --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/FiniteChainMesh.lean @@ -0,0 +1,468 @@ +import OAI.CategoryTheory.Thomason.GlobularComplexes +import OAI.CategoryTheory.Thomason.Gray.SimplicialHomotopyWhiskering +import OAI.CategoryTheory.Thomason.Simplicial.CanonicalExtensionAnodyneHorn +import OAI.CategoryTheory.Thomason.Simplicial.CanonicalExtensionCartesian +import OAI.CategoryTheory.Thomason.Simplicial.ConstructedExtensionLocalizer +import OAI.CategoryTheory.Thomason.Simplicial.SubdivisionWeakLifting +import OAI.CategoryTheory.Thomason.Transfer.FiniteEmptyAttachmentFibers + +namespace OAI + +section + +/-! # From chain-valued vertex labels to a simplicial map + +Labels need not be monotone. It suffices that they send comparable +vertices to comparable vertices: taking the greatest label on each face +then gives a monotone map on the finite-chain poset. +-/ + +namespace Thomason.Construction.ChainLabelApproximation + +open CategoryTheory PartialOrder +open scoped Simplicial + +noncomputable section + +def greatest {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) : P := + ((ChainOrdinal.choose C).enum (Fin.last (ChainOrdinal.choose C).dim)).val + +theorem greatest_mem {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) : + greatest C ∈ C.finset := + ((ChainOrdinal.choose C).enum (Fin.last (ChainOrdinal.choose C).dim)).property + +theorem le_greatest {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) + (x : P) (hx : x ∈ C.finset) : x ≤ greatest C := by + obtain ⟨i, hi⟩ := (ChainOrdinal.choose C).enum.surjective ⟨x, hx⟩ + have h := (ChainOrdinal.choose C).enum.monotone (Fin.le_last i) + change ((ChainOrdinal.choose C).enum i).val ≤ greatest C at h + simpa only [hi] using h + +theorem greatest_monotone {P : Type} [PartialOrder P] : + Monotone (greatest (P := P)) := by + intro C D hCD + exact le_greatest D _ (hCD (greatest_mem C)) + +def greatestHom {P : Type} [PartialOrder P] : NonemptyFiniteChains P →o P := + ⟨greatest, greatest_monotone⟩ + +theorem greatest_map {P R : Type} [PartialOrder P] [PartialOrder R] + (f : P →o R) (C : NonemptyFiniteChains P) : + greatest (C.map f) = f (greatest C) := by + apply le_antisymm + · obtain ⟨x, hx, he⟩ := (NonemptyFiniteChains.mem_map_iff C f _).mp + (greatest_mem (C.map f)) + rw [← he] + exact f.monotone (le_greatest C x hx) + · exact le_greatest (C.map f) _ ((NonemptyFiniteChains.mem_map_iff C f _).mpr + ⟨greatest C, greatest_mem C, rfl⟩) + +theorem greatest_eq_chainMaximum {P : Type} [LinearOrder P] (C : NonemptyFiniteChains P) : + greatest C = chainMaximum C := by + apply le_antisymm + · exact Finset.le_max' C.finset _ (greatest_mem C) + · exact le_greatest C _ (Finset.max'_mem C.finset C.nonempty) + +def MapsChains {Q P : Type} [PartialOrder Q] [PartialOrder P] (label : Q → P) : Prop := + ∀ ⦃x y⦄, x ≤ y → label x ≤ label y ∨ label y ≤ label x + +def labelChain {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) (C : NonemptyFiniteChains Q) : + NonemptyFiniteChains P where + finset := by classical exact C.finset.image label + nonempty := by classical exact C.nonempty.image label + comparable := by + classical + rintro ⟨x, hx⟩ ⟨y, hy⟩ + obtain ⟨a, ha, rfl⟩ := Finset.mem_image.mp hx + obtain ⟨b, hb, rfl⟩ := Finset.mem_image.mp hy + rcases C.comparable ⟨a, ha⟩ ⟨b, hb⟩ with hab | hba + · exact hlabel hab + · exact (hlabel hba).symm + +theorem labelChain_monotone {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) : Monotone (labelChain label hlabel) := by + classical + intro C D hCD + exact Finset.image_subset_image hCD + +def greatestLabel {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) : NonemptyFiniteChains Q →o P := + greatestHom.comp ⟨labelChain label hlabel, labelChain_monotone label hlabel⟩ + +theorem greatestLabel_mem {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) (C : NonemptyFiniteChains Q) : + ∃ q ∈ C.finset, label q = greatestLabel label hlabel C := by + classical + exact Finset.mem_image.mp (greatest_mem (labelChain label hlabel C)) + +theorem greatestLabel_of_monotone {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q →o P) (C : NonemptyFiniteChains Q) : + greatestLabel label (fun _ _ h => Or.inl (label.monotone h)) C = label (greatest C) := by + have he : labelChain label (fun _ _ h => Or.inl (label.monotone h)) C = C.map label := by + apply NonemptyFiniteChains.ext + rfl + change greatest (labelChain label (fun _ _ h => Or.inl (label.monotone h)) C) = _ + rw [he, greatest_map] + +def nerveMapOfLabels {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) : + nerve (NonemptyFiniteChains Q) ⟶ nerve P := + nerveMap (greatestLabel label hlabel).monotone.functor + +def subdivisionMapOfLabels {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) : SSet.sd.obj (nerve Q) ⟶ nerve P := + NerveSubdivisionMap.map Q ≫ nerveMapOfLabels label hlabel + +/-- All output vertices of a chain simplex are labels of vertices in its +greatest source face. This is the finite carrier needed for approximation. -/ +theorem nerveMapOfLabels_carrier {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) (d : SimplexCategoryᵒᵖ) + (s : (nerve (NonemptyFiniteChains Q)).obj d) (i : Fin (d.unop.len+1)) : + ∃ q ∈ (s.obj (Fin.last d.unop.len)).finset, + label q = ((nerveMapOfLabels label hlabel).app d s).obj i := by + obtain ⟨q, hq, he⟩ := greatestLabel_mem label hlabel (s.obj i) + refine ⟨q, ?_, he⟩ + exact leOfHom (s.map (homOfLE (Fin.le_last i))) hq + +theorem vertices_factor {P : Type} [PartialOrder P] {n : SimplexCategory} + (f : SSet.stdSimplex.obj n ⟶ nerve P) : + (simplexNerveIso.app n).inv ≫ f = + nerveMap (NerveSubdivisionMap.vertices f).monotone.functor := by + let e : SSet.stdSimplex.obj n ≅ nerve (ULift.{0} (Fin (n.len+1))) := simplexNerveIso.app n + change e.inv ≫ f = _ + have hf : f = e.hom ≫ + nerveMap (NerveSubdivisionMap.vertices f).monotone.functor := by + apply SSet.yonedaEquiv.injective + apply nerve.ext_of_isThin + funext i + rfl + calc + e.inv ≫ f = e.inv ≫ (e.hom ≫ + nerveMap (NerveSubdivisionMap.vertices f).monotone.functor) := + congrArg (e.inv ≫ ·) hf + _ = _ := e.inv_hom_id_assoc _ + +theorem piece_greatest {P : Type} [PartialOrder P] {n : SimplexCategory} + (f : SSet.stdSimplex.obj n ⟶ nerve P) : + NerveSubdivisionMap.piece f ≫ nerveMap (greatestHom (P := P)).monotone.functor = + lastVertex.app (SSet.stdSimplex.obj n) ≫ f := by + let e : SSet.stdSimplex.obj n ≅ nerve (ULift.{0} (Fin (n.len+1))) := simplexNerveIso.app n + let d : SSet.sd.obj (SSet.stdSimplex.obj n) ≅ + nerve (NonemptyFiniteChains (ULift.{0} (Fin (n.len+1)))) := SSet.stdSimplex.sdIso.app n + let v := NerveSubdivisionMap.vertices f + let m : NonemptyFiniteChains (ULift.{0} (Fin (n.len+1))) →o ULift.{0} (Fin (n.len+1)) := + chainMaximumHom + have hp : nerveMap (NonemptyFiniteChains.orderHomMap v).monotone.functor ≫ + nerveMap (greatestHom (P := P)).monotone.functor = + nerveMap m.monotone.functor ≫ nerveMap v.monotone.functor := by + rw [← orderNerveMap_comp, ← orderNerveMap_comp] + apply congrArg (fun g : NonemptyFiniteChains (ULift.{0} (Fin (n.len+1))) →o P => + nerveMap g.monotone.functor) + apply DFunLike.ext + intro C + exact (greatest_map v C).trans (congrArg v (greatest_eq_chainMaximum C)) + have hv : e.inv ≫ f = nerveMap v.monotone.functor := vertices_factor f + have hd : d.hom ≫ nerveMap m.monotone.functor ≫ e.inv = + lastVertex.app (SSet.stdSimplex.obj n) := lastVertex_standard_formula n + calc + _ = d.hom ≫ (nerveMap (NonemptyFiniteChains.orderHomMap v).monotone.functor ≫ + nerveMap (greatestHom (P := P)).monotone.functor) := Category.assoc _ _ _ + _ = d.hom ≫ (nerveMap m.monotone.functor ≫ nerveMap v.monotone.functor) := + congrArg (d.hom ≫ ·) hp + _ = d.hom ≫ (nerveMap m.monotone.functor ≫ (e.inv ≫ f)) := + congrArg (fun q => d.hom ≫ (nerveMap m.monotone.functor ≫ q)) hv.symm + _ = (d.hom ≫ nerveMap m.monotone.functor ≫ e.inv) ≫ f := by + simp only [Category.assoc] + _ = _ := congrArg (· ≫ f) hd + +/-- The greatest-face map agrees with the last-vertex map on subdivision. -/ +theorem subdivision_greatest_eq_lastVertex (P : Type) [PartialOrder P] : + NerveSubdivisionMap.map P ≫ nerveMap (greatestHom (P := P)).monotone.functor = + lastVertex.app (nerve P) := by + apply (SimplicialHomotopyDescent.isColimit SSet.sd (nerve P)).hom_ext + intro j + change SSet.sd.map j.hom ≫ (NerveSubdivisionMap.map P ≫ + nerveMap (greatestHom (P := P)).monotone.functor) = + SSet.sd.map j.hom ≫ lastVertex.app (nerve P) + rw [← Category.assoc, NerveSubdivisionMap.map_fac, piece_greatest] + exact (lastVertex.naturality j.hom).symm + +theorem greatest_nerveMap_weak (P : Type) [PartialOrder P] [Finite P] : + realizationWeakEquivalences (nerveMap (greatestHom (P := P)).monotone.functor) := by + apply realizationWeakEquivalences.of_precomp (NerveSubdivisionMap.iso P).hom _ + (realizationWeakEquivalences.of_isIso _) + change realizationWeakEquivalences + (NerveSubdivisionMap.map P ≫ nerveMap (greatestHom (P := P)).monotone.functor) + rw [subdivision_greatest_eq_lastVertex] + exact lastVertex_weak _ + +end + +end Thomason.Construction.ChainLabelApproximation + +end + +section + +/-! # Comparing label approximations with a prescribed monotone map + +A bound on every label gives a bound on the greatest label of each chain. +The resulting inequality gives a simplicial homotopy on subdivision +through its comparison with the chain nerve. +-/ + +namespace Thomason.Construction.ChainLabelApproximation + +open CategoryTheory PartialOrder +open scoped Simplicial + +noncomputable section + +variable {Q P : Type} [PartialOrder Q] [PartialOrder P] + (label : Q → P) (hlabel : MapsChains label) + +/-- Every bound on the labels of a face bounds its greatest label. -/ +theorem greatestLabel_le (C : NonemptyFiniteChains Q) (b : P) + (h : ∀ q ∈ C.finset, label q ≤ b) : greatestLabel label hlabel C ≤ b := by + obtain ⟨q, hq, he⟩ := greatestLabel_mem label hlabel C + rw [← he] + exact h q hq + +/-- A prescribed monotone carrier upper bound gives the comparison +homotopy without requiring the labels themselves to be monotone. -/ +def nerveMapOfLabelsCarrierHomotopy (g : NonemptyFiniteChains Q →o P) + (h : ∀ C, ∀ q ∈ C.finset, label q ≤ g C) : + SSet.Homotopy (nerveMapOfLabels label hlabel) (nerveMap g.monotone.functor) := + orderNerveHomotopy (greatestLabel label hlabel) g + (fun C => greatestLabel_le label hlabel C (g C) (h C)) + +/-- A pointwise comparison propagates to the chain-valued approximation. -/ +theorem greatestLabel_le_comp_greatest (g : Q →o P) (h : ∀ q, label q ≤ g q) + (C : NonemptyFiniteChains Q) : greatestLabel label hlabel C ≤ g (greatest C) := by + apply greatestLabel_le + intro q hq + exact (h q).trans (g.monotone (le_greatest C q hq)) + +/-- Labels with a common prescribed upper map give a homotopy to that map +composed with the greatest-face comparison. -/ +def nerveMapOfLabelsHomotopy (g : Q →o P) (h : ∀ q, label q ≤ g q) : + SSet.Homotopy (nerveMapOfLabels label hlabel) + (nerveMap (greatestHom (P := Q)).monotone.functor ≫ nerveMap g.monotone.functor) := by + simpa only [nerveMapOfLabels, orderNerveMap_comp] using + (orderNerveHomotopy (greatestLabel label hlabel) (g.comp greatestHom) + (greatestLabel_le_comp_greatest label hlabel g h)) + +/-- The comparison on subdivision has the last-vertex map as its endpoint. -/ +def subdivisionMapOfLabelsHomotopy (g : Q →o P) (h : ∀ q, label q ≤ g q) : + SSet.Homotopy (subdivisionMapOfLabels label hlabel) + (lastVertex.app (nerve Q) ≫ nerveMap g.monotone.functor) := by + have H := whiskerSimplicialHomotopy (NerveSubdivisionMap.map Q) + (nerveMapOfLabelsHomotopy label hlabel g h) (𝟙 _) + simpa only [Category.comp_id, Category.assoc, subdivisionMapOfLabels, + ← subdivision_greatest_eq_lastVertex] using H + +end + +end Thomason.Construction.ChainLabelApproximation + +end + +section + +/-! # The sieve and retracting cosieve of face chains + +For a subset of faces, old chains are those entirely inside the subset. +The containing cosieve consists of chains meeting it. Intersection gives +the required right adjoint; the empty boundary case is included. +-/ + +namespace Thomason.Construction.ChainSieve + +open PartialOrder + +universe u +variable {P : Type u} [PartialOrder P] + +def old (S : Set P) : Set (NonemptyFiniteChains P) := + {c | ∀ x ∈ c.finset, x ∈ S} + +def upper (S : Set P) : Set (NonemptyFiniteChains P) := + {c | ∃ x ∈ c.finset, x ∈ S} + +theorem old_lower (S : Set P) : IsLowerSet (old S) := + fun _ _ h hc => Thomason.Subdivision.oldChains_sieve S h hc + +theorem upper_upper (S : Set P) : IsUpperSet (upper S) := + fun _ _ h hc => Thomason.Subdivision.meetingChains_cosieve S h hc + +theorem old_subset_upper (S : Set P) : old S ⊆ upper S := by + intro c hc + obtain ⟨x, hx⟩ := c.nonempty + exact ⟨x, hx, hc x hx⟩ + +noncomputable def intersection (S : Set P) (c : upper S) : NonemptyFiniteChains P := + (Thomason.Subdivision.chainIntersection S c).val + +theorem intersection_old (S : Set P) (c : upper S) : intersection S c ∈ old S := + (Thomason.Subdivision.chainIntersection S c).property + +theorem intersection_upper (S : Set P) (c : upper S) : intersection S c ∈ upper S := + old_subset_upper S (intersection_old S c) + +/-- The face-chain inclusion retracts on precisely the chains meeting the +old faces, with the order adjunction. -/ +noncomputable def retraction (S : Set P) : + SieveRetraction {c : upper S | c.val ∈ old S} where + lower := by + intro c d hcd hd + exact old_lower S hcd hd + rightAdjoint := + { toFun := fun c => ⟨⟨intersection S c, intersection_upper S c⟩, intersection_old S c⟩ + monotone' := by + classical + intro c d hcd x hx + exact Finset.mem_filter.mpr ⟨hcd (Finset.mem_filter.mp hx).1, + (Finset.mem_filter.mp hx).2⟩ } + adjunction := by + classical + intro a c + constructor + · intro hac x hx + exact Finset.mem_filter.mpr ⟨hac hx, a.property x hx⟩ + · intro hac x hx + exact (Finset.mem_filter.mp (hac hx)).1 + +end Thomason.Construction.ChainSieve + +end + +section + +/-! # Chains in a subposet and chains supported in it + +This identifies the source of the twice-subdivided attaching map with the +sieve of supported chains in the attachment comparison. +-/ + +namespace Thomason.Construction.ChainSieve + +open PartialOrder + +variable {P : Type} [PartialOrder P] + +noncomputable def chainInclusion (S : Set P) : NonemptyFiniteChains S →o old S := + (Thomason.Subdivision.chainsSubtypeOrderIso S).toOrderEmbedding.toOrderHom + +noncomputable def restrict (S : Set P) (c : old S) : NonemptyFiniteChains S := + (Thomason.Subdivision.chainsSubtypeOrderIso S).symm c + +noncomputable def subsetIso (S : Set P) : NonemptyFiniteChains S ≃o old S := + Thomason.Subdivision.chainsSubtypeOrderIso S + +/-- The identification commutes with the original chain inclusion. -/ +theorem subsetIso_inclusion (S : Set P) : + (subposetInclusion (old S)).comp (subsetIso S).toOrderEmbedding.toOrderHom = + NonemptyFiniteChains.orderHomMap (subposetInclusion S) := rfl + +end Thomason.Construction.ChainSieve + +end + +section + +/-! # Barycentric contraction of the mesh of a finite poset + +Comparable face barycenters retain a common original vertex with a +uniform positive mass. The dimension bound gives one contraction factor +which remains valid on every subsequent chain-poset stage. +-/ + +namespace Thomason.Construction.SubdivisionBarycentric + +open PartialOrder Convexity + +noncomputable section + +def chainDistribution {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) : + StdSimplex ℝ P := StdSimplex.subBarycenter C.finset C.nonempty + +theorem chainDistribution_weight {P : Type} [PartialOrder P] [DecidableEq P] + (C : NonemptyFiniteChains P) (i : P) : + (chainDistribution C).weights i = if i ∈ C.finset then (C.finset.card : ℝ)⁻¹ else 0 := by + classical + simp [chainDistribution, StdSimplex.weights_subBarycenter, Finsupp.coe_finsetSum, + Finset.sum_apply, Finsupp.single_apply, eq_comm] + +theorem chainDistribution_lower {P : Type} [PartialOrder P] {N : ℕ} + (hP : ChainCardBound P N) (C : NonemptyFiniteChains P) (v : P) (hv : v ∈ C.finset) : + 1 / ((N : ℝ)+1) ≤ (chainDistribution C).weights v := by + classical + rw [chainDistribution_weight, ite_eq_left hv, ← one_div] + apply one_div_le_one_div_of_le + · exact_mod_cast Finset.card_pos.mpr C.nonempty + · exact_mod_cast hP C + +def chainAverage {P : Type} [PartialOrder P] [Fintype P] {d : ℕ} + (x : P → Fin d → ℝ) (C : NonemptyFiniteChains P) : Fin d → ℝ := + fun j => finiteAffineValue (fun i => x i j) (chainDistribution C) + +def ChainMesh {P : Type} [PartialOrder P] {d : ℕ} (x : P → Fin d → ℝ) (D : ℝ) : Prop := + ∀ i j, (i ≤ j ∨ j ≤ i) → dist (x i) (x j) ≤ D + +theorem chainAverage_dist_of_le {P : Type} [PartialOrder P] [Fintype P] + {N d : ℕ} (hP : ChainCardBound P N) (x : P → Fin d → ℝ) + (D : ℝ) (hD : 0 ≤ D) (hx : ChainMesh x D) + (A B : NonemptyFiniteChains P) (hAB : A ≤ B) : + dist (chainAverage x A) (chainAverage x B) ≤ (1-1/((N : ℝ)+1))*D := by + classical + have hρ : 0 ≤ 1-1/((N : ℝ)+1) := by + apply sub_nonneg.mpr + apply (div_le_one (by positivity : (0 : ℝ) < (N : ℝ)+1)).mpr + linarith [Nat.cast_nonneg (α := ℝ) N] + obtain ⟨v, hv⟩ := A.nonempty + have hvB : v ∈ B.finset := hAB hv + apply (dist_pi_le_iff (mul_nonneg hρ hD)).mpr + intro j + obtain ⟨a, ha, hmin⟩ := Finset.exists_min_image B.finset (fun i => x i j) B.nonempty + obtain ⟨b, hb, hmax⟩ := Finset.exists_max_image B.finset (fun i => x i j) B.nonempty + have hbounds (i : P) (hi : i ∈ B.finset) : x a j ≤ x i j ∧ x i j ≤ x b j := + ⟨hmin i hi, hmax i hi⟩ + have hwidth : x b j-x a j ≤ D := by + calc + _ ≤ |x b j-x a j| := le_abs_self _ + _ = dist (x b j) (x a j) := (Real.dist_eq _ _).symm + _ ≤ dist (x b) (x a) := dist_le_pi_dist (x b) (x a) j + _ ≤ D := hx b a (B.comparable ⟨b, hb⟩ ⟨a, ha⟩) + have hsupport (C : NonemptyFiniteChains P) (hCB : C ≤ B) + (i : P) (hi : (chainDistribution C).weights i ≠ 0) : + x a j ≤ x i j ∧ x i j ≤ x b j := by + apply hbounds i + apply hCB + by_contra hn + exact hi (by rw [chainDistribution_weight, ite_eq_right hn]) + change |finiteAffineValue (fun i => x i j) (chainDistribution A) - + finiteAffineValue (fun i => x i j) (chainDistribution B)| ≤ _ + exact (supported_common_mass_dist (fun i => x i j) (chainDistribution A) + (chainDistribution B) v (1/((N : ℝ)+1)) (x a j) (x b j) + (chainDistribution_lower hP A v hv) (chainDistribution_lower hP B v hvB) + (hbounds v hvB) (hsupport A hAB) (hsupport B le_rfl)).trans + (mul_le_mul_of_nonneg_left hwidth hρ) + +theorem chainMesh_average {P : Type} [PartialOrder P] [Fintype P] + {N d : ℕ} (hP : ChainCardBound P N) (x : P → Fin d → ℝ) + (D : ℝ) (hD : 0 ≤ D) (hx : ChainMesh x D) : + ChainMesh (chainAverage x) ((1-1/((N : ℝ)+1))*D) := by + intro A B hAB + rcases hAB with hAB | hBA + · exact chainAverage_dist_of_le hP x D hD hx A B hAB + · rw [dist_comm] + exact chainAverage_dist_of_le hP x D hD hx B A hBA + +end + +end Thomason.Construction.SubdivisionBarycentric + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/HornChainRetraction.lean b/lean/OAI/CategoryTheory/Thomason/Chains/HornChainRetraction.lean new file mode 100644 index 0000000000000000000000000000000000000000..e5f31da64f5a653a00509ce1406f343caa63b418 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/HornChainRetraction.lean @@ -0,0 +1,144 @@ +import OAI.CategoryTheory.Thomason.Simplicial.FaceSimplexLift +import OAI.CategoryTheory.Thomason.Simplicial.FiniteRelativeRealizationLifting + +namespace OAI + +section + +/-! # A second-subdivision retraction into the first-subdivided horn + +For a chain of faces, keep the maxima of its horn faces. If an excluded +face occurs, add the distinguished horn vertex. On chains entirely in the +horn this is exactly the image under the original last-vertex operation. +-/ + +namespace Thomason.Construction.HornChainRetraction + +open PartialOrder SubdivisionHornFaces +open scoped Classical + +noncomputable section + +def good (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : Finset (Faces n) := + C.finset.filter (fun A => A ∈ hornFaceSet n k) + +def bad (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : Prop := + ∃ A ∈ C.finset, A ∉ hornFaceSet n k + +def imageVertices (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : + Finset (ULift.{0} (Fin (n+2))) := + (good n k C).image chainMaximum ∪ if bad n k C then {ULift.up k} else ∅ + +theorem good_mem {n : ℕ} {k : Fin (n+2)} {C : NonemptyFiniteChains (Faces n)} {A : Faces n} : + A ∈ good n k C ↔ A ∈ C.finset ∧ A ∈ hornFaceSet n k := Finset.mem_filter + +theorem imageVertices_nonempty (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : + (imageVertices n k C).Nonempty := by + obtain ⟨A, hA⟩ := C.nonempty + by_cases hg : A ∈ hornFaceSet n k + · exact ⟨chainMaximum A, Finset.mem_union_left _ + (Finset.mem_image.mpr ⟨A, good_mem.mpr ⟨hA, hg⟩, rfl⟩)⟩ + · have hb : bad n k C := ⟨A, hA, hg⟩ + refine ⟨ULift.up k, Finset.mem_union_right _ ?_⟩ + simp only [hb, ↓reduceIte, Finset.mem_singleton] + +theorem good_greatest (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) + (h : (good n k C).Nonempty) : + ∃ M ∈ good n k C, ∀ A ∈ good n k C, A ≤ M := by + obtain ⟨M, hM, hm⟩ := Finset.exists_max_image (good n k C) (fun A => A.finset.card) h + refine ⟨M, hM, fun A hA => ?_⟩ + rcases C.comparable ⟨A, (good_mem.mp hA).1⟩ ⟨M, (good_mem.mp hM).1⟩ with hle | hle + · exact hle + · have he : M.finset = A.finset := Finset.eq_of_subset_of_card_le hle (hm A hA) + exact he.symm.le + +theorem imageVertices_omits (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : + ∃ j : Fin (n+2), j ≠ k ∧ ULift.up j ∉ imageVertices n k C := by + by_cases hg : (good n k C).Nonempty + · obtain ⟨M, hM, hm⟩ := good_greatest n k C hg + obtain ⟨j, hj, hnot⟩ := (hornFaceSet_iff n k M).mp (good_mem.mp hM).2 + refine ⟨j, hj, ?_⟩ + intro hv + rcases Finset.mem_union.mp hv with hv | hv + · obtain ⟨A, hA, he⟩ := Finset.mem_image.mp hv + apply hnot + apply hm A hA + rw [← he] + exact Finset.max'_mem A.finset A.nonempty + · by_cases hb : bad n k C + · simp only [hb, ↓reduceIte, Finset.mem_singleton] at hv + exact hj (congrArg ULift.down hv) + · simp only [hb, ↓reduceIte, Finset.notMem_empty] at hv + · have he : good n k C = ∅ := Finset.not_nonempty_iff_eq_empty.mp hg + have hne : ∃ j : Fin (n+2), j ≠ k := by + by_cases hk : k = 0 + · refine ⟨⟨1, by omega⟩, ?_⟩ + intro h + have hh := congrArg Fin.val h + rw [hk] at hh + simp at hh + · exact ⟨0, Ne.symm hk⟩ + obtain ⟨j, hj⟩ := hne + refine ⟨j, hj, ?_⟩ + intro hv + rcases Finset.mem_union.mp hv with hv | hv + · simp only [he, Finset.image_empty, Finset.notMem_empty] at hv + · by_cases hb : bad n k C + · simp only [hb, ↓reduceIte, Finset.mem_singleton] at hv + exact hj (congrArg ULift.down hv) + · simp only [hb, ↓reduceIte, Finset.notMem_empty] at hv + +def face (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : Faces n where + finset := imageVertices n k C + nonempty := imageVertices_nonempty n k C + comparable a b := le_total a.val b.val + +theorem face_mem (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) : + face n k C ∈ hornFaceSet n k := + (hornFaceSet_iff n k _).mpr (imageVertices_omits n k C) + +theorem imageVertices_mono (n : ℕ) (k : Fin (n+2)) + {C D : NonemptyFiniteChains (Faces n)} (h : C ≤ D) : + imageVertices n k C ⊆ imageVertices n k D := by + intro x hx + rcases Finset.mem_union.mp hx with hx | hx + · obtain ⟨A, hA, rfl⟩ := Finset.mem_image.mp hx + exact Finset.mem_union_left _ (Finset.mem_image.mpr + ⟨A, good_mem.mpr ⟨h (good_mem.mp hA).1, (good_mem.mp hA).2⟩, rfl⟩) + · by_cases hb : bad n k C + · have hd : bad n k D := by + obtain ⟨A, hA, ha⟩ := hb + exact ⟨A, h hA, ha⟩ + apply Finset.mem_union_right + simpa only [hb, hd, ↓reduceIte] using hx + · simp only [hb, ↓reduceIte, Finset.notMem_empty] at hx + +def retraction (n : ℕ) (k : Fin (n+2)) : + NonemptyFiniteChains (Faces n) →o HornFaces n k where + toFun C := ⟨⟨face n k C, (face_mem n k C).1⟩, (face_mem n k C).2⟩ + monotone' _ _ h := imageVertices_mono n k h + +/-- On old chains no additional vertex is inserted: the operation is +precisely the finite-chain image under the original greatest-vertex map. -/ +theorem retraction_old (n : ℕ) (k : Fin (n+2)) (C : NonemptyFiniteChains (Faces n)) + (hC : ∀ A ∈ C.finset, A ∈ hornFaceSet n k) : + (retraction n k C).val.val = C.map chainMaximumHom := by + apply NonemptyFiniteChains.ext + have hg : good n k C = C.finset := Finset.filter_true_of_mem hC + have hb : ¬ bad n k C := by + rintro ⟨A, hA, ha⟩ + exact ha (hC A hA) + change imageVertices n k C = _ + simp only [imageVertices, hg, hb, ↓reduceIte, Finset.union_empty, + NonemptyFiniteChains.map, chainMaximumHom] + ext x + simp only [Finset.mem_image] + rfl + +end + +end Thomason.Construction.HornChainRetraction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/NerveFaceChains.lean b/lean/OAI/CategoryTheory/Thomason/Chains/NerveFaceChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..fda81754fe950dc88cfc106d46574325f2ae515d --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/NerveFaceChains.lean @@ -0,0 +1,508 @@ +import OAI.CategoryTheory.Thomason.Chains.FiniteChainMesh +import OAI.CategoryTheory.Thomason.Gray.PosetPrismEndpoints +import OAI.CategoryTheory.Thomason.Simplicial.FixedInternalPathMaps +import OAI.CategoryTheory.Thomason.Simplicial.LastVertexWeakEquivalence +import OAI.CategoryTheory.Thomason.Simplicial.PosetSubcomplexHomotopy + +namespace OAI + +section + +/-! # Barycentric subdivision maps for finite poset realizations + +The affine combination of a chain of nonempty faces is supported in its +greatest face. It therefore gives a continuous map to the original +nerve realization, with the expected affine-coordinate compatibility. +-/ + +namespace Thomason.Construction.SubdivisionBarycentric + +open CategoryTheory Convexity PartialOrder + +noncomputable section + +variable (P : Type) [PartialOrder P] [Fintype P] + +local instance : Finite (NonemptyFiniteChains P) := finite_nonemptyFiniteChains P +local instance : Fintype (NonemptyFiniteChains P) := Fintype.ofFinite _ + +def chainPoint (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) : StdSimplex ℝ P := + (StdSimplex.map chainDistribution + (PosetGeometry.coordinates (NonemptyFiniteChains P) z)).sConvexComb + +theorem chainPoint_weight + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) (i : P) : + (chainPoint P z).weights i = + ∑ A : NonemptyFiniteChains P, + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A * + (chainDistribution A).weights i := by + classical + unfold chainPoint + rw [StdSimplex.weights_sConvexComb] + change ((PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights.mapDomain + chainDistribution).sum (fun A r => r • A.weights) i = _ + rw [Finsupp.sum_mapDomain_index (h := fun (A : StdSimplex ℝ P) (r : ℝ) => r • A.weights) + (fun _ => zero_smul ℝ _) (fun _ _ _ => add_smul _ _ _), Finsupp.sum_apply] + exact Finsupp.sum_fintype _ _ (fun _ => zero_mul _) + +theorem chainPoint_support + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) (i : P) + (hi : (chainPoint P z).weights i ≠ 0) : + ∃ A : NonemptyFiniteChains P, + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A ≠ 0 ∧ i ∈ A.finset := by + classical + by_contra hn + push Not at hn + apply hi + rw [chainPoint_weight] + apply Finset.sum_eq_zero + intro A _ + by_cases hA : (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A = 0 + · rw [hA, zero_mul] + · rw [chainDistribution_weight, ite_eq_right (hn A hA), mul_zero] + +theorem chainPoint_chainSupported + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) : + PosetGeometry.ChainSupported (chainPoint P z) := by + intro x hx y hy + obtain ⟨A, hA, hxA⟩ := chainPoint_support P z x (Finsupp.mem_support_iff.mp hx) + obtain ⟨B, hB, hyB⟩ := chainPoint_support P z y (Finsupp.mem_support_iff.mp hy) + have hc := PosetGeometry.coordinates_chainSupported z A + (Finsupp.mem_support_iff.mpr hA) B (Finsupp.mem_support_iff.mpr hB) + rcases hc with hAB | hBA + · exact B.comparable ⟨x, hAB hxA⟩ ⟨y, hyB⟩ + · exact A.comparable ⟨x, hxA⟩ ⟨y, hBA hyB⟩ + +def chainPointMap : + C(SSet.toTop.obj (nerve (NonemptyFiniteChains P)), StdSimplex ℝ P) where + toFun := chainPoint P + continuous_toFun := by + classical + rw [(StdSimplex.isEmbedding_toFun_comp_weights ℝ P).continuous_iff] + apply continuous_pi + intro i + simp only [Function.comp_def, chainPoint_weight] + apply continuous_finsetSum + intro A _ + exact ((StdSimplex.continuous_weights_apply ℝ A).comp + (PosetGeometry.coordinates (NonemptyFiniteChains P)).continuous).mul continuous_const + +def chainRealizationMap : + C(SSet.toTop.obj (nerve (NonemptyFiniteChains P)), SSet.toTop.obj (nerve P)) := + ⟨fun z => (PosetGeometry.coordinatesHomeomorph P).symm + ⟨chainPoint P z, (PosetGeometry.mem_range_coordinates_iff _).mpr + (chainPoint_chainSupported P z)⟩, + (PosetGeometry.coordinatesHomeomorph P).symm.continuous.comp + ((chainPointMap P).continuous.subtype_mk _)⟩ + +theorem coordinates_chainRealizationMap + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) : + PosetGeometry.coordinates P (chainRealizationMap P z) = chainPoint P z := + congrArg Subtype.val ((PosetGeometry.coordinatesHomeomorph P).apply_symm_apply _) + +theorem affineRealization_chainRealizationMap {d : ℕ} (x : P → Fin d → ℝ) + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) : + affineRealization x (chainRealizationMap P z) = + affineRealization (chainAverage x) z := by + classical + funext j + change finiteAffineValue (fun i => x i j) + (PosetGeometry.coordinates P (chainRealizationMap P z)) = _ + rw [coordinates_chainRealizationMap] + unfold finiteAffineValue + simp_rw [chainPoint_weight, Finset.sum_mul] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro A _ + change (∑ i, _ * _ * x i j) = + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A * + finiteAffineValue (fun i => x i j) (chainDistribution A) + simp only [finiteAffineValue, Finset.mul_sum, mul_assoc] + +end + +end Thomason.Construction.SubdivisionBarycentric + +end + +section + +/-! # The chain-barycenter map is a weak equivalence + +Its positive support and that of the greatest-vertex map belong to the +same chain. Straight interpolation therefore stays in the original +finite-poset realization. The greatest map is last vertex under +the canonical subdivision isomorphism. +-/ + +namespace Thomason.Construction.SubdivisionBarycentric + +open CategoryTheory PartialOrder Convexity + +noncomputable section + +variable (P : Type) [PartialOrder P] [Fintype P] + +local instance : Finite (NonemptyFiniteChains P) := finite_nonemptyFiniteChains P +local instance : Fintype (NonemptyFiniteChains P) := Fintype.ofFinite _ + +def greatestRealizationMap : + C(SSet.toTop.obj (nerve (NonemptyFiniteChains P)), SSet.toTop.obj (nerve P)) := + (SSet.toTop.map (nerveMap (ChainLabelApproximation.greatestHom (P := P)).monotone.functor)).hom + +omit [Fintype P] in +theorem greatestRealizationMap_support + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) (x : P) + (hx : (PosetGeometry.coordinates P (greatestRealizationMap P z)).weights x ≠ 0) : + ∃ A : NonemptyFiniteChains P, + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A ≠ 0 ∧ x ∈ A.finset := by + classical + have he := PosetGeometry.coordinates_nerveMap + (ChainLabelApproximation.greatestHom (P := P)) z + change PosetGeometry.coordinates P (greatestRealizationMap P z) = _ at he + rw [he] at hx + have hs : x ∈ ((PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights.mapDomain + (ChainLabelApproximation.greatestHom (P := P))).support := + Finsupp.mem_support_iff.mpr hx + rw [Finsupp.support_mapDomain_of_nonneg + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).nonneg] at hs + obtain ⟨A, hA, rfl⟩ := Finset.mem_image.mp hs + exact ⟨A, Finsupp.mem_support_iff.mp hA, ChainLabelApproximation.greatest_mem A⟩ + +theorem chainRealizationMap_compatible + (z : SSet.toTop.obj (nerve (NonemptyFiniteChains P))) : + PosetGeometry.CompatibleSupport + (PosetGeometry.coordinates P (chainRealizationMap P z)) + (PosetGeometry.coordinates P (greatestRealizationMap P z)) := by + intro x hx y hy + have support (v : P) + (hv : (PosetGeometry.coordinates P (chainRealizationMap P z)).weights v ≠ 0 ∨ + (PosetGeometry.coordinates P (greatestRealizationMap P z)).weights v ≠ 0) : + ∃ A : NonemptyFiniteChains P, + (PosetGeometry.coordinates (NonemptyFiniteChains P) z).weights A ≠ 0 ∧ v ∈ A.finset := by + rcases hv with hv | hv + · apply chainPoint_support P z v + rwa [coordinates_chainRealizationMap] at hv + · exact greatestRealizationMap_support P z v hv + obtain ⟨A, hA, hxA⟩ := support x hx + obtain ⟨B, hB, hyB⟩ := support y hy + rcases PosetGeometry.coordinates_chainSupported z A (Finsupp.mem_support_iff.mpr hA) + B (Finsupp.mem_support_iff.mpr hB) with hAB | hBA + · exact B.comparable ⟨x, hAB hxA⟩ ⟨y, hyB⟩ + · exact A.comparable ⟨x, hxA⟩ ⟨y, hBA hyB⟩ + +def chainRealizationMapHomotopy : + (chainRealizationMap P).Homotopy (greatestRealizationMap P) := + PosetGeometry.commonChainHomotopy _ _ (chainRealizationMap_compatible P) + +theorem chainRealizationMap_weak : IsWeakHomotopyEquivalence (chainRealizationMap P) := by + apply (PosetGeometry.compatible_support_weak_iff (chainRealizationMap P) + (greatestRealizationMap P) (chainRealizationMap_compatible P)).mpr + exact ChainLabelApproximation.greatest_nerveMap_weak P + +end + +end Thomason.Construction.SubdivisionBarycentric + +end + +section + +/-! # Simplex representatives inside a specified finite chain + +An entire barycentrically subdivided simplex maps into its greatest +original face, including every boundary point. The representative below +uses that whole face, allowing all vertex-star labels to be retained. +-/ + +namespace Thomason.Construction.SubdivisionBarycentric + +open CategoryTheory PartialOrder Convexity + +noncomputable section + +def finiteChainSimplex {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) : + Fin ((ChainOrdinal.choose C).dim+1) ⥤ P := + ({ toFun i := ((ChainOrdinal.choose C).enum i).val + monotone' := fun _ _ h => (ChainOrdinal.choose C).enum.monotone h } : + Fin ((ChainOrdinal.choose C).dim+1) →o P).monotone.functor + +theorem finiteChainSimplex_range {P : Type} [PartialOrder P] (C : NonemptyFiniteChains P) : + Set.range (finiteChainSimplex C).obj = (C.finset : Set P) := by + ext x + constructor + · rintro ⟨i, rfl⟩ + exact ((ChainOrdinal.choose C).enum i).property + · intro hx + obtain ⟨i, hi⟩ := (ChainOrdinal.choose C).enum.surjective ⟨x, hx⟩ + exact ⟨i, congrArg Subtype.val hi⟩ + +theorem exists_coordinates_on_chain {P : Type} [PartialOrder P] + (C : NonemptyFiniteChains P) (p : StdSimplex ℝ P) + (hp : p.weights.support ⊆ C.finset) : + ∃ q : StdSimplex ℝ (Fin ((ChainOrdinal.choose C).dim+1)), + StdSimplex.map (finiteChainSimplex C).obj q = p := by + classical + let e := (finiteChainSimplex C).obj + have he : Function.Injective e := fun i j h => + (ChainOrdinal.choose C).enum.injective (Subtype.ext h) + let q := StdSimplex.map (Function.invFun e) p + refine ⟨q, ?_⟩ + apply StdSimplex.ext + change (p.weights.mapDomain (Function.invFun e)).mapDomain e = p.weights + rw [← Finsupp.mapDomain_comp] + have hh : p.weights.mapDomain (e ∘ Function.invFun e) = p.weights.mapDomain id := by + apply Finsupp.mapDomain_congr + intro x hx + have hmem : x ∈ Set.range e := by + rw [finiteChainSimplex_range] + exact hp hx + obtain ⟨i, rfl⟩ := hmem + change e (Function.invFun e (e i)) = e i + rw [Function.leftInverse_invFun he] + exact hh.trans Finsupp.mapDomain_id + +theorem exists_point_on_chain {P : Type} [PartialOrder P] + (C : NonemptyFiniteChains P) (z : SSet.toTop.obj (nerve P)) + (hz : (PosetGeometry.coordinates P z).weights.support ⊆ C.finset) : + ∃ q : StdSimplex ℝ (Fin ((ChainOrdinal.choose C).dim+1)), + z = RealizationPrism.simplexPoint (nerve P) (finiteChainSimplex C) q := by + obtain ⟨q, hq⟩ := exists_coordinates_on_chain C (PosetGeometry.coordinates P z) hz + refine ⟨q, PosetGeometry.coordinates_injective P ?_⟩ + exact hq.symm.trans (PosetGeometry.coordinates_simplexPoint P (finiteChainSimplex C) q).symm + +theorem chainPoint_simplex_support {P : Type} [PartialOrder P] [Fintype P] + {m : ℕ} (s : Fin (m+1) ⥤ NonemptyFiniteChains P) + (p : StdSimplex ℝ (Fin (m+1))) : + (chainPoint P (RealizationPrism.simplexPoint (nerve (NonemptyFiniteChains P)) s p)).weights.support ⊆ + (s.obj (Fin.last m)).finset := by + classical + intro x hx + obtain ⟨A, hA, hxA⟩ := chainPoint_support P _ x (Finsupp.mem_support_iff.mp hx) + have he := PosetGeometry.coordinates_simplexPoint (NonemptyFiniteChains P) s p + have hmem : A ∈ (p.weights.mapDomain s.obj).support := by + rw [← StdSimplex.weights_map, ← he] + exact Finsupp.mem_support_iff.mpr hA + rw [Finsupp.support_mapDomain_of_nonneg p.nonneg] at hmem + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp hmem + exact leOfHom (s.map (homOfLE (Fin.le_last i))) hxA + +theorem chainRealizationMap_simplex_representation {P : Type} [PartialOrder P] [Fintype P] + {m : ℕ} (s : Fin (m+1) ⥤ NonemptyFiniteChains P) + (p : StdSimplex ℝ (Fin (m+1))) : + ∃ q : StdSimplex ℝ (Fin ((ChainOrdinal.choose (s.obj (Fin.last m))).dim+1)), + chainRealizationMap P + (RealizationPrism.simplexPoint (nerve (NonemptyFiniteChains P)) s p) = + RealizationPrism.simplexPoint (nerve P) (finiteChainSimplex (s.obj (Fin.last m))) q := by + apply exists_point_on_chain + rw [coordinates_chainRealizationMap] + exact chainPoint_simplex_support s p + +end + +end Thomason.Construction.SubdivisionBarycentric + +end + +section + +/-! # Nondegenerate faces of a poset nerve are finite chains + +The identification uses the vertex image of each nondegenerate +simplex. Its last-vertex comparison agrees with the established +subdivision comparison, including the original target map. +-/ + +namespace Thomason.Construction.NerveFaceChains + +open CategoryTheory PartialOrder Opposite +open SubdivisionBarycentric ChainLabelApproximation +open scoped Simplicial + +noncomputable section + +variable {P : Type} [PartialOrder P] + +def chainOfFace (x : (nerve P).N) : NonemptyFiniteChains P where + finset := by classical exact Finset.univ.image x.simplex.obj + nonempty := by classical exact Finset.univ_nonempty.image x.simplex.obj + comparable := by + classical + rintro ⟨a, ha⟩ ⟨b, hb⟩ + obtain ⟨i, _, rfl⟩ := Finset.mem_image.mp ha + obtain ⟨j, _, rfl⟩ := Finset.mem_image.mp hb + exact (le_total i j).imp (fun h => x.simplex.monotone h) + (fun h => x.simplex.monotone h) + +@[simp] +theorem mem_chainOfFace (x : (nerve P).N) (p : P) : + p ∈ (chainOfFace x).finset ↔ ∃ i, x.simplex.obj i = p := by + classical + simp [chainOfFace] + +theorem chainOfFace_le_iff (x y : (nerve P).N) : + chainOfFace x ≤ chainOfFace y ↔ x ≤ y := by + classical + constructor + · intro h + have hy := (PartialOrder.mem_nerve_nonDegenerate_iff_strictMono y.simplex).mp + y.nonDegenerate + have hx := (PartialOrder.mem_nerve_nonDegenerate_iff_strictMono x.simplex).mp + x.nonDegenerate + have hr (i : Fin (x.dim+1)) : x.simplex.obj i ∈ Set.range y.simplex.obj := by + exact (mem_chainOfFace y _).mp (h ((mem_chainOfFace x _).mpr ⟨i, rfl⟩)) + let g : Fin (x.dim+1) → Fin (y.dim+1) := + fun i => Function.invFun y.simplex.obj (x.simplex.obj i) + have hg (i) : y.simplex.obj (g i) = x.simplex.obj i := + Function.invFun_eq (hr i) + let u : SimplexCategory.mk x.dim ⟶ SimplexCategory.mk y.dim := + SimplexCategory.Hom.mk ⟨g, fun i j hij => + hy.le_iff_le.mp (by rw [hg, hg]; exact x.simplex.monotone hij)⟩ + have hu : Mono u := by + apply SimplexCategory.mono_iff_injective.mpr + intro i j hij + apply hx.injective + rw [← hg i, ← hg j] + exact congrArg y.simplex.obj hij + apply SSet.N.le_iff_exists_mono.mpr + refine ⟨u, hu, ?_⟩ + apply nerve.ext_of_isThin + funext i + exact hg i + · intro h p hp + obtain ⟨u, _, hu⟩ := SSet.N.le_iff_exists_mono.mp h + obtain ⟨i, rfl⟩ := (mem_chainOfFace x p).mp hp + apply (mem_chainOfFace y _).mpr + exact ⟨u.toOrderHom i, congrArg (fun s => s.obj i) hu⟩ + +def faceOfChain (C : NonemptyFiniteChains P) : (nerve P).N := + SSet.N.mk (finiteChainSimplex C) + ((PartialOrder.mem_nerve_nonDegenerate_iff_injective _).mpr + (fun _i _j h => (ChainOrdinal.choose C).enum.injective (Subtype.ext h))) + +@[simp] +theorem chainOfFace_faceOfChain (C : NonemptyFiniteChains P) : + chainOfFace (faceOfChain C) = C := by + apply NonemptyFiniteChains.ext + ext p + rw [mem_chainOfFace] + change (∃ i, (finiteChainSimplex C).obj i = p) ↔ p ∈ C.finset + exact Set.ext_iff.mp (finiteChainSimplex_range C) p + +def orderIso (P : Type) [PartialOrder P] : (nerve P).N ≃o NonemptyFiniteChains P where + toEquiv := Equiv.ofBijective chainOfFace ⟨fun x y h => + le_antisymm ((chainOfFace_le_iff x y).mp h.le) + ((chainOfFace_le_iff y x).mp h.ge), fun C => ⟨faceOfChain C, chainOfFace_faceOfChain C⟩⟩ + map_rel_iff' := chainOfFace_le_iff _ _ + +theorem greatest_chainOfFace (x : (nerve P).N) : + greatest (chainOfFace x) = x.simplex.obj (Fin.last x.dim) := by + apply le_antisymm + · obtain ⟨i, hi⟩ := (mem_chainOfFace x _).mp (greatest_mem (chainOfFace x)) + rw [← hi] + exact x.simplex.monotone (Fin.le_last i) + · exact le_greatest (chainOfFace x) _ ((mem_chainOfFace x _).mpr ⟨_, rfl⟩) + +/-- The face-poset comparison reads exactly the greatest original vertex. -/ +theorem lastVertex_eq : + NonsingularLastVertex.map (nerve P) = + nerveMap (orderIso P).toOrderEmbedding.toOrderHom.monotone.functor ≫ + nerveMap (greatestHom (P := P)).monotone.functor := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + funext i + change (s.obj (Fin.last d.unop.len)).simplex.obj + ((NonsingularLastVertex.ordinal s).toOrderHom i) = greatest (chainOfFace (s.obj i)) + rw [greatest_chainOfFace] + exact congrArg (fun t => t.obj (Fin.last (s.obj i).dim)) + (SSet.N.map_monoOfLE (s.monotone (Fin.le_last i))) + +/-- The subdivision has this face-poset as its nerve. -/ +def nerveIso (P : Type) [PartialOrder P] : + nerve (nerve P).N ≅ nerve (NonemptyFiniteChains P) where + hom := nerveMap (orderIso P).toOrderEmbedding.toOrderHom.monotone.functor + inv := nerveMap (orderIso P).symm.toOrderEmbedding.toOrderHom.monotone.functor + hom_inv_id := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + funext i + exact (orderIso P).symm_apply_apply (s.obj i) + inv_hom_id := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + funext i + exact (orderIso P).apply_symm_apply (s.obj i) + +def subdivisionIso (P : Type) [PartialOrder P] [Finite P] : + SSet.sd.obj (nerve P) ≅ nerve (nerve P).N := + NerveSubdivisionMap.iso P ≪≫ (nerveIso P).symm + +theorem subdivisionIso_lastVertex (P : Type) [PartialOrder P] [Finite P] : + (subdivisionIso P).hom ≫ NonsingularLastVertex.map (nerve P) = + lastVertex.app (nerve P) := by + rw [lastVertex_eq] + change (NerveSubdivisionMap.iso P).hom ≫ + (nerveIso P).inv ≫ (nerveIso P).hom ≫ + nerveMap greatestHom.monotone.functor = _ + simp only [Iso.inv_hom_id_assoc] + exact ChainLabelApproximation.subdivision_greatest_eq_lastVertex P + +theorem chainOfFace_naturality {Q : Type} [PartialOrder Q] + (f : P →o Q) + (hf : NonsingularLastVertex.PreservesNondegenerate (nerveMap f.monotone.functor)) + (x : (nerve P).N) : + chainOfFace (NonsingularLastVertex.faceMap (nerveMap f.monotone.functor) hf x) = + (chainOfFace x).map f := by + apply NonemptyFiniteChains.ext + ext q + rw [mem_chainOfFace, NonemptyFiniteChains.mem_map_iff] + constructor + · rintro ⟨j, rfl⟩ + exact ⟨x.simplex.obj j, (mem_chainOfFace x _).mpr ⟨j, rfl⟩, rfl⟩ + · rintro ⟨p, hp, rfl⟩ + obtain ⟨j, rfl⟩ := (mem_chainOfFace x p).mp hp + exact ⟨j, rfl⟩ + +@[reassoc] +theorem nerveIso_naturality {Q : Type} [PartialOrder Q] + (f : P →o Q) + (hf : NonsingularLastVertex.PreservesNondegenerate (nerveMap f.monotone.functor)) : + nerveMap (NonsingularLastVertex.faceMap (nerveMap f.monotone.functor) hf).monotone.functor ≫ + (nerveIso Q).hom = (nerveIso P).hom ≫ + nerveMap (NonemptyFiniteChains.orderHomMap f).monotone.functor := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + funext j + exact chainOfFace_naturality f hf (s.obj j) + +@[reassoc] +theorem subdivisionIso_naturality {Q : Type} [PartialOrder Q] [Finite P] [Finite Q] + (f : P →o Q) + (hf : NonsingularLastVertex.PreservesNondegenerate (nerveMap f.monotone.functor)) : + SSet.sd.map (nerveMap f.monotone.functor) ≫ (subdivisionIso Q).hom = + (subdivisionIso P).hom ≫ nerveMap + (NonsingularLastVertex.faceMap (nerveMap f.monotone.functor) hf).monotone.functor := by + apply (cancel_mono (nerveIso Q).hom).mp + simp only [Category.assoc, subdivisionIso, Iso.trans_hom, Iso.symm_hom, + Iso.inv_hom_id_assoc, nerveIso_naturality, Iso.inv_hom_id, Category.comp_id] + exact NerveSubdivisionMap.map_naturality f + +end + +end Thomason.Construction.NerveFaceChains + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedCubicalLifting.lean b/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedCubicalLifting.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b4eaf360bedcfdb94fe9d72e3501e74a6011b0f --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedCubicalLifting.lean @@ -0,0 +1,115 @@ +import OAI.CategoryTheory.Thomason.Simplicial.SingularAcyclicFibers +import OAI.CategoryTheory.Thomason.Simplicial.SingularPathSpaceAdjunction + +namespace OAI + +section + +/-! # Reduce a cube with constant opposite faces to a path-space lifting problem -/ + +namespace Thomason.Construction.RealizedCube + +open CategoryTheory + +noncomputable section + +def boundarySide (n : ℕ) (t : unitInterval) + (z : Cube.boundary (Fin (n+1))) : Cube.boundary (Fin (n+2)) := + ⟨Fin.cons t z.val, by + obtain ⟨i, hi⟩ := z.property + exact ⟨i.succ, hi⟩⟩ + +/-- Currying a normalized boundary square reduces its dimension by one, +with the fixed-endpoint path map as the right-hand arrow. -/ +theorem normalized_cube_lift {X Y : TopCat.{0}} (p : X ⟶ Y) (n : ℕ) + {x₀ x₁ : X} + (hp : HasLiftingProperty (boundaryInclusion n) + (TopCat.ofHom (PathSpace.map p.hom (x := x₀) (y := x₁)))) + (a : C(Cube.boundary (Fin (n+2)), X)) + (b : C(Fin (n+2) → unitInterval, Y)) + (ha₀ : ∀ u, a (boundaryFacePoint (n+1) false u) = x₀) + (ha₁ : ∀ u, a (boundaryFacePoint (n+1) true u) = x₁) + (hab : ∀ z, p.hom (a z) = b z.val) : + ∃ l : C(Fin (n+2) → unitInterval, X), + (∀ z : Cube.boundary (Fin (n+2)), l z.val = a z) ∧ + ∀ z, p.hom (l z) = b z := by + let P : TopCat.of (Path x₀ x₁) ⟶ TopCat.of (Path (p.hom x₀) (p.hom x₁)) := + TopCat.ofHom (PathSpace.map p.hom) + let A : TopCat.of (Cube.boundary (Fin (n+1))) ⟶ TopCat.of (Path x₀ x₁) := + TopCat.ofHom { + toFun z := { + toFun t := a (boundarySide n t z) + continuous_toFun := a.continuous.comp (by unfold boundarySide; fun_prop) + source' := ha₀ z.val + target' := ha₁ z.val } + continuous_toFun := Path.continuous_uncurry_iff.mp (by + change Continuous (fun z : Cube.boundary (Fin (n+1)) × unitInterval => + a (boundarySide n z.2 z.1)) + exact a.continuous.comp (by unfold boundarySide; fun_prop)) } + let B : TopCat.of (Fin (n+1) → unitInterval) ⟶ + TopCat.of (Path (p.hom x₀) (p.hom x₁)) := TopCat.ofHom { + toFun u := { + toFun t := b (Fin.cons t u) + continuous_toFun := b.continuous.comp (by fun_prop) + source' := (hab (boundaryFacePoint (n+1) false u)).symm.trans + (congrArg p.hom (ha₀ u)) + target' := (hab (boundaryFacePoint (n+1) true u)).symm.trans + (congrArg p.hom (ha₁ u)) } + continuous_toFun := Path.continuous_uncurry_iff.mp (by + change Continuous (fun z : (Fin (n+1) → unitInterval) × unitInterval => + b (Fin.cons z.2 z.1)) + fun_prop) } + have sq : CommSq A (boundaryInclusion n) P B := by + constructor + apply TopCat.hom_ext + apply ContinuousMap.ext + intro z + apply Path.ext + funext t + exact hab (boundarySide n t z) + let : HasLiftingProperty (boundaryInclusion n) P := hp + let l : C(Fin (n+2) → unitInterval, X) := { + toFun z := sq.lift.hom (Fin.tail z) (z 0) + continuous_toFun := (Path.continuous_uncurry_iff.mpr sq.lift.hom.continuous).comp + (show Continuous (fun z : Fin (n+2) → unitInterval => (Fin.tail z, z 0)) from + by fun_prop) } + refine ⟨l, ?_, ?_⟩ + · intro z + obtain ⟨i, hi⟩ := z.property + cases i using Fin.cases with + | zero => + rcases hi with hi | hi + · change sq.lift.hom (Fin.tail z.val) (z.val 0) = _ + rw [hi, Path.source] + apply (ha₀ (Fin.tail z.val)).symm.trans + congr 1 + apply Subtype.ext + change Fin.cons 0 (Fin.tail z.val) = z.val + rw [← hi, Fin.cons_self_tail] + · change sq.lift.hom (Fin.tail z.val) (z.val 0) = _ + rw [hi, Path.target] + apply (ha₁ (Fin.tail z.val)).symm.trans + congr 1 + apply Subtype.ext + change Fin.cons 1 (Fin.tail z.val) = z.val + rw [← hi, Fin.cons_self_tail] + | succ i => + let v : Cube.boundary (Fin (n+1)) := ⟨Fin.tail z.val, ⟨i, hi⟩⟩ + have he := congrArg (fun f => f.hom v (z.val 0)) sq.fac_left + change l z.val = a (boundarySide n (z.val 0) v) at he + refine he.trans ?_ + congr 1 + apply Subtype.ext + exact Fin.cons_self_tail z.val + · intro z + have he := congrArg (fun f => f.hom (Fin.tail z) (z 0)) sq.fac_right + change p.hom (l z) = b (Fin.cons (z 0) (Fin.tail z)) at he + simpa only [Fin.cons_self_tail] using he + +end + +end Thomason.Construction.RealizedCube + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedTuples.lean b/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedTuples.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b0be04a6113383c61a729a5fe81a8dcb30f2856 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/NormalizedTuples.lean @@ -0,0 +1,290 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import Mathlib.Order.Fin.InsertNth + +namespace OAI + +section + +/-! # Naturality of normalized simplex chains + +For a monotone vertex map, nondegenerate images commute with deletion. In a +degenerate image, choose an adjacent equal pair: every other face vanishes, +and the two remaining faces coincide with opposite signs. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- The image chain depends only on the composite vertex function. -/ +theorem mapBasis_congr {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s t : Basis m p) (h : ∀ i, f (s i) = f (t i)) : + mapBasis f p s = mapBasis f p t := by + unfold mapBasis + simp only [funext h] + +/-- A nondegenerate image commutes with deleting a vertex. -/ +theorem mapBasis_delete_strict {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m (p + 1)) (hf : StrictMono (fun i => f (s i))) (i : Fin (p + 2)) : + mapBasis f p (deleteVertex s i) = + Finsupp.single (deleteVertex (OrderEmbedding.ofStrictMono _ hf) i) 1 := by + have hi : StrictMono (fun k => f (deleteVertex s i k)) := + hf.comp (Fin.strictMono_succAbove i) + rw [mapBasis, dite_eq_left hi] + rfl + +/-- Deleting either member of an adjacent equal pair gives the same image. -/ +theorem mapBasis_delete_equal {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m (p + 1)) (i : Fin (p + 1)) (hi : f (s i.castSucc) = f (s i.succ)) : + mapBasis f p (deleteVertex s i.castSucc) = + mapBasis f p (deleteVertex s i.succ) := by + apply mapBasis_congr + intro k + change f (s (i.castSucc.succAbove k)) = f (s (i.succ.succAbove k)) + rcases lt_trichotomy k i with h | rfl | h + · rw [Fin.succAbove_castSucc_of_lt _ _ h, + Fin.succAbove_succ_of_le _ _ h.le] + · simpa only [Fin.succAbove_castSucc_self, Fin.succAbove_succ_self] using hi.symm + · rw [Fin.succAbove_castSucc_of_le _ _ h.le, + Fin.succAbove_succ_of_lt _ _ h] + +/-- A face which retains an equal pair has zero normalized image. -/ +theorem mapBasis_delete_vanish {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m (p + 1)) (i : Fin (p + 1)) (hi : f (s i.castSucc) = f (s i.succ)) + (j : Fin (p + 2)) (hja : j ≠ i.castSucc) (hjb : j ≠ i.succ) : + mapBasis f p (deleteVertex s j) = 0 := by + obtain ⟨a, ha⟩ := Fin.exists_succAbove_eq hja.symm + obtain ⟨b, hb⟩ := Fin.exists_succAbove_eq hjb.symm + have hn : ¬StrictMono (fun k => f (deleteVertex s j k)) := by + intro hk + have hab : a = b := hk.injective (by + change f (s (j.succAbove a)) = f (s (j.succAbove b)) + rw [ha, hb] + exact hi) + have he : i.castSucc = i.succ := ha.symm.trans ((congrArg j.succAbove hab).trans hb) + exact (ne_of_lt i.castSucc_lt_succ) he + exact dite_eq_right hn + +/-- Any degenerate monotone image has an adjacent equal pair. -/ +theorem exists_adjacent_equal {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m (p + 1)) (hf : ¬StrictMono (fun i => f (s i))) : + ∃ i : Fin (p + 1), f (s i.castSucc) = f (s i.succ) := by + by_contra! hn + apply hf + apply Fin.strictMono_iff_lt_succ.mpr + intro i + exact lt_of_le_of_ne (f.monotone (s.monotone i.castSucc_le_succ)) (hn i) + +/-- Naturality on one nondegenerate source simplex, including degenerate images. -/ +theorem differential_mapBasis {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m (p + 1)) : + mapChains f p (differentialBasis m p s) = differential n p (mapBasis f (p + 1) s) := by + classical + by_cases hf : StrictMono (fun i => f (s i)) + · rw [mapBasis, dite_eq_left hf, differential_single, one_smul] + simp only [differentialBasis, map_sum, mapChains_single, mapBasis_delete_strict f s hf, + Finsupp.smul_single, smul_eq_mul, mul_one] + · obtain ⟨i, hi⟩ := exists_adjacent_equal f s hf + rw [mapBasis, dite_eq_right hf, map_zero] + simp only [differentialBasis, map_sum, mapChains_single] + let term (j : Fin (p + 2)) : Chains n p := + ((-1 : ℤ) ^ j.val) • mapBasis f p (deleteVertex s j) + change (∑ j, term j) = 0 + have hab : i.castSucc ≠ i.succ := ne_of_lt i.castSucc_lt_succ + have hs : (∑ j, term j) = term i.castSucc + term i.succ := by + calc + _ = ∑ j ∈ ({i.castSucc, i.succ} : Finset (Fin (p + 2))), term j := by + symm + apply Finset.sum_subset (Finset.subset_univ _) + intro j _ hj + have hj' : j ≠ i.castSucc ∧ j ≠ i.succ := by simpa using hj + simp only [term, mapBasis_delete_vanish f s i hi j hj'.1 hj'.2, smul_zero] + _ = _ := Finset.sum_pair hab + rw [hs] + dsimp [term] + rw [mapBasis_delete_equal f s i hi] + simp only [pow_succ, mul_neg_one, neg_smul, + add_neg_cancel] + +/-- The concrete normalized differential is natural under every monotone map. -/ +theorem boundaryNaturality {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) : + BoundaryNaturality f := by + intro p x + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp [differential_mapBasis] + +end SimplexComplex + +/-- The normalized simplex differential squares to zero and is natural. -/ +theorem normalizedSimplexIdentities : NormalizedSimplexIdentities where + squared := SimplexComplex.boundarySquared + naturality := SimplexComplex.boundaryNaturality + +end Thomason.Construction + +end + +section + +/-! +# Normalized tuple calculus for the relative prism + +A weakly increasing tuple denotes its normalized simplex chain: repetitions +are sent to zero. The boundary formula, including tuples with repetitions, +follows from naturality of normalized chains. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- The top basis simplex on its own set of vertices. -/ +def top (p : ℕ) : Basis p p := (OrderIso.refl _).toOrderEmbedding + +/-- The normalized chain represented by a weakly increasing tuple. -/ +noncomputable def tuple {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) : Chains n p := + mapBasis f p (top p) + +/-- Delete one entry of a weakly increasing tuple. -/ +def deleteTuple {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) (i : Fin (p + 2)) : + Fin (p + 1) →o Fin (n + 1) := f.comp (Fin.succAboveOrderEmb i).toOrderHom + +theorem mapBasis_eq_tuple {m n p : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) + (s : Basis m p) : mapBasis f p s = tuple (f.comp s.toOrderHom) := rfl + +/-- Composition acts on normalized tuples, including zero/degenerate tuples. -/ +theorem mapChains_tuple {m n p : ℕ} (f : Fin (p + 1) →o Fin (m + 1)) + (g : Fin (m + 1) →o Fin (n + 1)) : + mapChains g p (tuple f) = tuple (g.comp f) := mapBasis_comp f g (top p) + +/-- The usual alternating boundary formula remains valid for every monotone +list. This includes degenerate lists, for which the nonzero faces cancel. -/ +theorem differential_tuple (h : NormalizedSimplexIdentities) {n p : ℕ} + (f : Fin (p + 2) →o Fin (n + 1)) : + differential n p (tuple f) = + ∑ i : Fin (p + 2), ((-1 : ℤ) ^ (i : ℕ)) • tuple (deleteTuple f i) := by + have hf := h.naturality f p (Finsupp.single (top (p + 1)) 1) + simp only [differential_single, one_smul, mapChains_single] at hf + change differential n p (mapBasis f (p + 1) (top (p + 1))) = _ + rw [← hf] + simp only [differentialBasis, map_sum, mapChains_single] + rfl + +/-- A tuple with two specified equal entries is zero in normalized chains. -/ +theorem tuple_eq_zero_of_repeat {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) + {i j : Fin (p + 1)} (hij : i < j) (he : f i = f j) : tuple f = 0 := by + have hn : ¬StrictMono (fun k => f (top p k)) := by + intro hs + have hl := hs hij + change f i < f j at hl + exact (ne_of_lt hl) he + simp only [tuple, mapBasis, dite_eq_right hn] + +theorem tuple_nonneg {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) + (s : Basis n p) : 0 ≤ tuple f s := mapBasis_nonneg f (top p) s + +/-- Append one upper vertex to a monotone tuple. -/ +def append {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) (b : Fin (n + 1)) + (hb : f (Fin.last p) ≤ b) : Fin (p + 2) →o Fin (n + 1) where + toFun := Fin.snoc (fun i => f i) b + monotone' := by + simpa only [Fin.insertNth_last'] using Fin.insertNth_last_monotone f.monotone b hb + +@[simp] +theorem append_castSucc {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) (b) (hb) + (i : Fin (p + 1)) : append f b hb i.castSucc = f i := by + change Fin.snoc (α := fun _ => Fin (n + 1)) (fun j => f j) b i.castSucc = f i + simp only [Fin.snoc_castSucc] + +@[simp] +theorem append_last {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) (b) (hb) : + append f b hb (Fin.last (p + 1)) = b := by + change Fin.snoc (α := fun _ => Fin (n + 1)) (fun j => f j) b (Fin.last (p + 1)) = b + simp only [Fin.snoc_last] + +def initial {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) : + Fin (p + 1) →o Fin (n + 1) := f.comp (Fin.castSuccOrderEmb).toOrderHom + +@[simp] +theorem initial_apply {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) + (i : Fin (p + 1)) : initial f i = f i.castSucc := rfl + +theorem append_initial {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) : + append (initial f) (f (Fin.last (p + 1))) + (f.monotone (Fin.le_last _)) = f := by + apply DFunLike.ext + intro i + induction i using Fin.lastCases with + | last => exact append_last _ _ _ + | cast i => exact append_castSucc _ _ _ i + +/-- Appending a repeated final vertex gives the zero normalized chain. -/ +theorem tuple_append_eq_zero {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) (b) (hb) + (he : f (Fin.last p) = b) : tuple (append f b hb) = 0 := by + apply tuple_eq_zero_of_repeat _ (Fin.castSucc_lt_last (Fin.last p)) + simpa only [append_castSucc, append_last] using he + +theorem delete_append_last {n p : ℕ} (f : Fin (p + 1) →o Fin (n + 1)) (b) (hb) : + deleteTuple (append f b hb) (Fin.last (p + 1)) = f := by + apply DFunLike.ext + intro i + change append f b hb ((Fin.last (p + 1)).succAbove i) = f i + rw [Fin.succAbove_last] + exact append_castSucc f b hb i + +theorem delete_append_castSucc {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) (b) (hb) + (i : Fin (p + 2)) : + deleteTuple (append f b hb) i.castSucc = + append (deleteTuple f i) b ((f.monotone (Fin.le_last _)).trans hb) := by + apply DFunLike.ext + intro j + induction j using Fin.lastCases with + | last => + change append f b hb (i.castSucc.succAbove (Fin.last (p + 1))) = _ + rw [Fin.succAbove_ne_last_last (Fin.castSucc_ne_last i)] + exact (append_last f b hb).trans (append_last _ b _).symm + | cast j => + change append f b hb (i.castSucc.succAbove j.castSucc) = _ + rw [Fin.castSucc_succAbove_castSucc] + exact (append_castSucc f b hb _).trans + (append_castSucc (deleteTuple f i) b _ j).symm + +/-- The two exceptional faces in the relative prism cancel to the target +endpoint. The alternatives express exactly the old-initial/new-tail split. -/ +theorem prism_last_face_cancel {n p : ℕ} + (f g : Fin (p + 2) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hcases : (∀ i : Fin (p + 1), f i.castSucc = g i.castSucc) ∨ + g (Fin.last (p + 1)) = g (Fin.last p).castSucc) : + tuple (append (initial f) (g (Fin.last (p + 1))) + ((hfg _).trans (g.monotone (Fin.le_last _)))) - + tuple (append (initial f) (g (Fin.last p).castSucc) (hfg _)) = tuple g := by + rcases hcases with hold | hnew + · have hz := tuple_append_eq_zero (initial f) (g (Fin.last p).castSucc) (hfg _) + (hold (Fin.last p)) + have he : append (initial f) (g (Fin.last (p + 1))) + ((hfg _).trans (g.monotone (Fin.le_last _))) = g := by + apply DFunLike.ext + intro i + induction i using Fin.lastCases with + | last => exact append_last _ _ _ + | cast i => exact (append_castSucc _ _ _ i).trans (hold i) + rw [hz, sub_zero, he] + · have he : append (initial f) (g (Fin.last (p + 1))) + ((hfg _).trans (g.monotone (Fin.le_last _))) = + append (initial f) (g (Fin.last p).castSucc) (hfg _) := by + apply DFunLike.ext + intro i + induction i using Fin.lastCases with + | last => exact (append_last _ _ _).trans (hnew.trans (append_last _ _ _).symm) + | cast i => exact (append_castSucc _ _ _ i).trans (append_castSucc _ _ _ i).symm + rw [he, sub_self] + exact (tuple_eq_zero_of_repeat g (Fin.castSucc_lt_last (Fin.last p)) hnew.symm).symm + +end Thomason.Construction.SimplexComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/SimplexBasisHeight.lean b/lean/OAI/CategoryTheory/Thomason/Chains/SimplexBasisHeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ef903b6a9d8e84bf917c7ae2a7eb23d94733fbb --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/SimplexBasisHeight.lean @@ -0,0 +1,643 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Simplicial.LoopDimensionShift + +namespace OAI + +section + +/-! # The chain-cylinder functor + +Positive augmentation-preserving chain maps form a category. Realization +and tensoring on the right by the interval are functors, with natural +endpoint inclusions and collapse. +-/ + +namespace Thomason.Construction.DirectedComplex + +open CategoryTheory + +noncomputable section + +namespace Hom + +theorem ext_app {K L : DirectedComplex.{0}} {f g : Hom K L} + (h : ∀ n x, f.app n x = g.app n x) : f = g := by + cases f with + | mk fa fd fe fp => + cases g with + | mk ga gd ge gp => + have he : fa = ga := funext (fun n => AddMonoidHom.ext (h n)) + cases he + rfl + +def id (K : DirectedComplex.{0}) : Hom K K where + app n := AddMonoidHom.id (K.group n) + differential _ _ := rfl + augmentation _ := rfl + positive _ _ h := h + +def comp {K L M : DirectedComplex.{0}} (f : Hom K L) (g : Hom L M) : Hom K M where + app n := (g.app n).comp (f.app n) + differential n x := by + change g.app n (f.app n (K.differential n x)) = + M.differential n (g.app (n+1) (f.app (n+1) x)) + rw [f.differential, g.differential] + augmentation x := (g.augmentation _).trans (f.augmentation x) + positive n _ hx := g.positive n (f.positive n hx) + +end Hom + +instance : Category DirectedComplex.{0} where + Hom K L := Hom K L + id := Hom.id + comp := Hom.comp + id_comp _ := Hom.ext_app (fun _ _ => rfl) + comp_id _ := Hom.ext_app (fun _ _ => rfl) + assoc _ _ _ := Hom.ext_app (fun _ _ => rfl) + +/-- Strict realization of positive chain maps is a functor. -/ +def realizationFunctor : DirectedComplex.{0} ⥤ StrictOmegaCategory.{0} where + obj := realization + map := Hom.realization + map_id _ := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + rfl + map_comp _ _ := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + rfl + +/-- The fixed right interval tensor, with its signed differential. -/ +def rightCylinderFunctor : DirectedComplex.{0} ⥤ DirectedComplex.{0} where + obj := rightCylinder + map := RightCylinder.map + map_id _ := by + apply Hom.ext_app + intro n x + cases n <;> rfl + map_comp _ _ := by + apply Hom.ext_app + intro n x + cases n <;> rfl + +/-- The endpoint chain maps are natural in the directed complex. -/ +def rightEndpoint (a : Bool) : 𝟭 DirectedComplex.{0} ⟶ rightCylinderFunctor where + app K := RightCylinder.endpoint K a + naturality K L f := by + apply Hom.ext_app + intro n x + exact (RightCylinder.map_endpoint f a n x).symm + +/-- The interval collapse is a natural positive chain map. -/ +def rightProjection : rightCylinderFunctor ⟶ 𝟭 DirectedComplex.{0} where + app K := RightCylinder.projection K + naturality K L f := by + apply Hom.ext_app + intro n x + exact RightCylinder.projection_map f n x + +theorem rightEndpoint_projection (a : Bool) (K : DirectedComplex.{0}) : + (rightEndpoint a).app K ≫ rightProjection.app K = 𝟙 K := by + apply Hom.ext_app + intro n x + exact RightCylinder.projection_endpoint K a n x + +end + +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # Boundedness of positive composites + +In a directed complex whose positive monoids have no nonzero additive +inverses, a composite can have dimension at most n only when both factors +do. This prevents higher atoms from disappearing in the simplex chain +presentation, and gives a degreewise inverse to strict abelianization. +-/ + +namespace Thomason.Construction.DirectedComplex.Cell + +open CategoryTheory + +universe u + +variable {K : DirectedComplex.{u}} + +/-- Bounded cells have zero table entries in every higher degree. -/ +theorem table_zero_of_dimensionLE {x : K.realization} {n : ℕ} + (hx : K.realization.DimensionLE n x) {p : ℕ} (hp : n < p) (a : Bool) : + x.table a p = 0 := by + have he := congrArg (fun z : Cell K => z.table a p) hx.1 + change cutTable x false n a p = x.table a p at he + simpa only [cutTable, Nat.not_lt.mpr hp.le, Nat.ne_of_gt hp, ite_false] using he.symm + +/-- Vanishing above n determines the equal top entries by the boundary equation. -/ +theorem dimensionLE_of_table_zero {x : K.realization} {n : ℕ} + (hx : ∀ p, n < p → ∀ a, x.table a p = 0) : K.realization.DimensionLE n x := by + have ht : x.table true n = x.table false n := by + have hb := x.boundary false n + rw [hx (n+1) (Nat.lt_succ_self n) false, map_zero] at hb + exact sub_eq_zero.mp hb.symm + have hf (a : Bool) : x.face a n = x := by + apply Cell.ext + funext b p + change cutTable x a n b p = x.table b p + by_cases hp : p < n + · simp only [cutTable, hp, ite_true] + · by_cases he : p = n + · subst p + cases a <;> cases b <;> simp only [cutTable, Nat.lt_irrefl, ite_false, ite_true] + · exact ht.symm + · exact ht + · simp only [cutTable, hp, he, ite_false] + exact (hx p (by omega) b).symm + exact ⟨hf false, hf true⟩ + +/-- Positivity rules out cancellation of higher cells in a composite. -/ +theorem dimensionLE_comp_factors + (hpos : ∀ p (a b : K.group p), a ∈ K.positive p → b ∈ K.positive p → + a + b = 0 → a = 0 ∧ b = 0) + {x y : K.realization} {k n : ℕ} + (hxy : K.realization.target k x = K.realization.source k y) + (hc : K.realization.DimensionLE n (K.realization.comp k x y hxy)) : + K.realization.DimensionLE n x ∧ K.realization.DimensionLE n y := by + have hz {p : ℕ} (hnp : n < p) (hkp : k < p) (a : Bool) : + x.table a p = 0 ∧ y.table a p = 0 := by + have he := table_zero_of_dimensionLE hc hnp a + change pasteTable x y k a p = 0 at he + simp only [pasteTable, Nat.not_lt.mpr hkp.le, Nat.ne_of_gt hkp, ite_false] at he + exact hpos p _ _ (x.positive a p) (y.positive a p) he + by_cases hkn : k < n + · exact ⟨dimensionLE_of_table_zero (fun p hp a => (hz hp (hkn.trans hp) a).1), + dimensionLE_of_table_zero (fun p hp a => (hz hp (hkn.trans hp) a).2)⟩ + · have hnk : n ≤ k := Nat.le_of_not_gt hkn + have hx : K.realization.DimensionLE k x := + dimensionLE_of_table_zero (fun p hp a => (hz (hnk.trans_lt hp) hp a).1) + have hy : K.realization.DimensionLE k y := + dimensionLE_of_table_zero (fun p hp a => (hz (hnk.trans_lt hp) hp a).2) + have hc' := K.realization.dimensionLE_mono hnk hc + have ex : K.realization.comp k x y hxy = x := + hc'.1.symm.trans ((K.realization.source_comp k x y hxy).trans hx.1) + have ey : K.realization.comp k x y hxy = y := + hc'.2.symm.trans ((K.realization.target_comp k x y hxy).trans hy.2) + exact ⟨ex ▸ hc, ey ▸ hc⟩ + +end Thomason.Construction.DirectedComplex.Cell + +end + +section + +/-! # Dimensionwise expressions over positive atoms + +Composition expressions retain their generator occurrences. Positivity of +their image in a complex with an ordered atom basis prevents a generator +of higher degree from disappearing. Composition generation +by bounded atom lifts therefore gives dimensionwise composition +generation in the sense of Steiner 2004, Definition 4.1. +-/ + +namespace Thomason.Construction.StrictOmegaCategory + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +/-- A finite, well-typed expression using generators and strict composition. -/ +inductive CompositionExpression (C : StrictOmegaCategory.{0}) {I : Type} (g : I → C) : + C → Type + | generator (i : I) : CompositionExpression C g (g i) + | comp {x y : C} (r : ℕ) (hxy : C.target r x = C.source r y) + (tx : CompositionExpression C g x) (ty : CompositionExpression C g y) : + CompositionExpression C g (C.comp r x y hxy) + +namespace CompositionExpression + +variable {C : StrictOmegaCategory.{0}} {I : Type} {g : I → C} + +/-- Generator occurrences, with multiplicity and order retained. -/ +def labels {x : C} : CompositionExpression C g x → List I + | .generator i => [i] + | .comp _ _ tx ty => tx.labels ++ ty.labels + +theorem labels_nonempty {x : C} (t : CompositionExpression C g x) : t.labels ≠ [] := by + induction t with + | generator i => simp [labels] + | comp r hxy tx ty hx hy => + intro h + exact hx (List.append_eq_nil_iff.mp h).1 + +/-- If every occurring generator is bounded, so is the composite. -/ +theorem dimensionLE {x : C} (t : CompositionExpression C g x) (d : I → ℕ) + (hg : ∀ i, C.DimensionLE (d i) (g i)) (n : ℕ) + (hlabels : ∀ i ∈ t.labels, d i ≤ n) : C.DimensionLE n x := by + induction t with + | generator i => exact C.dimensionLE_mono (hlabels i (by simp [labels])) (hg i) + | comp r hxy tx ty ihx ihy => + apply C.dimensionLE_comp_all + · exact ihx (fun i hi => hlabels i (List.mem_append_left _ hi)) + · exact ihy (fun i hi => hlabels i (List.mem_append_right _ hi)) + +end CompositionExpression + +end Thomason.Construction.StrictOmegaCategory + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +include B + +/-- Ordered-basis positivity admits no additive cancellation. -/ +theorem positive_add_eq_zero (p : ℕ) (x y : K.group p) + (hx : x ∈ K.positive p) (hy : y ∈ K.positive p) (h : x + y = 0) : + x = 0 ∧ y = 0 := by + have he (b : B.Index p) : B.coordinates p x b + B.coordinates p y b = 0 := by + have hh := congrArg (fun z => B.coordinates p z b) h + simpa only [map_add, map_zero, Finsupp.add_apply, Finsupp.zero_apply] using hh + have hx0 (b : B.Index p) : B.coordinates p x b = 0 := by + have hp := B.coordinate_nonnegative p x hx b + have hq := B.coordinate_nonnegative p y hy b + have hh := he b + omega + have hy0 (b : B.Index p) : B.coordinates p y b = 0 := by + have hh := he b + rw [hx0 b, zero_add] at hh + exact hh + constructor + · apply (B.coordinates p).injective + ext b + simpa only [map_zero, Finsupp.zero_apply] using hx0 b + · apply (B.coordinates p).injective + ext b + simpa only [map_zero, Finsupp.zero_apply] using hy0 b + +/-- The nonzero top chain detects the degree of a genuine basis atom. -/ +theorem atom_degree_le {p n : ℕ} (b : B.Index p) + (h : K.realization.DimensionLE n (B.atom p b)) : p ≤ n := by + by_contra hn + have hz := Cell.table_zero_of_dimensionLE h (show n < p by omega) false + have he := congrArg (fun z => B.coordinates p z b) hz + rw [B.atom_top, map_zero, Finsupp.single_eq_same, Finsupp.zero_apply] at he + omega + +/-- No generator above degree n can occur in an expression whose image is +n-dimensional. This uses positivity rather than injectivity of the map. -/ +theorem expression_labels_bounded {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ i, F.toFun (g i) = B.atomCell i) + {x : C} (t : CompositionExpression C g x) (n : ℕ) + (hx : K.realization.DimensionLE n (F.toFun x)) : + ∀ i ∈ t.labels, i.1 ≤ n := by + induction t with + | generator i => + intro j hj + have he : j = i := by simpa only [CompositionExpression.labels, List.mem_singleton] using hj + subst j + rw [hg i] at hx + exact B.atom_degree_le i.2 hx + | @comp x y r hxy tx ty ihx ihy => + have hf : K.realization.target r (F.toFun x) = K.realization.source r (F.toFun y) := + (F.map_face true r x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false r y)) + have hc : K.realization.DimensionLE n + (K.realization.comp r (F.toFun x) (F.toFun y) hf) := by + rw [← F.map_comp r x y hxy hf] + exact hx + obtain ⟨hxx, hyy⟩ := Cell.dimensionLE_comp_factors (B.positive_add_eq_zero) hf hc + intro i hi + rcases List.mem_append.mp hi with hi | hi + · exact ihx hxx i hi + · exact ihy hyy i hi + +/-- On a composition-generated source with bounded atom lifts, the +positive-table map reflects every finite dimension bound. -/ +theorem dimensionLE_of_expression_image {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ i, F.toFun (g i) = B.atomCell i) + (hd : ∀ i, C.DimensionLE i.1 (g i)) + {x : C} (t : CompositionExpression C g x) (n : ℕ) + (hx : K.realization.DimensionLE n (F.toFun x)) : C.DimensionLE n x := + t.dimensionLE (fun i => i.1) hd n (B.expression_labels_bounded g F hg t n hx) + +/-- Ordinary composition generation by atom lifts is dimensionwise: +an n-cell has an expression using only the generators of degree at most n. -/ +theorem exists_bounded_expression {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ i, F.toFun (g i) = B.atomCell i) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) + (n : ℕ) (x : C) (hx : C.DimensionLE n x) : + ∃ t : CompositionExpression C g x, ∀ i ∈ t.labels, i.1 ≤ n := by + obtain ⟨t⟩ := hgen x + exact ⟨t, B.expression_labels_bounded g F hg t n (F.dimensionLE hx)⟩ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Chain maps agree after mapping into a truncated strict category + +Agreement of directed chain maps through degree n gives equal n-faces +on every positive table. A strict functor to an n-truncated target then +identifies the complete cells. No generation or freeness theorem is used. +-/ + +namespace Thomason.Construction.DirectedComplex + +open CategoryTheory + +universe u + +variable {K L : DirectedComplex.{u}} + +/-- Low-degree agreement fixes every chosen n-face of the images. -/ +theorem realization_face_eq_of_agree_through + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k ≤ n → f.app k = g.app k) + (a : Bool) (x : K.realization) : + L.realization.face a n (f.realization x) = + L.realization.face a n (g.realization x) := by + apply Cell.ext + funext b k + change Cell.cutTable (Cell.map f x) a n b k = Cell.cutTable (Cell.map g x) a n b k + by_cases hkn : k < n + · simp only [Cell.cutTable, hkn, ite_true] + change f.app k (x.table b k) = g.app k (x.table b k) + rw [hfg k hkn.le] + · by_cases he : k = n + · subst k + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + change f.app n (x.table a n) = g.app n (x.table a n) + rw [hfg n le_rfl] + · simp only [Cell.cutTable, hkn, he, ite_false] + +/-- Any strict functor to an n-truncated target identifies directed chain +maps which agree through degree n. -/ +theorem realization_comp_eq_of_agree_through + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k ≤ n → f.app k = g.app k) + {Y : StrictOmegaCategory.{u}} (hY : Y.IsTruncated n) (H : L.realization ⟶ Y) : + f.realization ≫ H = g.realization ≫ H := by + apply StrictOmegaCategory.Hom.ext + funext x + have hface (z : L.realization) : H.toFun (L.realization.face false n z) = H.toFun z := + (H.map_face false n z).trans (hY (H.toFun z)).1 + exact (hface (f.realization x)).symm.trans + ((congrArg H.toFun (realization_face_eq_of_agree_through f g hfg false x)).trans + (hface (g.realization x))) + +/-- Tensoring with the right interval preserves degreewise agreement +through the same bound. -/ +theorem rightCylinderMap_agree_through + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k ≤ n → f.app k = g.app k) : + ∀ k, k ≤ n → (RightCylinder.map f).app k = (RightCylinder.map g).app k := by + intro k hk + apply AddMonoidHom.ext + intro x + cases k with + | zero => + change (f.app 0 x.1, f.app 0 x.2) = (g.app 0 x.1, g.app 0 x.2) + rw [hfg 0 hk] + | succ k => + change (f.app (k+1) x.1, f.app (k+1) x.2.1, f.app k x.2.2) = + (g.app (k+1) x.1, g.app (k+1) x.2.1, g.app k x.2.2) + rw [hfg (k+1) hk, hfg k ((Nat.le_succ k).trans hk)] + +/-- The corresponding exact comparison for right-cylinder realizations. -/ +theorem rightCylinder_realization_comp_eq_of_agree_through + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k ≤ n → f.app k = g.app k) + {Y : StrictOmegaCategory.{u}} (hY : Y.IsTruncated n) + (H : (rightCylinder L).realization ⟶ Y) : + (RightCylinder.map f).realization ≫ H = (RightCylinder.map g).realization ≫ H := + realization_comp_eq_of_agree_through _ _ (rightCylinderMap_agree_through f g hfg) hY H + +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # Positive chain bridges detect equality in truncated targets + +An explicit positive chain in degree n+1 joins prescribed n-faces. Such a +bridge is killed by every strict functor into an n-truncated category. +This allows degree-n maps to differ by a positive boundary. +-/ + +namespace Thomason.Construction.DirectedComplex + +open CategoryTheory + +universe u + +namespace Cell + +variable {K : DirectedComplex.{u}} (x y : Cell K) (n : ℕ) + (z : K.group (n+1)) + +def bridgeTable (a : Bool) (k : ℕ) : K.group k := + if k ≤ n then if a then y.table true k else x.table false k + else if h : k = n+1 then h.symm ▸ z else 0 + +/-- A positive (n+1)-chain and common lower faces form a literal cell. -/ +def bridge (hz : z ∈ K.positive (n+1)) + (hxy : ∀ k, k < n → ∀ a, x.table a k = y.table a k) + (hd : K.differential n z = y.table true n - x.table false n) : Cell K where + table := bridgeTable x y n z + positive a k := by + unfold bridgeTable + split_ifs with hk he + · exact y.positive true k + · exact x.positive false k + · subst k + exact hz + · exact (K.positive k).zero_mem + augmentation a := by + cases a <;> simp only [bridgeTable, Nat.zero_le, ite_true, Bool.false_eq_true, + ite_false, x.augmentation, y.augmentation] + boundary a k := by + by_cases hkn : k < n + · have hk : k ≤ n := hkn.le + have hk' : k+1 ≤ n := hkn + cases a <;> simp only [bridgeTable, hk, hk', ite_true, Bool.false_eq_true, ite_false] + · rw [x.boundary, hxy k hkn true] + · rw [y.boundary, hxy k hkn false] + · by_cases he : k = n + · subst k + have hn : ¬n+1 ≤ n := Nat.not_succ_le_self n + cases a <;> simpa [bridgeTable, hn] using hd + · have hk : ¬k ≤ n := by omega + have hk' : ¬k+1 ≤ n := by omega + simp [bridgeTable, hk, hk', he] + finite_support := ⟨n+1, fun k hk a => by + have hkn : ¬k ≤ n := by omega + have hkne : k ≠ n+1 := by omega + simp [bridgeTable, hkn, hkne]⟩ + +/-- The new cell has exactly the prescribed source n-face. -/ +theorem bridge_source (hz hxy hd) : + (bridge x y n z hz hxy hd).face false n = x.face false n := by + apply Cell.ext + funext a k + by_cases hk : k < n + · simp only [face_table, cutTable, hk, ite_true, bridge, bridgeTable, hk.le] + cases a + · rfl + · exact (hxy k hk true).symm + · by_cases he : k = n + · subst k + simp only [face_table, cutTable, Nat.lt_irrefl, ite_false, ite_true, + bridge, bridgeTable, le_refl, Bool.false_eq_true] + · simp only [face_table, cutTable, hk, he, ite_false] + +/-- The new cell has exactly the prescribed target n-face. -/ +theorem bridge_target (hz hxy hd) : + (bridge x y n z hz hxy hd).face true n = y.face true n := by + apply Cell.ext + funext a k + by_cases hk : k < n + · simp only [face_table, cutTable, hk, ite_true, bridge, bridgeTable, hk.le] + cases a + · exact hxy k hk false + · rfl + · by_cases he : k = n + · subst k + simp only [face_table, cutTable, Nat.lt_irrefl, ite_false, ite_true, + bridge, bridgeTable, le_refl] + · simp only [face_table, cutTable, hk, he, ite_false] + +end Cell + +/-- Positive degree-(n+1) bridges suffice when the chain maps agree only +strictly below n. This is stronger than agreement through degree n. -/ +theorem realization_comp_eq_of_positive_degree_bridge + {K L : DirectedComplex.{u}} (f g : Hom K L) {n : ℕ} + (hfg : ∀ k, k < n → f.app k = g.app k) + (hbridge : ∀ v : K.group n, v ∈ K.positive n → + ∃ z : L.group (n+1), z ∈ L.positive (n+1) ∧ + L.differential n z = g.app n v - f.app n v) + {Y : StrictOmegaCategory.{u}} (hY : Y.IsTruncated n) (H : L.realization ⟶ Y) : + f.realization ≫ H = g.realization ≫ H := by + apply StrictOmegaCategory.Hom.ext + funext x + obtain ⟨z, hz, hdz⟩ := hbridge (x.table false n) (x.positive false n) + let z' := g.app (n+1) (x.table false (n+1)) + z + have hz' : z' ∈ L.positive (n+1) := + (L.positive (n+1)).add_mem (g.positive _ (x.positive _ _)) hz + have hxy : ∀ k, k < n → ∀ a, + (Cell.map f x).table a k = (Cell.map g x).table a k := by + intro k hk a + change f.app k (x.table a k) = g.app k (x.table a k) + rw [hfg k hk] + have hd' : L.differential n z' = + (Cell.map g x).table true n - (Cell.map f x).table false n := by + change L.differential n (g.app (n+1) (x.table false (n+1)) + z) = + g.app n (x.table true n) - f.app n (x.table false n) + rw [map_add, ← g.differential, x.boundary, map_sub, hdz] + abel + let b := Cell.bridge (Cell.map f x) (Cell.map g x) n z' hz' hxy hd' + have hs : b.face false n = (Cell.map f x).face false n := + Cell.bridge_source _ _ _ _ hz' hxy hd' + have ht : b.face true n = (Cell.map g x).face true n := + Cell.bridge_target _ _ _ _ hz' hxy hd' + have hface (c : L.realization) (a : Bool) : + H.toFun (c.face a n) = H.toFun c := by + exact (H.map_face a n c).trans (by cases a; exact (hY _).1; exact (hY _).2) + calc + H.toFun (Cell.map f x) = H.toFun ((Cell.map f x).face false n) := (hface _ false).symm + _ = H.toFun (b.face false n) := congrArg H.toFun hs.symm + _ = H.toFun b := hface b false + _ = H.toFun (b.face true n) := (hface b true).symm + _ = H.toFun ((Cell.map g x).face true n) := congrArg H.toFun ht + _ = H.toFun (Cell.map g x) := hface _ true + +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # A finite height for signed simplex faces + +The alternating ternary height puts every negative boundary basis below +its simplex and every positive boundary basis above it. These finite +inequalities are the ordering input for the remaining atom decomposition. +-/ + +namespace Thomason.Construction.SimplexComplex + +/-- Weights are listed in strictly decreasing order. -/ +def alternatingHeight : List ℕ → ℤ + | [] => 0 + | w :: ws => -(3 : ℤ)^w - alternatingHeight ws + +/-- The leading ternary weight controls the entire alternating tail. -/ +theorem alternatingHeight_bounds {w : ℕ} {ws : List ℕ} + (hs : (w :: ws).Pairwise (· > ·)) : + -(3 : ℤ)^w ≤ alternatingHeight (w :: ws) ∧ + alternatingHeight (w :: ws) < 0 := by + induction ws generalizing w with + | nil => + have hp : 0 < (3 : ℤ)^w := pow_pos (by norm_num) _ + simp only [alternatingHeight] + constructor <;> omega + | cons v vs ih => + obtain ⟨hw, ht⟩ := List.pairwise_cons.mp hs + obtain ⟨hb, hn⟩ := ih ht + have hvw : v < w := hw v (by simp) + have hp : (3 : ℤ)^v < 3^w := pow_lt_pow_right₀ (by norm_num) hvw + change -(3 : ℤ)^w ≤ -(3 : ℤ)^w - alternatingHeight (v :: vs) ∧ + -(3 : ℤ)^w - alternatingHeight (v :: vs) < 0 + constructor <;> omega + +/-- Removing the leading vertex strictly increases the height. The factor +three leaves room for both copies of every remaining signed tail. -/ +theorem alternatingHeight_remove_head {w : ℕ} {ws : List ℕ} + (hs : (w :: ws).Pairwise (· > ·)) : + 0 < alternatingHeight ws - alternatingHeight (w :: ws) := by + cases ws with + | nil => + simp [alternatingHeight] + | cons v vs => + obtain ⟨hw, ht⟩ := List.pairwise_cons.mp hs + have hvw : v < w := hw v (by simp) + have hb := (alternatingHeight_bounds ht).1 + have hp : (3 : ℤ)^(v+1) ≤ 3^w := + pow_le_pow_right₀ (by norm_num) (Nat.succ_le_of_lt hvw) + have hpos : 0 < (3 : ℤ)^v := pow_pos (by norm_num) _ + rw [pow_succ] at hp + change 0 < alternatingHeight (v :: vs) - + (-(3 : ℤ)^w - alternatingHeight (v :: vs)) + omega + +/-- Deleting position i changes height with exactly the boundary sign +(-1)^i. In particular no signed boundary relation can form a cycle. -/ +theorem alternatingHeight_eraseIdx (ws : List ℕ) (hs : ws.Pairwise (· > ·)) + (i : ℕ) (hi : i < ws.length) : + 0 < (-1 : ℤ)^i * (alternatingHeight (ws.eraseIdx i) - alternatingHeight ws) := by + induction ws generalizing i with + | nil => simp at hi + | cons w ws ih => + cases i with + | zero => simpa using alternatingHeight_remove_head hs + | succ i => + have hh := ih (List.pairwise_cons.mp hs).2 i (by simpa using hi) + calc + _ = (-1 : ℤ)^i * (alternatingHeight (ws.eraseIdx i) - alternatingHeight ws) := by + simp only [List.eraseIdx_cons_succ, alternatingHeight, pow_succ] + ring + _ > 0 := hh + +end Thomason.Construction.SimplexComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Chains/SimplexChainHeight.lean b/lean/OAI/CategoryTheory/Thomason/Chains/SimplexChainHeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a99c3dccbb9ea8f543065e325a76b5cc5653b66 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Chains/SimplexChainHeight.lean @@ -0,0 +1,301 @@ +import OAI.CategoryTheory.Thomason.Gray.CylinderAssembly +import OAI.CategoryTheory.Thomason.Simplicial.RealizedSimplexWeakEquivalences +import OAI.CategoryTheory.Thomason.Simplicial.SimplicialSpanFactorization + +namespace OAI + +section + +/-! # Support separation for simplex cones + +The old simplex basis and the coned basis have disjoint images: their last +vertices are respectively before, and equal to, the new final vertex. +Consequently taking positive or negative parts commutes with the two basis +embeddings and with sums across these two images. +-/ + +namespace Thomason.Construction.SimplexComplex + +/-- Embed a basis simplex into the old face. -/ +def prefixBasis {m p : ℕ} (s : Basis m p) : Basis (m + 1) p := + s.trans Fin.castSuccOrderEmb + +/-- Append the new final vertex to a basis simplex. -/ +def coneBasis {m p : ℕ} (s : Basis m p) : Basis (m + 1) (p + 1) := + OrderEmbedding.ofStrictMono + (Fin.snoc (fun i => (s i).castSucc) (Fin.last (m + 1))) (by + intro i j hij + obtain ⟨i, rfl⟩ | rfl := i.eq_castSucc_or_eq_last + · obtain ⟨j, rfl⟩ | rfl := j.eq_castSucc_or_eq_last + · simpa only [Fin.snoc_castSucc, Fin.castSucc_lt_castSucc_iff] using s.strictMono hij + · simpa only [Fin.snoc_castSucc, Fin.snoc_last] using Fin.castSucc_lt_last (s i) + · exact (not_lt_of_ge (Fin.le_last _) hij).elim) + +@[simp] +theorem coneBasis_castSucc {m p : ℕ} (s : Basis m p) (i : Fin (p + 1)) : + coneBasis s i.castSucc = (s i).castSucc := by + change Fin.snoc (α := fun _ => Fin (m + 2)) (fun j => (s j).castSucc) (Fin.last (m + 1)) i.castSucc = _ + simp + +@[simp] +theorem coneBasis_last {m p : ℕ} (s : Basis m p) : + coneBasis s (Fin.last (p + 1)) = Fin.last (m + 1) := by + change Fin.snoc (α := fun _ => Fin (m + 2)) (fun j => (s j).castSucc) (Fin.last (m + 1)) (Fin.last (p + 1)) = _ + simp + +/-- Both changes of basis are injective. -/ +theorem prefixBasis_injective (m p : ℕ) : Function.Injective (@prefixBasis m p) := by + intro s t he + apply DFunLike.ext + intro i + exact Fin.castSucc_injective _ (congrArg (fun b : Basis (m + 1) p => b i) he) + +theorem coneBasis_injective (m p : ℕ) : Function.Injective (@coneBasis m p) := by + intro s t he + apply DFunLike.ext + intro i + apply Fin.castSucc_injective + exact (coneBasis_castSucc s i).symm.trans + ((congrArg (fun b : Basis (m + 1) (p + 1) => b i.castSucc) he).trans + (coneBasis_castSucc t i)) + +def prefixBasisEmbedding (m p : ℕ) : Basis m p ↪ Basis (m + 1) p := + ⟨prefixBasis, prefixBasis_injective m p⟩ + +def coneBasisEmbedding (m p : ℕ) : Basis m p ↪ Basis (m + 1) (p + 1) := + ⟨coneBasis, coneBasis_injective m p⟩ + +/-- The old-face chain map is precisely extension along the basis embedding. -/ +theorem mapChains_coneInclusion {m p : ℕ} (x : Chains m p) : + mapChains (coneInclusion m) p x = Finsupp.embDomain (prefixBasisEmbedding m p) x := by + induction x using Finsupp.induction with + | zero => simp + | @single_add s z x _ _ ih => + have hs : mapBasis (coneInclusion m) p s = Finsupp.single (prefixBasis s) 1 := by + have hmono : StrictMono (fun i => coneInclusion m (s i)) := by + intro i j hij + exact s.strictMono hij + rw [mapBasis, dite_eq_left hmono] + rfl + simp only [map_add, mapChains_single, hs, ih, Finsupp.embDomain_add, + Finsupp.embDomain_single, Finsupp.smul_single, smul_eq_mul, mul_one] + rfl + +/-- A cone prism is a single basis embedding, without cancellations. -/ +theorem prismBasis_cone {m p : ℕ} (s : Basis m p) : + prismBasis (coneInclusion m) (coneVertex m) (cone_le m) p s = + Finsupp.single (coneBasis s) 1 := by + have he : append ((coneInclusion m).comp s.toOrderHom) + ((coneVertex m) (s (Fin.last p))) (cone_le m _) = (coneBasis s).toOrderHom := by + apply DFunLike.ext + intro i + induction i using Fin.lastCases with + | last => exact (append_last _ _ _).trans (coneBasis_last s).symm + | cast i => exact (append_castSucc _ _ _ i).trans (coneBasis_castSucc s i).symm + calc + _ = tuple (append ((coneInclusion m).comp s.toOrderHom) + ((coneVertex m) (s (Fin.last p))) (cone_le m _)) := rfl + _ = tuple (coneBasis s).toOrderHom := congrArg tuple he + _ = _ := by + have hmono : StrictMono (fun i => (coneBasis s).toOrderHom (top (p + 1) i)) := by + intro i j hij + exact (coneBasis s).strictMono hij + rw [tuple, mapBasis, dite_eq_left hmono] + rfl + +/-- The cone operator is extension along the coned-basis embedding. -/ +theorem prism_cone {m p : ℕ} (x : Chains m p) : + prism (coneInclusion m) (coneVertex m) (cone_le m) p x = + Finsupp.embDomain (coneBasisEmbedding m p) x := by + induction x using Finsupp.induction with + | zero => simp + | @single_add s z x _ _ ih => + simp only [map_add, prism_single, prismBasis_cone, ih, Finsupp.embDomain_add, + Finsupp.embDomain_single, Finsupp.smul_single, smul_eq_mul, mul_one] + rfl + +/-- Positive and negative parts commute with embedding a chain in the old face. -/ +theorem signedPart_prefix {m p : ℕ} (a : Bool) (x : Chains m p) : + signedPart a (mapChains (coneInclusion m) p x) = + mapChains (coneInclusion m) p (signedPart a x) := by + rw [mapChains_coneInclusion, mapChains_coneInclusion] + exact (Finsupp.embDomain_mapRange _ _ _ _).symm + +/-- Positive and negative parts commute with coning a chain. -/ +theorem signedPart_cone {m p : ℕ} (a : Bool) (x : Chains m p) : + signedPart a (prism (coneInclusion m) (coneVertex m) (cone_le m) p x) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p (signedPart a x) := by + rw [prism_cone, prism_cone] + exact (Finsupp.embDomain_mapRange _ _ _ _).symm + +/-- An old-face basis simplex cannot contain the new final vertex. -/ +theorem prefixBasis_ne_coneBasis {m p : ℕ} (s : Basis m (p + 1)) (t : Basis m p) : + prefixBasis s ≠ coneBasis t := by + intro he + have hl := congrArg (fun b : Basis (m + 1) (p + 1) => b (Fin.last (p + 1))) he + change (s (Fin.last (p + 1))).castSucc = coneBasis t (Fin.last (p + 1)) at hl + rw [coneBasis_last] at hl + exact Fin.castSucc_ne_last _ hl + +/-- The two chain operators have disjoint coefficient support. -/ +theorem prefix_cone_disjoint {m p : ℕ} (x : Chains m (p + 1)) (y : Chains m p) + (b : Basis (m + 1) (p + 1)) : + mapChains (coneInclusion m) (p + 1) x b = 0 ∨ + prism (coneInclusion m) (coneVertex m) (cone_le m) p y b = 0 := by + classical + by_cases hb : b ∈ Set.range (prefixBasisEmbedding m (p + 1)) + · right + obtain ⟨s, rfl⟩ := hb + rw [prism_cone] + apply Finsupp.embDomain_of_notMem_range + rintro ⟨t, ht⟩ + exact prefixBasis_ne_coneBasis s t ht.symm + · left + rw [mapChains_coneInclusion] + exact Finsupp.embDomain_of_notMem_range _ _ _ hb + +/-- Disjoint supports allow positive and negative parts to distribute. -/ +theorem signedPart_add_of_disjoint {m p : ℕ} (a : Bool) (x y : Chains m p) + (hxy : ∀ b, x b = 0 ∨ y b = 0) : + signedPart a (x + y) = signedPart a x + signedPart a y := by + apply Finsupp.ext + intro b + rcases hxy b with hx | hy + · simp [signedPart, hx] + · simp [signedPart, hy] + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Height bounds propagate through signed positive-chain boundaries + +A negative coefficient in the boundary of a positive chain has a negative +incidence witness in its support, and similarly for a positive coefficient. +The explicit basis height therefore controls the iterated sides of atoms. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +theorem differential_coefficient_sum {m p : ℕ} (x : Chains m (p+1)) (b : Basis m p) : + differential m p x b = ∑ c ∈ x.support, x c * differentialBasis m p c b := by + simp only [differential, Finsupp.linearCombination_apply, Finsupp.sum, + Finsupp.finsetSum_apply, Finsupp.smul_apply, smul_eq_mul] + +/-- Negative boundary support comes from a negative basis incidence. -/ +theorem negative_boundary_witness {m p : ℕ} (x : Chains m (p+1)) + (hx : x ∈ positive m (p+1)) (b : Basis m p) + (hb : differential m p x b < 0) : + ∃ c ∈ x.support, differentialBasis m p c b < 0 := by + classical + by_contra hn + have hs : 0 ≤ ∑ c ∈ x.support, x c * differentialBasis m p c b := by + apply Finset.sum_nonneg + intro c hc + apply mul_nonneg (hx c) + exact le_of_not_gt (fun h => hn ⟨c, hc, h⟩) + rw [← differential_coefficient_sum] at hs + omega + +/-- Positive boundary support comes from a positive basis incidence. -/ +theorem positive_boundary_witness {m p : ℕ} (x : Chains m (p+1)) + (hx : x ∈ positive m (p+1)) (b : Basis m p) + (hb : 0 < differential m p x b) : + ∃ c ∈ x.support, 0 < differentialBasis m p c b := by + classical + by_contra hn + have hs : (∑ c ∈ x.support, x c * differentialBasis m p c b) ≤ 0 := by + apply Finset.sum_nonpos + intro c hc + apply mul_nonpos_of_nonneg_of_nonpos (hx c) + exact le_of_not_gt (fun h => hn ⟨c, hc, h⟩) + rw [← differential_coefficient_sum] at hs + omega + +/-- Taking a negative signed boundary lowers all supporting basis heights. -/ +theorem negative_part_height {m p : ℕ} (x : Chains m (p+1)) + (hx : x ∈ positive m (p+1)) (R : ℤ) + (hr : ∀ c ∈ x.support, basisHeight c ≤ R) (b : Basis m p) + (hb : b ∈ (signedPart false (differential m p x)).support) : basisHeight b < R := by + have hcoeff : differential m p x b < 0 := by + have hh := Finsupp.mem_support_iff.mp hb + change max 0 (-differential m p x b) ≠ 0 at hh + omega + obtain ⟨c, hc, hcb⟩ := negative_boundary_witness x hx b hcoeff + exact (negative_boundary_height c b hcb).trans_le (hr c hc) + +/-- Taking a positive signed boundary raises all supporting basis heights. -/ +theorem positive_part_height {m p : ℕ} (x : Chains m (p+1)) + (hx : x ∈ positive m (p+1)) (R : ℤ) + (hr : ∀ c ∈ x.support, R ≤ basisHeight c) (b : Basis m p) + (hb : b ∈ (signedPart true (differential m p x)).support) : R < basisHeight b := by + have hcoeff : 0 < differential m p x b := by + have hh := Finsupp.mem_support_iff.mp hb + change max 0 (differential m p x b) ≠ 0 at hh + omega + obtain ⟨c, hc, hcb⟩ := positive_boundary_witness x hx b hcoeff + exact (hr c hc).trans_lt (positive_boundary_height c b hcb) + +/-- The two entire iterated sides of a basis atom remain on their specified +side of its height. -/ +theorem basisAtom_side_bounds {h : NormalizedSimplexIdentities} {m p : ℕ} + {b : Basis m p} {x : h.object m} (hx : IsBasisAtom h b x) + (side : Bool) (n : ℕ) (hn : n ≤ p) (c : Basis m n) (hc : c ∈ (x.table side n).support) : + if side then basisHeight b ≤ basisHeight c else basisHeight c ≤ basisHeight b := by + induction hn using Nat.decreasingInduction with + | self => + have he : c = b := by + by_contra hne + have hh := Finsupp.mem_support_iff.mp hc + rw [hx.1 side, Finsupp.single_eq_of_ne hne] at hh + exact hh rfl + subst c + cases side <;> exact le_rfl + | of_succ k hk ih => + rw [hx.2.1 side k hk] at hc + cases side with + | false => + exact (negative_part_height (x.table false (k+1)) (x.positive false (k+1)) + (basisHeight b) ih c hc).le + | true => + exact (positive_part_height (x.table true (k+1)) (x.positive true (k+1)) + (basisHeight b) ih c hc).le + +/-- Below the atom's dimension the height inequalities are strict. -/ +theorem basisAtom_side_height {h : NormalizedSimplexIdentities} {m p : ℕ} + {b : Basis m p} {x : h.object m} (hx : IsBasisAtom h b x) + (side : Bool) (n : ℕ) (hn : n < p) (c : Basis m n) (hc : c ∈ (x.table side n).support) : + if side then basisHeight b < basisHeight c else basisHeight c < basisHeight b := by + rw [hx.2.1 side n hn] at hc + cases side with + | false => + exact negative_part_height (x.table false (n+1)) (x.positive false (n+1)) + (basisHeight b) (fun c hc => basisAtom_side_bounds hx false (n+1) hn c hc) c hc + | true => + exact positive_part_height (x.table true (n+1)) (x.positive true (n+1)) + (basisHeight b) (fun c hc => basisAtom_side_bounds hx true (n+1) hn c hc) c hc + +/-- Increasingly ordered atoms have precisely the disjoint boundary supports +required by the positive binary splitting construction. -/ +theorem ordered_basisAtoms_disjoint {h : NormalizedSimplexIdentities} {m p q r : ℕ} + {a : Basis m p} {b : Basis m q} {A B : h.object m} + (hA : IsBasisAtom h a A) (hB : IsBasisAtom h b B) + (hp : r < p) (hq : r < q) (hab : basisHeight a ≤ basisHeight b) (c : Basis m r) : + A.table false r c = 0 ∨ B.table true r c = 0 := by + by_cases ha : A.table false r c = 0 + · exact Or.inl ha + · right + by_contra hb + have hca := basisAtom_side_height hA false r hp c (Finsupp.mem_support_iff.mpr ha) + have hbc := basisAtom_side_height hB true r hq c (Finsupp.mem_support_iff.mpr hb) + exact (not_lt_of_ge hab) (hbc.trans hca) + +end Thomason.Construction.SimplexComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CoherentGluing.lean b/lean/OAI/CategoryTheory/Thomason/CoherentGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f5c0d70de09655eba80749144e5a7202dfd65f6 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CoherentGluing.lean @@ -0,0 +1,804 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.FiniteAttachments +import OAI.CategoryTheory.Thomason.SubdividedUnit + +namespace OAI + +/-! Coherent Gluing. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.KanLocal +open CategoryTheory Limits MonoidalCategory CartesianMonoidalCategory MonoidalClosed Simplicial +open LastVertexProof KanHomotopy + +lemma heq_id (X : SSet.{u}) : IsHomotopyEquivalence (𝟙 X) := + ⟨𝟙 X, by simpa using homotopic_refl (𝟙 X), by simpa using homotopic_refl (𝟙 X)⟩ + +lemma heq_of_isIso {X Y : SSet.{u}} (f : X ⟶ Y) [IsIso f] : + IsHomotopyEquivalence f := by + refine ⟨inv f, ?_, ?_⟩ <;> simp only [IsIso.hom_inv_id, IsIso.inv_hom_id] + · exact homotopic_refl _ + · exact homotopic_refl _ + +lemma heq_comp {X Y Z : SSet.{u}} {f : X ⟶ Y} {g : Y ⟶ Z} + (hf : IsHomotopyEquivalence f) (hg : IsHomotopyEquivalence g) : + IsHomotopyEquivalence (f ≫ g) := by + obtain ⟨f', hff',hf'f⟩ := hf + obtain ⟨g', hgg',hg'g⟩ := hg + refine ⟨g' ≫ f', ?_, ?_⟩ + · have h := homotopic_post (homotopic_pre f hgg') f' + simp only [Category.comp_id, Category.assoc] at h ⊢ + exact homotopic_trans h hff' + · have h := homotopic_post (homotopic_pre g' hf'f) g + simp only [Category.comp_id, Category.assoc] at h ⊢ + exact homotopic_trans h hg'g + +lemma heq_homotopic {X Y : SSet.{u}} {f g : X ⟶ Y} + (h : Homotopic f g) (hf : IsHomotopyEquivalence f) : IsHomotopyEquivalence g := by + obtain ⟨k,h₀,h₁⟩ := hf + exact ⟨k, homotopic_trans (homotopic_symm (homotopic_post h k)) h₀, + homotopic_trans (homotopic_symm (homotopic_pre k h)) h₁⟩ + +lemma heq_of_rlp {X Y : SSet.{u}} (f : X ⟶ Y) + (hf : (MorphismProperty.monomorphisms SSet).rlp f) : IsHomotopyEquivalence f := by + have : HasLiftingProperty (initial.to Y) f := hf _ (by infer_instance) + let sq : CommSq (initial.to X) (initial.to Y) f (𝟙 Y) := ⟨by simp⟩ + let g := sq.lift + have hg : g ≫ f = 𝟙 Y := sq.fac_right + have : HasLiftingProperty (SimplicialCylinder.endsInclusion X) f := hf _ (by infer_instance) + let s : CommSq (SimplicialCylinder.endsMap (f ≫ g) (𝟙 X)) + (SimplicialCylinder.endsInclusion X) f (fst X Δ[1] ≫ f) := ⟨by + ext n x + cases x with + | inl x => exact congrArg (fun q : Y ⟶ Y => (f ≫ q).app n x) hg + | inr x => rfl⟩ + have h₀ : SSet.ι₀ ≫ s.lift = f ≫ g := by + ext n x + exact congrArg (fun q => q.app n (Sum.inl x)) s.fac_left + have h₁ : SSet.ι₁ ≫ s.lift = 𝟙 X := by + ext n x + exact congrArg (fun q => q.app n (Sum.inr x)) s.fac_left + refine ⟨g, homotopic_of_homotopy (CoherentGluing.toHomotopy s.lift h₀ h₁), ?_⟩ + rw [hg] + exact homotopic_refl _ + +lemma pre_rlp_of_anodyne {A B : SSet.{u}} (f : A ⟶ B) + (hf : SSet.anodyneExtensions f) (K : SSet.{u}) [SSet.KanComplex K] : + (MorphismProperty.monomorphisms SSet).rlp ((pre f).app K) := by + intro X Y i hi + let : Mono i := hi + let pp := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) f i + let pb := Functor.PullbackObjObj.ofIsTerminal + MonoidalClosed.internalHom f (terminal.from K) terminalIsTerminal + exact (internalHomAdjunction₂.hasLiftingProperty_iff pp pb).mp + (SSet.anodyneExtensions_pushoutObjObjι' pp hf (terminal.from K) + (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance)) + +def Local {A B : SSet.{u}} (f : A ⟶ B) : Prop := + ∀ (K : SSet.{u}), SSet.KanComplex K → IsHomotopyEquivalence ((pre f).app K) + +lemma local_anodyne {A B : SSet.{u}} (f : A ⟶ B) (hf : SSet.anodyneExtensions f) : + Local f := fun K _ => heq_of_rlp _ (pre_rlp_of_anodyne f hf K) + +lemma local_iso {A B : SSet.{u}} (f : A ⟶ B) [IsIso f] : Local f := by + intro K hK + change IsHomotopyEquivalence ((internalHom.map f.op).app K) + exact heq_of_isIso _ + +lemma local_comp {A B C : SSet.{u}} {f : A ⟶ B} {g : B ⟶ C} + (hf : Local f) (hg : Local g) : Local (f ≫ g) := by + intro K hK + simpa only [pre_map, NatTrans.comp_app] using heq_comp (hg K hK) (hf K hK) + +def preHomotopyMap {A B K : SSet.{u}} {f g : A ⟶ B} (H : SSet.Homotopy f g) : + A ⊗ ((ihom B).obj K ⊗ Δ[1]) ⟶ B ⊗ (ihom B).obj K := + lift (lift (fst _ _) (snd _ _ ≫ snd _ _) ≫ H.h) (snd _ _ ≫ fst _ _) + +lemma preHomotopyMap_zero {A B K : SSet.{u}} {f g : A ⟶ B} (H : SSet.Homotopy f g) : + A ◁ SSet.ι₀ ≫ preHomotopyMap (K := K) H = f ▷ (ihom B).obj K := by + apply CartesianMonoidalCategory.hom_ext + · simp only [Category.assoc, preHomotopyMap, lift_fst] + have h : A ◁ SSet.ι₀ ≫ lift (fst A _) (snd A _ ≫ snd _ Δ[1]) = + fst A ((ihom B).obj K) ≫ SSet.ι₀ := by rfl + rw [← Category.assoc, h, Category.assoc, H.h₀, whiskerRight_fst] + · rfl + +lemma preHomotopyMap_one {A B K : SSet.{u}} {f g : A ⟶ B} (H : SSet.Homotopy f g) : + A ◁ SSet.ι₁ ≫ preHomotopyMap (K := K) H = g ▷ (ihom B).obj K := by + apply CartesianMonoidalCategory.hom_ext + · simp only [Category.assoc, preHomotopyMap, lift_fst] + have h : A ◁ SSet.ι₁ ≫ lift (fst A _) (snd A _ ≫ snd _ Δ[1]) = + fst A ((ihom B).obj K) ≫ SSet.ι₁ := by rfl + rw [← Category.assoc, h, Category.assoc, H.h₁, whiskerRight_fst] + · rfl + +def preHomotopy {A B : SSet.{u}} {f g : A ⟶ B} (H : SSet.Homotopy f g) (K : SSet.{u}) : + SSet.Homotopy ((pre f).app K) ((pre g).app K) := + CoherentGluing.toHomotopy (curry (preHomotopyMap H ≫ (ihom.ev B).app K)) + (by apply uncurry_injective + rw [uncurry_natural_left, uncurry_curry, uncurry_pre, + ← Category.assoc, preHomotopyMap_zero]) + (by apply uncurry_injective + rw [uncurry_natural_left, uncurry_curry, uncurry_pre, + ← Category.assoc, preHomotopyMap_one]) + +lemma homotopic_pre_map {A B : SSet.{u}} {f g : A ⟶ B} (H : Homotopic f g) (K : SSet.{u}) : + Homotopic ((pre f).app K) ((pre g).app K) := by + induction H with + | rel f g H => exact homotopic_of_homotopy (preHomotopy H.some K) + | refl f => exact homotopic_refl _ + | symm f g _ ih => exact homotopic_symm ih + | trans f g h _ _ ih ih' => exact homotopic_trans ih ih' + +lemma local_homotopic {A B : SSet.{u}} {f g : A ⟶ B} (H : Homotopic f g) + (hf : Local f) : Local g := fun K hK => heq_homotopic (homotopic_pre_map H K) (hf K hK) + +lemma local_heq {A B : SSet.{u}} (f : A ⟶ B) (hf : IsHomotopyEquivalence f) : Local f := by + intro K hK + obtain ⟨g,hg,hh⟩ := hf + refine ⟨(pre g).app K, ?_, ?_⟩ + · simpa only [pre_map, NatTrans.comp_app, pre_id, NatTrans.id_app] using homotopic_pre_map hh K + · simpa only [pre_map, NatTrans.comp_app, pre_id, NatTrans.id_app] using homotopic_pre_map hg K + +def uncurryHomotopy {A T K : SSet.{u}} {f g : T ⟶ (ihom A).obj K} + (H : SSet.Homotopy f g) : SSet.Homotopy (uncurry f) (uncurry g) := + CoherentGluing.toHomotopy ((α_ A T Δ[1]).hom ≫ uncurry H.h) + (by rw [← Category.assoc] + change A ◁ SSet.ι₀ ≫ uncurry H.h = _ + rw [← uncurry_natural_left, H.h₀]) + (by rw [← Category.assoc] + change A ◁ SSet.ι₁ ≫ uncurry H.h = _ + rw [← uncurry_natural_left, H.h₁]) + +def curryHomotopy {A T K : SSet.{u}} {f g : A ⊗ T ⟶ K} + (H : SSet.Homotopy f g) : SSet.Homotopy (curry f) (curry g) := + CoherentGluing.toHomotopy (curry ((α_ A T Δ[1]).inv ≫ H.h)) + (by apply uncurry_injective + rw [uncurry_natural_left, uncurry_curry, uncurry_curry, ← Category.assoc] + change SSet.ι₀ ≫ H.h = f + exact H.h₀) + (by apply uncurry_injective + rw [uncurry_natural_left, uncurry_curry, uncurry_curry, ← Category.assoc] + change SSet.ι₁ ≫ H.h = g + exact H.h₁) + +lemma homotopic_uncurry {A T K : SSet.{u}} {f g : T ⟶ (ihom A).obj K} + (H : Homotopic f g) : Homotopic (uncurry f) (uncurry g) := by + induction H with + | rel f g H => exact homotopic_of_homotopy (uncurryHomotopy H.some) + | refl f => exact homotopic_refl _ + | symm f g _ ih => exact homotopic_symm ih + | trans f g h _ _ ih ih' => exact homotopic_trans ih ih' + +lemma homotopic_curry {A T K : SSet.{u}} {f g : A ⊗ T ⟶ K} + (H : Homotopic f g) : Homotopic (curry f) (curry g) := by + induction H with + | rel f g H => exact homotopic_of_homotopy (curryHomotopy H.some) + | refl f => exact homotopic_refl _ + | symm f g _ ih => exact homotopic_symm ih + | trans f g h _ _ ih ih' => exact homotopic_trans ih ih' + +lemma homotopic_uncurry' {A K : SSet.{u}} {f g : 𝟙_ SSet ⟶ (ihom A).obj K} + (H : Homotopic f g) : Homotopic (uncurry' f) (uncurry' g) := + homotopic_pre (ρ_ A).inv (homotopic_uncurry H) + +lemma homotopic_curry' {A K : SSet.{u}} {f g : A ⟶ K} + (H : Homotopic f g) : Homotopic (curry' f) (curry' g) := + homotopic_curry (homotopic_pre (ρ_ A).hom H) + +lemma uncurry'_pre {A B K : SSet.{u}} (f : A ⟶ B) (g : 𝟙_ SSet ⟶ (ihom B).obj K) : + uncurry' (g ≫ (pre f).app K) = f ≫ uncurry' g := by + simp only [uncurry', uncurry_pre_app] + rw [← Category.assoc] + rfl + +lemma curry'_pre {A B K : SSet.{u}} (f : A ⟶ B) (g : B ⟶ K) : + curry' (f ≫ g) = curry' g ≫ (pre f).app K := by + apply uncurry'_injective + rw [uncurry'_curry', uncurry'_pre, uncurry'_curry'] + +lemma precomp_surjective {A B K : SSet.{u}} (f : A ⟶ B) (hf : Local f) + [SSet.KanComplex K] (a : A ⟶ K) : ∃ b : B ⟶ K, Homotopic (f ≫ b) a := by + obtain ⟨g,hg,hh⟩ := hf K inferInstance + refine ⟨uncurry' (curry' a ≫ g), ?_⟩ + have H := homotopic_uncurry' (homotopic_pre (curry' a) hh) + simpa only [Category.comp_id, ← Category.assoc, uncurry'_pre, uncurry'_curry'] using H + +lemma precomp_injective {A B K : SSet.{u}} (f : A ⟶ B) (hf : Local f) + [SSet.KanComplex K] (a b : B ⟶ K) (H : Homotopic (f ≫ a) (f ≫ b)) : Homotopic a b := by + obtain ⟨g,hg,hh⟩ := hf K inferInstance + have H' := homotopic_post (homotopic_curry' H) g + rw [curry'_pre, curry'_pre] at H' + have h₀ := homotopic_pre (curry' a) hg + have h₁ := homotopic_pre (curry' b) hg + simp only [Category.comp_id, Category.assoc] at H' h₀ h₁ + have Q := homotopic_uncurry' (homotopic_trans (homotopic_symm h₀) (homotopic_trans H' h₁)) + simpa only [uncurry'_curry'] using Q + +lemma local_weak {A B : SSet.{u}} (f : A ⟶ B) (hf : Local f) : + simplicialWeakEquivalences f := by + let R := Subdivision.exInfinityFunctor + let eA : A ⟶ R.obj A := Subdivision.exInfinityComparison A + let eB : B ⟶ R.obj B := Subdivision.exInfinityComparison B + let : SSet.KanComplex (R.obj A) := Subdivision.exInfinity_kan A + let : SSet.KanComplex (R.obj B) := Subdivision.exInfinity_kan B + obtain ⟨t,Ht⟩ := precomp_surjective f hf eA + have Ht' := homotopic_post Ht (R.map f) + have he : eA ≫ R.map f = f ≫ eB := Subdivision.exInfinityInclusion_naturality f 0 + rw [he, Category.assoc] at Ht' + have H := precomp_injective f hf (t ≫ R.map f) eB Ht' + have hft : simplicialWeakEquivalences (f ≫ t) := + (homotopic_weak_iff Ht).mpr (Subdivision.exInfinityComparison_weak A) + have htr : simplicialWeakEquivalences (t ≫ R.map f) := + (homotopic_weak_iff H).mpr (Subdivision.exInfinityComparison_weak B) + exact simplicialWeakEquivalences.of_postcomp f t + (simplicialWeakEquivalences_middle f t (R.map f) hft htr) hft + +end Thomason.KanLocal + +end + +noncomputable section +universe u v w z + + +namespace Thomason.KanLocal +open CategoryTheory Limits MonoidalCategory CartesianMonoidalCategory MonoidalClosed Simplicial +open LastVertexProof KanHomotopy HornSubdivision +open SSet.modelCategoryQuillen + +lemma heq_of_precomp {A B C : SSet.{u}} (f : A ⟶ B) (g : B ⟶ C) + (hf : IsHomotopyEquivalence f) (hfg : IsHomotopyEquivalence (f ≫ g)) : + IsHomotopyEquivalence g := by + obtain ⟨f',h₀,h₁⟩ := hf + have hf' : IsHomotopyEquivalence f' := ⟨f,h₁,h₀⟩ + have H := homotopic_post h₁ g + simp only [Category.assoc, Category.id_comp] at H + exact heq_homotopic H (heq_comp hf' hfg) + +lemma heq_of_postcomp {A B C : SSet.{u}} (f : A ⟶ B) (g : B ⟶ C) + (hg : IsHomotopyEquivalence g) (hfg : IsHomotopyEquivalence (f ≫ g)) : + IsHomotopyEquivalence f := by + obtain ⟨g',h₀,h₁⟩ := hg + have hg' : IsHomotopyEquivalence g' := ⟨g,h₁,h₀⟩ + have H := homotopic_pre f h₀ + simp only [Category.comp_id, ← Category.assoc] at H + exact heq_homotopic H (heq_comp hfg hg') + +lemma homotopy_of_anodyne_eq_relative {A B K : SSet.{u}} (i : A ⟶ B) + (hi : SSet.anodyneExtensions i) [SSet.KanComplex K] + (f g : B ⟶ K) (h : i ≫ f = i ≫ g) : + ∃ H : SSet.Homotopy f g, i ▷ Δ[1] ≫ H.h = fst _ _ ≫ i ≫ f := by + let s := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i intervalEnds + let H : A ⊗ Δ[1] ⟶ K := fst _ _ ≫ i ≫ f + have hc : i ▷ SimplicialCylinder.Ends Δ[0] ≫ endsTensorMap f g = A ◁ intervalEnds ≫ H := by + ext k x + rcases x with ⟨x,y⟩ + cases y with + | inl y => rfl + | inr y => exact (congrArg (fun t : A ⟶ K => t.app k x) h).symm + let a : s.pt ⟶ K := s.isPushout.desc (endsTensorMap f g) H hc + have : HasLiftingProperty s.ι (terminal.from K) := + SSet.anodyneExtensions_pushoutObjObjι' s hi (terminal.from K) + (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance) + let lsq : CommSq a s.ι (terminal.from K) (terminal.from (B ⊗ Δ[1])) := ⟨by simp⟩ + have he : B ◁ intervalEnds ≫ lsq.lift = endsTensorMap f g := by + have hij : s.inl ≫ s.ι = B ◁ intervalEnds := s.inl_ι + rw [← hij, Category.assoc, lsq.fac_left] + exact s.isPushout.inl_desc _ _ _ + let Q : SSet.Homotopy f g := CoherentGluing.toHomotopy lsq.lift + (by ext k x + exact congrArg (fun t => t.app k (x, Sum.inl (SSet.stdSimplex.objMk (OrderHom.const _ 0)))) he) + (by ext k x + exact congrArg (fun t => t.app k (x, Sum.inr (SSet.stdSimplex.objMk (OrderHom.const _ 0)))) he) + refine ⟨Q, ?_⟩ + change i ▷ Δ[1] ≫ lsq.lift = H + have hij : s.inr ≫ s.ι = i ▷ Δ[1] := s.inr_ι + rw [← hij, Category.assoc, lsq.fac_left] + exact s.isPushout.inr_desc _ _ _ + +lemma anodyne_deformation {X Y : SSet.{u}} [SSet.KanComplex X] [SSet.KanComplex Y] + (i : X ⟶ Y) (hi : SSet.anodyneExtensions i) : + ∃ (r : Y ⟶ X) (H : SSet.Homotopy (𝟙 Y) (r ≫ i)), + i ≫ r = 𝟙 X ∧ i ▷ Δ[1] ≫ H.h = fst _ _ ≫ i := by + obtain ⟨r,hr⟩ := extend_anodyne i hi (𝟙 X) + obtain ⟨H,hH⟩ := homotopy_of_anodyne_eq_relative i hi (𝟙 Y) (r ≫ i) + (by simp [← Category.assoc, hr]) + exact ⟨r,H,hr,by simpa using hH⟩ + +lemma heq_anodyne {X Y : SSet.{u}} [SSet.KanComplex X] [SSet.KanComplex Y] + (i : X ⟶ Y) (hi : SSet.anodyneExtensions i) : IsHomotopyEquivalence i := by + obtain ⟨r,H,hr,_⟩ := anodyne_deformation i hi + refine ⟨r, ?_, homotopic_symm (homotopic_of_homotopy H)⟩ + rw [hr] + exact homotopic_refl _ + +lemma pullback_anodyne_heq {P X E Y : SSet.{u}} + [SSet.KanComplex X] [SSet.KanComplex Y] + {a : P ⟶ X} {j : P ⟶ E} {i : X ⟶ Y} {p : E ⟶ Y} + (sq : IsPullback a j i p) (hi : SSet.anodyneExtensions i) + (hp : simplicialFibrations p) : IsHomotopyEquivalence j := by + let : Mono i := KanQuillen.anodyne_monomorphism _ hi + let : Mono j := MorphismProperty.of_isPullback sq + (show (MorphismProperty.monomorphisms SSet) i from inferInstance) + obtain ⟨r,H,hr,hH⟩ := anodyne_deformation i hi + obtain ⟨Q,hQ,hQ₀,hQp⟩ := cylinder_lift j p hp 1 (𝟙 E) + (fst P Δ[1] ≫ j) (p ▷ Δ[1] ≫ H.h) + (by simp [endpoint_zero]) + (by rw [endpoint_zero, SSet.ι₀_comp_assoc, H.h₀, Category.comp_id, Category.id_comp]) + (by + calc + (fst P Δ[1] ≫ j) ≫ p = fst P Δ[1] ≫ a ≫ i := by rw [Category.assoc, ← sq.w] + _ = a ▷ Δ[1] ≫ i ▷ Δ[1] ≫ H.h := by rw [hH, whiskerRight_fst_assoc] + _ = j ▷ Δ[1] ≫ p ▷ Δ[1] ≫ H.h := by + rw [← Category.assoc, ← MonoidalCategory.comp_whiskerRight, sq.w, + MonoidalCategory.comp_whiskerRight, Category.assoc]) + let s : E ⟶ P := sq.lift (p ≫ r) (SSet.ι₁ ≫ Q) + (by simp only [Category.assoc]; rw [hQp, SSet.ι₁_comp_assoc, H.h₁]) + have hs : j ≫ s = 𝟙 P := by + apply sq.hom_ext + · simp only [Category.assoc, s, IsPullback.lift_fst, Category.id_comp] + rw [← Category.assoc, ← sq.w, Category.assoc, hr, Category.comp_id] + · simp only [Category.assoc, s, IsPullback.lift_snd, Category.id_comp] + rw [← SSet.ι₁_comp_assoc, hQ] + simp + refine ⟨s, ?_, ?_⟩ + · rw [hs] + exact homotopic_refl _ + · have H' : SSet.Homotopy (𝟙 E) (s ≫ j) := + CoherentGluing.toHomotopy Q (by simpa [endpoint_zero] using hQ₀) + (by simp [s]) + exact homotopic_symm (homotopic_of_homotopy H') + +lemma pullback_heq {P X E Y : SSet.{u}} + [SSet.KanComplex X] [SSet.KanComplex Y] + {a : P ⟶ X} {j : P ⟶ E} {f : X ⟶ Y} {p : E ⟶ Y} + (sq : IsPullback a j f p) (hf : IsHomotopyEquivalence f) + (hp : simplicialFibrations p) : IsHomotopyEquivalence j := by + let d := MorphismProperty.factorizationData SSet.modelCategoryQuillen.J.rlp.llp + SSet.modelCategoryQuillen.J.rlp f + let : HomotopicalAlgebra.Fibration d.p := by + rw [HomotopicalAlgebra.fibration_iff, SSet.modelCategoryQuillen.fibrations_eq] + exact d.hp + let : SSet.KanComplex d.Z := HomotopicalAlgebra.isFibrant_of_fibration d.p + have hd : IsHomotopyEquivalence d.p := heq_of_precomp d.i d.p + (heq_anodyne d.i d.hi) (d.fac.symm ▸ hf) + have hd' := rlp_of_homotopy_equivalence d.p d.hp hd + let b := pullback.fst d.p p + let c := pullback.snd d.p p + have sq₀ : IsPullback b c d.p p := IsPullback.of_hasPullback d.p p + let k : P ⟶ pullback d.p p := sq₀.lift (a ≫ d.i) j + (by rw [Category.assoc, d.fac, sq.w]) + have hk₀ : k ≫ b = a ≫ d.i := sq₀.lift_fst _ _ _ + have hk₁ : k ≫ c = j := sq₀.lift_snd _ _ _ + have sq₁ : IsPullback a k d.i b := by + have sq' : IsPullback a (k ≫ c) (d.i ≫ d.p) p := by rw [hk₁, d.fac]; exact sq + exact sq'.of_bot hk₀.symm sq₀ + have hb : simplicialFibrations b := by + change SSet.modelCategoryQuillen.J.rlp b + exact MorphismProperty.of_isPullback sq₀.flip hp + have hk : IsHomotopyEquivalence k := pullback_anodyne_heq sq₁ d.hi hb + have hc : IsHomotopyEquivalence c := heq_of_rlp c (MorphismProperty.of_isPullback sq₀ hd') + exact hk₁ ▸ heq_comp hk hc + +lemma local_pushout {A B C D : SSet.{u}} {f : A ⟶ B} {i : A ⟶ C} + {j : B ⟶ D} {k : C ⟶ D} (sq : IsPushout f i j k) [Mono i] + (hf : Local f) : Local k := by + intro K hK + have sq' := sq.op.map (internalHom.flip.obj K) + have hi : simplicialFibrations ((pre i).app K) := by + change SSet.modelCategoryQuillen.J.rlp _ + rw [← SSet.modelCategoryQuillen.fibrations_eq, ← HomotopicalAlgebra.fibration_iff] + infer_instance + have sq'' : IsPullback ((pre j).app K) ((pre k).app K) + ((pre f).app K) ((pre i).app K) := sq'.flip + exact pullback_heq sq'' (hf K hK) hi + +lemma local_pushout_map {K A B C P Q : SSet.{u}} (k : K ⟶ A) (c : K ⟶ C) [Mono c] + (f : A ⟶ B) (hf : Local f) + {lA : A ⟶ P} {lC : C ⟶ P} (sp : IsPushout k c lA lC) + {lB : B ⟶ Q} {lC' : C ⟶ Q} (sq : IsPushout (k ≫ f) c lB lC') + (F : P ⟶ Q) (hFA : lA ≫ F = f ≫ lB) (hFC : lC ≫ F = lC') : Local F := by + have sq' : IsPushout (k ≫ f) c lB (lC ≫ F) := by rw [hFC]; exact sq + have : Mono lA := MorphismProperty.of_isPushout sp + (show (MorphismProperty.monomorphisms SSet) c from inferInstance) + exact local_pushout (sq'.of_left hFA.symm sp) hf + +end Thomason.KanLocal + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OneCat +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +@[reassoc] lemma cylinderMap_pre {C D E : Cat.{u,u}} (f : C ⟶ D) + (H : cylinder.obj D ⟶ E) : + nerveFunctor.map f ▷ Δ[1] ≫ cylinderMap H = cylinderMap (cylinder.map f ≫ H) := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + +@[reassoc] lemma cylinderMap_post {C D E : Cat.{u,u}} (H : cylinder.obj C ⟶ D) + (f : D ⟶ E) : + cylinderMap H ≫ nerveFunctor.map f = cylinderMap (H ≫ f) := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + +lemma cylinderMap_projection (C : Cat.{u,u}) : + cylinderMap (projection C) = fst (nerveFunctor.obj C) Δ[1] := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + +lemma pushout_deformation_coherent {A E X Y : Cat.{u,u}} {a : A ⟶ X} {i : A ⟶ E} + {j : X ⟶ Y} {v : E ⟶ Y} (sq : IsPushout a i j v) + (r : E ⟶ A) (ri : i ≫ r = 𝟙 A) + (H : cylinder.obj E ⟶ E) + (h₀ : endpoint E 0 ≫ H = r ≫ i) + (h₁ : endpoint E 1 ≫ H = 𝟙 E) + (hA : cylinder.map i ≫ H = projection A ≫ i) : + ∃ (p : Y ⟶ X) (H' : cylinder.obj Y ⟶ Y), + j ≫ p = 𝟙 X ∧ v ≫ p = r ≫ a ∧ + endpoint Y 0 ≫ H' = p ≫ j ∧ endpoint Y 1 ≫ H' = 𝟙 Y ∧ + cylinder.map j ≫ H' = projection X ≫ j ∧ cylinder.map v ≫ H' = H ≫ v := by + let p : Y ⟶ X := sq.desc (𝟙 X) (r ≫ a) (by simp [← Category.assoc,ri]) + have pj : j ≫ p = 𝟙 X := sq.inl_desc _ _ _ + have pv : v ≫ p = r ≫ a := sq.inr_desc _ _ _ + have sw := sq.map cylinder + have hw : cylinder.map a ≫ (projection X ≫ j) = cylinder.map i ≫ (H ≫ v) := by + rw [projection_natural_assoc, ← Category.assoc (cylinder.map i),hA] + simpa only [Category.assoc] using congrArg (projection A ≫ ·) sq.w + let Q : cylinder.obj Y ⟶ Y := sw.desc (projection X ≫ j) (H ≫ v) hw + have Qj : cylinder.map j ≫ Q = projection X ≫ j := sw.inl_desc _ _ _ + have Qv : cylinder.map v ≫ Q = H ≫ v := sw.inr_desc _ _ _ + refine ⟨p,Q,pj,pv,?_,?_,Qj,Qv⟩ + · apply sq.hom_ext + · erw [← Category.assoc, ← endpoint_natural, Category.assoc, Qj, ← Category.assoc, endpoint_projection, + Category.id_comp, ← Category.assoc, pj, Category.id_comp] + · erw [← Category.assoc, ← endpoint_natural, Category.assoc, Qv, ← Category.assoc, h₀, + ← Category.assoc v p j, pv] + simpa only [Category.assoc] using congrArg (r ≫ ·) sq.w.symm + · apply sq.hom_ext + · erw [Category.comp_id, ← Category.assoc, ← endpoint_natural, Category.assoc, Qj, + ← Category.assoc, endpoint_projection, Category.id_comp] + · erw [Category.comp_id, ← Category.assoc, ← endpoint_natural, Category.assoc, Qv, + ← Category.assoc, h₁, Category.id_comp] + +lemma nerve_pushout_coherent {A E X Y : Cat.{u,u}} {a : A ⟶ X} {i : A ⟶ E} + {j : X ⟶ Y} {v : E ⟶ Y} (sc : IsPushout a i j v) + (r : E ⟶ A) (ri : i ≫ r = 𝟙 A) + (HE : cylinder.obj E ⟶ E) + (h₀ : endpoint E 0 ≫ HE = r ≫ i) + (h₁ : endpoint E 1 ≫ HE = 𝟙 E) + (hA : cylinder.map i ≫ HE = projection A ≫ i) + {P : SSet.{u}} {lX : nerveFunctor.obj X ⟶ P} {lE : nerveFunctor.obj E ⟶ P} + (ss : IsPushout (nerveFunctor.map a) (nerveFunctor.map i) lX lE) + (F : P ⟶ nerveFunctor.obj Y) (hFX : lX ≫ F = nerveFunctor.map j) + (hFE : lE ≫ F = nerveFunctor.map v) : + ∃ (G : nerveFunctor.obj Y ⟶ P) + (HP : SSet.Homotopy (F ≫ G) (𝟙 P)) + (HQ : SSet.Homotopy (G ≫ F) (𝟙 (nerveFunctor.obj Y))), + HP.h ≫ F = F ▷ Δ[1] ≫ HQ.h := by + obtain ⟨p,HY,hpj,hpv,hY₀,hY₁,hYX,hYE⟩ := + pushout_deformation_coherent sc r ri HE h₀ h₁ hA + let G : nerveFunctor.obj Y ⟶ P := nerveFunctor.map p ≫ lX + have hG₀ : nerveFunctor.map (p ≫ j) = G ≫ F := by + simp only [G, CategoryTheory.Functor.map_comp, Category.assoc, hFX] + let HQ : SSet.Homotopy (G ≫ F) (𝟙 (nerveFunctor.obj Y)) := + CoherentGluing.toHomotopy (cylinderMap HY) + (by erw [cylinderMap_zero,hY₀,hG₀]) + (by erw [cylinderMap_one,hY₁,CategoryTheory.Functor.map_id]) + have hI : (nerveFunctor.map a ▷ Δ[1]) ≫ (fst (nerveFunctor.obj X) Δ[1] ≫ lX) = + (nerveFunctor.map i ▷ Δ[1]) ≫ (cylinderMap HE ≫ lE) := by + erw [← Category.assoc _ (cylinderMap HE), cylinderMap_pre, hA, ← cylinderMap_post, + cylinderMap_projection] + erw [Category.assoc, ← ss.w] + rfl + let sI := ss.map (tensorRight (Δ[1] : SSet.{u})) + let H : P ⊗ Δ[1] ⟶ P := sI.desc (fst (nerveFunctor.obj X) Δ[1] ≫ lX) + (cylinderMap HE ≫ lE) hI + have hHX : lX ▷ Δ[1] ≫ H = fst (nerveFunctor.obj X) Δ[1] ≫ lX := sI.inl_desc _ _ _ + have hHE : lE ▷ Δ[1] ≫ H = cylinderMap HE ≫ lE := sI.inr_desc _ _ _ + have hH₀ : SSet.ι₀ ≫ H = F ≫ G := by + apply ss.hom_ext + · rw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hHX, + ← Category.assoc, SSet.ι₀_fst, Category.id_comp, + ← Category.assoc lX F, hFX] + dsimp only [G] + rw [← Category.assoc, ← CategoryTheory.Functor.map_comp, hpj, CategoryTheory.Functor.map_id, Category.id_comp] + · erw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hHE, + ← Category.assoc, cylinderMap_zero,h₀,CategoryTheory.Functor.map_comp, + Category.assoc, ← ss.w, ← Category.assoc lE F, hFE] + dsimp only [G] + rw [← Category.assoc (nerveFunctor.map v), ← CategoryTheory.Functor.map_comp, hpv] + rw [CategoryTheory.Functor.map_comp, Category.assoc] + have hH₁ : SSet.ι₁ ≫ H = 𝟙 P := by + apply ss.hom_ext + · rw [Category.comp_id, ← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hHX, + ← Category.assoc, SSet.ι₁_fst, Category.id_comp] + · erw [Category.comp_id, ← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hHE, + ← Category.assoc, cylinderMap_one, h₁, CategoryTheory.Functor.map_id, Category.id_comp] + refine ⟨G, CoherentGluing.toHomotopy H hH₀ hH₁, HQ, ?_⟩ + change H ≫ F = F ▷ Δ[1] ≫ cylinderMap HY + apply sI.hom_ext + · change lX ▷ Δ[1] ≫ (H ≫ F) = lX ▷ Δ[1] ≫ (F ▷ Δ[1] ≫ cylinderMap HY) + erw [← Category.assoc _ H, hHX, Category.assoc, hFX, + ← Category.assoc (lX ▷ Δ[1]), ← comp_whiskerRight, hFX, + cylinderMap_pre, hYX, ← cylinderMap_post,cylinderMap_projection] + rfl + · change lE ▷ Δ[1] ≫ (H ≫ F) = lE ▷ Δ[1] ≫ (F ▷ Δ[1] ≫ cylinderMap HY) + erw [← Category.assoc _ H, hHE, Category.assoc, hFE, + ← Category.assoc (lE ▷ Δ[1]), ← comp_whiskerRight, hFE, + cylinderMap_pre,hYE,← cylinderMap_post] + rfl +end Thomason.OneCat + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CoherentGluing +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +def Coherent {A B : SSet.{u}} (f : A ⟶ B) : Prop := + ∃ (g : B ⟶ A) (HA : SSet.Homotopy (f ≫ g) (𝟙 A)) + (HB : SSet.Homotopy (g ≫ f) (𝟙 B)), HA.h ≫ f = f ▷ Δ[1] ≫ HB.h + +lemma coherent_of_postIso {A B C : SSet.{u}} (f : A ⟶ B) (e : B ≅ C) + (h : Coherent (f ≫ e.hom)) : Coherent f := by + obtain ⟨g,HA,HB,hcoh⟩ := h + let g' := e.hom ≫ g + let HA' : SSet.Homotopy (f ≫ g') (𝟙 A) := + toHomotopy HA.h (by simpa only [g',Category.assoc] using HA.h₀) HA.h₁ + let HB' : SSet.Homotopy (g' ≫ f) (𝟙 B) := + toHomotopy (e.hom ▷ Δ[1] ≫ HB.h ≫ e.inv) + (by rw [SSet.ι₀_comp_assoc, HB.h₀_assoc]; simp [g',Category.assoc]) + (by rw [SSet.ι₁_comp_assoc, HB.h₁_assoc]; simp) + refine ⟨g',HA',HB',?_⟩ + change HA.h ≫ f = f ▷ Δ[1] ≫ e.hom ▷ Δ[1] ≫ HB.h ≫ e.inv + apply (cancel_mono e.hom).mp + simpa only [Category.assoc, Iso.inv_hom_id, Category.comp_id, comp_whiskerRight] using hcoh +end Thomason.CoherentGluing + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OneCat +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +variable {A E : Type u} [PartialOrder A] [PartialOrder E] + (i : A →o E) (r : E →o A) (ri : ∀ a, r (i a) = a) + (counit : ∀ e, i (r e) ≤ e) + +def orderMapCylinder : Interval.{u} × E →o E where + toFun x := if x.1.down = 0 then i (r x.2) else x.2 + monotone' := by + rintro ⟨⟨b⟩,e⟩ ⟨⟨c⟩,f⟩ ⟨hbc,hef⟩ + fin_cases b <;> fin_cases c + · exact i.monotone (r.monotone hef) + · exact (counit e).trans hef + · exact False.elim (by simp at hbc) + · exact hef + +def posetMapCylinder : cylinder.obj (Cat.of E) ⟶ Cat.of E := + ({ obj := orderMapCylinder i r counit + map := fun f => homOfLE ((orderMapCylinder i r counit).monotone + ⟨leOfHom f.1,leOfHom f.2⟩) } : Interval.{u} × E ⥤ E).toCatHom + +lemma posetMapCylinder_zero : endpoint (Cat.of E) 0 ≫ posetMapCylinder i r counit = + r.toFunctor.toCatHom ≫ i.toFunctor.toCatHom := by + apply Cat.Hom.ext + exact CategoryTheory.Functor.ext (fun _ => rfl) +lemma posetMapCylinder_one : endpoint (Cat.of E) 1 ≫ posetMapCylinder i r counit = 𝟙 (Cat.of E) := by + apply Cat.Hom.ext + exact CategoryTheory.Functor.ext (fun _ => rfl) +include ri in +lemma posetMapCylinder_stationary : + cylinder.map i.toFunctor.toCatHom ≫ posetMapCylinder i r counit = + projection (Cat.of A) ≫ i.toFunctor.toCatHom := by + apply Cat.Hom.ext + exact CategoryTheory.Functor.ext (fun ⟨⟨b⟩,a⟩ => by + change (if b = 0 then i (r (i a)) else i a) = i a + rw [ri a] + simp) +include ri in +lemma posetMapRetraction : i.toFunctor.toCatHom ≫ r.toFunctor.toCatHom = 𝟙 (Cat.of A) := by + apply Cat.Hom.ext + exact CategoryTheory.Functor.ext ri + +end Thomason.OneCat + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OneCat +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory OmegaCategory + +lemma nerve_categorification_attach {C : Cat.{u,u}} {X : NCategory.{u} 1} + (a : (categorificationFinite 1).obj (nerveFunctor.obj C) ⟶ X) : + nerveFunctor.map ((categorificationCatIso C).hom ≫ oneSkeletonCatFunctor.map a) = + (categorificationFiniteAdjunction 1).unit.app (nerveFunctor.obj C) ≫ + (streetNerveFinite 1).map a ≫ oneNerveFunctorIso.hom.app X := by + rw [CategoryTheory.Functor.map_comp, categorificationCatIso_nerve] + erw [Category.assoc] + +lemma finite_poset_comparison_coherent {A E : Type u} [PartialOrder A] [PartialOrder E] + (i : A →o E) (r : E →o A) (ri : ∀ a, r (i a) = a) + (counit : ∀ e, i (r e) ≤ e) + {X Y : NCategory.{u} 1} + {a : (categorificationFinite 1).obj (nerve A) ⟶ X} + {j : X ⟶ Y} {v : (categorificationFinite 1).obj (nerve E) ⟶ Y} + (sc : IsPushout a ((categorificationFinite 1).map (nerveMap i.toFunctor)) j v) + {P : SSet.{u}} {lX : (streetNerveFinite 1).obj X ⟶ P} + {lE : (streetNerveFinite 1).obj ((categorificationFinite 1).obj (nerve E)) ⟶ P} + (ss : IsPushout ((streetNerveFinite 1).map a) + ((streetNerveFinite 1).map ((categorificationFinite 1).map (nerveMap i.toFunctor))) lX lE) + (F : P ⟶ (streetNerveFinite 1).obj Y) + (hFX : lX ≫ F = (streetNerveFinite 1).map j) + (hFE : lE ≫ F = (streetNerveFinite 1).map v) : CoherentGluing.Coherent F := by + let sk := oneSkeletonCatFunctor + let N := streetNerveFinite 1 + let a' := (categorificationCatIso (Cat.of A)).hom ≫ sk.map a + let v' := (categorificationCatIso (Cat.of E)).hom ≫ sk.map v + have sc' : IsPushout a' i.toFunctor.toCatHom (sk.map j) v' := by + apply (sc.map sk).of_iso' (categorificationCatIso (Cat.of A)) (Iso.refl _) + (categorificationCatIso (Cat.of E)) (Iso.refl _) + · simp [a'] + rfl + · exact (categorificationCatIso_natural i.toFunctor.toCatHom).symm + · simp + · simp [v'] + rfl + let dX := oneNerveFunctorIso.app X + let dY := oneNerveFunctorIso.app Y + let uA := (categorificationFiniteAdjunction 1).unit.app (nerve A) + let uE := (categorificationFiniteAdjunction 1).unit.app (nerve E) + have : IsIso uA := oneUnitCatIso (Cat.of A) + have : IsIso uE := oneUnitCatIso (Cat.of E) + have ha' : nerveFunctor.map a' = uA ≫ N.map a ≫ dX.hom := + nerve_categorification_attach (C := Cat.of A) a + have hv' : nerveFunctor.map v' = uE ≫ N.map v ≫ dY.hom := + nerve_categorification_attach (C := Cat.of E) v + have ss' : IsPushout (nerveFunctor.map a') (nerveMap i.toFunctor) + (dX.inv ≫ lX) (uE ≫ lE) := by + apply ss.of_iso' (asIso uA) dX.symm (asIso uE) (Iso.refl _) + · simp only [asIso_hom, ha', Category.assoc, Iso.hom_inv_id, Category.comp_id, Iso.symm_hom] + rfl + · exact ((categorificationFiniteAdjunction 1).unit.naturality (nerveMap i.toFunctor)).symm + · simp + · simp + have hf'X : (dX.inv ≫ lX) ≫ (F ≫ dY.hom) = nerveFunctor.map (sk.map j) := by + rw [Category.assoc, ← Category.assoc lX F, hFX] + rw [show N.map j ≫ dY.hom = dX.hom ≫ nerveFunctor.map (sk.map j) from + oneNerveFunctorIso.hom.naturality j] + erw [Iso.inv_hom_id_assoc] + have hf'E : (uE ≫ lE) ≫ (F ≫ dY.hom) = nerveFunctor.map v' := by + rw [Category.assoc, ← Category.assoc lE F, hFE, hv'] + apply CoherentGluing.coherent_of_postIso F dY + exact nerve_pushout_coherent sc' r.toFunctor.toCatHom + (posetMapRetraction i r ri) (posetMapCylinder i r counit) + (posetMapCylinder_zero i r counit) (posetMapCylinder_one i r counit) + (posetMapCylinder_stationary i r ri counit) ss' (F ≫ dY.hom) hf'X hf'E +end Thomason.OneCat + +end + +noncomputable section +universe u v w z + + +namespace Thomason.AttachmentComparison +open CategoryTheory Limits OmegaCategory Attachments + +abbrev posetObj (n : ℕ) (P : Type u) [PartialOrder P] := + (categorificationFinite n).obj (nerve P) + +abbrev posetMap (n : ℕ) {P Q : Type u} [PartialOrder P] [PartialOrder Q] (f : P →o Q) := + (categorificationFinite n).map (nerveMap f.toFunctor) + +abbrev sb (n : ℕ) {P : Type u} [PartialOrder P] (A B : Set P) (h : A ⊆ B) := + (categorificationFinite n).map (nerveMap (subposetMap A B h).toFunctor) + +abbrev inc (n : ℕ) {P : Type u} [PartialOrder P] (A : Set P) := + (categorificationFinite n).map + (nerveMap (OrderHom.Subtype.val (fun element : P => element ∈ A)).toFunctor) + +@[reassoc] lemma sb_inc (n : ℕ) {P : Type u} [PartialOrder P] + (A B : Set P) (h : A ⊆ B) : sb n A B h ≫ inc n B = inc n A := by + rw [← (categorificationFinite n).map_comp] + rfl + +lemma attachment_nerve_cover (n : ℕ) (hn : 1 ≤ n) {P : Type u} [PartialOrder P] + (A Z C : Set P) (hZ : IsUpperSet Z) (hC : IsUpperSet C) + (hAZ : A ⊆ Z) (hAC : Disjoint A C) (hcover : Z ∪ C = Set.univ) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) (j : X ⟶ Y) + (v : posetObj n P ⟶ Y) (sc : IsPushout a (inc n A) j v) : + ∃ (YZ : NCategory.{u} n) (jZ : X ⟶ YZ) (vZ : posetObj n Z ⟶ YZ) (uZ : YZ ⟶ Y), + IsPushout a (sb n A Z hAZ) jZ vZ ∧ jZ ≫ uZ = j ∧ vZ ≫ uZ = inc n Z ≫ v ∧ + IsPushout ((streetNerveFinite n).map (sb n (Z ∩ C) Z Set.inter_subset_left ≫ vZ)) + ((streetNerveFinite n).map (sb n (Z ∩ C) C Set.inter_subset_right)) + ((streetNerveFinite n).map uZ) ((streetNerveFinite n).map (inc n C ≫ v)) := by + obtain ⟨T₁,T₂,hT₁,hT₂,hTc,⟨jZ,vZ,hj,hv,sz⟩,⟨e₂,he₂⟩,⟨e₃,he₃⟩⟩ := + cosieve_finite_attachment_covers n hn A Z C hZ hC hAZ hAC hcover a j v sc + let N := streetNerveFinite n + let u₁ := fullFiniteInclusion n Y T₁ + let u₂ := fullFiniteInclusion n Y T₂ + let u₃ := fullFiniteInclusion n Y (T₁ ∩ T₂) + let p₁ : fullFinite n Y (T₁ ∩ T₂) ⟶ fullFinite n Y T₁ := + fullOnMap Set.inter_subset_left + let p₂ : fullFinite n Y (T₁ ∩ T₂) ⟶ fullFinite n Y T₂ := + fullOnMap Set.inter_subset_right + change vZ ≫ u₁ = inc n Z ≫ v at hv + change e₂.hom ≫ u₂ = inc n C ≫ v at he₂ + change e₃.hom ≫ u₃ = inc n (Z ∩ C) ≫ v at he₃ + have hu₁ : p₁ ≫ u₁ = u₃ := rfl + have hu₂ : p₂ ≫ u₂ = u₃ := rfl + have : Mono (N.map u₁) := fullInclusion_nerve_mono Y.val T₁ + have : Mono (N.map u₂) := fullInclusion_nerve_mono Y.val T₂ + have sq : IsPushout (N.map p₁) (N.map p₂) (N.map u₁) (N.map u₂) := + cosieve_cover_nerve_isPushout hT₁ hT₂ (fun x => by + have hx : x ∈ T₁ ∪ T₂ := by rw [hTc]; trivial + exact hx) + refine ⟨fullFinite n Y T₁, jZ, vZ, u₁, sz, hj, hv, ?_⟩ + apply sq.of_iso' (N.mapIso e₃) (Iso.refl _) (N.mapIso e₂) (Iso.refl _) + · simp only [CategoryTheory.Functor.mapIso_hom, Iso.refl_hom, Category.comp_id] + change N.map e₃.hom ≫ N.map p₁ = N.map (sb n (Z ∩ C) Z Set.inter_subset_left ≫ vZ) + apply (cancel_mono (N.map u₁)).mp + simp only [← N.map_comp, Category.assoc, hu₁, he₃, hv] + rw [sb_inc_assoc] + · simp only [CategoryTheory.Functor.mapIso_hom] + change N.map e₃.hom ≫ N.map p₂ = N.map (sb n (Z ∩ C) C Set.inter_subset_right) ≫ N.map e₂.hom + apply (cancel_mono (N.map u₂)).mp + simp only [← N.map_comp, Category.assoc, hu₂, he₃, he₂] + rw [sb_inc_assoc] + · simp [N] + · simp only [CategoryTheory.Functor.mapIso_hom, Iso.refl_hom, Category.comp_id] + change N.map e₂.hom ≫ N.map u₂ = N.map (inc n C ≫ v) + rw [← N.map_comp, he₂] + +lemma poset_nerve_cover (n : ℕ) (hn : 1 ≤ n) {P : Type u} [PartialOrder P] + (Z C : Set P) (hZ : IsUpperSet Z) (hC : IsUpperSet C) + (hcover : Z ∪ C = Set.univ) : + IsPushout ((streetNerveFinite n).map (sb n (Z ∩ C) Z Set.inter_subset_left)) + ((streetNerveFinite n).map (sb n (Z ∩ C) C Set.inter_subset_right)) + ((streetNerveFinite n).map (inc n Z)) ((streetNerveFinite n).map (inc n C)) := by + obtain ⟨YZ,jZ,vZ,uZ,sz,hj,hv,sq⟩ := attachment_nerve_cover n hn (∅ : Set P) Z C + hZ hC (Set.empty_subset Z) (by simp) hcover + (𝟙 (posetObj n (∅ : Set P))) (inc n (∅ : Set P)) (𝟙 (posetObj n P)) + (IsPushout.of_id_fst) + have : IsIso vZ := sz.isIso_inr_of_isIso + let N := streetNerveFinite n + apply sq.of_iso' (Iso.refl _) (N.mapIso (asIso vZ)) (Iso.refl _) (Iso.refl _) + · simp [N] + · simp + · simp only [CategoryTheory.Functor.mapIso_hom, asIso_hom, Iso.refl_hom, Category.comp_id] + change N.map vZ ≫ N.map uZ = N.map (inc n Z) + rw [← N.map_comp, hv, Category.comp_id] + · simp +end Thomason.AttachmentComparison + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Cones.lean b/lean/OAI/CategoryTheory/Thomason/Cones.lean new file mode 100644 index 0000000000000000000000000000000000000000..92dc09992408cb7f77b66eb40680dea889e111fd --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Cones.lean @@ -0,0 +1,855 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.DirectedPrisms + +namespace OAI + +/-! Cones. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +abbrev Objects (C : OmegaCategory.{u}) := C.Cells 0 + +def sourceObject (C : OmegaCategory.{u}) (x : C.Cell) : C.Objects := + ⟨C.source 0 x, C.source_source_self 0 x⟩ + +def targetObject (C : OmegaCategory.{u}) (x : C.Cell) : C.Objects := + ⟨C.target 0 x, C.source_target_self 0 x⟩ + +@[simp] lemma sourceObject_source_zero (C : OmegaCategory.{u}) (x : C.Cell) : + C.sourceObject (C.source 0 x) = C.sourceObject x := by + apply Subtype.ext + exact C.source_source_self 0 x + +@[simp] lemma targetObject_source_zero (C : OmegaCategory.{u}) (x : C.Cell) : + C.targetObject (C.source 0 x) = C.sourceObject x := by + apply Subtype.ext + exact C.target_source_self 0 x + +@[simp] lemma sourceObject_target_zero (C : OmegaCategory.{u}) (x : C.Cell) : + C.sourceObject (C.target 0 x) = C.targetObject x := by + apply Subtype.ext + exact C.source_target_self 0 x + +@[simp] lemma targetObject_target_zero (C : OmegaCategory.{u}) (x : C.Cell) : + C.targetObject (C.target 0 x) = C.targetObject x := by + apply Subtype.ext + exact C.target_target_self 0 x + +@[simp] lemma sourceObject_source_succ (C : OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.sourceObject (C.source (k+1) x) = C.sourceObject x := by + apply Subtype.ext + exact C.source_source 0 (k+1) x + +@[simp] lemma targetObject_source_succ (C : OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.targetObject (C.source (k+1) x) = C.targetObject x := by + apply Subtype.ext + simpa [targetObject] using C.target_source 0 (k+1) x + +@[simp] lemma sourceObject_target_succ (C : OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.sourceObject (C.target (k+1) x) = C.sourceObject x := by + apply Subtype.ext + simpa [sourceObject] using C.source_target 0 (k+1) x + +@[simp] lemma targetObject_target_succ (C : OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.targetObject (C.target (k+1) x) = C.targetObject x := by + apply Subtype.ext + exact C.target_target 0 (k+1) x + +@[simp] lemma sourceObject_comp (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) (h) : + C.sourceObject (C.comp k x y h) = C.sourceObject x := by + apply Subtype.ext + exact C.source_comp_le 0 k (Nat.zero_le k) x y h + +@[simp] lemma targetObject_comp (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) (h) : + C.targetObject (C.comp k x y h) = C.targetObject y := by + apply Subtype.ext + exact C.target_comp_le 0 k (Nat.zero_le k) x y h + +@[simp] lemma sourceObject_object (C : OmegaCategory.{u}) (x : C.Objects) : + C.sourceObject x.val = x := Subtype.ext x.property + +@[simp] lemma targetObject_object (C : OmegaCategory.{u}) (x : C.Objects) : + C.targetObject x.val = x := Subtype.ext (C.target_eq_self_of_source_eq_self x.property) + +def Functor.objects {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (x : C.Objects) : D.Objects := + ⟨F.map x.val, by rw [← F.map_source, x.property]⟩ + +@[simp] lemma Functor.objects_source {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (x : C.Cell) : F.objects (C.sourceObject x) = D.sourceObject (F.map x) := + Subtype.ext (F.map_source 0 x) + +@[simp] lemma Functor.objects_target {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (x : C.Cell) : F.objects (C.targetObject x) = D.targetObject (F.map x) := + Subtype.ext (F.map_target 0 x) + +def thinMap {S : Type u} {T : Type v} {r : S → S → Prop} {q : T → T → Prop} + {hr : ∀ s, r s s} {ht : ∀ {s t v}, r s t → r t v → r s v} + {hq : ∀ s, q s s} {hu : ∀ {s t v}, q s t → q t v → q s v} + (f : S → T) (hf : ∀ {s t}, r s t → q (f s) (f t)) : + Functor (thin r hr ht) (thin q hq hu) where + map x := ⟨f x.left, f x.right, hf x.related⟩ + map_source k x := by cases k <;> apply ThinCell.ext <;> rfl + map_target k x := by cases k <;> apply ThinCell.ext <;> rfl + map_comp k x y h h' := by cases k <;> apply ThinCell.ext <;> rfl + +def chaoticLift {C : OmegaCategory.{u}} {S : Type v} (f : C.Objects → S) : + Functor C (chaotic S) where + map x := ⟨f (C.sourceObject x), f (C.targetObject x), True.intro⟩ + map_source k x := by + cases k with + | zero => apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.source, ThinCell.vertex] + | succ k => apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.source] + map_target k x := by + cases k with + | zero => apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.target, ThinCell.vertex] + | succ k => apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.target] + map_comp k x y h h' := by + cases k with + | zero => apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.comp] + | succ k => + have he : C.targetObject x = C.targetObject y := by + simpa using congrArg C.targetObject h + apply ThinCell.ext <;> simp [thin, chaotic, ThinCell.comp, he] + +def chaoticRestrict {C : OmegaCategory.{u}} {S : Type v} + (F : Functor C (chaotic S)) (x : C.Objects) : S := (F.map x.val).left + +def chaoticHomEquiv (C : OmegaCategory.{u}) (S : Type v) : + (C.Objects → S) ≃ Functor C (chaotic S) where + toFun := chaoticLift + invFun := chaoticRestrict + left_inv f := by funext x; simp [chaoticRestrict, chaoticLift] + right_inv F := by + apply Functor.ext + funext x + apply ThinCell.ext + · change (F.map (C.source 0 x)).left = (F.map x).left + have hh := congrArg (fun z : (chaotic S).Cell => z.left) (F.map_source 0 x) + exact hh + · change (F.map (C.target 0 x)).left = (F.map x).right + have hh := congrArg (fun z : (chaotic S).Cell => z.left) (F.map_target 0 x) + exact hh + +def objectsFunctor : CategoryTheory.Functor OmegaCategory.{u} (Type u) where + obj := Objects + map F := TypeCat.ofHom F.objects + +def chaoticFunctor : CategoryTheory.Functor (Type u) OmegaCategory.{u} where + obj := chaotic + map f := thinMap f (fun _ => True.intro) + +def objectsChaoticAdjunction : CategoryTheory.Adjunction objectsFunctor chaoticFunctor := + CategoryTheory.Adjunction.mkOfHomEquiv { + homEquiv := fun C S => TypeCat.homEquiv.trans (chaoticHomEquiv C S) + homEquiv_naturality_left_symm := by + intro C' C S F G + rfl + homEquiv_naturality_right := by + intro C S T f g + rfl } + +noncomputable instance objects_preservesColimits : + CategoryTheory.Limits.PreservesColimitsOfSize.{v,w} objectsFunctor.{u} := + objectsChaoticAdjunction.leftAdjoint_preservesColimits + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +structure Subcategory (C : OmegaCategory.{u}) where + carrier : Set C.Cell + source_mem (k : ℕ) {x : C.Cell} : x ∈ carrier → C.source k x ∈ carrier + target_mem (k : ℕ) {x : C.Cell} : x ∈ carrier → C.target k x ∈ carrier + comp_mem (k : ℕ) {x y : C.Cell} (h : C.target k x = C.source k y) : + x ∈ carrier → y ∈ carrier → C.comp k x y h ∈ carrier + +namespace Subcategory + +variable {C : OmegaCategory.{u}} (S : Subcategory C) + +def category : OmegaCategory.{u} where + Cell := S.carrier + source k x := ⟨C.source k x.val, S.source_mem k x.property⟩ + target k x := ⟨C.target k x.val, S.target_mem k x.property⟩ + source_source i j x := Subtype.ext (C.source_source i j x.val) + target_target i j x := Subtype.ext (C.target_target i j x.val) + source_target i j x := by + apply Subtype.ext + by_cases h : i < j <;> simpa [h] using C.source_target i j x.val + target_source i j x := by + apply Subtype.ext + by_cases h : i < j <;> simpa [h] using C.target_source i j x.val + comp k x y h := ⟨C.comp k x.val y.val (congrArg Subtype.val h), + S.comp_mem k _ x.property y.property⟩ + source_comp_le i k hik x y h := Subtype.ext (C.source_comp_le i k hik x.val y.val _) + target_comp_le i k hik x y h := Subtype.ext (C.target_comp_le i k hik x.val y.val _) + source_comp_gt i k hki x y h hs := Subtype.ext (C.source_comp_gt i k hki x.val y.val _ _) + target_comp_gt i k hki x y h ht := Subtype.ext (C.target_comp_gt i k hki x.val y.val _ _) + unit_left k x h := Subtype.ext (C.unit_left k x.val _) + unit_right k x h := Subtype.ext (C.unit_right k x.val _) + assoc k x y z hxy hyz hxy_z hx_yz := Subtype.ext (C.assoc k x.val y.val z.val _ _ _ _) + interchange k l hkl a b c d hab hcd hac hbd hab_cd hac_bd := + Subtype.ext (C.interchange k l hkl a.val b.val c.val d.val _ _ _ _ _ _) + finite_dimension x := by + obtain ⟨k, hk⟩ := C.finite_dimension x.val + exact ⟨k, Subtype.ext hk⟩ + +def inclusion : Functor S.category C where + map := Subtype.val + map_source _ _ := rfl + map_target _ _ := rfl + map_comp _ _ _ _ _ := rfl + +def lift {D : OmegaCategory.{v}} (F : Functor D C) (hf : ∀ x, F.map x ∈ S.carrier) : + Functor D S.category where + map x := ⟨F.map x, hf x⟩ + map_source k x := Subtype.ext (F.map_source k x) + map_target k x := Subtype.ext (F.map_target k x) + map_comp k x y h h' := Subtype.ext (F.map_comp k x y h (congrArg Subtype.val h')) + +lemma lift_inclusion {D : OmegaCategory.{v}} (F : Functor D C) + (hf : ∀ x, F.map x ∈ S.carrier) : Functor.comp (S.lift F hf) S.inclusion = F := rfl + +lemma inclusion_injective : Function.Injective S.inclusion.map := Subtype.val_injective + +end Subcategory + +def fullOn (C : OmegaCategory.{u}) (S : Set C.Objects) : Subcategory C where + carrier := {x | C.sourceObject x ∈ S ∧ C.targetObject x ∈ S} + source_mem k x hx := by + cases k with + | zero => simpa only [Set.mem_ofPred_eq, sourceObject_source_zero, + targetObject_source_zero, and_self] using hx.1 + | succ k => simpa only [Set.mem_ofPred_eq, sourceObject_source_succ, + targetObject_source_succ] using hx + target_mem k x hx := by + cases k with + | zero => simpa only [Set.mem_ofPred_eq, sourceObject_target_zero, + targetObject_target_zero, and_self] using hx.2 + | succ k => simpa only [Set.mem_ofPred_eq, sourceObject_target_succ, + targetObject_target_succ] using hx + comp_mem k x y h hx hy := by + exact ⟨by simpa only [sourceObject_comp] using hx.1, + by simpa only [targetObject_comp] using hy.2⟩ + +lemma comp_fixed (C : OmegaCategory.{u}) (k : ℕ) {x : C.Cell} + (hx : C.source k x = x) (h : C.target k x = C.source k x) : C.comp k x x h = x := by + have hu := C.unit_left k x (C.target_source_self k x) + simpa only [hx] using hu + +lemma comp_eq_of_eq_fixed (C : OmegaCategory.{u}) (k : ℕ) {x y z : C.Cell} + (h : C.target k x = C.source k y) (hx : x = z) (hy : y = z) + (hz : C.source k z = z) : C.comp k x y h = z := by + subst x + subst y + exact C.comp_fixed k hz h + +def Functor.fiber {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (d : D.Objects) : Subcategory C where + carrier := {x | F.map x = d.val} + source_mem k x hx := by + change F.map (C.source k x) = d.val + rw [F.map_source, hx] + exact D.source_fixed_upwards (Nat.zero_le k) d.property + target_mem k x hx := by + change F.map (C.target k x) = d.val + rw [F.map_target, hx] + exact D.target_eq_self_of_source_eq_self (D.source_fixed_upwards (Nat.zero_le k) d.property) + comp_mem k x y h hx hy := by + change F.map (C.comp k x y h) = d.val + rw [F.map_comp k x y h (F.map_composable h)] + exact D.comp_eq_of_eq_fixed k _ hx hy + (D.source_fixed_upwards (Nat.zero_le k) d.property) + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +@[simp] lemma source_object (C : OmegaCategory.{u}) (k : ℕ) (a : C.Objects) : + C.source k a.val = a.val := C.source_fixed_upwards (Nat.zero_le k) a.property + +@[simp] lemma target_object (C : OmegaCategory.{u}) (k : ℕ) (a : C.Objects) : + C.target k a.val = a.val := C.target_eq_self_of_source_eq_self (C.source_object k a) + +inductive ConeCell (C : OmegaCategory.{u}) : Type u + | old : C.Cell → ConeCell C + | edge : C.Objects → ConeCell C + | top : ConeCell C + +namespace ConeCell + +variable (C : OmegaCategory.{u}) + +def source : ℕ → ConeCell C → ConeCell C + | k, old x => old (C.source k x) + | 0, edge a => old a.val + | _+1, edge a => edge a + | _, top => top + +def target : ℕ → ConeCell C → ConeCell C + | k, old x => old (C.target k x) + | 0, edge _ => top + | _+1, edge a => edge a + | _, top => top + +def comp : (k : ℕ) → (x y : ConeCell C) → target C k x = source C k y → ConeCell C + | _, old x, old y, h => old (C.comp _ x y (old.inj h)) + | 0, old x, edge _, _ => edge (C.sourceObject x) + | 0, edge a, top, _ => edge a + | _, top, top, _ => top + | _+1, edge a, edge _, _ => edge a + | 0, old _, top, h => by cases h + | 0, edge _, old _, h => by cases h + | 0, edge _, edge _, h => by cases h + | 0, top, old _, h => by cases h + | 0, top, edge _, h => by cases h + | _+1, old _, edge _, h => by cases h + | _+1, old _, top, h => by cases h + | _+1, edge _, old _, h => by cases h + | _+1, edge _, top, h => by cases h + | _+1, top, old _, h => by cases h + | _+1, top, edge _, h => by cases h + +lemma source_source (i j : ℕ) (x : ConeCell C) : + source C i (source C j x) = source C (min i j) x := by + cases x with + | old x => simp [source, C.source_source] + | edge a => cases i <;> cases j <;> simp [source] + | top => rfl + +lemma target_target (i j : ℕ) (x : ConeCell C) : + target C i (target C j x) = target C (min i j) x := by + cases x with + | old x => simp [target, C.target_target] + | edge a => cases i <;> cases j <;> simp [target] + | top => rfl + +lemma source_target (i j : ℕ) (x : ConeCell C) : + source C i (target C j x) = if i < j then source C i x else target C j x := by + cases x with + | old x => by_cases h : i < j <;> simp [source, target, C.source_target, h] + | edge a => cases i <;> cases j <;> simp [source, target] + | top => simp [source, target] + +lemma target_source (i j : ℕ) (x : ConeCell C) : + target C i (source C j x) = if i < j then target C i x else source C j x := by + cases x with + | old x => by_cases h : i < j <;> simp [source, target, C.target_source, h] + | edge a => cases i <;> cases j <;> simp [source, target] + | top => simp [source, target] + +lemma source_comp_le (i k : ℕ) (hik : i ≤ k) (x y : ConeCell C) + (h : target C k x = source C k y) : source C i (comp C k x y h) = source C i x := by + cases k with + | zero => + have hi : i = 0 := by omega + subst i + cases x <;> cases y <;> try (cases h) + all_goals simp_all [source, comp, C.source_comp_le, sourceObject] + | succ k => + cases x <;> cases y <;> try (cases h) + all_goals simp_all [source, comp, C.source_comp_le i (k+1) hik] + +lemma target_comp_le (i k : ℕ) (hik : i ≤ k) (x y : ConeCell C) + (h : target C k x = source C k y) : target C i (comp C k x y h) = target C i y := by + cases k with + | zero => + have hi : i = 0 := by omega + subst i + cases x <;> cases y <;> try (cases h) + all_goals simp_all [target, comp, C.target_comp_le] + | succ k => + cases x <;> cases y <;> try (cases h) + all_goals simp_all [target, comp, C.target_comp_le i (k+1) hik] + +lemma source_comp_gt (i k : ℕ) (hki : k < i) (x y : ConeCell C) + (h : target C k x = source C k y) + (hs : target C k (source C i x) = source C k (source C i y)) : + source C i (comp C k x y h) = comp C k (source C i x) (source C i y) hs := by + cases i with + | zero => omega + | succ i => + cases k <;> cases x <;> cases y <;> try (cases h) + all_goals simp_all [source, comp, sourceObject, C.source_source] + all_goals exact C.source_comp_gt _ _ (by omega) _ _ _ _ + +lemma target_comp_gt (i k : ℕ) (hki : k < i) (x y : ConeCell C) + (h : target C k x = source C k y) + (hs : target C k (target C i x) = source C k (target C i y)) : + target C i (comp C k x y h) = comp C k (target C i x) (target C i y) hs := by + cases i with + | zero => omega + | succ i => + cases k <;> cases x <;> cases y <;> try (cases h) + all_goals simp_all [target, comp, sourceObject, C.source_target] + all_goals exact C.target_comp_gt _ _ (by omega) _ _ _ _ + +end ConeCell +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory.ConeCell + +variable (C : OmegaCategory.{u}) + +lemma unit_left (k : ℕ) (x : ConeCell C) (h : target C k (source C k x) = source C k x) : + comp C k (source C k x) x h = x := by + cases k <;> cases x <;> simp [source, comp, C.unit_left] + +lemma unit_right (k : ℕ) (x : ConeCell C) (h : target C k x = source C k (target C k x)) : + comp C k x (target C k x) h = x := by + cases k <;> cases x <;> simp [target, comp, C.unit_right] + +lemma assoc (k : ℕ) (x y z : ConeCell C) + (hxy : target C k x = source C k y) (hyz : target C k y = source C k z) + (hxy_z : target C k (comp C k x y hxy) = source C k z) + (hx_yz : target C k x = source C k (comp C k y z hyz)) : + comp C k (comp C k x y hxy) z hxy_z = comp C k x (comp C k y z hyz) hx_yz := by + cases k <;> cases x <;> cases y <;> try (cases hxy) + all_goals cases z <;> try (cases hyz) + all_goals simp_all [comp, sourceObject, C.source_comp_le] + all_goals exact C.assoc _ _ _ _ _ _ _ _ + +lemma interchange (k l : ℕ) (hkl : k < l) (a b c d : ConeCell C) + (hab : target C l a = source C l b) (hcd : target C l c = source C l d) + (hac : target C k a = source C k c) (hbd : target C k b = source C k d) + (hab_cd : target C k (comp C l a b hab) = source C k (comp C l c d hcd)) + (hac_bd : target C l (comp C k a c hac) = source C l (comp C k b d hbd)) : + comp C k (comp C l a b hab) (comp C l c d hcd) hab_cd = + comp C l (comp C k a c hac) (comp C k b d hbd) hac_bd := by + cases l with + | zero => omega + | succ l => + cases k <;> cases a <;> cases b <;> try (cases hab) + all_goals cases c <;> cases d <;> try (cases hcd) + all_goals try (cases hac) + all_goals try (cases hbd) + all_goals simp_all [comp, sourceObject, C.source_comp_le] + all_goals exact C.interchange _ _ (by omega) _ _ _ _ _ _ _ _ _ _ + +lemma finite_dimension (x : ConeCell C) : ∃ k, source C k x = x := by + cases x with + | old x => + obtain ⟨k, hk⟩ := C.finite_dimension x + exact ⟨k, congrArg old hk⟩ + | edge a => exact ⟨1, rfl⟩ + | top => exact ⟨0, rfl⟩ + +end Thomason.OmegaCategory.ConeCell + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +def terminalCone (C : OmegaCategory.{u}) : OmegaCategory.{u} where + Cell := ConeCell C + source := ConeCell.source C + target := ConeCell.target C + source_source := ConeCell.source_source C + target_target := ConeCell.target_target C + source_target := ConeCell.source_target C + target_source := ConeCell.target_source C + comp := ConeCell.comp C + source_comp_le := ConeCell.source_comp_le C + target_comp_le := ConeCell.target_comp_le C + source_comp_gt := ConeCell.source_comp_gt C + target_comp_gt := ConeCell.target_comp_gt C + unit_left := ConeCell.unit_left C + unit_right := ConeCell.unit_right C + assoc := ConeCell.assoc C + interchange := ConeCell.interchange C + finite_dimension := ConeCell.finite_dimension C + +lemma terminalCone_truncated (C : OmegaCategory.{u}) {n : ℕ} (hn : 1 ≤ n) + (hC : C.IsTruncated n) : C.terminalCone.IsTruncated n := by + intro x + cases n with + | zero => omega + | succ n => + cases x with + | old x => exact congrArg ConeCell.old (hC x) + | edge a => rfl + | top => rfl + +def terminalConeInclusion (C : OmegaCategory.{u}) : Functor C C.terminalCone where + map := ConeCell.old + map_source _ _ := rfl + map_target _ _ := rfl + map_comp _ _ _ _ _ := rfl + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +def intervalVertex (i : Fin 2) : interval.{u}.Objects := + ⟨⟨⟨i⟩, ⟨i⟩, le_rfl⟩, rfl⟩ + +def intervalArrow : interval.{u}.Cell := ⟨⟨0⟩, ⟨1⟩, by decide⟩ + +lemma interval_cases (x : interval.{u}.Cell) : + x = (intervalVertex 0).val ∨ x = intervalArrow ∨ x = (intervalVertex 1).val := by + rcases x with ⟨⟨a⟩, ⟨b⟩, h⟩ + fin_cases a <;> fin_cases b + · exact Or.inl rfl + · exact Or.inr (Or.inl rfl) + · simp at h + · exact Or.inr (Or.inr rfl) + +@[simp] lemma interval_source_arrow : interval.source 0 intervalArrow = (intervalVertex 0).val := rfl +@[simp] lemma interval_target_arrow : interval.target 0 intervalArrow = (intervalVertex 1).val := rfl +@[simp] lemma interval_source_succ (k : ℕ) (x : interval.{u}.Cell) : interval.source (k+1) x = x := rfl +@[simp] lemma interval_target_succ (k : ℕ) (x : interval.{u}.Cell) : interval.target (k+1) x = x := rfl + +def coneLabel (C : OmegaCategory.{u}) : Functor C.terminalCone interval where + map + | ConeCell.old _ => (intervalVertex 0).val + | ConeCell.edge _ => intervalArrow + | ConeCell.top => (intervalVertex 1).val + map_source k x := by cases k <;> cases x <;> rfl + map_target k x := by cases k <;> cases x <;> rfl + map_comp k x y h h' := by + cases k <;> cases x <;> cases y <;> try (cases h) + all_goals rfl + +def coneMap {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} (F : Functor C D) : + Functor C.terminalCone D.terminalCone where + map + | ConeCell.old x => ConeCell.old (F.map x) + | ConeCell.edge a => ConeCell.edge (F.objects a) + | ConeCell.top => ConeCell.top + map_source k x := by + cases x with + | old x => exact congrArg ConeCell.old (F.map_source k x) + | edge a => cases k <;> rfl + | top => rfl + map_target k x := by + cases x with + | old x => exact congrArg ConeCell.old (F.map_target k x) + | edge a => cases k <;> rfl + | top => rfl + map_comp k x y h h' := by + cases k <;> cases x <;> cases y <;> try (cases h) + all_goals simp only [terminalCone, ConeCell.comp, ConeCell.old.injEq, ConeCell.edge.injEq] + all_goals first + | rfl + | exact F.objects_source _ + | exact F.map_comp _ _ _ _ _ + +def terminalConeFunctor : CategoryTheory.Functor OmegaCategory.{u} + (CategoryTheory.Over interval.{u}) where + obj C := CategoryTheory.Over.mk (coneLabel C) + map F := CategoryTheory.Over.homMk (coneMap F) (by + apply Functor.ext + funext x + cases x <;> rfl) + map_id C := by + apply CategoryTheory.Over.OverMorphism.ext + apply Functor.ext + funext x + cases x <;> rfl + map_comp F G := by + apply CategoryTheory.Over.OverMorphism.ext + apply Functor.ext + funext x + cases x <;> rfl + +def Functor.fiberMap {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + {B : OmegaCategory.{w}} (p : Functor C B) (q : Functor D B) + (F : Functor C D) (hw : Functor.comp F q = p) (b : B.Objects) : + Functor (p.fiber b).category (q.fiber b).category := + (q.fiber b).lift (Functor.comp (p.fiber b).inclusion F) (fun x => by + change q.map (F.map x.val) = b.val + have he := congrArg (fun f : Functor C B => f.map x.val) hw + exact he.trans x.property) + +def fiberFunctor {B : OmegaCategory.{u}} (b : B.Objects) : + CategoryTheory.Functor (CategoryTheory.Over B) OmegaCategory.{u} where + obj p := (p.hom.fiber b).category + map F := Functor.fiberMap _ _ F.left (CategoryTheory.Over.w F) b + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +@[simp] lemma interval_arrow_ne_zero : intervalArrow.{u} ≠ (intervalVertex 0).val := by + intro h + have he := congrArg (fun x : interval.{u}.Cell => x.right.down.val) h + norm_num [intervalArrow, intervalVertex] at he + +@[simp] lemma interval_arrow_ne_one : intervalArrow.{u} ≠ (intervalVertex 1).val := by + intro h + have he := congrArg (fun x : interval.{u}.Cell => x.left.down.val) h + norm_num [intervalArrow, intervalVertex] at he + +@[simp] lemma interval_zero_ne_one : (intervalVertex 0).val ≠ (intervalVertex 1).val := by + intro h + have he := congrArg (fun x : interval.Cell => x.left.down.val) h + norm_num [intervalVertex] at he + +@[simp] lemma interval_zero_ne_arrow : (intervalVertex 0).val ≠ intervalArrow.{u} := + Ne.symm interval_arrow_ne_zero +@[simp] lemma interval_one_ne_arrow : (intervalVertex 1).val ≠ intervalArrow.{u} := + Ne.symm interval_arrow_ne_one +@[simp] lemma interval_one_ne_zero : (intervalVertex 1).val ≠ (intervalVertex 0).val := + Ne.symm interval_zero_ne_one + +abbrev zeroFiber {C : OmegaCategory.{u}} (p : Functor C interval.{v}) := + (p.fiber (intervalVertex 0)).category + +def zeroSourceObject {C : OmegaCategory.{u}} (p : Functor C interval.{v}) (x : C.Cell) + (h : interval.source 0 (p.map x) = (intervalVertex 0).val) : (zeroFiber p).Objects := + ⟨⟨C.source 0 x, (p.map_source 0 x).trans h⟩, Subtype.ext (C.source_source_self 0 x)⟩ + +lemma zeroSourceObject_source_succ {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (k : ℕ) (x : C.Cell) (h h') : + zeroSourceObject p (C.source (k+1) x) h = zeroSourceObject p x h' := by + apply Subtype.ext + apply Subtype.ext + exact C.source_source 0 (k+1) x + +lemma zeroSourceObject_target_succ {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (k : ℕ) (x : C.Cell) (h h') : + zeroSourceObject p (C.target (k+1) x) h = zeroSourceObject p x h' := by + apply Subtype.ext + apply Subtype.ext + change C.source 0 (C.target (k+1) x) = C.source 0 x + simpa using C.source_target 0 (k+1) x + +lemma zeroSourceObject_comp {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (k : ℕ) (x y : C.Cell) (h hx hxy) : + zeroSourceObject p (C.comp k x y h) hxy = zeroSourceObject p x hx := by + apply Subtype.ext + apply Subtype.ext + exact C.source_comp_le 0 k (Nat.zero_le k) x y h + +noncomputable def coneExtendMap {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (x : C.Cell) : B.terminalCone.Cell := by + classical + exact if h0 : p.map x = (intervalVertex 0).val then ConeCell.old (F.map ⟨x, h0⟩) + else if ha : p.map x = intervalArrow then + ConeCell.edge (F.objects (zeroSourceObject p x (by rw [ha]; rfl))) + else ConeCell.top + +lemma coneExtendMap_zero {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (x : C.Cell) + (hx : p.map x = (intervalVertex 0).val) : + coneExtendMap p F x = ConeCell.old (F.map ⟨x, hx⟩) := by + simp [coneExtendMap, hx] + rfl + +lemma coneExtendMap_arrow {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (x : C.Cell) + (hx : p.map x = intervalArrow) : + coneExtendMap p F x = ConeCell.edge (F.objects (zeroSourceObject p x (by rw [hx]; rfl))) := by + simp [coneExtendMap, hx] + rfl + +lemma coneExtendMap_one {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (x : C.Cell) + (hx : p.map x = (intervalVertex 1).val) : coneExtendMap p F x = ConeCell.top := by + simp [coneExtendMap, hx] + rfl + +lemma coneExtendMap_source {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (k : ℕ) (x : C.Cell) : + coneExtendMap p F (C.source k x) = B.terminalCone.source k (coneExtendMap p F x) := by + rcases interval_cases (p.map x) with hx | hx | hx + · have hs : p.map (C.source k x) = (intervalVertex 0).val := by + rw [p.map_source, hx, interval.source_object] + rw [coneExtendMap_zero p F _ hs, coneExtendMap_zero p F _ hx] + exact congrArg ConeCell.old (F.map_source k ⟨x, hx⟩) + · cases k with + | zero => + have hs : p.map (C.source 0 x) = (intervalVertex 0).val := by rw [p.map_source, hx]; rfl + rw [coneExtendMap_zero p F _ hs, coneExtendMap_arrow p F _ hx] + rfl + | succ k => + have hs : p.map (C.source (k+1) x) = intervalArrow := by rw [p.map_source, interval_source_succ, hx] + rw [coneExtendMap_arrow p F _ hs, coneExtendMap_arrow p F _ hx] + change ConeCell.edge (F.objects _) = ConeCell.edge (F.objects _) + rw [zeroSourceObject_source_succ] + · have hs : p.map (C.source k x) = (intervalVertex 1).val := by + rw [p.map_source, hx, interval.source_object] + rw [coneExtendMap_one p F _ hs, coneExtendMap_one p F _ hx] + rfl + +lemma coneExtendMap_target {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (k : ℕ) (x : C.Cell) : + coneExtendMap p F (C.target k x) = B.terminalCone.target k (coneExtendMap p F x) := by + rcases interval_cases (p.map x) with hx | hx | hx + · have hs : p.map (C.target k x) = (intervalVertex 0).val := by + rw [p.map_target, hx, interval.target_object] + rw [coneExtendMap_zero p F _ hs, coneExtendMap_zero p F _ hx] + exact congrArg ConeCell.old (F.map_target k ⟨x, hx⟩) + · cases k with + | zero => + have hs : p.map (C.target 0 x) = (intervalVertex 1).val := by rw [p.map_target, hx]; rfl + rw [coneExtendMap_one p F _ hs, coneExtendMap_arrow p F _ hx] + rfl + | succ k => + have hs : p.map (C.target (k+1) x) = intervalArrow := by rw [p.map_target, interval_target_succ, hx] + rw [coneExtendMap_arrow p F _ hs, coneExtendMap_arrow p F _ hx] + change ConeCell.edge (F.objects _) = ConeCell.edge (F.objects _) + rw [zeroSourceObject_target_succ] + · have hs : p.map (C.target k x) = (intervalVertex 1).val := by + rw [p.map_target, hx, interval.target_object] + rw [coneExtendMap_one p F _ hs, coneExtendMap_one p F _ hx] + rfl + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +lemma interval_map_comp_zero_left {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (x y : C.Cell) (h : C.target 0 x = C.source 0 y) : + (p.map (C.comp 0 x y h)).left = (p.map x).left := by + rw [p.map_comp 0 x y h (p.map_composable h)] + rfl + +lemma interval_map_comp_zero_right {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (x y : C.Cell) (h : C.target 0 x = C.source 0 y) : + (p.map (C.comp 0 x y h)).right = (p.map y).right := by + rw [p.map_comp 0 x y h (p.map_composable h)] + rfl + +lemma interval_map_comp_succ {C : OmegaCategory.{u}} (p : Functor C interval.{v}) + (k : ℕ) (x y : C.Cell) (h : C.target (k+1) x = C.source (k+1) y) : + p.map (C.comp (k+1) x y h) = p.map x := by + rw [p.map_comp (k+1) x y h (p.map_composable h)] + rfl + +lemma coneExtendMap_comp {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) (k : ℕ) (x y : C.Cell) + (h : C.target k x = C.source k y) + (h' : B.terminalCone.target k (coneExtendMap p F x) = B.terminalCone.source k (coneExtendMap p F y)) : + coneExtendMap p F (C.comp k x y h) = + B.terminalCone.comp k (coneExtendMap p F x) (coneExtendMap p F y) h' := by + have hm := p.map_composable h + cases k with + | zero => + rcases interval_cases (p.map x) with hx | hx | hx + · rcases interval_cases (p.map y) with hy | hy | hy + · have hz : p.map (C.comp 0 x y h) = (intervalVertex 0).val := by + apply ThinCell.ext + · rw [interval_map_comp_zero_left, hx] + · rw [interval_map_comp_zero_right, hy] + simp only [coneExtendMap_zero p F _ hz, coneExtendMap_zero p F _ hx, + coneExtendMap_zero p F _ hy, terminalCone, ConeCell.comp, ConeCell.old.injEq] + exact F.map_comp 0 ⟨x, hx⟩ ⟨y, hy⟩ (Subtype.ext h) _ + · have hz : p.map (C.comp 0 x y h) = intervalArrow := by + apply ThinCell.ext + · rw [interval_map_comp_zero_left, hx]; rfl + · rw [interval_map_comp_zero_right, hy] + simp only [coneExtendMap_arrow p F _ hz, coneExtendMap_zero p F _ hx, + coneExtendMap_arrow p F _ hy, terminalCone, ConeCell.comp, ConeCell.edge.injEq] + rw [← F.objects_source ⟨x, hx⟩] + apply congrArg F.objects + apply Subtype.ext + apply Subtype.ext + exact C.source_comp_le 0 0 le_rfl x y h + · simp [hx, hy] at hm + · rcases interval_cases (p.map y) with hy | hy | hy + · simp [hx, hy] at hm + · simp [hx, hy] at hm + · have hz : p.map (C.comp 0 x y h) = intervalArrow := by + apply ThinCell.ext + · rw [interval_map_comp_zero_left, hx] + · rw [interval_map_comp_zero_right, hy]; rfl + simp only [coneExtendMap_arrow p F _ hz, coneExtendMap_arrow p F _ hx, + coneExtendMap_one p F _ hy, terminalCone, ConeCell.comp, ConeCell.edge.injEq] + rw [zeroSourceObject_comp] + · rcases interval_cases (p.map y) with hy | hy | hy + · simp [hx, hy] at hm + · simp [hx, hy] at hm + · have hz : p.map (C.comp 0 x y h) = (intervalVertex 1).val := by + apply ThinCell.ext + · rw [interval_map_comp_zero_left, hx] + · rw [interval_map_comp_zero_right, hy] + simp only [coneExtendMap_one p F _ hz, coneExtendMap_one p F _ hx, + coneExtendMap_one p F _ hy, terminalCone, ConeCell.comp] + | succ k => + have he : p.map x = p.map y := hm + rcases interval_cases (p.map x) with hx | hx | hx + · have hy := he.symm.trans hx + have hz := (interval_map_comp_succ p k x y h).trans hx + simp only [coneExtendMap_zero p F _ hz, coneExtendMap_zero p F _ hx, + coneExtendMap_zero p F _ hy, terminalCone, ConeCell.comp, ConeCell.old.injEq] + exact F.map_comp (k+1) ⟨x, hx⟩ ⟨y, hy⟩ (Subtype.ext h) _ + · have hy := he.symm.trans hx + have hz := (interval_map_comp_succ p k x y h).trans hx + simp only [coneExtendMap_arrow p F _ hz, coneExtendMap_arrow p F _ hx, + coneExtendMap_arrow p F _ hy, terminalCone, ConeCell.comp, ConeCell.edge.injEq] + rw [zeroSourceObject_comp] + · have hy := he.symm.trans hx + have hz := (interval_map_comp_succ p k x y h).trans hx + simp only [coneExtendMap_one p F _ hz, coneExtendMap_one p F _ hx, + coneExtendMap_one p F _ hy, terminalCone, ConeCell.comp] + +noncomputable def coneExtend {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{w}) (F : Functor (zeroFiber p) B) : Functor C B.terminalCone where + map := coneExtendMap p F + map_source := coneExtendMap_source p F + map_target := coneExtendMap_target p F + map_comp := coneExtendMap_comp p F + +lemma coneExtend_label {C : OmegaCategory.{u}} {B : OmegaCategory.{v}} + (p : Functor C interval.{v}) (F : Functor (zeroFiber p) B) : + Functor.comp (coneExtend p F) (coneLabel B) = p := by + apply Functor.ext + funext x + change (coneLabel B).map (coneExtendMap p F x) = p.map x + rcases interval_cases (p.map x) with hx | hx | hx + · rw [coneExtendMap_zero p F _ hx, hx]; rfl + · rw [coneExtendMap_arrow p F _ hx] + exact hx.symm + · rw [coneExtendMap_one p F _ hx, hx]; rfl + +end Thomason.OmegaCategory + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Construction.lean b/lean/OAI/CategoryTheory/Thomason/Construction.lean new file mode 100644 index 0000000000000000000000000000000000000000..41407b09c19b452e2d3bac44a8c674a0b5f885a5 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Construction.lean @@ -0,0 +1,6 @@ +import OAI.CategoryTheory.Thomason.Transfer.Main +import OAI.CategoryTheory.Thomason.Chains.AcceptedComplexes +import OAI.CategoryTheory.Thomason.IntervalAdjunction + +/-! The right interval construction and the Thomason model structures for +strict omega-categories and their positive finite-dimensional reflections. -/ diff --git a/lean/OAI/CategoryTheory/Thomason/CoreCouniversality.lean b/lean/OAI/CategoryTheory/Thomason/CoreCouniversality.lean new file mode 100644 index 0000000000000000000000000000000000000000..06d849e6f949f52f6d71ad1d2b0bf8b815e76da0 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CoreCouniversality.lean @@ -0,0 +1,803 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.FiniteGluing + +namespace OAI + +/-! Core Couniversality. -/ + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits DirectedComplex NormalizedChains OmegaCategory + +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalCore.{u}) +variable {P Q : Type u} [LinearOrder P] [LinearOrder Q] [Finite P] [Finite Q] + +def corePrismLeg (σ : P →o E) : + T.tensor.obj (categorification.obj (nerve P)) ⟶ categorification.obj (nerve E) := + T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P) ≫ + (d.finiteCylinderChainMap σ).nu ≫ (d.finiteImage σ).lift + +lemma corePrismLeg_natural (σ : Q →o E) (α : P →o Q) : + T.tensor.map (categorification.map (nerveMap α.monotone.functor)) ≫ d.corePrismLeg T σ = + d.corePrismLeg T (σ.comp α) := by + unfold corePrismLeg + rw [← Category.assoc, ← T.tensor.map_comp, posetCategorificationTableMap_natural, + T.tensor.map_comp, Category.assoc, ← Category.assoc (T.tensor.map (complexMap α).nu), + T.simplex_natural, Category.assoc] + have hc := congrArg Hom.nu (d.finiteCylinderChainMap_natural σ α) + change (show (complex P).cylinder.nu ⟶ _ from (d.finiteCylinderChainMap (σ.comp α)).nu) ≫ + (complexMap ((d.finiteImage (σ.comp α)).subInclusion (d.finiteImage σ) + (d.finiteImage_mono σ α))).nu = + (complexMap α).cylinder.nu ≫ (d.finiteCylinderChainMap σ).nu at hc + have hcc := congrArg (fun z : (complex P).cylinder.nu ⟶ (complex (d.finiteImage σ).vertices).nu => + T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P) ≫ z ≫ + (d.finiteImage σ).lift) hc + simp only [Category.assoc, FiniteVertexChain.lift_natural] at hcc + exact hcc.symm + +lemma corePrismLeg_endpoint_false (σ : P →o E) : + (T.endpoint false).app (categorification.obj (nerve P)) ≫ d.corePrismLeg T σ = + categorification.map (nerveMap (d.f.comp σ).monotone.functor) := by + unfold corePrismLeg + rw [← Category.assoc, ← (T.endpoint false).naturality, Category.assoc, + ← Category.assoc ((T.endpoint false).app (complex P).nu), T.simplex_endpoint, CategoryTheory.Functor.id_map] + have hc := congrArg Hom.nu (d.finiteAntihomotopy σ).cylinderHom_endpoint_false + change (show (complex P).nu ⟶ (complex P).cylinder.nu from ((complex P).cylinderEndpoint false).nu) ≫ (d.finiteCylinderChainMap σ).nu = + (complexMap (d.finiteImageLeft σ)).nu at hc + have hcc := congrArg (fun z : (complex P).nu ⟶ (complex (d.finiteImage σ).vertices).nu => + posetCategorificationTableMap P ≫ z ≫ (d.finiteImage σ).lift) hc + simp only [Category.assoc] at hcc + exact hcc.trans ((d.finiteImage σ).map_lift (d.finiteImageLeft σ)) + +lemma corePrismLeg_endpoint_true (σ : P →o E) : + (T.endpoint true).app (categorification.obj (nerve P)) ≫ d.corePrismLeg T σ = + categorification.map (nerveMap (d.g.comp σ).monotone.functor) := by + unfold corePrismLeg + rw [← Category.assoc, ← (T.endpoint true).naturality, Category.assoc, + ← Category.assoc ((T.endpoint true).app (complex P).nu), T.simplex_endpoint, CategoryTheory.Functor.id_map] + have hc := congrArg Hom.nu (d.finiteAntihomotopy σ).cylinderHom_endpoint_true + change (show (complex P).nu ⟶ (complex P).cylinder.nu from ((complex P).cylinderEndpoint true).nu) ≫ (d.finiteCylinderChainMap σ).nu = + (complexMap (d.finiteImageRight σ)).nu at hc + have hcc := congrArg (fun z : (complex P).nu ⟶ (complex (d.finiteImage σ).vertices).nu => + posetCategorificationTableMap P ≫ z ≫ (d.finiteImage σ).lift) hc + simp only [Category.assoc] at hcc + exact hcc.trans ((d.finiteImage σ).map_lift (d.finiteImageRight σ)) + +lemma corePrismLeg_stationary (σ : P →o E) (hs : ∀ p, σ p ∈ A) : + d.corePrismLeg T σ = T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp σ).monotone.functor) := by + unfold corePrismLeg + rw [d.finiteCylinderChainMap_stationary σ hs] + change T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P) ≫ + (complex P).cylinderProjection.nu ≫ (complexMap (d.finiteImageLeft σ)).nu ≫ + (d.finiteImage σ).lift = _ + rw [← Category.assoc (T.simplex P), T.simplex_projection, + ← Category.assoc (T.tensor.map (posetCategorificationTableMap P)), + T.projection.naturality, Category.assoc, CategoryTheory.Functor.id_map, FiniteVertexChain.map_lift] + rfl + +def corePrismCocone : Cocone (posetSimplexDiagram E ⋙ T.tensor) where + pt := categorification.obj (nerve E) + ι.app s := d.corePrismLeg T (simplexVertexOrder s) + ι.naturality s t α := by + change T.tensor.map (categorification.map (nerveMap (simplexVertexMap α).monotone.functor)) ≫ + d.corePrismLeg T (simplexVertexOrder t) = d.corePrismLeg T (simplexVertexOrder s) ≫ 𝟙 _ + rw [d.corePrismLeg_natural, simplexVertexOrder_natural, Category.comp_id] + +def corePrism : T.tensor.obj (categorification.obj (nerve E)) ⟶ categorification.obj (nerve E) := by + letI := T.cocontinuous + letI : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + exact (isColimitOfPreserves T.tensor (posetSimplexIsColimit E)).desc (d.corePrismCocone T) + +lemma corePrism_leg (s : SimplexIndex E) : + T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + d.corePrism T = d.corePrismLeg T (simplexVertexOrder s) := by + let := T.cocontinuous + let : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + exact (isColimitOfPreserves T.tensor (posetSimplexIsColimit E)).fac (d.corePrismCocone T) s + +lemma corePrism_endpoint_false : + (T.endpoint false).app (categorification.obj (nerve E)) ≫ d.corePrism T = + categorification.map (nerveMap d.f.monotone.functor) := by + apply (posetSimplexIsColimit E).hom_ext + intro s + change categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + (T.endpoint false).app (categorification.obj (nerve E)) ≫ d.corePrism T = + categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + categorification.map (nerveMap d.f.monotone.functor) + have hn := (T.endpoint false).naturality + (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) + simp only [CategoryTheory.Functor.id_map] at hn + rw [← Category.assoc, hn, Category.assoc, + d.corePrism_leg, d.corePrismLeg_endpoint_false] + rw [← categorification.map_comp] + congr 1 + +lemma corePrism_endpoint_true : + (T.endpoint true).app (categorification.obj (nerve E)) ≫ d.corePrism T = + categorification.map (nerveMap d.g.monotone.functor) := by + apply (posetSimplexIsColimit E).hom_ext + intro s + change categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + (T.endpoint true).app (categorification.obj (nerve E)) ≫ d.corePrism T = + categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + categorification.map (nerveMap d.g.monotone.functor) + have hn := (T.endpoint true).naturality + (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) + simp only [CategoryTheory.Functor.id_map] at hn + rw [← Category.assoc, hn, Category.assoc, + d.corePrism_leg, d.corePrismLeg_endpoint_true] + rw [← categorification.map_comp] + congr 1 + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits DirectedComplex NormalizedChains OmegaCategory + +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalCore.{u}) + +lemma coreGrayPrism_stationary {P : Type u} [PartialOrder P] (v : P →o E) (hv : ∀ p, v p ∈ A) : + T.tensor.map (categorification.map (nerveMap v.monotone.functor)) ≫ d.corePrism T = + T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp v).monotone.functor) := by + let := T.cocontinuous + let : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + apply (isColimitOfPreserves T.tensor (posetSimplexIsColimit P)).hom_ext + intro s + change T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + T.tensor.map (categorification.map (nerveMap v.monotone.functor)) ≫ d.corePrism T = + T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp v).monotone.functor) + rw [← Category.assoc, ← T.tensor.map_comp, ← categorification.map_comp] + have hvn : nerveMap (simplexVertexOrder s).monotone.functor ≫ nerveMap v.monotone.functor = + nerveMap (simplexVertexOrder (s.postcompose v)).monotone.functor := by + rw [simplexVertexOrder_postcompose] + rfl + erw [hvn, d.corePrism_leg T (s.postcompose v), d.corePrismLeg_stationary T _ (fun p => hv _), + ← Category.assoc, T.projection.naturality, CategoryTheory.Functor.id_map, + Category.assoc, ← categorification.map_comp] + congr 1 + +lemma coreGrayPrism_stationary_inclusion : + T.tensor.map (categorification.map (nerveMap (OrderHom.Subtype.val (fun element : E => element ∈ A)).monotone.functor)) ≫ + d.corePrism T = T.projection.app (categorification.obj (nerve A)) ≫ + categorification.map (nerveMap (d.f.comp (OrderHom.Subtype.val (fun element : E => element ∈ A))).monotone.functor) := + d.coreGrayPrism_stationary T (OrderHom.Subtype.val (fun element : E => element ∈ A)) (fun p => p.property) + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits OmegaCategory + +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalCore.{u}) (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) +variable (adj : T.tensor ⊣ R) (n : ℕ) + +def coreFinitePrism : + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val ⟶ + ((categorificationFinite n).obj (nerve E)).val := + (T.truncatedCylinderEquiv R adj n (categorification.obj (nerve E)) + ((categorificationFinite n).obj (nerve E)).val + ((categorificationFinite n).obj (nerve E)).property).symm + (d.corePrism T ≫ truncationUnit n (categorification.obj (nerve E))) + +lemma coreFinitePrism_unit : + T.tensor.map (truncationUnit n (categorification.obj (nerve E))) ≫ + d.coreFinitePrism T R adj n = d.corePrism T ≫ truncationUnit n (categorification.obj (nerve E)) := by + erw [← T.truncatedCylinderEquiv_apply R adj n _ _ + ((categorificationFinite n).obj (nerve E)).property] + exact Equiv.apply_symm_apply _ _ + +lemma coreFinitePrism_endpoint_false : + (T.endpoint false).app ((categorificationFinite n).obj (nerve E)).val ≫ + d.coreFinitePrism T R adj n = (categorificationFinite n).map (nerveMap d.f.monotone.functor) := by + apply truncation_functor_ext (n := n) + have hn := (T.endpoint false).naturality + (truncationUnit n (categorification.obj (nerve E))) + exact (congrArg (fun h : categorification.obj (nerve E) ⟶ + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val => + h ≫ d.coreFinitePrism T R adj n) hn).trans + ((congrArg (fun h => (T.endpoint false).app (categorification.obj (nerve E)) ≫ h) + (d.coreFinitePrism_unit T R adj n)).trans + (congrArg (fun h : categorification.obj (nerve E) ⟶ categorification.obj (nerve E) => + h ≫ truncationUnit n (categorification.obj (nerve E))) + (d.corePrism_endpoint_false T))) + +lemma coreFinitePrism_endpoint_true : + (T.endpoint true).app ((categorificationFinite n).obj (nerve E)).val ≫ + d.coreFinitePrism T R adj n = (categorificationFinite n).map (nerveMap d.g.monotone.functor) := by + apply truncation_functor_ext (n := n) + have hn := (T.endpoint true).naturality + (truncationUnit n (categorification.obj (nerve E))) + exact (congrArg (fun h : categorification.obj (nerve E) ⟶ + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val => + h ≫ d.coreFinitePrism T R adj n) hn).trans + ((congrArg (fun h => (T.endpoint true).app (categorification.obj (nerve E)) ≫ h) + (d.coreFinitePrism_unit T R adj n)).trans + (congrArg (fun h : categorification.obj (nerve E) ⟶ categorification.obj (nerve E) => + h ≫ truncationUnit n (categorification.obj (nerve E))) + (d.corePrism_endpoint_true T))) + +lemma coreFinitePrism_stationary {P : Type u} [PartialOrder P] (v : P →o E) (hv : ∀ p, v p ∈ A) : + T.tensor.map ((categorificationFinite n).map (nerveMap v.monotone.functor)) ≫ + d.coreFinitePrism T R adj n = + T.projection.app ((categorificationFinite n).obj (nerve P)).val ≫ + (categorificationFinite n).map (nerveMap (d.f.comp v).monotone.functor) := by + apply (T.truncatedCylinderEquiv R adj n (categorification.obj (nerve P)) + ((categorificationFinite n).obj (nerve E)).val + ((categorificationFinite n).obj (nerve E)).property).injective + erw [T.truncatedCylinderEquiv_apply, T.truncatedCylinderEquiv_apply] + erw [← Category.assoc, ← T.tensor.map_comp] + have hn : truncationUnit n (categorification.obj (nerve P)) ≫ + (show ((categorificationFinite n).obj (nerve P)).val ⟶ + ((categorificationFinite n).obj (nerve E)).val from + (categorificationFinite n).map (nerveMap v.monotone.functor)) = + categorification.map (nerveMap v.monotone.functor) ≫ + truncationUnit n (categorification.obj (nerve E)) := rfl + erw [hn, T.tensor.map_comp, Category.assoc, d.coreFinitePrism_unit, + ← Category.assoc, d.coreGrayPrism_stationary T v hv, + Category.assoc] + exact congrArg (fun h : T.tensor.obj (categorification.obj (nerve P)) ⟶ + ((categorificationFinite n).obj (nerve P)).val => + h ≫ (categorificationFinite n).map (nerveMap (d.f.comp v).monotone.functor)) + (T.projection.naturality (truncationUnit n (categorification.obj (nerve P)))).symm + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalCore +open CategoryTheory Simplicial MonoidalCategory Opposite +open DirectedComplex NormalizedChains OmegaCategory +open RightIntervalExtension (raiseSimplex up_raiseSimplex raiseSimplex_precomp up_simplexMap) + +def SimplexDescent (T : RightIntervalCore.{u}) (d : ℕ) : Prop := + ∀ (P : Type u) [LinearOrder P] [Finite P] (Y : OmegaCategory.{u}), Y.IsTruncated d → + Function.Bijective (fun G : (complex P).cylinder.nu ⟶ Y => T.simplex P ≫ G) + +lemma intervalCore_simplexDescent_two : + GrayRecursive.IntervalHom.intervalCore.SimplexDescent 2 := + GrayRecursive.IntervalHom.chainComparison_precomp_bijective_two + +variable (T : RightIntervalCore.{u}) {d : ℕ} (S : T.SimplexDescent d) + +def simplexLift {P : Type u} [LinearOrder P] [Finite P] {Y : OmegaCategory.{u}} + (hY : Y.IsTruncated d) (F : T.tensor.obj (complex P).nu ⟶ Y) : + (complex P).cylinder.nu ⟶ Y := + (Equiv.ofBijective (fun G : (complex P).cylinder.nu ⟶ Y => T.simplex P ≫ G) + (S P Y hY)).symm F + +lemma simplexLift_fac {P : Type u} [LinearOrder P] [Finite P] {Y : OmegaCategory.{u}} + (hY : Y.IsTruncated d) (F : T.tensor.obj (complex P).nu ⟶ Y) : + T.simplex P ≫ T.simplexLift S hY F = F := by + exact (Equiv.ofBijective (fun G : (complex P).cylinder.nu ⟶ Y => T.simplex P ≫ G) + (S P Y hY)).apply_symm_apply F + +lemma simplexLift_natural {P Q : Type u} [LinearOrder P] [Finite P] + [LinearOrder Q] [Finite Q] {Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (f : Hom (complex P) (complex Q)) (F : T.tensor.obj (complex Q).nu ⟶ Y) : + f.cylinder.nu ≫ T.simplexLift S hY F = + T.simplexLift S hY (T.tensor.map f.nu ≫ F) := by + apply (S P Y hY).1 + change T.simplex P ≫ (f.cylinder.nu ≫ T.simplexLift S hY F) = + T.simplex P ≫ T.simplexLift S hY (T.tensor.map f.nu ≫ F) + rw [T.simplexLift_fac, ← Category.assoc, ← T.simplex_natural, + Category.assoc, T.simplexLift_fac] + +lemma simplexLift_endpoint {P : Type u} [LinearOrder P] [Finite P] + {Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (F : T.tensor.obj (complex P).nu ⟶ Y) (ε : Bool) : + ((complex P).cylinderEndpoint ε).nu ≫ T.simplexLift S hY F = + (T.endpoint ε).app (complex P).nu ≫ F := by + rw [← T.simplex_endpoint, Category.assoc, T.simplexLift_fac] + +def cutApply {P : Type u} [LinearOrder P] [Finite P] {Y : OmegaCategory.{u}} + (hY : Y.IsTruncated d) (F : T.tensor.obj (complex P).nu ⟶ Y) (θ : P →o Fin 2) : + (complex P).nu ⟶ Y := (awHom θ).nu ≫ T.simplexLift S hY F + +lemma cutApply_natural {P Q : Type u} [LinearOrder P] [Finite P] + [LinearOrder Q] [Finite Q] {Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (f : P →o Q) (F : T.tensor.obj (complex Q).nu ⟶ Y) (θ : Q →o Fin 2) : + (complexMap f).nu ≫ T.cutApply S hY F θ = + T.cutApply S hY (T.tensor.map (complexMap f).nu ≫ F) (θ.comp f) := by + unfold cutApply + change (Hom.comp (complexMap f) (awHom θ)).nu ≫ T.simplexLift S hY F = _ + rw [awHom_naturality] + change (awHom (θ.comp f)).nu ≫ ((complexMap f).cylinder.nu ≫ T.simplexLift S hY F) = _ + rw [T.simplexLift_natural] + +lemma cutApply_endpoint {P : Type u} [LinearOrder P] [Finite P] + {Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (F : T.tensor.obj (complex P).nu ⟶ Y) (ε : Bool) : + T.cutApply S hY F (OrderHom.const P (if ε then 1 else 0)) = + (T.endpoint ε).app (complex P).nu ≫ F := by + unfold cutApply + rw [awHom_endpoint, T.simplexLift_endpoint] + +def nerveCylinderSimplex {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (P : T.tensor.obj X ⟶ Y) (m : ℕ) (F : OmegaCategory.Functor (Oriental m) X) + (θ : Fin (m+1) →o Fin 2) : OmegaCategory.Functor (Oriental m) Y := + OmegaCategory.Functor.comp (complexMap (orderULiftUp.{0,u} (Fin (m+1)))).nu + (T.cutApply S hY (T.tensor.map (raiseSimplex F) ≫ P) (θ.comp (orderULiftDown _))) + +lemma nerveCylinderSimplex_natural {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (P : T.tensor.obj X ⟶ Y) {m n : ℕ} (a : Fin (m+1) →o Fin (n+1)) + (F : OmegaCategory.Functor (Oriental n) X) (θ : Fin (n+1) →o Fin 2) : + T.nerveCylinderSimplex S hY P m (OmegaCategory.Functor.comp (complexMap a).nu F) + (θ.comp a) = OmegaCategory.Functor.comp (complexMap a).nu + (T.nerveCylinderSimplex S hY P n F θ) := by + unfold nerveCylinderSimplex + rw [raiseSimplex_precomp, T.tensor.map_comp, Category.assoc] + let b := (orderULiftUp.{0,u} (Fin (n+1))).comp (a.comp (orderULiftDown _)) + have hc : (θ.comp a).comp (orderULiftDown _) = + (θ.comp (orderULiftDown _)).comp b := rfl + rw [hc, ← T.cutApply_natural] + exact congrArg (fun f => OmegaCategory.Functor.comp f + (T.cutApply S hY (T.tensor.map (raiseSimplex F) ≫ P) (θ.comp (orderULiftDown _)))) + (up_simplexMap a) + +lemma nerveCylinderSimplex_endpoint {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (P : T.tensor.obj X ⟶ Y) (m : ℕ) (F : OmegaCategory.Functor (Oriental m) X) (ε : Bool) : + T.nerveCylinderSimplex S hY P m F (OrderHom.const _ (if ε then 1 else 0)) = + OmegaCategory.Functor.comp F ((T.endpoint ε).app X ≫ P) := by + unfold nerveCylinderSimplex + have hc : (OrderHom.const (Fin (m+1)) (if ε then (1 : Fin 2) else 0)).comp + (orderULiftDown.{0,u} (Fin (m+1))) = OrderHom.const _ (if ε then 1 else 0) := rfl + rw [hc, T.cutApply_endpoint] + have hn := (T.endpoint ε).naturality (raiseSimplex F) + exact (congrArg (fun f => OmegaCategory.Functor.comp + (complexMap (orderULiftUp.{0,u} (Fin (m+1)))).nu (f ≫ P)) hn.symm).trans + (congrArg (fun f => OmegaCategory.Functor.comp f ((T.endpoint ε).app X ≫ P)) + (up_raiseSimplex F)) + +def nerveCylinder {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) (P : T.tensor.obj X ⟶ Y) : + streetNerve X ⊗ Δ[1] ⟶ streetNerve Y where + app m := ↾fun x => T.nerveCylinderSimplex S hY P m.unop.len x.1 + (SSet.stdSimplex.objEquiv x.2).toOrderHom + naturality m n a := by + apply ConcreteCategory.hom_ext + intro x + exact T.nerveCylinderSimplex_natural S hY P a.unop.toOrderHom x.1 + (SSet.stdSimplex.objEquiv x.2).toOrderHom + +lemma nerveCylinder_endpoint {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) + (P : T.tensor.obj X ⟶ Y) (ε : Bool) : + (if ε then SSet.ι₁ else SSet.ι₀) ≫ T.nerveCylinder S hY P = + streetNerveMap ((T.endpoint ε).app X ≫ P) := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro F + cases ε + · exact T.nerveCylinderSimplex_endpoint S hY P m.unop.len F false + · exact T.nerveCylinderSimplex_endpoint S hY P m.unop.len F true + +def nerveHomotopy {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) (P : T.tensor.obj X ⟶ Y) : + SSet.Homotopy (streetNerveMap ((T.endpoint false).app X ≫ P)) + (streetNerveMap ((T.endpoint true).app X ≫ P)) where + h := T.nerveCylinder S hY P + h₀ := T.nerveCylinder_endpoint S hY P false + h₁ := T.nerveCylinder_endpoint S hY P true + rel := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + rintro ⟨⟨x, hx⟩, θ⟩ + exact False.elim hx + +include S in +lemma nerve_weak_iff {X Y : OmegaCategory.{u}} (hY : Y.IsTruncated d) (P : T.tensor.obj X ⟶ Y) : + simplicialWeakEquivalences (streetNerveMap ((T.endpoint false).app X ≫ P)) ↔ + simplicialWeakEquivalences (streetNerveMap ((T.endpoint true).app X ≫ P)) := + simplicialWeakEquivalences_homotopy (T.nerveHomotopy S hY P) + +end Thomason.RightIntervalCore + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalCore +open CategoryTheory Limits OmegaCategory + +variable (T : RightIntervalCore.{u}) +variable (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + +include R adj in + +theorem finite_pushout_zigzag + {n : ℕ} (hS : T.SimplexDescent n) {A B X Y : NCategory.{u} n} + {i : A ⟶ B} {a : A ⟶ X} {b : B ⟶ Y} {j : X ⟶ Y} + (sq : IsPushout i a b j) + (r : B ⟶ A) (hi : i ≫ r = 𝟙 A) (G : B ⟶ B) + (P₀ P₁ : T.tensor.obj B.val ⟶ B.val) + (h₀ : (T.endpoint false).app B.val ≫ P₀ = 𝟙 B.val) + (h₁ : (T.endpoint true).app B.val ≫ P₀ = G) + (h₂ : (T.endpoint false).app B.val ≫ P₁ = r ≫ i) + (h₃ : (T.endpoint true).app B.val ≫ P₁ = G) + (hs₀ : T.tensor.map i ≫ P₀ = T.projection.app A.val ≫ i) + (hs₁ : T.tensor.map i ≫ P₁ = T.projection.app A.val ≫ i) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 ((streetNerveFinite n).obj Y)) + ((streetNerveFinite n).map H)) ∧ + Nonempty (SSet.Homotopy ((streetNerveFinite n).map (p ≫ j)) + ((streetNerveFinite n).map H)) := by + let p : Y ⟶ X := sq.desc (r ≫ a) (𝟙 X) (by + rw [← Category.assoc, hi, Category.id_comp, Category.comp_id]) + have hpB : b ≫ p = r ≫ a := sq.inl_desc _ _ _ + have hpX : j ≫ p = 𝟙 X := sq.inr_desc _ _ _ + obtain ⟨Q₀, _, _, hB₀, hX₀, _⟩ := T.finite_stationary_gluing R adj sq P₀ + (fun ε => if ε then G else 𝟙 B) (by intro ε; cases ε; exact h₀; exact h₁) hs₀ + obtain ⟨Q₁, _, _, hB₁, hX₁, _⟩ := T.finite_stationary_gluing R adj sq P₁ + (fun ε => if ε then G else r ≫ i) (by intro ε; cases ε; exact h₂; exact h₃) hs₁ + let e₀ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y.val) Q₀ + let e₁ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y.val) Q₁ + have he₀ : e₀ false = 𝟙 Y := by + apply sq.hom_ext + · exact hB₀ false + · exact hX₀ false + have he₁ : e₁ false = p ≫ j := by + apply sq.hom_ext + · rw [← Category.assoc, hpB, Category.assoc, ← sq.w, ← Category.assoc] + exact hB₁ false + · rw [← Category.assoc, hpX, Category.id_comp] + exact hX₁ false + have he : e₁ true = e₀ true := by + apply sq.hom_ext + · exact (hB₁ true).trans (hB₀ true).symm + · exact (hX₁ true).trans (hX₀ true).symm + refine ⟨p, e₀ true, hpX, ?_, ?_⟩ + · have h : SSet.Homotopy ((streetNerveFinite n).map (e₀ false)) + ((streetNerveFinite n).map (e₀ true)) := T.nerveHomotopy hS Y.property Q₀ + rw [he₀, (streetNerveFinite n).map_id] at h + exact ⟨h⟩ + · have h : SSet.Homotopy ((streetNerveFinite n).map (e₁ false)) + ((streetNerveFinite n).map (e₁ true)) := T.nerveHomotopy hS Y.property Q₁ + rw [he₁, he] at h + exact ⟨h⟩ + +end Thomason.RightIntervalCore + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GreatestNew +open CategoryTheory Limits OmegaCategory AttachmentComparison + +variable (T : RightIntervalCore.{u}) +variable (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) +variable {E : Type u} [PartialOrder E] (A : Set E) (hA : IsLowerSet A) +variable (r : E →o A) (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) +variable (x : E) (hx : IsGreatest Aᶜ x) + +include T R adj hA r hadj x hx in + +theorem core_finite_pushout_deformation (n : ℕ) (hS : T.SimplexDescent n) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} {j : X ⟶ Y} + {b : posetObj n E ⟶ Y} (sq : IsPushout (inc n A) a b j) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 ((streetNerveFinite n).obj Y)) + ((streetNerveFinite n).map H)) ∧ + Nonempty (SSet.Homotopy ((streetNerveFinite n).map (p ≫ j)) + ((streetNerveFinite n).map H)) := by + let d₀ := idPrismData A hA x hx + let d₁ := retractPrismData A hA r hadj x hx + let i := (OrderEmbedding.subtype (fun element : E => element ∈ A)).toOrderHom + let r' := retract A hA r hadj x hx + have hr' : r'.comp i = OrderHom.id := retract_comp_inc A hA r hadj x hx + have hri : inc n A ≫ posetMap n r' = 𝟙 (posetObj n A) := by + rw [← finitePosetMap_comp] + change posetMap n (r'.comp i) = _ + rw [hr', finitePosetMap_id] + have h₀ : d₀.f.comp i = i := rfl + have h₁ : d₁.f.comp i = i := by + ext e + exact congrArg Subtype.val (retract_old A hA r hadj x hx e) + have hs₀ := d₀.coreFinitePrism_stationary T R adj n i (fun e => e.property) + have hs₁ := d₁.coreFinitePrism_stationary T R adj n i (fun e => e.property) + rw [h₀] at hs₀ + rw [h₁] at hs₁ + exact T.finite_pushout_zigzag R adj hS sq (posetMap n r') hri + (posetMap n (upper A hA x hx)) + (d₀.coreFinitePrism T R adj n) (d₁.coreFinitePrism T R adj n) + ((d₀.coreFinitePrism_endpoint_false T R adj n).trans (finitePosetMap_id n E)) + (d₀.coreFinitePrism_endpoint_true T R adj n) + ((d₁.coreFinitePrism_endpoint_false T R adj n).trans (finitePosetMap_comp n r' i)) + (d₁.coreFinitePrism_endpoint_true T R adj n) hs₀ hs₁ + +include T R adj hA r hadj x hx in + +theorem core_finite_pushout_nerve_weak (n : ℕ) (hS : T.SimplexDescent n) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} {j : X ⟶ Y} + {b : posetObj n E ⟶ Y} (sq : IsPushout (inc n A) a b j) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + obtain ⟨p,H,hp,⟨H₀⟩,⟨H₁⟩⟩ := core_finite_pushout_deformation T R adj A hA r hadj x hx n hS sq + exact RightIntervalExtension.finite_nerve_weak_of_zigzag j p H hp H₀ H₁ + +end Thomason.GreatestNew + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits OmegaCategory Attachments AttachmentComparison + +theorem core_finite_poset_couniversal + (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hS : T.SimplexDescent n) (hn : 1 ≤ n) {E : Type u} [PartialOrder E] [Finite E] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} + {j : X ⟶ Y} {v : posetObj n E ⟶ Y} (sq : IsPushout a (inc n A) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + classical + suffices H : ∀ m : ℕ, ∀ (E : Type u) [PartialOrder E] [Finite E], Nat.card E = m → + ∀ (A : Set E), IsLowerSet A → ∀ (r : E →o A), + (∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) → + ∀ {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) (j : X ⟶ Y) + (v : posetObj n E ⟶ Y), IsPushout a (inc n A) j v → + simplicialWeakEquivalences ((streetNerveFinite n).map j) from + H (Nat.card E) E rfl A hA r hadj a j v sq + intro m + induction m using Nat.strong_induction_on with + | h m ih => + intro E _ _ hm A hA r hadj X Y a j v sq + by_cases he : Aᶜ.Nonempty + · rcases greatest_or_two_maximal Aᶜ he with ⟨x,hx⟩ | ⟨x,y,hx,hy,hxy⟩ + · exact GreatestNew.core_finite_pushout_nerve_weak T R adj A hA r hadj x hx n hS sq.flip + · let S₁ : Set E := {x}ᶜ + let S₂ : Set E := {y}ᶜ + have h₁ : IsLowerSet S₁ := delete_max_lower (maximal_new_isMax hA hx) + have h₂ : IsLowerSet S₂ := delete_max_lower (maximal_new_isMax hA hy) + have hA₁ : A ⊆ S₁ := by + intro z hz heq + change z = x at heq + exact hx.1 (heq ▸ hz) + have hA₂ : A ⊆ S₂ := by + intro z hz heq + change z = y at heq + exact hy.1 (heq ▸ hz) + have hc : S₁ ∪ S₂ = Set.univ := by + apply Set.eq_univ_of_forall + intro z + change z ≠ x ∨ z ≠ y + by_cases hz : z = x + · exact Or.inr (fun heq => hxy (hz.symm.trans heq)) + · exact Or.inl hz + obtain ⟨T₁,T₂,hT₁,hT₂,hTc,hp₁,hp₂,hp₃⟩ := + sieve_finite_attachment_covers n hn A S₁ S₂ h₁ h₂ hA₁ hA₂ hc a j v sq + have hpiece (S : Set E) (hAS : A ⊆ S) (e : E) (he : e ∉ S) + (Z : Set Y.val.Objects) (hp : IsPosetFiniteAttachmentPiece n A S hAS a j v Z) : + ∃ (jS : X ⟶ fullFinite n Y Z), jS ≫ fullFiniteInclusion n Y Z = j ∧ + simplicialWeakEquivalences ((streetNerveFinite n).map jS) := by + obtain ⟨jS,vS,hjS,hvS,sqS⟩ := hp + refine ⟨jS,hjS,?_⟩ + let eS := nestedOldIso (categorificationFinite n) A S hAS + have sqS' : IsPushout (eS.hom ≫ a) (inc n {s : S | s.val ∈ A}) jS vS := by + apply sqS.of_iso' eS (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom, Category.comp_id] + exact nestedOldIso_inc (categorificationFinite n) A S hAS + · simp + · simp + exact ih (Nat.card S) (hm ▸ Finite.card_subtype_lt he) S rfl + {s : S | s.val ∈ A} (restricted_lower hA S) + (restrictedRetract A S hAS r) (restricted_adjoint A S hAS r hadj) + (eS.hom ≫ a) jS vS sqS' + obtain ⟨j₁,hj₁,hw₁⟩ := hpiece S₁ hA₁ x (by simp [S₁]) T₁ hp₁ + obtain ⟨j₂,hj₂,hw₂⟩ := hpiece S₂ hA₂ y (by simp [S₂]) T₂ hp₂ + obtain ⟨j₃,hj₃,hw₃⟩ := hpiece (S₁ ∩ S₂) (fun _ ha => ⟨hA₁ ha,hA₂ ha⟩) + x (by simp [S₁]) (T₁ ∩ T₂) hp₃ + apply weak_of_full_sieve_cover hT₁ hT₂ hTc ((streetNerveFinite n).map j) + ((streetNerveFinite n).map j₁) ((streetNerveFinite n).map j₂) + ((streetNerveFinite n).map j₃) _ _ _ hw₁ hw₂ hw₃ + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₁) + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₂) + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₃) + · have ha : ∀ e, e ∈ A := by + intro e + by_contra h + exact he ⟨e,h⟩ + have : IsIso (inc n A) := isIso_subtype_all (categorificationFinite n) A ha + have : IsIso j := sq.isIso_inl_of_isIso + exact simplicialWeakEquivalences.of_isIso _ + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits FilteredPosets FilteredPushouts + +theorem core_poset_couniversal + (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hS : T.SimplexDescent n) (hn : 1 ≤ n) {E : Type u} [PartialOrder E] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : OmegaCategory.NCategory.{u} n} {a : AttachmentComparison.posetObj n A ⟶ X} + {j : X ⟶ Y} {v : AttachmentComparison.posetObj n E ⟶ Y} + (sq : IsPushout a (AttachmentComparison.inc n A) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + let := (categorificationFiniteAdjunction n).leftAdjoint_preservesColimits + exact couniversal_of_finite (categorificationFinite n) (streetNerveFinite n) + (fun P _ _ A hA r hr _ _ a j v sq => + core_finite_poset_couniversal T R adj n hS hn A hA r hr sq) A hA r hadj a j v sq + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.AttachmentComparison +open CategoryTheory Limits OmegaCategory Attachments Couniversality + +lemma core_gray_piece_couniversal (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hS : T.SimplexDescent n) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] + (A S : Set B) (hA : IsLowerSet A) (hAS : A ⊆ S) + (r : S →o A) (hadj : ∀ (a : A) (s : S), a.val ≤ s.val ↔ a ≤ r s) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n S ⟶ Y) + (sq : IsPushout a (sb n A S hAS) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + let e := nestedOldIso (categorificationFinite n) A S hAS + let r' : S →o {s : S | s.val ∈ A} := + ⟨fun s => ⟨⟨(r s).val,hAS (r s).property⟩,(r s).property⟩, + fun _ _ h => r.monotone h⟩ + have sq' : IsPushout (e.hom ≫ a) (inc n {s : S | s.val ∈ A}) j v := by + apply sq.of_iso' e (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom,Category.comp_id] + exact nestedOldIso_inc (categorificationFinite n) A S hAS + · simp + · simp + exact core_poset_couniversal T R adj n hS hn {s : S | s.val ∈ A} + (restricted_lower hA S) r' (fun a s => hadj ⟨a.val.val,a.property⟩ s) sq' + +lemma core_gray_comparison_local (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hS : T.SimplexDescent n) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] + (A : Set B) (hA : IsLowerSet A) + (r : upward A →o A) + (hadj : ∀ (a : A) (z : upward A), a.val ≤ z.val ↔ a ≤ r z) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n B ⟶ Y) (sc : IsPushout a (inc n A) j v) + {P : SSet.{u}} {lX : (streetNerveFinite n).obj X ⟶ P} + {lB : (streetNerveFinite n).obj (posetObj n B) ⟶ P} + (ss : IsPushout ((streetNerveFinite n).map a) ((streetNerveFinite n).map (inc n A)) lX lB) + (F : P ⟶ (streetNerveFinite n).obj Y) + (hFX : lX ≫ F = (streetNerveFinite n).map j) + (hFB : lB ≫ F = (streetNerveFinite n).map v) : simplicialWeakEquivalences F := by + let Z := upward A + let C := Aᶜ + have hAZ : A ⊆ Z := fun x hx => ⟨x,hx,le_rfl⟩ + have hZ : IsUpperSet Z := by + intro x y hxy hx + obtain ⟨a,ha,hax⟩ := hx + exact ⟨a,ha,hax.trans hxy⟩ + have hC : IsUpperSet C := isUpperSet_compl.mpr hA + have hcov : Z ∪ C = Set.univ := by + apply Set.eq_univ_of_forall + intro x + by_cases hx : x ∈ A + · exact Or.inl (hAZ hx) + · exact Or.inr hx + obtain ⟨YZ,jZ,vZ,uZ,scZ,hj,hv,sq⟩ := + attachment_nerve_cover n hn A Z C hZ hC hAZ disjoint_compl_right hcov a j v sc + let N := streetNerveFinite n + let e := N.map (sb n A Z hAZ) + let b := N.map a + let PZ := pushout b e + let xZ := pushout.inl b e + let zZ := pushout.inr b e + let sZ := IsPushout.of_hasPushout b e + let FZ : PZ ⟶ N.obj YZ := sZ.desc (N.map jZ) (N.map vZ) (by + rw [← N.map_comp, ← N.map_comp, scZ.w]) + have hFZX : xZ ≫ FZ = N.map jZ := sZ.inl_desc _ _ _ + have hFZZ : zZ ≫ FZ = N.map vZ := sZ.inr_desc _ _ _ + have hwj : simplicialWeakEquivalences (N.map jZ) := + core_gray_piece_couniversal T R adj n hS hn A Z hA hAZ r hadj a jZ vZ scZ + have hwe : simplicialWeakEquivalences e := + core_gray_piece_couniversal T R adj n hS hn A Z hA hAZ r hadj + (𝟙 _) (sb n A Z hAZ) (𝟙 _) IsPushout.of_id_fst + have hcE : Mono e := by + let e' := nestedOldIso (categorificationFinite n) A Z hAZ + have he' : sb n A Z hAZ = e'.inv ≫ inc n {z : Z | z.val ∈ A} := by + calc + _ = e'.inv ≫ (e'.hom ≫ sb n A Z hAZ) := by simp + _ = _ := congrArg (e'.inv ≫ ·) (nestedOldIso_inc (categorificationFinite n) A Z hAZ) + have : Mono (N.map (inc n {z : Z | z.val ∈ A})) := + finite_nerve_attachment_mono n hn _ (restricted_lower hA Z) + (𝟙 _) _ (𝟙 _) IsPushout.of_id_fst + dsimp [e] + rw [he',CategoryTheory.Functor.map_comp] + infer_instance + have hwx : simplicialWeakEquivalences xZ := by + have he : SSet.anodyneExtensions e := KanQuillen.anodyne_class.symm ▸ ⟨hcE,hwe⟩ + exact KanQuillen.anodyne_weak _ (SSet.anodyneExtensions.of_isPushout sZ he) + have hwFZ : simplicialWeakEquivalences FZ := + simplicialWeakEquivalences.of_precomp xZ FZ hwx (hFZX ▸ hwj) + let pZ : PZ ⟶ P := sZ.desc lX (N.map (inc n Z) ≫ lB) (by + rw [← Category.assoc, ← N.map_comp, sb_inc] + exact ss.w) + have hpZX : xZ ≫ pZ = lX := sZ.inl_desc _ _ _ + have hpZZ : zZ ≫ pZ = N.map (inc n Z) ≫ lB := sZ.inr_desc _ _ _ + have ss' : IsPushout b (e ≫ N.map (inc n Z)) (xZ ≫ pZ) lB := by + rw [hpZX, ← N.map_comp, sb_inc] + exact ss + have sr : IsPushout zZ (N.map (inc n Z)) pZ lB := ss'.of_top hpZZ sZ + have sp := (poset_nerve_cover n hn Z C hZ hC hcov).paste_horiz sr + let k := N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ + let c := N.map (sb n (Z ∩ C) C Set.inter_subset_right) + have hc : Mono c := finite_nerve_inter_upper_mono n hn Z C hZ + have hk : k ≫ FZ = N.map (sb n (Z ∩ C) Z Set.inter_subset_left ≫ vZ) := by + rw [show k = N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ from rfl, + Category.assoc, hFZZ, ← N.map_comp] + have sq' : IsPushout (k ≫ FZ) c (N.map uZ) (N.map (inc n C ≫ v)) := by + rw [hk] + exact sq + have hFpZ : pZ ≫ F = FZ ≫ N.map uZ := by + apply sZ.hom_ext + · rw [← Category.assoc, hpZX, ← Category.assoc xZ, hFZX, ← N.map_comp, hj] + exact hFX + · rw [← Category.assoc, hpZZ, Category.assoc, hFB, + ← Category.assoc zZ, hFZZ, ← N.map_comp, ← N.map_comp, hv] + have hFC : (N.map (inc n C) ≫ lB) ≫ F = N.map (inc n C ≫ v) := by + rw [Category.assoc, hFB, ← N.map_comp] + exact KanLocal.local_weak F (KanLocal.local_pushout_map k c FZ + (GeometricRecognition.weak_local FZ hwFZ) sp sq' F hFpZ hFC) + +end Thomason.AttachmentComparison + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Couniversality.lean b/lean/OAI/CategoryTheory/Thomason/Couniversality.lean new file mode 100644 index 0000000000000000000000000000000000000000..e97db8f393e7df475bcaa539a28175c9aaa32700 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Couniversality.lean @@ -0,0 +1,683 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.GreatestAttachments + +namespace OAI + +/-! Couniversality. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits OmegaCategory + +lemma greatest_or_two_maximal {P : Type u} [PartialOrder P] [Finite P] + (S : Set P) (hne : S.Nonempty) : + (∃ x, IsGreatest S x) ∨ + ∃ x y, Maximal (· ∈ S) x ∧ Maximal (· ∈ S) y ∧ x ≠ y := by + classical + by_cases hg : ∃ x, IsGreatest S x + · exact Or.inl hg + right + obtain ⟨x,hx⟩ := S.toFinite.exists_maximal hne + have hn : ¬ ∀ z ∈ S, z ≤ x := fun h => hg ⟨x,hx.1,h⟩ + push Not at hn + obtain ⟨z,hz,hzx⟩ := hn + obtain ⟨y,hzy,hy⟩ := S.toFinite.exists_le_maximal hz + exact ⟨x,y,hx,hy,fun hxy => hzx (hxy ▸ hzy)⟩ + +lemma maximal_new_isMax {P : Type u} [PartialOrder P] + {A : Set P} (hA : IsLowerSet A) {x : P} (hx : Maximal (· ∈ Aᶜ) x) : IsMax x := by + intro y hxy + exact hx.2 (fun hy => hx.1 (hA hxy hy)) hxy + +lemma delete_max_lower {P : Type u} [PartialOrder P] {x : P} (hx : IsMax x) : + IsLowerSet ({x}ᶜ : Set P) := by + intro a b hab hb + change b ≠ x + intro he + subst b + exact hb (le_antisymm (hx hab) hab) + +def nestedOldIso {D : Type v} [Category.{w} D] (F : SSet.{u} ⥤ D) + {P : Type u} [PartialOrder P] (A S : Set P) (hAS : A ⊆ S) : + F.obj (nerve {s : S | s.val ∈ A}) ≅ F.obj (nerve A) where + hom := F.map (nerveMap (show {s : S | s.val ∈ A} →o A from + ⟨fun a => ⟨a.val.val,a.property⟩,fun _ _ h => h⟩).toFunctor) + inv := F.map (nerveMap (show A →o {s : S | s.val ∈ A} from + ⟨fun a => ⟨⟨a.val,hAS a.property⟩,a.property⟩,fun _ _ h => h⟩).toFunctor) + hom_inv_id := by + rw [← F.map_comp] + exact F.map_id _ + inv_hom_id := by + rw [← F.map_comp] + exact F.map_id _ + +lemma nestedOldIso_inc {D : Type v} [Category.{w} D] (F : SSet.{u} ⥤ D) + {P : Type u} [PartialOrder P] (A S : Set P) (hAS : A ⊆ S) : + (nestedOldIso F A S hAS).hom ≫ + F.map (nerveMap (Attachments.subposetMap A S hAS).toFunctor) = + F.map (nerveMap (OrderEmbedding.subtype {s : S | s.val ∈ A}).toOrderHom.toFunctor) := by + rw [nestedOldIso, ← F.map_comp] + rfl + +lemma restricted_lower {P : Type u} [PartialOrder P] {A : Set P} + (hA : IsLowerSet A) (S : Set P) : IsLowerSet {s : S | s.val ∈ A} := + fun _ _ h ha => hA h ha + +def restrictedRetract {P : Type u} [PartialOrder P] (A S : Set P) + (hAS : A ⊆ S) (r : P →o A) : S →o {s : S | s.val ∈ A} := + ⟨fun e => ⟨⟨(r e.val).val,hAS (r e.val).property⟩,(r e.val).property⟩, + fun _ _ h => r.monotone h⟩ + +lemma restricted_adjoint {P : Type u} [PartialOrder P] (A S : Set P) + (hAS : A ⊆ S) (r : P →o A) + (hadj : ∀ (a : A) (e : P), a.val ≤ e ↔ a ≤ r e) : + ∀ (a : {s : S | s.val ∈ A}) (e : S), + a.val ≤ e ↔ a ≤ restrictedRetract A S hAS r e := by + intro a e + exact hadj ⟨a.val.val,a.property⟩ e.val + +lemma weak_of_full_sieve_cover {C : OmegaCategory.{u}} {S T : Set C.Objects} + (hS : C.IsObjectSieve S) (hT : C.IsObjectSieve T) + (hc : S ∪ T = Set.univ) {X : SSet.{u}} (j : X ⟶ streetNerve C) + (jS : X ⟶ streetNerve (C.fullOn S).category) + (jT : X ⟶ streetNerve (C.fullOn T).category) + (jI : X ⟶ streetNerve (C.fullOn (S ∩ T)).category) + (heS : jS ≫ streetNerveMap (C.fullOn S).inclusion = j) + (heT : jT ≫ streetNerveMap (C.fullOn T).inclusion = j) + (heI : jI ≫ streetNerveMap (C.fullOn (S ∩ T)).inclusion = j) + (hwS : simplicialWeakEquivalences jS) + (hwT : simplicialWeakEquivalences jT) + (hwI : simplicialWeakEquivalences jI) : simplicialWeakEquivalences j := by + let pS := streetNerveMap (fullOnMap (Set.inter_subset_left (s := S) (t := T))) + let pT := streetNerveMap (fullOnMap (Set.inter_subset_right (s := S) (t := T))) + have he : jI ≫ pS = jS := by + apply (cancel_mono (streetNerveMap (C.fullOn S).inclusion)).mp + rw [Category.assoc, heS] + exact heI + have hw : simplicialWeakEquivalences pS := + simplicialWeakEquivalences.of_precomp jI pS hwI (he ▸ hwS) + have sq := sieve_cover_nerve_isPushout hS hT (fun a => by + have ha : a ∈ S ∪ T := by rw [hc]; trivial + exact ha) + have hwT' : simplicialWeakEquivalences (streetNerveMap (C.fullOn T).inclusion) := + GeometricRecognition.left_proper _ _ _ _ sq.flip (by infer_instance) hw + rw [← heT] + exact simplicialWeakEquivalences.comp_mem _ _ hwT hwT' + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits OmegaCategory Attachments AttachmentComparison + +lemma isIso_subtype_all {D : Type v} [Category.{w} D] (F : SSet.{u} ⥤ D) + {E : Type u} [PartialOrder E] (A : Set E) (ha : ∀ e, e ∈ A) : + IsIso (F.map (nerveMap (OrderEmbedding.subtype (fun element : E => element ∈ A)).toOrderHom.toFunctor)) := by + let r : E →o A := ⟨fun e => ⟨e, ha e⟩,fun _ _ h => h⟩ + refine ⟨⟨F.map (nerveMap r.toFunctor), ?_, ?_⟩⟩ <;> + rw [← F.map_comp] <;> exact F.map_id _ + +theorem finite_poset_couniversal + (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {E : Type u} [PartialOrder E] [Finite E] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} + {j : X ⟶ Y} {v : posetObj n E ⟶ Y} (sq : IsPushout a (inc n A) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + classical + suffices H : ∀ m : ℕ, ∀ (E : Type u) [PartialOrder E] [Finite E], Nat.card E = m → + ∀ (A : Set E), IsLowerSet A → ∀ (r : E →o A), + (∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) → + ∀ {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) (j : X ⟶ Y) + (v : posetObj n E ⟶ Y), IsPushout a (inc n A) j v → + simplicialWeakEquivalences ((streetNerveFinite n).map j) from + H (Nat.card E) E rfl A hA r hadj a j v sq + intro m + induction m using Nat.strong_induction_on with + | h m ih => + intro E _ _ hm A hA r hadj X Y a j v sq + by_cases he : Aᶜ.Nonempty + · rcases greatest_or_two_maximal Aᶜ he with ⟨x,hx⟩ | ⟨x,y,hx,hy,hxy⟩ + · exact GreatestNew.finite_pushout_nerve_weak T R adj A hA r hadj x hx n sq.flip + · let S₁ : Set E := {x}ᶜ + let S₂ : Set E := {y}ᶜ + have h₁ : IsLowerSet S₁ := delete_max_lower (maximal_new_isMax hA hx) + have h₂ : IsLowerSet S₂ := delete_max_lower (maximal_new_isMax hA hy) + have hA₁ : A ⊆ S₁ := by + intro z hz heq + change z = x at heq + exact hx.1 (heq ▸ hz) + have hA₂ : A ⊆ S₂ := by + intro z hz heq + change z = y at heq + exact hy.1 (heq ▸ hz) + have hc : S₁ ∪ S₂ = Set.univ := by + apply Set.eq_univ_of_forall + intro z + change z ≠ x ∨ z ≠ y + by_cases hz : z = x + · exact Or.inr (fun heq => hxy (hz.symm.trans heq)) + · exact Or.inl hz + obtain ⟨T₁,T₂,hT₁,hT₂,hTc,hp₁,hp₂,hp₃⟩ := + sieve_finite_attachment_covers n hn A S₁ S₂ h₁ h₂ hA₁ hA₂ hc a j v sq + have hpiece (S : Set E) (hAS : A ⊆ S) (e : E) (he : e ∉ S) + (Z : Set Y.val.Objects) (hp : IsPosetFiniteAttachmentPiece n A S hAS a j v Z) : + ∃ (jS : X ⟶ fullFinite n Y Z), jS ≫ fullFiniteInclusion n Y Z = j ∧ + simplicialWeakEquivalences ((streetNerveFinite n).map jS) := by + obtain ⟨jS,vS,hjS,hvS,sqS⟩ := hp + refine ⟨jS,hjS,?_⟩ + let eS := nestedOldIso (categorificationFinite n) A S hAS + have sqS' : IsPushout (eS.hom ≫ a) (inc n {s : S | s.val ∈ A}) jS vS := by + apply sqS.of_iso' eS (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom, Category.comp_id] + exact nestedOldIso_inc (categorificationFinite n) A S hAS + · simp + · simp + exact ih (Nat.card S) (hm ▸ Finite.card_subtype_lt he) S rfl + {s : S | s.val ∈ A} (restricted_lower hA S) + (restrictedRetract A S hAS r) (restricted_adjoint A S hAS r hadj) + (eS.hom ≫ a) jS vS sqS' + obtain ⟨j₁,hj₁,hw₁⟩ := hpiece S₁ hA₁ x (by simp [S₁]) T₁ hp₁ + obtain ⟨j₂,hj₂,hw₂⟩ := hpiece S₂ hA₂ y (by simp [S₂]) T₂ hp₂ + obtain ⟨j₃,hj₃,hw₃⟩ := hpiece (S₁ ∩ S₂) (fun _ ha => ⟨hA₁ ha,hA₂ ha⟩) + x (by simp [S₁]) (T₁ ∩ T₂) hp₃ + apply weak_of_full_sieve_cover hT₁ hT₂ hTc ((streetNerveFinite n).map j) + ((streetNerveFinite n).map j₁) ((streetNerveFinite n).map j₂) + ((streetNerveFinite n).map j₃) _ _ _ hw₁ hw₂ hw₃ + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₁) + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₂) + · exact (Functor.map_comp (streetNerveFinite n) _ _).symm.trans + (congrArg (fun f : X ⟶ Y => (streetNerveFinite n).map f) hj₃) + · have ha : ∀ e, e ∈ A := by + intro e + by_contra h + exact he ⟨e,h⟩ + have : IsIso (inc n A) := isIso_subtype_all (categorificationFinite n) A ha + have : IsIso j := sq.isIso_inl_of_isIso + exact simplicialWeakEquivalences.of_isIso _ + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Couniversality +open CategoryTheory Limits OmegaCategory Attachments AttachmentComparison GreatestNew + +theorem omega_finite_poset_couniversal + (T : RightIntervalExtension.{u}) + {E : Type u} [PartialOrder E] [Finite E] + (A : Set E) (hA : IsLowerSet A) (r : E →o A) + (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) + {X Y : OmegaCategory.{u}} {a : omegaPosetObj A ⟶ X} + {j : X ⟶ Y} {v : omegaPosetObj E ⟶ Y} (sq : IsPushout a (omegaInc A) j v) : + simplicialWeakEquivalences (streetNerveFunctor.map j) := by + classical + suffices H : ∀ m : ℕ, ∀ (E : Type u) [PartialOrder E] [Finite E], Nat.card E = m → + ∀ (A : Set E), IsLowerSet A → ∀ (r : E →o A), + (∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) → + ∀ {X Y : OmegaCategory.{u}} (a : omegaPosetObj A ⟶ X) (j : X ⟶ Y) + (v : omegaPosetObj E ⟶ Y), IsPushout a (omegaInc A) j v → + simplicialWeakEquivalences (streetNerveFunctor.map j) from + H (Nat.card E) E rfl A hA r hadj a j v sq + intro m + induction m using Nat.strong_induction_on with + | h m ih => + intro E _ _ hm A hA r hadj X Y a j v sq + by_cases he : Aᶜ.Nonempty + · rcases greatest_or_two_maximal Aᶜ he with ⟨x,hx⟩ | ⟨x,y,hx,hy,hxy⟩ + · exact GreatestNew.omega_pushout_nerve_weak T A hA r hadj x hx sq.flip + · let S₁ : Set E := {x}ᶜ + let S₂ : Set E := {y}ᶜ + have h₁ : IsLowerSet S₁ := delete_max_lower (maximal_new_isMax hA hx) + have h₂ : IsLowerSet S₂ := delete_max_lower (maximal_new_isMax hA hy) + have hA₁ : A ⊆ S₁ := by + intro z hz heq + change z = x at heq + exact hx.1 (heq ▸ hz) + have hA₂ : A ⊆ S₂ := by + intro z hz heq + change z = y at heq + exact hy.1 (heq ▸ hz) + have hc : S₁ ∪ S₂ = Set.univ := by + apply Set.eq_univ_of_forall + intro z + change z ≠ x ∨ z ≠ y + by_cases hz : z = x + · exact Or.inr (fun heq => hxy (hz.symm.trans heq)) + · exact Or.inl hz + obtain ⟨T₁,T₂,hT₁,hT₂,hTc,hp₁,hp₂,hp₃⟩ := + sieve_attachment_covers A S₁ S₂ h₁ h₂ hA₁ hA₂ hc a j v sq + have hpiece (S : Set E) (hAS : A ⊆ S) (e : E) (he : e ∉ S) + (Z : Set Y.Objects) (hp : IsPosetAttachmentPiece A S hAS a j v Z) : + ∃ (jS : X ⟶ (Y.fullOn Z).category), jS ≫ (Y.fullOn Z).inclusion = j ∧ + simplicialWeakEquivalences (streetNerveFunctor.map jS) := by + obtain ⟨jS,vS,hjS,hvS,sqS⟩ := hp + refine ⟨jS,hjS,?_⟩ + let eS := nestedOldIso categorification A S hAS + have sqS' : IsPushout (eS.hom ≫ a) (omegaInc {s : S | s.val ∈ A}) jS vS := by + apply sqS.of_iso' eS (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom, Category.comp_id] + exact nestedOldIso_inc categorification A S hAS + · simp + · simp + exact ih (Nat.card S) (hm ▸ Finite.card_subtype_lt he) S rfl + {s : S | s.val ∈ A} (restricted_lower hA S) + (restrictedRetract A S hAS r) (restricted_adjoint A S hAS r hadj) + (eS.hom ≫ a) jS vS sqS' + obtain ⟨j₁,hj₁,hw₁⟩ := hpiece S₁ hA₁ x (by simp [S₁]) T₁ hp₁ + obtain ⟨j₂,hj₂,hw₂⟩ := hpiece S₂ hA₂ y (by simp [S₂]) T₂ hp₂ + obtain ⟨j₃,hj₃,hw₃⟩ := hpiece (S₁ ∩ S₂) (fun _ ha => ⟨hA₁ ha,hA₂ ha⟩) + x (by simp [S₁]) (T₁ ∩ T₂) hp₃ + apply weak_of_full_sieve_cover hT₁ hT₂ hTc (streetNerveFunctor.map j) + (streetNerveFunctor.map j₁) (streetNerveFunctor.map j₂) + (streetNerveFunctor.map j₃) _ _ _ hw₁ hw₂ hw₃ + · exact (Functor.map_comp streetNerveFunctor _ _).symm.trans + (congrArg (fun f : X ⟶ Y => streetNerveFunctor.map f) hj₁) + · exact (Functor.map_comp streetNerveFunctor _ _).symm.trans + (congrArg (fun f : X ⟶ Y => streetNerveFunctor.map f) hj₂) + · exact (Functor.map_comp streetNerveFunctor _ _).symm.trans + (congrArg (fun f : X ⟶ Y => streetNerveFunctor.map f) hj₃) + · have ha : ∀ e, e ∈ A := by + intro e + by_contra h + exact he ⟨e,h⟩ + have : IsIso (omegaInc A) := isIso_subtype_all categorification A ha + have : IsIso j := sq.isIso_inl_of_isIso + exact simplicialWeakEquivalences.of_isIso _ + +end Thomason.Couniversality + +end + +noncomputable section +universe u v w z + + +namespace Thomason.AttachmentComparison +open CategoryTheory Limits OmegaCategory Attachments Couniversality + +lemma finite_nerve_attachment_mono (n : ℕ) (hn : 1 ≤ n) + {B : Type u} [PartialOrder B] (A : Set B) (hA : IsLowerSet A) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n B ⟶ Y) (sc : IsPushout a (inc n A) j v) : + Mono ((streetNerveFinite n).map j) := by + obtain ⟨S,hS,e,he⟩ := poset_finite_sieve_attachment n hn A hA a j v sc + have hinc := OmegaCategory.Subcategory.inclusion_mono (Y.val.fullOn S) + have hj : Mono ((nCategoryInclusion n).map j) := by + change @Mono OmegaCategory inferInstance X.val Y.val j + rw [← he] + infer_instance + have : Mono j := (nCategoryInclusion n).mono_of_mono_map hj + let : PreservesLimits (streetNerveFinite n) := + (categorificationFiniteAdjunction n).rightAdjoint_preservesLimits + infer_instance + +lemma finite_nerve_upper_mono (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (S : Set P) (hS : IsUpperSet S) : + Mono ((streetNerveFinite n).map (inc n S)) := by + let l := NormalizedChains.PosetTables.upperSegmentLabel S hS + have hS' : S = {p | l p = 1} := by + ext p + exact (NormalizedChains.PosetTables.upperSegmentLabel_one S hS p).symm + let e := posetPieceFiniteFiberIso n hn S l 1 hS' + have he := posetPieceFiniteFiberIso_inclusion n hn S l 1 hS' + have := fiberFiniteInclusion_mono n hn 1 + (Over.mk (posetCategorificationFiniteLabel n hn l)) + have : Mono (inc n S) := by + change Mono ((categorificationFinite n).map + (nerveMap (OrderEmbedding.subtype (fun element : P => element ∈ S)).toOrderHom.monotone.functor)) + rw [← he] + infer_instance + let : PreservesLimits (streetNerveFinite n) := + (categorificationFiniteAdjunction n).rightAdjoint_preservesLimits + infer_instance + +lemma finite_nerve_inter_upper_mono (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (Z C : Set P) (hZ : IsUpperSet Z) : + Mono ((streetNerveFinite n).map (sb n (Z ∩ C) C Set.inter_subset_right)) := by + let e := nestedOldIso (categorificationFinite n) (Z ∩ C) C Set.inter_subset_right + have : Mono ((streetNerveFinite n).map (inc n {c : C | c.val ∈ Z ∩ C})) := + finite_nerve_upper_mono n hn _ (by + intro x y hxy hx + exact ⟨hZ hxy hx.1,y.property⟩) + have he : sb n (Z ∩ C) C Set.inter_subset_right = + e.inv ≫ inc n {c : C | c.val ∈ Z ∩ C} := by + calc + _ = e.inv ≫ (e.hom ≫ sb n (Z ∩ C) C Set.inter_subset_right) := by simp + _ = _ := congrArg (e.inv ≫ ·) (nestedOldIso_inc + (categorificationFinite n) (Z ∩ C) C Set.inter_subset_right) + rw [he, CategoryTheory.Functor.map_comp] + infer_instance + +lemma finite_piece_couniversal (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] + (A S : Set B) [Finite S] (hA : IsLowerSet A) (hAS : A ⊆ S) + (r : S →o A) (hadj : ∀ (a : A) (s : S), a.val ≤ s.val ↔ a ≤ r s) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n S ⟶ Y) + (sq : IsPushout a (sb n A S hAS) j v) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + let e := nestedOldIso (categorificationFinite n) A S hAS + let r' : S →o {s : S | s.val ∈ A} := + ⟨fun s => ⟨⟨(r s).val,hAS (r s).property⟩,(r s).property⟩, + fun _ _ h => r.monotone h⟩ + have sq' : IsPushout (e.hom ≫ a) (inc n {s : S | s.val ∈ A}) j v := by + apply sq.of_iso' e (Iso.refl _) (Iso.refl _) (Iso.refl _) + · simp + · simp only [Iso.refl_hom,Category.comp_id] + exact nestedOldIso_inc (categorificationFinite n) A S hAS + · simp + · simp + exact finite_poset_couniversal T R adj n hn {s : S | s.val ∈ A} + (restricted_lower hA S) r' (fun a s => hadj ⟨a.val.val,a.property⟩ s) sq' + +lemma comparison_local_finite_poset (T : RightIntervalExtension.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (n : ℕ) (hn : 1 ≤ n) {B : Type u} [PartialOrder B] [Finite B] + (A : Set B) (hA : IsLowerSet A) + (r : upward A →o A) + (hadj : ∀ (a : A) (z : upward A), a.val ≤ z.val ↔ a ≤ r z) + {X Y : NCategory.{u} n} (a : posetObj n A ⟶ X) + (j : X ⟶ Y) (v : posetObj n B ⟶ Y) (sc : IsPushout a (inc n A) j v) + {P : SSet.{u}} {lX : (streetNerveFinite n).obj X ⟶ P} + {lB : (streetNerveFinite n).obj (posetObj n B) ⟶ P} + (ss : IsPushout ((streetNerveFinite n).map a) ((streetNerveFinite n).map (inc n A)) lX lB) + (F : P ⟶ (streetNerveFinite n).obj Y) + (hFX : lX ≫ F = (streetNerveFinite n).map j) + (hFB : lB ≫ F = (streetNerveFinite n).map v) : simplicialWeakEquivalences F := by + let Z := upward A + let C := Aᶜ + have hAZ : A ⊆ Z := fun x hx => ⟨x,hx,le_rfl⟩ + have hZ : IsUpperSet Z := by + intro x y hxy hx + obtain ⟨a,ha,hax⟩ := hx + exact ⟨a,ha,hax.trans hxy⟩ + have hC : IsUpperSet C := isUpperSet_compl.mpr hA + have hcov : Z ∪ C = Set.univ := by + apply Set.eq_univ_of_forall + intro x + by_cases hx : x ∈ A + · exact Or.inl (hAZ hx) + · exact Or.inr hx + obtain ⟨YZ,jZ,vZ,uZ,scZ,hj,hv,sq⟩ := + attachment_nerve_cover n hn A Z C hZ hC hAZ disjoint_compl_right hcov a j v sc + let N := streetNerveFinite n + let e := N.map (sb n A Z hAZ) + let b := N.map a + let PZ := pushout b e + let xZ := pushout.inl b e + let zZ := pushout.inr b e + let sZ := IsPushout.of_hasPushout b e + let FZ : PZ ⟶ N.obj YZ := sZ.desc (N.map jZ) (N.map vZ) (by + rw [← N.map_comp, ← N.map_comp, scZ.w]) + have hFZX : xZ ≫ FZ = N.map jZ := sZ.inl_desc _ _ _ + have hFZZ : zZ ≫ FZ = N.map vZ := sZ.inr_desc _ _ _ + have hwj : simplicialWeakEquivalences (N.map jZ) := + finite_piece_couniversal T R adj n hn A Z hA hAZ r hadj a jZ vZ scZ + have hwe : simplicialWeakEquivalences e := + finite_piece_couniversal T R adj n hn A Z hA hAZ r hadj + (𝟙 _) (sb n A Z hAZ) (𝟙 _) IsPushout.of_id_fst + have hcE : Mono e := by + let e' := nestedOldIso (categorificationFinite n) A Z hAZ + have he' : sb n A Z hAZ = e'.inv ≫ inc n {z : Z | z.val ∈ A} := by + calc + _ = e'.inv ≫ (e'.hom ≫ sb n A Z hAZ) := by simp + _ = _ := congrArg (e'.inv ≫ ·) (nestedOldIso_inc (categorificationFinite n) A Z hAZ) + have : Mono (N.map (inc n {z : Z | z.val ∈ A})) := + finite_nerve_attachment_mono n hn _ (restricted_lower hA Z) + (𝟙 _) _ (𝟙 _) IsPushout.of_id_fst + dsimp [e] + rw [he',CategoryTheory.Functor.map_comp] + infer_instance + have hwx : simplicialWeakEquivalences xZ := by + have he : SSet.anodyneExtensions e := KanQuillen.anodyne_class.symm ▸ ⟨hcE,hwe⟩ + exact KanQuillen.anodyne_weak _ (SSet.anodyneExtensions.of_isPushout sZ he) + have hwFZ : simplicialWeakEquivalences FZ := + simplicialWeakEquivalences.of_precomp xZ FZ hwx (hFZX ▸ hwj) + let pZ : PZ ⟶ P := sZ.desc lX (N.map (inc n Z) ≫ lB) (by + rw [← Category.assoc, ← N.map_comp, sb_inc] + exact ss.w) + have hpZX : xZ ≫ pZ = lX := sZ.inl_desc _ _ _ + have hpZZ : zZ ≫ pZ = N.map (inc n Z) ≫ lB := sZ.inr_desc _ _ _ + have ss' : IsPushout b (e ≫ N.map (inc n Z)) (xZ ≫ pZ) lB := by + rw [hpZX, ← N.map_comp, sb_inc] + exact ss + have sr : IsPushout zZ (N.map (inc n Z)) pZ lB := ss'.of_top hpZZ sZ + have sp := (poset_nerve_cover n hn Z C hZ hC hcov).paste_horiz sr + let k := N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ + let c := N.map (sb n (Z ∩ C) C Set.inter_subset_right) + have hc : Mono c := finite_nerve_inter_upper_mono n hn Z C hZ + have hk : k ≫ FZ = N.map (sb n (Z ∩ C) Z Set.inter_subset_left ≫ vZ) := by + rw [show k = N.map (sb n (Z ∩ C) Z Set.inter_subset_left) ≫ zZ from rfl, + Category.assoc, hFZZ, ← N.map_comp] + have sq' : IsPushout (k ≫ FZ) c (N.map uZ) (N.map (inc n C ≫ v)) := by + rw [hk] + exact sq + have hFpZ : pZ ≫ F = FZ ≫ N.map uZ := by + apply sZ.hom_ext + · rw [← Category.assoc, hpZX, ← Category.assoc xZ, hFZX, ← N.map_comp, hj] + exact hFX + · rw [← Category.assoc, hpZZ, Category.assoc, hFB, + ← Category.assoc zZ, hFZZ, ← N.map_comp, ← N.map_comp, hv] + have hFC : (N.map (inc n C) ≫ lB) ≫ F = N.map (inc n C ≫ v) := by + rw [Category.assoc, hFB, ← N.map_comp] + exact KanLocal.local_weak F (KanLocal.local_pushout_map k c FZ + (GeometricRecognition.weak_local FZ hwFZ) sp sq' F hFpZ hFC) + +end Thomason.AttachmentComparison + +end + +noncomputable section +universe u v w z + + +namespace Thomason.FilteredWeak +open CategoryTheory Limits Opposite Simplicial MonoidalCategory CartesianMonoidalCategory MonoidalClosed +open KanPath LastVertexProof KanHomotopy HornSubdivision SSet.modelCategoryQuillen + +lemma colimit_lifting {J : Type u} [Category.{u} J] [IsFiltered J] + {A B : SSet.{u}} [A.Finite] [B.Finite] + (i : A ⟶ B) {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) + (hp : ∀ j, HasLiftingProperty i (p.app j)) : + HasLiftingProperty i (colim.map p) := by + constructor + intro a b sq + obtain ⟨n,an,han⟩ := exists_hom_of_preservesColimit_coyoneda (colimit.isColimit X) a + obtain ⟨m,bm,hbm⟩ := exists_hom_of_preservesColimit_coyoneda (colimit.isColimit Y) b + change an ≫ colimit.ι X n = a at han + change bm ≫ colimit.ι Y m = b at hbm + have he : (an ≫ p.app n) ≫ colimit.ι Y n = (i ≫ bm) ≫ colimit.ι Y m := by + rw [Category.assoc,← ι_colimMap,← Category.assoc,han,Category.assoc,hbm] + exact sq.w + obtain ⟨k,s,t,hst⟩ := exists_eq_of_preservesColimit_coyoneda (colimit.isColimit Y) + (an ≫ p.app n) (i ≫ bm) he + let := hp k + let q : CommSq (an ≫ X.map s) i (p.app k) (bm ≫ Y.map t) := + ⟨by rw [Category.assoc,p.naturality,← Category.assoc]; exact hst⟩ + refine ⟨⟨{l := q.lift ≫ colimit.ι X k,fac_left := ?_,fac_right := ?_}⟩⟩ + · rw [← Category.assoc,q.fac_left,Category.assoc,colimit.w,han] + · change (q.lift ≫ colimit.ι X k) ≫ colimMap p = b + rw [Category.assoc,ι_colimMap,← Category.assoc,q.fac_right,Category.assoc,colimit.w,hbm] + +lemma boundary_rlp_colimit {J : Type u} [Category.{u} J] [IsFiltered J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) (hp : ∀ j, I.rlp (p.app j)) : + I.rlp (colim.map p) := by + rintro _ _ _ ⟨n⟩ + exact colimit_lifting (SSet.boundary n).ι p (fun j => hp j _ ⟨n⟩) + +lemma eval₀_rlp (B : SSet.{u}) [SSet.KanComplex B] : + (MorphismProperty.monomorphisms SSet).rlp (eval₀ B) := by + intro D E i hi + let : Mono i := hi + constructor + intro x y sq + have hp : simplicialFibrations (terminal.from B) := by + change J.rlp _ + rw [← fibrations_eq, ← HomotopicalAlgebra.fibration_iff] + infer_instance + obtain ⟨Q,hQ,h₀,_⟩ := cylinder_lift i (terminal.from B) hp 1 y + (uncurryR x) (terminal.from _) + (by rw [endpoint_zero, ← comp_eval₀]; exact sq.w) + (by subsingleton) (by subsingleton) + refine ⟨⟨{l := curryR Q, fac_left := ?_, fac_right := ?_}⟩⟩ + · apply uncurryR_injective + rw [uncurryR_pre, uncurryR_curryR, hQ] + · rw [comp_eval₀, uncurryR_curryR] + simpa only [endpoint_zero] using h₀ + +lemma path_projection_rlp {A B : SSet.{u}} [SSet.KanComplex B] (f : A ⟶ B) : + I.rlp (pullback.fst f (eval₀ B)) := by + rw [← SSet.rlp_monomorphisms] + exact MorphismProperty.of_isPullback (IsPullback.of_hasPullback f (eval₀ B)).flip (eval₀_rlp B) + +@[simp] lemma path_map_id {A B : SSet.{u}} (f : A ⟶ B) + (h : (𝟙 A) ≫ f = f ≫ (𝟙 B)) : + KanPath.map (𝟙 A) (𝟙 B) h = 𝟙 (MappingPath f) := by + apply pullback.hom_ext <;> simp + +lemma const_natural {A B : SSet.{u}} (f : A ⟶ B) : + const A ≫ (ihom Δ[1]).map f = f ≫ const B := by + apply uncurryR_injective + rw [uncurryR_post, uncurryR_pre] + simp only [const, uncurryR_curryR, whiskerRight_fst] + +@[reassoc] lemma path_map_left {A₁ A₀ B₁ B₀ : SSet.{u}} + {f₁ : A₁ ⟶ B₁} {f₀ : A₀ ⟶ B₀} + (a : A₁ ⟶ A₀) (b : B₁ ⟶ B₀) (h : a ≫ f₀ = f₁ ≫ b) : + left f₁ ≫ KanPath.map a b h = a ≫ left f₀ := by + apply pullback.hom_ext + · simp only [Category.assoc, map_fst, left, pullback.lift_fst_assoc, + pullback.lift_fst, Category.id_comp, Category.comp_id] + · simp only [Category.assoc, map_snd, left, pullback.lift_snd_assoc, pullback.lift_snd] + rw [const_natural, ← Category.assoc, ← h, Category.assoc] + +def pathDiagram {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : J ⥤ SSet.{u} where + obj j := MappingPath (p.app j) + map f := KanPath.map (X.map f) (Y.map f) (p.naturality f) + map_id j := by + apply pullback.hom_ext <;> simp + map_comp f g := by + apply pullback.hom_ext + · simp + · simp [CategoryTheory.Functor.map_comp] + +def pathProjection {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : pathDiagram p ⟶ X where + app j := pullback.fst (p.app j) (eval₀ (Y.obj j)) + naturality _ _ f := map_fst _ _ (p.naturality f) + +def pathLeft {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : X ⟶ pathDiagram p where + app j := left (p.app j) + naturality _ _ f := (path_map_left _ _ (p.naturality f)).symm + +def pathRight {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : pathDiagram p ⟶ Y where + app j := right (p.app j) + naturality _ _ f := map_right _ _ (p.naturality f) + +@[simp] lemma path_left_projection {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : + pathLeft p ≫ pathProjection p = 𝟙 X := by + apply NatTrans.ext + funext j + exact pullback.lift_fst _ _ _ + +@[simp] lemma path_fac {J : Type u} [Category.{u} J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) : pathLeft p ≫ pathRight p = p := by + apply NatTrans.ext + funext j + exact fac _ + +theorem kan_colimit_weak {J : Type u} [Category.{u} J] [IsFiltered J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) + (hX : ∀ j, SSet.KanComplex (X.obj j)) (hY : ∀ j, SSet.KanComplex (Y.obj j)) + (hp : ∀ j, simplicialWeakEquivalences (p.app j)) : + simplicialWeakEquivalences (colim.map p) := by + have hproj : simplicialWeakEquivalences (colim.map (pathProjection p)) := by + apply KanQuillen.boundary_right_weak + apply boundary_rlp_colimit + intro j + let := hY j + exact path_projection_rlp (p.app j) + have hr : simplicialWeakEquivalences (colim.map (pathRight p)) := by + apply KanQuillen.boundary_right_weak + apply boundary_rlp_colimit + intro j + let := hX j + let := hY j + rw [← SSet.rlp_monomorphisms] + exact right_rlp (p.app j) (GeometricRecognition.weak_kan_heq _ (hp j)) + have hl : simplicialWeakEquivalences (colim.map (pathLeft p)) := by + apply simplicialWeakEquivalences.of_postcomp _ _ hproj + rw [← CategoryTheory.Functor.map_comp,path_left_projection,CategoryTheory.Functor.map_id] + exact simplicialWeakEquivalences.id_mem _ + simpa only [← CategoryTheory.Functor.map_comp,path_fac] using simplicialWeakEquivalences.comp_mem _ _ hl hr + +theorem colimit_weak {J : Type u} [Category.{u} J] [IsFiltered J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) + (hp : ∀ j, simplicialWeakEquivalences (p.app j)) : + simplicialWeakEquivalences (colim.map p) := by + let R := Subdivision.exInfinityFunctor.{u} + have hr : simplicialWeakEquivalences (colim.map (CategoryTheory.Functor.whiskerRight p R)) := + kan_colimit_weak (CategoryTheory.Functor.whiskerRight p R) + (fun j => Subdivision.exInfinity_kan (X.obj j)) + (fun j => Subdivision.exInfinity_kan (Y.obj j)) + (fun j => (Subdivision.exInfinity_map_weak_iff (p.app j)).mpr (hp j)) + apply (Subdivision.exInfinity_map_weak_iff (colim.map p)).mp + apply simplicialWeakEquivalences.of_postcomp _ (preservesColimitIso R Y).hom + (simplicialWeakEquivalences.of_isIso _) + have hw : R.map (colim.map p) ≫ (preservesColimitIso R Y).hom = + (preservesColimitIso R X).hom ≫ colim.map (CategoryTheory.Functor.whiskerRight p R) := + (preservesColimitNatIso R).hom.naturality p + rw [hw] + exact simplicialWeakEquivalences.comp_mem _ _ (simplicialWeakEquivalences.of_isIso _) hr + +lemma weak_of_colimit {J : Type u} [Category.{u} J] [IsFiltered J] + {X Y : J ⥤ SSet.{u}} (p : X ⟶ Y) (c : Cocone X) (d : Cocone Y) + (hc : IsColimit c) (hd : IsColimit d) (f : c.pt ⟶ d.pt) + (fac : ∀ j, c.ι.app j ≫ f = p.app j ≫ d.ι.app j) + (hp : ∀ j, simplicialWeakEquivalences (p.app j)) : + simplicialWeakEquivalences f := by + let e₁ := hc.coconePointUniqueUpToIso (colimit.isColimit X) + let e₂ := (colimit.isColimit Y).coconePointUniqueUpToIso hd + have h₁ (j : J) : c.ι.app j ≫ e₁.hom = colimit.ι X j := + hc.comp_coconePointUniqueUpToIso_hom (colimit.isColimit X) j + have h₂ (j : J) : colimit.ι Y j ≫ e₂.hom = d.ι.app j := + (colimit.isColimit Y).comp_coconePointUniqueUpToIso_hom hd j + have he : f = e₁.hom ≫ colim.map p ≫ e₂.hom := by + apply hc.hom_ext + intro j + rw [← Category.assoc,← Category.assoc,h₁,colimit.ι_map,Category.assoc,h₂] + exact fac j + rw [he] + exact simplicialWeakEquivalences.comp_mem _ _ (simplicialWeakEquivalences.of_isIso _) + (simplicialWeakEquivalences.comp_mem _ _ (colimit_weak p hp) + (simplicialWeakEquivalences.of_isIso _)) + +end Thomason.FilteredWeak + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CubicalGeometry.lean b/lean/OAI/CategoryTheory/Thomason/CubicalGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdd900469ed7c910849bb73f1d0d3557b9230262 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CubicalGeometry.lean @@ -0,0 +1,783 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.RelativeRepresentation + +namespace OAI + +/-! Cubical Geometry. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory +open scoped Topology unitInterval + +namespace Thomason.GeometricRecognition +open LastVertexProof KanLocal + +lemma realization_homotopy_rel {A B K : SSet.{u}} (i : B ⟶ A) [Mono i] + {f g : A ⟶ K} (H : SSet.Homotopy f g) + (hH : i ▷ Δ[1] ≫ H.h = fst B Δ[1] ≫ i ≫ g) : + Nonempty ((SSet.toTop.map f).hom.HomotopyRel (SSet.toTop.map g).hom + (Set.range (SSet.toTop.map i))) := by + let s := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i + (SSet.stdSimplex.δ (n := 0) (0 : Fin 2)) + have hinl : s.inl ≫ s.ι = A ◁ SSet.stdSimplex.δ (n := 0) 0 := s.inl_ι + have hinr : s.inr ≫ s.ι = i ▷ Δ[1] := s.inr_ι + have heq : s.ι ≫ H.h = s.ι ≫ fst A Δ[1] ≫ g := by + apply s.isPushout.hom_ext + · rw [← Category.assoc,hinl,← Category.assoc,hinl] + apply (cancel_epi (SimplicialCylinder.zeroFactorIso A).hom).mp + rw [← Category.assoc,CoherentGluing.zeroFactor_one,H.h₁, + ← Category.assoc,CoherentGluing.zeroFactor_one,SSet.ι₁_fst_assoc] + · rw [← Category.assoc,hinr,← Category.assoc,hinr,hH, + whiskerRight_fst_assoc] + obtain ⟨r,hr,_,⟨R⟩⟩ := TopologicalHorn.anodyne_realization_retract s.ι + (SSet.anodyneExtensions_pushoutObjObjι s (SimplicialCylinder.delta_one_anodyne 0)) + let j := SSet.toTop.map s.ι + let e := SSet.toTop.map (SSet.ι₀ (X := A)) + let z : C(SSet.toTop.obj A,SSet.toTop.obj (A ⊗ Δ[1])) := j.hom.comp (r.hom.comp e.hom) + have hz (b : SSet.toTop.obj B) : e (SSet.toTop.map i b) ∈ Set.range j := by + refine ⟨SSet.toTop.map (SSet.ι₀ ≫ s.inr) b,?_⟩ + change (SSet.toTop.map (SSet.ι₀ ≫ s.inr) ≫ j) b = _ + dsimp only [j,e] + rw [← Functor.map_comp,Category.assoc,hinr,SSet.ι₀_comp,Functor.map_comp] + rfl + let h : z.HomotopyRel e.hom (Set.range (SSet.toTop.map i)) := + { toHomotopy := R.toHomotopy.compContinuousMap e.hom + prop' := by + rintro t a ⟨b,rfl⟩ + exact R.prop t _ (hz b) } + let h₁ := h.compContinuousMap (SSet.toTop.map H.h).hom + let h₂ := h.compContinuousMap (SSet.toTop.map (fst A Δ[1] ≫ g)).hom + have hstart : (SSet.toTop.map H.h).hom.comp z = + (SSet.toTop.map (fst A Δ[1] ≫ g)).hom.comp z := by + have hh : (SSet.toTop.map H.h).hom.comp j.hom = + (SSet.toTop.map (fst A Δ[1] ≫ g)).hom.comp j.hom := by + change (SSet.toTop.map s.ι ≫ SSet.toTop.map H.h).hom = + (SSet.toTop.map s.ι ≫ SSet.toTop.map (fst A Δ[1] ≫ g)).hom + rw [← Functor.map_comp,← Functor.map_comp,heq] + simpa only [z,← ContinuousMap.comp_assoc] using + congrArg (fun q : C(SSet.toTop.obj s.pt,SSet.toTop.obj K) => + q.comp (r.hom.comp e.hom)) hh + have hf : (SSet.toTop.map H.h).hom.comp e.hom = (SSet.toTop.map f).hom := by + change (SSet.toTop.map SSet.ι₀ ≫ SSet.toTop.map H.h).hom = _ + rw [← Functor.map_comp,H.h₀] + have hg : (SSet.toTop.map (fst A Δ[1] ≫ g)).hom.comp e.hom = (SSet.toTop.map g).hom := by + change (SSet.toTop.map SSet.ι₀ ≫ SSet.toTop.map (fst A Δ[1] ≫ g)).hom = _ + rw [← Functor.map_comp,SSet.ι₀_fst_assoc] + exact ⟨(h₁.cast rfl hf).symm.trans (h₂.cast hstart.symm hg)⟩ +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma based_homotopy_boundary {A B K : SSet.{u}} (i : B ⟶ A) (z : B ⟶ K) + {a b : A ⟶ K} (H : BasedHomotopy i z a b) : i ≫ a = z ∧ i ≫ b = z := by + obtain ⟨H,hH⟩ := H + constructor + · have hh := congrArg (fun q => SSet.ι₀ ≫ q) hH + simpa only [SSet.ι₀_comp_assoc,H.h₀,SSet.ι₀_fst_assoc] using hh + · have hh := congrArg (fun q => SSet.ι₁ ≫ q) hH + simpa only [SSet.ι₁_comp_assoc,H.h₁,SSet.ι₁_fst_assoc] using hh + +lemma based_related_boundary {A B K : SSet.{u}} (i : B ⟶ A) (z : B ⟶ K) + {a b : A ⟶ K} (H : BasedRelated i z a b) : i ≫ a = i ≫ b := by + induction H with + | rel a b H => exact (based_homotopy_boundary i z H).1.trans (based_homotopy_boundary i z H).2.symm + | refl => rfl + | symm _ _ _ ih => exact ih.symm + | trans _ _ _ _ _ ih ih' => exact ih.trans ih' + +lemma based_related_homotopy {A B K : SSet.{u}} [SSet.KanComplex K] + (i : B ⟶ A) [Mono i] (z : B ⟶ K) {a b : A ⟶ K} + (H : BasedRelated i z a b) : i ≫ a = z → BasedHomotopy i z a b := by + induction H with + | rel a b H => exact fun _ => H + | refl a => exact fun ha => based_homotopy_refl i z a ha + | symm a b H ih => + intro hb + exact based_homotopy_symm i z (ih ((based_related_boundary i z H).trans hb)) + | trans a b c Hab Hbc ih ih' => + intro ha + exact based_homotopy_trans i z (ih ha) (ih' ((based_related_boundary i z Hab).symm.trans ha)) + +lemma based_related_pre {A B A' B' K : SSet.{u}} + (i : B ⟶ A) (j : B' ⟶ A') (f : A' ⟶ A) (g : B' ⟶ B) + (w : j ≫ f = g ≫ i) (z : B ⟶ K) {a b : A ⟶ K} + (H : BasedRelated i z a b) : BasedRelated j (g ≫ z) (f ≫ a) (f ≫ b) := by + induction H with + | rel a b H => exact Relation.EqvGen.rel _ _ (based_homotopy_pre i j f g w z H) + | refl a => exact Relation.EqvGen.refl _ + | symm _ _ _ ih => exact Relation.EqvGen.symm _ _ ih + | trans _ _ _ _ _ ih ih' => exact Relation.EqvGen.trans _ _ _ ih ih' + +lemma based_related_post {A B K L : SSet.{u}} (i : B ⟶ A) (z : B ⟶ K) + {a b : A ⟶ K} (H : BasedRelated i z a b) (f : K ⟶ L) : + BasedRelated i (z ≫ f) (a ≫ f) (b ≫ f) := by + induction H with + | rel a b H => exact Relation.EqvGen.rel _ _ (based_homotopy_post i z H f) + | refl a => exact Relation.EqvGen.refl _ + | symm _ _ _ ih => exact Relation.EqvGen.symm _ _ ih + | trans _ _ _ _ _ ih ih' => exact Relation.EqvGen.trans _ _ _ ih ih' + +lemma pair_relative_nerve_detection (P B : PartOrd.{u}) [Finite P] + (i : B →o P) (hi : Function.Injective i) {Q : Type u} [PartialOrder Q] + (q : Q) (f g : P →o Q) (H : (affineMap f).Homotopy (affineMap g)) + (hH : ∀ (t : unitInterval) (x : PolyPoint B), H (t,map i (preservesChains_monotone i) x) = vertex q) : + ∃ n, BasedRelated (nerveMap (levelMap i n).toFunctor) + (nerveMap (constantOrder (level B n) q).toFunctor) + (nerveMap (f.comp (last P n)).toFunctor) + (nerveMap (g.comp (last P n)).toFunctor) := by + let : Fintype P := Fintype.ofFinite P + let A : Set (PolyPoint P) := Set.range (map i (preservesChains_monotone i)) + have hA : ∀ t x, x ∈ A → H (t,x) = vertex q := by + rintro t x ⟨y,rfl⟩ + exact hH t y + obtain ⟨n,hn⟩ := homotopy_relative_subdivision_contiguity P f g H A q hA + let c : level B (n+1) →o relativeFaceSet (relativeVertices P A n) := + { toFun := fun s => ⟨s.map (levelMap i n),by + intro p hp + obtain ⟨x,hx,rfl⟩ := (NonemptyFiniteChains.mem_map_iff s (levelMap i n) p).mp hp + change levelHomeomorph P n (vertex (levelMap i n x)) ∈ A + refine ⟨levelHomeomorph B n (vertex x),?_⟩ + rw [← map_vertex (levelMap i n) (preservesChains_monotone (levelMap i n)), + levelHomeomorph_natural i hi]⟩ + monotone' := fun _ _ h => (NonemptyFiniteChains.orderHomMap (levelMap i n)).monotone h } + have hw : nerveMap (levelMap i (n+1)).toFunctor ≫ 𝟙 _ = + nerveMap c.toFunctor ≫ nerveMap (relativeFaceInclusion (relativeVertices P A n)).toFunctor := by + rw [Category.comp_id,← nerveOrderMap_comp] + rfl + have hn' := based_related_pre _ (nerveMap (levelMap i (n+1)).toFunctor) (𝟙 _) + (nerveMap c.toFunctor) hw _ (relative_related_nerve (relativeVertices P A n) q _ _ hn) + have hf : orientedMap (toChainMap (f.comp (last P n))).toFun + (toChainMap (f.comp (last P n))).chains = f.comp (last P (n+1)) := by + ext s + exact orientedMap_monotone (f.comp (last P n)) s + have hg : orientedMap (toChainMap (g.comp (last P n))).toFun + (toChainMap (g.comp (last P n))).chains = g.comp (last P (n+1)) := by + ext s + exact orientedMap_monotone (g.comp (last P n)) s + refine ⟨n+1,?_⟩ + simpa only [hf,hg,Category.id_comp,nerve_constant_pre'] using hn' + +lemma pair_relative_nerve_descent (P B : PartOrd.{u}) [Finite P] + (i : B →o P) (hi : Function.Injective i) {Q : Type u} [PartialOrder Q] + (q : Q) (f g : P →o Q) (hf : f.comp i = constantOrder B q) + (hg : g.comp i = constantOrder B q) + (H : (affineMap f).Homotopy (affineMap g)) + (hH : ∀ (t : unitInterval) (x : PolyPoint B), + H (t,map i (preservesChains_monotone i) x) = vertex q) + (K : SSet.{u}) [SSet.KanComplex K] (r : nerve Q ⟶ K) : + BasedHomotopy (nerveMap i.toFunctor) (nerveMap (constantOrder B q).toFunctor ≫ r) + (nerveMap f.toFunctor ≫ r) (nerveMap g.toFunctor ≫ r) := by + obtain ⟨n,hn⟩ := pair_relative_nerve_detection P B i hi q f g H hH + let : Mono (nerveMap i.toFunctor) := nerveOrderMap_mono i hi + let : Mono (nerveMap (levelMap i n).toFunctor) := + nerveOrderMap_mono _ (levelMap_injective i hi n) + have hfr : nerveMap i.toFunctor ≫ nerveMap f.toFunctor ≫ r = + nerveMap (constantOrder B q).toFunctor ≫ r := by + rw [← Category.assoc,← nerveOrderMap_comp,hf] + have hgr : nerveMap i.toFunctor ≫ nerveMap g.toFunctor ≫ r = + nerveMap (constantOrder B q).toFunctor ≫ r := by + rw [← Category.assoc,← nerveOrderMap_comp,hg] + have hb : nerveMap (levelMap i n).toFunctor ≫ nerveMap (f.comp (last P n)).toFunctor ≫ r = + nerveMap (constantOrder (level B n) q).toFunctor ≫ r := by + rw [← Category.assoc,← nerveOrderMap_comp,OrderHom.comp_assoc,last_natural, + ← OrderHom.comp_assoc,hf,constantOrder_comp] + obtain ⟨G,hG⟩ := based_related_homotopy _ _ (based_related_post _ _ hn r) hb + let G' : SSet.Homotopy (nerveMap (last P n).toFunctor ≫ nerveMap f.toFunctor ≫ r) + (nerveMap (last P n).toFunctor ≫ nerveMap g.toFunctor ≫ r) := + CoherentGluing.toHomotopy G.h + (by simpa only [nerveOrderMap_comp,Category.assoc] using G.h₀) + (by simpa only [nerveOrderMap_comp,Category.assoc] using G.h₁) + refine pair_local_injective_plain (nerveMap i.toFunctor) + (nerveMap (levelMap i n).toFunctor) (nerveMap (last P n).toFunctor) + (nerveMap (last B n).toFunctor) + (by rw [← nerveOrderMap_comp,← nerveOrderMap_comp,last_natural]) + (last_local P n) (last_local B n) _ _ _ hfr hgr G' ?_ + simpa only [G',CoherentGluing.toHomotopy,Category.assoc,nerve_constant_pre'_assoc] using hG +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Nerve Simplicial + +namespace Thomason.GeometricRecognition +open PolyPoint +variable {P Q : Type u} [PartialOrder P] [PartialOrder Q] + +lemma map_eval {ι : Type*} [Fintype ι] [LinearOrder ι] + (f : P →o Q) (a : ι →o P) (x : Convexity.StdSimplex ℝ ι) : + PolyPoint.map f (preservesChains_monotone f) (eval a x) = eval (f.comp a) x := by + apply PolyPoint.ext + simp only [PolyPoint.map, PolyPoint.eval, evalWeights, Finsupp.mapDomain_finsetSum, + Finsupp.mapDomain_single, OrderHom.comp_coe, Function.comp_apply] + +lemma nerveMap_realizeSimplex {n : ℕ} (f : P →o Q) (a : Fin (n+1) →o P) + (x : Convexity.StdSimplex ℝ (Fin (n+1))) : + SSet.toTop.map (nerveMap f.monotone.functor) (realizeSimplex a x) = + realizeSimplex (f.comp a) x := by + have he : (SSet.yonedaEquiv (X := nerve P)).symm a.monotone.functor ≫ + nerveMap f.monotone.functor = + (SSet.yonedaEquiv (X := nerve Q)).symm (f.comp a).monotone.functor := by + apply SSet.yonedaEquiv.injective + rw [SSet.yonedaEquiv_comp] + rfl + simp only [realizeSimplex] + rw [← TopCat.comp_app, ← Functor.map_comp, he] + +lemma nerveRealizationHomeomorph_natural (f : P →o Q) (z : |nerve P|) : + nerveRealizationHomeomorph (SSet.toTop.map (nerveMap f.monotone.functor) z) = + PolyPoint.map f (preservesChains_monotone f) (nerveRealizationHomeomorph z) := by + obtain ⟨x,rfl⟩ := (nerveRealizationHomeomorph (P := P)).symm.surjective z + change realizationToPoly Q (SSet.toTop.map (nerveMap f.monotone.functor) + (polyToRealization x)) = PolyPoint.map f (preservesChains_monotone f) + (realizationToPoly P (polyToRealization x)) + rw [realizationToPoly_polyToRealization] + let s := supportIndex x + let y : Face s.carrier := ⟨x,Finset.Subset.refl _⟩ + have hx : eval s.vertices (s.coordinates y) = x := s.eval_coordinates y + rw [← hx, polyToRealization_eval, nerveMap_realizeSimplex, + realizationToPoly_realizeSimplex, map_eval] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial PartialOrder + +namespace Thomason.GeometricRecognition +open LastVertexProof KanLocal Subdivision Mesh Contiguity PolyPoint Approximation + +def realizeMap {A B : SSet.{u}} (f : A ⟶ B) : C(SSet.toTop.obj A,SSet.toTop.obj B) := + (SSet.toTop.map f).hom + +lemma realizeMap_comp {A B C : SSet.{u}} (f : A ⟶ B) (g : B ⟶ C) : + realizeMap (f ≫ g) = (realizeMap g).comp (realizeMap f) := by + dsimp only [realizeMap] + rw [Functor.map_comp] + rfl + +lemma cancel_geometric_homotopy {P Q T : Type u} + [TopologicalSpace P] [TopologicalSpace Q] [TopologicalSpace T] + (f : C(Q,T)) (r : C(T,Q)) (hf : (r.comp f).Homotopic (ContinuousMap.id _)) + (a b : C(P,Q)) (h : (f.comp a).Homotopic (f.comp b)) : a.Homotopic b := by + have h₀ := hf.comp (.refl a) + have h₁ := hf.comp (.refl b) + have h₂ := ContinuousMap.Homotopic.comp (.refl r) h + have ha : a.Homotopic (r.comp (f.comp a)) := by + simpa only [ContinuousMap.comp_assoc,ContinuousMap.id_comp] using h₀.symm + have hb : (r.comp (f.comp b)).Homotopic b := by + simpa only [ContinuousMap.comp_assoc,ContinuousMap.id_comp] using h₁ + exact ha.trans (h₂.trans hb) + +lemma geometric_homotopy_to_affine {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (f g : P →o Q) (h : (realizeMap (nerveMap f.toFunctor)).Homotopic + (realizeMap (nerveMap g.toFunctor))) : + (affineMap f).Homotopic (affineMap g) := by + have he (a : P →o Q) : (realizationToPoly Q).hom.comp + ((realizeMap (nerveMap a.toFunctor)).comp polyToRealizationHom.hom) = affineMap a := by + apply ContinuousMap.ext + intro x + have hh := nerveRealizationHomeomorph_natural a (polyToRealization x) + change realizationToPoly Q (SSet.toTop.map (nerveMap a.toFunctor) (polyToRealization x)) = _ at hh + rw [show nerveRealizationHomeomorph (polyToRealization x) = x from + realizationToPoly_polyToRealization x] at hh + exact hh + have hh := ContinuousMap.Homotopic.comp (.refl (realizationToPoly Q).hom) + (h.comp (.refl polyToRealizationHom.hom)) + rwa [he,he] at hh + +theorem finite_order_geometric_faithful (P : PartOrd.{u}) [Finite P] + (K : SSet.{u}) [SSet.KanComplex K] (a b : nerve P ⟶ K) + (H : (realizeMap a).Homotopic (realizeMap b)) : Homotopic a b := by + obtain ⟨Q,r,e,hr,hre,he⟩ := kan_poset_replacement_heq K + obtain ⟨R₁,hR₁,l₁,c₁,hl₁,hc₁⟩ := finite_order_representative Q r e he hre P a + obtain ⟨R₂,hR₂,l₂,c₂,hl₂,hc₂⟩ := finite_order_representative Q r e he hre R₁ + (nerveMap l₁.toFunctor ≫ b) + let c : R₂ →o Q := c₁.comp l₂ + have hca : Homotopic (nerveMap l₂.toFunctor ≫ nerveMap l₁.toFunctor ≫ a) + (nerveMap c.toFunctor ≫ r) := by + simpa only [c,nerveOrderMap_comp,Category.assoc] using + homotopic_pre (nerveMap l₂.toFunctor) hc₁ + have hh := H.comp (.refl (realizeMap (nerveMap l₂.toFunctor ≫ nerveMap l₁.toFunctor))) + have hhr : (realizeMap (nerveMap c.toFunctor ≫ r)).Homotopic + (realizeMap (nerveMap c₂.toFunctor ≫ r)) := by + have h₁ := realization_homotopic hca + have h₂ := realization_homotopic hc₂ + change (realizeMap _).Homotopic (realizeMap _) at h₁ h₂ + have hh' : (realizeMap (nerveMap l₂.toFunctor ≫ nerveMap l₁.toFunctor ≫ a)).Homotopic + (realizeMap (nerveMap l₂.toFunctor ≫ nerveMap l₁.toFunctor ≫ b)) := by + simpa only [realizeMap_comp,ContinuousMap.comp_assoc] using hh + exact h₁.symm.trans (hh'.trans h₂) + obtain ⟨s,hs,_⟩ := local_realization_heq r hr + have htop : (realizeMap (nerveMap c.toFunctor)).Homotopic + (realizeMap (nerveMap c₂.toFunctor)) := by + apply cancel_geometric_homotopy (realizeMap r) s.hom hs + simpa only [realizeMap_comp] using hhr + let : Fintype R₂ := Fintype.ofFinite R₂ + obtain ⟨hpoly⟩ := geometric_homotopy_to_affine c c₂ htop + obtain ⟨n,hn⟩ := geometric_homotopy_detected R₂ c c₂ hpoly + have hn' : Homotopic (nerveMap c.toFunctor ≫ r) (nerveMap c₂.toFunctor ≫ r) := by + apply precomp_injective (nerveMap (last R₂ n).toFunctor) (last_local R₂ n) + simpa only [nerveOrderMap_comp,Category.assoc] using homotopic_post hn r + have hab := homotopic_trans hca (homotopic_trans hn' (homotopic_symm hc₂)) + have hab' := precomp_injective (nerveMap l₂.toFunctor) hl₂ _ _ hab + exact precomp_injective (nerveMap l₁.toFunctor) hl₁ a b hab' +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open PartialOrder + +namespace Thomason.GeometricRecognition.Cubical +open PolyPoint +variable {I : Type u} [Fintype I] [LinearOrder I] +local instance cubeDecEqFaces : DecidableEq (Finset I) := Classical.decEq _ +local instance cubeFintypeChains : Fintype (NonemptyFiniteChains I) := Fintype.ofFinite _ + +def chain (s : Finset I) (hs : s.Nonempty) : NonemptyFiniteChains I := + ⟨s,hs,fun p q => le_total p.val q.val⟩ + +def allFacesEquiv : Option (NonemptyFiniteChains I) ≃ Finset I where + toFun s := s.elim ∅ NonemptyFiniteChains.finset + invFun s := if hs : s.Nonempty then some (chain s hs) else none + left_inv s := by + cases s with + | none => simp + | some s => + change (if hs : s.finset.Nonempty then some (chain s.finset hs) else none) = some s + rw [dite_eq_left s.nonempty] + exact congrArg some (NonemptyFiniteChains.ext rfl) + right_inv s := by + dsimp + split_ifs with hs + · rfl + · exact (Finset.not_nonempty_iff_eq_empty.mp hs).symm + +lemma sum_faces (f : Finset I → ℝ) : + ∑ s, f s = f ∅ + ∑ s : NonemptyFiniteChains I, f s.finset := by + rw [← allFacesEquiv.sum_comp] + exact Fintype.sum_option _ + +def compress (w : Finset I →₀ ℝ) : NonemptyFiniteChains I →₀ ℝ := + Finsupp.equivFunOnFinite.symm (fun s => w s.finset * (s.finset.card : ℝ)) + +@[simp] lemma compress_apply (w : Finset I →₀ ℝ) (s : NonemptyFiniteChains I) : + compress w s = w s.finset * (s.finset.card : ℝ) := rfl + +omit [Fintype I] in +lemma card_pos (s : NonemptyFiniteChains I) : 0 < (s.finset.card : ℝ) := by + exact_mod_cast Finset.card_pos.mpr s.nonempty + +lemma compress_mem_support (w : Finset I →₀ ℝ) (s : NonemptyFiniteChains I) : + s ∈ (compress w).support ↔ s.finset ∈ w.support := by + simp only [Finsupp.mem_support_iff,compress_apply] + exact mul_ne_zero_iff.trans (and_iff_left (ne_of_gt (card_pos s))) + +def coordinate (w : Finset I →₀ ℝ) (i : I) : ℝ := + ∑ s : Finset I, if i ∈ s then w s else 0 + +lemma compress_evaluate (w : Finset I →₀ ℝ) (i : I) : + barycentricLinear (compress w) i = coordinate w i := by + rw [barycentricLinear_apply, (compress w).sum_fintype (fun s r => r * (barycenter s).weights i) (by simp)] + rw [coordinate,sum_faces] + simp only [Finset.notMem_empty,ite_false,zero_add] + apply Finset.sum_congr rfl + intro s hs + rw [compress_apply,barycenter_apply] + split_ifs with hi + · exact mul_inv_cancel_right₀ (ne_of_gt (card_pos s)) _ + · simp + +lemma compress_nonneg (w : Finset I →₀ ℝ) (hn : ∀ s, 0 ≤ w s) : + ∀ s, 0 ≤ compress w s := fun s => mul_nonneg (hn _) (le_of_lt (card_pos s)) + +lemma compress_chain (w : Finset I →₀ ℝ) + (hc : IsChain (· ≤ ·) (w.support : Set (Finset I))) : + IsChain (· ≤ ·) ((compress w).support : Set (NonemptyFiniteChains I)) := by + intro s hs t ht hst + exact hc.total ((compress_mem_support w s).mp hs) ((compress_mem_support w t).mp ht) + +omit [LinearOrder I] in +lemma sum_weights (x : PolyPoint (Finset I)) : ∑ s, x.weights s = 1 := by + exact (x.weights.sum_fintype (fun _ r => r) (fun _ => rfl)).symm.trans x.total + +lemma coordinate_nonneg (w : Finset I →₀ ℝ) (hn : ∀ s, 0 ≤ w s) (i : I) : + 0 ≤ coordinate w i := by + apply Finset.sum_nonneg + intro s hs + split_ifs <;> first | exact hn s | exact le_rfl + +lemma coordinate_le_sum (w : Finset I →₀ ℝ) (hn : ∀ s, 0 ≤ w s) (i : I) : + coordinate w i ≤ ∑ s, w s := by + apply Finset.sum_le_sum + intro s hs + split_ifs <;> first | exact le_rfl | exact hn s + +def evaluate (x : PolyPoint (Finset I)) : I → unitInterval := fun i => + ⟨coordinate x.weights i,coordinate_nonneg _ x.nonneg i, + (coordinate_le_sum _ x.nonneg i).trans (sum_weights x).le⟩ + +lemma continuous_evaluate : Continuous (@evaluate I _ _) := by + apply continuous_pi + intro i + apply Continuous.subtype_mk + apply continuous_finsetSum + intro s hs + by_cases hi : i ∈ s + · simpa only [hi,ite_true] using (continuous_weights (P := Finset I) s) + · simp only [hi,ite_false] + exact continuous_const + +lemma evaluate_injective : Function.Injective (@evaluate I _ _) := by + intro x y he + have hg : compress x.weights = compress y.weights := by + apply barycentricLinear_injective_nonneg_flag _ _ + (compress_nonneg _ x.nonneg) (compress_nonneg _ y.nonneg) + (compress_chain _ x.chain) (compress_chain _ y.chain) + ext i + rw [compress_evaluate,compress_evaluate] + exact congrArg Subtype.val (congrFun he i) + have hn (s : NonemptyFiniteChains I) : x.weights s.finset = y.weights s.finset := by + have h := DFunLike.congr_fun hg s + exact mul_right_cancel₀ (ne_of_gt (card_pos s)) h + apply PolyPoint.ext + ext s + by_cases hs : s.Nonempty + · exact hn (chain s hs) + · have hxe := sum_weights x + have hye := sum_weights y + rw [sum_faces] at hxe hye + have heq := Finset.sum_congr (s₁ := Finset.univ) (s₂ := Finset.univ) rfl (fun a _ => hn a) + rw [heq] at hxe + have hs0 := Finset.not_nonempty_iff_eq_empty.mp hs + subst s + linarith + +def uncompress (g : NonemptyFiniteChains I →₀ ℝ) : Finset I →₀ ℝ := + Finsupp.equivFunOnFinite.symm (fun s => + if hs : s.Nonempty then g (chain s hs) / (s.card : ℝ) else 0) + +@[simp] lemma uncompress_empty (g : NonemptyFiniteChains I →₀ ℝ) : + uncompress g ∅ = 0 := by simp [uncompress] + +lemma uncompress_nonempty (g : NonemptyFiniteChains I →₀ ℝ) + (s : Finset I) (hs : s.Nonempty) : + uncompress g s = g (chain s hs) / (s.card : ℝ) := by + simp only [uncompress,Finsupp.coe_equivFunOnFinite_symm,dite_eq_left hs] + +lemma compress_uncompress (g : NonemptyFiniteChains I →₀ ℝ) : + compress (uncompress g) = g := by + ext s + rw [compress_apply,uncompress_nonempty _ _ s.nonempty] + have he : chain s.finset s.nonempty = s := NonemptyFiniteChains.ext rfl + rw [he] + exact div_mul_cancel₀ _ (ne_of_gt (card_pos s)) + +lemma uncompress_nonneg (g : NonemptyFiniteChains I →₀ ℝ) (hn : ∀ s, 0 ≤ g s) : + ∀ s, 0 ≤ uncompress g s := by + intro s + by_cases hs : s.Nonempty + · rw [uncompress_nonempty _ _ hs] + exact div_nonneg (hn _) (Nat.cast_nonneg _) + · rw [Finset.not_nonempty_iff_eq_empty.mp hs,uncompress_empty] + +lemma uncompress_support_nonempty (g : NonemptyFiniteChains I →₀ ℝ) + {s : Finset I} (hs : s ∈ (uncompress g).support) : s.Nonempty := by + by_contra h + rw [Finset.not_nonempty_iff_eq_empty.mp h,Finsupp.mem_support_iff,uncompress_empty] at hs + exact hs rfl + +lemma uncompress_chain (g : NonemptyFiniteChains I →₀ ℝ) + (hc : IsChain (· ≤ ·) (g.support : Set (NonemptyFiniteChains I))) : + IsChain (· ≤ ·) ((uncompress g).support : Set (Finset I)) := by + intro s hs t ht hst + let a := chain s (uncompress_support_nonempty g hs) + let b := chain t (uncompress_support_nonempty g ht) + have ha : a ∈ g.support := by + rw [← compress_uncompress g,compress_mem_support] + exact hs + have hb : b ∈ g.support := by + rw [← compress_uncompress g,compress_mem_support] + exact ht + exact hc.total ha hb + +lemma sum_le_one_of_coordinates (w : Finset I →₀ ℝ) + (hc : IsChain (· ≤ ·) (w.support : Set (Finset I))) + (he : w ∅ = 0) (hb : ∀ i, coordinate w i ≤ 1) : ∑ s, w s ≤ 1 := by + by_cases hw : w = 0 + · subst w + simp + have hne := Finsupp.support_nonempty_iff.mpr hw + obtain ⟨s,hs,hmin⟩ := Finset.exists_min_image w.support Finset.card hne + have hsne : s.Nonempty := by + by_contra h + have hs0 := Finset.not_nonempty_iff_eq_empty.mp h + exact (Finsupp.mem_support_iff.mp hs) (hs0 ▸ he) + obtain ⟨i,hi⟩ := hsne + have hmem (t : Finset I) (ht : t ∈ w.support) : i ∈ t := by + rcases hc.total hs ht with hst | hts + · exact hst hi + · exact (Finset.eq_of_subset_of_card_le hts (hmin t ht)) ▸ hi + have hcoord : coordinate w i = ∑ s, w s := by + apply Finset.sum_congr rfl + intro t ht + by_cases htw : t ∈ w.support + · simp only [hmem t htw,ite_true] + · rw [Finsupp.notMem_support_iff.mp htw] + split_ifs <;> rfl + rw [← hcoord] + exact hb i + +lemma coordinate_add (a b : Finset I →₀ ℝ) (i : I) : + coordinate (a+b) i = coordinate a i + coordinate b i := by + simp only [coordinate,Finsupp.add_apply,← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro s hs + split_ifs <;> simp + +lemma coordinate_empty (r : ℝ) (i : I) : + coordinate (Finsupp.single ∅ r) i = 0 := by + apply Finset.sum_eq_zero + intro s hs + by_cases hi : i ∈ s + · rw [ite_eq_left hi,Finsupp.single_eq_of_ne] + intro h + subst s + exact Finset.notMem_empty i hi + · rw [ite_eq_right hi] + +lemma evaluate_surjective : Function.Surjective (@evaluate I _ _) := by + intro x + let f : I →₀ ℝ := Finsupp.equivFunOnFinite.symm (fun i => (x i).val) + have hn : ∀ i, 0 ≤ f i := fun i => (x i).property.1 + have hc : IsChain (· ≤ ·) (f.support : Set I) := + fun i hi j hj hij => le_total i j + obtain ⟨g,hgn,hgc,hgs,hgf⟩ := exists_barycentric_decomposition f hn hc + let w := uncompress g + have heval (i : I) : coordinate w i = (x i).val := by + rw [← compress_evaluate,compress_uncompress,hgf] + rfl + have htotal : (∑ s, w s) ≤ 1 := sum_le_one_of_coordinates w + (uncompress_chain g hgc) (uncompress_empty g) (fun i => by rw [heval]; exact (x i).property.2) + let w' := w + Finsupp.single ∅ (1 - ∑ s, w s) + have hmem (s : Finset I) (hs : s ∈ w'.support) : s ∈ w.support ∨ s = ∅ := by + rcases Finset.mem_union.mp (Finsupp.support_add hs) with h | h + · exact Or.inl h + · right + by_contra hne + exact (Finsupp.mem_support_iff.mp h) (Finsupp.single_eq_of_ne hne) + let z : PolyPoint (Finset I) := { + weights := w' + nonneg s := by + dsimp [w'] + rw [Finsupp.single_apply] + apply add_nonneg (uncompress_nonneg g hgn s) + split_ifs + · exact sub_nonneg.mpr htotal + · exact le_rfl + total := by + change (w + Finsupp.single ∅ (1 - ∑ s, w s)).sum (fun _ r => r) = 1 + rw [Finsupp.sum_add_index (fun _ _ => rfl) (fun _ _ _ _ => rfl), + Finsupp.sum_single_index (by rfl), w.sum_fintype (fun _ r => r) (fun _ => rfl)] + ring + chain := by + intro s hs t ht hst + rcases hmem s hs with hs | rfl + · rcases hmem t ht with ht | rfl + · exact (uncompress_chain g hgc).total hs ht + · exact Or.inr (Finset.empty_subset s) + · exact Or.inl (Finset.empty_subset t) } + refine ⟨z,?_⟩ + funext i + apply Subtype.ext + change coordinate w' i = (x i).val + rw [coordinate_add,coordinate_empty,add_zero,heval] + +def cubeHomeomorph : PolyPoint (Finset I) ≃ₜ (I → unitInterval) := + Continuous.homeoOfEquivCompactToT2 + (f := Equiv.ofBijective evaluate ⟨evaluate_injective,evaluate_surjective⟩) continuous_evaluate + +end Thomason.GeometricRecognition.Cubical + +end + +noncomputable section +universe u v w z +open PartialOrder +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition.Cubical +open PolyPoint +variable {I : Type u} [Fintype I] [LinearOrder I] +local instance : DecidableEq (Finset I) := Classical.decEq _ + +lemma coordinate_eq_zero_iff (x : PolyPoint (Finset I)) (i : I) : + coordinate x.weights i = 0 ↔ ∀ s ∈ x.weights.support, i ∉ s := by + rw [coordinate,Finset.sum_eq_zero_iff_of_nonneg (fun s _ => by + split_ifs <;> first | exact x.nonneg s | exact le_rfl)] + constructor + · intro h s hs hi + have hz := h s (Finset.mem_univ s) + simp only [hi,ite_true] at hz + exact (Finsupp.mem_support_iff.mp hs) hz + · intro h s hs + split_ifs with hi + · by_contra hn + exact h s (Finsupp.mem_support_iff.mpr hn) hi + · rfl + +lemma coordinate_eq_one_iff (x : PolyPoint (Finset I)) (i : I) : + coordinate x.weights i = 1 ↔ ∀ s ∈ x.weights.support, i ∈ s := by + have he : (∑ s : Finset I, if i ∉ s then x.weights s else 0) = + 1 - coordinate x.weights i := by + rw [← sum_weights x,coordinate,← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro s hs + split_ifs <;> simp_all + conv_lhs => rw [eq_comm,← sub_eq_zero,← he] + rw [Finset.sum_eq_zero_iff_of_nonneg (fun s _ => by + split_ifs <;> first | exact x.nonneg s | exact le_rfl)] + constructor + · intro h s hs + by_contra hi + have hz := h s (Finset.mem_univ s) + simp only [hi] at hz + exact (Finsupp.mem_support_iff.mp hs) hz + · intro h s hs + by_cases hi : i ∈ s + · simp [hi] + · have hz : x.weights s = 0 := by + by_contra hn + exact hi (h s (Finsupp.mem_support_iff.mpr hn)) + simp [hi,hz] + +def boundaryFaces (I : Type u) [Fintype I] : Set (NonemptyFiniteChains (Finset I)) := + {s | ∃ i : I, (∀ v ∈ s.finset, i ∉ v) ∨ (∀ v ∈ s.finset, i ∈ v)} + +omit [LinearOrder I] in +lemma boundaryFaces_downward {s t : NonemptyFiniteChains (Finset I)} + (h : s ≤ t) (ht : t ∈ boundaryFaces I) : s ∈ boundaryFaces I := by + obtain ⟨i,hi⟩ := ht + exact ⟨i,hi.imp (fun hi v hv => hi v (h hv)) (fun hi v hv => hi v (h hv))⟩ + +omit [Fintype I] [LinearOrder I] in +lemma subdivide_support (x : PolyPoint (NonemptyFiniteChains (Finset I))) : + (subdivide x).weights.support = x.weights.support.biUnion NonemptyFiniteChains.finset := + barycentricLinear_support_eq x.weights x.nonneg + +lemma cube_boundary_iff (x : PolyPoint (Finset I)) : + evaluate x ∈ Cube.boundary I ↔ + ∃ i : I, (∀ v ∈ x.weights.support, i ∉ v) ∨ (∀ v ∈ x.weights.support, i ∈ v) := by + change (∃ i, evaluate x i = 0 ∨ evaluate x i = 1) ↔ _ + apply exists_congr + intro i + constructor + · intro h + rcases h with h | h + · exact Or.inl ((coordinate_eq_zero_iff x i).mp (congrArg Subtype.val h)) + · exact Or.inr ((coordinate_eq_one_iff x i).mp (congrArg Subtype.val h)) + · intro h + rcases h with h | h + · exact Or.inl (Subtype.ext ((coordinate_eq_zero_iff x i).mpr h)) + · exact Or.inr (Subtype.ext ((coordinate_eq_one_iff x i).mpr h)) + +lemma face_vertex_boundary (s : NonemptyFiniteChains (Finset I)) : + evaluate (subdivide (vertex s)) ∈ Cube.boundary I ↔ s ∈ boundaryFaces I := by + have he : subdivide (vertex s) = barycenter s := by + apply PolyPoint.ext + change barycentricLinear (Finsupp.single s 1) = _ + simp [barycentricLinear] + rw [he,cube_boundary_iff,barycenter_support] + rfl + +lemma subdivided_cube_boundary_iff (x : PolyPoint (NonemptyFiniteChains (Finset I))) : + evaluate (subdivide x) ∈ Cube.boundary I ↔ + ∀ s ∈ x.weights.support, s ∈ boundaryFaces I := by + rw [cube_boundary_iff,subdivide_support] + constructor + · rintro ⟨i,hi⟩ s hs + exact ⟨i,hi.imp (fun hi v hv => hi v (Finset.mem_biUnion.mpr ⟨s,hs,hv⟩)) + (fun hi v hv => hi v (Finset.mem_biUnion.mpr ⟨s,hs,hv⟩))⟩ + · intro h + let c : NonemptyFiniteChains (NonemptyFiniteChains (Finset I)) := + ⟨x.weights.support,(supportIndex x).nonempty,fun a b => x.chain.total a.property b.property⟩ + let t := greatest c + obtain ⟨i,hi⟩ := h t (greatest_mem c) + refine ⟨i,hi.imp ?_ ?_⟩ + · intro hi v hv + obtain ⟨s,hs,hv⟩ := Finset.mem_biUnion.mp hv + exact hi v ((le_greatest c s hs) hv) + · intro hi v hv + obtain ⟨s,hs,hv⟩ := Finset.mem_biUnion.mp hv + exact hi v ((le_greatest c s hs) hv) +end Thomason.GeometricRecognition.Cubical + +end + +noncomputable section +universe u v w z +open PartialOrder +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition.Cubical +open PolyPoint +variable {I : Type u} [Fintype I] [LinearOrder I] + +def pairCubeHomeomorph : PolyPoint (NonemptyFiniteChains (Finset I)) ≃ₜ (I → unitInterval) := + subdivisionHomeomorph.trans cubeHomeomorph + +def boundaryEvaluate (x : PolyPoint (boundaryFaces I)) : Cube.boundary I := + ⟨evaluate (subdivide (map (inclusion (boundaryFaces I)) + (preservesChains_monotone (inclusion (boundaryFaces I))) x)), + (subdivided_cube_boundary_iff _).mpr (map_subtype_support (boundaryFaces I) x)⟩ + +lemma boundaryEvaluate_injective : Function.Injective (@boundaryEvaluate I _ _) := by + intro x y h + apply map_injective (inclusion (boundaryFaces I)) Subtype.val_injective + apply pairCubeHomeomorph.injective + exact congrArg Subtype.val h + +lemma boundaryEvaluate_surjective : Function.Surjective (@boundaryEvaluate I _ _) := by + intro y + let x := (pairCubeHomeomorph (I := I)).symm y.val + have hx : ∀ s ∈ x.weights.support, s ∈ boundaryFaces I := by + apply (subdivided_cube_boundary_iff x).mp + change pairCubeHomeomorph x ∈ Cube.boundary I + rw [show pairCubeHomeomorph x = y.val from pairCubeHomeomorph.apply_symm_apply y.val] + exact y.property + refine ⟨restrict (boundaryFaces I) x hx,?_⟩ + apply Subtype.ext + change pairCubeHomeomorph (map (inclusion (boundaryFaces I)) + (preservesChains_monotone (inclusion (boundaryFaces I))) (restrict _ x hx)) = y.val + rw [map_subtype_restrict] + exact pairCubeHomeomorph.apply_symm_apply y.val + +lemma continuous_boundaryEvaluate : Continuous (@boundaryEvaluate I _ _) := by + apply Continuous.subtype_mk + exact continuous_evaluate.comp (continuous_subdivide.comp (continuous_map _ _)) + +def boundaryHomeomorph : PolyPoint (boundaryFaces I) ≃ₜ Cube.boundary I := + Continuous.homeoOfEquivCompactToT2 + (f := Equiv.ofBijective boundaryEvaluate + ⟨boundaryEvaluate_injective,boundaryEvaluate_surjective⟩) continuous_boundaryEvaluate + +lemma boundaryHomeomorph_natural (x : PolyPoint (boundaryFaces I)) : + (boundaryHomeomorph x).val = pairCubeHomeomorph + (map (inclusion (boundaryFaces I)) (preservesChains_monotone (inclusion (boundaryFaces I))) x) := rfl +end Thomason.GeometricRecognition.Cubical + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CubicalRecognition.lean b/lean/OAI/CategoryTheory/Thomason/CubicalRecognition.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2cbe19b7de0d7498c89b9fafa5ae3b2b8b8c30a --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CubicalRecognition.lean @@ -0,0 +1,701 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.CubicalGeometry + +namespace OAI + +/-! Cubical Recognition. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +def top_homotopy_rel_pre {A : Type u} {B : Type v} {X : Type w} + [TopologicalSpace A] [TopologicalSpace B] [TopologicalSpace X] + {a b : C(A,X)} {S : Set A} (H : a.HomotopyRel b S) + (f : C(B,A)) (T : Set B) (hf : ∀ x ∈ T, f x ∈ S) : + (a.comp f).HomotopyRel (b.comp f) T where + toHomotopy := H.toHomotopy.compContinuousMap f + prop' := fun t x hx => H.prop t (f x) (hf x hx) + +lemma cubical_relative_cancel {A : Type u} {X : Type v} {Y : Type w} + [TopologicalSpace A] [TopologicalSpace X] [TopologicalSpace Y] + (n : ℕ) (e : A ≃ₜ (Fin (n+1) → unitInterval)) (S : Set A) + (hS : ∀ a, a ∈ S ↔ e a ∈ Cube.boundary (Fin (n+1))) + (r : C(X,Y)) (hr : WeakHomotopy.Equivalence r) (x : X) + (f g : C(A,X)) (hf : ∀ a ∈ S, f a = x) (hg : ∀ a ∈ S, g a = x) + (H : (r.comp f).HomotopyRel (r.comp g) S) : + Nonempty (f.HomotopyRel g S) := by + let f' : GenLoop (Fin (n+1)) X x := ⟨f.comp ⟨e.symm,e.symm.continuous⟩,by + intro a ha + exact hf _ ((hS _).mpr (by simpa using ha))⟩ + let g' : GenLoop (Fin (n+1)) X x := ⟨g.comp ⟨e.symm,e.symm.continuous⟩,by + intro a ha + exact hg _ ((hS _).mpr (by simpa using ha))⟩ + have hfg : WeakHomotopy.groupMap (Fin (n+1)) r x ⟦f'⟧ = + WeakHomotopy.groupMap (Fin (n+1)) r x ⟦g'⟧ := by + apply Quotient.sound + exact ⟨top_homotopy_rel_pre H ⟨e.symm,e.symm.continuous⟩ (Cube.boundary (Fin (n+1))) + (fun a ha => (hS _).mpr (by simpa using ha))⟩ + obtain ⟨G⟩ : GenLoop.Homotopic f' g' := Quotient.exact ((hr.2 n x).1 hfg) + have hh := top_homotopy_rel_pre G ⟨e,e.continuous⟩ S (fun a ha => (hS a).mp ha) + refine ⟨hh.cast ?_ ?_⟩ <;> ext a <;> simp [f',g'] + +structure CubicalPair (P B : PartOrd.{u}) (i : B →o P) (n : ℕ) where + home : PolyPoint P ≃ₜ (Fin (n+1) → unitInterval) + boundary : ∀ a, a ∈ Set.range (map i (preservesChains_monotone i)) ↔ + home a ∈ Cube.boundary (Fin (n+1)) + +def CubicalPair.refine {P B : PartOrd.{u}} {i : B →o P} {n : ℕ} + (c : CubicalPair P B i n) (d : PairRefinement P B i) : CubicalPair d.R d.S d.j n where + home := d.home.trans c.home + boundary := by + intro a + change _ ↔ c.home (d.home a) ∈ _ + rw [← c.boundary] + constructor + · rintro ⟨b,rfl⟩ + exact ⟨d.homeB b,(d.natural b).symm⟩ + · rintro ⟨b,hb⟩ + obtain ⟨b',rfl⟩ := d.homeB.surjective b + refine ⟨b',d.home.injective ?_⟩ + exact (d.natural b').trans hb +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma polyToRealization_natural {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (i : P →o Q) (x : PolyPoint P) : + SSet.toTop.map (nerveMap i.toFunctor) (polyToRealization x) = + polyToRealization (map i (preservesChains_monotone i) x) := by + apply (nerveRealizationHomeomorph (P := Q)).injective + rw [nerveRealizationHomeomorph_natural] + change map i _ (realizationToPoly P (polyToRealization x)) = + realizationToPoly Q (polyToRealization (map i _ x)) + rw [realizationToPoly_polyToRealization,realizationToPoly_polyToRealization] + +def polyRealize {P : Type u} [PartialOrder P] {K : SSet.{u}} (a : nerve P ⟶ K) : + C(PolyPoint P,SSet.toTop.obj K) := (realizeMap a).comp polyToRealizationHom.hom + +lemma polyRealize_post {P : Type u} [PartialOrder P] {K L : SSet.{u}} + (a : nerve P ⟶ K) (r : K ⟶ L) : + polyRealize (a ≫ r) = (realizeMap r).comp (polyRealize a) := by + rw [polyRealize,realizeMap_comp,ContinuousMap.comp_assoc] + rfl + +lemma polyRealize_pre {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (i : P →o Q) {K : SSet.{u}} (a : nerve Q ⟶ K) : + polyRealize (nerveMap i.toFunctor ≫ a) = (polyRealize a).comp (affineMap i) := by + ext x + change (SSet.toTop.map (nerveMap i.toFunctor ≫ a)) (polyToRealization x) = _ + rw [Functor.map_comp] + change SSet.toTop.map a (SSet.toTop.map (nerveMap i.toFunctor) (polyToRealization x)) = _ + rw [polyToRealization_natural] + rfl + +lemma polyRealize_order {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (i : P →o Q) : polyRealize (nerveMap i.toFunctor) = + polyToRealizationHom.hom.comp (affineMap i) := by + ext x + exact polyToRealization_natural i x + +lemma poly_realization_homotopy_rel {P B : Type u} [PartialOrder P] [PartialOrder B] + (i : B →o P) (hi : Function.Injective i) {K : SSet.{u}} + (z : nerve B ⟶ K) {a b : nerve P ⟶ K} + (H : BasedHomotopy (nerveMap i.toFunctor) z a b) : + Nonempty ((polyRealize a).HomotopyRel (polyRealize b) + (Set.range (map i (preservesChains_monotone i)))) := by + let : Mono (nerveMap i.toFunctor) := nerveOrderMap_mono i hi + obtain ⟨G,hG⟩ := H + have hb := (based_homotopy_boundary _ _ ⟨G,hG⟩).2 + obtain ⟨F⟩ := realization_homotopy_rel (nerveMap i.toFunctor) G + (by rw [hb]; exact hG) + refine ⟨top_homotopy_rel_pre F polyToRealizationHom.hom _ ?_⟩ + rintro x ⟨y,rfl⟩ + exact ⟨polyToRealization y,polyToRealization_natural i y⟩ + +lemma map_constantOrder {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (q : Q) (x : PolyPoint P) : + map (constantOrder P q) (preservesChains_monotone (constantOrder P q)) x = vertex q := by + classical + apply PolyPoint.ext + ext y + rw [map_apply] + change (x.weights.sum fun _ value => if q = y then value else 0) = Finsupp.single q 1 y + by_cases hy : q = y + · subst y + simpa only [ite_true,Finsupp.single_eq_same] + using x.total + · simp [hy] + +lemma polyRealize_constant {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (q : Q) (x : PolyPoint P) : + polyRealize (nerveMap (constantOrder P q).toFunctor) x = polyToRealization (vertex q) := by + rw [polyRealize_order] + change polyToRealization (map (constantOrder P q) (preservesChains_monotone _) x) = _ + rw [map_constantOrder] + +lemma geometric_relative_order_cancel (P B : PartOrd.{u}) (i : B →o P) + (n : ℕ) (c : CubicalPair P B i n) (Q : PartOrd.{u}) (q : Q) + (f g : P →o Q) (hf : f.comp i = constantOrder B q) (hg : g.comp i = constantOrder B q) + {K : SSet.{u}} (r : nerve Q ⟶ K) (hr : simplicialWeakEquivalences r) + (H : (polyRealize (nerveMap f.toFunctor ≫ r)).HomotopyRel + (polyRealize (nerveMap g.toFunctor ≫ r)) (Set.range (map i (preservesChains_monotone i)))) : + ∃ G : (affineMap f).Homotopy (affineMap g), + ∀ (t : unitInterval) (x : PolyPoint B), G (t,map i (preservesChains_monotone i) x) = vertex q := by + have hbound (a : P →o Q) (ha : a.comp i = constantOrder B q) : + ∀ x ∈ Set.range (map i (preservesChains_monotone i)), + polyRealize (nerveMap a.toFunctor) x = polyToRealization (vertex q) := by + rintro x ⟨y,rfl⟩ + have hh := congrArg (fun F : C(PolyPoint B,SSet.toTop.obj (nerve Q)) => F y) + (polyRealize_pre i (nerveMap a.toFunctor)) + rw [← nerveOrderMap_comp,ha] at hh + exact hh.symm.trans (polyRealize_constant q y) + obtain ⟨G⟩ := cubical_relative_cancel n c.home _ c.boundary + (realizeMap r) hr (polyToRealization (vertex q)) + (polyRealize (nerveMap f.toFunctor)) (polyRealize (nerveMap g.toFunctor)) + (hbound f hf) (hbound g hg) (by simpa only [polyRealize_post] using H) + have he (a : P →o Q) : (realizationToPoly Q).hom.comp (polyRealize (nerveMap a.toFunctor)) = + affineMap a := by + rw [polyRealize_order] + apply ContinuousMap.ext + intro x + exact realizationToPoly_polyToRealization (map a (preservesChains_monotone a) x) + let G' := (G.compContinuousMap (realizationToPoly Q).hom).cast (he f) (he g) + refine ⟨G'.toHomotopy,?_⟩ + intro t x + have hh := G'.prop t _ ⟨x,rfl⟩ + change G' (t, map i (preservesChains_monotone i) x) = vertex q + change G' (t, map i (preservesChains_monotone i) x) = _ at hh + rw [hh] + change map f (preservesChains_monotone f) (map i (preservesChains_monotone i) x) = vertex q + have hm : map f (preservesChains_monotone f) (map i (preservesChains_monotone i) x) = + map (f.comp i) (preservesChains_monotone (f.comp i)) x := + PolyPoint.ext Finsupp.mapDomain_comp.symm + rw [hm,hf,map_constantOrder] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma poly_rel_pre_pair {P B R S : PartOrd.{u}} (i : B →o P) (j : S →o R) + (l : R →o P) (k : S →o B) (w : l.comp j = i.comp k) + {K : SSet.{u}} {a b : nerve P ⟶ K} + (H : (polyRealize a).HomotopyRel (polyRealize b) + (Set.range (map i (preservesChains_monotone i)))) : + Nonempty ((polyRealize (nerveMap l.toFunctor ≫ a)).HomotopyRel + (polyRealize (nerveMap l.toFunctor ≫ b)) + (Set.range (map j (preservesChains_monotone j)))) := by + rw [polyRealize_pre,polyRealize_pre] + refine ⟨top_homotopy_rel_pre H (affineMap l) _ ?_⟩ + rintro x ⟨y,rfl⟩ + refine ⟨map k (preservesChains_monotone k) y,?_⟩ + change map i (preservesChains_monotone i) (map k (preservesChains_monotone k) y) = map l (preservesChains_monotone l) (map j (preservesChains_monotone j) y) + have h₁ : map i (preservesChains_monotone i) (map k (preservesChains_monotone k) y) = map (i.comp k) (preservesChains_monotone _) y := + PolyPoint.ext Finsupp.mapDomain_comp.symm + have h₂ : map l (preservesChains_monotone l) (map j (preservesChains_monotone j) y) = map (l.comp j) (preservesChains_monotone _) y := + PolyPoint.ext Finsupp.mapDomain_comp.symm + rw [h₁,h₂,w] + +lemma pair_refinement_cancel {P B : PartOrd.{u}} (i : B →o P) (hi : Function.Injective i) + (d : PairRefinement P B i) {K : SSet.{u}} [SSet.KanComplex K] + (z : nerve B ⟶ K) {a b : nerve P ⟶ K} + (ha : nerveMap i.toFunctor ≫ a = z) (hb : nerveMap i.toFunctor ≫ b = z) + (H : BasedHomotopy (nerveMap d.j.toFunctor) (nerveMap d.k.toFunctor ≫ z) + (nerveMap d.l.toFunctor ≫ a) (nerveMap d.l.toFunctor ≫ b)) : + BasedHomotopy (nerveMap i.toFunctor) z a b := by + let : Mono (nerveMap i.toFunctor) := nerveOrderMap_mono i hi + let : Mono (nerveMap d.j.toFunctor) := nerveOrderMap_mono d.j d.injective + obtain ⟨H,hH⟩ := H + exact pair_local_injective_plain _ _ _ _ + (by rw [← nerveOrderMap_comp,← nerveOrderMap_comp,d.square]) + d.local_l d.local_k z a b ha hb H (by simpa only [Category.assoc] using hH) + +lemma finite_cubical_realization_faithful (P B : PartOrd.{u}) [Finite P] [Finite B] + (i : B →o P) (hi : Function.Injective i) (n : ℕ) (c : CubicalPair P B i n) + {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) + (a b : nerve P ⟶ K) (ha : nerveMap i.toFunctor ≫ a = SSet.const x) + (hb : nerveMap i.toFunctor ≫ b = SSet.const x) + (H : (polyRealize a).HomotopyRel (polyRealize b) + (Set.range (map i (preservesChains_monotone i)))) : + BasedHomotopy (nerveMap i.toFunctor) (SSet.const x) a b := by + obtain ⟨Q,q,r,e,hre,hr,he,hx⟩ := pointed_kan_ex_replacement K x + obtain ⟨d₁,a₁,ha₁,H₁⟩ := finite_pair_order_representative Q q r e he hre P B i hi a + (by rw [hx]; exact ha) + have hb₁ : nerveMap d₁.j.toFunctor ≫ nerveMap d₁.l.toFunctor ≫ b = + nerveMap (constantOrder d₁.S q).toFunctor ≫ r := by + rw [← Category.assoc,← nerveOrderMap_comp,d₁.square,nerveOrderMap_comp, + Category.assoc,hb,hx,SSet.comp_const] + obtain ⟨d₂,b₂,hb₂,H₂⟩ := finite_pair_order_representative Q q r e he hre + d₁.R d₁.S d₁.j d₁.injective (nerveMap d₁.l.toFunctor ≫ b) hb₁ + let a₂ : d₂.R →o Q := a₁.comp d₂.l + have ha₂ : a₂.comp d₂.j = constantOrder d₂.S q := by + dsimp [a₂] + rw [OrderHom.comp_assoc,d₂.square,← OrderHom.comp_assoc,ha₁,constantOrder_comp] + have H₁' := based_homotopy_pre (nerveMap d₁.j.toFunctor) (nerveMap d₂.j.toFunctor) + (nerveMap d₂.l.toFunctor) (nerveMap d₂.k.toFunctor) + (by rw [← nerveOrderMap_comp,← nerveOrderMap_comp,d₂.square]) _ H₁ + simp only [nerve_constant_pre'_assoc] at H₁' + obtain ⟨G₁⟩ := poly_realization_homotopy_rel d₂.j d₂.injective _ H₁' + obtain ⟨G₂⟩ := poly_realization_homotopy_rel d₂.j d₂.injective _ H₂ + obtain ⟨H'⟩ := poly_rel_pre_pair i d₁.j d₁.l d₁.k d₁.square H + obtain ⟨H''⟩ := poly_rel_pre_pair d₁.j d₂.j d₂.l d₂.k d₂.square H' + have HH : (polyRealize (nerveMap a₂.toFunctor ≫ r)).HomotopyRel + (polyRealize (nerveMap b₂.toFunctor ≫ r)) + (Set.range (map d₂.j (preservesChains_monotone d₂.j))) := by + have hhh := (G₁.symm.trans H'').trans G₂ + simpa only [a₂,nerveOrderMap_comp,Category.assoc] using hhh + obtain ⟨G,hG⟩ := geometric_relative_order_cancel d₂.R d₂.S d₂.j n + ((c.refine d₁).refine d₂) Q q a₂ b₂ ha₂ hb₂ r hr HH + have H₃ := pair_relative_nerve_descent d₂.R d₂.S d₂.j d₂.injective q a₂ b₂ + ha₂ hb₂ G hG K r + have H₃' : BasedHomotopy (nerveMap d₂.j.toFunctor) + (nerveMap (constantOrder d₂.S q).toFunctor ≫ r) + (nerveMap d₂.l.toFunctor ≫ nerveMap a₁.toFunctor ≫ r) + (nerveMap b₂.toFunctor ≫ r) := by + simpa only [a₂,nerveOrderMap_comp,Category.assoc] using H₃ + let : Mono (nerveMap d₂.j.toFunctor) := nerveOrderMap_mono d₂.j d₂.injective + have H₄ := based_homotopy_trans _ _ + (based_homotopy_trans _ _ H₁' H₃') (based_homotopy_symm _ _ H₂) + have hax₁ : nerveMap d₁.j.toFunctor ≫ nerveMap d₁.l.toFunctor ≫ a = SSet.const x := by + rw [← Category.assoc,← nerveOrderMap_comp,d₁.square,nerveOrderMap_comp, + Category.assoc,ha,SSet.comp_const] + have hbx₁ : nerveMap d₁.j.toFunctor ≫ nerveMap d₁.l.toFunctor ≫ b = SSet.const x := by + rw [hb₁,hx] + have H₅ := pair_refinement_cancel d₁.j d₁.injective d₂ (SSet.const x) hax₁ hbx₁ + (by simpa only [hx,SSet.comp_const] using H₄) + exact pair_refinement_cancel i hi d₁ (SSet.const x) ha hb + (by simpa only [SSet.comp_const] using H₅) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma realize_const_apply {A K : SSet.{u}} (x : K _⦋0⦌) (a : SSet.toTop.obj A) : + realizeMap (SSet.const x) a = KanQuillen.realVertex x := by + let p : A ⟶ (Δ[0] : SSet.{u}) := SSet.const (SSet.stdSimplex.obj₀Equiv.symm 0) + have h : p ≫ SSet.yonedaEquiv.symm x = SSet.const x := by + rw [SSet.yonedaEquiv_symm_zero,SSet.comp_const] + rw [← h,realizeMap_comp] + change SSet.toTop.map (SSet.yonedaEquiv.symm x) (SSet.toTop.map p a) = + SSet.toTop.map (SSet.yonedaEquiv.symm x) default + congr 1 + exact Subsingleton.elim _ _ + +lemma polyRealize_const {P : Type u} [PartialOrder P] {K : SSet.{u}} + (x : K _⦋0⦌) (a : PolyPoint P) : + polyRealize (SSet.const x) a = KanQuillen.realVertex x := realize_const_apply x _ + +lemma weak_cubical_injective (P B : PartOrd.{u}) [Finite P] [Finite B] + (i : B →o P) (hi : Function.Injective i) (n : ℕ) (c : CubicalPair P B i n) + {K L : SSet.{u}} [SSet.KanComplex K] (r : K ⟶ L) (hr : simplicialWeakEquivalences r) + (x : K _⦋0⦌) (a b : nerve P ⟶ K) + (ha : nerveMap i.toFunctor ≫ a = SSet.const x) + (hb : nerveMap i.toFunctor ≫ b = SSet.const x) + (H : BasedHomotopy (nerveMap i.toFunctor) (SSet.const (r.app _ x)) (a ≫ r) (b ≫ r)) : + BasedHomotopy (nerveMap i.toFunctor) (SSet.const x) a b := by + obtain ⟨G⟩ := poly_realization_homotopy_rel i hi _ H + have boundary (f : nerve P ⟶ K) (hf : nerveMap i.toFunctor ≫ f = SSet.const x) : + ∀ y ∈ Set.range (map i (preservesChains_monotone i)), polyRealize f y = + KanQuillen.realVertex x := by + rintro y ⟨z,rfl⟩ + have hh := congrArg (fun F : C(PolyPoint B,SSet.toTop.obj K) => F z) (polyRealize_pre i f) + rw [hf] at hh + exact hh.symm.trans (polyRealize_const x z) + obtain ⟨G'⟩ := cubical_relative_cancel n c.home _ c.boundary (realizeMap r) hr + (KanQuillen.realVertex x) (polyRealize a) (polyRealize b) (boundary a ha) (boundary b hb) + (by simpa only [polyRealize_post] using G) + exact finite_cubical_realization_faithful P B i hi n c x a b ha hb G' +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma cubical_relative_surject {A : Type u} {X : Type v} {Y : Type w} + [TopologicalSpace A] [TopologicalSpace X] [TopologicalSpace Y] + (n : ℕ) (e : A ≃ₜ (Fin (n+1) → unitInterval)) (S : Set A) + (hS : ∀ a, a ∈ S ↔ e a ∈ Cube.boundary (Fin (n+1))) + (r : C(X,Y)) (hr : WeakHomotopy.Equivalence r) (x : X) + (f : C(A,Y)) (hf : ∀ a ∈ S, f a = r x) : + ∃ g : C(A,X), (∀ a ∈ S, g a = x) ∧ Nonempty ((r.comp g).HomotopyRel f S) := by + let f' : GenLoop (Fin (n+1)) Y (r x) := ⟨f.comp ⟨e.symm,e.symm.continuous⟩,by + intro a ha + exact hf _ ((hS _).mpr (by simpa using ha))⟩ + obtain ⟨g,hg⟩ := (hr.2 n x).2 ⟦f'⟧ + obtain ⟨g,rfl⟩ := Quotient.mk_surjective g + obtain ⟨G⟩ : GenLoop.Homotopic (WeakHomotopy.loopMap (Fin (n+1)) r x g) f' := Quotient.exact hg + let g' := g.val.comp ⟨e,e.continuous⟩ + refine ⟨g',fun a ha => g.property _ ((hS a).mp ha),?_⟩ + have hh := top_homotopy_rel_pre G ⟨e,e.continuous⟩ S (fun a ha => (hS a).mp ha) + refine ⟨hh.cast ?_ ?_⟩ <;> ext a <;> simp [g',f',WeakHomotopy.loopMap] + +lemma poly_realize_boundary {P B : PartOrd.{u}} (i : B →o P) {K : SSet.{u}} + (x : K _⦋0⦌) (a : nerve P ⟶ K) (ha : nerveMap i.toFunctor ≫ a = SSet.const x) : + ∀ y ∈ Set.range (map i (preservesChains_monotone i)), polyRealize a y = + KanQuillen.realVertex x := by + rintro y ⟨z,rfl⟩ + have hh := congrArg (fun F : C(PolyPoint B,SSet.toTop.obj K) => F z) (polyRealize_pre i a) + rw [ha] at hh + exact hh.symm.trans (polyRealize_const x z) + +lemma pointed_replacement_real_vertex {Q : Type u} [PartialOrder Q] (q : Q) + {K : SSet.{u}} (r : nerve Q ⟶ K) (x : K _⦋0⦌) + (hx : nerveMap (constantOrder Q q).toFunctor ≫ r = SSet.const x) : + realizeMap r (polyToRealization (vertex q)) = KanQuillen.realVertex x := by + have hh := congrArg (fun F : C(PolyPoint Q,SSet.toTop.obj K) => F (vertex q)) + (polyRealize_post (nerveMap (constantOrder Q q).toFunctor) r) + rw [hx] at hh + change polyRealize (SSet.const x) (vertex q) = + realizeMap r (polyRealize (nerveMap (constantOrder Q q).toFunctor) (vertex q)) at hh + rw [polyRealize_const,polyRealize_constant] at hh + exact hh.symm + +lemma last_barycentric_realization_rel (P : PartOrd.{u}) [Finite P] (B : Set P) + (n : ℕ) {K : SSet.{u}} (x : K _⦋0⦌) (a : nerve P ⟶ K) + (ha : nerveMap (inclusion B).toFunctor ≫ a = SSet.const x) : + Nonempty ((polyRealize (nerveMap (last P n).toFunctor ≫ a)).HomotopyRel + ((polyRealize a).comp ⟨levelHomeomorph P n,(levelHomeomorph P n).continuous⟩) + (Set.range (map (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) n) + (preservesChains_monotone _)))) := by + rw [polyRealize_pre] + refine ⟨{ toHomotopy := (ContinuousMap.Homotopy.refl (polyRealize a)).comp (lastBarycentricHomotopy P n) + prop' := ?_ }⟩ + rintro t y ⟨z,rfl⟩ + obtain ⟨v,hv⟩ := lastBarycentricHomotopy_pair P B n t z + have hb := poly_realize_boundary (P := P) (B := PartOrd.of B) (inclusion B) x a ha + change polyRealize a (lastBarycentricHomotopy P n (t,_)) = + polyRealize a (map (last P n) (preservesChains_monotone _) _) + rw [← hv,hb _ ⟨v,rfl⟩] + symm + apply hb + refine ⟨map (last (PartOrd.of B) n) (preservesChains_monotone _) z,?_⟩ + have h₁ : map (inclusion B) (preservesChains_monotone _) (map (last (PartOrd.of B) n) (preservesChains_monotone _) z) = + map ((inclusion B).comp (last (PartOrd.of B) n)) (preservesChains_monotone _) z := + PolyPoint.ext Finsupp.mapDomain_comp.symm + have h₂ : map (last P n) (preservesChains_monotone _) (map (levelMap (inclusion B) n) (preservesChains_monotone _) z) = + map ((last P n).comp (levelMap (inclusion B) n)) (preservesChains_monotone _) z := + PolyPoint.ext Finsupp.mapDomain_comp.symm + rw [h₁,h₂,last_natural] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma full_pair_home_boundary (P : PartOrd.{u}) [Finite P] (B : Set P) (n : ℕ) + (y : PolyPoint P) (hy : y ∈ Set.range (map (inclusion B) (preservesChains_monotone _))) : + (levelHomeomorph P n).symm y ∈ Set.range + (map (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) n) (preservesChains_monotone _)) := by + obtain ⟨z,rfl⟩ := hy + refine ⟨(levelHomeomorph (PartOrd.of B) n).symm z,?_⟩ + apply (levelHomeomorph P n).injective + rw [(levelHomeomorph P n).apply_symm_apply,levelHomeomorph_natural _ Subtype.val_injective, + (levelHomeomorph (PartOrd.of B) n).apply_symm_apply] + +lemma finite_cubical_geometric_representative (P : PartOrd.{u}) [Finite P] (B : Set P) + (n : ℕ) (c : CubicalPair P (PartOrd.of B) (inclusion B) n) + {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) + (f : C(PolyPoint P,SSet.toTop.obj K)) + (hf : ∀ y ∈ Set.range (map (inclusion B) (preservesChains_monotone _)), + f y = KanQuillen.realVertex x) : + ∃ b : nerve P ⟶ K, nerveMap (inclusion B).toFunctor ≫ b = SSet.const x ∧ + Nonempty ((polyRealize b).HomotopyRel f + (Set.range (map (inclusion B) (preservesChains_monotone _)))) := by + obtain ⟨Q,q,r,hr,hw,hx⟩ := pointed_kan_poset_replacement K x + have hv := pointed_replacement_real_vertex q r x (hx Q) + obtain ⟨g,hg,⟨G⟩⟩ := cubical_relative_surject n c.home _ c.boundary (realizeMap r) hw + (polyToRealization (vertex q)) f (by simpa only [hv] using hf) + let g' : C(PolyPoint P,PolyPoint Q) := (realizationToPoly Q).hom.comp g + have hg' (y : PolyPoint B) : g' (map (inclusion B) (preservesChains_monotone _) y) = vertex q := by + change realizationToPoly Q (g _) = _ + rw [hg _ ⟨y,rfl⟩,realizationToPoly_polyToRealization] + obtain ⟨m,a,H,ha,hH⟩ := pair_geometric_approximation P B q g' hg' + have hab : nerveMap (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) m).toFunctor ≫ + nerveMap a.toFunctor ≫ r = + nerveMap (last (PartOrd.of B) m).toFunctor ≫ SSet.const x := by + rw [← Category.assoc,← nerveOrderMap_comp,ha] + exact (hx _).trans (SSet.comp_const _ _).symm + obtain ⟨b,D,hb,hD⟩ := descend_pair_approximation P B m K (SSet.const x) + (nerveMap a.toFunctor ≫ r) hab + have hD' : BasedHomotopy (nerveMap (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) m).toFunctor) + (SSet.const x) (nerveMap (last P m).toFunctor ≫ b) (nerveMap a.toFunctor ≫ r) := + ⟨D,by simpa only [SSet.comp_const] using hD⟩ + obtain ⟨D'⟩ := poly_realization_homotopy_rel + (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) m) + (levelMap_injective _ Subtype.val_injective m) _ hD' + obtain ⟨L⟩ := last_barycentric_realization_rel P B m x b hb + let H' : (polyRealize (nerveMap a.toFunctor ≫ r)).HomotopyRel + (((realizeMap r).comp g).comp ⟨levelHomeomorph P m,(levelHomeomorph P m).continuous⟩) + (Set.range (map (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) m) + (preservesChains_monotone _))) := by + have he : ((realizeMap r).comp polyToRealizationHom.hom).comp + (g'.comp ⟨levelHomeomorph P m,(levelHomeomorph P m).continuous⟩) = + ((realizeMap r).comp g).comp ⟨levelHomeomorph P m,(levelHomeomorph P m).continuous⟩ := by + ext y + change realizeMap r (polyToRealization (realizationToPoly Q (g _))) = _ + rw [polyToRealization_realizationToPoly] + rfl + refine { toHomotopy := ((ContinuousMap.Homotopy.refl + ((realizeMap r).comp polyToRealizationHom.hom)).comp H).cast ?_ he + prop' := ?_ } + · rw [polyRealize_post,polyRealize_order,ContinuousMap.comp_assoc] + · rintro t y ⟨z,rfl⟩ + change realizeMap r (polyToRealization (H (t,_))) = polyRealize (nerveMap a.toFunctor ≫ r) _ + rw [hH] + have hh := poly_realize_boundary + (P := level P m) (B := level (PartOrd.of B) m) + (levelMap (inclusion B) m) x (nerveMap a.toFunctor ≫ r) + (by simpa only [SSet.comp_const] using hab) + exact hv.trans (hh _ ⟨z,rfl⟩).symm + let G' := top_homotopy_rel_pre G + ⟨levelHomeomorph P m,(levelHomeomorph P m).continuous⟩ + (Set.range (map (levelMap (P := PartOrd.of B) (Q := P) (inclusion B) m) + (preservesChains_monotone _))) (by + rintro y ⟨z,rfl⟩ + exact ⟨levelHomeomorph (PartOrd.of B) m z, (levelHomeomorph_natural _ Subtype.val_injective m z).symm⟩) + let F := ((L.symm.trans D').trans H').trans G' + have F' := top_homotopy_rel_pre F + ⟨(levelHomeomorph P m).symm,(levelHomeomorph P m).symm.continuous⟩ _ + (full_pair_home_boundary P B m) + refine ⟨b,hb,⟨F'.cast ?_ ?_⟩⟩ <;> ext y <;> + simp only [ContinuousMap.comp_apply,ContinuousMap.coe_mk,Homeomorph.apply_symm_apply] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma realVertex_natural {K L : SSet.{u}} (r : K ⟶ L) (x : K _⦋0⦌) : + realizeMap r (KanQuillen.realVertex x) = KanQuillen.realVertex (r.app _ x) := by + change SSet.toTop.map r (SSet.toTop.map (SSet.yonedaEquiv.symm x) default) = _ + rw [← TopCat.comp_app,← Functor.map_comp,SSet.yonedaEquiv_symm_comp] + rfl + +lemma weak_cubical_surjective (P : PartOrd.{u}) [Finite P] (B : Set P) + (n : ℕ) (c : CubicalPair P (PartOrd.of B) (inclusion B) n) + {K L : SSet.{u}} [SSet.KanComplex K] [SSet.KanComplex L] + (r : K ⟶ L) (hr : simplicialWeakEquivalences r) (x : K _⦋0⦌) + (a : nerve P ⟶ L) (ha : nerveMap (inclusion B).toFunctor ≫ a = SSet.const (r.app _ x)) : + ∃ b : nerve P ⟶ K, nerveMap (inclusion B).toFunctor ≫ b = SSet.const x ∧ + BasedHomotopy (nerveMap (inclusion B).toFunctor) (SSet.const (r.app _ x)) (b ≫ r) a := by + have hf := poly_realize_boundary (P := P) (B := PartOrd.of B) (inclusion B) (r.app _ x) a ha + obtain ⟨g,hg,⟨G⟩⟩ := cubical_relative_surject n c.home _ c.boundary (realizeMap r) hr + (KanQuillen.realVertex x) (polyRealize a) (by simpa only [realVertex_natural] using hf) + obtain ⟨b,hb,⟨H⟩⟩ := finite_cubical_geometric_representative P B n c x g hg + refine ⟨b,hb,finite_cubical_realization_faithful P (PartOrd.of B) (inclusion B) + Subtype.val_injective n c (r.app _ x) (b ≫ r) a ?_ ha ?_⟩ + · rw [← Category.assoc,hb,SSet.const_comp] + · have F := (H.compContinuousMap (realizeMap r)).trans G + exact F.cast (polyRealize_post b r).symm rfl +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +abbrev cubePoset (n : ℕ) : PartOrd.{u} := + PartOrd.of (NonemptyFiniteChains (Finset (ULift.{u} (Fin (n+1))))) + +abbrev cubeBoundary (n : ℕ) : Set (cubePoset.{u} n) := + Cubical.boundaryFaces (ULift.{u} (Fin (n+1))) + +abbrev cubeBoundaryInclusion (n : ℕ) : PartOrd.of (cubeBoundary.{u} n) →o cubePoset.{u} n := + inclusion (cubeBoundary n) + +def actualCubicalPair (n : ℕ) : + CubicalPair (cubePoset.{u} n) (PartOrd.of (cubeBoundary n)) (cubeBoundaryInclusion n) n where + home := Cubical.pairCubeHomeomorph.trans + (Homeomorph.piCongrLeft (Y := fun _ : Fin (n+1) => unitInterval) Equiv.ulift) + boundary := by + intro a + have he : (Cubical.pairCubeHomeomorph (I := ULift.{u} (Fin (n+1)))) a ∈ + Cube.boundary (ULift.{u} (Fin (n+1))) ↔ + (Homeomorph.piCongrLeft (Y := fun _ : Fin (n+1) => unitInterval) Equiv.ulift) + (Cubical.pairCubeHomeomorph a) ∈ Cube.boundary (Fin (n+1)) := by + constructor + · rintro ⟨j,hj⟩ + exact ⟨j.down,hj⟩ + · rintro ⟨j,hj⟩ + exact ⟨ULift.up j,hj⟩ + change _ ↔ (Homeomorph.piCongrLeft (Y := fun _ : Fin (n+1) => unitInterval) Equiv.ulift) + (Cubical.pairCubeHomeomorph a) ∈ Cube.boundary (Fin (n+1)) + rw [← he] + constructor + · rintro ⟨b,rfl⟩ + exact (Cubical.boundaryHomeomorph b).property + · intro ha + obtain ⟨b,hb⟩ := Cubical.boundaryHomeomorph.surjective ⟨_,ha⟩ + exact ⟨b,Cubical.pairCubeHomeomorph.injective (congrArg Subtype.val hb)⟩ + +abbrev CubeMap (n : ℕ) {K : SSet.{u}} (x : K _⦋0⦌) := + {a : nerve (cubePoset.{u} n) ⟶ K // + nerveMap (cubeBoundaryInclusion n).toFunctor ≫ a = SSet.const x} + +instance cubeBoundary_mono (n : ℕ) : Mono (nerveMap (cubeBoundaryInclusion.{u} n).toFunctor) := + nerveOrderMap_mono _ Subtype.val_injective + +def cubeMapSetoid (n : ℕ) {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) : + Setoid (CubeMap n x) where + r a b := BasedHomotopy (nerveMap (cubeBoundaryInclusion n).toFunctor) (SSet.const x) a.val b.val + iseqv := { + refl := fun a => based_homotopy_refl _ _ a.val a.property + symm := fun h => based_homotopy_symm _ _ h + trans := fun h h' => based_homotopy_trans _ _ h h' } + +abbrev CubeClasses (n : ℕ) {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) := + Quotient (cubeMapSetoid n x) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +def realizeCubeMap (n : ℕ) {K : SSet.{u}} (x : K _⦋0⦌) (a : CubeMap n x) : + GenLoop (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x) := + ⟨(polyRealize a.val).comp ⟨(actualCubicalPair n).home.symm,(actualCubicalPair n).home.symm.continuous⟩,by + intro y hy + exact poly_realize_boundary (P := cubePoset n) (B := PartOrd.of (cubeBoundary n)) + (cubeBoundaryInclusion n) x a.val a.property _ + ((actualCubicalPair n).boundary _ |>.mpr (by simpa using hy))⟩ + +lemma realizeCubeMap_homotopic (n : ℕ) {K : SSet.{u}} (x : K _⦋0⦌) + {a b : CubeMap n x} + (H : BasedHomotopy (nerveMap (cubeBoundaryInclusion n).toFunctor) (SSet.const x) a.val b.val) : + GenLoop.Homotopic (realizeCubeMap n x a) (realizeCubeMap n x b) := by + obtain ⟨G⟩ := poly_realization_homotopy_rel (cubeBoundaryInclusion n) Subtype.val_injective _ H + exact ⟨top_homotopy_rel_pre G + ⟨(actualCubicalPair n).home.symm,(actualCubicalPair n).home.symm.continuous⟩ + (Cube.boundary (Fin (n+1))) (fun y hy => + ((actualCubicalPair n).boundary _).mpr (by simpa using hy))⟩ + +def realizeCubeClasses (n : ℕ) {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) : + CubeClasses n x → HomotopyGroup (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x) := + Quotient.map (realizeCubeMap n x) (fun _ _ h => realizeCubeMap_homotopic n x h) + +theorem positive_realization_comparison (n : ℕ) {K : SSet.{u}} [SSet.KanComplex K] + (x : K _⦋0⦌) : Function.Bijective (realizeCubeClasses n x) := by + constructor + · intro a b hab + obtain ⟨a,rfl⟩ := Quotient.mk_surjective a + obtain ⟨b,rfl⟩ := Quotient.mk_surjective b + obtain ⟨H⟩ : GenLoop.Homotopic (realizeCubeMap n x a) (realizeCubeMap n x b) := Quotient.exact hab + have G := top_homotopy_rel_pre H + ⟨(actualCubicalPair n).home,(actualCubicalPair n).home.continuous⟩ + (Set.range (map (cubeBoundaryInclusion n) (preservesChains_monotone _))) + (fun y hy => ((actualCubicalPair n).boundary y).mp hy) + have G' : (polyRealize a.val).HomotopyRel (polyRealize b.val) + (Set.range (map (cubeBoundaryInclusion n) (preservesChains_monotone _))) := + G.cast (by ext y; simp [realizeCubeMap]) (by ext y; simp [realizeCubeMap]) + exact Quotient.sound (finite_cubical_realization_faithful _ _ _ Subtype.val_injective + n (actualCubicalPair n) x a.val b.val a.property b.property G') + · intro a + obtain ⟨a,rfl⟩ := Quotient.mk_surjective a + let f := a.val.comp ⟨(actualCubicalPair n).home,(actualCubicalPair n).home.continuous⟩ + have hf : ∀ y ∈ Set.range (map (cubeBoundaryInclusion n) (preservesChains_monotone _)), + f y = KanQuillen.realVertex x := fun y hy => a.property _ (((actualCubicalPair n).boundary y).mp hy) + obtain ⟨b,hb,⟨H⟩⟩ := finite_cubical_geometric_representative (cubePoset n) (cubeBoundary n) + n (actualCubicalPair n) x f hf + refine ⟨⟦⟨b,hb⟩⟧,Quotient.sound ⟨?_⟩⟩ + have G := top_homotopy_rel_pre H + ⟨(actualCubicalPair n).home.symm,(actualCubicalPair n).home.symm.continuous⟩ + (Cube.boundary (Fin (n+1))) (fun y hy => + ((actualCubicalPair n).boundary _).mpr (by simpa using hy)) + exact G.cast rfl (by ext y; simp [f]) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +def cubeMapPost (n : ℕ) {K L : SSet.{u}} (r : K ⟶ L) (x : K _⦋0⦌) + (a : CubeMap n x) : CubeMap n (r.app _ x) := + ⟨a.val ≫ r,by rw [← Category.assoc,a.property,SSet.const_comp]⟩ + +def cubeClassesMap (n : ℕ) {K L : SSet.{u}} [SSet.KanComplex K] [SSet.KanComplex L] + (r : K ⟶ L) (x : K _⦋0⦌) : CubeClasses n x → CubeClasses n (r.app _ x) := + Quotient.map (cubeMapPost n r x) (fun a b h => by + change BasedHomotopy _ _ (a.val ≫ r) (b.val ≫ r) + simpa only [SSet.const_comp] using based_homotopy_post _ _ h r) + +theorem weak_positive_classes_bijective (n : ℕ) {K L : SSet.{u}} + [SSet.KanComplex K] [SSet.KanComplex L] (r : K ⟶ L) + (hr : simplicialWeakEquivalences r) (x : K _⦋0⦌) : + Function.Bijective (cubeClassesMap n r x) := by + constructor + · intro a b hab + obtain ⟨a,rfl⟩ := Quotient.mk_surjective a + obtain ⟨b,rfl⟩ := Quotient.mk_surjective b + have H : BasedHomotopy (nerveMap (cubeBoundaryInclusion n).toFunctor) + (SSet.const (r.app _ x)) (a.val ≫ r) (b.val ≫ r) := Quotient.exact hab + exact Quotient.sound (weak_cubical_injective _ _ _ Subtype.val_injective n + (actualCubicalPair n) r hr x a.val b.val a.property b.property H) + · intro a + obtain ⟨a,rfl⟩ := Quotient.mk_surjective a + obtain ⟨b,hb,H⟩ := weak_cubical_surjective (cubePoset n) (cubeBoundary n) n + (actualCubicalPair n) r hr x a.val a.property + exact ⟨⟦⟨b,hb⟩⟧,Quotient.sound H⟩ +end Thomason.GeometricRecognition + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CylinderAssociativity.lean b/lean/OAI/CategoryTheory/Thomason/CylinderAssociativity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1b9e4dcc6baf332d3914a19571fe5733341e613 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CylinderAssociativity.lean @@ -0,0 +1,745 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.CylinderFaces + +namespace OAI + +/-! Cylinder Associativity. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma hom_join_val {Y : OmegaCategory.{v}} {a b : Y.Cell} (k : ℕ) + (x y : (Y.homCategory a b).Cell) + (h : (Y.homCategory a b).target k x = (Y.homCategory a b).source k y) : + ((Y.homCategory a b).join k x y).val = Y.join (k+1) x.val y.val := by + rw [(Y.homCategory a b).join_eq k x y h, Y.join_eq (k+1) _ _ (congrArg Subtype.val h)] + rfl + +structure CylinderComposition (n k : ℕ) where + compose : {Y : OmegaCategory.{v}} → + (F G : OmegaCategory.Functor (K.{u} n).nu Y) → FaceMatching k F G → + OmegaCategory.Functor (K.{u} n).nu Y + endpoint_top : ∀ {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) (a : Bool), + (compose F G h).map (atEnd a (topTable n)) = + Y.join k (F.map (atEnd a (topTable n))) (G.map (atEnd a (topTable n))) + +lemma CylinderComposition.endpoint {n k : ℕ} (C : CylinderComposition.{u,v} n k) + (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) + (a : Bool) (x : Table (complex.{u} n)) : + (C.compose F G h).map (atEnd a x) = + (globeComposite hk + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu F) + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu G) (h.ends a)).map x := by + have he : OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu (C.compose F G h) = + globeComposite hk + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu F) + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu G) (h.ends a) := by + apply GlobeComplex.functor_ext + erw [globeComposite_top] + exact C.endpoint_top F G h a + exact congrArg (fun A => A.map x) he + +lemma zeroFaceMatching_seam {n : ℕ} {Y : OmegaCategory.{v}} + {F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y} (h : FaceMatching 0 F G) : + F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false)) := by + have h' := h (verticalTable (topTable 0)) + simpa only [verticalTable_natural, faceMap_top, vertex] using h' + +def cylinderCompositionZero (n : ℕ) : CylinderComposition.{u,v} (n+1) 0 where + compose F G h := horizontalCylinder F G (zeroFaceMatching_seam h) + endpoint_top F G h a := by + rw [horizontalCylinder_endpoint] + exact lift_top _ _ + +namespace CylinderComposition +variable {n k : ℕ} (C : CylinderComposition.{u,v} n k) (hk : k < n) + {Y : OmegaCategory.{v}} (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : FaceMatching (k+1) F G) + +def secondDiagonal : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory (F.map (atEnd false (vertex n false))) (F.map (atEnd true (vertex n true)))) := + homCast (rectangleDiagramOfFunctor G).diagonal (h.vertices false false).symm (h.vertices true true).symm + +lemma diagonal_matching : FaceMatching k (rectangleDiagramOfFunctor F).diagonal (secondDiagonal F G h) := by + intro x + apply Subtype.ext + change F.map (up ((faceMap n k true).cylinder.nu.map x)) = + G.map (up ((faceMap n k false).cylinder.nu.map x)) + rw [← tensorFace_up, ← tensorFace_up] + exact h (up x) + +def positiveEnds (a : Bool) : OmegaCategory.Functor (complex.{u} (n+1)).nu Y := + globeComposite (Nat.add_lt_add_right hk 1) ((rectangleDiagramOfFunctor F).ends a) + ((rectangleDiagramOfFunctor G).ends a) (h.ends a) + +lemma positiveEnds_vertex (a b : Bool) : + (positiveEnds hk F G h a).map (vertex n b) = F.map (atEnd a (vertex n b)) := + globeComposite_vertex hk _ _ _ b + +def positiveDiagram : RectangleDiagram.{u,v} n Y := + rectangleDiagramOfTop (positiveEnds hk F G h) + (rectangleDiagramOfFunctor F).edge (rectangleDiagramOfFunctor F).edge_fixed + (fun a => ((rectangleDiagramOfFunctor F).edge_source a).trans (positiveEnds_vertex hk F G h false a).symm) + (fun a => ((rectangleDiagramOfFunctor F).edge_target a).trans (positiveEnds_vertex hk F G h true a).symm) + (homCast (C.compose (rectangleDiagramOfFunctor F).diagonal (secondDiagonal F G h) + (diagonal_matching F G h)) + (positiveEnds_vertex hk F G h false false).symm (positiveEnds_vertex hk F G h true true).symm) + (by + change ((C.compose (rectangleDiagramOfFunctor F).diagonal (secondDiagonal F G h) + (diagonal_matching F G h)).map (atEnd false (topTable n))).val = _ + erw [C.endpoint_top, hom_join_val _ _ _ ((diagonal_matching F G h).ends false)] + change Y.join (k+1) ((rectangleDiagramOfFunctor F).diagonal.map (atEnd false (topTable n))).val + ((rectangleDiagramOfFunctor G).diagonal.map (atEnd false (topTable n))).val = _ + rw [(rectangleDiagramOfFunctor F).left, (rectangleDiagramOfFunctor G).left, suspendTable_top] + change Y.join (k+1) (Y.join 0 _ _) (Y.join 0 _ _) = + Y.join 0 ((rectangleDiagramOfFunctor F).edge false) + ((globeComposite _ _ _ _).map (topTable (n+1))) + erw [globeComposite_top] + have hedge : (rectangleDiagramOfFunctor G).edge false = (rectangleDiagramOfFunctor F).edge false := + (h.edges false).symm + rw [hedge] + exact (Y.join_whisker_left 0 (k+1) (by omega) _ _ _ + (Y.source_fixed_upwards (show 1 ≤ k+1 by omega) ((rectangleDiagramOfFunctor F).edge_fixed false)) + (h.ends true) (by + have hh := (rectangleDiagramOfFunctor F).edge_end_matching (topTable n) + rw [suspendTable_top] at hh + exact hh) + (by + rw [← hedge] + have hh := (rectangleDiagramOfFunctor G).edge_end_matching (topTable n) + rw [suspendTable_top] at hh + exact hh)).symm) + (by + change ((C.compose (rectangleDiagramOfFunctor F).diagonal (secondDiagonal F G h) + (diagonal_matching F G h)).map (atEnd true (topTable n))).val = _ + erw [C.endpoint_top, hom_join_val _ _ _ ((diagonal_matching F G h).ends true)] + change Y.join (k+1) ((rectangleDiagramOfFunctor F).diagonal.map (atEnd true (topTable n))).val + ((rectangleDiagramOfFunctor G).diagonal.map (atEnd true (topTable n))).val = _ + rw [(rectangleDiagramOfFunctor F).right, (rectangleDiagramOfFunctor G).right, suspendTable_top] + change Y.join (k+1) (Y.join 0 _ _) (Y.join 0 _ _) = + Y.join 0 ((globeComposite _ _ _ _).map (topTable (n+1))) + ((rectangleDiagramOfFunctor F).edge true) + erw [globeComposite_top] + have hedge : (rectangleDiagramOfFunctor G).edge true = (rectangleDiagramOfFunctor F).edge true := + (h.edges true).symm + rw [hedge] + exact (Y.join_whisker_right 0 (k+1) (by omega) _ _ _ + (Y.source_fixed_upwards (show 1 ≤ k+1 by omega) ((rectangleDiagramOfFunctor F).edge_fixed true)) + (h.ends false) (by + have hh := (rectangleDiagramOfFunctor F).end_edge_matching (topTable n) + rw [suspendTable_top] at hh + exact hh) + (by + rw [← hedge] + have hh := (rectangleDiagramOfFunctor G).end_edge_matching (topTable n) + rw [suspendTable_top] at hh + exact hh)).symm) + +def succ : CylinderComposition.{u,v} (n+1) (k+1) where + compose F G h := (C.positiveDiagram hk F G h).lift + endpoint_top F G h a := by + erw [RectangleDiagram.lift_endpoint] + change (globeComposite (Nat.add_lt_add_right hk 1) _ _ (h.ends a)).map (topTable (n+1)) = _ + erw [globeComposite_top] + rfl + +end CylinderComposition + +def cylinderComposition (n k : ℕ) (hk : k < n) : CylinderComposition.{u,v} n k := + match n, k with + | 0, _ => False.elim (by omega) + | n+1, 0 => cylinderCompositionZero n + | n+1, k+1 => (cylinderComposition n k (by omega)).succ (by omega) + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +abbrev pasteCylinder {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) := + (cylinderComposition n k hk).compose F G h + +lemma pasteCylinder_endpoint_top {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) (a : Bool) : + (pasteCylinder hk F G h).map (atEnd a (topTable n)) = + Y.join k (F.map (atEnd a (topTable n))) (G.map (atEnd a (topTable n))) := + (cylinderComposition n k hk).endpoint_top F G h a + +lemma pasteCylinder_endpoint {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) + (a : Bool) (x : Table (complex.{u} n)) : + (pasteCylinder hk F G h).map (atEnd a x) = + (globeComposite hk + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu F) + (OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu G) (h.ends a)).map x := + (cylinderComposition n k hk).endpoint hk F G h a x + +lemma pasteCylinder_zero {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (h : FaceMatching 0 F G) : + pasteCylinder (show 0 < n+1 by omega) F G h = + horizontalCylinder F G (zeroFaceMatching_seam h) := rfl + +lemma pasteCylinder_succ_edge {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (h : FaceMatching (k+1) F G) (a : Bool) : + (pasteCylinder (Nat.add_lt_add_right hk 1) F G h).map (verticalTable (vertex n a)) = + F.map (verticalTable (vertex n a)) := RectangleDiagram.lift_edge _ _ + +lemma pasteCylinder_succ_up {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (h : FaceMatching (k+1) F G) + (x : Table (K.{u} n)) : + (pasteCylinder (Nat.add_lt_add_right hk 1) F G h).map (up x) = + ((pasteCylinder hk (rectangleDiagramOfFunctor F).diagonal (CylinderComposition.secondDiagonal F G h) + (CylinderComposition.diagonal_matching F G h)).map x).val := RectangleDiagram.lift_up _ _ + +lemma pasteCylinder_natural (n k : ℕ) (hk : k < n) {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) + (P : OmegaCategory.Functor Y Z) : + OmegaCategory.Functor.comp (pasteCylinder hk F G h) P = + pasteCylinder hk (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) (h.natural P) := by + induction k generalizing n Y Z with + | zero => + cases n with + | zero => omega + | succ n => + rw [pasteCylinder_zero, pasteCylinder_zero] + exact horizontalCylinder_natural F G _ P + | succ k ih => + cases n with + | zero => omega + | succ n => + have hk' : k < n := by omega + apply functor_ext_rectangle + · intro a x + change P.map ((pasteCylinder hk F G h).map (atEnd a x)) = _ + rw [pasteCylinder_endpoint, pasteCylinder_endpoint] + exact congrArg (fun U => U.map x) (globeComposite_natural hk + (OmegaCategory.Functor.comp ((complex (n+1)).cylinderEndpoint a).nu F) + (OmegaCategory.Functor.comp ((complex (n+1)).cylinderEndpoint a).nu G) (h.ends a) P) + · intro a + change P.map ((pasteCylinder hk F G h).map (verticalTable (vertex n a))) = _ + rw [pasteCylinder_succ_edge hk', pasteCylinder_succ_edge hk'] + rfl + · intro x + change P.map ((pasteCylinder hk F G h).map (up x)) = _ + rw [pasteCylinder_succ_up hk', pasteCylinder_succ_up hk'] + have he := ih n hk' (rectangleDiagramOfFunctor F).diagonal + (CylinderComposition.secondDiagonal F G h) (CylinderComposition.diagonal_matching F G h) + (P.homMap (F.map (atEnd false (vertex n false))) (F.map (atEnd true (vertex n true)))) + exact congrArg (fun U => (U.map x).val) he + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma globeSuspended_ext {n : ℕ} {Y : OmegaCategory.{v}} {a b : Y.Cell} + (A : OmegaCategory.Functor (complex.{u} n).nu (Y.homCategory a b)) + (B : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : (A.map (topTable n)).val = B.map (topTable (n+1))) (x : Table (complex.{u} n)) : + (A.map x).val = B.map (suspendTable x) := by + obtain ⟨p,c,hp,he⟩ := table_classification x + rw [he, suspendTable_eq_face] + erw [← face_nu n p c (topTable n), A.map_face, + ← face_nu (n+1) (p+1) c (topTable (n+1)), B.map_face] + cases c + · change Y.source (p+1) (A.map (topTable n)).val = Y.source (p+1) (B.map (topTable (n+1))) + rw [h] + · change Y.target (p+1) (A.map (topTable n)).val = Y.target (p+1) (B.map (topTable (n+1))) + rw [h] + +lemma constantInterval_faceMatching {n k : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} n).nu Y) + (h : Y.target k (F.map (topTable n)) = Y.source k (G.map (topTable n))) : + FaceMatching k (constantInterval F) (constantInterval G) := by + have he : OmegaCategory.Functor.comp (faceMap n k true).nu F = + OmegaCategory.Functor.comp (faceMap n k false).nu G := by + apply GlobeComplex.functor_ext + change F.map ((faceMap n k true).nu.map (topTable k)) = + G.map ((faceMap n k false).nu.map (topTable k)) + rw [faceMap_top, faceMap_top] + exact (F.map_target k (topTable n)).trans (h.trans (G.map_source k (topTable n)).symm) + intro x + have h₀ := congrArg (fun U => U.nu.map x) (faceMap.{u} n k true).cylinder_projection + have h₁ := congrArg (fun U => U.nu.map x) (faceMap.{u} n k false).cylinder_projection + change project ((faceMap n k true).cylinder.nu.map x) = (faceMap n k true).nu.map (project x) at h₀ + change project ((faceMap n k false).cylinder.nu.map x) = (faceMap n k false).nu.map (project x) at h₁ + erw [constantInterval_map F, constantInterval_map G, h₀, h₁] + exact congrArg (fun U => U.map (project x)) he + +lemma pasteCylinder_constant (n k : ℕ) (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} n).nu Y) + (h : Y.target k (F.map (topTable n)) = Y.source k (G.map (topTable n))) : + pasteCylinder hk (constantInterval F) (constantInterval G) (constantInterval_faceMatching F G h) = + constantInterval (globeComposite hk F G h) := by + induction k generalizing n Y with + | zero => + cases n with + | zero => omega + | succ n => + have h' : F.map (vertex n true) = G.map (vertex n false) := by + erw [← F.map_target, ← G.map_source] at h + exact h + rw [pasteCylinder_zero, horizontalCylinder_constant F G h'] + rfl + | succ k ih => + cases n with + | zero => omega + | succ n => + have hk' : k < n := by omega + let hc := constantInterval_faceMatching F G h + apply functor_ext_rectangle + · intro a x + rw [pasteCylinder_endpoint, constantInterval_endpoint] + have hF : OmegaCategory.Functor.comp ((complex (n+1)).cylinderEndpoint a).nu (constantInterval F) = F := + constantInterval_ends F a + have hG : OmegaCategory.Functor.comp ((complex (n+1)).cylinderEndpoint a).nu (constantInterval G) = G := + constantInterval_ends G a + simp only [hF, hG] + · intro a + rw [pasteCylinder_succ_edge hk', constantInterval_edge, constantInterval_edge] + exact (globeComposite_vertex hk' F G h a).symm + · intro x + rw [pasteCylinder_succ_up hk', constantInterval_up] + let A := homCast (globeHomMap F) + (constantInterval_endpoint F false (vertex n false)).symm + (constantInterval_endpoint F true (vertex n true)).symm + let B := homCast (globeHomMap G) + ((globeMatching_vertex F G h false).symm.trans (constantInterval_endpoint F false (vertex n false)).symm) + ((globeMatching_vertex F G h true).symm.trans (constantInterval_endpoint F true (vertex n true)).symm) + have hA : (rectangleDiagramOfFunctor (constantInterval F)).diagonal = constantInterval A := by + apply OmegaCategory.Functor.ext + funext y + apply Subtype.ext + exact constantInterval_up F y + have hB : CylinderComposition.secondDiagonal (constantInterval F) (constantInterval G) hc = + constantInterval B := by + apply OmegaCategory.Functor.ext + funext y + apply Subtype.ext + exact constantInterval_up G y + have hAB : (Y.homCategory ((constantInterval F).map (atEnd false (vertex n false))) + ((constantInterval F).map (atEnd true (vertex n true)))).target k (A.map (topTable n)) = + (Y.homCategory ((constantInterval F).map (atEnd false (vertex n false))) + ((constantInterval F).map (atEnd true (vertex n true)))).source k (B.map (topTable n)) := by + apply Subtype.ext + change Y.target (k+1) (F.map (suspendTable (topTable n))) = + Y.source (k+1) (G.map (suspendTable (topTable n))) + rw [suspendTable_top] + exact h + simp only [hA, hB] + erw [ih n hk' A B hAB] + rw [constantInterval_map] + apply globeSuspended_ext _ (globeComposite hk F G h) + rw [globeComposite_top, hom_join_val _ _ _ hAB, globeComposite_top] + change Y.join (k+1) (F.map (suspendTable (topTable n))) (G.map (suspendTable (topTable n))) = _ + rw [suspendTable_top] + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory Limits DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory GrayComposition + +lemma pushout_faceMatching (n k : ℕ) : FaceMatching k (j₀.{u} n k) (j₁.{u} n k) := by + intro x + exact congrArg (fun f : T.{u} k ⟶ Q.{u} n k => f.map x) + (pushout.condition (f := tensorFace.{u} n k true) (g := tensorFace.{u} n k false)) + +def cooperation (n k : ℕ) (hk : k < n) : T.{u} n ⟶ Q.{u} n k := + pasteCylinder hk (j₀.{u} n k) (j₁.{u} n k) (pushout_faceMatching n k) + +lemma cooperation_endpoint (n k : ℕ) (hk : k < n) (b : Bool) : + endpoint.{u} n b ≫ cooperation n k hk = + composition.{u} n k hk ≫ cutEndpoint.{u} n k b := by + apply GlobeComplex.functor_ext + change (cooperation n k hk).map (atEnd b (topTable n)) = + (cutEndpoint.{u} n k b).map ((composition.{u} n k hk).map (topTable n)) + rw [cooperation, pasteCylinder_endpoint_top, composition, lift_top] + unfold compositeCell + rw [(cutEndpoint.{u} n k b).map_comp _ _ _ _ + ((cutEndpoint.{u} n k b).map_composable (top_composable.{u} n k))] + have h₀ : (cutEndpoint.{u} n k b).map ((i₀.{u} n k).map (topTable n)) = + (j₀.{u} n k).map (atEnd b (topTable n)) := by + change ((i₀ n k) ≫ cutEndpoint n k b).map _ = _ + simp only [cutEndpoint, i₀, pushout.inl_desc] + rfl + have h₁ : (cutEndpoint.{u} n k b).map ((i₁.{u} n k).map (topTable n)) = + (j₁.{u} n k).map (atEnd b (topTable n)) := by + change ((i₁ n k) ≫ cutEndpoint n k b).map _ = _ + simp only [cutEndpoint, i₁, pushout.inr_desc] + rfl + simp only [h₀, h₁] + exact (Q.{u} n k).join_eq k _ _ _ + +lemma pushout_globe_composition (n k : ℕ) (hk : k < n) : + globeComposite hk (i₀.{u} n k) (i₁.{u} n k) (top_composable.{u} n k) = composition.{u} n k hk := by + apply GlobeComplex.functor_ext + rw [globeComposite_top, composition, lift_top] + exact (P.{u} n k).join_eq k _ _ _ + +lemma cooperation_projection (n k : ℕ) (hk : k < n) : + cooperation.{u} n k hk ≫ cutProjection.{u} n k = + projection.{u} n ≫ composition.{u} n k hk := by + have h₀ : OmegaCategory.Functor.comp (j₀.{u} n k) (cutProjection.{u} n k) = + constantInterval (i₀.{u} n k) := by + change j₀ n k ≫ cutProjection n k = _ + simp only [cutProjection, j₀, pushout.inl_desc] + rfl + have h₁ : OmegaCategory.Functor.comp (j₁.{u} n k) (cutProjection.{u} n k) = + constantInterval (i₁.{u} n k) := by + change j₁ n k ≫ cutProjection n k = _ + simp only [cutProjection, j₁, pushout.inr_desc] + rfl + change OmegaCategory.Functor.comp (pasteCylinder _ _ _ _) _ = _ + rw [pasteCylinder_natural] + simp only [h₀, h₁] + rw [pasteCylinder_constant _ _ hk _ _ (top_composable.{u} n k), pushout_globe_composition] + rfl + +theorem cooperationExists_all (n k : ℕ) (hk : k < n) : CooperationExists.{u} n k hk := + ⟨cooperation n k hk, cooperation_endpoint n k hk, cooperation_projection n k hk⟩ +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory Limits DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +namespace RectangleDiagram +@[ext] lemma ext {n : ℕ} {Y : OmegaCategory.{v}} {D E : RectangleDiagram.{u,v} n Y} + (he : D.ends = E.ends) (hv : D.edge = E.edge) + (hd : ∀ x, (D.diagonal.map x).val = (E.diagonal.map x).val) : D = E := by + cases D + cases E + cases he + cases hv + congr 1 + apply OmegaCategory.Functor.ext + funext x + exact Subtype.ext (hd x) + +@[simp] lemma ofFunctor_lift {n : ℕ} {Y : OmegaCategory.{v}} (D : RectangleDiagram.{u,v} n Y) : + rectangleDiagramOfFunctor D.lift = D := by + apply ext + · funext a + apply OmegaCategory.Functor.ext + funext x + exact D.lift_endpoint a x + · funext a + exact D.lift_edge a + · intro x + exact D.lift_up x +end RectangleDiagram + +namespace IntervalMatching +variable {n : ℕ} {Y : OmegaCategory.{v}} {F G H : OmegaCategory.Functor (K.{u} n).nu Y} +lemma concat_left (h : IntervalMatching F G) (i : IntervalMatching G H) : + IntervalMatching (concatInterval F G h) H := by + intro x + rw [concatInterval_endpoint] + exact i x +lemma concat_right (h : IntervalMatching F G) (i : IntervalMatching G H) : + IntervalMatching F (concatInterval G H i) := by + intro x + rw [concatInterval_endpoint] + exact h x +lemma natural (h : IntervalMatching F G) {Z : OmegaCategory.{w}} + (P : OmegaCategory.Functor Y Z) : + IntervalMatching (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) := + fun x => congrArg P.map (h x) +end IntervalMatching + +abbrev pairFunctor {X Y Z : OmegaCategory.{u}} (F : X ⟶ Y) (G : X ⟶ Z) : + X ⟶ Y ⨯ Z := prod.lift F G + +lemma concatInterval_pair {n : ℕ} {Y Z : OmegaCategory.{u}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : IntervalMatching F G) + (F' G' : OmegaCategory.Functor (K.{u} n).nu Z) (h' : IntervalMatching F' G') + (H : IntervalMatching (pairFunctor F F') (pairFunctor G G')) : + concatInterval (pairFunctor F F') (pairFunctor G G') H = + pairFunctor (concatInterval F G h) (concatInterval F' G' h') := by + apply @prod.hom_ext OmegaCategory.{u} _ ((K n).nu) Y Z _ + · change OmegaCategory.Functor.comp (concatInterval _ _ H) (prod.fst : Y ⨯ Z ⟶ Y) = _ + rw [concatInterval_natural] + change concatInterval ((pairFunctor F F') ≫ prod.fst) ((pairFunctor G G') ≫ prod.fst) _ = _ + simp only [pairFunctor, prod.lift_fst] + · change OmegaCategory.Functor.comp (concatInterval _ _ H) (prod.snd : Y ⨯ Z ⟶ Z) = _ + rw [concatInterval_natural] + change concatInterval ((pairFunctor F F') ≫ prod.snd) ((pairFunctor G G') ≫ prod.snd) _ = _ + simp only [pairFunctor, prod.lift_snd] + +lemma IntervalMatching.pair {n : ℕ} {Y Z : OmegaCategory.{u}} + {F G : OmegaCategory.Functor (K.{u} n).nu Y} (h : IntervalMatching F G) + {F' G' : OmegaCategory.Functor (K.{u} n).nu Z} (h' : IntervalMatching F' G') : + IntervalMatching (pairFunctor F F') (pairFunctor G G') := by + have he : ((complex n).cylinderEndpoint true).nu ≫ pairFunctor F F' = + ((complex n).cylinderEndpoint false).nu ≫ pairFunctor G G' := by + apply prod.hom_ext <;> simp only [Category.assoc, pairFunctor, prod.lift_fst, prod.lift_snd] + · exact OmegaCategory.Functor.ext (funext h) + · exact OmegaCategory.Functor.ext (funext h') + exact fun x => congrArg (fun f => f.map x) he + +lemma concatInterval_homCompose {n : ℕ} {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) (h : IntervalMatching F G) + (F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) (h' : IntervalMatching F' G') : + concatInterval (homCompose F F') (homCompose G G') + (fun x => by apply Subtype.ext + change Y.join 0 (F.map (atEnd true x)).val (F'.map (atEnd true x)).val = _ + rw [h x, h' x]; rfl) = + homCompose (concatInterval F G h) (concatInterval F' G' h') := by + let P : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ Y.homCategory a c := + homCompose (prod.fst : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ _) (prod.snd : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ _) + have hp (A : (K.{u} n).nu ⟶ Y.homCategory a b) + (B : (K.{u} n).nu ⟶ Y.homCategory b c) : + pairFunctor A B ≫ P = homCompose A B := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((pairFunctor A B ≫ prod.fst).map x).val + ((pairFunctor A B ≫ prod.snd).map x).val = _ + change Y.join 0 ((prod.lift A B ≫ prod.fst).map x).val ((prod.lift A B ≫ prod.snd).map x).val = _ + rw [prod.lift_fst, prod.lift_snd] + rfl + have he := concatInterval_natural n (pairFunctor F F') (pairFunctor G G') (h.pair h') P + change concatInterval _ _ _ ≫ P = concatInterval (pairFunctor F F' ≫ P) (pairFunctor G G' ≫ P) _ at he + simp only [concatInterval_pair F G h F' G' h', hp] at he + exact he.symm + +lemma IntervalMatching.constantAt {n : ℕ} {Y : OmegaCategory.{v}} (a : Y.Cell) + (ha : Y.source 0 a = a) : + IntervalMatching (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha) := + fun _ => rfl + +@[simp] lemma concatInterval_constantAt {n : ℕ} {Y : OmegaCategory.{v}} (a : Y.Cell) + (ha : Y.source 0 a = a) (h : IntervalMatching (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha)) : + concatInterval (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha) h = + constantAt (K.{u} n).nu a ha := + concatInterval_constant n (constantAt (complex n).nu a ha) + +lemma concatInterval_val_congr {n : ℕ} {Y : OmegaCategory.{v}} {a b c d : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) (h : IntervalMatching F G) + (F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory c d)) (h' : IntervalMatching F' G') + (he : ∀ x, (F.map x).val = (F'.map x).val) + (hf : ∀ x, (G.map x).val = (G'.map x).val) (x : Table (K.{u} n)) : + ((concatInterval F G h).map x).val = ((concatInterval F' G' h').map x).val := by + have hac : a = c := (F.map x).property.1.symm.trans + ((congrArg (Y.source 0) (he x)).trans (F'.map x).property.1) + have hbd : b = d := (F.map x).property.2.symm.trans + ((congrArg (Y.target 0) (he x)).trans (F'.map x).property.2) + subst c d + have hF : F = F' := OmegaCategory.Functor.ext (funext (fun z => Subtype.ext (he z))) + have hG : G = G' := OmegaCategory.Functor.ext (funext (fun z => Subtype.ext (hf z))) + subst F' G' + rfl + +lemma concatInterval_homCompose_left {n : ℕ} {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (f : Y.Cell) (hf : Y.source 1 f = f) (hs : Y.source 0 f = a) (ht : Y.target 0 f = b) + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) (h : IntervalMatching F G) + (h' : IntervalMatching (homCompose (constantHom (K n).nu f hf hs ht) F) + (homCompose (constantHom (K n).nu f hf hs ht) G)) : + concatInterval (homCompose (constantHom (K n).nu f hf hs ht) F) + (homCompose (constantHom (K n).nu f hf hs ht) G) h' = + homCompose (constantHom (K n).nu f hf hs ht) (concatInterval F G h) := by + have e := concatInterval_homCompose (constantHom (K n).nu f hf hs ht) + (constantHom (K n).nu f hf hs ht) (IntervalMatching.constantAt (Y := Y.homCategory a b) ⟨f, hs, ht⟩ (Subtype.ext hf)) F G h + exact e.trans (congrArg (fun A => homCompose A (concatInterval F G h)) + (concatInterval_constantAt (Y := Y.homCategory a b) ⟨f, hs, ht⟩ (Subtype.ext hf) _)) + +lemma concatInterval_homCompose_right {n : ℕ} {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) (h : IntervalMatching F G) + (f : Y.Cell) (hf : Y.source 1 f = f) (hs : Y.source 0 f = b) (ht : Y.target 0 f = c) + (h' : IntervalMatching (homCompose F (constantHom (K n).nu f hf hs ht)) + (homCompose G (constantHom (K n).nu f hf hs ht))) : + concatInterval (homCompose F (constantHom (K n).nu f hf hs ht)) + (homCompose G (constantHom (K n).nu f hf hs ht)) h' = + homCompose (concatInterval F G h) (constantHom (K n).nu f hf hs ht) := by + have e := concatInterval_homCompose F G h (constantHom (K n).nu f hf hs ht) + (constantHom (K n).nu f hf hs ht) (IntervalMatching.constantAt (Y := Y.homCategory b c) ⟨f, hs, ht⟩ (Subtype.ext hf)) + exact e.trans (congrArg (fun B => homCompose (concatInterval F G h) B) + (concatInterval_constantAt (Y := Y.homCategory b c) ⟨f, hs, ht⟩ (Subtype.ext hf) _)) + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +def IntervalAssociative (n : ℕ) : Prop := + ∀ {Y : OmegaCategory.{u}} (F G H : OmegaCategory.Functor (K.{u} n).nu Y) + (h : IntervalMatching F G) (i : IntervalMatching G H), + concatInterval (concatInterval F G h) H (h.concat_left i) = + concatInterval F (concatInterval G H i) (h.concat_right i) + +namespace RectangleDiagram +variable {n : ℕ} {Y : OmegaCategory.{u}} + (D E S : RectangleDiagram.{u,u} n Y) + (h : ∀ x, (D.ends true).map x = (E.ends false).map x) + (i : ∀ x, (E.ends true).map x = (S.ends false).map x) + +def assocLeft : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory ((D.ends false).map (vertex n false)) ((E.ends false).map (vertex n false))) := + constantHom _ (D.edge false) (D.edge_fixed false) (D.edge_source false) + ((D.edge_target false).trans (h _)) + +def assocRight : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory ((E.ends true).map (vertex n true)) ((S.ends true).map (vertex n true))) := + constantHom _ (S.edge true) (S.edge_fixed true) + ((S.edge_source true).trans (i _).symm) (S.edge_target true) + +def assocA := homCompose (D.assocLeft E h) (E.concatDiagonalOne S i) +def assocB := homCompose (D.assocLeft E h) (E.concatDiagonalTwo S i) +def assocC := homCompose (D.concatDiagonalTwo E h) (E.assocRight S i) + +lemma assocB_map (x : Table (K.{u} n)) : + ((D.assocB E S h i).map x).val = + ((homCompose (D.concatDiagonalOne E h) (E.assocRight S i)).map x).val := by + change Y.join 0 (D.edge false) (Y.join 0 (E.diagonal.map x).val (S.edge true)) = + Y.join 0 (Y.join 0 (D.edge false) (E.diagonal.map x).val) (S.edge true) + exact (Y.join_assoc 0 _ _ _ + ((D.edge_target false).trans ((h _).trans (E.diagonal.map x).property.1.symm)) + ((E.diagonal.map x).property.2.trans ((i _).trans (S.edge_source true).symm))).symm + +lemma assocAB : IntervalMatching (D.assocA E S h i) (D.assocB E S h i) := by + intro x + apply Subtype.ext + change Y.join 0 (D.edge false) ((E.concatDiagonalOne S i).map (atEnd true x)).val = + Y.join 0 (D.edge false) ((E.concatDiagonalTwo S i).map (atEnd false x)).val + rw [E.concatDiagonal_matching S i x] + +lemma assocBC : IntervalMatching (D.assocB E S h i) (D.assocC E S h i) := by + intro x + apply Subtype.ext + rw [D.assocB_map E S h i] + change Y.join 0 ((D.concatDiagonalOne E h).map (atEnd true x)).val (S.edge true) = + Y.join 0 ((D.concatDiagonalTwo E h).map (atEnd false x)).val (S.edge true) + rw [D.concatDiagonal_matching E h x] + +lemma concat_one_assoc : + (D.concat E h (intervalComposition n)).concatDiagonalOne S i = D.assocA E S h i := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 (Y.join 0 (D.edge false) (E.edge false)) (S.diagonal.map x).val = + Y.join 0 (D.edge false) (Y.join 0 (E.edge false) (S.diagonal.map x).val) + exact Y.join_assoc 0 _ _ _ (D.seam_edge E h false) + ((E.edge_target false).trans ((i _).trans (S.diagonal.map x).property.1.symm)) + +lemma concat_two_assoc : + (D.concat E h (intervalComposition n)).concatDiagonalTwo S i = + concatInterval (D.assocB E S h i) (D.assocC E S h i) (D.assocBC E S h i) := by + have hb : D.assocB E S h i = homCompose (D.concatDiagonalOne E h) (E.assocRight S i) := + OmegaCategory.Functor.ext (funext (fun x => Subtype.ext (D.assocB_map E S h i x))) + have hm : IntervalMatching (homCompose (D.concatDiagonalOne E h) (E.assocRight S i)) + (homCompose (D.concatDiagonalTwo E h) (E.assocRight S i)) := by + simpa only [assocC, ← hb] using D.assocBC E S h i + have he := concatInterval_homCompose_right + (D.concatDiagonalOne E h) (D.concatDiagonalTwo E h) (D.concatDiagonal_matching E h) + (S.edge true) (S.edge_fixed true) ((S.edge_source true).trans (i _).symm) (S.edge_target true) hm + simp only [show constantHom (K n).nu (S.edge true) (S.edge_fixed true) + ((S.edge_source true).trans (i _).symm) (S.edge_target true) = E.assocRight S i from rfl, ← hb] at he + exact he.symm + +lemma concat_one_assoc' : + D.concatDiagonalOne (E.concat S i (intervalComposition n)) h = + concatInterval (D.assocA E S h i) (D.assocB E S h i) (D.assocAB E S h i) := by + exact (concatInterval_homCompose_left + (D.edge false) (D.edge_fixed false) (D.edge_source false) ((D.edge_target false).trans (h _)) + (E.concatDiagonalOne S i) (E.concatDiagonalTwo S i) (E.concatDiagonal_matching S i) + (D.assocAB E S h i)).symm + +lemma concat_two_assoc' : + D.concatDiagonalTwo (E.concat S i (intervalComposition n)) h = D.assocC E S h i := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 (D.diagonal.map x).val (Y.join 0 (E.edge true) (S.edge true)) = + Y.join 0 (Y.join 0 (D.diagonal.map x).val (E.edge true)) (S.edge true) + exact (Y.join_assoc 0 _ _ _ + ((D.diagonal.map x).property.2.trans ((h _).trans (E.edge_source true).symm)) + (E.seam_edge S i true)).symm + +lemma concat_assoc (ih : IntervalAssociative.{u} n) : + (D.concat E h (intervalComposition n)).concat S i (intervalComposition n) = + D.concat (E.concat S i (intervalComposition n)) h (intervalComposition n) := by + apply RectangleDiagram.ext + · funext a + cases a <;> rfl + · funext a + exact Y.join_assoc 0 _ _ _ (D.seam_edge E h a) (E.seam_edge S i a) + · intro x + change ((concatInterval ((D.concat E h (intervalComposition n)).concatDiagonalOne S i) + ((D.concat E h (intervalComposition n)).concatDiagonalTwo S i) _).map x).val = + ((concatInterval (D.concatDiagonalOne (E.concat S i (intervalComposition n)) h) + (D.concatDiagonalTwo (E.concat S i (intervalComposition n)) h) _).map x).val + simp only [concat_one_assoc, concat_two_assoc, concat_one_assoc', concat_two_assoc'] + exact congrArg (fun F => (F.map x).val) + (ih (D.assocA E S h i) (D.assocB E S h i) (D.assocC E S h i) + (D.assocAB E S h i) (D.assocBC E S h i)).symm + +end RectangleDiagram + +lemma concatInterval_associative (n : ℕ) : IntervalAssociative.{u} n := by + induction n with + | zero => + intro Y F G H h i + apply OmegaCategory.Functor.ext + funext x + rcases table_zero_cases x with ⟨a,he⟩ | he + · rw [he] + simp only [concatInterval_endpoint] + cases a <;> rfl + · rw [he] + simp only [concatInterval_zero_vertical] + exact Y.join_assoc 0 _ _ _ (zero_interval_seam F G h) (zero_interval_seam G H i) + | succ n ih => + intro Y F G H h i + have he := (rectangleDiagramOfFunctor F).concat_assoc (rectangleDiagramOfFunctor G) + (rectangleDiagramOfFunctor H) h i ih + change (((rectangleDiagramOfFunctor (concatInterval F G h)).concat + (rectangleDiagramOfFunctor H) _ (intervalComposition n)).lift) = + (((rectangleDiagramOfFunctor F).concat (rectangleDiagramOfFunctor (concatInterval G H i)) + _ (intervalComposition n)).lift) + simp only [show concatInterval F G h = ((rectangleDiagramOfFunctor F).concat + (rectangleDiagramOfFunctor G) h (intervalComposition n)).lift from rfl, + show concatInterval G H i = ((rectangleDiagramOfFunctor G).concat + (rectangleDiagramOfFunctor H) i (intervalComposition n)).lift from rfl, + RectangleDiagram.ofFunctor_lift] + exact congrArg RectangleDiagram.lift he +end Thomason.GrayRecursive + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CylinderFaces.lean b/lean/OAI/CategoryTheory/Thomason/CylinderFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..89c8c8ec55d6901b72365dfc804e0532aa634678 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CylinderFaces.lean @@ -0,0 +1,794 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.RectangleComposition + +namespace OAI + +/-! Cylinder Faces. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma suspend_composable {n k : ℕ} {x y : Table (complex.{u} n)} + (h : truncate k true x = truncate k false y) : + truncate (k+1) true (suspendTable x) = truncate (k+1) false (suspendTable y) := by + rw [← suspendTable_truncate, ← suspendTable_truncate, h] + +lemma suspend_comp {n k : ℕ} (x y : Table (complex.{u} n)) + (h : truncate k true x = truncate k false y) + (h' : truncate (k+1) true (suspendTable x) = truncate (k+1) false (suspendTable y)) : + suspendTable (DirectedComplex.Table.comp k x y h) = + DirectedComplex.Table.comp (k+1) (suspendTable x) (suspendTable y) h' := by + ext p b + cases p with + | zero => simp + | succ p => + simp only [suspendTable_succ, comp_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + erw [apply_ite (shiftDown n p).symm, apply_ite (shiftDown n p).symm, + apply_ite (shiftDown n p).symm, map_add] + rfl + +def globeHom (n : ℕ) : OmegaCategory.Functor (complex.{u} n).nu + ((complex.{u} (n+1)).nu.homCategory (vertex n false) (vertex n true)) where + map x := ⟨suspendTable x, suspend_truncate_zero false x, suspend_truncate_zero true x⟩ + map_source k x := Subtype.ext (suspendTable_truncate x k false) + map_target k x := Subtype.ext (suspendTable_truncate x k true) + map_comp k x y h h' := Subtype.ext (suspend_comp (k := k) x y h (congrArg Subtype.val h')) + +def globeHomMap {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) : + OmegaCategory.Functor (complex.{u} n).nu + (Y.homCategory (F.map (vertex n false)) (F.map (vertex n true))) := + OmegaCategory.Functor.comp (globeHom n) (F.homMap (vertex n false) (vertex n true)) + +lemma globe_horizontal_match {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + Y.target 0 (F.map (topTable (n+1))) = Y.source 0 (G.map (topTable (n+1))) := by + erw [← F.map_target, ← G.map_source] + exact h + +lemma globe_horizontal_fixed {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + Y.source (n+1) (Y.join 0 (F.map (topTable (n+1))) (G.map (topTable (n+1)))) = + Y.join 0 (F.map (topTable (n+1))) (G.map (topTable (n+1))) := by + erw [Y.join_source_gt (n+1) 0 _ _ (by omega) (globe_horizontal_match F G h), ← F.map_source, ← G.map_source] + change Y.join 0 (F.map (truncate (n+1) false (topTable (n+1)))) + (G.map (truncate (n+1) false (topTable (n+1)))) = _ + rw [topTable_bounded] + +def globeHorizontal {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + OmegaCategory.Functor (complex.{u} (n+1)).nu Y := + GlobeComplex.lift _ (globe_horizontal_fixed F G h) + +@[simp] lemma globeHorizontal_vertex {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) (a : Bool) : + (globeHorizontal F G h).map (vertex n a) = if a then G.map (vertex n true) else F.map (vertex n false) := by + erw [vertex, ← face_nu, (globeHorizontal F G h).map_face] + have ht : (globeHorizontal F G h).map (topTable (n+1)) = + Y.join 0 (F.map (topTable (n+1))) (G.map (topTable (n+1))) := lift_top _ _ + rw [ht] + cases a + · change Y.source 0 _ = _ + erw [Y.join_source_le 0 0 _ _ le_rfl (globe_horizontal_match F G h), ← F.map_source]; rfl + · change Y.target 0 _ = _ + erw [Y.join_target_le 0 0 _ _ le_rfl (globe_horizontal_match F G h), ← G.map_target]; rfl + +@[simp] lemma globeHorizontal_suspend {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) (x : Table (complex.{u} n)) : + (globeHorizontal F G h).map (suspendTable x) = + Y.join 0 (F.map (suspendTable x)) (G.map (suspendTable x)) := by + obtain ⟨p,a,hp,he⟩ := table_classification x + erw [he, suspendTable_eq_face, ← face_nu, (globeHorizontal F G h).map_face, F.map_face, G.map_face] + have ht : (globeHorizontal F G h).map (topTable (n+1)) = + Y.join 0 (F.map (topTable (n+1))) (G.map (topTable (n+1))) := lift_top _ _ + rw [ht] + cases a + · exact Y.join_source_gt (p+1) 0 _ _ (by omega) (globe_horizontal_match F G h) + · exact Y.join_target_gt (p+1) 0 _ _ (by omega) (globe_horizontal_match F G h) + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +namespace RectangleDiagram +variable {n : ℕ} {Y : OmegaCategory.{v}} + (D E : RectangleDiagram.{u,v} n Y) (h : D.edge true = E.edge false) + +include h in +lemma horizontal_seam (a : Bool) : + (D.ends a).map (vertex n true) = (E.ends a).map (vertex n false) := by + cases a + · rw [← D.edge_source, h, E.edge_source] + · rw [← D.edge_target, h, E.edge_target] + +def horizontalDiagonalOne : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) := + homCompose D.diagonal (homCast + (OmegaCategory.Functor.comp (complex n).cylinderProjection.nu (globeHomMap (E.ends true))) + (D.horizontal_seam E h true).symm rfl) + +def horizontalDiagonalTwo : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) := + homCompose (homCast + (OmegaCategory.Functor.comp (complex n).cylinderProjection.nu (globeHomMap (D.ends false))) + rfl (D.horizontal_seam E h false)) E.diagonal + +lemma horizontalDiagonalOne_map (x : Table (K.{u} n)) : + ((D.horizontalDiagonalOne E h).map x).val = + Y.join 0 (D.diagonal.map x).val ((E.ends true).map (suspendTable (project x))) := rfl +lemma horizontalDiagonalTwo_map (x : Table (K.{u} n)) : + ((D.horizontalDiagonalTwo E h).map x).val = + Y.join 0 ((D.ends false).map (suspendTable (project x))) (E.diagonal.map x).val := rfl + +lemma horizontalDiagonal_matching : IntervalMatching (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) := by + intro x + apply Subtype.ext + rw [D.horizontalDiagonalOne_map E h, D.horizontalDiagonalTwo_map E h, project_end, project_end, D.right, E.left, h] + exact Y.join_assoc 0 _ _ _ (by rw [← h]; exact D.end_edge_matching x) (E.edge_end_matching x) + +include h in +lemma horizontal_source_match (x : Table (complex.{u} n)) (a : Bool) : + Y.target 0 ((D.ends a).map (suspendTable x)) = Y.source 0 ((E.ends a).map (suspendTable x)) := by + erw [← (D.ends a).map_target, ← (E.ends a).map_source] + change (D.ends a).map (truncate 0 true (suspendTable x)) = + (E.ends a).map (truncate 0 false (suspendTable x)) + rw [suspend_truncate_zero, suspend_truncate_zero] + exact D.horizontal_seam E h a + +def horizontal : RectangleDiagram.{u,v} n Y where + ends a := globeHorizontal (D.ends a) (E.ends a) (D.horizontal_seam E h a) + edge a := if a then E.edge true else D.edge false + edge_fixed a := by cases a <;> simp only [Bool.false_eq_true, ite_false, ite_true]; exact D.edge_fixed false; exact E.edge_fixed true + edge_source a := by + rw [globeHorizontal_vertex] + cases a + · exact D.edge_source false + · exact E.edge_source true + edge_target a := by + rw [globeHorizontal_vertex] + cases a + · exact D.edge_target false + · exact E.edge_target true + diagonal := homCast (concatInterval (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) + (D.horizontalDiagonal_matching E h)) + (by simp) + (by simp) + left x := by + change ((concatInterval (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) + (D.horizontalDiagonal_matching E h)).map (atEnd false x)).val = _ + rw [concatInterval_endpoint] + simp only [Bool.false_eq_true, ite_false] + rw [D.horizontalDiagonalOne_map E h, project_end, D.left, globeHorizontal_suspend] + exact Y.join_assoc 0 _ _ _ (D.edge_end_matching x) (D.horizontal_source_match E h x true) + right x := by + change ((concatInterval (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) + (D.horizontalDiagonal_matching E h)).map (atEnd true x)).val = _ + rw [concatInterval_endpoint] + simp only [ite_true] + rw [D.horizontalDiagonalTwo_map E h, project_end, E.right, globeHorizontal_suspend] + exact (Y.join_assoc 0 _ _ _ (D.horizontal_source_match E h x false) (E.end_edge_matching x)).symm + +end RectangleDiagram + +def horizontalCylinder {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) : + OmegaCategory.Functor (K.{u} (n+1)).nu Y := + ((rectangleDiagramOfFunctor F).horizontal (rectangleDiagramOfFunctor G) h).lift + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma globeHorizontal_natural {n : ℕ} {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) (P : OmegaCategory.Functor Y Z) : + OmegaCategory.Functor.comp (globeHorizontal F G h) P = + globeHorizontal (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) + (congrArg P.map h) := by + apply GlobeComplex.functor_ext + change P.map ((globeHorizontal F G h).map (topTable (n+1))) = _ + rw [show (globeHorizontal F G h).map (topTable (n+1)) = + Y.join 0 (F.map (topTable (n+1))) (G.map (topTable (n+1))) from lift_top _ _, + show (globeHorizontal (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) + (congrArg P.map h)).map (topTable (n+1)) = _ from lift_top _ _] + exact P.map_join 0 _ _ (globe_horizontal_match F G h) + +namespace RectangleDiagram +variable {n : ℕ} {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + (D E : RectangleDiagram.{u,v} n Y) (h : D.edge true = E.edge false) + (P : OmegaCategory.Functor Y Z) + +lemma map_horizontalDiagonalOne : + OmegaCategory.Functor.comp (D.horizontalDiagonalOne E h) + (P.homMap ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) = + (D.map P).horizontalDiagonalOne (E.map P) (congrArg P.map h) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change P.map (Y.join 0 (D.diagonal.map x).val ((E.ends true).map (suspendTable (project x)))) = + Z.join 0 (P.map (D.diagonal.map x).val) (P.map ((E.ends true).map (suspendTable (project x)))) + apply P.map_join + erw [(D.diagonal.map x).property.2, D.horizontal_seam E h true, ← (E.ends true).map_source] + exact congrArg (E.ends true).map (suspend_truncate_zero false (project x)).symm + +lemma map_horizontalDiagonalTwo : + OmegaCategory.Functor.comp (D.horizontalDiagonalTwo E h) + (P.homMap ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) = + (D.map P).horizontalDiagonalTwo (E.map P) (congrArg P.map h) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change P.map (Y.join 0 ((D.ends false).map (suspendTable (project x))) (E.diagonal.map x).val) = + Z.join 0 (P.map ((D.ends false).map (suspendTable (project x)))) (P.map (E.diagonal.map x).val) + apply P.map_join + erw [(E.diagonal.map x).property.1, ← D.horizontal_seam E h false, ← (D.ends false).map_target] + exact congrArg (D.ends false).map (suspend_truncate_zero true (project x)) + +lemma horizontal_lift_map : + OmegaCategory.Functor.comp (D.horizontal E h).lift P = + ((D.map P).horizontal (E.map P) (congrArg P.map h)).lift := by + apply functor_ext_rectangle + · intro a x + change P.map ((D.horizontal E h).lift.map (atEnd a x)) = _ + rw [lift_endpoint, lift_endpoint] + exact congrArg (fun U => U.map x) + (globeHorizontal_natural (D.ends a) (E.ends a) (D.horizontal_seam E h a) P) + · intro a + change P.map ((D.horizontal E h).lift.map (verticalTable (vertex n a))) = _ + rw [lift_edge, lift_edge] + cases a <;> rfl + · intro x + change P.map ((D.horizontal E h).lift.map (up x)) = _ + rw [lift_up, lift_up] + have hh := concatInterval_natural n (D.horizontalDiagonalOne E h) + (D.horizontalDiagonalTwo E h) (D.horizontalDiagonal_matching E h) + (P.homMap ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) + simp only [D.map_horizontalDiagonalOne E h P, D.map_horizontalDiagonalTwo E h P] at hh + exact congrArg (fun U => (U.map x).val) hh + +end RectangleDiagram + +lemma horizontalCylinder_natural {n : ℕ} {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) + (P : OmegaCategory.Functor Y Z) : + OmegaCategory.Functor.comp (horizontalCylinder F G h) P = + horizontalCylinder (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) + (congrArg P.map h) := + (rectangleDiagramOfFunctor F).horizontal_lift_map (rectangleDiagramOfFunctor G) h P + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +@[simp] lemma project_up {n : ℕ} (x : Table (K.{u} n)) : + project (up x) = suspendTable (project x) := by + ext p b + cases p with + | zero => + cases b <;> simp [up, upRow, diagonalRow, suspendTable_zero, + project, Hom.table, cylinderProjection, cylinderProjectionMap] + | succ p => + cases p with + | zero => + simp only [project_row, sideRow, up, upRow, suspendTable_succ] + erw [map_add] + exact add_comm _ _ + | succ p => + simp only [project_row, sideRow, up, upRow, suspendTable_succ] + erw [map_add] + exact add_comm _ _ + +@[simp] lemma project_zero_vertical : + project (verticalTable (topTable.{u} 0)) = topTable 0 := + globe_zero_unique _ + +def constantInterval {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} n).nu Y) : + OmegaCategory.Functor (K.{u} n).nu Y := + OmegaCategory.Functor.comp (complex n).cylinderProjection.nu F + +@[simp] lemma constantInterval_map {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} n).nu Y) (x : Table (K.{u} n)) : + (constantInterval F).map x = F.map (project x) := rfl + +@[simp] lemma constantInterval_endpoint {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} n).nu Y) (a : Bool) (x : Table (complex.{u} n)) : + (constantInterval F).map (atEnd a x) = F.map x := by + rw [constantInterval_map, project_end] + +@[simp] lemma constantInterval_edge {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) (a : Bool) : + (constantInterval F).map (verticalTable (vertex n a)) = F.map (vertex n a) := by + rw [constantInterval_map, project_vertical_vertex] + +@[simp] lemma constantInterval_up {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) (x : Table (K.{u} n)) : + (constantInterval F).map (up x) = F.map (suspendTable (project x)) := by + rw [constantInterval_map, project_up] + +lemma constantInterval_matching {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} n).nu Y) : + IntervalMatching (constantInterval F) (constantInterval F) := by + intro x + rw [constantInterval_endpoint, constantInterval_endpoint] + +lemma constantInterval_ends {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) (a : Bool) : + (rectangleDiagramOfFunctor (constantInterval F)).ends a = F := by + apply OmegaCategory.Functor.ext + funext x + exact constantInterval_endpoint F a x + +lemma constantInterval_diagonal {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) : + homCast (rectangleDiagramOfFunctor (constantInterval F)).diagonal + (constantInterval_endpoint F false (vertex n false)) + (constantInterval_endpoint F true (vertex n true)) = + constantInterval (globeHomMap F) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + exact constantInterval_up F x + +lemma constantInterval_concatDiagonalOne {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) : + (rectangleDiagramOfFunctor (constantInterval F)).concatDiagonalOne + (rectangleDiagramOfFunctor (constantInterval F)) (constantInterval_matching F) = + homCast (constantInterval (globeHomMap F)) + (constantInterval_endpoint F false (vertex n false)).symm + (constantInterval_endpoint F true (vertex n true)).symm := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((constantInterval F).map (verticalTable (vertex n false))) + ((constantInterval F).map (up x)) = F.map (suspendTable (project x)) + erw [constantInterval_edge, constantInterval_up] + apply Y.join_left_unit + · erw [← F.map_source] + exact congrArg F.map (vertex_truncate n 0 false false) + · erw [← F.map_target, ← F.map_source] + exact congrArg F.map ((vertex_truncate n 0 false true).trans + (suspend_truncate_zero false (project x)).symm) + +lemma constantInterval_concatDiagonalTwo {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) : + (rectangleDiagramOfFunctor (constantInterval F)).concatDiagonalTwo + (rectangleDiagramOfFunctor (constantInterval F)) (constantInterval_matching F) = + homCast (constantInterval (globeHomMap F)) + (constantInterval_endpoint F false (vertex n false)).symm + (constantInterval_endpoint F true (vertex n true)).symm := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((constantInterval F).map (up x)) + ((constantInterval F).map (verticalTable (vertex n true))) = F.map (suspendTable (project x)) + erw [constantInterval_edge, constantInterval_up] + apply Y.join_right_unit + · erw [← F.map_source] + exact congrArg F.map (vertex_truncate n 0 true false) + · erw [← F.map_target, ← F.map_source] + exact congrArg F.map ((suspend_truncate_zero true (project x)).trans + (vertex_truncate n 0 true false).symm) + +lemma homCast_constantInterval {n : ℕ} {Y : OmegaCategory.{v}} {a b c d : Y.Cell} + (F : OmegaCategory.Functor (complex.{u} n).nu (Y.homCategory a b)) + (hac : a = c) (hbd : b = d) : + homCast (constantInterval F) hac hbd = constantInterval (homCast F hac hbd) := rfl + +lemma concatInterval_constant (n : ℕ) {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (complex.{u} n).nu Y) : + concatInterval (constantInterval F) (constantInterval F) (constantInterval_matching F) = + constantInterval F := by + induction n generalizing Y with + | zero => + apply OmegaCategory.Functor.ext + funext x + rcases table_zero_cases x with ⟨a,he⟩ | he + · rw [he, concatInterval_endpoint] + cases a <;> simp + · rw [he, concatInterval_zero_vertical, constantInterval_map, project_zero_vertical] + apply Y.join_left_unit + · erw [← F.map_source] + exact congrArg F.map (topTable_bounded 0) + · erw [← F.map_target, ← F.map_source] + exact congrArg F.map (show truncate 0 true (topTable 0) = truncate 0 false (topTable 0) by + rw [globe_zero_unique (truncate 0 true _), globe_zero_unique (truncate 0 false _)]) + | succ n ih => + apply functor_ext_rectangle + · intro a x + rw [concatInterval_endpoint] + cases a <;> simp + · intro a + rw [concatInterval_succ_edge, constantInterval_edge] + apply Y.join_left_unit + · erw [← F.map_source]; exact congrArg F.map (vertex_truncate n 0 a false) + · erw [← F.map_target, ← F.map_source] + exact congrArg F.map ((vertex_truncate n 0 a true).trans (vertex_truncate n 0 a false).symm) + · intro x + rw [concatInterval_succ_up] + simp only [constantInterval_concatDiagonalOne, constantInterval_concatDiagonalTwo, + homCast_constantInterval] + erw [ih] + exact (constantInterval_up F x).symm + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +def globeHorizontalHom {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + OmegaCategory.Functor (complex.{u} n).nu + (Y.homCategory (F.map (vertex n false)) (G.map (vertex n true))) := + homCompose (globeHomMap F) (homCast (globeHomMap G) h.symm rfl) + +lemma constantInterval_horizontal_match {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + (constantInterval F).map (verticalTable (vertex n true)) = + (constantInterval G).map (verticalTable (vertex n false)) := by + rw [constantInterval_edge, constantInterval_edge, h] + +lemma constantInterval_horizontalDiagonalOne {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + (rectangleDiagramOfFunctor (constantInterval F)).horizontalDiagonalOne + (rectangleDiagramOfFunctor (constantInterval G)) (constantInterval_horizontal_match F G h) = + constantInterval (homCast (globeHorizontalHom F G h) + (constantInterval_endpoint F false (vertex n false)).symm + (constantInterval_endpoint G true (vertex n true)).symm) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((constantInterval F).map (up x)) + ((constantInterval G).map (atEnd true (suspendTable (project x)))) = + Y.join 0 (F.map (suspendTable (project x))) (G.map (suspendTable (project x))) + erw [constantInterval_up, constantInterval_endpoint] + +lemma constantInterval_horizontalDiagonalTwo {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + (rectangleDiagramOfFunctor (constantInterval F)).horizontalDiagonalTwo + (rectangleDiagramOfFunctor (constantInterval G)) (constantInterval_horizontal_match F G h) = + constantInterval (homCast (globeHorizontalHom F G h) + (constantInterval_endpoint F false (vertex n false)).symm + (constantInterval_endpoint G true (vertex n true)).symm) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((constantInterval F).map (atEnd false (suspendTable (project x)))) + ((constantInterval G).map (up x)) = + Y.join 0 (F.map (suspendTable (project x))) (G.map (suspendTable (project x))) + erw [constantInterval_up, constantInterval_endpoint] + +lemma horizontalCylinder_endpoint {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) + (a : Bool) (x : Table (complex.{u} (n+1))) : + (horizontalCylinder F G h).map (atEnd a x) = + (globeHorizontal ((rectangleDiagramOfFunctor F).ends a) ((rectangleDiagramOfFunctor G).ends a) + ((rectangleDiagramOfFunctor F).horizontal_seam (rectangleDiagramOfFunctor G) h a)).map x := + RectangleDiagram.lift_endpoint _ a x + +lemma horizontalCylinder_edge {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) + (a : Bool) : + (horizontalCylinder F G h).map (verticalTable (vertex n a)) = + if a then G.map (verticalTable (vertex n true)) else F.map (verticalTable (vertex n false)) := + RectangleDiagram.lift_edge _ a + +lemma horizontalCylinder_up {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) + (x : Table (K.{u} n)) : + (horizontalCylinder F G h).map (up x) = + ((concatInterval ((rectangleDiagramOfFunctor F).horizontalDiagonalOne (rectangleDiagramOfFunctor G) h) + ((rectangleDiagramOfFunctor F).horizontalDiagonalTwo (rectangleDiagramOfFunctor G) h) + ((rectangleDiagramOfFunctor F).horizontalDiagonal_matching (rectangleDiagramOfFunctor G) h)).map x).val := + RectangleDiagram.lift_up _ x + +lemma horizontalCylinder_constant {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : F.map (vertex n true) = G.map (vertex n false)) : + horizontalCylinder (constantInterval F) (constantInterval G) (constantInterval_horizontal_match F G h) = + constantInterval (globeHorizontal F G h) := by + apply functor_ext_rectangle + · intro a x + rw [horizontalCylinder_endpoint, constantInterval_endpoint] + simp only [constantInterval_ends] + · intro a + simp only [horizontalCylinder_edge, constantInterval_edge, globeHorizontal_vertex] + · intro x + rw [horizontalCylinder_up] + simp only [constantInterval_horizontalDiagonalOne F G h, constantInterval_horizontalDiagonalTwo F G h] + erw [concatInterval_constant, constantInterval_up, globeHorizontal_suspend] + rfl + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma faceMap_vertex (n k : ℕ) (b a : Bool) : + (faceMap.{u} (n+1) (k+1) b).nu.map (vertex k a) = vertex n a := by + erw [vertex, ← face_nu, OmegaCategory.Functor.map_face, faceMap_top] + rw [face_nu] + change truncate 0 a (truncate (k+1) b (topTable (n+1))) = vertex n a + rw [truncate_truncate, ite_eq_left (show 0 < k+1 by omega)] + rfl + +lemma faceMap_suspend (n k : ℕ) (b : Bool) (x : Table (complex.{u} k)) : + (faceMap.{u} (n+1) (k+1) b).nu.map (suspendTable x) = + suspendTable ((faceMap.{u} n k b).nu.map x) := by + obtain ⟨p,a,hp,he⟩ := table_classification x + rw [he, suspendTable_eq_face] + erw [← face_nu (k+1) (p+1) a (topTable (k+1)), OmegaCategory.Functor.map_face, faceMap_top, face_nu] + erw [← face_nu k p a (topTable k), OmegaCategory.Functor.map_face, faceMap_top, face_nu] + change truncate (p+1) a (truncate (k+1) b (topTable (n+1))) = + suspendTable (truncate p a (truncate k b (topTable n))) + rw [suspendTable_truncate, suspendTable_eq_face] + +lemma cylinderHom_atEnd {n m : ℕ} (f : DirectedComplex.Hom (complex.{u} n) (complex.{u} m)) + (a : Bool) (x : Table (complex.{u} n)) : + f.cylinder.nu.map (atEnd a x) = atEnd a (f.nu.map x) := by + have h := congrArg (fun g => g.nu.map x) (f.cylinder_endpoint a) + exact h + +lemma tensorFace_edge (n k : ℕ) (b a : Bool) : + (faceMap.{u} (n+1) (k+1) b).cylinder.nu.map (verticalTable (vertex k a)) = + verticalTable (vertex n a) := by + rw [verticalTable_natural, faceMap_vertex] + +lemma tensorFace_up (n k : ℕ) (b : Bool) (x : Table (K.{u} k)) : + (faceMap.{u} (n+1) (k+1) b).cylinder.nu.map (up x) = + up ((faceMap.{u} n k b).cylinder.nu.map x) := by + apply generated k (fun x => (faceMap.{u} (n+1) (k+1) b).cylinder.nu.map (up x) = + up ((faceMap.{u} n k b).cylinder.nu.map x)) + · intro a y + cases a + · rw [up_endpoint_false] + change (faceMap (n+1) (k+1) b).cylinder.table _ = _ + rw [(faceMap.{u} (n+1) (k+1) b).cylinder.table_comp _ _ _ _ + ((faceMap.{u} (n+1) (k+1) b).cylinder.nu.map_composable (up_endpoint_left_matching y))] + change DirectedComplex.Table.comp 0 + ((faceMap (n+1) (k+1) b).cylinder.nu.map _) + ((faceMap (n+1) (k+1) b).cylinder.nu.map _) _ = _ + simp only [tensorFace_edge, cylinderHom_atEnd, faceMap_suspend] + erw [up_endpoint_false] + · rw [up_endpoint_true] + change (faceMap (n+1) (k+1) b).cylinder.table _ = _ + rw [(faceMap.{u} (n+1) (k+1) b).cylinder.table_comp _ _ _ _ + ((faceMap.{u} (n+1) (k+1) b).cylinder.nu.map_composable (up_endpoint_right_matching y))] + change DirectedComplex.Table.comp 0 + ((faceMap (n+1) (k+1) b).cylinder.nu.map _) + ((faceMap (n+1) (k+1) b).cylinder.nu.map _) _ = _ + simp only [tensorFace_edge, cylinderHom_atEnd, faceMap_suspend] + erw [up_endpoint_true] + · intro y + erw [up_vertical, verticalTable_natural, faceMap_suspend, verticalTable_natural, up_vertical] + · intro l s t h hs ht + rw [up_comp s t h (up_composable h)] + change (faceMap (n+1) (k+1) b).cylinder.table _ = up ((faceMap n k b).cylinder.table _) + rw [(faceMap.{u} (n+1) (k+1) b).cylinder.table_comp _ _ _ _ + ((faceMap.{u} (n+1) (k+1) b).cylinder.nu.map_composable (up_composable h))] + have h' := (faceMap.{u} n k b).cylinder.nu.map_composable h + rw [(faceMap.{u} n k b).cylinder.table_comp _ _ _ h h'] + change DirectedComplex.Table.comp (l+1) _ _ _ = up (DirectedComplex.Table.comp l _ _ h') + rw [up_comp _ _ h' (up_composable h')] + change DirectedComplex.Table.comp (l+1) + ((faceMap (n+1) (k+1) b).cylinder.nu.map (up s)) + ((faceMap (n+1) (k+1) b).cylinder.nu.map (up t)) _ = _ + simp only [hs, ht] + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +def rectangleDiagramOfTop {n : ℕ} {Y : OmegaCategory.{v}} + (ends : Bool → OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (edge : Bool → Y.Cell) + (ef : ∀ a, Y.source 1 (edge a) = edge a) + (es : ∀ a, Y.source 0 (edge a) = (ends false).map (vertex n a)) + (et : ∀ a, Y.target 0 (edge a) = (ends true).map (vertex n a)) + (diag : OmegaCategory.Functor (K.{u} n).nu + (Y.homCategory ((ends false).map (vertex n false)) ((ends true).map (vertex n true)))) + (hl : (diag.map (atEnd false (topTable n))).val = + Y.join 0 (edge false) ((ends true).map (topTable (n+1)))) + (hr : (diag.map (atEnd true (topTable n))).val = + Y.join 0 ((ends false).map (topTable (n+1))) (edge true)) : + RectangleDiagram.{u,v} n Y where + ends := ends + edge := edge + edge_fixed := ef + edge_source := es + edge_target := et + diagonal := diag + left x := by + let A := OmegaCategory.Functor.comp ((complex n).cylinderEndpoint false).nu diag + let B := homCompose (constantHom (complex.{u} n).nu (edge false) + (ef false) (es false) (et false)) (globeHomMap (ends true)) + have h : A = B := by + apply GlobeComplex.functor_ext + apply Subtype.ext + change (diag.map (atEnd false (topTable n))).val = + Y.join 0 (edge false) ((ends true).map (suspendTable (topTable n))) + rw [suspendTable_top] + exact hl + exact congrArg (fun F => (F.map x).val) h + right x := by + let A := OmegaCategory.Functor.comp ((complex n).cylinderEndpoint true).nu diag + let B := homCompose (globeHomMap (ends false)) + (constantHom (complex.{u} n).nu (edge true) (ef true) (es true) (et true)) + have h : A = B := by + apply GlobeComplex.functor_ext + apply Subtype.ext + change (diag.map (atEnd true (topTable n))).val = + Y.join 0 ((ends false).map (suspendTable (topTable n))) (edge true) + rw [suspendTable_top] + exact hr + exact congrArg (fun F => (F.map x).val) h + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +def FaceMatching {n : ℕ} (k : ℕ) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) : Prop := + ∀ x : Table (K.{u} k), + F.map ((faceMap n k true).cylinder.nu.map x) = + G.map ((faceMap n k false).cylinder.nu.map x) + +def globeComposite {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} n).nu Y) + (h : Y.target k (F.map (topTable n)) = Y.source k (G.map (topTable n))) : + OmegaCategory.Functor (complex.{u} n).nu Y := + GlobeComplex.lift (Y.join k (F.map (topTable n)) (G.map (topTable n))) (by + erw [Y.join_source_gt n k _ _ hk h, ← F.map_source, ← G.map_source] + change Y.join k (F.map (truncate n false (topTable n))) + (G.map (truncate n false (topTable n))) = _ + rw [topTable_bounded]) + +@[simp] lemma globeComposite_top {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} n).nu Y) + (h : Y.target k (F.map (topTable n)) = Y.source k (G.map (topTable n))) : + (globeComposite hk F G h).map (topTable n) = + Y.join k (F.map (topTable n)) (G.map (topTable n)) := lift_top _ _ + +lemma globeMatching_vertex {n k : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : Y.target (k+1) (F.map (topTable (n+1))) = + Y.source (k+1) (G.map (topTable (n+1)))) (a : Bool) : + F.map (vertex n a) = G.map (vertex n a) := by + have h' := congrArg (Y.face 0 a) h + cases a + · change Y.source 0 _ = Y.source 0 _ at h' + simp only [Y.source_target, ite_eq_left (show 0 < k+1 by omega), Y.source_source, + min_eq_left (show 0 ≤ k+1 by omega)] at h' + erw [← F.map_source, ← G.map_source] at h' + exact h' + · change Y.target 0 _ = Y.target 0 _ at h' + simp only [Y.target_source, ite_eq_left (show 0 < k+1 by omega), Y.target_target, + min_eq_left (show 0 ≤ k+1 by omega)] at h' + erw [← F.map_target, ← G.map_target] at h' + exact h' + +lemma globeComposite_vertex {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (complex.{u} (n+1)).nu Y) + (h : Y.target (k+1) (F.map (topTable (n+1))) = + Y.source (k+1) (G.map (topTable (n+1)))) (a : Bool) : + (globeComposite (Nat.add_lt_add_right hk 1) F G h).map (vertex n a) = F.map (vertex n a) := by + erw [vertex, ← face_nu, OmegaCategory.Functor.map_face, globeComposite_top] + cases a + · change Y.source 0 _ = _ + erw [Y.join_source_le 0 (k+1) _ _ (Nat.zero_le _) h, ← F.map_source] + rfl + · change Y.target 0 _ = _ + erw [Y.join_target_le 0 (k+1) _ _ (Nat.zero_le _) h, ← G.map_target] + exact (globeMatching_vertex F G h true).symm + +lemma globeComposite_natural {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + (F G : OmegaCategory.Functor (complex.{u} n).nu Y) + (h : Y.target k (F.map (topTable n)) = Y.source k (G.map (topTable n))) + (P : OmegaCategory.Functor Y Z) : + OmegaCategory.Functor.comp (globeComposite hk F G h) P = + globeComposite hk (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) + (P.map_composable h) := by + apply GlobeComplex.functor_ext + change P.map ((globeComposite hk F G h).map (topTable n)) = _ + erw [globeComposite_top, globeComposite_top, P.map_join _ _ _ h] + rfl + +lemma FaceMatching.ends {n k : ℕ} {Y : OmegaCategory.{v}} + {F G : OmegaCategory.Functor (K.{u} n).nu Y} (h : FaceMatching k F G) (a : Bool) : + Y.target k (F.map (atEnd a (topTable n))) = + Y.source k (G.map (atEnd a (topTable n))) := by + have h' := h (atEnd a (topTable k)) + rw [cylinderHom_atEnd, cylinderHom_atEnd, faceMap_top, faceMap_top] at h' + erw [← F.map_target, ← G.map_source] + change F.map (truncate k true (atEnd a (topTable n))) = + G.map (truncate k false (atEnd a (topTable n))) + simpa only [atEnd_truncate] using h' + +lemma FaceMatching.edges {n k : ℕ} {Y : OmegaCategory.{v}} + {F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y} (h : FaceMatching (k+1) F G) (a : Bool) : + F.map (verticalTable (vertex n a)) = G.map (verticalTable (vertex n a)) := by + have h' := h (verticalTable (vertex k a)) + simpa only [tensorFace_edge] using h' + +lemma FaceMatching.vertices {n k : ℕ} {Y : OmegaCategory.{v}} + {F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y} (h : FaceMatching (k+1) F G) (a b : Bool) : + F.map (atEnd a (vertex n b)) = G.map (atEnd a (vertex n b)) := by + have h' := h (atEnd a (vertex k b)) + simpa only [cylinderHom_atEnd, faceMap_vertex] using h' + +lemma FaceMatching.natural {n k : ℕ} {Y : OmegaCategory.{v}} {Z : OmegaCategory.{w}} + {F G : OmegaCategory.Functor (K.{u} n).nu Y} (h : FaceMatching k F G) + (P : OmegaCategory.Functor Y Z) : + FaceMatching k (OmegaCategory.Functor.comp F P) (OmegaCategory.Functor.comp G P) := + fun x => congrArg P.map (h x) + +end Thomason.GrayRecursive + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CylinderInterchange.lean b/lean/OAI/CategoryTheory/Thomason/CylinderInterchange.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc45b4887d40181704247d1777b29af3ca7e9369 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CylinderInterchange.lean @@ -0,0 +1,591 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.StationaryCylinders + +namespace OAI + +/-! Cylinder Interchange. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma tensorFace_tensorFace (n k j : ℕ) (hjk : j < k) (a b : Bool) + (x : Table (K.{u} j)) : + (faceMap n k b).cylinder.nu.map ((faceMap k j a).cylinder.nu.map x) = + (faceMap n j a).cylinder.nu.map x := by + have he := congrArg (fun f => f.cylinder.nu.map x) (faceMap_faceMap n k j hjk a b) + rw [DirectedComplex.Hom.cylinder_comp] at he + exact he + +lemma restrictCylinder_restrict {n k j : ℕ} (hjk : j < k) + {Y : OmegaCategory.{v}} (F : OmegaCategory.Functor (K.{u} n).nu Y) (a b : Bool) : + restrictCylinder j a (restrictCylinder k b F) = restrictCylinder j a F := by + apply OmegaCategory.Functor.ext + funext x + exact congrArg F.map (tensorFace_tensorFace n k j hjk a b x) + +lemma FaceMatching.restrict {n k i : ℕ} (hki : k < i) + {Y : OmegaCategory.{v}} {F G : OmegaCategory.Functor (K.{u} n).nu Y} + (h : FaceMatching k F G) (b : Bool) : + FaceMatching k (restrictCylinder i b F) (restrictCylinder i b G) := by + intro x + change F.map ((faceMap n i b).cylinder.nu.map ((faceMap i k true).cylinder.nu.map x)) = + G.map ((faceMap n i b).cylinder.nu.map ((faceMap i k false).cylinder.nu.map x)) + rw [tensorFace_tensorFace n i k hki true b, tensorFace_tensorFace n i k hki false b] + exact h x + +lemma FaceMatching.paste_left {n k : ℕ} (hk : k < n) + {Y : OmegaCategory.{v}} {F G H : OmegaCategory.Functor (K.{u} n).nu Y} + (hFG : FaceMatching k F G) (hGH : FaceMatching k G H) : + FaceMatching k (pasteCylinder hk F G hFG) H := by + intro x + have he := congrArg (fun P => P.map x) (pasteCylinder_lower_face n k k hk le_rfl F G hFG true) + exact he.trans (hGH x) + +lemma FaceMatching.paste_right {n k : ℕ} (hk : k < n) + {Y : OmegaCategory.{v}} {F G H : OmegaCategory.Functor (K.{u} n).nu Y} + (hFG : FaceMatching k F G) (hGH : FaceMatching k G H) : + FaceMatching k F (pasteCylinder hk G H hGH) := by + intro x + have he := congrArg (fun P => P.map x) (pasteCylinder_lower_face n k k hk le_rfl G H hGH false) + exact (hFG x).trans he.symm + +lemma tensorFace_project (n m : ℕ) (b : Bool) (x : Table (K.{u} m)) : + project ((faceMap n m b).cylinder.nu.map x) = (faceMap n m b).nu.map (project x) := by + exact congrArg (fun f => f.nu.map x) (DirectedComplex.Hom.cylinder_projection (faceMap n m b)) + +lemma pasteCylinder_upper_face (n k i : ℕ) (hk : k < n) (hki : k < i) (hin : i ≤ n) + {Y : OmegaCategory.{v}} (F G : OmegaCategory.Functor (K.{u} n).nu Y) + (h : FaceMatching k F G) (b : Bool) : + restrictCylinder i b (pasteCylinder hk F G h) = + pasteCylinder hki (restrictCylinder i b F) (restrictCylinder i b G) (h.restrict hki b) := by + induction k generalizing n i Y with + | zero => + cases n with + | zero => omega + | succ n => + cases i with + | zero => omega + | succ i => + apply functor_ext_rectangle + · intro a x + have he : endGlobe (restrictCylinder (i+1) b (pasteCylinder hk F G h)) a = + endGlobe (pasteCylinder hki (restrictCylinder (i+1) b F) + (restrictCylinder (i+1) b G) (h.restrict hki b)) a := by + apply GlobeComplex.functor_ext + change (restrictCylinder (i+1) b (pasteCylinder hk F G h)).map (atEnd a (topTable (i+1))) = + (pasteCylinder hki (restrictCylinder (i+1) b F) + (restrictCylinder (i+1) b G) (h.restrict hki b)).map (atEnd a (topTable (i+1))) + rw [restrictCylinder_endpoint_top, pasteCylinder_endpoint_top, pasteCylinder_endpoint_top, + restrictCylinder_endpoint_top, restrictCylinder_endpoint_top] + cases b + · exact Y.join_source_gt (i+1) 0 _ _ hki (h.ends a) + · exact Y.join_target_gt (i+1) 0 _ _ hki (h.ends a) + exact congrArg (fun P => P.map x) he + · intro a + rw [restrictCylinder_edge, pasteCylinder_zero_edge, pasteCylinder_zero_edge] + cases a <;> simp only [Bool.false_eq_true, ite_false, ite_true, restrictCylinder_edge] + · intro x + erw [restrictCylinder_up, pasteCylinder_zero_up, pasteCylinder_zero_up] + let D := rectangleDiagramOfFunctor F + let E := rectangleDiagramOfFunctor G + have he := concatInterval_face n i (by omega) (D.horizontalDiagonalOne E (zeroFaceMatching_seam h)) + (D.horizontalDiagonalTwo E (zeroFaceMatching_seam h)) + (D.horizontalDiagonal_matching E (zeroFaceMatching_seam h)) b + have hv := congrArg (fun P => (P.map x).val) he + refine hv.trans (concatInterval_val_congr _ _ _ _ _ _ ?_ ?_ x) + · intro z + change Y.join 0 (F.map (up ((faceMap n i b).cylinder.nu.map z))) + (G.map (atEnd true (suspendTable (project ((faceMap n i b).cylinder.nu.map z))))) = + Y.join 0 ((restrictCylinder (i+1) b F).map (up z)) + ((restrictCylinder (i+1) b G).map (atEnd true (suspendTable (project z)))) + erw [restrictCylinder_up, restrictCylinder_endpoint, faceMap_suspend, tensorFace_project] + · intro z + change Y.join 0 (F.map (atEnd false (suspendTable (project ((faceMap n i b).cylinder.nu.map z))))) + (G.map (up ((faceMap n i b).cylinder.nu.map z))) = + Y.join 0 ((restrictCylinder (i+1) b F).map (atEnd false (suspendTable (project z)))) + ((restrictCylinder (i+1) b G).map (up z)) + erw [restrictCylinder_endpoint, faceMap_suspend, restrictCylinder_up, tensorFace_project] + | succ k ih => + cases n with + | zero => omega + | succ n => + cases i with + | zero => omega + | succ i => + have hk' : k < n := by omega + have hki' : k < i := by omega + apply functor_ext_rectangle + · intro a x + have he : endGlobe (restrictCylinder (i+1) b (pasteCylinder hk F G h)) a = + endGlobe (pasteCylinder hki (restrictCylinder (i+1) b F) + (restrictCylinder (i+1) b G) (h.restrict hki b)) a := by + apply GlobeComplex.functor_ext + change (restrictCylinder (i+1) b (pasteCylinder hk F G h)).map (atEnd a (topTable (i+1))) = + (pasteCylinder hki (restrictCylinder (i+1) b F) + (restrictCylinder (i+1) b G) (h.restrict hki b)).map (atEnd a (topTable (i+1))) + rw [restrictCylinder_endpoint_top, pasteCylinder_endpoint_top, pasteCylinder_endpoint_top, + restrictCylinder_endpoint_top, restrictCylinder_endpoint_top] + cases b + · exact Y.join_source_gt (i+1) (k+1) _ _ hki (h.ends a) + · exact Y.join_target_gt (i+1) (k+1) _ _ hki (h.ends a) + exact congrArg (fun P => P.map x) he + · intro a + rw [restrictCylinder_edge, pasteCylinder_succ_edge hk', pasteCylinder_succ_edge hki', + restrictCylinder_edge] + · intro x + erw [restrictCylinder_up, pasteCylinder_succ_up hk', pasteCylinder_succ_up hki'] + have he := ih n i hk' hki' (by omega) (rectangleDiagramOfFunctor F).diagonal + (CylinderComposition.secondDiagonal F G h) (CylinderComposition.diagonal_matching F G h) + have hv := congrArg (fun P => (P.map x).val) he + refine hv.trans (pasteCylinder_val_congr hki' _ _ _ _ _ _ ?_ ?_ x) + · intro z + change F.map (up ((faceMap n i b).cylinder.nu.map z)) = (restrictCylinder (i+1) b F).map (up z) + exact (restrictCylinder_up F b z).symm + · intro z + change G.map (up ((faceMap n i b).cylinder.nu.map z)) = (restrictCylinder (i+1) b G).map (up z) + exact (restrictCylinder_up G b z).symm +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma intervalLabel_natural {n m : ℕ} (f : Hom (complex.{u} n) (complex.{u} m)) + (x : Table (K.{u} n)) (b : Bool) : + intervalLabel (f.cylinder.nu.map x) b = intervalLabel x b := by + exact f.map_augmentation ((x.row 0 b).2) + +lemma tensorFace_zero_up (n : ℕ) (b : Bool) (x : Table (K.{u} n)) : + (faceMap 0 (n+1) b).cylinder.nu.map (up x) = verticalTable (topTable 0) := by + rcases table_zero_cases ((faceMap 0 (n+1) b).cylinder.nu.map (up x)) with ⟨a,he⟩ | he + · have hs := congrArg (fun t => intervalLabel t false) he + have ht := congrArg (fun t => intervalLabel t true) he + simp only [intervalLabel_natural, intervalLabel_up, intervalLabel_end] at hs ht + cases a <;> simp_all + · exact he + +def faceIdentityCylinder {n : ℕ} (k : ℕ) (b : Bool) {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} n).nu Y) : OmegaCategory.Functor (K.{u} n).nu Y := + restrictCylinder n false (restrictCylinder k b F) + +lemma faceIdentityCylinder_endpoint_top {n k : ℕ} (hk : k ≤ n) + {Y : OmegaCategory.{v}} (F : OmegaCategory.Functor (K.{u} n).nu Y) (b a : Bool) : + (faceIdentityCylinder k b F).map (atEnd a (topTable n)) = + Y.face k b (F.map (atEnd a (topTable n))) := by + unfold faceIdentityCylinder + rw [restrictCylinder_endpoint_top, restrictCylinder_endpoint_top] + cases b + · exact Y.source_source n k _ |>.trans (congrArg (fun j => Y.source j _) (min_eq_right hk)) + · change Y.source n (Y.target k _) = Y.target k _ + rw [Y.source_target, ite_eq_right (by omega)] + +lemma faceIdentityCylinder_succ_edge {n k : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (b a : Bool) : + (faceIdentityCylinder (k+1) b F).map (verticalTable (vertex n a)) = + F.map (verticalTable (vertex n a)) := by + simp only [faceIdentityCylinder, restrictCylinder_edge] + +lemma faceIdentityCylinder_succ_up {n k : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (b : Bool) (x : Table (K.{u} n)) : + (faceIdentityCylinder (k+1) b F).map (up x) = + ((faceIdentityCylinder k b (rectangleDiagramOfFunctor F).diagonal).map x).val := by + simp only [faceIdentityCylinder, restrictCylinder_up] + erw [restrictCylinder_up] + rfl + +lemma faceIdentityCylinder_zero_edge {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (b a : Bool) : + (faceIdentityCylinder 0 b F).map (verticalTable (vertex n a)) = + F.map (verticalTable (vertex n b)) := by + change (restrictCylinder 0 b F).map ((faceMap 0 (n+1) false).cylinder.nu.map (verticalTable (vertex n a))) = _ + rw [verticalTable_natural, globe_zero_unique ((faceMap 0 (n+1) false).nu.map (vertex n a))] + exact restrictCylinder_zero_vertical F b + +lemma faceIdentityCylinder_zero_up {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (b : Bool) (x : Table (K.{u} n)) : + (faceIdentityCylinder 0 b F).map (up x) = F.map (verticalTable (vertex n b)) := by + change (restrictCylinder 0 b F).map ((faceMap 0 (n+1) false).cylinder.nu.map (up x)) = _ + rw [tensorFace_zero_up] + exact restrictCylinder_zero_vertical F b + +lemma faceIdentityCylinder_zero_endpoint {n : ℕ} {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} (n+1)).nu Y) (b a : Bool) (x : Table (complex.{u} (n+1))) : + (faceIdentityCylinder 0 b F).map (atEnd a x) = F.map (atEnd a (vertex n b)) := by + change (restrictCylinder 0 b F).map ((faceMap 0 (n+1) false).cylinder.nu.map (atEnd a x)) = _ + rw [cylinderHom_atEnd, globe_zero_unique ((faceMap 0 (n+1) false).nu.map x), restrictCylinder_endpoint, faceMap_top] + rfl + +lemma faceIdentityCylinder_left_matching {n k : ℕ} (hk : k < n) + {Y : OmegaCategory.{v}} (F : OmegaCategory.Functor (K.{u} n).nu Y) : + FaceMatching k (faceIdentityCylinder k false F) F := by + have he : restrictCylinder k true (faceIdentityCylinder k false F) = restrictCylinder k false F := by + unfold faceIdentityCylinder + rw [restrictCylinder_restrict hk, restrictCylinder_self] + intro x + exact congrArg (fun P => P.map x) he + +lemma faceIdentityCylinder_right_matching {n k : ℕ} (hk : k < n) + {Y : OmegaCategory.{v}} (F : OmegaCategory.Functor (K.{u} n).nu Y) : + FaceMatching k F (faceIdentityCylinder k true F) := by + have he : restrictCylinder k false (faceIdentityCylinder k true F) = restrictCylinder k true F := by + unfold faceIdentityCylinder + rw [restrictCylinder_restrict hk, restrictCylinder_self] + intro x + exact (congrArg (fun P => P.map x) he).symm + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma pasteCylinder_left_unit (n k : ℕ) (hk : k < n) {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} n).nu Y) : + pasteCylinder hk (faceIdentityCylinder k false F) F (faceIdentityCylinder_left_matching hk F) = F := by + induction k generalizing n Y with + | zero => + cases n with + | zero => omega + | succ n => + let D := rectangleDiagramOfFunctor F + apply functor_ext_rectangle + · intro a x + have he : endGlobe (pasteCylinder hk (faceIdentityCylinder 0 false F) F + (faceIdentityCylinder_left_matching hk F)) a = endGlobe F a := by + apply GlobeComplex.functor_ext + change (pasteCylinder hk (faceIdentityCylinder 0 false F) F + (faceIdentityCylinder_left_matching hk F)).map (atEnd a (topTable (n+1))) = + F.map (atEnd a (topTable (n+1))) + rw [pasteCylinder_endpoint_top, faceIdentityCylinder_endpoint_top (by omega)] + exact Y.join_left_unit 0 _ _ (Y.source_source_self 0 _) (Y.target_source_self 0 _) + exact congrArg (fun P => P.map x) he + · intro a + rw [pasteCylinder_zero_edge] + cases a <;> simp only [Bool.false_eq_true, ite_false, ite_true, faceIdentityCylinder_zero_edge] + · intro x + rw [pasteCylinder_zero_up] + refine (concatInterval_val_congr _ _ _ (constantInterval (endGlobe D.diagonal false)) + D.diagonal (stationary_left_matching D.diagonal) ?_ ?_ x).trans (congrArg (fun P => (P.map x).val) (concatInterval_left_unit D.diagonal)) + · intro z + change Y.join 0 ((faceIdentityCylinder 0 false F).map (up z)) + (F.map (atEnd true (suspendTable (project z)))) = + (D.diagonal.map (atEnd false (project z))).val + erw [faceIdentityCylinder_zero_up, D.left] + rfl + · intro z + change Y.join 0 ((faceIdentityCylinder 0 false F).map (atEnd false (suspendTable (project z)))) + (F.map (up z)) = (D.diagonal.map z).val + rw [faceIdentityCylinder_zero_endpoint] + apply Y.join_left_unit 0 _ _ (D.vertex_fixed false false) + rw [D.vertex_target_fixed false false] + exact (D.diagonal.map z).property.1.symm + | succ k ih => + cases n with + | zero => omega + | succ n => + have hk' : k < n := by omega + let D := rectangleDiagramOfFunctor F + apply functor_ext_rectangle + · intro a x + have he : endGlobe (pasteCylinder hk (faceIdentityCylinder (k+1) false F) F + (faceIdentityCylinder_left_matching hk F)) a = endGlobe F a := by + apply GlobeComplex.functor_ext + change (pasteCylinder hk (faceIdentityCylinder (k+1) false F) F + (faceIdentityCylinder_left_matching hk F)).map (atEnd a (topTable (n+1))) = + F.map (atEnd a (topTable (n+1))) + rw [pasteCylinder_endpoint_top, faceIdentityCylinder_endpoint_top (by omega)] + exact Y.join_left_unit (k+1) _ _ (Y.source_source_self (k+1) _) (Y.target_source_self (k+1) _) + exact congrArg (fun P => P.map x) he + · intro a + rw [pasteCylinder_succ_edge hk', faceIdentityCylinder_succ_edge] + · intro x + rw [pasteCylinder_succ_up hk'] + refine (pasteCylinder_val_congr hk' _ _ _ (faceIdentityCylinder k false D.diagonal) + D.diagonal (faceIdentityCylinder_left_matching hk' D.diagonal) ?_ ?_ x).trans (congrArg (fun P => (P.map x).val) (ih n hk' D.diagonal)) + · intro z + exact faceIdentityCylinder_succ_up F false z + · intro z + rfl + +lemma pasteCylinder_right_unit (n k : ℕ) (hk : k < n) {Y : OmegaCategory.{v}} + (F : OmegaCategory.Functor (K.{u} n).nu Y) : + pasteCylinder hk F (faceIdentityCylinder k true F) (faceIdentityCylinder_right_matching hk F) = F := by + induction k generalizing n Y with + | zero => + cases n with + | zero => omega + | succ n => + let D := rectangleDiagramOfFunctor F + apply functor_ext_rectangle + · intro a x + have he : endGlobe (pasteCylinder hk F (faceIdentityCylinder 0 true F) + (faceIdentityCylinder_right_matching hk F)) a = endGlobe F a := by + apply GlobeComplex.functor_ext + change (pasteCylinder hk F (faceIdentityCylinder 0 true F) + (faceIdentityCylinder_right_matching hk F)).map (atEnd a (topTable (n+1))) = + F.map (atEnd a (topTable (n+1))) + rw [pasteCylinder_endpoint_top, faceIdentityCylinder_endpoint_top (by omega)] + exact Y.join_right_unit 0 _ _ (Y.source_target_self 0 _) (Y.source_target_self 0 _).symm + exact congrArg (fun P => P.map x) he + · intro a + rw [pasteCylinder_zero_edge] + cases a <;> simp only [Bool.false_eq_true, ite_false, ite_true, faceIdentityCylinder_zero_edge] + · intro x + rw [pasteCylinder_zero_up] + refine (concatInterval_val_congr _ _ _ D.diagonal + (constantInterval (endGlobe D.diagonal true)) (stationary_right_matching D.diagonal) ?_ ?_ x).trans (congrArg (fun P => (P.map x).val) (concatInterval_right_unit D.diagonal)) + · intro z + change Y.join 0 (F.map (up z)) + ((faceIdentityCylinder 0 true F).map (atEnd true (suspendTable (project z)))) = + (D.diagonal.map z).val + rw [faceIdentityCylinder_zero_endpoint] + apply Y.join_right_unit 0 _ _ (D.vertex_fixed true true) + exact (D.diagonal.map z).property.2.trans (D.vertex_fixed true true).symm + · intro z + change Y.join 0 (F.map (atEnd false (suspendTable (project z)))) + ((faceIdentityCylinder 0 true F).map (up z)) = + (D.diagonal.map (atEnd true (project z))).val + erw [faceIdentityCylinder_zero_up, D.right] + rfl + | succ k ih => + cases n with + | zero => omega + | succ n => + have hk' : k < n := by omega + let D := rectangleDiagramOfFunctor F + apply functor_ext_rectangle + · intro a x + have he : endGlobe (pasteCylinder hk F (faceIdentityCylinder (k+1) true F) + (faceIdentityCylinder_right_matching hk F)) a = endGlobe F a := by + apply GlobeComplex.functor_ext + change (pasteCylinder hk F (faceIdentityCylinder (k+1) true F) + (faceIdentityCylinder_right_matching hk F)).map (atEnd a (topTable (n+1))) = + F.map (atEnd a (topTable (n+1))) + rw [pasteCylinder_endpoint_top, faceIdentityCylinder_endpoint_top (by omega)] + exact Y.join_right_unit (k+1) _ _ (Y.source_target_self (k+1) _) (Y.source_target_self (k+1) _).symm + exact congrArg (fun P => P.map x) he + · intro a + rw [pasteCylinder_succ_edge hk'] + · intro x + rw [pasteCylinder_succ_up hk'] + refine (pasteCylinder_val_congr hk' _ _ _ D.diagonal (faceIdentityCylinder k true D.diagonal) + (faceIdentityCylinder_right_matching hk' D.diagonal) ?_ ?_ x).trans (congrArg (fun P => (P.map x).val) (ih n hk' D.diagonal)) + · intro z + rfl + · intro z + exact faceIdentityCylinder_succ_up F true z +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory Limits DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma FaceMatching.pair {n k : ℕ} {Y Z : OmegaCategory.{u}} + {F G : OmegaCategory.Functor (K.{u} n).nu Y} (h : FaceMatching k F G) + {F' G' : OmegaCategory.Functor (K.{u} n).nu Z} (h' : FaceMatching k F' G') : + FaceMatching k (pairFunctor F F') (pairFunctor G G') := by + have he : (faceMap n k true).cylinder.nu ≫ pairFunctor F F' = + (faceMap n k false).cylinder.nu ≫ pairFunctor G G' := by + apply prod.hom_ext <;> simp only [Category.assoc, pairFunctor, prod.lift_fst, prod.lift_snd] + · exact OmegaCategory.Functor.ext (funext h) + · exact OmegaCategory.Functor.ext (funext h') + exact fun x => congrArg (fun f => f.map x) he + +lemma pasteCylinder_pair {n k : ℕ} (hk : k < n) {Y Z : OmegaCategory.{u}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) + (F' G' : OmegaCategory.Functor (K.{u} n).nu Z) (h' : FaceMatching k F' G') + (H : FaceMatching k (pairFunctor F F') (pairFunctor G G')) : + pasteCylinder hk (pairFunctor F F') (pairFunctor G G') H = + pairFunctor (pasteCylinder hk F G h) (pasteCylinder hk F' G' h') := by + apply @prod.hom_ext OmegaCategory.{u} _ ((K n).nu) Y Z _ + · change OmegaCategory.Functor.comp (pasteCylinder hk _ _ H) (prod.fst : Y ⨯ Z ⟶ Y) = _ + rw [pasteCylinder_natural] + change pasteCylinder hk ((pairFunctor F F') ≫ prod.fst) ((pairFunctor G G') ≫ prod.fst) _ = _ + simp only [pairFunctor, prod.lift_fst] + · change OmegaCategory.Functor.comp (pasteCylinder hk _ _ H) (prod.snd : Y ⨯ Z ⟶ Z) = _ + rw [pasteCylinder_natural] + change pasteCylinder hk ((pairFunctor F F') ≫ prod.snd) ((pairFunctor G G') ≫ prod.snd) _ = _ + simp only [pairFunctor, prod.lift_snd] + +lemma FaceMatching.homCompose {n k : ℕ} {Y : OmegaCategory.{v}} {a b c : Y.Cell} + {F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)} (h : FaceMatching k F G) + {F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)} (h' : FaceMatching k F' G') : + FaceMatching k (OmegaCategory.homCompose F F') (OmegaCategory.homCompose G G') := by + intro x + apply Subtype.ext + change Y.join 0 (F.map ((faceMap n k true).cylinder.nu.map x)).val + (F'.map ((faceMap n k true).cylinder.nu.map x)).val = _ + rw [h x, h' x] + rfl + +lemma pasteCylinder_homCompose {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) (h : FaceMatching k F G) + (F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) (h' : FaceMatching k F' G') : + pasteCylinder hk (homCompose F F') (homCompose G G') (h.homCompose h') = + homCompose (pasteCylinder hk F G h) (pasteCylinder hk F' G' h') := by + let P : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ Y.homCategory a c := + homCompose (prod.fst : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ _) (prod.snd : (Y.homCategory a b ⨯ Y.homCategory b c) ⟶ _) + have hp (A : (K.{u} n).nu ⟶ Y.homCategory a b) + (B : (K.{u} n).nu ⟶ Y.homCategory b c) : + pairFunctor A B ≫ P = homCompose A B := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change Y.join 0 ((pairFunctor A B ≫ prod.fst).map x).val + ((pairFunctor A B ≫ prod.snd).map x).val = _ + change Y.join 0 ((prod.lift A B ≫ prod.fst).map x).val ((prod.lift A B ≫ prod.snd).map x).val = _ + rw [prod.lift_fst, prod.lift_snd] + rfl + have he := pasteCylinder_natural n k hk (pairFunctor F F') (pairFunctor G G') (h.pair h') P + change pasteCylinder hk _ _ _ ≫ P = pasteCylinder hk (pairFunctor F F' ≫ P) (pairFunctor G G' ≫ P) _ at he + simp only [pasteCylinder_pair hk F G h F' G' h', hp] at he + exact he.symm + +lemma FaceMatching.constantAt {n k : ℕ} {Y : OmegaCategory.{v}} (a : Y.Cell) + (ha : Y.source 0 a = a) : + FaceMatching k (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha) := + fun _ => rfl + +@[simp] lemma pasteCylinder_constantAt {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} (a : Y.Cell) + (ha : Y.source 0 a = a) (h : FaceMatching k (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha)) : + pasteCylinder hk (constantAt (K.{u} n).nu a ha) (constantAt (K.{u} n).nu a ha) h = + constantAt (K.{u} n).nu a ha := by + have he : faceIdentityCylinder k false (constantAt (K.{u} n).nu a ha) = + constantAt (K.{u} n).nu a ha := rfl + simpa only [he] using pasteCylinder_left_unit n k hk (constantAt (K.{u} n).nu a ha) + +lemma pasteCylinder_homCompose_left {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (f : Y.Cell) (hf : Y.source 1 f = f) (hs : Y.source 0 f = a) (ht : Y.target 0 f = b) + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) (h : FaceMatching k F G) + (h' : FaceMatching k (homCompose (constantHom (K n).nu f hf hs ht) F) + (homCompose (constantHom (K n).nu f hf hs ht) G)) : + pasteCylinder hk (homCompose (constantHom (K n).nu f hf hs ht) F) + (homCompose (constantHom (K n).nu f hf hs ht) G) h' = + homCompose (constantHom (K n).nu f hf hs ht) (pasteCylinder hk F G h) := by + have e := pasteCylinder_homCompose hk (constantHom (K n).nu f hf hs ht) + (constantHom (K n).nu f hf hs ht) (FaceMatching.constantAt (k := k) (Y := Y.homCategory a b) ⟨f, hs, ht⟩ (Subtype.ext hf)) F G h + exact e.trans (congrArg (fun A => homCompose A (pasteCylinder hk F G h)) + (pasteCylinder_constantAt hk (Y := Y.homCategory a b) ⟨f, hs, ht⟩ (Subtype.ext hf) _)) + +lemma pasteCylinder_homCompose_right {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) (h : FaceMatching k F G) + (f : Y.Cell) (hf : Y.source 1 f = f) (hs : Y.source 0 f = b) (ht : Y.target 0 f = c) + (h' : FaceMatching k (homCompose F (constantHom (K n).nu f hf hs ht)) + (homCompose G (constantHom (K n).nu f hf hs ht))) : + pasteCylinder hk (homCompose F (constantHom (K n).nu f hf hs ht)) + (homCompose G (constantHom (K n).nu f hf hs ht)) h' = + homCompose (pasteCylinder hk F G h) (constantHom (K n).nu f hf hs ht) := by + have e := pasteCylinder_homCompose hk F G h (constantHom (K n).nu f hf hs ht) + (constantHom (K n).nu f hf hs ht) (FaceMatching.constantAt (k := k) (Y := Y.homCategory b c) ⟨f, hs, ht⟩ (Subtype.ext hf)) + exact e.trans (congrArg (fun B => homCompose (pasteCylinder hk F G h) B) + (pasteCylinder_constantAt hk (Y := Y.homCategory b c) ⟨f, hs, ht⟩ (Subtype.ext hf) _)) + +lemma FaceMatching.concat {n k : ℕ} (hk : k ≤ n) {Y : OmegaCategory.{v}} + {F G F' G' : OmegaCategory.Functor (K.{u} n).nu Y} + (h : FaceMatching k F G) (i : FaceMatching k F' G') + (t : IntervalMatching F F') (t' : IntervalMatching G G') : + FaceMatching k (concatInterval F F' t) (concatInterval G G' t') := by + have he : restrictCylinder k true (concatInterval F F' t) = + restrictCylinder k false (concatInterval G G' t') := by + rw [concatInterval_face n k hk, concatInterval_face n k hk] + have eh : restrictCylinder k true F = restrictCylinder k false G := OmegaCategory.Functor.ext (funext h) + have ei : restrictCylinder k true F' = restrictCylinder k false G' := OmegaCategory.Functor.ext (funext i) + simp only [eh, ei] + exact fun x => congrArg (fun f => f.map x) he + +lemma IntervalMatching.paste {n k : ℕ} (hk : k < n) {Y : OmegaCategory.{v}} + {F G F' G' : OmegaCategory.Functor (K.{u} n).nu Y} + (h : IntervalMatching F F') (i : IntervalMatching G G') + (t : FaceMatching k F G) (t' : FaceMatching k F' G') : + IntervalMatching (pasteCylinder hk F G t) (pasteCylinder hk F' G' t') := by + have he : endGlobe (pasteCylinder hk F G t) true = endGlobe (pasteCylinder hk F' G' t') false := by + apply GlobeComplex.functor_ext + change (pasteCylinder hk F G t).map (atEnd true (topTable n)) = + (pasteCylinder hk F' G' t').map (atEnd false (topTable n)) + rw [pasteCylinder_endpoint_top, pasteCylinder_endpoint_top, h, i] + exact fun x => congrArg (fun f => f.map x) he + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma IntervalMatching.homCompose {n : ℕ} {Y : OmegaCategory.{v}} {a b c : Y.Cell} + {F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)} (h : IntervalMatching F G) + {F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)} (h' : IntervalMatching F' G') : + IntervalMatching (OmegaCategory.homCompose F F') (OmegaCategory.homCompose G G') := by + intro x + apply Subtype.ext + change Y.join 0 (F.map (atEnd true x)).val (F'.map (atEnd true x)).val = _ + rw [h x, h' x] + rfl + +lemma concatInterval_shuffle_left {n : ℕ} {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) + (G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) : + concatInterval (homCompose (constantInterval (endGlobe F false)) G) + (homCompose F (constantInterval (endGlobe G true))) + ((stationary_left_matching F).homCompose (stationary_right_matching G)) = homCompose F G := by + rw [concatInterval_homCompose _ _ (stationary_left_matching F) _ _ (stationary_right_matching G), + concatInterval_left_unit, concatInterval_right_unit] + +lemma concatInterval_shuffle_right {n : ℕ} {Y : OmegaCategory.{u}} {a b c : Y.Cell} + (F : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) + (G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory b c)) : + concatInterval (homCompose F (constantInterval (endGlobe G false))) + (homCompose (constantInterval (endGlobe F true)) G) + ((stationary_right_matching F).homCompose (stationary_left_matching G)) = homCompose F G := by + rw [concatInterval_homCompose _ _ (stationary_right_matching F) _ _ (stationary_left_matching G), + concatInterval_right_unit, concatInterval_left_unit] + +lemma concatInterval_four {n : ℕ} {Y : OmegaCategory.{u}} + (A B C D : OmegaCategory.Functor (K.{u} n).nu Y) + (h : IntervalMatching A B) (i : IntervalMatching B C) (j : IntervalMatching C D) : + concatInterval (concatInterval A B h) (concatInterval C D j) (h.concat_left (i.concat_right j)) = + concatInterval A (concatInterval (concatInterval B C i) D (i.concat_left j)) + ((h.concat_right i).concat_right (i.concat_left j)) := by + rw [concatInterval_associative] + congr 1 + exact (concatInterval_associative n B C D i j).symm + +lemma IntervalMatching.of_val {n : ℕ} {Y : OmegaCategory.{v}} {a b c d : Y.Cell} + (F G : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory a b)) + (F' G' : OmegaCategory.Functor (K.{u} n).nu (Y.homCategory c d)) + (h : IntervalMatching F' G') + (he : ∀ x, (F.map x).val = (F'.map x).val) + (hf : ∀ x, (G.map x).val = (G'.map x).val) : IntervalMatching F G := by + intro x + apply Subtype.ext + erw [he, hf] + exact congrArg Subtype.val (h x) + +end Thomason.GrayRecursive + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CylinderProfiles.lean b/lean/OAI/CategoryTheory/Thomason/CylinderProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..05354de7c7e11f14fa46b058b68ca4cd5099eeac --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CylinderProfiles.lean @@ -0,0 +1,802 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.StandardComparison + +namespace OAI + +/-! Cylinder Profiles. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {X Y : OmegaCategory.{u}} + +lemma generatorCylinder_endpoint (n : ℕ) (x : X.Cells n) (a : Bool) + (t : Table (complex.{u} n)) : + (generatorCylinder n x).map (atEnd a t) = + ((tensorEndpoint a).app X).map ((GlobeComplex.lift x.val x.property).map t) := by + have h : OmegaCategory.Functor.comp ((complex n).cylinderEndpoint a).nu (generatorCylinder n x) = + OmegaCategory.Functor.comp (GlobeComplex.lift x.val x.property) ((tensorEndpoint a).app X) := by + apply GlobeComplex.functor_ext + change (tensorPresentation X).generator ⟨n,x,atEnd a (topTable n)⟩ = + ((tensorEndpoint a).app X).map ((GlobeComplex.lift x.val x.property).map (topTable n)) + rw [lift_top,tensorEndpoint_bounded a X n x] + exact congrArg (fun F => F.map t) h + +def tensorParameter (X : OmegaCategory.{u}) : tensorFunctor.obj X ⟶ (K.{u} 0).nu := + tensorFunctor.map (constantAt X (topTable 0) (topTable_bounded 0)) ≫ (globeTensorIso 0).hom + +def tensorLabel (t : (tensorFunctor.obj X).Cell) (b : Bool) : ℤ := + intervalLabel ((tensorParameter X).map t) b + +lemma tensorParameter_generator (n : ℕ) (x : X.Cells n) (z : Table (K.{u} n)) : + (tensorParameter X).map ((tensorPresentation X).generator ⟨n,x,z⟩) = + (faceMap.{u} 0 n false).cylinder.nu.map z := by + change (globeTensorHom 0).map ((tensorFunctor.map (constantAt X (topTable 0) (topTable_bounded 0))).map + ((tensorPresentation X).generator ⟨n,x,z⟩)) = _ + erw [tensorFunctor_map_generator,globeTensorHom_generator] + change (eval n ((globeDiagram 0).map (topTable 0))).map z = _ + rw [globeDiagram_top,eval_ofMap] + rfl + +lemma intervalLabel_cylinder_map {n m : ℕ} (f : Hom (complex.{u} n) (complex.{u} m)) + (z : Table (K.{u} n)) (b : Bool) : + intervalLabel (f.cylinder.nu.map z) b = intervalLabel z b := + f.map_augmentation ((z.row 0 b).2) + +@[simp] lemma tensorLabel_generator (n : ℕ) (x : X.Cells n) (z : Table (K.{u} n)) (b : Bool) : + tensorLabel ((tensorPresentation X).generator ⟨n,x,z⟩) b = intervalLabel z b := by + unfold tensorLabel + rw [tensorParameter_generator,intervalLabel_cylinder_map] + +@[simp] lemma tensorLabel_endpoint (a b : Bool) (x : X.Cell) : + tensorLabel (((tensorEndpoint a).app X).map x) b = if a then 1 else 0 := by + obtain ⟨n,hn⟩ := X.finite_dimension x + erw [tensorEndpoint_bounded a X n ⟨x,hn⟩,tensorLabel_generator,intervalLabel_end] + +lemma tensorLabel_values (x : (tensorFunctor.obj X).Cell) (b : Bool) : + tensorLabel x b = 0 ∨ tensorLabel x b = 1 := + side_mass_vertex ((tensorParameter X).map x) true b + +lemma tensorLabel_monotone (x : (tensorFunctor.obj X).Cell) : + tensorLabel x false ≤ tensorLabel x true := interval_monotone ((tensorParameter X).map x) + +lemma tensorLabel_source (k : ℕ) (x : (tensorFunctor.obj X).Cell) (b : Bool) : + tensorLabel ((tensorFunctor.obj X).source k x) b = + if k = 0 then tensorLabel x false else tensorLabel x b := by + unfold tensorLabel + rw [(tensorParameter X).map_source] + cases k with + | zero => rfl + | succ k => rfl + +lemma tensorLabel_target (k : ℕ) (x : (tensorFunctor.obj X).Cell) (b : Bool) : + tensorLabel ((tensorFunctor.obj X).target k x) b = + if k = 0 then tensorLabel x true else tensorLabel x b := by + unfold tensorLabel + rw [(tensorParameter X).map_target] + cases k with + | zero => rfl + | succ k => rfl + +lemma tensorLabel_comp (k : ℕ) (x y : (tensorFunctor.obj X).Cell) + (h : (tensorFunctor.obj X).target k x = (tensorFunctor.obj X).source k y) : + tensorLabel ((tensorFunctor.obj X).comp k x y h) false = tensorLabel x false ∧ + tensorLabel ((tensorFunctor.obj X).comp k x y h) true = tensorLabel y true := by + have hs := congrArg (fun z => tensorLabel z false) + ((tensorFunctor.obj X).source_comp_le 0 k (Nat.zero_le _) x y h) + have ht := congrArg (fun z => tensorLabel z true) + ((tensorFunctor.obj X).target_comp_le 0 k (Nat.zero_le _) x y h) + simpa only [tensorLabel_source,tensorLabel_target,ite_self] using And.intro hs ht + +lemma tensorLabel_comp_stationary (k : ℕ) (x y : (tensorFunctor.obj X).Cell) + (h : (tensorFunctor.obj X).target k x = (tensorFunctor.obj X).source k y) (a : ℤ) + (hs : tensorLabel ((tensorFunctor.obj X).comp k x y h) false = a) + (ht : tensorLabel ((tensorFunctor.obj X).comp k x y h) true = a) : + (∀ b, tensorLabel x b = a) ∧ ∀ b, tensorLabel y b = a := by + obtain ⟨h₀,h₁⟩ := tensorLabel_comp k x y h + have hx : tensorLabel x false = a := h₀.symm.trans hs + have hy : tensorLabel y true = a := h₁.symm.trans ht + have hm (b : Bool) := congrArg (fun z => tensorLabel z b) h + simp only [tensorLabel_source,tensorLabel_target] at hm + have hx' : tensorLabel x true = a := by + by_cases hk : k = 0 + · have hm' := hm false + rw [ite_eq_left hk,ite_eq_left hk] at hm' + have hxle := tensorLabel_monotone x + have hyle := tensorLabel_monotone y + omega + · have hm' := hm true + simpa only [ite_eq_right hk,hy] using hm' + have hy' : tensorLabel y false = a := by + by_cases hk : k = 0 + · have hm' := hm false + rw [ite_eq_left hk,ite_eq_left hk,hx'] at hm' + exact hm'.symm + · have hm' := hm false + simpa only [ite_eq_right hk,hx] using hm'.symm + constructor <;> intro b <;> cases b + · exact hx + · exact hx' + · exact hy' + · exact hy + +lemma tensor_zero_faces_are_endpoints (z : (tensorFunctor.obj X).Cell) : + (∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).source 0 z = ((tensorEndpoint a).app X).map x) ∧ + ∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).target 0 z = ((tensorEndpoint a).app X).map x := by + apply (tensorPresentation X).cells_induction (fun z => + (∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).source 0 z = ((tensorEndpoint a).app X).map x) ∧ + ∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).target 0 z = ((tensorEndpoint a).app X).map x) + · rintro ⟨n,x,t⟩ + have hh (b : Bool) : ∃ (a : Bool) (q : X.Cell), + (tensorFunctor.obj X).face 0 b ((tensorPresentation X).generator ⟨n,x,t⟩) = + ((tensorEndpoint a).app X).map q := by + obtain ⟨a,ha⟩ := endpoint_of_stationary_interval (truncate 0 b t) (by rfl) + refine ⟨a,(GlobeComplex.lift x.val x.property).map (project (truncate 0 b t)),?_⟩ + change (tensorPresentation X).category.face 0 b ((generatorCylinder n x).map t) = _ + rw [← (generatorCylinder n x).map_face] + have hf : (K n).nu.face 0 b t = truncate 0 b t := by cases b <;> rfl + rw [hf] + conv_lhs => rw [ha] + exact generatorCylinder_endpoint n x a _ + exact ⟨hh false,hh true⟩ + · intro k z hz + change (∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).source 0 ((tensorFunctor.obj X).source k z) = ((tensorEndpoint a).app X).map x) ∧ + ∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).target 0 ((tensorFunctor.obj X).source k z) = ((tensorEndpoint a).app X).map x + constructor + · erw [(tensorFunctor.obj X).source_source,Nat.min_eq_left (Nat.zero_le _)] + exact hz.1 + · cases k with + | zero => + erw [(tensorFunctor.obj X).target_source_self] + exact hz.1 + | succ k => + erw [(tensorFunctor.obj X).target_source] + simpa only [Nat.zero_lt_succ,ite_true] using hz.2 + · intro k z hz + change (∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).source 0 ((tensorFunctor.obj X).target k z) = ((tensorEndpoint a).app X).map x) ∧ + ∃ (a : Bool) (x : X.Cell), (tensorFunctor.obj X).target 0 ((tensorFunctor.obj X).target k z) = ((tensorEndpoint a).app X).map x + constructor + · cases k with + | zero => + erw [(tensorFunctor.obj X).source_target_self] + exact hz.2 + | succ k => + erw [(tensorFunctor.obj X).source_target] + simpa only [Nat.zero_lt_succ,ite_true] using hz.1 + · erw [(tensorFunctor.obj X).target_target,Nat.min_eq_left (Nat.zero_le _)] + exact hz.2 + · intro k x y h hx hy + change (∃ (a : Bool) (t : X.Cell), (tensorFunctor.obj X).source 0 ((tensorFunctor.obj X).comp k x y h) = ((tensorEndpoint a).app X).map t) ∧ + ∃ (a : Bool) (t : X.Cell), (tensorFunctor.obj X).target 0 ((tensorFunctor.obj X).comp k x y h) = ((tensorEndpoint a).app X).map t + constructor + · erw [(tensorFunctor.obj X).source_comp_le 0 k (Nat.zero_le _)] + exact hx.1 + · erw [(tensorFunctor.obj X).target_comp_le 0 k (Nat.zero_le _)] + exact hy.2 + +lemma tensorEndpoint_injective (a : Bool) : + Function.Injective (((tensorEndpoint a).app X).map) := by + intro x y h + have hp (t : X.Cell) : (tensorProjection.app X).map (((tensorEndpoint a).app X).map t) = t := + congrArg (fun F : X ⟶ X => F.map t) (congrArg (fun η => η.app X) (tensorEndpoint_projection a)) + have hh := congrArg (tensorProjection.app X).map h + simpa only [hp] using hh + +lemma tensorEndpoint_eq_iff (a b : Bool) (x y : X.Cell) : + ((tensorEndpoint a).app X).map x = ((tensorEndpoint b).app X).map y ↔ a = b ∧ x = y := by + constructor + · intro h + have hh := congrArg (fun z => tensorLabel z false) h + rw [tensorLabel_endpoint,tensorLabel_endpoint] at hh + have hab : a = b := by cases a <;> cases b <;> first | rfl | norm_num at hh + subst b + exact ⟨rfl,tensorEndpoint_injective a h⟩ + · rintro ⟨rfl,rfl⟩ + rfl + +lemma tensor_object_endpoint (z : (tensorFunctor.obj X).Cell) + (hz : (tensorFunctor.obj X).source 0 z = z) : + ∃! ax : Bool × X.Objects, z = ((tensorEndpoint ax.1).app X).map ax.2.val := by + obtain ⟨a,x,hx⟩ := (tensor_zero_faces_are_endpoints z).1 + have he : z = ((tensorEndpoint a).app X).map x := hz.symm.trans hx + have hxb : X.source 0 x = x := by + apply tensorEndpoint_injective a + change ((tensorEndpoint a).app X).map (((𝟭 OmegaCategory).obj X).source 0 x) = _ + rw [((tensorEndpoint a).app X).map_source,← he,hz] + refine ⟨⟨a,⟨x,hxb⟩⟩,he,?_⟩ + rintro ⟨b,y⟩ hy + have hh := (tensorEndpoint_eq_iff b a y.val x).mp (hy.symm.trans he) + exact Prod.ext hh.1 (Subtype.ext hh.2) + +lemma tensor_object_reconstruct (z : (tensorFunctor.obj X).Cell) + (hz : (tensorFunctor.obj X).source 0 z = z) (a : Bool) + (ha : tensorLabel z false = if a then 1 else 0) : + z = ((tensorEndpoint a).app X).map ((tensorProjection.app X).map z) := by + obtain ⟨⟨b,x⟩,hx,_⟩ := tensor_object_endpoint z hz + have he := ha + rw [hx,tensorLabel_endpoint] at he + have hab : a = b := by cases a <;> cases b <;> first | rfl | norm_num at he + subst b + have hp := congrArg (fun F : X ⟶ X => F.map x.val) + (congrArg (fun η => η.app X) (tensorEndpoint_projection a)) + change (tensorProjection.app X).map (((tensorEndpoint a).app X).map x.val) = x.val at hp + rw [hx,hp] + +lemma generatorCylinder_stationary (n : ℕ) (x : X.Cells n) (z : Table (K.{u} n)) (a : Bool) + (hs : intervalLabel z false = if a then 1 else 0) + (ht : intervalLabel z true = if a then 1 else 0) : + (tensorPresentation X).generator ⟨n,x,z⟩ = + ((tensorEndpoint a).app X).map ((tensorProjection.app X).map + ((tensorPresentation X).generator ⟨n,x,z⟩)) := by + obtain ⟨b,hb⟩ := endpoint_of_stationary_interval z (ht.trans hs.symm) + have he := hs + change z = atEnd b (project z) at hb + rw [hb,intervalLabel_end] at he + have hab : a = b := by cases a <;> cases b <;> first | rfl | norm_num at he + subst b + erw [tensorProjection_generator X n x z] + change (generatorCylinder n x).map z = _ + conv_lhs => rw [hb] + exact generatorCylinder_endpoint n x a _ + +lemma tensor_stationary_reconstruct (z : (tensorFunctor.obj X).Cell) (a : Bool) + (hs : tensorLabel z false = if a then 1 else 0) + (ht : tensorLabel z true = if a then 1 else 0) : + z = ((tensorEndpoint a).app X).map ((tensorProjection.app X).map z) := by + let Q (z : (tensorFunctor.obj X).Cell) := ∀ a : Bool, + tensorLabel z false = (if a then 1 else 0) → tensorLabel z true = (if a then 1 else 0) → + z = ((tensorEndpoint a).app X).map ((tensorProjection.app X).map z) + suffices hh : Q z from hh a hs ht + apply (tensorPresentation X).cells_induction Q + · rintro ⟨n,x,z⟩ a hs ht + rw [tensorLabel_generator n x z false] at hs + rw [tensorLabel_generator n x z true] at ht + exact generatorCylinder_stationary n x z a hs ht + · intro k x ih a hs ht + change tensorLabel ((tensorFunctor.obj X).source k x) false = _ at hs + change tensorLabel ((tensorFunctor.obj X).source k x) true = _ at ht + cases k with + | zero => exact tensor_object_reconstruct _ ((tensorFunctor.obj X).source_source_self 0 x) a hs + | succ k => + erw [tensorLabel_source] at hs ht + simp only [Nat.succ_ne_zero,ite_false] at hs ht + have hh := congrArg ((tensorFunctor.obj X).source (k+1)) (ih a hs ht) + erw [← ((tensorEndpoint a).app X).map_source,← (tensorProjection.app X).map_source] at hh + exact hh + · intro k x ih a hs ht + change tensorLabel ((tensorFunctor.obj X).target k x) false = _ at hs + change tensorLabel ((tensorFunctor.obj X).target k x) true = _ at ht + cases k with + | zero => exact tensor_object_reconstruct _ ((tensorFunctor.obj X).source_target_self 0 x) a hs + | succ k => + erw [tensorLabel_target] at hs ht + simp only [Nat.succ_ne_zero,ite_false] at hs ht + have hh := congrArg ((tensorFunctor.obj X).target (k+1)) (ih a hs ht) + erw [← ((tensorEndpoint a).app X).map_target,← (tensorProjection.app X).map_target] at hh + exact hh + · intro k x y h ihx ihy a hs ht + obtain ⟨hx,hy⟩ := tensorLabel_comp_stationary k x y h _ hs ht + have hxx := ihx a (hx false) (hx true) + have hyy := ihy a (hy false) (hy true) + let e : tensorFunctor.obj X ⟶ tensorFunctor.obj X := tensorProjection.app X ≫ (tensorEndpoint a).app X + change (tensorFunctor.obj X).comp k x y h = e.map ((tensorFunctor.obj X).comp k x y h) + rw [e.map_comp k x y h (e.map_composable h)] + congr 1 +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex + +structure PositiveAcyclic (M : DirectedComplex.{u}) : Prop where + augmentation_nonneg : ∀ x ∈ M.positive 0, 0 ≤ M.augmentation x + augmentation_zero : ∀ x ∈ M.positive 0, M.augmentation x = 0 → x = 0 + cycle_zero : ∀ p (x : M.Chain (p+1)), x ∈ M.positive (p+1) → M.d p x = 0 → x = 0 + +namespace CylinderTables +open Table +variable {M : DirectedComplex.{u}} + +def side (t : Table M.cylinder) (a : Bool) : (p : ℕ) → Bool → M.Chain p + | 0, b => if a then (t.row 0 b).2 else (t.row 0 b).1 + | p+1, b => if a then (t.row (p+1) b).2.1 else (t.row (p+1) b).1 + +def cross (t : Table M.cylinder) (p : ℕ) (b : Bool) : M.Chain p := + (t.row (p+1) b).2.2 + +def project (t : Table M.cylinder) : Table M := M.cylinderProjection.table t + +def label (t : Table M.cylinder) (b : Bool) : ℤ := M.augmentation (side t true 0 b) + +lemma project_row (t : Table M.cylinder) (p : ℕ) (b : Bool) : + (project t).row p b = side t false p b + side t true p b := by cases p <;> rfl + +lemma side_positive (t : Table M.cylinder) (a : Bool) (p : ℕ) (b : Bool) : + side t a p b ∈ M.positive p := by + cases p with + | zero => cases a; exact (t.positive 0 b).1; exact (t.positive 0 b).2 + | succ p => cases a; exact (t.positive (p+1) b).1; exact (t.positive (p+1) b).2.1 + +lemma cross_positive (t : Table M.cylinder) (p : ℕ) (b : Bool) : + cross t p b ∈ M.positive p := (t.positive (p+1) b).2.2 + +lemma cross_boundary (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (cross t (p+1) b) = cross t p true - cross t p false := + congrArg (fun x : M.cylinder.Chain (p+1) => x.2.2) (t.boundary (p+1) b) + +lemma left_boundary (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (side t false (p+1) b) - (-1 : ℤ)^p • cross t p b = + side t false p true - side t false p false := by + cases p with + | zero => simpa [side,cross,cylinderDifferential] using congrArg Prod.fst (t.boundary 0 b) + | succ p => exact congrArg Prod.fst (t.boundary (p+1) b) + +lemma right_boundary (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (side t true (p+1) b) + (-1 : ℤ)^p • cross t p b = + side t true p true - side t true p false := by + cases p with + | zero => simpa [side,cross,cylinderDifferential] using congrArg Prod.snd (t.boundary 0 b) + | succ p => exact congrArg (fun x : M.cylinder.Chain (p+1) => x.2.1) (t.boundary (p+1) b) + +lemma augmentation_sides (t : Table M.cylinder) (b : Bool) : + M.augmentation (side t false 0 b) + M.augmentation (side t true 0 b) = 1 := + t.augmentation b + +lemma augmentation_cross (t : Table M.cylinder) (b : Bool) : + M.augmentation (cross t 0 b) = label t true - label t false := by + have h := congrArg M.augmentation (right_boundary t 0 b) + simpa only [map_add,map_smul,pow_zero,one_smul,M.augmentation_d,zero_add,map_sub,label] using h + +lemma label_truncate (k : ℕ) (e : Bool) (t : Table M.cylinder) (b : Bool) : + label (truncate k e t) b = if k = 0 then label t e else label t b := by + cases k with + | zero => rfl + | succ k => rfl + +lemma label_comp (k : ℕ) (x y : Table M.cylinder) + (h : truncate k true x = truncate k false y) : + label (comp k x y h) false = label x false ∧ + label (comp k x y h) true = label y true := by + have hs := congrArg (fun z : Table M.cylinder => label z false) (source_comp_le 0 k (Nat.zero_le _) x y h) + have ht := congrArg (fun z : Table M.cylinder => label z true) (target_comp_le 0 k (Nat.zero_le _) x y h) + simpa only [label_truncate,ite_self] using And.intro hs ht + +lemma label_endpoint (a b : Bool) (x : Table M) : + label ((M.cylinderEndpoint a).table x) b = if a then 1 else 0 := by + cases a + · exact M.augmentation.map_zero + · exact x.augmentation b + +lemma label_cylinder_map {N : DirectedComplex.{v}} (f : Hom M N) (x : Table M.cylinder) (b : Bool) : + label (f.cylinder.table x) b = label x b := f.map_augmentation (side x true 0 b) + +variable (hM : PositiveAcyclic M) +include hM + +lemma label_values (t : Table M.cylinder) (b : Bool) : + label t b = 0 ∨ label t b = 1 := by + have h := augmentation_sides t b + have h₀ := hM.augmentation_nonneg _ (side_positive t false 0 b) + have h₁ := hM.augmentation_nonneg _ (side_positive t true 0 b) + dsimp [label] + omega + +lemma label_monotone (t : Table M.cylinder) : label t false ≤ label t true := by + have h := hM.augmentation_nonneg _ (cross_positive t 0 false) + rw [augmentation_cross] at h + omega + +lemma cross_zero_of_stationary (t : Table M.cylinder) (h : label t true = label t false) : + ∀ p b, cross t p b = 0 := by + intro p b + induction p generalizing b with + | zero => + exact hM.augmentation_zero _ (cross_positive t 0 b) (by rw [augmentation_cross,h,sub_self]) + | succ p ih => + exact hM.cycle_zero p _ (cross_positive t (p+1) b) (by rw [cross_boundary,ih true,ih false,sub_self]) + +lemma side_zero_of_empty (t : Table M.cylinder) (a : Bool) + (hc : ∀ p b, cross t p b = 0) (hs : ∀ b, side t a 0 b = 0) : + ∀ p b, side t a p b = 0 := by + intro p b + induction p generalizing b with + | zero => exact hs b + | succ p ih => + apply hM.cycle_zero p _ (side_positive t a (p+1) b) + cases a with + | false => simpa only [hc,smul_zero,ih,sub_zero,sub_self] using left_boundary t p b + | true => simpa only [hc,smul_zero,ih,add_zero,sub_self] using right_boundary t p b + +lemma stationary_reconstruct (t : Table M.cylinder) (a : Bool) + (hs : label t false = if a then 1 else 0) + (ht : label t true = if a then 1 else 0) : + t = (M.cylinderEndpoint a).table (project t) := by + have hc := cross_zero_of_stationary hM t (ht.trans hs.symm) + have he : ∀ p b, side t (!a) p b = 0 := by + apply side_zero_of_empty hM t (!a) hc + intro b + apply hM.augmentation_zero _ (side_positive t (!a) 0 b) + have hh : label t b = if a then 1 else 0 := by cases b; exact hs; exact ht + have haug := augmentation_sides t b + cases a <;> dsimp [label] at hh <;> simp only [Bool.not_false,Bool.not_true] at haug ⊢ <;> omega + ext p b + change t.row p b = M.cylinderEndpointMap a p ((project t).row p b) + rw [project_row] + cases a + · have hz := he p b + change side t true p b = 0 at hz + rw [hz,add_zero] + cases p with + | zero => exact Prod.ext rfl hz + | succ p => exact Prod.ext rfl (Prod.ext hz (hc p b)) + · have hz := he p b + change side t false p b = 0 at hz + rw [hz,zero_add] + cases p with + | zero => exact Prod.ext hz rfl + | succ p => exact Prod.ext hz (Prod.ext rfl (hc p b)) + +lemma endpoint_or_crossing (t : Table M.cylinder) : + (∃ a, t = (M.cylinderEndpoint a).table (project t)) ∨ + (label t false = 0 ∧ label t true = 1) := by + have hs := label_values hM t false + have ht := label_values hM t true + have hm := label_monotone hM t + by_cases h : label t false = label t true + · left + rcases hs with hs | hs + · exact ⟨false,stationary_reconstruct hM t false hs (h.symm.trans hs)⟩ + · exact ⟨true,stationary_reconstruct hM t true hs (h.symm.trans hs)⟩ + · right + constructor <;> omega + +omit hM in +lemma crossing_augmentation (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (b : Bool) : + M.augmentation (cross t 0 b) = 1 := by rw [augmentation_cross,hs,ht,sub_zero] + +lemma crossing_starts_ends (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) : + side t true 0 false = 0 ∧ side t false 0 true = 0 := by + constructor + · exact hM.augmentation_zero _ (side_positive t true 0 false) hs + · apply hM.augmentation_zero _ (side_positive t false 0 true) + have h := augmentation_sides t true + change M.augmentation (side t false 0 true) + label t true = 1 at h + omega + +end CylinderTables +end Thomason.DirectedComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains +open DirectedComplex +variable (E : Type u) [PartialOrder E] + +theorem complexPositiveAcyclic : PositiveAcyclic (complex E) where + augmentation_nonneg x hx := by + change 0 ≤ emptyCoefficient (boundary x.val) + rw [augmentation_eq_sum x.property,← chainMass_eq_sum] + exact chainMass_nonneg hx + augmentation_zero x hx ha := Subtype.ext (positive_augmentation_zero x.property hx ha) + cycle_zero p x hx hd := Subtype.ext (positive_cycle_zero_partial x.property hx (congrArg Subtype.val hd)) + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {M : DirectedComplex.{u}} + +lemma chainComparison_label (z : (tensorFunctor.obj M.nu).Cell) (b : Bool) : + CylinderTables.label ((chainComparison M).map z) b = tensorLabel z b := by + suffices h : ∀ b, CylinderTables.label ((chainComparison M).map z) b = tensorLabel z b from h b + apply (tensorPresentation M.nu).cells_induction (fun z => + ∀ b, CylinderTables.label ((chainComparison M).map z) b = tensorLabel z b) + · rintro ⟨n,x,t⟩ b + erw [chainComparison_generator,tensorLabel_generator] + change CylinderTables.label ((tableMap n x.val).cylinder.table t) b = intervalLabel t b + exact CylinderTables.label_cylinder_map (tableMap n x.val) t b + · intro k x ih b + change CylinderTables.label ((chainComparison M).map ((tensorFunctor.obj M.nu).source k x)) b = + tensorLabel ((tensorFunctor.obj M.nu).source k x) b + erw [(chainComparison M).map_source,tensorLabel_source] + change CylinderTables.label (truncate k false ((chainComparison M).map x)) b = _ + erw [CylinderTables.label_truncate,ih,ih] + · intro k x ih b + change CylinderTables.label ((chainComparison M).map ((tensorFunctor.obj M.nu).target k x)) b = + tensorLabel ((tensorFunctor.obj M.nu).target k x) b + erw [(chainComparison M).map_target,tensorLabel_target] + change CylinderTables.label (truncate k true ((chainComparison M).map x)) b = _ + erw [CylinderTables.label_truncate,ih,ih] + · intro k x y h ihx ihy b + change CylinderTables.label ((chainComparison M).map ((tensorFunctor.obj M.nu).comp k x y h)) b = _ + rw [(chainComparison M).map_comp k x y h ((chainComparison M).map_composable h)] + have ht := CylinderTables.label_comp k ((chainComparison M).map x) ((chainComparison M).map y) + ((chainComparison M).map_composable h) + have hs := tensorLabel_comp k x y h + cases b + · exact ht.1.trans ((ihx false).trans hs.1.symm) + · exact ht.2.trans ((ihy true).trans hs.2.symm) + +lemma chainComparison_project (z : (tensorFunctor.obj M.nu).Cell) : + CylinderTables.project ((chainComparison M).map z) = (tensorProjection.app M.nu).map z := + congrArg (fun F : tensorFunctor.obj M.nu ⟶ M.nu => F.map z) (chainComparison_projection M) + +lemma chainComparison_endpoint_apply (a : Bool) (x : Table M) : + (chainComparison M).map (((tensorEndpoint a).app M.nu).map x) = (M.cylinderEndpoint a).table x := + congrArg (fun F : M.nu ⟶ M.cylinder.nu => F.map x) (chainComparison_endpoint M a) + +lemma chainComparison_endpoint_fiber (z : (tensorFunctor.obj M.nu).Cell) + (a : Bool) (x : Table M) : + (chainComparison M).map z = (M.cylinderEndpoint a).table x ↔ + z = ((tensorEndpoint a).app M.nu).map x := by + constructor + · intro hz + have hlabel (b : Bool) : tensorLabel z b = if a then 1 else 0 := by + rw [← chainComparison_label,hz,CylinderTables.label_endpoint] + have hp : (tensorProjection.app M.nu).map z = x := by + rw [← chainComparison_project,hz] + exact congrArg (fun F : M.nu ⟶ M.nu => F.map x) + (show (M.cylinderEndpoint a).nu ≫ M.cylinderProjection.nu = 𝟙 M.nu from + congrArg Hom.nu (M.cylinderProjection_endpoint a)) + exact (tensor_stationary_reconstruct z a (hlabel false) (hlabel true)).trans + (congrArg ((tensorEndpoint a).app M.nu).map hp) + · rintro rfl + exact chainComparison_endpoint_apply a x + +lemma tensor_endpoint_or_crossing {X : OmegaCategory.{u}} (z : (tensorFunctor.obj X).Cell) : + (∃ a, z = ((tensorEndpoint a).app X).map ((tensorProjection.app X).map z)) ∨ + (tensorLabel z false = 0 ∧ tensorLabel z true = 1) := by + have hs := tensorLabel_values z false + have ht := tensorLabel_values z true + have hm := tensorLabel_monotone z + by_cases h : tensorLabel z false = tensorLabel z true + · left + rcases hs with hs | hs + · exact ⟨false,tensor_stationary_reconstruct z false hs (h.symm.trans hs)⟩ + · exact ⟨true,tensor_stationary_reconstruct z true hs (h.symm.trans hs)⟩ + · right + constructor <;> omega + +lemma chainComparison_injective_of_crossing + (hi : ∀ (x y : (tensorFunctor.obj M.nu).Cell), + tensorLabel x false = 0 → tensorLabel x true = 1 → + tensorLabel y false = 0 → tensorLabel y true = 1 → + (chainComparison M).map x = (chainComparison M).map y → x = y) : + Function.Injective (chainComparison M).map := by + intro x y h + rcases tensor_endpoint_or_crossing x with ⟨a,ha⟩ | hc + · have hxe : (chainComparison M).map x = + (M.cylinderEndpoint a).table ((tensorProjection.app M.nu).map x) := + (chainComparison_endpoint_fiber x a _).mpr ha + exact ha.trans ((chainComparison_endpoint_fiber y a _).mp (h.symm.trans hxe)).symm + · have hy (b : Bool) : tensorLabel y b = tensorLabel x b := by + rw [← chainComparison_label,← chainComparison_label,h] + exact hi x y hc.1 hc.2 ((hy false).trans hc.1) ((hy true).trans hc.2) h + +lemma chainComparison_surjective_of_crossing (hM : PositiveAcyclic M) + (hs : ∀ (t : Table M.cylinder), CylinderTables.label t false = 0 → + CylinderTables.label t true = 1 → ∃ x, (chainComparison M).map x = t) : + Function.Surjective (chainComparison M).map := by + intro t + rcases CylinderTables.endpoint_or_crossing hM t with ⟨a,ha⟩ | hc + · exact ⟨((tensorEndpoint a).app M.nu).map (CylinderTables.project t), + (chainComparison_endpoint_apply a _).trans ha.symm⟩ + · exact hs t hc.1 hc.2 + +lemma chainComparison_objects_bijective (hM : PositiveAcyclic M) : + Function.Bijective (chainComparison M).objects := by + constructor + · intro x y h + apply Subtype.ext + have he : (chainComparison M).map x.val = (chainComparison M).map y.val := congrArg Subtype.val h + obtain ⟨⟨a,q⟩,hx,_⟩ := tensor_object_endpoint x.val x.property + exact hx.trans ((chainComparison_endpoint_fiber y.val a q.val).mp + (he.symm.trans ((chainComparison_endpoint_fiber x.val a q.val).mpr hx))).symm + · intro t + have hzero : CylinderTables.label t.val false = CylinderTables.label t.val true := by + have hh := congrArg (fun z => CylinderTables.label z true) t.property + change CylinderTables.label (truncate 0 false t.val) true = _ at hh + erw [CylinderTables.label_truncate] at hh + simpa only [ite_true] using hh + have hc := CylinderTables.label_values hM t.val false + have hex : ∃ a : Bool, t.val = (M.cylinderEndpoint a).table (CylinderTables.project t.val) := by + rcases hc with hc | hc + · exact ⟨false,CylinderTables.stationary_reconstruct hM t.val false hc (hzero.symm.trans hc)⟩ + · exact ⟨true,CylinderTables.stationary_reconstruct hM t.val true hc (hzero.symm.trans hc)⟩ + obtain ⟨a,ha⟩ := hex + let q := M.cylinderProjection.nu.objects t + refine ⟨((tensorEndpoint a).app M.nu).objects q,Subtype.ext ?_⟩ + exact (chainComparison_endpoint_apply a q.val).trans ha.symm +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.CylinderTables +open Table +variable {M : DirectedComplex.{u}} + +lemma side_of_row_zero (t : Table M.cylinder) (a : Bool) (p : ℕ) (b : Bool) + (h : t.row p b = 0) : side t a p b = 0 := by + cases p with + | zero => cases a; exact congrArg Prod.fst h; exact congrArg Prod.snd h + | succ p => cases a; exact congrArg Prod.fst h; exact congrArg (fun x => x.2.1) h + +lemma cross_of_row_zero (t : Table M.cylinder) (p : ℕ) (b : Bool) + (h : t.row (p+1) b = 0) : cross t p b = 0 := congrArg (fun x => x.2.2) h + +def crossingProfile (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) : + Table M where + row := cross t + positive := cross_positive t + boundary := cross_boundary t + augmentation := crossing_augmentation t hs ht + bounded := by + obtain ⟨n,hn⟩ := t.bounded + exact ⟨n,fun p hp b => cross_of_row_zero t p b (hn (p+1) (by omega) b)⟩ + +def leftProfileRow (t : Table M.cylinder) (p : ℕ) (b : Bool) : M.Chain p := + side t false p b + if Even p then (if b then cross t p b else 0) else (if b then 0 else cross t p b) + +def rightProfileRow (t : Table M.cylinder) (p : ℕ) (b : Bool) : M.Chain p := + side t true p b + if Even p then (if b then 0 else cross t p b) else (if b then cross t p b else 0) + +lemma left_d (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (side t false (p+1) b) = side t false p true - side t false p false + (-1 : ℤ)^p • cross t p b := + eq_add_of_sub_eq (left_boundary t p b) + +lemma right_d (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (side t true (p+1) b) = side t true p true - side t true p false - (-1 : ℤ)^p • cross t p b := + eq_sub_of_add_eq (right_boundary t p b) + +lemma leftProfileRow_boundary (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (leftProfileRow t (p+1) b) = leftProfileRow t p true - leftProfileRow t p false := by + unfold leftProfileRow + simp only [Nat.even_add_one] + by_cases hp : Even p <;> cases b <;> + simp only [hp,not_true_eq_false,not_false_eq_true,ite_true,ite_false,Bool.false_eq_true, + map_add,map_zero,left_d,cross_boundary,neg_one_pow_eq_ite,one_smul,neg_smul] <;> abel + +lemma rightProfileRow_boundary (t : Table M.cylinder) (p : ℕ) (b : Bool) : + M.d p (rightProfileRow t (p+1) b) = rightProfileRow t p true - rightProfileRow t p false := by + unfold rightProfileRow + simp only [Nat.even_add_one] + by_cases hp : Even p <;> cases b <;> + simp only [hp,not_true_eq_false,not_false_eq_true,ite_true,ite_false,Bool.false_eq_true, + map_add,map_zero,right_d,cross_boundary,neg_one_pow_eq_ite,one_smul,neg_smul] <;> abel + +def leftProfile (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) : Table M where + row := leftProfileRow t + positive p b := by + apply (M.positive p).add_mem (side_positive t false p b) + split_ifs <;> first | exact cross_positive t p b | exact (M.positive p).zero_mem + boundary := leftProfileRow_boundary t + augmentation b := by + have h := augmentation_sides t b + have hc := crossing_augmentation t hs ht b + cases b <;> + simp only [leftProfileRow,Even.zero,ite_true,Bool.false_eq_true,ite_false,map_add,map_zero] + · change M.augmentation (side t false 0 false) + label t false = 1 at h + omega + · change M.augmentation (side t false 0 true) + label t true = 1 at h + omega + bounded := by + obtain ⟨n,hn⟩ := t.bounded + refine ⟨n,fun p hp b => ?_⟩ + have ha := side_of_row_zero t false p b (hn p hp b) + have hc := cross_of_row_zero t p b (hn (p+1) (by omega) b) + simp only [leftProfileRow,ha,hc,ite_self,add_zero] + +def rightProfile (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) : Table M where + row := rightProfileRow t + positive p b := by + apply (M.positive p).add_mem (side_positive t true p b) + split_ifs <;> first | exact cross_positive t p b | exact (M.positive p).zero_mem + boundary := rightProfileRow_boundary t + augmentation b := by + have hc := crossing_augmentation t hs ht b + cases b <;> + simp only [rightProfileRow,Even.zero,ite_true,Bool.false_eq_true,ite_false,map_add,map_zero] + · change M.augmentation (side t true 0 false) = 0 at hs + omega + · simpa only [label,add_zero] using ht + bounded := by + obtain ⟨n,hn⟩ := t.bounded + refine ⟨n,fun p hp b => ?_⟩ + have ha := side_of_row_zero t true p b (hn p hp b) + have hc := cross_of_row_zero t p b (hn (p+1) (by omega) b) + simp only [rightProfileRow,ha,hc,ite_self,add_zero] + +lemma side_cylinder_map {N : DirectedComplex.{v}} (f : Hom M N) (t : Table M.cylinder) + (a : Bool) (p : ℕ) (b : Bool) : + side (f.cylinder.table t) a p b = f.map p (side t a p b) := by + cases p <;> cases a <;> rfl + +lemma cross_cylinder_map {N : DirectedComplex.{v}} (f : Hom M N) (t : Table M.cylinder) + (p : ℕ) (b : Bool) : cross (f.cylinder.table t) p b = f.map p (cross t p b) := rfl + +lemma crossingProfile_natural {N : DirectedComplex.{v}} (f : Hom M N) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hs' : label (f.cylinder.table t) false = 0) (ht' : label (f.cylinder.table t) true = 1) : + crossingProfile (f.cylinder.table t) hs' ht' = f.table (crossingProfile t hs ht) := rfl + +lemma leftProfile_natural {N : DirectedComplex.{v}} (f : Hom M N) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hs' : label (f.cylinder.table t) false = 0) (ht' : label (f.cylinder.table t) true = 1) : + leftProfile (f.cylinder.table t) hs' ht' = f.table (leftProfile t hs ht) := by + ext p b + change leftProfileRow (f.cylinder.table t) p b = f.map p (leftProfileRow t p b) + simp only [leftProfileRow,side_cylinder_map,cross_cylinder_map,map_add] + split_ifs <;> simp only [map_zero] + +lemma rightProfile_natural {N : DirectedComplex.{v}} (f : Hom M N) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hs' : label (f.cylinder.table t) false = 0) (ht' : label (f.cylinder.table t) true = 1) : + rightProfile (f.cylinder.table t) hs' ht' = f.table (rightProfile t hs ht) := by + ext p b + change rightProfileRow (f.cylinder.table t) p b = f.map p (rightProfileRow t p b) + simp only [rightProfileRow,side_cylinder_map,cross_cylinder_map,map_add] + split_ifs <;> simp only [map_zero] + +lemma project_profiles (t : Table M.cylinder) (hs : label t false = 0) (ht : label t true = 1) + (p : ℕ) (b : Bool) : + (project t).row p b = (leftProfile t hs ht).row p b + (rightProfile t hs ht).row p b - + (crossingProfile t hs ht).row p b := by + rw [project_row] + change side t false p b + side t true p b = leftProfileRow t p b + rightProfileRow t p b - cross t p b + unfold leftProfileRow rightProfileRow + split_ifs <;> abel + +lemma crossing_profiles_ext {t s : Table M.cylinder} + (ht₀ : label t false = 0) (ht₁ : label t true = 1) + (hs₀ : label s false = 0) (hs₁ : label s true = 1) + (hcross : crossingProfile t ht₀ ht₁ = crossingProfile s hs₀ hs₁) + (hleft : leftProfile t ht₀ ht₁ = leftProfile s hs₀ hs₁) + (hright : rightProfile t ht₀ ht₁ = rightProfile s hs₀ hs₁) : t = s := by + have hc (p : ℕ) (b : Bool) : cross t p b = cross s p b := + congrArg (fun x : Table M => x.row p b) hcross + have hl (p : ℕ) (b : Bool) : side t false p b = side s false p b := by + have h := congrArg (fun x : Table M => x.row p b) hleft + change leftProfileRow t p b = leftProfileRow s p b at h + unfold leftProfileRow at h + rw [hc] at h + exact add_right_cancel h + have hr (p : ℕ) (b : Bool) : side t true p b = side s true p b := by + have h := congrArg (fun x : Table M => x.row p b) hright + change rightProfileRow t p b = rightProfileRow s p b at h + unfold rightProfileRow at h + rw [hc] at h + exact add_right_cancel h + ext p b + cases p with + | zero => exact Prod.ext (hl 0 b) (hr 0 b) + | succ p => exact Prod.ext (hl (p+1) b) (Prod.ext (hr (p+1) b) (hc p b)) +end Thomason.DirectedComplex.CylinderTables + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/CylinderWeights.lean b/lean/OAI/CategoryTheory/Thomason/CylinderWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4c86c1d816be360f242ceff0cfb11e76fcd1128 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/CylinderWeights.lean @@ -0,0 +1,771 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.IntervalCategories + +namespace OAI + +/-! Cylinder Weights. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {Y Z W : OmegaCategory.{u}} + +lemma face_false (n : ℕ) (x : Cell Y) : face n false x = ofMap (eval n x) := by + unfold face + rw [eval_eq_restrict (bounded_bound x) n] + +lemma bounded_iff_fixed (n : ℕ) (x : Cell Y) : Bounded n x ↔ (omegaCategory Y).source n x = x := by + change ofMap (eval n x) = x ↔ face n false x = x + rw [face_false] + +lemma restrictCylinder_post {n m : ℕ} (F : OmegaCategory.Functor (K.{u} n).nu Y) + (P : OmegaCategory.Functor Y Z) (b : Bool) : + restrictCylinder m b (OmegaCategory.Functor.comp F P) = + OmegaCategory.Functor.comp (restrictCylinder m b F) P := rfl + +def mapCell (P : OmegaCategory.Functor Y Z) (x : Cell Y) : Cell Z := + ⟨fun n => OmegaCategory.Functor.comp (eval n x) P, bound x, fun n => by + change OmegaCategory.Functor.comp (eval n x) P = + restrictCylinder n false (OmegaCategory.Functor.comp (eval (bound x) x) P) + rw [eval_eq_restrict (bounded_bound x) n, restrictCylinder_post]⟩ + +@[simp] lemma eval_mapCell (P : OmegaCategory.Functor Y Z) (x : Cell Y) (n : ℕ) : + eval n (mapCell P x) = OmegaCategory.Functor.comp (eval n x) P := rfl + +@[simp] lemma mapCell_ofMap (P : OmegaCategory.Functor Y Z) {n : ℕ} + (F : OmegaCategory.Functor (K.{u} n).nu Y) : + mapCell P (ofMap F) = ofMap (OmegaCategory.Functor.comp F P) := rfl + +lemma mapCell_face (P : OmegaCategory.Functor Y Z) (x : Cell Y) (k : ℕ) (b : Bool) : + mapCell P (face k b x) = face k b (mapCell P x) := by + obtain ⟨n,hn⟩ := bounded_exists x + obtain ⟨F,rfl⟩ : ∃ F : OmegaCategory.Functor (K.{u} n).nu Y, ofMap F = x := ⟨_,hn⟩ + simp only [face_ofMap, mapCell_ofMap, restrictCylinder_post] + +lemma mapCell_comp (P : OmegaCategory.Functor Y Z) (x y : Cell Y) (k : ℕ) + (h : face k true x = face k false y) (h' : face k true (mapCell P x) = face k false (mapCell P y)) : + mapCell P (comp k x y h) = comp k (mapCell P x) (mapCell P y) h' := by + let N := max (k+1) (max (bound x) (bound y)) + have hk : k < N := by omega + have hx : Bounded N x := (bounded_bound x).mono (by omega) + have hy : Bounded N y := (bounded_bound y).mono (by omega) + clear_value N + obtain ⟨F,rfl⟩ : ∃ F : OmegaCategory.Functor (K.{u} N).nu Y, ofMap F = x := ⟨_,hx⟩ + obtain ⟨G,rfl⟩ : ∃ G : OmegaCategory.Functor (K.{u} N).nu Y, ofMap G = y := ⟨_,hy⟩ + simp only [mapCell_ofMap, comp_ofMap hk] + congr 1 + exact pasteCylinder_natural N k hk _ _ _ P + +def mapFunctor (P : OmegaCategory.Functor Y Z) : OmegaCategory.Functor (omegaCategory Y) (omegaCategory Z) where + map := mapCell P + map_source k x := mapCell_face P x k false + map_target k x := mapCell_face P x k true + map_comp k x y h h' := mapCell_comp P x y k h h' + +def functor : OmegaCategory.{u} ⥤ OmegaCategory.{u} where + obj := omegaCategory + map := mapFunctor + map_id _ := rfl + map_comp _ _ := rfl + +def cellsEquiv (n : ℕ) (Y : OmegaCategory.{u}) : + OmegaCategory.Functor (K.{u} n).nu Y ≃ (omegaCategory Y).Cells n where + toFun F := ⟨ofMap F, (bounded_iff_fixed n _).mp (ofMap_bounded F)⟩ + invFun x := eval n x.val + left_inv F := eval_ofMap_self F + right_inv x := Subtype.ext ((bounded_iff_fixed n x.val).mpr x.property) +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma presentation_separates (P : OmegaCategory.Presentation.{u}) + {x y : Cell P.category} + (h : ∀ (Y : OmegaCategory.{u}) (I : P.Interpretation Y), + mapCell (P.lift Y I) x = mapCell (P.lift Y I) y) : x = y := by + let N := max (bound x) (bound y) + apply cell_ext ((bounded_bound x).mono (le_max_left _ _)) ((bounded_bound y).mono (le_max_right _ _)) + apply OmegaCategory.Functor.ext + funext z + apply P.cells_ext + intro Y I + exact congrArg (fun c => (eval N c).map z) (h Y I) + +def TensorGenerator (X : OmegaCategory.{u}) := Σ n : ℕ, X.Cells n × (K.{u} n).nu.Cell + +def tensorPresentation (X : OmegaCategory.{u}) : OmegaCategory.Presentation.{u} where + Generator := TensorGenerator X + dimension g := ((K g.1).nu.finite_dimension g.2.2).choose + relations Y f := ∃ F : OmegaCategory.Functor X (omegaCategory Y), + ∀ n (x : X.Cells n) (z : (K.{u} n).nu.Cell), f ⟨n,x,z⟩ = (eval n (F.map x.val)).map z + +variable {X Y : OmegaCategory.{u}} + +lemma functor_cell_bounded (F : OmegaCategory.Functor X (omegaCategory Y)) {n : ℕ} (x : X.Cells n) : + Bounded n (F.map x.val) := by + apply (bounded_iff_fixed n _).mpr + rw [← F.map_source, x.property] + +def tensorInterpretation (F : OmegaCategory.Functor X (omegaCategory Y)) : + (tensorPresentation X).Interpretation Y where + map g := (eval g.1 (F.map g.2.1.val)).map g.2.2 + bounded g := by + change TensorGenerator X at g + change Y.source ((K g.1).nu.finite_dimension g.2.2).choose ((eval g.1 (F.map g.2.1.val)).map g.2.2) = _ + rw [← OmegaCategory.Functor.map_source, ((K g.1).nu.finite_dimension g.2.2).choose_spec] + satisfies := ⟨F, fun _ _ _ => rfl⟩ + +def generatorCylinder (n : ℕ) (x : X.Cells n) : + OmegaCategory.Functor (K.{u} n).nu (tensorPresentation X).category where + map z := (tensorPresentation X).generator ⟨n,x,z⟩ + map_source k z := by + apply (tensorPresentation X).cells_ext + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + simp only [Presentation.evaluate_source] + erw [Presentation.evaluate_generator, Presentation.evaluate_generator, hF, hF] + exact (eval n (F.map x.val)).map_source k z + map_target k z := by + apply (tensorPresentation X).cells_ext + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + simp only [Presentation.evaluate_target] + erw [Presentation.evaluate_generator, Presentation.evaluate_generator, hF, hF] + exact (eval n (F.map x.val)).map_target k z + map_comp k z w h h' := by + apply (tensorPresentation X).cells_ext + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + simp only [Presentation.evaluate_comp] + change I.map ⟨n,x,(K n).nu.comp k z w h⟩ = + Y.comp k (I.map ⟨n,x,z⟩) (I.map ⟨n,x,w⟩) _ + simp only [hF n x] + apply (eval n (F.map x.val)).map_comp + +lemma generatorCylinder_interpretation (I : (tensorPresentation X).Interpretation Y) + (F : OmegaCategory.Functor X (omegaCategory Y)) + (hF : ∀ n (x : X.Cells n) (z : (K.{u} n).nu.Cell), I.map ⟨n,x,z⟩ = (eval n (F.map x.val)).map z) + (n : ℕ) (x : X.Cells n) : + OmegaCategory.Functor.comp (generatorCylinder n x) ((tensorPresentation X).lift Y I) = + eval n (F.map x.val) := OmegaCategory.Functor.ext (funext (hF n x)) + +lemma ofMap_generator_image (I : (tensorPresentation X).Interpretation Y) + (F : OmegaCategory.Functor X (omegaCategory Y)) + (hF : ∀ n (x : X.Cells n) (z : (K.{u} n).nu.Cell), I.map ⟨n,x,z⟩ = (eval n (F.map x.val)).map z) + (n : ℕ) (x : X.Cells n) : + mapCell ((tensorPresentation X).lift Y I) (ofMap (generatorCylinder n x)) = F.map x.val := by + rw [mapCell_ofMap, generatorCylinder_interpretation I F hF n x] + exact functor_cell_bounded F x + +def tensorUnitCell (x : X.Cell) : Cell (tensorPresentation X).category := + ofMap (generatorCylinder (X.finite_dimension x).choose ⟨x,(X.finite_dimension x).choose_spec⟩) + +lemma tensorUnitCell_image (I : (tensorPresentation X).Interpretation Y) + (F : OmegaCategory.Functor X (omegaCategory Y)) + (hF : ∀ n (x : X.Cells n) (z : (K.{u} n).nu.Cell), I.map ⟨n,x,z⟩ = (eval n (F.map x.val)).map z) + (x : X.Cell) : + mapCell ((tensorPresentation X).lift Y I) (tensorUnitCell x) = F.map x := + ofMap_generator_image I F hF _ _ + +lemma tensorUnitCell_of_bounded (n : ℕ) (x : X.Cells n) : + tensorUnitCell x.val = ofMap (generatorCylinder n x) := by + apply presentation_separates + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + rw [tensorUnitCell_image I F hF, ofMap_generator_image I F hF] + +lemma tensorUnitCell_source (k : ℕ) (x : X.Cell) : + tensorUnitCell (X.source k x) = (omegaCategory (tensorPresentation X).category).source k (tensorUnitCell x) := by + apply presentation_separates + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + rw [tensorUnitCell_image I F hF] + change F.map (X.source k x) = mapCell ((tensorPresentation X).lift Y I) (face k false (tensorUnitCell x)) + rw [mapCell_face, tensorUnitCell_image I F hF] + exact F.map_source k x + +lemma tensorUnitCell_target (k : ℕ) (x : X.Cell) : + tensorUnitCell (X.target k x) = (omegaCategory (tensorPresentation X).category).target k (tensorUnitCell x) := by + apply presentation_separates + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + rw [tensorUnitCell_image I F hF] + change F.map (X.target k x) = mapCell ((tensorPresentation X).lift Y I) (face k true (tensorUnitCell x)) + rw [mapCell_face, tensorUnitCell_image I F hF] + exact F.map_target k x + +lemma tensorUnitCell_comp (k : ℕ) (x y : X.Cell) (h : X.target k x = X.source k y) + (h' : (omegaCategory (tensorPresentation X).category).target k (tensorUnitCell x) = + (omegaCategory (tensorPresentation X).category).source k (tensorUnitCell y)) : + tensorUnitCell (X.comp k x y h) = (omegaCategory (tensorPresentation X).category).comp k + (tensorUnitCell x) (tensorUnitCell y) h' := by + apply presentation_separates + intro Y I + obtain ⟨F,hF⟩ := I.satisfies + rw [tensorUnitCell_image I F hF] + change F.map (X.comp k x y h) = + (mapFunctor ((tensorPresentation X).lift Y I)).map + ((omegaCategory (tensorPresentation X).category).comp k (tensorUnitCell x) (tensorUnitCell y) h') + rw [(mapFunctor ((tensorPresentation X).lift Y I)).map_comp k _ _ h' + ((mapFunctor ((tensorPresentation X).lift Y I)).map_composable h')] + change F.map (X.comp k x y h) = (omegaCategory Y).comp k + (mapCell ((tensorPresentation X).lift Y I) (tensorUnitCell x)) + (mapCell ((tensorPresentation X).lift Y I) (tensorUnitCell y)) _ + simp only [tensorUnitCell_image I F hF] + apply F.map_comp + +def tensorUnit (X : OmegaCategory.{u}) : + OmegaCategory.Functor X (omegaCategory (tensorPresentation X).category) where + map := tensorUnitCell + map_source := tensorUnitCell_source + map_target := tensorUnitCell_target + map_comp := tensorUnitCell_comp +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {X Y Z : OmegaCategory.{u}} + +def uncurry (F : OmegaCategory.Functor X (omegaCategory Y)) : + OmegaCategory.Functor (tensorPresentation X).category Y := + (tensorPresentation X).lift Y (tensorInterpretation F) + +def curry (F : OmegaCategory.Functor (tensorPresentation X).category Y) : + OmegaCategory.Functor X (omegaCategory Y) := + OmegaCategory.Functor.comp (tensorUnit X) (mapFunctor F) + +lemma curry_uncurry (F : OmegaCategory.Functor X (omegaCategory Y)) : curry (uncurry F) = F := by + apply OmegaCategory.Functor.ext + funext x + exact tensorUnitCell_image (tensorInterpretation F) F (fun _ _ _ => rfl) x + +lemma curry_eval (F : OmegaCategory.Functor (tensorPresentation X).category Y) + (n : ℕ) (x : X.Cells n) (z : (K.{u} n).nu.Cell) : + (eval n ((curry F).map x.val)).map z = F.map ((tensorPresentation X).generator ⟨n,x,z⟩) := by + change (eval n (mapCell F (tensorUnitCell x.val))).map z = _ + rw [tensorUnitCell_of_bounded n x, mapCell_ofMap, eval_ofMap_self] + rfl + +lemma uncurry_curry (F : OmegaCategory.Functor (tensorPresentation X).category Y) : uncurry (curry F) = F := by + apply (tensorPresentation X).functor_ext + intro ⟨n,x,z⟩ + exact curry_eval F n x z + +def homEquiv (X Y : OmegaCategory.{u}) : + ((tensorPresentation X).category ⟶ Y) ≃ (X ⟶ functor.obj Y) where + toFun := curry + invFun := uncurry + left_inv := uncurry_curry + right_inv := curry_uncurry + +lemma homEquiv_natural (X Y Z : OmegaCategory.{u}) (P : Y ⟶ Z) (F : (tensorPresentation X).category ⟶ Y) : + homEquiv X Z (F ≫ P) = homEquiv X Y F ≫ functor.map P := rfl + +def tensorFunctor : OmegaCategory.{u} ⥤ OmegaCategory.{u} := + Adjunction.leftAdjointOfEquiv homEquiv homEquiv_natural + +def tensorAdjunction : tensorFunctor.{u} ⊣ functor := + Adjunction.adjunctionOfEquivLeft homEquiv homEquiv_natural + +instance tensorFunctor_isLeftAdjoint : tensorFunctor.{u}.IsLeftAdjoint := ⟨functor, ⟨tensorAdjunction⟩⟩ +instance tensorFunctor_preservesColimits : Limits.PreservesColimitsOfSize.{u,u} tensorFunctor.{u} := + tensorAdjunction.leftAdjoint_preservesColimits + +lemma tensorFunctor_obj (X : OmegaCategory.{u}) : tensorFunctor.obj X = (tensorPresentation X).category := rfl + +lemma tensorFunctor_map_generator (P : X ⟶ Y) (n : ℕ) (x : X.Cells n) (z : (K.{u} n).nu.Cell) : + (tensorFunctor.map P).map ((tensorPresentation X).generator ⟨n,x,z⟩) = + (tensorPresentation Y).generator ⟨n,⟨P.map x.val, by rw [← P.map_source, x.property]⟩,z⟩ := by + change (eval n (tensorUnitCell (P.map x.val))).map z = _ + rw [tensorUnitCell_of_bounded n ⟨P.map x.val, by rw [← P.map_source, x.property]⟩, eval_ofMap_self] + rfl +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {X Y Z : OmegaCategory.{u}} + +lemma endpointTop_bounded {n : ℕ} (F : OmegaCategory.Functor (K.{u} n).nu Y) (a : Bool) : + Y.source n (F.map (atEnd a (topTable n))) = F.map (atEnd a (topTable n)) := by + erw [← F.map_source] + congr 1 + exact (atEnd_truncate a false (topTable n) n).trans (congrArg (atEnd a) (topTable_bounded n)) + +def endpointCell (a : Bool) (x : Cell Y) : Y.Cell := + (eval (bound x) x).map (atEnd a (topTable (bound x))) + +lemma endpointCell_of_bounded {n : ℕ} {x : Cell Y} (hx : Bounded n x) (a : Bool) : + endpointCell a x = (eval n x).map (atEnd a (topTable n)) := by + let N := max n (bound x) + have he (m : ℕ) (hm : Bounded m x) (hmN : m ≤ N) : + (eval N x).map (atEnd a (topTable N)) = (eval m x).map (atEnd a (topTable m)) := by + rw [eval_eq_restrict hm N, restrictCylinder_endpoint_top] + exact Y.source_fixed_upwards hmN (endpointTop_bounded (eval m x) a) + exact (he (bound x) (bounded_bound x) (le_max_right _ _)).symm.trans (he n hx (le_max_left _ _)) + +@[simp] lemma endpointCell_ofMap {n : ℕ} (F : OmegaCategory.Functor (K.{u} n).nu Y) (a : Bool) : + endpointCell a (ofMap F) = F.map (atEnd a (topTable n)) := by + rw [endpointCell_of_bounded (ofMap_bounded F), eval_ofMap_self] + +lemma endpointCell_face (a : Bool) (x : Cell Y) (k : ℕ) (b : Bool) : + endpointCell a (face k b x) = Y.face k b (endpointCell a x) := by + obtain ⟨n,hn⟩ := bounded_exists x + obtain ⟨F,rfl⟩ : ∃ F : OmegaCategory.Functor (K.{u} n).nu Y, ofMap F = x := ⟨_,hn⟩ + rw [face_ofMap, endpointCell_ofMap, endpointCell_ofMap, restrictCylinder_endpoint_top] + +lemma endpointCell_comp (a : Bool) (x y : Cell Y) (k : ℕ) (h : face k true x = face k false y) + (h' : Y.target k (endpointCell a x) = Y.source k (endpointCell a y)) : + endpointCell a (comp k x y h) = Y.comp k (endpointCell a x) (endpointCell a y) h' := by + let N := max (k+1) (max (bound x) (bound y)) + have hk : k < N := by omega + have hx : Bounded N x := (bounded_bound x).mono (by omega) + have hy : Bounded N y := (bounded_bound y).mono (by omega) + clear_value N + obtain ⟨F,rfl⟩ : ∃ F : OmegaCategory.Functor (K.{u} N).nu Y, ofMap F = x := ⟨_,hx⟩ + obtain ⟨G,rfl⟩ : ∃ G : OmegaCategory.Functor (K.{u} N).nu Y, ofMap G = y := ⟨_,hy⟩ + simp only [comp_ofMap hk, endpointCell_ofMap] at h' ⊢ + rw [pasteCylinder_endpoint_top, Y.join_eq k _ _ h'] + +def endpointFunctor (a : Bool) (Y : OmegaCategory.{u}) : OmegaCategory.Functor (omegaCategory Y) Y where + map := endpointCell a + map_source k x := endpointCell_face a x k false + map_target k x := endpointCell_face a x k true + map_comp k x y h h' := endpointCell_comp a x y k h h' + +lemma endpointCell_map (a : Bool) (P : OmegaCategory.Functor Y Z) (x : Cell Y) : + endpointCell a (mapCell P x) = P.map (endpointCell a x) := by + obtain ⟨n,hn⟩ := bounded_exists x + obtain ⟨F,rfl⟩ : ∃ F : OmegaCategory.Functor (K.{u} n).nu Y, ofMap F = x := ⟨_,hn⟩ + rw [mapCell_ofMap, endpointCell_ofMap, endpointCell_ofMap] + rfl + +def endpointTransformation (a : Bool) : functor.{u} ⟶ 𝟭 OmegaCategory.{u} where + app Y := endpointFunctor a Y + naturality _ _ P := OmegaCategory.Functor.ext (funext (endpointCell_map a P)) + +def tensorEndpoint (a : Bool) : 𝟭 OmegaCategory.{u} ⟶ tensorFunctor.{u} where + app X := OmegaCategory.Functor.comp (tensorUnit X) (endpointFunctor a (tensorFunctor.obj X)) + naturality X Y P := by + apply OmegaCategory.Functor.ext + funext x + obtain ⟨n,hn⟩ := X.finite_dimension x + change endpointCell a (tensorUnitCell (P.map x)) = (tensorFunctor.map P).map (endpointCell a (tensorUnitCell x)) + erw [tensorUnitCell_of_bounded n ⟨x,hn⟩, tensorUnitCell_of_bounded n ⟨P.map x, by rw [← P.map_source,hn]⟩, + endpointCell_ofMap, endpointCell_ofMap] + exact (tensorFunctor_map_generator P n ⟨x,hn⟩ (atEnd a (topTable n))).symm + +lemma tensorEndpoint_bounded (a : Bool) (X : OmegaCategory.{u}) (n : ℕ) (x : X.Cells n) : + ((tensorEndpoint a).app X).map x.val = (tensorPresentation X).generator ⟨n,x,atEnd a (topTable n)⟩ := by + change endpointCell a (tensorUnitCell x.val) = _ + rw [tensorUnitCell_of_bounded n x, endpointCell_ofMap] + rfl +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {X Y Z : OmegaCategory.{u}} + +lemma constantInterval_restrict {n k : ℕ} (F : OmegaCategory.Functor (complex.{u} n).nu Y) (b : Bool) : + restrictCylinder k b (constantInterval F) = + constantInterval (OmegaCategory.Functor.comp (faceMap n k b).nu F) := by + apply OmegaCategory.Functor.ext + funext z + exact congrArg F.map (congrArg (fun P => P.nu.map z) (faceMap.{u} n k b).cylinder_projection) + +lemma lift_face (x : Y.Cell) {n : ℕ} (hx : Y.source n x = x) (k : ℕ) (b : Bool) : + OmegaCategory.Functor.comp (faceMap.{u} n k b).nu (lift x hx) = + lift (Y.face k b x) (by cases b <;> simp [OmegaCategory.face]) := by + apply GlobeComplex.functor_ext + change (lift x hx).map ((faceMap n k b).nu.map (topTable k)) = _ + rw [faceMap_top, lift_top] + exact evaluate_face x hx k b + +lemma constant_bound_mono (x : Y.Cell) {n m : ℕ} (hn : Y.source n x = x) (hm : Y.source m x = x) + (hnm : n ≤ m) : + ofMap (constantInterval (lift.{u,u} x hn)) = ofMap (constantInterval (lift x hm)) := by + rw [← ofMap_raise hnm (constantInterval (lift x hn)), constantInterval_restrict] + apply congrArg (fun F : OmegaCategory.Functor (complex.{u} m).nu Y => ofMap (constantInterval F)) + apply GlobeComplex.functor_ext + change (lift x hn).map ((faceMap n m false).nu.map (topTable m)) = _ + rw [faceMap_top, lift_top] + exact (evaluate_face x hn m false).trans hm + +lemma constant_bound_independent (x : Y.Cell) {n m : ℕ} (hn : Y.source n x = x) (hm : Y.source m x = x) : + ofMap (constantInterval (lift.{u,u} x hn)) = ofMap (constantInterval (lift x hm)) := by + have hnm := Y.source_fixed_upwards (le_max_left n m) hn + rw [constant_bound_mono x hn hnm (le_max_left n m), constant_bound_mono x hm hnm (le_max_right n m)] + +def constantCell (x : Y.Cell) : Cell Y := + ofMap (constantInterval (lift x (Y.finite_dimension x).choose_spec)) + +lemma constantCell_of_bounded (n : ℕ) (x : Y.Cell) (hx : Y.source n x = x) : + constantCell x = ofMap (constantInterval (lift.{u,u} x hx)) := + constant_bound_independent x _ hx + +lemma constantCell_face (x : Y.Cell) (k : ℕ) (b : Bool) : + constantCell (Y.face k b x) = face k b (constantCell x) := by + obtain ⟨n,hn⟩ := Y.finite_dimension x + have hface : Y.source k (Y.face k b x) = Y.face k b x := by cases b <;> simp [OmegaCategory.face] + rw [constantCell_of_bounded n x hn, face_ofMap, constantInterval_restrict, lift_face, + constantCell_of_bounded k (Y.face k b x) hface] + +lemma constantCell_comp (x y : Y.Cell) (k : ℕ) (h : Y.target k x = Y.source k y) + (h' : face k true (constantCell x) = face k false (constantCell y)) : + constantCell (Y.comp k x y h) = comp k (constantCell x) (constantCell y) h' := by + obtain ⟨m,hm⟩ := Y.finite_dimension x + obtain ⟨l,hl⟩ := Y.finite_dimension y + let N := max (k+1) (max m l) + have hk : k < N := by omega + have hx : Y.source N x = x := Y.source_fixed_upwards (by omega : m ≤ N) hm + have hy : Y.source N y = y := Y.source_fixed_upwards (by omega : l ≤ N) hl + have hxy : Y.source N (Y.comp k x y h) = Y.comp k x y h := by + rw [Y.source_comp_gt N k hk x y h (Y.source_composable hk h)] + simp only [hx,hy] + simp only [constantCell_of_bounded N x hx, constantCell_of_bounded N y hy] at h' ⊢ + rw [constantCell_of_bounded N (Y.comp k x y h) hxy, comp_ofMap hk] + have hw : Y.target k ((lift.{u,u} x hx).map (topTable N)) = + Y.source k ((lift.{u,u} y hy).map (topTable N)) := by simpa only [lift_top] using h + rw [pasteCylinder_constant N k hk _ _ hw] + congr 2 + apply GlobeComplex.functor_ext + rw [lift_top, globeComposite_top, lift_top, lift_top, Y.join_eq k x y h] + +def constantFunctor (Y : OmegaCategory.{u}) : OmegaCategory.Functor Y (omegaCategory Y) where + map := constantCell + map_source k x := constantCell_face x k false + map_target k x := constantCell_face x k true + map_comp k x y h h' := constantCell_comp x y k h h' + +lemma constantCell_map (P : OmegaCategory.Functor Y Z) (x : Y.Cell) : + constantCell (P.map x) = mapCell P (constantCell x) := by + obtain ⟨n,hn⟩ := Y.finite_dimension x + have hp : Z.source n (P.map x) = P.map x := by rw [← P.map_source,hn] + rw [constantCell_of_bounded n x hn, constantCell_of_bounded n (P.map x) hp, mapCell_ofMap] + apply congrArg ofMap + have he : lift.{u,u} (P.map x) hp = OmegaCategory.Functor.comp (lift x hn) P := by + apply GlobeComplex.functor_ext + change _ = P.map ((lift x hn).map (topTable n)) + rw [lift_top,lift_top] + rw [he] + rfl + +def constantTransformation : 𝟭 OmegaCategory.{u} ⟶ functor.{u} where + app Y := constantFunctor Y + naturality _ _ P := OmegaCategory.Functor.ext (funext (constantCell_map P)) + +lemma endpointCell_constant (a : Bool) (x : Y.Cell) : endpointCell a (constantCell x) = x := by + obtain ⟨n,hn⟩ := Y.finite_dimension x + rw [constantCell_of_bounded n x hn, endpointCell_ofMap, constantInterval_endpoint, lift_top] + +def tensorProjection : tensorFunctor.{u} ⟶ 𝟭 OmegaCategory.{u} where + app X := uncurry (constantFunctor X) + naturality X Y P := by + apply (tensorPresentation X).functor_ext + intro ⟨n,x,z⟩ + change ((uncurry (constantFunctor Y)).map ((tensorFunctor.map P).map + ((tensorPresentation X).generator ⟨n,x,z⟩))) = + P.map ((uncurry (constantFunctor X)).map ((tensorPresentation X).generator ⟨n,x,z⟩)) + rw [tensorFunctor_map_generator] + change (eval n (constantCell (P.map x.val))).map z = P.map ((eval n (constantCell x.val)).map z) + rw [constantCell_map,eval_mapCell] + rfl + +lemma tensorProjection_generator (X : OmegaCategory.{u}) (n : ℕ) (x : X.Cells n) (z : (K.{u} n).nu.Cell) : + (tensorProjection.app X).map ((tensorPresentation X).generator ⟨n,x,z⟩) = + (lift.{u,u} x.val x.property).map (project z) := by + change (eval n (constantCell x.val)).map z = _ + rw [constantCell_of_bounded n x.val x.property, eval_ofMap_self] + rfl + +lemma tensorEndpoint_projection (a : Bool) : tensorEndpoint.{u} a ≫ tensorProjection = 𝟙 (𝟭 OmegaCategory.{u}) := by + ext X + apply OmegaCategory.Functor.ext + funext x + obtain ⟨n,hn⟩ := X.finite_dimension x + change (tensorProjection.app X).map (((tensorEndpoint a).app X).map x) = x + erw [tensorEndpoint_bounded a X n ⟨x,hn⟩,tensorProjection_generator, project_end, lift_top] +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +def globeDiagram (n : ℕ) : OmegaCategory.Functor (complex.{u} n).nu (omegaCategory (K.{u} n).nu) := + lift (ofMap (OmegaCategory.Functor.id (K.{u} n).nu)) + ((bounded_iff_fixed n _).mp (ofMap_bounded _)) + +lemma globeDiagram_top (n : ℕ) : + (globeDiagram.{u} n).map (topTable n) = ofMap (OmegaCategory.Functor.id (K.{u} n).nu) := + lift_top _ _ + +lemma globeDiagram_face (m p : ℕ) (b : Bool) : + (globeDiagram.{u} m).map (truncate p b (topTable m)) = ofMap (faceMap m p b).cylinder.nu := by + erw [← face_nu, (globeDiagram m).map_face, globeDiagram_top] + cases b <;> exact face_ofMap _ _ _ + +lemma globeDiagram_map (n m : ℕ) (a : Hom (complex.{u} n) (complex.{u} m)) : + (globeDiagram m).map (a.nu.map (topTable n)) = ofMap a.cylinder.nu := by + let t := a.nu.map (topTable n) + have ht : truncate n false t = t := by + exact (a.nu.map_source n (topTable n)).symm.trans (congrArg a.nu.map (topTable_bounded n)) + have hb : Bounded n ((globeDiagram m).map t) := by + apply (bounded_iff_fixed n _).mpr + exact ((globeDiagram m).map_source n t).symm.trans (congrArg (globeDiagram m).map ht) + rw [← hb] + apply congrArg ofMap + obtain ⟨p,b,_,he⟩ := table_classification t + have ha : a = Hom.comp (faceMap.{u} p n false) (faceMap m p b) := by + apply GlobeComplex.hom_ext + change t = (faceMap m p b).nu.map ((faceMap p n false).nu.map (topTable n)) + rw [faceMap_top] + change t = (faceMap m p b).table (truncate n false (topTable p)) + rw [Hom.table_truncate] + change t = truncate n false ((faceMap m p b).nu.map (topTable p)) + rw [faceMap_top,← he,ht] + rw [he,globeDiagram_face,eval_ofMap,ha,Hom.cylinder_comp] + rfl + +def globeTensorHom (n : ℕ) : tensorFunctor.obj (complex.{u} n).nu ⟶ (K.{u} n).nu := + uncurry (globeDiagram n) + +def globeTensorInv (n : ℕ) : (K.{u} n).nu ⟶ tensorFunctor.obj (complex.{u} n).nu := + generatorCylinder n ⟨topTable n,topTable_bounded n⟩ + +lemma globeTensorHom_generator (n k : ℕ) (x : (complex.{u} n).nu.Cells k) (z : (K.{u} k).nu.Cell) : + (globeTensorHom n).map ((tensorPresentation (complex.{u} n).nu).generator ⟨k,x,z⟩) = + (eval k ((globeDiagram n).map x.val)).map z := rfl + +lemma globeTensorHom_inv (n : ℕ) : globeTensorHom.{u} n ≫ globeTensorInv n = 𝟙 _ := by + apply (homEquiv (complex.{u} n).nu (tensorFunctor.obj (complex n).nu)).injective + erw [homEquiv_natural] + change OmegaCategory.Functor.comp (curry (uncurry (globeDiagram n))) (mapFunctor (globeTensorInv n)) = + curry (𝟙 (tensorFunctor.obj (complex n).nu)) + rw [curry_uncurry] + apply GlobeComplex.functor_ext + change mapCell (globeTensorInv n) ((globeDiagram n).map (topTable n)) = tensorUnitCell (topTable n) + rw [globeDiagram_top,mapCell_ofMap] + rw [tensorUnitCell_of_bounded (X := (complex n).nu) n ⟨topTable.{u} n,topTable_bounded n⟩] + rfl + +lemma globeTensorInv_hom (n : ℕ) : globeTensorInv.{u} n ≫ globeTensorHom n = 𝟙 _ := by + apply OmegaCategory.Functor.ext + funext z + change (eval n ((globeDiagram n).map (topTable n))).map z = z + rw [globeDiagram_top,eval_ofMap_self] + rfl + +def globeTensorIso (n : ℕ) : tensorFunctor.obj (complex.{u} n).nu ≅ (complex.{u} n).cylinder.nu where + hom := globeTensorHom n + inv := globeTensorInv n + hom_inv_id := globeTensorHom_inv n + inv_hom_id := globeTensorInv_hom n + +lemma globeTensorIso_natural (n m : ℕ) (a : Hom (complex.{u} n) (complex.{u} m)) : + tensorFunctor.map a.nu ≫ (globeTensorIso m).hom = (globeTensorIso n).hom ≫ a.cylinder.nu := by + apply (homEquiv (complex.{u} n).nu (K.{u} m).nu).injective + have hl : homEquiv (complex.{u} n).nu (K.{u} m).nu (tensorFunctor.map a.nu ≫ (globeTensorIso m).hom) = + a.nu ≫ globeDiagram m := by + change tensorAdjunction.homEquiv _ _ (tensorFunctor.map a.nu ≫ (globeTensorIso m).hom) = _ + rw [tensorAdjunction.homEquiv_naturality_left] + change OmegaCategory.Functor.comp a.nu (curry (uncurry (globeDiagram m))) = _ + rw [curry_uncurry] + rfl + erw [hl,homEquiv_natural] + change OmegaCategory.Functor.comp a.nu (globeDiagram m) = + OmegaCategory.Functor.comp (curry (uncurry (globeDiagram n))) (mapFunctor a.cylinder.nu) + rw [curry_uncurry] + apply GlobeComplex.functor_ext + change (globeDiagram m).map (a.nu.map (topTable n)) = mapCell a.cylinder.nu ((globeDiagram n).map (topTable n)) + rw [globeDiagram_map,globeDiagram_top,mapCell_ofMap] + rfl + +lemma globeTensorIso_endpoint (n : ℕ) (b : Bool) : + (tensorEndpoint b).app (complex.{u} n).nu ≫ (globeTensorIso n).hom = + ((complex n).cylinderEndpoint b).nu := by + apply GlobeComplex.functor_ext + change (globeTensorHom n).map (((tensorEndpoint b).app (complex n).nu).map (topTable n)) = _ + erw [tensorEndpoint_bounded b (complex n).nu n ⟨topTable n,topTable_bounded n⟩, + globeTensorHom_generator,globeDiagram_top,eval_ofMap_self] + rfl + +lemma globeTensorIso_projection (n : ℕ) : + (globeTensorIso.{u} n).hom ≫ (complex n).cylinderProjection.nu = tensorProjection.app (complex n).nu := by + apply (homEquiv (complex.{u} n).nu (complex n).nu).injective + erw [homEquiv_natural] + change OmegaCategory.Functor.comp (curry (uncurry (globeDiagram n))) (mapFunctor (complex n).cylinderProjection.nu) = + curry (uncurry (constantFunctor (complex n).nu)) + rw [curry_uncurry,curry_uncurry] + apply GlobeComplex.functor_ext + change mapCell (complex n).cylinderProjection.nu ((globeDiagram n).map (topTable n)) = constantCell (topTable n) + rw [globeDiagram_top,mapCell_ofMap] + rw [constantCell_of_bounded (Y := (complex n).nu) n (topTable.{u} n) (topTable_bounded n)] + apply congrArg ofMap + have he : lift.{u,u} (topTable n) (topTable_bounded n) = OmegaCategory.Functor.id (complex n).nu := by + apply GlobeComplex.functor_ext + exact lift_top _ _ + rw [he] + rfl +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +structure CellWeight (Y : OmegaCategory.{v}) (d : ℕ) (A : Type w) [AddCommMonoid A] where + apply : Y.Cell → A + add : ∀ k, k < d → ∀ x y, Y.target k x = Y.source k y → + apply (Y.join k x y) = apply x + apply y + vanish : ∀ k, k < d → ∀ x, Y.source k x = x → apply x = 0 + +namespace CellWeight +variable {Y : OmegaCategory.{v}} {A : Type w} [AddCommMonoid A] +instance {d : ℕ} : CoeFun (CellWeight Y d A) (fun _ => Y.Cell → A) := ⟨apply⟩ + +def hom {d : ℕ} (q : CellWeight Y (d+1) A) (a b : Y.Cell) : + CellWeight (Y.homCategory a b) d A where + apply x := q x.val + add k hk x y h := by + rw [hom_join_val k x y h] + exact q.add (k+1) (by omega) x.val y.val (congrArg Subtype.val h) + vanish k hk x h := q.vanish (k+1) (by omega) x.val (congrArg Subtype.val h) + +def row (M : DirectedComplex.{v}) (d : ℕ) (b : Bool) : CellWeight M.nu d (M.Chain d) where + apply x := x.row d b + add k hk x y h := by + rw [M.nu.join_eq k x y h] + change (DirectedComplex.Table.comp k x y h).row d b = _ + erw [comp_row] + simp only [show ¬d < k by omega, show d ≠ k by omega, ite_false] + vanish k hk x h := row_above_fixed x h hk b +end CellWeight + +lemma concatInterval_weight (n : ℕ) {Y : OmegaCategory.{v}} {A : Type w} [AddCommMonoid A] + (q : CellWeight Y (n+1) A) + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : IntervalMatching F G) : + q ((concatInterval F G h).map (verticalTable (topTable n))) = + q (F.map (verticalTable (topTable n))) + q (G.map (verticalTable (topTable n))) := by + induction n generalizing Y with + | zero => + rw [concatInterval_zero_vertical] + exact q.add 0 (by omega) _ _ (zero_interval_seam F G h) + | succ n ih => + rw [← suspendTable_top n, ← up_vertical, concatInterval_succ_up] + let D := rectangleDiagramOfFunctor F + let E := rectangleDiagramOfFunctor G + let x := verticalTable (topTable.{u} n) + have hw := ih (q.hom ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) + (D.concatDiagonalOne E h) (D.concatDiagonalTwo E h) (D.concatDiagonal_matching E h) + change q _ = q _ + q _ at hw + rw [hw] + change q (Y.join 0 (D.edge false) (E.diagonal.map x).val) + + q (Y.join 0 (D.diagonal.map x).val (E.edge true)) = _ + rw [q.add 0 (by omega) _ _ ((D.edge_target false).trans ((h _).trans (E.diagonal.map x).property.1.symm)), + q.add 0 (by omega) _ _ ((D.diagonal.map x).property.2.trans ((h _).trans (E.edge_source true).symm)), + q.vanish 1 (by omega) _ (D.edge_fixed false), q.vanish 1 (by omega) _ (E.edge_fixed true), + zero_add, add_zero] + exact add_comm _ _ + +lemma horizontalCylinder_weight {n : ℕ} {Y : OmegaCategory.{v}} {A : Type w} [AddCommMonoid A] + (q : CellWeight Y (n+1+1) A) + (F G : OmegaCategory.Functor (K.{u} (n+1)).nu Y) + (h : F.map (verticalTable (vertex n true)) = G.map (verticalTable (vertex n false))) : + q ((horizontalCylinder F G h).map (verticalTable (topTable (n+1)))) = + q (F.map (verticalTable (topTable (n+1)))) + q (G.map (verticalTable (topTable (n+1)))) := by + rw [← suspendTable_top n, ← up_vertical] + change q (((rectangleDiagramOfFunctor F).horizontal (rectangleDiagramOfFunctor G) h).lift.map _) = _ + rw [RectangleDiagram.lift_up] + let D := rectangleDiagramOfFunctor F + let E := rectangleDiagramOfFunctor G + let x := verticalTable (topTable.{u} n) + have hw := concatInterval_weight n + (q.hom ((D.ends false).map (vertex n false)) ((E.ends true).map (vertex n true))) + (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) (D.horizontalDiagonal_matching E h) + change q _ = q _ + q _ at hw + change q ((concatInterval (D.horizontalDiagonalOne E h) (D.horizontalDiagonalTwo E h) + (D.horizontalDiagonal_matching E h)).map x).val = _ + rw [hw] + change q (Y.join 0 (D.diagonal.map x).val ((E.ends true).map (suspendTable (project x)))) + + q (Y.join 0 ((D.ends false).map (suspendTable (project x))) (E.diagonal.map x).val) = _ + have hb (a : Bool) (R : RectangleDiagram.{u,v} n Y) : + Y.source (n+1) ((R.ends a).map (suspendTable (project x))) = + (R.ends a).map (suspendTable (project x)) := by + erw [← (R.ends a).map_source] + exact congrArg (R.ends a).map (dimension_of_rows_above_zero _ + (fun p hp b => chain_zero hp _)) + rw [q.add 0 (by omega) _ _ ((D.diagonal.map x).property.2.trans (by + erw [← (E.ends true).map_source] + change _ = (E.ends true).map (truncate 0 false (suspendTable (project x))) + rw [suspend_truncate_zero] + exact D.horizontal_seam E h true)), + q.add 0 (by omega) _ _ ((by + erw [← (D.ends false).map_target] + change (D.ends false).map (truncate 0 true (suspendTable (project x))) = _ + rw [suspend_truncate_zero] + exact (D.horizontal_seam E h false).trans (E.diagonal.map x).property.1.symm)), + q.vanish (n+1) (by omega) _ (hb true E), q.vanish (n+1) (by omega) _ (hb false D), + add_zero, zero_add] + rfl + +lemma pasteCylinder_weight (n k : ℕ) (hk : k < n) + {Y : OmegaCategory.{v}} {A : Type w} [AddCommMonoid A] + (q : CellWeight Y (n+1) A) + (F G : OmegaCategory.Functor (K.{u} n).nu Y) (h : FaceMatching k F G) : + q ((pasteCylinder hk F G h).map (verticalTable (topTable n))) = + q (F.map (verticalTable (topTable n))) + q (G.map (verticalTable (topTable n))) := by + induction k generalizing n Y with + | zero => + cases n with + | zero => omega + | succ n => + rw [pasteCylinder_zero] + exact horizontalCylinder_weight q F G _ + | succ k ih => + cases n with + | zero => omega + | succ n => + have hk' : k < n := by omega + rw [← suspendTable_top n, ← up_vertical, pasteCylinder_succ_up hk'] + exact ih n hk' (q.hom _ _) (rectangleDiagramOfFunctor F).diagonal + (CylinderComposition.secondDiagonal F G h) (CylinderComposition.diagonal_matching F G h) +end Thomason.GrayRecursive + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Definitions.lean b/lean/OAI/CategoryTheory/Thomason/Definitions.lean new file mode 100644 index 0000000000000000000000000000000000000000..7637ef6fadbb1e82b0682c911487f548cb7bdf74 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Definitions.lean @@ -0,0 +1,2455 @@ +import Mathlib + +/-! Definitions for the Thomason model structures and their Street-nerve detection statement. -/ + +noncomputable section +universe u v w + +section +namespace OAI.Thomason + + +structure OmegaCategory where + Cell : Type u + source : ℕ → Cell → Cell + target : ℕ → Cell → Cell + source_source (i j : ℕ) (x : Cell) : source i (source j x) = source (min i j) x + target_target (i j : ℕ) (x : Cell) : target i (target j x) = target (min i j) x + source_target (i j : ℕ) (x : Cell) : + source i (target j x) = if i < j then source i x else target j x + target_source (i j : ℕ) (x : Cell) : + target i (source j x) = if i < j then target i x else source j x + comp (k : ℕ) (x y : Cell) : target k x = source k y → Cell + source_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell) + (h : target k x = source k y) : source i (comp k x y h) = source i x + target_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell) + (h : target k x = source k y) : target i (comp k x y h) = target i y + source_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell) + (h : target k x = source k y) + (hs : target k (source i x) = source k (source i y)) : + source i (comp k x y h) = comp k (source i x) (source i y) hs + target_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell) + (h : target k x = source k y) + (ht : target k (target i x) = source k (target i y)) : + target i (comp k x y h) = comp k (target i x) (target i y) ht + unit_left (k : ℕ) (x : Cell) (h : target k (source k x) = source k x) : + comp k (source k x) x h = x + unit_right (k : ℕ) (x : Cell) (h : target k x = source k (target k x)) : + comp k x (target k x) h = x + assoc (k : ℕ) (x y z : Cell) + (hxy : target k x = source k y) (hyz : target k y = source k z) + (hxy_z : target k (comp k x y hxy) = source k z) + (hx_yz : target k x = source k (comp k y z hyz)) : + comp k (comp k x y hxy) z hxy_z = comp k x (comp k y z hyz) hx_yz + interchange (k l : ℕ) (hkl : k < l) (a b c d : Cell) + (hab : target l a = source l b) (hcd : target l c = source l d) + (hac : target k a = source k c) (hbd : target k b = source k d) + (hab_cd : target k (comp l a b hab) = source k (comp l c d hcd)) + (hac_bd : target l (comp k a c hac) = source l (comp k b d hbd)) : + comp k (comp l a b hab) (comp l c d hcd) hab_cd = + comp l (comp k a c hac) (comp k b d hbd) hac_bd + finite_dimension (x : Cell) : ∃ k, source k x = x + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.OmegaCategory +variable (C : OmegaCategory.{u}) + +@[ext] +structure Functor (C : OAI.Thomason.OmegaCategory.{u}) (D : OAI.Thomason.OmegaCategory.{v}) where + map : C.Cell → D.Cell + map_source (k : ℕ) (x : C.Cell) : map (C.source k x) = D.source k (map x) + map_target (k : ℕ) (x : C.Cell) : map (C.target k x) = D.target k (map x) + map_comp (k : ℕ) (x y : C.Cell) (h : C.target k x = C.source k y) + (h' : D.target k (map x) = D.source k (map y)) : + map (C.comp k x y h) = D.comp k (map x) (map y) h' + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory.Functor +variable (C : OmegaCategory.{u}) +variable {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} {B : OmegaCategory.{w}} + +noncomputable def id (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.Functor C C where + map x := x + map_source _ _ := rfl + map_target _ _ := rfl + map_comp _ _ _ _ _ := rfl + +noncomputable def comp (F : OAI.Thomason.OmegaCategory.Functor C D) (G : OAI.Thomason.OmegaCategory.Functor D B) : OAI.Thomason.OmegaCategory.Functor C B := by + classical + have proof_map_composable_0 {C : OAI.Thomason.OmegaCategory.{u}} {D : OAI.Thomason.OmegaCategory.{v}} (F : OAI.Thomason.OmegaCategory.Functor C D) {k : ℕ} {x y : C.Cell} + (h : C.target k x = C.source k y) : + D.target k (F.map x) = D.source k (F.map y) := by + rw [← F.map_target, ← F.map_source, h] + exact { + map x := G.map (F.map x) + map_source k x := by rw [F.map_source, G.map_source] + map_target k x := by rw [F.map_target, G.map_target] + map_comp k x y h h' := by + rw [F.map_comp k x y h (proof_map_composable_0 F h), G.map_comp] + } + + +end OAI.Thomason.OmegaCategory.Functor +end + +section +namespace OAI.Thomason.OmegaCategory +variable (C : OmegaCategory.{u}) + +noncomputable instance : CategoryTheory.Category OAI.Thomason.OmegaCategory.{u} where + Hom C D := OAI.Thomason.OmegaCategory.Functor C D + id := OAI.Thomason.OmegaCategory.Functor.id + comp := OAI.Thomason.OmegaCategory.Functor.comp + +noncomputable def IsTruncated (n : ℕ) : Prop := ∀ x : C.Cell, C.source n x = x + +noncomputable def NCategory (n : ℕ) := {C : OAI.Thomason.OmegaCategory.{u} // C.IsTruncated n} + +noncomputable instance (n : ℕ) : CategoryTheory.Category (OAI.Thomason.OmegaCategory.NCategory.{u} n) where + Hom C D := OAI.Thomason.OmegaCategory.Functor C.val D.val + id C := OAI.Thomason.OmegaCategory.Functor.id C.val + comp := OAI.Thomason.OmegaCategory.Functor.comp + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason + + +structure DirectedComplex where + Chain : ℕ → Type u + group : ∀ p, AddCommGroup (Chain p) + d : (p : ℕ) → Chain (p+1) →+ Chain p + d_d (p : ℕ) (x : Chain (p+2)) : d p (d (p+1) x) = 0 + augmentation : Chain 0 →+ ℤ + augmentation_d (x : Chain 1) : augmentation (d 0 x) = 0 + positive : (p : ℕ) → AddSubmonoid (Chain p) + +end OAI.Thomason +end + +attribute [instance] OAI.Thomason.DirectedComplex.group + +section +namespace OAI.Thomason.DirectedComplex + + +@[ext] +structure Hom (K : OAI.Thomason.DirectedComplex.{u}) (L : OAI.Thomason.DirectedComplex.{v}) where + map (p : ℕ) : K.Chain p →+ L.Chain p + map_d (p : ℕ) (x : K.Chain (p+1)) : map p (K.d p x) = L.d p (map (p+1) x) + map_augmentation (x : K.Chain 0) : L.augmentation (map 0 x) = K.augmentation x + map_positive (p : ℕ) (x : K.Chain p) : x ∈ K.positive p → map p x ∈ L.positive p + + +end OAI.Thomason.DirectedComplex +end + +section +namespace OAI.Thomason.DirectedComplex.Hom +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{v}} {M : DirectedComplex.{w}} + +noncomputable def id (K : OAI.Thomason.DirectedComplex.{u}) : OAI.Thomason.DirectedComplex.Hom K K where + map _ := AddMonoidHom.id _ + map_d _ _ := rfl + map_augmentation _ := rfl + map_positive _ _ h := h + +noncomputable def comp (f : OAI.Thomason.DirectedComplex.Hom K L) (g : OAI.Thomason.DirectedComplex.Hom L M) : OAI.Thomason.DirectedComplex.Hom K M where + map p := (g.map p).comp (f.map p) + map_d p x := by simp only [AddMonoidHom.comp_apply, f.map_d, g.map_d] + map_augmentation x := by simp only [AddMonoidHom.comp_apply, + g.map_augmentation, f.map_augmentation] + map_positive p x hx := g.map_positive p _ (f.map_positive p x hx) + + +end OAI.Thomason.DirectedComplex.Hom +end + +section +namespace OAI.Thomason.DirectedComplex + + +noncomputable instance : CategoryTheory.Category OAI.Thomason.DirectedComplex.{u} where + Hom := OAI.Thomason.DirectedComplex.Hom + id := OAI.Thomason.DirectedComplex.Hom.id + comp := OAI.Thomason.DirectedComplex.Hom.comp + +@[ext] +structure Table (K : OAI.Thomason.DirectedComplex.{u}) where + row : (p : ℕ) → Bool → K.Chain p + positive (p : ℕ) (b : Bool) : row p b ∈ K.positive p + boundary (p : ℕ) (b : Bool) : + K.d p (row (p+1) b) = row p true - row p false + augmentation (b : Bool) : K.augmentation (row 0 b) = 1 + bounded : ∃ k, ∀ p, k < p → ∀ b, row p b = 0 + + +end OAI.Thomason.DirectedComplex +end + +section +namespace OAI.Thomason.DirectedComplex.Table +variable {K : DirectedComplex.{u}} + +noncomputable def truncate (k : ℕ) (e : Bool) (x : OAI.Thomason.DirectedComplex.Table K) : OAI.Thomason.DirectedComplex.Table K where + row p b := if p < k then x.row p b else if p = k then x.row p e else 0 + positive p b := by + split_ifs <;> first | exact x.positive _ _ | exact (K.positive _).zero_mem + boundary p b := by + by_cases hp : p < k + · by_cases hp' : p+1 < k + · simp only [hp, hp', ite_eq_left] + exact x.boundary p b + · have he : p+1 = k := by omega + simp only [ite_eq_left hp, ite_eq_right hp', ite_eq_left he] + exact x.boundary p e + · by_cases he : p = k + · have hp' : ¬p+1 < k := by omega + have he' : ¬p+1 = k := by omega + simp only [ite_eq_right hp, ite_eq_right hp', ite_eq_right he', ite_eq_left he, map_zero, sub_self] + · have hp' : ¬p+1 < k := by omega + have he' : ¬p+1 = k := by omega + simp only [hp, hp', he', he, ite_false, map_zero, sub_self] + augmentation b := by + by_cases hk : k = 0 + · subst k + simpa using x.augmentation e + · have hk' : 0 < k := Nat.pos_of_ne_zero hk + simpa only [hk', ite_eq_left] using x.augmentation b + bounded := by + refine ⟨k, ?_⟩ + intro p hp b + simp only [show ¬p < k by omega, show ¬p = k by omega, ite_false] + +noncomputable def comp (k : ℕ) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) : OAI.Thomason.DirectedComplex.Table K := by + classical + have proof_truncate_row_3 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (e : Bool) (x : OAI.Thomason.DirectedComplex.Table K) (p : ℕ) (b : Bool) : + (OAI.Thomason.DirectedComplex.Table.truncate k e x).row p b = + if p < k then x.row p b else if p = k then x.row p e else 0 := rfl + have proof_lower_rows_eq_1 {K : OAI.Thomason.DirectedComplex.{u}} {k : ℕ} {x y : OAI.Thomason.DirectedComplex.Table K} + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) {p : ℕ} (hp : p < k) (b : Bool) : + x.row p b = y.row p b := by + have hr := congrArg (fun z : OAI.Thomason.DirectedComplex.Table K => z.row p b) h + simpa only [OAI.Thomason.DirectedComplex.Table.truncate, hp, ite_eq_left] using hr + have proof_matching_row_eq_2 {K : OAI.Thomason.DirectedComplex.{u}} {k : ℕ} {x y : OAI.Thomason.DirectedComplex.Table K} + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) : x.row k true = y.row k false := by + have hr := congrArg (fun z : OAI.Thomason.DirectedComplex.Table K => z.row k false) h + simpa [OAI.Thomason.DirectedComplex.Table.truncate] using hr + exact { + row p b := if p < k then x.row p b else if p = k then + (if b then y.row p true else x.row p false) else x.row p b + y.row p b + positive p b := by + split_ifs <;> first + | exact x.positive _ _ + | exact y.positive _ _ + | exact (K.positive _).add_mem (x.positive _ _) (y.positive _ _) + boundary p b := by + by_cases hp : p < k + · by_cases hp' : p+1 < k + · simp only [ite_eq_left hp, ite_eq_left hp'] + exact x.boundary p b + · have he : p+1 = k := by omega + simp only [ite_eq_left hp, ite_eq_right hp', ite_eq_left he] + cases b with + | false => exact x.boundary p false + | true => + change K.d p (y.row (p+1) true) = x.row p true - x.row p false + rw [y.boundary, proof_lower_rows_eq_1 h hp true, proof_lower_rows_eq_1 h hp false] + · by_cases he : p = k + · subst p + have hp' : ¬k+1 < k := by omega + have he' : ¬k+1 = k := by omega + simp only [ite_eq_right (Nat.lt_irrefl k), ite_eq_right hp', ite_eq_right he', + ↓reduceIte, map_add, x.boundary, y.boundary] + rw [proof_matching_row_eq_2 h] + abel_nf + exact add_comm _ _ + · have hp' : ¬p+1 < k := by omega + have he' : ¬p+1 = k := by omega + simp only [ite_eq_right hp, ite_eq_right hp', ite_eq_right he', ite_eq_right he, map_add, + x.boundary, y.boundary] + abel + augmentation b := by + by_cases hk : 0 < k + · simp only [ite_eq_left hk] + exact x.augmentation b + · have he : 0 = k := by omega + simp only [ite_eq_right hk, ite_eq_left he] + cases b <;> first | exact x.augmentation _ | exact y.augmentation _ + bounded := by + obtain ⟨nx, hx⟩ := x.bounded + obtain ⟨ny, hy⟩ := y.bounded + refine ⟨max nx ny, ?_⟩ + intro p hp b + have hx' := hx p (lt_of_le_of_lt (le_max_left _ _) hp) + have hy' := hy p (lt_of_le_of_lt (le_max_right _ _) hp) + split_ifs <;> simp only [hx', hy', zero_add] + } + + +end OAI.Thomason.DirectedComplex.Table +end + +section +namespace OAI.Thomason.DirectedComplex + + +noncomputable def nu (K : OAI.Thomason.DirectedComplex.{u}) : OAI.Thomason.OmegaCategory.{u} := by + classical + have proof_truncate_row_3 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (e : Bool) (x : OAI.Thomason.DirectedComplex.Table K) (p : ℕ) (b : Bool) : + (OAI.Thomason.DirectedComplex.Table.truncate k e x).row p b = + if p < k then x.row p b else if p = k then x.row p e else 0 := rfl + have proof_truncate_truncate_5 {K : OAI.Thomason.DirectedComplex.{u}} (i j : ℕ) (e f : Bool) (x : OAI.Thomason.DirectedComplex.Table K) : + OAI.Thomason.DirectedComplex.Table.truncate i e (OAI.Thomason.DirectedComplex.Table.truncate j f x) = + if i < j then OAI.Thomason.DirectedComplex.Table.truncate i e x else OAI.Thomason.DirectedComplex.Table.truncate j f x := by + ext p b + by_cases hij : i < j + · simp only [hij, ite_eq_left, OAI.Thomason.DirectedComplex.Table.truncate] + by_cases hpi : p < i + · have hpj : p < j := lt_trans hpi hij + simp [hpi, hpj] + · by_cases hpe : p = i + · subst p + simp [hij] + · simp [hpi, hpe] + · simp only [hij, ite_false, OAI.Thomason.DirectedComplex.Table.truncate] + by_cases hpj : p < j + · have hpi : p < i := by omega + simp [hpj, hpi] + · by_cases hpje : p = j + · subst p + by_cases hji : j < i + · simp [hji] + · have hi : i = j := by omega + subst i + simp [] + · by_cases hpi : p < i + · simp [hpi, hpj, hpje] + · by_cases hpie : p = i + · subst p + simp [hij] + · simp [hpi, hpie, hpj, hpje] + have proof_truncate_truncate_same_4 {K : OAI.Thomason.DirectedComplex.{u}} (i j : ℕ) (e : Bool) (x : OAI.Thomason.DirectedComplex.Table K) : + OAI.Thomason.DirectedComplex.Table.truncate i e (OAI.Thomason.DirectedComplex.Table.truncate j e x) = OAI.Thomason.DirectedComplex.Table.truncate (min i j) e x := by + rw [proof_truncate_truncate_5] + split_ifs with h + · rw [min_eq_left (le_of_lt h)] + · rw [min_eq_right (le_of_not_gt h)] + have proof_comp_row_14 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) (p : ℕ) (b : Bool) : + (OAI.Thomason.DirectedComplex.Table.comp k x y h).row p b = if p < k then x.row p b else if p = k then + (if b then y.row p true else x.row p false) else x.row p b + y.row p b := rfl + have proof_source_comp_le_6 {K : OAI.Thomason.DirectedComplex.{u}} (i k : ℕ) (hik : i ≤ k) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) : + OAI.Thomason.DirectedComplex.Table.truncate i false (OAI.Thomason.DirectedComplex.Table.comp k x y h) = OAI.Thomason.DirectedComplex.Table.truncate i false x := by + ext p b + by_cases hpi : p < i + · have hpk : p < k := lt_of_lt_of_le hpi hik + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpi, hpk] + · by_cases hpe : p = i + · subst p + by_cases hik' : i < k + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hik'] + · have he : i = k := by omega + subst i + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp] + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpi, hpe] + have proof_lower_rows_eq_1 {K : OAI.Thomason.DirectedComplex.{u}} {k : ℕ} {x y : OAI.Thomason.DirectedComplex.Table K} + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) {p : ℕ} (hp : p < k) (b : Bool) : + x.row p b = y.row p b := by + have hr := congrArg (fun z : OAI.Thomason.DirectedComplex.Table K => z.row p b) h + simpa only [OAI.Thomason.DirectedComplex.Table.truncate, hp, ite_eq_left] using hr + have proof_target_comp_le_7 {K : OAI.Thomason.DirectedComplex.{u}} (i k : ℕ) (hik : i ≤ k) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) : + OAI.Thomason.DirectedComplex.Table.truncate i true (OAI.Thomason.DirectedComplex.Table.comp k x y h) = OAI.Thomason.DirectedComplex.Table.truncate i true y := by + ext p b + by_cases hpi : p < i + · have hpk : p < k := lt_of_lt_of_le hpi hik + simp only [OAI.Thomason.DirectedComplex.Table.truncate, ite_eq_left hpi, OAI.Thomason.DirectedComplex.Table.comp, ite_eq_left hpk] + exact proof_lower_rows_eq_1 h hpk b + · by_cases hpe : p = i + · subst p + by_cases hik' : i < k + · simpa [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hik'] using proof_lower_rows_eq_1 h hik' true + · have he : i = k := by omega + subst i + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp] + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpi, hpe] + have proof_truncate_comp_gt_8 {K : OAI.Thomason.DirectedComplex.{u}} (i k : ℕ) (hki : k < i) (e : Bool) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) + (h' : OAI.Thomason.DirectedComplex.Table.truncate k true (OAI.Thomason.DirectedComplex.Table.truncate i e x) = OAI.Thomason.DirectedComplex.Table.truncate k false (OAI.Thomason.DirectedComplex.Table.truncate i e y)) : + OAI.Thomason.DirectedComplex.Table.truncate i e (OAI.Thomason.DirectedComplex.Table.comp k x y h) = OAI.Thomason.DirectedComplex.Table.comp k (OAI.Thomason.DirectedComplex.Table.truncate i e x) (OAI.Thomason.DirectedComplex.Table.truncate i e y) h' := by + ext p b + by_cases hpk : p < k + · have hpi : p < i := lt_trans hpk hki + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpk, hpi] + · by_cases hpe : p = k + · subst p + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hki] + · by_cases hpi : p < i + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpk, hpe, hpi] + · by_cases hpie : p = i + · subst p + have hik : ¬i < k := by omega + have hie : ¬i = k := by omega + simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hik, hie] + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hpk, hpe, hpi, hpie] + have proof_unit_left_9 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (x : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true (OAI.Thomason.DirectedComplex.Table.truncate k false x) = OAI.Thomason.DirectedComplex.Table.truncate k false x) : + OAI.Thomason.DirectedComplex.Table.comp k (OAI.Thomason.DirectedComplex.Table.truncate k false x) x h = x := by + ext p b + by_cases hp : p < k + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hp] + · by_cases he : p = k + · subst p + cases b <;> simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp] + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hp, he] + have proof_unit_right_10 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (x : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false (OAI.Thomason.DirectedComplex.Table.truncate k true x)) : + OAI.Thomason.DirectedComplex.Table.comp k x (OAI.Thomason.DirectedComplex.Table.truncate k true x) h = x := by + ext p b + by_cases hp : p < k + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hp] + · by_cases he : p = k + · subst p + cases b <;> simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp] + · simp [OAI.Thomason.DirectedComplex.Table.truncate, OAI.Thomason.DirectedComplex.Table.comp, hp, he] + have proof_assoc_11 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (x y z : OAI.Thomason.DirectedComplex.Table K) + (hxy : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) + (hyz : OAI.Thomason.DirectedComplex.Table.truncate k true y = OAI.Thomason.DirectedComplex.Table.truncate k false z) + (hxy_z : OAI.Thomason.DirectedComplex.Table.truncate k true (OAI.Thomason.DirectedComplex.Table.comp k x y hxy) = OAI.Thomason.DirectedComplex.Table.truncate k false z) + (hx_yz : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false (OAI.Thomason.DirectedComplex.Table.comp k y z hyz)) : + OAI.Thomason.DirectedComplex.Table.comp k (OAI.Thomason.DirectedComplex.Table.comp k x y hxy) z hxy_z = OAI.Thomason.DirectedComplex.Table.comp k x (OAI.Thomason.DirectedComplex.Table.comp k y z hyz) hx_yz := by + ext p b + by_cases hp : p < k + · simp [OAI.Thomason.DirectedComplex.Table.comp, hp] + · by_cases he : p = k + · subst p + cases b <;> simp [OAI.Thomason.DirectedComplex.Table.comp] + · simp [OAI.Thomason.DirectedComplex.Table.comp, hp, he, add_assoc] + have proof_interchange_12 {K : OAI.Thomason.DirectedComplex.{u}} (k l : ℕ) (hkl : k < l) (a b c d : OAI.Thomason.DirectedComplex.Table K) + (hab : OAI.Thomason.DirectedComplex.Table.truncate l true a = OAI.Thomason.DirectedComplex.Table.truncate l false b) + (hcd : OAI.Thomason.DirectedComplex.Table.truncate l true c = OAI.Thomason.DirectedComplex.Table.truncate l false d) + (hac : OAI.Thomason.DirectedComplex.Table.truncate k true a = OAI.Thomason.DirectedComplex.Table.truncate k false c) + (hbd : OAI.Thomason.DirectedComplex.Table.truncate k true b = OAI.Thomason.DirectedComplex.Table.truncate k false d) + (hab_cd : OAI.Thomason.DirectedComplex.Table.truncate k true (OAI.Thomason.DirectedComplex.Table.comp l a b hab) = OAI.Thomason.DirectedComplex.Table.truncate k false (OAI.Thomason.DirectedComplex.Table.comp l c d hcd)) + (hac_bd : OAI.Thomason.DirectedComplex.Table.truncate l true (OAI.Thomason.DirectedComplex.Table.comp k a c hac) = OAI.Thomason.DirectedComplex.Table.truncate l false (OAI.Thomason.DirectedComplex.Table.comp k b d hbd)) : + OAI.Thomason.DirectedComplex.Table.comp k (OAI.Thomason.DirectedComplex.Table.comp l a b hab) (OAI.Thomason.DirectedComplex.Table.comp l c d hcd) hab_cd = + OAI.Thomason.DirectedComplex.Table.comp l (OAI.Thomason.DirectedComplex.Table.comp k a c hac) (OAI.Thomason.DirectedComplex.Table.comp k b d hbd) hac_bd := by + ext p e + by_cases hpk : p < k + · have hpl : p < l := lt_trans hpk hkl + simp [OAI.Thomason.DirectedComplex.Table.comp, hpk, hpl] + · by_cases hpe : p = k + · subst p + cases e <;> simp [OAI.Thomason.DirectedComplex.Table.comp, hkl] + · by_cases hpl : p < l + · simp [OAI.Thomason.DirectedComplex.Table.comp, hpk, hpe, hpl] + · by_cases hple : p = l + · subst p + have hlk : ¬l < k := by omega + have hlke : ¬l = k := by omega + cases e <;> simp [OAI.Thomason.DirectedComplex.Table.comp, hlk, hlke] + · simp only [OAI.Thomason.DirectedComplex.Table.comp, ite_eq_right hpk, ite_eq_right hpe, ite_eq_right hpl, ite_eq_right hple] + abel + have proof_finite_dimension_13 {K : OAI.Thomason.DirectedComplex.{u}} (x : OAI.Thomason.DirectedComplex.Table K) : ∃ k, OAI.Thomason.DirectedComplex.Table.truncate k false x = x := by + obtain ⟨k, hk⟩ := x.bounded + have ht : x.row k true = x.row k false := by + have hb := x.boundary k false + rw [hk (k+1) (by omega) false, map_zero] at hb + exact sub_eq_zero.mp hb.symm + refine ⟨k, ?_⟩ + ext p b + by_cases hp : p < k + · simp [OAI.Thomason.DirectedComplex.Table.truncate, hp] + · by_cases he : p = k + · subst p + cases b <;> simp [OAI.Thomason.DirectedComplex.Table.truncate, ht] + · have hkp : k < p := by omega + simp [OAI.Thomason.DirectedComplex.Table.truncate, hp, he, hk p hkp b] + exact { + Cell := OAI.Thomason.DirectedComplex.Table K + source k := OAI.Thomason.DirectedComplex.Table.truncate k false + target k := OAI.Thomason.DirectedComplex.Table.truncate k true + source_source i j x := proof_truncate_truncate_same_4 i j false x + target_target i j x := proof_truncate_truncate_same_4 i j true x + source_target i j x := proof_truncate_truncate_5 i j false true x + target_source i j x := proof_truncate_truncate_5 i j true false x + comp := OAI.Thomason.DirectedComplex.Table.comp + source_comp_le := proof_source_comp_le_6 + target_comp_le := proof_target_comp_le_7 + source_comp_gt i k hki x y h hs := proof_truncate_comp_gt_8 i k hki false x y h hs + target_comp_gt i k hki x y h ht := proof_truncate_comp_gt_8 i k hki true x y h ht + unit_left := proof_unit_left_9 + unit_right := proof_unit_right_10 + assoc := proof_assoc_11 + interchange := proof_interchange_12 + finite_dimension := proof_finite_dimension_13 + } + + +end OAI.Thomason.DirectedComplex +end + +section +namespace OAI.Thomason.DirectedComplex.Hom +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{v}} {M : DirectedComplex.{w}} + +noncomputable def table (f : OAI.Thomason.DirectedComplex.Hom K L) (x : OAI.Thomason.DirectedComplex.Table K) : OAI.Thomason.DirectedComplex.Table L where + row p b := f.map p (x.row p b) + positive p b := f.map_positive p _ (x.positive p b) + boundary p b := by rw [← f.map_d, x.boundary, map_sub] + augmentation b := by rw [f.map_augmentation, x.augmentation] + bounded := by + obtain ⟨k, hk⟩ := x.bounded + refine ⟨k, ?_⟩ + intro p hp b + rw [hk p hp b, map_zero] + +noncomputable def nu (f : OAI.Thomason.DirectedComplex.Hom K L) : OAI.Thomason.OmegaCategory.Functor K.nu L.nu := by + classical + have proof_table_row_17 {K : OAI.Thomason.DirectedComplex.{u}} {L : OAI.Thomason.DirectedComplex.{v}} (f : OAI.Thomason.DirectedComplex.Hom K L) (x : OAI.Thomason.DirectedComplex.Table K) (p : ℕ) (b : Bool) : + (f.table x).row p b = f.map p (x.row p b) := rfl + have proof_truncate_row_3 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (e : Bool) (x : OAI.Thomason.DirectedComplex.Table K) (p : ℕ) (b : Bool) : + (OAI.Thomason.DirectedComplex.Table.truncate k e x).row p b = + if p < k then x.row p b else if p = k then x.row p e else 0 := rfl + have proof_table_truncate_15 {K : OAI.Thomason.DirectedComplex.{u}} {L : OAI.Thomason.DirectedComplex.{v}} (f : OAI.Thomason.DirectedComplex.Hom K L) (k : ℕ) (b : Bool) (x : OAI.Thomason.DirectedComplex.Table K) : + f.table (OAI.Thomason.DirectedComplex.Table.truncate k b x) = OAI.Thomason.DirectedComplex.Table.truncate k b (f.table x) := by + ext p e + simp only [OAI.Thomason.DirectedComplex.Hom.table, OAI.Thomason.DirectedComplex.Table.truncate] + split_ifs <;> simp only [map_zero] + have proof_comp_row_14 {K : OAI.Thomason.DirectedComplex.{u}} (k : ℕ) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) (p : ℕ) (b : Bool) : + (OAI.Thomason.DirectedComplex.Table.comp k x y h).row p b = if p < k then x.row p b else if p = k then + (if b then y.row p true else x.row p false) else x.row p b + y.row p b := rfl + have proof_table_comp_16 {K : OAI.Thomason.DirectedComplex.{u}} {L : OAI.Thomason.DirectedComplex.{v}} (f : OAI.Thomason.DirectedComplex.Hom K L) (k : ℕ) (x y : OAI.Thomason.DirectedComplex.Table K) + (h : OAI.Thomason.DirectedComplex.Table.truncate k true x = OAI.Thomason.DirectedComplex.Table.truncate k false y) + (h' : OAI.Thomason.DirectedComplex.Table.truncate k true (f.table x) = OAI.Thomason.DirectedComplex.Table.truncate k false (f.table y)) : + f.table (OAI.Thomason.DirectedComplex.Table.comp k x y h) = OAI.Thomason.DirectedComplex.Table.comp k (f.table x) (f.table y) h' := by + ext p e + simp only [OAI.Thomason.DirectedComplex.Hom.table, OAI.Thomason.DirectedComplex.Table.comp] + split_ifs <;> simp only [map_add] + exact { + map := f.table + map_source k x := (proof_table_truncate_15 f k Bool.false x) + map_target k x := (proof_table_truncate_15 f k Bool.true x) + map_comp := (proof_table_comp_16 f) + } + + +end OAI.Thomason.DirectedComplex.Hom +end + +section +namespace OAI.Thomason.DirectedComplex + + +noncomputable def nuFunctor : CategoryTheory.Functor OAI.Thomason.DirectedComplex.{u} OAI.Thomason.OmegaCategory.{u} where + obj := OAI.Thomason.DirectedComplex.nu + map := OAI.Thomason.DirectedComplex.Hom.nu + map_id K := by + change OAI.Thomason.DirectedComplex.Hom.nu (OAI.Thomason.DirectedComplex.Hom.id K) = OAI.Thomason.OmegaCategory.Functor.id K.nu + ext x + rfl + map_comp f g := by + change OAI.Thomason.DirectedComplex.Hom.nu (OAI.Thomason.DirectedComplex.Hom.comp f g) = OAI.Thomason.OmegaCategory.Functor.comp f.nu g.nu + ext x + rfl + + +end OAI.Thomason.DirectedComplex +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] + +noncomputable abbrev Word (E : Type u) [PartialOrder E] := + {l : List E // l.Pairwise (· < ·)} + +noncomputable abbrev Chains (E : Type u) [PartialOrder E] := OAI.Thomason.NormalizedChains.Word E →₀ ℤ + +noncomputable def bracket (l : List E) : OAI.Thomason.NormalizedChains.Chains E := by + classical + exact if h : l.Pairwise (· < ·) then Finsupp.single ⟨l, h⟩ 1 else 0 + +noncomputable def prepend (a : E) : OAI.Thomason.NormalizedChains.Chains E →ₗ[ℤ] OAI.Thomason.NormalizedChains.Chains E := + Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (a :: l.val)) + +noncomputable def wordBoundary : List E → OAI.Thomason.NormalizedChains.Chains E + | [] => 0 + | a :: l => OAI.Thomason.NormalizedChains.bracket l - OAI.Thomason.NormalizedChains.prepend a (wordBoundary l) + +noncomputable def boundary : OAI.Thomason.NormalizedChains.Chains E →ₗ[ℤ] OAI.Thomason.NormalizedChains.Chains E := + Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.wordBoundary l.val) + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] +omit [PartialOrder E] +variable {M : Type v} [AddCommGroup M] + +noncomputable def faces (H : List E → M) : List E → M + | [] => 0 + | a :: l => H l - faces (fun m => H (a :: m)) l + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] + +noncomputable def grade (k : ℕ) : Submodule ℤ (OAI.Thomason.NormalizedChains.Chains E) := + Finsupp.supported ℤ ℤ {w : OAI.Thomason.NormalizedChains.Word E | w.val.length = k} + +noncomputable def emptyWord : OAI.Thomason.NormalizedChains.Word E := ⟨[], List.Pairwise.nil⟩ + +noncomputable def emptyCoefficient : OAI.Thomason.NormalizedChains.Chains E →ₗ[ℤ] ℤ := Finsupp.lapply OAI.Thomason.NormalizedChains.emptyWord + +noncomputable def Positive (c : OAI.Thomason.NormalizedChains.Chains E) : Prop := ∀ l, 0 ≤ c l + +noncomputable def positiveGrade (p : ℕ) : AddSubmonoid (OAI.Thomason.NormalizedChains.grade (E := E) (p+1)) where + carrier := {c | Positive c.val} + zero_mem' _ := le_rfl + add_mem' ha hb w := add_nonneg (ha w) (hb w) + +noncomputable def complex (E : Type u) [PartialOrder E] : OAI.Thomason.DirectedComplex.{u} := by + classical + have proof_mem_grade_iff_20 {E : Type u} [instLocal1 : PartialOrder.{u} E] (k : ℕ) (c : OAI.Thomason.NormalizedChains.Chains E) : + c ∈ OAI.Thomason.NormalizedChains.grade k ↔ ∀ w, c w ≠ 0 → w.val.length = k := by + simp only [OAI.Thomason.NormalizedChains.grade, Finsupp.mem_supported, Set.subset_def, Finsupp.mem_support_iff, + Finset.mem_coe, Set.mem_ofPred_eq] + have proof_linearCombination_mem_grade_21 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type u} [PartialOrder D] + (H : OAI.Thomason.NormalizedChains.Word E → OAI.Thomason.NormalizedChains.Chains D) (k j : ℕ) + (hH : ∀ w, w.val.length = k → H w ∈ OAI.Thomason.NormalizedChains.grade j) + {c : OAI.Thomason.NormalizedChains.Chains E} (hc : c ∈ OAI.Thomason.NormalizedChains.grade k) : + Finsupp.linearCombination ℤ H c ∈ OAI.Thomason.NormalizedChains.grade j := by + rw [Finsupp.linearCombination_apply, Finsupp.sum] + apply Submodule.sum_mem + intro w hw + exact Submodule.smul_mem _ _ (hH w ((proof_mem_grade_iff_20 k c).mp hc w + (Finsupp.mem_support_iff.mp hw))) + have proof_bracket_of_pairwise_22 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = Finsupp.single ⟨l, h⟩ 1 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_bracket_of_not_pairwise_23 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : ¬l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = 0 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_bracket_mem_grade_24 {E : Type u} [instLocal1 : PartialOrder.{u} E] (l : List E) : OAI.Thomason.NormalizedChains.bracket l ∈ OAI.Thomason.NormalizedChains.grade l.length := by + classical + by_cases h : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 h] + exact Finsupp.single_mem_supported ℤ 1 rfl + · rw [proof_bracket_of_not_pairwise_23 h] + exact Submodule.zero_mem _ + have proof_wordBoundary_nil_25 {E : Type u} [instLocal1 : PartialOrder.{u} E] : OAI.Thomason.NormalizedChains.wordBoundary ([] : List E) = 0 := rfl + have proof_wordBoundary_cons_26 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: l) = OAI.Thomason.NormalizedChains.bracket l - OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.wordBoundary l) := rfl + have proof_prepend_bracket_27 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.bracket (a :: l) := by + classical + by_cases h : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 h] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (a :: l.val)) + (Finsupp.single (⟨l, h⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp + · have h' : ¬(a :: l).Pairwise (· < ·) := fun hw => h hw.tail + simp [proof_bracket_of_not_pairwise_23 h, proof_bracket_of_not_pairwise_23 h'] + have proof_prepend_mem_grade_28 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) {k : ℕ} {c : OAI.Thomason.NormalizedChains.Chains E} (hc : c ∈ OAI.Thomason.NormalizedChains.grade k) : + OAI.Thomason.NormalizedChains.prepend a c ∈ OAI.Thomason.NormalizedChains.grade (k+1) := by + apply proof_linearCombination_mem_grade_21 _ k (k+1) _ hc + intro w hw + simpa only [List.length_cons, hw] using proof_bracket_mem_grade_24 (a :: w.val) + have proof_wordBoundary_mem_grade_29 {E : Type u} [instLocal1 : PartialOrder.{u} E] (l : List E) : OAI.Thomason.NormalizedChains.wordBoundary l ∈ OAI.Thomason.NormalizedChains.grade (l.length-1) := by + induction l with + | nil => exact Submodule.zero_mem _ + | cons a l ih => + cases l with + | nil => simpa [proof_wordBoundary_nil_25, proof_wordBoundary_cons_26, proof_prepend_bracket_27, OAI.Thomason.NormalizedChains.wordBoundary] using proof_bracket_mem_grade_24 ([] : List E) + | cons b l => + rw [proof_wordBoundary_cons_26] + apply Submodule.sub_mem + · simpa [proof_wordBoundary_nil_25, proof_wordBoundary_cons_26, proof_prepend_bracket_27] using proof_bracket_mem_grade_24 (b :: l) + · simpa [proof_wordBoundary_nil_25, proof_wordBoundary_cons_26, proof_prepend_bracket_27] using proof_prepend_mem_grade_28 a ih + have proof_boundary_mem_grade_18 {E : Type u} [instLocal1 : PartialOrder.{u} E] {k : ℕ} {c : OAI.Thomason.NormalizedChains.Chains E} (hc : c ∈ OAI.Thomason.NormalizedChains.grade (k+1)) : + OAI.Thomason.NormalizedChains.boundary c ∈ OAI.Thomason.NormalizedChains.grade k := by + apply proof_linearCombination_mem_grade_21 _ (k+1) k _ hc + intro w hw + simpa only [hw, Nat.add_sub_cancel] using proof_wordBoundary_mem_grade_29 w.val + have proof_prepend_prepend_self_30 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (c : OAI.Thomason.NormalizedChains.Chains E) : OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.prepend a c) = 0 := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih, add_zero] + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_22 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul, proof_prepend_bracket_27] + have h : ¬(a :: a :: l.val).Pairwise (· < ·) := by simp [] + simp [proof_bracket_of_not_pairwise_23 h] + have proof_wordBoundary_repeated_31 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: a :: l) = 0 := by + simp [proof_prepend_bracket_27, OAI.Thomason.NormalizedChains.wordBoundary, map_sub, proof_prepend_prepend_self_30] + have proof_wordBoundary_eq_zero_of_not_pairwise_32 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} + (h : l.Pairwise (· ≤ ·)) (hn : ¬l.Pairwise (· < ·)) : OAI.Thomason.NormalizedChains.wordBoundary l = 0 := by + induction l with + | nil => exact (hn (by simp)).elim + | cons a l ih => + by_cases hl : l.Pairwise (· < ·) + · cases l with + | nil => exact (hn (by simp)).elim + | cons b l => + have hab : a ≤ b := (List.pairwise_cons.mp h).1 b (by simp) + have hab' : ¬a < b := by + intro hab' + exact hn (List.Pairwise.cons_cons_of_trans hab' hl) + have heq : a = b := (lt_or_eq_of_le hab).resolve_left hab' + subst b + exact proof_wordBoundary_repeated_31 a l + · simp [OAI.Thomason.NormalizedChains.wordBoundary, proof_bracket_of_not_pairwise_23 hl, ih h.tail hl] + have proof_boundary_bracket_33 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.wordBoundary l := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 hs] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.wordBoundary l.val) + (Finsupp.single (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp [] + · simp [proof_bracket_of_not_pairwise_23 hs, proof_wordBoundary_eq_zero_of_not_pairwise_32 h hs] + have proof_faces_nil_34 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H : List E → M) : OAI.Thomason.NormalizedChains.faces H [] = 0 := rfl + have proof_faces_cons_35 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H : List E → M) (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.faces H (a :: l) = H l - OAI.Thomason.NormalizedChains.faces (fun m => H (a :: m)) l := rfl + have proof_faces_hom_36 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] {M' : Type u} [AddCommGroup M'] (q : M →+ M') + (H : List E → M) (l : List E) : + q (OAI.Thomason.NormalizedChains.faces H l) = OAI.Thomason.NormalizedChains.faces (fun m => q (H m)) l := by + induction l generalizing H with + | nil => simp only [OAI.Thomason.NormalizedChains.faces, map_zero] + | cons a l ih => simp only [OAI.Thomason.NormalizedChains.faces, map_sub, ih] + have proof_faces_bracket_37 {E : Type u} [instLocal1 : PartialOrder.{u} E] (l : List E) : OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.bracket l = OAI.Thomason.NormalizedChains.wordBoundary l := by + induction l with + | nil => rfl + | cons a l ih => + rw [proof_faces_cons_35, proof_wordBoundary_cons_26] + have h := proof_faces_hom_36 (OAI.Thomason.NormalizedChains.prepend a).toAddMonoidHom OAI.Thomason.NormalizedChains.bracket l + simp only [LinearMap.toAddMonoidHom_coe, proof_prepend_bracket_27] at h + rw [← h, ih] + have proof_faces_congr_38 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] {H K : List E → M} {l : List E} + (h : ∀ m, m.Sublist l → H m = K m) : OAI.Thomason.NormalizedChains.faces H l = OAI.Thomason.NormalizedChains.faces K l := by + induction l generalizing H K with + | nil => rfl + | cons a l ih => + rw [proof_faces_cons_35, proof_faces_cons_35, h l (List.sublist_cons_self a l)] + congr 1 + exact ih (fun m hm => h (a :: m) (List.Sublist.cons_cons a hm)) + have proof_faces_sub_39 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H K : List E → M) (l : List E) : + OAI.Thomason.NormalizedChains.faces (fun m => H m - K m) l = OAI.Thomason.NormalizedChains.faces H l - OAI.Thomason.NormalizedChains.faces K l := by + induction l generalizing H K with + | nil => simp [proof_faces_nil_34] + | cons a l ih => simp only [proof_faces_cons_35, ih]; abel + have proof_faces_faces_40 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H : List E → M) (l : List E) : + OAI.Thomason.NormalizedChains.faces (OAI.Thomason.NormalizedChains.faces H) l = 0 := by + induction l generalizing H with + | nil => rfl + | cons a l ih => + simp only [proof_faces_cons_35] + rw [proof_faces_sub_39, ih] + simp [] + have proof_boundary_wordBoundary_41 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.wordBoundary l) = 0 := by + rw [← proof_faces_bracket_37] + change OAI.Thomason.NormalizedChains.boundary.toAddMonoidHom (OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.bracket l) = 0 + rw [proof_faces_hom_36] + have hc : OAI.Thomason.NormalizedChains.faces (fun m => OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.bracket m)) l = OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.wordBoundary l := by + apply proof_faces_congr_38 + intro m hm + exact proof_boundary_bracket_33 (h.sublist hm) + change OAI.Thomason.NormalizedChains.faces (fun m => OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.bracket m)) l = 0 + rw [hc] + change OAI.Thomason.NormalizedChains.faces (fun m => OAI.Thomason.NormalizedChains.wordBoundary m) l = 0 + simp_rw [← proof_faces_bracket_37] + exact proof_faces_faces_40 OAI.Thomason.NormalizedChains.bracket l + have proof_boundary_boundary_19 {E : Type u} [instLocal1 : PartialOrder.{u} E] (c : OAI.Thomason.NormalizedChains.Chains E) : OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.boundary c) = 0 := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih, add_zero] + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_22 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul] + rw [proof_boundary_bracket_33 (l.property.imp fun h => le_of_lt h), + proof_boundary_wordBoundary_41 (l.property.imp fun h => le_of_lt h), smul_zero] + exact { + Chain p := OAI.Thomason.NormalizedChains.grade (E := E) (p+1) + group _ := inferInstance + d p := + { toFun := fun c => ⟨OAI.Thomason.NormalizedChains.boundary c.val, proof_boundary_mem_grade_18 c.property⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' := fun x y => Subtype.ext (map_add _ x.val y.val) } + d_d p x := Subtype.ext (proof_boundary_boundary_19 x.val) + augmentation := + { toFun := fun c => OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.boundary c.val) + map_zero' := by simp [] + map_add' := by intros; simp [] } + augmentation_d x := by + change OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.boundary x.val)) = 0 + rw [proof_boundary_boundary_19, map_zero] + positive := OAI.Thomason.NormalizedChains.positiveGrade + } + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] +variable {D : Type v} [PartialOrder D] {B : Type w} [PartialOrder B] + +noncomputable def map (f : E →o D) : OAI.Thomason.NormalizedChains.Chains E →ₗ[ℤ] OAI.Thomason.NormalizedChains.Chains D := + Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (l.val.map f)) + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] + +noncomputable def complexMap {D : Type v} [PartialOrder D] (f : E →o D) : + OAI.Thomason.DirectedComplex.Hom (OAI.Thomason.NormalizedChains.complex E) (OAI.Thomason.NormalizedChains.complex D) := by + classical + have proof_mem_grade_iff_20 {E : Type u} [instLocal1 : PartialOrder.{u} E] (k : ℕ) (c : OAI.Thomason.NormalizedChains.Chains E) : + c ∈ OAI.Thomason.NormalizedChains.grade k ↔ ∀ w, c w ≠ 0 → w.val.length = k := by + simp only [OAI.Thomason.NormalizedChains.grade, Finsupp.mem_supported, Set.subset_def, Finsupp.mem_support_iff, + Finset.mem_coe, Set.mem_ofPred_eq] + have proof_linearCombination_mem_grade_46 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [PartialOrder D] + (H : OAI.Thomason.NormalizedChains.Word E → OAI.Thomason.NormalizedChains.Chains D) (k j : ℕ) + (hH : ∀ w, w.val.length = k → H w ∈ OAI.Thomason.NormalizedChains.grade j) + {c : OAI.Thomason.NormalizedChains.Chains E} (hc : c ∈ OAI.Thomason.NormalizedChains.grade k) : + Finsupp.linearCombination ℤ H c ∈ OAI.Thomason.NormalizedChains.grade j := by + rw [Finsupp.linearCombination_apply, Finsupp.sum] + apply Submodule.sum_mem + intro w hw + exact Submodule.smul_mem _ _ (hH w ((proof_mem_grade_iff_20 k c).mp hc w + (Finsupp.mem_support_iff.mp hw))) + have proof_bracket_of_pairwise_47 {E : Type v} [instLocal1 : PartialOrder.{v} E] {l : List E} (h : l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = Finsupp.single ⟨l, h⟩ 1 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_bracket_of_not_pairwise_48 {E : Type v} [instLocal1 : PartialOrder.{v} E] {l : List E} (h : ¬l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = 0 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_bracket_mem_grade_49 {E : Type v} [instLocal1 : PartialOrder.{v} E] (l : List E) : OAI.Thomason.NormalizedChains.bracket l ∈ OAI.Thomason.NormalizedChains.grade l.length := by + classical + by_cases h : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_47 h] + exact Finsupp.single_mem_supported ℤ 1 rfl + · rw [proof_bracket_of_not_pairwise_48 h] + exact Submodule.zero_mem _ + have proof_map_mem_grade_42 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [PartialOrder D] (f : E →o D) {k : ℕ} + {c : OAI.Thomason.NormalizedChains.Chains E} (hc : c ∈ OAI.Thomason.NormalizedChains.grade k) : OAI.Thomason.NormalizedChains.map f c ∈ OAI.Thomason.NormalizedChains.grade k := by + apply proof_linearCombination_mem_grade_46 _ k k _ hc + intro w hw + simpa only [List.length_map, hw] using proof_bracket_mem_grade_49 (w.val.map f) + have proof_bracket_of_pairwise_22 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = Finsupp.single ⟨l, h⟩ 1 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_bracket_of_not_pairwise_23 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : ¬l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = 0 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_prepend_bracket_27 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.bracket (a :: l) := by + classical + by_cases h : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 h] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (a :: l.val)) + (Finsupp.single (⟨l, h⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp + · have h' : ¬(a :: l).Pairwise (· < ·) := fun hw => h hw.tail + simp [proof_bracket_of_not_pairwise_23 h, proof_bracket_of_not_pairwise_23 h'] + have proof_prepend_prepend_self_30 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (c : OAI.Thomason.NormalizedChains.Chains E) : OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.prepend a c) = 0 := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih, add_zero] + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_22 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul, proof_prepend_bracket_27] + have h : ¬(a :: a :: l.val).Pairwise (· < ·) := by simp [] + simp [proof_bracket_of_not_pairwise_23 h] + have proof_wordBoundary_nil_25 {E : Type u} [instLocal1 : PartialOrder.{u} E] : OAI.Thomason.NormalizedChains.wordBoundary ([] : List E) = 0 := rfl + have proof_wordBoundary_cons_26 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: l) = OAI.Thomason.NormalizedChains.bracket l - OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.wordBoundary l) := rfl + have proof_wordBoundary_repeated_31 {E : Type u} [instLocal1 : PartialOrder.{u} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: a :: l) = 0 := by + simp [proof_prepend_bracket_27, OAI.Thomason.NormalizedChains.wordBoundary, map_sub, proof_prepend_prepend_self_30] + have proof_wordBoundary_eq_zero_of_not_pairwise_32 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} + (h : l.Pairwise (· ≤ ·)) (hn : ¬l.Pairwise (· < ·)) : OAI.Thomason.NormalizedChains.wordBoundary l = 0 := by + induction l with + | nil => exact (hn (by simp)).elim + | cons a l ih => + by_cases hl : l.Pairwise (· < ·) + · cases l with + | nil => exact (hn (by simp)).elim + | cons b l => + have hab : a ≤ b := (List.pairwise_cons.mp h).1 b (by simp) + have hab' : ¬a < b := by + intro hab' + exact hn (List.Pairwise.cons_cons_of_trans hab' hl) + have heq : a = b := (lt_or_eq_of_le hab).resolve_left hab' + subst b + exact proof_wordBoundary_repeated_31 a l + · simp [OAI.Thomason.NormalizedChains.wordBoundary, proof_bracket_of_not_pairwise_23 hl, ih h.tail hl] + have proof_boundary_bracket_33 {E : Type u} [instLocal1 : PartialOrder.{u} E] {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.wordBoundary l := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 hs] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.wordBoundary l.val) + (Finsupp.single (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp [] + · simp [proof_bracket_of_not_pairwise_23 hs, proof_wordBoundary_eq_zero_of_not_pairwise_32 h hs] + have proof_faces_nil_34 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H : List E → M) : OAI.Thomason.NormalizedChains.faces H [] = 0 := rfl + have proof_faces_cons_35 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] (H : List E → M) (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.faces H (a :: l) = H l - OAI.Thomason.NormalizedChains.faces (fun m => H (a :: m)) l := rfl + have proof_faces_hom_36 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] {M' : Type u} [AddCommGroup M'] (q : M →+ M') + (H : List E → M) (l : List E) : + q (OAI.Thomason.NormalizedChains.faces H l) = OAI.Thomason.NormalizedChains.faces (fun m => q (H m)) l := by + induction l generalizing H with + | nil => simp only [OAI.Thomason.NormalizedChains.faces, map_zero] + | cons a l ih => simp only [OAI.Thomason.NormalizedChains.faces, map_sub, ih] + have proof_faces_bracket_37 {E : Type u} [instLocal1 : PartialOrder.{u} E] (l : List E) : OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.bracket l = OAI.Thomason.NormalizedChains.wordBoundary l := by + induction l with + | nil => rfl + | cons a l ih => + rw [proof_faces_cons_35, proof_wordBoundary_cons_26] + have h := proof_faces_hom_36 (OAI.Thomason.NormalizedChains.prepend a).toAddMonoidHom OAI.Thomason.NormalizedChains.bracket l + simp only [LinearMap.toAddMonoidHom_coe, proof_prepend_bracket_27] at h + rw [← h, ih] + have proof_faces_nil_50 {E : Type v} {M : Type v} [instLocal2 : AddCommGroup.{v} M] (H : List E → M) : OAI.Thomason.NormalizedChains.faces H [] = 0 := rfl + have proof_faces_cons_51 {E : Type v} {M : Type v} [instLocal2 : AddCommGroup.{v} M] (H : List E → M) (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.faces H (a :: l) = H l - OAI.Thomason.NormalizedChains.faces (fun m => H (a :: m)) l := rfl + have proof_wordBoundary_nil_52 {E : Type v} [instLocal1 : PartialOrder.{v} E] : OAI.Thomason.NormalizedChains.wordBoundary ([] : List E) = 0 := rfl + have proof_wordBoundary_cons_53 {E : Type v} [instLocal1 : PartialOrder.{v} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: l) = OAI.Thomason.NormalizedChains.bracket l - OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.wordBoundary l) := rfl + have proof_faces_hom_54 {E : Type v} {M : Type v} [instLocal2 : AddCommGroup.{v} M] {M' : Type v} [AddCommGroup M'] (q : M →+ M') + (H : List E → M) (l : List E) : + q (OAI.Thomason.NormalizedChains.faces H l) = OAI.Thomason.NormalizedChains.faces (fun m => q (H m)) l := by + induction l generalizing H with + | nil => simp [proof_faces_nil_50] + | cons a l ih => simp only [proof_faces_cons_51, map_sub, ih] + have proof_prepend_bracket_55 {E : Type v} [instLocal1 : PartialOrder.{v} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.bracket (a :: l) := by + classical + by_cases h : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_47 h] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (a :: l.val)) + (Finsupp.single (⟨l, h⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp + · have h' : ¬(a :: l).Pairwise (· < ·) := fun hw => h hw.tail + simp [proof_bracket_of_not_pairwise_48 h, proof_bracket_of_not_pairwise_48 h'] + have proof_faces_bracket_56 {E : Type v} [instLocal1 : PartialOrder.{v} E] (l : List E) : OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.bracket l = OAI.Thomason.NormalizedChains.wordBoundary l := by + induction l with + | nil => rfl + | cons a l ih => + rw [proof_faces_cons_51, proof_wordBoundary_cons_53] + have h := proof_faces_hom_54 (OAI.Thomason.NormalizedChains.prepend a).toAddMonoidHom OAI.Thomason.NormalizedChains.bracket l + simp only [LinearMap.toAddMonoidHom_coe, proof_prepend_bracket_55] at h + rw [← h, ih] + have proof_faces_hom_57 {E : Type u} {M : Type u} [instLocal2 : AddCommGroup.{u} M] {M' : Type v} [AddCommGroup M'] (q : M →+ M') + (H : List E → M) (l : List E) : + q (OAI.Thomason.NormalizedChains.faces H l) = OAI.Thomason.NormalizedChains.faces (fun m => q (H m)) l := by + induction l generalizing H with + | nil => simp only [OAI.Thomason.NormalizedChains.faces, map_zero] + | cons a l ih => simp only [OAI.Thomason.NormalizedChains.faces, map_sub, ih] + have proof_faces_map_58 {E : Type v} {M : Type v} [instLocal2 : AddCommGroup.{v} M] {D : Type u} (f : D → E) (H : List E → M) (l : List D) : + OAI.Thomason.NormalizedChains.faces H (l.map f) = OAI.Thomason.NormalizedChains.faces (fun m => H (m.map f)) l := by + induction l generalizing H with + | nil => rfl + | cons a l ih => simp only [List.map_cons, OAI.Thomason.NormalizedChains.faces, ih] + have proof_faces_nil_59 {E : Type u} {M : Type v} [instLocal2 : AddCommGroup.{v} M] (H : List E → M) : OAI.Thomason.NormalizedChains.faces H [] = 0 := rfl + have proof_faces_cons_60 {E : Type u} {M : Type v} [instLocal2 : AddCommGroup.{v} M] (H : List E → M) (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.faces H (a :: l) = H l - OAI.Thomason.NormalizedChains.faces (fun m => H (a :: m)) l := rfl + have proof_faces_congr_61 {E : Type u} {M : Type v} [instLocal2 : AddCommGroup.{v} M] {H K : List E → M} {l : List E} + (h : ∀ m, m.Sublist l → H m = K m) : OAI.Thomason.NormalizedChains.faces H l = OAI.Thomason.NormalizedChains.faces K l := by + induction l generalizing H K with + | nil => rfl + | cons a l ih => + rw [proof_faces_cons_60, proof_faces_cons_60, h l (List.sublist_cons_self a l)] + congr 1 + exact ih (fun m hm => h (a :: m) (List.Sublist.cons_cons a hm)) + have proof_pairwise_of_map_62 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [instLocal3 : PartialOrder.{v} D] {l : List E} (h : l.Pairwise (· ≤ ·)) (f : E → D) + (hf : (l.map f).Pairwise (· < ·)) : l.Pairwise (· < ·) := by + apply (h.and (List.pairwise_map.mp hf)).imp + intro a b hab + exact lt_of_le_of_ne hab.1 (fun he => (ne_of_lt hab.2) (congrArg f he)) + have proof_map_bracket_63 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [instLocal3 : PartialOrder.{v} D] (f : E →o D) {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.map f (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.bracket (l.map f) := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_22 hs] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (l.val.map f)) + (Finsupp.single (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp + · have hf : ¬(l.map f).Pairwise (· < ·) := fun hm => hs (proof_pairwise_of_map_62 h f hm) + simp [proof_bracket_of_not_pairwise_23 hs, proof_bracket_of_not_pairwise_48 hf] + have proof_map_wordBoundary_64 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [instLocal3 : PartialOrder.{v} D] (f : E →o D) {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.map f (OAI.Thomason.NormalizedChains.wordBoundary l) = OAI.Thomason.NormalizedChains.wordBoundary (l.map f) := by + rw [← proof_faces_bracket_37, ← proof_faces_bracket_56] + change (OAI.Thomason.NormalizedChains.map f).toAddMonoidHom (OAI.Thomason.NormalizedChains.faces OAI.Thomason.NormalizedChains.bracket l) = _ + rw [proof_faces_hom_57, proof_faces_map_58] + apply proof_faces_congr_61 + intro m hm + exact proof_map_bracket_63 f (h.sublist hm) + have proof_prepend_prepend_self_65 {E : Type v} [instLocal1 : PartialOrder.{v} E] (a : E) (c : OAI.Thomason.NormalizedChains.Chains E) : OAI.Thomason.NormalizedChains.prepend a (OAI.Thomason.NormalizedChains.prepend a c) = 0 := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih, add_zero] + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_47 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul, proof_prepend_bracket_55] + have h : ¬(a :: a :: l.val).Pairwise (· < ·) := by simp [] + simp [proof_bracket_of_not_pairwise_48 h] + have proof_wordBoundary_repeated_66 {E : Type v} [instLocal1 : PartialOrder.{v} E] (a : E) (l : List E) : + OAI.Thomason.NormalizedChains.wordBoundary (a :: a :: l) = 0 := by + simp [proof_prepend_bracket_55, OAI.Thomason.NormalizedChains.wordBoundary, map_sub, proof_prepend_prepend_self_65] + have proof_wordBoundary_eq_zero_of_not_pairwise_67 {E : Type v} [instLocal1 : PartialOrder.{v} E] {l : List E} + (h : l.Pairwise (· ≤ ·)) (hn : ¬l.Pairwise (· < ·)) : OAI.Thomason.NormalizedChains.wordBoundary l = 0 := by + induction l with + | nil => exact (hn (by simp)).elim + | cons a l ih => + by_cases hl : l.Pairwise (· < ·) + · cases l with + | nil => exact (hn (by simp)).elim + | cons b l => + have hab : a ≤ b := (List.pairwise_cons.mp h).1 b (by simp) + have hab' : ¬a < b := by + intro hab' + exact hn (List.Pairwise.cons_cons_of_trans hab' hl) + have heq : a = b := (lt_or_eq_of_le hab).resolve_left hab' + subst b + exact proof_wordBoundary_repeated_66 a l + · simp [OAI.Thomason.NormalizedChains.wordBoundary, proof_bracket_of_not_pairwise_48 hl, ih h.tail hl] + have proof_boundary_bracket_68 {E : Type v} [instLocal1 : PartialOrder.{v} E] {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.wordBoundary l := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_47 hs] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.wordBoundary l.val) + (Finsupp.single (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp [] + · simp [proof_bracket_of_not_pairwise_48 hs, proof_wordBoundary_eq_zero_of_not_pairwise_67 h hs] + have proof_map_boundary_43 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [instLocal3 : PartialOrder.{v} D] (f : E →o D) (c : OAI.Thomason.NormalizedChains.Chains E) : + OAI.Thomason.NormalizedChains.map f (OAI.Thomason.NormalizedChains.boundary c) = OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.map f c) := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_22 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + have hl := l.property.imp fun h => le_of_lt h + rw [hz] + simp only [map_smul] + rw [proof_boundary_bracket_33 hl, proof_map_wordBoundary_64 f hl, proof_map_bracket_63 f hl, + proof_boundary_bracket_68 (List.pairwise_map.mpr (hl.imp fun hh => f.monotone hh))] + have proof_emptyCoefficient_bracket_69 {E : Type v} [instLocal1 : PartialOrder.{v} E] (l : List E) : + OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.bracket l) = if l = [] then 1 else 0 := by + classical + by_cases hl : l = [] + · subst l + simp [OAI.Thomason.NormalizedChains.emptyCoefficient, proof_bracket_of_pairwise_47 List.Pairwise.nil, OAI.Thomason.NormalizedChains.emptyWord] + · by_cases hs : l.Pairwise (· < ·) + · have hw : (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) ≠ OAI.Thomason.NormalizedChains.emptyWord := by + intro he + exact hl (congrArg Subtype.val he) + simp [OAI.Thomason.NormalizedChains.emptyCoefficient, proof_bracket_of_pairwise_47 hs, hw, hl] + · simp [proof_bracket_of_not_pairwise_48 hs, hl] + have proof_emptyCoefficient_bracket_70 {E : Type u} [instLocal1 : PartialOrder.{u} E] (l : List E) : + OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.bracket l) = if l = [] then 1 else 0 := by + classical + by_cases hl : l = [] + · subst l + simp [OAI.Thomason.NormalizedChains.emptyCoefficient, proof_bracket_of_pairwise_22 List.Pairwise.nil, OAI.Thomason.NormalizedChains.emptyWord] + · by_cases hs : l.Pairwise (· < ·) + · have hw : (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) ≠ OAI.Thomason.NormalizedChains.emptyWord := by + intro he + exact hl (congrArg Subtype.val he) + simp [OAI.Thomason.NormalizedChains.emptyCoefficient, proof_bracket_of_pairwise_22 hs, hw, hl] + · simp [proof_bracket_of_not_pairwise_23 hs, hl] + have proof_emptyCoefficient_map_44 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [PartialOrder D] (f : E →o D) (c : OAI.Thomason.NormalizedChains.Chains E) : + OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.map f c) = OAI.Thomason.NormalizedChains.emptyCoefficient c := by + classical + induction c using Finsupp.induction with + | zero => simp [] + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_22 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul, proof_map_bracket_63 _ (l.property.imp fun h => le_of_lt h), + proof_emptyCoefficient_bracket_69, proof_emptyCoefficient_bracket_70, List.map_eq_nil_iff] + have proof_linearCombination_positive_71 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [PartialOrder D] + (H : OAI.Thomason.NormalizedChains.Word E → OAI.Thomason.NormalizedChains.Chains D) (hH : ∀ w, OAI.Thomason.NormalizedChains.Positive (H w)) + {c : OAI.Thomason.NormalizedChains.Chains E} (hc : OAI.Thomason.NormalizedChains.Positive c) : + OAI.Thomason.NormalizedChains.Positive (Finsupp.linearCombination ℤ H c) := by + intro w + rw [Finsupp.linearCombination_apply, Finsupp.sum] + simp only [Finset.sum_apply, Finsupp.coe_finsetSum] + apply Finset.sum_nonneg + intro i _ + exact mul_nonneg (hc i) (hH i w) + have proof_bracket_positive_72 {E : Type v} [instLocal1 : PartialOrder.{v} E] (l : List E) : OAI.Thomason.NormalizedChains.Positive (OAI.Thomason.NormalizedChains.bracket l) := by + classical + intro w + by_cases h : l.Pairwise (· < ·) + · simp [proof_bracket_of_pairwise_47 h, Finsupp.single_apply] + split <;> omega + · simp [proof_bracket_of_not_pairwise_48 h] + have proof_map_positive_45 {E : Type u} [instLocal1 : PartialOrder.{u} E] {D : Type v} [PartialOrder D] (f : E →o D) + {c : OAI.Thomason.NormalizedChains.Chains E} (hc : OAI.Thomason.NormalizedChains.Positive c) : OAI.Thomason.NormalizedChains.Positive (OAI.Thomason.NormalizedChains.map f c) := + proof_linearCombination_positive_71 _ (fun w => proof_bracket_positive_72 (w.val.map f)) hc + exact { + map p := + { toFun := fun c => ⟨OAI.Thomason.NormalizedChains.map f c.val, proof_map_mem_grade_42 f c.property⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' := fun x y => Subtype.ext (map_add _ x.val y.val) } + map_d p x := Subtype.ext (proof_map_boundary_43 f x.val) + map_augmentation x := by + change OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.boundary (OAI.Thomason.NormalizedChains.map f x.val)) = OAI.Thomason.NormalizedChains.emptyCoefficient (OAI.Thomason.NormalizedChains.boundary x.val) + rw [← proof_map_boundary_43, proof_emptyCoefficient_map_44] + map_positive p x hx := proof_map_positive_45 f hx + } + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason.NormalizedChains +variable {E : Type u} [PartialOrder E] +open CategoryTheory + +noncomputable def simplexComplexes : SimplexCategory ⥤ OAI.Thomason.DirectedComplex.{0} := by + classical + have proof_bracket_of_pairwise_75 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {l : List E} (h : l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = Finsupp.single ⟨l, h⟩ 1 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_pairwise_of_map_76 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {D : Type 0} [instLocal3 : PartialOrder.{0} D] {l : List E} (h : l.Pairwise (· ≤ ·)) (f : E → D) + (hf : (l.map f).Pairwise (· < ·)) : l.Pairwise (· < ·) := by + apply (h.and (List.pairwise_map.mp hf)).imp + intro a b hab + exact lt_of_le_of_ne hab.1 (fun he => (ne_of_lt hab.2) (congrArg f he)) + have proof_bracket_of_not_pairwise_77 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {l : List E} (h : ¬l.Pairwise (· < ·)) : + OAI.Thomason.NormalizedChains.bracket l = 0 := by + classical + simp [OAI.Thomason.NormalizedChains.bracket, h] + have proof_map_bracket_78 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {D : Type 0} [instLocal3 : PartialOrder.{0} D] (f : E →o D) {l : List E} (h : l.Pairwise (· ≤ ·)) : + OAI.Thomason.NormalizedChains.map f (OAI.Thomason.NormalizedChains.bracket l) = OAI.Thomason.NormalizedChains.bracket (l.map f) := by + classical + by_cases hs : l.Pairwise (· < ·) + · rw [proof_bracket_of_pairwise_75 hs] + change Finsupp.linearCombination ℤ (fun l : OAI.Thomason.NormalizedChains.Word E => OAI.Thomason.NormalizedChains.bracket (l.val.map f)) + (Finsupp.single (⟨l, hs⟩ : OAI.Thomason.NormalizedChains.Word E) 1) = _ + rw [Finsupp.linearCombination_single] + simp + · have hf : ¬(l.map f).Pairwise (· < ·) := fun hm => hs (proof_pairwise_of_map_76 h f hm) + simp [proof_bracket_of_not_pairwise_77 hs, proof_bracket_of_not_pairwise_77 hf] + have proof_map_id_79 {E : Type 0} [instLocal1 : PartialOrder.{0} E] (c : OAI.Thomason.NormalizedChains.Chains E) : OAI.Thomason.NormalizedChains.map (OrderHom.id) c = c := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_75 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz, map_smul, proof_map_bracket_78 _ (l.property.imp fun h => le_of_lt h)] + simp + have proof_complexMap_id_73 {E : Type 0} [instLocal1 : PartialOrder.{0} E] : OAI.Thomason.NormalizedChains.complexMap (OrderHom.id : E →o E) = + OAI.Thomason.DirectedComplex.Hom.id (OAI.Thomason.NormalizedChains.complex E) := by + ext p x + apply Subtype.ext + exact proof_map_id_79 x.val + have proof_map_comp_80 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {D : Type 0} [instLocal3 : PartialOrder.{0} D] {B : Type 0} [instLocal5 : PartialOrder.{0} B] (f : E →o D) (g : D →o B) (c : OAI.Thomason.NormalizedChains.Chains E) : + OAI.Thomason.NormalizedChains.map (g.comp f) c = OAI.Thomason.NormalizedChains.map g (OAI.Thomason.NormalizedChains.map f c) := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • OAI.Thomason.NormalizedChains.bracket l.val := by + rw [proof_bracket_of_pairwise_75 l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + have hl := l.property.imp fun h => le_of_lt h + rw [hz] + simp only [map_smul] + rw [proof_map_bracket_78 _ hl, proof_map_bracket_78 _ hl, + proof_map_bracket_78 _ (List.pairwise_map.mpr (hl.imp fun hh => f.monotone hh))] + simp [List.map_map] + have proof_complexMap_comp_74 {E : Type 0} [instLocal1 : PartialOrder.{0} E] {D : Type 0} [PartialOrder D] {B : Type 0} [PartialOrder B] + (f : E →o D) (g : D →o B) : OAI.Thomason.NormalizedChains.complexMap (g.comp f) = + OAI.Thomason.DirectedComplex.Hom.comp (OAI.Thomason.NormalizedChains.complexMap f) (OAI.Thomason.NormalizedChains.complexMap g) := by + ext p x + apply Subtype.ext + exact proof_map_comp_80 f g x.val + exact { + obj m := OAI.Thomason.NormalizedChains.complex (Fin (m.len+1)) + map f := OAI.Thomason.NormalizedChains.complexMap f.toOrderHom + map_id _ := proof_complexMap_id_73 + map_comp f g := proof_complexMap_comp_74 f.toOrderHom g.toOrderHom + } + + +end OAI.Thomason.NormalizedChains +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def orientals : SimplexCategory ⥤ OAI.Thomason.OmegaCategory.{0} := + OAI.Thomason.NormalizedChains.simplexComplexes ⋙ OAI.Thomason.DirectedComplex.nuFunctor + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.OmegaCategory + + +noncomputable def ulift (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.{max u v} where + Cell := ULift.{v} C.Cell + source k x := ⟨C.source k x.down⟩ + target k x := ⟨C.target k x.down⟩ + source_source i j x := congrArg ULift.up (C.source_source i j x.down) + target_target i j x := congrArg ULift.up (C.target_target i j x.down) + source_target i j x := by + simpa only [apply_ite] using congrArg (ULift.up (α := C.Cell)) (C.source_target i j x.down) + target_source i j x := by + simpa only [apply_ite] using congrArg (ULift.up (α := C.Cell)) (C.target_source i j x.down) + comp k x y h := ⟨C.comp k x.down y.down (congrArg ULift.down h)⟩ + source_comp_le i k hik x y h := + congrArg ULift.up (C.source_comp_le i k hik x.down y.down (congrArg ULift.down h)) + target_comp_le i k hik x y h := + congrArg ULift.up (C.target_comp_le i k hik x.down y.down (congrArg ULift.down h)) + source_comp_gt i k hki x y h hs := + congrArg ULift.up (C.source_comp_gt i k hki x.down y.down + (congrArg ULift.down h) (congrArg ULift.down hs)) + target_comp_gt i k hki x y h ht := + congrArg ULift.up (C.target_comp_gt i k hki x.down y.down + (congrArg ULift.down h) (congrArg ULift.down ht)) + unit_left k x h := congrArg ULift.up (C.unit_left k x.down (congrArg ULift.down h)) + unit_right k x h := congrArg ULift.up (C.unit_right k x.down (congrArg ULift.down h)) + assoc k x y z hxy hyz hxy_z hx_yz := + congrArg ULift.up (C.assoc k x.down y.down z.down + (congrArg ULift.down hxy) (congrArg ULift.down hyz) + (congrArg ULift.down hxy_z) (congrArg ULift.down hx_yz)) + interchange k l hkl a b c d hab hcd hac hbd h₁ h₂ := + congrArg ULift.up (C.interchange k l hkl a.down b.down c.down d.down + (congrArg ULift.down hab) (congrArg ULift.down hcd) + (congrArg ULift.down hac) (congrArg ULift.down hbd) + (congrArg ULift.down h₁) (congrArg ULift.down h₂)) + finite_dimension x := by + obtain ⟨k, hk⟩ := C.finite_dimension x.down + exact ⟨k, congrArg ULift.up hk⟩ + +noncomputable def uliftUp (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.Functor C (OAI.Thomason.OmegaCategory.ulift.{u,v} C) where + map := ULift.up + map_source _ _ := rfl + map_target _ _ := rfl + map_comp _ _ _ _ _ := rfl + +noncomputable def uliftDown (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.OmegaCategory.ulift.{u,v} C) C where + map := ULift.down + map_source _ _ := rfl + map_target _ _ := rfl + map_comp _ _ _ _ _ := rfl + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory + +noncomputable def uliftFunctor : OAI.Thomason.OmegaCategory.{u} ⥤ OAI.Thomason.OmegaCategory.{max u v} where + obj := OAI.Thomason.OmegaCategory.ulift + map {C D} F := OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.uliftDown C) F) (OAI.Thomason.OmegaCategory.uliftUp D) + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def raisedOrientals : SimplexCategory ⥤ OAI.Thomason.OmegaCategory.{u} := + OAI.Thomason.orientals ⋙ OAI.Thomason.OmegaCategory.uliftFunctor.{0,u} + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.OmegaCategory + + +structure Presentation where + Generator : Type u + dimension : Generator → ℕ + relations : (C : OAI.Thomason.OmegaCategory.{u}) → (Generator → C.Cell) → Prop + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory.Presentation +variable (P : Presentation.{u}) + +structure Interpretation (C : OAI.Thomason.OmegaCategory.{u}) where + map : P.Generator → C.Cell + bounded : ∀ g, C.source (P.dimension g) (map g) = map g + satisfies : P.relations C map + + +end OAI.Thomason.OmegaCategory.Presentation +end + +section +namespace OAI.Thomason.OmegaCategory + + +inductive CellTerm (G : Type u) where + | gen : G → CellTerm G + | source : ℕ → CellTerm G → CellTerm G + | target : ℕ → CellTerm G → CellTerm G + | comp : ℕ → CellTerm G → CellTerm G → CellTerm G + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory.CellTerm + + +noncomputable def composeOrLeft (C : OAI.Thomason.OmegaCategory.{v}) (k : ℕ) (x y : C.Cell) : C.Cell := by + classical + exact if h : C.target k x = C.source k y then C.comp k x y h else x + +noncomputable def eval {G : Type u} (C : OAI.Thomason.OmegaCategory.{v}) (f : G → C.Cell) : OAI.Thomason.OmegaCategory.CellTerm G → C.Cell + | gen g => f g + | source k x => C.source k (eval C f x) + | target k x => C.target k (eval C f x) + | comp k x y => OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft C k (eval C f x) (eval C f y) + + +end OAI.Thomason.OmegaCategory.CellTerm +end + +section +namespace OAI.Thomason.OmegaCategory.Presentation +variable (P : Presentation.{u}) + +noncomputable def Equiv (x y : OAI.Thomason.OmegaCategory.CellTerm P.Generator) : Prop := + ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), x.eval C I.map = y.eval C I.map + +inductive Valid : OAI.Thomason.OmegaCategory.CellTerm P.Generator → Prop + | gen (g) : Valid (.gen g) + | source (k x) : Valid x → Valid (.source k x) + | target (k x) : Valid x → Valid (.target k x) + | comp (k x y) : Valid x → Valid y → P.Equiv (.target k x) (.source k y) → Valid (.comp k x y) + +noncomputable abbrev ValidTerm := {x : OAI.Thomason.OmegaCategory.CellTerm P.Generator // P.Valid x} + +noncomputable instance termSetoid : Setoid P.ValidTerm := by + classical + have proof_refl_81 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} (x : OAI.Thomason.OmegaCategory.CellTerm P.Generator) : P.Equiv x x := fun _ _ => rfl + have proof_symm_82 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (h : P.Equiv x y) : P.Equiv y x := fun C I => (h C I).symm + have proof_trans_83 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {z : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (h : P.Equiv x y) (h' : P.Equiv y z) : P.Equiv x z := + fun C I => (h C I).trans (h' C I) + exact { + r x y := P.Equiv x.val y.val + iseqv := ⟨fun _ => proof_refl_81 _, fun h => (proof_symm_82 h), fun h h' => (proof_trans_83 h h')⟩ + } + +noncomputable abbrev Cells := Quotient P.termSetoid + +noncomputable def evaluate (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) : P.Cells → C.Cell := + Quotient.lift (fun x : P.ValidTerm => x.val.eval C I.map) (fun _ _ h => h C I) + + +end OAI.Thomason.OmegaCategory.Presentation +end + +section +namespace OAI.Thomason.OmegaCategory.CellTerm + + +noncomputable def dimension {G : Type u} (d : G → ℕ) : OAI.Thomason.OmegaCategory.CellTerm G → ℕ + | gen g => d g + | source k _ => k + | target k _ => k + | comp k x y => max (k+1) (max (dimension d x) (dimension d y)) + + +end OAI.Thomason.OmegaCategory.CellTerm +end + +section +namespace OAI.Thomason.OmegaCategory.Presentation +variable (P : Presentation.{u}) + +noncomputable def sourceTerm (k : ℕ) (x : P.ValidTerm) : P.ValidTerm := ⟨.source k x.val, OAI.Thomason.OmegaCategory.Presentation.Valid.source (P := P) k x.val x.property⟩ + +noncomputable def source (k : ℕ) : P.Cells → P.Cells := by + classical + have proof_source_84 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (h : P.Equiv x y) : P.Equiv (.source k x) (.source k y) := + fun C I => congrArg (C.source k) (h C I) + exact + Quotient.map (P.sourceTerm k) (fun _ _ h => (proof_source_84 k h)) + +noncomputable def targetTerm (k : ℕ) (x : P.ValidTerm) : P.ValidTerm := ⟨.target k x.val, OAI.Thomason.OmegaCategory.Presentation.Valid.target (P := P) k x.val x.property⟩ + +noncomputable def target (k : ℕ) : P.Cells → P.Cells := by + classical + have proof_target_85 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (h : P.Equiv x y) : P.Equiv (.target k x) (.target k y) := + fun C I => congrArg (C.target k) (h C I) + exact + Quotient.map (P.targetTerm k) (fun _ _ h => (proof_target_85 k h)) + +noncomputable def compTerm (k : ℕ) (x y : P.ValidTerm) : P.ValidTerm := by + classical + exact if h : P.Equiv (.target k x.val) (.source k y.val) then + ⟨.comp k x.val y.val, OAI.Thomason.OmegaCategory.Presentation.Valid.comp (P := P) k x.val y.val x.property y.property h⟩ else x + +noncomputable def comp (k : ℕ) (x y : P.Cells) (_ : P.target k x = P.source k y) : P.Cells := by + classical + have proof_trans_83 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {z : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (h : P.Equiv x y) (h' : P.Equiv y z) : P.Equiv x z := + fun C I => (h C I).trans (h' C I) + have proof_symm_82 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (h : P.Equiv x y) : P.Equiv y x := fun C I => (h C I).symm + have proof_target_85 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (h : P.Equiv x y) : P.Equiv (.target k x) (.target k y) := + fun C I => congrArg (C.target k) (h C I) + have proof_source_84 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (h : P.Equiv x y) : P.Equiv (.source k x) (.source k y) := + fun C I => congrArg (C.source k) (h C I) + have proof_composable_congr_87 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {x' : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y' : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (hx : P.Equiv x x') (hy : P.Equiv y y') : + P.Equiv (.target k x) (.source k y) ↔ P.Equiv (.target k x') (.source k y') := + ⟨fun h => (proof_trans_83 + (proof_symm_82 (proof_target_85 k hx)) + (proof_trans_83 h (proof_source_84 k hy))), + fun h => (proof_trans_83 (proof_target_85 k hx) + (proof_trans_83 h + (proof_symm_82 (proof_source_84 k hy))))⟩ + have proof_comp_88 {P : OAI.Thomason.OmegaCategory.Presentation.{u}} {x : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {x' : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} {y' : OAI.Thomason.OmegaCategory.CellTerm.{u} (OAI.Thomason.OmegaCategory.Presentation.Generator.{u} P)} (k : ℕ) (hx : P.Equiv x x') (hy : P.Equiv y y') : + P.Equiv (.comp k x y) (.comp k x' y') := by + intro C I + exact congrArg₂ (OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft C k) (hx C I) (hy C I) + have proof_compTerm_equiv_86 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (k : ℕ) {x y x' y' : P.ValidTerm} + (hx : P.Equiv x.val x'.val) (hy : P.Equiv y.val y'.val) : + P.Equiv (P.compTerm k x y).val (P.compTerm k x' y').val := by + classical + have he := proof_composable_congr_87 k hx hy + by_cases h : P.Equiv (.target k x.val) (.source k y.val) + · simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left h, dite_eq_left (he.mp h)] + exact proof_comp_88 k hx hy + · simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_right h, dite_eq_right (mt he.mpr h)] + exact hx + exact + Quotient.map₂ (P.compTerm k) (fun _ _ hx _ _ hy => (proof_compTerm_equiv_86 P k hx hy)) x y + +noncomputable abbrev category : OAI.Thomason.OmegaCategory.{u} := by + classical + have proof_cells_ext_89 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x y : P.Cells} + (h : ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), P.evaluate C I x = P.evaluate C I y) : x = y := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + exact Quotient.sound h + have proof_evaluate_source_90 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.source k x) = C.source k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_target_91 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.target k x) = C.target k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_composable_94 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + C.target k (P.evaluate C I x) = C.source k (P.evaluate C I y) := by + rw [← proof_evaluate_target_91, ← proof_evaluate_source_90, h] + have proof_evaluate_comp_92 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + P.evaluate C I (P.comp k x y h) = + C.comp k (P.evaluate C I x) (P.evaluate C I y) (proof_evaluate_composable_94 P C I k x y h) := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + have hm : P.Equiv (.target k x.val) (.source k y.val) := Quotient.exact h + change (P.compTerm k x y).val.eval C I.map = _ + have hm' : C.target k (x.val.eval C I.map) = C.source k (y.val.eval C I.map) := hm C I + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left hm, OAI.Thomason.OmegaCategory.CellTerm.eval, OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft, dite_eq_left hm'] + rfl + have proof_source_source_self_95 (C : OAI.Thomason.OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.source k (C.source k x) = C.source k x := by + simp [C.source_source] + have proof_source_target_self_96 (C : OAI.Thomason.OmegaCategory.{u}) (k : ℕ) (x : C.Cell) : + C.source k (C.target k x) = C.target k x := by + simp [C.source_target] + have proof_source_composable_97 (C : OAI.Thomason.OmegaCategory.{u}) {k i : ℕ} (hki : k < i) {x y : C.Cell} + (h : C.target k x = C.source k y) : + C.target k (C.source i x) = C.source k (C.source i y) := by + rw [C.target_source, ite_eq_left hki, C.source_source, min_eq_left (le_of_lt hki)] + exact h + have proof_source_fixed_upwards_98 (C : OAI.Thomason.OmegaCategory.{u}) {i j : ℕ} (hij : i ≤ j) {x : C.Cell} + (h : C.source i x = x) : C.source j x = x := by + rw [← h, C.source_source, min_eq_right hij] + have proof_eval_dimension_93 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x : OAI.Thomason.OmegaCategory.CellTerm P.Generator} (hx : P.Valid x) + (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) : + C.source (x.dimension P.dimension) (x.eval C I.map) = x.eval C I.map := by + induction hx with + | gen g => exact I.bounded g + | source k x hx ih => exact (proof_source_source_self_95 C k + (OAI.Thomason.OmegaCategory.CellTerm.eval C (OAI.Thomason.OmegaCategory.Presentation.Interpretation.map I) x)) + | target k x hx ih => exact (proof_source_target_self_96 C k + (OAI.Thomason.OmegaCategory.CellTerm.eval C (OAI.Thomason.OmegaCategory.Presentation.Interpretation.map I) x)) + | comp k x y hx hy h ihx ihy => + have hm := h C I + change C.target k (x.eval C I.map) = C.source k (y.eval C I.map) at hm + simp only [OAI.Thomason.OmegaCategory.CellTerm.dimension, OAI.Thomason.OmegaCategory.CellTerm.eval, OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft, dite_eq_left hm] + have hkn : k < max (k+1) (max (x.dimension P.dimension) (y.dimension P.dimension)) := by omega + rw [C.source_comp_gt _ k hkn _ _ hm (proof_source_composable_97 C hkn hm)] + congr 1 + · exact (proof_source_fixed_upwards_98 C (by omega) ihx) + · exact (proof_source_fixed_upwards_98 C (by omega) ihy) + exact { + Cell := P.Cells + source := P.source + target := P.target + comp := P.comp + source_source i j x := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_source_90, C.source_source] + target_target i j x := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_target_91, C.target_target] + source_target i j x := by + apply (proof_cells_ext_89 P) + intro C I + by_cases hij : i < j <;> simp [proof_evaluate_source_90, proof_evaluate_target_91, hij, C.source_target] + target_source i j x := by + apply (proof_cells_ext_89 P) + intro C I + by_cases hij : i < j <;> simp [proof_evaluate_source_90, proof_evaluate_target_91, hij, C.target_source] + source_comp_le i k hik x y h := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_source_90, proof_evaluate_comp_92] + exact C.source_comp_le i k hik _ _ _ + target_comp_le i k hik x y h := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_target_91, proof_evaluate_comp_92] + exact C.target_comp_le i k hik _ _ _ + source_comp_gt i k hki x y h hs := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_source_90, proof_evaluate_comp_92] + exact C.source_comp_gt i k hki _ _ _ _ + target_comp_gt i k hki x y h hs := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_target_91, proof_evaluate_comp_92] + exact C.target_comp_gt i k hki _ _ _ _ + unit_left k x h := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_source_90, proof_evaluate_comp_92] + exact C.unit_left k _ _ + unit_right k x h := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_target_91, proof_evaluate_comp_92] + exact C.unit_right k _ _ + assoc k x y z hxy hyz hxy_z hx_yz := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_comp_92] + exact C.assoc k _ _ _ _ _ _ _ + interchange k l hkl a b c d hab hcd hac hbd hab_cd hac_bd := by + apply (proof_cells_ext_89 P) + intro C I + simp only [proof_evaluate_comp_92] + exact C.interchange k l hkl _ _ _ _ _ _ _ _ _ _ + finite_dimension x := by + induction x using Quotient.inductionOn with | h x => + refine ⟨x.val.dimension P.dimension, ?_⟩ + apply (proof_cells_ext_89 P) + intro C I + exact (proof_eval_dimension_93 P (Subtype.property x) C I) + } + + +end OAI.Thomason.OmegaCategory.Presentation +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory Limits +variable {J : Type u} [Category.{u} J] + +noncomputable abbrev colimitPresentation (F : J ⥤ OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.Presentation.{u} where + Generator := (j : J) × (F.obj j).Cell + dimension g := Classical.choose ((F.obj g.1).finite_dimension g.2) + relations C f := ∃ ι : ∀ j, OAI.Thomason.OmegaCategory.Functor (F.obj j) C, + (∀ j x, f ⟨j, x⟩ = (ι j).map x) ∧ + (∀ ⦃j j'⦄ (a : j ⟶ j'), OAI.Thomason.OmegaCategory.Functor.comp (F.map a) (ι j') = ι j) + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory.Presentation +variable (P : Presentation.{u}) + +noncomputable def generator (g : P.Generator) : P.Cells := Quotient.mk _ ⟨.gen g, .gen g⟩ + + +end OAI.Thomason.OmegaCategory.Presentation +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory Limits +variable {J : Type u} [Category.{u} J] + +noncomputable def colimitInclusion (F : J ⥤ OAI.Thomason.OmegaCategory.{u}) (j : J) : + OAI.Thomason.OmegaCategory.Functor (F.obj j) (OAI.Thomason.OmegaCategory.colimitPresentation F).category := by + classical + have proof_cells_ext_89 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x y : P.Cells} + (h : ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), P.evaluate C I x = P.evaluate C I y) : x = y := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + exact Quotient.sound h + have proof_evaluate_source_90 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.source k x) = C.source k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_target_91 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.target k x) = C.target k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_composable_94 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + C.target k (P.evaluate C I x) = C.source k (P.evaluate C I y) := by + rw [← proof_evaluate_target_91, ← proof_evaluate_source_90, h] + have proof_evaluate_comp_92 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + P.evaluate C I (P.comp k x y h) = + C.comp k (P.evaluate C I x) (P.evaluate C I y) (proof_evaluate_composable_94 P C I k x y h) := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + have hm : P.Equiv (.target k x.val) (.source k y.val) := Quotient.exact h + change (P.compTerm k x y).val.eval C I.map = _ + have hm' : C.target k (x.val.eval C I.map) = C.source k (y.val.eval C I.map) := hm C I + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left hm, OAI.Thomason.OmegaCategory.CellTerm.eval, OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft, dite_eq_left hm'] + rfl + have proof_evaluate_generator_99 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) + (I : P.Interpretation C) (g : P.Generator) : P.evaluate C I (P.generator g) = I.map g := rfl + exact { + map x := (OAI.Thomason.OmegaCategory.colimitPresentation F).generator ⟨j, x⟩ + map_source k x := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.colimitPresentation F)) + intro C I + rcases I.satisfies with ⟨ι, hi, _⟩ + simp only [proof_evaluate_source_90, proof_evaluate_generator_99, hi] + exact (ι j).map_source k x + map_target k x := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.colimitPresentation F)) + intro C I + rcases I.satisfies with ⟨ι, hi, _⟩ + simp only [proof_evaluate_target_91, proof_evaluate_generator_99, hi] + exact (ι j).map_target k x + map_comp k x y h h' := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.colimitPresentation F)) + intro C I + rcases I.satisfies with ⟨ι, hi, _⟩ + simp only [proof_evaluate_comp_92, proof_evaluate_generator_99, hi] + exact (ι j).map_comp k x y h _ + } + +noncomputable def presentedCocone (F : J ⥤ OAI.Thomason.OmegaCategory.{u}) : Cocone F := by + classical + have proof_cells_ext_89 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x y : P.Cells} + (h : ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), P.evaluate C I x = P.evaluate C I y) : x = y := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + exact Quotient.sound h + exact { + pt := (OAI.Thomason.OmegaCategory.colimitPresentation F).category + ι := { + app := OAI.Thomason.OmegaCategory.colimitInclusion F + naturality := by + intro j j' a + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.colimitPresentation F)) + intro C I + rcases I.satisfies with ⟨ι, hi, hw⟩ + change I.map ⟨j', (F.map a).map x⟩ = I.map ⟨j, x⟩ + rw [hi, hi] + exact congrArg (fun h : OAI.Thomason.OmegaCategory.Functor (F.obj j) C => h.map x) (hw a) } + } + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory.Presentation +variable (P : Presentation.{u}) + +noncomputable def lift (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) : OAI.Thomason.OmegaCategory.Functor P.category C := by + classical + have proof_evaluate_source_90 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.source k x) = C.source k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_target_91 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.target k x) = C.target k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_composable_94 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + C.target k (P.evaluate C I x) = C.source k (P.evaluate C I y) := by + rw [← proof_evaluate_target_91, ← proof_evaluate_source_90, h] + have proof_evaluate_comp_92 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + P.evaluate C I (P.comp k x y h) = + C.comp k (P.evaluate C I x) (P.evaluate C I y) (proof_evaluate_composable_94 P C I k x y h) := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + have hm : P.Equiv (.target k x.val) (.source k y.val) := Quotient.exact h + change (P.compTerm k x y).val.eval C I.map = _ + have hm' : C.target k (x.val.eval C I.map) = C.source k (y.val.eval C I.map) := hm C I + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left hm, OAI.Thomason.OmegaCategory.CellTerm.eval, OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft, dite_eq_left hm'] + rfl + exact { + map := P.evaluate C I + map_source := (proof_evaluate_source_90 P C I) + map_target := (proof_evaluate_target_91 P C I) + map_comp k x y h _ := (proof_evaluate_comp_92 P C I k x y h) + } + + +end OAI.Thomason.OmegaCategory.Presentation +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory Limits +variable {J : Type u} [Category.{u} J] + +noncomputable def colimitInterpretation (F : J ⥤ OAI.Thomason.OmegaCategory.{u}) (s : Cocone F) : + (OAI.Thomason.OmegaCategory.colimitPresentation F).Interpretation s.pt where + map g := (s.ι.app g.1).map g.2 + bounded g := by + exact ((s.ι.app g.1).map_source _ g.2).symm.trans + (congrArg (s.ι.app g.1).map (Classical.choose_spec ((F.obj g.1).finite_dimension g.2))) + satisfies := ⟨fun j => s.ι.app j, fun _ _ => rfl, fun {_ _} a => s.w a⟩ + +noncomputable def presentedCoconeIsColimit (F : J ⥤ OAI.Thomason.OmegaCategory.{u}) : + IsColimit (OAI.Thomason.OmegaCategory.presentedCocone F) := by + classical + have proof_mk_comp_101 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (k : ℕ) (x y : P.ValidTerm) + (h : P.Equiv (.target k x.val) (.source k y.val)) + (h' : P.target k (Quotient.mk _ x) = P.source k (Quotient.mk _ y)) : + P.comp k (Quotient.mk _ x) (Quotient.mk _ y) h' = + Quotient.mk _ ⟨.comp k x.val y.val, OAI.Thomason.OmegaCategory.Presentation.Valid.comp (P := P) k x.val y.val x.property y.property h⟩ := by + change Quotient.mk _ (P.compTerm k x y) = _ + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left h] + have proof_map_composable_102 {C : OAI.Thomason.OmegaCategory.{u}} {D : OAI.Thomason.OmegaCategory.{u}} (F : OAI.Thomason.OmegaCategory.Functor C D) {k : ℕ} {x y : C.Cell} + (h : C.target k x = C.source k y) : + D.target k (F.map x) = D.source k (F.map y) := by + rw [← F.map_target, ← F.map_source, h] + have proof_functor_ext_100 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {C : OAI.Thomason.OmegaCategory.{u}} {F G : OAI.Thomason.OmegaCategory.Functor P.category C} + (h : ∀ g, F.map (P.generator g) = G.map (P.generator g)) : F = G := by + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + induction x using Quotient.inductionOn with | h x => + rcases x with ⟨x, hx⟩ + induction hx with + | gen g => exact h g + | source k x hx ih => + change F.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_source, G.map_source, ih] + | target k x hx ih => + change F.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_target, G.map_target, ih] + | comp k x y hx hy hm ihx ihy => + have hc : P.category.target k (Quotient.mk _ ⟨x, hx⟩) = + P.category.source k (Quotient.mk _ ⟨y, hy⟩) := Quotient.sound hm + rw [← (proof_mk_comp_101 P k ⟨x, hx⟩ ⟨y, hy⟩ hm hc)] + change F.map (P.category.comp k _ _ hc) = G.map (P.category.comp k _ _ hc) + rw [F.map_comp k _ _ hc (proof_map_composable_102 F hc), G.map_comp k _ _ hc (proof_map_composable_102 G hc)] + congr 1 + exact { + desc s := (OAI.Thomason.OmegaCategory.colimitPresentation F).lift s.pt (OAI.Thomason.OmegaCategory.colimitInterpretation F s) + fac s j := by + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + rfl + uniq s m hm := by + apply (proof_functor_ext_100 (OAI.Thomason.OmegaCategory.colimitPresentation F)) + intro ⟨j, x⟩ + exact congrArg (fun f : OAI.Thomason.OmegaCategory.Functor (F.obj j) s.pt => f.map x) (hm j) + } + +noncomputable instance hasColimits : HasColimitsOfSize.{u,u} OAI.Thomason.OmegaCategory.{u} where + has_colimits_of_shape := fun _ _ => { has_colimit := fun F => ⟨⟨OAI.Thomason.OmegaCategory.presentedCocone F, OAI.Thomason.OmegaCategory.presentedCoconeIsColimit F⟩⟩ } + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable instance omegaHasSimplicialColimits : + Limits.HasColimitsOfSize.{0,u} OAI.Thomason.OmegaCategory.{u} := + Limits.hasColimitsOfSizeShrink.{0,u} OAI.Thomason.OmegaCategory.{u} + +noncomputable def categorification : SSet.{u} ⥤ OAI.Thomason.OmegaCategory.{u} := + (uliftYoneda.{u} : SimplexCategory ⥤ (SimplexCategoryᵒᵖ ⥤ Type u)).leftKanExtension OAI.Thomason.raisedOrientals.{u} + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonLeft : SSet.{u} ⥤ OAI.Thomason.OmegaCategory.{u} := + (SSet.sd ⋙ SSet.sd) ⋙ OAI.Thomason.categorification + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def streetNerve (C : OAI.Thomason.OmegaCategory.{u}) : SSet.{u} where + obj m := OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.orientals.obj m.unop) C + map f := ↾fun x => OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.orientals.map f.unop) x + map_id m := by + apply ConcreteCategory.hom_ext + intro x + change OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.orientals.map (𝟙 m.unop)) x = x + rw [OAI.Thomason.orientals.map_id] + rfl + map_comp f g := by + apply ConcreteCategory.hom_ext + intro x + change OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.orientals.map (g.unop ≫ f.unop)) x = + OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.orientals.map g.unop) + (OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.orientals.map f.unop) x) + rw [OAI.Thomason.orientals.map_comp] + rfl + +noncomputable def streetNerveMap {C D : OAI.Thomason.OmegaCategory.{u}} (F : OAI.Thomason.OmegaCategory.Functor C D) : + OAI.Thomason.streetNerve C ⟶ OAI.Thomason.streetNerve D where + app _ := ↾fun x => OAI.Thomason.OmegaCategory.Functor.comp x F + naturality _ _ _ := rfl + +noncomputable def streetNerveFunctor : OAI.Thomason.OmegaCategory.{u} ⥤ SSet.{u} where + obj := OAI.Thomason.streetNerve + map := OAI.Thomason.streetNerveMap + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonRight : OAI.Thomason.OmegaCategory.{u} ⥤ SSet.{u} := + OAI.Thomason.streetNerveFunctor ⋙ (SSet.ex ⋙ SSet.ex) + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def streetYonedaEquiv (C : OAI.Thomason.OmegaCategory.{u}) (m : SimplexCategoryᵒᵖ) : + ((Presheaf.restrictedULiftYoneda.{0} OAI.Thomason.raisedOrientals).obj C).obj m ≃ + (OAI.Thomason.streetNerve C).obj m where + toFun F := OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.uliftUp _) F.down + invFun F := ULift.up (OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.uliftDown _) F) + left_inv _ := rfl + right_inv _ := rfl + +noncomputable def streetYonedaIso : Presheaf.restrictedULiftYoneda.{0} OAI.Thomason.raisedOrientals.{u} ≅ + OAI.Thomason.streetNerveFunctor.{u} := + NatIso.ofComponents (fun C => + NatIso.ofComponents (fun m => (OAI.Thomason.streetYonedaEquiv C m).toIso) (by intros; rfl)) + (by intros; rfl) + +noncomputable def categorificationAdjunction : OAI.Thomason.categorification.{u} ⊣ OAI.Thomason.streetNerveFunctor.{u} := + (Presheaf.uliftYonedaAdjunction.{0} + ((uliftYoneda.{u} : SimplexCategory ⥤ (SimplexCategoryᵒᵖ ⥤ Type u)).leftKanExtension OAI.Thomason.raisedOrientals.{u}) + ((uliftYoneda.{u} : SimplexCategory ⥤ (SimplexCategoryᵒᵖ ⥤ Type u)).leftKanExtensionUnit OAI.Thomason.raisedOrientals.{u})).ofNatIsoRight OAI.Thomason.streetYonedaIso + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonAdjunction : OAI.Thomason.thomasonLeft.{u} ⊣ OAI.Thomason.thomasonRight.{u} := + (SSet.sdExAdjunction.comp SSet.sdExAdjunction).comp OAI.Thomason.categorificationAdjunction + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.OmegaCategory + + +noncomputable abbrev truncationPresentation (n : ℕ) (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.Presentation.{u} where + Generator := C.Cell + dimension _ := n + relations D f := D.IsTruncated n ∧ ∃ F : OAI.Thomason.OmegaCategory.Functor C D, f = F.map + +noncomputable def truncationUnit (n : ℕ) (C : OAI.Thomason.OmegaCategory.{u}) : + OAI.Thomason.OmegaCategory.Functor C (OAI.Thomason.OmegaCategory.truncationPresentation n C).category := by + classical + have proof_cells_ext_89 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x y : P.Cells} + (h : ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), P.evaluate C I x = P.evaluate C I y) : x = y := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + exact Quotient.sound h + have proof_evaluate_source_90 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.source k x) = C.source k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_target_91 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.target k x) = C.target k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_evaluate_composable_94 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + C.target k (P.evaluate C I x) = C.source k (P.evaluate C I y) := by + rw [← proof_evaluate_target_91, ← proof_evaluate_source_90, h] + have proof_evaluate_comp_92 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) + (x y : P.Cells) (h : P.target k x = P.source k y) : + P.evaluate C I (P.comp k x y h) = + C.comp k (P.evaluate C I x) (P.evaluate C I y) (proof_evaluate_composable_94 P C I k x y h) := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + have hm : P.Equiv (.target k x.val) (.source k y.val) := Quotient.exact h + change (P.compTerm k x y).val.eval C I.map = _ + have hm' : C.target k (x.val.eval C I.map) = C.source k (y.val.eval C I.map) := hm C I + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left hm, OAI.Thomason.OmegaCategory.CellTerm.eval, OAI.Thomason.OmegaCategory.CellTerm.composeOrLeft, dite_eq_left hm'] + rfl + have proof_evaluate_generator_99 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) + (I : P.Interpretation C) (g : P.Generator) : P.evaluate C I (P.generator g) = I.map g := rfl + exact { + map := (OAI.Thomason.OmegaCategory.truncationPresentation n C).generator + map_source k x := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro D I + rcases I.satisfies with ⟨_, F, hF⟩ + simp only [proof_evaluate_source_90, proof_evaluate_generator_99, hF] + exact F.map_source k x + map_target k x := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro D I + rcases I.satisfies with ⟨_, F, hF⟩ + simp only [proof_evaluate_target_91, proof_evaluate_generator_99, hF] + exact F.map_target k x + map_comp k x y h h' := by + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro D I + rcases I.satisfies with ⟨_, F, hF⟩ + simp only [proof_evaluate_comp_92, proof_evaluate_generator_99, hF] + exact F.map_comp k x y h _ + } + +noncomputable def truncation (n : ℕ) (C : OAI.Thomason.OmegaCategory.{u}) : OAI.Thomason.OmegaCategory.NCategory.{u} n := by + classical + have proof_cells_ext_89 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {x y : P.Cells} + (h : ∀ (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C), P.evaluate C I x = P.evaluate C I y) : x = y := by + induction x using Quotient.inductionOn with | h x => + induction y using Quotient.inductionOn with | h y => + exact Quotient.sound h + have proof_evaluate_source_90 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (C : OAI.Thomason.OmegaCategory.{u}) (I : P.Interpretation C) (k : ℕ) (x : P.Cells) : + P.evaluate C I (P.source k x) = C.source k (P.evaluate C I x) := by + induction x using Quotient.inductionOn + rfl + have proof_truncation_isTruncated_103 (n : ℕ) (C : OAI.Thomason.OmegaCategory.{u}) : + (OAI.Thomason.OmegaCategory.truncationPresentation n C).category.IsTruncated n := by + intro x + apply (proof_cells_ext_89 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro D I + rw [proof_evaluate_source_90] + exact I.satisfies.1 _ + exact + ⟨(OAI.Thomason.OmegaCategory.truncationPresentation n C).category, proof_truncation_isTruncated_103 n C⟩ + +noncomputable def truncationLift {n : ℕ} {C : OAI.Thomason.OmegaCategory.{u}} (D : OAI.Thomason.OmegaCategory.NCategory.{u} n) + (F : OAI.Thomason.OmegaCategory.Functor C D.val) : OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.OmegaCategory.truncation n C).val D.val := + (OAI.Thomason.OmegaCategory.truncationPresentation n C).lift D.val { + map := F.map + bounded := fun x => D.property (F.map x) + satisfies := ⟨D.property, F, rfl⟩ } + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory + +noncomputable def truncationFunctor (n : ℕ) : OAI.Thomason.OmegaCategory.{u} ⥤ OAI.Thomason.OmegaCategory.NCategory.{u} n := by + classical + have proof_mk_comp_101 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (k : ℕ) (x y : P.ValidTerm) + (h : P.Equiv (.target k x.val) (.source k y.val)) + (h' : P.target k (Quotient.mk _ x) = P.source k (Quotient.mk _ y)) : + P.comp k (Quotient.mk _ x) (Quotient.mk _ y) h' = + Quotient.mk _ ⟨.comp k x.val y.val, OAI.Thomason.OmegaCategory.Presentation.Valid.comp (P := P) k x.val y.val x.property y.property h⟩ := by + change Quotient.mk _ (P.compTerm k x y) = _ + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left h] + have proof_map_composable_102 {C : OAI.Thomason.OmegaCategory.{u}} {D : OAI.Thomason.OmegaCategory.{u}} (F : OAI.Thomason.OmegaCategory.Functor C D) {k : ℕ} {x y : C.Cell} + (h : C.target k x = C.source k y) : + D.target k (F.map x) = D.source k (F.map y) := by + rw [← F.map_target, ← F.map_source, h] + have proof_functor_ext_100 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {C : OAI.Thomason.OmegaCategory.{u}} {F G : OAI.Thomason.OmegaCategory.Functor P.category C} + (h : ∀ g, F.map (P.generator g) = G.map (P.generator g)) : F = G := by + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + induction x using Quotient.inductionOn with | h x => + rcases x with ⟨x, hx⟩ + induction hx with + | gen g => exact h g + | source k x hx ih => + change F.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_source, G.map_source, ih] + | target k x hx ih => + change F.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_target, G.map_target, ih] + | comp k x y hx hy hm ihx ihy => + have hc : P.category.target k (Quotient.mk _ ⟨x, hx⟩) = + P.category.source k (Quotient.mk _ ⟨y, hy⟩) := Quotient.sound hm + rw [← (proof_mk_comp_101 P k ⟨x, hx⟩ ⟨y, hy⟩ hm hc)] + change F.map (P.category.comp k _ _ hc) = G.map (P.category.comp k _ _ hc) + rw [F.map_comp k _ _ hc (proof_map_composable_102 F hc), G.map_comp k _ _ hc (proof_map_composable_102 G hc)] + congr 1 + have proof_truncation_functor_ext_104 {n : ℕ} {C D : OAI.Thomason.OmegaCategory.{u}} + {F G : OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.OmegaCategory.truncation n C).val D} + (h : OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) F = OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) G) : F = G := by + apply (proof_functor_ext_100 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro x + exact congrArg (fun H : OAI.Thomason.OmegaCategory.Functor C D => H.map x) h + exact { + obj := OAI.Thomason.OmegaCategory.truncation n + map {C D} F := OAI.Thomason.OmegaCategory.truncationLift (OAI.Thomason.OmegaCategory.truncation n D) (OAI.Thomason.OmegaCategory.Functor.comp F (OAI.Thomason.OmegaCategory.truncationUnit n D)) + map_id C := by + apply proof_truncation_functor_ext_104 + rfl + map_comp F G := by + apply proof_truncation_functor_ext_104 + rfl + } + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def categorificationFinite (n : ℕ) : SSet.{u} ⥤ OAI.Thomason.OmegaCategory.NCategory.{u} n := + OAI.Thomason.categorification ⋙ OAI.Thomason.OmegaCategory.truncationFunctor n + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonLeftFinite (n : ℕ) : SSet.{u} ⥤ OAI.Thomason.OmegaCategory.NCategory.{u} n := + (SSet.sd ⋙ SSet.sd) ⋙ OAI.Thomason.categorificationFinite n + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def streetNerveFinite (n : ℕ) : OAI.Thomason.OmegaCategory.NCategory.{u} n ⥤ SSet.{u} where + obj C := OAI.Thomason.streetNerve C.val + map := OAI.Thomason.streetNerveMap + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonRightFinite (n : ℕ) : OAI.Thomason.OmegaCategory.NCategory.{u} n ⥤ SSet.{u} := + OAI.Thomason.streetNerveFinite n ⋙ (SSet.ex ⋙ SSet.ex) + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.OmegaCategory +open CategoryTheory + +noncomputable def nCategoryInclusion (n : ℕ) : OAI.Thomason.OmegaCategory.NCategory.{u} n ⥤ OAI.Thomason.OmegaCategory.{u} where + obj C := C.val + map F := F + +noncomputable def truncationHomEquiv (n : ℕ) (C : OAI.Thomason.OmegaCategory.{u}) (D : OAI.Thomason.OmegaCategory.NCategory.{u} n) : + ((OAI.Thomason.OmegaCategory.truncationFunctor n).obj C ⟶ D) ≃ (C ⟶ (OAI.Thomason.OmegaCategory.nCategoryInclusion n).obj D) := by + classical + have proof_mk_comp_101 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (k : ℕ) (x y : P.ValidTerm) + (h : P.Equiv (.target k x.val) (.source k y.val)) + (h' : P.target k (Quotient.mk _ x) = P.source k (Quotient.mk _ y)) : + P.comp k (Quotient.mk _ x) (Quotient.mk _ y) h' = + Quotient.mk _ ⟨.comp k x.val y.val, OAI.Thomason.OmegaCategory.Presentation.Valid.comp (P := P) k x.val y.val x.property y.property h⟩ := by + change Quotient.mk _ (P.compTerm k x y) = _ + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left h] + have proof_map_composable_102 {C : OAI.Thomason.OmegaCategory.{u}} {D : OAI.Thomason.OmegaCategory.{u}} (F : OAI.Thomason.OmegaCategory.Functor C D) {k : ℕ} {x y : C.Cell} + (h : C.target k x = C.source k y) : + D.target k (F.map x) = D.source k (F.map y) := by + rw [← F.map_target, ← F.map_source, h] + have proof_functor_ext_100 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {C : OAI.Thomason.OmegaCategory.{u}} {F G : OAI.Thomason.OmegaCategory.Functor P.category C} + (h : ∀ g, F.map (P.generator g) = G.map (P.generator g)) : F = G := by + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + induction x using Quotient.inductionOn with | h x => + rcases x with ⟨x, hx⟩ + induction hx with + | gen g => exact h g + | source k x hx ih => + change F.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_source, G.map_source, ih] + | target k x hx ih => + change F.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_target, G.map_target, ih] + | comp k x y hx hy hm ihx ihy => + have hc : P.category.target k (Quotient.mk _ ⟨x, hx⟩) = + P.category.source k (Quotient.mk _ ⟨y, hy⟩) := Quotient.sound hm + rw [← (proof_mk_comp_101 P k ⟨x, hx⟩ ⟨y, hy⟩ hm hc)] + change F.map (P.category.comp k _ _ hc) = G.map (P.category.comp k _ _ hc) + rw [F.map_comp k _ _ hc (proof_map_composable_102 F hc), G.map_comp k _ _ hc (proof_map_composable_102 G hc)] + congr 1 + have proof_truncation_functor_ext_104 {n : ℕ} {C D : OAI.Thomason.OmegaCategory.{u}} + {F G : OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.OmegaCategory.truncation n C).val D} + (h : OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) F = OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) G) : F = G := by + apply (proof_functor_ext_100 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro x + exact congrArg (fun H : OAI.Thomason.OmegaCategory.Functor C D => H.map x) h + exact { + toFun F := OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) F + invFun := OAI.Thomason.OmegaCategory.truncationLift D + left_inv F := by + apply proof_truncation_functor_ext_104 + rfl + right_inv _ := rfl + } + +noncomputable def truncationAdjunction (n : ℕ) : OAI.Thomason.OmegaCategory.truncationFunctor.{u} n ⊣ OAI.Thomason.OmegaCategory.nCategoryInclusion n := by + classical + have proof_mk_comp_101 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) (k : ℕ) (x y : P.ValidTerm) + (h : P.Equiv (.target k x.val) (.source k y.val)) + (h' : P.target k (Quotient.mk _ x) = P.source k (Quotient.mk _ y)) : + P.comp k (Quotient.mk _ x) (Quotient.mk _ y) h' = + Quotient.mk _ ⟨.comp k x.val y.val, OAI.Thomason.OmegaCategory.Presentation.Valid.comp (P := P) k x.val y.val x.property y.property h⟩ := by + change Quotient.mk _ (P.compTerm k x y) = _ + simp only [OAI.Thomason.OmegaCategory.Presentation.compTerm, dite_eq_left h] + have proof_map_composable_102 {C : OAI.Thomason.OmegaCategory.{u}} {D : OAI.Thomason.OmegaCategory.{u}} (F : OAI.Thomason.OmegaCategory.Functor C D) {k : ℕ} {x y : C.Cell} + (h : C.target k x = C.source k y) : + D.target k (F.map x) = D.source k (F.map y) := by + rw [← F.map_target, ← F.map_source, h] + have proof_functor_ext_100 (P : OAI.Thomason.OmegaCategory.Presentation.{u}) {C : OAI.Thomason.OmegaCategory.{u}} {F G : OAI.Thomason.OmegaCategory.Functor P.category C} + (h : ∀ g, F.map (P.generator g) = G.map (P.generator g)) : F = G := by + apply OAI.Thomason.OmegaCategory.Functor.ext + funext x + induction x using Quotient.inductionOn with | h x => + rcases x with ⟨x, hx⟩ + induction hx with + | gen g => exact h g + | source k x hx ih => + change F.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.source k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_source, G.map_source, ih] + | target k x hx ih => + change F.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) = + G.map (P.category.target k (Quotient.mk _ ⟨x, hx⟩)) + rw [F.map_target, G.map_target, ih] + | comp k x y hx hy hm ihx ihy => + have hc : P.category.target k (Quotient.mk _ ⟨x, hx⟩) = + P.category.source k (Quotient.mk _ ⟨y, hy⟩) := Quotient.sound hm + rw [← (proof_mk_comp_101 P k ⟨x, hx⟩ ⟨y, hy⟩ hm hc)] + change F.map (P.category.comp k _ _ hc) = G.map (P.category.comp k _ _ hc) + rw [F.map_comp k _ _ hc (proof_map_composable_102 F hc), G.map_comp k _ _ hc (proof_map_composable_102 G hc)] + congr 1 + have proof_truncation_functor_ext_104 {n : ℕ} {C D : OAI.Thomason.OmegaCategory.{u}} + {F G : OAI.Thomason.OmegaCategory.Functor (OAI.Thomason.OmegaCategory.truncation n C).val D} + (h : OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) F = OAI.Thomason.OmegaCategory.Functor.comp (OAI.Thomason.OmegaCategory.truncationUnit n C) G) : F = G := by + apply (proof_functor_ext_100 (OAI.Thomason.OmegaCategory.truncationPresentation n C)) + intro x + exact congrArg (fun H : OAI.Thomason.OmegaCategory.Functor C D => H.map x) h + exact + Adjunction.mkOfHomEquiv { + homEquiv := OAI.Thomason.OmegaCategory.truncationHomEquiv n + homEquiv_naturality_left_symm := by + intro C' C D F G + apply proof_truncation_functor_ext_104 + rfl + homEquiv_naturality_right := by + intro C D D' F G + rfl } + + +end OAI.Thomason.OmegaCategory +end + +section +namespace OAI.Thomason +open CategoryTheory Opposite + +noncomputable def categorificationFiniteAdjunction (n : ℕ) : + OAI.Thomason.categorificationFinite.{u} n ⊣ OAI.Thomason.streetNerveFinite.{u} n := + OAI.Thomason.categorificationAdjunction.comp (OAI.Thomason.OmegaCategory.truncationAdjunction n) + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonFiniteAdjunction (n : ℕ) : + OAI.Thomason.thomasonLeftFinite.{u} n ⊣ OAI.Thomason.thomasonRightFinite.{u} n := + (SSet.sdExAdjunction.comp SSet.sdExAdjunction).comp (OAI.Thomason.categorificationFiniteAdjunction n) + + +end OAI.Thomason +end + +section +namespace OAI.Thomason.WeakHomotopy +open scoped Topology Topology.Homotopy +variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] + +noncomputable def loopMap (N : Type w) (f : C(X, Y)) (x : X) : GenLoop N X x → GenLoop N Y (f x) := + fun p => ⟨f.comp p.val, fun y hy => congrArg f (p.property y hy)⟩ + +noncomputable def groupMap (N : Type w) (f : C(X, Y)) (x : X) : + HomotopyGroup N X x → HomotopyGroup N Y (f x) := by + classical + have proof_loopMap_homotopic_105 {X : Type u} {Y : Type v} [instLocal2 : TopologicalSpace.{u} X] [instLocal3 : TopologicalSpace.{v} Y] (N : Type w) (f : C(X, Y)) (x : X) + {p q : GenLoop N X x} (h : GenLoop.Homotopic p q) : + GenLoop.Homotopic (OAI.Thomason.WeakHomotopy.loopMap N f x p) (OAI.Thomason.WeakHomotopy.loopMap N f x q) := + h.comp_continuousMap f + exact + Quotient.map (OAI.Thomason.WeakHomotopy.loopMap N f x) (fun _ _ h => proof_loopMap_homotopic_105 N f x h) + +noncomputable def componentsMap (f : C(X, Y)) : ZerothHomotopy X → ZerothHomotopy Y := + ZerothHomotopy.lift (fun x => ZerothHomotopy.mk (f x)) + (fun _ _ p => ZerothHomotopy.sound (p.map f.continuous)) + +noncomputable def Equivalence (f : C(X, Y)) : Prop := + Function.Bijective (OAI.Thomason.WeakHomotopy.componentsMap f) ∧ + ∀ (n : ℕ) (x : X), Function.Bijective (OAI.Thomason.WeakHomotopy.groupMap (Fin (n+1)) f x) + + +end OAI.Thomason.WeakHomotopy +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def simplicialWeakEquivalences : MorphismProperty SSet.{u} := + fun _ _ f => OAI.Thomason.WeakHomotopy.Equivalence (SSet.toTop.map f).hom + +noncomputable def simplicialFibrations : MorphismProperty SSet.{u} := (SSet.modelCategoryQuillen.J).rlp + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory Limits HomotopicalAlgebra + +structure KanQuillenModel where + model : ModelCategory SSet.{u} + weak_eq : model.categoryWithWeakEquivalences.weakEquivalences = OAI.Thomason.simplicialWeakEquivalences + fib_eq : model.categoryWithFibrations.fibrations = OAI.Thomason.simplicialFibrations + cof_eq : model.categoryWithCofibrations.cofibrations = MorphismProperty.monomorphisms SSet + +noncomputable def LeftProperFor {C : Type v} [Category.{u} C] + (W Cof : MorphismProperty C) : Prop := + ∀ {A B X Y : C} (i : A ⟶ B) (f : A ⟶ X) (g : B ⟶ Y) (j : X ⟶ Y), + IsPushout i f g j → Cof i → W f → W g + +noncomputable def RightProperFor {C : Type v} [Category.{u} C] + (W Fib : MorphismProperty C) : Prop := + ∀ {A B X Y : C} (f : A ⟶ B) (g : A ⟶ X) (p : B ⟶ Y) (q : X ⟶ Y), + IsPullback f g p q → Fib q → W p → W g + +noncomputable def FibrantFor {C : Type v} [Category.{u} C] (Fib : MorphismProperty C) (Y : C) : Prop := + ∃ (T : C) (_ : IsTerminal T) (p : Y ⟶ T), Fib p + +noncomputable def boundaryImages {C : Type v} [Category.{u} C] (L : SSet.{u} ⥤ C) : MorphismProperty C := + .ofHoms (fun n : ℕ => L.map (SSet.boundary n).ι) + +noncomputable def hornImages {C : Type v} [Category.{u} C] (L : SSet.{u} ⥤ C) : MorphismProperty C := + ⨆ n : ℕ, .ofHoms (fun i : Fin (n+2) => L.map (SSet.horn (n+1) i).ι) + +structure ExactModelEndpoint {C : Type v} [Category.{u} C] + (L : SSet.{u} ⥤ C) (R : C ⥤ SSet.{u}) (adj : L ⊣ R) where + model : ModelCategory C + weak_eq : model.categoryWithWeakEquivalences.weakEquivalences = + OAI.Thomason.simplicialWeakEquivalences.inverseImage R + fib_eq : model.categoryWithFibrations.fibrations = OAI.Thomason.simplicialFibrations.inverseImage R + cof_eq : model.categoryWithCofibrations.cofibrations = + ((OAI.Thomason.simplicialFibrations.inverseImage R) ⊓ (OAI.Thomason.simplicialWeakEquivalences.inverseImage R)).llp + generating_cofibrations : (OAI.Thomason.boundaryImages L).rlp = + model.categoryWithFibrations.fibrations ⊓ model.categoryWithWeakEquivalences.weakEquivalences + generating_trivial_cofibrations : (OAI.Thomason.hornImages L).rlp = model.categoryWithFibrations.fibrations + weak_factorization_one : MorphismProperty.IsWeakFactorizationSystem + (model.categoryWithCofibrations.cofibrations ⊓ model.categoryWithWeakEquivalences.weakEquivalences) + model.categoryWithFibrations.fibrations + weak_factorization_two : MorphismProperty.IsWeakFactorizationSystem + model.categoryWithCofibrations.cofibrations + (model.categoryWithFibrations.fibrations ⊓ model.categoryWithWeakEquivalences.weakEquivalences) + complete : HasLimitsOfSize.{u,u} C + cocomplete : HasColimitsOfSize.{u,u} C + locallyPresentable : IsLocallyPresentable.{u} C + leftProper : OAI.Thomason.LeftProperFor model.categoryWithWeakEquivalences.weakEquivalences + model.categoryWithCofibrations.cofibrations + rightProper : OAI.Thomason.RightProperFor model.categoryWithWeakEquivalences.weakEquivalences + model.categoryWithFibrations.fibrations + leftQuillen : ∀ {K K' : SSet.{u}} (f : K ⟶ K'), Mono f → + model.categoryWithCofibrations.cofibrations (L.map f) ∧ + (OAI.Thomason.simplicialWeakEquivalences f → model.categoryWithWeakEquivalences.weakEquivalences (L.map f)) + quillenEquivalence : ∀ (K : SSet.{u}) (Y : C), + OAI.Thomason.FibrantFor model.categoryWithFibrations.fibrations Y → + ∀ f : L.obj K ⟶ Y, + model.categoryWithWeakEquivalences.weakEquivalences f ↔ + OAI.Thomason.simplicialWeakEquivalences (adj.homEquiv K Y f) + +noncomputable def FullMain : Prop := + Nonempty OAI.Thomason.KanQuillenModel.{u} ∧ + Nonempty (OAI.Thomason.ExactModelEndpoint OAI.Thomason.thomasonLeft.{u} OAI.Thomason.thomasonRight OAI.Thomason.thomasonAdjunction) ∧ + ∀ n : ℕ, 1 ≤ n → + Nonempty (OAI.Thomason.ExactModelEndpoint (OAI.Thomason.thomasonLeftFinite.{u} n) (OAI.Thomason.thomasonRightFinite n) + (OAI.Thomason.thomasonFiniteAdjunction n)) + + +end OAI.Thomason +end + +section +namespace OAI.Thomason +open CategoryTheory + +noncomputable def thomasonWeakEquivalences : MorphismProperty OAI.Thomason.OmegaCategory.{u} := + OAI.Thomason.simplicialWeakEquivalences.inverseImage OAI.Thomason.thomasonRight + +noncomputable def thomasonWeakEquivalencesFinite (n : ℕ) : + MorphismProperty (OAI.Thomason.OmegaCategory.NCategory.{u} n) := + OAI.Thomason.simplicialWeakEquivalences.inverseImage (OAI.Thomason.thomasonRightFinite n) + +end OAI.Thomason +end + +end diff --git a/lean/OAI/CategoryTheory/Thomason/DimensionOne.lean b/lean/OAI/CategoryTheory/Thomason/DimensionOne.lean new file mode 100644 index 0000000000000000000000000000000000000000..102b7ae19a207885e9baba0d3e662a9178ccb220 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/DimensionOne.lean @@ -0,0 +1,806 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.KanQuillen + +namespace OAI + +/-! Dimension One. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits HomotopicalAlgebra MorphismProperty + +namespace Thomason + +lemma transferred_right_proper {C : Type v} [Category.{u} C] + {L : SSet.{u} ⥤ C} {R : C ⥤ SSet.{u}} (adj : L ⊣ R) : + RightProperFor (simplicialWeakEquivalences.inverseImage R) + (simplicialFibrations.inverseImage R) := by + let := adj.rightAdjoint_preservesLimits + intro A B X Y f g p q sq hq hp + exact GeometricRecognition.right_proper _ _ _ _ (sq.map R) hq hp + +lemma left_preserves_cofibrations {C : Type v} [Category.{u} C] + {L : SSet.{u} ⥤ C} {R : C ⥤ SSet.{u}} (adj : L ⊣ R) + {K K' : SSet.{u}} (f : K ⟶ K') [Mono f] : + (simplicialFibrations.inverseImage R ⊓ simplicialWeakEquivalences.inverseImage R).llp + (L.map f) := by + intro A B p hp + apply (adj.hasLiftingProperty_iff f p).mpr + have h : SSet.modelCategoryQuillen.I.rlp (R.map p) := by + rw [GeometricRecognition.boundary_right_class] + exact hp + rw [← SSet.rlp_monomorphisms] at h + exact h f (show Mono f from inferInstance) + +lemma leftOne_preserves_weak {K K' : SSet.{u}} (f : K ⟶ K') + (hf : simplicialWeakEquivalences f) : + thomasonWeakEquivalencesFinite 1 ((thomasonLeftFinite 1).map f) := by + apply (simplicialWeakEquivalences.of_precomp + ((thomasonFiniteAdjunction 1).unit.app K) _ (QuillenCriterion.unit_one_weak K)) + change simplicialWeakEquivalences + ((thomasonFiniteAdjunction 1).unit.app K ≫ + (thomasonLeftFinite 1 ⋙ thomasonRightFinite 1).map f) + rw [← (thomasonFiniteAdjunction 1).unit.naturality f] + exact simplicialWeakEquivalences.comp_mem _ _ hf (QuillenCriterion.unit_one_weak K') +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.BoundaryProperness +open CategoryTheory Limits Simplicial PartialOrder +open AttachmentComparison Attachments HornAttachments SubdividedUnit KanLocal +attribute [-instance] CategoryTheory.Sigma.sigma + +structure PosetAttachment where + B : Type u + order : PartialOrder B + A : Set B + lower : IsLowerSet A + retraction : upward A →o A + retract : ∀ a : A, retraction ⟨a.val,a.val,a.property,le_rfl⟩ = a + adjunction : ∀ (a : A) (z : upward A), a.val ≤ z.val ↔ a ≤ retraction z +attribute [instance] PosetAttachment.order + +abbrev PosetAttachment.arrow (d : PosetAttachment.{u}) := Arrow.mk (inc 1 d.A) + +def Admissible : MorphismProperty (OmegaCategory.NCategory.{u} 1) := + fun _ _ f => ∃ d : PosetAttachment.{u}, Nonempty (d.arrow ≅ Arrow.mk f) + +instance : Admissible.{u}.RespectsIso := + MorphismProperty.RespectsIso.of_respects_arrow_iso _ (by + rintro _ _ e ⟨d,⟨a⟩⟩ + exact ⟨d,⟨a ≪≫ e⟩⟩) + +lemma boundary_admissible : boundaryImages (thomasonLeftFinite.{u} 1) ≤ Admissible := by + rintro X Y f ⟨m⟩ + let d : PosetAttachment := { + B := NonemptyFiniteChains (NonemptyFiniteChains (ULift.{u} (Fin (m+1)))) + order := inferInstance + A := oldSet (simplexFaces (SSet.boundary m)) + lower := oldSet_lower _ + retraction := flagRetraction _ + retract := flagRetraction_retract _ + adjunction := flagRetraction_adjunction _ } + refine ⟨d, ⟨(Arrow.isoMk ((categorificationFinite 1).mapIso (oldFlagsIso (SSet.boundary m))) + ((categorificationFinite 1).mapIso (Subdivision.sdTwiceSimplexIso m)) ?_).symm⟩⟩ + change (categorificationFinite 1).map _ ≫ (categorificationFinite 1).map _ = + (categorificationFinite 1).map _ ≫ (categorificationFinite 1).map _ + rw [← Functor.map_comp, ← Functor.map_comp, oldFlagsIso_naturality] + rfl + +variable {I : Type u} (d : I → PosetAttachment.{u}) + +def sumData : PosetAttachment.{u} where + B := Σ i, (d i).B + order := inferInstance + A := DependentPosets.old (fun i => (d i).A) + lower := DependentPosets.old_lower _ (fun i => (d i).lower) + retraction := DependentPosets.oldRetraction _ (fun i => (d i).retraction) + retract := DependentPosets.oldRetraction_retract _ _ (fun i => (d i).retract) + adjunction := DependentPosets.oldRetraction_adjunction _ _ (fun i => (d i).adjunction) +def posetCoprodIso (P : I → Type u) [∀ i, PartialOrder (P i)] : + (∐ fun i => posetObj 1 (P i)) ≅ posetObj 1 (Σ i, P i) := + (PreservesCoproduct.iso (categorificationFinite 1) (fun i => nerve (P i))).symm ≪≫ + (categorificationFinite 1).mapIso (DependentPosets.iso P) + +def oldCoprodIso : (∐ fun i => posetObj 1 (d i).A) ≅ posetObj 1 (sumData d).A := + (PreservesCoproduct.iso (categorificationFinite 1) (fun i => nerve (d i).A)).symm ≪≫ + (categorificationFinite 1).mapIso (DependentPosets.oldNerveIso (fun i => (d i).A)) + +@[reassoc] lemma posetCoprodIso_ι (P : I → Type u) [∀ i, PartialOrder (P i)] (i : I) : + Sigma.ι (fun i => posetObj 1 (P i)) i ≫ (posetCoprodIso P).hom = + (categorificationFinite 1).map (nerveMap (DependentPosets.incl P i).toFunctor) := by + simp only [posetCoprodIso, Iso.trans_hom, Iso.symm_hom, Functor.mapIso_hom] + rw [← Category.assoc, PreservesCoproduct.inv_hom, ι_comp_sigmaComparison, ← Functor.map_comp, + DependentPosets.iso_hom_ι] + +@[reassoc] lemma oldCoprodIso_ι (i : I) : + Sigma.ι (fun i => posetObj 1 (d i).A) i ≫ (oldCoprodIso d).hom = + (categorificationFinite 1).map (nerveMap + ((DependentPosets.oldIso (fun i => (d i).A)).toOrderEmbedding.toOrderHom.comp + (DependentPosets.incl (fun i => (d i).A) i)).toFunctor) := by + change Sigma.ι (fun i => (categorificationFinite 1).obj (nerve (d i).A)) i ≫ + ((PreservesCoproduct.iso (categorificationFinite 1) (fun i => nerve (d i).A)).inv ≫ + (categorificationFinite 1).map (DependentPosets.oldNerveIso (fun i => (d i).A)).hom) = + (categorificationFinite 1).map _ + rw [← Category.assoc, PreservesCoproduct.inv_hom, ι_comp_sigmaComparison, ← Functor.map_comp, + DependentPosets.oldNerveIso_ι] + +lemma coprod_inc : Limits.Sigma.map (fun i => inc 1 (d i).A) ≫ + (posetCoprodIso (fun i => (d i).B)).hom = + (oldCoprodIso d).hom ≫ inc 1 (sumData d).A := by + apply Sigma.hom_ext + intro i + erw [Sigma.ι_map_assoc, posetCoprodIso_ι] + erw [← Category.assoc] + erw [oldCoprodIso_ι] + change (categorificationFinite 1).map _ ≫ (categorificationFinite 1).map _ = + (categorificationFinite 1).map _ ≫ (categorificationFinite 1).map _ + erw [← Functor.map_comp, ← Functor.map_comp] + rfl + +end Thomason.BoundaryProperness + +end + +noncomputable section +universe u v w z + + +namespace Thomason.BoundaryProperness +open CategoryTheory Limits Simplicial +open AttachmentComparison Attachments HornAttachments SubdividedUnit KanLocal +attribute [-instance] CategoryTheory.Sigma.sigma + +instance admissible_coproducts (I : Type u) : Admissible.{u}.IsStableUnderCoproductsOfShape I := by + apply MorphismProperty.IsStableUnderCoproductsOfShape.mk + intro X Y _ _ f hf + choose d e using hf + let a (i : I) : (d i).arrow ≅ Arrow.mk (f i) := Classical.choice (e i) + let eA := Limits.Sigma.mapIso (fun i => Arrow.leftFunc.mapIso (a i)) + let eB := Limits.Sigma.mapIso (fun i => Arrow.rightFunc.mapIso (a i)) + have h : (Limits.Sigma.map (fun i => inc 1 (d i).A)) ≫ eB.hom = + eA.hom ≫ Limits.Sigma.map f := by + change Limits.Sigma.map (fun i => inc 1 (d i).A) ≫ + Limits.Sigma.map (fun i => (a i).hom.right) = + Limits.Sigma.map (fun i => (a i).hom.left) ≫ Limits.Sigma.map f + rw [Sigma.map_comp_map, Sigma.map_comp_map] + congr 1 + funext i + exact (a i).hom.w.symm + have e' : Arrow.mk (Limits.Sigma.map (fun i => inc 1 (d i).A)) ≅ + Arrow.mk (Limits.Sigma.map f) := Arrow.isoMk eA eB h.symm + have e₀ : Arrow.mk (Limits.Sigma.map (fun i => inc 1 (d i).A)) ≅ + (sumData d).arrow := Arrow.isoMk (oldCoprodIso d) + (posetCoprodIso (fun i => (d i).B)) (coprod_inc d).symm + exact ⟨sumData d, ⟨e₀.symm ≪≫ e'⟩⟩ + +instance : MorphismProperty.IsStableUnderCoproducts.{u} Admissible.{u} where + +lemma poset_attachment_invariance (d : PosetAttachment.{u}) + {X Y X' Y' : OmegaCategory.NCategory.{u} 1} + (a : posetObj 1 d.A ⟶ X) (j : X ⟶ Y) (v : posetObj 1 d.B ⟶ Y) + (sc : IsPushout a (inc 1 d.A) j v) + (f : X ⟶ X') (g : Y ⟶ Y') (j' : X' ⟶ Y') (v' : posetObj 1 d.B ⟶ Y') + (sc' : IsPushout (a ≫ f) (inc 1 d.A) j' v') + (hj : j ≫ g = f ≫ j') (hv : v ≫ g = v') + (hf : thomasonWeakEquivalencesFinite 1 f) : thomasonWeakEquivalencesFinite 1 g := by + let b := N.map a + let i := N.map (inc 1 d.A) + have : Mono i := by + let inclusion : d.A →o d.B := (OrderEmbedding.subtype d.A).toOrderHom + let inclusionMap : nerve d.A ⟶ nerve d.B := nerveMap inclusion.toFunctor + let ηA := η (nerve d.A) + let ηB := η (nerve d.B) + have : IsIso ηA := OneCat.oneUnitCatIso (Cat.of d.A) + have : IsIso ηB := OneCat.oneUnitCatIso (Cat.of d.B) + have : Mono inclusionMap := nerve_mono_orderMap inclusion Subtype.val_injective + have hn : inclusionMap ≫ ηB = ηA ≫ i := + (categorificationFiniteAdjunction 1).unit.naturality inclusionMap + have he : i = inv ηA ≫ inclusionMap ≫ ηB := by + apply (cancel_epi ηA).mp + rw [IsIso.hom_inv_id_assoc] + exact hn.symm + rw [he] + infer_instance + let ss := IsPushout.of_hasPushout b i + let ss' := IsPushout.of_hasPushout (b ≫ N.map f) i + let t : pushout b i ⟶ N.obj Y := ss.desc (N.map j) (N.map v) (by + rw [← N.map_comp, ← N.map_comp, sc.w]) + let t' : pushout (b ≫ N.map f) i ⟶ N.obj Y' := ss'.desc (N.map j') (N.map v') (by + rw [← N.map_comp, ← N.map_comp, ← N.map_comp, sc'.w]) + have ht := comparison_local_one d.A d.lower d.retraction d.retract d.adjunction a j v + sc ss t (ss.inl_desc _ _ _) (ss.inr_desc _ _ _) + have ht' := comparison_local_one d.A d.lower d.retraction d.retract d.adjunction (a ≫ f) j' v' + sc' (by simpa [b,Functor.map_comp] using ss') t' (ss'.inl_desc _ _ _) (ss'.inr_desc _ _ _) + let s : pushout b i ⟶ pushout (b ≫ N.map f) i := + ss.desc (N.map f ≫ pushout.inl (b ≫ N.map f) i) (pushout.inr (b ≫ N.map f) i) + (by simpa [Category.assoc] using ss'.w) + have hs : Local s := local_pushout_map b i (N.map f) + (GeometricRecognition.weak_local _ ((Subdivision.thomasonWeakFinite_iff_nerve f).mp hf)) + ss ss' s (ss.inl_desc _ _ _) (ss.inr_desc _ _ _) + have he : t ≫ N.map g = s ≫ t' := by + apply ss.hom_ext + · dsimp [t,s,t'] + simp only [IsPushout.inl_desc_assoc,Category.assoc,IsPushout.inl_desc] + rw [← N.map_comp, ← N.map_comp, hj] + · dsimp [t,s,t'] + simp only [IsPushout.inr_desc_assoc,IsPushout.inr_desc] + rw [← N.map_comp,hv] + apply (Subdivision.thomasonWeakFinite_iff_nerve g).mpr + apply simplicialWeakEquivalences.of_precomp t _ (local_weak t ht) + rw [he] + exact local_weak _ (local_comp hs ht') + +lemma admissible_pushout_mono {A B X Y : OmegaCategory.NCategory.{u} 1} + (i : A ⟶ B) (hi : Admissible i) (a : A ⟶ X) (j : X ⟶ Y) (v : B ⟶ Y) + (sc : IsPushout a i j v) : Mono (N.map j) := by + obtain ⟨d,⟨e⟩⟩ := hi + let eA : posetObj 1 d.A ≅ A := Arrow.leftFunc.mapIso e + let eB : posetObj 1 d.B ≅ B := Arrow.rightFunc.mapIso e + have sq : IsPushout (eA.hom ≫ a) (inc 1 d.A) j (eB.hom ≫ v) := by + apply sc.of_iso eA.symm (Iso.refl _) eB.symm (Iso.refl _) + · simp + · apply (cancel_epi eA.hom).mp + simp only [Iso.symm_hom, Iso.hom_inv_id_assoc] + have hw : eA.hom ≫ i = inc 1 d.A ≫ eB.hom := e.hom.w + rw [← Category.assoc, hw, Category.assoc, Iso.hom_inv_id, Category.comp_id] + · simp + · simp + exact nerve_attachment_mono d.A d.lower _ _ _ sq + +lemma admissible_pushout_weak {A B X Y X' Y' : OmegaCategory.NCategory.{u} 1} + (i : A ⟶ B) (hi : Admissible i) (a : A ⟶ X) (j : X ⟶ Y) (v : B ⟶ Y) + (sc : IsPushout a i j v) (f : X ⟶ X') (g : Y ⟶ Y') (j' : X' ⟶ Y') + (sq : IsPushout j f g j') (hf : thomasonWeakEquivalencesFinite 1 f) : + thomasonWeakEquivalencesFinite 1 g := by + obtain ⟨d,⟨e⟩⟩ := hi + let eA : posetObj 1 d.A ≅ A := Arrow.leftFunc.mapIso e + let eB : posetObj 1 d.B ≅ B := Arrow.rightFunc.mapIso e + have sq₀ : IsPushout (eA.hom ≫ a) (inc 1 d.A) j (eB.hom ≫ v) := by + apply sc.of_iso eA.symm (Iso.refl _) eB.symm (Iso.refl _) + · simp + · apply (cancel_epi eA.hom).mp + simp only [Iso.symm_hom, Iso.hom_inv_id_assoc] + have hw : eA.hom ≫ i = inc 1 d.A ≫ eB.hom := e.hom.w + rw [← Category.assoc, hw, Category.assoc, Iso.hom_inv_id, Category.comp_id] + · simp + · simp + exact poset_attachment_invariance d _ _ _ sq₀ f g j' _ + (sq₀.flip.paste_vert sq).flip sq.w rfl hf + +lemma coproduct_boundary_pushout_mono {X Y : OmegaCategory.NCategory.{u} 1} + (j : X ⟶ Y) (hj : (MorphismProperty.coproducts.{u} + (boundaryImages (thomasonLeftFinite 1))).pushouts j) : Mono (N.map j) := by + obtain ⟨A,B,i,a,v,hi,sc⟩ := hj + exact admissible_pushout_mono i + (Admissible.coproducts_le _ (MorphismProperty.coproducts_monotone boundary_admissible _ hi)) + a j v sc + +lemma coproduct_boundary_pushout_weak {X Y X' Y' : OmegaCategory.NCategory.{u} 1} + (j : X ⟶ Y) (hj : (MorphismProperty.coproducts.{u} + (boundaryImages (thomasonLeftFinite 1))).pushouts j) + (f : X ⟶ X') (g : Y ⟶ Y') (j' : X' ⟶ Y') + (sq : IsPushout j f g j') (hf : thomasonWeakEquivalencesFinite 1 f) : + thomasonWeakEquivalencesFinite 1 g := by + obtain ⟨A,B,i,a,v,hi,sc⟩ := hj + exact admissible_pushout_weak i + (Admissible.coproducts_le _ (MorphismProperty.coproducts_monotone boundary_admissible _ hi)) + a j v sc f g j' sq hf + +end Thomason.BoundaryProperness + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.BoundaryProperness +open AttachmentComparison SubdividedUnit KanLocal + +abbrev Cells : MorphismProperty (OmegaCategory.NCategory.{u} 1) := + (MorphismProperty.coproducts.{u} (boundaryImages (thomasonLeftFinite 1))).pushouts + +lemma weak_iso {X Y : OmegaCategory.NCategory.{u} 1} (f : X ⟶ Y) [IsIso f] : + thomasonWeakEquivalencesFinite 1 f := by + change simplicialWeakEquivalences ((thomasonRightFinite 1).map f) + exact simplicialWeakEquivalences.of_isIso _ + +lemma sequential_pushout_weak {X Y X' : OmegaCategory.NCategory.{u} 1} + (i : X ⟶ Y) (h : Cells.TransfiniteCompositionOfShape ℕ i) + (f : X ⟶ X') (hf : thomasonWeakEquivalencesFinite 1 f) : + thomasonWeakEquivalencesFinite 1 (pushout.inl i f) := by + let F := h.F + let a : (Functor.const ℕ).obj X ⟶ F := { + app n := h.isoBot.inv ≫ F.map (homOfLE (Nat.zero_le n)) + naturality n m u := by + change 𝟙 X ≫ (h.isoBot.inv ≫ F.map _) = (h.isoBot.inv ≫ F.map _) ≫ F.map u + rw [Category.id_comp,Category.assoc,← F.map_comp] + rfl } + have ha (n m : ℕ) (u : n ⟶ m) : a.app n ≫ F.map u = a.app m := by + simpa using (a.naturality u).symm + let U := Under.lift F a + let G := U ⋙ Under.pushout f ⋙ Under.forget X' + let e : F ⟶ G := { + app n := pushout.inl (a.app n) f + naturality n m u := by + simp [G,U,Under.pushout,Under.lift,pushout.inl_desc] } + have sq (n m : ℕ) (u : n ⟶ m) : + IsPushout (F.map u) (e.app n) (e.app m) (G.map u) := by + have sb : IsPushout (a.app n ≫ F.map u) f (e.app m) + (pushout.inr (a.app n) f ≫ G.map u) := by + have hg : pushout.inr (a.app n) f ≫ G.map u = pushout.inr (a.app m) f := by + simp [G,U,Under.pushout,Under.lift,pushout.inr_desc] + rw [hg, ha n m u] + exact IsPushout.of_hasPushout _ _ + exact sb.of_left (e.naturality u) (IsPushout.of_hasPushout _ _) + have hF (n : ℕ) : Cells (F.map (homOfLE (Nat.le_succ n))) := h.map_mem n (by simp) + have hG (n : ℕ) : Cells (G.map (homOfLE (Nat.le_succ n))) := + MorphismProperty.of_isPushout (sq n (n+1) (homOfLE (Nat.le_succ n))).flip (hF n) + have he (n : ℕ) : thomasonWeakEquivalencesFinite 1 (e.app n) := by + induction n with + | zero => + have : IsIso (a.app 0) := by + change IsIso (h.isoBot.inv ≫ F.map (𝟙 0)) + infer_instance + have : IsIso (pushout.inr (a.app 0) f) := by infer_instance + apply (thomasonWeakEquivalencesFinite 1).of_precomp (a.app 0) _ + (weak_iso _) + change thomasonWeakEquivalencesFinite 1 (a.app 0 ≫ pushout.inl (a.app 0) f) + rw [pushout.condition] + exact (thomasonWeakEquivalencesFinite 1).comp_mem _ _ hf + (weak_iso _) + | succ n ih => + exact coproduct_boundary_pushout_weak _ (hF n) _ _ _ + (sq n (n+1) (homOfLE (Nat.le_succ n))) ih + have hp (n : ℕ) : a.app n ≫ h.incl.app n = i := by + dsimp [a] + rw [Category.assoc] + have hn := h.incl.naturality (homOfLE (Nat.zero_le n)) + dsimp at hn + rw [hn,Category.comp_id] + exact h.fac + let cU := Under.liftCocone F a ⟨Y,h.incl⟩ i hp + have hcU : IsColimit cU := Under.isColimitLiftCocone F a _ i hp h.isColimit + let cG := (Under.forget X').mapCocone ((Under.pushout f).mapCocone cU) + have hcG : IsColimit cG := isColimitOfPreserves _ (isColimitOfPreserves _ hcU) + let FN := F ⋙ N + let GN := G ⋙ N + let eN : FN ⟶ GN := Functor.whiskerRight e N + have hn : Local (colim.map eN) := local_colimit_nat FN GN eN + (fun n => coproduct_boundary_pushout_mono _ (hF n)) + (fun n => coproduct_boundary_pushout_mono _ (hG n)) + (fun n => GeometricRecognition.weak_local _ + ((Subdivision.thomasonWeakFinite_iff_nerve (e.app n)).mp (he n))) + let : PreservesFilteredColimitsOfSize.{0,0} N := + preservesSmallestFilteredColimits_of_preservesFilteredColimits N + have hcFN : IsColimit (N.mapCocone ⟨Y,h.incl⟩) := isColimitOfPreserves N h.isColimit + have hcGN : IsColimit (N.mapCocone cG) := isColimitOfPreserves N hcG + let eF : N.obj Y ≅ colimit FN := hcFN.coconePointUniqueUpToIso (colimit.isColimit FN) + let eG : N.obj (pushout i f) ≅ colimit GN := + hcGN.coconePointUniqueUpToIso (colimit.isColimit GN) + have eFι (n : ℕ) : N.map (h.incl.app n) ≫ eF.hom = colimit.ι FN n := + hcFN.comp_coconePointUniqueUpToIso_hom (colimit.isColimit FN) n + have eGι (n : ℕ) : colimit.ι GN n ≫ eG.inv = N.map (cG.ι.app n) := + hcGN.comp_coconePointUniqueUpToIso_inv (colimit.isColimit GN) n + have eqn : N.map (pushout.inl i f) = eF.hom ≫ colim.map eN ≫ eG.inv := by + apply hcFN.hom_ext + intro n + change N.map (h.incl.app n) ≫ _ = N.map (h.incl.app n) ≫ _ + rw [← Category.assoc, ← Category.assoc, + eFι n, colimit.ι_map, Category.assoc, eGι n] + change N.map (h.incl.app n) ≫ N.map (pushout.inl i f) = + N.map (e.app n) ≫ N.map (cG.ι.app n) + rw [← N.map_comp, ← N.map_comp] + congr 1 + simp [e,cG,cU,Under.pushout,Under.lift,Under.liftCocone] + exact (pushout.inl_desc _ _ _).symm + apply (Subdivision.thomasonWeakFinite_iff_nerve _).mpr + rw [eqn] + exact local_weak _ (local_comp (local_iso _) (local_comp hn (local_iso _))) +end Thomason.BoundaryProperness + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits MorphismProperty + +namespace Thomason.BoundaryProperness +attribute [local instance] Cardinal.fact_isRegular_aleph0 Cardinal.orderBotAleph0OrdToType + +lemma cofibration_pushout_weak {X Y X' : OmegaCategory.NCategory.{u} 1} + (i : X ⟶ Y) (hi : thomasonCofibrationsFinite 1 i) + (f : X ⟶ X') (hf : thomasonWeakEquivalencesFinite 1 f) : + thomasonWeakEquivalencesFinite 1 (pushout.inl i f) := by + let I := boundaryImages (thomasonLeftFinite.{u} 1) + let κ := Cardinal.aleph0.{u} + let k := SmallObject.ιObj I κ i + let p := SmallObject.πObj I κ i + have hp : thomasonFibrationsFinite 1 p ∧ thomasonWeakEquivalencesFinite 1 p := by + have h := SmallObject.rlp_πObj I κ i + change (boundaryImages (thomasonLeftFinite 1)).rlp p at h + rw [boundaryImages_right_class (thomasonFiniteAdjunction 1)] at h + exact h + have : HasLiftingProperty i p := hi p hp + have fac : k ≫ p = i := SmallObject.ιObj_πObj I κ i + let sq : CommSq k i p (𝟙 Y) := ⟨by simpa using fac⟩ + let s := sq.lift + have hs : i ≫ s = k := sq.fac_left + have hs' : s ≫ p = 𝟙 Y := sq.fac_right + have hk : Nonempty (Cells.TransfiniteCompositionOfShape ℕ k) := by + let e : ℕ ≃o Cardinal.aleph0.{u}.ord.ToType := ULift.orderIso.{u}.symm.trans + (OrderIso.ofRelIsoLT (Nonempty.some (by simp [← Ordinal.type_eq]))) + have h := SmallObject.transfiniteCompositionsOfShape_ιObj I κ i + rw [← MorphismProperty.transfiniteCompositionsOfShape_eq_of_orderIso _ e] at h + exact h + have hw : thomasonWeakEquivalencesFinite 1 (pushout.inl k f) := + sequential_pushout_weak k hk.some f hf + let s' : pushout i f ⟶ pushout k f := + pushout.desc (s ≫ pushout.inl k f) (pushout.inr k f) (by + rw [← Category.assoc,hs,pushout.condition]) + let p' : pushout k f ⟶ pushout i f := + pushout.desc (p ≫ pushout.inl i f) (pushout.inr i f) (by + rw [← Category.assoc,fac,pushout.condition]) + have hsp : s' ≫ p' = 𝟙 (pushout i f) := by + apply pushout.hom_ext + · dsimp [s',p'] + simp only [pushout.inl_desc_assoc,Category.assoc,pushout.inl_desc,Category.comp_id] + rw [← Category.assoc,hs',Category.id_comp] + · dsimp [s',p'] + simp only [pushout.inr_desc_assoc,pushout.inr_desc,Category.comp_id] + let r : RetractArrow (pushout.inl i f) (pushout.inl k f) := { + i := Arrow.homMk s s' (by simp [s',pushout.inl_desc]) + r := Arrow.homMk p p' (by simp [p',pushout.inl_desc]) + retract := by + apply Arrow.hom_ext + · exact hs' + · exact hsp } + exact (thomasonWeakEquivalencesFinite 1).of_retract r hw + +theorem one : LeftProperFor (thomasonWeakEquivalencesFinite.{u} 1) + (thomasonCofibrationsFinite 1) := by + intro A B X Y i f g j sq hi hf + rw [← sq.inl_isoPushout_inv] + exact (thomasonWeakEquivalencesFinite 1).comp_mem _ _ + (cofibration_pushout_weak i hi f hf) + (weak_iso _) +end Thomason.BoundaryProperness + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits HomotopicalAlgebra MorphismProperty + +namespace Thomason + +def exactEndpointOne : ExactModelEndpoint (thomasonLeftFinite.{u} 1) + (thomasonRightFinite 1) (thomasonFiniteAdjunction 1) where + model := modelOne + weak_eq := rfl + fib_eq := rfl + cof_eq := rfl + generating_cofibrations := boundaryImages_right_class (thomasonFiniteAdjunction 1) + generating_trivial_cofibrations := hornImages_rlp (thomasonFiniteAdjunction 1) + weak_factorization_one := FirstTransferredWFS.one + weak_factorization_two := transferred_second_wfs (thomasonFiniteAdjunction 1) + complete := inferInstance + cocomplete := inferInstance + locallyPresentable := inferInstance + leftProper := BoundaryProperness.one + rightProper := transferred_right_proper (thomasonFiniteAdjunction 1) + leftQuillen f hm := by + let := hm + exact ⟨left_preserves_cofibrations (thomasonFiniteAdjunction 1) f, + leftOne_preserves_weak f⟩ + quillenEquivalence K Y _ f := QuillenCriterion.one K Y f + +theorem endpointOne : Nonempty (ExactModelEndpoint (thomasonLeftFinite.{u} 1) + (thomasonRightFinite 1) (thomasonFiniteAdjunction 1)) := ⟨exactEndpointOne⟩ +end Thomason + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits MorphismProperty + +namespace Thomason + +theorem nerveDetection_allDimensions : + thomasonWeakEquivalences.{u} = + simplicialWeakEquivalences.inverseImage streetNerveFunctor ∧ + ∀ n : ℕ, thomasonWeakEquivalencesFinite.{u} n = + simplicialWeakEquivalences.inverseImage (streetNerveFinite n) := by + constructor + · funext X Y f + exact propext (Subdivision.thomasonWeak_iff_nerve f) + · intro n + funext X Y f + exact propext (Subdivision.thomasonWeakFinite_iff_nerve f) + +theorem rightProper_allDimensions : + RightProperFor thomasonWeakEquivalences.{u} thomasonFibrations ∧ + ∀ n : ℕ, RightProperFor (thomasonWeakEquivalencesFinite.{u} n) + (thomasonFibrationsFinite n) := + ⟨transferred_right_proper thomasonAdjunction, + fun n => transferred_right_proper (thomasonFiniteAdjunction n)⟩ + +theorem boundaryGenerators_allDimensions : + (boundaryImages thomasonLeft.{u}).rlp = + thomasonFibrations ⊓ thomasonWeakEquivalences ∧ + ∀ n : ℕ, (boundaryImages (thomasonLeftFinite.{u} n)).rlp = + thomasonFibrationsFinite n ⊓ thomasonWeakEquivalencesFinite n := + ⟨boundaryImages_right_class thomasonAdjunction, + fun n => boundaryImages_right_class (thomasonFiniteAdjunction n)⟩ + +theorem hornGenerators_allDimensions : + (hornImages thomasonLeft.{u}).rlp = thomasonFibrations ∧ + ∀ n : ℕ, (hornImages (thomasonLeftFinite.{u} n)).rlp = + thomasonFibrationsFinite n := + ⟨hornImages_rlp thomasonAdjunction, + fun n => hornImages_rlp (thomasonFiniteAdjunction n)⟩ + +theorem secondWFS_allDimensions : + IsWeakFactorizationSystem thomasonCofibrations.{u} + (thomasonFibrations ⊓ thomasonWeakEquivalences) ∧ + ∀ n : ℕ, IsWeakFactorizationSystem (thomasonCofibrationsFinite.{u} n) + (thomasonFibrationsFinite n ⊓ thomasonWeakEquivalencesFinite n) := + ⟨transferred_second_wfs thomasonAdjunction, + fun n => transferred_second_wfs (thomasonFiniteAdjunction n)⟩ + +end Thomason + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason + +structure RightIntervalExtension where + tensor : OmegaCategory.{u} ⥤ OmegaCategory.{u} + endpoint : Bool → ((𝟭 OmegaCategory.{u}) ⟶ tensor) + projection : tensor ⟶ (𝟭 OmegaCategory.{u}) + endpoint_projection : ∀ b, endpoint b ≫ projection = 𝟙 (𝟭 OmegaCategory.{u}) + cocontinuous : PreservesColimitsOfSize.{u,u} tensor + rightAdjoint : tensor.IsLeftAdjoint + simplex : ∀ (P : Type u) [LinearOrder P] [Finite P], + tensor.obj (NormalizedChains.complex P).nu ≅ + (NormalizedChains.complex P).cylinder.nu + simplex_natural : ∀ (P Q : Type u) [LinearOrder P] [Finite P] + [LinearOrder Q] [Finite Q] + (a : DirectedComplex.Hom (NormalizedChains.complex P) (NormalizedChains.complex Q)), + tensor.map a.nu ≫ (simplex Q).hom = (simplex P).hom ≫ a.cylinder.nu + simplex_endpoint : ∀ (P : Type u) [LinearOrder P] [Finite P] (b : Bool), + (endpoint b).app (NormalizedChains.complex P).nu ≫ (simplex P).hom = + ((NormalizedChains.complex P).cylinderEndpoint b).nu + simplex_projection : ∀ (P : Type u) [LinearOrder P] [Finite P], + (simplex P).hom ≫ (NormalizedChains.complex P).cylinderProjection.nu = + projection.app (NormalizedChains.complex P).nu + globe : ∀ n : ℕ, tensor.obj (GlobeComplex.complex.{u} n).nu ≅ + (GlobeComplex.complex.{u} n).cylinder.nu + globe_natural : ∀ (n m : ℕ) + (a : DirectedComplex.Hom (GlobeComplex.complex.{u} n) (GlobeComplex.complex.{u} m)), + tensor.map a.nu ≫ (globe m).hom = (globe n).hom ≫ a.cylinder.nu + globe_endpoint : ∀ (n : ℕ) (b : Bool), + (endpoint b).app (GlobeComplex.complex.{u} n).nu ≫ (globe n).hom = + ((GlobeComplex.complex.{u} n).cylinderEndpoint b).nu + globe_projection : ∀ n : ℕ, + (globe n).hom ≫ (GlobeComplex.complex.{u} n).cylinderProjection.nu = + projection.app (GlobeComplex.complex.{u} n).nu + +def RightIntervalExtensionExists : Prop := Nonempty RightIntervalExtension.{u} + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex +open CategoryTheory DirectedComplex DirectedComplex.Table + +def tableRowMap {K : DirectedComplex.{v}} (n : ℕ) (t : Table K) (p : ℕ) : + (complex.{u} n).Chain p →+ K.Chain p where + toFun x := x.val ⟨false⟩ • t.row p false + x.val ⟨true⟩ • t.row p true + map_zero' := by + change (0 : chainModule.{u} n p).val ⟨false⟩ • t.row p false + + (0 : chainModule.{u} n p).val ⟨true⟩ • t.row p true = 0 + simp + map_add' x y := by + change (x.val ⟨false⟩ + y.val ⟨false⟩) • t.row p false + + (x.val ⟨true⟩ + y.val ⟨true⟩) • t.row p true = + (x.val ⟨false⟩ • t.row p false + x.val ⟨true⟩ • t.row p true) + + (y.val ⟨false⟩ • t.row p false + y.val ⟨true⟩ • t.row p true) + simp only [add_smul] + abel + +lemma tableRowMap_d {K : DirectedComplex.{v}} (n : ℕ) (t : Table K) + (p : ℕ) (x : (complex.{u} n).Chain (p+1)) : + tableRowMap n t p ((complex n).d p x) = + K.d p (tableRowMap n t (p+1) x) := by + change ((complex n).d p x).val ⟨false⟩ • t.row p false + + ((complex n).d p x).val ⟨true⟩ • t.row p true = + K.d p (x.val ⟨false⟩ • t.row (p+1) false + x.val ⟨true⟩ • t.row (p+1) true) + rw [complex_d_coordinate, complex_d_coordinate] + simp only [Bool.false_eq_true, ite_false, ite_true, map_add, map_zsmul, t.boundary] + change (-(x.val ⟨false⟩ + x.val ⟨true⟩)) • t.row p false + + (x.val ⟨false⟩ + x.val ⟨true⟩) • t.row p true = _ + simp only [add_smul, neg_smul, smul_sub] + abel + +lemma tableRowMap_positive {K : DirectedComplex.{v}} (n : ℕ) (t : Table K) + (p : ℕ) (x : (complex.{u} n).Chain p) (hx : x ∈ (complex n).positive p) : + tableRowMap n t p x ∈ K.positive p := by + change x.val ⟨false⟩ • t.row p false + x.val ⟨true⟩ • t.row p true ∈ K.positive p + apply (K.positive p).add_mem + · rw [← Int.toNat_of_nonneg (hx false), Nat.cast_smul_eq_nsmul] + exact (K.positive p).nsmul_mem (t.positive p false) _ + · rw [← Int.toNat_of_nonneg (hx true), Nat.cast_smul_eq_nsmul] + exact (K.positive p).nsmul_mem (t.positive p true) _ + +def tableMap {K : DirectedComplex.{v}} (n : ℕ) (t : Table K) : + Hom (complex.{u} n) K where + map := tableRowMap n t + map_d := tableRowMap_d n t + map_augmentation x := by + change K.augmentation (x.val ⟨false⟩ • t.row 0 false + + x.val ⟨true⟩ • t.row 0 true) = x.val ⟨false⟩ + x.val ⟨true⟩ + simp only [map_add, map_zsmul, t.augmentation, zsmul_eq_mul, Int.cast_id, mul_one] + map_positive := tableRowMap_positive n t + +lemma tableMap_nu_top {K : DirectedComplex.{v}} (n : ℕ) (t : Table K) : + (tableMap.{u,v} n t).nu.map (topTable n) = truncate n false t := by + change (tableMap n t).table (topTable n) = truncate n false t + ext p b + change tableRowMap n t p (topRow n p b) = _ + rw [truncate_row] + by_cases hp : p < n + · rw [ite_eq_left hp, topRow_lt n p b hp] + cases b <;> simp [tableRowMap] + · rw [ite_eq_right hp] + by_cases hn : p = n + · subst p + rw [ite_eq_left rfl, topRow_eq] + simp [tableRowMap] + · rw [ite_eq_right hn, topRow_gt n p b (by omega), map_zero] + +lemma tableMap_nu {K : DirectedComplex.{v}} {n : ℕ} (t : Table K) + (ht : truncate n false t = t) : + (tableMap.{u,v} n t).nu = lift t ht := by + apply functor_ext + erw [tableMap_nu_top, lift_top, ht] + +def faceMap (n k : ℕ) (b : Bool) : Hom (complex.{u} k) (complex.{u} n) := + tableMap k (truncate k b (topTable n)) + +lemma faceMap_nu (n k : ℕ) (b : Bool) : + (faceMap.{u} n k b).nu = + lift (truncate k b (topTable n)) (by + change truncate k false (truncate k b (topTable n)) = truncate k b (topTable n) + simp only [truncate_truncate, lt_self_iff_false, ite_false]) := + tableMap_nu _ _ + +lemma chain_eq_topRows {n p : ℕ} (x : (complex.{u} n).Chain p) : + x = x.val ⟨false⟩ • topRow n p false + x.val ⟨true⟩ • topRow n p true := by + by_cases hp : p < n + · rw [topRow_lt n p false hp, topRow_lt n p true hp] + apply Subtype.ext + funext ⟨i⟩ + change x.val ⟨i⟩ = x.val ⟨false⟩ * (if i = false then 1 else 0) + + x.val ⟨true⟩ * (if i = true then 1 else 0) + cases i <;> simp + · by_cases hn : p = n + · subst p + rw [topRow_eq, topRow_eq] + have ht := top_target_zero n x + apply Subtype.ext + funext ⟨i⟩ + change x.val ⟨i⟩ = x.val ⟨false⟩ * (if i = false then 1 else 0) + + x.val ⟨true⟩ * (if i = false then 1 else 0) + cases i <;> simp [ht] + · rw [chain_zero (show n < p by omega) x] + simp + rfl + +lemma hom_ext {K : DirectedComplex.{v}} {n : ℕ} + {f g : Hom (complex.{u} n) K} + (h : f.nu.map (topTable n) = g.nu.map (topTable n)) : f = g := by + ext p x + change f.table (topTable n) = g.table (topTable n) at h + have h₀ := congrArg (fun t : Table K => t.row p false) h + have h₁ := congrArg (fun t : Table K => t.row p true) h + change f.map p (topRow n p false) = g.map p (topRow n p false) at h₀ + change f.map p (topRow n p true) = g.map p (topRow n p true) at h₁ + rw [chain_eq_topRows x] + simp only [map_add, map_zsmul, h₀, h₁] + +def homCellEquiv (n : ℕ) (K : DirectedComplex.{v}) : + Hom (complex.{u} n) K ≃ K.nu.Cells n where + toFun f := ⟨f.nu.map (topTable n), by + change truncate n false (f.table (topTable n)) = f.table (topTable n) + rw [← f.table_truncate, topTable_bounded]⟩ + invFun t := tableMap n t.val + left_inv f := by + apply hom_ext + erw [tableMap_nu_top] + change truncate n false (f.table (topTable n)) = f.table (topTable n) + rw [← f.table_truncate, topTable_bounded] + right_inv t := by + apply Subtype.ext + exact (tableMap_nu_top n t.val).trans t.property + +lemma faceMap_top (n k : ℕ) (b : Bool) : + (faceMap.{u} n k b).nu.map (topTable k) = truncate k b (topTable n) := by + erw [faceMap_nu, lift_top] + +@[simp] lemma faceMap_self (n : ℕ) (b : Bool) : + faceMap.{u} n n b = Hom.id (complex n) := by + apply hom_ext + rw [faceMap_top] + change truncate n b (topTable n) = topTable n + rw [← face_nu] + exact (complex n).nu.face_of_fixed (topTable_bounded n) (le_refl n) b + +lemma faceMap_faceMap (n k j : ℕ) (hjk : j < k) (a b : Bool) : + Hom.comp (faceMap.{u} k j a) (faceMap n k b) = faceMap n j a := by + apply hom_ext + change (faceMap n k b).nu.map ((faceMap k j a).nu.map (topTable j)) = _ + rw [faceMap_top] + change (faceMap n k b).table (truncate j a (topTable k)) = _ + rw [Hom.table_truncate] + change truncate j a ((faceMap n k b).nu.map (topTable k)) = _ + rw [faceMap_top, faceMap_top, truncate_truncate, ite_eq_left hjk] + +def counitInverse (n : ℕ) : Hom (complex.{u} n) (complex n).nu.linearization := + tableMap n ((complex n).nu.lambdaUnit.map (topTable n)) + +lemma counitInverse_nu (n : ℕ) : + (counitInverse.{u} n).nu = (complex n).nu.lambdaUnit := by + apply functor_ext + erw [counitInverse, tableMap_nu_top] + change (complex n).nu.linearization.nu.source n + ((complex n).nu.lambdaUnit.map (topTable n)) = _ + erw [← (complex n).nu.lambdaUnit.map_source] + change (complex n).nu.lambdaUnit.map (truncate n false (topTable n)) = _ + rw [topTable_bounded] + +lemma counitInverse_counit (n : ℕ) : + Hom.comp (counitInverse.{u} n) (complex n).lambdaCounit = Hom.id (complex n) := by + apply hom_ext + change (complex n).lambdaCounit.nu.map ((counitInverse n).nu.map (topTable n)) = topTable n + rw [counitInverse_nu] + have h := lambdaNuForward_counit (Hom.id (complex.{u} n)) + change lambdaNuForward (complex n).lambdaCounit = OmegaCategory.Functor.id (complex n).nu at h + exact congrArg (fun F => F.map (topTable n)) h + +lemma counit_counitInverse (n : ℕ) : + Hom.comp (complex.{u} n).lambdaCounit (counitInverse n) = + Hom.id (complex n).nu.linearization := by + apply (lambdaNuHomEquiv (complex n).nu (complex n).nu.linearization).injective + change lambdaNuForward (Hom.comp (complex n).lambdaCounit (counitInverse n)) = + lambdaNuForward (Hom.id (complex n).nu.linearization) + rw [lambdaNuForward_counit, counitInverse_nu] + rfl + +def counitIso (n : ℕ) : (complex.{u} n).nu.linearization ≅ complex n where + hom := (complex n).lambdaCounit + inv := counitInverse n + hom_inv_id := counit_counitInverse n + inv_hom_id := counitInverse_counit n + +end Thomason.GlobeComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/DirectedPrisms.lean b/lean/OAI/CategoryTheory/Thomason/DirectedPrisms.lean new file mode 100644 index 0000000000000000000000000000000000000000..129eb0c10c8f0df7d7b8761cc164d8815c3540cd --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/DirectedPrisms.lean @@ -0,0 +1,763 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.StrictCategories + +namespace OAI + +/-! Directed Prisms. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex + +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{v}} + +structure PositiveAntihomotopy (F G : Hom K L) where + map (p : ℕ) : K.Chain p →+ L.Chain (p+1) + positive (p : ℕ) (x : K.Chain p) : x ∈ K.positive p → map p x ∈ L.positive (p+1) + boundary_zero (x : K.Chain 0) : L.d 0 (map 0 x) = G.map 0 x - F.map 0 x + boundary_succ (p : ℕ) (x : K.Chain (p+1)) : + L.d (p+1) (map (p+1) x) = map p (K.d p x) + + ((-1 : ℤ)^(p+1)) • (G.map (p+1) x - F.map (p+1) x) + +namespace PositiveAntihomotopy + +variable {F G : Hom K L} (h : PositiveAntihomotopy F G) + +def cylinderMap : (p : ℕ) → K.cylinder.Chain p →+ L.Chain p + | 0 => + { toFun := fun x => F.map 0 x.1 + G.map 0 x.2 + map_zero' := by simp + map_add' := by intro x y; simp; abel } + | p+1 => + { toFun := fun x => F.map (p+1) x.1 + G.map (p+1) x.2.1 + h.map p x.2.2 + map_zero' := by simp + map_add' := by intro x y; simp; abel } + +def cylinderHom : Hom K.cylinder L where + map := h.cylinderMap + map_d p x := by + cases p with + | zero => + dsimp [cylinder, cylinderMap, cylinderDifferential] + simp only [map_add, map_sub, F.map_d, G.map_d, h.boundary_zero] + abel + | succ p => + dsimp [cylinder, cylinderMap, cylinderDifferential] + simp only [map_add, map_sub, map_zsmul, smul_sub, F.map_d, G.map_d, + h.boundary_succ] + abel + map_augmentation x := by + dsimp [cylinderMap, cylinder] + simp only [map_add, F.map_augmentation, G.map_augmentation] + map_positive p x hx := by + cases p with + | zero => + exact (L.positive 0).add_mem + (F.map_positive 0 _ hx.1) (G.map_positive 0 _ hx.2) + | succ p => + exact (L.positive (p+1)).add_mem + ((L.positive (p+1)).add_mem + (F.map_positive (p+1) _ hx.1) (G.map_positive (p+1) _ hx.2.1)) + (h.positive p _ hx.2.2) + +lemma cylinderHom_endpoint_false : + Hom.comp (K.cylinderEndpoint false) h.cylinderHom = F := by + ext p x + cases p <;> + dsimp [Hom.comp, cylinderEndpoint, cylinderEndpointMap, cylinderHom, cylinderMap] <;> simp + +lemma cylinderHom_endpoint_true : + Hom.comp (K.cylinderEndpoint true) h.cylinderHom = G := by + ext p x + cases p <;> + dsimp [Hom.comp, cylinderEndpoint, cylinderEndpointMap, cylinderHom, cylinderMap] <;> simp + +end PositiveAntihomotopy +end Thomason.DirectedComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] + +lemma degreeSign_of_grade {k : ℕ} {c : Chains E} (hc : c ∈ grade (k+1)) : + degreeSign c = ((-1 : ℤ)^k) • c := by + classical + rw [degreeSign, Finsupp.linearCombination_apply] + change (∑ w ∈ c.support, c w • (((-1 : ℤ)^(w.val.length-1)) • bracket w.val)) = _ + calc + _ = ∑ w ∈ c.support, ((-1 : ℤ)^k) • Finsupp.single w (c w) := by + apply Finset.sum_congr rfl + intro w hw + have hl := (mem_grade_iff (k+1) c).mp hc w (Finsupp.mem_support_iff.mp hw) + rw [hl, Nat.add_sub_cancel, bracket_of_pairwise w.property, smul_comm] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + _ = ((-1 : ℤ)^k) • c := by + rw [← Finset.smul_sum] + congr 1 + exact Finsupp.sum_single c + +lemma prism_of_grade_zero {D : Type v} [PartialOrder D] (f g : E → D) + {c : Chains E} (hc : c ∈ grade 0) : prism f g c = 0 := by + classical + rw [prism, Finsupp.linearCombination_apply, Finsupp.sum] + apply Finset.sum_eq_zero + intro w hw + have hl := (mem_grade_iff 0 c).mp hc w (Finsupp.mem_support_iff.mp hw) + have ht : w.val = [] := List.length_eq_zero_iff.mp hl + simp [ht] + +def gradedPrism {D : Type v} [PartialOrder D] (f g : E → D) (p : ℕ) : + (complex E).Chain p →+ (complex D).Chain (p+1) where + toFun c := ⟨prism f g c.val, prism_mem_grade f g c.property⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' _x _y := Subtype.ext (map_add _ _ _) + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RelativePrismData + +open NormalizedChains DirectedComplex + +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) + +def antihomotopy : PositiveAntihomotopy (complexMap d.f) (complexMap d.g) where + map := gradedPrism d.f d.g + positive p x hx := prism_positive d.f d.g hx + boundary_zero x := by + apply Subtype.ext + change boundary (prism d.f d.g x.val) = map d.g x.val - map d.f x.val + rw [d.boundary_prism, degreeSign_of_grade x.property, + prism_of_grade_zero d.f d.g (boundary_mem_grade x.property)] + simp + boundary_succ p x := by + apply Subtype.ext + change boundary (prism d.f d.g x.val) = prism d.f d.g (boundary x.val) + + ((-1 : ℤ)^(p+1)) • (map d.g x.val - map d.f x.val) + rw [d.boundary_prism, degreeSign_of_grade x.property] + simp only [map_smul, smul_sub] + abel + +def cylinderChainMap : Hom (complex E).cylinder (complex E) := + d.antihomotopy.cylinderHom + +lemma cylinderChainMap_endpoint_false : + Hom.comp ((complex E).cylinderEndpoint false) d.cylinderChainMap = complexMap d.f := + d.antihomotopy.cylinderHom_endpoint_false + +lemma cylinderChainMap_endpoint_true : + Hom.comp ((complex E).cylinderEndpoint true) d.cylinderChainMap = complexMap d.g := + d.antihomotopy.cylinderHom_endpoint_true + +def tableCylinder : OmegaCategory.Functor (complex E).cylinder.nu (complex E).nu := + d.cylinderChainMap.nu + +end Thomason.RelativePrismData + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.Hom + +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{v}} {M : DirectedComplex.{w}} + +def cylinderMap (F : Hom K L) : (p : ℕ) → K.cylinder.Chain p →+ L.cylinder.Chain p + | 0 => + { toFun := fun x => (F.map 0 x.1, F.map 0 x.2) + map_zero' := by simp + map_add' := by intro x y; simp } + | p+1 => + { toFun := fun x => (F.map (p+1) x.1, F.map (p+1) x.2.1, F.map p x.2.2) + map_zero' := by simp + map_add' := by intro x y; simp } + +def cylinder (F : Hom K L) : Hom K.cylinder L.cylinder where + map := F.cylinderMap + map_d p x := by + cases p <;> dsimp [cylinderMap, DirectedComplex.cylinder, cylinderDifferential] <;> + simp only [map_add, map_sub, map_zsmul, F.map_d] + map_augmentation x := by + dsimp [cylinderMap, DirectedComplex.cylinder] + rw [F.map_augmentation, F.map_augmentation] + map_positive p x hx := by + cases p with + | zero => exact ⟨F.map_positive 0 _ hx.1, F.map_positive 0 _ hx.2⟩ + | succ p => exact ⟨F.map_positive (p+1) _ hx.1, + F.map_positive (p+1) _ hx.2.1, F.map_positive p _ hx.2.2⟩ + +@[simp] lemma cylinder_id : (id K).cylinder = id K.cylinder := by + ext p x + cases p <;> rfl + +lemma cylinder_comp (F : Hom K L) (G : Hom L M) : + (comp F G).cylinder = comp F.cylinder G.cylinder := by + ext p x + cases p <;> rfl + +lemma cylinder_endpoint (F : Hom K L) (b : Bool) : + comp (K.cylinderEndpoint b) F.cylinder = comp F (L.cylinderEndpoint b) := by + ext p x + cases p <;> cases b <;> + dsimp [comp, DirectedComplex.cylinderEndpoint, cylinderEndpointMap, + cylinder, cylinderMap] <;> simp + +lemma cylinder_projection (F : Hom K L) : + comp F.cylinder L.cylinderProjection = comp K.cylinderProjection F := by + ext p x + cases p <;> + dsimp [comp, DirectedComplex.cylinderProjection, cylinderProjectionMap, + cylinder, cylinderMap] <;> simp + +end Thomason.DirectedComplex.Hom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] {D : Type v} [PartialOrder D] + +lemma map_prism {B : Type w} [PartialOrder B] (f g : E →o D) + (hfg : ∀ e, f e ≤ g e) (a : D →o B) (c : Chains E) : + map a (prism f g c) = prism (a ∘ f) (a ∘ g) c := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih] + congr 1 + have hz : Finsupp.single l z = z • bracket l.val := by + rw [bracket_of_pairwise l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul] + congr 1 + have hl := l.property.imp fun h => le_of_lt h + rw [prism_bracket _ _ hl, prism_bracket _ _ hl] + rcases l with ⟨l, hs⟩ + dsimp at * + cases l using List.reverseRecOn with + | nil => simp [prismWord] + | append_singleton l b => + rw [prismWord_append, prismWord_append] + have hh : (l.map f ++ [f b, g b]).Pairwise (· ≤ ·) := by + rw [List.pairwise_append] + refine ⟨?_, by simpa using hfg b, ?_⟩ + · exact List.pairwise_map.mpr ((List.pairwise_append.mp hl).1.imp fun h => f.monotone h) + · intro x hx y hy + obtain ⟨w, hw, rfl⟩ := List.mem_map.mp hx + have hwb : w ≤ b := (List.pairwise_append.mp hl).2.2 w hw b (by simp) + simp only [List.mem_cons, List.not_mem_nil, or_false] at hy + rcases hy with rfl | rfl + · exact f.monotone hwb + · exact (f.monotone hwb).trans (hfg b) + rw [map_bracket a hh] + simp only [List.map_append, List.map_cons, List.map_nil, List.map_map, + Function.comp_apply] + +lemma prism_stationary_map {A : Set D} (d : RelativePrismData D A) + (a : E →o D) (ha : ∀ e, a e ∈ A) (c : Chains E) : + prism d.f d.g (map a c) = 0 := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, ih, add_zero] + have hz : Finsupp.single l z = z • bracket l.val := by + rw [bracket_of_pairwise l.property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + rw [hz] + simp only [map_smul] + have hl := l.property.imp fun h => le_of_lt h + rw [map_bracket _ hl, + prism_bracket _ _ (List.pairwise_map.mpr (hl.imp fun h => a.monotone h)), + d.prism_stationary] + · simp + · intro x hx + obtain ⟨e, _, rfl⟩ := List.mem_map.mp hx + exact ha e + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RelativePrismData + +open DirectedComplex NormalizedChains + +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) + +lemma cylinderChainMap_stationary {B : Type v} [PartialOrder B] + (a : B →o E) (ha : ∀ b, a b ∈ A) : + Hom.comp (complexMap a).cylinder d.cylinderChainMap = + Hom.comp (complex B).cylinderProjection (complexMap (d.f.comp a)) := by + have hag : d.g.comp a = d.f.comp a := by + ext b + exact (d.agree (a b) (ha b)).symm + have hm (p : ℕ) (x : (complex B).Chain p) : + (complexMap d.g).map p ((complexMap a).map p x) = + (complexMap d.f).map p ((complexMap a).map p x) := by + have he : Hom.comp (complexMap a) (complexMap d.g) = + Hom.comp (complexMap a) (complexMap d.f) := by + rw [← complexMap_comp, ← complexMap_comp, hag] + exact congrArg (fun h => h.map p x) he + have hf (p : ℕ) (x : (complex B).Chain p) : + (complexMap (d.f.comp a)).map p x = + (complexMap d.f).map p ((complexMap a).map p x) := by + exact congrArg (fun h => h.map p x) (complexMap_comp a d.f) + ext p x + cases p with + | zero => + change (complexMap d.f).map 0 ((complexMap a).map 0 x.1) + + (complexMap d.g).map 0 ((complexMap a).map 0 x.2) = + (complexMap (d.f.comp a)).map 0 (x.1 + x.2) + rw [map_add, hf, hf, hm] + | succ p => + change (complexMap d.f).map (p+1) ((complexMap a).map (p+1) x.1) + + (complexMap d.g).map (p+1) ((complexMap a).map (p+1) x.2.1) + + gradedPrism d.f d.g p ((complexMap a).map p x.2.2) = + (complexMap (d.f.comp a)).map (p+1) (x.1 + x.2.1) + have hh : gradedPrism d.f d.g p ((complexMap a).map p x.2.2) = 0 := by + apply Subtype.ext + exact prism_stationary_map d a ha x.2.2.val + rw [hh, add_zero, map_add, hf, hf, hm] + +lemma tableCylinder_stationary {B : Type v} [PartialOrder B] + (a : B →o E) (ha : ∀ b, a b ∈ A) : + OmegaCategory.Functor.comp (complexMap a).cylinder.nu d.tableCylinder = + OmegaCategory.Functor.comp (complex B).cylinderProjection.nu + (complexMap (d.f.comp a)).nu := by + exact congrArg Hom.nu (d.cylinderChainMap_stationary a ha) + +end Thomason.RelativePrismData + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.PositiveAntihomotopy + +variable {J : DirectedComplex.{u}} {K : DirectedComplex.{v}} {L : DirectedComplex.{w}} + +def precomp (a : Hom J K) {F G : Hom K L} (h : PositiveAntihomotopy F G) : + PositiveAntihomotopy (Hom.comp a F) (Hom.comp a G) where + map p := (h.map p).comp (a.map p) + positive p x hx := h.positive p _ (a.map_positive p x hx) + boundary_zero x := h.boundary_zero _ + boundary_succ p x := by + dsimp [Hom.comp] + rw [h.boundary_succ, ← a.map_d] + +def postcomp {F G : Hom J K} (h : PositiveAntihomotopy F G) (a : Hom K L) : + PositiveAntihomotopy (Hom.comp F a) (Hom.comp G a) where + map p := (a.map (p+1)).comp (h.map p) + positive p x hx := a.map_positive (p+1) _ (h.positive p x hx) + boundary_zero x := by + dsimp [Hom.comp] + rw [← a.map_d, h.boundary_zero, map_sub] + boundary_succ p x := by + dsimp [Hom.comp] + rw [← a.map_d, h.boundary_succ, map_add, map_zsmul, map_sub] + +lemma precomp_cylinderHom (a : Hom J K) {F G : Hom K L} + (h : PositiveAntihomotopy F G) : + (h.precomp a).cylinderHom = Hom.comp a.cylinder h.cylinderHom := by + ext p x + cases p <;> rfl + +lemma postcomp_cylinderHom {F G : Hom J K} (h : PositiveAntihomotopy F G) + (a : Hom K L) : + (h.postcomp a).cylinderHom = Hom.comp h.cylinderHom a := by + ext p x + cases p <;> dsimp [Hom.comp, cylinderHom, cylinderMap, postcomp] <;> + simp only [map_add] + +end Thomason.DirectedComplex.PositiveAntihomotopy + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RelativePrismData + +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) + +def simplexImage {m : ℕ} (σ : Fin (m+1) →o E) : Set E := + Set.range (d.f ∘ σ) ∪ Set.range (d.g ∘ σ) + +lemma simplexImage_finite {m : ℕ} (σ : Fin (m+1) →o E) : + (d.simplexImage σ).Finite := + (Set.finite_range _).union (Set.finite_range _) + +lemma simplexImage_shape {m : ℕ} (σ : Fin (m+1) →o E) : + d.simplexImage σ = Set.range (d.f ∘ σ) ∪ {d.g (σ (Fin.last m))} := by + ext e + refine ⟨?_, ?_⟩ + · rintro (he | ⟨i, rfl⟩) + · exact Or.inl he + · by_cases hi : σ i ∈ A + · exact Or.inl ⟨i, d.agree (σ i) hi⟩ + · exact Or.inr (d.constant (σ i) hi (σ (Fin.last m)) (fun hh => + hi (d.lowerSet (σ.monotone (Fin.le_last i)) hh))) + · rintro (he | he) + · exact Or.inl he + · exact Or.inr ⟨Fin.last m, he.symm⟩ + +lemma simplexImage_bounded {m : ℕ} (σ : Fin (m+1) →o E) + {e : E} (he : e ∈ d.simplexImage σ) : e ≤ d.g (σ (Fin.last m)) := by + rw [d.simplexImage_shape] at he + rcases he with ⟨i, rfl⟩ | he + · exact (d.f.monotone (σ.monotone (Fin.le_last i))).trans (d.below _) + · exact le_of_eq he + +lemma simplexImage_total {m : ℕ} (σ : Fin (m+1) →o E) + {e e' : E} (he : e ∈ d.simplexImage σ) (he' : e' ∈ d.simplexImage σ) : + e ≤ e' ∨ e' ≤ e := by + rw [d.simplexImage_shape] at he he' + rcases he with ⟨i, rfl⟩ | he + · rcases he' with ⟨j, rfl⟩ | he' + · exact (le_total i j).imp + (fun h => d.f.monotone (σ.monotone h)) + (fun h => d.f.monotone (σ.monotone h)) + · exact Or.inl (he' ▸ (d.f.monotone (σ.monotone (Fin.le_last i))).trans (d.below _)) + · exact Or.inr (he ▸ d.simplexImage_bounded σ (by rw [d.simplexImage_shape]; exact he')) + +noncomputable abbrev simplexImageLinearOrder {m : ℕ} (σ : Fin (m+1) →o E) : + LinearOrder (d.simplexImage σ) := by + classical + exact { + toPartialOrder := inferInstance + le_total := fun x y => d.simplexImage_total σ x.property y.property + toDecidableLE := Classical.decRel _ } + +def simplexImageLeft {m : ℕ} (σ : Fin (m+1) →o E) : Fin (m+1) →o d.simplexImage σ where + toFun i := ⟨d.f (σ i), Or.inl ⟨i, rfl⟩⟩ + monotone' _ _ h := d.f.monotone (σ.monotone h) + +def simplexImageRight {m : ℕ} (σ : Fin (m+1) →o E) : Fin (m+1) →o d.simplexImage σ where + toFun i := ⟨d.g (σ i), Or.inr ⟨i, rfl⟩⟩ + monotone' _ _ h := d.g.monotone (σ.monotone h) + +def simplexImageMap {m q : ℕ} (σ : Fin (m+1) →o E) (α : Fin (q+1) →o Fin (m+1)) : + d.simplexImage (σ.comp α) ↪o d.simplexImage σ where + toFun x := ⟨x.val, by + rcases x.property with ⟨i, hi⟩ | ⟨i, hi⟩ + · exact Or.inl ⟨α i, hi⟩ + · exact Or.inr ⟨α i, hi⟩⟩ + inj' _ _ h := Subtype.ext (congrArg (fun y : d.simplexImage σ => y.val) h) + map_rel_iff' := Iff.rfl + +end Thomason.RelativePrismData + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] {D : Type v} [PartialOrder D] + +def wordEmbedding (f : E ↪o D) : Word E ↪ Word D where + toFun w := ⟨w.val.map f, List.pairwise_map.mpr (w.property.imp fun h => f.strictMono h)⟩ + inj' x y h := by + apply Subtype.ext + exact List.map_injective_iff.mpr f.injective (congrArg Subtype.val h) + +lemma map_orderEmbedding (f : E ↪o D) (c : Chains E) : + map f.toOrderHom c = Finsupp.mapDomain (wordEmbedding f) c := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, Finsupp.mapDomain_add, ih] + congr 1 + rw [map, Finsupp.linearCombination_single, Finsupp.mapDomain_single] + change z • bracket (wordEmbedding f l).val = Finsupp.single (wordEmbedding f l) z + rw [bracket_of_pairwise (wordEmbedding f l).property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + +lemma map_orderEmbedding_injective (f : E ↪o D) : + Function.Injective (map f.toOrderHom) := by + intro x y h + apply Finsupp.mapDomain_injective (wordEmbedding f).injective + simpa only [← map_orderEmbedding] using h + +lemma complexMap_orderEmbedding_injective (f : E ↪o D) (p : ℕ) : + Function.Injective ((complexMap f.toOrderHom).map p) := by + intro x y h + apply Subtype.ext + exact map_orderEmbedding_injective f (congrArg Subtype.val h) + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.PositiveAntihomotopy + +variable {J : DirectedComplex.{u}} {K : DirectedComplex.{v}} {L : DirectedComplex.{w}} + +def lift (F G : Hom J K) (a : Hom K L) + (ha : ∀ p, Function.Injective (a.map p)) {F' G' : Hom J L} + (h : PositiveAntihomotopy F' G') + (hf : ∀ p x, a.map p (F.map p x) = F'.map p x) + (hg : ∀ p x, a.map p (G.map p x) = G'.map p x) + (H : (p : ℕ) → J.Chain p →+ K.Chain (p+1)) + (Hpos : ∀ p x, x ∈ J.positive p → H p x ∈ K.positive (p+1)) + (Hmap : ∀ p x, a.map (p+1) (H p x) = h.map p x) : + PositiveAntihomotopy F G where + map := H + positive := Hpos + boundary_zero x := by + apply ha 0 + rw [a.map_d, Hmap, h.boundary_zero, map_sub, hf, hg] + boundary_succ p x := by + apply ha (p+1) + rw [a.map_d, Hmap, h.boundary_succ, map_add, Hmap, map_zsmul, map_sub, hf, hg] + +end Thomason.DirectedComplex.PositiveAntihomotopy + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RelativePrismData + +open NormalizedChains DirectedComplex + +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) + +def simplexImageInclusion {m : ℕ} (σ : Fin (m+1) →o E) : d.simplexImage σ ↪o E := + OrderEmbedding.subtype _ + +def simplexAntihomotopy {m : ℕ} (σ : Fin (m+1) →o E) : + PositiveAntihomotopy (complexMap (d.simplexImageLeft σ)) + (complexMap (d.simplexImageRight σ)) := + PositiveAntihomotopy.lift _ _ (complexMap (d.simplexImageInclusion σ).toOrderHom) + (complexMap_orderEmbedding_injective (d.simplexImageInclusion σ)) + (d.antihomotopy.precomp (complexMap σ)) + (fun p x => by + apply Subtype.ext + change map (d.simplexImageInclusion σ).toOrderHom + (map (d.simplexImageLeft σ) x.val) = map d.f (map σ x.val) + simp only [← map_comp] + rfl) + (fun p x => by + apply Subtype.ext + change map (d.simplexImageInclusion σ).toOrderHom + (map (d.simplexImageRight σ) x.val) = map d.g (map σ x.val) + simp only [← map_comp] + rfl) + (gradedPrism (d.simplexImageLeft σ) (d.simplexImageRight σ)) + (fun _ _ hx => prism_positive _ _ hx) + (fun p x => by + apply Subtype.ext + change map (d.simplexImageInclusion σ).toOrderHom + (prism (d.simplexImageLeft σ) (d.simplexImageRight σ) x.val) = + prism d.f d.g (map σ x.val) + rw [map_prism _ _ (fun i => d.below (σ i)), prism_map] + rfl) + +def simplexCylinderChainMap {m : ℕ} (σ : Fin (m+1) →o E) : + Hom (complex (Fin (m+1))).cylinder (complex (d.simplexImage σ)) := + (d.simplexAntihomotopy σ).cylinderHom + +lemma simplexCylinderChainMap_inclusion {m : ℕ} (σ : Fin (m+1) →o E) : + Hom.comp (d.simplexCylinderChainMap σ) + (complexMap (d.simplexImageInclusion σ).toOrderHom) = + Hom.comp (complexMap σ).cylinder d.cylinderChainMap := by + ext p x + cases p with + | zero => + apply Subtype.ext + change map _ (map _ x.1.val + map _ x.2.val) = + map _ (map _ x.1.val) + map _ (map _ x.2.val) + simp only [map_add, ← map_comp] + rfl + | succ p => + apply Subtype.ext + change map _ (map _ x.1.val + map _ x.2.1.val + prism _ _ x.2.2.val) = + map _ (map _ x.1.val) + map _ (map _ x.2.1.val) + prism _ _ (map _ x.2.2.val) + simp only [map_add, ← map_comp] + rw [map_prism _ _ (fun i => d.below (σ i)), prism_map] + rfl + +lemma simplexCylinderChainMap_naturality {m q : ℕ} (σ : Fin (m+1) →o E) + (α : Fin (q+1) →o Fin (m+1)) : + Hom.comp (d.simplexCylinderChainMap (σ.comp α)) + (complexMap (d.simplexImageMap σ α).toOrderHom) = + Hom.comp (complexMap α).cylinder (d.simplexCylinderChainMap σ) := by + ext p x + apply complexMap_orderEmbedding_injective (d.simplexImageInclusion σ) p + have hl := congrArg (fun h => h.map p x) + (d.simplexCylinderChainMap_inclusion (σ.comp α)) + have hr := congrArg (fun h => h.map p ((complexMap α).cylinder.map p x)) + (d.simplexCylinderChainMap_inclusion σ) + have he : Hom.comp (complexMap (d.simplexImageMap σ α).toOrderHom) + (complexMap (d.simplexImageInclusion σ).toOrderHom) = + complexMap (d.simplexImageInclusion (σ.comp α)).toOrderHom := by + rw [← complexMap_comp] + rfl + have hc : Hom.comp (complexMap α).cylinder (complexMap σ).cylinder = + (complexMap (σ.comp α)).cylinder := by + rw [complexMap_comp, Hom.cylinder_comp] + change (Hom.comp (complexMap (d.simplexImageMap σ α).toOrderHom) + (complexMap (d.simplexImageInclusion σ).toOrderHom)).map p + ((d.simplexCylinderChainMap (σ.comp α)).map p x) = _ + rw [he] + dsimp only [Hom.comp, AddMonoidHom.comp_apply] at hl hr ⊢ + rw [hl, hr] + exact congrArg (fun h => d.cylinderChainMap.map p (h.map p x)) hc.symm + +end Thomason.RelativePrismData + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +@[ext] +structure ThinCell (S : Type u) (r : S → S → Prop) where + left : S + right : S + related : r left right + +namespace ThinCell + +variable {S : Type u} {r : S → S → Prop} +variable (hr : ∀ s, r s s) (ht : ∀ {s t v}, r s t → r t v → r s v) + +def vertex (s : S) : ThinCell S r := ⟨s, s, hr s⟩ + +def source : ℕ → ThinCell S r → ThinCell S r + | 0, x => vertex hr x.left + | _+1, x => x + +def target : ℕ → ThinCell S r → ThinCell S r + | 0, x => vertex hr x.right + | _+1, x => x + +def comp : (k : ℕ) → (x y : ThinCell S r) → target hr k x = source hr k y → ThinCell S r + | 0, x, y, h => ⟨x.left, y.right, ht x.related (by + have he : x.right = y.left := congrArg ThinCell.left h + exact he ▸ y.related)⟩ + | _+1, x, _, _ => x + +@[simp] lemma source_zero (x : ThinCell S r) : source hr 0 x = vertex hr x.left := rfl +@[simp] lemma source_succ (k : ℕ) (x : ThinCell S r) : source hr (k+1) x = x := rfl +@[simp] lemma target_zero (x : ThinCell S r) : target hr 0 x = vertex hr x.right := rfl +@[simp] lemma target_succ (k : ℕ) (x : ThinCell S r) : target hr (k+1) x = x := rfl +@[simp] lemma vertex_left (s : S) : (vertex hr s).left = s := rfl +@[simp] lemma vertex_right (s : S) : (vertex hr s).right = s := rfl +@[simp] lemma comp_zero_left (x y : ThinCell S r) (h) : (comp hr ht 0 x y h).left = x.left := rfl +@[simp] lemma comp_zero_right (x y : ThinCell S r) (h) : (comp hr ht 0 x y h).right = y.right := rfl +@[simp] lemma comp_succ (k : ℕ) (x y : ThinCell S r) (h) : comp hr ht (k+1) x y h = x := rfl + +end ThinCell + +def thin {S : Type u} (r : S → S → Prop) + (hr : ∀ s, r s s) (ht : ∀ {s t v}, r s t → r t v → r s v) : OmegaCategory.{u} where + Cell := ThinCell S r + source := ThinCell.source hr + target := ThinCell.target hr + source_source i j x := by + cases i <;> cases j <;> simp [ThinCell.source, ThinCell.vertex] + target_target i j x := by + cases i <;> cases j <;> simp [ThinCell.target, ThinCell.vertex] + source_target i j x := by + cases i <;> cases j <;> simp [ThinCell.source, ThinCell.target, ThinCell.vertex] + target_source i j x := by + cases i <;> cases j <;> simp [ThinCell.source, ThinCell.target, ThinCell.vertex] + comp := ThinCell.comp hr ht + source_comp_le i k hik x y h := by + cases k with + | zero => + have hi : i = 0 := by omega + subst i + rfl + | succ k => rfl + target_comp_le i k hik x y h := by + cases k with + | zero => + have hi : i = 0 := by omega + subst i + rfl + | succ k => exact congrArg (ThinCell.target hr i) h + source_comp_gt i k hki x y h hs := by + cases i with + | zero => omega + | succ i => rfl + target_comp_gt i k hki x y h hs := by + cases i with + | zero => omega + | succ i => rfl + unit_left k x h := by + cases k with + | zero => ext <;> rfl + | succ k => rfl + unit_right k x h := by + cases k with + | zero => ext <;> rfl + | succ k => rfl + assoc k x y z hxy hyz hxy_z hx_yz := by + cases k with + | zero => ext <;> rfl + | succ k => rfl + interchange k l hkl a b c d hab hcd hac hbd hab_cd hac_bd := by + cases l with + | zero => omega + | succ l => rfl + finite_dimension x := ⟨1, rfl⟩ + +def interval : OmegaCategory.{u} := thin (fun a b : ULift.{u} (Fin 2) => a.down ≤ b.down) + (fun _ => le_rfl) (fun h h' => h.trans h') + +def chaotic (S : Type u) : OmegaCategory.{u} := thin (fun _ _ : S => True) + (fun _ => True.intro) (fun _ _ => True.intro) + +lemma thin_truncated {S : Type u} (r : S → S → Prop) + (hr : ∀ s, r s s) (ht : ∀ {s t v}, r s t → r t v → r s v) : + (thin r hr ht).IsTruncated 1 := fun _ => rfl + +end Thomason.OmegaCategory + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/EdgeComparison.lean b/lean/OAI/CategoryTheory/Thomason/EdgeComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..317265ec5d27f48ee319680e7736ebe97aca9889 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/EdgeComparison.lean @@ -0,0 +1,727 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.CylinderProfiles + +namespace OAI + +/-! Edge Comparison. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.CylinderTables +open Table +variable {M : DirectedComplex.{u}} + +lemma crossingProfile_bounded {n : ℕ} (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hb : truncate (n+1) false t = t) : + truncate n false (crossingProfile t hs ht) = crossingProfile t hs ht := by + apply dimension_of_rows_above_zero + intro p hp b + exact cross_of_row_zero t p b (row_above_fixed t hb (by omega) b) + +lemma leftProfile_bounded {n : ℕ} (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hb : truncate n false t = t) : + truncate n false (leftProfile t hs ht) = leftProfile t hs ht := by + apply dimension_of_rows_above_zero + intro p hp b + change leftProfileRow t p b = 0 + have ha := side_of_row_zero t false p b (row_above_fixed t hb hp b) + have hc := cross_of_row_zero t p b (row_above_fixed t hb (by omega) b) + simp only [leftProfileRow,ha,hc,ite_self,add_zero] + +lemma rightProfile_bounded {n : ℕ} (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) + (hb : truncate n false t = t) : + truncate n false (rightProfile t hs ht) = rightProfile t hs ht := by + apply dimension_of_rows_above_zero + intro p hp b + change rightProfileRow t p b = 0 + have ha := side_of_row_zero t true p b (row_above_fixed t hb hp b) + have hc := cross_of_row_zero t p b (row_above_fixed t hb (by omega) b) + simp only [rightProfileRow,ha,hc,ite_self,add_zero] + +lemma object_rows_equal (c : Table M) (hc : truncate 0 false c = c) (a b : Bool) : + c.row 0 a = c.row 0 b := by + have h (e : Bool) : c.row 0 false = c.row 0 e := by + simpa only [truncate_top_row] using congrArg (fun x : Table M => x.row 0 e) hc + exact (h a).symm.trans (h b) + +lemma vertical_object_face (c : Table M) (hc : truncate 0 false c = c) (a : Bool) : + truncate 0 a (verticalTable c) = (M.cylinderEndpoint a).table c := by + ext p b + change (truncate 0 a (verticalTable c)).row p b = M.cylinderEndpointMap a p (c.row p b) + cases p with + | zero => + rw [truncate_top_row] + change verticalRow c 0 a = M.cylinderEndpointMap a 0 (c.row 0 b) + cases a <;> simp only [verticalRow,Bool.false_eq_true,ite_false,ite_true, + object_rows_equal c hc _ b] <;> rfl + | succ p => + rw [truncate_row] + simp only [show ¬p+1 < 0 by omega,show p+1 ≠ 0 by omega,ite_false, + row_above_fixed c hc (by omega : 0 < p+1),map_zero] + +lemma crossing_edge_left_target (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (hb : truncate 1 false t = t) : + truncate 0 true (leftProfile t hs ht) = crossingProfile t hs ht := by + have hz := (crossing_starts_ends hM t hs ht).2 + have hc := crossingProfile_bounded t hs ht hb + ext p b + cases p with + | zero => + rw [truncate_top_row] + change leftProfileRow t 0 true = (crossingProfile t hs ht).row 0 b + simp only [leftProfileRow, Even.zero, ite_true, hz, zero_add] + exact object_rows_equal (crossingProfile t hs ht) hc true b + | succ p => + rw [truncate_row] + simp only [show ¬p+1 < 0 by omega,show p+1 ≠ 0 by omega,ite_false, + row_above_fixed _ hc (by omega : 0 < p+1)] + +lemma crossing_edge_right_source (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (hb : truncate 1 false t = t) : + truncate 0 false (rightProfile t hs ht) = crossingProfile t hs ht := by + have hz := (crossing_starts_ends hM t hs ht).1 + have hc := crossingProfile_bounded t hs ht hb + ext p b + cases p with + | zero => + rw [truncate_top_row] + change rightProfileRow t 0 false = (crossingProfile t hs ht).row 0 b + simp only [rightProfileRow, Even.zero, ite_true, Bool.false_eq_true, ite_false, hz, zero_add] + exact object_rows_equal (crossingProfile t hs ht) hc false b + | succ p => + rw [truncate_row] + simp only [show ¬p+1 < 0 by omega,show p+1 ≠ 0 by omega,ite_false, + row_above_fixed _ hc (by omega : 0 < p+1)] + +lemma crossing_edge_matching_left (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (hb : truncate 1 false t = t) : + truncate 0 true ((M.cylinderEndpoint false).table (leftProfile t hs ht)) = + truncate 0 false (verticalTable (crossingProfile t hs ht)) := by + rw [vertical_object_face _ (crossingProfile_bounded t hs ht hb), ← Hom.table_truncate, + crossing_edge_left_target hM t hs ht hb] + +lemma crossing_edge_matching_right (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (hb : truncate 1 false t = t) : + truncate 0 true (comp 0 ((M.cylinderEndpoint false).table (leftProfile t hs ht)) + (verticalTable (crossingProfile t hs ht)) (crossing_edge_matching_left hM t hs ht hb)) = + truncate 0 false ((M.cylinderEndpoint true).table (rightProfile t hs ht)) := by + rw [target_comp_le 0 0 le_rfl, vertical_object_face _ (crossingProfile_bounded t hs ht hb), + ← Hom.table_truncate,crossing_edge_right_source hM t hs ht hb] + +lemma crossing_edge_factor (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : label t false = 0) (ht : label t true = 1) (hb : truncate 1 false t = t) : + comp 0 (comp 0 ((M.cylinderEndpoint false).table (leftProfile t hs ht)) + (verticalTable (crossingProfile t hs ht)) (crossing_edge_matching_left hM t hs ht hb)) + ((M.cylinderEndpoint true).table (rightProfile t hs ht)) + (crossing_edge_matching_right hM t hs ht hb) = t := by + have hc := crossingProfile_bounded t hs ht hb + have hzc (p : ℕ) (hp : 0 < p) (b : Bool) := row_above_fixed (crossingProfile t hs ht) hc hp b + obtain ⟨hsrc,htgt⟩ := crossing_starts_ends hM t hs ht + ext p b + rw [comp_row,comp_row] + cases p with + | zero => + cases b + · change (M.cylinderEndpointMap false 0 ((leftProfile t hs ht).row 0 false)) = t.row 0 false + change (side t false 0 false + 0,0) = t.row 0 false + rw [add_zero] + exact Prod.ext rfl hsrc.symm + · change (M.cylinderEndpointMap true 0 ((rightProfile t hs ht).row 0 true)) = t.row 0 true + change (0,side t true 0 true + 0) = t.row 0 true + rw [add_zero] + exact Prod.ext htgt.symm rfl + | succ p => + simp only [show ¬p+1 < 0 by omega, show p+1 ≠ 0 by omega, ite_false] + change M.cylinderEndpointMap false (p+1) (leftProfileRow t (p+1) b) + + verticalRow (crossingProfile t hs ht) (p+1) b + + M.cylinderEndpointMap true (p+1) (rightProfileRow t (p+1) b) = t.row (p+1) b + have hz : cross t (p+1) b = 0 := hzc (p+1) (by omega) b + have hleft : leftProfileRow t (p+1) b = side t false (p+1) b := by + simp only [leftProfileRow,hz,ite_self,add_zero] + have hright : rightProfileRow t (p+1) b = side t true (p+1) b := by + simp only [rightProfileRow,hz,ite_self,add_zero] + rw [hleft,hright] + have hv : verticalRow (crossingProfile t hs ht) (p+1) b = (0,0,cross t p b) := by + simp only [verticalRow,hzc (p+1) (by omega) b] + split_ifs <;> rfl + rw [hv] + change (side t false (p+1) b,0,0) + (0,0,cross t p b) + + (0,side t true (p+1) b,0) = t.row (p+1) b + simp only [Prod.mk_add_mk,add_zero,zero_add] + rfl +end Thomason.DirectedComplex.CylinderTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +variable {X Y : OmegaCategory.{u}} {M : DirectedComplex.{u}} + +def verticalObject (c : X.Objects) : (tensorFunctor.obj X).Cell := + (generatorCylinder 0 c).map (verticalTable (topTable 0)) + +lemma verticalObject_bounded (c : X.Objects) : + (tensorFunctor.obj X).source 1 (verticalObject c) = verticalObject c := by + change (tensorFunctor.obj X).source 1 ((generatorCylinder 0 c).map _) = _ + erw [← (generatorCylinder 0 c).map_source] + change (generatorCylinder 0 c).map (truncate 1 false (verticalTable (topTable 0))) = _ + rw [vertical_fixed _ (topTable_bounded 0)] + rfl + +lemma verticalObject_face (c : X.Objects) (a : Bool) : + (tensorFunctor.obj X).face 0 a (verticalObject c) = ((tensorEndpoint a).app X).map c.val := by + unfold verticalObject + erw [← (generatorCylinder 0 c).map_face] + have he : (K.{u} 0).nu.face 0 a (verticalTable (topTable 0)) = atEnd a (topTable 0) := by + change (if a then truncate 0 true (verticalTable (topTable 0)) else + truncate 0 false (verticalTable (topTable 0))) = _ + cases a <;> exact CylinderTables.vertical_object_face _ (topTable_bounded 0) _ + erw [he,generatorCylinder_endpoint,lift_top] + +lemma verticalObject_source (c : X.Objects) : + (tensorFunctor.obj X).source 0 (verticalObject c) = ((tensorEndpoint false).app X).map c.val := + verticalObject_face c false + +lemma verticalObject_target (c : X.Objects) : + (tensorFunctor.obj X).target 0 (verticalObject c) = ((tensorEndpoint true).app X).map c.val := + verticalObject_face c true + +lemma verticalObject_natural (F : X ⟶ Y) (c : X.Objects) : + (tensorFunctor.map F).map (verticalObject c) = verticalObject (F.objects c) := by + apply tensorFunctor_map_generator + +lemma chainComparison_verticalObject (c : M.nu.Objects) : + (chainComparison M).map (verticalObject c) = verticalTable c.val := by + change (chainComparison M).map ((tensorPresentation M.nu).generator ⟨0,c,_⟩) = _ + erw [chainComparison_generator,tableCylinder_vertical] + exact congrArg verticalTable c.property + +lemma composite_bounded (C : OmegaCategory.{u}) {n k : ℕ} (hkn : k < n) + (x y : C.Cell) (hx : C.source n x = x) (hy : C.source n y = y) + (h : C.target k x = C.source k y) : C.source n (C.join k x y) = C.join k x y := by + rw [C.join_source_gt n k x y hkn h,hx,hy] + +def crossingEdge (l : X.Cell) (c : X.Objects) (r : X.Cell) : (tensorFunctor.obj X).Cell := + (tensorFunctor.obj X).join 0 + ((tensorFunctor.obj X).join 0 (((tensorEndpoint false).app X).map l) (verticalObject c)) + (((tensorEndpoint true).app X).map r) + +lemma crossingEdge_left_matching (l : X.Cell) (c : X.Objects) + (hl : X.target 0 l = c.val) : + (tensorFunctor.obj X).target 0 (((tensorEndpoint false).app X).map l) = + (tensorFunctor.obj X).source 0 (verticalObject c) := by + rw [verticalObject_source,← ((tensorEndpoint false).app X).map_target] + exact congrArg ((tensorEndpoint false).app X).map hl + +lemma crossingEdge_right_matching (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) : + (tensorFunctor.obj X).target 0 + ((tensorFunctor.obj X).join 0 (((tensorEndpoint false).app X).map l) (verticalObject c)) = + (tensorFunctor.obj X).source 0 (((tensorEndpoint true).app X).map r) := by + rw [(tensorFunctor.obj X).join_target_le 0 0 _ _ le_rfl (crossingEdge_left_matching l c hl), + verticalObject_target,← ((tensorEndpoint true).app X).map_source] + exact congrArg ((tensorEndpoint true).app X).map hr.symm + +lemma crossingEdge_bounded (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) + (hld : X.source 1 l = l) (hrd : X.source 1 r = r) : + (tensorFunctor.obj X).source 1 (crossingEdge l c r) = crossingEdge l c r := by + apply composite_bounded _ (by omega : 0 < 1) _ _ _ _ (crossingEdge_right_matching l c r hl hr) + · apply composite_bounded _ (by omega : 0 < 1) _ _ _ (verticalObject_bounded c) + (crossingEdge_left_matching l c hl) + exact (((tensorEndpoint false).app X).map_source 1 l).symm.trans + (congrArg ((tensorEndpoint false).app X).map hld) + · exact (((tensorEndpoint true).app X).map_source 1 r).symm.trans + (congrArg ((tensorEndpoint true).app X).map hrd) + +lemma chainComparison_crossingEdge (l : Table M) (c : M.nu.Objects) (r : Table M) + (hl : truncate 0 true l = c.val) (hr : truncate 0 false r = c.val) : + (chainComparison M).map (crossingEdge l c r) = + M.cylinder.nu.join 0 (M.cylinder.nu.join 0 ((M.cylinderEndpoint false).table l) + (verticalTable c.val)) ((M.cylinderEndpoint true).table r) := by + unfold crossingEdge + erw [(chainComparison M).map_join 0 _ _ (crossingEdge_right_matching (X := M.nu) l c r hl hr), + (chainComparison M).map_join 0 _ _ (crossingEdge_left_matching (X := M.nu) l c hl)] + rw [chainComparison_endpoint_apply,chainComparison_endpoint_apply,chainComparison_verticalObject] + +def crossingEdgeLift (t : Table M.cylinder) (hs : CylinderTables.label t false = 0) + (ht : CylinderTables.label t true = 1) (hb : truncate 1 false t = t) : + (tensorFunctor.obj M.nu).Cell := + crossingEdge (CylinderTables.leftProfile t hs ht) + ⟨CylinderTables.crossingProfile t hs ht, CylinderTables.crossingProfile_bounded t hs ht hb⟩ + (CylinderTables.rightProfile t hs ht) + +lemma crossingEdgeLift_bounded (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : CylinderTables.label t false = 0) (ht : CylinderTables.label t true = 1) + (hb : truncate 1 false t = t) : + (tensorFunctor.obj M.nu).source 1 (crossingEdgeLift t hs ht hb) = crossingEdgeLift t hs ht hb := + crossingEdge_bounded _ _ _ (CylinderTables.crossing_edge_left_target hM t hs ht hb) + (CylinderTables.crossing_edge_right_source hM t hs ht hb) + (CylinderTables.leftProfile_bounded t hs ht hb) (CylinderTables.rightProfile_bounded t hs ht hb) + +lemma chainComparison_crossingEdgeLift (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hs : CylinderTables.label t false = 0) (ht : CylinderTables.label t true = 1) + (hb : truncate 1 false t = t) : + (chainComparison M).map (crossingEdgeLift t hs ht hb) = t := by + erw [crossingEdgeLift,chainComparison_crossingEdge _ _ _ + (CylinderTables.crossing_edge_left_target hM t hs ht hb) + (CylinderTables.crossing_edge_right_source hM t hs ht hb)] + erw [M.cylinder.nu.join_eq 0 _ _ (CylinderTables.crossing_edge_matching_left hM t hs ht hb), + M.cylinder.nu.join_eq 0 _ _ (CylinderTables.crossing_edge_matching_right hM t hs ht hb)] + exact CylinderTables.crossing_edge_factor hM t hs ht hb + +theorem chainComparison_edges_surjective (hM : PositiveAcyclic M) (t : Table M.cylinder) + (hb : truncate 1 false t = t) : + ∃ x : (tensorFunctor.obj M.nu).Cell, + (tensorFunctor.obj M.nu).source 1 x = x ∧ (chainComparison M).map x = t := by + rcases CylinderTables.endpoint_or_crossing hM t with ⟨a,ha⟩ | ⟨hs,ht⟩ + · refine ⟨((tensorEndpoint a).app M.nu).map (CylinderTables.project t), ?_, + (chainComparison_endpoint_apply a _).trans ha.symm⟩ + erw [← ((tensorEndpoint a).app M.nu).map_source] + congr 1 + change truncate 1 false (M.cylinderProjection.table t) = M.cylinderProjection.table t + rw [← Hom.table_truncate,hb] + · exact ⟨crossingEdgeLift t hs ht hb, crossingEdgeLift_bounded hM t hs ht hb, + chainComparison_crossingEdgeLift hM t hs ht hb⟩ +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex +open DirectedComplex + +theorem complexPositiveAcyclic (n : ℕ) : PositiveAcyclic (complex.{u} n) where + augmentation_nonneg _ hx := mass_nonneg hx + augmentation_zero _ hx h := (mass_eq_zero_iff hx).mp h + cycle_zero _ _ hx h := positive_cycle_zero _ hx h + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {X Y : OmegaCategory.{u}} + +lemma crossingEdge_source (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) : + (tensorFunctor.obj X).source 0 (crossingEdge l c r) = + ((tensorEndpoint false).app X).map (X.source 0 l) := by + unfold crossingEdge + rw [(tensorFunctor.obj X).join_source_le 0 0 _ _ le_rfl (crossingEdge_right_matching l c r hl hr), + (tensorFunctor.obj X).join_source_le 0 0 _ _ le_rfl (crossingEdge_left_matching l c hl), + ← ((tensorEndpoint false).app X).map_source] + rfl + +lemma crossingEdge_target (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) : + (tensorFunctor.obj X).target 0 (crossingEdge l c r) = + ((tensorEndpoint true).app X).map (X.target 0 r) := by + unfold crossingEdge + rw [(tensorFunctor.obj X).join_target_le 0 0 _ _ le_rfl (crossingEdge_right_matching l c r hl hr), + ← ((tensorEndpoint true).app X).map_target] + rfl + +lemma tensorFunctor_map_endpoint (F : X ⟶ Y) (a : Bool) (x : X.Cell) : + (tensorFunctor.map F).map (((tensorEndpoint a).app X).map x) = + ((tensorEndpoint a).app Y).map (F.map x) := + (congrArg (fun f : X ⟶ tensorFunctor.obj Y => f.map x) ((tensorEndpoint a).naturality F)).symm + +lemma tensorFunctor_map_crossingEdge (F : X ⟶ Y) (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) : + (tensorFunctor.map F).map (crossingEdge l c r) = crossingEdge (F.map l) (F.objects c) (F.map r) := by + unfold crossingEdge + rw [(tensorFunctor.map F).map_join 0 _ _ (crossingEdge_right_matching l c r hl hr), + (tensorFunctor.map F).map_join 0 _ _ (crossingEdge_left_matching l c hl), + tensorFunctor_map_endpoint,tensorFunctor_map_endpoint,verticalObject_natural] + +inductive EdgeNormal (X : OmegaCategory.{u}) : (tensorFunctor.obj X).Cell → Prop + | endpoint (a : Bool) (x : X.Cell) (hx : X.source 1 x = x) : + EdgeNormal X (((tensorEndpoint a).app X).map x) + | crossing (l : X.Cell) (c : X.Objects) (r : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) + (hdl : X.source 1 l = l) (hdr : X.source 1 r = r) : + EdgeNormal X (crossingEdge l c r) + +lemma EdgeNormal.bounded {z : (tensorFunctor.obj X).Cell} (hz : EdgeNormal X z) : + (tensorFunctor.obj X).source 1 z = z := by + cases hz with + | endpoint a x hx => exact (((tensorEndpoint a).app X).map_source 1 x).symm.trans (congrArg ((tensorEndpoint a).app X).map hx) + | crossing l c r hl hr hdl hdr => exact crossingEdge_bounded l c r hl hr hdl hdr + +lemma EdgeNormal.map (F : X ⟶ Y) {z : (tensorFunctor.obj X).Cell} (hz : EdgeNormal X z) : + EdgeNormal Y ((tensorFunctor.map F).map z) := by + cases hz with + | endpoint a x hx => + rw [tensorFunctor_map_endpoint] + exact .endpoint a (F.map x) ((F.map_source 1 x).symm.trans (congrArg F.map hx)) + | crossing l c r hl hr hdl hdr => + rw [tensorFunctor_map_crossingEdge F l c r hl hr] + exact .crossing (F.map l) (F.objects c) (F.map r) + ((F.map_target 0 l).symm.trans (congrArg F.map hl)) + ((F.map_source 0 r).symm.trans (congrArg F.map hr)) + ((F.map_source 1 l).symm.trans (congrArg F.map hdl)) + ((F.map_source 1 r).symm.trans (congrArg F.map hdr)) + +lemma EdgeNormal.face_zero {z : (tensorFunctor.obj X).Cell} (hz : EdgeNormal X z) (b : Bool) : + EdgeNormal X ((tensorFunctor.obj X).face 0 b z) := by + cases hz with + | endpoint a x hx => + rw [← ((tensorEndpoint a).app X).map_face] + exact .endpoint a _ (X.source_fixed_upwards (by omega : 0 ≤ 1) (by + change X.face 0 false (X.face 0 b x) = X.face 0 b x + rw [X.face_face]; simp)) + | crossing l c r hl hr hdl hdr => + cases b + · change EdgeNormal X ((tensorFunctor.obj X).source 0 _) + rw [crossingEdge_source l c r hl hr] + exact .endpoint false _ (X.source_fixed_upwards (by omega : 0 ≤ 1) (X.source_source_self 0 l)) + · change EdgeNormal X ((tensorFunctor.obj X).target 0 _) + rw [crossingEdge_target l c r hl hr] + exact .endpoint true _ (X.source_fixed_upwards (by omega : 0 ≤ 1) (X.source_target_self 0 r)) + +lemma generatorCylinder_as_map (n : ℕ) (x : X.Cells n) (z : Table (K.{u} n)) : + (generatorCylinder n x).map z = + (tensorFunctor.map (GlobeComplex.lift x.val x.property)).map ((globeTensorIso n).inv.map z) := by + change _ = (tensorFunctor.map (GlobeComplex.lift x.val x.property)).map + ((tensorPresentation (complex n).nu).generator ⟨n,⟨topTable n,topTable_bounded n⟩,z⟩) + erw [tensorFunctor_map_generator] + simp only [lift_top] + rfl + +lemma globe_inv_edge_normal (n : ℕ) (t : Table (K.{u} n)) (ht : truncate 1 false t = t) : + EdgeNormal (complex n).nu ((globeTensorIso n).inv.map t) := by + rcases CylinderTables.endpoint_or_crossing (complexPositiveAcyclic n) t with ⟨a,ha⟩ | ⟨hs,he⟩ + · have hp : truncate 1 false (CylinderTables.project t) = CylinderTables.project t := by + change truncate 1 false ((complex n).cylinderProjection.table t) = _ + rw [← Hom.table_truncate,ht] + rfl + have him : (chainComparison (complex n)).map (((tensorEndpoint a).app (complex n).nu).map + (CylinderTables.project t)) = t := (chainComparison_endpoint_apply a _).trans ha.symm + rw [chainComparison_globe] at him + have hi := congrArg (globeTensorIso n).inv.map him + have hback := congrArg (fun F : tensorFunctor.obj (complex n).nu ⟶ tensorFunctor.obj (complex n).nu => + F.map (((tensorEndpoint a).app (complex n).nu).map (CylinderTables.project t))) (globeTensorIso n).hom_inv_id + change (globeTensorIso n).inv.map ((globeTensorIso n).hom.map _) = _ at hback + rw [hback] at hi + rw [← hi] + exact .endpoint a _ hp + · have him := chainComparison_crossingEdgeLift (complexPositiveAcyclic n) t hs he ht + rw [chainComparison_globe] at him + have hi := congrArg (globeTensorIso n).inv.map him + have hback := congrArg (fun F : tensorFunctor.obj (complex n).nu ⟶ tensorFunctor.obj (complex n).nu => + F.map (crossingEdgeLift t hs he ht)) (globeTensorIso n).hom_inv_id + change (globeTensorIso n).inv.map ((globeTensorIso n).hom.map _) = _ at hback + rw [hback] at hi + rw [← hi] + exact .crossing _ _ _ + (CylinderTables.crossing_edge_left_target (complexPositiveAcyclic n) t hs he ht) + (CylinderTables.crossing_edge_right_source (complexPositiveAcyclic n) t hs he ht) + (CylinderTables.leftProfile_bounded t hs he ht) + (CylinderTables.rightProfile_bounded t hs he ht) + +lemma generatorCylinder_edge_normal (n : ℕ) (x : X.Cells n) (t : Table (K.{u} n)) + (ht : truncate 1 false t = t) : EdgeNormal X ((generatorCylinder n x).map t) := by + rw [generatorCylinder_as_map] + exact (globe_inv_edge_normal n t ht).map _ +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {X : OmegaCategory.{u}} + +lemma endpoint_source (a : Bool) (k : ℕ) (x : X.Cell) : + (tensorFunctor.obj X).source k (((tensorEndpoint a).app X).map x) = + ((tensorEndpoint a).app X).map (X.source k x) := (((tensorEndpoint a).app X).map_source k x).symm + +lemma endpoint_target (a : Bool) (k : ℕ) (x : X.Cell) : + (tensorFunctor.obj X).target k (((tensorEndpoint a).app X).map x) = + ((tensorEndpoint a).app X).map (X.target k x) := (((tensorEndpoint a).app X).map_target k x).symm + +lemma endpoint_join_crossing (x l : X.Cell) (c : X.Objects) (r : X.Cell) + (hxl : X.target 0 x = X.source 0 l) (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) : + (tensorFunctor.obj X).join 0 (((tensorEndpoint false).app X).map x) (crossingEdge l c r) = + crossingEdge (X.join 0 x l) c r := by + let e₀ := ((tensorEndpoint false).app X) + let e₁ := ((tensorEndpoint true).app X) + have h₁ : (tensorFunctor.obj X).target 0 (e₀.map x) = (tensorFunctor.obj X).source 0 (e₀.map l) := + e₀.map_composable hxl + have h₂ := crossingEdge_left_matching l c hl + have h₃ := crossingEdge_right_matching l c r hl hr + unfold crossingEdge + erw [e₀.map_join 0 x l hxl] + rw [(tensorFunctor.obj X).join_assoc 0 (e₀.map x) (e₀.map l) (verticalObject c) h₁ h₂] + rw [(tensorFunctor.obj X).join_assoc 0 (e₀.map x) _ (e₁.map r) _ h₃] + rw [(tensorFunctor.obj X).join_source_le 0 0 _ _ le_rfl h₂] + exact h₁ + +lemma crossing_join_endpoint (l : X.Cell) (c : X.Objects) (r y : X.Cell) + (hl : X.target 0 l = c.val) (hr : X.source 0 r = c.val) (hry : X.target 0 r = X.source 0 y) : + (tensorFunctor.obj X).join 0 (crossingEdge l c r) (((tensorEndpoint true).app X).map y) = + crossingEdge l c (X.join 0 r y) := by + have h₁ := crossingEdge_right_matching l c r hl hr + have h₂ : (tensorFunctor.obj X).target 0 (((tensorEndpoint true).app X).map r) = + (tensorFunctor.obj X).source 0 (((tensorEndpoint true).app X).map y) := + ((tensorEndpoint true).app X).map_composable hry + unfold crossingEdge + erw [((tensorEndpoint true).app X).map_join 0 r y hry, + (tensorFunctor.obj X).join_assoc 0 _ _ _ h₁ h₂] + +lemma EdgeNormal.join {x y : (tensorFunctor.obj X).Cell} (hx : EdgeNormal X x) (hy : EdgeNormal X y) + (h : (tensorFunctor.obj X).target 0 x = (tensorFunctor.obj X).source 0 y) : + EdgeNormal X ((tensorFunctor.obj X).join 0 x y) := by + cases hx with + | endpoint a x hx => + cases hy with + | endpoint b y hy => + rw [endpoint_target,endpoint_source] at h + obtain ⟨hab,hxy⟩ := (tensorEndpoint_eq_iff a b _ _).mp h + subst b + rw [← ((tensorEndpoint a).app X).map_join 0 x y hxy] + exact .endpoint a _ (composite_bounded X (by omega : 0 < 1) x y hx hy hxy) + | crossing l c r hl hr hdl hdr => + rw [endpoint_target,crossingEdge_source l c r hl hr] at h + obtain ⟨ha,hxl⟩ := (tensorEndpoint_eq_iff a false _ _).mp h + subst a + rw [endpoint_join_crossing x l c r hxl hl hr] + exact .crossing _ c r ((X.join_target_le 0 0 x l le_rfl hxl).trans hl) hr + (composite_bounded X (by omega : 0 < 1) x l hx hdl hxl) hdr + | crossing l c r hl hr hdl hdr => + cases hy with + | endpoint a y hy => + rw [crossingEdge_target l c r hl hr,endpoint_source] at h + obtain ⟨ha,hry⟩ := (tensorEndpoint_eq_iff true a _ _).mp h + subst a + rw [crossing_join_endpoint l c r y hl hr hry] + exact .crossing l c _ hl ((X.join_source_le 0 0 r y le_rfl hry).trans hr) hdl + (composite_bounded X (by omega : 0 < 1) r y hdr hy hry) + | crossing l' c' r' hl' hr' hdl' hdr' => + rw [crossingEdge_target l c r hl hr,crossingEdge_source l' c' r' hl' hr'] at h + exact False.elim (Bool.noConfusion ((tensorEndpoint_eq_iff true false _ _).mp h).1) + +lemma tensor_one_faces_normal (z : (tensorFunctor.obj X).Cell) (b : Bool) : + EdgeNormal X ((tensorFunctor.obj X).face 1 b z) := by + suffices h : ∀ b : Bool, EdgeNormal X ((tensorFunctor.obj X).face 1 b z) from h b + apply (tensorPresentation X).cells_induction (fun z => ∀ b : Bool, + EdgeNormal X ((tensorFunctor.obj X).face 1 b z)) + · rintro ⟨n,x,t⟩ b + change EdgeNormal X ((tensorFunctor.obj X).face 1 b ((generatorCylinder n x).map t)) + erw [← (generatorCylinder n x).map_face] + have he : (K n).nu.face 1 b t = truncate 1 b t := by cases b <;> rfl + rw [he] + exact generatorCylinder_edge_normal n x _ (by + erw [truncate_truncate]; simp) + · intro k x hx b + change EdgeNormal X ((tensorFunctor.obj X).face 1 b ((tensorFunctor.obj X).face k false x)) + erw [(tensorFunctor.obj X).face_face] + by_cases hk : 1 < k + · rw [ite_eq_left hk]; exact hx b + · rw [ite_eq_right hk] + have hk' : k = 0 ∨ k = 1 := by omega + rcases hk' with rfl | rfl + · have he := (hx false).face_zero false + erw [(tensorFunctor.obj X).face_face,ite_eq_left (by omega : 0 < 1)] at he + exact he + · exact hx false + · intro k x hx b + change EdgeNormal X ((tensorFunctor.obj X).face 1 b ((tensorFunctor.obj X).face k true x)) + erw [(tensorFunctor.obj X).face_face] + by_cases hk : 1 < k + · rw [ite_eq_left hk]; exact hx b + · rw [ite_eq_right hk] + have hk' : k = 0 ∨ k = 1 := by omega + rcases hk' with rfl | rfl + · have he := (hx false).face_zero true + erw [(tensorFunctor.obj X).face_face,ite_eq_left (by omega : 0 < 1)] at he + exact he + · exact hx true + · intro k x y h hx hy b + change EdgeNormal X ((tensorFunctor.obj X).face 1 b ((tensorFunctor.obj X).comp k x y h)) + cases k with + | zero => + cases b + · change EdgeNormal X ((tensorFunctor.obj X).source 1 _) + rw [← (tensorFunctor.obj X).join_eq 0 x y h, + (tensorFunctor.obj X).join_source_gt 1 0 x y (by omega) h] + exact (hx false).join (hy false) ((tensorFunctor.obj X).source_composable (by omega) h) + · change EdgeNormal X ((tensorFunctor.obj X).target 1 _) + rw [← (tensorFunctor.obj X).join_eq 0 x y h, + (tensorFunctor.obj X).join_target_gt 1 0 x y (by omega) h] + exact (hx true).join (hy true) ((tensorFunctor.obj X).target_composable (by omega) h) + | succ k => + cases b + · change EdgeNormal X ((tensorFunctor.obj X).source 1 _) + rw [(tensorFunctor.obj X).source_comp_le 1 (k+1) (by omega) x y h] + exact hx false + · change EdgeNormal X ((tensorFunctor.obj X).target 1 _) + rw [(tensorFunctor.obj X).target_comp_le 1 (k+1) (by omega) x y h] + exact hy true + +lemma tensor_edge_normal (z : (tensorFunctor.obj X).Cell) + (hz : (tensorFunctor.obj X).source 1 z = z) : EdgeNormal X z := by + have h := tensor_one_faces_normal z false + change EdgeNormal X ((tensorFunctor.obj X).source 1 z) at h + rwa [hz] at h +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory +variable {M : DirectedComplex.{u}} + +lemma crossing_edge_table_matching_left (l : Table M) (c : M.nu.Objects) + (hl : truncate 0 true l = c.val) : + truncate 0 true ((M.cylinderEndpoint false).table l) = truncate 0 false (verticalTable c.val) := by + rw [CylinderTables.vertical_object_face c.val c.property,← Hom.table_truncate,hl] + +lemma crossing_edge_table_matching_right (l : Table M) (c : M.nu.Objects) (r : Table M) + (hl : truncate 0 true l = c.val) (hr : truncate 0 false r = c.val) : + M.cylinder.nu.target 0 (M.cylinder.nu.join 0 ((M.cylinderEndpoint false).table l) (verticalTable c.val)) = + M.cylinder.nu.source 0 ((M.cylinderEndpoint true).table r) := by + rw [M.cylinder.nu.join_target_le 0 0 _ _ le_rfl (crossing_edge_table_matching_left l c hl)] + change truncate 0 true (verticalTable c.val) = truncate 0 false ((M.cylinderEndpoint true).table r) + rw [CylinderTables.vertical_object_face c.val c.property,← Hom.table_truncate,hr] + +lemma table_join_zero_row_succ (x y : Table M) + (h : truncate 0 true x = truncate 0 false y) (p : ℕ) (b : Bool) : + (M.nu.join 0 x y).row (p+1) b = x.row (p+1) b + y.row (p+1) b := by + rw [M.nu.join_eq 0 x y h] + change (DirectedComplex.Table.comp 0 x y h).row (p+1) b = _ + simp only [comp_row, Nat.not_lt_zero, Nat.add_one_ne_zero, ite_false] + +lemma table_join_zero_row_zero (x y : Table M) + (h : truncate 0 true x = truncate 0 false y) (b : Bool) : + (M.nu.join 0 x y).row 0 b = if b then y.row 0 true else x.row 0 false := by + rw [M.nu.join_eq 0 x y h] + rfl + +lemma chainComparison_crossingEdge_row_succ (l : Table M) (c : M.nu.Objects) (r : Table M) + (hl : truncate 0 true l = c.val) (hr : truncate 0 false r = c.val) (p : ℕ) (b : Bool) : + ((chainComparison M).map (crossingEdge l c r)).row (p+1) b = + (l.row (p+1) b,r.row (p+1) b,c.val.row p b) := by + rw [chainComparison_crossingEdge l c r hl hr, + table_join_zero_row_succ _ _ (crossing_edge_table_matching_right l c r hl hr), + table_join_zero_row_succ _ _ (crossing_edge_table_matching_left l c hl)] + change M.cylinderEndpointMap false (p+1) (l.row (p+1) b) + verticalRow c.val (p+1) b + + M.cylinderEndpointMap true (p+1) (r.row (p+1) b) = _ + have hz : c.val.row (p+1) b = 0 := row_above_fixed c.val c.property (by omega) b + have hv : verticalRow c.val (p+1) b = (0,0,c.val.row p b) := by + simp only [verticalRow,hz] + split_ifs <;> rfl + rw [hv] + change (l.row (p+1) b,0,0) + (0,0,c.val.row p b) + (0,r.row (p+1) b,0) = _ + simp only [Prod.mk_add_mk,add_zero,zero_add] + +lemma chainComparison_crossingEdge_row_zero (l : Table M) (c : M.nu.Objects) (r : Table M) + (hl : truncate 0 true l = c.val) (hr : truncate 0 false r = c.val) (b : Bool) : + ((chainComparison M).map (crossingEdge l c r)).row 0 b = + if b then (0,r.row 0 true) else (l.row 0 false,0) := by + rw [chainComparison_crossingEdge l c r hl hr, + table_join_zero_row_zero _ _ (crossing_edge_table_matching_right l c r hl hr), + table_join_zero_row_zero _ _ (crossing_edge_table_matching_left l c hl)] + cases b <;> rfl + +lemma chainComparison_crossingEdge_injective + (l l' : Table M) (c c' : M.nu.Objects) (r r' : Table M) + (hl : truncate 0 true l = c.val) (hr : truncate 0 false r = c.val) + (hl' : truncate 0 true l' = c'.val) (hr' : truncate 0 false r' = c'.val) + (he : (chainComparison M).map (crossingEdge l c r) = + (chainComparison M).map (crossingEdge l' c' r')) : + l = l' ∧ c = c' ∧ r = r' := by + have hrows (p : ℕ) (b : Bool) := congrArg (fun t : Table M.cylinder => t.row (p+1) b) he + simp only [chainComparison_crossingEdge_row_succ l c r hl hr, + chainComparison_crossingEdge_row_succ l' c' r' hl' hr'] at hrows + have hc : c = c' := by + apply Subtype.ext + apply Table.ext + funext p b + exact congrArg (fun z => z.2.2) (hrows p b) + subst c' + have he₀ (b : Bool) := congrArg (fun t : Table M.cylinder => t.row 0 b) he + simp only [chainComparison_crossingEdge_row_zero l c r hl hr, + chainComparison_crossingEdge_row_zero l' c r' hl' hr'] at he₀ + have he_l : l = l' := by + ext p b + cases p with + | succ p => exact congrArg Prod.fst (hrows p b) + | zero => + cases b + · exact congrArg Prod.fst (he₀ false) + · have h := congrArg (fun t : Table M => t.row 0 false) (hl.trans hl'.symm) + exact h + have he_r : r = r' := by + ext p b + cases p with + | succ p => exact congrArg (fun z => z.2.1) (hrows p b) + | zero => + cases b + · have h := congrArg (fun t : Table M => t.row 0 false) (hr.trans hr'.symm) + exact h + · exact congrArg Prod.snd (he₀ true) + exact ⟨he_l,rfl,he_r⟩ + +lemma chainComparison_edges_injective (x y : (tensorFunctor.obj M.nu).Cell) + (hx : (tensorFunctor.obj M.nu).source 1 x = x) (hy : (tensorFunctor.obj M.nu).source 1 y = y) + (he : (chainComparison M).map x = (chainComparison M).map y) : x = y := by + have hnx := tensor_edge_normal x hx + have hny := tensor_edge_normal y hy + cases hnx with + | endpoint a x hx => + exact ((chainComparison_endpoint_fiber y a x).mp + (he.symm.trans (chainComparison_endpoint_apply a x))).symm + | crossing l c r hl hr hdl hdr => + cases hny with + | endpoint a y hy => + exact (chainComparison_endpoint_fiber _ a y).mp (he.trans (chainComparison_endpoint_apply a y)) + | crossing l' c' r' hl' hr' hdl' hdr' => + obtain ⟨rfl,rfl,rfl⟩ := chainComparison_crossingEdge_injective l l' c c' r r' hl hr hl' hr' he + rfl + +theorem chainComparison_edges_bijective (hM : PositiveAcyclic M) : + Function.Bijective ((chainComparison M).onCells 1) := by + constructor + · intro x y he + apply Subtype.ext + exact chainComparison_edges_injective x.val y.val x.property y.property (congrArg Subtype.val he) + · intro t + obtain ⟨x,hx,he⟩ := chainComparison_edges_surjective hM t.val t.property + exact ⟨⟨x,hx⟩,Subtype.ext he⟩ + +theorem chainComparison_poset_edges_bijective (P : Type u) [PartialOrder P] : + Function.Bijective + ((chainComparison (NormalizedChains.complex P)).onCells 1) := + chainComparison_edges_bijective (NormalizedChains.complexPositiveAcyclic P) +end Thomason.GrayRecursive.IntervalHom + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/ExtensionAnodyne.lean b/lean/OAI/CategoryTheory/Thomason/ExtensionAnodyne.lean new file mode 100644 index 0000000000000000000000000000000000000000..6ee60d8de9b66598061e1657c483e0e51cf055e7 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/ExtensionAnodyne.lean @@ -0,0 +1,782 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SubdivisionPairing + +namespace OAI + +/-! Extension Anodyne. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +lemma nonDegenerate_of_unique_face {X : SSet.{u}} {n : ℕ} + (x : X.obj (op ⦋n⦌)) (hx : x ∈ X.nonDegenerate n) + (y : X.obj (op ⦋n + 1⦌)) (j : Fin (n + 2)) (hj : X.δ j y = x) + (hunique : ∀ i : Fin (n + 2), X.δ i y = x → i = j) : + y ∈ X.nonDegenerate (n + 1) := by + by_contra hy + rw [← X.mem_degenerate_iff_notMem_nonDegenerate, + X.degenerate_eq_iUnion_range_σ] at hy + simp only [Set.mem_iUnion, Set.mem_range] at hy + obtain ⟨i, z, rfl⟩ := hy + have hm : X.map (SimplexCategory.δ j ≫ SimplexCategory.σ i).op z = x := by + rw [op_comp, CategoryTheory.Functor.map_comp] + exact hj + have : Mono (SimplexCategory.δ j ≫ SimplexCategory.σ i) := + X.mono_of_nonDegenerate ⟨x, hx⟩ _ z hm + have he : z = x := by + rw [SimplexCategory.eq_id_of_mono (SimplexCategory.δ j ≫ SimplexCategory.σ i), op_id, CategoryTheory.Functor.map_id] at hm + exact hm + have h1 : X.δ i.castSucc (X.σ i z) = x := by + rw [← CategoryTheory.comp_apply, SimplicialObject.δ_comp_σ_self] + exact he + have h2 : X.δ i.succ (X.σ i z) = x := by + rw [← CategoryTheory.comp_apply, SimplicialObject.δ_comp_σ_succ] + exact he + have hh := (hunique i.castSucc h1).trans (hunique i.succ h2).symm + exact (Fin.ne_of_lt i.castSucc_lt_succ) hh + +lemma exPairSimplex_face_unique (X : SSet.{u}) (n : ℕ) (k : Fin (n + 1)) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hk : exIndex X n x = k) + (hpos : 0 < k.val) (hI : ¬ ExTypeI X n x) (i : Fin (n + 2)) + (hi : (SSet.ex.obj X).δ i (exPairSimplex X n k x) = x) : i = k.succ := by + have hx : ExLevel X n (ordinalVertex n k) x := hk ▸ exIndex_level X n x + by_cases hil : i ≤ k.castSucc + · let j : Fin (n + 1) := ⟨k.val - 1, lt_of_le_of_lt (Nat.sub_le _ _) k.isLt⟩ + have hjk : j.val + 1 = k.val := by dsimp [j]; omega + have hlev := exPairSimplex_lowFace_level X n j k hjk i hil x hx + rw [hi] at hlev + have hh := (exIndex_le_iff X n x j).mpr hlev + rw [hk] at hh + have hval : k.val ≤ j.val := hh + omega + · by_contra hine + have hgt : k.succ < i := by + have h1 : k.val < i.val := lt_of_not_ge hil + have h2 : i.val ≠ k.val + 1 := fun h => hine (Fin.ext h) + change k.val + 1 < i.val + omega + cases n with + | zero => have hk0 := k.isLt; omega + | succ n => + cases k using Fin.lastCases with + | last => have hi0 := i.isLt; have hgt0 : n + 2 < i.val := hgt; omega + | cast k => + cases i using Fin.cases with + | zero => exact (not_lt_of_ge (Fin.zero_le _) hgt).elim + | succ i => + have hki : k.castSucc < i := by + change k.val < i.val + change k.val + 1 < i.val + 1 at hgt + omega + have he := exPairSimplex_highFace X n k i hki x + apply hI + exact ⟨k, (SSet.ex.obj X).δ i x, hk, he.symm.trans hi⟩ + +lemma exPairSimplex_nonDegenerate (X : SSet.{u}) (n : ℕ) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hx : ExTypeII X n x) : + exPairSimplex X n (exIndex X n x) x ∈ (SSet.ex.obj X).nonDegenerate (n + 1) := + nonDegenerate_of_unique_face x hx.1 _ _ (exPairSimplex_face X n _ x) + (exPairSimplex_face_unique X n _ x rfl hx.2.1 hx.2.2) + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +lemma extraVertexMap_lowDegeneracy (n : ℕ) (i k : Fin (n + 1)) (hik : i ≤ k) : + extraVertexMap.{u} (n + 1) k.succ ≫ SimplexCategory.sd.map (SimplexCategory.σ i) = + SimplexCategory.sd.map (SimplexCategory.σ i.castSucc) ≫ extraVertexMap n k := by + change PartOrd.nerveFunctor.map _ ≫ PartOrd.nerveFunctor.map _ = + PartOrd.nerveFunctor.map _ ≫ PartOrd.nerveFunctor.map _ + erw [← CategoryTheory.Functor.map_comp, ← CategoryTheory.Functor.map_comp] + congr 1 + apply PartOrd.hom_ext + apply OrderHom.ext + funext s + exact extraVertex_lowDegeneracy n i k hik s + +lemma extraVertexMap_highDegeneracy (n : ℕ) (i k : Fin (n + 1)) (hki : k < i) : + extraVertexMap.{u} (n + 1) k.castSucc ≫ SimplexCategory.sd.map (SimplexCategory.σ i) = + SimplexCategory.sd.map (SimplexCategory.σ i.succ) ≫ extraVertexMap n k := by + change PartOrd.nerveFunctor.map _ ≫ PartOrd.nerveFunctor.map _ = + PartOrd.nerveFunctor.map _ ≫ PartOrd.nerveFunctor.map _ + erw [← CategoryTheory.Functor.map_comp, ← CategoryTheory.Functor.map_comp] + congr 1 + apply PartOrd.hom_ext + apply OrderHom.ext + funext s + exact extraVertex_highDegeneracy n i k hki s + +lemma exPairSimplex_lowDegeneracy (X : SSet.{u}) (n : ℕ) (i k : Fin (n + 1)) (hik : i ≤ k) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) : + exPairSimplex X (n + 1) k.succ ((SSet.ex.obj X).σ i x) = + (SSet.ex.obj X).σ i.castSucc (exPairSimplex X n k x) := by + apply ULift.ext + change extraVertexMap (n + 1) k.succ ≫ (SimplexCategory.sd.map (SimplexCategory.σ i) ≫ x.down) = + SimplexCategory.sd.map (SimplexCategory.σ i.castSucc) ≫ (extraVertexMap n k ≫ x.down) + erw [← Category.assoc, extraVertexMap_lowDegeneracy n i k hik, Category.assoc] + +lemma exPairSimplex_highDegeneracy (X : SSet.{u}) (n : ℕ) (i k : Fin (n + 1)) (hki : k < i) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) : + exPairSimplex X (n + 1) k.castSucc ((SSet.ex.obj X).σ i x) = + (SSet.ex.obj X).σ i.succ (exPairSimplex X n k x) := by + apply ULift.ext + change extraVertexMap (n + 1) k.castSucc ≫ (SimplexCategory.sd.map (SimplexCategory.σ i) ≫ x.down) = + SimplexCategory.sd.map (SimplexCategory.σ i.succ) ≫ (extraVertexMap n k ≫ x.down) + erw [← Category.assoc, extraVertexMap_highDegeneracy n i k hki, Category.assoc] + +lemma exLevel_highDegeneracy {X : SSet.{u}} {n : ℕ} (i k : Fin (n + 1)) (hki : k < i) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hx : ExLevel X n (ordinalVertex n k) x) : + ExLevel X (n + 1) (ordinalVertex (n + 1) k.castSucc) ((SSet.ex.obj X).σ i x) := by + apply exLevel_map_of _ _ (SimplexCategory.σ i) _ x hx + intro a ha + change k < i.predAbove a.down + unfold Fin.predAbove + split_ifs with h + · change k.val < a.down.val - 1 + have h1 : k.val < i.val := hki + have h2 : i.val < a.down.val := h + omega + · exact ha + +lemma exIndex_degeneracy_ne_self (X : SSet.{u}) (n : ℕ) (i : Fin (n + 1)) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hpos : 0 < i.val) : + exIndex X (n + 1) ((SSet.ex.obj X).σ i x) ≠ i.castSucc := by + intro he + let j : Fin (n + 1) := ⟨i.val - 1, lt_of_le_of_lt (Nat.sub_le _ _) i.isLt⟩ + have hji : j.succ = i.castSucc := Fin.ext (by dsimp [j]; omega) + have hx : ExLevel X n (ordinalVertex n j) x := by + have h := exLevel_lowFace j i.castSucc (by rw [hji]) ((SSet.ex.obj X).σ i x) + (by rw [hji, ← he]; exact exIndex_level _ _ _) + have hh : (SSet.ex.obj X).δ i.castSucc ((SSet.ex.obj X).σ i x) = x := by + rw [← CategoryTheory.comp_apply, SimplicialObject.δ_comp_σ_self] + rfl + rwa [hh] at h + have hji' : j < i := by change i.val - 1 < i.val; omega + have hlev := exLevel_highDegeneracy i j hji' x hx + have hh := (exIndex_le_iff _ _ _ _).mpr hlev + rw [he] at hh + have hh' : i.val ≤ j.val := hh + have hj' : j.val < i.val := hji' + omega + +lemma exPairSimplex_reflects_nonDegenerate (X : SSet.{u}) (n : ℕ) (k : Fin (n + 1)) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hk : exIndex X n x = k) (hp : 0 < k.val) + (hx : exPairSimplex X n k x ∈ (SSet.ex.obj X).nonDegenerate (n + 1)) : + x ∈ (SSet.ex.obj X).nonDegenerate n := by + cases n with + | zero => simp + | succ n => + by_contra hdeg + rw [← (SSet.ex.obj X).mem_degenerate_iff_notMem_nonDegenerate, + (SSet.ex.obj X).degenerate_eq_iUnion_range_σ] at hdeg + simp only [Set.mem_iUnion, Set.mem_range] at hdeg + obtain ⟨i, y, rfl⟩ := hdeg + by_cases hik : i.val < k.val + · let j : Fin (n + 1) := ⟨k.val - 1, by have := k.isLt; omega⟩ + have hj : j.succ = k := Fin.ext (by dsimp [j]; omega) + have hij : i ≤ j := by change i.val ≤ k.val - 1; omega + rw [← hj, exPairSimplex_lowDegeneracy X n i j hij y] at hx + exact hx ((SSet.ex.obj X).σ_mem_degenerate _ _) + · have hki : k.val ≤ i.val := Nat.le_of_not_gt hik + let j : Fin (n + 1) := ⟨k.val, lt_of_le_of_lt hki i.isLt⟩ + have hj : j.castSucc = k := Fin.ext rfl + rcases lt_or_eq_of_le hki with hjlt | hjeq + · rw [← hj, exPairSimplex_highDegeneracy X n i j hjlt y] at hx + exact hx ((SSet.ex.obj X).σ_mem_degenerate _ _) + · have hk' : k = i.castSucc := Fin.ext hjeq + exact exIndex_degeneracy_ne_self X n i y (by rw [← hjeq]; exact hp) (hk.trans hk') + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +lemma exPairSimplex_input_not_typeI (X : SSet.{u}) (n : ℕ) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) + (hx : exPairSimplex X n (exIndex X n x) x ∈ (SSet.ex.obj X).nonDegenerate (n + 1)) : + ¬ ExTypeI X n x := by + cases n with + | zero => exact not_false + | succ n => + rintro ⟨k, y, hk, rfl⟩ + rw [hk, exPairSimplex_twice] at hx + exact hx ((SSet.ex.obj X).σ_mem_degenerate _ _) + +lemma exTypeI_preimage_typeII (X : SSet.{u}) (n : ℕ) + (x : (SSet.ex.obj X).obj (op ⦋n + 1⦌)) + (hx : x ∈ (SSet.ex.obj X).nonDegenerate (n + 1)) + (hp : 0 < (exIndex X (n + 1) x).val) (hI : ExTypeI X (n + 1) x) : + ∃ y : (SSet.ex.obj X).obj (op ⦋n⦌), ExTypeII X n y ∧ + exPairSimplex X n (exIndex X n y) y = x := by + obtain ⟨k, y, hk, rfl⟩ := hI + have hyk := exTypeI_preimage_index X n k y hk + have hpk : 0 < k.val := by simpa only [hk, Fin.val_castSucc] using hp + refine ⟨y, ⟨exPairSimplex_reflects_nonDegenerate X n k y hyk hpk hx, ?_, ?_⟩, ?_⟩ + · rwa [hyk] + · apply exPairSimplex_input_not_typeI + rwa [hyk] + · rw [hyk] + +lemma exPairSimplex_injective (X : SSet.{u}) (n : ℕ) + (x y : (SSet.ex.obj X).obj (op ⦋n⦌)) + (h : exPairSimplex X n (exIndex X n x) x = + exPairSimplex X n (exIndex X n y) y) : x = y := by + have hk : exIndex X n x = exIndex X n y := by + have he := congrArg (exIndex X (n + 1)) h + rw [exIndex_pair _ _ _ _ (exIndex_level _ _ _), + exIndex_pair _ _ _ _ (exIndex_level _ _ _)] at he + exact Fin.ext (congrArg (fun t : Fin (n + 2) => t.val) he) + have he := congrArg (fun z => (SSet.ex.obj X).δ (exIndex X n x).succ z) h + rw [exPairSimplex_face, hk, exPairSimplex_face] at he + exact he + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +abbrev ExPairIndices (X : SSet.{u}) := Σ n : ℕ, {x : (SSet.ex.obj X).obj (op ⦋n⦌) // ExTypeII X n x} + +lemma exIndex_pos_of_notMem (X : SSet.{u}) (n : ℕ) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) + (hx : x ∉ (SSet.Subcomplex.range (exComparison.app X)).obj (op ⦋n⦌)) : + 0 < (exIndex X n x).val := by + apply Nat.pos_of_ne_zero + intro h + have he : exIndex X n x = 0 := Fin.ext h + exact hx ((exIndex_zero_iff X n x).mp he) + +lemma exIndex_notMem_of_pos (X : SSet.{u}) (n : ℕ) + (x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hx : 0 < (exIndex X n x).val) : + x ∉ (SSet.Subcomplex.range (exComparison.app X)).obj (op ⦋n⦌) := by + intro h + have he := (exIndex_zero_iff X n x).mpr h + simp only [he, Fin.val_zero, lt_self_iff_false] at hx + +noncomputable def exPairingCore (X : SSet.{u}) : + (SSet.Subcomplex.range (exComparison.app X)).PairingCore where + ι := ExPairIndices X + dim s := s.1 + simplex s := exPairSimplex X s.1 (exIndex X s.1 s.2.1) s.2.1 + index s := (exIndex X s.1 s.2.1).succ + nonDegenerate₁ s := exPairSimplex_nonDegenerate X s.1 s.2.1 s.2.2 + nonDegenerate₂ s := by rw [exPairSimplex_face]; exact s.2.2.1 + notMem₁ s := exIndex_notMem_of_pos X _ _ (by + rw [exIndex_pair _ _ _ _ (exIndex_level _ _ _)] + exact s.2.2.2.1) + notMem₂ s := by + rw [exPairSimplex_face] + exact exIndex_notMem_of_pos X _ _ s.2.2.2.1 + injective_type₁' {s t} h := by + obtain ⟨n, ⟨x, hx⟩⟩ := s + obtain ⟨m, ⟨y, hy⟩⟩ := t + have hnm : n = m := Nat.add_right_cancel (SSet.S.dim_eq_of_mk_eq h) + subst m + have he := exPairSimplex_injective X n x y ((SSet.S.ext_iff _ _).mp h) + subst y + rfl + injective_type₂' {s t} h := by + simp only [exPairSimplex_face] at h + obtain ⟨n, ⟨x, hx⟩⟩ := s + obtain ⟨m, ⟨y, hy⟩⟩ := t + have hnm : n = m := SSet.S.dim_eq_of_mk_eq h + subst m + have he := (SSet.S.ext_iff _ _).mp h + change x = y at he + subst y + rfl + type₁_ne_type₂' s t h := by + simp only [exPairSimplex_face] at h + obtain ⟨n, ⟨x, hx⟩⟩ := s + obtain ⟨m, ⟨y, hy⟩⟩ := t + have hnm : n + 1 = m := SSet.S.dim_eq_of_mk_eq h + subst m + have he := (SSet.S.ext_iff _ _).mp h + change exPairSimplex X n (exIndex X n x) x = y at he + exact hy.2.2 (he ▸ exPairSimplex_typeI X n x) + surjective' x := by + obtain ⟨n, x, hnd, hn, rfl⟩ := x.mk_surjective + have hp := exIndex_pos_of_notMem X n x hn + by_cases hI : ExTypeI X n x + · cases n with + | zero => exact hI.elim + | succ n => + obtain ⟨y, hy, he⟩ := exTypeI_preimage_typeII X n x hnd hp hI + exact ⟨⟨n, ⟨y, hy⟩⟩, Or.inl (congrArg SSet.S.mk he.symm)⟩ + · refine ⟨⟨n, ⟨x, hnd, hp, hI⟩⟩, Or.inr ?_⟩ + simp only [exPairSimplex_face] + rfl + +instance exPairingCore_isProper (X : SSet.{u}) : (exPairingCore X).IsProper where + isUniquelyCodimOneFace s := by + apply (SSet.S.IsUniquelyCodimOneFace.iff _ _).mpr + change ∃! i, (SSet.ex.obj X).δ i (exPairSimplex X s.1 (exIndex X s.1 s.2.1) s.2.1) = + (SSet.ex.obj X).δ (exIndex X s.1 s.2.1).succ + (exPairSimplex X s.1 (exIndex X s.1 s.2.1) s.2.1) + rw [exPairSimplex_face] + exact ⟨_, exPairSimplex_face X _ _ _, + exPairSimplex_face_unique X _ _ _ rfl s.2.2.2.1 s.2.2.2.2⟩ + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +lemma exPairSimplex_other_face_index_lt (X : SSet.{u}) (n : ℕ) + (y x : (SSet.ex.obj X).obj (op ⦋n⦌)) (hy : ExTypeII X n y) (hx : ExTypeII X n x) + (hxy : x ≠ y) (i : Fin (n + 2)) + (hi : (SSet.ex.obj X).δ i (exPairSimplex X n (exIndex X n y) y) = x) : + exIndex X n x < exIndex X n y := by + let k := exIndex X n y + have hp : 0 < k.val := hy.2.1 + have hlev : ExLevel X n (ordinalVertex n k) y := exIndex_level _ _ _ + by_cases hil : i ≤ k.castSucc + · let j : Fin (n + 1) := ⟨k.val - 1, lt_of_le_of_lt (Nat.sub_le _ _) k.isLt⟩ + have hjk : j.val + 1 = k.val := by dsimp [j]; omega + have h := exPairSimplex_lowFace_level X n j k hjk i hil y hlev + rw [hi] at h + apply lt_of_le_of_lt ((exIndex_le_iff X n x j).mpr h) + change k.val - 1 < k.val + omega + · have hine : i ≠ k.succ := by + intro he + rw [he, exPairSimplex_face] at hi + exact hxy hi.symm + have hgt : k.succ < i := by + have h1 : k.val < i.val := lt_of_not_ge hil + have h2 : i.val ≠ k.val + 1 := fun h => hine (Fin.ext h) + change k.val + 1 < i.val + omega + have hle : exIndex X n x ≤ k := by + apply (exIndex_le_iff X n x k).mpr + rw [← hi] + exact exLevel_highFace k i _ ((exPairSimplex_level_iff X n k k le_rfl y).mpr hlev) + apply lt_of_le_of_ne hle + intro he + cases n with + | zero => have hk0 := k.isLt; omega + | succ n => + cases hk : k using Fin.lastCases with + | last => + have hgt0 : n + 2 < i.val := by + rw [hk] at hgt + exact hgt + have hi0 := i.isLt + omega + | cast j => + cases i using Fin.cases with + | zero => exact (not_lt_of_ge (Fin.zero_le _) hgt).elim + | succ i => + have hji : j.castSucc < i := by + rw [hk] at hgt + change j.val + 1 < i.val + 1 at hgt + change j.val < i.val + omega + apply hx.2.2 + refine ⟨j, (SSet.ex.obj X).δ i y, he.trans hk, ?_⟩ + change (SSet.ex.obj X).δ i.succ (exPairSimplex X (n + 1) k y) = x at hi + rw [hk] at hi + exact (exPairSimplex_highFace X n j i hji y).symm.trans hi + +noncomputable def exPairRank (X : SSet.{u}) (s : ExPairIndices X) : ℕ := + s.1 * (s.1 + 1) + (exIndex X s.1 s.2.1).val + +lemma exPairRank_decreases (X : SSet.{u}) (s t : ExPairIndices X) + (h : (exPairingCore X).AncestralRel s t) : exPairRank X s < exPairRank X t := by + have hd : s.1 < t.1 + 1 := SSet.N.dim_lt_of_lt h.2 + obtain ⟨n, ⟨x, hx⟩⟩ := s + obtain ⟨m, ⟨y, hy⟩⟩ := t + change n < m + 1 at hd + rcases (Nat.lt_succ_iff.mp hd).lt_or_eq with hnm | hnm + · have hn := (exIndex X n x).isLt + have hm := (exIndex X m y).isLt + change n * (n + 1) + (exIndex X n x).val < m * (m + 1) + (exIndex X m y).val + nlinarith + · subst m + have hxy : x ≠ y := by + intro he + subst y + exact h.1 rfl + have hle := (SSet.N.le_iff_exists_mono).mp h.2.le + obtain ⟨f, hf, he⟩ := hle + change ⦋n⦌ ⟶ ⦋n + 1⦌ at f + have : Mono f := hf + obtain ⟨i, rfl⟩ := SimplexCategory.eq_δ_of_mono f + change (SSet.ex.obj X).δ i (exPairSimplex X n (exIndex X n y) y) = + (SSet.ex.obj X).δ (exIndex X n x).succ (exPairSimplex X n (exIndex X n x) x) at he + rw [exPairSimplex_face] at he + have hk := exPairSimplex_other_face_index_lt X n y x hy hx hxy i he + exact Nat.add_lt_add_left hk _ + +instance exPairingCore_isRegular (X : SSet.{u}) : (exPairingCore X).IsRegular where + wf := Subrelation.wf (fun {s t} h => exPairRank_decreases X s t h) (measure (exPairRank X)).wf + +theorem exComparison_strongAnodyne (X : SSet.{u}) : + SSet.strongAnodyneExtensions (exComparison.app X) := + ⟨inferInstance, (exPairingCore X).pairing, inferInstance⟩ + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory + +lemma exComparison_anodyne (X : SSet.{u}) : SSet.anodyneExtensions (exComparison.app X) := + SSet.strongAnodyneExtensions_le_anodyneExtensions _ (exComparison_strongAnodyne X) + +theorem exComparison_weak (X : SSet.{u}) : simplicialWeakEquivalences (exComparison.app X) := + TopologicalHorn.anodyne_weak_equivalence _ (exComparison_anodyne X) + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory + +theorem ex_map_weak_iff {X Y : SSet.{u}} (f : X ⟶ Y) : + simplicialWeakEquivalences (SSet.ex.map f) ↔ simplicialWeakEquivalences f := by + have he := exComparison.naturality f + constructor + · intro h + exact simplicialWeakEquivalences.of_postcomp f (exComparison.app Y) + (exComparison_weak Y) (he.symm ▸ simplicialWeakEquivalences.comp_mem _ _ (exComparison_weak X) h) + · intro h + exact simplicialWeakEquivalences.of_precomp (exComparison.app X) (SSet.ex.map f) + (exComparison_weak X) (he ▸ simplicialWeakEquivalences.comp_mem _ _ h (exComparison_weak Y)) + +lemma exSquared_map_weak_iff {X Y : SSet.{u}} (f : X ⟶ Y) : + simplicialWeakEquivalences ((SSet.ex ⋙ SSet.ex).map f) ↔ simplicialWeakEquivalences f := by + change simplicialWeakEquivalences (SSet.ex.map (SSet.ex.map f)) ↔ _ + rw [ex_map_weak_iff, ex_map_weak_iff] + +lemma thomasonWeak_iff_nerve {C D : OmegaCategory.{u}} (f : C ⟶ D) : + simplicialWeakEquivalences (thomasonRight.map f) ↔ + simplicialWeakEquivalences (streetNerveFunctor.map f) := + exSquared_map_weak_iff _ + +lemma thomasonWeakFinite_iff_nerve {n : ℕ} {C D : OmegaCategory.NCategory.{u} n} (f : C ⟶ D) : + simplicialWeakEquivalences ((thomasonRightFinite n).map f) ↔ + simplicialWeakEquivalences ((streetNerveFinite n).map f) := + exSquared_map_weak_iff _ + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +variable {E : Type u} [PartialOrder E] + +noncomputable def flagOldLast (A : Set E) (s : MeetingChains A) : A := + ⟨chainLast (chainIntersection A s).val, + (chainIntersection A s).property _ (chainGreatest_mem _)⟩ + +lemma flagOldLast_mono (A : Set E) {s t : MeetingChains A} (h : s ≤ t) : + flagOldLast A s ≤ flagOldLast A t := + chainLast.monotone ((chainIntersection A).monotone h) + +lemma le_flagOldLast (A : Set E) (s : MeetingChains A) (a : E) + (ha : a ∈ s.val.finset) (haA : a ∈ A) : a ≤ (flagOldLast A s).val := by + classical + apply le_chainGreatest + exact Finset.mem_filter.mpr ⟨ha, haA⟩ + +lemma flagOldLast_of_old (A : Set E) (s : NonemptyFiniteChains E) + (hs : ∀ a ∈ s.finset, a ∈ A) (hm : ∃ a ∈ s.finset, a ∈ A) : + (flagOldLast A ⟨s, hm⟩).val = chainLast s := by + classical + change chainLast (chainIntersection A ⟨s, hm⟩).val = chainLast s + congr 1 + apply NonemptyFiniteChains.ext + exact Finset.filter_eq_self.mpr hs + +noncomputable def conicalFlagRetraction (A : Set E) (p : A) (c : A →o A) + (hc : ∀ a : A, a.val ≤ (c a).val) (hp : ∀ a : A, p ≤ c a) : + NonemptyFiniteChains E →o A := by + classical + let old (s : NonemptyFiniteChains E) := ∀ a ∈ s.finset, a ∈ A + let meet (s : NonemptyFiniteChains E) := ∃ a ∈ s.finset, a ∈ A + let r (s : NonemptyFiniteChains E) : A := + if hs : old s then ⟨chainLast s, hs _ (chainGreatest_mem s)⟩ + else if hs : meet s then c (flagOldLast A ⟨s, hs⟩) else p + refine ⟨r, fun s t hst => ?_⟩ + by_cases ht : old t + · have hs : old s := fun a ha => ht a (hst ha) + change r s ≤ r t + dsimp [r] + rw [dite_eq_left hs, dite_eq_left ht] + exact chainLast.monotone hst + · by_cases hs : old s + · have htm : meet t := by + obtain ⟨a, ha⟩ := s.nonempty + exact ⟨a, hst ha, hs a ha⟩ + dsimp [r] + rw [dite_eq_left hs, dite_eq_right ht, dite_eq_left htm] + exact (le_flagOldLast A ⟨t, htm⟩ (chainLast s) (hst (chainGreatest_mem s)) + (hs _ (chainGreatest_mem s))).trans (hc _) + · by_cases hsm : meet s + · have htm : meet t := by + obtain ⟨a, ha, haA⟩ := hsm + exact ⟨a, hst ha, haA⟩ + dsimp [r] + rw [dite_eq_right hs, dite_eq_right ht, dite_eq_left hsm, dite_eq_left htm] + exact c.monotone (flagOldLast_mono A hst) + · dsimp [r] + rw [dite_eq_right hs, dite_eq_right ht, dite_eq_right hsm] + split_ifs with htm + · exact hp _ + · exact le_rfl + +lemma conicalFlagRetraction_old (A : Set E) (p : A) (c : A →o A) + (hc : ∀ a : A, a.val ≤ (c a).val) (hp : ∀ a : A, p ≤ c a) + (s : NonemptyFiniteChains E) (hs : ∀ a ∈ s.finset, a ∈ A) : + (conicalFlagRetraction A p c hc hp s).val = chainLast s := by + classical + simp only [conicalFlagRetraction, OrderHom.coe_mk, dite_eq_left hs] + +lemma conicalFlagRetraction_map_old (A : Set E) (p : A) (c : A →o A) + (hc : ∀ a : A, a.val ≤ (c a).val) (hp : ∀ a : A, p ≤ c a) + (s : NonemptyFiniteChains A) : + conicalFlagRetraction A p c hc hp (s.map (OrderHom.Subtype.val _)) = chainLast s := by + apply Subtype.ext + rw [conicalFlagRetraction_old] + · exact chainGreatest_map s (OrderHom.Subtype.val _) + · intro a ha + obtain ⟨b, _, rfl⟩ := (s.mem_map_iff _ a).mp ha + exact b.property + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder + +def HornFaces (n : ℕ) (k : Fin (n+1)) : Set (NonemptyFiniteChains (ULift.{u} (Fin (n+1)))) := + {s | ∃ a : Fin (n+1), a ≠ k ∧ ULift.up a ∉ s.finset} + +noncomputable def hornFacePoint {n : ℕ} (hn : 1 ≤ n) (k : Fin (n+1)) : HornFaces.{u} n k := by + classical + refine ⟨⟨{ULift.up k}, by simp, by simp⟩, ?_⟩ + have hex : ∃ a : Fin (n+1), a ≠ k := by + by_cases hk : k = 0 + · exact ⟨⟨1, by omega⟩, fun h => by have := congrArg Fin.val (h.trans hk); simp at this⟩ + · exact ⟨0, Ne.symm hk⟩ + obtain ⟨a, ha⟩ := hex + exact ⟨a, ha, by simpa using ha⟩ + +noncomputable def hornFaceCone {n : ℕ} (k : Fin (n+1)) : HornFaces.{u} n k →o HornFaces.{u} n k where + toFun s := ⟨⟨insert (ULift.up k) s.val.finset, by simp, by + intro a b + exact le_total a.val b.val⟩, by + obtain ⟨a, hak, ha⟩ := s.property + exact ⟨a, hak, by simpa using And.intro hak ha⟩⟩ + monotone' s t h := by + intro a ha + rcases Finset.mem_insert.mp ha with ha | ha + · exact Finset.mem_insert.mpr (Or.inl ha) + · exact Finset.mem_insert.mpr (Or.inr (h ha)) + +lemma le_hornFaceCone {n : ℕ} (k : Fin (n+1)) (s : HornFaces.{u} n k) : + s.val ≤ (hornFaceCone k s).val := by + intro a ha + exact Finset.mem_insert_of_mem ha + +lemma hornFacePoint_le_cone {n : ℕ} (hn : 1 ≤ n) (k : Fin (n+1)) (s : HornFaces.{u} n k) : + hornFacePoint hn k ≤ hornFaceCone k s := by + classical + intro a ha + have ha' : a = ULift.up k := by + change a ∈ (hornFacePoint hn k).val.finset at ha + simpa [hornFacePoint] using ha + subst a + exact Finset.mem_insert_self _ _ + +noncomputable def hornFlagRetraction {n : ℕ} (hn : 1 ≤ n) (k : Fin (n+1)) : + NonemptyFiniteChains (NonemptyFiniteChains (ULift.{u} (Fin (n+1)))) →o HornFaces.{u} n k := + conicalFlagRetraction _ (hornFacePoint hn k) (hornFaceCone k) + (le_hornFaceCone k) (hornFacePoint_le_cone hn k) + +lemma hornFlagRetraction_old {n : ℕ} (hn : 1 ≤ n) (k : Fin (n+1)) + (s : NonemptyFiniteChains (HornFaces.{u} n k)) : + hornFlagRetraction hn k (s.map (OrderHom.Subtype.val _)) = chainLast s := + conicalFlagRetraction_map_old _ _ _ _ _ _ + +lemma allowedChains_iff {E : Type u} [PartialOrder E] (K : (nerve E).Subcomplex) + (c : NonemptyFiniteChains E) : + (∃ s : (K : SSet).N, simplexChain (subcomplexN K s).simplex = c) ↔ + (chainSimplex c).simplex ∈ K.obj (op ⦋(chainSimplex c).dim⦌) := by + constructor + · rintro ⟨s, hs⟩ + have he : subcomplexN K s = chainSimplex c := by + apply nerveNondegenerateChains.injective + change simplexChain _ = simplexChain _ + rw [hs, simplexChain_chainSimplex] + have hh : (subcomplexN K s).simplex ∈ K.obj (op ⦋(subcomplexN K s).dim⦌) := s.simplex.property + exact he ▸ hh + · intro h + exact ⟨SSet.N.mk ⟨(chainSimplex c).simplex, h⟩ + ((K.mem_nonDegenerate_iff _).mpr (chainSimplex c).nonDegenerate), + simplexChain_chainSimplex c⟩ + +lemma orderedSimplexSubcomplex_mem_iff {n d : ℕ} + (K : (SSet.stdSimplex.{u}.obj ⦋n⦌).Subcomplex) + (x : (nerve (ULift.{u} (Fin (n+1)))) _⦋d⦌) : + x ∈ (orderedSimplexSubcomplex K).obj _ ↔ + (SSet.stdSimplex.isoNerve n).inv.app _ x ∈ K.obj _ := by + constructor + · rintro ⟨y, rfl⟩ + have he := congrArg (fun f => f.app (op ⦋d⦌) y.val) (SSet.stdSimplex.isoNerve.{u} n).hom_inv_id + change (SSet.stdSimplex.isoNerve n).inv.app _ + ((SSet.stdSimplex.isoNerve n).hom.app _ y.val) = y.val at he + change (SSet.stdSimplex.isoNerve n).inv.app _ + ((SSet.stdSimplex.isoNerve n).hom.app _ y.val) ∈ K.obj _ + rw [he] + exact y.property + · intro h + refine ⟨⟨(SSet.stdSimplex.isoNerve n).inv.app _ x, h⟩, ?_⟩ + exact congrArg (fun f => f.app (op ⦋d⦌) x) (SSet.stdSimplex.isoNerve.{u} n).inv_hom_id + +lemma hornFaces_allowed_iff {n : ℕ} (k : Fin (n+1)) + (c : NonemptyFiniteChains (ULift.{u} (Fin (n+1)))) : + (∃ s : (orderedSimplexSubcomplex (SSet.horn n k) : SSet).N, + simplexChain (subcomplexN _ s).simplex = c) ↔ c ∈ HornFaces n k := by + rw [allowedChains_iff, orderedSimplexSubcomplex_mem_iff, SSet.mem_horn_iff_notMem_range] + have hm (a : Fin (n+1)) : + a ∈ Set.range ((SSet.stdSimplex.isoNerve n).inv.app _ (chainSimplex c).simplex) ↔ + ULift.up a ∈ c.finset := by + conv_rhs => rw [← simplexChain_chainSimplex c, mem_simplexChain] + constructor + · rintro ⟨i, hi⟩ + refine ⟨i, ?_⟩ + apply ULift.ext + exact hi + · rintro ⟨i, hi⟩ + exact ⟨i, congrArg ULift.down hi⟩ + simp only [HornFaces, Set.mem_ofPred_eq, exists_prop, hm] + +noncomputable def hornFacesIso {n : ℕ} (k : Fin (n+1)) : + AllowedChains (orderedSimplexSubcomplex (SSet.horn.{u} n k)) ≃o HornFaces.{u} n k where + toFun c := ⟨c.val, (hornFaces_allowed_iff k c.val).mp c.property⟩ + invFun c := ⟨c.val, (hornFaces_allowed_iff k c.val).mpr c.property⟩ + left_inv _ := rfl + right_inv _ := rfl + map_rel_iff' := Iff.rfl + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder Limits + +variable {E : Type u} [PartialOrder E] + +lemma simplexVertices_yoneda {n : ℕ} (x : (nerve E) _⦋n⦌) : + simplexNerveIso.hom.app ⦋n⦌ ≫ nerveMap (simplexVertices x).monotone.functor = + SSet.yonedaEquiv.symm x := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + rfl + +lemma lastVertex_nerve : + sdNerveMap ≫ nerveMap (chainLast (X := E)).monotone.functor = + lastVertex.app (nerve E) := by + apply (isColimitOfPreserves SSet.sd (nerve E).isColimitCoconeN').hom_ext + intro s + change SSet.sd.map (SSet.yonedaEquiv.symm s.simplex) ≫ (_ ≫ _) = + SSet.sd.map (SSet.yonedaEquiv.symm s.simplex) ≫ _ + rw [← Category.assoc, sdNerveMap_fac, Category.assoc, lastVertex.naturality] + rw [lastVertex_stdSimplex, Category.assoc] + congr 1 + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + apply nerve.ext_of_isThin + funext j + exact chainGreatest_map (x.obj j) (simplexVertices s.simplex) + +lemma sdSubcomplex_lastVertex (K : (nerve E).Subcomplex) : + SSet.sd.map K.ι ≫ sdNerveMap ≫ nerveMap chainLast.monotone.functor = + lastVertex.app (K : SSet) ≫ K.ι := by + rw [lastVertex_nerve] + exact lastVertex.naturality K.ι + +lemma sdTwiceSubcomplex_lastVertex (K : (nerve E).Subcomplex) : + (sdTwiceSubcomplexIso K).hom ≫ nerveMap chainLast.monotone.functor = + lastVertex.app (SSet.sd.obj (K : SSet)) ≫ (sdSubcomplexIso K).hom := by + change (SSet.sd.map (sdSubcomplexMap K) ≫ sdNerveMap) ≫ _ = _ + rw [Category.assoc, lastVertex_nerve] + exact lastVertex.naturality (sdSubcomplexMap K) + +end Thomason.Subdivision + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FiberComparisons.lean b/lean/OAI/CategoryTheory/Thomason/FiberComparisons.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a3acccc6130b862d437bb1049e960512fb3fdfd --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FiberComparisons.lean @@ -0,0 +1,733 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.LabelledFibers +import OAI.CategoryTheory.Thomason.SubdivisionWeak + +namespace OAI + +/-! Fiber Comparisons. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory + +lemma oneFiberConeHomEquiv_old (p : Over interval.{u}) (B : OmegaCategory.{u}) + (F : (fiberFunctor (intervalVertex 1)).obj p ⟶ B) + (x : ((fiberFunctor (intervalVertex 1)).obj p).Cell) : + (oneFiberConeAdjunction.homEquiv p B F).left.map x.val = @ConeCell.old B.op (F.map x) := by + have hx : (reverseLabel p.hom).map x.val = (intervalVertex 0).val := by + change intervalReflect.map (p.hom.map x.val) = _ + rw [x.property] + rfl + let a := (reverseLabelEquivalence.toAdjunction.comp zeroFiberConeAdjunction).comp + opEquivalence.toAdjunction + have he := Adjunction.homEquiv_ofNatIsoLeft_apply a reversedZeroFiberNatIso F + refine (congrArg (fun H : p ⟶ initialConeFunctor.obj B => H.left.map x.val) he).trans ?_ + dsimp only [a] + rw [Adjunction.comp_homEquiv, Adjunction.comp_homEquiv] + simp only [Equiv.trans_apply, zeroFiberConeAdjunction, Adjunction.mkOfHomEquiv_homEquiv] + change coneExtendMap (reverseLabel p.hom) + (Functor.comp (reversedZeroFiberIso p).hom F).op x.val = _ + exact coneExtendMap_zero _ _ _ hx + +lemma oneFiberFiniteConeHomEquiv_old (n : ℕ) (hn : 1 ≤ n) + (p : Over (finiteInterval.{u} n hn)) (B : NCategory.{u} n) + (F : (fiberFiniteFunctor n hn 1).obj p ⟶ B) + (x : ((fiberFiniteFunctor n hn 1).obj p).val.Cell) : + ((oneFiberFiniteConeAdjunction n hn).homEquiv p B F).left.map x.val = + @ConeCell.old B.val.op (F.map x) := by + have hx : (reverseLabel p.hom).map x.val = (intervalVertex 0).val := by + change intervalReflect.map (p.hom.map x.val) = _ + rw [x.property] + rfl + let a := (((reverseLabelFiniteEquivalence n hn).toAdjunction).comp + (zeroFiberFiniteConeAdjunction n hn)).comp (opFiniteEquivalence n).toAdjunction + have he := Adjunction.homEquiv_ofNatIsoLeft_apply a (reversedZeroFiberFiniteNatIso n hn) F + refine (congrArg (fun H : p ⟶ (initialConeFiniteFunctor n hn).obj B => H.left.map x.val) he).trans ?_ + dsimp only [a] + rw [Adjunction.comp_homEquiv, Adjunction.comp_homEquiv] + simp only [Equiv.trans_apply, zeroFiberFiniteConeAdjunction, Adjunction.mkOfHomEquiv_homEquiv] + change coneExtendMap (reverseLabel p.hom) + (Functor.comp (reversedZeroFiberFiniteIso n hn p).hom F).op x.val = _ + exact coneExtendMap_zero _ _ _ hx + +lemma truncationOneFiberIso_inv_app (n : ℕ) (hn : 1 ≤ n) (p : Over interval.{u}) : + (truncationOneFiberIso n hn).inv.app p = truncationFiberComparison n hn 1 p := by + apply ((truncationAdjunction n).homEquiv _ _).injective + change OmegaCategory.Functor.comp (truncationUnit n _) ((truncationOneFiberIso n hn).inv.app p) = + OmegaCategory.Functor.comp (truncationUnit n _) (truncationFiberComparison n hn 1 p) + rw [truncationFiberComparison_unit] + let a := (((truncationOverAdjunction n hn).comp (oneFiberFiniteConeAdjunction n hn)).ofNatIsoRight + (initialConeFiniteInclusionIso n hn)) + let b := oneFiberConeAdjunction.comp (truncationAdjunction n) + have hh := Adjunction.homEquiv_leftAdjointUniq_hom_app b a p + change b.homEquiv p _ ((truncationOneFiberIso n hn).inv.app p) = a.unit.app p at hh + rw [Adjunction.comp_homEquiv] at hh + simp only [Equiv.trans_apply] at hh + apply Functor.ext + funext x + have hcell := congrArg (fun H => H.left.map x.val) hh + rw [oneFiberConeHomEquiv_old p _ _ x] at hcell + let q := (truncationOverFunctor n hn).obj p + have hx : q.hom.map ((truncationUnit n p.left).map x.val) = (intervalVertex 1).val := by + have h := congrArg (fun F => F.map x.val) (Over.w ((truncationOverAdjunction n hn).unit.app p)) + exact h.trans x.property + change ConeCell.old _ = ((oneFiberFiniteConeAdjunction n hn).unit.app q).left.map + ((truncationUnit n p.left).map x.val) at hcell + rw [← (oneFiberFiniteConeAdjunction n hn).homEquiv_id q] at hcell + rw [oneFiberFiniteConeHomEquiv_old n hn q _ _ ⟨_, hx⟩] at hcell + have h := ConeCell.old.inj hcell + exact h + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory + +lemma truncationFiberIso_inv_app (n : ℕ) (hn : 1 ≤ n) (e : Fin 2) (p : Over interval.{u}) : + (truncationFiberIso n hn e).inv.app p = truncationFiberComparison n hn e p := by + by_cases he : e = 0 + · subst e + simpa only [truncationFiberIso, dite_eq_left] using truncationZeroFiberIso_inv_app n hn p + · have he1 : e = 1 := by omega + subst e + simpa only [truncationFiberIso, dite_eq_right he] using truncationOneFiberIso_inv_app n hn p + +lemma truncationFiberIso_inv_inclusion (n : ℕ) (hn : 1 ≤ n) (e : Fin 2) + (p : Over interval.{u}) : + (truncationFiberIso n hn e).inv.app p ≫ + fiberFiniteInclusion n hn e ((truncationOverFunctor n hn).obj p) = + (truncationFunctor n).map (p.hom.fiber (intervalVertex e)).inclusion := by + rw [truncationFiberIso_inv_app] + exact truncationFiberComparison_inclusion n hn e p + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains.PosetTables + +open CategoryTheory OmegaCategory DirectedComplex + +variable {P : Type u} [PartialOrder P] + +lemma truncationTableFiberIso_inclusion (n : ℕ) (hn : 1 ≤ n) (f : P →o Fin 2) (e : Fin 2) : + (truncationTableFiberIso n hn f e).hom ≫ + fiberFiniteInclusion n hn e ((truncationOverFunctor n hn).obj (Over.mk (tableLabel f))) = + (truncationFunctor n).map + (complexMap (OrderEmbedding.subtype {a | f a = e}).toOrderHom).nu := by + apply truncation_functor_ext + apply OmegaCategory.Functor.ext + funext x + have h := congrArg (fun F => F.map ((tableFiberSegmentIso f e).hom.map x)) + (truncationFiberComparison_unit n hn e (Over.mk (tableLabel f))) + rw [← truncationFiberIso_inv_app] at h + exact congrArg Subtype.val h + +end Thomason.NormalizedChains.PosetTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory CategoryTheory.Limits OmegaCategory + +noncomputable def categorificationSimplexDiagram (X : SSet.{u}) : + CostructuredArrow uliftYoneda.{u,0,0} X ⥤ OmegaCategory.{u} := + CostructuredArrow.proj uliftYoneda.{u,0,0} X ⋙ raisedOrientals + +noncomputable def categorificationSimplexCocone (X : SSet.{u}) : + Cocone (categorificationSimplexDiagram X) := + (CategoryTheory.Functor.LeftExtension.mk categorification + ((uliftYoneda.{u} : SimplexCategory ⥤ SSet.{u}).leftKanExtensionUnit + raisedOrientals.{u})).coconeAt X + +noncomputable def categorificationSimplexIsColimit (X : SSet.{u}) : + IsColimit (categorificationSimplexCocone X) := by + unfold categorificationSimplexCocone categorification + exact CategoryTheory.Functor.isPointwiseLeftKanExtensionOfIsLeftKanExtension _ _ X + +noncomputable def categorificationFiniteSimplexIsColimit (n : ℕ) (X : SSet.{u}) : + IsColimit ((truncationFunctor n).mapCocone (categorificationSimplexCocone X)) := + isColimitOfPreserves (truncationFunctor n) (categorificationSimplexIsColimit X) + +noncomputable def labelledSimplexIsColimit (X : SSet.{u}) + (p : categorification.obj X ⟶ interval.{u}) : + IsColimit (Over.liftCocone (categorificationSimplexCocone X) p) := + Over.isColimitLiftCocone _ p (categorificationSimplexIsColimit X) + +noncomputable def labelledSimplexFiberIsColimit (X : SSet.{u}) + (p : categorification.obj X ⟶ interval.{u}) (e : Fin 2) : + IsColimit ((fiberFunctor (intervalVertex e)).mapCocone + (Over.liftCocone (categorificationSimplexCocone X) p)) := by + have : PreservesColimitsOfSize.{0,u} (fiberFunctor.{u} (intervalVertex e)) := by + by_cases he : e = 0 + · subst e; infer_instance + · have he1 : e = 1 := by omega + subst e; infer_instance + exact isColimitOfPreserves (fiberFunctor (intervalVertex e)) (labelledSimplexIsColimit X p) + +noncomputable def labelledFiniteSimplexIsColimit (n : ℕ) (hn : 1 ≤ n) (X : SSet.{u}) + (p : (categorificationFinite n).obj X ⟶ finiteInterval.{u} n hn) : + IsColimit (Over.liftCocone + ((truncationFunctor n).mapCocone (categorificationSimplexCocone X)) p) := + Over.isColimitLiftCocone _ p (categorificationFiniteSimplexIsColimit n X) + +noncomputable def labelledFiniteSimplexFiberIsColimit (n : ℕ) (hn : 1 ≤ n) (X : SSet.{u}) + (p : (categorificationFinite n).obj X ⟶ finiteInterval.{u} n hn) (e : Fin 2) : + IsColimit ((fiberFiniteFunctor n hn e).mapCocone + (Over.liftCocone ((truncationFunctor n).mapCocone (categorificationSimplexCocone X)) p)) := by + have : PreservesColimitsOfSize.{0,u} (fiberFiniteFunctor.{u} n hn e) := by + by_cases he : e = 0 + · subst e; infer_instance + · have he1 : e = 1 := by omega + subst e; infer_instance + exact isColimitOfPreserves (fiberFiniteFunctor n hn e) + (labelledFiniteSimplexIsColimit n hn X p) + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Opposite NormalizedChains NormalizedChains.PosetTables OmegaCategory + +variable {P Q : Type u} [PartialOrder P] [PartialOrder Q] + +def posetSimplexOrder {m : SimplexCategoryᵒᵖ} (s : (nerve P).obj m) : + Fin (m.unop.len+1) →o P := ⟨s.obj, s.monotone⟩ + +noncomputable def posetTableNerveMap (P : Type u) [PartialOrder P] : + nerve P ⟶ streetNerve (complex P).nu where + app _ := ↾fun s => (complexMap (posetSimplexOrder s)).nu + naturality m n f := by + apply ConcreteCategory.hom_ext + intro s + change (complexMap ((posetSimplexOrder s).comp f.unop.toOrderHom)).nu = + (DirectedComplex.Hom.comp (complexMap f.unop.toOrderHom) + (complexMap (posetSimplexOrder s))).nu + exact congrArg DirectedComplex.Hom.nu (complexMap_comp _ _) + +lemma posetTableNerveMap_natural (f : P →o Q) : + nerveMap f.monotone.functor ≫ posetTableNerveMap Q = + posetTableNerveMap P ≫ streetNerveMap (complexMap f).nu := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro s + change (complexMap (f.comp (posetSimplexOrder s))).nu = + (DirectedComplex.Hom.comp (complexMap (posetSimplexOrder s)) (complexMap f)).nu + exact congrArg DirectedComplex.Hom.nu (complexMap_comp _ _) + +noncomputable def posetCategorificationTableMap (P : Type u) [PartialOrder P] : + categorification.obj (nerve P) ⟶ (complex P).nu := + (categorificationAdjunction.homEquiv _ _).symm (posetTableNerveMap P) + +lemma posetCategorificationTableMap_natural (f : P →o Q) : + categorification.map (nerveMap f.monotone.functor) ≫ posetCategorificationTableMap Q = + posetCategorificationTableMap P ≫ (complexMap f).nu := by + calc + _ = (categorificationAdjunction.homEquiv _ _).symm + (nerveMap f.monotone.functor ≫ posetTableNerveMap Q) := + (categorificationAdjunction.homEquiv_naturality_left_symm + (nerveMap f.monotone.functor) (posetTableNerveMap Q)).symm + _ = (categorificationAdjunction.homEquiv _ _).symm + (posetTableNerveMap P ≫ streetNerveFunctor.map (complexMap f).nu) := + congrArg (categorificationAdjunction.homEquiv _ _).symm + (posetTableNerveMap_natural f) + _ = _ := categorificationAdjunction.homEquiv_naturality_right_symm + (posetTableNerveMap P) (complexMap f).nu + +noncomputable def posetCategorificationLabel (f : P →o Fin 2) : + categorification.obj (nerve P) ⟶ interval.{u} := + posetCategorificationTableMap P ≫ tableLabel f + +lemma posetCategorificationLabel_natural (g : P →o Q) (f : Q →o Fin 2) : + categorification.map (nerveMap g.monotone.functor) ≫ posetCategorificationLabel f = + posetCategorificationLabel (f.comp g) := by + unfold posetCategorificationLabel + rw [← Category.assoc, posetCategorificationTableMap_natural, Category.assoc] + exact congrArg (fun F => posetCategorificationTableMap P ≫ F) (tableLabel_natural g f) + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Opposite OmegaCategory NormalizedChains NormalizedChains.PosetTables + +lemma categorification_homEquiv_app {X : SSet.{u}} {C : OmegaCategory.{u}} + (F : categorification.obj X ⟶ C) {m : SimplexCategoryᵒᵖ} (s : X.obj m) : + (categorificationAdjunction.homEquiv X C F).app m s = + OmegaCategory.Functor.comp (uliftUp _) + ((categorificationSimplexCocone X).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) ≫ F) := by + let L := (uliftYoneda.{u} : SimplexCategory ⥤ SSet.{u}).leftKanExtension raisedOrientals + let α := (uliftYoneda.{u} : SimplexCategory ⥤ SSet.{u}).leftKanExtensionUnit raisedOrientals + calc + _ = streetYonedaEquiv C m + (((Presheaf.uliftYonedaAdjunction.{0} L α).homEquiv X C F).app m s) := by + exact congrArg (fun t => t.app m s) + (Adjunction.homEquiv_ofNatIsoRight_apply + (Presheaf.uliftYonedaAdjunction.{0} L α) streetYonedaIso F) + _ = _ := congrArg (streetYonedaEquiv C m) + (Presheaf.uliftYonedaAdjunction_homEquiv_app L α F s) + +lemma posetCategorificationTableMap_leg {P : Type u} [PartialOrder P] + {m : SimplexCategoryᵒᵖ} (s : (nerve P).obj m) : + (categorificationSimplexCocone (nerve P)).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) ≫ + posetCategorificationTableMap P = + OmegaCategory.Functor.comp (uliftDown _) (complexMap (posetSimplexOrder s)).nu := by + have h := congrArg (fun t => t.app m s) + ((categorificationAdjunction.homEquiv _ _).apply_symm_apply (posetTableNerveMap P)) + have hg := categorification_homEquiv_app (posetCategorificationTableMap P) s + have he : OmegaCategory.Functor.comp (uliftUp _) + ((categorificationSimplexCocone (nerve P)).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) ≫ posetCategorificationTableMap P) = + (complexMap (posetSimplexOrder s)).nu := hg.symm.trans h + exact congrArg (fun F => OmegaCategory.Functor.comp (uliftDown _) F) he + +lemma posetCategorificationTableMap_leg_lifted {P : Type u} [PartialOrder P] + {m : SimplexCategoryᵒᵖ} (s : (nerve P).obj m) : + (categorificationSimplexCocone (nerve P)).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) ≫ + posetCategorificationTableMap P = + (complexULiftIso.{0,u} (Fin (m.unop.len+1))).hom ≫ + (complexMap ((posetSimplexOrder s).comp (orderULiftDown _))).nu := by + rw [posetCategorificationTableMap_leg] + have h := congrArg DirectedComplex.Hom.nu + (complexMap_comp (orderULiftUp.{0,u} (Fin (m.unop.len+1))) + ((posetSimplexOrder s).comp (orderULiftDown _))) + exact congrArg (fun F => OmegaCategory.Functor.comp (uliftDown _) F) h + +lemma posetCategorificationLabel_leg {P : Type u} [PartialOrder P] + (f : P →o Fin 2) {m : SimplexCategoryᵒᵖ} (s : (nerve P).obj m) : + (categorificationSimplexCocone (nerve P)).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) ≫ + posetCategorificationLabel f = + (complexULiftIso.{0,u} (Fin (m.unop.len+1))).hom ≫ + tableLabel (f.comp ((posetSimplexOrder s).comp (orderULiftDown _))) := by + have h := congrArg (fun F => F ≫ tableLabel f) + (posetCategorificationTableMap_leg_lifted s) + exact h.trans (congrArg + (fun F => (complexULiftIso.{0,u} (Fin (m.unop.len+1))).hom ≫ F) + (tableLabel_natural ((posetSimplexOrder s).comp (orderULiftDown _)) f)) + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Simplicial Opposite OmegaCategory NormalizedChains NormalizedChains.PosetTables + +instance categorificationSimplexLeg_isIso {X : SSet.{u}} {m : SimplexCategoryᵒᵖ} + (s : X.obj m) [IsIso (uliftYonedaEquiv.symm s)] : + IsIso ((categorificationSimplexCocone X).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s))) := by + change IsIso (((uliftYoneda.{u} : SimplexCategory ⥤ SSet.{u}).leftKanExtensionUnit + raisedOrientals).app m.unop ≫ categorification.map (uliftYonedaEquiv.symm s)) + have h₁ : IsIso (((uliftYoneda.{u} : SimplexCategory ⥤ SSet.{u}).leftKanExtensionUnit + raisedOrientals).app m.unop) := (categorificationSimplexIso.{u} m.unop).isIso_inv + have h₂ : IsIso (categorification.map (uliftYonedaEquiv.symm s)) := inferInstance + exact IsIso.comp_isIso' h₁ h₂ + +noncomputable instance posetCategorificationTableMap_ordinal_isIso (n : ℕ) : + IsIso (posetCategorificationTableMap (ULift.{u} (Fin (n+1)))) := by + let s : (nerve (ULift.{u} (Fin (n+1)))).obj (op ⦋n⦌) := + uliftYonedaEquiv (SSet.stdSimplex.isoNerve.{u} n).hom + have hs : posetSimplexOrder s = orderULiftUp.{0,u} (Fin (n+1)) := by + ext i + rfl + have hi : IsIso (uliftYonedaEquiv.symm s) := by + have hh : uliftYonedaEquiv.symm s = (SSet.stdSimplex.isoNerve.{u} n).hom := + uliftYonedaEquiv.symm_apply_apply _ + exact hh ▸ (SSet.stdSimplex.isoNerve.{u} n).isIso_hom + let leg := (categorificationSimplexCocone (nerve (ULift.{u} (Fin (n+1))))).ι.app + (CostructuredArrow.mk (uliftYonedaEquiv.symm s)) + have he : leg ≫ posetCategorificationTableMap (ULift.{u} (Fin (n+1))) = + (complexULiftIso.{0,u} (Fin (n+1))).hom := by + have h := posetCategorificationTableMap_leg s + rw [hs] at h + exact h + have hleg : IsIso leg := categorificationSimplexLeg_isIso s + exact @IsIso.of_isIso_fac_left _ _ _ _ _ _ _ _ hleg + (complexULiftIso.{0,u} (Fin (n+1))).isIso_hom he + +noncomputable def posetComplexFunctor : PartOrd.{u} ⥤ DirectedComplex.{u} where + obj P := complex P + map f := complexMap f.hom + map_id _ := complexMap_id + map_comp f g := complexMap_comp f.hom g.hom + +lemma posetCategorificationTableMap_isIso_of_orderIso + {P Q : Type u} [PartialOrder P] [PartialOrder Q] (e : P ≃o Q) + [IsIso (posetCategorificationTableMap P)] : + IsIso (posetCategorificationTableMap Q) := by + have hN : IsIso (nerveMap e.toOrderEmbedding.toOrderHom.monotone.functor) := + (PartOrd.nerveFunctor.mapIso (PartOrd.Iso.mk (α := PartOrd.of P) (β := PartOrd.of Q) e)).isIso_hom + have hT : IsIso (show (complex P).nu ⟶ (complex Q).nu from + (complexMap e.toOrderEmbedding.toOrderHom).nu) := + ((posetComplexFunctor ⋙ DirectedComplex.nuFunctor).mapIso + (PartOrd.Iso.mk (α := PartOrd.of P) (β := PartOrd.of Q) e)).isIso_hom + have h := posetCategorificationTableMap_natural e.toOrderEmbedding.toOrderHom + exact IsIso.of_isIso_fac_left h + +theorem posetCategorificationTableMap_finiteLinear_isIso + (P : Type u) [LinearOrder P] [Finite P] [Nonempty P] : + IsIso (posetCategorificationTableMap P) := by + classical + let := Fintype.ofFinite P + let n := Fintype.card P - 1 + have hn : Fintype.card P = n+1 := by + have := Fintype.card_pos (α := P) + dsimp only [n] + omega + let e : ULift.{u} (Fin (n+1)) ≃o P := + ULift.orderIso.trans (Fintype.orderIsoFinOfCardEq P hn) + exact posetCategorificationTableMap_isIso_of_orderIso e + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Limits OmegaCategory NormalizedChains NormalizedChains.PosetTables + +noncomputable def emptyOmegaIsInitial (C : OmegaCategory.{u}) [IsEmpty C.Cell] : IsInitial C := + IsInitial.ofUniqueHom + (fun D => { map := isEmptyElim + map_source := fun _ x => isEmptyElim x + map_target := fun _ x => isEmptyElim x + map_comp := fun _ x => isEmptyElim x }) + (fun _ F => by + apply OmegaCategory.Functor.ext + funext x + exact isEmptyElim x) + +noncomputable def emptyPosetNerveIsInitial (P : Type u) [PartialOrder P] [IsEmpty P] : + IsInitial (nerve P) := + IsInitial.ofUniqueHom + (fun X => { + app := fun _ => ↾fun s => isEmptyElim (s.obj 0) + naturality := fun _ _ _ => by + apply ConcreteCategory.hom_ext + intro s + exact isEmptyElim (s.obj 0) }) + (fun _ F => by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro s + exact isEmptyElim (s.obj 0)) + +theorem posetCategorificationTableMap_empty_isIso (P : Type u) [PartialOrder P] [IsEmpty P] : + IsIso (posetCategorificationTableMap P) := by + have : IsEmpty (complex P).nu.Cell := ⟨fun x => isEmptyElim (tableStart x)⟩ + exact isIso_of_isInitial + ((emptyPosetNerveIsInitial P).isInitialObj categorification (nerve P)) + (emptyOmegaIsInitial (complex P).nu) _ + +theorem posetCategorificationTableMap_finiteLinear_isIso_all + (P : Type u) [LinearOrder P] [Finite P] : + IsIso (posetCategorificationTableMap P) := by + cases isEmpty_or_nonempty P with + | inl h => exact posetCategorificationTableMap_empty_isIso P + | inr h => exact posetCategorificationTableMap_finiteLinear_isIso P + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory OmegaCategory NormalizedChains NormalizedChains.PosetTables + +variable {P : Type u} [PartialOrder P] + +def posetLevelInclusion (f : P →o Fin 2) (e : Fin 2) : {a // f a = e} →o P := + (OrderEmbedding.subtype {a | f a = e}).toOrderHom + +lemma posetCategorification_level_mem (f : P →o Fin 2) (e : Fin 2) + (x : (categorification.obj (nerve {a // f a = e})).Cell) : + (posetCategorificationLabel f).map + ((categorification.map (nerveMap (posetLevelInclusion f e).monotone.functor)).map x) = + (intervalVertex e).val := by + have h := congrArg (fun F => F.map x) + (posetCategorificationLabel_natural (posetLevelInclusion f e) f) + apply h.trans + apply ThinCell.ext + · apply ULift.ext + exact (tableStart ((posetCategorificationTableMap {a // f a = e}).map x)).property + · apply ULift.ext + exact (tableFinish ((posetCategorificationTableMap {a // f a = e}).map x)).property + +noncomputable def posetCategorificationFiberMap (f : P →o Fin 2) (e : Fin 2) : + categorification.obj (nerve {a // f a = e}) ⟶ + ((posetCategorificationLabel f).fiber (intervalVertex e)).category := + ((posetCategorificationLabel f).fiber (intervalVertex e)).lift + (categorification.map (nerveMap (posetLevelInclusion f e).monotone.functor)) + (posetCategorification_level_mem f e) + +lemma posetCategorificationFiberMap_inclusion (f : P →o Fin 2) (e : Fin 2) : + posetCategorificationFiberMap f e ≫ + ((posetCategorificationLabel f).fiber (intervalVertex e)).inclusion = + categorification.map (nerveMap (posetLevelInclusion f e).monotone.functor) := rfl + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory OmegaCategory NormalizedChains NormalizedChains.PosetTables + +variable {P : Type u} [PartialOrder P] + +noncomputable def posetCategorificationTableOver (f : P →o Fin 2) : + Over.mk (posetCategorificationLabel f) ⟶ Over.mk (tableLabel f) := + Over.homMk (posetCategorificationTableMap P) rfl + +noncomputable def posetCategorificationTableFiberMap (f : P →o Fin 2) (e : Fin 2) : + ((posetCategorificationLabel f).fiber (intervalVertex e)).category ⟶ + ((tableLabel f).fiber (intervalVertex e)).category := + (fiberFunctor (intervalVertex e)).map (posetCategorificationTableOver f) + +lemma posetCategorificationFiberMap_table_fac (f : P →o Fin 2) (e : Fin 2) : + posetCategorificationFiberMap f e ≫ posetCategorificationTableFiberMap f e = + posetCategorificationTableMap {a // f a = e} ≫ (tableFiberSegmentIso f e).hom := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + exact congrArg (fun F => F.map x) + (posetCategorificationTableMap_natural (posetLevelInclusion f e)) + +theorem posetCategorificationFiberMap_finiteLinear_isIso (P : Type u) + [LinearOrder P] [Finite P] (f : P →o Fin 2) (e : Fin 2) : + IsIso (posetCategorificationFiberMap f e) := by + have hP := posetCategorificationTableMap_finiteLinear_isIso_all P + have hS := posetCategorificationTableMap_finiteLinear_isIso_all {a // f a = e} + have hForget : IsIso ((Over.forget interval).map (posetCategorificationTableOver f)) := hP + have hO : IsIso (posetCategorificationTableOver f) := + isIso_of_reflects_iso _ (Over.forget _) + have hF : IsIso (posetCategorificationTableFiberMap f e) := + CategoryTheory.Functor.map_isIso _ _ + have hT : IsIso (posetCategorificationTableMap {a // f a = e} ≫ + (tableFiberSegmentIso f e).hom) := IsIso.comp_isIso' hS (tableFiberSegmentIso f e).isIso_hom + exact IsIso.of_isIso_fac_right (posetCategorificationFiberMap_table_fac f e) + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory OmegaCategory NormalizedChains NormalizedChains.PosetTables + +variable {P : Type u} [PartialOrder P] + +noncomputable def posetCategorificationFiniteFiberMap (n : ℕ) (hn : 1 ≤ n) + (f : P →o Fin 2) (e : Fin 2) : + (categorificationFinite n).obj (nerve {a // f a = e}) ⟶ + (fiberFiniteFunctor n hn e).obj + ((truncationOverFunctor n hn).obj (Over.mk (posetCategorificationLabel f))) := + (truncationFunctor n).map (posetCategorificationFiberMap f e) ≫ + (truncationFiberIso n hn e).inv.app (Over.mk (posetCategorificationLabel f)) + +lemma posetCategorificationFiniteFiberMap_inclusion (n : ℕ) (hn : 1 ≤ n) + (f : P →o Fin 2) (e : Fin 2) : + posetCategorificationFiniteFiberMap n hn f e ≫ + fiberFiniteInclusion n hn e + ((truncationOverFunctor n hn).obj (Over.mk (posetCategorificationLabel f))) = + (categorificationFinite n).map + (nerveMap (posetLevelInclusion f e).monotone.functor) := by + have h := congrArg (fun F => (truncationFunctor n).map + (posetCategorificationFiberMap f e) ≫ F) + (truncationFiberIso_inv_inclusion n hn e (Over.mk (posetCategorificationLabel f))) + exact h.trans (((truncationFunctor n).map_comp _ _).symm.trans + (congrArg (truncationFunctor n).map (posetCategorificationFiberMap_inclusion f e))) + +theorem posetCategorificationFiniteFiberMap_finiteLinear_isIso (n : ℕ) (hn : 1 ≤ n) + (P : Type u) [LinearOrder P] [Finite P] (f : P →o Fin 2) (e : Fin 2) : + IsIso (posetCategorificationFiniteFiberMap n hn f e) := by + have := posetCategorificationFiberMap_finiteLinear_isIso P f e + unfold posetCategorificationFiniteFiberMap + exact IsIso.comp_isIso' + (CategoryTheory.Functor.map_isIso _ _) + ((truncationFiberIso n hn e).app (Over.mk (posetCategorificationLabel f))).isIso_inv + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory OmegaCategory NormalizedChains NormalizedChains.PosetTables + +variable {P Q : Type u} [PartialOrder P] [PartialOrder Q] + +def posetLevelMap (g : P →o Q) (f : Q →o Fin 2) (e : Fin 2) : + {a // (f.comp g) a = e} →o {b // f b = e} where + toFun a := ⟨g a.val, a.property⟩ + monotone' := fun _ _ h => g.monotone h + +lemma posetLevelMap_inclusion (g : P →o Q) (f : Q →o Fin 2) (e : Fin 2) : + (posetLevelInclusion f e).comp (posetLevelMap g f e) = + g.comp (posetLevelInclusion (f.comp g) e) := rfl + +noncomputable def posetCategorificationOverMap (g : P →o Q) (f : Q →o Fin 2) : + Over.mk (posetCategorificationLabel (f.comp g)) ⟶ + Over.mk (posetCategorificationLabel f) := + Over.homMk (categorification.map (nerveMap g.monotone.functor)) + (posetCategorificationLabel_natural g f) + +lemma posetCategorificationFiberMap_natural (g : P →o Q) (f : Q →o Fin 2) (e : Fin 2) : + categorification.map (nerveMap (posetLevelMap g f e).monotone.functor) ≫ + posetCategorificationFiberMap f e = + posetCategorificationFiberMap (f.comp g) e ≫ + (fiberFunctor (intervalVertex e)).map (posetCategorificationOverMap g f) := by + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + change ((categorification.map (nerveMap (posetLevelMap g f e).monotone.functor) ≫ + categorification.map (nerveMap (posetLevelInclusion f e).monotone.functor)).map x) = + ((categorification.map (nerveMap (posetLevelInclusion (f.comp g) e).monotone.functor) ≫ + categorification.map (nerveMap g.monotone.functor)).map x) + apply congrArg (fun (F : categorification.obj (nerve {a // (f.comp g) a = e}) ⟶ + categorification.obj (nerve Q)) => F.map x) + rw [← categorification.map_comp, ← categorification.map_comp] + apply congrArg categorification.map + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro s + apply nerve.ext_of_isThin + rfl + +lemma posetCategorificationFiniteFiberMap_natural (n : ℕ) (hn : 1 ≤ n) + (g : P →o Q) (f : Q →o Fin 2) (e : Fin 2) : + (categorificationFinite n).map (nerveMap (posetLevelMap g f e).monotone.functor) ≫ + posetCategorificationFiniteFiberMap n hn f e = + posetCategorificationFiniteFiberMap n hn (f.comp g) e ≫ + (fiberFiniteFunctor n hn e).map + ((truncationOverFunctor n hn).map (posetCategorificationOverMap g f)) := by + let T := truncationFunctor n + let a := categorification.map (nerveMap (posetLevelMap g f e).monotone.functor) + let b := posetCategorificationFiberMap f e + let c := posetCategorificationFiberMap (f.comp g) e + let d := (fiberFunctor (intervalVertex e)).map (posetCategorificationOverMap g f) + let i := (truncationFiberIso n hn e).inv.app (Over.mk (posetCategorificationLabel f)) + let j := (truncationFiberIso n hn e).inv.app + (Over.mk (posetCategorificationLabel (f.comp g))) + let k := (fiberFiniteFunctor n hn e).map + ((truncationOverFunctor n hn).map (posetCategorificationOverMap g f)) + have hab : a ≫ b = c ≫ d := posetCategorificationFiberMap_natural g f e + have h : T.map d ≫ i = j ≫ k := + (truncationFiberIso n hn e).inv.naturality (posetCategorificationOverMap g f) + change T.map a ≫ (T.map b ≫ i) = (T.map c ≫ j) ≫ k + calc + _ = (T.map a ≫ T.map b) ≫ i := (Category.assoc _ _ _).symm + _ = T.map (a ≫ b) ≫ i := congrArg (fun F => F ≫ i) (T.map_comp a b).symm + _ = T.map (c ≫ d) ≫ i := congrArg (fun F => T.map F ≫ i) hab + _ = (T.map c ≫ T.map d) ≫ i := congrArg (fun F => F ≫ i) (T.map_comp c d) + _ = T.map c ≫ (T.map d ≫ i) := Category.assoc _ _ _ + _ = T.map c ≫ (j ≫ k) := congrArg (fun F => T.map c ≫ F) h + _ = _ := (Category.assoc _ _ _).symm + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory OmegaCategory NormalizedChains NormalizedChains.PosetTables + +noncomputable def posetCategorificationFiberIsoFinite + (P : Type u) [LinearOrder P] [Finite P] (f : P →o Fin 2) (e : Fin 2) : + categorification.obj (nerve {a // f a = e}) ≅ + ((posetCategorificationLabel f).fiber (intervalVertex e)).category := by + have h : IsIso (posetCategorificationFiberMap f e) := + posetCategorificationFiberMap_finiteLinear_isIso P f e + exact asIso (posetCategorificationFiberMap f e) + +lemma posetCategorificationFiberIsoFinite_hom + (P : Type u) [LinearOrder P] [Finite P] (f : P →o Fin 2) (e : Fin 2) : + (posetCategorificationFiberIsoFinite P f e).hom = posetCategorificationFiberMap f e := rfl + +lemma posetCategorificationFiberMap_inverse_natural + {P Q : Type u} [LinearOrder P] [LinearOrder Q] [Finite P] [Finite Q] + (g : P →o Q) (f : Q →o Fin 2) (e : Fin 2) : + (fiberFunctor (intervalVertex e)).map (posetCategorificationOverMap g f) ≫ + (posetCategorificationFiberIsoFinite Q f e).inv = + (posetCategorificationFiberIsoFinite P (f.comp g) e).inv ≫ + categorification.map (nerveMap (posetLevelMap g f e).monotone.functor) := by + apply (Iso.eq_inv_comp (posetCategorificationFiberIsoFinite P (f.comp g) e)).mpr + exact (Category.assoc (posetCategorificationFiberIsoFinite P (f.comp g) e).hom + ((fiberFunctor (intervalVertex e)).map (posetCategorificationOverMap g f)) + (posetCategorificationFiberIsoFinite Q f e).inv).symm.trans + ((Iso.comp_inv_eq (posetCategorificationFiberIsoFinite Q f e)).mpr + (posetCategorificationFiberMap_natural g f e).symm) + +end Thomason + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FiberRecognition.lean b/lean/OAI/CategoryTheory/Thomason/FiberRecognition.lean new file mode 100644 index 0000000000000000000000000000000000000000..71962d1c9025f3c3f16d2361008a6a3a5eec3616 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FiberRecognition.lean @@ -0,0 +1,778 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SimplexBoxes + +namespace OAI + +/-! Fiber Recognition. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +theorem weak_box_injective (I : Type u) [Fintype I] [LinearOrder I] + (n : ℕ) (e : I ≃ Fin (n+1)) {K L : SSet.{u}} [SSet.KanComplex K] + (r : K ⟶ L) (hr : simplicialWeakEquivalences r) (x : K _⦋0⦌) + (a b : nerve (Finset I) ⟶ K) + (ha : (boxBoundary I).ι ≫ a = SSet.const x) + (hb : (boxBoundary I).ι ≫ b = SSet.const x) + (H : BasedHomotopy (boxBoundary I).ι (SSet.const (r.app _ x)) (a ≫ r) (b ≫ r)) : + BasedHomotopy (boxBoundary I).ι (SSet.const x) a b := by + let f := boxPairProjection I + let g := boxBoundaryProjection I + let j := nerveMap (inclusion (Cubical.boundaryFaces I)).toFunctor + have ha' : j ≫ f ≫ a = SSet.const x := by + rw [← Category.assoc,box_pair_square,Category.assoc,ha,SSet.comp_const] + have hb' : j ≫ f ≫ b = SSet.const x := by + rw [← Category.assoc,box_pair_square,Category.assoc,hb,SSet.comp_const] + have H' : BasedHomotopy j (SSet.const (r.app _ x)) ((f ≫ a) ≫ r) ((f ≫ b) ≫ r) := by + simpa only [SSet.comp_const,Category.assoc] using based_homotopy_pre + _ j f g (box_pair_square _) _ H + obtain ⟨G,hG⟩ := weak_cubical_injective (PartOrd.of (NonemptyFiniteChains (Finset I))) + (PartOrd.of (Cubical.boundaryFaces I)) (inclusion (Cubical.boundaryFaces I)) + Subtype.val_injective n (finiteBoxPair I n e) r hr x (f ≫ a) (f ≫ b) ha' hb' H' + exact pair_local_injective_plain _ j f g (box_pair_square _) + (boxPairProjection_local _) (boxBoundaryProjection_local _) _ a b ha hb G + (by simpa only [SSet.comp_const] using hG) + +theorem weak_box_surjective (I : Type u) [Fintype I] [LinearOrder I] + (n : ℕ) (e : I ≃ Fin (n+1)) {K L : SSet.{u}} [SSet.KanComplex K] [SSet.KanComplex L] + (r : K ⟶ L) (hr : simplicialWeakEquivalences r) (x : K _⦋0⦌) + (a : nerve (Finset I) ⟶ L) + (ha : (boxBoundary I).ι ≫ a = SSet.const (r.app _ x)) : + ∃ b : nerve (Finset I) ⟶ K, (boxBoundary I).ι ≫ b = SSet.const x ∧ + BasedHomotopy (boxBoundary I).ι (SSet.const (r.app _ x)) (b ≫ r) a := by + let f := boxPairProjection I + let g := boxBoundaryProjection I + let j := nerveMap (inclusion (Cubical.boundaryFaces I)).toFunctor + have ha' : j ≫ f ≫ a = SSet.const (r.app _ x) := by + rw [← Category.assoc,box_pair_square,Category.assoc,ha,SSet.comp_const] + obtain ⟨b',hb',H'⟩ := weak_cubical_surjective (PartOrd.of (NonemptyFiniteChains (Finset I))) + (Cubical.boundaryFaces I) n (finiteBoxPair I n e) r hr x (f ≫ a) ha' + obtain ⟨b,G,hb,hG⟩ := pair_local_surjective_plain (boxBoundary I).ι j f g + (box_pair_square _) (boxPairProjection_local _) (boxBoundaryProjection_local _) + (SSet.const x) b' (by simpa only [SSet.comp_const] using hb') + have HG : BasedHomotopy j (SSet.const (r.app _ x)) ((f ≫ b) ≫ r) (b' ≫ r) := by + simpa only [SSet.comp_const,SSet.const_comp] using + based_homotopy_post j (SSet.const x) ⟨G,by simpa only [SSet.comp_const] using hG⟩ r + obtain ⟨F,hF⟩ := based_homotopy_trans j (SSet.const (r.app _ x)) HG H' + let F' : SSet.Homotopy (f ≫ (b ≫ r)) (f ≫ a) := CoherentGluing.toHomotopy F.h + (by simpa only [Category.assoc] using F.h₀) F.h₁ + refine ⟨b,hb,pair_local_injective_plain _ j f g (box_pair_square _) + (boxPairProjection_local _) (boxBoundaryProjection_local _) + (SSet.const (r.app _ x)) (b ≫ r) a ?_ ha F' ?_⟩ + · rw [← Category.assoc,hb,SSet.const_comp] + · simpa only [F', CoherentGluing.toHomotopy, SSet.comp_const] using hF +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition + +lemma zero_face_horn_iff (n d : ℕ) (a : (Δ[n] : SSet.{u}) _⦋d⦌) : + (SSet.stdSimplex.δ (0 : Fin (n+2))).app _ a ∈ (SSet.horn (n+1) 0).obj _ ↔ + a ∈ (SSet.boundary n).obj _ := by + rw [SSet.mem_horn_iff_notMem_range, SSet.mem_boundary_iff_notMem_range] + constructor + · rintro ⟨j,hj,h⟩ + obtain ⟨k,rfl⟩ := Fin.exists_succ_eq.mpr hj + refine ⟨k,?_⟩ + rintro ⟨l,hl⟩ + apply h + refine ⟨l,?_⟩ + change (0 : Fin (n+2)).succAbove (a l) = k.succ + simpa using congrArg Fin.succ hl + · rintro ⟨k,hk⟩ + refine ⟨k.succ,Fin.succ_ne_zero _,?_⟩ + rintro ⟨l,hl⟩ + apply hk + refine ⟨l,?_⟩ + change (0 : Fin (n+2)).succAbove (a l) = k.succ at hl + simpa using hl + +def boundaryInHorn (n : ℕ) : (∂Δ[n] : SSet.{u}) ⟶ Λ[n+1,0] := + SSet.Subcomplex.lift ((SSet.boundary n).ι ≫ SSet.stdSimplex.δ 0) (by + intro d a ha + obtain ⟨x,rfl⟩ := ha + exact (zero_face_horn_iff n d.unop.len x.1).2 x.2) + +def hornInBoundary (n : ℕ) : (Λ[n+1,0] : SSet.{u}) ⟶ ∂Δ[n+1] := + SSet.Subcomplex.homOfLE (by + intro d a ha + obtain ⟨j,_,hj⟩ := (SSet.mem_horn_iff_notMem_range a 0).1 ha + exact (SSet.mem_boundary_iff_notMem_range a).2 ⟨j,hj⟩) + +@[reassoc] lemma boundaryInHorn_ι (n : ℕ) : + boundaryInHorn.{u} n ≫ (SSet.horn (n+1) 0).ι = + (SSet.boundary n).ι ≫ SSet.stdSimplex.δ 0 := rfl +@[reassoc] lemma hornInBoundary_ι (n : ℕ) : + hornInBoundary.{u} n ≫ (SSet.boundary (n+1)).ι = (SSet.horn (n+1) 0).ι := rfl +@[reassoc] lemma boundaryInHorn_square (n : ℕ) : + (SSet.boundary n).ι ≫ SSet.boundary.ι (0 : Fin (n+2)) = + boundaryInHorn.{u} n ≫ hornInBoundary n := rfl + +instance (n : ℕ) : Mono (hornInBoundary.{u} n) := by + exact mono_of_mono_fac (hornInBoundary_ι.{u} n) + +lemma boundary_horn_isPushout (n : ℕ) : + IsPushout (SSet.boundary n).ι (boundaryInHorn.{u} n) + (SSet.boundary.ι (0 : Fin (n+2))) (hornInBoundary n) where + w := boundaryInHorn_square n + isColimit' := ⟨evaluationJointlyReflectsColimits _ (fun d => + (PushoutCocone.isColimitMapCoconeEquiv _ _).2 (by + have hs : IsPushout ((SSet.boundary.{u} n).ι.app d) ((boundaryInHorn.{u} n).app d) + ((SSet.boundary.ι.{u} (0 : Fin (n+2))).app d) ((hornInBoundary.{u} n).app d) := by + apply Types.isPushout_of_isPullback_of_mono' + · rw [Types.isPullback_iff] + refine ⟨rfl,?_,?_⟩ + · intro x y h + exact Subtype.ext h.1 + · intro x y h + have h' : (SSet.stdSimplex.δ (0 : Fin (n+2))).app d x = y.1 := + congrArg Subtype.val h + have hx : x ∈ (SSet.boundary n).obj d := + (zero_face_horn_iff n d.unop.len x).1 (h' ▸ y.2) + exact ⟨⟨x,hx⟩,rfl,Subtype.ext h'⟩ + · apply Set.eq_univ_of_forall + intro z + by_cases hz : z.1 ∈ (SSet.horn (n+1) 0).obj d + · exact Or.inr ⟨⟨z.1,hz⟩,Subtype.ext rfl⟩ + · obtain ⟨j,hj⟩ := (SSet.mem_boundary_iff_notMem_range z.1).1 z.2 + have hj0 : j = 0 := by + by_contra h + exact hz ((SSet.mem_horn_iff_notMem_range _ _).2 ⟨j,h,hj⟩) + subst j + let x := SSet.stdSimplex.objEquiv.symm + (SimplexCategory.factor_δ (SSet.stdSimplex.objEquiv z.1) 0) + refine Or.inl ⟨x,Subtype.ext ?_⟩ + apply SSet.stdSimplex.objEquiv.injective + exact SimplexCategory.factor_δ_spec _ _ (fun k h => hj ⟨k,h⟩) + · intro x y _ _ h + exact (CategoryTheory.mono_iff_injective ((hornInBoundary.{u} n).app d)).1 + inferInstance h + exact hs.isColimit))⟩ +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal HornSubdivision KanPath Contiguity + +lemma simplex_homotopic_const {K : SSet.{u}} (n : ℕ) (a : Δ[n] ⟶ K) : + ∃ x : K _⦋0⦌, Homotopic a (SSet.const x) := by + let P := ULift.{u} (Fin (n+1)) + let q : P := ⟨0⟩ + let v : (nerve P) _⦋0⦌ := (Functor.const (Fin 1)).obj q + let e := SSet.stdSimplex.isoNerve.{u} n + have H : Homotopic (nerveMap (constantOrder P q).toFunctor) (𝟙 (nerve P)) := + homotopic_of_homotopy (orderHomotopy (constantOrder P q) OrderHom.id (fun x => Fin.zero_le x.down)) + have hc : nerveMap (constantOrder P q).toFunctor = SSet.const v := nerve_constant_vertex v + rw [hc] at H + have H' := homotopic_pre e.hom (homotopic_post H (e.inv ≫ a)) + refine ⟨(e.inv ≫ a).app _ v, homotopic_symm ?_⟩ + simpa only [SSet.const_comp,SSet.comp_const,Category.id_comp,← Category.assoc, + Iso.hom_inv_id,Category.id_comp, NatTrans.comp_app, types_comp_apply] using H' + +lemma straighten_boundary {K : SSet.{u}} [SSet.KanComplex K] + (n : ℕ) (a : (∂Δ[n+1] : SSet.{u}) ⟶ K) : + ∃ x : K _⦋0⦌, ∃ b : (∂Δ[n+1] : SSet.{u}) ⟶ K, + Homotopic a b ∧ hornInBoundary n ≫ b = SSet.const x := by + obtain ⟨g,hg⟩ := SSet.KanComplex.hornFilling (hornInBoundary n ≫ a) + obtain ⟨x,H⟩ := simplex_homotopic_const (n+1) g + have H' := homotopic_pre (SSet.horn (n+1) 0).ι H + rw [← hg,SSet.comp_const] at H' + obtain ⟨G⟩ := homotopy_of_homotopic H' + obtain ⟨b,Gb,hb,_⟩ := homotopy_extension (hornInBoundary n) a G + exact ⟨x,b,homotopic_of_homotopy Gb,hb⟩ + +lemma nullhomotopy_boundary_of_face {K : SSet.{u}} + (n : ℕ) (x : K _⦋0⦌) (b : (∂Δ[n+1] : SSet.{u}) ⟶ K) + (hb : hornInBoundary n ≫ b = SSet.const x) + (H : BasedHomotopy (SSet.boundary n).ι (SSet.const x) + (SSet.boundary.ι (0 : Fin (n+2)) ≫ b) (SSet.const x)) : + Nonempty (SSet.Homotopy b (SSet.const x)) := by + obtain ⟨H,hH⟩ := H + let sq := boundary_horn_isPushout.{u} n + have w : (SSet.boundary n).ι ≫ curryR H.h = + boundaryInHorn n ≫ curryR (SSet.const x) := by + apply uncurryR_injective + simp only [uncurryR_pre,uncurryR_curryR,hH,SSet.comp_const] + let g := sq.desc (curryR H.h) (curryR (SSet.const x)) w + have h₀ : g ≫ eval₀ K = b := by + apply sq.hom_ext + · rw [← Category.assoc,sq.inl_desc,comp_eval₀,uncurryR_curryR,H.h₀] + · rw [← Category.assoc,sq.inr_desc,comp_eval₀,uncurryR_curryR,SSet.comp_const,hb] + have h₁ : g ≫ eval₁ K = SSet.const x := by + apply sq.hom_ext + · rw [← Category.assoc,sq.inl_desc,comp_eval₁,uncurryR_curryR,H.h₁,SSet.comp_const] + · rw [← Category.assoc,sq.inr_desc,comp_eval₁,uncurryR_curryR,SSet.comp_const,SSet.comp_const] + exact ⟨CoherentGluing.toHomotopy (uncurryR g) + (by rw [← comp_eval₀,h₀]) (by rw [← comp_eval₁,h₁])⟩ +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal HornSubdivision KanPath Contiguity + +theorem terminal_rlp_of_nullsimplices {K : SSet.{u}} [SSet.KanComplex K] + (x₀ : K _⦋0⦌) + (h : ∀ (n : ℕ) (x : K _⦋0⦌) (a : Δ[n] ⟶ K), + (SSet.boundary n).ι ≫ a = SSet.const x → + BasedHomotopy (SSet.boundary n).ι (SSet.const x) a (SSet.const x)) : + SSet.modelCategoryQuillen.I.rlp (terminal.from K) := by + rintro _ _ _ ⟨n⟩ + constructor + intro a b sq + cases n with + | zero => + exact ⟨⟨{ l := SSet.const x₀, fac_left := SSet.boundary.hom_ext₀, fac_right := Subsingleton.elim _ _ }⟩⟩ + | succ n => + obtain ⟨x,c,Hac,hc⟩ := straighten_boundary n a + have he : (SSet.boundary n).ι ≫ (SSet.boundary.ι (0 : Fin (n+2)) ≫ c) = + SSet.const x := by + rw [← Category.assoc,boundaryInHorn_square,Category.assoc,hc,SSet.comp_const] + obtain ⟨H⟩ := nullhomotopy_boundary_of_face n x c hc (h n x _ he) + have H' := homotopic_symm (homotopic_trans Hac (homotopic_of_homotopy H)) + obtain ⟨G⟩ := homotopy_of_homotopic H' + have G' : SSet.Homotopy ((SSet.boundary (n+1)).ι ≫ SSet.const x) a := by + simpa only [SSet.comp_const] using G + obtain ⟨l,_,hl,_⟩ := homotopy_extension (SSet.boundary (n+1)).ι (SSet.const x) G' + exact ⟨⟨{ l := l, fac_left := hl, fac_right := Subsingleton.elim _ _ }⟩⟩ + +lemma based_homotopy_zero {K : SSet.{u}} {a b : Δ[0] ⟶ K} + (x : K _⦋0⦌) (H : SSet.Homotopy a b) : + BasedHomotopy (SSet.boundary 0).ι (SSet.const x) a b := by + refine ⟨H,?_⟩ + ext n ⟨⟨t,ht⟩,s⟩ + simp at ht + +theorem weak_terminal_rlp {K : SSet.{u}} [SSet.KanComplex K] + (hw : simplicialWeakEquivalences (terminal.from K)) : + SSet.modelCategoryQuillen.I.rlp (terminal.from K) := by + let p := terminal.from K + let v : (⊤_ SSet.{u}) _⦋0⦌ := SSet.yonedaEquiv (terminal.from (Δ[0] : SSet.{u})) + obtain ⟨z,hz⟩ := (KanQuillen.map_components_bijective_of_weak p hw).2 (SSet.π₀.mk v) + obtain ⟨z,rfl⟩ := SSet.π₀.mk_surjective z + apply terminal_rlp_of_nullsimplices z + intro n x a ha + cases n with + | zero => + have hv : SSet.π₀.mk (SSet.yonedaEquiv a) = SSet.π₀.mk x := by + apply (KanQuillen.map_components_bijective_of_weak p hw).1 + apply congrArg SSet.π₀.mk + apply SSet.yonedaEquiv.symm.injective + subsingleton + obtain ⟨H⟩ := homotopy_of_homotopic (component_homotopic_const hv) + have H' : SSet.Homotopy a (SSet.const x) := by + simpa only [← SSet.yonedaEquiv_symm_zero,Equiv.symm_apply_apply] using H + exact based_homotopy_zero x H' + | succ n => + apply weak_simplex_injective n p hw x a (SSet.const x) ha (SSet.comp_const _ _) + have he : a ≫ p = SSet.const x ≫ p := Subsingleton.elim _ _ + rw [he] + exact based_homotopy_refl _ _ _ (by rw [← Category.assoc,SSet.comp_const,SSet.const_comp]) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity + +lemma correct_nullhomotopy_to_fiber {A B K L : SSet.{u}} + (i : B ⟶ A) [Mono i] (p : K ⟶ L) (hp : simplicialFibrations p) + (x : K _⦋0⦌) {a : A ⟶ K} + (H : SSet.Homotopy a (SSet.const x)) + (J : SSet.Homotopy (SSet.const (X := A) x) (SSet.const x)) + (hH : i ▷ Δ[1] ≫ H.h = SSet.const x) + (hJ : i ▷ Δ[1] ≫ J.h = SSet.const x) + (G : SSet.Homotopy (H.h ≫ p) (J.h ≫ p)) + (gi : i ▷ Δ[1] ▷ Δ[1] ≫ G.h = SSet.const (p.app _ x)) + (g₀ : (SSet.ι₀ : A ⟶ A ⊗ Δ[1]) ▷ Δ[1] ≫ G.h = SSet.const (p.app _ x)) + (g₁ : (SSet.ι₁ : A ⟶ A ⊗ Δ[1]) ▷ Δ[1] ≫ G.h = SSet.const (p.app _ x)) : + ∃ F : SSet.Homotopy a (SSet.const x), + i ▷ Δ[1] ≫ F.h = SSet.const x ∧ F.h ≫ p = SSet.const (p.app _ x) := by + let s := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i + (SSet.stdSimplex.δ (n := 0) (0 : Fin 2)) + have hs : SSet.anodyneExtensions s.ι := + SSet.anodyneExtensions_pushoutObjObjι s (SimplicialCylinder.delta_one_anodyne 0) + have htop {b : A ⟶ K} (T : SSet.Homotopy b (SSet.const x)) + (hT : i ▷ Δ[1] ≫ T.h = SSet.const x) : s.ι ≫ T.h = SSet.const x := by + apply s.isPushout.hom_ext + · rw [← Category.assoc,s.inl_ι,SSet.comp_const] + apply (cancel_epi (SimplicialCylinder.zeroFactorIso A).hom).mp + change endpoint A 0 ≫ T.h = _ + rw [endpoint_one,T.h₁,SSet.comp_const] + · rw [← Category.assoc,s.inr_ι] + change i ▷ Δ[1] ≫ T.h = _ + rw [hT,SSet.comp_const] + have hside : s.ι ▷ Δ[1] ≫ G.h = SSet.const (p.app _ x) := by + apply (s.isPushout.map (tensorRight (Δ[1] : SSet.{u}))).hom_ext + · change s.inl ▷ Δ[1] ≫ s.ι ▷ Δ[1] ≫ G.h = _ + rw [← comp_whiskerRight_assoc,s.inl_ι] + apply (cancel_epi ((SimplicialCylinder.zeroFactorIso A).hom ▷ Δ[1])).mp + rw [← comp_whiskerRight_assoc] + change (endpoint A 0) ▷ Δ[1] ≫ G.h = _ + rw [endpoint_one,g₁,SSet.comp_const,SSet.comp_const] + · change s.inr ▷ Δ[1] ≫ s.ι ▷ Δ[1] ≫ G.h = _ + rw [← comp_whiskerRight_assoc,s.inr_ι] + change i ▷ Δ[1] ▷ Δ[1] ≫ G.h = _ + rw [gi,SSet.comp_const] + obtain ⟨Q,hQ,hQ₀,hQ₁,hQp⟩ := cylinder_lift_ends s.ι hs p hp H.h J.h (SSet.const x) G.h + (by rw [htop H hH,SSet.comp_const]) + (by rw [htop J hJ,SSet.comp_const]) G.h₀.symm G.h₁.symm + (by rw [SSet.const_comp,hside]) + let F : SSet.Homotopy a (SSet.const x) := CoherentGluing.toHomotopy + ((SSet.ι₀ : A ⟶ A ⊗ Δ[1]) ▷ Δ[1] ≫ Q) + (by rw [SSet.ι₀_comp_assoc,hQ₀,H.h₀]) + (by rw [SSet.ι₁_comp_assoc,hQ₁,J.h₀]) + have hQi : i ▷ Δ[1] ▷ Δ[1] ≫ Q = SSet.const x := by + have hi : s.inr ≫ s.ι = i ▷ Δ[1] := s.inr_ι + rw [← hi,comp_whiskerRight_assoc,hQ,SSet.comp_const] + refine ⟨F,?_,?_⟩ + · change i ▷ Δ[1] ≫ (SSet.ι₀ : A ⟶ A ⊗ Δ[1]) ▷ Δ[1] ≫ Q = _ + rw [← comp_whiskerRight_assoc,← SSet.ι₀_comp,comp_whiskerRight_assoc,hQi,SSet.comp_const] + · change ((SSet.ι₀ : A ⟶ A ⊗ Δ[1]) ▷ Δ[1] ≫ Q) ≫ p = _ + rw [Category.assoc,hQp,g₀] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity + +lemma correct_box_nullhomotopy (I : Type u) [Fintype I] [LinearOrder I] + {K L : SSet.{u}} [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (x : K _⦋0⦌) {a : nerve (Finset I) ⟶ K} + (ha : a ≫ p = SSet.const (p.app _ x)) + (H : SSet.Homotopy a (SSet.const x)) + (hH : (boxBoundary I).ι ▷ Δ[1] ≫ H.h = SSet.const x) : + ∃ F : SSet.Homotopy a (SSet.const x), + (boxBoundary I).ι ▷ Δ[1] ≫ F.h = SSet.const x ∧ + F.h ≫ p = SSet.const (p.app _ x) := by + let : LinearOrder (Option I) := LinearOrder.lift' (Fintype.equivFin (Option I)) + (Fintype.equivFin (Option I)).injective + have hb : (boxBoundary (Option I)).ι ≫ boxToPrism I ≫ H.h ≫ p = SSet.const (p.app _ x) := + boxPrism_boundary_const I (p.app _ x) (H.h ≫ p) + (by rw [← Category.assoc,hH,SSet.const_comp]) + (by rw [← Category.assoc,H.h₀,ha]) + (by rw [← Category.assoc,H.h₁,SSet.const_comp]) + obtain ⟨b,hb,Gb⟩ := weak_box_surjective (Option I) (Fintype.card I) + (Fintype.equivFinOfCardEq (by simp)) p hw x (boxToPrism I ≫ H.h ≫ p) hb + have hm : (prismToBox I ≫ b) ≫ p = prismToBox I ≫ (b ≫ p) := Category.assoc _ _ _ + have hj₀ : SSet.ι₀ ≫ prismToBox I ≫ b = SSet.const x := by + rw [← Category.assoc,← prismBoxEnd_zero_comp,Category.assoc,hb,SSet.comp_const] + have hj₁ : SSet.ι₁ ≫ prismToBox I ≫ b = SSet.const x := by + rw [← Category.assoc,← prismBoxEnd_one_comp,Category.assoc,hb,SSet.comp_const] + let J : SSet.Homotopy (SSet.const (X := nerve (Finset I)) x) (SSet.const x) := + CoherentGluing.toHomotopy (prismToBox I ≫ b) hj₀ hj₁ + have hj : (boxBoundary I).ι ▷ Δ[1] ≫ J.h = SSet.const x := by + change (boxBoundary I).ι ▷ Δ[1] ≫ prismToBox I ≫ b = _ + rw [← Category.assoc,← prismBoxSide_comp,Category.assoc,hb,SSet.comp_const] + obtain ⟨G,hG⟩ := based_homotopy_symm (boxBoundary (Option I)).ι (SSet.const (p.app _ x)) Gb + let G' : SSet.Homotopy (H.h ≫ p) (J.h ≫ p) := CoherentGluing.toHomotopy + (prismToBox I ▷ Δ[1] ≫ G.h) + (by rw [SSet.ι₀_comp_assoc,G.h₀,← Category.assoc]; + change ((boxPrismIso I).inv ≫ (boxPrismIso I).hom) ≫ _ = _; + rw [Iso.inv_hom_id,Category.id_comp]) + (by rw [SSet.ι₁_comp_assoc,G.h₁]; rfl) + have hg : (boxBoundary (Option I)).ι ▷ Δ[1] ≫ G.h = SSet.const (p.app _ x) := by + simpa only [SSet.comp_const] using hG + apply correct_nullhomotopy_to_fiber (boxBoundary I).ι p hp x H J hH hj G' + · change (boxBoundary I).ι ▷ Δ[1] ▷ Δ[1] ≫ prismToBox I ▷ Δ[1] ≫ G.h = _ + rw [← comp_whiskerRight_assoc,← prismBoxSide_comp,comp_whiskerRight_assoc,hg,SSet.comp_const] + · change SSet.ι₀ ▷ Δ[1] ≫ prismToBox I ▷ Δ[1] ≫ G.h = _ + rw [← comp_whiskerRight_assoc,← prismBoxEnd_zero_comp,comp_whiskerRight_assoc,hg,SSet.comp_const] + · change SSet.ι₁ ▷ Δ[1] ≫ prismToBox I ▷ Δ[1] ≫ G.h = _ + rw [← comp_whiskerRight_assoc,← prismBoxEnd_one_comp,comp_whiskerRight_assoc,hg,SSet.comp_const] + +lemma weak_fibration_box_nullhomotopy (I : Type u) [Fintype I] [LinearOrder I] + (n : ℕ) (e : I ≃ Fin (n+1)) {K L : SSet.{u}} [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (x : K _⦋0⦌) (a : nerve (Finset I) ⟶ K) + (hab : (boxBoundary I).ι ≫ a = SSet.const x) + (ha : a ≫ p = SSet.const (p.app _ x)) : + ∃ F : SSet.Homotopy a (SSet.const x), + (boxBoundary I).ι ▷ Δ[1] ≫ F.h = SSet.const x ∧ + F.h ≫ p = SSet.const (p.app _ x) := by + have H : BasedHomotopy (boxBoundary I).ι (SSet.const (p.app _ x)) + (a ≫ p) (SSet.const x ≫ p) := by + rw [ha,SSet.const_comp] + exact based_homotopy_refl _ _ _ (SSet.comp_const _ _) + obtain ⟨H,hH⟩ := weak_box_injective I n e p hw x a (SSet.const x) hab (SSet.comp_const _ _) H + exact correct_box_nullhomotopy I p hp hw x ha H (by simpa only [SSet.comp_const] using hH) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open SSet.modelCategoryQuillen +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity + +def strictFiber {K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) : K.Subcomplex where + obj n := {s | p.app n s = L.map (n.unop.const _ 0).op y} + map {n m} θ s hs := by + change p.app m (K.map θ s) = _ + rw [← CategoryTheory.comp_apply,p.naturality,CategoryTheory.comp_apply,hs, + ← CategoryTheory.comp_apply,← L.map_comp] + rfl + +lemma strictFiber_ι_comp {K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) : + (strictFiber p y).ι ≫ p = SSet.const y := by + ext n s + exact s.property + +def strictFiberLift {A K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) + (a : A ⟶ K) (ha : a ≫ p = SSet.const y) : A ⟶ (strictFiber p y : SSet) where + app n := TypeCat.ofHom fun s => ⟨a.app n s,by + change p.app n (a.app n s) = _ + exact congrArg (fun f : A ⟶ L => f.app n s) ha⟩ + naturality n m θ := by + ext s + apply Subtype.ext + exact congrArg (fun f => f s) (a.naturality θ) + +lemma strictFiberLift_ι {A K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) + (a : A ⟶ K) (ha : a ≫ p = SSet.const y) : + strictFiberLift p y a ha ≫ (strictFiber p y).ι = a := rfl + +lemma strictFiber_kan {K L : SSet.{u}} (p : K ⟶ L) (hp : simplicialFibrations p) + (y : L _⦋0⦌) : SSet.KanComplex (strictFiber p y : SSet) := by + apply (HomotopicalAlgebra.isFibrant_iff _).mpr + apply (SSet.modelCategoryQuillen.fibration_iff _).mpr + intro A B i hi + constructor + intro a b sq + have := hp i hi + let q : CommSq (a ≫ (strictFiber p y).ι) i p (SSet.const y) := + ⟨by rw [Category.assoc,strictFiber_ι_comp,SSet.comp_const,SSet.comp_const]⟩ + refine ⟨⟨{ + l := strictFiberLift p y q.lift q.fac_right + fac_left := ?_ + fac_right := Subsingleton.elim _ _ }⟩⟩ + apply (cancel_mono (strictFiber p y).ι).mp + rw [Category.assoc,strictFiberLift_ι,q.fac_left] + +lemma strictFiber_homotopy {A K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) + {a b : A ⟶ (strictFiber p y : SSet)} + (H : SSet.Homotopy (a ≫ (strictFiber p y).ι) (b ≫ (strictFiber p y).ι)) + (hH : H.h ≫ p = SSet.const y) : Nonempty (SSet.Homotopy a b) := by + refine ⟨CoherentGluing.toHomotopy (strictFiberLift p y H.h hH) ?_ ?_⟩ + · apply (cancel_mono (strictFiber p y).ι).mp + rw [Category.assoc,strictFiberLift_ι,H.h₀] + · apply (cancel_mono (strictFiber p y).ι).mp + rw [Category.assoc,strictFiberLift_ι,H.h₁] +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity PolyPoint + +lemma weak_fibration_vertex_homotopy {K L : SSet.{u}} + [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (x z : K _⦋0⦌) (hz : p.app _ z = p.app _ x) : + ∃ F : SSet.Homotopy (SSet.const (X := Δ[0]) z) (SSet.const x), + F.h ≫ p = SSet.const (p.app _ x) := by + have hc : SSet.π₀.mk z = SSet.π₀.mk x := by + apply (KanQuillen.map_components_bijective_of_weak p hw).1 + exact congrArg SSet.π₀.mk hz + obtain ⟨H⟩ := homotopy_of_homotopic (component_homotopic_const hc) + let I := ULift.{u} (Fin 0) + let A := nerve (Finset I) + let q : A ⟶ (Δ[0] : SSet.{u}) := SSet.const (SSet.stdSimplex.obj₀Equiv.symm 0) + let H' : SSet.Homotopy (SSet.const (X := A) z) (SSet.const x) := + homotopy_pre q H + have hH : (boxBoundary I).ι ▷ Δ[1] ≫ H'.h = SSet.const x := by + ext n st + obtain ⟨i,hi⟩ := st.1.property + exact Fin.elim0 i.down + obtain ⟨F,hF,hFp⟩ := correct_box_nullhomotopy I p hp hw x + (by rw [SSet.const_comp,hz]) H' hH + let v : A _⦋0⦌ := (⟨fun _ : Fin 1 => (∅ : Finset I), fun _ _ _ => le_rfl⟩ : Fin 1 →o Finset I).toFunctor + let j : (Δ[0] : SSet.{u}) ⟶ A := SSet.const v + refine ⟨homotopy_pre j F,?_⟩ + change (j ▷ Δ[1] ≫ F.h) ≫ p = _ + rw [Category.assoc,hFp,SSet.comp_const] + +lemma strictFiber_vertex_iff {K L : SSet.{u}} (p : K ⟶ L) (y : L _⦋0⦌) + (x : K _⦋0⦌) : x ∈ (strictFiber p y).obj (op ⦋0⦌) ↔ p.app _ x = y := by + have e : (⦋0⦌.const ⦋0⦌ 0) = 𝟙 _ := by + ext i + simp + change (p.app _ x = L.map _ y) ↔ _ + rw [e] + change (p.app _ x = L.map (𝟙 _) y) ↔ _ + rw [L.map_id] + rfl + +lemma strictFiber_vertex_homotopy {K L : SSet.{u}} + [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (y : L _⦋0⦌) (x z : (strictFiber p y : SSet) _⦋0⦌) : + Nonempty (SSet.Homotopy (SSet.const (X := Δ[0]) z) (SSet.const x)) := by + have hx : p.app _ x.val = y := (strictFiber_vertex_iff p y x.val).mp x.property + have hz : p.app _ z.val = y := (strictFiber_vertex_iff p y z.val).mp z.property + obtain ⟨H,hH⟩ := weak_fibration_vertex_homotopy p hp hw x.val z.val (hz.trans hx.symm) + let H' : SSet.Homotopy (SSet.const (X := Δ[0]) z ≫ (strictFiber p y).ι) + (SSet.const x ≫ (strictFiber p y).ι) := + CoherentGluing.toHomotopy H.h (by rw [SSet.const_comp]; exact H.h₀) + (by rw [SSet.const_comp]; exact H.h₁) + exact strictFiber_homotopy p y H' (by simpa only [H',CoherentGluing.toHomotopy,hx] using hH) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory +open scoped Topology Topology.Homotopy + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal Subdivision Contiguity PolyPoint Mesh Approximation + +lemma cubical_null_of_group_subsingleton (P B : PartOrd.{u}) [Finite P] [Finite B] + (i : B →o P) (hi : Function.Injective i) (n : ℕ) (c : CubicalPair P B i n) + {K : SSet.{u}} [SSet.KanComplex K] (x : K _⦋0⦌) + [Subsingleton (HomotopyGroup (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x))] + (a : nerve P ⟶ K) (ha : nerveMap i.toFunctor ≫ a = SSet.const x) : + BasedHomotopy (nerveMap i.toFunctor) (SSet.const x) a (SSet.const x) := by + let loop (a : nerve P ⟶ K) (ha : nerveMap i.toFunctor ≫ a = SSet.const x) : + GenLoop (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x) := + ⟨(polyRealize a).comp ⟨c.home.symm,c.home.symm.continuous⟩,by + intro y hy + exact poly_realize_boundary i x a ha _ ((c.boundary _).mpr (by simpa using hy))⟩ + have he : (⟦loop a ha⟧ : HomotopyGroup (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x)) = + ⟦loop (SSet.const x) (SSet.comp_const _ _)⟧ := + @Subsingleton.elim (HomotopyGroup (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x)) + inferInstance _ _ + obtain ⟨G⟩ : GenLoop.Homotopic (loop a ha) (loop (SSet.const x) (SSet.comp_const _ _)) := + Quotient.exact he + have H := top_homotopy_rel_pre G ⟨c.home,c.home.continuous⟩ _ + (fun y hy => (c.boundary y).mp hy) + have H' : (polyRealize a).HomotopyRel (polyRealize (SSet.const x)) + (Set.range (map i (preservesChains_monotone i))) := + H.cast (by ext y; simp [loop]) (by ext y; simp [loop]) + exact finite_cubical_realization_faithful P B i hi n c x a (SSet.const x) + ha (SSet.comp_const _ _) H' + +lemma cube_classes_subsingleton_of_boxes {K : SSet.{u}} [SSet.KanComplex K] + (n : ℕ) (x : K _⦋0⦌) + (h : ∀ a : nerve (Finset (ULift.{u} (Fin (n+1)))) ⟶ K, + (boxBoundary (ULift.{u} (Fin (n+1)))).ι ≫ a = SSet.const x → + BasedHomotopy (boxBoundary (ULift.{u} (Fin (n+1)))).ι (SSet.const x) a (SSet.const x)) : + Subsingleton (CubeClasses n x) := by + let I := ULift.{u} (Fin (n+1)) + let f := boxPairProjection I + let g := boxBoundaryProjection I + let j := nerveMap (cubeBoundaryInclusion.{u} n).toFunctor + have hc (a : CubeMap n x) : BasedHomotopy j (SSet.const x) a.val (SSet.const x) := by + obtain ⟨b,G,hb,hG⟩ := pair_local_surjective_plain (boxBoundary I).ι j f g + (box_pair_square I) (boxPairProjection_local I) (boxBoundaryProjection_local I) + (SSet.const x) a.val (by simpa only [SSet.comp_const] using a.property) + have H := based_homotopy_pre (boxBoundary I).ι j f g (box_pair_square I) (SSet.const x) (h b hb) + have H' : BasedHomotopy j (SSet.const x) (f ≫ b) (SSet.const x) := by + simpa only [SSet.comp_const] using H + exact based_homotopy_trans j (SSet.const x) + (based_homotopy_symm j (SSet.const x) ⟨G,by simpa only [SSet.comp_const] using hG⟩) H' + constructor + intro a b + obtain ⟨a,rfl⟩ := Quotient.mk_surjective a + obtain ⟨b,rfl⟩ := Quotient.mk_surjective b + exact Quotient.sound (based_homotopy_trans j (SSet.const x) (hc a) + (based_homotopy_symm j (SSet.const x) (hc b))) + +theorem terminal_rlp_of_nullboxes {K : SSet.{u}} [SSet.KanComplex K] + (x₀ : K _⦋0⦌) + (h₀ : ∀ x y : K _⦋0⦌, Nonempty (SSet.Homotopy (SSet.const (X := Δ[0]) x) (SSet.const y))) + (h : ∀ (n : ℕ) (x : K _⦋0⦌) (a : nerve (Finset (ULift.{u} (Fin (n+1)))) ⟶ K), + (boxBoundary (ULift.{u} (Fin (n+1)))).ι ≫ a = SSet.const x → + BasedHomotopy (boxBoundary (ULift.{u} (Fin (n+1)))).ι (SSet.const x) a (SSet.const x)) : + SSet.modelCategoryQuillen.I.rlp (terminal.from K) := by + apply terminal_rlp_of_nullsimplices x₀ + intro n x a ha + cases n with + | zero => + obtain ⟨H⟩ := h₀ (SSet.yonedaEquiv a) x + have H' : SSet.Homotopy a (SSet.const x) := by + simpa only [← SSet.yonedaEquiv_symm_zero,Equiv.symm_apply_apply] using H + exact based_homotopy_zero x H' + | succ n => + let := cube_classes_subsingleton_of_boxes n x (h n x) + let : Subsingleton (HomotopyGroup (Fin (n+1)) (SSet.toTop.obj K) (KanQuillen.realVertex x)) := + Function.Surjective.subsingleton (positive_realization_comparison n x).2 + let f := simplexPairProjection.{u} (n+1) + let g := simplexBoundaryProjection.{u} (n+1) + let j := nerveMap (inclusion (simplexBoundary.{u} (n+1))).toFunctor + have ha' : j ≫ f ≫ a = SSet.const x := by + rw [← Category.assoc,simplex_pair_square,Category.assoc,ha,SSet.comp_const] + obtain ⟨G,hG⟩ := cubical_null_of_group_subsingleton (simplexPoset (n+1)) + (PartOrd.of (simplexBoundary (n+1))) (inclusion (simplexBoundary (n+1))) + Subtype.val_injective n (simplexCubicalPair n) x (f ≫ a) ha' + let G' : SSet.Homotopy (f ≫ a) (f ≫ SSet.const x) := + CoherentGluing.toHomotopy G.h G.h₀ (by simpa only [SSet.comp_const] using G.h₁) + exact pair_local_injective_plain _ j f g (simplex_pair_square _) + (simplexPairProjection_local _) (simplexBoundaryProjection_local _) _ a (SSet.const x) + ha (SSet.comp_const _ _) G' (by simpa only [G',CoherentGluing.toHomotopy,SSet.comp_const] using hG) +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity + +lemma strictFiber_based_box_null {K L : SSet.{u}} + [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (y : L _⦋0⦌) (n : ℕ) (x : (strictFiber p y : SSet) _⦋0⦌) + (a : nerve (Finset (ULift.{u} (Fin (n+1)))) ⟶ (strictFiber p y : SSet)) + (ha : (boxBoundary (ULift.{u} (Fin (n+1)))).ι ≫ a = SSet.const x) : + BasedHomotopy (boxBoundary (ULift.{u} (Fin (n+1)))).ι (SSet.const x) a (SSet.const x) := by + have hx : p.app _ x.val = y := (strictFiber_vertex_iff p y x.val).mp x.property + obtain ⟨H,hH,hHp⟩ := weak_fibration_box_nullhomotopy (ULift.{u} (Fin (n+1))) + n Equiv.ulift p hp hw x.val (a ≫ (strictFiber p y).ι) + (by rw [← Category.assoc,ha,SSet.const_comp]; rfl) + (by rw [Category.assoc,strictFiber_ι_comp,SSet.comp_const,hx]) + let H' : SSet.Homotopy a (SSet.const x) := CoherentGluing.toHomotopy + (strictFiberLift p y H.h (by simpa only [hx] using hHp)) + (by apply (cancel_mono (strictFiber p y).ι).mp + rw [Category.assoc,strictFiberLift_ι,H.h₀]) + (by apply (cancel_mono (strictFiber p y).ι).mp + rw [Category.assoc,strictFiberLift_ι,H.h₁,SSet.const_comp]; rfl) + refine ⟨H',?_⟩ + apply (cancel_mono (strictFiber p y).ι).mp + change (_ ≫ strictFiberLift p y H.h (by simpa only [hx] using hHp)) ≫ (strictFiber p y).ι = _ + rw [Category.assoc,strictFiberLift_ι,hH,SSet.comp_const,SSet.const_comp] + rfl + +theorem weak_kan_fibration_fiber_rlp {K L : SSet.{u}} + [SSet.KanComplex K] [SSet.KanComplex L] + (p : K ⟶ L) (hp : simplicialFibrations p) (hw : simplicialWeakEquivalences p) + (y : L _⦋0⦌) : SSet.modelCategoryQuillen.I.rlp (terminal.from (strictFiber p y : SSet)) := by + let := strictFiber_kan p hp y + obtain ⟨x,hx⟩ := KanQuillen.weak_fibration_surjective_vertices p hp hw y + have hx' : x ∈ (strictFiber p y).obj (op ⦋0⦌) := (strictFiber_vertex_iff p y x).mpr hx + apply terminal_rlp_of_nullboxes (K := (strictFiber p y : SSet)) ⟨x,hx'⟩ + · intro a b + exact strictFiber_vertex_homotopy p hp hw y b a + · intro n a b hb + exact strictFiber_based_box_null p hp hw y n a b hb +end Thomason.GeometricRecognition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Simplicial Opposite PartialOrder MonoidalCategory CartesianMonoidalCategory + +namespace Thomason.GeometricRecognition +open LastVertexProof KanHomotopy KanLocal KanPath HornSubdivision Contiguity + +private def simplexConeOrder {n m : ℕ} (s : Fin (m+1) →o Fin (n+1)) + (t : Fin (m+1) →o Fin 2) : Fin (m+1) →o Fin (n+1) where + toFun j := if t j = 0 then 0 else s j + monotone' := by + intro i j h + have ht := t.monotone h + dsimp only + split_ifs with hi hj hj + · exact le_rfl + · exact Fin.zero_le _ + · exact False.elim (hi (le_antisymm (hj ▸ ht) (Fin.zero_le _))) + · exact s.monotone h + +def simplexCone (n : ℕ) : (Δ[n] : SSet.{u}) ⊗ Δ[1] ⟶ Δ[n] where + app m := TypeCat.ofHom fun s => SSet.stdSimplex.objMk + (simplexConeOrder (SSet.stdSimplex.asOrderHom s.1) (SSet.stdSimplex.asOrderHom s.2)) + naturality m k θ := by + ext s + rfl + +lemma simplexCone_zero (n : ℕ) : + SSet.ι₀ ≫ simplexCone.{u} n = SSet.const (SSet.stdSimplex.obj₀Equiv.symm 0) := by + ext m s + apply SSet.stdSimplex.ext + intro j + rfl +lemma simplexCone_one (n : ℕ) : SSet.ι₁ ≫ simplexCone.{u} n = 𝟙 _ := by + ext m s + apply SSet.stdSimplex.ext + intro j + rfl + +theorem fibration_rlp_of_fibers {K L : SSet.{u}} (p : K ⟶ L) + (hp : simplicialFibrations p) + (hf : ∀ y : L _⦋0⦌, SSet.modelCategoryQuillen.I.rlp + (terminal.from (strictFiber p y : SSet))) : SSet.modelCategoryQuillen.I.rlp p := by + rintro _ _ _ ⟨n⟩ + constructor + intro a b sq + let i := (SSet.boundary n).ι + let C := simplexCone.{u} n ≫ b + let y := b.app _ (SSet.stdSimplex.obj₀Equiv.symm 0) + have hc₀ : SSet.ι₀ ≫ C = SSet.const y := by + rw [← Category.assoc,simplexCone_zero,SSet.const_comp] + have hc₁ : SSet.ι₁ ≫ C = b := by rw [← Category.assoc,simplexCone_one,Category.id_comp] + have : HasLiftingProperty (SSet.ι₁ (X := (SSet.boundary n : SSet))) p := + (SimplicialCylinder.endpoint_anodyne (SSet.boundary n : SSet)).2 p hp + let q : CommSq a SSet.ι₁ p (i ▷ Δ[1] ≫ C) := + ⟨by rw [SSet.ι₁_comp_assoc,hc₁]; exact sq.w⟩ + let a₀ := SSet.ι₀ ≫ q.lift + have ha₀ : a₀ ≫ p = SSet.const y := by + dsimp only [a₀] + rw [Category.assoc,q.fac_right,SSet.ι₀_comp_assoc,hc₀,SSet.comp_const] + let af := strictFiberLift p y a₀ ha₀ + have := hf y _ ⟨n⟩ + let r : CommSq af i (terminal.from (strictFiber p y : SSet)) (terminal.from _) := + ⟨Subsingleton.elim _ _⟩ + let l := r.lift ≫ (strictFiber p y).ι + have hl : i ≫ l = a₀ := by rw [← Category.assoc,r.fac_left,strictFiberLift_ι] + have hlp : l ≫ p = SSet.const y := by rw [Category.assoc,strictFiber_ι_comp,SSet.comp_const] + obtain ⟨Q,hQ,hQ₀,hQp⟩ := cylinder_lift i p hp 1 l q.lift C + (by rw [endpoint_zero,hl]) + (by rw [endpoint_zero,hc₀,hlp]) q.fac_right + refine ⟨⟨{l := SSet.ι₁ ≫ Q, fac_left := ?_,fac_right := ?_}⟩⟩ + · rw [← SSet.ι₁_comp_assoc,hQ,q.fac_left] + · rw [Category.assoc,hQp,hc₁] +end Thomason.GeometricRecognition + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FilteredColimits.lean b/lean/OAI/CategoryTheory/Thomason/FilteredColimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..96ebb24caa7184b983b9c70e3c5fdcc869975082 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FilteredColimits.lean @@ -0,0 +1,825 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SimplexAtoms + +namespace OAI + +/-! Filtered Colimits. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex + +variable {K : DirectedComplex.{u}} + +def verticalRow (x : Table K) : (p : ℕ) → Bool → K.cylinder.Chain p + | 0, b => if b then (0, x.row 0 b) else (x.row 0 b, 0) + | p+1, b => if Even (p+1) then + (if b then (0, x.row (p+1) b, x.row p b) + else (x.row (p+1) b, 0, x.row p b)) + else (if b then (x.row (p+1) b, 0, x.row p b) + else (0, x.row (p+1) b, x.row p b)) + +lemma verticalRow_boundary (x : Table K) (p : ℕ) (b : Bool) : + K.cylinder.d p (verticalRow x (p+1) b) = + verticalRow x p true - verticalRow x p false := by + cases p with + | zero => + cases b <;> simp [verticalRow, cylinder, cylinderDifferential, x.boundary] + | succ p => + by_cases hp : Even (p+1) + · have hp' : ¬Even (p+1+1) := by rw [Nat.even_add_one]; exact not_not_intro hp + have hs : (-1 : ℤ)^(p+1) = 1 := hp.neg_one_pow + cases b <;> + simp [verticalRow, hp, hp', cylinder, cylinderDifferential, hs, x.boundary] + · have hp' : Even (p+1+1) := by rw [Nat.even_add_one]; exact hp + have hs : (-1 : ℤ)^(p+1) = -1 := (Nat.not_even_iff_odd.mp hp).neg_one_pow + cases b + · simp [verticalRow, hp, hp', cylinder, cylinderDifferential, hs, x.boundary] + · simp [verticalRow, hp, hp', cylinder, cylinderDifferential, hs, x.boundary] + abel + +def verticalTable (x : Table K) : Table K.cylinder where + row := verticalRow x + positive p b := by + cases p with + | zero => cases b <;> exact ⟨by first | exact x.positive _ _ | exact (K.positive _).zero_mem, + by first | exact x.positive _ _ | exact (K.positive _).zero_mem⟩ + | succ p => + dsimp only [verticalRow] + split <;> cases b <;> exact ⟨by first | exact x.positive _ _ | exact (K.positive _).zero_mem, + ⟨by first | exact x.positive _ _ | exact (K.positive _).zero_mem, x.positive _ _⟩⟩ + boundary := verticalRow_boundary x + augmentation b := by + cases b <;> simp [verticalRow, cylinder, x.augmentation] + bounded := by + obtain ⟨n, hn⟩ := x.bounded + refine ⟨n+1, ?_⟩ + intro p hp b + cases p with + | zero => omega + | succ p => + have hnp : n < p := by omega + have hnp' : n < p+1 := by omega + simp [verticalRow, hn p hnp, hn (p+1) hnp'] + +lemma verticalTable_natural {L : DirectedComplex.{v}} (f : Hom K L) (x : Table K) : + f.cylinder.nu.map (verticalTable x) = verticalTable (f.nu.map x) := by + change f.cylinder.table (verticalTable x) = verticalTable (f.table x) + ext p b + cases p with + | zero => cases b <;> simp [verticalTable, verticalRow, Hom.table, + Hom.cylinder, Hom.cylinderMap] + | succ p => + by_cases hp : Even (p+1) <;> cases b <;> + simp [verticalTable, verticalRow, hp, Hom.table, + Hom.cylinder, Hom.cylinderMap] + +end Thomason.DirectedComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +open DirectedComplex + +variable {E : Type u} [LinearOrder E] [Finite E] + +instance finiteWord : Finite (Word E) := by + classical + apply Finite.of_injective (fun w : Word E => w.val.toFinset) + intro x y h + apply Subtype.ext + apply x.property.eq_of_mem_iff y.property + intro a + have he := Finset.ext_iff.mp h a + simpa using he + +lemma finite_positive_fillings (p : ℕ) (b : Chains E) : + {c : Chains E | c ∈ grade (p+2) ∧ Positive c ∧ boundary c = b}.Finite := by + classical + let S : Set (Chains E) := {c | c ∈ grade (p+2) ∧ Positive c ∧ boundary c = b} + let f : Chains E → Word E → ℕ := fun c w => (c w).toNat + have hi : Set.InjOn f S := by + intro c hc d hd h + ext w + have he := congrFun h w + have hcc := Int.toNat_of_nonneg (hc.2.1 w) + have hdd := Int.toNat_of_nonneg (hd.2.1 w) + dsimp only [f] at he + omega + have ha : IsAntichain (· ≤ ·) (f '' S) := by + rintro _ ⟨c, hc, rfl⟩ _ ⟨d, hd, rfl⟩ hne hle + have hone : Positive (d-c) := by + intro w + change 0 ≤ d w - c w + have hh := hle w + have hcc := Int.toNat_of_nonneg (hc.2.1 w) + have hdd := Int.toNat_of_nonneg (hd.2.1 w) + dsimp only [f] at hh + omega + have hz : d-c = 0 := positive_cycle_zero ((grade (p+2)).sub_mem hd.1 hc.1) + hone (by rw [map_sub, hd.2.2, hc.2.2, sub_self]) + exact hne (congrArg f (sub_eq_zero.mp hz).symm) + exact (WellQuasiOrderedLE.finite_of_isAntichain ha).of_finite_image hi + +def possibleRows : ℕ → Set (Chains E) + | 0 => Set.range (fun a : E => bracket [a]) + | p+1 => ⋃ s ∈ possibleRows p, ⋃ t ∈ possibleRows p, + {c | c ∈ grade (p+2) ∧ Positive c ∧ boundary c = t-s} + +lemma possibleRows_finite (p : ℕ) : (possibleRows (E := E) p).Finite := by + induction p with + | zero => exact Set.finite_range _ + | succ p ih => + exact ih.biUnion (fun s _ => ih.biUnion (fun t _ => finite_positive_fillings p (t-s))) + +omit [Finite E] in +lemma table_row_possible (x : Table (complex E)) (p : ℕ) (b : Bool) : + (x.row p b).val ∈ possibleRows p := by + induction p generalizing b with + | zero => + obtain ⟨a, ha⟩ := table_zero_row_vertex x b + exact ⟨a, ha.symm⟩ + | succ p ih => + simp only [possibleRows, Set.mem_iUnion, Set.mem_ofPred_eq] + refine ⟨(x.row p false).val, ih false, (x.row p true).val, ih true, + (x.row (p+1) b).property, x.positive (p+1) b, ?_⟩ + exact congrArg Subtype.val (x.boundary p b) + +omit [Finite E] in +lemma grade_eq_zero_of_card_lt [Fintype E] {k : ℕ} {c : Chains E} + (hc : c ∈ grade k) (hk : Fintype.card E < k) : c = 0 := by + ext w + change c w = 0 + by_contra hw + have he := (mem_grade_iff k c).mp hc w hw + have hb := w.property.nodup.length_le_card + omega + +instance finiteTables : Finite (Table (complex E)) := by + classical + let := Fintype.ofFinite E + let (p : Fin (Fintype.card E+1)) : Finite {c : Chains E // c ∈ possibleRows p.val} := + (possibleRows_finite p.val).to_subtype + let f : Table (complex E) → + ((p : Fin (Fintype.card E+1)) → Bool → {c : Chains E // c ∈ possibleRows p.val}) := + fun x p b => ⟨(x.row p.val b).val, table_row_possible x p.val b⟩ + apply Finite.of_injective f + intro x y h + ext p b + apply Subtype.ext + by_cases hp : p < Fintype.card E+1 + · exact congrArg (fun c : {c : Chains E // c ∈ possibleRows p} => c.val) + (congrFun (congrFun h ⟨p, hp⟩) b) + · have hn : Fintype.card E < p+1 := by omega + rw [grade_eq_zero_of_card_lt (x.row p b).property hn, + grade_eq_zero_of_card_lt (y.row p b).property hn] + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +instance orientalFiniteCells (m : ℕ) : Finite (Oriental m).Cell := + NormalizedChains.finiteTables + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.FilteredTypes + +open CategoryTheory Limits ConcreteCategory + +variable {J : Type u} [Category.{u} J] [IsFiltered J] (F : J ⥤ Type u) + +lemma finite_representatives {α : Type v} [Finite α] (x : α → colimit F) : + ∃ j, ∃ y : α → F.obj j, ∀ a, (colimit.ι F j) (y a) = x a := by + classical + let := Fintype.ofFinite α + choose j y hy using fun a => Types.jointly_surjective_of_isColimit (colimit.isColimit F) (x a) + obtain ⟨k, hk⟩ := IsFiltered.sup_objs_exists (Finset.univ.image j) + let f (a : α) : j a ⟶ k := Classical.choice (hk (Finset.mem_image.mpr ⟨a, by simp, rfl⟩)) + refine ⟨k, fun a => F.map (f a) (y a), ?_⟩ + intro a + calc + (colimit.ι F k) (F.map (f a) (y a)) = (colimit.ι F (j a)) (y a) := + congr_hom (colimit.w F (f a)) (y a) + _ = x a := hy a + +lemma finite_equalities {α : Type v} [Finite α] {i : J} (x y : α → F.obj i) + (h : ∀ a, (colimit.ι F i) (x a) = (colimit.ι F i) (y a)) : + ∃ (j : J) (f : i ⟶ j), ∀ a, F.map f (x a) = F.map f (y a) := by + classical + let := Fintype.ofFinite α + have aux (s : Finset α) : ∃ (j : J) (f : i ⟶ j), + ∀ a ∈ s, F.map f (x a) = F.map f (y a) := by + induction s using Finset.induction_on with + | empty => exact ⟨i, 𝟙 i, by simp⟩ + | @insert a s ha ih => + obtain ⟨j, f, hf⟩ := ih + have he : (colimit.ι F j) (F.map f (x a)) = (colimit.ι F j) (F.map f (y a)) := by + simpa only [← CategoryTheory.comp_apply, colimit.w] using h a + obtain ⟨k, g, hg⟩ := + (Types.FilteredColimit.isColimit_eq_iff' (colimit.isColimit F) _ _).mp he + refine ⟨k, f ≫ g, ?_⟩ + intro b hb + rcases Finset.mem_insert.mp hb with rfl | hb + · simpa only [F.map_comp, CategoryTheory.comp_apply] using hg + · simpa only [F.map_comp, CategoryTheory.comp_apply] using congrArg (F.map g) (hf b hb) + obtain ⟨j, f, hf⟩ := aux Finset.univ + exact ⟨j, f, fun a => hf a (by simp)⟩ + +lemma compare_finite {α : Type v} [Finite α] {i j : J} + (x : α → F.obj i) (y : α → F.obj j) + (h : ∀ a, (colimit.ι F i) (x a) = (colimit.ι F j) (y a)) : + ∃ (k : J) (f : i ⟶ k) (g : j ⟶ k), ∀ a, F.map f (x a) = F.map g (y a) := by + let k := IsFiltered.max i j + let f := IsFiltered.leftToMax i j + let g := IsFiltered.rightToMax i j + have he (a : α) : (colimit.ι F k) (F.map f (x a)) = + (colimit.ι F k) (F.map g (y a)) := by + calc + _ = (colimit.ι F i) (x a) := congr_hom (colimit.w F f) (x a) + _ = (colimit.ι F j) (y a) := h a + _ = _ := (congr_hom (colimit.w F g) (y a)).symm + obtain ⟨l, t, ht⟩ := finite_equalities F (fun a => F.map f (x a)) + (fun a => F.map g (y a)) he + exact ⟨l, f ≫ t, g ≫ t, fun a => by + simpa only [F.map_comp, CategoryTheory.comp_apply] using ht a⟩ + +end Thomason.FilteredTypes + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory Limits ConcreteCategory + +def cellFunctor : OmegaCategory.{u} ⥤ Type u where + obj C := C.Cell + map F := ↾F.map + +def cellSourceNat (n : ℕ) : cellFunctor.{u} ⟶ cellFunctor where + app C := ↾C.source n + naturality C D F := by + apply ConcreteCategory.hom_ext + intro x + exact (F.map_source n x).symm + +def cellTargetNat (n : ℕ) : cellFunctor.{u} ⟶ cellFunctor where + app C := ↾C.target n + naturality C D F := by + apply ConcreteCategory.hom_ext + intro x + exact (F.map_target n x).symm + +namespace FilteredColimit + +variable {J : Type u} [Category.{u} J] (F : J ⥤ OmegaCategory.{u}) + +abbrev CellDiagram := F ⋙ cellFunctor +abbrev Cell := colimit (CellDiagram F) +abbrev ι (j : J) : (F.obj j).Cell → Cell F := colimit.ι (CellDiagram F) j + +def source (n : ℕ) : Cell F → Cell F := + colimMap (CategoryTheory.Functor.whiskerLeft F (cellSourceNat n)) + +def target (n : ℕ) : Cell F → Cell F := + colimMap (CategoryTheory.Functor.whiskerLeft F (cellTargetNat n)) + +@[simp] lemma source_ι (n : ℕ) (j : J) (x : (F.obj j).Cell) : + source F n (ι F j x) = ι F j ((F.obj j).source n x) := + congr_hom (ι_colimMap (CategoryTheory.Functor.whiskerLeft F (cellSourceNat n)) j) x + +@[simp] lemma target_ι (n : ℕ) (j : J) (x : (F.obj j).Cell) : + target F n (ι F j x) = ι F j ((F.obj j).target n x) := + congr_hom (ι_colimMap (CategoryTheory.Functor.whiskerLeft F (cellTargetNat n)) j) x + +@[simp] lemma ι_map {i j : J} (f : i ⟶ j) (x : (F.obj i).Cell) : + ι F j ((F.map f).map x) = ι F i x := + congr_hom (colimit.w (CellDiagram F) f) x + +lemma exists_rep (x : Cell F) : ∃ j, ∃ y : (F.obj j).Cell, ι F j y = x := + Types.jointly_surjective_of_isColimit (colimit.isColimit (CellDiagram F)) x + +lemma source_source (i j : ℕ) (x : Cell F) : + source F i (source F j x) = source F (min i j) x := by + obtain ⟨k, y, rfl⟩ := exists_rep F x + simp only [source_ι, (F.obj k).source_source] + +lemma target_target (i j : ℕ) (x : Cell F) : + target F i (target F j x) = target F (min i j) x := by + obtain ⟨k, y, rfl⟩ := exists_rep F x + simp only [target_ι, (F.obj k).target_target] + +lemma source_target (i j : ℕ) (x : Cell F) : + source F i (target F j x) = if i < j then source F i x else target F j x := by + obtain ⟨k, y, rfl⟩ := exists_rep F x + by_cases h : i < j <;> simp only [source_ι, target_ι, (F.obj k).source_target, h, ite_true, ite_false] + +lemma target_source (i j : ℕ) (x : Cell F) : + target F i (source F j x) = if i < j then target F i x else source F j x := by + obtain ⟨k, y, rfl⟩ := exists_rep F x + by_cases h : i < j <;> simp only [source_ι, target_ι, (F.obj k).target_source, h, ite_true, ite_false] + +lemma finite_dimension (x : Cell F) : ∃ n, source F n x = x := by + obtain ⟨j, y, rfl⟩ := exists_rep F x + obtain ⟨n, hn⟩ := (F.obj j).finite_dimension y + exact ⟨n, by rw [source_ι, hn]⟩ + +variable [IsFiltered J] + +lemma lift_matches {α : Type v} {β : Type w} [Finite α] [Finite β] + (x : α → Cell F) (s t : β → α) (d : β → ℕ) + (h : ∀ b, target F (d b) (x (s b)) = source F (d b) (x (t b))) : + ∃ j, ∃ y : α → (F.obj j).Cell, + (∀ a, ι F j (y a) = x a) ∧ + (∀ b, (F.obj j).target (d b) (y (s b)) = (F.obj j).source (d b) (y (t b))) := by + obtain ⟨i, y, hy⟩ := Thomason.FilteredTypes.finite_representatives (CellDiagram F) x + change α → (F.obj i).Cell at y + change ∀ a, ι F i (y a) = x a at hy + have he b : ι F i ((F.obj i).target (d b) (y (s b))) = + ι F i ((F.obj i).source (d b) (y (t b))) := by + rw [← target_ι, ← source_ι, hy, hy] + exact h b + obtain ⟨j, f, hf⟩ := Thomason.FilteredTypes.finite_equalities (CellDiagram F) + (fun b => (F.obj i).target (d b) (y (s b))) + (fun b => (F.obj i).source (d b) (y (t b))) he + refine ⟨j, fun a => (F.map f).map (y a), ?_, ?_⟩ + · intro a + rw [ι_map, hy] + · intro b + rw [← (F.map f).map_target, ← (F.map f).map_source] + exact hf b + +lemma lift_pair (k : ℕ) (x y : Cell F) (h : target F k x = source F k y) : + ∃ j, ∃ a b : (F.obj j).Cell, ι F j a = x ∧ ι F j b = y ∧ + (F.obj j).target k a = (F.obj j).source k b := by + obtain ⟨j, z, hz, he⟩ := lift_matches F (fun b : Bool => if b then y else x) + (fun _ : Unit => false) (fun _ : Unit => true) (fun _ => k) (fun _ => h) + exact ⟨j, z false, z true, hz false, hz true, he ()⟩ + +structure PairWitness (k : ℕ) (x y : Cell F) where + stage : J + left : (F.obj stage).Cell + right : (F.obj stage).Cell + left_eq : ι F stage left = x + right_eq : ι F stage right = y + matching : (F.obj stage).target k left = (F.obj stage).source k right + +noncomputable def pairWitness (k : ℕ) (x y : Cell F) + (h : target F k x = source F k y) : PairWitness F k x y := by + have : Nonempty (PairWitness F k x y) := by + obtain ⟨j, a, b, ha, hb, hab⟩ := lift_pair F k x y h + exact ⟨⟨j, a, b, ha, hb, hab⟩⟩ + exact Classical.choice this + +noncomputable def comp (k : ℕ) (x y : Cell F) + (h : target F k x = source F k y) : Cell F := + let w := pairWitness F k x y h + ι F w.stage ((F.obj w.stage).comp k w.left w.right w.matching) + +lemma comp_ι (k : ℕ) (j : J) (a b : (F.obj j).Cell) + (h : (F.obj j).target k a = (F.obj j).source k b) + (h' : target F k (ι F j a) = source F k (ι F j b)) : + comp F k (ι F j a) (ι F j b) h' = ι F j ((F.obj j).comp k a b h) := by + let w := pairWitness F k (ι F j a) (ι F j b) h' + have he (e : Bool) : ι F w.stage (if e then w.right else w.left) = + ι F j (if e then b else a) := by + cases e + · exact w.left_eq + · exact w.right_eq + obtain ⟨l, f, g, hfg⟩ := Thomason.FilteredTypes.compare_finite (CellDiagram F) + (fun e : Bool => if e then w.right else w.left) + (fun e : Bool => if e then b else a) he + change ∀ e : Bool, (F.map f).map (if e then w.right else w.left) = + (F.map g).map (if e then b else a) at hfg + have hl := hfg false + have hr := hfg true + dsimp at hl hr + change ι F w.stage ((F.obj w.stage).comp k w.left w.right w.matching) = _ + calc + _ = ι F l ((F.map f).map ((F.obj w.stage).comp k w.left w.right w.matching)) := + (ι_map F f _).symm + _ = ι F l ((F.map g).map ((F.obj j).comp k a b h)) := by + rw [(F.map f).map_comp k _ _ _ ((F.map f).map_composable w.matching), + (F.map g).map_comp k _ _ _ ((F.map g).map_composable h)] + simp only [hl, hr] + _ = _ := ι_map F g _ + +lemma source_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell F) + (h : target F k x = source F k y) : + source F i (comp F k x y h) = source F i x := by + obtain ⟨j, a, b, rfl, rfl, hab⟩ := lift_pair F k x y h + rw [comp_ι F k j a b hab, source_ι, source_ι, (F.obj j).source_comp_le i k hik] + +lemma target_comp_le (i k : ℕ) (hik : i ≤ k) (x y : Cell F) + (h : target F k x = source F k y) : + target F i (comp F k x y h) = target F i y := by + obtain ⟨j, a, b, rfl, rfl, hab⟩ := lift_pair F k x y h + rw [comp_ι F k j a b hab, target_ι, target_ι, (F.obj j).target_comp_le i k hik] + +lemma source_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell F) + (h : target F k x = source F k y) + (hs : target F k (source F i x) = source F k (source F i y)) : + source F i (comp F k x y h) = comp F k (source F i x) (source F i y) hs := by + obtain ⟨j, a, b, rfl, rfl, hab⟩ := lift_pair F k x y h + simp only [source_ι] at hs ⊢ + rw [comp_ι F k j a b hab, source_ι, + (F.obj j).source_comp_gt i k hki a b hab ((F.obj j).source_composable hki hab), + comp_ι F k j _ _ ((F.obj j).source_composable hki hab)] + +lemma target_comp_gt (i k : ℕ) (hki : k < i) (x y : Cell F) + (h : target F k x = source F k y) + (ht : target F k (target F i x) = source F k (target F i y)) : + target F i (comp F k x y h) = comp F k (target F i x) (target F i y) ht := by + obtain ⟨j, a, b, rfl, rfl, hab⟩ := lift_pair F k x y h + simp only [target_ι] at ht ⊢ + rw [comp_ι F k j a b hab, target_ι, + (F.obj j).target_comp_gt i k hki a b hab ((F.obj j).target_composable hki hab), + comp_ι F k j _ _ ((F.obj j).target_composable hki hab)] + +lemma unit_left (k : ℕ) (x : Cell F) + (h : target F k (source F k x) = source F k x) : + comp F k (source F k x) x h = x := by + obtain ⟨j, a, rfl⟩ := exists_rep F x + simp only [source_ι] at h ⊢ + rw [comp_ι F k j _ _ ((F.obj j).target_source_self k a), (F.obj j).unit_left] + +lemma unit_right (k : ℕ) (x : Cell F) + (h : target F k x = source F k (target F k x)) : + comp F k x (target F k x) h = x := by + obtain ⟨j, a, rfl⟩ := exists_rep F x + simp only [target_ι] at h ⊢ + rw [comp_ι F k j _ _ ((F.obj j).source_target_self k a).symm, (F.obj j).unit_right] + +lemma assoc (k : ℕ) (x y z : Cell F) + (hxy : target F k x = source F k y) (hyz : target F k y = source F k z) + (hxy_z : target F k (comp F k x y hxy) = source F k z) + (hx_yz : target F k x = source F k (comp F k y z hyz)) : + comp F k (comp F k x y hxy) z hxy_z = comp F k x (comp F k y z hyz) hx_yz := by + obtain ⟨j, a, ha, he⟩ := lift_matches F ![x,y,z] + (fun e : Bool => if e then (1 : Fin 3) else 0) + (fun e : Bool => if e then (2 : Fin 3) else 1) (fun _ => k) + (by intro e; cases e <;> assumption) + have h0 : ι F j (a 0) = x := ha 0 + have h1 : ι F j (a 1) = y := ha 1 + have h2 : ι F j (a 2) = z := ha 2 + have h01 : (F.obj j).target k (a 0) = (F.obj j).source k (a 1) := he false + have h12 : (F.obj j).target k (a 1) = (F.obj j).source k (a 2) := he true + subst x y z + simp only [comp_ι F k j _ _ h01, comp_ι F k j _ _ h12, + comp_ι F k j _ _ ((F.obj j).assoc_composable_left h01 h12), + comp_ι F k j _ _ ((F.obj j).assoc_composable_right h01 h12)] + rw [(F.obj j).assoc] + +lemma interchange (k l : ℕ) (hkl : k < l) (a b c d : Cell F) + (hab : target F l a = source F l b) (hcd : target F l c = source F l d) + (hac : target F k a = source F k c) (hbd : target F k b = source F k d) + (hab_cd : target F k (comp F l a b hab) = source F k (comp F l c d hcd)) + (hac_bd : target F l (comp F k a c hac) = source F l (comp F k b d hbd)) : + comp F k (comp F l a b hab) (comp F l c d hcd) hab_cd = + comp F l (comp F k a c hac) (comp F k b d hbd) hac_bd := by + obtain ⟨j, x, hx, he⟩ := lift_matches F ![a,b,c,d] + ![(0 : Fin 4),2,0,1] ![(1 : Fin 4),3,2,3] ![l,l,k,k] + (by intro e; fin_cases e <;> assumption) + have h0 : ι F j (x 0) = a := hx 0 + have h1 : ι F j (x 1) = b := hx 1 + have h2 : ι F j (x 2) = c := hx 2 + have h3 : ι F j (x 3) = d := hx 3 + have h01 : (F.obj j).target l (x 0) = (F.obj j).source l (x 1) := he 0 + have h23 : (F.obj j).target l (x 2) = (F.obj j).source l (x 3) := he 1 + have h02 : (F.obj j).target k (x 0) = (F.obj j).source k (x 2) := he 2 + have h13 : (F.obj j).target k (x 1) = (F.obj j).source k (x 3) := he 3 + have hlower : (F.obj j).target k (x 1) = (F.obj j).target k (x 0) := by + have h := congrArg ((F.obj j).target k) h01 + simpa only [(F.obj j).target_target, (F.obj j).target_source, + min_eq_left (le_of_lt hkl), ite_eq_left hkl] using h.symm + have hm1 : (F.obj j).target k ((F.obj j).comp l (x 0) (x 1) h01) = + (F.obj j).source k ((F.obj j).comp l (x 2) (x 3) h23) := by + rw [(F.obj j).target_comp_le k l (le_of_lt hkl), + (F.obj j).source_comp_le k l (le_of_lt hkl), hlower, h02] + have hm2 : (F.obj j).target l ((F.obj j).comp k (x 0) (x 2) h02) = + (F.obj j).source l ((F.obj j).comp k (x 1) (x 3) h13) := by + rw [(F.obj j).target_comp_gt l k hkl _ _ _ ((F.obj j).target_composable hkl h02), + (F.obj j).source_comp_gt l k hkl _ _ _ ((F.obj j).source_composable hkl h13)] + simp only [h01, h23] + subst a b c d + simp only [comp_ι F l j _ _ h01, comp_ι F l j _ _ h23, + comp_ι F k j _ _ h02, comp_ι F k j _ _ h13, + comp_ι F k j _ _ hm1, comp_ι F l j _ _ hm2] + rw [(F.obj j).interchange k l hkl] + +noncomputable def omega : OmegaCategory.{u} where + Cell := Cell F + source := source F + target := target F + source_source := source_source F + target_target := target_target F + source_target := source_target F + target_source := target_source F + comp := comp F + source_comp_le := source_comp_le F + target_comp_le := target_comp_le F + source_comp_gt := source_comp_gt F + target_comp_gt := target_comp_gt F + unit_left := unit_left F + unit_right := unit_right F + assoc := assoc F + interchange := interchange F + finite_dimension := finite_dimension F + +noncomputable def cocone : Cocone F where + pt := omega F + ι := { + app := fun j => { + map := ι F j + map_source := fun k x => (source_ι F k j x).symm + map_target := fun k x => (target_ι F k j x).symm + map_comp := fun k x y h h' => (comp_ι F k j x y h h').symm } + naturality := by + intro i j f + apply Functor.ext + funext x + exact ι_map F f x } + +omit [IsFiltered J] in +lemma desc_cell_ι (s : Cocone F) (j : J) (a : (F.obj j).Cell) : + (colimit.desc (CellDiagram F) (cellFunctor.mapCocone s)) (ι F j a) = + (s.ι.app j).map a := + congr_hom (colimit.ι_desc (cellFunctor.mapCocone s) j) a + +noncomputable def desc (s : Cocone F) : omega F ⟶ s.pt where + map := colimit.desc (CellDiagram F) (cellFunctor.mapCocone s) + map_source k x := by + obtain ⟨j, a, rfl⟩ := exists_rep F x + change (colimit.desc (CellDiagram F) (cellFunctor.mapCocone s)) + (source F k (ι F j a)) = _ + rw [source_ι] + rw [desc_cell_ι, desc_cell_ι] + exact (s.ι.app j).map_source k a + map_target k x := by + obtain ⟨j, a, rfl⟩ := exists_rep F x + change (colimit.desc (CellDiagram F) (cellFunctor.mapCocone s)) + (target F k (ι F j a)) = _ + rw [target_ι] + rw [desc_cell_ι, desc_cell_ι] + exact (s.ι.app j).map_target k a + map_comp k x y h h' := by + obtain ⟨j, a, b, rfl, rfl, hab⟩ := lift_pair F k x y h + change target F k (ι F j a) = source F k (ι F j b) at h + change (colimit.desc (CellDiagram F) (cellFunctor.mapCocone s)) + (comp F k (ι F j a) (ι F j b) h) = _ + rw [comp_ι F k j a b hab] + simp only [desc_cell_ι] at h' ⊢ + exact (s.ι.app j).map_comp k a b hab h' + +noncomputable def isColimit : IsColimit (cocone F) where + desc := desc F + fac s j := by + apply Functor.ext + funext x + exact desc_cell_ι F s j x + uniq s m h := by + apply Functor.ext + funext x + obtain ⟨j, a, rfl⟩ := exists_rep F x + have hm : m.map (ι F j a) = (s.ι.app j).map a := congrArg (fun G => G.map a) (h j) + change m.map (ι F j a) = (colimit.desc (CellDiagram F) (cellFunctor.mapCocone s)) (ι F j a) + rw [hm] + exact (congr_hom (colimit.ι_desc (cellFunctor.mapCocone s) j) a).symm + +end FilteredColimit +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +lemma comp_of_left_source_fixed (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) + (h : C.target k x = C.source k y) (hx : C.source k x = x) : + C.comp k x y h = y := by + have hx' : x = C.source k y := (C.target_eq_self_of_source_eq_self hx).symm.trans h + simpa only [← hx'] using C.unit_left k y (C.target_source_self k y) + +lemma finite_truncation (C : OmegaCategory.{u}) [Finite C.Cell] : + ∃ n, C.IsTruncated n := by + classical + let := Fintype.ofFinite C.Cell + choose n hn using C.finite_dimension + exact ⟨Finset.univ.sup n, fun x => C.source_fixed_upwards + (Finset.le_sup (Finset.mem_univ x)) (hn x)⟩ + +structure GlobularMap (C : OmegaCategory.{u}) (D : OmegaCategory.{v}) where + map : C.Cell → D.Cell + map_source (k : ℕ) (x : C.Cell) : map (C.source k x) = D.source k (map x) + map_target (k : ℕ) (x : C.Cell) : map (C.target k x) = D.target k (map x) + +namespace FilteredColimit + +open CategoryTheory Limits ConcreteCategory + +variable {J : Type u} [Category.{u} J] [IsFiltered J] (F : J ⥤ OmegaCategory.{u}) + +lemma finite_globular_lift {C : OmegaCategory.{v}} [Finite C.Cell] + (G : Functor C (omega F)) : + ∃ j, ∃ H : GlobularMap C (F.obj j), ∀ x, ι F j (H.map x) = G.map x := by + obtain ⟨n, hn⟩ := finite_truncation C + obtain ⟨i, y, hy⟩ := Thomason.FilteredTypes.finite_representatives (CellDiagram F) G.map + change C.Cell → (F.obj i).Cell at y + change ∀ x, ι F i (y x) = G.map x at hy + let z (x : C.Cell) := (F.obj i).source n (y x) + have hz x : ι F i (z x) = G.map x := by + change ι F i ((F.obj i).source n (y x)) = _ + rw [← source_ι, hy] + exact (G.map_source n x).symm.trans (congrArg G.map (hn x)) + let p : (Fin (n+1) × Bool × C.Cell) → (F.obj i).Cell := + fun a => if a.2.1 then (F.obj i).target a.1.val (z a.2.2) + else (F.obj i).source a.1.val (z a.2.2) + let q : (Fin (n+1) × Bool × C.Cell) → (F.obj i).Cell := + fun a => z (if a.2.1 then C.target a.1.val a.2.2 else C.source a.1.val a.2.2) + have he a : ι F i (p a) = ι F i (q a) := by + rcases a with ⟨k, b, x⟩ + cases b + · change ι F i ((F.obj i).source k.val (z x)) = ι F i (z (C.source k.val x)) + rw [← source_ι, hz, hz] + exact (G.map_source k.val x).symm + · change ι F i ((F.obj i).target k.val (z x)) = ι F i (z (C.target k.val x)) + rw [← target_ι, hz, hz] + exact (G.map_target k.val x).symm + obtain ⟨j, f, hf⟩ := Thomason.FilteredTypes.finite_equalities (CellDiagram F) p q he + change ∀ a, (F.map f).map (p a) = (F.map f).map (q a) at hf + let w (x : C.Cell) := (F.map f).map (z x) + have hw x : (F.obj j).source n (w x) = w x := by + dsimp [w, z] + rw [← (F.map f).map_source, (F.obj i).source_source_self] + refine ⟨j, ⟨w, ?_, ?_⟩, fun x => (ι_map F f (z x)).trans (hz x)⟩ + · intro k x + by_cases hk : k ≤ n + · have hh := hf ⟨⟨k, by omega⟩, false, x⟩ + change (F.map f).map ((F.obj i).source k (z x)) = w (C.source k x) at hh + rw [(F.map f).map_source] at hh + exact hh.symm + · rw [C.source_fixed_upwards (by omega : n ≤ k) (hn x)] + exact ((F.obj j).source_fixed_upwards (by omega) (hw x)).symm + · intro k x + by_cases hk : k ≤ n + · have hh := hf ⟨⟨k, by omega⟩, true, x⟩ + change (F.map f).map ((F.obj i).target k (z x)) = w (C.target k x) at hh + rw [(F.map f).map_target] at hh + exact hh.symm + · rw [C.target_eq_self_of_source_eq_self (C.source_fixed_upwards (by omega : n ≤ k) (hn x))] + exact ((F.obj j).target_eq_self_of_source_eq_self + ((F.obj j).source_fixed_upwards (by omega) (hw x))).symm + +lemma finite_functor_lift {C : OmegaCategory.{v}} [Finite C.Cell] + (G : Functor C (omega F)) : + ∃ j, ∃ H : Functor C (F.obj j), ∀ x, ι F j (H.map x) = G.map x := by + obtain ⟨n, hn⟩ := finite_truncation C + obtain ⟨i, H, hH⟩ := finite_globular_lift F G + let A := (k : Fin (n+1)) × {p : C.Cell × C.Cell // C.target k.val p.1 = C.source k.val p.2} + let hm (a : A) : (F.obj i).target a.1.val (H.map a.2.val.1) = + (F.obj i).source a.1.val (H.map a.2.val.2) := by + rw [← H.map_target, ← H.map_source, a.2.property] + let p (a : A) : (F.obj i).Cell := + (F.obj i).comp a.1.val (H.map a.2.val.1) (H.map a.2.val.2) (hm a) + let q (a : A) : (F.obj i).Cell := H.map (C.comp a.1.val a.2.val.1 a.2.val.2 a.2.property) + have he (a : A) : ι F i (p a) = ι F i (q a) := by + have hh : target F a.1.val (ι F i (H.map a.2.val.1)) = + source F a.1.val (ι F i (H.map a.2.val.2)) := by + rw [hH, hH] + exact G.map_composable a.2.property + change ι F i ((F.obj i).comp a.1.val (H.map a.2.val.1) (H.map a.2.val.2) (hm a)) = _ + rw [← comp_ι F a.1.val i _ _ (hm a) hh] + simp only [q, hH] + exact (G.map_comp a.1.val _ _ a.2.property (G.map_composable a.2.property)).symm + obtain ⟨j, f, hf⟩ := Thomason.FilteredTypes.finite_equalities (CellDiagram F) p q he + change ∀ a, (F.map f).map (p a) = (F.map f).map (q a) at hf + let w (x : C.Cell) := (F.map f).map (H.map x) + have ws k x : w (C.source k x) = (F.obj j).source k (w x) := by + dsimp [w] + rw [H.map_source, (F.map f).map_source] + have wt k x : w (C.target k x) = (F.obj j).target k (w x) := by + dsimp [w] + rw [H.map_target, (F.map f).map_target] + refine ⟨j, ⟨w, ws, wt, ?_⟩, fun x => (ι_map F f (H.map x)).trans (hH x)⟩ + intro k x y h h' + by_cases hk : k ≤ n + · let a : A := ⟨⟨k, by omega⟩, ⟨⟨x,y⟩, h⟩⟩ + have hh := hf a + change (F.map f).map ((F.obj i).comp k (H.map x) (H.map y) (hm a)) = + w (C.comp k x y h) at hh + rw [(F.map f).map_comp k _ _ _ h'] at hh + exact hh.symm + · have hx : C.source k x = x := C.source_fixed_upwards (by omega) (hn x) + have hwx : (F.obj j).source k (w x) = w x := (ws k x).symm.trans (congrArg w hx) + rw [C.comp_of_left_source_fixed k x y h hx, + (F.obj j).comp_of_left_source_fixed k (w x) (w y) h' hwx] + +lemma finite_functor_equality {C : OmegaCategory.{v}} [Finite C.Cell] + {i : J} (G H : Functor C (F.obj i)) + (h : Functor.comp G ((cocone F).ι.app i) = Functor.comp H ((cocone F).ι.app i)) : + ∃ (j : J) (f : i ⟶ j), Functor.comp G (F.map f) = Functor.comp H (F.map f) := by + have he x : ι F i (G.map x) = ι F i (H.map x) := + congrArg (fun H : Functor C (omega F) => H.map x) h + obtain ⟨j, f, hf⟩ := Thomason.FilteredTypes.finite_equalities (CellDiagram F) G.map H.map he + refine ⟨j, f, ?_⟩ + apply Functor.ext + funext x + exact hf x + +end FilteredColimit +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory.FilteredColimit + +open CategoryTheory Limits Opposite ConcreteCategory + +variable {J : Type u} [Category.{u} J] [IsFiltered J] (F : J ⥤ OmegaCategory.{u}) + +noncomputable def finiteHomIsColimit (C : OmegaCategory.{u}) [Finite C.Cell] : + IsColimit ((coyoneda.obj (Opposite.op C)).mapCocone (cocone F)) := by + apply Types.FilteredColimit.isColimitOf' + · intro G + obtain ⟨j, H, hH⟩ := finite_functor_lift F G + refine ⟨j, H, ?_⟩ + apply Functor.ext + funext x + exact (hH x).symm + · intro i G H h + exact finite_functor_equality F G H h + +instance finiteHomPreservesColimit (C : OmegaCategory.{u}) [Finite C.Cell] : + PreservesColimit F (coyoneda.obj (Opposite.op C)) := + preservesColimit_of_preserves_colimit_cocone (isColimit F) (finiteHomIsColimit F C) + +noncomputable def streetIsColimit : + IsColimit (streetNerveFunctor.mapCocone (cocone F)) := by + apply evaluationJointlyReflectsColimits + intro m + letI : Finite (orientals.obj m.unop).Cell := NormalizedChains.finiteTables + apply Types.FilteredColimit.isColimitOf' + · intro G + change Functor (orientals.obj m.unop) (omega F) at G + obtain ⟨j, H, hH⟩ := finite_functor_lift F G + refine ⟨j, H, ?_⟩ + apply Functor.ext + funext x + exact (hH x).symm + · intro i G H h + exact finite_functor_equality F G H h + +instance streetPreservesColimit : PreservesColimit F streetNerveFunctor := + preservesColimit_of_preserves_colimit_cocone (isColimit F) (streetIsColimit F) + +end Thomason.OmegaCategory.FilteredColimit + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Limits + +instance streetPreservesFilteredShape {J : Type u} [Category.{u} J] [IsFiltered J] : + PreservesColimitsOfShape J streetNerveFunctor.{u} where + preservesColimit {K} := OmegaCategory.FilteredColimit.streetPreservesColimit K + +end Thomason + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FiniteAttachments.lean b/lean/OAI/CategoryTheory/Thomason/FiniteAttachments.lean new file mode 100644 index 0000000000000000000000000000000000000000..40d4b0c1d46d09fee7a74647ff420dd9d2654b03 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FiniteAttachments.lean @@ -0,0 +1,501 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SieveAttachments + +namespace OAI + +/-! Finite Attachments. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory NormalizedChains.PosetTables + +theorem cosieve_attachment_covers {P : Type u} [PartialOrder P] + (A S₁ S₂ : Set P) (h₁ : IsUpperSet S₁) (h₂ : IsUpperSet S₂) + (hA₁ : A ⊆ S₁) (hA₂ : Disjoint A S₂) (hcover : S₁ ∪ S₂ = Set.univ) + {X Y : OmegaCategory.{u}} (a : categorification.obj (nerve A) ⟶ X) + (h : X ⟶ Y) (i : categorification.obj (nerve P) ⟶ Y) + (H : IsPushout a + (categorification.map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor)) h i) : + ∃ T₁ T₂ : Set Y.Objects, + Y.IsObjectCosieve T₁ ∧ Y.IsObjectCosieve T₂ ∧ T₁ ∪ T₂ = Set.univ ∧ + IsPosetAttachmentPiece A S₁ hA₁ a h i T₁ ∧ + IsPosetNewPiece S₂ i T₂ ∧ IsPosetNewPiece (S₁ ∩ S₂) i (T₁ ∩ T₂) := +by + classical + let l₁ := upperSegmentLabel S₁ h₁ + let l₂ := upperSegmentLabel S₂ h₂ + let l₃ : P →o Fin 2 := ⟨fun p => min (l₁ p) (l₂ p), + fun _ _ he => min_le_min (l₁.monotone he) (l₂.monotone he)⟩ + have hl₁ : ∀ p : A, l₁ p.val = 1 := fun p => (upperSegmentLabel_one S₁ h₁ _).mpr (hA₁ p.property) + have hl₂ : ∀ p : A, l₂ p.val = 0 := by + intro p + have hp : p.val ∉ S₂ := fun hp => Set.disjoint_left.mp hA₂ p.property hp + change (if p.val ∈ S₂ then (1 : Fin 2) else 0) = 0 + simp [hp] + have hl₃ : ∀ p : A, l₃ p.val = 0 := by intro p; change min (l₁ p.val) (l₂ p.val) = 0; rw [hl₁,hl₂]; rfl + have hS₁ : S₁ = {p | l₁ p = 1} := by ext p; exact (upperSegmentLabel_one S₁ h₁ p).symm + have hS₂ : S₂ = {p | l₂ p = 1} := by ext p; exact (upperSegmentLabel_one S₂ h₂ p).symm + have hS₃ : S₁ ∩ S₂ = {p | l₃ p = 1} := by + ext p + change (p ∈ S₁ ∧ p ∈ S₂) ↔ + min (if p ∈ S₁ then (1 : Fin 2) else 0) (if p ∈ S₂ then 1 else 0) = 1 + by_cases hp₁ : p ∈ S₁ <;> by_cases hp₂ : p ∈ S₂ <;> + simp [hp₁,hp₂] + let η₁ := constantAttachmentLabel A l₁ 1 hl₁ a h i H + let η₂ := constantAttachmentLabel A l₂ 0 hl₂ a h i H + let η₃ := constantAttachmentLabel A l₃ 0 hl₃ a h i H + have hη₃ : η₃ = minLabel η₁ η₂ := by + apply H.hom_ext + · change h ≫ constantAttachmentLabel A l₃ 0 hl₃ a h i H = _ + rw [constantAttachmentLabel_old,comp_minLabel, + constantAttachmentLabel_old,constantAttachmentLabel_old] + rfl + · change i ≫ constantAttachmentLabel A l₃ 0 hl₃ a h i H = _ + rw [constantAttachmentLabel_new,comp_minLabel, + constantAttachmentLabel_new,constantAttachmentLabel_new] + rfl + have hp₃ := constant_attachment_new_piece A l₃ 0 hl₃ a h i H + (S₁ ∩ S₂) 1 (by decide) hS₃ + change IsPosetNewPiece (S₁ ∩ S₂) i (intervalFiberObjects η₃ 1) at hp₃ + rw [hη₃,minLabel_objects_fiber] at hp₃ + refine ⟨intervalFiberObjects η₁ 1,intervalFiberObjects η₂ 1, + one_fiber_isObjectCosieve η₁,one_fiber_isObjectCosieve η₂,?_, + constant_attachment_old_piece A l₁ 1 hl₁ a h i H S₁ hA₁ hS₁, + constant_attachment_new_piece A l₂ 0 hl₂ a h i H S₂ 1 (by decide) hS₂,hp₃⟩ + refine labelled_objects_cover H η₁ η₂ l₁ l₂ 1 + (Or.inl (constantAttachmentLabel_old A l₁ 1 hl₁ a h i H)) + (constantAttachmentLabel_new A l₁ 1 hl₁ a h i H) + (constantAttachmentLabel_new A l₂ 0 hl₂ a h i H) ?_ + intro p + have hp : p ∈ S₁ ∪ S₂ := by rw [hcover]; trivial + exact hp.imp ((upperSegmentLabel_one S₁ h₁ p).mpr) ((upperSegmentLabel_one S₂ h₂ p).mpr) + +end Thomason.Attachments + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory + +def fullFinite (n : ℕ) (C : NCategory.{u} n) (T : Set C.val.Objects) : NCategory.{u} n := + ⟨(C.val.fullOn T).category, fun x => Subtype.ext (C.property x.val)⟩ + +def fullFiniteInclusion (n : ℕ) (C : NCategory.{u} n) (T : Set C.val.Objects) : + fullFinite n C T ⟶ C := (C.val.fullOn T).inclusion + +def IsPosetFiniteAttachmentPiece (n : ℕ) {P : Type u} [PartialOrder P] + (A S : Set P) (hAS : A ⊆ S) {X Y : NCategory.{u} n} + (a : (categorificationFinite n).obj (nerve A) ⟶ X) (h : X ⟶ Y) + (i : (categorificationFinite n).obj (nerve P) ⟶ Y) (T : Set Y.val.Objects) : Prop := + ∃ (j : X ⟶ fullFinite n Y T) + (k : (categorificationFinite n).obj (nerve S) ⟶ fullFinite n Y T), + j ≫ fullFiniteInclusion n Y T = h ∧ + k ≫ fullFiniteInclusion n Y T = (categorificationFinite n).map + (nerveMap (OrderEmbedding.subtype S).toOrderHom.monotone.functor) ≫ i ∧ + IsPushout a ((categorificationFinite n).map (nerveMap (subposetMap A S hAS).monotone.functor)) j k + +def IsPosetFiniteNewPiece (n : ℕ) {P : Type u} [PartialOrder P] + (S : Set P) {Y : NCategory.{u} n} + (i : (categorificationFinite n).obj (nerve P) ⟶ Y) (T : Set Y.val.Objects) : Prop := + ∃ e : (categorificationFinite n).obj (nerve S) ≅ fullFinite n Y T, + e.hom ≫ fullFiniteInclusion n Y T = (categorificationFinite n).map + (nerveMap (OrderEmbedding.subtype S).toOrderHom.monotone.functor) ≫ i + +end Thomason.Attachments + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory NormalizedChains.PosetTables + +lemma posetFiniteLabel_constant (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (l : P →o Fin 2) + (e : Fin 2) (hl : ∀ p, l p = e) : + posetCategorificationFiniteLabel n hn l = + constantLabel ((categorificationFinite n).obj (nerve P)).val e := by + apply truncation_functor_ext + exact posetLabel_constant l e hl + +lemma posetFiniteLabel_natural (n : ℕ) (hn : 1 ≤ n) + {P Q : Type u} [PartialOrder P] [PartialOrder Q] (g : Q →o P) (l : P →o Fin 2) : + (categorificationFinite n).map (nerveMap g.monotone.functor) ≫ + posetCategorificationFiniteLabel n hn l = posetCategorificationFiniteLabel n hn (l.comp g) := by + apply truncation_functor_ext + exact posetCategorificationLabel_natural g l + +lemma posetFiniteLabel_max (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (l₁ l₂ : P →o Fin 2) : + posetCategorificationFiniteLabel n hn + (⟨fun p => max (l₁ p) (l₂ p),fun _ _ he => max_le_max (l₁.monotone he) (l₂.monotone he)⟩ : P →o Fin 2) = + maxLabel (posetCategorificationFiniteLabel n hn l₁) (posetCategorificationFiniteLabel n hn l₂) := by + apply truncation_functor_ext + rfl + +lemma posetFiniteLabel_min (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (l₁ l₂ : P →o Fin 2) : + posetCategorificationFiniteLabel n hn + (⟨fun p => min (l₁ p) (l₂ p),fun _ _ he => min_le_min (l₁.monotone he) (l₂.monotone he)⟩ : P →o Fin 2) = + minLabel (posetCategorificationFiniteLabel n hn l₁) (posetCategorificationFiniteLabel n hn l₂) := by + apply truncation_functor_ext + rfl + +def constantFiniteLabel (n : ℕ) (hn : 1 ≤ n) (C : NCategory.{u} n) (e : Fin 2) : + C ⟶ finiteInterval n hn := constantLabel C.val e + +lemma comp_constantFiniteLabel (n : ℕ) (hn : 1 ≤ n) {C D : NCategory.{u} n} + (f : C ⟶ D) (e : Fin 2) : + f ≫ constantFiniteLabel n hn D e = constantFiniteLabel n hn C e := by + exact comp_constantLabel f e + +variable (n : ℕ) (hn : 1 ≤ n) {P : Type u} [PartialOrder P] (A : Set P) + (l : P →o Fin 2) (b : Fin 2) (hlA : ∀ p : A, l p.val = b) + {X Y : NCategory.{u} n} (a : (categorificationFinite n).obj (nerve A) ⟶ X) + (h : X ⟶ Y) (i : (categorificationFinite n).obj (nerve P) ⟶ Y) + (H : IsPushout a + ((categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor)) h i) + +def constantFiniteAttachmentLabel : Y ⟶ finiteInterval n hn := + H.desc (constantFiniteLabel n hn X b) (posetCategorificationFiniteLabel n hn l) (by + rw [comp_constantFiniteLabel] + exact ((posetFiniteLabel_natural n hn _ l).trans (posetFiniteLabel_constant n hn _ b hlA)).symm) + +lemma constantFiniteAttachmentLabel_old : + h ≫ constantFiniteAttachmentLabel n hn A l b hlA a h i H = constantFiniteLabel n hn X b := H.inl_desc _ _ _ +lemma constantFiniteAttachmentLabel_new : + i ≫ constantFiniteAttachmentLabel n hn A l b hlA a h i H = posetCategorificationFiniteLabel n hn l := H.inr_desc _ _ _ + +lemma subposetFiniteMap_comp (S : Set P) (hAS : A ⊆ S) : + (categorificationFinite n).map (nerveMap (subposetMap A S hAS).monotone.functor) ≫ + (categorificationFinite n).map (nerveMap (OrderEmbedding.subtype S).toOrderHom.monotone.functor) = + (categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor) := by + rw [← (categorificationFinite n).map_comp] + rfl + +lemma fiberFiniteInclusion_mono (e : Fin 2) (Q : Over (finiteInterval.{u} n hn)) : + Mono (fiberFiniteInclusion n hn e Q) := by + constructor + intro Z f g he + apply OmegaCategory.Functor.ext + funext x + apply Subtype.ext + exact congrArg (fun F => F.map x) he + +def intervalFiberFullFiniteIso {C : NCategory.{u} n} (η : C ⟶ finiteInterval n hn) (e : Fin 2) : + (fiberFiniteFunctor n hn e).obj (Over.mk η) ≅ fullFinite n C (intervalFiberObjects η e) where + hom := (intervalFiberFullIso η e).hom + inv := (intervalFiberFullIso η e).inv + hom_inv_id := (intervalFiberFullIso η e).hom_inv_id + inv_hom_id := (intervalFiberFullIso η e).inv_hom_id + +lemma constant_finite_attachment_old_piece (S : Set P) (hAS : A ⊆ S) + (hS : S = {p | l p = b}) : + IsPosetFiniteAttachmentPiece n A S hAS a h i + (intervalFiberObjects (constantFiniteAttachmentLabel n hn A l b hlA a h i H) b) := by + let η := constantFiniteAttachmentLabel n hn A l b hlA a h i H + let q := posetCategorificationFiniteLabel n hn l + let C := (categorificationFinite n).obj (nerve A) + let g : C ⟶ (categorificationFinite n).obj (nerve P) := + (categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor) + let src : Over (finiteInterval n hn) := Over.mk (constantFiniteLabel n hn C b) + let old : Over (finiteInterval n hn) := Over.mk (constantFiniteLabel n hn X b) + let af : src ⟶ old := Over.homMk a (comp_constantLabel a b) + let gf : src ⟶ Over.mk q := Over.homMk g (by + exact (posetFiniteLabel_natural n hn _ l).trans (posetFiniteLabel_constant n hn _ b hlA)) + let hf : old ⟶ Over.mk η := Over.homMk h (constantFiniteAttachmentLabel_old n hn A l b hlA a h i H) + let if' : Over.mk q ⟶ Over.mk η := Over.homMk i (constantFiniteAttachmentLabel_new n hn A l b hlA a h i H) + let F := fiberFiniteFunctor n hn b + let E := posetPieceFiniteFiberIso n hn S l b hS + let j := (constantFiniteFiberIso n hn X b).hom ≫ F.map hf + let k := E.hom ≫ F.map if' + have := fiberFiniteInclusion_mono n hn b (Over.mk q) + have hE := posetPieceFiniteFiberIso_inclusion n hn S l b hS + have hp : IsPushout a + ((categorificationFinite n).map (nerveMap (subposetMap A S hAS).monotone.functor)) j k := by + refine (labelled_pushout_finite_fibers n hn af gf hf if' H b).of_iso' + (constantFiniteFiberIso n hn C b) (constantFiniteFiberIso n hn X b) E (Iso.refl _) ?_ ?_ ?_ ?_ + · rfl + · apply (cancel_mono (C := NCategory.{u} n) (fiberFiniteInclusion n hn b (Over.mk q))).mp + change g = (categorificationFinite n).map (nerveMap (subposetMap A S hAS).monotone.functor) ≫ + (E.hom ≫ fiberFiniteInclusion n hn b (Over.mk q)) + rw [hE] + exact (subposetFiniteMap_comp n A S hAS).symm + · simp only [Iso.refl_hom, Category.comp_id]; rfl + · simp only [Iso.refl_hom, Category.comp_id]; rfl + let Efull := intervalFiberFullFiniteIso n hn η b + refine ⟨j ≫ Efull.hom,k ≫ Efull.hom,?_,?_,?_⟩ + · rfl + · change k ≫ fiberFiniteInclusion n hn b (Over.mk η) = _ + change E.hom ≫ (F.map if' ≫ fiberFiniteInclusion n hn b (Over.mk η)) = _ + change E.hom ≫ (fiberFiniteInclusion n hn b (Over.mk q) ≫ i) = _ + rw [← Category.assoc, hE] + · exact hp.of_iso (Iso.refl _) (Iso.refl _) (Iso.refl _) Efull + (by simp) (by simp) (by simp) (by simp) + +lemma constant_finite_attachment_new_piece (S : Set P) (e : Fin 2) (hbe : b ≠ e) + (hS : S = {p | l p = e}) : + IsPosetFiniteNewPiece n S i (intervalFiberObjects (constantFiniteAttachmentLabel n hn A l b hlA a h i H) e) := by + let η := constantFiniteAttachmentLabel n hn A l b hlA a h i H + let q := posetCategorificationFiniteLabel n hn l + let C := (categorificationFinite n).obj (nerve A) + let g : C ⟶ (categorificationFinite n).obj (nerve P) := + (categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor) + let src : Over (finiteInterval n hn) := Over.mk (constantFiniteLabel n hn C b) + let old : Over (finiteInterval n hn) := Over.mk (constantFiniteLabel n hn X b) + let af : src ⟶ old := Over.homMk a (comp_constantLabel a b) + let gf : src ⟶ Over.mk q := Over.homMk g (by + exact (posetFiniteLabel_natural n hn _ l).trans (posetFiniteLabel_constant n hn _ b hlA)) + let hf : old ⟶ Over.mk η := Over.homMk h (constantFiniteAttachmentLabel_old n hn A l b hlA a h i H) + let if' : Over.mk q ⟶ Over.mk η := Over.homMk i (constantFiniteAttachmentLabel_new n hn A l b hlA a h i H) + let F := fiberFiniteFunctor n hn e + have : IsEmpty (F.obj src).val.Cell := ⟨fun x => + hbe (congrArg (fun c => c.left.down) x.property)⟩ + have : IsEmpty (F.obj old).val.Cell := ⟨fun x => + hbe (congrArg (fun c => c.left.down) x.property)⟩ + let J := isoOfBijective ((nCategoryInclusion n).map (F.map af)) (by + constructor + · intro x; change (F.obj src).val.Cell at x; exact isEmptyElim x + · intro x; change (F.obj old).val.Cell at x; exact isEmptyElim x) + let Jf : F.obj src ≅ F.obj old := { + hom := J.hom, inv := J.inv, hom_inv_id := J.hom_inv_id, inv_hom_id := J.inv_hom_id } + have : IsIso (F.map af) := Jf.isIso_hom + have hp := labelled_pushout_finite_fibers n hn af gf hf if' H e + have : IsIso (F.map if') := hp.isIso_inr_of_isIso + let E := posetPieceFiniteFiberIso n hn S l e hS + let fiberIso := asIso (F.map if') + refine ⟨E ≪≫ fiberIso ≪≫ intervalFiberFullFiniteIso n hn η e, ?_⟩ + change E.hom ≫ (F.map if' ≫ fiberFiniteInclusion n hn e (Over.mk η)) = _ + change E.hom ≫ (fiberFiniteInclusion n hn e (Over.mk q) ≫ i) = _ + rw [← Category.assoc, posetPieceFiniteFiberIso_inclusion n hn] + +end Thomason.Attachments + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory NormalizedChains.PosetTables + +def finitePosetObject (n : ℕ) {P : Type u} [PartialOrder P] + (x : ((categorificationFinite n).obj (nerve P)).val.Objects) : P := + NormalizedChains.tableObjectsEquiv ((posetCategorificationTableMap P).objects + (truncationCellLift (categorification.obj (nerve P)) n 0 x)) + +lemma posetFiniteLabel_objects (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] (l : P →o Fin 2) + (x : ((categorificationFinite n).obj (nerve P)).val.Objects) : + (posetCategorificationFiniteLabel n hn l).objects x = intervalVertex (l (finitePosetObject n x)) := by + conv_lhs => rw [← truncationCellLift_unit (categorification.obj (nerve P)) n 0 x] + exact posetLabel_objects l (truncationCellLift (categorification.obj (nerve P)) n 0 x) + +lemma labelled_finite_objects_cover (n : ℕ) (hn : 1 ≤ n) + {P : Type u} [PartialOrder P] {A : Set P} + {X Y : NCategory.{u} n} {a : (categorificationFinite n).obj (nerve A) ⟶ X} + {h : X ⟶ Y} {i : (categorificationFinite n).obj (nerve P) ⟶ Y} + (H : IsPushout a + ((categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor)) h i) + (η₁ η₂ : Y ⟶ finiteInterval n hn) (l₁ l₂ : P →o Fin 2) (e : Fin 2) + (hh : h ≫ η₁ = constantFiniteLabel n hn X e ∨ h ≫ η₂ = constantFiniteLabel n hn X e) + (hi₁ : i ≫ η₁ = posetCategorificationFiniteLabel n hn l₁) + (hi₂ : i ≫ η₂ = posetCategorificationFiniteLabel n hn l₂) + (hl : ∀ p, l₁ p = e ∨ l₂ p = e) : + intervalFiberObjects η₁ e ∪ intervalFiberObjects η₂ e = Set.univ := by + apply Set.eq_univ_of_forall + intro y + rcases Types.eq_or_eq_of_isPushout (pushout_finite_objects n hn _ _ _ _ H) y with ⟨x,rfl⟩ | ⟨x,rfl⟩ + · rcases hh with hh | hh + · exact Or.inl (interval_vertex_mem_old h η₁ e hh x) + · exact Or.inr (interval_vertex_mem_old h η₂ e hh x) + · rcases hl (finitePosetObject n x) with hx | hx + · apply Or.inl + change η₁.objects (i.objects x) = intervalVertex e + exact (congrArg (fun f : (categorificationFinite n).obj (nerve P) ⟶ finiteInterval n hn => f.objects x) hi₁).trans + ((posetFiniteLabel_objects n hn l₁ x).trans (congrArg intervalVertex hx)) + · apply Or.inr + change η₂.objects (i.objects x) = intervalVertex e + exact (congrArg (fun f : (categorificationFinite n).obj (nerve P) ⟶ finiteInterval n hn => f.objects x) hi₂).trans + ((posetFiniteLabel_objects n hn l₂ x).trans (congrArg intervalVertex hx)) + +end Thomason.Attachments + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory NormalizedChains.PosetTables +def maxFiniteLabel (n : ℕ) (hn : 1 ≤ n) {C : NCategory.{u} n} + (p q : C ⟶ finiteInterval n hn) : C ⟶ finiteInterval n hn := maxLabel p q + +def minFiniteLabel (n : ℕ) (hn : 1 ≤ n) {C : NCategory.{u} n} + (p q : C ⟶ finiteInterval n hn) : C ⟶ finiteInterval n hn := minLabel p q + +lemma comp_maxFiniteLabel (n : ℕ) (hn : 1 ≤ n) {C D : NCategory.{u} n} + (f : C ⟶ D) (p q : D ⟶ finiteInterval n hn) : + f ≫ maxFiniteLabel n hn p q = maxFiniteLabel n hn (f ≫ p) (f ≫ q) := rfl + +lemma comp_minFiniteLabel (n : ℕ) (hn : 1 ≤ n) {C D : NCategory.{u} n} + (f : C ⟶ D) (p q : D ⟶ finiteInterval n hn) : + f ≫ minFiniteLabel n hn p q = minFiniteLabel n hn (f ≫ p) (f ≫ q) := rfl + +lemma maxFiniteLabel_objects_fiber (n : ℕ) (hn : 1 ≤ n) {C : NCategory.{u} n} + (p q : C ⟶ finiteInterval n hn) : + intervalFiberObjects (maxFiniteLabel n hn p q) 0 = intervalFiberObjects p 0 ∩ intervalFiberObjects q 0 := + maxLabel_objects_fiber p q + +lemma minFiniteLabel_objects_fiber (n : ℕ) (hn : 1 ≤ n) {C : NCategory.{u} n} + (p q : C ⟶ finiteInterval n hn) : + intervalFiberObjects (minFiniteLabel n hn p q) 1 = intervalFiberObjects p 1 ∩ intervalFiberObjects q 1 := + minLabel_objects_fiber p q + +theorem sieve_finite_attachment_covers (n : ℕ) (hn : 1 ≤ n) {P : Type u} [PartialOrder P] + (A S₁ S₂ : Set P) (h₁ : IsLowerSet S₁) (h₂ : IsLowerSet S₂) + (hA₁ : A ⊆ S₁) (hA₂ : A ⊆ S₂) (hcover : S₁ ∪ S₂ = Set.univ) + {X Y : NCategory.{u} n} (a : (categorificationFinite n).obj (nerve A) ⟶ X) + (h : X ⟶ Y) (i : (categorificationFinite n).obj (nerve P) ⟶ Y) + (H : IsPushout a + ((categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor)) h i) : + ∃ T₁ T₂ : Set Y.val.Objects, + Y.val.IsObjectSieve T₁ ∧ Y.val.IsObjectSieve T₂ ∧ T₁ ∪ T₂ = Set.univ ∧ + IsPosetFiniteAttachmentPiece n A S₁ hA₁ a h i T₁ ∧ + IsPosetFiniteAttachmentPiece n A S₂ hA₂ a h i T₂ ∧ + IsPosetFiniteAttachmentPiece n A (S₁ ∩ S₂) (fun _ hx => ⟨hA₁ hx,hA₂ hx⟩) + a h i (T₁ ∩ T₂) := +by + classical + let l₁ := lowerSegmentLabel S₁ h₁ + let l₂ := lowerSegmentLabel S₂ h₂ + let l₃ : P →o Fin 2 := ⟨fun p => max (l₁ p) (l₂ p), + fun _ _ he => max_le_max (l₁.monotone he) (l₂.monotone he)⟩ + have hl₁ : ∀ p : A, l₁ p.val = 0 := fun p => (lowerSegmentLabel_zero S₁ h₁ _).mpr (hA₁ p.property) + have hl₂ : ∀ p : A, l₂ p.val = 0 := fun p => (lowerSegmentLabel_zero S₂ h₂ _).mpr (hA₂ p.property) + have hl₃ : ∀ p : A, l₃ p.val = 0 := by intro p; change max (l₁ p.val) (l₂ p.val) = 0; rw [hl₁,hl₂]; rfl + have hS₁ : S₁ = {p | l₁ p = 0} := by ext p; exact (lowerSegmentLabel_zero S₁ h₁ p).symm + have hS₂ : S₂ = {p | l₂ p = 0} := by ext p; exact (lowerSegmentLabel_zero S₂ h₂ p).symm + have hS₃ : S₁ ∩ S₂ = {p | l₃ p = 0} := by + ext p + change (p ∈ S₁ ∧ p ∈ S₂) ↔ + max (if p ∈ S₁ then (0 : Fin 2) else 1) (if p ∈ S₂ then 0 else 1) = 0 + by_cases hp₁ : p ∈ S₁ <;> by_cases hp₂ : p ∈ S₂ <;> + simp [hp₁,hp₂] + let η₁ := constantFiniteAttachmentLabel n hn A l₁ 0 hl₁ a h i H + let η₂ := constantFiniteAttachmentLabel n hn A l₂ 0 hl₂ a h i H + let η₃ := constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H + have hη₃ : η₃ = maxFiniteLabel n hn η₁ η₂ := by + apply H.hom_ext + · change h ≫ constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H = _ + rw [constantFiniteAttachmentLabel_old n hn,comp_maxFiniteLabel, + constantFiniteAttachmentLabel_old n hn,constantFiniteAttachmentLabel_old n hn] + rfl + · change i ≫ constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H = _ + rw [constantFiniteAttachmentLabel_new n hn,comp_maxFiniteLabel, + constantFiniteAttachmentLabel_new n hn,constantFiniteAttachmentLabel_new n hn] + exact posetFiniteLabel_max n hn l₁ l₂ + have hp₃ := constant_finite_attachment_old_piece n hn A l₃ 0 hl₃ a h i H + (S₁ ∩ S₂) (fun _ hx => ⟨hA₁ hx,hA₂ hx⟩) hS₃ + change IsPosetFiniteAttachmentPiece n A (S₁ ∩ S₂) _ a h i (intervalFiberObjects η₃ 0) at hp₃ + rw [hη₃,maxFiniteLabel_objects_fiber] at hp₃ + refine ⟨intervalFiberObjects η₁ 0,intervalFiberObjects η₂ 0, + zero_fiber_isObjectSieve η₁,zero_fiber_isObjectSieve η₂,?_, + constant_finite_attachment_old_piece n hn A l₁ 0 hl₁ a h i H S₁ hA₁ hS₁, + constant_finite_attachment_old_piece n hn A l₂ 0 hl₂ a h i H S₂ hA₂ hS₂,hp₃⟩ + refine labelled_finite_objects_cover n hn H η₁ η₂ l₁ l₂ 0 + (Or.inl (constantFiniteAttachmentLabel_old n hn A l₁ 0 hl₁ a h i H)) + (constantFiniteAttachmentLabel_new n hn A l₁ 0 hl₁ a h i H) + (constantFiniteAttachmentLabel_new n hn A l₂ 0 hl₂ a h i H) ?_ + intro p + have hp : p ∈ S₁ ∪ S₂ := by rw [hcover]; trivial + exact hp.imp ((lowerSegmentLabel_zero S₁ h₁ p).mpr) ((lowerSegmentLabel_zero S₂ h₂ p).mpr) + +end Thomason.Attachments + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.Attachments +open CategoryTheory Limits OmegaCategory NormalizedChains.PosetTables + +theorem cosieve_finite_attachment_covers (n : ℕ) (hn : 1 ≤ n) {P : Type u} [PartialOrder P] + (A S₁ S₂ : Set P) (h₁ : IsUpperSet S₁) (h₂ : IsUpperSet S₂) + (hA₁ : A ⊆ S₁) (hA₂ : Disjoint A S₂) (hcover : S₁ ∪ S₂ = Set.univ) + {X Y : NCategory.{u} n} (a : (categorificationFinite n).obj (nerve A) ⟶ X) + (h : X ⟶ Y) (i : (categorificationFinite n).obj (nerve P) ⟶ Y) + (H : IsPushout a + ((categorificationFinite n).map (nerveMap (OrderEmbedding.subtype A).toOrderHom.monotone.functor)) h i) : + ∃ T₁ T₂ : Set Y.val.Objects, + Y.val.IsObjectCosieve T₁ ∧ Y.val.IsObjectCosieve T₂ ∧ T₁ ∪ T₂ = Set.univ ∧ + IsPosetFiniteAttachmentPiece n A S₁ hA₁ a h i T₁ ∧ + IsPosetFiniteNewPiece n S₂ i T₂ ∧ IsPosetFiniteNewPiece n (S₁ ∩ S₂) i (T₁ ∩ T₂) := +by + classical + let l₁ := upperSegmentLabel S₁ h₁ + let l₂ := upperSegmentLabel S₂ h₂ + let l₃ : P →o Fin 2 := ⟨fun p => min (l₁ p) (l₂ p), + fun _ _ he => min_le_min (l₁.monotone he) (l₂.monotone he)⟩ + have hl₁ : ∀ p : A, l₁ p.val = 1 := fun p => (upperSegmentLabel_one S₁ h₁ _).mpr (hA₁ p.property) + have hl₂ : ∀ p : A, l₂ p.val = 0 := by + intro p + have hp : p.val ∉ S₂ := fun hp => Set.disjoint_left.mp hA₂ p.property hp + change (if p.val ∈ S₂ then (1 : Fin 2) else 0) = 0 + simp [hp] + have hl₃ : ∀ p : A, l₃ p.val = 0 := by intro p; change min (l₁ p.val) (l₂ p.val) = 0; rw [hl₁,hl₂]; rfl + have hS₁ : S₁ = {p | l₁ p = 1} := by ext p; exact (upperSegmentLabel_one S₁ h₁ p).symm + have hS₂ : S₂ = {p | l₂ p = 1} := by ext p; exact (upperSegmentLabel_one S₂ h₂ p).symm + have hS₃ : S₁ ∩ S₂ = {p | l₃ p = 1} := by + ext p + change (p ∈ S₁ ∧ p ∈ S₂) ↔ + min (if p ∈ S₁ then (1 : Fin 2) else 0) (if p ∈ S₂ then 1 else 0) = 1 + by_cases hp₁ : p ∈ S₁ <;> by_cases hp₂ : p ∈ S₂ <;> + simp [hp₁,hp₂] + let η₁ := constantFiniteAttachmentLabel n hn A l₁ 1 hl₁ a h i H + let η₂ := constantFiniteAttachmentLabel n hn A l₂ 0 hl₂ a h i H + let η₃ := constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H + have hη₃ : η₃ = minFiniteLabel n hn η₁ η₂ := by + apply H.hom_ext + · change h ≫ constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H = _ + rw [constantFiniteAttachmentLabel_old n hn,comp_minFiniteLabel, + constantFiniteAttachmentLabel_old n hn,constantFiniteAttachmentLabel_old n hn] + rfl + · change i ≫ constantFiniteAttachmentLabel n hn A l₃ 0 hl₃ a h i H = _ + rw [constantFiniteAttachmentLabel_new n hn,comp_minFiniteLabel, + constantFiniteAttachmentLabel_new n hn,constantFiniteAttachmentLabel_new n hn] + exact posetFiniteLabel_min n hn l₁ l₂ + have hp₃ := constant_finite_attachment_new_piece n hn A l₃ 0 hl₃ a h i H + (S₁ ∩ S₂) 1 (by decide) hS₃ + change IsPosetFiniteNewPiece n (S₁ ∩ S₂) i (intervalFiberObjects η₃ 1) at hp₃ + rw [hη₃,minFiniteLabel_objects_fiber] at hp₃ + refine ⟨intervalFiberObjects η₁ 1,intervalFiberObjects η₂ 1, + one_fiber_isObjectCosieve η₁,one_fiber_isObjectCosieve η₂,?_, + constant_finite_attachment_old_piece n hn A l₁ 1 hl₁ a h i H S₁ hA₁ hS₁, + constant_finite_attachment_new_piece n hn A l₂ 0 hl₂ a h i H S₂ 1 (by decide) hS₂,hp₃⟩ + refine labelled_finite_objects_cover n hn H η₁ η₂ l₁ l₂ 1 + (Or.inl (constantFiniteAttachmentLabel_old n hn A l₁ 1 hl₁ a h i H)) + (constantFiniteAttachmentLabel_new n hn A l₁ 1 hl₁ a h i H) + (constantFiniteAttachmentLabel_new n hn A l₂ 0 hl₂ a h i H) ?_ + intro p + have hp : p ∈ S₁ ∪ S₂ := by rw [hcover]; trivial + exact hp.imp ((upperSegmentLabel_one S₁ h₁ p).mpr) ((upperSegmentLabel_one S₂ h₂ p).mpr) + +end Thomason.Attachments + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FiniteChains.lean b/lean/OAI/CategoryTheory/Thomason/FiniteChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..d10b74bb662256b2b238c8dd211a05ccbc6e04ac --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FiniteChains.lean @@ -0,0 +1,267 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SimplexColimits + +namespace OAI + +/-! Finite Chains. -/ + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory NormalizedChains OmegaCategory DirectedComplex +variable {P : Type u} [PartialOrder P] + +structure FiniteVertexChain (P : Type u) [PartialOrder P] where + vertices : Set P + finite : vertices.Finite + total : ∀ a ∈ vertices, ∀ b ∈ vertices, a ≤ b ∨ b ≤ a + +namespace FiniteVertexChain +variable (S : FiniteVertexChain P) + +@[instance_reducible] noncomputable def linearOrder : LinearOrder S.vertices := by + classical + exact { + toPartialOrder := inferInstance + le_total := fun a b => S.total a.val a.property b.val b.property + toDecidableLE := Classical.decRel _ } + +instance finiteType : Finite S.vertices := S.finite.to_subtype + +abbrev inclusion : S.vertices →o P := (OrderEmbedding.subtype S.vertices).toOrderHom + +def inter (T : FiniteVertexChain P) : FiniteVertexChain P where + vertices := S.vertices ∩ T.vertices + finite := S.finite.inter_of_left T.vertices + total := fun a ha b hb => S.total a ha.1 b hb.1 + +def subInclusion (T : FiniteVertexChain P) (h : S.vertices ⊆ T.vertices) : + S.vertices →o T.vertices where + toFun a := ⟨a.val, h a.property⟩ + monotone' := fun _ _ h => h + +abbrev Supports (x : Table (complex P)) : Prop := + ∀ p b, (x.row p b).val ∈ supportedOn S.vertices + +lemma supports_inter (T : FiniteVertexChain P) (x : Table (complex P)) + (hS : S.Supports x) (hT : T.Supports x) : (S.inter T).Supports x := by + intro p b + rw [mem_supportedOn_iff] + intro w hw a ha + exact ⟨(mem_supportedOn_iff _ _).mp (hS p b) w hw a ha, + (mem_supportedOn_iff _ _).mp (hT p b) w hw a ha⟩ + +noncomputable instance tableMap_isIso : IsIso (posetCategorificationTableMap S.vertices) := by + let := S.linearOrder + exact posetCategorificationTableMap_finiteLinear_isIso_all S.vertices + +noncomputable def lift : (complex S.vertices).nu ⟶ categorification.obj (nerve P) := + inv (posetCategorificationTableMap S.vertices) ≫ + categorification.map (CategoryTheory.nerveMap S.inclusion.monotone.functor) + +lemma lift_comp_tableMap : S.lift ≫ posetCategorificationTableMap P = (complexMap S.inclusion).nu := by + unfold lift + rw [Category.assoc, posetCategorificationTableMap_natural, IsIso.inv_hom_id_assoc] + +lemma lift_natural (T : FiniteVertexChain P) (h : S.vertices ⊆ T.vertices) : + (complexMap (S.subInclusion T h)).nu ≫ T.lift = S.lift := by + apply (cancel_epi (posetCategorificationTableMap S.vertices)).mp + rw [← Category.assoc, ← posetCategorificationTableMap_natural, lift, Category.assoc, + IsIso.hom_inv_id_assoc] + unfold lift + rw [IsIso.hom_inv_id_assoc, ← categorification.map_comp] + congr 1 + +lemma table_subInclusion_restrict (T : FiniteVertexChain P) (h : S.vertices ⊆ T.vertices) + (x : Table (complex P)) (hxS : S.Supports x) (hxT : T.Supports x) : + (complexMap (S.subInclusion T h)).table (restrictTable S.vertices x hxS) = + restrictTable T.vertices x hxT := by + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype T.vertices) + have hcomp : T.inclusion.comp (S.subInclusion T h) = S.inclusion := rfl + change (DirectedComplex.Hom.comp (complexMap (S.subInclusion T h)) + (complexMap T.inclusion)).table _ = (complexMap T.inclusion).table _ + rw [← complexMap_comp, hcomp, table_map_restrictTable, table_map_restrictTable] + +noncomputable def liftAt (x : Table (complex P)) (hx : S.Supports x) : + (categorification.obj (nerve P)).Cell := S.lift.map (restrictTable S.vertices x hx) + +lemma liftAt_natural (T : FiniteVertexChain P) (h : S.vertices ⊆ T.vertices) + (x : Table (complex P)) (hxS : S.Supports x) (hxT : T.Supports x) : + S.liftAt x hxS = T.liftAt x hxT := by + have he := congrArg (fun F => F.map (restrictTable S.vertices x hxS)) (S.lift_natural T h) + change T.lift.map ((complexMap (S.subInclusion T h)).table _) = S.liftAt x hxS at he + rw [S.table_subInclusion_restrict T h x hxS hxT] at he + exact he.symm + +lemma liftAt_independent (T : FiniteVertexChain P) (x : Table (complex P)) + (hxS : S.Supports x) (hxT : T.Supports x) : S.liftAt x hxS = T.liftAt x hxT := by + have hU := S.supports_inter T x hxS hxT + exact ((S.inter T).liftAt_natural S Set.inter_subset_left x hU hxS).symm.trans + ((S.inter T).liftAt_natural T Set.inter_subset_right x hU hxT) + +lemma liftAt_table (x : Table (complex P)) (hx : S.Supports x) : + (posetCategorificationTableMap P).map (S.liftAt x hx) = x := by + have he := congrArg (fun F => F.map (restrictTable S.vertices x hx)) S.lift_comp_tableMap + exact he.trans (table_map_restrictTable S.vertices x hx) + +lemma restrict_truncate (x : Table (complex P)) (hx : S.Supports x) (k : ℕ) (e : Bool) + (ht : S.Supports (Table.truncate k e x)) : + restrictTable S.vertices (Table.truncate k e x) ht = + Table.truncate k e (restrictTable S.vertices x hx) := by + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S.vertices) + rw [table_map_restrictTable, DirectedComplex.Hom.table_truncate, table_map_restrictTable] + +lemma restrict_composable (k : ℕ) (x y : Table (complex P)) + (h : Table.truncate k true x = Table.truncate k false y) + (hx : S.Supports x) (hy : S.Supports y) : + Table.truncate k true (restrictTable S.vertices x hx) = + Table.truncate k false (restrictTable S.vertices y hy) := by + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S.vertices) + rw [DirectedComplex.Hom.table_truncate, DirectedComplex.Hom.table_truncate, + table_map_restrictTable, table_map_restrictTable, h] + +lemma restrict_comp (k : ℕ) (x y : Table (complex P)) + (h : Table.truncate k true x = Table.truncate k false y) + (hx : S.Supports x) (hy : S.Supports y) (hz : S.Supports (Table.comp k x y h)) : + restrictTable S.vertices (Table.comp k x y h) hz = + Table.comp k (restrictTable S.vertices x hx) (restrictTable S.vertices y hy) + (S.restrict_composable k x y h hx hy) := by + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S.vertices) + rw [table_map_restrictTable] + have he := (complexMap S.inclusion).table_comp k _ _ + (S.restrict_composable k x y h hx hy) (by + rw [table_map_restrictTable, table_map_restrictTable]; exact h) + dsimp only [inclusion] at he + apply Eq.trans ?_ he.symm + ext p b + simp only [Table.comp_row] + rw [table_map_restrictTable S.vertices x hx, table_map_restrictTable S.vertices y hy] + +end FiniteVertexChain + +noncomputable def tableChainSupport (x : Table (complex P)) : FiniteVertexChain P := + let h := table_finite_chain_support x + ⟨h.choose, h.choose_spec.1, h.choose_spec.2.1⟩ + +lemma tableChainSupport_supports (x : Table (complex P)) : (tableChainSupport x).Supports x := + (table_finite_chain_support x).choose_spec.2.2 + +noncomputable def posetTableInverseMap (x : Table (complex P)) : + (categorification.obj (nerve P)).Cell := + (tableChainSupport x).liftAt x (tableChainSupport_supports x) + +lemma posetTableInverseMap_eq (S : FiniteVertexChain P) (x : Table (complex P)) (hx : S.Supports x) : + posetTableInverseMap x = S.liftAt x hx := + (tableChainSupport x).liftAt_independent S x (tableChainSupport_supports x) hx + +noncomputable def posetTableInverse (P : Type u) [PartialOrder P] : + (complex P).nu ⟶ categorification.obj (nerve P) where + map := posetTableInverseMap + map_source k x := by + let S := tableChainSupport x + have hx : S.Supports x := tableChainSupport_supports x + have ht : S.Supports (Table.truncate k false x) := table_truncate_supported S.vertices x hx k false + change posetTableInverseMap (Table.truncate k false x) = _ + rw [posetTableInverseMap_eq S x hx, posetTableInverseMap_eq S _ ht] + unfold FiniteVertexChain.liftAt + rw [S.restrict_truncate x hx k false ht] + exact S.lift.map_source k _ + map_target k x := by + let S := tableChainSupport x + have hx : S.Supports x := tableChainSupport_supports x + have ht : S.Supports (Table.truncate k true x) := table_truncate_supported S.vertices x hx k true + change posetTableInverseMap (Table.truncate k true x) = _ + rw [posetTableInverseMap_eq S x hx, posetTableInverseMap_eq S _ ht] + unfold FiniteVertexChain.liftAt + rw [S.restrict_truncate x hx k true ht] + exact S.lift.map_target k _ + map_comp k x y h h' := by + let S := tableChainSupport (Table.comp k x y h) + have hz : S.Supports (Table.comp k x y h) := tableChainSupport_supports _ + obtain ⟨hx,hy⟩ := table_comp_supported_factors S.vertices k x y h hz + change posetTableInverseMap (Table.comp k x y h) = _ + revert h' + rw [posetTableInverseMap_eq S x hx, posetTableInverseMap_eq S y hy, + posetTableInverseMap_eq S _ hz] + intro h' + unfold FiniteVertexChain.liftAt at h' ⊢ + rw [S.restrict_comp k x y h hx hy hz] + exact S.lift.map_comp k _ _ (S.restrict_composable k x y h hx hy) h' + +lemma posetTableInverse_comp_tableMap (P : Type u) [PartialOrder P] : + posetTableInverse P ≫ posetCategorificationTableMap P = 𝟙 _ := by + apply OmegaCategory.Functor.ext + funext x + exact (tableChainSupport x).liftAt_table x (tableChainSupport_supports x) + +lemma posetTableInverse_on_chain (S : FiniteVertexChain P) : + (complexMap S.inclusion).nu ≫ posetTableInverse P = S.lift := by + apply OmegaCategory.Functor.ext + funext x + have hx : S.Supports ((complexMap S.inclusion).table x) := by + intro p b + exact map_mem_supportedOn S.vertices (x.row p b).val + change posetTableInverseMap ((complexMap S.inclusion).table x) = S.lift.map x + rw [posetTableInverseMap_eq S _ hx] + unfold FiniteVertexChain.liftAt + congr 1 + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S.vertices) + exact table_map_restrictTable S.vertices _ hx + +noncomputable def finiteRangeChain {Q : Type u} [LinearOrder Q] [Finite Q] + (f : Q →o P) : FiniteVertexChain P where + vertices := Set.range f + finite := Set.finite_range f + total := by + rintro _ ⟨a,rfl⟩ _ ⟨b,rfl⟩ + exact (le_total a b).imp (fun h => f.monotone h) (fun h => f.monotone h) + +def finiteRangeFactor {Q : Type u} [LinearOrder Q] [Finite Q] (f : Q →o P) : + Q →o (finiteRangeChain f).vertices where + toFun a := ⟨f a, a, rfl⟩ + monotone' := f.monotone + +attribute [local instance] posetCategorificationTableMap_finiteLinear_isIso_all + +lemma posetTableInverse_finite_natural {Q : Type u} [LinearOrder Q] [Finite Q] + (f : Q →o P) : + (complexMap f).nu ≫ posetTableInverse P = + inv (posetCategorificationTableMap Q) ≫ + categorification.map (CategoryTheory.nerveMap f.monotone.functor) := by + let S := finiteRangeChain f + let g := finiteRangeFactor f + have hf : S.inclusion.comp g = f := rfl + rw [← hf, complexMap_comp] + change ((complexMap g).nu : (complex Q).nu ⟶ (complex S.vertices).nu) ≫ + ((complexMap S.inclusion).nu ≫ posetTableInverse P) = _ + rw [posetTableInverse_on_chain] + apply (cancel_epi (posetCategorificationTableMap Q)).mp + rw [← Category.assoc, ← posetCategorificationTableMap_natural] + unfold FiniteVertexChain.lift + rw [Category.assoc, IsIso.hom_inv_id_assoc, IsIso.hom_inv_id_assoc, + ← categorification.map_comp] + rfl + +lemma posetCategorificationTableMap_comp_inverse (P : Type u) [PartialOrder P] : + posetCategorificationTableMap P ≫ posetTableInverse P = 𝟙 _ := by + apply (posetSimplexIsColimit P).hom_ext + intro s + change categorification.map (CategoryTheory.nerveMap (simplexVertexOrder s).monotone.functor) ≫ + (posetCategorificationTableMap P ≫ posetTableInverse P) = + categorification.map (CategoryTheory.nerveMap (simplexVertexOrder s).monotone.functor) ≫ 𝟙 _ + rw [← Category.assoc, posetCategorificationTableMap_natural, Category.assoc, + posetTableInverse_finite_natural] + rw [IsIso.hom_inv_id_assoc, Category.comp_id] + +noncomputable instance posetCategorificationTableMap_isIso (P : Type u) [PartialOrder P] : + IsIso (posetCategorificationTableMap P) := + ⟨⟨posetTableInverse P, posetCategorificationTableMap_comp_inverse P, + posetTableInverse_comp_tableMap P⟩⟩ + +end Thomason + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/FiniteGluing.lean b/lean/OAI/CategoryTheory/Thomason/FiniteGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..506007114cdcfb07161bb71624e77e9938799f65 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/FiniteGluing.lean @@ -0,0 +1,745 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.RankedAtoms + +namespace OAI + +/-! Finite Gluing. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.RankedAtoms +open Table OmegaCategory CategoryTheory +variable {K : DirectedComplex.{u}} (A : RankedAtoms.{u,v} K) +include A + +lemma positive_add_zero {p : ℕ} {x y : K.Chain p} + (hx : x ∈ K.positive p) (hy : y ∈ K.positive p) (h : x+y=0) : x=0 ∧ y=0 := by + have he (b : A.Index) : A.coefficient b p x = 0 ∧ A.coefficient b p y = 0 := by + have hh := congrArg (A.coefficient b p) h + rw [map_add,map_zero] at hh + have hx' := (A.positive p x).mp hx b + have hy' := (A.positive p y).mp hy b + omega + exact ⟨A.ext p x 0 (fun b => (he b).1.trans (map_zero _).symm), + A.ext p y 0 (fun b => (he b).2.trans (map_zero _).symm)⟩ + +lemma comp_dimension_factors {k n : ℕ} (x y : Table K) + (h : truncate k true x = truncate k false y) + (hz : truncate n false (comp k x y h) = comp k x y h) : + truncate n false x = x ∧ truncate n false y = y := by + have habove (p : ℕ) (hp : max n k < p) (b : Bool) : + x.row p b = 0 ∧ y.row p b = 0 := by + have he := row_above_fixed (comp k x y h) hz (by omega : n < p) b + rw [comp_row] at he + simp only [show ¬p < k by omega, show p ≠ k by omega, ite_false] at he + exact A.positive_add_zero (x.positive p b) (y.positive p b) he + have hx := dimension_of_rows_above_zero x (fun p hp b => (habove p hp b).1) + have hy := dimension_of_rows_above_zero y (fun p hp b => (habove p hp b).2) + by_cases hkn : k ≤ n + · simpa only [max_eq_left hkn] using And.intro hx hy + · have hnk : n ≤ k := by omega + rw [max_eq_right hnk] at hx hy + have hz' : truncate k false (comp k x y h) = comp k x y h := + K.nu.source_fixed_upwards hnk hz + have hz'' : truncate k true (comp k x y h) = comp k x y h := + K.nu.target_eq_self_of_source_eq_self hz' + have hzx : comp k x y h = x := by rw [← hz', source_comp_le k k le_rfl, hx] + have hzy : comp k x y h = y := by + rw [← hz'', target_comp_le k k le_rfl] + exact K.nu.target_eq_self_of_source_eq_self hy + exact ⟨hzx ▸ hz, hzy ▸ hz⟩ + +lemma atom_dimension_le {n : ℕ} (b : A.Index) + (h : truncate n false (A.atom b) = A.atom b) : A.dim b ≤ n := by + by_contra hn + have hz := row_above_fixed (A.atom b) h (by omega : n < A.dim b) false + have ht := A.top b b false + rw [hz,map_zero] at ht + simp at ht + +inductive BoundedPasting (n : ℕ) : Table K → Prop + | atom (b : A.Index) : A.dim b ≤ n → BoundedPasting n (A.atom b) + | compose (k : ℕ) (hk : k < n) (x y) + (h : truncate k true x = truncate k false y) : + BoundedPasting n x → BoundedPasting n y → BoundedPasting n (comp k x y h) + +lemma bounded_pasting (n : ℕ) (x : Table K) (hx : truncate n false x = x) : + A.BoundedPasting n x := by + have hh := A.all_atomic x + induction hh with + | atom b => exact .atom b (A.atom_dimension_le b hx) + | compose k x y h hx' hy' ihx ihy => + obtain ⟨hdx,hdy⟩ := A.comp_dimension_factors x y h hx + by_cases hk : k < n + · exact .compose k hk x y h (ihx hdx) (ihy hdy) + · have he : comp k x y h = y := K.nu.comp_of_left_source_fixed k x y h + (K.nu.source_fixed_upwards (by omega : n ≤ k) hdx) + rw [he] + exact ihy hdy + +lemma functor_ext {C : OmegaCategory.{w}} (F G : OmegaCategory.Functor K.nu C) + (h : ∀ b, F.map (A.atom b) = G.map (A.atom b)) : F = G := by + apply OmegaCategory.Functor.ext + funext x + induction A.all_atomic x with + | atom b => exact h b + | compose k x y hxy hx hy ihx ihy => + change F.map (K.nu.comp k x y hxy) = G.map (K.nu.comp k x y hxy) + rw [F.map_comp k x y hxy (F.map_composable hxy), + G.map_comp k x y hxy (G.map_composable hxy)] + congr 1 + +lemma surjective_onCells_of_lower_injective {C : OmegaCategory.{w}} + (F : OmegaCategory.Functor C K.nu) (n : ℕ) + (hlower : ∀ k, k < n → Function.Injective (F.onCells k)) + (hatom : ∀ b, A.dim b ≤ n → ∃ x : C.Cells n, F.map x.val = A.atom b) : + Function.Surjective (F.onCells n) := by + have hlift (t : Table K) (hp : A.BoundedPasting n t) : + ∃ y : C.Cells n, F.map y.val = t := by + induction hp with + | atom b hb => exact hatom b hb + | compose k hk x y hxy hpx hpy ihx ihy => + obtain ⟨a,ha⟩ := ihx + obtain ⟨b,hb⟩ := ihy + have hm : C.target k a.val = C.source k b.val := by + exact congrArg Subtype.val + (hlower k hk (a₁ := ⟨C.target k a.val,C.source_target_self k a.val⟩) + (a₂ := ⟨C.source k b.val,C.source_source_self k b.val⟩) + (Subtype.ext (by change F.map _ = F.map _; rw [F.map_target,F.map_source,ha,hb]; exact hxy))) + refine ⟨C.gradedComp hk a b hm, ?_⟩ + change F.map (C.comp k a.val b.val hm) = _ + rw [F.map_comp k a.val b.val hm (F.map_composable hm)] + change K.nu.comp k (F.map a.val) (F.map b.val) _ = K.nu.comp k x y hxy + congr 1 + intro x + obtain ⟨y,hy⟩ := hlift x.val (A.bounded_pasting n x.val x.property) + exact ⟨y,Subtype.ext hy⟩ + +lemma epi_of_atoms_in_range {C : OmegaCategory.{u}} + (F : C ⟶ K.nu) (hatom : ∀ b, ∃ x : C.Cell, F.map x = A.atom b) : Epi F where + left_cancellation G H he := by + apply A.functor_ext G H + intro b + obtain ⟨x,hx⟩ := hatom b + have h := congrArg (fun f : C ⟶ _ => f.map x) he + change G.map (F.map x) = H.map (F.map x) at h + rw [hx] at h + exact h + +end Thomason.DirectedComplex.RankedAtoms + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.RankedAtoms +open Table +variable {K : DirectedComplex.{u}} {L : DirectedComplex.{w}} + +def transport (A : RankedAtoms.{u,v} K) (f : Hom K L) (g : Hom L K) + (hfg : Hom.comp f g = Hom.id K) (hgf : Hom.comp g f = Hom.id L) : + RankedAtoms.{w,v} L where + Index := A.Index + finite := A.finite + dim := A.dim + rank := A.rank + atom b := f.table (A.atom b) + bounded b := by rw [← Hom.table_truncate,A.bounded] + coefficient b p := (A.coefficient b p).comp (g.map p) + homogeneous b p x := A.homogeneous b p (g.map p x) + ext p x y he := by + have hh : g.map p x = g.map p y := A.ext p _ _ he + have hi (z : L.Chain p) : f.map p (g.map p z) = z := + congrArg (fun h : Hom L L => h.map p z) hgf + exact (hi x).symm.trans ((congrArg (f.map p) hh).trans (hi y)) + positive p x := by + constructor + · intro hx + exact (A.positive p _).mp (g.map_positive p x hx) + · intro hx + have hh := f.map_positive p _ ((A.positive p _).mpr hx) + change f.map p (g.map p x) ∈ _ at hh + have hi : f.map p (g.map p x) = x := congrArg (fun h : Hom L L => h.map p x) hgf + rwa [hi] at hh + top b c e := by + change A.coefficient c (A.dim b) (g.map _ (f.map _ ((A.atom b).row (A.dim b) e))) = _ + have hi (z : K.Chain (A.dim b)) : g.map _ (f.map _ z) = z := + congrArg (fun h : Hom K K => h.map (A.dim b) z) hfg + rw [hi,A.top] + ranked b p hp e c hc := by + change A.coefficient c p (g.map _ (f.map _ ((A.atom b).row p e))) ≠ 0 at hc + have hi (z : K.Chain p) : g.map _ (f.map _ z) = z := + congrArg (fun h : Hom K K => h.map p z) hfg + rw [hi] at hc + exact A.ranked b p hp e c hc + +end Thomason.DirectedComplex.RankedAtoms + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains +open DirectedComplex + +lemma complexMap_orderIso_inverse {P : Type u} {Q : Type v} + [PartialOrder P] [PartialOrder Q] (e : P ≃o Q) : + Hom.comp (complexMap (e : P →o Q)) (complexMap (e.symm : Q →o P)) = Hom.id (complex P) := by + rw [← complexMap_comp] + have he : (e.symm : Q →o P).comp (e : P →o Q) = OrderHom.id := by + ext x; exact e.symm_apply_apply x + rw [he,complexMap_id] + +namespace Prism.Basis + +def ofOrderIso {N : ℕ} {P : Type u} [LinearOrder P] (e : Fin (N+1) ≃o P) : + RankedAtoms (complex P).cylinder := + (rankedAtoms N).transport (complexMap (e : Fin (N+1) →o P)).cylinder + (complexMap (e.symm : P →o Fin (N+1))).cylinder + (by rw [← Hom.cylinder_comp,complexMap_orderIso_inverse,Hom.cylinder_id]) + (by rw [← Hom.cylinder_comp, ← Hom.cylinder_id]; + congr 1; exact complexMap_orderIso_inverse e.symm) + +end Prism.Basis +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive.IntervalHom +open CategoryTheory DirectedComplex Table OmegaCategory NormalizedChains + +variable {N : ℕ} {P : Type u} [LinearOrder P] + +lemma chainComparison_atom_lift (e : Fin (N+1) ≃o P) + (b : (Prism.Basis.ofOrderIso e).Index) : + ∃ x : (tensorFunctor.obj (NormalizedChains.complex P).nu).Cells + ((Prism.Basis.ofOrderIso e).dim b), + (chainComparison (NormalizedChains.complex P)).map x.val = (Prism.Basis.ofOrderIso e).atom b := by + let M := NormalizedChains.complex P + let f := complexMap (e : Fin (N+1) →o P) + change ∃ x : (tensorFunctor.obj M.nu).Cells (Prism.Basis.dim b), + (chainComparison M).map x.val = f.cylinder.table (Prism.Basis.atom b) + cases b with + | endpoint a w => + let x := f.table w.atom + have hx : M.nu.source w.dim x = x := by + change truncate w.dim false (f.table w.atom) = f.table w.atom + rw [← Hom.table_truncate,w.atom_dim] + refine ⟨⟨((tensorEndpoint a).app M.nu).map x, ?_⟩, ?_⟩ + · change (tensorFunctor.obj M.nu).source w.dim _ = _ + erw [endpoint_source,hx] + · rw [chainComparison_endpoint_apply] + exact (congrArg (fun h : Hom (NormalizedChains.complex (Fin (N+1))) M.cylinder => + h.table w.atom) (f.cylinder_endpoint a)).symm + | vertical w => + let x := f.table w.atom + have hx : M.nu.source w.dim x = x := by + change truncate w.dim false (f.table w.atom) = f.table w.atom + rw [← Hom.table_truncate,w.atom_dim] + refine ⟨⟨verticalCell w.dim ⟨x,hx⟩, verticalCell_bounded _ _⟩, ?_⟩ + erw [chainComparison_verticalCell w.dim ⟨x,hx⟩] + exact (verticalTable_natural f w.atom).symm + +lemma chainComparison_finiteSimplex_epi (P : Type u) [LinearOrder P] [Finite P] : + Epi (chainComparison (NormalizedChains.complex P)) := by + let := Fintype.ofFinite P + by_cases he : Fintype.card P = 0 + · let : IsEmpty P := Fintype.card_eq_zero_iff.mp he + infer_instance + · have hp : Fintype.card P = (Fintype.card P - 1) + 1 := by omega + let e := Fintype.orderIsoFinOfCardEq P hp + apply (Prism.Basis.ofOrderIso e).epi_of_atoms_in_range + intro b + obtain ⟨x,hx⟩ := chainComparison_atom_lift e b + exact ⟨x.val,hx⟩ + +lemma chainComparison_finiteSimplex_three_surjective (P : Type u) [LinearOrder P] [Finite P] : + Function.Surjective ((chainComparison (NormalizedChains.complex P)).onCells 3) := by + let := Fintype.ofFinite P + by_cases he : Fintype.card P = 0 + · let : IsEmpty P := Fintype.card_eq_zero_iff.mp he + intro t + exact isEmptyElim (PosetTables.tableStart + ((NormalizedChains.complex P).cylinderProjection.table t.val)) + · have hp : Fintype.card P = (Fintype.card P - 1) + 1 := by omega + let e := Fintype.orderIsoFinOfCardEq P hp + apply (Prism.Basis.ofOrderIso e).surjective_onCells_of_lower_injective + · intro k hk x y hxy + apply Subtype.ext + exact chainComparison_twocells_injective x.val y.val + ((tensorFunctor.obj (NormalizedChains.complex P).nu).source_fixed_upwards (by omega : k ≤ 2) x.property) + ((tensorFunctor.obj (NormalizedChains.complex P).nu).source_fixed_upwards (by omega : k ≤ 2) y.property) + (congrArg Subtype.val hxy) + · intro b hb + obtain ⟨x,hx⟩ := chainComparison_atom_lift e b + exact ⟨⟨x.val, (tensorFunctor.obj (NormalizedChains.complex P).nu).source_fixed_upwards hb x.property⟩,hx⟩ +end Thomason.GrayRecursive.IntervalHom + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory.Functor +open CategoryTheory +variable {C D E : OmegaCategory.{u}} (F : C ⟶ D) {n : ℕ} + +def liftNCell (hn : Function.Bijective (F.onCells n)) (x : D.Cell) : C.Cells n := + (Equiv.ofBijective (F.onCells n) hn).symm ⟨D.source n x, D.source_source_self n x⟩ + +lemma map_liftNCell (hn : Function.Bijective (F.onCells n)) (x : D.Cell) : + F.map (F.liftNCell hn x).val = D.source n x := + congrArg Subtype.val ((Equiv.ofBijective (F.onCells n) hn).apply_symm_apply + ⟨D.source n x, D.source_source_self n x⟩) + +lemma liftNCell_unique (hn : Function.Bijective (F.onCells n)) (x : D.Cell) + (y : C.Cell) (hy : C.source n y = y) (he : F.map y = D.source n x) : + (F.liftNCell hn x).val = y := by + exact congrArg Subtype.val (hn.1 (a₁ := F.liftNCell hn x) (a₂ := ⟨y,hy⟩) + (Subtype.ext ((F.map_liftNCell hn x).trans he.symm))) + +lemma liftNCell_source (hn : Function.Bijective (F.onCells n)) (k : ℕ) (x : D.Cell) : + (F.liftNCell hn (D.source k x)).val = C.source k (F.liftNCell hn x).val := by + apply F.liftNCell_unique hn + · rw [C.source_source, min_comm, ← C.source_source, (F.liftNCell hn x).property] + · rw [F.map_source,F.map_liftNCell,D.source_source,D.source_source,min_comm] + +lemma liftNCell_target_lt (hn : Function.Bijective (F.onCells n)) (k : ℕ) (hk : k < n) + (x : D.Cell) : + (F.liftNCell hn (D.target k x)).val = C.target k (F.liftNCell hn x).val := by + apply F.liftNCell_unique hn + · exact C.source_fixed_upwards (by omega : k ≤ n) (C.source_target_self k _) + · rw [F.map_target,F.map_liftNCell,D.target_source,ite_eq_left hk,D.source_target,ite_eq_right (by omega : ¬n < k)] + +lemma map_liftNCell_map (hn : Function.Bijective (F.onCells n)) (G : C ⟶ E) + (hE : E.IsTruncated n) (x : C.Cell) : G.map (F.liftNCell hn (F.map x)).val = G.map x := by + rw [F.liftNCell_unique hn (F.map x) (C.source n x) + (C.source_source_self _ _) (F.map_source _ _), G.map_source,hE] + +lemma map_liftNCell_faces (hn : Function.Bijective (F.onCells n)) + (hs : Function.Surjective (F.onCells (n+1))) (G : C ⟶ E) (hE : E.IsTruncated n) + (x : D.Cell) : + G.map (F.liftNCell hn (D.target n x)).val = G.map (F.liftNCell hn x).val := by + obtain ⟨z,hz⟩ := hs ⟨D.source (n+1) x,D.source_source_self _ _⟩ + have he : F.map z.val = D.source (n+1) x := congrArg Subtype.val hz + have hsource : (F.liftNCell hn x).val = C.source n z.val := by + apply F.liftNCell_unique hn + · exact C.source_source_self _ _ + · rw [F.map_source, he, D.source_source, min_eq_left (by omega : n ≤ n+1)] + have htarget : (F.liftNCell hn (D.target n x)).val = C.target n z.val := by + apply F.liftNCell_unique hn + · exact C.source_target_self _ _ + · rw [F.map_target,he,D.target_source,ite_eq_left (by omega : n < n+1),D.source_target_self] + rw [hsource,htarget,G.map_source,G.map_target,hE] + exact E.target_eq_self_of_source_eq_self (hE _) + +def descendTruncated (hn : Function.Bijective (F.onCells n)) + (hs : Function.Surjective (F.onCells (n+1))) (G : C ⟶ E) (hE : E.IsTruncated n) : D ⟶ E where + map x := G.map (F.liftNCell hn x).val + map_source k x := by rw [F.liftNCell_source,G.map_source] + map_target k x := by + by_cases hk : k < n + · rw [F.liftNCell_target_lt hn k hk,G.map_target] + · have hnk : n ≤ k := by omega + rw [E.target_eq_self_of_source_eq_self (E.source_fixed_upwards hnk (hE _))] + by_cases he : n = k + · subst k + exact F.map_liftNCell_faces hn hs G hE x + · congr 1 + apply F.liftNCell_unique hn + · exact (F.liftNCell hn x).property + · rw [F.map_liftNCell,D.source_target,ite_eq_left (by omega : n < k)] + map_comp k x y h h' := by + by_cases hk : k < n + · have hm : C.target k (F.liftNCell hn x).val = C.source k (F.liftNCell hn y).val := by + refine congrArg (fun z : C.Cells n => z.val) + (hn.1 (a₁ := ⟨_,C.source_fixed_upwards (by omega : k ≤ n) (C.source_target_self k _)⟩) + (a₂ := ⟨_,C.source_fixed_upwards (by omega : k ≤ n) (C.source_source_self k _)⟩) + (Subtype.ext ?_)) + change F.map (C.target k _) = F.map (C.source k _) + rw [F.map_target,F.map_source,F.map_liftNCell,F.map_liftNCell, + D.target_source,ite_eq_left hk,D.source_source,min_eq_left (Nat.le_of_lt hk)] + exact h + have hb : C.source n (C.comp k (F.liftNCell hn x).val (F.liftNCell hn y).val hm) = + C.comp k (F.liftNCell hn x).val (F.liftNCell hn y).val hm := by + rw [C.source_comp_gt n k hk _ _ hm (C.source_composable hk hm)] + congr 1 <;> exact (F.liftNCell hn _).property + have he : (F.liftNCell hn (D.comp k x y h)).val = + C.comp k (F.liftNCell hn x).val (F.liftNCell hn y).val hm := by + apply F.liftNCell_unique hn _ _ hb + rw [F.map_comp k _ _ hm (F.map_composable hm), D.source_comp_gt n k hk _ _ h (D.source_composable hk h)] + congr 1 <;> exact F.map_liftNCell hn _ + rw [he,G.map_comp] + · have hnk : n ≤ k := by omega + rw [E.comp_of_right_source_fixed k _ _ h' + (E.source_fixed_upwards hnk (hE _))] + congr 1 + apply F.liftNCell_unique hn + · exact (F.liftNCell hn x).property + · rw [F.map_liftNCell,D.source_comp_le n k hnk] + +lemma descendTruncated_fac (hn : Function.Bijective (F.onCells n)) + (hs : Function.Surjective (F.onCells (n+1))) (G : C ⟶ E) (hE : E.IsTruncated n) : + F ≫ F.descendTruncated hn hs G hE = G := by + apply Functor.ext + funext x + exact F.map_liftNCell_map hn G hE x + +lemma precomp_injective_of_cells_surjective (hn : Function.Surjective (F.onCells n)) + (hE : E.IsTruncated n) : Function.Injective (fun G : D ⟶ E => F ≫ G) := by + intro G H he + apply Functor.ext + funext x + obtain ⟨y,hy⟩ := hn ⟨D.source n x,D.source_source_self _ _⟩ + have he' := congrArg (fun I : C ⟶ E => I.map y.val) he + change G.map (F.map y.val) = H.map (F.map y.val) at he' + have hy' : F.map y.val = D.source n x := congrArg Subtype.val hy + rw [hy',G.map_source,H.map_source,hE,hE] at he' + exact he' + +theorem precomp_bijective_truncated (hn : Function.Bijective (F.onCells n)) + (hs : Function.Surjective (F.onCells (n+1))) (hE : E.IsTruncated n) : + Function.Bijective (fun G : D ⟶ E => F ≫ G) := + ⟨F.precomp_injective_of_cells_surjective hn.2 hE, + fun G => ⟨F.descendTruncated hn hs G hE,F.descendTruncated_fac hn hs G hE⟩⟩ + +end Thomason.OmegaCategory.Functor + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits + +structure RightIntervalCore where + tensor : OmegaCategory.{u} ⥤ OmegaCategory.{u} + endpoint : Bool → ((𝟭 OmegaCategory.{u}) ⟶ tensor) + projection : tensor ⟶ (𝟭 OmegaCategory.{u}) + endpoint_projection : ∀ b, endpoint b ≫ projection = 𝟙 (𝟭 OmegaCategory.{u}) + cocontinuous : PreservesColimitsOfSize.{u,u} tensor + rightAdjoint : tensor.IsLeftAdjoint + simplex : ∀ (P : Type u) [LinearOrder P] [Finite P], + tensor.obj (NormalizedChains.complex P).nu ⟶ + (NormalizedChains.complex P).cylinder.nu + simplex_natural : ∀ (P Q : Type u) [LinearOrder P] [Finite P] + [LinearOrder Q] [Finite Q] + (a : DirectedComplex.Hom (NormalizedChains.complex P) (NormalizedChains.complex Q)), + tensor.map a.nu ≫ simplex Q = simplex P ≫ a.cylinder.nu + simplex_endpoint : ∀ (P : Type u) [LinearOrder P] [Finite P] (b : Bool), + (endpoint b).app (NormalizedChains.complex P).nu ≫ simplex P = + ((NormalizedChains.complex P).cylinderEndpoint b).nu + simplex_projection : ∀ (P : Type u) [LinearOrder P] [Finite P], + simplex P ≫ (NormalizedChains.complex P).cylinderProjection.nu = + projection.app (NormalizedChains.complex P).nu + globe : ∀ n : ℕ, tensor.obj (GlobeComplex.complex.{u} n).nu ≅ + (GlobeComplex.complex.{u} n).cylinder.nu + globe_natural : ∀ (n m : ℕ) + (a : DirectedComplex.Hom (GlobeComplex.complex.{u} n) (GlobeComplex.complex.{u} m)), + tensor.map a.nu ≫ (globe m).hom = (globe n).hom ≫ a.cylinder.nu + globe_endpoint : ∀ (n : ℕ) (b : Bool), + (endpoint b).app (GlobeComplex.complex.{u} n).nu ≫ (globe n).hom = + ((GlobeComplex.complex.{u} n).cylinderEndpoint b).nu + globe_projection : ∀ n : ℕ, + (globe n).hom ≫ (GlobeComplex.complex.{u} n).cylinderProjection.nu = + projection.app (GlobeComplex.complex.{u} n).nu + +namespace GrayRecursive.IntervalHom + +def intervalCore : RightIntervalCore.{u} where + tensor := tensorFunctor + endpoint := tensorEndpoint + projection := tensorProjection + endpoint_projection := tensorEndpoint_projection + cocontinuous := tensorFunctor_preservesColimits + rightAdjoint := tensorFunctor_isLeftAdjoint + simplex P _ _ := chainComparison (NormalizedChains.complex P) + simplex_natural _ _ _ _ _ _ a := chainComparison_natural a + simplex_endpoint P _ _ b := chainComparison_endpoint (NormalizedChains.complex P) b + simplex_projection P _ _ := chainComparison_projection (NormalizedChains.complex P) + globe := globeTensorIso + globe_natural := globeTensorIso_natural + globe_endpoint := globeTensorIso_endpoint + globe_projection := globeTensorIso_projection + +lemma chainComparison_precomp_bijective_two (P : Type u) [LinearOrder P] [Finite P] + (Y : OmegaCategory.{u}) (hY : Y.IsTruncated 2) : + Function.Bijective (fun G : (NormalizedChains.complex P).cylinder.nu ⟶ Y => + chainComparison (NormalizedChains.complex P) ≫ G) := + (chainComparison (NormalizedChains.complex P)).precomp_bijective_truncated + (chainComparison_poset_twocells_bijective P) + (chainComparison_finiteSimplex_three_surjective P) hY + +end GrayRecursive.IntervalHom +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalCore +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +lemma internalHom_truncated (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + {Y : OmegaCategory.{u}} {k : ℕ} (hk : Y.IsTruncated k) : + (R.obj Y).IsTruncated k := by + intro x + obtain ⟨i,hi⟩ := (R.obj Y).finite_dimension x + let F : (complex i).nu ⟶ R.obj Y := lift x hi + let P : T.tensor.obj (complex i).nu ⟶ Y := (adj.homEquiv _ _).symm F + let G : (complex i).cylinder.nu ⟶ Y := (T.globe i).inv ≫ P + let q := sourceCollapse.{u} i k + have hG : q.cylinder.nu ≫ G = G := + GrayRecursive.sourceCollapse_cylinder_truncated hk G + have he : P = (T.globe i).hom ≫ G := by + dsimp [G] + simp + have hP : T.tensor.map q.nu ≫ P = P := by + calc + T.tensor.map q.nu ≫ P = T.tensor.map q.nu ≫ (T.globe i).hom ≫ G := by rw [← he] + _ = (T.globe i).hom ≫ q.cylinder.nu ≫ G := by + rw [← Category.assoc, T.globe_natural, Category.assoc] + _ = (T.globe i).hom ≫ G := by rw [hG] + _ = P := he.symm + have hF : q.nu ≫ F = F := by + calc + q.nu ≫ F = q.nu ≫ (adj.homEquiv _ _) P := by rw [Equiv.apply_symm_apply] + _ = (adj.homEquiv _ _) (T.tensor.map q.nu ≫ P) := + (adj.homEquiv_naturality_left q.nu P).symm + _ = (adj.homEquiv _ _) P := by rw [hP] + _ = F := Equiv.apply_symm_apply _ _ + have hh := congrArg (fun f : (complex i).nu ⟶ R.obj Y => f.map (topTable i)) hF + change F.map (q.nu.map (topTable i)) = F.map (topTable i) at hh + rw [sourceCollapse_top] at hh + change F.map ((complex i).nu.source k (topTable i)) = F.map (topTable i) at hh + erw [F.map_source] at hh + simpa only [F, lift_top] using hh + +def truncatedCylinderEquiv (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (k : ℕ) (X Y : OmegaCategory.{u}) (hk : Y.IsTruncated k) : + (T.tensor.obj (truncation k X).val ⟶ Y) ≃ (T.tensor.obj X ⟶ Y) := + ((adj.homEquiv (truncation k X).val Y).trans + (truncationHomEquiv k X ⟨R.obj Y, T.internalHom_truncated R adj hk⟩)).trans + (adj.homEquiv X Y).symm + +lemma truncatedCylinderEquiv_apply (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (k : ℕ) (X Y : OmegaCategory.{u}) (hk : Y.IsTruncated k) + (P : T.tensor.obj (truncation k X).val ⟶ Y) : + T.truncatedCylinderEquiv R adj k X Y hk P = T.tensor.map (truncationUnit k X) ≫ P := by + apply (adj.homEquiv X Y).injective + change (adj.homEquiv X Y) ((adj.homEquiv X Y).symm + (truncationUnit k X ≫ (adj.homEquiv (truncation k X).val Y) P)) = _ + erw [Equiv.apply_symm_apply, adj.homEquiv_naturality_left] + rfl + +lemma truncatedCylinderEquiv_endpoint (T : RightIntervalCore.{u}) + (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + (k : ℕ) (X Y : OmegaCategory.{u}) (hk : Y.IsTruncated k) + (P : T.tensor.obj (truncation k X).val ⟶ Y) (a : Bool) : + (T.endpoint a).app X ≫ T.truncatedCylinderEquiv R adj k X Y hk P = + truncationUnit k X ≫ (T.endpoint a).app (truncation k X).val ≫ P := by + erw [T.truncatedCylinderEquiv_apply, ← Category.assoc, + ← (T.endpoint a).naturality, Category.assoc] + +end Thomason.RightIntervalCore + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalCore +open CategoryTheory Limits OmegaCategory + +variable (T : RightIntervalCore.{u}) +variable (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + +def finiteInternalHom (n : ℕ) : NCategory.{u} n ⥤ NCategory.{u} n where + obj Y := ⟨R.obj Y.val, T.internalHom_truncated R adj Y.property⟩ + map f := R.map f + map_id Y := R.map_id Y.val + map_comp f g := R.map_comp f g + +def finiteTranspose (n : ℕ) (X Y : NCategory.{u} n) : + (T.tensor.obj X.val ⟶ Y.val) ≃ (X ⟶ (T.finiteInternalHom R adj n).obj Y) := + adj.homEquiv X.val Y.val + +section FiniteDescent +variable {n : ℕ} {A B X Y Z : NCategory.{u} n} +variable {i : A ⟶ B} {a : A ⟶ X} {b : B ⟶ Y} {j : X ⟶ Y} +variable (sq : IsPushout i a b j) + +def finiteGlue (PB : T.tensor.obj B.val ⟶ Z.val) (PX : T.tensor.obj X.val ⟶ Z.val) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : + T.tensor.obj Y.val ⟶ Z.val := + (T.finiteTranspose R adj n Y Z).symm + (sq.desc ((T.finiteTranspose R adj n B Z) PB) ((T.finiteTranspose R adj n X Z) PX) + (by + change OmegaCategory.Functor.comp i ((adj.homEquiv _ _) PB) = + OmegaCategory.Functor.comp a ((adj.homEquiv _ _) PX) + exact (adj.homEquiv_naturality_left i PB).symm.trans + ((congrArg (adj.homEquiv _ _) h).trans (adj.homEquiv_naturality_left a PX)))) + +lemma finiteGlue_left (PB : T.tensor.obj B.val ⟶ Z.val) (PX : T.tensor.obj X.val ⟶ Z.val) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : + T.tensor.map b ≫ T.finiteGlue R adj sq PB PX h = PB := by + apply (adj.homEquiv _ _).injective + rw [adj.homEquiv_naturality_left] + change b ≫ (T.finiteTranspose R adj n Y Z) + ((T.finiteTranspose R adj n Y Z).symm _) = _ + rw [Equiv.apply_symm_apply, sq.inl_desc] + rfl + +lemma finiteGlue_right (PB : T.tensor.obj B.val ⟶ Z.val) (PX : T.tensor.obj X.val ⟶ Z.val) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : + T.tensor.map j ≫ T.finiteGlue R adj sq PB PX h = PX := by + apply (adj.homEquiv _ _).injective + rw [adj.homEquiv_naturality_left] + change j ≫ (T.finiteTranspose R adj n Y Z) + ((T.finiteTranspose R adj n Y Z).symm _) = _ + rw [Equiv.apply_symm_apply, sq.inr_desc] + rfl + +include R adj sq in +lemma finiteCylinder_hom_ext {P Q : T.tensor.obj Y.val ⟶ Z.val} + (hb : T.tensor.map b ≫ P = T.tensor.map b ≫ Q) + (hj : T.tensor.map j ≫ P = T.tensor.map j ≫ Q) : P = Q := by + apply (T.finiteTranspose R adj n Y Z).injective + apply sq.hom_ext + · change OmegaCategory.Functor.comp b ((adj.homEquiv _ _) P) = + OmegaCategory.Functor.comp b ((adj.homEquiv _ _) Q) + exact (adj.homEquiv_naturality_left b P).symm.trans + ((congrArg (adj.homEquiv _ _) hb).trans (adj.homEquiv_naturality_left b Q)) + · change OmegaCategory.Functor.comp j ((adj.homEquiv _ _) P) = + OmegaCategory.Functor.comp j ((adj.homEquiv _ _) Q) + exact (adj.homEquiv_naturality_left j P).symm.trans + ((congrArg (adj.homEquiv _ _) hj).trans (adj.homEquiv_naturality_left j Q)) + +lemma finiteGlue_endpoint_left + (PB : T.tensor.obj B.val ⟶ Z.val) (PX : T.tensor.obj X.val ⟶ Z.val) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) (ε : Bool) : + OmegaCategory.Functor.comp b + ((T.endpoint ε).app Y.val ≫ T.finiteGlue R adj sq PB PX h) = + (T.endpoint ε).app B.val ≫ PB := by + have hb := (T.endpoint ε).naturality b + exact (congrArg (fun f : B.val ⟶ T.tensor.obj Y.val => + f ≫ T.finiteGlue R adj sq PB PX h) hb).trans + (congrArg (fun f => (T.endpoint ε).app B.val ≫ f) + (T.finiteGlue_left R adj sq PB PX h)) + +lemma finiteGlue_endpoint_right + (PB : T.tensor.obj B.val ⟶ Z.val) (PX : T.tensor.obj X.val ⟶ Z.val) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) (ε : Bool) : + OmegaCategory.Functor.comp j + ((T.endpoint ε).app Y.val ≫ T.finiteGlue R adj sq PB PX h) = + (T.endpoint ε).app X.val ≫ PX := by + have hj := (T.endpoint ε).naturality j + exact (congrArg (fun f : X.val ⟶ T.tensor.obj Y.val => + f ≫ T.finiteGlue R adj sq PB PX h) hj).trans + (congrArg (fun f => (T.endpoint ε).app X.val ≫ f) + (T.finiteGlue_right R adj sq PB PX h)) + +include R adj sq in + +theorem finite_stationary_gluing + (P : T.tensor.obj B.val ⟶ B.val) + (F : Bool → (B ⟶ B)) + (he : ∀ ε, (T.endpoint ε).app B.val ≫ P = F ε) + (hs : T.tensor.map i ≫ P = (T.projection.app A.val) ≫ i) : + ∃ Q : T.tensor.obj Y.val ⟶ Y.val, + T.tensor.map b ≫ Q = P ≫ b ∧ + T.tensor.map j ≫ Q = T.projection.app X.val ≫ j ∧ + (∀ ε, OmegaCategory.Functor.comp b ((T.endpoint ε).app Y.val ≫ Q) = F ε ≫ b) ∧ + (∀ ε, OmegaCategory.Functor.comp j ((T.endpoint ε).app Y.val ≫ Q) = j) ∧ + (∀ Q' : T.tensor.obj Y.val ⟶ Y.val, + T.tensor.map b ≫ Q' = P ≫ b → + T.tensor.map j ≫ Q' = T.projection.app X.val ≫ j → Q' = Q) := by + have hc : T.tensor.map i ≫ (P ≫ b) = + T.tensor.map a ≫ (T.projection.app X.val ≫ j) := by + calc + _ = (T.projection.app A.val) ≫ (show A.val ⟶ Y.val from i ≫ b) := by + rw [← Category.assoc, hs, Category.assoc] + _ = (T.projection.app A.val) ≫ (show A.val ⟶ Y.val from a ≫ j) := + congrArg (fun f : A ⟶ Y => T.projection.app A.val ≫ f) sq.w + _ = _ := by + have ha := T.projection.naturality a + change _ = (T.tensor.map a ≫ T.projection.app X.val) ≫ j + rw [ha] + rfl + let Q := T.finiteGlue R adj sq (P ≫ b) (T.projection.app X.val ≫ j) hc + refine ⟨Q, T.finiteGlue_left R adj sq _ _ hc, + T.finiteGlue_right R adj sq _ _ hc, ?_, ?_, ?_⟩ + · intro ε + rw [T.finiteGlue_endpoint_left, ← Category.assoc, he ε] + rfl + · intro ε + rw [T.finiteGlue_endpoint_right, ← Category.assoc] + have hε := congrArg (fun α => α.app X.val) (T.endpoint_projection ε) + change (T.endpoint ε).app X.val ≫ T.projection.app X.val = 𝟙 X.val at hε + rw [hε]; rfl + · intro Q' hb hj + apply T.finiteCylinder_hom_ext R adj sq + · exact hb.trans (T.finiteGlue_left R adj sq _ _ hc).symm + · exact hj.trans (T.finiteGlue_right R adj sq _ _ hc).symm + +include R adj sq in + +lemma finite_stationary_gluing_natural + {X' Y' : NCategory.{u} n} {j' : X' ⟶ Y'} {b' : B ⟶ Y'} + (w : X ⟶ X') (v : Y ⟶ Y') (hvB : b ≫ v = b') (hvX : j ≫ v = w ≫ j') + (P : T.tensor.obj B.val ⟶ B.val) + (Q : T.tensor.obj Y.val ⟶ Y.val) (Q' : T.tensor.obj Y'.val ⟶ Y'.val) + (hB : T.tensor.map b ≫ Q = P ≫ b) + (hX : T.tensor.map j ≫ Q = T.projection.app X.val ≫ j) + (hB' : T.tensor.map b' ≫ Q' = P ≫ b') + (hX' : T.tensor.map j' ≫ Q' = T.projection.app X'.val ≫ j') : + T.tensor.map v ≫ Q' = Q ≫ v := by + apply T.finiteCylinder_hom_ext R adj sq + · calc + _ = T.tensor.map (show B.val ⟶ Y'.val from b ≫ v) ≫ Q' := by + rw [T.tensor.map_comp, Category.assoc] + _ = T.tensor.map b' ≫ Q' := + congrArg (fun f : B ⟶ Y' => T.tensor.map f ≫ Q') hvB + _ = P ≫ b' := hB' + _ = (P ≫ b) ≫ v := + congrArg (fun f : B ⟶ Y' => P ≫ f) hvB.symm + _ = _ := by rw [← hB, Category.assoc] + · calc + _ = T.tensor.map (show X.val ⟶ Y'.val from j ≫ v) ≫ Q' := by + rw [T.tensor.map_comp, Category.assoc] + _ = T.tensor.map (show X.val ⟶ Y'.val from w ≫ j') ≫ Q' := + congrArg (fun f : X ⟶ Y' => T.tensor.map f ≫ Q') hvX + _ = T.tensor.map w ≫ (T.tensor.map j' ≫ Q') := by + rw [T.tensor.map_comp, Category.assoc] + _ = T.tensor.map w ≫ (T.projection.app X'.val ≫ j') := by rw [hX'] + _ = T.projection.app X.val ≫ (show X.val ⟶ Y'.val from w ≫ j') := by + rw [← Category.assoc, T.projection.naturality w]; rfl + _ = (T.projection.app X.val ≫ j) ≫ v := + congrArg (fun f : X ⟶ Y' => T.projection.app X.val ≫ f) hvX.symm + _ = _ := by rw [← hX, Category.assoc] + +end FiniteDescent +end Thomason.RightIntervalCore + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Generators.lean b/lean/OAI/CategoryTheory/Thomason/Generators.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3f5cc184eb5b7ec27dad0849b5769b3936e8e6e --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Generators.lean @@ -0,0 +1,893 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SubdivisionFaces +import OAI.CategoryTheory.Thomason.SubdivisionWeak + +namespace OAI + +/-! Generators. -/ + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Limits HomotopicalAlgebra MorphismProperty + +attribute [local instance] Cardinal.fact_isRegular_aleph0 Cardinal.orderBotAleph0OrdToType + +instance thomasonBoundary_smallCardinal : + IsCardinalForSmallObjectArgument (boundaryImages thomasonLeft.{u}) Cardinal.aleph0.{u} where + preservesColimit {A B X Y} i hi f hf := by + have : IsFinitelyPresentable.{u} A := by + obtain ⟨n⟩ := hi + infer_instance + infer_instance + +instance thomasonHorn_smallCardinal : + IsCardinalForSmallObjectArgument (hornImages thomasonLeft.{u}) Cardinal.aleph0.{u} where + preservesColimit {A B X Y} i hi f hf := by + have : IsFinitelyPresentable.{u} A := by + simp only [hornImages, iSup_iff] at hi + obtain ⟨n, ⟨j⟩⟩ := hi + infer_instance + infer_instance + +instance thomasonBoundaryFinite_smallCardinal (n : ℕ) : + IsCardinalForSmallObjectArgument (boundaryImages (thomasonLeftFinite.{u} n)) + Cardinal.aleph0.{u} where + preservesColimit {A B X Y} i hi f hf := by + have : IsFinitelyPresentable.{u} A := by + obtain ⟨m⟩ := hi + infer_instance + infer_instance + +instance thomasonHornFinite_smallCardinal (n : ℕ) : + IsCardinalForSmallObjectArgument (hornImages (thomasonLeftFinite.{u} n)) + Cardinal.aleph0.{u} where + preservesColimit {A B X Y} i hi f hf := by + have : IsFinitelyPresentable.{u} A := by + simp only [hornImages, iSup_iff] at hi + obtain ⟨m, ⟨j⟩⟩ := hi + infer_instance + infer_instance + +lemma boundaryImages_right_fib_and_weak {C : Type v} [Category.{u} C] + {L : SSet.{u} ⥤ C} {R : C ⥤ SSet.{u}} (adj : L ⊣ R) : + (boundaryImages L).rlp ≤ + (simplicialFibrations.inverseImage R ⊓ simplicialWeakEquivalences.inverseImage R) := by + rw [boundaryImages_rlp adj] + intro X Y f hf + exact ⟨KanQuillen.boundary_right_fibrations _ hf, KanQuillen.boundary_right_weak _ hf⟩ + +lemma thomasonBoundary_right_fib_and_weak : + (boundaryImages thomasonLeft.{u}).rlp ≤ thomasonFibrations ⊓ thomasonWeakEquivalences := + boundaryImages_right_fib_and_weak thomasonAdjunction + +lemma thomasonBoundaryFinite_right_fib_and_weak (n : ℕ) : + (boundaryImages (thomasonLeftFinite.{u} n)).rlp ≤ + thomasonFibrationsFinite n ⊓ thomasonWeakEquivalencesFinite n := + boundaryImages_right_fib_and_weak (thomasonFiniteAdjunction n) + +lemma thomasonCofibrations_le_boundaryGenerated : + thomasonCofibrations.{u} ≤ (boundaryImages thomasonLeft).rlp.llp := + antitone_llp thomasonBoundary_right_fib_and_weak + +lemma thomasonCofibrationsFinite_le_boundaryGenerated (n : ℕ) : + thomasonCofibrationsFinite.{u} n ≤ (boundaryImages (thomasonLeftFinite n)).rlp.llp := + antitone_llp (thomasonBoundaryFinite_right_fib_and_weak n) + +lemma hornGenerated_le_thomasonCofibrations : + (hornImages thomasonLeft.{u}).rlp.llp ≤ thomasonCofibrations := by + rw [hornImages_rlp thomasonAdjunction] + exact antitone_llp inf_le_left + +lemma hornGeneratedFinite_le_thomasonCofibrations (n : ℕ) : + (hornImages (thomasonLeftFinite.{u} n)).rlp.llp ≤ thomasonCofibrationsFinite n := by + rw [hornImages_rlp (thomasonFiniteAdjunction n)] + exact antitone_llp inf_le_left + +noncomputable def thomasonBoundaryFactorization {X Y : OmegaCategory.{u}} (f : X ⟶ Y) : + MapFactorizationData (boundaryImages thomasonLeft).rlp.llp + (thomasonFibrations ⊓ thomasonWeakEquivalences) f := by + let d := factorizationData (boundaryImages thomasonLeft.{u}).rlp.llp + (boundaryImages thomasonLeft).rlp f + exact { d with hp := thomasonBoundary_right_fib_and_weak _ d.hp } + +noncomputable def thomasonBoundaryFiniteFactorization (n : ℕ) + {X Y : OmegaCategory.NCategory.{u} n} (f : X ⟶ Y) : + MapFactorizationData (boundaryImages (thomasonLeftFinite n)).rlp.llp + (thomasonFibrationsFinite n ⊓ thomasonWeakEquivalencesFinite n) f := by + let d := factorizationData (boundaryImages (thomasonLeftFinite.{u} n)).rlp.llp + (boundaryImages (thomasonLeftFinite n)).rlp f + exact { d with hp := thomasonBoundaryFinite_right_fib_and_weak n _ d.hp } + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +variable {E : Type u} [PartialOrder E] {D : Type v} [PartialOrder D] + +def injectiveWordMap (f : E →o D) (hf : Function.Injective f) : Word E ↪ Word D where + toFun w := ⟨w.val.map f, + List.pairwise_map.mpr (w.property.imp fun h => f.monotone.strictMono_of_injective hf h)⟩ + inj' x y h := by + apply Subtype.ext + exact List.map_injective_iff.mpr hf (congrArg Subtype.val h) + +lemma map_injectiveOrderHom (f : E →o D) (hf : Function.Injective f) (c : Chains E) : + map f c = Finsupp.mapDomain (injectiveWordMap f hf) c := by + classical + induction c using Finsupp.induction with + | zero => simp + | @single_add l z c _ _ ih => + simp only [map_add, Finsupp.mapDomain_add, ih] + congr 1 + rw [map, Finsupp.linearCombination_single, Finsupp.mapDomain_single] + change z • bracket (injectiveWordMap f hf l).val = + Finsupp.single (injectiveWordMap f hf l) z + rw [bracket_of_pairwise (injectiveWordMap f hf l).property] + simp only [Finsupp.smul_single, smul_eq_mul, mul_one] + +lemma map_injectiveOrderHom_apply (f : E →o D) (hf : Function.Injective f) + (c : Chains E) (w : Word E) : map f c (injectiveWordMap f hf w) = c w := by + rw [map_injectiveOrderHom] + exact Finsupp.mapDomain_apply_of_injective (injectiveWordMap f hf).injective c w + +lemma map_injectiveOrderHom_injective (f : E →o D) (hf : Function.Injective f) : + Function.Injective (map f) := by + intro a b h + apply Finsupp.mapDomain_injective (injectiveWordMap f hf).injective + simpa only [← map_injectiveOrderHom] using h + +lemma map_supportedOn (f : E →o D) {S : Set E} {T : Set D} + (hf : Set.MapsTo f S T) {c : Chains E} (hc : c ∈ supportedOn S) : + map f c ∈ supportedOn T := by + classical + rw [map, Finsupp.linearCombination_apply, Finsupp.sum] + apply (supportedOn T).sum_mem + intro w hw + apply (supportedOn T).smul_mem + apply bracket_mem_supportedOn + intro a ha + obtain ⟨b, hb, rfl⟩ := List.mem_map.mp ha + exact hf ((mem_supportedOn_iff S c).mp hc w (Finsupp.mem_support_iff.mp hw) b hb) + +lemma supportedOn_of_injective_map (f : E →o D) (hf : Function.Injective f) + {T : Set D} {c : Chains E} (hc : map f c ∈ supportedOn T) : + c ∈ supportedOn (f ⁻¹' T) := by + rw [mem_supportedOn_iff] + intro w hw a ha + exact (mem_supportedOn_iff T _).mp hc (injectiveWordMap f hf w) + (by simpa only [map_injectiveOrderHom_apply] using hw) (f a) + (List.mem_map.mpr ⟨a, ha, rfl⟩) + +noncomputable def upperCutLinearExtension (S : Set E) (hS : IsUpperSet S) : + E →o Fin 2 ×ₗ LinearExtension E := by + classical + exact { + toFun x := toLex (if x ∈ S then 1 else 0, toLinearExtension x) + monotone' := by + classical + intro a b hab + by_cases ha : a ∈ S + · have hb := hS hab ha + simp only [ha, hb, ite_true] + exact Prod.Lex.toLex_le_toLex.mpr (Or.inr ⟨rfl, toLinearExtension.monotone hab⟩) + · by_cases hb : b ∈ S + · simp only [ha, hb, ite_false, ite_true] + exact Prod.Lex.toLex_le_toLex.mpr (Or.inl (show (0 : Fin 2) < 1 from by decide)) + · simp only [ha, hb, ite_false] + exact Prod.Lex.toLex_le_toLex.mpr (Or.inr ⟨rfl, toLinearExtension.monotone hab⟩) } + +lemma upperCutLinearExtension_injective (S : Set E) (hS : IsUpperSet S) : + Function.Injective (upperCutLinearExtension S hS) := by + intro a b h + exact congrArg (fun z : Fin 2 ×ₗ LinearExtension E => (ofLex z).2) h + +lemma positive_supportedOn_of_boundary_upper_partial {S : Set E} (hS : IsUpperSet S) + {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) (hp : Positive c) + (hd : boundary c ∈ supportedOn S) : c ∈ supportedOn S := by + classical + let f := upperCutLinearExtension S hS + let T : Set (Fin 2 ×ₗ LinearExtension E) := {z | 1 ≤ (ofLex z).1} + have hT : IsUpperSet T := by + intro a b hab ha + exact le_trans ha (Prod.Lex.monotone_fst_ofLex hab) + have hpre : f ⁻¹' T = S := by + ext x + change (1 ≤ (if x ∈ S then 1 else 0 : Fin 2)) ↔ x ∈ S + by_cases hx : x ∈ S <;> simp [hx] + have hm : map f c ∈ supportedOn T := by + apply positive_supportedOn_of_boundary_upper hT (map_mem_grade f hc) (map_positive f hp) + rw [← map_boundary] + apply map_supportedOn f _ hd + intro a ha + change 1 ≤ (if a ∈ S then 1 else 0 : Fin 2) + simp [ha] + rw [← hpre] + exact supportedOn_of_injective_map f (upperCutLinearExtension_injective S hS) hm + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +open DirectedComplex + +variable {E : Type u} [PartialOrder E] + +lemma positive_supportedOn_of_boundary_partial {S : Set E} (hS : IsLowerSet S) + {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) (hp : Positive c) + (hd : boundary c ∈ supportedOn S) : c ∈ supportedOn S := by + apply supportedOn_of_reverseChain + apply positive_supportedOn_of_boundary_upper_partial (E := Eᵒᵈ) hS + (reverseChain_mem_grade hc) (reverseChain_positive hp) + rw [boundary_reverseChain hc] + exact (supportedOn (E := Eᵒᵈ) S).smul_mem _ (reverseChain_supportedOn hd) + +lemma table_supportedOn_upper_partial {S : Set E} (hS : IsUpperSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∀ p b, (x.row p b).val ∈ supportedOn S := by + intro p + induction p with + | zero => exact hx + | succ p ih => + intro b + apply positive_supportedOn_of_boundary_upper_partial hS + (x.row (p+1) b).property (x.positive _ _) + have hb := congrArg Subtype.val (x.boundary p b) + change boundary (x.row (p+1) b).val = (x.row p true).val - (x.row p false).val at hb + rw [hb] + exact (supportedOn S).sub_mem (ih true) (ih false) + +lemma table_supportedOn_lower_partial {S : Set E} (hS : IsLowerSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∀ p b, (x.row p b).val ∈ supportedOn S := by + intro p + induction p with + | zero => exact hx + | succ p ih => + intro b + apply positive_supportedOn_of_boundary_partial hS + (x.row (p+1) b).property (x.positive _ _) + have hb := congrArg Subtype.val (x.boundary p b) + change boundary (x.row (p+1) b).val = (x.row p true).val - (x.row p false).val at hb + rw [hb] + exact (supportedOn S).sub_mem (ih true) (ih false) + +lemma table_segment_unique_lift_partial {S : Set E} (hS : IsUpperSet S ∨ IsLowerSet S) + (x : Table (complex E)) (hx : ∀ b, (x.row 0 b).val ∈ supportedOn S) : + ∃! y : Table (complex S), + (complexMap (OrderEmbedding.subtype S).toOrderHom).table y = x := by + have h : ∀ p b, (x.row p b).val ∈ supportedOn S := hS.elim + (fun hu => table_supportedOn_upper_partial hu x hx) + (fun hl => table_supportedOn_lower_partial hl x hx) + refine ⟨restrictTable S x h, table_map_restrictTable S x h, ?_⟩ + intro y hy + apply table_map_orderEmbedding_injective (OrderEmbedding.subtype S) + exact hy.trans (table_map_restrictTable S x h).symm + +lemma table_source_le_target_partial (x : Table (complex E)) (s t : E) + (hs : (x.row 0 false).val = bracket [s]) + (ht : (x.row 0 true).val = bracket [t]) : s ≤ t := by + classical + let f : E →o Fin 2 := + { toFun := fun a => if s ≤ a then 1 else 0 + monotone' := by + intro a b hab + by_cases ha : s ≤ a + · simp [ha, le_trans ha hab] + · simp only [ha, ite_false] + split <;> decide } + have hh := table_source_le_target ((complexMap f).table x) (f s) (f t) + (by change map f (x.row 0 false).val = bracket [f s]; rw [hs, map_bracket f (by simp)]; rfl) + (by change map f (x.row 0 true).val = bracket [f t]; rw [ht, map_bracket f (by simp)]; rfl) + by_contra hn + change (if s ≤ s then 1 else 0 : Fin 2) ≤ (if s ≤ t then 1 else 0) at hh + simp [hn] at hh + +lemma map_table_injectiveOrderHom {D : Type v} [PartialOrder D] (f : E →o D) + (hf : Function.Injective f) : Function.Injective (complexMap f).table := by + intro x y h + ext p b + apply Subtype.ext + apply map_injectiveOrderHom_injective f hf + exact congrArg (fun z : Table (complex D) => (z.row p b).val) h + +lemma positive_cycle_zero_partial {p : ℕ} {c : Chains E} (hc : c ∈ grade (p+2)) + (hp : Positive c) (hd : boundary c = 0) : c = 0 := by + let f := toLinearExtension (α := E) + apply map_injectiveOrderHom_injective f (fun _ _ h => h) + rw [map_zero] + apply positive_cycle_zero (map_mem_grade f hc) (map_positive f hp) + rw [← map_boundary, hd, map_zero] + +lemma table_endomorphism_identity_partial (x : Table (complex E)) + (hx : x.row 0 false = x.row 0 true) : Table.truncate 0 false x = x := by + let f := toLinearExtension (α := E) + apply map_table_injectiveOrderHom f (fun _ _ h => h) + rw [DirectedComplex.Hom.table_truncate] + exact table_endomorphism_identity ((complexMap f).table x) + (congrArg (fun z => (complexMap f).map 0 z) hx) + +end Thomason.NormalizedChains + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains.PosetTables + +open CategoryTheory DirectedComplex OmegaCategory + +variable {E : Type u} [PartialOrder E] + +lemma coneTable_one_source (x : Table (complex E)) (s t : E) + (hs : (x.row 0 false).val = bracket [s]) + (ht : (x.row 0 true).val = bracket [t]) + (hx : ∀ p b, (x.row p b).val ∈ supportedOn (Set.Ici s)) : + Table.truncate 1 false (coneTable s x hx) = + edgeTable s t (table_source_le_target_partial x s t hs ht) := by + ext p b + cases p with + | zero => + cases b + · rfl + · apply Subtype.ext; exact ht + | succ p => + cases p with + | zero => + rw [Table.truncate_top_row] + apply Subtype.ext + change prepend s (x.row 0 true).val = bracket [s,t] + rw [ht, prepend_bracket] + | succ p => rfl + +lemma coneTable_one_target (x : Table (complex E)) (s : E) + (hs : (x.row 0 false).val = bracket [s]) + (hx : ∀ p b, (x.row p b).val ∈ supportedOn (Set.Ici s)) : + Table.truncate 1 true (coneTable s x hx) = Table.truncate 1 true x := by + ext p b + cases p with + | zero => + cases b + · apply Subtype.ext; exact hs.symm + · rfl + | succ p => + cases p with + | zero => + rw [Table.truncate_top_row, Table.truncate_top_row] + apply Subtype.ext + change (x.row 1 true).val + prepend s (x.row 0 false).val = (x.row 1 true).val + rw [hs, prepend_bracket, bracket_of_not_pairwise (by simp), add_zero] + | succ p => rfl + +end Thomason.NormalizedChains.PosetTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains.PosetTables + +open CategoryTheory DirectedComplex OmegaCategory + +variable {E : Type u} [PartialOrder E] + +def tableStart (x : Table (complex E)) : E := + tableObjectsEquiv ((complex E).nu.sourceObject x) + +def tableFinish (x : Table (complex E)) : E := + tableObjectsEquiv ((complex E).nu.targetObject x) + +lemma tableStart_row (x : Table (complex E)) : + (x.row 0 false).val = bracket [tableStart x] := by + have he := congrArg (fun a : (complex E).nu.Objects => (a.val.row 0 false).val) + (tableObjectsEquiv.symm_apply_apply ((complex E).nu.sourceObject x)) + exact he.symm + +lemma tableFinish_row (x : Table (complex E)) : + (x.row 0 true).val = bracket [tableFinish x] := by + have he := congrArg (fun a : (complex E).nu.Objects => (a.val.row 0 false).val) + (tableObjectsEquiv.symm_apply_apply ((complex E).nu.targetObject x)) + exact he.symm + +lemma tableStart_le_finish (x : Table (complex E)) : tableStart x ≤ tableFinish x := + table_source_le_target_partial x _ _ (tableStart_row x) (tableFinish_row x) + +lemma map_table_eq_edge {D : OmegaCategory.{v}} (hD : D.IsTruncated 1) + (F : OmegaCategory.Functor (complex E).nu D) (x : Table (complex E)) : + F.map x = F.map (edgeTable (tableStart x) (tableFinish x) (tableStart_le_finish x)) := by + have hx : ∀ p b, (x.row p b).val ∈ supportedOn (Set.Ici (tableStart x)) := by + apply table_supportedOn_upper_partial (by intro a b hab ha; exact le_trans ha hab) x + intro b + cases b + · rw [tableStart_row]; exact bracket_mem_supportedOn (by simp) + · rw [tableFinish_row] + exact bracket_mem_supportedOn (by simpa using tableStart_le_finish x) + let y := coneTable (tableStart x) x hx + have hs : (complex E).nu.source 1 y = + edgeTable (tableStart x) (tableFinish x) (tableStart_le_finish x) := + coneTable_one_source x _ _ (tableStart_row x) (tableFinish_row x) hx + have ht : (complex E).nu.target 1 y = (complex E).nu.target 1 x := + coneTable_one_target x _ (tableStart_row x) hx + calc + F.map x = D.target 1 (F.map x) := (D.target_eq_self_of_source_eq_self (hD _)).symm + _ = F.map ((complex E).nu.target 1 x) := (F.map_target 1 x).symm + _ = F.map ((complex E).nu.target 1 y) := congrArg F.map ht.symm + _ = D.target 1 (F.map y) := F.map_target 1 y + _ = F.map y := D.target_eq_self_of_source_eq_self (hD _) + _ = D.source 1 (F.map y) := (hD _).symm + _ = F.map ((complex E).nu.source 1 y) := (F.map_source 1 y).symm + _ = _ := congrArg F.map hs + +lemma ordered_arrow_ext (f g : Arrow E) (hl : f.left = g.left) (hr : f.right = g.right) : + f = g := Arrow.ext hl hr (Subsingleton.elim _ _) + +def tableEndpoints : OmegaCategory.Functor (complex E).nu (ofCategory E) where + map x := Arrow.mk (homOfLE (tableStart_le_finish x)) + map_source k x := by + apply ordered_arrow_ext + · cases k <;> simp [ofCategory, CategoryCell.source, tableStart] + · cases k <;> simp [ofCategory, CategoryCell.source, tableStart, tableFinish] + map_target k x := by + apply ordered_arrow_ext + · cases k <;> simp [ofCategory, CategoryCell.target, tableStart, tableFinish] + · cases k <;> simp [ofCategory, CategoryCell.target, tableFinish] + map_comp k x y h h' := by + apply ordered_arrow_ext + · cases k <;> simp [ofCategory, CategoryCell.comp, tableStart] + · cases k with + | zero => simp [ofCategory, CategoryCell.comp, tableFinish] + | succ k => + have he := congrArg (fun z => tableObjectsEquiv ((complex E).nu.targetObject z)) h + simpa [ofCategory, CategoryCell.comp, tableFinish] using he.symm + +@[simp] lemma tableStart_edge (a b : E) (hab : a ≤ b) : + tableStart (edgeTable a b hab) = a := by + simp [tableStart, edgeTable_sourceObject] + +@[simp] lemma tableFinish_edge (a b : E) (hab : a ≤ b) : + tableFinish (edgeTable a b hab) = b := by + simp [tableFinish, edgeTable_targetObject] + +lemma edgeTable_diagonal (a : E) : edgeTable a a le_rfl = vertexTable a := by + ext p b + cases p with + | zero => cases b <;> rfl + | succ p => + cases p with + | zero => + apply Subtype.ext + change bracket [a,a] = 0 + exact bracket_of_not_pairwise (by simp) + | succ p => rfl + +end Thomason.NormalizedChains.PosetTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains.PosetTables + +open CategoryTheory DirectedComplex OmegaCategory + +variable {E : Type u} [PartialOrder E] {D : OmegaCategory.{v}} + +def posetOneFunctor (hD : D.IsTruncated 1) + (F : OmegaCategory.Functor (complex E).nu D) : E ⥤ D.OneSkeleton where + obj a := F.objects (tableObjectsEquiv.symm a) + map {a b} f := ⟨F.map (edgeTable a b (leOfHom f)), hD _, by + exact (F.map_source 0 _).symm.trans + (congrArg F.map (edgeTable_source a b (leOfHom f))), by + exact (F.map_target 0 _).symm.trans + (congrArg F.map (edgeTable_target a b (leOfHom f)))⟩ + map_id a := by + apply Subtype.ext + exact congrArg F.map (edgeTable_diagonal a) + map_comp {a b c} f g := by + apply Subtype.ext + let x := edgeTable a b (leOfHom f) + let y := edgeTable b c (leOfHom g) + have hxy : (complex E).nu.target 0 x = (complex E).nu.source 0 y := + (edgeTable_target a b _).trans (edgeTable_source b c _).symm + let z := (complex E).nu.comp 0 x y hxy + have hs : tableStart z = a := by + exact (congrArg tableObjectsEquiv ((complex E).nu.sourceObject_comp 0 x y hxy)).trans + (tableStart_edge a b _) + have ht : tableFinish z = c := by + exact (congrArg tableObjectsEquiv ((complex E).nu.targetObject_comp 0 x y hxy)).trans + (tableFinish_edge b c _) + have he := map_table_eq_edge hD F z + have he' : F.map z = F.map (edgeTable a c (leOfHom (f ≫ g))) := by + simpa only [hs, ht] using he + exact he'.symm.trans (F.map_comp 0 x y hxy _) + +def posetDiagramFunctor (G : E ⥤ D.OneSkeleton) : + OmegaCategory.Functor (complex E).nu D := + OmegaCategory.Functor.comp tableEndpoints + (OmegaCategory.Functor.comp (ofCategoryMap G) D.oneSkeletonEvaluation) + +lemma posetDiagramFunctor_posetOneFunctor (hD : D.IsTruncated 1) + (F : OmegaCategory.Functor (complex E).nu D) : + posetDiagramFunctor (posetOneFunctor hD F) = F := by + apply OmegaCategory.Functor.ext + funext x + exact (map_table_eq_edge hD F x).symm + +@[simp] lemma tableStart_vertex (a : E) : tableStart (vertexTable a) = a := by + have he := tableStart_edge a a le_rfl + rwa [edgeTable_diagonal] at he + +@[simp] lemma tableFinish_vertex (a : E) : tableFinish (vertexTable a) = a := by + have he := tableFinish_edge a a le_rfl + rwa [edgeTable_diagonal] at he + +lemma tableEndpoints_vertex (a : E) : tableEndpoints.map (vertexTable a) = Arrow.mk (𝟙 a) := by + apply ordered_arrow_ext + · exact tableStart_vertex a + · exact tableFinish_vertex a + +lemma tableEndpoints_edge (a b : E) (hab : a ≤ b) : + tableEndpoints.map (edgeTable a b hab) = Arrow.mk (homOfLE hab) := by + apply ordered_arrow_ext + · exact tableStart_edge a b hab + · exact tableFinish_edge a b hab + +lemma posetOneFunctor_posetDiagramFunctor_obj (hD : D.IsTruncated 1) + (G : E ⥤ D.OneSkeleton) (a : E) : + (posetOneFunctor hD (posetDiagramFunctor G)).obj a = G.obj a := by + apply Subtype.ext + change D.oneSkeletonEvaluation.map + ((ofCategoryMap G).map (tableEndpoints.map (vertexTable a))) = _ + rw [tableEndpoints_vertex] + change (G.map (𝟙 a)).val = _ + rw [G.map_id] + rfl + +lemma posetOneFunctor_posetDiagramFunctor (hD : D.IsTruncated 1) + (G : E ⥤ D.OneSkeleton) : posetOneFunctor hD (posetDiagramFunctor G) = G := by + refine CategoryTheory.Functor.ext + (posetOneFunctor_posetDiagramFunctor_obj hD G) ?_ + intro a b f + apply Subtype.ext + change D.oneSkeletonEvaluation.map + ((ofCategoryMap G).map (tableEndpoints.map (edgeTable a b (leOfHom f)))) = _ + rw [tableEndpoints_edge] + change (G.map (homOfLE (leOfHom f))).val = _ + have he : homOfLE (leOfHom f) = f := Subsingleton.elim _ _ + rw [he] + simp only [one_eqToHom_comp_val, one_comp_eqToHom_val] + +def posetOneEquiv (hD : D.IsTruncated 1) : + OmegaCategory.Functor (complex E).nu D ≃ (E ⥤ D.OneSkeleton) where + toFun := posetOneFunctor hD + invFun := posetDiagramFunctor + left_inv := posetDiagramFunctor_posetOneFunctor hD + right_inv := posetOneFunctor_posetDiagramFunctor hD + +end Thomason.NormalizedChains.PosetTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains.PosetTables + +open CategoryTheory DirectedComplex OmegaCategory + +variable {E : Type u} [PartialOrder E] {B : Type v} [PartialOrder B] + {D : OmegaCategory.{w}} + +lemma complexMap_vertex (f : E →o B) (a : E) : + (complexMap f).nu.map (vertexTable a) = vertexTable (f a) := by + change (complexMap f).table (vertexTable a) = _ + ext p b + apply Subtype.ext + cases p with + | zero => + change map f (bracket [a]) = bracket [f a] + simpa using map_bracket f (by simp : [a].Pairwise (· ≤ ·)) + | succ p => exact map_zero (map f) + +lemma complexMap_edge (f : E →o B) (a b : E) (hab : a ≤ b) : + (complexMap f).nu.map (edgeTable a b hab) = edgeTable (f a) (f b) (f.monotone hab) := by + change (complexMap f).table (edgeTable a b hab) = _ + ext p e + apply Subtype.ext + cases p with + | zero => + cases e <;> + change map f (bracket [_]) = bracket [f _] <;> + simpa using map_bracket f (by simp : [_].Pairwise (· ≤ ·)) + | succ p => + cases p with + | zero => + change map f (bracket [a,b]) = bracket [f a, f b] + simpa using map_bracket f (by simpa using hab : [a,b].Pairwise (· ≤ ·)) + | succ p => exact map_zero (map f) + +lemma posetOneFunctor_naturality_obj (hD : D.IsTruncated 1) (f : E →o B) + (F : OmegaCategory.Functor (complex B).nu D) (a : E) : + (posetOneFunctor hD (OmegaCategory.Functor.comp (complexMap f).nu F)).obj a = + (f.monotone.functor ⋙ posetOneFunctor hD F).obj a := by + apply Subtype.ext + exact congrArg F.map (complexMap_vertex f a) + +lemma posetOneFunctor_naturality (hD : D.IsTruncated 1) (f : E →o B) + (F : OmegaCategory.Functor (complex B).nu D) : + posetOneFunctor hD (OmegaCategory.Functor.comp (complexMap f).nu F) = + f.monotone.functor ⋙ posetOneFunctor hD F := by + refine CategoryTheory.Functor.ext (posetOneFunctor_naturality_obj hD f F) ?_ + intro a b g + apply Subtype.ext + simp only [one_eqToHom_comp_val, one_comp_eqToHom_val] + exact congrArg F.map (complexMap_edge f a b (leOfHom g)) + +end Thomason.NormalizedChains.PosetTables + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Simplicial Opposite OmegaCategory NormalizedChains KanQuillen + +lemma tableObjects_map {E : Type u} [PartialOrder E] {B : Type v} [PartialOrder B] + (f : E →o B) (a : (complex E).nu.Objects) : + tableObjectsEquiv ((complexMap f).nu.objects a) = f (tableObjectsEquiv a) := by + obtain ⟨i, rfl⟩ := tableObjectsEquiv.symm.surjective a + have he : (complexMap f).nu.objects (tableObjectsEquiv.symm i) = + tableObjectsEquiv.symm (f i) := by + apply Subtype.ext + exact PosetTables.complexMap_vertex f i + rw [he] + simp + +def chaoticNerveLift (X : SSet.{u}) (S : Type u) (f : X _⦋0⦌ → S) : + X ⟶ streetNerve (chaotic S) where + app n := TypeCat.ofHom (fun x => chaoticLift (fun a => f (vertexOf (n := n.unop) x (tableObjectsEquiv a)))) + naturality n m g := by + apply ConcreteCategory.hom_ext + intro x + apply (chaoticHomEquiv (orientals.obj m.unop) S).symm.injective + funext a + change (complex (Fin (m.unop.len+1))).nu.Objects at a + change f (vertexOf (X.map g x) (tableObjectsEquiv a)) = + f (vertexOf x (tableObjectsEquiv ((complexMap g.unop.toOrderHom).nu.objects a))) + rw [tableObjects_map] + exact congrArg f (vertexOf_map g.unop x _) + +def chaoticNerveRestrict (X : SSet.{u}) (S : Type u) + (f : X ⟶ streetNerve (chaotic S)) : X _⦋0⦌ → S := + fun x => chaoticRestrict (f.app _ x) (tableObjectsEquiv.symm 0) + +lemma chaoticNerveRestrict_lift (X : SSet.{u}) (S : Type u) (f : X _⦋0⦌ → S) : + chaoticNerveRestrict X S (chaoticNerveLift X S f) = f := by + funext x + change f (vertexOf x (tableObjectsEquiv (tableObjectsEquiv.symm 0))) = f x + simp only [Equiv.apply_symm_apply, vertexOf_zero] + +lemma chaoticNerveLift_restrict (X : SSet.{u}) (S : Type u) + (f : X ⟶ streetNerve (chaotic S)) : + chaoticNerveLift X S (chaoticNerveRestrict X S f) = f := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + apply (chaoticHomEquiv (orientals.obj n.unop) S).symm.injective + funext a + obtain ⟨i, rfl⟩ := tableObjectsEquiv.symm.surjective a + have hn := NatTrans.naturality_apply f (SimplexCategory.const ⦋0⦌ n.unop i).op x + have he := congrArg (fun F => chaoticRestrict F (tableObjectsEquiv.symm 0)) hn + change chaoticNerveRestrict X S f + (vertexOf x (tableObjectsEquiv (tableObjectsEquiv.symm i))) = + chaoticRestrict (f.app n x) (tableObjectsEquiv.symm i) + rw [Equiv.apply_symm_apply] + change chaoticRestrict (f.app _ (vertexOf x i)) (tableObjectsEquiv.symm 0) = _ at he + apply he.trans + change ((f.app n x).map ((complexMap + (SimplexCategory.const ⦋0⦌ n.unop i).toOrderHom).nu.map (vertexTable 0))).left = _ + rw [PosetTables.complexMap_vertex] + rfl + +def verticesChaoticHomEquiv (X : SSet.{u}) (S : Type u) : + (X _⦋0⦌ → S) ≃ (X ⟶ streetNerve (chaotic S)) where + toFun := chaoticNerveLift X S + invFun := chaoticNerveRestrict X S + left_inv := chaoticNerveRestrict_lift X S + right_inv := chaoticNerveLift_restrict X S + +def verticesChaoticAdjunction : + (evaluation SimplexCategoryᵒᵖ (Type u)).obj (op ⦋0⦌) ⊣ + chaoticFunctor ⋙ streetNerveFunctor := + Adjunction.mkOfHomEquiv { + homEquiv := fun X S => TypeCat.homEquiv.trans (verticesChaoticHomEquiv X S) + homEquiv_naturality_left_symm := by intros; rfl + homEquiv_naturality_right := by + intro X S T f g + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + rfl } + +noncomputable def categorificationObjectsIso : + categorification.{u} ⋙ objectsFunctor ≅ + (evaluation SimplexCategoryᵒᵖ (Type u)).obj (op ⦋0⦌) := + Adjunction.leftAdjointUniq (categorificationAdjunction.comp objectsChaoticAdjunction) + verticesChaoticAdjunction + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory + +def objectsFiniteFunctor (n : ℕ) : NCategory.{u} n ⥤ Type u := + nCategoryInclusion n ⋙ objectsFunctor + +def chaoticFiniteFunctor (n : ℕ) (hn : 1 ≤ n) : Type u ⥤ NCategory.{u} n where + obj S := ⟨chaotic S, fun x => (chaotic S).source_fixed_upwards hn rfl⟩ + map f := chaoticFunctor.map f + +def objectsFiniteChaoticAdjunction (n : ℕ) (hn : 1 ≤ n) : + objectsFiniteFunctor.{u} n ⊣ chaoticFiniteFunctor n hn := + Adjunction.mkOfHomEquiv { + homEquiv := fun C S => TypeCat.homEquiv.trans (chaoticHomEquiv C.val S) + homEquiv_naturality_left_symm := by intros; rfl + homEquiv_naturality_right := by intros; rfl } + +lemma objectsFinite_preservesColimits (n : ℕ) (hn : 1 ≤ n) : + Limits.PreservesColimitsOfSize.{v,w} (objectsFiniteFunctor.{u} n) := + (objectsFiniteChaoticAdjunction n hn).leftAdjoint_preservesColimits + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Simplicial Opposite OmegaCategory + +noncomputable def categorificationFiniteObjectsIso (n : ℕ) (hn : 1 ≤ n) : + categorificationFinite.{u} n ⋙ objectsFiniteFunctor n ≅ + (evaluation SimplexCategoryᵒᵖ (Type u)).obj (op ⦋0⦌) := + Adjunction.leftAdjointUniq + ((categorificationFiniteAdjunction n).comp (objectsFiniteChaoticAdjunction n hn)) + verticesChaoticAdjunction + +noncomputable def posetCategorificationObjectsIso (P : Type u) [PartialOrder P] : + (categorification.obj (nerve P)).Objects ≅ P := + categorificationObjectsIso.app (nerve P) ≪≫ nerveEquiv.toIso + +noncomputable def posetCategorificationFiniteObjectsIso (n : ℕ) (hn : 1 ≤ n) + (P : Type u) [PartialOrder P] : + ((categorificationFinite n).obj (nerve P)).val.Objects ≅ P := + (categorificationFiniteObjectsIso n hn).app (nerve P) ≪≫ nerveEquiv.toIso + +lemma posetCategorificationObjectsIso_natural {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (f : P →o Q) : + objectsFunctor.map (categorification.map (nerveMap f.monotone.functor)) ≫ + (posetCategorificationObjectsIso Q).hom = + (posetCategorificationObjectsIso P).hom ≫ TypeCat.ofHom f := by + dsimp only [posetCategorificationObjectsIso, Iso.trans_hom] + generalize he : categorificationObjectsIso = e + exact congrArg (fun k : (categorification.obj (nerve P)).Objects ⟶ (nerve Q) _⦋0⦌ => + k ≫ nerveEquiv.toIso.hom) (e.hom.naturality (nerveMap f.monotone.functor)) + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory + +def finiteInterval (n : ℕ) (hn : 1 ≤ n) : NCategory.{u} n := + ⟨interval, fun x => interval.source_fixed_upwards hn (show interval.source 1 x = x from rfl)⟩ + +def fiberFiniteFunctor (n : ℕ) (hn : 1 ≤ n) (i : Fin 2) : + CategoryTheory.Functor (Over (finiteInterval.{u} n hn)) (NCategory.{u} n) where + obj p := ⟨(p.hom.fiber (intervalVertex i)).category, fun x => + Subtype.ext (p.left.property x.val)⟩ + map F := Functor.fiberMap _ _ F.left (Over.w F) (intervalVertex i) + +def terminalConeFiniteObj (n : ℕ) (hn : 1 ≤ n) (C : NCategory.{u} n) : + Over (finiteInterval.{u} n hn) := + Over.mk (X := finiteInterval n hn) + (Y := ⟨C.val.terminalCone, terminalCone_truncated C.val hn C.property⟩) (coneLabel C.val) + +def terminalConeFiniteFunctor (n : ℕ) (hn : 1 ≤ n) : + CategoryTheory.Functor (NCategory.{u} n) (Over (finiteInterval.{u} n hn)) where + obj := terminalConeFiniteObj n hn + map {C D} F := Over.homMk + (U := terminalConeFiniteObj n hn C) (V := terminalConeFiniteObj n hn D) + (coneMap F) (by + apply Functor.ext + funext x + cases x <;> rfl) + map_id C := by + apply Over.OverMorphism.ext + apply Functor.ext + funext x + cases x <;> rfl + map_comp F G := by + apply Over.OverMorphism.ext + apply Functor.ext + funext x + cases x <;> rfl + +def zeroFiberFiniteConeAdjunction (n : ℕ) (hn : 1 ≤ n) : + fiberFiniteFunctor.{u} n hn 0 ⊣ terminalConeFiniteFunctor n hn := + Adjunction.mkOfHomEquiv { + homEquiv := fun p B => { + toFun F := Over.homMk (coneExtend p.hom F) (coneExtend_label p.hom F) + invFun H := coneRestrict p.hom H.left (Over.w H) + left_inv := coneRestrict_extend p.hom + right_inv H := by + apply Over.OverMorphism.ext + exact coneExtend_restrict p.hom H.left (Over.w H) } + homEquiv_naturality_left_symm := by intros; rfl + homEquiv_naturality_right := by + intro p B D F G + apply Over.OverMorphism.ext + apply Functor.ext + funext x + change coneExtendMap p.hom (Functor.comp F G) x = + (coneMap G).map (coneExtendMap p.hom F x) + rcases interval_cases (p.hom.map x) with hx | hx | hx + · rw [coneExtendMap_zero p.hom (Functor.comp F G) x hx] + exact (congrArg (coneMap G).map (coneExtendMap_zero p.hom F x hx)).symm + · rw [coneExtendMap_arrow p.hom (Functor.comp F G) x hx] + exact (congrArg (coneMap G).map (coneExtendMap_arrow p.hom F x hx)).symm + · rw [coneExtendMap_one p.hom (Functor.comp F G) x hx] + exact (congrArg (coneMap G).map (coneExtendMap_one p.hom F x hx)).symm } + +instance zeroFiberFinite_preservesColimits (n : ℕ) (hn : 1 ≤ n) : + Limits.PreservesColimitsOfSize.{v,w} (fiberFiniteFunctor.{u} n hn 0) := + (zeroFiberFiniteConeAdjunction n hn).leftAdjoint_preservesColimits + +end Thomason.OmegaCategory + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Globes.lean b/lean/OAI/CategoryTheory/Thomason/Globes.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ebe54e9bc745dabe3273102fe3da23831228e40 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Globes.lean @@ -0,0 +1,875 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.FilteredColimits + +namespace OAI + +/-! Globes. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory Limits Opposite + +def globePresentation (n : ℕ) : Presentation.{u} where + Generator := PUnit.{u+1} + dimension _ := n + relations _ _ := True + +noncomputable def globe (n : ℕ) : OmegaCategory.{u} := (globePresentation n).category + +def globeGenerator (n : ℕ) : (globe.{u} n).Cell := + (globePresentation n).generator PUnit.unit + +lemma globeGenerator_bounded (n : ℕ) : + (globe.{u} n).source n (globeGenerator n) = globeGenerator n := + (globePresentation n).generator_bounded PUnit.unit + +noncomputable def globeLift (n : ℕ) {C : OmegaCategory.{u}} (x : C.Cell) + (hx : C.source n x = x) : Functor (globe.{u} n) C := + (globePresentation n).lift C ⟨fun _ => x, fun _ => hx, trivial⟩ + +@[simp] lemma globeLift_generator (n : ℕ) {C : OmegaCategory.{u}} (x : C.Cell) + (hx : C.source n x = x) : (globeLift n x hx).map (globeGenerator n) = x := rfl + +lemma globe_functor_ext {n : ℕ} {C : OmegaCategory.{u}} {F G : Functor (globe.{u} n) C} + (h : F.map (globeGenerator n) = G.map (globeGenerator n)) : F = G := by + apply (globePresentation n).functor_ext + intro g + cases g + exact h + +lemma globe_map_bounded {n : ℕ} {C : OmegaCategory.{u}} (F : Functor (globe.{u} n) C) : + C.source n (F.map (globeGenerator n)) = F.map (globeGenerator n) := by + rw [← F.map_source, globeGenerator_bounded] + +namespace FilteredColimit + +variable {J : Type u} [Category.{u} J] [IsFiltered J] (F : J ⥤ OmegaCategory.{u}) + +lemma globe_functor_lift (n : ℕ) (G : Functor (globe.{u} n) (omega F)) : + ∃ (i : J) (H : Functor (globe.{u} n) (F.obj i)), + Functor.comp H ((cocone F).ι.app i) = G := by + obtain ⟨i, x, hx⟩ := exists_rep F (G.map (globeGenerator n)) + have hb : ι F i ((F.obj i).source n x) = ι F i x := by + rw [← source_ι, hx] + exact globe_map_bounded G + obtain ⟨j, f, hf⟩ := + (Types.FilteredColimit.isColimit_eq_iff' (colimit.isColimit (CellDiagram F)) _ _).mp hb + have hy : (F.obj j).source n ((F.map f).map x) = (F.map f).map x := by + rw [← (F.map f).map_source] + exact hf + refine ⟨j, globeLift n _ hy, ?_⟩ + apply globe_functor_ext + change ι F j ((F.map f).map x) = G.map (globeGenerator n) + rw [ι_map, hx] + +lemma globe_functor_equality (n : ℕ) {i : J} (G H : Functor (globe.{u} n) (F.obj i)) + (h : Functor.comp G ((cocone F).ι.app i) = Functor.comp H ((cocone F).ι.app i)) : + ∃ (j : J) (f : i ⟶ j), Functor.comp G (F.map f) = Functor.comp H (F.map f) := by + have he : ι F i (G.map (globeGenerator n)) = ι F i (H.map (globeGenerator n)) := + congrArg (fun G : Functor (globe.{u} n) (omega F) => G.map (globeGenerator n)) h + obtain ⟨j, f, hf⟩ := + (Types.FilteredColimit.isColimit_eq_iff' (colimit.isColimit (CellDiagram F)) _ _).mp he + exact ⟨j, f, globe_functor_ext hf⟩ + +noncomputable def globeHomIsColimit (n : ℕ) : + IsColimit ((coyoneda.obj (Opposite.op (globe.{u} n))).mapCocone (cocone F)) := by + apply Types.FilteredColimit.isColimitOf' + · intro G + obtain ⟨i, H, h⟩ := globe_functor_lift F n G + exact ⟨i, H, h.symm⟩ + · intro i G H h + exact globe_functor_equality F n G H h + +instance globeHomPreservesColimit (n : ℕ) : + PreservesColimit F (coyoneda.obj (Opposite.op (globe.{u} n))) := + preservesColimit_of_preserves_colimit_cocone (isColimit F) (globeHomIsColimit F n) + +end FilteredColimit + +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +instance globe_finitelyPresentable (n : ℕ) : + IsCardinalPresentable (globe.{u} n) Cardinal.aleph0.{u} where + preservesColimitOfShape J _ _ := by + have := isFiltered_of_isCardinalFiltered J Cardinal.aleph0.{u} + exact ⟨fun {F} => inferInstance⟩ + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory Limits Opposite + +noncomputable def isoOfBijective {C D : OmegaCategory.{u}} (F : C ⟶ D) + (h : Function.Bijective F.map) : C ≅ D := by + let e := Equiv.ofBijective F.map h + let G : Functor D C := + { map := e.symm + map_source k x := by + apply e.injective + change e (e.symm (D.source k x)) = F.map (C.source k (e.symm x)) + rw [e.apply_symm_apply, F.map_source] + exact congrArg (D.source k) (e.apply_symm_apply x).symm + map_target k x := by + apply e.injective + change e (e.symm (D.target k x)) = F.map (C.target k (e.symm x)) + rw [e.apply_symm_apply, F.map_target] + exact congrArg (D.target k) (e.apply_symm_apply x).symm + map_comp k x y hxy h' := by + apply e.injective + change e (e.symm (D.comp k x y hxy)) = F.map (C.comp k _ _ h') + rw [e.apply_symm_apply, F.map_comp k _ _ h' (F.map_composable h')] + have hx : F.map (e.symm x) = x := e.apply_symm_apply x + have hy : F.map (e.symm y) = y := e.apply_symm_apply y + congr 1 + · exact hx.symm + · exact hy.symm } + exact + { hom := F + inv := G + hom_inv_id := Functor.ext (funext fun x => e.symm_apply_apply x) + inv_hom_id := Functor.ext (funext fun x => e.apply_symm_apply x) } + +lemma injective_of_mono {C D : OmegaCategory.{u}} (F : C ⟶ D) [Mono F] : + Function.Injective F.map := by + intro x y hxy + obtain ⟨p, hp⟩ := C.finite_dimension x + obtain ⟨q, hq⟩ := C.finite_dimension y + let n := max p q + let G := globeLift n x (C.source_fixed_upwards (le_max_left p q) hp) + let H := globeLift n y (C.source_fixed_upwards (le_max_right p q) hq) + have h : G ≫ F = H ≫ F := globe_functor_ext hxy + have he : G = H := (cancel_mono F).mp h + exact congrArg (fun G : Functor (globe.{u} n) C => G.map (globeGenerator n)) he + +lemma globes_separating : (ObjectProperty.ofObj (globe.{u})).IsSeparating := by + intro C D F G h + apply Functor.ext + funext x + obtain ⟨n, hn⟩ := C.finite_dimension x + exact congrArg (fun H : Functor (globe.{u} n) D => H.map (globeGenerator n)) + (h (globe.{u} n) ⟨n⟩ (globeLift n x hn)) + +lemma globes_strongGenerator : (ObjectProperty.ofObj (globe.{u})).IsStrongGenerator := by + rw [ObjectProperty.isStrongGenerator_iff] + refine ⟨globes_separating, ?_⟩ + intro C D F _ h + have hs : Function.Surjective F.map := by + intro y + obtain ⟨n, hn⟩ := D.finite_dimension y + obtain ⟨G, hG⟩ := h (globe.{u} n) ⟨n⟩ (globeLift n y hn) + exact ⟨G.map (globeGenerator n), + congrArg (fun H : Functor (globe.{u} n) D => H.map (globeGenerator n)) hG⟩ + exact (isoOfBijective F ⟨injective_of_mono F, hs⟩).isIso_hom + +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +instance locallyFinitelyPresentable : + IsCardinalLocallyPresentable OmegaCategory.{u} Cardinal.aleph0.{u} := by + rw [IsCardinalLocallyPresentable.iff_exists_isStrongGenerator] + refine ⟨ObjectProperty.ofObj globe, inferInstance, globes_strongGenerator, ?_⟩ + rintro C ⟨n⟩ + exact globe_finitelyPresentable n + +instance locallyPresentable : IsLocallyPresentable.{u} OmegaCategory.{u} where + exists_cardinal := ⟨Cardinal.aleph0.{u}, inferInstance, inferInstance⟩ + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +open CategoryTheory Limits + +namespace FilteredColimit + +variable {J : Type u} [Category.{u} J] [IsFiltered J] + +lemma omega_truncated (n : ℕ) (F : J ⥤ NCategory.{u} n) : + (omega (F ⋙ nCategoryInclusion n)).IsTruncated n := by + intro x + obtain ⟨j, y, rfl⟩ := exists_rep (F ⋙ nCategoryInclusion n) x + change source (F ⋙ nCategoryInclusion n) n (ι (F ⋙ nCategoryInclusion n) j y) = _ + rw [source_ι] + exact congrArg (ι (F ⋙ nCategoryInclusion n) j) ((F.obj j).property y) + +noncomputable def nCocone (n : ℕ) (F : J ⥤ NCategory.{u} n) : Cocone F where + pt := ⟨omega (F ⋙ nCategoryInclusion n), omega_truncated n F⟩ + ι := { + app := fun j => (cocone (F ⋙ nCategoryInclusion n)).ι.app j + naturality := fun _ _ f => (cocone (F ⋙ nCategoryInclusion n)).ι.naturality f } + +noncomputable def nIsColimit (n : ℕ) (F : J ⥤ NCategory.{u} n) : IsColimit (nCocone n F) where + desc s := desc (F ⋙ nCategoryInclusion n) ((nCategoryInclusion n).mapCocone s) + fac s j := (isColimit (F ⋙ nCategoryInclusion n)).fac ((nCategoryInclusion n).mapCocone s) j + uniq s m h := + (isColimit (F ⋙ nCategoryInclusion n)).uniq ((nCategoryInclusion n).mapCocone s) m h + +instance nInclusion_preservesFilteredColimit (n : ℕ) (F : J ⥤ NCategory.{u} n) : + PreservesColimit F (nCategoryInclusion n) := + preservesColimit_of_preserves_colimit_cocone (nIsColimit n F) + (isColimit (F ⋙ nCategoryInclusion n)) + +end FilteredColimit + +attribute [local instance] Cardinal.fact_isRegular_aleph0 + +instance nInclusion_finitelyAccessible (n : ℕ) : + (nCategoryInclusion.{u} n).IsCardinalAccessible Cardinal.aleph0.{u} where + preservesColimitOfShape J _ _ := by + have := isFiltered_of_isCardinalFiltered J Cardinal.aleph0.{u} + exact ⟨fun {F} => inferInstance⟩ + +instance nCategory_locallyFinitelyPresentable (n : ℕ) : + IsCardinalLocallyPresentable (NCategory.{u} n) Cardinal.aleph0.{u} := + (truncationAdjunction n).isCardinalLocallyPresentable Cardinal.aleph0.{u} + +instance nCategory_locallyPresentable (n : ℕ) : IsLocallyPresentable.{u} (NCategory.{u} n) where + exists_cardinal := ⟨Cardinal.aleph0.{u}, inferInstance, inferInstance⟩ + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.SmallObject + +open CategoryTheory Limits Opposite + +lemma commonPresentabilityCardinal {C : Type v} [Category.{u} C] + {ι : Type u} (X : ι → C) [∀ i, IsPresentable.{u} (X i)] : + ∃ (κ : Cardinal.{u}) (_ : Fact κ.IsRegular), ∀ i, IsCardinalPresentable (X i) κ := by + classical + choose κ hκ hp using fun i => + CategoryTheory.Functor.IsAccessible.exists_cardinal (F := coyoneda.obj (Opposite.op (X i))) + obtain ⟨k, hk, hb⟩ := HasCardinalLT.exists_regular_cardinal_forall.{u} + (fun i => (κ i).out) + let : Fact k.IsRegular := ⟨hk⟩ + refine ⟨k, inferInstance, fun i => ?_⟩ + let := hκ i + let := hp i + have hi : κ i < k := by + simpa only [hasCardinalLT_iff_cardinal_mk_lt, Cardinal.mk_out] using hb i + exact isCardinalPresentable_of_le (X i) hi.le + +lemma smallObjectArgument {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] + (I : MorphismProperty C) [MorphismProperty.IsSmall.{u} I] : + MorphismProperty.HasSmallObjectArgument.{u} I := by + obtain ⟨ι, A, B, f, rfl⟩ := (MorphismProperty.isSmall_iff_eq_ofHoms.{u} I).mp inferInstance + obtain ⟨κ, hκ, hp⟩ := commonPresentabilityCardinal A + let := hκ + have : Nonempty κ.ord.ToType := by simpa using Cardinal.IsRegular.ne_zero hκ.out + let := WellFoundedLT.toOrderBot κ.ord.ToType + let : MorphismProperty.IsCardinalForSmallObjectArgument (MorphismProperty.ofHoms f) κ := { + preservesColimit := by + intro X Y Z W i hi p hf + obtain ⟨j⟩ := hi + let := hp j + have := preservesColimitsOfShape_of_isCardinalPresentable (A j) κ κ.ord.ToType + infer_instance } + exact ⟨κ, inferInstance, inferInstance, inferInstance⟩ + +lemma weakFactorizationSystem {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] + (I : MorphismProperty C) [MorphismProperty.IsSmall.{u} I] : + MorphismProperty.IsWeakFactorizationSystem I.rlp.llp I.rlp := by + let := smallObjectArgument I + exact { rlp := MorphismProperty.rlp_llp_rlp I, llp := rfl } + +end Thomason.SmallObject + +end + +noncomputable section +universe u v w z + + +namespace Thomason + +open CategoryTheory Limits + +instance boundaryImages_small {C : Type v} [Category.{u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.IsSmall.{u} (boundaryImages L) := by + unfold boundaryImages + exact MorphismProperty.isSmall_ofHoms _ + +instance hornImages_small {C : Type v} [Category.{u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.IsSmall.{u} (hornImages L) := by + unfold hornImages + let : ∀ n : ℕ, MorphismProperty.IsSmall.{u} + (MorphismProperty.ofHoms (fun i : Fin (n+2) => L.map (SSet.horn (n+1) i).ι)) := + fun _ => MorphismProperty.isSmall_ofHoms _ + exact MorphismProperty.isSmall_iSup _ + +lemma hornImages_rlp {C : Type v} [Category.{u} C] {L : SSet.{u} ⥤ C} + {R : C ⥤ SSet.{u}} (adj : L ⊣ R) : + (hornImages L).rlp = simplicialFibrations.inverseImage R := by + ext X Y f + constructor + · intro h A B i hi + simp only [SSet.modelCategoryQuillen.J, MorphismProperty.iSup_iff] at hi + obtain ⟨n, ⟨j⟩⟩ := hi + apply (adj.hasLiftingProperty_iff _ f).mp + apply h + simp only [hornImages, MorphismProperty.iSup_iff] + exact ⟨n, ⟨j⟩⟩ + · intro h A B i hi + simp only [hornImages, MorphismProperty.iSup_iff] at hi + obtain ⟨n, ⟨j⟩⟩ := hi + apply (adj.hasLiftingProperty_iff _ f).mpr + apply h + simp only [SSet.modelCategoryQuillen.J, MorphismProperty.iSup_iff] + exact ⟨n, ⟨j⟩⟩ + +lemma boundaryImages_rlp {C : Type v} [Category.{u} C] {L : SSet.{u} ⥤ C} + {R : C ⥤ SSet.{u}} (adj : L ⊣ R) : + (boundaryImages L).rlp = SSet.modelCategoryQuillen.I.rlp.inverseImage R := by + ext X Y f + constructor + · intro h A B i hi + obtain ⟨n⟩ := hi + exact (adj.hasLiftingProperty_iff _ f).mp (h _ ⟨n⟩) + · intro h A B i hi + obtain ⟨n⟩ := hi + exact (adj.hasLiftingProperty_iff _ f).mpr (h _ ⟨n⟩) + +instance boundaryImages_smallObject {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.HasSmallObjectArgument.{u} (boundaryImages L) := + SmallObject.smallObjectArgument (boundaryImages L) + +instance hornImages_smallObject {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.HasSmallObjectArgument.{u} (hornImages L) := + SmallObject.smallObjectArgument (hornImages L) + +lemma boundaryImages_weakFactorization {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.IsWeakFactorizationSystem (boundaryImages L).rlp.llp + (boundaryImages L).rlp := SmallObject.weakFactorizationSystem _ + +lemma hornImages_weakFactorization {C : Type v} [Category.{u} C] + [IsLocallyPresentable.{u} C] [HasColimitsOfSize.{u,u} C] (L : SSet.{u} ⥤ C) : + MorphismProperty.IsWeakFactorizationSystem (hornImages L).rlp.llp + (hornImages L).rlp := SmallObject.weakFactorizationSystem _ + +lemma thomasonFibrations_weakFactorization : + MorphismProperty.IsWeakFactorizationSystem thomasonFibrations.{u}.llp thomasonFibrations := by + have := hornImages_weakFactorization thomasonLeft.{u} + rwa [hornImages_rlp thomasonAdjunction] at this + +lemma thomasonFibrationsFinite_weakFactorization (n : ℕ) : + MorphismProperty.IsWeakFactorizationSystem (thomasonFibrationsFinite.{u} n).llp + (thomasonFibrationsFinite n) := by + have := hornImages_weakFactorization (thomasonLeftFinite.{u} n) + rwa [hornImages_rlp (thomasonFiniteAdjunction n)] at this + +lemma thomasonBoundary_weakFactorization : + MorphismProperty.IsWeakFactorizationSystem (boundaryImages thomasonLeft.{u}).rlp.llp + (boundaryImages thomasonLeft).rlp := boundaryImages_weakFactorization _ + +lemma thomasonBoundaryFinite_weakFactorization (n : ℕ) : + MorphismProperty.IsWeakFactorizationSystem (boundaryImages (thomasonLeftFinite.{u} n)).rlp.llp + (boundaryImages (thomasonLeftFinite n)).rlp := boundaryImages_weakFactorization _ + +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CubeExtension + +open scoped unitInterval Topology + +variable {N : Type u} [Fintype N] [Nonempty N] + +noncomputable def radius (x : I^N) : ℝ := + Finset.univ.sup' Finset.univ_nonempty (fun i => |2 * (x i : ℝ) - 1|) + +lemma abs_le_radius (x : I^N) (i : N) : |2 * (x i : ℝ) - 1| ≤ radius x := + Finset.le_sup' (fun j => |2 * (x j : ℝ) - 1|) (Finset.mem_univ i) + +lemma radius_nonneg (x : I^N) : 0 ≤ radius x := + (abs_nonneg _).trans (abs_le_radius x (Classical.choice ‹Nonempty N›)) + +lemma radius_le_one (x : I^N) : radius x ≤ 1 := by + apply Finset.sup'_le + intro i _ + rw [abs_le] + constructor <;> nlinarith [(x i).property.1, (x i).property.2] + +lemma continuous_radius : Continuous (radius (N := N)) := by + exact Continuous.finset_sup'_apply Finset.univ_nonempty (fun i _ => + ((continuous_const.mul (continuous_subtype_val.comp (continuous_apply i))).sub + continuous_const).abs) + +lemma radius_eq_one_iff (x : I^N) : radius x = 1 ↔ x ∈ Cube.boundary N := by + constructor + · intro hx + obtain ⟨i, _, hi⟩ := Finset.exists_mem_eq_sup' Finset.univ_nonempty + (fun i => |2 * (x i : ℝ) - 1|) + have he : |2 * (x i : ℝ) - 1| = 1 := hi.symm.trans hx + rcases (abs_eq (by norm_num : (0 : ℝ) ≤ 1)).mp he with he | he + · exact ⟨i, Or.inr (Subtype.ext (by dsimp; linarith))⟩ + · exact ⟨i, Or.inl (Subtype.ext (by dsimp; linarith))⟩ + · rintro ⟨i, hi | hi⟩ <;> apply le_antisymm (radius_le_one x) + · simpa [hi] using (abs_le_radius x i) + · have hh := abs_le_radius x i + rw [hi] at hh + norm_num at hh + exact hh + +noncomputable def denominator (q : I × I^N) : ℝ := max (1 - (q.1 : ℝ) / 2) (radius q.2) + +lemma half_le_denominator (q : I × I^N) : (1 : ℝ)/2 ≤ denominator q := by + have := q.1.property.2 + exact (by linarith : (1:ℝ)/2 ≤ 1 - (q.1:ℝ)/2).trans (le_max_left _ _) + +lemma denominator_pos (q : I × I^N) : 0 < denominator q := + lt_of_lt_of_le (by norm_num) (half_le_denominator q) + +lemma denominator_le_one (q : I × I^N) : denominator q ≤ 1 := by + exact max_le (by linarith [q.1.property.1]) (radius_le_one q.2) + +lemma continuous_denominator : Continuous (denominator (N := N)) := + (continuous_const.sub ((continuous_subtype_val.comp continuous_fst).div_const 2)).max + (continuous_radius.comp continuous_snd) + +noncomputable def retractTime (q : I × I^N) : I := + ⟨2 + ((q.1 : ℝ) - 2) / denominator q, by + have hd := denominator_pos q + have hl : 1 - (q.1:ℝ)/2 ≤ denominator q := le_max_left _ _ + have hu := denominator_le_one q + constructor + · have : (-2 : ℝ) ≤ ((q.1:ℝ) - 2) / denominator q := + (le_div_iff₀ hd).mpr (by linarith) + linarith + · have : ((q.1:ℝ) - 2) / denominator q ≤ -1 := + (div_le_iff₀ hd).mpr (by linarith [q.1.property.2]) + linarith⟩ + +noncomputable def retractSpace (q : I × I^N) : I^N := fun i => + ⟨1/2 + ((q.2 i : ℝ) - 1/2) / denominator q, by + have hd := denominator_pos q + have hr := abs_le.mp (abs_le_radius q.2 i) + have hl : radius q.2 ≤ denominator q := le_max_right _ _ + constructor + · have : (-1/2 : ℝ) ≤ ((q.2 i:ℝ) - 1/2) / denominator q := + (le_div_iff₀ hd).mpr (by linarith) + linarith + · have : ((q.2 i:ℝ) - 1/2) / denominator q ≤ (1/2 : ℝ) := + (div_le_iff₀ hd).mpr (by linarith) + linarith⟩ + +lemma continuous_retractTime : Continuous (retractTime (N := N)) := by + apply Continuous.subtype_mk + exact continuous_const.add (((continuous_subtype_val.comp continuous_fst).sub + continuous_const).div continuous_denominator (fun q => ne_of_gt (denominator_pos q))) + +lemma continuous_retractSpace : Continuous (retractSpace (N := N)) := by + apply continuous_pi + intro i + apply Continuous.subtype_mk + exact continuous_const.add ((((continuous_subtype_val.comp (continuous_apply i)).comp + continuous_snd).sub continuous_const).div continuous_denominator + (fun q => ne_of_gt (denominator_pos q))) + +def roof : Set (I × I^N) := {q | q.1 = 0 ∨ q.2 ∈ Cube.boundary N} + +lemma retract_mem_roof (q : I × I^N) : + (retractTime q, retractSpace q) ∈ roof := by + rcases le_total (radius q.2) (1 - (q.1:ℝ)/2) with h | h + · left + apply Subtype.ext + change 2 + ((q.1:ℝ)-2) / denominator q = 0 + have he : denominator q = 1 - (q.1:ℝ)/2 := max_eq_left h + have hd := denominator_pos q + have hh : ((q.1:ℝ)-2) / denominator q = (-2 : ℝ) := + (div_eq_iff (ne_of_gt hd)).mpr (by rw [he]; ring) + rw [hh] + norm_num + · right + have hd := denominator_pos q + have he : denominator q = radius q.2 := max_eq_right h + obtain ⟨i, _, hi⟩ := Finset.exists_mem_eq_sup' Finset.univ_nonempty + (fun i => |2 * (q.2 i : ℝ) - 1|) + have habs : |2 * (q.2 i : ℝ) - 1| = denominator q := hi.symm.trans he.symm + rcases (abs_eq (le_of_lt hd)).mp habs with hi | hi + · refine ⟨i, Or.inr (Subtype.ext ?_)⟩ + change 1/2 + ((q.2 i:ℝ)-1/2) / denominator q = 1 + have : ((q.2 i:ℝ)-1/2) / denominator q = (1/2:ℝ) := + (div_eq_iff (ne_of_gt hd)).mpr (by linarith) + rw [this] + norm_num + · refine ⟨i, Or.inl (Subtype.ext ?_)⟩ + change 1/2 + ((q.2 i:ℝ)-1/2) / denominator q = 0 + have : ((q.2 i:ℝ)-1/2) / denominator q = (-1/2:ℝ) := + (div_eq_iff (ne_of_gt hd)).mpr (by linarith) + rw [this] + norm_num + +noncomputable def retract : C(I × I^N, roof (N := N)) := + ⟨fun q => ⟨(retractTime q, retractSpace q), retract_mem_roof q⟩, + (continuous_retractTime.prodMk continuous_retractSpace).subtype_mk _⟩ + +lemma denominator_eq_one_of_roof {q : I × I^N} (hq : q ∈ roof) : denominator q = 1 := by + rcases hq with h | h + · change max (1 - (q.1 : ℝ)/2) (radius q.2) = 1 + rw [h] + norm_num + exact radius_le_one q.2 + · rw [denominator, (radius_eq_one_iff _).mpr h] + exact max_eq_right (by linarith [q.1.property.1]) + +lemma retract_fixed (q : roof (N := N)) : (retract q.val).val = q.val := by + have hd := denominator_eq_one_of_roof q.property + apply Prod.ext + · apply Subtype.ext + change 2 + ((q.val.1:ℝ)-2) / denominator q.val = (q.val.1:ℝ) + rw [hd, div_one] + ring + · funext i + apply Subtype.ext + change 1/2 + ((q.val.2 i:ℝ)-1/2) / denominator q.val = (q.val.2 i:ℝ) + rw [hd, div_one] + ring + +end Thomason.CubeExtension + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CubeExtension + +open scoped unitInterval Topology + +variable {N : Type u} [Fintype N] [Nonempty N] +variable {P : Type v} {X : Type w} [TopologicalSpace P] [TopologicalSpace X] + +noncomputable def closedPaste {D : Type*} [TopologicalSpace D] + (s t : Set D) (hs : IsClosed s) (ht : IsClosed t) (hu : s ∪ t = Set.univ) + (f g : C(D, X)) (hfg : ∀ x ∈ s ∩ t, f x = g x) : C(D, X) := by + classical + refine ⟨s.piecewise f g, ?_⟩ + rw [← continuousOn_univ, ← hu] + apply ContinuousOn.union_of_isClosed _ _ hs ht + · apply f.continuous.continuousOn.congr + intro x hx + exact Set.piecewise_eq_of_mem s f g hx + · apply g.continuous.continuousOn.congr + intro x hx + by_cases hxs : x ∈ s + · rw [Set.piecewise_eq_of_mem s f g hxs] + exact hfg x ⟨hxs, hx⟩ + · exact Set.piecewise_eq_of_notMem s f g hxs + +lemma closedPaste_left {D : Type*} [TopologicalSpace D] + (s t : Set D) (hs : IsClosed s) (ht : IsClosed t) (hu : s ∪ t = Set.univ) + (f g : C(D, X)) (hfg : ∀ x ∈ s ∩ t, f x = g x) (x : D) (hx : x ∈ s) : + closedPaste s t hs ht hu f g hfg x = f x := by + classical + exact Set.piecewise_eq_of_mem s f g hx + +lemma closedPaste_right {D : Type*} [TopologicalSpace D] + (s t : Set D) (hs : IsClosed s) (ht : IsClosed t) (hu : s ∪ t = Set.univ) + (f g : C(D, X)) (hfg : ∀ x ∈ s ∩ t, f x = g x) (x : D) (hx : x ∈ t) : + closedPaste s t hs ht hu f g hfg x = g x := by + classical + by_cases hxs : x ∈ s + · rw [closedPaste_left _ _ _ _ _ _ _ _ _ hxs] + exact hfg x ⟨hxs, hx⟩ + · exact Set.piecewise_eq_of_notMem s f g hxs + +noncomputable def glue (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) : + C(P × roof (N := N), X) := + closedPaste {q | q.2.val.1 = 0} {q | radius q.2.val.2 = 1} + (isClosed_eq (continuous_fst.comp (continuous_subtype_val.comp continuous_snd)) continuous_const) + (isClosed_eq (continuous_radius.comp + (continuous_snd.comp (continuous_subtype_val.comp continuous_snd))) continuous_const) + (by + apply Set.eq_univ_of_forall + intro q + rcases q.2.property with hq | hq + · exact Or.inl hq + · exact Or.inr ((radius_eq_one_iff _).mpr hq)) + ⟨fun q => p (q.1,q.2.val.2), p.continuous.comp + (continuous_fst.prodMk (continuous_snd.comp (continuous_subtype_val.comp continuous_snd)))⟩ + ⟨fun q => γ (q.1,q.2.val.1), γ.continuous.comp + (continuous_fst.prodMk (continuous_fst.comp (continuous_subtype_val.comp continuous_snd)))⟩ + (fun q hq => by + dsimp at hq ⊢ + rw [hq.1] + exact h _ _ ((radius_eq_one_iff _).mp hq.2)) + +lemma glue_bottom (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) (z : P) (x : I^N) : + glue p γ h (z, ⟨(0,x), Or.inl rfl⟩) = p (z,x) := + closedPaste_left _ _ _ _ _ _ _ _ _ rfl + +lemma glue_side (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) + (z : P) (t : I) (x : I^N) (hx : x ∈ Cube.boundary N) : + glue p γ h (z, ⟨(t,x), Or.inr hx⟩) = γ (z,t) := + closedPaste_right _ _ _ _ _ _ _ _ _ ((radius_eq_one_iff _).mpr hx) + +noncomputable def extend (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) : + C(P × (I × I^N), X) := + (glue p γ h).comp ⟨fun q => (q.1, retract q.2), + continuous_fst.prodMk (retract.continuous.comp continuous_snd)⟩ + +lemma extend_bottom (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) (z : P) (x : I^N) : + extend p γ h (z, (0,x)) = p (z,x) := by + change glue p γ h (z, retract (0,x)) = _ + have he : retract (0,x) = ⟨(0,x), Or.inl rfl⟩ := + Subtype.ext (retract_fixed ⟨(0,x), Or.inl rfl⟩) + rw [he, glue_bottom] + +lemma extend_side (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) + (z : P) (t : I) (x : I^N) (hx : x ∈ Cube.boundary N) : + extend p γ h (z,(t,x)) = γ (z,t) := by + change glue p γ h (z, retract (t,x)) = _ + have he : retract (t,x) = ⟨(t,x), Or.inr hx⟩ := + Subtype.ext (retract_fixed ⟨(t,x), Or.inr hx⟩) + rw [he] + exact glue_side p γ h z t x hx + +lemma extend_natural {Y : Type*} [TopologicalSpace Y] + (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) + (f : C(X,Y)) (q : P × (I × I^N)) : + extend (f.comp p) (f.comp γ) (fun z x hx => congrArg f (h z x hx)) q = + f (extend p γ h q) := by + classical + dsimp [extend, glue, closedPaste, Set.piecewise] + split <;> rfl + +noncomputable def interpolate : C(I × (I × I^N), I × I^N) := + ⟨fun q => (Set.Icc.convexComb (retract q.2).val.1 q.2.1 q.1, + fun i => Set.Icc.convexComb ((retract q.2).val.2 i) (q.2.2 i) q.1), by + have hr : Continuous (fun q : I × (I × I^N) => (retract q.2).val) := + continuous_subtype_val.comp (retract.continuous.comp continuous_snd) + apply Continuous.prodMk + · exact Set.Icc.continuous_convexComb_prod.comp + ((continuous_fst.comp hr).prodMk ((continuous_fst.comp continuous_snd).prodMk continuous_fst)) + · apply continuous_pi + intro i + exact Set.Icc.continuous_convexComb_prod.comp + (((continuous_apply i).comp (continuous_snd.comp hr)).prodMk + (((continuous_apply i).comp (continuous_snd.comp continuous_snd)).prodMk continuous_fst))⟩ + +lemma interpolate_zero (q : I × I^N) : interpolate (0,q) = (retract q).val := by + apply Prod.ext + · exact Set.Icc.convexComb_zero _ _ + · funext i + exact Set.Icc.convexComb_zero _ _ + +lemma interpolate_one (q : I × I^N) : interpolate (1,q) = q := by + apply Prod.ext + · exact Set.Icc.convexComb_one _ _ + · funext i + exact Set.Icc.convexComb_one _ _ + +lemma interpolate_fixed (s : I) (q : roof (N := N)) : interpolate (s,q.val) = q.val := by + change (Set.Icc.convexComb (retract q.val).val.1 q.val.1 s, + fun i => Set.Icc.convexComb ((retract q.val).val.2 i) (q.val.2 i) s) = q.val + rw [retract_fixed] + simp only [Set.Icc.convexComb_eq] + +end Thomason.CubeExtension + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CubeExtension + +open scoped unitInterval Topology Topology.Homotopy + +variable {N : Type u} [Fintype N] [Nonempty N] +variable {P : Type v} {X : Type w} [TopologicalSpace P] [TopologicalSpace X] + +lemma extend_congr_at {Q : Type*} [TopologicalSpace Q] + (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) + (p' : C(Q × I^N, X)) (γ' : C(Q × I, X)) + (h' : ∀ z x, x ∈ Cube.boundary N → p' (z,x) = γ' (z,0)) + (z : P) (z' : Q) (hp : ∀ x, p (z,x) = p' (z',x)) + (hγ : ∀ t, γ (z,t) = γ' (z',t)) (q : I × I^N) : + extend p γ h (z,q) = extend p' γ' h' (z',q) := by + classical + dsimp [extend, glue, closedPaste, Set.piecewise] + split + · exact hp _ + · exact hγ _ + +lemma extend_eq_of_restrictions (p : C(P × I^N, X)) (γ : C(P × I, X)) + (h : ∀ z x, x ∈ Cube.boundary N → p (z,x) = γ (z,0)) + (H : C(P × (I × I^N), X)) + (h0 : ∀ z x, H (z,(0,x)) = p (z,x)) + (hb : ∀ z t x, x ∈ Cube.boundary N → H (z,(t,x)) = γ (z,t)) + (q : P × (I × I^N)) : + extend p γ h q = H (q.1,(retract q.2).val) := by + classical + let r := retract q.2 + change glue p γ h (q.1,r) = H (q.1,r.val) + by_cases hrt : r.val.1 = 0 + · obtain ⟨⟨t,x⟩, hr⟩ := r + dsimp at hrt + subst t + rw [glue_bottom] + exact (h0 _ _).symm + · have hrb : r.val.2 ∈ Cube.boundary N := r.property.resolve_left hrt + obtain ⟨⟨t,x⟩, hr⟩ := r + rw [glue_side p γ h _ _ _ hrb] + exact (hb _ _ _ hrb).symm + +noncomputable def move {a b : X} (p : GenLoop N X a) (γ : Path a b) : + C(I × I^N, X) := + (extend + ⟨fun q : Unit × I^N => p q.2, p.val.continuous.comp continuous_snd⟩ + ⟨fun q : Unit × I => γ q.2, γ.continuous.comp continuous_snd⟩ + (fun _ x hx => (p.property x hx).trans γ.source.symm)).comp + ⟨fun q => ((),q), continuous_const.prodMk continuous_id⟩ + +lemma move_bottom {a b : X} (p : GenLoop N X a) (γ : Path a b) (x : I^N) : + move p γ (0,x) = p x := + extend_bottom _ _ (fun _ y hy => (p.property y hy).trans γ.source.symm) () x + +lemma move_side {a b : X} (p : GenLoop N X a) (γ : Path a b) + (t : I) (x : I^N) (hx : x ∈ Cube.boundary N) : move p γ (t,x) = γ t := + extend_side _ _ (fun _ y hy => (p.property y hy).trans γ.source.symm) () t x hx + +noncomputable def transportLoop {a b : X} (γ : Path a b) (p : GenLoop N X a) : + GenLoop N X b := + ⟨(move p γ).comp ⟨fun x => (1,x), continuous_const.prodMk continuous_id⟩, + fun x hx => (move_side p γ 1 x hx).trans γ.target⟩ + +lemma move_eq_of_restrictions {a b : X} (p : GenLoop N X a) (γ : Path a b) + (H : C(I × I^N, X)) (h0 : ∀ x, H (0,x) = p x) + (hb : ∀ t x, x ∈ Cube.boundary N → H (t,x) = γ t) (q : I × I^N) : + move p γ q = H (retract q).val := + extend_eq_of_restrictions _ _ (fun _ y hy => (p.property y hy).trans γ.source.symm) + ⟨fun z : Unit × (I × I^N) => H z.2, H.continuous.comp continuous_snd⟩ + (fun _ x => h0 x) (fun _ t x hx => hb t x hx) ((),q) + +lemma transportLoop_homotopic_of_homotopy {a b : X} + (p : GenLoop N X a) (q : GenLoop N X b) (γ : Path a b) + (H : C(I × I^N, X)) (h0 : ∀ x, H (0,x) = p x) + (h1 : ∀ x, H (1,x) = q x) + (hb : ∀ t x, x ∈ Cube.boundary N → H (t,x) = γ t) : + GenLoop.Homotopic (transportLoop γ p) q := by + refine ⟨{ toHomotopy := + { toFun := fun z => H (interpolate (z.1,(1,z.2))) + continuous_toFun := H.continuous.comp (interpolate.continuous.comp + (continuous_fst.prodMk (continuous_const.prodMk continuous_snd))) + map_zero_left := ?_ + map_one_left := ?_ } + prop' := ?_ }⟩ + · intro x + rw [interpolate_zero] + exact (move_eq_of_restrictions p γ H h0 hb (1,x)).symm + · intro x + rw [interpolate_one] + exact h1 x + · intro s x hx + change H (interpolate (s,(1,x))) = move p γ (1,x) + rw [interpolate_fixed s ⟨(1,x), Or.inr hx⟩, hb 1 x hx, move_side p γ 1 x hx] + +lemma transportLoop_homotopic {a b : X} (γ : Path a b) + {p q : GenLoop N X a} (hpq : GenLoop.Homotopic p q) : + GenLoop.Homotopic (transportLoop γ p) (transportLoop γ q) := by + obtain ⟨H⟩ := hpq + let f : C(I × I^N, X) := H.toHomotopy.toContinuousMap + let g : C(I × I, X) := ⟨fun z => γ z.2, γ.continuous.comp continuous_snd⟩ + have hfg : ∀ s x, x ∈ Cube.boundary N → f (s,x) = g (s,0) := by + intro s x hx + exact (H.eq_fst s hx).trans ((p.property x hx).trans γ.source.symm) + refine ⟨{ toHomotopy := + { toFun := fun z => extend f g hfg (z.1,(1,z.2)) + continuous_toFun := (extend f g hfg).continuous.comp + (continuous_fst.prodMk (continuous_const.prodMk continuous_snd)) + map_zero_left := ?_ + map_one_left := ?_ } + prop' := ?_ }⟩ + · intro x + exact extend_congr_at f g hfg _ _ + (fun _ y hy => (p.property y hy).trans γ.source.symm) 0 () (fun y => H.toHomotopy.apply_zero y) + (fun _ => rfl) (1,x) + · intro x + exact extend_congr_at f g hfg _ _ + (fun _ y hy => (q.property y hy).trans γ.source.symm) 1 () (fun y => H.toHomotopy.apply_one y) + (fun _ => rfl) (1,x) + · intro s x hx + change extend f g hfg (s,(1,x)) = move p γ (1,x) + rw [extend_side f g hfg s 1 x hx, move_side p γ 1 x hx] + rfl + +lemma transportLoop_reverse {a b : X} (γ : Path a b) (p : GenLoop N X a) : + GenLoop.Homotopic (transportLoop γ.symm (transportLoop γ p)) p := by + apply transportLoop_homotopic_of_homotopy (transportLoop γ p) p γ.symm + ⟨fun z => move p γ (unitInterval.symm z.1,z.2), (move p γ).continuous.comp + ((unitInterval.continuous_symm.comp continuous_fst).prodMk continuous_snd)⟩ + · intro x + exact congrArg (fun t => move p γ (t,x)) unitInterval.symm_zero + · intro x + change move p γ (unitInterval.symm 1,x) = p x + rw [unitInterval.symm_one, move_bottom] + · intro t x hx + exact move_side p γ (unitInterval.symm t) x hx + +noncomputable def transport {a b : X} (γ : Path a b) : + HomotopyGroup N X a → HomotopyGroup N X b := + Quotient.map (transportLoop γ) (fun _ _ h => transportLoop_homotopic γ h) + +lemma transport_reverse {a b : X} (γ : Path a b) (p : HomotopyGroup N X a) : + transport γ.symm (transport γ p) = p := by + induction p using Quotient.inductionOn with + | h p => exact Quotient.sound (transportLoop_reverse γ p) + +lemma transport_bijective {a b : X} (γ : Path a b) : + Function.Bijective (transport (N := N) γ) := by + constructor + · have h : Function.LeftInverse (transport (N := N) γ.symm) (transport γ) := + transport_reverse γ + exact h.injective + · have h : Function.RightInverse (transport (N := N) γ.symm) (transport γ) := by + intro p + simpa only [Path.symm_symm] using transport_reverse γ.symm p + exact h.surjective + +end Thomason.CubeExtension + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/GlobularComplexes.lean b/lean/OAI/CategoryTheory/Thomason/GlobularComplexes.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7d5eabe4e2459046484201721789e5e8c53cecf --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/GlobularComplexes.lean @@ -0,0 +1,784 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.OrientalCounit +import OAI.CategoryTheory.Thomason.SubdivisionNerves + +namespace OAI + +/-! Globular Complexes. -/ + +noncomputable section +universe u v w z + + +namespace Thomason.Subdivision + +open CategoryTheory Simplicial Opposite PartialOrder Limits + +variable {X : Type u} [PartialOrder X] + +noncomputable def chainsSubtypeOrderIso (A : Set X) : + NonemptyFiniteChains A ≃o OldChains A := by + classical + let f : A →o X := ⟨Subtype.val, fun _ _ h => h⟩ + let forward : NonemptyFiniteChains A → OldChains A := fun s => + ⟨s.map f, by + intro x hx + obtain ⟨a, _, rfl⟩ := (s.mem_map_iff f x).mp hx + exact a.property⟩ + let backward : OldChains A → NonemptyFiniteChains A := fun s => { + finset := s.val.finset.subtype (· ∈ A) + nonempty := by + obtain ⟨a, ha⟩ := s.val.nonempty + exact ⟨⟨a, s.property a ha⟩, Finset.mem_subtype.mpr ha⟩ + comparable := by + rintro ⟨a, ha⟩ ⟨b, hb⟩ + exact s.val.comparable ⟨a.val, Finset.mem_subtype.mp ha⟩ + ⟨b.val, Finset.mem_subtype.mp hb⟩ } + refine { + toFun := forward + invFun := backward + left_inv := ?_ + right_inv := ?_ + map_rel_iff' := ?_ } + · intro s + apply NonemptyFiniteChains.ext + ext a + change a ∈ (s.map f).finset.subtype (· ∈ A) ↔ a ∈ s.finset + rw [Finset.mem_subtype, NonemptyFiniteChains.mem_map_iff] + constructor + · rintro ⟨b, hb, hba⟩ + exact (Subtype.ext hba : b = a) ▸ hb + · exact fun h => ⟨a, h, rfl⟩ + · intro s + apply Subtype.ext + apply NonemptyFiniteChains.ext + ext a + change a ∈ ((backward s).map f).finset ↔ a ∈ s.val.finset + rw [NonemptyFiniteChains.mem_map_iff] + constructor + · rintro ⟨b, hb, rfl⟩ + exact Finset.mem_subtype.mp hb + · intro ha + exact ⟨⟨a, s.property a ha⟩, Finset.mem_subtype.mpr ha, rfl⟩ + · intro s t + constructor + · intro h a ha + have hh := h ((s.mem_map_iff f a.val).mpr ⟨a, ha, rfl⟩) + obtain ⟨b, hb, hba⟩ := (t.mem_map_iff f a.val).mp hh + exact (Subtype.ext hba : b = a) ▸ hb + · exact fun h => (NonemptyFiniteChains.orderHomMap f).monotone h + +variable {E : Type u} [PartialOrder E] (K : (nerve E).Subcomplex) + +noncomputable def sdTwiceSubcomplexIso : + (SSet.sd ⋙ SSet.sd).obj (K : SSet.{u}) ≅ + nerve (NonemptyFiniteChains (AllowedChains K)) := + SSet.sd.mapIso (sdSubcomplexIso K) ≪≫ sdNerveIso + +noncomputable def sdTwiceNerveIso : + (SSet.sd ⋙ SSet.sd).obj (nerve E) ≅ + nerve (NonemptyFiniteChains (NonemptyFiniteChains E)) := + SSet.sd.mapIso sdNerveIso ≪≫ sdNerveIso + +lemma sdTwiceSubcomplexIso_naturality : + (SSet.sd ⋙ SSet.sd).map K.ι ≫ (sdTwiceNerveIso (E := E)).hom = + (sdTwiceSubcomplexIso K).hom ≫ PartOrd.nerveFunctor.map + (PartOrd.ofHom (NonemptyFiniteChains.orderHomMap + (⟨Subtype.val, fun _ _ h => h⟩ : AllowedChains K →o NonemptyFiniteChains E))) := by + change SSet.sd.map (SSet.sd.map K.ι) ≫ (SSet.sd.map sdNerveMap ≫ sdNerveMap) = + (SSet.sd.map (sdSubcomplexMap K) ≫ sdNerveMap) ≫ _ + rw [← Category.assoc, ← SSet.sd.map_comp, sdSubcomplexMap_naturality, + SSet.sd.map_comp, Category.assoc] + change SSet.sd.map (sdSubcomplexMap K) ≫ + (SSet.sd.map (nerveMap (⟨Subtype.val, fun _ _ h => h⟩ : + AllowedChains K →o NonemptyFiniteChains E).monotone.functor) ≫ sdNerveMap) = _ + rw [sdNerveMap_naturality] + erw [← Category.assoc] + +noncomputable def orderedSimplexSubcomplex {m : ℕ} (K : (SSet.stdSimplex.{u}.obj ⦋m⦌).Subcomplex) : + (nerve (ULift.{u} (Fin (m+1)))).Subcomplex := + SSet.Subcomplex.range (K.ι ≫ (SSet.stdSimplex.isoNerve.{u} m).hom) + +noncomputable def orderedSimplexSubcomplexIso {m : ℕ} + (K : (SSet.stdSimplex.{u}.obj ⦋m⦌).Subcomplex) : + (K : SSet.{u}) ≅ (orderedSimplexSubcomplex K : SSet) := + by + let f : (K : SSet.{u}) ⟶ nerve (ULift.{u} (Fin (m+1))) := + K.ι ≫ (SSet.stdSimplex.isoNerve.{u} m).hom + haveI : Mono f := mono_comp _ _ + let t : (K : SSet.{u}) ⟶ (SSet.Subcomplex.range f : SSet.{u}) := SSet.Subcomplex.toRange f + haveI : Mono t := mono_of_mono_fac (SSet.Subcomplex.toRange_ι f) + haveI : Epi t := inferInstanceAs (Epi (Subfunctor.toRange f)) + haveI : IsIso t := isIso_of_mono_of_epi t + exact @asIso SSet.{u} (inferInstance) _ _ t ‹IsIso t› + +noncomputable def sdTwiceSimplexSubcomplexIso {m : ℕ} + (K : (SSet.stdSimplex.{u}.obj ⦋m⦌).Subcomplex) : + (SSet.sd ⋙ SSet.sd).obj (K : SSet.{u}) ≅ + nerve (NonemptyFiniteChains (AllowedChains (orderedSimplexSubcomplex K))) := + (SSet.sd ⋙ SSet.sd).mapIso (orderedSimplexSubcomplexIso K) ≪≫ + sdTwiceSubcomplexIso (orderedSimplexSubcomplex K) + +noncomputable def sdTwiceSimplexIso (m : ℕ) : + (SSet.sd ⋙ SSet.sd).obj (SSet.stdSimplex.{u}.obj ⦋m⦌) ≅ + nerve (NonemptyFiniteChains (NonemptyFiniteChains (ULift.{u} (Fin (m+1))))) := + (SSet.sd ⋙ SSet.sd).mapIso (SSet.stdSimplex.isoNerve.{u} m) ≪≫ sdTwiceNerveIso + +lemma sdTwiceSimplexSubcomplexIso_naturality {m : ℕ} + (K : (SSet.stdSimplex.{u}.obj ⦋m⦌).Subcomplex) : + (SSet.sd ⋙ SSet.sd).map K.ι ≫ (sdTwiceSimplexIso m).hom = + (sdTwiceSimplexSubcomplexIso K).hom ≫ PartOrd.nerveFunctor.map + (PartOrd.ofHom (NonemptyFiniteChains.orderHomMap + (⟨Subtype.val, fun _ _ h => h⟩ : AllowedChains (orderedSimplexSubcomplex K) →o + NonemptyFiniteChains (ULift.{u} (Fin (m+1)))))) := by + change _ ≫ (_ ≫ _) = (_ ≫ _) ≫ _ + simp only [Functor.mapIso_hom] + erw [← Category.assoc, ← Functor.map_comp] + have h : K.ι ≫ (SSet.stdSimplex.isoNerve.{u} m).hom = + (orderedSimplexSubcomplexIso K).hom ≫ (orderedSimplexSubcomplex K).ι := rfl + erw [h, Functor.map_comp, Category.assoc, sdTwiceSubcomplexIso_naturality, ← Category.assoc] + +end Thomason.Subdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex + +open DirectedComplex + +def chainModule (n p : ℕ) : Submodule ℤ (ULift.{u} Bool → ℤ) where + carrier := {x | ∀ b, (n < p ∨ (p = n ∧ b.down = true)) → x b = 0} + zero_mem' := by simp + add_mem' hx hy b hb := by simp [hx b hb, hy b hb] + smul_mem' a x hx b hb := by simp [hx b hb] + +abbrev Chain (n p : ℕ) : Type u := ↥(chainModule.{u} n p) + +def mass (n p : ℕ) : Chain.{u} n p →+ ℤ where + toFun x := x.val ⟨false⟩ + x.val ⟨true⟩ + map_zero' := by simp + map_add' x y := by simp; ring + +lemma chain_zero {n p : ℕ} (h : n < p) (x : Chain.{u} n p) : x = 0 := by + apply Subtype.ext + funext b + exact x.property b (Or.inl h) + +lemma top_target_zero (n : ℕ) (x : Chain.{u} n n) : x.val ⟨true⟩ = 0 := + x.property ⟨true⟩ (Or.inr ⟨rfl, rfl⟩) + +def delta (n p : ℕ) : Chain.{u} n p := + if h : p < n then ⟨fun b => if b.down then 1 else -1, by + intro b hb + rcases hb with hb | ⟨hb, _⟩ <;> omega⟩ else 0 + +@[simp] lemma mass_delta (n p : ℕ) : mass n p (delta.{u} n p) = 0 := by + by_cases h : p < n <;> simp [delta, mass, h] + +def differential (n p : ℕ) : Chain.{u} n (p+1) →+ Chain.{u} n p where + toFun x := mass n (p+1) x • delta n p + map_zero' := by simp + map_add' x y := by rw [map_add, add_zsmul] + +lemma differential_coordinate (n p : ℕ) (x : Chain.{u} n (p+1)) (b : Bool) : + (differential n p x).val ⟨b⟩ = if b then mass n (p+1) x else -mass n (p+1) x := by + by_cases h : p < n + · cases b <;> simp [differential, delta, h] + · have hx := chain_zero (show n < p+1 by omega) x + subst x + simp [differential] + +def positive (n p : ℕ) : AddSubmonoid (Chain.{u} n p) where + carrier := {x | ∀ b, 0 ≤ x.val ⟨b⟩} + zero_mem' _ := le_rfl + add_mem' hx hy b := add_nonneg (hx b) (hy b) + +def complex (n : ℕ) : DirectedComplex.{u} where + Chain := Chain n + group _ := inferInstance + d := differential n + d_d p x := by + change mass n (p+1) (mass n (p+2) x • delta n (p+1)) • delta n p = 0 + rw [map_zsmul, mass_delta, smul_zero, zero_smul] + augmentation := mass n 0 + augmentation_d x := by + change mass n 0 (mass n 1 x • delta n 0) = 0 + rw [map_zsmul, mass_delta, smul_zero] + positive := positive n + +lemma complex_d_coordinate (n p : ℕ) (x : (complex.{u} n).Chain (p+1)) (b : Bool) : + ((complex n).d p x).val ⟨b⟩ = if b then mass n (p+1) x else -mass n (p+1) x := + differential_coordinate n p x b + +lemma mass_nonneg {n p : ℕ} {x : (complex.{u} n).Chain p} + (hx : x ∈ (complex n).positive p) : 0 ≤ mass n p x := + add_nonneg (hx false) (hx true) + +lemma coordinate_le_mass {n p : ℕ} {x : (complex.{u} n).Chain p} + (hx : x ∈ (complex n).positive p) (b : Bool) : x.val ⟨b⟩ ≤ mass n p x := by + change x.val ⟨b⟩ ≤ x.val ⟨false⟩ + x.val ⟨true⟩ + cases b + · linarith [hx true] + · linarith [hx false] + +lemma mass_eq_zero_iff {n p : ℕ} {x : (complex.{u} n).Chain p} + (hx : x ∈ (complex n).positive p) : mass n p x = 0 ↔ x = 0 := by + constructor + · intro hm + apply Subtype.ext + funext ⟨b⟩ + have h := coordinate_le_mass hx b + rw [hm] at h + exact le_antisymm h (hx b) + · rintro rfl + exact map_zero _ + +def basis (n p : ℕ) (b : Bool) (hb : p < n ∨ (p = n ∧ b = false)) : + (complex.{u} n).Chain p := + ⟨fun i => if i.down = b then 1 else 0, by + intro ⟨i⟩ hi + dsimp + split_ifs with h + · subst i + rcases hb with hb | ⟨hb, hb'⟩ + · rcases hi with hi | ⟨hi, _⟩ <;> omega + · rcases hi with hi | ⟨_, hi⟩ + · omega + · simp [hb'] at hi + · rfl⟩ + +@[simp] lemma basis_coordinate (n p : ℕ) (b : Bool) + (hb : p < n ∨ (p = n ∧ b = false)) (i : Bool) : + (basis.{u} n p b hb).val ⟨i⟩ = if i = b then 1 else 0 := rfl + +@[simp] lemma mass_basis (n p : ℕ) (b : Bool) + (hb : p < n ∨ (p = n ∧ b = false)) : mass n p (basis.{u} n p b hb) = 1 := by + cases b <;> simp [mass] + +lemma basis_positive (n p : ℕ) (b : Bool) + (hb : p < n ∨ (p = n ∧ b = false)) : basis.{u} n p b hb ∈ (complex n).positive p := by + intro i + simp only [basis_coordinate] + split_ifs <;> omega + +lemma differential_basis (n p : ℕ) (b : Bool) + (hb : p+1 < n ∨ (p+1 = n ∧ b = false)) : + (complex.{u} n).d p (basis n (p+1) b hb) = + basis n p true (Or.inl (by rcases hb with hb | ⟨hb, _⟩ <;> omega)) - + basis n p false (Or.inl (by rcases hb with hb | ⟨hb, _⟩ <;> omega)) := by + apply Subtype.ext + funext ⟨i⟩ + change ((complex n).d p _).val ⟨i⟩ = _ + rw [complex_d_coordinate, mass_basis] + change (if i then (1 : ℤ) else -1) = (if i = true then 1 else 0) - + (if i = false then 1 else 0) + cases i <;> norm_num + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex + +open DirectedComplex DirectedComplex.Table + +def topRow (n p : ℕ) (b : Bool) : (complex.{u} n).Chain p := + if h : p < n then basis n p b (Or.inl h) + else if h : p = n then basis n p false (Or.inr ⟨h, rfl⟩) else 0 + +lemma topRow_lt (n p : ℕ) (b : Bool) (h : p < n) : + topRow.{u} n p b = basis n p b (Or.inl h) := by simp [topRow, h] + +lemma topRow_eq (n : ℕ) (b : Bool) : + topRow.{u} n n b = basis n n false (Or.inr ⟨rfl, rfl⟩) := by simp [topRow] + +lemma topRow_gt (n p : ℕ) (b : Bool) (h : n < p) : topRow.{u} n p b = 0 := by + simp [topRow, show ¬p < n by omega, show p ≠ n by omega] + +def topTable (n : ℕ) : Table (complex.{u} n) where + row := topRow n + positive p b := by + unfold topRow + split_ifs <;> first | exact basis_positive _ _ _ _ | exact (positive.{u} n p).zero_mem + boundary p b := by + by_cases hp : p < n + · rw [topRow_lt n p true hp, topRow_lt n p false hp] + by_cases hp' : p+1 < n + · rw [topRow_lt n (p+1) b hp', differential_basis] + · have he : p+1 = n := by omega + rw [show topRow n (p+1) b = basis n (p+1) false (Or.inr ⟨he, rfl⟩) by + unfold topRow; rw [dite_eq_right hp', dite_eq_left he]] + exact differential_basis n p false (Or.inr ⟨he, rfl⟩) + · rw [topRow_gt n (p+1) b (by omega), map_zero] + by_cases he : p = n + · subst p; rw [topRow_eq, topRow_eq, sub_self] + · rw [topRow_gt n p true (by omega), topRow_gt n p false (by omega), sub_self] + augmentation b := by + change mass n 0 (topRow n 0 b) = 1 + unfold topRow + split_ifs with h he + · exact mass_basis _ _ _ _ + · exact mass_basis _ _ _ _ + · omega + bounded := ⟨n, fun p hp b => topRow_gt n p b hp⟩ + +lemma topTable_bounded (n : ℕ) : truncate n false (topTable.{u} n) = topTable n := by + ext p b + rw [truncate_row] + change (if p < n then topRow n p b else if p = n then topRow n p false else 0) = topRow n p b + split_ifs with h he + · rfl + · subst p; rw [topRow_eq, topRow_eq] + · exact (topRow_gt n p b (by omega)).symm + +variable {n : ℕ} (x : Table (complex.{u} n)) + +lemma table_boundary_coordinate (p : ℕ) (b i : Bool) : + (if i then mass n (p+1) (x.row (p+1) b) else -mass n (p+1) (x.row (p+1) b)) = + (x.row p true).val ⟨i⟩ - (x.row p false).val ⟨i⟩ := by + have h := congrArg (fun z : (complex n).Chain p => z.val ⟨i⟩) (x.boundary p b) + rw [complex_d_coordinate] at h + exact h + +lemma table_mass_eq (p : ℕ) : mass n p (x.row p true) = mass n p (x.row p false) := by + have h := congrArg (mass n p) (x.boundary p false) + change mass n p (mass n (p+1) (x.row (p+1) false) • delta n p) = _ at h + erw [map_sub, map_zsmul, mass_delta, smul_zero] at h + omega + +lemma table_mass_zero (b : Bool) : mass n 0 (x.row 0 b) = 1 := x.augmentation b + +lemma table_mass_step (p : ℕ) (b : Bool) : + mass n (p+1) (x.row (p+1) b) ≤ mass n p (x.row p false) := by + have h := table_boundary_coordinate x p b false + simp only [Bool.false_eq_true, ite_false] at h + have hp := x.positive p true false + have hc := coordinate_le_mass (x.positive p false) false + omega + +lemma table_mass_le_one (p : ℕ) (b : Bool) : mass n p (x.row p b) ≤ 1 := by + induction p generalizing b with + | zero => rw [table_mass_zero] + | succ p ih => exact (table_mass_step x p b).trans (ih false) + +lemma table_mass_antitone : Antitone (fun p => mass n p (x.row p false)) := by + apply antitone_nat_of_succ_le + intro p + exact table_mass_step x p false + +lemma positive_mass_one {p : ℕ} (z : (complex.{u} n).Chain p) + (hz : z ∈ (complex n).positive p) (hm : mass n p z = 1) : + ∃ (b : Bool) (hb : p < n ∨ (p = n ∧ b = false)), z = basis n p b hb := by + have hp : p ≤ n := by + by_contra h + rw [chain_zero (by omega) z, map_zero] at hm + omega + have h₀ := hz false + have h₁ := hz true + change z.val ⟨false⟩ + z.val ⟨true⟩ = 1 at hm + by_cases h : z.val ⟨false⟩ = 1 + · have hb : p < n ∨ (p = n ∧ false = false) := by + by_cases h : p < n + · exact Or.inl h + · exact Or.inr ⟨by omega, rfl⟩ + refine ⟨false, hb, ?_⟩ + apply Subtype.ext + funext ⟨i⟩ + change z.val ⟨i⟩ = if i = false then 1 else 0 + cases i <;> dsimp <;> omega + · have ht : z.val ⟨true⟩ = 1 := by omega + have hpn : p < n := by + by_contra hpn + have he : p = n := by omega + subst p + have := top_target_zero n z + omega + refine ⟨true, Or.inl hpn, ?_⟩ + apply Subtype.ext + funext ⟨i⟩ + change z.val ⟨i⟩ = if i = true then 1 else 0 + cases i <;> dsimp <;> omega + +lemma table_has_top : ∃ p, p ≤ n ∧ mass n p (x.row p false) = 1 ∧ + ∀ q, p < q → ∀ b, x.row q b = 0 := by + classical + let s := (Finset.range (n+1)).filter (fun p => mass n p (x.row p false) ≠ 0) + have he : s.Nonempty := ⟨0, Finset.mem_filter.mpr + ⟨Finset.mem_range.mpr (by omega), by rw [table_mass_zero]; omega⟩⟩ + let p := s.max' he + have hp : p ∈ s := Finset.max'_mem s he + obtain ⟨hpn, hpne⟩ := Finset.mem_filter.mp hp + have hple : p ≤ n := by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hpn + have hpmass : mass n p (x.row p false) = 1 := by + have := table_mass_le_one x p false + have := mass_nonneg (x.positive p false) + omega + refine ⟨p, hple, hpmass, ?_⟩ + intro q hpq b + have hqzero : mass n q (x.row q false) = 0 := by + by_contra hq + have hqn : q ≤ n := by + by_contra h + exact hq (by rw [chain_zero (by omega) (x.row q false), map_zero]) + have hqmem : q ∈ s := Finset.mem_filter.mpr ⟨Finset.mem_range.mpr (by omega), hq⟩ + have := Finset.le_max' s q hqmem + omega + apply (mass_eq_zero_iff (x.positive q b)).mp + cases b + · exact hqzero + · rw [table_mass_eq, hqzero] + +lemma table_lower_row {p : ℕ} (hm : mass n (p+1) (x.row (p+1) false) = 1) + (hp : p < n) (b : Bool) : x.row p b = basis n p b (Or.inl hp) := by + have h₀ := table_boundary_coordinate x p false false + have h₁ := table_boundary_coordinate x p false true + simp only [Bool.false_eq_true, ite_false, ite_true, hm] at h₀ h₁ + have hs := table_mass_le_one x p false + have ht := table_mass_le_one x p true + change (x.row p false).val ⟨false⟩ + (x.row p false).val ⟨true⟩ ≤ 1 at hs + change (x.row p true).val ⟨false⟩ + (x.row p true).val ⟨true⟩ ≤ 1 at ht + have hsf := x.positive p false false + have hst := x.positive p false true + have htf := x.positive p true false + have htt := x.positive p true true + apply Subtype.ext + funext ⟨i⟩ + change (x.row p b).val ⟨i⟩ = if i = b then 1 else 0 + cases b <;> cases i <;> dsimp <;> omega + +lemma topRow_basis {p : ℕ} (b : Bool) (hb : p < n ∨ (p = n ∧ b = false)) : + topRow.{u} n p b = basis n p b hb := by + rcases hb with h | ⟨rfl, rfl⟩ + · rw [topRow_lt n p b h] + · rw [topRow_eq] + +lemma table_classification : ∃ (p : ℕ) (b : Bool), p ≤ n ∧ + x = truncate p b (topTable n) := by + obtain ⟨p, hpn, hmass, hzero⟩ := table_has_top x + obtain ⟨b, hb, he⟩ := positive_mass_one (x.row p false) (x.positive p false) hmass + have hpeq : x.row p true = x.row p false := by + have h := x.boundary p false + rw [hzero (p+1) (by omega) false, map_zero] at h + exact (sub_eq_zero.mp h.symm) + refine ⟨p, b, hpn, ?_⟩ + ext q a + rw [truncate_row] + by_cases hq : q < p + · rw [ite_eq_left hq] + have hm : mass n (q+1) (x.row (q+1) false) = 1 := by + have hupper := table_mass_le_one x (q+1) false + have hlower := table_mass_antitone x (show q+1 ≤ p by omega) + change mass n p (x.row p false) ≤ mass n (q+1) (x.row (q+1) false) at hlower + rw [hmass] at hlower + omega + rw [table_lower_row x hm (by omega)] + exact (topRow_lt n q a (by omega)).symm + · rw [ite_eq_right hq] + by_cases heq : q = p + · subst q + rw [ite_eq_left rfl] + change x.row p a = topRow n p b + rw [topRow_basis b hb] + cases a + · exact he + · exact hpeq.trans he + · rw [ite_eq_right heq] + exact hzero q (by omega) a + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +def face (C : OmegaCategory.{u}) (p : ℕ) (b : Bool) (x : C.Cell) : C.Cell := + if b then C.target p x else C.source p x + +lemma face_face (C : OmegaCategory.{u}) (p q : ℕ) (a b : Bool) (x : C.Cell) : + C.face p a (C.face q b x) = if p < q then C.face p a x else C.face q b x := by + cases a <;> cases b <;> + simp only [face, Bool.false_eq_true, ite_false, ite_true] + · rw [C.source_source] + split_ifs with h + · rw [min_eq_left (Nat.le_of_lt h)] + · rw [min_eq_right (Nat.le_of_not_gt h)] + · exact C.source_target p q x + · exact C.target_source p q x + · rw [C.target_target] + split_ifs with h + · rw [min_eq_left (Nat.le_of_lt h)] + · rw [min_eq_right (Nat.le_of_not_gt h)] + +lemma face_of_fixed (C : OmegaCategory.{u}) {n p : ℕ} {x : C.Cell} + (hx : C.source n x = x) (hnp : n ≤ p) (b : Bool) : C.face p b x = x := by + cases b + · exact C.source_fixed_upwards hnp hx + · exact C.target_eq_self_of_source_eq_self (C.source_fixed_upwards hnp hx) + +lemma Functor.map_face {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (p : ℕ) (b : Bool) (x : C.Cell) : + F.map (C.face p b x) = D.face p b (F.map x) := by + cases b + · exact F.map_source p x + · exact F.map_target p x + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex + +open DirectedComplex DirectedComplex.Table OmegaCategory + +lemma face_nu (n p : ℕ) (b : Bool) (x : Table (complex.{u} n)) : + (complex n).nu.face p b x = truncate p b x := by cases b <;> rfl + +lemma top_face_mass {n p : ℕ} (hp : p ≤ n) (b : Bool) : + mass n p ((truncate p b (topTable.{u} n)).row p false) = 1 := by + rw [truncate_top_row] + change mass n p (topRow n p b) = 1 + by_cases h : p < n + · rw [topRow_lt n p b h, mass_basis] + · have he : p = n := by omega + subst p; rw [topRow_eq, mass_basis] + +lemma top_face_dimension {n p q : ℕ} (hp : p ≤ n) (hq : q ≤ n) (a b : Bool) + (h : truncate p a (topTable.{u} n) = truncate q b (topTable n)) : p = q := by + by_contra he + rcases lt_or_gt_of_ne he with hpq | hqp + · have hh := congrArg (fun t : Table (complex n) => mass n q (t.row q false)) h + erw [truncate_row, ite_eq_right (by omega), ite_eq_right (by omega), map_zero, + top_face_mass hq b] at hh + omega + · have hh := congrArg (fun t : Table (complex n) => mass n p (t.row p false)) h + erw [top_face_mass hp a, truncate_row, ite_eq_right (by omega), ite_eq_right (by omega), map_zero] at hh + omega + +lemma top_face_sign {n p : ℕ} (hp : p < n) (a b : Bool) + (h : truncate p a (topTable.{u} n) = truncate p b (topTable n)) : a = b := by + have hh := congrArg (fun t : Table (complex n) => (t.row p false).val ⟨a⟩) h + rw [truncate_top_row, truncate_top_row] at hh + change (topRow n p a).val ⟨a⟩ = (topRow n p b).val ⟨a⟩ at hh + rw [topRow_lt n p a hp, topRow_lt n p b hp] at hh + change (if a = a then (1 : ℤ) else 0) = (if a = b then 1 else 0) at hh + simp only [ite_true] at hh + split_ifs at hh with he + · exact he + · omega + +lemma face_evaluation_well_defined {n p q : ℕ} (hp : p ≤ n) (hq : q ≤ n) + (a b : Bool) (h : truncate p a (topTable.{u} n) = truncate q b (topTable n)) + {C : OmegaCategory.{v}} (x : C.Cell) (hx : C.source n x = x) : + C.face p a x = C.face q b x := by + have he := top_face_dimension hp hq a b h + subst q + by_cases hp' : p < n + · rw [top_face_sign hp' a b h] + · have hn : n ≤ p := by omega + rw [C.face_of_fixed hx hn, C.face_of_fixed hx hn] + +noncomputable def evaluate {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (t : Table (complex.{u} n)) : C.Cell := + let p := (table_classification t).choose + let b := (table_classification t).choose_spec.choose + C.face p b x + +lemma evaluate_face {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (hx : C.source n x = x) (p : ℕ) (b : Bool) : + evaluate x (truncate p b (topTable.{u} n)) = C.face p b x := by + by_cases hp : p ≤ n + · let t := truncate p b (topTable.{u} n) + obtain ⟨hqn, ht⟩ := (table_classification t).choose_spec.choose_spec + exact face_evaluation_well_defined hqn hp _ b ht.symm x hx + · have hnp : n ≤ p := by omega + have he : truncate p b (topTable.{u} n) = topTable n := + (face_nu n p b (topTable n)).symm.trans + ((complex n).nu.face_of_fixed (topTable_bounded n) hnp b) + rw [he, C.face_of_fixed hx hnp] + obtain ⟨hqn, ht⟩ := (table_classification (topTable.{u} n)).choose_spec.choose_spec + exact (face_evaluation_well_defined hqn (le_refl n) _ false + (ht.symm.trans (topTable_bounded n).symm) x hx).trans hx + +lemma evaluate_top {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (hx : C.source n x = x) : evaluate x (topTable.{u} n) = x := by + rw [← topTable_bounded n, evaluate_face x hx] + exact hx + +lemma evaluate_truncate {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (hx : C.source n x = x) (t : Table (complex.{u} n)) (k : ℕ) (a : Bool) : + evaluate x (truncate k a t) = C.face k a (evaluate x t) := by + obtain ⟨p, b, _, rfl⟩ := table_classification t + rw [truncate_truncate, evaluate_face x hx, C.face_face] + split_ifs <;> rw [evaluate_face x hx] + +lemma composable_has_identity {n : ℕ} (k : ℕ) (x y : Table (complex.{u} n)) + (h : truncate k true x = truncate k false y) : + truncate k false x = x ∨ truncate k false y = y := by + obtain ⟨p, a, hpn, rfl⟩ := table_classification x + obtain ⟨q, b, hqn, rfl⟩ := table_classification y + by_cases hkp : k < p + · by_cases hkq : k < q + · rw [truncate_truncate, truncate_truncate, ite_eq_left hkp, ite_eq_left hkq] at h + have := top_face_sign (by omega : k < n) true false h + cases this + · exact Or.inr (by rw [truncate_truncate, ite_eq_right hkq]) + · exact Or.inl (by rw [truncate_truncate, ite_eq_right hkp]) + +noncomputable def lift {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (hx : C.source n x = x) : OmegaCategory.Functor (complex.{u} n).nu C where + map := evaluate x + map_source k t := evaluate_truncate x hx t k false + map_target k t := evaluate_truncate x hx t k true + map_comp k s t h h' := by + rcases composable_has_identity k s t h with hs | ht + · have hs' : s = truncate k false t := + ((complex n).nu.target_eq_self_of_source_eq_self hs).symm.trans h + subst s + erw [(complex n).nu.unit_left] + revert h' + rw [evaluate_truncate x hx t k false] + intro h' + exact (C.unit_left k (evaluate x t) h').symm + · have ht' : t = truncate k true s := ht.symm.trans h.symm + subst t + erw [(complex n).nu.unit_right] + revert h' + rw [evaluate_truncate x hx s k true] + intro h' + exact (C.unit_right k (evaluate x s) h').symm + +lemma lift_top {n : ℕ} {C : OmegaCategory.{v}} (x : C.Cell) + (hx : C.source n x = x) : (lift.{u,v} x hx).map (topTable n) = x := + evaluate_top x hx + +lemma functor_ext {n : ℕ} {C : OmegaCategory.{v}} + {F G : OmegaCategory.Functor (complex.{u} n).nu C} + (h : F.map (topTable n) = G.map (topTable n)) : F = G := by + apply OmegaCategory.Functor.ext + funext t + obtain ⟨p, b, _, rfl⟩ := table_classification t + rw [← face_nu] + erw [F.map_face, G.map_face, h] + +noncomputable def globeIso (n : ℕ) : OmegaCategory.globe.{u} n ≅ (complex.{u} n).nu where + hom := OmegaCategory.globeLift n (topTable n) (topTable_bounded n) + inv := lift (OmegaCategory.globeGenerator n) (OmegaCategory.globeGenerator_bounded n) + hom_inv_id := by + apply OmegaCategory.globe_functor_ext + change (lift (OmegaCategory.globeGenerator n) (OmegaCategory.globeGenerator_bounded n)).map + (topTable n) = OmegaCategory.globeGenerator n + exact lift_top (OmegaCategory.globeGenerator n) (OmegaCategory.globeGenerator_bounded n) + inv_hom_id := by + apply functor_ext + change (OmegaCategory.globeLift n (C := (complex.{u} n).nu) (topTable n) (topTable_bounded n)).map + ((lift (OmegaCategory.globeGenerator n) (OmegaCategory.globeGenerator_bounded n)).map + (topTable n)) = topTable n + erw [lift_top] + rfl + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.NormalizedChains + +open DirectedComplex OmegaCategory + +lemma basisLambda_positive {E : Type u} [PartialOrder E] (p : ℕ) (w : Word E) : + basisLambda p w ∈ (complex E).nu.lambdaPositive p := by + classical + unfold basisLambda + split_ifs with h + · rcases w with ⟨w, hw⟩ + cases w with + | nil => exact False.elim (by change 0 = p + 1 at h; omega) + | cons a l => exact (complex E).nu.lambdaGen_positive _ + · exact AddSubmonoid.zero_mem _ + +lemma atomCounitInverse_positive {E : Type u} [PartialOrder E] (p : ℕ) + (x : (complex E).Chain p) (hx : x ∈ (complex E).positive p) : + atomCounitInverse p x ∈ (complex E).nu.lambdaPositive p := by + classical + change Finsupp.linearCombination ℤ (basisLambda p) x.val ∈ _ + rw [Finsupp.linearCombination_apply, Finsupp.sum] + apply AddSubmonoid.sum_mem + intro w _ + have hw : 0 ≤ x.val w := hx w + have he : x.val w = (x.val w).toNat := (Int.toNat_of_nonneg hw).symm + rw [he, Nat.cast_smul_eq_nsmul] + exact AddSubmonoid.nsmul_mem _ (basisLambda_positive p w) _ + +lemma oriental_lambdaCounit_rightInverse {N : ℕ} (p : ℕ) : + ((complex (Fin (N+1))).lambdaCounitMap p).comp (atomCounitInverse p) = + LinearMap.id := by + ext x + obtain ⟨y, rfl⟩ := normalized_lambdaCounit_surjective (E := Fin (N+1)) p x + exact congrArg ((complex (Fin (N+1))).lambdaCounitMap p) + (LinearMap.congr_fun (oriental_lambdaCounit_leftInverse p) y) + +lemma counit_atomInverse {N : ℕ} (p : ℕ) (x : (complex (Fin (N+1))).Chain p) : + (complex (Fin (N+1))).lambdaCounitMap p (atomCounitInverse p x) = x := + LinearMap.congr_fun (oriental_lambdaCounit_rightInverse p) x + +noncomputable def simplexCounitInverse (N : ℕ) : + Hom (complex (Fin (N+1))) (complex (Fin (N+1))).nu.linearization where + map p := (atomCounitInverse p).toAddMonoidHom + map_d p x := by + apply oriental_lambdaCounit_injective p + calc + _ = (complex (Fin (N+1))).d p x := counit_atomInverse p _ + _ = (complex (Fin (N+1))).d p + ((complex (Fin (N+1))).lambdaCounitMap (p+1) (atomCounitInverse (p+1) x)) := + congrArg ((complex (Fin (N+1))).d p) (counit_atomInverse (p+1) x).symm + _ = _ := (DFunLike.congr_fun ((complex (Fin (N+1))).lambdaCounitMap_d p) + (atomCounitInverse (p+1) x)).symm + map_augmentation x := by + exact (DFunLike.congr_fun (complex (Fin (N+1))).lambdaCounitMap_aug + (atomCounitInverse 0 x)).symm.trans + (congrArg (complex (Fin (N+1))).augmentation (counit_atomInverse 0 x)) + map_positive := atomCounitInverse_positive + +lemma simplexCounitInverse_counit (N : ℕ) : + Hom.comp (simplexCounitInverse N) (complex (Fin (N+1))).lambdaCounit = + Hom.id (complex (Fin (N+1))) := by + ext p x + exact LinearMap.congr_fun (oriental_lambdaCounit_rightInverse p) x + +lemma counit_simplexCounitInverse (N : ℕ) : + Hom.comp (complex (Fin (N+1))).lambdaCounit (simplexCounitInverse N) = + Hom.id (complex (Fin (N+1))).nu.linearization := by + ext p x + exact LinearMap.congr_fun (oriental_lambdaCounit_leftInverse p) x + +noncomputable def simplexCounitIso (N : ℕ) : + (complex (Fin (N+1))).nu.linearization ≅ complex (Fin (N+1)) where + hom := (complex (Fin (N+1))).lambdaCounit + inv := simplexCounitInverse N + hom_inv_id := counit_simplexCounitInverse N + inv_hom_id := simplexCounitInverse_counit N + +end Thomason.NormalizedChains + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/GlobularGeneration.lean b/lean/OAI/CategoryTheory/Thomason/GlobularGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..34b8a949d3d40421e4bb5640298c8558f3ba833d --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/GlobularGeneration.lean @@ -0,0 +1,824 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.RecursiveCylinders + +namespace OAI + +/-! Globular Generation. -/ + +noncomputable section +universe u v w z +open CategoryTheory + +namespace Thomason.GrayRecursive +open DirectedComplex DirectedComplex.Table GlobeComplex + +def corner (n : ℕ) (b : Bool) : Table (K.{u} (n+1)) where + row + | 0, _ => diagonalRow n b + | _+1, _ => 0 + positive p e := by + cases p with + | zero => + cases b + · exact ⟨basis_positive _ _ _ (Or.inl (by omega)), (complex (n+1)).positive 0 |>.zero_mem⟩ + · exact ⟨(complex (n+1)).positive 0 |>.zero_mem, basis_positive _ _ _ (Or.inl (by omega))⟩ + | succ p => exact (K (n+1)).positive (p+1) |>.zero_mem + boundary p e := by cases p <;> simp + augmentation e := by + change mass (n+1) 0 (diagonalRow n b).1 + mass (n+1) 0 (diagonalRow n b).2 = 1 + cases b <;> simp [diagonalRow, mass, basis] <;> rfl + bounded := ⟨0, by + rintro (_ | p) hp e + · omega + · rfl⟩ + +lemma diagonal_iff_boundaries {n : ℕ} (t : Table (K.{u} (n+1))) : + IsDiagonal t ↔ truncate 0 false t = corner n false ∧ truncate 0 true t = corner n true := by + constructor + · intro ht + change ∀ b, t.row 0 b = diagonalRow n b at ht + constructor <;> ext p b <;> cases p <;> simp [truncate_row, corner, ht] + · intro ht b + cases b with + | false => exact congrArg (fun t : Table (K (n+1)) => t.row 0 false) ht.1 + | true => exact congrArg (fun t : Table (K (n+1)) => t.row 0 false) ht.2 + +lemma truncate_diagonal {n : ℕ} (t : Table (K.{u} (n+1))) (ht : IsDiagonal t) (k : ℕ) (e : Bool) : + IsDiagonal (truncate (k+1) e t) := by + intro b + simpa only [truncate_row, Nat.zero_lt_succ, ite_true] using ht b + +lemma comp_diagonal {n : ℕ} (s t : Table (K.{u} (n+1))) (hs : IsDiagonal s) (k : ℕ) + (h : truncate (k+1) true s = truncate (k+1) false t) : + IsDiagonal (DirectedComplex.Table.comp (k+1) s t h) := by + intro b + simpa only [comp_row, Nat.zero_lt_succ, ite_true] using hs b + +lemma down_truncate {n : ℕ} (t : Table (K.{u} (n+1))) (ht : IsDiagonal t) (k : ℕ) (e : Bool) : + down (truncate (k+1) e t) (truncate_diagonal t ht k e) = truncate k e (down t ht) := by + ext p b + simp only [down_row, truncate_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + split_ifs <;> simp + +lemma down_comp {n : ℕ} (s t : Table (K.{u} (n+1))) (hs : IsDiagonal s) (ht : IsDiagonal t) (k : ℕ) + (h : truncate (k+1) true s = truncate (k+1) false t) + (h' : truncate k true (down s hs) = truncate k false (down t ht)) : + down (DirectedComplex.Table.comp (k+1) s t h) (comp_diagonal s t hs k h) = + DirectedComplex.Table.comp k (down s hs) (down t ht) h' := by + ext p b + simp only [down_row, comp_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + split_ifs <;> simp + +abbrev diagonalHom (n : ℕ) : OmegaCategory.{u} := + (K (n+1)).nu.homCategory (corner n false) (corner n true) + +def downFunctor (n : ℕ) : diagonalHom.{u} n ⟶ (K.{u} n).nu where + map t := down t.val ((diagonal_iff_boundaries t.val).mpr t.property) + map_source k t := down_truncate t.val _ k false + map_target k t := down_truncate t.val _ k true + map_comp k s t h h' := down_comp s.val t.val _ _ k (congrArg Subtype.val h) h' + +lemma downFunctor_bijective (n : ℕ) : Function.Bijective (downFunctor.{u} n).map := by + constructor + · intro s t h + apply Subtype.ext + exact (up_down s.val ((diagonal_iff_boundaries s.val).mpr s.property)).symm.trans + ((congrArg up h).trans (up_down t.val ((diagonal_iff_boundaries t.val).mpr t.property))) + · intro t + exact ⟨⟨up t, (diagonal_iff_boundaries _).mp (up_diagonal t)⟩, down_up t⟩ + +def diagonalIso (n : ℕ) : diagonalHom.{u} n ≅ (K.{u} n).nu := + OmegaCategory.isoOfBijective (downFunctor n) (downFunctor_bijective n) + +lemma diagonalIso_inverse (n : ℕ) (t : Table (K.{u} n)) : + ((diagonalIso n).inv.map t).val = up t := by + have h := congrArg (fun F : (K.{u} n).nu ⟶ (K.{u} n).nu => F.map t) + (diagonalIso n).inv_hom_id + let x := (diagonalIso n).inv.map t + have hx : IsDiagonal x.val := (diagonal_iff_boundaries x.val).mpr x.property + change down x.val hx = t at h + exact (up_down x.val hx).symm.trans (congrArg up h) + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex + +lemma positive_cycle_zero {n p : ℕ} (x : Chain.{u} n (p+1)) + (hx : x ∈ (complex n).positive (p+1)) (hd : (complex n).d p x = 0) : x = 0 := by + apply (mass_eq_zero_iff hx).mp + have h := congrArg (fun y : Chain n p => y.val ⟨false⟩) hd + erw [complex_d_coordinate] at h + change -mass n (p+1) x = 0 at h + simpa using h + +lemma positive_add_zero {n p : ℕ} {x y : Chain.{u} n p} + (hx : x ∈ (complex n).positive p) (hy : y ∈ (complex n).positive p) + (h : x+y = 0) : x = 0 ∧ y = 0 := by + have hm := congrArg (mass n p) h + rw [map_add, map_zero] at hm + have hx' := mass_nonneg hx + have hy' := mass_nonneg hy + exact ⟨(mass_eq_zero_iff hx).mp (by omega), (mass_eq_zero_iff hy).mp (by omega)⟩ + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open DirectedComplex DirectedComplex.Table GlobeComplex + +def sideRow {n : ℕ} (t : Table (K.{u} n)) (a : Bool) : (p : ℕ) → Bool → (complex.{u} n).Chain p + | 0, b => if a then (t.row 0 b).2 else (t.row 0 b).1 + | p+1, b => if a then (t.row (p+1) b).2.1 else (t.row (p+1) b).1 + +def crossRow {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : (complex.{u} n).Chain p := + (t.row (p+1) b).2.2 + +def project {n : ℕ} (t : Table (K.{u} n)) : Table (complex.{u} n) := + (complex n).cylinderProjection.table t + +lemma project_row {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : + (project t).row p b = sideRow t false p b + sideRow t true p b := by cases p <;> rfl + +lemma side_positive {n : ℕ} (t : Table (K.{u} n)) (a : Bool) (p : ℕ) (b : Bool) : + sideRow t a p b ∈ (complex n).positive p := by + cases p with + | zero => cases a; exact (t.positive 0 b).1; exact (t.positive 0 b).2 + | succ p => cases a; exact (t.positive (p+1) b).1; exact (t.positive (p+1) b).2.1 + +lemma cross_positive {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : + crossRow t p b ∈ (complex n).positive p := (t.positive (p+1) b).2.2 + +lemma cross_boundary {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : + (complex n).d p (crossRow t (p+1) b) = crossRow t p true - crossRow t p false := + congrArg (fun x : (K n).Chain (p+1) => x.2.2) (t.boundary (p+1) b) + +lemma left_boundary {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : + (complex n).d p (sideRow t false (p+1) b) - (-1 : ℤ)^p • crossRow t p b = + sideRow t false p true - sideRow t false p false := by + cases p with + | zero => simpa [sideRow, crossRow, cylinderDifferential] using congrArg Prod.fst (t.boundary 0 b) + | succ p => exact congrArg Prod.fst (t.boundary (p+1) b) + +lemma right_boundary {n : ℕ} (t : Table (K.{u} n)) (p : ℕ) (b : Bool) : + (complex n).d p (sideRow t true (p+1) b) + (-1 : ℤ)^p • crossRow t p b = + sideRow t true p true - sideRow t true p false := by + cases p with + | zero => simpa [sideRow, crossRow, cylinderDifferential] using congrArg Prod.snd (t.boundary 0 b) + | succ p => exact congrArg (fun x : (K n).Chain (p+1) => x.2.1) (t.boundary (p+1) b) + +lemma side_augmentation {n : ℕ} (t : Table (K.{u} n)) (b : Bool) : + mass n 0 (sideRow t false 0 b) + mass n 0 (sideRow t true 0 b) = 1 := t.augmentation b + +lemma side_mass_vertex {n : ℕ} (t : Table (K.{u} n)) (a b : Bool) : + mass n 0 (sideRow t a 0 b) = 0 ∨ mass n 0 (sideRow t a 0 b) = 1 := by + have h := side_augmentation t b + have h₀ := mass_nonneg (side_positive t false 0 b) + have h₁ := mass_nonneg (side_positive t true 0 b) + cases a <;> omega + +lemma cross_mass_vertex {n : ℕ} (t : Table (K.{u} n)) (b : Bool) : + mass n 0 (crossRow t 0 b) = + mass n 0 (sideRow t true 0 true) - mass n 0 (sideRow t true 0 false) := by + have h := congrArg (mass n 0) (right_boundary t 0 b) + simp only [pow_zero, one_smul] at h + erw [map_add, map_sub, mass_d] at h + simpa using h + +lemma interval_monotone {n : ℕ} (t : Table (K.{u} n)) : + mass n 0 (sideRow t true 0 false) ≤ mass n 0 (sideRow t true 0 true) := by + have h := mass_nonneg (cross_positive t 0 false) + rw [cross_mass_vertex] at h + omega + +lemma cross_succ_eq_zero_of_constant {n : ℕ} (t : Table (K.{u} n)) + (h : crossRow t 0 true = crossRow t 0 false) (p : ℕ) (b : Bool) : + crossRow t (p+1) b = 0 := by + induction p generalizing b with + | zero => exact positive_cycle_zero _ (cross_positive t 1 b) (by rw [cross_boundary, h, sub_self]) + | succ p ih => + exact positive_cycle_zero _ (cross_positive t (p+2) b) + (by rw [cross_boundary, ih true, ih false, sub_self]) + +lemma no_cross_of_stationary_interval {n : ℕ} (t : Table (K.{u} n)) + (h : mass n 0 (sideRow t true 0 true) = mass n 0 (sideRow t true 0 false)) : + ∀ p b, crossRow t p b = 0 := by + have h₀ : ∀ b, crossRow t 0 b = 0 := fun b => + (mass_eq_zero_iff (cross_positive t 0 b)).mp (by rw [cross_mass_vertex, h, sub_self]) + intro p b + cases p with + | zero => exact h₀ b + | succ p => exact cross_succ_eq_zero_of_constant t (by rw [h₀ true, h₀ false]) p b + +lemma no_side_of_empty_vertex {n : ℕ} (t : Table (K.{u} n)) (a : Bool) + (h : ∀ p b, crossRow t p b = 0) (h₀ : ∀ b, sideRow t a 0 b = 0) : + ∀ p b, sideRow t a p b = 0 := by + intro p b + induction p generalizing b with + | zero => exact h₀ b + | succ p ih => + apply positive_cycle_zero _ (side_positive t a (p+1) b) + cases a with + | false => simpa only [h, smul_zero, ih, sub_zero, sub_self] using left_boundary t p b + | true => simpa only [h, smul_zero, ih, add_zero, sub_self] using right_boundary t p b + +lemma endpoint_of_stationary_interval {n : ℕ} (t : Table (K.{u} n)) + (h : mass n 0 (sideRow t true 0 true) = mass n 0 (sideRow t true 0 false)) : + ∃ a, t = ((complex n).cylinderEndpoint a).table (project t) := by + have hc := no_cross_of_stationary_interval t h + rcases side_mass_vertex t true false with h₀ | h₁ + · have hs : ∀ p b, sideRow t true p b = 0 := by + apply no_side_of_empty_vertex t true hc + intro b + apply (mass_eq_zero_iff (side_positive t true 0 b)).mp + cases b + · exact h₀ + · exact h.trans h₀ + refine ⟨false, ?_⟩ + ext p b + change t.row p b = (complex n).cylinderEndpointMap false p ((project t).row p b) + rw [project_row, hs p b, add_zero] + cases p with + | zero => exact Prod.ext rfl (hs 0 b) + | succ p => exact Prod.ext rfl (Prod.ext (hs (p+1) b) (hc p b)) + · have hs : ∀ p b, sideRow t false p b = 0 := by + apply no_side_of_empty_vertex t false hc + intro b + apply (mass_eq_zero_iff (side_positive t false 0 b)).mp + have hh := side_augmentation t b + cases b <;> omega + refine ⟨true, ?_⟩ + ext p b + change t.row p b = (complex n).cylinderEndpointMap true p ((project t).row p b) + rw [project_row, hs p b, zero_add] + cases p with + | zero => exact Prod.ext (hs 0 b) rfl + | succ p => exact Prod.ext (hs (p+1) b) (Prod.ext rfl (hc p b)) + +lemma crossing_sides {n : ℕ} (t : Table (K.{u} n)) + (h : mass n 0 (sideRow t true 0 true) ≠ mass n 0 (sideRow t true 0 false)) : + sideRow t true 0 false = 0 ∧ sideRow t false 0 true = 0 := by + have hs := side_mass_vertex t true false + have ht := side_mass_vertex t true true + have hm := interval_monotone t + have ha := side_augmentation t true + constructor + · apply (mass_eq_zero_iff (side_positive t true 0 false)).mp + omega + · apply (mass_eq_zero_iff (side_positive t false 0 true)).mp + omega + +lemma crossing_vertices {n : ℕ} (t : Table (K.{u} n)) + (h : mass n 0 (sideRow t true 0 true) ≠ mass n 0 (sideRow t true 0 false)) : + (∀ b, sideRow t b 0 b = (project t).row 0 b) := by + obtain ⟨hs, ht⟩ := crossing_sides t h + intro b + rw [project_row] + cases b + · rw [hs, add_zero] + · rw [ht, zero_add] + +lemma crossing_diagonal {n : ℕ} (t : Table (K.{u} (n+1))) + (h : mass (n+1) 0 (sideRow t true 0 true) ≠ mass (n+1) 0 (sideRow t true 0 false)) + {p : ℕ} (hp : 0 < p) (e : Bool) + (hpj : project t = truncate p e (topTable (n+1))) : IsDiagonal t := by + have hv := crossing_vertices t h + obtain ⟨hs, ht⟩ := crossing_sides t h + intro b + have hb := hv b + rw [hpj, truncate_row, ite_eq_left hp] at hb + change sideRow t b 0 b = topRow (n+1) 0 b at hb + rw [topRow_lt _ _ _ (by omega)] at hb + cases b + · exact Prod.ext hb hs + · exact Prod.ext ht hb + +lemma crossing_vertical {n : ℕ} (t : Table (K.{u} n)) + (h : mass n 0 (sideRow t true 0 true) ≠ mass n 0 (sideRow t true 0 false)) + (hpj : truncate 0 false (project t) = project t) : t = verticalTable (project t) := by + have hz : ∀ p b, (project t).row (p+1) b = 0 := by + intro p b + rw [← hpj, truncate_row] + simp + have hs : ∀ p b, sideRow t false (p+1) b = 0 ∧ sideRow t true (p+1) b = 0 := by + intro p b + exact positive_add_zero (side_positive t false (p+1) b) (side_positive t true (p+1) b) + (by erw [← project_row, hz]; rfl) + have he : ∀ b, (project t).row 0 b = (project t).row 0 true := by + intro b + have h₀ := congrArg (fun x : Table (complex n) => x.row 0 b) hpj + have h₁ := congrArg (fun x : Table (complex n) => x.row 0 true) hpj + exact h₀.symm.trans h₁ + have hv := crossing_vertices t h + obtain ⟨hb, ht⟩ := crossing_sides t h + have hc₀ : ∀ b, crossRow t 0 b = (project t).row 0 true := by + intro b + have hh := right_boundary t 0 b + rw [(hs 0 b).2, map_zero, zero_add, pow_zero, one_smul, hb, sub_zero, hv true] at hh + exact hh + have hc : ∀ p b, crossRow t (p+1) b = 0 := + cross_succ_eq_zero_of_constant t (by rw [hc₀, hc₀]) + ext p b + cases p with + | zero => + change t.row 0 b = verticalRow (project t) 0 b + cases b + · exact Prod.ext (hv false) hb + · exact Prod.ext ht (hv true) + | succ p => + cases p with + | zero => + change t.row 1 b = verticalRow (project t) 1 b + simp only [verticalRow, show ¬Even (1 : ℕ) by decide, ite_false, hz] + cases b <;> exact Prod.ext (hs 0 _).1 (Prod.ext (hs 0 _).2 ((hc₀ _).trans (he _).symm)) + | succ p => + change t.row (p+2) b = verticalRow (project t) (p+2) b + simp only [verticalRow, hz] + split_ifs <;> cases b <;> exact Prod.ext (hs (p+1) _).1 (Prod.ext (hs (p+1) _).2 (hc p _)) + +lemma table_cases {n : ℕ} (t : Table (K.{u} (n+1))) : + (∃ a, t = ((complex (n+1)).cylinderEndpoint a).table (project t)) ∨ + (∃ a, t = verticalTable (truncate 0 a (topTable (n+1)))) ∨ IsDiagonal t := by + by_cases h : mass (n+1) 0 (sideRow t true 0 true) = mass (n+1) 0 (sideRow t true 0 false) + · exact Or.inl (endpoint_of_stationary_interval t h) + · obtain ⟨p, a, _, hpj⟩ := table_classification (project t) + cases p with + | zero => + right; left + refine ⟨a, ?_⟩ + rw [crossing_vertical t h (by rw [hpj]; simp [truncate_truncate]), hpj] + | succ p => exact Or.inr (Or.inr (crossing_diagonal t h (by omega) a hpj)) + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GlobeComplex +open DirectedComplex DirectedComplex.Table + +def suspendTable {n : ℕ} (x : Table (complex.{u} n)) : Table (complex.{u} (n+1)) where + row + | 0, b => basis (n+1) 0 b (Or.inl (by omega)) + | p+1, b => (shiftDown n p).symm (x.row p b) + positive p b := by + cases p with + | zero => exact basis_positive _ _ _ _ + | succ p => exact x.positive p b + boundary p b := by + cases p with + | zero => + erw [d_shiftUp_zero, table_mass_zero] + apply Subtype.ext + funext ⟨i⟩ + change (if i then (1 : ℤ) else -1) = + (basis.{u} (n+1) 0 true (Or.inl (by omega))).val ⟨i⟩ - + (basis.{u} (n+1) 0 false (Or.inl (by omega))).val ⟨i⟩ + cases i <;> simp + | succ p => erw [shiftUp_d, x.boundary, map_sub]; rfl + augmentation b := mass_basis _ _ _ _ + bounded := by + obtain ⟨k, hk⟩ := x.bounded + refine ⟨k+1, ?_⟩ + rintro (_ | p) hp b + · omega + · change (shiftDown n p).symm (x.row p b) = 0 + erw [hk p (by omega) b, map_zero] + +@[simp] lemma suspendTable_zero {n : ℕ} (x : Table (complex.{u} n)) (b : Bool) : + (suspendTable x).row 0 b = basis (n+1) 0 b (Or.inl (by omega)) := rfl + +@[simp] lemma suspendTable_succ {n p : ℕ} (x : Table (complex.{u} n)) (b : Bool) : + (suspendTable x).row (p+1) b = (shiftDown n p).symm (x.row p b) := rfl + +lemma suspendTable_truncate {n : ℕ} (x : Table (complex.{u} n)) (k : ℕ) (b : Bool) : + suspendTable (truncate k b x) = truncate (k+1) b (suspendTable x) := by + ext p a + cases p with + | zero => simp + | succ p => + simp only [suspendTable_succ, truncate_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + erw [apply_ite (shiftDown n p).symm, apply_ite (shiftDown n p).symm, map_zero] + rfl + +lemma suspendTable_top (n : ℕ) : suspendTable (topTable.{u} n) = topTable (n+1) := by + ext p b + cases p with + | zero => exact (topRow_lt (n+1) 0 b (by omega)).symm + | succ p => + change (shiftDown n p).symm (topRow n p b) = topRow (n+1) (p+1) b + by_cases hp : p < n + · rw [topRow_lt _ _ _ hp, topRow_lt _ _ _ (by omega)] + rfl + · by_cases hn : p = n + · subst p + rw [topRow_eq, topRow_eq] + rfl + · erw [topRow_gt _ _ _ (by omega), topRow_gt _ _ _ (by omega), map_zero] + rfl + +lemma suspendTable_eq_face {n k : ℕ} (b : Bool) : + suspendTable (truncate k b (topTable.{u} n)) = truncate (k+1) b (topTable (n+1)) := by + rw [suspendTable_truncate, suspendTable_top] + +end Thomason.GlobeComplex + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open DirectedComplex DirectedComplex.Table GlobeComplex + +def atEnd {n : ℕ} (a : Bool) (x : Table (complex.{u} n)) : Table (K.{u} n) := + ((complex n).cylinderEndpoint a).table x + +def vertex (n : ℕ) (a : Bool) : Table (complex.{u} (n+1)) := truncate 0 a (topTable (n+1)) + +@[simp] lemma vertex_zero (n : ℕ) (a b : Bool) : + (vertex.{u} n a).row 0 b = basis (n+1) 0 a (Or.inl (by omega)) := by + simp [vertex, topTable, topRow_lt _ _ _ (show 0 < n+1 by omega)] + +@[simp] lemma vertex_succ (n p : ℕ) (a b : Bool) : (vertex.{u} n a).row (p+1) b = 0 := by + simp [vertex] + +@[simp] lemma vertexWeights_one_zero (n : ℕ) : + vertexWeights.{u} n 1 0 = basis (n+1) 0 false (Or.inl (by omega)) := by + apply Subtype.ext + funext ⟨b⟩ + cases b <;> rfl + +@[simp] lemma vertexWeights_zero_one (n : ℕ) : + vertexWeights.{u} n 0 1 = basis (n+1) 0 true (Or.inl (by omega)) := by + apply Subtype.ext + funext ⟨b⟩ + cases b <;> rfl + +lemma up_truncate {n : ℕ} (t : Table (K.{u} n)) (k : ℕ) (e : Bool) : + up (truncate k e t) = truncate (k+1) e (up t) := by + ext p b + cases p with + | zero => simp + | succ p => + simp only [up_succ, truncate_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + split_ifs <;> simp + +lemma up_composable {n k : ℕ} {s t : Table (K.{u} n)} + (h : truncate k true s = truncate k false t) : + truncate (k+1) true (up s) = truncate (k+1) false (up t) := by + rw [← up_truncate, ← up_truncate, h] + +lemma up_comp {n k : ℕ} (s t : Table (K.{u} n)) + (h : truncate k true s = truncate k false t) + (h' : truncate (k+1) true (up s) = truncate (k+1) false (up t)) : + up (DirectedComplex.Table.comp k s t h) = DirectedComplex.Table.comp (k+1) (up s) (up t) h' := by + ext p b + cases p with + | zero => simp + | succ p => + simp only [up_succ, comp_row, Nat.add_lt_add_iff_right, Nat.add_right_cancel_iff] + split_ifs <;> simp + +lemma up_endpoint_left_matching {n : ℕ} (x : Table (complex.{u} n)) : + truncate 0 true (verticalTable (vertex n false)) = truncate 0 false (atEnd true (suspendTable x)) := by + ext p b + cases p with + | zero => + simp only [truncate_row, lt_self_iff_false, ite_false, ite_true] + change (0, (vertex n false).row 0 true) = (0, (suspendTable x).row 0 false) + simp + | succ p => simp + +lemma up_endpoint_right_matching {n : ℕ} (x : Table (complex.{u} n)) : + truncate 0 true (atEnd false (suspendTable x)) = truncate 0 false (verticalTable (vertex n true)) := by + ext p b + cases p with + | zero => + simp only [truncate_row, lt_self_iff_false, ite_false, ite_true] + change ((suspendTable x).row 0 true, 0) = ((vertex n true).row 0 false, 0) + simp + | succ p => simp + +lemma up_endpoint_false {n : ℕ} (x : Table (complex.{u} n)) : + up (atEnd false x) = DirectedComplex.Table.comp 0 (verticalTable (vertex n false)) + (atEnd true (suspendTable x)) (up_endpoint_left_matching x) := by + ext p b + cases p with + | zero => + cases b <;> simp [comp_row, atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, diagonalRow] + | succ p => + cases p with + | zero => + cases b <;> + simp [comp_row, atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, upRow, table_mass_zero] + all_goals + refine Prod.ext ?_ (Prod.ext ?_ ?_) + · rfl + · exact (zero_add _).symm + · apply Subtype.ext + funext ⟨index⟩ + cases index <;> rfl + | succ p => + simp only [up_succ, comp_row, Nat.not_lt_zero, ite_false, Nat.succ_ne_zero] + simp [atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, upRow] + refine Prod.ext ?_ (Prod.ext ?_ ?_) + · rfl + · exact (zero_add _).symm + · rfl + +lemma up_endpoint_true {n : ℕ} (x : Table (complex.{u} n)) : + up (atEnd true x) = DirectedComplex.Table.comp 0 (atEnd false (suspendTable x)) + (verticalTable (vertex n true)) (up_endpoint_right_matching x) := by + ext p b + cases p with + | zero => + cases b <;> simp [comp_row, atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, diagonalRow] + | succ p => + cases p with + | zero => + cases b <;> + simp [comp_row, atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, upRow, table_mass_zero] + all_goals + refine Prod.ext ?_ (Prod.ext ?_ ?_) + · exact (add_zero _).symm + · rfl + · apply Subtype.ext + funext ⟨index⟩ + cases index <;> rfl + | succ p => + simp only [up_succ, comp_row, Nat.not_lt_zero, ite_false, Nat.succ_ne_zero] + simp [atEnd, Hom.table, cylinderEndpoint, cylinderEndpointMap, + verticalTable, verticalRow, upRow] + exact Prod.ext (add_zero _).symm rfl + +lemma up_vertical {n : ℕ} (x : Table (complex.{u} n)) : + up (verticalTable x) = verticalTable (suspendTable x) := by + ext p b + cases p with + | zero => cases b <;> simp [verticalTable, verticalRow, diagonalRow] + | succ p => + cases p with + | zero => + cases b <;> simp [verticalTable, verticalRow, upRow, table_mass_zero] + all_goals + refine Prod.ext ?_ (Prod.ext ?_ ?_) + · rfl + · rfl + · apply Subtype.ext + funext ⟨index⟩ + cases index <;> rfl + | succ p => + by_cases hp : Even (p+1) + · have hp' : ¬Even (p+1+1) := by rw [Nat.even_add_one]; exact not_not_intro hp + cases b <;> simp [verticalTable, verticalRow, upRow, hp, hp'] <;> rfl + · have hp' : Even (p+1+1) := by rw [Nat.even_add_one]; exact hp + cases b <;> simp [verticalTable, verticalRow, upRow, hp, hp'] <;> rfl + +lemma table_zero_cases (t : Table (K.{u} 0)) : + (∃ a, t = atEnd a (project t)) ∨ t = verticalTable (topTable 0) := by + by_cases h : mass 0 0 (sideRow t true 0 true) = mass 0 0 (sideRow t true 0 false) + · exact Or.inl (endpoint_of_stationary_interval t h) + · right + obtain ⟨p,a,hp,he⟩ := table_classification (project t) + have hp0 : p = 0 := by omega + subst p + have ht : project t = topTable 0 := by + rw [he, ← face_nu] + exact (complex 0).nu.face_of_fixed (topTable_bounded 0) (le_refl 0) a + rw [crossing_vertical t h (by rw [ht]; exact topTable_bounded 0), ht] + +lemma generated (n : ℕ) (P : Table (K.{u} n) → Prop) + (hend : ∀ a x, P (atEnd a x)) (hvertical : ∀ x, P (verticalTable x)) + (hcomp : ∀ k s t (h : truncate k true s = truncate k false t), + P s → P t → P (DirectedComplex.Table.comp k s t h)) : ∀ x, P x := by + induction n with + | zero => + intro x + rcases table_zero_cases x with ⟨a,he⟩ | he + · rw [he]; exact hend a (project x) + · rw [he]; exact hvertical (topTable 0) + | succ n ih => + intro x + rcases table_cases x with ⟨a,he⟩ | ⟨a,he⟩ | hd + · rw [he]; exact hend a (project x) + · rw [he]; exact hvertical _ + · rw [← up_down x hd] + apply ih (fun y => P (up y)) + · intro a y + cases a + · rw [up_endpoint_false] + exact hcomp 0 _ _ _ (hvertical _) (hend true _) + · rw [up_endpoint_true] + exact hcomp 0 _ _ _ (hend false _) (hvertical _) + · intro y + rw [up_vertical] + exact hvertical _ + · intro k s t h hs ht + rw [up_comp s t h (up_composable h)] + exact hcomp (k+1) _ _ _ hs ht + +end Thomason.GrayRecursive + +end + +noncomputable section +universe u v w z + + +namespace Thomason.DirectedComplex.Table +variable {K : DirectedComplex.{u}} + +lemma fixed_of_rows_zero {k : ℕ} (x : Table K) + (h : ∀ p, k < p → ∀ b, x.row p b = 0) : truncate k false x = x := by + have ht : x.row k true = x.row k false := by + have hb := x.boundary k false + rw [h (k+1) (by omega) false, map_zero] at hb + exact sub_eq_zero.mp hb.symm + ext p b + rw [truncate_row] + split_ifs with hp he + · rfl + · subst p + cases b <;> simp [ht] + · exact (h p (by omega) b).symm + +lemma fixed_iff_rows_zero {k : ℕ} (x : Table K) : + truncate k false x = x ↔ ∀ p, k < p → ∀ b, x.row p b = 0 := + ⟨fun h _ hp b => row_above_fixed x h hp b, fixed_of_rows_zero x⟩ + +end Thomason.DirectedComplex.Table + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayRecursive +open CategoryTheory DirectedComplex DirectedComplex.Table GlobeComplex + +lemma up_injective (n : ℕ) : Function.Injective (@up.{u} n) := by + intro s t h + ext p b + have hh := congrArg (fun x : Table (K (n+1)) => downRow n p (x.row (p+1) b)) h + exact (downRow_upRow n p (s.row p b)).symm.trans (hh.trans (downRow_upRow n p (t.row p b))) + +lemma up_fixed_iff {n k : ℕ} (t : Table (K.{u} n)) : + truncate (k+1) false (up t) = up t ↔ truncate k false t = t := by + rw [← up_truncate] + exact (up_injective n).eq_iff + +lemma project_fixed {n k : ℕ} (t : Table (K.{u} n)) + (h : truncate k false t = t) : truncate k false (project t) = project t := by + change truncate k false ((complex n).cylinderProjection.table t) = _ + rw [← Hom.table_truncate, h] + rfl + +lemma atEnd_fixed {n k : ℕ} (a : Bool) (t : Table (complex.{u} n)) + (h : truncate k false t = t) : truncate k false (atEnd a t) = atEnd a t := by + change truncate k false (((complex n).cylinderEndpoint a).table t) = _ + rw [← Hom.table_truncate, h] + rfl + +lemma suspend_fixed {n k : ℕ} (t : Table (complex.{u} n)) + (h : truncate k false t = t) : truncate (k+1) false (suspendTable t) = suspendTable t := by + rw [← suspendTable_truncate, h] + +lemma vertex_fixed (n : ℕ) (a : Bool) : truncate 0 false (vertex.{u} n a) = vertex n a := by + simp only [vertex, truncate_truncate, lt_self_iff_false, ite_false] + +lemma vertical_fixed {K : DirectedComplex.{u}} {k : ℕ} (t : Table K) + (h : truncate k false t = t) : + truncate (k+1) false (verticalTable t) = verticalTable t := by + apply fixed_of_rows_zero + rintro (_ | p) hp b + · omega + · have hz := row_above_fixed t h (by omega : k < p) b + have hz' := row_above_fixed t h (by omega : k < p+1) b + simp [verticalTable, verticalRow, hz, hz'] + +lemma vertical_fixed_iff {K : DirectedComplex.{u}} {k : ℕ} (t : Table K) : + truncate (k+1) false (verticalTable t) = verticalTable t ↔ truncate k false t = t := by + refine ⟨?_, vertical_fixed t⟩ + intro h + apply fixed_of_rows_zero + intro p hp b + have hz := congrArg (fun x : K.cylinder.Chain (p+1) => x.2.2) + (row_above_fixed (verticalTable t) h (by omega : k+1 < p+1) b) + simp only [verticalTable, verticalRow] at hz + split_ifs at hz <;> exact hz + +lemma zero_is_endpoint {n : ℕ} (t : Table (K.{u} n)) + (h : truncate 0 false t = t) : ∃ a, t = atEnd a (project t) := by + apply endpoint_of_stationary_interval + have hz : crossRow t 0 false = 0 := congrArg (fun x : (K n).Chain 1 => x.2.2) + (row_above_fixed t h (by omega : 0 < 1) false) + have hm := cross_mass_vertex t false + erw [hz, map_zero] at hm + exact sub_eq_zero.mp hm.symm + +lemma generated_bounded (n k : ℕ) (P : Table (K.{u} n) → Prop) + (hend : ∀ a x, truncate k false x = x → P (atEnd a x)) + (hvertical : ∀ r, r < k → ∀ x, truncate r false x = x → P (verticalTable x)) + (hcomp : ∀ l s t (h : truncate l true s = truncate l false t), + P s → P t → P (DirectedComplex.Table.comp l s t h)) : + ∀ x, truncate k false x = x → P x := by + induction n generalizing k with + | zero => + intro x hx + cases k with + | zero => + obtain ⟨a,he⟩ := zero_is_endpoint x hx + rw [he] + exact hend a (project x) (project_fixed x hx) + | succ k => + rcases table_zero_cases x with ⟨a,he⟩ | he + · rw [he]; exact hend a (project x) (project_fixed x hx) + · rw [he]; exact hvertical 0 (by omega) (topTable 0) (topTable_bounded 0) + | succ n ih => + intro x hx + cases k with + | zero => + obtain ⟨a,he⟩ := zero_is_endpoint x hx + rw [he] + exact hend a (project x) (project_fixed x hx) + | succ k => + rcases table_cases x with ⟨a,he⟩ | ⟨a,he⟩ | hd + · rw [he]; exact hend a (project x) (project_fixed x hx) + · rw [he]; exact hvertical 0 (by omega) (vertex n a) (vertex_fixed n a) + · have hdown : truncate k false (down x hd) = down x hd := by + apply (up_fixed_iff _).mp + rw [up_down x hd] + exact hx + rw [← up_down x hd] + apply ih k (fun y => P (up y)) ?_ ?_ ?_ (down x hd) hdown + · intro a y hy + cases a + · rw [up_endpoint_false] + exact hcomp 0 _ _ _ (hvertical 0 (by omega) _ (vertex_fixed _ _)) + (hend true _ (suspend_fixed y hy)) + · rw [up_endpoint_true] + exact hcomp 0 _ _ _ (hend false _ (suspend_fixed y hy)) + (hvertical 0 (by omega) _ (vertex_fixed _ _)) + · intro r hr y hy + rw [up_vertical] + exact hvertical (r+1) (by omega) _ (suspend_fixed y hy) + · intro l s t h hs ht + rw [up_comp s t h (up_composable h)] + exact hcomp (l+1) _ _ _ hs ht + +lemma functor_ext {n : ℕ} {Y : OmegaCategory.{v}} + (F G : OmegaCategory.Functor (K.{u} n).nu Y) + (hend : ∀ a x, F.map (atEnd a x) = G.map (atEnd a x)) + (hvert : ∀ x, F.map (verticalTable x) = G.map (verticalTable x)) : F = G := by + apply OmegaCategory.Functor.ext + funext x + apply generated n (fun t => F.map t = G.map t) hend hvert ?_ x + intro k s t h hs ht + have hf := F.map_comp k s t h (by erw [← F.map_target, ← F.map_source]; exact congrArg F.map h) + have hg := G.map_comp k s t h (by erw [← G.map_target, ← G.map_source]; exact congrArg G.map h) + exact hf.trans ((Y.comp_congr_cells k _ _ hs ht).trans hg.symm) + +lemma functor_ext_truncated {n k : ℕ} {Y : OmegaCategory.{v}} (hY : Y.IsTruncated k) + (F G : OmegaCategory.Functor (K.{u} n).nu Y) + (hend : ∀ a x, truncate k false x = x → F.map (atEnd a x) = G.map (atEnd a x)) + (hvert : ∀ r, r < k → ∀ x, truncate r false x = x → + F.map (verticalTable x) = G.map (verticalTable x)) : F = G := by + have hb (x : Table (K n)) (hx : truncate k false x = x) : F.map x = G.map x := by + apply generated_bounded n k (fun t => F.map t = G.map t) hend hvert ?_ x hx + intro l s t h hs ht + have hf := F.map_comp l s t h (by erw [← F.map_target, ← F.map_source]; exact congrArg F.map h) + have hg := G.map_comp l s t h (by erw [← G.map_target, ← G.map_source]; exact congrArg G.map h) + exact hf.trans ((Y.comp_congr_cells l _ _ hs ht).trans hg.symm) + apply OmegaCategory.Functor.ext + funext x + have he := hb (truncate k false x) (by erw [truncate_truncate, ite_self]) + change F.map ((K n).nu.source k x) = G.map ((K n).nu.source k x) at he + rw [F.map_source, G.map_source, hY, hY] at he + exact he + +end Thomason.GrayRecursive + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/ConstructedRightGray.lean b/lean/OAI/CategoryTheory/Thomason/Gray/ConstructedRightGray.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5fb06e98e64b631581439bcd98b02eb3685ef46 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/ConstructedRightGray.lean @@ -0,0 +1,676 @@ +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.GrayChainGlobeRestriction +import OAI.CategoryTheory.Thomason.Gray.GrayMappingEndpointEvaluation +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Gray.GraySimplexProjection +import OAI.CategoryTheory.Thomason.Gray.GridGlobeCylinderComparison +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeRetractions +import OAI.CategoryTheory.Thomason.Transfer.TripleGlobeCylinderPushout + +namespace OAI + +section + +/-! # Associativity of the actual mapping-cell composition + +The constructed three-globe cylinder pushout extends any matching triple. +Evaluation of its strict associativity diagram then proves associativity +at a finite mapping level, and common finite representatives give the +unrestricted carrier law. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {D : StrictOmegaCategory.{0}} {n k : ℕ} + +private theorem tripleGlue_condition (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + model.map (TripleGlobe.bridge n k) ≫ glue hk f g hfg = + model.map (Globe.faceMap false k n) ≫ h := by + change model.map (Globe.faceMap true k n ≫ PastingGlobe.right n n k) ≫ glue hk f g hfg = _ + rw [model.map_comp, Category.assoc, glue_right] + exact hgh + +def tripleGlue (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + model.obj (TripleGlobe.category n k) ⟶ D := + (TripleGlobeCylinder.isPushout hk).desc (glue hk f g hfg) h (tripleGlue_condition hk f g h hfg hgh) + +theorem tripleGlue_pair (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + model.map (TripleGlobe.pair n k) ≫ tripleGlue hk f g h hfg hgh = glue hk f g hfg := + (TripleGlobeCylinder.isPushout hk).inl_desc _ _ _ + +theorem tripleGlue_first (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + tripleEvaluation (tripleGlue hk f g h hfg hgh) 0 = f := by + change model.map (PastingGlobe.left n n k ≫ TripleGlobe.pair n k) ≫ _ = _ + rw [model.map_comp, Category.assoc, tripleGlue_pair, glue_left] + +theorem tripleGlue_middle (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + tripleEvaluation (tripleGlue hk f g h hfg hgh) 1 = g := by + change model.map (PastingGlobe.right n n k ≫ TripleGlobe.pair n k) ≫ _ = _ + rw [model.map_comp, Category.assoc, tripleGlue_pair, glue_right] + +theorem tripleGlue_last (hk : k < n) + (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) : + tripleEvaluation (tripleGlue hk f g h hfg hgh) 2 = h := + (TripleGlobeCylinder.isPushout hk).inr_desc _ _ _ + +/-- Associativity at any common finite mapping level. -/ +theorem composite_assoc (hk : k < n) (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) + (hl : model.map (Globe.faceMap true k n) ≫ composite hk f g hfg = + model.map (Globe.faceMap false k n) ≫ h) + (hr : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ composite hk g h hgh) : + composite hk (composite hk f g hfg) h hl = composite hk f (composite hk g h hgh) hr := by + let u := tripleGlue hk f g h hfg hgh + have h0 : tripleEvaluation u 0 = f := tripleGlue_first hk f g h hfg hgh + have h1 : tripleEvaluation u 1 = g := tripleGlue_middle hk f g h hfg hgh + have h2 : tripleEvaluation u 2 = h := tripleGlue_last hk f g h hfg hgh + have h01 : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 0 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 1 := by + simpa only [h0, h1] using hfg + have h12 : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 1 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 2 := by + simpa only [h1, h2] using hgh + have hL : model.map (Globe.faceMap true k n) ≫ + composite hk (tripleEvaluation u 0) (tripleEvaluation u 1) h01 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 2 := by + simpa only [h0, h1, h2] using hl + have hR : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 0 = + model.map (Globe.faceMap false k n) ≫ + composite hk (tripleEvaluation u 1) (tripleEvaluation u 2) h12 := by + simpa only [h0, h1, h2] using hr + simpa only [h0, h1, h2] using triple_associativity hk u h01 h12 hL hR + +/-- Associativity on the images of three finite representatives. -/ +theorem assoc_ι (hk : k < n) (f g h : model.obj (Globe.category n) ⟶ D) + (hfg : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (hgh : model.map (Globe.faceMap true k n) ≫ g = model.map (Globe.faceMap false k n) ≫ h) + (hxy : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n f) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n g)) + (hyz : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n g) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n h)) + (hl : GlobeMappingCells.face model D true k + (comp k (GlobeMappingCells.ι model D n f) (GlobeMappingCells.ι model D n g) hxy) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n h)) + (hr : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n f) = + GlobeMappingCells.face model D false k + (comp k (GlobeMappingCells.ι model D n g) (GlobeMappingCells.ι model D n h) hyz)) : + comp k (comp k (GlobeMappingCells.ι model D n f) (GlobeMappingCells.ι model D n g) hxy) + (GlobeMappingCells.ι model D n h) hl = + comp k (GlobeMappingCells.ι model D n f) + (comp k (GlobeMappingCells.ι model D n g) (GlobeMappingCells.ι model D n h) hyz) hr := by + have hxyE := comp_ι hk f g hfg hxy + have hyzE := comp_ι hk g h hgh hyz + have hl' : GlobeMappingCells.face model D true k + (GlobeMappingCells.ι model D n (composite hk f g hfg)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n h) := + (congrArg (GlobeMappingCells.face model D true k) hxyE).symm.trans hl + have hr' : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n f) = + GlobeMappingCells.face model D false k + (GlobeMappingCells.ι model D n (composite hk g h hgh)) := + hr.trans (congrArg (GlobeMappingCells.face model D false k) hyzE) + have hlF := (GlobeMappingCells.faces_eq_iff model D true false k n n + (composite hk f g hfg) h).mp hl' + have hrF := (GlobeMappingCells.faces_eq_iff model D true false k n n + f (composite hk g h hgh)).mp hr' + exact (comp_congr hxyE rfl hl hl').trans + ((comp_ι hk _ _ hlF hl').trans + ((congrArg (GlobeMappingCells.ι model D n) (composite_assoc hk f g h hfg hgh hlF hrF)).trans + ((comp_ι hk _ _ hrF hr').symm.trans (comp_congr rfl hyzE hr hr').symm))) + +/-- The actual carrier operation satisfies strict associativity. -/ +theorem assoc (k : ℕ) (x y z : Cell D) + (hxy : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (hyz : GlobeMappingCells.face model D true k y = GlobeMappingCells.face model D false k z) + (hl : GlobeMappingCells.face model D true k (comp k x y hxy) = + GlobeMappingCells.face model D false k z) + (hr : GlobeMappingCells.face model D true k x = + GlobeMappingCells.face model D false k (comp k y z hyz)) : + comp k (comp k x y hxy) z hl = comp k x (comp k y z hyz) hr := by + let cells : Fin 3 → Cell D := ![x, y, z] + obtain ⟨n, hn, f, hf⟩ := GlobeMappingCells.exists_representatives_fin_above model D 3 cells (k+1) + have hk : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) hn + have h0 : GlobeMappingCells.ι model D n (f 0) = x := hf 0 + have h1 : GlobeMappingCells.ι model D n (f 1) = y := hf 1 + have h2 : GlobeMappingCells.ι model D n (f 2) = z := hf 2 + have hfg := GlobeMappingCells.matching_representatives model D x y hxy (f 0) (f 1) h0 h1 + have hgh := GlobeMappingCells.matching_representatives model D y z hyz (f 1) (f 2) h1 h2 + have hxy' : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (f 0)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (f 1)) := by + simpa only [h0, h1] using hxy + have hyz' : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (f 1)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (f 2)) := by + simpa only [h1, h2] using hyz + have hl' : GlobeMappingCells.face model D true k + (comp k (GlobeMappingCells.ι model D n (f 0)) (GlobeMappingCells.ι model D n (f 1)) hxy') = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (f 2)) := by + simpa only [h0, h1, h2] using hl + have hr' : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (f 0)) = + GlobeMappingCells.face model D false k + (comp k (GlobeMappingCells.ι model D n (f 1)) (GlobeMappingCells.ι model D n (f 2)) hyz') := by + simpa only [h0, h1, h2] using hr + simpa only [h0, h1, h2] using assoc_ι hk (f 0) (f 1) (f 2) hfg hgh hxy' hyz' hl' hr' + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The actual strict right interval internal hom + +Its cells are the finite-dimensional maps from the explicit globe +cylinders. All strict laws come from the proved finite parameter gluing. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +/-- The strict mapping category of the actual interval model. -/ +def internalHomObj (D : StrictOmegaCategory.{0}) : StrictOmegaCategory.{0} where + Cell := Cell D + face := GlobeMappingCells.face model D + globular := GlobeMappingCells.globular model D + comp := comp + source_comp := source_comp + target_comp := target_comp + face_comp := face_comp + left_unit := left_unit + right_unit := right_unit + assoc := assoc + interchange := interchange + finite_dimension := GlobeMappingCells.finite_dimension model D + +/-- Postcomposition as a strict functor on the actual mapping categories. -/ +def internalHomMap {D E : StrictOmegaCategory.{0}} (u : D ⟶ E) : + internalHomObj D ⟶ internalHomObj E where + toFun := GlobeMappingCells.map model u + map_face := GlobeMappingCells.map_face model u + map_comp := by + intro k x y h h' + exact map_comp u k x y h h' + +/-- The global right interval internal-hom functor. -/ +def internalHom : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} where + obj := internalHomObj + map := internalHomMap + map_id D := by + apply Hom.ext + funext x + exact GlobeMappingCells.map_id model x + map_comp u v := by + apply Hom.ext + funext x + exact GlobeMappingCells.map_comp model u v x + +/-- Natural maps into the cylinder give strict evaluations; in particular +this constructs both interval endpoint evaluations. -/ +def evaluation (η : 𝟭 StrictOmegaCategory.{0} ⟶ model) (D : StrictOmegaCategory.{0}) : + internalHomObj D ⟶ D where + toFun := GlobeMappingCells.naturalEvaluation η D + map_face := GlobeMappingCells.naturalEvaluation_face η D + map_comp := naturalEvaluation_comp η + +/-- Evaluation is natural under postcomposition. -/ +def evaluationNatTrans (η : 𝟭 StrictOmegaCategory.{0} ⟶ model) : + internalHom ⟶ 𝟭 StrictOmegaCategory.{0} where + app := evaluation η + naturality D E u := by + apply Hom.ext + funext x + exact GlobeMappingCells.naturalEvaluation_map η u x + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The globe-level right-adjunction bijection + +A strict map from a free globe into the constructed internal hom is +exactly a map out of its concrete chain cylinder. The bijection is natural +for every strict map of globes and for postcomposition in the target. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +/-- Representability on every free globe. -/ +def globeHomEquiv (n : ℕ) (D : StrictOmegaCategory.{0}) : + (model.obj (Globe.category n) ⟶ D) ≃ (Globe.category n ⟶ internalHomObj D) := + (GlobeMappingCells.boundedEquiv model D n).trans (Globe.homEquiv (internalHomObj D) n).symm + +@[simp] theorem globeHomEquiv_top (n : ℕ) (D : StrictOmegaCategory.{0}) + (f : model.obj (Globe.category n) ⟶ D) : + (globeHomEquiv n D f).toFun Globe.Cell.top = GlobeMappingCells.ι model D n f := rfl + +@[simp] theorem globeHomEquiv_symm_top (n : ℕ) (D : StrictOmegaCategory.{0}) + (g : Globe.category n ⟶ internalHomObj D) : + GlobeMappingCells.ι model D n ((globeHomEquiv n D).symm g) = g.toFun Globe.Cell.top := + congrArg (fun q : Globe.category n ⟶ internalHomObj D => q.toFun Globe.Cell.top) + ((globeHomEquiv n D).apply_symm_apply g) + +/-- Contravariant naturality includes arbitrary strict globe maps. -/ +theorem globeHomEquiv_precomp {n m : ℕ} (D : StrictOmegaCategory.{0}) + (s : Globe.category n ⟶ Globe.category m) (f : model.obj (Globe.category m) ⟶ D) : + globeHomEquiv n D (model.map s ≫ f) = s ≫ globeHomEquiv m D f := by + apply Globe.hom_ext + change GlobeMappingCells.ι model D n (model.map s ≫ f) = + GlobeMappingCells.evaluateCell model D f (s.toFun Globe.Cell.top) + exact GlobeMappingCells.globe_naturality model D s f + +/-- Covariant naturality is the actual strict postcomposition map. -/ +theorem globeHomEquiv_postcomp {n : ℕ} {D E : StrictOmegaCategory.{0}} + (f : model.obj (Globe.category n) ⟶ D) (u : D ⟶ E) : + globeHomEquiv n E (f ≫ u) = globeHomEquiv n D f ≫ internalHomMap u := by + apply Globe.hom_ext + exact (GlobeMappingCells.map_ι model u n f).symm + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Natural representability on the actual finite parameters + +Cellwise currying is defined on every strict source category. It is a +bijection on free globes and on the actual binary pastings. These natural +bijections are the parameter data for the global Kan-extension adjunction. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable {B C D E : StrictOmegaCategory.{0}} + +/-- A concrete chain-model map gives a strict map into the actual internal hom. -/ +def modelCurry (u : model.obj C ⟶ D) : C ⟶ internalHomObj D where + toFun := cellCurry u + map_face := cellCurry_face u + map_comp := cellCurry_comp u + +theorem modelCurry_precomp (s : B ⟶ C) (u : model.obj C ⟶ D) : + modelCurry (model.map s ≫ u) = s ≫ modelCurry u := by + apply Hom.ext + funext x + exact cellCurry_precomp s u x + +theorem modelCurry_postcomp (u : model.obj C ⟶ D) (v : D ⟶ E) : + modelCurry (u ≫ v) = modelCurry u ≫ internalHomMap v := by + apply Hom.ext + funext x + exact cellCurry_postcomp u v x + +theorem modelCurry_globe_eq {n : ℕ} (u : model.obj (Globe.category n) ⟶ D) : + modelCurry u = globeHomEquiv n D u := by + apply Globe.hom_ext + have he := cellCurry_globe u (𝟙 (Globe.category n)) + change cellCurry u Globe.Cell.top = + GlobeMappingCells.ι model D n (model.map (𝟙 (Globe.category n)) ≫ u) at he + change cellCurry u Globe.Cell.top = GlobeMappingCells.ι model D n u + simpa only [model.map_id, Category.id_comp] using he + +theorem modelCurry_restrict {n : ℕ} (s : Globe.category n ⟶ C) (u : model.obj C ⟶ D) : + s ≫ modelCurry u = globeHomEquiv n D (model.map s ≫ u) := + (modelCurry_precomp s u).symm.trans (modelCurry_globe_eq _) + +theorem modelCurry_globe_bijective (n : ℕ) (D : StrictOmegaCategory.{0}) : + Function.Bijective (modelCurry (C := Globe.category n) (D := D)) := by + constructor + · intro u v huv + apply (globeHomEquiv n D).injective + rw [← modelCurry_globe_eq, ← modelCurry_globe_eq] + exact huv + · intro q + refine ⟨(globeHomEquiv n D).symm q, ?_⟩ + rw [modelCurry_globe_eq, Equiv.apply_symm_apply] + +/-- Binary gluing upgrades the globe bijection to each composition parameter. -/ +theorem modelCurry_pasting_bijective {n k : ℕ} (hk : k < n) (D : StrictOmegaCategory.{0}) : + Function.Bijective (modelCurry (C := PastingGlobe.category n n k) (D := D)) := by + constructor + · intro u v huv + apply (PastingGlobe.CylinderSource.isPushout hk).hom_ext + · apply (globeHomEquiv n D).injective + exact (modelCurry_restrict (PastingGlobe.left n n k) u).symm.trans + ((congrArg (fun q => PastingGlobe.left n n k ≫ q) huv).trans + (modelCurry_restrict (PastingGlobe.left n n k) v)) + · apply (globeHomEquiv n D).injective + exact (modelCurry_restrict (PastingGlobe.right n n k) u).symm.trans + ((congrArg (fun q => PastingGlobe.right n n k ≫ q) huv).trans + (modelCurry_restrict (PastingGlobe.right n n k) v)) + · intro q + let f := (globeHomEquiv n D).symm (PastingGlobe.left n n k ≫ q) + let g := (globeHomEquiv n D).symm (PastingGlobe.right n n k ≫ q) + have hf : globeHomEquiv n D f = PastingGlobe.left n n k ≫ q := + (globeHomEquiv n D).apply_symm_apply _ + have hg : globeHomEquiv n D g = PastingGlobe.right n n k ≫ q := + (globeHomEquiv n D).apply_symm_apply _ + have hm : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g := by + apply (globeHomEquiv k D).injective + calc + _ = Globe.faceMap true k n ≫ (PastingGlobe.left n n k ≫ q) := + (globeHomEquiv_precomp D _ f).trans + (congrArg (fun r => Globe.faceMap true k n ≫ r) hf) + _ = Globe.faceMap false k n ≫ (PastingGlobe.right n n k ≫ q) := by + rw [← Category.assoc, ← Category.assoc, pushout.condition] + _ = _ := ((globeHomEquiv_precomp D _ g).trans + (congrArg (fun r => Globe.faceMap false k n ≫ r) hg)).symm + refine ⟨glue hk f g hm, ?_⟩ + apply pushout.hom_ext + · exact (modelCurry_restrict (PastingGlobe.left n n k) (glue hk f g hm)).trans + ((congrArg (globeHomEquiv n D) (glue_left hk f g hm)).trans hf) + · exact (modelCurry_restrict (PastingGlobe.right n n k) (glue hk f g hm)).trans + ((congrArg (globeHomEquiv n D) (glue_right hk f g hm)).trans hg) + +/-- The natural Hom bijection on every globe-and-pasting parameter. -/ +def parameterCurryEquiv (i : GlobePasting.Shape) (D : StrictOmegaCategory.{0}) : + (model.obj (GlobePasting.object i) ⟶ D) ≃ + (GlobePasting.object i ⟶ internalHomObj D) := + Equiv.ofBijective modelCurry (by + cases i with + | globe n => exact modelCurry_globe_bijective n D + | pair n k hk => exact modelCurry_pasting_bijective hk D) + +theorem parameterCurry_precomp {i j : GlobePasting.Shape} + (s : GlobePasting.object i ⟶ GlobePasting.object j) + (u : model.obj (GlobePasting.object j) ⟶ D) : + parameterCurryEquiv i D (model.map s ≫ u) = s ≫ parameterCurryEquiv j D u := + modelCurry_precomp s u + +theorem parameterCurry_postcomp (i : GlobePasting.Shape) + (u : model.obj (GlobePasting.object i) ⟶ D) (v : D ⟶ E) : + parameterCurryEquiv i E (u ≫ v) = parameterCurryEquiv i D u ≫ internalHomMap v := + modelCurry_postcomp u v + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The actual right interval adjunction + +The natural Hom bijections on the globe-and-pasting parameters extend +through the two proved colimit presentations. No global preservation by +chain realization is assumed. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable (C D : StrictOmegaCategory.{0}) + +def curryCocone (u : GrayChainExtension.cylinder.obj C ⟶ D) : Cocone (GlobePasting.diagram C) where + pt := internalHomObj D + ι := { + app j := parameterCurryEquiv j.left D ((GrayChainExtension.presentationCocone C).ι.app j ≫ u) + naturality i j f := by + let s : GlobePasting.object i.left ⟶ GlobePasting.object j.left := f.left + let li : model.obj (GlobePasting.object i.left) ⟶ GrayChainExtension.cylinder.obj C := + (GrayChainExtension.presentationCocone C).ι.app i + let lj : model.obj (GlobePasting.object j.left) ⟶ GrayChainExtension.cylinder.obj C := + (GrayChainExtension.presentationCocone C).ι.app j + have hw : model.map s ≫ lj = li := + (GrayChainExtension.presentationCocone C).w f + change s ≫ parameterCurryEquiv j.left D (lj ≫ u) = + parameterCurryEquiv i.left D (li ≫ u) ≫ 𝟙 _ + exact (parameterCurry_precomp s (lj ≫ u)).symm.trans + ((congrArg (parameterCurryEquiv i.left D) + ((Category.assoc (model.map s) lj u).symm.trans + (congrArg (fun q => q ≫ u) hw))).trans (Category.comp_id _).symm) } + +def curryHom (u : GrayChainExtension.cylinder.obj C ⟶ D) : C ⟶ internalHomObj D := + (GlobePasting.isColimit C).desc (curryCocone C D u) + +theorem curryHom_fac (u : GrayChainExtension.cylinder.obj C ⟶ D) + (j : CostructuredArrow GlobePasting.inclusion C) : + j.hom ≫ curryHom C D u = + parameterCurryEquiv j.left D ((GrayChainExtension.presentationCocone C).ι.app j ≫ u) := + (GlobePasting.isColimit C).fac (curryCocone C D u) j + +def uncurryCocone (g : C ⟶ internalHomObj D) : Cocone (GrayChainExtension.presentationDiagram C) where + pt := D + ι := { + app j := (parameterCurryEquiv j.left D).symm (j.hom ≫ g) + naturality i j f := by + let s : GlobePasting.object i.left ⟶ GlobePasting.object j.left := f.left + let fi : GlobePasting.object i.left ⟶ C := i.hom + let fj : GlobePasting.object j.left ⟶ C := j.hom + have hw : s ≫ fj = fi := CostructuredArrow.w f + change model.map s ≫ (parameterCurryEquiv j.left D).symm (fj ≫ g) = + (parameterCurryEquiv i.left D).symm (fi ≫ g) ≫ 𝟙 _ + rw [Category.comp_id] + apply (parameterCurryEquiv i.left D).injective + exact (parameterCurry_precomp s _).trans + ((congrArg (fun q => s ≫ q) ((parameterCurryEquiv j.left D).apply_symm_apply _)).trans + (((Category.assoc s fj g).symm.trans (congrArg (fun q => q ≫ g) hw)).trans + ((parameterCurryEquiv i.left D).apply_symm_apply _).symm)) } + +def uncurryHom (g : C ⟶ internalHomObj D) : GrayChainExtension.cylinder.obj C ⟶ D := + (GrayChainExtension.presentationIsColimit C).desc (uncurryCocone C D g) + +theorem uncurryHom_fac (g : C ⟶ internalHomObj D) + (j : CostructuredArrow GlobePasting.inclusion C) : + (GrayChainExtension.presentationCocone C).ι.app j ≫ uncurryHom C D g = + (parameterCurryEquiv j.left D).symm (j.hom ≫ g) := + (GrayChainExtension.presentationIsColimit C).fac (uncurryCocone C D g) j + +theorem uncurry_curry (u : GrayChainExtension.cylinder.obj C ⟶ D) : + uncurryHom C D (curryHom C D u) = u := by + apply (GrayChainExtension.presentationIsColimit C).hom_ext + intro j + exact (uncurryHom_fac C D (curryHom C D u) j).trans + ((congrArg (parameterCurryEquiv j.left D).symm (curryHom_fac C D u j)).trans + ((parameterCurryEquiv j.left D).symm_apply_apply _)) + +theorem curry_uncurry (g : C ⟶ internalHomObj D) : + curryHom C D (uncurryHom C D g) = g := by + apply (GlobePasting.isColimit C).hom_ext + intro j + change j.hom ≫ curryHom C D (uncurryHom C D g) = j.hom ≫ g + exact (curryHom_fac C D (uncurryHom C D g) j).trans + ((congrArg (parameterCurryEquiv j.left D) (uncurryHom_fac C D g j)).trans + ((parameterCurryEquiv j.left D).apply_symm_apply _)) + +/-- The literal Hom bijection for the extended cylinder. -/ +def homEquiv : (GrayChainExtension.cylinder.obj C ⟶ D) ≃ (C ⟶ internalHomObj D) where + toFun := curryHom C D + invFun := uncurryHom C D + left_inv := uncurry_curry C D + right_inv := curry_uncurry C D + +variable {C D} {B E : StrictOmegaCategory.{0}} + +theorem curryHom_postcomp (u : GrayChainExtension.cylinder.obj C ⟶ D) (v : D ⟶ E) : + curryHom C E (u ≫ v) = curryHom C D u ≫ internalHomMap v := by + apply (GlobePasting.isColimit C).hom_ext + intro j + change j.hom ≫ curryHom C E (u ≫ v) = j.hom ≫ (curryHom C D u ≫ internalHomMap v) + let l : model.obj (GlobePasting.object j.left) ⟶ GrayChainExtension.cylinder.obj C := + (GrayChainExtension.presentationCocone C).ι.app j + let fj : GlobePasting.object j.left ⟶ C := j.hom + exact (curryHom_fac C E (u ≫ v) j).trans + ((congrArg (parameterCurryEquiv j.left E) (Category.assoc l u v).symm).trans + ((parameterCurry_postcomp j.left (l ≫ u) v).trans + ((congrArg (fun q : GlobePasting.object j.left ⟶ internalHomObj D => q ≫ internalHomMap v) + (curryHom_fac C D u j).symm).trans (Category.assoc fj _ _)))) + +theorem uncurryHom_precomp (f : B ⟶ C) (g : C ⟶ internalHomObj D) : + GrayChainExtension.cylinder.map f ≫ uncurryHom C D g = uncurryHom B D (f ≫ g) := by + apply (GrayChainExtension.presentationIsColimit B).hom_ext + intro j + let j' : CostructuredArrow GlobePasting.inclusion C := + CostructuredArrow.mk (Y := j.left) (j.hom ≫ f) + let lB : model.obj (GlobePasting.object j.left) ⟶ GrayChainExtension.cylinder.obj B := + (GrayChainExtension.presentationCocone B).ι.app j + let lC : model.obj (GlobePasting.object j.left) ⟶ GrayChainExtension.cylinder.obj C := + (GrayChainExtension.presentationCocone C).ι.app j' + let fj : GlobePasting.object j.left ⟶ B := j.hom + have hl : lB ≫ GrayChainExtension.cylinder.map f = lC := + GrayChainExtension.presentation_leg_map f j + exact (Category.assoc lB (GrayChainExtension.cylinder.map f) (uncurryHom C D g)).symm.trans + ((congrArg (fun q => q ≫ uncurryHom C D g) hl).trans + ((uncurryHom_fac C D g j').trans + ((congrArg (parameterCurryEquiv j.left D).symm (Category.assoc fj f g)).trans + (uncurryHom_fac B D (f ≫ g) j).symm))) + +/-- The actual global right interval internal-hom adjunction. -/ +def adjunction : GrayChainExtension.cylinder ⊣ internalHom := + Adjunction.mkOfHomEquiv { + homEquiv := homEquiv + homEquiv_naturality_left_symm := fun f g => (uncurryHom_precomp f g).symm + homEquiv_naturality_right := fun u v => curryHom_postcomp u v } + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The right Gray interval and its ordered simplex comparison + +The global adjunction and the ordered simplex-cylinder comparison have +compatible endpoints and collapse maps. Restriction of this cylinder to +free globes proves preservation of finite truncations by its right adjoint. +-/ + +namespace Thomason.Construction.NormalizedSimplexIdentities + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex StrictOmegaCategory + +noncomputable section + +variable (h : NormalizedSimplexIdentities) + +def extendedSimplexModelIso (m : SimplexCategory) : + GrayChainExtension.cylinder.obj (h.object m.len) ≅ + GrayChainExtension.model.obj (h.object m.len) := + GrayChainExtension.simplexCylinderIso h m.len ≪≫ h.constructedChainModelComparison.app m + +/-- The ordered-cell isomorphism is the canonical global comparison. -/ +theorem extendedSimplexModelIso_hom (m : SimplexCategory) : + (h.extendedSimplexModelIso m).hom = GrayChainExtension.comparison.app (h.object m.len) := by + let a := simplexAtoms h + let e := a.abelianizationIso m.len + let T := rightCylinderFunctor ⋙ realizationFunctor + let c := GrayChainExtension.comparison.app (h.object m.len) + have he : T.map e.hom ≫ T.map e.inv = 𝟙 _ := + (T.map_comp e.hom e.inv).symm.trans + ((congrArg T.map e.hom_inv_id).trans (T.map_id _)) + change (c ≫ T.map e.hom) ≫ T.map e.inv = c + exact (Category.assoc c _ _).trans + ((congrArg (fun q => c ≫ q) he).trans (Category.comp_id c)) + +/-- Naturality is inherited from the actual global comparison. -/ +def extendedSimplexModelNatIso : + h.cosimplicial ⋙ GrayChainExtension.cylinder ≅ + h.cosimplicial ⋙ GrayChainExtension.model := + NatIso.ofComponents (h.extendedSimplexModelIso) (by + intro m n f + change GrayChainExtension.cylinder.map (h.cosimplicial.map f) ≫ + (h.extendedSimplexModelIso n).hom = + (h.extendedSimplexModelIso m).hom ≫ GrayChainExtension.model.map (h.cosimplicial.map f) + rw [h.extendedSimplexModelIso_hom, h.extendedSimplexModelIso_hom] + exact GrayChainExtension.comparison.naturality (h.cosimplicial.map f)) + +/-- The explicit right chain simplex cylinder identifies with the global +extended interval tensor, naturally in every simplex operator. -/ +def constructedRightSimplexComparison : + h.cylinderCosimplicial ≅ h.cosimplicial ⋙ GrayChainExtension.cylinder := + h.constructedChainModelComparison ≪≫ h.extendedSimplexModelNatIso.symm + +theorem constructedRightSimplexComparison_comp (m : SimplexCategory) : + h.constructedRightSimplexComparison.hom.app m ≫ + GrayChainExtension.comparison.app (h.object m.len) = + h.constructedChainModelComparison.hom.app m := by + rw [← h.extendedSimplexModelIso_hom m] + let f : h.cylinderObject m.len ⟶ GrayChainExtension.model.obj (h.object m.len) := + h.constructedChainModelComparison.hom.app m + let e := h.extendedSimplexModelIso m + change (f ≫ e.inv) ≫ e.hom = f + exact (Category.assoc f e.inv e.hom).trans + ((congrArg (fun q => f ≫ q) e.inv_hom_id).trans (Category.comp_id f)) + +theorem constructedRightSimplexComparison_endpoint (side : Bool) (m : SimplexCategory) : + (h.cylinderEndpoint side).app m ≫ h.constructedRightSimplexComparison.hom.app m = + (GrayChainExtension.endpoint side).app (h.object m.len) := by + apply (cancel_mono (h.extendedSimplexModelIso m).hom).mp + rw [h.extendedSimplexModelIso_hom] + exact (Category.assoc _ _ _).trans + ((congrArg (fun q => (h.cylinderEndpoint side).app m ≫ q) + (h.constructedRightSimplexComparison_comp m)).trans + ((h.constructedChainModelComparison_endpoint side m).trans + (congrArg (fun q => q.app (h.object m.len)) + (GrayChainExtension.endpoint_comparison side)).symm)) + +theorem constructedRightSimplexComparison_projection (m : SimplexCategory) : + h.constructedRightSimplexComparison.hom.app m ≫ + GrayChainExtension.projection.app (h.object m.len) = h.cylinderProjection.app m := + h.extendedComparison_projection m _ (h.constructedRightSimplexComparison_comp m) + +/-- The right interval adjunction with its natural ordered simplex comparison. -/ +def constructedRightGrayInput : RightGrayInput h where + cylinder := GrayChainExtension.cylinder + internalHom := GrayMapping.internalHom + adjunction := GrayMapping.adjunction + endpoint := GrayChainExtension.endpoint + projection := GrayChainExtension.projection + endpoint_projection := GrayChainExtension.endpoint_projection + simplexComparison := h.constructedRightSimplexComparison + endpoint_comparison := h.constructedRightSimplexComparison_endpoint + projection_comparison := h.constructedRightSimplexComparison_projection + +/-- The same constructed internal hom preserves each finite truncation. -/ +theorem constructedRightGrayTruncation : GrayTruncationInput h.constructedRightGrayInput := + GrayChainExtension.truncationInput h.constructedRightGrayInput (Iso.refl _) + +end +end Thomason.Construction.NormalizedSimplexIdentities + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/CylinderAssembly.lean b/lean/OAI/CategoryTheory/Thomason/Gray/CylinderAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3336fd6da71acc69ee7f72bafba35755216f773 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/CylinderAssembly.lean @@ -0,0 +1,950 @@ +import OAI.CategoryTheory.Thomason.Chains.NormalizedTuples +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Strict.StrictTerminalConeCategory +import OAI.CategoryTheory.Thomason.Strict.UnderlyingCategory +import Mathlib.CategoryTheory.Adjunction.Limits +import Mathlib.Order.UpperLower.Basic + +namespace OAI + +section + +/-! +# Composition generation by normalized simplex atoms + +Steiner, *Omega-categories and chain complexes* (2004), Definition 3.2, +Example 3.8 and Theorem 5.6 (arXiv:math/0403237v2), identify these exact +normalized-chain atoms and prove composition generation. The principal atoms in this specialization are fixed by their entire +chain tables. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace SimplexComplex + +/-- The positive or negative part of an integral chain, coefficient by coefficient. -/ +noncomputable def signedPart {m p : ℕ} (a : Bool) (x : Chains m p) : Chains m p := + x.mapRange (fun z => max 0 (if a then z else -z)) (by cases a <;> simp) + +/-- The distinguished top-dimensional simplex basis element. -/ +def topBasis (m : ℕ) : Basis m m := OrderEmbedding.ofStrictMono id strictMono_id + +/-- Steiner's downward-recursive formula specifies every entry of an atom. -/ +def IsBasisAtom (h : NormalizedSimplexIdentities) {m p : ℕ} + (b : Basis m p) (x : h.object m) : Prop := + (∀ a, x.table a p = Finsupp.single b 1) ∧ + (∀ a n, n < p → x.table a n = signedPart a (differential m n (x.table a (n + 1)))) ∧ + (∀ a n, p < n → x.table a n = 0) + +/-- The full table formula characterizes an atom uniquely. -/ +theorem IsBasisAtom.unique (h : NormalizedSimplexIdentities) {m p : ℕ} + {b : Basis m p} {x y : h.object m} (hx : IsBasisAtom h b x) (hy : IsBasisAtom h b y) : x = y := by + apply DirectedComplex.Cell.ext + funext a n + by_cases hpn : p < n + · exact (hx.2.2 a n hpn).trans (hy.2.2 a n hpn).symm + · have he : ∀ k, x.table a (p - k) = y.table a (p - k) := by + intro k + induction k with + | zero => simpa using (hx.1 a).trans (hy.1 a).symm + | succ k ih => + by_cases hk : k < p + · have hn : p - (k + 1) < p := by omega + rw [hx.2.1 a _ hn, hy.2.1 a _ hn] + have he : p - (k + 1) + 1 = p - k := by omega + have ht : x.table a (p - (k + 1) + 1) = y.table a (p - (k + 1) + 1) := + he.symm ▸ ih + exact congrArg (fun z => signedPart a (differential m (p - (k + 1)) z)) ht + · have hz : p - (k + 1) = p - k := by omega + exact hz.symm ▸ ih + have hz : p - (p - n) = n := by omega + exact hz ▸ he (p - n) + +end SimplexComplex + +/-- Precisely the published atom facts used in the full-face argument. -/ +structure SimplexAtomsInput (h : NormalizedSimplexIdentities) where + principal (m : ℕ) : h.object m + principal_table (m : ℕ) : SimplexComplex.IsBasisAtom h (SimplexComplex.topBasis m) (principal m) + principal_source (m : ℕ) : (h.object m).source 0 (principal m) = SimplexComplex.vertex h 0 + principal_target (m : ℕ) : (h.object m).target 0 (principal m) = + SimplexComplex.vertex h (Fin.last m) + generated (m : ℕ) (P : h.object m → Prop) + (atoms : ∀ p (b : SimplexComplex.Basis m p), P ((h.map b.toOrderHom).toFun (principal p))) + (compositions : ∀ n x y hxy, P x → P y → P ((h.object m).comp n x y hxy)) : + ∀ x, P x + +namespace SimplexAtomsInput + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +/-- The actual simplex atom indexed by an increasing tuple. -/ +noncomputable def atom {m p : ℕ} (b : SimplexComplex.Basis m p) : h.object m := + (h.map b.toOrderHom).toFun (a.principal p) + +theorem atom_source {m p : ℕ} (b : SimplexComplex.Basis m p) : + (h.object m).source 0 (a.atom b) = SimplexComplex.vertex h (b 0) := by + exact ((h.map b.toOrderHom).map_face false 0 (a.principal p)).symm.trans + ((congrArg (h.map b.toOrderHom).toFun (a.principal_source p)).trans + (SimplexComplex.map_vertex h b.toOrderHom 0)) + +theorem atom_target {m p : ℕ} (b : SimplexComplex.Basis m p) : + (h.object m).target 0 (a.atom b) = SimplexComplex.vertex h (b (Fin.last p)) := by + exact ((h.map b.toOrderHom).map_face true 0 (a.principal p)).symm.trans + ((congrArg (h.map b.toOrderHom).toFun (a.principal_target p)).trans + (SimplexComplex.map_vertex h b.toOrderHom (Fin.last p))) + +end SimplexAtomsInput +end Thomason.Construction + +end + +section + +/-! +# Strict labels determined by ordered object functions + +The nondecreasing endpoints of oriental cells yield their canonical strict +maps to ordinal categories, natural for all simplex operators. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace StrictOmegaCategory + +variable {C D : StrictOmegaCategory.{0}} + +/-- Taking an object boundary commutes with every strict functor. -/ +theorem Hom.object_boundary (f : C ⟶ D) (a : Bool) (x : C) : + f.toOneFunctor.obj (C.boundaryObject a x) = D.boundaryObject a (f.toFun x) := + Subtype.ext (f.map_face a 0 x) + +/-- An ordered object function extends uniquely to a strict poset label. -/ +def orderedLabel {E : Type} [Preorder E] (f : Objects C → E) + (hf : ∀ x : C, f (C.boundaryObject false x) ≤ f (C.boundaryObject true x)) : + C ⟶ StrictPoset.category E where + toFun x := ⟨f (C.boundaryObject false x), f (C.boundaryObject true x), hf x⟩ + map_face a n x := by + cases n with + | zero => + cases a <;> apply StrictPoset.Cell.ext + all_goals + change f _ = f _ + congr 1 + apply Subtype.ext + exact C.face_face_same _ _ 0 x + | succ n => + apply StrictPoset.Cell.ext + all_goals + change f _ = f _ + congr 1 + apply Subtype.ext + exact (C.globular _ _ 0 (n + 1) x).trans (ite_eq_left (Nat.zero_lt_succ n)) + map_comp n x y hxy h' := by + cases n with + | zero => + apply StrictPoset.Cell.ext + · change f _ = f _ + exact congrArg f (Subtype.ext (C.source_comp 0 x y hxy)) + · change f _ = f _ + exact congrArg f (Subtype.ext (C.target_comp 0 x y hxy)) + | succ n => + apply StrictPoset.Cell.ext + all_goals + change f _ = f _ + congr 1 + apply Subtype.ext + exact C.zero_face_comp_succ _ n x y hxy + +@[simp] +theorem orderedLabel_object {E : Type} [Preorder E] (f : Objects C → E) + (hf : ∀ x : C, f (C.boundaryObject false x) ≤ f (C.boundaryObject true x)) + (x : Objects C) : + (orderedLabel f hf).toFun x.val = StrictPoset.identity (f x) := by + apply StrictPoset.Cell.ext + · exact congrArg f (C.boundaryObject_of_object false x) + · exact congrArg f (C.boundaryObject_of_object true x) + +/-- A strict poset label is determined by its action on object cells. -/ +theorem hom_poset_ext {E : Type} [Preorder E] {f g : C ⟶ StrictPoset.category E} + (he : ∀ x : Objects C, f.toFun x.val = g.toFun x.val) : f = g := by + apply Hom.ext + funext x + apply StrictPoset.Cell.ext + · have hs := he (C.boundaryObject false x) + have hf := f.map_face false 0 x + have hg := g.map_face false 0 x + have he := congrArg (fun z : StrictPoset.Cell E => z.first) (hf.symm.trans (hs.trans hg)) + exact he + · have ht := he (C.boundaryObject true x) + have hf := f.map_face true 0 x + have hg := g.map_face true 0 x + have he := congrArg (fun z : StrictPoset.Cell E => z.last) (hf.symm.trans (ht.trans hg)) + exact he + +end StrictOmegaCategory + +namespace NormalizedSimplexIdentities + +variable (h : NormalizedSimplexIdentities) + +/-- The canonical strict map from an oriental to its ordered vertices. -/ +noncomputable def ordinalLabel (m : ℕ) : h.object m ⟶ StrictPoset.category (Fin (m + 1)) := + StrictOmegaCategory.orderedLabel (SimplexComplex.objectsEquiv h m) + (SimplexComplex.endpoints_ordered h) + +@[simp] +theorem ordinalLabel_vertex {m : ℕ} (i : Fin (m + 1)) : + (h.ordinalLabel m).toFun (SimplexComplex.vertex h i) = StrictPoset.identity i := by + have he := StrictOmegaCategory.orderedLabel_object (SimplexComplex.objectsEquiv h m) + (SimplexComplex.endpoints_ordered h) + ((SimplexComplex.objectsEquiv h m).symm i) + exact he.trans (congrArg StrictPoset.identity ((SimplexComplex.objectsEquiv h m).apply_symm_apply i)) + +/-- Ordinal labelling commutes with every simplex operator, including degeneracies. -/ +theorem ordinalLabel_naturality {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) : + h.map f ≫ h.ordinalLabel n = h.ordinalLabel m ≫ StrictPoset.map f := by + apply StrictOmegaCategory.hom_poset_ext + intro x + obtain ⟨i, hi⟩ := SimplexComplex.eq_vertex_of_dimensionLE h x.val x.property + change (h.ordinalLabel n).toFun ((h.map f).toFun x.val) = + (StrictPoset.map f).toFun ((h.ordinalLabel m).toFun x.val) + rw [hi, SimplexComplex.map_vertex, ordinalLabel_vertex, ordinalLabel_vertex] + rfl + +end NormalizedSimplexIdentities +end Thomason.Construction + +end + +section + +/-! +# Positive relative-prism chains + +The prism formula uses the right tensor factor convention. Its exceptional +last-face cancellation follows from the sieve and constancy assumptions. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +noncomputable def rise {m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) : Chains n (m + 1) := + tuple (append f (g (Fin.last m)) (hfg _)) + +/-- The image of a prism generator is the normalized tuple with the final +upper endpoint appended. -/ +noncomputable def prismBasis {m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (p : ℕ) (s : Basis m p) : Chains n (p + 1) := + rise (f.comp s.toOrderHom) (g.comp s.toOrderHom) (fun i => hfg (s i)) + +noncomputable def prism {m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (p : ℕ) : Chains m p →ₗ[ℤ] Chains n (p + 1) := + Finsupp.linearCombination ℤ (prismBasis f g hfg p) + +@[simp] +theorem prism_single {m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (p : ℕ) (s : Basis m p) (z : ℤ) : + prism f g hfg p (Finsupp.single s z) = z • prismBasis f g hfg p s := by + simp [prism] + +theorem prismBasis_nonneg {m n p : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (s : Basis m p) (t : Basis n (p + 1)) : + 0 ≤ prismBasis f g hfg p s t := tuple_nonneg _ _ + +/-- The new prism operator preserves the specified positive cones. -/ +theorem prism_positive {m n p : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) {x : Chains m p} (hx : x ∈ positive m p) : + prism f g hfg p x ∈ positive n (p + 1) := by + classical + intro t + simp only [prism, Finsupp.linearCombination_apply, Finsupp.sum, + Finsupp.finsetSum_apply, Finsupp.smul_apply, smul_eq_mul] + exact Finset.sum_nonneg fun s _ => mul_nonneg (hx s) (prismBasis_nonneg f g hfg s t) + +/-- On any simplex whose final vertex is fixed, the whole prism generator +vanishes by normalization. -/ +theorem prismBasis_stationary {m n p : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (s : Basis m p) (he : f (s (Fin.last p)) = g (s (Fin.last p))) : + prismBasis f g hfg p s = 0 := tuple_append_eq_zero _ _ _ he + +/-- Sieve membership of the penultimate vertex gives an entirely old initial +segment; otherwise both final vertices lie in the constant new part. -/ +theorem old_initial_or_constant_tail {E : Type*} [Preorder E] {A : Set E} + (hA : IsLowerSet A) {n p : ℕ} (f g : E →o Fin (n + 1)) + (hagree : ∀ x ∈ A, f x = g x) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (s : Fin (p + 2) →o E) : + (∀ i : Fin (p + 1), f (s i.castSucc) = g (s i.castSucc)) ∨ + g (s (Fin.last (p + 1))) = g (s (Fin.last p).castSucc) := by + by_cases ha : s (Fin.last p).castSucc ∈ A + · left + intro i + apply hagree + exact hA (s.monotone (Fin.castSucc_le_castSucc_iff.mpr i.le_last)) ha + · right + apply hconstant + · intro hx + exact ha (hA (s.monotone (Fin.le_last _)) hx) + · exact ha + +/-- The exceptional-face identity needed in the differential of the prism, +now derived from exactly the order/sieve hypotheses of the manuscript. -/ +theorem relative_prism_last_face_cancel {E : Type*} [Preorder E] {A : Set E} + (hA : IsLowerSet A) {n p : ℕ} (f g : E →o Fin (n + 1)) + (hfg : ∀ x, f x ≤ g x) (hagree : ∀ x ∈ A, f x = g x) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (s : Fin (p + 2) →o E) : + tuple (append (initial (f.comp s)) (g (s (Fin.last (p + 1)))) + ((hfg _).trans (g.monotone (s.monotone (Fin.le_last _))))) - + tuple (append (initial (f.comp s)) (g (s (Fin.last p).castSucc)) (hfg _)) = + tuple (g.comp s) := + prism_last_face_cancel (f.comp s) (g.comp s) (fun i => hfg (s i)) + (old_initial_or_constant_tail hA f g hagree hconstant s) + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # The signed boundary calculation for the positive relative prism -/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +@[simp] +theorem deleteTuple_last {n p : ℕ} (f : Fin (p + 2) →o Fin (n + 1)) : + deleteTuple f (Fin.last (p + 1)) = initial f := by + apply DFunLike.ext + intro i + change f ((Fin.last (p + 1)).succAbove i) = f i.castSucc + rw [Fin.succAbove_last] + +theorem rise_delete_castSucc {n p : ℕ} (f g : Fin (p + 2) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (i : Fin (p + 1)) : + rise (deleteTuple f i.castSucc) (deleteTuple g i.castSucc) + (fun j => hfg (i.castSucc.succAbove j)) = + tuple (append (deleteTuple f i.castSucc) (g (Fin.last (p + 1))) + ((f.monotone (Fin.le_last _)).trans (hfg _))) := by + unfold rise + congr 1 + apply DFunLike.ext + intro j + induction j using Fin.lastCases with + | cast j => exact (append_castSucc _ _ _ j).trans (append_castSucc _ _ _ j).symm + | last => + have he : (deleteTuple g i.castSucc) (Fin.last p) = g (Fin.last (p + 1)) := by + change g (i.castSucc.succAbove (Fin.last p)) = g (Fin.last (p + 1)) + rw [Fin.succAbove_ne_last_last (Fin.castSucc_ne_last i)] + exact (append_last _ _ _).trans (he.trans (append_last _ _ _).symm) + +/-- The prism's boundary identity on weakly increasing tuples, with exactly +its old-initial-segment/constant-final-segment hypothesis. -/ +theorem rise_boundary (h : NormalizedSimplexIdentities) {n p : ℕ} + (f g : Fin (p + 2) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hcases : (∀ i : Fin (p + 1), f i.castSucc = g i.castSucc) ∨ + g (Fin.last (p + 1)) = g (Fin.last p).castSucc) : + differential n (p + 1) (rise f g hfg) = + (∑ i : Fin (p + 2), ((-1 : ℤ) ^ (i : ℕ)) • + rise (deleteTuple f i) (deleteTuple g i) (fun j => hfg (i.succAbove j))) + + ((-1 : ℤ) ^ (p + 1)) • (tuple g - tuple f) := by + rw [rise, differential_tuple h] + conv_lhs => rw [Fin.sum_univ_castSucc] + simp only [Fin.val_castSucc, Fin.val_last, delete_append_last, delete_append_castSucc] + conv_lhs => rw [Fin.sum_univ_castSucc] + conv_rhs => rw [Fin.sum_univ_castSucc] + simp only [Fin.val_castSucc, Fin.val_last, rise_delete_castSucc, deleteTuple_last] + have hc := prism_last_face_cancel f g hfg hcases + rw [← hc] + simp only [rise, initial_apply, pow_succ, mul_neg_one, neg_smul, smul_sub] + abel + +theorem prism_differentialBasis {m n p : ℕ} + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (s : Basis m (p + 1)) : + prism f g hfg p (differentialBasis m p s) = + ∑ i : Fin (p + 2), ((-1 : ℤ) ^ (i : ℕ)) • + prismBasis f g hfg p (deleteVertex s i) := by + simp only [differentialBasis, map_sum, prism_single] + +/-- The signed differential formula for each basis prism, derived from the +actual sieve hypotheses rather than assumed as a cylinder input. -/ +theorem prismBasis_boundary (h : NormalizedSimplexIdentities) {m n p : ℕ} + {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ x ∈ A, f x = g x) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) (s : Basis m (p + 1)) : + differential n (p + 1) (prismBasis f g hfg (p + 1) s) = + prism f g hfg p (differentialBasis m p s) + + ((-1 : ℤ) ^ (p + 1)) • (mapBasis g (p + 1) s - mapBasis f (p + 1) s) := by + have hb := rise_boundary h (f.comp s.toOrderHom) (g.comp s.toOrderHom) + (fun i => hfg (s i)) (old_initial_or_constant_tail hA f g hagree hconstant s.toOrderHom) + have hd (q : Fin (m + 1) →o Fin (n + 1)) (i : Fin (p + 2)) : + deleteTuple (q.comp s.toOrderHom) i = q.comp (deleteVertex s i).toOrderHom := by + apply DFunLike.ext + intro j + rfl + simp only [hd] at hb + simpa only [prismBasis, prism_differentialBasis, mapBasis_eq_tuple] using hb + +theorem rise_boundary_zero (h : NormalizedSimplexIdentities) {n : ℕ} + (f g : Fin 1 →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) : + differential n 0 (rise f g hfg) = tuple g - tuple f := by + let a := append f (g (Fin.last 0)) (hfg _) + have hzero : deleteTuple a 0 = g := by + apply DFunLike.ext + intro i + fin_cases i + change a ((0 : Fin 2).succAbove 0) = g 0 + change a (Fin.last 1) = g 0 + exact append_last f (g (Fin.last 0)) (hfg _) + have hone : deleteTuple a 1 = f := delete_append_last f _ _ + change differential n 0 (tuple a) = _ + rw [differential_tuple h, Fin.sum_univ_two, hzero, hone] + simp [sub_eq_add_neg] + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Realizing the positive relative-prism chain map -/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +variable (h : NormalizedSimplexIdentities) +variable {m n : ℕ} {A : Set (Fin (m + 1))} (hA : IsLowerSet A) +variable (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) +variable (hagree : ∀ x ∈ A, f x = g x) +variable (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + +include h hA hagree hconstant in +/-- Extend the basis boundary identity by linearity in every positive degree. -/ +theorem prism_boundary (p : ℕ) (x : Chains m (p + 1)) : + differential n (p + 1) (prism f g hfg (p + 1) x) = + prism f g hfg p (differential m p x) + + ((-1 : ℤ) ^ (p + 1)) • (mapChains g (p + 1) x - mapChains f (p + 1) x) := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => + simp only [map_add, hx, hy, smul_sub, smul_add] + abel + | single s z => + simp only [prism_single, differential_single, map_smul, mapChains_single] + rw [prismBasis_boundary h hA f g hfg hagree hconstant s] + simp only [smul_add, smul_sub, smul_comm z ((-1 : ℤ) ^ (p + 1))] + +include h in +/-- Degree zero of the same boundary identity. -/ +theorem prism_boundary_zero (x : Chains m 0) : + differential n 0 (prism f g hfg 0 x) = mapChains g 0 x - mapChains f 0 x := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => + simp only [map_add, hx, hy] + abel + | single s z => + simp only [prism_single, map_smul, mapChains_single, prismBasis] + have hz := rise_boundary_zero h (f.comp s.toOrderHom) (g.comp s.toOrderHom) + (fun i => hfg (s i)) + simpa only [mapBasis_eq_tuple, smul_sub] using congrArg (fun y => z • y) hz + +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- The generator formula on the actual right tensor chain groups. -/ +noncomputable def prismApp : (p : ℕ) → + (RightCylinder.group (directedComplex m (h.squared m)) p) →+ Chains n p + | 0 => + { toFun := fun x => mapChains f 0 x.1 + mapChains g 0 x.2 + map_zero' := by simp [directedComplex] + map_add' := by intros; simp [directedComplex]; abel } + | p + 1 => + { toFun := fun x => mapChains f (p + 1) x.1 + mapChains g (p + 1) x.2.1 + + prism f g hfg p x.2.2 + map_zero' := by simp [directedComplex] + map_add' := by intros; simp [directedComplex]; abel } + +/-- The positive relative prism is a genuine augmented directed chain map. -/ +noncomputable def prismChainMap (h : NormalizedSimplexIdentities) {m n : ℕ} + {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ x ∈ A, f x = g x) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) : Hom + (rightCylinder (directedComplex m (h.squared m))) (directedComplex n (h.squared n)) where + app := prismApp h f g hfg + differential p x := by + cases p with + | zero => + change mapChains f 0 (differential m 0 x.1 - x.2.2) + + mapChains g 0 (differential m 0 x.2.1 + x.2.2) = + differential n 0 (mapChains f 1 x.1 + mapChains g 1 x.2.1 + prism f g hfg 0 x.2.2) + simp only [map_add, map_sub] + rw [prism_boundary_zero h f g hfg, ← h.naturality f 0 x.1, + ← h.naturality g 0 x.2.1] + abel + | succ p => + change mapChains f (p + 1) + (differential m (p + 1) x.1 - ((-1 : ℤ) ^ (p + 1)) • x.2.2) + + mapChains g (p + 1) + (differential m (p + 1) x.2.1 + ((-1 : ℤ) ^ (p + 1)) • x.2.2) + + prism f g hfg p (differential m p x.2.2) = + differential n (p + 1) + (mapChains f (p + 2) x.1 + mapChains g (p + 2) x.2.1 + + prism f g hfg (p + 1) x.2.2) + simp only [map_add, map_sub, map_smul, prism_boundary h hA f g hfg hagree hconstant, + smul_sub] + rw [← h.naturality f (p + 1) x.1, ← h.naturality g (p + 1) x.2.1] + abel + augmentation x := by + change augmentation n (mapChains f 0 x.1 + mapChains g 0 x.2) = + augmentation m x.1 + augmentation m x.2 + simp only [map_add, augmentation_mapChains] + positive p x hx := by + cases p with + | zero => + exact (positive n 0).add_mem (mapChains_positive f hx.1) (mapChains_positive g hx.2) + | succ p => + exact (positive n (p + 1)).add_mem + ((positive n (p + 1)).add_mem (mapChains_positive f hx.1) (mapChains_positive g hx.2.1)) + (prism_positive f g hfg hx.2.2) + +/-- Strict realization of the explicitly constructed positive prism map. -/ +noncomputable def strictPrism : + StrictOmegaCategory.Hom + (rightCylinder (directedComplex m (h.squared m))).realization + (directedComplex n (h.squared n)).realization := + (prismChainMap h hA f g hfg hagree hconstant).realization + +include hA hagree hconstant in +theorem prismChainMap_endpoint (a : Bool) (p : ℕ) (x : Chains m p) : + (prismChainMap h hA f g hfg hagree hconstant).app p + ((RightCylinder.endpoint (directedComplex m (h.squared m)) a).app p x) = + mapChains (if a then g else f) p x := by + cases p <;> cases a <;> + simp [prismChainMap, prismApp, RightCylinder.endpoint, RightCylinder.endpointMap] + +include hA hagree hconstant in +/-- The realized prism has exactly the two prescribed strict endpoint functors. -/ +theorem strictPrism_endpoint (a : Bool) + (x : (directedComplex m (h.squared m)).realization) : + strictPrism h hA f g hfg hagree hconstant + ((RightCylinder.endpoint (directedComplex m (h.squared m)) a).realization x) = + (directedMap (h.squared m) (h.squared n) (if a then g else f) + (h.naturality _)).realization x := by + apply Cell.ext + funext b p + exact prismChainMap_endpoint h hA f g hfg hagree hconstant a p (x.table b p) + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Degeneracy compatibility and stationarity of positive prisms -/ + +namespace Thomason.Construction.SimplexComplex + +/-- A repeated lower image makes the entire normalized prism tuple zero. -/ +theorem rise_eq_zero_of_not_strictMono {m n : ℕ} + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hf : ¬StrictMono f) : rise f g hfg = 0 := by + have hn : ¬StrictMono (fun k => (append f (g (Fin.last m)) (hfg _)) (top (m + 1) k)) := by + intro hs + apply hf + intro i j hij + have hh := hs (Fin.castSucc_lt_castSucc_iff.mpr hij) + change append f (g (Fin.last m)) (hfg _) i.castSucc < + append f (g (Fin.last m)) (hfg _) j.castSucc at hh + simpa only [append_castSucc] using hh + simp only [rise, tuple, mapBasis, dite_eq_right hn] + +/-- The prism operator commutes with all simplex maps, including degeneracies. +This is an equality in every chain degree, not just on top-dimensional atoms. -/ +theorem prism_precomp {l m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (a : Fin (l + 1) →o Fin (m + 1)) (p : ℕ) + (x : Chains l p) : + prism f g hfg p (mapChains a p x) = + prism (f.comp a) (g.comp a) (fun i => hfg (a i)) p x := by + classical + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp only [map_add, hx, hy] + | single s z => + simp only [mapChains_single, map_smul] + rw [prism_single (f.comp a) (g.comp a) (fun i => hfg (a i)) p s z] + apply congrArg (fun y => z • y) + by_cases ha : StrictMono (fun i => a (s i)) + · let t : Basis m p := OrderEmbedding.ofStrictMono (fun i => a (s i)) ha + have hm : mapBasis a p s = Finsupp.single t 1 := dite_eq_left ha + rw [hm, prism_single, one_smul] + rfl + · have hm : mapBasis a p s = 0 := dite_eq_right ha + rw [hm, map_zero] + symm + apply rise_eq_zero_of_not_strictMono + intro hh + apply ha + intro i j hij + exact lt_of_not_ge fun hle => (not_le_of_gt (hh hij)) (f.monotone hle) + +/-- A pointwise fixed pair has a zero prism in every degree. -/ +theorem prism_eq_zero_of_eq {m n : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (he : ∀ i, f i = g i) (p : ℕ) (x : Chains m p) : + prism f g hfg p x = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => simp only [prism_single, prismBasis_stationary f g hfg s (he _), smul_zero] + +/-- Restricting to any simplex in the old part gives strict chain stationarity. -/ +theorem prism_stationary {l m n : ℕ} {A : Set (Fin (m + 1))} + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) (a : Fin (l + 1) →o Fin (m + 1)) + (ha : ∀ i, a i ∈ A) (p : ℕ) (x : Chains l p) : + prism f g hfg p (mapChains a p x) = 0 := by + rw [prism_precomp] + exact prism_eq_zero_of_eq _ _ _ (fun i => hagree (a i) (ha i)) p x + +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- Stationarity is an equality of the complete directed chain maps on the +old cylinder, including all lower-dimensional entries. -/ +theorem prismChainMap_stationary (h : NormalizedSimplexIdentities) {l m n : ℕ} + {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (a : Fin (l + 1) →o Fin (m + 1)) (ha : ∀ i, a i ∈ A) + (p : ℕ) (x : RightCylinder.group (directedComplex l (h.squared l)) p) : + (prismChainMap h hA f g hfg hagree hconstant).app p + ((RightCylinder.map (directedMap (h.squared l) (h.squared m) a (h.naturality a))).app p x) = + mapChains (f.comp a) p ((RightCylinder.projection (directedComplex l (h.squared l))).app p x) := by + have hga : g.comp a = f.comp a := DFunLike.ext _ _ (fun i => (hagree (a i) (ha i)).symm) + cases p with + | zero => + change mapChains f 0 (mapChains a 0 x.1) + mapChains g 0 (mapChains a 0 x.2) = + mapChains (f.comp a) 0 (x.1 + x.2) + rw [mapChains_comp, mapChains_comp, hga, map_add] + | succ p => + change mapChains f (p + 1) (mapChains a (p + 1) x.1) + + mapChains g (p + 1) (mapChains a (p + 1) x.2.1) + + prism f g hfg p (mapChains a p x.2.2) = mapChains (f.comp a) (p + 1) (x.1 + x.2.1) + rw [mapChains_comp, mapChains_comp, hga, prism_stationary f g hfg hagree a ha, add_zero, map_add] + +/-- The new relative prism is stationary as a strict functor after applying +Steiner realization; it is not merely zero on top chains. -/ +theorem strictPrism_stationary (h : NormalizedSimplexIdentities) {l m n : ℕ} + {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (a : Fin (l + 1) →o Fin (m + 1)) (ha : ∀ i, a i ∈ A) + (x : (rightCylinder (directedComplex l (h.squared l))).realization) : + strictPrism h hA f g hfg hagree hconstant + ((RightCylinder.map (directedMap (h.squared l) (h.squared m) a (h.naturality a))).realization x) = + (directedMap (h.squared l) (h.squared n) (f.comp a) (h.naturality _)).realization + ((RightCylinder.projection (directedComplex l (h.squared l))).realization x) := by + apply Cell.ext + funext b p + exact prismChainMap_stationary h hA f g hfg hagree hconstant a ha p (x.table b p) + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! +# The right Gray interval adjunction and comparison + +We first construct the cosimplicial strict right cylinders of the normalized +simplex complexes. `RightGrayInput` then records the right-interval +specialization of Ara--Maltsiniotis (2020), Theorem A.15 and Section A.16: +a right tensor functor with right adjoint, its endpoint/projection maps, and +the natural comparison on the actual oriental chain cylinders. These data specify the right tensor convention for the conditional +relative-prism construction. +-/ + +namespace Thomason.Construction + +open CategoryTheory +open _root_.OAI.Thomason.Construction.DirectedComplex + +namespace NormalizedSimplexIdentities + +variable (h : NormalizedSimplexIdentities) + +noncomputable def cylinderObject (m : ℕ) : StrictOmegaCategory := + (rightCylinder (SimplexComplex.directedComplex m (h.squared m))).realization + +noncomputable def cylinderMap {m n : ℕ} (f : Fin (m + 1) →o Fin (n + 1)) : + h.cylinderObject m ⟶ h.cylinderObject n := + (RightCylinder.map (SimplexComplex.directedMap (h.squared m) (h.squared n) + f (h.naturality f))).realization + +theorem cylinderMap_id (m : ℕ) : h.cylinderMap (OrderHom.id : Fin (m + 1) →o Fin (m + 1)) = + 𝟙 (h.cylinderObject m) := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext a p + cases p with + | zero => + change (SimplexComplex.mapChains OrderHom.id 0 (x.table a 0).1, + SimplexComplex.mapChains OrderHom.id 0 (x.table a 0).2) = x.table a 0 + simp + | succ p => + change (SimplexComplex.mapChains OrderHom.id (p + 1) (x.table a (p + 1)).1, + SimplexComplex.mapChains OrderHom.id (p + 1) (x.table a (p + 1)).2.1, + SimplexComplex.mapChains OrderHom.id p (x.table a (p + 1)).2.2) = x.table a (p + 1) + simp + +theorem cylinderMap_comp {l m n : ℕ} (f : Fin (l + 1) →o Fin (m + 1)) + (g : Fin (m + 1) →o Fin (n + 1)) : h.cylinderMap (g.comp f) = h.cylinderMap f ≫ h.cylinderMap g := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext a p + change (RightCylinder.map (SimplexComplex.directedMap (h.squared l) (h.squared n) + (g.comp f) (h.naturality _))).app p (x.table a p) = + (RightCylinder.map (SimplexComplex.directedMap (h.squared m) (h.squared n) + g (h.naturality _))).app p + ((RightCylinder.map (SimplexComplex.directedMap (h.squared l) (h.squared m) + f (h.naturality _))).app p (x.table a p)) + cases p <;> + simp [RightCylinder.map, RightCylinder.mapMap, + SimplexComplex.directedMap, SimplexComplex.mapChains_comp] + +/-- The cosimplicial diagram of the actual strict chain cylinders. -/ +noncomputable def cylinderCosimplicial : SimplexCategory ⥤ StrictOmegaCategory.{0} where + obj m := h.cylinderObject m.len + map f := h.cylinderMap f.toOrderHom + map_id m := h.cylinderMap_id m.len + map_comp f g := h.cylinderMap_comp f.toOrderHom g.toOrderHom + +noncomputable def cylinderEndpoint (a : Bool) : h.cosimplicial ⟶ h.cylinderCosimplicial where + app m := (RightCylinder.endpoint (SimplexComplex.directedComplex m.len (h.squared m.len)) a).realization + naturality m n f := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact (RightCylinder.map_endpoint + (SimplexComplex.directedMap (h.squared m.len) (h.squared n.len) f.toOrderHom + (h.naturality f.toOrderHom)) a p (x.table b p)).symm + +noncomputable def cylinderProjection : h.cylinderCosimplicial ⟶ h.cosimplicial where + app m := (RightCylinder.projection (SimplexComplex.directedComplex m.len (h.squared m.len))).realization + naturality m n f := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact RightCylinder.projection_map + (SimplexComplex.directedMap (h.squared m.len) (h.squared n.len) f.toOrderHom + (h.naturality f.toOrderHom)) p (x.table b p) + +end NormalizedSimplexIdentities + +/-- The exact published input about tensoring with the oriented interval. +The natural isomorphism compares to the explicitly constructed chain tensor; +its endpoint and projection equations fix the right-tensor convention. -/ +structure RightGrayInput (h : NormalizedSimplexIdentities) where + cylinder : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} + internalHom : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} + adjunction : cylinder ⊣ internalHom + endpoint : Bool → (𝟭 StrictOmegaCategory.{0} ⟶ cylinder) + projection : cylinder ⟶ 𝟭 StrictOmegaCategory.{0} + endpoint_projection (a : Bool) (C : StrictOmegaCategory.{0}) : + (endpoint a).app C ≫ projection.app C = 𝟙 C + simplexComparison : h.cylinderCosimplicial ≅ h.cosimplicial ⋙ cylinder + endpoint_comparison (a : Bool) (m : SimplexCategory) : + (h.cylinderEndpoint a).app m ≫ simplexComparison.hom.app m = + (endpoint a).app (h.object m.len) + projection_comparison (m : SimplexCategory) : + simplexComparison.hom.app m ≫ projection.app (h.object m.len) = + h.cylinderProjection.app m + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + +/-- Cocontinuity follows from the published right internal-hom adjunction. -/ +theorem preservesColimits : Limits.PreservesColimitsOfSize.{0, 0} G.cylinder := by + have := G.adjunction.isLeftAdjoint + infer_instance + +/-- The constructed chain prism transported through the published comparison. -/ +noncomputable def prism {m n : ℕ} {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) : + G.cylinder.obj (h.object m) ⟶ h.object n := + G.simplexComparison.inv.app (.mk m) ≫ + SimplexComplex.strictPrism h hA f g hfg hagree hconstant + +/-- The comparison preserves the two endpoint functors of the new prism. -/ +theorem prism_endpoint {m n : ℕ} {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (a : Bool) : + (G.endpoint a).app (h.object m) ≫ G.prism hA f g hfg hagree hconstant = + h.map (if a then g else f) := by + let e : h.object m ⟶ h.cylinderObject m := (h.cylinderEndpoint a).app (.mk m) + let i : h.cylinderObject m ≅ G.cylinder.obj (h.object m) := + G.simplexComparison.app (.mk m) + let P : h.cylinderObject m ⟶ h.object n := + SimplexComplex.strictPrism h hA f g hfg hagree hconstant + have he : e ≫ i.hom = (G.endpoint a).app (h.object m) := + G.endpoint_comparison a (.mk m) + change (G.endpoint a).app (h.object m) ≫ (i.inv ≫ P) = _ + calc + _ = (e ≫ i.hom) ≫ (i.inv ≫ P) := + congrArg (fun k => k ≫ (i.inv ≫ P)) he.symm + _ = e ≫ P := by simp only [Category.assoc, Iso.hom_inv_id_assoc] + _ = h.map (if a then g else f) := by + apply StrictOmegaCategory.Hom.ext + funext x + exact SimplexComplex.strictPrism_endpoint h hA f g hfg hagree hconstant a x + +/-- Stationarity of the complete strict chain prism passes to the right +Gray cylinder along the published natural comparison. -/ +theorem prism_stationary {l m n : ℕ} {A : Set (Fin (m + 1))} (hA : IsLowerSet A) + (f g : Fin (m + 1) →o Fin (n + 1)) (hfg : ∀ i, f i ≤ g i) + (hagree : ∀ i ∈ A, f i = g i) (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (a : Fin (l + 1) →o Fin (m + 1)) (ha : ∀ i, a i ∈ A) : + G.cylinder.map (h.map a) ≫ G.prism hA f g hfg hagree hconstant = + G.projection.app (h.object l) ≫ h.map (f.comp a) := by + let il : h.cylinderObject l ≅ G.cylinder.obj (h.object l) := + G.simplexComparison.app (.mk l) + let im : h.cylinderObject m ≅ G.cylinder.obj (h.object m) := + G.simplexComparison.app (.mk m) + let P : h.cylinderObject m ⟶ h.object n := + SimplexComplex.strictPrism h hA f g hfg hagree hconstant + let ca : h.cylinderObject l ⟶ h.cylinderObject m := h.cylinderMap a + let cp : h.cylinderObject l ⟶ h.object l := h.cylinderProjection.app (.mk l) + let v : h.object l ⟶ h.object n := h.map (f.comp a) + have hn : G.cylinder.map (h.map a) ≫ im.inv = il.inv ≫ ca := + G.simplexComparison.inv.naturality (SimplexCategory.Hom.mk a) + have hp : ca ≫ P = cp ≫ v := by + apply StrictOmegaCategory.Hom.ext + funext x + exact SimplexComplex.strictPrism_stationary h hA f g hfg hagree hconstant a ha x + have hcp : il.hom ≫ G.projection.app (h.object l) = cp := + G.projection_comparison (.mk l) + have hproj : il.inv ≫ cp = G.projection.app (h.object l) := by + calc + _ = il.inv ≫ (il.hom ≫ G.projection.app (h.object l)) := + congrArg (fun k => il.inv ≫ k) hcp.symm + _ = _ := il.inv_hom_id_assoc _ + change G.cylinder.map (h.map a) ≫ (im.inv ≫ P) = G.projection.app (h.object l) ≫ v + calc + _ = (G.cylinder.map (h.map a) ≫ im.inv) ≫ P := (Category.assoc _ _ _).symm + _ = (il.inv ≫ ca) ≫ P := congrArg (fun k => k ≫ P) hn + _ = il.inv ≫ (ca ≫ P) := Category.assoc _ _ _ + _ = il.inv ≫ (cp ≫ v) := congrArg (fun k => il.inv ≫ k) hp + _ = (il.inv ≫ cp) ≫ v := (Category.assoc _ _ _).symm + _ = _ := congrArg (fun k => k ≫ v) hproj + +end RightGrayInput + +end Thomason.Construction + +end + +section + +/-! +# Assembly of compatible strict cylinders + +This is the colimit step in the relative-prism construction. It uses +cocontinuity of the right Gray tensor, proved from the published adjunction. +The compatibility hypotheses concern the local maps being glued, not a +model-structure or couniversality conclusion. +-/ + +namespace Thomason.Construction.RightGrayInput + +open CategoryTheory CategoryTheory.Limits + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + {J : Type} [SmallCategory J] {D : J ⥤ StrictOmegaCategory.{0}} + {c : Cocone D} (hc : IsColimit c) + +include hc + +/-- Equality on all simplex cylinders is equality on the colimit cylinder. -/ +theorem cylinder_hom_ext {Y : StrictOmegaCategory.{0}} + {P Q : G.cylinder.obj c.pt ⟶ Y} + (he : ∀ j, G.cylinder.map (c.ι.app j) ≫ P = G.cylinder.map (c.ι.app j) ≫ Q) : P = Q := by + have := G.preservesColimits + exact (isColimitOfPreserves G.cylinder hc).hom_ext he + +/-- Compatible local strict cylinders assemble to a unique whole cylinder. -/ +theorem assemble_cylinder {Y : StrictOmegaCategory.{0}} + (P : ∀ j, G.cylinder.obj (D.obj j) ⟶ Y) + (hP : ∀ {i j} (a : i ⟶ j), G.cylinder.map (D.map a) ≫ P j = P i) : + ∃! Q : G.cylinder.obj c.pt ⟶ Y, + ∀ j, G.cylinder.map (c.ι.app j) ≫ Q = P j := by + have := G.preservesColimits + let t : Cocone (D ⋙ G.cylinder) := + { pt := Y + ι := { app := P, naturality := fun i j a => by simpa using hP a } } + let hgc := isColimitOfPreserves G.cylinder hc + refine ⟨hgc.desc t, hgc.fac t, ?_⟩ + intro Q hQ + exact hgc.hom_ext (fun j => (hQ j).trans (hgc.fac t j).symm) + +/-- The endpoint of an assembled cylinder is the map prescribed on every +piece of the colimit. -/ +theorem assembled_endpoint {Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj c.pt ⟶ Y) (F : c.pt ⟶ Y) (a : Bool) + (hF : ∀ j, (G.endpoint a).app (D.obj j) ≫ G.cylinder.map (c.ι.app j) ≫ P = + c.ι.app j ≫ F) : + (G.endpoint a).app c.pt ≫ P = F := by + apply hc.hom_ext + intro j + let i : D.obj j ⟶ c.pt := c.ι.app j + have hn : i ≫ (G.endpoint a).app c.pt = (G.endpoint a).app (D.obj j) ≫ G.cylinder.map i := + (G.endpoint a).naturality i + change i ≫ ((G.endpoint a).app c.pt ≫ P) = i ≫ F + calc + _ = (i ≫ (G.endpoint a).app c.pt) ≫ P := (Category.assoc _ _ _).symm + _ = ((G.endpoint a).app (D.obj j) ≫ G.cylinder.map i) ≫ P := congrArg (fun k => k ≫ P) hn + _ = _ := (Category.assoc _ _ _).trans (hF j) + +/-- To prove stationarity on a subcategory presented as a colimit, it +suffices to prove the factorization on the whole cylinder of every piece. -/ +theorem assembled_stationary {X Y : StrictOmegaCategory.{0}} + (a : c.pt ⟶ X) (v : c.pt ⟶ Y) (P : G.cylinder.obj X ⟶ Y) + (hs : ∀ j, G.cylinder.map (c.ι.app j ≫ a) ≫ P = + G.projection.app (D.obj j) ≫ (c.ι.app j ≫ v)) : + G.cylinder.map a ≫ P = G.projection.app c.pt ≫ v := by + apply G.cylinder_hom_ext hc + intro j + calc + _ = G.cylinder.map (c.ι.app j ≫ a) ≫ P := by rw [G.cylinder.map_comp, Category.assoc] + _ = G.projection.app (D.obj j) ≫ (c.ι.app j ≫ v) := hs j + _ = (G.cylinder.map (c.ι.app j) ≫ G.projection.app c.pt) ≫ v := by + let i : D.obj j ⟶ c.pt := c.ι.app j + have hn : G.cylinder.map i ≫ G.projection.app c.pt = G.projection.app (D.obj j) ≫ i := + G.projection.naturality i + exact (Category.assoc _ _ _).symm.trans (congrArg (fun k => k ≫ v) hn.symm) + _ = _ := Category.assoc _ _ _ + +end Thomason.Construction.RightGrayInput + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeFaces.lean b/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeFaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2d146170b5e108043934df3da73758080f21013 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeFaces.lean @@ -0,0 +1,1012 @@ +import OAI.CategoryTheory.Thomason.Chains.SimplexBasisHeight +import OAI.CategoryTheory.Thomason.Gray.CylinderAssembly +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.SimplexCylinderGeneration +import OAI.CategoryTheory.Thomason.Gray.StrictAbelianization +import OAI.CategoryTheory.Thomason.Simplicial.NonsingularFaceCarriers +import Mathlib.CategoryTheory.Adjunction.Limits +import Mathlib.CategoryTheory.Whiskering + +namespace OAI + +section + +/-! # Ordered atoms of globes and their right cylinders + +The two lower rows of a globe atom are singleton faces. Their linear rank +orders all negative faces before the atom and all positive faces after it. +This supplies generation of each actual globe-cylinder piece. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def basisAtom (n p : ℕ) (b : Basis n p) : Cell (complex n) := + (topCell n).face b.val p + +theorem basisAtom_top (n p : ℕ) (b : Basis n p) (side : Bool) : + (basisAtom n p b).table side p = Finsupp.single b 1 := by + change Cell.cutTable (topCell n) b.val p side p = _ + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + exact topTable_eq_single n p b + +theorem basisAtom_above (n p : ℕ) (b : Basis n p) (q : ℕ) (hpq : p < q) (side : Bool) : + (basisAtom n p b).table side q = 0 := + Cell.table_zero_of_dimensionLE ((complex n).realization.face_dimensionLE b.val p + (topCell n)) hpq side + +theorem basisAtom_below (n p : ℕ) (b : Basis n p) (q : ℕ) (hqp : q < p) (side : Bool) : + (basisAtom n p b).table side q = + Finsupp.single (⟨side, Or.inl (hqp.trans_le (by + rcases b.property with h | ⟨h, _⟩ <;> omega))⟩ : Basis n q) 1 := by + have hqn : q < n := hqp.trans_le (by rcases b.property with h | ⟨h, _⟩ <;> omega) + change Cell.cutTable (topCell n) b.val p side q = _ + simp only [Cell.cutTable, hqp, ite_true] + simp [topCell, topTable, hqn] + rfl + +def basisHeight {n p : ℕ} (b : Basis n p) : ℤ := + if b.val then 2 * (n : ℤ) - p else p + +theorem basisAtom_sideHeight (n p : ℕ) (b : Basis n p) (q : ℕ) (hqp : q < p) + (side : Bool) (c : Basis n q) + (hc : DFunLike.coe (F := Chains n q) ((basisAtom n p b).table side q) c ≠ 0) : + if side then basisHeight b < basisHeight c else basisHeight c < basisHeight b := by + rw [basisAtom_below n p b q hqp side] at hc + have he : c.val = side := by + by_contra h + have hne : c ≠ (⟨side, Or.inl (hqp.trans_le (by + rcases b.property with h | ⟨h, _⟩ <;> omega))⟩ : Basis n q) := by + intro hh + exact h (congrArg Subtype.val hh) + exact hc (Finsupp.single_eq_of_ne hne) + have hpn : p ≤ n := by rcases b.property with h | ⟨h, _⟩ <;> omega + cases side <;> cases hb : b.val <;> simp only [basisHeight, he, hb, Bool.false_eq_true, + ite_false, ite_true] <;> omega + +def orderedAtomBasis (n : ℕ) : OrderedAtomBasis (complex n) where + Index p := Basis n p + coordinates _ := AddEquiv.refl _ + positive_iff _ _ := Iff.rfl + augmentation := by + change ∀ x : Chains n 0, weight n 0 x = x.sum (fun _ z => z) + intro x + simp [weight, Finsupp.linearCombination_apply] + atom := basisAtom n + atom_top := basisAtom_top n + atom_above := basisAtom_above n + height _ := basisHeight + disjoint {p q r} b c hrp hrq hbc e := by + by_cases he : DFunLike.coe (F := Chains n r) ((basisAtom n p b).table false r) e = 0 + · exact Or.inl he + · right + by_contra hf + have h1 := basisAtom_sideHeight n p b r hrp false e he + have h2 := basisAtom_sideHeight n q c r hrq true e hf + simp only [Bool.false_eq_true, ite_false, ite_true] at h1 h2 + exact (lt_irrefl _) (h2.trans (h1.trans_le hbc)) + +theorem orderedAtomBasis_sideHeight (n : ℕ) : (orderedAtomBasis n).SideHeight := + basisAtom_sideHeight n + +def cylinderOrderedAtomBasis (n : ℕ) : OrderedAtomBasis (rightCylinder (complex n)) := + (orderedAtomBasis n).cylinderOrderedAtomBasis (orderedAtomBasis_sideHeight n) + +theorem cylinder_generated (n : ℕ) (P : Cell (rightCylinder (complex n)) → Prop) + (hatom : ∀ p b, P ((cylinderOrderedAtomBasis n).atom p b)) + (hcomp : ∀ r x y hxy, P x → P y → P (Cell.comp x y r hxy)) : ∀ x, P x := + (cylinderOrderedAtomBasis n).generated P hatom hcomp + +end +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # The two ends of the actual simplicial cylinder + +An explicit disjoint union avoids any choice of coproduct presentation. +The map from these two copies to the cylinder is proved monic degreewise. +-/ + +namespace Thomason.Construction.SimplicialCylinder + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial + +universe u + +/-- Two disjoint copies of a simplicial set, in each degree. -/ +def ends (X : SSet.{u}) : SSet.{u} where + obj m := X.obj m ⊕ X.obj m + map f := ↾(Sum.map (X.map f) (X.map f)) + map_id m := by ext x; cases x <;> simp + map_comp f g := by ext x; cases x <;> simp + +/-- The map specified independently on the two ends. -/ +def desc {X Y : SSet.{u}} (f g : X ⟶ Y) : ends X ⟶ Y where + app m := ↾(Sum.elim (f.app m) (g.app m)) + naturality m n a := by + ext x + cases x with + | inl x => exact ConcreteCategory.congr_hom (f.naturality a) x + | inr x => exact ConcreteCategory.congr_hom (g.naturality a) x + +def zero (X : SSet.{u}) : X ⟶ ends X where + app m := ↾Sum.inl + +def one (X : SSet.{u}) : X ⟶ ends X where + app m := ↾Sum.inr + +@[simp, reassoc] +theorem zero_desc {X Y : SSet.{u}} (f g : X ⟶ Y) : zero X ≫ desc f g = f := rfl + +@[simp, reassoc] +theorem one_desc {X Y : SSet.{u}} (f g : X ⟶ Y) : one X ≫ desc f g = g := rfl + +/-- The actual inclusion of the two cylinder ends. -/ +noncomputable def inclusion (X : SSet.{u}) : ends X ⟶ X ⊗ Δ[1] := + desc SSet.ι₀ SSet.ι₁ + +@[simp, reassoc] +theorem zero_inclusion (X : SSet.{u}) : zero X ≫ inclusion X = SSet.ι₀ := rfl + +@[simp, reassoc] +theorem one_inclusion (X : SSet.{u}) : one X ≫ inclusion X = SSet.ι₁ := rfl + +/-- The two ends are disjoint, and each includes injectively. -/ +instance inclusion_mono (X : SSet.{u}) : Mono (inclusion X) := by + rw [NatTrans.mono_iff_mono_app] + intro m + apply (CategoryTheory.mono_iff_injective _).mpr + intro a b he + cases a with + | inl a => + cases b with + | inl b => + exact congrArg Sum.inl (congrArg Prod.fst he) + | inr b => + have hh := congrArg (fun z => (SSet.stdSimplex.objEquiv z.2) (0 : Fin (m.unop.len+1))) he + change (0 : Fin 2) = 1 at hh + exact False.elim (by contradiction) + | inr a => + cases b with + | inl b => + have hh := congrArg (fun z => (SSet.stdSimplex.objEquiv z.2) (0 : Fin (m.unop.len+1))) he + change (1 : Fin 2) = 0 at hh + exact False.elim (by contradiction) + | inr b => + exact congrArg Sum.inr (congrArg Prod.fst he) + +end Thomason.Construction.SimplicialCylinder + +end + +section + +/-! # The strict unit of the chain realization adjunction + +A cell is sent to the table of the additive classes of all its faces. +The finite-dimension condition and the strict composition laws are proved +in the quotient, including the vanishing of identity extensions. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Abelianization + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable (C : StrictOmegaCategory.{0}) + +theorem faceGenerator_of_dimension (a : Bool) (n : ℕ) (x : C) + (hx : C.DimensionLE n x) : faceGenerator C a n x = generator C n ⟨x, hx⟩ := by + apply congrArg (generator C n) + exact Subtype.ext (by cases a; exact hx.1; exact hx.2) + +theorem faceGenerator_zero (a : Bool) {n m : ℕ} (hnm : n < m) (x : C) + (hx : C.DimensionLE n x) : faceGenerator C a m x = 0 := by + cases m with + | zero => omega + | succ m => + have hx' := C.dimensionLE_mono (show n ≤ m by omega) hx + rw [faceGenerator_of_dimension C a (m + 1) x (C.dimensionLE_mono (Nat.le_succ m) hx')] + exact generator_identity C m x hx' + +/-- The finite table of the additive classes of a strict cell's faces. -/ +def unitCell (x : C) : DirectedComplex.Cell (complex C) where + table a n := faceGenerator C a n x + positive a n := generator_positive C n _ + augmentation a := augmentation_faceGenerator C a x + boundary a n := by + change differential C n (faceGenerator C a (n + 1) x) = _ + rw [differential_faceGenerator, faceGenerator_face C _ _ (Nat.lt_succ_self n), + faceGenerator_face C _ _ (Nat.lt_succ_self n)] + rfl + finite_support := by + obtain ⟨n, hn⟩ := C.finite_dimension x + exact ⟨n, fun m hm a => faceGenerator_zero C a hm x hn⟩ + +@[simp] theorem unitCell_table (x : C) (a : Bool) (n : ℕ) : + (unitCell C x).table a n = faceGenerator C a n x := rfl + +theorem unitCell_face (a : Bool) (n : ℕ) (x : C) : + unitCell C (C.face a n x) = (unitCell C x).face a n := by + apply DirectedComplex.Cell.ext + funext b m + change faceGenerator C b m (C.face a n x) = DirectedComplex.Cell.cutTable (unitCell C x) a n b m + unfold DirectedComplex.Cell.cutTable + by_cases hmn : m < n + · rw [ite_eq_left hmn] + exact faceGenerator_face C b a hmn x + · rw [ite_eq_right hmn] + by_cases he : m = n + · subst m + rw [ite_eq_left rfl] + apply congrArg (generator C n) + exact Subtype.ext (C.face_face_same b a n x) + · rw [ite_eq_right he] + exact faceGenerator_zero C b (by omega) _ (C.face_dimensionLE a n x) + +/-- Lower faces of a composite are the common lower faces of its factors. -/ +theorem face_comp_below (a : Bool) {m n : ℕ} (hmn : m < n) (x y : C) + (h : C.target n x = C.source n y) : + C.face a m (C.comp n x y h) = C.face a m x := by + have hs := congrArg (C.face a m) (C.source_comp n x y h) + simpa only [source, C.globular, hmn, ite_true] using hs + +theorem unitCell_comp (n : ℕ) (x y : C) (h : C.target n x = C.source n y) + (h' : (unitCell C x).face true n = (unitCell C y).face false n) : + unitCell C (C.comp n x y h) = DirectedComplex.Cell.comp (unitCell C x) (unitCell C y) n h' := by + apply DirectedComplex.Cell.ext + funext a m + change faceGenerator C a m (C.comp n x y h) = DirectedComplex.Cell.pasteTable (unitCell C x) (unitCell C y) n a m + unfold DirectedComplex.Cell.pasteTable + by_cases hmn : m < n + · rw [ite_eq_left hmn] + apply congrArg (generator C m) + exact Subtype.ext (face_comp_below C a hmn x y h) + · rw [ite_eq_right hmn] + by_cases he : m = n + · subst m + rw [ite_eq_left rfl] + cases a + · change faceGenerator C false n (C.comp n x y h) = faceGenerator C false n x + apply congrArg (generator C n) + exact Subtype.ext (C.source_comp n x y h) + · change faceGenerator C true n (C.comp n x y h) = faceGenerator C true n y + apply congrArg (generator C n) + exact Subtype.ext (C.target_comp n x y h) + · rw [ite_eq_right he] + exact faceGenerator_composite C a n (by omega) x y h + +/-- The concrete unit into the realization of lambda. -/ +def unit : C ⟶ (complex C).realization where + toFun := unitCell C + map_face := unitCell_face C + map_comp := unitCell_comp C + +end + +end Thomason.Construction.StrictOmegaCategory.Abelianization + +end + +section + +/-! # Evaluating the strict chain presentation in a directed complex + +Every strict functor to nu K induces a positive augmented chain map from +lambda C. The proof checks the actual composition relations and the signed +boundary; it makes no fullness assumption about realization. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Abelianization + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {C : StrictOmegaCategory.{0}} {K : DirectedComplex.{0}} + +/-- The degree n component extracted from a strict functor to nu K. -/ +def evaluate (f : C ⟶ K.realization) (n : ℕ) : Chains C n →+ K.group n := + lift C n (fun x => (f.toFun x.val).table false n) (by + intro k hk x y h + have hh : (f.toFun x.val).face true k = (f.toFun y.val).face false k := + (f.map_face true k x.val).symm.trans ((congrArg f.toFun h).trans (f.map_face false k y.val)) + have he := f.map_comp k x.val y.val h hh + change (f.toFun (C.comp k x.val y.val h)).table false n = _ + rw [he] + change DirectedComplex.Cell.pasteTable _ _ k false n = _ + simp only [DirectedComplex.Cell.pasteTable, Nat.not_lt.mpr hk.le, Nat.ne_of_gt hk, ite_false]) + +@[simp] theorem evaluate_generator (f : C ⟶ K.realization) (n : ℕ) (x : Bounded C n) : + evaluate f n (generator C n x) = (f.toFun x.val).table false n := + lift_generator C _ _ _ x + +@[simp] theorem evaluate_faceGenerator (f : C ⟶ K.realization) (a : Bool) (n : ℕ) (x : C) : + evaluate f n (faceGenerator C a n x) = (f.toFun x).table a n := by + change evaluate f n (generator C n ⟨C.face a n x, C.face_dimensionLE a n x⟩) = _ + rw [evaluate_generator, f.map_face] + change DirectedComplex.Cell.cutTable (f.toFun x) a n false n = _ + simp only [DirectedComplex.Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + +theorem evaluate_differential (f : C ⟶ K.realization) (n : ℕ) (x : Chains C (n + 1)) : + evaluate f n (differential C n x) = K.differential n (evaluate f (n + 1) x) := by + have he : (evaluate f n).comp (differential C n) = + (K.differential n).comp (evaluate f (n + 1)) := by + apply hom_ext + intro y + simp only [AddMonoidHom.comp_apply, differential_generator, map_sub, + evaluate_faceGenerator, evaluate_generator] + exact ((f.toFun y.val).boundary false n).symm + exact DFunLike.congr_fun he x + +theorem evaluate_augmentation (f : C ⟶ K.realization) (x : Chains C 0) : + K.augmentation (evaluate f 0 x) = augmentation C x := by + have he : K.augmentation.comp (evaluate f 0) = augmentation C := by + apply hom_ext + intro y + simp only [AddMonoidHom.comp_apply, evaluate_generator, augmentation_generator] + exact (f.toFun y.val).augmentation false + exact DFunLike.congr_fun he x + +theorem evaluate_positive (f : C ⟶ K.realization) (n : ℕ) {x : Chains C n} + (hx : x ∈ positive C n) : evaluate f n x ∈ K.positive n := by + have he : positive C n ≤ (K.positive n).comap (evaluate f n) := by + apply AddSubmonoid.closure_le.mpr + rintro _ ⟨y, rfl⟩ + change evaluate f n (generator C n y) ∈ K.positive n + rw [evaluate_generator] + exact (f.toFun y.val).positive false n + exact he hx + +/-- The augmented positive chain map obtained from an arbitrary strict map. -/ +def evaluateHom (f : C ⟶ K.realization) : DirectedComplex.Hom (complex C) K where + app := evaluate f + differential := evaluate_differential f + augmentation := evaluate_augmentation f + positive := evaluate_positive f + +/-- Evaluation followed by the constructed unit recovers every strict cell. -/ +theorem unit_evaluate (f : C ⟶ K.realization) : + StrictOmegaCategory.Hom.comp (unit C) (evaluateHom f).realization = f := by + apply StrictOmegaCategory.Hom.ext + funext x + apply DirectedComplex.Cell.ext + funext a n + exact evaluate_faceGenerator f a n x + +/-- The generator of any bounded cell is its unit table at that degree. -/ +theorem unitCell_top (n : ℕ) (x : Bounded C n) : + (unitCell C x.val).table false n = generator C n x := + faceGenerator_of_dimension C false n x.val x.property + +/-- Every positive chain map is uniquely recovered from its realized unit. -/ +theorem evaluate_unit (g : DirectedComplex.Hom (complex C) K) : + evaluateHom (StrictOmegaCategory.Hom.comp (unit C) g.realization) = g := by + apply DirectedComplex.Hom.ext_app + intro n + suffices he : evaluate (StrictOmegaCategory.Hom.comp (unit C) g.realization) n = g.app n from + DFunLike.congr_fun he + apply hom_ext + intro x + change evaluate (StrictOmegaCategory.Hom.comp (unit C) g.realization) n + (generator C n x) = g.app n (generator C n x) + rw [evaluate_generator] + change g.app n ((unitCell C x.val).table false n) = _ + rw [unitCell_top] + +/-- The actual lambda-nu hom-set equivalence. -/ +def homEquiv (C : StrictOmegaCategory.{0}) (K : DirectedComplex.{0}) : + DirectedComplex.Hom (complex C) K ≃ (C ⟶ K.realization) where + toFun g := StrictOmegaCategory.Hom.comp (unit C) g.realization + invFun := evaluateHom + left_inv := evaluate_unit + right_inv := unit_evaluate + +end + +end Thomason.Construction.StrictOmegaCategory.Abelianization + +end + +section + +/-! # The strict-category / directed-complex adjunction + +The two inverse constructions are natural. In particular lambda preserves +strict pushouts, so the universal pasted-globe relations have a canonical +positive-chain presentation before applying the right interval tensor. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Abelianization + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {C D E : StrictOmegaCategory.{0}} + +/-- The chain map induced by an arbitrary strict functor. -/ +def map (f : C ⟶ D) : DirectedComplex.Hom (complex C) (complex D) := + evaluateHom (f ≫ unit D) + +@[simp] theorem map_generator (f : C ⟶ D) (n : ℕ) (x : Bounded C n) : + (map f).app n (generator C n x) = generator D n ⟨f.toFun x.val, f.dimensionLE x.property⟩ := by + change evaluate (f ≫ unit D) n (generator C n x) = _ + rw [evaluate_generator] + exact unitCell_top n ⟨f.toFun x.val, f.dimensionLE x.property⟩ + +/-- The concrete strict abelianization functor. -/ +def functor : StrictOmegaCategory.{0} ⥤ DirectedComplex.{0} where + obj := complex + map := map + map_id C := by + apply DirectedComplex.Hom.ext_app + intro n z + have he : (map (𝟙 C)).app n = AddMonoidHom.id _ := by + apply hom_ext + intro x + exact map_generator (𝟙 C) n x + exact DFunLike.congr_fun he z + map_comp f g := by + apply DirectedComplex.Hom.ext_app + intro n z + have he : (map (f ≫ g)).app n = ((map g).app n).comp ((map f).app n) := by + apply hom_ext + intro x + exact (map_generator (f ≫ g) n x).trans + ((congrArg ((map g).app n) (map_generator f n x)).trans + (map_generator g n ⟨f.toFun x.val, f.dimensionLE x.property⟩)).symm + exact DFunLike.congr_fun he z + +/-- Naturality in the strict source, checked on actual bounded-cell generators. -/ +theorem evaluate_naturality {K : DirectedComplex.{0}} (f : C ⟶ D) (g : D ⟶ K.realization) : + DirectedComplex.Hom.comp (map f) (evaluateHom g) = evaluateHom (f ≫ g) := by + apply DirectedComplex.Hom.ext_app + intro n z + have he : ((evaluateHom g).app n).comp ((map f).app n) = + (evaluateHom (f ≫ g)).app n := by + apply hom_ext + intro x + change evaluate g n ((map f).app n (generator C n x)) = + evaluate (f ≫ g) n (generator C n x) + rw [map_generator, evaluate_generator, evaluate_generator] + rfl + exact DFunLike.congr_fun he z + +/-- Lambda is left adjoint to the actual positive-table realization nu. -/ +def adjunction : functor ⊣ realizationFunctor := + Adjunction.mkOfHomEquiv { + homEquiv := fun C K => homEquiv C K + homEquiv_naturality_left_symm := fun f g => (evaluate_naturality f g).symm + homEquiv_naturality_right := fun g f => by + apply StrictOmegaCategory.Hom.ext + funext x + apply DirectedComplex.Cell.ext + rfl } + +/-- The abelianization carries every existing strict colimit to the +corresponding directed-complex colimit, including the pasted globe squares. -/ +theorem preservesColimits : Limits.PreservesColimitsOfSize.{0, 0} functor := by + have := adjunction.isLeftAdjoint + infer_instance + +end + +end Thomason.Construction.StrictOmegaCategory.Abelianization + +end + +section + +/-! # The chain presentation recovers the explicit globe complexes + +The unit/evaluation adjunction identifies lambda of an actual strict globe +with its signed positive globe complex. This checks the new presentation +against the concrete parameters already used for right cylinders. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Evaluation from the additive strict-cell presentation to the explicit +positive globe chains. -/ +def abelianizationToGlobe (n : ℕ) : + DirectedComplex.Hom (StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n)) (complex n) := + StrictOmegaCategory.Abelianization.evaluateHom (fromGlobe n) + +/-- The universal top cell supplies the reverse positive chain map. -/ +def globeToAbelianization (n : ℕ) : + DirectedComplex.Hom (complex n) (StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n)) := + cellMap n (StrictOmegaCategory.Abelianization.unitCell _ StrictOmegaCategory.Globe.Cell.top) + +theorem globeToAbelianization_top (n : ℕ) : + (globeToAbelianization n).realization.toFun (topCell n) = + StrictOmegaCategory.Abelianization.unitCell _ StrictOmegaCategory.Globe.Cell.top := by + apply cellMap_top_of_bounded + exact (StrictOmegaCategory.Abelianization.unit _).dimensionLE + (StrictOmegaCategory.Globe.category_truncated n StrictOmegaCategory.Globe.Cell.top) + +theorem abelianizationToGlobe_top (n : ℕ) : + (abelianizationToGlobe n).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ StrictOmegaCategory.Globe.Cell.top) = topCell n := by + have he := congrArg (fun f : StrictOmegaCategory.Globe.category n ⟶ (complex n).realization => + f.toFun StrictOmegaCategory.Globe.Cell.top) (StrictOmegaCategory.Abelianization.unit_evaluate (fromGlobe n)) + exact he + +theorem abelianizationToGlobe_inverse (n : ℕ) : + DirectedComplex.Hom.comp (abelianizationToGlobe n) (globeToAbelianization n) = + DirectedComplex.Hom.id _ := by + apply (StrictOmegaCategory.Abelianization.homEquiv (StrictOmegaCategory.Globe.category n) _).injective + apply StrictOmegaCategory.Globe.hom_ext + change (globeToAbelianization n).realization.toFun + ((abelianizationToGlobe n).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ StrictOmegaCategory.Globe.Cell.top)) = StrictOmegaCategory.Abelianization.unitCell _ StrictOmegaCategory.Globe.Cell.top + rw [abelianizationToGlobe_top, globeToAbelianization_top] + +theorem globeToAbelianization_inverse (n : ℕ) : + DirectedComplex.Hom.comp (globeToAbelianization n) (abelianizationToGlobe n) = + DirectedComplex.Hom.id _ := by + apply (homEquiv n (complex n)).injective + apply Subtype.ext + change (abelianizationToGlobe n).realization.toFun + ((globeToAbelianization n).realization.toFun (topCell n)) = topCell n + rw [globeToAbelianization_top, abelianizationToGlobe_top] + +/-- The positive chain presentation of a strict globe is exactly the +explicit globe complex, not an additional comparison input. -/ +def abelianizationIso (n : ℕ) : StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n) ≅ complex n where + hom := abelianizationToGlobe n + inv := globeToAbelianization n + hom_inv_id := abelianizationToGlobe_inverse n + inv_hom_id := globeToAbelianization_inverse n + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Natural chain presentations of all strict globe maps + +The canonical isomorphisms from the abelianization of each globe to its +explicit chain complex are compatible with every strict globe map. Their +right-cylinder realizations therefore give a natural comparison of the +chain model with the concrete globe cylinders. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory CategoryTheory.Functor _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Naturality is proved through the actual lambda-nu adjunction, whose +unit followed by globe evaluation is the canonical globe isomorphism. -/ +def abelianizationGlobeIso : + StrictOmegaCategory.Globe.inclusion ⋙ StrictOmegaCategory.Abelianization.functor ≅ + chainFunctor := + NatIso.ofComponents (fun i => abelianizationIso i.dim) (fun {i j} f => by + let f' : StrictOmegaCategory.Globe.category i.dim ⟶ + StrictOmegaCategory.Globe.category j.dim := f + let a : StrictOmegaCategory.Abelianization.functor.obj + (StrictOmegaCategory.Globe.category i.dim) ⟶ complex i.dim := + (abelianizationIso i.dim).hom + let b : StrictOmegaCategory.Abelianization.functor.obj + (StrictOmegaCategory.Globe.category j.dim) ⟶ complex j.dim := + (abelianizationIso j.dim).hom + change StrictOmegaCategory.Abelianization.functor.map f' ≫ b = a ≫ chainMap f' + apply (StrictOmegaCategory.Abelianization.adjunction.homEquiv _ _).injective + rw [StrictOmegaCategory.Abelianization.adjunction.homEquiv_naturality_left, + StrictOmegaCategory.Abelianization.adjunction.homEquiv_naturality_right] + change f' ≫ (StrictOmegaCategory.Abelianization.unit _ ≫ + (StrictOmegaCategory.Abelianization.evaluateHom (fromGlobe j.dim)).realization) = + (StrictOmegaCategory.Abelianization.unit _ ≫ + (StrictOmegaCategory.Abelianization.evaluateHom (fromGlobe i.dim)).realization) ≫ (chainMap f').realization + have hunit (r : ℕ) : StrictOmegaCategory.Abelianization.unit + (StrictOmegaCategory.Globe.category r) ≫ + (StrictOmegaCategory.Abelianization.evaluateHom (fromGlobe r)).realization = + (globeIso r).hom := StrictOmegaCategory.Abelianization.unit_evaluate (fromGlobe r) + rw [hunit, hunit, chainMap_realization] + change f' ≫ (globeIso j.dim).hom = + (globeIso i.dim).hom ≫ ((globeIso i.dim).inv ≫ f' ≫ (globeIso j.dim).hom) + simp only [Iso.hom_inv_id_assoc]) + +/-- Tensoring the natural chain presentations with the right interval and +realizing gives the exact globe restriction of the chain model. -/ +def rightCylinderAbelianizationGlobeIso : + StrictOmegaCategory.Globe.inclusion ⋙ + (StrictOmegaCategory.Abelianization.functor ⋙ rightCylinderFunctor ⋙ realizationFunctor) ≅ + rightGlobeCylinder := + (Functor.associator StrictOmegaCategory.Globe.inclusion + StrictOmegaCategory.Abelianization.functor (rightCylinderFunctor ⋙ realizationFunctor)).symm ≪≫ + isoWhiskerRight abelianizationGlobeIso (rightCylinderFunctor ⋙ realizationFunctor) + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # The degreewise inverse of oriental abelianization + +The explicit simplex atoms give basis lifts. Positivity prevents a +composition from hiding atoms above its dimension bound. Generation is +expressed by `SimplexAtomsInput.generated` (Steiner 2004, Theorem 5.6). +-/ + +namespace Thomason.Construction.SimplexAtomsInput + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex SimplexComplex + +noncomputable section + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +/-- The top chain of the chosen atom is its literal normalized basis element. -/ +theorem atom_top {m p : ℕ} (b : Basis m p) (side : Bool) : + (a.atom b).table side p = Finsupp.single b 1 := by + change mapChains b.toOrderHom p ((a.principal p).table side p) = _ + rw [(a.principal_table p).1 side, mapChains_single, one_smul] + unfold mapBasis + rw [dite_eq_left (show StrictMono (fun i => b.toOrderHom (topBasis p i)) from b.strictMono)] + rfl + +/-- There are no atom chains above its basis dimension. -/ +theorem atom_above_zero {m p : ℕ} (b : Basis m p) {n : ℕ} (hpn : p < n) (side : Bool) : + (a.atom b).table side n = 0 := by + change mapChains b.toOrderHom n ((a.principal p).table side n) = 0 + rw [(a.principal_table p).2.2 side n hpn, map_zero] + +theorem atom_dimension {m p : ℕ} (b : Basis m p) : + (h.object m).DimensionLE p (a.atom b) := + Cell.dimensionLE_of_table_zero (fun _ hn side => a.atom_above_zero b hn side) + +/-- The nonzero top chain detects the exact dimension of an atom. -/ +theorem atom_dimension_iff {m p n : ℕ} (b : Basis m p) : + (h.object m).DimensionLE n (a.atom b) ↔ p ≤ n := by + constructor + · intro hx + by_contra hn + have hz := Cell.table_zero_of_dimensionLE hx (Nat.lt_of_not_ge hn) false + rw [a.atom_top b false] at hz + exact (Finsupp.single_ne_zero.mpr (by norm_num : (1 : ℤ) ≠ 0)) hz + · intro hn + exact (h.object m).dimensionLE_mono hn (a.atom_dimension b) + +/-- A normalized simplex's positive cone admits no nonzero cancellation. -/ +theorem positive_add_zero {m p : ℕ} (x y : (directedComplex m (h.squared m)).group p) + (hx : x ∈ (directedComplex m (h.squared m)).positive p) + (hy : y ∈ (directedComplex m (h.squared m)).positive p) (he : x + y = 0) : + x = 0 ∧ y = 0 := by + have hf (b : Basis m p) : x b = 0 ∧ y b = 0 := by + have hb := congrArg (fun z : Chains m p => z b) he + have hxb := hx b + have hyb := hy b + change x b + y b = 0 at hb + omega + exact ⟨Finsupp.ext (fun b => (hf b).1), Finsupp.ext (fun b => (hf b).2)⟩ + +/-- Lift a normalized basis element to the corresponding actual strict cell. -/ +def basisLift (m p : ℕ) : Chains m p →+ StrictOmegaCategory.Abelianization.Chains (h.object m) p := + (Finsupp.linearCombination ℤ (fun b : Basis m p => + StrictOmegaCategory.Abelianization.generator (h.object m) p + ⟨a.atom b, a.atom_dimension b⟩)).toAddMonoidHom + +@[simp] theorem basisLift_single {m p : ℕ} (b : Basis m p) (z : ℤ) : + a.basisLift m p (Finsupp.single b z) = z • + StrictOmegaCategory.Abelianization.generator (h.object m) p + ⟨a.atom b, a.atom_dimension b⟩ := by + simp [basisLift] + +/-- The basis lift recovers every bounded strict cell, using composition +generation of the simplex atoms. -/ +theorem basisLift_cell (m : ℕ) : ∀ x : h.object m, ∀ n (hx : (h.object m).DimensionLE n x), + a.basisLift m n (x.table false n) = + StrictOmegaCategory.Abelianization.generator (h.object m) n ⟨x, hx⟩ := by + apply a.generated m (fun x => ∀ n (hx : (h.object m).DimensionLE n x), + a.basisLift m n (x.table false n) = + StrictOmegaCategory.Abelianization.generator (h.object m) n ⟨x, hx⟩) + · intro p b n hx + have hpn := (a.atom_dimension_iff b).mp hx + rcases hpn.eq_or_lt with he | he + · subst n + exact (congrArg (a.basisLift m p) (a.atom_top b false)).trans + ((a.basisLift_single b 1).trans (one_smul ℤ _)) + · exact (congrArg (a.basisLift m n) (a.atom_above_zero b he false)).trans + ((map_zero _).trans + ((StrictOmegaCategory.Abelianization.faceGenerator_zero (h.object m) false he + (a.atom b) (a.atom_dimension b)).symm.trans + (StrictOmegaCategory.Abelianization.faceGenerator_of_dimension (h.object m) false n + (a.atom b) hx))) + · intro k x y hxy ihx ihy n hc + have hp : ∀ p (u v : (directedComplex m (h.squared m)).group p), + u ∈ (directedComplex m (h.squared m)).positive p → + v ∈ (directedComplex m (h.squared m)).positive p → + u + v = 0 → u = 0 ∧ v = 0 := fun _ u v hu hv he => positive_add_zero (h := h) u v hu hv he + obtain ⟨hx, hy⟩ := Cell.dimensionLE_comp_factors hp hxy hc + by_cases hkn : k < n + · have ht : ((h.object m).comp k x y hxy).table false n = + x.table false n + y.table false n := by + change Cell.pasteTable x y k false n = _ + simp only [Cell.pasteTable, Nat.not_lt.mpr hkn.le, Nat.ne_of_gt hkn, ite_false] + rw [ht, map_add, ihx n hx, ihy n hy] + exact (StrictOmegaCategory.Abelianization.generator_composite (h.object m) k hkn + ⟨x, hx⟩ ⟨y, hy⟩ hxy).symm + · have he := (h.object m).comp_of_dimensionLE (Nat.le_of_not_gt hkn) hx hxy + calc + _ = a.basisLift m n (y.table false n) := + congrArg (fun z : h.object m => a.basisLift m n (z.table false n)) he + _ = StrictOmegaCategory.Abelianization.generator (h.object m) n ⟨y, hy⟩ := ihy n hy + _ = _ := congrArg (StrictOmegaCategory.Abelianization.generator (h.object m) n) + (Subtype.ext he.symm) + +end + +end Thomason.Construction.SimplexAtomsInput + +end + +section + +/-! # The explicit normalized-chain comparison for orientals + +The counit of lambda–nu has the inverse given by the actual simplex atoms. +The comparison uses composition generation of the simplex atoms. +-/ + +namespace Thomason.Construction.SimplexAtomsInput + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex SimplexComplex + +noncomputable section + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +/-- Evaluate the additive classes of strict cells in their original chains. -/ +def toSimplexChains (_a : SimplexAtomsInput h) (m : ℕ) : + Hom (StrictOmegaCategory.Abelianization.complex (h.object m)) + (directedComplex m (h.squared m)) := + StrictOmegaCategory.Abelianization.evaluateHom (𝟙 (h.object m)) + +/-- Evaluation with explicit unbundled chain-group types. -/ +def toSimplexApp (m n : ℕ) : + StrictOmegaCategory.Abelianization.Chains (h.object m) n →+ Chains m n := + (a.toSimplexChains m).app n + +@[simp] theorem toSimplexChains_generator (m n : ℕ) + (x : StrictOmegaCategory.Abelianization.Bounded (h.object m) n) : + a.toSimplexApp m n + (StrictOmegaCategory.Abelianization.generator (h.object m) n x) = + x.val.table false n := + StrictOmegaCategory.Abelianization.evaluate_generator (𝟙 (h.object m)) n x + +/-- The strict-cell relations impose no additional normalized-chain relation. -/ +theorem toSimplexChains_basisLift (m n : ℕ) (z : Chains m n) : + a.toSimplexApp m n (a.basisLift m n z) = z := by + induction z using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp only [map_add, hx, hy] + | single b z => + rw [a.basisLift_single, map_zsmul, a.toSimplexChains_generator, a.atom_top] + simp + +/-- Every additive strict-cell class is recovered by the basis inverse. -/ +theorem basisLift_toSimplexChains (m n : ℕ) + (z : StrictOmegaCategory.Abelianization.Chains (h.object m) n) : + a.basisLift m n (a.toSimplexApp m n z) = z := by + have he : (a.basisLift m n).comp (a.toSimplexApp m n) = AddMonoidHom.id _ := by + apply StrictOmegaCategory.Abelianization.hom_ext + intro x + change a.basisLift m n (a.toSimplexApp m n + (StrictOmegaCategory.Abelianization.generator (h.object m) n x)) = _ + exact (congrArg (a.basisLift m n) (a.toSimplexChains_generator m n x)).trans + (a.basisLift_cell m x.val n x.property) + exact DFunLike.congr_fun he z + +/-- In particular evaluation is injective in every degree. -/ +theorem toSimplexChains_injective (m n : ℕ) : + Function.Injective (a.toSimplexApp m n) := by + intro x y hxy + exact (a.basisLift_toSimplexChains m n x).symm.trans + ((congrArg (a.basisLift m n) hxy).trans (a.basisLift_toSimplexChains m n y)) + +/-- The inverse sends positive basis combinations to positive strict-cell classes. -/ +theorem basisLift_positive (m n : ℕ) {z : Chains m n} (hz : z ∈ positive m n) : + a.basisLift m n z ∈ StrictOmegaCategory.Abelianization.positive (h.object m) n := by + classical + change (z.sum fun b k => k • + StrictOmegaCategory.Abelianization.generator (h.object m) n + ⟨a.atom b, a.atom_dimension b⟩) ∈ _ + apply (StrictOmegaCategory.Abelianization.positive (h.object m) n).sum_mem + intro b hb + change z b • StrictOmegaCategory.Abelianization.generator (h.object m) n + ⟨a.atom b, a.atom_dimension b⟩ ∈ _ + rw [← Int.toNat_of_nonneg (hz b), natCast_zsmul] + exact (StrictOmegaCategory.Abelianization.positive (h.object m) n).nsmul_mem + (StrictOmegaCategory.Abelianization.generator_positive (h.object m) n _) _ + +/-- Differential compatibility follows from injectivity of the evaluated +chains; the basis construction already gives both inverse equations. -/ +def fromSimplexChains (m : ℕ) : + Hom (directedComplex m (h.squared m)) + (StrictOmegaCategory.Abelianization.complex (h.object m)) where + app := a.basisLift m + differential n x := by + apply a.toSimplexChains_injective m n + exact (a.toSimplexChains_basisLift m n _).trans + (((a.toSimplexChains m).differential n (a.basisLift m (n+1) x)).trans + (congrArg ((directedComplex m (h.squared m)).differential n) + (a.toSimplexChains_basisLift m (n+1) x))).symm + augmentation x := by + have he := (a.toSimplexChains m).augmentation (a.basisLift m 0 x) + exact he.symm.trans (congrArg (directedComplex m (h.squared m)).augmentation + (a.toSimplexChains_basisLift m 0 x)) + positive n _ hz := a.basisLift_positive m n hz + +/-- The actual directed-complex isomorphism, with all positivity and +augmentation information retained. -/ +def abelianizationIso (m : ℕ) : + StrictOmegaCategory.Abelianization.complex (h.object m) ≅ + directedComplex m (h.squared m) where + hom := a.toSimplexChains m + inv := a.fromSimplexChains m + hom_inv_id := by + apply DirectedComplex.Hom.ext_app + intro n x + exact a.basisLift_toSimplexChains m n x + inv_hom_id := by + apply DirectedComplex.Hom.ext_app + intro n x + exact a.toSimplexChains_basisLift m n x + +end + +end Thomason.Construction.SimplexAtomsInput + +end + +section + +/-! # Globular face maps and the dimension test + +The actual free-globe representation makes every strict cell observable. +In particular, truncation is detected by the source and target equations +on these maps. No interval tensor or internal-hom conclusion is assumed. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Globe + +open CategoryTheory + +/-- The chosen m-face of the universal n-cell. For m ≥ n this is its +identity extension, so the same definition covers every pair of indices. -/ +def faceMap (a : Bool) (m n : ℕ) : category m ⟶ category n := + lift (category n) ((category n).face a m Cell.top) + ((category n).face_dimensionLE a m Cell.top) + +@[simp] theorem faceMap_top (a : Bool) (m n : ℕ) : + (faceMap a m n).toFun Cell.top = (category n).face a m Cell.top := rfl + +@[simp] theorem faceMap_self (a : Bool) (n : ℕ) : faceMap a n n = 𝟙 (category n) := by + apply hom_ext + exact face_of_dimension_le a n Cell.top le_rfl + +/-- The two iterated faces of a higher globe obey the strict globular law. -/ +theorem faceMap_comp (a b : Bool) (m k n : ℕ) (hmk : m < k) : + faceMap a m k ≫ faceMap b k n = faceMap a m n := by + apply hom_ext + change (faceMap b k n).toFun ((category k).face a m Cell.top) = _ + exact ((faceMap b k n).map_face a m Cell.top).trans + (((category n).globular a b m k Cell.top).trans (ite_eq_left hmk)) + +/-- Precomposing the universal cell map with a face gives its actual +source or target cell. -/ +theorem faceMap_lift (C : StrictOmegaCategory) {n : ℕ} (x : C) (hx : C.DimensionLE n x) + (a : Bool) (m : ℕ) : + faceMap a m n ≫ lift C x hx = + lift C (C.face a m x) (C.face_dimensionLE a m x) := by + apply hom_ext + exact (lift C x hx).map_face a m Cell.top + +/-- Truncation is exactly the pointwise n-boundary test on all universal +finite cells. This supplies the dimension interface for an internal hom. -/ +theorem truncated_iff_globe_test (C : StrictOmegaCategory) (n : ℕ) : + C.IsTruncated n ↔ ∀ (m : ℕ) (f : category m ⟶ C) (a : Bool), + f.toFun ((category m).face a n Cell.top) = f.toFun Cell.top := by + constructor + · intro h m f a + apply (f.map_face a n Cell.top).trans + cases a + · exact (h _).1 + · exact (h _).2 + · intro h x + obtain ⟨m, hm⟩ := C.finite_dimension x + let f := lift C x hm + have hs := h m f false + have ht := h m f true + exact ⟨(f.map_face false n Cell.top).symm.trans hs, + (f.map_face true n Cell.top).symm.trans ht⟩ + +end Thomason.Construction.StrictOmegaCategory.Globe + +end + +section + +/-! # Compatibility of strict globe faces with their chain cylinders + +The positive chain maps for globular faces recover the actual strict face +maps. Tensoring these maps on the right respects both endpoint inclusions +and the interval collapse, before any abstract Gray extension is supplied. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def faceMap (a : Bool) (m n : ℕ) : Hom (complex m) (complex n) := + cellMap m ((topCell n).face a m) + +theorem faceMap_top (a : Bool) (m n : ℕ) : + (faceMap a m n).realization.toFun (topCell m) = (topCell n).face a m := by + apply cellMap_top_of_bounded + exact (complex n).realization.face_dimensionLE a m (topCell n) + +/-- The square from the actual free globe to its chain realization +commutes on each source and target map. -/ +theorem fromGlobe_faceMap (a : Bool) (m n : ℕ) : + StrictOmegaCategory.Globe.faceMap a m n ≫ fromGlobe n = + fromGlobe m ≫ (faceMap a m n).realization := by + apply StrictOmegaCategory.Globe.hom_ext + change (fromGlobe n).toFun ((StrictOmegaCategory.Globe.category n).face a m + StrictOmegaCategory.Globe.Cell.top) = + (faceMap a m n).realization.toFun (topCell m) + exact ((fromGlobe n).map_face a m StrictOmegaCategory.Globe.Cell.top).trans + (faceMap_top a m n).symm + +/-- The right-cylinder face maps preserve the two strict endpoint maps. -/ +theorem faceMap_right_endpoint (a e : Bool) (m n : ℕ) : + StrictOmegaCategory.Hom.comp (faceMap a m n).realization + (RightCylinder.endpoint (complex n) e).realization = + StrictOmegaCategory.Hom.comp (RightCylinder.endpoint (complex m) e).realization + (RightCylinder.map (faceMap a m n)).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b k + exact (RightCylinder.map_endpoint (faceMap a m n) e k (x.table b k)).symm + +/-- Interval collapse also commutes with the concrete chain face map. -/ +theorem faceMap_right_projection (a : Bool) (m n : ℕ) : + StrictOmegaCategory.Hom.comp (RightCylinder.map (faceMap a m n)).realization + (RightCylinder.projection (complex n)).realization = + StrictOmegaCategory.Hom.comp (RightCylinder.projection (complex m)).realization + (faceMap a m n).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_projection_map (faceMap a m n) x + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeUniversal.lean b/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeUniversal.lean new file mode 100644 index 0000000000000000000000000000000000000000..62bbcb1f30dd00669b301ef99b645d70d9674d1e --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/DirectedGlobeUniversal.lean @@ -0,0 +1,968 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Strict.StrictCompositeListReplacement +import Mathlib.Algebra.Order.BigOperators.Group.List +import Mathlib.LinearAlgebra.Finsupp.LinearCombination +import Mathlib.Tactic + +namespace OAI + +section + +/-! # An upper table determines its finite atom multiset + +At the largest degree a top coefficient can only come from that exact +basis atom. Removing one common occurrence and repeating proves uniqueness +of the complete finite multiset. This uses only the triangular top tables, +not the free-gluing theorem under construction. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem atom_coefficient_zero_of_ne (a b : B.AtomIndex) (hb : b.1 ≤ a.1) + (hne : b ≠ a) : B.coordinates a.1 ((B.atomCell b).table false a.1) a.2 = 0 := by + classical + rcases a with ⟨p,a⟩ + rcases b with ⟨q,b⟩ + by_cases hpq : p = q + · subst q + have hab : a ≠ b := by + intro h + subst b + exact hne rfl + exact (congrArg (fun f => f a) (B.atom_top p b false)).trans + (Finsupp.single_eq_of_ne hab) + · have hqp : q < p := by change q ≤ p at hb; omega + change B.coordinates p ((B.atom q b).table false p) a = 0 + rw [B.atom_above q b p hqp false, map_zero, Finsupp.zero_apply] + +theorem atomSum_coefficient_pos (as : List B.AtomIndex) (a : B.AtomIndex) (ha : a ∈ as) : + 0 < B.coordinates a.1 + ((Cell.PositiveTable.ofCells (as.map B.atomCell)).table false a.1) a.2 := by + classical + have hp := (List.perm_cons_erase ha).map (fun b => (B.atomCell b).table false a.1) + have he : (Cell.PositiveTable.ofCells (as.map B.atomCell)).table false a.1 = + (B.atomCell a).table false a.1 + + (Cell.PositiveTable.ofCells ((as.erase a).map B.atomCell)).table false a.1 := by + simpa only [Cell.PositiveTable.ofCells_table, List.map_map, Function.comp_def, + List.map_cons, List.sum_cons] + using hp.sum_eq + have hh := congrArg (fun x => B.coordinates a.1 x a.2) he + have hpos := B.coordinate_nonnegative a.1 _ + ((Cell.PositiveTable.ofCells ((as.erase a).map B.atomCell)).positive false a.1) a.2 + simp only [map_add, Finsupp.add_apply, atomCell, B.atom_top, Finsupp.single_eq_same] at hh + omega + +theorem atom_mem_of_coefficient_ne_zero (as : List B.AtomIndex) (a : B.AtomIndex) + (hd : ∀ b ∈ as, b.1 ≤ a.1) + (hc : B.coordinates a.1 + ((Cell.PositiveTable.ofCells (as.map B.atomCell)).table false a.1) a.2 ≠ 0) : a ∈ as := by + by_contra hn + apply hc + apply B.sumCells_coordinate_zero + intro X hX + obtain ⟨b, hb, rfl⟩ := List.mem_map.mp hX + exact B.atom_coefficient_zero_of_ne a b (hd b hb) (fun he => hn (he ▸ hb)) + +theorem common_atom_of_upper_sum (r : ℕ) (as bs : List B.AtomIndex) + (hne : as ++ bs ≠ []) (hd : ∀ a ∈ as ++ bs, r < a.1) + (he : ∀ n, r < n → ∀ side, + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n = + (Cell.PositiveTable.ofCells (bs.map B.atomCell)).table side n) : + ∃ a, a ∈ as ∧ a ∈ bs := by + let ds := (as ++ bs).map (fun a => a.1) + have hds : ds ≠ [] := fun h => hne (List.map_eq_nil_iff.mp h) + obtain ⟨a, ha, ham⟩ := List.mem_map.mp (List.max_mem hds) + have hmax : ∀ b ∈ as ++ bs, b.1 ≤ a.1 := by + intro b hb + have hm := List.le_max_of_mem (List.mem_map.mpr ⟨b, hb, rfl⟩ : b.1 ∈ ds) + exact hm.trans_eq ham.symm + have transfer (xs ys : List B.AtomIndex) (ha : a ∈ xs) + (hys : ∀ b ∈ ys, b.1 ≤ a.1) + (heq : (Cell.PositiveTable.ofCells (xs.map B.atomCell)).table false a.1 = + (Cell.PositiveTable.ofCells (ys.map B.atomCell)).table false a.1) : a ∈ ys := by + apply B.atom_mem_of_coefficient_ne_zero ys a hys + have hh := B.atomSum_coefficient_pos xs a ha + rw [heq] at hh + exact ne_of_gt hh + rcases List.mem_append.mp ha with has | hbs + · exact ⟨a, has, transfer as bs has + (fun b hb => hmax b (List.mem_append_right as hb)) + (he a.1 (hd a (List.mem_append_left bs has)) false)⟩ + · exact ⟨a, transfer bs as hbs + (fun b hb => hmax b (List.mem_append_left bs hb)) + (he a.1 (hd a (List.mem_append_right as hbs)) false).symm, hbs⟩ + +theorem upper_sum_perm (r : ℕ) (as bs : List B.AtomIndex) + (hd : ∀ a ∈ as ++ bs, r < a.1) + (he : ∀ n, r < n → ∀ side, + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n = + (Cell.PositiveTable.ofCells (bs.map B.atomCell)).table side n) : as.Perm bs := by + classical + suffices aux : ∀ k (as bs : List B.AtomIndex), as.length = k → + (∀ a ∈ as ++ bs, r < a.1) → + (∀ n, r < n → ∀ side, + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n = + (Cell.PositiveTable.ofCells (bs.map B.atomCell)).table side n) → as.Perm bs by + exact aux as.length as bs rfl hd he + intro k + induction k using Nat.strong_induction_on with + | h k ih => + intro as bs hlen hd he + by_cases hne : as ++ bs = [] + · obtain ⟨rfl, rfl⟩ := List.append_eq_nil_iff.mp hne + exact List.Perm.refl [] + obtain ⟨a, ha, hb⟩ := B.common_atom_of_upper_sum r as bs hne hd he + have hsmall : (as.erase a).length < k := by + have hh : (as.erase a).length + 1 = as.length := by + simpa only [List.length_cons] using (List.perm_cons_erase ha).length_eq.symm + omega + have ht : ∀ n, r < n → ∀ side, + (Cell.PositiveTable.ofCells ((as.erase a).map B.atomCell)).table side n = + (Cell.PositiveTable.ofCells ((bs.erase a).map B.atomCell)).table side n := by + intro n hn side + have hp := ((List.perm_cons_erase ha).map (fun c => (B.atomCell c).table side n)).sum_eq + have hq := ((List.perm_cons_erase hb).map (fun c => (B.atomCell c).table side n)).sum_eq + have hh := he n hn side + simp only [Cell.PositiveTable.ofCells_table, List.map_map, Function.comp_def] at hh ⊢ + simp only [List.map_cons, List.sum_cons] at hp hq + rw [hp, hq] at hh + exact add_left_cancel hh + have hd' : ∀ c ∈ as.erase a ++ bs.erase a, r < c.1 := by + intro c hc + rcases List.mem_append.mp hc with hc | hc + · exact hd c (List.mem_append_left bs (List.mem_of_mem_erase hc)) + · exact hd c (List.mem_append_right as (List.mem_of_mem_erase hc)) + have hi := ih (as.erase a).length hsmall (as.erase a) (bs.erase a) rfl hd' ht + exact (List.perm_cons_erase ha).trans ((hi.cons a).trans (List.perm_cons_erase hb).symm) + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! +# Tensoring a directed complex on the right with the interval + +In degree n, the two endpoint copies of K_n are accompanied (for n > 0) +by K_{n-1} tensored with the oriented interval edge. The differential has +the sign (-1)^(n-1) required for a right tensor factor. This is a concrete +specialization of the chain tensor, not an assumed cylinder functor. +-/ + +namespace Thomason.Construction.DirectedComplex + +universe u + +namespace RightCylinder + +variable (K : DirectedComplex.{u}) + +abbrev group : ℕ → AddCommGrpCat.{u} + | 0 => AddCommGrpCat.of (K.group 0 × K.group 0) + | n + 1 => AddCommGrpCat.of (K.group (n + 1) × K.group (n + 1) × K.group n) + +def differential : (n : ℕ) → group K (n + 1) →+ group K n + | 0 => + { toFun := fun x => (K.differential 0 x.1 - x.2.2, K.differential 0 x.2.1 + x.2.2) + map_zero' := by ext <;> simp + map_add' := by intro x y; ext <;> simp <;> abel } + | n + 1 => + { toFun := fun x => + (K.differential (n + 1) x.1 - ((-1 : ℤ) ^ (n + 1)) • x.2.2, + K.differential (n + 1) x.2.1 + ((-1 : ℤ) ^ (n + 1)) • x.2.2, + K.differential n x.2.2) + map_zero' := by ext <;> simp + map_add' := by intro x y; ext <;> simp <;> abel } + +theorem differential_squared (n : ℕ) (x : group K (n + 2)) : + differential K n (differential K (n + 1) x) = 0 := by + cases n with + | zero => + ext <;> simp [differential, K.differential_squared] + | succ n => + ext <;> simp [differential, K.differential_squared, pow_succ] + +def augmentation : group K 0 →+ ℤ where + toFun x := K.augmentation x.1 + K.augmentation x.2 + map_zero' := by simp + map_add' := by intros; simp; abel + +theorem augmentation_differential (x : group K 1) : + augmentation K (differential K 0 x) = 0 := by + simp [augmentation, differential, K.augmentation_differential] + +def positive : (n : ℕ) → AddSubmonoid (group K n) + | 0 => (K.positive 0).prod (K.positive 0) + | n + 1 => (K.positive (n + 1)).prod ((K.positive (n + 1)).prod (K.positive n)) + +end RightCylinder + +/-- The directed chain tensor K ⊗ M[1], with the interval on the right. -/ +abbrev rightCylinder (K : DirectedComplex.{u}) : DirectedComplex.{u} where + group := RightCylinder.group K + differential := RightCylinder.differential K + differential_squared := RightCylinder.differential_squared K + augmentation := RightCylinder.augmentation K + augmentation_differential := RightCylinder.augmentation_differential K + positive := RightCylinder.positive K + +namespace RightCylinder + +variable (K : DirectedComplex.{u}) + +def endpointMap (a : Bool) : (n : ℕ) → K.group n →+ (rightCylinder K).group n + | 0 => + { toFun := fun x => if a then (0, x) else (x, 0) + map_zero' := by cases a <;> simp + map_add' := by intros; cases a <;> simp } + | _ + 1 => + { toFun := fun x => if a then (0, x, 0) else (x, 0, 0) + map_zero' := by cases a <;> simp + map_add' := by intros; cases a <;> simp } + +/-- Both inclusions of K into its right chain cylinder are positive chain maps. -/ +def endpoint (a : Bool) : Hom K (rightCylinder K) where + app := endpointMap K a + differential n x := by + cases n <;> cases a <;> ext <;> simp [endpointMap, rightCylinder, differential] + augmentation x := by cases a <;> simp [endpointMap, rightCylinder, augmentation] + positive n x hx := by + cases n with + | zero => + cases a with + | false => exact ⟨hx, (K.positive 0).zero_mem⟩ + | true => exact ⟨(K.positive 0).zero_mem, hx⟩ + | succ n => + cases a with + | false => exact ⟨hx, (K.positive _).zero_mem, (K.positive _).zero_mem⟩ + | true => exact ⟨(K.positive _).zero_mem, hx, (K.positive _).zero_mem⟩ + +def projectionMap : (n : ℕ) → (rightCylinder K).group n →+ K.group n + | 0 => + { toFun := fun x => x.1 + x.2 + map_zero' := by simp + map_add' := by intros; simp; abel } + | _ + 1 => + { toFun := fun x => x.1 + x.2.1 + map_zero' := by simp + map_add' := by intros; simp; abel } + +/-- Collapsing the right interval is a positive augmented chain map. -/ +def projection : Hom (rightCylinder K) K where + app := projectionMap K + differential n x := by + cases n <;> simp [projectionMap, rightCylinder, differential] + augmentation x := by simp [projectionMap, rightCylinder, augmentation] + positive n x hx := by + cases n with + | zero => exact (K.positive _).add_mem hx.1 hx.2 + | succ n => exact (K.positive _).add_mem hx.1 hx.2.1 + +@[simp] +theorem projection_endpoint (a : Bool) (n : ℕ) (x : K.group n) : + (projection K).app n ((endpoint K a).app n x) = x := by + cases n <;> cases a <;> simp [projection, projectionMap, endpoint, endpointMap] + +/-- The endpoint–projection identity survives strict realization. -/ +theorem realization_projection_endpoint (a : Bool) (x : K.realization) : + (projection K).realization ((endpoint K a).realization x) = x := by + apply Cell.ext + funext b n + exact projection_endpoint K a n (x.table b n) + +variable {K} {L : DirectedComplex.{u}} + +def mapMap (f : Hom K L) : (n : ℕ) → (rightCylinder K).group n →+ + (rightCylinder L).group n + | 0 => + { toFun := fun x => (f.app 0 x.1, f.app 0 x.2) + map_zero' := by ext <;> simp + map_add' := by intros; ext <;> simp } + | n + 1 => + { toFun := fun x => (f.app (n + 1) x.1, f.app (n + 1) x.2.1, f.app n x.2.2) + map_zero' := by ext <;> simp + map_add' := by intros; ext <;> simp } + +/-- Tensor a positive augmented chain map with the identity of the interval. -/ +def map (f : Hom K L) : Hom (rightCylinder K) (rightCylinder L) where + app := mapMap f + differential n x := by + cases n <;> ext <;> simp [mapMap, differential, f.differential] + augmentation x := by simp [mapMap, augmentation, f.augmentation] + positive n x hx := by + cases n with + | zero => exact ⟨f.positive 0 hx.1, f.positive 0 hx.2⟩ + | succ n => exact ⟨f.positive _ hx.1, f.positive _ hx.2.1, f.positive _ hx.2.2⟩ + +theorem map_endpoint (f : Hom K L) (a : Bool) (n : ℕ) (x : K.group n) : + (map f).app n ((endpoint K a).app n x) = (endpoint L a).app n (f.app n x) := by + cases n <;> cases a <;> simp [map, mapMap, endpoint, endpointMap] + +theorem projection_map (f : Hom K L) (n : ℕ) (x : (rightCylinder K).group n) : + (projection L).app n ((map f).app n x) = f.app n ((projection K).app n x) := by + cases n <;> simp [map, mapMap, projection, projectionMap] + +/-- Naturality of interval collapse holds for all positive chain maps, +including maps which send basis elements to zero or sums. -/ +theorem realization_projection_map (f : Hom K L) (x : (rightCylinder K).realization) : + (projection L).realization ((map f).realization x) = + f.realization ((projection K).realization x) := by + apply Cell.ext + funext a n + exact projection_map f n (x.table a n) + +end RightCylinder +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # The directed contraction of the concrete right chain cylinder + +Minimum on the two oriented interval factors gives a positive chain map. +Its two outer endpoints are the zero-endpoint collapse and the identity; +the inner zero endpoint is fixed. All equalities hold before strict +realization, including the signs in every positive degree. +-/ + +namespace Thomason.Construction.DirectedComplex.RightCylinder + +universe u + +variable (K : DirectedComplex.{u}) + +/-- The chain map induced by minimum on the two right interval factors. -/ +def minimumMap : (n : ℕ) → + (rightCylinder (rightCylinder K)).group n →+ (rightCylinder K).group n + | 0 => { + toFun := fun x => (x.1.1 + x.1.2 + x.2.1, x.2.2) + map_zero' := by ext <;> simp + map_add' := by intros; ext <;> simp; abel } + | 1 => { + toFun := fun x => (x.1.1 + x.1.2.1 + x.2.1.1, x.2.1.2.1, + x.2.1.2.2 + x.2.2.2) + map_zero' := by ext <;> simp + map_add' := by intros; ext <;> simp <;> abel } + | n+2 => { + toFun := fun x => (x.1.1 + x.1.2.1 + x.2.1.1, x.2.1.2.1, + x.2.1.2.2 + x.2.2.2.1) + map_zero' := by ext <;> simp + map_add' := by intros; ext <;> simp <;> abel } + +theorem minimumMap_differential (n : ℕ) + (x : (rightCylinder (rightCylinder K)).group (n+1)) : + minimumMap K n ((rightCylinder (rightCylinder K)).differential n x) = + (rightCylinder K).differential n (minimumMap K (n+1) x) := by + cases n with + | zero => ext <;> simp [minimumMap, rightCylinder, differential] <;> abel + | succ n => + cases n with + | zero => ext <;> simp [minimumMap, rightCylinder, differential] <;> abel + | succ n => ext <;> simp [minimumMap, rightCylinder, differential, pow_succ] <;> abel + +/-- A positive augmented chain contraction, requiring no abstract Gray input. -/ +def minimum : Hom (rightCylinder (rightCylinder K)) (rightCylinder K) where + app := minimumMap K + differential := minimumMap_differential K + augmentation x := by + simp [minimumMap, rightCylinder, augmentation] + abel + positive n x hx := by + cases n with + | zero => exact ⟨(K.positive 0).add_mem + ((K.positive 0).add_mem hx.1.1 hx.1.2) hx.2.1, hx.2.2⟩ + | succ n => + cases n with + | zero => exact ⟨(K.positive 1).add_mem + ((K.positive 1).add_mem hx.1.1 hx.1.2.1) hx.2.1.1, + hx.2.1.2.1, (K.positive 0).add_mem hx.2.1.2.2 hx.2.2.2⟩ + | succ n => exact ⟨(K.positive (n+2)).add_mem + ((K.positive (n+2)).add_mem hx.1.1 hx.1.2.1) hx.2.1.1, + hx.2.1.2.1, (K.positive (n+1)).add_mem hx.2.1.2.2 hx.2.2.2.1⟩ + +@[simp] +theorem minimum_outer_one (n : ℕ) (x : (rightCylinder K).group n) : + (minimum K).app n ((endpoint (rightCylinder K) true).app n x) = x := by + cases n with + | zero => ext <;> simp [minimum, minimumMap, endpoint, endpointMap] + | succ n => cases n <;> ext <;> simp [minimum, minimumMap, endpoint, endpointMap] + +@[simp] +theorem minimum_outer_zero (n : ℕ) (x : (rightCylinder K).group n) : + (minimum K).app n ((endpoint (rightCylinder K) false).app n x) = + (endpoint K false).app n ((projection K).app n x) := by + cases n with + | zero => ext <;> simp [minimum, minimumMap, endpoint, endpointMap, projection, projectionMap] + | succ n => cases n <;> ext <;> + simp [minimum, minimumMap, endpoint, endpointMap, projection, projectionMap] + +@[simp] +theorem minimum_projection (n : ℕ) + (x : (rightCylinder (rightCylinder K)).group n) : + (projection K).app n ((minimum K).app n x) = + (projection K).app n ((projection (rightCylinder K)).app n x) := by + cases n with + | zero => simp [minimum, minimumMap, projection, projectionMap]; abel + | succ n => cases n <;> simp [minimum, minimumMap, projection, projectionMap] <;> abel + +@[simp] +theorem minimum_fixed_zero (n : ℕ) (x : (rightCylinder K).group n) : + (minimum K).app n ((map (endpoint K false)).app n x) = + (endpoint K false).app n ((projection K).app n x) := by + cases n with + | zero => ext <;> simp [minimum, minimumMap, map, mapMap, endpoint, endpointMap, + projection, projectionMap] + | succ n => cases n <;> ext <;> + simp [minimum, minimumMap, map, mapMap, endpoint, endpointMap, projection, projectionMap] + +variable {K} {L : DirectedComplex.{u}} + +theorem minimum_naturality (f : Hom K L) (n : ℕ) + (x : (rightCylinder (rightCylinder K)).group n) : + (map f).app n ((minimum K).app n x) = + (minimum L).app n ((map (map f)).app n x) := by + cases n with + | zero => ext <;> simp [minimum, minimumMap, map, mapMap] + | succ n => cases n <;> ext <;> simp [minimum, minimumMap, map, mapMap] + +/-- Strict realization keeps the contraction's terminal endpoint literally. -/ +theorem realization_minimum_outer_one (x : (rightCylinder K).realization) : + (minimum K).realization ((endpoint (rightCylinder K) true).realization x) = x := by + apply Cell.ext + funext a n + exact minimum_outer_one K n (x.table a n) + +/-- Its initial endpoint is the specified zero section after projection. -/ +theorem realization_minimum_outer_zero (x : (rightCylinder K).realization) : + (minimum K).realization ((endpoint (rightCylinder K) false).realization x) = + (endpoint K false).realization ((projection K).realization x) := by + apply Cell.ext + funext a n + exact minimum_outer_zero K n (x.table a n) + +/-- Collapse commutes with the actual directed contraction. -/ +theorem realization_minimum_projection + (x : (rightCylinder (rightCylinder K)).realization) : + (projection K).realization ((minimum K).realization x) = + (projection K).realization ((projection (rightCylinder K)).realization x) := by + apply Cell.ext + funext a n + exact minimum_projection K n (x.table a n) + +end Thomason.Construction.DirectedComplex.RightCylinder + +end + +section + +/-! # Strict globes for the right interval construction + +The free n-globe has its top cell and two boundary cells in every smaller +dimension. Composition is forced by units. This supplies the finite +strict parameters on which the right interval tensor must be constructed. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Globe + +inductive Cell (n : ℕ) where + | top + | boundary (a : Bool) (k : Fin n) + deriving DecidableEq + +variable {n : ℕ} + +def dimension : Cell n → ℕ + | .top => n + | .boundary _ k => k.val + +theorem dimension_le (x : Cell n) : dimension x ≤ n := by + cases x with + | top => exact le_rfl + | boundary a k => exact k.isLt.le + +def face (a : Bool) (m : ℕ) (x : Cell n) : Cell n := + if h : dimension x ≤ m then x + else .boundary a ⟨m, lt_of_lt_of_le (Nat.lt_of_not_ge h) (dimension_le x)⟩ + +@[simp] theorem face_of_dimension_le (a : Bool) (m : ℕ) (x : Cell n) + (h : dimension x ≤ m) : face a m x = x := dite_eq_left h + +@[simp] theorem dimension_face (a : Bool) (m : ℕ) (x : Cell n) : + dimension (face a m x) = min m (dimension x) := by + unfold face + split_ifs with h + · exact (min_eq_right h).symm + · exact (min_eq_left (Nat.le_of_lt (Nat.lt_of_not_ge h))).symm + +theorem globular (a b : Bool) (m k : ℕ) (x : Cell n) : + face a m (face b k x) = if m < k then face a m x else face b k x := by + by_cases hx : dimension x ≤ k + · rw [face_of_dimension_le b k x hx] + split_ifs with hmk + · rfl + · exact face_of_dimension_le a m x (hx.trans (Nat.le_of_not_gt hmk)) + · have hk : k < n := lt_of_lt_of_le (Nat.lt_of_not_ge hx) (dimension_le x) + have hb : face b k x = Cell.boundary b ⟨k, hk⟩ := dite_eq_right hx + rw [hb] + by_cases hmk : m < k + · rw [ite_eq_left hmk] + have hm : ¬ dimension x ≤ m := by omega + have ha : face a m x = Cell.boundary a ⟨m, lt_trans hmk hk⟩ := dite_eq_right hm + have hab : face a m (Cell.boundary b ⟨k, hk⟩) = + Cell.boundary a ⟨m, lt_trans hmk hk⟩ := dite_eq_right (Nat.not_le.mpr hmk) + exact hab.trans ha.symm + · rw [ite_eq_right hmk] + exact face_of_dimension_le a m _ (Nat.le_of_not_gt hmk) + +/-- Matching faces force at least one factor to be a unit at that level. -/ +theorem matching_unit {m : ℕ} {x y : Cell n} + (h : face true m x = face false m y) : dimension x ≤ m ∨ dimension y ≤ m := by + by_contra hn + have hx : ¬ dimension x ≤ m := fun hx => hn (Or.inl hx) + have hy : ¬ dimension y ≤ m := fun hy => hn (Or.inr hy) + unfold face at h + rw [dite_eq_right hx, dite_eq_right hy] at h + cases h + +def comp (m : ℕ) (x y : Cell n) : Cell n := if dimension x ≤ m then y else x + +theorem source_comp (m : ℕ) (x y : Cell n) + (h : face true m x = face false m y) : + face false m (comp m x y) = face false m x := by + by_cases hx : dimension x ≤ m + · simpa only [comp, ite_eq_left hx, face_of_dimension_le _ _ _ hx] using h.symm + · simp only [comp, ite_eq_right hx] + +theorem target_comp (m : ℕ) (x y : Cell n) + (h : face true m x = face false m y) : + face true m (comp m x y) = face true m y := by + by_cases hx : dimension x ≤ m + · simp only [comp, ite_eq_left hx] + · have hy := (matching_unit h).resolve_left hx + simpa only [comp, ite_eq_right hx, face_of_dimension_le _ _ _ hy] using h + +theorem face_comp (a : Bool) (m k : ℕ) (hkm : k < m) (x y : Cell n) : + face a m (comp k x y) = comp k (face a m x) (face a m y) := by + by_cases hx : dimension x ≤ k + · have hx' : dimension (face a m x) ≤ k := by rw [dimension_face]; omega + simp only [comp, ite_eq_left hx, ite_eq_left hx'] + · have hx' : ¬ dimension (face a m x) ≤ k := by rw [dimension_face]; omega + simp only [comp, ite_eq_right hx, ite_eq_right hx'] + +theorem left_unit (m : ℕ) (x : Cell n) : comp m (face false m x) x = x := by + have h : dimension (face false m x) ≤ m := by rw [dimension_face]; exact min_le_left _ _ + exact ite_eq_left h + +theorem right_unit (m : ℕ) (x : Cell n) : comp m x (face true m x) = x := by + unfold comp + split_ifs with h + · exact face_of_dimension_le true m x h + · rfl + +theorem assoc (m : ℕ) (x y z : Cell n) : + comp m (comp m x y) z = comp m x (comp m y z) := by + by_cases hx : dimension x ≤ m <;> simp only [comp, hx, ite_true, ite_false] + +theorem matching_small_iff {m k : ℕ} (hmk : m < k) {x y : Cell n} + (h : face true k x = face false k y) : + dimension x ≤ m ↔ dimension y ≤ m := by + have hd := congrArg dimension h + rw [dimension_face, dimension_face] at hd + omega + +theorem interchange (m k : ℕ) (hmk : m < k) (a b c d : Cell n) + (hac : face true k a = face false k c) : + comp k (comp m a b) (comp m c d) = comp m (comp k a c) (comp k b d) := by + have he := matching_small_iff hmk hac + by_cases ha : dimension a ≤ m + · have hc := he.mp ha + have ha' : dimension a ≤ k := ha.trans hmk.le + simp only [comp, ite_eq_left ha, ite_eq_left hc, ite_eq_left ha'] + · have hc : ¬ dimension c ≤ m := fun hc => ha (he.mpr hc) + have ht : ¬ dimension (comp k a c) ≤ m := by + unfold comp + split_ifs <;> assumption + rw [show comp m a b = a from ite_eq_right ha, + show comp m c d = c from ite_eq_right hc] + exact (ite_eq_right ht).symm + +/-- The strict n-globe, with its actual finite boundary cells. -/ +def category (n : ℕ) : StrictOmegaCategory where + Cell := Cell n + face := face + comp m x y _ := comp m x y + globular := globular + source_comp := source_comp + target_comp := target_comp + face_comp a m k h x y _ _ := face_comp a m k h x y + left_unit m x _ := left_unit m x + right_unit m x _ := right_unit m x + assoc m x y z _ _ _ _ := assoc m x y z + interchange m k h a b c d _ _ hac _ _ _ := interchange m k h a b c d hac + finite_dimension x := ⟨dimension x, face_of_dimension_le _ _ _ le_rfl, + face_of_dimension_le _ _ _ le_rfl⟩ + +theorem category_truncated (n : ℕ) : (category n).IsTruncated n := by + intro x + exact ⟨face_of_dimension_le false n x (dimension_le x), + face_of_dimension_le true n x (dimension_le x)⟩ + +end Thomason.Construction.StrictOmegaCategory.Globe + +end + +section + +/-! # Universal cells of the strict globes + +Strict functors from the n-globe are exactly cells of dimension at most n. +The bijection is given by evaluation at the actual top cell, and is natural +under every strict functor. These are the generating parameters for the +right Gray interval construction and its internal hom. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Globe + +open CategoryTheory + +variable (C : StrictOmegaCategory) {n : ℕ} + +def evaluate (x : C) : Cell n → C + | .top => x + | .boundary a k => C.face a k x + +@[simp] theorem evaluate_top (x : C) : evaluate C (n := n) x .top = x := rfl + +@[simp] theorem evaluate_boundary (x : C) (a : Bool) (k : Fin n) : + evaluate C x (.boundary a k) = C.face a k x := rfl + +theorem evaluate_dimension (x : C) (hx : C.DimensionLE n x) (s : Cell n) : + C.DimensionLE (dimension s) (evaluate C x s) := by + cases s with + | top => exact hx + | boundary a k => exact C.face_dimensionLE a k x + +theorem evaluate_face (x : C) (hx : C.DimensionLE n x) + (a : Bool) (m : ℕ) (s : Cell n) : + evaluate C x (face a m s) = C.face a m (evaluate C x s) := by + by_cases hs : dimension s ≤ m + · rw [face_of_dimension_le a m s hs] + have hm := C.dimensionLE_mono hs (evaluate_dimension C x hx s) + cases a + · exact hm.1.symm + · exact hm.2.symm + · have hm : m < dimension s := Nat.lt_of_not_ge hs + have hmn : m < n := lt_of_lt_of_le hm (dimension_le s) + rw [show face a m s = Cell.boundary a ⟨m, hmn⟩ from dite_eq_right hs] + cases s with + | top => rfl + | boundary b k => + change C.face a m x = C.face a m (C.face b k x) + exact (C.globular a b m k x).trans (ite_eq_left hm) |>.symm + +private theorem comp_of_left_unit (m : ℕ) (s t : C) + (h : C.target m s = C.source m t) (hs : s = C.source m t) : + C.comp m s t h = t := by + subst s + exact C.left_unit m t h + +private theorem comp_of_right_unit (m : ℕ) (s t : C) + (h : C.target m s = C.source m t) (ht : t = C.target m s) : + C.comp m s t h = s := by + subst t + exact C.right_unit m s h + +/-- The strict functor determined by a chosen n-dimensional cell. -/ +def lift (x : C) (hx : C.DimensionLE n x) : category n ⟶ C where + toFun := evaluate C x + map_face := evaluate_face C x hx + map_comp m s t h h' := by + change evaluate C x (comp m s t) = + C.comp m (evaluate C x s) (evaluate C x t) h' + have he : C.target m (evaluate C x s) = C.source m (evaluate C x t) := h' + by_cases hs : dimension s ≤ m + · have hd := C.dimensionLE_mono hs (evaluate_dimension C x hx s) + have heq : evaluate C x s = C.source m (evaluate C x t) := hd.2.symm.trans he + rw [show Globe.comp m s t = t from ite_eq_left hs] + exact (comp_of_left_unit C m _ _ h' heq).symm + · have ht := (matching_unit h).resolve_left hs + have hd := C.dimensionLE_mono ht (evaluate_dimension C x hx t) + have heq : evaluate C x t = C.target m (evaluate C x s) := hd.1.symm.trans he.symm + rw [show Globe.comp m s t = s from ite_eq_right hs] + exact (comp_of_right_unit C m _ _ h' heq).symm + +@[simp] theorem lift_top (x : C) (hx : C.DimensionLE n x) : (lift C x hx).toFun .top = x := rfl + +/-- Evaluation at the top cell determines a strict functor on the whole globe. -/ +theorem hom_ext (f g : category n ⟶ C) + (h : f.toFun .top = g.toFun .top) : f = g := by + apply Hom.ext + funext s + cases s with + | top => exact h + | boundary a k => + have hs : face a k (Cell.top : Cell n) = Cell.boundary a k := by + exact dite_eq_right (Nat.not_le.mpr k.isLt) + change f.toFun (Cell.boundary a k) = g.toFun (Cell.boundary a k) + calc + f.toFun (Cell.boundary a k) = C.face a k (f.toFun Cell.top) := + (congrArg f.toFun hs).symm.trans (f.map_face a k Cell.top) + _ = C.face a k (g.toFun Cell.top) := congrArg (C.face a k) h + _ = g.toFun (Cell.boundary a k) := + (g.map_face a k Cell.top).symm.trans (congrArg g.toFun hs) + +/-- The globe represents bounded cells in the actual strict category. -/ +def homEquiv (n : ℕ) : (category n ⟶ C) ≃ {x : C // C.DimensionLE n x} where + toFun f := ⟨f.toFun .top, f.dimensionLE (category_truncated n Cell.top)⟩ + invFun x := lift C x.val x.property + left_inv f := hom_ext C _ _ rfl + right_inv x := by apply Subtype.ext; rfl + +@[simp] theorem homEquiv_naturality {D : StrictOmegaCategory} (F : C ⟶ D) + (n : ℕ) (f : category n ⟶ C) : + ((homEquiv D n) (f ≫ F)).val = F.toFun ((homEquiv C n f).val) := rfl + +end Thomason.Construction.StrictOmegaCategory.Globe + +end + +section + +/-! # The augmented directed complex of a globe + +There are two positive basis elements below the top dimension and one at +the top. Every basis boundary is target minus source. This is the finite +chain parameter used for the right interval tensor on the free globes. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory + +abbrev Basis (n k : ℕ) := {a : Bool // k < n ∨ (k = n ∧ a = false)} +abbrev Chains (n k : ℕ) := Basis n k →₀ ℤ + +noncomputable def weight (n k : ℕ) : Chains n k →ₗ[ℤ] ℤ := + Finsupp.linearCombination ℤ (fun _ => 1) + +@[simp] theorem weight_single (n k : ℕ) (s : Basis n k) (z : ℤ) : + weight n k (Finsupp.single s z) = z := by simp [weight] + +noncomputable def boundary (n k : ℕ) : Chains n k := + if hk : k < n then + Finsupp.single ⟨true, Or.inl hk⟩ 1 - Finsupp.single ⟨false, Or.inl hk⟩ 1 + else 0 + +@[simp] theorem weight_boundary (n k : ℕ) : weight n k (boundary n k) = 0 := by + classical + unfold boundary + split_ifs <;> simp + +noncomputable def differential (n k : ℕ) : Chains n (k+1) →ₗ[ℤ] Chains n k := + Finsupp.linearCombination ℤ (fun _ => boundary n k) + +@[simp] theorem differential_single (n k : ℕ) (s : Basis n (k+1)) (z : ℤ) : + differential n k (Finsupp.single s z) = z • boundary n k := by + simp [differential] + +theorem differential_eq_weight (n k : ℕ) (x : Chains n (k+1)) : + differential n k x = weight n (k+1) x • boundary n k := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy, add_smul] + | single s z => simp + +@[simp] theorem weight_differential (n k : ℕ) (x : Chains n (k+1)) : + weight n k (differential n k x) = 0 := by + rw [differential_eq_weight] + simp + +theorem differential_squared (n k : ℕ) (x : Chains n (k+2)) : + differential n k (differential n (k+1) x) = 0 := by + rw [differential_eq_weight] + simp + +def positive (n k : ℕ) : AddSubmonoid (Chains n k) where + carrier := {x | ∀ s, 0 ≤ x s} + zero_mem' := fun _ => le_rfl + add_mem' hx hy s := add_nonneg (hx s) (hy s) + +noncomputable def complex (n : ℕ) : DirectedComplex where + group k := AddCommGrpCat.of (Chains n k) + differential k := (differential n k).toAddMonoidHom + differential_squared := differential_squared n + augmentation := (weight n 0).toAddMonoidHom + augmentation_differential := weight_differential n 0 + positive := positive n + +theorem chains_eq_zero_above {n k : ℕ} (h : n < k) (x : Chains n k) : x = 0 := by + ext s + rcases s.property with hs | ⟨hs, _⟩ <;> omega + +noncomputable def topTable (n : ℕ) (a : Bool) (k : ℕ) : Chains n k := + if hk : k < n then Finsupp.single ⟨a, Or.inl hk⟩ 1 + else if he : k = n then Finsupp.single ⟨false, Or.inr ⟨he, rfl⟩⟩ 1 + else 0 + +theorem topTable_boundary (n k : ℕ) (a : Bool) : + differential n k (topTable n a (k+1)) = topTable n true k - topTable n false k := by + classical + by_cases hk : k < n + · by_cases hs : k+1 < n + · simp [topTable, hs, hk, boundary] + · have he : k+1 = n := by omega + simp [topTable, he, hk, boundary] + · have hs : ¬ k+1 < n := by omega + have he : k+1 ≠ n := by omega + by_cases hkn : k = n + · simp [topTable, hkn] + · simp [topTable, hk, hs, he, hkn] + +/-- The universal n-cell is the positive table of its two faces in every +lower degree and the single generator at its top degree. -/ +noncomputable def topCell (n : ℕ) : (complex n).realization where + table := topTable n + positive a k := by + classical + change ∀ s, 0 ≤ topTable n a k s + intro s + unfold topTable + split_ifs + · simp only [Finsupp.single_apply] + split_ifs <;> norm_num + · simp only [Finsupp.single_apply] + split_ifs <;> norm_num + · exact le_rfl + augmentation a := by + change weight n 0 (topTable n a 0) = 1 + unfold topTable + split_ifs with h h' + · simp + · simp + · omega + boundary a k := topTable_boundary n k a + finite_support := ⟨n, fun k hk a => by + simp [topTable, Nat.not_lt.mpr hk.le, Nat.ne_of_gt hk] + rfl⟩ + +theorem topCell_dimension (n : ℕ) : (complex n).realization.DimensionLE n (topCell n) := by + have hf (a : Bool) : (topCell n).face a n = topCell n := by + apply DirectedComplex.Cell.ext + funext b k + change DirectedComplex.Cell.cutTable (topCell n) a n b k = topTable n b k + by_cases hk : k < n + · simp only [DirectedComplex.Cell.cutTable, hk, ite_true] + rfl + · by_cases he : k = n + · subst k + cases a <;> cases b <;> simp [DirectedComplex.Cell.cutTable, topCell, topTable] <;> rfl + · have hnk : n < k := by omega + simp [DirectedComplex.Cell.cutTable, hk, he, topTable] + rfl + exact ⟨hf false, hf true⟩ + +/-- The actual positive-table realization of the free globe receives its +canonical strict cell map, with no Gray input. -/ +noncomputable def fromGlobe (n : ℕ) : + StrictOmegaCategory.Globe.category n ⟶ (complex n).realization := + StrictOmegaCategory.Globe.lift _ (topCell n) (topCell_dimension n) + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Positive globe maps and bounded cells + +A positive chain map from the n-globe complex is the full chain table of +one bounded cell. The construction preserves all signed boundaries and +augmentation equations before taking strict realization. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {K : DirectedComplex.{0}} + +/-- Extend the table entries of a cell linearly on the globe basis. -/ +def cellApp (n : ℕ) (x : Cell K) (k : ℕ) : Chains n k →ₗ[ℤ] K.group k := + Finsupp.linearCombination ℤ (fun s => x.table s.val k) + +@[simp] theorem cellApp_single (n : ℕ) (x : Cell K) (k : ℕ) (s : Basis n k) (z : ℤ) : + cellApp n x k (Finsupp.single s z) = z • x.table s.val k := by + simp [cellApp] + +theorem cellApp_boundary (n : ℕ) (x : Cell K) (k : ℕ) (hk : k < n) : + cellApp n x k (boundary n k) = x.table true k - x.table false k := by + simp [boundary, hk] + +theorem cellApp_differential (n : ℕ) (x : Cell K) (k : ℕ) (u : Chains n (k+1)) : + cellApp n x k (differential n k u) = K.differential k (cellApp n x (k+1) u) := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single s z => + have hk : k < n := by rcases s.property with h | ⟨h, _⟩ <;> omega + simp only [differential_single, map_smul, cellApp_single, map_zsmul] + rw [cellApp_boundary n x k hk, x.boundary] + +theorem cellApp_augmentation (n : ℕ) (x : Cell K) (u : Chains n 0) : + K.augmentation (cellApp n x 0 u) = weight n 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single s z => simp [x.augmentation] + +theorem cellApp_positive (n : ℕ) (x : Cell K) (k : ℕ) (u : Chains n k) + (hu : u ∈ positive n k) : cellApp n x k u ∈ K.positive k := by + classical + change (u.sum fun s z => z • x.table s.val k) ∈ K.positive k + apply (K.positive k).sum_mem + intro s hs + change u s • x.table s.val k ∈ K.positive k + rw [← Int.toNat_of_nonneg (hu s), natCast_zsmul] + exact (K.positive k).nsmul_mem (x.positive s.val k) _ + +/-- The canonical positive globe map associated to a cell table. Its top +cell is the n-source of the table, hence the table itself when bounded. -/ +def cellMap (n : ℕ) (x : Cell K) : Hom (complex n) K where + app k := (cellApp n x k).toAddMonoidHom + differential := cellApp_differential n x + augmentation := cellApp_augmentation n x + positive k _ hu := cellApp_positive n x k _ hu + +/-- Realizing the associated positive chain map recovers the full bounded +table, including the lower-dimensional identity extensions. -/ +theorem cellMap_top (n : ℕ) (x : Cell K) : + (cellMap n x).realization.toFun (topCell n) = x.face false n := by + apply Cell.ext + funext a k + change cellApp n x k (topTable n a k) = Cell.cutTable x false n a k + by_cases hk : k < n + · simp [topTable, hk, Cell.cutTable] + · by_cases he : k = n + · subst k + simp [topTable, Cell.cutTable] + · simp [topTable, hk, he, Cell.cutTable] + +theorem cellMap_top_of_bounded (n : ℕ) (x : Cell K) + (hx : K.realization.DimensionLE n x) : + (cellMap n x).realization.toFun (topCell n) = x := + (cellMap_top n x).trans hx.1 + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/FixedPathCylinders.lean b/lean/OAI/CategoryTheory/Thomason/Gray/FixedPathCylinders.lean new file mode 100644 index 0000000000000000000000000000000000000000..8673dbf222a990f056f5afb075d5e62367323df2 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/FixedPathCylinders.lean @@ -0,0 +1,127 @@ +import OAI.CategoryTheory.Thomason.Gray.SingularCylinderEquivalence +import OAI.CategoryTheory.Thomason.Simplicial.ConstructedPosetCosieves +import OAI.CategoryTheory.Thomason.Simplicial.SingularCounitSurjectivity + +namespace OAI + +section + +/-! # The singular cylinder description of fixed-endpoint path families -/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +theorem singularCylinderMap_one {K : SSet.{0}} {X : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) : + SSet.ι₁ ≫ singularCylinderMap H = sSetTopAdj.homEquiv K X + (TopCat.ofHom ⟨fun x => H (1, x), H.continuous.comp (by fun_prop)⟩) := by + rw [singularCylinderMap, ← sSetTopAdj.homEquiv_naturality_left] + congr 1 + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + change H (PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (CartesianMonoidalCategory.snd K Δ[1])).hom + ((SSet.toTop.map SSet.ι₁).hom x)), + (SSet.toTop.map (CartesianMonoidalCategory.fst K Δ[1])).hom + ((SSet.toTop.map SSet.ι₁).hom x)) = H (1, x) + rw [← RealizedCylinder.comparison_one, RealizedCylinder.comparison_time, + RealizedCylinder.comparison_first] + +def fixedPathFamily {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + C(unitInterval × SSet.toTop.obj K, X) where + toFun z := ((sSetTopAdj.homEquiv K _).symm f).hom z.2 z.1 + continuous_toFun := (Path.continuous_uncurry_iff.mpr + ((sSetTopAdj.homEquiv K _).symm f).hom.continuous).comp continuous_swap + +def fixedPathCylinder {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X := singularCylinderMap (fixedPathFamily f) + +theorem fixedPathCylinder_evaluate {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) (t : unitInterval) + (z : SSet.toTop.obj K) : + evaluateSingularCylinder (fixedPathCylinder f) (t, z) = + ((sSetTopAdj.homEquiv K _).symm f).hom z t := + evaluate_singularCylinderMap (fixedPathFamily f) t z + +theorem fixedPathCylinder_zero {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + SSet.ι₀ ≫ fixedPathCylinder f = SSet.const (TopCat.toSSetObj₀Equiv.symm x) := by + rw [fixedPathCylinder, singularCylinderMap_zero, ← singular_adjoint_const] + congr 1 + apply TopCat.hom_ext + apply ContinuousMap.ext + intro z + exact (((sSetTopAdj.homEquiv K _).symm f).hom z).source + +theorem fixedPathCylinder_one {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + SSet.ι₁ ≫ fixedPathCylinder f = SSet.const (TopCat.toSSetObj₀Equiv.symm y) := by + rw [fixedPathCylinder, singularCylinderMap_one, ← singular_adjoint_const] + congr 1 + apply TopCat.hom_ext + apply ContinuousMap.ext + intro z + exact (((sSetTopAdj.homEquiv K _).symm f).hom z).target + +theorem fixedPathCylinder_naturality {A K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (i : A ⟶ K) (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + fixedPathCylinder (i ≫ f) = i ▷ Δ[1] ≫ fixedPathCylinder f := by + unfold fixedPathCylinder + rw [singularCylinderMap_naturality] + congr 1 + apply ContinuousMap.ext + rintro ⟨t, z⟩ + change ((sSetTopAdj.homEquiv A _).symm (i ≫ f)).hom z t = _ + rw [sSetTopAdj.homEquiv_naturality_left_symm] + rfl + +theorem fixedPathCylinder_postcomp {K : SSet.{0}} {X Y : TopCat.{0}} + (p : X ⟶ Y) {x y : X} + (f : K ⟶ TopCat.toSSet.obj (TopCat.of (Path x y))) : + fixedPathCylinder (f ≫ TopCat.toSSet.map (TopCat.ofHom (PathSpace.map p.hom))) = + fixedPathCylinder f ≫ TopCat.toSSet.map p := by + unfold fixedPathCylinder + rw [singularCylinderMap_postcomp] + congr 1 + apply ContinuousMap.ext + rintro ⟨t, z⟩ + change ((sSetTopAdj.homEquiv K _).symm + (f ≫ TopCat.toSSet.map (TopCat.ofHom (PathSpace.map p.hom)))).hom z t = _ + rw [sSetTopAdj.homEquiv_naturality_right_symm] + rfl + +/-- An evaluated cylinder with constant endpoints is a continuous family of +paths with those endpoints. -/ +def fixedPathRealization {K : SSet.{0}} {X : TopCat.{0}} {x y : X} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) + (h₀ : SSet.ι₀ ≫ e = SSet.const (TopCat.toSSetObj₀Equiv.symm x)) + (h₁ : SSet.ι₁ ≫ e = SSet.const (TopCat.toSSetObj₀Equiv.symm y)) : + SSet.toTop.obj K ⟶ TopCat.of (Path x y) := TopCat.ofHom { + toFun z := { + toFun t := evaluateSingularCylinder e (t, z) + continuous_toFun := (evaluateSingularCylinder e).continuous.comp (by fun_prop) + source' := by + rw [evaluateSingularCylinder_zero, h₀, ← singular_adjoint_const, + Equiv.symm_apply_apply] + rfl + target' := by + rw [evaluateSingularCylinder_one, h₁, ← singular_adjoint_const, + Equiv.symm_apply_apply] + rfl } + continuous_toFun := Path.continuous_uncurry_iff.mp + ((evaluateSingularCylinder e).continuous.comp continuous_swap) } + +end + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GlobePastingDensity.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GlobePastingDensity.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9e41aa4d0b62b6c5d9bdf6038c5583330cf0b18 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GlobePastingDensity.lean @@ -0,0 +1,1007 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.StrictAbelianization +import OAI.CategoryTheory.Thomason.Simplicial.LoopDimensionShift +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import OAI.CategoryTheory.Thomason.Strict.StrictTerminalConeFunctor +import OAI.CategoryTheory.Thomason.Strict.UnderlyingCategory +import Mathlib.CategoryTheory.Category.Preorder +import Mathlib.CategoryTheory.Limits.Shapes.Pullback.HasPullback +import Mathlib.CategoryTheory.Limits.Types.Filtered +import Mathlib.Data.Fintype.EquivFin + +namespace OAI + +section + +/-! # Finite-dimensional cells in the globe mapping family + +For a functor on strict categories, maps from the images of the globes +form a reflexive globular family. Identity extensions are injective, and +their filtered union has actual finite-dimensional cells and globular +faces. This is the underlying cell construction for the right interval +internal hom; composition is constructed separately from cylinder gluing. +-/ + +namespace Thomason.Construction.StrictOmegaCategory + +open CategoryTheory CategoryTheory.Limits CategoryTheory.ConcreteCategory + +namespace Globe + +/-- Extend the universal n-cell to an m-dimensional identity cell. -/ +def lower (m n : ℕ) (h : n ≤ m) : category m ⟶ category n := + lift (category n) Cell.top ((category n).dimensionLE_mono h (category_truncated n Cell.top)) + +@[simp] theorem lower_top (m n : ℕ) (h : n ≤ m) : + (lower m n h).toFun Cell.top = Cell.top := rfl + +@[simp] theorem lower_self (n : ℕ) (h : n ≤ n) : lower n n h = 𝟙 (category n) := by + apply hom_ext + rfl + +theorem lower_comp {l m n : ℕ} (hml : m ≤ l) (hnm : n ≤ m) : + lower l m hml ≫ lower m n hnm = lower l n (hnm.trans hml) := by + apply hom_ext + rfl + +theorem faceMap_lower (a : Bool) (r : ℕ) {m n : ℕ} (h : n ≤ m) : + faceMap a r m ≫ lower m n h = faceMap a r n := by + apply hom_ext + exact (lower m n h).map_face a r Cell.top + +theorem faceMap_eq_lower (a : Bool) {m n : ℕ} (h : n ≤ m) : + faceMap a m n = lower m n h := by + apply hom_ext + cases a + · exact ((category n).dimensionLE_mono h (category_truncated n Cell.top)).1 + · exact ((category n).dimensionLE_mono h (category_truncated n Cell.top)).2 + +theorem faceMap_lower_retraction (a : Bool) {m n : ℕ} (h : n ≤ m) : + faceMap a n m ≫ lower m n h = 𝟙 (category n) := by + rw [faceMap_lower, faceMap_self] + +end Globe + +namespace GlobeMappingCells + +noncomputable section + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) + (D : StrictOmegaCategory.{0}) + +/-- The identity-extension diagram of maps from the actual globe images. -/ +def diagram : ℕ ⥤ Type where + obj n := F.obj (Globe.category n) ⟶ D + map {n m} h := ↾fun f => F.map (Globe.lower m n (leOfHom h)) ≫ f + map_id n := by + ext f + change F.map (Globe.lower n n _) ≫ f = f + rw [Globe.lower_self, F.map_id, Category.id_comp] + map_comp {l m n} h j := by + ext f + change F.map (Globe.lower n l _) ≫ f = + F.map (Globe.lower n m _) ≫ (F.map (Globe.lower m l _) ≫ f) + rw [← Category.assoc, ← F.map_comp, Globe.lower_comp] + +abbrev Carrier : Type := colimit (diagram F D) + +def ι (n : ℕ) (f : F.obj (Globe.category n) ⟶ D) : Carrier F D := + colimit.ι (diagram F D) n f + +theorem ι_lower {n m : ℕ} (h : n ≤ m) (f : F.obj (Globe.category n) ⟶ D) : + ι F D m (F.map (Globe.lower m n h) ≫ f) = ι F D n f := + congr_hom (colimit.w (diagram F D) (homOfLE h)) f + +theorem exists_representative (x : Carrier F D) : + ∃ (n : ℕ) (f : F.obj (Globe.category n) ⟶ D), ι F D n f = x := + Types.jointly_surjective' x + +/-- Every finite-level mapping set embeds into the identity-extension union. -/ +theorem ι_injective (n : ℕ) : Function.Injective (ι F D n) := by + intro f g hfg + obtain ⟨m, j, hj⟩ := (Types.FilteredColimit.isColimit_eq_iff' + (colimit.isColimit (diagram F D)) f g).mp hfg + have h : F.map (Globe.lower m n (leOfHom j)) ≫ f = + F.map (Globe.lower m n (leOfHom j)) ≫ g := hj + have hh := congrArg (fun q => F.map (Globe.faceMap false n m) ≫ q) h + simpa only [← Category.assoc, ← F.map_comp, Globe.faceMap_lower_retraction, + F.map_id, Category.id_comp] using hh + +def faceCocone (a : Bool) (r : ℕ) : Cocone (diagram F D) where + pt := Carrier F D + ι := { + app n := ↾fun f => ι F D r (F.map (Globe.faceMap a r n) ≫ f) + naturality n m j := by + ext f + change F.obj (Globe.category n) ⟶ D at f + change ι F D r (F.map (Globe.faceMap a r m) ≫ + (F.map (Globe.lower m n (leOfHom j)) ≫ f)) = + ι F D r (F.map (Globe.faceMap a r n) ≫ f) + rw [← Category.assoc, ← F.map_comp, Globe.faceMap_lower] } + +def face (a : Bool) (r : ℕ) : Carrier F D → Carrier F D := + colimit.desc (diagram F D) (faceCocone F D a r) + +@[simp] theorem face_ι (a : Bool) (r n : ℕ) (f : F.obj (Globe.category n) ⟶ D) : + face F D a r (ι F D n f) = ι F D r (F.map (Globe.faceMap a r n) ≫ f) := + congr_hom (colimit.ι_desc (faceCocone F D a r) n) f + +theorem face_ι_of_le (a : Bool) {r n : ℕ} (hnr : n ≤ r) + (f : F.obj (Globe.category n) ⟶ D) : face F D a r (ι F D n f) = ι F D n f := by + rw [face_ι, Globe.faceMap_eq_lower a hnr] + exact ι_lower F D hnr f + +/-- The globular law holds before any composition operation is imposed. -/ +theorem globular (a b : Bool) (r s : ℕ) (x : Carrier F D) : + face F D a r (face F D b s x) = + if r < s then face F D a r x else face F D b s x := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + by_cases hrs : r < s + · simp only [hrs, ite_true, face_ι, ← Category.assoc, ← F.map_comp, + Globe.faceMap_comp a b r s n hrs] + · rw [ite_eq_right hrs, face_ι, face_ι_of_le F D a (Nat.le_of_not_gt hrs)] + +/-- Every mapping-family cell has a finite dimension bound. -/ +theorem finite_dimension (x : Carrier F D) : + ∃ n, face F D false n x = x ∧ face F D true n x = x := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + exact ⟨n, face_ι_of_le F D false le_rfl f, face_ι_of_le F D true le_rfl f⟩ + +/-- Equality of r-faces is the literal equality of the restricted globe maps. -/ +theorem faces_eq_iff (a b : Bool) (r n m : ℕ) + (f : F.obj (Globe.category n) ⟶ D) (g : F.obj (Globe.category m) ⟶ D) : + face F D a r (ι F D n f) = face F D b r (ι F D m g) ↔ + F.map (Globe.faceMap a r n) ≫ f = F.map (Globe.faceMap b r m) ≫ g := by + rw [face_ι, face_ι] + exact (ι_injective F D r).eq_iff + +/-- The literal finite-dimensional condition on the mapping-family carrier. -/ +def Bounded (n : ℕ) (x : Carrier F D) : Prop := + face F D false n x = x ∧ face F D true n x = x + +theorem bounded_ι (n : ℕ) (f : F.obj (Globe.category n) ⟶ D) : + Bounded F D n (ι F D n f) := + ⟨face_ι_of_le F D false le_rfl f, face_ι_of_le F D true le_rfl f⟩ + +/-- A bounded cell is represented at its exact bound, not just a larger stage. -/ +theorem bounded_iff_representative (n : ℕ) (x : Carrier F D) : + Bounded F D n x ↔ ∃ f : F.obj (Globe.category n) ⟶ D, ι F D n f = x := by + constructor + · intro hx + obtain ⟨m, f, rfl⟩ := exists_representative F D x + exact ⟨F.map (Globe.faceMap false n m) ≫ f, (face_ι F D false n m f).symm.trans hx.1⟩ + · rintro ⟨f, rfl⟩ + exact bounded_ι F D n f + +/-- Evaluation on an n-globe exactly represents the bounded mapping cells. -/ +def boundedEquiv (n : ℕ) : + (F.obj (Globe.category n) ⟶ D) ≃ {x : Carrier F D // Bounded F D n x} where + toFun f := ⟨ι F D n f, bounded_ι F D n f⟩ + invFun x := Classical.choose ((bounded_iff_representative F D n x.val).mp x.property) + left_inv f := (ι_injective F D n) + (Classical.choose_spec ((bounded_iff_representative F D n (ι F D n f)).mp + (bounded_ι F D n f))) + right_inv x := Subtype.ext + (Classical.choose_spec ((bounded_iff_representative F D n x.val).mp x.property)) + +variable {D} {E : StrictOmegaCategory.{0}} + +def mapCocone (u : D ⟶ E) : Cocone (diagram F D) where + pt := Carrier F E + ι := { + app n := ↾fun f => ι F E n (f ≫ u) + naturality n m j := by + ext f + change F.obj (Globe.category n) ⟶ D at f + change ι F E m ((F.map (Globe.lower m n (leOfHom j)) ≫ f) ≫ u) = + ι F E n (f ≫ u) + rw [Category.assoc, ι_lower] } + +/-- Postcompose every finite globe map by an actual strict functor. -/ +def map (u : D ⟶ E) : Carrier F D → Carrier F E := + colimit.desc (diagram F D) (mapCocone F u) + +@[simp] theorem map_ι (u : D ⟶ E) (n : ℕ) (f : F.obj (Globe.category n) ⟶ D) : + map F u (ι F D n f) = ι F E n (f ≫ u) := + congr_hom (colimit.ι_desc (mapCocone F u) n) f + +theorem map_face (u : D ⟶ E) (a : Bool) (n : ℕ) (x : Carrier F D) : + map F u (face F D a n x) = face F E a n (map F u x) := by + obtain ⟨m, f, rfl⟩ := exists_representative F D x + simp only [face_ι, map_ι, Category.assoc] + +theorem map_id (x : Carrier F D) : map F (𝟙 D) x = x := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + simp only [map_ι, Category.comp_id] + +theorem map_comp {E' : StrictOmegaCategory.{0}} (u : D ⟶ E) (v : E ⟶ E') + (x : Carrier F D) : map F (u ≫ v) x = map F v (map F u x) := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + simp only [map_ι, Category.assoc] + +end +end GlobeMappingCells +end Thomason.Construction.StrictOmegaCategory + +end + +section + +/-! # Common finite bounds for actual globe-mapping cells -/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +open CategoryTheory + +noncomputable section + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) + (D : StrictOmegaCategory.{0}) + +theorem exists_representative_above (x : Carrier F D) (N : ℕ) : + ∃ (n : ℕ), N ≤ n ∧ ∃ f : F.obj (Globe.category n) ⟶ D, ι F D n f = x := by + obtain ⟨m, f, hf⟩ := exists_representative F D x + refine ⟨max N m, Nat.le_max_left _ _, F.map (Globe.lower (max N m) m + (Nat.le_max_right _ _)) ≫ f, ?_⟩ + exact (ι_lower F D (Nat.le_max_right N m) f).trans hf + +/-- A pair of cells has representatives at one bound above any prescribed level. -/ +theorem exists_representatives₂_above (x y : Carrier F D) (N : ℕ) : + ∃ (n : ℕ), N ≤ n ∧ ∃ f g : F.obj (Globe.category n) ⟶ D, + ι F D n f = x ∧ ι F D n g = y := by + obtain ⟨l, hl, f, hf⟩ := exists_representative_above F D x N + obtain ⟨m, hm, g, hg⟩ := exists_representative_above F D y N + refine ⟨max l m, hl.trans (Nat.le_max_left _ _), + F.map (Globe.lower (max l m) l (Nat.le_max_left _ _)) ≫ f, + F.map (Globe.lower (max l m) m (Nat.le_max_right _ _)) ≫ g, + (ι_lower F D (Nat.le_max_left l m) f).trans hf, + (ι_lower F D (Nat.le_max_right l m) g).trans hg⟩ + +/-- Matching faces remain a literal equation at every common representative level. -/ +theorem matching_representatives {n k : ℕ} (x y : Carrier F D) + (h : face F D true k x = face F D false k y) + (f g : F.obj (Globe.category n) ⟶ D) + (hf : ι F D n f = x) (hg : ι F D n g = y) : + F.map (Globe.faceMap true k n) ≫ f = F.map (Globe.faceMap false k n) ≫ g := by + apply (faces_eq_iff F D true false k n n f g).mp + exact (congrArg (face F D true k) hf).trans + (h.trans (congrArg (face F D false k) hg).symm) + +end +end Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +end + +section + +/-! # A common finite bound for finite families of mapping cells -/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +open CategoryTheory + +noncomputable section + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) (D : StrictOmegaCategory.{0}) + +/-- Choose simultaneous finite representatives, retaining any required +lower bound. This supplies the three and four cells used in the strict laws. -/ +theorem exists_representatives_fin_above (m : ℕ) (x : Fin m → Carrier F D) (N : ℕ) : + ∃ n, N ≤ n ∧ ∃ f : Fin m → (F.obj (Globe.category n) ⟶ D), + ∀ i, ι F D n (f i) = x i := by + induction m generalizing N with + | zero => + exact ⟨N, le_rfl, Fin.elim0, fun i => Fin.elim0 i⟩ + | succ m ih => + obtain ⟨n, hn, f, hf⟩ := ih (fun i => x i.succ) N + obtain ⟨r, hr, g, hg⟩ := exists_representative_above F D (x 0) n + refine ⟨r, hn.trans hr, Fin.cases g (fun i => F.map (Globe.lower r n hr) ≫ f i), ?_⟩ + intro i + refine Fin.cases ?_ (fun j => ?_) i + · exact hg + · exact (ι_lower F D hr (f j)).trans (hf j) + +/-- Reindex the common bound by a finite parameter set, such as the four +positions in an interchange square. -/ +theorem exists_representatives_finite_above {I : Type} [Finite I] + (x : I → Carrier F D) (N : ℕ) : + ∃ n, N ≤ n ∧ ∃ f : I → (F.obj (Globe.category n) ⟶ D), + ∀ i, ι F D n (f i) = x i := by + let _ := Fintype.ofFinite I + let e := Fintype.equivFin I + obtain ⟨n, hn, f, hf⟩ := exists_representatives_fin_above F D (Fintype.card I) + (fun j => x (e.symm j)) N + refine ⟨n, hn, fun i => f (e i), fun i => ?_⟩ + simpa only [Equiv.symm_apply_apply] using hf (e i) + +end +end Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +end + +section + +/-! # Evaluation induced by a natural map into the globe model + +In particular the two actual interval endpoints evaluate mapping cells +in their target. The definition respects finite representatives and all +faces before an internal-hom category has been assembled. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +open CategoryTheory CategoryTheory.Limits CategoryTheory.ConcreteCategory + +noncomputable section + +variable {F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} + (η : 𝟭 StrictOmegaCategory.{0} ⟶ F) (D : StrictOmegaCategory.{0}) + +def evaluationCocone : Cocone (diagram F D) where + pt := D + ι := { + app n := ↾fun f => f.toFun ((η.app (Globe.category n)).toFun Globe.Cell.top) + naturality n m j := by + ext f + change F.obj (Globe.category n) ⟶ D at f + change f.toFun ((F.map (Globe.lower m n (leOfHom j))).toFun + ((η.app (Globe.category m)).toFun Globe.Cell.top)) = + f.toFun ((η.app (Globe.category n)).toFun Globe.Cell.top) + exact congrArg f.toFun + (congrArg (fun q : Globe.category m ⟶ F.obj (Globe.category n) => + q.toFun Globe.Cell.top) (η.naturality (Globe.lower m n (leOfHom j)))).symm } + +def naturalEvaluation : Carrier F D → D := colimit.desc (diagram F D) (evaluationCocone η D) + +@[simp] theorem naturalEvaluation_ι (n : ℕ) (f : F.obj (Globe.category n) ⟶ D) : + naturalEvaluation η D (ι F D n f) = f.toFun ((η.app (Globe.category n)).toFun Globe.Cell.top) := + congr_hom (colimit.ι_desc (evaluationCocone η D) n) f + +theorem naturalEvaluation_face (a : Bool) (r : ℕ) (x : Carrier F D) : + naturalEvaluation η D (face F D a r x) = D.face a r (naturalEvaluation η D x) := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + rw [face_ι, naturalEvaluation_ι, naturalEvaluation_ι] + have he := congrArg (fun q : Globe.category r ⟶ F.obj (Globe.category n) => + q.toFun Globe.Cell.top) (η.naturality (Globe.faceMap a r n)) + change f.toFun ((F.map (Globe.faceMap a r n)).toFun + ((η.app (Globe.category r)).toFun Globe.Cell.top)) = _ + exact (congrArg f.toFun he.symm).trans + ((congrArg f.toFun ((η.app (Globe.category n)).map_face a r Globe.Cell.top)).trans + (f.map_face a r ((η.app (Globe.category n)).toFun Globe.Cell.top))) + +variable {D} {E : StrictOmegaCategory.{0}} + +theorem naturalEvaluation_map (u : D ⟶ E) (x : Carrier F D) : + naturalEvaluation η E (map F u x) = u.toFun (naturalEvaluation η D x) := by + obtain ⟨n, f, rfl⟩ := exists_representative F D x + rw [map_ι, naturalEvaluation_ι, naturalEvaluation_ι] + rfl + +end +end Thomason.Construction.StrictOmegaCategory.GlobeMappingCells + +end + +section + +/-! # Naturality for every strict map between free globes + +The finite mapping representatives agree with evaluation on all globe +cells, including identities in arbitrarily larger dimensions. This is +the globe-level representability bridge used by the right adjunction. +-/ + +namespace Thomason.Construction.StrictOmegaCategory + +open CategoryTheory + +namespace Globe + +theorem hom_top_dimension_le {n m : ℕ} (s : category n ⟶ category m) : + dimension (s.toFun Cell.top) ≤ n := by + have h : face false n (s.toFun Cell.top) = s.toFun Cell.top := + (s.dimensionLE (category_truncated n Cell.top)).1 + have hd := congrArg dimension h + have hh : min n (dimension (s.toFun Cell.top)) = dimension (s.toFun Cell.top) := + (dimension_face false n (s.toFun Cell.top)).symm.trans hd + omega + +end Globe + +namespace GlobeMappingCells + +noncomputable section + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) (D : StrictOmegaCategory.{0}) + +/-- Evaluate a bounded mapping representative on a cell of its source globe. -/ +def evaluateCell {m : ℕ} (f : F.obj (Globe.category m) ⟶ D) : Globe.Cell m → Carrier F D + | .top => ι F D m f + | .boundary a r => face F D a r (ι F D m f) + +/-- Naturality includes every strict globe map, not only the chosen face maps. -/ +theorem globe_naturality {n m : ℕ} (s : Globe.category n ⟶ Globe.category m) + (f : F.obj (Globe.category m) ⟶ D) : + ι F D n (F.map s ≫ f) = evaluateCell F D f (s.toFun Globe.Cell.top) := by + have hd := Globe.hom_top_dimension_le s + cases ht : s.toFun Globe.Cell.top with + | top => + have hmn : m ≤ n := by simpa only [ht, Globe.dimension] using hd + have hs : s = Globe.lower n m hmn := by + apply Globe.hom_ext + exact ht + rw [hs, ι_lower] + rfl + | boundary a r => + have hrn : (r : ℕ) ≤ n := by simpa only [ht, Globe.dimension] using hd + have hs : s = Globe.lower n r hrn ≫ Globe.faceMap a r m := by + apply Globe.hom_ext + change s.toFun Globe.Cell.top = (Globe.category m).face a r Globe.Cell.top + rw [ht] + change Globe.Cell.boundary a r = @Globe.face m a r Globe.Cell.top + unfold Globe.face + split_ifs with h + · simp only [Globe.dimension] at h + omega + · rfl + rw [hs, F.map_comp, Category.assoc, ι_lower] + change ι F D r (F.map (Globe.faceMap a r m) ≫ f) = + face F D a r (ι F D m f) + exact (face_ι F D a r m f).symm + +end +end GlobeMappingCells +end Thomason.Construction.StrictOmegaCategory + +end + +section + +/-! # The globe comparison and actual Street weak equivalences + +The identified positive globe gives isomorphisms of the actual Street +nerves, hence homeomorphisms of their geometric realizations. Changing +between free-globe and positive-chain presentations preserves and reflects +the prescribed weak equivalences, including all strict face maps. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory + +noncomputable section + +variable (h : NormalizedSimplexIdentities) + +def globeNerveIso (n : ℕ) : + h.streetNerve.obj (StrictOmegaCategory.Globe.category n) ≅ + h.streetNerve.obj (complex n).realization := + h.streetNerve.mapIso (globeIso n) + +def globeRealizationHomeomorph (n : ℕ) : + SSet.toTop.obj (h.streetNerve.obj (StrictOmegaCategory.Globe.category n)) ≃ₜ + SSet.toTop.obj (h.streetNerve.obj (complex n).realization) := + TopCat.homeoOfIso (SSet.toTop.mapIso (globeNerveIso h n)) + +/-- The canonical comparison satisfies actual component and homotopy-group +weak equivalence, with no Kan--Quillen or Gray hypothesis. -/ +theorem fromGlobe_weak (n : ℕ) : h.streetWeakEquivalences (fromGlobe n) := by + let : IsIso (fromGlobe n) := by + change IsIso (globeIso n).hom + infer_instance + change realizationWeakEquivalences (h.streetNerve.map (fromGlobe n)) + exact MorphismProperty.of_isIso realizationWeakEquivalences _ + +/-- Conjugating a map by the globe identifications preserves and reflects +Street weak equivalences of its actual geometric realization. -/ +theorem globe_conjugate_weak_iff {m n : ℕ} + (f : (complex m).realization ⟶ (complex n).realization) : + h.streetWeakEquivalences ((globeIso m).hom ≫ f ≫ (globeIso n).inv) ↔ + h.streetWeakEquivalences f := by + let P : MorphismProperty StrictOmegaCategory.{0} := + realizationWeakEquivalences.inverseImage h.streetNerve + have : P.RespectsIso := by dsimp [P]; infer_instance + exact (P.cancel_left_of_respectsIso (globeIso m).hom (f ≫ (globeIso n).inv)).trans + (P.cancel_right_of_respectsIso f (globeIso n).inv) + +/-- The signed face maps have exactly the same actual weak-equivalence +status in the free strict and positive-chain presentations. -/ +theorem faceMap_weak_iff (a : Bool) (m n : ℕ) : + h.streetWeakEquivalences (faceMap a m n).realization ↔ + h.streetWeakEquivalences (StrictOmegaCategory.Globe.faceMap a m n) := by + have he : StrictOmegaCategory.Globe.faceMap a m n = + (globeIso m).hom ≫ (faceMap a m n).realization ≫ (globeIso n).inv := by + have he := congrArg (fun q => q ≫ (globeIso n).inv) (fromGlobe_faceMap a m n) + change (StrictOmegaCategory.Globe.faceMap a m n ≫ (globeIso n).hom) ≫ + (globeIso n).inv = ((globeIso m).hom ≫ (faceMap a m n).realization) ≫ + (globeIso n).inv at he + simpa only [Category.assoc, Iso.hom_inv_id, Category.comp_id] using he + rw [he] + exact (globe_conjugate_weak_iff h _).symm + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Actual Street comparison for the strict-chain unit on globes + +The newly constructed lambda-nu unit is an isomorphism on every strict +globe. Hence it induces an isomorphism of Street nerves and a homeomorphism +of their actual realizations; its weak-equivalence status is unconditional. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory + +noncomputable section + +/-- The unit comparison is an actual strict isomorphism on each globe. -/ +def globeUnitIso (n : ℕ) : StrictOmegaCategory.Globe.category n ≅ + (StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n)).realization := + globeIso n ≪≫ (DirectedComplex.realizationFunctor.mapIso (abelianizationIso n)).symm + +theorem globeUnitIso_hom (n : ℕ) : (globeUnitIso n).hom = + StrictOmegaCategory.Abelianization.unit (StrictOmegaCategory.Globe.category n) := by + apply (cancel_mono (DirectedComplex.realizationFunctor.map (abelianizationIso n).hom)).mp + have he := StrictOmegaCategory.Abelianization.unit_evaluate (fromGlobe n) + calc + _ = (globeIso n).hom := by + let e : (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.Globe.category n)).realization ≅ (complex n).realization := + DirectedComplex.realizationFunctor.mapIso (abelianizationIso n) + change ((globeIso n).hom ≫ e.inv) ≫ e.hom = (globeIso n).hom + simp only [Category.assoc, Iso.inv_hom_id, Category.comp_id] + _ = _ := he.symm + +/-- The unit induces a literal isomorphism of the actual Street nerves. -/ +def globeUnitNerveIso (h : NormalizedSimplexIdentities) (n : ℕ) : + h.streetNerve.obj (StrictOmegaCategory.Globe.category n) ≅ + h.streetNerve.obj + (StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n)).realization := + h.streetNerve.mapIso (globeUnitIso n) + +def globeUnitRealizationHomeomorph (h : NormalizedSimplexIdentities) (n : ℕ) : + SSet.toTop.obj (h.streetNerve.obj (StrictOmegaCategory.Globe.category n)) ≃ₜ + SSet.toTop.obj (h.streetNerve.obj + (StrictOmegaCategory.Abelianization.complex (StrictOmegaCategory.Globe.category n)).realization) := + TopCat.homeoOfIso (SSet.toTop.mapIso (globeUnitNerveIso h n)) + +theorem globe_unit_weak (h : NormalizedSimplexIdentities) (n : ℕ) : + h.streetWeakEquivalences + (StrictOmegaCategory.Abelianization.unit (StrictOmegaCategory.Globe.category n)) := by + let : IsIso (StrictOmegaCategory.Abelianization.unit (StrictOmegaCategory.Globe.category n)) := by + rw [← globeUnitIso_hom] + infer_instance + change realizationWeakEquivalences (h.streetNerve.map _) + exact MorphismProperty.of_isIso realizationWeakEquivalences _ + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Detecting internal-hom truncation on concrete cylinder globes + +The old globe evaluation criterion is rewritten as an equality of strict +functors. Adjunction then moves that test to the actual cylinder of each +finite globe. No truncation conclusion is assumed in the test. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace StrictOmegaCategory.Globe + +/-- Collapse the universal m-cell to its chosen n-face, retaining all its +lower faces by the universal property of the actual globe. -/ +def collapse (a : Bool) (n m : ℕ) : category m ⟶ category m := + lift (category m) ((category m).face a n Cell.top) + (category_truncated m ((category m).face a n Cell.top)) + +@[simp] theorem collapse_top (a : Bool) (n m : ℕ) : + (collapse a n m).toFun Cell.top = (category m).face a n Cell.top := rfl + +theorem collapse_eq_id (a : Bool) {n m : ℕ} (hmn : m ≤ n) : + collapse a n m = 𝟙 (category m) := by + apply hom_ext + have h := (category m).dimensionLE_mono hmn (category_truncated m Cell.top) + cases a + · exact h.1 + · exact h.2 + +/-- The existing pointwise face criterion is equivalently a test on maps +out of every actual finite globe. -/ +theorem truncated_iff_collapse (C : StrictOmegaCategory.{0}) (n : ℕ) : + C.IsTruncated n ↔ ∀ (m : ℕ) (f : category m ⟶ C) (a : Bool), + collapse a n m ≫ f = f := by + rw [truncated_iff_globe_test] + constructor + · intro h m f a + apply hom_ext + exact h m f a + · intro h m f a + exact congrArg (fun g : category m ⟶ C => g.toFun Cell.top) (h m f a) + +end StrictOmegaCategory.Globe + +/-- Internal-hom truncation reduces to a concrete equality on the +cylinders of finite globes. Naturality of the actual adjunction is the +only transport used here. -/ +theorem internalHom_truncated_iff_cylinder_globes + {F R : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} (adj : F ⊣ R) + (Y : StrictOmegaCategory.{0}) (n : ℕ) : + (R.obj Y).IsTruncated n ↔ + ∀ (m : ℕ) (f : F.obj (StrictOmegaCategory.Globe.category m) ⟶ Y) (a : Bool), + F.map (StrictOmegaCategory.Globe.collapse a n m) ≫ f = f := by + rw [StrictOmegaCategory.Globe.truncated_iff_collapse] + constructor + · intro h m f a + apply (adj.homEquiv _ _).injective + rw [adj.homEquiv_naturality_left] + exact h m ((adj.homEquiv _ _) f) a + · intro h m g a + have he := congrArg (adj.homEquiv (StrictOmegaCategory.Globe.category m) Y) + (h m ((adj.homEquiv _ _).symm g) a) + simpa only [adj.homEquiv_naturality_left, Equiv.apply_symm_apply] using he + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + +/-- Preservation of finite truncations is equivalent to an explicit test on +the cylinders of free globes. -/ +theorem internalHom_truncated_iff_globe_test + (Y : StrictOmegaCategory.{0}) (n : ℕ) : + (G.internalHom.obj Y).IsTruncated n ↔ + ∀ (m : ℕ) (f : G.cylinder.obj (StrictOmegaCategory.Globe.category m) ⟶ Y) + (a : Bool), G.cylinder.map (StrictOmegaCategory.Globe.collapse a n m) ≫ f = f := + internalHom_truncated_iff_cylinder_globes G.adjunction Y n + +end RightGrayInput + +end Thomason.Construction + +end + +section + +/-! # Universal pairs of composable strict cells + +Gluing two actual free globes along a chosen target and source face is the +finite parameter for a composite. Its universal property retains both +cells and their matching equation. These are the composition parameters +needed to extend the constructed right interval beyond individual globes. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +abbrev category (n m k : ℕ) : StrictOmegaCategory.{0} := + pushout (Globe.faceMap true k n) (Globe.faceMap false k m) + +abbrev left (n m k : ℕ) : Globe.category n ⟶ category n m k := + pushout.inl _ _ + +abbrev right (n m k : ℕ) : Globe.category m ⟶ category n m k := + pushout.inr _ _ + +def leftCell (n m k : ℕ) : category n m k := (left n m k).toFun Globe.Cell.top + +def rightCell (n m k : ℕ) : category n m k := (right n m k).toFun Globe.Cell.top + +theorem matching (n m k : ℕ) : + (category n m k).target k (leftCell n m k) = + (category n m k).source k (rightCell n m k) := by + have he := congrArg (fun f : Globe.category k ⟶ category n m k => + f.toFun Globe.Cell.top) (pushout.condition (f := Globe.faceMap true k n) + (g := Globe.faceMap false k m)) + change (left n m k).toFun ((Globe.category n).face true k Globe.Cell.top) = + (right n m k).toFun ((Globe.category m).face false k Globe.Cell.top) at he + exact ((left n m k).map_face true k Globe.Cell.top).symm.trans + (he.trans ((right n m k).map_face false k Globe.Cell.top)) + +/-- A strict map from the pasted globes is determined by its two cells. -/ +theorem hom_ext {n m k : ℕ} {C : StrictOmegaCategory.{0}} + (f g : category n m k ⟶ C) + (hl : f.toFun (leftCell n m k) = g.toFun (leftCell n m k)) + (hr : f.toFun (rightCell n m k) = g.toFun (rightCell n m k)) : f = g := by + apply pushout.hom_ext + · apply Globe.hom_ext + exact hl + · apply Globe.hom_ext + exact hr + +/-- Every matching pair determines its unique strict map from the pasting. -/ +def desc {n m k : ℕ} (C : StrictOmegaCategory.{0}) + (x y : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : category n m k ⟶ C := + pushout.desc (Globe.lift C x hx) (Globe.lift C y hy) (by + rw [Globe.faceMap_lift, Globe.faceMap_lift] + apply Globe.hom_ext + exact hxy) + +@[simp] theorem desc_left {n m k : ℕ} (C : StrictOmegaCategory.{0}) + (x y : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : + (desc C x y hx hy hxy).toFun (leftCell n m k) = x := by + have he := congrArg (fun f : Globe.category n ⟶ C => f.toFun Globe.Cell.top) + (pushout.inl_desc (Globe.lift C x hx) (Globe.lift C y hy) + (show Globe.faceMap true k n ≫ Globe.lift C x hx = + Globe.faceMap false k m ≫ Globe.lift C y hy from by + rw [Globe.faceMap_lift, Globe.faceMap_lift] + apply Globe.hom_ext + exact hxy)) + exact he + +@[simp] theorem desc_right {n m k : ℕ} (C : StrictOmegaCategory.{0}) + (x y : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : + (desc C x y hx hy hxy).toFun (rightCell n m k) = y := by + have he := congrArg (fun f : Globe.category m ⟶ C => f.toFun Globe.Cell.top) + (pushout.inr_desc (Globe.lift C x hx) (Globe.lift C y hy) + (show Globe.faceMap true k n ≫ Globe.lift C x hx = + Globe.faceMap false k m ≫ Globe.lift C y hy from by + rw [Globe.faceMap_lift, Globe.faceMap_lift] + apply Globe.hom_ext + exact hxy)) + exact he + +theorem exists_unique_map {n m k : ℕ} (C : StrictOmegaCategory.{0}) + (x y : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : + ∃! f : category n m k ⟶ C, + f.toFun (leftCell n m k) = x ∧ f.toFun (rightCell n m k) = y := by + refine ⟨desc C x y hx hy hxy, ⟨desc_left C x y hx hy hxy, + desc_right C x y hx hy hxy⟩, ?_⟩ + intro f hf + apply hom_ext + · exact hf.1.trans (desc_left C x y hx hy hxy).symm + · exact hf.2.trans (desc_right C x y hx hy hxy).symm + +def composite (n m k : ℕ) : category n m k := + (category n m k).comp k (leftCell n m k) (rightCell n m k) (matching n m k) + +theorem composite_dimension (n m k : ℕ) (hk : k < max n m) : + (category n m k).DimensionLE (max n m) (composite n m k) := by + apply (category n m k).dimensionLE_comp hk + · exact (category n m k).dimensionLE_mono (Nat.le_max_left n m) + ((left n m k).dimensionLE (Globe.category_truncated n Globe.Cell.top)) + · exact (category n m k).dimensionLE_mono (Nat.le_max_right n m) + ((right n m k).dimensionLE (Globe.category_truncated m Globe.Cell.top)) + +/-- The universal composite is itself represented by a strict globe. -/ +def compositionMap (n m k : ℕ) (hk : k < max n m) : + Globe.category (max n m) ⟶ category n m k := + Globe.lift _ (composite n m k) (composite_dimension n m k hk) + +/-- Evaluation of the pasted universal cell is the specified composition. -/ +theorem desc_composite {n m k : ℕ} (C : StrictOmegaCategory.{0}) + (x y : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : + (desc C x y hx hy hxy).toFun (composite n m k) = C.comp k x y hxy := by + have hh : C.target k ((desc C x y hx hy hxy).toFun (leftCell n m k)) = + C.source k ((desc C x y hx hy hxy).toFun (rightCell n m k)) := by + rw [desc_left, desc_right] + exact hxy + have he := (desc C x y hx hy hxy).map_comp k (leftCell n m k) + (rightCell n m k) (matching n m k) hh + simpa only [composite, desc_left, desc_right] using he + +/-- The composition map is compatible with every pair of bounded cells. -/ +theorem compositionMap_desc {n m k : ℕ} (hk : k < max n m) + (C : StrictOmegaCategory.{0}) (x y : C) + (hx : C.DimensionLE n x) (hy : C.DimensionLE m y) + (hxy : C.target k x = C.source k y) : + compositionMap n m k hk ≫ desc C x y hx hy hxy = + Globe.lift C (C.comp k x y hxy) + (C.dimensionLE_comp hk (C.dimensionLE_mono (Nat.le_max_left n m) hx) + (C.dimensionLE_mono (Nat.le_max_right n m) hy) hxy) := by + apply Globe.hom_ext + exact desc_composite C x y hx hy hxy + +end + +end Thomason.Construction.StrictOmegaCategory.PastingGlobe + +end + +section + +/-! # The small globe-and-composition diagram of a strict category + +Globes record cells and faces; pasted pairs record composition. This is +the precise small presentation used to extend the right interval cylinder. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobePasting + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +inductive Shape + | globe (n : ℕ) + | pair (n k : ℕ) (hk : k < n) + +def object : Shape → StrictOmegaCategory.{0} + | .globe n => Globe.category n + | .pair n k _ => PastingGlobe.category n n k + +instance : Category Shape where + Hom i j := object i ⟶ object j + id i := 𝟙 (object i) + comp f g := f ≫ g + +def inclusion : Shape ⥤ StrictOmegaCategory.{0} where + obj := object + map f := f + +def diagram (C : StrictOmegaCategory.{0}) : CostructuredArrow inclusion C ⥤ StrictOmegaCategory := + CostructuredArrow.proj inclusion C ⋙ inclusion + +def cocone (C : StrictOmegaCategory.{0}) : Cocone (diagram C) where + pt := C + ι := { + app j := j.hom + naturality _ _ f := (CostructuredArrow.w f).trans (Category.comp_id _).symm } + +abbrev globePoint (C : StrictOmegaCategory.{0}) {n : ℕ} (x : C) (hx : C.DimensionLE n x) : + CostructuredArrow inclusion C := + CostructuredArrow.mk (Y := Shape.globe n) (Globe.lift C x hx) + +/-- Value assigned by a compatible cocone to a bounded cell. -/ +def value {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + {n : ℕ} (x : C) (hx : C.DimensionLE n x) : s.pt := + (s.ι.app (globePoint C x hx)).toFun Globe.Cell.top + +theorem value_raise {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + {n m : ℕ} (hnm : n ≤ m) (x : C) (hx : C.DimensionLE n x) : + value s x (C.dimensionLE_mono hnm hx) = value s x hx := by + let u : object (.globe m) ⟶ object (.globe n) := + Globe.lift (Globe.category n) Globe.Cell.top + ((Globe.category n).dimensionLE_mono hnm (Globe.category_truncated n Globe.Cell.top)) + have hu : u ≫ Globe.lift C x hx = Globe.lift C x (C.dimensionLE_mono hnm hx) := by + apply Globe.hom_ext + rfl + let f : globePoint C x (C.dimensionLE_mono hnm hx) ⟶ globePoint C x hx := + CostructuredArrow.homMk u hu + have he := congrArg (fun k => k.toFun Globe.Cell.top) (s.w f) + exact he.symm + +/-- A compatible family assigns the same value for every finite dimension bound. -/ +theorem value_independent {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + {n m : ℕ} (x : C) (hx : C.DimensionLE n x) (hy : C.DimensionLE m x) : + value s x hx = value s x hy := by + exact (value_raise s (Nat.le_max_left n m) x hx).symm.trans + (value_raise s (Nat.le_max_right n m) x hy) + +def dimension (C : StrictOmegaCategory.{0}) (x : C) : ℕ := + Classical.choose (C.finite_dimension x) + +theorem dimension_bound (C : StrictOmegaCategory.{0}) (x : C) : + C.DimensionLE (dimension C x) x := Classical.choose_spec (C.finite_dimension x) + +/-- The candidate map is defined on every actual cell, independently of a bound. -/ +def evaluate {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) (x : C) : s.pt := + value s x (dimension_bound C x) + +theorem evaluate_eq_value {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + {n : ℕ} (x : C) (hx : C.DimensionLE n x) : evaluate s x = value s x hx := + value_independent s x _ hx + +/-- Face preservation is forced by the morphisms between actual free globes. -/ +theorem evaluate_face {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + (a : Bool) (m : ℕ) (x : C) : + evaluate s (C.face a m x) = s.pt.face a m (evaluate s x) := by + let n := dimension C x + let hx : C.DimensionLE n x := dimension_bound C x + let f : globePoint C (C.face a m x) (C.face_dimensionLE a m x) ⟶ globePoint C x hx := + CostructuredArrow.homMk (Globe.faceMap a m n) (Globe.faceMap_lift C x hx a m) + have he := congrArg (fun k => k.toFun Globe.Cell.top) (s.w f) + rw [evaluate_eq_value s (C.face a m x) (C.face_dimensionLE a m x)] + exact he.symm.trans ((s.ι.app (globePoint C x hx)).map_face a m Globe.Cell.top) + +end + +end Thomason.Construction.StrictOmegaCategory.GlobePasting + +end + +section + +/-! # Density of actual globes and composable pairs + +Every strict category is the colimit of its small diagram of globes and +pasted pairs. The descent map is proved to preserve actual compositions. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobePasting + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +/-- The descended cell map agrees with every leg on every cell. -/ +theorem evaluate_map {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + (i : Shape) (f : object i ⟶ C) (x : object i) : + evaluate s (f.toFun x) = + (s.ι.app (CostructuredArrow.mk (Y := i) f)).toFun x := by + obtain ⟨n, hx⟩ := (object i).finite_dimension x + have he : Globe.lift (object i) x hx ≫ f = + Globe.lift C (f.toFun x) (f.dimensionLE hx) := by apply Globe.hom_ext; rfl + let q : globePoint C (f.toFun x) (f.dimensionLE hx) ⟶ + CostructuredArrow.mk (Y := i) f := + CostructuredArrow.homMk (Globe.lift (object i) x hx) he + have hq := congrArg (fun k => k.toFun Globe.Cell.top) (s.w q) + exact (evaluate_eq_value s (f.toFun x) (f.dimensionLE hx)).trans hq.symm + +/-- Composable pairs force the cellwise descent map to preserve composition. -/ +theorem evaluate_comp {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) + (k : ℕ) (x y : C) (hxy : C.target k x = C.source k y) + (h' : s.pt.target k (evaluate s x) = s.pt.source k (evaluate s y)) : + evaluate s (C.comp k x y hxy) = s.pt.comp k (evaluate s x) (evaluate s y) h' := by + let n := max (k+1) (max (dimension C x) (dimension C y)) + have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) (Nat.le_max_left _ _) + have hx : C.DimensionLE n x := C.dimensionLE_mono + ((Nat.le_max_left _ _).trans (Nat.le_max_right _ _)) (dimension_bound C x) + have hy : C.DimensionLE n y := C.dimensionLE_mono + ((Nat.le_max_right _ _).trans (Nat.le_max_right _ _)) (dimension_bound C y) + let f : object (.pair n k hkn) ⟶ C := PastingGlobe.desc C x y hx hy hxy + let l : PastingGlobe.category n n k ⟶ s.pt := s.ι.app (CostructuredArrow.mk (Y := Shape.pair n k hkn) f) + have hL : evaluate s x = l.toFun (PastingGlobe.leftCell n n k) := by + have e := evaluate_map s (.pair n k hkn) f (PastingGlobe.leftCell n n k) + simpa only [f, PastingGlobe.desc_left] using e + have hR : evaluate s y = l.toFun (PastingGlobe.rightCell n n k) := by + have e := evaluate_map s (.pair n k hkn) f (PastingGlobe.rightCell n n k) + simpa only [f, PastingGlobe.desc_right] using e + have hC : evaluate s (C.comp k x y hxy) = l.toFun (PastingGlobe.composite n n k) := by + have e := evaluate_map s (.pair n k hkn) f (PastingGlobe.composite n n k) + simpa only [f, PastingGlobe.desc_composite] using e + have hl : s.pt.target k (l.toFun (PastingGlobe.leftCell n n k)) = + s.pt.source k (l.toFun (PastingGlobe.rightCell n n k)) := by + rw [← hL, ← hR] + exact h' + have he := l.map_comp k (PastingGlobe.leftCell n n k) (PastingGlobe.rightCell n n k) + (PastingGlobe.matching n n k) hl + apply hC.trans + apply he.trans + simp only [← hL, ← hR] + +def desc {C : StrictOmegaCategory.{0}} (s : Cocone (diagram C)) : C ⟶ s.pt where + toFun := evaluate s + map_face := evaluate_face s + map_comp := evaluate_comp s + +/-- Every strict category has the actual small globe-and-pasting presentation. -/ +def isColimit (C : StrictOmegaCategory.{0}) : IsColimit (cocone C) where + desc := desc + fac s j := by + apply Hom.ext + funext x + exact evaluate_map s j.left j.hom x + uniq s f hf := by + apply Hom.ext + funext x + have he := congrArg (fun k => k.toFun Globe.Cell.top) + (hf (globePoint C x (dimension_bound C x))) + exact he + +end + +end Thomason.Construction.StrictOmegaCategory.GlobePasting + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GrayChainGlobeRestriction.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GrayChainGlobeRestriction.lean new file mode 100644 index 0000000000000000000000000000000000000000..6dc507e6fb4cded43b4dd4eaa25581b0f58f8cb3 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GrayChainGlobeRestriction.lean @@ -0,0 +1,996 @@ +import OAI.CategoryTheory.Thomason.Gray.CylinderAssembly +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderAtoms +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderRetractions +import OAI.CategoryTheory.Thomason.Gray.StrictAbelianization +import OAI.CategoryTheory.Thomason.Transfer.StrictPushoutGeneration + +namespace OAI + +section + +/-! # Exact intersection of the realized cylinder pieces + +The two globe pieces have retractions which collapse the opposite piece +to the common face. These identities make their intersection square a +pullback after every functor, in particular after the concrete right-chain +cylinder and realization. Generation of the full realized cylinder is a +separate question. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +private theorem pullback_of_piece_retractions + {D : Type*} [Category D] {A B C P : D} + (f : A ⟶ B) (g : A ⟶ C) (l : B ⟶ P) (r : C ⟶ P) + (cB : B ⟶ A) (cC : C ⟶ A) (p : P ⟶ B) (q : P ⟶ C) + (hw : f ≫ l = g ≫ r) (hl : l ≫ p = 𝟙 B) (hr : r ≫ q = 𝟙 C) + (hcrossL : r ≫ p = cC ≫ f) (hcrossR : l ≫ q = cB ≫ g) + (hB : f ≫ cB = 𝟙 A) (hC : g ≫ cC = 𝟙 A) : IsPullback f g l r := by + have right_lift (s : PullbackCone l r) : (s.fst ≫ cB) ≫ g = s.snd := by + have h := congrArg (fun u => u ≫ q) s.condition + simpa only [Category.assoc, hcrossR, hr, Category.comp_id] using h + refine IsPullback.of_isLimit (c := PullbackCone.mk f g hw) ?_ + refine PullbackCone.IsLimit.mk hw (fun s => s.fst ≫ cB) ?_ right_lift ?_ + · intro s + have h := congrArg (fun u => u ≫ p) s.condition + have hu : s.fst = s.snd ≫ cC ≫ f := by + simpa only [Category.assoc, hl, hcrossL, Category.comp_id] using h + calc + (s.fst ≫ cB) ≫ f = ((s.fst ≫ cB) ≫ g) ≫ cC ≫ f := by + simpa only [Category.assoc, Category.comp_id, Category.id_comp] using + congrArg (fun v => (s.fst ≫ cB) ≫ v ≫ f) hC.symm + _ = s.snd ≫ cC ≫ f := by rw [right_lift] + _ = s.fst := hu.symm + · intro s m hm _ + calc + m = (m ≫ f) ≫ cB := by rw [Category.assoc, hB, Category.comp_id] + _ = s.fst ≫ cB := congrArg (· ≫ cB) hm + +/-- The common-face square is an absolute pullback, by its explicit +piece retractions. This theorem does not assert preservation of a colimit. -/ +theorem functor_commonFace_isPullback + {D : Type*} [Category D] (F : StrictOmegaCategory.{0} ⥤ D) + (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + IsPullback (F.map (Globe.faceMap true k n)) (F.map (Globe.faceMap false k m)) + (F.map (left n m k)) (F.map (right n m k)) := by + apply pullback_of_piece_retractions + (F.map (Globe.faceMap true k n)) (F.map (Globe.faceMap false k m)) + (F.map (left n m k)) (F.map (right n m k)) + (F.map (collapseTo n k hkn)) (F.map (collapseTo m k hkm)) + (F.map (retractLeft n m k hkm)) (F.map (retractRight n m k hkn)) + · simpa only [Functor.map_comp] using congrArg F.map + (pushout.condition (f := Globe.faceMap true k n) (g := Globe.faceMap false k m)) + · rw [← F.map_comp, left_retractLeft, F.map_id] + · rw [← F.map_comp, right_retractRight, F.map_id] + · rw [← F.map_comp, right_retractLeft, F.map_comp] + · rw [← F.map_comp, left_retractRight, F.map_comp] + · rw [← F.map_comp, collapseTo_face, F.map_id] + · rw [← F.map_comp, collapseTo_face, F.map_id] + +/-- In the actual realized chain cylinder, the two globe pieces intersect +in exactly their common realized face-cylinder. -/ +theorem model_commonFace_isPullback (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + IsPullback (GrayChainExtension.model.map (Globe.faceMap true k n)) + (GrayChainExtension.model.map (Globe.faceMap false k m)) + (GrayChainExtension.model.map (left n m k)) + (GrayChainExtension.model.map (right n m k)) := + functor_commonFace_isPullback GrayChainExtension.model n m k hkn hkm + +end + +end Thomason.Construction.StrictOmegaCategory.PastingGlobe + +end + +section + +/-! # The source of the pasted-globe cylinder comparison + +This is the actual strict pushout of the two globe cylinders. Its canonical +map lands in the chain-model cylinder of the pasted globes. Retractions of +the two original pieces control equality of all original piece cells. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev model := GrayChainExtension.model + +abbrev source (n k : ℕ) : StrictOmegaCategory.{0} := + pushout (model.map (Globe.faceMap true k n)) (model.map (Globe.faceMap false k n)) + +def piece (n k : ℕ) (s : Bool) : model.obj (Globe.category n) ⟶ source n k := + if s then pushout.inr _ _ else pushout.inl _ _ + +def targetPiece (n k : ℕ) (s : Bool) : + model.obj (Globe.category n) ⟶ model.obj (PastingGlobe.category n n k) := + model.map (if s then PastingGlobe.right n n k else PastingGlobe.left n n k) + +def comparison (n k : ℕ) : source n k ⟶ model.obj (PastingGlobe.category n n k) := + pushout.desc (model.map (PastingGlobe.left n n k)) (model.map (PastingGlobe.right n n k)) + (by rw [← model.map_comp, ← model.map_comp, pushout.condition]) + +theorem piece_comparison (n k : ℕ) (s : Bool) : + piece n k s ≫ comparison n k = targetPiece n k s := by + cases s + · exact pushout.inl_desc _ _ _ + · exact pushout.inr_desc _ _ _ + +def globeIso (n : ℕ) : model.obj (Globe.category n) ≅ + (rightCylinder (DirectedGlobeComplex.complex n)).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso (DirectedGlobeComplex.abelianizationIso n) + +def basisComparison {n k : ℕ} (hkn : k < n) : + source n k ⟶ (PastingGlobeCylinderBasis.Cylinder hkn).realization := + comparison n k ≫ (PastingGlobeCylinderBasis.modelIso hkn).hom + +theorem piece_basisComparison {n k : ℕ} (hkn : k < n) (s : Bool) : + piece n k s ≫ basisComparison hkn = + (globeIso n).hom ≫ PastingGlobeCylinderBasis.sideMap hkn s := by + rw [basisComparison, ← Category.assoc, piece_comparison] + exact PastingGlobeCylinderBasis.model_piece hkn s + +private theorem map_retract (n k : ℕ) (hkn : k ≤ n) (s : Bool) : + targetPiece n k s ≫ model.map + (if s then PastingGlobe.retractRight n n k hkn else PastingGlobe.retractLeft n n k hkn) = + 𝟙 _ := by + cases s + · exact model_left_retractLeft n n k hkn + · exact model_right_retractRight n n k hkn + +/-- Cells from one original piece are distinguished by the comparison. -/ +theorem same_piece_injective (n k : ℕ) (hkn : k ≤ n) (s : Bool) + (x y : model.obj (Globe.category n)) + (he : (targetPiece n k s).toFun x = (targetPiece n k s).toFun y) : x = y := by + have hh := congrArg (model.map + (if s then PastingGlobe.retractRight n n k hkn else PastingGlobe.retractLeft n n k hkn)).toFun he + have hr := congrArg (fun f : model.obj (Globe.category n) ⟶ model.obj (Globe.category n) => + f.toFun) (map_retract n k hkn s) + exact (congrFun hr x).symm.trans (hh.trans (congrFun hr y)) + +/-- Equality of a left and a right original piece cell is already forced +by the common-face relation in the source pushout. -/ +theorem cross_piece_eq (n k : ℕ) (hkn : k ≤ n) + (x y : model.obj (Globe.category n)) + (he : (targetPiece n k false).toFun x = (targetPiece n k true).toFun y) : + (piece n k false).toFun x = (piece n k true).toFun y := by + let z := (model.map (PastingGlobe.collapseTo n k hkn)).toFun y + have hx : x = (model.map (Globe.faceMap true k n)).toFun z := by + have hh := congrArg (model.map (PastingGlobe.retractLeft n n k hkn)).toFun he + have hl := congrArg (fun f => f.toFun x) (model_left_retractLeft n n k hkn) + have hr := congrArg (fun f => f.toFun y) + (show targetPiece n k true ≫ model.map (PastingGlobe.retractLeft n n k hkn) = + model.map (PastingGlobe.collapseTo n k hkn) ≫ model.map (Globe.faceMap true k n) by + exact (model.map_comp _ _).symm.trans + ((congrArg model.map (PastingGlobe.right_retractLeft n n k hkn)).trans + (model.map_comp _ _))) + exact hl.symm.trans (hh.trans hr) + have hc : (model.map (PastingGlobe.collapseTo n k hkn)).toFun x = z := by + rw [hx] + have hh := congrArg (fun f => f.toFun z) + (show model.map (Globe.faceMap true k n) ≫ model.map (PastingGlobe.collapseTo n k hkn) = + 𝟙 _ by rw [← model.map_comp, PastingGlobe.collapseTo_face, model.map_id]) + exact hh + have hy : (model.map (Globe.faceMap false k n)).toFun z = y := by + have hh := congrArg (model.map (PastingGlobe.retractRight n n k hkn)).toFun he + have hl := congrArg (fun f => f.toFun x) + (show targetPiece n k false ≫ model.map (PastingGlobe.retractRight n n k hkn) = + model.map (PastingGlobe.collapseTo n k hkn) ≫ model.map (Globe.faceMap false k n) by + exact (model.map_comp _ _).symm.trans + ((congrArg model.map (PastingGlobe.left_retractRight n n k hkn)).trans + (model.map_comp _ _))) + have hr := congrArg (fun f => f.toFun y) (model_right_retractRight n n k hkn) + exact (congrArg (model.map (Globe.faceMap false k n)).toFun hc).symm.trans + (hl.symm.trans (hh.trans hr)) + rw [hx, ← hy] + exact congrArg (fun f : model.obj (Globe.category k) ⟶ source n k => f.toFun z) + (pushout.condition (f := model.map (Globe.faceMap true k n)) + (g := model.map (Globe.faceMap false k n))) + +theorem piece_eq_of_comparison (n k : ℕ) (hkn : k ≤ n) (s t : Bool) + (x y : model.obj (Globe.category n)) + (he : (targetPiece n k s).toFun x = (targetPiece n k t).toFun y) : + (piece n k s).toFun x = (piece n k t).toFun y := by + cases s <;> cases t + · exact congrArg (piece n k false).toFun (same_piece_injective n k hkn false x y he) + · exact cross_piece_eq n k hkn x y he + · exact (cross_piece_eq n k hkn y x he.symm).symm + · exact congrArg (piece n k true).toFun (same_piece_injective n k hkn true x y he) + +end +end Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +end + +section + +/-! # Bounded atoms in the actual source pushout + +Each canonical pasted-cylinder atom is represented in one of the two +globe cylinders. Its image and dimension bound are literal consequences +of the endpoint and prism constructions. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +theorem atom_in_side_bounded {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + ∃ (s : Bool) (x : Cell (rightCylinder (DirectedGlobeComplex.complex n))), + (rightCylinder (DirectedGlobeComplex.complex n)).realization.DimensionLE p x ∧ + (sideMap hkn s).toFun x = atom hkn b := by + cases b with + | endpoint a b => + refine ⟨b.val.1, Cell.map (RightCylinder.endpoint _ a) + ((DirectedGlobeComplex.topCell n).face b.val.2 p), ?_, ?_⟩ + · exact (RightCylinder.endpoint _ a).realization.dimensionLE + ((DirectedGlobeComplex.complex n).realization.face_dimensionLE b.val.2 p _) + · apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (PastingGlobeBasis.inclusion hkn b.val.1) a q + (((DirectedGlobeComplex.topCell n).face b.val.2 p).table c q) + | @mixed r b => + refine ⟨b.val.1, RightCylinder.prism + ((DirectedGlobeComplex.topCell n).face b.val.2 r), ?_, ?_⟩ + · exact RightCylinder.prism_dimension _ + ((DirectedGlobeComplex.complex n).realization.face_dimensionLE b.val.2 r _) + · exact RightCylinder.prism_naturality (PastingGlobeBasis.inclusion hkn b.val.1) _ + +end Thomason.Construction.PastingGlobeCylinderBasis + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev atomBasis {n k : ℕ} (hkn : k < n) := PastingGlobeCylinderBasis.orderedAtomBasis hkn + +def representativeSide {n k p : ℕ} (hkn : k < n) (b : PastingGlobeCylinderBasis.Basis n k p) : Bool := + Classical.choose (PastingGlobeCylinderBasis.atom_in_side_bounded hkn b) + +def representativeCell {n k p : ℕ} (hkn : k < n) (b : PastingGlobeCylinderBasis.Basis n k p) : + DirectedComplex.Cell (rightCylinder (DirectedGlobeComplex.complex n)) := + Classical.choose (Classical.choose_spec (PastingGlobeCylinderBasis.atom_in_side_bounded hkn b)) + +theorem representative_spec {n k p : ℕ} (hkn : k < n) (b : PastingGlobeCylinderBasis.Basis n k p) : + (rightCylinder (DirectedGlobeComplex.complex n)).realization.DimensionLE p + (representativeCell hkn b) ∧ + (PastingGlobeCylinderBasis.sideMap hkn (representativeSide hkn b)).toFun + (representativeCell hkn b) = PastingGlobeCylinderBasis.atom hkn b := + Classical.choose_spec (Classical.choose_spec (PastingGlobeCylinderBasis.atom_in_side_bounded hkn b)) + +/-- The chosen atom lift lies in an original globe-cylinder piece. -/ +def atomLift {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : source n k := + (piece n k (representativeSide hkn a.2)).toFun + ((globeIso n).inv.toFun (representativeCell hkn a.2)) + +theorem atomLift_dimension {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : + (source n k).DimensionLE a.1 (atomLift hkn a) := + (piece n k (representativeSide hkn a.2)).dimensionLE + ((globeIso n).inv.dimensionLE (representative_spec hkn a.2).1) + +theorem atomLift_image {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : + (basisComparison hkn).toFun (atomLift hkn a) = (atomBasis hkn).atomCell a := by + have he := congrArg (fun f => f.toFun ((globeIso n).inv.toFun (representativeCell hkn a.2))) + (piece_basisComparison hkn (representativeSide hkn a.2)) + have hi : (globeIso n).hom.toFun ((globeIso n).inv.toFun (representativeCell hkn a.2)) = + representativeCell hkn a.2 := by + exact congrArg (fun f => f.toFun (representativeCell hkn a.2)) (globeIso n).inv_hom_id + exact he.trans ((congrArg (PastingGlobeCylinderBasis.sideMap hkn + (representativeSide hkn a.2)).toFun hi).trans (representative_spec hkn a.2).2) + +end +end Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +end + +section + +/-! # Images of the atoms in each cylinder piece + +Canonical representatives may move a shared right face to the left piece. +All lower faces move with it, so the actual cell, not just its top chain, +agrees with the chosen pasted-cylinder atom. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +theorem embed_lower {n k p q : ℕ} (hkn : k < n) (s : Bool) + (b : DirectedGlobeComplex.Basis n p) (c : DirectedGlobeComplex.Basis n q) + (hqp : q < p) : embed hkn s c = embed hkn (embed hkn s b).val.1 c := by + cases s + · rfl + · by_cases hp : p < k + · simp [embed, right, hp, show q < k by omega, left] + · by_cases he : p = k + · by_cases hb : b.val = false + · simp [embed, right, he, hb, show q < k by omega, left] + · simp [embed, right, he, hb] + · simp [embed, right, hp, he] + +theorem inclusion_basisAtom {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : DirectedGlobeComplex.Basis n p) : + (inclusion hkn s).realization.toFun (DirectedGlobeComplex.basisAtom n p b) = + atom hkn (embed hkn s b) := by + apply Cell.ext + funext side q + change embedApp hkn s q ((DirectedGlobeComplex.basisAtom n p b).table side q) = _ + rcases lt_trichotomy q p with hqp | rfl | hpq + · rw [DirectedGlobeComplex.basisAtom_below n p b q hqp side, + embedApp_single, atom_below hkn (embed hkn s b) hqp side] + congr 1 + exact embed_lower hkn s b _ hqp + · rw [DirectedGlobeComplex.basisAtom_top, embedApp_single, atom_top] + · rw [DirectedGlobeComplex.basisAtom_above n p b q hpq side] + change embedApp hkn s q (0 : DirectedGlobeComplex.Chains n q) = _ + rw [map_zero, atom_above hkn (embed hkn s b) hpq side] + rfl + +end Thomason.Construction.PastingGlobeBasis + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +def pieceBasisMap {n k : ℕ} (hkn : k < n) (s : Bool) : + {p : ℕ} → (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p → Basis n k p + | _, .endpoint a b => .endpoint a (PastingGlobeBasis.embed hkn s b) + | _, .mixed b => .mixed (PastingGlobeBasis.embed hkn s b) + +theorem sideMap_atom {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p) : + (sideMap hkn s).toFun ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p b) = + atom hkn (pieceBasisMap hkn s b) := by + cases b with + | endpoint a b => + have he : Cell.map (RightCylinder.map (PastingGlobeBasis.inclusion hkn s)) + (Cell.map (RightCylinder.endpoint _ a) (DirectedGlobeComplex.basisAtom n p b)) = + Cell.map (RightCylinder.endpoint _ a) + (Cell.map (PastingGlobeBasis.inclusion hkn s) (DirectedGlobeComplex.basisAtom n p b)) := by + apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (PastingGlobeBasis.inclusion hkn s) a q _ + exact he.trans (congrArg (Cell.map (RightCylinder.endpoint _ a)) + (PastingGlobeBasis.inclusion_basisAtom hkn s b)) + | @mixed r b => + exact (RightCylinder.prism_naturality (PastingGlobeBasis.inclusion hkn s) + (DirectedGlobeComplex.basisAtom n r b)).trans + (congrArg RightCylinder.prism (PastingGlobeBasis.inclusion_basisAtom hkn s b)) + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Every grid-cylinder atom comes from one of the two rows -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +theorem embed_lower {n k l p q : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (b : PastingGlobeBasis.Basis n k p) (a : Bool) (hqp : q < p) : + embed hkl hln s (PastingGlobeBasis.embed (hkl.trans hln) b.val.1 + ⟨a, Or.inl (hqp.trans_le (PastingGlobeBasis.degree_le b))⟩) = + embed hkl hln (embed hkl hln s b).val.1 + (PastingGlobeBasis.embed (hkl.trans hln) (embed hkl hln s b).val.2.val.1 + ⟨a, Or.inl (hqp.trans_le (PastingGlobeBasis.degree_le b))⟩) := by + cases s with + | false => rfl + | true => + by_cases hp : p < l + · simp [embed, hp, show q < l by omega, left] + · by_cases he : p = l + · by_cases hb : b.val.2 = false + all_goals simp [embed, he, hb, show q < l by omega, targetBasis, left] + · simp [embed, hp, he] + +theorem inclusion_atom {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (b : PastingGlobeBasis.Basis n k p) : + (inclusion hkl hln s).realization.toFun (PastingGlobeBasis.atom (hkl.trans hln) b) = + atom hkl hln (embed hkl hln s b) := by + apply Cell.ext + funext a q + change embedApp hkl hln s q ((PastingGlobeBasis.atom (hkl.trans hln) b).table a q) = _ + rcases lt_trichotomy q p with hqp | rfl | hpq + · rw [PastingGlobeBasis.atom_below _ _ hqp a, embedApp_single, + atom_below hkl hln (embed hkl hln s b) hqp a] + congr 1 + exact embed_lower hkl hln s b a hqp + · rw [PastingGlobeBasis.atom_top, embedApp_single, atom_top] + · rw [PastingGlobeBasis.atom_above _ _ hpq a] + change embedApp hkl hln s q (0 : PastingGlobeBasis.Chains n k q) = _ + rw [map_zero, atom_above hkl hln (embed hkl hln s b) hpq a] + rfl + +def rowCylinderIndex {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + {p : ℕ} → PastingGlobeCylinderBasis.Basis n k p → + (cylinderOrderedAtomBasis hkl hln).Index p + | _, .endpoint a b => .endpoint a (embed hkl hln s b) + | _, .mixed b => .mixed (embed hkl hln s b) + +theorem rowCylinder_atom {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (b : PastingGlobeCylinderBasis.Basis n k p) : + (RightCylinder.map (inclusion hkl hln s)).realization.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) b) = + (cylinderOrderedAtomBasis hkl hln).atom p (rowCylinderIndex hkl hln s b) := by + cases b with + | endpoint a b => + have he : Cell.map (RightCylinder.map (inclusion hkl hln s)) + (Cell.map (RightCylinder.endpoint _ a) (PastingGlobeBasis.atom (hkl.trans hln) b)) = + Cell.map (RightCylinder.endpoint _ a) + (Cell.map (inclusion hkl hln s) (PastingGlobeBasis.atom (hkl.trans hln) b)) := by + apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (inclusion hkl hln s) a q _ + exact he.trans (congrArg (Cell.map (RightCylinder.endpoint _ a)) + (inclusion_atom hkl hln s b)) + | @mixed r b => + exact (RightCylinder.prism_naturality (inclusion hkl hln s) + (PastingGlobeBasis.atom (hkl.trans hln) b)).trans + (congrArg RightCylinder.prism (inclusion_atom hkl hln s b)) + +theorem cylinderAtom_in_row {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (cylinderOrderedAtomBasis hkl hln).AtomIndex) : + ∃ (s : Bool) (b : PastingGlobeCylinderBasis.Basis n k a.1), + (RightCylinder.map (inclusion hkl hln s)).realization.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) b) = + (cylinderOrderedAtomBasis hkl hln).atomCell a := by + rcases a with ⟨p, a⟩ + cases a with + | endpoint t b => + refine ⟨b.val.1, .endpoint t b.val.2, ?_⟩ + have hi : rowCylinderIndex hkl hln b.val.1 (.endpoint t b.val.2) = + .endpoint t b := congrArg (fun c : Basis n k l p => + (RightCylinderBasis.Basis.endpoint t c : (cylinderOrderedAtomBasis hkl hln).Index p)) + (embed_self hkl hln b) + exact (rowCylinder_atom hkl hln b.val.1 (.endpoint t b.val.2)).trans + (congrArg ((cylinderOrderedAtomBasis hkl hln).atom p) hi) + | @mixed r b => + refine ⟨b.val.1, .mixed b.val.2, ?_⟩ + have hi : rowCylinderIndex hkl hln b.val.1 (.mixed b.val.2) = + .mixed b := congrArg (fun c : Basis n k l r => + (RightCylinderBasis.Basis.mixed c : (cylinderOrderedAtomBasis hkl hln).Index (r+1))) + (embed_self hkl hln b) + exact (rowCylinder_atom hkl hln b.val.1 (.mixed b.val.2)).trans + (congrArg ((cylinderOrderedAtomBasis hkl hln).atom (r+1)) hi) + +end +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # Generation of the pasted-cylinder source by its chosen atom lifts + +The equalities of original piece cells identify every piece atom with its +canonical lift. Generation of the two globe cylinders and then of their +strict pushout gives the required ordinary composition generation. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +theorem piece_eq_of_basisComparison {n k : ℕ} (hkn : k < n) (s t : Bool) + (x y : model.obj (Globe.category n)) + (he : (basisComparison hkn).toFun ((piece n k s).toFun x) = + (basisComparison hkn).toFun ((piece n k t).toFun y)) : + (piece n k s).toFun x = (piece n k t).toFun y := by + apply piece_eq_of_comparison n k hkn.le s t x y + let e := PastingGlobeCylinderBasis.modelIso hkn + have he' : e.hom.toFun ((comparison n k).toFun ((piece n k s).toFun x)) = + e.hom.toFun ((comparison n k).toFun ((piece n k t).toFun y)) := he + have hi (z : model.obj (PastingGlobe.category n n k)) : e.inv.toFun (e.hom.toFun z) = z := + congrArg (fun f => f.toFun z) e.hom_inv_id + have hc := (hi _).symm.trans ((congrArg e.inv.toFun he').trans (hi _)) + have hl := congrArg (fun f => f.toFun x) (piece_comparison n k s) + have hr := congrArg (fun f => f.toFun y) (piece_comparison n k t) + exact hl.symm.trans (hc.trans hr) + +private theorem piece_atom_image {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p) : + (basisComparison hkn).toFun ((piece n k s).toFun ((globeIso n).inv.toFun + ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p b))) = + PastingGlobeCylinderBasis.atom hkn (PastingGlobeCylinderBasis.pieceBasisMap hkn s b) := by + let x := (DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p b + have he := congrArg (fun f => f.toFun ((globeIso n).inv.toFun x)) + (piece_basisComparison hkn s) + have hi : (globeIso n).hom.toFun ((globeIso n).inv.toFun x) = x := + congrArg (fun f => f.toFun x) (globeIso n).inv_hom_id + exact he.trans ((congrArg (PastingGlobeCylinderBasis.sideMap hkn s).toFun hi).trans + (PastingGlobeCylinderBasis.sideMap_atom hkn s b)) + +/-- Every original piece atom is the corresponding canonical atom lift. -/ +theorem piece_atom_eq_lift {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p) : + (piece n k s).toFun ((globeIso n).inv.toFun + ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p b)) = + atomLift hkn ⟨p, PastingGlobeCylinderBasis.pieceBasisMap hkn s b⟩ := by + apply piece_eq_of_basisComparison hkn s + (representativeSide hkn (PastingGlobeCylinderBasis.pieceBasisMap hkn s b)) + exact (piece_atom_image hkn s b).trans (atomLift_image hkn + ⟨p, PastingGlobeCylinderBasis.pieceBasisMap hkn s b⟩).symm + +theorem piece_cell_generated {n k : ℕ} (hkn : k < n) (s : Bool) + (x : model.obj (Globe.category n)) : + Nonempty (CompositionExpression (source n k) (atomLift hkn) ((piece n k s).toFun x)) := by + let F : (rightCylinder (DirectedGlobeComplex.complex n)).realization ⟶ source n k := + (globeIso n).inv ≫ piece n k s + have hgen := DirectedGlobeComplex.cylinder_generated n + (fun y => Nonempty (CompositionExpression (source n k) (atomLift hkn) (F.toFun y))) + (fun p b => by + change Nonempty (CompositionExpression _ _ ((piece n k s).toFun ((globeIso n).inv.toFun _))) + rw [piece_atom_eq_lift hkn s b] + exact ⟨CompositionExpression.generator (C := source n k) (g := atomLift hkn) + (⟨p, PastingGlobeCylinderBasis.pieceBasisMap hkn s b⟩ : (atomBasis hkn).AtomIndex)⟩) + (fun r y z hyz hy hz => by + have hf : (source n k).target r (F.toFun y) = (source n k).source r (F.toFun z) := + (F.map_face true r y).symm.trans + ((congrArg F.toFun hyz).trans (F.map_face false r z)) + change Nonempty (CompositionExpression _ _ (F.toFun + ((rightCylinder (DirectedGlobeComplex.complex n)).realization.comp r y z hyz))) + rw [F.map_comp r y z hyz hf] + obtain ⟨ty⟩ := hy + obtain ⟨tz⟩ := hz + exact ⟨.comp r hf ty tz⟩) + have hi : (globeIso n).inv.toFun ((globeIso n).hom.toFun x) = x := + congrArg (fun f => f.toFun x) (globeIso n).hom_inv_id + have hres := hgen ((globeIso n).hom.toFun x) + change Nonempty (CompositionExpression (source n k) (atomLift hkn) + ((piece n k s).toFun ((globeIso n).inv.toFun ((globeIso n).hom.toFun x)))) at hres + rw [hi] at hres + exact hres + +/-- The actual source pushout is composition-generated by the bounded +chosen lifts of the explicit pasted-cylinder atoms. -/ +theorem generated {n k : ℕ} (hkn : k < n) (x : source n k) : + Nonempty (CompositionExpression (source n k) (atomLift hkn) x) := by + have ht := PushoutGeneration.generated_by_pieces + (model.map (Globe.faceMap true k n)) (model.map (Globe.faceMap false k n)) x + obtain ⟨t⟩ := ht + exact t.substitute (𝟙 (source n k)) (fun a => by + cases a with + | inl y => exact piece_cell_generated hkn false y + | inr y => exact piece_cell_generated hkn true y) + +end +end Thomason.Construction.StrictOmegaCategory.PastingGlobe.CylinderSource + +end + +section + +/-! # Natural oriental comparison with the actual chain-cylinder model + +Composition generation of the simplex atoms gives naturality and +identifies both endpoint conventions with the global chain model. +-/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Functor _root_.OAI.Thomason.Construction.DirectedComplex SimplexComplex + +noncomputable section + +namespace NormalizedSimplexIdentities + +/-- The normalized directed simplex complexes, including degenerate maps. -/ +def chainCosimplicial (h : NormalizedSimplexIdentities) : + SimplexCategory ⥤ DirectedComplex.{0} where + obj m := directedComplex m.len (h.squared m.len) + map f := directedMap (h.squared _) (h.squared _) f.toOrderHom + (h.naturality f.toOrderHom) + map_id _ := by + apply DirectedComplex.Hom.ext_app + intro n x + exact mapChains_id x + map_comp f g := by + apply DirectedComplex.Hom.ext_app + intro n x + exact (mapChains_comp f.toOrderHom g.toOrderHom x).symm + +/-- The chain-cylinder cosimplicial object has precisely the earlier literal +strict objects and maps. -/ +def chainCylinderRealizationIso (h : NormalizedSimplexIdentities) : + h.chainCosimplicial ⋙ rightCylinderFunctor ⋙ realizationFunctor ≅ + h.cylinderCosimplicial := + NatIso.ofComponents (fun _ => Iso.refl _) (fun _ => rfl) + +end NormalizedSimplexIdentities + +namespace SimplexAtomsInput + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +/-- The inverse presentation of normalized chains commutes with all simplex +operators, including those which collapse a basis element to zero. -/ +def abelianizationCosimplicialIso : + h.cosimplicial ⋙ StrictOmegaCategory.Abelianization.functor ≅ + h.chainCosimplicial := + NatIso.ofComponents (fun m => a.abelianizationIso m.len) (by + intro m n f + apply DirectedComplex.Hom.ext_app + intro p z + have he : + (a.toSimplexApp n.len p).comp + ((StrictOmegaCategory.Abelianization.map (h.map f.toOrderHom)).app p) = + (mapChains f.toOrderHom p).toAddMonoidHom.comp (a.toSimplexApp m.len p) := by + apply StrictOmegaCategory.Abelianization.hom_ext + intro x + change a.toSimplexApp n.len p + ((StrictOmegaCategory.Abelianization.map (h.map f.toOrderHom)).app p + (StrictOmegaCategory.Abelianization.generator (h.object m.len) p x)) = _ + rw [StrictOmegaCategory.Abelianization.map_generator, + a.toSimplexChains_generator] + simp only [AddMonoidHom.comp_apply, a.toSimplexChains_generator] + rfl + exact DFunLike.congr_fun he z) + +/-- The actual chain-cylinder comparison, natural in the simplex. -/ +def chainModelComparison : + h.cylinderCosimplicial ≅ + h.cosimplicial ⋙ StrictOmegaCategory.GrayChainExtension.model := + h.chainCylinderRealizationIso.symm ≪≫ + isoWhiskerRight a.abelianizationCosimplicialIso.symm + (rightCylinderFunctor ⋙ realizationFunctor) ≪≫ + Functor.associator h.cosimplicial StrictOmegaCategory.Abelianization.functor + (rightCylinderFunctor ⋙ realizationFunctor) + +/-- On an oriental the actual abelianization unit is the realization of the +inverse normalized-chain presentation. -/ +theorem unit_eq_realized_inverse (m : ℕ) : + StrictOmegaCategory.Abelianization.unit (h.object m) = + (a.fromSimplexChains m).realization := by + let e := realizationFunctor.mapIso (a.abelianizationIso m) + apply (cancel_mono e.hom).mp + change StrictOmegaCategory.Abelianization.unit (h.object m) ≫ + (a.toSimplexChains m).realization = + (a.fromSimplexChains m).realization ≫ (a.toSimplexChains m).realization + exact (StrictOmegaCategory.Abelianization.unit_evaluate (𝟙 (h.object m))).trans + e.inv_hom_id.symm + +/-- The comparison preserves the two concrete interval endpoints. -/ +theorem chainModelComparison_endpoint (side : Bool) (m : SimplexCategory) : + (h.cylinderEndpoint side).app m ≫ a.chainModelComparison.hom.app m = + (StrictOmegaCategory.GrayChainExtension.modelEndpoint side).app + (h.object m.len) := by + let b := a.fromSimplexChains m.len + let K := directedComplex m.len (h.squared m.len) + let L := StrictOmegaCategory.Abelianization.complex (h.object m.len) + let eK : K.realization ⟶ (rightCylinder K).realization := + (RightCylinder.endpoint K side).realization + let eL : L.realization ⟶ (rightCylinder L).realization := + (RightCylinder.endpoint L side).realization + let v : K.realization ⟶ L.realization := b.realization + let cv : (rightCylinder K).realization ⟶ (rightCylinder L).realization := + (RightCylinder.map b).realization + have hn : eK ≫ cv = v ≫ eL := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext t p + exact RightCylinder.map_endpoint b side p (x.table t p) + change eK ≫ cv = StrictOmegaCategory.Abelianization.unit (h.object m.len) ≫ eL + exact hn.trans (congrArg (fun q : K.realization ⟶ L.realization => q ≫ eL) + (a.unit_eq_realized_inverse m.len).symm) + +end SimplexAtomsInput + +end + +end Thomason.Construction + +end + +section + +/-! # Source-only finite-globe tests for truncation + +In a globular category, fixing every source in degree n also fixes every +target. Thus a right adjoint's truncation can be tested using only source +collapse on the finite globe cylinders. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace StrictOmegaCategory.Globe + +/-- Source collapse alone detects truncation; target collapse follows from +the same-level globular identity. -/ +theorem truncated_iff_source_collapse (C : StrictOmegaCategory.{0}) (n : ℕ) : + C.IsTruncated n ↔ ∀ (m : ℕ) (f : category m ⟶ C), + collapse false n m ≫ f = f := by + constructor + · intro h m f + exact (truncated_iff_collapse C n).mp h m f false + · intro h x + obtain ⟨m, hx⟩ := C.finite_dimension x + let f : category m ⟶ C := lift C x hx + have he := congrArg (fun k : category m ⟶ C => k.toFun Cell.top) (h m f) + have hs : C.face false n x = x := (f.map_face false n Cell.top).symm.trans he + refine ⟨hs, ?_⟩ + calc + C.face true n x = C.face true n (C.face false n x) := congrArg _ hs.symm + _ = C.face false n x := C.face_face_same true false n x + _ = x := hs + +end StrictOmegaCategory.Globe + +/-- The right adjoint is truncated when all source collapses of its left +adjoint's actual globe cylinders are invisible in the target. -/ +theorem internalHom_truncated_iff_cylinder_source_globes + {F R : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} (adj : F ⊣ R) + (Y : StrictOmegaCategory.{0}) (n : ℕ) : + (R.obj Y).IsTruncated n ↔ + ∀ (m : ℕ) (f : F.obj (StrictOmegaCategory.Globe.category m) ⟶ Y), + F.map (StrictOmegaCategory.Globe.collapse false n m) ≫ f = f := by + rw [StrictOmegaCategory.Globe.truncated_iff_source_collapse] + constructor + · intro h m f + apply (adj.homEquiv _ _).injective + rw [adj.homEquiv_naturality_left] + exact h m ((adj.homEquiv _ _) f) + · intro h m g + have he := congrArg (adj.homEquiv (StrictOmegaCategory.Globe.category m) Y) + (h m ((adj.homEquiv _ _).symm g)) + simpa only [adj.homEquiv_naturality_left, Equiv.apply_symm_apply] using he + +end Thomason.Construction + +end + +section + +/-! # Source collapse of the concrete right-globe cylinder + +Collapsing a globe to its n-source changes its n-chain by the positive +boundary of its next-dimensional source generator. After tensoring on the +right with the interval, every map to an n-truncated target identifies +this collapse with the identity. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- The chain map presenting source collapse is the map of the source table. -/ +theorem chainMap_sourceCollapse {m n : ℕ} (hnm : n < m) : + chainMap (StrictOmegaCategory.Globe.collapse false n m) = + cellMap m ((topCell m).face false n) := by + apply (realizationHomEquiv m (complex m)).injective + change (chainMap _).realization = (cellMap _ _).realization + apply (cancel_epi (globeIso m).hom).mp + rw [chainMap_realization] + simp only [Iso.hom_inv_id_assoc] + apply StrictOmegaCategory.Globe.hom_ext + change (fromGlobe m).toFun ((StrictOmegaCategory.Globe.category m).face false n + StrictOmegaCategory.Globe.Cell.top) = + (cellMap m ((topCell m).face false n)).realization.toFun (topCell m) + apply ((fromGlobe m).map_face false n + (show StrictOmegaCategory.Globe.category m from StrictOmegaCategory.Globe.Cell.top)).trans + exact (cellMap_top_of_bounded m ((topCell m).face false n) + ((complex m).realization.dimensionLE_mono hnm.le + ((complex m).realization.face_dimensionLE false n (topCell m)))).symm + +/-- Below the collapsed source dimension every chain is unchanged. -/ +theorem chainMap_sourceCollapse_agree_below {m n : ℕ} (hnm : n < m) : + ∀ k, k < n → (chainMap (StrictOmegaCategory.Globe.collapse false n m)).app k = + (Hom.id (complex m)).app k := by + intro k hkn + rw [chainMap_sourceCollapse hnm] + apply AddMonoidHom.ext + intro v + induction v using Finsupp.induction_linear with + | zero => exact map_zero _ + | add v w hv hw => + change cellApp m ((topCell m).face false n) k (v + w) = v + w + change cellApp m ((topCell m).face false n) k v = v at hv + change cellApp m ((topCell m).face false n) k w = w at hw + rw [map_add, hv, hw] + rfl + | single s z => + change cellApp m ((topCell m).face false n) k (Finsupp.single s z) = + Finsupp.single s z + rw [cellApp_single] + change z • Cell.cutTable (topCell m) false n s.val k = _ + simp only [Cell.cutTable, hkn, ite_true] + have hkm : k < m := hkn.trans hnm + change z • topTable m s.val k = _ + simp [topTable, hkm] + +/-- The discrepancy at dimension n is an explicit positive boundary. -/ +theorem chainMap_sourceCollapse_positive_bridge {m n : ℕ} (hnm : n < m) : + ∀ v : (complex m).group n, v ∈ (complex m).positive n → + ∃ z : (complex m).group (n+1), z ∈ (complex m).positive (n+1) ∧ + (complex m).differential n z = (Hom.id (complex m)).app n v - + (chainMap (StrictOmegaCategory.Globe.collapse false n m)).app n v := by + classical + intro v hv + change Chains m n at v + change ∀ b : Basis m n, 0 ≤ v b at hv + let s : Basis m n := ⟨false, Or.inl hnm⟩ + let t : Basis m n := ⟨true, Or.inl hnm⟩ + let q : Basis m (n+1) := ⟨false, by + by_cases h : n+1 < m + · exact Or.inl h + · exact Or.inr ⟨by omega, rfl⟩⟩ + refine ⟨Finsupp.single q (v t), ?_, ?_⟩ + · change ∀ b, 0 ≤ Finsupp.single q (v t) b + intro b + by_cases hb : q = b + · subst b + simpa only [Finsupp.single_eq_same] using hv t + · simp only [Finsupp.single_apply, hb, ite_false, le_refl] + · rw [chainMap_sourceCollapse hnm] + let c : Chains m n →ₗ[ℤ] Chains m n := cellApp m ((topCell m).face false n) n + change differential m n (Finsupp.single q (v t)) = v - c v + have hc (b : Basis m n) (z : ℤ) : + c (Finsupp.single b z) = z • topTable m false n := by + change cellApp m ((topCell m).face false n) n (Finsupp.single b z) = _ + rw [cellApp_single] + change z • (if n < n then topTable m b.val n else + if n = n then topTable m false n else 0) = z • topTable m false n + simp only [Nat.lt_irrefl, ite_false, ite_true] + rw [differential_single] + have hdecomp : v = Finsupp.single s (v s) + Finsupp.single t (v t) := by + ext b + rcases b with ⟨b, hb⟩ + cases b <;> simp [s, t] + conv_rhs => rw [hdecomp, map_add, hc, hc] + simp only [boundary, hnm, dite_true, topTable, s, t] + simp only [smul_sub, Finsupp.smul_single, smul_eq_mul, mul_one] + abel + +/-- Every map from the actual right-cylinder globe to an n-truncated target +kills source collapse in dimension n. -/ +theorem rightGlobeCylinder_sourceCollapse {Y : StrictOmegaCategory.{0}} + {m n : ℕ} (hY : Y.IsTruncated n) + (H : rightGlobeCylinder.obj ⟨m⟩ ⟶ Y) : + rightGlobeCylinder.map (StrictOmegaCategory.Globe.collapse false n m) ≫ H = H := by + by_cases hnm : n < m + · have h := rightCylinder_realization_comp_eq_of_positive_degree_bridge + (chainMap (StrictOmegaCategory.Globe.collapse false n m)) (Hom.id (complex m)) + (chainMap_sourceCollapse_agree_below hnm) + (chainMap_sourceCollapse_positive_bridge hnm) hY H + change (RightCylinder.map (chainMap (StrictOmegaCategory.Globe.collapse false n m))).realization ≫ H = H + have hi : (RightCylinder.map (Hom.id (complex m))).realization = + 𝟙 (rightCylinder (complex m)).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext a k + cases k <;> rfl + rw [hi] at h + exact h.trans (Category.id_comp H) + · rw [StrictOmegaCategory.Globe.collapse_eq_id false (Nat.le_of_not_gt hnm)] + change rightGlobeCylinder.map (𝟙 (⟨m⟩ : StrictOmegaCategory.Globe.Shapes)) ≫ H = H + rw [rightGlobeCylinder.map_id, Category.id_comp] + +end + +end Thomason.Construction.DirectedGlobeComplex + +namespace Thomason.Construction + +open CategoryTheory + +/-- A literal comparison on all free globe cylinders suffices to derive +truncation of the right adjoint. No claim about arbitrary cells of a tensor +product is needed. -/ +theorem internalHom_truncated_of_rightGlobeComparison + {F R : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} (adj : F ⊣ R) + (e : StrictOmegaCategory.Globe.inclusion ⋙ F ≅ + DirectedGlobeComplex.rightGlobeCylinder) + {Y : StrictOmegaCategory.{0}} {n : ℕ} (hY : Y.IsTruncated n) : + (R.obj Y).IsTruncated n := by + apply (internalHom_truncated_iff_cylinder_source_globes adj Y n).mpr + intro m H + let u : F.obj (StrictOmegaCategory.Globe.category m) ⟶ + DirectedGlobeComplex.rightGlobeCylinder.obj ⟨m⟩ := e.hom.app ⟨m⟩ + let v : DirectedGlobeComplex.rightGlobeCylinder.obj ⟨m⟩ ⟶ + F.obj (StrictOmegaCategory.Globe.category m) := e.inv.app ⟨m⟩ + have huv : u ≫ v = 𝟙 _ := e.hom_inv_id_app ⟨m⟩ + have he := e.hom.naturality (show (⟨m⟩ : StrictOmegaCategory.Globe.Shapes) ⟶ ⟨m⟩ from + StrictOmegaCategory.Globe.collapse false n m) + change F.map (StrictOmegaCategory.Globe.collapse false n m) ≫ u = + u ≫ DirectedGlobeComplex.rightGlobeCylinder.map + (StrictOmegaCategory.Globe.collapse false n m) at he + have hc := DirectedGlobeComplex.rightGlobeCylinder_sourceCollapse hY (v ≫ H) + calc + F.map (StrictOmegaCategory.Globe.collapse false n m) ≫ H = + F.map (StrictOmegaCategory.Globe.collapse false n m) ≫ (u ≫ (v ≫ H)) := by + rw [← Category.assoc u v H, huv, Category.id_comp] + _ = u ≫ (DirectedGlobeComplex.rightGlobeCylinder.map + (StrictOmegaCategory.Globe.collapse false n m) ≫ (v ≫ H)) := by + rw [← Category.assoc, he, Category.assoc] + _ = u ≫ (v ≫ H) := congrArg (u ≫ ·) hc + _ = H := by rw [← Category.assoc, huv, Category.id_comp] + +/-- A natural comparison with the concrete free-globe cylinders gives +preservation of finite truncations by the right internal hom. -/ +theorem grayTruncationInput_of_rightGlobeComparison + {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (e : StrictOmegaCategory.Globe.inclusion ⋙ G.cylinder ≅ + DirectedGlobeComplex.rightGlobeCylinder) : GrayTruncationInput G := + ⟨fun _ Y => internalHom_truncated_of_rightGlobeComparison G.adjunction e Y.property⟩ + +end Thomason.Construction + +end + +section + +/-! # The actual extended cylinder on all free globes + +The finite-parameter Kan extension and the natural globe abelianization +isomorphisms identify the extended cylinder with the concrete right +chain cylinder on every globe and every strict map of globes. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory CategoryTheory.Functor _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Restriction of the global extension to globes agrees naturally with +its original chain model. -/ +def globeModelIso : Globe.inclusion ⋙ cylinder ≅ Globe.inclusion ⋙ model := + (isoWhiskerRight GlobePasting.globesInclusionIso cylinder).symm ≪≫ + Functor.associator _ _ _ ≪≫ + (isoWhiskerLeft GlobePasting.globes parameterIso).symm ≪≫ + (Functor.associator _ _ _).symm ≪≫ + isoWhiskerRight GlobePasting.globesInclusionIso model + +/-- The extended cylinder has the concrete signed right-cylinder values +and maps on the actual finite globes. -/ +def globeRestrictionIso : Globe.inclusion ⋙ cylinder ≅ + DirectedGlobeComplex.rightGlobeCylinder := + globeModelIso ≪≫ DirectedGlobeComplex.rightCylinderAbelianizationGlobeIso + +/-- Every right adjoint of the actual extension preserves truncation. +Adjointness itself is a separate construction; the truncation proof uses +only the now-established concrete globe restriction. -/ +theorem rightAdjoint_truncated {R : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} + (adj : cylinder ⊣ R) {Y : StrictOmegaCategory.{0}} {n : ℕ} + (hY : Y.IsTruncated n) : (R.obj Y).IsTruncated n := + internalHom_truncated_of_rightGlobeComparison adj globeRestrictionIso hY + +/-- A natural isomorphism of cylinder functors transports preservation of +finite truncations by their right adjoints. -/ +theorem truncationInput {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (e : G.cylinder ≅ cylinder) : GrayTruncationInput G := + grayTruncationInput_of_rightGlobeComparison G + (isoWhiskerLeft Globe.inclusion e ≪≫ globeRestrictionIso) + +end + +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GrayFinitePosetUnits.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GrayFinitePosetUnits.lean new file mode 100644 index 0000000000000000000000000000000000000000..8bb4db4d44c0d77f409cc688cfb63eaa31f4b854 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GrayFinitePosetUnits.lean @@ -0,0 +1,229 @@ +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Simplicial.PosetSieveNaturality +import OAI.CategoryTheory.Thomason.Simplicial.SubdivisionUnions +import OAI.CategoryTheory.Thomason.Transfer.NonsingularFaceGluing + +namespace OAI + +section + +/-! # Finite-poset unit comparisons from the strict Gray input alone + +Geometric gluing and direct realization of the Gray prisms remove every +Kan–Quillen hypothesis from these unit comparisons. The exact right Gray +and finite internal-hom truncation inputs remain explicit. +-/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits +open scoped Simplicial + +namespace RelativePrismData + +theorem weakEquivalence_iff_direct {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) : + h.streetWeakEquivalences (h.categorification.map (nerveMap D.first.monotone.functor)) ↔ + h.streetWeakEquivalences (h.categorification.map (nerveMap D.last.monotone.functor)) := by + have hfirst := D.prism_endpoint h G false + have hlast := D.prism_endpoint h G true + let W : (h.categorification.obj (nerve E) ⟶ h.categorification.obj (nerve E)) → Prop := + fun f => h.streetWeakEquivalences f + exact (congrArg W hfirst).symm.to_iff.trans + ((G.cylinder_weakEquivalence_iff_direct aw (D.prism h G)).trans + (congrArg W hlast).to_iff) + +end RelativePrismData + +theorem nerve_greatest_point_weakEquivalences_direct {P : Type} [PartialOrder P] (x : P) (hx : ∀ y, y ≤ x) : + realizationWeakEquivalences (nerveMap (posetFromPoint x).monotone.functor) ∧ + realizationWeakEquivalences (nerveMap (posetToPoint P).monotone.functor) := by + apply retraction_weakEquivalences realizationWeakEquivalences + · rw [← orderNerveMap_comp, poset_point_retraction, orderNerveMap_id] + · rw [← orderNerveMap_comp] + apply (RealizedCylinder.weakEquivalence_iff (orderNerveHomotopy OrderHom.id + ((posetFromPoint x).comp (posetToPoint P)) hx)).mp + rw [orderNerveMap_id] + exact realizationWeakEquivalences.id_mem _ + +namespace NormalizedSimplexIdentities + +variable (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +theorem unit_of_point_iso_direct + {X : SSet.{0}} (e : (Δ[0] : SSet.{0}) ≅ X) : + realizationWeakEquivalences (h.categorificationAdjunction.unit.app X) := by + have := h.unit_point_isIso + exact (weak_component_iff realizationWeakEquivalences h.categorificationAdjunction.unit + e.hom (realizationWeakEquivalences.of_isIso _) + (realizationWeakEquivalences.of_isIso _)).mp + (realizationWeakEquivalences.of_isIso _) + +/-- The same contraction is weak after actual strict categorification. -/ +theorem categorified_greatest_point_weakEquivalences_direct + (G : RightGrayInput h) (aw : SimplexComplex.AlexanderWhitneyInput h) + + {P : Type} [PartialOrder P] (x : P) (hx : ∀ y, y ≤ x) : + h.streetWeakEquivalences (h.posetMap (posetFromPoint x)) ∧ + h.streetWeakEquivalences (h.posetMap (posetToPoint P)) := by + have : h.streetWeakEquivalences.HasTwoOutOfThreeProperty := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).HasTwoOutOfThreeProperty + have : h.streetWeakEquivalences.IsStableUnderRetracts := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).IsStableUnderRetracts + have : h.streetWeakEquivalences.ContainsIdentities := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).ContainsIdentities + apply retraction_weakEquivalences h.streetWeakEquivalences + · rw [← h.posetMap_comp, poset_point_retraction, h.posetMap_id] + · rw [← h.posetMap_comp] + apply ((greatestElementPrism x hx).weakEquivalence_iff_direct h G aw).mp + change h.streetWeakEquivalences (h.posetMap (OrderHom.id : P →o P)) + rw [h.posetMap_id] + exact h.streetWeakEquivalences.id_mem _ + +/-- The finite-poset unit input is proved here for every greatest-element +poset; finiteness is not needed in this case. -/ +theorem unit_greatestElement_direct (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + {P : Type} [PartialOrder P] (x : P) (hx : ∀ y, y ≤ x) : + realizationWeakEquivalences (h.categorificationAdjunction.unit.app (nerve P)) := by + exact (weak_component_iff realizationWeakEquivalences h.categorificationAdjunction.unit + (nerveMap (posetFromPoint x).monotone.functor) + (nerve_greatest_point_weakEquivalences_direct x hx).1 + (h.categorified_greatest_point_weakEquivalences_direct G aw x hx).1).mp + (h.unit_of_point_iso_direct (SSet.stdSimplex.isoNerve 0)) + +end NormalizedSimplexIdentities + +namespace FiniteReflectionInput + +variable {n : ℕ} (r : FiniteReflectionInput n) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +theorem unit_of_point_iso_direct + {X : SSet.{0}} (e : (Δ[0] : SSet.{0}) ≅ X) : + realizationWeakEquivalences ((r.categorificationAdjunction h).unit.app X) := by + have := r.unit_point_isIso h + exact (weak_component_iff realizationWeakEquivalences (r.categorificationAdjunction h).unit + e.hom (realizationWeakEquivalences.of_isIso _) + (realizationWeakEquivalences.of_isIso _)).mp + (realizationWeakEquivalences.of_isIso _) + +/-- Reflection of the strict contraction gives actual finite Street weak +equivalences on both the point inclusion and the collapse. -/ +theorem categorified_greatest_point_weakEquivalences_direct + (G : RightGrayInput h) (t : GrayTruncationInput G) + (aw : SimplexComplex.AlexanderWhitneyInput h) + {P : Type} [PartialOrder P] (x : P) (hx : ∀ y, y ≤ x) : + realizationWeakEquivalences ((h.finiteStreetNerve (n + 1)).map + (r.reflect.map (h.posetMap (posetFromPoint x)))) ∧ + realizationWeakEquivalences ((h.finiteStreetNerve (n + 1)).map + (r.reflect.map (h.posetMap (posetToPoint P)))) := by + let F := h.categorification ⋙ r.reflect ⋙ h.finiteStreetNerve (n + 1) + apply retraction_weakEquivalences realizationWeakEquivalences + · change F.map (nerveMap (posetFromPoint x).monotone.functor) ≫ + F.map (nerveMap (posetToPoint P).monotone.functor) = 𝟙 _ + rw [← F.map_comp, ← orderNerveMap_comp, poset_point_retraction, + orderNerveMap_id, F.map_id] + · change realizationWeakEquivalences (F.map (nerveMap (posetToPoint P).monotone.functor) ≫ + F.map (nerveMap (posetFromPoint x).monotone.functor)) + rw [← F.map_comp, ← orderNerveMap_comp] + apply ((greatestElementPrism x hx).finite_weakEquivalence_iff_direct h G t r aw).mp + change realizationWeakEquivalences (F.map (nerveMap (OrderHom.id : P →o P).monotone.functor)) + rw [orderNerveMap_id, F.map_id] + exact realizationWeakEquivalences.id_mem _ + +/-- The actual unit comparison is weak on all greatest-element posets in +dimension n+1. No finite-poset unit theorem is used. -/ +theorem unit_greatestElement_direct + (G : RightGrayInput h) (t : GrayTruncationInput G) + (aw : SimplexComplex.AlexanderWhitneyInput h) + {P : Type} [PartialOrder P] (x : P) (hx : ∀ y, y ≤ x) : + realizationWeakEquivalences ((r.categorificationAdjunction h).unit.app (nerve P)) := by + exact (weak_component_iff realizationWeakEquivalences (r.categorificationAdjunction h).unit + (nerveMap (posetFromPoint x).monotone.functor) + (nerve_greatest_point_weakEquivalences_direct x hx).1 + (r.categorified_greatest_point_weakEquivalences_direct h G t aw x hx).1).mp + (r.unit_of_point_iso_direct h (SSet.stdSimplex.isoNerve 0)) + +end FiniteReflectionInput + +namespace NormalizedSimplexIdentities + +variable (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +/-- Finite-poset units in omega dimension require the strict Gray input, +with no Kan–Quillen, extension, transfer, or localization assumption. -/ +theorem unit_finite_poset_fromGray (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + (P : Type) [PartialOrder P] [Finite P] : + realizationWeakEquivalences (h.categorificationAdjunction.unit.app (nerve P)) := by + let s := h.constructedOmegaPosetSieveInput.allDimensions + refine finite_poset_comparison_induction h.categorificationAdjunction.unit + constructedSimplicialGluingUnconditional ?_ ?_ ?_ ?_ P + · intro Q _ _ + have := h.unit_empty_isIso Q + exact realizationWeakEquivalences.of_isIso _ + · intro Q _ x hx + exact h.unit_greatestElement_direct G aw x hx + · intro Q _ _ A hA + exact s.omega_nerve_mono A hA + · intro Q _ _ A B hA hB hc + exact h.street_sieve_maps_isPushout s A B hA hB hc + +end NormalizedSimplexIdentities + +namespace FiniteReflectionInput + +variable {n : ℕ} (r : FiniteReflectionInput n) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +/-- The finite-dimensional unit comparison only adds the specified +interval internal-hom truncation input. -/ +theorem unit_finite_poset_fromGray (G : RightGrayInput h) (t : GrayTruncationInput G) + (aw : SimplexComplex.AlexanderWhitneyInput h) + (P : Type) [PartialOrder P] [Finite P] : + realizationWeakEquivalences ((r.categorificationAdjunction h).unit.app (nerve P)) := by + let s := h.constructedOmegaPosetSieveInput.allDimensions + refine finite_poset_comparison_induction (r.categorificationAdjunction h).unit + constructedSimplicialGluingUnconditional ?_ ?_ ?_ ?_ P + · intro Q _ _ + have := r.unit_empty_isIso h Q + exact realizationWeakEquivalences.of_isIso _ + · intro Q _ x hx + exact r.unit_greatestElement_direct h G t aw x hx + · intro Q _ _ A hA + exact r.posetStreet_mono h s A hA + · intro Q _ _ A B hA hB hc + exact r.street_sieve_maps_isPushout h s A B hA hB hc + +end FiniteReflectionInput + +namespace NormalizedSimplexIdentities + +variable (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +/-- Strict Gray cylinder comparisons and finite internal-hom truncation give +the finite-poset unit comparisons. -/ +theorem finitePosetUnitInput_fromGray (G : RightGrayInput h) (t : GrayTruncationInput G) + (aw : SimplexComplex.AlexanderWhitneyInput h) : PublishedFinitePosetUnitInput h where + omega P := h.unit_finite_poset_fromGray G aw P + finite _ r P := r.unit_finite_poset_fromGray h G t aw P + +/-- On finite-poset nerves the actual Street and ordinary realization weak +criteria agree using only the right Gray data. -/ +theorem finite_poset_map_weakEquivalence_fromGray + (G : RightGrayInput h) (aw : SimplexComplex.AlexanderWhitneyInput h) + {P Q : Type} [PartialOrder P] [PartialOrder Q] [Finite P] [Finite Q] + (f : nerve P ⟶ nerve Q) : + h.streetWeakEquivalences (h.categorification.map f) ↔ realizationWeakEquivalences f := + map_iff_of_unit_components realizationWeakEquivalences h.categorificationAdjunction.unit f + (h.unit_finite_poset_fromGray G aw P) (h.unit_finite_poset_fromGray G aw Q) + +end NormalizedSimplexIdentities + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingEndpointEvaluation.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingEndpointEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..53e164e470cbea0899c6abd11cf329d4aad224ae --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingEndpointEvaluation.lean @@ -0,0 +1,1008 @@ +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.TopologicalIntervalCylinder +import OAI.CategoryTheory.Thomason.Strict.StrictTerminalConeCategory +import OAI.CategoryTheory.Thomason.Transfer.PastingGlobeCylinderPushout + +namespace OAI + +section + +/-! # The extended cylinder is composition-generated by its globe images -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +def parameterLeg {C : StrictOmegaCategory.{0}} (i : GlobePasting.Shape) + (f : GlobePasting.object i ⟶ C) : model.obj (GlobePasting.object i) ⟶ cylinder.obj C := + parameterIso.hom.app i ≫ cylinder.map f + +def globeLeg {C : StrictOmegaCategory.{0}} (n : ℕ) (f : Globe.category n ⟶ C) : + model.obj (Globe.category n) ⟶ cylinder.obj C := parameterLeg (.globe n) f + +theorem parameterLeg_naturality {C : StrictOmegaCategory.{0}} + {i j : GlobePasting.Shape} (u : i ⟶ j) (f : GlobePasting.object j ⟶ C) : + model.map u ≫ parameterLeg j f = parameterLeg i (u ≫ f) := by + let pi : model.obj (GlobePasting.object i) ⟶ cylinder.obj (GlobePasting.object i) := + parameterIso.hom.app i + let pj : model.obj (GlobePasting.object j) ⟶ cylinder.obj (GlobePasting.object j) := + parameterIso.hom.app j + have he : model.map u ≫ pj = pi ≫ cylinder.map u := parameterIso.hom.naturality u + change model.map u ≫ (pj ≫ cylinder.map f) = pi ≫ cylinder.map (u ≫ f) + exact (Category.assoc _ _ _).symm.trans + ((congrArg (fun q => q ≫ cylinder.map f) he).trans + ((Category.assoc _ _ _).trans + (congrArg (fun q => pi ≫ q) (cylinder.map_comp u f).symm))) + +theorem pair_image_generated {C : StrictOmegaCategory.{0}} {I : Type} + (g : I → cylinder.obj C) + (n k : ℕ) (hk : k < n) (f : PastingGlobe.category n n k ⟶ C) + (hL : ∀ x, Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (PastingGlobe.left n n k ≫ f)).toFun x))) + (hR : ∀ x, Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (PastingGlobe.right n n k ≫ f)).toFun x))) + (x : model.obj (PastingGlobe.category n n k)) : + Nonempty (CompositionExpression (cylinder.obj C) g ((parameterLeg (.pair n k hk) f).toFun x)) := by + let e := PastingGlobe.CylinderSource.modelIso hk + let L : model.obj (PastingGlobe.category n n k) ⟶ cylinder.obj C := + parameterLeg (.pair n k hk) f + obtain ⟨t⟩ := PushoutGeneration.generated_by_pieces + (model.map (Globe.faceMap true k n)) (model.map (Globe.faceMap false k n)) (e.inv.toFun x) + have hl : pushout.inl (model.map (Globe.faceMap true k n)) + (model.map (Globe.faceMap false k n)) ≫ (e.hom ≫ L) = + globeLeg n (PastingGlobe.left n n k ≫ f) := by + change pushout.inl _ _ ≫ ((PastingGlobe.CylinderSource.modelIso hk).hom ≫ L) = _ + rw [PastingGlobe.CylinderSource.modelIso_hom, ← Category.assoc] + change (PastingGlobe.CylinderSource.piece n k false ≫ + PastingGlobe.CylinderSource.comparison n k) ≫ L = _ + rw [PastingGlobe.CylinderSource.piece_comparison n k false] + exact parameterLeg_naturality + (show GlobePasting.Shape.globe n ⟶ .pair n k hk from PastingGlobe.left n n k) f + have hr : pushout.inr (model.map (Globe.faceMap true k n)) + (model.map (Globe.faceMap false k n)) ≫ (e.hom ≫ L) = + globeLeg n (PastingGlobe.right n n k ≫ f) := by + change pushout.inr _ _ ≫ ((PastingGlobe.CylinderSource.modelIso hk).hom ≫ L) = _ + rw [PastingGlobe.CylinderSource.modelIso_hom, ← Category.assoc] + change (PastingGlobe.CylinderSource.piece n k true ≫ + PastingGlobe.CylinderSource.comparison n k) ≫ L = _ + rw [PastingGlobe.CylinderSource.piece_comparison n k true] + exact parameterLeg_naturality + (show GlobePasting.Shape.globe n ⟶ .pair n k hk from PastingGlobe.right n n k) f + have hh := t.substitute (e.hom ≫ L) (fun a => by + cases a with + | inl y => + change Nonempty (CompositionExpression _ _ + ((pushout.inl _ _ ≫ (e.hom ≫ L)).toFun y)) + rw [hl] + exact hL y + | inr y => + change Nonempty (CompositionExpression _ _ + ((pushout.inr _ _ ≫ (e.hom ≫ L)).toFun y)) + rw [hr] + exact hR y) + have he : e.hom.toFun (e.inv.toFun x) = x := + congrArg (fun q => q.toFun x) e.inv_hom_id + change Nonempty (CompositionExpression _ _ (L.toFun (e.hom.toFun (e.inv.toFun x)))) at hh + rw [he] at hh + exact hh + +/-- A generating family containing every globe image generates the actual +extended cylinder; binary parameters add only composites. -/ +theorem generated_by_globe_images {C : StrictOmegaCategory.{0}} {I : Type} + (g : I → cylinder.obj C) + (h : ∀ n (f : Globe.category n ⟶ C) x, + Nonempty (CompositionExpression (cylinder.obj C) g ((globeLeg n f).toFun x))) + (x : cylinder.obj C) : Nonempty (CompositionExpression (cylinder.obj C) g x) := by + have hp (i : GlobePasting.Shape) (f : GlobePasting.object i ⟶ C) + (y : model.obj (GlobePasting.object i)) : + Nonempty (CompositionExpression (cylinder.obj C) g ((parameterLeg i f).toFun y)) := by + cases i with + | globe n => exact h n f y + | pair n k hk => exact pair_image_generated g n k hk f (h n _) (h n _) y + obtain ⟨t⟩ := ColimitGeneration.generated_by_pieces + (presentationCocone C) (presentationIsColimit C) x + exact t.substitute (𝟙 (cylinder.obj C)) (fun a => by + rcases a with ⟨j, y⟩ + change Nonempty (CompositionExpression (cylinder.obj C) g + (((presentationCocone C).ι.app j).toFun y)) + rw [presentation_leg] + change Nonempty (CompositionExpression (cylinder.obj C) g + ((parameterLeg j.left j.hom).toFun y)) + exact hp j.left j.hom y) + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Actual bounded lifts of the ordered chain-cylinder atoms -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def comparisonToRealization (K : DirectedComplex.{0}) : + cylinder.obj K.realization ⟶ (rightCylinder K).realization := + comparison.app K.realization ≫ + (RightCylinder.map (Abelianization.evaluateHom (𝟙 K.realization))).realization + +theorem evaluation_globe {K : DirectedComplex.{0}} {n : ℕ} + (f : Globe.category n ⟶ K.realization) : + Abelianization.functor.map f ≫ Abelianization.evaluateHom (𝟙 K.realization) = + (DirectedGlobeComplex.abelianizationIso n).hom ≫ + DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top) := by + let a : Abelianization.functor.obj (Globe.category n) ⟶ K := + (DirectedGlobeComplex.abelianizationIso n).hom ≫ + DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top) + let b : Abelianization.functor.obj K.realization ⟶ K := + Abelianization.evaluateHom (𝟙 K.realization) + change Abelianization.functor.map f ≫ b = a + apply (Abelianization.adjunction.homEquiv _ _).injective + rw [Abelianization.adjunction.homEquiv_naturality_left] + change f ≫ (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (𝟙 K.realization)).realization) = + (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization) ≫ + (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top)).realization + have hK : Abelianization.unit K.realization ≫ + (Abelianization.evaluateHom (𝟙 K.realization)).realization = 𝟙 K.realization := + Abelianization.unit_evaluate _ + have hn : Abelianization.unit (Globe.category n) ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization = + DirectedGlobeComplex.fromGlobe n := Abelianization.unit_evaluate _ + rw [hK, hn, Category.comp_id] + apply Globe.hom_ext + exact (DirectedGlobeComplex.cellMap_top_of_bounded n _ + (f.dimensionLE (Globe.category_truncated n Globe.Cell.top))).symm + +theorem globeLeg_comparison {K : DirectedComplex.{0}} {n : ℕ} + (f : Globe.category n ⟶ K.realization) : + globeLeg n f ≫ comparisonToRealization K = (modelGlobeIso n).hom ≫ + (RightCylinder.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top))).realization := by + let pi : model.obj (Globe.category n) ⟶ cylinder.obj (Globe.category n) := + parameterIso.hom.app (.globe n) + let cG : cylinder.obj (Globe.category n) ⟶ model.obj (Globe.category n) := + comparison.app (Globe.category n) + let cK : cylinder.obj K.realization ⟶ model.obj K.realization := + comparison.app K.realization + let fM : model.obj (Globe.category n) ⟶ model.obj K.realization := model.map f + let fC : cylinder.obj (Globe.category n) ⟶ cylinder.obj K.realization := cylinder.map f + have hn : pi ≫ cG = 𝟙 _ := + congrArg (fun q => q.app (.globe n)) parameter_comparison + have hf : fC ≫ cK = cG ≫ fM := comparison.naturality f + have he : globeLeg n f ≫ cK = fM := by + change (pi ≫ fC) ≫ cK = fM + calc + _ = pi ≫ (fC ≫ cK) := Category.assoc _ _ _ + _ = pi ≫ (cG ≫ fM) := congrArg (fun q => pi ≫ q) hf + _ = (pi ≫ cG) ≫ fM := (Category.assoc _ _ _).symm + _ = fM := by rw [hn, Category.id_comp] + let T := rightCylinderFunctor ⋙ realizationFunctor + let b : Abelianization.functor.obj K.realization ⟶ K := + Abelianization.evaluateHom (𝟙 K.realization) + change globeLeg n f ≫ (cK ≫ T.map b) = _ + refine (Category.assoc _ _ _).symm.trans + ((congrArg (fun q => q ≫ T.map b) he).trans ?_) + change T.map (Abelianization.functor.map f) ≫ T.map b = _ + exact (T.map_comp (Abelianization.functor.map f) b).symm.trans + ((congrArg T.map (evaluation_globe f)).trans + (T.map_comp (DirectedGlobeComplex.abelianizationIso n).hom + (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top)))) + +theorem globeEndpoint_image {K : DirectedComplex.{0}} {n : ℕ} + (f : Globe.category n ⟶ K.realization) (a : Bool) : + (comparisonToRealization K).toFun ((globeLeg n f).toFun (endpointTop n a)) = + Cell.map (RightCylinder.endpoint K a) (f.toFun Globe.Cell.top) := by + have he := congrArg (fun q => q.toFun (endpointTop n a)) (globeLeg_comparison f) + have hi := congrArg (fun q => q.toFun + (Cell.map (RightCylinder.endpoint _ a) (DirectedGlobeComplex.topCell n))) + (modelGlobeIso n).inv_hom_id + have ht : Cell.map (RightCylinder.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top))) + (Cell.map (RightCylinder.endpoint _ a) (DirectedGlobeComplex.topCell n)) = + Cell.map (RightCylinder.endpoint K a) (f.toFun Globe.Cell.top) := by + have hh : Cell.map (RightCylinder.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top))) + (Cell.map (RightCylinder.endpoint _ a) (DirectedGlobeComplex.topCell n)) = + Cell.map (RightCylinder.endpoint K a) + (Cell.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top)) + (DirectedGlobeComplex.topCell n)) := by + apply Cell.ext + funext c p + exact RightCylinder.map_endpoint (DirectedGlobeComplex.cellMap n _) a p _ + exact hh.trans (congrArg (Cell.map (RightCylinder.endpoint K a)) + (DirectedGlobeComplex.cellMap_top_of_bounded n _ + (f.dimensionLE (Globe.category_truncated n Globe.Cell.top)))) + exact he.trans ((congrArg + (RightCylinder.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top))).realization.toFun hi).trans ht) + +theorem globePrism_image {K : DirectedComplex.{0}} {n : ℕ} + (f : Globe.category n ⟶ K.realization) : + (comparisonToRealization K).toFun ((globeLeg n f).toFun (prismTop n)) = + RightCylinder.prism (f.toFun Globe.Cell.top) := by + have he := congrArg (fun q => q.toFun (prismTop n)) (globeLeg_comparison f) + have hi := congrArg (fun q => q.toFun (RightCylinder.prism (DirectedGlobeComplex.topCell n))) + (modelGlobeIso n).inv_hom_id + exact he.trans ((congrArg + (RightCylinder.map (DirectedGlobeComplex.cellMap n (f.toFun Globe.Cell.top))).realization.toFun hi).trans + ((RightCylinder.prism_naturality (DirectedGlobeComplex.cellMap n _) + (DirectedGlobeComplex.topCell n)).trans + (congrArg RightCylinder.prism (DirectedGlobeComplex.cellMap_top_of_bounded n _ + (f.dimensionLE (Globe.category_truncated n Globe.Cell.top)))))) + +def atomLift {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) : + {p : ℕ} → B.CylinderIndex p → cylinder.obj K.realization + | p, .endpoint a b => (globeLeg p (Globe.lift K.realization (B.atom p b) (B.atom_dimension p b))).toFun + (endpointTop p a) + | _, @RightCylinderBasis.Basis.mixed _ q b => + (globeLeg q (Globe.lift K.realization (B.atom q b) (B.atom_dimension q b))).toFun (prismTop q) + +theorem atomLift_dimension {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + {p : ℕ} (b : B.CylinderIndex p) : + (cylinder.obj K.realization).DimensionLE p (atomLift B b) := by + cases b with + | endpoint a b => exact (globeLeg _ _).dimensionLE (endpointTop_dimension _ a) + | mixed b => exact (globeLeg _ _).dimensionLE (prismTop_dimension _) + +theorem atomLift_image {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + {p : ℕ} (b : B.CylinderIndex p) : + (comparisonToRealization K).toFun (atomLift B b) = B.cylinderAtom b := by + cases b with + | endpoint a b => exact globeEndpoint_image _ a + | mixed b => exact globePrism_image _ + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Composition of bounded maps from actual globe cylinders + +The proved cylinder pushout glues matching bounded maps. Restricting the +gluing to the universal composite gives the required mapping-cell +composition, with literal source, target, and postcomposition equations. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +abbrev model := GrayChainExtension.model + +/-- The universal composite, with its common finite bound made explicit. -/ +def compositionGlobe (n k : ℕ) (hk : k < n) : + Globe.category n ⟶ PastingGlobe.category n n k := + Globe.lift _ (PastingGlobe.composite n n k) (by + simpa only [Nat.max_self] using PastingGlobe.composite_dimension n n k + (show k < max n n by simpa only [Nat.max_self] using hk)) + +theorem compositionGlobe_source (n k : ℕ) (hk : k < n) : + Globe.faceMap false k n ≫ compositionGlobe n k hk = + Globe.faceMap false k n ≫ PastingGlobe.left n n k := by + apply Globe.hom_ext + exact ((compositionGlobe n k hk).map_face false k Globe.Cell.top).trans + (((PastingGlobe.category n n k).source_comp k (PastingGlobe.leftCell n n k) + (PastingGlobe.rightCell n n k) (PastingGlobe.matching n n k)).trans + ((PastingGlobe.left n n k).map_face false k Globe.Cell.top).symm) + +theorem compositionGlobe_target (n k : ℕ) (hk : k < n) : + Globe.faceMap true k n ≫ compositionGlobe n k hk = + Globe.faceMap true k n ≫ PastingGlobe.right n n k := by + apply Globe.hom_ext + exact ((compositionGlobe n k hk).map_face true k Globe.Cell.top).trans + (((PastingGlobe.category n n k).target_comp k (PastingGlobe.leftCell n n k) + (PastingGlobe.rightCell n n k) (PastingGlobe.matching n n k)).trans + ((PastingGlobe.right n n k).map_face true k Globe.Cell.top).symm) + +variable {D E : StrictOmegaCategory.{0}} {n k : ℕ} + +/-- Glue the actual maps on the two cylinder pieces. -/ +def glue (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + model.obj (PastingGlobe.category n n k) ⟶ D := + (PastingGlobe.CylinderSource.isPushout hk).desc f g h + +@[reassoc (attr := simp)] theorem glue_left (hk : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + model.map (PastingGlobe.left n n k) ≫ glue hk f g h = f := + (PastingGlobe.CylinderSource.isPushout hk).inl_desc f g h + +@[reassoc (attr := simp)] theorem glue_right (hk : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + model.map (PastingGlobe.right n n k) ≫ glue hk f g h = g := + (PastingGlobe.CylinderSource.isPushout hk).inr_desc f g h + +/-- Composition in a fixed finite mapping level. -/ +def composite (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : model.obj (Globe.category n) ⟶ D := + model.map (compositionGlobe n k hk) ≫ glue hk f g h + +theorem composite_source (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + model.map (Globe.faceMap false k n) ≫ composite hk f g h = + model.map (Globe.faceMap false k n) ≫ f := by + change model.map (Globe.faceMap false k n) ≫ + (model.map (compositionGlobe n k hk) ≫ glue hk f g h) = _ + rw [← Category.assoc, ← model.map_comp, compositionGlobe_source, + model.map_comp, Category.assoc, glue_left] + +theorem composite_target (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + model.map (Globe.faceMap true k n) ≫ composite hk f g h = + model.map (Globe.faceMap true k n) ≫ g := by + change model.map (Globe.faceMap true k n) ≫ + (model.map (compositionGlobe n k hk) ≫ glue hk f g h) = _ + rw [← Category.assoc, ← model.map_comp, compositionGlobe_target, + model.map_comp, Category.assoc, glue_right] + +theorem glue_postcompose (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) (u : D ⟶ E) + (hu : model.map (Globe.faceMap true k n) ≫ (f ≫ u) = + model.map (Globe.faceMap false k n) ≫ (g ≫ u)) : + glue hk (f ≫ u) (g ≫ u) hu = glue hk f g h ≫ u := by + apply (PastingGlobe.CylinderSource.isPushout hk).hom_ext + · rw [glue_left, ← Category.assoc, glue_left] + · rw [glue_right, ← Category.assoc, glue_right] + +theorem composite_postcompose (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) (u : D ⟶ E) + (hu : model.map (Globe.faceMap true k n) ≫ (f ≫ u) = + model.map (Globe.faceMap false k n) ≫ (g ≫ u)) : + composite hk (f ≫ u) (g ≫ u) hu = composite hk f g h ≫ u := by + change model.map (compositionGlobe n k hk) ≫ glue hk (f ≫ u) (g ≫ u) hu = _ + rw [glue_postcompose, ← Category.assoc] + rfl + +/-- The glued composite has exactly the required source in the actual union. -/ +theorem composite_cell_source (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (composite hk f g h)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n f) := by + simp only [GlobeMappingCells.face_ι, composite_source] + +theorem composite_cell_target (hk : k < n) (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (composite hk f g h)) = + GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n g) := by + simp only [GlobeMappingCells.face_ι, composite_target] + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Generation of cylinder images under bounds, faces and composition -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {C : StrictOmegaCategory.{0}} {I : Type} (g : I → cylinder.obj C) + +def CellImageGenerated (n : ℕ) (x : C) (hx : C.DimensionLE n x) : Prop := + ∀ z : model.obj (Globe.category n), Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun z)) + +theorem cellImageGenerated_mono {n m : ℕ} (hnm : n ≤ m) (x : C) + (hx : C.DimensionLE n x) (hm : C.DimensionLE m x) + (h : CellImageGenerated g n x hx) : CellImageGenerated g m x hm := by + intro z + have hf : Globe.lower m n hnm ≫ Globe.lift C x hx = Globe.lift C x hm := by + apply Globe.hom_ext + rfl + have he := parameterLeg_naturality + (show GlobePasting.Shape.globe m ⟶ .globe n from Globe.lower m n hnm) (Globe.lift C x hx) + change model.map (Globe.lower m n hnm) ≫ globeLeg n (Globe.lift C x hx) = + globeLeg m (Globe.lower m n hnm ≫ Globe.lift C x hx) at he + rw [hf] at he + have hh := h ((model.map (Globe.lower m n hnm)).toFun z) + exact (congrArg (fun f => f.toFun z) he) ▸ hh + +theorem cellImageGenerated_comp {n k : ℕ} (hk : k < n) (x y : C) + (hx : C.DimensionLE n x) (hy : C.DimensionLE n y) + (hxy : C.target k x = C.source k y) + (hc : C.DimensionLE n (C.comp k x y hxy)) + (hX : CellImageGenerated g n x hx) (hY : CellImageGenerated g n y hy) : + CellImageGenerated g n (C.comp k x y hxy) hc := by + intro z + let f := PastingGlobe.desc C x y hx hy hxy + have hL : PastingGlobe.left n n k ≫ f = Globe.lift C x hx := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + have hR : PastingGlobe.right n n k ≫ f = Globe.lift C y hy := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + have hC : GrayMapping.compositionGlobe n k hk ≫ f = Globe.lift C (C.comp k x y hxy) hc := by + apply Globe.hom_ext + exact PastingGlobe.desc_composite _ _ _ _ _ _ + have hh := pair_image_generated g n k hk f + (by simpa only [hL, CellImageGenerated] using hX) + (by simpa only [hR, CellImageGenerated] using hY) + ((model.map (GrayMapping.compositionGlobe n k hk)).toFun z) + have he := parameterLeg_naturality + (show GlobePasting.Shape.globe n ⟶ .pair n k hk from GrayMapping.compositionGlobe n k hk) f + change model.map (GrayMapping.compositionGlobe n k hk) ≫ parameterLeg (.pair n k hk) f = + globeLeg n (GrayMapping.compositionGlobe n k hk ≫ f) at he + rw [hC] at he + exact (congrArg (fun f => f.toFun z) he) ▸ hh + +private theorem ordered_expression {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + (x : K.realization) : Nonempty (CompositionExpression K.realization B.atomCell x) := by + apply B.generated (fun x => Nonempty (CompositionExpression K.realization B.atomCell x)) + (fun p b => ⟨CompositionExpression.generator (C := K.realization) + (g := B.atomCell) ⟨p, b⟩⟩) _ x + intro r u v huv hu hv + obtain ⟨tu⟩ := hu + obtain ⟨tv⟩ := hv + exact ⟨CompositionExpression.comp r huv tu tv⟩ + +/-- At a fixed bound, the two top endpoints and the top prism suffice once +all lower-dimensional face images have been generated. -/ +theorem cellImageGenerated_of_top {n : ℕ} (x : C) (hx : C.DimensionLE n x) + (hsmall : ∀ p, p < n → ∀ a, + CellImageGenerated g p (C.face a p x) (C.face_dimensionLE a p x)) + (he : ∀ a, Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun (endpointTop n a)))) + (hp : Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun (prismTop n)))) : + CellImageGenerated g n x hx := by + intro z + let B := DirectedGlobeComplex.cylinderOrderedAtomBasis n + let e := modelGlobeIso n + let F := e.inv ≫ globeLeg n (Globe.lift C x hx) + have hface {p : ℕ} (hpn : p < n) (a : Bool) (w : model.obj (Globe.category p)) : + Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun + ((model.map (Globe.faceMap a p n)).toFun w))) := by + have hn := parameterLeg_naturality + (show GlobePasting.Shape.globe p ⟶ .globe n from Globe.faceMap a p n) (Globe.lift C x hx) + change model.map (Globe.faceMap a p n) ≫ globeLeg n (Globe.lift C x hx) = + globeLeg p (Globe.faceMap a p n ≫ Globe.lift C x hx) at hn + rw [Globe.faceMap_lift] at hn + exact (congrArg (fun q => q.toFun w) hn).symm ▸ hsmall p hpn a w + have hatom (p : ℕ) (b : B.Index p) : + Nonempty (CompositionExpression (cylinder.obj C) g (F.toFun (B.atom p b))) := by + cases b with + | endpoint a b => + have hbn : p ≤ n := by rcases b.property with h | ⟨h, _⟩ <;> omega + have hb := endpointTop_modelAtom b a + change (model.map (Globe.faceMap b.val p n)).toFun (endpointTop p a) = + e.inv.toFun (B.atom p (.endpoint a b)) at hb + change Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun (e.inv.toFun (B.atom p (.endpoint a b))))) + rw [← hb] + by_cases hpn : p < n + · exact hface hpn b.val _ + · have hpn' : p = n := by omega + subst p + rw [Globe.faceMap_self, model.map_id] + exact he a + | @mixed p b => + have hbn : p ≤ n := by rcases b.property with h | ⟨h, _⟩ <;> omega + have hb := prismTop_modelAtom b + change (model.map (Globe.faceMap b.val p n)).toFun (prismTop p) = + e.inv.toFun (B.atom (p+1) (.mixed b)) at hb + change Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun (e.inv.toFun (B.atom (p+1) (.mixed b))))) + rw [← hb] + by_cases hpn : p < n + · exact hface hpn b.val _ + · have hpn' : p = n := by omega + subst p + rw [Globe.faceMap_self, model.map_id] + exact hp + obtain ⟨t⟩ := ordered_expression B (e.hom.toFun z) + have ht := t.substitute F (fun (a : B.AtomIndex) => hatom a.1 a.2) + have hi : e.inv.toFun (e.hom.toFun z) = z := + congrArg (fun q => q.toFun z) e.hom_inv_id + change Nonempty (CompositionExpression (cylinder.obj C) g + ((globeLeg n (Globe.lift C x hx)).toFun (e.inv.toFun (e.hom.toFun z)))) at ht + rw [hi] at ht + exact ht + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Ordered atoms generate the actual extended cylinder + +The dimension induction uses lower globe faces and the actual binary +cylinder pushout. It is independent of any colimit-preservation claim +about positive-table realization. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +def cylinderAtomLift (a : Σ p, B.CylinderIndex p) : cylinder.obj K.realization := + atomLift B a.2 + +theorem cellImageGenerated_from_atoms (n : ℕ) (x : K.realization) + (hx : K.realization.DimensionLE n x) : + CellImageGenerated (cylinderAtomLift B) n x hx := by + induction n using Nat.strong_induction_on generalizing x with + | h n ih => + apply B.generated (fun x => ∀ hx : K.realization.DimensionLE n x, + CellImageGenerated (cylinderAtomLift B) n x hx) _ _ x hx + · intro p b hp + have hpn : p ≤ n := B.atom_degree_le b hp + by_cases hlt : p < n + · exact cellImageGenerated_mono (cylinderAtomLift B) hpn _ (B.atom_dimension p b) hp + (ih p hlt _ (B.atom_dimension p b)) + · have heq : p = n := by omega + subst p + apply cellImageGenerated_of_top (cylinderAtomLift B) (B.atom n b) hp + · intro q hqn a + exact ih q hqn _ (K.realization.face_dimensionLE a q (B.atom n b)) + · intro a + exact ⟨CompositionExpression.generator (C := cylinder.obj K.realization) + (g := cylinderAtomLift B) ⟨n, .endpoint a b⟩⟩ + · exact ⟨CompositionExpression.generator (C := cylinder.obj K.realization) + (g := cylinderAtomLift B) ⟨n+1, .mixed b⟩⟩ + · intro r u v huv hu hv hc + have hf := Cell.dimensionLE_comp_factors B.positive_add_eq_zero huv hc + by_cases hrn : r < n + · exact cellImageGenerated_comp (cylinderAtomLift B) hrn u v hf.1 hf.2 huv hc + (hu hf.1) (hv hf.2) + · have hnr : n ≤ r := Nat.le_of_not_gt hrn + have hu' := K.realization.dimensionLE_mono hnr hf.1 + have hc' := K.realization.dimensionLE_mono hnr hc + have he : K.realization.comp r u v huv = u := + hc'.1.symm.trans ((K.realization.source_comp r u v huv).trans hu'.1) + change Cell.comp u v r huv = u at he + have huall : ∀ h : K.realization.DimensionLE n u, + CellImageGenerated (cylinderAtomLift B) n u h := hu + have ht : ∀ h : K.realization.DimensionLE n (Cell.comp u v r huv), + CellImageGenerated (cylinderAtomLift B) n (Cell.comp u v r huv) h := + he.symm ▸ huall + exact ht hc + +theorem generated_from_atoms (x : cylinder.obj K.realization) : + Nonempty (CompositionExpression (cylinder.obj K.realization) (cylinderAtomLift B) x) := by + apply generated_by_globe_images (cylinderAtomLift B) _ x + intro n f z + have hx := f.dimensionLE (Globe.category_truncated n Globe.Cell.top) + have hf : Globe.lift K.realization (f.toFun Globe.Cell.top) hx = f := by + apply Globe.hom_ext + rfl + have h := cellImageGenerated_from_atoms B n (f.toFun Globe.Cell.top) hx z + simpa only [hf] using h + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Identity extension commutes with the actual mapping composition -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +/-- Lower the common dimension of the two universal composable cells. -/ +def pastingLower {n m : ℕ} (hnm : n ≤ m) (k : ℕ) : + PastingGlobe.category m m k ⟶ PastingGlobe.category n n k := + PastingGlobe.desc _ (PastingGlobe.leftCell n n k) (PastingGlobe.rightCell n n k) + ((PastingGlobe.category n n k).dimensionLE_mono hnm + ((PastingGlobe.left n n k).dimensionLE (Globe.category_truncated n Globe.Cell.top))) + ((PastingGlobe.category n n k).dimensionLE_mono hnm + ((PastingGlobe.right n n k).dimensionLE (Globe.category_truncated n Globe.Cell.top))) + (PastingGlobe.matching n n k) + +theorem pastingLower_left {n m : ℕ} (hnm : n ≤ m) (k : ℕ) : + PastingGlobe.left m m k ≫ pastingLower hnm k = + Globe.lower m n hnm ≫ PastingGlobe.left n n k := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + +theorem pastingLower_right {n m : ℕ} (hnm : n ≤ m) (k : ℕ) : + PastingGlobe.right m m k ≫ pastingLower hnm k = + Globe.lower m n hnm ≫ PastingGlobe.right n n k := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + +theorem compositionGlobe_lower {n m k : ℕ} (hnm : n ≤ m) (hkn : k < n) : + compositionGlobe m k (hkn.trans_le hnm) ≫ pastingLower hnm k = + Globe.lower m n hnm ≫ compositionGlobe n k hkn := by + apply Globe.hom_ext + exact PastingGlobe.desc_composite _ _ _ _ _ _ + +variable {D : StrictOmegaCategory.{0}} {n m k : ℕ} + +/-- Gluing the two identity-extended maps is restriction of the original gluing. -/ +theorem glue_lower (hnm : n ≤ m) (hkn : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (hm : model.map (Globe.faceMap true k m) ≫ (model.map (Globe.lower m n hnm) ≫ f) = + model.map (Globe.faceMap false k m) ≫ (model.map (Globe.lower m n hnm) ≫ g)) : + glue (hkn.trans_le hnm) (model.map (Globe.lower m n hnm) ≫ f) + (model.map (Globe.lower m n hnm) ≫ g) hm = + model.map (pastingLower hnm k) ≫ glue hkn f g h := by + apply (PastingGlobe.CylinderSource.isPushout (hkn.trans_le hnm)).hom_ext + · rw [glue_left, ← Category.assoc, ← model.map_comp, pastingLower_left, + model.map_comp, Category.assoc, glue_left] + · rw [glue_right, ← Category.assoc, ← model.map_comp, pastingLower_right, + model.map_comp, Category.assoc, glue_right] + +/-- Composition is unchanged by enlarging the finite bound. -/ +theorem composite_lower (hnm : n ≤ m) (hkn : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (hm : model.map (Globe.faceMap true k m) ≫ (model.map (Globe.lower m n hnm) ≫ f) = + model.map (Globe.faceMap false k m) ≫ (model.map (Globe.lower m n hnm) ≫ g)) : + composite (hkn.trans_le hnm) (model.map (Globe.lower m n hnm) ≫ f) + (model.map (Globe.lower m n hnm) ≫ g) hm = + model.map (Globe.lower m n hnm) ≫ composite hkn f g h := by + change model.map (compositionGlobe m k _) ≫ glue _ _ _ hm = _ + rw [glue_lower hnm hkn f g h hm, ← Category.assoc, ← model.map_comp, + compositionGlobe_lower, model.map_comp, Category.assoc] + rfl + +/-- The enlarged finite representative denotes the same actual mapping cell. -/ +theorem composite_cell_lower (hnm : n ≤ m) (hkn : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (hm : model.map (Globe.faceMap true k m) ≫ (model.map (Globe.lower m n hnm) ≫ f) = + model.map (Globe.faceMap false k m) ≫ (model.map (Globe.lower m n hnm) ≫ g)) : + GlobeMappingCells.ι model D m + (composite (hkn.trans_le hnm) (model.map (Globe.lower m n hnm) ≫ f) + (model.map (Globe.lower m n hnm) ≫ g) hm) = + GlobeMappingCells.ι model D n (composite hkn f g h) := by + rw [composite_lower hnm hkn f g h hm] + exact GlobeMappingCells.ι_lower model D hnm _ + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Evaluating mapping composition in a strict parameter + +Any map from the actual cylinder of a parameter evaluates its binary +pasting maps by the already constructed mapping composition. This bridge +transfers strict diagrams between finite parameters to equations of maps. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable {C D : StrictOmegaCategory.{0}} {n k : ℕ} + +theorem evaluation_matching (p : PastingGlobe.category n n k ⟶ C) + (u : model.obj C ⟶ D) : + model.map (Globe.faceMap true k n) ≫ (model.map (PastingGlobe.left n n k ≫ p) ≫ u) = + model.map (Globe.faceMap false k n) ≫ (model.map (PastingGlobe.right n n k ≫ p) ≫ u) := by + simp only [← Category.assoc, ← model.map_comp] + exact congrArg (fun q => model.map (q ≫ p) ≫ u) + (pushout.condition (f := Globe.faceMap true k n) (g := Globe.faceMap false k n)) + +theorem glue_evaluation (hk : k < n) (p : PastingGlobe.category n n k ⟶ C) + (u : model.obj C ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ + (model.map (PastingGlobe.left n n k ≫ p) ≫ u) = + model.map (Globe.faceMap false k n) ≫ + (model.map (PastingGlobe.right n n k ≫ p) ≫ u)) : + glue hk (model.map (PastingGlobe.left n n k ≫ p) ≫ u) + (model.map (PastingGlobe.right n n k ≫ p) ≫ u) h = model.map p ≫ u := by + apply (PastingGlobe.CylinderSource.isPushout hk).hom_ext + · rw [glue_left, ← Category.assoc, ← model.map_comp] + · rw [glue_right, ← Category.assoc, ← model.map_comp] + +theorem composite_evaluation (hk : k < n) (p : PastingGlobe.category n n k ⟶ C) + (u : model.obj C ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ + (model.map (PastingGlobe.left n n k ≫ p) ≫ u) = + model.map (Globe.faceMap false k n) ≫ + (model.map (PastingGlobe.right n n k ≫ p) ≫ u)) : + composite hk (model.map (PastingGlobe.left n n k ≫ p) ≫ u) + (model.map (PastingGlobe.right n n k ≫ p) ≫ u) h = + model.map (compositionGlobe n k hk ≫ p) ≫ u := by + change model.map (compositionGlobe n k hk) ≫ glue hk _ _ h = _ + rw [glue_evaluation, ← Category.assoc, ← model.map_comp] + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Representation-independent composition of mapping cells + +Every matching pair has finite representatives at a common dimension. +The actual cylinder gluing commutes with identity extension, so its +composite is independent of all representative choices. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +abbrev Cell (D : StrictOmegaCategory.{0}) := GlobeMappingCells.Carrier model D + +structure Representative {D : StrictOmegaCategory.{0}} (k : ℕ) (x y : Cell D) where + bound : ℕ + lt_bound : k < bound + first : model.obj (Globe.category bound) ⟶ D + last : model.obj (Globe.category bound) ⟶ D + first_eq : GlobeMappingCells.ι model D bound first = x + last_eq : GlobeMappingCells.ι model D bound last = y + matching : model.map (Globe.faceMap true k bound) ≫ first = + model.map (Globe.faceMap false k bound) ≫ last + +namespace Representative + +variable {D : StrictOmegaCategory.{0}} {k : ℕ} {x y : Cell D} + +def value (r : Representative k x y) : Cell D := + GlobeMappingCells.ι model D r.bound (composite r.lt_bound r.first r.last r.matching) + +def raise (r : Representative k x y) (N : ℕ) (h : r.bound ≤ N) : Representative k x y where + bound := N + lt_bound := r.lt_bound.trans_le h + first := model.map (Globe.lower N r.bound h) ≫ r.first + last := model.map (Globe.lower N r.bound h) ≫ r.last + first_eq := (GlobeMappingCells.ι_lower model D h r.first).trans r.first_eq + last_eq := (GlobeMappingCells.ι_lower model D h r.last).trans r.last_eq + matching := by + rw [← Category.assoc, ← model.map_comp, Globe.faceMap_lower, + ← Category.assoc, ← model.map_comp, Globe.faceMap_lower] + exact r.matching + +theorem raise_value (r : Representative k x y) (N : ℕ) (h : r.bound ≤ N) : + (r.raise N h).value = r.value := + composite_cell_lower h r.lt_bound r.first r.last r.matching _ + +/-- Two different common finite presentations define the same composite. -/ +theorem value_eq (r s : Representative k x y) : r.value = s.value := by + let N := max r.bound s.bound + let rr := r.raise N (Nat.le_max_left _ _) + let ss := s.raise N (Nat.le_max_right _ _) + have hf : rr.first = ss.first := (GlobeMappingCells.ι_injective model D N) + (rr.first_eq.trans ss.first_eq.symm) + have hg : rr.last = ss.last := (GlobeMappingCells.ι_injective model D N) + (rr.last_eq.trans ss.last_eq.symm) + have hv : rr.value = ss.value := by + change GlobeMappingCells.ι model D N + (composite rr.lt_bound rr.first rr.last rr.matching) = + GlobeMappingCells.ι model D N + (composite ss.lt_bound ss.first ss.last ss.matching) + simp only [hf, hg] + exact (r.raise_value N (Nat.le_max_left _ _)).symm.trans + (hv.trans (s.raise_value N (Nat.le_max_right _ _))) + +theorem value_source (r : Representative k x y) : + GlobeMappingCells.face model D false k r.value = GlobeMappingCells.face model D false k x := + (composite_cell_source r.lt_bound r.first r.last r.matching).trans + (congrArg (GlobeMappingCells.face model D false k) r.first_eq) + +theorem value_target (r : Representative k x y) : + GlobeMappingCells.face model D true k r.value = GlobeMappingCells.face model D true k y := + (composite_cell_target r.lt_bound r.first r.last r.matching).trans + (congrArg (GlobeMappingCells.face model D true k) r.last_eq) + +def map {E : StrictOmegaCategory.{0}} (r : Representative k x y) (u : D ⟶ E) : + Representative k (GlobeMappingCells.map model u x) (GlobeMappingCells.map model u y) where + bound := r.bound + lt_bound := r.lt_bound + first := r.first ≫ u + last := r.last ≫ u + first_eq := (GlobeMappingCells.map_ι model u r.bound r.first).symm.trans + (congrArg (GlobeMappingCells.map model u) r.first_eq) + last_eq := (GlobeMappingCells.map_ι model u r.bound r.last).symm.trans + (congrArg (GlobeMappingCells.map model u) r.last_eq) + matching := by + rw [← Category.assoc, ← Category.assoc] + exact congrArg (fun f => f ≫ u) r.matching + +theorem map_value {E : StrictOmegaCategory.{0}} (r : Representative k x y) (u : D ⟶ E) : + (r.map u).value = GlobeMappingCells.map model u r.value := by + exact (congrArg (GlobeMappingCells.ι model E r.bound) + (composite_postcompose r.lt_bound r.first r.last r.matching u (r.map u).matching)).trans + (GlobeMappingCells.map_ι model u r.bound + (composite r.lt_bound r.first r.last r.matching)).symm + +end Representative + +variable {D : StrictOmegaCategory.{0}} + +theorem representative_exists (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) : + Nonempty (Representative k x y) := by + obtain ⟨n, hn, f, g, hf, hg⟩ := GlobeMappingCells.exists_representatives₂_above model D x y (k+1) + exact ⟨{ + bound := n + lt_bound := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) hn + first := f + last := g + first_eq := hf + last_eq := hg + matching := GlobeMappingCells.matching_representatives model D x y h f g hf hg }⟩ + +/-- Actual composition on the mapping-family carrier. -/ +def comp (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) : + Cell D := + (Classical.choice (representative_exists k x y h)).value + +theorem comp_congr {k : ℕ} {x y x' y' : Cell D} (hx : x = x') (hy : y = y') + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (h' : GlobeMappingCells.face model D true k x' = GlobeMappingCells.face model D false k y') : + comp k x y h = comp k x' y' h' := by + subst x' + subst y' + rfl + +theorem comp_eq (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (r : Representative k x y) : comp k x y h = r.value := + Representative.value_eq _ _ + +theorem comp_ι {n k : ℕ} (hk : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (h' : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n f) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n g)) : + comp k (GlobeMappingCells.ι model D n f) (GlobeMappingCells.ι model D n g) h' = + GlobeMappingCells.ι model D n (composite hk f g h) := + comp_eq k _ _ h' { + bound := n + lt_bound := hk + first := f + last := g + first_eq := rfl + last_eq := rfl + matching := h } + +theorem source_comp (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) : + GlobeMappingCells.face model D false k (comp k x y h) = + GlobeMappingCells.face model D false k x := + Representative.value_source _ + +theorem target_comp (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) : + GlobeMappingCells.face model D true k (comp k x y h) = + GlobeMappingCells.face model D true k y := + Representative.value_target _ + +theorem map_comp {E : StrictOmegaCategory.{0}} (u : D ⟶ E) (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (h' : GlobeMappingCells.face model E true k (GlobeMappingCells.map model u x) = + GlobeMappingCells.face model E false k (GlobeMappingCells.map model u y)) : + GlobeMappingCells.map model u (comp k x y h) = + comp k (GlobeMappingCells.map model u x) (GlobeMappingCells.map model u y) h' := by + let r := Classical.choice (representative_exists k x y h) + exact (congrArg (GlobeMappingCells.map model u) (comp_eq k x y h r)).trans + ((r.map_value u).symm.trans (comp_eq k _ _ h' (r.map u)).symm) + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Endpoint evaluation preserves actual mapping composition -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable (η : 𝟭 StrictOmegaCategory.{0} ⟶ model) {D : StrictOmegaCategory.{0}} + +private theorem evaluate_parameter {n : ℕ} {C : StrictOmegaCategory.{0}} + (s : Globe.category n ⟶ C) (u : model.obj C ⟶ D) : + GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n (model.map s ≫ u)) = + u.toFun ((η.app C).toFun (s.toFun Globe.Cell.top)) := by + rw [GlobeMappingCells.naturalEvaluation_ι] + exact congrArg u.toFun + (congrArg (fun q : Globe.category n ⟶ model.obj C => q.toFun Globe.Cell.top) + (η.naturality s)).symm + +/-- Evaluation at either actual endpoint respects the finite gluing operation. -/ +theorem naturalEvaluation_composite {n k : ℕ} (hk : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (h' : D.target k (GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n f)) = + D.source k (GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n g))) : + GlobeMappingCells.naturalEvaluation η D + (GlobeMappingCells.ι model D n (composite hk f g h)) = + D.comp k (GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n f)) + (GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n g)) h' := by + let u : PastingGlobe.category n n k ⟶ D := η.app _ ≫ glue hk f g h + have hl : u.toFun (PastingGlobe.leftCell n n k) = + GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n f) := by + have he := evaluate_parameter η (PastingGlobe.left n n k) (glue hk f g h) + rw [glue_left] at he + exact he.symm + have hr : u.toFun (PastingGlobe.rightCell n n k) = + GlobeMappingCells.naturalEvaluation η D (GlobeMappingCells.ι model D n g) := by + have he := evaluate_parameter η (PastingGlobe.right n n k) (glue hk f g h) + rw [glue_right] at he + exact he.symm + have hm : D.target k (u.toFun (PastingGlobe.leftCell n n k)) = + D.source k (u.toFun (PastingGlobe.rightCell n n k)) := by + simpa only [hl, hr] using h' + have he := evaluate_parameter η (compositionGlobe n k hk) (glue hk f g h) + change GlobeMappingCells.naturalEvaluation η D + (GlobeMappingCells.ι model D n (composite hk f g h)) = + u.toFun (PastingGlobe.composite n n k) at he + exact he.trans (by simpa only [PastingGlobe.composite, hl, hr] using + (u.map_comp k (PastingGlobe.leftCell n n k) (PastingGlobe.rightCell n n k) + (PastingGlobe.matching n n k) hm)) + +/-- Evaluation is a strict operation-preserving map on the entire carrier. -/ +theorem naturalEvaluation_comp (k : ℕ) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (h' : D.target k (GlobeMappingCells.naturalEvaluation η D x) = + D.source k (GlobeMappingCells.naturalEvaluation η D y)) : + GlobeMappingCells.naturalEvaluation η D (comp k x y h) = + D.comp k (GlobeMappingCells.naturalEvaluation η D x) + (GlobeMappingCells.naturalEvaluation η D y) h' := by + let r := Classical.choice (representative_exists k x y h) + have hm : D.target k (GlobeMappingCells.naturalEvaluation η D + (GlobeMappingCells.ι model D r.bound r.first)) = + D.source k (GlobeMappingCells.naturalEvaluation η D + (GlobeMappingCells.ι model D r.bound r.last)) := by + simpa only [r.first_eq, r.last_eq] using h' + have he := naturalEvaluation_composite η r.lt_bound r.first r.last r.matching hm + have hv := congrArg (GlobeMappingCells.naturalEvaluation η D) (comp_eq k x y h r) + exact hv.trans (by simpa only [Representative.value, r.first_eq, r.last_eq] using he) + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingInterchangeEvaluation.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingInterchangeEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..518b51fb4474fc2e274c3f5e2282181abf2f9fe1 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GrayMappingInterchangeEvaluation.lean @@ -0,0 +1,964 @@ +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.GrayMappingEndpointEvaluation +import OAI.CategoryTheory.Thomason.Gray.GridGlobeCylinderComparison +import OAI.CategoryTheory.Thomason.Gray.SimplexCylinderGeneration +import OAI.CategoryTheory.Thomason.Gray.TopologicalConePrism +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeAtoms +import OAI.CategoryTheory.Thomason.Simplicial.HornWeakEquivalences +import OAI.CategoryTheory.Thomason.Simplicial.TruncationQuotientComposition + +namespace OAI + +section + +/-! # Direct Gray–Street–realization compatibility + +The explicitly constructed Street-nerve prism realizes to a continuous +homotopy. Consequently Gray deformations and finite relative prisms satisfy +the actual semantic weak-equivalence test without a Kan–Quillen input. +The right-Gray cylinder comparison is an explicit hypothesis. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + +include aw + +/-- A strict Gray homotopy induces an actual continuous homotopy of realizations. -/ +noncomputable def realizedHomotopy {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + (SSet.toTop.map (h.streetNerve.map ((G.endpoint false).app X ≫ P))).hom.Homotopy + (SSet.toTop.map (h.streetNerve.map ((G.endpoint true).app X ≫ P))).hom := + RealizedCylinder.homotopy (G.nerveHomotopy aw P) + +/-- Gray homotopies preserve the semantic Thomason weak test directly. -/ +theorem cylinder_weakEquivalence_iff_direct {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + h.streetWeakEquivalences ((G.endpoint false).app X ≫ P) ↔ + h.streetWeakEquivalences ((G.endpoint true).app X ≫ P) := + RealizedCylinder.weakEquivalence_iff (G.nerveHomotopy aw P) + +/-- A Gray deformation retraction is weak on both maps without a model structure. -/ +theorem deformation_retract_weakEquivalences_direct {A X : StrictOmegaCategory.{0}} + (i : A ⟶ X) (r : X ⟶ A) (hi : i ≫ r = 𝟙 A) + (P : G.cylinder.obj X ⟶ X) + (h₀ : (G.endpoint false).app X ≫ P = r ≫ i) + (h₁ : (G.endpoint true).app X ≫ P = 𝟙 X) : + h.streetWeakEquivalences i ∧ h.streetWeakEquivalences r := by + have : h.streetWeakEquivalences.ContainsIdentities := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).ContainsIdentities + have : h.streetWeakEquivalences.HasTwoOutOfThreeProperty := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).HasTwoOutOfThreeProperty + have : h.streetWeakEquivalences.IsStableUnderRetracts := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).IsStableUnderRetracts + have hri : h.streetWeakEquivalences (r ≫ i) := by + have hc := G.cylinder_weakEquivalence_iff_direct aw P + rw [h₀, h₁] at hc + exact hc.mpr (h.streetWeakEquivalences.id_mem X) + let retract : RetractArrow i (r ≫ i) := { + i := Arrow.homMk i (𝟙 X) (by simp [← Category.assoc, hi]) + r := Arrow.homMk r (𝟙 X) (by simp) + retract := by apply Arrow.hom_ext <;> simp [hi] } + have hwi : h.streetWeakEquivalences i := h.streetWeakEquivalences.of_retract retract hri + refine ⟨hwi, ?_⟩ + apply h.streetWeakEquivalences.of_precomp i r hwi + rw [hi] + exact h.streetWeakEquivalences.id_mem A + +end RightGrayInput + +namespace RelativePrismData + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + (G : RightGrayInput h) (t : GrayTruncationInput G) {n : ℕ} (r : FiniteReflectionInput n) + (aw : SimplexComplex.AlexanderWhitneyInput h) + +include G t aw + +/-- The finite-dimensional relative prism bridge needs no Kan–Quillen axioms. -/ +theorem finite_weakEquivalence_iff_direct : + h.streetWeakEquivalences ((StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap D.first))) ↔ + h.streetWeakEquivalences ((StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap D.last))) := by + let X : StrictOmegaCategory := (r.reflect.obj (h.categorification.obj (nerve E))).val + let W : (X ⟶ X) → Prop := fun f => h.streetWeakEquivalences f + exact (congrArg W (D.finitePrism_endpoint h G t r false)).symm.to_iff.trans + ((G.cylinder_weakEquivalence_iff_direct aw (D.finitePrism h G t r)).trans + (congrArg W (D.finitePrism_endpoint h G t r true)).to_iff) + +end RelativePrismData + +end Thomason.Construction + +end + +section + +/-! # Natural continuous cone pieces for an ordinary poset nerve -/ + +namespace Thomason.Construction.ConePrism + +open CategoryTheory CategoryTheory.Limits + +/-- The barycentric cone in the universe-lifted simplex used by realization. -/ +noncomputable def liftedBarycentric (n : ℕ) : + TopologicalInterval.cylinder.obj (SimplexCategory.toTop.{0}.obj (.mk n)) ⟶ + SimplexCategory.toTop.{0}.obj (.mk (n+1)) := + TopCat.ofHom ⟨fun p => ULift.up (barycentric n (p.1.down, p.2)), by fun_prop⟩ + +/-- Naturality before descending through geometric realization. -/ +theorem liftedBarycentric_naturality {m n : SimplexCategory} (f : m ⟶ n) : + TopologicalInterval.cylinder.map (SimplexCategory.toTop.{0}.map f) ≫ + liftedBarycentric n.len = + liftedBarycentric m.len ≫ + SimplexCategory.toTop.{0}.map (SimplexCategory.Hom.mk (ordinalMap f.toOrderHom)) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro p + exact congrArg ULift.up (barycentric_naturality f.toOrderHom p.1.down p.2).symm + +variable {P : Type} [PartialOrder P] (v : P) (hv : ∀ x, x ≤ v) + +/-- The cone piece on one original simplex of the ordinary nerve. -/ +noncomputable def piece (j : CostructuredArrow SSet.stdSimplex (nerve P)) : + TopologicalInterval.cylinder.obj ((RealizationPrism.diagram (nerve P)).obj j) ⟶ + SSet.toTop.obj (nerve P) := + liftedBarycentric j.left.len ≫ RealizationPrism.leg (nerve P) (coneIndex v hv j) + +/-- All face and degeneracy operators preserve the explicit cone pieces. -/ +theorem piece_naturality {j k : CostructuredArrow SSet.stdSimplex (nerve P)} (f : j ⟶ k) : + TopologicalInterval.cylinder.map ((RealizationPrism.diagram (nerve P)).map f) ≫ + piece v hv k = piece v hv j := by + change TopologicalInterval.cylinder.map (SimplexCategory.toTop.map f.left) ≫ + (liftedBarycentric k.left.len ≫ RealizationPrism.leg (nerve P) (coneIndex v hv k)) = _ + rw [← Category.assoc, liftedBarycentric_naturality, Category.assoc] + have hc := (RealizationPrism.cocone (nerve P)).w (coneMap v hv f) + exact congrArg (fun q => liftedBarycentric j.left.len ≫ q) hc + +/-- The actual global continuous cone map, with no KQ assumption. -/ +noncomputable def realizationCone : + TopologicalInterval.cylinder.obj (SSet.toTop.obj (nerve P)) ⟶ SSet.toTop.obj (nerve P) := + RealizationPrism.assemble (nerve P) _ (piece v hv) (piece_naturality v hv) + +end Thomason.Construction.ConePrism + +end + +section + +/-! # Actual cylinder contractions and boundary-lifting weak equivalences + +Minimum and maximum on the simplicial interval give explicit simplicial +contractions. Their realized homotopies prove both endpoint maps weak, +without the anodyne characterization or any Kan–Quillen assumption. +-/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open SSet.modelCategoryQuillen +open scoped Simplicial + +noncomputable section + +/-- Pointwise minimum of two simplices of the ordered interval. -/ +def intervalMin {n : SimplexCategoryᵒᵖ} (a b : (Δ[1] : SSet.{0}).obj n) : + (Δ[1] : SSet.{0}).obj n := + SSet.stdSimplex.objEquiv.symm (SimplexCategory.Hom.mk + { toFun := fun i => min ((SSet.stdSimplex.objEquiv a).toOrderHom i) + ((SSet.stdSimplex.objEquiv b).toOrderHom i) + monotone' := fun _ _ h => min_le_min + ((SSet.stdSimplex.objEquiv a).toOrderHom.monotone h) + ((SSet.stdSimplex.objEquiv b).toOrderHom.monotone h) }) + +/-- Pointwise maximum of two simplices of the ordered interval. -/ +def intervalMax {n : SimplexCategoryᵒᵖ} (a b : (Δ[1] : SSet.{0}).obj n) : + (Δ[1] : SSet.{0}).obj n := + SSet.stdSimplex.objEquiv.symm (SimplexCategory.Hom.mk + { toFun := fun i => max ((SSet.stdSimplex.objEquiv a).toOrderHom i) + ((SSet.stdSimplex.objEquiv b).toOrderHom i) + monotone' := fun _ _ h => max_le_max + ((SSet.stdSimplex.objEquiv a).toOrderHom.monotone h) + ((SSet.stdSimplex.objEquiv b).toOrderHom.monotone h) }) + +/-- Contract the simplicial cylinder to its zero endpoint. -/ +def cylinderMinHomotopy (X : SSet.{0}) : + SSet.Homotopy (fst X Δ[1] ≫ SSet.ι₀) (𝟙 (X ⊗ Δ[1])) where + h := { app n := ↾fun x => (x.1.1, intervalMin x.1.2 x.2) + naturality m n a := by + ext x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + rfl } + h₀ := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change (min ((SSet.stdSimplex.objEquiv x.2).toOrderHom k) (0 : Fin 2)).val = 0 + rw [min_eq_right (Fin.zero_le _)] + rfl + h₁ := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change (min ((SSet.stdSimplex.objEquiv x.2).toOrderHom k) (1 : Fin 2)).val = + ((SSet.stdSimplex.objEquiv x.2).toOrderHom k).val + exact congrArg Fin.val (min_eq_left (show _ ≤ (1 : Fin 2) from Fin.le_last _)) + rel := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + exact False.elim x.1.property + +/-- Contract the simplicial cylinder to its one endpoint. -/ +def cylinderMaxHomotopy (X : SSet.{0}) : + SSet.Homotopy (𝟙 (X ⊗ Δ[1])) (fst X Δ[1] ≫ SSet.ι₁) where + h := { app n := ↾fun x => (x.1.1, intervalMax x.1.2 x.2) + naturality m n a := by + ext x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + rfl } + h₀ := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change (max ((SSet.stdSimplex.objEquiv x.2).toOrderHom k) (0 : Fin 2)).val = + ((SSet.stdSimplex.objEquiv x.2).toOrderHom k).val + exact congrArg Fin.val (max_eq_left (Fin.zero_le _)) + h₁ := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change (max ((SSet.stdSimplex.objEquiv x.2).toOrderHom k) (1 : Fin 2)).val = 1 + exact congrArg Fin.val (max_eq_right (show _ ≤ (1 : Fin 2) from Fin.le_last _)) + rel := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + intro x + exact False.elim x.1.property + +/-- The actual simplicial cylinder projection satisfies the semantic weak test. -/ +theorem cylinder_projection_weak (X : SSet.{0}) : + realizationWeakEquivalences (fst X Δ[1]) := by + have hcomp : realizationWeakEquivalences (fst X Δ[1] ≫ SSet.ι₀) := + (RealizedCylinder.weakEquivalence_iff (cylinderMinHomotopy X)).mpr + (realizationWeakEquivalences.id_mem _) + let r : RetractArrow (fst X Δ[1]) (fst X Δ[1] ≫ SSet.ι₀) := { + i := Arrow.homMk (𝟙 _) SSet.ι₀ (by simp) + r := Arrow.homMk (𝟙 _) (fst X Δ[1]) (by simp) + retract := by + apply Arrow.hom_ext <;> simp } + exact realizationWeakEquivalences.of_retract r hcomp + +/-- The zero endpoint is weak in actual geometric realization. -/ +theorem cylinder_endpoint_zero_weak (X : SSet.{0}) : + realizationWeakEquivalences (SSet.ι₀ (X := X)) := by + apply realizationWeakEquivalences.of_postcomp SSet.ι₀ (fst X Δ[1]) (cylinder_projection_weak X) + simpa only [SSet.ι₀_fst] using realizationWeakEquivalences.id_mem X + +/-- The one endpoint is weak in actual geometric realization. -/ +theorem cylinder_endpoint_one_weak (X : SSet.{0}) : + realizationWeakEquivalences (SSet.ι₁ (X := X)) := by + apply realizationWeakEquivalences.of_postcomp SSet.ι₁ (fst X Δ[1]) (cylinder_projection_weak X) + simpa only [SSet.ι₁_fst] using realizationWeakEquivalences.id_mem X + +/-- Every boundary-lifting map is an actual realization weak equivalence. -/ +theorem boundary_rlp_weak {X Y : SSet.{0}} (f : X ⟶ Y) (hf : I.rlp f) : + realizationWeakEquivalences f := + boundary_rlp_weak_of_endpoints f hf (cylinder_endpoint_zero_weak X) + (cylinder_endpoint_one_weak X) + +end + +end Thomason.Construction + +end + +section + +/-! # Both coordinates of the global realization cylinder comparison -/ + +namespace Thomason.Construction.RealizedCylinder + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial + +noncomputable section + +theorem comparison_leg (K : SSet.{0}) (j : CostructuredArrow SSet.stdSimplex K) + (x : (RealizationPrism.diagram K).obj j) (t : unitInterval) : + (comparison K).hom ((RealizationPrism.leg K j).hom x, t) = + (piece K j).hom (x, t) := + congrArg (fun f => f.hom (x, t)) + (RealizationPrism.assemble_fac K _ (piece K) (piece_naturality K) j) + +/-- The global prism preserves the original realization point. -/ +theorem comparison_first (K : SSet.{0}) (x : SSet.toTop.obj K) (t : unitInterval) : + (SSet.toTop.map (fst K Δ[1])).hom ((comparison K).hom (x, t)) = x := by + obtain ⟨j, p, rfl⟩ := RealizationPrism.point_representation K x + rw [comparison_leg] + change ((SSet.toTop.map (j.hom ▷ Δ[1]) ≫ SSet.toTop.map (fst K Δ[1])).hom) + (PrismBarycentric.standardPrism j.left.len (p.down, t)) = _ + rw [← SSet.toTop.map_comp, whiskerRight_fst, SSet.toTop.map_comp] + change (SSet.toTop.map j.hom).hom + ((SSet.toTop.map (fst _ Δ[1])).hom + (PrismBarycentric.standardPrism j.left.len (p.down, t))) = _ + rw [PrismBarycentric.standardPrism_firstProjection] + exact congrArg (fun f => f.hom p) (show + (SSet.toTopSimplex.inv.app j.left ≫ SSet.toTop.map (𝟙 _)) ≫ + SSet.toTop.map j.hom = RealizationPrism.leg K j from by + rw [SSet.toTop.map_id] + exact congrArg (fun f => f ≫ SSet.toTop.map j.hom) + (Category.comp_id (SSet.toTopSimplex.inv.app j.left))) + +/-- The global prism preserves the ordinary interval parameter. -/ +theorem comparison_time (K : SSet.{0}) (x : SSet.toTop.obj K) (t : unitInterval) : + PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (snd K Δ[1])).hom ((comparison K).hom (x, t))) = t := by + obtain ⟨j, p, rfl⟩ := RealizationPrism.point_representation K x + rw [comparison_leg] + change PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (j.hom ▷ Δ[1]) ≫ SSet.toTop.map (snd K Δ[1])).hom + (PrismBarycentric.standardPrism j.left.len (p.down, t))) = _ + rw [← SSet.toTop.map_comp, whiskerRight_snd] + exact PrismBarycentric.standardPrism_time j.left.len (p.down, t) + +/-- The comparison itself satisfies the full, actual weak homotopy test. -/ +theorem comparison_weak (K : SSet.{0}) : topologicalWeakEquivalences (comparison K) := by + apply topologicalWeakEquivalences.of_postcomp (comparison K) + (SSet.toTop.map (fst K Δ[1])) (cylinder_projection_weak K) + have he : comparison K ≫ SSet.toTop.map (fst K Δ[1]) = + TopologicalInterval.projection (SSet.toTop.obj K) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro p + exact comparison_first K p.1 p.2 + rw [he] + exact TopologicalInterval.projection_weak _ + +end + +end Thomason.Construction.RealizedCylinder + +end + +section + +/-! # Naturality and exact endpoints of the realization cylinder comparison -/ + +namespace Thomason.Construction.RealizedCylinder + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +/-- The comparison is natural in every simplicial map. -/ +theorem comparison_naturality {K L : SSet.{0}} (f : K ⟶ L) : + TopologicalInterval.cylinder.map (SSet.toTop.map f) ≫ comparison L = + comparison K ≫ SSet.toTop.map (f ▷ Δ[1]) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro q + obtain ⟨j, p, hp⟩ := RealizationPrism.point_representation K q.1 + rcases q with ⟨x, t⟩ + dsimp only at hp + subst x + change (comparison L).hom ((SSet.toTop.map f).hom ((RealizationPrism.leg K j).hom p), t) = _ + have he := congrArg (fun g => g.hom p) (RealizationPrism.leg_naturality f j) + change (SSet.toTop.map f).hom ((RealizationPrism.leg K j).hom p) = _ at he + rw [he, comparison_leg] + change (piece L ((CostructuredArrow.map f).obj j)).hom (p, t) = + (SSet.toTop.map (f ▷ Δ[1])).hom + ((comparison K).hom ((RealizationPrism.leg K j).hom p, t)) + rw [comparison_leg] + change (PrismBarycentric.liftedStandardPrism j.left.len ≫ + SSet.toTop.map ((j.hom ≫ f) ▷ Δ[1])).hom (p, t) = + ((PrismBarycentric.liftedStandardPrism j.left.len ≫ SSet.toTop.map (j.hom ▷ Δ[1])) ≫ + SSet.toTop.map (f ▷ Δ[1])).hom (p, t) + rw [Category.assoc, ← SSet.toTop.map_comp, comp_whiskerRight] + +/-- The exact zero endpoint on the global comparison. -/ +theorem comparison_zero (K : SSet.{0}) (x : SSet.toTop.obj K) : + (comparison K).hom (x, 0) = (SSet.toTop.map SSet.ι₀).hom x := by + obtain ⟨j, p, rfl⟩ := RealizationPrism.point_representation K x + rw [comparison_leg] + exact congrArg (fun f => f.hom p) (piece_zero K j) + +/-- The exact one endpoint on the global comparison. -/ +theorem comparison_one (K : SSet.{0}) (x : SSet.toTop.obj K) : + (comparison K).hom (x, 1) = (SSet.toTop.map SSet.ι₁).hom x := by + obtain ⟨j, p, rfl⟩ := RealizationPrism.point_representation K x + rw [comparison_leg] + exact congrArg (fun f => f.hom p) (piece_one K j) + +end + +end Thomason.Construction.RealizedCylinder + +end + +section + +/-! # The positive universal map from three matching cell tables -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +variable {L : DirectedComplex.{0}} + +def value {n k p : ℕ} (x : Fin 3 → Cell L) (b : Basis n k p) : L.group p := + (x b.val.1).table b.val.2 p + +theorem tables_below {k p : ℕ} (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (i : Fin 3) (a : Bool) (hp : p < k) : + (x 0).table a p = (x i).table a p := by + fin_cases i + · rfl + · exact Cell.matching_below (hm 0) a hp + · exact (Cell.matching_below (hm 0) a hp).trans (Cell.matching_below (hm 1) a hp) + +theorem value_embed {n k p : ℕ} (hkn : k < n) (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (i : Fin 3) (b : DirectedGlobeComplex.Basis n p) : + value x (embed hkn i b) = (x i).table b.val p := by + by_cases hp : p < k + · simpa only [embed, dite_eq_left hp, value] using tables_below x hm i b.val hp + · by_cases he : p = k + · subst p + by_cases hb : b.val = false + · fin_cases i + · simp [embed, value, hb] + · simpa [embed, value, hb, predecessor] using Cell.matching_top (hm 0) + · simpa [embed, value, hb, predecessor] using Cell.matching_top (hm 1) + · simp [embed, value, hb] + · simp [embed, hp, he, value] + +def descApp {n k : ℕ} (x : Fin 3 → Cell L) (p : ℕ) : + Chains n k p →ₗ[ℤ] L.group p := + Finsupp.linearCombination ℤ (value x) + +@[simp] theorem descApp_single {n k p : ℕ} (x : Fin 3 → Cell L) + (b : Basis n k p) (z : ℤ) : + descApp x p (Finsupp.single b z) = z • value x b := by simp [descApp] + +theorem descApp_embedApp {n k : ℕ} (hkn : k < n) (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (i : Fin 3) (p : ℕ) (u : DirectedGlobeComplex.Chains n p) : + descApp x p (embedApp hkn i p u) = DirectedGlobeComplex.cellApp n (x i) p u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp [value_embed hkn x hm] + +theorem descApp_differential {n k : ℕ} (hkn : k < n) (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (p : ℕ) (u : Chains n k (p+1)) : + descApp x p (differential hkn p u) = L.differential p (descApp x (p+1) u) := by + have hs (i : Fin 3) (b : DirectedGlobeComplex.Basis n (p+1)) (z : ℤ) : + descApp x p (differential hkn p (Finsupp.single (embed hkn i b) z)) = + L.differential p (descApp x (p+1) (Finsupp.single (embed hkn i b) z)) := by + rw [← embedApp_single hkn i b z, ← embedApp_differential, + descApp_embedApp hkn x hm, descApp_embedApp hkn x hm] + exact DirectedGlobeComplex.cellApp_differential n (x i) p _ + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + simpa only [embed_self] using hs b.val.1 ⟨b.val.2, b.property.1⟩ z + +theorem descApp_augmentation {n k : ℕ} (x : Fin 3 → Cell L) (u : Chains n k 0) : + L.augmentation (descApp x 0 u) = weight n k 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp [value, Cell.augmentation] + +theorem descApp_positive {n k p : ℕ} (x : Fin 3 → Cell L) (u : Chains n k p) + (hu : u ∈ positive n k p) : descApp x p u ∈ L.positive p := by + classical + change (u.sum fun b z => z • value x b) ∈ L.positive p + apply (L.positive p).sum_mem + intro b hb + change u b • value x b ∈ L.positive p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + exact (L.positive p).nsmul_mem ((x b.val.1).positive b.val.2 p) _ + +def desc {n k : ℕ} (hkn : k < n) (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) : + Hom (complex n k hkn) L where + app p := (descApp x p).toAddMonoidHom + differential := descApp_differential hkn x hm + augmentation := descApp_augmentation x + positive _ _ hu := descApp_positive x _ hu + +theorem inclusion_desc {n k : ℕ} (hkn : k < n) (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (i : Fin 3) : + Hom.comp (inclusion hkn i) (desc hkn x hm) = DirectedGlobeComplex.cellMap n (x i) := by + apply Hom.ext_app + intro p u + exact descApp_embedApp hkn x hm i p u + +theorem hom_ext {n k : ℕ} (hkn : k < n) {f g : Hom (complex n k hkn) L} + (h : ∀ i, Hom.comp (inclusion hkn i) f = Hom.comp (inclusion hkn i) g) : f = g := by + apply Hom.ext_app + intro p u + have hs (i : Fin 3) (b : DirectedGlobeComplex.Basis n p) (z : ℤ) : + f.app p (Finsupp.single (embed hkn i b) z) = + g.app p (Finsupp.single (embed hkn i b) z) := by + have he := congrArg (fun q : Hom (DirectedGlobeComplex.complex n) L => + q.app p (Finsupp.single b z)) (h i) + change f.app p (embedApp hkn i p (Finsupp.single b z)) = + g.app p (embedApp hkn i p (Finsupp.single b z)) at he + simpa only [embedApp_single] using he + let fp : Chains n k p →+ L.group p := f.app p + let gp : Chains n k p →+ L.group p := g.app p + change fp u = gp u + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + change f.app p (Finsupp.single b z) = g.app p (Finsupp.single b z) + simpa only [embed_self] using hs b.val.1 ⟨b.val.2, b.property.1⟩ z + +end +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # The actual strict parameter for three successive equal-dimensional cells -/ + +namespace Thomason.Construction.StrictOmegaCategory.TripleGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +abbrev bridge (n k : ℕ) : Globe.category k ⟶ PastingGlobe.category n n k := + Globe.faceMap true k n ≫ PastingGlobe.right n n k + +abbrev category (n k : ℕ) : StrictOmegaCategory.{0} := + pushout (bridge n k) (Globe.faceMap false k n) + +abbrev pair (n k : ℕ) : PastingGlobe.category n n k ⟶ category n k := + pushout.inl _ _ + +abbrev inclusion (n k : ℕ) (i : Fin 3) : Globe.category n ⟶ category n k := + if i = 0 then PastingGlobe.left n n k ≫ pair n k + else if i = 1 then PastingGlobe.right n n k ≫ pair n k + else pushout.inr _ _ + +def cell (n k : ℕ) (i : Fin 3) : category n k := + (inclusion n k i).toFun Globe.Cell.top + +theorem adjacent_matching (n k : ℕ) (i : Fin 2) : + (category n k).target k (cell n k i.castSucc) = + (category n k).source k (cell n k i.succ) := by + fin_cases i + · have h := congrArg (pair n k).toFun (PastingGlobe.matching n n k) + exact ((pair n k).map_face true k (PastingGlobe.leftCell n n k)).symm.trans + (h.trans ((pair n k).map_face false k (PastingGlobe.rightCell n n k))) + · have h := congrArg (fun F : Globe.category k ⟶ category n k => F.toFun Globe.Cell.top) + (pushout.condition (f := bridge n k) (g := Globe.faceMap false k n)) + change (inclusion n k 1).toFun ((Globe.category n).face true k Globe.Cell.top) = + (inclusion n k 2).toFun ((Globe.category n).face false k Globe.Cell.top) at h + exact ((inclusion n k 1).map_face true k Globe.Cell.top).symm.trans + (h.trans ((inclusion n k 2).map_face false k Globe.Cell.top)) + +theorem cell_dimension (n k : ℕ) (i : Fin 3) : + (category n k).DimensionLE n (cell n k i) := + (inclusion n k i).dimensionLE (Globe.category_truncated n Globe.Cell.top) + +theorem hom_ext {n k : ℕ} {C : StrictOmegaCategory.{0}} + (f g : category n k ⟶ C) + (h : ∀ i, f.toFun (cell n k i) = g.toFun (cell n k i)) : f = g := by + apply pushout.hom_ext + · apply PastingGlobe.hom_ext + · exact h 0 + · exact h 1 + · apply Globe.hom_ext + exact h 2 + +theorem desc_condition {n k : ℕ} (C : StrictOmegaCategory.{0}) (x : Fin 3 → C) + (hd : ∀ i, C.DimensionLE n (x i)) + (hm : ∀ i : Fin 2, C.target k (x i.castSucc) = C.source k (x i.succ)) : + bridge n k ≫ PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0) = + Globe.faceMap false k n ≫ Globe.lift C (x 2) (hd 2) := by + rw [Globe.faceMap_lift] + apply Globe.hom_ext + change (PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0)).toFun + ((PastingGlobe.right n n k).toFun ((Globe.category n).face true k Globe.Cell.top)) = + C.face false k (x 2) + let F := PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0) + exact (congrArg F.toFun ((PastingGlobe.right n n k).map_face true k Globe.Cell.top)).trans + ((F.map_face true k (PastingGlobe.rightCell n n k)).trans + ((congrArg (C.face true k) (PastingGlobe.desc_right C (x 0) (x 1) + (hd 0) (hd 1) (hm 0))).trans (hm 1))) + +def desc {n k : ℕ} (C : StrictOmegaCategory.{0}) (x : Fin 3 → C) + (hd : ∀ i, C.DimensionLE n (x i)) + (hm : ∀ i : Fin 2, C.target k (x i.castSucc) = C.source k (x i.succ)) : + category n k ⟶ C := + pushout.desc (PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + (Globe.lift C (x 2) (hd 2)) (desc_condition C x hd hm) + +@[simp] theorem desc_cell {n k : ℕ} (C : StrictOmegaCategory.{0}) (x : Fin 3 → C) + (hd : ∀ i, C.DimensionLE n (x i)) + (hm : ∀ i : Fin 2, C.target k (x i.castSucc) = C.source k (x i.succ)) + (i : Fin 3) : (desc C x hd hm).toFun (cell n k i) = x i := by + have hl := congrArg (fun F : PastingGlobe.category n n k ⟶ C => + F.toFun (PastingGlobe.leftCell n n k)) (pushout.inl_desc + (PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + (Globe.lift C (x 2) (hd 2)) (desc_condition C x hd hm)) + have hr := congrArg (fun F : PastingGlobe.category n n k ⟶ C => + F.toFun (PastingGlobe.rightCell n n k)) (pushout.inl_desc + (PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + (Globe.lift C (x 2) (hd 2)) (desc_condition C x hd hm)) + have ht := congrArg (fun F : Globe.category n ⟶ C => F.toFun Globe.Cell.top) + (pushout.inr_desc (PastingGlobe.desc C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + (Globe.lift C (x 2) (hd 2)) (desc_condition C x hd hm)) + fin_cases i + · exact hl.trans (PastingGlobe.desc_left C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + · exact hr.trans (PastingGlobe.desc_right C (x 0) (x 1) (hd 0) (hd 1) (hm 0)) + · exact ht + +end +end Thomason.Construction.StrictOmegaCategory.TripleGlobe + +end + +section + +/-! # The strict associativity diagram for three pasted globes + +The two bracketings are literal strict functors from a binary pasting +into the actual three-globe parameter. Their universal composites agree +by strict associativity in that parameter. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.TripleGlobe + +open CategoryTheory + +noncomputable section + +variable (n k : ℕ) (hk : k < n) + +def firstComposite : category n k := + (category n k).comp k (cell n k 0) (cell n k 1) (adjacent_matching n k 0) + +def lastComposite : category n k := + (category n k).comp k (cell n k 1) (cell n k 2) (adjacent_matching n k 1) + +theorem firstComposite_dimension (hk : k < n) : (category n k).DimensionLE n (firstComposite n k) := + (category n k).dimensionLE_comp hk (cell_dimension n k 0) (cell_dimension n k 1) _ + +theorem lastComposite_dimension (hk : k < n) : (category n k).DimensionLE n (lastComposite n k) := + (category n k).dimensionLE_comp hk (cell_dimension n k 1) (cell_dimension n k 2) _ + +theorem firstComposite_matching : + (category n k).target k (firstComposite n k) = (category n k).source k (cell n k 2) := + ((category n k).target_comp k _ _ _).trans (adjacent_matching n k 1) + +theorem lastComposite_matching : + (category n k).target k (cell n k 0) = (category n k).source k (lastComposite n k) := + (adjacent_matching n k 0).trans ((category n k).source_comp k _ _ _).symm + +/-- The inclusion of the second and third globe. -/ +def rightPair : PastingGlobe.category n n k ⟶ category n k := + PastingGlobe.desc _ (cell n k 1) (cell n k 2) + (cell_dimension n k 1) (cell_dimension n k 2) (adjacent_matching n k 1) + +theorem rightPair_left : + PastingGlobe.left n n k ≫ rightPair n k = inclusion n k 1 := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + +theorem rightPair_right : + PastingGlobe.right n n k ≫ rightPair n k = inclusion n k 2 := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + +theorem pair_composite : + (pair n k).toFun (PastingGlobe.composite n n k) = firstComposite n k := + (pair n k).map_comp k _ _ _ (adjacent_matching n k 0) + +theorem rightPair_composite : + (rightPair n k).toFun (PastingGlobe.composite n n k) = lastComposite n k := + PastingGlobe.desc_composite _ _ _ _ _ _ + +/-- The outer pair of the left-associated composite. -/ +def leftBracket : PastingGlobe.category n n k ⟶ category n k := + PastingGlobe.desc _ (firstComposite n k) (cell n k 2) + (firstComposite_dimension n k hk) (cell_dimension n k 2) (firstComposite_matching n k) + +/-- The outer pair of the right-associated composite. -/ +def rightBracket : PastingGlobe.category n n k ⟶ category n k := + PastingGlobe.desc _ (cell n k 0) (lastComposite n k) + (cell_dimension n k 0) (lastComposite_dimension n k hk) (lastComposite_matching n k) + +theorem leftBracket_left : + PastingGlobe.left n n k ≫ leftBracket n k hk = + GrayMapping.compositionGlobe n k hk ≫ pair n k := by + apply Globe.hom_ext + exact (PastingGlobe.desc_left _ _ _ _ _ _).trans (pair_composite n k).symm + +theorem leftBracket_right : + PastingGlobe.right n n k ≫ leftBracket n k hk = inclusion n k 2 := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + +theorem rightBracket_left : + PastingGlobe.left n n k ≫ rightBracket n k hk = inclusion n k 0 := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + +theorem rightBracket_right : + PastingGlobe.right n n k ≫ rightBracket n k hk = + GrayMapping.compositionGlobe n k hk ≫ rightPair n k := by + apply Globe.hom_ext + exact (PastingGlobe.desc_right _ _ _ _ _ _).trans (rightPair_composite n k).symm + +/-- Equality of the two actual universal composite maps. -/ +theorem associativity_diagram : + GrayMapping.compositionGlobe n k hk ≫ leftBracket n k hk = + GrayMapping.compositionGlobe n k hk ≫ rightBracket n k hk := by + apply Globe.hom_ext + exact (PastingGlobe.desc_composite _ _ _ _ _ _).trans + (((category n k).assoc k (cell n k 0) (cell n k 1) (cell n k 2) + (adjacent_matching n k 0) (adjacent_matching n k 1) + (firstComposite_matching n k) (lastComposite_matching n k)).trans + (PastingGlobe.desc_composite _ _ _ _ _ _).symm) + +end +end Thomason.Construction.StrictOmegaCategory.TripleGlobe + +end + +section + +/-! # Associativity evaluated in a three-globe cylinder + +This is the compatibility bridge between strict associativity of the +finite parameter and the concrete mapping composition. The only local +data is a map out of that actual parameter cylinder. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {D : StrictOmegaCategory.{0}} {n k : ℕ} + +theorem composite_congr (hk : k < n) + {f g f' g' : model.obj (Globe.category n) ⟶ D} (hf : f = f') (hg : g = g') + (h : model.map (Globe.faceMap true k n) ≫ f = model.map (Globe.faceMap false k n) ≫ g) + (h' : model.map (Globe.faceMap true k n) ≫ f' = model.map (Globe.faceMap false k n) ≫ g') : + composite hk f g h = composite hk f' g' h' := by + subst f' + subst g' + rfl + +/-- Evaluate any binary parameter when its two legs have already been identified. -/ +theorem composite_evaluation_of_legs {C : StrictOmegaCategory.{0}} (hk : k < n) + (p : PastingGlobe.category n n k ⟶ C) (u : model.obj C ⟶ D) + (f g : model.obj (Globe.category n) ⟶ D) + (hf : model.map (PastingGlobe.left n n k ≫ p) ≫ u = f) + (hg : model.map (PastingGlobe.right n n k ≫ p) ≫ u = g) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) : + composite hk f g h = model.map (compositionGlobe n k hk ≫ p) ≫ u := + (composite_congr hk hf hg (evaluation_matching p u) h).symm.trans + (composite_evaluation hk p u (evaluation_matching p u)) + +abbrev tripleEvaluation (u : model.obj (TripleGlobe.category n k) ⟶ D) (i : Fin 3) : + model.obj (Globe.category n) ⟶ D := model.map (TripleGlobe.inclusion n k i) ≫ u + +theorem triple_first_composite (hk : k < n) + (u : model.obj (TripleGlobe.category n k) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 0 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 1) : + composite hk (tripleEvaluation u 0) (tripleEvaluation u 1) h = + model.map (compositionGlobe n k hk ≫ TripleGlobe.pair n k) ≫ u := + composite_evaluation hk (TripleGlobe.pair n k) u h + +theorem triple_last_composite (hk : k < n) + (u : model.obj (TripleGlobe.category n k) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 1 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 2) : + composite hk (tripleEvaluation u 1) (tripleEvaluation u 2) h = + model.map (compositionGlobe n k hk ≫ TripleGlobe.rightPair n k) ≫ u := by + have hm := evaluation_matching (TripleGlobe.rightPair n k) u + have he := composite_evaluation hk (TripleGlobe.rightPair n k) u hm + have hf : model.map (PastingGlobe.left n n k ≫ TripleGlobe.rightPair n k) ≫ u = + tripleEvaluation u 1 := congrArg (fun p => model.map p ≫ u) (TripleGlobe.rightPair_left n k) + have hg : model.map (PastingGlobe.right n n k ≫ TripleGlobe.rightPair n k) ≫ u = + tripleEvaluation u 2 := congrArg (fun p => model.map p ≫ u) (TripleGlobe.rightPair_right n k) + exact (composite_congr hk hf hg hm h).symm.trans he + +theorem triple_associativity (hk : k < n) + (u : model.obj (TripleGlobe.category n k) ⟶ D) + (h01 : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 0 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 1) + (h12 : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 1 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 2) + (hl : model.map (Globe.faceMap true k n) ≫ + composite hk (tripleEvaluation u 0) (tripleEvaluation u 1) h01 = + model.map (Globe.faceMap false k n) ≫ tripleEvaluation u 2) + (hr : model.map (Globe.faceMap true k n) ≫ tripleEvaluation u 0 = + model.map (Globe.faceMap false k n) ≫ + composite hk (tripleEvaluation u 1) (tripleEvaluation u 2) h12) : + composite hk (composite hk (tripleEvaluation u 0) (tripleEvaluation u 1) h01) + (tripleEvaluation u 2) hl = + composite hk (tripleEvaluation u 0) + (composite hk (tripleEvaluation u 1) (tripleEvaluation u 2) h12) hr := by + have hml := evaluation_matching (TripleGlobe.leftBracket n k hk) u + have hmr := evaluation_matching (TripleGlobe.rightBracket n k hk) u + have heL := composite_evaluation hk (TripleGlobe.leftBracket n k hk) u hml + have heR := composite_evaluation hk (TripleGlobe.rightBracket n k hk) u hmr + have hL0 : model.map (PastingGlobe.left n n k ≫ TripleGlobe.leftBracket n k hk) ≫ u = + composite hk (tripleEvaluation u 0) (tripleEvaluation u 1) h01 := + (congrArg (fun p => model.map p ≫ u) (TripleGlobe.leftBracket_left n k hk)).trans + (triple_first_composite hk u h01).symm + have hL1 : model.map (PastingGlobe.right n n k ≫ TripleGlobe.leftBracket n k hk) ≫ u = + tripleEvaluation u 2 := + congrArg (fun p => model.map p ≫ u) (TripleGlobe.leftBracket_right n k hk) + have hR0 : model.map (PastingGlobe.left n n k ≫ TripleGlobe.rightBracket n k hk) ≫ u = + tripleEvaluation u 0 := + congrArg (fun p => model.map p ≫ u) (TripleGlobe.rightBracket_left n k hk) + have hR1 : model.map (PastingGlobe.right n n k ≫ TripleGlobe.rightBracket n k hk) ≫ u = + composite hk (tripleEvaluation u 1) (tripleEvaluation u 2) h12 := + (congrArg (fun p => model.map p ≫ u) (TripleGlobe.rightBracket_right n k hk)).trans + (triple_last_composite hk u h12).symm + exact (composite_congr hk hL0 hL1 hml hl).symm.trans + (heL.trans ((congrArg (fun p => model.map p ≫ u) + (TripleGlobe.associativity_diagram n k hk)).trans + (heR.symm.trans (composite_congr hk hR0 hR1 hmr hr)))) + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Evaluation carries the strict grid interchange to mapping composition -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {D : StrictOmegaCategory.{0}} {n k l : ℕ} {hkl : k < l} + +abbrev gridEvaluation (u : model.obj (GridGlobe.category n k l hkl) ⟶ D) (b a : Bool) : + model.obj (Globe.category n) ⟶ D := model.map (GridGlobe.inclusion n k l hkl b a) ≫ u + +theorem grid_row_composite (hln : l < n) + (u : model.obj (GridGlobe.category n k l hkl) ⟶ D) (b : Bool) + (h : model.map (Globe.faceMap true k n) ≫ gridEvaluation u b false = + model.map (Globe.faceMap false k n) ≫ gridEvaluation u b true) : + composite (hkl.trans hln) (gridEvaluation u b false) (gridEvaluation u b true) h = + model.map (compositionGlobe n k (hkl.trans hln) ≫ GridGlobe.row n k l hkl b) ≫ u := + composite_evaluation (hkl.trans hln) (GridGlobe.row n k l hkl b) u h + +theorem grid_column_composite (hln : l < n) + (u : model.obj (GridGlobe.category n k l hkl) ⟶ D) (a : Bool) + (h : model.map (Globe.faceMap true l n) ≫ gridEvaluation u false a = + model.map (Globe.faceMap false l n) ≫ gridEvaluation u true a) : + composite hln (gridEvaluation u false a) (gridEvaluation u true a) h = + model.map (compositionGlobe n l hln ≫ GridGlobe.column n k l hkl a) ≫ u := + composite_evaluation_of_legs hln (GridGlobe.column n k l hkl a) u _ _ + (congrArg (fun p => model.map p ≫ u) (GridGlobe.column_left n k l hkl a)) + (congrArg (fun p => model.map p ≫ u) (GridGlobe.column_right n k l hkl a)) h + +/-- Any actual map from the grid cylinder respects strict interchange. -/ +theorem grid_interchange (hln : l < n) + (u : model.obj (GridGlobe.category n k l hkl) ⟶ D) + (ht : model.map (Globe.faceMap true k n) ≫ gridEvaluation u false false = + model.map (Globe.faceMap false k n) ≫ gridEvaluation u false true) + (hb : model.map (Globe.faceMap true k n) ≫ gridEvaluation u true false = + model.map (Globe.faceMap false k n) ≫ gridEvaluation u true true) + (hl : model.map (Globe.faceMap true l n) ≫ gridEvaluation u false false = + model.map (Globe.faceMap false l n) ≫ gridEvaluation u true false) + (hr : model.map (Globe.faceMap true l n) ≫ gridEvaluation u false true = + model.map (Globe.faceMap false l n) ≫ gridEvaluation u true true) + (hv : model.map (Globe.faceMap true l n) ≫ + composite (hkl.trans hln) (gridEvaluation u false false) (gridEvaluation u false true) ht = + model.map (Globe.faceMap false l n) ≫ + composite (hkl.trans hln) (gridEvaluation u true false) (gridEvaluation u true true) hb) + (hh : model.map (Globe.faceMap true k n) ≫ + composite hln (gridEvaluation u false false) (gridEvaluation u true false) hl = + model.map (Globe.faceMap false k n) ≫ + composite hln (gridEvaluation u false true) (gridEvaluation u true true) hr) : + composite hln + (composite (hkl.trans hln) (gridEvaluation u false false) (gridEvaluation u false true) ht) + (composite (hkl.trans hln) (gridEvaluation u true false) (gridEvaluation u true true) hb) hv = + composite (hkl.trans hln) + (composite hln (gridEvaluation u false false) (gridEvaluation u true false) hl) + (composite hln (gridEvaluation u false true) (gridEvaluation u true true) hr) hh := by + have hv0 := (congrArg (fun p => model.map p ≫ u) + (GridGlobe.verticalOuter_left n k l hkl hln)).trans (grid_row_composite hln u false ht).symm + have hv1 := (congrArg (fun p => model.map p ≫ u) + (GridGlobe.verticalOuter_right n k l hkl hln)).trans (grid_row_composite hln u true hb).symm + have hh0 := (congrArg (fun p => model.map p ≫ u) + (GridGlobe.horizontalOuter_left n k l hkl hln)).trans (grid_column_composite hln u false hl).symm + have hh1 := (congrArg (fun p => model.map p ≫ u) + (GridGlobe.horizontalOuter_right n k l hkl hln)).trans (grid_column_composite hln u true hr).symm + exact (composite_evaluation_of_legs hln (GridGlobe.verticalOuter n k l hkl hln) + u _ _ hv0 hv1 hv).trans + ((congrArg (fun p => model.map p ≫ u) (GridGlobe.interchange_diagram n k l hkl hln)).trans + (composite_evaluation_of_legs (hkl.trans hln) (GridGlobe.horizontalOuter n k l hkl hln) + u _ _ hh0 hh1 hh).symm) + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GraySimplexProjection.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GraySimplexProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..379abfdf98cc82075d6a0a824c0bbaca944776e1 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GraySimplexProjection.lean @@ -0,0 +1,189 @@ +import OAI.CategoryTheory.Thomason.Gray.GrayMappingEndpointEvaluation +import OAI.CategoryTheory.Thomason.Gray.TopologicalConePrism +import OAI.CategoryTheory.Thomason.Simplicial.SingularPathSpaceAdjunction + +namespace OAI + +section + +/-! # Actual realization equivalences on the finite Gray parameters + +The constructed global collapse restricts to the literal weak chain +collapse on every globe and binary pasting. Both surrounding comparison +maps are proved strict isomorphisms. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +theorem projection_parameter (i : GlobePasting.Shape) : + projection.app (GlobePasting.object i) = + parameterIso.inv.app i ≫ parameterProjection.app i := by + let C := GlobePasting.object i + let e : model.obj C ≅ cylinder.obj C := parameterIso.app i + let p : model.obj C ⟶ C := parameterProjection.app i + have hp : e.hom ≫ projection.app C = p := + congrArg (fun t => t.app i) projection_parameters + change projection.app C = e.inv ≫ p + exact (e.inv_hom_id_assoc (projection.app C)).symm.trans + (congrArg (fun f => e.inv ≫ f) hp) + +/-- The constructed collapse is an actual Street-realization weak +equivalence on every finite parameter used by its extension. -/ +theorem projection_parameter_weak (h : NormalizedSimplexIdentities) + (i : GlobePasting.Shape) : + h.streetWeakEquivalences (projection.app (GlobePasting.object i)) := by + have : h.streetWeakEquivalences.HasTwoOutOfThreeProperty := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).HasTwoOutOfThreeProperty + have : h.streetWeakEquivalences.ContainsIdentities := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).ContainsIdentities + have : h.streetWeakEquivalences.RespectsIso := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).RespectsIso + let C := GlobePasting.object i + let e : model.obj C ≅ cylinder.obj C := parameterIso.app i + let u : C ≅ (Abelianization.complex C).realization := parameterUnitIso.app i + let q : model.obj C ⟶ (Abelianization.complex C).realization := modelCollapse.app C + have hp : projection.app C = e.inv ≫ (q ≫ u.inv) := projection_parameter i + have he : h.streetWeakEquivalences e.inv := + MorphismProperty.of_isIso h.streetWeakEquivalences e.inv + have hu : h.streetWeakEquivalences u.inv := + MorphismProperty.of_isIso h.streetWeakEquivalences u.inv + have hq : h.streetWeakEquivalences q := + h.chainCylinder_projection_weak (Abelianization.complex C) + have hw : h.streetWeakEquivalences (e.inv ≫ (q ≫ u.inv)) := + h.streetWeakEquivalences.comp_mem _ _ he + (h.streetWeakEquivalences.comp_mem _ _ hq hu) + exact hp.symm ▸ hw + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Exact agreement of the extended cylinder with ordered chain cylinders -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- The actual extended cylinder agrees with the positive chain cylinder on +every ordered atomic realization whose cylinder basis has the proved order. -/ +def orderedRealizationCylinderIso {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + (hs : B.SideHeight) : cylinder.obj K.realization ≅ (rightCylinder K).realization := + (B.cylinderOrderedAtomBasis hs).comparisonIso (cylinderAtomLift B) (comparisonToRealization K) + (fun a => atomLift_image B a.2) (fun a => atomLift_dimension B a.2) + (generated_from_atoms B) + +@[simp] theorem orderedRealizationCylinderIso_hom {K : DirectedComplex.{0}} + (B : OrderedAtomBasis K) (hs : B.SideHeight) : + (orderedRealizationCylinderIso B hs).hom = comparisonToRealization K := rfl + +theorem comparisonToRealization_isIso {K : DirectedComplex.{0}} + (B : OrderedAtomBasis K) (hs : B.SideHeight) : IsIso (comparisonToRealization K) := by + change IsIso (orderedRealizationCylinderIso B hs).hom + infer_instance + +/-- In particular, the actual cylinder of each oriental is its literal +normalized-chain right cylinder. -/ +def simplexCylinderIso (h : NormalizedSimplexIdentities) (m : ℕ) : + cylinder.obj (h.object m) ≅ + (rightCylinder (SimplexComplex.directedComplex m (h.squared m))).realization := + orderedRealizationCylinderIso (SimplexComplex.orderedAtomBasis h m) + (SimplexComplex.orderedAtomBasis_sideHeight h m) + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # Compatibility of the actual simplex cylinder collapse + +The oriental abelianization unit is invertible. The natural chain-cylinder +comparison intertwines collapse before and after the global extension. +-/ + +namespace Thomason.Construction.NormalizedSimplexIdentities + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable (h : NormalizedSimplexIdentities) + +/-- On an actual oriental, the abelianization unit is a strict isomorphism. -/ +def orientalUnitIso (m : ℕ) : + h.object m ≅ (StrictOmegaCategory.Abelianization.complex (h.object m)).realization := + realizationFunctor.mapIso ((simplexAtoms h).abelianizationIso m).symm + +theorem orientalUnitIso_hom (m : ℕ) : + (h.orientalUnitIso m).hom = StrictOmegaCategory.Abelianization.unit (h.object m) := + ((simplexAtoms h).unit_eq_realized_inverse m).symm + +/-- The concrete chain comparison commutes with interval collapse. -/ +theorem constructedChainModelComparison_projection (m : SimplexCategory) : + h.constructedChainModelComparison.hom.app m ≫ + StrictOmegaCategory.GrayChainExtension.modelCollapse.app (h.object m.len) = + h.cylinderProjection.app m ≫ StrictOmegaCategory.Abelianization.unit (h.object m.len) := by + let a := simplexAtoms h + let K := SimplexComplex.directedComplex m.len (h.squared m.len) + let L := StrictOmegaCategory.Abelianization.complex (h.object m.len) + let b : DirectedComplex.Hom K L := a.fromSimplexChains m.len + let v : K.realization ⟶ L.realization := b.realization + let cv : (rightCylinder K).realization ⟶ (rightCylinder L).realization := + (RightCylinder.map b).realization + let pK : (rightCylinder K).realization ⟶ K.realization := + (RightCylinder.projection K).realization + let pL : (rightCylinder L).realization ⟶ L.realization := + (RightCylinder.projection L).realization + have hn : cv ≫ pL = pK ≫ v := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_projection_map b x + change cv ≫ pL = pK ≫ StrictOmegaCategory.Abelianization.unit (h.object m.len) + exact hn.trans (congrArg (fun q : K.realization ⟶ L.realization => pK ≫ q) + (a.unit_eq_realized_inverse m.len).symm) + +/-- A map into the extended cylinder with the actual chain comparison has +the prescribed collapse. No invertibility of that map is needed here. -/ +theorem extendedComparison_projection (m : SimplexCategory) + (f : h.cylinderObject m.len ⟶ StrictOmegaCategory.GrayChainExtension.cylinder.obj + (h.object m.len)) + (hf : f ≫ StrictOmegaCategory.GrayChainExtension.comparison.app (h.object m.len) = + h.constructedChainModelComparison.hom.app m) : + f ≫ StrictOmegaCategory.GrayChainExtension.projection.app (h.object m.len) = + h.cylinderProjection.app m := by + apply (cancel_mono (h.orientalUnitIso m.len).hom).mp + rw [h.orientalUnitIso_hom] + have hp := congrArg (fun q => q.app (h.object m.len)) + StrictOmegaCategory.GrayChainExtension.projection_unit + change StrictOmegaCategory.GrayChainExtension.projection.app (h.object m.len) ≫ + StrictOmegaCategory.Abelianization.unit (h.object m.len) = + StrictOmegaCategory.GrayChainExtension.comparison.app (h.object m.len) ≫ + StrictOmegaCategory.GrayChainExtension.modelCollapse.app (h.object m.len) at hp + let q : StrictOmegaCategory.GrayChainExtension.model.obj (h.object m.len) ⟶ + (StrictOmegaCategory.Abelianization.complex (h.object m.len)).realization := + StrictOmegaCategory.GrayChainExtension.modelCollapse.app (h.object m.len) + let c : StrictOmegaCategory.GrayChainExtension.cylinder.obj (h.object m.len) ⟶ + StrictOmegaCategory.GrayChainExtension.model.obj (h.object m.len) := + StrictOmegaCategory.GrayChainExtension.comparison.app (h.object m.len) + exact (Category.assoc _ _ _).trans + ((congrArg (fun v => f ≫ v) hp).trans + (((Category.assoc f c q).symm).trans + ((congrArg (fun v => v ≫ q) hf).trans + (h.constructedChainModelComparison_projection m)))) + +end +end Thomason.Construction.NormalizedSimplexIdentities + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GraySingularPathComparison.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GraySingularPathComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..f4164ff22d66034bf46a482a9c3ae9b16c88a397 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GraySingularPathComparison.lean @@ -0,0 +1,164 @@ +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Gray.SingularCylinderEquivalence +import OAI.CategoryTheory.Thomason.Simplicial.FinitePosetCoordinates +import OAI.CategoryTheory.Thomason.Simplicial.SingularCounitSurjectivity +import OAI.CategoryTheory.Thomason.Simplicial.SingularPathSpaceAdjunction +import OAI.CategoryTheory.Thomason.Simplicial.TopologicalDeformationTransport +import OAI.CategoryTheory.Thomason.Strict.StreetSingularWeakReflection + +namespace OAI + +section + +/-! # Barycentric lifting tests for the actual Gray--Street comparison + +These are consequences of the constructed topological lifting bridge. +They add no hypothesis to the main theorem and do not assert that an +arbitrary Gray projection has the displayed lifting property. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +noncomputable section + +/-- Singular boundary lifting forces the weak test both before and after + singularization, without requiring the singular counit to be weak. -/ +theorem weak_and_singular_weak_of_singular_boundary_rlp {X Y : TopCat.{0}} (f : X ⟶ Y) + (hf : SSet.modelCategoryQuillen.I.rlp (TopCat.toSSet.map f)) : + topologicalWeakEquivalences f ∧ realizationWeakEquivalences (TopCat.toSSet.map f) := by + have h := (RealizationPrism.singular_boundary_rlp_iff f).mp hf + exact ⟨CubicalLifting.weak_of_barycentric f h, + RealizationPrism.singular_weak_of_boundary_lifting f h⟩ + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + +/-- The concrete boundary lifting test on a realized strict Gray projection + suffices for the actual simplicial Gray--Street comparison to be weak. -/ +theorem nerveCylinder_weak_of_boundary_lifting (X : StrictOmegaCategory.{0}) + (hp : ∀ n, HasLiftingProperty (RealizationPrism.boundaryInclusion n) + (SSet.toTop.map (h.streetNerve.map (G.projection.app X)))) : + realizationWeakEquivalences (G.nerveCylinder aw X) := + (G.nerveCylinder_weak_iff_projection aw X).mpr + (CubicalLifting.weak_of_barycentric _ hp) + +/-- The same lifting test controls the original continuous comparison map, + including all basepoints and positive homotopy groups. -/ +theorem realizedCylinderComparison_weak_of_boundary_lifting (X : StrictOmegaCategory.{0}) + (hp : ∀ n, HasLiftingProperty (RealizationPrism.boundaryInclusion n) + (SSet.toTop.map (h.streetNerve.map (G.projection.app X)))) : + topologicalWeakEquivalences (G.realizedCylinderComparison aw X) := + (G.nerveCylinder_weak_iff aw X).mp (G.nerveCylinder_weak_of_boundary_lifting aw X hp) + +end RightGrayInput + +namespace NormalizedSimplexIdentities + +/-- For strict full inclusions the lifting test implies precisely the + Street weak test, using the actual closed subspace realization. -/ +theorem fullInclusion_weak_of_boundary_lifting (h : NormalizedSimplexIdentities) + (C : StrictOmegaCategory.{0}) (S : Set C) + (hp : ∀ n, HasLiftingProperty (RealizationPrism.boundaryInclusion n) + (SSet.toTop.map (h.streetNerve.map (C.fullInclusion S)))) : + h.streetWeakEquivalences (C.fullInclusion S) := + CubicalLifting.weak_of_barycentric _ hp + +end NormalizedSimplexIdentities + +end + +end Thomason.Construction + +end + +section + +/-! # Gray homotopies in the actual singular path object of Street realization -/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + +/-- The strict Gray homotopy transposed into the actual compact-open path +space of the Street realization. -/ +def singularPathTranspose {X Y : StrictOmegaCategory.{0}} (P : G.cylinder.obj X ⟶ Y) : + h.streetNerve.obj X ⟶ TopCat.toSSet.obj + (continuousPathSpace (SSet.toTop.obj (h.streetNerve.obj Y))) := + sSetTopAdj.homEquiv _ _ (TopCat.ofHom + (((G.realizedHomotopy aw P).toContinuousMap.comp ContinuousMap.prodSwap).curry)) + +/-- The path-space transpose recovers the original Street-nerve cylinder +followed by the actual realization/singular unit. -/ +theorem singularPathTranspose_cylinder {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + singularPathCylinderEquiv _ _ (G.singularPathTranspose aw P) = + (G.nerveHomotopy aw P).h ≫ sSetTopAdj.unit.app (h.streetNerve.obj Y) := by + let F : SSet.toTop.obj (h.streetNerve.obj X) ⟶ + continuousPathSpace (SSet.toTop.obj (h.streetNerve.obj Y)) := + TopCat.ofHom (((G.realizedHomotopy aw P).toContinuousMap.comp + ContinuousMap.prodSwap).curry) + change singularCylinderMap + (continuousPathFamilyEquiv _ _ ((sSetTopAdj.homEquiv _ _).symm + (sSetTopAdj.homEquiv _ _ F))) = _ + rw [(sSetTopAdj.homEquiv _ _).symm_apply_apply F] + change singularCylinderMap (G.realizedHomotopy aw P).toContinuousMap = _ + exact singularCylinderMap_realizedHomotopy (G.nerveHomotopy aw P) + +theorem singularPathTranspose_zero {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + SSet.ι₀ ≫ singularPathCylinderEquiv _ _ (G.singularPathTranspose aw P) = + h.streetNerve.map ((G.endpoint false).app X ≫ P) ≫ + sSetTopAdj.unit.app (h.streetNerve.obj Y) := by + rw [G.singularPathTranspose_cylinder aw, ← Category.assoc, (G.nerveHomotopy aw P).h₀] + +theorem singularPathTranspose_one {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + SSet.ι₁ ≫ singularPathCylinderEquiv _ _ (G.singularPathTranspose aw P) = + h.streetNerve.map ((G.endpoint true).app X ≫ P) ≫ + sSetTopAdj.unit.app (h.streetNerve.obj Y) := by + rw [G.singularPathTranspose_cylinder aw, ← Category.assoc, (G.nerveHomotopy aw P).h₁] + +end RightGrayInput + +/-- Weak equivalence of the actual singular internal-hom path map reflects +the original topological weak test, with no singular-counit assumption. -/ +theorem weak_of_singular_path_internalHom {X Y : TopCat.{0}} (p : X ⟶ Y) + (hp : realizationWeakEquivalences + ((ihom (Δ[1] : SSet.{0})).map (TopCat.toSSet.map p))) : + IsWeakHomotopyEquivalence p.hom := by + have hpath : realizationWeakEquivalences (TopCat.toSSet.map (continuousPathMap p)) := + (realizationWeakEquivalences.arrow_mk_iso_iff (singularPathMapArrowIso p)).mpr hp + exact (continuousPathMap_weak_iff p).mp + (singular_realization_reflects_weak (continuousPathMap p) hpath) + +namespace NormalizedSimplexIdentities + +/-- The same exact reflection applies to the implemented strict Street nerve. -/ +theorem streetWeak_of_singular_path_internalHom (h : NormalizedSimplexIdentities) + {X Y : StrictOmegaCategory.{0}} (f : X ⟶ Y) + (hf : realizationWeakEquivalences ((ihom (Δ[1] : SSet.{0})).map + (TopCat.toSSet.map (SSet.toTop.map (h.streetNerve.map f))))) : + h.streetWeakEquivalences f := + weak_of_singular_path_internalHom _ hf + +end NormalizedSimplexIdentities + +end + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/GridGlobeCylinderComparison.lean b/lean/OAI/CategoryTheory/Thomason/Gray/GridGlobeCylinderComparison.lean new file mode 100644 index 0000000000000000000000000000000000000000..6de776d513f3ffd3874ed264e730210f789be1fe --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/GridGlobeCylinderComparison.lean @@ -0,0 +1,956 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.GrayMappingEndpointEvaluation +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderRetractions + +namespace OAI + +section + +/-! # Higher-face compatibility of the actual mapping composition -/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +private theorem face_matching (a : Bool) (r n k : ℕ) (hkr : k < r) : + (PastingGlobe.category n n k).target k + ((PastingGlobe.category n n k).face a r (PastingGlobe.leftCell n n k)) = + (PastingGlobe.category n n k).source k + ((PastingGlobe.category n n k).face a r (PastingGlobe.rightCell n n k)) := by + simpa only [source, target, (PastingGlobe.category n n k).globular, hkr, ite_true] using + PastingGlobe.matching n n k + +def pastingFace (a : Bool) (r n k : ℕ) (hkr : k < r) : + PastingGlobe.category r r k ⟶ PastingGlobe.category n n k := + PastingGlobe.desc _ + ((PastingGlobe.category n n k).face a r (PastingGlobe.leftCell n n k)) + ((PastingGlobe.category n n k).face a r (PastingGlobe.rightCell n n k)) + ((PastingGlobe.category n n k).face_dimensionLE a r _) + ((PastingGlobe.category n n k).face_dimensionLE a r _) + (face_matching a r n k hkr) + +theorem pastingFace_left (a : Bool) (r n k : ℕ) (hkr : k < r) : + PastingGlobe.left r r k ≫ pastingFace a r n k hkr = + Globe.faceMap a r n ≫ PastingGlobe.left n n k := by + apply Globe.hom_ext + exact (PastingGlobe.desc_left _ _ _ _ _ _).trans + ((PastingGlobe.left n n k).map_face a r Globe.Cell.top).symm + +theorem pastingFace_right (a : Bool) (r n k : ℕ) (hkr : k < r) : + PastingGlobe.right r r k ≫ pastingFace a r n k hkr = + Globe.faceMap a r n ≫ PastingGlobe.right n n k := by + apply Globe.hom_ext + exact (PastingGlobe.desc_right _ _ _ _ _ _).trans + ((PastingGlobe.right n n k).map_face a r Globe.Cell.top).symm + +theorem compositionGlobe_face (a : Bool) (r n k : ℕ) (hkr : k < r) (hkn : k < n) : + compositionGlobe r k hkr ≫ pastingFace a r n k hkr = + Globe.faceMap a r n ≫ compositionGlobe n k hkn := by + apply Globe.hom_ext + exact (PastingGlobe.desc_composite _ _ _ _ _ _).trans + (((PastingGlobe.category n n k).face_comp a r k hkr + (PastingGlobe.leftCell n n k) (PastingGlobe.rightCell n n k) + (PastingGlobe.matching n n k) (face_matching a r n k hkr)).symm.trans + ((compositionGlobe n k hkn).map_face a r Globe.Cell.top).symm) + +variable {D : StrictOmegaCategory.{0}} {n k : ℕ} + +theorem glue_face (a : Bool) (r : ℕ) (hkr : k < r) (hkn : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (hr : model.map (Globe.faceMap true k r) ≫ (model.map (Globe.faceMap a r n) ≫ f) = + model.map (Globe.faceMap false k r) ≫ (model.map (Globe.faceMap a r n) ≫ g)) : + glue hkr (model.map (Globe.faceMap a r n) ≫ f) + (model.map (Globe.faceMap a r n) ≫ g) hr = + model.map (pastingFace a r n k hkr) ≫ glue hkn f g h := by + apply (PastingGlobe.CylinderSource.isPushout hkr).hom_ext + · rw [glue_left, ← Category.assoc, ← model.map_comp, pastingFace_left, + model.map_comp, Category.assoc, glue_left] + · rw [glue_right, ← Category.assoc, ← model.map_comp, pastingFace_right, + model.map_comp, Category.assoc, glue_right] + +theorem composite_face (a : Bool) (r : ℕ) (hkr : k < r) (hkn : k < n) + (f g : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ g) + (hr : model.map (Globe.faceMap true k r) ≫ (model.map (Globe.faceMap a r n) ≫ f) = + model.map (Globe.faceMap false k r) ≫ (model.map (Globe.faceMap a r n) ≫ g)) : + composite hkr (model.map (Globe.faceMap a r n) ≫ f) + (model.map (Globe.faceMap a r n) ≫ g) hr = + model.map (Globe.faceMap a r n) ≫ composite hkn f g h := by + change model.map (compositionGlobe r k hkr) ≫ glue _ _ _ hr = _ + rw [glue_face a r hkr hkn f g h hr, ← Category.assoc, ← model.map_comp, + compositionGlobe_face, model.map_comp, Category.assoc] + rfl + +/-- The actual mapping-cell composition preserves every higher face. -/ +theorem face_comp (a : Bool) (r k : ℕ) (hkr : k < r) (x y : Cell D) + (h : GlobeMappingCells.face model D true k x = GlobeMappingCells.face model D false k y) + (h' : GlobeMappingCells.face model D true k (GlobeMappingCells.face model D a r x) = + GlobeMappingCells.face model D false k (GlobeMappingCells.face model D a r y)) : + GlobeMappingCells.face model D a r (comp k x y h) = + comp k (GlobeMappingCells.face model D a r x) (GlobeMappingCells.face model D a r y) h' := by + let R := Classical.choice (representative_exists k x y h) + let f : model.obj (Globe.category r) ⟶ D := model.map (Globe.faceMap a r R.bound) ≫ R.first + let g : model.obj (Globe.category r) ⟶ D := model.map (Globe.faceMap a r R.bound) ≫ R.last + have hf : GlobeMappingCells.ι model D r f = GlobeMappingCells.face model D a r x := + (GlobeMappingCells.face_ι model D a r R.bound R.first).symm.trans + (congrArg (GlobeMappingCells.face model D a r) R.first_eq) + have hg : GlobeMappingCells.ι model D r g = GlobeMappingCells.face model D a r y := + (GlobeMappingCells.face_ι model D a r R.bound R.last).symm.trans + (congrArg (GlobeMappingCells.face model D a r) R.last_eq) + have hr : model.map (Globe.faceMap true k r) ≫ f = + model.map (Globe.faceMap false k r) ≫ g := + GlobeMappingCells.matching_representatives model D _ _ h' f g hf hg + have hm := (GlobeMappingCells.faces_eq_iff model D true false k r r f g).mpr hr + calc + _ = GlobeMappingCells.face model D a r R.value := + congrArg (GlobeMappingCells.face model D a r) (comp_eq k x y h R) + _ = GlobeMappingCells.ι model D r + (model.map (Globe.faceMap a r R.bound) ≫ composite R.lt_bound R.first R.last R.matching) := + GlobeMappingCells.face_ι model D a r R.bound _ + _ = GlobeMappingCells.ι model D r (composite hkr f g hr) := + congrArg (GlobeMappingCells.ι model D r) + (composite_face a r hkr R.lt_bound R.first R.last R.matching hr).symm + _ = comp k (GlobeMappingCells.ι model D r f) (GlobeMappingCells.ι model D r g) hm := + (comp_ι hkr f g hr hm).symm + _ = _ := comp_congr hf hg hm h' + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Unit laws for actual bounded mapping composition + +The retractions of the two pasted globes implement composition with the +source or target identity. Functoriality of the concrete chain model and +the proved pushout universal property give the mapping-level unit laws. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +theorem compositionGlobe_retractRight (n k : ℕ) (hk : k < n) : + compositionGlobe n k hk ≫ PastingGlobe.retractRight n n k hk.le = 𝟙 _ := by + apply Globe.hom_ext + exact (PastingGlobe.desc_composite _ _ _ _ _ _).trans + ((Globe.category n).left_unit k Globe.Cell.top _) + +theorem compositionGlobe_retractLeft (n k : ℕ) (hk : k < n) : + compositionGlobe n k hk ≫ PastingGlobe.retractLeft n n k hk.le = 𝟙 _ := by + apply Globe.hom_ext + exact (PastingGlobe.desc_composite _ _ _ _ _ _).trans + ((Globe.category n).right_unit k Globe.Cell.top _) + +variable {D : StrictOmegaCategory.{0}} {n k : ℕ} + +def paddedFace (a : Bool) (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) : + model.obj (Globe.category n) ⟶ D := + model.map (PastingGlobe.collapseTo n k hk.le ≫ Globe.faceMap a k n) ≫ f + +theorem paddedFace_cell (a : Bool) (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) : + GlobeMappingCells.ι model D n (paddedFace a hk f) = + GlobeMappingCells.face model D a k (GlobeMappingCells.ι model D n f) := by + have he : PastingGlobe.collapseTo n k hk.le = Globe.lower n k hk.le := rfl + change GlobeMappingCells.ι model D n + (model.map (PastingGlobe.collapseTo n k hk.le ≫ Globe.faceMap a k n) ≫ f) = _ + rw [he, model.map_comp, Category.assoc, GlobeMappingCells.ι_lower, + GlobeMappingCells.face_ι] + +theorem glue_source_identity (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ paddedFace false hk f = + model.map (Globe.faceMap false k n) ≫ f) : + glue hk (paddedFace false hk f) f h = + model.map (PastingGlobe.retractRight n n k hk.le) ≫ f := by + apply (PastingGlobe.CylinderSource.isPushout hk).hom_ext + · rw [glue_left, ← Category.assoc, ← model.map_comp, PastingGlobe.left_retractRight] + rfl + · rw [glue_right, ← Category.assoc, ← model.map_comp, + PastingGlobe.right_retractRight, model.map_id, Category.id_comp] + +theorem glue_target_identity (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ paddedFace true hk f) : + glue hk f (paddedFace true hk f) h = + model.map (PastingGlobe.retractLeft n n k hk.le) ≫ f := by + apply (PastingGlobe.CylinderSource.isPushout hk).hom_ext + · rw [glue_left, ← Category.assoc, ← model.map_comp, + PastingGlobe.left_retractLeft, model.map_id, Category.id_comp] + · rw [glue_right, ← Category.assoc, ← model.map_comp, PastingGlobe.right_retractLeft] + rfl + +theorem composite_source_identity (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ paddedFace false hk f = + model.map (Globe.faceMap false k n) ≫ f) : + composite hk (paddedFace false hk f) f h = f := by + change model.map (compositionGlobe n k hk) ≫ glue hk (paddedFace false hk f) f h = f + rw [glue_source_identity, ← Category.assoc, ← model.map_comp, + compositionGlobe_retractRight, model.map_id, Category.id_comp] + +theorem composite_target_identity (hk : k < n) (f : model.obj (Globe.category n) ⟶ D) + (h : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ paddedFace true hk f) : + composite hk f (paddedFace true hk f) h = f := by + change model.map (compositionGlobe n k hk) ≫ glue hk f (paddedFace true hk f) h = f + rw [glue_target_identity, ← Category.assoc, ← model.map_comp, + compositionGlobe_retractLeft, model.map_id, Category.id_comp] + +theorem left_unit (k : ℕ) (x : Cell D) + (h : GlobeMappingCells.face model D true k (GlobeMappingCells.face model D false k x) = + GlobeMappingCells.face model D false k x) : + comp k (GlobeMappingCells.face model D false k x) x h = x := by + obtain ⟨n, hn, f, hf⟩ := GlobeMappingCells.exists_representative_above model D x (k+1) + have hk : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) hn + let sf := paddedFace false hk f + have hs : GlobeMappingCells.ι model D n sf = GlobeMappingCells.face model D false k x := + (paddedFace_cell false hk f).trans (congrArg (GlobeMappingCells.face model D false k) hf) + have hm : model.map (Globe.faceMap true k n) ≫ sf = + model.map (Globe.faceMap false k n) ≫ f := + GlobeMappingCells.matching_representatives model D _ _ h sf f hs hf + have hm' := (GlobeMappingCells.faces_eq_iff model D true false k n n sf f).mpr hm + calc + _ = comp k (GlobeMappingCells.ι model D n sf) (GlobeMappingCells.ι model D n f) hm' := + (comp_congr hs hf hm' h).symm + _ = GlobeMappingCells.ι model D n (composite hk sf f hm) := comp_ι hk sf f hm hm' + _ = GlobeMappingCells.ι model D n f := + congrArg (GlobeMappingCells.ι model D n) (composite_source_identity hk f hm) + _ = x := hf + +theorem right_unit (k : ℕ) (x : Cell D) + (h : GlobeMappingCells.face model D true k x = + GlobeMappingCells.face model D false k (GlobeMappingCells.face model D true k x)) : + comp k x (GlobeMappingCells.face model D true k x) h = x := by + obtain ⟨n, hn, f, hf⟩ := GlobeMappingCells.exists_representative_above model D x (k+1) + have hk : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) hn + let tf := paddedFace true hk f + have ht : GlobeMappingCells.ι model D n tf = GlobeMappingCells.face model D true k x := + (paddedFace_cell true hk f).trans (congrArg (GlobeMappingCells.face model D true k) hf) + have hm : model.map (Globe.faceMap true k n) ≫ f = + model.map (Globe.faceMap false k n) ≫ tf := + GlobeMappingCells.matching_representatives model D _ _ h f tf hf ht + have hm' := (GlobeMappingCells.faces_eq_iff model D true false k n n f tf).mpr hm + calc + _ = comp k (GlobeMappingCells.ι model D n f) (GlobeMappingCells.ι model D n tf) hm' := + (comp_congr hf ht hm' h).symm + _ = GlobeMappingCells.ι model D n (composite hk f tf hm) := comp_ι hk f tf hm hm' + _ = GlobeMappingCells.ι model D n f := + congrArg (GlobeMappingCells.ι model D n) (composite_target_identity hk f hm) + _ = x := hf + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The finite strict parameter for interchange + +Two horizontally pasted pairs are glued along their common higher face. +The four generating cells retain exactly the two horizontal and two +vertical matching conditions needed by strict interchange. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GridGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable (n k l : ℕ) (hkl : k < l) + +abbrev category : StrictOmegaCategory.{0} := + pushout (GrayMapping.pastingFace true l n k hkl) (GrayMapping.pastingFace false l n k hkl) + +abbrev row (b : Bool) : PastingGlobe.category n n k ⟶ category n k l hkl := + if b then pushout.inr _ _ else pushout.inl _ _ + +abbrev inclusion (b a : Bool) : Globe.category n ⟶ category n k l hkl := + (if a then PastingGlobe.right n n k else PastingGlobe.left n n k) ≫ row n k l hkl b + +def cell (b a : Bool) : category n k l hkl := (inclusion n k l hkl b a).toFun Globe.Cell.top + +theorem cell_dimension (b a : Bool) : + (category n k l hkl).DimensionLE n (cell n k l hkl b a) := + (inclusion n k l hkl b a).dimensionLE (Globe.category_truncated n Globe.Cell.top) + +theorem horizontal_matching (b : Bool) : + (category n k l hkl).target k (cell n k l hkl b false) = + (category n k l hkl).source k (cell n k l hkl b true) := by + have h := congrArg (row n k l hkl b).toFun (PastingGlobe.matching n n k) + exact ((row n k l hkl b).map_face true k (PastingGlobe.leftCell n n k)).symm.trans + (h.trans ((row n k l hkl b).map_face false k (PastingGlobe.rightCell n n k))) + +theorem vertical_boundary (a : Bool) : + Globe.faceMap true l n ≫ inclusion n k l hkl false a = + Globe.faceMap false l n ≫ inclusion n k l hkl true a := by + cases a + · change Globe.faceMap true l n ≫ (PastingGlobe.left n n k ≫ pushout.inl _ _) = + Globe.faceMap false l n ≫ (PastingGlobe.left n n k ≫ pushout.inr _ _) + rw [← Category.assoc, ← GrayMapping.pastingFace_left, Category.assoc, + pushout.condition, ← Category.assoc, GrayMapping.pastingFace_left, Category.assoc] + · change Globe.faceMap true l n ≫ (PastingGlobe.right n n k ≫ pushout.inl _ _) = + Globe.faceMap false l n ≫ (PastingGlobe.right n n k ≫ pushout.inr _ _) + rw [← Category.assoc, ← GrayMapping.pastingFace_right, Category.assoc, + pushout.condition, ← Category.assoc, GrayMapping.pastingFace_right, Category.assoc] + +theorem vertical_matching (a : Bool) : + (category n k l hkl).target l (cell n k l hkl false a) = + (category n k l hkl).source l (cell n k l hkl true a) := by + have he := congrArg (fun f : Globe.category l ⟶ category n k l hkl => + f.toFun Globe.Cell.top) (vertical_boundary n k l hkl a) + exact ((inclusion n k l hkl false a).map_face true l Globe.Cell.top).symm.trans + (he.trans ((inclusion n k l hkl true a).map_face false l Globe.Cell.top)) + +theorem hom_ext {C : StrictOmegaCategory.{0}} (f g : category n k l hkl ⟶ C) + (h : ∀ b a, f.toFun (cell n k l hkl b a) = g.toFun (cell n k l hkl b a)) : f = g := by + apply pushout.hom_ext + · exact PastingGlobe.hom_ext _ _ (h false false) (h false true) + · exact PastingGlobe.hom_ext _ _ (h true false) (h true true) + +end +end Thomason.Construction.StrictOmegaCategory.GridGlobe + +end + +section + +/-! # Matching row maps on the common higher face + +Four boundary-compatible globe-cylinder maps induce two binary gluing +maps which agree on the entire intervening pasted-globe cylinder. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {D : StrictOmegaCategory.{0}} {n k l : ℕ} + +theorem grid_row_matching (hkl : k < l) (hln : l < n) + (a b c d : model.obj (Globe.category n) ⟶ D) + (hab : model.map (Globe.faceMap true k n) ≫ a = model.map (Globe.faceMap false k n) ≫ b) + (hcd : model.map (Globe.faceMap true k n) ≫ c = model.map (Globe.faceMap false k n) ≫ d) + (hac : model.map (Globe.faceMap true l n) ≫ a = model.map (Globe.faceMap false l n) ≫ c) + (hbd : model.map (Globe.faceMap true l n) ≫ b = model.map (Globe.faceMap false l n) ≫ d) : + model.map (pastingFace true l n k hkl) ≫ glue (hkl.trans hln) a b hab = + model.map (pastingFace false l n k hkl) ≫ glue (hkl.trans hln) c d hcd := by + apply (PastingGlobe.CylinderSource.isPushout hkl).hom_ext + · rw [← Category.assoc, ← model.map_comp, pastingFace_left, + model.map_comp, Category.assoc, glue_left, + ← Category.assoc, ← model.map_comp, pastingFace_left, + model.map_comp, Category.assoc, glue_left] + exact hac + · rw [← Category.assoc, ← model.map_comp, pastingFace_right, + model.map_comp, Category.assoc, glue_right, + ← Category.assoc, ← model.map_comp, pastingFace_right, + model.map_comp, Category.assoc, glue_right] + exact hbd + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The strict interchange diagram on the four-globe parameter -/ + +namespace Thomason.Construction.StrictOmegaCategory.GridGlobe + +open CategoryTheory + +noncomputable section + +variable (n k l : ℕ) (hkl : k < l) + +def horizontalComposite (b : Bool) : category n k l hkl := + (category n k l hkl).comp k (cell n k l hkl b false) (cell n k l hkl b true) + (horizontal_matching n k l hkl b) + +def verticalComposite (a : Bool) : category n k l hkl := + (category n k l hkl).comp l (cell n k l hkl false a) (cell n k l hkl true a) + (vertical_matching n k l hkl a) + +private theorem comp_congr (C : StrictOmegaCategory) {r : ℕ} {x y x' y' : C} + (hx : x = x') (hy : y = y') + (h : C.target r x = C.source r y) (h' : C.target r x' = C.source r y') : + C.comp r x y h = C.comp r x' y' h' := by + subst x' + subst y' + rfl + +theorem face_horizontal_matching (a b : Bool) : + (category n k l hkl).target k ((category n k l hkl).face a l (cell n k l hkl b false)) = + (category n k l hkl).source k ((category n k l hkl).face a l (cell n k l hkl b true)) := by + simpa only [source, target, (category n k l hkl).globular, hkl, ite_true] using + horizontal_matching n k l hkl b + +theorem horizontal_composites_matching : + (category n k l hkl).target l (horizontalComposite n k l hkl false) = + (category n k l hkl).source l (horizontalComposite n k l hkl true) := by + change (category n k l hkl).face true l ((category n k l hkl).comp k _ _ _) = + (category n k l hkl).face false l ((category n k l hkl).comp k _ _ _) + rw [(category n k l hkl).face_comp true l k hkl _ _ _ + (face_horizontal_matching n k l hkl true false), + (category n k l hkl).face_comp false l k hkl _ _ _ + (face_horizontal_matching n k l hkl false true)] + exact comp_congr _ (vertical_matching n k l hkl false) + (vertical_matching n k l hkl true) _ _ + +theorem verticalComposite_lower_face (a b : Bool) : + (category n k l hkl).face a k (verticalComposite n k l hkl b) = + (category n k l hkl).face a k (cell n k l hkl false b) := by + have he := congrArg ((category n k l hkl).face a k) + ((category n k l hkl).source_comp l (cell n k l hkl false b) + (cell n k l hkl true b) (vertical_matching n k l hkl b)) + simpa only [verticalComposite, source, (category n k l hkl).globular, hkl, ite_true] using he + +theorem vertical_composites_matching : + (category n k l hkl).target k (verticalComposite n k l hkl false) = + (category n k l hkl).source k (verticalComposite n k l hkl true) := + (verticalComposite_lower_face n k l hkl true false).trans + ((horizontal_matching n k l hkl false).trans + (verticalComposite_lower_face n k l hkl false true).symm) + +variable (hln : l < n) + +theorem horizontalComposite_dimension (hln : l < n) (b : Bool) : + (category n k l hkl).DimensionLE n (horizontalComposite n k l hkl b) := + (category n k l hkl).dimensionLE_comp (hkl.trans hln) + (cell_dimension n k l hkl b false) (cell_dimension n k l hkl b true) _ + +theorem verticalComposite_dimension (hln : l < n) (a : Bool) : + (category n k l hkl).DimensionLE n (verticalComposite n k l hkl a) := + (category n k l hkl).dimensionLE_comp hln + (cell_dimension n k l hkl false a) (cell_dimension n k l hkl true a) _ + +/-- The vertical pair of horizontal composites. -/ +def verticalOuter : PastingGlobe.category n n l ⟶ category n k l hkl := + PastingGlobe.desc _ (horizontalComposite n k l hkl false) + (horizontalComposite n k l hkl true) + (horizontalComposite_dimension n k l hkl hln false) + (horizontalComposite_dimension n k l hkl hln true) + (horizontal_composites_matching n k l hkl) + +/-- The horizontal pair of vertical composites. -/ +def horizontalOuter : PastingGlobe.category n n k ⟶ category n k l hkl := + PastingGlobe.desc _ (verticalComposite n k l hkl false) + (verticalComposite n k l hkl true) + (verticalComposite_dimension n k l hkl hln false) + (verticalComposite_dimension n k l hkl hln true) + (vertical_composites_matching n k l hkl) + +/-- The individual vertical column, including both its generating cells. -/ +def column (a : Bool) : PastingGlobe.category n n l ⟶ category n k l hkl := + PastingGlobe.desc _ (cell n k l hkl false a) (cell n k l hkl true a) + (cell_dimension n k l hkl false a) (cell_dimension n k l hkl true a) + (vertical_matching n k l hkl a) + +theorem column_left (a : Bool) : + PastingGlobe.left n n l ≫ column n k l hkl a = inclusion n k l hkl false a := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + +theorem column_right (a : Bool) : + PastingGlobe.right n n l ≫ column n k l hkl a = inclusion n k l hkl true a := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + +theorem row_composite (b : Bool) : + (row n k l hkl b).toFun (PastingGlobe.composite n n k) = horizontalComposite n k l hkl b := + (row n k l hkl b).map_comp k _ _ _ (horizontal_matching n k l hkl b) + +theorem column_composite (a : Bool) : + (column n k l hkl a).toFun (PastingGlobe.composite n n l) = verticalComposite n k l hkl a := + PastingGlobe.desc_composite _ _ _ _ _ _ + +theorem verticalOuter_left : + PastingGlobe.left n n l ≫ verticalOuter n k l hkl hln = + GrayMapping.compositionGlobe n k (hkl.trans hln) ≫ row n k l hkl false := by + apply Globe.hom_ext + exact (PastingGlobe.desc_left _ _ _ _ _ _).trans (row_composite n k l hkl false).symm + +theorem verticalOuter_right : + PastingGlobe.right n n l ≫ verticalOuter n k l hkl hln = + GrayMapping.compositionGlobe n k (hkl.trans hln) ≫ row n k l hkl true := by + apply Globe.hom_ext + exact (PastingGlobe.desc_right _ _ _ _ _ _).trans (row_composite n k l hkl true).symm + +theorem horizontalOuter_left : + PastingGlobe.left n n k ≫ horizontalOuter n k l hkl hln = + GrayMapping.compositionGlobe n l hln ≫ column n k l hkl false := by + apply Globe.hom_ext + exact (PastingGlobe.desc_left _ _ _ _ _ _).trans (column_composite n k l hkl false).symm + +theorem horizontalOuter_right : + PastingGlobe.right n n k ≫ horizontalOuter n k l hkl hln = + GrayMapping.compositionGlobe n l hln ≫ column n k l hkl true := by + apply Globe.hom_ext + exact (PastingGlobe.desc_right _ _ _ _ _ _).trans (column_composite n k l hkl true).symm + +/-- Strict interchange is an equality of actual finite parameter maps. -/ +theorem interchange_diagram : + GrayMapping.compositionGlobe n l hln ≫ verticalOuter n k l hkl hln = + GrayMapping.compositionGlobe n k (hkl.trans hln) ≫ horizontalOuter n k l hkl hln := by + apply Globe.hom_ext + exact (PastingGlobe.desc_composite _ _ _ _ _ _).trans + (((category n k l hkl).interchange k l hkl + (cell n k l hkl false false) (cell n k l hkl false true) + (cell n k l hkl true false) (cell n k l hkl true true) + (horizontal_matching n k l hkl false) (horizontal_matching n k l hkl true) + (vertical_matching n k l hkl false) (vertical_matching n k l hkl true) + (horizontal_composites_matching n k l hkl) (vertical_composites_matching n k l hkl)).trans + (PastingGlobe.desc_composite _ _ _ _ _ _).symm) + +end +end Thomason.Construction.StrictOmegaCategory.GridGlobe + +end + +section + +/-! # Split row intersections in the interchange parameter + +Both higher-face maps have the same strict retraction. The two row +retractions therefore detect duplicate row images after every functor. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GridGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable {n k l : ℕ} (hkl : k < l) (hln : l ≤ n) + +theorem face_lower_retraction (a : Bool) : + GrayMapping.pastingFace a l n k hkl ≫ GrayMapping.pastingLower hln k = 𝟙 _ := by + apply pushout.hom_ext + · rw [← Category.assoc, GrayMapping.pastingFace_left, Category.assoc, + GrayMapping.pastingLower_left, ← Category.assoc, Globe.faceMap_lower_retraction, + Category.id_comp, Category.comp_id] + · rw [← Category.assoc, GrayMapping.pastingFace_right, Category.assoc, + GrayMapping.pastingLower_right, ← Category.assoc, Globe.faceMap_lower_retraction, + Category.id_comp, Category.comp_id] + +def retractTop : category n k l hkl ⟶ PastingGlobe.category n n k := + pushout.desc (𝟙 _) (GrayMapping.pastingLower hln k ≫ GrayMapping.pastingFace true l n k hkl) (by + rw [Category.comp_id, ← Category.assoc, face_lower_retraction, Category.id_comp]) + +def retractBottom : category n k l hkl ⟶ PastingGlobe.category n n k := + pushout.desc (GrayMapping.pastingLower hln k ≫ GrayMapping.pastingFace false l n k hkl) (𝟙 _) (by + rw [Category.comp_id, ← Category.assoc, face_lower_retraction, Category.id_comp]) + +@[reassoc (attr := simp)] theorem top_retractTop : + row n k l hkl false ≫ retractTop hkl hln = 𝟙 _ := pushout.inl_desc _ _ _ + +@[reassoc (attr := simp)] theorem bottom_retractTop : + row n k l hkl true ≫ retractTop hkl hln = + GrayMapping.pastingLower hln k ≫ GrayMapping.pastingFace true l n k hkl := + pushout.inr_desc _ _ _ + +@[reassoc (attr := simp)] theorem top_retractBottom : + row n k l hkl false ≫ retractBottom hkl hln = + GrayMapping.pastingLower hln k ≫ GrayMapping.pastingFace false l n k hkl := + pushout.inl_desc _ _ _ + +@[reassoc (attr := simp)] theorem bottom_retractBottom : + row n k l hkl true ≫ retractBottom hkl hln = 𝟙 _ := pushout.inr_desc _ _ _ + +def retractRow (b : Bool) : category n k l hkl ⟶ PastingGlobe.category n n k := + if b then retractBottom hkl hln else retractTop hkl hln + +@[reassoc (attr := simp)] theorem row_retractRow (b : Bool) : + row n k l hkl b ≫ retractRow hkl hln b = 𝟙 _ := by + cases b + · exact top_retractTop hkl hln + · exact bottom_retractBottom hkl hln + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) + +abbrev ImageSource : StrictOmegaCategory.{0} := + pushout (F.map (GrayMapping.pastingFace true l n k hkl)) + (F.map (GrayMapping.pastingFace false l n k hkl)) + +include hln in +theorem row_map_injective (b : Bool) : + Function.Injective (F.map (row n k l hkl b)).toFun := by + have he : F.map (row n k l hkl b) ≫ F.map (retractRow hkl hln b) = 𝟙 _ := by + rw [← F.map_comp, row_retractRow, F.map_id] + have hi : Function.LeftInverse (F.map (retractRow hkl hln b)).toFun + (F.map (row n k l hkl b)).toFun := fun x => + congrArg (fun q => q.toFun x) he + exact hi.injective + +include hln in +/-- Equality of top and bottom images is already witnessed in the actual +pushout of their functor images. -/ +theorem cross_image_eq (x y : F.obj (PastingGlobe.category n n k)) + (he : (F.map (row n k l hkl false)).toFun x = (F.map (row n k l hkl true)).toFun y) : + (pushout.inl (F.map (GrayMapping.pastingFace true l n k hkl)) + (F.map (GrayMapping.pastingFace false l n k hkl))).toFun x = + (pushout.inr (F.map (GrayMapping.pastingFace true l n k hkl)) + (F.map (GrayMapping.pastingFace false l n k hkl))).toFun y := by + let z := (F.map (GrayMapping.pastingLower hln k)).toFun y + have hx : x = (F.map (GrayMapping.pastingFace true l n k hkl)).toFun z := by + have hh := congrArg (F.map (retractTop hkl hln)).toFun he + have hl := congrArg (fun u => u.toFun x) + (show F.map (row n k l hkl false) ≫ F.map (retractTop hkl hln) = 𝟙 _ by + rw [← F.map_comp, top_retractTop, F.map_id]) + have hr := congrArg (fun u => u.toFun y) + (show F.map (row n k l hkl true) ≫ F.map (retractTop hkl hln) = + F.map (GrayMapping.pastingLower hln k) ≫ F.map (GrayMapping.pastingFace true l n k hkl) by + rw [← F.map_comp, bottom_retractTop, F.map_comp]) + exact hl.symm.trans (hh.trans hr) + have hz : (F.map (GrayMapping.pastingLower hln k)).toFun x = z := by + rw [hx] + exact congrArg (fun u => u.toFun z) + (show F.map (GrayMapping.pastingFace true l n k hkl) ≫ + F.map (GrayMapping.pastingLower hln k) = 𝟙 _ by + rw [← F.map_comp, face_lower_retraction, F.map_id]) + have hy : (F.map (GrayMapping.pastingFace false l n k hkl)).toFun z = y := by + have hh := congrArg (F.map (retractBottom hkl hln)).toFun he + have hl := congrArg (fun u => u.toFun x) + (show F.map (row n k l hkl false) ≫ F.map (retractBottom hkl hln) = + F.map (GrayMapping.pastingLower hln k) ≫ F.map (GrayMapping.pastingFace false l n k hkl) by + rw [← F.map_comp, top_retractBottom, F.map_comp]) + have hr := congrArg (fun u => u.toFun y) + (show F.map (row n k l hkl true) ≫ F.map (retractBottom hkl hln) = 𝟙 _ by + rw [← F.map_comp, bottom_retractBottom, F.map_id]) + exact (congrArg (F.map (GrayMapping.pastingFace false l n k hkl)).toFun hz).symm.trans + (hl.symm.trans (hh.trans hr)) + rw [hx, ← hy] + exact congrArg (fun u : F.obj (PastingGlobe.category l l k) ⟶ ImageSource hkl F => u.toFun z) + (pushout.condition (f := F.map (GrayMapping.pastingFace true l n k hkl)) + (g := F.map (GrayMapping.pastingFace false l n k hkl))) + +end +end Thomason.Construction.StrictOmegaCategory.GridGlobe + +end + +section + +/-! # The four-cell universal property of the interchange parameter -/ + +namespace Thomason.Construction.StrictOmegaCategory.GridGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable {n k l : ℕ} (hkl : k < l) (C : StrictOmegaCategory.{0}) (x : Bool → Bool → C) + (hd : ∀ b a, C.DimensionLE n (x b a)) + (hh : ∀ b, C.target k (x b false) = C.source k (x b true)) + (hv : ∀ a, C.target l (x false a) = C.source l (x true a)) + +abbrev rowDesc (b : Bool) : PastingGlobe.category n n k ⟶ C := + PastingGlobe.desc C (x b false) (x b true) (hd b false) (hd b true) (hh b) + +include hv in +theorem desc_condition : + GrayMapping.pastingFace true l n k hkl ≫ rowDesc C x hd hh false = + GrayMapping.pastingFace false l n k hkl ≫ rowDesc C x hd hh true := by + apply PastingGlobe.hom_ext + · change (rowDesc C x hd hh false).toFun + ((GrayMapping.pastingFace true l n k hkl).toFun (PastingGlobe.leftCell l l k)) = + (rowDesc C x hd hh true).toFun + ((GrayMapping.pastingFace false l n k hkl).toFun (PastingGlobe.leftCell l l k)) + rw [show (GrayMapping.pastingFace true l n k hkl).toFun (PastingGlobe.leftCell l l k) = + (PastingGlobe.category n n k).face true l (PastingGlobe.leftCell n n k) from + PastingGlobe.desc_left _ _ _ _ _ _, + show (GrayMapping.pastingFace false l n k hkl).toFun (PastingGlobe.leftCell l l k) = + (PastingGlobe.category n n k).face false l (PastingGlobe.leftCell n n k) from + PastingGlobe.desc_left _ _ _ _ _ _, + (rowDesc C x hd hh false).map_face, (rowDesc C x hd hh true).map_face] + exact (congrArg (C.face true l) (PastingGlobe.desc_left C _ _ _ _ _)).trans + ((hv false).trans (congrArg (C.face false l) (PastingGlobe.desc_left C _ _ _ _ _)).symm) + · change (rowDesc C x hd hh false).toFun + ((GrayMapping.pastingFace true l n k hkl).toFun (PastingGlobe.rightCell l l k)) = + (rowDesc C x hd hh true).toFun + ((GrayMapping.pastingFace false l n k hkl).toFun (PastingGlobe.rightCell l l k)) + rw [show (GrayMapping.pastingFace true l n k hkl).toFun (PastingGlobe.rightCell l l k) = + (PastingGlobe.category n n k).face true l (PastingGlobe.rightCell n n k) from + PastingGlobe.desc_right _ _ _ _ _ _, + show (GrayMapping.pastingFace false l n k hkl).toFun (PastingGlobe.rightCell l l k) = + (PastingGlobe.category n n k).face false l (PastingGlobe.rightCell n n k) from + PastingGlobe.desc_right _ _ _ _ _ _, + (rowDesc C x hd hh false).map_face, (rowDesc C x hd hh true).map_face] + exact (congrArg (C.face true l) (PastingGlobe.desc_right C _ _ _ _ _)).trans + ((hv true).trans (congrArg (C.face false l) (PastingGlobe.desc_right C _ _ _ _ _)).symm) + +/-- Unique strict map with the prescribed four matching bounded cells. -/ +def desc : category n k l hkl ⟶ C := + pushout.desc (rowDesc C x hd hh false) (rowDesc C x hd hh true) + (desc_condition hkl C x hd hh hv) + +@[simp] theorem desc_cell (b a : Bool) : + (desc hkl C x hd hh hv).toFun (cell n k l hkl b a) = x b a := by + have hrow : row n k l hkl b ≫ desc hkl C x hd hh hv = rowDesc C x hd hh b := by + cases b + · exact pushout.inl_desc _ _ _ + · exact pushout.inr_desc _ _ _ + cases a + · exact (congrArg (fun f : PastingGlobe.category n n k ⟶ C => + f.toFun (PastingGlobe.leftCell n n k)) hrow).trans (PastingGlobe.desc_left C _ _ _ _ _) + · exact (congrArg (fun f : PastingGlobe.category n n k ⟶ C => + f.toFun (PastingGlobe.rightCell n n k)) hrow).trans (PastingGlobe.desc_right C _ _ _ _ _) + +end +end Thomason.Construction.StrictOmegaCategory.GridGlobe + +end + +section + +/-! # The grid basis is the actual abelianization of four pasted globes -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +def top {n k l : ℕ} (hkl : k < l) (hln : l < n) (s a : Bool) : + (complex hkl hln).realization := + (inclusion hkl hln s).realization.toFun (PastingGlobeBasis.top (hkl.trans hln) a) + +theorem top_dimension {n k l : ℕ} (hkl : k < l) (hln : l < n) (s a : Bool) : + (complex hkl hln).realization.DimensionLE n (top hkl hln s a) := + (inclusion hkl hln s).realization.dimensionLE + (PastingGlobeBasis.top_dimension (hkl.trans hln) a) + +theorem top_horizontal {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + (top hkl hln s false).face true k = (top hkl hln s true).face false k := by + have he := congrArg (inclusion hkl hln s).realization.toFun + (PastingGlobeBasis.top_matching (hkl.trans hln)) + exact ((inclusion hkl hln s).realization.map_face true k _).symm.trans + (he.trans ((inclusion hkl hln s).realization.map_face false k _)) + +theorem top_table_below {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (s c a : Bool) (hp : p < n) : + (top hkl hln s c).table a p = Finsupp.single + (embed hkl hln s (PastingGlobeBasis.embed (hkl.trans hln) c ⟨a, Or.inl hp⟩)) 1 := by + change embedApp hkl hln s p + (PastingGlobeBasis.embedApp (hkl.trans hln) c p + (DirectedGlobeComplex.topTable n a p)) = _ + simp [DirectedGlobeComplex.topTable, hp] + +theorem top_vertical {n k l : ℕ} (hkl : k < l) (hln : l < n) (c : Bool) : + (top hkl hln false c).face true l = (top hkl hln true c).face false l := by + apply Cell.ext + funext a p + change Cell.cutTable (top hkl hln false c) true l a p = + Cell.cutTable (top hkl hln true c) false l a p + by_cases hp : p < l + · simp only [Cell.cutTable, hp, ite_true] + rw [top_table_below hkl hln _ _ _ (hp.trans hln), + top_table_below hkl hln _ _ _ (hp.trans hln)] + simp [embed, hp] + rfl + · by_cases he : p = l + · subst p + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + rw [top_table_below hkl hln _ _ _ hln, top_table_below hkl hln _ _ _ hln] + cases c <;> simp [embed, targetBasis, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right, Nat.ne_of_gt hkl, + Nat.not_lt.mpr hkl.le] + all_goals rfl + · simp only [Cell.cutTable, hp, he, ite_false] + +def fromGrid {n k l : ℕ} (hkl : k < l) (hln : l < n) : + StrictOmegaCategory.GridGlobe.category n k l hkl ⟶ (complex hkl hln).realization := + StrictOmegaCategory.GridGlobe.desc hkl _ (top hkl hln) + (top_dimension hkl hln) (top_horizontal hkl hln) (top_vertical hkl hln) + +@[simp] theorem fromGrid_cell {n k l : ℕ} (hkl : k < l) (hln : l < n) (s a : Bool) : + (fromGrid hkl hln).toFun (StrictOmegaCategory.GridGlobe.cell n k l hkl s a) = + top hkl hln s a := StrictOmegaCategory.GridGlobe.desc_cell _ _ _ _ _ _ s a + +def abelianizationToBasis {n k l : ℕ} (hkl : k < l) (hln : l < n) : + Hom (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.GridGlobe.category n k l hkl)) (complex hkl hln) := + StrictOmegaCategory.Abelianization.evaluateHom (fromGrid hkl hln) + +theorem unit_horizontal {n k l : ℕ} (hkl : k < l) (s : Bool) : + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl s false)).face true k = + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl s true)).face false k := by + rw [← StrictOmegaCategory.Abelianization.unitCell_face, + ← StrictOmegaCategory.Abelianization.unitCell_face] + exact congrArg (StrictOmegaCategory.Abelianization.unitCell _) + (StrictOmegaCategory.GridGlobe.horizontal_matching n k l hkl s) + +theorem unit_vertical {n k l : ℕ} (hkl : k < l) (a : Bool) : + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl false a)).face true l = + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl true a)).face false l := by + rw [← StrictOmegaCategory.Abelianization.unitCell_face, + ← StrictOmegaCategory.Abelianization.unitCell_face] + exact congrArg (StrictOmegaCategory.Abelianization.unitCell _) + (StrictOmegaCategory.GridGlobe.vertical_matching n k l hkl a) + +def basisToAbelianization {n k l : ℕ} (hkl : k < l) (hln : l < n) : + Hom (complex hkl hln) (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.GridGlobe.category n k l hkl)) := + desc hkl hln (fun s a => StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl s a)) + (unit_horizontal hkl) (unit_vertical hkl) + +theorem desc_top {n k l : ℕ} {L : DirectedComplex.{0}} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hh : ∀ b, (x b false).face true k = (x b true).face false k) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) + (s a : Bool) (hb : L.realization.DimensionLE n (x s a)) : + (desc hkl hln x hh hv).realization.toFun (top hkl hln s a) = x s a := by + have h := congrArg (fun f : Hom (PastingGlobeBasis.complex n k (hkl.trans hln)) L => + f.realization.toFun (PastingGlobeBasis.top (hkl.trans hln) a)) + (inclusion_desc hkl hln x hh hv s) + cases a <;> exact h.trans (PastingGlobeBasis.desc_top (hkl.trans hln) _ _ (hh s) _ hb) + +theorem abelianizationToBasis_unit {n k l : ℕ} (hkl : k < l) (hln : l < n) + (x : StrictOmegaCategory.GridGlobe.category n k l hkl) : + (abelianizationToBasis hkl hln).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ x) = (fromGrid hkl hln).toFun x := + congrArg (fun f => f.toFun x) + (StrictOmegaCategory.Abelianization.unit_evaluate (fromGrid hkl hln)) + +theorem basisToAbelianization_top {n k l : ℕ} (hkl : k < l) (hln : l < n) (s a : Bool) : + (basisToAbelianization hkl hln).realization.toFun (top hkl hln s a) = + StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl s a) := by + exact desc_top hkl hln _ (unit_horizontal hkl) (unit_vertical hkl) s a + ((StrictOmegaCategory.Abelianization.unit _).dimensionLE + (StrictOmegaCategory.GridGlobe.cell_dimension n k l hkl s a)) + +theorem abelianizationToBasis_inverse {n k l : ℕ} (hkl : k < l) (hln : l < n) : + Hom.comp (abelianizationToBasis hkl hln) (basisToAbelianization hkl hln) = Hom.id _ := by + apply (StrictOmegaCategory.Abelianization.homEquiv + (StrictOmegaCategory.GridGlobe.category n k l hkl) _).injective + apply StrictOmegaCategory.GridGlobe.hom_ext + intro s a + change (basisToAbelianization hkl hln).realization.toFun + ((abelianizationToBasis hkl hln).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.GridGlobe.cell n k l hkl s a))) = _ + rw [abelianizationToBasis_unit, fromGrid_cell] + exact basisToAbelianization_top hkl hln s a + +theorem basisToAbelianization_inverse {n k l : ℕ} (hkl : k < l) (hln : l < n) : + Hom.comp (basisToAbelianization hkl hln) (abelianizationToBasis hkl hln) = Hom.id _ := by + apply hom_ext hkl hln + intro s + apply PastingGlobeBasis.hom_ext (hkl.trans hln) + all_goals + apply (DirectedGlobeComplex.homEquiv n (complex hkl hln)).injective + apply Subtype.ext + · change (abelianizationToBasis hkl hln).realization.toFun + ((basisToAbelianization hkl hln).realization.toFun (top hkl hln s false)) = _ + rw [basisToAbelianization_top, abelianizationToBasis_unit, fromGrid_cell] + rfl + · change (abelianizationToBasis hkl hln).realization.toFun + ((basisToAbelianization hkl hln).realization.toFun (top hkl hln s true)) = _ + rw [basisToAbelianization_top, abelianizationToBasis_unit, fromGrid_cell] + rfl + +def abelianizationIso {n k l : ℕ} (hkl : k < l) (hln : l < n) : + StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.GridGlobe.category n k l hkl) ≅ complex hkl hln where + hom := abelianizationToBasis hkl hln + inv := basisToAbelianization hkl hln + hom_inv_id := abelianizationToBasis_inverse hkl hln + inv_hom_id := basisToAbelianization_inverse hkl hln + +end +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # The literal chain-cylinder comparison on both rows of the grid -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory StrictOmegaCategory + +noncomputable section + +theorem abelianization_row {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + Abelianization.functor.map (GridGlobe.row n k l hkl s) ≫ + (abelianizationIso hkl hln).hom = + (PastingGlobeBasis.abelianizationIso (hkl.trans hln)).hom ≫ inclusion hkl hln s := by + let a : Abelianization.functor.obj (PastingGlobe.category n n k) ⟶ complex hkl hln := + (PastingGlobeBasis.abelianizationIso (hkl.trans hln)).hom ≫ inclusion hkl hln s + let b : Abelianization.functor.obj (GridGlobe.category n k l hkl) ⟶ complex hkl hln := + (abelianizationIso hkl hln).hom + change Abelianization.functor.map (GridGlobe.row n k l hkl s) ≫ b = a + apply (Abelianization.adjunction.homEquiv _ _).injective + rw [Abelianization.adjunction.homEquiv_naturality_left] + change GridGlobe.row n k l hkl s ≫ (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (fromGrid hkl hln)).realization) = + (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting (hkl.trans hln))).realization) ≫ + (inclusion hkl hln s).realization + have ht : Abelianization.unit (GridGlobe.category n k l hkl) ≫ + (Abelianization.evaluateHom (fromGrid hkl hln)).realization = fromGrid hkl hln := + Abelianization.unit_evaluate _ + have hp : Abelianization.unit (PastingGlobe.category n n k) ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting (hkl.trans hln))).realization = + PastingGlobeBasis.fromPasting (hkl.trans hln) := Abelianization.unit_evaluate _ + rw [ht, hp] + apply PastingGlobe.hom_ext + · change (fromGrid hkl hln).toFun (GridGlobe.cell n k l hkl s false) = + (inclusion hkl hln s).realization.toFun + ((PastingGlobeBasis.fromPasting (hkl.trans hln)).toFun (PastingGlobe.leftCell n n k)) + have hl : (PastingGlobeBasis.fromPasting (hkl.trans hln)).toFun + (PastingGlobe.leftCell n n k) = PastingGlobeBasis.top (hkl.trans hln) false := + PastingGlobe.desc_left _ _ _ _ _ _ + rw [fromGrid_cell, hl] + rfl + · change (fromGrid hkl hln).toFun (GridGlobe.cell n k l hkl s true) = + (inclusion hkl hln s).realization.toFun + ((PastingGlobeBasis.fromPasting (hkl.trans hln)).toFun (PastingGlobe.rightCell n n k)) + have hr : (PastingGlobeBasis.fromPasting (hkl.trans hln)).toFun + (PastingGlobe.rightCell n n k) = PastingGlobeBasis.top (hkl.trans hln) true := + PastingGlobe.desc_right _ _ _ _ _ _ + rw [fromGrid_cell, hr] + rfl + +def modelIso {n k l : ℕ} (hkl : k < l) (hln : l < n) : + GrayChainExtension.model.obj (GridGlobe.category n k l hkl) ≅ + (rightCylinder (complex hkl hln)).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso (abelianizationIso hkl hln) + +theorem model_row {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + GrayChainExtension.model.map (GridGlobe.row n k l hkl s) ≫ (modelIso hkl hln).hom = + (PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).hom ≫ + (RightCylinder.map (inclusion hkl hln s)).realization := by + let T := rightCylinderFunctor ⋙ realizationFunctor + exact (T.map_comp (Abelianization.functor.map (GridGlobe.row n k l hkl s)) + (abelianizationIso hkl hln).hom).symm.trans + ((congrArg T.map (abelianization_row hkl hln s)).trans + (T.map_comp (PastingGlobeBasis.abelianizationIso (hkl.trans hln)).hom + (inclusion hkl hln s))) + +end +end Thomason.Construction.GridGlobeBasis + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/OrderedAtomGrouping.lean b/lean/OAI/CategoryTheory/Thomason/Gray/OrderedAtomGrouping.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd2b2c58d469140efd0e03a07ea8c8162d1ec3d4 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/OrderedAtomGrouping.lean @@ -0,0 +1,900 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Strict.StrictCompositeListReplacement +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.List.Permutation +import Mathlib.Data.List.Sort + +namespace OAI + +section + +/-! # The finite coefficient interface needed for ordered atom generation + +This interface is shared by the normalized simplex complexes and the finite +pasted-globe cylinder complexes. It records concrete basis coordinates, +actual positive cells, and their disjoint ordered boundaries; generation is +a theorem proved from these data, rather than a field of the interface. +-/ + +namespace Thomason.Construction.DirectedComplex + +open scoped BigOperators + +structure OrderedAtomBasis (K : DirectedComplex.{0}) where + Index : ℕ → Type + coordinates (p : ℕ) : K.group p ≃+ (Index p →₀ ℤ) + positive_iff (p : ℕ) (x : K.group p) : + x ∈ K.positive p ↔ ∀ b, 0 ≤ coordinates p x b + augmentation (x : K.group 0) : + K.augmentation x = (coordinates 0 x).sum (fun _ z => z) + atom (p : ℕ) (b : Index p) : Cell K + atom_top (p : ℕ) (b : Index p) (side : Bool) : + coordinates p ((atom p b).table side p) = Finsupp.single b 1 + atom_above (p : ℕ) (b : Index p) (q : ℕ) : + p < q → ∀ side, (atom p b).table side q = 0 + height (p : ℕ) (b : Index p) : ℤ + disjoint {p q r : ℕ} (b : Index p) (c : Index q) : + r < p → r < q → height p b ≤ height q c → ∀ e : Index r, + coordinates r ((atom p b).table false r) e = 0 ∨ + coordinates r ((atom q c).table true r) e = 0 + +namespace OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem coordinate_nonnegative (p : ℕ) (x : K.group p) (hx : x ∈ K.positive p) + (b : B.Index p) : 0 ≤ B.coordinates p x b := (B.positive_iff p x).mp hx b + +include B in +theorem positive_augmentation_zero (z : K.group 0) (hz : z ∈ K.positive 0) + (he : K.augmentation z = 0) : z = 0 := by + classical + apply (B.coordinates 0).injective + rw [map_zero] + have hs : ∑ b ∈ (B.coordinates 0 z).support, B.coordinates 0 z b = 0 := by + simpa only [B.augmentation, Finsupp.sum] using he + apply Finsupp.ext + intro b + by_cases hb : b ∈ (B.coordinates 0 z).support + · have hle := Finset.single_le_sum + (fun c (_ : c ∈ (B.coordinates 0 z).support) => B.coordinate_nonnegative 0 z hz c) hb + rw [hs] at hle + exact le_antisymm hle (B.coordinate_nonnegative 0 z hz b) + · exact Finsupp.notMem_support_iff.mp hb + +theorem positive_augmentation_one (z : K.group 0) (hz : z ∈ K.positive 0) + (he : K.augmentation z = 1) : + ∃ b : B.Index 0, B.coordinates 0 z = Finsupp.single b 1 := by + classical + let v := B.coordinates 0 z + have hv : ∀ b, 0 ≤ v b := B.coordinate_nonnegative 0 z hz + have hs : ∑ b ∈ v.support, v b = 1 := by + simpa only [B.augmentation, Finsupp.sum] using he + have hne : v ≠ 0 := by + intro heq + simp [heq] at hs + obtain ⟨b, hb⟩ := Finsupp.ne_iff.mp hne + change v b ≠ 0 at hb + have hmem : b ∈ v.support := Finsupp.mem_support_iff.mpr hb + have hle : v b ≤ 1 := (Finset.single_le_sum (fun c (_ : c ∈ v.support) => hv c) hmem).trans_eq hs + have hone : v b = 1 := by have hh := hv b; omega + have hrest : ∑ c ∈ v.support.erase b, v c = 0 := by + have hh := Finset.sum_erase_add v.support (fun c => v c) hmem + rw [hs, hone] at hh + omega + refine ⟨b, ?_⟩ + apply Finsupp.ext + intro c + by_cases hcb : c = b + · subst c + simp [v, hone] + · rw [Finsupp.single_eq_of_ne hcb] + by_cases hc : v c = 0 + · exact hc + · have hm : c ∈ v.support.erase b := + Finset.mem_erase.mpr ⟨hcb, Finsupp.mem_support_iff.mpr hc⟩ + have hcl := (Finset.single_le_sum (fun d (_ : d ∈ v.support.erase b) => hv d) hm).trans_eq hrest + exact le_antisymm hcl (hv c) + +/-- The equality of residuals uses only the cell boundary equations. -/ +theorem residual_sides (X A : Cell K) (r : ℕ) + (he : X.table false (r+1) = A.table false (r+1)) : + X.table false r - A.table false r = X.table true r - A.table true r := by + have hd := congrArg (K.differential r) he + rw [X.boundary, A.boundary] at hd + apply sub_eq_zero.mp + calc + _ = (A.table true r - A.table false r) - + (X.table true r - X.table false r) := by abel + _ = 0 := by rw [hd, sub_self] + +/-- Disjoint atom sides make every common upper-table residual positive. -/ +theorem residual_positive (X : Cell K) {p : ℕ} (b : B.Index p) (r : ℕ) + (hr : r < p) (he : X.table false (r+1) = (B.atom p b).table false (r+1)) : + X.table false r - (B.atom p b).table false r ∈ K.positive r := by + apply (B.positive_iff r _).mpr + intro c + rcases B.disjoint b b hr hr le_rfl c with hn | hp + · simpa only [map_sub, Finsupp.sub_apply, hn, sub_zero] using + B.coordinate_nonnegative r (X.table false r) (X.positive false r) c + · rw [residual_sides X (B.atom p b) r he] + simpa only [map_sub, Finsupp.sub_apply, hp, sub_zero] using + B.coordinate_nonnegative r (X.table true r) (X.positive true r) c + +/-- At degree zero augmentation one eliminates the residual. -/ +theorem eq_atom_of_above_zero (X : Cell K) {p : ℕ} (b : B.Index p) (hp : 0 < p) + (he : ∀ n, 0 < n → ∀ side, X.table side n = (B.atom p b).table side n) : + X = B.atom p b := by + have hr := B.residual_positive X b 0 hp (he 1 (by omega) false) + have haug : K.augmentation (X.table false 0 - (B.atom p b).table false 0) = 0 := by + rw [map_sub, X.augmentation, (B.atom p b).augmentation, sub_self] + have hz := B.positive_augmentation_zero _ hr haug + have hf := sub_eq_zero.mp hz + have ht : X.table true 0 = (B.atom p b).table true 0 := by + apply sub_eq_zero.mp + rw [← residual_sides X (B.atom p b) 0 (he 1 (by omega) false), hz] + apply Cell.ext + funext side n + cases n with + | zero => cases side <;> assumption + | succ n => exact he (n+1) (by omega) side + +end OrderedAtomBasis +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # Finite positive sums in the ordered-atom coefficient interface -/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open scoped BigOperators + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +abbrev AtomIndex := Σ p, B.Index p + +def atomCell (a : B.AtomIndex) : Cell K := B.atom a.1 a.2 + +def atomHeight (a : B.AtomIndex) : ℤ := B.height a.1 a.2 + +noncomputable def chainAtomIndices (p : ℕ) (z : K.group p) : List B.AtomIndex := + (B.coordinates p z).support.toList.flatMap (fun b => + List.replicate (B.coordinates p z b).toNat ⟨p,b⟩) + +theorem chainAtomIndices_degree (p : ℕ) (z : K.group p) + (a : B.AtomIndex) (ha : a ∈ B.chainAtomIndices p z) : a.1 = p := by + obtain ⟨b, _, hb⟩ := List.mem_flatMap.mp ha + obtain ⟨_, he⟩ := List.mem_replicate.mp hb + subst a + rfl + +theorem coordinates_ofCells (as : List B.AtomIndex) (side : Bool) (p : ℕ) : + B.coordinates p ((Cell.PositiveTable.ofCells (as.map B.atomCell)).table side p) = + (as.map (fun a => B.coordinates p ((B.atomCell a).table side p))).sum := by + induction as with + | nil => exact map_zero _ + | cons a as ih => + change B.coordinates p ((B.atomCell a).table side p + + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side p) = _ + rw [map_add, ih] + rfl + +private theorem sum_map_flatMap {α β M : Type*} [AddMonoid M] + (as : List α) (f : α → List β) (g : β → M) : + ((as.flatMap f).map g).sum = (as.map (fun a => ((f a).map g).sum)).sum := by + induction as with + | nil => rfl + | cons a as ih => simp only [List.flatMap_cons, List.map_append, List.sum_append, + List.map_cons, List.sum_cons, ih] + +theorem chainAtomIndices_table (p : ℕ) (z : K.group p) (hz : z ∈ K.positive p) + (side : Bool) : + (Cell.PositiveTable.ofCells ((B.chainAtomIndices p z).map B.atomCell)).table side p = z := by + classical + apply (B.coordinates p).injective + rw [B.coordinates_ofCells] + unfold chainAtomIndices + rw [sum_map_flatMap] + simp only [List.map_replicate, List.sum_replicate] + change ((B.coordinates p z).support.toList.map (fun b => + (B.coordinates p z b).toNat • B.coordinates p ((B.atom p b).table side p))).sum = _ + simp_rw [B.atom_top] + rw [Finset.sum_map_toList] + calc + ∑ b ∈ (B.coordinates p z).support, + (B.coordinates p z b).toNat • Finsupp.single b (1 : ℤ) = + ∑ b ∈ (B.coordinates p z).support, Finsupp.single b (B.coordinates p z b) := by + apply Finset.sum_congr rfl + intro b _ + simp only [Finsupp.smul_single, nsmul_eq_mul, mul_one, + Int.toNat_of_nonneg (B.coordinate_nonnegative p z hz b)] + _ = B.coordinates p z := Finsupp.sum_single _ + +theorem chainAtomIndices_above (p : ℕ) (z : K.group p) (n : ℕ) (hn : p < n) + (side : Bool) : + (Cell.PositiveTable.ofCells ((B.chainAtomIndices p z).map B.atomCell)).table side n = 0 := by + rw [Cell.PositiveTable.ofCells_table, List.map_map] + apply List.sum_eq_zero + intro v hv + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hv + exact B.atom_above a.1 a.2 n + (by rw [B.chainAtomIndices_degree p z a ha]; exact hn) side + +noncomputable def sortAtoms (as : List B.AtomIndex) : List B.AtomIndex := + as.mergeSort (fun a b => decide (B.atomHeight a ≤ B.atomHeight b)) + +theorem sortAtoms_perm (as : List B.AtomIndex) : (B.sortAtoms as).Perm as := + List.mergeSort_perm _ _ + +theorem sortAtoms_pairwise (as : List B.AtomIndex) : + (B.sortAtoms as).Pairwise (fun a b => B.atomHeight a ≤ B.atomHeight b) := by + simpa only [sortAtoms, decide_eq_true_eq] using + (List.pairwise_mergeSort + (le := fun a b : B.AtomIndex => decide (B.atomHeight a ≤ B.atomHeight b)) + (fun a b c hab hbc => by + simpa only [decide_eq_true_eq] using le_trans + (of_decide_eq_true hab) (of_decide_eq_true hbc)) + (fun a b => by simp only [Bool.or_eq_true, decide_eq_true_eq]; exact le_total _ _) as) + +theorem sortAtoms_table (as : List B.AtomIndex) (side : Bool) (n : ℕ) : + (Cell.PositiveTable.ofCells ((B.sortAtoms as).map B.atomCell)).table side n = + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n := by + simp only [Cell.PositiveTable.ofCells_table, List.map_map] + exact ((B.sortAtoms_perm as).map (fun a => (B.atomCell a).table side n)).sum_eq + +/-- Coefficientwise positivity constructs the exact binary splitting. -/ +theorem split_of_disjoint (X : Cell K) (A D : Cell.PositiveTable K) (r : ℕ) + (he : ∀ n, r < n → ∀ side, X.table side n = A.table side n + D.table side n) + (hd : ∀ b, B.coordinates r (A.table false r) b = 0 ∨ + B.coordinates r (D.table true r) b = 0) : + ∃ (Y Z : Cell K) (hyz : Y.face true r = Z.face false r), + Cell.comp Y Z r hyz = X ∧ + (∀ n, r < n → ∀ side, Y.table side n = A.table side n) ∧ + (∀ n, r < n → ∀ side, Z.table side n = D.table side n) := by + apply Cell.exists_comp_of_positive_middle X A D r he + apply (B.positive_iff r _).mpr + intro b + have hmiddle := congrArg (fun x => B.coordinates r x b) + (Cell.replacement_middle_eq X A D r (he (r+1) (by omega) false)) + simp only [map_sub, map_add, Finsupp.add_apply, Finsupp.sub_apply] at hmiddle ⊢ + have hx := B.coordinate_nonnegative r (X.table false r) (X.positive false r) b + have hy := B.coordinate_nonnegative r (X.table true r) (X.positive true r) b + have ha := B.coordinate_nonnegative r (A.table true r) (A.positive true r) b + have hd' := B.coordinate_nonnegative r (D.table false r) (D.positive false r) b + rcases hd b with hz | hz <;> omega + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Generation from actual ordered atoms + +This is the finite positive-table argument used for the pasted-globe +parameters of the Gray construction. The hypotheses describe explicit +coordinates and cells; no generation or freeness assertion is assumed. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem sumCells_coordinate_zero (as : List (Cell K)) (side : Bool) (n : ℕ) + (b : B.Index n) (hz : ∀ A ∈ as, B.coordinates n (A.table side n) b = 0) : + B.coordinates n ((Cell.PositiveTable.ofCells as).table side n) b = 0 := by + induction as with + | nil => simp only [Cell.PositiveTable.ofCells, Cell.PositiveTable.zero, map_zero, Finsupp.zero_apply] + | cons A as ih => + change B.coordinates n (A.table side n + + (Cell.PositiveTable.ofCells as).table side n) b = 0 + rw [map_add, Finsupp.add_apply, hz A (by simp), + ih (fun C hC => hz C (by simp [hC])), zero_add] + +theorem ordered_sum_induction (r : ℕ) (P : Cell K → Prop) + (hzero : ∀ X, (∀ n, r < n → ∀ side, X.table side n = 0) → P X) + (hcomp : ∀ (Y Z : Cell K) (hyz), P Y → P Z → P (Cell.comp Y Z r hyz)) + (as : List (Cell K)) + (hsep : as.Pairwise (fun A D => ∀ b : B.Index r, + B.coordinates r (A.table false r) b = 0 ∨ B.coordinates r (D.table true r) b = 0)) + (hone : ∀ A ∈ as, ∀ X : Cell K, + (∀ n, r < n → ∀ side, X.table side n = A.table side n) → P X) + (X : Cell K) + (he : ∀ n, r < n → ∀ side, + X.table side n = (Cell.PositiveTable.ofCells as).table side n) : P X := by + induction as generalizing X with + | nil => exact hzero X he + | cons A as ih => + obtain ⟨hfirst, htail⟩ := List.pairwise_cons.mp hsep + have hd : ∀ b : B.Index r, B.coordinates r (A.table false r) b = 0 ∨ + B.coordinates r ((Cell.PositiveTable.ofCells as).table true r) b = 0 := by + intro b + by_cases hb : B.coordinates r (A.table false r) b = 0 + · exact Or.inl hb + · right + exact B.sumCells_coordinate_zero as true r b + (fun C hC => (hfirst C hC b).resolve_left hb) + have hs : ∀ n, r < n → ∀ side, + X.table side n = A.table side n + (Cell.PositiveTable.ofCells as).table side n := he + obtain ⟨Y, Z, hyz, hYZ, hY, hZ⟩ := B.split_of_disjoint X + (Cell.PositiveTable.ofCell A) (Cell.PositiveTable.ofCells as) r hs hd + have hp := hcomp Y Z hyz (hone A (by simp) Y hY) + (ih htail (fun C hC => hone C (by simp [hC])) Z hZ) + rwa [hYZ] at hp + +def AboveAtomOrZero (r : ℕ) (X : Cell K) : Prop := + (∀ n, r < n → ∀ side, X.table side n = 0) ∨ + ∃ a : B.AtomIndex, r < a.1 ∧ + ∀ n, r < n → ∀ side, X.table side n = (B.atomCell a).table side n + +theorem eq_zero_atom_of_above_zero (X : Cell K) + (hz : ∀ n, 0 < n → ∀ side, X.table side n = 0) : + ∃ b : B.Index 0, X = B.atom 0 b := by + obtain ⟨b, hb⟩ := B.positive_augmentation_one (X.table false 0) + (X.positive false 0) (X.augmentation false) + have he : X.table true 0 = X.table false 0 := by + have hd := X.boundary false 0 + rw [hz 1 (by omega) false, map_zero] at hd + exact sub_eq_zero.mp hd.symm + refine ⟨b, ?_⟩ + apply Cell.ext + funext side n + cases n with + | zero => + apply (B.coordinates 0).injective + rw [B.atom_top] + cases side + · exact hb + · exact (congrArg (B.coordinates 0) he).trans hb + | succ n => rw [hz (n+1) (by omega) side, B.atom_above 0 b (n+1) (by omega) side] + +theorem upper_atom_decomposition (r : ℕ) (X : Cell K) + (hx : B.AboveAtomOrZero (r+1) X) : + ∃ as : List B.AtomIndex, (∀ a ∈ as, r < a.1) ∧ + ∀ n, r < n → ∀ side, X.table side n = + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n := by + rcases hx with hz | ⟨a, ha, he⟩ + · let z := X.table false (r+1) + refine ⟨B.chainAtomIndices (r+1) z, ?_, ?_⟩ + · intro a ha + rw [B.chainAtomIndices_degree (r+1) z a ha] + omega + · intro n hn side + by_cases heq : n = r+1 + · subst n + rw [B.chainAtomIndices_table (r+1) z (X.positive false (r+1)) side] + cases side + · rfl + · have hd := X.boundary false (r+1) + rw [hz (r+1+1) (by omega) false, map_zero] at hd + exact sub_eq_zero.mp hd.symm + · have hnr : r+1 < n := by omega + rw [hz n hnr side, B.chainAtomIndices_above (r+1) z n hnr side] + · let A := B.atomCell a + let z := X.table false (r+1) - A.table false (r+1) + have hz : z ∈ K.positive (r+1) := B.residual_positive X a.2 (r+1) ha + (he (r+1+1) (by omega) false) + refine ⟨a :: B.chainAtomIndices (r+1) z, ?_, ?_⟩ + · intro b hb + rcases List.mem_cons.mp hb with rfl | hb + · omega + · rw [B.chainAtomIndices_degree (r+1) z b hb] + omega + · intro n hn side + change X.table side n = A.table side n + + (Cell.PositiveTable.ofCells ((B.chainAtomIndices (r+1) z).map B.atomCell)).table side n + by_cases heq : n = r+1 + · subst n + rw [B.chainAtomIndices_table (r+1) z hz side] + have hs := residual_sides X A (r+1) (he (r+1+1) (by omega) false) + cases side + · dsimp [z] + abel + · change X.table true (r+1) = A.table true (r+1) + + (X.table false (r+1) - A.table false (r+1)) + rw [hs] + abel + · have hnr : r+1 < n := by omega + rw [B.chainAtomIndices_above (r+1) z n hnr side, add_zero] + exact he n hnr side + +theorem predicate_of_upper_atom_sum (r : ℕ) (P : Cell K → Prop) + (hbase : ∀ X, B.AboveAtomOrZero r X → P X) + (hcomp : ∀ n x y hxy, P x → P y → P (Cell.comp x y n hxy)) + (as : List B.AtomIndex) (hd : ∀ a ∈ as, r < a.1) (X : Cell K) + (he : ∀ n, r < n → ∀ side, X.table side n = + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n) : P X := by + have hd' : ∀ a ∈ B.sortAtoms as, r < a.1 := fun a ha => + hd a ((B.sortAtoms_perm as).mem_iff.mp ha) + have hsep : ((B.sortAtoms as).map B.atomCell).Pairwise (fun A D => + ∀ b : B.Index r, B.coordinates r (A.table false r) b = 0 ∨ + B.coordinates r (D.table true r) b = 0) := by + rw [List.pairwise_map] + apply (B.sortAtoms_pairwise as).imp_of_mem + intro a b ha hb hab c + exact B.disjoint a.2 b.2 (hd' a ha) (hd' b hb) hab c + apply B.ordered_sum_induction r P (fun Y hY => hbase Y (Or.inl hY)) + (hcomp r) ((B.sortAtoms as).map B.atomCell) hsep + · intro A hA Y hY + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hA + exact hbase Y (Or.inr ⟨a, hd' a ha, hY⟩) + · intro n hn side + exact (he n hn side).trans (B.sortAtoms_table as side n).symm + +/-- Actual ordered atoms composition-generate every finite positive table. -/ +theorem generated (P : Cell K → Prop) (hatom : ∀ p b, P (B.atom p b)) + (hcomp : ∀ n x y hxy, P x → P y → P (Cell.comp x y n hxy)) : ∀ X, P X := by + have hlevel : ∀ r (X : Cell K), B.AboveAtomOrZero r X → P X := by + intro r + induction r with + | zero => + intro X hx + rcases hx with hz | ⟨a, ha, he⟩ + · obtain ⟨b, rfl⟩ := B.eq_zero_atom_of_above_zero X hz + exact hatom 0 b + · have heq := B.eq_atom_of_above_zero X a.2 ha he + rw [heq] + exact hatom a.1 a.2 + | succ r ih => + intro X hx + obtain ⟨as, hd, he⟩ := B.upper_atom_decomposition r X hx + exact B.predicate_of_upper_atom_sum r P ih hcomp as hd X he + intro X + obtain ⟨N, hN⟩ := X.finite_support + exact hlevel N X (Or.inl hN) + +/-- Equality on the ordered atoms determines a strict functor out of the +actual positive-table realization. -/ +theorem hom_ext {D : StrictOmegaCategory} (F G : K.realization ⟶ D) + (he : ∀ p b, F.toFun (B.atom p b) = G.toFun (B.atom p b)) : F = G := by + apply StrictOmegaCategory.Hom.ext + funext X + apply B.generated (fun X => F.toFun X = G.toFun X) he + intro n x y hxy hx hy + have hf : D.target n (F.toFun x) = D.source n (F.toFun y) := + (F.map_face true n x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false n y)) + have hg : D.target n (G.toFun x) = D.source n (G.toFun y) := + (G.map_face true n x).symm.trans + ((congrArg G.toFun hxy).trans (G.map_face false n y)) + refine (F.map_comp n x y hxy hf).trans (Eq.trans ?_ (G.map_comp n x y hxy hg).symm) + congr 1 + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # The natural-number levels of ordered atom decomposition + +Level zero is exactly the set of atoms. Increasing the level weakens the +upper-table condition; every r-face is already at level r. These are the +induction interfaces for the remaining free-gluing proof. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem aboveAtomOrZero_mono {r s : ℕ} (hrs : r ≤ s) (X : Cell K) + (hx : B.AboveAtomOrZero r X) : B.AboveAtomOrZero s X := by + rcases hx with hz | ⟨a, ha, he⟩ + · exact Or.inl (fun n hn side => hz n (lt_of_le_of_lt hrs hn) side) + · by_cases hs : s < a.1 + · exact Or.inr ⟨a, hs, fun n hn side => he n (lt_of_le_of_lt hrs hn) side⟩ + · apply Or.inl + intro n hn side + exact (he n (lt_of_le_of_lt hrs hn) side).trans + (B.atom_above a.1 a.2 n (by omega) side) + +theorem aboveAtomOrZero_zero_iff (X : Cell K) : + B.AboveAtomOrZero 0 X ↔ ∃ (p : ℕ) (b : B.Index p), X = B.atom p b := by + constructor + · intro hx + rcases hx with hz | ⟨a, ha, he⟩ + · obtain ⟨b, hb⟩ := B.eq_zero_atom_of_above_zero X hz + exact ⟨0, b, hb⟩ + · exact ⟨a.1, a.2, B.eq_atom_of_above_zero X a.2 ha he⟩ + · rintro ⟨p, b, rfl⟩ + cases p with + | zero => exact Or.inl (fun n hn side => B.atom_above 0 b n hn side) + | succ p => exact Or.inr ⟨⟨p+1,b⟩, Nat.zero_lt_succ p, fun _ _ _ => rfl⟩ + +theorem aboveAtomOrZero_face (X : Cell K) (side : Bool) (r : ℕ) : + B.AboveAtomOrZero r (X.face side r) := by + apply Or.inl + intro n hn a + simp only [Cell.face_table, Cell.cutTable, Nat.not_lt.mpr hn.le, + Nat.ne_of_gt hn, ite_false] + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # An explicit ordered list of composable factors + +The finite positive splitting returns a full factorization with its matching +equations and an upper-table equation for each individual factor. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem ordered_list_decomposition (r : ℕ) (as : List (Cell K)) (hne : as ≠ []) + (hsep : as.Pairwise (fun A D => ∀ b : B.Index r, + B.coordinates r (A.table false r) b = 0 ∨ B.coordinates r (D.table true r) b = 0)) + (X : Cell K) + (he : ∀ n, r < n → ∀ side, + X.table side n = (Cell.PositiveTable.ofCells as).table side n) : + ∃ ys : List (Cell K), CompositeList K.realization r ys X ∧ + List.Forall₂ (fun A Y : Cell K => + ∀ n, r < n → ∀ side, Y.table side n = A.table side n) as ys := by + induction as generalizing X with + | nil => exact (hne rfl).elim + | cons A as ih => + cases as with + | nil => + refine ⟨[X], CompositeList.singleton (C := K.realization) (r := r) X, .cons ?_ .nil⟩ + intro n hn side + have hh := he n hn side + change X.table side n = A.table side n + 0 at hh + simpa only [add_zero] using hh + | cons D ds => + obtain ⟨hfirst, htail⟩ := List.pairwise_cons.mp hsep + have hd : ∀ b : B.Index r, B.coordinates r (A.table false r) b = 0 ∨ + B.coordinates r ((Cell.PositiveTable.ofCells (D :: ds)).table true r) b = 0 := by + intro b + by_cases hb : B.coordinates r (A.table false r) b = 0 + · exact Or.inl hb + · right + exact B.sumCells_coordinate_zero (D :: ds) true r b + (fun C hC => (hfirst C hC b).resolve_left hb) + have hs : ∀ n, r < n → ∀ side, + X.table side n = A.table side n + + (Cell.PositiveTable.ofCells (D :: ds)).table side n := he + obtain ⟨Y, Z, hyz, hYZ, hY, hZ⟩ := B.split_of_disjoint X + (Cell.PositiveTable.ofCell A) (Cell.PositiveTable.ofCells (D :: ds)) r hs hd + obtain ⟨ys, hys, hrel⟩ := ih (by simp) htail Z hZ + refine ⟨Y :: ys, ?_, .cons hY hrel⟩ + exact hYZ ▸ (CompositeList.cons (C := K.realization) (r := r) Y hys hyz) + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # The positive residual for a reversed pair of atoms + +This is the chain calculation in Steiner 2004, Proposition 5.9. A pair +whose opposite boundaries are disjoint has a positive residual one degree +lower. At degree zero its augmentation would be negative, so such a pair +necessarily admits a positive lower composition degree. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open scoped BigOperators + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +include B in +theorem augmentation_nonnegative (x : K.group 0) (hx : x ∈ K.positive 0) : + 0 ≤ K.augmentation x := by + rw [B.augmentation, Finsupp.sum] + exact Finset.sum_nonneg (fun b _ => B.coordinate_nonnegative 0 x hx b) + +/-- A reverse-disjoint pair has an actual positive residual after removing +both atom contributions from its composite. -/ +theorem two_atom_residual_positive {p q : ℕ} (a : B.Index p) (b : B.Index q) + (r : ℕ) (hrp : r < p) (hrq : r < q) (Y Z : Cell K) + (hyz : Y.face true r = Z.face false r) + (hY : Y.table false (r+1) = (B.atom p a).table false (r+1)) + (hZ : Z.table false (r+1) = (B.atom q b).table false (r+1)) + (hdis : ∀ e, B.coordinates r ((B.atom p a).table true r) e = 0 ∨ + B.coordinates r ((B.atom q b).table false r) e = 0) : + (Cell.comp Y Z r hyz).table false r - (B.atom p a).table false r - + (B.atom q b).table false r ∈ K.positive r := by + have hx : (Cell.comp Y Z r hyz).table false r = Y.table false r := by + simp only [Cell.comp_table, Cell.pasteTable, Nat.lt_irrefl, ite_false, ite_true, + Bool.false_eq_true] + rw [hx] + apply (B.positive_iff r _).mpr + intro e + have hu := B.coordinate_nonnegative r _ (B.residual_positive Y a r hrp hY) e + have hv := B.coordinate_nonnegative r _ (B.residual_positive Z b r hrq hZ) e + have hs := congrArg (fun x => B.coordinates r x e) (residual_sides Y (B.atom p a) r hY) + have hm := congrArg (fun x => B.coordinates r x e) (Cell.matching_top hyz) + simp only [map_sub, Finsupp.sub_apply] at hu hv hs ⊢ + rcases hdis e with ha | hb <;> omega + +/-- Such a reversed pair cannot occur at degree zero: removing its two +augmentation-one atoms would give a positive chain of augmentation -1. -/ +theorem two_atom_degree_positive {p q : ℕ} (a : B.Index p) (b : B.Index q) + (r : ℕ) (hrp : r < p) (hrq : r < q) (Y Z : Cell K) + (hyz : Y.face true r = Z.face false r) + (hY : Y.table false (r+1) = (B.atom p a).table false (r+1)) + (hZ : Z.table false (r+1) = (B.atom q b).table false (r+1)) + (hdis : ∀ e, B.coordinates r ((B.atom p a).table true r) e = 0 ∨ + B.coordinates r ((B.atom q b).table false r) e = 0) : 0 < r := by + by_contra hn + have hr : r = 0 := by omega + subst r + have hz := B.two_atom_residual_positive a b 0 hrp hrq Y Z hyz hY hZ hdis + have hp := B.augmentation_nonnegative _ hz + have ha : K.augmentation ((Cell.comp Y Z 0 hyz).table false 0 - + (B.atom p a).table false 0 - (B.atom q b).table false 0) = -1 := by + rw [map_sub, map_sub, (Cell.comp Y Z 0 hyz).augmentation, + (B.atom p a).augmentation, (B.atom q b).augmentation] + norm_num + rw [ha] at hp + omega + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Ordered lower decomposition of a reverse-disjoint pair + +The positive residual in Steiner 2004, Proposition 5.9 gives a concrete +finite list of atoms. Sorting that list and splitting the positive tables +produces actual matching lower composites, with exactly the two original +higher atoms and atoms in the intervening degree. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem two_atom_upper_decomposition {p q : ℕ} (a : B.Index p) (b : B.Index q) + (r : ℕ) (hrp : r < p) (hrq : r < q) (Y Z : Cell K) + (hyz : Y.face true r = Z.face false r) + (hY : ∀ n, r < n → ∀ side, Y.table side n = (B.atom p a).table side n) + (hZ : ∀ n, r < n → ∀ side, Z.table side n = (B.atom q b).table side n) + (hdis : ∀ e, B.coordinates r ((B.atom p a).table true r) e = 0 ∨ + B.coordinates r ((B.atom q b).table false r) e = 0) : + ∃ ls : List B.AtomIndex, (∀ c ∈ ls, c.1 = r) ∧ + ∀ n, r ≤ n → ∀ side, (Cell.comp Y Z r hyz).table side n = + (Cell.PositiveTable.ofCells + ((⟨p,a⟩ :: ⟨q,b⟩ :: ls).map B.atomCell)).table side n := by + let X := Cell.comp Y Z r hyz + let A := B.atom p a + let D := B.atom q b + let z := X.table false r - A.table false r - D.table false r + have hz : z ∈ K.positive r := B.two_atom_residual_positive a b r hrp hrq + Y Z hyz (hY (r+1) (by omega) false) (hZ (r+1) (by omega) false) hdis + have hu (n : ℕ) (hn : r < n) (side : Bool) : + X.table side n = A.table side n + D.table side n := by + change (Cell.comp Y Z r hyz).table side n = _ + simp only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hn.le, + Nat.ne_of_gt hn, ite_false] + exact congrArg₂ (· + ·) (hY n hn side) (hZ n hn side) + refine ⟨B.chainAtomIndices r z, fun c hc => B.chainAtomIndices_degree r z c hc, ?_⟩ + intro n hn side + change X.table side n = A.table side n + (D.table side n + + (Cell.PositiveTable.ofCells ((B.chainAtomIndices r z).map B.atomCell)).table side n) + rcases hn.eq_or_lt with hn | hn + · subst n + rw [B.chainAtomIndices_table r z hz side] + cases side with + | false => dsimp [z]; abel + | true => + have hb := Cell.boundary_add_of_above X (Cell.PositiveTable.ofCell A) + (Cell.PositiveTable.ofCell D) r (hu (r+1) (by omega) false) + change X.table true r - X.table false r = + (A.table true r - A.table false r) + + (D.table true r - D.table false r) at hb + change X.table true r = A.table true r + (D.table true r + + (X.table false r - A.table false r - D.table false r)) + calc + X.table true r = (X.table true r - X.table false r) + X.table false r := by abel + _ = _ := by rw [hb]; abel + · rw [B.chainAtomIndices_above r z n hn side, add_zero] + exact hu n hn side + +theorem two_atom_ordered_lower_decomposition {p q : ℕ} + (a : B.Index p) (b : B.Index q) (s : ℕ) + (hrp : s+1 < p) (hrq : s+1 < q) (Y Z : Cell K) + (hyz : Y.face true (s+1) = Z.face false (s+1)) + (hY : ∀ n, s+1 < n → ∀ side, Y.table side n = (B.atom p a).table side n) + (hZ : ∀ n, s+1 < n → ∀ side, Z.table side n = (B.atom q b).table side n) + (hdis : ∀ e, B.coordinates (s+1) ((B.atom p a).table true (s+1)) e = 0 ∨ + B.coordinates (s+1) ((B.atom q b).table false (s+1)) e = 0) : + ∃ (ls as : List B.AtomIndex) (xs : List (Cell K)), + (∀ c ∈ ls, c.1 = s+1) ∧ as.Perm (⟨p,a⟩ :: ⟨q,b⟩ :: ls) ∧ + as.Pairwise (fun c d => B.atomHeight c ≤ B.atomHeight d) ∧ + StrictOmegaCategory.CompositeList K.realization s xs (Cell.comp Y Z (s+1) hyz) ∧ + List.Forall₂ (fun c (x : Cell K) => + ∀ n, s < n → ∀ side, x.table side n = (B.atomCell c).table side n) as xs := by + obtain ⟨ls, hls, he⟩ := B.two_atom_upper_decomposition a b (s+1) hrp hrq + Y Z hyz hY hZ hdis + let as := B.sortAtoms (⟨p,a⟩ :: ⟨q,b⟩ :: ls) + have hp : as.Perm (⟨p,a⟩ :: ⟨q,b⟩ :: ls) := B.sortAtoms_perm _ + have hd : ∀ c ∈ as, s < c.1 := by + intro c hc + have hc' := hp.mem_iff.mp hc + rcases List.mem_cons.mp hc' with rfl | hc' + · exact Nat.lt_trans (Nat.lt_succ_self s) hrp + rcases List.mem_cons.mp hc' with rfl | hc' + · exact Nat.lt_trans (Nat.lt_succ_self s) hrq + rw [hls c hc'] + omega + have hne : as.map B.atomCell ≠ [] := by + intro hz + have hl := hp.length_eq + have ha : as = [] := List.map_eq_nil_iff.mp hz + rw [ha] at hl + simp at hl + have hsep : (as.map B.atomCell).Pairwise (fun A D => ∀ e : B.Index s, + B.coordinates s (A.table false s) e = 0 ∨ + B.coordinates s (D.table true s) e = 0) := by + rw [List.pairwise_map] + apply (B.sortAtoms_pairwise (⟨p,a⟩ :: ⟨q,b⟩ :: ls)).imp_of_mem + intro c d hc hd' hcd e + exact B.disjoint c.2 d.2 (hd c hc) (hd d hd') hcd e + obtain ⟨xs, hxs, hrel⟩ := B.ordered_list_decomposition s (as.map B.atomCell) hne + hsep (Cell.comp Y Z (s+1) hyz) (fun n hn side => + (he n (by omega) side).trans (B.sortAtoms_table _ side n).symm) + refine ⟨ls, as, xs, hls, hp, B.sortAtoms_pairwise _, hxs, ?_⟩ + exact List.forall₂_map_left_iff.mp hrel + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Grouping a lower string around its two higher atoms + +Only the two higher atoms contribute above the intervening degree. Cutting +the actual composite between them gives the binary decomposition of +Steiner 2004, Proposition 5.9. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +def higherAtomLabels (r : ℕ) (as : List B.AtomIndex) : List B.AtomIndex := + as.filter (fun a => decide (r < a.1)) + +theorem atomTable_sum_filter (r : ℕ) (as : List B.AtomIndex) + (n : ℕ) (hn : r < n) (side : Bool) : + (as.map (fun a => (B.atomCell a).table side n)).sum = + ((B.higherAtomLabels r as).map (fun a => (B.atomCell a).table side n)).sum := by + induction as with + | nil => rfl + | cons a as ih => + by_cases ha : r < a.1 + · simp only [higherAtomLabels, List.filter_cons, decide_eq_true ha, ite_true, + List.map_cons, List.sum_cons] at * + rw [ih] + · have hz := B.atom_above a.1 a.2 n (by omega) side + simp only [higherAtomLabels, List.filter_cons, decide_eq_false ha, + List.map_cons, List.sum_cons, atomCell, hz, zero_add] at * + exact ih + +theorem related_table_sum {as : List B.AtomIndex} {xs : List (Cell K)} + (r : ℕ) (h : List.Forall₂ (fun a (x : Cell K) => + ∀ n, r < n → ∀ side, x.table side n = (B.atomCell a).table side n) as xs) + (n : ℕ) (hn : r < n) (side : Bool) : + (xs.map (fun x => x.table side n)).sum = + (as.map (fun a => (B.atomCell a).table side n)).sum := by + induction h with + | nil => rfl + | cons hhead htail ih => + simp only [List.map_cons, List.sum_cons, hhead n hn side, ih] + +theorem group_two_higher_atoms (s r : ℕ) (hsr : s ≤ r) + (as : List B.AtomIndex) (xs : List (Cell K)) (X : Cell K) + (hxs : CompositeList K.realization s xs X) + (hrel : List.Forall₂ (fun a (x : Cell K) => + ∀ n, s < n → ∀ side, x.table side n = (B.atomCell a).table side n) as xs) + (a b : B.AtomIndex) (hab : B.higherAtomLabels r as = [a,b]) : + ∃ (Y Z : Cell K) (hyz : Y.face true s = Z.face false s), + Cell.comp Y Z s hyz = X ∧ + (∀ n, r < n → ∀ side, Y.table side n = (B.atomCell a).table side n) ∧ + (∀ n, r < n → ∀ side, Z.table side n = (B.atomCell b).table side n) := by + obtain ⟨ls, rs, has, hl, hr⟩ := + List.filter_eq_append_iff.mp (show as.filter (fun c => decide (r < c.1)) = + [a] ++ [b] from hab) + have hlne : ls ≠ [] := by + intro he + simp [he] at hl + have hrne : rs ≠ [] := by + intro he + simp [he] at hr + have hlrel : List.Forall₂ (fun a (x : Cell K) => + ∀ n, s < n → ∀ side, x.table side n = (B.atomCell a).table side n) + ls (xs.take ls.length) := by + have ht := List.forall₂_take ls.length hrel + rw [has, List.take_left] at ht + exact ht + have hrrel : List.Forall₂ (fun a (x : Cell K) => + ∀ n, s < n → ∀ side, x.table side n = (B.atomCell a).table side n) + rs (xs.drop ls.length) := by + have ht := List.forall₂_drop ls.length hrel + rw [has, List.drop_left] at ht + exact ht + have hleftne : xs.take ls.length ≠ [] := by + intro he + have hh := hlrel.length_eq + rw [he, List.length_nil] at hh + exact hlne (List.length_eq_zero_iff.mp hh) + have hrightne : xs.drop ls.length ≠ [] := by + intro he + have hh := hrrel.length_eq + rw [he, List.length_nil] at hh + exact hrne (List.length_eq_zero_iff.mp hh) + have hsplit : CompositeList K.realization s + (xs.take ls.length ++ xs.drop ls.length) X := by + simpa only [List.take_append_drop] using hxs + obtain ⟨Y, Z, hyz, hY, hZ, he⟩ := hsplit.split hleftne hrightne + refine ⟨Y, Z, hyz, he, ?_, ?_⟩ + · intro n hn side + rw [Cell.compositeList_table hY n (lt_of_le_of_lt hsr hn) side, + B.related_table_sum s hlrel n (lt_of_le_of_lt hsr hn) side, + B.atomTable_sum_filter r ls n hn side] + change ((ls.filter (fun c => decide (r < c.1))).map _).sum = _ + simp only [hl, List.map_cons, List.map_nil, List.sum_cons, List.sum_nil, add_zero] + · intro n hn side + rw [Cell.compositeList_table hZ n (lt_of_le_of_lt hsr hn) side, + B.related_table_sum s hrrel n (lt_of_le_of_lt hsr hn) side, + B.atomTable_sum_filter r rs n hn side] + change ((rs.filter (fun c => decide (r < c.1))).map _).sum = _ + simp only [hr, List.map_cons, List.map_nil, List.sum_cons, List.sum_nil, add_zero] + +/-- A reverse-disjoint pair at degree s+1 is a binary composite at degree s, +with the same higher atom contributions, in one of the two possible orders. -/ +theorem two_atom_lowering {p q : ℕ} (a : B.Index p) (b : B.Index q) (s : ℕ) + (hrp : s+1 < p) (hrq : s+1 < q) (Y Z : Cell K) + (hyz : Y.face true (s+1) = Z.face false (s+1)) + (hY : ∀ n, s+1 < n → ∀ side, Y.table side n = (B.atom p a).table side n) + (hZ : ∀ n, s+1 < n → ∀ side, Z.table side n = (B.atom q b).table side n) + (hdis : ∀ e, B.coordinates (s+1) ((B.atom p a).table true (s+1)) e = 0 ∨ + B.coordinates (s+1) ((B.atom q b).table false (s+1)) e = 0) : + ∃ (U V : Cell K) (huv : U.face true s = V.face false s), + Cell.comp U V s huv = Cell.comp Y Z (s+1) hyz ∧ + ((∀ n, s+1 < n → ∀ side, U.table side n = (B.atom p a).table side n) ∧ + (∀ n, s+1 < n → ∀ side, V.table side n = (B.atom q b).table side n) ∨ + (∀ n, s+1 < n → ∀ side, U.table side n = (B.atom q b).table side n) ∧ + (∀ n, s+1 < n → ∀ side, V.table side n = (B.atom p a).table side n)) := by + obtain ⟨ls, as, xs, hls, hp, _, hxs, hrel⟩ := + B.two_atom_ordered_lower_decomposition a b s hrp hrq Y Z hyz hY hZ hdis + have hf : B.higherAtomLabels (s+1) ls = [] := by + apply List.filter_eq_nil_iff.mpr + intro c hc + simp only [hls c hc, Nat.lt_irrefl, decide_false, Bool.false_eq_true, not_false_eq_true] + have hperm : (B.higherAtomLabels (s+1) as).Perm [⟨p,a⟩, ⟨q,b⟩] := by + have hh := hp.filter (fun c => decide (s+1 < c.1)) + simpa only [higherAtomLabels, List.filter_cons, decide_eq_true hrp, + decide_eq_true hrq, ite_true, show ls.filter (fun c => decide (s+1 < c.1)) = [] from hf] + using hh + rcases List.perm_pair.mp hperm with hab | hab + · obtain ⟨U, V, huv, he, hU, hV⟩ := + B.group_two_higher_atoms s (s+1) (by omega) as xs _ hxs hrel ⟨p,a⟩ ⟨q,b⟩ hab + exact ⟨U, V, huv, he, Or.inl ⟨hU, hV⟩⟩ + · obtain ⟨U, V, huv, he, hU, hV⟩ := + B.group_two_higher_atoms s (s+1) (by omega) as xs _ hxs hrel ⟨q,b⟩ ⟨p,a⟩ hab + exact ⟨U, V, huv, he, Or.inr ⟨hU, hV⟩⟩ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeChains.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..206da84bc67939845428a7dad6492571f8ae8082 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeChains.lean @@ -0,0 +1,922 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.RightCylinderPrism +import OAI.CategoryTheory.Thomason.Gray.StrictAbelianization +import Mathlib.CategoryTheory.Functor.KanExtension.Adjunction +import Mathlib.CategoryTheory.Functor.KanExtension.Dense +import Mathlib.CategoryTheory.Functor.KanExtension.Preserves +import Mathlib.CategoryTheory.Limits.Shapes.Pullback.IsPullback.Basic + +namespace OAI + +section + +/-! # Extending the actual globe-and-pasting presentation + +The proved cellwise presentation is dense. Consequently a cocontinuous +functor and its natural transformations are recovered from these small +parameters. The extension below is a genuine small colimit, with its +restriction and universal comparison maps explicitly retained. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobePasting + +open CategoryTheory CategoryTheory.Limits CategoryTheory.Functor + +noncomputable section + +instance : inclusion.Full where + map_surjective f := ⟨f, rfl⟩ + +instance : inclusion.Faithful where + map_injective h := h + +instance : inclusion.IsDense where + isDenseAt C := ⟨by + change IsColimit (cocone C) + exact isColimit C⟩ + +/-- The original strict category is recovered by the small presentation. -/ +def presentationIso : inclusion.leftKanExtension inclusion ≅ 𝟭 StrictOmegaCategory.{0} := + Functor.IsDense.leftKanExtensionIso inclusion + +/-- Extend actual data on the finite parameters by its small colimit. -/ +def extend (F : Shape ⥤ StrictOmegaCategory.{0}) : + StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} := + inclusion.leftKanExtension F + +/-- Every parameter is recovered, since the parameter inclusion is full +and faithful. This statement assumes no global preservation by the extension. -/ +def restrictionIso (F : Shape ⥤ StrictOmegaCategory.{0}) : + F ≅ inclusion ⋙ extend F := by + letI : IsIso (inclusion.leftKanExtensionUnit F) := + (Functor.isPointwiseLeftKanExtensionLeftKanExtensionUnit inclusion F).isIso_hom + exact (asIso (inclusion.leftKanExtensionUnit F) : + F ≅ inclusion ⋙ inclusion.leftKanExtension F) + +/-- The extension is computed on the actual category of parameters over C. -/ +def extensionObjIso (F : Shape ⥤ StrictOmegaCategory.{0}) (C : StrictOmegaCategory.{0}) : + (extend F).obj C ≅ colimit (CostructuredArrow.proj inclusion C ⋙ F) := + inclusion.leftKanExtensionObjIsoColimit F C + +/-- The explicit global comparison determined by a parameter-level map. -/ +def compare (F : Shape ⥤ StrictOmegaCategory.{0}) + (T : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) (a : F ⟶ inclusion ⋙ T) : + extend F ⟶ T := + Functor.descOfIsLeftKanExtension _ (inclusion.leftKanExtensionUnit F) T a + +@[reassoc (attr := simp)] +theorem restriction_compare (F : Shape ⥤ StrictOmegaCategory.{0}) + (T : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) + (a : F ⟶ inclusion ⋙ T) : + (restrictionIso F).hom ≫ whiskerLeft inclusion (compare F T a) = a := by + exact Functor.descOfIsLeftKanExtension_fac (inclusion.leftKanExtension F) + (inclusion.leftKanExtensionUnit F) T a + +/-- Global maps from the extension are determined by their finite-parameter values. -/ +theorem compare_ext (F : Shape ⥤ StrictOmegaCategory.{0}) + {T : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}} + {a b : extend F ⟶ T} + (he : (restrictionIso F).hom ≫ whiskerLeft inclusion a = + (restrictionIso F).hom ≫ whiskerLeft inclusion b) : a = b := + Functor.hom_ext_of_isLeftKanExtension _ (inclusion.leftKanExtensionUnit F) a b he + +end + +end Thomason.Construction.StrictOmegaCategory.GlobePasting + +end + +section + +/-! # Restriction of the dense presentation to the free globes -/ + +namespace Thomason.Construction.StrictOmegaCategory.GlobePasting + +open CategoryTheory + +noncomputable section + +/-- Keep the globe objects and all of their strict maps in the dense presentation. -/ +def globes : Globe.Shapes ⥤ Shape where + obj n := .globe n.dim + map f := f + +/-- The restricted inclusion is exactly the original globe inclusion. -/ +def globesInclusionIso : globes ⋙ inclusion ≅ Globe.inclusion := + NatIso.ofComponents (fun _ => Iso.refl _) (fun _ => rfl) + +end + +end Thomason.Construction.StrictOmegaCategory.GlobePasting + +end + +section + +/-! # A global extension of the actual right chain cylinders + +This constructs the small-colimit extension of the chain cylinders on +free globes and composable pairs. Its endpoints and comparison to chain +realization are natural on all strict categories. No claim of global +cocontinuity, adjointness, or preservation of colimits by nu is used. +-/ + +namespace Thomason.Construction.StrictOmegaCategory + +open CategoryTheory CategoryTheory.Functor _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +namespace GrayChainExtension + +/-- The chain-cylinder model before extension from the finite parameters. -/ +def model : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} := + Abelianization.functor ⋙ rightCylinderFunctor ⋙ realizationFunctor + +/-- The actual endpoint into the chain model, using the constructed unit. -/ +def modelEndpoint (a : Bool) : 𝟭 StrictOmegaCategory.{0} ⟶ model where + app C := Abelianization.unit C ≫ (RightCylinder.endpoint (Abelianization.complex C) a).realization + naturality C D f := by + let uC : C ⟶ (Abelianization.complex C).realization := Abelianization.unit C + let uD : D ⟶ (Abelianization.complex D).realization := Abelianization.unit D + let v : (Abelianization.complex C).realization ⟶ (Abelianization.complex D).realization := + (Abelianization.map f).realization + let eC : (Abelianization.complex C).realization ⟶ model.obj C := + (RightCylinder.endpoint (Abelianization.complex C) a).realization + let eD : (Abelianization.complex D).realization ⟶ model.obj D := + (RightCylinder.endpoint (Abelianization.complex D) a).realization + let w : model.obj C ⟶ model.obj D := + (RightCylinder.map (Abelianization.map f)).realization + have hu : f ≫ uD = uC ≫ v := Abelianization.adjunction.unit.naturality f + have he : v ≫ eD = eC ≫ w := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact (RightCylinder.map_endpoint (Abelianization.map f) a p (x.table b p)).symm + change f ≫ (uD ≫ eD) = (uC ≫ eC) ≫ w + calc + _ = (f ≫ uD) ≫ eD := (Category.assoc _ _ _).symm + _ = (uC ≫ v) ≫ eD := congrArg (fun q => q ≫ eD) hu + _ = uC ≫ (v ≫ eD) := Category.assoc _ _ _ + _ = uC ≫ (eC ≫ w) := congrArg (fun q => uC ≫ q) he + _ = _ := (Category.assoc _ _ _).symm + +/-- The concrete diagram being extended. -/ +def parameters : GlobePasting.Shape ⥤ StrictOmegaCategory.{0} := + GlobePasting.inclusion ⋙ model + +/-- Small-colimit extension of the explicit cylinders. -/ +def cylinder : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0} := + GlobePasting.extend parameters + +/-- Exact agreement with the actual chain model on every chosen parameter. -/ +def parameterIso : parameters ≅ GlobePasting.inclusion ⋙ cylinder := + GlobePasting.restrictionIso parameters + +/-- The canonical comparison to the chain model on arbitrary strict categories. -/ +def comparison : cylinder ⟶ model := + GlobePasting.compare parameters model (𝟙 parameters) + +@[reassoc (attr := simp)] +theorem parameter_comparison : + parameterIso.hom ≫ whiskerLeft GlobePasting.inclusion comparison = 𝟙 parameters := + GlobePasting.restriction_compare parameters model (𝟙 parameters) + +/-- Density extends the literal endpoint maps to every strict category. -/ +def endpoint (a : Bool) : 𝟭 StrictOmegaCategory.{0} ⟶ cylinder := + Functor.descOfIsLeftKanExtension _ GlobePasting.inclusion.rightUnitor.inv cylinder + (whiskerLeft GlobePasting.inclusion (modelEndpoint a) ≫ parameterIso.hom) + +@[reassoc (attr := simp)] +theorem endpoint_parameters (a : Bool) : + GlobePasting.inclusion.rightUnitor.inv ≫ + whiskerLeft GlobePasting.inclusion (endpoint a) = + whiskerLeft GlobePasting.inclusion (modelEndpoint a) ≫ parameterIso.hom := + Functor.descOfIsLeftKanExtension_fac _ _ _ _ + +/-- The globally defined endpoints agree with the original chain endpoints +under the canonical comparison. -/ +theorem endpoint_comparison (a : Bool) : endpoint a ≫ comparison = modelEndpoint a := by + apply Functor.hom_ext_of_isLeftKanExtension _ GlobePasting.inclusion.rightUnitor.inv + apply NatTrans.ext + funext i + let e : model.obj (GlobePasting.object i) ≅ cylinder.obj (GlobePasting.object i) := + parameterIso.app i + have he : (endpoint a).app (GlobePasting.object i) = + (modelEndpoint a).app (GlobePasting.object i) ≫ e.hom := by + have hh := congrArg (fun q => q.app i) (endpoint_parameters a) + exact hh + have hc : e.hom ≫ comparison.app (GlobePasting.object i) = 𝟙 _ := + congrArg (fun q => q.app i) parameter_comparison + change (endpoint a).app (GlobePasting.object i) ≫ + comparison.app (GlobePasting.object i) = (modelEndpoint a).app (GlobePasting.object i) + calc + _ = ((modelEndpoint a).app (GlobePasting.object i) ≫ e.hom) ≫ + comparison.app (GlobePasting.object i) := congrArg (fun q => q ≫ _) he + _ = (modelEndpoint a).app (GlobePasting.object i) ≫ + (e.hom ≫ comparison.app (GlobePasting.object i)) := Category.assoc _ _ _ + _ = _ := by rw [hc, Category.comp_id] + +/-- Restricting the global comparison to the generating parameters is an +isomorphism, although no global isomorphism is asserted. -/ +theorem comparison_parameter_isIso (i : GlobePasting.Shape) : + IsIso (comparison.app (GlobePasting.object i)) := by + let e : model.obj (GlobePasting.object i) ≅ cylinder.obj (GlobePasting.object i) := + parameterIso.app i + have he : e.hom ≫ comparison.app (GlobePasting.object i) = 𝟙 _ := + congrArg (fun q => q.app i) parameter_comparison + have hc : comparison.app (GlobePasting.object i) = e.inv := by + apply (cancel_epi e.hom).mp + exact he.trans e.hom_inv_id.symm + rw [hc] + infer_instance + +end GrayChainExtension + +end + +end Thomason.Construction.StrictOmegaCategory + +end + +section + +/-! # The pointwise parameter presentation of the actual extended cylinder + +This retains its colimit universal property together with the concrete +parameter legs. These are the source-side universal maps for the global +right-adjunction construction. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +def presentationDiagram (C : StrictOmegaCategory.{0}) : + CostructuredArrow GlobePasting.inclusion C ⥤ StrictOmegaCategory.{0} := + CostructuredArrow.proj GlobePasting.inclusion C ⋙ parameters + +def presentationIso (C : StrictOmegaCategory.{0}) : + cylinder.obj C ≅ colimit (presentationDiagram C) := + GlobePasting.extensionObjIso parameters C + +def presentationCocone (C : StrictOmegaCategory.{0}) : Cocone (presentationDiagram C) where + pt := cylinder.obj C + ι := { + app j := colimit.ι (presentationDiagram C) j ≫ (presentationIso C).inv + naturality i j f := by + change (presentationDiagram C).map f ≫ + (colimit.ι (presentationDiagram C) j ≫ (presentationIso C).inv) = + (colimit.ι (presentationDiagram C) i ≫ (presentationIso C).inv) ≫ 𝟙 _ + rw [Category.comp_id, ← Category.assoc, colimit.w] } + +def presentationIsColimit (C : StrictOmegaCategory.{0}) : IsColimit (presentationCocone C) where + desc s := (presentationIso C).hom ≫ colimit.desc (presentationDiagram C) s + fac s j := by + change (colimit.ι (presentationDiagram C) j ≫ (presentationIso C).inv) ≫ + ((presentationIso C).hom ≫ colimit.desc (presentationDiagram C) s) = _ + simp only [Category.assoc, Iso.inv_hom_id_assoc, colimit.ι_desc] + uniq s f hf := by + apply (cancel_epi (presentationIso C).inv).mp + apply colimit.hom_ext + intro j + calc + _ = (presentationCocone C).ι.app j ≫ f := (Category.assoc _ _ _).symm + _ = s.ι.app j := hf j + _ = _ := by + change s.ι.app j = colimit.ι (presentationDiagram C) j ≫ + ((presentationIso C).inv ≫ ((presentationIso C).hom ≫ colimit.desc (presentationDiagram C) s)) + simp only [Iso.inv_hom_id_assoc, colimit.ι_desc] + +/-- The colimit leg is the actual parameter comparison followed by the +extended cylinder of the corresponding strict map. -/ +theorem presentation_leg (C : StrictOmegaCategory.{0}) + (j : CostructuredArrow GlobePasting.inclusion C) : + (presentationCocone C).ι.app j = parameterIso.hom.app j.left ≫ cylinder.map j.hom := by + exact Functor.ι_leftKanExtensionObjIsoColimit_inv GlobePasting.inclusion parameters C j + +/-- Naturality of parameter legs in the category being presented. -/ +theorem presentation_leg_map {C D : StrictOmegaCategory.{0}} (f : C ⟶ D) + (j : CostructuredArrow GlobePasting.inclusion C) : + (presentationCocone C).ι.app j ≫ cylinder.map f = + (presentationCocone D).ι.app (CostructuredArrow.mk (Y := j.left) (j.hom ≫ f)) := by + exact (congrArg (fun q => q ≫ cylinder.map f) (presentation_leg C j)).trans + ((Category.assoc _ _ _).trans + ((congrArg (fun q => parameterIso.hom.app j.left ≫ q) + (cylinder.map_comp j.hom f).symm).trans + (presentation_leg D (CostructuredArrow.mk (Y := j.left) (j.hom ≫ f))).symm)) + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # The ordered pasted basis is the actual strict abelianization + +The comparison uses the two matching top cells and the literal strict +pushout. It makes no assertion that positive-table realization preserves +that pushout, and uses no simplex atom-generation hypothesis. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +/-- The canonical positive top cell of either half. -/ +def top {n k : ℕ} (hkn : k < n) (s : Bool) : (complex n k hkn).realization := + (inclusion hkn s).realization.toFun (DirectedGlobeComplex.topCell n) + +/-- Both top cells have dimension at most n. -/ +theorem top_dimension {n k : ℕ} (hkn : k < n) (s : Bool) : + (complex n k hkn).realization.DimensionLE n (top hkn s) := + (inclusion hkn s).realization.dimensionLE (DirectedGlobeComplex.topCell_dimension n) + +/-- The two top cells share their specified target and source k-faces. -/ +theorem top_matching {n k : ℕ} (hkn : k < n) : + (top hkn false).face true k = (top hkn true).face false k := by + apply Cell.ext + funext a p + change Cell.cutTable (top hkn false) true k a p = + Cell.cutTable (top hkn true) false k a p + by_cases hp : p < k + · have hpn : p < n := hp.trans hkn + simp only [Cell.cutTable, hp, ite_true] + change embedApp hkn false p (DirectedGlobeComplex.topTable n a p) = + embedApp hkn true p (DirectedGlobeComplex.topTable n a p) + simp [DirectedGlobeComplex.topTable, hpn, embed, right, hp] + · by_cases he : p = k + · subst p + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + change embedApp hkn false k (DirectedGlobeComplex.topTable n true k) = + embedApp hkn true k (DirectedGlobeComplex.topTable n false k) + simp [DirectedGlobeComplex.topTable, hkn, embed, right] + · simp only [Cell.cutTable, hp, he, ite_false] + +/-- The actual strict map from the pasted globes to its ordered chain model. -/ +def fromPasting {n k : ℕ} (hkn : k < n) : + StrictOmegaCategory.PastingGlobe.category n n k ⟶ (complex n k hkn).realization := + StrictOmegaCategory.PastingGlobe.desc _ (top hkn false) (top hkn true) + (top_dimension hkn false) (top_dimension hkn true) (top_matching hkn) + +/-- Evaluating strict abelianization on the actual ordered chain model. -/ +def abelianizationToBasis {n k : ℕ} (hkn : k < n) : + Hom (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.PastingGlobe.category n n k)) (complex n k hkn) := + StrictOmegaCategory.Abelianization.evaluateHom (fromPasting hkn) + +/-- The unit of strict abelianization carries the two pasted cells to +matching positive tables. -/ +theorem unit_matching {n k : ℕ} : + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.leftCell n n k)).face true k = + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.rightCell n n k)).face false k := by + rw [← StrictOmegaCategory.Abelianization.unitCell_face, + ← StrictOmegaCategory.Abelianization.unitCell_face] + exact congrArg (StrictOmegaCategory.Abelianization.unitCell _) + (StrictOmegaCategory.PastingGlobe.matching n n k) + +/-- Read the unit's actual cell tables on each basis. -/ +def basisToAbelianization {n k : ℕ} (hkn : k < n) : + Hom (complex n k hkn) (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.PastingGlobe.category n n k)) := + desc hkn + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.leftCell n n k)) + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.rightCell n n k)) unit_matching + +/-- The universal map evaluates the canonical top cell on either side. -/ +theorem desc_top {n k : ℕ} {L : DirectedComplex.{0}} (hkn : k < n) + (x y : Cell L) (hxy : x.face true k = y.face false k) (s : Bool) + (hb : L.realization.DimensionLE n (if s then y else x)) : + (desc hkn x y hxy).realization.toFun (top hkn s) = if s then y else x := by + have h := congrArg (fun f : Hom (DirectedGlobeComplex.complex n) L => + f.realization.toFun (DirectedGlobeComplex.topCell n)) (inclusion_desc hkn x y hxy s) + exact h.trans (DirectedGlobeComplex.cellMap_top_of_bounded n _ hb) + +/-- Evaluation of the abelianization unit is the strict comparison itself. -/ +theorem abelianizationToBasis_unit {n k : ℕ} (hkn : k < n) + (x : StrictOmegaCategory.PastingGlobe.category n n k) : + (abelianizationToBasis hkn).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ x) = (fromPasting hkn).toFun x := by + exact congrArg (fun f => f.toFun x) + (StrictOmegaCategory.Abelianization.unit_evaluate (fromPasting hkn)) + +theorem basisToAbelianization_top {n k : ℕ} (hkn : k < n) (s : Bool) : + (basisToAbelianization hkn).realization.toFun (top hkn s) = + StrictOmegaCategory.Abelianization.unitCell _ + (if s then StrictOmegaCategory.PastingGlobe.rightCell n n k + else StrictOmegaCategory.PastingGlobe.leftCell n n k) := by + have hb := (StrictOmegaCategory.Abelianization.unit + (StrictOmegaCategory.PastingGlobe.category n n k)).dimensionLE + ((if s then StrictOmegaCategory.PastingGlobe.right n n k + else StrictOmegaCategory.PastingGlobe.left n n k).dimensionLE + (StrictOmegaCategory.Globe.category_truncated n StrictOmegaCategory.Globe.Cell.top)) + cases s <;> exact desc_top hkn _ _ unit_matching _ hb + +/-- The two maps are inverse on strict abelianization, by the actual +universal property of the pasted pair. -/ +theorem abelianizationToBasis_inverse {n k : ℕ} (hkn : k < n) : + Hom.comp (abelianizationToBasis hkn) (basisToAbelianization hkn) = Hom.id _ := by + apply (StrictOmegaCategory.Abelianization.homEquiv + (StrictOmegaCategory.PastingGlobe.category n n k) _).injective + apply StrictOmegaCategory.PastingGlobe.hom_ext + · change (basisToAbelianization hkn).realization.toFun + ((abelianizationToBasis hkn).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.leftCell n n k))) = _ + rw [abelianizationToBasis_unit] + have hl : (fromPasting hkn).toFun + (StrictOmegaCategory.PastingGlobe.leftCell n n k) = top hkn false := + StrictOmegaCategory.PastingGlobe.desc_left _ _ _ _ _ _ + rw [hl] + exact basisToAbelianization_top hkn false + · change (basisToAbelianization hkn).realization.toFun + ((abelianizationToBasis hkn).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.PastingGlobe.rightCell n n k))) = _ + rw [abelianizationToBasis_unit] + have hr : (fromPasting hkn).toFun + (StrictOmegaCategory.PastingGlobe.rightCell n n k) = top hkn true := + StrictOmegaCategory.PastingGlobe.desc_right _ _ _ _ _ _ + rw [hr] + exact basisToAbelianization_top hkn true + +/-- The two maps are inverse on the explicit chain basis. -/ +theorem basisToAbelianization_inverse {n k : ℕ} (hkn : k < n) : + Hom.comp (basisToAbelianization hkn) (abelianizationToBasis hkn) = Hom.id _ := by + apply hom_ext hkn + all_goals + apply (DirectedGlobeComplex.homEquiv n (complex n k hkn)).injective + apply Subtype.ext + · change (abelianizationToBasis hkn).realization.toFun + ((basisToAbelianization hkn).realization.toFun (top hkn false)) = top hkn false + rw [basisToAbelianization_top, abelianizationToBasis_unit] + exact StrictOmegaCategory.PastingGlobe.desc_left _ _ _ _ _ _ + · change (abelianizationToBasis hkn).realization.toFun + ((basisToAbelianization hkn).realization.toFun (top hkn true)) = top hkn true + rw [basisToAbelianization_top, abelianizationToBasis_unit] + exact StrictOmegaCategory.PastingGlobe.desc_right _ _ _ _ _ _ + +/-- The ordered finite complex is the actual abelianization of the pasted +pair, with its specified two globe inclusions. -/ +def abelianizationIso {n k : ℕ} (hkn : k < n) : + StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.PastingGlobe.category n n k) ≅ complex n k hkn where + hom := abelianizationToBasis hkn + inv := basisToAbelianization hkn + hom_inv_id := abelianizationToBasis_inverse hkn + inv_hom_id := basisToAbelianization_inverse hkn + +end + +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # Actual atoms of the finite pasted-globe basis + +Every basis element is the top chain of an explicit bounded positive cell. +Its lower rows are literal singleton faces. Applying the proved prism +construction gives the mixed generator of the right cylinder. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Canonical representatives are unchanged by their chosen globe inclusion. -/ +theorem embed_self {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + embed hkn b.val.1 ⟨b.val.2, b.property.1⟩ = b := by + rcases b with ⟨⟨s, a⟩, hv, hs⟩ + cases s with + | false => rfl + | true => + rcases hs with h | hp | ⟨he, ha⟩ + · cases h + · simp [embed, right, Nat.not_lt.mpr hp.le, Nat.ne_of_gt hp] + · have ha' : a = true := ha + subst p + subst a + simp [embed, right] + +/-- The atom is the appropriate face of the corresponding globe's top cell. -/ +def atom {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : Cell (complex n k hkn) := + (inclusion hkn b.val.1).realization.toFun + ((DirectedGlobeComplex.topCell n).face b.val.2 p) + +/-- Its top chain is exactly the chosen basis, on both sides. -/ +theorem atom_top {n k p : ℕ} (hkn : k < n) (b : Basis n k p) (a : Bool) : + (atom hkn b).table a p = Finsupp.single b 1 := by + change embedApp hkn b.val.1 p + (Cell.cutTable (DirectedGlobeComplex.topCell n) b.val.2 p a p) = _ + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + change embedApp hkn b.val.1 p (DirectedGlobeComplex.topTable n b.val.2 p) = _ + rw [DirectedGlobeComplex.topTable_eq_single n p ⟨b.val.2, b.property.1⟩, + embedApp_single, embed_self] + +/-- Every atom is bounded by its basis degree. -/ +theorem atom_dimension {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + (complex n k hkn).realization.DimensionLE p (atom hkn b) := + (inclusion hkn b.val.1).realization.dimensionLE + ((DirectedGlobeComplex.complex n).realization.face_dimensionLE b.val.2 p + (DirectedGlobeComplex.topCell n)) + +/-- All chains strictly above the basis degree vanish. -/ +theorem atom_above {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hpq : p < q) (a : Bool) : (atom hkn b).table a q = 0 := + Cell.table_zero_of_dimensionLE (atom_dimension hkn b) hpq a + +/-- Every lower row is the corresponding singleton face of that globe. -/ +theorem atom_below {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (a : Bool) : + (atom hkn b).table a q = Finsupp.single + (embed hkn b.val.1 ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩) 1 := by + have hqn : q < n := hqp.trans_le (degree_le b) + change embedApp hkn b.val.1 q + (Cell.cutTable (DirectedGlobeComplex.topCell n) b.val.2 p a q) = _ + simp only [Cell.cutTable, hqp, ite_true] + change embedApp hkn b.val.1 q (DirectedGlobeComplex.topTable n a q) = _ + simp [DirectedGlobeComplex.topTable, hqn] + +/-- Source and target representatives below the top dimension are distinct. -/ +theorem embed_polarities_ne {n k q : ℕ} (hkn : k < n) (s : Bool) (hqn : q < n) : + embed hkn s (⟨false, Or.inl hqn⟩ : DirectedGlobeComplex.Basis n q) ≠ + embed hkn s (⟨true, Or.inl hqn⟩ : DirectedGlobeComplex.Basis n q) := by + cases s with + | false => simp [embed, left] + | true => + by_cases hq : q < k + · simp [embed, right, hq, left] + · by_cases he : q = k + · simp [embed, right, he, left] + · simp [embed, right, hq, he] + +/-- The two lower atom rows have disjoint basis supports. -/ +theorem atom_lower_disjoint {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (c : Basis n k q) : + DFunLike.coe (F := Chains n k q) ((atom hkn b).table false q) c = 0 ∨ + DFunLike.coe (F := Chains n k q) ((atom hkn b).table true q) c = 0 := by + classical + rw [atom_below hkn b hqp false, atom_below hkn b hqp true] + have he := embed_polarities_ne hkn b.val.1 (hqp.trans_le (degree_le b)) + by_cases hf : embed hkn b.val.1 + (⟨false, Or.inl (hqp.trans_le (degree_le b))⟩ : DirectedGlobeComplex.Basis n q) = c + · right + have ht : embed hkn b.val.1 + (⟨true, Or.inl (hqp.trans_le (degree_le b))⟩ : DirectedGlobeComplex.Basis n q) ≠ c := by + intro ht + exact he (hf.trans ht.symm) + simp [ht] + · left + simp [hf] + +/-- The mixed tensor generator is the top chain of the explicit prism atom. -/ +def mixedAtom {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + Cell (rightCylinder (complex n k hkn)) := RightCylinder.prism (atom hkn b) + +theorem mixedAtom_top {n k p : ℕ} (hkn : k < n) (b : Basis n k p) (a : Bool) : + (mixedAtom hkn b).table a (p+1) = (0, 0, Finsupp.single b 1) := by + rw [mixedAtom, RightCylinder.prism_top _ (atom_dimension hkn b), atom_top] + rfl + +theorem mixedAtom_dimension {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + (rightCylinder (complex n k hkn)).realization.DimensionLE (p+1) (mixedAtom hkn b) := + RightCylinder.prism_dimension _ (atom_dimension hkn b) + +/-- Endpoint tensor generators are also actual bounded positive cells. -/ +def endpointAtom {n k p : ℕ} (hkn : k < n) (s : Bool) (b : Basis n k p) : + Cell (rightCylinder (complex n k hkn)) := + (RightCylinder.endpoint (complex n k hkn) s).realization.toFun (atom hkn b) + +theorem endpointAtom_top {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : Basis n k p) (a : Bool) : + (endpointAtom hkn s b).table a p = + (RightCylinder.endpoint (complex n k hkn) s).app p (Finsupp.single b 1) := by + change (RightCylinder.endpoint _ s).app p ((atom hkn b).table a p) = _ + rw [atom_top] + +theorem endpointAtom_dimension {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : Basis n k p) : + (rightCylinder (complex n k hkn)).realization.DimensionLE p (endpointAtom hkn s b) := + (RightCylinder.endpoint (complex n k hkn) s).realization.dimensionLE (atom_dimension hkn b) + +end + +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # The two actual positive row inclusions in the grid complex -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def embedApp {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) (p : ℕ) : + PastingGlobeBasis.Chains n k p →ₗ[ℤ] Chains n k l p := + Finsupp.linearCombination ℤ (fun b => Finsupp.single (embed hkl hln s b) 1) + +@[simp] theorem embedApp_single {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (b : PastingGlobeBasis.Basis n k p) (z : ℤ) : + embedApp hkl hln s p (Finsupp.single b z) = Finsupp.single (embed hkl hln s b) z := by + simp [embedApp] + +theorem embedApp_differential {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) (p : ℕ) + (u : PastingGlobeBasis.Chains n k (p+1)) : + embedApp hkl hln s p (PastingGlobeBasis.differential (hkl.trans hln) p u) = + differential hkl hln p (embedApp hkl hln s (p+1) u) := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + simp only [PastingGlobeBasis.differential_single, map_smul, + PastingGlobeBasis.boundary, map_sub, embedApp_single, + differential_single, boundary, face_embed] + +theorem embedApp_augmentation {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (u : PastingGlobeBasis.Chains n k 0) : + weight n k l 0 (embedApp hkl hln s 0 u) = PastingGlobeBasis.weight n k 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp + +theorem embedApp_positive {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (u : PastingGlobeBasis.Chains n k p) (hu : u ∈ PastingGlobeBasis.positive n k p) : + embedApp hkl hln s p u ∈ positive n k l p := by + classical + change (u.sum fun b z => z • Finsupp.single (embed hkl hln s b) 1) ∈ positive n k l p + apply (positive n k l p).sum_mem + intro b hb + change u b • Finsupp.single (embed hkl hln s b) 1 ∈ positive n k l p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + apply (positive n k l p).nsmul_mem + intro c + simp only [Finsupp.single_apply] + split_ifs <;> norm_num + +def inclusion {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + Hom (PastingGlobeBasis.complex n k (hkl.trans hln)) (complex hkl hln) where + app p := (embedApp hkl hln s p).toAddMonoidHom + differential := embedApp_differential hkl hln s + augmentation := embedApp_augmentation hkl hln s + positive _ _ hu := embedApp_positive hkl hln s _ hu + +end +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # The positive chain map specified by four matching cell tables -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +variable {L : DirectedComplex.{0}} + +def value {n k l p : ℕ} (x : Bool → Bool → Cell L) (b : Basis n k l p) : L.group p := + (x b.val.1 b.val.2.val.1).table b.val.2.val.2 p + +theorem value_embed {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) + (s : Bool) (b : PastingGlobeBasis.Basis n k p) : + value x (embed hkl hln s b) = + PastingGlobeBasis.value (x s false) (x s true) b := by + cases s with + | false => cases hb : b.val.1 <;> simp [embed, left, value, PastingGlobeBasis.value, hb] + | true => + by_cases hp : p < l + · have he := Cell.matching_below (hv b.val.1) b.val.2 hp + cases hb : b.val.1 <;> + simpa [embed, hp, left, value, PastingGlobeBasis.value, hb] using he + · by_cases he : p = l + · subst p + by_cases hb : b.val.2 = false + · have ht := Cell.matching_top (hv b.val.1) + cases ha : b.val.1 <;> + simpa [embed, hb, targetBasis, left, value, PastingGlobeBasis.value, ha] using ht + · cases ha : b.val.1 <;> + simp [embed, hb, value, PastingGlobeBasis.value, ha] + · cases ha : b.val.1 <;> simp [embed, hp, he, value, PastingGlobeBasis.value, ha] + +def descApp {n k l : ℕ} (x : Bool → Bool → Cell L) (p : ℕ) : + Chains n k l p →ₗ[ℤ] L.group p := + Finsupp.linearCombination ℤ (value x) + +@[simp] theorem descApp_single {n k l p : ℕ} (x : Bool → Bool → Cell L) + (b : Basis n k l p) (z : ℤ) : + descApp x p (Finsupp.single b z) = z • value x b := by simp [descApp] + +theorem descApp_embedApp {n k l : ℕ} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) + (s : Bool) (p : ℕ) (u : PastingGlobeBasis.Chains n k p) : + descApp x p (embedApp hkl hln s p u) = + PastingGlobeBasis.descApp (x s false) (x s true) p u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hw => simp [hu, hw] + | single b z => simp [value_embed hkl hln x hv] + +theorem descApp_differential {n k l : ℕ} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hh : ∀ b, (x b false).face true k = (x b true).face false k) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) + (p : ℕ) (u : Chains n k l (p+1)) : + descApp x p (differential hkl hln p u) = + L.differential p (descApp x (p+1) u) := by + have hs (s : Bool) (b : PastingGlobeBasis.Basis n k (p+1)) (z : ℤ) : + descApp x p (differential hkl hln p (Finsupp.single (embed hkl hln s b) z)) = + L.differential p (descApp x (p+1) (Finsupp.single (embed hkl hln s b) z)) := by + rw [← embedApp_single hkl hln s b z, ← embedApp_differential, + descApp_embedApp hkl hln x hv, descApp_embedApp hkl hln x hv] + exact PastingGlobeBasis.descApp_differential (hkl.trans hln) + (x s false) (x s true) (hh s) p _ + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hw => simp [hu, hw] + | single b z => simpa only [embed_self] using hs b.val.1 b.val.2 z + +theorem descApp_augmentation {n k l : ℕ} (x : Bool → Bool → Cell L) + (u : Chains n k l 0) : L.augmentation (descApp x 0 u) = weight n k l 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hw => simp [hu, hw] + | single b z => simp [value, Cell.augmentation] + +theorem descApp_positive {n k l p : ℕ} (x : Bool → Bool → Cell L) + (u : Chains n k l p) (hu : u ∈ positive n k l p) : + descApp x p u ∈ L.positive p := by + classical + change (u.sum fun b z => z • value x b) ∈ L.positive p + apply (L.positive p).sum_mem + intro b hb + change u b • value x b ∈ L.positive p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + exact (L.positive p).nsmul_mem ((x b.val.1 b.val.2.val.1).positive b.val.2.val.2 p) _ + +def desc {n k l : ℕ} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hh : ∀ b, (x b false).face true k = (x b true).face false k) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) : + Hom (complex hkl hln) L where + app p := (descApp x p).toAddMonoidHom + differential := descApp_differential hkl hln x hh hv + augmentation := descApp_augmentation x + positive _ _ hu := descApp_positive x _ hu + +theorem inclusion_desc {n k l : ℕ} (hkl : k < l) (hln : l < n) + (x : Bool → Bool → Cell L) + (hh : ∀ b, (x b false).face true k = (x b true).face false k) + (hv : ∀ a, (x false a).face true l = (x true a).face false l) + (s : Bool) : Hom.comp (inclusion hkl hln s) (desc hkl hln x hh hv) = + PastingGlobeBasis.desc (hkl.trans hln) (x s false) (x s true) (hh s) := by + apply Hom.ext_app + intro p u + exact descApp_embedApp hkl hln x hv s p u + +theorem hom_ext {n k l : ℕ} (hkl : k < l) (hln : l < n) + {f g : Hom (complex hkl hln) L} + (h : ∀ s, Hom.comp (inclusion hkl hln s) f = Hom.comp (inclusion hkl hln s) g) : + f = g := by + apply Hom.ext_app + intro p u + have hs (s : Bool) (b : PastingGlobeBasis.Basis n k p) (z : ℤ) : + f.app p (Finsupp.single (embed hkl hln s b) z) = + g.app p (Finsupp.single (embed hkl hln s b) z) := by + have he := congrArg (fun q : Hom (PastingGlobeBasis.complex n k (hkl.trans hln)) L => + q.app p (Finsupp.single b z)) (h s) + change f.app p (embedApp hkl hln s p (Finsupp.single b z)) = + g.app p (embedApp hkl hln s p (Finsupp.single b z)) at he + simpa only [embedApp_single] using he + let fp : Chains n k l p →+ L.group p := f.app p + let gp : Chains n k l p →+ L.group p := g.app p + change fp u = gp u + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hw => simp [hu, hw] + | single b z => + change f.app p (Finsupp.single b z) = g.app p (Finsupp.single b z) + simpa only [embed_self] using hs b.val.1 b.val.2 z + +end +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # Strict pasting and right-cylinder chain compatibility + +The constructed lambda adjunction carries the actual pasted-globe square +to a pushout of positive complexes. The universal composite is the sum of +the two cell generators, including after right interval tensoring. No Gray +comparison or preservation property of nu is assumed here. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Lambda sends the universal composable pair to a pushout of actual +positive chain maps. -/ +theorem abelianization_isPushout (n m k : ℕ) : + IsPushout (C := DirectedComplex.{0}) (Abelianization.map (Globe.faceMap true k n)) + (Abelianization.map (Globe.faceMap false k m)) + (Abelianization.map (left n m k)) (Abelianization.map (right n m k)) := by + have := Abelianization.preservesColimits + exact Abelianization.functor.map_isPushout + (IsPushout.of_hasPushout (Globe.faceMap true k n) (Globe.faceMap false k m)) + +def leftBounded (n m k : ℕ) : Abelianization.Bounded (category n m k) (max n m) := + ⟨leftCell n m k, (category n m k).dimensionLE_mono (Nat.le_max_left n m) + ((left n m k).dimensionLE (Globe.category_truncated n Globe.Cell.top))⟩ + +def rightBounded (n m k : ℕ) : Abelianization.Bounded (category n m k) (max n m) := + ⟨rightCell n m k, (category n m k).dimensionLE_mono (Nat.le_max_right n m) + ((right n m k).dimensionLE (Globe.category_truncated m Globe.Cell.top))⟩ + +/-- The chain of the universal composite is exactly the sum of its factors. -/ +theorem composite_generator (n m k : ℕ) (hk : k < max n m) : + Abelianization.generator (category n m k) (max n m) + ⟨composite n m k, composite_dimension n m k hk⟩ = + Abelianization.generator (category n m k) (max n m) (leftBounded n m k) + + Abelianization.generator (category n m k) (max n m) (rightBounded n m k) := + Abelianization.generator_composite (category n m k) k hk + (leftBounded n m k) (rightBounded n m k) (matching n m k) + +/-- The chain map of the strict composition parameter has the prescribed sum. -/ +theorem compositionMap_generator (n m k : ℕ) (hk : k < max n m) : + (Abelianization.map (compositionMap n m k hk)).app (max n m) + (Abelianization.generator (Globe.category (max n m)) (max n m) + ⟨Globe.Cell.top, Globe.category_truncated (max n m) Globe.Cell.top⟩) = + Abelianization.generator (category n m k) (max n m) (leftBounded n m k) + + Abelianization.generator (category n m k) (max n m) (rightBounded n m k) := by + exact (Abelianization.map_generator (compositionMap n m k hk) (max n m) _).trans + (composite_generator n m k hk) + +/-- The concrete signed chain prism of the universal composition map. -/ +def cylinderComposition (n m k : ℕ) (hk : k < max n m) : + DirectedComplex.Hom + (rightCylinder (Abelianization.complex (Globe.category (max n m)))) + (rightCylinder (Abelianization.complex (category n m k))) := + RightCylinder.map (Abelianization.map (compositionMap n m k hk)) + +/-- At either endpoint the prism realizes the actual universal composite. -/ +theorem cylinderComposition_endpoint (n m k : ℕ) (hk : k < max n m) + (a : Bool) (j : ℕ) + (x : (Abelianization.complex (Globe.category (max n m))).group j) : + (cylinderComposition n m k hk).app j + ((RightCylinder.endpoint _ a).app j x) = + (RightCylinder.endpoint _ a).app j + ((Abelianization.map (compositionMap n m k hk)).app j x) := + RightCylinder.map_endpoint (Abelianization.map (compositionMap n m k hk)) a j x + +/-- The shifted top component of the right prism retains the sum relation. -/ +theorem cylinderComposition_shifted (n m k : ℕ) (hk : k < max n m) : + (cylinderComposition n m k hk).app (max n m + 1) + (0, 0, Abelianization.generator (Globe.category (max n m)) (max n m) + ⟨Globe.Cell.top, Globe.category_truncated (max n m) Globe.Cell.top⟩) = + (0, 0, + Abelianization.generator (category n m k) (max n m) (leftBounded n m k) + + Abelianization.generator (category n m k) (max n m) (rightBounded n m k)) := by + change ((Abelianization.map (compositionMap n m k hk)).app (max n m + 1) 0, + (Abelianization.map (compositionMap n m k hk)).app (max n m + 1) 0, + (Abelianization.map (compositionMap n m k hk)).app (max n m) + (Abelianization.generator _ _ _)) = _ + rw [map_zero, compositionMap_generator] + rfl + +end + +end Thomason.Construction.StrictOmegaCategory.PastingGlobe + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderAtoms.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderAtoms.lean new file mode 100644 index 0000000000000000000000000000000000000000..1767b7b26be82dbb16439970bd14bccb89858cea --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderAtoms.lean @@ -0,0 +1,758 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.RightCylinderPrism + +namespace OAI + +section + +/-! # Literal coefficients of the pasted-globe right cylinder + +The formal endpoint and mixed bases are identified with the actual two or +three Finsupp factors of each chain group. Coefficients detect equality and +positivity; the basis vectors are the top chains of the constructed atoms. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev Basis (n k p : ℕ) := + RightCylinderBasis.Basis (PastingGlobeBasis.Basis n k) p + +instance basisDecidableEq (n k p : ℕ) : DecidableEq (Basis n k p) := Classical.decEq _ + +abbrev Cylinder {n k : ℕ} (hkn : k < n) := rightCylinder (PastingGlobeBasis.complex n k hkn) + +/-- The coefficient in either endpoint copy. -/ +def endpointCoefficient {n k : ℕ} (hkn : k < n) : + (p : ℕ) → Bool → PastingGlobeBasis.Basis n k p → (Cylinder hkn).group p → ℤ + | 0, a, b, x => if a then DFunLike.coe (F := PastingGlobeBasis.Chains n k 0) x.2 b + else DFunLike.coe (F := PastingGlobeBasis.Chains n k 0) x.1 b + | p+1, a, b, x => + if a then DFunLike.coe (F := PastingGlobeBasis.Chains n k (p+1)) x.2.1 b + else DFunLike.coe (F := PastingGlobeBasis.Chains n k (p+1)) x.1 b + +/-- Coefficients in the actual tuple-of-Finsupp chain group. -/ +def coefficient {n k p : ℕ} (hkn : k < n) : Basis n k p → (Cylinder hkn).group p → ℤ + | .endpoint a b, x => endpointCoefficient hkn p a b x + | .mixed b, x => DFunLike.coe (F := PastingGlobeBasis.Chains n k _) x.2.2 b + +/-- The actual chain vector associated to each formal tensor basis. -/ +def vector {n k p : ℕ} (hkn : k < n) : Basis n k p → (Cylinder hkn).group p + | .endpoint a b => + (RightCylinder.endpoint (PastingGlobeBasis.complex n k hkn) a).app p (Finsupp.single b 1) + | .mixed b => (0, 0, Finsupp.single b 1) + +/-- Endpoint maps retain precisely the coefficient in their own copy. -/ +theorem coefficient_endpoint {n k p : ℕ} (hkn : k < n) (s t : Bool) + (b : PastingGlobeBasis.Basis n k p) (x : PastingGlobeBasis.Chains n k p) : + coefficient hkn (.endpoint t b) + ((RightCylinder.endpoint (PastingGlobeBasis.complex n k hkn) s).app p x) = + if t = s then x b else 0 := by + cases p <;> cases s <;> cases t <;> rfl + +/-- The formal tensor coefficients jointly detect chain equality. -/ +theorem coefficient_ext {n k p : ℕ} (hkn : k < n) {x y : (Cylinder hkn).group p} + (h : ∀ b, coefficient hkn b x = coefficient hkn b y) : x = y := by + cases p with + | zero => + apply Prod.ext + · apply Finsupp.ext + intro b + exact h (.endpoint false b) + · apply Finsupp.ext + intro b + exact h (.endpoint true b) + | succ p => + apply Prod.ext + · apply Finsupp.ext + intro b + exact h (.endpoint false b) + · apply Prod.ext + · apply Finsupp.ext + intro b + exact h (.endpoint true b) + · apply Finsupp.ext + intro b + exact h (.mixed b) + +/-- The actual positive cone is exactly coordinatewise nonnegativity. -/ +theorem positive_iff {n k p : ℕ} (hkn : k < n) (x : (Cylinder hkn).group p) : + x ∈ (Cylinder hkn).positive p ↔ ∀ b, 0 ≤ coefficient hkn b x := by + cases p with + | zero => + constructor + · intro hx b + cases b with + | endpoint a b => cases a; exact hx.1 b; exact hx.2 b + · intro hx + exact ⟨fun b => hx (.endpoint false b), fun b => hx (.endpoint true b)⟩ + | succ p => + constructor + · intro hx b + cases b with + | endpoint a b => cases a; exact hx.1 b; exact hx.2.1 b + | mixed b => exact hx.2.2 b + · intro hx + exact ⟨(fun b => hx (.endpoint false b)), (fun b => hx (.endpoint true b)), + (fun b => hx (.mixed b))⟩ + +/-- Basis vectors have their literal Kronecker coefficients. -/ +theorem coefficient_vector {n k p : ℕ} (hkn : k < n) (b c : Basis n k p) : + coefficient hkn b (vector hkn c) = if b = c then 1 else 0 := by + classical + cases p with + | zero => + cases b with + | endpoint a b => + cases c with + | endpoint d c => + cases a <;> cases d + all_goals first + | change (Finsupp.single c (1 : ℤ)) b = _ + simp [Finsupp.single_apply, eq_comm] + | change (0 : PastingGlobeBasis.Chains n k 0) b = _ + simp + | succ p => + cases b with + | endpoint a b => + cases c with + | endpoint d c => + cases a <;> cases d + all_goals first + | change (Finsupp.single c (1 : ℤ)) b = _ + simp [Finsupp.single_apply, eq_comm] + | change (0 : PastingGlobeBasis.Chains n k (p+1)) b = _ + simp + | mixed c => + cases a <;> + change (0 : PastingGlobeBasis.Chains n k (p+1)) b = _ <;> simp + | mixed b => + cases c with + | endpoint d c => + cases d <;> change (0 : PastingGlobeBasis.Chains n k p) b = _ <;> simp + | mixed c => + change (Finsupp.single c (1 : ℤ)) b = _ + simp [Finsupp.single_apply, eq_comm] + +/-- An actual bounded cell for every formal tensor basis vector. -/ +def atom {n k p : ℕ} (hkn : k < n) : Basis n k p → Cell (Cylinder hkn) + | .endpoint a b => PastingGlobeBasis.endpointAtom hkn a b + | .mixed b => PastingGlobeBasis.mixedAtom hkn b + +/-- The atom's complete top row is exactly its tensor basis vector. -/ +theorem atom_top {n k p : ℕ} (hkn : k < n) (b : Basis n k p) (a : Bool) : + (atom hkn b).table a p = vector hkn b := by + cases b with + | endpoint s b => exact PastingGlobeBasis.endpointAtom_top hkn s b a + | mixed b => exact PastingGlobeBasis.mixedAtom_top hkn b a + +/-- Every chosen tensor atom is bounded by the degree of its basis vector. -/ +theorem atom_dimension {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + (Cylinder hkn).realization.DimensionLE p (atom hkn b) := by + cases b with + | endpoint s b => exact PastingGlobeBasis.endpointAtom_dimension hkn s b + | mixed b => exact PastingGlobeBasis.mixedAtom_dimension hkn b + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Ordered atoms of the four-globe interchange complex -/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def atom {n k l p : ℕ} (hkl : k < l) (hln : l < n) (b : Basis n k l p) : + Cell (complex hkl hln) := + (inclusion hkl hln b.val.1).realization.toFun + (PastingGlobeBasis.atom (hkl.trans hln) b.val.2) + +theorem atom_top {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) (a : Bool) : + (atom hkl hln b).table a p = Finsupp.single b 1 := by + change embedApp hkl hln b.val.1 p + ((PastingGlobeBasis.atom (hkl.trans hln) b.val.2).table a p) = _ + rw [PastingGlobeBasis.atom_top, embedApp_single, embed_self] + +theorem atom_above {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) (hpq : p < q) (a : Bool) : + (atom hkl hln b).table a q = 0 := by + change embedApp hkl hln b.val.1 q + ((PastingGlobeBasis.atom (hkl.trans hln) b.val.2).table a q) = _ + rw [PastingGlobeBasis.atom_above _ _ hpq a] + exact map_zero _ + +theorem atom_below {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) (hqp : q < p) (a : Bool) : + (atom hkl hln b).table a q = Finsupp.single + (embed hkl hln b.val.1 (PastingGlobeBasis.embed (hkl.trans hln) b.val.2.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) 1 := by + change embedApp hkl hln b.val.1 q + ((PastingGlobeBasis.atom (hkl.trans hln) b.val.2).table a q) = _ + rw [PastingGlobeBasis.atom_below _ _ hqp a, embedApp_single] + +private theorem height_lower_false_false_false {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ false = false)) + (hc : false = false ∨ k < p ∨ (p = k ∧ false = true)) + (hr : false = false ∨ l < p ∨ (p = l ∧ false = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(false, ⟨(false, false), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left] + all_goals omega + +private theorem height_lower_false_false_true {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ true = false)) + (hc : false = false ∨ k < p ∨ (p = k ∧ true = true)) + (hr : false = false ∨ l < p ∨ (p = l ∧ true = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(false, ⟨(false, true), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left] + all_goals omega + +private theorem height_lower_false_true_false {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ false = false)) + (hc : true = false ∨ k < p ∨ (p = k ∧ false = true)) + (hr : false = false ∨ l < p ∨ (p = l ∧ false = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(false, ⟨(true, false), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +private theorem height_lower_false_true_true {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ true = false)) + (hc : true = false ∨ k < p ∨ (p = k ∧ true = true)) + (hr : false = false ∨ l < p ∨ (p = l ∧ true = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(false, ⟨(true, true), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln false + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +private theorem height_lower_true_false_false {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ false = false)) + (hc : false = false ∨ k < p ∨ (p = k ∧ false = true)) + (hr : true = false ∨ l < p ∨ (p = l ∧ false = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(true, ⟨(false, false), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, targetBasis, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +private theorem height_lower_true_false_true {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ true = false)) + (hc : false = false ∨ k < p ∨ (p = k ∧ true = true)) + (hr : true = false ∨ l < p ∨ (p = l ∧ true = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(true, ⟨(false, true), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) false + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + dsimp only + cases a + all_goals + simp_all [height, embed, targetBasis, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +private theorem height_lower_true_true_false {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ false = false)) + (hc : true = false ∨ k < p ∨ (p = k ∧ false = true)) + (hr : true = false ∨ l < p ∨ (p = l ∧ false = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(true, ⟨(true, false), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + have hpl : l ≤ p := by + rcases hr with h | h | ⟨h, _⟩ + · cases h + · exact h.le + · exact h.ge + have hpn : p ≤ n := by rcases hv with h | ⟨h, _⟩ <;> omega + have hpk : ¬ p < k := by omega + have hpl' : ¬ p < l := by omega + dsimp only + by_cases hqk : q < k + · have hql : q < l := hqk.trans hkl + cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right, hqk, hql] <;> omega + · by_cases hqke : q = k + · subst q + have hkl' : ¬ l < k := by omega + cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right, hkl] <;> omega + · by_cases hql : q < l + · cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke, hql] <;> omega + · by_cases hqle : q = l + · subst q + cases a <;> simp [height, embed, targetBasis, left, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke] <;> omega + · cases a <;> simp [height, embed, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke, hql, hqle] <;> omega + +private theorem height_lower_true_true_true {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (hv : p < n ∨ (p = n ∧ true = false)) + (hc : true = false ∨ k < p ∨ (p = k ∧ true = true)) + (hr : true = false ∨ l < p ∨ (p = l ∧ true = true)) + (hqp : q < p) (a : Bool) : + let b : Basis n k l p := ⟨(true, ⟨(true, true), hv, hc⟩), hr⟩ + if a then height b < height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln true + (PastingGlobeBasis.embed (hkl.trans hln) true + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + have hpl : l ≤ p := by + rcases hr with h | h | ⟨h, _⟩ + · cases h + · exact h.le + · exact h.ge + have hpn : p ≤ n := by rcases hv with h | ⟨h, _⟩ <;> omega + have hpk : ¬ p < k := by omega + have hpl' : ¬ p < l := by omega + dsimp only + by_cases hqk : q < k + · have hql : q < l := hqk.trans hkl + cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right, hqk, hql, hpk] <;> omega + · by_cases hqke : q = k + · subst q + have hkl' : ¬ l < k := by omega + cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, + PastingGlobeBasis.left, PastingGlobeBasis.right, hkl, hpk] <;> omega + · by_cases hql : q < l + · cases a <;> simp [height, embed, left, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke, hql, hpk] <;> omega + · by_cases hqle : q = l + · subst q + cases a <;> simp [height, embed, targetBasis, left, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke, hpk] <;> omega + · cases a <;> simp [height, embed, PastingGlobeBasis.embed, PastingGlobeBasis.right, hqk, hqke, hql, hqle, hpk] <;> omega + +theorem height_lower {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) (hqp : q < p) (a : Bool) : + if a then height b < height (embed hkl hln b.val.1 + (PastingGlobeBasis.embed (hkl.trans hln) b.val.2.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) + else height (embed hkl hln b.val.1 + (PastingGlobeBasis.embed (hkl.trans hln) b.val.2.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩)) < height b := by + rcases b with ⟨⟨row, ⟨⟨col, pole⟩, hv, hc⟩⟩, hr⟩ + cases row <;> cases col <;> cases pole + + · exact height_lower_false_false_false hkl hln hv hc hr hqp a + + · exact height_lower_false_false_true hkl hln hv hc hr hqp a + + · exact height_lower_false_true_false hkl hln hv hc hr hqp a + + · exact height_lower_false_true_true hkl hln hv hc hr hqp a + + · exact height_lower_true_false_false hkl hln hv hc hr hqp a + + · exact height_lower_true_false_true hkl hln hv hc hr hqp a + + · exact height_lower_true_true_false hkl hln hv hc hr hqp a + + · exact height_lower_true_true_true hkl hln hv hc hr hqp a + +theorem atom_sideHeight {n k l p q : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) (hqp : q < p) (a : Bool) (c : Basis n k l q) + (hc : DFunLike.coe (F := Chains n k l q) ((atom hkl hln b).table a q) c ≠ 0) : + if a then height b < height c else height c < height b := by + rw [atom_below hkl hln b hqp a] at hc + have he : c = embed hkl hln b.val.1 + (PastingGlobeBasis.embed (hkl.trans hln) b.val.2.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩) := by + by_contra he + exact hc (Finsupp.single_eq_of_ne he) + subst c + exact height_lower hkl hln b hqp a + +def orderedAtomBasis {n k l : ℕ} (hkl : k < l) (hln : l < n) : + OrderedAtomBasis (complex hkl hln) where + Index p := Basis n k l p + coordinates _ := AddEquiv.refl _ + positive_iff _ _ := Iff.rfl + augmentation := by + change ∀ x : Chains n k l 0, weight n k l 0 x = x.sum (fun _ z => z) + intro x + simp [weight, Finsupp.linearCombination_apply] + atom _ := atom hkl hln + atom_top _ := atom_top hkl hln + atom_above _ b q h a := atom_above hkl hln b h a + height _ := height + disjoint {p q r} b c hrp hrq hbc e := by + by_cases he : DFunLike.coe (F := Chains n k l r) ((atom hkl hln b).table false r) e = 0 + · exact Or.inl he + · right + by_contra hf + have h1 := atom_sideHeight hkl hln b hrp false e he + have h2 := atom_sideHeight hkl hln c hrq true e hf + simp only [Bool.false_eq_true, ite_false, ite_true] at h1 h2 + exact (lt_irrefl _) (h2.trans (h1.trans_le hbc)) + +theorem orderedAtomBasis_sideHeight {n k l : ℕ} (hkl : k < l) (hln : l < n) : + (orderedAtomBasis hkl hln).SideHeight := + fun _ b _ h a c hc => atom_sideHeight hkl hln b h a c hc + +def cylinderOrderedAtomBasis {n k l : ℕ} (hkl : k < l) (hln : l < n) : + OrderedAtomBasis (rightCylinder (complex hkl hln)) := + (orderedAtomBasis hkl hln).cylinderOrderedAtomBasis (orderedAtomBasis_sideHeight hkl hln) + +end +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # The strict order of the literal cylinder differential + +The signed endpoint and mixed incidences are checked on the actual tuple +chain groups. Thus every nonzero boundary coefficient points strictly in +the expected direction for the previously constructed integer height. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Endpoint boundaries stay in their chosen endpoint copy. -/ +theorem endpoint_boundary_coefficient {n k p : ℕ} (hkn : k < n) (s t : Bool) + (b : PastingGlobeBasis.Basis n k (p+1)) (c : PastingGlobeBasis.Basis n k p) : + coefficient hkn (.endpoint t c) + ((Cylinder hkn).differential p (vector hkn (.endpoint s b))) = + if t = s then PastingGlobeBasis.boundary hkn b c else 0 := by + let f := RightCylinder.endpoint (PastingGlobeBasis.complex n k hkn) s + have hf := f.differential p + (show (PastingGlobeBasis.complex n k hkn).group (p+1) from Finsupp.single b 1) + calc + _ = coefficient hkn (.endpoint t c) (f.app p + ((PastingGlobeBasis.complex n k hkn).differential p + (show (PastingGlobeBasis.complex n k hkn).group (p+1) from Finsupp.single b 1))) := + congrArg (coefficient hkn (.endpoint t c)) hf.symm + _ = if t = s then + DFunLike.coe (F := PastingGlobeBasis.Chains n k p) + ((PastingGlobeBasis.complex n k hkn).differential p + (show (PastingGlobeBasis.complex n k hkn).group (p+1) from Finsupp.single b 1)) c + else 0 := coefficient_endpoint hkn s t c _ + _ = _ := by + change (if t = s then PastingGlobeBasis.differential hkn p (Finsupp.single b 1) c + else 0) = _ + simp + +/-- An endpoint boundary has no mixed component. -/ +theorem endpoint_mixed_boundary_coefficient {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : PastingGlobeBasis.Basis n k (p+2)) (c : PastingGlobeBasis.Basis n k p) : + coefficient hkn (.mixed c) + ((Cylinder hkn).differential (p+1) (vector hkn (.endpoint s b))) = 0 := by + cases s <;> change (0 : PastingGlobeBasis.Chains n k p) c = 0 <;> rfl + +/-- The endpoint part of a mixed boundary has the right-tensor sign. -/ +theorem mixed_endpoint_boundary_coefficient {n k p : ℕ} (hkn : k < n) (t : Bool) + (b c : PastingGlobeBasis.Basis n k p) : + coefficient hkn (.endpoint t c) + ((Cylinder hkn).differential p (vector hkn (.mixed b))) = + (if t then (-1 : ℤ)^p else -((-1 : ℤ)^p)) * (if b = c then 1 else 0) := by + classical + cases p with + | zero => + cases t + · change (0 : ℤ) - (Finsupp.single b (1 : ℤ)) c = _ + by_cases hbc : b = c <;> simp [hbc] + · change (0 : ℤ) + (Finsupp.single b (1 : ℤ)) c = _ + simp [Finsupp.single_apply] + | succ p => + cases t + · change (0 : ℤ) - (-1 : ℤ)^(p+1) • (Finsupp.single b (1 : ℤ)) c = _ + by_cases hbc : b = c <;> simp [hbc] + · change (0 : ℤ) + (-1 : ℤ)^(p+1) • (Finsupp.single b (1 : ℤ)) c = _ + simp [Finsupp.single_apply] + +/-- The mixed part retains the original boundary coefficients. -/ +theorem mixed_boundary_coefficient {n k p : ℕ} (hkn : k < n) + (b : PastingGlobeBasis.Basis n k (p+1)) (c : PastingGlobeBasis.Basis n k p) : + coefficient hkn (.mixed c) + ((Cylinder hkn).differential (p+1) (vector hkn (.mixed b))) = + PastingGlobeBasis.boundary hkn b c := by + change PastingGlobeBasis.differential hkn p (Finsupp.single b 1) c = _ + simp + +/-- The actual finite strong height, on all tensor degrees at once. -/ +def height {n k p : ℕ} (b : Basis n k p) : ℤ := + RightCylinderBasis.height (fun _ => PastingGlobeBasis.height) b + +private theorem endpoint_height_lt {n k p q : ℕ} (s t : Bool) + (b : PastingGlobeBasis.Basis n k p) (c : PastingGlobeBasis.Basis n k q) + (h : PastingGlobeBasis.height b < PastingGlobeBasis.height c) : + height (.endpoint s b) < height (.endpoint t c) := by + simp only [height, RightCylinderBasis.height] + split_ifs <;> omega + +/-- All negative coefficients decrease height and all positive coefficients +increase it, for the literal directed-complex differential. -/ +theorem differential_height {n k p : ℕ} (hkn : k < n) (a : Bool) + (b : Basis n k (p+1)) (c : Basis n k p) + (hc : if a then 0 < coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) + else coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) < 0) : + if a then height b < height c else height c < height b := by + cases b with + | endpoint s b => + cases p with + | zero => + cases c with + | endpoint t c => + rw [endpoint_boundary_coefficient] at hc + by_cases hts : t = s + · simp only [hts, ite_true] at hc + cases a with + | false => + exact endpoint_height_lt _ _ _ _ + (PastingGlobeBasis.height_lt_of_boundary_neg hkn b c hc) + | true => + exact endpoint_height_lt _ _ _ _ + (PastingGlobeBasis.height_lt_of_boundary_pos hkn b c hc) + · simp [hts] at hc + | succ p => + cases c with + | endpoint t c => + rw [endpoint_boundary_coefficient] at hc + by_cases hts : t = s + · simp only [hts, ite_true] at hc + cases a with + | false => + exact endpoint_height_lt _ _ _ _ + (PastingGlobeBasis.height_lt_of_boundary_neg hkn b c hc) + | true => + exact endpoint_height_lt _ _ _ _ + (PastingGlobeBasis.height_lt_of_boundary_pos hkn b c hc) + · simp [hts] at hc + | mixed c => + have hz := endpoint_mixed_boundary_coefficient hkn s b c + cases a + · exact False.elim ((ne_of_lt hc) hz) + · exact False.elim ((ne_of_gt hc) hz) + | mixed b => + cases p with + | zero => + cases c with + | endpoint t c => + rw [mixed_endpoint_boundary_coefficient] at hc + by_cases hbc : b = c + · subst c + cases a <;> cases t <;> simp [height, RightCylinderBasis.height, + RightCylinderBasis.sourceEndpoint] at hc ⊢ + · simp [hbc] at hc + | succ p => + cases c with + | endpoint t c => + rw [mixed_endpoint_boundary_coefficient] at hc + by_cases hbc : b = c + · subst c + cases a <;> cases t <;> cases hb : p.bodd <;> + simp [height, RightCylinderBasis.height, RightCylinderBasis.sourceEndpoint, + RightCylinder.sign_bodd, Nat.mod_two_of_bodd, hb] at hc ⊢ + · simp [hbc] at hc + | mixed c => + rw [mixed_boundary_coefficient] at hc + cases a with + | false => + have hh := PastingGlobeBasis.height_lt_of_boundary_neg hkn b c hc + simp only [Bool.false_eq_true, ite_false, height, RightCylinderBasis.height] + omega + | true => + have hh := PastingGlobeBasis.height_lt_of_boundary_pos hkn b c hc + simp only [ite_true, height, RightCylinderBasis.height] + omega + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # The full signed tables of the actual cylinder atoms + +The source and target rows below each atom's top degree have disjoint +supports. Positivity and the boundary equation therefore recover each row +as the corresponding signed part, giving the concrete unital atom data. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +private theorem endpoint_atom_coefficient {n k p q : ℕ} (hkn : k < n) + (s : Bool) (b : PastingGlobeBasis.Basis n k p) (a t : Bool) + (c : PastingGlobeBasis.Basis n k q) : + coefficient hkn (.endpoint t c) ((atom hkn (.endpoint s b)).table a q) = + if t = s then DFunLike.coe (F := PastingGlobeBasis.Chains n k q) + ((PastingGlobeBasis.atom hkn b).table a q) c else 0 := + coefficient_endpoint hkn s t c _ + +private theorem mixed_atom_endpoint_coefficient {n k p q : ℕ} (hkn : k < n) + (b : PastingGlobeBasis.Basis n k p) (a t : Bool) + (c : PastingGlobeBasis.Basis n k q) : + coefficient hkn (.endpoint t c) ((atom hkn (.mixed b)).table a q) = + if t = RightCylinder.prismSide q a then + DFunLike.coe (F := PastingGlobeBasis.Chains n k q) + ((PastingGlobeBasis.atom hkn b).table a q) c else 0 := by + cases q with + | zero => cases a <;> cases t <;> rfl + | succ q => + change coefficient hkn (.endpoint t c) + (if RightCylinder.prismSide (q+1) a then + (0, (PastingGlobeBasis.atom hkn b).table a (q+1), + (PastingGlobeBasis.atom hkn b).table a q) + else ((PastingGlobeBasis.atom hkn b).table a (q+1), 0, + (PastingGlobeBasis.atom hkn b).table a q)) = _ + cases hs : RightCylinder.prismSide (q+1) a <;> cases t <;> rfl + +private theorem mixed_atom_mixed_coefficient {n k p q : ℕ} (hkn : k < n) + (b : PastingGlobeBasis.Basis n k p) (a : Bool) + (c : PastingGlobeBasis.Basis n k q) : + coefficient hkn (.mixed c) ((atom hkn (.mixed b)).table a (q+1)) = + DFunLike.coe (F := PastingGlobeBasis.Chains n k q) + ((PastingGlobeBasis.atom hkn b).table a q) c := by + change coefficient hkn (.mixed c) + (if RightCylinder.prismSide (q+1) a then + (0, (PastingGlobeBasis.atom hkn b).table a (q+1), + (PastingGlobeBasis.atom hkn b).table a q) + else ((PastingGlobeBasis.atom hkn b).table a (q+1), 0, + (PastingGlobeBasis.atom hkn b).table a q)) = _ + split_ifs <;> rfl + +/-- The two lower rows of every endpoint or mixed atom are disjoint. -/ +theorem atom_lower_disjoint {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (c : Basis n k q) : + coefficient hkn c ((atom hkn b).table false q) = 0 ∨ + coefficient hkn c ((atom hkn b).table true q) = 0 := by + cases b with + | endpoint s b => + cases c with + | endpoint t c => + rw [endpoint_atom_coefficient, endpoint_atom_coefficient] + by_cases hts : t = s + · simpa only [hts, ite_true] using PastingGlobeBasis.atom_lower_disjoint hkn b hqp c + · simp [hts] + | mixed c => + left + cases s <;> rfl + | mixed b => + cases c with + | endpoint t c => + rw [mixed_atom_endpoint_coefficient, mixed_atom_endpoint_coefficient] + have hs : RightCylinder.prismSide q false ≠ RightCylinder.prismSide q true := by + simp only [RightCylinder.prismSide, Bool.false_eq_true, ite_false, ite_true] + cases q.bodd <;> decide + by_cases hf : t = RightCylinder.prismSide q false + · right + have ht : t ≠ RightCylinder.prismSide q true := fun h => hs (hf.symm.trans h) + simp [ht] + · left + simp [hf] + | mixed c => + rw [mixed_atom_mixed_coefficient, mixed_atom_mixed_coefficient] + exact PastingGlobeBasis.atom_lower_disjoint hkn b (Nat.lt_of_succ_lt_succ hqp) c + +private theorem coefficient_sub {n k q : ℕ} (hkn : k < n) (b : Basis n k q) + (x y : (Cylinder hkn).group q) : + coefficient hkn b (x-y) = coefficient hkn b x - coefficient hkn b y := by + cases q with + | zero => cases b with | endpoint a b => cases a <;> rfl + | succ q => + cases b with + | endpoint a b => cases a <;> rfl + | mixed b => rfl + +/-- The complete downward-recursive signed-part formula holds for every +constructed cylinder atom. -/ +theorem atom_signed_table {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (a : Bool) (c : Basis n k q) : + coefficient hkn c ((atom hkn b).table a q) = max 0 + (if a then coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table a (q+1))) + else -coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table a (q+1)))) := by + have hp := (positive_iff hkn _).mp ((atom hkn b).positive false q) c + have ht := (positive_iff hkn _).mp ((atom hkn b).positive true q) c + have hd := atom_lower_disjoint hkn b hqp c + rw [(atom hkn b).boundary, coefficient_sub] + cases a <;> rcases hd with hd | hd <;> simp only [hd, sub_zero, zero_sub, + neg_neg, Bool.false_eq_true, ite_false, ite_true] <;> omega + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderPath.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderPath.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d545424dc11672b9c3d8328c279d894542d90c --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderPath.lean @@ -0,0 +1,1030 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Chains.SimplexBasisHeight +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping + +namespace OAI + +section + +/-! # The positive globe complex represents bounded cells + +Evaluation of a positive chain map at the universal top table is an actual +bijection with bounded cells. In particular the chain parameter used by +the right interval remembers every cell entry, not only its endpoints. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +private theorem chainHom_ext {K L : DirectedComplex.{0}} {f g : Hom K L} + (h : ∀ k x, f.app k x = g.app k x) : f = g := by + cases f with + | mk fa fd fe fp => + cases g with + | mk ga gd ge gp => + have hfg : fa = ga := funext (fun k => AddMonoidHom.ext (h k)) + cases hfg + rfl + +theorem topTable_eq_single (n k : ℕ) (s : Basis n k) : + topTable n s.val k = Finsupp.single s 1 := by + classical + unfold topTable + split_ifs with hk he + · rfl + · have hs : s.val = false := by + rcases s.property with h | ⟨_, h⟩ + · exact False.elim (hk h) + · exact h + congr 1 + exact Subtype.ext hs.symm + · rcases s.property with h | ⟨h, _⟩ + · exact False.elim (hk h) + · exact False.elim (he h) + +/-- Reading the top table and extending its entries recovers the original +positive chain map on every degree and basis element. -/ +theorem cellMap_top_inverse {K : DirectedComplex.{0}} (n : ℕ) (F : Hom (complex n) K) : + cellMap n (F.realization.toFun (topCell n)) = F := by + apply chainHom_ext + intro k u + change cellApp n (Cell.map F (topCell n)) k u = F.app k u + induction u using Finsupp.induction_linear with + | zero => + exact (cellApp n (Cell.map F (topCell n)) k).map_zero.trans + (F.app k).map_zero.symm + | add u v hu hv => + exact ((cellApp n (Cell.map F (topCell n)) k).map_add u v).trans + ((congrArg₂ (· + ·) hu hv).trans ((F.app k).map_add u v).symm) + | single s z => + rw [cellApp_single] + change z • F.app k (topTable n s.val k) = F.app k (Finsupp.single s z) + rw [topTable_eq_single] + let Fk : Chains n k →+ K.group k := F.app k + change z • Fk (Finsupp.single s 1) = Fk (Finsupp.single s z) + rw [← map_zsmul, Finsupp.smul_single] + simp + +/-- Positive maps from the globe complex are exactly bounded cells in +Steiner's actual strict realization. -/ +def homEquiv (n : ℕ) (K : DirectedComplex.{0}) : + Hom (complex n) K ≃ {x : K.realization // K.realization.DimensionLE n x} where + toFun F := ⟨F.realization.toFun (topCell n), F.realization.dimensionLE (topCell_dimension n)⟩ + invFun x := cellMap n x.val + left_inv F := cellMap_top_inverse n F + right_inv x := Subtype.ext (cellMap_top_of_bounded n x.val x.property) + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Positive weights in the actual globe complex + +The two signed basis coefficients control every positive table. Their +weights decrease with degree and are bounded by augmentation one. These +are the finite chain estimates needed to identify the globe realization. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev chainTable {n : ℕ} (x : Cell (complex n)) (a : Bool) (k : ℕ) : Chains n k := + x.table a k + +theorem chain_eq_pair {n k : ℕ} (hk : k < n) (u : Chains n k) : + u = Finsupp.single ⟨false, Or.inl hk⟩ (u ⟨false, Or.inl hk⟩) + + Finsupp.single ⟨true, Or.inl hk⟩ (u ⟨true, Or.inl hk⟩) := by + classical + ext s + rcases s with ⟨a, ha⟩ + cases a <;> simp + +theorem chain_eq_top (n : ℕ) (u : Chains n n) : + u = Finsupp.single ⟨false, Or.inr ⟨rfl, rfl⟩⟩ + (u ⟨false, Or.inr ⟨rfl, rfl⟩⟩) := by + classical + ext s + have hs : s = ⟨false, Or.inr ⟨rfl, rfl⟩⟩ := by + apply Subtype.ext + rcases s.property with h | ⟨_, h⟩ + · omega + · exact h + subst s + simp + +theorem weight_eq_pair {n k : ℕ} (hk : k < n) (u : Chains n k) : + weight n k u = u ⟨false, Or.inl hk⟩ + u ⟨true, Or.inl hk⟩ := by + have h := congrArg (weight n k) (chain_eq_pair hk u) + simpa only [map_add, weight_single] using h + +theorem weight_eq_top (n : ℕ) (u : Chains n n) : + weight n n u = u ⟨false, Or.inr ⟨rfl, rfl⟩⟩ := by + have h := congrArg (weight n n) (chain_eq_top n u) + simpa only [weight_single] using h + +theorem positive_weight_nonneg {n k : ℕ} {u : Chains n k} + (hu : u ∈ positive n k) : 0 ≤ weight n k u := by + rcases lt_trichotomy k n with hk | hk | hk + · rw [weight_eq_pair hk] + exact add_nonneg (hu _) (hu _) + · subst k + rw [weight_eq_top] + exact hu _ + · rw [chains_eq_zero_above hk u, map_zero] + +theorem positive_eq_zero_of_weight_zero {n k : ℕ} {u : Chains n k} + (hu : u ∈ positive n k) (hw : weight n k u = 0) : u = 0 := by + rcases lt_trichotomy k n with hk | hk | hk + · have hf := hu ⟨false, Or.inl hk⟩ + have ht := hu ⟨true, Or.inl hk⟩ + rw [weight_eq_pair hk] at hw + have hf0 : u ⟨false, Or.inl hk⟩ = 0 := by omega + have ht0 : u ⟨true, Or.inl hk⟩ = 0 := by omega + rw [chain_eq_pair hk u, hf0, ht0] + simp + · subst k + rw [weight_eq_top] at hw + rw [chain_eq_top n u, hw] + simp + · exact chains_eq_zero_above hk u + +theorem cell_weight_eq (n : ℕ) (x : Cell (complex n)) (k : ℕ) : + weight n k (chainTable x true k) = weight n k (chainTable x false k) := by + have h := congrArg (weight n k) (x.boundary false k) + change weight n k (differential n k (chainTable x false (k+1))) = + weight n k (chainTable x true k - chainTable x false k) at h + rw [weight_differential, map_sub] at h + omega + +theorem cell_weight_succ_le {n k : ℕ} (x : Cell (complex n)) (hk : k < n) : + weight n (k+1) (chainTable x false (k+1)) ≤ weight n k (chainTable x false k) := by + have h := congrArg (fun u : Chains n k => u ⟨true, Or.inl hk⟩) (x.boundary false k) + change differential n k (chainTable x false (k+1)) ⟨true, Or.inl hk⟩ = + (chainTable x true k - chainTable x false k) ⟨true, Or.inl hk⟩ at h + rw [differential_eq_weight] at h + simp [boundary, hk] at h + have hf := x.positive false k ⟨true, Or.inl hk⟩ + have ht := x.positive true k ⟨false, Or.inl hk⟩ + change 0 ≤ chainTable x false k ⟨true, Or.inl hk⟩ at hf + change 0 ≤ chainTable x true k ⟨false, Or.inl hk⟩ at ht + have he := cell_weight_eq n x k + simp only [weight_eq_pair hk] at he ⊢ + omega + +/-- Every cell of the globe chain realization has the expected bound. -/ +theorem cell_dimension (n : ℕ) (x : Cell (complex n)) : + (complex n).realization.DimensionLE n x := by + apply (Cell.dimensionLE_iff_zero_above x n).mpr + intro k hk a + exact chains_eq_zero_above hk (chainTable x a k) + +theorem cell_weight_le_one (n : ℕ) (x : Cell (complex n)) (k : ℕ) : + weight n k (chainTable x false k) ≤ 1 := by + induction k with + | zero => exact le_of_eq (x.augmentation false) + | succ k ih => + by_cases hk : k < n + · exact (cell_weight_succ_le x hk).trans ih + · have hnk : n < k+1 := by omega + rw [chains_eq_zero_above hnk (chainTable x false (k+1)), map_zero] + norm_num + +theorem cell_weight_bounds (n : ℕ) (x : Cell (complex n)) (a : Bool) (k : ℕ) : + 0 ≤ weight n k (chainTable x a k) ∧ weight n k (chainTable x a k) ≤ 1 := by + constructor + · exact positive_weight_nonneg (x.positive a k) + · cases a with + | false => exact cell_weight_le_one n x k + | true => rw [cell_weight_eq]; exact cell_weight_le_one n x k + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Classifying the cells of the positive globe complex + +Positive weight one selects one basis element. The boundary equations then +force the entire lower table; hence no additional strict cells appear when +the finite globe complex is realized. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +theorem positive_weight_one {n k : ℕ} {u : Chains n k} + (hu : u ∈ positive n k) (hw : weight n k u = 1) : + ∃ s : Basis n k, u = Finsupp.single s 1 := by + rcases lt_trichotomy k n with hk | hk | hk + · have hf := hu ⟨false, Or.inl hk⟩ + have ht := hu ⟨true, Or.inl hk⟩ + rw [weight_eq_pair hk] at hw + by_cases hf1 : u ⟨false, Or.inl hk⟩ = 1 + · refine ⟨⟨false, Or.inl hk⟩, ?_⟩ + have ht0 : u ⟨true, Or.inl hk⟩ = 0 := by omega + rw [chain_eq_pair hk u, hf1, ht0] + simp + · refine ⟨⟨true, Or.inl hk⟩, ?_⟩ + have hf0 : u ⟨false, Or.inl hk⟩ = 0 := by omega + have ht1 : u ⟨true, Or.inl hk⟩ = 1 := by omega + rw [chain_eq_pair hk u, hf0, ht1] + simp + · subst k + refine ⟨⟨false, Or.inr ⟨rfl, rfl⟩⟩, ?_⟩ + rw [weight_eq_top] at hw + rw [chain_eq_top n u, hw] + · have hz := chains_eq_zero_above hk u + rw [hz, map_zero] at hw + norm_num at hw + +theorem cell_weight_antitone (n : ℕ) (x : Cell (complex n)) : + Antitone (fun k => weight n k (chainTable x false k)) := by + apply antitone_nat_of_succ_le + intro k + by_cases hk : k < n + · exact cell_weight_succ_le x hk + · have hnk : n < k+1 := by omega + rw [chains_eq_zero_above hnk (chainTable x false (k+1)), map_zero] + exact (cell_weight_bounds n x false k).1 + +/-- The least dimension of a cell has positive weight one. -/ +theorem minimal_dimension_weight_one {n d : ℕ} (x : Cell (complex n)) + (hd : (complex n).realization.DimensionLE d x) + (hmin : ∀ k < d, ¬ (complex n).realization.DimensionLE k x) : + weight n d (chainTable x false d) = 1 := by + have hb := cell_weight_bounds n x false d + by_cases hd0 : d = 0 + · subst d + exact x.augmentation false + · have hpos : 0 < d := Nat.pos_of_ne_zero hd0 + by_contra hn + have hw0 : weight n d (chainTable x false d) = 0 := by omega + have hzero (a : Bool) : chainTable x a d = 0 := by + apply positive_eq_zero_of_weight_zero (x.positive a d) + cases a with + | false => exact hw0 + | true => exact (cell_weight_eq n x d).trans hw0 + apply hmin (d-1) (by omega) + apply (Cell.dimensionLE_iff_zero_above x (d-1)).mpr + intro k hk a + by_cases he : k = d + · subst k + exact hzero a + · exact (Cell.dimensionLE_iff_zero_above x d).mp hd k (by omega) a + +/-- Weight one at an upper degree forces the signed lower boundaries. -/ +theorem cell_lower_table {n d k : ℕ} (x : Cell (complex n)) + (hdn : d ≤ n) (hkd : k < d) + (hd : weight n d (chainTable x false d) = 1) (a : Bool) : + chainTable x a k = topTable n a k := by + classical + have hk : k < n := lt_of_lt_of_le hkd hdn + have hwk := (cell_weight_antitone n x) hkd.le + change weight n d (chainTable x false d) ≤ weight n k (chainTable x false k) at hwk + have hwk1 := (cell_weight_bounds n x false k).2 + have hwk_eq : weight n k (chainTable x false k) = 1 := by omega + have hwk' := (cell_weight_antitone n x) (show k+1 ≤ d by omega) + change weight n d (chainTable x false d) ≤ weight n (k+1) (chainTable x false (k+1)) at hwk' + have hwk1' := (cell_weight_bounds n x false (k+1)).2 + have hwk_eq' : weight n (k+1) (chainTable x false (k+1)) = 1 := by omega + have hb := congrArg (fun u : Chains n k => u ⟨true, Or.inl hk⟩) (x.boundary false k) + change differential n k (chainTable x false (k+1)) ⟨true, Or.inl hk⟩ = + (chainTable x true k - chainTable x false k) ⟨true, Or.inl hk⟩ at hb + rw [differential_eq_weight, hwk_eq'] at hb + simp [boundary, hk] at hb + have hwtrue : weight n k (chainTable x true k) = 1 := + (cell_weight_eq n x k).trans hwk_eq + rw [weight_eq_pair hk] at hwk_eq hwtrue + have hff := x.positive false k ⟨false, Or.inl hk⟩ + have hft := x.positive false k ⟨true, Or.inl hk⟩ + have htf := x.positive true k ⟨false, Or.inl hk⟩ + have htt := x.positive true k ⟨true, Or.inl hk⟩ + change 0 ≤ chainTable x false k ⟨false, Or.inl hk⟩ at hff + change 0 ≤ chainTable x false k ⟨true, Or.inl hk⟩ at hft + change 0 ≤ chainTable x true k ⟨false, Or.inl hk⟩ at htf + change 0 ≤ chainTable x true k ⟨true, Or.inl hk⟩ at htt + have hff1 : chainTable x false k ⟨false, Or.inl hk⟩ = 1 := by omega + have hft0 : chainTable x false k ⟨true, Or.inl hk⟩ = 0 := by omega + have htf0 : chainTable x true k ⟨false, Or.inl hk⟩ = 0 := by omega + have htt1 : chainTable x true k ⟨true, Or.inl hk⟩ = 1 := by omega + cases a + · rw [chain_eq_pair hk (chainTable x false k), hff1, hft0] + simp [topTable, hk] + · rw [chain_eq_pair hk (chainTable x true k), htf0, htt1] + simp [topTable, hk] + +/-- Every table is an actual face of the universal top cell. -/ +theorem exists_topCell_face (n : ℕ) (x : Cell (complex n)) : + ∃ (d : ℕ) (s : Basis n d), (topCell n).face s.val d = x := by + classical + let hex : ∃ d, (complex n).realization.DimensionLE d x := ⟨n, cell_dimension n x⟩ + let d := Nat.find hex + have hd : (complex n).realization.DimensionLE d x := Nat.find_spec hex + have hdn : d ≤ n := Nat.find_min' hex (cell_dimension n x) + have hmin : ∀ k < d, ¬ (complex n).realization.DimensionLE k x := + fun k hk => Nat.find_min hex hk + have hw := minimal_dimension_weight_one x hd hmin + obtain ⟨s, hs⟩ := positive_weight_one (x.positive false d) hw + refine ⟨d, s, ?_⟩ + apply Cell.ext + funext a k + change (if k < d then topTable n a k else if k = d then topTable n s.val k else 0) = + chainTable x a k + by_cases hk : k < d + · rw [ite_eq_left hk] + exact (cell_lower_table x hdn hk hw a).symm + · by_cases he : k = d + · subst k + rw [ite_eq_right (Nat.lt_irrefl d), ite_eq_left rfl] + rw [topTable_eq_single] + have ha : chainTable x a d = chainTable x false d := by + cases a with + | false => rfl + | true => + have h := congrArg (fun y : Cell (complex n) => chainTable y true d) hd.1 + change (if d < d then chainTable x true d else if d = d then chainTable x false d else 0) = + chainTable x true d at h + simpa only [Nat.lt_irrefl, ite_false, ite_true] using h.symm + exact hs.symm.trans ha.symm + · have hdk : d < k := by omega + rw [ite_eq_right hk, ite_eq_right he] + exact ((Cell.dimensionLE_iff_zero_above x d).mp hd k hdk a).symm + +/-- The canonical free globe map is surjective on every strict cell. -/ +theorem fromGlobe_surjective (n : ℕ) : Function.Surjective (fromGlobe n).toFun := by + intro x + obtain ⟨d, s, hs⟩ := exists_topCell_face n x + rcases s.property with hd | ⟨hd, _⟩ + · exact ⟨StrictOmegaCategory.Globe.Cell.boundary s.val ⟨d, hd⟩, hs⟩ + · subst d + refine ⟨StrictOmegaCategory.Globe.Cell.top, ?_⟩ + have hf : (topCell n).face s.val n = topCell n := by + cases s.val with + | false => exact (topCell_dimension n).1 + | true => exact (topCell_dimension n).2 + exact hf.symm.trans hs + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Atomic indecomposability in the actual positive-table category + +A unit top coefficient belongs entirely to one of two positive summands. +The disjoint atom boundaries then propagate this choice downwards. Thus an +atom cannot be a composite with two factors of positive relative dimension. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem positive_summand_of_single (p : ℕ) (b : B.Index p) + (x y : K.group p) (hx : x ∈ K.positive p) (hy : y ∈ K.positive p) + (he : B.coordinates p (x+y) = Finsupp.single b 1) : + x = 0 ∨ B.coordinates p x = Finsupp.single b 1 := by + classical + have hh (c : B.Index p) : + B.coordinates p x c + B.coordinates p y c = (Finsupp.single b 1) c := by + simpa only [map_add, Finsupp.add_apply] using congrArg (fun f => f c) he + have hx0 := B.coordinate_nonnegative p x hx b + have hy0 := B.coordinate_nonnegative p y hy b + have hb := hh b + rw [Finsupp.single_eq_same] at hb + have hv : B.coordinates p x b = 0 ∨ B.coordinates p x b = 1 := by omega + have hc (c : B.Index p) (hcb : c ≠ b) : B.coordinates p x c = 0 := by + have hp := B.coordinate_nonnegative p x hx c + have hq := B.coordinate_nonnegative p y hy c + have hs := hh c + rw [Finsupp.single_eq_of_ne hcb] at hs + omega + rcases hv with hz | ho + · left + apply (B.coordinates p).injective + ext c + by_cases hcb : c = b + · subst c + simpa only [map_zero, Finsupp.zero_apply] using hz + · simpa only [map_zero, Finsupp.zero_apply] using hc c hcb + · right + ext c + by_cases hcb : c = b + · subst c + simpa only [Finsupp.single_eq_same] using ho + · simpa only [Finsupp.single_eq_of_ne hcb] using hc c hcb + +theorem atom_summand_descend {p : ℕ} (b : B.Index p) (r : ℕ) (hrp : r < p) + (Y Z : Cell K) + (he : ∀ n, r < n → ∀ side, + Y.table side n + Z.table side n = (B.atom p b).table side n) + (htop : Y.table false p = (B.atom p b).table false p) : + ∀ n, r < n → ∀ side, + Y.table side n = (B.atom p b).table side n ∧ Z.table side n = 0 := by + have habove (n : ℕ) (hn : p < n) (side : Bool) : + Y.table side n = 0 ∧ Z.table side n = 0 := by + apply B.positive_add_eq_zero n _ _ (Y.positive side n) (Z.positive side n) + exact (he n (hrp.trans hn) side).trans (B.atom_above p b n hn side) + have htop' (side : Bool) : + Y.table side p = (B.atom p b).table side p ∧ Z.table side p = 0 := by + have hY : Y.table true p = Y.table false p := by + have hb := Y.boundary false p + rw [(habove (p+1) (by omega) false).1, map_zero] at hb + exact sub_eq_zero.mp hb.symm + have hA : (B.atom p b).table true p = (B.atom p b).table false p := by + apply (B.coordinates p).injective + rw [B.atom_top, B.atom_top] + have hside : Y.table side p = (B.atom p b).table side p := by + cases side + · exact htop + · exact hY.trans (htop.trans hA.symm) + refine ⟨hside, ?_⟩ + have hh := he p hrp side + rw [hside] at hh + exact add_left_cancel (hh.trans (add_zero _).symm) + have hdown (n : ℕ) (hn : n ≤ p) : r < n → ∀ side, + Y.table side n = (B.atom p b).table side n ∧ Z.table side n = 0 := by + induction hn using Nat.decreasingInduction with + | self => exact fun _ => htop' + | @of_succ n hn ih => + intro hrn side + have hnext := (ih (by omega) false).1 + have hres := B.residual_positive Y b n hn hnext + have hsum : (Y.table false n - (B.atom p b).table false n) + Z.table false n = 0 := by + have hh := he n hrn false + calc + _ = (Y.table false n + Z.table false n) - (B.atom p b).table false n := by abel + _ = 0 := by rw [hh, sub_self] + have hz := B.positive_add_eq_zero n _ _ hres (Z.positive false n) hsum + have hyfalse := sub_eq_zero.mp hz.1 + have hytrue : Y.table true n = (B.atom p b).table true n := by + apply sub_eq_zero.mp + rw [← residual_sides Y (B.atom p b) n hnext, hz.1] + have hyside : Y.table side n = (B.atom p b).table side n := by + cases side <;> assumption + refine ⟨hyside, ?_⟩ + have hh := he n hrn side + rw [hyside] at hh + exact add_left_cancel (hh.trans (add_zero _).symm) + intro n hn side + by_cases hnp : n ≤ p + · exact hdown n hnp hn side + · have hpn : p < n := by omega + exact ⟨(habove n hpn side).1.trans (B.atom_above p b n hpn side).symm, + (habove n hpn side).2⟩ + +theorem atom_summands {p : ℕ} (b : B.Index p) (r : ℕ) (hrp : r < p) + (Y Z : Cell K) + (he : ∀ n, r < n → ∀ side, + Y.table side n + Z.table side n = (B.atom p b).table side n) : + ((∀ n, r < n → ∀ side, Y.table side n = (B.atom p b).table side n) ∧ + (∀ n, r < n → ∀ side, Z.table side n = 0)) ∨ + ((∀ n, r < n → ∀ side, Y.table side n = 0) ∧ + (∀ n, r < n → ∀ side, Z.table side n = (B.atom p b).table side n)) := by + have hh : B.coordinates p (Y.table false p + Z.table false p) = Finsupp.single b 1 := + (congrArg (B.coordinates p) (he p hrp false)).trans (B.atom_top p b false) + rcases B.positive_summand_of_single p b _ _ (Y.positive false p) (Z.positive false p) hh with hz | hy + · have hZ : Z.table false p = (B.atom p b).table false p := by + simpa only [hz, zero_add] using he p hrp false + have hrev := B.atom_summand_descend b r hrp Z Y + (fun n hn side => (add_comm _ _).trans (he n hn side)) hZ + exact Or.inr ⟨fun n hn side => (hrev n hn side).2, fun n hn side => (hrev n hn side).1⟩ + · have hY : Y.table false p = (B.atom p b).table false p := by + apply (B.coordinates p).injective + exact hy.trans (B.atom_top p b false).symm + have hdir := B.atom_summand_descend b r hrp Y Z he hY + exact Or.inl ⟨fun n hn side => (hdir n hn side).1, fun n hn side => (hdir n hn side).2⟩ + +/-- A binary expression for an atom has an identity factor at its +composition degree. -/ +theorem atom_comp_identity_factor (a : B.AtomIndex) (Y Z : Cell K) (r : ℕ) + (hyz : Y.face true r = Z.face false r) + (he : Cell.comp Y Z r hyz = B.atomCell a) : + K.realization.DimensionLE r Y ∨ K.realization.DimensionLE r Z := by + by_cases hr : r < a.1 + · have hs : ∀ n, r < n → ∀ side, + Y.table side n + Z.table side n = (B.atom a.1 a.2).table side n := by + intro n hn side + have hh := congrArg (fun X : Cell K => X.table side n) he + simpa only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hn.le, + Nat.ne_of_gt hn, ite_false, atomCell] using hh + rcases B.atom_summands a.2 r hr Y Z hs with ⟨_, hZ⟩ | ⟨hY, _⟩ + · exact Or.inr (Cell.dimensionLE_of_table_zero hZ) + · exact Or.inl (Cell.dimensionLE_of_table_zero hY) + · have ha : K.realization.DimensionLE r (B.atomCell a) := + Cell.dimensionLE_of_table_zero (fun n hn side => + B.atom_above a.1 a.2 n (by omega) side) + have hc : K.realization.DimensionLE r (Cell.comp Y Z r hyz) := he.symm ▸ ha + exact Or.inl (Cell.dimensionLE_comp_factors B.positive_add_eq_zero hyz hc).1 + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Decomposition levels detect nonidentity composition + +At or above its atom-decomposition level a positive cell cannot be the +composite of two nonidentity factors. This bounds the critical composition +degree of every essential generated expression mapping to that cell. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem aboveAtomOrZero_comp_identity_factor (n r : ℕ) (hnr : n ≤ r) + (Y Z : Cell K) (hyz : Y.face true r = Z.face false r) + (hX : B.AboveAtomOrZero n (Cell.comp Y Z r hyz)) : + K.realization.DimensionLE r Y ∨ K.realization.DimensionLE r Z := by + have hlevel := B.aboveAtomOrZero_mono hnr _ hX + rcases hlevel with hz | ⟨a, ha, he⟩ + · have hzero (q : ℕ) (hq : r < q) (side : Bool) : + Y.table side q = 0 ∧ Z.table side q = 0 := by + apply B.positive_add_eq_zero q _ _ (Y.positive side q) (Z.positive side q) + have hh := hz q hq side + simpa only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hq.le, + Nat.ne_of_gt hq, ite_false] using hh + exact Or.inl (Cell.dimensionLE_of_table_zero (fun q hq side => (hzero q hq side).1)) + · have hsum : ∀ q, r < q → ∀ side, + Y.table side q + Z.table side q = (B.atom a.1 a.2).table side q := by + intro q hq side + have hh := he q hq side + simpa only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hq.le, + Nat.ne_of_gt hq, ite_false, atomCell] using hh + rcases B.atom_summands a.2 r ha Y Z hsum with ⟨_, hZ⟩ | ⟨hY, _⟩ + · exact Or.inr (Cell.dimensionLE_of_table_zero hZ) + · exact Or.inl (Cell.dimensionLE_of_table_zero hY) + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Unique atom fibres for a generated strict comparison + +The source is generated by bounded lifts of the actual atoms. Positivity +reflects the dimensions of all its expressions, and atomic +indecomposability therefore removes every identity factor. No faithfulness +or freeness assumption on the comparison is made. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem atomCell_injective : Function.Injective B.atomCell := by + rintro ⟨p,a⟩ ⟨q,b⟩ he + classical + have hpq : p ≤ q := by + by_contra hn + have hh := congrArg (fun X : Cell K => B.coordinates p (X.table false p) a) he + change B.coordinates p ((B.atom p a).table false p) a = + B.coordinates p ((B.atom q b).table false p) a at hh + rw [B.atom_top, B.atom_above q b p (by omega), map_zero, + Finsupp.single_eq_same, Finsupp.zero_apply] at hh + omega + have hqp : q ≤ p := by + by_contra hn + have hh := congrArg (fun X : Cell K => B.coordinates q (X.table false q) b) he + change B.coordinates q ((B.atom p a).table false q) b = + B.coordinates q ((B.atom q b).table false q) b at hh + rw [B.atom_top, B.atom_above p a q (by omega), map_zero, + Finsupp.single_eq_same, Finsupp.zero_apply] at hh + omega + have hp : p = q := Nat.le_antisymm hpq hqp + subst q + have hab : a = b := by + by_contra hne + have hh := congrArg (fun X : Cell K => B.coordinates p (X.table false p) a) he + simp only [atomCell, B.atom_top, Finsupp.single_eq_same, + Finsupp.single_eq_of_ne hne] at hh + omega + subst b + rfl + +private theorem comp_eq_left {C : StrictOmegaCategory.{0}} {x y : C} (r : ℕ) + (hxy : C.target r x = C.source r y) (hy : C.DimensionLE r y) : + C.comp r x y hxy = x := by + have he : y = C.target r x := hy.1.symm.trans hxy.symm + subst y + exact C.right_unit r x hxy + +theorem atom_preimage_of_expression {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + {x : C} (t : CompositionExpression C g x) (a : B.AtomIndex) + (he : F.toFun x = B.atomCell a) : x = g a := by + induction t with + | generator b => + have hb : b = a := B.atomCell_injective ((hg b).symm.trans he) + exact congrArg g hb + | @comp x y r hxy tx ty ihx ihy => + have hf : (F.toFun x).face true r = (F.toFun y).face false r := + (F.map_face true r x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false r y)) + have hc : Cell.comp (F.toFun x) (F.toFun y) r hf = B.atomCell a := + (F.map_comp r x y hxy hf).symm.trans he + rcases B.atom_comp_identity_factor a _ _ r hf hc with hx | hy + · have hdx := B.dimensionLE_of_expression_image g F hg hd tx r hx + have hunit := C.comp_of_dimensionLE (Nat.le_refl r) hdx hxy + exact hunit.trans (ihy ((congrArg F.toFun hunit).symm.trans he)) + · have hdy := B.dimensionLE_of_expression_image g F hg hd ty r hy + have hunit := comp_eq_left r hxy hdy + exact hunit.trans (ihx ((congrArg F.toFun hunit).symm.trans he)) + +/-- Every level-zero positive cell has exactly one preimage. This is the +base of the free-gluing induction on upper-table decomposition levels. -/ +theorem unique_preimage_level_zero {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) + (X : Cell K) (hX : B.AboveAtomOrZero 0 X) : ∃! x : C, F.toFun x = X := by + obtain ⟨p, b, rfl⟩ := (B.aboveAtomOrZero_zero_iff X).mp hX + refine ⟨g ⟨p,b⟩, hg ⟨p,b⟩, ?_⟩ + intro x hx + obtain ⟨t⟩ := hgen x + exact B.atom_preimage_of_expression g F hg hd t ⟨p,b⟩ hx + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Lifting actual ordered composites through a strict comparison + +Uniqueness on the lower faces supplies precisely the matching equations +needed to compose chosen lifts. This is the existence step in the +induction proving free gluing. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem lift_composite_of_unique_faces {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {xs : List (Cell K)} {X : Cell K} (hxs : CompositeList K.realization r xs X) + (hlift : ∀ Y ∈ xs, ∃ y : C, F.toFun y = Y) : ∃ x : C, F.toFun x = X := by + refine CompositeList.rec + (motive := fun (xs : List K.realization) (X : K.realization) _ => + (∀ Y ∈ xs, ∃ y : C, F.toFun y = Y) → ∃ x : C, F.toFun x = X) + ?_ ?_ hxs hlift + · intro X hlift + exact hlift X (by simp) + · intro Y ys Z hys hyz ih hlift + dsimp only [DirectedComplex.realization] at Y ys Z hyz + obtain ⟨y, hy⟩ := hlift Y (List.mem_cons_self) + obtain ⟨z, hz⟩ := ih (fun W hW => hlift W (List.mem_cons_of_mem Y hW)) + obtain ⟨_, _, hu⟩ := hunique (Y.face true r) (B.aboveAtomOrZero_face Y true r) + have hfy : F.toFun (C.target r y) = Y.face true r := by + rw [F.map_face, hy] + rfl + have hfz : F.toFun (C.source r z) = Y.face true r := by + rw [F.map_face, hz] + exact hyz.symm + have hmatch : C.target r y = C.source r z := (hu _ hfy).trans (hu _ hfz).symm + refine ⟨C.comp r y z hmatch, ?_⟩ + have hf : (F.toFun y).face true r = (F.toFun z).face false r := + (F.map_face true r y).symm.trans + ((congrArg F.toFun hmatch).trans (F.map_face false r z)) + refine (F.map_comp r y z hmatch hf).trans ?_ + congr 1 + +theorem exists_preimage_successor {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (X : Cell K) (hX : B.AboveAtomOrZero (r+1) X) : ∃ x : C, F.toFun x = X := by + obtain ⟨as, hd, he⟩ := B.upper_atom_decomposition r X hX + by_cases has : as = [] + · subst as + have hz : B.AboveAtomOrZero r X := Or.inl he + obtain ⟨x, hx, _⟩ := hunique X hz + exact ⟨x, hx⟩ + let bs := B.sortAtoms as + have hp : bs.Perm as := B.sortAtoms_perm as + have hbd : ∀ b ∈ bs, r < b.1 := fun b hb => hd b (hp.mem_iff.mp hb) + have hbne : bs.map B.atomCell ≠ [] := by + intro hz + have hnil : bs = [] := List.map_eq_nil_iff.mp hz + have hlen := hp.length_eq + rw [hnil, List.length_nil] at hlen + exact has (List.length_eq_zero_iff.mp hlen.symm) + have hsep : (bs.map B.atomCell).Pairwise (fun A D => ∀ e : B.Index r, + B.coordinates r (A.table false r) e = 0 ∨ + B.coordinates r (D.table true r) e = 0) := by + rw [List.pairwise_map] + apply (B.sortAtoms_pairwise as).imp_of_mem + intro a b ha hb hab e + exact B.disjoint a.2 b.2 (hbd a ha) (hbd b hb) hab e + obtain ⟨xs, hxs, hrel⟩ := B.ordered_list_decomposition r (bs.map B.atomCell) + hbne hsep X (fun n hn side => (he n hn side).trans (B.sortAtoms_table as side n).symm) + have hlift : ∀ Y ∈ xs, ∃ y : C, F.toFun y = Y := by + have hr := List.forall₂_map_left_iff.mp hrel + have aux : ∀ (as : List B.AtomIndex) (ys : List (Cell K)), + List.Forall₂ (fun a (Y : Cell K) => + ∀ n, r < n → ∀ side, Y.table side n = (B.atomCell a).table side n) as ys → + (∀ a ∈ as, r < a.1) → ∀ Y ∈ ys, ∃ y : C, F.toFun y = Y := by + intro as ys h + induction h with + | nil => simp + | @cons a Y' as ys hh ht ih => + intro hd Y hY + rcases List.mem_cons.mp hY with rfl | hY + · obtain ⟨y, hy, _⟩ := hunique Y + (Or.inr ⟨a, hd a (by simp), hh⟩) + exact ⟨y, hy⟩ + · exact ih (fun b hb => hd b (by simp [hb])) Y hY + exact aux bs xs hr hbd + exact B.lift_composite_of_unique_faces F r hunique hxs hlift + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Equality of lifted ordered factor strings + +An equality of total images and of corresponding upper tables determines +all image factors. Uniqueness at the preceding atom level then determines +the actual source factors individually. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem lifted_compositeList_factors_unique {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {xs ys : List C} {x y : C} (hx : CompositeList C r xs x) + (hy : CompositeList C r ys y) (he : F.toFun x = F.toFun y) + (hupper : List.Forall₂ (fun a b : C => ∀ n, r < n → ∀ side, + (F.toFun a).table side n = (F.toFun b).table side n) xs ys) + (hlevel : ∀ a ∈ xs, B.AboveAtomOrZero r (F.toFun a)) : xs = ys := by + have hu : List.Forall₂ (fun A D : Cell K => ∀ n, r < n → ∀ side, + A.table side n = D.table side n) (xs.map F.toFun) (ys.map F.toFun) := by + exact List.forall₂_map_left_iff.mpr (List.forall₂_map_right_iff.mpr hupper) + have hm := Cell.compositeList_factors_unique (hx.map F) (hy.map F) he hu + have aux : ∀ (as bs : List C), as.map F.toFun = bs.map F.toFun → + (∀ a ∈ as, B.AboveAtomOrZero r (F.toFun a)) → as = bs := by + intro as + induction as with + | nil => + intro bs he _ + have hb : bs = [] := List.map_eq_nil_iff.mp he.symm + exact hb.symm + | cons a as ih => + intro bs he hl + cases bs with + | nil => simp at he + | cons b bs => + obtain ⟨hab, ht⟩ := List.cons.inj he + obtain ⟨_, _, hf⟩ := hunique (F.toFun a) (hl a (by simp)) + have hhead : a = b := (hf a rfl).trans (hf b hab.symm).symm + exact congrArg₂ List.cons hhead (ih bs ht (fun c hc => hl c (by simp [hc]))) + exact aux xs ys hm hlevel + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # The explicit directed path complex for right cylinders + +The degree-zero chains record two endpoints and a chain joining them. +In positive degree the third component has the signed differential forced +by tensoring with an interval on the right. All positivity is componentwise. +-/ + +namespace Thomason.Construction.DirectedComplex.RightPath + +open CategoryTheory + +noncomputable section + +variable (L : DirectedComplex.{0}) + +abbrev rawGroup (n : ℕ) := L.group n × L.group n × L.group (n+1) + +def rawDifferential (n : ℕ) : rawGroup L (n+1) →+ rawGroup L n where + toFun x := (L.differential n x.1, L.differential n x.2.1, + L.differential (n+1) x.2.2 - ((-1 : ℤ)^(n+1)) • (x.2.1 - x.1)) + map_zero' := by simp + map_add' x y := by + apply Prod.ext + · exact map_add (L.differential n) x.1 y.1 + · apply Prod.ext + · exact map_add (L.differential n) x.2.1 y.2.1 + · simp only [Prod.fst_add, Prod.snd_add, map_add, smul_sub, smul_add] + abel + +def zeroGroup : AddSubgroup (rawGroup L 0) where + carrier := {x | L.differential 0 x.2.2 = x.2.1 - x.1} + zero_mem' := by simp + add_mem' {x y} hx hy := by + change L.differential 0 x.2.2 = x.2.1 - x.1 at hx + change L.differential 0 y.2.2 = y.2.1 - y.1 at hy + change L.differential 0 (x.2.2 + y.2.2) = (x.2.1 + y.2.1) - (x.1 + y.1) + rw [map_add, hx, hy] + abel + neg_mem' {x} hx := by + change L.differential 0 x.2.2 = x.2.1 - x.1 at hx + change L.differential 0 (-x.2.2) = -x.2.1 - -x.1 + rw [map_neg, hx] + abel + +theorem rawDifferential_zero_mem (x : rawGroup L 1) : + rawDifferential L 0 x ∈ zeroGroup L := by + change L.differential 0 (L.differential 1 x.2.2 - ((-1 : ℤ)^1) • (x.2.1 - x.1)) = + L.differential 0 x.2.1 - L.differential 0 x.1 + simp [L.differential_squared] + +theorem rawDifferential_squared (n : ℕ) (x : rawGroup L (n+2)) : + rawDifferential L n (rawDifferential L (n+1) x) = 0 := by + ext <;> simp [rawDifferential, L.differential_squared, pow_succ] + +abbrev group : ℕ → AddCommGrpCat.{0} + | 0 => AddCommGrpCat.of (zeroGroup L) + | n+1 => AddCommGrpCat.of (rawGroup L (n+1)) + +def differential : (n : ℕ) → group L (n+1) →+ group L n + | 0 => + { toFun := fun x => ⟨rawDifferential L 0 x, rawDifferential_zero_mem L x⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' := fun x y => Subtype.ext (map_add _ x y) } + | n+1 => rawDifferential L (n+1) + +theorem differential_squared (n : ℕ) (x : group L (n+2)) : + differential L n (differential L (n+1) x) = 0 := by + cases n with + | zero => exact Subtype.ext (rawDifferential_squared L 0 x) + | succ n => exact rawDifferential_squared L (n+1) x + +def augmentation : group L 0 →+ ℤ where + toFun x := L.augmentation x.val.1 + map_zero' := map_zero _ + map_add' x y := map_add _ x.val.1 y.val.1 + +def rawPositive (n : ℕ) : AddSubmonoid (rawGroup L n) := + (L.positive n).prod ((L.positive n).prod (L.positive (n+1))) + +def positive : (n : ℕ) → AddSubmonoid (group L n) + | 0 => (rawPositive L 0).comap (zeroGroup L).subtype + | n+1 => rawPositive L (n+1) + +/-- The path complex has the exact signed differential of the right tensor. -/ +abbrev complex : DirectedComplex.{0} where + group := group L + differential := differential L + differential_squared := differential_squared L + augmentation := augmentation L + augmentation_differential x := L.augmentation_differential x.1 + positive := positive L + +variable {L} {K : DirectedComplex.{0}} + +/-- The two endpoint restrictions of an arbitrary chain-cylinder map. -/ +def endpoint (f : Hom (rightCylinder K) L) (a : Bool) : Hom K L := + Hom.comp (RightCylinder.endpoint K a) f + +/-- Evaluation on the shifted interval summand. -/ +def shifted (f : Hom (rightCylinder K) L) (n : ℕ) : K.group n →+ L.group (n+1) where + toFun x := f.app (n+1) (0, 0, x) + map_zero' := map_zero _ + map_add' x y := by + rw [← map_add] + congr 1 + ext <;> simp + +theorem apply_zero (f : Hom (rightCylinder K) L) (x : (rightCylinder K).group 0) : + f.app 0 x = (endpoint f false).app 0 x.1 + (endpoint f true).app 0 x.2 := by + change f.app 0 x = f.app 0 (x.1, 0) + f.app 0 (0, x.2) + rw [← map_add] + congr 1 + ext <;> simp + +theorem apply_succ (f : Hom (rightCylinder K) L) (n : ℕ) + (x : (rightCylinder K).group (n+1)) : + f.app (n+1) x = (endpoint f false).app (n+1) x.1 + + (endpoint f true).app (n+1) x.2.1 + shifted f n x.2.2 := by + dsimp only [endpoint, Hom.comp, RightCylinder.endpoint, RightCylinder.endpointMap, + AddMonoidHom.comp_apply, shifted] + change f.app (n+1) x = f.app (n+1) (x.1, 0, 0) + + f.app (n+1) (0, x.2.1, 0) + f.app (n+1) (0, 0, x.2.2) + rw [← map_add, ← map_add] + congr 1 + ext <;> simp + +theorem shifted_differential_zero (f : Hom (rightCylinder K) L) (x : K.group 0) : + L.differential 0 (shifted f 0 x) = + (endpoint f true).app 0 x - (endpoint f false).app 0 x := by + have h := f.differential 0 (0, 0, x) + rw [apply_zero] at h + change (endpoint f false).app 0 (K.differential 0 0 - x) + + (endpoint f true).app 0 (K.differential 0 0 + x) = _ at h + simp only [map_zero, zero_sub, zero_add, map_neg] at h + exact h.symm.trans (by abel) + +theorem shifted_differential_succ (f : Hom (rightCylinder K) L) (n : ℕ) + (x : K.group (n+1)) : + L.differential (n+1) (shifted f (n+1) x) = + ((-1 : ℤ)^(n+1)) • ((endpoint f true).app (n+1) x - + (endpoint f false).app (n+1) x) + shifted f n (K.differential n x) := by + have h := f.differential (n+1) (0, 0, x) + rw [apply_succ] at h + change (endpoint f false).app (n+1) (K.differential (n+1) 0 - (((-1 : ℤ)^(n+1)) • x)) + + (endpoint f true).app (n+1) (K.differential (n+1) 0 + (((-1 : ℤ)^(n+1)) • x)) + + shifted f n (K.differential n x) = _ at h + simp only [map_zero, zero_sub, zero_add, map_neg, map_zsmul] at h + exact h.symm.trans (by rw [smul_sub]; abel) + +def curryRaw (f : Hom (rightCylinder K) L) (n : ℕ) : K.group n →+ rawGroup L n where + toFun x := ((endpoint f false).app n x, (endpoint f true).app n x, shifted f n x) + map_zero' := by simp + map_add' x y := by simp + +def curryApp (f : Hom (rightCylinder K) L) : (n : ℕ) → K.group n →+ (complex L).group n + | 0 => + { toFun := fun x => ⟨curryRaw f 0 x, shifted_differential_zero f x⟩ + map_zero' := Subtype.ext (map_zero _) + map_add' := fun x y => Subtype.ext (map_add _ x y) } + | n+1 => curryRaw f (n+1) + +/-- Currying is an actual positive augmented chain map into the path complex. -/ +def curry (f : Hom (rightCylinder K) L) : Hom K (complex L) where + app := curryApp f + differential n x := by + cases n with + | zero => + apply Subtype.ext + apply Prod.ext + · exact (endpoint f false).differential 0 x + · apply Prod.ext + · exact (endpoint f true).differential 0 x + · change shifted f 0 (K.differential 0 x) = + L.differential 1 (shifted f 1 x) - ((-1 : ℤ)^1) • + ((endpoint f true).app 1 x - (endpoint f false).app 1 x) + rw [shifted_differential_succ] + abel + | succ n => + apply Prod.ext + · exact (endpoint f false).differential (n+1) x + · apply Prod.ext + · exact (endpoint f true).differential (n+1) x + · change shifted f (n+1) (K.differential (n+1) x) = + L.differential (n+2) (shifted f (n+2) x) - ((-1 : ℤ)^(n+2)) • + ((endpoint f true).app (n+2) x - (endpoint f false).app (n+2) x) + rw [shifted_differential_succ] + abel + augmentation x := (endpoint f false).augmentation x + positive n x hx := by + have hs := (endpoint f false).positive n hx + have ht := (endpoint f true).positive n hx + have he : shifted f n x ∈ L.positive (n+1) := by + change f.app (n+1) (0, 0, x) ∈ L.positive (n+1) + exact f.positive (n+1) (x := (0, 0, x)) ⟨(K.positive (n+1)).zero_mem, + (K.positive (n+1)).zero_mem, hx⟩ + cases n <;> exact ⟨hs, ht, he⟩ + +end + +end Thomason.Construction.DirectedComplex.RightPath + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderRetractions.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderRetractions.lean new file mode 100644 index 0000000000000000000000000000000000000000..866ab1b0d94800953f293a469a426f86f3f40d59 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PastingGlobeCylinderRetractions.lean @@ -0,0 +1,970 @@ +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderAtoms +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderPath + +namespace OAI + +section + +/-! # Right cylinders preserve the actual pasted-globe chain pushouts + +The explicit path-complex hom-set correspondence constructs the descended +positive chain map. The subsequent realization gluing is a separate claim; +no preservation of pushouts by realization is assumed here. +-/ + +namespace Thomason.Construction.DirectedComplex.RightPath + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +variable {K L : DirectedComplex.{0}} + +abbrev rawApp (f : Hom K (complex L)) : (n : ℕ) → K.group n →+ rawGroup L n + | 0 => (zeroGroup L).subtype.comp (f.app 0) + | n+1 => f.app (n+1) + +theorem rawApp_differential (f : Hom K (complex L)) (n : ℕ) (x : K.group (n+1)) : + rawApp f n (K.differential n x) = rawDifferential L n (rawApp f (n+1) x) := by + cases n with + | zero => exact congrArg Subtype.val (f.differential 0 x) + | succ n => exact f.differential (n+1) x + +def firstApp (f : Hom K (complex L)) (n : ℕ) : K.group n →+ L.group n where + toFun x := (rawApp f n x).1 + map_zero' := congrArg Prod.fst (map_zero (rawApp f n)) + map_add' x y := congrArg Prod.fst (map_add (rawApp f n) x y) + +def secondApp (f : Hom K (complex L)) (n : ℕ) : K.group n →+ L.group n where + toFun x := (rawApp f n x).2.1 + map_zero' := congrArg (Prod.fst ∘ Prod.snd) (map_zero (rawApp f n)) + map_add' x y := congrArg (Prod.fst ∘ Prod.snd) (map_add (rawApp f n) x y) + +def shiftedFrom (f : Hom K (complex L)) (n : ℕ) : K.group n →+ L.group (n+1) where + toFun x := (rawApp f n x).2.2 + map_zero' := congrArg (Prod.snd ∘ Prod.snd) (map_zero (rawApp f n)) + map_add' x y := congrArg (Prod.snd ∘ Prod.snd) (map_add (rawApp f n) x y) + +def first (f : Hom K (complex L)) : Hom K L where + app := firstApp f + differential n x := congrArg Prod.fst (rawApp_differential f n x) + augmentation x := f.augmentation x + positive n x hx := by + have h := f.positive n hx + cases n <;> exact h.1 + +def second (f : Hom K (complex L)) : Hom K L where + app := secondApp f + differential n x := congrArg (Prod.fst ∘ Prod.snd) (rawApp_differential f n x) + augmentation x := by + have h := congrArg L.augmentation (f.app 0 x).property + change L.augmentation (L.differential 0 (shiftedFrom f 0 x)) = + L.augmentation (secondApp f 0 x - firstApp f 0 x) at h + rw [L.augmentation_differential, map_sub] at h + exact (sub_eq_zero.mp h.symm).trans (f.augmentation x) + positive n x hx := by + have h := f.positive n hx + cases n <;> exact h.2.1 + +theorem shiftedFrom_positive (f : Hom K (complex L)) (n : ℕ) {x : K.group n} + (hx : x ∈ K.positive n) : shiftedFrom f n x ∈ L.positive (n+1) := by + have h := f.positive n hx + cases n <;> exact h.2.2 + +theorem shiftedFrom_differential_zero (f : Hom K (complex L)) (x : K.group 0) : + L.differential 0 (shiftedFrom f 0 x) = (second f).app 0 x - (first f).app 0 x := + (f.app 0 x).property + +theorem shiftedFrom_differential_succ (f : Hom K (complex L)) (n : ℕ) + (x : K.group (n+1)) : + L.differential (n+1) (shiftedFrom f (n+1) x) = + ((-1 : ℤ)^(n+1)) • ((second f).app (n+1) x - (first f).app (n+1) x) + + shiftedFrom f n (K.differential n x) := by + have h := congrArg (Prod.snd ∘ Prod.snd) (rawApp_differential f n x) + change shiftedFrom f n (K.differential n x) = + L.differential (n+1) (shiftedFrom f (n+1) x) - + ((-1 : ℤ)^(n+1)) • ((second f).app (n+1) x - (first f).app (n+1) x) at h + exact (eq_sub_iff_add_eq.mp h).symm.trans (add_comm _ _) + +def uncurryApp (f : Hom K (complex L)) : + (n : ℕ) → (rightCylinder K).group n →+ L.group n + | 0 => + { toFun := fun x => (first f).app 0 x.1 + (second f).app 0 x.2 + map_zero' := by simp + map_add' := by intros; simp; abel } + | n+1 => + { toFun := fun x => (first f).app (n+1) x.1 + (second f).app (n+1) x.2.1 + + shiftedFrom f n x.2.2 + map_zero' := by simp + map_add' := by intros; simp; abel } + +/-- Uncurrying preserves positivity, augmentation, and the signed differential. -/ +def uncurry (f : Hom K (complex L)) : Hom (rightCylinder K) L where + app := uncurryApp f + differential n x := by + cases n with + | zero => + change (first f).app 0 (K.differential 0 x.1 - x.2.2) + + (second f).app 0 (K.differential 0 x.2.1 + x.2.2) = + L.differential 0 ((first f).app 1 x.1 + (second f).app 1 x.2.1 + shiftedFrom f 0 x.2.2) + rw [map_sub, map_add, map_add, map_add, (first f).differential, + (second f).differential, shiftedFrom_differential_zero] + abel + | succ n => + change (first f).app (n+1) (K.differential (n+1) x.1 - ((-1 : ℤ)^(n+1)) • x.2.2) + + (second f).app (n+1) (K.differential (n+1) x.2.1 + ((-1 : ℤ)^(n+1)) • x.2.2) + + shiftedFrom f n (K.differential n x.2.2) = + L.differential (n+1) ((first f).app (n+2) x.1 + (second f).app (n+2) x.2.1 + + shiftedFrom f (n+1) x.2.2) + rw [map_sub, map_add, map_zsmul, map_zsmul, map_add, map_add, + (first f).differential, (second f).differential, shiftedFrom_differential_succ] + rw [smul_sub] + abel + augmentation x := by + change L.augmentation ((first f).app 0 x.1 + (second f).app 0 x.2) = + K.augmentation x.1 + K.augmentation x.2 + rw [map_add, (first f).augmentation, (second f).augmentation] + positive n x hx := by + cases n with + | zero => exact (L.positive 0).add_mem ((first f).positive 0 hx.1) ((second f).positive 0 hx.2) + | succ n => + exact (L.positive (n+1)).add_mem + ((L.positive (n+1)).add_mem ((first f).positive (n+1) hx.1) + ((second f).positive (n+1) hx.2.1)) (shiftedFrom_positive f n hx.2.2) + +theorem uncurry_curry (f : Hom (rightCylinder K) L) : uncurry (curry f) = f := by + apply Hom.ext_app + intro n x + cases n with + | zero => exact (apply_zero f x).symm + | succ n => + cases n with + | zero => exact (apply_succ f 0 x).symm + | succ n => exact (apply_succ f (n+1) x).symm + +theorem curry_uncurry (f : Hom K (complex L)) : curry (uncurry f) = f := by + apply Hom.ext_app + intro n x + cases n with + | zero => + apply Subtype.ext + apply Prod.ext + · change (first f).app 0 x + (second f).app 0 0 = _ + simp only [map_zero, add_zero] + rfl + · apply Prod.ext + · change (first f).app 0 0 + (second f).app 0 x = _ + simp only [map_zero, zero_add] + rfl + · change (first f).app 1 0 + (second f).app 1 0 + shiftedFrom f 0 x = _ + simp only [map_zero, zero_add] + rfl + | succ n => + apply Prod.ext + · change (first f).app (n+1) x + (second f).app (n+1) 0 + shiftedFrom f n 0 = _ + simp only [map_zero, add_zero] + rfl + · apply Prod.ext + · change (first f).app (n+1) 0 + (second f).app (n+1) x + shiftedFrom f n 0 = _ + simp only [map_zero, zero_add, add_zero] + rfl + · change (first f).app (n+2) 0 + (second f).app (n+2) 0 + shiftedFrom f (n+1) x = _ + simp only [map_zero, zero_add] + rfl + +/-- The actual hom-set correspondence for the right interval chain tensor. -/ +def homEquiv : Hom (rightCylinder K) L ≃ Hom K (complex L) where + toFun := curry + invFun := uncurry + left_inv := uncurry_curry + right_inv := curry_uncurry + +theorem curry_naturality {A : DirectedComplex.{0}} (g : Hom A K) + (f : Hom (rightCylinder K) L) : + curry (Hom.comp (RightCylinder.map g) f) = Hom.comp g (curry f) := by + apply Hom.ext_app + intro n x + cases n with + | zero => + apply Subtype.ext + apply Prod.ext + · change f.app 0 (g.app 0 x, g.app 0 0) = f.app 0 (g.app 0 x, 0) + rw [map_zero] + · apply Prod.ext + · change f.app 0 (g.app 0 0, g.app 0 x) = f.app 0 (0, g.app 0 x) + rw [map_zero] + · change f.app 1 (g.app 1 0, g.app 1 0, g.app 0 x) = _ + simp only [map_zero] + rfl + | succ n => + apply Prod.ext + · change f.app (n+1) (g.app (n+1) x, g.app (n+1) 0, g.app n 0) = _ + simp only [map_zero] + rfl + · apply Prod.ext + · change f.app (n+1) (g.app (n+1) 0, g.app (n+1) x, g.app n 0) = _ + simp only [map_zero] + rfl + · change f.app (n+2) (g.app (n+2) 0, g.app (n+2) 0, g.app (n+1) x) = _ + simp only [map_zero] + rfl + + +theorem uncurry_naturality {A : DirectedComplex.{0}} (g : Hom A K) + (f : Hom K (complex L)) : + uncurry (Hom.comp g f) = Hom.comp (RightCylinder.map g) (uncurry f) := by + apply (homEquiv (K := A) (L := L)).injective + change curry (uncurry (Hom.comp g f)) = curry (Hom.comp (RightCylinder.map g) (uncurry f)) + rw [curry_uncurry, curry_naturality, curry_uncurry] + +/-- The positive path-complex correspondence gives an actual chain pushout +of right cylinders, with the prescribed four maps. -/ +theorem rightCylinder_isPushout {A B C P : DirectedComplex.{0}} + {i : A ⟶ B} {j : A ⟶ C} {l : B ⟶ P} {r : C ⟶ P} + (hP : IsPushout i j l r) : + IsPushout (C := DirectedComplex.{0}) (RightCylinder.map i) (RightCylinder.map j) + (RightCylinder.map l) (RightCylinder.map r) := by + have hw : rightCylinderFunctor.map i ≫ rightCylinderFunctor.map l = + rightCylinderFunctor.map j ≫ rightCylinderFunctor.map r := by + simpa only [rightCylinderFunctor.map_comp] using congrArg rightCylinderFunctor.map hP.w + let d (s : PushoutCocone (C := DirectedComplex.{0}) (RightCylinder.map i) (RightCylinder.map j)) := + uncurry (hP.desc (curry s.inl) (curry s.inr) (by + change Hom.comp i (curry s.inl) = Hom.comp j (curry s.inr) + rw [← curry_naturality, ← curry_naturality] + exact congrArg curry s.condition)) + apply IsPushout.of_isColimit (PushoutCocone.IsColimit.mk hw d ?_ ?_ ?_) + · intro s + dsimp only [d] + change Hom.comp (RightCylinder.map l) (uncurry _) = s.inl + rw [← uncurry_naturality] + change uncurry (l ≫ hP.desc _ _ _) = s.inl + rw [hP.inl_desc, uncurry_curry] + · intro s + dsimp only [d] + change Hom.comp (RightCylinder.map r) (uncurry _) = s.inr + rw [← uncurry_naturality] + change uncurry (r ≫ hP.desc _ _ _) = s.inr + rw [hP.inr_desc, uncurry_curry] + · intro s m hl hr + apply (homEquiv (K := P) (L := s.pt)).injective + change curry m = curry (d s) + dsimp only [d] + rw [curry_uncurry] + apply hP.hom_ext + · have he : Hom.comp l (curry m) = curry s.inl := + (curry_naturality l m).symm.trans (congrArg curry hl) + exact he.trans (hP.inl_desc _ _ _).symm + · have he : Hom.comp r (curry m) = curry s.inr := + (curry_naturality r m).symm.trans (congrArg curry hr) + exact he.trans (hP.inr_desc _ _ _).symm + +end + +end Thomason.Construction.DirectedComplex.RightPath + + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +/-- The actual positive chain presentation of the pasted-globe cylinder +is a pushout of the two globe-cylinder chain presentations. -/ +theorem rightCylinder_abelianization_isPushout (n m k : ℕ) : + IsPushout (C := DirectedComplex.{0}) + (RightCylinder.map (Abelianization.map (Globe.faceMap true k n))) + (RightCylinder.map (Abelianization.map (Globe.faceMap false k m))) + (RightCylinder.map (Abelianization.map (left n m k))) + (RightCylinder.map (Abelianization.map (right n m k))) := + RightPath.rightCylinder_isPushout (abelianization_isPushout n m k) + +end Thomason.Construction.StrictOmegaCategory.PastingGlobe + +end + +section + +/-! # Free coordinates for the actual finite cylinder complex + +The two endpoint factors and the mixed factor give a literal additive +equivalence to finitely supported functions on the formal tensor basis. +This supplies the coordinates needed by finite atom decomposition. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +private def zeroEquiv (n k : ℕ) : + Basis n k 0 ≃ Bool × PastingGlobeBasis.Basis n k 0 where + toFun + | .endpoint a b => (a, b) + invFun b := .endpoint b.1 b.2 + left_inv b := by cases b; rfl + right_inv b := by cases b; rfl + +private def succEquiv (n k p : ℕ) : Basis n k (p+1) ≃ + (Bool × PastingGlobeBasis.Basis n k (p+1)) ⊕ PastingGlobeBasis.Basis n k p where + toFun + | .endpoint a b => Sum.inl (a, b) + | .mixed b => Sum.inr b + invFun + | Sum.inl b => .endpoint b.1 b.2 + | Sum.inr b => .mixed b + left_inv b := by cases b <;> rfl + right_inv b := by cases b with + | inl b => cases b; rfl + | inr b => rfl + +instance finiteBasis (n k p : ℕ) : Finite (Basis n k p) := by + cases p with + | zero => exact Finite.of_equiv _ (zeroEquiv n k).symm + | succ p => exact Finite.of_equiv _ (succEquiv n k p).symm + +instance fintypeBasis (n k p : ℕ) : Fintype (Basis n k p) := Fintype.ofFinite _ + +/-- Every literal coefficient is an additive map. -/ +def coefficientHom {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + (Cylinder hkn).group p →+ ℤ where + toFun := coefficient hkn b + map_zero' := by + cases p with + | zero => cases b with | endpoint a b => cases a <;> rfl + | succ p => + cases b with + | endpoint a b => cases a <;> rfl + | mixed b => rfl + map_add' x y := by + cases p with + | zero => cases b with | endpoint a b => cases a <;> rfl + | succ p => + cases b with + | endpoint a b => cases a <;> rfl + | mixed b => rfl + +/-- The finitely supported coordinate function of an actual cylinder chain. -/ +def toFinsupp {n k p : ℕ} (hkn : k < n) (x : (Cylinder hkn).group p) : + Basis n k p →₀ ℤ := + Finsupp.equivFunOnFinite.symm (fun b => coefficient hkn b x) + +@[simp] theorem toFinsupp_apply {n k p : ℕ} (hkn : k < n) + (x : (Cylinder hkn).group p) (b : Basis n k p) : + toFinsupp hkn x b = coefficient hkn b x := by simp [toFinsupp] + +/-- Reassemble a chain from its finite basis coefficients. -/ +def fromFinsupp {n k p : ℕ} (hkn : k < n) : + (Basis n k p →₀ ℤ) →ₗ[ℤ] (Cylinder hkn).group p := + Finsupp.linearCombination ℤ (vector hkn) + +@[simp] theorem fromFinsupp_single {n k p : ℕ} (hkn : k < n) + (b : Basis n k p) (z : ℤ) : + fromFinsupp hkn (Finsupp.single b z) = z • vector hkn b := by simp [fromFinsupp] + +/-- Reassembly recovers each coefficient exactly. -/ +theorem coefficient_fromFinsupp {n k p : ℕ} (hkn : k < n) + (b : Basis n k p) (u : Basis n k p →₀ ℤ) : + coefficient hkn b (fromFinsupp hkn u) = u b := by + classical + change coefficientHom hkn b (fromFinsupp hkn u) = u b + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single c z => + rw [fromFinsupp_single, map_zsmul] + change z • coefficient hkn b (vector hkn c) = _ + rw [coefficient_vector] + by_cases hbc : b = c + · subst c + simp + · simp [hbc] + +/-- Literal free coordinates on every degree of the actual right cylinder. -/ +def coordinateEquiv {n k p : ℕ} (hkn : k < n) : + (Cylinder hkn).group p ≃+ (Basis n k p →₀ ℤ) where + toFun := toFinsupp hkn + invFun := fromFinsupp hkn + left_inv x := by + apply coefficient_ext hkn + intro b + rw [coefficient_fromFinsupp, toFinsupp_apply] + right_inv u := by + ext b + rw [toFinsupp_apply, coefficient_fromFinsupp] + map_add' x y := by + ext b + exact (coefficientHom hkn b).map_add x y + +/-- The coordinate equivalence identifies the actual positive cone. -/ +theorem coordinateEquiv_positive_iff {n k p : ℕ} (hkn : k < n) + (x : (Cylinder hkn).group p) : + x ∈ (Cylinder hkn).positive p ↔ ∀ b, 0 ≤ coordinateEquiv hkn x b := + positive_iff hkn x + +/-- Every degree-zero basis vector has augmentation one. -/ +theorem augmentation_vector {n k : ℕ} (hkn : k < n) (b : Basis n k 0) : + (Cylinder hkn).augmentation (vector hkn b) = 1 := by + cases b with + | endpoint a b => + change (Cylinder hkn).augmentation + ((RightCylinder.endpoint (PastingGlobeBasis.complex n k hkn) a).app 0 + (Finsupp.single b 1)) = 1 + exact ((RightCylinder.endpoint (PastingGlobeBasis.complex n k hkn) a).augmentation + (show (PastingGlobeBasis.complex n k hkn).group 0 from Finsupp.single b 1)).trans + (PastingGlobeBasis.weight_single b 1) + +/-- Augmentation is the sum of all degree-zero coordinates. -/ +theorem augmentation_fromFinsupp {n k : ℕ} (hkn : k < n) (u : Basis n k 0 →₀ ℤ) : + (Cylinder hkn).augmentation (fromFinsupp hkn u) = + Finsupp.linearCombination ℤ (fun _ : Basis n k 0 => (1 : ℤ)) u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + rw [fromFinsupp_single, map_zsmul, augmentation_vector] + simp + +/-- The exact augmentation formula in free coordinates. -/ +theorem augmentation_coordinate {n k : ℕ} (hkn : k < n) (x : (Cylinder hkn).group 0) : + (Cylinder hkn).augmentation x = + (coordinateEquiv hkn x).sum (fun _ z => z) := by + have he := (coordinateEquiv hkn).left_inv x + calc + _ = (Cylinder hkn).augmentation (fromFinsupp hkn (coordinateEquiv hkn x)) := + congrArg (Cylinder hkn).augmentation he.symm + _ = _ := by + rw [augmentation_fromFinsupp, Finsupp.linearCombination_apply] + simp + + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Ordered disjointness of the literal cylinder atoms + +The signed differential height propagates down every atom table. Thus +increasingly ordered atoms have disjoint negative and positive lower rows, +which is the exact input needed for finite strict decomposition. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex +open scoped BigOperators + +noncomputable section + +private theorem coefficient_differential_fromFinsupp {n k p : ℕ} (hkn : k < n) + (c : Basis n k p) (u : Basis n k (p+1) →₀ ℤ) : + coefficient hkn c ((Cylinder hkn).differential p (fromFinsupp hkn u)) = + Finsupp.linearCombination ℤ + (fun b => coefficient hkn c ((Cylinder hkn).differential p (vector hkn b))) u := by + change coefficientHom hkn c ((Cylinder hkn).differential p (fromFinsupp hkn u)) = _ + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + rw [fromFinsupp_single, map_zsmul, map_zsmul] + simp only [Finsupp.linearCombination_single] + rfl + +/-- Every boundary coefficient is the finite sum of its basis incidences. -/ +theorem differential_coefficient_sum {n k p : ℕ} (hkn : k < n) + (x : (Cylinder hkn).group (p+1)) (c : Basis n k p) : + coefficient hkn c ((Cylinder hkn).differential p x) = + ∑ b ∈ (coordinateEquiv hkn x).support, + coordinateEquiv hkn x b * + coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) := by + calc + _ = coefficient hkn c ((Cylinder hkn).differential p + (fromFinsupp hkn (coordinateEquiv hkn x))) := + congrArg (fun z => coefficient hkn c ((Cylinder hkn).differential p z)) + ((coordinateEquiv hkn).left_inv x).symm + _ = _ := by + rw [coefficient_differential_fromFinsupp, Finsupp.linearCombination_apply] + simp only [Finsupp.sum, smul_eq_mul] + +/-- A negative coefficient has an actual negative incidence in its support. -/ +theorem negative_boundary_witness {n k p : ℕ} (hkn : k < n) + (x : (Cylinder hkn).group (p+1)) (hx : x ∈ (Cylinder hkn).positive (p+1)) + (c : Basis n k p) (hc : coefficient hkn c ((Cylinder hkn).differential p x) < 0) : + ∃ b ∈ (coordinateEquiv hkn x).support, + coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) < 0 := by + classical + by_contra hn + have hs : 0 ≤ ∑ b ∈ (coordinateEquiv hkn x).support, + coordinateEquiv hkn x b * + coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) := by + apply Finset.sum_nonneg + intro b hb + apply mul_nonneg ((coordinateEquiv_positive_iff hkn x).mp hx b) + exact le_of_not_gt (fun h => hn ⟨b, hb, h⟩) + rw [← differential_coefficient_sum] at hs + omega + +/-- A positive coefficient has an actual positive incidence in its support. -/ +theorem positive_boundary_witness {n k p : ℕ} (hkn : k < n) + (x : (Cylinder hkn).group (p+1)) (hx : x ∈ (Cylinder hkn).positive (p+1)) + (c : Basis n k p) (hc : 0 < coefficient hkn c ((Cylinder hkn).differential p x)) : + ∃ b ∈ (coordinateEquiv hkn x).support, + 0 < coefficient hkn c ((Cylinder hkn).differential p (vector hkn b)) := by + classical + by_contra hn + have hs : (∑ b ∈ (coordinateEquiv hkn x).support, + coordinateEquiv hkn x b * + coefficient hkn c ((Cylinder hkn).differential p (vector hkn b))) ≤ 0 := by + apply Finset.sum_nonpos + intro b hb + apply mul_nonpos_of_nonneg_of_nonpos ((coordinateEquiv_positive_iff hkn x).mp hx b) + exact le_of_not_gt (fun h => hn ⟨b, hb, h⟩) + rw [← differential_coefficient_sum] at hs + omega + +/-- Weak side-height bounds, including the top degree. -/ +theorem atom_side_bounds {n k p : ℕ} (hkn : k < n) (b : Basis n k p) + (a : Bool) (q : ℕ) (hqp : q ≤ p) (c : Basis n k q) + (hc : coefficient hkn c ((atom hkn b).table a q) ≠ 0) : + if a then height b ≤ height c else height c ≤ height b := by + induction hqp using Nat.decreasingInduction with + | self => + have hcb : c = b := by + rw [atom_top, coefficient_vector] at hc + by_contra h + simp [h] at hc + subst c + cases a <;> exact le_rfl + | of_succ q hq ih => + have hs := atom_signed_table hkn b hq a c + cases a with + | false => + have hd : coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table false (q+1))) < 0 := by + rw [hs] at hc + change max 0 (-coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table false (q+1)))) ≠ 0 at hc + omega + obtain ⟨d, hmem, hd⟩ := negative_boundary_witness hkn _ + ((atom hkn b).positive false (q+1)) c hd + have hdi : coefficient hkn d ((atom hkn b).table false (q+1)) ≠ 0 := + Finsupp.mem_support_iff.mp hmem + exact (differential_height hkn false d c hd).le.trans (ih d hdi) + | true => + have hd : 0 < coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table true (q+1))) := by + rw [hs] at hc + change max 0 (coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table true (q+1)))) ≠ 0 at hc + omega + obtain ⟨d, hmem, hd⟩ := positive_boundary_witness hkn _ + ((atom hkn b).positive true (q+1)) c hd + have hdi : coefficient hkn d ((atom hkn b).table true (q+1)) ≠ 0 := + Finsupp.mem_support_iff.mp hmem + exact (ih d hdi).trans (differential_height hkn true d c hd).le + +/-- Below the top degree the side-height bounds are strict. -/ +theorem atom_side_height {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (a : Bool) (hqp : q < p) (c : Basis n k q) + (hc : coefficient hkn c ((atom hkn b).table a q) ≠ 0) : + if a then height b < height c else height c < height b := by + have hs := atom_signed_table hkn b hqp a c + cases a with + | false => + have hd : coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table false (q+1))) < 0 := by + rw [hs] at hc + change max 0 (-coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table false (q+1)))) ≠ 0 at hc + omega + obtain ⟨d, hmem, hd⟩ := negative_boundary_witness hkn _ + ((atom hkn b).positive false (q+1)) c hd + exact (differential_height hkn false d c hd).trans_le + (atom_side_bounds hkn b false (q+1) hqp d (Finsupp.mem_support_iff.mp hmem)) + | true => + have hd : 0 < coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table true (q+1))) := by + rw [hs] at hc + change max 0 (coefficient hkn c + ((Cylinder hkn).differential q ((atom hkn b).table true (q+1)))) ≠ 0 at hc + omega + obtain ⟨d, hmem, hd⟩ := positive_boundary_witness hkn _ + ((atom hkn b).positive true (q+1)) c hd + exact (atom_side_bounds hkn b true (q+1) hqp d (Finsupp.mem_support_iff.mp hmem)).trans_lt + (differential_height hkn true d c hd) + +/-- Increasingly ordered actual atoms have disjoint lower signed supports. -/ +theorem ordered_atoms_disjoint {n k p q r : ℕ} (hkn : k < n) + (b : Basis n k p) (c : Basis n k q) (hrp : r < p) (hrq : r < q) + (hbc : height b ≤ height c) (e : Basis n k r) : + coefficient hkn e ((atom hkn b).table false r) = 0 ∨ + coefficient hkn e ((atom hkn c).table true r) = 0 := by + by_cases hb : coefficient hkn e ((atom hkn b).table false r) = 0 + · exact Or.inl hb + · right + by_contra hc + have hbe := atom_side_height hkn b false hrp e hb + have hec := atom_side_height hkn c true hrq e hc + exact (not_lt_of_ge hbc) (hec.trans hbe) + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Generation of the actual pasted-globe right cylinder + +The literal endpoint and prism atoms satisfy the ordered coefficient +interface. Thus all positive cells of this finite cylinder are strict +composites of the constructed atoms. No colimit property of realization +is used in this argument. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- The concrete ordered atom data of two equal globes pasted along a face. -/ +def orderedAtomBasis {n k : ℕ} (hkn : k < n) : OrderedAtomBasis (Cylinder hkn) where + Index := Basis n k + coordinates _ := coordinateEquiv hkn + positive_iff _ := coordinateEquiv_positive_iff hkn + augmentation := augmentation_coordinate hkn + atom _ := atom hkn + atom_top _ b a := by + ext c + change coefficient hkn c ((atom hkn b).table a _) = Finsupp.single b 1 c + rw [atom_top, coefficient_vector] + simp [Finsupp.single_apply, eq_comm] + atom_above _ b _ h a := + Cell.table_zero_of_dimensionLE (atom_dimension hkn b) h a + height _ := height + disjoint b c hrp hrq hbc e := ordered_atoms_disjoint hkn b c hrp hrq hbc e + +/-- Endpoint atoms and mixed prism atoms composition-generate this cylinder. -/ +theorem generated {n k : ℕ} (hkn : k < n) (P : Cell (Cylinder hkn) → Prop) + (hatom : ∀ p (b : Basis n k p), P (atom hkn b)) + (hcomp : ∀ r x y hxy, P x → P y → P (Cell.comp x y r hxy)) : + ∀ X, P X := + (orderedAtomBasis hkn).generated P hatom hcomp + +/-- Strict maps out of the cylinder are determined by its explicit atoms. -/ +theorem hom_ext {n k : ℕ} (hkn : k < n) {D : StrictOmegaCategory} + (F G : (Cylinder hkn).realization ⟶ D) + (he : ∀ p (b : Basis n k p), F.toFun (atom hkn b) = G.toFun (atom hkn b)) : + F = G := + (orderedAtomBasis hkn).hom_ext F G he + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Joint epimorphy of the actual cylinder pieces + +Every constructed endpoint or mixed atom lies in one of the two globe +cylinders. Generation therefore proves uniqueness of a strict glued map. +This result does not assert existence of such a glued map. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Each original globe gives its actual positive-table cylinder inclusion. -/ +def sideMap {n k : ℕ} (hkn : k < n) (s : Bool) : + (rightCylinder (DirectedGlobeComplex.complex n)).realization ⟶ + (Cylinder hkn).realization := + (RightCylinder.map (PastingGlobeBasis.inclusion hkn s)).realization + +private theorem endpoint_cell_naturality {K L : DirectedComplex.{0}} + (f : Hom K L) (a : Bool) (x : Cell K) : + Cell.map (RightCylinder.map f) (Cell.map (RightCylinder.endpoint K a) x) = + Cell.map (RightCylinder.endpoint L a) (Cell.map f x) := by + apply Cell.ext + funext b p + exact RightCylinder.map_endpoint f a p (x.table b p) + +/-- Every literal atom is in the image of a globe-cylinder inclusion. -/ +theorem atom_in_side {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + ∃ (s : Bool) (x : Cell (rightCylinder (DirectedGlobeComplex.complex n))), + (sideMap hkn s).toFun x = atom hkn b := by + cases b with + | endpoint a b => + refine ⟨b.val.1, Cell.map (RightCylinder.endpoint _ a) + ((DirectedGlobeComplex.topCell n).face b.val.2 p), ?_⟩ + exact endpoint_cell_naturality (PastingGlobeBasis.inclusion hkn b.val.1) a _ + | @mixed r b => + refine ⟨b.val.1, RightCylinder.prism + ((DirectedGlobeComplex.topCell n).face b.val.2 r), ?_⟩ + exact RightCylinder.prism_naturality (PastingGlobeBasis.inclusion hkn b.val.1) _ + +/-- Agreement on both cylinder pieces forces equality on their target. -/ +theorem sideMap_joint_epi {n k : ℕ} (hkn : k < n) {D : StrictOmegaCategory} + (F G : (Cylinder hkn).realization ⟶ D) + (he : ∀ s, sideMap hkn s ≫ F = sideMap hkn s ≫ G) : F = G := by + apply hom_ext hkn + intro p b + obtain ⟨s, x, hx⟩ := atom_in_side hkn b + have hh := congrArg (fun H => H.toFun x) (he s) + change F.toFun ((sideMap hkn s).toFun x) = + G.toFun ((sideMap hkn s).toFun x) at hh + simpa only [hx] using hh + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # The explicit pasted-cylinder basis compares to the actual chain model + +The comparison respects the two globe inclusions. In particular the two +pieces jointly detect strict maps out of the actual chain-model cylinder. +No existence assertion for gluing is made here. +-/ + +namespace Thomason.Construction.PastingGlobeCylinderBasis + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex StrictOmegaCategory + +noncomputable section + +private abbrev pasted (n k : ℕ) := StrictOmegaCategory.PastingGlobe.category n n k + +private def piece {n k : ℕ} (s : Bool) : StrictOmegaCategory.Globe.category n ⟶ pasted n k := + if s then StrictOmegaCategory.PastingGlobe.right n n k + else StrictOmegaCategory.PastingGlobe.left n n k + +/-- The chain comparison respects either specified globe inclusion. -/ +theorem abelianization_piece {n k : ℕ} (hkn : k < n) (s : Bool) : + StrictOmegaCategory.Abelianization.functor.map (piece (n := n) (k := k) s) ≫ + (PastingGlobeBasis.abelianizationIso hkn).hom = + (DirectedGlobeComplex.abelianizationIso n).hom ≫ PastingGlobeBasis.inclusion hkn s := by + let f' : Globe.category n ⟶ PastingGlobe.category n n k := piece s + let a : Abelianization.functor.obj (Globe.category n) ⟶ + PastingGlobeBasis.complex n k hkn := + (DirectedGlobeComplex.abelianizationIso n).hom ≫ PastingGlobeBasis.inclusion hkn s + let b : Abelianization.functor.obj (PastingGlobe.category n n k) ⟶ + PastingGlobeBasis.complex n k hkn := (PastingGlobeBasis.abelianizationIso hkn).hom + change Abelianization.functor.map f' ≫ b = a + apply (StrictOmegaCategory.Abelianization.adjunction.homEquiv _ _).injective + rw [StrictOmegaCategory.Abelianization.adjunction.homEquiv_naturality_left] + change piece s ≫ (StrictOmegaCategory.Abelianization.unit _ ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting hkn)).realization) = + (StrictOmegaCategory.Abelianization.unit _ ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization) ≫ + (PastingGlobeBasis.inclusion hkn s).realization + have hp : Abelianization.unit (pasted n k) ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting hkn)).realization = + PastingGlobeBasis.fromPasting hkn := Abelianization.unit_evaluate _ + have hg : Abelianization.unit (Globe.category n) ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization = + DirectedGlobeComplex.fromGlobe n := Abelianization.unit_evaluate _ + rw [hp, hg] + apply StrictOmegaCategory.Globe.hom_ext + cases s + · exact StrictOmegaCategory.PastingGlobe.desc_left _ _ _ _ _ _ + · exact StrictOmegaCategory.PastingGlobe.desc_right _ _ _ _ _ _ + +/-- Literal positive-table comparison for the full pasted-globe cylinder. -/ +def modelIso {n k : ℕ} (hkn : k < n) : + GrayChainExtension.model.obj (pasted n k) ≅ (Cylinder hkn).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso + (PastingGlobeBasis.abelianizationIso hkn) + +private def globeModelIso (n : ℕ) : + GrayChainExtension.model.obj (StrictOmegaCategory.Globe.category n) ≅ + (rightCylinder (DirectedGlobeComplex.complex n)).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso + (DirectedGlobeComplex.abelianizationIso n) + +/-- The full-cylinder isomorphism is compatible with each piece. -/ +theorem model_piece {n k : ℕ} (hkn : k < n) (s : Bool) : + GrayChainExtension.model.map (piece (n := n) (k := k) s) ≫ (modelIso hkn).hom = + (globeModelIso n).hom ≫ sideMap hkn s := by + let T := rightCylinderFunctor ⋙ realizationFunctor + exact (T.map_comp (Abelianization.functor.map (piece s)) + (PastingGlobeBasis.abelianizationIso hkn).hom).symm.trans + ((congrArg T.map (abelianization_piece hkn s)).trans + (T.map_comp (DirectedGlobeComplex.abelianizationIso n).hom + (PastingGlobeBasis.inclusion hkn s))) + +/-- Actual model-cylinder maps are determined by their restrictions to the +two actual globe cylinders. -/ +theorem model_joint_epi {n k : ℕ} (hkn : k < n) {D : StrictOmegaCategory} + (F G : GrayChainExtension.model.obj (pasted n k) ⟶ D) + (hl : GrayChainExtension.model.map (StrictOmegaCategory.PastingGlobe.left n n k) ≫ F = + GrayChainExtension.model.map (StrictOmegaCategory.PastingGlobe.left n n k) ≫ G) + (hr : GrayChainExtension.model.map (StrictOmegaCategory.PastingGlobe.right n n k) ≫ F = + GrayChainExtension.model.map (StrictOmegaCategory.PastingGlobe.right n n k) ≫ G) : F = G := by + suffices he : (modelIso hkn).inv ≫ F = (modelIso hkn).inv ≫ G by + have hh := congrArg (fun H => (modelIso hkn).hom ≫ H) he + simpa only [Iso.hom_inv_id_assoc] using hh + apply sideMap_joint_epi hkn + intro s + apply (cancel_epi (globeModelIso n).hom).mp + have hs := model_piece hkn s + have ht := congrArg (fun H => H ≫ (modelIso hkn).inv) hs + simp only [Category.assoc, Iso.hom_inv_id, Category.comp_id] at ht + simp only [← Category.assoc] at ht ⊢ + simp only [← ht] + cases s + · exact hl + · exact hr + +end + +end Thomason.Construction.PastingGlobeCylinderBasis + +end + +section + +/-! # Concrete retractions of the two pasted globe pieces + +Each half retracts from the pasted globes by collapsing the other half to +the shared face. The retractions agree after projection to the shared globe. +Their right-cylinder images provide exact split maps for the table-gluing +construction, without any preservation assertion for realization. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.PastingGlobe + +open CategoryTheory + +noncomputable section + +/-- Collapse a higher globe to the universal cell of a lower globe. -/ +def collapseTo (n k : ℕ) (hkn : k ≤ n) : Globe.category n ⟶ Globe.category k := + Globe.lift _ Globe.Cell.top + ((Globe.category k).dimensionLE_mono hkn (Globe.category_truncated k Globe.Cell.top)) + +@[simp] theorem collapseTo_top (n k : ℕ) (hkn : k ≤ n) : + (collapseTo n k hkn).toFun Globe.Cell.top = Globe.Cell.top := rfl + +/-- Retract the left half, collapsing the right half to the shared target face. -/ +def retractLeft (n m k : ℕ) (hkm : k ≤ m) : category n m k ⟶ Globe.category n := + desc _ Globe.Cell.top ((Globe.category n).face true k Globe.Cell.top) + (Globe.category_truncated n Globe.Cell.top) + ((Globe.category n).dimensionLE_mono hkm + ((Globe.category n).face_dimensionLE true k Globe.Cell.top)) + ((Globe.category n).face_face_same false true k Globe.Cell.top).symm + +/-- Retract the right half, collapsing the left half to the shared source face. -/ +def retractRight (n m k : ℕ) (hkn : k ≤ n) : category n m k ⟶ Globe.category m := + desc _ ((Globe.category m).face false k Globe.Cell.top) Globe.Cell.top + ((Globe.category m).dimensionLE_mono hkn + ((Globe.category m).face_dimensionLE false k Globe.Cell.top)) + (Globe.category_truncated m Globe.Cell.top) + ((Globe.category m).face_face_same true false k Globe.Cell.top) + +/-- The common projection remembers the entire shared k-globe. -/ +def retractCommon (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + category n m k ⟶ Globe.category k := + desc _ Globe.Cell.top Globe.Cell.top + ((Globe.category k).dimensionLE_mono hkn (Globe.category_truncated k Globe.Cell.top)) + ((Globe.category k).dimensionLE_mono hkm (Globe.category_truncated k Globe.Cell.top)) + ((Globe.category_truncated k Globe.Cell.top).2.trans + (Globe.category_truncated k Globe.Cell.top).1.symm) + +@[reassoc (attr := simp)] theorem left_retractLeft (n m k : ℕ) (hkm : k ≤ m) : + left n m k ≫ retractLeft n m k hkm = 𝟙 _ := by + apply Globe.hom_ext + exact desc_left _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem right_retractRight (n m k : ℕ) (hkn : k ≤ n) : + right n m k ≫ retractRight n m k hkn = 𝟙 _ := by + apply Globe.hom_ext + exact desc_right _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem right_retractLeft (n m k : ℕ) (hkm : k ≤ m) : + right n m k ≫ retractLeft n m k hkm = + collapseTo m k hkm ≫ Globe.faceMap true k n := by + apply Globe.hom_ext + exact desc_right _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem left_retractRight (n m k : ℕ) (hkn : k ≤ n) : + left n m k ≫ retractRight n m k hkn = + collapseTo n k hkn ≫ Globe.faceMap false k m := by + apply Globe.hom_ext + exact desc_left _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem left_retractCommon (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + left n m k ≫ retractCommon n m k hkn hkm = collapseTo n k hkn := by + apply Globe.hom_ext + exact desc_left _ _ _ _ _ _ + +@[reassoc (attr := simp)] theorem right_retractCommon (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + right n m k ≫ retractCommon n m k hkn hkm = collapseTo m k hkm := by + apply Globe.hom_ext + exact desc_right _ _ _ _ _ _ + +theorem collapseTo_face (n k : ℕ) (hkn : k ≤ n) (a : Bool) : + Globe.faceMap a k n ≫ collapseTo n k hkn = 𝟙 _ := by + apply Globe.hom_ext + change (collapseTo n k hkn).toFun ((Globe.category n).face a k Globe.Cell.top) = Globe.Cell.top + apply ((collapseTo n k hkn).map_face a k Globe.Cell.top).trans + cases a + · exact (Globe.category_truncated k Globe.Cell.top).1 + · exact (Globe.category_truncated k Globe.Cell.top).2 + +/-- The two retractions have exactly the same projection to their common face. -/ +theorem retractLeft_common (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + retractLeft n m k hkm ≫ collapseTo n k hkn = retractCommon n m k hkn hkm := by + apply (IsPushout.of_hasPushout (Globe.faceMap true k n) (Globe.faceMap false k m)).hom_ext + · rw [← Category.assoc, left_retractLeft, Category.id_comp, left_retractCommon] + · rw [← Category.assoc, right_retractLeft, Category.assoc, collapseTo_face, + Category.comp_id, right_retractCommon] + +theorem retractRight_common (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + retractRight n m k hkn ≫ collapseTo m k hkm = retractCommon n m k hkn hkm := by + apply (IsPushout.of_hasPushout (Globe.faceMap true k n) (Globe.faceMap false k m)).hom_ext + · rw [← Category.assoc, left_retractRight, Category.assoc, collapseTo_face, + Category.comp_id, left_retractCommon] + · rw [← Category.assoc, right_retractRight, Category.id_comp, right_retractCommon] + +/-- Both piece-cylinder maps are split monos for the actual chain model. -/ +theorem model_left_retractLeft (n m k : ℕ) (hkm : k ≤ m) : + GrayChainExtension.model.map (left n m k) ≫ + GrayChainExtension.model.map (retractLeft n m k hkm) = 𝟙 _ := by + rw [← Functor.map_comp, left_retractLeft, GrayChainExtension.model.map_id] + +theorem model_right_retractRight (n m k : ℕ) (hkn : k ≤ n) : + GrayChainExtension.model.map (right n m k) ≫ + GrayChainExtension.model.map (retractRight n m k hkn) = 𝟙 _ := by + rw [← Functor.map_comp, right_retractRight, GrayChainExtension.model.map_id] + +/-- The table projections of the two cylinder halves retain precisely the +same common-cylinder value. -/ +theorem model_common (n m k : ℕ) (hkn : k ≤ n) (hkm : k ≤ m) : + GrayChainExtension.model.map (retractLeft n m k hkm) ≫ + GrayChainExtension.model.map (collapseTo n k hkn) = + GrayChainExtension.model.map (retractRight n m k hkn) ≫ + GrayChainExtension.model.map (collapseTo m k hkm) := by + rw [← Functor.map_comp, ← Functor.map_comp, retractLeft_common, retractRight_common] + +end + +end Thomason.Construction.StrictOmegaCategory.PastingGlobe + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PosetPrismEndpoints.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PosetPrismEndpoints.lean new file mode 100644 index 0000000000000000000000000000000000000000..e9226626766b8722283752357521cc57be278e02 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PosetPrismEndpoints.lean @@ -0,0 +1,1011 @@ +import OAI.CategoryTheory.Thomason.Chains.SimplexChainHeight +import OAI.CategoryTheory.Thomason.Gray.CylinderAssembly +import OAI.CategoryTheory.Thomason.Simplicial.SimplicialSpanFactorization +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import OAI.CategoryTheory.Thomason.Strict.UnderlyingCategory +import Mathlib.AlgebraicTopology.SimplicialSet.Homotopy +import Mathlib.Data.Finset.Sort +import Mathlib.Order.NonemptyFiniteChains +import Mathlib.Order.Preorder.Chain + +namespace OAI + +section + +/-! +# From a strict Gray cylinder to a homotopy of Street nerves + +The simplicial map is constructed on actual oriental-valued simplices +using the explicit interval Alexander--Whitney map. Naturality includes +all simplex operators, hence also degeneracies. No nerve-homotopy assertion +from the new manuscript is assumed. +-/ + +namespace Thomason.Construction + +open CategoryTheory Opposite MonoidalCategory CartesianMonoidalCategory +open _root_.OAI.Thomason.Construction.DirectedComplex SimplexComplex +open scoped Simplicial + +namespace SimplexComplex.AlexanderWhitneyInput + +variable {h : NormalizedSimplexIdentities} (aw : AlexanderWhitneyInput h) + +noncomputable def simplexMap {m : ℕ} (θ : Fin (m + 1) →o Fin 2) : + h.object m ⟶ h.cylinderObject m := (aw.chainMap θ).realization + +theorem simplexMap_naturality {l m : ℕ} (a : Fin (l + 1) →o Fin (m + 1)) + (θ : Fin (m + 1) →o Fin 2) : + h.map a ≫ aw.simplexMap θ = aw.simplexMap (θ.comp a) ≫ h.cylinderMap a := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact (aw.naturality a θ p (x.table b p)).symm + +theorem simplexMap_const {m : ℕ} (a : Bool) : + aw.simplexMap (OrderHom.const _ (if a then 1 else 0)) = + (h.cylinderEndpoint a).app (.mk m) := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact aw.chainMap_const a p (x.table b p) + +theorem simplexMap_projection {m : ℕ} (θ : Fin (m + 1) →o Fin 2) : + aw.simplexMap θ ≫ h.cylinderProjection.app (.mk m) = 𝟙 (h.object m) := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + exact aw.projection_chainMap θ p (x.table b p) + +end SimplexComplex.AlexanderWhitneyInput + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : AlexanderWhitneyInput h) + +noncomputable def diagonal {m : ℕ} (θ : Fin (m + 1) →o Fin 2) : + h.object m ⟶ G.cylinder.obj (h.object m) := + aw.simplexMap θ ≫ G.simplexComparison.hom.app (.mk m) + +theorem diagonal_naturality {l m : ℕ} (a : Fin (l + 1) →o Fin (m + 1)) + (θ : Fin (m + 1) →o Fin 2) : + h.map a ≫ G.diagonal aw θ = + G.diagonal aw (θ.comp a) ≫ G.cylinder.map (h.map a) := by + let il : h.cylinderObject l ⟶ G.cylinder.obj (h.object l) := + G.simplexComparison.hom.app (.mk l) + let im : h.cylinderObject m ⟶ G.cylinder.obj (h.object m) := + G.simplexComparison.hom.app (.mk m) + have hn : h.cylinderMap a ≫ im = il ≫ G.cylinder.map (h.map a) := + G.simplexComparison.hom.naturality (SimplexCategory.Hom.mk a) + change h.map a ≫ (aw.simplexMap θ ≫ im) = + (aw.simplexMap (θ.comp a) ≫ il) ≫ G.cylinder.map (h.map a) + calc + _ = (h.map a ≫ aw.simplexMap θ) ≫ im := (Category.assoc _ _ _).symm + _ = (aw.simplexMap (θ.comp a) ≫ h.cylinderMap a) ≫ im := + congrArg (fun k => k ≫ im) (aw.simplexMap_naturality a θ) + _ = aw.simplexMap (θ.comp a) ≫ (il ≫ G.cylinder.map (h.map a)) := by + rw [Category.assoc, hn] + _ = _ := (Category.assoc _ _ _).symm + +theorem diagonal_const {m : ℕ} (a : Bool) : + G.diagonal aw (OrderHom.const _ (if a then 1 else 0)) = + (G.endpoint a).app (h.object m) := by + unfold diagonal + rw [aw.simplexMap_const] + exact G.endpoint_comparison a (.mk m) + +theorem diagonal_projection {m : ℕ} (θ : Fin (m + 1) →o Fin 2) : + G.diagonal aw θ ≫ G.projection.app (h.object m) = 𝟙 (h.object m) := by + let i : h.cylinderObject m ⟶ G.cylinder.obj (h.object m) := + G.simplexComparison.hom.app (.mk m) + let π : G.cylinder.obj (h.object m) ⟶ h.object m := G.projection.app (h.object m) + let cp : h.cylinderObject m ⟶ h.object m := h.cylinderProjection.app (.mk m) + have hp : i ≫ π = cp := G.projection_comparison (.mk m) + change (aw.simplexMap θ ≫ i) ≫ π = 𝟙 (h.object m) + calc + _ = aw.simplexMap θ ≫ cp := by rw [Category.assoc, hp] + _ = 𝟙 (h.object m) := aw.simplexMap_projection θ + +/-- The interval comparison on the Street nerve, evaluated on a simplex +`F : O_m → X` and an ordinal map `[m] → [1]`. -/ +noncomputable def nerveCylinder (X : StrictOmegaCategory.{0}) : + h.streetNerve.obj X ⊗ Δ[1] ⟶ h.streetNerve.obj (G.cylinder.obj X) where + app m := ↾fun x => G.diagonal aw (SSet.stdSimplex.objEquiv x.2).toOrderHom ≫ + G.cylinder.map x.1 + naturality m n a := by + ext x + change (h.object m.unop.len ⟶ X) × (Δ[1].obj m) at x + rcases x with ⟨F, θ⟩ + let α : h.object n.unop.len ⟶ h.object m.unop.len := h.map a.unop.toOrderHom + let t := (SSet.stdSimplex.objEquiv θ).toOrderHom + change G.diagonal aw (t.comp a.unop.toOrderHom) ≫ G.cylinder.map (α ≫ F) = + α ≫ (G.diagonal aw t ≫ G.cylinder.map F) + calc + _ = G.diagonal aw (t.comp a.unop.toOrderHom) ≫ (G.cylinder.map α ≫ G.cylinder.map F) := + congrArg (fun k => G.diagonal aw (t.comp a.unop.toOrderHom) ≫ k) (G.cylinder.map_comp α F) + _ = (G.diagonal aw (t.comp a.unop.toOrderHom) ≫ G.cylinder.map α) ≫ G.cylinder.map F := + (Category.assoc _ _ _).symm + _ = (α ≫ G.diagonal aw t) ≫ G.cylinder.map F := + congrArg (fun k => k ≫ G.cylinder.map F) (G.diagonal_naturality aw a.unop.toOrderHom t).symm + _ = _ := Category.assoc _ _ _ + +/-- The two simplicial endpoints are exactly the nerves of the strict endpoints. -/ +theorem nerveCylinder_endpoint (X : StrictOmegaCategory.{0}) (a : Bool) : + (if a then SSet.ι₁ else SSet.ι₀) ≫ G.nerveCylinder aw X = + h.streetNerve.map ((G.endpoint a).app X) := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro F + change h.object m.unop.len ⟶ X at F + cases a <;> + change G.diagonal aw (OrderHom.const _ _) ≫ G.cylinder.map F = F ≫ (G.endpoint _).app X + · exact (congrArg (fun k => k ≫ G.cylinder.map F) + (G.diagonal_const aw (m := m.unop.len) false)).trans + ((G.endpoint false).naturality F).symm + · exact (congrArg (fun k => k ≫ G.cylinder.map F) + (G.diagonal_const aw (m := m.unop.len) true)).trans + ((G.endpoint true).naturality F).symm + +/-- Collapsing the Gray interval agrees with projection of simplicial sets. -/ +theorem nerveCylinder_projection (X : StrictOmegaCategory.{0}) : + G.nerveCylinder aw X ≫ h.streetNerve.map (G.projection.app X) = + fst (h.streetNerve.obj X) Δ[1] := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + change (h.object m.unop.len ⟶ X) × (Δ[1].obj m) at x + rcases x with ⟨F, θ⟩ + let t := (SSet.stdSimplex.objEquiv θ).toOrderHom + change (G.diagonal aw t ≫ G.cylinder.map F) ≫ G.projection.app X = F + calc + _ = G.diagonal aw t ≫ (G.projection.app (h.object m.unop.len) ≫ F) := by + rw [Category.assoc] + exact congrArg (fun k => G.diagonal aw t ≫ k) (G.projection.naturality F) + _ = (G.diagonal aw t ≫ G.projection.app (h.object m.unop.len)) ≫ F := + (Category.assoc _ _ _).symm + _ = (𝟙 (h.object m.unop.len) : h.object m.unop.len ⟶ h.object m.unop.len) ≫ F := + congrArg (fun k => k ≫ F) (G.diagonal_projection aw t) + _ = F := Category.id_comp F + +/-- Naturality in the strict category, needed for relative homotopies. -/ +theorem nerveCylinder_naturality {X Y : StrictOmegaCategory.{0}} (f : X ⟶ Y) : + h.streetNerve.map f ▷ Δ[1] ≫ G.nerveCylinder aw Y = + G.nerveCylinder aw X ≫ h.streetNerve.map (G.cylinder.map f) := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + change (h.object m.unop.len ⟶ X) × (Δ[1].obj m) at x + rcases x with ⟨F, θ⟩ + let t := (SSet.stdSimplex.objEquiv θ).toOrderHom + change G.diagonal aw t ≫ G.cylinder.map (F ≫ f) = + (G.diagonal aw t ≫ G.cylinder.map F) ≫ G.cylinder.map f + rw [G.cylinder.map_comp, Category.assoc] + +/-- Every strict right Gray cylinder gives an actual simplicial homotopy. -/ +noncomputable def nerveHomotopy {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + SSet.Homotopy (h.streetNerve.map ((G.endpoint false).app X ≫ P)) + (h.streetNerve.map ((G.endpoint true).app X ≫ P)) where + h := G.nerveCylinder aw X ≫ h.streetNerve.map P + h₀ := by + change SSet.ι₀ ≫ (G.nerveCylinder aw X ≫ h.streetNerve.map P) = _ + have he := G.nerveCylinder_endpoint aw X false + change SSet.ι₀ ≫ G.nerveCylinder aw X = _ at he + rw [← Category.assoc, he] + exact (h.streetNerve.map_comp _ _).symm + h₁ := by + change SSet.ι₁ ≫ (G.nerveCylinder aw X ≫ h.streetNerve.map P) = _ + have he := G.nerveCylinder_endpoint aw X true + change SSet.ι₁ ≫ G.nerveCylinder aw X = _ at he + rw [← Category.assoc, he] + exact (h.streetNerve.map_comp _ _).symm + rel := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + change ((⊥ : (h.streetNerve.obj X).Subcomplex).toSSet.obj m) × (Δ[1].obj m) at x + exact False.elim x.1.property + +/-- Whole-cylinder stationarity becomes equality of whole simplicial homotopies. -/ +theorem nerveHomotopy_stationary {A X Y : StrictOmegaCategory.{0}} + (a : A ⟶ X) (v : A ⟶ Y) (P : G.cylinder.obj X ⟶ Y) + (hs : G.cylinder.map a ≫ P = G.projection.app A ≫ v) : + h.streetNerve.map a ▷ Δ[1] ≫ (G.nerveHomotopy aw P).h = + fst (h.streetNerve.obj A) Δ[1] ≫ h.streetNerve.map v := by + change h.streetNerve.map a ▷ Δ[1] ≫ (G.nerveCylinder aw X ≫ h.streetNerve.map P) = _ + rw [← Category.assoc, G.nerveCylinder_naturality aw a, Category.assoc, + ← h.streetNerve.map_comp, hs, h.streetNerve.map_comp, ← Category.assoc, + G.nerveCylinder_projection] + +end RightGrayInput +end Thomason.Construction + +end + +section + +/-! # Finite ordered decomposition of positive simplex tables + +An ordered sum of atoms above dimension r can be split into actual strict +composites at r. This performs the finite decomposition step and leaves +the lower-dimensional generation induction separate. +-/ + +namespace Thomason.Construction.SimplexComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- Vanishing of every summand's coefficient gives vanishing of the sum. -/ +theorem sumCells_coefficient_zero {h : NormalizedSimplexIdentities} {m : ℕ} + (as : List (h.object m)) (side : Bool) (n : ℕ) (b : Basis m n) + (hz : ∀ A ∈ as, A.table side n b = 0) : + (Cell.PositiveTable.ofCells as).table side n b = 0 := by + induction as with + | nil => rfl + | cons A as ih => + change A.table side n b + (Cell.PositiveTable.ofCells as).table side n b = 0 + rw [hz A (by simp), ih (fun B hB => hz B (by simp [hB])), zero_add] + +/-- A composition-closed predicate holding for the individual upper-table +pieces holds for their ordered sum, with an explicit zero-table base case. -/ +theorem ordered_sum_induction (h : NormalizedSimplexIdentities) {m : ℕ} + (r : ℕ) (P : h.object m → Prop) + (hzero : ∀ X : h.object m, (∀ n, r < n → ∀ side, X.table side n = 0) → P X) + (hcomp : ∀ (Y Z : h.object m) (hyz), P Y → P Z → P ((h.object m).comp r Y Z hyz)) + (as : List (h.object m)) + (hsep : as.Pairwise (fun A B => ∀ b : Basis m r, + A.table false r b = 0 ∨ B.table true r b = 0)) + (hone : ∀ A ∈ as, ∀ X : h.object m, + (∀ n, r < n → ∀ side, X.table side n = A.table side n) → P X) + (X : h.object m) + (he : ∀ n, r < n → ∀ side, + X.table side n = (Cell.PositiveTable.ofCells as).table side n) : P X := by + induction as generalizing X with + | nil => exact hzero X he + | cons A as ih => + obtain ⟨hfirst, htail⟩ := List.pairwise_cons.mp hsep + have hdisjoint : ∀ b : Basis m r, A.table false r b = 0 ∨ + (Cell.PositiveTable.ofCells as).table true r b = 0 := by + intro b + by_cases hb : A.table false r b = 0 + · exact Or.inl hb + · right + exact sumCells_coefficient_zero as true r b + (fun B hB => (hfirst B hB b).resolve_left hb) + have hsum : ∀ n, r < n → ∀ side, + X.table side n = A.table side n + (Cell.PositiveTable.ofCells as).table side n := he + obtain ⟨Y, Z, hyz, hYZ, hY, hZ⟩ := split_of_disjoint_positiveTables h X + (Cell.PositiveTable.ofCell A) (Cell.PositiveTable.ofCells as) r hsum hdisjoint + have hPY := hone A (by simp) Y hY + have hPZ := ih htail (fun B hB => hone B (by simp [hB])) Z hZ + have hp := hcomp Y Z hyz hPY hPZ + rwa [hYZ] at hp + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Signed-boundary formulas for the constructed principal cells -/ + +namespace Thomason.Construction.SimplexComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- A positive chain has itself as positive part and zero as negative part. -/ +theorem signedPart_positive {m p : ℕ} (a : Bool) (x : Chains m p) + (hx : x ∈ positive m p) : signedPart a x = if a then x else 0 := by + apply Finsupp.ext + intro b + have hb := hx b + cases a <;> simp [signedPart, max_eq_left (neg_nonpos.mpr hb), max_eq_right hb] + +/-- A negative positive-chain has only a negative part. -/ +theorem signedPart_neg_positive {m p : ℕ} (a : Bool) (x : Chains m p) + (hx : x ∈ positive m p) : signedPart a (-x) = if a then 0 else x := by + apply Finsupp.ext + intro b + have hb := hx b + cases a <;> simp [signedPart, max_eq_left (neg_nonpos.mpr hb), max_eq_right hb] + +/-- Separate the coned and old-face parts of a boundary. -/ +theorem signedPart_cone_add_prefix {m p : ℕ} (a : Bool) (x : Chains m p) + (y : Chains m (p + 1)) (hy : y ∈ positive m (p + 1)) : + signedPart a (prism (coneInclusion m) (coneVertex m) (cone_le m) p x + + mapChains (coneInclusion m) (p + 1) y) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p (signedPart a x) + + if a then mapChains (coneInclusion m) (p + 1) y else 0 := by + rw [signedPart_add_of_disjoint a _ _ (fun b => (prefix_cone_disjoint y x b).symm), + signedPart_cone, signedPart_positive a _ (mapChains_positive _ hy)] + +/-- The analogous separation for a negative old-face boundary term. -/ +theorem signedPart_cone_sub_prefix {m p : ℕ} (a : Bool) (x : Chains m p) + (y : Chains m (p + 1)) (hy : y ∈ positive m (p + 1)) : + signedPart a (prism (coneInclusion m) (coneVertex m) (cone_le m) p x - + mapChains (coneInclusion m) (p + 1) y) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p (signedPart a x) + + if a then 0 else mapChains (coneInclusion m) (p + 1) y := by + rw [sub_eq_add_neg] + have hd (b : Basis (m + 1) (p + 1)) : + prism (coneInclusion m) (coneVertex m) (cone_le m) p x b = 0 ∨ + (-mapChains (coneInclusion m) (p + 1) y) b = 0 := by + rcases prefix_cone_disjoint y x b with hp | hc + · right + simp [hp] + · exact Or.inl hc + rw [signedPart_add_of_disjoint a _ _ hd, signedPart_cone, + signedPart_neg_positive a _ (mapChains_positive _ hy)] + +/-- A constant vertex map kills positive-dimensional normalized chains. -/ +theorem mapChains_coneVertex_zero {m p : ℕ} (x : Chains m (p + 1)) : + mapChains (coneVertex m) (p + 1) x = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single s z => + have hn : ¬StrictMono (fun i => coneVertex m (s i)) := by + intro hs + have hh := hs (0 : Fin (p + 1)).castSucc_lt_succ + exact lt_irrefl _ hh + rw [mapChains_single, mapBasis, dite_eq_right hn, smul_zero] + +/-- In positive degree the cone table is the coned boundary plus one old face. -/ +theorem coneCell_succ_table (h : NormalizedSimplexIdentities) {m : ℕ} + (x : h.object m) (a : Bool) (p : ℕ) : + (coneCell h x).table a (p + 1) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p (x.table a p) + + if a = decide (Even p) then mapChains (coneInclusion m) (p + 1) (x.table a (p + 1)) + else 0 := by + rw [coneCell_table, coneChainMap_succ_app] + have hg (z : Chains m (p + 1)) : mapChains (coneVertex m) (p + 1) z = 0 := + mapChains_coneVertex_zero z + by_cases he : Even p <;> cases a <;> + simp only [RightCylinder.intervalCellTable, he, ↓reduceIte, decide_true, + decide_false, Bool.false_eq_true, Bool.true_eq_false, hg, map_zero, zero_add, + add_zero] + all_goals first | rfl | apply add_comm + +/-- The downward signed-boundary recursion is preserved by coning. -/ +theorem coneCell_signedPart (h : NormalizedSimplexIdentities) {m : ℕ} + (x : h.object m) (p : ℕ) + (hx : ∀ a, signedPart a (differential m p (x.table a (p + 1))) = x.table a p) + (a : Bool) : + signedPart a (differential (m + 1) (p + 1) ((coneCell h x).table a (p + 2))) = + (coneCell h x).table a (p + 1) := by + have hb : differential (m + 1) (p + 1) ((coneCell h x).table a (p + 2)) = + (coneCell h x).table true (p + 1) - (coneCell h x).table false (p + 1) := + (coneCell h x).boundary a (p + 1) + rw [hb] + have hd : ∀ a, signedPart a (x.table true p - x.table false p) = x.table a p := by + intro a + rw [← x.boundary a p] + exact hx a + by_cases he : Even p + · have heq : (coneCell h x).table true (p + 1) - (coneCell h x).table false (p + 1) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p + (x.table true p - x.table false p) + + mapChains (coneInclusion m) (p + 1) (x.table true (p + 1)) := by + rw [coneCell_succ_table, coneCell_succ_table] + simp only [he, decide_true, ↓reduceIte, map_sub] + abel + rw [heq, signedPart_cone_add_prefix a _ _ (x.positive true (p + 1)), hd] + cases a <;> simp [coneCell_succ_table, he] + · have heq : (coneCell h x).table true (p + 1) - (coneCell h x).table false (p + 1) = + prism (coneInclusion m) (coneVertex m) (cone_le m) p + (x.table true p - x.table false p) - + mapChains (coneInclusion m) (p + 1) (x.table false (p + 1)) := by + rw [coneCell_succ_table, coneCell_succ_table] + simp only [he, decide_false, Bool.true_eq_false, ↓reduceIte, add_zero, map_sub] + abel + rw [heq, signedPart_cone_sub_prefix a _ _ (x.positive false (p + 1)), hd] + cases a <;> simp [coneCell_succ_table, he] + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! +# Relative prisms under changes of source and target ordinals + +The target map need not be injective: repeated images normalize to zero. +These equalities compare whole chain maps and all strict cells, as required +when the finite target chains of different simplices are embedded in one +another during colimit assembly. +-/ + +namespace Thomason.Construction.SimplexComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +/-- Appending an upper endpoint commutes with every monotone target map. -/ +theorem map_append {n k p : ℕ} (b : Fin (n + 1) →o Fin (k + 1)) + (f : Fin (p + 1) →o Fin (n + 1)) (v : Fin (n + 1)) (hv : f (Fin.last p) ≤ v) : + b.comp (append f v hv) = append (b.comp f) (b v) (b.monotone hv) := by + apply DFunLike.ext + intro i + induction i using Fin.lastCases with + | last => + exact (congrArg b (append_last f v hv)).trans + ((append_last (b.comp f) (b v) (b.monotone hv)).symm) + | cast i => + exact (congrArg b (append_castSucc f v hv i)).trans + ((append_castSucc (b.comp f) (b v) (b.monotone hv) i).symm) + +theorem mapChains_rise {m n k : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (b : Fin (n + 1) →o Fin (k + 1)) : + mapChains b (m + 1) (rise f g hfg) = + rise (b.comp f) (b.comp g) (fun i => b.monotone (hfg i)) := by + unfold rise + rw [mapChains_tuple, map_append] + rfl + +/-- Every monotone map of target ordinals preserves the complete prism. -/ +theorem prism_postcomp {m n k : ℕ} (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (b : Fin (n + 1) →o Fin (k + 1)) + (p : ℕ) (x : Chains m p) : + mapChains b (p + 1) (prism f g hfg p x) = + prism (b.comp f) (b.comp g) (fun i => b.monotone (hfg i)) p x := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp only [map_add, hx, hy] + | single s z => + rw [prism_single f g hfg p s z] + have he := mapChains_rise (f.comp s.toOrderHom) (g.comp s.toOrderHom) + (fun i => hfg (s i)) b + have hp := prism_single (b.comp f) (b.comp g) + (fun i => b.monotone (hfg i)) p s z + exact (map_smul (mapChains b (p + 1)) z (prismBasis f g hfg p s)).trans + ((congrArg (fun y => z • y) he).trans hp.symm) + +variable (h : NormalizedSimplexIdentities) {m n : ℕ} {A : Set (Fin (m + 1))} + (hA : IsLowerSet A) (f g : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (hagree : ∀ i ∈ A, f i = g i) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + +/-- The complete strict prism is independent of the chosen enclosing +finite target chain. This also allows noninjective target maps. -/ +theorem strictPrism_postcomp {k : ℕ} (b : Fin (n + 1) →o Fin (k + 1)) : + strictPrism h hA f g hfg hagree hconstant ≫ h.map b = + strictPrism h hA (b.comp f) (b.comp g) (fun i => b.monotone (hfg i)) + (fun i hi => congrArg b (hagree i hi)) + (fun x hx y hy => congrArg b (hconstant x hx y hy)) := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext a p + cases p with + | zero => + change mapChains b 0 (mapChains f 0 (x.table a 0).1 + mapChains g 0 (x.table a 0).2) = _ + rw [map_add, mapChains_comp, mapChains_comp] + rfl + | succ p => + change mapChains b (p + 1) (mapChains f (p + 1) (x.table a (p + 1)).1 + + mapChains g (p + 1) (x.table a (p + 1)).2.1 + prism f g hfg p (x.table a (p + 1)).2.2) = _ + rw [map_add, map_add, mapChains_comp, mapChains_comp, prism_postcomp] + rfl + +include hA in +/-- Pulling a lower set back along a monotone simplex operator preserves +exactly the relative-prism hypotheses. -/ +theorem lowerSet_preimage {l : ℕ} (a : Fin (l + 1) →o Fin (m + 1)) : + IsLowerSet (a ⁻¹' A) := by + intro x y hxy hy + exact hA (a.monotone hxy) hy + +/-- Source naturality of the entire strict prism, not merely its top atoms. -/ +theorem strictPrism_precomp {l : ℕ} (a : Fin (l + 1) →o Fin (m + 1)) : + h.cylinderMap a ≫ strictPrism h hA f g hfg hagree hconstant = + strictPrism h (lowerSet_preimage hA a) (f.comp a) (g.comp a) + (fun i => hfg (a i)) (fun i hi => hagree (a i) hi) + (fun x hx y hy => hconstant (a x) hx (a y) hy) := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b p + cases p with + | zero => + change mapChains f 0 (mapChains a 0 (x.table b 0).1) + + mapChains g 0 (mapChains a 0 (x.table b 0).2) = _ + rw [mapChains_comp, mapChains_comp] + rfl + | succ p => + change mapChains f (p + 1) (mapChains a (p + 1) (x.table b (p + 1)).1) + + mapChains g (p + 1) (mapChains a (p + 1) (x.table b (p + 1)).2.1) + + prism f g hfg p (mapChains a p (x.table b (p + 1)).2.2) = _ + rw [mapChains_comp, mapChains_comp, prism_precomp] + rfl + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! +# Finite ordered targets of relative prisms in arbitrary posets + +The union of the two vertex-image lists is a chain under the relative +sieve/constancy hypotheses. We construct this chain and ordinal models +whose transition maps preserve the actual vertices. This supplies the +finite targets in the simplexwise relative-prism construction. +-/ + +namespace Thomason.Construction + +open PartialOrder + +namespace RelativePrismImage + +variable {E : Type} [PartialOrder E] {A : Set E} (hA : IsLowerSet A) + (f g : E →o E) (hfg : ∀ x, f x ≤ g x) + (hagree : ∀ x ∈ A, f x = g x) + (hconstant : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + +include hA hfg hagree hconstant + +/-- Every lower image is comparable with every upper image in a simplex. -/ +theorem mixed_comparable {m : ℕ} (s : Fin (m + 1) →o E) (i j : Fin (m + 1)) : + f (s i) ≤ g (s j) ∨ g (s j) ≤ f (s i) := by + by_cases hij : i ≤ j + · exact Or.inl ((f.monotone (s.monotone hij)).trans (hfg _)) + · have hji : j ≤ i := le_of_lt (lt_of_not_ge hij) + by_cases hj : s j ∈ A + · exact Or.inr ((hagree (s j) hj).symm ▸ f.monotone (s.monotone hji)) + · have hi : s i ∉ A := fun hi => hj (hA (s.monotone hji) hi) + exact Or.inl ((hconstant (s i) hi (s j) hj) ▸ hfg (s i)) + +/-- The actual finite chain containing both endpoint vertex lists. -/ +noncomputable def chain {m : ℕ} (s : Fin (m + 1) →o E) : NonemptyFiniteChains E := by + classical + refine ⟨Finset.univ.image (fun i => f (s i)) ∪ Finset.univ.image (fun i => g (s i)), ?_, ?_⟩ + · exact ⟨f (s 0), Finset.mem_union_left _ (Finset.mem_image.mpr ⟨0, Finset.mem_univ _, rfl⟩)⟩ + · rintro ⟨x, hx⟩ ⟨y, hy⟩ + change x ≤ y ∨ y ≤ x + simp only [Finset.mem_union, Finset.mem_image, Finset.mem_univ, true_and] at hx hy + rcases hx with ⟨i, rfl⟩ | ⟨i, rfl⟩ <;> rcases hy with ⟨j, rfl⟩ | ⟨j, rfl⟩ + · exact (le_total i j).imp (fun hij => f.monotone (s.monotone hij)) + (fun hji => f.monotone (s.monotone hji)) + · exact mixed_comparable hA f g hfg hagree hconstant s i j + · exact (mixed_comparable hA f g hfg hagree hconstant s j i).symm + · exact (le_total i j).imp (fun hij => g.monotone (s.monotone hij)) + (fun hji => g.monotone (s.monotone hji)) + +@[simp] +theorem mem_chain {m : ℕ} (s : Fin (m + 1) →o E) (x : E) : + x ∈ (chain hA f g hfg hagree hconstant s).finset ↔ + (∃ i, f (s i) = x) ∨ (∃ i, g (s i) = x) := by + classical + simp [chain] + +/-- Every simplex operator induces inclusion of the finite prism targets. -/ +theorem chain_precomp_le {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + chain hA f g hfg hagree hconstant (s.comp a) ≤ chain hA f g hfg hagree hconstant s := by + intro x hx + rw [mem_chain] at hx ⊢ + rcases hx with ⟨i, hi⟩ | ⟨i, hi⟩ + · exact Or.inl ⟨a i, hi⟩ + · exact Or.inr ⟨a i, hi⟩ + +end RelativePrismImage + +/-- An ordinal enumeration of a nonempty finite chain in a poset. -/ +structure ChainOrdinal {E : Type} [PartialOrder E] (S : NonemptyFiniteChains E) where + dim : ℕ + enum : Fin (dim + 1) ≃o S.finset + +namespace ChainOrdinal + +variable {E : Type} [PartialOrder E] + +/-- Every nonempty finite chain has an increasing enumeration. -/ +noncomputable def choose (S : NonemptyFiniteChains E) : ChainOrdinal S := by + classical + have hs : IsChain (· < ·) (S.finset : Set E) := by + intro x hx y hy hne + rcases S.comparable ⟨x, hx⟩ ⟨y, hy⟩ with hxy | hyx + · exact Or.inl (lt_of_le_of_ne hxy hne) + · exact Or.inr (lt_of_le_of_ne hyx hne.symm) + letI : LinearOrder S.finset := hs.linearOrder + refine ⟨S.finset.card - 1, Fintype.orderIsoFinOfCardEq S.finset ?_⟩ + rw [Fintype.card_coe] + have hp := Finset.card_pos.mpr S.nonempty + omega + +variable {S T U : NonemptyFiniteChains E} + +/-- Inclusion of the underlying finite chains, with no re-enumeration. -/ +def inclusion (hST : S ≤ T) : S.finset →o T.finset where + toFun x := ⟨x.val, hST x.property⟩ + monotone' := fun _ _ h => h + +/-- The ordinal map encoding a chain inclusion under the chosen enumerations. -/ +def map (s : ChainOrdinal S) (t : ChainOrdinal T) (hST : S ≤ T) : + Fin (s.dim + 1) →o Fin (t.dim + 1) := + (OrderIso.toOrderEmbedding t.enum.symm).toOrderHom.comp ((inclusion hST).comp (OrderIso.toOrderEmbedding s.enum).toOrderHom) + +@[simp] +theorem enum_map (s : ChainOrdinal S) (t : ChainOrdinal T) (hST : S ≤ T) + (i : Fin (s.dim + 1)) : ((t.enum (map s t hST i)) : E) = ((s.enum i) : E) := by + change ((t.enum (t.enum.symm (inclusion hST (s.enum i)))) : E) = _ + rw [OrderIso.apply_symm_apply] + rfl + +/-- The transition maps are coherent under nested target chains. -/ +theorem map_comp (s : ChainOrdinal S) (t : ChainOrdinal T) (u : ChainOrdinal U) + (hST : S ≤ T) (hTU : T ≤ U) : + (map t u hTU).comp (map s t hST) = map s u (hST.trans hTU) := by + apply DFunLike.ext + intro i + apply u.enum.injective + apply Subtype.ext + simp only [OrderHom.comp_coe, Function.comp_apply, enum_map] + +@[simp] +theorem map_refl (s : ChainOrdinal S) : map s s le_rfl = OrderHom.id := by + apply DFunLike.ext + intro i + apply s.enum.injective + apply Subtype.ext + exact enum_map s s le_rfl i + +end ChainOrdinal +end Thomason.Construction + +end + +section + +/-! +# Compatible finite models of a relative poset prism + +The image of each simplex admits a finite ordinal model. Both endpoint +maps, their inequality, the relative hypotheses, and every simplex operator +are transported to these models. The resulting strict chain prisms agree +on all cells, so they can be assembled by a colimit universal property. +-/ + +namespace Thomason.Construction + +open CategoryTheory PartialOrder + +/-- The poset data used by the relative prism construction. -/ +structure RelativePrismData (E : Type) [PartialOrder E] where + old : Set E + lower : IsLowerSet old + first : E →o E + last : E →o E + le : ∀ x, first x ≤ last x + agree : ∀ x ∈ old, first x = last x + constant : ∀ x ∉ old, ∀ y ∉ old, last x = last y + +namespace RelativePrismData + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + +noncomputable def image {m : ℕ} (s : Fin (m + 1) →o E) : NonemptyFiniteChains E := + RelativePrismImage.chain D.lower D.first D.last D.le D.agree D.constant s + +noncomputable def ordinal {m : ℕ} (s : Fin (m + 1) →o E) : ChainOrdinal (D.image s) := + ChainOrdinal.choose (D.image s) + +noncomputable def evaluate {m : ℕ} (s : Fin (m + 1) →o E) : + Fin ((D.ordinal s).dim + 1) →o E where + toFun i := ((D.ordinal s).enum i).val + monotone' := fun _ _ hij => (D.ordinal s).enum.monotone hij + +noncomputable def firstIndex {m : ℕ} (s : Fin (m + 1) →o E) : + Fin (m + 1) →o Fin ((D.ordinal s).dim + 1) where + toFun i := (D.ordinal s).enum.symm ⟨D.first (s i), + (RelativePrismImage.mem_chain D.lower D.first D.last D.le D.agree D.constant s _).mpr + (Or.inl ⟨i, rfl⟩)⟩ + monotone' := fun _ _ hij => (D.ordinal s).enum.symm.monotone (D.first.monotone (s.monotone hij)) + +noncomputable def lastIndex {m : ℕ} (s : Fin (m + 1) →o E) : + Fin (m + 1) →o Fin ((D.ordinal s).dim + 1) where + toFun i := (D.ordinal s).enum.symm ⟨D.last (s i), + (RelativePrismImage.mem_chain D.lower D.first D.last D.le D.agree D.constant s _).mpr + (Or.inr ⟨i, rfl⟩)⟩ + monotone' := fun _ _ hij => (D.ordinal s).enum.symm.monotone (D.last.monotone (s.monotone hij)) + +@[simp] +theorem evaluate_firstIndex {m : ℕ} (s : Fin (m + 1) →o E) (i : Fin (m + 1)) : + D.evaluate s (D.firstIndex s i) = D.first (s i) := by + change ((D.ordinal s).enum ((D.ordinal s).enum.symm _) : E) = _ + rw [OrderIso.apply_symm_apply] + +@[simp] +theorem evaluate_lastIndex {m : ℕ} (s : Fin (m + 1) →o E) (i : Fin (m + 1)) : + D.evaluate s (D.lastIndex s i) = D.last (s i) := by + change ((D.ordinal s).enum ((D.ordinal s).enum.symm _) : E) = _ + rw [OrderIso.apply_symm_apply] + +theorem evaluate_injective {m : ℕ} (s : Fin (m + 1) →o E) : + Function.Injective (D.evaluate s) := by + intro i j hij + apply (D.ordinal s).enum.injective + exact Subtype.ext hij + +theorem index_le {m : ℕ} (s : Fin (m + 1) →o E) (i : Fin (m + 1)) : + D.firstIndex s i ≤ D.lastIndex s i := + (D.ordinal s).enum.symm.monotone (D.le (s i)) + +theorem index_agree {m : ℕ} (s : Fin (m + 1) →o E) (i : Fin (m + 1)) + (hi : i ∈ s ⁻¹' D.old) : D.firstIndex s i = D.lastIndex s i := by + apply D.evaluate_injective s + simpa only [evaluate_firstIndex, evaluate_lastIndex] using D.agree (s i) hi + +theorem index_constant {m : ℕ} (s : Fin (m + 1) →o E) (i : Fin (m + 1)) + (hi : i ∉ s ⁻¹' D.old) (j : Fin (m + 1)) (hj : j ∉ s ⁻¹' D.old) : + D.lastIndex s i = D.lastIndex s j := by + apply D.evaluate_injective s + simpa only [evaluate_lastIndex] using D.constant (s i) hi (s j) hj + +theorem old_preimage_lower {m : ℕ} (s : Fin (m + 1) →o E) : + IsLowerSet (s ⁻¹' D.old) := + fun _ _ hij hj => D.lower (s.monotone hij) hj + +noncomputable def transition {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + Fin ((D.ordinal (s.comp a)).dim + 1) →o Fin ((D.ordinal s).dim + 1) := + ChainOrdinal.map (D.ordinal (s.comp a)) (D.ordinal s) + (RelativePrismImage.chain_precomp_le D.lower D.first D.last D.le D.agree D.constant s a) + +@[simp] +theorem evaluate_transition {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) (i : Fin ((D.ordinal (s.comp a)).dim + 1)) : + D.evaluate s (D.transition s a i) = D.evaluate (s.comp a) i := + ChainOrdinal.enum_map _ _ _ i + +theorem transition_first {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + (D.transition s a).comp (D.firstIndex (s.comp a)) = (D.firstIndex s).comp a := by + apply DFunLike.ext + intro i + apply D.evaluate_injective s + simp only [OrderHom.comp_coe, Function.comp_apply, evaluate_transition, evaluate_firstIndex] + +theorem transition_last {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + (D.transition s a).comp (D.lastIndex (s.comp a)) = (D.lastIndex s).comp a := by + apply DFunLike.ext + intro i + apply D.evaluate_injective s + simp only [OrderHom.comp_coe, Function.comp_apply, evaluate_transition, evaluate_lastIndex] + +/-- The local strict prism takes values in the oriental of the finite image chain. -/ +noncomputable def localPrism (h : NormalizedSimplexIdentities) {m : ℕ} + (s : Fin (m + 1) →o E) : h.cylinderObject m ⟶ h.object (D.ordinal s).dim := + SimplexComplex.strictPrism h (D.old_preimage_lower s) (D.firstIndex s) (D.lastIndex s) + (D.index_le s) (D.index_agree s) (D.index_constant s) + +/-- The relative set certifies positivity; the actual map depends only on +its two endpoint lists. -/ +theorem localPrism_congr (h : NormalizedSimplexIdentities) {m n : ℕ} + {A B : Set (Fin (m + 1))} (hA : IsLowerSet A) (hB : IsLowerSet B) + (f g f' g' : Fin (m + 1) →o Fin (n + 1)) + (hfg : ∀ i, f i ≤ g i) (hfg' : ∀ i, f' i ≤ g' i) + (ha : ∀ i ∈ A, f i = g i) (ha' : ∀ i ∈ B, f' i = g' i) + (hc : ∀ x ∉ A, ∀ y ∉ A, g x = g y) + (hc' : ∀ x ∉ B, ∀ y ∉ B, g' x = g' y) + (hf : f = f') (hg : g = g') : + SimplexComplex.strictPrism h hA f g hfg ha hc = + SimplexComplex.strictPrism h hB f' g' hfg' ha' hc' := by + subst f' + subst g' + rfl + +/-- All faces and degeneracies commute with the local strict prism, after +embedding its finite target chain in the larger target chain. -/ +theorem localPrism_naturality (h : NormalizedSimplexIdentities) {l m : ℕ} + (s : Fin (m + 1) →o E) (a : Fin (l + 1) →o Fin (m + 1)) : + h.cylinderMap a ≫ D.localPrism h s = + D.localPrism h (s.comp a) ≫ h.map (D.transition s a) := by + have hsource := SimplexComplex.strictPrism_precomp h (D.old_preimage_lower s) + (D.firstIndex s) (D.lastIndex s) (D.index_le s) (D.index_agree s) + (D.index_constant s) a + have htarget := SimplexComplex.strictPrism_postcomp h (D.old_preimage_lower (s.comp a)) + (D.firstIndex (s.comp a)) (D.lastIndex (s.comp a)) + (D.index_le (s.comp a)) (D.index_agree (s.comp a)) + (D.index_constant (s.comp a)) (D.transition s a) + exact hsource.trans ((localPrism_congr h _ _ _ _ _ _ _ _ _ _ _ _ + (D.transition_first s a).symm (D.transition_last s a).symm).trans htarget.symm) + +end RelativePrismData +end Thomason.Construction + +end + +section + +/-! +# Assembly of the relative prism on a categorified poset nerve + +The finite target chains and their transition maps are used to glue the +explicit chain prisms. This construction applies to arbitrary posets and +all their simplices, including degenerate ones. +-/ + +namespace Thomason.Construction.RelativePrismData + +open CategoryTheory CategoryTheory.Limits Opposite NormalizedSimplexIdentities + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + +/-- The finite local chain prism, now with values in the categorified nerve. -/ +noncomputable def chainPiece {m : ℕ} (s : Fin (m + 1) →o E) : + h.cylinderObject m ⟶ h.categorification.obj (nerve E) := + D.localPrism h s ≫ h.posetLeg (D.evaluate s) + +/-- No choice of finite target is visible in the glued local maps. -/ +theorem chainPiece_naturality {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + h.cylinderMap a ≫ D.chainPiece h s = D.chainPiece h (s.comp a) := by + have he : (D.evaluate s).comp (D.transition s a) = D.evaluate (s.comp a) := by + apply DFunLike.ext + exact D.evaluate_transition s a + let p : h.cylinderObject m ⟶ h.object (D.ordinal s).dim := D.localPrism h s + let q : h.cylinderObject l ⟶ h.object (D.ordinal (s.comp a)).dim := D.localPrism h (s.comp a) + let b : h.object (D.ordinal (s.comp a)).dim ⟶ h.object (D.ordinal s).dim := + h.map (D.transition s a) + let t := h.posetLeg (D.evaluate s) + have hn : h.cylinderMap a ≫ p = q ≫ b := D.localPrism_naturality h s a + have ht : b ≫ t = h.posetLeg (D.evaluate (s.comp a)) := + (h.posetLeg_precomp (D.evaluate s) (D.transition s a)).trans (congrArg h.posetLeg he) + change h.cylinderMap a ≫ (p ≫ t) = q ≫ h.posetLeg (D.evaluate (s.comp a)) + exact (Category.assoc _ _ _).symm.trans + ((congrArg (fun k => k ≫ t) hn).trans + ((Category.assoc _ _ _).trans (congrArg (fun k => q ≫ k) ht))) + +variable (G : RightGrayInput h) + +/-- Transport of a local piece to the right Gray cylinder. -/ +noncomputable def piece {m : ℕ} (s : Fin (m + 1) →o E) : + G.cylinder.obj (h.object m) ⟶ h.categorification.obj (nerve E) := + G.simplexComparison.inv.app (.mk m) ≫ D.chainPiece h s + +theorem piece_naturality {l m : ℕ} (s : Fin (m + 1) →o E) + (a : Fin (l + 1) →o Fin (m + 1)) : + G.cylinder.map (h.map a) ≫ D.piece h G s = D.piece h G (s.comp a) := by + let il : G.cylinder.obj (h.object l) ⟶ h.cylinderObject l := + G.simplexComparison.inv.app (.mk l) + let im : G.cylinder.obj (h.object m) ⟶ h.cylinderObject m := + G.simplexComparison.inv.app (.mk m) + have hn : G.cylinder.map (h.map a) ≫ im = il ≫ h.cylinderMap a := + G.simplexComparison.inv.naturality (SimplexCategory.Hom.mk a) + change G.cylinder.map (h.map a) ≫ (im ≫ D.chainPiece h s) = + il ≫ D.chainPiece h (s.comp a) + exact (Category.assoc _ _ _).symm.trans + ((congrArg (fun k => k ≫ D.chainPiece h s) hn).trans + ((Category.assoc _ _ _).trans + (congrArg (fun k => il ≫ k) (D.chainPiece_naturality h s a)))) + +/-- The local maps form a cocone over the actual simplex presentation. -/ +theorem pieces_compatible {i j : CostructuredArrow SSet.stdSimplex (nerve E)} (a : i ⟶ j) : + G.cylinder.map (h.cosimplicial.map a.left) ≫ + D.piece h G (simplexOrder (SSet.yonedaEquiv j.hom)) = + D.piece h G (simplexOrder (SSet.yonedaEquiv i.hom)) := by + have he : (simplexOrder (SSet.yonedaEquiv j.hom)).comp a.left.toOrderHom = + simplexOrder (SSet.yonedaEquiv i.hom) := + (simplexOrder_precomp j.hom a.left).symm.trans + (congrArg (fun k => simplexOrder (SSet.yonedaEquiv k)) (CostructuredArrow.w a)) + exact (D.piece_naturality h G (simplexOrder (SSet.yonedaEquiv j.hom)) a.left.toOrderHom).trans + (congrArg (D.piece h G) he) + +/-- Existence and uniqueness of the assembled strict relative prism. -/ +theorem exists_prism : + ∃! P : G.cylinder.obj (h.categorification.obj (nerve E)) ⟶ h.categorification.obj (nerve E), + ∀ s : CostructuredArrow SSet.stdSimplex (nerve E), + G.cylinder.map (h.simplexLeg s.hom) ≫ P = + D.piece h G (simplexOrder (SSet.yonedaEquiv s.hom)) := by + exact G.assemble_cylinder (h.simplexCocone_isColimit (nerve E)) + (fun s => D.piece h G (simplexOrder (SSet.yonedaEquiv s.hom))) (fun a => D.pieces_compatible h G a) + +/-- The strict cylinder is defined using the proved unique assembly. -/ +noncomputable def prism : + G.cylinder.obj (h.categorification.obj (nerve E)) ⟶ h.categorification.obj (nerve E) := + (D.exists_prism h G).choose + +theorem prism_fac (s : CostructuredArrow SSet.stdSimplex (nerve E)) : + G.cylinder.map (h.simplexLeg s.hom) ≫ D.prism h G = + D.piece h G (simplexOrder (SSet.yonedaEquiv s.hom)) := + (D.exists_prism h G).choose_spec.1 s + +end Thomason.Construction.RelativePrismData + +end + +section + +/-! +# Endpoints of the assembled poset prism + +The glued map is a strict cylinder between the two actual categorified +poset endomorphisms. The proof uses the entire simplex presentation. +-/ + +namespace Thomason.Construction.RelativePrismData + +open CategoryTheory CategoryTheory.Limits Opposite NormalizedSimplexIdentities + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] (G : RightGrayInput h) + +/-- The local endpoint equation survives passage from the finite image +chain to the whole poset. -/ +theorem piece_endpoint {m : ℕ} (s : Fin (m + 1) →o E) (a : Bool) : + (G.endpoint a).app (h.object m) ≫ D.piece h G s = + h.posetLeg ((if a then D.last else D.first).comp s) := by + let p : G.cylinder.obj (h.object m) ⟶ h.object (D.ordinal s).dim := + G.prism (D.old_preimage_lower s) (D.firstIndex s) (D.lastIndex s) + (D.index_le s) (D.index_agree s) (D.index_constant s) + let v : h.object (D.ordinal s).dim ⟶ h.categorification.obj (nerve E) := + h.posetLeg (D.evaluate s) + have hp : (G.endpoint a).app (h.object m) ≫ p = + h.map (if a then D.lastIndex s else D.firstIndex s) := + G.prism_endpoint (D.old_preimage_lower s) (D.firstIndex s) (D.lastIndex s) + (D.index_le s) (D.index_agree s) (D.index_constant s) a + have he : (D.evaluate s).comp (if a then D.lastIndex s else D.firstIndex s) = + (if a then D.last else D.first).comp s := by + apply DFunLike.ext + intro i + cases a + · exact D.evaluate_firstIndex s i + · exact D.evaluate_lastIndex s i + have hpiece : D.piece h G s = p ≫ v := (Category.assoc _ _ _).symm + calc + _ = (G.endpoint a).app (h.object m) ≫ (p ≫ v) := congrArg (fun k => _ ≫ k) hpiece + _ = ((G.endpoint a).app (h.object m) ≫ p) ≫ v := (Category.assoc _ _ _).symm + _ = h.map (if a then D.lastIndex s else D.firstIndex s) ≫ v := congrArg (fun k => k ≫ v) hp + _ = h.posetLeg ((D.evaluate s).comp (if a then D.lastIndex s else D.firstIndex s)) := + h.posetLeg_precomp _ _ + _ = _ := congrArg h.posetLeg he + +/-- The assembled prism restricts to the specified piece on every simplex. -/ +theorem prism_fac_poset {m : ℕ} (s : Fin (m + 1) →o E) : + G.cylinder.map (h.posetLeg s) ≫ D.prism h G = D.piece h G s := by + have hf := D.prism_fac h G (CostructuredArrow.mk (SSet.yonedaEquiv.symm (orderSimplex s))) + change G.cylinder.map (h.posetLeg s) ≫ D.prism h G = + D.piece h G (simplexOrder (SSet.yonedaEquiv (SSet.yonedaEquiv.symm (orderSimplex s)))) at hf + simpa only [Equiv.apply_symm_apply, simplexOrder_orderSimplex] using hf + +/-- Both endpoints are the actual functors induced on categorifications. -/ +theorem prism_endpoint (a : Bool) : + (G.endpoint a).app (h.categorification.obj (nerve E)) ≫ D.prism h G = + h.categorification.map (nerveMap (if a then D.last else D.first).monotone.functor) := by + apply G.assembled_endpoint (h.simplexCocone_isColimit (nerve E)) + intro j + let s := simplexOrder (SSet.yonedaEquiv j.hom) + have hf : G.cylinder.map (h.posetLeg s) ≫ D.prism h G = D.piece h G s := + D.prism_fac_poset h G s + have hj : h.posetLeg s = h.simplexLeg j.hom := h.posetLeg_simplexOrder j.hom + change (G.endpoint a).app (h.object j.left.len) ≫ + G.cylinder.map (h.simplexLeg j.hom) ≫ D.prism h G = + h.simplexLeg j.hom ≫ _ + calc + _ = (G.endpoint a).app (h.object j.left.len) ≫ + (G.cylinder.map (h.posetLeg s) ≫ D.prism h G) := by rw [hj] + _ = (G.endpoint a).app (h.object j.left.len) ≫ D.piece h G s := congrArg (fun k => _ ≫ k) hf + _ = h.posetLeg ((if a then D.last else D.first).comp s) := D.piece_endpoint h G s a + _ = h.posetLeg s ≫ h.categorification.map + (nerveMap (if a then D.last else D.first).monotone.functor) := + (h.posetLeg_postcomp s (if a then D.last else D.first)).symm + _ = _ := congrArg (fun k => k ≫ _) hj + +end Thomason.Construction.RelativePrismData + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/PrismSimplexNaturality.lean b/lean/OAI/CategoryTheory/Thomason/Gray/PrismSimplexNaturality.lean new file mode 100644 index 0000000000000000000000000000000000000000..51fd96e439513fc4c9bf79c518cc16f0f702df0c --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/PrismSimplexNaturality.lean @@ -0,0 +1,991 @@ +import OAI.CategoryTheory.Thomason.Gray.GrayChainGlobeRestriction +import OAI.CategoryTheory.Thomason.Gray.GridGlobeCylinderComparison +import OAI.CategoryTheory.Thomason.Gray.TopologicalConePrism +import OAI.CategoryTheory.Thomason.Transfer.StrictPushoutGeneration +import Mathlib.AlgebraicTopology.SimplicialSet.ProdStdSimplexOne +import Mathlib.Data.Set.UnionLift +import Mathlib.Topology.LocallyFinite + +namespace OAI + +section + +/-! # Exact bounded atom lifts in the pushout of grid-row cylinders -/ + +namespace Thomason.Construction.StrictOmegaCategory.GridGlobeCylinder + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev model := GrayChainExtension.model +abbrev Source {n k l : ℕ} (hkl : k < l) : StrictOmegaCategory.{0} := + GridGlobe.ImageSource (n := n) hkl model + +def rowMap {n k l : ℕ} (hkl : k < l) (s : Bool) : + model.obj (PastingGlobe.category n n k) ⟶ Source (n := n) hkl := + if s then pushout.inr _ _ else pushout.inl _ _ + +def comparison {n k l : ℕ} (hkl : k < l) : + Source (n := n) hkl ⟶ model.obj (GridGlobe.category n k l hkl) := + pushout.desc (model.map (GridGlobe.row n k l hkl false)) + (model.map (GridGlobe.row n k l hkl true)) (by + rw [← model.map_comp, ← model.map_comp] + exact congrArg model.map (pushout.condition + (f := GrayMapping.pastingFace true l n k hkl) + (g := GrayMapping.pastingFace false l n k hkl))) + +theorem rowMap_comparison {n k l : ℕ} (hkl : k < l) (s : Bool) : + rowMap hkl s ≫ comparison hkl = model.map (GridGlobe.row n k l hkl s) := by + cases s + · exact pushout.inl_desc _ _ _ + · exact pushout.inr_desc _ _ _ + +def basisComparison {n k l : ℕ} (hkl : k < l) (hln : l < n) : + Source (n := n) hkl ⟶ (rightCylinder (GridGlobeBasis.complex hkl hln)).realization := + comparison hkl ≫ (GridGlobeBasis.modelIso hkl hln).hom + +theorem rowMap_basisComparison {n k l : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) : + rowMap hkl s ≫ basisComparison hkl hln = + (PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).hom ≫ + (RightCylinder.map (GridGlobeBasis.inclusion hkl hln s)).realization := by + rw [basisComparison, ← Category.assoc, rowMap_comparison, GridGlobeBasis.model_row] + +theorem row_image_eq {n k l : ℕ} (hkl : k < l) (hln : l < n) (s t : Bool) + (x y : model.obj (PastingGlobe.category n n k)) + (he : (model.map (GridGlobe.row n k l hkl s)).toFun x = + (model.map (GridGlobe.row n k l hkl t)).toFun y) : + (rowMap hkl s).toFun x = (rowMap hkl t).toFun y := by + cases s <;> cases t + · exact congrArg (rowMap hkl false).toFun + (GridGlobe.row_map_injective hkl hln.le model false he) + · exact GridGlobe.cross_image_eq hkl hln.le model x y he + · exact (GridGlobe.cross_image_eq hkl hln.le model y x he.symm).symm + · exact congrArg (rowMap hkl true).toFun + (GridGlobe.row_map_injective hkl hln.le model true he) + +theorem row_image_eq_of_basisComparison {n k l : ℕ} (hkl : k < l) (hln : l < n) + (s t : Bool) (x y : model.obj (PastingGlobe.category n n k)) + (he : (basisComparison hkl hln).toFun ((rowMap hkl s).toFun x) = + (basisComparison hkl hln).toFun ((rowMap hkl t).toFun y)) : + (rowMap hkl s).toFun x = (rowMap hkl t).toFun y := by + apply row_image_eq hkl hln s t x y + have hs := congrArg (fun F => F.toFun x) (rowMap_comparison hkl s) + have ht := congrArg (fun F => F.toFun y) (rowMap_comparison hkl t) + have hh : (GridGlobeBasis.modelIso hkl hln).hom.toFun + ((comparison hkl).toFun ((rowMap hkl s).toFun x)) = + (GridGlobeBasis.modelIso hkl hln).hom.toFun + ((comparison hkl).toFun ((rowMap hkl t).toFun y)) := he + have hi (z : model.obj (GridGlobe.category n k l hkl)) : + (GridGlobeBasis.modelIso hkl hln).inv.toFun + ((GridGlobeBasis.modelIso hkl hln).hom.toFun z) = z := + congrArg (fun F => F.toFun z) (GridGlobeBasis.modelIso hkl hln).hom_inv_id + exact hs.symm.trans ((hi _).symm.trans + ((congrArg (GridGlobeBasis.modelIso hkl hln).inv.toFun hh).trans ((hi _).trans ht))) + +abbrev atomBasis {n k l : ℕ} (hkl : k < l) (hln : l < n) := + GridGlobeBasis.cylinderOrderedAtomBasis hkl hln + +def representativeRow {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : Bool := + Classical.choose (GridGlobeBasis.cylinderAtom_in_row hkl hln a) + +def representativeIndex {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : PastingGlobeCylinderBasis.Basis n k a.1 := + Classical.choose (Classical.choose_spec (GridGlobeBasis.cylinderAtom_in_row hkl hln a)) + +theorem representative_spec {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : + (RightCylinder.map (GridGlobeBasis.inclusion hkl hln (representativeRow hkl hln a))).realization.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) (representativeIndex hkl hln a)) = + (atomBasis hkl hln).atomCell a := + Classical.choose_spec (Classical.choose_spec (GridGlobeBasis.cylinderAtom_in_row hkl hln a)) + +def atomLift {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : Source (n := n) hkl := + (rowMap hkl (representativeRow hkl hln a)).toFun + ((PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).inv.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) (representativeIndex hkl hln a))) + +theorem atomLift_dimension {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : (Source (n := n) hkl).DimensionLE a.1 (atomLift hkl hln a) := + (rowMap hkl _).dimensionLE ((PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).inv.dimensionLE + (PastingGlobeCylinderBasis.atom_dimension (hkl.trans hln) _)) + +theorem atomLift_image {n k l : ℕ} (hkl : k < l) (hln : l < n) + (a : (atomBasis hkl hln).AtomIndex) : + (basisComparison hkl hln).toFun (atomLift hkl hln a) = (atomBasis hkl hln).atomCell a := by + have he := congrArg (fun F => F.toFun + ((PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).inv.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) (representativeIndex hkl hln a)))) + (rowMap_basisComparison hkl hln (representativeRow hkl hln a)) + have hi := congrArg (fun F => F.toFun + (PastingGlobeCylinderBasis.atom (hkl.trans hln) (representativeIndex hkl hln a))) + (PastingGlobeCylinderBasis.modelIso (hkl.trans hln)).inv_hom_id + exact he.trans ((congrArg + (RightCylinder.map (GridGlobeBasis.inclusion hkl hln (representativeRow hkl hln a))).realization.toFun hi).trans + (representative_spec hkl hln a)) + +end +end Thomason.Construction.StrictOmegaCategory.GridGlobeCylinder + +end + +section + +/-! # Barycentric splitting for the standard simplicial prism + +The simplex over a prism cut duplicates one vertex. Splitting the mass at +that vertex constructs its barycentric coordinates, with an exact projection +back to the original simplex. This is the geometric input for the actual +realization of a simplicial homotopy. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- Remove a specified amount of mass from one vertex. -/ +def remainder {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) (a : ℝ) : + Fin (n+1) →₀ ℝ := x.weights - Finsupp.single j a + +theorem remainder_nonneg {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) + (a : ℝ) (ha : a ≤ x.weights j) : 0 ≤ remainder x j a := by + intro k + change 0 ≤ x.weights k - Finsupp.single j a k + by_cases h : j = k + · subst k + simpa using sub_nonneg.mpr ha + · simp [Ne.symm h] + +/-- Duplicate vertex `j`, assigning mass `a` to its first occurrence. -/ +def splitWeights {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) (a : ℝ) : + Fin (n+2) →₀ ℝ := + Finsupp.single j.castSucc a + (remainder x j a).mapDomain j.castSucc.succAbove + +/-- The split weights form a genuine standard simplex. -/ +def split {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) + (a : ℝ) (ha : 0 ≤ a) (hb : a ≤ x.weights j) : StdSimplex ℝ (Fin (n+2)) where + weights := splitWeights x j a + nonneg := add_nonneg (Finsupp.single_nonneg.mpr ha) + (Finsupp.mapDomain_nonneg (remainder_nonneg x j a hb)) + total := by + unfold splitWeights remainder + rw [Finsupp.sum_add_index' (by intro; rfl) (by intros; rfl), + Finsupp.sum_single_index (by rfl), + Finsupp.sum_mapDomain_index (by intro; rfl) (by intros; rfl), + Finsupp.sum_sub_index (by intros; rfl), Finsupp.sum_single_index (by rfl), x.total] + ring + +/-- Collapsing the duplicated vertex recovers exactly the original point. -/ +theorem split_projection {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) + (a : ℝ) (ha : 0 ≤ a) (hb : a ≤ x.weights j) : + StdSimplex.map j.predAbove (split x j a ha hb) = x := by + apply StdSimplex.ext + change (splitWeights x j a).mapDomain j.predAbove = x.weights + unfold splitWeights + rw [Finsupp.mapDomain_add, Finsupp.mapDomain_single, Fin.predAbove_castSucc_self, + ← Finsupp.mapDomain_comp] + have h : j.predAbove ∘ j.castSucc.succAbove = id := by + funext k + exact Fin.predAbove_succAbove j k + rw [h, Finsupp.mapDomain_id] + unfold remainder + abel + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The finite closed regions of the standard simplicial prism + +Cumulative barycentric mass locates the simplex of the usual prism +triangulation. The regions cover the whole topological simplex times I. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +/-- Barycentric mass before the `k`th vertex. -/ +def cumulative {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (k : ℕ) : ℝ := + ∑ i : Fin (n+1), if i.val < k then x.weights i else 0 + +@[simp] +theorem cumulative_zero {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) : cumulative x 0 = 0 := by + simp [cumulative] + +@[simp] +theorem cumulative_all {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) : cumulative x (n+1) = 1 := by + simpa only [cumulative, Fin.is_lt, ite_true] using x.total_of_fintype + +theorem cumulative_step {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) : + cumulative x (j.val+1) = cumulative x j.val + x.weights j := by + classical + have h : ∀ i : Fin (n+1), + (if i.val < j.val+1 then x.weights i else 0) = + (if i.val < j.val then x.weights i else 0) + (if i = j then x.weights j else 0) := by + intro i + by_cases he : i = j + · subst i; simp + · have hn : i.val ≠ j.val := fun h => he (Fin.ext h) + by_cases hi : i.val < j.val + · simp [he, hi, Nat.lt_succ_of_lt hi] + · have hi' : ¬ i.val < j.val+1 := by omega + simp [he, hi, hi'] + simp only [cumulative, h, Finset.sum_add_distrib] + simp + +/-- Every mass threshold lies in one of the consecutive vertex intervals. -/ +theorem exists_cut {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (s : ℝ) + (hs₀ : 0 ≤ s) (hs₁ : s ≤ 1) : + ∃ j : Fin (n+1), cumulative x j.val ≤ s ∧ s ≤ cumulative x (j.val+1) := by + have hex : ∃ k : ℕ, k ≤ n ∧ s ≤ cumulative x (k+1) := + ⟨n, le_rfl, by simpa using hs₁⟩ + let k := Nat.find hex + have hk := Nat.find_spec hex + refine ⟨⟨k, by omega⟩, ?_, hk.2⟩ + by_contra! hlow + have hpos : 0 < k := by + by_contra h + have he : k = 0 := by omega + have hn : s < 0 := by simpa [he] using hlow + exact (not_lt_of_ge hs₀) hn + have hprev : k-1 ≤ n ∧ s ≤ cumulative x (k-1+1) := by + constructor + · omega + · have he : k-1+1 = k := by omega + rw [he] + exact hlow.le + have hmin := Nat.find_min' hex hprev + change k ≤ k-1 at hmin + omega + +/-- The closed region on which the prism cut passes through vertex `j`. -/ +def region {n : ℕ} (j : Fin (n+1)) : Set (StdSimplex ℝ (Fin (n+1)) × unitInterval) := + {p | cumulative p.1 j.val ≤ 1 - (p.2 : ℝ) ∧ 1 - (p.2 : ℝ) ≤ cumulative p.1 (j.val+1)} + +theorem continuous_cumulative {n : ℕ} (k : ℕ) : + Continuous (fun x : StdSimplex ℝ (Fin (n+1)) => cumulative x k) := by + unfold cumulative + apply continuous_finsetSum + intro i hi + split_ifs + · exact StdSimplex.continuous_weights_apply ℝ i + · exact continuous_const + +theorem region_isClosed {n : ℕ} (j : Fin (n+1)) : IsClosed (region j) := + (isClosed_le ((continuous_cumulative j.val).comp continuous_fst) + (continuous_const.sub continuous_snd.subtype_val)).inter + (isClosed_le (continuous_const.sub continuous_snd.subtype_val) + ((continuous_cumulative (j.val+1)).comp continuous_fst)) + +theorem region_cover (n : ℕ) : ⋃ j : Fin (n+1), region j = Set.univ := by + apply Set.eq_univ_of_forall + intro p + obtain ⟨j, hj⟩ := exists_cut p.1 (1 - (p.2 : ℝ)) + (sub_nonneg.mpr p.2.property.2) (by linarith [p.2.property.1]) + exact Set.mem_iUnion.mpr ⟨j, hj⟩ + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Continuous barycentric charts for the standard prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- The barycentric amount assigned to the lower copy of the cut vertex. -/ +def cutMass {n : ℕ} (j : Fin (n+1)) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) : ℝ := + 1 - (p.2 : ℝ) - cumulative p.1 j.val + +theorem cutMass_nonneg {n : ℕ} (j : Fin (n+1)) (p : region j) : + 0 ≤ cutMass j p.val := sub_nonneg.mpr p.property.1 + +theorem cutMass_le {n : ℕ} (j : Fin (n+1)) (p : region j) : + cutMass j p.val ≤ p.val.1.weights j := by + have h := p.property.2 + rw [cumulative_step] at h + exact sub_le_iff_le_add.mpr (by simpa [add_comm] using h) + +/-- The chart on the `j`th closed region, in the corresponding `(n+1)`-simplex. -/ +def chart {n : ℕ} (j : Fin (n+1)) : C(region j, StdSimplex ℝ (Fin (n+2))) where + toFun p := split p.val.1 j (cutMass j p.val) (cutMass_nonneg j p) (cutMass_le j p) + continuous_toFun := by + rw [(StdSimplex.isEmbedding_toFun_comp_weights ℝ (Fin (n+2))).continuous_iff] + apply continuous_pi + intro k + change Continuous (fun p : region j => splitWeights p.val.1 j (cutMass j p.val) k) + simp only [splitWeights, Finsupp.coe_add, Pi.add_apply, Finsupp.mapDomain_fintype, + Finsupp.coe_finsetSum, Finset.sum_apply, Finsupp.single_apply, remainder, + Finsupp.coe_sub, Pi.sub_apply] + have hc : Continuous (fun p : region j => cumulative p.val.1 j.val) := + (continuous_cumulative j.val).comp (continuous_fst.comp continuous_subtype_val) + have ha : Continuous (fun p : region j => cutMass j p.val) := + (continuous_const.sub (continuous_snd.comp continuous_subtype_val).subtype_val).sub hc + apply Continuous.add + · split_ifs + · exact ha + · exact continuous_const + · apply continuous_finsetSum + intro i hi + split_ifs <;> fun_prop + +/-- A chart has exactly the original barycentric first projection. -/ +theorem chart_projection {n : ℕ} (j : Fin (n+1)) (p : region j) : + StdSimplex.map j.predAbove (chart j p) = p.val.1 := + split_projection p.val.1 j (cutMass j p.val) (cutMass_nonneg j p) (cutMass_le j p) + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Boundary values of the standard prism charts -/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- The zero-mass cut lies in the face omitting its lower copy. -/ +theorem split_zero {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) : + split x j 0 le_rfl (x.weights_nonneg j) = StdSimplex.map j.castSucc.succAbove x := by + apply StdSimplex.ext + change splitWeights x j 0 = x.weights.mapDomain j.castSucc.succAbove + simp [splitWeights, remainder] + +/-- Away from the duplicated vertex, the two adjacent face embeddings agree. -/ +theorem adjacent_embeddings {n : ℕ} (j k : Fin (n+1)) (h : k ≠ j) : + j.castSucc.succAbove k = j.succ.succAbove k := by + rcases lt_or_gt_of_ne h with hk | hk + · rw [Fin.succAbove_castSucc_of_lt _ _ hk, Fin.succAbove_succ_of_le _ _ hk.le] + · rw [Fin.succAbove_castSucc_of_le _ _ hk.le, Fin.succAbove_succ_of_lt _ _ hk] + +/-- Moving the entire weight to the lower copy lies in the other face. -/ +theorem split_full {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) (j : Fin (n+1)) : + split x j (x.weights j) (x.weights_nonneg j) le_rfl = StdSimplex.map j.succ.succAbove x := by + have hc : (remainder x j (x.weights j)).mapDomain j.castSucc.succAbove = + (remainder x j (x.weights j)).mapDomain j.succ.succAbove := by + apply Finsupp.mapDomain_congr + intro k hk + apply adjacent_embeddings j k + intro he + subst k + simp [remainder] at hk + apply StdSimplex.ext + change splitWeights x j (x.weights j) = x.weights.mapDomain j.succ.succAbove + unfold splitWeights + rw [hc] + have he : x.weights = Finsupp.single j (x.weights j) + remainder x j (x.weights j) := by + unfold remainder + abel + conv_rhs => rw [he, Finsupp.mapDomain_add, Finsupp.mapDomain_single, Fin.succAbove_succ_self] + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Realization charts and common faces of the standard prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +/-- The actual product of the two representable simplicial sets. -/ +abbrev prism (n : ℕ) : SSet.{0} := Δ[n] ⊗ Δ[1] + +/-- The `j`th maximal simplex of the standard simplicial prism. -/ +abbrev simplexIndex {n : ℕ} (j : Fin (n+1)) : + CostructuredArrow SSet.stdSimplex (prism n) := + CostructuredArrow.mk (SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val) + +/-- Its codimension-one face at a cut between vertices. -/ +abbrev faceIndex {n : ℕ} (j : Fin (n+2)) : + CostructuredArrow SSet.stdSimplex (prism n) := + CostructuredArrow.mk (SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.codimOneSimplex j).val) + +/-- The face omitting the upper occurrence of the cut vertex. -/ +def upperFace {n : ℕ} (j : Fin (n+1)) : faceIndex j.succ ⟶ simplexIndex j := + CostructuredArrow.homMk (SimplexCategory.δ j.succ) (by + change SSet.stdSimplex.map (SimplexCategory.δ j.succ) ≫ + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val = + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.codimOneSimplex j.succ).val + rw [SSet.yonedaEquiv_symm_naturality_left] + exact congrArg SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.δ_succ_nonDegenerateEquiv j)) + +/-- The face omitting the lower occurrence of the cut vertex. -/ +def lowerFace {n : ℕ} (j : Fin (n+1)) : faceIndex j.castSucc ⟶ simplexIndex j := + CostructuredArrow.homMk (SimplexCategory.δ j.castSucc) (by + change SSet.stdSimplex.map (SimplexCategory.δ j.castSucc) ≫ + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val = + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.codimOneSimplex j.castSucc).val + rw [SSet.yonedaEquiv_symm_naturality_left] + exact congrArg SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.δ_castSucc_nonDegenerateEquiv j)) + +/-- Map a barycentric chart to the actual geometric realization of the prism. -/ +def realizedChart {n : ℕ} (j : Fin (n+1)) : C(region j, SSet.toTop.obj (prism n)) where + toFun p := (RealizationPrism.leg (prism n) (simplexIndex j)).hom (ULift.up (chart j p)) + continuous_toFun := (RealizationPrism.leg (prism n) (simplexIndex j)).hom.continuous.comp + ((continuous_uliftUp.comp (chart j).continuous)) + +/-- The realized upper face is its original codimension-one realization leg. -/ +theorem upperFace_value {n : ℕ} (j : Fin (n+1)) (x : StdSimplex ℝ (Fin (n+1))) : + (RealizationPrism.leg (prism n) (simplexIndex j)).hom + (ULift.up (StdSimplex.map j.succ.succAbove x)) = + (RealizationPrism.leg (prism n) (faceIndex j.succ)).hom (ULift.up x) := by + exact congrArg (fun f => f.hom (ULift.up x)) + ((RealizationPrism.cocone (prism n)).w (upperFace j)) + +/-- The realized lower face is its original codimension-one realization leg. -/ +theorem lowerFace_value {n : ℕ} (j : Fin (n+1)) (x : StdSimplex ℝ (Fin (n+1))) : + (RealizationPrism.leg (prism n) (simplexIndex j)).hom + (ULift.up (StdSimplex.map j.castSucc.succAbove x)) = + (RealizationPrism.leg (prism n) (faceIndex j.castSucc)).hom (ULift.up x) := by + exact congrArg (fun f => f.hom (ULift.up x)) + ((RealizationPrism.cocone (prism n)).w (lowerFace j)) + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Agreement of standard prism charts on all overlaps -/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +theorem cumulative_monotone {n : ℕ} (x : StdSimplex ℝ (Fin (n+1))) : + Monotone (cumulative x) := by + intro k l hkl + apply Finset.sum_le_sum + intro i hi + by_cases hik : i.val < k + · have hil : i.val < l := lt_of_lt_of_le hik hkl + simp only [ite_eq_left hik, ite_eq_left hil] + exact le_rfl + · simp only [ite_eq_right hik] + split_ifs + · exact x.weights_nonneg i + · exact le_rfl + +/-- All intermediate charts contain a point belonging to the two extreme charts. -/ +theorem region_between {n : ℕ} {j k l : Fin (n+1)} (hjl : j ≤ l) (hlk : l ≤ k) + {p : StdSimplex ℝ (Fin (n+1)) × unitInterval} (hj : p ∈ region j) (hk : p ∈ region k) : + p ∈ region l := + ⟨((cumulative_monotone p.1) hlk).trans hk.1, + hj.2.trans ((cumulative_monotone p.1) (Nat.succ_le_succ hjl))⟩ + +/-- Adjacent charts have equal values on their common face. -/ +theorem realizedChart_adjacent {n : ℕ} (j : Fin n) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) + (h₀ : p ∈ region j.castSucc) (h₁ : p ∈ region j.succ) : + realizedChart j.castSucc ⟨p, h₀⟩ = realizedChart j.succ ⟨p, h₁⟩ := by + have hs : 1 - (p.2 : ℝ) = cumulative p.1 (j.val+1) := le_antisymm h₀.2 h₁.1 + have hm₀ : cutMass j.castSucc p = p.1.weights j.castSucc := by + unfold cutMass + rw [hs] + have hc := cumulative_step p.1 j.castSucc + change cumulative p.1 (j.val+1) = cumulative p.1 j.val + p.1.weights j.castSucc at hc + change cumulative p.1 (j.val+1) - cumulative p.1 j.val = _ + linarith + have hm₁ : cutMass j.succ p = 0 := by + unfold cutMass + rw [hs] + exact sub_self _ + have hc₀ : chart j.castSucc ⟨p, h₀⟩ = StdSimplex.map j.castSucc.succ.succAbove p.1 := by + change split p.1 j.castSucc (cutMass j.castSucc p) + (cutMass_nonneg j.castSucc ⟨p, h₀⟩) (cutMass_le j.castSucc ⟨p, h₀⟩) = _ + simpa only [hm₀] using split_full p.1 j.castSucc + have hc₁ : chart j.succ ⟨p, h₁⟩ = StdSimplex.map j.succ.castSucc.succAbove p.1 := by + change split p.1 j.succ (cutMass j.succ p) + (cutMass_nonneg j.succ ⟨p, h₁⟩) (cutMass_le j.succ ⟨p, h₁⟩) = _ + simpa only [hm₁] using split_zero p.1 j.succ + change (RealizationPrism.leg (prism n) (simplexIndex j.castSucc)).hom (ULift.up _) = + (RealizationPrism.leg (prism n) (simplexIndex j.succ)).hom (ULift.up _) + rw [hc₀, hc₁, upperFace_value, lowerFace_value, Fin.castSucc_succ] + +/-- All charts agree, including overlaps involving zero barycentric weights. -/ +theorem realizedChart_overlap_le {n : ℕ} (j k : Fin (n+1)) (hjk : j ≤ k) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) + (hj : p ∈ region j) (hk : p ∈ region k) : + realizedChart j ⟨p, hj⟩ = realizedChart k ⟨p, hk⟩ := by + induction k using Fin.induction with + | zero => + have he : j = 0 := le_antisymm hjk (Fin.zero_le _) + subst j + rfl + | succ k ih => + by_cases h : j ≤ k.castSucc + · have hm := region_between h k.castSucc_le_succ hj hk + exact (ih h hm).trans (realizedChart_adjacent k p hm hk) + · have he : j = k.succ := by + apply Fin.ext + change j.val = k.val+1 + have hu : j.val ≤ k.val+1 := hjk + have hl : ¬ j.val ≤ k.val := h + omega + subst j + rfl + +theorem realizedChart_overlap {n : ℕ} (j k : Fin (n+1)) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) + (hj : p ∈ region j) (hk : p ∈ region k) : + realizedChart j ⟨p, hj⟩ = realizedChart k ⟨p, hk⟩ := by + rcases le_total j k with h | h + · exact realizedChart_overlap_le j k h p hj hk + · exact (realizedChart_overlap_le k j h p hk hj).symm + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The actual continuous standard prism in geometric realization + +The finite barycentric charts agree on closed overlaps, including all +zero-weight degeneracies. They therefore glue to a continuous map from +`|Δ[n]| × I` to `|Δ[n] × Δ[1]|`. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- The actual standard prism, assembled from its maximal simplices. -/ +def standardPrism (n : ℕ) : + C(StdSimplex ℝ (Fin (n+1)) × unitInterval, SSet.toTop.obj (prism n)) where + toFun := Set.liftCover region (fun j => realizedChart j) realizedChart_overlap (region_cover n) + continuous_toFun := by + apply (locallyFinite_of_finite (region (n := n))).continuous (region_cover n) region_isClosed + intro j + rw [continuousOn_iff_continuous_domRestrict] + have he : (region j).domRestrict + (Set.liftCover region (fun j => realizedChart j) realizedChart_overlap (region_cover n)) = + realizedChart j := by + funext x + exact Set.liftCover_coe x + rw [he] + exact (realizedChart j).continuous + +/-- The assembled map restricts to the originally defined chart. -/ +theorem standardPrism_on_region {n : ℕ} (j : Fin (n+1)) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) (hp : p ∈ region j) : + standardPrism n p = realizedChart j ⟨p, hp⟩ := by + change Set.liftCover region (fun j => realizedChart j) realizedChart_overlap (region_cover n) p = _ + exact Set.liftCover_of_mem hp + +/-- At time zero the prism is its all-zero face. -/ +theorem standardPrism_zero (n : ℕ) (x : StdSimplex ℝ (Fin (n+1))) : + standardPrism n (x, 0) = + (RealizationPrism.leg (prism n) (faceIndex (Fin.last (n+1)))).hom (ULift.up x) := by + have hc : cumulative x n + x.weights (Fin.last n) = 1 := by + have h := cumulative_step x (Fin.last n) + simpa using h.symm + have hp : (x, (0 : unitInterval)) ∈ region (Fin.last n) := by + constructor + · change cumulative x n ≤ 1 - (0 : ℝ) + have hw := x.weights_nonneg (Fin.last n) + linarith + · simp + rw [standardPrism_on_region (Fin.last n) _ hp] + have hm : cutMass (Fin.last n) (x, 0) = x.weights (Fin.last n) := by + change 1 - (0 : ℝ) - cumulative x n = _ + linarith + have he : chart (Fin.last n) ⟨(x, 0), hp⟩ = + StdSimplex.map (Fin.last n).succ.succAbove x := by + change split x (Fin.last n) (cutMass (Fin.last n) (x, 0)) + (cutMass_nonneg _ ⟨(x, 0), hp⟩) (cutMass_le _ ⟨(x, 0), hp⟩) = _ + simpa only [hm] using split_full x (Fin.last n) + change (RealizationPrism.leg (prism n) (simplexIndex (Fin.last n))).hom (ULift.up _) = _ + rw [he, upperFace_value] + rfl + +/-- At time one the prism is its all-one face. -/ +theorem standardPrism_one (n : ℕ) (x : StdSimplex ℝ (Fin (n+1))) : + standardPrism n (x, 1) = + (RealizationPrism.leg (prism n) (faceIndex (0 : Fin (n+2)))).hom (ULift.up x) := by + have hp : (x, (1 : unitInterval)) ∈ region (0 : Fin (n+1)) := by + constructor + · simp + · change 1 - (1 : ℝ) ≤ cumulative x (0+1) + have h := cumulative_step x (0 : Fin (n+1)) + have he : cumulative x 1 = x.weights 0 := by + simpa only [Fin.val_zero, cumulative_zero, zero_add] using h + rw [he, sub_self] + exact x.weights_nonneg 0 + rw [standardPrism_on_region (0 : Fin (n+1)) _ hp] + have hm : cutMass (0 : Fin (n+1)) (x, 1) = 0 := by simp [cutMass] + have he : chart (0 : Fin (n+1)) ⟨(x, 1), hp⟩ = + StdSimplex.map (0 : Fin (n+1)).castSucc.succAbove x := by + change split x (0 : Fin (n+1)) (cutMass 0 (x, 1)) + (cutMass_nonneg _ ⟨(x, 1), hp⟩) (cutMass_le _ ⟨(x, 1), hp⟩) = _ + simpa only [hm] using split_zero x (0 : Fin (n+1)) + change (RealizationPrism.leg (prism n) (simplexIndex (0 : Fin (n+1)))).hom (ULift.up _) = _ + rw [he, lowerFace_value] + rfl + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # First-projection compatibility of the actual standard prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +/-- The original representable simplex, indexed by its identity map. -/ +abbrev baseIndex (n : ℕ) : CostructuredArrow SSet.stdSimplex (Δ[n] : SSet.{0}) := + CostructuredArrow.mk (𝟙 _) + +/-- Collapsing the duplicated vertex is exactly the first prism projection. -/ +def firstProjectionMap {n : ℕ} (j : Fin (n+1)) : + (CostructuredArrow.map (fst (Δ[n] : SSet.{0}) Δ[1])).obj (simplexIndex j) ⟶ baseIndex n := + CostructuredArrow.homMk (SimplexCategory.σ j) (by + change SSet.stdSimplex.map (SimplexCategory.σ j) ≫ 𝟙 _ = + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val ≫ fst _ _ + rw [Category.comp_id] + apply SSet.yonedaEquiv.injective + rw [SSet.yonedaEquiv_comp, Equiv.apply_symm_apply] + rfl) + +/-- Every chart projects back to its original barycentric point in realization. -/ +theorem realizedChart_firstProjection {n : ℕ} (j : Fin (n+1)) (p : region j) : + (SSet.toTop.map (fst (Δ[n] : SSet.{0}) Δ[1])).hom (realizedChart j p) = + (RealizationPrism.leg (Δ[n] : SSet.{0}) (baseIndex n)).hom (ULift.up p.val.1) := by + have hn := congrArg (fun f => f.hom (ULift.up (chart j p))) + (RealizationPrism.leg_naturality (fst (Δ[n] : SSet.{0}) Δ[1]) (simplexIndex j)) + have hf := congrArg (fun f => f.hom (ULift.up (chart j p))) + ((RealizationPrism.cocone (Δ[n] : SSet.{0})).w (firstProjectionMap j)) + change _ = _ at hn + change (RealizationPrism.leg (Δ[n] : SSet.{0}) (baseIndex n)).hom + (ULift.up (StdSimplex.map j.predAbove (chart j p))) = _ at hf + exact hn.trans (hf.symm.trans (congrArg + (fun x => (RealizationPrism.leg (Δ[n] : SSet.{0}) (baseIndex n)).hom (ULift.up x)) + (chart_projection j p))) + +/-- The assembled prism has the prescribed first projection at every point. -/ +theorem standardPrism_firstProjection (n : ℕ) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) : + (SSet.toTop.map (fst (Δ[n] : SSet.{0}) Δ[1])).hom (standardPrism n p) = + (RealizationPrism.leg (Δ[n] : SSet.{0}) (baseIndex n)).hom (ULift.up p.1) := by + have hp : p ∈ ⋃ j : Fin (n+1), region j := by rw [region_cover]; trivial + obtain ⟨j, hj⟩ := Set.mem_iUnion.mp hp + rw [standardPrism_on_region j p hj] + exact realizedChart_firstProjection j ⟨p, hj⟩ + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The two actual simplicial endpoints of the standard realization prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +theorem zeroFace_hom (n : ℕ) : + (faceIndex (Fin.last (n+1))).hom = SSet.ι₀ (X := (Δ[n] : SSet.{0})) := by + apply SSet.yonedaEquiv.injective + change (SSet.prodStdSimplex₁.codimOneSimplex (Fin.last (n+1))).val = _ + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change ((SSet.stdSimplex.objMk₁.{0} (Fin.last (n+1))) k : Fin 2).val = (0 : Fin 2).val + exact congrArg Fin.val (SSet.stdSimplex.objMk₁_of_castSucc_lt.{0} _ k (Fin.castSucc_lt_last k)) + +theorem oneFace_hom (n : ℕ) : + (faceIndex (0 : Fin (n+2))).hom = SSet.ι₁ (X := (Δ[n] : SSet.{0})) := by + apply SSet.yonedaEquiv.injective + change (SSet.prodStdSimplex₁.codimOneSimplex (0 : Fin (n+2))).val = _ + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change ((SSet.stdSimplex.objMk₁.{0} (0 : Fin (n+2))) k : Fin 2).val = (1 : Fin 2).val + exact congrArg Fin.val (SSet.stdSimplex.objMk₁_of_le_castSucc.{0} _ k (Fin.zero_le _)) + +/-- The standard prism expressed in the exact topological-simplex convention +used by the realization colimit (including its universe lift). -/ +def liftedStandardPrism (n : ℕ) : + TopologicalInterval.cylinder.obj (SimplexCategory.toTop.{0}.obj (.mk n)) ⟶ + SSet.toTop.obj (prism n) := + TopCat.ofHom ((standardPrism n).comp ⟨fun p => (p.1.down, p.2), by fun_prop⟩) + +/-- At zero, the continuous prism is exactly realization of the simplicial +zero endpoint, preceded by the canonical representable comparison. -/ +theorem liftedStandardPrism_zero (n : ℕ) : + TopologicalInterval.sectionAt (SimplexCategory.toTop.{0}.obj (.mk n)) 0 ≫ + liftedStandardPrism n = SSet.toTopSimplex.inv.app (.mk n) ≫ SSet.toTop.map SSet.ι₀ := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + have h := standardPrism_zero n x.down + change standardPrism n (x.down, 0) = _ + rw [h] + change (SSet.toTopSimplex.inv.app (.mk n) ≫ + SSet.toTop.map (faceIndex (Fin.last (n+1))).hom).hom x = _ + rw [zeroFace_hom] + +/-- The analogous equality at the one endpoint. -/ +theorem liftedStandardPrism_one (n : ℕ) : + TopologicalInterval.sectionAt (SimplexCategory.toTop.{0}.obj (.mk n)) 1 ≫ + liftedStandardPrism n = SSet.toTopSimplex.inv.app (.mk n) ≫ SSet.toTop.map SSet.ι₁ := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + have h := standardPrism_one n x.down + change standardPrism n (x.down, 1) = _ + rw [h] + change (SSet.toTopSimplex.inv.app (.mk n) ≫ + SSet.toTop.map (faceIndex (0 : Fin (n+2))).hom).hom x = _ + rw [oneFace_hom] + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Cumulative mass under ordinal maps + +These identities include noninjective ordinal maps. They show that every +prism chart maps into the chart indexed by the image of its cut vertex. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +/-- Pushforward barycentric mass below a threshold is the mass of its preimage. -/ +theorem cumulative_map {m n : ℕ} (f : Fin (m+1) → Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (k : ℕ) : + cumulative (StdSimplex.map f x) k = + ∑ i : Fin (m+1), if (f i).val < k then x.weights i else 0 := by + classical + unfold cumulative + rw [← Finsupp.sum_fintype (StdSimplex.map f x).weights + (fun i a => if i.val < k then a else 0) (by intro i; split_ifs <;> rfl)] + change (x.weights.mapDomain f).sum (fun i a => if i.val < k then a else 0) = _ + rw [Finsupp.sum_mapDomain_index (by intro i; split_ifs <;> rfl) + (by intro i a b; split_ifs <;> simp)] + exact Finsupp.sum_fintype _ _ (by intro; simp) + +/-- No vertex at or after the cut maps strictly below its image cut. -/ +theorem cumulative_map_lower {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) : + cumulative (StdSimplex.map f x) (f j).val ≤ cumulative x j.val := by + rw [cumulative_map] + apply Finset.sum_le_sum + intro i hi + by_cases hf : (f i).val < (f j).val + · have hij : i.val < j.val := by + by_contra! hh + have hm := f.monotone hh + exact (not_lt_of_ge hm) hf + simp only [ite_eq_left hf, ite_eq_left hij] + exact le_rfl + · simp only [ite_eq_right hf] + split_ifs + · exact x.weights_nonneg i + · exact le_rfl + +/-- Every vertex up to the cut maps to a vertex up to its image. -/ +theorem cumulative_map_upper {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) : + cumulative x (j.val+1) ≤ cumulative (StdSimplex.map f x) ((f j).val+1) := by + rw [cumulative_map] + apply Finset.sum_le_sum + intro i hi + by_cases hij : i.val < j.val+1 + · have hf : (f i).val < (f j).val+1 := by + have hm := f.monotone (show i ≤ j from by omega) + omega + simp only [ite_eq_left hij, ite_eq_left hf] + exact le_rfl + · simp only [ite_eq_right hij] + split_ifs + · exact x.weights_nonneg i + · exact le_rfl + +/-- The image of a closed prism region belongs to the corresponding image region. -/ +theorem region_map {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) + (p : region j) : (StdSimplex.map f p.val.1, p.val.2) ∈ region (f j) := + ⟨(cumulative_map_lower f p.val.1 j).trans p.property.1, + p.property.2.trans (cumulative_map_upper f p.val.1 j)⟩ + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Ordinal maps between the actual maximal prism simplices + +The cut vertex maps to its image even when the ordinal map is degenerate. +The first-coordinate and side-of-cut identities are proved explicitly. +-/ + +namespace Thomason.Construction.PrismBarycentric + +def prismOrdinal {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) : + Fin (m+2) →o Fin (n+2) where + toFun k := if k ≤ j.castSucc then (f (j.predAbove k)).castSucc else (f (j.predAbove k)).succ + monotone' a b hab := by + have hf := f.monotone (j.predAbove_right_monotone hab) + dsimp + split_ifs with ha hb hb + · exact Fin.castSucc_le_castSucc_iff.mpr hf + · change (f (j.predAbove a)).val ≤ (f (j.predAbove b)).val+1 + have hv : (f (j.predAbove a)).val ≤ (f (j.predAbove b)).val := hf + omega + · exact False.elim (ha (hab.trans hb)) + · exact Fin.succ_le_succ_iff.mpr hf + +@[simp] +theorem prismOrdinal_apply {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) + (k : Fin (m+2)) : prismOrdinal f j k = + if k ≤ j.castSucc then (f (j.predAbove k)).castSucc else (f (j.predAbove k)).succ := rfl + +theorem predAbove_le_cut {m : ℕ} (j : Fin (m+1)) {k : Fin (m+2)} + (hk : k ≤ j.castSucc) : j.predAbove k ≤ j := by + simpa only [Fin.predAbove_castSucc_self] using j.predAbove_right_monotone hk + +theorem cut_le_predAbove {m : ℕ} (j : Fin (m+1)) {k : Fin (m+2)} + (hk : j.castSucc < k) : j ≤ j.predAbove k := by + have hs : j.succ ≤ k := by + change j.val+1 ≤ k.val + exact hk + simpa only [Fin.predAbove_succ_self] using j.predAbove_right_monotone hs + +/-- The first coordinate is exactly the original ordinal map. -/ +theorem prismOrdinal_first {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) + (k : Fin (m+2)) : + (f j).predAbove (prismOrdinal f j k) = f (j.predAbove k) := by + by_cases hk : k ≤ j.castSucc + · simp only [prismOrdinal_apply, ite_eq_left hk] + exact Fin.predAbove_castSucc_of_le _ _ (f.monotone (predAbove_le_cut j hk)) + · simp only [prismOrdinal_apply, ite_eq_right hk] + exact Fin.predAbove_succ_of_le _ _ (f.monotone (cut_le_predAbove j (lt_of_not_ge hk))) + +/-- Both ends of the doubled cut stay on their prescribed sides. -/ +theorem prismOrdinal_cut {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) + (k : Fin (m+2)) : + prismOrdinal f j k ≤ (f j).castSucc ↔ k ≤ j.castSucc := by + by_cases hk : k ≤ j.castSucc + · simp only [prismOrdinal_apply, hk, iff_true] + exact Fin.castSucc_le_castSucc_iff.mpr (f.monotone (predAbove_le_cut j hk)) + · simp only [prismOrdinal_apply, hk, iff_false] + have h := f.monotone (cut_le_predAbove j (lt_of_not_ge hk)) + change ¬ (f (j.predAbove k)).val+1 ≤ (f j).val + have hv : (f j).val ≤ (f (j.predAbove k)).val := h + omega + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Compatibility of prism simplices with every ordinal map -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +/-- The lifted ordinal map is an actual map between the corresponding +simplices of the simplicial prism, including degenerate ordinal maps. -/ +def simplexNaturality {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) : + (CostructuredArrow.map (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1])).obj + (simplexIndex j) ⟶ simplexIndex (f j) := + CostructuredArrow.homMk (SimplexCategory.Hom.mk (prismOrdinal f j)) (by + change SSet.stdSimplex.map (SimplexCategory.Hom.mk (prismOrdinal f j)) ≫ + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv (f j)).val = + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val ≫ + (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1]) + apply SSet.yonedaEquiv.injective + rw [← SSet.yonedaEquiv_naturality, SSet.yonedaEquiv_comp] + change (prism n).map (Quiver.Hom.op (show SimplexCategory.mk (m+1) ⟶ SimplexCategory.mk (n+1) from + SimplexCategory.Hom.mk (prismOrdinal f j))) + (SSet.prodStdSimplex₁.nonDegenerateEquiv (f j)).val = + (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1]).app _ + (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val + apply Prod.ext + · apply SSet.stdSimplex.objEquiv.injective + ext k + exact congrArg Fin.val (prismOrdinal_first f j k) + · apply SSet.stdSimplex.objEquiv.injective + ext k + change (if (prismOrdinal f j k).castSucc < (f j).succ.castSucc then (0 : Fin 2) else 1).val = + (if k.castSucc < j.succ.castSucc then (0 : Fin 2) else 1).val + have h := prismOrdinal_cut f j k + have hc : (prismOrdinal f j k).castSucc < (f j).succ.castSucc ↔ + k.castSucc < j.succ.castSucc := by + change (prismOrdinal f j k).val < (f j).val+1 ↔ k.val < j.val+1 + change (prismOrdinal f j k).val ≤ (f j).val ↔ k.val ≤ j.val at h + omega + simp only [hc]) + +end + +end Thomason.Construction.PrismBarycentric + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/RightCylinderPrism.lean b/lean/OAI/CategoryTheory/Thomason/Gray/RightCylinderPrism.lean new file mode 100644 index 0000000000000000000000000000000000000000..57b42510c1a46a73b70ef4dd8d883ee2c83e6196 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/RightCylinderPrism.lean @@ -0,0 +1,915 @@ +import OAI.CategoryTheory.Thomason.Chains.SimplexBasisHeight +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Simplicial.RealizedSimplexWeakEquivalences +import Mathlib.Data.Nat.Bits + +namespace OAI + +section + +/-! # The upper atom of a one-generator expression + +An expression containing exactly one atom of degree greater than r maps +to that atom above r. Lower-dimensional whiskering changes no such table +entry. No assumption on the expression's composition levels is needed. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory StrictOmegaCategory.ExpressionDegree + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +private theorem mapped_comp_table_left_bounded {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {x y : C} {r s n : ℕ} + (hxy : C.target s x = C.source s y) (hs : s ≤ r) + (hx : C.DimensionLE r x) (hn : r < n) (side : Bool) : + (F.toFun (C.comp s x y hxy)).table side n = (F.toFun y).table side n := by + have hf : K.realization.target s (F.toFun x) = K.realization.source s (F.toFun y) := + (F.map_face true s x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false s y)) + have he := congrArg (fun z : Cell K => z.table side n) (F.map_comp s x y hxy hf) + have hz := Cell.table_zero_of_dimensionLE (F.dimensionLE hx) hn side + refine he.trans ?_ + change Cell.pasteTable (F.toFun x) (F.toFun y) s side n = (F.toFun y).table side n + simp only [Cell.pasteTable, Nat.not_lt.mpr (hs.trans hn.le), + Nat.ne_of_gt (hs.trans_lt hn), ite_false, hz, zero_add] + +private theorem mapped_comp_table_right_bounded {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {x y : C} {r s n : ℕ} + (hxy : C.target s x = C.source s y) (hs : s ≤ r) + (hy : C.DimensionLE r y) (hn : r < n) (side : Bool) : + (F.toFun (C.comp s x y hxy)).table side n = (F.toFun x).table side n := by + have hf : K.realization.target s (F.toFun x) = K.realization.source s (F.toFun y) := + (F.map_face true s x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false s y)) + have he := congrArg (fun z : Cell K => z.table side n) (F.map_comp s x y hxy hf) + have hz := Cell.table_zero_of_dimensionLE (F.dimensionLE hy) hn side + refine he.trans ?_ + change Cell.pasteTable (F.toFun x) (F.toFun y) s side n = (F.toFun x).table side n + simp only [Cell.pasteTable, Nat.not_lt.mpr (hs.trans hn.le), + Nat.ne_of_gt (hs.trans_lt hn), ite_false, hz, add_zero] + +/-- The unique higher occurrence in an expression supplies its actual +positive upper atom. The occurrence itself is retained in the conclusion. -/ +theorem expression_upper_atom {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + {x : C} (t : CompositionExpression C g x) (r : ℕ) + (ht : highCount (fun a : B.AtomIndex => a.1) r t.labels = 1) : + ∃ a ∈ t.labels, r < a.1 ∧ + ∀ n, r < n → ∀ side, (F.toFun x).table side n = (B.atomCell a).table side n := by + induction t with + | generator a => + have ha : r < a.1 := by + by_contra ha + simp [CompositionExpression.labels, highCount, ha] at ht + exact ⟨a, by simp [CompositionExpression.labels], ha, fun n _ side => + congrArg (fun z : Cell K => z.table side n) (hg a)⟩ + | @comp x y s hxy tx ty ihx ihy => + have hsum : highCount (fun a : B.AtomIndex => a.1) r tx.labels + + highCount (fun a : B.AtomIndex => a.1) r ty.labels = 1 := by + simpa only [CompositionExpression.labels, highCount_append] using ht + by_cases hzero : highCount (fun a : B.AtomIndex => a.1) r tx.labels = 0 + · have hone : highCount (fun a : B.AtomIndex => a.1) r ty.labels = 1 := by omega + obtain ⟨a, ha, har, hupper⟩ := ihy hone + refine ⟨a, List.mem_append_right _ ha, har, ?_⟩ + have hxr : C.DimensionLE r x := tx.dimensionLE (fun a => a.1) hd r + ((highCount_eq_zero_iff _ r tx.labels).mp hzero) + by_cases hs : s ≤ r + · intro n hn side + exact (mapped_comp_table_left_bounded F hxy hs hxr hn side).trans (hupper n hn side) + · have he := C.comp_of_dimensionLE (show r ≤ s by omega) hxr hxy + intro n hn side + exact (congrArg (fun z => (F.toFun z).table side n) he).trans (hupper n hn side) + · have hone : highCount (fun a : B.AtomIndex => a.1) r tx.labels = 1 := by omega + have hzero' : highCount (fun a : B.AtomIndex => a.1) r ty.labels = 0 := by omega + obtain ⟨a, ha, har, hupper⟩ := ihx hone + refine ⟨a, List.mem_append_left _ ha, har, ?_⟩ + have hyr : C.DimensionLE r y := ty.dimensionLE (fun a => a.1) hd r + ((highCount_eq_zero_iff _ r ty.labels).mp hzero') + by_cases hs : s ≤ r + · intro n hn side + exact (mapped_comp_table_right_bounded F hxy hs hyr hn side).trans (hupper n hn side) + · have he := comp_eq_left_of_dimensionLE s hxy + (C.dimensionLE_mono (show r ≤ s by omega) hyr) + intro n hn side + exact (congrArg (fun z => (F.toFun z).table side n) he).trans (hupper n hn side) + +theorem expression_aboveAtomOrZero {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + {x : C} (t : CompositionExpression C g x) (r : ℕ) + (ht : highCount (fun a : B.AtomIndex => a.1) r t.labels = 1) : + B.AboveAtomOrZero r (F.toFun x) := by + obtain ⟨a, _, ha, hupper⟩ := B.expression_upper_atom g F hg hd t r ht + exact Or.inr ⟨a, ha, hupper⟩ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # The finite ordered basis of two composable globes + +The right copy uses the left copy for every shared lower face and for its +source in the gluing dimension. The remaining basis elements are distinct. +The integer height below places every negative boundary before its cell and +every positive boundary after it. This is the concrete order needed for +positive-table decomposition; no generation assertion is assumed here. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open DirectedGlobeComplex + +/-- A canonical representative of a basis element of two n-globes pasted +along a k-face. `false` denotes the left globe. -/ +abbrev Basis (n k p : ℕ) := + {b : Bool × Bool // + (p < n ∨ (p = n ∧ b.2 = false)) ∧ + (b.1 = false ∨ k < p ∨ (p = k ∧ b.2 = true))} + +abbrev Chains (n k p : ℕ) := Basis n k p →₀ ℤ + +/-- The left globe supplies the chosen representatives of shared faces. -/ +def left {n k p : ℕ} (b : DirectedGlobeComplex.Basis n p) : Basis n k p := + ⟨(false, b.val), b.property, Or.inl rfl⟩ + +/-- Normalize a right-globe face to its canonical representative. -/ +def right {n k p : ℕ} (hkn : k < n) (b : DirectedGlobeComplex.Basis n p) : + Basis n k p := + if hp : p < k then left b + else if he : p = k then + if ha : b.val = false then left ⟨true, Or.inl (he ▸ hkn)⟩ + else ⟨(true, b.val), b.property, Or.inr (Or.inr ⟨he, Bool.eq_true_of_not_eq_false ha⟩)⟩ + else ⟨(true, b.val), b.property, Or.inr (Or.inl (by omega))⟩ + +@[simp] theorem right_below {n k p : ℕ} (hkn : k < n) + (b : DirectedGlobeComplex.Basis n p) (hp : p < k) : + right hkn b = left b := by simp [right, hp] + +@[simp] theorem right_source {n k : ℕ} (hkn : k < n) : + right hkn (⟨false, Or.inl hkn⟩ : DirectedGlobeComplex.Basis n k) = + left (⟨true, Or.inl hkn⟩ : DirectedGlobeComplex.Basis n k) := by + simp [right] + +/-- The dimension bound follows from the basis itself. -/ +theorem degree_le {n k p : ℕ} (b : Basis n k p) : p ≤ n := by + rcases b.property.1 with h | ⟨h, _⟩ <;> omega + +/-- Each canonical basis element comes from one of the two globe bases. -/ +theorem left_or_right {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + (∃ a : DirectedGlobeComplex.Basis n p, left a = b) ∨ + (∃ a : DirectedGlobeComplex.Basis n p, right hkn a = b) := by + rcases b with ⟨⟨s, a⟩, hv, hs⟩ + cases s with + | false => exact Or.inl ⟨⟨a, hv⟩, rfl⟩ + | true => + right + refine ⟨⟨a, hv⟩, ?_⟩ + rcases hs with hs | hs | ⟨he, ha⟩ + · cases hs + · simp [right, Nat.not_lt.mpr hs.le, Nat.ne_of_gt hs] + · subst p + have ha' : a = true := ha + subst a + simp [right] + +/-- Every positive-dimensional basis element has two canonical boundary bases. -/ +def face {n k p : ℕ} (hkn : k < n) (a : Bool) (b : Basis n k (p+1)) : + Basis n k p := + let hpn : p < n := by have := degree_le b; omega + if b.val.1 then right hkn ⟨a, Or.inl hpn⟩ else left ⟨a, Or.inl hpn⟩ + +/-- Source and target of every boundary basis have the same lower faces. -/ +theorem face_globular {n k p : ℕ} (hkn : k < n) (a c : Bool) + (b : Basis n k (p+2)) : + face hkn a (face hkn false b) = face hkn a (face hkn c b) := by + cases c with + | false => rfl + | true => + rcases b with ⟨⟨s, t⟩, hv, hs⟩ + cases s with + | false => rfl + | true => + by_cases hp : p+1 < k + · simp [face, right, left, hp] + · by_cases he : p+1 = k + · simp [face, right, left, he, show p < k by omega] + · simp [face, right, left, hp, he] + +/-- Negative and positive boundary, with no cancellation between them. -/ +noncomputable def boundary {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + Chains n k p := + Finsupp.single (face hkn true b) 1 - Finsupp.single (face hkn false b) 1 + + +/-- Differential on the free abelian groups of canonical bases. -/ +noncomputable def differential {n k : ℕ} (hkn : k < n) (p : ℕ) : + Chains n k (p+1) →ₗ[ℤ] Chains n k p := + Finsupp.linearCombination ℤ (boundary hkn) + +@[simp] theorem differential_single {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+1)) (z : ℤ) : + differential hkn p (Finsupp.single b z) = z • boundary hkn b := by + simp [differential] + +@[simp] theorem differential_boundary {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+2)) : + differential hkn p (boundary hkn b) = 0 := by + simp only [boundary, map_sub, differential_single, one_smul] + rw [face_globular hkn true true b, face_globular hkn false true b] + simp + +/-- Globularity proves that the explicit boundary squares to zero. -/ +theorem differential_squared {n k : ℕ} (hkn : k < n) (p : ℕ) + (x : Chains n k (p+2)) : + differential hkn p (differential hkn (p+1) x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp + +noncomputable def weight (n k p : ℕ) : Chains n k p →ₗ[ℤ] ℤ := + Finsupp.linearCombination ℤ (fun _ => 1) + +@[simp] theorem weight_single {n k p : ℕ} (b : Basis n k p) (z : ℤ) : + weight n k p (Finsupp.single b z) = z := by simp [weight] + +@[simp] theorem weight_differential {n k : ℕ} (hkn : k < n) (p : ℕ) + (x : Chains n k (p+1)) : weight n k p (differential hkn p x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp [boundary] + +def positive (n k p : ℕ) : AddSubmonoid (Chains n k p) where + carrier := {x | ∀ b, 0 ≤ x b} + zero_mem' := fun _ => le_rfl + add_mem' hx hy b := add_nonneg (hx b) (hy b) + +/-- The concrete directed complex of the pasted pair, before tensoring. -/ +noncomputable def complex (n k : ℕ) (hkn : k < n) : DirectedComplex where + group p := AddCommGrpCat.of (Chains n k p) + differential p := (differential hkn p).toAddMonoidHom + differential_squared := differential_squared hkn + augmentation := (weight n k 0).toAddMonoidHom + augmentation_differential := weight_differential hkn 0 + positive := positive n k + +/-- A global height on all dimensions of the pasted-globe basis. -/ +def height {n k p : ℕ} (b : Basis n k p) : ℤ := + if b.val.1 then + if b.val.2 then 4*(n:ℤ)-2*k-p else 2*(n:ℤ)-2*k+p + else if b.val.2 then + if p < k then 4*(n:ℤ)-2*k-p else 2*(n:ℤ)-p + else p + +/-- Every negative incidence strictly decreases the global height. -/ +theorem height_source_lt {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + height (face hkn false b) < height b := by + rcases b with ⟨⟨s, a⟩, hv, hs⟩ + cases s <;> cases a + all_goals + simp_all [face, right, left, height] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +/-- Every positive incidence strictly increases the global height. -/ +theorem height_lt_target {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + height b < height (face hkn true b) := by + rcases b with ⟨⟨s, a⟩, hv, hs⟩ + cases s <;> cases a + all_goals + simp_all [face, right, left, height] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +/-- Distinct signs of a boundary never overlap in this basis. -/ +theorem face_ne {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + face hkn false b ≠ face hkn true b := by + intro he + have hs := height_source_lt hkn b + have ht := height_lt_target hkn b + rw [he] at hs + omega + +/-- The order controls the actual negative coefficients of the boundary. -/ +theorem height_lt_of_boundary_neg {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+1)) (c : Basis n k p) (hc : boundary hkn b c < 0) : + height c < height b := by + classical + by_cases hs : face hkn false b = c + · subst c + exact height_source_lt hkn b + · simp only [boundary, Finsupp.sub_apply, Finsupp.single_apply, hs, ite_false, + sub_zero] at hc + split_ifs at hc <;> omega + +/-- The order controls the actual positive coefficients of the boundary. -/ +theorem height_lt_of_boundary_pos {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+1)) (c : Basis n k p) (hc : 0 < boundary hkn b c) : + height b < height c := by + classical + by_cases ht : face hkn true b = c + · subst c + exact height_lt_target hkn b + · simp only [boundary, Finsupp.sub_apply, Finsupp.single_apply, ht, ite_false] at hc + split_ifs at hc <;> omega + +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # The two globe inclusions in the explicit pasted basis + +These are positive chain maps into the ordered complex, with the shared +faces identified literally. Their construction precedes the universal +property comparison with the abelianization of the strict pasted globe. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Choose the left or right inclusion of a globe basis. -/ +def embed {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : DirectedGlobeComplex.Basis n p) : Basis n k p := + if s then right hkn b else left b + +/-- Both inclusions preserve the two boundary faces. -/ +theorem face_embed {n k p : ℕ} (hkn : k < n) (s a : Bool) + (b : DirectedGlobeComplex.Basis n (p+1)) : + face hkn a (embed hkn s b) = + embed hkn s ⟨a, Or.inl (by rcases b.property with h | ⟨h, _⟩ <;> omega)⟩ := by + cases s with + | false => rfl + | true => + by_cases hp : p+1 < k + · simp [embed, right, hp, face, left, show p < k by omega] + · by_cases he : p+1 = k + · simp [embed, right, he, face, left, show p < k by omega] + · simp [embed, right, hp, he, face, left] + +/-- Extend a basis inclusion linearly. -/ +def embedApp {n k : ℕ} (hkn : k < n) (s : Bool) (p : ℕ) : + DirectedGlobeComplex.Chains n p →ₗ[ℤ] Chains n k p := + Finsupp.linearCombination ℤ (fun b => Finsupp.single (embed hkn s b) 1) + +@[simp] theorem embedApp_single {n k p : ℕ} (hkn : k < n) (s : Bool) + (b : DirectedGlobeComplex.Basis n p) (z : ℤ) : + embedApp hkn s p (Finsupp.single b z) = Finsupp.single (embed hkn s b) z := by + simp [embedApp] + +/-- The free inclusions commute with the actual chain differentials. -/ +theorem embedApp_differential {n k : ℕ} (hkn : k < n) (s : Bool) (p : ℕ) + (u : DirectedGlobeComplex.Chains n (p+1)) : + embedApp hkn s p (DirectedGlobeComplex.differential n p u) = + differential hkn p (embedApp hkn s (p+1) u) := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + have hp : p < n := by rcases b.property with h | ⟨h, _⟩ <;> omega + simp only [DirectedGlobeComplex.differential_single, map_smul, + DirectedGlobeComplex.boundary, dite_eq_left hp, map_sub, embedApp_single, + differential_single, boundary, face_embed] + +/-- Augmentation is unchanged by either inclusion. -/ +theorem embedApp_augmentation {n k : ℕ} (hkn : k < n) (s : Bool) + (u : DirectedGlobeComplex.Chains n 0) : + weight n k 0 (embedApp hkn s 0 u) = DirectedGlobeComplex.weight n 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp + +/-- Every coefficient of an included positive chain remains nonnegative. -/ +theorem embedApp_positive {n k p : ℕ} (hkn : k < n) (s : Bool) + (u : DirectedGlobeComplex.Chains n p) (hu : u ∈ DirectedGlobeComplex.positive n p) : + embedApp hkn s p u ∈ positive n k p := by + classical + change (u.sum fun b z => z • Finsupp.single (embed hkn s b) 1) ∈ positive n k p + apply (positive n k p).sum_mem + intro b hb + change u b • Finsupp.single (embed hkn s b) 1 ∈ positive n k p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + apply (positive n k p).nsmul_mem + intro c + simp only [Finsupp.single_apply] + split_ifs <;> norm_num + +/-- The two actual positive chain inclusions into the pasted basis complex. -/ +def inclusion {n k : ℕ} (hkn : k < n) (s : Bool) : + Hom (DirectedGlobeComplex.complex n) (complex n k hkn) where + app p := (embedApp hkn s p).toAddMonoidHom + differential := embedApp_differential hkn s + augmentation := embedApp_augmentation hkn s + positive _ _ hu := embedApp_positive hkn s _ hu + +end + +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # The explicit chain basis of four globes in an interchange square + +Each row has the already constructed two-globe basis. Below the vertical +gluing dimension the rows coincide, and in that dimension the source of +the second row is the target of the first. No realization-colimit assertion +is used in this construction. +-/ + +namespace Thomason.Construction.GridGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +abbrev Basis (n k l p : ℕ) := + {b : Bool × PastingGlobeBasis.Basis n k p // + b.1 = false ∨ l < p ∨ (p = l ∧ b.2.val.2 = true)} + +abbrev Chains (n k l p : ℕ) := Basis n k l p →₀ ℤ + +def left {n k l p : ℕ} (b : PastingGlobeBasis.Basis n k p) : Basis n k l p := + ⟨(false, b), Or.inl rfl⟩ + +def targetBasis {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : PastingGlobeBasis.Basis n k p) (hp : p = l) : PastingGlobeBasis.Basis n k p := + ⟨(b.val.1, true), Or.inl (hp ▸ hln), Or.inr (Or.inl (hp ▸ hkl))⟩ + +def embed {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s : Bool) + (b : PastingGlobeBasis.Basis n k p) : Basis n k l p := + if s then + if hp : p < l then left b + else if he : p = l then + if hb : b.val.2 = false then left (targetBasis hkl hln b he) + else ⟨(true, b), Or.inr (Or.inr ⟨he, Bool.eq_true_of_not_eq_false hb⟩)⟩ + else ⟨(true, b), Or.inr (Or.inl (by omega))⟩ + else left b + +theorem degree_le {n k l p : ℕ} (b : Basis n k l p) : p ≤ n := + PastingGlobeBasis.degree_le b.val.2 + +theorem embed_self {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l p) : embed hkl hln b.val.1 b.val.2 = b := by + rcases b with ⟨⟨s, b⟩, hs⟩ + cases s with + | false => rfl + | true => + rcases hs with hs | hp | ⟨he, ha⟩ + · cases hs + · simp [embed, Nat.not_lt.mpr hp.le, Nat.ne_of_gt hp] + · have ha' : b.val.2 = true := ha + simp [embed, he, ha'] + +def face {n k l p : ℕ} (hkl : k < l) (hln : l < n) (a : Bool) + (b : Basis n k l (p+1)) : Basis n k l p := + embed hkl hln b.val.1 (PastingGlobeBasis.face (hkl.trans hln) a b.val.2) + +theorem face_embed {n k l p : ℕ} (hkl : k < l) (hln : l < n) (s a : Bool) + (b : PastingGlobeBasis.Basis n k (p+1)) : + face hkl hln a (embed hkl hln s b) = + embed hkl hln s (PastingGlobeBasis.face (hkl.trans hln) a b) := by + cases s with + | false => rfl + | true => + by_cases hp : p+1 < l + · simp [embed, face, left, hp, show p < l by omega] + · by_cases he : p+1 = l + · by_cases hb : b.val.2 = false + all_goals simp [embed, face, he, hb, targetBasis, left, + show p < l by omega, PastingGlobeBasis.face] + · simp [embed, face, hp, he] + +theorem face_globular {n k l p : ℕ} (hkl : k < l) (hln : l < n) (a c : Bool) + (b : Basis n k l (p+2)) : + face hkl hln a (face hkl hln false b) = face hkl hln a (face hkl hln c b) := by + change face hkl hln a (embed hkl hln b.val.1 + (PastingGlobeBasis.face (hkl.trans hln) false b.val.2)) = + face hkl hln a (embed hkl hln b.val.1 + (PastingGlobeBasis.face (hkl.trans hln) c b.val.2)) + rw [face_embed, face_embed, PastingGlobeBasis.face_globular] + +noncomputable def boundary {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l (p+1)) : Chains n k l p := + Finsupp.single (face hkl hln true b) 1 - Finsupp.single (face hkl hln false b) 1 + +noncomputable def differential {n k l : ℕ} (hkl : k < l) (hln : l < n) (p : ℕ) : + Chains n k l (p+1) →ₗ[ℤ] Chains n k l p := + Finsupp.linearCombination ℤ (boundary hkl hln) + +@[simp] theorem differential_single {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l (p+1)) (z : ℤ) : + differential hkl hln p (Finsupp.single b z) = z • boundary hkl hln b := by + simp [differential] + +@[simp] theorem differential_boundary {n k l p : ℕ} (hkl : k < l) (hln : l < n) + (b : Basis n k l (p+2)) : differential hkl hln p (boundary hkl hln b) = 0 := by + simp only [boundary, map_sub, differential_single, one_smul] + rw [face_globular hkl hln true true b, face_globular hkl hln false true b] + simp + +theorem differential_squared {n k l : ℕ} (hkl : k < l) (hln : l < n) (p : ℕ) + (x : Chains n k l (p+2)) : + differential hkl hln p (differential hkl hln (p+1) x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp + +noncomputable def weight (n k l p : ℕ) : Chains n k l p →ₗ[ℤ] ℤ := + Finsupp.linearCombination ℤ (fun _ => 1) + +@[simp] theorem weight_single {n k l p : ℕ} (b : Basis n k l p) (z : ℤ) : + weight n k l p (Finsupp.single b z) = z := by simp [weight] + +@[simp] theorem weight_differential {n k l : ℕ} (hkl : k < l) (hln : l < n) (p : ℕ) + (x : Chains n k l (p+1)) : weight n k l p (differential hkl hln p x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp [boundary] + +def positive (n k l p : ℕ) : AddSubmonoid (Chains n k l p) where + carrier := {x | ∀ b, 0 ≤ x b} + zero_mem' := fun _ => le_rfl + add_mem' hx hy b := add_nonneg (hx b) (hy b) + +noncomputable def complex {n k l : ℕ} (hkl : k < l) (hln : l < n) : DirectedComplex where + group p := AddCommGrpCat.of (Chains n k l p) + differential p := (differential hkl hln p).toAddMonoidHom + differential_squared := differential_squared hkl hln + augmentation := (weight n k l 0).toAddMonoidHom + augmentation_differential := weight_differential hkl hln 0 + positive := positive n k l + +def height {n k l p : ℕ} (b : Basis n k l p) : ℤ := + let offset : ℤ := if b.val.2.val.1 then 4*(n:ℤ)-2*l-2*k else 0 + if b.val.2.val.2 then + if p < k then 8*(n:ℤ)-4*l-2*k-p + else offset + if b.val.1 then 4*(n:ℤ)-2*l-p + else if p < l then 4*(n:ℤ)-2*l-p else 2*(n:ℤ)-p + else offset + if b.val.1 then 2*(n:ℤ)-2*l+p else p + +end Thomason.Construction.GridGlobeBasis + +end + +section + +/-! # The positive universal map from the pasted-globe basis + +A pair of matching positive cell tables gives an actual positive chain map +from the explicit pasted complex. The formula reads each canonical basis +in the corresponding table; matching identifies exactly the shared faces. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +variable {L : DirectedComplex.{0}} + +/-- The value of a canonical basis in a pair of cell tables. -/ +def value {n k p : ℕ} (x y : Cell L) (b : Basis n k p) : L.group p := + if b.val.1 then y.table b.val.2 p else x.table b.val.2 p + +/-- Matching cell tables give the same value on every shared representative. -/ +theorem value_embed {n k p : ℕ} (hkn : k < n) (x y : Cell L) + (hxy : x.face true k = y.face false k) (s : Bool) + (b : DirectedGlobeComplex.Basis n p) : + value x y (embed hkn s b) = (if s then y else x).table b.val p := by + cases s with + | false => rfl + | true => + change value x y (right hkn b) = y.table b.val p + by_cases hp : p < k + · simpa only [right, dite_eq_left hp, value, left, Bool.false_eq_true, ite_false] using + Cell.matching_below hxy b.val hp + · by_cases he : p = k + · subst p + by_cases ha : b.val = false + · simpa [right, ha, value, left] using Cell.matching_top hxy + · simp [right, ha, value] + · simp [right, hp, he, value] + +/-- Extend the two cell tables linearly on canonical bases. -/ +def descApp {n k : ℕ} (x y : Cell L) (p : ℕ) : + Chains n k p →ₗ[ℤ] L.group p := + Finsupp.linearCombination ℤ (value x y) + +@[simp] theorem descApp_single {n k p : ℕ} (x y : Cell L) + (b : Basis n k p) (z : ℤ) : + descApp x y p (Finsupp.single b z) = z • value x y b := by simp [descApp] + +/-- On either globe inclusion, the universal map reads that globe's table. -/ +theorem descApp_embedApp {n k : ℕ} (hkn : k < n) (x y : Cell L) + (hxy : x.face true k = y.face false k) (s : Bool) (p : ℕ) + (u : DirectedGlobeComplex.Chains n p) : + descApp x y p (embedApp hkn s p u) = + DirectedGlobeComplex.cellApp n (if s then y else x) p u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp [value_embed hkn x y hxy] + +/-- The universal map respects every signed boundary. -/ +theorem descApp_differential {n k : ℕ} (hkn : k < n) (x y : Cell L) + (hxy : x.face true k = y.face false k) (p : ℕ) (u : Chains n k (p+1)) : + descApp x y p (differential hkn p u) = + L.differential p (descApp x y (p+1) u) := by + have hs (s : Bool) (b : DirectedGlobeComplex.Basis n (p+1)) (z : ℤ) : + descApp x y p (differential hkn p (Finsupp.single (embed hkn s b) z)) = + L.differential p (descApp x y (p+1) (Finsupp.single (embed hkn s b) z)) := by + rw [← embedApp_single hkn s b z, ← embedApp_differential, + descApp_embedApp hkn x y hxy, descApp_embedApp hkn x y hxy] + exact DirectedGlobeComplex.cellApp_differential n (if s then y else x) p _ + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + rcases left_or_right hkn b with ⟨c, hc⟩ | ⟨c, hc⟩ + · subst b + exact hs false c z + · subst b + exact hs true c z + +/-- Both tables have augmentation one on every zero-dimensional basis. -/ +theorem descApp_augmentation {n k : ℕ} (x y : Cell L) (u : Chains n k 0) : + L.augmentation (descApp x y 0 u) = weight n k 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + simp only [descApp_single, map_zsmul, weight_single, value] + split_ifs <;> simp [Cell.augmentation] + +/-- Positivity of each table entry gives positivity on the full free cone. -/ +theorem descApp_positive {n k p : ℕ} (x y : Cell L) (u : Chains n k p) + (hu : u ∈ positive n k p) : descApp x y p u ∈ L.positive p := by + classical + change (u.sum fun b z => z • value x y b) ∈ L.positive p + apply (L.positive p).sum_mem + intro b hb + change u b • value x y b ∈ L.positive p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + apply (L.positive p).nsmul_mem + unfold value + split_ifs + · exact y.positive _ _ + · exact x.positive _ _ + +/-- The actual positive chain map specified by two matching cell tables. -/ +def desc {n k : ℕ} (hkn : k < n) (x y : Cell L) + (hxy : x.face true k = y.face false k) : Hom (complex n k hkn) L where + app p := (descApp x y p).toAddMonoidHom + differential := descApp_differential hkn x y hxy + augmentation := descApp_augmentation x y + positive _ _ hu := descApp_positive x y _ hu + +/-- Restricting the universal map to either half recovers that half's table. -/ +theorem inclusion_desc {n k : ℕ} (hkn : k < n) (x y : Cell L) + (hxy : x.face true k = y.face false k) (s : Bool) : + Hom.comp (inclusion hkn s) (desc hkn x y hxy) = + DirectedGlobeComplex.cellMap n (if s then y else x) := by + apply Hom.ext_app + intro p u + exact descApp_embedApp hkn x y hxy s p u + +/-- The two globe inclusions jointly determine every positive chain map. -/ +theorem hom_ext {n k : ℕ} (hkn : k < n) {f g : Hom (complex n k hkn) L} + (hleft : Hom.comp (inclusion hkn false) f = Hom.comp (inclusion hkn false) g) + (hright : Hom.comp (inclusion hkn true) f = Hom.comp (inclusion hkn true) g) : f = g := by + apply Hom.ext_app + intro p u + have hs (s : Bool) (h : Hom.comp (inclusion hkn s) f = Hom.comp (inclusion hkn s) g) + (b : DirectedGlobeComplex.Basis n p) (z : ℤ) : + f.app p (Finsupp.single (embed hkn s b) z) = + g.app p (Finsupp.single (embed hkn s b) z) := by + have he := congrArg (fun q : Hom (DirectedGlobeComplex.complex n) L => + q.app p (Finsupp.single b z)) h + change f.app p (embedApp hkn s p (Finsupp.single b z)) = + g.app p (embedApp hkn s p (Finsupp.single b z)) at he + simpa only [embedApp_single] using he + let fp : Chains n k p →+ L.group p := f.app p + let gp : Chains n k p →+ L.group p := g.app p + change fp u = gp u + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + rcases left_or_right hkn b with ⟨c, hc⟩ | ⟨c, hc⟩ + · subst b + exact hs false hleft c z + · subst b + exact hs true hright c z + +end + +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # A strong order for the signed right-cylinder basis + +Endpoint copies have offsets -1 and +1 from three times the original +height; the negative endpoint depends on the parity of the original degree. +Mixed elements have offset zero. Thus the signed tensor differential is +strictly compatible with the order, including its alternating endpoint sign. +-/ + +namespace Thomason.Construction.RightCylinderBasis + +variable {B : ℕ → Type*} + +/-- The direct-sum basis of the right tensor with the oriented interval. -/ +inductive Basis (B : ℕ → Type*) : ℕ → Type _ + | endpoint {p : ℕ} (a : Bool) (b : B p) : Basis B p + | mixed {p : ℕ} (b : B p) : Basis B (p+1) + +/-- The negative endpoint in the boundary of `b ⊗ [0,1]`. -/ +def sourceEndpoint (p : ℕ) : Bool := decide (p % 2 = 1) + +/-- Threefold spacing keeps the endpoint offsets inside their original slot. -/ +def height (h : ∀ p, B p → ℤ) : {p : ℕ} → Basis B p → ℤ + | p, .endpoint a b => 3*h p b + if a = sourceEndpoint p then -1 else 1 + | p+1, .mixed b => 3*h p b + +/-- Every incidence of the signed tensor differential, indexed by its sign. +`false` denotes negative and `true` denotes positive. -/ +inductive Incidence (R : ∀ p, Bool → B p → B (p+1) → Prop) : + (p : ℕ) → Bool → Basis B p → Basis B (p+1) → Prop + | endpoint {p : ℕ} {s : Bool} {c : B p} {b : B (p+1)} + (a : Bool) (hr : R p s c b) : + Incidence R p s (.endpoint a c) (.endpoint a b) + | mixed {p : ℕ} {s : Bool} {c : B p} {b : B (p+1)} (hr : R p s c b) : + Incidence R (p+1) s (.mixed c) (.mixed b) + | source {p : ℕ} (b : B p) : + Incidence R p false (.endpoint (sourceEndpoint p) b) (.mixed b) + | target {p : ℕ} (b : B p) : + Incidence R p true (.endpoint (!(sourceEndpoint p)) b) (.mixed b) + +/-- A base order compatible with negative and positive incidences extends to +all signed incidences of the right-cylinder differential. -/ +theorem height_incidence + (h : ∀ p, B p → ℤ) (R : ∀ p, Bool → B p → B (p+1) → Prop) + (hR : ∀ p s c b, R p s c b → if s then h (p+1) b < h p c else h p c < h (p+1) b) + {p : ℕ} {s : Bool} {c : Basis B p} {b : Basis B (p+1)} + (hi : Incidence R p s c b) : + if s then height h b < height h c else height h c < height h b := by + cases hi with + | endpoint a hr => + have hh := hR _ _ _ _ hr + cases s <;> simp only [Bool.false_eq_true, ite_false, ite_true] at hh ⊢ + all_goals simp only [height]; split_ifs <;> omega + | mixed hr => + have hh := hR _ _ _ _ hr + cases s <;> simp only [Bool.false_eq_true, ite_false, ite_true, height] at hh ⊢ <;> omega + | source b => simp [height] + | target b => simp [height] + +/-- The actual two-boundary incidence of the pasted-globe basis. -/ +def pastingIncidence {n k : ℕ} (hkn : k < n) (p : ℕ) (a : Bool) + (c : PastingGlobeBasis.Basis n k p) (b : PastingGlobeBasis.Basis n k (p+1)) : Prop := + c = PastingGlobeBasis.face hkn a b + +/-- The explicit pasted-globe cylinder has a strong order in every degree. -/ +theorem pasting_height_incidence {n k : ℕ} (hkn : k < n) + {p : ℕ} {s : Bool} {c : Basis (PastingGlobeBasis.Basis n k) p} + {b : Basis (PastingGlobeBasis.Basis n k) (p+1)} + (hi : Incidence (pastingIncidence hkn) p s c b) : + if s then height (fun _ => PastingGlobeBasis.height) b < + height (fun _ => PastingGlobeBasis.height) c + else height (fun _ => PastingGlobeBasis.height) c < + height (fun _ => PastingGlobeBasis.height) b := by + apply height_incidence _ _ ?_ hi + intro q a c b hc + subst c + cases a + · exact PastingGlobeBasis.height_source_lt hkn b + · exact PastingGlobeBasis.height_lt_target hkn b + +end Thomason.Construction.RightCylinderBasis + +end + +section + +/-! # Explicit mixed cells of the right chain cylinder + +Every positive cell table has a natural prism table. The endpoint in each +positive degree alternates with the degree, exactly as required by the +signed right tensor. This constructs the mixed atoms without assuming +that realization preserves any colimit. +-/ + +namespace Thomason.Construction.DirectedComplex.RightCylinder + +universe u + +variable {K L : DirectedComplex.{u}} + +/-- The sign of a right mixed boundary is controlled by its degree parity. -/ +theorem sign_bodd (p : ℕ) : (-1 : ℤ)^p = if p.bodd then -1 else 1 := by + rw [neg_one_pow_eq_pow_mod_two, Nat.mod_two_of_bodd] + cases p.bodd <;> rfl + +/-- Which endpoint occurs in the chosen face of the prism. -/ +def prismSide (p : ℕ) (a : Bool) : Bool := if a then !p.bodd else p.bodd + +/-- A prism has one endpoint chain and the preceding mixed chain in every +positive degree. -/ +def prismTable (x : Cell K) (a : Bool) : (p : ℕ) → (rightCylinder K).group p + | 0 => if a then (0, x.table true 0) else (x.table false 0, 0) + | p+1 => if prismSide (p+1) a then (0, x.table a (p+1), x.table a p) + else (x.table a (p+1), 0, x.table a p) + +/-- The full prism table satisfies the signed chain equations. -/ +theorem prismTable_boundary (x : Cell K) (a : Bool) (p : ℕ) : + (rightCylinder K).differential p (prismTable x a (p+1)) = + prismTable x true p - prismTable x false p := by + cases p with + | zero => + cases a <;> ext <;> + simp [rightCylinder, differential, prismTable, prismSide, x.boundary] + | succ p => + have hs := sign_bodd (p+1) + cases hp : p.bodd <;> cases a <;> ext <;> + simp [rightCylinder, differential, prismTable, prismSide, hp, hs, + x.boundary]; abel + +/-- A natural actual cell of the right cylinder associated to every cell. -/ +def prism (x : Cell K) : Cell (rightCylinder K) where + table := prismTable x + positive a p := by + cases p with + | zero => + cases a + · exact ⟨x.positive false 0, (K.positive 0).zero_mem⟩ + · exact ⟨(K.positive 0).zero_mem, x.positive true 0⟩ + | succ p => + change (if prismSide (p+1) a then (0, x.table a (p+1), x.table a p) + else (x.table a (p+1), 0, x.table a p)) ∈ _ + split_ifs + · exact ⟨(K.positive _).zero_mem, x.positive a _, x.positive a _⟩ + · exact ⟨x.positive a _, (K.positive _).zero_mem, x.positive a _⟩ + augmentation a := by + cases a <;> simp [rightCylinder, augmentation, prismTable, x.augmentation] + boundary := prismTable_boundary x + finite_support := by + obtain ⟨N, hN⟩ := x.finite_support + refine ⟨N+1, ?_⟩ + intro p hp a + cases p with + | zero => omega + | succ p => + have hpN : N < p := by omega + simp [prismTable, hN p hpN a, hN (p+1) (by omega) a] + +/-- Prisms increase a finite dimension bound by one. -/ +theorem prism_dimension {n : ℕ} (x : Cell K) (hx : K.realization.DimensionLE n x) : + (rightCylinder K).realization.DimensionLE (n+1) (prism x) := by + apply Cell.dimensionLE_of_table_zero + intro p hp a + cases p with + | zero => omega + | succ p => + have hn : n < p := by omega + simp [prism, prismTable, Cell.table_zero_of_dimensionLE hx hn a, + Cell.table_zero_of_dimensionLE hx (show n < p+1 by omega) a] + +/-- A bounded cell contributes its top chain as the literal mixed chain +in the top degree of the prism. -/ +theorem prism_top {n : ℕ} (x : Cell K) (hx : K.realization.DimensionLE n x) (a : Bool) : + (prism x).table a (n+1) = (0, 0, x.table a n) := by + simp [prism, prismTable, Cell.table_zero_of_dimensionLE hx (Nat.lt_succ_self n) a] + +/-- Positive chain maps preserve this explicit prism construction. -/ +theorem prism_naturality (f : Hom K L) (x : Cell K) : + Cell.map (map f) (prism x) = prism (Cell.map f x) := by + apply Cell.ext + funext a p + cases p with + | zero => cases a <;> simp [prism, prismTable, map, mapMap, Cell.map] + | succ p => + simp only [Cell.map_table, prism, prismTable, map, mapMap] + split_ifs <;> simp + +end Thomason.Construction.DirectedComplex.RightCylinder + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/SimplexCylinderGeneration.lean b/lean/OAI/CategoryTheory/Thomason/Gray/SimplexCylinderGeneration.lean new file mode 100644 index 0000000000000000000000000000000000000000..faef8145f547b3cd250918b266b90d667e666dcb --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/SimplexCylinderGeneration.lean @@ -0,0 +1,969 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Chains.SimplexChainHeight +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Gray.PosetPrismEndpoints +import OAI.CategoryTheory.Thomason.Gray.StrictAbelianization +import OAI.CategoryTheory.Thomason.Simplicial.CanonicalExtensionCartesian +import OAI.CategoryTheory.Thomason.Simplicial.NonsingularFaceCarriers +import OAI.CategoryTheory.Thomason.Simplicial.SimplicialSpanFactorization +import OAI.CategoryTheory.Thomason.Strict.StrictTerminalConeFunctor +import OAI.CategoryTheory.Thomason.Strict.UnderlyingCategory +import Mathlib.Data.List.Sort + +namespace OAI + +section + +/-! # Relative cylinder lifting for genuine Kan fibrations -/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial +open SSet.modelCategoryQuillen + +universe u + +noncomputable section + +/-- A Kan fibration lifts a cylinder with both its initial map and a prescribed +subobject cylinder fixed. This is the pushout-product lifting property. -/ +theorem exists_kan_cylinder_lift {A K E B : SSet.{u}} + (i : A ⟶ K) [Mono i] (p : E ⟶ B) [HomotopicalAlgebra.Fibration p] + (f : K ⟶ E) (h : A ⊗ Δ[1] ⟶ E) (b : K ⊗ Δ[1] ⟶ B) + (h₀ : SSet.ι₀ ≫ h = i ≫ f) + (hb : h ≫ p = i ▷ Δ[1] ≫ b) (hf : f ≫ p = SSet.ι₀ ≫ b) : + ∃ e : K ⊗ Δ[1] ⟶ E, + SSet.ι₀ ≫ e = f ∧ i ▷ Δ[1] ≫ e = h ∧ e ≫ p = b := by + let sq := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) + i (SSet.stdSimplex.δ (1 : Fin 2)) + have hc : i ▷ (Δ[0] : SSet.{u}) ≫ fst K (Δ[0] : SSet.{u}) ≫ f = + A ◁ SSet.stdSimplex.δ (1 : Fin 2) ≫ h := by + rw [whisker_zero_face, Category.assoc, h₀] + have hp : i ▷ (Δ[0] : SSet.{u}) ≫ fst K (Δ[0] : SSet.{u}) = + fst A (Δ[0] : SSet.{u}) ≫ i := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + rw [← Category.assoc, hp, Category.assoc] + let g : sq.pt ⟶ E := sq.isPushout.desc (fst K (Δ[0] : SSet.{u}) ≫ f) h hc + have gl : sq.inl ≫ g = fst K (Δ[0] : SSet.{u}) ≫ f := sq.isPushout.inl_desc _ _ _ + have gr : sq.inr ≫ g = h := sq.isPushout.inr_desc _ _ _ + have il : sq.inl ≫ sq.ι = K ◁ SSet.stdSimplex.δ (1 : Fin 2) := sq.inl_ι + have ir : sq.inr ≫ sq.ι = i ▷ Δ[1] := sq.inr_ι + have hg : g ≫ p = sq.ι ≫ b := by + apply sq.hom_ext + · rw [← Category.assoc, gl, Category.assoc, hf] + rw [← Category.assoc sq.inl sq.ι b, il, whisker_zero_face, Category.assoc] + · rw [← Category.assoc, gr, hb, ← Category.assoc, ir] + have ha : SSet.anodyneExtensions sq.ι := + SSet.anodyneExtensions_pushoutObjObjι sq (anodyne_delta_one 1) + let : HasLiftingProperty sq.ι p := + ha _ (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance) + let c : CommSq g sq.ι p b := ⟨hg⟩ + refine ⟨c.lift, ?_, ?_, c.fac_right⟩ + · have he : K ◁ SSet.stdSimplex.δ (1 : Fin 2) ≫ c.lift = + fst K (Δ[0] : SSet.{u}) ≫ f := by + rw [← il, Category.assoc, c.fac_left, gl] + have hz := congrArg (fun k => zeroFaceSection K ≫ k) he + simpa only [← Category.assoc, zeroFaceSection_face, zeroFaceSection_fst, + Category.id_comp] using hz + · rw [← ir, Category.assoc, c.fac_left, gr] + +end + +end Thomason.Construction + +end + +section + +/-! # Kan lifts preserving both ends of an anodyne cylinder -/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits MonoidalCategory CartesianMonoidalCategory +open SSet.modelCategoryQuillen +open scoped Simplicial + +universe u + +noncomputable section + +theorem whisker_one_face (K : SSet.{u}) : + K ◁ SSet.stdSimplex.δ (0 : Fin 2) = + fst K (Δ[0] : SSet.{u}) ≫ SSet.ι₁ := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.objEquiv.injective + ext k + change ↑((SimplexCategory.δ (0 : Fin 2)).toOrderHom + ((SSet.stdSimplex.objEquiv x.2).toOrderHom k)) = (1 : ℕ) + have he : (SSet.stdSimplex.objEquiv x.2).toOrderHom k = 0 := + @Subsingleton.elim (Fin 1) inferInstance _ _ + rw [he] + rfl + +theorem intervalBoundary_restriction {K X : SSet.{u}} (a : K ⊗ Δ[1] ⟶ X) + (x₀ x₁ : X _⦋0⦌) (h₀ : SSet.ι₀ ≫ a = SSet.const x₀) + (h₁ : SSet.ι₁ ≫ a = SSet.const x₁) : + K ◁ (SSet.boundary 1).ι ≫ a = + snd K (SSet.boundary 1 : SSet.{u}) ≫ intervalBoundaryMap x₀ x₁ := by + apply interval_boundary_tensor_hom_ext + · rw [← Category.assoc, ← whiskerLeft_comp, SSet.boundary.ι_ι, + whisker_zero_face, Category.assoc, h₀, SSet.comp_const] + rw [← Category.assoc, whiskerLeft_snd, Category.assoc, + intervalBoundaryMap_zero, SSet.comp_const] + · rw [← Category.assoc, ← whiskerLeft_comp, SSet.boundary.ι_ι, + whisker_one_face, Category.assoc, h₁, SSet.comp_const] + rw [← Category.assoc, whiskerLeft_snd, Category.assoc, + intervalBoundaryMap_one, SSet.comp_const] + +/-- An anodyne map times an interval can be lifted while prescribing the +whole interval boundary. This uses only the proved pushout-product theorem. -/ +theorem exists_kan_boundary_cylinder_lift {A K E B : SSet.{u}} + (i : A ⟶ K) (hi : SSet.anodyneExtensions i) + (p : E ⟶ B) [HomotopicalAlgebra.Fibration p] + (a : A ⊗ Δ[1] ⟶ E) (c : K ⊗ (SSet.boundary 1 : SSet.{u}) ⟶ E) + (b : K ⊗ Δ[1] ⟶ B) + (hc : i ▷ (SSet.boundary 1 : SSet.{u}) ≫ c = A ◁ (SSet.boundary 1).ι ≫ a) + (ha : a ≫ p = i ▷ Δ[1] ≫ b) (hb : c ≫ p = K ◁ (SSet.boundary 1).ι ≫ b) : + ∃ e : K ⊗ Δ[1] ⟶ E, + i ▷ Δ[1] ≫ e = a ∧ K ◁ (SSet.boundary 1).ι ≫ e = c ∧ e ≫ p = b := by + let sq := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i (SSet.boundary 1).ι + let g := sq.isPushout.desc c a hc + have gl : sq.inl ≫ g = c := sq.isPushout.inl_desc _ _ _ + have gr : sq.inr ≫ g = a := sq.isPushout.inr_desc _ _ _ + have il : sq.inl ≫ sq.ι = K ◁ (SSet.boundary 1).ι := sq.inl_ι + have ir : sq.inr ≫ sq.ι = i ▷ Δ[1] := sq.inr_ι + have hg : g ≫ p = sq.ι ≫ b := by + apply sq.hom_ext + · rw [← Category.assoc, gl, hb, ← Category.assoc, il] + · rw [← Category.assoc, gr, ha, ← Category.assoc, ir] + have hsq : SSet.anodyneExtensions sq.ι := + SSet.anodyneExtensions_pushoutObjObjι' sq hi + let : HasLiftingProperty sq.ι p := + hsq _ (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance) + let s : CommSq g sq.ι p b := ⟨hg⟩ + refine ⟨s.lift, ?_, ?_, s.fac_right⟩ + · rw [← ir, Category.assoc, s.fac_left, gr] + · rw [← il, Category.assoc, s.fac_left, gl] + +end + +end Thomason.Construction + +end + +section + +/-! # Relative cylinder lifting from the final endpoint -/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial +open SSet.modelCategoryQuillen + +universe u + +noncomputable section + +theorem zeroFaceSection_one_face (K : SSet.{u}) : + zeroFaceSection K ≫ K ◁ SSet.stdSimplex.δ (0 : Fin 2) = SSet.ι₁ := by + rw [whisker_one_face, zeroFaceSection_fst_assoc] + +/-- Final-endpoint lifting, with the prescribed subobject fixed throughout. -/ +theorem exists_kan_cylinder_lift_one {A K E B : SSet.{u}} + (i : A ⟶ K) [Mono i] (p : E ⟶ B) [HomotopicalAlgebra.Fibration p] + (f : K ⟶ E) (h : A ⊗ Δ[1] ⟶ E) (b : K ⊗ Δ[1] ⟶ B) + (h₀ : SSet.ι₁ ≫ h = i ≫ f) + (hb : h ≫ p = i ▷ Δ[1] ≫ b) (hf : f ≫ p = SSet.ι₁ ≫ b) : + ∃ e : K ⊗ Δ[1] ⟶ E, + SSet.ι₁ ≫ e = f ∧ i ▷ Δ[1] ≫ e = h ∧ e ≫ p = b := by + let sq := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) + i (SSet.stdSimplex.δ (0 : Fin 2)) + have hc : i ▷ (Δ[0] : SSet.{u}) ≫ fst K (Δ[0] : SSet.{u}) ≫ f = + A ◁ SSet.stdSimplex.δ (0 : Fin 2) ≫ h := by + rw [whisker_one_face, Category.assoc, h₀] + have hp : i ▷ (Δ[0] : SSet.{u}) ≫ fst K (Δ[0] : SSet.{u}) = + fst A (Δ[0] : SSet.{u}) ≫ i := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + rw [← Category.assoc, hp, Category.assoc] + let g : sq.pt ⟶ E := sq.isPushout.desc (fst K (Δ[0] : SSet.{u}) ≫ f) h hc + have gl : sq.inl ≫ g = fst K (Δ[0] : SSet.{u}) ≫ f := sq.isPushout.inl_desc _ _ _ + have gr : sq.inr ≫ g = h := sq.isPushout.inr_desc _ _ _ + have il : sq.inl ≫ sq.ι = K ◁ SSet.stdSimplex.δ (0 : Fin 2) := sq.inl_ι + have ir : sq.inr ≫ sq.ι = i ▷ Δ[1] := sq.inr_ι + have hg : g ≫ p = sq.ι ≫ b := by + apply sq.hom_ext + · rw [← Category.assoc, gl, Category.assoc, hf] + rw [← Category.assoc sq.inl sq.ι b, il, whisker_one_face, Category.assoc] + · rw [← Category.assoc, gr, hb, ← Category.assoc, ir] + have ha : SSet.anodyneExtensions sq.ι := + SSet.anodyneExtensions_pushoutObjObjι sq (anodyne_delta_one 0) + let : HasLiftingProperty sq.ι p := + ha _ (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance) + let c : CommSq g sq.ι p b := ⟨hg⟩ + refine ⟨c.lift, ?_, ?_, c.fac_right⟩ + · have he : K ◁ SSet.stdSimplex.δ (0 : Fin 2) ≫ c.lift = + fst K (Δ[0] : SSet.{u}) ≫ f := by + rw [← il, Category.assoc, c.fac_left, gl] + have hz := congrArg (fun k => zeroFaceSection K ≫ k) he + simpa only [← Category.assoc, zeroFaceSection_one_face, zeroFaceSection_fst, + Category.id_comp] using hz + · rw [← ir, Category.assoc, c.fac_left, gr] + +end + +end Thomason.Construction + +end + +section + +/-! +# Strict stationarity on the old subposet + +The equation is proved on the whole old cylinder, including every lower +cell. This is what permits relative prisms to descend through arbitrary +attaching pushouts. +-/ + +namespace Thomason.Construction.RelativePrismData + +open CategoryTheory CategoryTheory.Limits Opposite NormalizedSimplexIdentities + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] (G : RightGrayInput h) + +/-- A local piece lying entirely in the old subposet is strictly stationary. -/ +theorem piece_stationary {m : ℕ} (s : Fin (m + 1) →o E) (hs : ∀ i, s i ∈ D.old) : + D.piece h G s = G.projection.app (h.object m) ≫ h.posetLeg (D.first.comp s) := by + let p : G.cylinder.obj (h.object m) ⟶ h.object (D.ordinal s).dim := + G.prism (D.old_preimage_lower s) (D.firstIndex s) (D.lastIndex s) + (D.index_le s) (D.index_agree s) (D.index_constant s) + let v : h.object (D.ordinal s).dim ⟶ h.categorification.obj (nerve E) := + h.posetLeg (D.evaluate s) + have hp : G.cylinder.map (h.map (OrderHom.id : Fin (m + 1) →o Fin (m + 1))) ≫ p = + G.projection.app (h.object m) ≫ h.map ((D.firstIndex s).comp OrderHom.id) := + G.prism_stationary (D.old_preimage_lower s) (D.firstIndex s) (D.lastIndex s) + (D.index_le s) (D.index_agree s) (D.index_constant s) OrderHom.id hs + have hid : G.cylinder.map (h.map (OrderHom.id : Fin (m + 1) →o Fin (m + 1))) = + 𝟙 (G.cylinder.obj (h.object m)) := by + rw [h.map_id, G.cylinder.map_id] + have he : (D.evaluate s).comp (D.firstIndex s) = D.first.comp s := by + apply DFunLike.ext + exact D.evaluate_firstIndex s + have hp' : p = G.projection.app (h.object m) ≫ h.map (D.firstIndex s) := by + simpa only [hid, Category.id_comp, OrderHom.comp_id] using hp + have hv : h.map (D.firstIndex s) ≫ v = h.posetLeg (D.first.comp s) := + (h.posetLeg_precomp _ _).trans (congrArg h.posetLeg he) + calc + _ = p ≫ v := (Category.assoc _ _ _).symm + _ = (G.projection.app (h.object m) ≫ h.map (D.firstIndex s)) ≫ v := + congrArg (fun k => k ≫ v) hp' + _ = G.projection.app (h.object m) ≫ (h.map (D.firstIndex s) ≫ v) := Category.assoc _ _ _ + _ = _ := congrArg (fun k => G.projection.app (h.object m) ≫ k) hv + +/-- The monotone inclusion of the old subposet. -/ +def oldInclusion : D.old →o E where + toFun := Subtype.val + monotone' := fun _ _ hij => hij + +/-- The whole assembled cylinder is stationary on the old subposet. -/ +theorem prism_stationary : + G.cylinder.map (h.categorification.map (nerveMap D.oldInclusion.monotone.functor)) ≫ D.prism h G = + G.projection.app (h.categorification.obj (nerve D.old)) ≫ + h.categorification.map (nerveMap (D.first.comp D.oldInclusion).monotone.functor) := by + apply G.assembled_stationary (h.simplexCocone_isColimit (nerve D.old)) + intro j + let s := simplexOrder (SSet.yonedaEquiv j.hom) + have hj : h.posetLeg s = h.simplexLeg j.hom := h.posetLeg_simplexOrder j.hom + have hi : h.simplexLeg j.hom ≫ h.categorification.map (nerveMap D.oldInclusion.monotone.functor) = + h.posetLeg (D.oldInclusion.comp s) := by + calc + _ = h.posetLeg s ≫ h.categorification.map (nerveMap D.oldInclusion.monotone.functor) := + congrArg (fun k => k ≫ _) hj.symm + _ = _ := h.posetLeg_postcomp s D.oldInclusion + have hv : h.simplexLeg j.hom ≫ + h.categorification.map (nerveMap (D.first.comp D.oldInclusion).monotone.functor) = + h.posetLeg (D.first.comp (D.oldInclusion.comp s)) := by + calc + _ = h.posetLeg s ≫ + h.categorification.map (nerveMap (D.first.comp D.oldInclusion).monotone.functor) := + congrArg (fun k => k ≫ _) hj.symm + _ = _ := h.posetLeg_postcomp s (D.first.comp D.oldInclusion) + change G.cylinder.map (h.simplexLeg j.hom ≫ _) ≫ D.prism h G = + G.projection.app (h.object j.left.len) ≫ (h.simplexLeg j.hom ≫ _) + calc + _ = G.cylinder.map (h.posetLeg (D.oldInclusion.comp s)) ≫ D.prism h G := + congrArg (fun k => G.cylinder.map k ≫ D.prism h G) hi + _ = D.piece h G (D.oldInclusion.comp s) := D.prism_fac_poset h G _ + _ = G.projection.app (h.object j.left.len) ≫ + h.posetLeg (D.first.comp (D.oldInclusion.comp s)) := + D.piece_stationary h G _ (fun i => (s i).property) + _ = _ := congrArg (fun k => G.projection.app (h.object j.left.len) ≫ k) hv.symm + +end Thomason.Construction.RelativePrismData + +end + +section + +/-! +# The assembled relative prism in every positive finite dimension + +The construction uses the already stated published reflection adjunction +and preservation of target dimension by the right internal hom. Endpoints +and stationarity are transported by their universal properties. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace FiniteReflectionInput + +variable {n : ℕ} (r : FiniteReflectionInput n) + +/-- Reflection units detect maps to every finite-dimensional target. -/ +theorem unit_hom_ext (X : StrictOmegaCategory.{0}) + (Y : StrictOmegaCategory.Truncated.{0} (n + 1)) + {f g : (r.reflect.obj X).val ⟶ Y.val} + (he : r.adjunction.unit.app X ≫ f = r.adjunction.unit.app X ≫ g) : f = g := by + let e : ((r.reflect.obj X).val ⟶ Y.val) ≃ (X ⟶ Y.val) := r.adjunction.homEquiv X Y + apply e.injective + exact (r.adjunction.homEquiv_apply X Y f).trans + (he.trans (r.adjunction.homEquiv_apply X Y g).symm) + +end FiniteReflectionInput + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (t : GrayTruncationInput G) {n : ℕ} (r : FiniteReflectionInput n) + +include t + +/-- Descent preserves strict stationarity, as an equation on the whole +reflected cylinder. -/ +theorem factor_cylinder_stationary (A X : StrictOmegaCategory.{0}) + (i v : A ⟶ X) (P : G.cylinder.obj X ⟶ X) + (Q : G.cylinder.obj (r.reflect.obj X).val ⟶ (r.reflect.obj X).val) + (hQ : G.cylinder.map (r.adjunction.unit.app X) ≫ Q = P ≫ r.adjunction.unit.app X) + (hP : G.cylinder.map i ≫ P = G.projection.app A ≫ v) : + G.cylinder.map ((StrictOmegaCategory.inclusion (n + 1)).map (r.reflect.map i)) ≫ Q = + G.projection.app (r.reflect.obj A).val ≫ + (StrictOmegaCategory.inclusion (n + 1)).map (r.reflect.map v) := by + let qA : A ⟶ (r.reflect.obj A).val := r.adjunction.unit.app A + let qX : X ⟶ (r.reflect.obj X).val := r.adjunction.unit.app X + let ri : (r.reflect.obj A).val ⟶ (r.reflect.obj X).val := + (StrictOmegaCategory.inclusion (n + 1)).map (r.reflect.map i) + let rv : (r.reflect.obj A).val ⟶ (r.reflect.obj X).val := + (StrictOmegaCategory.inclusion (n + 1)).map (r.reflect.map v) + have hi : i ≫ qX = qA ≫ ri := r.adjunction.unit.naturality i + have hv : v ≫ qX = qA ≫ rv := r.adjunction.unit.naturality v + apply (G.cylinderRestrictionEquiv t r A (r.reflect.obj X)).injective + exact (G.cylinderRestrictionEquiv_apply t r _ _ _).trans ((calc + G.cylinder.map qA ≫ (G.cylinder.map ri ≫ Q) + = G.cylinder.map (qA ≫ ri) ≫ Q := by rw [G.cylinder.map_comp, Category.assoc] + _ = G.cylinder.map (i ≫ qX) ≫ Q := congrArg (fun f => G.cylinder.map f ≫ Q) hi.symm + _ = G.cylinder.map i ≫ (G.cylinder.map qX ≫ Q) := by rw [G.cylinder.map_comp, Category.assoc] + _ = G.cylinder.map i ≫ (P ≫ qX) := congrArg (fun f => G.cylinder.map i ≫ f) hQ + _ = (G.cylinder.map i ≫ P) ≫ qX := (Category.assoc _ _ _).symm + _ = (G.projection.app A ≫ v) ≫ qX := congrArg (fun f => f ≫ qX) hP + _ = G.projection.app A ≫ (qA ≫ rv) := (Category.assoc _ _ _).trans + (congrArg (fun f => G.projection.app A ≫ f) hv) + _ = (G.cylinder.map qA ≫ G.projection.app (r.reflect.obj A).val) ≫ rv := + (Category.assoc _ _ _).symm.trans + (congrArg (fun f => f ≫ rv) (G.projection.naturality qA).symm) + _ = G.cylinder.map qA ≫ (G.projection.app (r.reflect.obj A).val ≫ rv) := Category.assoc _ _ _ + ).trans (G.cylinderRestrictionEquiv_apply t r _ _ _).symm) + +end RightGrayInput + +namespace RelativePrismData + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + (G : RightGrayInput h) (t : GrayTruncationInput G) {n : ℕ} (r : FiniteReflectionInput n) + +/-- Compose the omega prism with the finite reflection unit, then descend +its source cylinder by the published internal-hom truncation theorem. -/ +noncomputable def finitePrism : + G.cylinder.obj (r.reflect.obj (h.categorification.obj (nerve E))).val ⟶ + (r.reflect.obj (h.categorification.obj (nerve E))).val := + (G.cylinderRestrictionEquiv t r _ _).symm + (D.prism h G ≫ r.adjunction.unit.app (h.categorification.obj (nerve E))) + +theorem finitePrism_restrict : + G.cylinder.map (r.adjunction.unit.app (h.categorification.obj (nerve E))) ≫ + D.finitePrism h G t r = D.prism h G ≫ r.adjunction.unit.app (h.categorification.obj (nerve E)) := by + let e := G.cylinderRestrictionEquiv t r (h.categorification.obj (nerve E)) + (r.reflect.obj (h.categorification.obj (nerve E))) + exact (G.cylinderRestrictionEquiv_apply t r _ _ _).symm.trans (e.apply_symm_apply _) + +/-- The descended endpoints are the actual finite categorification maps. -/ +theorem finitePrism_endpoint (a : Bool) : + (G.endpoint a).app (r.reflect.obj (h.categorification.obj (nerve E))).val ≫ + D.finitePrism h G t r = + (StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap (if a then D.last else D.first))) := by + apply r.unit_hom_ext (h.categorification.obj (nerve E)) + have hp := G.factor_cylinder_endpoint r (h.categorification.obj (nerve E)) + (r.reflect.obj (h.categorification.obj (nerve E))) + (D.prism h G ≫ r.adjunction.unit.app (h.categorification.obj (nerve E))) + (D.finitePrism h G t r) (D.finitePrism_restrict h G t r) a + exact hp.trans ((Category.assoc _ _ _).symm.trans + ((congrArg (fun f => f ≫ r.adjunction.unit.app _) (D.prism_endpoint h G a)).trans + (r.adjunction.unit.naturality (h.posetMap (if a then D.last else D.first))))) + +/-- The finite relative prism is stationary on the entire reflected old cylinder. -/ +theorem finitePrism_stationary : + G.cylinder.map ((StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap D.oldInclusion))) ≫ D.finitePrism h G t r = + G.projection.app (r.reflect.obj (h.categorification.obj (nerve D.old))).val ≫ + (StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap (D.first.comp D.oldInclusion))) := + G.factor_cylinder_stationary t r _ _ _ _ (D.prism h G) (D.finitePrism h G t r) + (D.finitePrism_restrict h G t r) (D.prism_stationary h G) + +end RelativePrismData +end Thomason.Construction + +end + +section + +/-! # The two stationary cylinders for a greatest new element -/ + +namespace Thomason.Construction.SieveRetraction + +open CategoryTheory + +variable {E : Type} [PartialOrder E] {A : Set E} (R : SieveRetraction A) + {x : E} (hx : GreatestNew (A := A) x) + +noncomputable def upperPrismData : RelativePrismData E where + old := A + lower := R.lower + first := OrderHom.id + last := R.upperCollapse hx + le := R.identity_le_upperCollapse hx + agree := fun _ ha => (R.upperCollapse_old hx ha).symm + constant := fun _ ha _ hb => (R.upperCollapse_new hx ha).trans (R.upperCollapse_new hx hb).symm + +noncomputable def lowerPrismData : RelativePrismData E where + old := A + lower := R.lower + first := R.oldCollapse hx + last := R.upperCollapse hx + le := R.oldCollapse_le_upperCollapse hx + agree := fun _ ha => (R.oldCollapse_old hx ha).trans (R.upperCollapse_old hx ha).symm + constant := fun _ ha _ hb => (R.upperCollapse_new hx ha).trans (R.upperCollapse_new hx hb).symm + +variable (h : NormalizedSimplexIdentities) [StrictColimitsInput] (G : RightGrayInput h) + +/-- The common upper map gives two strict cylinders, both stationary on +all cells of the old part. Their endpoints are `id ≤ upper ≥ lower`. -/ +theorem greatest_new_cylinders : + ∃ P Q : G.cylinder.obj (h.categorification.obj (nerve E)) ⟶ h.categorification.obj (nerve E), + (G.endpoint false).app _ ≫ P = 𝟙 _ ∧ + (G.endpoint true).app _ ≫ P = h.posetMap (R.upperCollapse hx) ∧ + (G.endpoint false).app _ ≫ Q = h.posetMap (R.oldCollapse hx) ∧ + (G.endpoint true).app _ ≫ Q = h.posetMap (R.upperCollapse hx) ∧ + G.cylinder.map (h.posetMap (subposetInclusion A)) ≫ P = + G.projection.app _ ≫ h.posetMap (subposetInclusion A) ∧ + G.cylinder.map (h.posetMap (subposetInclusion A)) ≫ Q = + G.projection.app _ ≫ h.posetMap (subposetInclusion A) := by + let D := R.upperPrismData hx + let D' := R.lowerPrismData hx + refine ⟨D.prism h G, D'.prism h G, ?_, D.prism_endpoint h G true, + D'.prism_endpoint h G false, D'.prism_endpoint h G true, ?_, ?_⟩ + · exact (D.prism_endpoint h G false).trans (h.posetMap_id E) + · have hs := D.prism_stationary h G + have he : D.first.comp D.oldInclusion = subposetInclusion A := by rfl + exact hs.trans (congrArg (fun f => G.projection.app _ ≫ h.posetMap f) he) + · have hs := D'.prism_stationary h G + have he : D'.first.comp D'.oldInclusion = subposetInclusion A := by + apply DFunLike.ext + intro a + exact R.oldCollapse_old hx a.property + exact hs.trans (congrArg (fun f => G.projection.app _ ≫ h.posetMap f) he) + +/-- The old-valued collapse is an actual retraction after categorification. -/ +theorem oldCollapse_posetMap_retraction : + h.posetMap (subposetInclusion A) ≫ h.posetMap (R.oldCollapseRetraction hx) = 𝟙 _ ∧ + h.posetMap (R.oldCollapseRetraction hx) ≫ h.posetMap (subposetInclusion A) = + h.posetMap (R.oldCollapse hx) := by + constructor + · have he : (R.oldCollapseRetraction hx).comp (subposetInclusion A) = OrderHom.id := by + apply DFunLike.ext + exact R.oldCollapseRetraction_coe hx + exact (h.posetMap_comp _ _).symm.trans + ((congrArg h.posetMap he).trans (h.posetMap_id A)) + · exact (h.posetMap_comp _ _).symm + +end Thomason.Construction.SieveRetraction + +end + +section + +/-! # Constructed simplex atoms and composition generation + +The recursive cone cells satisfy Steiner's entire signed-part table formula. +The composition-generation assertion is separated from these explicit formulas. +-/ + +namespace Thomason.Construction + +namespace SimplexComplex + +/-- The two parts of a boundary with distinct positive and negative basis terms. -/ +theorem signedPart_single_sub {m p : ℕ} (a : Bool) (b c : Basis m p) (hbc : b ≠ c) : + signedPart a (Finsupp.single b 1 - Finsupp.single c 1) = + if a then Finsupp.single b 1 else Finsupp.single c 1 := by + classical + apply Finsupp.ext + intro t + cases a <;> by_cases hb : t = b <;> by_cases hc : t = c <;> + simp_all [signedPart] + +/-- The bottom chains of the constructed principal cells are their endpoint vertices. -/ +theorem principalCell_bottom (h : NormalizedSimplexIdentities) (m : ℕ) (a : Bool) : + (principalCell h m).table a 0 = + if a then Finsupp.single (vertexBasis (Fin.last m)) 1 + else Finsupp.single (vertexBasis 0) 1 := by + cases a with + | false => + exact congrArg (fun x : h.object m => x.table false 0) (principalCell_source h m) + | true => + exact congrArg (fun x : h.object m => x.table false 0) (principalCell_target h m) + +/-- The zero-dimensional signed-boundary formula follows from the two distinct endpoints. -/ +theorem principalCell_signedPart_zero (h : NormalizedSimplexIdentities) (m : ℕ) (a : Bool) : + signedPart a (differential (m + 1) 0 ((principalCell h (m + 1)).table a 1)) = + (principalCell h (m + 1)).table a 0 := by + have hb : differential (m + 1) 0 ((principalCell h (m + 1)).table a 1) = + (principalCell h (m + 1)).table true 0 - (principalCell h (m + 1)).table false 0 := + (principalCell h (m + 1)).boundary a 0 + have hne : vertexBasis (Fin.last (m + 1)) ≠ vertexBasis (0 : Fin (m + 2)) := by + intro he + have hv := congrArg (fun b : Basis (m + 1) 0 => (b 0).val) he + change m + 1 = 0 at hv + omega + have ht : (principalCell h (m + 1)).table true 0 = + Finsupp.single (vertexBasis (Fin.last (m + 1))) 1 := principalCell_bottom h _ true + have hs : (principalCell h (m + 1)).table false 0 = + Finsupp.single (vertexBasis 0) 1 := principalCell_bottom h _ false + have hd := hb.trans (congrArg₂ (· - ·) ht hs) + exact (congrArg (signedPart a) hd).trans + ((signedPart_single_sub a _ _ hne).trans (principalCell_bottom h _ a).symm) + +/-- The entire downward-recursive atom table is proved, not postulated. -/ +theorem principalCell_isBasisAtom (h : NormalizedSimplexIdentities) (m : ℕ) : + IsBasisAtom h (topBasis m) (principalCell h m) := by + induction m with + | zero => + refine ⟨principalCell_top h 0, ?_, ?_⟩ + · intro a n hn + omega + · intro a n hn + exact NormalizedSimplexIdentities.chains_eq_zero_above hn _ + | succ m ih => + refine ⟨principalCell_top h (m + 1), ?_, ?_⟩ + · intro a n hn + cases n with + | zero => exact (principalCell_signedPart_zero h m a).symm + | succ p => + exact (coneCell_signedPart h (principalCell h m) p + (fun b => (ih.2.1 b p (by omega)).symm) a).symm + · intro a n hn + exact NormalizedSimplexIdentities.chains_eq_zero_above hn _ + +end SimplexComplex + +/-- Steiner 2004, Theorem 5.6, restricted to generation by the simplex atoms +explicitly constructed here. Atom existence, tables and endpoints are proved. -/ +structure PublishedSimplexGenerationInput (h : NormalizedSimplexIdentities) : Prop where + generated (m : ℕ) (P : h.object m → Prop) + (atoms : ∀ p (b : SimplexComplex.Basis m p), + P ((h.map b.toOrderHom).toFun (SimplexComplex.principalCell h p))) + (compositions : ∀ n x y hxy, P x → P y → P ((h.object m).comp n x y hxy)) : + ∀ x, P x + +/-- The signed-part formulas and composition generation give the simplex-atom data. -/ +noncomputable def PublishedSimplexGenerationInput.toSimplexAtomsInput + {h : NormalizedSimplexIdentities} (g : PublishedSimplexGenerationInput h) : SimplexAtomsInput h where + principal := SimplexComplex.principalCell h + principal_table := SimplexComplex.principalCell_isBasisAtom h + principal_source := SimplexComplex.principalCell_source h + principal_target := SimplexComplex.principalCell_target h + generated := g.generated + +end Thomason.Construction + +end + +section + +/-! # The full table formula for every constructed simplex atom + +An injective vertex map acts by an actual embedding of normalized bases. +It therefore commutes with signed parts. Applying it to a principal atom +constructs the required basis atom without a generation premise. +-/ + +namespace Thomason.Construction.SimplexComplex + +/-- Postcomposition with an increasing tuple embeds every normalized basis. -/ +def basisPostcompose {m p : ℕ} (b : Basis m p) (q : ℕ) : Basis p q ↪ Basis m q where + toFun s := s.trans b + inj' s t he := by + apply DFunLike.ext + intro i + exact b.injective (congrArg (fun c : Basis m q => c i) he) + +/-- An injective simplex operator has no degenerate or colliding images. -/ +theorem mapChains_embedding {m p q : ℕ} (b : Basis m p) (x : Chains p q) : + mapChains b.toOrderHom q x = Finsupp.embDomain (basisPostcompose b q) x := by + induction x using Finsupp.induction with + | zero => simp + | @single_add s z x _ _ ih => + have hs : mapBasis b.toOrderHom q s = Finsupp.single (s.trans b) 1 := by + have hm : StrictMono (fun i => b.toOrderHom (s i)) := by + intro i j hij + exact b.strictMono (s.strictMono hij) + rw [mapBasis, dite_eq_left hm] + rfl + simp only [map_add, mapChains_single, hs, ih, Finsupp.embDomain_add, + Finsupp.embDomain_single, Finsupp.smul_single, smul_eq_mul, mul_one] + rfl + +/-- Signed parts commute with these actual basis embeddings. -/ +theorem mapChains_embedding_signedPart {m p q : ℕ} (b : Basis m p) (side : Bool) + (x : Chains p q) : + mapChains b.toOrderHom q (signedPart side x) = + signedPart side (mapChains b.toOrderHom q x) := by + rw [mapChains_embedding, mapChains_embedding] + exact Finsupp.embDomain_mapRange (basisPostcompose b q) + (fun z => max 0 (if side then z else -z)) x (by cases side <;> simp) + +/-- Every face image of the principal atom satisfies the full recursive +signed-boundary table formula. -/ +theorem basisAtom_embedding (h : NormalizedSimplexIdentities) {m p : ℕ} + (b : Basis m p) (x : h.object p) (hx : IsBasisAtom h (topBasis p) x) : + IsBasisAtom h b ((h.map b.toOrderHom).toFun x) := by + refine ⟨?_, ?_, ?_⟩ + · intro side + change mapChains b.toOrderHom p (x.table side p) = _ + rw [hx.1 side, mapChains_embedding, Finsupp.embDomain_single] + rfl + · intro side n hn + change mapChains b.toOrderHom n (x.table side n) = + signedPart side (differential m n (mapChains b.toOrderHom (n+1) (x.table side (n+1)))) + rw [hx.2.1 side n hn, mapChains_embedding_signedPart] + exact congrArg (signedPart side) ((h.naturality b.toOrderHom) n (x.table side (n+1))) + · intro side n hn + change mapChains b.toOrderHom n (x.table side n) = 0 + rw [hx.2.2 side n hn, map_zero] + +/-- The concrete atom attached to any normalized basis element. -/ +noncomputable def basisAtom (h : NormalizedSimplexIdentities) {m p : ℕ} (b : Basis m p) : + h.object m := (h.map b.toOrderHom).toFun (principalCell h p) + +theorem basisAtom_isBasisAtom (h : NormalizedSimplexIdentities) {m p : ℕ} (b : Basis m p) : + IsBasisAtom h b (basisAtom h b) := + basisAtom_embedding h b (principalCell h p) (principalCell_isBasisAtom h p) + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Positive residual chains below a simplex atom + +Agreement above a degree identifies the differences of the two boundaries. +The disjoint signed supports of an atom then make the residual positive. +At degree zero its augmentation is zero, so the residual vanishes. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators + +/-- A positive zero-chain of augmentation zero vanishes coefficientwise. -/ +theorem positive_augmentation_zero {m : ℕ} (z : Chains m 0) + (hz : z ∈ positive m 0) (he : augmentation m z = 0) : z = 0 := by + classical + have hs : ∑ b ∈ z.support, z b = 0 := by + simpa [augmentation, Finsupp.linearCombination_apply, Finsupp.sum] using he + apply Finsupp.ext + intro b + by_cases hb : b ∈ z.support + · have hle := Finset.single_le_sum (fun c (_ : c ∈ z.support) => hz c) hb + rw [hs] at hle + exact le_antisymm hle (hz b) + · exact Finsupp.notMem_support_iff.mp hb + +/-- Equal next-degree chains give the same residual on both sides. -/ +theorem atom_residual_sides {h : NormalizedSimplexIdentities} {m : ℕ} + (X A : h.object m) (r : ℕ) + (he : X.table false (r+1) = A.table false (r+1)) : + X.table false r - A.table false r = X.table true r - A.table true r := by + have hd := congrArg (differential m r) he + change (directedComplex m (h.squared m)).differential r (X.table false (r+1)) = + (directedComplex m (h.squared m)).differential r (A.table false (r+1)) at hd + rw [X.boundary, A.boundary] at hd + apply sub_eq_zero.mp + calc + _ = (A.table true r - A.table false r) - + (X.table true r - X.table false r) := by abel + _ = 0 := by rw [hd, sub_self] + +/-- The extra chain below a common atom is positive; no generation input +is needed for this subtraction. -/ +theorem atom_residual_positive {h : NormalizedSimplexIdentities} {m p : ℕ} + {b : Basis m p} (X A : h.object m) (hA : IsBasisAtom h b A) + (r : ℕ) (hr : r < p) + (he : X.table false (r+1) = A.table false (r+1)) : + X.table false r - A.table false r ∈ positive m r := by + have hs := atom_residual_sides X A r he + intro c + have hdis := ordered_basisAtoms_disjoint hA hA hr hr le_rfl c + rcases hdis with hneg | hpos + · simpa only [Finsupp.sub_apply, hneg, sub_zero] using X.positive false r c + · rw [hs] + simpa only [Finsupp.sub_apply, hpos, sub_zero] using X.positive true r c + +/-- There is no lower-dimensional freedom below the zero-chains of an +atom: augmentation one removes the positive residual. -/ +theorem eq_atom_of_above_zero {h : NormalizedSimplexIdentities} {m p : ℕ} + {b : Basis m p} (X A : h.object m) (hA : IsBasisAtom h b A) (hp : 0 < p) + (he : ∀ n, 0 < n → ∀ side, X.table side n = A.table side n) : X = A := by + have hr := atom_residual_positive X A hA 0 hp (he 1 (by omega) false) + have haug : augmentation m (X.table false 0 - A.table false 0) = 0 := by + change (directedComplex m (h.squared m)).augmentation + (X.table false 0 - A.table false 0) = 0 + rw [map_sub, X.augmentation, A.augmentation, sub_self] + have hzero := positive_augmentation_zero _ hr haug + have hfalse : X.table false 0 = A.table false 0 := sub_eq_zero.mp hzero + have htrue : X.table true 0 = A.table true 0 := by + apply sub_eq_zero.mp + rw [← atom_residual_sides X A 0 (he 1 (by omega) false), hzero] + apply DirectedComplex.Cell.ext + funext side n + cases n with + | zero => cases side <;> assumption + | succ n => exact he (n+1) (by omega) side + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Positive chains as finite lists of actual simplex atoms + +Coefficients give literal repeated atoms. Sorting those lists by the +signed-boundary height supplies the disjointness used by cell splitting. +-/ + +namespace Thomason.Construction.SimplexComplex + +open scoped BigOperators +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- An atom retains both its degree and its increasing vertex tuple. -/ +abbrev AtomIndex (m : ℕ) := Σ p, Basis m p + +noncomputable def atomCell (h : NormalizedSimplexIdentities) {m : ℕ} + (a : AtomIndex m) : Cell (directedComplex m (h.squared m)) := basisAtom h a.2 + +def atomHeight {m : ℕ} (a : AtomIndex m) : ℤ := basisHeight a.2 + +theorem atomCell_isBasisAtom (h : NormalizedSimplexIdentities) {m : ℕ} + (a : AtomIndex m) : IsBasisAtom h a.2 (atomCell h a) := basisAtom_isBasisAtom h a.2 + +/-- A finite integral positive chain specifies a finite list of atoms. -/ +noncomputable def chainAtomIndices {m p : ℕ} (z : Chains m p) : List (AtomIndex m) := + z.support.toList.flatMap (fun b => List.replicate (z b).toNat ⟨p, b⟩) + +theorem chainAtomIndices_degree {m p : ℕ} (z : Chains m p) + (a : AtomIndex m) (ha : a ∈ chainAtomIndices z) : a.1 = p := by + obtain ⟨b, _, hb⟩ := List.mem_flatMap.mp ha + obtain ⟨_, he⟩ := List.mem_replicate.mp hb + subst a + rfl + +private theorem sum_map_flatMap {α β M : Type*} [AddMonoid M] + (as : List α) (f : α → List β) (g : β → M) : + ((as.flatMap f).map g).sum = (as.map (fun a => ((f a).map g).sum)).sum := by + induction as with + | nil => rfl + | cons a as ih => simp only [List.flatMap_cons, List.map_append, List.sum_append, + List.map_cons, List.sum_cons, ih] + +/-- The top chains of the listed atoms sum to precisely the original chain. -/ +theorem chainAtomIndices_table (h : NormalizedSimplexIdentities) {m p : ℕ} + (z : Chains m p) (hz : z ∈ positive m p) (side : Bool) : + (Cell.PositiveTable.ofCells ((chainAtomIndices z).map (atomCell h))).table side p = z := by + classical + rw [Cell.PositiveTable.ofCells_table] + rw [List.map_map] + unfold chainAtomIndices + rw [sum_map_flatMap] + simp only [List.map_replicate, List.sum_replicate] + change (z.support.toList.map (fun b => + (z b).toNat • (atomCell h ⟨p,b⟩).table side p)).sum = z + have ht (b : Basis m p) : (atomCell h ⟨p,b⟩).table side p = Finsupp.single b 1 := + (atomCell_isBasisAtom h ⟨p,b⟩).1 side + simp_rw [ht] + rw [Finset.sum_map_toList] + calc + ∑ b ∈ z.support, (z b).toNat • Finsupp.single b (1 : ℤ) = + ∑ b ∈ z.support, Finsupp.single b (z b) := by + apply Finset.sum_congr rfl + intro b _ + simp only [Finsupp.smul_single, nsmul_eq_mul, mul_one, Int.toNat_of_nonneg (hz b)] + _ = z := Finsupp.sum_single z + +/-- No listed atom contributes above the degree of the chain. -/ +theorem chainAtomIndices_above (h : NormalizedSimplexIdentities) {m p : ℕ} + (z : Chains m p) (n : ℕ) (hn : p < n) (side : Bool) : + (Cell.PositiveTable.ofCells ((chainAtomIndices z).map (atomCell h))).table side n = 0 := by + rw [Cell.PositiveTable.ofCells_table] + rw [List.map_map] + apply List.sum_eq_zero + intro v hv + obtain ⟨a, ha, rfl⟩ := List.mem_map.mp hv + exact (atomCell_isBasisAtom h a).2.2 side n + (by rw [chainAtomIndices_degree z a ha]; exact hn) + +/-- Height sorting is a permutation, so it retains every positive table. -/ +noncomputable def sortAtoms {m : ℕ} (as : List (AtomIndex m)) : List (AtomIndex m) := + as.mergeSort (fun a b => decide (atomHeight a ≤ atomHeight b)) + +theorem sortAtoms_perm {m : ℕ} (as : List (AtomIndex m)) : (sortAtoms as).Perm as := + List.mergeSort_perm _ _ + +theorem sortAtoms_pairwise {m : ℕ} (as : List (AtomIndex m)) : + (sortAtoms as).Pairwise (fun a b => atomHeight a ≤ atomHeight b) := by + simpa only [sortAtoms, decide_eq_true_eq] using + (List.pairwise_mergeSort + (le := fun a b : AtomIndex m => decide (atomHeight a ≤ atomHeight b)) + (fun a b c hab hbc => by + simpa only [decide_eq_true_eq] using le_trans + (of_decide_eq_true hab) (of_decide_eq_true hbc)) + (fun a b => by simp only [Bool.or_eq_true, decide_eq_true_eq]; exact le_total _ _) as) + +theorem sortAtoms_table (h : NormalizedSimplexIdentities) {m : ℕ} + (as : List (AtomIndex m)) (side : Bool) (n : ℕ) : + (Cell.PositiveTable.ofCells ((sortAtoms as).map (atomCell h))).table side n = + (Cell.PositiveTable.ofCells (as.map (atomCell h))).table side n := by + simp only [Cell.PositiveTable.ofCells_table] + simp only [List.map_map] + exact ((sortAtoms_perm as).map (fun a => (atomCell h a).table side n)).sum_eq + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # The concrete ordered basis of every normalized simplex complex -/ + +namespace Thomason.Construction.SimplexComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +/-- Every field is the corresponding literal normalized-chain construction. +No generation assertion is required by this interface. -/ +noncomputable def orderedAtomBasis (h : NormalizedSimplexIdentities) (m : ℕ) : + OrderedAtomBasis (directedComplex m (h.squared m)) where + Index p := Basis m p + coordinates _ := AddEquiv.refl _ + positive_iff _ _ := Iff.rfl + augmentation x := by + simp [directedComplex, augmentation, Finsupp.linearCombination_apply, Finsupp.sum] + atom _ b := basisAtom h b + atom_top _ b side := (basisAtom_isBasisAtom h b).1 side + atom_above _ b n hn side := (basisAtom_isBasisAtom h b).2.2 side n hn + height _ b := basisHeight b + disjoint b c hrp hrq hbc e := + ordered_basisAtoms_disjoint (basisAtom_isBasisAtom h b) (basisAtom_isBasisAtom h c) + hrp hrq hbc e + +end Thomason.Construction.SimplexComplex + +end + +section + +/-! # Generation of the actual simplex-chain cylinders + +The atoms are the two endpoint copies of the simplex atoms and their +actual mixed prisms. Their signed heights instantiate the proved ordered +generation theorem, without a freeness or tensor-preservation premise. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +noncomputable def cylinderOrderedAtomBasis (hs : B.SideHeight) : + OrderedAtomBasis (rightCylinder K) where + Index p := B.CylinderIndex p + coordinates := B.cylinderCoordinates + positive_iff := B.cylinder_positive_iff + augmentation := B.cylinder_augmentation + atom _ := B.cylinderAtom + atom_top _ := B.cylinderAtom_top + atom_above _ := B.cylinderAtom_above + height _ := RightCylinderBasis.height B.height + disjoint b c hrp hrq hbc e := B.cylinder_atoms_disjoint hs b c hrp hrq hbc e + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +namespace Thomason.Construction.SimplexComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +theorem orderedAtomBasis_sideHeight (h : NormalizedSimplexIdentities) (m : ℕ) : + (orderedAtomBasis h m).SideHeight := by + intro p b q hqp side c hc + exact basisAtom_side_height (basisAtom_isBasisAtom h b) side q hqp c + (Finsupp.mem_support_iff.mpr hc) + +/-- The concrete right interval tensor on each normalized simplex has +an actual ordered atom basis, including all mixed prisms. -/ +noncomputable def cylinderOrderedAtomBasis (h : NormalizedSimplexIdentities) (m : ℕ) : + OrderedAtomBasis (rightCylinder (directedComplex m (h.squared m))) := + (orderedAtomBasis h m).cylinderOrderedAtomBasis (orderedAtomBasis_sideHeight h m) + +/-- Every strict cell of the actual simplex-chain cylinder is generated +by its explicit endpoint atoms and mixed prism atoms. -/ +theorem cylinder_generated (h : NormalizedSimplexIdentities) (m : ℕ) + (P : Cell (rightCylinder (directedComplex m (h.squared m))) → Prop) + (hatom : ∀ p b, P ((cylinderOrderedAtomBasis h m).atom p b)) + (hcomp : ∀ n x y hxy, P x → P y → P (Cell.comp x y n hxy)) : ∀ X, P X := + (cylinderOrderedAtomBasis h m).generated P hatom hcomp + +end Thomason.Construction.SimplexComplex + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/SimplicialHomotopyWhiskering.lean b/lean/OAI/CategoryTheory/Thomason/Gray/SimplicialHomotopyWhiskering.lean new file mode 100644 index 0000000000000000000000000000000000000000..a95cfbaf114559bb64951622d3e63f46deef8af4 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/SimplicialHomotopyWhiskering.lean @@ -0,0 +1,248 @@ +import OAI.CategoryTheory.Thomason.Gray.SimplexCylinderGeneration +import OAI.CategoryTheory.Thomason.Simplicial.CanonicalExtensionAnodyneHorn +import OAI.CategoryTheory.Thomason.Simplicial.FixedInternalPathMaps +import OAI.CategoryTheory.Thomason.Simplicial.KanFiberComponentTransport + +namespace OAI + +section + +/-! # The carrier of a realized ordered homotopy + +An ordered simplicial prism chooses an endpoint image at every vertex. +Its realized support is therefore contained in the union of the two +endpoint supports at the original parameter point. +-/ + +namespace Thomason.Construction.PosetGeometry + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open Convexity RealizationPrism +open scoped Simplicial + +noncomputable section + +theorem homotopy_support_of_vertex_choices {K : SSet.{0}} {P : Type} [PartialOrder P] + {f g : K ⟶ nerve P} (H : SSet.Homotopy f g) + (hv : ∀ (n : ℕ) (s : (K ⊗ Δ[1]) _⦋n⦌) (i : Fin (n+1)), + (H.h.app _ s).obj i = (f.app _ s.1).obj i ∨ + (H.h.app _ s).obj i = (g.app _ s.1).obj i) + (t : unitInterval) (z : SSet.toTop.obj K) (y : P) + (hy : (coordinates P (RealizedCylinder.homotopy H (t, z))).weights y ≠ 0) : + (coordinates P ((SSet.toTop.map f).hom z)).weights y ≠ 0 ∨ + (coordinates P ((SSet.toTop.map g).hom z)).weights y ≠ 0 := by + classical + obtain ⟨n, s, p, hs⟩ := point_representation_simplex (K ⊗ Δ[1]) + ((RealizedCylinder.comparison K).hom (z, t)) + have hz : simplexPoint K s.1 p = z := by + calc + _ = (SSet.toTop.map (fst K Δ[1])).hom + (simplexPoint (K ⊗ Δ[1]) s p) := + (simplexPoint_naturality (fst K Δ[1]) s p).symm + _ = _ := (congrArg (SSet.toTop.map (fst K Δ[1])).hom hs).trans + (RealizedCylinder.comparison_first K z t) + have hh : coordinates P (RealizedCylinder.homotopy H (t, z)) = + StdSimplex.map (H.h.app _ s).obj p := by + rw [realizedHomotopy_apply, ← hs, simplexPoint_naturality, + coordinates_simplexPoint] + have hf : coordinates P ((SSet.toTop.map f).hom z) = + StdSimplex.map (f.app _ s.1).obj p := by + rw [← hz, simplexPoint_naturality, coordinates_simplexPoint] + have hg : coordinates P ((SSet.toTop.map g).hom z) = + StdSimplex.map (g.app _ s.1).obj p := by + rw [← hz, simplexPoint_naturality, coordinates_simplexPoint] + rw [hh] at hy + have hys : y ∈ (p.weights.mapDomain (H.h.app _ s).obj).support := + Finsupp.mem_support_iff.mpr hy + rw [Finsupp.support_mapDomain_of_nonneg p.nonneg] at hys + obtain ⟨i, hi, hiy⟩ := Finset.mem_image.mp hys + rcases hv n s i with h | h + · left + rw [hf] + apply Finsupp.mem_support_iff.mp + change y ∈ (p.weights.mapDomain (f.app _ s.1).obj).support + rw [Finsupp.support_mapDomain_of_nonneg p.nonneg] + exact Finset.mem_image.mpr ⟨i, hi, h.symm.trans hiy⟩ + · right + rw [hg] + apply Finsupp.mem_support_iff.mp + change y ∈ (p.weights.mapDomain (g.app _ s.1).obj).support + rw [Finsupp.support_mapDomain_of_nonneg p.nonneg] + exact Finset.mem_image.mpr ⟨i, hi, h.symm.trans hiy⟩ + +theorem orderedVertexHomotopy_support {K : SSet.{0}} {P : Type} [PartialOrder P] + (f g : K ⟶ nerve P) + (hfg : ∀ v : K _⦋0⦌, (f.app _ v).obj 0 ≤ (g.app _ v).obj 0) + (t : unitInterval) (z : SSet.toTop.obj K) (y : P) + (hy : (coordinates P + (RealizedCylinder.homotopy (orderedVertexHomotopy f g hfg) (t, z))).weights y ≠ 0) : + (coordinates P ((SSet.toTop.map f).hom z)).weights y ≠ 0 ∨ + (coordinates P ((SSet.toTop.map g).hom z)).weights y ≠ 0 := by + apply homotopy_support_of_vertex_choices (orderedVertexHomotopy f g hfg) _ t z y hy + intro n s i + change (if (SSet.stdSimplex.objEquiv s.2).toOrderHom i = 0 then + (f.app _ s.1).obj i else (g.app _ s.1).obj i) = (f.app _ s.1).obj i ∨ + (if (SSet.stdSimplex.objEquiv s.2).toOrderHom i = 0 then + (f.app _ s.1).obj i else (g.app _ s.1).obj i) = (g.app _ s.1).obj i + split_ifs <;> simp + +theorem orderNerveHomotopy_support {Q P : Type} [PartialOrder Q] [PartialOrder P] + (f g : Q →o P) (hfg : ∀ q, f q ≤ g q) + (t : unitInterval) (z : SSet.toTop.obj (nerve Q)) (y : P) + (hy : (coordinates P + (RealizedCylinder.homotopy (orderNerveHomotopy f g hfg) (t, z))).weights y ≠ 0) : + (coordinates P ((SSet.toTop.map (nerveMap f.monotone.functor)).hom z)).weights y ≠ 0 ∨ + (coordinates P ((SSet.toTop.map (nerveMap g.monotone.functor)).hom z)).weights y ≠ 0 := by + apply homotopy_support_of_vertex_choices (orderNerveHomotopy f g hfg) _ t z y hy + intro n s i + change (if (SSet.stdSimplex.objEquiv s.2).toOrderHom i = 0 then + f (s.1.obj i) else g (s.1.obj i)) = f (s.1.obj i) ∨ + (if (SSet.stdSimplex.objEquiv s.2).toOrderHom i = 0 then + f (s.1.obj i) else g (s.1.obj i)) = g (s.1.obj i) + split_ifs <;> simp + +end + +end Thomason.Construction.PosetGeometry + +end + +section + +/-! # Naturality of the ordered-vertex prism -/ + +namespace Thomason.Construction.PosetGeometry + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +theorem orderedVertexHomotopy_naturality + {K L : SSet.{0}} {P Q : Type} [PartialOrder P] [PartialOrder Q] + (f₀ f₁ : K ⟶ nerve P) (g₀ g₁ : L ⟶ nerve Q) + (hf : ∀ v : K _⦋0⦌, (f₀.app _ v).obj 0 ≤ (f₁.app _ v).obj 0) + (hg : ∀ v : L _⦋0⦌, (g₀.app _ v).obj 0 ≤ (g₁.app _ v).obj 0) + (u : K ⟶ L) (v : P →o Q) + (h₀ : u ≫ g₀ = f₀ ≫ nerveMap v.monotone.functor) + (h₁ : u ≫ g₁ = f₁ ≫ nerveMap v.monotone.functor) : + (u ▷ Δ[1]) ≫ (orderedVertexHomotopy g₀ g₁ hg).h = + (orderedVertexHomotopy f₀ f₁ hf).h ≫ nerveMap v.monotone.functor := by + apply NatTrans.ext + funext n + apply ConcreteCategory.hom_ext + rintro ⟨s, t⟩ + apply nerve.ext_of_isThin + funext i + change (if (SSet.stdSimplex.objEquiv t).toOrderHom i = 0 then + (g₀.app n (u.app n s)).obj i else (g₁.app n (u.app n s)).obj i) = + v (if (SSet.stdSimplex.objEquiv t).toOrderHom i = 0 then + (f₀.app n s).obj i else (f₁.app n s).obj i) + split_ifs + · exact congrArg (fun q => (q.app n s).obj i) h₀ + · exact congrArg (fun q => (q.app n s).obj i) h₁ + +end + +end Thomason.Construction.PosetGeometry + +end + +section + +/-! # Whiskering and exact extension invariance under simplicial homotopies -/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits MonoidalCategory CartesianMonoidalCategory +open SSet.modelCategoryQuillen +open scoped Simplicial + +noncomputable section + +/-- Pre- and postcompose an actual simplicial homotopy. -/ +def whiskerSimplicialHomotopy {A X Y B : SSet.{0}} (a : A ⟶ X) {f g : X ⟶ Y} + (H : SSet.Homotopy f g) (b : Y ⟶ B) : + SSet.Homotopy (a ≫ f ≫ b) (a ≫ g ≫ b) where + h := a ▷ Δ[1] ≫ H.h ≫ b + h₀ := by + have hn : SSet.ι₀ ≫ a ▷ (Δ[1] : SSet.{0}) = a ≫ SSet.ι₀ := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro x + rfl + rw [← Category.assoc, hn, Category.assoc, ← Category.assoc SSet.ι₀, H.h₀] + rfl + h₁ := by + have hn : SSet.ι₁ ≫ a ▷ (Δ[1] : SSet.{0}) = a ≫ SSet.ι₁ := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro x + rfl + rw [← Category.assoc, hn, Category.assoc, ← Category.assoc SSet.ι₁, H.h₁] + rfl + rel := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + intro x + exact False.elim x.1.property + +/-- Kan cylinder lifting works also when the prescribed total-space map +is the final endpoint. It makes a boundary homotopy exact at its start. -/ +theorem kan_extension_of_boundary_homotopy_reverse {A K X : SSet.{0}} + [SSet.KanComplex X] (i : A ⟶ K) [Mono i] (a : A ⟶ X) (d : K ⟶ X) + (H : SSet.Homotopy a (i ≫ d)) : + ∃ l : K ⟶ X, i ≫ l = a := by + obtain ⟨e, _, hei, _⟩ := exists_kan_cylinder_lift_one i (terminal.from X) + d H.h (terminal.from _) H.h₁ (terminal.hom_ext _ _) (terminal.hom_ext _ _) + refine ⟨SSet.ι₀ ≫ e, ?_⟩ + have hn : i ≫ SSet.ι₀ = SSet.ι₀ ≫ i ▷ (Δ[1] : SSet.{0}) := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + rfl + rw [← Category.assoc, hn, Category.assoc, hei, H.h₀] + +/-- Solvability of an exact extension problem in a Kan target is unchanged +by an actual simplicial homotopy of its prescribed boundary map. -/ +theorem kan_extension_iff_of_boundary_homotopy {A K X : SSet.{0}} + [SSet.KanComplex X] (i : A ⟶ K) [Mono i] {a b : A ⟶ X} + (H : SSet.Homotopy a b) : + (∃ d : K ⟶ X, i ≫ d = a) ↔ (∃ d : K ⟶ X, i ≫ d = b) := by + constructor + · rintro ⟨d, hd⟩ + have H' : SSet.Homotopy (i ≫ d) b := by rw [hd]; exact H + obtain ⟨l, hl, _⟩ := kan_lift_of_boundary_homotopy i (terminal.from X) + d (terminal.from _) (terminal.hom_ext _ _) b H' (terminal.hom_ext _ _) + exact ⟨l, hl⟩ + · rintro ⟨d, hd⟩ + have H' : SSet.Homotopy a (i ≫ d) := by rw [hd]; exact H + exact kan_extension_of_boundary_homotopy_reverse i a d H' + +/-- A map with a simplicial homotopy left inverse preserves and reflects +all exact monomorphic extension problems in a Kan source. -/ +theorem kan_extension_iff_of_homotopy_left_inverse {A K X Y : SSet.{0}} + [SSet.KanComplex X] (i : A ⟶ K) [Mono i] (a : A ⟶ X) + (f : X ⟶ Y) (g : Y ⟶ X) (H : SSet.Homotopy (𝟙 X) (f ≫ g)) : + (∃ d : K ⟶ X, i ≫ d = a) ↔ (∃ d : K ⟶ Y, i ≫ d = a ≫ f) := by + constructor + · rintro ⟨d, hd⟩ + exact ⟨d ≫ f, by rw [← Category.assoc, hd]⟩ + · rintro ⟨d, hd⟩ + have HA : SSet.Homotopy a (a ≫ f ≫ g) := by + simpa only [Category.id_comp, Category.comp_id] using + whiskerSimplicialHomotopy a H (𝟙 X) + apply (kan_extension_iff_of_boundary_homotopy i HA).mpr + exact ⟨d ≫ g, by rw [← Category.assoc, hd, Category.assoc]⟩ + +end + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/SingularCylinderEquivalence.lean b/lean/OAI/CategoryTheory/Thomason/Gray/SingularCylinderEquivalence.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6d518101a2e0093455a2e36f29fcbd40859d1d2 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/SingularCylinderEquivalence.lean @@ -0,0 +1,419 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeAtoms +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeCylinderSource +import OAI.CategoryTheory.Thomason.Simplicial.SubdivisionFaceImages + +namespace OAI + +section + +/-! # The actual realization weak equivalence of positive-chain cylinders + +The explicit minimum contraction gives a homotopy inverse on Street nerves. +This bridge uses the existing published simplex-generation premise, but no +right Gray adjunction, transfer, localization or Kan lifting premise. +-/ + +namespace Thomason.Construction.SimplexAtomsInput + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +include a + +/-- The projection of an actual chain cylinder is a weak equivalence for +the prescribed topological realization of the Street nerve. -/ +theorem chainCylinder_projection_weak (K : DirectedComplex.{0}) : + h.streetWeakEquivalences (RightCylinder.projection K).realization := by + let i : K.realization ⟶ (rightCylinder K).realization := + (RightCylinder.endpoint K false).realization + let p : (rightCylinder K).realization ⟶ K.realization := + (RightCylinder.projection K).realization + let c : (rightCylinder (rightCylinder K)).realization ⟶ + (rightCylinder K).realization := (RightCylinder.minimum K).realization + have hip : i ≫ p = 𝟙 K.realization := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_projection_endpoint K false x + have hzero : (RightCylinder.endpoint (rightCylinder K) false).realization ≫ c = + p ≫ i := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_minimum_outer_zero (K := K) x + have hone : (RightCylinder.endpoint (rightCylinder K) true).realization ≫ c = + 𝟙 (rightCylinder K).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_minimum_outer_one (K := K) x + have hx : SSet.Homotopy (h.streetNerve.map p ≫ h.streetNerve.map i) + (𝟙 (h.streetNerve.obj (rightCylinder K).realization)) := by + have hc := a.chainNerveHomotopy c + rw [hzero, hone, CategoryTheory.Functor.map_comp, CategoryTheory.Functor.map_id] at hc + exact hc + have hy : SSet.Homotopy (h.streetNerve.map i ≫ h.streetNerve.map p) + (𝟙 (h.streetNerve.obj K.realization)) := by + rw [← CategoryTheory.Functor.map_comp, hip, CategoryTheory.Functor.map_id] + exact SSet.RelativeMorphism.Homotopy.refl _ + exact simplicial_homotopy_inverse_weak (h.streetNerve.map p) (h.streetNerve.map i) hx hy + +end + +end Thomason.Construction.SimplexAtomsInput + +end + +section + +/-! # The actual Gray–Street cylinder comparison and singular evaluation -/ + +namespace Thomason.Construction.RightGrayInput + +open CategoryTheory MonoidalCategory + +noncomputable section + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) + +/-- The continuous comparison from the ordinary cylinder to the realized Gray cylinder. -/ +def realizedCylinderComparison (X : StrictOmegaCategory.{0}) : + TopologicalInterval.cylinder.obj (SSet.toTop.obj (h.streetNerve.obj X)) ⟶ + SSet.toTop.obj (h.streetNerve.obj (G.cylinder.obj X)) := + RealizedCylinder.comparison (h.streetNerve.obj X) ≫ + SSet.toTop.map (G.nerveCylinder aw X) + +/-- The geometric Gray comparison is natural in actual strict functors. -/ +theorem realizedCylinderComparison_naturality {X Y : StrictOmegaCategory.{0}} + (f : X ⟶ Y) : + TopologicalInterval.cylinder.map (SSet.toTop.map (h.streetNerve.map f)) ≫ + G.realizedCylinderComparison aw Y = + G.realizedCylinderComparison aw X ≫ + SSet.toTop.map (h.streetNerve.map (G.cylinder.map f)) := by + unfold realizedCylinderComparison + rw [← Category.assoc, RealizedCylinder.comparison_naturality, Category.assoc, + ← SSet.toTop.map_comp, G.nerveCylinder_naturality aw, SSet.toTop.map_comp, Category.assoc] + +/-- Preceding the nerve comparison by the explicit prism does not change its weak test. -/ +theorem nerveCylinder_weak_iff (X : StrictOmegaCategory.{0}) : + realizationWeakEquivalences (G.nerveCylinder aw X) ↔ + topologicalWeakEquivalences (G.realizedCylinderComparison aw X) := by + change topologicalWeakEquivalences (SSet.toTop.map (G.nerveCylinder aw X)) ↔ + topologicalWeakEquivalences + (RealizedCylinder.comparison (h.streetNerve.obj X) ≫ + SSet.toTop.map (G.nerveCylinder aw X)) + constructor + · exact fun h => topologicalWeakEquivalences.comp_mem _ _ + (RealizedCylinder.comparison_weak _) h + · exact fun h => topologicalWeakEquivalences.of_precomp _ _ + (RealizedCylinder.comparison_weak _) h + +/-- Collapsing the Gray interval recovers the original realization point exactly. -/ +theorem realizedCylinderComparison_projection (X : StrictOmegaCategory.{0}) : + G.realizedCylinderComparison aw X ≫ + SSet.toTop.map (h.streetNerve.map (G.projection.app X)) = + TopologicalInterval.projection (SSet.toTop.obj (h.streetNerve.obj X)) := by + unfold realizedCylinderComparison + rw [Category.assoc, ← SSet.toTop.map_comp, G.nerveCylinder_projection aw] + apply TopCat.hom_ext + apply ContinuousMap.ext + intro p + exact RealizedCylinder.comparison_first _ p.1 p.2 + +/-- The geometric Gray-cylinder comparison is weak exactly when its strict projection +satisfies the actual Street-nerve weak-equivalence test. -/ +theorem realizedCylinderComparison_weak_iff (X : StrictOmegaCategory.{0}) : + topologicalWeakEquivalences (G.realizedCylinderComparison aw X) ↔ + h.streetWeakEquivalences (G.projection.app X) := by + have hc : topologicalWeakEquivalences (G.realizedCylinderComparison aw X ≫ + SSet.toTop.map (h.streetNerve.map (G.projection.app X))) := by + rw [G.realizedCylinderComparison_projection aw] + exact TopologicalInterval.projection_weak _ + constructor + · intro hf + exact topologicalWeakEquivalences.of_precomp _ _ hf hc + · intro hg + exact topologicalWeakEquivalences.of_postcomp _ _ hg hc + +/-- The actual simplicial Gray–Street comparison and the strict cylinder projection +have exactly the same semantic weak-equivalence obligation. -/ +theorem nerveCylinder_weak_iff_projection (X : StrictOmegaCategory.{0}) : + realizationWeakEquivalences (G.nerveCylinder aw X) ↔ + h.streetWeakEquivalences (G.projection.app X) := + (G.nerveCylinder_weak_iff aw X).trans (G.realizedCylinderComparison_weak_iff aw X) + +/-- Singularizing and realizing a strict Gray homotopy commutes pointwise with evaluation. -/ +theorem realizedHomotopy_singular_counit {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) (t : unitInterval) + (x : SSet.toTop.obj (TopCat.toSSet.obj (SSet.toTop.obj (h.streetNerve.obj X)))) : + (sSetTopAdj.counit.app (SSet.toTop.obj (h.streetNerve.obj Y))).hom + (RealizedCylinder.homotopy (singularHomotopy (G.realizedHomotopy aw P)) (t, x)) = + G.realizedHomotopy aw P (t, + (sSetTopAdj.counit.app (SSet.toTop.obj (h.streetNerve.obj X))).hom x) := + realizedSingularHomotopy_counit (G.realizedHomotopy aw P) t x + +end + +end Thomason.Construction.RightGrayInput + +end + +section + +/-! # Exact evaluation of cylinders with values in a singular set -/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial + +noncomputable section + +/-- A singular-valued simplicial cylinder gives an actual continuous cylinder. -/ +def evaluateSingularCylinder {K : SSet.{0}} {X : TopCat.{0}} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) : + C(unitInterval × SSet.toTop.obj K, X) where + toFun z := (sSetTopAdj.counit.app X).hom + ((SSet.toTop.map e).hom ((RealizedCylinder.comparison K).hom (z.2, z.1))) + continuous_toFun := (sSetTopAdj.counit.app X).hom.continuous.comp + ((SSet.toTop.map e).hom.continuous.comp + ((RealizedCylinder.comparison K).hom.continuous.comp continuous_swap)) + +/-- Evaluation commutes exactly with restriction along a simplicial map. -/ +theorem evaluateSingularCylinder_naturality {A K : SSet.{0}} {X : TopCat.{0}} + (i : A ⟶ K) (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) + (t : unitInterval) (x : SSet.toTop.obj A) : + evaluateSingularCylinder e (t, (SSet.toTop.map i).hom x) = + evaluateSingularCylinder (i ▷ Δ[1] ≫ e) (t, x) := by + have hn := congrArg (fun u => u.hom (x, t)) (RealizedCylinder.comparison_naturality i) + change (RealizedCylinder.comparison K).hom ((SSet.toTop.map i).hom x, t) = + (SSet.toTop.map (i ▷ Δ[1])).hom ((RealizedCylinder.comparison A).hom (x, t)) at hn + dsimp only [evaluateSingularCylinder, ContinuousMap.coe_mk] + rw [hn, SSet.toTop.map_comp] + rfl + +/-- Evaluation commutes with postcomposition by an actual continuous map. -/ +theorem evaluateSingularCylinder_postcomp {K : SSet.{0}} {X Y : TopCat.{0}} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) (p : X ⟶ Y) + (t : unitInterval) (x : SSet.toTop.obj K) : + evaluateSingularCylinder (e ≫ TopCat.toSSet.map p) (t, x) = + p.hom (evaluateSingularCylinder e (t, x)) := by + have hc := congrArg (fun k => k.hom + ((SSet.toTop.map e).hom ((RealizedCylinder.comparison K).hom (x, t)))) + (sSetTopAdj.counit.naturality p) + dsimp only [evaluateSingularCylinder, ContinuousMap.coe_mk] + rw [SSet.toTop.map_comp] + exact hc + +/-- The zero endpoint is the actual adjoint of the zero face. -/ +theorem evaluateSingularCylinder_zero {K : SSet.{0}} {X : TopCat.{0}} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) (x : SSet.toTop.obj K) : + evaluateSingularCylinder e (0, x) = + ((sSetTopAdj.homEquiv K X).symm (SSet.ι₀ ≫ e)).hom x := by + dsimp only [evaluateSingularCylinder, ContinuousMap.coe_mk] + rw [RealizedCylinder.comparison_zero] + change ((SSet.toTop.map SSet.ι₀ ≫ SSet.toTop.map e) ≫ + sSetTopAdj.counit.app X).hom x = _ + rw [← SSet.toTop.map_comp] + rfl + +/-- The one endpoint is the actual adjoint of the one face. -/ +theorem evaluateSingularCylinder_one {K : SSet.{0}} {X : TopCat.{0}} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) (x : SSet.toTop.obj K) : + evaluateSingularCylinder e (1, x) = + ((sSetTopAdj.homEquiv K X).symm (SSet.ι₁ ≫ e)).hom x := by + dsimp only [evaluateSingularCylinder, ContinuousMap.coe_mk] + rw [RealizedCylinder.comparison_one] + change ((SSet.toTop.map SSet.ι₁ ≫ SSet.toTop.map e) ≫ + sSetTopAdj.counit.app X).hom x = _ + rw [← SSet.toTop.map_comp] + rfl + +/-- Singularizing a continuous homotopy and restricting by the unit recovers +that same homotopy at every time and point. -/ +theorem evaluateSingularCylinder_unit {K : SSet.{0}} {X : TopCat.{0}} + {f g : SSet.toTop.obj K ⟶ X} (H : f.hom.Homotopy g.hom) + (t : unitInterval) (x : SSet.toTop.obj K) : + evaluateSingularCylinder + (sSetTopAdj.unit.app K ▷ Δ[1] ≫ (singularHomotopy H).h) (t, x) = H (t, x) := by + rw [← evaluateSingularCylinder_naturality] + change (sSetTopAdj.counit.app X).hom + ((SSet.toTop.map (singularHomotopy H).h).hom + ((RealizedCylinder.comparison (TopCat.toSSet.obj (SSet.toTop.obj K))).hom + ((SSet.toTop.map (sSetTopAdj.unit.app K)).hom x, t))) = _ + rw [← realizedHomotopy_apply, realizedSingularHomotopy_counit] + have ht := congrArg (fun u => u.hom x) (sSetTopAdj.left_triangle_components K) + change (sSetTopAdj.counit.app (SSet.toTop.obj K)).hom + ((SSet.toTop.map (sSetTopAdj.unit.app K)).hom x) = x at ht + rw [ht] + +end + +end Thomason.Construction + +end + +section + +/-! # The adjunction on arbitrary continuous cylinders + +The two realized projections provide an explicit adjoint cylinder whose +evaluation is the original continuous map at every time and point. +-/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial + +noncomputable section + +/-- Pull a continuous cylinder back along the actual realized projections. -/ +def cylinderRealizationMap {K : SSet.{0}} {X : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) : SSet.toTop.obj (K ⊗ Δ[1]) ⟶ X := + TopCat.ofHom { + toFun z := H (PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (snd K Δ[1])).hom z), (SSet.toTop.map (fst K Δ[1])).hom z) + continuous_toFun := H.continuous.comp + (((PrismBarycentric.realizationTime.hom.continuous.comp + (SSet.toTop.map (snd K Δ[1])).hom.continuous)).prodMk + (SSet.toTop.map (fst K Δ[1])).hom.continuous) } + +/-- The simplicial adjoint of an arbitrary continuous cylinder. -/ +def singularCylinderMap {K : SSet.{0}} {X : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X := + sSetTopAdj.homEquiv _ _ (cylinderRealizationMap H) + +/-- The original continuous cylinder is recovered exactly by evaluation. -/ +theorem evaluate_singularCylinderMap {K : SSet.{0}} {X : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) (t : unitInterval) + (x : SSet.toTop.obj K) : + evaluateSingularCylinder (singularCylinderMap H) (t, x) = H (t, x) := by + have he : SSet.toTop.map (singularCylinderMap H) ≫ sSetTopAdj.counit.app X = + cylinderRealizationMap H := + (sSetTopAdj.homEquiv _ _).symm_apply_apply (cylinderRealizationMap H) + change ((SSet.toTop.map (singularCylinderMap H) ≫ sSetTopAdj.counit.app X).hom) + ((RealizedCylinder.comparison K).hom (x, t)) = _ + rw [he] + change H (_, _) = _ + rw [RealizedCylinder.comparison_time, RealizedCylinder.comparison_first] + +/-- The actual projections of a realized simplicial cylinder are natural. -/ +theorem cylinderRealizationMap_naturality {A K : SSet.{0}} {X : TopCat.{0}} + (i : A ⟶ K) (H : C(unitInterval × SSet.toTop.obj K, X)) : + SSet.toTop.map (i ▷ Δ[1]) ≫ cylinderRealizationMap H = + cylinderRealizationMap + (H.comp ⟨fun z => (z.1, (SSet.toTop.map i).hom z.2), + continuous_fst.prodMk ((SSet.toTop.map i).hom.continuous.comp continuous_snd)⟩) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro z + have hf := congrArg (fun k => (SSet.toTop.map k).hom z) (whiskerRight_fst i (Δ[1] : SSet.{0})) + have ht := congrArg (fun k => (SSet.toTop.map k).hom z) (whiskerRight_snd i (Δ[1] : SSet.{0})) + simp only [SSet.toTop.map_comp] at hf ht + change (SSet.toTop.map (fst K Δ[1])).hom ((SSet.toTop.map (i ▷ Δ[1])).hom z) = + (SSet.toTop.map i).hom ((SSet.toTop.map (fst A Δ[1])).hom z) at hf + change (SSet.toTop.map (snd K Δ[1])).hom ((SSet.toTop.map (i ▷ Δ[1])).hom z) = + (SSet.toTop.map (snd A Δ[1])).hom z at ht + change H (PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (snd K Δ[1])).hom ((SSet.toTop.map (i ▷ Δ[1])).hom z)), + (SSet.toTop.map (fst K Δ[1])).hom ((SSet.toTop.map (i ▷ Δ[1])).hom z)) = _ + rw [hf, ht] + rfl + +/-- The zero face of the adjoint cylinder is the adjoint of its zero endpoint. -/ +theorem singularCylinderMap_zero {K : SSet.{0}} {X : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) : + SSet.ι₀ ≫ singularCylinderMap H = + sSetTopAdj.homEquiv K X + (TopCat.ofHom ⟨fun x => H (0, x), H.continuous.comp (by fun_prop)⟩) := by + rw [singularCylinderMap, ← sSetTopAdj.homEquiv_naturality_left] + congr 1 + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + change H (PrismBarycentric.realizationTime.hom + ((SSet.toTop.map (snd K Δ[1])).hom ((SSet.toTop.map SSet.ι₀).hom x)), + (SSet.toTop.map (fst K Δ[1])).hom ((SSet.toTop.map SSet.ι₀).hom x)) = H (0, x) + rw [← RealizedCylinder.comparison_zero, RealizedCylinder.comparison_time, + RealizedCylinder.comparison_first] + +/-- Restriction of the continuous cylinder commutes with its simplicial adjoint. -/ +theorem singularCylinderMap_naturality {A K : SSet.{0}} {X : TopCat.{0}} + (i : A ⟶ K) (H : C(unitInterval × SSet.toTop.obj K, X)) : + i ▷ Δ[1] ≫ singularCylinderMap H = + singularCylinderMap + (H.comp ⟨fun z => (z.1, (SSet.toTop.map i).hom z.2), + continuous_fst.prodMk ((SSet.toTop.map i).hom.continuous.comp continuous_snd)⟩) := by + rw [singularCylinderMap, ← sSetTopAdj.homEquiv_naturality_left, + cylinderRealizationMap_naturality] + rfl + +/-- Postcomposition commutes with the adjoint cylinder, before realization. -/ +theorem singularCylinderMap_postcomp {K : SSet.{0}} {X Y : TopCat.{0}} + (H : C(unitInterval × SSet.toTop.obj K, X)) (p : X ⟶ Y) : + singularCylinderMap H ≫ TopCat.toSSet.map p = singularCylinderMap (p.hom.comp H) := by + rw [singularCylinderMap, ← sSetTopAdj.homEquiv_naturality_right] + rfl + +end + +end Thomason.Construction + +end + +section + +/-! # The exact singular adjunction for continuous cylinders -/ + +namespace Thomason.Construction + +open CategoryTheory MonoidalCategory +open scoped Simplicial + +noncomputable section + +/-- Applying the explicit cylinder adjunction to an evaluated singular map +returns the original map in every simplicial degree. -/ +theorem singularCylinderMap_evaluate {K : SSet.{0}} {X : TopCat.{0}} + (e : K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) : + singularCylinderMap (evaluateSingularCylinder e) = e := by + apply (sSetTopAdj.homEquiv _ _).symm.injective + rw [singularCylinderMap, Equiv.symm_apply_apply] + apply TopCat.hom_ext + apply ContinuousMap.ext + intro z + change (sSetTopAdj.counit.app X).hom + ((SSet.toTop.map e).hom + ((RealizedCylinder.comparison K).hom ((RealizedCylinder.coordinates K).hom z))) = + (sSetTopAdj.counit.app X).hom ((SSet.toTop.map e).hom z) + rw [RealizedCylinder.comparison_coordinates] + +/-- Continuous cylinders and singular-valued simplicial cylinders are exactly +equivalent, with the constructed evaluation formula as inverse. -/ +def singularCylinderEquiv (K : SSet.{0}) (X : TopCat.{0}) : + C(unitInterval × SSet.toTop.obj K, X) ≃ (K ⊗ Δ[1] ⟶ TopCat.toSSet.obj X) where + toFun := singularCylinderMap + invFun := evaluateSingularCylinder + left_inv H := by + apply ContinuousMap.ext + rintro ⟨t, x⟩ + exact evaluate_singularCylinderMap H t x + right_inv := singularCylinderMap_evaluate + +/-- Equality of evaluated continuous cylinders detects equality of the actual +singular-valued simplicial maps. -/ +theorem evaluateSingularCylinder_injective {K : SSet.{0}} {X : TopCat.{0}} : + Function.Injective (evaluateSingularCylinder (K := K) (X := X)) := + (singularCylinderEquiv K X).symm.injective + +end + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/StrictAbelianization.lean b/lean/OAI/CategoryTheory/Thomason/Gray/StrictAbelianization.lean new file mode 100644 index 0000000000000000000000000000000000000000..88988af687ea5988266db078116a1b093ecb3eb2 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/StrictAbelianization.lean @@ -0,0 +1,922 @@ +import OAI.CategoryTheory.Thomason.Chains.SimplexBasisHeight +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderPath +import OAI.CategoryTheory.Thomason.Gray.RightCylinderPrism +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import Mathlib.GroupTheory.FreeAbelianGroup +import Mathlib.GroupTheory.QuotientGroup.Basic + +namespace OAI + +section + +/-! # Identifying the strict globe with its positive chain realization + +The canonical globe map is injective as well as surjective: the highest +nonzero chain records the dimension and sign of its unique generator. +-/ + +namespace Thomason.Construction.DirectedGlobeComplex + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev globeDimension {n : ℕ} (s : StrictOmegaCategory.Globe.Cell n) := + StrictOmegaCategory.Globe.dimension s + +def globeBasis {n : ℕ} (s : StrictOmegaCategory.Globe.Cell n) : + Basis n (globeDimension s) := + match s with + | .top => ⟨false, Or.inr ⟨rfl, rfl⟩⟩ + | .boundary a k => ⟨a, Or.inl k.isLt⟩ + +theorem fromGlobe_top_table {n : ℕ} (s : StrictOmegaCategory.Globe.Cell n) : + chainTable ((fromGlobe n).toFun s) false (globeDimension s) = + Finsupp.single (globeBasis s) 1 := by + cases s with + | top => exact topTable_eq_single n n (globeBasis .top) + | boundary a k => + change Cell.cutTable (topCell n) a k false k = _ + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + exact topTable_eq_single n k (globeBasis (.boundary a k)) + +theorem fromGlobe_dimension_iff {n k : ℕ} (s : StrictOmegaCategory.Globe.Cell n) : + (complex n).realization.DimensionLE k ((fromGlobe n).toFun s) ↔ + globeDimension s ≤ k := by + constructor + · intro hs + by_contra h + have hks : k < globeDimension s := Nat.lt_of_not_ge h + have hz : chainTable ((fromGlobe n).toFun s) false (globeDimension s) = 0 := + (Cell.dimensionLE_iff_zero_above ((fromGlobe n).toFun s) k).mp hs + (globeDimension s) hks false + rw [fromGlobe_top_table] at hz + have hc := congrArg (fun u : Chains n (globeDimension s) => u (globeBasis s)) hz + simp at hc + · intro hs + exact (complex n).realization.dimensionLE_mono hs + (StrictOmegaCategory.Globe.evaluate_dimension _ (topCell n) (topCell_dimension n) s) + +/-- Distinct signed globe cells remain distinct after positive realization. -/ +theorem fromGlobe_injective (n : ℕ) : Function.Injective (fromGlobe n).toFun := by + intro s t h + have hs : (complex n).realization.DimensionLE (globeDimension s) ((fromGlobe n).toFun s) := + (fromGlobe_dimension_iff s).mpr le_rfl + have ht : (complex n).realization.DimensionLE (globeDimension t) ((fromGlobe n).toFun t) := + (fromGlobe_dimension_iff t).mpr le_rfl + have hst : globeDimension s = globeDimension t := by + have h₁ := (fromGlobe_dimension_iff t).mp (h ▸ hs) + have h₂ := (fromGlobe_dimension_iff s).mp (h.symm ▸ ht) + exact Nat.le_antisymm h₂ h₁ + cases s with + | top => + cases t with + | top => rfl + | boundary b l => exact False.elim (Nat.ne_of_gt l.isLt hst) + | boundary a k => + cases t with + | top => exact False.elim (Nat.ne_of_lt k.isLt hst) + | boundary b l => + have hkl : k = l := Fin.ext hst + subst l + have hc := congrArg (fun x : Cell (complex n) => chainTable x false k) h + have he := (fromGlobe_top_table (.boundary a k)).symm.trans + (hc.trans (fromGlobe_top_table (.boundary b k))) + have hb : globeBasis (.boundary a k) = globeBasis (.boundary b k) := + Finsupp.single_left_injective (by norm_num : (1 : ℤ) ≠ 0) he + have hab : a = b := congrArg Subtype.val hb + subst b + rfl + +/-- The strict globe and its positive-table realization are isomorphic. -/ +def globeIso (n : ℕ) : StrictOmegaCategory.Globe.category n ≅ (complex n).realization := + StrictOmegaCategory.isoOfBijective (fromGlobe n) + ⟨fromGlobe_injective n, fromGlobe_surjective n⟩ + +@[simp] theorem globeIso_hom (n : ℕ) : (globeIso n).hom = fromGlobe n := rfl + +/-- On the free globes, taking strict realization is a full and faithful +bijection of positive chain maps with actual strict functors. -/ +def realizationHomEquiv (n : ℕ) (K : DirectedComplex.{0}) : + Hom (complex n) K ≃ ((complex n).realization ⟶ K.realization) where + toFun F := F.realization + invFun f := cellMap n (f.toFun (topCell n)) + left_inv F := cellMap_top_inverse n F + right_inv f := by + apply (cancel_epi (globeIso n).hom).mp + apply StrictOmegaCategory.Globe.hom_ext + exact cellMap_top_of_bounded n (f.toFun (topCell n)) + (f.dimensionLE (topCell_dimension n)) + +end + +end Thomason.Construction.DirectedGlobeComplex + +end + +section + +/-! # Functorial chain presentations on the strict globe parameters + +All strict maps between globes lift uniquely to positive chain maps. Their +realizations are naturally isomorphic to the original strict globes. The +right chain cylinder therefore gives a functor on these finite parameters. +-/ + +namespace Thomason.Construction + +open CategoryTheory + +namespace StrictOmegaCategory.Globe + +/-- The small category of strict globe parameters and all strict maps. -/ +structure Shapes where + dim : ℕ + +instance : SmallCategory Shapes where + Hom m n := category m.dim ⟶ category n.dim + id m := 𝟙 (category m.dim) + comp f g := f ≫ g + id_comp _ := Category.id_comp _ + comp_id _ := Category.comp_id _ + assoc _ _ _ := Category.assoc _ _ _ + +def inclusion : Shapes ⥤ StrictOmegaCategory.{0} where + obj n := category n.dim + map f := f + +end StrictOmegaCategory.Globe + +namespace DirectedGlobeComplex + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- The unique positive map presenting an arbitrary strict globe map. -/ +def chainMap {m n : ℕ} (f : StrictOmegaCategory.Globe.category m ⟶ + StrictOmegaCategory.Globe.category n) : Hom (complex m) (complex n) := + (realizationHomEquiv m (complex n)).symm + ((globeIso m).inv ≫ f ≫ (globeIso n).hom) + +@[simp] theorem chainMap_realization {m n : ℕ} + (f : StrictOmegaCategory.Globe.category m ⟶ StrictOmegaCategory.Globe.category n) : + (chainMap f).realization = (globeIso m).inv ≫ f ≫ (globeIso n).hom := + (realizationHomEquiv m (complex n)).apply_symm_apply _ + +def chainFunctor : StrictOmegaCategory.Globe.Shapes ⥤ DirectedComplex.{0} where + obj n := complex n.dim + map f := chainMap (StrictOmegaCategory.Globe.inclusion.map f) + map_id n := by + apply (realizationHomEquiv n.dim (complex n.dim)).injective + change (chainMap (𝟙 _)).realization = (DirectedComplex.Hom.id _).realization + rw [chainMap_realization] + simp only [Category.id_comp, Iso.inv_hom_id] + rfl + map_comp {l m n} f g := by + let f' : StrictOmegaCategory.Globe.category l.dim ⟶ + StrictOmegaCategory.Globe.category m.dim := f + let g' : StrictOmegaCategory.Globe.category m.dim ⟶ + StrictOmegaCategory.Globe.category n.dim := g + apply (realizationHomEquiv l.dim (complex n.dim)).injective + change (chainMap (f' ≫ g')).realization = + StrictOmegaCategory.Hom.comp (chainMap f').realization (chainMap g').realization + rw [chainMap_realization (f' ≫ g'), chainMap_realization f', chainMap_realization g'] + change (globeIso l.dim).inv ≫ (f' ≫ g') ≫ (globeIso n.dim).hom = + ((globeIso l.dim).inv ≫ f' ≫ (globeIso m.dim).hom) ≫ + ((globeIso m.dim).inv ≫ g' ≫ (globeIso n.dim).hom) + simp only [Category.assoc, Iso.hom_inv_id_assoc] + +/-- The comparison is natural for every strict map between globes. -/ +def chainRealizationIso : chainFunctor ⋙ realizationFunctor ≅ + StrictOmegaCategory.Globe.inclusion := + NatIso.ofComponents (fun n => (globeIso n.dim).symm) (fun {m n} f => by + let f' : StrictOmegaCategory.Globe.category m.dim ⟶ + StrictOmegaCategory.Globe.category n.dim := f + change (chainMap f').realization ≫ (globeIso n.dim).inv = (globeIso m.dim).inv ≫ f' + rw [chainMap_realization] + simp only [Category.assoc, Iso.hom_inv_id, Category.comp_id]) + +/-- The concrete signed right-cylinder functor on all strict globe maps. -/ +def rightGlobeCylinder : StrictOmegaCategory.Globe.Shapes ⥤ StrictOmegaCategory.{0} := + chainFunctor ⋙ rightCylinderFunctor ⋙ realizationFunctor + +/-- The two endpoint inclusions in the concrete globe cylinders. -/ +def rightGlobeEndpoint (a : Bool) : StrictOmegaCategory.Globe.inclusion ⟶ + rightGlobeCylinder where + app n := (globeIso n.dim).hom ≫ (RightCylinder.endpoint (complex n.dim) a).realization + naturality m n f := by + let f' : StrictOmegaCategory.Globe.category m.dim ⟶ + StrictOmegaCategory.Globe.category n.dim := f + have hf : (globeIso m.dim).hom ≫ (chainMap f').realization = + f' ≫ (globeIso n.dim).hom := by + rw [chainMap_realization] + simp only [Iso.hom_inv_id_assoc] + have he : StrictOmegaCategory.Hom.comp (chainMap f').realization + (RightCylinder.endpoint (complex n.dim) a).realization = + StrictOmegaCategory.Hom.comp (RightCylinder.endpoint (complex m.dim) a).realization + (RightCylinder.map (chainMap f')).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + apply Cell.ext + funext b k + exact (RightCylinder.map_endpoint (chainMap f') a k (x.table b k)).symm + change f' ≫ ((globeIso n.dim).hom ≫ (RightCylinder.endpoint (complex n.dim) a).realization) = + ((globeIso m.dim).hom ≫ (RightCylinder.endpoint (complex m.dim) a).realization) ≫ + (RightCylinder.map (chainMap f')).realization + calc + _ = ((globeIso m.dim).hom ≫ (chainMap f').realization) ≫ + (RightCylinder.endpoint (complex n.dim) a).realization := by rw [hf, Category.assoc] + _ = (globeIso m.dim).hom ≫ ((chainMap f').realization ≫ + (RightCylinder.endpoint (complex n.dim) a).realization) := Category.assoc _ _ _ + _ = (globeIso m.dim).hom ≫ ((RightCylinder.endpoint (complex m.dim) a).realization ≫ + (RightCylinder.map (chainMap f')).realization) := congrArg _ he + _ = _ := (Category.assoc _ _ _).symm + +/-- The natural collapse returns the actual strict globe. -/ +def rightGlobeProjection : rightGlobeCylinder ⟶ StrictOmegaCategory.Globe.inclusion where + app n := (RightCylinder.projection (complex n.dim)).realization ≫ (globeIso n.dim).inv + naturality m n f := by + let f' : StrictOmegaCategory.Globe.category m.dim ⟶ + StrictOmegaCategory.Globe.category n.dim := f + have hp : StrictOmegaCategory.Hom.comp (RightCylinder.map (chainMap f')).realization + (RightCylinder.projection (complex n.dim)).realization = + StrictOmegaCategory.Hom.comp (RightCylinder.projection (complex m.dim)).realization + (chainMap f').realization := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_projection_map (chainMap f') x + have hf : (chainMap f').realization ≫ (globeIso n.dim).inv = (globeIso m.dim).inv ≫ f' := by + rw [chainMap_realization] + simp only [Category.assoc, Iso.hom_inv_id, Category.comp_id] + change (RightCylinder.map (chainMap f')).realization ≫ + ((RightCylinder.projection (complex n.dim)).realization ≫ (globeIso n.dim).inv) = + ((RightCylinder.projection (complex m.dim)).realization ≫ (globeIso m.dim).inv) ≫ f' + calc + _ = ((RightCylinder.map (chainMap f')).realization ≫ + (RightCylinder.projection (complex n.dim)).realization) ≫ (globeIso n.dim).inv := + (Category.assoc _ _ _).symm + _ = ((RightCylinder.projection (complex m.dim)).realization ≫ + (chainMap f').realization) ≫ (globeIso n.dim).inv := + congrArg (fun q : (rightCylinder (complex m.dim)).realization ⟶ + (complex n.dim).realization => q ≫ (globeIso n.dim).inv) hp + _ = _ := by rw [Category.assoc, hf, Category.assoc] + +theorem rightGlobeEndpoint_projection (a : Bool) (n : StrictOmegaCategory.Globe.Shapes) : + (rightGlobeEndpoint a).app n ≫ rightGlobeProjection.app n = + 𝟙 (StrictOmegaCategory.Globe.category n.dim) := by + have he : StrictOmegaCategory.Hom.comp (RightCylinder.endpoint (complex n.dim) a).realization + (RightCylinder.projection (complex n.dim)).realization = + 𝟙 (complex n.dim).realization := by + apply StrictOmegaCategory.Hom.ext + funext x + exact RightCylinder.realization_projection_endpoint (complex n.dim) a x + change ((globeIso n.dim).hom ≫ (RightCylinder.endpoint (complex n.dim) a).realization) ≫ + ((RightCylinder.projection (complex n.dim)).realization ≫ (globeIso n.dim).inv) = _ + calc + _ = (globeIso n.dim).hom ≫ (((RightCylinder.endpoint (complex n.dim) a).realization ≫ + (RightCylinder.projection (complex n.dim)).realization) ≫ (globeIso n.dim).inv) := by + simp only [Category.assoc] + _ = (globeIso n.dim).hom ≫ (𝟙 (complex n.dim).realization ≫ (globeIso n.dim).inv) := + congrArg (fun q : (complex n.dim).realization ⟶ (complex n.dim).realization => + (globeIso n.dim).hom ≫ (q ≫ (globeIso n.dim).inv)) he + _ = _ := by simp only [Category.id_comp, Iso.hom_inv_id] + +end + +end DirectedGlobeComplex + +end Thomason.Construction + +end + +section + +/-! # Exact coordinates for the interval tensor of an ordered atom basis + +The endpoint and mixed basis is identified with the actual tuple of chain +groups by additive equivalences. This construction uses finite support of +each chain, rather than any finiteness assumption on the whole basis. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +abbrev CylinderIndex (p : ℕ) := RightCylinderBasis.Basis B.Index p + +private def zeroIndexEquiv : B.CylinderIndex 0 ≃ (B.Index 0 ⊕ B.Index 0) where + toFun + | .endpoint false b => Sum.inl b + | .endpoint true b => Sum.inr b + invFun + | .inl b => .endpoint false b + | .inr b => .endpoint true b + left_inv b := by cases b with | endpoint a b => cases a <;> rfl + right_inv b := by cases b <;> rfl + +private def succIndexEquiv (p : ℕ) : + B.CylinderIndex (p+1) ≃ (B.Index (p+1) ⊕ (B.Index (p+1) ⊕ B.Index p)) where + toFun + | .endpoint false b => Sum.inl b + | .endpoint true b => Sum.inr (Sum.inl b) + | .mixed b => Sum.inr (Sum.inr b) + invFun + | .inl b => .endpoint false b + | .inr (.inl b) => .endpoint true b + | .inr (.inr b) => .mixed b + left_inv b := by cases b with + | endpoint a b => cases a <;> rfl + | mixed b => rfl + right_inv b := by cases b with + | inl b => rfl + | inr b => cases b <;> rfl + +/-- Coordinates are formed by the actual endpoint and mixed direct sums. -/ +noncomputable def cylinderCoordinates : (p : ℕ) → + (rightCylinder K).group p ≃+ (B.CylinderIndex p →₀ ℤ) + | 0 => + (AddEquiv.prodCongr (B.coordinates 0) (B.coordinates 0)).trans + (Finsupp.sumFinsuppAddEquivProdFinsupp.symm.trans + (Finsupp.domCongr B.zeroIndexEquiv.symm)) + | p+1 => + (AddEquiv.prodCongr (B.coordinates (p+1)) + (AddEquiv.prodCongr (B.coordinates (p+1)) (B.coordinates p))).trans + ((AddEquiv.prodCongr (AddEquiv.refl _) + Finsupp.sumFinsuppAddEquivProdFinsupp.symm).trans + (Finsupp.sumFinsuppAddEquivProdFinsupp.symm.trans + (Finsupp.domCongr (B.succIndexEquiv p).symm))) + +def cylinderCoefficient : {p : ℕ} → B.CylinderIndex p → (rightCylinder K).group p → ℤ + | 0, .endpoint false b, x => B.coordinates 0 x.1 b + | 0, .endpoint true b, x => B.coordinates 0 x.2 b + | p+1, .endpoint false b, x => B.coordinates (p+1) x.1 b + | p+1, .endpoint true b, x => B.coordinates (p+1) x.2.1 b + | p+1, .mixed b, x => B.coordinates p x.2.2 b + +@[simp] theorem cylinderCoordinates_apply {p : ℕ} (x : (rightCylinder K).group p) + (b : B.CylinderIndex p) : B.cylinderCoordinates p x b = B.cylinderCoefficient b x := by + cases p with + | zero => cases b with | endpoint a b => cases a <;> rfl + | succ p => cases b with + | endpoint a b => cases a <;> rfl + | mixed b => rfl + +/-- These exact coordinates characterize the actual positive tensor cone. -/ +theorem cylinder_positive_iff (p : ℕ) (x : (rightCylinder K).group p) : + x ∈ (rightCylinder K).positive p ↔ ∀ b, 0 ≤ B.cylinderCoordinates p x b := by + cases p with + | zero => + constructor + · intro hx b + cases b with + | endpoint a b => + cases a + · exact B.coordinate_nonnegative 0 x.1 hx.1 b + · exact B.coordinate_nonnegative 0 x.2 hx.2 b + · intro hx + exact ⟨(B.positive_iff 0 x.1).mpr (fun b => hx (.endpoint false b)), + (B.positive_iff 0 x.2).mpr (fun b => hx (.endpoint true b))⟩ + | succ p => + constructor + · intro hx b + cases b with + | endpoint a b => + cases a + · exact B.coordinate_nonnegative (p+1) x.1 hx.1 b + · exact B.coordinate_nonnegative (p+1) x.2.1 hx.2.1 b + | mixed b => exact B.coordinate_nonnegative p x.2.2 hx.2.2 b + · intro hx + exact ⟨(B.positive_iff (p+1) x.1).mpr (fun b => hx (.endpoint false b)), + (B.positive_iff (p+1) x.2.1).mpr (fun b => hx (.endpoint true b)), + (B.positive_iff p x.2.2).mpr (fun b => hx (.mixed b))⟩ + +/-- The ordinary tensor augmentation is the sum of all degree-zero +coordinates, with neither endpoint omitted. -/ +theorem cylinder_augmentation (x : (rightCylinder K).group 0) : + (rightCylinder K).augmentation x = + (B.cylinderCoordinates 0 x).sum (fun _ z => z) := by + change K.augmentation x.1 + K.augmentation x.2 = + (Finsupp.equivMapDomain B.zeroIndexEquiv.symm + ((B.coordinates 0 x.1).sumElim (B.coordinates 0 x.2))).sum (fun _ z => z) + rw [B.augmentation, B.augmentation, Finsupp.sum_equivMapDomain, Finsupp.sum_sumElim] + rfl + +/-- The basis vectors in the actual tensor coordinates. -/ +noncomputable def cylinderVector {p : ℕ} (b : B.CylinderIndex p) : (rightCylinder K).group p := + (B.cylinderCoordinates p).symm (Finsupp.single b 1) + +@[simp] theorem cylinderVector_coordinates {p : ℕ} (b : B.CylinderIndex p) : + B.cylinderCoordinates p (B.cylinderVector b) = Finsupp.single b 1 := + (B.cylinderCoordinates p).apply_symm_apply _ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Actual endpoint and mixed atoms for the interval tensor + +The mixed cells are the checked prism construction. Their top rows are +literal mixed basis vectors; all lower cells retain the signed table. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem atom_dimension (p : ℕ) (b : B.Index p) : + K.realization.DimensionLE p (B.atom p b) := + Cell.dimensionLE_of_table_zero (B.atom_above p b) + +def cylinderAtom : {p : ℕ} → B.CylinderIndex p → Cell (rightCylinder K) + | _, .endpoint a b => Cell.map (RightCylinder.endpoint K a) (B.atom _ b) + | _, .mixed b => RightCylinder.prism (B.atom _ b) + +theorem cylinderAtom_dimension {p : ℕ} (b : B.CylinderIndex p) : + (rightCylinder K).realization.DimensionLE p (B.cylinderAtom b) := by + cases b with + | endpoint a b => exact (RightCylinder.endpoint K a).realization.dimensionLE (B.atom_dimension _ b) + | mixed b => exact RightCylinder.prism_dimension _ (B.atom_dimension _ b) + +theorem cylinderAtom_above {p : ℕ} (b : B.CylinderIndex p) + (q : ℕ) (hpq : p < q) (side : Bool) : (B.cylinderAtom b).table side q = 0 := + Cell.table_zero_of_dimensionLE (B.cylinderAtom_dimension b) hpq side + +theorem cylinderAtom_top {p : ℕ} (b : B.CylinderIndex p) (side : Bool) : + B.cylinderCoordinates p ((B.cylinderAtom b).table side p) = Finsupp.single b 1 := by + classical + apply Finsupp.ext + intro c + rw [B.cylinderCoordinates_apply] + cases b with + | @endpoint p a b => + cases p with + | zero => + cases c with + | endpoint a' c => + cases a <;> cases a' <;> + simp [cylinderAtom, Cell.map, RightCylinder.endpoint, RightCylinder.endpointMap, + cylinderCoefficient, B.atom_top, Finsupp.single_apply] + | succ p => + cases c with + | endpoint a' c => + cases a <;> cases a' <;> + simp [cylinderAtom, Cell.map, RightCylinder.endpoint, RightCylinder.endpointMap, + cylinderCoefficient, B.atom_top, Finsupp.single_apply] + | mixed c => + cases a <;> + simp [cylinderAtom, Cell.map, RightCylinder.endpoint, RightCylinder.endpointMap, + cylinderCoefficient] + | @mixed p b => + have ht := RightCylinder.prism_top (B.atom p b) (B.atom_dimension p b) side + change B.cylinderCoefficient c ((RightCylinder.prism (B.atom p b)).table side (p+1)) = _ + rw [ht] + cases c with + | endpoint a c => cases a <;> simp [cylinderCoefficient] + | mixed c => simp [cylinderCoefficient, B.atom_top, Finsupp.single_apply] + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Side-height bounds for interval-tensor atoms + +The tensor height separates its endpoint copies by one. This matches the +alternating endpoint of the actual prism, including the degree-zero row. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +/-- The stronger side-height information used when tensoring the basis. +It is supplied by the already proved signed simplex boundary order. -/ +def SideHeight : Prop := ∀ p (b : B.Index p) q, q < p → ∀ (side : Bool) (c : B.Index q), + B.coordinates q ((B.atom p b).table side q) c ≠ 0 → + if side then B.height p b < B.height q c else B.height q c < B.height p b + +theorem atom_side_height_le (hs : B.SideHeight) (p : ℕ) (b : B.Index p) + (side : Bool) (q : ℕ) (hqp : q ≤ p) (c : B.Index q) + (hc : B.coordinates q ((B.atom p b).table side q) c ≠ 0) : + if side then B.height p b ≤ B.height q c else B.height q c ≤ B.height p b := by + rcases hqp.eq_or_lt with rfl | hqp + · have he : c = b := by + by_contra hn + rw [B.atom_top, Finsupp.single_eq_of_ne hn] at hc + exact hc rfl + subst c + cases side <;> exact le_rfl + · have hh := hs p b q hqp side c hc + cases side <;> exact hh.le + +theorem prismSide_sourceEndpoint (p : ℕ) : + RightCylinder.prismSide p false = RightCylinderBasis.sourceEndpoint p := by + simp only [RightCylinder.prismSide, Bool.false_eq_true, ite_false, + RightCylinderBasis.sourceEndpoint, Nat.mod_two_of_bodd] + cases p.bodd <;> rfl + +theorem prismSide_targetEndpoint (p : ℕ) : + RightCylinder.prismSide p true = !(RightCylinderBasis.sourceEndpoint p) := by + rw [← prismSide_sourceEndpoint p] + rfl + +/-- The shifted rank of the endpoint selected by the prism has the exact +sign of that prism side. -/ +theorem prism_endpoint_height (p : ℕ) (b : B.Index p) (side : Bool) : + RightCylinderBasis.height B.height (.endpoint (RightCylinder.prismSide p side) b) = + 3 * B.height p b + if side then 1 else -1 := by + cases side + · simp [RightCylinderBasis.height, prismSide_sourceEndpoint] + · simp [RightCylinderBasis.height, prismSide_targetEndpoint] + +theorem endpointAtom_endpointCoefficient {p q : ℕ} (a : Bool) (b : B.Index p) + (side d : Bool) (c : B.Index q) : + B.cylinderCoefficient (.endpoint d c) + ((B.cylinderAtom (.endpoint a b)).table side q) = + if d = a then B.coordinates q ((B.atom p b).table side q) c else 0 := by + cases q <;> cases a <;> cases d <;> + simp [cylinderAtom, Cell.map, RightCylinder.endpoint, RightCylinder.endpointMap, + cylinderCoefficient] + +theorem endpointAtom_mixedCoefficient {p q : ℕ} (a : Bool) (b : B.Index p) + (side : Bool) (c : B.Index q) : + B.cylinderCoefficient (.mixed c) + ((B.cylinderAtom (.endpoint a b)).table side (q+1)) = 0 := by + cases a <;> simp [cylinderAtom, Cell.map, RightCylinder.endpoint, + RightCylinder.endpointMap, cylinderCoefficient] + +theorem mixedAtom_mixedCoefficient {p q : ℕ} (b : B.Index p) + (side : Bool) (c : B.Index q) : + B.cylinderCoefficient (.mixed c) ((B.cylinderAtom (.mixed b)).table side (q+1)) = + B.coordinates q ((B.atom p b).table side q) c := by + simp only [cylinderAtom, RightCylinder.prism, RightCylinder.prismTable] + split_ifs <;> rfl + +theorem mixedAtom_endpointCoefficient {p q : ℕ} (b : B.Index p) + (side d : Bool) (c : B.Index q) : + B.cylinderCoefficient (.endpoint d c) ((B.cylinderAtom (.mixed b)).table side q) = + if d = RightCylinder.prismSide q side then + B.coordinates q ((B.atom p b).table side q) c else 0 := by + cases q with + | zero => + cases side <;> cases d <;> + simp [cylinderAtom, RightCylinder.prism, RightCylinder.prismTable, + RightCylinder.prismSide, cylinderCoefficient] + | succ q => + cases d <;> + simp only [cylinderAtom, RightCylinder.prism, RightCylinder.prismTable] + all_goals split_ifs <;> simp_all [cylinderCoefficient] + +/-- Every strict lower face of an actual endpoint or prism atom has the +required strict signed-height bound. -/ +theorem cylinderAtom_side_height (hs : B.SideHeight) {p : ℕ} (b : B.CylinderIndex p) + (side : Bool) (q : ℕ) (hqp : q < p) (c : B.CylinderIndex q) + (hc : B.cylinderCoefficient c ((B.cylinderAtom b).table side q) ≠ 0) : + if side then RightCylinderBasis.height B.height b < RightCylinderBasis.height B.height c + else RightCylinderBasis.height B.height c < RightCylinderBasis.height B.height b := by + cases b with + | @endpoint p a b => + cases c with + | endpoint d c => + rw [B.endpointAtom_endpointCoefficient] at hc + split_ifs at hc with hda + · subst d + have hh := hs p b q hqp side c hc + cases side <;> simp only [Bool.false_eq_true, ite_false, ite_true] at hh ⊢ + all_goals simp only [RightCylinderBasis.height]; split_ifs <;> omega + · exact (hc rfl).elim + | mixed c => exact (hc (B.endpointAtom_mixedCoefficient a b side c)).elim + | @mixed p b => + cases c with + | endpoint d c => + rw [B.mixedAtom_endpointCoefficient] at hc + split_ifs at hc with hd + · subst d + by_cases hqlt : q < p + · have hh := hs p b q hqlt side c hc + cases side <;> simp only [Bool.false_eq_true, ite_false, ite_true] at hh ⊢ + all_goals simp only [RightCylinderBasis.height]; split_ifs <;> omega + · have hqe : q = p := by omega + subst q + have hcb : c = b := by + by_contra hn + rw [B.atom_top, Finsupp.single_eq_of_ne hn] at hc + exact hc rfl + subst c + rw [B.prism_endpoint_height] + cases side <;> simp only [Bool.false_eq_true, ite_false, ite_true, + RightCylinderBasis.height] <;> omega + · exact (hc rfl).elim + | @mixed q c => + rw [B.mixedAtom_mixedCoefficient] at hc + have hh := hs p b q (by omega) side c hc + cases side <;> simp only [Bool.false_eq_true, ite_false, ite_true, + RightCylinderBasis.height] at hh ⊢ <;> omega + +/-- The concrete tensor atoms therefore have disjoint ordered boundaries. -/ +theorem cylinder_atoms_disjoint (hs : B.SideHeight) {p q r : ℕ} + (b : B.CylinderIndex p) (c : B.CylinderIndex q) (hrp : r < p) (hrq : r < q) + (hbc : RightCylinderBasis.height B.height b ≤ RightCylinderBasis.height B.height c) + (e : B.CylinderIndex r) : + B.cylinderCoordinates r ((B.cylinderAtom b).table false r) e = 0 ∨ + B.cylinderCoordinates r ((B.cylinderAtom c).table true r) e = 0 := by + simp only [B.cylinderCoordinates_apply] + by_cases hb : B.cylinderCoefficient e ((B.cylinderAtom b).table false r) = 0 + · exact Or.inl hb + · right + by_contra hc + have hbe := B.cylinderAtom_side_height hs b false r hrp e hb + have hec := B.cylinderAtom_side_height hs c true r hrq e hc + exact (not_lt_of_ge hbc) (hec.trans hbe) + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Positive truncation comparisons for right chain cylinders + +A positive bridge in the first factor gives two endpoint bridges in its +right cylinder. The interval component cancels because the maps agree +in the degree immediately below the truncation bound. +-/ + +namespace Thomason.Construction.DirectedComplex + +open CategoryTheory + +universe u + +variable {K L : DirectedComplex.{u}} + +/-- Agreement below a bound survives right tensoring with the interval. -/ +theorem rightCylinderMap_agree_below + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k < n → f.app k = g.app k) : + ∀ k, k < n → (RightCylinder.map f).app k = (RightCylinder.map g).app k := by + intro k hk + exact rightCylinderMap_agree_through f g + (fun l hl => hfg l (lt_of_le_of_lt hl hk)) k le_rfl + +/-- The positive degree bridge transports through the actual signed +right-cylinder differential. -/ +theorem rightCylinderMap_positive_degree_bridge + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k < n → f.app k = g.app k) + (hbridge : ∀ v : K.group n, v ∈ K.positive n → + ∃ z : L.group (n+1), z ∈ L.positive (n+1) ∧ + L.differential n z = g.app n v - f.app n v) : + ∀ v : (rightCylinder K).group n, v ∈ (rightCylinder K).positive n → + ∃ z : (rightCylinder L).group (n+1), z ∈ (rightCylinder L).positive (n+1) ∧ + (rightCylinder L).differential n z = + (RightCylinder.map g).app n v - (RightCylinder.map f).app n v := by + intro v hv + cases n with + | zero => + obtain ⟨z₀, hz₀, hd₀⟩ := hbridge v.1 hv.1 + obtain ⟨z₁, hz₁, hd₁⟩ := hbridge v.2 hv.2 + refine ⟨(z₀, z₁, 0), ⟨hz₀, hz₁, (L.positive 0).zero_mem⟩, ?_⟩ + change (L.differential 0 z₀ - 0, L.differential 0 z₁ + 0) = + (g.app 0 v.1 - f.app 0 v.1, g.app 0 v.2 - f.app 0 v.2) + simp only [sub_zero, add_zero, hd₀, hd₁] + | succ n => + obtain ⟨z₀, hz₀, hd₀⟩ := hbridge v.1 hv.1 + obtain ⟨z₁, hz₁, hd₁⟩ := hbridge v.2.1 hv.2.1 + refine ⟨(z₀, z₁, 0), ⟨hz₀, hz₁, (L.positive (n+1)).zero_mem⟩, ?_⟩ + change (L.differential (n+1) z₀ - ((-1 : ℤ)^(n+1)) • 0, + L.differential (n+1) z₁ + ((-1 : ℤ)^(n+1)) • 0, + L.differential n 0) = + (g.app (n+1) v.1 - f.app (n+1) v.1, + g.app (n+1) v.2.1 - f.app (n+1) v.2.1, + g.app n v.2.2 - f.app n v.2.2) + rw [hfg n (Nat.lt_succ_self n)] + simp only [smul_zero, sub_zero, add_zero, map_zero, sub_self, hd₀, hd₁] + +/-- Positive bridges in the original complexes force exact equality after +mapping the right-cylinder realizations into a truncated target. -/ +theorem rightCylinder_realization_comp_eq_of_positive_degree_bridge + (f g : Hom K L) {n : ℕ} (hfg : ∀ k, k < n → f.app k = g.app k) + (hbridge : ∀ v : K.group n, v ∈ K.positive n → + ∃ z : L.group (n+1), z ∈ L.positive (n+1) ∧ + L.differential n z = g.app n v - f.app n v) + {Y : StrictOmegaCategory.{u}} (hY : Y.IsTruncated n) + (H : (rightCylinder L).realization ⟶ Y) : + (RightCylinder.map f).realization ≫ H = (RightCylinder.map g).realization ≫ H := + realization_comp_eq_of_positive_degree_bridge _ _ + (rightCylinderMap_agree_below f g hfg) + (rightCylinderMap_positive_degree_bridge f g hfg hbridge) hY H + +end Thomason.Construction.DirectedComplex + +end + +section + +/-! # The chain groups generated by strict cells + +In degree n the generators are the actual cells of dimension at most n. +Composition below n becomes addition. This is the degreewise construction +of Steiner's left adjoint lambda, needed to compare strict pasting with +positive chain pasting in the right interval tensor. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.Abelianization + +open CategoryTheory + +noncomputable section + +variable (C : StrictOmegaCategory.{0}) + +abbrev Bounded (n : ℕ) := { x : C // C.DimensionLE n x } +abbrev Free (n : ℕ) := FreeAbelianGroup (Bounded C n) + +def composite {n : ℕ} (k : ℕ) (hk : k < n) (x y : Bounded C n) + (h : C.target k x.val = C.source k y.val) : Bounded C n := + ⟨C.comp k x.val y.val h, C.dimensionLE_comp hk x.property y.property h⟩ + +/-- The defining additive relation for one actual strict composition. -/ +def Relations (n : ℕ) : Set (Free C n) := + { z | ∃ (k : ℕ) (hk : k < n) (x y : Bounded C n) + (h : C.target k x.val = C.source k y.val), + z = FreeAbelianGroup.of (composite C k hk x y h) - + FreeAbelianGroup.of x - FreeAbelianGroup.of y } + +def relations (n : ℕ) : AddSubgroup (Free C n) := AddSubgroup.closure (Relations C n) + +abbrev Chains (n : ℕ) := Free C n ⧸ relations C n + +def generator (n : ℕ) (x : Bounded C n) : Chains C n := + QuotientAddGroup.mk' (relations C n) (FreeAbelianGroup.of x) + +/-- Strict composition is addition in the constructed chain group. -/ +theorem generator_composite {n : ℕ} (k : ℕ) (hk : k < n) (x y : Bounded C n) + (h : C.target k x.val = C.source k y.val) : + generator C n (composite C k hk x y h) = generator C n x + generator C n y := by + have hm : FreeAbelianGroup.of (composite C k hk x y h) - + FreeAbelianGroup.of x - FreeAbelianGroup.of y ∈ relations C n := + AddSubgroup.subset_closure ⟨k, hk, x, y, h, rfl⟩ + have hz := (QuotientAddGroup.eq_zero_iff _).mpr hm + change (QuotientAddGroup.mk' (relations C n)) + (FreeAbelianGroup.of (composite C k hk x y h) - + FreeAbelianGroup.of x - FreeAbelianGroup.of y) = 0 at hz + simp only [map_sub] at hz + change generator C n (composite C k hk x y h) - generator C n x - generator C n y = 0 at hz + exact sub_eq_zero.mp (by simpa only [sub_add_eq_sub_sub] using hz) + +/-- Identity extensions have zero positive-dimensional chain. -/ +theorem generator_identity (n : ℕ) (x : C) (hx : C.DimensionLE n x) : + generator C (n + 1) ⟨x, C.dimensionLE_mono (Nat.le_succ n) hx⟩ = 0 := by + let a : Bounded C (n + 1) := ⟨x, C.dimensionLE_mono (Nat.le_succ n) hx⟩ + have hxx : C.target n x = C.source n x := hx.2.trans hx.1.symm + have hc : composite C n (Nat.lt_succ_self n) a a hxx = a := by + apply Subtype.ext + change C.comp n x x hxx = x + have hu := C.left_unit n x (by rw [C.face_face_same]) + simpa only [hx.1] using hu + have he := generator_composite C n (Nat.lt_succ_self n) a a hxx + rw [hc] at he + exact (add_eq_left.mp he.symm) + +/-- The degreewise universal property, retaining every composition relation. -/ +def lift {A : Type*} [AddCommGroup A] (n : ℕ) (f : Bounded C n → A) + (hf : ∀ (k : ℕ) (hk : k < n) (x y : Bounded C n) + (h : C.target k x.val = C.source k y.val), + f (composite C k hk x y h) = f x + f y) : Chains C n →+ A := + QuotientAddGroup.lift (relations C n) (FreeAbelianGroup.lift f) (by + apply (AddSubgroup.closure_le _).mpr + rintro z ⟨k, hk, x, y, h, rfl⟩ + change (FreeAbelianGroup.lift f) _ = 0 + simp only [map_sub, FreeAbelianGroup.lift_apply_of, hf] + abel) + +@[simp] theorem lift_generator {A : Type*} [AddCommGroup A] (n : ℕ) + (f : Bounded C n → A) (hf) (x : Bounded C n) : + lift C n f hf (generator C n x) = f x := by + exact FreeAbelianGroup.lift_apply_of f x + +@[ext] theorem hom_ext {A : Type*} [AddCommGroup A] (n : ℕ) + (f g : Chains C n →+ A) (h : ∀ x, f (generator C n x) = g (generator C n x)) : f = g := by + apply QuotientAddGroup.addMonoidHom_ext + apply FreeAbelianGroup.lift_ext + exact h + +/-- A face generator is defined with its canonical dimension witness. -/ +def faceGenerator (a : Bool) (n : ℕ) (x : C) : Chains C n := + generator C n ⟨C.face a n x, C.face_dimensionLE a n x⟩ + +theorem faceGenerator_composite {n : ℕ} (a : Bool) (k : ℕ) (hk : k < n) + (x y : C) (h : C.target k x = C.source k y) : + faceGenerator C a n (C.comp k x y h) = + faceGenerator C a n x + faceGenerator C a n y := by + have hh : C.target k (C.face a n x) = C.source k (C.face a n y) := by + simpa only [source, target, C.globular, hk, ite_true] using h + have hc := C.face_comp a n k hk x y h hh + have he : (⟨C.face a n (C.comp k x y h), C.face_dimensionLE a n _⟩ : Bounded C n) = + composite C k hk ⟨C.face a n x, C.face_dimensionLE a n x⟩ + ⟨C.face a n y, C.face_dimensionLE a n y⟩ hh := Subtype.ext hc + change generator C n _ = _ + rw [he] + exact generator_composite C k hk _ _ hh + +/-- The signed boundary respects each relation in degree n+1. -/ +theorem boundary_composite (n k : ℕ) (hk : k < n + 1) (x y : Bounded C (n + 1)) + (h : C.target k x.val = C.source k y.val) : + (faceGenerator C true n (composite C k hk x y h).val - + faceGenerator C false n (composite C k hk x y h).val) = + (faceGenerator C true n x.val - faceGenerator C false n x.val) + + (faceGenerator C true n y.val - faceGenerator C false n y.val) := by + by_cases hkn : k < n + · simp only [composite, faceGenerator_composite C _ k hkn] + abel + · have he : k = n := by omega + subst k + have hm : faceGenerator C true n x.val = faceGenerator C false n y.val := by + apply congrArg (generator C n) + exact Subtype.ext h + change faceGenerator C true n (C.comp n x.val y.val h) - + faceGenerator C false n (C.comp n x.val y.val h) = _ + have ht : faceGenerator C true n (C.comp n x.val y.val h) = + faceGenerator C true n y.val := congrArg (generator C n) (Subtype.ext (C.target_comp _ _ _ _)) + have hs : faceGenerator C false n (C.comp n x.val y.val h) = + faceGenerator C false n x.val := congrArg (generator C n) (Subtype.ext (C.source_comp _ _ _ _)) + rw [ht, hs, hm] + abel + +/-- Differential of lambda, defined on the quotient rather than postulated. -/ +def differential (n : ℕ) : Chains C (n + 1) →+ Chains C n := + lift C (n + 1) (fun x => faceGenerator C true n x.val - faceGenerator C false n x.val) + (boundary_composite C n) + +@[simp] theorem differential_generator (n : ℕ) (x : Bounded C (n + 1)) : + differential C n (generator C (n + 1) x) = + faceGenerator C true n x.val - faceGenerator C false n x.val := + lift_generator C _ _ _ x + +@[simp] theorem differential_faceGenerator (n : ℕ) (a : Bool) (x : C) : + differential C n (faceGenerator C a (n + 1) x) = + faceGenerator C true n (C.face a (n + 1) x) - + faceGenerator C false n (C.face a (n + 1) x) := + differential_generator C n _ + +@[simp] theorem faceGenerator_face (a b : Bool) {n m : ℕ} (hnm : n < m) (x : C) : + faceGenerator C a n (C.face b m x) = faceGenerator C a n x := by + apply congrArg (generator C n) + apply Subtype.ext + exact (C.globular a b n m x).trans (ite_eq_left hnm) + +theorem differential_squared (n : ℕ) (x : Chains C (n + 2)) : + differential C n (differential C (n + 1) x) = 0 := by + have he : (differential C n).comp (differential C (n + 1)) = 0 := by + apply hom_ext + intro y + simp only [AddMonoidHom.comp_apply, differential_generator, map_sub, + differential_faceGenerator, faceGenerator_face C _ _ (Nat.lt_succ_self n), + sub_self, AddMonoidHom.zero_apply] + exact DFunLike.congr_fun he x + +def augmentation : Chains C 0 →+ ℤ := + lift C 0 (fun _ => 1) (by intro k hk; omega) + +@[simp] theorem augmentation_generator (x : Bounded C 0) : + augmentation C (generator C 0 x) = 1 := lift_generator C _ _ _ x + +@[simp] theorem augmentation_faceGenerator (a : Bool) (x : C) : + augmentation C (faceGenerator C a 0 x) = 1 := augmentation_generator C _ + +theorem augmentation_differential (x : Chains C 1) : + augmentation C (differential C 0 x) = 0 := by + have he : (augmentation C).comp (differential C 0) = 0 := by + apply hom_ext + intro y + simp only [AddMonoidHom.comp_apply, differential_generator, map_sub, + augmentation_faceGenerator, sub_self, AddMonoidHom.zero_apply] + exact DFunLike.congr_fun he x + +/-- The positive monoid consists of sums of actual cell generators. -/ +def positive (n : ℕ) : AddSubmonoid (Chains C n) := + AddSubmonoid.closure (Set.range (generator C n)) + +theorem generator_positive (n : ℕ) (x : Bounded C n) : + generator C n x ∈ positive C n := AddSubmonoid.subset_closure ⟨x, rfl⟩ + +/-- The actual augmented directed complex associated to a strict category. -/ +def complex : DirectedComplex.{0} where + group n := AddCommGrpCat.of (Chains C n) + differential := differential C + differential_squared := differential_squared C + augmentation := augmentation C + augmentation_differential := augmentation_differential C + positive := positive C + +end + +end Thomason.Construction.StrictOmegaCategory.Abelianization + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/SubdivisionPrismNaturality.lean b/lean/OAI/CategoryTheory/Thomason/Gray/SubdivisionPrismNaturality.lean new file mode 100644 index 0000000000000000000000000000000000000000..409ab43e5f6b96ed4ed5341adb8e1dd92e6df20e --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/SubdivisionPrismNaturality.lean @@ -0,0 +1,250 @@ +import OAI.CategoryTheory.Thomason.Simplicial.SubdivisionWeakLifting + +namespace OAI + +section + +/-! # Stationarity of the subdivision comparison prism + +The ordered comparison selects one of its endpoints at each vertex. A +poset map identifying those endpoints therefore makes the whole prism +constant. Applied to greatest vertices, this strengthens the double +last-vertex comparison to an exact relative homotopy. +-/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits PartialOrder MonoidalCategory + CartesianMonoidalCategory +open scoped Simplicial + +noncomputable section + +theorem PosetGeometry.orderedVertexHomotopy_postcompose_stationary + {K : SSet.{0}} {P Q : Type} [PartialOrder P] [PartialOrder Q] + (f g : K ⟶ nerve P) + (hfg : ∀ v : K _⦋0⦌, (f.app _ v).obj 0 ≤ (g.app _ v).obj 0) + (v : P →o Q) (he : f ≫ nerveMap v.monotone.functor = + g ≫ nerveMap v.monotone.functor) : + (PosetGeometry.orderedVertexHomotopy f g hfg).h ≫ nerveMap v.monotone.functor = + fst K Δ[1] ≫ f ≫ nerveMap v.monotone.functor := by + apply NatTrans.ext + funext d + apply ConcreteCategory.hom_ext + rintro ⟨s, t⟩ + apply nerve.ext_of_isThin + funext i + change v (if (SSet.stdSimplex.objEquiv t).toOrderHom i = 0 then + (f.app d s).obj i else (g.app d s).obj i) = v ((f.app d s).obj i) + split_ifs + · rfl + · exact (congrArg (fun q => (q.app d s).obj i) he).symm + +theorem simplexDoublePrism_stationary (n : SimplexCategory) : + simplexDoublePrism n ≫ simplexLastVertex.app n = + fst (SSet.sd.obj (SimplexCategory.sd.obj n)) Δ[1] ≫ + simplexDoubleFirst n ≫ simplexLastVertex.app n := by + let v : NonemptyFiniteChains (ULift.{0} (Fin (n.len+1))) →o + ULift.{0} (Fin (n.len+1)) := chainMaximumHom + have he : simplexDoubleFirst n ≫ nerveMap v.monotone.functor = + simplexDoubleLast n ≫ nerveMap v.monotone.functor := by + apply (cancel_mono (originalSimplexIso n).inv).mp + change simplexDoubleFirst n ≫ simplexLastVertex.app n = + simplexDoubleLast n ≫ simplexLastVertex.app n + dsimp only [simplexDoubleFirst, simplexDoubleLast] + rw [Category.assoc, lastVertex_standard_formula] + exact lastVertex.naturality (simplexLastVertex.app n) + have h := PosetGeometry.orderedVertexHomotopy_postcompose_stationary + (simplexDoubleFirst n) (simplexDoubleLast n) (simplexDoubleFirst_le n) v he + have h' := congrArg (fun q => q ≫ (originalSimplexIso n).inv) h + have hv : nerveMap v.monotone.functor ≫ (originalSimplexIso n).inv = + simplexLastVertex.app n := rfl + change (simplexDoublePrism n ≫ nerveMap v.monotone.functor) ≫ + (originalSimplexIso n).inv = (fst _ Δ[1] ≫ simplexDoubleFirst n ≫ + nerveMap v.monotone.functor) ≫ (originalSimplexIso n).inv at h' + have hl : (simplexDoublePrism n ≫ nerveMap v.monotone.functor) ≫ + (originalSimplexIso n).inv = simplexDoublePrism n ≫ simplexLastVertex.app n := + (Category.assoc (simplexDoublePrism n) (nerveMap v.monotone.functor) + (originalSimplexIso n).inv).trans (congrArg (simplexDoublePrism n ≫ ·) hv) + have hi : (simplexDoubleFirst n ≫ nerveMap v.monotone.functor) ≫ + (originalSimplexIso n).inv = simplexDoubleFirst n ≫ simplexLastVertex.app n := + (Category.assoc (simplexDoubleFirst n) (nerveMap v.monotone.functor) + (originalSimplexIso n).inv).trans (congrArg (simplexDoubleFirst n ≫ ·) hv) + have hr : (fst _ Δ[1] ≫ simplexDoubleFirst n ≫ nerveMap v.monotone.functor) ≫ + (originalSimplexIso n).inv = fst _ Δ[1] ≫ simplexDoubleFirst n ≫ + simplexLastVertex.app n := + (Category.assoc (fst _ Δ[1]) (simplexDoubleFirst n ≫ nerveMap v.monotone.functor) + (originalSimplexIso n).inv).trans (congrArg (fst _ Δ[1] ≫ ·) hi) + exact hl.symm.trans (h'.trans hr) + +theorem standardDoubleHomotopy_stationary (n : SimplexCategory) : + (standardDoubleHomotopy n).h ≫ lastVertex.app (SSet.stdSimplex.obj n) = + fst (SSet.sd.obj (SSet.sd.obj (SSet.stdSimplex.obj n))) Δ[1] ≫ + SSet.sd.map (lastVertex.app (SSet.stdSimplex.obj n)) ≫ + lastVertex.app (SSet.stdSimplex.obj n) := by + change ((SSet.sd.map (SSet.stdSimplex.sdIso.hom.app n) ▷ Δ[1]) ≫ + simplexDoublePrism n ≫ SSet.stdSimplex.sdIso.inv.app n) ≫ + lastVertex.app (SSet.stdSimplex.obj n) = _ + rw [Category.assoc, Category.assoc, lastVertex_on_standard_simplex] + rw [simplexDoublePrism_stationary] + simp only [← Category.assoc, whiskerRight_fst] + have h := simplexDoubleFirst_conjugate n + have h' := congrArg (fun q => q ≫ lastVertex.app (SSet.stdSimplex.obj n)) h + rw [Category.assoc, Category.assoc, lastVertex_on_standard_simplex] at h' + exact congrArg (fst _ Δ[1] ≫ ·) h' + +@[reassoc] +theorem subdivisionLastVertexHomotopy_fac (K : SSet.{0}) + (j : CostructuredArrow SSet.stdSimplex K) : + (SSet.sd.map (SSet.sd.map j.hom) ▷ Δ[1]) ≫ (subdivisionLastVertexHomotopy K).h = + (standardDoubleHomotopy j.left).h ≫ SSet.sd.map j.hom := by + exact SimplicialHomotopyDescent.assemble_fac (SSet.sd ⋙ SSet.sd) K (SSet.sd.obj K) + (doubleLastVertexPiece K) (doubleLastVertexPiece_naturality K) j + +theorem subdivisionLastVertexHomotopy_stationary (K : SSet.{0}) : + (subdivisionLastVertexHomotopy K).h ≫ lastVertex.app K = + fst (SSet.sd.obj (SSet.sd.obj K)) Δ[1] ≫ + SSet.sd.map (lastVertex.app K) ≫ lastVertex.app K := by + apply (isColimitOfPreserves (tensorRight (Δ[1] : SSet.{0})) + (SimplicialHomotopyDescent.isColimit (SSet.sd ⋙ SSet.sd) K)).hom_ext + intro j + change (SSet.sd.map (SSet.sd.map j.hom) ▷ Δ[1]) ≫ _ = + (SSet.sd.map (SSet.sd.map j.hom) ▷ Δ[1]) ≫ _ + rw [← Category.assoc, subdivisionLastVertexHomotopy_fac] + rw [Category.assoc, lastVertex.naturality j.hom, + ← Category.assoc, standardDoubleHomotopy_stationary] + simp only [← Category.assoc, whiskerRight_fst] + have hn : SSet.sd.map (SSet.sd.map j.hom) ≫ SSet.sd.map (lastVertex.app K) = + SSet.sd.map (lastVertex.app (SSet.stdSimplex.obj j.left)) ≫ SSet.sd.map j.hom := by + rw [← SSet.sd.map_comp, lastVertex.naturality j.hom, SSet.sd.map_comp] + rfl + have hc : SSet.sd.map (SSet.sd.map j.hom) ≫ SSet.sd.map (lastVertex.app K) ≫ + lastVertex.app K = SSet.sd.map (lastVertex.app (SSet.stdSimplex.obj j.left)) ≫ + lastVertex.app (SSet.stdSimplex.obj j.left) ≫ j.hom := by + rw [← Category.assoc, hn, Category.assoc, lastVertex.naturality j.hom] + rfl + simpa only [Category.assoc, Functor.id_map] using congrArg (fst _ Δ[1] ≫ ·) hc.symm + +local instance : SSet.ex.{0}.Monoidal := Functor.Monoidal.ofChosenFiniteProducts _ + +theorem extensionCylinder_fst (X : SSet.{0}) : + extensionCylinder X ≫ SSet.ex.map (fst X Δ[1]) = fst (SSet.ex.obj X) Δ[1] := by + simp [extensionCylinder] + +/-- The unit comparison homotopy is constant after extension of the +last-vertex map. This is the exact relative identity used for descent +over a prescribed base. -/ +theorem subdivisionUnitHomotopy_stationary (K : SSet.{0}) : + (subdivisionUnitHomotopy K).h ≫ SSet.ex.map (lastVertex.app K) = + fst (SSet.sd.obj K) Δ[1] ≫ lastVertex.app K ≫ canonicalExtension.app K := by + have hu : SSet.sdExAdjunction.unit.app K ≫ SSet.ex.map (lastVertex.app K) = + canonicalExtension.app K := + (SSet.sdExAdjunction.homEquiv_unit K K (lastVertex.app K)).symm + change ((SSet.sdExAdjunction.unit.app (SSet.sd.obj K) ▷ Δ[1]) ≫ + extensionCylinder (SSet.sd.obj (SSet.sd.obj K)) ≫ + SSet.ex.map (subdivisionLastVertexHomotopy K).h) ≫ + SSet.ex.map (lastVertex.app K) = _ + calc + _ = (SSet.sdExAdjunction.unit.app (SSet.sd.obj K) ▷ Δ[1]) ≫ + extensionCylinder (SSet.sd.obj (SSet.sd.obj K)) ≫ + SSet.ex.map ((subdivisionLastVertexHomotopy K).h ≫ lastVertex.app K) := by + rw [SSet.ex.map_comp] + simp only [Category.assoc] + _ = (SSet.sdExAdjunction.unit.app (SSet.sd.obj K) ▷ Δ[1]) ≫ + extensionCylinder (SSet.sd.obj (SSet.sd.obj K)) ≫ + SSet.ex.map (fst (SSet.sd.obj (SSet.sd.obj K)) Δ[1] ≫ + SSet.sd.map (lastVertex.app K) ≫ lastVertex.app K) := by + rw [subdivisionLastVertexHomotopy_stationary] + _ = fst (SSet.sd.obj K) Δ[1] ≫ SSet.sdExAdjunction.unit.app (SSet.sd.obj K) ≫ + SSet.ex.map (SSet.sd.map (lastVertex.app K)) ≫ SSet.ex.map (lastVertex.app K) := by + simp only [SSet.ex.map_comp, ← Category.assoc, extensionCylinder_fst, + whiskerRight_fst, Functor.id_obj] + _ = fst (SSet.sd.obj K) Δ[1] ≫ lastVertex.app K ≫ + SSet.sdExAdjunction.unit.app K ≫ SSet.ex.map (lastVertex.app K) := by + have hn : SSet.sdExAdjunction.unit.app (SSet.sd.obj K) ≫ + SSet.ex.map (SSet.sd.map (lastVertex.app K)) = + lastVertex.app K ≫ SSet.sdExAdjunction.unit.app K := + (SSet.sdExAdjunction.unit.naturality (lastVertex.app K)).symm + simpa only [Category.assoc] using congrArg + (fun q => fst (SSet.sd.obj K) Δ[1] ≫ q ≫ SSet.ex.map (lastVertex.app K)) hn + _ = _ := by rw [hu] + +end + +end Thomason.Construction + +end + +section + +/-! # Naturality of the relative subdivision prism -/ + +namespace Thomason.Construction + +open CategoryTheory CategoryTheory.Limits MonoidalCategory CartesianMonoidalCategory +open scoped Simplicial + +noncomputable section + +@[reassoc] +theorem subdivisionLastVertexHomotopy_naturality {A B : SSet.{0}} (f : A ⟶ B) : + (SSet.sd.map (SSet.sd.map f) ▷ Δ[1]) ≫ (subdivisionLastVertexHomotopy B).h = + (subdivisionLastVertexHomotopy A).h ≫ SSet.sd.map f := by + apply (isColimitOfPreserves (tensorRight (Δ[1] : SSet.{0})) + (SimplicialHomotopyDescent.isColimit (SSet.sd ⋙ SSet.sd) A)).hom_ext + intro j + change (SSet.sd.map (SSet.sd.map j.hom) ▷ Δ[1]) ≫ + ((SSet.sd.map (SSet.sd.map f) ▷ Δ[1]) ≫ (subdivisionLastVertexHomotopy B).h) = + (SSet.sd.map (SSet.sd.map j.hom) ▷ Δ[1]) ≫ + ((subdivisionLastVertexHomotopy A).h ≫ SSet.sd.map f) + have hc : SSet.sd.map (SSet.sd.map j.hom) ≫ SSet.sd.map (SSet.sd.map f) = + SSet.sd.map (SSet.sd.map (j.hom ≫ f)) := by + rw [← SSet.sd.map_comp, ← SSet.sd.map_comp] + let j' : CostructuredArrow SSet.stdSimplex B := CostructuredArrow.mk (j.hom ≫ f) + calc + _ = (SSet.sd.map (SSet.sd.map (j.hom ≫ f)) ▷ Δ[1]) ≫ + (subdivisionLastVertexHomotopy B).h := by + rw [← Category.assoc, ← comp_whiskerRight, hc] + _ = (standardDoubleHomotopy j.left).h ≫ SSet.sd.map (j.hom ≫ f) := + subdivisionLastVertexHomotopy_fac B j' + _ = ((standardDoubleHomotopy j.left).h ≫ SSet.sd.map j.hom) ≫ SSet.sd.map f := by + rw [SSet.sd.map_comp, Category.assoc] + _ = _ := by rw [← subdivisionLastVertexHomotopy_fac, Category.assoc] + +local instance : SSet.ex.{0}.Monoidal := Functor.Monoidal.ofChosenFiniteProducts _ + +@[reassoc] +theorem extensionCylinder_naturality {A B : SSet.{0}} (f : A ⟶ B) : + (SSet.ex.map f ▷ Δ[1]) ≫ extensionCylinder B = + extensionCylinder A ≫ SSet.ex.map (f ▷ Δ[1]) := by + simp only [extensionCylinder, id_tensorHom] + rw [← Category.assoc, ← whisker_exchange, Category.assoc, + Functor.LaxMonoidal.μ_natural_left, Category.assoc] + +@[reassoc] +theorem subdivisionUnitHomotopy_naturality {A B : SSet.{0}} (f : A ⟶ B) : + (SSet.sd.map f ▷ Δ[1]) ≫ (subdivisionUnitHomotopy B).h = + (subdivisionUnitHomotopy A).h ≫ SSet.ex.map (SSet.sd.map f) := by + have hn : SSet.sd.map f ≫ SSet.sdExAdjunction.unit.app (SSet.sd.obj B) = + SSet.sdExAdjunction.unit.app (SSet.sd.obj A) ≫ + SSet.ex.map (SSet.sd.map (SSet.sd.map f)) := + SSet.sdExAdjunction.unit.naturality (SSet.sd.map f) + change (SSet.sd.map f ▷ Δ[1]) ≫ + ((SSet.sdExAdjunction.unit.app (SSet.sd.obj B) ▷ Δ[1]) ≫ + extensionCylinder (SSet.sd.obj (SSet.sd.obj B)) ≫ + SSet.ex.map (subdivisionLastVertexHomotopy B).h) = + ((SSet.sdExAdjunction.unit.app (SSet.sd.obj A) ▷ Δ[1]) ≫ + extensionCylinder (SSet.sd.obj (SSet.sd.obj A)) ≫ + SSet.ex.map (subdivisionLastVertexHomotopy A).h) ≫ SSet.ex.map (SSet.sd.map f) + rw [← Category.assoc, ← comp_whiskerRight, hn, comp_whiskerRight] + simp only [Category.assoc] + rw [extensionCylinder_naturality_assoc, ← SSet.ex.map_comp, + subdivisionLastVertexHomotopy_naturality, SSet.ex.map_comp] + +end + +end Thomason.Construction + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalConePrism.lean b/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalConePrism.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4348ca8334107968d997e11f6cfe773d110f01d --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalConePrism.lean @@ -0,0 +1,1007 @@ +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeChains +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderPath +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderRetractions +import OAI.CategoryTheory.Thomason.Gray.PosetPrismEndpoints +import OAI.CategoryTheory.Thomason.Gray.RightCylinderPrism +import OAI.CategoryTheory.Thomason.Gray.SimplexCylinderGeneration +import OAI.CategoryTheory.Thomason.Gray.TopologicalIntervalCylinder +import OAI.CategoryTheory.Thomason.Simplicial.NonsingularFaceCarriers +import OAI.CategoryTheory.Thomason.Simplicial.TruncationQuotientComposition +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import OAI.CategoryTheory.Thomason.Transfer.StrictPushoutGeneration +import OAI.CategoryTheory.Thomason.Transfer.ThomasonQuillenBridge +import Mathlib.CategoryTheory.Limits.Presheaf +import Mathlib.Order.Fin.InsertNth + +namespace OAI + +section + +/-! +# Gray deformation retractions induce actual Thomason weak equivalences + +This connects the constructed strict cylinders, their Street-nerve homotopies, +and the actual realization weak equivalences. Its classical inputs are only +the specified normalized chains, right Gray comparison, Alexander--Whitney +identities and Kan--Quillen WFS. No strict-category model structure is assumed. +-/ + +namespace Thomason.Construction + +open CategoryTheory HomotopicalAlgebra + +namespace KanQuillenPublishedInput + +variable (kq : KanQuillenPublishedInput.{0}) + +include kq in +/-- Retract stability is derived from the two classical WFS, through the +model-category constructor, rather than added as a new input. -/ +theorem weakEquivalences_retracts : realizationWeakEquivalences.{0}.IsStableUnderRetracts := by + exact kq.model.cm3a + +end KanQuillenPublishedInput + +namespace RightGrayInput + +variable {h : NormalizedSimplexIdentities} (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) (kq : KanQuillenPublishedInput.{0}) + +include aw kq + +/-- Strict right-cylinder homotopies preserve the prescribed Thomason +weak-equivalence class, defined by actual realizations of Street nerves. -/ +theorem cylinder_weakEquivalence_iff {X Y : StrictOmegaCategory.{0}} + (P : G.cylinder.obj X ⟶ Y) : + h.streetWeakEquivalences ((G.endpoint false).app X ≫ P) ↔ + h.streetWeakEquivalences ((G.endpoint true).app X ≫ P) := + kq.homotopy_weakEquivalence_iff (G.nerveHomotopy aw P) + +/-- A strict retraction with a Gray homotopy from its other composite to +identity is a weak equivalence on both maps. -/ +theorem deformation_retract_weakEquivalences {A X : StrictOmegaCategory.{0}} + (i : A ⟶ X) (r : X ⟶ A) (hi : i ≫ r = 𝟙 A) + (P : G.cylinder.obj X ⟶ X) + (h₀ : (G.endpoint false).app X ≫ P = r ≫ i) + (h₁ : (G.endpoint true).app X ≫ P = 𝟙 X) : + h.streetWeakEquivalences i ∧ h.streetWeakEquivalences r := by + have := kq.twoOutOfThree + have := kq.weakEquivalences_retracts + have : h.streetWeakEquivalences.ContainsIdentities := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).ContainsIdentities + have : h.streetWeakEquivalences.HasTwoOutOfThreeProperty := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).HasTwoOutOfThreeProperty + have : h.streetWeakEquivalences.IsStableUnderRetracts := + inferInstanceAs (realizationWeakEquivalences.inverseImage h.streetNerve).IsStableUnderRetracts + have hri : h.streetWeakEquivalences (r ≫ i) := by + have hc := G.cylinder_weakEquivalence_iff aw kq P + rw [h₀, h₁] at hc + exact hc.mpr (h.streetWeakEquivalences.id_mem X) + have hretract : RetractArrow i (r ≫ i) := + { i := Arrow.homMk i (𝟙 X) (by simp [← Category.assoc, hi]) + r := Arrow.homMk r (𝟙 X) (by simp) + retract := by + apply Arrow.hom_ext <;> simp [hi] } + have hwi : h.streetWeakEquivalences i := + MorphismProperty.of_retract hretract hri + refine ⟨hwi, ?_⟩ + apply h.streetWeakEquivalences.of_precomp i r hwi + rw [hi] + exact h.streetWeakEquivalences.id_mem A + +end RightGrayInput +end Thomason.Construction + +end + +section + +/-! # Actual Street weak equivalences for finite relative prisms -/ + +namespace Thomason.Construction.RelativePrismData + +open CategoryTheory + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] + (G : RightGrayInput h) (t : GrayTruncationInput G) {n : ℕ} (r : FiniteReflectionInput n) + (aw : SimplexComplex.AlexanderWhitneyInput h) (kq : KanQuillenPublishedInput.{0}) + +include G t aw kq + +/-- In every positive finite dimension, either categorified endpoint is a +Street-nerve weak equivalence exactly when the other endpoint is. -/ +theorem finite_weakEquivalence_iff : + h.streetWeakEquivalences ((StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap D.first))) ↔ + h.streetWeakEquivalences ((StrictOmegaCategory.inclusion (n + 1)).map + (r.reflect.map (h.posetMap D.last))) := by + let X : StrictOmegaCategory := (r.reflect.obj (h.categorification.obj (nerve E))).val + let W : (X ⟶ X) → Prop := fun f => h.streetWeakEquivalences f + exact (congrArg W (D.finitePrism_endpoint h G t r false)).symm.to_iff.trans + ((G.cylinder_weakEquivalence_iff aw kq (D.finitePrism h G t r)).trans + (congrArg W (D.finitePrism_endpoint h G t r true)).to_iff) + +end Thomason.Construction.RelativePrismData + +end + +section + +/-! # Essential expressions over a fixed positive-table level + +A lower composite of a level-n cell has both factors at level n. Combined +with atomic indecomposability above n, this bounds every composition in an +essential preimage expression. The resulting strings are the source-side +input to the free-comparison induction. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory StrictOmegaCategory.ExpressionDegree + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +/-- At a strictly lower composition degree, the upper atom belongs to +one factor and the other factor has zero upper tables. -/ +theorem aboveAtomOrZero_comp_factors (n s : ℕ) (hs : s < n) + (Y Z : Cell K) (hyz : Y.face true s = Z.face false s) + (hX : B.AboveAtomOrZero n (Cell.comp Y Z s hyz)) : + B.AboveAtomOrZero n Y ∧ B.AboveAtomOrZero n Z := by + rcases hX with hz | ⟨a, ha, he⟩ + · have hzero (q : ℕ) (hq : n < q) (side : Bool) : + Y.table side q = 0 ∧ Z.table side q = 0 := by + apply B.positive_add_eq_zero q _ _ (Y.positive side q) (Z.positive side q) + have hh := hz q hq side + simpa only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr (hs.le.trans hq.le), + Nat.ne_of_gt (hs.trans hq), ite_false] using hh + exact ⟨Or.inl (fun q hq side => (hzero q hq side).1), + Or.inl (fun q hq side => (hzero q hq side).2)⟩ + · have hsum : ∀ q, n < q → ∀ side, + Y.table side q + Z.table side q = (B.atom a.1 a.2).table side q := by + intro q hq side + have hh := he q hq side + simpa only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr (hs.le.trans hq.le), + Nat.ne_of_gt (hs.trans hq), ite_false, atomCell] using hh + rcases B.atom_summands a.2 n ha Y Z hsum with ⟨hY, hZ⟩ | ⟨hY, hZ⟩ + · exact ⟨Or.inr ⟨a, ha, hY⟩, Or.inl hZ⟩ + · exact ⟨Or.inl hY, Or.inr ⟨a, ha, hZ⟩⟩ + +/-- No essential composition lies above the preceding decomposition +level of the image. This controls the whole expression, not just its root. -/ +theorem essential_levelsLE {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + {x : C} (t : EssentialExpression C g x) (n : ℕ) + (hX : B.AboveAtomOrZero (n+1) (F.toFun x)) : t.levelsLE n := by + induction t with + | generator a => trivial + | @comp x y s hxy tx ty hx hy ihx ihy => + have hf : (F.toFun x).face true s = (F.toFun y).face false s := + (F.map_face true s x).symm.trans + ((congrArg F.toFun hxy).trans (F.map_face false s y)) + have himage : B.AboveAtomOrZero (n+1) + (Cell.comp (F.toFun x) (F.toFun y) s hf) := by + have he : F.toFun (C.comp s x y hxy) = Cell.comp (F.toFun x) (F.toFun y) s hf := + F.map_comp s x y hxy hf + rw [← he] + exact hX + have hs : s < n+1 := by + by_contra hs + rcases B.aboveAtomOrZero_comp_identity_factor (n+1) s (by omega) + (F.toFun x) (F.toFun y) hf himage with h | h + · exact hx (B.dimensionLE_of_expression_image g F hg hd tx.expression s h) + · exact hy (B.dimensionLE_of_expression_image g F hg hd ty.expression s h) + have hparts := B.aboveAtomOrZero_comp_factors (n+1) s hs + (F.toFun x) (F.toFun y) hf himage + exact ⟨by omega, ihx hparts.1, ihy hparts.2⟩ + +/-- Every preimage of a level-(n+1) cell is either n-dimensional or an +actual n-string whose factors have specified upper atoms above n. -/ +theorem preimage_atom_string {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) + (n : ℕ) (x : C) (hX : B.AboveAtomOrZero (n+1) (F.toFun x)) : + C.DimensionLE n x ∨ ∃ xs : List C, xs ≠ [] ∧ CompositeList C n xs x ∧ + ∀ y ∈ xs, ∃ a : B.AtomIndex, n < a.1 ∧ + ∀ q, n < q → ∀ side, (F.toFun y).table side q = (B.atomCell a).table side q := by + obtain ⟨t⟩ := hgen x + obtain ⟨s⟩ := t.exists_essential + by_cases hcount : highCount (fun a : B.AtomIndex => a.1) n s.expression.labels = 0 + · exact Or.inl (s.expression.dimensionLE (fun a => a.1) hd n + ((highCount_eq_zero_iff _ n s.expression.labels).mp hcount)) + · have hdim : DimensionwiseGenerated C g (fun a => a.1) := + fun r y hy => B.exists_bounded_expression g F hg hgen r y hy + obtain ⟨xs, _, hxs, hprop⟩ := exists_normalized_generator_string hd hdim s n + (B.essential_levelsLE g F hg hd s n hX) (Nat.pos_of_ne_zero hcount) + refine Or.inr ⟨xs, hxs.nonempty, hxs, ?_⟩ + intro y hy + obtain ⟨e, he⟩ := hprop y hy + obtain ⟨a, _, ha, haupper⟩ := B.expression_upper_atom g F hg hd e n he + exact ⟨a, ha, haupper⟩ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Freeness of the ordered positive-table comparison + +This proves the needed specialization of Steiner 2004, Theorem 5.7: +a strict category generated by bounded lifts of an actual ordered atom +basis is isomorphic to its positive-table realization. Generation is an +explicit property of the source, not an assumption of free relations. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem preimages_eq_of_dimensionLE {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (n : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero n X → ∃! x : C, F.toFun x = X) + (X : Cell K) (x y : C) (hx : F.toFun x = X) (hy : F.toFun y = X) + (hd : C.DimensionLE n x) : x = y := by + have hX : B.AboveAtomOrZero n X := by + apply Or.inl + intro q hq side + exact (congrArg (fun Y : Cell K => Y.table side q) hx).symm.trans + (Cell.table_zero_of_dimensionLE (F.dimensionLE hd) hq side) + obtain ⟨_, _, hu⟩ := hunique X hX + exact (hu x hx).trans (hu y hy).symm + +theorem preimages_eq_successor {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) + (n : ℕ) (hunique : ∀ X, B.AboveAtomOrZero n X → ∃! x : C, F.toFun x = X) + (X : Cell K) (hX : B.AboveAtomOrZero (n+1) X) + (x y : C) (hx : F.toFun x = X) (hy : F.toFun y = X) : x = y := by + have hfx : B.AboveAtomOrZero (n+1) (F.toFun x) := hx.symm ▸ hX + have hfy : B.AboveAtomOrZero (n+1) (F.toFun y) := hy.symm ▸ hX + rcases B.preimage_atom_string g F hg hd hgen n x hfx with hdx | ⟨xs, _, hxs, hxa⟩ + · exact B.preimages_eq_of_dimensionLE F n hunique X x y hx hy hdx + rcases B.preimage_atom_string g F hg hd hgen n y hfy with hdy | ⟨ys, _, hys, hya⟩ + · exact (B.preimages_eq_of_dimensionLE F n hunique X y x hy hx hdy).symm + obtain ⟨as, has⟩ := AtomComposite.of_compositeList hxs hxa + obtain ⟨bs, hbs⟩ := AtomComposite.of_compositeList hys hya + have him : F.toFun x = F.toFun y := hx.trans hy.symm + have hp : as.Perm bs := B.upper_sum_perm n as bs + (fun a ha => by + rcases List.mem_append.mp ha with ha | ha + · exact has.degree a ha + · exact hbs.degree a ha) + (fun q hq side => (has.upper_sum q hq side).symm.trans + ((congrArg (fun Z : Cell K => Z.table side q) him).trans (hbs.upper_sum q hq side))) + have hsa := AtomComposite.of_sorted_perm hunique has (B.sortAtoms_perm as).symm + (B.sortAtoms_pairwise as) + have hsb := AtomComposite.of_sorted_perm hunique hbs + (hp.symm.trans (B.sortAtoms_perm as).symm) (B.sortAtoms_pairwise as) + exact AtomComposite.total_unique hunique hsa hsb him + +/-- Every atom-decomposition level has unique preimages. The induction +hypotheses are discharged internally by actual sorting and interchange. -/ +theorem unique_preimage_level {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) : + ∀ n X, B.AboveAtomOrZero n X → ∃! x : C, F.toFun x = X := by + intro n + induction n with + | zero => exact B.unique_preimage_level_zero g F hg hd hgen + | succ n ih => + intro X hX + obtain ⟨x, hx⟩ := B.exists_preimage_successor F n ih X hX + refine ⟨x, hx, ?_⟩ + intro y hy + exact B.preimages_eq_successor g F hg hd hgen n ih X hX y x hy hx + +/-- The ordered-atom comparison is bijective on the actual cell carriers. -/ +theorem comparison_bijective {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) : + Function.Bijective F.toFun := by + have hall : ∀ X : Cell K, ∃! x : C, F.toFun x = X := by + intro X + obtain ⟨n, hn⟩ := X.finite_support + exact B.unique_preimage_level g F hg hd hgen n X (Or.inl hn) + constructor + · intro x y he + obtain ⟨_, _, hu⟩ := hall (F.toFun x) + exact (hu x rfl).trans (hu y he.symm).symm + · intro X + obtain ⟨x, hx, _⟩ := hall X + exact ⟨x, hx⟩ + +/-- The actual strict isomorphism, with the specified comparison as its +forward functor. -/ +noncomputable def comparisonIso {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) : C ≅ K.realization := + isoOfBijective F (B.comparison_bijective g F hg hd hgen) + +@[simp] theorem comparisonIso_hom {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) : + (B.comparisonIso g F hg hd hgen).hom = F := rfl + +theorem comparison_isIso {C : StrictOmegaCategory.{0}} + (g : B.AtomIndex → C) (F : C ⟶ K.realization) + (hg : ∀ a, F.toFun (g a) = B.atomCell a) + (hd : ∀ a, C.DimensionLE a.1 (g a)) + (hgen : ∀ x : C, Nonempty (CompositionExpression C g x)) : IsIso F := by + change IsIso (B.comparisonIso g F hg hd hgen).hom + infer_instance + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # The untensored pasted-globe comparison is an isomorphism + +The actual strict pushout is generated by its two globe pieces. Shared +faces normalize to the chosen basis representatives, so ordered-atom +freeness applies to its canonical positive-table comparison. This also +identifies the abelianization unit on every binary pasting parameter. +-/ + +namespace Thomason.Construction.PastingGlobeBasis + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex StrictOmegaCategory + +noncomputable section + +private theorem mixed_coefficient {n k p r : ℕ} (hkn : k < n) + (b : Basis n k p) (e : Basis n k r) (a : Bool) : + PastingGlobeCylinderBasis.coefficient hkn (.mixed e) + ((PastingGlobeCylinderBasis.atom hkn (.mixed b)).table a (r+1)) = + DFunLike.coe (F := Chains n k r) ((atom hkn b).table a r) e := by + change DFunLike.coe (F := Chains n k r) (if RightCylinder.prismSide (r+1) a then + (0, (atom hkn b).table a (r+1), (atom hkn b).table a r) + else ((atom hkn b).table a (r+1), 0, (atom hkn b).table a r)).2.2 e = _ + split_ifs <;> rfl + +private theorem ordered_disjoint {n k p q r : ℕ} (hkn : k < n) + (b : Basis n k p) (c : Basis n k q) (hrp : r < p) (hrq : r < q) + (hbc : height b ≤ height c) (e : Basis n k r) : + DFunLike.coe (F := Chains n k r) ((atom hkn b).table false r) e = 0 ∨ + DFunLike.coe (F := Chains n k r) ((atom hkn c).table true r) e = 0 := by + have hh : PastingGlobeCylinderBasis.height (.mixed b) ≤ + PastingGlobeCylinderBasis.height (.mixed c) := by + change 3 * height b ≤ 3 * height c + omega + have he := PastingGlobeCylinderBasis.ordered_atoms_disjoint hkn + (.mixed b) (.mixed c) (Nat.succ_lt_succ hrp) (Nat.succ_lt_succ hrq) hh (.mixed e) + simpa only [mixed_coefficient] using he + +/-- The base ordered atoms are inherited from the explicit signed cylinder. -/ +def orderedAtomBasis {n k : ℕ} (hkn : k < n) : OrderedAtomBasis (complex n k hkn) where + Index := Basis n k + coordinates _ := AddEquiv.refl _ + positive_iff _ _ := Iff.rfl + augmentation x := by + have he (v : Chains n k 0) : + Finsupp.linearCombination ℤ (fun _ : Basis n k 0 => (1 : ℤ)) v = + v.sum (fun _ z => z) := by + simp [Finsupp.linearCombination_apply, Finsupp.sum] + exact he x + atom _ := atom hkn + atom_top _ := atom_top hkn + atom_above _ b _ h a := atom_above hkn b h a + height _ := height + disjoint b c hrp hrq hbc e := ordered_disjoint hkn b c hrp hrq hbc e + +private def piece (n k : ℕ) (s : Bool) : Globe.category n ⟶ PastingGlobe.category n n k := + if s then PastingGlobe.right n n k else PastingGlobe.left n n k + +private def pieceAtom {n k p : ℕ} (s : Bool) (b : DirectedGlobeComplex.Basis n p) : + PastingGlobe.category n n k := + (piece n k s).toFun ((Globe.category n).face b.val p Globe.Cell.top) + +/-- Lift the canonical representative to the appropriate actual globe face. -/ +def atomLift {n k : ℕ} (hkn : k < n) (a : (orderedAtomBasis hkn).AtomIndex) : + PastingGlobe.category n n k := + pieceAtom a.2.val.1 ⟨a.2.val.2, a.2.property.1⟩ + +theorem atomLift_dimension {n k : ℕ} (hkn : k < n) + (a : (orderedAtomBasis hkn).AtomIndex) : + (PastingGlobe.category n n k).DimensionLE a.1 (atomLift hkn a) := + (piece n k a.2.val.1).dimensionLE ((Globe.category n).face_dimensionLE + a.2.val.2 a.1 Globe.Cell.top) + +private theorem pieceAtom_image {n k p : ℕ} (hkn : k < n) + (s : Bool) (b : DirectedGlobeComplex.Basis n p) : + (fromPasting hkn).toFun (pieceAtom s b) = + (inclusion hkn s).realization.toFun ((DirectedGlobeComplex.topCell n).face b.val p) := by + have ht : (fromPasting hkn).toFun ((piece n k s).toFun Globe.Cell.top) = top hkn s := by + cases s + · exact PastingGlobe.desc_left _ _ _ _ _ _ + · exact PastingGlobe.desc_right _ _ _ _ _ _ + calc + _ = (fromPasting hkn).toFun ((PastingGlobe.category n n k).face b.val p + ((piece n k s).toFun Globe.Cell.top)) := + congrArg (fromPasting hkn).toFun ((piece n k s).map_face _ _ _) + _ = ((complex n k hkn).realization).face b.val p (top hkn s) := by + rw [(fromPasting hkn).map_face, ht] + _ = _ := ((inclusion hkn s).realization.map_face _ _ _).symm + +theorem atomLift_image {n k : ℕ} (hkn : k < n) + (a : (orderedAtomBasis hkn).AtomIndex) : + (fromPasting hkn).toFun (atomLift hkn a) = (orderedAtomBasis hkn).atomCell a := + pieceAtom_image hkn a.2.val.1 ⟨a.2.val.2, a.2.property.1⟩ + +private theorem shared_lower {n k p : ℕ} (hkn : k < n) (hp : p < k) (a : Bool) : + pieceAtom (n := n) (k := k) false ⟨a, Or.inl (hp.trans hkn)⟩ = + pieceAtom (n := n) (k := k) true ⟨a, Or.inl (hp.trans hkn)⟩ := by + have h := congrArg ((PastingGlobe.category n n k).face a p) (PastingGlobe.matching n n k) + simp only [source, target, (PastingGlobe.category n n k).globular, hp, ite_true] at h + exact ((PastingGlobe.left n n k).map_face a p Globe.Cell.top).trans + (h.trans ((PastingGlobe.right n n k).map_face a p Globe.Cell.top).symm) + +private theorem pieceAtom_normalize {n k p : ℕ} (hkn : k < n) + (s : Bool) (b : DirectedGlobeComplex.Basis n p) : + pieceAtom (k := k) s b = atomLift hkn ⟨p, embed hkn s b⟩ := by + cases s with + | false => rfl + | true => + by_cases hp : p < k + · simpa [atomLift, embed, right, hp, left] using + (shared_lower hkn hp b.val).symm + · by_cases he : p = k + · subst p + by_cases hb : b.val = false + · have hb' : b = ⟨false, Or.inl hkn⟩ := Subtype.ext hb + subst b + have h : pieceAtom (n := n) (k := k) true ⟨false, Or.inl hkn⟩ = + pieceAtom (n := n) (k := k) false ⟨true, Or.inl hkn⟩ := + ((PastingGlobe.right n n k).map_face false k Globe.Cell.top).trans + ((PastingGlobe.matching n n k).symm.trans + ((PastingGlobe.left n n k).map_face true k Globe.Cell.top).symm) + simpa [atomLift, embed, right, left] using h + · have hb' : b = ⟨true, Or.inl hkn⟩ := Subtype.ext (Bool.eq_true_of_not_eq_false hb) + subst b + simp [atomLift, embed, right] + · simp [atomLift, embed, right, hp, he] + +private theorem piece_generated {n k : ℕ} (hkn : k < n) (s : Bool) + (x : Globe.category n) : + Nonempty (CompositionExpression (PastingGlobe.category n n k) (atomLift hkn) + ((piece n k s).toFun x)) := by + let p := Globe.dimension x + let b := DirectedGlobeComplex.globeBasis x + have hx : (Globe.category n).face b.val p Globe.Cell.top = x := by + cases x with + | top => exact (Globe.category_truncated n Globe.Cell.top).1 + | boundary a j => exact dite_eq_right (Nat.not_le.mpr j.isLt) + have he := pieceAtom_normalize hkn s b + have hx' : pieceAtom (k := k) s b = (piece n k s).toFun x := congrArg _ hx + rw [← hx', he] + exact ⟨CompositionExpression.generator (C := PastingGlobe.category n n k) + (g := atomLift hkn) ⟨p, embed hkn s b⟩⟩ + +theorem generated {n k : ℕ} (hkn : k < n) (x : PastingGlobe.category n n k) : + Nonempty (CompositionExpression (PastingGlobe.category n n k) (atomLift hkn) x) := by + obtain ⟨t⟩ := PushoutGeneration.generated_by_pieces + (Globe.faceMap true k n) (Globe.faceMap false k n) x + exact t.substitute (𝟙 (PastingGlobe.category n n k)) (fun a => by + cases a with + | inl y => exact piece_generated hkn false y + | inr y => exact piece_generated hkn true y) + +/-- The canonical comparison of the actual pasted globes is a strict isomorphism. -/ +def pastingIso {n k : ℕ} (hkn : k < n) : + PastingGlobe.category n n k ≅ (complex n k hkn).realization := + (orderedAtomBasis hkn).comparisonIso (atomLift hkn) (fromPasting hkn) + (atomLift_image hkn) (atomLift_dimension hkn) (generated hkn) + +@[simp] theorem pastingIso_hom {n k : ℕ} (hkn : k < n) : + (pastingIso hkn).hom = fromPasting hkn := rfl + +/-- Strict abelianization also recovers the actual binary pasting parameter. -/ +def pastingUnitIso {n k : ℕ} (hkn : k < n) : + PastingGlobe.category n n k ≅ + (Abelianization.complex (PastingGlobe.category n n k)).realization := + pastingIso hkn ≪≫ (realizationFunctor.mapIso (abelianizationIso hkn)).symm + +theorem pastingUnitIso_hom {n k : ℕ} (hkn : k < n) : + (pastingUnitIso hkn).hom = Abelianization.unit (PastingGlobe.category n n k) := by + apply (cancel_mono (realizationFunctor.map (abelianizationIso hkn).hom)).mp + have he := Abelianization.unit_evaluate (fromPasting hkn) + calc + _ = fromPasting hkn := by + change ((pastingIso hkn).hom ≫ + (realizationFunctor.mapIso (abelianizationIso hkn)).inv) ≫ + (realizationFunctor.mapIso (abelianizationIso hkn)).hom = _ + let e := realizationFunctor.mapIso (abelianizationIso hkn) + change (fromPasting hkn ≫ e.inv) ≫ e.hom = fromPasting hkn + exact (Category.assoc _ _ _).trans + ((congrArg (fun q => fromPasting hkn ≫ q) e.inv_hom_id).trans (Category.comp_id _)) + _ = _ := he.symm + +end +end Thomason.Construction.PastingGlobeBasis + +end + +section + +/-! # The actual collapse of the extended right cylinder + +The abelianization unit is invertible on the finite globe-and-pasting +parameters. The literal chain collapse therefore takes values in those +strict parameters, and density extends it to every strict category. +Both global endpoints are sections of this collapse. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory CategoryTheory.Functor _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +/-- Collapse the interval in the global chain model. -/ +def modelCollapse : model ⟶ Abelianization.functor ⋙ realizationFunctor where + app C := (RightCylinder.projection (Abelianization.complex C)).realization + naturality C D f := by + apply Hom.ext + funext x + exact RightCylinder.realization_projection_map (Abelianization.map f) x + +theorem modelEndpoint_collapse (a : Bool) : + modelEndpoint a ≫ modelCollapse = Abelianization.adjunction.unit := by + apply NatTrans.ext + funext C + apply Hom.ext + funext x + exact RightCylinder.realization_projection_endpoint (Abelianization.complex C) a + ((Abelianization.unit C).toFun x) + +/-- The unit comparison at one actual globe or binary pasting. -/ +def parameterUnitComponent (i : GlobePasting.Shape) : + GlobePasting.object i ≅ (Abelianization.complex (GlobePasting.object i)).realization := + match i with + | .globe n => DirectedGlobeComplex.globeUnitIso n + | .pair _ _ hk => PastingGlobeBasis.pastingUnitIso hk + +@[simp] theorem parameterUnitComponent_hom (i : GlobePasting.Shape) : + (parameterUnitComponent i).hom = Abelianization.unit (GlobePasting.object i) := by + cases i with + | globe n => exact DirectedGlobeComplex.globeUnitIso_hom n + | pair n k hk => exact PastingGlobeBasis.pastingUnitIso_hom hk + +/-- The actual unit is an isomorphism on every chosen finite parameter. -/ +def parameterUnitIso : GlobePasting.inclusion ≅ + GlobePasting.inclusion ⋙ Abelianization.functor ⋙ realizationFunctor := + NatIso.ofComponents parameterUnitComponent (by + intro i j f + let f' : GlobePasting.object i ⟶ GlobePasting.object j := f + change f' ≫ (parameterUnitComponent j).hom = + (parameterUnitComponent i).hom ≫ (Abelianization.map f').realization + rw [parameterUnitComponent_hom, parameterUnitComponent_hom] + exact Abelianization.adjunction.unit.naturality f') + +@[simp] theorem parameterUnitIso_hom_app (i : GlobePasting.Shape) : + parameterUnitIso.hom.app i = Abelianization.unit (GlobePasting.object i) := + parameterUnitComponent_hom i + +/-- Collapse on each actual finite parameter, with the unit inverted. -/ +def parameterProjection : parameters ⟶ GlobePasting.inclusion := + whiskerLeft GlobePasting.inclusion modelCollapse ≫ parameterUnitIso.inv + +/-- The global strict cylinder collapse is the unique extension of these maps. -/ +def projection : cylinder ⟶ 𝟭 StrictOmegaCategory.{0} := + GlobePasting.compare parameters (𝟭 _) parameterProjection + +@[reassoc (attr := simp)] theorem projection_parameters : + parameterIso.hom ≫ whiskerLeft GlobePasting.inclusion projection = + parameterProjection := + GlobePasting.restriction_compare parameters (𝟭 _) parameterProjection + +theorem parameterEndpoint_projection (a : Bool) (i : GlobePasting.Shape) : + (modelEndpoint a).app (GlobePasting.object i) ≫ parameterProjection.app i = + 𝟙 (GlobePasting.object i) := by + let C := GlobePasting.object i + let e : C ≅ (Abelianization.complex C).realization := parameterUnitIso.app i + let q : model.obj C ⟶ (Abelianization.complex C).realization := modelCollapse.app C + let j : C ⟶ model.obj C := (modelEndpoint a).app C + have he : j ≫ q = e.hom := + (congrArg (fun t => t.app C) (modelEndpoint_collapse a)).trans + (parameterUnitIso_hom_app i).symm + change j ≫ (q ≫ e.inv) = 𝟙 C + exact (Category.assoc j q e.inv).symm.trans + ((congrArg (fun f => f ≫ e.inv) he).trans e.hom_inv_id) + +/-- Both actual global endpoint maps are sections of the constructed collapse. -/ +theorem endpoint_projection (a : Bool) (C : StrictOmegaCategory.{0}) : + (endpoint a).app C ≫ projection.app C = 𝟙 C := by + have hnat : endpoint a ≫ projection = 𝟙 (𝟭 StrictOmegaCategory.{0}) := by + apply Functor.hom_ext_of_isLeftKanExtension _ GlobePasting.inclusion.rightUnitor.inv + apply NatTrans.ext + funext i + let C := GlobePasting.object i + let e : model.obj C ≅ cylinder.obj C := parameterIso.app i + have he : (endpoint a).app C = (modelEndpoint a).app C ≫ e.hom := + congrArg (fun t => t.app i) (endpoint_parameters a) + let p : model.obj C ⟶ C := parameterProjection.app i + have hp : e.hom ≫ projection.app C = p := + congrArg (fun t => t.app i) projection_parameters + change (endpoint a).app C ≫ projection.app C = 𝟙 C + calc + _ = ((modelEndpoint a).app C ≫ e.hom) ≫ projection.app C := + congrArg (fun f => f ≫ projection.app C) he + _ = (modelEndpoint a).app C ≫ (e.hom ≫ projection.app C) := Category.assoc _ _ _ + _ = (modelEndpoint a).app C ≫ p := + congrArg (fun f => (modelEndpoint a).app C ≫ f) hp + _ = 𝟙 C := parameterEndpoint_projection a i + exact congrArg (fun t => t.app C) hnat + +/-- The strict collapse agrees with the literal chain collapse after the +abelianization unit, on every strict category. -/ +theorem projection_unit : + projection ≫ Abelianization.adjunction.unit = comparison ≫ modelCollapse := by + apply GlobePasting.compare_ext parameters + apply NatTrans.ext + funext i + let C := GlobePasting.object i + let e : model.obj C ≅ cylinder.obj C := parameterIso.app i + let u : C ≅ (Abelianization.complex C).realization := parameterUnitIso.app i + let q : model.obj C ⟶ (Abelianization.complex C).realization := modelCollapse.app C + have hp : e.hom ≫ projection.app C = q ≫ u.inv := + congrArg (fun t => t.app i) projection_parameters + have hc : e.hom ≫ comparison.app C = 𝟙 (model.obj C) := + congrArg (fun t => t.app i) parameter_comparison + change e.hom ≫ (projection.app C ≫ Abelianization.unit C) = + e.hom ≫ (comparison.app C ≫ q) + have hu : Abelianization.unit C = u.hom := (parameterUnitIso_hom_app i).symm + calc + _ = (e.hom ≫ projection.app C) ≫ u.hom := + (congrArg (fun f => e.hom ≫ (projection.app C ≫ f)) hu).trans + (Category.assoc _ _ _).symm + _ = (q ≫ u.inv) ≫ u.hom := congrArg (fun f => f ≫ u.hom) hp + _ = q := (Category.assoc _ _ _).trans + ((congrArg (fun f => q ≫ f) u.inv_hom_id).trans (Category.comp_id _)) + _ = (e.hom ≫ comparison.app C) ≫ q := + (Category.id_comp q).symm.trans (congrArg (fun f => f ≫ q) hc.symm) + _ = _ := Category.assoc _ _ _ + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! +# Weak-equivalence transport through the assembled relative prism + +The weak-equivalence class here is the one defined by actual geometric +realization of the Street nerve. Only the previously stated classical +Kan--Quillen and Alexander--Whitney inputs are used. +-/ + +namespace Thomason.Construction.RelativePrismData + +open CategoryTheory + +variable {E : Type} [PartialOrder E] (D : RelativePrismData E) + (h : NormalizedSimplexIdentities) [StrictColimitsInput] (G : RightGrayInput h) + (aw : SimplexComplex.AlexanderWhitneyInput h) (kq : KanQuillenPublishedInput.{0}) + +include G aw kq + +/-- Relative poset-prism endpoints simultaneously induce Street weak equivalences. -/ +theorem weakEquivalence_iff : + h.streetWeakEquivalences (h.categorification.map (nerveMap D.first.monotone.functor)) ↔ + h.streetWeakEquivalences (h.categorification.map (nerveMap D.last.monotone.functor)) := by + have hfirst := D.prism_endpoint h G false + have hlast := D.prism_endpoint h G true + let W : (h.categorification.obj (nerve E) ⟶ h.categorification.obj (nerve E)) → Prop := + fun f => h.streetWeakEquivalences f + exact (congrArg W hfirst).symm.to_iff.trans + ((G.cylinder_weakEquivalence_iff aw kq (D.prism h G)).trans + (congrArg W hlast).to_iff) + +end Thomason.Construction.RelativePrismData + +end + +section + +/-! # Descending actual topological prisms through geometric realization + +Realization is the colimit of its topological simplices. Product with the +interval preserves that colimit by the explicitly constructed adjunction. +Consequently compatible continuous simplex prisms descend to the actual +realization, with both endpoint equations proved on the original legs. +-/ + +namespace Thomason.Construction.RealizationPrism + +open CategoryTheory CategoryTheory.Limits + +/-- The actual topological simplices indexing a realization. -/ +noncomputable abbrev diagram (K : SSet.{0}) := + CostructuredArrow.proj SSet.stdSimplex K ⋙ SimplexCategory.toTop.{0} + +/-- The canonical cocone, using Mathlib's realization comparison on simplices. -/ +noncomputable abbrev cocone (K : SSet.{0}) : Cocone (diagram K) := + (Functor.LeftExtension.mk SSet.toTop SSet.toTopSimplex.inv).coconeAt K + +/-- Its actual colimit universal property. -/ +noncomputable def isColimit (K : SSet.{0}) : IsColimit (cocone K) := + Functor.isPointwiseLeftKanExtensionOfIsLeftKanExtension SSet.toTop + SSet.toTopSimplex.inv K + +/-- The continuous map from an original topological simplex to realization. -/ +noncomputable abbrev leg (K : SSet.{0}) (j : CostructuredArrow SSet.stdSimplex K) := + (cocone K).ι.app j + +/-- Realization legs commute with every actual simplicial map. -/ +theorem leg_naturality {K L : SSet.{0}} (f : K ⟶ L) + (j : CostructuredArrow SSet.stdSimplex K) : + leg K j ≫ SSet.toTop.map f = leg L ((CostructuredArrow.map f).obj j) := by + change (SSet.toTopSimplex.inv.app j.left ≫ SSet.toTop.map j.hom) ≫ SSet.toTop.map f = + SSet.toTopSimplex.inv.app j.left ≫ SSet.toTop.map (j.hom ≫ f) + rw [Category.assoc, Functor.map_comp] + +/-- Compatible topological prisms indexed by every simplex, including degenerate ones. -/ +noncomputable def prismCocone (K : SSet.{0}) (Z : TopCat.{0}) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram K).obj j) ⟶ Z) + (hp : ∀ {i j} (f : i ⟶ j), + TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i) : + Cocone (diagram K ⋙ TopologicalInterval.cylinder) where + pt := Z + ι := { app := P + naturality := fun i j f => by + change TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i ≫ 𝟙 Z + exact (hp f).trans (Category.comp_id _).symm } + +/-- The assembled prism is defined on the actual geometric realization times I. -/ +noncomputable def assemble (K : SSet.{0}) (Z : TopCat.{0}) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram K).obj j) ⟶ Z) + (hp : ∀ {i j} (f : i ⟶ j), + TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i) : + TopologicalInterval.cylinder.obj (SSet.toTop.obj K) ⟶ Z := + (isColimitOfPreserves TopologicalInterval.cylinder (isColimit K)).desc (prismCocone K Z P hp) + +@[reassoc] +theorem assemble_fac (K : SSet.{0}) (Z : TopCat.{0}) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram K).obj j) ⟶ Z) + (hp : ∀ {i j} (f : i ⟶ j), + TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i) + (j : CostructuredArrow SSet.stdSimplex K) : + TopologicalInterval.cylinder.map (leg K j) ≫ assemble K Z P hp = P j := + (isColimitOfPreserves TopologicalInterval.cylinder (isColimit K)).fac (prismCocone K Z P hp) j + +/-- The global endpoint equation follows from its equations on original simplex legs. -/ +theorem assemble_endpoint (K : SSet.{0}) (Z : TopCat.{0}) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram K).obj j) ⟶ Z) + (hp : ∀ {i j} (f : i ⟶ j), + TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i) + (t : unitInterval) (f : SSet.toTop.obj K ⟶ Z) + (he : ∀ j, TopologicalInterval.sectionAt ((diagram K).obj j) t ≫ P j = leg K j ≫ f) : + TopologicalInterval.sectionAt (SSet.toTop.obj K) t ≫ assemble K Z P hp = f := by + apply (isColimit K).hom_ext + intro j + have hn : leg K j ≫ TopologicalInterval.sectionAt (SSet.toTop.obj K) t = + TopologicalInterval.sectionAt ((diagram K).obj j) t ≫ + TopologicalInterval.cylinder.map (leg K j) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + rfl + rw [← Category.assoc, hn, Category.assoc, assemble_fac, he] + +/-- A pair of compatible endpoint equations gives an actual continuous homotopy. -/ +noncomputable def homotopy (K : SSet.{0}) (Z : TopCat.{0}) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram K).obj j) ⟶ Z) + (hp : ∀ {i j} (f : i ⟶ j), + TopologicalInterval.cylinder.map ((diagram K).map f) ≫ P j = P i) + (f g : SSet.toTop.obj K ⟶ Z) + (h₀ : ∀ j, TopologicalInterval.sectionAt ((diagram K).obj j) 0 ≫ P j = leg K j ≫ f) + (h₁ : ∀ j, TopologicalInterval.sectionAt ((diagram K).obj j) 1 ≫ P j = leg K j ≫ g) : + f.hom.Homotopy g.hom where + toFun p := (assemble K Z P hp).hom (p.2, p.1) + continuous_toFun := (assemble K Z P hp).hom.continuous.comp (by fun_prop) + map_zero_left x := congrArg (fun k => k.hom x) (assemble_endpoint K Z P hp 0 f h₀) + map_one_left x := congrArg (fun k => k.hom x) (assemble_endpoint K Z P hp 1 g h₁) + +end Thomason.Construction.RealizationPrism + +end + +section + +/-! # Stationary simplex prisms give actual realization weak equivalences + +The hypotheses are continuous prism maps, their endpoint equations and +stationarity, not a weak-equivalence conclusion. They descend through the +actual realization colimit to a strong deformation retraction. This is the +semantic bridge for the relative prism construction, independently of KQ. +-/ + +namespace Thomason.Construction.RealizationPrism + +open CategoryTheory CategoryTheory.Limits + +variable {K L : SSet.{0}} (i : K ⟶ L) (r : L ⟶ K) (hi : i ≫ r = 𝟙 K) + (P : ∀ j, TopologicalInterval.cylinder.obj ((diagram L).obj j) ⟶ SSet.toTop.obj L) + (hp : ∀ {j k} (f : j ⟶ k), + TopologicalInterval.cylinder.map ((diagram L).map f) ≫ P k = P j) + +/-- Local stationarity descends along the source realization colimit. -/ +theorem assemble_stationary + (hs : ∀ j : CostructuredArrow SSet.stdSimplex K, + P ((CostructuredArrow.map i).obj j) = + TopologicalInterval.projection ((diagram K).obj j) ≫ leg K j ≫ SSet.toTop.map i) : + TopologicalInterval.cylinder.map (SSet.toTop.map i) ≫ assemble L _ P hp = + TopologicalInterval.projection (SSet.toTop.obj K) ≫ SSet.toTop.map i := by + apply (isColimitOfPreserves TopologicalInterval.cylinder (isColimit K)).hom_ext + intro j + change TopologicalInterval.cylinder.map (leg K j) ≫ + (TopologicalInterval.cylinder.map (SSet.toTop.map i) ≫ assemble L _ P hp) = + TopologicalInterval.cylinder.map (leg K j) ≫ + (TopologicalInterval.projection (SSet.toTop.obj K) ≫ SSet.toTop.map i) + have hproj : TopologicalInterval.cylinder.map (leg K j) ≫ + TopologicalInterval.projection (SSet.toTop.obj K) = + TopologicalInterval.projection ((diagram K).obj j) ≫ leg K j := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + rfl + calc + _ = TopologicalInterval.cylinder.map (leg K j ≫ SSet.toTop.map i) ≫ + assemble L _ P hp := by rw [Functor.map_comp, Category.assoc] + _ = P ((CostructuredArrow.map i).obj j) := by rw [leg_naturality, assemble_fac] + _ = _ := hs j + _ = _ := by rw [← Category.assoc, ← hproj, Category.assoc] + +include hi hp + +/-- An actual simplicial retraction whose realization has compatible stationary +simplex prisms is a realization weak equivalence. -/ +theorem weak_of_stationary_prisms + (h₀ : ∀ j, TopologicalInterval.sectionAt ((diagram L).obj j) 0 ≫ P j = + leg L j ≫ (SSet.toTop.map r ≫ SSet.toTop.map i)) + (h₁ : ∀ j, TopologicalInterval.sectionAt ((diagram L).obj j) 1 ≫ P j = + leg L j ≫ 𝟙 (SSet.toTop.obj L)) + (hs : ∀ j : CostructuredArrow SSet.stdSimplex K, + P ((CostructuredArrow.map i).obj j) = + TopologicalInterval.projection ((diagram K).obj j) ≫ leg K j ≫ SSet.toTop.map i) : + realizationWeakEquivalences i := by + let H := homotopy L _ P hp (SSet.toTop.map r ≫ SSet.toTop.map i) (𝟙 _) h₀ h₁ + have hir : SSet.toTop.map i ≫ SSet.toTop.map r = 𝟙 (SSet.toTop.obj K) := by + rw [← SSet.toTop.map_comp i r, hi] + exact SSet.toTop.map_id K + have Hrel : ((SSet.toTop.map i).hom.comp (SSet.toTop.map r).hom).HomotopyRel + (ContinuousMap.id (SSet.toTop.obj L)) (Set.range (SSet.toTop.map i).hom) := { + toHomotopy := H + prop' := by + intro t z hz + obtain ⟨x, rfl⟩ := hz + have hx := congrArg (fun f => f.hom (x, t)) (assemble_stationary i P hp hs) + have hrx := congrArg (fun f => f.hom x) hir + change (assemble L _ P hp).hom ((SSet.toTop.map i).hom x, t) = + (SSet.toTop.map i).hom ((SSet.toTop.map r).hom ((SSet.toTop.map i).hom x)) + exact hx.trans (congrArg (SSet.toTop.map i).hom hrx).symm } + exact weakEquivalence_of_strongDeformationRetract _ _ (congrArg TopCat.Hom.hom hir) Hrel + +end Thomason.Construction.RealizationPrism + +end + +section + +/-! # Explicit topological cone prisms + +Appending one greatest vertex gives a natural prism on every standard +simplex. The barycentric formula is continuous and compatible with all +ordinal maps, including degeneracies. +-/ + +namespace Thomason.Construction.ConePrism + +open CategoryTheory Convexity + +/-- Append a vertex above the final vertex of an ordered simplex. -/ +def append {P : Type*} [Preorder P] {n : ℕ} (s : Fin (n+1) →o P) + (v : P) (hv : s (Fin.last n) ≤ v) : Fin (n+2) →o P where + toFun := Fin.snoc (fun i => s i) v + monotone' := by + simpa only [Fin.insertNth_last'] using Fin.insertNth_last_monotone s.monotone v hv + +@[simp] +theorem append_castSucc {P : Type*} [Preorder P] {n : ℕ} + (s : Fin (n+1) →o P) (v : P) (hv) (i : Fin (n+1)) : + append s v hv i.castSucc = s i := by + change Fin.snoc (α := fun _ : Fin (n+2) => P) (fun j => s j) v i.castSucc = s i + simp only [Fin.snoc_castSucc] + +@[simp] +theorem append_last {P : Type*} [Preorder P] {n : ℕ} + (s : Fin (n+1) →o P) (v : P) (hv) : + append s v hv (Fin.last (n+1)) = v := by + change Fin.snoc (α := fun _ : Fin (n+2) => P) (fun j => s j) v (Fin.last (n+1)) = v + simp only [Fin.snoc_last] + +/-- Extend an ordinal map by the new final vertex. -/ +def ordinalMap {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) : Fin (m+2) →o Fin (n+2) := + append (Fin.castSuccOrderEmb.toOrderHom.comp f) (Fin.last (n+1)) (Fin.le_last _) + +@[simp] +theorem ordinalMap_castSucc {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (i : Fin (m+1)) : + ordinalMap f i.castSucc = (f i).castSucc := append_castSucc _ _ _ _ + +@[simp] +theorem ordinalMap_last {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) : + ordinalMap f (Fin.last (m+1)) = Fin.last (n+1) := append_last _ _ _ + +/-- The barycentric straight-line cone to the newly appended final vertex. -/ +noncomputable def barycentric (n : ℕ) : + C(StdSimplex ℝ (Fin (n+1)) × unitInterval, StdSimplex ℝ (Fin (n+2))) where + toFun p := convexCombPair (R := ℝ) (unitInterval.symm p.2) p.2 + (unitInterval.nonneg _) (unitInterval.nonneg _) (by simp) + (StdSimplex.map Fin.castSucc p.1) (.single (Fin.last (n+1))) + continuous_toFun := by + rw [(StdSimplex.isEmbedding_toFun_comp_weights ℝ (Fin (n+2))).continuous_iff] + apply continuous_pi + intro k + simp only [Function.comp_def, StdSimplex.weights_convexCombPair, Finsupp.coe_add, + Finsupp.coe_smul, Pi.add_apply, Pi.smul_apply, smul_eq_mul, unitInterval.coe_symm_eq] + have hc : Continuous (fun p : StdSimplex ℝ (Fin (n+1)) × unitInterval => + StdSimplex.map (Fin.castSucc : Fin (n+1) → Fin (n+2)) p.1) := + (StdSimplex.continuous_map ℝ _).comp continuous_fst + have hw := (StdSimplex.continuous_weights_apply ℝ k).comp hc + exact ((continuous_const.sub continuous_snd.subtype_val).mul hw).add + (continuous_snd.subtype_val.mul continuous_const) + +@[simp] +theorem barycentric_zero (n : ℕ) (x : StdSimplex ℝ (Fin (n+1))) : + barycentric n (x, 0) = StdSimplex.map Fin.castSucc x := by + ext k + simp [barycentric] + +@[simp] +theorem barycentric_one (n : ℕ) (x : StdSimplex ℝ (Fin (n+1))) : + barycentric n (x, 1) = .single (Fin.last (n+1)) := by + ext k + simp [barycentric] + +/-- Naturality of the topological cone under every ordinal map. -/ +theorem barycentric_naturality {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (t : unitInterval) : + StdSimplex.map (ordinalMap f) (barycentric m (x, t)) = + barycentric n (StdSimplex.map f x, t) := by + change StdSimplex.map (ordinalMap f) (convexCombPair _ _ _ _ _ _ _) = _ + rw [(StdSimplex.isAffineMap_map ℝ (ordinalMap f)).map_convexCombPair] + have hcomp : (fun j : Fin (m+1) => ordinalMap f j.castSucc) = + fun j => (f j).castSucc := by funext j; exact ordinalMap_castSucc f j + have hx : StdSimplex.map (ordinalMap f) (StdSimplex.map Fin.castSucc x) = + StdSimplex.map Fin.castSucc (StdSimplex.map f x) := by + rw [← StdSimplex.map_comp, ← StdSimplex.map_comp] + exact congrArg (fun g => StdSimplex.map g x) hcomp + simp only [StdSimplex.map_single, ordinalMap_last, hx] + rfl + +end Thomason.Construction.ConePrism + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalIntervalCylinder.lean b/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalIntervalCylinder.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef74ff66df830c7f625f31910c9a10ee2d3ab6af --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/TopologicalIntervalCylinder.lean @@ -0,0 +1,963 @@ +import OAI.CategoryTheory.Thomason.Chains.FinalPositiveSimplexSupport +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.GrayChainGlobeRestriction +import OAI.CategoryTheory.Thomason.Gray.OrderedAtomGrouping +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderPath +import OAI.CategoryTheory.Thomason.Simplicial.RealizedSimplexWeakEquivalences +import OAI.CategoryTheory.Thomason.Strict.StrictCompositeListReplacement +import OAI.CategoryTheory.Thomason.Strict.StrictIsomorphisms +import Mathlib.CategoryTheory.Adjunction.Limits +import Mathlib.CategoryTheory.Generator.StrongGenerator + +namespace OAI + +section + +/-! # Top endpoint and prism cells generate all globe-cylinder atoms + +Every lower atom is the image of a top endpoint or prism under the literal +globular face map. These formulas allow induction on the dimension of a +cell in the source of the extended cylinder. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +open CategoryTheory _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def modelGlobeIso (n : ℕ) : model.obj (Globe.category n) ≅ + (rightCylinder (DirectedGlobeComplex.complex n)).realization := + DirectedGlobeComplex.rightCylinderAbelianizationGlobeIso.app ⟨n⟩ + +theorem modelGlobeIso_naturality {m n : ℕ} (f : Globe.category m ⟶ Globe.category n) : + model.map f ≫ (modelGlobeIso n).hom = (modelGlobeIso m).hom ≫ + (RightCylinder.map (DirectedGlobeComplex.chainMap f)).realization := + DirectedGlobeComplex.rightCylinderAbelianizationGlobeIso.hom.naturality + (show (⟨m⟩ : Globe.Shapes) ⟶ ⟨n⟩ from f) + +theorem modelGlobeIso_inv_naturality {m n : ℕ} (f : Globe.category m ⟶ Globe.category n) : + (modelGlobeIso m).inv ≫ model.map f = + (RightCylinder.map (DirectedGlobeComplex.chainMap f)).realization ≫ (modelGlobeIso n).inv := by + apply (cancel_mono (modelGlobeIso n).hom).mp + rw [Category.assoc, modelGlobeIso_naturality, ← Category.assoc, + Iso.inv_hom_id, Category.id_comp, Category.assoc, Iso.inv_hom_id, Category.comp_id] + +theorem chainMap_faceMap (a : Bool) (m n : ℕ) : + DirectedGlobeComplex.chainMap (Globe.faceMap a m n) = DirectedGlobeComplex.faceMap a m n := by + apply (DirectedGlobeComplex.realizationHomEquiv m (DirectedGlobeComplex.complex n)).injective + change (DirectedGlobeComplex.chainMap (Globe.faceMap a m n)).realization = + (DirectedGlobeComplex.faceMap a m n).realization + rw [DirectedGlobeComplex.chainMap_realization] + apply (cancel_epi (DirectedGlobeComplex.globeIso m).hom).mp + rw [← Category.assoc, Iso.hom_inv_id, Category.id_comp] + exact DirectedGlobeComplex.fromGlobe_faceMap a m n + +def endpointTop (n : ℕ) (a : Bool) : model.obj (Globe.category n) := + (modelGlobeIso n).inv.toFun + (Cell.map (RightCylinder.endpoint (DirectedGlobeComplex.complex n) a) + (DirectedGlobeComplex.topCell n)) + +def prismTop (n : ℕ) : model.obj (Globe.category n) := + (modelGlobeIso n).inv.toFun (RightCylinder.prism (DirectedGlobeComplex.topCell n)) + +theorem endpointTop_dimension (n : ℕ) (a : Bool) : + (model.obj (Globe.category n)).DimensionLE n (endpointTop n a) := + (modelGlobeIso n).inv.dimensionLE ((RightCylinder.endpoint _ a).realization.dimensionLE + (DirectedGlobeComplex.topCell_dimension n)) + +theorem prismTop_dimension (n : ℕ) : + (model.obj (Globe.category n)).DimensionLE (n+1) (prismTop n) := + (modelGlobeIso n).inv.dimensionLE + (RightCylinder.prism_dimension _ (DirectedGlobeComplex.topCell_dimension n)) + +theorem endpointTop_face (a side : Bool) (p n : ℕ) : + (model.map (Globe.faceMap a p n)).toFun (endpointTop p side) = + (modelGlobeIso n).inv.toFun + (Cell.map (RightCylinder.endpoint _ side) + ((DirectedGlobeComplex.topCell n).face a p)) := by + have he := congrArg (fun f => f.toFun + (Cell.map (RightCylinder.endpoint _ side) (DirectedGlobeComplex.topCell p))) + (modelGlobeIso_inv_naturality (Globe.faceMap a p n)) + rw [chainMap_faceMap] at he + have ht : Cell.map (RightCylinder.map (DirectedGlobeComplex.faceMap a p n)) + (Cell.map (RightCylinder.endpoint _ side) (DirectedGlobeComplex.topCell p)) = + Cell.map (RightCylinder.endpoint _ side) + ((DirectedGlobeComplex.topCell n).face a p) := by + have hn : Cell.map (RightCylinder.map (DirectedGlobeComplex.faceMap a p n)) + (Cell.map (RightCylinder.endpoint _ side) (DirectedGlobeComplex.topCell p)) = + Cell.map (RightCylinder.endpoint _ side) + (Cell.map (DirectedGlobeComplex.faceMap a p n) (DirectedGlobeComplex.topCell p)) := by + apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (DirectedGlobeComplex.faceMap a p n) side q _ + exact hn.trans (congrArg (Cell.map (RightCylinder.endpoint _ side)) + (DirectedGlobeComplex.faceMap_top a p n)) + exact he.trans (congrArg (modelGlobeIso n).inv.toFun ht) + +theorem prismTop_face (a : Bool) (p n : ℕ) : + (model.map (Globe.faceMap a p n)).toFun (prismTop p) = + (modelGlobeIso n).inv.toFun + (RightCylinder.prism ((DirectedGlobeComplex.topCell n).face a p)) := by + have he := congrArg (fun f => f.toFun (RightCylinder.prism (DirectedGlobeComplex.topCell p))) + (modelGlobeIso_inv_naturality (Globe.faceMap a p n)) + rw [chainMap_faceMap] at he + exact he.trans (congrArg (modelGlobeIso n).inv.toFun + ((RightCylinder.prism_naturality (DirectedGlobeComplex.faceMap a p n) + (DirectedGlobeComplex.topCell p)).trans + (congrArg RightCylinder.prism (DirectedGlobeComplex.faceMap_top a p n)))) + +theorem endpointTop_modelAtom {n p : ℕ} (b : DirectedGlobeComplex.Basis n p) (side : Bool) : + (model.map (Globe.faceMap b.val p n)).toFun (endpointTop p side) = + (modelGlobeIso n).inv.toFun + ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p (.endpoint side b)) := + endpointTop_face b.val side p n + +theorem prismTop_modelAtom {n p : ℕ} (b : DirectedGlobeComplex.Basis n p) : + (model.map (Globe.faceMap b.val p n)).toFun (prismTop p) = + (modelGlobeIso n).inv.toFun + ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom (p+1) (.mixed b)) := + prismTop_face b.val p n + +end +end Thomason.Construction.StrictOmegaCategory.GrayChainExtension + +end + +section + +/-! # The finite strict globes form a small strong generator -/ + +namespace Thomason.Construction.StrictOmegaCategory + +open CategoryTheory + +/-- A monic strict functor is injective on cells, as tested by finite globes. -/ +theorem cell_injective_of_mono {C D : StrictOmegaCategory.{0}} (f : C ⟶ D) [Mono f] : + Function.Injective f.toFun := by + intro x y hxy + obtain ⟨m, hm⟩ := C.finite_dimension x + obtain ⟨n, hn⟩ := C.finite_dimension y + let a := Globe.lift C x (C.dimensionLE_mono (Nat.le_max_left m n) hm) + let b := Globe.lift C y (C.dimensionLE_mono (Nat.le_max_right m n) hn) + have he : a ≫ f = b ≫ f := Globe.hom_ext D _ _ hxy + have hab : a = b := (cancel_mono f).mp he + exact congrArg (fun k : Globe.category (max m n) ⟶ C => k.toFun Globe.Cell.top) hab + +/-- A bijective strict functor has a strict inverse. -/ +theorem isIso_of_cell_bijective {C D : StrictOmegaCategory.{0}} (f : C ⟶ D) + (hf : Function.Bijective f.toFun) : IsIso f := by + change IsIso (isoOfBijective f hf).hom + infer_instance + +def globes : ObjectProperty StrictOmegaCategory.{0} := ObjectProperty.ofObj Globe.category + +instance globes_small : ObjectProperty.Small.{0} globes := by + change ObjectProperty.Small.{0} (ObjectProperty.ofObj Globe.category) + infer_instance + +theorem globes_isSeparating : globes.IsSeparating := by + intro C D f g h + apply Hom.ext + funext x + obtain ⟨n, hn⟩ := C.finite_dimension x + have he := h (Globe.category n) (ObjectProperty.ofObj_apply Globe.category n) + (Globe.lift C x hn) + exact congrArg (fun k : Globe.category n ⟶ D => k.toFun Globe.Cell.top) he + +theorem globes_isStrongGenerator : globes.IsStrongGenerator := by + rw [ObjectProperty.isStrongGenerator_iff] + refine ⟨globes_isSeparating, ?_⟩ + intro C D f _ hf + apply isIso_of_cell_bijective f + refine ⟨cell_injective_of_mono f, ?_⟩ + intro y + obtain ⟨n, hn⟩ := D.finite_dimension y + obtain ⟨a, ha⟩ := hf (Globe.category n) (ObjectProperty.ofObj_apply Globe.category n) + (Globe.lift D y hn) + exact ⟨a.toFun Globe.Cell.top, + congrArg (fun k : Globe.category n ⟶ D => k.toFun Globe.Cell.top) ha⟩ + +end Thomason.Construction.StrictOmegaCategory + +end + +section + +/-! # The two higher factorizations of a lower composite + +Unit laws and interchange give the two whiskered r-composites of a fixed +s-composite, for s < r. These are the actual strict operations used in +the adjacent-atom transposition argument. +-/ + +namespace Thomason.Construction.StrictOmegaCategory + +variable (C : StrictOmegaCategory.{0}) + +theorem matching_face_right {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) : + C.target s u = C.source s (C.face side r v) := by + have he : C.source s (C.face side r v) = C.source s v := by + simp only [source, C.globular, hsr, ite_true] + exact huv.trans he.symm + +theorem matching_face_left {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) : + C.target s (C.face side r u) = C.source s v := by + have he : C.target s (C.face side r u) = C.target s u := by + simp only [target, C.globular, hsr, ite_true] + exact he.trans huv + +theorem matching_faces {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (a b : Bool) : + C.target s (C.face a r u) = C.source s (C.face b r v) := by + have he : C.source s (C.face b r v) = C.source s v := by + simp only [source, C.globular, hsr, ite_true] + exact (C.matching_face_left hsr u v huv a).trans he.symm + +def rightWhisker {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) : C := + C.comp s u (C.face side r v) (C.matching_face_right hsr u v huv side) + +def leftWhisker {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) : C := + C.comp s (C.face side r u) v (C.matching_face_left hsr u v huv side) + +theorem whiskered_forward_matching {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) : + C.target r (C.rightWhisker hsr u v huv false) = + C.source r (C.leftWhisker hsr u v huv true) := by + dsimp only [rightWhisker, leftWhisker, source, target] + have hm := C.matching_faces hsr u v huv true false + have h1 : C.target s (C.target r u) = C.source s (C.target r (C.source r v)) := by + simpa only [C.face_face_same] using hm + have h2 : C.target s (C.source r (C.target r u)) = C.source s (C.source r v) := by + simpa only [C.face_face_same] using hm + have ht := C.face_comp true r s hsr u (C.source r v) + (C.matching_face_right hsr u v huv false) h1 + have hs := C.face_comp false r s hsr (C.target r u) v + (C.matching_face_left hsr u v huv true) h2 + exact ht.trans (by simpa only [C.face_face_same] using hs.symm) + +theorem whiskered_reverse_matching {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) : + C.target r (C.leftWhisker hsr u v huv false) = + C.source r (C.rightWhisker hsr u v huv true) := by + dsimp only [rightWhisker, leftWhisker, source, target] + have hm := C.matching_faces hsr u v huv false true + have h1 : C.target s (C.target r (C.source r u)) = C.source s (C.target r v) := by + simpa only [C.face_face_same] using hm + have h2 : C.target s (C.source r u) = C.source s (C.source r (C.target r v)) := by + simpa only [C.face_face_same] using hm + have ht := C.face_comp true r s hsr (C.source r u) v + (C.matching_face_left hsr u v huv false) h1 + have hs := C.face_comp false r s hsr u (C.target r v) + (C.matching_face_right hsr u v huv true) h2 + exact ht.trans (by simpa only [C.face_face_same] using hs.symm) + +theorem whiskered_forward_comp {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) : + C.comp r (C.rightWhisker hsr u v huv false) (C.leftWhisker hsr u v huv true) + (C.whiskered_forward_matching hsr u v huv) = C.comp s u v huv := by + have hu : C.target r u = C.source r (C.target r u) := + (C.face_face_same false true r u).symm + have hv : C.target r (C.source r v) = C.source r v := + C.face_face_same true false r v + have hur := C.right_unit r u hu + have hvl := C.left_unit r v hv + have hr : C.target s (C.comp r u (C.target r u) hu) = + C.source s (C.comp r (C.source r v) v hv) := by + rw [hur, hvl] + exact huv + have hi := C.interchange s r hsr u (C.source r v) (C.target r u) v + (C.matching_face_right hsr u v huv false) + (C.matching_face_left hsr u v huv true) hu hv + (C.whiskered_forward_matching hsr u v huv) hr + exact hi.trans (by simp only [hur, hvl]) + +theorem whiskered_reverse_comp {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) : + C.comp r (C.leftWhisker hsr u v huv false) (C.rightWhisker hsr u v huv true) + (C.whiskered_reverse_matching hsr u v huv) = C.comp s u v huv := by + have hu : C.target r (C.source r u) = C.source r u := + C.face_face_same true false r u + have hv : C.target r v = C.source r (C.target r v) := + (C.face_face_same false true r v).symm + have hul := C.left_unit r u hu + have hvr := C.right_unit r v hv + have hr : C.target s (C.comp r (C.source r u) u hu) = + C.source s (C.comp r v (C.target r v) hv) := by + rw [hul, hvr] + exact huv + have hi := C.interchange s r hsr (C.source r u) v u (C.target r v) + (C.matching_face_left hsr u v huv false) + (C.matching_face_right hsr u v huv true) hu hv + (C.whiskered_reverse_matching hsr u v huv) hr + exact hi.trans (by simp only [hul, hvr]) + +end Thomason.Construction.StrictOmegaCategory + +end + +section + +/-! # Upper tables of strict whiskers and reflection of their factors + +Higher faces contribute zero above their face degree. This concrete +calculation transfers the strict interchange factorizations to the +ordered-atom uniqueness induction. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem map_face_table_above {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (x : C) (r : ℕ) (side : Bool) + (n : ℕ) (hn : r < n) (a : Bool) : + (F.toFun (C.face side r x)).table a n = 0 := by + have he := congrArg (fun X : Cell K => X.table a n) (F.map_face side r x) + let X : Cell K := F.toFun x + have hz : (X.face side r).table a n = 0 := by + simp only [Cell.face_table, Cell.cutTable, Nat.not_lt.mpr hn.le, + Nat.ne_of_gt hn, ite_false] + exact he.trans hz + +theorem rightWhisker_table_above {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) + (n : ℕ) (hn : r < n) (a : Bool) : + (F.toFun (C.rightWhisker hsr u v huv side)).table a n = (F.toFun u).table a n := by + let h := C.matching_face_right hsr u v huv side + have hf : (F.toFun u).face true s = (F.toFun (C.face side r v)).face false s := + (F.map_face true s u).symm.trans + ((congrArg F.toFun h).trans (F.map_face false s (C.face side r v))) + have he := congrArg (fun X : Cell K => X.table a n) + (F.map_comp s u (C.face side r v) h hf) + change (F.toFun (C.rightWhisker hsr u v huv side)).table a n = _ at he + have hsn : s < n := hsr.trans hn + have hz := map_face_table_above F v r side n hn a + let U : Cell K := F.toFun u + let V : Cell K := F.toFun (C.face side r v) + have hf' : U.face true s = V.face false s := hf + have hz' : V.table a n = 0 := hz + have hp : (Cell.comp U V s hf').table a n = U.table a n := by + simp only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hsn.le, + Nat.ne_of_gt hsn, ite_false, hz', add_zero] + exact he.trans hp + +theorem leftWhisker_table_above {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {s r : ℕ} (hsr : s < r) (u v : C) + (huv : C.target s u = C.source s v) (side : Bool) + (n : ℕ) (hn : r < n) (a : Bool) : + (F.toFun (C.leftWhisker hsr u v huv side)).table a n = (F.toFun v).table a n := by + let h := C.matching_face_left hsr u v huv side + have hf : (F.toFun (C.face side r u)).face true s = (F.toFun v).face false s := + (F.map_face true s (C.face side r u)).symm.trans + ((congrArg F.toFun h).trans (F.map_face false s v)) + have he := congrArg (fun X : Cell K => X.table a n) + (F.map_comp s (C.face side r u) v h hf) + change (F.toFun (C.leftWhisker hsr u v huv side)).table a n = _ at he + have hsn : s < n := hsr.trans hn + have hz := map_face_table_above F u r side n hn a + let U : Cell K := F.toFun (C.face side r u) + let V : Cell K := F.toFun v + have hf' : U.face true s = V.face false s := hf + have hz' : U.table a n = 0 := hz + have hp : (Cell.comp U V s hf').table a n = V.table a n := by + simp only [Cell.comp_table, Cell.pasteTable, Nat.not_lt.mpr hsn.le, + Nat.ne_of_gt hsn, ite_false, hz', zero_add] + exact he.trans hp + +theorem reflect_binary_factors {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (a b c d : C) (hab : C.target r a = C.source r b) + (hcd : C.target r c = C.source r d) + (ha : B.AboveAtomOrZero r (F.toFun a)) (hb : B.AboveAtomOrZero r (F.toFun b)) + (he : F.toFun (C.comp r a b hab) = F.toFun (C.comp r c d hcd)) + (hupper : ∀ n, r < n → ∀ side, + (F.toFun a).table side n = (F.toFun c).table side n) : a = c ∧ b = d := by + have hfab : (F.toFun a).face true r = (F.toFun b).face false r := + (F.map_face true r a).symm.trans + ((congrArg F.toFun hab).trans (F.map_face false r b)) + have hfcd : (F.toFun c).face true r = (F.toFun d).face false r := + (F.map_face true r c).symm.trans + ((congrArg F.toFun hcd).trans (F.map_face false r d)) + have htotal : Cell.comp (F.toFun a) (F.toFun b) r hfab = + Cell.comp (F.toFun c) (F.toFun d) r hfcd := + (F.map_comp r a b hab hfab).symm.trans (he.trans (F.map_comp r c d hcd hfcd)) + have hfactors := Cell.factors_unique_of_above _ _ _ _ r hfab hfcd htotal hupper + obtain ⟨_, _, hau⟩ := hunique (F.toFun a) ha + obtain ⟨_, _, hbu⟩ := hunique (F.toFun b) hb + exact ⟨(hau a rfl).trans (hau c hfactors.1.symm).symm, + (hbu b rfl).trans (hbu d hfactors.2.symm).symm⟩ + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Transposition of two neighbouring atom factors + +This is the local interchange step of Steiner 2004, Lemma 5.10. +Uniqueness at the preceding decomposition level lifts the positive-table +lower factorization and identifies its two whiskered decompositions. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +theorem matching_of_unique_lower_faces {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r s : ℕ) (hsr : s ≤ r) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (u v : C) (U V : Cell K) (hu : F.toFun u = U) (hv : F.toFun v = V) + (hUV : U.face true s = V.face false s) : C.target s u = C.source s v := by + obtain ⟨_, _, huniq⟩ := hunique (U.face true s) + (B.aboveAtomOrZero_mono hsr _ (B.aboveAtomOrZero_face U true s)) + have hfu : F.toFun (C.target s u) = U.face true s := by + rw [F.map_face, hu] + rfl + have hfv : F.toFun (C.source s v) = U.face true s := by + rw [F.map_face, hv] + exact hUV.symm + exact (huniq _ hfu).trans (huniq _ hfv).symm + +theorem reflect_forward_whiskers {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {s r : ℕ} (hsr : s < r) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (y z u v : C) (hyz : C.target r y = C.source r z) + (huv : C.target s u = C.source s v) + (hy : B.AboveAtomOrZero r (F.toFun y)) (hz : B.AboveAtomOrZero r (F.toFun z)) + (he : F.toFun (C.comp s u v huv) = F.toFun (C.comp r y z hyz)) + (hupper : ∀ n, r < n → ∀ side, (F.toFun y).table side n = (F.toFun u).table side n) : + C.comp r y z hyz = C.comp s u v huv := by + have hh : F.toFun (C.comp r y z hyz) = F.toFun + (C.comp r (C.rightWhisker hsr u v huv false) (C.leftWhisker hsr u v huv true) + (C.whiskered_forward_matching hsr u v huv)) := + he.symm.trans (congrArg F.toFun (C.whiskered_forward_comp hsr u v huv)).symm + have hpair := B.reflect_binary_factors F r hunique y z _ _ hyz + (C.whiskered_forward_matching hsr u v huv) hy hz hh + (fun n hn side => (hupper n hn side).trans + (rightWhisker_table_above F hsr u v huv false n hn side).symm) + calc + C.comp r y z hyz = + C.comp r (C.rightWhisker hsr u v huv false) (C.leftWhisker hsr u v huv true) + (C.whiskered_forward_matching hsr u v huv) := by + congr 1 + · exact hpair.1 + · exact hpair.2 + _ = _ := C.whiskered_forward_comp hsr u v huv + +theorem reflect_reverse_whiskers {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) {s r : ℕ} (hsr : s < r) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (y z u v : C) (hyz : C.target r y = C.source r z) + (huv : C.target s u = C.source s v) + (hy : B.AboveAtomOrZero r (F.toFun y)) (hz : B.AboveAtomOrZero r (F.toFun z)) + (he : F.toFun (C.comp s u v huv) = F.toFun (C.comp r y z hyz)) + (hupper : ∀ n, r < n → ∀ side, (F.toFun y).table side n = (F.toFun v).table side n) : + C.comp r y z hyz = C.comp s u v huv := by + have hh : F.toFun (C.comp r y z hyz) = F.toFun + (C.comp r (C.leftWhisker hsr u v huv false) (C.rightWhisker hsr u v huv true) + (C.whiskered_reverse_matching hsr u v huv)) := + he.symm.trans (congrArg F.toFun (C.whiskered_reverse_comp hsr u v huv)).symm + have hpair := B.reflect_binary_factors F r hunique y z _ _ hyz + (C.whiskered_reverse_matching hsr u v huv) hy hz hh + (fun n hn side => (hupper n hn side).trans + (leftWhisker_table_above F hsr u v huv false n hn side).symm) + calc + C.comp r y z hyz = + C.comp r (C.leftWhisker hsr u v huv false) (C.rightWhisker hsr u v huv true) + (C.whiskered_reverse_matching hsr u v huv) := by + congr 1 + · exact hpair.1 + · exact hpair.2 + _ = _ := C.whiskered_reverse_comp hsr u v huv + +/-- A reverse-disjoint neighbouring pair may be exchanged without changing +its actual strict composite. Only preceding-level uniqueness is used. -/ +theorem adjacent_transpose {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (s : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero (s+1) X → ∃! x : C, F.toFun x = X) + {p q : ℕ} (a : B.Index p) (b : B.Index q) (hp : s+1 < p) (hq : s+1 < q) + (y z : C) (hyz : C.target (s+1) y = C.source (s+1) z) + (hy : ∀ n, s+1 < n → ∀ side, (F.toFun y).table side n = (B.atom p a).table side n) + (hz : ∀ n, s+1 < n → ∀ side, (F.toFun z).table side n = (B.atom q b).table side n) + (hdis : ∀ e, B.coordinates (s+1) ((B.atom p a).table true (s+1)) e = 0 ∨ + B.coordinates (s+1) ((B.atom q b).table false (s+1)) e = 0) : + ∃ (y' z' : C) (h : C.target (s+1) y' = C.source (s+1) z'), + C.comp (s+1) y' z' h = C.comp (s+1) y z hyz ∧ + (∀ n, s+1 < n → ∀ side, (F.toFun y').table side n = (B.atom q b).table side n) ∧ + (∀ n, s+1 < n → ∀ side, (F.toFun z').table side n = (B.atom p a).table side n) := by + have hfyz : (F.toFun y).face true (s+1) = (F.toFun z).face false (s+1) := + (F.map_face true (s+1) y).symm.trans + ((congrArg F.toFun hyz).trans (F.map_face false (s+1) z)) + obtain ⟨U, V, hUV, he, horder⟩ := + B.two_atom_lowering a b s hp hq (F.toFun y) (F.toFun z) hfyz hy hz hdis + have hU : B.AboveAtomOrZero (s+1) U := by + rcases horder with ⟨hU, _⟩ | ⟨hU, _⟩ + · exact Or.inr ⟨⟨p,a⟩, hp, hU⟩ + · exact Or.inr ⟨⟨q,b⟩, hq, hU⟩ + have hV : B.AboveAtomOrZero (s+1) V := by + rcases horder with ⟨_, hV⟩ | ⟨_, hV⟩ + · exact Or.inr ⟨⟨q,b⟩, hq, hV⟩ + · exact Or.inr ⟨⟨p,a⟩, hp, hV⟩ + obtain ⟨u, hu, _⟩ := hunique U hU + obtain ⟨v, hv, _⟩ := hunique V hV + have huv := B.matching_of_unique_lower_faces F (s+1) s (Nat.le_succ s) + hunique u v U V hu hv hUV + have hfuv : (F.toFun u).face true s = (F.toFun v).face false s := + (F.map_face true s u).symm.trans + ((congrArg F.toFun huv).trans (F.map_face false s v)) + have him : Cell.comp (F.toFun u) (F.toFun v) s hfuv = Cell.comp U V s hUV := by + congr 1 + have htotal : F.toFun (C.comp s u v huv) = F.toFun (C.comp (s+1) y z hyz) := + (F.map_comp s u v huv hfuv).trans + (him.trans (he.trans (F.map_comp (s+1) y z hyz hfyz).symm)) + have hylevel : B.AboveAtomOrZero (s+1) (F.toFun y) := Or.inr ⟨⟨p,a⟩, hp, hy⟩ + have hzlevel : B.AboveAtomOrZero (s+1) (F.toFun z) := Or.inr ⟨⟨q,b⟩, hq, hz⟩ + rcases horder with ⟨hUa, hVb⟩ | ⟨hUb, hVa⟩ + · have hsource := B.reflect_forward_whiskers F (Nat.lt_succ_self s) hunique + y z u v hyz huv hylevel hzlevel htotal (fun n hn side => + (hy n hn side).trans ((hUa n hn side).symm.trans + (congrArg (fun X : Cell K => X.table side n) hu).symm)) + refine ⟨C.leftWhisker (Nat.lt_succ_self s) u v huv false, + C.rightWhisker (Nat.lt_succ_self s) u v huv true, + C.whiskered_reverse_matching (Nat.lt_succ_self s) u v huv, + (C.whiskered_reverse_comp (Nat.lt_succ_self s) u v huv).trans hsource.symm, ?_, ?_⟩ + · intro n hn side + exact (leftWhisker_table_above F (Nat.lt_succ_self s) u v huv false n hn side).trans + ((congrArg (fun X : Cell K => X.table side n) hv).trans (hVb n hn side)) + · intro n hn side + exact (rightWhisker_table_above F (Nat.lt_succ_self s) u v huv true n hn side).trans + ((congrArg (fun X : Cell K => X.table side n) hu).trans (hUa n hn side)) + · have hsource := B.reflect_reverse_whiskers F (Nat.lt_succ_self s) hunique + y z u v hyz huv hylevel hzlevel htotal (fun n hn side => + (hy n hn side).trans ((hVa n hn side).symm.trans + (congrArg (fun X : Cell K => X.table side n) hv).symm)) + refine ⟨C.rightWhisker (Nat.lt_succ_self s) u v huv false, + C.leftWhisker (Nat.lt_succ_self s) u v huv true, + C.whiskered_forward_matching (Nat.lt_succ_self s) u v huv, + (C.whiskered_forward_comp (Nat.lt_succ_self s) u v huv).trans hsource.symm, ?_, ?_⟩ + · intro n hn side + exact (rightWhisker_table_above F (Nat.lt_succ_self s) u v huv false n hn side).trans + ((congrArg (fun X : Cell K => X.table side n) hu).trans (hUb n hn side)) + · intro n hn side + exact (leftWhisker_table_above F (Nat.lt_succ_self s) u v huv true n hn side).trans + ((congrArg (fun X : Cell K => X.table side n) hv).trans (hVa n hn side)) + +/-- The height order supplies the reverse disjointness condition. A degree +zero inversion is impossible by augmentation, so this applies uniformly +to every composition degree. -/ +theorem adjacent_transpose_of_height {C : StrictOmegaCategory.{0}} + (F : C ⟶ K.realization) (r : ℕ) + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + (a b : B.AtomIndex) (ha : r < a.1) (hb : r < b.1) + (hheight : B.atomHeight b ≤ B.atomHeight a) + (y z : C) (hyz : C.target r y = C.source r z) + (hy : ∀ n, r < n → ∀ side, (F.toFun y).table side n = (B.atomCell a).table side n) + (hz : ∀ n, r < n → ∀ side, (F.toFun z).table side n = (B.atomCell b).table side n) : + ∃ (y' z' : C) (h : C.target r y' = C.source r z'), + C.comp r y' z' h = C.comp r y z hyz ∧ + (∀ n, r < n → ∀ side, (F.toFun y').table side n = (B.atomCell b).table side n) ∧ + (∀ n, r < n → ∀ side, (F.toFun z').table side n = (B.atomCell a).table side n) := by + have hd : ∀ e, B.coordinates r ((B.atom a.1 a.2).table true r) e = 0 ∨ + B.coordinates r ((B.atom b.1 b.2).table false r) e = 0 := by + intro e + exact (B.disjoint b.2 a.2 hb ha hheight e).symm + cases r with + | zero => + have hmatch : (F.toFun y).face true 0 = (F.toFun z).face false 0 := + (F.map_face true 0 y).symm.trans + ((congrArg F.toFun hyz).trans (F.map_face false 0 z)) + have hp := B.two_atom_degree_positive a.2 b.2 0 ha hb (F.toFun y) (F.toFun z) + hmatch (hy 1 (by omega) false) (hz 1 (by omega) false) hd + omega + | succ s => + exact B.adjacent_transpose F s hunique a.2 b.2 ha hb y z hyz hy hz hd + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Actual strict composites with retained atom labels + +The labels record the upper tables of the actual source factors. This +relation is used only to normalize already constructed composites. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} (B : OrderedAtomBasis K) + +inductive AtomComposite {C : StrictOmegaCategory.{0}} (F : C ⟶ K.realization) (r : ℕ) : + List B.AtomIndex → C → Prop + | singleton (a : B.AtomIndex) (x : C) (ha : r < a.1) + (hx : ∀ n, r < n → ∀ side, (F.toFun x).table side n = (B.atomCell a).table side n) : + AtomComposite F r [a] x + | cons (a : B.AtomIndex) (x : C) {as : List B.AtomIndex} {y : C} + (ha : r < a.1) + (hx : ∀ n, r < n → ∀ side, (F.toFun x).table side n = (B.atomCell a).table side n) + (tail : AtomComposite F r as y) (hxy : C.target r x = C.source r y) : + AtomComposite F r (a :: as) (C.comp r x y hxy) + +namespace AtomComposite + +variable {B} {C : StrictOmegaCategory.{0}} {F : C ⟶ K.realization} {r : ℕ} + +theorem nonempty {as : List B.AtomIndex} {x : C} (h : B.AtomComposite F r as x) : as ≠ [] := by + cases h <;> simp + +theorem degree {as : List B.AtomIndex} {x : C} (h : B.AtomComposite F r as x) : + ∀ a ∈ as, r < a.1 := by + induction h with + | singleton a x ha hx => simpa only [List.mem_singleton] using + (fun b (hb : b = a) => hb.symm ▸ ha) + | cons a x ha hx tail hxy ih => + intro b hb + rcases List.mem_cons.mp hb with rfl | hb + · exact ha + · exact ih b hb + +theorem to_compositeList {as : List B.AtomIndex} {x : C} (h : B.AtomComposite F r as x) : + ∃ xs : List C, CompositeList C r xs x ∧ + List.Forall₂ (fun a (y : C) => ∀ n, r < n → ∀ side, + (F.toFun y).table side n = (B.atomCell a).table side n) as xs := by + induction h with + | singleton a x ha hx => exact ⟨[x], .singleton x, .cons hx .nil⟩ + | cons a x ha hx tail hxy ih => + obtain ⟨xs, hxs, hrel⟩ := ih + exact ⟨x :: xs, .cons x hxs hxy, .cons hx hrel⟩ + +theorem of_compositeList {xs : List C} {x : C} (h : CompositeList C r xs x) + (hatoms : ∀ y ∈ xs, ∃ a : B.AtomIndex, r < a.1 ∧ + ∀ n, r < n → ∀ side, (F.toFun y).table side n = (B.atomCell a).table side n) : + ∃ as, B.AtomComposite F r as x := by + induction h with + | singleton x => + obtain ⟨a, ha, hx⟩ := hatoms x (by simp) + exact ⟨[a], .singleton a x ha hx⟩ + | @cons x xs y hy hxy ih => + obtain ⟨a, ha, hx⟩ := hatoms x (by simp) + obtain ⟨as, has⟩ := ih (fun z hz => hatoms z (by simp [hz])) + exact ⟨a :: as, .cons a x ha hx has hxy⟩ + +theorem upper_sum {as : List B.AtomIndex} {x : C} (h : B.AtomComposite F r as x) + (n : ℕ) (hn : r < n) (side : Bool) : + (F.toFun x).table side n = (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n := by + obtain ⟨xs, hxs, hrel⟩ := h.to_compositeList + have hr : List.Forall₂ (fun a (Y : Cell K) => + ∀ n, r < n → ∀ side, Y.table side n = (B.atomCell a).table side n) + as (xs.map F.toFun) := List.forall₂_map_right_iff.mpr hrel + have hs : (as.map (fun a => (B.atomCell a).table side n)).sum = + (Cell.PositiveTable.ofCells (as.map B.atomCell)).table side n := by + simp only [Cell.PositiveTable.ofCells_table, List.map_map, Function.comp_def] + exact (Cell.compositeList_table (hxs.map F) n hn side).trans + ((B.related_table_sum r hr n hn side).trans hs) + +end AtomComposite +end Thomason.Construction.DirectedComplex.OrderedAtomBasis + +end + +section + +/-! # Sorting the labels of an actual strict factorization + +Adjacent interchange moves a height-minimal chosen label to the front. +Repeating this operation realizes any prescribed height-sorted permutation +without changing the actual source cell. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis.AtomComposite + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} {B : OrderedAtomBasis K} +variable {C : StrictOmegaCategory.{0}} {F : C ⟶ K.realization} {r : ℕ} + +theorem swap_first + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {a b : B.AtomIndex} {as : List B.AtomIndex} {X : C} + (h : B.AtomComposite F r (a :: b :: as) X) + (hheight : B.atomHeight b ≤ B.atomHeight a) : + B.AtomComposite F r (b :: a :: as) X := by + cases h with + | @cons a x bs y ha hx tail hxy => + cases tail with + | singleton b y hb hy => + obtain ⟨u, v, huv, he, hu, hv⟩ := + B.adjacent_transpose_of_height F r hunique a b ha hb hheight x y hxy hx hy + exact he ▸ AtomComposite.cons b u hb hu (.singleton a v ha hv) huv + | @cons b y as z hb hy tail hyz => + have hab : C.target r x = C.source r y := hxy.trans (C.source_comp r y z hyz) + obtain ⟨u, v, huv, he, hu, hv⟩ := + B.adjacent_transpose_of_height F r hunique a b ha hb hheight x y hab hx hy + have hvz : C.target r v = C.source r z := + (C.target_comp r u v huv).symm.trans + ((congrArg (C.target r) he).trans ((C.target_comp r x y hab).trans hyz)) + have hleft : C.target r (C.comp r u v huv) = C.source r z := + (C.target_comp r u v huv).trans hvz + have hright : C.target r u = C.source r (C.comp r v z hvz) := + huv.trans (C.source_comp r v z hvz).symm + have hold : C.target r (C.comp r x y hab) = C.source r z := + (C.target_comp r x y hab).trans hyz + have heq : C.comp r u (C.comp r v z hvz) hright = + C.comp r x (C.comp r y z hyz) hxy := by + calc + _ = C.comp r (C.comp r u v huv) z hleft := + (C.assoc r u v z huv hvz hleft hright).symm + _ = C.comp r (C.comp r x y hab) z hold := by congr 1 + _ = _ := C.assoc r x y z hab hyz hold hxy + exact heq ▸ AtomComposite.cons b u hb hu (.cons a v ha hv tail hvz) hright + +theorem move_minimal_first + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {as : List B.AtomIndex} {X : C} (h : B.AtomComposite F r as X) + (a : B.AtomIndex) (ha : a ∈ as) + (hmin : ∀ b ∈ as, B.atomHeight a ≤ B.atomHeight b) : + ∃ bs, B.AtomComposite F r (a :: bs) X ∧ (a :: bs).Perm as := by + induction h generalizing a with + | singleton b x hb hx => + have hab : a = b := List.mem_singleton.mp ha + subst a + exact ⟨[], .singleton b x hb hx, .refl _⟩ + | @cons b x bs y hb hx tail hxy ih => + by_cases hab : a = b + · subst a + exact ⟨bs, .cons b x hb hx tail hxy, .refl _⟩ + · have hat : a ∈ bs := (List.mem_cons.mp ha).resolve_left hab + obtain ⟨cs, hc, hp⟩ := ih a hat (fun d hd => hmin d (List.mem_cons_of_mem b hd)) + have hs := swap_first hunique (AtomComposite.cons b x hb hx hc hxy) + (hmin b (List.mem_cons_self)) + exact ⟨b :: cs, hs, (List.Perm.swap b a cs).trans (hp.cons b)⟩ + +theorem of_sorted_perm + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {as bs : List B.AtomIndex} {X : C} (h : B.AtomComposite F r as X) + (hp : as.Perm bs) (hs : bs.Pairwise (fun a b => B.atomHeight a ≤ B.atomHeight b)) : + B.AtomComposite F r bs X := by + induction bs generalizing as X with + | nil => + have ha : as = [] := List.perm_nil.mp hp + exact (h.nonempty ha).elim + | cons b bs ih => + have hb : b ∈ as := hp.mem_iff.mpr List.mem_cons_self + have hmin : ∀ a ∈ as, B.atomHeight b ≤ B.atomHeight a := by + intro a ha + rcases List.mem_cons.mp (hp.mem_iff.mp ha) with rfl | ha + · exact le_rfl + · exact (List.pairwise_cons.mp hs).1 a ha + obtain ⟨cs, hc, hp'⟩ := move_minimal_first hunique h b hb hmin + have hperm : cs.Perm bs := (hp'.trans hp).cons_inv + cases hc with + | singleton b x hb hx => + have hbs : bs = [] := List.perm_nil.mp hperm.symm + subst bs + exact .singleton b _ hb hx + | @cons b x cs y hb hx tail hxy => + exact .cons b x hb hx (ih tail hperm (List.pairwise_cons.mp hs).2) hxy + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis.AtomComposite + +end + +section + +/-! # A fixed ordered atom string has a unique lift + +Binary positive-table factor uniqueness identifies the two image factors. +Preceding-level uniqueness identifies the first source factor, and induction +identifies the remaining string. +-/ + +namespace Thomason.Construction.DirectedComplex.OrderedAtomBasis.AtomComposite + +open CategoryTheory StrictOmegaCategory + +variable {K : DirectedComplex.{0}} {B : OrderedAtomBasis K} +variable {C : StrictOmegaCategory.{0}} {F : C ⟶ K.realization} {r : ℕ} + +theorem total_unique + (hunique : ∀ X, B.AboveAtomOrZero r X → ∃! x : C, F.toFun x = X) + {as : List B.AtomIndex} {x y : C} + (hx : B.AtomComposite F r as x) (hy : B.AtomComposite F r as y) + (he : F.toFun x = F.toFun y) : x = y := by + induction hx generalizing y with + | singleton a x ha hx => + obtain ⟨_, _, hu⟩ := hunique (F.toFun x) (Or.inr ⟨a, ha, hx⟩) + exact (hu x rfl).trans (hu y he.symm).symm + | @cons a x as z ha hx tail hxz ih => + cases hy with + | singleton a y ha' hy => exact (tail.nonempty rfl).elim + | @cons a y as w ha' hy tail' hyw => + have hfxz : (F.toFun x).face true r = (F.toFun z).face false r := + (F.map_face true r x).symm.trans + ((congrArg F.toFun hxz).trans (F.map_face false r z)) + have hfyw : (F.toFun y).face true r = (F.toFun w).face false r := + (F.map_face true r y).symm.trans + ((congrArg F.toFun hyw).trans (F.map_face false r w)) + have htot : Cell.comp (F.toFun x) (F.toFun z) r hfxz = + Cell.comp (F.toFun y) (F.toFun w) r hfyw := + (F.map_comp r x z hxz hfxz).symm.trans (he.trans (F.map_comp r y w hyw hfyw)) + have hparts := Cell.factors_unique_of_above _ _ _ _ r hfxz hfyw htot + (fun n hn side => (hx n hn side).trans (hy n hn side).symm) + obtain ⟨_, _, hu⟩ := hunique (F.toFun x) (Or.inr ⟨a, ha, hx⟩) + have hxy : x = y := (hu x rfl).trans (hu y hparts.1.symm).symm + have hzw : z = w := ih tail' hparts.2 + subst y + subst w + rfl + +end Thomason.Construction.DirectedComplex.OrderedAtomBasis.AtomComposite + +end + +section + +/-! # The actual interval cylinder and path-space adjunction + +Only the interval needed for realization and Gray-prism homotopies is used. +Its cylinder preserves colimits by an explicit compact-open adjunction. +-/ + +namespace Thomason.Construction.TopologicalInterval + +open CategoryTheory CategoryTheory.Limits + +universe u + +/-- Product with the ordinary unit interval. -/ +def cylinder : TopCat.{u} ⥤ TopCat.{u} where + obj X := TopCat.of (X × unitInterval) + map f := TopCat.ofHom ⟨fun p => (f.hom p.1, p.2), by fun_prop⟩ + +/-- Paths with the compact-open topology. -/ +def pathSpace : TopCat.{u} ⥤ TopCat.{u} where + obj X := TopCat.of C(unitInterval, X) + map f := TopCat.ofHom ⟨fun p => f.hom.comp p, ContinuousMap.continuous_postcomp f.hom⟩ + +/-- Currying and uncurrying are inverse on actual continuous maps. -/ +def homEquiv (X Y : TopCat.{u}) : (cylinder.obj X ⟶ Y) ≃ (X ⟶ pathSpace.obj Y) where + toFun f := TopCat.ofHom f.hom.curry + invFun f := TopCat.ofHom f.hom.uncurry + left_inv f := by apply TopCat.hom_ext; apply ContinuousMap.ext; intro p; rfl + right_inv f := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + apply ContinuousMap.ext + intro t + rfl + +/-- The interval cylinder is left adjoint to compact-open paths. -/ +def adjunction : cylinder.{u} ⊣ pathSpace := + Adjunction.mkOfHomEquiv { + homEquiv := homEquiv + homEquiv_naturality_left_symm := by + intro X' X Y f g + apply TopCat.hom_ext + apply ContinuousMap.ext + intro p + rfl + homEquiv_naturality_right := by + intro X Y Y' f g + apply TopCat.hom_ext + apply ContinuousMap.ext + intro x + apply ContinuousMap.ext + intro t + rfl } + +instance : cylinder.{u}.IsLeftAdjoint := adjunction.isLeftAdjoint + +instance : PreservesColimitsOfSize.{0,0} cylinder.{u} := + adjunction.leftAdjoint_preservesColimits + +/-- The section at a chosen interval point. -/ +def sectionAt (X : TopCat.{u}) (t : unitInterval) : X ⟶ cylinder.obj X := + TopCat.ofHom ⟨fun x => (x, t), by fun_prop⟩ + +/-- The cylinder projection. -/ +def projection (X : TopCat.{u}) : cylinder.obj X ⟶ X := + TopCat.ofHom ⟨Prod.fst, by fun_prop⟩ + +@[simp] +theorem section_projection (X : TopCat.{u}) (t : unitInterval) : + sectionAt X t ≫ projection X = 𝟙 X := rfl + +/-- A straight-line deformation to the section, stationary on that section. -/ +noncomputable def sectionDeformation (X : TopCat.{u}) (t : unitInterval) : + ((sectionAt X t).hom.comp (projection X).hom).HomotopyRel + (ContinuousMap.id (X × unitInterval)) (Set.range (sectionAt X t).hom) where + toFun p := (p.2.1, ⟨(1 - (p.1 : ℝ)) * t + p.1 * p.2.2, + by + have hs := p.1.property + have ht := t.property + have hz := p.2.2.property + constructor + · exact add_nonneg (mul_nonneg (sub_nonneg.mpr hs.2) ht.1) + (mul_nonneg hs.1 hz.1) + · nlinarith [mul_nonneg (sub_nonneg.mpr hs.2) (sub_nonneg.mpr ht.2), + mul_nonneg hs.1 (sub_nonneg.mpr hz.2)]⟩) + continuous_toFun := by fun_prop + map_zero_left p := by + apply Prod.ext + · rfl + · apply Subtype.ext + change (1 - (0 : ℝ)) * t + 0 * p.2 = (t : ℝ) + ring + map_one_left p := by + apply Prod.ext + · rfl + · apply Subtype.ext + change (1 - (1 : ℝ)) * t + 1 * p.2 = (p.2 : ℝ) + ring + prop' s p hp := by + obtain ⟨x, rfl⟩ := hp + apply Prod.ext + · rfl + · apply Subtype.ext + change (1 - (s : ℝ)) * t + s * t = (t : ℝ) + ring + +/-- Every cylinder section satisfies the actual weak-equivalence definition. -/ +theorem section_weak (X : TopCat.{u}) (t : unitInterval) : + topologicalWeakEquivalences (sectionAt X t) := + weakEquivalence_of_strongDeformationRetract _ _ rfl (sectionDeformation X t) + +/-- The cylinder projection is weak at every source basepoint. -/ +theorem projection_weak (X : TopCat.{u}) : topologicalWeakEquivalences (projection X) := by + constructor + · have hs := (section_weak X 0).1 + apply (hs.of_comp_iff _).mp + rw [← HomotopyMaps.componentsMap_comp] + exact IsWeakHomotopyEquivalence.id.1 + · intro n p + rcases p with ⟨x, t⟩ + have hs := (section_weak X t).2 n x + apply (hs.of_comp_iff _).mp + have hcomp := HomotopyMaps.groupMap_comp (sectionAt X t).hom (projection X).hom (n+1) x + have hid : Function.Bijective (HomotopyMaps.groupMap + ((projection X).hom.comp (sectionAt X t).hom) (n+1) x) := + IsWeakHomotopyEquivalence.id.2 n x + exact hcomp ▸ hid + +end Thomason.Construction.TopologicalInterval + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeAtoms.lean b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeAtoms.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d54d3f1fad9192cc1bae77a2987dcbbc7b2762e --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeAtoms.lean @@ -0,0 +1,939 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeUniversal +import OAI.CategoryTheory.Thomason.Gray.PosetPrismEndpoints +import OAI.CategoryTheory.Thomason.Gray.PrismSimplexNaturality +import OAI.CategoryTheory.Thomason.Gray.RightCylinderPrism +import OAI.CategoryTheory.Thomason.Simplicial.SimplicialSpanFactorization +import OAI.CategoryTheory.Thomason.Strict.OrientalFiniteCells +import Mathlib.AlgebraicTopology.SimplicialSet.TopAdj + +namespace OAI + +section + +/-! # Street homotopies from concrete positive-chain cylinders + +No global Gray functor or adjunction is needed here: the chain map of each +actual Street simplex is extracted from the normalized oriental presentation. +The construction uses composition generation of the simplex atoms. +-/ + +namespace Thomason.Construction.SimplexAtomsInput + +open CategoryTheory Opposite MonoidalCategory CartesianMonoidalCategory +open _root_.OAI.Thomason.Construction.DirectedComplex SimplexComplex +open scoped Simplicial + +noncomputable section + +variable {h : NormalizedSimplexIdentities} (a : SimplexAtomsInput h) + +/-- Typed form of the explicit normalized AW map. -/ +abbrev normalizedAWMap (h : NormalizedSimplexIdentities) {m : ℕ} + (θ : Fin (m+1) →o Fin 2) : + directedComplex m (h.squared m) ⟶ rightCylinder (directedComplex m (h.squared m)) := + (alexanderWhitneyInput h).chainMap θ + +abbrev simplexChainMap (h : NormalizedSimplexIdentities) {l m : ℕ} + (f : Fin (l+1) →o Fin (m+1)) : + directedComplex l (h.squared l) ⟶ directedComplex m (h.squared m) := + directedMap (h.squared l) (h.squared m) f (h.naturality f) + +abbrev chainCylinderMap {K L : DirectedComplex.{0}} (f : K ⟶ L) : + rightCylinder K ⟶ rightCylinder L := RightCylinder.map f + +abbrev chainEndpoint (K : DirectedComplex.{0}) (side : Bool) : + K ⟶ rightCylinder K := RightCylinder.endpoint K side + +abbrev chainProjection (K : DirectedComplex.{0}) : rightCylinder K ⟶ K := + RightCylinder.projection K + +/-- The concrete AW map, viewed before strict realization, is natural. -/ +theorem aw_naturality {l m : ℕ} (f : Fin (l+1) →o Fin (m+1)) + (θ : Fin (m+1) →o Fin 2) : + simplexChainMap h f ≫ + (normalizedAWMap h θ) = + (normalizedAWMap h (θ.comp f)) ≫ + chainCylinderMap (simplexChainMap h f) := by + apply DirectedComplex.Hom.ext_app + intro n x + exact ((alexanderWhitneyInput h).naturality f θ n x).symm + +/-- An actual simplicial cylinder map for the realization of every directed +complex. Its simplices are positive chain maps, including degenerate ones. -/ +def chainNerveCylinder (K : DirectedComplex.{0}) : + h.streetNerve.obj K.realization ⊗ Δ[1] ⟶ + h.streetNerve.obj (rightCylinder K).realization where + app m := ↾fun x => + ((normalizedAWMap h + (SSet.stdSimplex.objEquiv x.2).toOrderHom) ≫ + chainCylinderMap (a.chainOfSimplex x.1)).realization + naturality m n f := by + ext x + change (h.object m.unop.len ⟶ K.realization) × (Δ[1].obj m) at x + rcases x with ⟨F, θ⟩ + let u := simplexChainMap h f.unop.toOrderHom + let t := (SSet.stdSimplex.objEquiv θ).toOrderHom + change ((normalizedAWMap h (t.comp f.unop.toOrderHom)) ≫ + chainCylinderMap (a.chainOfSimplex (h.map f.unop.toOrderHom ≫ F))).realization = + h.map f.unop.toOrderHom ≫ + ((normalizedAWMap h t) ≫ + chainCylinderMap (a.chainOfSimplex F)).realization + rw [a.chainOfSimplex_precomp] + have he : (normalizedAWMap h (t.comp f.unop.toOrderHom)) ≫ + chainCylinderMap (u ≫ a.chainOfSimplex F) = + u ≫ ((normalizedAWMap h t) ≫ + chainCylinderMap (a.chainOfSimplex F)) := by + rw [show chainCylinderMap (u ≫ a.chainOfSimplex F) = + chainCylinderMap u ≫ chainCylinderMap (a.chainOfSimplex F) from + rightCylinderFunctor.map_comp u (a.chainOfSimplex F)] + rw [← Category.assoc, ← aw_naturality f.unop.toOrderHom t, Category.assoc] + exact congrArg Hom.realization he + +/-- The simplicial cylinder has the two actual strict chain endpoints. -/ +theorem chainNerveCylinder_endpoint (K : DirectedComplex.{0}) (side : Bool) : + (if side then SSet.ι₁ else SSet.ι₀) ≫ a.chainNerveCylinder K = + h.streetNerve.map (chainEndpoint K side).realization := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro F + change h.object m.unop.len ⟶ K.realization at F + have he : normalizedAWMap h + (OrderHom.const _ (if side then 1 else 0)) ≫ + chainCylinderMap (a.chainOfSimplex F) = + a.chainOfSimplex F ≫ chainEndpoint K side := by + apply DirectedComplex.Hom.ext_app + intro p x + change (chainCylinderMap (a.chainOfSimplex F)).app p + ((normalizedAWMap h + (OrderHom.const _ (if side then 1 else 0))).app p x) = _ + rw [(alexanderWhitneyInput h).chainMap_const] + exact RightCylinder.map_endpoint (a.chainOfSimplex F) side p x + have hr : (normalizedAWMap h + (OrderHom.const _ (if side then 1 else 0)) ≫ + chainCylinderMap (a.chainOfSimplex F)).realization = + F ≫ (chainEndpoint K side).realization := by + rw [he] + change StrictOmegaCategory.Hom.comp (a.chainOfSimplex F).realization + (chainEndpoint K side).realization = _ + rw [a.chainOfSimplex_realization] + rfl + cases side <;> exact hr + +/-- The concrete chain projection is the simplicial cylinder projection. -/ +theorem chainNerveCylinder_projection (K : DirectedComplex.{0}) : + a.chainNerveCylinder K ≫ h.streetNerve.map (chainProjection K).realization = + fst (h.streetNerve.obj K.realization) Δ[1] := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + change (h.object m.unop.len ⟶ K.realization) × (Δ[1].obj m) at x + rcases x with ⟨F, θ⟩ + let t := (SSet.stdSimplex.objEquiv θ).toOrderHom + let q := a.chainOfSimplex F + have he : normalizedAWMap h t ≫ + chainCylinderMap q ≫ chainProjection K = q := by + apply DirectedComplex.Hom.ext_app + intro p z + exact (RightCylinder.projection_map q p + ((normalizedAWMap h t).app p z)).trans + (congrArg (q.app p) ((alexanderWhitneyInput h).projection_chainMap t p z)) + change (normalizedAWMap h t ≫ + chainCylinderMap q ≫ chainProjection K).realization = F + exact (congrArg Hom.realization he).trans (a.chainOfSimplex_realization F) + +/-- Every strict map from the concrete chain cylinder determines an actual +homotopy of Street nerves, with no Gray model-structure premise. -/ +def chainNerveHomotopy {K : DirectedComplex.{0}} {Y : StrictOmegaCategory.{0}} + (P : (rightCylinder K).realization ⟶ Y) : + SSet.Homotopy (h.streetNerve.map ((RightCylinder.endpoint K false).realization ≫ P)) + (h.streetNerve.map ((RightCylinder.endpoint K true).realization ≫ P)) where + h := a.chainNerveCylinder K ≫ h.streetNerve.map P + h₀ := by + have he := a.chainNerveCylinder_endpoint K false + change SSet.ι₀ ≫ a.chainNerveCylinder K = _ at he + rw [← Category.assoc, he] + exact (h.streetNerve.map_comp _ _).symm + h₁ := by + have he := a.chainNerveCylinder_endpoint K true + change SSet.ι₁ ≫ a.chainNerveCylinder K = _ at he + rw [← Category.assoc, he] + exact (h.streetNerve.map_comp _ _).symm + rel := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + change ((⊥ : (h.streetNerve.obj K.realization).Subcomplex).toSSet.obj m) × + (Δ[1].obj m) at x + exact False.elim x.1.property + +end + +end Thomason.Construction.SimplexAtomsInput + +end + +section + +/-! # Barycentric mass merged at a degenerate prism cut + +An ordinal map can identify several source vertices with the cut vertex. +Their lower-side mass is exactly the correction to the target cut coordinate. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +/-- Source mass before the cut that is identified with the cut vertex. -/ +def lowerFiberMass {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) : ℝ := + ∑ i : Fin (m+1), if i < j ∧ f i = f j then x.weights i else 0 + +/-- Cumulative source mass separates into strict target mass and merged cut mass. -/ +theorem cumulative_map_decomposition {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) : + cumulative x j.val = cumulative (StdSimplex.map f x) (f j).val + lowerFiberMass f x j := by + rw [cumulative_map] + unfold cumulative lowerFiberMass + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i hi + change (if i < j then x.weights i else 0) = + (if f i < f j then x.weights i else 0) + + (if i < j ∧ f i = f j then x.weights i else 0) + by_cases hij : i < j + · have hfi := f.monotone hij.le + by_cases he : f i = f j + · simp only [he, lt_self_iff_false, ite_false, hij, and_self, ite_true, zero_add] + · have hlt : f i < f j := lt_of_le_of_ne hfi he + simp only [hlt, ite_true, hij, he, and_false, ite_false, add_zero] + · have hfi := f.monotone (le_of_not_gt hij) + have hnot : ¬ f i < f j := not_lt_of_ge hfi + simp only [hnot, ite_false, hij, false_and, zero_add] + +/-- The target cut coordinate includes precisely the mass merged from below. -/ +theorem cutMass_map {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (j : Fin (m+1)) (p : StdSimplex ℝ (Fin (m+1)) × unitInterval) : + cutMass (f j) (StdSimplex.map f p.1, p.2) = cutMass j p + lowerFiberMass f p.1 j := by + have h := cumulative_map_decomposition f p.1 j + unfold cutMass + dsimp only + linarith + +/-- On an original vertex, the prism ordinal map selects the correct copy. -/ +theorem prismOrdinal_succAbove {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (j i : Fin (m+1)) : + prismOrdinal f j (j.castSucc.succAbove i) = + if i < j then (f i).castSucc else (f i).succ := by + rw [prismOrdinal_apply, Fin.predAbove_succAbove] + by_cases hi : i < j + · rw [Fin.succAbove_castSucc_of_lt _ _ hi] + have hle : i.castSucc ≤ j.castSucc := Fin.castSucc_le_castSucc_iff.mpr hi.le + simp only [hle, ite_true, hi] + · have hj : j ≤ i := le_of_not_gt hi + rw [Fin.succAbove_castSucc_of_le _ _ hj] + have hn : ¬ i.succ ≤ j.castSucc := by + change ¬ i.val+1 ≤ j.val + have hv : j.val ≤ i.val := hj + omega + simp only [hn, ite_false, hi] + +@[simp] +theorem prismOrdinal_lower {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) : + prismOrdinal f j j.castSucc = (f j).castSucc := by + simp only [prismOrdinal_apply, le_rfl, ite_true, Fin.predAbove_castSucc_self] + +@[simp] +theorem prismOrdinal_upper {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j : Fin (m+1)) : + prismOrdinal f j j.succ = (f j).succ := by + have hn : ¬ j.succ ≤ j.castSucc := by + change ¬ j.val+1 ≤ j.val + omega + simp only [prismOrdinal_apply, hn, ite_false, Fin.predAbove_succ_self] + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Naturality of barycentric prism splitting + +The lower-side mass merged by an ordinal map corrects both copies of the +cut vertex. Thus the actual barycentric charts commute with degeneracies +as well as faces. +-/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- The image of an original vertex under the cut prism map. -/ +def sideMap {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) (j i : Fin (m+1)) : + Fin (n+2) := if i < j then (f i).castSucc else (f i).succ + +/-- Only vertices merged with the cut require a correction. -/ +theorem sideMap_single {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (j i : Fin (m+1)) (a : ℝ) : + Finsupp.single (sideMap f j i) a = + Finsupp.single ((f j).castSucc.succAbove (f i)) a + + Finsupp.single (f j).castSucc (if i < j ∧ f i = f j then a else 0) - + Finsupp.single (f j).succ (if i < j ∧ f i = f j then a else 0) := by + by_cases hi : i < j + · by_cases he : f i = f j + · simp only [sideMap, hi, ite_true, he, and_self, + Fin.succAbove_castSucc_of_le _ _ le_rfl] + abel + · have hlt : f i < f j := lt_of_le_of_ne (f.monotone hi.le) he + simp only [sideMap, hi, ite_true, he, and_false, ite_false, + Fin.succAbove_castSucc_of_lt _ _ hlt, Finsupp.single_zero, add_zero, sub_zero] + · have hle : f j ≤ f i := f.monotone (le_of_not_gt hi) + simp only [sideMap, hi, ite_false, false_and, + Fin.succAbove_castSucc_of_le _ _ hle, Finsupp.single_zero, add_zero, sub_zero] + +/-- Summing the vertex correction gives the merged lower mass. -/ +theorem sideMap_weights {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) : + x.weights.mapDomain (sideMap f j) = + (x.weights.mapDomain f).mapDomain (f j).castSucc.succAbove + + Finsupp.single (f j).castSucc (lowerFiberMass f x j) - + Finsupp.single (f j).succ (lowerFiberMass f x j) := by + rw [← Finsupp.mapDomain_comp] + simp only [Finsupp.mapDomain_fintype] + simp_rw [sideMap_single] + rw [Finset.sum_sub_distrib, Finset.sum_add_distrib] + congr 2 + · exact (map_sum (Finsupp.singleAddHom (f j).castSucc) _ _).symm + · exact (map_sum (Finsupp.singleAddHom (f j).succ) _ _).symm + +/-- Splitting and mapping commute, with exactly the merged cut mass. -/ +theorem splitWeights_map {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (x : StdSimplex ℝ (Fin (m+1))) (j : Fin (m+1)) (a : ℝ) : + (splitWeights x j a).mapDomain (prismOrdinal f j) = + splitWeights (StdSimplex.map f x) (f j) (a + lowerFiberMass f x j) := by + unfold splitWeights remainder + rw [Finsupp.mapDomain_add, Finsupp.mapDomain_single, prismOrdinal_lower, + ← Finsupp.mapDomain_comp] + have hs : (prismOrdinal f j) ∘ j.castSucc.succAbove = sideMap f j := by + funext i + exact prismOrdinal_succAbove f j i + rw [hs, Finsupp.mapDomain_sub, Finsupp.mapDomain_single] + have hj : sideMap f j j = (f j).succ := by simp [sideMap] + rw [hj, sideMap_weights] + change _ = Finsupp.single (f j).castSucc (a + lowerFiberMass f x j) + + (x.weights.mapDomain f - Finsupp.single (f j) (a + lowerFiberMass f x j)).mapDomain + (f j).castSucc.succAbove + rw [Finsupp.mapDomain_sub, Finsupp.mapDomain_single, + Fin.succAbove_castSucc_of_le _ _ le_rfl, Finsupp.single_add, Finsupp.single_add] + abel + +/-- Full chart naturality, valid for every ordinal map. -/ +theorem chart_naturality {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (j : Fin (m+1)) (p : region j) : + StdSimplex.map (prismOrdinal f j) (chart j p) = + chart (f j) ⟨(StdSimplex.map f p.val.1, p.val.2), region_map f j p⟩ := by + apply StdSimplex.ext + change (splitWeights p.val.1 j (cutMass j p.val)).mapDomain (prismOrdinal f j) = + splitWeights (StdSimplex.map f p.val.1) (f j) + (cutMass (f j) (StdSimplex.map f p.val.1, p.val.2)) + rw [splitWeights_map, cutMass_map] + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Naturality of the actual standard realization prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +/-- Naturality on each closed barycentric chart. -/ +theorem realizedChart_naturality {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (j : Fin (m+1)) (p : region j) : + (SSet.toTop.map (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1])).hom + (realizedChart j p) = + realizedChart (f j) ⟨(StdSimplex.map f p.val.1, p.val.2), region_map f j p⟩ := by + have hn := congrArg (fun g => g.hom (ULift.up (chart j p))) + (RealizationPrism.leg_naturality + (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1]) (simplexIndex j)) + have hf := congrArg (fun g => g.hom (ULift.up (chart j p))) + ((RealizationPrism.cocone (prism n)).w (simplexNaturality f j)) + change _ = _ at hn + change (RealizationPrism.leg (prism n) (simplexIndex (f j))).hom + (ULift.up (StdSimplex.map (prismOrdinal f j) (chart j p))) = _ at hf + exact hn.trans (hf.symm.trans (congrArg + (fun x => (RealizationPrism.leg (prism n) (simplexIndex (f j))).hom (ULift.up x)) + (chart_naturality f j p))) + +/-- The glued standard prism is natural under every face and degeneracy. -/ +theorem standardPrism_naturality {m n : ℕ} (f : Fin (m+1) →o Fin (n+1)) + (p : StdSimplex ℝ (Fin (m+1)) × unitInterval) : + (SSet.toTop.map (SSet.stdSimplex.map (SimplexCategory.Hom.mk f) ▷ Δ[1])).hom + (standardPrism m p) = standardPrism n (StdSimplex.map f p.1, p.2) := by + have hp : p ∈ ⋃ j : Fin (m+1), region j := by rw [region_cover]; trivial + obtain ⟨j, hj⟩ := Set.mem_iUnion.mp hp + rw [standardPrism_on_region j p hj, + standardPrism_on_region (f j) _ (region_map f j ⟨p, hj⟩)] + exact realizedChart_naturality f j ⟨p, hj⟩ + +/-- Naturality in the exact simplex convention of the realization colimit. -/ +theorem liftedStandardPrism_naturality {m n : SimplexCategory} (f : m ⟶ n) : + TopologicalInterval.cylinder.map (SimplexCategory.toTop.{0}.map f) ≫ + liftedStandardPrism n.len = + liftedStandardPrism m.len ≫ SSet.toTop.map (SSet.stdSimplex.map f ▷ Δ[1]) := by + apply TopCat.hom_ext + apply ContinuousMap.ext + intro p + exact (standardPrism_naturality f.toOrderHom (p.1.down, p.2)).symm + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The time coordinate of the actual realization prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +/-- On a zero-dimensional base the barycentric chart has exactly its given time. -/ +theorem chart_zero_time (p : region (0 : Fin 1)) : + StdSimplex.homeomorphI (chart 0 p) = p.val.2 := by + apply Subtype.ext + rw [StdSimplex.homeomorphI_apply_coe] + change splitWeights p.val.1 0 (cutMass 0 p.val) 1 = _ + simp [splitWeights, remainder, cutMass, Finsupp.mapDomain_fintype] + +/-- The ordinal map recording which side of the prism cut a vertex lies on. -/ +def timeOrdinal {n : ℕ} (j : Fin (n+1)) : Fin (n+2) →o Fin 2 := + prismOrdinal (OrderHom.const _ (0 : Fin 1)) j + +/-- Collapsing the base of a barycentric prism preserves its time coordinate. -/ +theorem chart_time {n : ℕ} (j : Fin (n+1)) (p : region j) : + StdSimplex.homeomorphI (StdSimplex.map (timeOrdinal j) (chart j p)) = p.val.2 := by + unfold timeOrdinal + rw [chart_naturality] + exact chart_zero_time _ + +/-- The second simplicial projection records the time ordinal of each chart. -/ +def secondProjectionMap {n : ℕ} (j : Fin (n+1)) : + (CostructuredArrow.map (snd (Δ[n] : SSet.{0}) Δ[1])).obj (simplexIndex j) ⟶ + baseIndex 1 := + CostructuredArrow.homMk (SimplexCategory.Hom.mk (timeOrdinal j)) (by + change SSet.stdSimplex.map _ ≫ 𝟙 _ = + SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j).val ≫ snd _ _ + rw [Category.comp_id] + apply SSet.yonedaEquiv.injective + rw [SSet.yonedaEquiv_comp, Equiv.apply_symm_apply] + apply SSet.stdSimplex.objEquiv.injective + apply SimplexCategory.Hom.ext + apply DFunLike.ext + intro k + change timeOrdinal j k = if k.castSucc < j.succ.castSucc then 0 else 1 + have he : k.castSucc < j.succ.castSucc ↔ k ≤ j.castSucc := by + change k.val < j.val + 1 ↔ k.val ≤ j.val + omega + simp only [timeOrdinal, prismOrdinal_apply, he] + split_ifs <;> rfl) + +/-- The usual affine coordinate on the realization of the simplicial interval. -/ +def realizationTime : SSet.toTop.obj (Δ[1] : SSet.{0}) ⟶ TopCat.of unitInterval := + TopCat.ofHom ⟨fun x => StdSimplex.homeomorphI ((SimplexCategory.mk 1).toTopHomeo x), + StdSimplex.homeomorphI.continuous.comp (SimplexCategory.mk 1).toTopHomeo.continuous⟩ + +theorem realizationTime_base (x : StdSimplex ℝ (Fin 2)) : + realizationTime.hom ((RealizationPrism.leg (Δ[1] : SSet.{0}) (baseIndex 1)).hom + (ULift.up x)) = StdSimplex.homeomorphI x := by + change StdSimplex.homeomorphI + ((SSet.toTopSimplex.hom.app (.mk 1)).hom + ((SSet.toTopSimplex.inv.app (.mk 1) ≫ SSet.toTop.map (𝟙 _)).hom (ULift.up x))).down = _ + rw [CategoryTheory.Functor.map_id] + have h := congrArg (fun f => f.hom (ULift.up x)) + (SSet.toTopSimplex.inv_hom_id_app (.mk 1)) + exact congrArg (fun y => StdSimplex.homeomorphI y.down) h + +/-- On every chart the realized second projection is exactly the supplied time. -/ +theorem realizedChart_time {n : ℕ} (j : Fin (n+1)) (p : region j) : + realizationTime.hom ((SSet.toTop.map (snd (Δ[n] : SSet.{0}) Δ[1])).hom + (realizedChart j p)) = p.val.2 := by + have hn := congrArg (fun f => f.hom (ULift.up (chart j p))) + (RealizationPrism.leg_naturality (snd (Δ[n] : SSet.{0}) Δ[1]) (simplexIndex j)) + have hf := congrArg (fun f => f.hom (ULift.up (chart j p))) + ((RealizationPrism.cocone (Δ[1] : SSet.{0})).w (secondProjectionMap j)) + change _ = _ at hn + change (RealizationPrism.leg (Δ[1] : SSet.{0}) (baseIndex 1)).hom + (ULift.up (StdSimplex.map (timeOrdinal j) (chart j p))) = _ at hf + rw [show (SSet.toTop.map (snd (Δ[n] : SSet.{0}) Δ[1])).hom (realizedChart j p) = + (RealizationPrism.leg (Δ[1] : SSet.{0}) (baseIndex 1)).hom + (ULift.up (StdSimplex.map (timeOrdinal j) (chart j p))) from hn.trans hf.symm] + rw [realizationTime_base] + exact chart_time j p + +/-- The glued standard prism preserves the interval coordinate. -/ +theorem standardPrism_time (n : ℕ) + (p : StdSimplex ℝ (Fin (n+1)) × unitInterval) : + realizationTime.hom ((SSet.toTop.map (snd (Δ[n] : SSet.{0}) Δ[1])).hom + (standardPrism n p)) = p.2 := by + have hp : p ∈ ⋃ j : Fin (n+1), region j := by rw [region_cover]; trivial + obtain ⟨j, hj⟩ := Set.mem_iUnion.mp hp + rw [standardPrism_on_region j p hj] + exact realizedChart_time j ⟨p, hj⟩ + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # Every maximal prism simplex comes from its barycentric region -/ + +namespace Thomason.Construction.PrismBarycentric + +open Convexity + +noncomputable section + +/-- Removing the first copy of the cut vertex reverses the split weights. -/ +theorem splitWeights_recover {n : ℕ} (j : Fin (n+1)) + (u : StdSimplex ℝ (Fin (n+2))) : + splitWeights (StdSimplex.map j.predAbove u) j (u.weights j.castSucc) = u.weights := by + classical + have hu := congrArg (Finsupp.mapDomain j.predAbove) + (Finsupp.single_add_erase j.castSucc u.weights) + simp only [Finsupp.mapDomain_add, Finsupp.mapDomain_single, + Fin.predAbove_castSucc_self] at hu + have hr : u.weights.mapDomain j.predAbove - Finsupp.single j (u.weights j.castSucc) = + (u.weights.erase j.castSucc).mapDomain j.predAbove := by + rw [← hu] + abel + have he : (u.weights.erase j.castSucc).mapDomain + (j.castSucc.succAbove ∘ j.predAbove) = u.weights.erase j.castSucc := by + suffices hh : (u.weights.erase j.castSucc).mapDomain + (j.castSucc.succAbove ∘ j.predAbove) = + (u.weights.erase j.castSucc).mapDomain id from hh.trans Finsupp.mapDomain_id + apply Finsupp.mapDomain_congr + intro k hk + have hne : k ≠ j.castSucc := by + intro h + subst k + simp at hk + exact Fin.succAbove_predAbove hne + change Finsupp.single j.castSucc (u.weights j.castSucc) + + (u.weights.mapDomain j.predAbove - Finsupp.single j (u.weights j.castSucc)).mapDomain + j.castSucc.succAbove = u.weights + rw [hr, ← Finsupp.mapDomain_comp, he, Finsupp.single_add_erase] + +/-- The removed mass lies between zero and the mass of the collapsed vertex. -/ +theorem removedMass_le {n : ℕ} (j : Fin (n+1)) + (u : StdSimplex ℝ (Fin (n+2))) : + u.weights j.castSucc ≤ (StdSimplex.map j.predAbove u).weights j := by + classical + have he : 0 ≤ u.weights.erase j.castSucc := by + intro k + by_cases hk : k = j.castSucc + · subst k; simp + · simp only [Finsupp.erase_ne hk] + exact u.weights_nonneg k + have h := Finsupp.mapDomain_nonneg (f := j.predAbove) he + have hu := congrArg (fun v : Fin (n+1) →₀ ℝ => v j) + (congrArg (Finsupp.mapDomain j.predAbove) (Finsupp.single_add_erase j.castSucc u.weights)) + simp only [Finsupp.mapDomain_add, Finsupp.mapDomain_single, + Fin.predAbove_castSucc_self, Finsupp.coe_add, Pi.add_apply, Finsupp.single_eq_same] at hu + change u.weights j.castSucc ≤ u.weights.mapDomain j.predAbove j + have hj : 0 ≤ (u.weights.erase j.castSucc).mapDomain j.predAbove j := h j + linarith only [hu, hj] + +/-- Every barycentric point of a maximal prism simplex is attained by its chart. -/ +theorem chart_surjective {n : ℕ} (j : Fin (n+1)) + (u : StdSimplex ℝ (Fin (n+2))) : ∃ p : region j, chart j p = u := by + let x := StdSimplex.map j.predAbove u + let a := u.weights j.castSucc + have ha : 0 ≤ a := u.weights_nonneg _ + have hb : a ≤ x.weights j := removedMass_le j u + have hc : 0 ≤ cumulative x j.val := by + unfold cumulative + apply Finset.sum_nonneg + intro i _ + split_ifs + · exact x.weights_nonneg i + · exact le_rfl + have hd : cumulative x j.val + a ≤ 1 := by + have hh := cumulative_monotone x (show j.val+1 ≤ n+1 from j.is_lt) + rw [cumulative_all, cumulative_step] at hh + linarith + let t : unitInterval := ⟨1 - cumulative x j.val - a, by constructor <;> linarith⟩ + have hp : (x, t) ∈ region j := by + change cumulative x j.val ≤ 1 - (1 - cumulative x j.val - a) ∧ + 1 - (1 - cumulative x j.val - a) ≤ cumulative x (j.val+1) + rw [cumulative_step] + constructor <;> linarith + refine ⟨⟨(x, t), hp⟩, ?_⟩ + apply StdSimplex.ext + change splitWeights x j (cutMass j (x, t)) = u.weights + have ht : cutMass j (x, t) = a := by dsimp [cutMass, t]; ring + rw [ht] + exact splitWeights_recover j u + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The ordered chain basis of three composable globes + +Three n-globes are pasted in succession at dimension k. Lower faces are +shared; the k-faces form a string of four cells. Above k each globe retains +its own basis. This is the concrete chain parameter for associativity. +-/ + +namespace Thomason.Construction.TripleGlobeBasis + +open DirectedGlobeComplex + +abbrev Basis (n k p : ℕ) := + {b : Fin 3 × Bool // + (p < n ∨ (p = n ∧ b.2 = false)) ∧ + (p < k → b.1 = 0) ∧ (p = k → b.2 = false → b.1 = 0)} + +abbrev Chains (n k p : ℕ) := Basis n k p →₀ ℤ + +def predecessor (i : Fin 3) : Fin 3 := ⟨i.val - 1, (Nat.sub_le _ _).trans_lt i.isLt⟩ + +/-- Normalize the source of a later globe to the preceding target. -/ +def embed {n k p : ℕ} (hkn : k < n) (i : Fin 3) + (b : DirectedGlobeComplex.Basis n p) : Basis n k p := by + by_cases hp : p < k + · exact ⟨(0, b.val), b.property, fun _ => rfl, fun he => by omega⟩ + · by_cases he : p = k + · by_cases hb : b.val = false + · by_cases hi : i = 0 + · exact ⟨(0, false), Or.inl (he ▸ hkn), fun _ => rfl, fun _ _ => rfl⟩ + · exact ⟨(predecessor i, true), Or.inl (he ▸ hkn), fun hh => (hp hh).elim, + fun _ hh => Bool.noConfusion hh⟩ + · exact ⟨(i, b.val), b.property, fun hh => (hp hh).elim, + fun _ hh => (hb hh).elim⟩ + · exact ⟨(i, b.val), b.property, fun hh => (hp hh).elim, + fun hh => (he hh).elim⟩ + +theorem degree_le {n k p : ℕ} (b : Basis n k p) : p ≤ n := by + rcases b.property.1 with h | ⟨h, _⟩ <;> omega + +theorem embed_self {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : + embed hkn b.val.1 ⟨b.val.2, b.property.1⟩ = b := by + rcases b with ⟨⟨i, a⟩, hv, hl, hk⟩ + by_cases hp : p < k + · have hi := hl hp + change i = 0 at hi + subst i + simp [embed, hp] + · by_cases he : p = k + · by_cases ha : a = false + · have hi := hk he ha + change i = 0 at hi + subst i + subst a + simp [embed, he] + · simp [embed, he, ha] + · simp [embed, hp, he] + +def face {n k p : ℕ} (hkn : k < n) (a : Bool) (b : Basis n k (p+1)) : + Basis n k p := + embed hkn b.val.1 ⟨a, Or.inl (by have := degree_le b; omega)⟩ + +theorem face_globular {n k p : ℕ} (hkn : k < n) (a c : Bool) + (b : Basis n k (p+2)) : + face hkn a (face hkn false b) = face hkn a (face hkn c b) := by + cases c with + | false => rfl + | true => + rcases b with ⟨⟨i, t⟩, hv, hl, hk⟩ + by_cases hp : p+1 < k + · simp [face, embed, show p < k by omega] + · by_cases he : p+1 = k + · simp [face, embed, show p < k by omega] + · simp [face, embed, hp, he] + +noncomputable def boundary {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + Chains n k p := + Finsupp.single (face hkn true b) 1 - Finsupp.single (face hkn false b) 1 + +noncomputable def differential {n k : ℕ} (hkn : k < n) (p : ℕ) : + Chains n k (p+1) →ₗ[ℤ] Chains n k p := + Finsupp.linearCombination ℤ (boundary hkn) + +@[simp] theorem differential_single {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+1)) (z : ℤ) : + differential hkn p (Finsupp.single b z) = z • boundary hkn b := by + simp [differential] + +@[simp] theorem differential_boundary {n k p : ℕ} (hkn : k < n) + (b : Basis n k (p+2)) : + differential hkn p (boundary hkn b) = 0 := by + simp only [boundary, map_sub, differential_single, one_smul] + rw [face_globular hkn true true b, face_globular hkn false true b] + simp + +theorem differential_squared {n k : ℕ} (hkn : k < n) (p : ℕ) + (x : Chains n k (p+2)) : differential hkn p (differential hkn (p+1) x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp + +noncomputable def weight (n k p : ℕ) : Chains n k p →ₗ[ℤ] ℤ := + Finsupp.linearCombination ℤ (fun _ => 1) + +@[simp] theorem weight_single {n k p : ℕ} (b : Basis n k p) (z : ℤ) : + weight n k p (Finsupp.single b z) = z := by simp [weight] + +@[simp] theorem weight_differential {n k : ℕ} (hkn : k < n) (p : ℕ) + (x : Chains n k (p+1)) : weight n k p (differential hkn p x) = 0 := by + induction x using Finsupp.induction_linear with + | zero => simp + | add x y hx hy => simp [hx, hy] + | single b z => simp [boundary] + +def positive (n k p : ℕ) : AddSubmonoid (Chains n k p) where + carrier := {x | ∀ b, 0 ≤ x b} + zero_mem' := fun _ => le_rfl + add_mem' hx hy b := add_nonneg (hx b) (hy b) + +noncomputable def complex (n k : ℕ) (hkn : k < n) : DirectedComplex where + group p := AddCommGrpCat.of (Chains n k p) + differential p := (differential hkn p).toAddMonoidHom + differential_squared := differential_squared hkn + augmentation := (weight n k 0).toAddMonoidHom + augmentation_differential := weight_differential hkn 0 + positive := positive n k + +/-- The three successive intervals are placed consecutively in the height order. -/ +def height {n k p : ℕ} (b : Basis n k p) : ℤ := + if b.val.2 then + if p < k then 6*(n:ℤ)-4*k-p + else 2*(b.val.1.val:ℤ)*((n:ℤ)-k)+2*n-p + else 2*(b.val.1.val:ℤ)*((n:ℤ)-k)+p + +theorem height_source_lt {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + height (face hkn false b) < height b := by + rcases b with ⟨⟨i, a⟩, hv, hl, hk⟩ + fin_cases i <;> cases a + all_goals + simp_all [face, embed, predecessor, height] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +theorem height_lt_target {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + height b < height (face hkn true b) := by + rcases b with ⟨⟨i, a⟩, hv, hl, hk⟩ + fin_cases i <;> cases a + all_goals + simp_all [face, embed, height] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +theorem face_ne {n k p : ℕ} (hkn : k < n) (b : Basis n k (p+1)) : + face hkn false b ≠ face hkn true b := by + intro he + have hs := height_source_lt hkn b + have ht := height_lt_target hkn b + rw [he] at hs + omega + +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # The three globe inclusions in the triple chain complex -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +theorem face_embed {n k p : ℕ} (hkn : k < n) (i : Fin 3) (a : Bool) + (b : DirectedGlobeComplex.Basis n (p+1)) : + face hkn a (embed hkn i b) = + embed hkn i ⟨a, Or.inl (by rcases b.property with h | ⟨h, _⟩ <;> omega)⟩ := by + by_cases hp : p+1 < k + · simp [embed, face, show p < k by omega] + · by_cases he : p+1 = k + · simp [embed, face, show p < k by omega] + · simp [embed, hp, he, face] + +def embedApp {n k : ℕ} (hkn : k < n) (i : Fin 3) (p : ℕ) : + DirectedGlobeComplex.Chains n p →ₗ[ℤ] Chains n k p := + Finsupp.linearCombination ℤ (fun b => Finsupp.single (embed hkn i b) 1) + +@[simp] theorem embedApp_single {n k p : ℕ} (hkn : k < n) (i : Fin 3) + (b : DirectedGlobeComplex.Basis n p) (z : ℤ) : + embedApp hkn i p (Finsupp.single b z) = Finsupp.single (embed hkn i b) z := by + simp [embedApp] + +theorem embedApp_differential {n k : ℕ} (hkn : k < n) (i : Fin 3) (p : ℕ) + (u : DirectedGlobeComplex.Chains n (p+1)) : + embedApp hkn i p (DirectedGlobeComplex.differential n p u) = + differential hkn p (embedApp hkn i (p+1) u) := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => + have hp : p < n := by rcases b.property with h | ⟨h, _⟩ <;> omega + simp only [DirectedGlobeComplex.differential_single, map_smul, + DirectedGlobeComplex.boundary, dite_eq_left hp, map_sub, embedApp_single, + differential_single, boundary, face_embed] + +theorem embedApp_augmentation {n k : ℕ} (hkn : k < n) (i : Fin 3) + (u : DirectedGlobeComplex.Chains n 0) : + weight n k 0 (embedApp hkn i 0 u) = DirectedGlobeComplex.weight n 0 u := by + induction u using Finsupp.induction_linear with + | zero => simp + | add u v hu hv => simp [hu, hv] + | single b z => simp + +theorem embedApp_positive {n k p : ℕ} (hkn : k < n) (i : Fin 3) + (u : DirectedGlobeComplex.Chains n p) (hu : u ∈ DirectedGlobeComplex.positive n p) : + embedApp hkn i p u ∈ positive n k p := by + classical + change (u.sum fun b z => z • Finsupp.single (embed hkn i b) 1) ∈ positive n k p + apply (positive n k p).sum_mem + intro b hb + change u b • Finsupp.single (embed hkn i b) 1 ∈ positive n k p + rw [← Int.toNat_of_nonneg (hu b), natCast_zsmul] + apply (positive n k p).nsmul_mem + intro c + simp only [Finsupp.single_apply] + split_ifs <;> norm_num + +def inclusion {n k : ℕ} (hkn : k < n) (i : Fin 3) : + Hom (DirectedGlobeComplex.complex n) (complex n k hkn) where + app p := (embedApp hkn i p).toAddMonoidHom + differential := embedApp_differential hkn i + augmentation := embedApp_augmentation hkn i + positive _ _ hu := embedApp_positive hkn i _ hu + +end +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # Actual ordered atoms of three pasted globes and their right cylinder -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +def atom {n k p : ℕ} (hkn : k < n) (b : Basis n k p) : Cell (complex n k hkn) := + (inclusion hkn b.val.1).realization.toFun + (DirectedGlobeComplex.basisAtom n p ⟨b.val.2, b.property.1⟩) + +theorem atom_top {n k p : ℕ} (hkn : k < n) (b : Basis n k p) (a : Bool) : + (atom hkn b).table a p = Finsupp.single b 1 := by + change embedApp hkn b.val.1 p + ((DirectedGlobeComplex.basisAtom n p ⟨b.val.2, b.property.1⟩).table a p) = _ + rw [DirectedGlobeComplex.basisAtom_top, embedApp_single, embed_self] + +theorem atom_above {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hpq : p < q) (a : Bool) : (atom hkn b).table a q = 0 := by + change embedApp hkn b.val.1 q + ((DirectedGlobeComplex.basisAtom n p ⟨b.val.2, b.property.1⟩).table a q) = _ + rw [DirectedGlobeComplex.basisAtom_above n p _ q hpq a] + exact map_zero _ + +theorem atom_below {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (a : Bool) : + (atom hkn b).table a q = Finsupp.single + (embed hkn b.val.1 ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩) 1 := by + change embedApp hkn b.val.1 q + ((DirectedGlobeComplex.basisAtom n p ⟨b.val.2, b.property.1⟩).table a q) = _ + rw [DirectedGlobeComplex.basisAtom_below n p _ q hqp a, embedApp_single] + +theorem height_lower {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (a : Bool) : + if a then height b < height (embed hkn b.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩) + else height (embed hkn b.val.1 + ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩) < height b := by + rcases b with ⟨⟨i, c⟩, hv, hl, hk⟩ + fin_cases i <;> cases c <;> cases a + all_goals + simp_all [height, embed, predecessor] + all_goals first | omega | (split_ifs <;> simp_all <;> omega) + +theorem atom_sideHeight {n k p q : ℕ} (hkn : k < n) (b : Basis n k p) + (hqp : q < p) (a : Bool) (c : Basis n k q) + (hc : DFunLike.coe (F := Chains n k q) ((atom hkn b).table a q) c ≠ 0) : + if a then height b < height c else height c < height b := by + rw [atom_below hkn b hqp a] at hc + have he : c = embed hkn b.val.1 ⟨a, Or.inl (hqp.trans_le (degree_le b))⟩ := by + by_contra he + exact hc (Finsupp.single_eq_of_ne he) + subst c + exact height_lower hkn b hqp a + +def orderedAtomBasis {n k : ℕ} (hkn : k < n) : OrderedAtomBasis (complex n k hkn) where + Index p := Basis n k p + coordinates _ := AddEquiv.refl _ + positive_iff _ _ := Iff.rfl + augmentation := by + change ∀ x : Chains n k 0, weight n k 0 x = x.sum (fun _ z => z) + intro x + simp [weight, Finsupp.linearCombination_apply] + atom _ := atom hkn + atom_top _ := atom_top hkn + atom_above _ b q h a := atom_above hkn b h a + height _ := height + disjoint {p q r} b c hrp hrq hbc e := by + by_cases he : DFunLike.coe (F := Chains n k r) ((atom hkn b).table false r) e = 0 + · exact Or.inl he + · right + by_contra hf + have h1 := atom_sideHeight hkn b hrp false e he + have h2 := atom_sideHeight hkn c hrq true e hf + simp only [Bool.false_eq_true, ite_false, ite_true] at h1 h2 + exact (lt_irrefl _) (h2.trans (h1.trans_le hbc)) + +theorem orderedAtomBasis_sideHeight {n k : ℕ} (hkn : k < n) : + (orderedAtomBasis hkn).SideHeight := + fun _ b _ h a c hc => atom_sideHeight hkn b h a c hc + +def cylinderOrderedAtomBasis {n k : ℕ} (hkn : k < n) : + OrderedAtomBasis (rightCylinder (complex n k hkn)) := + (orderedAtomBasis hkn).cylinderOrderedAtomBasis (orderedAtomBasis_sideHeight hkn) + +end +end Thomason.Construction.TripleGlobeBasis + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeCylinderSource.lean b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeCylinderSource.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfedbb54d8e3e62218db44157765704797134a8a --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeCylinderSource.lean @@ -0,0 +1,421 @@ +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeAtoms +import OAI.CategoryTheory.Thomason.Gray.TripleGlobeRetractions +import OAI.CategoryTheory.Thomason.Simplicial.ExhaustionWeakEquivalence +import OAI.CategoryTheory.Thomason.Simplicial.SkeletalWeakEquivalences +import OAI.CategoryTheory.Thomason.Transfer.StrictPushoutGeneration +import Mathlib.Algebra.Order.Floor.Semiring +import Mathlib.Topology.MetricSpace.Bounded + +namespace OAI + +section + +/-! # Finite closed grids of cubes with controlled mesh -/ + +namespace Thomason.Construction.CubeGrid + +open Topology + +noncomputable section + +def cell (n m : ℕ) (k : Fin n → Fin (m+1)) : Set (Fin n → unitInterval) := + Set.ofPred (fun x => ∀ i, + (k i).val / ((m : ℝ)+1) ≤ (x i : ℝ) ∧ + (x i : ℝ) ≤ ((k i).val+1) / ((m : ℝ)+1)) + +theorem cell_isClosed (n m : ℕ) (k : Fin n → Fin (m+1)) : IsClosed (cell n m k) := by + have he : cell n m k = ⋂ i : Fin n, Set.ofPred (fun x : Fin n → unitInterval => + (k i).val / ((m : ℝ)+1) ≤ (x i : ℝ) ∧ + (x i : ℝ) ≤ ((k i).val+1) / ((m : ℝ)+1)) := by + ext x + simp only [cell, Set.mem_ofPred_eq, Set.mem_iInter] + rw [he] + apply isClosed_iInter + intro i + have hc : Continuous (fun x : Fin n → unitInterval => (x i : ℝ)) := + (continuous_apply i).subtype_val + exact (isClosed_le continuous_const hc).inter (isClosed_le hc continuous_const) + +theorem cell_nonempty (n m : ℕ) (k : Fin n → Fin (m+1)) : (cell n m k).Nonempty := by + have hm : (0 : ℝ) < (m : ℝ)+1 := by positivity + let x : Fin n → unitInterval := fun i => + ⟨(k i).val / ((m : ℝ)+1), div_nonneg (by positivity) hm.le, + (div_le_one hm).mpr (by exact_mod_cast (k i).isLt.le)⟩ + refine ⟨x, fun i => ⟨le_rfl, ?_⟩⟩ + apply div_le_div_of_nonneg_right _ hm.le + linarith + +theorem interval_mem (m : ℕ) (x : unitInterval) : + ∃ k : Fin (m+1), k.val / ((m : ℝ)+1) ≤ (x : ℝ) ∧ + (x : ℝ) ≤ (k.val+1) / ((m : ℝ)+1) := by + have hm : (0 : ℝ) < (m : ℝ)+1 := by positivity + by_cases hx : (x : ℝ) = 1 + · refine ⟨⟨m, Nat.lt_succ_self m⟩, ?_, ?_⟩ + · rw [hx] + exact (div_le_one hm).mpr (by linarith) + · simp [hx, hm.ne'] + · have hxlt : (x : ℝ) < 1 := lt_of_le_of_ne x.property.2 hx + have ht : ((m : ℝ)+1) * (x : ℝ) < (m : ℝ)+1 := by nlinarith + have hk : Nat.floor (((m : ℝ)+1) * (x : ℝ)) < m+1 := by + apply (Nat.floor_lt (mul_nonneg hm.le x.property.1)).mpr + simpa using ht + refine ⟨⟨_, hk⟩, ?_, ?_⟩ + · apply (div_le_iff₀ hm).mpr + simpa [mul_comm] using Nat.floor_le (mul_nonneg hm.le x.property.1) + · apply (le_div_iff₀ hm).mpr + exact le_of_lt (by simpa [mul_comm] using Nat.lt_floor_add_one (((m : ℝ)+1) * (x : ℝ))) + +/-- The finite closed grid covers the entire cube. -/ +theorem cover (n m : ℕ) : ⋃ k, cell n m k = Set.univ := by + classical + apply Set.eq_univ_of_forall + intro x + choose k hk using fun i : Fin n => interval_mem m (x i) + exact Set.mem_iUnion.mpr ⟨k, hk⟩ + +/-- In the product metric every grid cell has mesh at most `1/(m+1)`. -/ +theorem cell_diam (n m : ℕ) (k : Fin n → Fin (m+1)) : + Metric.diam (cell n m k) ≤ 1 / ((m : ℝ)+1) := by + apply Metric.diam_le_of_forall_dist_le (by positivity) + intro x hx y hy + apply (dist_pi_le_iff (by positivity)).mpr + intro i + have hx := hx i + have hy := hy i + change |(x i : ℝ) - (y i : ℝ)| ≤ 1 / ((m : ℝ)+1) + have hw : ((k i).val+1) / ((m : ℝ)+1) - (k i).val / ((m : ℝ)+1) = + 1 / ((m : ℝ)+1) := by ring + apply abs_le.mpr + constructor <;> linarith + +end + +end Thomason.Construction.CubeGrid + +end + +section + +/-! # Surjectivity of the actual standard realization prism -/ + +namespace Thomason.Construction.PrismBarycentric + +open CategoryTheory Convexity +open scoped Simplicial + +noncomputable section + +/-- The maximal simplices cover the actual realization of the standard prism. -/ +theorem exists_maximal_prism_simplex (n : ℕ) (x : SSet.toTop.obj (prism n)) : + ∃ (j : Fin (n+1)) (u : StdSimplex ℝ (Fin (n+2))), + (RealizationPrism.leg (prism n) (simplexIndex j)).hom (ULift.up u) = x := by + have hx : x ∈ Set.range (SSet.toTop.map + (SSet.prodStdSimplex₁.filtration (Fin.last n)).ι).hom := by + rw [RealizationPrism.mem_range_inclusion_iff, SSet.prodStdSimplex₁.filtration_last] + exact le_top + rw [SSet.prodStdSimplex₁.filtration, RealizationPrism.range_iSup_inclusion] at hx + obtain ⟨j, hj⟩ := Set.mem_iUnion.mp hx + let f := SSet.yonedaEquiv.symm (SSet.prodStdSimplex₁.nonDegenerateEquiv j.val).val + have hR : Set.range (SSet.toTop.map f).hom = + Set.range (SSet.toTop.map (SSet.Subcomplex.ofSimplex + (SSet.prodStdSimplex₁.nonDegenerateEquiv j.val).val).ι).hom := by + have hf : SSet.Subcomplex.range f = SSet.Subcomplex.ofSimplex + (SSet.prodStdSimplex₁.nonDegenerateEquiv j.val).val := + (SSet.Subcomplex.range_eq_ofSimplex f).trans + (congrArg SSet.Subcomplex.ofSimplex (SSet.yonedaEquiv.apply_symm_apply _)) + rw [← hf] + exact RealizationPrism.range_realized_map f + rw [← hR] at hj + obtain ⟨z, hz⟩ := hj + refine ⟨j.val, (SimplexCategory.mk (n+1)).toTopHomeo z, ?_⟩ + change (SSet.toTop.map f).hom + ((SSet.toTopSimplex.inv.app (.mk (n+1))).hom + (ULift.up ((SimplexCategory.mk (n+1)).toTopHomeo z))) = x + have he : (SSet.toTopSimplex.inv.app (.mk (n+1))).hom + (ULift.up ((SimplexCategory.mk (n+1)).toTopHomeo z)) = z := + (SimplexCategory.mk (n+1)).toTopHomeo.symm_apply_apply z + rw [he] + exact hz + +/-- Every point of the standard simplicial prism is obtained by the constructed +continuous prism map, including points on degenerate and shared faces. -/ +theorem standardPrism_surjective (n : ℕ) : Function.Surjective (standardPrism n) := by + intro x + obtain ⟨j, u, hu⟩ := exists_maximal_prism_simplex n x + obtain ⟨p, hp⟩ := chart_surjective j u + refine ⟨p.val, ?_⟩ + rw [standardPrism_on_region j p.val p.property] + change (RealizationPrism.leg (prism n) (simplexIndex j)).hom (ULift.up (chart j p)) = x + rw [hp] + exact hu + +end + +end Thomason.Construction.PrismBarycentric + +end + +section + +/-! # The actual realization cylinder is the topological cylinder + +The constructed comparison is a homeomorphism. Its inverse is given by the +first realized projection and the affine interval coordinate. +-/ + +namespace Thomason.Construction.RealizedCylinder + +open CategoryTheory MonoidalCategory CartesianMonoidalCategory Convexity +open scoped Simplicial + +noncomputable section + +/-- The comparison covers every point of the actual simplicial cylinder. -/ +theorem comparison_surjective (K : SSet.{0}) : Function.Surjective (comparison K).hom := by + intro z + obtain ⟨j, p, rfl⟩ := RealizationPrism.point_representation (K ⊗ Δ[1]) z + let f := j.hom ≫ fst K Δ[1] + let u := j.hom ≫ snd K Δ[1] + let l : (Δ[j.left.len] : SSet.{0}) ⟶ Δ[j.left.len] ⊗ Δ[1] := lift (𝟙 _) u + have hl : l ≫ f ▷ Δ[1] = j.hom := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + rfl + let v := (SSet.toTop.map l).hom ((SSet.toTopSimplex.inv.app j.left).hom p) + obtain ⟨⟨x, t⟩, hxt⟩ := PrismBarycentric.standardPrism_surjective j.left.len v + refine ⟨((RealizationPrism.leg K (CostructuredArrow.mk f)).hom (ULift.up x), t), ?_⟩ + refine (comparison_leg K (CostructuredArrow.mk f) (ULift.up x) t).trans ?_ + change (SSet.toTop.map (f ▷ Δ[1])).hom + (PrismBarycentric.standardPrism j.left.len (x, t)) = _ + rw [hxt] + change ((SSet.toTopSimplex.inv.app j.left ≫ SSet.toTop.map l) ≫ + SSet.toTop.map (f ▷ Δ[1])).hom p = _ + rw [Category.assoc, ← SSet.toTop.map_comp, hl] + rfl + +/-- The two actual realized cylinder coordinates. -/ +def coordinates (K : SSet.{0}) : + SSet.toTop.obj (K ⊗ Δ[1]) ⟶ TopologicalInterval.cylinder.obj (SSet.toTop.obj K) := + TopCat.ofHom { + toFun z := ((SSet.toTop.map (fst K Δ[1])).hom z, + PrismBarycentric.realizationTime.hom ((SSet.toTop.map (snd K Δ[1])).hom z)) + continuous_toFun := (SSet.toTop.map (fst K Δ[1])).hom.continuous.prodMk + (PrismBarycentric.realizationTime.hom.continuous.comp + (SSet.toTop.map (snd K Δ[1])).hom.continuous) } + +/-- The explicit coordinate map is a left inverse to the comparison. -/ +theorem coordinates_comparison (K : SSet.{0}) : + Function.LeftInverse (coordinates K).hom (comparison K).hom := by + rintro ⟨x, t⟩ + apply Prod.ext + · exact comparison_first K x t + · exact comparison_time K x t + +/-- Surjectivity gives the other inverse equation for the same explicit map. -/ +theorem comparison_coordinates (K : SSet.{0}) : + Function.RightInverse (coordinates K).hom (comparison K).hom := + (coordinates_comparison K).rightInverse_of_surjective (comparison_surjective K) + +/-- The natural comparison is an actual homeomorphism, with the proved +coordinate formulas as its inverse. -/ +def cylinderHomeomorph (K : SSet.{0}) : + TopologicalInterval.cylinder.obj (SSet.toTop.obj K) ≃ₜ SSet.toTop.obj (K ⊗ Δ[1]) where + toFun := (comparison K).hom + invFun := (coordinates K).hom + left_inv := coordinates_comparison K + right_inv := comparison_coordinates K + continuous_toFun := (comparison K).hom.continuous + continuous_invFun := (coordinates K).hom.continuous + +/-- The same cylinder comparison as an isomorphism of actual topological spaces. -/ +def cylinderIso (K : SSet.{0}) : + TopologicalInterval.cylinder.obj (SSet.toTop.obj K) ≅ SSet.toTop.obj (K ⊗ Δ[1]) := + TopCat.isoOfHomeo (cylinderHomeomorph K) + +end + +end Thomason.Construction.RealizedCylinder + +end + +section + +/-! # Bounded lifts of all triple-cylinder atoms in the original pushout -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex + +theorem cylinderAtom_in_globe {n k p : ℕ} (hkn : k < n) + (b : (cylinderOrderedAtomBasis hkn).Index p) : + ∃ (i : Fin 3) (x : Cell (rightCylinder (DirectedGlobeComplex.complex n))), + (rightCylinder (DirectedGlobeComplex.complex n)).realization.DimensionLE p x ∧ + (RightCylinder.map (inclusion hkn i)).realization.toFun x = + (cylinderOrderedAtomBasis hkn).atom p b := by + cases b with + | endpoint a b => + let c : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p := + .endpoint a ⟨b.val.2, b.property.1⟩ + refine ⟨b.val.1, (DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p c, + (DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom_dimension p c, ?_⟩ + have he : globeCylinderIndex hkn b.val.1 c = .endpoint a b := + congrArg (RightCylinderBasis.Basis.endpoint a) (embed_self hkn b) + exact (globeCylinder_atom hkn b.val.1 c).trans + (congrArg ((cylinderOrderedAtomBasis hkn).atom p) he) + | @mixed q b => + let c : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index (q+1) := + .mixed ⟨b.val.2, b.property.1⟩ + refine ⟨b.val.1, (DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom (q+1) c, + (DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom_dimension (q+1) c, ?_⟩ + have he : globeCylinderIndex hkn b.val.1 c = .mixed b := + congrArg RightCylinderBasis.Basis.mixed (embed_self hkn b) + exact (globeCylinder_atom hkn b.val.1 c).trans + (congrArg ((cylinderOrderedAtomBasis hkn).atom (q+1)) he) + +end Thomason.Construction.TripleGlobeBasis + +namespace Thomason.Construction.StrictOmegaCategory.TripleGlobeCylinder + +open CategoryTheory CategoryTheory.Limits _root_.OAI.Thomason.Construction.DirectedComplex + +noncomputable section + +abbrev model := GrayChainExtension.model +abbrev Source (n k : ℕ) : StrictOmegaCategory.{0} := TripleGlobe.ImageSource model n k +abbrev PieceCells (n k : ℕ) := + model.obj (PastingGlobe.category n n k) ⊕ model.obj (Globe.category n) + +def comparison (n k : ℕ) : Source n k ⟶ model.obj (TripleGlobe.category n k) := + pushout.desc (model.map (TripleGlobe.pair n k)) (model.map (TripleGlobe.inclusion n k 2)) (by + rw [← model.map_comp, ← model.map_comp] + exact congrArg model.map (pushout.condition (f := TripleGlobe.bridge n k) + (g := Globe.faceMap false k n))) + +theorem inl_comparison (n k : ℕ) : + pushout.inl (model.map (TripleGlobe.bridge n k)) (model.map (Globe.faceMap false k n)) ≫ + comparison n k = model.map (TripleGlobe.pair n k) := by + unfold comparison + exact pushout.inl_desc _ _ _ + +theorem inr_comparison (n k : ℕ) : + pushout.inr (model.map (TripleGlobe.bridge n k)) (model.map (Globe.faceMap false k n)) ≫ + comparison n k = model.map (TripleGlobe.inclusion n k 2) := by + unfold comparison + exact pushout.inr_desc _ _ _ + +def basisComparison {n k : ℕ} (hkn : k < n) : + Source n k ⟶ (rightCylinder (TripleGlobeBasis.complex n k hkn)).realization := + comparison n k ≫ (TripleGlobeBasis.modelIso hkn).hom + +theorem comparison_imageCell (n k : ℕ) (x : PieceCells n k) : + (comparison n k).toFun (TripleGlobe.imageCell model n k x) = + TripleGlobe.targetCell model n k x := by + cases x with + | inl x => exact congrArg (fun F => F.toFun x) (inl_comparison n k) + | inr x => exact congrArg (fun F => F.toFun x) (inr_comparison n k) + +def globeChoice (n k : ℕ) (i : Fin 3) (x : model.obj (Globe.category n)) : PieceCells n k := + if i = 0 then .inl ((model.map (PastingGlobe.left n n k)).toFun x) + else if i = 1 then .inl ((model.map (PastingGlobe.right n n k)).toFun x) + else .inr x + +def globeMap (n k : ℕ) (i : Fin 3) : model.obj (Globe.category n) ⟶ Source n k := + if i = 0 then model.map (PastingGlobe.left n n k) ≫ pushout.inl _ _ + else if i = 1 then model.map (PastingGlobe.right n n k) ≫ pushout.inl _ _ + else pushout.inr _ _ + +theorem globeChoice_image (n k : ℕ) (i : Fin 3) (x : model.obj (Globe.category n)) : + TripleGlobe.imageCell model n k (globeChoice n k i x) = (globeMap n k i).toFun x := by + fin_cases i <;> rfl + +theorem globeMap_comparison (n k : ℕ) (i : Fin 3) : + globeMap n k i ≫ comparison n k = model.map (TripleGlobe.inclusion n k i) := by + fin_cases i + · change (model.map (PastingGlobe.left n n k) ≫ pushout.inl _ _) ≫ comparison n k = _ + rw [Category.assoc, inl_comparison, ← model.map_comp] + rfl + · change (model.map (PastingGlobe.right n n k) ≫ pushout.inl _ _) ≫ comparison n k = _ + rw [Category.assoc, inl_comparison, ← model.map_comp] + rfl + · exact inr_comparison n k + +theorem globeMap_basisComparison {n k : ℕ} (hkn : k < n) (i : Fin 3) : + globeMap n k i ≫ basisComparison hkn = + (TripleGlobeBasis.globeModelIso n).hom ≫ + (RightCylinder.map (TripleGlobeBasis.inclusion hkn i)).realization := by + rw [basisComparison, ← Category.assoc, globeMap_comparison, TripleGlobeBasis.model_globe] + +theorem imageCell_eq_of_basisComparison {n k : ℕ} (hkn : k < n) + (x y : PieceCells n k) + (h : (basisComparison hkn).toFun (TripleGlobe.imageCell model n k x) = + (basisComparison hkn).toFun (TripleGlobe.imageCell model n k y)) : + TripleGlobe.imageCell model n k x = TripleGlobe.imageCell model n k y := by + apply TripleGlobe.imageCell_eq model n k hkn.le x y + have h' : (TripleGlobeBasis.modelIso hkn).hom.toFun + ((comparison n k).toFun (TripleGlobe.imageCell model n k x)) = + (TripleGlobeBasis.modelIso hkn).hom.toFun + ((comparison n k).toFun (TripleGlobe.imageCell model n k y)) := h + rw [comparison_imageCell, comparison_imageCell] at h' + have hi (z : model.obj (TripleGlobe.category n k)) : + (TripleGlobeBasis.modelIso hkn).inv.toFun + ((TripleGlobeBasis.modelIso hkn).hom.toFun z) = z := + congrArg (fun F => F.toFun z) (TripleGlobeBasis.modelIso hkn).hom_inv_id + exact (hi _).symm.trans + ((congrArg (TripleGlobeBasis.modelIso hkn).inv.toFun h').trans (hi _)) + +abbrev atomBasis {n k : ℕ} (hkn : k < n) := TripleGlobeBasis.cylinderOrderedAtomBasis hkn + +def representativeIndex {n k p : ℕ} (hkn : k < n) (b : (atomBasis hkn).Index p) : Fin 3 := + Classical.choose (TripleGlobeBasis.cylinderAtom_in_globe hkn b) + +def representativeCell {n k p : ℕ} (hkn : k < n) (b : (atomBasis hkn).Index p) : + DirectedComplex.Cell (rightCylinder (DirectedGlobeComplex.complex n)) := + Classical.choose (Classical.choose_spec (TripleGlobeBasis.cylinderAtom_in_globe hkn b)) + +theorem representative_spec {n k p : ℕ} (hkn : k < n) (b : (atomBasis hkn).Index p) : + (rightCylinder (DirectedGlobeComplex.complex n)).realization.DimensionLE p + (representativeCell hkn b) ∧ + (RightCylinder.map (TripleGlobeBasis.inclusion hkn (representativeIndex hkn b))).realization.toFun + (representativeCell hkn b) = (atomBasis hkn).atom p b := + Classical.choose_spec (Classical.choose_spec (TripleGlobeBasis.cylinderAtom_in_globe hkn b)) + +def atomChoice {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : PieceCells n k := + globeChoice n k (representativeIndex hkn a.2) + ((TripleGlobeBasis.globeModelIso n).inv.toFun (representativeCell hkn a.2)) + +def atomLift {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : Source n k := + TripleGlobe.imageCell model n k (atomChoice hkn a) + +theorem atomLift_dimension {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : + (Source n k).DimensionLE a.1 (atomLift hkn a) := by + change (Source n k).DimensionLE a.1 + (TripleGlobe.imageCell model n k (globeChoice n k (representativeIndex hkn a.2) + ((TripleGlobeBasis.globeModelIso n).inv.toFun (representativeCell hkn a.2)))) + rw [globeChoice_image] + exact (globeMap n k _).dimensionLE + ((TripleGlobeBasis.globeModelIso n).inv.dimensionLE (representative_spec hkn a.2).1) + +theorem atomLift_image {n k : ℕ} (hkn : k < n) (a : (atomBasis hkn).AtomIndex) : + (basisComparison hkn).toFun (atomLift hkn a) = (atomBasis hkn).atomCell a := by + change (basisComparison hkn).toFun + (TripleGlobe.imageCell model n k (globeChoice n k (representativeIndex hkn a.2) + ((TripleGlobeBasis.globeModelIso n).inv.toFun (representativeCell hkn a.2)))) = _ + rw [globeChoice_image] + have h := congrArg (fun F => F.toFun + ((TripleGlobeBasis.globeModelIso n).inv.toFun (representativeCell hkn a.2))) + (globeMap_basisComparison hkn (representativeIndex hkn a.2)) + have hi := congrArg (fun F => F.toFun (representativeCell hkn a.2)) + (TripleGlobeBasis.globeModelIso n).inv_hom_id + exact h.trans ((congrArg + (RightCylinder.map (TripleGlobeBasis.inclusion hkn (representativeIndex hkn a.2))).realization.toFun hi).trans + (representative_spec hkn a.2).2) + +end +end Thomason.Construction.StrictOmegaCategory.TripleGlobeCylinder + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeRetractions.lean b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeRetractions.lean new file mode 100644 index 0000000000000000000000000000000000000000..9836f45cd433d2f360a984526f923ff904ecf9c4 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/Gray/TripleGlobeRetractions.lean @@ -0,0 +1,856 @@ +import OAI.CategoryTheory.Thomason.Gray.DirectedGlobeFaces +import OAI.CategoryTheory.Thomason.Gray.GlobePastingDensity +import OAI.CategoryTheory.Thomason.Gray.GrayChainGlobeRestriction +import OAI.CategoryTheory.Thomason.Gray.GrayMappingEndpointEvaluation +import OAI.CategoryTheory.Thomason.Gray.GrayMappingInterchangeEvaluation +import OAI.CategoryTheory.Thomason.Gray.GridGlobeCylinderComparison +import OAI.CategoryTheory.Thomason.Gray.PastingGlobeCylinderRetractions +import OAI.CategoryTheory.Thomason.Transfer.GridGlobeCylinderPushout + +namespace OAI + +section + +/-! # Unrestricted interchange for the actual mapping-cell operation + +The actual grid-cylinder pushout glues four boundary-compatible maps. +Evaluation of the strict grid diagram proves interchange, first at a +common finite level and then on the filtered-union carrier. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {D : StrictOmegaCategory.{0}} {n k l : ℕ} + +def gridGlue (hkl : k < l) (hln : l < n) + (f : Bool → Bool → (model.obj (Globe.category n) ⟶ D)) + (hh : ∀ b, model.map (Globe.faceMap true k n) ≫ f b false = + model.map (Globe.faceMap false k n) ≫ f b true) + (hv : ∀ a, model.map (Globe.faceMap true l n) ≫ f false a = + model.map (Globe.faceMap false l n) ≫ f true a) : + model.obj (GridGlobe.category n k l hkl) ⟶ D := + (GridGlobeCylinder.isPushout hkl hln).desc + (glue (hkl.trans hln) (f false false) (f false true) (hh false)) + (glue (hkl.trans hln) (f true false) (f true true) (hh true)) + (grid_row_matching hkl hln _ _ _ _ (hh false) (hh true) (hv false) (hv true)) + +theorem gridGlue_row (hkl : k < l) (hln : l < n) + (f : Bool → Bool → (model.obj (Globe.category n) ⟶ D)) + (hh : ∀ b, model.map (Globe.faceMap true k n) ≫ f b false = + model.map (Globe.faceMap false k n) ≫ f b true) + (hv : ∀ a, model.map (Globe.faceMap true l n) ≫ f false a = + model.map (Globe.faceMap false l n) ≫ f true a) (b : Bool) : + model.map (GridGlobe.row n k l hkl b) ≫ gridGlue hkl hln f hh hv = + glue (hkl.trans hln) (f b false) (f b true) (hh b) := by + cases b + · exact (GridGlobeCylinder.isPushout hkl hln).inl_desc _ _ _ + · exact (GridGlobeCylinder.isPushout hkl hln).inr_desc _ _ _ + +theorem gridGlue_evaluation (hkl : k < l) (hln : l < n) + (f : Bool → Bool → (model.obj (Globe.category n) ⟶ D)) + (hh : ∀ b, model.map (Globe.faceMap true k n) ≫ f b false = + model.map (Globe.faceMap false k n) ≫ f b true) + (hv : ∀ a, model.map (Globe.faceMap true l n) ≫ f false a = + model.map (Globe.faceMap false l n) ≫ f true a) (b a : Bool) : + gridEvaluation (gridGlue hkl hln f hh hv) b a = f b a := by + change model.map ((if a then PastingGlobe.right n n k else PastingGlobe.left n n k) ≫ + GridGlobe.row n k l hkl b) ≫ _ = _ + rw [model.map_comp, Category.assoc, gridGlue_row] + cases a + · exact glue_left _ _ _ _ + · exact glue_right _ _ _ _ + +/-- Interchange at every common finite mapping level. -/ +theorem composite_interchange (hkl : k < l) (hln : l < n) + (f : Bool → Bool → (model.obj (Globe.category n) ⟶ D)) + (hh : ∀ b, model.map (Globe.faceMap true k n) ≫ f b false = + model.map (Globe.faceMap false k n) ≫ f b true) + (hv : ∀ a, model.map (Globe.faceMap true l n) ≫ f false a = + model.map (Globe.faceMap false l n) ≫ f true a) + (hV : model.map (Globe.faceMap true l n) ≫ + composite (hkl.trans hln) (f false false) (f false true) (hh false) = + model.map (Globe.faceMap false l n) ≫ + composite (hkl.trans hln) (f true false) (f true true) (hh true)) + (hH : model.map (Globe.faceMap true k n) ≫ + composite hln (f false false) (f true false) (hv false) = + model.map (Globe.faceMap false k n) ≫ + composite hln (f false true) (f true true) (hv true)) : + composite hln + (composite (hkl.trans hln) (f false false) (f false true) (hh false)) + (composite (hkl.trans hln) (f true false) (f true true) (hh true)) hV = + composite (hkl.trans hln) + (composite hln (f false false) (f true false) (hv false)) + (composite hln (f false true) (f true true) (hv true)) hH := by + let u := gridGlue hkl hln f hh hv + have he (b a) : gridEvaluation u b a = f b a := gridGlue_evaluation hkl hln f hh hv b a + have ht : model.map (Globe.faceMap true k n) ≫ gridEvaluation u false false = + model.map (Globe.faceMap false k n) ≫ gridEvaluation u false true := by + simpa only [he] using hh false + have hb : model.map (Globe.faceMap true k n) ≫ gridEvaluation u true false = + model.map (Globe.faceMap false k n) ≫ gridEvaluation u true true := by + simpa only [he] using hh true + have hl : model.map (Globe.faceMap true l n) ≫ gridEvaluation u false false = + model.map (Globe.faceMap false l n) ≫ gridEvaluation u true false := by + simpa only [he] using hv false + have hr : model.map (Globe.faceMap true l n) ≫ gridEvaluation u false true = + model.map (Globe.faceMap false l n) ≫ gridEvaluation u true true := by + simpa only [he] using hv true + have hV' : model.map (Globe.faceMap true l n) ≫ + composite (hkl.trans hln) (gridEvaluation u false false) (gridEvaluation u false true) ht = + model.map (Globe.faceMap false l n) ≫ + composite (hkl.trans hln) (gridEvaluation u true false) (gridEvaluation u true true) hb := by + simpa only [he] using hV + have hH' : model.map (Globe.faceMap true k n) ≫ + composite hln (gridEvaluation u false false) (gridEvaluation u true false) hl = + model.map (Globe.faceMap false k n) ≫ + composite hln (gridEvaluation u false true) (gridEvaluation u true true) hr := by + simpa only [he] using hH + simpa only [he] using grid_interchange hln u ht hb hl hr hV' hH' + +/-- Interchange on the images of four finite representatives. -/ +theorem interchange_ι (hkl : k < l) (hln : l < n) + (f : Bool → Bool → (model.obj (Globe.category n) ⟶ D)) + (hh : ∀ b, GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (f b false)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (f b true))) + (hv : ∀ a, GlobeMappingCells.face model D true l (GlobeMappingCells.ι model D n (f false a)) = + GlobeMappingCells.face model D false l (GlobeMappingCells.ι model D n (f true a))) + (hV : GlobeMappingCells.face model D true l + (comp k (GlobeMappingCells.ι model D n (f false false)) + (GlobeMappingCells.ι model D n (f false true)) (hh false)) = + GlobeMappingCells.face model D false l + (comp k (GlobeMappingCells.ι model D n (f true false)) + (GlobeMappingCells.ι model D n (f true true)) (hh true))) + (hH : GlobeMappingCells.face model D true k + (comp l (GlobeMappingCells.ι model D n (f false false)) + (GlobeMappingCells.ι model D n (f true false)) (hv false)) = + GlobeMappingCells.face model D false k + (comp l (GlobeMappingCells.ι model D n (f false true)) + (GlobeMappingCells.ι model D n (f true true)) (hv true))) : + comp l + (comp k (GlobeMappingCells.ι model D n (f false false)) + (GlobeMappingCells.ι model D n (f false true)) (hh false)) + (comp k (GlobeMappingCells.ι model D n (f true false)) + (GlobeMappingCells.ι model D n (f true true)) (hh true)) hV = + comp k + (comp l (GlobeMappingCells.ι model D n (f false false)) + (GlobeMappingCells.ι model D n (f true false)) (hv false)) + (comp l (GlobeMappingCells.ι model D n (f false true)) + (GlobeMappingCells.ι model D n (f true true)) (hv true)) hH := by + have hhF (b) := (GlobeMappingCells.faces_eq_iff model D true false k n n + (f b false) (f b true)).mp (hh b) + have hvF (a) := (GlobeMappingCells.faces_eq_iff model D true false l n n + (f false a) (f true a)).mp (hv a) + have heH (b) := comp_ι (hkl.trans hln) (f b false) (f b true) (hhF b) (hh b) + have heV (a) := comp_ι hln (f false a) (f true a) (hvF a) (hv a) + have hV' : GlobeMappingCells.face model D true l + (GlobeMappingCells.ι model D n + (composite (hkl.trans hln) (f false false) (f false true) (hhF false))) = + GlobeMappingCells.face model D false l + (GlobeMappingCells.ι model D n + (composite (hkl.trans hln) (f true false) (f true true) (hhF true))) := + (congrArg (GlobeMappingCells.face model D true l) (heH false)).symm.trans + (hV.trans (congrArg (GlobeMappingCells.face model D false l) (heH true))) + have hH' : GlobeMappingCells.face model D true k + (GlobeMappingCells.ι model D n + (composite hln (f false false) (f true false) (hvF false))) = + GlobeMappingCells.face model D false k + (GlobeMappingCells.ι model D n + (composite hln (f false true) (f true true) (hvF true))) := + (congrArg (GlobeMappingCells.face model D true k) (heV false)).symm.trans + (hH.trans (congrArg (GlobeMappingCells.face model D false k) (heV true))) + have hVF := (GlobeMappingCells.faces_eq_iff model D true false l n n _ _).mp hV' + have hHF := (GlobeMappingCells.faces_eq_iff model D true false k n n _ _).mp hH' + exact (comp_congr (heH false) (heH true) hV hV').trans + ((comp_ι hln _ _ hVF hV').trans + ((congrArg (GlobeMappingCells.ι model D n) + (composite_interchange hkl hln f hhF hvF hVF hHF)).trans + ((comp_ι (hkl.trans hln) _ _ hHF hH').symm.trans + (comp_congr (heV false) (heV true) hH hH').symm))) + +/-- Interchange for any four matching cells of the actual mapping carrier. -/ +theorem interchange_family (k l : ℕ) (hkl : k < l) (x : Bool → Bool → Cell D) + (hh : ∀ b, GlobeMappingCells.face model D true k (x b false) = + GlobeMappingCells.face model D false k (x b true)) + (hv : ∀ a, GlobeMappingCells.face model D true l (x false a) = + GlobeMappingCells.face model D false l (x true a)) + (hV : GlobeMappingCells.face model D true l (comp k (x false false) (x false true) (hh false)) = + GlobeMappingCells.face model D false l (comp k (x true false) (x true true) (hh true))) + (hH : GlobeMappingCells.face model D true k (comp l (x false false) (x true false) (hv false)) = + GlobeMappingCells.face model D false k (comp l (x false true) (x true true) (hv true))) : + comp l (comp k (x false false) (x false true) (hh false)) + (comp k (x true false) (x true true) (hh true)) hV = + comp k (comp l (x false false) (x true false) (hv false)) + (comp l (x false true) (x true true) (hv true)) hH := by + obtain ⟨n, hn, f, hf⟩ := GlobeMappingCells.exists_representatives_finite_above model D + (fun i : Bool × Bool => x i.1 i.2) (l+1) + have hln : l < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self l) hn + let F (b a) := f (b, a) + have he (b a) : GlobeMappingCells.ι model D n (F b a) = x b a := hf (b, a) + have hh' (b) : GlobeMappingCells.face model D true k (GlobeMappingCells.ι model D n (F b false)) = + GlobeMappingCells.face model D false k (GlobeMappingCells.ι model D n (F b true)) := by + simpa only [he] using hh b + have hv' (a) : GlobeMappingCells.face model D true l (GlobeMappingCells.ι model D n (F false a)) = + GlobeMappingCells.face model D false l (GlobeMappingCells.ι model D n (F true a)) := by + simpa only [he] using hv a + have hV' : GlobeMappingCells.face model D true l + (comp k (GlobeMappingCells.ι model D n (F false false)) + (GlobeMappingCells.ι model D n (F false true)) (hh' false)) = + GlobeMappingCells.face model D false l + (comp k (GlobeMappingCells.ι model D n (F true false)) + (GlobeMappingCells.ι model D n (F true true)) (hh' true)) := by + simpa only [he] using hV + have hH' : GlobeMappingCells.face model D true k + (comp l (GlobeMappingCells.ι model D n (F false false)) + (GlobeMappingCells.ι model D n (F true false)) (hv' false)) = + GlobeMappingCells.face model D false k + (comp l (GlobeMappingCells.ι model D n (F false true)) + (GlobeMappingCells.ι model D n (F true true)) (hv' true)) := by + simpa only [he] using hH + simpa only [he] using interchange_ι hkl hln F hh' hv' hV' hH' + +/-- The strict interchange law in the usual four-cell notation. -/ +theorem interchange (k l : ℕ) (hkl : k < l) (a b c d : Cell D) + (hab : GlobeMappingCells.face model D true k a = GlobeMappingCells.face model D false k b) + (hcd : GlobeMappingCells.face model D true k c = GlobeMappingCells.face model D false k d) + (hac : GlobeMappingCells.face model D true l a = GlobeMappingCells.face model D false l c) + (hbd : GlobeMappingCells.face model D true l b = GlobeMappingCells.face model D false l d) + (hl : GlobeMappingCells.face model D true l (comp k a b hab) = + GlobeMappingCells.face model D false l (comp k c d hcd)) + (hr : GlobeMappingCells.face model D true k (comp l a c hac) = + GlobeMappingCells.face model D false k (comp l b d hbd)) : + comp l (comp k a b hab) (comp k c d hcd) hl = + comp k (comp l a c hac) (comp l b d hbd) hr := by + let x (r s : Bool) : Cell D := if r then (if s then d else c) else (if s then b else a) + have hh (r) : GlobeMappingCells.face model D true k (x r false) = + GlobeMappingCells.face model D false k (x r true) := by + cases r + · exact hab + · exact hcd + have hv (s) : GlobeMappingCells.face model D true l (x false s) = + GlobeMappingCells.face model D false l (x true s) := by + cases s + · exact hac + · exact hbd + exact interchange_family k l hkl x hh hv hl hr + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # Currying an actual chain-cylinder map on cells + +For any strict category C, a map from its concrete chain model evaluates +all finite globe representatives. The resulting mapping cells are +independent of the chosen bounds and preserve faces and composition. +This supplies naturality on all finite parameters for the right adjunction. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.GrayMapping + +open CategoryTheory + +noncomputable section + +variable {C D E : StrictOmegaCategory.{0}} + +private theorem curry_rep_lower (u : model.obj C ⟶ D) (x : C) {n m : ℕ} + (hx : C.DimensionLE n x) (hm : C.DimensionLE m x) (hnm : n ≤ m) : + GlobeMappingCells.ι model D m (model.map (Globe.lift C x hm) ≫ u) = + GlobeMappingCells.ι model D n (model.map (Globe.lift C x hx) ≫ u) := by + have he : Globe.lift C x hm = Globe.lower m n hnm ≫ Globe.lift C x hx := by + apply Globe.hom_ext + rfl + rw [he, model.map_comp, Category.assoc, GlobeMappingCells.ι_lower] + +def cellCurry (u : model.obj C ⟶ D) (x : C) : Cell D := + GlobeMappingCells.ι model D (Classical.choose (C.finite_dimension x)) + (model.map (Globe.lift C x (Classical.choose_spec (C.finite_dimension x))) ≫ u) + +/-- Every dimension bound computes the same curried cell. -/ +theorem cellCurry_eq (u : model.obj C ⟶ D) (x : C) {n : ℕ} (hx : C.DimensionLE n x) : + cellCurry u x = GlobeMappingCells.ι model D n (model.map (Globe.lift C x hx) ≫ u) := by + let r := Classical.choose (C.finite_dimension x) + have hr : C.DimensionLE r x := Classical.choose_spec (C.finite_dimension x) + let m := max r n + have hm : C.DimensionLE m x := C.dimensionLE_mono (Nat.le_max_left _ _) hr + exact (curry_rep_lower u x hr hm (Nat.le_max_left _ _)).symm.trans + (curry_rep_lower u x hx hm (Nat.le_max_right _ _)) + +/-- Restriction to any bounded cell is exactly its globe representative. -/ +theorem cellCurry_globe (u : model.obj C ⟶ D) {n : ℕ} (s : Globe.category n ⟶ C) : + cellCurry u (s.toFun Globe.Cell.top) = GlobeMappingCells.ι model D n (model.map s ≫ u) := by + have hx := s.dimensionLE (Globe.category_truncated n Globe.Cell.top) + have hs : Globe.lift C (s.toFun Globe.Cell.top) hx = s := by + apply Globe.hom_ext + rfl + rw [cellCurry_eq u _ hx, hs] + +theorem cellCurry_face (u : model.obj C ⟶ D) (a : Bool) (r : ℕ) (x : C) : + cellCurry u (C.face a r x) = GlobeMappingCells.face model D a r (cellCurry u x) := by + obtain ⟨n, hn⟩ := C.finite_dimension x + have hx : C.DimensionLE n x := hn + rw [cellCurry_eq u _ (C.face_dimensionLE a r x), cellCurry_eq u x hx, + GlobeMappingCells.face_ι, ← Category.assoc, ← model.map_comp] + exact congrArg (fun q => GlobeMappingCells.ι model D r (model.map q ≫ u)) + (Globe.faceMap_lift C x hx a r).symm + +/-- Cellwise currying respects each defined composition. -/ +theorem cellCurry_comp (u : model.obj C ⟶ D) (k : ℕ) (x y : C) + (h : C.target k x = C.source k y) + (h' : GlobeMappingCells.face model D true k (cellCurry u x) = + GlobeMappingCells.face model D false k (cellCurry u y)) : + cellCurry u (C.comp k x y h) = comp k (cellCurry u x) (cellCurry u y) h' := by + obtain ⟨nx, hx⟩ := C.finite_dimension x + obtain ⟨ny, hy⟩ := C.finite_dimension y + let n := max (k+1) (max nx ny) + have hk : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_self k) (Nat.le_max_left _ _) + have hxn : C.DimensionLE n x := C.dimensionLE_mono + ((Nat.le_max_left _ _).trans (Nat.le_max_right _ _)) hx + have hyn : C.DimensionLE n y := C.dimensionLE_mono + ((Nat.le_max_right _ _).trans (Nat.le_max_right _ _)) hy + let f := model.map (Globe.lift C x hxn) ≫ u + let g := model.map (Globe.lift C y hyn) ≫ u + have hf : GlobeMappingCells.ι model D n f = cellCurry u x := (cellCurry_eq u x hxn).symm + have hg : GlobeMappingCells.ι model D n g = cellCurry u y := (cellCurry_eq u y hyn).symm + have hm := GlobeMappingCells.matching_representatives model D _ _ h' f g hf hg + have hm' := (GlobeMappingCells.faces_eq_iff model D true false k n n f g).mpr hm + let p := PastingGlobe.desc C x y hxn hyn h + have hpL : PastingGlobe.left n n k ≫ p = Globe.lift C x hxn := by + apply Globe.hom_ext + exact PastingGlobe.desc_left _ _ _ _ _ _ + have hpR : PastingGlobe.right n n k ≫ p = Globe.lift C y hyn := by + apply Globe.hom_ext + exact PastingGlobe.desc_right _ _ _ _ _ _ + have hcomp := C.dimensionLE_comp hk hxn hyn h + have hpC : compositionGlobe n k hk ≫ p = Globe.lift C (C.comp k x y h) hcomp := by + apply Globe.hom_ext + exact PastingGlobe.desc_composite _ _ _ _ _ _ + have hc := composite_evaluation_of_legs hk p u f g + (congrArg (fun q => model.map q ≫ u) hpL) + (congrArg (fun q => model.map q ≫ u) hpR) hm + rw [hpC] at hc + exact (cellCurry_eq u _ hcomp).trans + ((congrArg (GlobeMappingCells.ι model D n) hc).symm.trans + ((comp_ι hk f g hm hm').symm.trans (comp_congr hf hg hm' h'))) + +/-- Currying commutes with an arbitrary strict map of source categories. -/ +theorem cellCurry_precomp {B : StrictOmegaCategory.{0}} (s : B ⟶ C) + (u : model.obj C ⟶ D) (x : B) : + cellCurry (model.map s ≫ u) x = cellCurry u (s.toFun x) := by + obtain ⟨n, hx⟩ := B.finite_dimension x + rw [cellCurry_eq _ x hx, cellCurry_eq u _ (s.dimensionLE hx)] + have he : Globe.lift B x hx ≫ s = Globe.lift C (s.toFun x) (s.dimensionLE hx) := by + apply Globe.hom_ext + rfl + rw [← Category.assoc, ← model.map_comp, he] + +/-- Currying commutes with postcomposition in the target. -/ +theorem cellCurry_postcomp (u : model.obj C ⟶ D) (v : D ⟶ E) (x : C) : + cellCurry (u ≫ v) x = GlobeMappingCells.map model v (cellCurry u x) := by + obtain ⟨n, hx⟩ := C.finite_dimension x + rw [cellCurry_eq _ x hx, cellCurry_eq u x hx, GlobeMappingCells.map_ι, Category.assoc] + +end +end Thomason.Construction.StrictOmegaCategory.GrayMapping + +end + +section + +/-! # The three-globe basis is the actual strict abelianization -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +def top {n k : ℕ} (hkn : k < n) (i : Fin 3) : (complex n k hkn).realization := + (inclusion hkn i).realization.toFun (DirectedGlobeComplex.topCell n) + +theorem top_dimension {n k : ℕ} (hkn : k < n) (i : Fin 3) : + (complex n k hkn).realization.DimensionLE n (top hkn i) := + (inclusion hkn i).realization.dimensionLE (DirectedGlobeComplex.topCell_dimension n) + +theorem top_matching {n k : ℕ} (hkn : k < n) (i : Fin 2) : + (top hkn i.castSucc).face true k = (top hkn i.succ).face false k := by + apply Cell.ext + funext a p + change Cell.cutTable (top hkn i.castSucc) true k a p = + Cell.cutTable (top hkn i.succ) false k a p + by_cases hp : p < k + · have hpn : p < n := hp.trans hkn + simp only [Cell.cutTable, hp, ite_true] + change embedApp hkn i.castSucc p (DirectedGlobeComplex.topTable n a p) = + embedApp hkn i.succ p (DirectedGlobeComplex.topTable n a p) + simp [DirectedGlobeComplex.topTable, hpn, embed, hp] + · by_cases he : p = k + · subst p + simp only [Cell.cutTable, Nat.lt_irrefl, ite_false, ite_true] + change embedApp hkn i.castSucc k (DirectedGlobeComplex.topTable n true k) = + embedApp hkn i.succ k (DirectedGlobeComplex.topTable n false k) + fin_cases i <;> simp [DirectedGlobeComplex.topTable, hkn, embed, predecessor] + · simp only [Cell.cutTable, hp, he, ite_false] + +def fromTriple {n k : ℕ} (hkn : k < n) : + StrictOmegaCategory.TripleGlobe.category n k ⟶ (complex n k hkn).realization := + StrictOmegaCategory.TripleGlobe.desc _ (top hkn) (top_dimension hkn) (top_matching hkn) + +@[simp] theorem fromTriple_cell {n k : ℕ} (hkn : k < n) (i : Fin 3) : + (fromTriple hkn).toFun (StrictOmegaCategory.TripleGlobe.cell n k i) = top hkn i := + StrictOmegaCategory.TripleGlobe.desc_cell _ _ _ _ i + +def abelianizationToBasis {n k : ℕ} (hkn : k < n) : + Hom (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.TripleGlobe.category n k)) (complex n k hkn) := + StrictOmegaCategory.Abelianization.evaluateHom (fromTriple hkn) + +theorem unit_matching {n k : ℕ} (i : Fin 2) : + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.TripleGlobe.cell n k i.castSucc)).face true k = + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.TripleGlobe.cell n k i.succ)).face false k := by + rw [← StrictOmegaCategory.Abelianization.unitCell_face, + ← StrictOmegaCategory.Abelianization.unitCell_face] + exact congrArg (StrictOmegaCategory.Abelianization.unitCell _) + (StrictOmegaCategory.TripleGlobe.adjacent_matching n k i) + +def basisToAbelianization {n k : ℕ} (hkn : k < n) : + Hom (complex n k hkn) (StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.TripleGlobe.category n k)) := + desc hkn (fun i => StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.TripleGlobe.cell n k i)) unit_matching + +theorem desc_top {n k : ℕ} {L : DirectedComplex.{0}} (hkn : k < n) + (x : Fin 3 → Cell L) + (hm : ∀ i : Fin 2, (x i.castSucc).face true k = (x i.succ).face false k) + (i : Fin 3) (hb : L.realization.DimensionLE n (x i)) : + (desc hkn x hm).realization.toFun (top hkn i) = x i := by + have h := congrArg (fun f : Hom (DirectedGlobeComplex.complex n) L => + f.realization.toFun (DirectedGlobeComplex.topCell n)) (inclusion_desc hkn x hm i) + exact h.trans (DirectedGlobeComplex.cellMap_top_of_bounded n _ hb) + +theorem abelianizationToBasis_unit {n k : ℕ} (hkn : k < n) + (x : StrictOmegaCategory.TripleGlobe.category n k) : + (abelianizationToBasis hkn).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ x) = (fromTriple hkn).toFun x := + congrArg (fun f => f.toFun x) + (StrictOmegaCategory.Abelianization.unit_evaluate (fromTriple hkn)) + +theorem basisToAbelianization_top {n k : ℕ} (hkn : k < n) (i : Fin 3) : + (basisToAbelianization hkn).realization.toFun (top hkn i) = + StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.TripleGlobe.cell n k i) := by + exact desc_top hkn _ unit_matching i + ((StrictOmegaCategory.Abelianization.unit _).dimensionLE + (StrictOmegaCategory.TripleGlobe.cell_dimension n k i)) + +theorem abelianizationToBasis_inverse {n k : ℕ} (hkn : k < n) : + Hom.comp (abelianizationToBasis hkn) (basisToAbelianization hkn) = Hom.id _ := by + apply (StrictOmegaCategory.Abelianization.homEquiv + (StrictOmegaCategory.TripleGlobe.category n k) _).injective + apply StrictOmegaCategory.TripleGlobe.hom_ext + intro i + change (basisToAbelianization hkn).realization.toFun + ((abelianizationToBasis hkn).realization.toFun + (StrictOmegaCategory.Abelianization.unitCell _ + (StrictOmegaCategory.TripleGlobe.cell n k i))) = _ + rw [abelianizationToBasis_unit, fromTriple_cell] + exact basisToAbelianization_top hkn i + +theorem basisToAbelianization_inverse {n k : ℕ} (hkn : k < n) : + Hom.comp (basisToAbelianization hkn) (abelianizationToBasis hkn) = Hom.id _ := by + apply hom_ext hkn + intro i + apply (DirectedGlobeComplex.homEquiv n (complex n k hkn)).injective + apply Subtype.ext + change (abelianizationToBasis hkn).realization.toFun + ((basisToAbelianization hkn).realization.toFun (top hkn i)) = top hkn i + rw [basisToAbelianization_top, abelianizationToBasis_unit, fromTriple_cell] + +def abelianizationIso {n k : ℕ} (hkn : k < n) : + StrictOmegaCategory.Abelianization.complex + (StrictOmegaCategory.TripleGlobe.category n k) ≅ complex n k hkn where + hom := abelianizationToBasis hkn + inv := basisToAbelianization hkn + hom_inv_id := abelianizationToBasis_inverse hkn + inv_hom_id := basisToAbelianization_inverse hkn + +end +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # Atomic images of the pair and final globe in the triple -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory + +noncomputable section + +theorem embed_lower {n k p q : ℕ} (hkn : k < n) (i : Fin 3) + (b : DirectedGlobeComplex.Basis n p) (c : DirectedGlobeComplex.Basis n q) + (hqp : q < p) : embed hkn i c = embed hkn (embed hkn i b).val.1 c := by + by_cases hp : p < k + · simp [embed, show q < k by omega] + · by_cases he : p = k + · simp [embed, show q < k by omega] + · simp [embed, hp, he] + +theorem inclusion_basisAtom {n k p : ℕ} (hkn : k < n) (i : Fin 3) + (b : DirectedGlobeComplex.Basis n p) : + (inclusion hkn i).realization.toFun (DirectedGlobeComplex.basisAtom n p b) = + atom hkn (embed hkn i b) := by + apply Cell.ext + funext side q + change embedApp hkn i q ((DirectedGlobeComplex.basisAtom n p b).table side q) = _ + rcases lt_trichotomy q p with hqp | rfl | hpq + · rw [DirectedGlobeComplex.basisAtom_below n p b q hqp side, + embedApp_single, atom_below hkn (embed hkn i b) hqp side] + congr 1 + exact embed_lower hkn i b _ hqp + · rw [DirectedGlobeComplex.basisAtom_top, embedApp_single, atom_top] + · rw [DirectedGlobeComplex.basisAtom_above n p b q hpq side] + change embedApp hkn i q (0 : DirectedGlobeComplex.Chains n q) = _ + rw [map_zero, atom_above hkn (embed hkn i b) hpq side] + rfl + +def pairCopy (s : Bool) : Fin 3 := if s then 1 else 0 + +def pairEmbed {n k p : ℕ} (hkn : k < n) (b : PastingGlobeBasis.Basis n k p) : + Basis n k p := + embed hkn (pairCopy b.val.1) ⟨b.val.2, b.property.1⟩ + +def pairInclusion {n k : ℕ} (hkn : k < n) : + Hom (PastingGlobeBasis.complex n k hkn) (complex n k hkn) := + PastingGlobeBasis.desc hkn (top hkn 0) (top hkn 1) (top_matching hkn 0) + +theorem inclusion_pairInclusion {n k : ℕ} (hkn : k < n) (s : Bool) : + Hom.comp (PastingGlobeBasis.inclusion hkn s) (pairInclusion hkn) = + inclusion hkn (pairCopy s) := by + apply (DirectedGlobeComplex.homEquiv n (complex n k hkn)).injective + apply Subtype.ext + change (pairInclusion hkn).realization.toFun (PastingGlobeBasis.top hkn s) = + top hkn (pairCopy s) + cases s <;> exact PastingGlobeBasis.desc_top hkn _ _ (top_matching hkn 0) _ + (top_dimension hkn _) + +theorem pairInclusion_atom {n k p : ℕ} (hkn : k < n) + (b : PastingGlobeBasis.Basis n k p) : + (pairInclusion hkn).realization.toFun (PastingGlobeBasis.atom hkn b) = + atom hkn (pairEmbed hkn b) := by + have he := congrArg (fun f : Hom (DirectedGlobeComplex.complex n) (complex n k hkn) => + f.realization.toFun (DirectedGlobeComplex.basisAtom n p ⟨b.val.2, b.property.1⟩)) + (inclusion_pairInclusion hkn b.val.1) + exact he.trans (inclusion_basisAtom hkn (pairCopy b.val.1) _) + +def globeCylinderIndex {n k : ℕ} (hkn : k < n) (i : Fin 3) : + {p : ℕ} → (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p → + (cylinderOrderedAtomBasis hkn).Index p + | _, .endpoint a b => .endpoint a (embed hkn i b) + | _, .mixed b => .mixed (embed hkn i b) + +def pairCylinderIndex {n k : ℕ} (hkn : k < n) : + {p : ℕ} → PastingGlobeCylinderBasis.Basis n k p → + (cylinderOrderedAtomBasis hkn).Index p + | _, .endpoint a b => .endpoint a (pairEmbed hkn b) + | _, .mixed b => .mixed (pairEmbed hkn b) + +theorem globeCylinder_atom {n k p : ℕ} (hkn : k < n) (i : Fin 3) + (b : (DirectedGlobeComplex.cylinderOrderedAtomBasis n).Index p) : + (RightCylinder.map (inclusion hkn i)).realization.toFun + ((DirectedGlobeComplex.cylinderOrderedAtomBasis n).atom p b) = + (cylinderOrderedAtomBasis hkn).atom p (globeCylinderIndex hkn i b) := by + cases b with + | endpoint a b => + have he : Cell.map (RightCylinder.map (inclusion hkn i)) + (Cell.map (RightCylinder.endpoint _ a) (DirectedGlobeComplex.basisAtom n p b)) = + Cell.map (RightCylinder.endpoint _ a) + (Cell.map (inclusion hkn i) (DirectedGlobeComplex.basisAtom n p b)) := by + apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (inclusion hkn i) a q _ + exact he.trans (congrArg (Cell.map (RightCylinder.endpoint _ a)) + (inclusion_basisAtom hkn i b)) + | @mixed r b => + exact (RightCylinder.prism_naturality (inclusion hkn i) + (DirectedGlobeComplex.basisAtom n r b)).trans + (congrArg RightCylinder.prism (inclusion_basisAtom hkn i b)) + +theorem pairCylinder_atom {n k p : ℕ} (hkn : k < n) + (b : PastingGlobeCylinderBasis.Basis n k p) : + (RightCylinder.map (pairInclusion hkn)).realization.toFun + (PastingGlobeCylinderBasis.atom hkn b) = + (cylinderOrderedAtomBasis hkn).atom p (pairCylinderIndex hkn b) := by + cases b with + | endpoint a b => + have he : Cell.map (RightCylinder.map (pairInclusion hkn)) + (Cell.map (RightCylinder.endpoint _ a) (PastingGlobeBasis.atom hkn b)) = + Cell.map (RightCylinder.endpoint _ a) + (Cell.map (pairInclusion hkn) (PastingGlobeBasis.atom hkn b)) := by + apply Cell.ext + funext c q + exact RightCylinder.map_endpoint (pairInclusion hkn) a q _ + exact he.trans (congrArg (Cell.map (RightCylinder.endpoint _ a)) + (pairInclusion_atom hkn b)) + | @mixed r b => + exact (RightCylinder.prism_naturality (pairInclusion hkn) + (PastingGlobeBasis.atom hkn b)).trans + (congrArg RightCylinder.prism (pairInclusion_atom hkn b)) + +end +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # Exact comparison of the triple's chain-model cylinder -/ + +namespace Thomason.Construction.TripleGlobeBasis + +open _root_.OAI.Thomason.Construction.DirectedComplex CategoryTheory StrictOmegaCategory + +noncomputable section + +theorem abelianization_globe {n k : ℕ} (hkn : k < n) (i : Fin 3) : + Abelianization.functor.map (TripleGlobe.inclusion n k i) ≫ (abelianizationIso hkn).hom = + (DirectedGlobeComplex.abelianizationIso n).hom ≫ inclusion hkn i := by + let a : Abelianization.functor.obj (Globe.category n) ⟶ complex n k hkn := + (DirectedGlobeComplex.abelianizationIso n).hom ≫ inclusion hkn i + let b : Abelianization.functor.obj (TripleGlobe.category n k) ⟶ complex n k hkn := + (abelianizationIso hkn).hom + change Abelianization.functor.map (TripleGlobe.inclusion n k i) ≫ b = a + apply (Abelianization.adjunction.homEquiv _ _).injective + rw [Abelianization.adjunction.homEquiv_naturality_left] + change TripleGlobe.inclusion n k i ≫ (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (fromTriple hkn)).realization) = + (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization) ≫ + (inclusion hkn i).realization + have ht : Abelianization.unit (TripleGlobe.category n k) ≫ + (Abelianization.evaluateHom (fromTriple hkn)).realization = fromTriple hkn := + Abelianization.unit_evaluate _ + have hg : Abelianization.unit (Globe.category n) ≫ + (Abelianization.evaluateHom (DirectedGlobeComplex.fromGlobe n)).realization = + DirectedGlobeComplex.fromGlobe n := Abelianization.unit_evaluate _ + rw [ht, hg] + apply Globe.hom_ext + exact fromTriple_cell hkn i + +theorem abelianization_pair {n k : ℕ} (hkn : k < n) : + Abelianization.functor.map (TripleGlobe.pair n k) ≫ (abelianizationIso hkn).hom = + (PastingGlobeBasis.abelianizationIso hkn).hom ≫ pairInclusion hkn := by + let a : Abelianization.functor.obj (PastingGlobe.category n n k) ⟶ complex n k hkn := + (PastingGlobeBasis.abelianizationIso hkn).hom ≫ pairInclusion hkn + let b : Abelianization.functor.obj (TripleGlobe.category n k) ⟶ complex n k hkn := + (abelianizationIso hkn).hom + change Abelianization.functor.map (TripleGlobe.pair n k) ≫ b = a + apply (Abelianization.adjunction.homEquiv _ _).injective + rw [Abelianization.adjunction.homEquiv_naturality_left] + change TripleGlobe.pair n k ≫ (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (fromTriple hkn)).realization) = + (Abelianization.unit _ ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting hkn)).realization) ≫ + (pairInclusion hkn).realization + have ht : Abelianization.unit (TripleGlobe.category n k) ≫ + (Abelianization.evaluateHom (fromTriple hkn)).realization = fromTriple hkn := + Abelianization.unit_evaluate _ + have hp : Abelianization.unit (PastingGlobe.category n n k) ≫ + (Abelianization.evaluateHom (PastingGlobeBasis.fromPasting hkn)).realization = + PastingGlobeBasis.fromPasting hkn := Abelianization.unit_evaluate _ + rw [ht, hp] + apply PastingGlobe.hom_ext + · change (fromTriple hkn).toFun (TripleGlobe.cell n k 0) = + (pairInclusion hkn).realization.toFun + ((PastingGlobeBasis.fromPasting hkn).toFun (PastingGlobe.leftCell n n k)) + have hl : (PastingGlobeBasis.fromPasting hkn).toFun (PastingGlobe.leftCell n n k) = + PastingGlobeBasis.top hkn false := PastingGlobe.desc_left _ _ _ _ _ _ + rw [fromTriple_cell, hl] + exact (PastingGlobeBasis.desc_top hkn _ _ (top_matching hkn 0) false + (top_dimension hkn 0)).symm + · change (fromTriple hkn).toFun (TripleGlobe.cell n k 1) = + (pairInclusion hkn).realization.toFun + ((PastingGlobeBasis.fromPasting hkn).toFun (PastingGlobe.rightCell n n k)) + have hr : (PastingGlobeBasis.fromPasting hkn).toFun (PastingGlobe.rightCell n n k) = + PastingGlobeBasis.top hkn true := PastingGlobe.desc_right _ _ _ _ _ _ + rw [fromTriple_cell, hr] + exact (PastingGlobeBasis.desc_top hkn _ _ (top_matching hkn 0) true + (top_dimension hkn 1)).symm + +def modelIso {n k : ℕ} (hkn : k < n) : + GrayChainExtension.model.obj (TripleGlobe.category n k) ≅ + (rightCylinder (complex n k hkn)).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso (abelianizationIso hkn) + +def globeModelIso (n : ℕ) : GrayChainExtension.model.obj (Globe.category n) ≅ + (rightCylinder (DirectedGlobeComplex.complex n)).realization := + (rightCylinderFunctor ⋙ realizationFunctor).mapIso (DirectedGlobeComplex.abelianizationIso n) + +theorem model_globe {n k : ℕ} (hkn : k < n) (i : Fin 3) : + GrayChainExtension.model.map (TripleGlobe.inclusion n k i) ≫ (modelIso hkn).hom = + (globeModelIso n).hom ≫ (RightCylinder.map (inclusion hkn i)).realization := by + let T := rightCylinderFunctor ⋙ realizationFunctor + exact (T.map_comp (Abelianization.functor.map (TripleGlobe.inclusion n k i)) + (abelianizationIso hkn).hom).symm.trans + ((congrArg T.map (abelianization_globe hkn i)).trans + (T.map_comp (DirectedGlobeComplex.abelianizationIso n).hom (inclusion hkn i))) + +theorem model_pair {n k : ℕ} (hkn : k < n) : + GrayChainExtension.model.map (TripleGlobe.pair n k) ≫ (modelIso hkn).hom = + (PastingGlobeCylinderBasis.modelIso hkn).hom ≫ + (RightCylinder.map (pairInclusion hkn)).realization := by + let T := rightCylinderFunctor ⋙ realizationFunctor + exact (T.map_comp (Abelianization.functor.map (TripleGlobe.pair n k)) + (abelianizationIso hkn).hom).symm.trans + ((congrArg T.map (abelianization_pair hkn)).trans + (T.map_comp (PastingGlobeBasis.abelianizationIso hkn).hom (pairInclusion hkn))) + +end +end Thomason.Construction.TripleGlobeBasis + +end + +section + +/-! # Split intersections for the pair and final globe of a triple + +The retractions are strict maps of the original parameters. Consequently +their identities remain valid after every functor, including the chain +cylinder model. +-/ + +namespace Thomason.Construction.StrictOmegaCategory.TripleGlobe + +open CategoryTheory CategoryTheory.Limits + +noncomputable section + +def collapsePair (n k : ℕ) (hkn : k ≤ n) : + PastingGlobe.category n n k ⟶ Globe.category k := + PastingGlobe.retractCommon n n k hkn hkn + +@[reassoc (attr := simp)] theorem bridge_collapsePair (n k : ℕ) (hkn : k ≤ n) : + bridge n k ≫ collapsePair n k hkn = 𝟙 _ := by + change (Globe.faceMap true k n ≫ PastingGlobe.right n n k) ≫ + PastingGlobe.retractCommon n n k hkn hkn = _ + rw [Category.assoc, PastingGlobe.right_retractCommon, PastingGlobe.collapseTo_face] + +def retractPair (n k : ℕ) (hkn : k ≤ n) : category n k ⟶ PastingGlobe.category n n k := + pushout.desc (𝟙 _) (PastingGlobe.collapseTo n k hkn ≫ bridge n k) (by + rw [Category.comp_id, ← Category.assoc, PastingGlobe.collapseTo_face, Category.id_comp]) + +def retractLast (n k : ℕ) (hkn : k ≤ n) : category n k ⟶ Globe.category n := + pushout.desc (collapsePair n k hkn ≫ Globe.faceMap false k n) (𝟙 _) (by + rw [← Category.assoc, bridge_collapsePair, Category.id_comp, Category.comp_id]) + +@[reassoc (attr := simp)] theorem pair_retractPair (n k : ℕ) (hkn : k ≤ n) : + pair n k ≫ retractPair n k hkn = 𝟙 _ := pushout.inl_desc _ _ _ + +@[reassoc (attr := simp)] theorem last_retractPair (n k : ℕ) (hkn : k ≤ n) : + inclusion n k 2 ≫ retractPair n k hkn = + PastingGlobe.collapseTo n k hkn ≫ bridge n k := pushout.inr_desc _ _ _ + +@[reassoc (attr := simp)] theorem pair_retractLast (n k : ℕ) (hkn : k ≤ n) : + pair n k ≫ retractLast n k hkn = collapsePair n k hkn ≫ Globe.faceMap false k n := + pushout.inl_desc _ _ _ + +@[reassoc (attr := simp)] theorem last_retractLast (n k : ℕ) (hkn : k ≤ n) : + inclusion n k 2 ≫ retractLast n k hkn = 𝟙 _ := pushout.inr_desc _ _ _ + +variable (F : StrictOmegaCategory.{0} ⥤ StrictOmegaCategory.{0}) + +abbrev ImageSource (n k : ℕ) : StrictOmegaCategory.{0} := + pushout (F.map (bridge n k)) (F.map (Globe.faceMap false k n)) + +def imageCell (n k : ℕ) : + (F.obj (PastingGlobe.category n n k) ⊕ F.obj (Globe.category n)) → ImageSource F n k + | .inl x => (pushout.inl (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun x + | .inr x => (pushout.inr (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun x + +def targetCell (n k : ℕ) : + (F.obj (PastingGlobe.category n n k) ⊕ F.obj (Globe.category n)) → + F.obj (category n k) + | .inl x => (F.map (pair n k)).toFun x + | .inr x => (F.map (inclusion n k 2)).toFun x + +theorem cross_image_eq (n k : ℕ) (hkn : k ≤ n) + (x : F.obj (PastingGlobe.category n n k)) (y : F.obj (Globe.category n)) + (he : (F.map (pair n k)).toFun x = (F.map (inclusion n k 2)).toFun y) : + (pushout.inl (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun x = + (pushout.inr (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun y := by + let z := (F.map (PastingGlobe.collapseTo n k hkn)).toFun y + have hx : x = (F.map (bridge n k)).toFun z := by + have hh := congrArg (F.map (retractPair n k hkn)).toFun he + have hl := congrArg (fun u => u.toFun x) + (show F.map (pair n k) ≫ F.map (retractPair n k hkn) = 𝟙 _ by + rw [← F.map_comp, pair_retractPair, F.map_id]) + have hr := congrArg (fun u => u.toFun y) + (show F.map (inclusion n k 2) ≫ F.map (retractPair n k hkn) = + F.map (PastingGlobe.collapseTo n k hkn) ≫ F.map (bridge n k) by + rw [← F.map_comp, last_retractPair, F.map_comp]) + exact hl.symm.trans (hh.trans hr) + have hc : (F.map (collapsePair n k hkn)).toFun x = z := by + rw [hx] + exact congrArg (fun u => u.toFun z) + (show F.map (bridge n k) ≫ F.map (collapsePair n k hkn) = 𝟙 _ by + rw [← F.map_comp, bridge_collapsePair, F.map_id]) + have hy : (F.map (Globe.faceMap false k n)).toFun z = y := by + have hh := congrArg (F.map (retractLast n k hkn)).toFun he + have hl := congrArg (fun u => u.toFun x) + (show F.map (pair n k) ≫ F.map (retractLast n k hkn) = + F.map (collapsePair n k hkn) ≫ F.map (Globe.faceMap false k n) by + rw [← F.map_comp, pair_retractLast, F.map_comp]) + have hr := congrArg (fun u => u.toFun y) + (show F.map (inclusion n k 2) ≫ F.map (retractLast n k hkn) = 𝟙 _ by + rw [← F.map_comp, last_retractLast, F.map_id]) + exact (congrArg (F.map (Globe.faceMap false k n)).toFun hc).symm.trans + (hl.symm.trans (hh.trans hr)) + rw [hx, ← hy] + exact congrArg (fun u : F.obj (Globe.category k) ⟶ ImageSource F n k => u.toFun z) + (pushout.condition (f := F.map (bridge n k)) (g := F.map (Globe.faceMap false k n))) + +/-- Equal target piece cells are already equal in the source pushout. -/ +theorem imageCell_eq (n k : ℕ) (hkn : k ≤ n) + (x y : F.obj (PastingGlobe.category n n k) ⊕ F.obj (Globe.category n)) + (he : targetCell F n k x = targetCell F n k y) : + imageCell F n k x = imageCell F n k y := by + cases x with + | inl x => + cases y with + | inl y => + have hh := congrArg (F.map (retractPair n k hkn)).toFun he + have hl := congrArg (fun u : F.obj (PastingGlobe.category n n k) ⟶ + F.obj (PastingGlobe.category n n k) => u.toFun) + (show F.map (pair n k) ≫ F.map (retractPair n k hkn) = 𝟙 _ by + rw [← F.map_comp, pair_retractPair, F.map_id]) + apply congrArg (pushout.inl (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun + exact (congrFun hl x).symm.trans (hh.trans (congrFun hl y)) + | inr y => exact cross_image_eq F n k hkn x y he + | inr x => + cases y with + | inl y => exact (cross_image_eq F n k hkn y x he.symm).symm + | inr y => + have hh := congrArg (F.map (retractLast n k hkn)).toFun he + have hr := congrArg (fun u : F.obj (Globe.category n) ⟶ F.obj (Globe.category n) => u.toFun) + (show F.map (inclusion n k 2) ≫ F.map (retractLast n k hkn) = 𝟙 _ by + rw [← F.map_comp, last_retractLast, F.map_id]) + apply congrArg (pushout.inr (F.map (bridge n k)) (F.map (Globe.faceMap false k n))).toFun + exact (congrFun hr x).symm.trans (hh.trans (congrFun hr y)) + +end +end Thomason.Construction.StrictOmegaCategory.TripleGlobe + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/GrayGenerators.lean b/lean/OAI/CategoryTheory/Thomason/GrayGenerators.lean new file mode 100644 index 0000000000000000000000000000000000000000..22c2efd701fb0202a33f2743dbd83157e30e794f --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/GrayGenerators.lean @@ -0,0 +1,791 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SquareClassification + +namespace OAI + +/-! Gray Generators. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex + +instance : DecidableEq Coordinates := fun x y => + decidable_of_iff (x.vertex = y.vertex ∧ x.edge = y.edge ∧ + x.face = y.face ∧ x.volume = y.volume) Coordinates.ext_iff.symm + +lemma code_injective : Function.Injective code := by decide + +def cell (i : Fin 23) : Table K.{u} := (code i).table (code_valid i) + +@[simp] lemma coordinates_cell (i : Fin 23) : coordinates (cell.{u} i) = code i := + Coordinates.coordinates_table _ _ + +lemma cell_injective : Function.Injective cell.{u} := by + intro i j h + exact code_injective (by simpa using congrArg coordinates h) + +lemma cell_surjective : Function.Surjective cell.{u} := by + intro t + obtain ⟨i, hi⟩ := is_code (coordinates t) (coordinates_valid t) + refine ⟨i, coordinates_injective ?_⟩ + exact (coordinates_cell i).trans hi.symm + +def cellEquiv : Fin 23 ≃ Table K.{u} := + Equiv.ofBijective cell ⟨cell_injective, cell_surjective⟩ + +def faceIndex (k : ℕ) (b : Bool) (i : Fin 23) : Fin 23 := + match k with + | 0 => if b then ![0, 16, 16, 16, 18, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 16, 22, 18, 22, 22, 22, 22] i + else ![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 18, 18, 18, 18, 22] i + | 1 => if b then ![0, 1, 1, 3, 4, 5, 13, 5, 8, 13, 13, 13, 15, 13, 13, 15, 16, 17, 18, 19, 19, 21, 22] i + else ![0, 1, 3, 3, 4, 5, 5, 8, 8, 8, 8, 8, 8, 13, 15, 15, 16, 17, 18, 19, 21, 21, 22] i + | 2 => if b then ![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22] i + else ![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22] i + | _ + 3 => i + +lemma faceIndex_three_add (k : ℕ) (b : Bool) (i : Fin 23) : + faceIndex (k + 3) b i = i := rfl + +lemma truncate_cell (k : ℕ) (b : Bool) (i : Fin 23) : + truncate k b (cell.{u} i) = cell (faceIndex k b i) := by + rcases k with _ | _ | _ | k + · apply coordinates_injective + revert i b + decide + · apply coordinates_injective + revert i b + decide + · apply coordinates_injective + revert i b + decide + · rw [faceIndex_three_add] + have h := K.nu.source_fixed_upwards (show 3 ≤ k+3 by omega) (bounded (cell i)) + cases b + · exact h + · exact K.nu.target_eq_self_of_source_eq_self h + +lemma cell_composable_iff (k : ℕ) (i j : Fin 23) : + truncate k true (cell.{u} i) = truncate k false (cell j) ↔ + faceIndex k true i = faceIndex k false j := by + rw [truncate_cell, truncate_cell, cell_injective.eq_iff] + +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.OmegaCategory + +lemma comp_of_right_source_fixed (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) + (h : C.target k x = C.source k y) (hy : C.source k y = y) : + C.comp k x y h = x := by + have hy' : y = C.target k x := (h.trans hy).symm + subst y + exact C.unit_right k x h + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex + +def composite (e : Fin 8) : ℕ × Fin 23 × Fin 23 × Fin 23 := + ![(0, 1, 17, 13), (0, 2, 17, 14), (0, 3, 17, 15), + (0, 4, 19, 5), (0, 4, 20, 7), (0, 4, 21, 8), + (1, 7, 6, 9), (1, 12, 14, 11)] e + +lemma composite_match (e : Fin 8) : + faceIndex (composite e).1 true (composite e).2.1 = + faceIndex (composite e).1 false (composite e).2.2.1 := by + revert e + decide + +lemma composite_eq (e : Fin 8) : + K.nu.comp (composite e).1 (cell.{u} (composite e).2.1) + (cell (composite e).2.2.1) ((cell_composable_iff _ _ _).2 (composite_match e)) = + cell (composite e).2.2.2 := by + apply coordinates_injective + revert e + decide + +lemma composable_cases (k : ℕ) (i j : Fin 23) + (h : faceIndex k true i = faceIndex k false j) : + faceIndex k false i = i ∨ faceIndex k false j = j ∨ + ∃ e : Fin 8, (composite e).1 = k ∧ (composite e).2.1 = i ∧ + (composite e).2.2.1 = j := by + rcases k with _ | _ | _ | k + · revert i j + decide + · revert i j + decide + · revert i j + decide + · exact Or.inl rfl + +structure Diagram (X : OmegaCategory.{v}) where + obj : Fin 23 → X.Cell + faces : ∀ k b i, X.face k b (obj i) = obj (faceIndex k b i) + composites : ∀ e : Fin 8, + X.comp (composite e).1 (obj (composite e).2.1) (obj (composite e).2.2.1) + (by + change X.face (composite e).1 true _ = X.face (composite e).1 false _ + rw [faces, faces, composite_match]) = obj (composite e).2.2.2 + +namespace Diagram +variable {X : OmegaCategory.{v}} (D : Diagram X) + +lemma source_obj (k : ℕ) (i : Fin 23) : X.source k (D.obj i) = D.obj (faceIndex k false i) := + D.faces k false i +lemma target_obj (k : ℕ) (i : Fin 23) : X.target k (D.obj i) = D.obj (faceIndex k true i) := + D.faces k true i + +def evaluate (t : Table K.{u}) : X.Cell := D.obj (cellEquiv.symm t) + +@[simp] lemma evaluate_cell (i : Fin 23) : D.evaluate (cell.{u} i) = D.obj i := + congrArg D.obj (cellEquiv.symm_apply_apply i) + +lemma evaluate_comp (k : ℕ) (i j : Fin 23) + (h : K.nu.target k (cell.{u} i) = K.nu.source k (cell j)) + (h' : X.target k (D.obj i) = X.source k (D.obj j)) : + D.evaluate (K.nu.comp k (cell i) (cell j) h) = X.comp k (D.obj i) (D.obj j) h' := by + rcases composable_cases k i j ((cell_composable_iff _ _ _).1 h) with hl | hr | ⟨e, he⟩ + · have hl' : K.nu.source k (cell.{u} i) = cell i := by + change truncate k false (cell i) = cell i + rw [truncate_cell, hl] + rw [K.nu.comp_of_left_source_fixed k _ _ h hl', evaluate_cell, + X.comp_of_left_source_fixed k _ _ h' (by rw [D.source_obj, hl])] + · have hr' : K.nu.source k (cell.{u} j) = cell j := by + change truncate k false (cell j) = cell j + rw [truncate_cell, hr] + rw [K.nu.comp_of_right_source_fixed k _ _ h hr', evaluate_cell, + X.comp_of_right_source_fixed k _ _ h' (by rw [D.source_obj, hr])] + · obtain ⟨rfl, rfl, rfl⟩ := he + rw [composite_eq, evaluate_cell] + exact (D.composites e).symm + +def lift : OmegaCategory.Functor K.{u}.nu X where + map := D.evaluate + map_source k t := by + obtain ⟨i, rfl⟩ := cell_surjective t + change D.evaluate (truncate k false (cell i)) = X.source k (D.evaluate (cell i)) + rw [truncate_cell, evaluate_cell, evaluate_cell, D.source_obj] + map_target k t := by + obtain ⟨i, rfl⟩ := cell_surjective t + change D.evaluate (truncate k true (cell i)) = X.target k (D.evaluate (cell i)) + rw [truncate_cell, evaluate_cell, evaluate_cell, D.target_obj] + map_comp k s t h h' := by + obtain ⟨i, rfl⟩ := cell_surjective s + obtain ⟨j, rfl⟩ := cell_surjective t + have h'' : X.target k (D.obj i) = X.source k (D.obj j) := by + simpa only [evaluate_cell] using h' + simpa only [evaluate_cell] using D.evaluate_comp k i j h h'' + +@[simp] lemma lift_cell (i : Fin 23) : D.lift.map (cell.{u} i) = D.obj i := + D.evaluate_cell i + +end Diagram + +lemma functor_ext {X : OmegaCategory.{v}} (F G : OmegaCategory.Functor K.{u}.nu X) + (h : ∀ i, F.map (cell i) = G.map (cell i)) : F = G := by + apply OmegaCategory.Functor.ext + funext t + obtain ⟨i, rfl⟩ := cell_surjective t + exact h i + +def diagramOfFunctor {X : OmegaCategory.{v}} (F : OmegaCategory.Functor K.{u}.nu X) : Diagram X where + obj i := F.map (cell i) + faces k b i := by + erw [← F.map_face] + have h : K.nu.face k b (cell i) = cell (faceIndex k b i) := by + cases b <;> exact truncate_cell k _ i + rw [h] + composites e := by + rw [← F.map_comp _ _ _ ((cell_composable_iff _ _ _).2 (composite_match e)), composite_eq] + +@[simp] lemma diagramOfFunctor_lift {X : OmegaCategory.{v}} (F : OmegaCategory.Functor K.{u}.nu X) : + (diagramOfFunctor F).lift = F := by + apply functor_ext + intro i + exact Diagram.lift_cell _ i + +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z + + +namespace Thomason.OmegaCategory + +abbrev join (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) := + CellTerm.composeOrLeft C k x y + +lemma join_eq (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) + (h : C.target k x = C.source k y) : C.join k x y = C.comp k x y h := by + simp only [join, CellTerm.composeOrLeft, dite_eq_left h] + +lemma join_source_le (C : OmegaCategory.{u}) (i k : ℕ) (x y : C.Cell) + (hik : i ≤ k) (h : C.target k x = C.source k y) : + C.source i (C.join k x y) = C.source i x := by + rw [C.join_eq k x y h, C.source_comp_le i k hik] +lemma join_target_le (C : OmegaCategory.{u}) (i k : ℕ) (x y : C.Cell) + (hik : i ≤ k) (h : C.target k x = C.source k y) : + C.target i (C.join k x y) = C.target i y := by + rw [C.join_eq k x y h, C.target_comp_le i k hik] +lemma join_source_gt (C : OmegaCategory.{u}) (i k : ℕ) (x y : C.Cell) + (hki : k < i) (h : C.target k x = C.source k y) : + C.source i (C.join k x y) = C.join k (C.source i x) (C.source i y) := by + rw [C.join_eq k x y h, C.join_eq k _ _ (C.source_composable hki h), + C.source_comp_gt i k hki] +lemma join_target_gt (C : OmegaCategory.{u}) (i k : ℕ) (x y : C.Cell) + (hki : k < i) (h : C.target k x = C.source k y) : + C.target i (C.join k x y) = C.join k (C.target i x) (C.target i y) := by + rw [C.join_eq k x y h, C.join_eq k _ _ (C.target_composable hki h), + C.target_comp_gt i k hki] + +lemma join_left_unit (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) + (hx : C.source k x = x) (h : C.target k x = C.source k y) : + C.join k x y = y := by + rw [C.join_eq k x y h, C.comp_of_left_source_fixed k x y h hx] +lemma join_right_unit (C : OmegaCategory.{u}) (k : ℕ) (x y : C.Cell) + (hy : C.source k y = y) (h : C.target k x = C.source k y) : + C.join k x y = x := by + rw [C.join_eq k x y h, C.comp_of_right_source_fixed k x y h hy] + +lemma join_assoc (C : OmegaCategory.{u}) (k : ℕ) (x y z : C.Cell) + (hxy : C.target k x = C.source k y) (hyz : C.target k y = C.source k z) : + C.join k (C.join k x y) z = C.join k x (C.join k y z) := by + rw [C.join_eq k x y hxy, C.join_eq k y z hyz, + C.join_eq k _ z (C.assoc_composable_left hxy hyz), + C.join_eq k x _ (C.assoc_composable_right hxy hyz)] + exact C.assoc k x y z _ _ _ _ + +lemma join_four (C : OmegaCategory.{u}) (k : ℕ) (a b c d : C.Cell) + (hab : C.target k a = C.source k b) (hbc : C.target k b = C.source k c) + (hcd : C.target k c = C.source k d) : + C.join k (C.join k a b) (C.join k c d) = C.join k a (C.join k (C.join k b c) d) := by + have hb_cd : C.target k b = C.source k (C.join k c d) := by + rw [C.join_source_le k k c d le_rfl hcd]; exact hbc + rw [C.join_assoc k a b (C.join k c d) hab hb_cd, C.join_assoc k b c d hbc hcd] + +lemma join_four_middle (C : OmegaCategory.{u}) (k : ℕ) (a b c d e f : C.Cell) + (hab : C.target k a = C.source k b) (hbc : C.target k b = C.source k c) + (hcd : C.target k c = C.source k d) (hae : C.target k a = C.source k e) + (hef : C.target k e = C.source k f) (hfd : C.target k f = C.source k d) + (hm : C.join k b c = C.join k e f) : + C.join k (C.join k a b) (C.join k c d) = + C.join k (C.join k a e) (C.join k f d) := by + rw [C.join_four k a b c d hab hbc hcd, C.join_four k a e f d hae hef hfd, hm] + +lemma join_interchange (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b c d : C.Cell) + (hab : C.target l a = C.source l b) (hcd : C.target l c = C.source l d) + (hac : C.target k a = C.source k c) (hbd : C.target k b = C.source k d) : + C.join k (C.join l a b) (C.join l c d) = + C.join l (C.join k a c) (C.join k b d) := by + have h₁ : C.target k (C.comp l a b hab) = C.source k (C.comp l c d hcd) := by + rw [C.target_comp_le k l (by omega), C.source_comp_le k l (by omega)] + have he : C.target k a = C.target k b := by + have hh := congrArg (C.target k) hab + simpa only [C.target_target, min_eq_left (le_of_lt hkl), + C.target_source, ite_eq_left hkl] using hh + exact he.symm.trans hac + have h₂ : C.target l (C.comp k a c hac) = C.source l (C.comp k b d hbd) := by + rw [C.target_comp_gt l k hkl a c hac (C.target_composable hkl hac), + C.source_comp_gt l k hkl b d hbd (C.source_composable hkl hbd)] + simp only [hab, hcd] + rw [C.join_eq l a b hab, C.join_eq l c d hcd, + C.join_eq k a c hac, C.join_eq k b d hbd, + C.join_eq k _ _ h₁, C.join_eq l _ _ h₂] + exact C.interchange k l hkl a b c d _ _ _ _ _ _ + +lemma join_factor_right (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b : C.Cell) (h : C.target k a = C.source k b) : + C.join k a b = C.join l (C.join k a (C.source l b)) (C.join k (C.target l a) b) := by + have hab : C.target k a = C.source k (C.source l b) := by + rw [C.source_source, min_eq_left (le_of_lt hkl)]; exact h + have hab' : C.target k (C.target l a) = C.source k b := by + rw [C.target_target, min_eq_left (le_of_lt hkl)]; exact h + have h' := C.join_interchange k l hkl a (C.target l a) (C.source l b) b + (C.source_target_self l a).symm (C.target_source_self l b) hab hab' + rw [C.join_right_unit l a (C.target l a) (C.source_target_self l a) + (C.source_target_self l a).symm, + C.join_left_unit l (C.source l b) b (C.source_source_self l b) (C.target_source_self l b)] at h' + exact h' + +lemma join_factor_left (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b : C.Cell) (h : C.target k a = C.source k b) : + C.join k a b = C.join l (C.join k (C.source l a) b) (C.join k a (C.target l b)) := by + have hab : C.target k (C.source l a) = C.source k b := by + rw [C.target_source, ite_eq_left hkl]; exact h + have hab' : C.target k a = C.source k (C.target l b) := by + rw [C.source_target, ite_eq_left hkl]; exact h + have h' := C.join_interchange k l hkl (C.source l a) a b (C.target l b) + (C.target_source_self l a) (C.source_target_self l b).symm hab hab' + rw [C.join_left_unit l (C.source l a) a (C.source_source_self l a) (C.target_source_self l a), + C.join_right_unit l b (C.target l b) (C.source_target_self l b) + (C.source_target_self l b).symm] at h' + exact h' + +lemma join_middle (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b : C.Cell) (h : C.target k a = C.source k b) : + C.join l (C.join k a (C.source l b)) (C.join k (C.target l a) b) = + C.join l (C.join k (C.source l a) b) (C.join k a (C.target l b)) := + (C.join_factor_right k l hkl a b h).symm.trans (C.join_factor_left k l hkl a b h) + +lemma join_whisker_right (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b c : C.Cell) (hc : C.source l c = c) + (hab : C.target l a = C.source l b) + (hac : C.target k a = C.source k c) (hbc : C.target k b = C.source k c) : + C.join k (C.join l a b) c = C.join l (C.join k a c) (C.join k b c) := by + have hcc : C.target l c = C.source l c := (C.target_eq_self_of_source_eq_self hc).trans hc.symm + have h' := C.join_interchange k l hkl a b c c hab hcc hac hbc + rw [C.join_left_unit l c c hc hcc] at h' + exact h' + +lemma join_whisker_left (C : OmegaCategory.{u}) (k l : ℕ) (hkl : k < l) + (a b c : C.Cell) (ha : C.source l a = a) + (hbc : C.target l b = C.source l c) + (hab : C.target k a = C.source k b) (hac : C.target k a = C.source k c) : + C.join k a (C.join l b c) = C.join l (C.join k a b) (C.join k a c) := by + have haa : C.target l a = C.source l a := (C.target_eq_self_of_source_eq_self ha).trans ha.symm + have h' := C.join_interchange k l hkl a a b c haa hbc hab hac + rw [C.join_left_unit l a a ha haa] at h' + exact h' + +lemma Functor.map_join {C : OmegaCategory.{u}} {D : OmegaCategory.{v}} + (F : Functor C D) (k : ℕ) (x y : C.Cell) + (h : C.target k x = C.source k y) : + F.map (C.join k x y) = D.join k (F.map x) (F.map y) := by + rw [C.join_eq k x y h, D.join_eq k _ _ (F.map_composable h), F.map_comp] + +end Thomason.OmegaCategory + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +namespace Diagram +variable {X : OmegaCategory.{v}} (D : Diagram X) +lemma obj_composite (e : Fin 8) : + D.obj (composite e).2.2.2 = + X.join (composite e).1 (D.obj (composite e).2.1) (D.obj (composite e).2.2.1) := by + rw [X.join_eq _ _ _ (by rw [D.target_obj, D.source_obj, composite_match])] + exact (D.composites e).symm +lemma obj5 : D.obj 5 = X.join 0 (D.obj 4) (D.obj 19) := D.obj_composite 3 +lemma obj7 : D.obj 7 = X.join 0 (D.obj 4) (D.obj 20) := D.obj_composite 4 +lemma obj8 : D.obj 8 = X.join 0 (D.obj 4) (D.obj 21) := D.obj_composite 5 +lemma obj9 : D.obj 9 = X.join 1 (D.obj 7) (D.obj 6) := D.obj_composite 6 +lemma obj11 : D.obj 11 = X.join 1 (D.obj 12) (D.obj 14) := D.obj_composite 7 +lemma obj13 : D.obj 13 = X.join 0 (D.obj 1) (D.obj 17) := D.obj_composite 0 +lemma obj14 : D.obj 14 = X.join 0 (D.obj 2) (D.obj 17) := D.obj_composite 1 +lemma obj15 : D.obj 15 = X.join 0 (D.obj 3) (D.obj 17) := D.obj_composite 2 +end Diagram + +section Pasting +variable {X : OmegaCategory.{v}} (L R : Diagram X) (h : L.obj 17 = R.obj 4) + +include h in +lemma glue_source : L.obj 16 = R.obj 0 := by + have h' := congrArg (X.source 0) h + rw [L.source_obj, R.source_obj] at h' + exact h' +include h in +lemma glue_target : L.obj 22 = R.obj 18 := by + have h' := congrArg (X.target 0) h + rw [L.target_obj, R.target_obj] at h' + exact h' + +def pastedObj (i : Fin 23) : X.Cell := + match i.val with + | 0 => L.obj 0 + | 1 => X.join 0 (L.obj 1) (R.obj 1) + | 2 => X.join 0 (L.obj 2) (R.obj 2) + | 3 => X.join 0 (L.obj 3) (R.obj 3) + | 4 => L.obj 4 + | 5 => X.join 0 (L.obj 4) (X.join 0 (L.obj 19) (R.obj 19)) + | 6 => X.join 1 (X.join 0 (L.obj 6) (R.obj 19)) (X.join 0 (L.obj 1) (R.obj 6)) + | 7 => X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 20)) + | 8 => X.join 0 (L.obj 4) (X.join 0 (L.obj 21) (R.obj 21)) + | 9 => X.join 1 + (X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 20))) + (X.join 1 (X.join 0 (L.obj 6) (R.obj 19)) (X.join 0 (L.obj 1) (R.obj 6))) + | 10 => X.join 1 (X.join 0 (L.obj 10) (R.obj 21)) (X.join 0 (L.obj 1) (R.obj 10)) + | 11 => X.join 1 + (X.join 1 (X.join 0 (L.obj 12) (R.obj 21)) (X.join 0 (L.obj 3) (R.obj 12))) + (X.join 0 (X.join 0 (L.obj 2) (R.obj 2)) (R.obj 17)) + | 12 => X.join 1 (X.join 0 (L.obj 12) (R.obj 21)) (X.join 0 (L.obj 3) (R.obj 12)) + | 13 => X.join 0 (X.join 0 (L.obj 1) (R.obj 1)) (R.obj 17) + | 14 => X.join 0 (X.join 0 (L.obj 2) (R.obj 2)) (R.obj 17) + | 15 => X.join 0 (X.join 0 (L.obj 3) (R.obj 3)) (R.obj 17) + | 16 => R.obj 16 + | 17 => R.obj 17 + | 18 => L.obj 18 + | 19 => X.join 0 (L.obj 19) (R.obj 19) + | 20 => X.join 0 (L.obj 20) (R.obj 20) + | 21 => X.join 0 (L.obj 21) (R.obj 21) + | _ => R.obj 22 + +attribute [local simp] Diagram.source_obj Diagram.target_obj + Diagram.obj5 Diagram.obj7 Diagram.obj8 Diagram.obj9 Diagram.obj11 + Diagram.obj13 Diagram.obj14 Diagram.obj15 + OmegaCategory.join_source_le OmegaCategory.join_source_gt + OmegaCategory.join_target_le OmegaCategory.join_target_gt + OmegaCategory.join_assoc + +include h in +lemma pasted_match9 : + X.target 1 (X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 20))) = + X.source 1 (X.join 1 (X.join 0 (L.obj 6) (R.obj 19)) (X.join 0 (L.obj 1) (R.obj 6))) := by + have hs := glue_source L R h + have ht := glue_target L R h + simp [faceIndex, h, hs, ht] + +include h in +lemma pasted_match11 : + X.target 1 (X.join 1 (X.join 0 (L.obj 12) (R.obj 21)) (X.join 0 (L.obj 3) (R.obj 12))) = + X.source 1 (X.join 0 (L.obj 2) (X.join 0 (R.obj 2) (R.obj 17))) := by + have hs := glue_source L R h + have ht := glue_target L R h + simp [faceIndex, h, hs, ht] + +include h in +lemma pasted_source_zero (i : Fin 23) : + X.source 0 (pastedObj L R i) = pastedObj L R (faceIndex 0 false i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_target_zero (i : Fin 23) : + X.target 0 (pastedObj L R i) = pastedObj L R (faceIndex 0 true i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_source_one (i : Fin 23) : + X.source 1 (pastedObj L R i) = pastedObj L R (faceIndex 1 false i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_target_one (i : Fin 23) : + X.target 1 (pastedObj L R i) = pastedObj L R (faceIndex 1 true i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_source_three (i : Fin 23) : + X.source 3 (pastedObj L R i) = pastedObj L R (faceIndex 3 false i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_source_two_others (i : Fin 23) (hi : i ≠ 10) : + X.source 2 (pastedObj L R i) = pastedObj L R (faceIndex 2 false i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> try contradiction + all_goals simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_target_two_others (i : Fin 23) (hi : i ≠ 10) : + X.target 2 (pastedObj L R i) = pastedObj L R (faceIndex 2 true i) := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> try contradiction + all_goals simp [pastedObj, faceIndex, h, hs, ht, h9, h11] + +include h in +lemma pasted_source_coherence : + X.join 1 + (X.join 0 (X.join 1 (L.obj 12) (X.join 0 (L.obj 2) (R.obj 4))) (R.obj 21)) + (X.join 0 (L.obj 1) (X.join 1 (R.obj 12) (X.join 0 (R.obj 2) (R.obj 17)))) = + X.join 1 + (X.join 1 (X.join 0 (L.obj 12) (R.obj 21)) (X.join 0 (L.obj 3) (R.obj 12))) + (X.join 0 (L.obj 2) (X.join 0 (R.obj 2) (R.obj 17))) := by + have hs := glue_source L R h + have ht := glue_target L R h + let a := X.join 0 (L.obj 12) (R.obj 21) + let b := X.join 0 (L.obj 2) (X.join 0 (R.obj 4) (R.obj 21)) + let c := X.join 0 (L.obj 1) (R.obj 12) + let d := X.join 0 (L.obj 1) (X.join 0 (R.obj 2) (R.obj 17)) + let e := X.join 0 (L.obj 3) (R.obj 12) + let f := X.join 0 (L.obj 2) (X.join 0 (R.obj 3) (R.obj 17)) + have hm : X.join 1 b c = X.join 1 e f := by + have hm' := X.join_middle 0 1 (by decide) (L.obj 2) (R.obj 12) + (by simp [faceIndex, hs]) + simpa [b, c, e, f, faceIndex, h, hs, ht] using hm' + have hf : X.join 0 (L.obj 2) (X.join 0 (R.obj 2) (R.obj 17)) = X.join 1 f d := by + have hf' := X.join_factor_right 0 1 (by decide) (L.obj 2) (X.join 0 (R.obj 2) (R.obj 17)) + (by simp [faceIndex, hs]) + simpa [f, d, faceIndex, h, hs, ht] using hf' + have hl : X.join 0 (X.join 1 (L.obj 12) (X.join 0 (L.obj 2) (R.obj 4))) (R.obj 21) = + X.join 1 a b := by + have hl' := X.join_whisker_right 0 1 (by decide) (L.obj 12) + (X.join 0 (L.obj 2) (R.obj 4)) (R.obj 21) + (by simp [faceIndex]) (by simp [faceIndex, h, hs]) + (by simp [faceIndex, ht]) (by simp [faceIndex, hs]) + simpa [a, b, faceIndex, hs, ht] using hl' + have hr : X.join 0 (L.obj 1) (X.join 1 (R.obj 12) (X.join 0 (R.obj 2) (R.obj 17))) = + X.join 1 c d := by + exact X.join_whisker_left 0 1 (by decide) (L.obj 1) (R.obj 12) + (X.join 0 (R.obj 2) (R.obj 17)) + (by simp [faceIndex]) (by simp [faceIndex]) + (by simp [faceIndex, hs]) (by simp [faceIndex, hs]) + rw [hl, hr, hf] + exact X.join_four_middle 1 a b c d e f + (by simp [a, b, faceIndex, h, hs, ht]) + (by simp [b, c, faceIndex, hs]) + (by simp [c, d, faceIndex, hs]) + (by simp [a, e, faceIndex, h, hs, ht]) + (by simp [e, f, faceIndex, hs]) + (by simp [f, d, faceIndex, hs]) hm + +include h in +lemma pasted_source_two_top : + X.source 2 (pastedObj L R 10) = pastedObj L R 11 := by + have hs := glue_source L R h + have ht := glue_target L R h + simpa [pastedObj, faceIndex, h, hs, ht] using pasted_source_coherence L R h + +include h in +lemma pasted_target_coherence : + X.join 1 + (X.join 0 (X.join 1 (X.join 0 (L.obj 4) (L.obj 20)) (L.obj 6)) (R.obj 21)) + (X.join 0 (L.obj 1) (X.join 1 (X.join 0 (R.obj 4) (R.obj 20)) (R.obj 6))) = + X.join 1 (X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 20))) + (X.join 1 (X.join 0 (L.obj 6) (R.obj 19)) (X.join 0 (L.obj 1) (R.obj 6))) := by + have hs := glue_source L R h + have ht := glue_target L R h + let a := X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 21)) + let b := X.join 0 (L.obj 6) (R.obj 21) + let c := X.join 0 (L.obj 1) (X.join 0 (R.obj 4) (R.obj 20)) + let d := X.join 0 (L.obj 1) (R.obj 6) + let e := X.join 0 (L.obj 4) (X.join 0 (L.obj 19) (R.obj 20)) + let f := X.join 0 (L.obj 6) (R.obj 19) + have hm : X.join 1 b c = X.join 1 e f := by + have hm' := X.join_middle 0 1 (by decide) (L.obj 6) (R.obj 20) + (by simp [faceIndex, ht]) + simpa [b, c, e, f, faceIndex, h, hs, ht] using hm' + have hf : X.join 0 (L.obj 4) (X.join 0 (L.obj 20) (R.obj 20)) = X.join 1 a e := by + have hf' := X.join_factor_right 0 1 (by decide) (X.join 0 (L.obj 4) (L.obj 20)) (R.obj 20) + (by simp [faceIndex, ht]) + simpa [a, e, faceIndex, h, hs, ht] using hf' + have hl : X.join 0 (X.join 1 (X.join 0 (L.obj 4) (L.obj 20)) (L.obj 6)) (R.obj 21) = + X.join 1 a b := by + have hl' := X.join_whisker_right 0 1 (by decide) (X.join 0 (L.obj 4) (L.obj 20)) + (L.obj 6) (R.obj 21) + (by simp [faceIndex]) (by simp [faceIndex]) + (by simp [faceIndex, ht]) (by simp [faceIndex, ht]) + simpa [a, b, faceIndex, hs, ht] using hl' + have hr : X.join 0 (L.obj 1) (X.join 1 (X.join 0 (R.obj 4) (R.obj 20)) (R.obj 6)) = + X.join 1 c d := by + exact X.join_whisker_left 0 1 (by decide) (L.obj 1) (X.join 0 (R.obj 4) (R.obj 20)) + (R.obj 6) (by simp [faceIndex]) (by simp [faceIndex]) + (by simp [faceIndex, hs]) (by simp [faceIndex, hs]) + rw [hl, hr, hf] + exact X.join_four_middle 1 a b c d e f + (by simp [a, b, faceIndex, ht]) + (by simp [b, c, faceIndex, h, hs, ht]) + (by simp [c, d, faceIndex, hs]) + (by simp [a, e, faceIndex, ht]) + (by simp [e, f, faceIndex, ht]) + (by simp [f, d, faceIndex, h, hs, ht]) hm + +include h in +lemma pasted_target_two_top : + X.target 2 (pastedObj L R 10) = pastedObj L R 9 := by + have hs := glue_source L R h + have ht := glue_target L R h + simpa [pastedObj, faceIndex, h, hs, ht] using pasted_target_coherence L R h + +include h in +lemma pasted_faces (k : ℕ) (b : Bool) (i : Fin 23) : + X.face k b (pastedObj L R i) = pastedObj L R (faceIndex k b i) := by + rcases k with _ | _ | _ | k + · cases b + · exact pasted_source_zero L R h i + · exact pasted_target_zero L R h i + · cases b + · exact pasted_source_one L R h i + · exact pasted_target_one L R h i + · by_cases hi : i = 10 + · subst i + cases b + · exact pasted_source_two_top L R h + · exact pasted_target_two_top L R h + · cases b + · exact pasted_source_two_others L R h i hi + · exact pasted_target_two_others L R h i hi + · exact X.face_of_fixed (pasted_source_three L R h i) (by omega) b + +def paste : Diagram X where + obj := pastedObj L R + faces := pasted_faces L R h + composites e := by + rw [← X.join_eq] + fin_cases e <;> rfl + +@[simp] lemma paste_obj (i : Fin 23) : (paste L R h).obj i = pastedObj L R i := rfl + +end Pasting +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex OmegaCategory + +namespace Diagram +variable {X : OmegaCategory.{v}} {Y : OmegaCategory.{w}} + +def map (D : Diagram X) (F : OmegaCategory.Functor X Y) : Diagram Y where + obj i := F.map (D.obj i) + faces k b i := by rw [← F.map_face, D.faces] + composites e := by + have h : X.target (composite e).1 (D.obj (composite e).2.1) = + X.source (composite e).1 (D.obj (composite e).2.2.1) := by + rw [D.target_obj, D.source_obj, composite_match] + rw [← F.map_comp _ _ _ h, D.composites] + +@[simp] lemma map_obj (D : Diagram X) (F : OmegaCategory.Functor X Y) (i : Fin 23) : + (D.map F).obj i = F.map (D.obj i) := rfl + +end Diagram + +lemma map_pastedObj {X : OmegaCategory.{v}} {Y : OmegaCategory.{w}} + (L R : Diagram X) (h : L.obj 17 = R.obj 4) (F : OmegaCategory.Functor X Y) (i : Fin 23) : + F.map (pastedObj L R i) = pastedObj (L.map F) (R.map F) i := by + have hs := glue_source L R h + have ht := glue_target L R h + have h9 := pasted_match9 L R h + have h11 := pasted_match11 L R h + fin_cases i <;> simp [pastedObj, Diagram.map_obj, Functor.map_join, + Diagram.source_obj, Diagram.target_obj, + Diagram.obj5, Diagram.obj8, Diagram.obj13, Diagram.obj15, + OmegaCategory.join_source_le, OmegaCategory.join_source_gt, + OmegaCategory.join_target_gt, + faceIndex, h, hs, ht, h9, h11, OmegaCategory.join_assoc, + ← F.map_source, ← F.map_target] + +def generators : Fin 7 → Fin 23 := ![2, 4, 6, 10, 12, 17, 20] + +lemma functor_ext_generators {X : OmegaCategory.{v}} + (F G : OmegaCategory.Functor K.{u}.nu X) + (h : ∀ i, F.map (cell (generators i)) = G.map (cell (generators i))) : F = G := by + let D := diagramOfFunctor F + let E := diagramOfFunctor G + have h₂ : D.obj 2 = E.obj 2 := h 0 + have h₄ : D.obj 4 = E.obj 4 := h 1 + have h₆ : D.obj 6 = E.obj 6 := h 2 + have h₁₀ : D.obj 10 = E.obj 10 := h 3 + have h₁₂ : D.obj 12 = E.obj 12 := h 4 + have h₁₇ : D.obj 17 = E.obj 17 := h 5 + have h₂₀ : D.obj 20 = E.obj 20 := h 6 + have hf (i : Fin 23) (he : D.obj i = E.obj i) (k : ℕ) (b : Bool) : + D.obj (faceIndex k b i) = E.obj (faceIndex k b i) := by + rw [← D.faces, ← E.faces, he] + have h₀ : D.obj 0 = E.obj 0 := hf 2 h₂ 0 false + have h₁ : D.obj 1 = E.obj 1 := hf 2 h₂ 1 true + have h₃ : D.obj 3 = E.obj 3 := hf 2 h₂ 1 false + have h₁₆ : D.obj 16 = E.obj 16 := hf 2 h₂ 0 true + have h₁₈ : D.obj 18 = E.obj 18 := hf 20 h₂₀ 0 false + have h₁₉ : D.obj 19 = E.obj 19 := hf 20 h₂₀ 1 true + have h₂₁ : D.obj 21 = E.obj 21 := hf 20 h₂₀ 1 false + have h₂₂ : D.obj 22 = E.obj 22 := hf 20 h₂₀ 0 true + apply functor_ext + intro i + change D.obj i = E.obj i + fin_cases i + · change D.obj 0 = E.obj 0 + exact h₀ + · change D.obj 1 = E.obj 1 + exact h₁ + · change D.obj 2 = E.obj 2 + exact h₂ + · change D.obj 3 = E.obj 3 + exact h₃ + · change D.obj 4 = E.obj 4 + exact h₄ + · change D.obj 5 = E.obj 5 + simp only [Diagram.obj5, h₄, h₁₉] + · change D.obj 6 = E.obj 6 + exact h₆ + · change D.obj 7 = E.obj 7 + simp only [Diagram.obj7, h₄, h₂₀] + · change D.obj 8 = E.obj 8 + simp only [Diagram.obj8, h₄, h₂₁] + · change D.obj 9 = E.obj 9 + simp only [Diagram.obj7, Diagram.obj9, h₄, h₆, h₂₀] + · change D.obj 10 = E.obj 10 + exact h₁₀ + · change D.obj 11 = E.obj 11 + simp only [Diagram.obj11, Diagram.obj14, h₂, h₁₂, h₁₇] + · change D.obj 12 = E.obj 12 + exact h₁₂ + · change D.obj 13 = E.obj 13 + simp only [Diagram.obj13, h₁, h₁₇] + · change D.obj 14 = E.obj 14 + simp only [Diagram.obj14, h₂, h₁₇] + · change D.obj 15 = E.obj 15 + simp only [Diagram.obj15, h₃, h₁₇] + · change D.obj 16 = E.obj 16 + exact h₁₆ + · change D.obj 17 = E.obj 17 + exact h₁₇ + · change D.obj 18 = E.obj 18 + exact h₁₈ + · change D.obj 19 = E.obj 19 + exact h₁₉ + · change D.obj 20 = E.obj 20 + exact h₂₀ + · change D.obj 21 = E.obj 21 + exact h₂₁ + · change D.obj 22 = E.obj 22 + exact h₂₂ + +end Thomason.GrayTwo + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/GraySquares.lean b/lean/OAI/CategoryTheory/Thomason/GraySquares.lean new file mode 100644 index 0000000000000000000000000000000000000000..90e7b5f112d512916e6e23d23d27eafaa123edb5 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/GraySquares.lean @@ -0,0 +1,697 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.DimensionOne + +namespace OAI + +/-! Gray Squares. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayComposition +open DirectedComplex DirectedComplex.Table GlobeComplex + +abbrev G (n : ℕ) : OmegaCategory.{u} := (complex n).nu +abbrev T (n : ℕ) : OmegaCategory.{u} := (complex n).cylinder.nu +abbrev face (n k : ℕ) (b : Bool) : G.{u} k ⟶ G.{u} n := (faceMap n k b).nu +abbrev tensorFace (n k : ℕ) (b : Bool) : T.{u} k ⟶ T.{u} n := (faceMap n k b).cylinder.nu +abbrev endpoint (n : ℕ) (b : Bool) : G.{u} n ⟶ T.{u} n := ((complex n).cylinderEndpoint b).nu +abbrev projection (n : ℕ) : T.{u} n ⟶ G.{u} n := (complex n).cylinderProjection.nu + +lemma endpoint_natural (n k : ℕ) (a b : Bool) : + endpoint.{u} k b ≫ tensorFace.{u} n k a = face.{u} n k a ≫ endpoint.{u} n b := by + exact congrArg Hom.nu ((faceMap n k a).cylinder_endpoint b) +lemma projection_natural (n k : ℕ) (a : Bool) : + tensorFace.{u} n k a ≫ projection.{u} n = projection.{u} k ≫ face.{u} n k a := by + exact congrArg Hom.nu ((faceMap n k a).cylinder_projection) + +abbrev P (n k : ℕ) : OmegaCategory.{u} := pushout (face.{u} n k true) (face.{u} n k false) + +abbrev Q (n k : ℕ) : OmegaCategory.{u} := pushout (tensorFace.{u} n k true) (tensorFace.{u} n k false) +abbrev i₀ (n k : ℕ) : G.{u} n ⟶ P.{u} n k := pushout.inl _ _ +abbrev i₁ (n k : ℕ) : G.{u} n ⟶ P.{u} n k := pushout.inr _ _ +abbrev j₀ (n k : ℕ) : T.{u} n ⟶ Q.{u} n k := pushout.inl _ _ +abbrev j₁ (n k : ℕ) : T.{u} n ⟶ Q.{u} n k := pushout.inr _ _ + +def cutEndpoint (n k : ℕ) (b : Bool) : P.{u} n k ⟶ Q.{u} n k := + pushout.desc (endpoint.{u} n b ≫ j₀.{u} n k) (endpoint.{u} n b ≫ j₁.{u} n k) (by + rw [← Category.assoc, ← endpoint_natural.{u}, Category.assoc, + ← Category.assoc (face.{u} n k false), ← endpoint_natural.{u}, Category.assoc, + pushout.condition]) +def cutProjection (n k : ℕ) : Q.{u} n k ⟶ P.{u} n k := + pushout.desc (projection.{u} n ≫ i₀.{u} n k) (projection.{u} n ≫ i₁.{u} n k) (by + rw [← Category.assoc, projection_natural.{u}, Category.assoc, + ← Category.assoc (tensorFace.{u} n k false), projection_natural.{u}, Category.assoc, + pushout.condition]) + +lemma face_top (n k : ℕ) (b : Bool) : + (face.{u} n k b).map (topTable k) = truncate k b (topTable n) := by + change (faceMap.{u} n k b).nu.map (topTable k) = _ + erw [faceMap_nu, lift_top] + +lemma top_composable (n k : ℕ) : + (P.{u} n k).target k ((i₀.{u} n k).map (topTable n)) = + (P.{u} n k).source k ((i₁.{u} n k).map (topTable n)) := by + erw [← (i₀.{u} n k).map_target, ← (i₁.{u} n k).map_source] + have h := congrArg (fun f : G.{u} k ⟶ P.{u} n k => f.map (topTable k)) + (pushout.condition (f := face.{u} n k true) (g := face.{u} n k false)) + change (i₀.{u} n k).map ((face.{u} n k true).map (topTable k)) = + (i₁.{u} n k).map ((face.{u} n k false).map (topTable k)) at h + rw [face_top.{u}, face_top.{u}] at h + exact h + +def compositeCell (n k : ℕ) : (P.{u} n k).Cell := + (P.{u} n k).comp k ((i₀.{u} n k).map (topTable n)) ((i₁.{u} n k).map (topTable n)) + (top_composable.{u} n k) +lemma compositeCell_bounded (n k : ℕ) (hkn : k < n) : + (P.{u} n k).source n (compositeCell.{u} n k) = compositeCell.{u} n k := by + unfold compositeCell + rw [(P.{u} n k).source_comp_gt n k hkn _ _ _ ((P.{u} n k).source_composable hkn (top_composable.{u} n k))] + apply (P.{u} n k).comp_congr_cells + · erw [← (i₀.{u} n k).map_source] + change (i₀.{u} n k).map (truncate n false (topTable n)) = _ + rw [topTable_bounded] + · erw [← (i₁.{u} n k).map_source] + change (i₁.{u} n k).map (truncate n false (topTable n)) = _ + rw [topTable_bounded] + +def composition (n k : ℕ) (hkn : k < n) : G.{u} n ⟶ P.{u} n k := + GlobeComplex.lift (compositeCell.{u} n k) (compositeCell_bounded.{u} n k hkn) + +def CooperationExists (n k : ℕ) (hkn : k < n) : Prop := + ∃ γ : T.{u} n ⟶ Q.{u} n k, + (∀ b, endpoint.{u} n b ≫ γ = composition.{u} n k hkn ≫ cutEndpoint.{u} n k b) ∧ + γ ≫ cutProjection.{u} n k = projection.{u} n ≫ composition.{u} n k hkn + +def FirstMixedCooperation : Prop := CooperationExists.{u} 2 0 (by decide) +end Thomason.GrayComposition + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex + +@[ext] structure Coordinates where + vertex : Bool → Fin 4 → ℤ + edge : Bool → Fin 6 → ℤ + face : Bool → Fin 4 → ℤ + volume : ℤ + +namespace Coordinates + +def IsValid (x : Coordinates) : Prop := + (∀ b i, 0 ≤ x.vertex b i) ∧ + (∀ b i, 0 ≤ x.edge b i) ∧ + (∀ b i, 0 ≤ x.face b i) ∧ + 0 ≤ x.volume ∧ + (∀ b, x.vertex b 0 + x.vertex b 1 + x.vertex b 2 + x.vertex b 3 = 1) ∧ + (∀ b, + x.vertex true 0 - x.vertex false 0 = -x.edge b 0 - x.edge b 1 - x.edge b 4 ∧ + x.vertex true 1 - x.vertex false 1 = x.edge b 0 + x.edge b 1 - x.edge b 5 ∧ + x.vertex true 2 - x.vertex false 2 = -x.edge b 2 - x.edge b 3 + x.edge b 4 ∧ + x.vertex true 3 - x.vertex false 3 = x.edge b 2 + x.edge b 3 + x.edge b 5) ∧ + (∀ b, + x.edge true 0 - x.edge false 0 = -x.face b 0 + x.face b 2 ∧ + x.edge true 1 - x.edge false 1 = x.face b 0 + x.face b 3 ∧ + x.edge true 2 - x.edge false 2 = -x.face b 1 - x.face b 2 ∧ + x.edge true 3 - x.edge false 3 = x.face b 1 - x.face b 3 ∧ + x.edge true 4 - x.edge false 4 = -x.face b 2 - x.face b 3 ∧ + x.edge true 5 - x.edge false 5 = x.face b 2 + x.face b 3) ∧ + (x.face true 0 - x.face false 0 = -x.volume ∧ + x.face true 1 - x.face false 1 = x.volume ∧ + x.face true 2 - x.face false 2 = -x.volume ∧ + x.face true 3 - x.face false 3 = x.volume) + +end Coordinates + +abbrev K : DirectedComplex.{u} := (complex 2).cylinder + +def coordinates (t : Table K.{u}) : Coordinates where + vertex b := ![(t.row 0 b).1.val ⟨false⟩, (t.row 0 b).1.val ⟨true⟩, + (t.row 0 b).2.val ⟨false⟩, (t.row 0 b).2.val ⟨true⟩] + edge b := ![(t.row 1 b).1.val ⟨false⟩, (t.row 1 b).1.val ⟨true⟩, + (t.row 1 b).2.1.val ⟨false⟩, (t.row 1 b).2.1.val ⟨true⟩, + (t.row 1 b).2.2.val ⟨false⟩, (t.row 1 b).2.2.val ⟨true⟩] + face b := ![(t.row 2 b).1.val ⟨false⟩, (t.row 2 b).2.1.val ⟨false⟩, + (t.row 2 b).2.2.val ⟨false⟩, (t.row 2 b).2.2.val ⟨true⟩] + volume := (t.row 3 false).2.2.val ⟨false⟩ + +lemma row_above (t : Table K.{u}) (p : ℕ) (hp : 3 < p) (b : Bool) : + t.row p b = 0 := by + cases p with + | zero => omega + | succ p => + apply Prod.ext + · exact chain_zero (by omega) _ + · apply Prod.ext + · exact chain_zero (by omega) _ + · exact chain_zero (by omega) _ + +lemma bounded (t : Table K.{u}) : truncate 3 false t = t := + dimension_of_rows_above_zero t (row_above t) + +lemma coordinates_valid (t : Table K.{u}) : (coordinates t).IsValid := by + have pv (b : Bool) := t.positive 0 b + have pe (b : Bool) := t.positive 1 b + have pf (b : Bool) := t.positive 2 b + have ph := t.positive 3 false + refine ⟨?_, ?_, ?_, ph.2.2 false, ?_, ?_, ?_, ?_⟩ + · intro b i + fin_cases i + · exact (pv b).1 false + · exact (pv b).1 true + · exact (pv b).2 false + · exact (pv b).2 true + · intro b i + fin_cases i + · exact (pe b).1 false + · exact (pe b).1 true + · exact (pe b).2.1 false + · exact (pe b).2.1 true + · exact (pe b).2.2 false + · exact (pe b).2.2 true + · intro b i + fin_cases i + · exact (pf b).1 false + · exact (pf b).2.1 false + · exact (pf b).2.2 false + · exact (pf b).2.2 true + · intro b + have h := t.augmentation b + change ((t.row 0 b).1.val ⟨false⟩ + (t.row 0 b).1.val ⟨true⟩) + + ((t.row 0 b).2.val ⟨false⟩ + (t.row 0 b).2.val ⟨true⟩) = 1 at h + dsimp [coordinates] + omega + · intro b + have h₀ := congrArg (fun c : K.Chain 0 => c.1.val ⟨false⟩) (t.boundary 0 b) + have h₁ := congrArg (fun c : K.Chain 0 => c.1.val ⟨true⟩) (t.boundary 0 b) + have h₂ := congrArg (fun c : K.Chain 0 => c.2.val ⟨false⟩) (t.boundary 0 b) + have h₃ := congrArg (fun c : K.Chain 0 => c.2.val ⟨true⟩) (t.boundary 0 b) + change ((t.row 1 b).1.val ⟨false⟩ + (t.row 1 b).1.val ⟨true⟩) * (-1) - + (t.row 1 b).2.2.val ⟨false⟩ = + (t.row 0 true).1.val ⟨false⟩ - (t.row 0 false).1.val ⟨false⟩ at h₀ + change ((t.row 1 b).1.val ⟨false⟩ + (t.row 1 b).1.val ⟨true⟩) * 1 - + (t.row 1 b).2.2.val ⟨true⟩ = + (t.row 0 true).1.val ⟨true⟩ - (t.row 0 false).1.val ⟨true⟩ at h₁ + change ((t.row 1 b).2.1.val ⟨false⟩ + (t.row 1 b).2.1.val ⟨true⟩) * (-1) + + (t.row 1 b).2.2.val ⟨false⟩ = + (t.row 0 true).2.val ⟨false⟩ - (t.row 0 false).2.val ⟨false⟩ at h₂ + change ((t.row 1 b).2.1.val ⟨false⟩ + (t.row 1 b).2.1.val ⟨true⟩) * 1 + + (t.row 1 b).2.2.val ⟨true⟩ = + (t.row 0 true).2.val ⟨true⟩ - (t.row 0 false).2.val ⟨true⟩ at h₃ + dsimp [coordinates] + constructor + · omega + constructor + · omega + constructor <;> omega + · intro b + have h₀ := congrArg (fun c : K.Chain 1 => c.1.val ⟨false⟩) (t.boundary 1 b) + have h₁ := congrArg (fun c : K.Chain 1 => c.1.val ⟨true⟩) (t.boundary 1 b) + have h₂ := congrArg (fun c : K.Chain 1 => c.2.1.val ⟨false⟩) (t.boundary 1 b) + have h₃ := congrArg (fun c : K.Chain 1 => c.2.1.val ⟨true⟩) (t.boundary 1 b) + have h₄ := congrArg (fun c : K.Chain 1 => c.2.2.val ⟨false⟩) (t.boundary 1 b) + have h₅ := congrArg (fun c : K.Chain 1 => c.2.2.val ⟨true⟩) (t.boundary 1 b) + change ((t.row 2 b).1.val ⟨false⟩ + (t.row 2 b).1.val ⟨true⟩) * (-1) - + (-1) * (t.row 2 b).2.2.val ⟨false⟩ = + (t.row 1 true).1.val ⟨false⟩ - (t.row 1 false).1.val ⟨false⟩ at h₀ + change ((t.row 2 b).1.val ⟨false⟩ + (t.row 2 b).1.val ⟨true⟩) * 1 - + (-1) * (t.row 2 b).2.2.val ⟨true⟩ = + (t.row 1 true).1.val ⟨true⟩ - (t.row 1 false).1.val ⟨true⟩ at h₁ + change ((t.row 2 b).2.1.val ⟨false⟩ + (t.row 2 b).2.1.val ⟨true⟩) * (-1) + + (-1) * (t.row 2 b).2.2.val ⟨false⟩ = + (t.row 1 true).2.1.val ⟨false⟩ - (t.row 1 false).2.1.val ⟨false⟩ at h₂ + change ((t.row 2 b).2.1.val ⟨false⟩ + (t.row 2 b).2.1.val ⟨true⟩) * 1 + + (-1) * (t.row 2 b).2.2.val ⟨true⟩ = + (t.row 1 true).2.1.val ⟨true⟩ - (t.row 1 false).2.1.val ⟨true⟩ at h₃ + change ((t.row 2 b).2.2.val ⟨false⟩ + (t.row 2 b).2.2.val ⟨true⟩) * (-1) = + (t.row 1 true).2.2.val ⟨false⟩ - (t.row 1 false).2.2.val ⟨false⟩ at h₄ + change ((t.row 2 b).2.2.val ⟨false⟩ + (t.row 2 b).2.2.val ⟨true⟩) * 1 = + (t.row 1 true).2.2.val ⟨true⟩ - (t.row 1 false).2.2.val ⟨true⟩ at h₅ + have hz₀ := top_target_zero 2 (t.row 2 b).1 + have hz₁ := top_target_zero 2 (t.row 2 b).2.1 + dsimp [coordinates] + norm_num at h₀ h₁ h₂ h₃ h₄ h₅ + constructor + · omega + constructor + · omega + constructor + · omega + constructor + · omega + constructor <;> omega + · have h₀ := congrArg (fun c : K.Chain 2 => c.1.val ⟨false⟩) (t.boundary 2 false) + have h₁ := congrArg (fun c : K.Chain 2 => c.2.1.val ⟨false⟩) (t.boundary 2 false) + have h₂ := congrArg (fun c : K.Chain 2 => c.2.2.val ⟨false⟩) (t.boundary 2 false) + have h₃ := congrArg (fun c : K.Chain 2 => c.2.2.val ⟨true⟩) (t.boundary 2 false) + change ((t.row 3 false).1.val ⟨false⟩ + (t.row 3 false).1.val ⟨true⟩) * 0 - + 1 * (t.row 3 false).2.2.val ⟨false⟩ = + (t.row 2 true).1.val ⟨false⟩ - (t.row 2 false).1.val ⟨false⟩ at h₀ + change ((t.row 3 false).2.1.val ⟨false⟩ + (t.row 3 false).2.1.val ⟨true⟩) * 0 + + 1 * (t.row 3 false).2.2.val ⟨false⟩ = + (t.row 2 true).2.1.val ⟨false⟩ - (t.row 2 false).2.1.val ⟨false⟩ at h₁ + change ((t.row 3 false).2.2.val ⟨false⟩ + (t.row 3 false).2.2.val ⟨true⟩) * (-1) = + (t.row 2 true).2.2.val ⟨false⟩ - (t.row 2 false).2.2.val ⟨false⟩ at h₂ + change ((t.row 3 false).2.2.val ⟨false⟩ + (t.row 3 false).2.2.val ⟨true⟩) * 1 = + (t.row 2 true).2.2.val ⟨true⟩ - (t.row 2 false).2.2.val ⟨true⟩ at h₃ + have hz := top_target_zero 2 (t.row 3 false).2.2 + dsimp [coordinates] + norm_num at h₀ h₁ h₂ h₃ + constructor + · omega + constructor + · omega + constructor <;> omega + +lemma coordinates_injective : Function.Injective (coordinates.{u}) := by + intro s t h + have hv (b i) := congrArg (fun x : Coordinates => x.vertex b i) h + have he (b i) := congrArg (fun x : Coordinates => x.edge b i) h + have hf (b i) := congrArg (fun x : Coordinates => x.face b i) h + have hh := congrArg Coordinates.volume h + ext p b + rcases p with _ | _ | _ | _ | p + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hv b 0 + · exact hv b 1 + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hv b 2 + · exact hv b 3 + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact he b 0 + · exact he b 1 + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact he b 2 + · exact he b 3 + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact he b 4 + · exact he b 5 + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hf b 0 + · exact (top_target_zero 2 _).trans (top_target_zero 2 _).symm + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hf b 1 + · exact (top_target_zero 2 _).trans (top_target_zero 2 _).symm + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hf b 2 + · exact hf b 3 + · have hs : (s.row 3 b).2.2.val ⟨false⟩ = (s.row 3 false).2.2.val ⟨false⟩ := by + cases b + · rfl + · exact congrArg (fun c : K.Chain 3 => c.2.2.val ⟨false⟩) (row_top_fixed s (bounded s)).symm + have ht : (t.row 3 b).2.2.val ⟨false⟩ = (t.row 3 false).2.2.val ⟨false⟩ := by + cases b + · rfl + · exact congrArg (fun c : K.Chain 3 => c.2.2.val ⟨false⟩) (row_top_fixed t (bounded t)).symm + apply Prod.ext + · exact (chain_zero (n := 2) (p := 3) (by decide) _).trans + (chain_zero (n := 2) (p := 3) (by decide) _).symm + · apply Prod.ext + · exact (chain_zero (n := 2) (p := 3) (by decide) _).trans + (chain_zero (n := 2) (p := 3) (by decide) _).symm + · apply Subtype.ext; funext ⟨a⟩; cases a + · exact hs.trans (hh.trans ht.symm) + · exact (top_target_zero 2 _).trans (top_target_zero 2 _).symm + · rw [row_above s _ (by omega), row_above t _ (by omega)] + +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex + +namespace Coordinates + +def lower (p : ℕ) (hp : p < 2) (a b : ℤ) : Chain.{u} 2 p := + ⟨fun c => if c.down then b else a, by + rintro c (hc | ⟨hc, _⟩) <;> omega⟩ + +def top (a : ℤ) : Chain.{u} 2 2 := + ⟨fun c => if c.down then 0 else a, by + rintro c (hc | ⟨_, hc⟩) + · omega + · simp [hc]⟩ + +def row (x : Coordinates) : (p : ℕ) → Bool → K.{u}.Chain p + | 0, b => (lower 0 (by decide) (x.vertex b 0) (x.vertex b 1), + lower 0 (by decide) (x.vertex b 2) (x.vertex b 3)) + | 1, b => (lower 1 (by decide) (x.edge b 0) (x.edge b 1), + lower 1 (by decide) (x.edge b 2) (x.edge b 3), + lower 0 (by decide) (x.edge b 4) (x.edge b 5)) + | 2, b => (top (x.face b 0), top (x.face b 1), + lower 1 (by decide) (x.face b 2) (x.face b 3)) + | 3, _ => (0, 0, top x.volume) + | p + 4, _ => 0 + +lemma row_above (x : Coordinates) {p : ℕ} (hp : 3 < p) (b : Bool) : + row.{u} x p b = 0 := by + rcases p with _ | _ | _ | _ | p <;> first | omega | rfl + +lemma row_positive (x : Coordinates) (hx : x.IsValid) (p : ℕ) (b : Bool) : + row.{u} x p b ∈ K.positive p := by + rcases hx with ⟨hv, he, hf, hm, _⟩ + rcases p with _ | _ | _ | _ | p + · refine ⟨?_, ?_⟩ <;> intro c <;> cases c + · exact hv b 0 + · exact hv b 1 + · exact hv b 2 + · exact hv b 3 + · refine ⟨?_, ?_, ?_⟩ <;> intro c <;> cases c + · exact he b 0 + · exact he b 1 + · exact he b 2 + · exact he b 3 + · exact he b 4 + · exact he b 5 + · refine ⟨?_, ?_, ?_⟩ <;> intro c <;> cases c + · exact hf b 0 + · exact le_rfl + · exact hf b 1 + · exact le_rfl + · exact hf b 2 + · exact hf b 3 + · refine ⟨(complex.{u} 2).positive 3 |>.zero_mem, + (complex.{u} 2).positive 3 |>.zero_mem, ?_⟩ + intro c; cases c + · exact hm + · exact le_rfl + · exact (K.positive _).zero_mem + +lemma row_boundary (x : Coordinates) (hx : x.IsValid) (p : ℕ) (b : Bool) : + K.d p (row.{u} x (p+1) b) = row x p true - row x p false := by + rcases hx with ⟨_, _, _, _, _, hb, hc, hd⟩ + have hb' := hb b + have hc' := hc b + rcases p with _ | _ | _ | _ | p + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.edge b 0 + x.edge b 1) * (-1) - x.edge b 4 = + x.vertex true 0 - x.vertex false 0 + omega + · change (x.edge b 0 + x.edge b 1) * 1 - x.edge b 5 = + x.vertex true 1 - x.vertex false 1 + omega + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.edge b 2 + x.edge b 3) * (-1) + x.edge b 4 = + x.vertex true 2 - x.vertex false 2 + omega + · change (x.edge b 2 + x.edge b 3) * 1 + x.edge b 5 = + x.vertex true 3 - x.vertex false 3 + omega + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.face b 0 + 0) * (-1) - (-1) * x.face b 2 = + x.edge true 0 - x.edge false 0 + omega + · change (x.face b 0 + 0) * 1 - (-1) * x.face b 3 = + x.edge true 1 - x.edge false 1 + omega + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.face b 1 + 0) * (-1) + (-1) * x.face b 2 = + x.edge true 2 - x.edge false 2 + omega + · change (x.face b 1 + 0) * 1 + (-1) * x.face b 3 = + x.edge true 3 - x.edge false 3 + omega + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.face b 2 + x.face b 3) * (-1) = + x.edge true 4 - x.edge false 4 + omega + · change (x.face b 2 + x.face b 3) * 1 = + x.edge true 5 - x.edge false 5 + omega + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (0 + 0) * 0 - 1 * x.volume = x.face true 0 - x.face false 0 + omega + · change (0 + 0) * 0 - 1 * 0 = (0 : ℤ) - 0 + omega + · apply Prod.ext + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (0 + 0) * 0 + 1 * x.volume = x.face true 1 - x.face false 1 + omega + · change (0 + 0) * 0 + 1 * 0 = (0 : ℤ) - 0 + omega + · apply Subtype.ext; funext ⟨a⟩; cases a + · change (x.volume + 0) * (-1) = x.face true 2 - x.face false 2 + omega + · change (x.volume + 0) * 1 = x.face true 3 - x.face false 3 + omega + · change K.d 3 0 = row x 3 true - row x 3 false + rw [map_zero] + change (0 : K.Chain 3) = (0, 0, top x.volume) - (0, 0, top x.volume) + exact (sub_self _).symm + · rw [row_above x (by omega), row_above x (by omega), row_above x (by omega), + map_zero, sub_self] + +def table (x : Coordinates) (hx : x.IsValid) : Table K.{u} where + row := row x + positive := row_positive x hx + boundary := row_boundary x hx + augmentation b := by + change (x.vertex b 0 + x.vertex b 1) + (x.vertex b 2 + x.vertex b 3) = 1 + have h := hx.2.2.2.2.1 b + omega + bounded := ⟨3, fun p hp b => row_above x hp b⟩ + +@[simp] lemma coordinates_table (x : Coordinates) (hx : x.IsValid) : + coordinates (table.{u} x hx) = x := by + apply Coordinates.ext + · funext b i; fin_cases i <;> rfl + · funext b i; fin_cases i <;> rfl + · funext b i; fin_cases i <;> rfl + · rfl + +end Coordinates + +@[simp] lemma table_coordinates (t : Table K.{u}) : + (coordinates t).table (coordinates_valid t) = t := by + apply coordinates_injective + exact Coordinates.coordinates_table _ _ + +def coordinatesEquiv : Table K.{u} ≃ {x : Coordinates // x.IsValid} where + toFun t := ⟨coordinates t, coordinates_valid t⟩ + invFun x := x.val.table x.property + left_inv := table_coordinates + right_inv x := Subtype.ext (Coordinates.coordinates_table.{u} x.val x.property) + +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z +open CategoryTheory Limits + +namespace Thomason.GrayTwo +open DirectedComplex DirectedComplex.Table GlobeComplex + +def code (i : Fin 23) : Coordinates := + match i.val with + | 0 => + { vertex _b := ![1, 0, 0, 0] + edge _b := ![0, 0, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 1 => + { vertex b := (if b then ![0, 1, 0, 0] else ![1, 0, 0, 0]) + edge _b := ![0, 1, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 2 => + { vertex b := (if b then ![0, 1, 0, 0] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 0] else ![1, 0, 0, 0, 0, 0]) + face _b := ![1, 0, 0, 0] + volume := 0 } + | 3 => + { vertex b := (if b then ![0, 1, 0, 0] else ![1, 0, 0, 0]) + edge _b := ![1, 0, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 4 => + { vertex b := (if b then ![0, 0, 1, 0] else ![1, 0, 0, 0]) + edge _b := ![0, 0, 0, 0, 1, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 5 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge _b := ![0, 0, 0, 1, 1, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 6 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 1] else ![0, 0, 0, 1, 1, 0]) + face _b := ![0, 0, 0, 1] + volume := 0 } + | 7 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 0, 0, 1, 1, 0] else ![0, 0, 1, 0, 1, 0]) + face _b := ![0, 1, 0, 0] + volume := 0 } + | 8 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge _b := ![0, 0, 1, 0, 1, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 9 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 1] else ![0, 0, 1, 0, 1, 0]) + face _b := ![0, 1, 0, 1] + volume := 0 } + | 10 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 1] else ![0, 0, 1, 0, 1, 0]) + face b := (if b then ![0, 1, 0, 1] else ![1, 0, 1, 0]) + volume := 1 } + | 11 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 1] else ![0, 0, 1, 0, 1, 0]) + face _b := ![1, 0, 1, 0] + volume := 0 } + | 12 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![1, 0, 0, 0, 0, 1] else ![0, 0, 1, 0, 1, 0]) + face _b := ![0, 0, 1, 0] + volume := 0 } + | 13 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge _b := ![0, 1, 0, 0, 0, 1] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 14 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge b := (if b then ![0, 1, 0, 0, 0, 1] else ![1, 0, 0, 0, 0, 1]) + face _b := ![1, 0, 0, 0] + volume := 0 } + | 15 => + { vertex b := (if b then ![0, 0, 0, 1] else ![1, 0, 0, 0]) + edge _b := ![1, 0, 0, 0, 0, 1] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 16 => + { vertex _b := ![0, 1, 0, 0] + edge _b := ![0, 0, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 17 => + { vertex b := (if b then ![0, 0, 0, 1] else ![0, 1, 0, 0]) + edge _b := ![0, 0, 0, 0, 0, 1] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 18 => + { vertex _b := ![0, 0, 1, 0] + edge _b := ![0, 0, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 19 => + { vertex b := (if b then ![0, 0, 0, 1] else ![0, 0, 1, 0]) + edge _b := ![0, 0, 0, 1, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | 20 => + { vertex b := (if b then ![0, 0, 0, 1] else ![0, 0, 1, 0]) + edge b := (if b then ![0, 0, 0, 1, 0, 0] else ![0, 0, 1, 0, 0, 0]) + face _b := ![0, 1, 0, 0] + volume := 0 } + | 21 => + { vertex b := (if b then ![0, 0, 0, 1] else ![0, 0, 1, 0]) + edge _b := ![0, 0, 1, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + | _ => + { vertex _b := ![0, 0, 0, 1] + edge _b := ![0, 0, 0, 0, 0, 0] + face _b := ![0, 0, 0, 0] + volume := 0 } + +lemma code_valid (i : Fin 23) : (code i).IsValid := by + revert i + unfold Coordinates.IsValid + decide + +lemma forall_fin4 (P : Fin 4 → Prop) : (∀ i, P i) ↔ P 0 ∧ P 1 ∧ P 2 ∧ P 3 := by + constructor + · intro h + exact ⟨h 0, h 1, h 2, h 3⟩ + · rintro ⟨h₀, h₁, h₂, h₃⟩ i + fin_cases i <;> assumption + +lemma forall_fin6 (P : Fin 6 → Prop) : + (∀ i, P i) ↔ P 0 ∧ P 1 ∧ P 2 ∧ P 3 ∧ P 4 ∧ P 5 := by + constructor + · intro h + exact ⟨h 0, h 1, h 2, h 3, h 4, h 5⟩ + · rintro ⟨h₀, h₁, h₂, h₃, h₄, h₅⟩ i + fin_cases i <;> assumption + +lemma vec_val_five {α : Type*} (a b c d e f : α) : + ![a, b, c, d, e, f] (5 : Fin 6) = f := rfl + +end Thomason.GrayTwo + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GrayTwo + +lemma vertex_0 (x : Coordinates) (hx : x.IsValid) (b : Bool) + (h : x.vertex b 0 = 1) : x.vertex b = ![1, 0, 0, 0] := by + have hp := hx.1 b + have ha := hx.2.2.2.2.1 b + simp only [forall_fin4] at hp + simp only [funext_iff, forall_fin4] + norm_num [Matrix.cons_val_two, Matrix.cons_val_three] + repeat' constructor <;> omega + +lemma vertex_1 (x : Coordinates) (hx : x.IsValid) (b : Bool) + (h : x.vertex b 1 = 1) : x.vertex b = ![0, 1, 0, 0] := by + have hp := hx.1 b + have ha := hx.2.2.2.2.1 b + simp only [forall_fin4] at hp + simp only [funext_iff, forall_fin4] + norm_num [Matrix.cons_val_two, Matrix.cons_val_three] + repeat' constructor <;> omega + +lemma vertex_2 (x : Coordinates) (hx : x.IsValid) (b : Bool) + (h : x.vertex b 2 = 1) : x.vertex b = ![0, 0, 1, 0] := by + have hp := hx.1 b + have ha := hx.2.2.2.2.1 b + simp only [forall_fin4] at hp + simp only [funext_iff, forall_fin4] + norm_num [Matrix.cons_val_two, Matrix.cons_val_three] + repeat' constructor <;> omega + +lemma vertex_3 (x : Coordinates) (hx : x.IsValid) (b : Bool) + (h : x.vertex b 3 = 1) : x.vertex b = ![0, 0, 0, 1] := by + have hp := hx.1 b + have ha := hx.2.2.2.2.1 b + simp only [forall_fin4] at hp + simp only [funext_iff, forall_fin4] + norm_num [Matrix.cons_val_two, Matrix.cons_val_three] + repeat' constructor <;> omega + +end Thomason.GrayTwo + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/GreatestAttachments.lean b/lean/OAI/CategoryTheory/Thomason/GreatestAttachments.lean new file mode 100644 index 0000000000000000000000000000000000000000..076a22f2da469a4d3025d8f4738014ff846899a9 --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/GreatestAttachments.lean @@ -0,0 +1,818 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.DimensionOne +import OAI.CategoryTheory.Thomason.FiniteChains +import OAI.CategoryTheory.Thomason.IntervalExtension + +namespace OAI + +/-! Greatest Attachments. -/ + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits DirectedComplex NormalizedChains OmegaCategory + +namespace FiniteVertexChain +variable {E P : Type u} [PartialOrder E] [PartialOrder P] + +lemma map_lift (S : FiniteVertexChain E) (σ : P →o S.vertices) : + posetCategorificationTableMap P ≫ (complexMap σ).nu ≫ S.lift = + categorification.map (nerveMap (S.inclusion.comp σ).monotone.functor) := by + rw [← Category.assoc, ← posetCategorificationTableMap_natural, lift, Category.assoc, + IsIso.hom_inv_id_assoc, ← categorification.map_comp] + rfl + +end FiniteVertexChain +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalExtension.{u}) +variable {P Q : Type u} [LinearOrder P] [LinearOrder Q] [Finite P] [Finite Q] + +def prismLeg (σ : P →o E) : + T.tensor.obj (categorification.obj (nerve P)) ⟶ categorification.obj (nerve E) := + T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P).hom ≫ + (d.finiteCylinderChainMap σ).nu ≫ (d.finiteImage σ).lift + +lemma prismLeg_natural (σ : Q →o E) (α : P →o Q) : + T.tensor.map (categorification.map (nerveMap α.monotone.functor)) ≫ d.prismLeg T σ = + d.prismLeg T (σ.comp α) := by + unfold prismLeg + rw [← Category.assoc, ← T.tensor.map_comp, posetCategorificationTableMap_natural, + T.tensor.map_comp, Category.assoc, ← Category.assoc (T.tensor.map (complexMap α).nu), + T.simplex_natural, Category.assoc] + have hc := congrArg Hom.nu (d.finiteCylinderChainMap_natural σ α) + change (show (complex P).cylinder.nu ⟶ _ from (d.finiteCylinderChainMap (σ.comp α)).nu) ≫ + (complexMap ((d.finiteImage (σ.comp α)).subInclusion (d.finiteImage σ) + (d.finiteImage_mono σ α))).nu = + (complexMap α).cylinder.nu ≫ (d.finiteCylinderChainMap σ).nu at hc + have hcc := congrArg (fun z : (complex P).cylinder.nu ⟶ (complex (d.finiteImage σ).vertices).nu => + T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P).hom ≫ z ≫ + (d.finiteImage σ).lift) hc + simp only [Category.assoc, FiniteVertexChain.lift_natural] at hcc + exact hcc.symm + +lemma prismLeg_endpoint_false (σ : P →o E) : + (T.endpoint false).app (categorification.obj (nerve P)) ≫ d.prismLeg T σ = + categorification.map (nerveMap (d.f.comp σ).monotone.functor) := by + unfold prismLeg + rw [← Category.assoc, ← (T.endpoint false).naturality, Category.assoc, + ← Category.assoc ((T.endpoint false).app (complex P).nu), T.simplex_endpoint, CategoryTheory.Functor.id_map] + have hc := congrArg Hom.nu (d.finiteAntihomotopy σ).cylinderHom_endpoint_false + change (show (complex P).nu ⟶ (complex P).cylinder.nu from ((complex P).cylinderEndpoint false).nu) ≫ (d.finiteCylinderChainMap σ).nu = + (complexMap (d.finiteImageLeft σ)).nu at hc + have hcc := congrArg (fun z : (complex P).nu ⟶ (complex (d.finiteImage σ).vertices).nu => + posetCategorificationTableMap P ≫ z ≫ (d.finiteImage σ).lift) hc + simp only [Category.assoc] at hcc + exact hcc.trans ((d.finiteImage σ).map_lift (d.finiteImageLeft σ)) + +lemma prismLeg_endpoint_true (σ : P →o E) : + (T.endpoint true).app (categorification.obj (nerve P)) ≫ d.prismLeg T σ = + categorification.map (nerveMap (d.g.comp σ).monotone.functor) := by + unfold prismLeg + rw [← Category.assoc, ← (T.endpoint true).naturality, Category.assoc, + ← Category.assoc ((T.endpoint true).app (complex P).nu), T.simplex_endpoint, CategoryTheory.Functor.id_map] + have hc := congrArg Hom.nu (d.finiteAntihomotopy σ).cylinderHom_endpoint_true + change (show (complex P).nu ⟶ (complex P).cylinder.nu from ((complex P).cylinderEndpoint true).nu) ≫ (d.finiteCylinderChainMap σ).nu = + (complexMap (d.finiteImageRight σ)).nu at hc + have hcc := congrArg (fun z : (complex P).nu ⟶ (complex (d.finiteImage σ).vertices).nu => + posetCategorificationTableMap P ≫ z ≫ (d.finiteImage σ).lift) hc + simp only [Category.assoc] at hcc + exact hcc.trans ((d.finiteImage σ).map_lift (d.finiteImageRight σ)) + +lemma prismLeg_stationary (σ : P →o E) (hs : ∀ p, σ p ∈ A) : + d.prismLeg T σ = T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp σ).monotone.functor) := by + unfold prismLeg + rw [d.finiteCylinderChainMap_stationary σ hs] + change T.tensor.map (posetCategorificationTableMap P) ≫ (T.simplex P).hom ≫ + (complex P).cylinderProjection.nu ≫ (complexMap (d.finiteImageLeft σ)).nu ≫ + (d.finiteImage σ).lift = _ + rw [← Category.assoc (T.simplex P).hom, T.simplex_projection, + ← Category.assoc (T.tensor.map (posetCategorificationTableMap P)), + T.projection.naturality, Category.assoc, CategoryTheory.Functor.id_map, FiniteVertexChain.map_lift] + rfl + +def prismCocone : Cocone (posetSimplexDiagram E ⋙ T.tensor) where + pt := categorification.obj (nerve E) + ι.app s := d.prismLeg T (simplexVertexOrder s) + ι.naturality s t α := by + change T.tensor.map (categorification.map (nerveMap (simplexVertexMap α).monotone.functor)) ≫ + d.prismLeg T (simplexVertexOrder t) = d.prismLeg T (simplexVertexOrder s) ≫ 𝟙 _ + rw [d.prismLeg_natural, simplexVertexOrder_natural, Category.comp_id] + +def prism : T.tensor.obj (categorification.obj (nerve E)) ⟶ categorification.obj (nerve E) := by + letI := T.cocontinuous + letI : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + exact (isColimitOfPreserves T.tensor (posetSimplexIsColimit E)).desc (d.prismCocone T) + +lemma prism_leg (s : SimplexIndex E) : + T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + d.prism T = d.prismLeg T (simplexVertexOrder s) := by + let := T.cocontinuous + let : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + exact (isColimitOfPreserves T.tensor (posetSimplexIsColimit E)).fac (d.prismCocone T) s + +lemma prism_endpoint_false : + (T.endpoint false).app (categorification.obj (nerve E)) ≫ d.prism T = + categorification.map (nerveMap d.f.monotone.functor) := by + apply (posetSimplexIsColimit E).hom_ext + intro s + change categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + (T.endpoint false).app (categorification.obj (nerve E)) ≫ d.prism T = + categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + categorification.map (nerveMap d.f.monotone.functor) + have hn := (T.endpoint false).naturality + (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) + simp only [CategoryTheory.Functor.id_map] at hn + rw [← Category.assoc, hn, Category.assoc, + d.prism_leg, d.prismLeg_endpoint_false] + rw [← categorification.map_comp] + congr 1 + +lemma prism_endpoint_true : + (T.endpoint true).app (categorification.obj (nerve E)) ≫ d.prism T = + categorification.map (nerveMap d.g.monotone.functor) := by + apply (posetSimplexIsColimit E).hom_ext + intro s + change categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + (T.endpoint true).app (categorification.obj (nerve E)) ≫ d.prism T = + categorification.map (nerveMap (simplexVertexOrder s).monotone.functor) ≫ + categorification.map (nerveMap d.g.monotone.functor) + have hn := (T.endpoint true).naturality + (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) + simp only [CategoryTheory.Functor.id_map] at hn + rw [← Category.assoc, hn, Category.assoc, + d.prism_leg, d.prismLeg_endpoint_true] + rw [← categorification.map_comp] + congr 1 + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits DirectedComplex NormalizedChains OmegaCategory + +def SimplexIndex.postcompose {P E : Type u} [PartialOrder P] [PartialOrder E] + (v : P →o E) (s : SimplexIndex P) : SimplexIndex E := + CostructuredArrow.mk (s.hom ≫ nerveMap v.monotone.functor) + +lemma simplexVertexOrder_postcompose {P E : Type u} [PartialOrder P] [PartialOrder E] + (v : P →o E) (s : SimplexIndex P) : + simplexVertexOrder (s.postcompose v) = v.comp (simplexVertexOrder s) := by + ext k + rfl + +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalExtension.{u}) + +lemma grayPrism_stationary {P : Type u} [PartialOrder P] (v : P →o E) (hv : ∀ p, v p ∈ A) : + T.tensor.map (categorification.map (nerveMap v.monotone.functor)) ≫ d.prism T = + T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp v).monotone.functor) := by + let := T.cocontinuous + let : PreservesColimitsOfSize.{0,u} T.tensor := preservesColimitsOfSize_shrink T.tensor + apply (isColimitOfPreserves T.tensor (posetSimplexIsColimit P)).hom_ext + intro s + change T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + T.tensor.map (categorification.map (nerveMap v.monotone.functor)) ≫ d.prism T = + T.tensor.map (categorification.map (nerveMap (simplexVertexOrder s).monotone.functor)) ≫ + T.projection.app (categorification.obj (nerve P)) ≫ + categorification.map (nerveMap (d.f.comp v).monotone.functor) + rw [← Category.assoc, ← T.tensor.map_comp, ← categorification.map_comp] + have hvn : nerveMap (simplexVertexOrder s).monotone.functor ≫ nerveMap v.monotone.functor = + nerveMap (simplexVertexOrder (s.postcompose v)).monotone.functor := by + rw [simplexVertexOrder_postcompose] + rfl + erw [hvn, d.prism_leg, d.prismLeg_stationary T _ (fun p => hv _), + ← Category.assoc, T.projection.naturality, CategoryTheory.Functor.id_map, + Category.assoc, ← categorification.map_comp] + congr 1 + +lemma grayPrism_stationary_inclusion : + T.tensor.map (categorification.map (nerveMap (OrderHom.Subtype.val (fun element : E => element ∈ A)).monotone.functor)) ≫ + d.prism T = T.projection.app (categorification.obj (nerve A)) ≫ + categorification.map (nerveMap (d.f.comp (OrderHom.Subtype.val (fun element : E => element ∈ A))).monotone.functor) := + d.grayPrism_stationary T (OrderHom.Subtype.val (fun element : E => element ∈ A)) (fun p => p.property) + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory Limits OmegaCategory + +namespace RelativePrismData +variable {E : Type u} [PartialOrder E] {A : Set E} (d : RelativePrismData E A) +variable (T : RightIntervalExtension.{u}) (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) +variable (adj : T.tensor ⊣ R) (n : ℕ) + +def finitePrism : + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val ⟶ + ((categorificationFinite n).obj (nerve E)).val := + (T.truncatedCylinderEquiv R adj n (categorification.obj (nerve E)) + ((categorificationFinite n).obj (nerve E)).val + ((categorificationFinite n).obj (nerve E)).property).symm + (d.prism T ≫ truncationUnit n (categorification.obj (nerve E))) + +lemma finitePrism_unit : + T.tensor.map (truncationUnit n (categorification.obj (nerve E))) ≫ + d.finitePrism T R adj n = d.prism T ≫ truncationUnit n (categorification.obj (nerve E)) := by + erw [← T.truncatedCylinderEquiv_apply R adj n _ _ + ((categorificationFinite n).obj (nerve E)).property] + exact Equiv.apply_symm_apply _ _ + +lemma finitePrism_endpoint_false : + (T.endpoint false).app ((categorificationFinite n).obj (nerve E)).val ≫ + d.finitePrism T R adj n = (categorificationFinite n).map (nerveMap d.f.monotone.functor) := by + apply truncation_functor_ext (n := n) + have hn := (T.endpoint false).naturality + (truncationUnit n (categorification.obj (nerve E))) + exact (congrArg (fun h : categorification.obj (nerve E) ⟶ + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val => + h ≫ d.finitePrism T R adj n) hn).trans + ((congrArg (fun h => (T.endpoint false).app (categorification.obj (nerve E)) ≫ h) + (d.finitePrism_unit T R adj n)).trans + (congrArg (fun h : categorification.obj (nerve E) ⟶ categorification.obj (nerve E) => + h ≫ truncationUnit n (categorification.obj (nerve E))) + (d.prism_endpoint_false T))) + +lemma finitePrism_endpoint_true : + (T.endpoint true).app ((categorificationFinite n).obj (nerve E)).val ≫ + d.finitePrism T R adj n = (categorificationFinite n).map (nerveMap d.g.monotone.functor) := by + apply truncation_functor_ext (n := n) + have hn := (T.endpoint true).naturality + (truncationUnit n (categorification.obj (nerve E))) + exact (congrArg (fun h : categorification.obj (nerve E) ⟶ + T.tensor.obj ((categorificationFinite n).obj (nerve E)).val => + h ≫ d.finitePrism T R adj n) hn).trans + ((congrArg (fun h => (T.endpoint true).app (categorification.obj (nerve E)) ≫ h) + (d.finitePrism_unit T R adj n)).trans + (congrArg (fun h : categorification.obj (nerve E) ⟶ categorification.obj (nerve E) => + h ≫ truncationUnit n (categorification.obj (nerve E))) + (d.prism_endpoint_true T))) + +lemma finitePrism_stationary {P : Type u} [PartialOrder P] (v : P →o E) (hv : ∀ p, v p ∈ A) : + T.tensor.map ((categorificationFinite n).map (nerveMap v.monotone.functor)) ≫ + d.finitePrism T R adj n = + T.projection.app ((categorificationFinite n).obj (nerve P)).val ≫ + (categorificationFinite n).map (nerveMap (d.f.comp v).monotone.functor) := by + apply (T.truncatedCylinderEquiv R adj n (categorification.obj (nerve P)) + ((categorificationFinite n).obj (nerve E)).val + ((categorificationFinite n).obj (nerve E)).property).injective + erw [T.truncatedCylinderEquiv_apply, T.truncatedCylinderEquiv_apply] + erw [← Category.assoc, ← T.tensor.map_comp] + have hn : truncationUnit n (categorification.obj (nerve P)) ≫ + (show ((categorificationFinite n).obj (nerve P)).val ⟶ + ((categorificationFinite n).obj (nerve E)).val from + (categorificationFinite n).map (nerveMap v.monotone.functor)) = + categorification.map (nerveMap v.monotone.functor) ≫ + truncationUnit n (categorification.obj (nerve E)) := rfl + erw [hn, T.tensor.map_comp, Category.assoc, d.finitePrism_unit, + ← Category.assoc, d.grayPrism_stationary T v hv, + Category.assoc] + exact congrArg (fun h : T.tensor.obj (categorification.obj (nerve P)) ⟶ + ((categorificationFinite n).obj (nerve P)).val => + h ≫ (categorificationFinite n).map (nerveMap (d.f.comp v).monotone.functor)) + (T.projection.naturality (truncationUnit n (categorification.obj (nerve P)))).symm + +end RelativePrismData +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GreatestNew +open CategoryTheory Limits OmegaCategory AttachmentComparison Classical + +variable {E : Type u} [PartialOrder E] (A : Set E) (hA : IsLowerSet A) +variable (r : E →o A) (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) +variable (x : E) (hx : IsGreatest Aᶜ x) + +def retract : E →o A where + toFun e := if he : e ∈ A then ⟨e, he⟩ else r x + monotone' := by + intro b c hbc + dsimp + split_ifs with hb hc hc + · exact hbc + · exact (hadj ⟨b,hb⟩ x).mp (hbc.trans (hx.2 hc)) + · exact False.elim (hb (hA hbc hc)) + · exact le_rfl + +def upper : E →o E where + toFun e := if e ∈ A then e else x + monotone' := by + intro b c hbc + dsimp + split_ifs with hb hc hc + · exact hbc + · exact hbc.trans (hx.2 hc) + · exact False.elim (hb (hA hbc hc)) + · exact le_rfl + +@[simp] lemma retract_old (a : A) : retract A hA r hadj x hx a.val = a := by + change (if membership : a.val ∈ A then ⟨a.val, membership⟩ else r x) = a + simp [a.property] + +@[simp] lemma upper_old (a : A) : upper A hA x hx a.val = a.val := by + change (if a.val ∈ A then a.val else x) = a.val + simp [a.property] + +lemma retract_comp_inc : (retract A hA r hadj x hx).comp + (OrderEmbedding.subtype A).toOrderHom = OrderHom.id := by + ext a + exact congrArg Subtype.val (retract_old A hA r hadj x hx a) + +lemma id_le_upper (e : E) : e ≤ upper A hA x hx e := by + change e ≤ if e ∈ A then e else x + split_ifs with he + · exact le_rfl + · exact hx.2 he + +lemma retract_le_upper (e : E) : + (retract A hA r hadj x hx e).val ≤ upper A hA x hx e := by + change (if membership : e ∈ A then (⟨e, membership⟩ : A) else r x).val ≤ + if e ∈ A then e else x + split_ifs + · exact le_rfl + · exact (hadj (r x) x).mpr le_rfl + +lemma upper_constant (a : E) (ha : a ∉ A) (b : E) (hb : b ∉ A) : + upper A hA x hx a = upper A hA x hx b := by + change (if a ∈ A then a else x) = if b ∈ A then b else x + simp [ha, hb] + +def idPrismData : RelativePrismData E A where + lowerSet := hA + f := OrderHom.id + g := upper A hA x hx + below := id_le_upper A hA x hx + agree e he := (upper_old A hA x hx ⟨e,he⟩).symm + constant := upper_constant A hA x hx + +def retractPrismData : RelativePrismData E A where + lowerSet := hA + f := (OrderHom.Subtype.val (fun element : E => element ∈ A)).comp (retract A hA r hadj x hx) + g := upper A hA x hx + below := retract_le_upper A hA r hadj x hx + agree e he := by + change (retract A hA r hadj x hx e).val = upper A hA x hx e + rw [retract_old A hA r hadj x hx ⟨e,he⟩, upper_old A hA x hx ⟨e,he⟩] + constant := upper_constant A hA x hx + +end Thomason.GreatestNew + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalExtension +open CategoryTheory Limits OmegaCategory + +variable (T : RightIntervalExtension.{u}) +variable (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) + +include R adj in + +theorem finite_pushout_zigzag + {n : ℕ} {A B X Y : NCategory.{u} n} + {i : A ⟶ B} {a : A ⟶ X} {b : B ⟶ Y} {j : X ⟶ Y} + (sq : IsPushout i a b j) + (r : B ⟶ A) (hi : i ≫ r = 𝟙 A) (G : B ⟶ B) + (P₀ P₁ : T.tensor.obj B.val ⟶ B.val) + (h₀ : (T.endpoint false).app B.val ≫ P₀ = 𝟙 B.val) + (h₁ : (T.endpoint true).app B.val ≫ P₀ = G) + (h₂ : (T.endpoint false).app B.val ≫ P₁ = r ≫ i) + (h₃ : (T.endpoint true).app B.val ≫ P₁ = G) + (hs₀ : T.tensor.map i ≫ P₀ = T.projection.app A.val ≫ i) + (hs₁ : T.tensor.map i ≫ P₁ = T.projection.app A.val ≫ i) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 ((streetNerveFinite n).obj Y)) + ((streetNerveFinite n).map H)) ∧ + Nonempty (SSet.Homotopy ((streetNerveFinite n).map (p ≫ j)) + ((streetNerveFinite n).map H)) := by + let p : Y ⟶ X := sq.desc (r ≫ a) (𝟙 X) (by + rw [← Category.assoc, hi, Category.id_comp, Category.comp_id]) + have hpB : b ≫ p = r ≫ a := sq.inl_desc _ _ _ + have hpX : j ≫ p = 𝟙 X := sq.inr_desc _ _ _ + obtain ⟨Q₀, _, _, hB₀, hX₀, _⟩ := T.finite_stationary_gluing R adj sq P₀ + (fun ε => if ε then G else 𝟙 B) (by intro ε; cases ε; exact h₀; exact h₁) hs₀ + obtain ⟨Q₁, _, _, hB₁, hX₁, _⟩ := T.finite_stationary_gluing R adj sq P₁ + (fun ε => if ε then G else r ≫ i) (by intro ε; cases ε; exact h₂; exact h₃) hs₁ + let e₀ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y.val) Q₀ + let e₁ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y.val) Q₁ + have he₀ : e₀ false = 𝟙 Y := by + apply sq.hom_ext + · exact hB₀ false + · exact hX₀ false + have he₁ : e₁ false = p ≫ j := by + apply sq.hom_ext + · rw [← Category.assoc, hpB, Category.assoc, ← sq.w, ← Category.assoc] + exact hB₁ false + · rw [← Category.assoc, hpX, Category.id_comp] + exact hX₁ false + have he : e₁ true = e₀ true := by + apply sq.hom_ext + · exact (hB₁ true).trans (hB₀ true).symm + · exact (hX₁ true).trans (hX₀ true).symm + refine ⟨p, e₀ true, hpX, ?_, ?_⟩ + · have h : SSet.Homotopy ((streetNerveFinite n).map (e₀ false)) + ((streetNerveFinite n).map (e₀ true)) := T.nerveHomotopy Q₀ + rw [he₀, (streetNerveFinite n).map_id] at h + exact ⟨h⟩ + · have h : SSet.Homotopy ((streetNerveFinite n).map (e₁ false)) + ((streetNerveFinite n).map (e₁ true)) := T.nerveHomotopy Q₁ + rw [he₁, he] at h + exact ⟨h⟩ + +lemma finite_nerve_weak_of_zigzag {n : ℕ} {X Y : NCategory.{u} n} + (j : X ⟶ Y) (p : Y ⟶ X) (H : Y ⟶ Y) (hp : j ≫ p = 𝟙 X) + (h₀ : SSet.Homotopy (𝟙 ((streetNerveFinite n).obj Y)) ((streetNerveFinite n).map H)) + (h₁ : SSet.Homotopy ((streetNerveFinite n).map (p ≫ j)) ((streetNerveFinite n).map H)) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + have hH : simplicialWeakEquivalences ((streetNerveFinite n).map H) := + (simplicialWeakEquivalences_homotopy h₀).mp (simplicialWeakEquivalences.id_mem _) + have hw : simplicialWeakEquivalences ((streetNerveFinite n).map (p ≫ j)) := + (simplicialWeakEquivalences_homotopy h₁).mpr hH + have rt : RetractArrow j (p ≫ j) := + { i := Arrow.homMk j (𝟙 Y) (by simp [← Category.assoc,hp]) + r := Arrow.homMk p (𝟙 Y) (by simp) + retract := by ext <;> simp [hp] } + exact simplicialWeakEquivalences.of_retract (rt.map (streetNerveFinite n)) hw + +end Thomason.RightIntervalExtension + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GreatestNew +open CategoryTheory Limits OmegaCategory AttachmentComparison + +lemma finitePosetMap_id (n : ℕ) (E : Type u) [PartialOrder E] : + posetMap n (OrderHom.id : E →o E) = 𝟙 (posetObj n E) := + (categorificationFinite n).map_id (nerve E) + +lemma finitePosetMap_comp (n : ℕ) {P Q R : Type u} [PartialOrder P] + [PartialOrder Q] [PartialOrder R] (f : P →o Q) (g : Q →o R) : + posetMap n (g.comp f) = posetMap n f ≫ posetMap n g := + (categorificationFinite n).map_comp (nerveMap f.toFunctor) (nerveMap g.toFunctor) + +variable (T : RightIntervalExtension.{u}) +variable (R : OmegaCategory.{u} ⥤ OmegaCategory.{u}) (adj : T.tensor ⊣ R) +variable {E : Type u} [PartialOrder E] (A : Set E) (hA : IsLowerSet A) +variable (r : E →o A) (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) +variable (x : E) (hx : IsGreatest Aᶜ x) + +include T R adj hA r hadj x hx in + +theorem finite_pushout_deformation (n : ℕ) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} {j : X ⟶ Y} + {b : posetObj n E ⟶ Y} (sq : IsPushout (inc n A) a b j) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 ((streetNerveFinite n).obj Y)) + ((streetNerveFinite n).map H)) ∧ + Nonempty (SSet.Homotopy ((streetNerveFinite n).map (p ≫ j)) + ((streetNerveFinite n).map H)) := by + let d₀ := idPrismData A hA x hx + let d₁ := retractPrismData A hA r hadj x hx + let i : A →o E := (OrderEmbedding.subtype A).toOrderHom + let r' := retract A hA r hadj x hx + have hr' : r'.comp i = OrderHom.id := retract_comp_inc A hA r hadj x hx + have hri : inc n A ≫ posetMap n r' = 𝟙 (posetObj n A) := by + rw [← finitePosetMap_comp] + change posetMap n (r'.comp i) = _ + rw [hr', finitePosetMap_id] + have h₀ : d₀.f.comp i = i := rfl + have h₁ : d₁.f.comp i = i := by + ext e + exact congrArg Subtype.val (retract_old A hA r hadj x hx e) + have hs₀ := d₀.finitePrism_stationary T R adj n i (fun e => e.property) + have hs₁ := d₁.finitePrism_stationary T R adj n i (fun e => e.property) + rw [h₀] at hs₀ + rw [h₁] at hs₁ + exact T.finite_pushout_zigzag R adj sq (posetMap n r') hri + (posetMap n (upper A hA x hx)) + (d₀.finitePrism T R adj n) (d₁.finitePrism T R adj n) + ((d₀.finitePrism_endpoint_false T R adj n).trans (finitePosetMap_id n E)) + (d₀.finitePrism_endpoint_true T R adj n) + ((d₁.finitePrism_endpoint_false T R adj n).trans (finitePosetMap_comp n r' i)) + (d₁.finitePrism_endpoint_true T R adj n) hs₀ hs₁ + +include T R adj hA r hadj x hx in + +theorem finite_pushout_nerve_weak (n : ℕ) + {X Y : NCategory.{u} n} {a : posetObj n A ⟶ X} {j : X ⟶ Y} + {b : posetObj n E ⟶ Y} (sq : IsPushout (inc n A) a b j) : + simplicialWeakEquivalences ((streetNerveFinite n).map j) := by + obtain ⟨p,H,hp,⟨H₀⟩,⟨H₁⟩⟩ := finite_pushout_deformation T R adj A hA r hadj x hx n sq + exact RightIntervalExtension.finite_nerve_weak_of_zigzag j p H hp H₀ H₁ + +end Thomason.GreatestNew + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalExtension +open CategoryTheory Limits OmegaCategory + +variable (T : RightIntervalExtension.{u}) +variable {A B X Y Z : OmegaCategory.{u}} +variable {i : A ⟶ B} {a : A ⟶ X} {b : B ⟶ Y} {j : X ⟶ Y} +variable (sq : IsPushout i a b j) + +include sq in + +lemma omegaCylinder_pushout : IsPushout (T.tensor.map i) (T.tensor.map a) + (T.tensor.map b) (T.tensor.map j) := by + let := T.cocontinuous + exact sq.map T.tensor + +def omegaGlue (PB : T.tensor.obj B ⟶ Z) (PX : T.tensor.obj X ⟶ Z) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : T.tensor.obj Y ⟶ Z := + (T.omegaCylinder_pushout sq).desc PB PX h + +lemma omegaGlue_left (PB : T.tensor.obj B ⟶ Z) (PX : T.tensor.obj X ⟶ Z) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : + T.tensor.map b ≫ T.omegaGlue sq PB PX h = PB := + (T.omegaCylinder_pushout sq).inl_desc PB PX h + +lemma omegaGlue_right (PB : T.tensor.obj B ⟶ Z) (PX : T.tensor.obj X ⟶ Z) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) : + T.tensor.map j ≫ T.omegaGlue sq PB PX h = PX := + (T.omegaCylinder_pushout sq).inr_desc PB PX h + +include sq in +lemma omegaCylinder_hom_ext {P Q : T.tensor.obj Y ⟶ Z} + (hb : T.tensor.map b ≫ P = T.tensor.map b ≫ Q) + (hj : T.tensor.map j ≫ P = T.tensor.map j ≫ Q) : P = Q := + (T.omegaCylinder_pushout sq).hom_ext hb hj + +lemma omegaGlue_endpoint_left + (PB : T.tensor.obj B ⟶ Z) (PX : T.tensor.obj X ⟶ Z) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) (ε : Bool) : + b ≫ (T.endpoint ε).app Y ≫ T.omegaGlue sq PB PX h = + (T.endpoint ε).app B ≫ PB := by + exact (congrArg (fun f : B ⟶ T.tensor.obj Y => + f ≫ T.omegaGlue sq PB PX h) ((T.endpoint ε).naturality b)).trans + (congrArg (fun f => (T.endpoint ε).app B ≫ f) (T.omegaGlue_left sq PB PX h)) + +lemma omegaGlue_endpoint_right + (PB : T.tensor.obj B ⟶ Z) (PX : T.tensor.obj X ⟶ Z) + (h : T.tensor.map i ≫ PB = T.tensor.map a ≫ PX) (ε : Bool) : + j ≫ (T.endpoint ε).app Y ≫ T.omegaGlue sq PB PX h = + (T.endpoint ε).app X ≫ PX := by + exact (congrArg (fun f : X ⟶ T.tensor.obj Y => + f ≫ T.omegaGlue sq PB PX h) ((T.endpoint ε).naturality j)).trans + (congrArg (fun f => (T.endpoint ε).app X ≫ f) (T.omegaGlue_right sq PB PX h)) + +include sq in + +theorem omega_stationary_gluing + (P : T.tensor.obj B ⟶ B) (F : Bool → (B ⟶ B)) + (he : ∀ ε, (T.endpoint ε).app B ≫ P = F ε) + (hs : T.tensor.map i ≫ P = T.projection.app A ≫ i) : + ∃ Q : T.tensor.obj Y ⟶ Y, + T.tensor.map b ≫ Q = P ≫ b ∧ + T.tensor.map j ≫ Q = T.projection.app X ≫ j ∧ + (∀ ε, b ≫ (T.endpoint ε).app Y ≫ Q = F ε ≫ b) ∧ + (∀ ε, j ≫ (T.endpoint ε).app Y ≫ Q = j) ∧ + (∀ Q' : T.tensor.obj Y ⟶ Y, + T.tensor.map b ≫ Q' = P ≫ b → + T.tensor.map j ≫ Q' = T.projection.app X ≫ j → Q' = Q) := by + have hc : T.tensor.map i ≫ (P ≫ b) = + T.tensor.map a ≫ (T.projection.app X ≫ j) := by + calc + _ = T.projection.app A ≫ (i ≫ b) := by rw [← Category.assoc, hs, Category.assoc] + _ = T.projection.app A ≫ (a ≫ j) := congrArg (fun f => T.projection.app A ≫ f) sq.w + _ = _ := (congrArg (fun f : T.tensor.obj A ⟶ X => f ≫ j) + (T.projection.naturality a)).symm + let Q := T.omegaGlue sq (P ≫ b) (T.projection.app X ≫ j) hc + refine ⟨Q, T.omegaGlue_left sq _ _ hc, T.omegaGlue_right sq _ _ hc, ?_, ?_, ?_⟩ + · intro ε + rw [T.omegaGlue_endpoint_left, ← Category.assoc, he ε] + · intro ε + rw [T.omegaGlue_endpoint_right, ← Category.assoc] + have hε := congrArg (fun α => α.app X) (T.endpoint_projection ε) + change (T.endpoint ε).app X ≫ T.projection.app X = 𝟙 X at hε + rw [hε]; rfl + · intro Q' hb hj + apply T.omegaCylinder_hom_ext sq + · exact hb.trans (T.omegaGlue_left sq _ _ hc).symm + · exact hj.trans (T.omegaGlue_right sq _ _ hc).symm + +include sq in + +lemma omega_stationary_gluing_natural + {X' Y' : OmegaCategory.{u}} {j' : X' ⟶ Y'} {b' : B ⟶ Y'} + (w : X ⟶ X') (v : Y ⟶ Y') (hvB : b ≫ v = b') (hvX : j ≫ v = w ≫ j') + (P : T.tensor.obj B ⟶ B) + (Q : T.tensor.obj Y ⟶ Y) (Q' : T.tensor.obj Y' ⟶ Y') + (hB : T.tensor.map b ≫ Q = P ≫ b) + (hX : T.tensor.map j ≫ Q = T.projection.app X ≫ j) + (hB' : T.tensor.map b' ≫ Q' = P ≫ b') + (hX' : T.tensor.map j' ≫ Q' = T.projection.app X' ≫ j') : + T.tensor.map v ≫ Q' = Q ≫ v := by + apply T.omegaCylinder_hom_ext sq + · rw [← Category.assoc, ← T.tensor.map_comp, hvB, hB', ← hvB, + ← Category.assoc, ← hB, Category.assoc] + · calc + _ = T.tensor.map (j ≫ v) ≫ Q' := by rw [T.tensor.map_comp, Category.assoc] + _ = T.tensor.map (w ≫ j') ≫ Q' := by rw [hvX] + _ = T.tensor.map w ≫ (T.tensor.map j' ≫ Q') := by rw [T.tensor.map_comp, Category.assoc] + _ = T.tensor.map w ≫ (T.projection.app X' ≫ j') := by rw [hX'] + _ = T.projection.app X ≫ (w ≫ j') := + congrArg (fun f : T.tensor.obj X ⟶ X' => f ≫ j') (T.projection.naturality w) + _ = (T.projection.app X ≫ j) ≫ v := + congrArg (fun f : X ⟶ Y' => T.projection.app X ≫ f) hvX.symm + _ = _ := by rw [← hX, Category.assoc] + +end Thomason.RightIntervalExtension + +end + +noncomputable section +universe u v w z + + +namespace Thomason.RightIntervalExtension +open CategoryTheory Limits OmegaCategory + +variable (T : RightIntervalExtension.{u}) + +include T in + +theorem omega_pushout_zigzag + {A B X Y : OmegaCategory.{u}} + {i : A ⟶ B} {a : A ⟶ X} {b : B ⟶ Y} {j : X ⟶ Y} + (sq : IsPushout i a b j) + (r : B ⟶ A) (hi : i ≫ r = 𝟙 A) (G : B ⟶ B) + (P₀ P₁ : T.tensor.obj B ⟶ B) + (h₀ : (T.endpoint false).app B ≫ P₀ = 𝟙 B) + (h₁ : (T.endpoint true).app B ≫ P₀ = G) + (h₂ : (T.endpoint false).app B ≫ P₁ = r ≫ i) + (h₃ : (T.endpoint true).app B ≫ P₁ = G) + (hs₀ : T.tensor.map i ≫ P₀ = T.projection.app A ≫ i) + (hs₁ : T.tensor.map i ≫ P₁ = T.projection.app A ≫ i) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 (streetNerveFunctor.obj Y)) + (streetNerveFunctor.map H)) ∧ + Nonempty (SSet.Homotopy (streetNerveFunctor.map (p ≫ j)) + (streetNerveFunctor.map H)) := by + let p : Y ⟶ X := sq.desc (r ≫ a) (𝟙 X) (by + rw [← Category.assoc, hi, Category.id_comp, Category.comp_id]) + have hpB : b ≫ p = r ≫ a := sq.inl_desc _ _ _ + have hpX : j ≫ p = 𝟙 X := sq.inr_desc _ _ _ + obtain ⟨Q₀, _, _, hB₀, hX₀, _⟩ := T.omega_stationary_gluing sq P₀ + (fun ε => if ε then G else 𝟙 B) (by intro ε; cases ε; exact h₀; exact h₁) hs₀ + obtain ⟨Q₁, _, _, hB₁, hX₁, _⟩ := T.omega_stationary_gluing sq P₁ + (fun ε => if ε then G else r ≫ i) (by intro ε; cases ε; exact h₂; exact h₃) hs₁ + let e₀ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y) Q₀ + let e₁ (ε : Bool) : Y ⟶ Y := OmegaCategory.Functor.comp ((T.endpoint ε).app Y) Q₁ + have he₀ : e₀ false = 𝟙 Y := by + apply sq.hom_ext + · exact hB₀ false + · exact hX₀ false + have he₁ : e₁ false = p ≫ j := by + apply sq.hom_ext + · rw [← Category.assoc, hpB, Category.assoc, ← sq.w, ← Category.assoc] + exact hB₁ false + · rw [← Category.assoc, hpX, Category.id_comp] + exact hX₁ false + have he : e₁ true = e₀ true := by + apply sq.hom_ext + · exact (hB₁ true).trans (hB₀ true).symm + · exact (hX₁ true).trans (hX₀ true).symm + refine ⟨p, e₀ true, hpX, ?_, ?_⟩ + · have h : SSet.Homotopy (streetNerveFunctor.map (e₀ false)) + (streetNerveFunctor.map (e₀ true)) := T.nerveHomotopy Q₀ + rw [he₀, streetNerveFunctor.map_id] at h + exact ⟨h⟩ + · have h : SSet.Homotopy (streetNerveFunctor.map (e₁ false)) + (streetNerveFunctor.map (e₁ true)) := T.nerveHomotopy Q₁ + rw [he₁, he] at h + exact ⟨h⟩ + +lemma omega_nerve_weak_of_zigzag {X Y : OmegaCategory.{u}} + (j : X ⟶ Y) (p : Y ⟶ X) (H : Y ⟶ Y) (hp : j ≫ p = 𝟙 X) + (h₀ : SSet.Homotopy (𝟙 (streetNerveFunctor.obj Y)) (streetNerveFunctor.map H)) + (h₁ : SSet.Homotopy (streetNerveFunctor.map (p ≫ j)) (streetNerveFunctor.map H)) : + simplicialWeakEquivalences (streetNerveFunctor.map j) := by + have hH : simplicialWeakEquivalences (streetNerveFunctor.map H) := + (simplicialWeakEquivalences_homotopy h₀).mp (simplicialWeakEquivalences.id_mem _) + have hw : simplicialWeakEquivalences (streetNerveFunctor.map (p ≫ j)) := + (simplicialWeakEquivalences_homotopy h₁).mpr hH + have rt : RetractArrow j (p ≫ j) := + { i := Arrow.homMk j (𝟙 Y) (by simp [← Category.assoc,hp]) + r := Arrow.homMk p (𝟙 Y) (by simp) + retract := by ext <;> simp [hp] } + exact simplicialWeakEquivalences.of_retract (rt.map streetNerveFunctor) hw + +end Thomason.RightIntervalExtension + +end + +noncomputable section +universe u v w z + + +namespace Thomason.GreatestNew +open CategoryTheory Limits OmegaCategory + +abbrev omegaPosetObj (P : Type u) [PartialOrder P] : OmegaCategory.{u} := + categorification.obj (nerve P) + +abbrev omegaPosetMap {P Q : Type u} [PartialOrder P] [PartialOrder Q] + (f : P →o Q) : omegaPosetObj P ⟶ omegaPosetObj Q := + categorification.map (nerveMap f.toFunctor) + +abbrev omegaInc {P : Type u} [PartialOrder P] (A : Set P) := + omegaPosetMap (P := A) (Q := P) (OrderEmbedding.subtype A).toOrderHom + +lemma omegaPosetMap_id (E : Type u) [PartialOrder E] : + omegaPosetMap (OrderHom.id : E →o E) = 𝟙 (omegaPosetObj E) := + categorification.map_id (nerve E) + +lemma omegaPosetMap_comp {P Q R : Type u} [PartialOrder P] + [PartialOrder Q] [PartialOrder R] (f : P →o Q) (g : Q →o R) : + omegaPosetMap (g.comp f) = omegaPosetMap f ≫ omegaPosetMap g := + categorification.map_comp (nerveMap f.toFunctor) (nerveMap g.toFunctor) + +variable (T : RightIntervalExtension.{u}) +variable {E : Type u} [PartialOrder E] (A : Set E) (hA : IsLowerSet A) +variable (r : E →o A) (hadj : ∀ (a : A) (e : E), a.val ≤ e ↔ a ≤ r e) +variable (x : E) (hx : IsGreatest Aᶜ x) + +include T hA r hadj x hx in + +theorem omega_pushout_deformation + {X Y : OmegaCategory.{u}} {a : omegaPosetObj A ⟶ X} {j : X ⟶ Y} + {b : omegaPosetObj E ⟶ Y} (sq : IsPushout (omegaInc A) a b j) : + ∃ (p : Y ⟶ X) (H : Y ⟶ Y), j ≫ p = 𝟙 X ∧ + Nonempty (SSet.Homotopy (𝟙 (streetNerveFunctor.obj Y)) + (streetNerveFunctor.map H)) ∧ + Nonempty (SSet.Homotopy (streetNerveFunctor.map (p ≫ j)) + (streetNerveFunctor.map H)) := by + let d₀ := idPrismData A hA x hx + let d₁ := retractPrismData A hA r hadj x hx + let i : A →o E := (OrderEmbedding.subtype A).toOrderHom + let r' := retract A hA r hadj x hx + have hr' : r'.comp i = OrderHom.id := retract_comp_inc A hA r hadj x hx + have hri : omegaInc A ≫ omegaPosetMap r' = 𝟙 (omegaPosetObj A) := by + rw [← omegaPosetMap_comp] + change omegaPosetMap (r'.comp i) = _ + rw [hr', omegaPosetMap_id] + have h₀ : d₀.f.comp i = i := rfl + have h₁ : d₁.f.comp i = i := by + ext e + exact congrArg Subtype.val (retract_old A hA r hadj x hx e) + have hs₀ := d₀.grayPrism_stationary T i (fun e => e.property) + have hs₁ := d₁.grayPrism_stationary T i (fun e => e.property) + rw [h₀] at hs₀ + rw [h₁] at hs₁ + exact T.omega_pushout_zigzag sq (omegaPosetMap r') hri + (omegaPosetMap (upper A hA x hx)) + (d₀.prism T) (d₁.prism T) + ((d₀.prism_endpoint_false T).trans (omegaPosetMap_id E)) + (d₀.prism_endpoint_true T) + ((d₁.prism_endpoint_false T).trans (omegaPosetMap_comp r' i)) + (d₁.prism_endpoint_true T) hs₀ hs₁ + +include T hA r hadj x hx in + +theorem omega_pushout_nerve_weak + {X Y : OmegaCategory.{u}} {a : omegaPosetObj A ⟶ X} {j : X ⟶ Y} + {b : omegaPosetObj E ⟶ Y} (sq : IsPushout (omegaInc A) a b j) : + simplicialWeakEquivalences (streetNerveFunctor.map j) := by + obtain ⟨p,H,hp,⟨H₀⟩,⟨H₁⟩⟩ := omega_pushout_deformation T A hA r hadj x hx sq + exact RightIntervalExtension.omega_nerve_weak_of_zigzag j p H hp H₀ H₁ + +end Thomason.GreatestNew + +end + +end OAI diff --git a/lean/OAI/CategoryTheory/Thomason/HomotopyExtension.lean b/lean/OAI/CategoryTheory/Thomason/HomotopyExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..1487fd05bf1d56efac37888469033f4b42a7f6da --- /dev/null +++ b/lean/OAI/CategoryTheory/Thomason/HomotopyExtension.lean @@ -0,0 +1,795 @@ +import Mathlib +import OAI.CategoryTheory.Thomason.SieveAttachments + +namespace OAI + +/-! Homotopy Extension. -/ + +noncomputable section +universe u v w z +open CategoryTheory Limits Opposite Simplicial MonoidalCategory + +namespace Thomason.TopologicalCylinder +open scoped Topology unitInterval +open CategoryTheory +open Thomason.TopologicalHorn + +noncomputable def minimum (n : ℕ) (x : Simplex n) : ℝ := + Finset.univ.inf' Finset.univ_nonempty (fun k : Fin (n+1) => x.weights k) + +lemma minimum_nonneg (n : ℕ) (x : Simplex n) : 0 ≤ minimum n x := + Finset.le_inf' _ _ (fun _ _ => Convexity.StdSimplex.weights_nonneg _) + +lemma minimum_le (n : ℕ) (x : Simplex n) (j : Fin (n+1)) : minimum n x ≤ x.weights j := + Finset.inf'_le _ (Finset.mem_univ j) + +lemma minimum_attained (n : ℕ) (x : Simplex n) : ∃ j, minimum n x = x.weights j := by + obtain ⟨j, _, hj⟩ := Finset.exists_mem_eq_inf' Finset.univ_nonempty (fun k : Fin (n+1) => x.weights k) + exact ⟨j,hj⟩ + +lemma continuous_minimum (n : ℕ) : Continuous (minimum n) := + Continuous.finset_inf'_apply Finset.univ_nonempty + (fun k _ => Convexity.StdSimplex.continuous_weights_apply ℝ k) + +noncomputable def denominator {n : ℕ} (q : I × Simplex n) : ℝ := + max (1 - (q.1 : ℝ)/2) (1 - (n+1 : ℝ) * minimum n q.2) + +lemma denominator_pos {n : ℕ} (q : I × Simplex n) : 0 < denominator q := by + have : (1:ℝ)/2 ≤ 1 - (q.1:ℝ)/2 := by linarith [q.1.property.2] + exact lt_of_lt_of_le (by norm_num : (0:ℝ) < 1/2) (this.trans (le_max_left _ _)) + +lemma denominator_le_one {n : ℕ} (q : I × Simplex n) : denominator q ≤ 1 := by + apply max_le + · linarith [q.1.property.1] + · have := mul_nonneg (show 0 ≤ (n+1:ℝ) by positivity) (minimum_nonneg n q.2) + linarith + +lemma continuous_denominator (n : ℕ) : Continuous (@denominator n) := + (continuous_const.sub ((continuous_subtype_val.comp continuous_fst).div_const 2)).max + (continuous_const.sub (((continuous_minimum n).comp continuous_snd).const_mul _)) + +noncomputable def time {n : ℕ} (q : I × Simplex n) : I := + ⟨2 - (2 - (q.1:ℝ))/denominator q, by + have hd := denominator_pos q + have ha : 1 - (q.1:ℝ)/2 ≤ denominator q := le_max_left _ _ + constructor + · have : (2 - (q.1:ℝ))/denominator q ≤ 2 := (div_le_iff₀ hd).mpr (by linarith) + linarith + · have : 1 ≤ (2 - (q.1:ℝ))/denominator q := (le_div_iff₀ hd).mpr (by + linarith [denominator_le_one q, q.1.property.2]) + linarith⟩ + +lemma continuous_time (n : ℕ) : Continuous (@time n) := by + apply Continuous.subtype_mk + exact continuous_const.sub ((continuous_const.sub (continuous_subtype_val.comp continuous_fst)).div + (continuous_denominator n) (fun q => ne_of_gt (denominator_pos q))) + +noncomputable def space (n : ℕ) : C(I × Simplex n, Simplex n) := by + refine ⟨fun q => ⟨Finsupp.equivFunOnFinite.symm + (fun j => (q.2.weights j - (1-denominator q)/(n+1:ℝ))/denominator q), ?_, ?_⟩, ?_⟩ + · intro j + apply div_nonneg _ (denominator_pos q).le + apply sub_nonneg.mpr + apply (div_le_iff₀ (show (0:ℝ) < n+1 by positivity)).mpr + have h := minimum_le n q.2 j + have hd : 1 - (n+1:ℝ)*minimum n q.2 ≤ denominator q := le_max_right _ _ + nlinarith + · rw [Finsupp.sum_fintype _ _ (fun _ => rfl)] + change ∑ j, (q.2.weights j - (1-denominator q)/(n+1:ℝ))/denominator q = 1 + rw [← Finset.sum_div, Finset.sum_sub_distrib, Convexity.StdSimplex.total_of_fintype, + Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] + apply (div_eq_one_iff_eq (ne_of_gt (denominator_pos q))).mpr + push_cast + field_simp + ring + · apply (Convexity.StdSimplex.isEmbedding_toFun_comp_weights ℝ (Fin (n+1))).continuous_iff.mpr + apply continuous_pi + intro j + exact (((Convexity.StdSimplex.continuous_weights_apply ℝ j).comp continuous_snd).sub + ((continuous_const.sub (continuous_denominator n)).div_const _)).div + (continuous_denominator n) (fun q => ne_of_gt (denominator_pos q)) + +def bottomSides (n : ℕ) : Set (I × Simplex n) := + {q | q.1 = 0 ∨ ∃ j, q.2.weights j = 0} + +lemma retract_mem (n : ℕ) (q : I × Simplex n) : (time q, space n q) ∈ bottomSides n := by + have hd := denominator_pos q + rcases le_total (1 - (n+1:ℝ)*minimum n q.2) (1 - (q.1:ℝ)/2) with h | h + · left + apply Subtype.ext + have he : denominator q = 1 - (q.1:ℝ)/2 := max_eq_left h + change 2 - (2 - (q.1:ℝ))/denominator q = 0 + have : (2 - (q.1:ℝ))/denominator q = 2 := (div_eq_iff (ne_of_gt hd)).mpr (by rw [he]; ring) + rw [this]; ring + · right + have he : denominator q = 1 - (n+1:ℝ)*minimum n q.2 := max_eq_right h + obtain ⟨j,hj⟩ := minimum_attained n q.2 + refine ⟨j, ?_⟩ + change (q.2.weights j - (1-denominator q)/(n+1:ℝ))/denominator q = 0 + rw [he, ← hj] + have hn : (n+1:ℝ) ≠ 0 := by positivity + field_simp + ring + +noncomputable def retract (n : ℕ) : C(I × Simplex n, bottomSides n) := + ⟨fun q => ⟨(time q,space n q),retract_mem n q⟩, + ((continuous_time n).prodMk (space n).continuous).subtype_mk _⟩ + +lemma retract_fixed (n : ℕ) (q : bottomSides n) : (retract n q).val = q.val := by + have hd : denominator q.val = 1 := by + apply le_antisymm (denominator_le_one q.val) + rcases q.property with h | ⟨j,hj⟩ + · have : 1 - (q.val.1:ℝ)/2 = 1 := by rw [h]; norm_num + exact this ▸ le_max_left _ _ + · have hm : minimum n q.val.2 = 0 := + le_antisymm (hj ▸ minimum_le n q.val.2 j) (minimum_nonneg n q.val.2) + have : 1 - (n+1:ℝ)*minimum n q.val.2 = 1 := by rw [hm]; ring + exact this ▸ le_max_right _ _ + apply Prod.ext + · apply Subtype.ext + change 2 - (2 - (q.val.1:ℝ))/denominator q.val = _ + rw [hd]; simp + · ext j + change (q.val.2.weights j - (1-denominator q.val)/(n+1:ℝ))/denominator q.val = _ + rw [hd]; simp + +def boundarySet (n : ℕ) : Set (Simplex n) := {x | ∃ j, x.weights j = 0} + +lemma minimum_eq_zero {n : ℕ} (x : boundarySet n) : minimum n x = 0 := by + obtain ⟨j,hj⟩ := x.property + exact le_antisymm (hj ▸ minimum_le n x j) (minimum_nonneg n x) + +lemma isClosed_boundarySet (n : ℕ) : IsClosed (boundarySet n) := by + have he : boundarySet n = {x | minimum n x = 0} := by + ext x + constructor + · intro hx; exact minimum_eq_zero ⟨x,hx⟩ + · intro hx + obtain ⟨j,hj⟩ := minimum_attained n x + exact ⟨j,hj.symm.trans hx⟩ + rw [he] + exact isClosed_eq (continuous_minimum n) continuous_const + +def bottomPiece (n : ℕ) : Bool → Set (bottomSides n) := by + intro b + cases b + · exact {q | q.val.1 = 0} + · exact {q | q.val.2 ∈ boundarySet n} + +lemma isClosed_bottomPiece (n : ℕ) (b : Bool) : IsClosed (bottomPiece n b) := by + cases b + · exact isClosed_eq (continuous_fst.comp continuous_subtype_val) continuous_const + · exact (isClosed_boundarySet n).preimage (continuous_snd.comp continuous_subtype_val) + +lemma bottomPiece_cover (n : ℕ) (q : bottomSides n) : ∃ b, q ∈ bottomPiece n b := by + rcases q.property with h | h + · exact ⟨false,h⟩ + · exact ⟨true,h⟩ + +variable {X : Type u} [TopologicalSpace X] {n : ℕ} + +noncomputable def bottomPieceValue (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) : + ∀ k, C(bottomPiece n k,X) := by + intro b + cases b + · exact a.comp + ⟨fun q => q.val.val.2, continuous_snd.comp (continuous_subtype_val.comp continuous_subtype_val)⟩ + · exact H.comp ⟨fun q => (q.val.val.1,⟨q.val.val.2,q.property⟩), + (continuous_fst.comp (continuous_subtype_val.comp continuous_subtype_val)).prodMk + ((continuous_snd.comp (continuous_subtype_val.comp continuous_subtype_val)).subtype_mk _)⟩ + +lemma bottomPieceValue_agree (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) + (j k : Bool) (q : bottomSides n) (hj : q ∈ bottomPiece n j) (hk : q ∈ bottomPiece n k) : + bottomPieceValue a H j ⟨q,hj⟩ = bottomPieceValue a H k ⟨q,hk⟩ := by + cases j <;> cases k + · rfl + · change a q.val.2 = H (q.val.1,⟨q.val.2,hk⟩) + rw [show q.val.1 = 0 from hj] + exact (ha ⟨q.val.2,hk⟩).symm + · change H (q.val.1,⟨q.val.2,hj⟩) = a q.val.2 + rw [show q.val.1 = 0 from hk] + exact ha _ + · rfl + +noncomputable def bottomValue (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) : C(bottomSides n,X) := + closedCoverPaste (bottomPiece n) (isClosed_bottomPiece n) (bottomPiece_cover n) + (bottomPieceValue a H) (bottomPieceValue_agree a H ha) + +noncomputable def extend (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) : C(I × Simplex n,X) := + (bottomValue a H ha).comp (retract n) + +lemma extend_onRoof (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) (q : bottomSides n) : + extend a H ha q = bottomValue a H ha q := + congrArg (bottomValue a H ha) (Subtype.ext (retract_fixed n q)) + +lemma extend_zero (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) (x : Simplex n) : + extend a H ha (0,x) = a x := by + rw [extend_onRoof a H ha ⟨(0,x),Or.inl rfl⟩] + exact closedCoverPaste_apply (bottomPiece n) (isClosed_bottomPiece n) (bottomPiece_cover n) + (bottomPieceValue a H) (bottomPieceValue_agree a H ha) false _ rfl + +lemma extend_side (a : C(Simplex n,X)) (H : C(I × boundarySet n,X)) + (ha : ∀ x : boundarySet n, H (0,x) = a x) (t : I) (x : boundarySet n) : + extend a H ha (t,x) = H (t,x) := by + rw [extend_onRoof a H ha ⟨(t,x),Or.inr x.property⟩] + exact closedCoverPaste_apply (bottomPiece n) (isClosed_bottomPiece n) (bottomPiece_cover n) + (bottomPieceValue a H) (bottomPieceValue_agree a H ha) true _ x.property + +lemma boundary_faces_agree {X : TopCat.{u}} {n : ℕ} + (f : (SSet.boundary (n+1) : SSet.{u}) ⟶ TopCat.toSSet.obj X) + (j k : Fin (n+2)) (x : Simplex (n+1)) (hxj : x.weights j = 0) (hxk : x.weights k = 0) : + singularValue (SSet.boundary.ι j ≫ f) (drop j ⟨x,hxj⟩) = + singularValue (SSet.boundary.ι k ≫ f) (drop k ⟨x,hxk⟩) := by + by_cases he : j = k + · subst k + rfl + suffices h : ∀ (j k : Fin (n+2)) (hjk : j < k) (hxj : x.weights j = 0) (hxk : x.weights k = 0), + singularValue (SSet.boundary.ι j ≫ f) (drop j ⟨x,hxj⟩) = + singularValue (SSet.boundary.ι k ≫ f) (drop k ⟨x,hxk⟩) by + rcases lt_or_gt_of_ne he with hlt | hlt + · exact h j k hlt hxj hxk + · exact (h k j hlt hxk hxj).symm + clear j k hxj hxk he + intro j k hjk hxj hxk + cases n with + | zero => + have hs := Convexity.StdSimplex.total_of_fintype x + rw [Fin.sum_univ_two] at hs + fin_cases j <;> fin_cases k <;> norm_num at hjk + change x.weights 0 = 0 at hxj + change x.weights 1 = 0 at hxk + linarith + | succ n => + let b := k.pred (Fin.ne_zero_of_lt hjk) + let a := j.castPred (Fin.ne_last_of_lt hjk) + let y := drop j ⟨x,hxj⟩ + have hy : y.weights b = 0 := by + change x.weights (j.succAbove b) = 0 + simpa only [b, Fin.succAbove_pred_of_lt j k hjk] using hxk + let z := drop b ⟨y,hy⟩ + have hyz : Convexity.StdSimplex.map b.succAbove z = y := map_drop b y hy + have hkz : Convexity.StdSimplex.map a.succAbove z = drop k ⟨x,hxk⟩ := by + apply map_succAbove_injective k + rw [map_drop, ← double_map j k hjk z, hyz] + exact map_drop j x hxj + have hc : SSet.stdSimplex.δ b ≫ (SSet.boundary.ι j ≫ f) = + SSet.stdSimplex.δ a ≫ (SSet.boundary.ι k ≫ f) := by + simp only [← Category.assoc] + congr 1 + dsimp [a,b] + obtain ⟨j,rfl⟩ := j.eq_castSucc_of_ne_last (Fin.ne_last_of_lt hjk) + obtain ⟨k,rfl⟩ := k.eq_succ_of_ne_zero (Fin.ne_zero_of_lt hjk) + rw [← cancel_mono (SSet.boundary (n+2)).ι, Category.assoc, Category.assoc, + SSet.boundary.ι_ι, SSet.boundary.ι_ι, Fin.pred_succ, Fin.castPred_castSucc, + SSet.stdSimplex.δ_comp_δ (by simpa using hjk)] + have heq := congrArg (fun g => singularValue g z) hc + rw [singularValue_delta, singularValue_delta] at heq + change singularValue (SSet.boundary.ι j ≫ f) (Convexity.StdSimplex.map b.succAbove z) = + singularValue (SSet.boundary.ι k ≫ f) (Convexity.StdSimplex.map a.succAbove z) at heq + rwa [hyz,hkz] at heq + +noncomputable def boundaryValue {X : TopCat.{u}} {n : ℕ} + (f : (SSet.boundary (n+1) : SSet.{u}) ⟶ TopCat.toSSet.obj X) : C(boundarySet (n+1), X) := + closedCoverPaste (fun j : Fin (n+2) => {x | x.val.weights j = 0}) + (fun j => isClosed_eq ((Convexity.StdSimplex.continuous_weights_apply ℝ j).comp + continuous_subtype_val) continuous_const) + (fun x => by obtain ⟨j,hj⟩ := x.property; exact ⟨j,hj⟩) + (fun j => (singularValue (SSet.boundary.ι j ≫ f)).comp + ((drop j).comp ⟨fun x => ⟨x.val.val,x.property⟩, + (continuous_subtype_val.comp continuous_subtype_val).subtype_mk _⟩)) + (fun j k x hj hk => boundary_faces_agree f j k x.val hj hk) + +lemma boundaryValue_face {X : TopCat.{u}} {n : ℕ} + (f : (SSet.boundary (n+1) : SSet.{u}) ⟶ TopCat.toSSet.obj X) + (j : Fin (n+2)) (x : Simplex n) : + boundaryValue f ⟨Convexity.StdSimplex.map j.succAbove x,j,map_succAbove_pivot j x⟩ = + singularValue (SSet.boundary.ι j ≫ f) x := by + rw [boundaryValue, closedCoverPaste_apply (j := j) (ha := map_succAbove_pivot j x)] + change singularValue (SSet.boundary.ι j ≫ f) + (drop j ⟨Convexity.StdSimplex.map j.succAbove x, map_succAbove_pivot j x⟩) = _ + rw [drop_map] + +open Simplicial +lemma boundaryValue_square {X Y : TopCat.{u}} {n : ℕ} + (g : (SSet.boundary (n+1) : SSet.{u}) ⟶ TopCat.toSSet.obj X) + (f : (SSet.stdSimplex.obj ⦋n+1⦌ : SSet.{u}) ⟶ TopCat.toSSet.obj Y) (p : X ⟶ Y) + (h : g ≫ TopCat.toSSet.map p = (SSet.boundary (n+1)).ι ≫ f) (x : boundarySet (n+1)) : + p (boundaryValue g x) = singularValue f x := by + obtain ⟨j,hx⟩ := x.property + let y := drop j ⟨x.val,hx⟩ + have he : (⟨Convexity.StdSimplex.map j.succAbove y,j,map_succAbove_pivot j y⟩ : boundarySet (n+1)) = x := + Subtype.ext (map_drop j x hx) + rw [← he,boundaryValue_face] + have hh : (SSet.boundary.ι j ≫ g) ≫ TopCat.toSSet.map p = SSet.stdSimplex.δ j ≫ f := by + rw [Category.assoc,h,SSet.boundary.ι_ι_assoc] + simpa only [singularValue_post,singularValue_delta] using congrArg (fun φ => singularValue φ y) hh + +noncomputable def pathStart (T : TopCat.{u}) : TopCat.of C(I,T) ⟶ T := + TopCat.ofHom ⟨fun γ => γ 0, continuous_eval_const 0⟩ + +theorem singular_pathStart_boundary_rlp (T : TopCat.{u}) : + SSet.modelCategoryQuillen.I.rlp (TopCat.toSSet.map (pathStart T)) := by + rintro _ _ _ ⟨n⟩ + constructor + intro g f sq + cases n with + | zero => + let h : C(Simplex 0,C(I,T)) := ContinuousMap.const'.comp (singularValue f) + let φ := SSet.yonedaEquiv.symm (((PathSpace T).toSSetObjEquiv _).symm h) + have hφ : singularValue φ = h := by simp only [singularValue,φ,Equiv.apply_symm_apply] + refine ⟨⟨{ l := φ, fac_left := SSet.boundary.hom_ext₀, fac_right := ?_ }⟩⟩ + apply SSet.yonedaEquiv.injective + apply (T.toSSetObjEquiv _).injective + apply ContinuousMap.ext + intro x + change singularValue (φ ≫ TopCat.toSSet.map (pathStart T)) x = singularValue f x + rw [singularValue_post,hφ] + rfl + | succ n => + let H : C(I × boundarySet (n+1),T) := (boundaryValue g).uncurry.comp ⟨Prod.swap,continuous_swap⟩ + let a : C(Simplex (n+1),T) := singularValue f + have ha (x : boundarySet (n+1)) : H (0,x) = a x := + boundaryValue_square g f (pathStart T) sq.w x + let h : C(Simplex (n+1),C(I,T)) := + ((extend a H ha).comp ⟨Prod.swap,continuous_swap⟩).curry + let φ := SSet.yonedaEquiv.symm (((PathSpace T).toSSetObjEquiv _).symm h) + have hφ : singularValue φ = h := by simp only [singularValue,φ,Equiv.apply_symm_apply] + refine ⟨⟨{ l := φ, fac_left := ?_, fac_right := ?_ }⟩⟩ + · apply SSet.boundary.hom_ext + intro j + rw [SSet.boundary.ι_ι_assoc] + apply SSet.yonedaEquiv.injective + apply ((PathSpace T).toSSetObjEquiv _).injective + apply ContinuousMap.ext + intro x + apply ContinuousMap.ext + intro t + change singularValue (SSet.stdSimplex.δ j ≫ φ) x t = + singularValue (SSet.boundary.ι j ≫ g) x t + rw [singularValue_delta,hφ] + change extend a H ha (t,Convexity.StdSimplex.map j.succAbove x) = _ + rw [extend_side a H ha t ⟨Convexity.StdSimplex.map j.succAbove x,j,map_succAbove_pivot j x⟩] + change boundaryValue g ⟨Convexity.StdSimplex.map j.succAbove x,j,map_succAbove_pivot j x⟩ t = _ + rw [boundaryValue_face] + · apply SSet.yonedaEquiv.injective + apply (T.toSSetObjEquiv _).injective + apply ContinuousMap.ext + intro x + change singularValue (φ ≫ TopCat.toSSet.map (pathStart T)) x = singularValue f x + rw [singularValue_post,hφ] + exact extend_zero a H ha x + +theorem realization_mono_homotopy_extension {A B : SSet.{u}} (i : A ⟶ B) [Mono i] + (T : TopCat.{u}) : HasLiftingProperty (SSet.toTop.map i) (pathStart T) := by + rw [sSetTopAdj.hasLiftingProperty_iff] + have hp : (MorphismProperty.monomorphisms SSet).rlp (TopCat.toSSet.map (pathStart T)) := by + rw [SSet.rlp_monomorphisms] + exact singular_pathStart_boundary_rlp T + exact hp i inferInstance +end Thomason.TopologicalCylinder + +end + +noncomputable section +universe u v w z + + +namespace Thomason.WeakHomotopy +open scoped Topology Topology.Homotopy +variable {X : Type u} {Y : Type v} {Z : Type w} {T : Type z} + [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] [TopologicalSpace T] + +lemma Equivalence.middle {f : C(X,Y)} {g : C(Y,Z)} {h : C(Z,T)} + (hfg : Equivalence (g.comp f)) (hgh : Equivalence (h.comp g)) : Equivalence g := by + have hfg₀ : Function.Bijective (componentsMap g ∘ componentsMap f) := by + rw [show componentsMap g ∘ componentsMap f = componentsMap (g.comp f) from + funext (componentsMap_comp f g)] + exact hfg.1 + have hgh₀ : Function.Bijective (componentsMap h ∘ componentsMap g) := by + rw [show componentsMap h ∘ componentsMap g = componentsMap (h.comp g) from + funext (componentsMap_comp g h)] + exact hgh.1 + have hg₀ : Function.Bijective (componentsMap g) := + ⟨hgh₀.injective.of_comp, hfg₀.surjective.of_comp⟩ + have hf₀ : Function.Bijective (componentsMap f) := + (Function.Bijective.of_comp_iff' hg₀ _).mp hfg₀ + refine ⟨hg₀, ?_⟩ + intro n y + obtain ⟨c, hc⟩ := hf₀.surjective (ZerothHomotopy.mk y) + induction c using ZerothHomotopy.rec with + | mk x => + have he : ZerothHomotopy.mk (f x) = ZerothHomotopy.mk y := hc + obtain ⟨γ⟩ : Nonempty (Path (f x) y) := Quotient.exact he + apply groupMap_bijective_along_path g γ + have hfgn := hfg.2 n x + have hghn := hgh.2 n (f x) + rw [groupMap_comp] at hfgn hghn + exact ⟨hghn.injective.of_comp, hfgn.surjective.of_comp⟩ +end Thomason.WeakHomotopy + +end + +noncomputable section +universe u v w z + + +namespace Thomason +open CategoryTheory +lemma simplicialWeakEquivalences_middle {W X Y Z : SSet.{u}} + (f : W ⟶ X) (g : X ⟶ Y) (h : Y ⟶ Z) + (hfg : simplicialWeakEquivalences (f ≫ g)) + (hgh : simplicialWeakEquivalences (g ≫ h)) : simplicialWeakEquivalences g := by + apply WeakHomotopy.Equivalence.middle (f := (SSet.toTop.map f).hom) + (h := (SSet.toTop.map h).hom) + · simpa only [simplicialWeakEquivalences, topologicalWeakEquivalences, + MorphismProperty.inverseImage, Functor.map_comp, TopCat.hom_comp] using hfg + · simpa only [simplicialWeakEquivalences, topologicalWeakEquivalences, + MorphismProperty.inverseImage, Functor.map_comp, TopCat.hom_comp] using hgh +end Thomason + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CoherentGluing +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +lemma zeroFactor_one (X : SSet.{u}) : + (SimplicialCylinder.zeroFactorIso X).hom ≫ X ◁ SSet.stdSimplex.δ (n := 0) 0 = SSet.ι₁ := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.ext + intro z + rfl + +lemma extend_one {A B T : SSet.{u}} (i : A ⟶ B) [Mono i] [SSet.KanComplex T] + (g : B ⟶ T) (H : A ⊗ Δ[1] ⟶ T) (h₁ : SSet.ι₁ ≫ H = i ≫ g) : + ∃ Q : B ⊗ Δ[1] ⟶ T, (i ▷ Δ[1]) ≫ Q = H ∧ SSet.ι₁ ≫ Q = g := by + let sq := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i + (SSet.stdSimplex.δ (n := 0) (0 : Fin 2)) + have hc : i ▷ Δ[0] ≫ (fst B Δ[0] ≫ g) = A ◁ SSet.stdSimplex.δ (n := 0) 0 ≫ H := by + apply (cancel_epi (SimplicialCylinder.zeroFactorIso A).hom).mp + rw [← Category.assoc _ _ H, zeroFactor_one, h₁] + rfl + let a : sq.pt ⟶ T := sq.isPushout.desc (fst B Δ[0] ≫ g) H hc + have : HasLiftingProperty sq.ι (terminal.from T) := + SSet.anodyneExtensions_pushoutObjObjι sq (SimplicialCylinder.delta_one_anodyne 0) + (terminal.from T) (by rw [← HomotopicalAlgebra.fibration_iff]; infer_instance) + let lsq : CommSq a sq.ι (terminal.from T) (terminal.from (B ⊗ Δ[1])) := ⟨by simp⟩ + have hi : sq.inr ≫ sq.ι = i ▷ Δ[1] := sq.inr_ι + have hj : sq.inl ≫ sq.ι = B ◁ SSet.stdSimplex.δ (n := 0) 0 := sq.inl_ι + refine ⟨lsq.lift, ?_, ?_⟩ + · rw [← hi, Category.assoc, lsq.fac_left] + exact sq.isPushout.inr_desc _ _ _ + · rw [← zeroFactor_one B, Category.assoc, ← hj, Category.assoc, lsq.fac_left] + rw [sq.isPushout.inl_desc] + rfl +end Thomason.CoherentGluing + +end + +noncomputable section +universe u v w z + + +namespace Thomason.CoherentGluing +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +def toHomotopy {A B : SSet.{u}} {f g : A ⟶ B} (H : A ⊗ Δ[1] ⟶ B) + (h₀ : SSet.ι₀ ≫ H = f) (h₁ : SSet.ι₁ ≫ H = g) : SSet.Homotopy f g where + h := H + h₀ := h₀ + h₁ := h₁ + rel := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + rintro ⟨⟨x,hx⟩,θ⟩ + exact False.elim hx + +lemma pushout_weak {K A B C P Q : SSet.{u}} (k : K ⟶ A) (c : K ⟶ C) [Mono c] + (f : A ⟶ B) (g : B ⟶ A) + (HA : SSet.Homotopy (f ≫ g) (𝟙 A)) (HB : SSet.Homotopy (g ≫ f) (𝟙 B)) + (coh : HA.h ≫ f = (f ▷ Δ[1]) ≫ HB.h) + {lA : A ⟶ P} {lC : C ⟶ P} (sp : IsPushout k c lA lC) + {lB : B ⟶ Q} {lC' : C ⟶ Q} (sq : IsPushout (k ≫ f) c lB lC') + (F : P ⟶ Q) (hFA : lA ≫ F = f ≫ lB) (hFC : lC ≫ F = lC') : + simplicialWeakEquivalences F := by + dsimp only [SSet.Homotopy] at HA HB + let R := Subdivision.exInfinityFunctor + let eP : P ⟶ R.obj P := Subdivision.exInfinityComparison P + let eQ : Q ⟶ R.obj Q := Subdivision.exInfinityComparison Q + have hnat : eP ≫ R.map F = F ≫ eQ := (Subdivision.exInfinityUnit.naturality F).symm + have : SSet.KanComplex (R.obj P) := Subdivision.exInfinity_kan P + obtain ⟨HC,hCK,hC₁⟩ := extend_one c (lC ≫ eP) ((k ▷ Δ[1]) ≫ HA.h ≫ lA ≫ eP) (by + rw [← Category.assoc, SSet.ι₁_comp, Category.assoc, SSet.Homotopy.h₁_assoc HA, + Category.id_comp, ← Category.assoc k lA, sp.w] + simp only [Category.assoc]) + let gC := SSet.ι₀ ≫ HC + have hgK : (k ≫ f) ≫ (g ≫ lA ≫ eP) = c ≫ gC := by + dsimp only [gC] + rw [← SSet.ι₀_comp_assoc, hCK] + simp only [SSet.ι₀_comp_assoc, SSet.Homotopy.h₀_assoc HA, Category.assoc] + let G : Q ⟶ R.obj P := sq.desc (g ≫ lA ≫ eP) gC hgK + have hGB : lB ≫ G = g ≫ lA ≫ eP := sq.inl_desc _ _ _ + have hGC : lC' ≫ G = gC := sq.inr_desc _ _ _ + have spI := sp.map (tensorRight (Δ[1] : SSet.{u})) + let HP : P ⊗ Δ[1] ⟶ R.obj P := spI.desc (HA.h ≫ lA ≫ eP) HC hCK.symm + have hPA : lA ▷ Δ[1] ≫ HP = HA.h ≫ lA ≫ eP := spI.inl_desc _ _ _ + have hPC : lC ▷ Δ[1] ≫ HP = HC := spI.inr_desc _ _ _ + have hP₀ : SSet.ι₀ ≫ HP = F ≫ G := by + apply sp.hom_ext + · erw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hPA, + SSet.Homotopy.h₀_assoc HA, ← Category.assoc lA F G, hFA] + simp only [Category.assoc, hGB] + · rw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hPC, + ← Category.assoc lC F G, hFC, hGC] + have hP₁ : SSet.ι₁ ≫ HP = eP := by + apply sp.hom_ext + · erw [← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hPA, + SSet.Homotopy.h₁_assoc HA, Category.id_comp] + · erw [← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hPC,hC₁] + have hqK : ((k ≫ f) ▷ Δ[1]) ≫ (HB.h ≫ lB ≫ eQ) = + (c ▷ Δ[1]) ≫ (HC ≫ R.map F) := by + erw [← Category.assoc _ HC, hCK] + simp only [Category.assoc] + rw [hnat, ← Category.assoc lA F, hFA] + simp only [Category.assoc] + rw [← Category.assoc HA.h f, coh] + simp only [comp_whiskerRight, Category.assoc] + have sqI := sq.map (tensorRight (Δ[1] : SSet.{u})) + let HQ : Q ⊗ Δ[1] ⟶ R.obj Q := sqI.desc (HB.h ≫ lB ≫ eQ) (HC ≫ R.map F) hqK + have hQB : lB ▷ Δ[1] ≫ HQ = HB.h ≫ lB ≫ eQ := sqI.inl_desc _ _ _ + have hQC : lC' ▷ Δ[1] ≫ HQ = HC ≫ R.map F := sqI.inr_desc _ _ _ + have hQ₀ : SSet.ι₀ ≫ HQ = G ≫ R.map F := by + apply sq.hom_ext + · erw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hQB, SSet.Homotopy.h₀_assoc HB, + ← Category.assoc lB G, hGB] + simp only [Category.assoc] + rw [hnat, ← Category.assoc lA F, hFA] + simp only [Category.assoc] + · rw [← Category.assoc, ← SSet.ι₀_comp, Category.assoc, hQC, + ← Category.assoc lC' G, hGC] + rfl + have hQ₁ : SSet.ι₁ ≫ HQ = eQ := by + apply sq.hom_ext + · erw [← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hQB, + SSet.Homotopy.h₁_assoc HB, Category.id_comp] + · erw [← Category.assoc, ← SSet.ι₁_comp, Category.assoc, hQC, + ← Category.assoc SSet.ι₁ HC, hC₁, Category.assoc, hnat, + ← Category.assoc, hFC] + have hFG : simplicialWeakEquivalences (F ≫ G) := + (simplicialWeakEquivalences_homotopy (toHomotopy HP hP₀ hP₁)).mpr + (Subdivision.exInfinityComparison_weak P) + have hGR : simplicialWeakEquivalences (G ≫ R.map F) := + (simplicialWeakEquivalences_homotopy (toHomotopy HQ hQ₀ hQ₁)).mpr + (Subdivision.exInfinityComparison_weak Q) + exact simplicialWeakEquivalences.of_postcomp F G + (simplicialWeakEquivalences_middle F G (R.map F) hFG hGR) hFG +end Thomason.CoherentGluing + +end + +noncomputable section +universe u v w z + + +namespace Thomason.HornSubdivision +open CategoryTheory Limits Simplicial MonoidalCategory CartesianMonoidalCategory + +def endpoint (X : SSet.{u}) (j : Fin 2) : X ⟶ X ⊗ Δ[1] := + (SimplicialCylinder.zeroFactorIso X).hom ≫ X ◁ SSet.stdSimplex.δ (n := 0) j + +@[reassoc] lemma endpoint_natural {A B : SSet.{u}} (f : A ⟶ B) (j : Fin 2) : + f ≫ endpoint B j = endpoint A j ≫ f ▷ Δ[1] := by + rfl + +lemma endpoint_zero (X : SSet.{u}) : endpoint X 1 = SSet.ι₀ := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.ext + intro z + rfl +lemma endpoint_one (X : SSet.{u}) : endpoint X 0 = SSet.ι₁ := by + apply NatTrans.ext + funext k + apply ConcreteCategory.hom_ext + intro x + apply Prod.ext + · rfl + · apply SSet.stdSimplex.ext + intro z + rfl + +lemma cylinder_lift {A B X Y : SSet.{u}} (i : A ⟶ B) [Mono i] + (p : X ⟶ Y) (hp : simplicialFibrations p) (j : Fin 2) + (l : B ⟶ X) (H : A ⊗ Δ[1] ⟶ X) (K : B ⊗ Δ[1] ⟶ Y) + (hA : endpoint A j ≫ H = i ≫ l) + (hB : endpoint B j ≫ K = l ≫ p) + (hC : H ≫ p = i ▷ Δ[1] ≫ K) : + ∃ Q : B ⊗ Δ[1] ⟶ X, + i ▷ Δ[1] ≫ Q = H ∧ endpoint B j ≫ Q = l ∧ Q ≫ p = K := by + let s := Functor.PushoutObjObj.ofHasPushout (curriedTensor SSet) i + (SSet.stdSimplex.δ (n := 0) j) + have hc : i ▷ Δ[0] ≫ (fst B Δ[0] ≫ l) = A ◁ SSet.stdSimplex.δ (n := 0) j ≫ H := by + apply (cancel_epi (SimplicialCylinder.zeroFactorIso A).hom).mp + exact hA.symm + let a : s.pt ⟶ X := s.isPushout.desc (fst B Δ[0] ≫ l) H hc + have hs : a ≫ p = s.ι ≫ K := by + apply s.isPushout.hom_ext + · rw [← Category.assoc, s.isPushout.inl_desc, ← Category.assoc, s.inl_ι] + apply (cancel_epi (SimplicialCylinder.zeroFactorIso B).hom).mp + exact hB.symm + · rw [← Category.assoc, s.isPushout.inr_desc, ← Category.assoc, s.inr_ι] + exact hC + have : HasLiftingProperty s.ι p := + SSet.anodyneExtensions_pushoutObjObjι s (SimplicialCylinder.delta_one_anodyne j) p hp + let sq : CommSq a s.ι p K := ⟨hs⟩ + have hi : s.inr ≫ s.ι = i ▷ Δ[1] := s.inr_ι + have hj : s.inl ≫ s.ι = B ◁ SSet.stdSimplex.δ (n := 0) j := s.inl_ι + refine ⟨sq.lift, ?_, ?_, sq.fac_right⟩ + · rw [← hi, Category.assoc, sq.fac_left] + exact s.isPushout.inr_desc _ _ _ + · dsimp only [endpoint] + rw [Category.assoc, ← hj, Category.assoc, sq.fac_left, s.isPushout.inl_desc] + rfl + +lemma anodyne_of_coherent_span {A B : SSet.{u}} (i : A ⟶ B) [Mono i] + (g : B ⟶ A) (cA : A ⟶ A) (cB : B ⟶ B) + (H₀ : SSet.Homotopy (i ≫ g) cA) (K₀ : SSet.Homotopy (g ≫ i) cB) + (H₁ : SSet.Homotopy (𝟙 A) cA) (K₁ : SSet.Homotopy (𝟙 B) cB) + (coh₀ : H₀.h ≫ i = i ▷ Δ[1] ≫ K₀.h) + (coh₁ : H₁.h ≫ i = i ▷ Δ[1] ≫ K₁.h) : SSet.anodyneExtensions i := by + intro X Y p hp + constructor + intro a b s + obtain ⟨Q,hQA,hQ₀,hQp⟩ := cylinder_lift i p hp 1 (g ≫ a) + (H₀.h ≫ a) (K₀.h ≫ b) + (by rw [endpoint_zero, H₀.h₀_assoc]; simp only [Category.assoc]) + (by rw [endpoint_zero, K₀.h₀_assoc]; simpa only [Category.assoc] using congrArg (g ≫ ·) s.w.symm) + (by rw [Category.assoc, s.w, ← Category.assoc H₀.h i, coh₀]; simp) + let l := SSet.ι₁ ≫ Q + have hlA : i ≫ l = cA ≫ a := by + dsimp only [l] + rw [← SSet.ι₁_comp_assoc, hQA, H₀.h₁_assoc] + have hlB : l ≫ p = cB ≫ b := by + dsimp only [l] + rw [Category.assoc, hQp, K₀.h₁_assoc] + obtain ⟨R,hRA,hR₁,hRp⟩ := cylinder_lift i p hp 0 l + (H₁.h ≫ a) (K₁.h ≫ b) + (by rw [endpoint_one, H₁.h₁_assoc, hlA]) + (by rw [endpoint_one, K₁.h₁_assoc, hlB]) + (by rw [Category.assoc, s.w, ← Category.assoc H₁.h i, coh₁]; simp) + refine ⟨⟨{ l := SSet.ι₀ ≫ R, fac_left := ?_, fac_right := ?_ }⟩⟩ + · rw [← SSet.ι₀_comp_assoc, hRA, H₁.h₀_assoc, Category.id_comp] + · rw [Category.assoc, hRp, K₁.h₀_assoc, Category.id_comp] +end Thomason.HornSubdivision + +end + +noncomputable section +universe u v w z + + +namespace Thomason.HornSubdivision +open CategoryTheory Simplicial MonoidalCategory CartesianMonoidalCategory PartialOrder + +variable {P Q : Type u} [PartialOrder P] [PartialOrder Q] + +def orderCylinder (f g : P →o Q) (h : ∀ x, f x ≤ g x) : OneCat.Interval.{u} × P →o Q where + toFun x := if x.1.down = 0 then f x.2 else g x.2 + monotone' := by + rintro ⟨⟨b⟩,x⟩ ⟨⟨c⟩,y⟩ ⟨hbc,hxy⟩ + fin_cases b <;> fin_cases c + · exact f.monotone hxy + · exact (h x).trans (g.monotone hxy) + · exact False.elim (by simp at hbc) + · exact g.monotone hxy + +def orderCylinderCat (f g : P →o Q) (h : ∀ x, f x ≤ g x) : + OneCat.cylinder.obj (Cat.of P) ⟶ Cat.of Q := + ({ obj := orderCylinder f g h + map := fun a => homOfLE ((orderCylinder f g h).monotone ⟨leOfHom a.1,leOfHom a.2⟩) } : + OneCat.Interval.{u} × P ⥤ Q).toCatHom + +def orderHomotopy (f g : P →o Q) (h : ∀ x, f x ≤ g x) : + SSet.Homotopy (nerveMap f.toFunctor) (nerveMap g.toFunctor) where + h := OneCat.cylinderMap (C := Cat.of P) (D := Cat.of Q) (orderCylinderCat f g h) + h₀ := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + exact CategoryTheory.Functor.ext (fun _ => rfl) + h₁ := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + exact CategoryTheory.Functor.ext (fun _ => rfl) + rel := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + rintro ⟨⟨x,hx⟩,θ⟩ + exact False.elim hx + +lemma orderHomotopy_coherent {A B : Type u} [PartialOrder A] [PartialOrder B] + (i : A →o B) (fA gA : A →o A) (fB gB : B →o B) + (hA : ∀ x, fA x ≤ gA x) (hB : ∀ x, fB x ≤ gB x) + (hf : ∀ x, i (fA x) = fB (i x)) (hg : ∀ x, i (gA x) = gB (i x)) : + (orderHomotopy fA gA hA).h ≫ nerveMap i.toFunctor = + (nerveMap i.toFunctor ▷ Δ[1]) ≫ (orderHomotopy fB gB hB).h := by + apply NatTrans.ext + funext m + apply ConcreteCategory.hom_ext + intro x + exact CategoryTheory.Functor.ext (fun j => by + change i (if (SSet.stdSimplex.objEquiv x.2).toOrderHom j = 0 + then fA (x.1.obj j) else gA (x.1.obj j)) = + (if (SSet.stdSimplex.objEquiv x.2).toOrderHom j = 0 + then fB (i (x.1.obj j)) else gB (i (x.1.obj j))) + split_ifs <;> [exact hf _; exact hg _]) + +lemma hornFaceInclusion_anodyne {n : ℕ} (hn : 1 ≤ n) (k : Fin (n+1)) : + SSet.anodyneExtensions (nerveMap (OrderHom.Subtype.val + (fun chain : NonemptyFiniteChains (ULift.{u} (Fin (n+1))) => + chain ∈ Subdivision.HornFaces.{u} n k)).toFunctor) := by + classical + let B := NonemptyFiniteChains (ULift.{u} (Fin (n+1))) + let A := Subdivision.HornFaces.{u} n k + let i : A →o B := OrderHom.Subtype.val _ + let a₀ : A := Subdivision.hornFacePoint hn k + let g : B →o A := OrderHom.const _ a₀ + let cA := Subdivision.hornFaceCone k + let cB : B →o B := { + toFun := fun s => ⟨insert (ULift.up k) s.finset, by simp, by + intro a b + exact le_total a.val b.val⟩ + monotone' := by + intro s t h a ha + rcases Finset.mem_insert.mp ha with ha | ha + · exact Finset.mem_insert.mpr (Or.inl ha) + · exact Finset.mem_insert.mpr (Or.inr (h ha)) } + have hcB (s : B) : s ≤ cB s := fun _ => Finset.mem_insert_of_mem + have hkB (s : B) : i a₀ ≤ cB s := by + intro a ha + have he : a = ULift.up k := by + change a ∈ ({ULift.up k} : Finset _) at ha + exact Finset.mem_singleton.mp ha + subst a + exact Finset.mem_insert_self _ _ + have : Mono (nerveMap i.toFunctor) := by + rw [NatTrans.mono_iff_mono_app] + intro m + rw [CategoryTheory.mono_iff_injective] + intro x y h + exact CategoryTheory.Functor.ext (fun j => Subtype.ext (congrArg (fun z => z.obj j) h)) + let H₀ := orderHomotopy (g.comp i) cA (fun s => Subdivision.hornFacePoint_le_cone hn k s) + let K₀ := orderHomotopy (i.comp g) cB hkB + let H₁ := orderHomotopy (OrderHom.id) cA (fun s => Subdivision.le_hornFaceCone k s) + let K₁ := orderHomotopy (OrderHom.id) cB hcB + apply anodyne_of_coherent_span (nerveMap i.toFunctor) (nerveMap g.toFunctor) + (nerveMap cA.toFunctor) (nerveMap cB.toFunctor) H₀ K₀ H₁ K₁ + · exact orderHomotopy_coherent i (g.comp i) cA (i.comp g) cB _ _ (fun _ => rfl) (fun _ => rfl) + · exact orderHomotopy_coherent i OrderHom.id cA OrderHom.id cB _ _ (fun _ => rfl) (fun _ => rfl) +end Thomason.HornSubdivision + +end + +end OAI